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:
authorOve Murberg Henriksen <sorayasilvermoon@hotmail.com>2012-05-09 18:55:50 +0400
committerOve Murberg Henriksen <sorayasilvermoon@hotmail.com>2012-05-09 18:55:50 +0400
commit68179be662af72319694b30f5784640812211cd1 (patch)
treed7fec3d79bf925cb9ed4c06bbcb89b7e65f49e4c
parent7b3beec987f4ee129480730889dfdae07acc6419 (diff)
parente6a022816cd013b9d0399c4dc3beb522e144ac64 (diff)
svn merge ^/trunk/blender -r45927:HEAD --accept=theirs-full
This revision does not compile. code need to be merged in manualy.
-rw-r--r--CMakeLists.txt101
-rw-r--r--GNUmakefile27
-rw-r--r--SConstruct3
-rw-r--r--build_files/buildbot/master.cfg2
-rw-r--r--build_files/buildbot/master_unpack.py3
-rw-r--r--build_files/buildbot/slave_compile.py2
-rw-r--r--build_files/buildbot/slave_pack.py2
-rwxr-xr-xbuild_files/cmake/cmake_consistency_check.py2
-rwxr-xr-xbuild_files/cmake/cmake_netbeans_project.py2
-rwxr-xr-xbuild_files/cmake/cmake_qtcreator_project.py2
-rw-r--r--build_files/cmake/cmake_static_check_cppcheck.py2
-rw-r--r--build_files/cmake/cmake_static_check_sparse.py2
-rw-r--r--build_files/cmake/cmake_static_check_splint.py2
-rwxr-xr-xbuild_files/cmake/example_scripts/make_quicky.py2
-rwxr-xr-xbuild_files/cmake/project_info.py2
-rw-r--r--build_files/scons/config/win32-vc-config.py2
-rw-r--r--build_files/scons/config/win64-mingw-config.py8
-rw-r--r--build_files/scons/config/win64-vc-config.py2
-rw-r--r--build_files/scons/tools/btools.py16
-rwxr-xr-xdoc/blender_file_format/BlendFileDnaExporter_25.py2
-rw-r--r--doc/blender_file_format/BlendFileReader.py2
-rw-r--r--doc/manpage/blender.120
-rw-r--r--doc/python_api/examples/bpy.ops.2.py18
-rw-r--r--doc/python_api/examples/bpy.ops.3.py18
-rw-r--r--doc/python_api/examples/bpy.types.Mesh.py1
-rw-r--r--doc/python_api/rst/bgl.rst244
-rw-r--r--extern/Eigen3/Eigen/Core2
-rw-r--r--extern/Eigen3/Eigen/SVD4
-rw-r--r--extern/Eigen3/Eigen/src/Cholesky/LDLT.h8
-rw-r--r--extern/Eigen3/Eigen/src/Cholesky/LLT.h8
-rw-r--r--extern/Eigen3/Eigen/src/Core/Array.h4
-rw-r--r--extern/Eigen3/Eigen/src/Core/Block.h4
-rw-r--r--extern/Eigen3/Eigen/src/Core/DenseBase.h4
-rw-r--r--extern/Eigen3/Eigen/src/Core/Map.h4
-rw-r--r--extern/Eigen3/Eigen/src/Core/MapBase.h4
-rw-r--r--extern/Eigen3/Eigen/src/Core/Matrix.h4
-rw-r--r--extern/Eigen3/Eigen/src/Core/MatrixBase.h3
-rw-r--r--extern/Eigen3/Eigen/src/Core/PlainObjectBase.h23
-rw-r--r--extern/Eigen3/Eigen/src/Core/ProductBase.h14
-rw-r--r--extern/Eigen3/Eigen/src/Core/Replicate.h9
-rw-r--r--extern/Eigen3/Eigen/src/Core/SolveTriangular.h2
-rw-r--r--extern/Eigen3/Eigen/src/Core/arch/NEON/Complex.h4
-rw-r--r--extern/Eigen3/Eigen/src/Core/arch/NEON/PacketMath.h58
-rw-r--r--extern/Eigen3/Eigen/src/Core/products/GeneralBlockPanelKernel.h21
-rw-r--r--extern/Eigen3/Eigen/src/Core/util/Macros.h36
-rw-r--r--extern/Eigen3/Eigen/src/Core/util/Memory.h54
-rw-r--r--extern/Eigen3/Eigen/src/Core/util/XprHelper.h3
-rw-r--r--extern/Eigen3/Eigen/src/Eigenvalues/EigenSolver.h9
-rw-r--r--extern/Eigen3/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h12
-rw-r--r--extern/Eigen3/Eigen/src/Geometry/Hyperplane.h2
-rw-r--r--extern/Eigen3/Eigen/src/Geometry/Quaternion.h26
-rw-r--r--extern/Eigen3/Eigen/src/Geometry/Rotation2D.h2
-rw-r--r--extern/Eigen3/Eigen/src/Geometry/Transform.h31
-rw-r--r--extern/Eigen3/Eigen/src/Geometry/arch/Geometry_SSE.h4
-rw-r--r--extern/Eigen3/Eigen/src/LU/FullPivLU.h10
-rw-r--r--extern/Eigen3/Eigen/src/LU/arch/Inverse_SSE.h2
-rw-r--r--extern/Eigen3/Eigen/src/SVD/JacobiSVD.h17
-rw-r--r--extern/Eigen3/Eigen/src/Sparse/TriangularSolver.h4
-rw-r--r--extern/bullet2/patches/MinGW64-nopermissive.patch39
-rw-r--r--extern/bullet2/patches/mingw64_scons.patch13
-rw-r--r--extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h2
-rw-r--r--extern/bullet2/src/LinearMath/btSerializer.h13
-rw-r--r--extern/libmv/CMakeLists.txt2
-rw-r--r--extern/libmv/ChangeLog19
-rw-r--r--extern/libmv/files.txt2
-rw-r--r--extern/libmv/libmv-capi.cpp79
-rw-r--r--extern/libmv/libmv-capi.h3
-rw-r--r--extern/libmv/libmv/image/correlation.h24
-rw-r--r--extern/libmv/libmv/image/sample.h1
-rw-r--r--extern/libmv/libmv/simple_pipeline/modal_solver.cc126
-rw-r--r--extern/libmv/libmv/simple_pipeline/modal_solver.h48
-rw-r--r--extern/libmv/libmv/tracking/brute_region_tracker.cc67
-rw-r--r--extern/libmv/libmv/tracking/esm_region_tracker.cc42
-rw-r--r--extern/libmv/patches/mingw_w64_support.patch58
-rw-r--r--intern/SConscript13
-rw-r--r--intern/audaspace/intern/AUD_Buffer.cpp11
-rw-r--r--intern/audaspace/intern/AUD_C-API.cpp42
-rw-r--r--intern/audaspace/intern/AUD_C-API.h15
-rw-r--r--intern/audaspace/intern/AUD_FileWriter.cpp36
-rw-r--r--intern/audaspace/intern/AUD_FileWriter.h10
-rw-r--r--intern/audaspace/intern/AUD_Reference.h28
-rw-r--r--intern/audaspace/intern/AUD_ReferenceHandler.cpp21
-rw-r--r--intern/audaspace/intern/AUD_SequencerHandle.cpp1
-rw-r--r--intern/audaspace/patches/mingw64-nopermissive.patch23
-rw-r--r--intern/container/CTR_Map.h2
-rw-r--r--intern/cycles/app/cycles_xml.cpp25
-rw-r--r--intern/cycles/blender/addon/__init__.py5
-rw-r--r--intern/cycles/blender/addon/enums.py6
-rw-r--r--intern/cycles/blender/addon/properties.py27
-rw-r--r--intern/cycles/blender/addon/ui.py78
-rw-r--r--intern/cycles/blender/blender_camera.cpp114
-rw-r--r--intern/cycles/blender/blender_mesh.cpp81
-rw-r--r--intern/cycles/blender/blender_object.cpp116
-rw-r--r--intern/cycles/blender/blender_session.cpp18
-rw-r--r--intern/cycles/blender/blender_shader.cpp11
-rw-r--r--intern/cycles/blender/blender_sync.cpp17
-rw-r--r--intern/cycles/blender/blender_sync.h20
-rw-r--r--intern/cycles/blender/blender_util.h14
-rw-r--r--intern/cycles/bvh/CMakeLists.txt4
-rw-r--r--intern/cycles/bvh/bvh.cpp4
-rw-r--r--intern/cycles/bvh/bvh_binning.cpp224
-rw-r--r--intern/cycles/bvh/bvh_binning.h86
-rw-r--r--intern/cycles/bvh/bvh_build.cpp632
-rw-r--r--intern/cycles/bvh/bvh_build.h113
-rw-r--r--intern/cycles/bvh/bvh_node.cpp22
-rw-r--r--intern/cycles/bvh/bvh_node.h18
-rw-r--r--intern/cycles/bvh/bvh_params.h91
-rw-r--r--intern/cycles/bvh/bvh_sort.cpp16
-rw-r--r--intern/cycles/bvh/bvh_sort.h2
-rw-r--r--intern/cycles/bvh/bvh_split.cpp293
-rw-r--r--intern/cycles/bvh/bvh_split.h110
-rw-r--r--intern/cycles/device/device.cpp9
-rw-r--r--intern/cycles/device/device.h4
-rw-r--r--intern/cycles/device/device_cpu.cpp67
-rw-r--r--intern/cycles/device/device_cuda.cpp32
-rw-r--r--intern/cycles/device/device_multi.cpp7
-rw-r--r--intern/cycles/kernel/CMakeLists.txt1
-rw-r--r--intern/cycles/kernel/kernel_accumulate.h9
-rw-r--r--intern/cycles/kernel/kernel_bvh.h19
-rw-r--r--intern/cycles/kernel/kernel_camera.h59
-rw-r--r--intern/cycles/kernel/kernel_compat_opencl.h2
-rw-r--r--intern/cycles/kernel/kernel_emission.h8
-rw-r--r--intern/cycles/kernel/kernel_light.h13
-rw-r--r--intern/cycles/kernel/kernel_montecarlo.h75
-rw-r--r--intern/cycles/kernel/kernel_object.h84
-rw-r--r--intern/cycles/kernel/kernel_passes.h7
-rw-r--r--intern/cycles/kernel/kernel_path.h73
-rw-r--r--intern/cycles/kernel/kernel_projection.h210
-rw-r--r--intern/cycles/kernel/kernel_shader.h64
-rw-r--r--intern/cycles/kernel/kernel_textures.h1
-rw-r--r--intern/cycles/kernel/kernel_triangle.h90
-rw-r--r--intern/cycles/kernel/kernel_types.h133
-rw-r--r--intern/cycles/kernel/svm/svm.h6
-rw-r--r--intern/cycles/kernel/svm/svm_gamma.h6
-rw-r--r--intern/cycles/kernel/svm/svm_light_path.h28
-rw-r--r--intern/cycles/kernel/svm/svm_mapping.h11
-rw-r--r--intern/cycles/kernel/svm/svm_tex_coord.h85
-rw-r--r--intern/cycles/kernel/svm/svm_types.h14
-rw-r--r--intern/cycles/render/CMakeLists.txt4
-rw-r--r--intern/cycles/render/attribute.cpp54
-rw-r--r--intern/cycles/render/attribute.h29
-rw-r--r--intern/cycles/render/buffers.cpp22
-rw-r--r--intern/cycles/render/camera.cpp79
-rw-r--r--intern/cycles/render/camera.h19
-rw-r--r--intern/cycles/render/film.cpp22
-rw-r--r--intern/cycles/render/film.h1
-rw-r--r--intern/cycles/render/graph.cpp4
-rw-r--r--intern/cycles/render/image.cpp54
-rw-r--r--intern/cycles/render/image.h2
-rw-r--r--intern/cycles/render/integrator.cpp8
-rw-r--r--intern/cycles/render/integrator.h2
-rw-r--r--intern/cycles/render/light.cpp2
-rw-r--r--intern/cycles/render/mesh.cpp166
-rw-r--r--intern/cycles/render/mesh.h5
-rw-r--r--intern/cycles/render/mesh_displace.cpp4
-rw-r--r--intern/cycles/render/nodes.cpp83
-rw-r--r--intern/cycles/render/nodes.h8
-rw-r--r--intern/cycles/render/object.cpp97
-rw-r--r--intern/cycles/render/object.h5
-rw-r--r--intern/cycles/render/scene.cpp29
-rw-r--r--intern/cycles/render/scene.h8
-rw-r--r--intern/cycles/render/session.cpp5
-rw-r--r--intern/cycles/render/shader.cpp4
-rw-r--r--intern/cycles/render/shader.h2
-rw-r--r--intern/cycles/render/svm.cpp2
-rw-r--r--intern/cycles/render/svm.h2
-rw-r--r--intern/cycles/subd/subd_dice.cpp4
-rw-r--r--intern/cycles/subd/subd_patch.cpp12
-rw-r--r--intern/cycles/util/CMakeLists.txt2
-rw-r--r--intern/cycles/util/util_boundbox.h86
-rw-r--r--intern/cycles/util/util_math.h505
-rw-r--r--intern/cycles/util/util_progress.h5
-rw-r--r--intern/cycles/util/util_task.cpp274
-rw-r--r--intern/cycles/util/util_task.h126
-rw-r--r--intern/cycles/util/util_thread.h127
-rw-r--r--intern/cycles/util/util_transform.cpp124
-rw-r--r--intern/cycles/util/util_transform.h134
-rw-r--r--intern/cycles/util/util_types.h268
-rw-r--r--intern/dualcon/dualcon.h50
-rw-r--r--intern/dualcon/intern/GeoCommon.h17
-rw-r--r--intern/dualcon/intern/MemoryAllocator.h262
-rw-r--r--intern/dualcon/intern/ModelReader.h35
-rw-r--r--intern/dualcon/intern/Projections.cpp13
-rw-r--r--intern/dualcon/intern/Projections.h1199
-rw-r--r--intern/dualcon/intern/Queue.h114
-rw-r--r--intern/dualcon/intern/cubes.h22
-rw-r--r--intern/dualcon/intern/dualcon_c_api.cpp253
-rw-r--r--intern/dualcon/intern/marching_cubes_table.cpp1024
-rw-r--r--intern/dualcon/intern/octree.cpp2021
-rw-r--r--intern/dualcon/intern/octree.h2072
-rw-r--r--intern/elbeem/intern/ntl_geometrymodel.cpp11
-rw-r--r--intern/elbeem/patches/mingw64_nopermissive.patch29
-rw-r--r--intern/ghost/GHOST_Rect.h4
-rw-r--r--intern/ghost/intern/GHOST_NDOFManager.cpp2
-rw-r--r--intern/ghost/intern/GHOST_NDOFManagerX11.cpp43
-rw-r--r--intern/ghost/intern/GHOST_SystemCocoa.h1
-rw-r--r--intern/ghost/intern/GHOST_SystemCocoa.mm76
-rw-r--r--intern/ghost/intern/GHOST_SystemWin32.cpp6
-rw-r--r--intern/ghost/intern/GHOST_SystemX11.cpp11
-rw-r--r--intern/ghost/intern/GHOST_Window.h7
-rw-r--r--intern/ghost/intern/GHOST_WindowWin32.cpp2
-rw-r--r--intern/guardedalloc/cpp/mallocn.cpp4
-rw-r--r--intern/guardedalloc/intern/mallocn.c80
-rw-r--r--intern/mikktspace/mikktspace.c406
-rw-r--r--intern/smoke/extern/smoke_API.h7
-rw-r--r--intern/smoke/intern/FLUID_3D.cpp228
-rw-r--r--intern/smoke/intern/FLUID_3D.h17
-rw-r--r--intern/smoke/intern/OBSTACLE.h6
-rw-r--r--intern/smoke/intern/WTURBULENCE.cpp9
-rw-r--r--intern/smoke/intern/smoke_API.cpp53
-rw-r--r--intern/utfconv/utf_winfunc.c12
-rw-r--r--release/datafiles/splash.pngbin188517 -> 229594 bytes
-rw-r--r--release/plugins/sequence/blur.c50
-rw-r--r--release/plugins/texture/clouds2.c4
-rw-r--r--release/plugins/texture/tiles.c22
-rw-r--r--release/scripts/modules/addon_utils.py7
-rwxr-xr-xrelease/scripts/modules/blend_render_info.py2
-rw-r--r--release/scripts/presets/tracking_settings/blurry_movie.py11
-rw-r--r--release/scripts/startup/bl_operators/image.py26
-rw-r--r--release/scripts/startup/bl_operators/uvcalc_lightmap.py23
-rw-r--r--release/scripts/startup/bl_ui/properties_animviz.py44
-rw-r--r--release/scripts/startup/bl_ui/properties_data_armature.py24
-rw-r--r--release/scripts/startup/bl_ui/properties_data_camera.py14
-rw-r--r--release/scripts/startup/bl_ui/properties_data_curve.py8
-rw-r--r--release/scripts/startup/bl_ui/properties_data_lamp.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_data_modifier.py14
-rw-r--r--release/scripts/startup/bl_ui/properties_game.py59
-rw-r--r--release/scripts/startup/bl_ui/properties_object.py12
-rw-r--r--release/scripts/startup/bl_ui/properties_paint_common.py8
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_common.py28
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_smoke.py8
-rw-r--r--release/scripts/startup/bl_ui/space_clip.py241
-rw-r--r--release/scripts/startup/bl_ui/space_info.py26
-rw-r--r--release/scripts/startup/bl_ui/space_sequencer.py5
-rw-r--r--release/scripts/startup/bl_ui/space_text.py8
-rw-r--r--release/scripts/startup/bl_ui/space_time.py10
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py8
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py111
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py8
-rw-r--r--release/scripts/startup/keyingsets_builtins.py2
-rw-r--r--release/scripts/templates/operator_modal_timer.py2
-rw-r--r--release/windows/installer/00.sconsblender.nsi1
-rw-r--r--source/blender/avi/AVI_avi.h213
-rw-r--r--source/blender/avi/intern/avi.c727
-rw-r--r--source/blender/avi/intern/avirgb.c91
-rw-r--r--source/blender/avi/intern/codecs.c129
-rw-r--r--source/blender/avi/intern/endian.c253
-rw-r--r--source/blender/avi/intern/endian.h9
-rw-r--r--source/blender/avi/intern/mjpeg.c251
-rw-r--r--source/blender/avi/intern/options.c143
-rw-r--r--source/blender/avi/intern/rgb32.c39
-rw-r--r--source/blender/blenfont/intern/blf_glyph.c2
-rw-r--r--source/blender/blenfont/intern/blf_internal_types.h2
-rw-r--r--source/blender/blenfont/intern/blf_lang.c5
-rw-r--r--source/blender/blenkernel/BKE_DerivedMesh.h8
-rw-r--r--source/blender/blenkernel/BKE_action.h44
-rw-r--r--source/blender/blenkernel/BKE_armature.h52
-rw-r--r--source/blender/blenkernel/BKE_blender.h4
-rw-r--r--source/blender/blenkernel/BKE_brush.h68
-rw-r--r--source/blender/blenkernel/BKE_camera.h32
-rw-r--r--source/blender/blenkernel/BKE_cloth.h8
-rw-r--r--source/blender/blenkernel/BKE_constraint.h4
-rw-r--r--source/blender/blenkernel/BKE_curve.h135
-rw-r--r--source/blender/blenkernel/BKE_customdata.h1
-rw-r--r--source/blender/blenkernel/BKE_deform.h8
-rw-r--r--source/blender/blenkernel/BKE_displist.h41
-rw-r--r--source/blender/blenkernel/BKE_dynamicpaint.h15
-rw-r--r--source/blender/blenkernel/BKE_font.h18
-rw-r--r--source/blender/blenkernel/BKE_gpencil.h2
-rw-r--r--source/blender/blenkernel/BKE_group.h6
-rw-r--r--source/blender/blenkernel/BKE_image.h32
-rw-r--r--source/blender/blenkernel/BKE_ipo.h2
-rw-r--r--source/blender/blenkernel/BKE_key.h6
-rw-r--r--source/blender/blenkernel/BKE_lamp.h8
-rw-r--r--source/blender/blenkernel/BKE_lattice.h20
-rw-r--r--source/blender/blenkernel/BKE_library.h15
-rw-r--r--source/blender/blenkernel/BKE_material.h8
-rw-r--r--source/blender/blenkernel/BKE_mball.h153
-rw-r--r--source/blender/blenkernel/BKE_mesh.h132
-rw-r--r--source/blender/blenkernel/BKE_movieclip.h6
-rw-r--r--source/blender/blenkernel/BKE_node.h10
-rw-r--r--source/blender/blenkernel/BKE_object.h133
-rw-r--r--source/blender/blenkernel/BKE_ocean.h14
-rw-r--r--source/blender/blenkernel/BKE_paint.h4
-rw-r--r--source/blender/blenkernel/BKE_particle.h6
-rw-r--r--source/blender/blenkernel/BKE_report.h6
-rw-r--r--source/blender/blenkernel/BKE_scene.h52
-rw-r--r--source/blender/blenkernel/BKE_screen.h2
-rw-r--r--source/blender/blenkernel/BKE_softbody.h6
-rw-r--r--source/blender/blenkernel/BKE_sound.h2
-rw-r--r--source/blender/blenkernel/BKE_speaker.h8
-rw-r--r--source/blender/blenkernel/BKE_tessmesh.h3
-rw-r--r--source/blender/blenkernel/BKE_text.h28
-rw-r--r--source/blender/blenkernel/BKE_texture.h6
-rw-r--r--source/blender/blenkernel/BKE_tracking.h11
-rw-r--r--source/blender/blenkernel/BKE_utildefines.h3
-rw-r--r--source/blender/blenkernel/BKE_world.h6
-rw-r--r--source/blender/blenkernel/BKE_writeavi.h4
-rw-r--r--source/blender/blenkernel/BKE_writeffmpeg.h24
-rw-r--r--source/blender/blenkernel/BKE_writeframeserver.h10
-rw-r--r--source/blender/blenkernel/depsgraph_private.h8
-rw-r--r--source/blender/blenkernel/intern/CCGSubSurf.c2
-rw-r--r--source/blender/blenkernel/intern/DerivedMesh.c101
-rw-r--r--source/blender/blenkernel/intern/action.c714
-rw-r--r--source/blender/blenkernel/intern/anim.c779
-rw-r--r--source/blender/blenkernel/intern/anim_sys.c78
-rw-r--r--source/blender/blenkernel/intern/armature.c563
-rw-r--r--source/blender/blenkernel/intern/blender.c263
-rw-r--r--source/blender/blenkernel/intern/bmfont.c4
-rw-r--r--source/blender/blenkernel/intern/boids.c30
-rw-r--r--source/blender/blenkernel/intern/booleanops_mesh.c6
-rw-r--r--source/blender/blenkernel/intern/brush.c861
-rw-r--r--source/blender/blenkernel/intern/bvhutils.c143
-rw-r--r--source/blender/blenkernel/intern/camera.c340
-rw-r--r--source/blender/blenkernel/intern/cdderivedmesh.c768
-rw-r--r--source/blender/blenkernel/intern/cloth.c242
-rw-r--r--source/blender/blenkernel/intern/collision.c361
-rw-r--r--source/blender/blenkernel/intern/colortools.c737
-rw-r--r--source/blender/blenkernel/intern/constraint.c1878
-rw-r--r--source/blender/blenkernel/intern/context.c677
-rw-r--r--source/blender/blenkernel/intern/curve.c3166
-rw-r--r--source/blender/blenkernel/intern/customdata.c48
-rw-r--r--source/blender/blenkernel/intern/deform.c52
-rw-r--r--source/blender/blenkernel/intern/depsgraph.c1065
-rw-r--r--source/blender/blenkernel/intern/displist.c1321
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c302
-rw-r--r--source/blender/blenkernel/intern/editderivedmesh.c263
-rw-r--r--source/blender/blenkernel/intern/effect.c31
-rw-r--r--source/blender/blenkernel/intern/fcurve.c867
-rw-r--r--source/blender/blenkernel/intern/fluidsim.c8
-rw-r--r--source/blender/blenkernel/intern/fmodifier.c469
-rw-r--r--source/blender/blenkernel/intern/font.c665
-rw-r--r--source/blender/blenkernel/intern/gpencil.c156
-rw-r--r--source/blender/blenkernel/intern/group.c205
-rw-r--r--source/blender/blenkernel/intern/idcode.c2
-rw-r--r--source/blender/blenkernel/intern/idprop.c137
-rw-r--r--source/blender/blenkernel/intern/image.c1405
-rw-r--r--source/blender/blenkernel/intern/image_gen.c218
-rw-r--r--source/blender/blenkernel/intern/implicit.c347
-rw-r--r--source/blender/blenkernel/intern/ipo.c841
-rw-r--r--source/blender/blenkernel/intern/key.c18
-rw-r--r--source/blender/blenkernel/intern/lamp.c115
-rw-r--r--source/blender/blenkernel/intern/lattice.c464
-rw-r--r--source/blender/blenkernel/intern/library.c651
-rw-r--r--source/blender/blenkernel/intern/material.c1178
-rw-r--r--source/blender/blenkernel/intern/mball.c1755
-rw-r--r--source/blender/blenkernel/intern/mesh.c1510
-rw-r--r--source/blender/blenkernel/intern/mesh_validate.c18
-rw-r--r--source/blender/blenkernel/intern/modifier.c118
-rw-r--r--source/blender/blenkernel/intern/modifiers_bmesh.c4
-rw-r--r--source/blender/blenkernel/intern/movieclip.c98
-rw-r--r--source/blender/blenkernel/intern/multires.c532
-rw-r--r--source/blender/blenkernel/intern/navmesh_conversion.c123
-rw-r--r--source/blender/blenkernel/intern/nla.c78
-rw-r--r--source/blender/blenkernel/intern/node.c21
-rw-r--r--source/blender/blenkernel/intern/object.c1729
-rw-r--r--source/blender/blenkernel/intern/ocean.c269
-rw-r--r--source/blender/blenkernel/intern/packedFile.c74
-rw-r--r--source/blender/blenkernel/intern/paint.c4
-rw-r--r--source/blender/blenkernel/intern/particle.c2174
-rw-r--r--source/blender/blenkernel/intern/particle_system.c279
-rw-r--r--source/blender/blenkernel/intern/pointcache.c80
-rw-r--r--source/blender/blenkernel/intern/property.c192
-rw-r--r--source/blender/blenkernel/intern/report.c2
-rw-r--r--source/blender/blenkernel/intern/sca.c10
-rw-r--r--source/blender/blenkernel/intern/scene.c605
-rw-r--r--source/blender/blenkernel/intern/screen.c161
-rw-r--r--source/blender/blenkernel/intern/seqeffects.c2526
-rw-r--r--source/blender/blenkernel/intern/sequencer.c43
-rw-r--r--source/blender/blenkernel/intern/shrinkwrap.c89
-rw-r--r--source/blender/blenkernel/intern/sketch.c129
-rw-r--r--source/blender/blenkernel/intern/smoke.c1563
-rw-r--r--source/blender/blenkernel/intern/softbody.c1267
-rw-r--r--source/blender/blenkernel/intern/sound.c246
-rw-r--r--source/blender/blenkernel/intern/speaker.c44
-rw-r--r--source/blender/blenkernel/intern/subsurf_ccg.c88
-rw-r--r--source/blender/blenkernel/intern/text.c1918
-rw-r--r--source/blender/blenkernel/intern/texture.c965
-rw-r--r--source/blender/blenkernel/intern/tracking.c494
-rw-r--r--source/blender/blenkernel/intern/unit.c2
-rw-r--r--source/blender/blenkernel/intern/world.c102
-rw-r--r--source/blender/blenkernel/intern/writeavi.c22
-rw-r--r--source/blender/blenkernel/intern/writeffmpeg.c150
-rw-r--r--source/blender/blenkernel/intern/writeframeserver.c38
-rw-r--r--source/blender/blenlib/BLI_array.h16
-rw-r--r--source/blender/blenlib/BLI_bitmap.h2
-rw-r--r--source/blender/blenlib/BLI_boxpack2d.h6
-rw-r--r--source/blender/blenlib/BLI_bpath.h30
-rw-r--r--source/blender/blenlib/BLI_callbacks.h8
-rw-r--r--source/blender/blenlib/BLI_editVert.h191
-rw-r--r--source/blender/blenlib/BLI_fileops.h1
-rw-r--r--source/blender/blenlib/BLI_fileops_types.h2
-rw-r--r--source/blender/blenlib/BLI_ghash.h9
-rw-r--r--source/blender/blenlib/BLI_jitter.h2
-rw-r--r--source/blender/blenlib/BLI_lasso.h41
-rw-r--r--source/blender/blenlib/BLI_math_geom.h8
-rw-r--r--source/blender/blenlib/BLI_math_matrix.h2
-rw-r--r--source/blender/blenlib/BLI_math_vector.h3
-rw-r--r--source/blender/blenlib/BLI_memarena.h3
-rw-r--r--source/blender/blenlib/BLI_path_util.h2
-rw-r--r--source/blender/blenlib/BLI_scanfill.h12
-rw-r--r--source/blender/blenlib/BLI_threads.h2
-rw-r--r--source/blender/blenlib/BLI_utildefines.h40
-rw-r--r--source/blender/blenlib/BLI_uvproject.h12
-rw-r--r--source/blender/blenlib/BLI_voxel.h10
-rw-r--r--source/blender/blenlib/CMakeLists.txt7
-rw-r--r--source/blender/blenlib/PIL_time.h5
-rw-r--r--source/blender/blenlib/intern/BLI_args.c5
-rw-r--r--source/blender/blenlib/intern/BLI_ghash.c8
-rw-r--r--source/blender/blenlib/intern/BLI_kdopbvh.c321
-rw-r--r--source/blender/blenlib/intern/BLI_kdtree.c24
-rw-r--r--source/blender/blenlib/intern/DLRB_tree.c14
-rw-r--r--source/blender/blenlib/intern/boxpack2d.c22
-rw-r--r--source/blender/blenlib/intern/bpath.c47
-rw-r--r--source/blender/blenlib/intern/callbacks.c8
-rw-r--r--source/blender/blenlib/intern/cpu.c2
-rw-r--r--source/blender/blenlib/intern/dynlib.c2
-rw-r--r--source/blender/blenlib/intern/fileops.c12
-rw-r--r--source/blender/blenlib/intern/freetypefont.c49
-rw-r--r--source/blender/blenlib/intern/graph.c399
-rw-r--r--source/blender/blenlib/intern/jitter.c13
-rw-r--r--source/blender/blenlib/intern/lasso.c129
-rw-r--r--source/blender/blenlib/intern/listbase.c12
-rw-r--r--source/blender/blenlib/intern/math_matrix.c33
-rw-r--r--source/blender/blenlib/intern/math_rotation.c20
-rw-r--r--source/blender/blenlib/intern/math_vector.c19
-rw-r--r--source/blender/blenlib/intern/noise.c359
-rw-r--r--source/blender/blenlib/intern/path_util.c28
-rw-r--r--source/blender/blenlib/intern/pbvh.c34
-rw-r--r--source/blender/blenlib/intern/scanfill.c22
-rw-r--r--source/blender/blenlib/intern/storage.c57
-rw-r--r--source/blender/blenlib/intern/string.c6
-rw-r--r--source/blender/blenlib/intern/string_cursor_utf8.c1
-rw-r--r--source/blender/blenlib/intern/string_utf8.c34
-rw-r--r--source/blender/blenlib/intern/threads.c4
-rw-r--r--source/blender/blenlib/intern/uvproject.c22
-rw-r--r--source/blender/blenlib/intern/voxel.c16
-rw-r--r--source/blender/blenlib/intern/winstuff.c52
-rw-r--r--source/blender/blenloader/CMakeLists.txt2
-rw-r--r--source/blender/blenloader/intern/readblenentry.c3
-rw-r--r--source/blender/blenloader/intern/readfile.c6355
-rw-r--r--source/blender/blenloader/intern/readfile.h18
-rw-r--r--source/blender/blenloader/intern/versioning_250.c2690
-rw-r--r--source/blender/blenloader/intern/versioning_legacy.c3656
-rw-r--r--source/blender/blenloader/intern/writefile.c71
-rw-r--r--source/blender/blenpluginapi/documentation.h13
-rw-r--r--source/blender/blenpluginapi/externdef.h7
-rw-r--r--source/blender/blenpluginapi/floatpatch.h9
-rw-r--r--source/blender/blenpluginapi/iff.h17
-rw-r--r--source/blender/blenpluginapi/intern/pluginapi.c62
-rw-r--r--source/blender/blenpluginapi/plugin.h7
-rw-r--r--source/blender/blenpluginapi/util.h7
-rw-r--r--source/blender/bmesh/CMakeLists.txt2
-rw-r--r--source/blender/bmesh/bmesh.h35
-rw-r--r--source/blender/bmesh/intern/bmesh_construct.c52
-rw-r--r--source/blender/bmesh/intern/bmesh_core.c117
-rw-r--r--source/blender/bmesh/intern/bmesh_error.h1
-rw-r--r--source/blender/bmesh/intern/bmesh_interp.c81
-rw-r--r--source/blender/bmesh/intern/bmesh_interp.h2
-rw-r--r--source/blender/bmesh/intern/bmesh_iterators.c44
-rw-r--r--source/blender/bmesh/intern/bmesh_iterators.h2
-rw-r--r--source/blender/bmesh/intern/bmesh_marking.c92
-rw-r--r--source/blender/bmesh/intern/bmesh_marking.h27
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh.c43
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh_conv.c4
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh_validate.c6
-rw-r--r--source/blender/bmesh/intern/bmesh_mods.c4
-rw-r--r--source/blender/bmesh/intern/bmesh_opdefines.c52
-rw-r--r--source/blender/bmesh/intern/bmesh_operators.c6
-rw-r--r--source/blender/bmesh/intern/bmesh_operators.h2
-rw-r--r--source/blender/bmesh/intern/bmesh_operators_private.h2
-rw-r--r--source/blender/bmesh/intern/bmesh_private.h15
-rw-r--r--source/blender/bmesh/intern/bmesh_queries.c24
-rw-r--r--source/blender/bmesh/intern/bmesh_queries.h1
-rw-r--r--source/blender/bmesh/intern/bmesh_walkers.c3
-rw-r--r--source/blender/bmesh/intern/bmesh_walkers_impl.c4
-rw-r--r--source/blender/bmesh/operators/bmo_bevel.c30
-rw-r--r--source/blender/bmesh/operators/bmo_connect.c12
-rw-r--r--source/blender/bmesh/operators/bmo_create.c14
-rw-r--r--source/blender/bmesh/operators/bmo_dissolve.c93
-rw-r--r--source/blender/bmesh/operators/bmo_dupe.c8
-rw-r--r--source/blender/bmesh/operators/bmo_extrude.c8
-rw-r--r--source/blender/bmesh/operators/bmo_hull.c758
-rw-r--r--source/blender/bmesh/operators/bmo_inset.c48
-rw-r--r--source/blender/bmesh/operators/bmo_join_triangles.c2
-rw-r--r--source/blender/bmesh/operators/bmo_mirror.c2
-rw-r--r--source/blender/bmesh/operators/bmo_primitive.c351
-rw-r--r--source/blender/bmesh/operators/bmo_removedoubles.c12
-rw-r--r--source/blender/bmesh/operators/bmo_subdivide.c53
-rw-r--r--source/blender/bmesh/operators/bmo_subdivide.h1
-rw-r--r--source/blender/bmesh/operators/bmo_triangulate.c26
-rw-r--r--source/blender/bmesh/operators/bmo_utils.c10
-rw-r--r--source/blender/bmesh/operators/bmo_wireframe.c404
-rw-r--r--source/blender/bmesh/tools/BME_bevel.c66
-rw-r--r--source/blender/collada/AnimationExporter.cpp184
-rw-r--r--source/blender/collada/AnimationExporter.h10
-rw-r--r--source/blender/collada/AnimationImporter.cpp175
-rw-r--r--source/blender/collada/AnimationImporter.h41
-rw-r--r--source/blender/collada/ArmatureExporter.cpp52
-rw-r--r--source/blender/collada/ArmatureImporter.cpp45
-rw-r--r--source/blender/collada/ArmatureImporter.h2
-rw-r--r--source/blender/collada/CameraExporter.cpp41
-rw-r--r--source/blender/collada/DocumentExporter.cpp2
-rw-r--r--source/blender/collada/DocumentImporter.cpp126
-rw-r--r--source/blender/collada/DocumentImporter.h2
-rw-r--r--source/blender/collada/EffectExporter.cpp37
-rw-r--r--source/blender/collada/ErrorHandler.cpp22
-rw-r--r--source/blender/collada/ErrorHandler.h2
-rw-r--r--source/blender/collada/ExportSettings.h1
-rw-r--r--source/blender/collada/ExtraHandler.h2
-rw-r--r--source/blender/collada/ExtraTags.h2
-rw-r--r--source/blender/collada/GeometryExporter.cpp54
-rw-r--r--source/blender/collada/GeometryExporter.h12
-rw-r--r--source/blender/collada/ImageExporter.cpp5
-rw-r--r--source/blender/collada/InstanceWriter.cpp2
-rw-r--r--source/blender/collada/LightExporter.cpp21
-rw-r--r--source/blender/collada/MaterialExporter.cpp5
-rw-r--r--source/blender/collada/MaterialExporter.h2
-rw-r--r--source/blender/collada/MeshImporter.cpp62
-rw-r--r--source/blender/collada/MeshImporter.h2
-rw-r--r--source/blender/collada/SceneExporter.cpp11
-rw-r--r--source/blender/collada/SkinInfo.cpp15
-rw-r--r--source/blender/collada/SkinInfo.h2
-rw-r--r--source/blender/collada/TransformReader.cpp2
-rw-r--r--source/blender/collada/TransformWriter.cpp15
-rw-r--r--source/blender/collada/collada.cpp9
-rw-r--r--source/blender/collada/collada.h2
-rw-r--r--source/blender/collada/collada_internal.cpp39
-rw-r--r--source/blender/collada/collada_utils.cpp21
-rw-r--r--source/blender/collada/collada_utils.h2
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c1368
-rw-r--r--source/blender/editors/animation/anim_channels_edit.c648
-rw-r--r--source/blender/editors/animation/anim_deps.c48
-rw-r--r--source/blender/editors/animation/anim_draw.c146
-rw-r--r--source/blender/editors/animation/anim_filter.c1005
-rw-r--r--source/blender/editors/animation/anim_intern.h4
-rw-r--r--source/blender/editors/animation/anim_ipo_utils.c50
-rw-r--r--source/blender/editors/animation/anim_markers.c430
-rw-r--r--source/blender/editors/animation/anim_ops.c52
-rw-r--r--source/blender/editors/animation/drivers.c226
-rw-r--r--source/blender/editors/animation/fmodifier_ui.c356
-rw-r--r--source/blender/editors/animation/keyframes_draw.c306
-rw-r--r--source/blender/editors/animation/keyframes_edit.c204
-rw-r--r--source/blender/editors/animation/keyframes_general.c262
-rw-r--r--source/blender/editors/animation/keyframing.c540
-rw-r--r--source/blender/editors/animation/keyingsets.c263
-rw-r--r--source/blender/editors/armature/BIF_generate.h4
-rw-r--r--source/blender/editors/armature/BIF_retarget.h45
-rw-r--r--source/blender/editors/armature/armature_intern.h12
-rw-r--r--source/blender/editors/armature/armature_ops.c120
-rw-r--r--source/blender/editors/armature/editarmature.c2208
-rw-r--r--source/blender/editors/armature/editarmature_generate.c50
-rw-r--r--source/blender/editors/armature/editarmature_retarget.c1005
-rw-r--r--source/blender/editors/armature/editarmature_sketch.c1019
-rw-r--r--source/blender/editors/armature/meshlaplacian.c963
-rw-r--r--source/blender/editors/armature/meshlaplacian.h6
-rw-r--r--source/blender/editors/armature/poseSlide.c338
-rw-r--r--source/blender/editors/armature/poseUtils.c56
-rw-r--r--source/blender/editors/armature/poselib.c546
-rw-r--r--source/blender/editors/armature/poseobject.c813
-rw-r--r--source/blender/editors/armature/reeb.c1240
-rw-r--r--source/blender/editors/armature/reeb.h38
-rw-r--r--source/blender/editors/curve/curve_ops.c8
-rw-r--r--source/blender/editors/curve/editcurve.c4402
-rw-r--r--source/blender/editors/curve/editfont.c935
-rw-r--r--source/blender/editors/datafiles/Bfont.c5
-rw-r--r--source/blender/editors/datafiles/splash.png.c13071
-rw-r--r--source/blender/editors/datafiles/startup.blend.c16350
-rw-r--r--source/blender/editors/gpencil/drawgpencil.c312
-rw-r--r--source/blender/editors/gpencil/editaction_gpencil.c170
-rw-r--r--source/blender/editors/gpencil/gpencil_buttons.c56
-rw-r--r--source/blender/editors/gpencil/gpencil_edit.c222
-rw-r--r--source/blender/editors/gpencil/gpencil_intern.h34
-rw-r--r--source/blender/editors/gpencil/gpencil_ops.c30
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c717
-rw-r--r--source/blender/editors/gpencil/gpencil_undo.c50
-rw-r--r--source/blender/editors/include/BIF_glutil.h23
-rw-r--r--source/blender/editors/include/ED_anim_api.h2
-rw-r--r--source/blender/editors/include/ED_clip.h16
-rw-r--r--source/blender/editors/include/ED_curve.h2
-rw-r--r--source/blender/editors/include/ED_fluidsim.h3
-rw-r--r--source/blender/editors/include/ED_keyframing.h6
-rw-r--r--source/blender/editors/include/ED_mesh.h14
-rw-r--r--source/blender/editors/include/ED_particle.h3
-rw-r--r--source/blender/editors/include/ED_physics.h3
-rw-r--r--source/blender/editors/include/ED_render.h2
-rw-r--r--source/blender/editors/include/ED_screen.h1
-rw-r--r--source/blender/editors/include/ED_sculpt.h2
-rw-r--r--source/blender/editors/include/ED_uvedit.h31
-rw-r--r--source/blender/editors/include/ED_view3d.h4
-rw-r--r--source/blender/editors/include/UI_interface.h18
-rw-r--r--source/blender/editors/include/UI_resources.h1
-rw-r--r--source/blender/editors/interface/interface.c49
-rw-r--r--source/blender/editors/interface/interface_draw.c19
-rw-r--r--source/blender/editors/interface/interface_handlers.c11
-rw-r--r--source/blender/editors/interface/interface_intern.h96
-rw-r--r--source/blender/editors/interface/interface_layout.c10
-rw-r--r--source/blender/editors/interface/interface_ops.c6
-rw-r--r--source/blender/editors/interface/interface_templates.c20
-rw-r--r--source/blender/editors/interface/interface_utils.c3
-rw-r--r--source/blender/editors/interface/interface_widgets.c15
-rw-r--r--source/blender/editors/interface/resources.c19
-rw-r--r--source/blender/editors/mesh/editface.c30
-rw-r--r--source/blender/editors/mesh/editmesh_add.c2
-rw-r--r--source/blender/editors/mesh/editmesh_bvh.c18
-rw-r--r--source/blender/editors/mesh/editmesh_bvh.h5
-rw-r--r--source/blender/editors/mesh/editmesh_knife.c30
-rw-r--r--source/blender/editors/mesh/editmesh_loopcut.c10
-rw-r--r--source/blender/editors/mesh/editmesh_rip.c21
-rw-r--r--source/blender/editors/mesh/editmesh_select.c36
-rw-r--r--source/blender/editors/mesh/editmesh_slide.c27
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c1053
-rw-r--r--source/blender/editors/mesh/editmesh_utils.c83
-rw-r--r--source/blender/editors/mesh/mesh_data.c86
-rw-r--r--source/blender/editors/mesh/mesh_intern.h12
-rw-r--r--source/blender/editors/mesh/mesh_navmesh.c6
-rw-r--r--source/blender/editors/mesh/mesh_ops.c39
-rw-r--r--source/blender/editors/mesh/meshtools.c41
-rw-r--r--source/blender/editors/metaball/mball_edit.c234
-rw-r--r--source/blender/editors/metaball/mball_ops.c4
-rw-r--r--source/blender/editors/object/object_add.c731
-rw-r--r--source/blender/editors/object/object_bake.c830
-rw-r--r--source/blender/editors/object/object_constraint.c494
-rw-r--r--source/blender/editors/object/object_edit.c843
-rw-r--r--source/blender/editors/object/object_group.c104
-rw-r--r--source/blender/editors/object/object_hook.c331
-rw-r--r--source/blender/editors/object/object_intern.h3
-rw-r--r--source/blender/editors/object/object_lattice.c202
-rw-r--r--source/blender/editors/object/object_modifier.c436
-rw-r--r--source/blender/editors/object/object_ops.c49
-rw-r--r--source/blender/editors/object/object_relations.c878
-rw-r--r--source/blender/editors/object/object_select.c341
-rw-r--r--source/blender/editors/object/object_shapekey.c176
-rw-r--r--source/blender/editors/object/object_transform.c337
-rw-r--r--source/blender/editors/object/object_vgroup.c1202
-rw-r--r--source/blender/editors/physics/dynamicpaint_ops.c3
-rw-r--r--source/blender/editors/physics/particle_boids.c2
-rw-r--r--source/blender/editors/physics/particle_edit.c267
-rw-r--r--source/blender/editors/physics/particle_object.c36
-rw-r--r--source/blender/editors/physics/physics_fluid.c81
-rw-r--r--source/blender/editors/physics/physics_pointcache.c1
-rw-r--r--source/blender/editors/render/render_internal.c2
-rw-r--r--source/blender/editors/render/render_opengl.c33
-rw-r--r--source/blender/editors/render/render_preview.c13
-rw-r--r--source/blender/editors/render/render_shading.c25
-rw-r--r--source/blender/editors/render/render_update.c43
-rw-r--r--source/blender/editors/screen/area.c960
-rw-r--r--source/blender/editors/screen/glutil.c513
-rw-r--r--source/blender/editors/screen/screen_context.c98
-rw-r--r--source/blender/editors/screen/screen_edit.c979
-rw-r--r--source/blender/editors/screen/screen_intern.h32
-rw-r--r--source/blender/editors/screen/screen_ops.c1105
-rw-r--r--source/blender/editors/screen/screendump.c151
-rw-r--r--source/blender/editors/sculpt_paint/paint_cursor.c42
-rw-r--r--source/blender/editors/sculpt_paint/paint_hide.c9
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c98
-rw-r--r--source/blender/editors/sculpt_paint/paint_intern.h5
-rw-r--r--source/blender/editors/sculpt_paint/paint_ops.c21
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c103
-rw-r--r--source/blender/editors/sculpt_paint/paint_undo.c4
-rw-r--r--source/blender/editors/sculpt_paint/paint_utils.c4
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c144
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c202
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_undo.c16
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_uv.c28
-rw-r--r--source/blender/editors/sound/sound_ops.c24
-rw-r--r--source/blender/editors/space_action/action_draw.c118
-rw-r--r--source/blender/editors/space_action/action_edit.c362
-rw-r--r--source/blender/editors/space_action/action_intern.h4
-rw-r--r--source/blender/editors/space_action/action_ops.c94
-rw-r--r--source/blender/editors/space_action/action_select.c346
-rw-r--r--source/blender/editors/space_action/space_action.c154
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c307
-rw-r--r--source/blender/editors/space_buttons/buttons_header.c34
-rw-r--r--source/blender/editors/space_buttons/buttons_intern.h22
-rw-r--r--source/blender/editors/space_buttons/buttons_ops.c44
-rw-r--r--source/blender/editors/space_buttons/buttons_texture.c134
-rw-r--r--source/blender/editors/space_buttons/space_buttons.c130
-rw-r--r--source/blender/editors/space_clip/CMakeLists.txt15
-rw-r--r--source/blender/editors/space_clip/SConscript2
-rw-r--r--source/blender/editors/space_clip/clip_buttons.c57
-rw-r--r--source/blender/editors/space_clip/clip_dopesheet_draw.c356
-rw-r--r--source/blender/editors/space_clip/clip_dopesheet_ops.c139
-rw-r--r--source/blender/editors/space_clip/clip_draw.c189
-rw-r--r--source/blender/editors/space_clip/clip_editor.c255
-rw-r--r--source/blender/editors/space_clip/clip_graph_draw.c75
-rw-r--r--source/blender/editors/space_clip/clip_graph_ops.c48
-rw-r--r--source/blender/editors/space_clip/clip_intern.h26
-rw-r--r--source/blender/editors/space_clip/clip_ops.c118
-rw-r--r--source/blender/editors/space_clip/clip_toolbar.c10
-rw-r--r--source/blender/editors/space_clip/clip_utils.c77
-rw-r--r--source/blender/editors/space_clip/space_clip.c555
-rw-r--r--source/blender/editors/space_clip/tracking_ops.c461
-rw-r--r--source/blender/editors/space_file/file_draw.c22
-rw-r--r--source/blender/editors/space_file/file_intern.h2
-rw-r--r--source/blender/editors/space_file/file_ops.c13
-rw-r--r--source/blender/editors/space_file/file_panels.c2
-rw-r--r--source/blender/editors/space_file/filelist.c22
-rw-r--r--source/blender/editors/space_file/filesel.c3
-rw-r--r--source/blender/editors/space_file/fsmenu.c33
-rw-r--r--source/blender/editors/space_file/space_file.c20
-rw-r--r--source/blender/editors/space_graph/graph_buttons.c552
-rw-r--r--source/blender/editors/space_graph/graph_draw.c418
-rw-r--r--source/blender/editors/space_graph/graph_edit.c604
-rw-r--r--source/blender/editors/space_graph/graph_intern.h7
-rw-r--r--source/blender/editors/space_graph/graph_ops.c165
-rw-r--r--source/blender/editors/space_graph/graph_select.c354
-rw-r--r--source/blender/editors/space_graph/graph_utils.c48
-rw-r--r--source/blender/editors/space_graph/space_graph.c259
-rw-r--r--source/blender/editors/space_image/image_buttons.c4
-rw-r--r--source/blender/editors/space_image/image_draw.c63
-rw-r--r--source/blender/editors/space_image/image_ops.c41
-rw-r--r--source/blender/editors/space_image/space_image.c8
-rw-r--r--source/blender/editors/space_info/info_ops.c15
-rw-r--r--source/blender/editors/space_info/info_stats.c36
-rw-r--r--source/blender/editors/space_logic/logic_buttons.c6
-rw-r--r--source/blender/editors/space_logic/logic_ops.c2
-rw-r--r--source/blender/editors/space_logic/logic_window.c264
-rw-r--r--source/blender/editors/space_logic/space_logic.c6
-rw-r--r--source/blender/editors/space_nla/nla_buttons.c230
-rw-r--r--source/blender/editors/space_nla/nla_channels.c140
-rw-r--r--source/blender/editors/space_nla/nla_draw.c418
-rw-r--r--source/blender/editors/space_nla/nla_edit.c596
-rw-r--r--source/blender/editors/space_nla/nla_intern.h4
-rw-r--r--source/blender/editors/space_nla/nla_ops.c107
-rw-r--r--source/blender/editors/space_nla/nla_select.c158
-rw-r--r--source/blender/editors/space_nla/space_nla.c201
-rw-r--r--source/blender/editors/space_node/drawnode.c318
-rw-r--r--source/blender/editors/space_node/node_buttons.c6
-rw-r--r--source/blender/editors/space_node/node_draw.c58
-rw-r--r--source/blender/editors/space_node/node_edit.c189
-rw-r--r--source/blender/editors/space_node/node_header.c2
-rw-r--r--source/blender/editors/space_node/node_intern.h1
-rw-r--r--source/blender/editors/space_node/node_ops.c23
-rw-r--r--source/blender/editors/space_node/node_select.c2
-rw-r--r--source/blender/editors/space_node/node_templates.c15
-rw-r--r--source/blender/editors/space_node/space_node.c6
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.c924
-rw-r--r--source/blender/editors/space_outliner/outliner_edit.c578
-rw-r--r--source/blender/editors/space_outliner/outliner_intern.h116
-rw-r--r--source/blender/editors/space_outliner/outliner_ops.c6
-rw-r--r--source/blender/editors/space_outliner/outliner_select.c381
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.c484
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.c1052
-rw-r--r--source/blender/editors/space_outliner/space_outliner.c138
-rw-r--r--source/blender/editors/space_script/script_edit.c4
-rw-r--r--source/blender/editors/space_script/script_ops.c2
-rw-r--r--source/blender/editors/space_script/space_script.c60
-rw-r--r--source/blender/editors/space_sequencer/sequencer_add.c13
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c14
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c37
-rw-r--r--source/blender/editors/space_sequencer/sequencer_intern.h10
-rw-r--r--source/blender/editors/space_sequencer/sequencer_scopes.c22
-rw-r--r--source/blender/editors/space_sequencer/sequencer_select.c37
-rw-r--r--source/blender/editors/space_sequencer/space_sequencer.c3
-rw-r--r--source/blender/editors/space_text/space_text.c11
-rw-r--r--source/blender/editors/space_text/text_draw.c3
-rw-r--r--source/blender/editors/space_text/text_intern.h3
-rw-r--r--source/blender/editors/space_text/text_ops.c86
-rw-r--r--source/blender/editors/space_text/text_python.c13
-rw-r--r--source/blender/editors/space_time/space_time.c268
-rw-r--r--source/blender/editors/space_time/time_ops.c54
-rw-r--r--source/blender/editors/space_userpref/space_userpref.c2
-rw-r--r--source/blender/editors/space_view3d/drawanimviz.c59
-rw-r--r--source/blender/editors/space_view3d/drawarmature.c38
-rw-r--r--source/blender/editors/space_view3d/drawmesh.c84
-rw-r--r--source/blender/editors/space_view3d/drawobject.c221
-rw-r--r--source/blender/editors/space_view3d/drawvolume.c1
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c6
-rw-r--r--source/blender/editors/space_view3d/view3d_buttons.c18
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c72
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c188
-rw-r--r--source/blender/editors/space_view3d/view3d_fly.c18
-rw-r--r--source/blender/editors/space_view3d/view3d_header.c13
-rw-r--r--source/blender/editors/space_view3d/view3d_intern.h35
-rw-r--r--source/blender/editors/space_view3d/view3d_ops.c7
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c219
-rw-r--r--source/blender/editors/space_view3d/view3d_snap.c31
-rw-r--r--source/blender/editors/space_view3d/view3d_view.c40
-rw-r--r--source/blender/editors/transform/transform.c502
-rw-r--r--source/blender/editors/transform/transform.h2
-rw-r--r--source/blender/editors/transform/transform_constraints.c13
-rw-r--r--source/blender/editors/transform/transform_conversions.c397
-rw-r--r--source/blender/editors/transform/transform_generics.c158
-rw-r--r--source/blender/editors/transform/transform_input.c30
-rw-r--r--source/blender/editors/transform/transform_manipulator.c32
-rw-r--r--source/blender/editors/transform/transform_ops.c58
-rw-r--r--source/blender/editors/transform/transform_orientations.c26
-rw-r--r--source/blender/editors/transform/transform_snap.c278
-rw-r--r--source/blender/editors/util/crazyspace.c69
-rw-r--r--source/blender/editors/util/numinput.c3
-rw-r--r--source/blender/editors/util/undo.c15
-rw-r--r--source/blender/editors/uvedit/uvedit_buttons.c6
-rw-r--r--source/blender/editors/uvedit/uvedit_draw.c60
-rw-r--r--source/blender/editors/uvedit/uvedit_intern.h18
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c661
-rw-r--r--source/blender/editors/uvedit/uvedit_parametrizer.c28
-rw-r--r--source/blender/editors/uvedit/uvedit_parametrizer.h26
-rw-r--r--source/blender/editors/uvedit/uvedit_smart_stitch.c37
-rw-r--r--source/blender/editors/uvedit/uvedit_unwrap_ops.c63
-rw-r--r--source/blender/gpu/CMakeLists.txt9
-rw-r--r--source/blender/gpu/GPU_extensions.h11
-rw-r--r--source/blender/gpu/GPU_material.h1
-rw-r--r--source/blender/gpu/SConscript1
-rw-r--r--source/blender/gpu/intern/gpu_buffers.c46
-rw-r--r--source/blender/gpu/intern/gpu_codegen.c10
-rw-r--r--source/blender/gpu/intern/gpu_draw.c18
-rw-r--r--source/blender/gpu/intern/gpu_extensions.c148
-rw-r--r--source/blender/gpu/intern/gpu_material.c304
-rw-r--r--source/blender/gpu/intern/gpu_shader_material.glsl.c1550
-rw-r--r--source/blender/gpu/intern/gpu_shader_vertex.glsl.c17
-rw-r--r--source/blender/gpu/shaders/gpu_shader_material.glsl (renamed from source/blender/gpu/intern/gpu_shader_material.glsl)59
-rw-r--r--source/blender/gpu/shaders/gpu_shader_material.glsl.c1595
-rw-r--r--source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_frag.glsl16
-rw-r--r--source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_frag.glsl.c33
-rw-r--r--source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_vert.glsl6
-rw-r--r--source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_vert.glsl.c9
-rw-r--r--source/blender/gpu/shaders/gpu_shader_vertex.glsl (renamed from source/blender/gpu/intern/gpu_shader_vertex.glsl)0
-rw-r--r--source/blender/gpu/shaders/gpu_shader_vertex.glsl.c14
-rw-r--r--source/blender/gpu/shaders/gpu_shader_vsm_store_frag.glsl21
-rw-r--r--source/blender/gpu/shaders/gpu_shader_vsm_store_frag.glsl.c22
-rw-r--r--source/blender/gpu/shaders/gpu_shader_vsm_store_vert.glsl7
-rw-r--r--source/blender/gpu/shaders/gpu_shader_vsm_store_vert.glsl.c10
-rw-r--r--source/blender/ikplugin/intern/iksolver_plugin.c12
-rw-r--r--source/blender/ikplugin/intern/itasc_plugin.cpp98
-rw-r--r--source/blender/imbuf/IMB_imbuf_types.h30
-rw-r--r--source/blender/imbuf/intern/IMB_allocimbuf.h3
-rw-r--r--source/blender/imbuf/intern/IMB_anim.h3
-rw-r--r--source/blender/imbuf/intern/IMB_filter.h4
-rw-r--r--source/blender/imbuf/intern/anim_movie.c45
-rw-r--r--source/blender/imbuf/intern/bmp.c60
-rw-r--r--source/blender/imbuf/intern/cineon/cineonfile.h7
-rw-r--r--source/blender/imbuf/intern/cineon/cineonlib.c7
-rw-r--r--source/blender/imbuf/intern/cineon/cineonlib.h7
-rw-r--r--source/blender/imbuf/intern/cineon/dpxfile.h7
-rw-r--r--source/blender/imbuf/intern/cineon/dpxlib.c7
-rw-r--r--source/blender/imbuf/intern/cineon/dpxlib.h7
-rw-r--r--source/blender/imbuf/intern/cineon/logImageCore.c7
-rw-r--r--source/blender/imbuf/intern/cineon/logImageCore.h7
-rw-r--r--source/blender/imbuf/intern/cineon/logImageLib.c7
-rw-r--r--source/blender/imbuf/intern/cineon/logImageLib.h7
-rw-r--r--source/blender/imbuf/intern/cineon/logmemfile.c8
-rw-r--r--source/blender/imbuf/intern/cineon/logmemfile.h7
-rw-r--r--source/blender/imbuf/intern/dds/ColorBlock.cpp24
-rw-r--r--source/blender/imbuf/intern/dds/ColorBlock.h6
-rw-r--r--source/blender/imbuf/intern/dds/DirectDrawSurface.cpp8
-rw-r--r--source/blender/imbuf/intern/dds/DirectDrawSurface.h18
-rw-r--r--source/blender/imbuf/intern/dds/PixelFormat.h16
-rw-r--r--source/blender/imbuf/intern/filter.c49
-rw-r--r--source/blender/imbuf/intern/imageprocess.c28
-rw-r--r--source/blender/imbuf/intern/imbuf.h8
-rw-r--r--source/blender/imbuf/intern/imbuf_cocoa.m7
-rw-r--r--source/blender/imbuf/intern/indexer.c70
-rw-r--r--source/blender/imbuf/intern/indexer_dv.c4
-rw-r--r--source/blender/imbuf/intern/iris.c64
-rw-r--r--source/blender/imbuf/intern/jp2.c26
-rw-r--r--source/blender/imbuf/intern/jpeg.c10
-rw-r--r--source/blender/imbuf/intern/moviecache.c8
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.cpp49
-rw-r--r--source/blender/imbuf/intern/png.c12
-rw-r--r--source/blender/imbuf/intern/radiance_hdr.c7
-rw-r--r--source/blender/imbuf/intern/readimage.c2
-rw-r--r--source/blender/imbuf/intern/rectop.c302
-rw-r--r--source/blender/imbuf/intern/scaling.c188
-rw-r--r--source/blender/imbuf/intern/targa.c68
-rw-r--r--source/blender/imbuf/intern/thumbs.c20
-rw-r--r--source/blender/imbuf/intern/tiff.c34
-rw-r--r--source/blender/imbuf/intern/util.c18
-rw-r--r--source/blender/makesdna/DNA_ID.h6
-rw-r--r--source/blender/makesdna/DNA_action_types.h6
-rw-r--r--source/blender/makesdna/DNA_boid_types.h3
-rw-r--r--source/blender/makesdna/DNA_brush_types.h3
-rw-r--r--source/blender/makesdna/DNA_camera_types.h5
-rw-r--r--source/blender/makesdna/DNA_curve_types.h4
-rw-r--r--source/blender/makesdna/DNA_group_types.h7
-rw-r--r--source/blender/makesdna/DNA_image_types.h5
-rw-r--r--source/blender/makesdna/DNA_lamp_types.h10
-rw-r--r--source/blender/makesdna/DNA_listBase.h2
-rw-r--r--source/blender/makesdna/DNA_meshdata_types.h2
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h2
-rw-r--r--source/blender/makesdna/DNA_node_types.h13
-rw-r--r--source/blender/makesdna/DNA_object_fluidsim.h14
-rw-r--r--source/blender/makesdna/DNA_object_force.h4
-rw-r--r--source/blender/makesdna/DNA_object_types.h11
-rw-r--r--source/blender/makesdna/DNA_particle_types.h2
-rw-r--r--source/blender/makesdna/DNA_property_types.h3
-rw-r--r--source/blender/makesdna/DNA_scene_types.h22
-rw-r--r--source/blender/makesdna/DNA_sequence_types.h2
-rw-r--r--source/blender/makesdna/DNA_smoke_types.h14
-rw-r--r--source/blender/makesdna/DNA_space_types.h21
-rw-r--r--source/blender/makesdna/DNA_tracking_types.h35
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h6
-rw-r--r--source/blender/makesdna/intern/dna_genfile.c22
-rw-r--r--source/blender/makesdna/intern/makesdna.c19
-rw-r--r--source/blender/makesrna/RNA_access.h1
-rw-r--r--source/blender/makesrna/RNA_enum_types.h2
-rw-r--r--source/blender/makesrna/RNA_types.h54
-rw-r--r--source/blender/makesrna/intern/makesrna.c8
-rw-r--r--source/blender/makesrna/intern/rna_ID.c2
-rw-r--r--source/blender/makesrna/intern/rna_access.c21
-rw-r--r--source/blender/makesrna/intern/rna_action.c8
-rw-r--r--source/blender/makesrna/intern/rna_actuator.c18
-rw-r--r--source/blender/makesrna/intern/rna_animation.c6
-rw-r--r--source/blender/makesrna/intern/rna_animviz.c14
-rw-r--r--source/blender/makesrna/intern/rna_armature.c26
-rw-r--r--source/blender/makesrna/intern/rna_boid.c2
-rw-r--r--source/blender/makesrna/intern/rna_brush.c17
-rw-r--r--source/blender/makesrna/intern/rna_camera.c11
-rw-r--r--source/blender/makesrna/intern/rna_camera_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_constraint.c8
-rw-r--r--source/blender/makesrna/intern/rna_curve.c74
-rw-r--r--source/blender/makesrna/intern/rna_fcurve.c6
-rw-r--r--source/blender/makesrna/intern/rna_fluidsim.c2
-rw-r--r--source/blender/makesrna/intern/rna_image.c20
-rw-r--r--source/blender/makesrna/intern/rna_image_api.c3
-rw-r--r--source/blender/makesrna/intern/rna_lamp.c250
-rw-r--r--source/blender/makesrna/intern/rna_lattice.c10
-rw-r--r--source/blender/makesrna/intern/rna_main.c5
-rw-r--r--source/blender/makesrna/intern/rna_main_api.c92
-rw-r--r--source/blender/makesrna/intern/rna_material.c6
-rw-r--r--source/blender/makesrna/intern/rna_material_api.c3
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c24
-rw-r--r--source/blender/makesrna/intern/rna_mesh_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_meta.c4
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c5
-rw-r--r--source/blender/makesrna/intern/rna_movieclip.c6
-rw-r--r--source/blender/makesrna/intern/rna_nla.c2
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c141
-rw-r--r--source/blender/makesrna/intern/rna_nodetree_types.h3
-rw-r--r--source/blender/makesrna/intern/rna_object.c44
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c51
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c4
-rw-r--r--source/blender/makesrna/intern/rna_particle.c2
-rw-r--r--source/blender/makesrna/intern/rna_pose.c42
-rw-r--r--source/blender/makesrna/intern/rna_pose_api.c1
-rw-r--r--source/blender/makesrna/intern/rna_property.c6
-rw-r--r--source/blender/makesrna/intern/rna_scene.c72
-rw-r--r--source/blender/makesrna/intern/rna_scene_api.c19
-rw-r--r--source/blender/makesrna/intern/rna_screen.c25
-rw-r--r--source/blender/makesrna/intern/rna_sensor.c2
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c33
-rw-r--r--source/blender/makesrna/intern/rna_smoke.c14
-rw-r--r--source/blender/makesrna/intern/rna_space.c35
-rw-r--r--source/blender/makesrna/intern/rna_test.c4
-rw-r--r--source/blender/makesrna/intern/rna_text_api.c4
-rw-r--r--source/blender/makesrna/intern/rna_texture.c22
-rw-r--r--source/blender/makesrna/intern/rna_texture_api.c6
-rw-r--r--source/blender/makesrna/intern/rna_tracking.c8
-rw-r--r--source/blender/makesrna/intern/rna_ui.c2
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c41
-rw-r--r--source/blender/makesrna/intern/rna_wm.c12
-rwxr-xr-xsource/blender/makesrna/rna_cleanup/rna_cleaner.py2
-rwxr-xr-xsource/blender/makesrna/rna_cleanup/rna_cleaner_merge.py2
-rw-r--r--source/blender/modifiers/intern/MOD_armature.c68
-rw-r--r--source/blender/modifiers/intern/MOD_array.c107
-rw-r--r--source/blender/modifiers/intern/MOD_bevel.c74
-rw-r--r--source/blender/modifiers/intern/MOD_boolean.c86
-rw-r--r--source/blender/modifiers/intern/MOD_boolean_util.c170
-rw-r--r--source/blender/modifiers/intern/MOD_boolean_util.h3
-rw-r--r--source/blender/modifiers/intern/MOD_build.c72
-rw-r--r--source/blender/modifiers/intern/MOD_cast.c89
-rw-r--r--source/blender/modifiers/intern/MOD_cloth.c38
-rw-r--r--source/blender/modifiers/intern/MOD_collision.c56
-rw-r--r--source/blender/modifiers/intern/MOD_curve.c48
-rw-r--r--source/blender/modifiers/intern/MOD_decimate.c76
-rw-r--r--source/blender/modifiers/intern/MOD_displace.c62
-rw-r--r--source/blender/modifiers/intern/MOD_dynamicpaint.c57
-rw-r--r--source/blender/modifiers/intern/MOD_edgesplit.c36
-rw-r--r--source/blender/modifiers/intern/MOD_explode.c599
-rw-r--r--source/blender/modifiers/intern/MOD_fluidsim.c41
-rw-r--r--source/blender/modifiers/intern/MOD_fluidsim_util.c140
-rw-r--r--source/blender/modifiers/intern/MOD_hook.c68
-rw-r--r--source/blender/modifiers/intern/MOD_lattice.c44
-rw-r--r--source/blender/modifiers/intern/MOD_mask.c137
-rw-r--r--source/blender/modifiers/intern/MOD_meshdeform.c250
-rw-r--r--source/blender/modifiers/intern/MOD_mirror.c55
-rw-r--r--source/blender/modifiers/intern/MOD_multires.c40
-rw-r--r--source/blender/modifiers/intern/MOD_none.c4
-rw-r--r--source/blender/modifiers/intern/MOD_ocean.c138
-rw-r--r--source/blender/modifiers/intern/MOD_particleinstance.c228
-rw-r--r--source/blender/modifiers/intern/MOD_particlesystem.c80
-rw-r--r--source/blender/modifiers/intern/MOD_remesh.c73
-rw-r--r--source/blender/modifiers/intern/MOD_screw.c468
-rw-r--r--source/blender/modifiers/intern/MOD_shapekey.c58
-rw-r--r--source/blender/modifiers/intern/MOD_shrinkwrap.c109
-rw-r--r--source/blender/modifiers/intern/MOD_simpledeform.c133
-rw-r--r--source/blender/modifiers/intern/MOD_smoke.c48
-rw-r--r--source/blender/modifiers/intern/MOD_smooth.c54
-rw-r--r--source/blender/modifiers/intern/MOD_softbody.c16
-rw-r--r--source/blender/modifiers/intern/MOD_solidify.c353
-rw-r--r--source/blender/modifiers/intern/MOD_subsurf.c44
-rw-r--r--source/blender/modifiers/intern/MOD_surface.c34
-rw-r--r--source/blender/modifiers/intern/MOD_util.c67
-rw-r--r--source/blender/modifiers/intern/MOD_uvproject.c132
-rw-r--r--source/blender/modifiers/intern/MOD_warp.c139
-rw-r--r--source/blender/modifiers/intern/MOD_wave.c152
-rw-r--r--source/blender/modifiers/intern/MOD_weightvg_util.c112
-rw-r--r--source/blender/modifiers/intern/MOD_weightvgedit.c39
-rw-r--r--source/blender/modifiers/intern/MOD_weightvgmix.c190
-rw-r--r--source/blender/modifiers/intern/MOD_weightvgproximity.c80
-rw-r--r--source/blender/nodes/CMakeLists.txt1
-rw-r--r--source/blender/nodes/NOD_shader.h1
-rw-r--r--source/blender/nodes/composite/node_composite_tree.c2
-rw-r--r--source/blender/nodes/composite/node_composite_util.c29
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_bilateralblur.c2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_blur.c47
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_channelMatte.c28
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_chromaMatte.c70
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_colorMatte.c14
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_colorSpill.c24
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_colorbalance.c8
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_defocus.c2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_diffMatte.c63
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_directionalblur.c2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_distanceMatte.c125
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_doubleEdgeMask.c30
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_filter.c12
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_gamma.c2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_glare.c2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_hueSatVal.c2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_image.c11
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_levels.c34
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_lummaMatte.c10
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_math.c3
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_movieclip.c62
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_moviedistortion.c56
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_outputFile.c14
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_rotate.c2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_sepcombHSVA.c18
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_sepcombYCCA.c24
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_sepcombYUVA.c2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_splitViewer.c2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_stabilize2d.c12
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_texture.c10
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_tonemap.c2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_transform.c38
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_viewer.c2
-rw-r--r--source/blender/nodes/intern/node_common.c11
-rw-r--r--source/blender/nodes/intern/node_socket.c14
-rw-r--r--source/blender/nodes/shader/node_shader_tree.c2
-rw-r--r--source/blender/nodes/shader/node_shader_util.c6
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_common.c6
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_dynamic.c6
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_light_falloff.c68
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_light_path.c1
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_math.c2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_coord.c3
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_texture.c16
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_valToRgb.c8
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_vectMath.c6
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_bricks.c15
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_common.c6
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_image.c2
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_math.c2
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_mixRgb.c2
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_output.c14
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_texture.c8
-rw-r--r--source/blender/python/BPY_extern.h1
-rw-r--r--source/blender/python/SConscript2
-rw-r--r--source/blender/python/bmesh/bmesh_py_types.h4
-rw-r--r--source/blender/python/bmesh/bmesh_py_types_customdata.c148
-rw-r--r--source/blender/python/bmesh/bmesh_py_types_meshdata.c93
-rw-r--r--source/blender/python/bmesh/bmesh_py_types_meshdata.h7
-rw-r--r--source/blender/python/generic/CMakeLists.txt2
-rw-r--r--source/blender/python/generic/bgl.c124
-rw-r--r--source/blender/python/generic/bgl.h18
-rw-r--r--source/blender/python/intern/bpy.c8
-rw-r--r--source/blender/python/intern/bpy_app_handlers.c2
-rw-r--r--source/blender/python/intern/bpy_interface.c9
-rw-r--r--source/blender/python/intern/bpy_props.c4
-rw-r--r--source/blender/python/intern/bpy_rna.c68
-rw-r--r--source/blender/python/intern/bpy_util.h1
-rw-r--r--source/blender/python/mathutils/mathutils.h11
-rw-r--r--source/blender/python/mathutils/mathutils_Color.c1
-rw-r--r--source/blender/python/mathutils/mathutils_Color.h1
-rw-r--r--source/blender/python/mathutils/mathutils_Euler.c1
-rw-r--r--source/blender/python/mathutils/mathutils_Euler.h10
-rw-r--r--source/blender/python/mathutils/mathutils_Matrix.c1
-rw-r--r--source/blender/python/mathutils/mathutils_Quaternion.h11
-rw-r--r--source/blender/python/mathutils/mathutils_Vector.h1
-rw-r--r--source/blender/python/mathutils/mathutils_geometry.c29
-rw-r--r--source/blender/python/mathutils/mathutils_geometry.h11
-rw-r--r--source/blender/quicktime/apple/quicktime_export.c57
-rw-r--r--source/blender/quicktime/apple/quicktime_import.c64
-rw-r--r--source/blender/render/extern/include/RE_pipeline.h2
-rw-r--r--source/blender/render/intern/include/gammaCorrectionTables.h10
-rw-r--r--source/blender/render/intern/include/initrender.h3
-rw-r--r--source/blender/render/intern/include/occlusion.h3
-rw-r--r--source/blender/render/intern/include/render_types.h4
-rw-r--r--source/blender/render/intern/include/rendercore.h10
-rw-r--r--source/blender/render/intern/include/shadbuf.h10
-rw-r--r--source/blender/render/intern/include/strand.h2
-rw-r--r--source/blender/render/intern/include/sunsky.h2
-rw-r--r--source/blender/render/intern/include/texture.h5
-rw-r--r--source/blender/render/intern/raytrace/bvh.h165
-rw-r--r--source/blender/render/intern/raytrace/rayobject.cpp80
-rw-r--r--source/blender/render/intern/raytrace/rayobject_blibvh.cpp7
-rw-r--r--source/blender/render/intern/raytrace/rayobject_hint.h2
-rw-r--r--source/blender/render/intern/raytrace/rayobject_instance.cpp18
-rw-r--r--source/blender/render/intern/raytrace/rayobject_internal.h31
-rw-r--r--source/blender/render/intern/raytrace/rayobject_octree.cpp176
-rw-r--r--source/blender/render/intern/raytrace/rayobject_qbvh.cpp21
-rw-r--r--source/blender/render/intern/raytrace/rayobject_rtbuild.cpp75
-rw-r--r--source/blender/render/intern/raytrace/rayobject_svbvh.cpp34
-rw-r--r--source/blender/render/intern/raytrace/rayobject_vbvh.cpp32
-rw-r--r--source/blender/render/intern/raytrace/reorganize.h202
-rw-r--r--source/blender/render/intern/raytrace/svbvh.h89
-rw-r--r--source/blender/render/intern/raytrace/vbvh.h37
-rw-r--r--source/blender/render/intern/source/convertblender.c245
-rw-r--r--source/blender/render/intern/source/envmap.c12
-rw-r--r--source/blender/render/intern/source/external_engine.c5
-rw-r--r--source/blender/render/intern/source/gammaCorrectionTables.c11
-rw-r--r--source/blender/render/intern/source/imagetexture.c13
-rw-r--r--source/blender/render/intern/source/initrender.c26
-rw-r--r--source/blender/render/intern/source/occlusion.c8
-rw-r--r--source/blender/render/intern/source/pipeline.c105
-rw-r--r--source/blender/render/intern/source/pixelblending.c9
-rw-r--r--source/blender/render/intern/source/pixelshading.c4
-rw-r--r--source/blender/render/intern/source/pointdensity.c6
-rw-r--r--source/blender/render/intern/source/rayshade.c148
-rw-r--r--source/blender/render/intern/source/render_result.c6
-rw-r--r--source/blender/render/intern/source/render_texture.c158
-rw-r--r--source/blender/render/intern/source/rendercore.c10
-rw-r--r--source/blender/render/intern/source/renderdatabase.c54
-rw-r--r--source/blender/render/intern/source/shadbuf.c38
-rw-r--r--source/blender/render/intern/source/shadeoutput.c21
-rw-r--r--source/blender/render/intern/source/sss.c4
-rw-r--r--source/blender/render/intern/source/strand.c66
-rw-r--r--source/blender/render/intern/source/sunsky.c26
-rw-r--r--source/blender/render/intern/source/volume_precache.c61
-rw-r--r--source/blender/render/intern/source/volumetric.c21
-rw-r--r--source/blender/render/intern/source/voxeldata.c35
-rw-r--r--source/blender/render/intern/source/zbuf.c84
-rw-r--r--source/blender/windowmanager/WM_api.h2
-rw-r--r--source/blender/windowmanager/intern/wm.c2
-rw-r--r--source/blender/windowmanager/intern/wm_draw.c2
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c24
-rw-r--r--source/blender/windowmanager/intern/wm_files.c10
-rw-r--r--source/blender/windowmanager/intern/wm_gesture.c12
-rw-r--r--source/blender/windowmanager/intern/wm_init_exit.c4
-rw-r--r--source/blender/windowmanager/intern/wm_jobs.c8
-rw-r--r--source/blender/windowmanager/intern/wm_keymap.c22
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c68
-rw-r--r--source/blender/windowmanager/intern/wm_subwindow.c2
-rw-r--r--source/blender/windowmanager/intern/wm_window.c2
-rw-r--r--source/blenderplayer/bad_level_call_stubs/stubs.c33
-rw-r--r--source/creator/CMakeLists.txt26
-rw-r--r--source/creator/creator.c11
-rw-r--r--source/gameengine/BlenderRoutines/CMakeLists.txt2
-rw-r--r--source/gameengine/BlenderRoutines/SConscript3
-rw-r--r--source/gameengine/Converter/BL_ActionActuator.cpp14
-rw-r--r--source/gameengine/Converter/BL_ArmatureObject.cpp14
-rw-r--r--source/gameengine/Converter/BL_ArmatureObject.h2
-rw-r--r--source/gameengine/Converter/BL_BlenderDataConversion.cpp8
-rw-r--r--source/gameengine/Converter/BL_ShapeDeformer.cpp6
-rw-r--r--source/gameengine/Converter/BL_SkinDeformer.cpp2
-rw-r--r--source/gameengine/Converter/CMakeLists.txt1
-rw-r--r--source/gameengine/Converter/KX_BlenderSceneConverter.cpp8
-rw-r--r--source/gameengine/Converter/KX_ConvertProperties.h8
-rw-r--r--source/gameengine/Converter/SConscript3
-rw-r--r--source/gameengine/Expressions/KX_HashedPtr.cpp6
-rw-r--r--source/gameengine/GameLogic/SCA_ActuatorSensor.h10
-rw-r--r--source/gameengine/GamePlayer/common/GPC_Canvas.cpp6
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_ghost.cpp4
-rw-r--r--source/gameengine/Ketsji/BL_Shader.h44
-rw-r--r--source/gameengine/Ketsji/CMakeLists.txt1
-rw-r--r--source/gameengine/Ketsji/KX_BlenderMaterial.h10
-rw-r--r--source/gameengine/Ketsji/KX_BulletPhysicsController.cpp4
-rw-r--r--source/gameengine/Ketsji/KX_FontObject.h8
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.cpp5
-rw-r--r--source/gameengine/Ketsji/KX_IPO_SGController.cpp5
-rw-r--r--source/gameengine/Ketsji/KX_KetsjiEngine.cpp22
-rw-r--r--source/gameengine/Ketsji/KX_Light.cpp17
-rw-r--r--source/gameengine/Ketsji/KX_Light.h1
-rw-r--r--source/gameengine/Ketsji/KX_PyMath.h2
-rw-r--r--source/gameengine/Ketsji/KX_PythonSeq.h2
-rw-r--r--source/gameengine/Ketsji/KX_VertexProxy.cpp2
-rw-r--r--source/gameengine/Ketsji/SConscript3
-rw-r--r--source/gameengine/Rasterizer/RAS_ICanvas.h10
-rw-r--r--source/gameengine/Rasterizer/RAS_IRasterizer.h2
-rw-r--r--source/gameengine/VideoTexture/ImageRender.cpp4
-rw-r--r--source/gameengine/VideoTexture/Texture.cpp19
1182 files changed, 94357 insertions, 84184 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ad3a293b937..fe9b535d373 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -228,6 +228,10 @@ if(UNIX AND NOT APPLE)
option(WITH_INSTALL_PORTABLE "Install redistributeable runtime, otherwise install into CMAKE_INSTALL_PREFIX" ON)
endif()
option(WITH_PYTHON_INSTALL "Copy system python into the blender install folder" ON)
+option(WITH_PYTHON_INSTALL_NUMPY "Copy system numpy into the blender install folder" ON)
+set(PYTHON_NUMPY_PATH "" CACHE PATH "Python to python site-packages or dist-packages containing 'numpy' module")
+mark_as_advanced(PYTHON_NUMPY_PATH)
+
option(WITH_MINGW64 "Use the 64-bit version of MinGW" OFF)
mark_as_advanced(WITH_MINGW64)
@@ -303,7 +307,7 @@ endif()
#-----------------------------------------------------------------------------
# Check for conflicting/unsupported configurations
-if(NOT WITH_BLENDER AND NOT WITH_PLAYER)
+if(NOT WITH_BLENDER AND NOT WITH_PLAYER AND NOT WITH_CYCLES_TEST)
message(FATAL_ERROR "At least one of WITH_BLENDER or WITH_PLAYER must be enabled, nothing to do!")
endif()
@@ -802,33 +806,35 @@ elseif(WIN32)
endif()
if(MSVC)
- if(CMAKE_CL_64)
- set(PLATFORM_LINKLIBS ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shfolder shell32 ole32 oleaut32 uuid)
- else()
- set(PLATFORM_LINKLIBS ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shfolder shell32 ole32 oleaut32 uuid)
- endif()
+ set(PLATFORM_LINKLIBS ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shfolder shell32 ole32 oleaut32 uuid)
add_definitions(/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_CONSOLE /D_LIB)
- set(CMAKE_CXX_FLAGS "/nologo /J /W1 /Gd /wd4018 /wd4244 /wd4305 /wd4800 /wd4065 /wd4267 /we4013" CACHE STRING "MSVC MT C++ flags " FORCE)
- set(CMAKE_C_FLAGS "/nologo /J /W1 /Gd /wd4018 /wd4244 /wd4305 /wd4800 /wd4065 /wd4267 /we4013 /EHsc" CACHE STRING "MSVC MT C++ flags " FORCE)
+ set(CMAKE_CXX_FLAGS "/nologo /J /Gd /EHsc" CACHE STRING "MSVC MT C++ flags " FORCE)
+ set(CMAKE_C_FLAGS "/nologo /J /Gd" CACHE STRING "MSVC MT C++ flags " FORCE)
if(CMAKE_CL_64)
- set(CMAKE_CXX_FLAGS_DEBUG "/Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
+ set(CMAKE_CXX_FLAGS_DEBUG "/Od /Gm /RTC1 /MTd /Zi" CACHE STRING "MSVC MT flags " FORCE)
else()
- set(CMAKE_CXX_FLAGS_DEBUG "/Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE)
+ set(CMAKE_CXX_FLAGS_DEBUG "/Od /Gm /RTC1 /MTd /ZI" CACHE STRING "MSVC MT flags " FORCE)
endif()
- set(CMAKE_CXX_FLAGS_RELEASE "/O2 /Ob2 /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
- set(CMAKE_CXX_FLAGS_MINSIZEREL "/O1 /Ob1 /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
- set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/O2 /Ob1 /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
+ set(CMAKE_CXX_FLAGS_RELEASE "/O2 /Ob2 /MT" CACHE STRING "MSVC MT flags " FORCE)
+ set(CMAKE_CXX_FLAGS_MINSIZEREL "/O1 /Ob1 /MT" CACHE STRING "MSVC MT flags " FORCE)
+ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/O2 /Ob1 /MT /Zi" CACHE STRING "MSVC MT flags " FORCE)
if(CMAKE_CL_64)
- set(CMAKE_C_FLAGS_DEBUG "/Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
+ set(CMAKE_C_FLAGS_DEBUG "/Od /Gm /RTC1 /MTd /Zi" CACHE STRING "MSVC MT flags " FORCE)
else()
- set(CMAKE_C_FLAGS_DEBUG "/Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE)
+ set(CMAKE_C_FLAGS_DEBUG "/Od /Gm /RTC1 /MTd /ZI" CACHE STRING "MSVC MT flags " FORCE)
endif()
- set(CMAKE_C_FLAGS_RELEASE "/O2 /Ob2 /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
- set(CMAKE_C_FLAGS_MINSIZEREL "/O1 /Ob1 /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
- set(CMAKE_C_FLAGS_RELWITHDEBINFO "/O2 /Ob1 /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
+ set(CMAKE_C_FLAGS_RELEASE "/O2 /Ob2 /MT" CACHE STRING "MSVC MT flags " FORCE)
+ set(CMAKE_C_FLAGS_MINSIZEREL "/O1 /Ob1 /MT" CACHE STRING "MSVC MT flags " FORCE)
+ set(CMAKE_C_FLAGS_RELWITHDEBINFO "/O2 /Ob1 /MT /Zi" CACHE STRING "MSVC MT flags " FORCE)
+
+ # most msvc warnings are C & C++
+ set(_WARNINGS "/W3 /wd4018 /wd4244 /wd4305 /wd4800 /wd4181 /wd4065 /wd4267 /we4013 /wd4200")
+ set(C_WARNINGS "${_WARNINGS}")
+ set(CXX_WARNINGS "${_WARNINGS}")
+ unset(_WARNINGS)
if(WITH_INTERNATIONAL)
set(GETTEXT ${LIBDIR}/gettext)
@@ -1001,6 +1007,9 @@ elseif(WIN32)
set(PLATFORM_LINKFLAGS_DEBUG "/NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libc.lib")
+ # used in many places so include globally, like OpenGL
+ blender_include_dirs("${PTHREADS_INCLUDE_DIRS}")
+
elseif(CMAKE_COMPILER_IS_GNUCC)
# keep GCC specific stuff here
set(PLATFORM_LINKLIBS "-lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid -lwsock32 -lpsapi")
@@ -1008,10 +1017,8 @@ elseif(WIN32)
if(WITH_MINGW64)
#Yes, the point for MinGW64 is moar optimization by default :)
- set(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -mmmx -msse -msse2")
- set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG")
- set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
- #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
+ set(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -mmmx -msse -msse2 -ftree-vectorize")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS} -lpthread")
add_definitions(-DFREE_WINDOWS64 -DMS_WIN64)
@@ -1156,9 +1163,6 @@ elseif(WIN32)
endif()
- # used in many places so include globally, like OpenGL
- blender_include_dirs("${PTHREADS_INCLUDE_DIRS}")
-
elseif(APPLE)
if(${CMAKE_OSX_DEPLOYMENT_TARGET} STREQUAL "10.5" OR ${CMAKE_OSX_DEPLOYMENT_TARGET} STRGREATER "10.5")
@@ -1612,6 +1616,50 @@ if(WITH_PYTHON)
"to a valid python include path. Containing "
"Python.h for python version \"${PYTHON_VERSION}\"")
endif()
+
+ if(WITH_PYTHON_INSTALL AND WITH_PYTHON_INSTALL_NUMPY)
+ # set but invalid
+ if(NOT ${PYTHON_NUMPY_PATH} STREQUAL "")
+ if(NOT EXISTS "${PYTHON_NUMPY_PATH}/numpy")
+ message(WARNING "PYTHON_NUMPY_PATH is invalid, numpy not found in '${PYTHON_NUMPY_PATH}' "
+ "WITH_PYTHON_INSTALL_NUMPY option will be ignored when installing python")
+ set(WITH_PYTHON_INSTALL_NUMPY OFF)
+ endif()
+ # not set, so initialize
+ else()
+ string(REPLACE "." ";" _PY_VER_SPLIT "${PYTHON_VERSION}")
+ list(GET _PY_VER_SPLIT 0 _PY_VER_MAJOR)
+
+ # re-cache
+ unset(PYTHON_NUMPY_PATH CACHE)
+ find_path(PYTHON_NUMPY_PATH
+ NAMES
+ numpy
+ HINTS
+ "${PYTHON_LIBPATH}/python${PYTHON_VERSION}/"
+ "${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/"
+ PATH_SUFFIXES
+ site-packages
+ dist-packages
+ NO_DEFAULT_PATH
+ )
+
+ if(NOT EXISTS "${PYTHON_NUMPY_PATH}")
+ message(WARNING "'numpy' path could not be found in:\n"
+ "'${PYTHON_LIBPATH}/python${PYTHON_VERSION}/site-packages/numpy', "
+ "'${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/site-packages/numpy', "
+ "'${PYTHON_LIBPATH}/python${PYTHON_VERSION}/dist-packages/numpy', "
+ "'${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/dist-packages/numpy', "
+ "WITH_PYTHON_INSTALL_NUMPY option will be ignored when installing python")
+ set(WITH_PYTHON_INSTALL_NUMPY OFF)
+ else()
+ message(STATUS "numpy found at '${PYTHON_NUMPY_PATH}'")
+ endif()
+
+ unset(_PY_VER_SPLIT)
+ unset(_PY_VER_MAJOR)
+ endif()
+ endif()
endif()
@@ -1668,7 +1716,7 @@ if(FIRST_RUN)
_setting)
set(_msg " * ${_setting}")
string(LENGTH "${_msg}" _len)
- while("28" GREATER "${_len}")
+ while("32" GREATER "${_len}")
set(_msg "${_msg} ")
math(EXPR _len "${_len} + 1")
endwhile()
@@ -1728,6 +1776,7 @@ if(FIRST_RUN)
info_cfg_text("Python:")
info_cfg_option(WITH_PYTHON_INSTALL)
+ info_cfg_option(WITH_PYTHON_INSTALL_NUMPY)
info_cfg_option(WITH_PYTHON_MODULE)
info_cfg_option(WITH_PYTHON_SAFETY)
diff --git a/GNUmakefile b/GNUmakefile
index b448f93310d..ebd2db60e0a 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -164,6 +164,7 @@ help:
@echo " * test_cmake - runs our own cmake file checker which detects errors in the cmake file list definitions"
@echo " * test_pep8 - checks all python script are pep8 which are tagged to use the stricter formatting"
@echo " * test_deprecated - checks for deprecation tags in our code which may need to be removed"
+ @echo " * test_style - checks C/C++ conforms with blenders style guide: http://wiki.blender.org/index.php/Dev:Doc/CodeStyle"
@echo ""
@echo "Static Source Code Checking (not assosiated with building blender)"
@echo " * check_cppcheck - run blender source through cppcheck (C & C++)"
@@ -201,28 +202,31 @@ test:
# run pep8 check check on scripts we distribute.
test_pep8:
- python3 source/tests/pep8.py > test_pep8.log 2>&1
+ python3.2 source/tests/pep8.py > test_pep8.log 2>&1
@echo "written: test_pep8.log"
# run some checks on our cmakefiles.
test_cmake:
- python3 build_files/cmake/cmake_consistency_check.py > test_cmake_consistency.log 2>&1
+ python3.2 build_files/cmake/cmake_consistency_check.py > test_cmake_consistency.log 2>&1
@echo "written: test_cmake_consistency.log"
# run deprecation tests, see if we have anything to remove.
test_deprecated:
- python3 source/tests/check_deprecated.py
+ python3.2 source/tests/check_deprecated.py
+test_style:
+ # run our own checks on C/C++ style
+ PYTHONIOENCODING=utf_8 python3.2 $(BLENDER_DIR)/source/tools/check_style_c.py $(BLENDER_DIR)/source/blender $(BLENDER_DIR)/source/creator
# -----------------------------------------------------------------------------
# Project Files
#
project_qtcreator:
- python3 build_files/cmake/cmake_qtcreator_project.py $(BUILD_DIR)
+ python3.2 build_files/cmake/cmake_qtcreator_project.py $(BUILD_DIR)
project_netbeans:
- python3 build_files/cmake/cmake_netbeans_project.py $(BUILD_DIR)
+ python3.2 build_files/cmake/cmake_netbeans_project.py $(BUILD_DIR)
project_eclipse:
cmake -G"Eclipse CDT4 - Unix Makefiles" -H$(BLENDER_DIR) -B$(BUILD_DIR)
@@ -234,22 +238,21 @@ project_eclipse:
check_cppcheck:
$(CMAKE_CONFIG)
- cd $(BUILD_DIR) ; python3 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_cppcheck.py
+ cd $(BUILD_DIR) ; python3.2 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_cppcheck.py
check_splint:
$(CMAKE_CONFIG)
- cd $(BUILD_DIR) ; python3 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_splint.py
+ cd $(BUILD_DIR) ; python3.2 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_splint.py
check_sparse:
$(CMAKE_CONFIG)
- cd $(BUILD_DIR) ; python3 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_sparse.py
+ cd $(BUILD_DIR) ; python3.2 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_sparse.py
check_spelling_py:
- cd $(BUILD_DIR) ; PYTHONIOENCODING=utf_8 python3 $(BLENDER_DIR)/source/tools/spell_check_source.py $(BLENDER_DIR)/release/scripts
+ cd $(BUILD_DIR) ; PYTHONIOENCODING=utf_8 python3.2 $(BLENDER_DIR)/source/tools/spell_check_source.py $(BLENDER_DIR)/release/scripts
check_spelling_c:
- cd $(BUILD_DIR) ; PYTHONIOENCODING=utf_8 python3 $(BLENDER_DIR)/source/tools/spell_check_source.py $(BLENDER_DIR)/source
-
+ cd $(BUILD_DIR) ; PYTHONIOENCODING=utf_8 python3.2 $(BLENDER_DIR)/source/tools/spell_check_source.py $(BLENDER_DIR)/source
# -----------------------------------------------------------------------------
# Documentation
@@ -270,7 +273,7 @@ doc_dna:
@echo "docs written into: '$(BLENDER_DIR)/doc/blender_file_format/dna.html'"
doc_man:
- python3 doc/manpage/blender.1.py $(BUILD_DIR)/bin/blender
+ python3.2 doc/manpage/blender.1.py $(BUILD_DIR)/bin/blender
clean:
diff --git a/SConstruct b/SConstruct
index 96d27ae76b0..46ce989e9c0 100644
--- a/SConstruct
+++ b/SConstruct
@@ -774,7 +774,7 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
dllsources.append('${LCGDIR}/thumbhandler/lib/BlendThumb.dll')
dllsources.append('${LCGDIR}/thumbhandler/lib/BlendThumb64.dll')
- if env['WITH_BF_OIIO']:
+ if env['WITH_BF_OIIO'] and env['OURPLATFORM'] != 'win32-mingw':
dllsources.append('${LCGDIR}/openimageio/bin/OpenImageIO.dll')
dllsources.append('#source/icons/blender.exe.manifest')
@@ -805,6 +805,7 @@ if env['OURPLATFORM'] == 'win64-mingw':
dllsources.append('${LCGDIR}/sdl/lib/SDL.dll')
dllsources.append('${LCGDIR}/thumbhandler/lib/BlendThumb64.dll')
+ dllsources.append('${LCGDIR}/binaries/pthreadGC2-w64.dll')
dllsources.append('#source/icons/blender.exe.manifest')
windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources)
diff --git a/build_files/buildbot/master.cfg b/build_files/buildbot/master.cfg
index 23751f7dcd4..066c133d335 100644
--- a/build_files/buildbot/master.cfg
+++ b/build_files/buildbot/master.cfg
@@ -117,6 +117,8 @@ add_builder(c, 'salad_linux_x86_64_scons', '', generic_builder, 'soc-2011-salad'
add_builder(c, 'win32_scons', 'windows', generic_builder)
add_builder(c, 'salad_win32_scons', 'windows', generic_builder, 'soc-2011-salad')
add_builder(c, 'win64_scons', 'win64', generic_builder)
+add_builder(c, 'mingw_win64_scons', 'mingw64', generic_builder)
+add_builder(c, 'mingw_win32_scons', 'mingw32', generic_builder)
#add_builder(c, 'freebsd_i386_cmake', '', generic_builder)
#add_builder(c, 'freebsd_x86_64_cmake', '', generic_builder)
diff --git a/build_files/buildbot/master_unpack.py b/build_files/buildbot/master_unpack.py
index 3df22ad8745..f67bd294496 100644
--- a/build_files/buildbot/master_unpack.py
+++ b/build_files/buildbot/master_unpack.py
@@ -48,7 +48,8 @@ def get_platform(filename):
tokens = filename.split("-")
platforms = ('osx', 'mac', 'bsd',
'win', 'linux', 'source',
- 'solaris')
+ 'solaris',
+ 'mingw')
platform_tokens = []
found = False
diff --git a/build_files/buildbot/slave_compile.py b/build_files/buildbot/slave_compile.py
index 209253296be..eafdf0868cd 100644
--- a/build_files/buildbot/slave_compile.py
+++ b/build_files/buildbot/slave_compile.py
@@ -117,6 +117,8 @@ else:
scons_options.append('BF_BITNESS=' + bitness)
scons_options.append('WITH_BF_CYCLES_CUDA_BINARIES=True')
scons_options.append('BF_CYCLES_CUDA_NVCC=nvcc.exe')
+ if builder.find('mingw') != -1:
+ scons_options.append('BF_TOOLSET=mingw')
retcode = subprocess.call(['python', 'scons/scons.py'] + scons_options)
sys.exit(retcode)
diff --git a/build_files/buildbot/slave_pack.py b/build_files/buildbot/slave_pack.py
index cb02e619c1d..73c633d0c29 100644
--- a/build_files/buildbot/slave_pack.py
+++ b/build_files/buildbot/slave_pack.py
@@ -81,6 +81,8 @@ if builder.find('scons') != -1:
scons_options.append('BF_BITNESS=' + bitness)
scons_options.append('WITH_BF_CYCLES_CUDA_BINARIES=True')
scons_options.append('BF_CYCLES_CUDA_NVCC=nvcc.exe')
+ if builder.find('mingw') != -1:
+ scons_options.append('BF_TOOLSET=mingw')
retcode = subprocess.call(['python', 'scons/scons.py'] + scons_options)
sys.exit(retcode)
diff --git a/build_files/cmake/cmake_consistency_check.py b/build_files/cmake/cmake_consistency_check.py
index 65a9442a90d..072bbb12fb3 100755
--- a/build_files/cmake/cmake_consistency_check.py
+++ b/build_files/cmake/cmake_consistency_check.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3.2
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/build_files/cmake/cmake_netbeans_project.py b/build_files/cmake/cmake_netbeans_project.py
index 45c19adff36..aa6124ac8fe 100755
--- a/build_files/cmake/cmake_netbeans_project.py
+++ b/build_files/cmake/cmake_netbeans_project.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3.2
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/build_files/cmake/cmake_qtcreator_project.py b/build_files/cmake/cmake_qtcreator_project.py
index 8cabc75e426..32d20489e6a 100755
--- a/build_files/cmake/cmake_qtcreator_project.py
+++ b/build_files/cmake/cmake_qtcreator_project.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3.2
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/build_files/cmake/cmake_static_check_cppcheck.py b/build_files/cmake/cmake_static_check_cppcheck.py
index 436470a7020..c340ca5c458 100644
--- a/build_files/cmake/cmake_static_check_cppcheck.py
+++ b/build_files/cmake/cmake_static_check_cppcheck.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3.2
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/build_files/cmake/cmake_static_check_sparse.py b/build_files/cmake/cmake_static_check_sparse.py
index bd7629e4229..db1b14e7acb 100644
--- a/build_files/cmake/cmake_static_check_sparse.py
+++ b/build_files/cmake/cmake_static_check_sparse.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3.2
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/build_files/cmake/cmake_static_check_splint.py b/build_files/cmake/cmake_static_check_splint.py
index edfefa3d068..f538fa612d0 100644
--- a/build_files/cmake/cmake_static_check_splint.py
+++ b/build_files/cmake/cmake_static_check_splint.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3.2
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/build_files/cmake/example_scripts/make_quicky.py b/build_files/cmake/example_scripts/make_quicky.py
index a4e0d3371f1..9b853fc01d4 100755
--- a/build_files/cmake/example_scripts/make_quicky.py
+++ b/build_files/cmake/example_scripts/make_quicky.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#!/usr/bin/env python3.2
# ##### BEGIN GPL LICENSE BLOCK #####
#
diff --git a/build_files/cmake/project_info.py b/build_files/cmake/project_info.py
index 3f64ac51a4d..a80ae623eb9 100755
--- a/build_files/cmake/project_info.py
+++ b/build_files/cmake/project_info.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3.2
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/build_files/scons/config/win32-vc-config.py b/build_files/scons/config/win32-vc-config.py
index 5ed845c119f..d7af0eb549d 100644
--- a/build_files/scons/config/win32-vc-config.py
+++ b/build_files/scons/config/win32-vc-config.py
@@ -163,7 +163,7 @@ BF_BOOST_LIB = 'libboost_date_time-vc90-mt-s-1_47 libboost_filesystem-vc90-mt-s-
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
#CUDA
-WITH_BF_CYCLES_CUDA_BINARIES = True
+WITH_BF_CYCLES_CUDA_BINARIES = False
#BF_CYCLES_CUDA_NVCC = "" # Path to the nvidia compiler
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_13', 'sm_20', 'sm_21']
diff --git a/build_files/scons/config/win64-mingw-config.py b/build_files/scons/config/win64-mingw-config.py
index 98d45ae2054..055b0c7b9fd 100644
--- a/build_files/scons/config/win64-mingw-config.py
+++ b/build_files/scons/config/win64-mingw-config.py
@@ -176,12 +176,12 @@ CC = 'gcc'
CXX = 'g++'
CCFLAGS = [ '-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
-#CXXFLAGS = [ '-fpermissive' ]
+CXXFLAGS = [ '-fpermissive' ]
CPPFLAGS = ['-DWIN32', '-DMS_WIN64', '-DFREE_WINDOWS', '-DFREE_WINDOWS64', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE64_SOURCE', '-DBOOST_ALL_NO_LIB', '-DBOOST_THREAD_USE_LIB', '-DGLEW_STATIC', '-D_SSIZE_T_']
-REL_CFLAGS = ['-O3', '-mmmx', '-msse', '-msse2']
-REL_CXXFLAGS = ['-O3', '-mmmx', '-msse', '-msse2']
-REL_CCFLAGS = ['-DNDEBUG', '-O3', '-mmmx', '-msse', '-msse2']
+REL_CFLAGS = []
+REL_CXXFLAGS = []
+REL_CCFLAGS = ['-DNDEBUG', '-O2', '-ftree-vectorize', '-mmmx', '-msse', '-msse2']
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
diff --git a/build_files/scons/config/win64-vc-config.py b/build_files/scons/config/win64-vc-config.py
index f8a67d7cf6a..3a376be6024 100644
--- a/build_files/scons/config/win64-vc-config.py
+++ b/build_files/scons/config/win64-vc-config.py
@@ -160,7 +160,7 @@ BF_BOOST_LIB = 'libboost_date_time-vc90-mt-s-1_47 libboost_filesystem-vc90-mt-s-
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
#CUDA
-WITH_BF_CYCLES_CUDA_BINARIES = True
+WITH_BF_CYCLES_CUDA_BINARIES = False
#BF_CYCLES_CUDA_NVCC = "" # Path to the nvidia compiler
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_13', 'sm_20', 'sm_21']
diff --git a/build_files/scons/tools/btools.py b/build_files/scons/tools/btools.py
index ca0ac2dd8da..65593d559ed 100644
--- a/build_files/scons/tools/btools.py
+++ b/build_files/scons/tools/btools.py
@@ -622,7 +622,13 @@ def buildslave(target=None, source=None, env=None):
else:
extension = '.tar.bz2'
- platform = env['OURPLATFORM'].split('-')[0]
+ if env['OURPLATFORM'] == 'win32-mingw':
+ platform = 'mingw32'
+ elif env['OURPLATFORM'] == 'win64-mingw':
+ platform = 'mingw64'
+ else:
+ platform = env['OURPLATFORM'].split('-')[0]
+
if platform == 'linux':
import platform
@@ -665,12 +671,10 @@ def NSIS_Installer(target=None, source=None, env=None):
if env['OURPLATFORM'] not in ('win32-vc', 'win32-mingw', 'win64-vc', 'win64-mingw'):
print "NSIS installer is only available on Windows."
Exit()
- if env['OURPLATFORM'] == 'win32-vc':
+ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw'):
bitness = '32'
- elif env['OURPLATFORM'] == 'win64-vc':
+ elif env['OURPLATFORM'] in ('win64-vc', 'win64-mingw'):
bitness = '64'
- else:
- bitness = '-mingw'
start_dir = os.getcwd()
rel_dir = os.path.join(start_dir,'release','windows','installer')
@@ -762,7 +766,7 @@ def NSIS_Installer(target=None, source=None, env=None):
cmdline = "makensis " + "\""+tmpnsi+"\""
startupinfo = subprocess.STARTUPINFO()
- startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
+ #startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
proc = subprocess.Popen(cmdline, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, startupinfo=startupinfo, shell = True)
data, err = proc.communicate()
diff --git a/doc/blender_file_format/BlendFileDnaExporter_25.py b/doc/blender_file_format/BlendFileDnaExporter_25.py
index a201f618fbb..b7b89c89268 100755
--- a/doc/blender_file_format/BlendFileDnaExporter_25.py
+++ b/doc/blender_file_format/BlendFileDnaExporter_25.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python3
+#!/usr/bin/env python3.2
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/doc/blender_file_format/BlendFileReader.py b/doc/blender_file_format/BlendFileReader.py
index 88eb71b3ce2..b7091ad8ff5 100644
--- a/doc/blender_file_format/BlendFileReader.py
+++ b/doc/blender_file_format/BlendFileReader.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python3
+#!/usr/bin/env python3.2
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/doc/manpage/blender.1 b/doc/manpage/blender.1
index 97c11bc138c..6257a78171b 100644
--- a/doc/manpage/blender.1
+++ b/doc/manpage/blender.1
@@ -1,4 +1,13 @@
-.TH "BLENDER" "1" "April 05, 2012" "Blender Blender 2\&.62 (sub 3)"
+.TH "BLENDER" "1" "April 26, 2012" "Blender Blender 2\&.63 (sub 0)
+ build date: 2012-04-26
+ build time: 19:38:31
+ build revision: 45987
+ build platform: Linux
+ build type: Debug
+ build c flags: -fopenmp -msse2 -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing -Wall -Wcast-align -Werror=declaration-after-statement -Werror=implicit-function-declaration -Werror=return-type -Wstrict-prototypes -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings
+ build c++ flags: -D__STDC_CONSTANT_MACROS -fopenmp -msse2 -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing -Wall -Wno-invalid-offsetof -Wno-sign-compare
+ build link flags: -pthread
+ build system: CMake"
.SH NAME
blender \- a 3D modelling and rendering package
@@ -15,7 +24,7 @@ Use Blender to create TV commercials, to make technical visualizations, business
http://www.blender.org
.SH OPTIONS
-Blender 2.62 (sub 3)
+Blender 2.63 (sub 0)
Usage: blender [args ...] [file] [args ...]
.br
.SS "Render Options:"
@@ -220,6 +229,12 @@ Enable floating point exceptions
Enable debug messages from FFmpeg library
.br
+.TP
+.B \-\-debug\-libmv
+.br
+Enable debug messages from libmv library
+.br
+
.IP
.TP
@@ -406,6 +421,7 @@ Arguments are executed in the order they are given. eg
\fIBLENDER_SYSTEM_DATAFILES\fR Directory for system wide data files.
\fIBLENDER_SYSTEM_PYTHON\fR Directory for system python libraries.
\fITMP\fR or \fITMPDIR\fR Store temporary files here.
+ \fISDL_AUDIODRIVER\fR LibSDL audio driver \- alsa, esd, dma.
\fIPYTHONHOME\fR Path to the python directory, eg. /usr/lib/python.
.br
.br
diff --git a/doc/python_api/examples/bpy.ops.2.py b/doc/python_api/examples/bpy.ops.2.py
new file mode 100644
index 00000000000..86b7438888c
--- /dev/null
+++ b/doc/python_api/examples/bpy.ops.2.py
@@ -0,0 +1,18 @@
+"""
+Overriding Context
+++++++++++++++++++
+
+It is possible to override context members that the operator sees, so that they
+act on specified rather than the selected or active data, or to execute an
+operator in the different part of the user interface.
+
+The context overrides are passed as a dictionary, with keys matching the context
+member names in bpy.context. For example to override bpy.context.active_object,
+you would pass {'active_object': object}.
+"""
+
+# remove all objects in scene rather than the selected ones
+import bpy
+override = {'selected_bases': list(bpy.context.scene.object_bases)}
+bpy.ops.object.delete(override)
+
diff --git a/doc/python_api/examples/bpy.ops.3.py b/doc/python_api/examples/bpy.ops.3.py
new file mode 100644
index 00000000000..0b5bcafe5be
--- /dev/null
+++ b/doc/python_api/examples/bpy.ops.3.py
@@ -0,0 +1,18 @@
+"""
+It is also possible to run an operator in a particular part of the user
+interface. For this we need to pass the window, screen, area and sometimes
+a region.
+"""
+
+# maximize 3d view in all windows
+import bpy
+
+for window in bpy.context.window_manager.windows:
+ screen = window.screen
+
+ for area in screen.areas:
+ if area.type == 'VIEW_3D':
+ override = {'window': window, 'screen': screen, 'area': area}
+ bpy.ops.screen.screen_full_area(override)
+ break
+
diff --git a/doc/python_api/examples/bpy.types.Mesh.py b/doc/python_api/examples/bpy.types.Mesh.py
index 69edf2cba50..1ee5118df6d 100644
--- a/doc/python_api/examples/bpy.types.Mesh.py
+++ b/doc/python_api/examples/bpy.types.Mesh.py
@@ -38,4 +38,3 @@ for poly in me.polygons:
for loop_index in range(poly.loop_start, poly.loop_start + poly.loop_total):
print(" Vertex: %d" % me.loops[loop_index].vertex_index)
print(" UV: %r" % uv_layer[loop_index].uv)
-
diff --git a/doc/python_api/rst/bgl.rst b/doc/python_api/rst/bgl.rst
index 8fe765836a1..9f7817c6fa2 100644
--- a/doc/python_api/rst/bgl.rst
+++ b/doc/python_api/rst/bgl.rst
@@ -27,7 +27,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Operate on the accumulation buffer.
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/accum.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glAccum.xml>`_
:type op: Enumerated constant
:arg op: The accumulation buffer operation.
@@ -39,7 +39,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify the alpha test function.
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/alphafunc.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glAlphaFunc.xml>`_
:type func: Enumerated constant
:arg func: Specifies the alpha comparison function.
@@ -52,7 +52,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Determine if textures are loaded in texture memory
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/aretexturesresident.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glAreTexturesResident.xml>`_
:type n: int
:arg n: Specifies the number of textures to be queried.
@@ -68,7 +68,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Delimit the vertices of a primitive or a group of like primatives
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/begin.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glBegin.xml>`_
:type mode: Enumerated constant
:arg mode: Specifies the primitive that will be create from vertices between
@@ -79,7 +79,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Bind a named texture to a texturing target
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/bindtexture.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glBindTexture.xml>`_
:type target: Enumerated constant
:arg target: Specifies the target to which the texture is bound.
@@ -91,7 +91,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Draw a bitmap
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/bitmap.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glBitmap.xml>`_
:type width, height: int
:arg width, height: Specify the pixel width and height of the bitmap image.
@@ -109,7 +109,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify pixel arithmetic
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/blendfunc.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glBlendFunc.xml>`_
:type sfactor: Enumerated constant
:arg sfactor: Specifies how the red, green, blue, and alpha source blending factors are
@@ -123,7 +123,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Execute a display list
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/calllist.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glCallList.xml>`_
:type list: unsigned int
:arg list: Specifies the integer name of the display list to be executed.
@@ -133,7 +133,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Execute a list of display lists
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/calllists.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glCallLists.xml>`_
:type n: int
:arg n: Specifies the number of display lists to be executed.
@@ -149,7 +149,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Clear buffers to preset values
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/clear.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glClear.xml>`_
:type mask: Enumerated constant(s)
:arg mask: Bitwise OR of masks that indicate the buffers to be cleared.
@@ -159,7 +159,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify clear values for the accumulation buffer
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/clearaccum.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glClearAccum.xml>`_
:type red, green, blue, alpha: float
:arg red, green, blue, alpha: Specify the red, green, blue, and alpha values used when the
@@ -170,7 +170,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify clear values for the color buffers
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/clearcolor.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glClearColor.xml>`_
:type red, green, blue, alpha: float
:arg red, green, blue, alpha: Specify the red, green, blue, and alpha values used when the
@@ -181,7 +181,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify the clear value for the depth buffer
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/cleardepth.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glClearDepth.xml>`_
:type depth: int
:arg depth: Specifies the depth value used when the depth buffer is cleared.
@@ -192,7 +192,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify the clear value for the color index buffers
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/clearindex.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glClearIndex.xml>`_
:type c: float
:arg c: Specifies the index used when the color index buffers are cleared.
@@ -203,7 +203,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify the clear value for the stencil buffer
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/clearstencil.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glClearStencil.xml>`_
:type s: int
:arg s: Specifies the index used when the stencil buffer is cleared. The initial value is 0.
@@ -213,7 +213,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify a plane against which all geometry is clipped
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/clipplane.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glClipPlane.xml>`_
:type plane: Enumerated constant
:arg plane: Specifies which clipping plane is being positioned.
@@ -232,7 +232,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set a new color.
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/color.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glColor.xml>`_
:type red, green, blue, alpha: Depends on function prototype.
:arg red, green, blue: Specify new red, green, and blue values for the current color.
@@ -244,7 +244,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Enable and disable writing of frame buffer color components
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/colormask.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glColorMask.xml>`_
:type red, green, blue, alpha: int (boolean)
:arg red, green, blue, alpha: Specify whether red, green, blue, and alpha can or cannot be
@@ -256,7 +256,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Cause a material color to track the current color
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/colormaterial.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glColorMaterial.xml>`_
:type face: Enumerated constant
:arg face: Specifies whether front, back, or both front and back material parameters should
@@ -269,7 +269,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Copy pixels in the frame buffer
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/copypixels.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glCopyPixels.xml>`_
:type x, y: int
:arg x, y: Specify the window coordinates of the lower left corner of the rectangular
@@ -314,7 +314,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify whether front- or back-facing facets can be culled
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/cullface.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glCullFace.xml>`_
:type mode: Enumerated constant
:arg mode: Specifies whether front- or back-facing facets are candidates for culling.
@@ -324,7 +324,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Delete a contiguous group of display lists
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/deletelists.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glDeleteLists.xml>`_
:type list: unsigned int
:arg list: Specifies the integer name of the first display list to delete
@@ -336,7 +336,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Delete named textures
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/deletetextures.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glDeleteTextures.xml>`_
:type n: int
:arg n: Specifies the number of textures to be deleted
@@ -348,7 +348,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify the value used for depth buffer comparisons
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/depthfunc.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glDepthFunc.xml>`_
:type func: Enumerated constant
:arg func: Specifies the depth comparison function.
@@ -358,7 +358,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Enable or disable writing into the depth buffer
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/depthmask.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glDepthMask.xml>`_
:type flag: int (boolean)
:arg flag: Specifies whether the depth buffer is enabled for writing. If flag is GL_FALSE,
@@ -370,7 +370,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify mapping of depth values from normalized device coordinates to window coordinates
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/depthrange.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glDepthRange.xml>`_
:type zNear: int
:arg zNear: Specifies the mapping of the near clipping plane to window coordinates.
@@ -384,7 +384,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Disable server-side GL capabilities
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/enable.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glEnable.xml>`_
:type cap: Enumerated constant
:arg cap: Specifies a symbolic constant indicating a GL capability.
@@ -394,7 +394,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify which color buffers are to be drawn into
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/drawbuffer.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glDrawBuffer.xml>`_
:type mode: Enumerated constant
:arg mode: Specifies up to four color buffers to be drawn into.
@@ -404,7 +404,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Write a block of pixels to the frame buffer
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/drawpixels.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glDrawPixels.xml>`_
:type width, height: int
:arg width, height: Specify the dimensions of the pixel rectangle to be
@@ -423,7 +423,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Flag edges as either boundary or non-boundary
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/edgeflag.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glEdgeFlag.xml>`_
:type flag: Depends of function prototype
:arg flag: Specifies the current edge flag value.The initial value is GL_TRUE.
@@ -433,7 +433,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Enable server-side GL capabilities
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/enable.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glEnable.xml>`_
:type cap: Enumerated constant
:arg cap: Specifies a symbolic constant indicating a GL capability.
@@ -443,14 +443,14 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Delimit the vertices of a primitive or group of like primitives
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/begin.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glBegin.xml>`_
.. function:: glEndList():
Create or replace a display list
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/newlist.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glNewList.xml>`_
.. function:: glEvalCoord (u,v):
@@ -460,7 +460,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Evaluate enabled one- and two-dimensional maps
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/evalcoord.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glEvalCoord.xml>`_
:type u: Depends on function prototype.
:arg u: Specifies a value that is the domain coordinate u to the basis function defined
@@ -478,7 +478,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Compute a one- or two-dimensional grid of points or lines
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/evalmesh.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glEvalMesh.xml>`_
:type mode: Enumerated constant
:arg mode: In glEvalMesh1, specifies whether to compute a one-dimensional
@@ -493,7 +493,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Generate and evaluate a single point in a mesh
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/evalpoint.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glEvalPoint.xml>`_
:type i: int
:arg i: Specifies the integer value for grid domain variable i.
@@ -505,7 +505,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Controls feedback mode
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/feedbackbuffer.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glFeedbackBuffer.xml>`_
:type size: int
:arg size: Specifies the maximum number of values that can be written into buffer.
@@ -520,14 +520,14 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Block until all GL execution is complete
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/finish.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glFinish.xml>`_
.. function:: glFlush():
Force Execution of GL commands in finite time
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/flush.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glFlush.xml>`_
.. function:: glFog (pname, param):
@@ -536,7 +536,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify fog parameters
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/fog.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glFog.xml>`_
:type pname: Enumerated constant
:arg pname: Specifies a single-valued fog parameter. If the function prototype
@@ -551,7 +551,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Define front- and back-facing polygons
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/frontface.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glFrontFace.xml>`_
:type mode: Enumerated constant
:arg mode: Specifies the orientation of front-facing polygons.
@@ -561,7 +561,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Multiply the current matrix by a perspective matrix
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/frustum.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glFrustum.xml>`_
:type left, right: double (float)
:arg left, right: Specify the coordinates for the left and right vertical
@@ -578,7 +578,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Generate a contiguous set of empty display lists
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/genlists.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glGenLists.xml>`_
:type range: int
:arg range: Specifies the number of contiguous empty display lists to be generated.
@@ -588,7 +588,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Generate texture names
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/gentextures.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glGenTextures.xml>`_
:type n: int
:arg n: Specifies the number of textures name to be generated.
@@ -602,7 +602,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Return the value or values of a selected parameter
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/get.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glGet.xml>`_
:type pname: Enumerated constant
:arg pname: Specifies the parameter value to be returned.
@@ -614,7 +614,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Return the coefficients of the specified clipping plane
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getclipplane.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glGetClipPlane.xml>`_
:type plane: Enumerated constant
:arg plane: Specifies a clipping plane. The number of clipping planes depends on the
@@ -629,7 +629,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Return error information
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/geterror.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glGetError.xml>`_
.. function:: glGetLight (light, pname, params):
@@ -638,7 +638,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Return light source parameter values
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getlight.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glGetLight.xml>`_
:type light: Enumerated constant
:arg light: Specifies a light source. The number of possible lights depends on the
@@ -656,7 +656,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Return evaluator parameters
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getmap.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glGetMap.xml>`_
:type target: Enumerated constant
:arg target: Specifies the symbolic name of a map.
@@ -672,7 +672,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Return material parameters
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getmaterial.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glGetMaterial.xml>`_
:type face: Enumerated constant
:arg face: Specifies which of the two materials is being queried.
@@ -689,7 +689,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Return the specified pixel map
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getpixelmap.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glGetPixelMap.xml>`_
:type map: Enumerated constant
:arg map: Specifies the name of the pixel map to return.
@@ -701,7 +701,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Return the polygon stipple pattern
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getpolygonstipple.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glGetPolygonStipple.xml>`_
:type mask: :class:`bgl.Buffer` object I{type GL_BYTE}
:arg mask: Returns the stipple pattern. The initial value is all 1's.
@@ -711,7 +711,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Return a string describing the current GL connection
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getstring.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glGetString.xml>`_
:type name: Enumerated constant
:arg name: Specifies a symbolic constant.
@@ -724,7 +724,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Return texture environment parameters
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/gettexenv.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glGetTexEnv.xml>`_
:type target: Enumerated constant
:arg target: Specifies a texture environment. Must be GL_TEXTURE_ENV.
@@ -740,7 +740,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Return texture coordinate generation parameters
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/gettexgen.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glGetTexGen.xml>`_
:type coord: Enumerated constant
:arg coord: Specifies a texture coordinate.
@@ -754,7 +754,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Return a texture image
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getteximage.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glGetTexImage.xml>`_
:type target: Enumerated constant
:arg target: Specifies which texture is to be obtained.
@@ -776,7 +776,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
return texture parameter values for a specific level of detail
- .. seealso:: U{opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/gettexlevelparameter.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glGetTexLevelParameter.xml>`_
:type target: Enumerated constant
:arg target: Specifies the symbolic name of the target texture.
@@ -795,7 +795,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Return texture parameter values
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/gettexparameter.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glGetTexParameter.xml>`_
:type target: Enumerated constant
:arg target: Specifies the symbolic name of the target texture.
@@ -809,7 +809,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify implementation-specific hints
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/hint.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glHint.xml>`_
:type target: Enumerated constant
:arg target: Specifies a symbolic constant indicating the behavior to be
@@ -824,7 +824,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set the current color index
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/index_.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glIndex.xml>`_
:type c: :class:`bgl.Buffer` object. Depends on function prototype.
:arg c: Specifies a pointer to a one element array that contains the new value for
@@ -835,14 +835,14 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Initialize the name stack
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/initnames.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glInitNames.xml>`_
.. function:: glIsEnabled(cap):
Test whether a capability is enabled
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/isenabled.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glIsEnabled.xml>`_
:type cap: Enumerated constant
:arg cap: Specifies a constant representing a GL capability.
@@ -852,7 +852,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Determine if a name corresponds to a display-list
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/islist.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glIsList.xml>`_
:type list: unsigned int
:arg list: Specifies a potential display-list name.
@@ -862,7 +862,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Determine if a name corresponds to a texture
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/istexture.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glIsTexture.xml>`_
:type texture: unsigned int
:arg texture: Specifies a value that may be the name of a texture.
@@ -874,7 +874,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set the light source parameters
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/light.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glLight.xml>`_
:type light: Enumerated constant
:arg light: Specifies a light. The number of lights depends on the implementation,
@@ -894,7 +894,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set the lighting model parameters
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/lightmodel.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glLightModel.xml>`_
:type pname: Enumerated constant
:arg pname: Specifies a single-value light model parameter.
@@ -907,7 +907,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify the line stipple pattern
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/linestipple.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glLineStipple.xml>`_
:type factor: int
:arg factor: Specifies a multiplier for each bit in the line stipple pattern.
@@ -924,7 +924,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify the width of rasterized lines.
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/linewidth.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glLineWidth.xml>`_
:type width: float
:arg width: Specifies the width of rasterized lines. The initial value is 1.
@@ -934,7 +934,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set the display-list base for glCallLists
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/listbase.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glListBase.xml>`_
:type base: unsigned int
:arg base: Specifies an integer offset that will be added to glCallLists
@@ -945,7 +945,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Replace the current matrix with the identity matrix
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/loadidentity.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glLoadIdentity.xml>`_
.. function:: glLoadMatrix (m):
@@ -954,7 +954,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Replace the current matrix with the specified matrix
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/loadmatrix.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glLoadMatrix.xml>`_
:type m: :class:`bgl.Buffer` object. Depends on function prototype.
:arg m: Specifies a pointer to 16 consecutive values, which are used as the elements
@@ -965,7 +965,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Load a name onto the name stack.
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/loadname.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glLoadName.xml>`_
:type name: unsigned int
:arg name: Specifies a name that will replace the top value on the name stack.
@@ -975,7 +975,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify a logical pixel operation for color index rendering
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/logicop.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glLogicOp.xml>`_
:type opcode: Enumerated constant
:arg opcode: Specifies a symbolic constant that selects a logical operation.
@@ -987,7 +987,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Define a one-dimensional evaluator
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/map1.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glMap1.xml>`_
:type target: Enumerated constant
:arg target: Specifies the kind of values that are generated by the evaluator.
@@ -1012,7 +1012,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Define a two-dimensional evaluator
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/map2.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glMap2.xml>`_
:type target: Enumerated constant
:arg target: Specifies the kind of values that are generated by the evaluator.
@@ -1053,7 +1053,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Define a one- or two-dimensional mesh
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/mapgrid.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glMapGrid.xml>`_
:type un: int
:arg un: Specifies the number of partitions in the grid range interval
@@ -1072,7 +1072,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify material parameters for the lighting model.
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/material.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glMaterial.xml>`_
:type face: Enumerated constant
:arg face: Specifies which face or faces are being updated. Must be one of:
@@ -1089,7 +1089,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify which matrix is the current matrix.
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/matrixmode.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glMatrixMode.xml>`_
:type mode: Enumerated constant
:arg mode: Specifies which matrix stack is the target for subsequent matrix operations.
@@ -1101,7 +1101,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Multiply the current matrix with the specified matrix
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/multmatrix.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glMultMatrix.xml>`_
:type m: :class:`bgl.Buffer` object. Depends on function prototype.
:arg m: Points to 16 consecutive values that are used as the elements of a 4x4 column
@@ -1112,7 +1112,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Create or replace a display list
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/newlist.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glNewList.xml>`_
:type list: unsigned int
:arg list: Specifies the display list name
@@ -1127,7 +1127,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set the current normal vector
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/normal.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glNormal.xml>`_
:type nx, ny, nz: Depends on function prototype. (non - 'v' prototypes only)
:arg nx, ny, nz: Specify the x, y, and z coordinates of the new current normal.
@@ -1141,7 +1141,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Multiply the current matrix with an orthographic matrix
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/ortho.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glOrtho.xml>`_
:type left, right: double (float)
:arg left, right: Specify the coordinates for the left and
@@ -1158,7 +1158,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Place a marker in the feedback buffer
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/passthrough.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPassThrough.xml>`_
:type token: float
:arg token: Specifies a marker value to be placed in the feedback
@@ -1171,7 +1171,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set up pixel transfer maps
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pixelmap.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPixelMap.xml>`_
:type map: Enumerated constant
:arg map: Specifies a symbolic map name.
@@ -1187,7 +1187,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set pixel storage modes
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pixelstore.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPixelStore.xml>`_
:type pname: Enumerated constant
:arg pname: Specifies the symbolic name of the parameter to be set.
@@ -1203,7 +1203,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set pixel transfer modes
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pixeltransfer.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPixelTransfer.xml>`_
:type pname: Enumerated constant
:arg pname: Specifies the symbolic name of the pixel transfer parameter to be set.
@@ -1215,7 +1215,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify the pixel zoom factors
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pixelzoom.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPixelZoom.xml>`_
:type xfactor, yfactor: float
:arg xfactor, yfactor: Specify the x and y zoom factors for pixel write operations.
@@ -1225,7 +1225,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify the diameter of rasterized points
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pointsize.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPointSize.xml>`_
:type size: float
:arg size: Specifies the diameter of rasterized points. The initial value is 1.
@@ -1235,7 +1235,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Select a polygon rasterization mode
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/polygonmode.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPolygonMode.xml>`_
:type face: Enumerated constant
:arg face: Specifies the polygons that mode applies to.
@@ -1250,7 +1250,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set the scale and units used to calculate depth values
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/polygonoffset.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPolygonOffset.xml>`_
:type factor: float
:arg factor: Specifies a scale factor that is used to create a variable depth
@@ -1264,7 +1264,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set the polygon stippling pattern
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/polygonstipple.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPolygonStipple.xml>`_
:type mask: :class:`bgl.Buffer` object I{type GL_BYTE}
:arg mask: Specifies a pointer to a 32x32 stipple pattern that will be unpacked
@@ -1275,35 +1275,35 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Pop the server attribute stack
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushattrib.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPopAttrib.xml>`_
.. function:: glPopClientAttrib():
Pop the client attribute stack
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushclientattrib.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPopClientAttrib.xml>`_
.. function:: glPopMatrix():
Pop the current matrix stack
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushmatrix.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPopMatrix.xml>`_
.. function:: glPopName():
Pop the name stack
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushname.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPopName.xml>`_
.. function:: glPrioritizeTextures(n, textures, priorities):
Set texture residence priority
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/prioritizetextures.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPrioritizeTextures.xml>`_
:type n: int
:arg n: Specifies the number of textures to be prioritized.
@@ -1319,7 +1319,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Push the server attribute stack
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushattrib.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPushAttrib.xml>`_
:type mask: Enumerated constant(s)
:arg mask: Specifies a mask that indicates which attributes to save.
@@ -1329,7 +1329,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Push the client attribute stack
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushclientattrib.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPushClientAttrib.xml>`_
:type mask: Enumerated constant(s)
:arg mask: Specifies a mask that indicates which attributes to save.
@@ -1339,14 +1339,14 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Push the current matrix stack
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushmatrix.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPushMatrix.xml>`_
.. function:: glPushName(name):
Push the name stack
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushname.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPushName.xml>`_
:type name: unsigned int
:arg name: Specifies a name that will be pushed onto the name stack.
@@ -1362,7 +1362,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify the raster position for pixel operations
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/rasterpos.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glRasterPos.xml>`_
:type x, y, z, w: Depends on function prototype. (z and w for '3' and '4' prototypes only)
:arg x, y, z, w: Specify the x,y,z, and w object coordinates (if present) for the
@@ -1394,7 +1394,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Select a color buffer source for pixels.
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/readbuffer.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glReadBuffer.xml>`_
:type mode: Enumerated constant
:arg mode: Specifies a color buffer.
@@ -1404,7 +1404,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Read a block of pixels from the frame buffer
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/readpixels.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glReadPixels.xml>`_
:type x, y: int
:arg x, y: Specify the window coordinates of the first pixel that is read
@@ -1427,7 +1427,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Draw a rectangle
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/rect.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glRect.xml>`_
:type x1, y1: Depends on function prototype. (for non 'v' prototypes only)
:arg x1, y1: Specify one vertex of a rectangle
@@ -1442,7 +1442,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set rasterization mode
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/rendermode.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glRenderMode.xml>`_
:type mode: Enumerated constant
:arg mode: Specifies the rasterization mode.
@@ -1454,7 +1454,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Multiply the current matrix by a rotation matrix
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/rotate.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glRotate.xml>`_
:type angle: Depends on function prototype.
:arg angle: Specifies the angle of rotation in degrees.
@@ -1468,7 +1468,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Multiply the current matrix by a general scaling matrix
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/scale.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glScale.xml>`_
:type x, y, z: Depends on function prototype.
:arg x, y, z: Specify scale factors along the x, y, and z axes, respectively.
@@ -1478,7 +1478,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Define the scissor box
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/scissor.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glScissor.xml>`_
:type x, y: int
:arg x, y: Specify the lower left corner of the scissor box. Initially (0, 0).
@@ -1492,7 +1492,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Establish a buffer for selection mode values
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/selectbuffer.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glSelectBuffer.xml>`_
:type size: int
:arg size: Specifies the size of buffer
@@ -1504,7 +1504,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Select flat or smooth shading
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/shademodel.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glShadeModel.xml>`_
:type mode: Enumerated constant
:arg mode: Specifies a symbolic value representing a shading technique.
@@ -1514,7 +1514,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set function and reference value for stencil testing
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/stencilfunc.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glStencilFuc.xml>`_
:type func: Enumerated constant
:arg func: Specifies the test function.
@@ -1531,7 +1531,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Control the writing of individual bits in the stencil planes
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/stencilmask.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glStencilMask.xml>`_
:type mask: unsigned int
:arg mask: Specifies a bit mask to enable and disable writing of individual bits
@@ -1542,7 +1542,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set stencil test actions
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/stencilop.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glStencilOp.xml>`_
:type fail: Enumerated constant
:arg fail: Specifies the action to take when the stencil test fails.
@@ -1570,7 +1570,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set the current texture coordinates
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/texcoord.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glTexCoord.xml>`_
:type s, t, r, q: Depends on function prototype. (r and q for '3' and '4' prototypes only)
:arg s, t, r, q: Specify s, t, r, and q texture coordinates. Not all parameters are
@@ -1586,7 +1586,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set texture environment parameters
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/texenv.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glTexEnv.xml>`_
:type target: Enumerated constant
:arg target: Specifies a texture environment. Must be GL_TEXTURE_ENV.
@@ -1605,7 +1605,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Control the generation of texture coordinates
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/texgen.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glTexGen.xml>`_
:type coord: Enumerated constant
:arg coord: Specifies a texture coordinate.
@@ -1623,7 +1623,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify a one-dimensional texture image
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/teximage1d.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glTexImage1D.xml>`_
:type target: Enumerated constant
:arg target: Specifies the target texture.
@@ -1650,7 +1650,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify a two-dimensional texture image
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/teximage2d.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glTexImage2D.xml>`_
:type target: Enumerated constant
:arg target: Specifies the target texture.
@@ -1683,7 +1683,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set texture parameters
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/texparameter.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glTexParameter.xml>`_
:type target: Enumerated constant
:arg target: Specifies the target texture.
@@ -1700,7 +1700,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Multiply the current matrix by a translation matrix
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/translate.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glTranslate.xml>`_
:type x, y, z: Depends on function prototype.
:arg x, y, z: Specify the x, y, and z coordinates of a translation vector.
@@ -1715,7 +1715,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify a vertex
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/vertex.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glVertex.xml>`_
:type x, y, z, w: Depends on function prototype (z and w for '3' and '4' prototypes only)
:arg x, y, z, w: Specify x, y, z, and w coordinates of a vertex. Not all parameters
@@ -1731,7 +1731,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set the viewport
- .. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/viewport.html>`_
+ .. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glViewport.xml>`_
:type x, y: int
:arg x, y: Specify the lower left corner of the viewport rectangle,
diff --git a/extern/Eigen3/Eigen/Core b/extern/Eigen3/Eigen/Core
index 6e855427c33..a5025e37ead 100644
--- a/extern/Eigen3/Eigen/Core
+++ b/extern/Eigen3/Eigen/Core
@@ -167,7 +167,7 @@
#include <intrin.h>
#endif
-#if (defined(_CPPUNWIND) || defined(__EXCEPTIONS)) && !defined(EIGEN_NO_EXCEPTIONS)
+#if defined(_CPPUNWIND) || defined(__EXCEPTIONS)
#define EIGEN_EXCEPTIONS
#endif
diff --git a/extern/Eigen3/Eigen/SVD b/extern/Eigen3/Eigen/SVD
index d24471fd724..7c987a9dd36 100644
--- a/extern/Eigen3/Eigen/SVD
+++ b/extern/Eigen3/Eigen/SVD
@@ -13,9 +13,9 @@ namespace Eigen {
*
*
*
- * This module provides SVD decomposition for (currently) real matrices.
+ * This module provides SVD decomposition for matrices (both real and complex).
* This decomposition is accessible via the following MatrixBase method:
- * - MatrixBase::svd()
+ * - MatrixBase::jacobiSvd()
*
* \code
* #include <Eigen/SVD>
diff --git a/extern/Eigen3/Eigen/src/Cholesky/LDLT.h b/extern/Eigen3/Eigen/src/Cholesky/LDLT.h
index f47b2ea5669..a19e947a4c6 100644
--- a/extern/Eigen3/Eigen/src/Cholesky/LDLT.h
+++ b/extern/Eigen3/Eigen/src/Cholesky/LDLT.h
@@ -331,16 +331,16 @@ template<> struct ldlt_inplace<Upper>
template<typename MatrixType> struct LDLT_Traits<MatrixType,Lower>
{
- typedef TriangularView<MatrixType, UnitLower> MatrixL;
- typedef TriangularView<typename MatrixType::AdjointReturnType, UnitUpper> MatrixU;
+ typedef const TriangularView<const MatrixType, UnitLower> MatrixL;
+ typedef const TriangularView<const typename MatrixType::AdjointReturnType, UnitUpper> MatrixU;
inline static MatrixL getL(const MatrixType& m) { return m; }
inline static MatrixU getU(const MatrixType& m) { return m.adjoint(); }
};
template<typename MatrixType> struct LDLT_Traits<MatrixType,Upper>
{
- typedef TriangularView<typename MatrixType::AdjointReturnType, UnitLower> MatrixL;
- typedef TriangularView<MatrixType, UnitUpper> MatrixU;
+ typedef const TriangularView<const typename MatrixType::AdjointReturnType, UnitLower> MatrixL;
+ typedef const TriangularView<const MatrixType, UnitUpper> MatrixU;
inline static MatrixL getL(const MatrixType& m) { return m.adjoint(); }
inline static MatrixU getU(const MatrixType& m) { return m; }
};
diff --git a/extern/Eigen3/Eigen/src/Cholesky/LLT.h b/extern/Eigen3/Eigen/src/Cholesky/LLT.h
index a4ee5b11cb9..3bb76b5787f 100644
--- a/extern/Eigen3/Eigen/src/Cholesky/LLT.h
+++ b/extern/Eigen3/Eigen/src/Cholesky/LLT.h
@@ -274,8 +274,8 @@ template<> struct llt_inplace<Upper>
template<typename MatrixType> struct LLT_Traits<MatrixType,Lower>
{
- typedef TriangularView<MatrixType, Lower> MatrixL;
- typedef TriangularView<typename MatrixType::AdjointReturnType, Upper> MatrixU;
+ typedef const TriangularView<const MatrixType, Lower> MatrixL;
+ typedef const TriangularView<const typename MatrixType::AdjointReturnType, Upper> MatrixU;
inline static MatrixL getL(const MatrixType& m) { return m; }
inline static MatrixU getU(const MatrixType& m) { return m.adjoint(); }
static bool inplace_decomposition(MatrixType& m)
@@ -284,8 +284,8 @@ template<typename MatrixType> struct LLT_Traits<MatrixType,Lower>
template<typename MatrixType> struct LLT_Traits<MatrixType,Upper>
{
- typedef TriangularView<typename MatrixType::AdjointReturnType, Lower> MatrixL;
- typedef TriangularView<MatrixType, Upper> MatrixU;
+ typedef const TriangularView<const typename MatrixType::AdjointReturnType, Lower> MatrixL;
+ typedef const TriangularView<const MatrixType, Upper> MatrixU;
inline static MatrixL getL(const MatrixType& m) { return m.adjoint(); }
inline static MatrixU getU(const MatrixType& m) { return m; }
static bool inplace_decomposition(MatrixType& m)
diff --git a/extern/Eigen3/Eigen/src/Core/Array.h b/extern/Eigen3/Eigen/src/Core/Array.h
index a3a2167ad3e..a11fb1b53d5 100644
--- a/extern/Eigen3/Eigen/src/Core/Array.h
+++ b/extern/Eigen3/Eigen/src/Core/Array.h
@@ -68,10 +68,8 @@ class Array
friend struct internal::conservative_resize_like_impl;
using Base::m_storage;
+
public:
- enum { NeedsToAlign = (!(Options&DontAlign))
- && SizeAtCompileTime!=Dynamic && ((static_cast<int>(sizeof(Scalar))*SizeAtCompileTime)%16)==0 };
- EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)
using Base::base;
using Base::coeff;
diff --git a/extern/Eigen3/Eigen/src/Core/Block.h b/extern/Eigen3/Eigen/src/Core/Block.h
index 2b251bc2ca9..d470bc13400 100644
--- a/extern/Eigen3/Eigen/src/Core/Block.h
+++ b/extern/Eigen3/Eigen/src/Core/Block.h
@@ -94,7 +94,7 @@ struct traits<Block<XprType, BlockRows, BlockCols, InnerPanel, HasDirectAccess>
MaskPacketAccessBit = (InnerSize == Dynamic || (InnerSize % packet_traits<Scalar>::size) == 0)
&& (InnerStrideAtCompileTime == 1)
? PacketAccessBit : 0,
- MaskAlignedBit = (InnerPanel && (OuterStrideAtCompileTime!=Dynamic) && ((OuterStrideAtCompileTime % packet_traits<Scalar>::size) == 0)) ? AlignedBit : 0,
+ MaskAlignedBit = (InnerPanel && (OuterStrideAtCompileTime!=Dynamic) && (((OuterStrideAtCompileTime * int(sizeof(Scalar))) % 16) == 0)) ? AlignedBit : 0,
FlagsLinearAccessBit = (RowsAtCompileTime == 1 || ColsAtCompileTime == 1) ? LinearAccessBit : 0,
FlagsLvalueBit = is_lvalue<XprType>::value ? LvalueBit : 0,
FlagsRowMajorBit = IsRowMajor ? RowMajorBit : 0,
@@ -342,7 +342,7 @@ class Block<XprType,BlockRows,BlockCols, InnerPanel,true>
}
const typename XprType::Nested m_xpr;
- int m_outerStride;
+ Index m_outerStride;
};
diff --git a/extern/Eigen3/Eigen/src/Core/DenseBase.h b/extern/Eigen3/Eigen/src/Core/DenseBase.h
index 838fa40307a..920904f243a 100644
--- a/extern/Eigen3/Eigen/src/Core/DenseBase.h
+++ b/extern/Eigen3/Eigen/src/Core/DenseBase.h
@@ -169,8 +169,8 @@ template<typename Derived> class DenseBase
IsRowMajor = int(Flags) & RowMajorBit, /**< True if this expression has row-major storage order. */
- InnerSizeAtCompileTime = int(IsVectorAtCompileTime) ? SizeAtCompileTime
- : int(IsRowMajor) ? ColsAtCompileTime : RowsAtCompileTime,
+ InnerSizeAtCompileTime = int(IsVectorAtCompileTime) ? int(SizeAtCompileTime)
+ : int(IsRowMajor) ? int(ColsAtCompileTime) : int(RowsAtCompileTime),
CoeffReadCost = internal::traits<Derived>::CoeffReadCost,
/**< This is a rough measure of how expensive it is to read one coefficient from
diff --git a/extern/Eigen3/Eigen/src/Core/Map.h b/extern/Eigen3/Eigen/src/Core/Map.h
index dd0673609c5..2bf80b3af3d 100644
--- a/extern/Eigen3/Eigen/src/Core/Map.h
+++ b/extern/Eigen3/Eigen/src/Core/Map.h
@@ -102,7 +102,7 @@ struct traits<Map<PlainObjectType, MapOptions, StrideType> >
|| HasNoOuterStride
|| ( OuterStrideAtCompileTime!=Dynamic
&& ((static_cast<int>(sizeof(Scalar))*OuterStrideAtCompileTime)%16)==0 ) ),
- Flags0 = TraitsBase::Flags,
+ Flags0 = TraitsBase::Flags & (~NestByRefBit),
Flags1 = IsAligned ? (int(Flags0) | AlignedBit) : (int(Flags0) & ~AlignedBit),
Flags2 = (bool(HasNoStride) || bool(PlainObjectType::IsVectorAtCompileTime))
? int(Flags1) : int(Flags1 & ~LinearAccessBit),
@@ -120,7 +120,6 @@ template<typename PlainObjectType, int MapOptions, typename StrideType> class Ma
public:
typedef MapBase<Map> Base;
-
EIGEN_DENSE_PUBLIC_INTERFACE(Map)
typedef typename Base::PointerType PointerType;
@@ -181,7 +180,6 @@ template<typename PlainObjectType, int MapOptions, typename StrideType> class Ma
PlainObjectType::Base::_check_template_params();
}
-
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Map)
protected:
diff --git a/extern/Eigen3/Eigen/src/Core/MapBase.h b/extern/Eigen3/Eigen/src/Core/MapBase.h
index c23bcbfdcca..9426e2d24dd 100644
--- a/extern/Eigen3/Eigen/src/Core/MapBase.h
+++ b/extern/Eigen3/Eigen/src/Core/MapBase.h
@@ -170,8 +170,8 @@ template<typename Derived> class MapBase<Derived, ReadOnlyAccessors>
EIGEN_STATIC_ASSERT(EIGEN_IMPLIES(internal::traits<Derived>::Flags&PacketAccessBit,
internal::inner_stride_at_compile_time<Derived>::ret==1),
PACKET_ACCESS_REQUIRES_TO_HAVE_INNER_STRIDE_FIXED_TO_1);
- eigen_assert(EIGEN_IMPLIES(internal::traits<Derived>::Flags&AlignedBit, (size_t(m_data) % (sizeof(Scalar)*internal::packet_traits<Scalar>::size)) == 0)
- && "data is not aligned");
+ eigen_assert(EIGEN_IMPLIES(internal::traits<Derived>::Flags&AlignedBit, (size_t(m_data) % 16) == 0)
+ && "data is not aligned");
}
PointerType m_data;
diff --git a/extern/Eigen3/Eigen/src/Core/Matrix.h b/extern/Eigen3/Eigen/src/Core/Matrix.h
index 44de22cb4d5..982c9256af0 100644
--- a/extern/Eigen3/Eigen/src/Core/Matrix.h
+++ b/extern/Eigen3/Eigen/src/Core/Matrix.h
@@ -153,10 +153,6 @@ class Matrix
typedef typename Base::PlainObject PlainObject;
- enum { NeedsToAlign = (!(Options&DontAlign))
- && SizeAtCompileTime!=Dynamic && ((static_cast<int>(sizeof(Scalar))*SizeAtCompileTime)%16)==0 };
- EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)
-
using Base::base;
using Base::coeffRef;
diff --git a/extern/Eigen3/Eigen/src/Core/MatrixBase.h b/extern/Eigen3/Eigen/src/Core/MatrixBase.h
index db156f6e9d0..62877bce09e 100644
--- a/extern/Eigen3/Eigen/src/Core/MatrixBase.h
+++ b/extern/Eigen3/Eigen/src/Core/MatrixBase.h
@@ -250,7 +250,8 @@ template<typename Derived> class MatrixBase
// huuuge hack. make Eigen2's matrix.part<Diagonal>() work in eigen3. Problem: Diagonal is now a class template instead
// of an integer constant. Solution: overload the part() method template wrt template parameters list.
- template<template<typename T, int n> class U>
+ // Note: replacing next line by "template<template<typename T, int n> class U>" produces a mysterious error C2082 in MSVC.
+ template<template<typename, int> class U>
const DiagonalWrapper<ConstDiagonalReturnType> part() const
{ return diagonal().asDiagonal(); }
#endif // EIGEN2_SUPPORT
diff --git a/extern/Eigen3/Eigen/src/Core/PlainObjectBase.h b/extern/Eigen3/Eigen/src/Core/PlainObjectBase.h
index c70db92479a..612254e9da9 100644
--- a/extern/Eigen3/Eigen/src/Core/PlainObjectBase.h
+++ b/extern/Eigen3/Eigen/src/Core/PlainObjectBase.h
@@ -34,6 +34,19 @@
namespace internal {
+template<typename Index>
+EIGEN_ALWAYS_INLINE void check_rows_cols_for_overflow(Index rows, Index cols)
+{
+ // http://hg.mozilla.org/mozilla-central/file/6c8a909977d3/xpcom/ds/CheckedInt.h#l242
+ // we assume Index is signed
+ Index max_index = (size_t(1) << (8 * sizeof(Index) - 1)) - 1; // assume Index is signed
+ bool error = (rows < 0 || cols < 0) ? true
+ : (rows == 0 || cols == 0) ? false
+ : (rows > max_index / cols);
+ if (error)
+ throw_std_bad_alloc();
+}
+
template <typename Derived, typename OtherDerived = Derived, bool IsVector = static_cast<bool>(Derived::IsVectorAtCompileTime)> struct conservative_resize_like_impl;
template<typename MatrixTypeA, typename MatrixTypeB, bool SwapPointers> struct matrix_swap_impl;
@@ -84,14 +97,12 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type
template<typename StrideType> struct StridedConstMapType { typedef Eigen::Map<const Derived, Unaligned, StrideType> type; };
template<typename StrideType> struct StridedAlignedMapType { typedef Eigen::Map<Derived, Aligned, StrideType> type; };
template<typename StrideType> struct StridedConstAlignedMapType { typedef Eigen::Map<const Derived, Aligned, StrideType> type; };
-
protected:
DenseStorage<Scalar, Base::MaxSizeAtCompileTime, Base::RowsAtCompileTime, Base::ColsAtCompileTime, Options> m_storage;
public:
- enum { NeedsToAlign = (!(Options&DontAlign))
- && SizeAtCompileTime!=Dynamic && ((static_cast<int>(sizeof(Scalar))*SizeAtCompileTime)%16)==0 };
+ enum { NeedsToAlign = SizeAtCompileTime != Dynamic && (internal::traits<Derived>::Flags & AlignedBit) != 0 };
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)
Base& base() { return *static_cast<Base*>(this); }
@@ -200,11 +211,13 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type
EIGEN_STRONG_INLINE void resize(Index rows, Index cols)
{
#ifdef EIGEN_INITIALIZE_MATRICES_BY_ZERO
+ internal::check_rows_cols_for_overflow(rows, cols);
Index size = rows*cols;
bool size_changed = size != this->size();
m_storage.resize(size, rows, cols);
if(size_changed) EIGEN_INITIALIZE_BY_ZERO_IF_THAT_OPTION_IS_ENABLED
#else
+ internal::check_rows_cols_for_overflow(rows, cols);
m_storage.resize(rows*cols, rows, cols);
#endif
}
@@ -273,6 +286,7 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type
EIGEN_STRONG_INLINE void resizeLike(const EigenBase<OtherDerived>& _other)
{
const OtherDerived& other = _other.derived();
+ internal::check_rows_cols_for_overflow(other.rows(), other.cols());
const Index othersize = other.rows()*other.cols();
if(RowsAtCompileTime == 1)
{
@@ -417,6 +431,7 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type
: m_storage(other.derived().rows() * other.derived().cols(), other.derived().rows(), other.derived().cols())
{
_check_template_params();
+ internal::check_rows_cols_for_overflow(other.derived().rows(), other.derived().cols());
Base::operator=(other.derived());
}
@@ -581,6 +596,7 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type
{
eigen_assert(rows >= 0 && (RowsAtCompileTime == Dynamic || RowsAtCompileTime == rows)
&& cols >= 0 && (ColsAtCompileTime == Dynamic || ColsAtCompileTime == cols));
+ internal::check_rows_cols_for_overflow(rows, cols);
m_storage.resize(rows*cols,rows,cols);
EIGEN_INITIALIZE_BY_ZERO_IF_THAT_OPTION_IS_ENABLED
}
@@ -638,6 +654,7 @@ struct internal::conservative_resize_like_impl
if ( ( Derived::IsRowMajor && _this.cols() == cols) || // row-major and we change only the number of rows
(!Derived::IsRowMajor && _this.rows() == rows) ) // column-major and we change only the number of columns
{
+ internal::check_rows_cols_for_overflow(rows, cols);
_this.derived().m_storage.conservativeResize(rows*cols,rows,cols);
}
else
diff --git a/extern/Eigen3/Eigen/src/Core/ProductBase.h b/extern/Eigen3/Eigen/src/Core/ProductBase.h
index 3bd3487d6a2..91975880fdc 100644
--- a/extern/Eigen3/Eigen/src/Core/ProductBase.h
+++ b/extern/Eigen3/Eigen/src/Core/ProductBase.h
@@ -152,7 +152,8 @@ class ProductBase : public MatrixBase<Derived>
#else
EIGEN_STATIC_ASSERT_SIZE_1x1(Derived)
eigen_assert(this->rows() == 1 && this->cols() == 1);
- return derived().coeff(row,col);
+ Matrix<Scalar,1,1> result = *this;
+ return result.coeff(row,col);
#endif
}
@@ -160,7 +161,8 @@ class ProductBase : public MatrixBase<Derived>
{
EIGEN_STATIC_ASSERT_SIZE_1x1(Derived)
eigen_assert(this->rows() == 1 && this->cols() == 1);
- return derived().coeff(i);
+ Matrix<Scalar,1,1> result = *this;
+ return result.coeff(i);
}
const Scalar& coeffRef(Index row, Index col) const
@@ -256,16 +258,16 @@ class ScaledProduct
: Base(prod.lhs(),prod.rhs()), m_prod(prod), m_alpha(x) {}
template<typename Dest>
- inline void evalTo(Dest& dst) const { dst.setZero(); scaleAndAddTo(dst,m_alpha); }
+ inline void evalTo(Dest& dst) const { dst.setZero(); scaleAndAddTo(dst, Scalar(1)); }
template<typename Dest>
- inline void addTo(Dest& dst) const { scaleAndAddTo(dst,m_alpha); }
+ inline void addTo(Dest& dst) const { scaleAndAddTo(dst, Scalar(1)); }
template<typename Dest>
- inline void subTo(Dest& dst) const { scaleAndAddTo(dst,-m_alpha); }
+ inline void subTo(Dest& dst) const { scaleAndAddTo(dst, Scalar(-1)); }
template<typename Dest>
- inline void scaleAndAddTo(Dest& dst,Scalar alpha) const { m_prod.derived().scaleAndAddTo(dst,alpha); }
+ inline void scaleAndAddTo(Dest& dst,Scalar alpha) const { m_prod.derived().scaleAndAddTo(dst,alpha * m_alpha); }
const Scalar& alpha() const { return m_alpha; }
diff --git a/extern/Eigen3/Eigen/src/Core/Replicate.h b/extern/Eigen3/Eigen/src/Core/Replicate.h
index d2f9712db0f..4c171f8d580 100644
--- a/extern/Eigen3/Eigen/src/Core/Replicate.h
+++ b/extern/Eigen3/Eigen/src/Core/Replicate.h
@@ -48,7 +48,10 @@ struct traits<Replicate<MatrixType,RowFactor,ColFactor> >
typedef typename MatrixType::Scalar Scalar;
typedef typename traits<MatrixType>::StorageKind StorageKind;
typedef typename traits<MatrixType>::XprKind XprKind;
- typedef typename nested<MatrixType>::type MatrixTypeNested;
+ enum {
+ Factor = (RowFactor==Dynamic || ColFactor==Dynamic) ? Dynamic : RowFactor*ColFactor
+ };
+ typedef typename nested<MatrixType,Factor>::type MatrixTypeNested;
typedef typename remove_reference<MatrixTypeNested>::type _MatrixTypeNested;
enum {
RowsAtCompileTime = RowFactor==Dynamic || int(MatrixType::RowsAtCompileTime)==Dynamic
@@ -72,6 +75,8 @@ struct traits<Replicate<MatrixType,RowFactor,ColFactor> >
template<typename MatrixType,int RowFactor,int ColFactor> class Replicate
: public internal::dense_xpr_base< Replicate<MatrixType,RowFactor,ColFactor> >::type
{
+ typedef typename internal::traits<Replicate>::MatrixTypeNested MatrixTypeNested;
+ typedef typename internal::traits<Replicate>::_MatrixTypeNested _MatrixTypeNested;
public:
typedef typename internal::dense_xpr_base<Replicate>::type Base;
@@ -124,7 +129,7 @@ template<typename MatrixType,int RowFactor,int ColFactor> class Replicate
protected:
- const typename MatrixType::Nested m_matrix;
+ const MatrixTypeNested m_matrix;
const internal::variable_if_dynamic<Index, RowFactor> m_rowFactor;
const internal::variable_if_dynamic<Index, ColFactor> m_colFactor;
};
diff --git a/extern/Eigen3/Eigen/src/Core/SolveTriangular.h b/extern/Eigen3/Eigen/src/Core/SolveTriangular.h
index 71e129c7f12..a23014a343f 100644
--- a/extern/Eigen3/Eigen/src/Core/SolveTriangular.h
+++ b/extern/Eigen3/Eigen/src/Core/SolveTriangular.h
@@ -180,7 +180,7 @@ void TriangularView<MatrixType,Mode>::solveInPlace(const MatrixBase<OtherDerived
eigen_assert(cols() == rows());
eigen_assert( (Side==OnTheLeft && cols() == other.rows()) || (Side==OnTheRight && cols() == other.cols()) );
eigen_assert(!(Mode & ZeroDiag));
- eigen_assert(Mode & (Upper|Lower));
+ eigen_assert((Mode & (Upper|Lower)) != 0);
enum { copy = internal::traits<OtherDerived>::Flags & RowMajorBit && OtherDerived::IsVectorAtCompileTime };
typedef typename internal::conditional<copy,
diff --git a/extern/Eigen3/Eigen/src/Core/arch/NEON/Complex.h b/extern/Eigen3/Eigen/src/Core/arch/NEON/Complex.h
index 8e55548c946..212887184c2 100644
--- a/extern/Eigen3/Eigen/src/Core/arch/NEON/Complex.h
+++ b/extern/Eigen3/Eigen/src/Core/arch/NEON/Complex.h
@@ -27,8 +27,8 @@
namespace internal {
-static uint32x4_t p4ui_CONJ_XOR = { 0x00000000, 0x80000000, 0x00000000, 0x80000000 };
-static uint32x2_t p2ui_CONJ_XOR = { 0x00000000, 0x80000000 };
+static uint32x4_t p4ui_CONJ_XOR = EIGEN_INIT_NEON_PACKET4(0x00000000, 0x80000000, 0x00000000, 0x80000000);
+static uint32x2_t p2ui_CONJ_XOR = EIGEN_INIT_NEON_PACKET2(0x00000000, 0x80000000);
//---------- float ----------
struct Packet2cf
diff --git a/extern/Eigen3/Eigen/src/Core/arch/NEON/PacketMath.h b/extern/Eigen3/Eigen/src/Core/arch/NEON/PacketMath.h
index 478ef8038c0..6c7cd159097 100644
--- a/extern/Eigen3/Eigen/src/Core/arch/NEON/PacketMath.h
+++ b/extern/Eigen3/Eigen/src/Core/arch/NEON/PacketMath.h
@@ -52,6 +52,16 @@ typedef uint32x4_t Packet4ui;
#define _EIGEN_DECLARE_CONST_Packet4i(NAME,X) \
const Packet4i p4i_##NAME = pset1<Packet4i>(X)
+#if defined(__llvm__) && !defined(__clang__)
+ //Special treatment for Apple's llvm-gcc, its NEON packet types are unions
+ #define EIGEN_INIT_NEON_PACKET2(X, Y) {{X, Y}}
+ #define EIGEN_INIT_NEON_PACKET4(X, Y, Z, W) {{X, Y, Z, W}}
+#else
+ //Default initializer for packets
+ #define EIGEN_INIT_NEON_PACKET2(X, Y) {X, Y}
+ #define EIGEN_INIT_NEON_PACKET4(X, Y, Z, W) {X, Y, Z, W}
+#endif
+
#ifndef __pld
#define __pld(x) asm volatile ( " pld [%[addr]]\n" :: [addr] "r" (x) : "cc" );
#endif
@@ -84,7 +94,7 @@ template<> struct packet_traits<int> : default_packet_traits
};
};
-#if EIGEN_GNUC_AT_MOST(4,4)
+#if EIGEN_GNUC_AT_MOST(4,4) && !defined(__llvm__)
// workaround gcc 4.2, 4.3 and 4.4 compilatin issue
EIGEN_STRONG_INLINE float32x4_t vld1q_f32(const float* x) { return ::vld1q_f32((const float32_t*)x); }
EIGEN_STRONG_INLINE float32x2_t vld1_f32 (const float* x) { return ::vld1_f32 ((const float32_t*)x); }
@@ -100,12 +110,12 @@ template<> EIGEN_STRONG_INLINE Packet4i pset1<Packet4i>(const int& from) {
template<> EIGEN_STRONG_INLINE Packet4f plset<float>(const float& a)
{
- Packet4f countdown = { 0, 1, 2, 3 };
+ Packet4f countdown = EIGEN_INIT_NEON_PACKET4(0, 1, 2, 3);
return vaddq_f32(pset1<Packet4f>(a), countdown);
}
template<> EIGEN_STRONG_INLINE Packet4i plset<int>(const int& a)
{
- Packet4i countdown = { 0, 1, 2, 3 };
+ Packet4i countdown = EIGEN_INIT_NEON_PACKET4(0, 1, 2, 3);
return vaddq_s32(pset1<Packet4i>(a), countdown);
}
@@ -395,25 +405,29 @@ template<> EIGEN_STRONG_INLINE int predux_max<Packet4i>(const Packet4i& a)
return s[0];
}
-template<int Offset>
-struct palign_impl<Offset,Packet4f>
-{
- EIGEN_STRONG_INLINE static void run(Packet4f& first, const Packet4f& second)
- {
- if (Offset!=0)
- first = vextq_f32(first, second, Offset);
- }
-};
-
-template<int Offset>
-struct palign_impl<Offset,Packet4i>
-{
- EIGEN_STRONG_INLINE static void run(Packet4i& first, const Packet4i& second)
- {
- if (Offset!=0)
- first = vextq_s32(first, second, Offset);
- }
-};
+// this PALIGN_NEON business is to work around a bug in LLVM Clang 3.0 causing incorrect compilation errors,
+// see bug 347 and this LLVM bug: http://llvm.org/bugs/show_bug.cgi?id=11074
+#define PALIGN_NEON(Offset,Type,Command) \
+template<>\
+struct palign_impl<Offset,Type>\
+{\
+ EIGEN_STRONG_INLINE static void run(Type& first, const Type& second)\
+ {\
+ if (Offset!=0)\
+ first = Command(first, second, Offset);\
+ }\
+};\
+
+PALIGN_NEON(0,Packet4f,vextq_f32)
+PALIGN_NEON(1,Packet4f,vextq_f32)
+PALIGN_NEON(2,Packet4f,vextq_f32)
+PALIGN_NEON(3,Packet4f,vextq_f32)
+PALIGN_NEON(0,Packet4i,vextq_s32)
+PALIGN_NEON(1,Packet4i,vextq_s32)
+PALIGN_NEON(2,Packet4i,vextq_s32)
+PALIGN_NEON(3,Packet4i,vextq_s32)
+
+#undef PALIGN_NEON
} // end namespace internal
diff --git a/extern/Eigen3/Eigen/src/Core/products/GeneralBlockPanelKernel.h b/extern/Eigen3/Eigen/src/Core/products/GeneralBlockPanelKernel.h
index 6f3f2717007..cd1c37c780e 100644
--- a/extern/Eigen3/Eigen/src/Core/products/GeneralBlockPanelKernel.h
+++ b/extern/Eigen3/Eigen/src/Core/products/GeneralBlockPanelKernel.h
@@ -30,19 +30,16 @@ namespace internal {
template<typename _LhsScalar, typename _RhsScalar, bool _ConjLhs=false, bool _ConjRhs=false>
class gebp_traits;
+inline std::ptrdiff_t manage_caching_sizes_second_if_negative(std::ptrdiff_t a, std::ptrdiff_t b)
+{
+ return a<=0 ? b : a;
+}
+
/** \internal */
inline void manage_caching_sizes(Action action, std::ptrdiff_t* l1=0, std::ptrdiff_t* l2=0)
{
- static std::ptrdiff_t m_l1CacheSize = 0;
- static std::ptrdiff_t m_l2CacheSize = 0;
- if(m_l1CacheSize==0)
- {
- m_l1CacheSize = queryL1CacheSize();
- m_l2CacheSize = queryTopLevelCacheSize();
-
- if(m_l1CacheSize<=0) m_l1CacheSize = 8 * 1024;
- if(m_l2CacheSize<=0) m_l2CacheSize = 1 * 1024 * 1024;
- }
+ static std::ptrdiff_t m_l1CacheSize = manage_caching_sizes_second_if_negative(queryL1CacheSize(),8 * 1024);
+ static std::ptrdiff_t m_l2CacheSize = manage_caching_sizes_second_if_negative(queryTopLevelCacheSize(),1*1024*1024);
if(action==SetAction)
{
@@ -118,14 +115,14 @@ inline void computeProductBlockingSizes(std::ptrdiff_t& k, std::ptrdiff_t& m, st
// FIXME (a bit overkill maybe ?)
template<typename CJ, typename A, typename B, typename C, typename T> struct gebp_madd_selector {
- EIGEN_STRONG_INLINE EIGEN_ALWAYS_INLINE_ATTRIB static void run(const CJ& cj, A& a, B& b, C& c, T& /*t*/)
+ EIGEN_ALWAYS_INLINE static void run(const CJ& cj, A& a, B& b, C& c, T& /*t*/)
{
c = cj.pmadd(a,b,c);
}
};
template<typename CJ, typename T> struct gebp_madd_selector<CJ,T,T,T,T> {
- EIGEN_STRONG_INLINE EIGEN_ALWAYS_INLINE_ATTRIB static void run(const CJ& cj, T& a, T& b, T& c, T& t)
+ EIGEN_ALWAYS_INLINE static void run(const CJ& cj, T& a, T& b, T& c, T& t)
{
t = b; t = cj.pmul(a,t); c = padd(c,t);
}
diff --git a/extern/Eigen3/Eigen/src/Core/util/Macros.h b/extern/Eigen3/Eigen/src/Core/util/Macros.h
index 6c3f1e421f0..b7c2b79af92 100644
--- a/extern/Eigen3/Eigen/src/Core/util/Macros.h
+++ b/extern/Eigen3/Eigen/src/Core/util/Macros.h
@@ -1,3 +1,4 @@
+
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
@@ -28,7 +29,7 @@
#define EIGEN_WORLD_VERSION 3
#define EIGEN_MAJOR_VERSION 0
-#define EIGEN_MINOR_VERSION 2
+#define EIGEN_MINOR_VERSION 5
#define EIGEN_VERSION_AT_LEAST(x,y,z) (EIGEN_WORLD_VERSION>x || (EIGEN_WORLD_VERSION>=x && \
(EIGEN_MAJOR_VERSION>y || (EIGEN_MAJOR_VERSION>=y && \
@@ -45,7 +46,7 @@
#define EIGEN_GNUC_AT_MOST(x,y) 0
#endif
-#if EIGEN_GNUC_AT_MOST(4,3)
+#if EIGEN_GNUC_AT_MOST(4,3) && !defined(__clang__)
// see bug 89
#define EIGEN_SAFE_TO_USE_STANDARD_ASSERT_MACRO 0
#else
@@ -130,31 +131,34 @@
#define EIGEN_MAKESTRING2(a) #a
#define EIGEN_MAKESTRING(a) EIGEN_MAKESTRING2(a)
-// EIGEN_ALWAYS_INLINE_ATTRIB should be use in the declaration of function
-// which should be inlined even in debug mode.
-// FIXME with the always_inline attribute,
-// gcc 3.4.x reports the following compilation error:
-// Eval.h:91: sorry, unimplemented: inlining failed in call to 'const Eigen::Eval<Derived> Eigen::MatrixBase<Scalar, Derived>::eval() const'
-// : function body not available
-#if EIGEN_GNUC_AT_LEAST(4,0)
-#define EIGEN_ALWAYS_INLINE_ATTRIB __attribute__((always_inline))
-#else
-#define EIGEN_ALWAYS_INLINE_ATTRIB
-#endif
-
#if EIGEN_GNUC_AT_LEAST(4,1) && !defined(__clang__) && !defined(__INTEL_COMPILER)
#define EIGEN_FLATTEN_ATTRIB __attribute__((flatten))
#else
#define EIGEN_FLATTEN_ATTRIB
#endif
-// EIGEN_FORCE_INLINE means "inline as much as possible"
+// EIGEN_STRONG_INLINE is a stronger version of the inline, using __forceinline on MSVC,
+// but it still doesn't use GCC's always_inline. This is useful in (common) situations where MSVC needs forceinline
+// but GCC is still doing fine with just inline.
#if (defined _MSC_VER) || (defined __INTEL_COMPILER)
#define EIGEN_STRONG_INLINE __forceinline
#else
#define EIGEN_STRONG_INLINE inline
#endif
+// EIGEN_ALWAYS_INLINE is the stronget, it has the effect of making the function inline and adding every possible
+// attribute to maximize inlining. This should only be used when really necessary: in particular,
+// it uses __attribute__((always_inline)) on GCC, which most of the time is useless and can severely harm compile times.
+// FIXME with the always_inline attribute,
+// gcc 3.4.x reports the following compilation error:
+// Eval.h:91: sorry, unimplemented: inlining failed in call to 'const Eigen::Eval<Derived> Eigen::MatrixBase<Scalar, Derived>::eval() const'
+// : function body not available
+#if EIGEN_GNUC_AT_LEAST(4,0)
+#define EIGEN_ALWAYS_INLINE __attribute__((always_inline)) inline
+#else
+#define EIGEN_ALWAYS_INLINE EIGEN_STRONG_INLINE
+#endif
+
#if (defined __GNUC__)
#define EIGEN_DONT_INLINE __attribute__((noinline))
#elif (defined _MSC_VER)
@@ -249,7 +253,7 @@
#define EIGEN_UNUSED_VARIABLE(var) (void)var;
#if (defined __GNUC__)
-#define EIGEN_ASM_COMMENT(X) asm("#"X)
+#define EIGEN_ASM_COMMENT(X) asm("#" X)
#else
#define EIGEN_ASM_COMMENT(X)
#endif
diff --git a/extern/Eigen3/Eigen/src/Core/util/Memory.h b/extern/Eigen3/Eigen/src/Core/util/Memory.h
index a580b95ad0d..023716dc9e0 100644
--- a/extern/Eigen3/Eigen/src/Core/util/Memory.h
+++ b/extern/Eigen3/Eigen/src/Core/util/Memory.h
@@ -82,6 +82,16 @@
namespace internal {
+inline void throw_std_bad_alloc()
+{
+ #ifdef EIGEN_EXCEPTIONS
+ throw std::bad_alloc();
+ #else
+ std::size_t huge = -1;
+ new int[huge];
+ #endif
+}
+
/*****************************************************************************
*** Implementation of handmade aligned functions ***
*****************************************************************************/
@@ -192,7 +202,7 @@ inline void check_that_malloc_is_allowed()
#endif
/** \internal Allocates \a size bytes. The returned pointer is guaranteed to have 16 bytes alignment.
- * On allocation error, the returned pointer is null, and if exceptions are enabled then a std::bad_alloc is thrown.
+ * On allocation error, the returned pointer is null, and std::bad_alloc is thrown.
*/
inline void* aligned_malloc(size_t size)
{
@@ -213,10 +223,9 @@ inline void* aligned_malloc(size_t size)
result = handmade_aligned_malloc(size);
#endif
- #ifdef EIGEN_EXCEPTIONS
- if(result == 0)
- throw std::bad_alloc();
- #endif
+ if(!result && size)
+ throw_std_bad_alloc();
+
return result;
}
@@ -241,7 +250,7 @@ inline void aligned_free(void *ptr)
/**
* \internal
* \brief Reallocates an aligned block of memory.
-* \throws std::bad_alloc if EIGEN_EXCEPTIONS are defined.
+* \throws std::bad_alloc on allocation failure
**/
inline void* aligned_realloc(void *ptr, size_t new_size, size_t old_size)
{
@@ -269,10 +278,9 @@ inline void* aligned_realloc(void *ptr, size_t new_size, size_t old_size)
result = handmade_aligned_realloc(ptr,new_size,old_size);
#endif
-#ifdef EIGEN_EXCEPTIONS
- if (result==0 && new_size!=0)
- throw std::bad_alloc();
-#endif
+ if (!result && new_size)
+ throw_std_bad_alloc();
+
return result;
}
@@ -281,7 +289,7 @@ inline void* aligned_realloc(void *ptr, size_t new_size, size_t old_size)
*****************************************************************************/
/** \internal Allocates \a size bytes. If Align is true, then the returned ptr is 16-byte-aligned.
- * On allocation error, the returned pointer is null, and if exceptions are enabled then a std::bad_alloc is thrown.
+ * On allocation error, the returned pointer is null, and a std::bad_alloc is thrown.
*/
template<bool Align> inline void* conditional_aligned_malloc(size_t size)
{
@@ -293,9 +301,8 @@ template<> inline void* conditional_aligned_malloc<false>(size_t size)
check_that_malloc_is_allowed();
void *result = std::malloc(size);
- #ifdef EIGEN_EXCEPTIONS
- if(!result) throw std::bad_alloc();
- #endif
+ if(!result && size)
+ throw_std_bad_alloc();
return result;
}
@@ -347,18 +354,27 @@ template<typename T> inline void destruct_elements_of_array(T *ptr, size_t size)
*** Implementation of aligned new/delete-like functions ***
*****************************************************************************/
+template<typename T>
+EIGEN_ALWAYS_INLINE void check_size_for_overflow(size_t size)
+{
+ if(size > size_t(-1) / sizeof(T))
+ throw_std_bad_alloc();
+}
+
/** \internal Allocates \a size objects of type T. The returned pointer is guaranteed to have 16 bytes alignment.
- * On allocation error, the returned pointer is undefined, but if exceptions are enabled then a std::bad_alloc is thrown.
+ * On allocation error, the returned pointer is undefined, but a std::bad_alloc is thrown.
* The default constructor of T is called.
*/
template<typename T> inline T* aligned_new(size_t size)
{
+ check_size_for_overflow<T>(size);
T *result = reinterpret_cast<T*>(aligned_malloc(sizeof(T)*size));
return construct_elements_of_array(result, size);
}
template<typename T, bool Align> inline T* conditional_aligned_new(size_t size)
{
+ check_size_for_overflow<T>(size);
T *result = reinterpret_cast<T*>(conditional_aligned_malloc<Align>(sizeof(T)*size));
return construct_elements_of_array(result, size);
}
@@ -383,6 +399,8 @@ template<typename T, bool Align> inline void conditional_aligned_delete(T *ptr,
template<typename T, bool Align> inline T* conditional_aligned_realloc_new(T* pts, size_t new_size, size_t old_size)
{
+ check_size_for_overflow<T>(new_size);
+ check_size_for_overflow<T>(old_size);
if(new_size < old_size)
destruct_elements_of_array(pts+new_size, old_size-new_size);
T *result = reinterpret_cast<T*>(conditional_aligned_realloc<Align>(reinterpret_cast<void*>(pts), sizeof(T)*new_size, sizeof(T)*old_size));
@@ -394,6 +412,7 @@ template<typename T, bool Align> inline T* conditional_aligned_realloc_new(T* pt
template<typename T, bool Align> inline T* conditional_aligned_new_auto(size_t size)
{
+ check_size_for_overflow<T>(size);
T *result = reinterpret_cast<T*>(conditional_aligned_malloc<Align>(sizeof(T)*size));
if(NumTraits<T>::RequireInitialization)
construct_elements_of_array(result, size);
@@ -402,6 +421,8 @@ template<typename T, bool Align> inline T* conditional_aligned_new_auto(size_t s
template<typename T, bool Align> inline T* conditional_aligned_realloc_new_auto(T* pts, size_t new_size, size_t old_size)
{
+ check_size_for_overflow<T>(new_size);
+ check_size_for_overflow<T>(old_size);
if(NumTraits<T>::RequireInitialization && (new_size < old_size))
destruct_elements_of_array(pts+new_size, old_size-new_size);
T *result = reinterpret_cast<T*>(conditional_aligned_realloc<Align>(reinterpret_cast<void*>(pts), sizeof(T)*new_size, sizeof(T)*old_size));
@@ -536,6 +557,7 @@ template<typename T> class aligned_stack_memory_handler
#endif
#define ei_declare_aligned_stack_constructed_variable(TYPE,NAME,SIZE,BUFFER) \
+ Eigen::internal::check_size_for_overflow<TYPE>(SIZE); \
TYPE* NAME = (BUFFER)!=0 ? (BUFFER) \
: reinterpret_cast<TYPE*>( \
(sizeof(TYPE)*SIZE<=EIGEN_STACK_ALLOCATION_LIMIT) ? EIGEN_ALIGNED_ALLOCA(sizeof(TYPE)*SIZE) \
@@ -545,6 +567,7 @@ template<typename T> class aligned_stack_memory_handler
#else
#define ei_declare_aligned_stack_constructed_variable(TYPE,NAME,SIZE,BUFFER) \
+ Eigen::internal::check_size_for_overflow<TYPE>(SIZE); \
TYPE* NAME = (BUFFER)!=0 ? BUFFER : reinterpret_cast<TYPE*>(Eigen::internal::aligned_malloc(sizeof(TYPE)*SIZE)); \
Eigen::internal::aligned_stack_memory_handler<TYPE> EIGEN_CAT(NAME,_stack_memory_destructor)((BUFFER)==0 ? NAME : 0,SIZE,true)
@@ -669,6 +692,7 @@ public:
pointer allocate( size_type num, const void* hint = 0 )
{
EIGEN_UNUSED_VARIABLE(hint);
+ internal::check_size_for_overflow<T>(num);
return static_cast<pointer>( internal::aligned_malloc( num * sizeof(T) ) );
}
diff --git a/extern/Eigen3/Eigen/src/Core/util/XprHelper.h b/extern/Eigen3/Eigen/src/Core/util/XprHelper.h
index 9047c5f8350..c2078f13786 100644
--- a/extern/Eigen3/Eigen/src/Core/util/XprHelper.h
+++ b/extern/Eigen3/Eigen/src/Core/util/XprHelper.h
@@ -125,10 +125,9 @@ class compute_matrix_flags
aligned_bit =
(
((Options&DontAlign)==0)
- && packet_traits<Scalar>::Vectorizable
&& (
#if EIGEN_ALIGN_STATICALLY
- ((!is_dynamic_size_storage) && (((MaxCols*MaxRows) % packet_traits<Scalar>::size) == 0))
+ ((!is_dynamic_size_storage) && (((MaxCols*MaxRows*int(sizeof(Scalar))) % 16) == 0))
#else
0
#endif
diff --git a/extern/Eigen3/Eigen/src/Eigenvalues/EigenSolver.h b/extern/Eigen3/Eigen/src/Eigenvalues/EigenSolver.h
index ac4c4242dd4..f57353c065f 100644
--- a/extern/Eigen3/Eigen/src/Eigenvalues/EigenSolver.h
+++ b/extern/Eigen3/Eigen/src/Eigenvalues/EigenSolver.h
@@ -291,7 +291,7 @@ template<typename _MatrixType> class EigenSolver
ComputationInfo info() const
{
- eigen_assert(m_isInitialized && "ComplexEigenSolver is not initialized.");
+ eigen_assert(m_isInitialized && "EigenSolver is not initialized.");
return m_realSchur.info();
}
@@ -339,7 +339,7 @@ typename EigenSolver<MatrixType>::EigenvectorsType EigenSolver<MatrixType>::eige
EigenvectorsType matV(n,n);
for (Index j=0; j<n; ++j)
{
- if (internal::isMuchSmallerThan(internal::imag(m_eivalues.coeff(j)), internal::real(m_eivalues.coeff(j))))
+ if (internal::isMuchSmallerThan(internal::imag(m_eivalues.coeff(j)), internal::real(m_eivalues.coeff(j))) || j+1==n)
{
// we have a real eigen value
matV.col(j) = m_eivec.col(j).template cast<ComplexScalar>();
@@ -570,10 +570,13 @@ void EigenSolver<MatrixType>::doComputeEigenvectors()
}
}
+
+ // We handled a pair of complex conjugate eigenvalues, so need to skip them both
+ n--;
}
else
{
- eigen_assert("Internal bug in EigenSolver"); // this should not happen
+ eigen_assert(0 && "Internal bug in EigenSolver"); // this should not happen
}
}
diff --git a/extern/Eigen3/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h b/extern/Eigen3/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h
index 965dda88bda..ad107c63282 100644
--- a/extern/Eigen3/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h
+++ b/extern/Eigen3/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h
@@ -307,7 +307,8 @@ template<typename _MatrixType> class SelfAdjointEigenSolver
/** \brief Maximum number of iterations.
*
- * Maximum number of iterations allowed for an eigenvalue to converge.
+ * The algorithm terminates if it does not converge within m_maxIterations * n iterations, where n
+ * denotes the size of the matrix. This value is currently set to 30 (copied from LAPACK).
*/
static const int m_maxIterations = 30;
@@ -407,7 +408,7 @@ SelfAdjointEigenSolver<MatrixType>& SelfAdjointEigenSolver<MatrixType>
Index end = n-1;
Index start = 0;
- Index iter = 0; // number of iterations we are working on one element
+ Index iter = 0; // total number of iterations
while (end>0)
{
@@ -418,15 +419,14 @@ SelfAdjointEigenSolver<MatrixType>& SelfAdjointEigenSolver<MatrixType>
// find the largest unreduced block
while (end>0 && m_subdiag[end-1]==0)
{
- iter = 0;
end--;
}
if (end<=0)
break;
- // if we spent too many iterations on the current element, we give up
+ // if we spent too many iterations, we give up
iter++;
- if(iter > m_maxIterations) break;
+ if(iter > m_maxIterations * n) break;
start = end - 1;
while (start>0 && m_subdiag[start-1]!=0)
@@ -435,7 +435,7 @@ SelfAdjointEigenSolver<MatrixType>& SelfAdjointEigenSolver<MatrixType>
internal::tridiagonal_qr_step<MatrixType::Flags&RowMajorBit ? RowMajor : ColMajor>(diag.data(), m_subdiag.data(), start, end, computeEigenvectors ? m_eivec.data() : (Scalar*)0, n);
}
- if (iter <= m_maxIterations)
+ if (iter <= m_maxIterations * n)
m_info = Success;
else
m_info = NoConvergence;
diff --git a/extern/Eigen3/Eigen/src/Geometry/Hyperplane.h b/extern/Eigen3/Eigen/src/Geometry/Hyperplane.h
index eb0a5877168..d85d3e553f8 100644
--- a/extern/Eigen3/Eigen/src/Geometry/Hyperplane.h
+++ b/extern/Eigen3/Eigen/src/Geometry/Hyperplane.h
@@ -225,7 +225,7 @@ public:
normal() = mat * normal();
else
{
- eigen_assert("invalid traits value in Hyperplane::transform()");
+ eigen_assert(0 && "invalid traits value in Hyperplane::transform()");
}
return *this;
}
diff --git a/extern/Eigen3/Eigen/src/Geometry/Quaternion.h b/extern/Eigen3/Eigen/src/Geometry/Quaternion.h
index 2662d60fed1..9180db67d84 100644
--- a/extern/Eigen3/Eigen/src/Geometry/Quaternion.h
+++ b/extern/Eigen3/Eigen/src/Geometry/Quaternion.h
@@ -182,10 +182,9 @@ public:
template<typename NewScalarType>
inline typename internal::cast_return_type<Derived,Quaternion<NewScalarType> >::type cast() const
{
- return typename internal::cast_return_type<Derived,Quaternion<NewScalarType> >::type(
- coeffs().template cast<NewScalarType>());
+ return typename internal::cast_return_type<Derived,Quaternion<NewScalarType> >::type(derived());
}
-
+
#ifdef EIGEN_QUATERNIONBASE_PLUGIN
# include EIGEN_QUATERNIONBASE_PLUGIN
#endif
@@ -225,22 +224,25 @@ struct traits<Quaternion<_Scalar,_Options> >
typedef _Scalar Scalar;
typedef Matrix<_Scalar,4,1,_Options> Coefficients;
enum{
- IsAligned = bool(EIGEN_ALIGN) && ((int(_Options)&Aligned)==Aligned),
+ IsAligned = internal::traits<Coefficients>::Flags & AlignedBit,
Flags = IsAligned ? (AlignedBit | LvalueBit) : LvalueBit
};
};
}
template<typename _Scalar, int _Options>
-class Quaternion : public QuaternionBase<Quaternion<_Scalar,_Options> >{
+class Quaternion : public QuaternionBase<Quaternion<_Scalar,_Options> >
+{
typedef QuaternionBase<Quaternion<_Scalar,_Options> > Base;
+ enum { IsAligned = internal::traits<Quaternion>::IsAligned };
+
public:
typedef _Scalar Scalar;
EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Quaternion)
using Base::operator*=;
- typedef typename internal::traits<Quaternion<Scalar,_Options> >::Coefficients Coefficients;
+ typedef typename internal::traits<Quaternion>::Coefficients Coefficients;
typedef typename Base::AngleAxisType AngleAxisType;
/** Default constructor leaving the quaternion uninitialized. */
@@ -271,9 +273,16 @@ public:
template<typename Derived>
explicit inline Quaternion(const MatrixBase<Derived>& other) { *this = other; }
+ /** Explicit copy constructor with scalar conversion */
+ template<typename OtherScalar, int OtherOptions>
+ explicit inline Quaternion(const Quaternion<OtherScalar, OtherOptions>& other)
+ { m_coeffs = other.coeffs().template cast<Scalar>(); }
+
inline Coefficients& coeffs() { return m_coeffs;}
inline const Coefficients& coeffs() const { return m_coeffs;}
+ EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(IsAligned)
+
protected:
Coefficients m_coeffs;
@@ -673,7 +682,7 @@ QuaternionBase<Derived>::slerp(Scalar t, const QuaternionBase<OtherDerived>& oth
Scalar scale0;
Scalar scale1;
- if (absD>=one)
+ if(absD>=one)
{
scale0 = Scalar(1) - t;
scale1 = t;
@@ -686,9 +695,8 @@ QuaternionBase<Derived>::slerp(Scalar t, const QuaternionBase<OtherDerived>& oth
scale0 = internal::sin( ( Scalar(1) - t ) * theta) / sinTheta;
scale1 = internal::sin( ( t * theta) ) / sinTheta;
- if (d<0)
- scale1 = -scale1;
}
+ if(d<0) scale1 = -scale1;
return Quaternion<Scalar>(scale0 * coeffs() + scale1 * other.coeffs());
}
diff --git a/extern/Eigen3/Eigen/src/Geometry/Rotation2D.h b/extern/Eigen3/Eigen/src/Geometry/Rotation2D.h
index e1214bd3ebb..cf36da1c50c 100644
--- a/extern/Eigen3/Eigen/src/Geometry/Rotation2D.h
+++ b/extern/Eigen3/Eigen/src/Geometry/Rotation2D.h
@@ -89,7 +89,7 @@ public:
/** Concatenates two rotations */
inline Rotation2D& operator*=(const Rotation2D& other)
- { return m_angle += other.m_angle; return *this; }
+ { m_angle += other.m_angle; return *this; }
/** Applies the rotation to a 2D vector */
Vector2 operator* (const Vector2& vec) const
diff --git a/extern/Eigen3/Eigen/src/Geometry/Transform.h b/extern/Eigen3/Eigen/src/Geometry/Transform.h
index 19d012572d4..a694673ebed 100644
--- a/extern/Eigen3/Eigen/src/Geometry/Transform.h
+++ b/extern/Eigen3/Eigen/src/Geometry/Transform.h
@@ -61,7 +61,7 @@ template< typename Lhs,
typename Rhs,
bool AnyProjective =
transform_traits<Lhs>::IsProjective ||
- transform_traits<Lhs>::IsProjective>
+ transform_traits<Rhs>::IsProjective>
struct transform_transform_product_impl;
template< typename Other,
@@ -1391,6 +1391,35 @@ struct transform_transform_product_impl<Transform<Scalar,Dim,LhsMode,LhsOptions>
}
};
+template<typename Scalar, int Dim, int LhsOptions, int RhsOptions>
+struct transform_transform_product_impl<Transform<Scalar,Dim,AffineCompact,LhsOptions>,Transform<Scalar,Dim,Projective,RhsOptions>,true >
+{
+ typedef Transform<Scalar,Dim,AffineCompact,LhsOptions> Lhs;
+ typedef Transform<Scalar,Dim,Projective,RhsOptions> Rhs;
+ typedef Transform<Scalar,Dim,Projective> ResultType;
+ static ResultType run(const Lhs& lhs, const Rhs& rhs)
+ {
+ ResultType res;
+ res.matrix().template topRows<Dim>() = lhs.matrix() * rhs.matrix();
+ res.matrix().row(Dim) = rhs.matrix().row(Dim);
+ return res;
+ }
+};
+
+template<typename Scalar, int Dim, int LhsOptions, int RhsOptions>
+struct transform_transform_product_impl<Transform<Scalar,Dim,Projective,LhsOptions>,Transform<Scalar,Dim,AffineCompact,RhsOptions>,true >
+{
+ typedef Transform<Scalar,Dim,Projective,LhsOptions> Lhs;
+ typedef Transform<Scalar,Dim,AffineCompact,RhsOptions> Rhs;
+ typedef Transform<Scalar,Dim,Projective> ResultType;
+ static ResultType run(const Lhs& lhs, const Rhs& rhs)
+ {
+ ResultType res(lhs.matrix().template leftCols<Dim>() * rhs.matrix());
+ res.matrix().col(Dim) += lhs.matrix().col(Dim);
+ return res;
+ }
+};
+
} // end namespace internal
#endif // EIGEN_TRANSFORM_H
diff --git a/extern/Eigen3/Eigen/src/Geometry/arch/Geometry_SSE.h b/extern/Eigen3/Eigen/src/Geometry/arch/Geometry_SSE.h
index cbe695c7259..2af32678d1c 100644
--- a/extern/Eigen3/Eigen/src/Geometry/arch/Geometry_SSE.h
+++ b/extern/Eigen3/Eigen/src/Geometry/arch/Geometry_SSE.h
@@ -96,7 +96,7 @@ struct quat_product<Architecture::SSE, Derived, OtherDerived, double, Aligned>
*/
t1 = padd(pmul(a_ww, b_xy), pmul(a_yy, b_zw));
t2 = psub(pmul(a_zz, b_xy), pmul(a_xx, b_zw));
-#ifdef __SSE3__
+#ifdef EIGEN_VECTORIZE_SSE3
EIGEN_UNUSED_VARIABLE(mask)
pstore(&res.x(), _mm_addsub_pd(t1, preverse(t2)));
#else
@@ -110,7 +110,7 @@ struct quat_product<Architecture::SSE, Derived, OtherDerived, double, Aligned>
*/
t1 = psub(pmul(a_ww, b_zw), pmul(a_yy, b_xy));
t2 = padd(pmul(a_zz, b_zw), pmul(a_xx, b_xy));
-#ifdef __SSE3__
+#ifdef EIGEN_VECTORIZE_SSE3
EIGEN_UNUSED_VARIABLE(mask)
pstore(&res.z(), preverse(_mm_addsub_pd(preverse(t1), t2)));
#else
diff --git a/extern/Eigen3/Eigen/src/LU/FullPivLU.h b/extern/Eigen3/Eigen/src/LU/FullPivLU.h
index 633fb23fdbe..46ae7d651c8 100644
--- a/extern/Eigen3/Eigen/src/LU/FullPivLU.h
+++ b/extern/Eigen3/Eigen/src/LU/FullPivLU.h
@@ -443,7 +443,6 @@ FullPivLU<MatrixType>& FullPivLU<MatrixType>::compute(const MatrixType& matrix)
m_nonzero_pivots = size; // the generic case is that in which all pivots are nonzero (invertible case)
m_maxpivot = RealScalar(0);
- RealScalar cutoff(0);
for(Index k = 0; k < size; ++k)
{
@@ -458,14 +457,7 @@ FullPivLU<MatrixType>& FullPivLU<MatrixType>::compute(const MatrixType& matrix)
row_of_biggest_in_corner += k; // correct the values! since they were computed in the corner,
col_of_biggest_in_corner += k; // need to add k to them.
- // when k==0, biggest_in_corner is the biggest coeff absolute value in the original matrix
- if(k == 0) cutoff = biggest_in_corner * NumTraits<Scalar>::epsilon();
-
- // if the pivot (hence the corner) is "zero", terminate to avoid generating nan/inf values.
- // Notice that using an exact comparison (biggest_in_corner==0) here, as Golub-van Loan do in
- // their pseudo-code, results in numerical instability! The cutoff here has been validated
- // by running the unit test 'lu' with many repetitions.
- if(biggest_in_corner < cutoff)
+ if(biggest_in_corner==RealScalar(0))
{
// before exiting, make sure to initialize the still uninitialized transpositions
// in a sane state without destroying what we already have.
diff --git a/extern/Eigen3/Eigen/src/LU/arch/Inverse_SSE.h b/extern/Eigen3/Eigen/src/LU/arch/Inverse_SSE.h
index 176c349ce44..4c6153f0aff 100644
--- a/extern/Eigen3/Eigen/src/LU/arch/Inverse_SSE.h
+++ b/extern/Eigen3/Eigen/src/LU/arch/Inverse_SSE.h
@@ -55,7 +55,7 @@ struct compute_inverse_size4<Architecture::SSE, float, MatrixType, ResultType>
static void run(const MatrixType& matrix, ResultType& result)
{
- EIGEN_ALIGN16 const int _Sign_PNNP[4] = { 0x00000000, 0x80000000, 0x80000000, 0x00000000 };
+ EIGEN_ALIGN16 const unsigned int _Sign_PNNP[4] = { 0x00000000, 0x80000000, 0x80000000, 0x00000000 };
// Load the full matrix into registers
__m128 _L1 = matrix.template packet<MatrixAlignment>( 0);
diff --git a/extern/Eigen3/Eigen/src/SVD/JacobiSVD.h b/extern/Eigen3/Eigen/src/SVD/JacobiSVD.h
index 5f61399988c..3c423095c31 100644
--- a/extern/Eigen3/Eigen/src/SVD/JacobiSVD.h
+++ b/extern/Eigen3/Eigen/src/SVD/JacobiSVD.h
@@ -590,6 +590,9 @@ JacobiSVD<MatrixType, QRPreconditioner>::compute(const MatrixType& matrix, unsig
// only worsening the precision of U and V as we accumulate more rotations
const RealScalar precision = RealScalar(2) * NumTraits<Scalar>::epsilon();
+ // limit for very small denormal numbers to be considered zero in order to avoid infinite loops (see bug 286)
+ const RealScalar considerAsZero = RealScalar(2) * std::numeric_limits<RealScalar>::denorm_min();
+
/*** step 1. The R-SVD step: we use a QR decomposition to reduce to the case of a square matrix */
if(!internal::qr_preconditioner_impl<MatrixType, QRPreconditioner, internal::PreconditionIfMoreColsThanRows>::run(*this, matrix)
@@ -617,10 +620,11 @@ JacobiSVD<MatrixType, QRPreconditioner>::compute(const MatrixType& matrix, unsig
{
// if this 2x2 sub-matrix is not diagonal already...
// notice that this comparison will evaluate to false if any NaN is involved, ensuring that NaN's don't
- // keep us iterating forever.
+ // keep us iterating forever. Similarly, small denormal numbers are considered zero.
using std::max;
- if((max)(internal::abs(m_workMatrix.coeff(p,q)),internal::abs(m_workMatrix.coeff(q,p)))
- > (max)(internal::abs(m_workMatrix.coeff(p,p)),internal::abs(m_workMatrix.coeff(q,q)))*precision)
+ RealScalar threshold = (max)(considerAsZero, precision * (max)(internal::abs(m_workMatrix.coeff(p,p)),
+ internal::abs(m_workMatrix.coeff(q,q))));
+ if((max)(internal::abs(m_workMatrix.coeff(p,q)),internal::abs(m_workMatrix.coeff(q,p))) > threshold)
{
finished = false;
@@ -704,6 +708,13 @@ struct solve_retval<JacobiSVD<_MatrixType, QRPreconditioner>, Rhs>
};
} // end namespace internal
+/** \svd_module
+ *
+ * \return the singular value decomposition of \c *this computed by two-sided
+ * Jacobi transformations.
+ *
+ * \sa class JacobiSVD
+ */
template<typename Derived>
JacobiSVD<typename MatrixBase<Derived>::PlainObject>
MatrixBase<Derived>::jacobiSvd(unsigned int computationOptions) const
diff --git a/extern/Eigen3/Eigen/src/Sparse/TriangularSolver.h b/extern/Eigen3/Eigen/src/Sparse/TriangularSolver.h
index 73468e0446c..62bb8bb44c9 100644
--- a/extern/Eigen3/Eigen/src/Sparse/TriangularSolver.h
+++ b/extern/Eigen3/Eigen/src/Sparse/TriangularSolver.h
@@ -171,7 +171,7 @@ void SparseTriangularView<ExpressionType,Mode>::solveInPlace(MatrixBase<OtherDer
eigen_assert(m_matrix.cols() == m_matrix.rows());
eigen_assert(m_matrix.cols() == other.rows());
eigen_assert(!(Mode & ZeroDiag));
- eigen_assert(Mode & (Upper|Lower));
+ eigen_assert((Mode & (Upper|Lower)) != 0);
enum { copy = internal::traits<OtherDerived>::Flags & RowMajorBit };
@@ -298,7 +298,7 @@ void SparseTriangularView<ExpressionType,Mode>::solveInPlace(SparseMatrixBase<Ot
eigen_assert(m_matrix.cols() == m_matrix.rows());
eigen_assert(m_matrix.cols() == other.rows());
eigen_assert(!(Mode & ZeroDiag));
- eigen_assert(Mode & (Upper|Lower));
+ eigen_assert((Mode & (Upper|Lower)) != 0);
// enum { copy = internal::traits<OtherDerived>::Flags & RowMajorBit };
diff --git a/extern/bullet2/patches/MinGW64-nopermissive.patch b/extern/bullet2/patches/MinGW64-nopermissive.patch
deleted file mode 100644
index 915f232f6d7..00000000000
--- a/extern/bullet2/patches/MinGW64-nopermissive.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Index: LinearMath/btSerializer.h
-===================================================================
---- LinearMath/btSerializer.h (revision 45919)
-+++ LinearMath/btSerializer.h (working copy)
-@@ -25,8 +25,15 @@
- #endif
- #include <string.h>
-
-+#if defined(_WIN64)
-+# ifdef __MINGW64__
-+# include <basetsd.h>
-+# endif
-+typedef __int64 int_ptr;
-+#else
-+typedef long int_ptr;
-+#endif
-
--
- ///only the 32bit versions for now
- extern unsigned char sBulletDNAstr[];
- extern int sBulletDNAlen;
-@@ -247,7 +254,7 @@
- cp++;
- }
- {
-- nr= (long)cp;
-+ nr= (int_ptr)cp;
- // long mask=3;
- nr= ((nr+3)&~3)-nr;
- while (nr--)
-@@ -282,7 +289,7 @@
- }
-
- {
-- nr= (long)cp;
-+ nr= (int_ptr)cp;
- // long mask=3;
- nr= ((nr+3)&~3)-nr;
- while (nr--)
diff --git a/extern/bullet2/patches/mingw64_scons.patch b/extern/bullet2/patches/mingw64_scons.patch
deleted file mode 100644
index e63dee3c48c..00000000000
--- a/extern/bullet2/patches/mingw64_scons.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: SConscript
-===================================================================
---- SConscript (revision 45919)
-+++ SConscript (working copy)
-@@ -11,7 +11,7 @@
- defs += ' WIN32 NDEBUG _WINDOWS'
- #cflags += ['/MT', '/W3', '/GX', '/O2', '/Op']
- cflags += ['/MT', '/W3', '/GX', '/Og', '/Ot', '/Ob1', '/Op', '/G6', '/O3', '/EHcs']
--elif env['OURPLATFORM'] in ('win32-mingw', 'linuxcross'):
-+elif env['OURPLATFORM'] in ('win32-mingw', 'linuxcross', 'win64-mingw'):
- defs += ' NDEBUG'
- cflags += ['-O2']
- elif env['OURPLATFORM'] in ('linux', 'freebsd4', 'freebsd5'):
diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h
index 4fdac113378..ab745ca5ad6 100644
--- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h
+++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h
@@ -354,7 +354,7 @@ public:
//! Calcs global transform of the offsets
/*!
- Calcs the global transform for the joint offset for body A an B, and also calcs the agle differences between the bodies.
+ Calcs the global transform for the joint offset for body A an B, and also calcs the angle differences between the bodies.
\sa btGeneric6DofConstraint.getCalculatedTransformA , btGeneric6DofConstraint.getCalculatedTransformB, btGeneric6DofConstraint.calculateAngleInfo
*/
void calculateTransforms(const btTransform& transA,const btTransform& transB);
diff --git a/extern/bullet2/src/LinearMath/btSerializer.h b/extern/bullet2/src/LinearMath/btSerializer.h
index a1e766c95ce..8a89374c612 100644
--- a/extern/bullet2/src/LinearMath/btSerializer.h
+++ b/extern/bullet2/src/LinearMath/btSerializer.h
@@ -25,14 +25,7 @@ subject to the following restrictions:
#endif
#include <string.h>
-#if defined(_WIN64)
-# ifdef __MINGW64__
-# include <basetsd.h>
-# endif
-typedef __int64 int_ptr;
-#else
-typedef long int_ptr;
-#endif
+
///only the 32bit versions for now
extern unsigned char sBulletDNAstr[];
@@ -254,7 +247,7 @@ protected:
cp++;
}
{
- nr= (int_ptr)cp;
+ nr= (long)cp;
// long mask=3;
nr= ((nr+3)&~3)-nr;
while (nr--)
@@ -289,7 +282,7 @@ protected:
}
{
- nr= (int_ptr)cp;
+ nr= (long)cp;
// long mask=3;
nr= ((nr+3)&~3)-nr;
while (nr--)
diff --git a/extern/libmv/CMakeLists.txt b/extern/libmv/CMakeLists.txt
index 02723b64b62..6be813883ec 100644
--- a/extern/libmv/CMakeLists.txt
+++ b/extern/libmv/CMakeLists.txt
@@ -69,6 +69,7 @@ set(SRC
libmv/simple_pipeline/detect.cc
libmv/simple_pipeline/initialize_reconstruction.cc
libmv/simple_pipeline/intersect.cc
+ libmv/simple_pipeline/modal_solver.cc
libmv/simple_pipeline/pipeline.cc
libmv/simple_pipeline/reconstruction.cc
libmv/simple_pipeline/resect.cc
@@ -126,6 +127,7 @@ set(SRC
libmv/simple_pipeline/detect.h
libmv/simple_pipeline/initialize_reconstruction.h
libmv/simple_pipeline/intersect.h
+ libmv/simple_pipeline/modal_solver.h
libmv/simple_pipeline/pipeline.h
libmv/simple_pipeline/reconstruction.h
libmv/simple_pipeline/resect.h
diff --git a/extern/libmv/ChangeLog b/extern/libmv/ChangeLog
index 33068bddf90..7248e4c9cd9 100644
--- a/extern/libmv/ChangeLog
+++ b/extern/libmv/ChangeLog
@@ -1,3 +1,16 @@
+commit a44312a7beb2963b8e3bf8015c516d2eff40cc3d
+Author: Sergey Sharybin <sergey.vfx@gmail.com>
+Date: Thu Apr 12 13:56:02 2012 +0600
+
+ Added solver for modal camera motion, currently supports only tripod solving
+
+ This solver is intended to deal with such camera motions as tripod and panning,
+ where it's impossible to reconstruct exact position of markers in 3d view.
+
+ It projects markers onto sphere and uses rigid registration of rotation to
+ find rotation angles which makes bundles from previous and current frame be
+ as closest as it's possible.
+
commit fa3842e472e3b9c789e47bf6d8f592aa40a84f16
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date: Thu Apr 12 12:32:48 2012 +0600
@@ -520,9 +533,3 @@ Author: Matthias Fauconneau <matthias.fauconneau@gmail.com>
Date: Fri Aug 19 16:04:37 2011 +0200
MSVC compatibility: heap allocate pattern, explicit float cast.
-
-commit 702658d2f8616964a6eeb3743fd85e97ac7ff09d
-Author: Matthias Fauconneau <matthias.fauconneau@gmail.com>
-Date: Fri Aug 19 14:59:24 2011 +0200
-
- Expose regularization parameters (areaPenalty and conditionPenalty) in API.
diff --git a/extern/libmv/files.txt b/extern/libmv/files.txt
index 1e564d3a2f2..85d09ce05b8 100644
--- a/extern/libmv/files.txt
+++ b/extern/libmv/files.txt
@@ -42,6 +42,8 @@ libmv/simple_pipeline/initialize_reconstruction.cc
libmv/simple_pipeline/initialize_reconstruction.h
libmv/simple_pipeline/intersect.cc
libmv/simple_pipeline/intersect.h
+libmv/simple_pipeline/modal_solver.cc
+libmv/simple_pipeline/modal_solver.h
libmv/simple_pipeline/pipeline.cc
libmv/simple_pipeline/pipeline.h
libmv/simple_pipeline/reconstruction.cc
diff --git a/extern/libmv/libmv-capi.cpp b/extern/libmv/libmv-capi.cpp
index e4708e5907d..6c20d76eeac 100644
--- a/extern/libmv/libmv-capi.cpp
+++ b/extern/libmv/libmv-capi.cpp
@@ -54,6 +54,7 @@
#include "libmv/simple_pipeline/pipeline.h"
#include "libmv/simple_pipeline/camera_intrinsics.h"
#include "libmv/simple_pipeline/rigid_registration.h"
+#include "libmv/simple_pipeline/modal_solver.h"
#include <stdlib.h>
#include <assert.h>
@@ -384,6 +385,31 @@ int libmv_refineParametersAreValid(int parameters) {
LIBMV_REFINE_RADIAL_DISTORTION_K1));
}
+void libmv_solveRefineIntrinsics(libmv::Tracks *tracks, libmv::CameraIntrinsics *intrinsics,
+ libmv::EuclideanReconstruction *reconstruction, int refine_intrinsics,
+ reconstruct_progress_update_cb progress_update_callback, void *callback_customdata)
+{
+ /* only a few combinations are supported but trust the caller */
+ int libmv_refine_flags = 0;
+
+ if (refine_intrinsics & LIBMV_REFINE_FOCAL_LENGTH) {
+ libmv_refine_flags |= libmv::BUNDLE_FOCAL_LENGTH;
+ }
+ if (refine_intrinsics & LIBMV_REFINE_PRINCIPAL_POINT) {
+ libmv_refine_flags |= libmv::BUNDLE_PRINCIPAL_POINT;
+ }
+ if (refine_intrinsics & LIBMV_REFINE_RADIAL_DISTORTION_K1) {
+ libmv_refine_flags |= libmv::BUNDLE_RADIAL_K1;
+ }
+ if (refine_intrinsics & LIBMV_REFINE_RADIAL_DISTORTION_K2) {
+ libmv_refine_flags |= libmv::BUNDLE_RADIAL_K2;
+ }
+
+ progress_update_callback(callback_customdata, 1.0, "Refining solution");
+
+ libmv::EuclideanBundleCommonIntrinsics(*(libmv::Tracks *)tracks, libmv_refine_flags,
+ reconstruction, intrinsics);
+}
libmv_Reconstruction *libmv_solveReconstruction(libmv_Tracks *tracks, int keyframe1, int keyframe2,
int refine_intrinsics, double focal_length, double principal_x, double principal_y, double k1, double k2, double k3,
@@ -423,26 +449,45 @@ libmv_Reconstruction *libmv_solveReconstruction(libmv_Tracks *tracks, int keyfra
libmv::EuclideanCompleteReconstruction(normalized_tracks, reconstruction, &update_callback);
if (refine_intrinsics) {
- /* only a few combinations are supported but trust the caller */
- int libmv_refine_flags = 0;
- if (refine_intrinsics & LIBMV_REFINE_FOCAL_LENGTH) {
- libmv_refine_flags |= libmv::BUNDLE_FOCAL_LENGTH;
- }
- if (refine_intrinsics & LIBMV_REFINE_PRINCIPAL_POINT) {
- libmv_refine_flags |= libmv::BUNDLE_PRINCIPAL_POINT;
- }
- if (refine_intrinsics & LIBMV_REFINE_RADIAL_DISTORTION_K1) {
- libmv_refine_flags |= libmv::BUNDLE_RADIAL_K1;
- }
- if (refine_intrinsics & LIBMV_REFINE_RADIAL_DISTORTION_K2) {
- libmv_refine_flags |= libmv::BUNDLE_RADIAL_K2;
- }
+ libmv_solveRefineIntrinsics((libmv::Tracks *)tracks, intrinsics, reconstruction,
+ refine_intrinsics, progress_update_callback, callback_customdata);
+ }
- progress_update_callback(callback_customdata, 1.0, "Refining solution");
- libmv::EuclideanBundleCommonIntrinsics(*(libmv::Tracks *)tracks, libmv_refine_flags,
- reconstruction, intrinsics);
+ progress_update_callback(callback_customdata, 1.0, "Finishing solution");
+ libmv_reconstruction->tracks = *(libmv::Tracks *)tracks;
+ libmv_reconstruction->error = libmv::EuclideanReprojectionError(*(libmv::Tracks *)tracks, *reconstruction, *intrinsics);
+
+ return (libmv_Reconstruction *)libmv_reconstruction;
+}
+
+struct libmv_Reconstruction *libmv_solveModal(struct libmv_Tracks *tracks, double focal_length,
+ double principal_x, double principal_y, double k1, double k2, double k3,
+ reconstruct_progress_update_cb progress_update_callback, void *callback_customdata)
+{
+ /* Invert the camera intrinsics. */
+ libmv::vector<libmv::Marker> markers = ((libmv::Tracks*)tracks)->AllMarkers();
+ libmv_Reconstruction *libmv_reconstruction = new libmv_Reconstruction();
+ libmv::EuclideanReconstruction *reconstruction = &libmv_reconstruction->reconstruction;
+ libmv::CameraIntrinsics *intrinsics = &libmv_reconstruction->intrinsics;
+
+ ReconstructUpdateCallback update_callback =
+ ReconstructUpdateCallback(progress_update_callback, callback_customdata);
+
+ intrinsics->SetFocalLength(focal_length, focal_length);
+ intrinsics->SetPrincipalPoint(principal_x, principal_y);
+ intrinsics->SetRadialDistortion(k1, k2, k3);
+
+ for (int i = 0; i < markers.size(); ++i) {
+ intrinsics->InvertIntrinsics(markers[i].x,
+ markers[i].y,
+ &(markers[i].x),
+ &(markers[i].y));
}
+ libmv::Tracks normalized_tracks(markers);
+
+ libmv::ModalSolver(normalized_tracks, reconstruction, &update_callback);
+
progress_update_callback(callback_customdata, 1.0, "Finishing solution");
libmv_reconstruction->tracks = *(libmv::Tracks *)tracks;
libmv_reconstruction->error = libmv::EuclideanReprojectionError(*(libmv::Tracks *)tracks, *reconstruction, *intrinsics);
diff --git a/extern/libmv/libmv-capi.h b/extern/libmv/libmv-capi.h
index 01019832374..bccc4706832 100644
--- a/extern/libmv/libmv-capi.h
+++ b/extern/libmv/libmv-capi.h
@@ -68,6 +68,9 @@ int libmv_refineParametersAreValid(int parameters);
struct libmv_Reconstruction *libmv_solveReconstruction(struct libmv_Tracks *tracks, int keyframe1, int keyframe2,
int refine_intrinsics, double focal_length, double principal_x, double principal_y, double k1, double k2, double k3,
reconstruct_progress_update_cb progress_update_callback, void *callback_customdata);
+struct libmv_Reconstruction *libmv_solveModal(struct libmv_Tracks *tracks, double focal_length,
+ double principal_x, double principal_y, double k1, double k2, double k3,
+ reconstruct_progress_update_cb progress_update_callback, void *callback_customdata);
int libmv_reporojectionPointForTrack(struct libmv_Reconstruction *libmv_reconstruction, int track, double pos[3]);
double libmv_reporojectionErrorForTrack(struct libmv_Reconstruction *libmv_reconstruction, int track);
double libmv_reporojectionErrorForImage(struct libmv_Reconstruction *libmv_reconstruction, int image);
diff --git a/extern/libmv/libmv/image/correlation.h b/extern/libmv/libmv/image/correlation.h
index 9d6aceecceb..ba64951a167 100644
--- a/extern/libmv/libmv/image/correlation.h
+++ b/extern/libmv/libmv/image/correlation.h
@@ -21,6 +21,7 @@
#ifndef LIBMV_IMAGE_CORRELATION_H
#define LIBMV_IMAGE_CORRELATION_H
+#include "libmv/logging/logging.h"
#include "libmv/image/image.h"
namespace libmv {
@@ -28,7 +29,8 @@ namespace libmv {
inline double PearsonProductMomentCorrelation(Array3Df image_and_gradient1_sampled,
Array3Df image_and_gradient2_sampled,
int width) {
- double sX=0,sY=0,sXX=0,sYY=0,sXY=0;
+ double sX = 0, sY = 0, sXX = 0, sYY = 0, sXY = 0;
+
for (int r = 0; r < width; ++r) {
for (int c = 0; c < width; ++c) {
double x = image_and_gradient1_sampled(r, c, 0);
@@ -40,9 +42,23 @@ inline double PearsonProductMomentCorrelation(Array3Df image_and_gradient1_sampl
sXY += x*y;
}
}
- double N = width*width;
- sX /= N, sY /= N, sXX /= N, sYY /= N, sXY /= N;
- double correlation = (sXY-sX*sY)/sqrt(double((sXX-sX*sX)*(sYY-sY*sY)));
+
+ // Normalize.
+ double N = width * width;
+ sX /= N;
+ sY /= N;
+ sXX /= N;
+ sYY /= N;
+ sXY /= N;
+
+ double var_x = sXX - sX*sX;
+ double var_y = sYY - sY*sY;
+ double covariance_xy = sXY - sX*sY;
+
+ double correlation = covariance_xy / sqrt(var_x * var_y);
+ LG << "Covariance xy: " << covariance_xy
+ << ", var 1: " << var_x << ", var 2: " << var_y
+ << ", correlation: " << correlation;
return correlation;
}
diff --git a/extern/libmv/libmv/image/sample.h b/extern/libmv/libmv/image/sample.h
index ea86edf117d..e842747e6d4 100644
--- a/extern/libmv/libmv/image/sample.h
+++ b/extern/libmv/libmv/image/sample.h
@@ -95,7 +95,6 @@ inline void DownsampleChannelsBy2(const Array3Df &in, Array3Df *out) {
}
}
}
-
}
// Sample a region centered at x,y in image with size extending by half_width
diff --git a/extern/libmv/libmv/simple_pipeline/modal_solver.cc b/extern/libmv/libmv/simple_pipeline/modal_solver.cc
new file mode 100644
index 00000000000..bb49b30dbce
--- /dev/null
+++ b/extern/libmv/libmv/simple_pipeline/modal_solver.cc
@@ -0,0 +1,126 @@
+// Copyright (c) 2012 libmv authors.
+//
+// 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 <cstdio>
+
+#include "libmv/logging/logging.h"
+#include "libmv/simple_pipeline/modal_solver.h"
+#include "libmv/simple_pipeline/rigid_registration.h"
+
+#ifdef _MSC_VER
+# define snprintf _snprintf
+#endif
+
+namespace libmv {
+
+static void ProjectMarkerOnSphere(Marker &marker, Vec3 &X) {
+ X(0) = marker.x;
+ X(1) = marker.y;
+ X(2) = 1.0;
+
+ X *= 5.0 / X.norm();
+}
+
+static void ModalSolverLogProress(ProgressUpdateCallback *update_callback,
+ double progress)
+{
+ if (update_callback) {
+ char message[256];
+
+ snprintf(message, sizeof(message), "Solving progress %d%%", (int)(progress * 100));
+
+ update_callback->invoke(progress, message);
+ }
+}
+
+void ModalSolver(Tracks &tracks,
+ EuclideanReconstruction *reconstruction,
+ ProgressUpdateCallback *update_callback) {
+ int max_image = tracks.MaxImage();
+ int max_track = tracks.MaxTrack();
+
+ LG << "Max image: " << max_image;
+ LG << "Max track: " << max_track;
+
+ Mat3 R = Mat3::Identity();
+
+ for (int image = 0; image <= max_image; ++image) {
+ vector<Marker> all_markers = tracks.MarkersInImage(image);
+
+ ModalSolverLogProress(update_callback, (float) image / max_image);
+
+ // Skip empty frames without doing anything
+ if (all_markers.size() == 0) {
+ LG << "Skipping frame: " << image;
+ continue;
+ }
+
+ vector<Vec3> points, reference_points;
+
+ // Cnstruct pairs of markers from current and previous image,
+ // to reproject them and find rigid transformation between
+ // previous and current image
+ for (int track = 0; track <= max_track; ++track) {
+ EuclideanPoint *point = reconstruction->PointForTrack(track);
+
+ if (point) {
+ Marker marker = tracks.MarkerInImageForTrack(image, track);
+
+ if (marker.image == image) {
+ Vec3 X;
+
+ LG << "Use track " << track << " for rigid registration between image " <<
+ image - 1 << " and " << image;
+
+ ProjectMarkerOnSphere(marker, X);
+
+ points.push_back(point->X);
+ reference_points.push_back(X);
+ }
+ }
+ }
+
+ if (points.size()) {
+ // Find rigid delta transformation to current image
+ RigidRegistration(reference_points, points, R);
+ }
+
+ reconstruction->InsertCamera(image, R, Vec3::Zero());
+
+ // Review if there's new tracks for which position might be reconstructed
+ for (int track = 0; track <= max_track; ++track) {
+ if (!reconstruction->PointForTrack(track)) {
+ Marker marker = tracks.MarkerInImageForTrack(image, track);
+
+ if (marker.image == image) {
+ // New track appeared on this image, project it's position onto sphere
+
+ LG << "Projecting track " << track << " at image " << image;
+
+ Vec3 X;
+ ProjectMarkerOnSphere(marker, X);
+ reconstruction->InsertPoint(track, R.inverse() * X);
+ }
+ }
+ }
+ }
+}
+
+} // namespace libmv
diff --git a/extern/libmv/libmv/simple_pipeline/modal_solver.h b/extern/libmv/libmv/simple_pipeline/modal_solver.h
new file mode 100644
index 00000000000..560b37c2987
--- /dev/null
+++ b/extern/libmv/libmv/simple_pipeline/modal_solver.h
@@ -0,0 +1,48 @@
+// Copyright (c) 2012 libmv authors.
+//
+// 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.
+
+#ifndef LIBMV_SIMPLE_PIPELINE_MODAL_SOLVER_H_
+#define LIBMV_SIMPLE_PIPELINE_MODAL_SOLVER_H_
+
+#include "libmv/simple_pipeline/tracks.h"
+#include "libmv/simple_pipeline/reconstruction.h"
+#include "libmv/simple_pipeline/callbacks.h"
+
+namespace libmv {
+
+/*!
+ This solver solves such camera motion as tripod rotation, reconstructing
+ only camera motion itself. Bundles are not reconstructing properly, they're
+ just getting projected onto sphere.
+
+ Markers from tracks object would be used for recosntruction, and algorithm
+ assumes thir's positions are undistorted already and they're in nnormalized
+ space.
+
+ Reconstructed cameras and projected bundles would be added to reconstruction
+ object.
+*/
+void ModalSolver(Tracks &tracks,
+ EuclideanReconstruction *reconstruction,
+ ProgressUpdateCallback *update_callback = NULL);
+
+} // namespace libmv
+
+#endif // LIBMV_SIMPLE_PIPELINE_MODAL_SOLVER_H_
diff --git a/extern/libmv/libmv/tracking/brute_region_tracker.cc b/extern/libmv/libmv/tracking/brute_region_tracker.cc
index af7f673472e..ef36dffb56d 100644
--- a/extern/libmv/libmv/tracking/brute_region_tracker.cc
+++ b/extern/libmv/libmv/tracking/brute_region_tracker.cc
@@ -310,7 +310,7 @@ bool BruteRegionTracker::Track(const FloatImage &image1,
FloatArrayToByteArrayWithPadding(image_and_gradient2, &search_area, &search_area_stride);
// Try all possible locations inside the search area. Yes, everywhere.
- int best_i, best_j, best_sad = INT_MAX;
+ int best_i = -1, best_j = -1, best_sad = INT_MAX;
for (int i = 0; i < image2.Height() - pattern_width; ++i) {
for (int j = 0; j < image2.Width() - pattern_width; ++j) {
int sad = SumOfAbsoluteDifferencesContiguousImage(pattern,
@@ -327,38 +327,51 @@ bool BruteRegionTracker::Track(const FloatImage &image1,
}
}
+ CHECK_NE(best_i, -1);
+ CHECK_NE(best_j, -1);
+
aligned_free(pattern);
aligned_free(search_area);
- if (best_sad != INT_MAX) {
- *x2 = best_j + half_window_size;
- *y2 = best_i + half_window_size;
-
- if (minimum_correlation > 0) {
- Array3Df image_and_gradient1_sampled, image_and_gradient2_sampled;
-
- SamplePattern(image_and_gradient1, x1, y1, half_window_size, 3,
- &image_and_gradient1_sampled);
- SamplePattern(image_and_gradient2, *x2, *y2, half_window_size, 3,
- &image_and_gradient2_sampled);
-
- // Compute the Pearson product-moment correlation coefficient to check
- // for sanity.
- double correlation = PearsonProductMomentCorrelation(image_and_gradient1_sampled,
- image_and_gradient2_sampled,
- pattern_width);
- LG << "Final correlation: " << correlation;
-
- if (correlation < minimum_correlation) {
- LG << "Correlation " << correlation << " greater than "
- << minimum_correlation << "; bailing.";
- return false;
- }
- }
+ if (best_sad == INT_MAX) {
+ LG << "Hit INT_MAX in SAD; failing.";
+ return false;
+ }
+
+ *x2 = best_j + half_window_size;
+ *y2 = best_i + half_window_size;
+ // Calculate the shift done by the fine tracker.
+ double dx2 = *x2 - x1;
+ double dy2 = *y2 - y1;
+ double fine_shift = sqrt(dx2 * dx2 + dy2 * dy2);
+ LG << "Brute shift: dx=" << dx2 << " dy=" << dy2 << ", d=" << fine_shift;
+
+ if (minimum_correlation <= 0) {
+ // No correlation checking requested; nothing else to do.
+ LG << "No correlation checking; returning success. best_sad: " << best_sad;
return true;
}
- return false;
+
+ Array3Df image_and_gradient1_sampled, image_and_gradient2_sampled;
+ SamplePattern(image_and_gradient1, x1, y1, half_window_size, 3,
+ &image_and_gradient1_sampled);
+ SamplePattern(image_and_gradient2, *x2, *y2, half_window_size, 3,
+ &image_and_gradient2_sampled);
+
+ // Compute the Pearson product-moment correlation coefficient to check
+ // for sanity.
+ double correlation = PearsonProductMomentCorrelation(image_and_gradient1_sampled,
+ image_and_gradient2_sampled,
+ pattern_width);
+ LG << "Final correlation: " << correlation;
+
+ if (correlation < minimum_correlation) {
+ LG << "Correlation " << correlation << " greater than "
+ << minimum_correlation << "; bailing.";
+ return false;
+ }
+ return true;
}
} // namespace libmv
diff --git a/extern/libmv/libmv/tracking/esm_region_tracker.cc b/extern/libmv/libmv/tracking/esm_region_tracker.cc
index e0b85f19943..221fa4d081b 100644
--- a/extern/libmv/libmv/tracking/esm_region_tracker.cc
+++ b/extern/libmv/libmv/tracking/esm_region_tracker.cc
@@ -41,6 +41,7 @@ static bool RegionIsInBounds(const FloatImage &image1,
int min_y = floor(y) - half_window_size - 1;
if (min_x < 0.0 ||
min_y < 0.0) {
+ LG << "Out of bounds; min_x: " << min_x << ", min_y: " << min_y;
return false;
}
@@ -49,6 +50,9 @@ static bool RegionIsInBounds(const FloatImage &image1,
int max_y = ceil(y) + half_window_size + 1;
if (max_x > image1.cols() ||
max_y > image1.rows()) {
+ LG << "Out of bounds; max_x: " << max_x << ", max_y: " << max_y
+ << ", image1.cols(): " << image1.cols()
+ << ", image1.rows(): " << image1.rows();
return false;
}
@@ -56,24 +60,6 @@ static bool RegionIsInBounds(const FloatImage &image1,
return true;
}
-// Estimate "reasonable" error by computing autocorrelation for a small shift.
-// TODO(keir): Add a facility for
-static double EstimateReasonableError(const FloatImage &image,
- double x, double y,
- int half_width) {
- double error = 0.0;
- for (int r = -half_width; r <= half_width; ++r) {
- for (int c = -half_width; c <= half_width; ++c) {
- double s = SampleLinear(image, y + r, x + c, 0);
- double e1 = SampleLinear(image, y + r + 0.5, x + c, 0) - s;
- double e2 = SampleLinear(image, y + r, x + c + 0.5, 0) - s;
- error += e1*e1 + e2*e2;
- }
- }
- // XXX hack
- return error / 2.0 * 16.0;
-}
-
// This is implemented from "Lukas and Kanade 20 years on: Part 1. Page 42,
// figure 14: the Levenberg-Marquardt-Inverse Compositional Algorithm".
bool EsmRegionTracker::Track(const FloatImage &image1,
@@ -107,9 +93,6 @@ bool EsmRegionTracker::Track(const FloatImage &image1,
//
// Ignored for my "normal" LM loop.
- double reasonable_error =
- EstimateReasonableError(image1, x1, y1, half_window_size);
-
// Step 1: Warp I with W(x, p) to compute I(W(x; p).
//
// Use two images for accepting / rejecting updates.
@@ -228,7 +211,7 @@ bool EsmRegionTracker::Track(const FloatImage &image1,
new_error += e*e;
}
}
- //LG << "Old error: " << error << ", new error: " << new_error;
+ LG << "Old error: " << error << ", new error: " << new_error;
double rho = (error - new_error) / (d.transpose() * (mu * d + z));
@@ -253,6 +236,7 @@ bool EsmRegionTracker::Track(const FloatImage &image1,
mu *= std::max(1/3., 1 - pow(2*rho - 1, 3));
nu = M_E; // See above for why to use e.
+ LG << "Error decreased, so accept update.";
}
// If the step was accepted, then check for termination.
@@ -264,13 +248,15 @@ bool EsmRegionTracker::Track(const FloatImage &image1,
width);
LG << "Final correlation: " << correlation;
- if (correlation < minimum_correlation) {
- LG << "Correlation " << correlation << " greater than "
- << minimum_correlation << "; bailing.";
- return false;
+ // Note: Do the comparison here to handle nan's correctly (since all
+ // comparisons with nan are false).
+ if (minimum_correlation < correlation) {
+ LG << "Successful track in " << (i + 1) << " iterations.";
+ return true;
}
- LG << "Successful track in " << (i + 1) << " iterations.";
- return true;
+ LG << "Correlation " << correlation << " greater than "
+ << minimum_correlation << " or is nan; bailing.";
+ return false;
}
}
// Getting here means we hit max iterations, so tracking failed.
diff --git a/extern/libmv/patches/mingw_w64_support.patch b/extern/libmv/patches/mingw_w64_support.patch
deleted file mode 100644
index 360287e81c2..00000000000
--- a/extern/libmv/patches/mingw_w64_support.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-Index: bundle.sh
-===================================================================
---- bundle.sh (revision 45912)
-+++ bundle.sh (working copy)
-@@ -248,7 +248,7 @@
- incs += ' ' + env['BF_PNG_INC']
- incs += ' ' + env['BF_ZLIB_INC']
-
--if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
-+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
- incs += ' ./third_party/glog/src/windows ./third_party/glog/src/windows/glog'
- if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
- incs += ' ./third_party/msinttypes'
-Index: libmv/numeric/numeric.h
-===================================================================
---- libmv/numeric/numeric.h (revision 45912)
-+++ libmv/numeric/numeric.h (working copy)
-@@ -33,7 +33,7 @@
- #include <Eigen/QR>
- #include <Eigen/SVD>
-
--#if _WIN32 || __APPLE__ || __FreeBSD__
-+#if (defined(_WIN32) || defined(__APPLE__) || defined(__FreeBSD__)) && !defined(__MINGW64__)
- void static sincos (double x, double *sinx, double *cosx) {
- *sinx = sin(x);
- *cosx = cos(x);
-Index: third_party/glog/src/windows/port.cc
-===================================================================
---- third_party/glog/src/windows/port.cc (revision 45912)
-+++ third_party/glog/src/windows/port.cc (working copy)
-@@ -55,6 +55,8 @@
- return _vsnprintf(str, size-1, format, ap);
- }
-
-+// MinGW64 defines
-+#ifndef __MINGW64__
- int snprintf(char *str, size_t size, const char *format, ...) {
- va_list ap;
- va_start(ap, format);
-@@ -62,3 +64,4 @@
- va_end(ap);
- return r;
- }
-+#endif
-Index: third_party/glog/src/windows/port.h
-===================================================================
---- third_party/glog/src/windows/port.h (revision 45912)
-+++ third_party/glog/src/windows/port.h (working copy)
-@@ -120,7 +120,9 @@
- #define DEFAULT_TEMPLATE_ROOTDIR ".."
-
- // ----------------------------------- SYSTEM/PROCESS
-+#ifndef __MINGW64__
- typedef int pid_t;
-+#endif
- #define getpid _getpid
-
- // ----------------------------------- THREADS
diff --git a/intern/SConscript b/intern/SConscript
index b6305f7dbab..a1e7f840800 100644
--- a/intern/SConscript
+++ b/intern/SConscript
@@ -16,25 +16,16 @@ SConscript(['audaspace/SConscript',
'mikktspace/SConscript',
'smoke/SConscript'])
-# NEW_CSG was intended for intern/csg, but
-# getting it to compile is difficult
-# intern/bsp has been used anyway, so
-# perhaps get rid of intern/csg?
-NEW_CSG = 'false'
-
if env ['WITH_BF_REMESH']:
SConscript(['dualcon/SConscript'])
if env['WITH_BF_FLUID']:
SConscript(['elbeem/SConscript'])
-
+
if env['WITH_BF_CYCLES']:
SConscript(['cycles/SConscript'])
-if NEW_CSG == 'false':
- SConscript(['bsp/SConscript'])
-else:
- SConscript(['csg/SConscript'])
+SConscript(['bsp/SConscript'])
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-mingw', 'linuxcross', 'win64-vc'):
SConscript(['utfconv/SConscript'])
diff --git a/intern/audaspace/intern/AUD_Buffer.cpp b/intern/audaspace/intern/AUD_Buffer.cpp
index 624a4d0b2c8..b7157f672b4 100644
--- a/intern/audaspace/intern/AUD_Buffer.cpp
+++ b/intern/audaspace/intern/AUD_Buffer.cpp
@@ -33,16 +33,7 @@
#include <cstring>
#include <cstdlib>
-#if defined(_WIN64)
-# ifdef __MINGW64__
-# include <basetsd.h>
-# endif
-typedef unsigned __int64 uint_ptr;
-#else
-typedef unsigned long uint_ptr;
-#endif
-
-#define AUD_ALIGN(a) (a + 16 - ((uint_ptr)a & 15))
+#define AUD_ALIGN(a) (a + 16 - ((long)a & 15))
AUD_Buffer::AUD_Buffer(int size)
{
diff --git a/intern/audaspace/intern/AUD_C-API.cpp b/intern/audaspace/intern/AUD_C-API.cpp
index 9100a277124..50b47650696 100644
--- a/intern/audaspace/intern/AUD_C-API.cpp
+++ b/intern/audaspace/intern/AUD_C-API.cpp
@@ -41,6 +41,7 @@
#include <cstdlib>
#include <cstring>
#include <cmath>
+#include <sstream>
#include "AUD_NULLDevice.h"
#include "AUD_I3DDevice.h"
@@ -1236,6 +1237,47 @@ const char* AUD_mixdown(AUD_Sound* sound, unsigned int start, unsigned int lengt
}
}
+const char* AUD_mixdown_per_channel(AUD_Sound* sound, unsigned int start, unsigned int length, unsigned int buffersize, const char* filename, AUD_DeviceSpecs specs, AUD_Container format, AUD_Codec codec, unsigned int bitrate)
+{
+ try
+ {
+ AUD_SequencerFactory* f = dynamic_cast<AUD_SequencerFactory*>(sound->get());
+
+ f->setSpecs(specs.specs);
+
+ std::vector<AUD_Reference<AUD_IWriter> > writers;
+
+ int channels = specs.channels;
+ specs.channels = AUD_CHANNELS_MONO;
+
+ for(int i = 0; i < channels; i++)
+ {
+ std::stringstream stream;
+ std::string fn = filename;
+ size_t index = fn.find_last_of('.');
+ size_t index_slash = fn.find_last_of('/');
+ size_t index_backslash = fn.find_last_of('\\');
+ if((index == std::string::npos) ||
+ ((index < index_slash) && (index_slash != std::string::npos)) ||
+ ((index < index_backslash) && (index_backslash != std::string::npos)))
+ stream << filename << "_" << (i + 1);
+ else
+ stream << fn.substr(0, index) << "_" << (i + 1) << fn.substr(index);
+ writers.push_back(AUD_FileWriter::createWriter(stream.str(), specs, format, codec, bitrate));
+ }
+
+ AUD_Reference<AUD_IReader> reader = f->createQualityReader();
+ reader->seek(start);
+ AUD_FileWriter::writeReader(reader, writers, length, buffersize);
+
+ return NULL;
+ }
+ catch(AUD_Exception& e)
+ {
+ return e.str;
+ }
+}
+
AUD_Device* AUD_openMixdownDevice(AUD_DeviceSpecs specs, AUD_Sound* sequencer, float volume, float start)
{
try
diff --git a/intern/audaspace/intern/AUD_C-API.h b/intern/audaspace/intern/AUD_C-API.h
index 8388af2170d..a52a1fa8369 100644
--- a/intern/audaspace/intern/AUD_C-API.h
+++ b/intern/audaspace/intern/AUD_C-API.h
@@ -710,6 +710,21 @@ extern void* AUD_getSet(void* set);
extern const char* AUD_mixdown(AUD_Sound* sound, unsigned int start, unsigned int length, unsigned int buffersize, const char* filename, AUD_DeviceSpecs specs, AUD_Container format, AUD_Codec codec, unsigned int bitrate);
/**
+ * Mixes a sound down into multiple files.
+ * \param sound The sound scene to mix down.
+ * \param start The start frame.
+ * \param length The count of frames to write.
+ * \param buffersize How many samples should be written at once.
+ * \param filename The file to write to, the channel number and an underscore are added at the beginning.
+ * \param specs The file's audio specification.
+ * \param format The file's container format.
+ * \param codec The codec used for encoding the audio data.
+ * \param bitrate The bitrate for encoding.
+ * \return An error message or NULL in case of success.
+ */
+extern const char* AUD_mixdown_per_channel(AUD_Sound* sound, unsigned int start, unsigned int length, unsigned int buffersize, const char* filename, AUD_DeviceSpecs specs, AUD_Container format, AUD_Codec codec, unsigned int bitrate);
+
+/**
* Opens a read device and prepares it for mixdown of the sound scene.
* \param specs Output audio specifications.
* \param sequencer The sound scene to mix down.
diff --git a/intern/audaspace/intern/AUD_FileWriter.cpp b/intern/audaspace/intern/AUD_FileWriter.cpp
index df76b667e3f..f74021acad1 100644
--- a/intern/audaspace/intern/AUD_FileWriter.cpp
+++ b/intern/audaspace/intern/AUD_FileWriter.cpp
@@ -93,3 +93,39 @@ void AUD_FileWriter::writeReader(AUD_Reference<AUD_IReader> reader, AUD_Referenc
writer->write(len, buf);
}
}
+
+void AUD_FileWriter::writeReader(AUD_Reference<AUD_IReader> reader, std::vector<AUD_Reference<AUD_IWriter> >& writers, unsigned int length, unsigned int buffersize)
+{
+ AUD_Buffer buffer(buffersize * AUD_SAMPLE_SIZE(reader->getSpecs()));
+ AUD_Buffer buffer2(buffersize * sizeof(sample_t));
+ sample_t* buf = buffer.getBuffer();
+ sample_t* buf2 = buffer2.getBuffer();
+
+ int len;
+ bool eos = false;
+ int channels = reader->getSpecs().channels;
+
+ for(unsigned int pos = 0; ((pos < length) || (length <= 0)) && !eos; pos += len)
+ {
+ len = buffersize;
+ if((len > length - pos) && (length > 0))
+ len = length - pos;
+ reader->read(len, eos, buf);
+
+ for(int channel = 0; channel < channels; channel++)
+ {
+ for(int i = 0; i < len; i++)
+ {
+ // clamping!
+ if(buf[i * channels + channel] > 1)
+ buf2[i] = 1;
+ else if(buf[i * channels + channel] < -1)
+ buf2[i] = -1;
+ else
+ buf2[i] = buf[i * channels + channel];
+ }
+
+ writers[channel]->write(len, buf2);
+ }
+ }
+}
diff --git a/intern/audaspace/intern/AUD_FileWriter.h b/intern/audaspace/intern/AUD_FileWriter.h
index c9ee2b1ee12..385aba5ef45 100644
--- a/intern/audaspace/intern/AUD_FileWriter.h
+++ b/intern/audaspace/intern/AUD_FileWriter.h
@@ -31,6 +31,7 @@
#define __AUD_FILEWRITER_H__
#include <string>
+#include <vector>
#include "AUD_Reference.h"
@@ -68,6 +69,15 @@ public:
* \param buffersize How many samples should be transfered at once.
*/
static void writeReader(AUD_Reference<AUD_IReader> reader, AUD_Reference<AUD_IWriter> writer, unsigned int length, unsigned int buffersize);
+
+ /**
+ * Writes a reader to several writers.
+ * \param reader The reader to read from.
+ * \param writers The writers to write to.
+ * \param length How many samples should be transfered.
+ * \param buffersize How many samples should be transfered at once.
+ */
+ static void writeReader(AUD_Reference<AUD_IReader> reader, std::vector<AUD_Reference<AUD_IWriter> >& writers, unsigned int length, unsigned int buffersize);
};
#endif //__AUD_FILEWRITER_H__
diff --git a/intern/audaspace/intern/AUD_Reference.h b/intern/audaspace/intern/AUD_Reference.h
index 2e07417154b..5a1aa947148 100644
--- a/intern/audaspace/intern/AUD_Reference.h
+++ b/intern/audaspace/intern/AUD_Reference.h
@@ -31,6 +31,7 @@
#include <map>
#include <cstddef>
+#include <pthread.h>
// #define MEM_DEBUG
@@ -49,8 +50,13 @@ private:
* Saves the reference counts.
*/
static std::map<void*, unsigned int> m_references;
+ static pthread_mutex_t m_mutex;
+ static bool m_mutex_initialised;
public:
+
+ static pthread_mutex_t* getMutex();
+
/**
* Reference increment.
* \param reference The reference.
@@ -108,6 +114,7 @@ public:
template <class U>
AUD_Reference(U* reference)
{
+ pthread_mutex_lock(AUD_ReferenceHandler::getMutex());
m_original = reference;
m_reference = dynamic_cast<T*>(reference);
AUD_ReferenceHandler::incref(m_original);
@@ -115,6 +122,7 @@ public:
if(m_reference != NULL)
std::cerr << "+" << typeid(*m_reference).name() << std::endl;
#endif
+ pthread_mutex_unlock(AUD_ReferenceHandler::getMutex());
}
AUD_Reference()
@@ -129,6 +137,7 @@ public:
*/
AUD_Reference(const AUD_Reference& ref)
{
+ pthread_mutex_lock(AUD_ReferenceHandler::getMutex());
m_original = ref.m_original;
m_reference = ref.m_reference;
AUD_ReferenceHandler::incref(m_original);
@@ -136,11 +145,13 @@ public:
if(m_reference != NULL)
std::cerr << "+" << typeid(*m_reference).name() << std::endl;
#endif
+ pthread_mutex_unlock(AUD_ReferenceHandler::getMutex());
}
template <class U>
explicit AUD_Reference(const AUD_Reference<U>& ref)
{
+ pthread_mutex_lock(AUD_ReferenceHandler::getMutex());
m_original = ref.get();
m_reference = dynamic_cast<T*>(ref.get());
AUD_ReferenceHandler::incref(m_original);
@@ -148,6 +159,7 @@ public:
if(m_reference != NULL)
std::cerr << "+" << typeid(*m_reference).name() << std::endl;
#endif
+ pthread_mutex_unlock(AUD_ReferenceHandler::getMutex());
}
/**
@@ -156,12 +168,20 @@ public:
*/
~AUD_Reference()
{
+ pthread_mutex_lock(AUD_ReferenceHandler::getMutex());
#ifdef MEM_DEBUG
if(m_reference != NULL)
std::cerr << "-" << typeid(*m_reference).name() << std::endl;
#endif
if(AUD_ReferenceHandler::decref(m_original))
+ {
+ pthread_mutex_unlock(AUD_ReferenceHandler::getMutex());
delete m_reference;
+ }
+ else
+ {
+ pthread_mutex_unlock(AUD_ReferenceHandler::getMutex());
+ }
}
/**
@@ -173,12 +193,18 @@ public:
if(&ref == this)
return *this;
+ pthread_mutex_lock(AUD_ReferenceHandler::getMutex());
+
#ifdef MEM_DEBUG
if(m_reference != NULL)
std::cerr << "-" << typeid(*m_reference).name() << std::endl;
#endif
if(AUD_ReferenceHandler::decref(m_original))
+ {
+ pthread_mutex_unlock(AUD_ReferenceHandler::getMutex());
delete m_reference;
+ pthread_mutex_lock(AUD_ReferenceHandler::getMutex());
+ }
m_original = ref.m_original;
m_reference = ref.m_reference;
@@ -188,6 +214,8 @@ public:
std::cerr << "+" << typeid(*m_reference).name() << std::endl;
#endif
+ pthread_mutex_unlock(AUD_ReferenceHandler::getMutex());
+
return *this;
}
diff --git a/intern/audaspace/intern/AUD_ReferenceHandler.cpp b/intern/audaspace/intern/AUD_ReferenceHandler.cpp
index 24f645df761..3e9f6707262 100644
--- a/intern/audaspace/intern/AUD_ReferenceHandler.cpp
+++ b/intern/audaspace/intern/AUD_ReferenceHandler.cpp
@@ -29,3 +29,24 @@
#include "AUD_Reference.h"
std::map<void*, unsigned int> AUD_ReferenceHandler::m_references;
+pthread_mutex_t AUD_ReferenceHandler::m_mutex;
+bool AUD_ReferenceHandler::m_mutex_initialised = false;
+
+pthread_mutex_t *AUD_ReferenceHandler::getMutex()
+{
+ if(!m_mutex_initialised)
+ {
+ pthread_mutexattr_t attr;
+ pthread_mutexattr_init(&attr);
+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
+
+ pthread_mutex_init(&m_mutex, &attr);
+
+ pthread_mutexattr_destroy(&attr);
+
+ m_mutex_initialised = true;
+ }
+
+ return &m_mutex;
+}
+
diff --git a/intern/audaspace/intern/AUD_SequencerHandle.cpp b/intern/audaspace/intern/AUD_SequencerHandle.cpp
index d13efb9683b..f4bfae6cee7 100644
--- a/intern/audaspace/intern/AUD_SequencerHandle.cpp
+++ b/intern/audaspace/intern/AUD_SequencerHandle.cpp
@@ -154,6 +154,7 @@ void AUD_SequencerHandle::seek(float position)
if(seekpos < 0)
seekpos = 0;
seekpos += m_entry->m_skip;
+ m_handle->setPitch(1.0f);
m_handle->seek(seekpos);
if(position < m_entry->m_begin)
m_handle->pause();
diff --git a/intern/audaspace/patches/mingw64-nopermissive.patch b/intern/audaspace/patches/mingw64-nopermissive.patch
deleted file mode 100644
index 64420d240f3..00000000000
--- a/intern/audaspace/patches/mingw64-nopermissive.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Index: intern/AUD_Buffer.cpp
-===================================================================
---- intern/AUD_Buffer.cpp (revision 45919)
-+++ intern/AUD_Buffer.cpp (working copy)
-@@ -33,8 +33,17 @@
- #include <cstring>
- #include <cstdlib>
-
--#define AUD_ALIGN(a) (a + 16 - ((long)a & 15))
-+#if defined(_WIN64)
-+# ifdef __MINGW64__
-+# include <basetsd.h>
-+# endif
-+typedef unsigned __int64 uint_ptr;
-+#else
-+typedef unsigned long uint_ptr;
-+#endif
-
-+#define AUD_ALIGN(a) (a + 16 - ((uint_ptr)a & 15))
-+
- AUD_Buffer::AUD_Buffer(int size)
- {
- m_size = size;
diff --git a/intern/container/CTR_Map.h b/intern/container/CTR_Map.h
index 8b6d84337c2..9557821d642 100644
--- a/intern/container/CTR_Map.h
+++ b/intern/container/CTR_Map.h
@@ -63,7 +63,7 @@ public:
for (int i = 0; i < m_num_buckets; ++i) {
m_buckets[i] = 0;
- for(Entry *entry = map.m_buckets[i]; entry; entry=entry->m_next)
+ for (Entry *entry = map.m_buckets[i]; entry; entry=entry->m_next)
insert(entry->m_key, entry->m_value);
}
}
diff --git a/intern/cycles/app/cycles_xml.cpp b/intern/cycles/app/cycles_xml.cpp
index b954ff45e27..db3592f1227 100644
--- a/intern/cycles/app/cycles_xml.cpp
+++ b/intern/cycles/app/cycles_xml.cpp
@@ -284,15 +284,28 @@ static void xml_read_camera(const XMLReadState& state, pugi::xml_node node)
xml_read_float(&cam->farclip, node, "farclip");
xml_read_float(&cam->aperturesize, node, "aperturesize"); // 0.5*focallength/fstop
xml_read_float(&cam->focaldistance, node, "focaldistance");
- xml_read_float(&cam->shutteropen, node, "shutteropen");
- xml_read_float(&cam->shutterclose, node, "shutterclose");
+ xml_read_float(&cam->shuttertime, node, "shuttertime");
if(xml_equal_string(node, "type", "orthographic"))
cam->type = CAMERA_ORTHOGRAPHIC;
else if(xml_equal_string(node, "type", "perspective"))
cam->type = CAMERA_PERSPECTIVE;
- else if(xml_equal_string(node, "type", "environment"))
- cam->type = CAMERA_ENVIRONMENT;
+ else if(xml_equal_string(node, "type", "panorama"))
+ cam->type = CAMERA_PANORAMA;
+
+ if(xml_equal_string(node, "panorama_type", "equirectangular"))
+ cam->panorama_type = PANORAMA_EQUIRECTANGULAR;
+ else if(xml_equal_string(node, "panorama_type", "fisheye_equidistant"))
+ cam->panorama_type = PANORAMA_FISHEYE_EQUIDISTANT;
+ else if(xml_equal_string(node, "panorama_type", "fisheye_equisolid"))
+ cam->panorama_type = PANORAMA_FISHEYE_EQUISOLID;
+
+ xml_read_float(&cam->fisheye_fov, node, "fisheye_fov");
+ xml_read_float(&cam->fisheye_lens, node, "fisheye_lens");
+
+ xml_read_float(&cam->sensorwidth, node, "sensorwidth");
+ xml_read_float(&cam->sensorheight, node, "sensorheight");
+
cam->matrix = state.tfm;
@@ -705,7 +718,7 @@ static void xml_read_mesh(const XMLReadState& state, pugi::xml_node node)
}
/* temporary for test compatibility */
- mesh->attributes.remove(Attribute::STD_VERTEX_NORMAL);
+ mesh->attributes.remove(ATTR_STD_VERTEX_NORMAL);
}
/* Patch */
@@ -766,7 +779,7 @@ static void xml_read_patch(const XMLReadState& state, pugi::xml_node node)
delete patch;
/* temporary for test compatibility */
- mesh->attributes.remove(Attribute::STD_VERTEX_NORMAL);
+ mesh->attributes.remove(ATTR_STD_VERTEX_NORMAL);
}
}
diff --git a/intern/cycles/blender/addon/__init__.py b/intern/cycles/blender/addon/__init__.py
index 41591085d0a..4a60a329e2b 100644
--- a/intern/cycles/blender/addon/__init__.py
+++ b/intern/cycles/blender/addon/__init__.py
@@ -21,10 +21,9 @@
bl_info = {
"name": "Cycles Render Engine",
"author": "",
- "version": (0, 0),
- "blender": (2, 6, 2),
+ "blender": (2, 6, 3),
"location": "Info header, render engine menu",
- "description": "Cycles Render Engine integration.",
+ "description": "Cycles Render Engine integration",
"warning": "",
"wiki_url": "http://wiki.blender.org/index.php/Dev:2.6/Source/Render/Cycles",
"tracker_url": "",
diff --git a/intern/cycles/blender/addon/enums.py b/intern/cycles/blender/addon/enums.py
index b4b1646c10d..6cc3010eb0e 100644
--- a/intern/cycles/blender/addon/enums.py
+++ b/intern/cycles/blender/addon/enums.py
@@ -54,3 +54,9 @@ aperture_types = (
('RADIUS', "Radius", "Directly change the size of the aperture"),
('FSTOP', "F/stop", "Change the size of the aperture by f/stops"),
)
+
+panorama_types = (
+ ('EQUIRECTANGULAR', "Equirectangular", "Render the scene with a spherical camera, also known as Lat Long panorama"),
+ ('FISHEYE_EQUIDISTANT', "Fisheye Equidistant", "Ideal for fulldomes, ignore the sensor dimensions"),
+ ('FISHEYE_EQUISOLID', "Fisheye Equisolid", "Similar to most fisheye modern lens, take sensor dimensions into consideration"),
+ )
diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py
index cb99ea3b499..3ade04c4658 100644
--- a/intern/cycles/blender/addon/properties.py
+++ b/intern/cycles/blender/addon/properties.py
@@ -85,10 +85,10 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
description="Leave out caustics, resulting in a darker image with less noise",
default=False,
)
- cls.blur_caustics = FloatProperty(
- name="Blur Caustics",
- description="Blur caustics to reduce noise",
- min=0.0, max=1.0,
+ cls.blur_glossy = FloatProperty(
+ name="Filter Glossy",
+ description="Adaptively blur glossy shaders after blurry bounces, to reduce noise at the cost of accuracy",
+ min=0.0, max=10.0,
default=0.0,
)
@@ -278,6 +278,25 @@ class CyclesCameraSettings(bpy.types.PropertyGroup):
subtype='ANGLE',
default=0,
)
+ cls.panorama_type = EnumProperty(
+ name="Panorama Type",
+ description="Distortion to use for the calculation",
+ items=enums.panorama_types,
+ default='FISHEYE_EQUISOLID',
+ )
+ cls.fisheye_fov = FloatProperty(
+ name="Field of View",
+ description="Field of view for the fisheye lens",
+ min=0.1745, soft_max=2*math.pi, max=10.0*math.pi,
+ subtype='ANGLE',
+ default=math.pi,
+ )
+ cls.fisheye_lens = FloatProperty(
+ name="Fisheye Lens",
+ description="Lens focal length (mm)",
+ min=0.01, soft_max=15.0, max=100.0,
+ default=10.5,
+ )
@classmethod
def unregister(cls):
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index 4a8b639b390..8480b0a5256 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -87,11 +87,34 @@ class CyclesRender_PT_integrator(CyclesButtonsPanel, Panel):
sub.prop(cscene, "diffuse_bounces", text="Diffuse")
sub.prop(cscene, "glossy_bounces", text="Glossy")
sub.prop(cscene, "transmission_bounces", text="Transmission")
- sub.prop(cscene, "no_caustics")
- #row = col.row()
- #row.prop(cscene, "blur_caustics")
- #row.active = not cscene.no_caustics
+ col.separator()
+
+ col.prop(cscene, "no_caustics")
+ col.prop(cscene, "blur_glossy")
+
+
+class CyclesRender_PT_motion_blur(CyclesButtonsPanel, Panel):
+ bl_label = "Motion Blur"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ @classmethod
+ def poll(cls, context):
+ return False
+
+ def draw_header(self, context):
+ rd = context.scene.render
+
+ self.layout.prop(rd, "use_motion_blur", text="")
+
+ def draw(self, context):
+ layout = self.layout
+
+ rd = context.scene.render
+ layout.active = rd.use_motion_blur
+
+ row = layout.row()
+ row.prop(rd, "motion_blur_shutter")
class CyclesRender_PT_film(CyclesButtonsPanel, Panel):
@@ -178,10 +201,7 @@ class CyclesRender_PT_layers(CyclesButtonsPanel, Panel):
col = split.column()
col.prop(scene, "layers", text="Scene")
- col.label(text="Material:")
- col.prop(rl, "material_override", text="")
-
- col.prop(rl, "use_sky", "Use Environment")
+ col.prop(rl, "layers_exclude", text="Exclude")
col = split.column()
col.prop(rl, "layers", text="Layer")
@@ -191,14 +211,24 @@ class CyclesRender_PT_layers(CyclesButtonsPanel, Panel):
split = layout.split()
col = split.column()
+ col.label(text="Material:")
+ col.prop(rl, "material_override", text="")
+
+ col = split.column()
+ col.prop(rl, "samples")
+ col.prop(rl, "use_sky", "Use Environment")
+
+ split = layout.split()
+
+ col = split.column()
col.label(text="Passes:")
col.prop(rl, "use_pass_combined")
col.prop(rl, "use_pass_z")
col.prop(rl, "use_pass_normal")
+ col.prop(rl, "use_pass_vector")
+ col.prop(rl, "use_pass_uv")
col.prop(rl, "use_pass_object_index")
col.prop(rl, "use_pass_material_index")
- col.prop(rl, "use_pass_emit")
- col.prop(rl, "use_pass_environment")
col.prop(rl, "use_pass_ambient_occlusion")
col.prop(rl, "use_pass_shadow")
@@ -220,6 +250,9 @@ class CyclesRender_PT_layers(CyclesButtonsPanel, Panel):
row.prop(rl, "use_pass_transmission_indirect", text="Indirect", toggle=True)
row.prop(rl, "use_pass_transmission_color", text="Color", toggle=True)
+ col.prop(rl, "use_pass_emit", text="Emission")
+ col.prop(rl, "use_pass_environment")
+
class Cycles_PT_post_processing(CyclesButtonsPanel, Panel):
bl_label = "Post Processing"
@@ -783,6 +816,31 @@ class CyclesTexture_PT_colors(CyclesButtonsPanel, Panel):
layout.template_color_ramp(mapping, "color_ramp", expand=True)
+class CyclesScene_PT_simplify(CyclesButtonsPanel, Panel):
+ bl_label = "Simplify"
+ bl_context = "scene"
+ COMPAT_ENGINES = {'CYCLES'}
+
+ def draw_header(self, context):
+ rd = context.scene.render
+ self.layout.prop(rd, "use_simplify", text="")
+
+ def draw(self, context):
+ layout = self.layout
+
+ rd = context.scene.render
+
+ layout.active = rd.use_simplify
+
+ split = layout.split()
+
+ col = split.column()
+ col.prop(rd, "simplify_subdivision", text="Subdivision")
+
+ col = split.column()
+ col.prop(rd, "simplify_child_particles", text="Child Particles")
+
+
def draw_device(self, context):
scene = context.scene
layout = self.layout
diff --git a/intern/cycles/blender/blender_camera.cpp b/intern/cycles/blender/blender_camera.cpp
index a21b22bc35a..bdd02bb5086 100644
--- a/intern/cycles/blender/blender_camera.cpp
+++ b/intern/cycles/blender/blender_camera.cpp
@@ -35,6 +35,7 @@ struct BlenderCamera {
float ortho_scale;
float lens;
+ float shuttertime;
float aperturesize;
uint apertureblades;
@@ -47,6 +48,10 @@ struct BlenderCamera {
float2 pixelaspect;
+ PanoramaType panorama_type;
+ float fisheye_fov;
+ float fisheye_lens;
+
enum { AUTO, HORIZONTAL, VERTICAL } sensor_fit;
float sensor_width;
float sensor_height;
@@ -64,6 +69,7 @@ static void blender_camera_init(BlenderCamera *bcam)
bcam->sensor_width = 32.0f;
bcam->sensor_height = 18.0f;
bcam->sensor_fit = BlenderCamera::AUTO;
+ bcam->shuttertime = 1.0f;
}
static float blender_camera_focal_distance(BL::Object b_ob, BL::Camera b_camera)
@@ -92,9 +98,37 @@ static void blender_camera_from_object(BlenderCamera *bcam, BL::Object b_ob)
bcam->nearclip = b_camera.clip_start();
bcam->farclip = b_camera.clip_end();
- bcam->type = (b_camera.type() == BL::Camera::type_ORTHO)? CAMERA_ORTHOGRAPHIC: CAMERA_PERSPECTIVE;
- if(bcam->type == CAMERA_PERSPECTIVE && b_camera.use_panorama())
- bcam->type = CAMERA_ENVIRONMENT;
+ switch(b_camera.type())
+ {
+ case BL::Camera::type_ORTHO:
+ bcam->type = CAMERA_ORTHOGRAPHIC;
+ break;
+ case BL::Camera::type_PANO:
+ bcam->type = CAMERA_PANORAMA;
+ break;
+ case BL::Camera::type_PERSP:
+ default:
+ bcam->type = CAMERA_PERSPECTIVE;
+ break;
+ }
+
+ switch(RNA_enum_get(&ccamera, "panorama_type"))
+ {
+ case 1:
+ bcam->panorama_type = PANORAMA_FISHEYE_EQUIDISTANT;
+ break;
+ case 2:
+ bcam->panorama_type = PANORAMA_FISHEYE_EQUISOLID;
+ break;
+ case 0:
+ default:
+ bcam->panorama_type = PANORAMA_EQUIRECTANGULAR;
+ break;
+ }
+
+ bcam->fisheye_fov = RNA_float_get(&ccamera, "fisheye_fov");
+ bcam->fisheye_lens = RNA_float_get(&ccamera, "fisheye_lens");
+
bcam->ortho_scale = b_camera.ortho_scale();
bcam->lens = b_camera.lens();
@@ -132,6 +166,28 @@ static void blender_camera_from_object(BlenderCamera *bcam, BL::Object b_ob)
}
}
+static Transform blender_camera_matrix(const Transform& tfm, CameraType type)
+{
+ Transform result;
+
+ if(type == CAMERA_PANORAMA) {
+ /* make it so environment camera needs to be pointed in the direction
+ of the positive x-axis to match an environment texture, this way
+ it is looking at the center of the texture */
+ result = tfm *
+ make_transform( 0.0f, -1.0f, 0.0f, 0.0f,
+ 0.0f, 0.0f, 1.0f, 0.0f,
+ -1.0f, 0.0f, 0.0f, 0.0f,
+ 0.0f, 0.0f, 0.0f, 1.0f);
+ }
+ else {
+ /* note the blender camera points along the negative z-axis */
+ result = tfm * transform_scale(1.0f, 1.0f, -1.0f);
+ }
+
+ return transform_clear_scale(result);
+}
+
static void blender_camera_sync(Camera *cam, BlenderCamera *bcam, int width, int height)
{
/* copy camera to compare later */
@@ -148,6 +204,9 @@ static void blender_camera_sync(Camera *cam, BlenderCamera *bcam, int width, int
bool horizontal_fit;
float sensor_size;
+ cam->sensorwidth = bcam->sensor_width;
+ cam->sensorheight = bcam->sensor_height;
+
if(bcam->sensor_fit == BlenderCamera::AUTO) {
horizontal_fit = (xratio > yratio);
sensor_size = bcam->sensor_width;
@@ -179,7 +238,7 @@ static void blender_camera_sync(Camera *cam, BlenderCamera *bcam, int width, int
aspectratio = bcam->ortho_scale/2.0f;
}
- if(bcam->type == CAMERA_ENVIRONMENT) {
+ if(bcam->type == CAMERA_PANORAMA) {
/* set viewplane */
cam->left = 0.0f;
cam->right = 1.0f;
@@ -216,6 +275,11 @@ static void blender_camera_sync(Camera *cam, BlenderCamera *bcam, int width, int
/* type */
cam->type = bcam->type;
+ /* panorama */
+ cam->panorama_type = bcam->panorama_type;
+ cam->fisheye_fov = bcam->fisheye_fov;
+ cam->fisheye_lens = bcam->fisheye_lens;
+
/* perspective */
cam->fov = 2.0f*atan((0.5f*sensor_size)/bcam->lens/aspectratio);
cam->focaldistance = bcam->focaldistance;
@@ -224,24 +288,11 @@ static void blender_camera_sync(Camera *cam, BlenderCamera *bcam, int width, int
cam->bladesrotation = bcam->aperturerotation;
/* transform */
- cam->matrix = bcam->matrix;
-
- if(bcam->type == CAMERA_ENVIRONMENT) {
- /* make it so environment camera needs to be pointed in the direction
- of the positive x-axis to match an environment texture, this way
- it is looking at the center of the texture */
- cam->matrix = cam->matrix *
- make_transform( 0.0f, -1.0f, 0.0f, 0.0f,
- 0.0f, 0.0f, 1.0f, 0.0f,
- -1.0f, 0.0f, 0.0f, 0.0f,
- 0.0f, 0.0f, 0.0f, 1.0f);
- }
- else {
- /* note the blender camera points along the negative z-axis */
- cam->matrix = cam->matrix * transform_scale(1.0f, 1.0f, -1.0f);
- }
-
- cam->matrix = transform_clear_scale(cam->matrix);
+ cam->matrix = blender_camera_matrix(bcam->matrix, bcam->type);
+ cam->motion.pre = cam->matrix;
+ cam->motion.post = cam->matrix;
+ cam->use_motion = false;
+ cam->shuttertime = bcam->shuttertime;
/* set update flag */
if(cam->modified(prevcam))
@@ -260,6 +311,7 @@ void BlenderSync::sync_camera(BL::Object b_override, int width, int height)
bcam.pixelaspect.x = r.pixel_aspect_x();
bcam.pixelaspect.y = r.pixel_aspect_y();
+ bcam.shuttertime = r.motion_blur_shutter();
/* camera object */
BL::Object b_ob = b_scene.camera();
@@ -277,6 +329,23 @@ void BlenderSync::sync_camera(BL::Object b_override, int width, int height)
blender_camera_sync(cam, &bcam, width, height);
}
+void BlenderSync::sync_camera_motion(BL::Object b_ob, int motion)
+{
+ Camera *cam = scene->camera;
+
+ Transform tfm = get_transform(b_ob.matrix_world());
+ tfm = blender_camera_matrix(tfm, cam->type);
+
+ if(tfm != cam->matrix) {
+ if(motion == -1)
+ cam->motion.pre = tfm;
+ else
+ cam->motion.post = tfm;
+
+ cam->use_motion = true;
+ }
+}
+
/* Sync 3D View Camera */
void BlenderSync::sync_view(BL::SpaceView3D b_v3d, BL::RegionView3D b_rv3d, int width, int height)
@@ -288,6 +357,7 @@ void BlenderSync::sync_view(BL::SpaceView3D b_v3d, BL::RegionView3D b_rv3d, int
bcam.nearclip = b_v3d.clip_start();
bcam.farclip = b_v3d.clip_end();
bcam.lens = b_v3d.lens();
+ bcam.shuttertime = b_scene.render().motion_blur_shutter();
if(b_rv3d.view_perspective() == BL::RegionView3D::view_perspective_CAMERA) {
/* camera view */
diff --git a/intern/cycles/blender/blender_mesh.cpp b/intern/cycles/blender/blender_mesh.cpp
index 7caa6b3d511..d7003729c46 100644
--- a/intern/cycles/blender/blender_mesh.cpp
+++ b/intern/cycles/blender/blender_mesh.cpp
@@ -33,30 +33,6 @@ CCL_NAMESPACE_BEGIN
/* Find/Add */
-static bool mesh_need_attribute(Scene *scene, Mesh *mesh, Attribute::Standard std)
-{
- if(std == Attribute::STD_NONE)
- return false;
-
- foreach(uint shader, mesh->used_shaders)
- if(scene->shaders[shader]->attributes.find(std))
- return true;
-
- return false;
-}
-
-static bool mesh_need_attribute(Scene *scene, Mesh *mesh, ustring name)
-{
- if(name == ustring())
- return false;
-
- foreach(uint shader, mesh->used_shaders)
- if(scene->shaders[shader]->attributes.find(name))
- return true;
-
- return false;
-}
-
static void create_mesh(Scene *scene, Mesh *mesh, BL::Mesh b_mesh, const vector<uint>& used_shaders)
{
/* create vertices */
@@ -66,7 +42,7 @@ static void create_mesh(Scene *scene, Mesh *mesh, BL::Mesh b_mesh, const vector<
mesh->verts.push_back(get_float3(v->co()));
/* create vertex normals */
- Attribute *attr_N = mesh->attributes.add(Attribute::STD_VERTEX_NORMAL);
+ Attribute *attr_N = mesh->attributes.add(ATTR_STD_VERTEX_NORMAL);
float3 *N = attr_N->data_float3();
for(b_mesh.vertices.begin(v); v != b_mesh.vertices.end(); ++v, ++N)
@@ -94,8 +70,8 @@ static void create_mesh(Scene *scene, Mesh *mesh, BL::Mesh b_mesh, const vector<
/* create generated coordinates. todo: we should actually get the orco
coordinates from modifiers, for now we use texspace loc/size which
is available in the api. */
- if(mesh_need_attribute(scene, mesh, Attribute::STD_GENERATED)) {
- Attribute *attr = mesh->attributes.add(Attribute::STD_GENERATED);
+ if(mesh->need_attribute(scene, ATTR_STD_GENERATED)) {
+ Attribute *attr = mesh->attributes.add(ATTR_STD_GENERATED);
float3 loc = get_float3(b_mesh.texspace_location());
float3 size = get_float3(b_mesh.texspace_size());
@@ -118,7 +94,7 @@ static void create_mesh(Scene *scene, Mesh *mesh, BL::Mesh b_mesh, const vector<
BL::Mesh::tessface_vertex_colors_iterator l;
for(b_mesh.tessface_vertex_colors.begin(l); l != b_mesh.tessface_vertex_colors.end(); ++l) {
- if(!mesh_need_attribute(scene, mesh, ustring(l->name().c_str())))
+ if(!mesh->need_attribute(scene, ustring(l->name().c_str())))
continue;
Attribute *attr = mesh->attributes.add(
@@ -150,10 +126,10 @@ static void create_mesh(Scene *scene, Mesh *mesh, BL::Mesh b_mesh, const vector<
BL::Mesh::tessface_uv_textures_iterator l;
for(b_mesh.tessface_uv_textures.begin(l); l != b_mesh.tessface_uv_textures.end(); ++l) {
- Attribute::Standard std = (l->active_render())? Attribute::STD_UV: Attribute::STD_NONE;
+ AttributeStandard std = (l->active_render())? ATTR_STD_UV: ATTR_STD_NONE;
ustring name = ustring(l->name().c_str());
- if(!(mesh_need_attribute(scene, mesh, name) || mesh_need_attribute(scene, mesh, std)))
+ if(!(mesh->need_attribute(scene, name) || mesh->need_attribute(scene, std)))
continue;
Attribute *attr;
@@ -222,11 +198,11 @@ static void create_subd_mesh(Mesh *mesh, BL::Mesh b_mesh, PointerRNA *cmesh, con
/* Sync */
-Mesh *BlenderSync::sync_mesh(BL::Object b_ob, bool holdout, bool object_updated)
+Mesh *BlenderSync::sync_mesh(BL::Object b_ob, bool object_updated)
{
/* test if we can instance or if the object is modified */
BL::ID b_ob_data = b_ob.data();
- BL::ID key = (object_is_modified(b_ob) || holdout)? b_ob: b_ob_data;
+ BL::ID key = (BKE_object_is_modified(b_ob))? b_ob: b_ob_data;
BL::Material material_override = render_layer.material_override;
/* find shader indices */
@@ -236,18 +212,14 @@ Mesh *BlenderSync::sync_mesh(BL::Object b_ob, bool holdout, bool object_updated)
for(b_ob.material_slots.begin(slot); slot != b_ob.material_slots.end(); ++slot) {
BL::Material material_override = render_layer.material_override;
- if(holdout)
- find_shader(PointerRNA_NULL, used_shaders, scene->default_holdout);
- else if(material_override)
+ if(material_override)
find_shader(material_override, used_shaders, scene->default_surface);
else
find_shader(slot->material(), used_shaders, scene->default_surface);
}
if(used_shaders.size() == 0) {
- if(holdout)
- used_shaders.push_back(scene->default_holdout);
- else if(material_override)
+ if(material_override)
find_shader(material_override, used_shaders, scene->default_surface);
else
used_shaders.push_back(scene->default_surface);
@@ -329,5 +301,38 @@ Mesh *BlenderSync::sync_mesh(BL::Object b_ob, bool holdout, bool object_updated)
return mesh;
}
+void BlenderSync::sync_mesh_motion(BL::Object b_ob, Mesh *mesh, int motion)
+{
+ /* todo: displacement, subdivision */
+ BL::ID b_ob_data = b_ob.data();
+ size_t size = mesh->verts.size();
+
+ /* skip objects without deforming modifiers. this is not a totally reliable,
+ * would need a more extensive check to see which objects are animated */
+ if(!size || !ccl::BKE_object_is_deform_modified(b_ob, b_scene, preview))
+ return;
+
+ /* get derived mesh */
+ BL::Mesh b_mesh = object_to_mesh(b_ob, b_scene, true, !preview);
+
+ if(b_mesh) {
+ BL::Mesh::vertices_iterator v;
+ AttributeStandard std = (motion == -1)? ATTR_STD_MOTION_PRE: ATTR_STD_MOTION_POST;
+ Attribute *attr_M = mesh->attributes.add(std);
+ float3 *M = attr_M->data_float3();
+ size_t i = 0, size = mesh->verts.size();
+
+ for(b_mesh.vertices.begin(v); v != b_mesh.vertices.end() && i < size; ++v, M++, i++)
+ *M = get_float3(v->co());
+
+ /* if number of vertices changed, or if coordinates stayed the same, drop it */
+ if(i != size || memcmp(M, &mesh->verts[0], sizeof(float3)*size) == 0)
+ mesh->attributes.remove(std);
+
+ /* free derived mesh */
+ object_remove_mesh(b_data, b_mesh);
+ }
+}
+
CCL_NAMESPACE_END
diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp
index 96faee19af4..641aa88d6ef 100644
--- a/intern/cycles/blender/blender_object.cpp
+++ b/intern/cycles/blender/blender_object.cpp
@@ -16,6 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#include "camera.h"
#include "graph.h"
#include "light.h"
#include "mesh.h"
@@ -33,10 +34,10 @@ CCL_NAMESPACE_BEGIN
/* Utilities */
-bool BlenderSync::object_is_modified(BL::Object b_ob)
+bool BlenderSync::BKE_object_is_modified(BL::Object b_ob)
{
/* test if we can instance or if the object is modified */
- if(ccl::object_is_modified(b_ob, b_scene, preview)) {
+ if(ccl::BKE_object_is_modified(b_ob, b_scene, preview)) {
/* modifiers */
return true;
}
@@ -188,11 +189,12 @@ void BlenderSync::sync_background_light()
/* Object */
-void BlenderSync::sync_object(BL::Object b_parent, int b_index, BL::Object b_ob, Transform& tfm, uint layer_flag)
+void BlenderSync::sync_object(BL::Object b_parent, int b_index, BL::Object b_ob, Transform& tfm, uint layer_flag, int motion)
{
/* light is handled separately */
if(object_is_light(b_ob)) {
- sync_light(b_parent, b_index, b_ob, tfm);
+ if(!motion)
+ sync_light(b_parent, b_index, b_ob, tfm);
return;
}
@@ -200,25 +202,54 @@ void BlenderSync::sync_object(BL::Object b_parent, int b_index, BL::Object b_ob,
if(!object_is_mesh(b_ob))
return;
- /* test if we need to sync */
+ /* key to lookup object */
ObjectKey key(b_parent, b_index, b_ob);
Object *object;
+
+ /* motion vector case */
+ if(motion) {
+ object = object_map.find(key);
+
+ if(object) {
+ if(tfm != object->tfm) {
+ if(motion == -1)
+ object->motion.pre = tfm;
+ else
+ object->motion.post = tfm;
+
+ object->use_motion = true;
+ }
+
+ sync_mesh_motion(b_ob, object->mesh, motion);
+ }
+
+ return;
+ }
+
+ /* test if we need to sync */
bool object_updated = false;
if(object_map.sync(&object, b_ob, b_parent, key))
object_updated = true;
- /* holdout? */
- bool holdout = (layer_flag & render_layer.holdout_layer) != 0;
-
+ bool use_holdout = (layer_flag & render_layer.holdout_layer) != 0;
+
/* mesh sync */
- object->mesh = sync_mesh(b_ob, holdout, object_updated);
+ object->mesh = sync_mesh(b_ob, object_updated);
+
+ if(use_holdout != object->use_holdout) {
+ object->use_holdout = use_holdout;
+ scene->object_manager->tag_update(scene);
+ }
/* object sync */
if(object_updated || (object->mesh && object->mesh->need_update)) {
object->name = b_ob.name().c_str();
object->pass_id = b_ob.pass_index();
object->tfm = tfm;
+ object->motion.pre = tfm;
+ object->motion.post = tfm;
+ object->use_motion = false;
/* visibility flags for both parent */
object->visibility = object_ray_visibility(b_ob) & PATH_RAY_ALL;
@@ -238,22 +269,24 @@ void BlenderSync::sync_object(BL::Object b_parent, int b_index, BL::Object b_ob,
/* Object Loop */
-void BlenderSync::sync_objects(BL::SpaceView3D b_v3d)
+void BlenderSync::sync_objects(BL::SpaceView3D b_v3d, int motion)
{
/* layer data */
uint scene_layer = render_layer.scene_layer;
- /* prepare for sync */
- light_map.pre_sync();
- mesh_map.pre_sync();
- object_map.pre_sync();
- mesh_synced.clear();
+ if(!motion) {
+ /* prepare for sync */
+ light_map.pre_sync();
+ mesh_map.pre_sync();
+ object_map.pre_sync();
+ mesh_synced.clear();
+ }
/* object loop */
BL::Scene::objects_iterator b_ob;
for(b_scene.objects.begin(b_ob); b_ob != b_scene.objects.end(); ++b_ob) {
- bool hide = (b_v3d)? b_ob->hide(): b_ob->hide_render();
+ bool hide = (render_layer.use_viewport_visibility)? b_ob->hide(): b_ob->hide_render();
uint ob_layer = get_layer(b_ob->layers());
if(!hide && (ob_layer & scene_layer)) {
@@ -270,7 +303,7 @@ void BlenderSync::sync_objects(BL::SpaceView3D b_v3d)
bool dup_hide = (b_v3d)? b_dup_ob.hide(): b_dup_ob.hide_render();
if(!(b_dup->hide() || dup_hide))
- sync_object(*b_ob, b_index, b_dup_ob, tfm, ob_layer);
+ sync_object(*b_ob, b_index, b_dup_ob, tfm, ob_layer, motion);
b_index++;
}
@@ -296,21 +329,50 @@ void BlenderSync::sync_objects(BL::SpaceView3D b_v3d)
if(!hide) {
/* object itself */
Transform tfm = get_transform(b_ob->matrix_world());
- sync_object(*b_ob, 0, *b_ob, tfm, ob_layer);
+ sync_object(*b_ob, 0, *b_ob, tfm, ob_layer, motion);
}
}
}
- sync_background_light();
+ if(!motion) {
+ sync_background_light();
+
+ /* handle removed data and modified pointers */
+ if(light_map.post_sync())
+ scene->light_manager->tag_update(scene);
+ if(mesh_map.post_sync())
+ scene->mesh_manager->tag_update(scene);
+ if(object_map.post_sync())
+ scene->object_manager->tag_update(scene);
+ mesh_synced.clear();
+ }
+}
- /* handle removed data and modified pointers */
- if(light_map.post_sync())
- scene->light_manager->tag_update(scene);
- if(mesh_map.post_sync())
- scene->mesh_manager->tag_update(scene);
- if(object_map.post_sync())
- scene->object_manager->tag_update(scene);
- mesh_synced.clear();
+void BlenderSync::sync_motion(BL::SpaceView3D b_v3d, BL::Object b_override)
+{
+ if(scene->need_motion() == Scene::MOTION_NONE)
+ return;
+
+ /* get camera object here to deal with camera switch */
+ BL::Object b_cam = b_scene.camera();
+ if(b_override)
+ b_cam = b_override;
+
+ /* go back and forth one frame */
+ int frame = b_scene.frame_current();
+
+ for(int motion = -1; motion <= 1; motion += 2) {
+ scene_frame_set(b_scene, frame + motion);
+
+ /* camera object */
+ if(b_cam)
+ sync_camera_motion(b_cam, motion);
+
+ /* mesh objects */
+ sync_objects(b_v3d, motion);
+ }
+
+ scene_frame_set(b_scene, frame);
}
CCL_NAMESPACE_END
diff --git a/intern/cycles/blender/blender_session.cpp b/intern/cycles/blender/blender_session.cpp
index dc6c69e2904..f79b9995165 100644
--- a/intern/cycles/blender/blender_session.cpp
+++ b/intern/cycles/blender/blender_session.cpp
@@ -91,7 +91,7 @@ void BlenderSession::create_session()
/* create sync */
sync = new BlenderSync(b_data, b_scene, scene, !background);
- sync->sync_data(b_v3d);
+ sync->sync_data(b_v3d, b_engine.camera_override());
if(b_rv3d)
sync->sync_view(b_v3d, b_rv3d, width, height);
@@ -130,6 +130,8 @@ static PassType get_pass_type(BL::RenderPass b_pass)
return PASS_OBJECT_ID;
case BL::RenderPass::type_UV:
return PASS_UV;
+ case BL::RenderPass::type_VECTOR:
+ return PASS_MOTION;
case BL::RenderPass::type_MATERIAL_INDEX:
return PASS_MATERIAL_ID;
@@ -168,7 +170,6 @@ static PassType get_pass_type(BL::RenderPass b_pass)
case BL::RenderPass::type_REFRACTION:
case BL::RenderPass::type_SPECULAR:
case BL::RenderPass::type_REFLECTION:
- case BL::RenderPass::type_VECTOR:
case BL::RenderPass::type_MIST:
return PASS_NONE;
}
@@ -209,6 +210,8 @@ void BlenderSession::render()
BL::RenderPass b_pass(*b_pass_iter);
PassType pass_type = get_pass_type(b_pass);
+ if(pass_type == PASS_MOTION && scene->integrator->motion_blur)
+ continue;
if(pass_type != PASS_NONE)
Pass::add(pass_type, passes);
}
@@ -218,11 +221,12 @@ void BlenderSession::render()
scene->film->passes = passes;
scene->film->tag_update(scene);
- /* update session */
- session->reset(buffer_params, session_params.samples);
-
/* update scene */
- sync->sync_data(b_v3d, b_iter->name().c_str());
+ sync->sync_data(b_v3d, b_engine.camera_override(), b_iter->name().c_str());
+
+ /* update session */
+ int samples = sync->get_layer_samples();
+ session->reset(buffer_params, (samples == 0)? session_params.samples: samples);
/* render */
session->start();
@@ -309,7 +313,7 @@ void BlenderSession::synchronize()
}
/* data and camera synchronize */
- sync->sync_data(b_v3d);
+ sync->sync_data(b_v3d, b_engine.camera_override());
if(b_rv3d)
sync->sync_view(b_v3d, b_rv3d, width, height);
diff --git a/intern/cycles/blender/blender_shader.cpp b/intern/cycles/blender/blender_shader.cpp
index 52d97753db3..b33de789631 100644
--- a/intern/cycles/blender/blender_shader.cpp
+++ b/intern/cycles/blender/blender_shader.cpp
@@ -97,6 +97,13 @@ static void get_tex_mapping(TextureMapping *mapping, BL::ShaderNodeMapping b_map
mapping->translation = get_float3(b_mapping.translation());
mapping->rotation = get_float3(b_mapping.rotation());
mapping->scale = get_float3(b_mapping.scale());
+
+ mapping->use_minmax = b_mapping.use_min() || b_mapping.use_max();
+
+ if(b_mapping.use_min())
+ mapping->min = get_float3(b_mapping.min());
+ if(b_mapping.use_max())
+ mapping->max = get_float3(b_mapping.max());
}
static ShaderNode *add_node(BL::BlendData b_data, ShaderGraph *graph, BL::ShaderNode b_node)
@@ -323,6 +330,10 @@ static ShaderNode *add_node(BL::BlendData b_data, ShaderGraph *graph, BL::Shader
node = new LightPathNode();
break;
}
+ case BL::ShaderNode::type_LIGHT_FALLOFF: {
+ node = new LightFalloffNode();
+ break;
+ }
case BL::ShaderNode::type_TEX_IMAGE: {
BL::ShaderNodeTexImage b_image_node(b_node);
BL::Image b_image(b_image_node.image());
diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp
index 5a286298774..c0b6e210bb1 100644
--- a/intern/cycles/blender/blender_sync.cpp
+++ b/intern/cycles/blender/blender_sync.cpp
@@ -87,7 +87,7 @@ bool BlenderSync::sync_recalc()
if(object_is_mesh(*b_ob)) {
if(b_ob->is_updated_data() || b_ob->data().is_updated()) {
- BL::ID key = object_is_modified(*b_ob)? *b_ob: b_ob->data();
+ BL::ID key = BKE_object_is_modified(*b_ob)? *b_ob: b_ob->data();
mesh_map.set_recalc(key);
}
}
@@ -121,19 +121,21 @@ bool BlenderSync::sync_recalc()
return recalc;
}
-void BlenderSync::sync_data(BL::SpaceView3D b_v3d, const char *layer)
+void BlenderSync::sync_data(BL::SpaceView3D b_v3d, BL::Object b_override, const char *layer)
{
sync_render_layers(b_v3d, layer);
sync_integrator();
sync_film();
sync_shaders();
sync_objects(b_v3d);
+ sync_motion(b_v3d, b_override);
}
/* Integrator */
void BlenderSync::sync_integrator()
{
+ BL::RenderSettings r = b_scene.render();
PointerRNA cscene = RNA_pointer_get(&b_scene.ptr, "cycles");
experimental = (RNA_enum_get(&cscene, "feature_set") != 0);
@@ -153,11 +155,16 @@ void BlenderSync::sync_integrator()
integrator->transparent_shadows = get_boolean(cscene, "use_transparent_shadows");
integrator->no_caustics = get_boolean(cscene, "no_caustics");
+ integrator->filter_glossy = get_float(cscene, "blur_glossy");
+
integrator->seed = get_int(cscene, "seed");
integrator->layer_flag = render_layer.layer;
integrator->sample_clamp = get_float(cscene, "sample_clamp");
+#ifdef __MOTION__
+ integrator->motion_blur = (!preview && r.use_motion_blur());
+#endif
if(integrator->modified(previntegrator))
integrator->tag_update(scene);
@@ -208,6 +215,8 @@ void BlenderSync::sync_render_layers(BL::SpaceView3D b_v3d, const char *layer)
render_layer.holdout_layer = 0;
render_layer.material_override = PointerRNA_NULL;
render_layer.use_background = true;
+ render_layer.use_viewport_visibility = true;
+ render_layer.samples = 0;
return;
}
}
@@ -220,12 +229,14 @@ void BlenderSync::sync_render_layers(BL::SpaceView3D b_v3d, const char *layer)
for(r.layers.begin(b_rlay); b_rlay != r.layers.end(); ++b_rlay) {
if((!layer && first_layer) || (layer && b_rlay->name() == layer)) {
render_layer.name = b_rlay->name();
- render_layer.scene_layer = get_layer(b_scene.layers());
+ render_layer.scene_layer = get_layer(b_scene.layers()) & ~get_layer(b_rlay->layers_exclude());
render_layer.layer = get_layer(b_rlay->layers());
render_layer.holdout_layer = get_layer(b_rlay->layers_zmask());
render_layer.layer |= render_layer.holdout_layer;
render_layer.material_override = b_rlay->material_override();
render_layer.use_background = b_rlay->use_sky();
+ render_layer.use_viewport_visibility = false;
+ render_layer.samples = b_rlay->samples();
}
first_layer = false;
diff --git a/intern/cycles/blender/blender_sync.h b/intern/cycles/blender/blender_sync.h
index d2550a1ffd7..10afd468850 100644
--- a/intern/cycles/blender/blender_sync.h
+++ b/intern/cycles/blender/blender_sync.h
@@ -54,9 +54,10 @@ public:
/* sync */
bool sync_recalc();
- void sync_data(BL::SpaceView3D b_v3d, const char *layer = 0);
+ void sync_data(BL::SpaceView3D b_v3d, BL::Object b_override, const char *layer = 0);
void sync_camera(BL::Object b_override, int width, int height);
void sync_view(BL::SpaceView3D b_v3d, BL::RegionView3D b_rv3d, int width, int height);
+ int get_layer_samples() { return render_layer.samples; }
/* get parameters */
static SceneParams get_scene_params(BL::Scene b_scene, bool background);
@@ -68,7 +69,8 @@ private:
/* sync */
void sync_lamps();
void sync_materials();
- void sync_objects(BL::SpaceView3D b_v3d);
+ void sync_objects(BL::SpaceView3D b_v3d, int motion = 0);
+ void sync_motion(BL::SpaceView3D b_v3d, BL::Object b_override);
void sync_film();
void sync_integrator();
void sync_view();
@@ -77,14 +79,16 @@ private:
void sync_shaders();
void sync_nodes(Shader *shader, BL::ShaderNodeTree b_ntree);
- Mesh *sync_mesh(BL::Object b_ob, bool holdout, bool object_updated);
- void sync_object(BL::Object b_parent, int b_index, BL::Object b_object, Transform& tfm, uint layer_flag);
+ Mesh *sync_mesh(BL::Object b_ob, bool object_updated);
+ void sync_object(BL::Object b_parent, int b_index, BL::Object b_object, Transform& tfm, uint layer_flag, int motion);
void sync_light(BL::Object b_parent, int b_index, BL::Object b_ob, Transform& tfm);
void sync_background_light();
+ void sync_mesh_motion(BL::Object b_ob, Mesh *mesh, int motion);
+ void sync_camera_motion(BL::Object b_ob, int motion);
/* util */
void find_shader(BL::ID id, vector<uint>& used_shaders, int default_shader);
- bool object_is_modified(BL::Object b_ob);
+ bool BKE_object_is_modified(BL::Object b_ob);
bool object_is_mesh(BL::Object b_ob);
bool object_is_light(BL::Object b_ob);
@@ -108,7 +112,9 @@ private:
RenderLayerInfo()
: scene_layer(0), layer(0), holdout_layer(0),
material_override(PointerRNA_NULL),
- use_background(true)
+ use_background(true),
+ use_viewport_visibility(false),
+ samples(0)
{}
string name;
@@ -117,6 +123,8 @@ private:
uint holdout_layer;
BL::Material material_override;
bool use_background;
+ bool use_viewport_visibility;
+ int samples;
} render_layer;
};
diff --git a/intern/cycles/blender/blender_util.h b/intern/cycles/blender/blender_util.h
index 67f3a3ab7d9..b01fa81ee40 100644
--- a/intern/cycles/blender/blender_util.h
+++ b/intern/cycles/blender/blender_util.h
@@ -49,8 +49,10 @@ void RE_engine_update_progress(struct RenderEngine *engine, float progress);
void engine_tag_redraw(void *engine);
void engine_tag_update(void *engine);
int rna_Object_is_modified(void *ob, void *scene, int settings);
+int rna_Object_is_deform_modified(void *ob, void *scene, int settings);
void BLI_timestr(double _time, char *str);
void rna_ColorRamp_eval(void *coba, float position, float color[4]);
+void rna_Scene_frame_set(void *scene, int frame, float subframe);
}
@@ -89,11 +91,21 @@ static inline void object_free_duplilist(BL::Object self)
rna_Object_free_duplilist(self.ptr.data, NULL);
}
-static inline bool object_is_modified(BL::Object self, BL::Scene scene, bool preview)
+static inline bool BKE_object_is_modified(BL::Object self, BL::Scene scene, bool preview)
{
return rna_Object_is_modified(self.ptr.data, scene.ptr.data, (preview)? (1<<0): (1<<1))? true: false;
}
+static inline bool BKE_object_is_deform_modified(BL::Object self, BL::Scene scene, bool preview)
+{
+ return rna_Object_is_deform_modified(self.ptr.data, scene.ptr.data, (preview)? (1<<0): (1<<1))? true: false;
+}
+
+static inline void scene_frame_set(BL::Scene scene, int frame)
+{
+ rna_Scene_frame_set(scene.ptr.data, frame, 0.0f);
+}
+
/* Utilities */
static inline Transform get_transform(BL::Array<float, 16> array)
diff --git a/intern/cycles/bvh/CMakeLists.txt b/intern/cycles/bvh/CMakeLists.txt
index decc576fe51..131a7a1f750 100644
--- a/intern/cycles/bvh/CMakeLists.txt
+++ b/intern/cycles/bvh/CMakeLists.txt
@@ -10,17 +10,21 @@ set(INC
set(SRC
bvh.cpp
+ bvh_binning.cpp
bvh_build.cpp
bvh_node.cpp
bvh_sort.cpp
+ bvh_split.cpp
)
set(SRC_HEADERS
bvh.h
+ bvh_binning.h
bvh_build.h
bvh_node.h
bvh_params.h
bvh_sort.h
+ bvh_split.h
)
include_directories(${INC})
diff --git a/intern/cycles/bvh/bvh.cpp b/intern/cycles/bvh/bvh.cpp
index c9bfa964332..15695dddf45 100644
--- a/intern/cycles/bvh/bvh.cpp
+++ b/intern/cycles/bvh/bvh.cpp
@@ -530,7 +530,7 @@ void RegularBVH::refit_nodes()
{
assert(!params.top_level);
- BoundBox bbox;
+ BoundBox bbox = BoundBox::empty;
uint visibility = 0;
refit_node(0, (pack.is_leaf[0])? true: false, bbox, visibility);
}
@@ -572,7 +572,7 @@ void RegularBVH::refit_node(int idx, bool leaf, BoundBox& bbox, uint& visibility
}
else {
/* refit inner node, set bbox from children */
- BoundBox bbox0, bbox1;
+ BoundBox bbox0 = BoundBox::empty, bbox1 = BoundBox::empty;
uint visibility0 = 0, visibility1 = 0;
refit_node((c0 < 0)? -c0-1: c0, (c0 < 0), bbox0, visibility0);
diff --git a/intern/cycles/bvh/bvh_binning.cpp b/intern/cycles/bvh/bvh_binning.cpp
new file mode 100644
index 00000000000..e4b88584a33
--- /dev/null
+++ b/intern/cycles/bvh/bvh_binning.cpp
@@ -0,0 +1,224 @@
+/*
+ * Adapted from code copyright 2009-2011 Intel Corporation
+ * Modifications Copyright 2012, Blender Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//#define __KERNEL_SSE__
+
+#include <stdlib.h>
+
+#include "bvh_binning.h"
+
+#include "util_algorithm.h"
+#include "util_boundbox.h"
+#include "util_types.h"
+
+CCL_NAMESPACE_BEGIN
+
+/* SSE replacements */
+
+__forceinline void prefetch_L1 (const void* ptr) { }
+__forceinline void prefetch_L2 (const void* ptr) { }
+__forceinline void prefetch_L3 (const void* ptr) { }
+__forceinline void prefetch_NTA(const void* ptr) { }
+
+template<size_t src> __forceinline float extract(const int4& b)
+{ return b[src]; }
+template<size_t dst> __forceinline const float4 insert(const float4& a, const float b)
+{ float4 r = a; r[dst] = b; return r; }
+
+__forceinline int get_best_dimension(const float4& bestSAH)
+{
+ // return (int)__bsf(movemask(reduce_min(bestSAH) == bestSAH));
+
+ float minSAH = min(bestSAH.x, min(bestSAH.y, bestSAH.z));
+
+ if(bestSAH.x == minSAH) return 0;
+ else if(bestSAH.y == minSAH) return 1;
+ else return 2;
+}
+
+/* BVH Object Binning */
+
+BVHObjectBinning::BVHObjectBinning(const BVHRange& job, BVHReference *prims)
+: BVHRange(job), splitSAH(FLT_MAX), dim(0), pos(0)
+{
+ /* compute number of bins to use and precompute scaling factor for binning */
+ num_bins = min(size_t(MAX_BINS), size_t(4.0f + 0.05f*size()));
+ scale = rcp(cent_bounds().size()) * make_float3((float)num_bins);
+
+ /* initialize binning counter and bounds */
+ BoundBox bin_bounds[MAX_BINS][4]; /* bounds for every bin in every dimension */
+ int4 bin_count[MAX_BINS]; /* number of primitives mapped to bin */
+
+ for(size_t i = 0; i < num_bins; i++) {
+ bin_count[i] = make_int4(0);
+ bin_bounds[i][0] = bin_bounds[i][1] = bin_bounds[i][2] = BoundBox::empty;
+ }
+
+ /* map geometry to bins, unrolled once */
+ {
+ ssize_t i;
+
+ for(i = 0; i < ssize_t(size()) - 1; i += 2) {
+ prefetch_L2(&prims[start() + i + 8]);
+
+ /* map even and odd primitive to bin */
+ BVHReference prim0 = prims[start() + i + 0];
+ BVHReference prim1 = prims[start() + i + 1];
+
+ int4 bin0 = get_bin(prim0.bounds());
+ int4 bin1 = get_bin(prim1.bounds());
+
+ /* increase bounds for bins for even primitive */
+ int b00 = extract<0>(bin0); bin_count[b00][0]++; bin_bounds[b00][0].grow(prim0.bounds());
+ int b01 = extract<1>(bin0); bin_count[b01][1]++; bin_bounds[b01][1].grow(prim0.bounds());
+ int b02 = extract<2>(bin0); bin_count[b02][2]++; bin_bounds[b02][2].grow(prim0.bounds());
+
+ /* increase bounds of bins for odd primitive */
+ int b10 = extract<0>(bin1); bin_count[b10][0]++; bin_bounds[b10][0].grow(prim1.bounds());
+ int b11 = extract<1>(bin1); bin_count[b11][1]++; bin_bounds[b11][1].grow(prim1.bounds());
+ int b12 = extract<2>(bin1); bin_count[b12][2]++; bin_bounds[b12][2].grow(prim1.bounds());
+ }
+
+ /* for uneven number of primitives */
+ if(i < ssize_t(size())) {
+ /* map primitive to bin */
+ BVHReference prim0 = prims[start() + i];
+ int4 bin0 = get_bin(prim0.bounds());
+
+ /* increase bounds of bins */
+ int b00 = extract<0>(bin0); bin_count[b00][0]++; bin_bounds[b00][0].grow(prim0.bounds());
+ int b01 = extract<1>(bin0); bin_count[b01][1]++; bin_bounds[b01][1].grow(prim0.bounds());
+ int b02 = extract<2>(bin0); bin_count[b02][2]++; bin_bounds[b02][2].grow(prim0.bounds());
+ }
+ }
+
+ /* sweep from right to left and compute parallel prefix of merged bounds */
+ float4 r_area[MAX_BINS]; /* area of bounds of primitives on the right */
+ float4 r_count[MAX_BINS]; /* number of primitives on the right */
+ int4 count = make_int4(0);
+
+ BoundBox bx = BoundBox::empty;
+ BoundBox by = BoundBox::empty;
+ BoundBox bz = BoundBox::empty;
+
+ for(size_t i = num_bins - 1; i > 0; i--) {
+ count = count + bin_count[i];
+ r_count[i] = blocks(count);
+
+ bx = merge(bx,bin_bounds[i][0]); r_area[i][0] = bx.half_area();
+ by = merge(by,bin_bounds[i][1]); r_area[i][1] = by.half_area();
+ bz = merge(bz,bin_bounds[i][2]); r_area[i][2] = bz.half_area();
+ r_area[i][3] = r_area[i][2];
+ }
+
+ /* sweep from left to right and compute SAH */
+ int4 ii = make_int4(1);
+ float4 bestSAH = make_float4(FLT_MAX);
+ int4 bestSplit = make_int4(-1);
+
+ count = make_int4(0);
+
+ bx = BoundBox::empty;
+ by = BoundBox::empty;
+ bz = BoundBox::empty;
+
+ for(size_t i = 1; i < num_bins; i++, ii += make_int4(1)) {
+ count = count + bin_count[i-1];
+
+ bx = merge(bx,bin_bounds[i-1][0]); float Ax = bx.half_area();
+ by = merge(by,bin_bounds[i-1][1]); float Ay = by.half_area();
+ bz = merge(bz,bin_bounds[i-1][2]); float Az = bz.half_area();
+
+ float4 lCount = blocks(count);
+ float4 lArea = make_float4(Ax,Ay,Az,Az);
+ float4 sah = lArea*lCount + r_area[i]*r_count[i];
+
+ bestSplit = select(sah < bestSAH,ii,bestSplit);
+ bestSAH = min(sah,bestSAH);
+ }
+
+ int4 mask = float3_to_float4(cent_bounds().size()) <= make_float4(0.0f);
+ bestSAH = insert<3>(select(mask, make_float4(FLT_MAX), bestSAH), FLT_MAX);
+
+ /* find best dimension */
+ dim = get_best_dimension(bestSAH);
+ splitSAH = bestSAH[dim];
+ pos = bestSplit[dim];
+ leafSAH = bounds().half_area() * blocks(size());
+}
+
+void BVHObjectBinning::split(BVHReference* prims, BVHObjectBinning& left_o, BVHObjectBinning& right_o) const
+{
+ size_t N = size();
+
+ BoundBox lgeom_bounds = BoundBox::empty;
+ BoundBox rgeom_bounds = BoundBox::empty;
+ BoundBox lcent_bounds = BoundBox::empty;
+ BoundBox rcent_bounds = BoundBox::empty;
+
+ ssize_t l = 0, r = N-1;
+
+ while(l <= r) {
+ prefetch_L2(&prims[start() + l + 8]);
+ prefetch_L2(&prims[start() + r - 8]);
+
+ BVHReference prim = prims[start() + l];
+ float3 center = prim.bounds().center2();
+
+ if(get_bin(center)[dim] < pos) {
+ lgeom_bounds.grow(prim.bounds());
+ lcent_bounds.grow(center);
+ l++;
+ }
+ else {
+ rgeom_bounds.grow(prim.bounds());
+ rcent_bounds.grow(center);
+ swap(prims[start()+l],prims[start()+r]);
+ r--;
+ }
+ }
+
+ /* finish */
+ if(l != 0 && N-1-r != 0) {
+ right_o = BVHObjectBinning(BVHRange(rgeom_bounds, rcent_bounds, start() + l, N-1-r), prims);
+ left_o = BVHObjectBinning(BVHRange(lgeom_bounds, lcent_bounds, start(), l), prims);
+ return;
+ }
+
+ /* object medium split if we did not make progress, can happen when all
+ primitives have same centroid */
+ lgeom_bounds = BoundBox::empty;
+ rgeom_bounds = BoundBox::empty;
+ lcent_bounds = BoundBox::empty;
+ rcent_bounds = BoundBox::empty;
+
+ for(size_t i = 0; i < N/2; i++) {
+ lgeom_bounds.grow(prims[start()+i].bounds());
+ lcent_bounds.grow(prims[start()+i].bounds().center2());
+ }
+
+ for(size_t i = N/2; i < N; i++) {
+ rgeom_bounds.grow(prims[start()+i].bounds());
+ rcent_bounds.grow(prims[start()+i].bounds().center2());
+ }
+
+ right_o = BVHObjectBinning(BVHRange(rgeom_bounds, rcent_bounds, start() + N/2, N/2 + N%2), prims);
+ left_o = BVHObjectBinning(BVHRange(lgeom_bounds, lcent_bounds, start(), N/2), prims);
+}
+
+CCL_NAMESPACE_END
+
diff --git a/intern/cycles/bvh/bvh_binning.h b/intern/cycles/bvh/bvh_binning.h
new file mode 100644
index 00000000000..60742157055
--- /dev/null
+++ b/intern/cycles/bvh/bvh_binning.h
@@ -0,0 +1,86 @@
+/*
+ * Adapted from code copyright 2009-2011 Intel Corporation
+ * Modifications Copyright 2012, Blender Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __BVH_BINNING_H__
+#define __BVH_BINNING_H__
+
+#include "bvh_params.h"
+
+#include "util_types.h"
+
+CCL_NAMESPACE_BEGIN
+
+/* Single threaded object binner. Finds the split with the best SAH heuristic
+ * by testing for each dimension multiple partitionings for regular spaced
+ * partition locations. A partitioning for a partition location is computed,
+ * by putting primitives whose centroid is on the left and right of the split
+ * location to different sets. The SAH is evaluated by computing the number of
+ * blocks occupied by the primitives in the partitions. */
+
+class BVHObjectBinning : public BVHRange
+{
+public:
+ __forceinline BVHObjectBinning() {}
+ BVHObjectBinning(const BVHRange& job, BVHReference *prims);
+
+ void split(BVHReference *prims, BVHObjectBinning& left_o, BVHObjectBinning& right_o) const;
+
+ float splitSAH; /* SAH cost of the best split */
+ float leafSAH; /* SAH cost of creating a leaf */
+
+protected:
+ int dim; /* best split dimension */
+ int pos; /* best split position */
+ size_t num_bins; /* actual number of bins to use */
+ float3 scale; /* scaling factor to compute bin */
+
+ enum { MAX_BINS = 32 };
+ enum { LOG_BLOCK_SIZE = 2 };
+
+ /* computes the bin numbers for each dimension for a box. */
+ __forceinline int4 get_bin(const BoundBox& box) const
+ {
+ int4 a = make_int4((box.center2() - cent_bounds().min)*scale - make_float3(0.5f));
+ int4 mn = make_int4(0);
+ int4 mx = make_int4((int)num_bins-1);
+
+ return clamp(a, mn, mx);
+ }
+
+ /* computes the bin numbers for each dimension for a point. */
+ __forceinline int4 get_bin(const float3& c) const
+ {
+ return make_int4((c - cent_bounds().min)*scale - make_float3(0.5f));
+ }
+
+ /* compute the number of blocks occupied for each dimension. */
+ __forceinline float4 blocks(const int4& a) const
+ {
+ return make_float4((a + make_int4((1 << LOG_BLOCK_SIZE)-1)) >> LOG_BLOCK_SIZE);
+ }
+
+ /* compute the number of blocks occupied in one dimension. */
+ __forceinline int blocks(size_t a) const
+ {
+ return (int)((a+((1LL << LOG_BLOCK_SIZE)-1)) >> LOG_BLOCK_SIZE);
+ }
+};
+
+CCL_NAMESPACE_END
+
+#endif
+
diff --git a/intern/cycles/bvh/bvh_build.cpp b/intern/cycles/bvh/bvh_build.cpp
index 38674c2c561..28237aea611 100644
--- a/intern/cycles/bvh/bvh_build.cpp
+++ b/intern/cycles/bvh/bvh_build.cpp
@@ -15,22 +15,36 @@
* limitations under the License.
*/
+#include "bvh_binning.h"
#include "bvh_build.h"
#include "bvh_node.h"
#include "bvh_params.h"
-#include "bvh_sort.h"
+#include "bvh_split.h"
#include "mesh.h"
#include "object.h"
#include "scene.h"
-#include "util_algorithm.h"
+#include "util_debug.h"
#include "util_foreach.h"
#include "util_progress.h"
#include "util_time.h"
CCL_NAMESPACE_BEGIN
+/* BVH Build Task */
+
+class BVHBuildTask : public Task {
+public:
+ BVHBuildTask(BVHBuild *build, InnerNode *node, int child, BVHObjectBinning& range_, int level)
+ : range(range_)
+ {
+ run = function_bind(&BVHBuild::thread_build_node, build, node, child, &range, level);
+ }
+
+ BVHObjectBinning range;
+};
+
/* Constructor / Destructor */
BVHBuild::BVHBuild(const vector<Object*>& objects_,
@@ -44,7 +58,6 @@ BVHBuild::BVHBuild(const vector<Object*>& objects_,
progress_start_time(0.0)
{
spatial_min_overlap = 0.0f;
- progress_num_duplicates = 0;
}
BVHBuild::~BVHBuild()
@@ -53,57 +66,63 @@ BVHBuild::~BVHBuild()
/* Adding References */
-void BVHBuild::add_reference_mesh(NodeSpec& root, Mesh *mesh, int i)
+void BVHBuild::add_reference_mesh(BoundBox& root, BoundBox& center, Mesh *mesh, int i)
{
for(uint j = 0; j < mesh->triangles.size(); j++) {
Mesh::Triangle t = mesh->triangles[j];
- Reference ref;
+ BoundBox bounds = BoundBox::empty;
for(int k = 0; k < 3; k++) {
float3 pt = mesh->verts[t.v[k]];
- ref.bounds.grow(pt);
+ bounds.grow(pt);
}
- if(ref.bounds.valid()) {
- ref.prim_index = j;
- ref.prim_object = i;
-
- references.push_back(ref);
- root.bounds.grow(ref.bounds);
+ if(bounds.valid()) {
+ references.push_back(BVHReference(bounds, j, i));
+ root.grow(bounds);
+ center.grow(bounds.center2());
}
}
}
-void BVHBuild::add_reference_object(NodeSpec& root, Object *ob, int i)
+void BVHBuild::add_reference_object(BoundBox& root, BoundBox& center, Object *ob, int i)
{
- Reference ref;
-
- ref.prim_index = -1;
- ref.prim_object = i;
- ref.bounds = ob->bounds;
-
- references.push_back(ref);
- root.bounds.grow(ref.bounds);
+ references.push_back(BVHReference(ob->bounds, -1, i));
+ root.grow(ob->bounds);
+ center.grow(ob->bounds.center2());
}
-void BVHBuild::add_references(NodeSpec& root)
+void BVHBuild::add_references(BVHRange& root)
{
- /* init root spec */
- root.num = 0;
- root.bounds = BoundBox();
+ /* reserve space for references */
+ size_t num_alloc_references = 0;
+
+ foreach(Object *ob, objects) {
+ if(params.top_level) {
+ if(ob->mesh->transform_applied)
+ num_alloc_references += ob->mesh->triangles.size();
+ else
+ num_alloc_references++;
+ }
+ else
+ num_alloc_references += ob->mesh->triangles.size();
+ }
- /* add objects */
+ references.reserve(num_alloc_references);
+
+ /* add references from objects */
+ BoundBox bounds = BoundBox::empty, center = BoundBox::empty;
int i = 0;
foreach(Object *ob, objects) {
if(params.top_level) {
if(ob->mesh->transform_applied)
- add_reference_mesh(root, ob->mesh, i);
+ add_reference_mesh(bounds, center, ob->mesh, i);
else
- add_reference_object(root, ob, i);
+ add_reference_object(bounds, center, ob, i);
}
else
- add_reference_mesh(root, ob->mesh, i);
+ add_reference_mesh(bounds, center, ob->mesh, i);
i++;
@@ -111,129 +130,212 @@ void BVHBuild::add_references(NodeSpec& root)
}
/* happens mostly on empty meshes */
- if(!root.bounds.valid())
- root.bounds.grow(make_float3(0.0f, 0.0f, 0.0f));
+ if(!bounds.valid())
+ bounds.grow(make_float3(0.0f, 0.0f, 0.0f));
- root.num = references.size();
+ root = BVHRange(bounds, center, 0, references.size());
}
/* Build */
BVHNode* BVHBuild::run()
{
- NodeSpec root;
+ BVHRange root;
/* add references */
add_references(root);
- if(progress.get_cancel()) return NULL;
+ if(progress.get_cancel())
+ return NULL;
/* init spatial splits */
if(params.top_level) /* todo: get rid of this */
params.use_spatial_split = false;
- spatial_min_overlap = root.bounds.area() * params.spatial_split_alpha;
+ spatial_min_overlap = root.bounds().safe_area() * params.spatial_split_alpha;
spatial_right_bounds.clear();
- spatial_right_bounds.resize(max(root.num, (int)BVHParams::NUM_SPATIAL_BINS) - 1);
+ spatial_right_bounds.resize(max(root.size(), (int)BVHParams::NUM_SPATIAL_BINS) - 1);
/* init progress updates */
- progress_num_duplicates = 0;
progress_start_time = time_dt();
+ progress_count = 0;
+ progress_total = references.size();
+ progress_original_total = progress_total;
+
+ prim_index.resize(references.size());
+ prim_object.resize(references.size());
/* build recursively */
- return build_node(root, 0, 0.0f, 1.0f);
+ BVHNode *rootnode;
+
+ if(params.use_spatial_split) {
+ /* singlethreaded spatial split build */
+ rootnode = build_node(root, 0);
+ }
+ else {
+ /* multithreaded binning build */
+ BVHObjectBinning rootbin(root, (references.size())? &references[0]: NULL);
+ rootnode = build_node(rootbin, 0);
+ task_pool.wait_work();
+ }
+
+ /* delete if we cancelled */
+ if(rootnode) {
+ if(progress.get_cancel()) {
+ rootnode->deleteSubtree();
+ rootnode = NULL;
+ }
+ else if(!params.use_spatial_split) {
+ /*rotate(rootnode, 4, 5);*/
+ rootnode->update_visibility();
+ }
+ }
+
+ return rootnode;
}
-void BVHBuild::progress_update(float progress_start, float progress_end)
+void BVHBuild::progress_update()
{
if(time_dt() - progress_start_time < 0.25f)
return;
+
+ double progress_start = (double)progress_count/(double)progress_total;
+ double duplicates = (double)(progress_total - progress_original_total)/(double)progress_total;
- float duplicates = (float)progress_num_duplicates/(float)references.size();
string msg = string_printf("Building BVH %.0f%%, duplicates %.0f%%",
progress_start*100.0f, duplicates*100.0f);
progress.set_substatus(msg);
- progress_start_time = time_dt();
+ progress_start_time = time_dt();
}
-BVHNode* BVHBuild::build_node(const NodeSpec& spec, int level, float progress_start, float progress_end)
+void BVHBuild::thread_build_node(InnerNode *inner, int child, BVHObjectBinning *range, int level)
{
- /* progress update */
- progress_update(progress_start, progress_end);
- if(progress.get_cancel()) return NULL;
+ if(progress.get_cancel())
+ return;
- /* small enough or too deep => create leaf. */
- if(spec.num <= params.min_leaf_size || level >= BVHParams::MAX_DEPTH)
- return create_leaf_node(spec);
-
- /* find split candidates. */
- float area = spec.bounds.area();
- float leafSAH = area * params.triangle_cost(spec.num);
- float nodeSAH = area * params.node_cost(2);
- ObjectSplit object = find_object_split(spec, nodeSAH);
- SpatialSplit spatial;
-
- if(params.use_spatial_split && level < BVHParams::MAX_SPATIAL_DEPTH) {
- BoundBox overlap = object.left_bounds;
- overlap.intersect(object.right_bounds);
-
- if(overlap.area() >= spatial_min_overlap)
- spatial = find_spatial_split(spec, nodeSAH);
- }
+ /* build nodes */
+ BVHNode *node = build_node(*range, level);
+
+ /* set child in inner node */
+ inner->children[child] = node;
- /* leaf SAH is the lowest => create leaf. */
- float minSAH = min(min(leafSAH, object.sah), spatial.sah);
+ /* update progress */
+ if(range->size() < THREAD_TASK_SIZE) {
+ /*rotate(node, INT_MAX, 5);*/
- if(minSAH == leafSAH && spec.num <= params.max_leaf_size)
- return create_leaf_node(spec);
+ thread_scoped_lock lock(build_mutex);
- /* perform split. */
- NodeSpec left, right;
+ progress_count += range->size();
+ progress_update();
+ }
+}
+
+/* multithreaded binning builder */
+BVHNode* BVHBuild::build_node(const BVHObjectBinning& range, int level)
+{
+ size_t size = range.size();
+ float leafSAH = params.sah_triangle_cost * range.leafSAH;
+ float splitSAH = params.sah_node_cost * range.bounds().half_area() + params.sah_triangle_cost * range.splitSAH;
- if(params.use_spatial_split && minSAH == spatial.sah)
- do_spatial_split(left, right, spec, spatial);
- if(!left.num || !right.num)
- do_object_split(left, right, spec, object);
+ /* make leaf node when threshold reached or SAH tells us */
+ if(params.small_enough_for_leaf(size, level) || (size <= params.max_leaf_size && leafSAH < splitSAH))
+ return create_leaf_node(range);
+
+ /* perform split */
+ BVHObjectBinning left, right;
+ range.split(&references[0], left, right);
/* create inner node. */
- progress_num_duplicates += left.num + right.num - spec.num;
+ InnerNode *inner;
- float progress_mid = lerp(progress_start, progress_end, (float)right.num / (float)(left.num + right.num));
+ if(range.size() < THREAD_TASK_SIZE) {
+ /* local build */
+ BVHNode *leftnode = build_node(left, level + 1);
+ BVHNode *rightnode = build_node(right, level + 1);
- BVHNode* rightNode = build_node(right, level + 1, progress_start, progress_mid);
- if(progress.get_cancel()) {
- if(rightNode) rightNode->deleteSubtree();
- return NULL;
+ inner = new InnerNode(range.bounds(), leftnode, rightnode);
}
+ else {
+ /* threaded build */
+ inner = new InnerNode(range.bounds());
+
+ task_pool.push(new BVHBuildTask(this, inner, 0, left, level + 1), true);
+ task_pool.push(new BVHBuildTask(this, inner, 1, right, level + 1), true);
+ }
+
+ return inner;
+}
- BVHNode* leftNode = build_node(left, level + 1, progress_mid, progress_end);
- if(progress.get_cancel()) {
- if(leftNode) leftNode->deleteSubtree();
+/* single threaded spatial split builder */
+BVHNode* BVHBuild::build_node(const BVHRange& range, int level)
+{
+ /* progress update */
+ progress_update();
+ if(progress.get_cancel())
return NULL;
+
+ /* small enough or too deep => create leaf. */
+ if(params.small_enough_for_leaf(range.size(), level)) {
+ progress_count += range.size();
+ return create_leaf_node(range);
+ }
+
+ /* splitting test */
+ BVHMixedSplit split(this, range, level);
+
+ if(split.no_split) {
+ progress_count += range.size();
+ return create_leaf_node(range);
}
+
+ /* do split */
+ BVHRange left, right;
+ split.split(this, left, right, range);
+
+ progress_total += left.size() + right.size() - range.size();
+ size_t total = progress_total;
+
+ /* leaft node */
+ BVHNode *leftnode = build_node(left, level + 1);
+
+ /* right node (modify start for splits) */
+ right.set_start(right.start() + progress_total - total);
+ BVHNode *rightnode = build_node(right, level + 1);
- return new InnerNode(spec.bounds, leftNode, rightNode);
+ /* inner node */
+ return new InnerNode(range.bounds(), leftnode, rightnode);
}
-BVHNode *BVHBuild::create_object_leaf_nodes(const Reference *ref, int num)
+/* Create Nodes */
+
+BVHNode *BVHBuild::create_object_leaf_nodes(const BVHReference *ref, int start, int num)
{
if(num == 0) {
- BoundBox bounds;
+ BoundBox bounds = BoundBox::empty;
return new LeafNode(bounds, 0, 0, 0);
}
else if(num == 1) {
- prim_index.push_back(ref[0].prim_index);
- prim_object.push_back(ref[0].prim_object);
- uint visibility = objects[ref[0].prim_object]->visibility;
- return new LeafNode(ref[0].bounds, visibility, prim_index.size()-1, prim_index.size());
+ if(start == prim_index.size()) {
+ assert(params.use_spatial_split);
+
+ prim_index.push_back(ref->prim_index());
+ prim_object.push_back(ref->prim_object());
+ }
+ else {
+ prim_index[start] = ref->prim_index();
+ prim_object[start] = ref->prim_object();
+ }
+
+ uint visibility = objects[ref->prim_object()]->visibility;
+ return new LeafNode(ref->bounds(), visibility, start, start+1);
}
else {
int mid = num/2;
- BVHNode *leaf0 = create_object_leaf_nodes(ref, mid);
- BVHNode *leaf1 = create_object_leaf_nodes(ref+mid, num-mid);
+ BVHNode *leaf0 = create_object_leaf_nodes(ref, start, mid);
+ BVHNode *leaf1 = create_object_leaf_nodes(ref+mid, start+mid, num-mid);
- BoundBox bounds;
+ BoundBox bounds = BoundBox::empty;
bounds.grow(leaf0->m_bounds);
bounds.grow(leaf1->m_bounds);
@@ -241,310 +343,136 @@ BVHNode *BVHBuild::create_object_leaf_nodes(const Reference *ref, int num)
}
}
-BVHNode* BVHBuild::create_leaf_node(const NodeSpec& spec)
+BVHNode* BVHBuild::create_leaf_node(const BVHRange& range)
{
vector<int>& p_index = prim_index;
vector<int>& p_object = prim_object;
- BoundBox bounds;
- int num = 0;
+ BoundBox bounds = BoundBox::empty;
+ int num = 0, ob_num = 0;
uint visibility = 0;
- for(int i = 0; i < spec.num; i++) {
- if(references.back().prim_index != -1) {
- p_index.push_back(references.back().prim_index);
- p_object.push_back(references.back().prim_object);
- bounds.grow(references.back().bounds);
- visibility |= objects[references.back().prim_object]->visibility;
- references.pop_back();
+ for(int i = 0; i < range.size(); i++) {
+ BVHReference& ref = references[range.start() + i];
+
+ if(ref.prim_index() != -1) {
+ if(range.start() + num == prim_index.size()) {
+ assert(params.use_spatial_split);
+
+ p_index.push_back(ref.prim_index());
+ p_object.push_back(ref.prim_object());
+ }
+ else {
+ p_index[range.start() + num] = ref.prim_index();
+ p_object[range.start() + num] = ref.prim_object();
+ }
+
+ bounds.grow(ref.bounds());
+ visibility |= objects[ref.prim_object()]->visibility;
num++;
}
+ else {
+ if(ob_num < i)
+ references[range.start() + ob_num] = ref;
+ ob_num++;
+ }
}
BVHNode *leaf = NULL;
if(num > 0) {
- leaf = new LeafNode(bounds, visibility, p_index.size() - num, p_index.size());
+ leaf = new LeafNode(bounds, visibility, range.start(), range.start() + num);
- if(num == spec.num)
+ if(num == range.size())
return leaf;
}
/* while there may be multiple triangles in a leaf, for object primitives
- * we want them to be the only one, so we */
- int ob_num = spec.num - num;
- const Reference *ref = (ob_num)? &references.back() - (ob_num - 1): NULL;
- BVHNode *oleaf = create_object_leaf_nodes(ref, ob_num);
- for(int i = 0; i < ob_num; i++)
- references.pop_back();
+ * we want there to be the only one, so we keep splitting */
+ const BVHReference *ref = (ob_num)? &references[range.start()]: NULL;
+ BVHNode *oleaf = create_object_leaf_nodes(ref, range.start() + num, ob_num);
if(leaf)
- return new InnerNode(spec.bounds, leaf, oleaf);
+ return new InnerNode(range.bounds(), leaf, oleaf);
else
return oleaf;
}
-/* Object Split */
+/* Tree Rotations */
-BVHBuild::ObjectSplit BVHBuild::find_object_split(const NodeSpec& spec, float nodeSAH)
+void BVHBuild::rotate(BVHNode *node, int max_depth, int iterations)
{
- ObjectSplit split;
- const Reference *ref_ptr = &references[references.size() - spec.num];
-
- for(int dim = 0; dim < 3; dim++) {
- /* sort references */
- bvh_reference_sort(references.size() - spec.num, references.size(), &references[0], dim);
-
- /* sweep right to left and determine bounds. */
- BoundBox right_bounds;
-
- for(int i = spec.num - 1; i > 0; i--) {
- right_bounds.grow(ref_ptr[i].bounds);
- spatial_right_bounds[i - 1] = right_bounds;
- }
-
- /* sweep left to right and select lowest SAH. */
- BoundBox left_bounds;
-
- for(int i = 1; i < spec.num; i++) {
- left_bounds.grow(ref_ptr[i - 1].bounds);
- right_bounds = spatial_right_bounds[i - 1];
-
- float sah = nodeSAH +
- left_bounds.area() * params.triangle_cost(i) +
- right_bounds.area() * params.triangle_cost(spec.num - i);
-
- if(sah < split.sah) {
- split.sah = sah;
- split.dim = dim;
- split.num_left = i;
- split.left_bounds = left_bounds;
- split.right_bounds = right_bounds;
- }
- }
- }
-
- return split;
+ /* in tested scenes, this resulted in slightly slower raytracing, so disabled
+ * it for now. could be implementation bug, or depend on the scene */
+ if(node)
+ for(int i = 0; i < iterations; i++)
+ rotate(node, max_depth);
}
-void BVHBuild::do_object_split(NodeSpec& left, NodeSpec& right, const NodeSpec& spec, const ObjectSplit& split)
+void BVHBuild::rotate(BVHNode *node, int max_depth)
{
- /* sort references according to split */
- int start = references.size() - spec.num;
- int end = references.size(); /* todo: is this right? */
-
- bvh_reference_sort(start, end, &references[0], split.dim);
-
- /* split node specs */
- left.num = split.num_left;
- left.bounds = split.left_bounds;
- right.num = spec.num - split.num_left;
- right.bounds = split.right_bounds;
-}
-
-/* Spatial Split */
-
-BVHBuild::SpatialSplit BVHBuild::find_spatial_split(const NodeSpec& spec, float nodeSAH)
-{
- /* initialize bins. */
- float3 origin = spec.bounds.min;
- float3 binSize = (spec.bounds.max - origin) * (1.0f / (float)BVHParams::NUM_SPATIAL_BINS);
- float3 invBinSize = 1.0f / binSize;
-
- for(int dim = 0; dim < 3; dim++) {
- for(int i = 0; i < BVHParams::NUM_SPATIAL_BINS; i++) {
- SpatialBin& bin = spatial_bins[dim][i];
-
- bin.bounds = BoundBox();
- bin.enter = 0;
- bin.exit = 0;
- }
- }
-
- /* chop references into bins. */
- for(unsigned int refIdx = references.size() - spec.num; refIdx < references.size(); refIdx++) {
- const Reference& ref = references[refIdx];
- float3 firstBinf = (ref.bounds.min - origin) * invBinSize;
- float3 lastBinf = (ref.bounds.max - origin) * invBinSize;
- int3 firstBin = make_int3((int)firstBinf.x, (int)firstBinf.y, (int)firstBinf.z);
- int3 lastBin = make_int3((int)lastBinf.x, (int)lastBinf.y, (int)lastBinf.z);
+ /* nothing to rotate if we reached a leaf node. */
+ if(node->is_leaf() || max_depth < 0)
+ return;
+
+ InnerNode *parent = (InnerNode*)node;
- firstBin = clamp(firstBin, 0, BVHParams::NUM_SPATIAL_BINS - 1);
- lastBin = clamp(lastBin, firstBin, BVHParams::NUM_SPATIAL_BINS - 1);
+ /* rotate all children first */
+ for(size_t c = 0; c < 2; c++)
+ rotate(parent->children[c], max_depth-1);
- for(int dim = 0; dim < 3; dim++) {
- Reference currRef = ref;
+ /* compute current area of all children */
+ BoundBox bounds0 = parent->children[0]->m_bounds;
+ BoundBox bounds1 = parent->children[1]->m_bounds;
- for(int i = firstBin[dim]; i < lastBin[dim]; i++) {
- Reference leftRef, rightRef;
+ float area0 = bounds0.half_area();
+ float area1 = bounds1.half_area();
+ float4 child_area = make_float4(area0, area1, 0.0f, 0.0f);
- split_reference(leftRef, rightRef, currRef, dim, origin[dim] + binSize[dim] * (float)(i + 1));
- spatial_bins[dim][i].bounds.grow(leftRef.bounds);
- currRef = rightRef;
- }
+ /* find best rotation. we pick a target child of a first child, and swap
+ * this with an other child. we perform the best such swap. */
+ float best_cost = FLT_MAX;
+ int best_child = -1, bets_target = -1, best_other = -1;
- spatial_bins[dim][lastBin[dim]].bounds.grow(currRef.bounds);
- spatial_bins[dim][firstBin[dim]].enter++;
- spatial_bins[dim][lastBin[dim]].exit++;
- }
- }
+ for(size_t c = 0; c < 2; c++) {
+ /* ignore leaf nodes as we cannot descent into */
+ if(parent->children[c]->is_leaf())
+ continue;
- /* select best split plane. */
- SpatialSplit split;
+ InnerNode *child = (InnerNode*)parent->children[c];
+ BoundBox& other = (c == 0)? bounds1: bounds0;
- for(int dim = 0; dim < 3; dim++) {
- /* sweep right to left and determine bounds. */
- BoundBox right_bounds;
+ /* transpose child bounds */
+ BoundBox target0 = child->children[0]->m_bounds;
+ BoundBox target1 = child->children[1]->m_bounds;
- for(int i = BVHParams::NUM_SPATIAL_BINS - 1; i > 0; i--) {
- right_bounds.grow(spatial_bins[dim][i].bounds);
- spatial_right_bounds[i - 1] = right_bounds;
- }
+ /* compute cost for both possible swaps */
+ float cost0 = merge(other, target1).half_area() - child_area[c];
+ float cost1 = merge(target0, other).half_area() - child_area[c];
- /* sweep left to right and select lowest SAH. */
- BoundBox left_bounds;
- int leftNum = 0;
- int rightNum = spec.num;
+ if(min(cost0,cost1) < best_cost) {
+ best_child = (int)c;
+ best_other = (int)(1-c);
- for(int i = 1; i < BVHParams::NUM_SPATIAL_BINS; i++) {
- left_bounds.grow(spatial_bins[dim][i - 1].bounds);
- leftNum += spatial_bins[dim][i - 1].enter;
- rightNum -= spatial_bins[dim][i - 1].exit;
-
- float sah = nodeSAH +
- left_bounds.area() * params.triangle_cost(leftNum) +
- spatial_right_bounds[i - 1].area() * params.triangle_cost(rightNum);
-
- if(sah < split.sah) {
- split.sah = sah;
- split.dim = dim;
- split.pos = origin[dim] + binSize[dim] * (float)i;
+ if(cost0 < cost1) {
+ best_cost = cost0;
+ bets_target = 0;
+ }
+ else {
+ best_cost = cost0;
+ bets_target = 1;
}
}
}
- return split;
-}
-
-void BVHBuild::do_spatial_split(NodeSpec& left, NodeSpec& right, const NodeSpec& spec, const SpatialSplit& split)
-{
- /* Categorize references and compute bounds.
- *
- * Left-hand side: [left_start, left_end[
- * Uncategorized/split: [left_end, right_start[
- * Right-hand side: [right_start, refs.size()[ */
-
- vector<Reference>& refs = references;
- int left_start = refs.size() - spec.num;
- int left_end = left_start;
- int right_start = refs.size();
-
- left.bounds = right.bounds = BoundBox();
-
- for(int i = left_end; i < right_start; i++) {
- if(refs[i].bounds.max[split.dim] <= split.pos) {
- /* entirely on the left-hand side */
- left.bounds.grow(refs[i].bounds);
- swap(refs[i], refs[left_end++]);
- }
- else if(refs[i].bounds.min[split.dim] >= split.pos) {
- /* entirely on the right-hand side */
- right.bounds.grow(refs[i].bounds);
- swap(refs[i--], refs[--right_start]);
- }
- }
-
- /* duplicate or unsplit references intersecting both sides. */
- while(left_end < right_start) {
- /* split reference. */
- Reference lref, rref;
-
- split_reference(lref, rref, refs[left_end], split.dim, split.pos);
-
- /* compute SAH for duplicate/unsplit candidates. */
- BoundBox lub = left.bounds; // Unsplit to left: new left-hand bounds.
- BoundBox rub = right.bounds; // Unsplit to right: new right-hand bounds.
- BoundBox ldb = left.bounds; // Duplicate: new left-hand bounds.
- BoundBox rdb = right.bounds; // Duplicate: new right-hand bounds.
-
- lub.grow(refs[left_end].bounds);
- rub.grow(refs[left_end].bounds);
- ldb.grow(lref.bounds);
- rdb.grow(rref.bounds);
-
- float lac = params.triangle_cost(left_end - left_start);
- float rac = params.triangle_cost(refs.size() - right_start);
- float lbc = params.triangle_cost(left_end - left_start + 1);
- float rbc = params.triangle_cost(refs.size() - right_start + 1);
-
- float unsplitLeftSAH = lub.area() * lbc + right.bounds.area() * rac;
- float unsplitRightSAH = left.bounds.area() * lac + rub.area() * rbc;
- float duplicateSAH = ldb.area() * lbc + rdb.area() * rbc;
- float minSAH = min(min(unsplitLeftSAH, unsplitRightSAH), duplicateSAH);
-
- if(minSAH == unsplitLeftSAH) {
- /* unsplit to left */
- left.bounds = lub;
- left_end++;
- }
- else if(minSAH == unsplitRightSAH) {
- /* unsplit to right */
- right.bounds = rub;
- swap(refs[left_end], refs[--right_start]);
- }
- else {
- /* duplicate */
- left.bounds = ldb;
- right.bounds = rdb;
- refs[left_end++] = lref;
- refs.push_back(rref);
- }
- }
-
- left.num = left_end - left_start;
- right.num = refs.size() - right_start;
-}
+ /* if we did not find a swap that improves the SAH then do nothing */
+ if(best_cost >= 0)
+ return;
-void BVHBuild::split_reference(Reference& left, Reference& right, const Reference& ref, int dim, float pos)
-{
- /* initialize references. */
- left.prim_index = right.prim_index = ref.prim_index;
- left.prim_object = right.prim_object = ref.prim_object;
- left.bounds = right.bounds = BoundBox();
-
- /* loop over vertices/edges. */
- Object *ob = objects[ref.prim_object];
- const Mesh *mesh = ob->mesh;
- const int *inds = mesh->triangles[ref.prim_index].v;
- const float3 *verts = &mesh->verts[0];
- const float3* v1 = &verts[inds[2]];
-
- for(int i = 0; i < 3; i++) {
- const float3* v0 = v1;
- int vindex = inds[i];
- v1 = &verts[vindex];
- float v0p = (*v0)[dim];
- float v1p = (*v1)[dim];
-
- /* insert vertex to the boxes it belongs to. */
- if(v0p <= pos)
- left.bounds.grow(*v0);
-
- if(v0p >= pos)
- right.bounds.grow(*v0);
-
- /* edge intersects the plane => insert intersection to both boxes. */
- if((v0p < pos && v1p > pos) || (v0p > pos && v1p < pos)) {
- float3 t = lerp(*v0, *v1, clamp((pos - v0p) / (v1p - v0p), 0.0f, 1.0f));
- left.bounds.grow(t);
- right.bounds.grow(t);
- }
- }
+ /* perform the best found tree rotation */
+ InnerNode *child = (InnerNode*)parent->children[best_child];
- /* intersect with original bounds. */
- left.bounds.max[dim] = pos;
- right.bounds.min[dim] = pos;
- left.bounds.intersect(ref.bounds);
- right.bounds.intersect(ref.bounds);
+ swap(parent->children[best_other], child->children[bets_target]);
+ child->m_bounds = merge(child->children[0]->m_bounds, child->children[1]->m_bounds);
}
CCL_NAMESPACE_END
diff --git a/intern/cycles/bvh/bvh_build.h b/intern/cycles/bvh/bvh_build.h
index 1fa1951d7f2..44ef918b326 100644
--- a/intern/cycles/bvh/bvh_build.h
+++ b/intern/cycles/bvh/bvh_build.h
@@ -21,13 +21,17 @@
#include <float.h>
#include "bvh.h"
+#include "bvh_binning.h"
#include "util_boundbox.h"
+#include "util_task.h"
#include "util_vector.h"
CCL_NAMESPACE_BEGIN
+class BVHBuildTask;
class BVHParams;
+class InnerNode;
class Mesh;
class Object;
class Progress;
@@ -37,28 +41,7 @@ class Progress;
class BVHBuild
{
public:
- struct Reference
- {
- int prim_index;
- int prim_object;
- BoundBox bounds;
-
- Reference()
- {
- }
- };
-
- struct NodeSpec
- {
- int num;
- BoundBox bounds;
-
- NodeSpec()
- {
- num = 0;
- }
- };
-
+ /* Constructor/Destructor */
BVHBuild(
const vector<Object*>& objects,
vector<int>& prim_index,
@@ -70,63 +53,38 @@ public:
BVHNode *run();
protected:
+ friend class BVHMixedSplit;
+ friend class BVHObjectSplit;
+ friend class BVHSpatialSplit;
+ friend class BVHBuildTask;
+
/* adding references */
- void add_reference_mesh(NodeSpec& root, Mesh *mesh, int i);
- void add_reference_object(NodeSpec& root, Object *ob, int i);
- void add_references(NodeSpec& root);
+ void add_reference_mesh(BoundBox& root, BoundBox& center, Mesh *mesh, int i);
+ void add_reference_object(BoundBox& root, BoundBox& center, Object *ob, int i);
+ void add_references(BVHRange& root);
/* building */
- BVHNode *build_node(const NodeSpec& spec, int level, float progress_start, float progress_end);
- BVHNode *create_leaf_node(const NodeSpec& spec);
- BVHNode *create_object_leaf_nodes(const Reference *ref, int num);
-
- void progress_update(float progress_start, float progress_end);
-
- /* object splits */
- struct ObjectSplit
- {
- float sah;
- int dim;
- int num_left;
- BoundBox left_bounds;
- BoundBox right_bounds;
-
- ObjectSplit()
- : sah(FLT_MAX), dim(0), num_left(0)
- {
- }
- };
-
- ObjectSplit find_object_split(const NodeSpec& spec, float nodeSAH);
- void do_object_split(NodeSpec& left, NodeSpec& right, const NodeSpec& spec, const ObjectSplit& split);
-
- /* spatial splits */
- struct SpatialSplit
- {
- float sah;
- int dim;
- float pos;
-
- SpatialSplit()
- : sah(FLT_MAX), dim(0), pos(0.0f)
- {
- }
- };
-
- struct SpatialBin
- {
- BoundBox bounds;
- int enter;
- int exit;
- };
-
- SpatialSplit find_spatial_split(const NodeSpec& spec, float nodeSAH);
- void do_spatial_split(NodeSpec& left, NodeSpec& right, const NodeSpec& spec, const SpatialSplit& split);
- void split_reference(Reference& left, Reference& right, const Reference& ref, int dim, float pos);
+ BVHNode *build_node(const BVHRange& range, int level);
+ BVHNode *build_node(const BVHObjectBinning& range, int level);
+ BVHNode *create_leaf_node(const BVHRange& range);
+ BVHNode *create_object_leaf_nodes(const BVHReference *ref, int start, int num);
+
+ /* threads */
+ enum { THREAD_TASK_SIZE = 4096 };
+ void thread_build_node(InnerNode *node, int child, BVHObjectBinning *range, int level);
+ thread_mutex build_mutex;
+
+ /* progress */
+ void progress_update();
+
+ /* tree rotations */
+ void rotate(BVHNode *node, int max_depth);
+ void rotate(BVHNode *node, int max_depth, int iterations);
/* objects and primitive references */
vector<Object*> objects;
- vector<Reference> references;
+ vector<BVHReference> references;
+ int num_original_references;
/* output primitive indexes and objects */
vector<int>& prim_index;
@@ -138,12 +96,17 @@ protected:
/* progress reporting */
Progress& progress;
double progress_start_time;
- int progress_num_duplicates;
+ size_t progress_count;
+ size_t progress_total;
+ size_t progress_original_total;
/* spatial splitting */
float spatial_min_overlap;
vector<BoundBox> spatial_right_bounds;
- SpatialBin spatial_bins[3][BVHParams::NUM_SPATIAL_BINS];
+ BVHSpatialBin spatial_bins[3][BVHParams::NUM_SPATIAL_BINS];
+
+ /* threads */
+ TaskPool task_pool;
};
CCL_NAMESPACE_END
diff --git a/intern/cycles/bvh/bvh_node.cpp b/intern/cycles/bvh/bvh_node.cpp
index 63683bae4a3..4edfb4b70a4 100644
--- a/intern/cycles/bvh/bvh_node.cpp
+++ b/intern/cycles/bvh/bvh_node.cpp
@@ -24,6 +24,8 @@
CCL_NAMESPACE_BEGIN
+/* BVH Node */
+
int BVHNode::getSubtreeSize(BVH_STAT stat) const
{
int cnt = 0;
@@ -59,7 +61,8 @@ int BVHNode::getSubtreeSize(BVH_STAT stat) const
void BVHNode::deleteSubtree()
{
for(int i=0;i<num_children();i++)
- get_child(i)->deleteSubtree();
+ if(get_child(i))
+ get_child(i)->deleteSubtree();
delete this;
}
@@ -70,12 +73,27 @@ float BVHNode::computeSubtreeSAHCost(const BVHParams& p, float probability) cons
for(int i=0;i<num_children();i++) {
BVHNode *child = get_child(i);
- SAH += child->computeSubtreeSAHCost(p, probability * child->m_bounds.area()/m_bounds.area());
+ SAH += child->computeSubtreeSAHCost(p, probability * child->m_bounds.safe_area()/m_bounds.safe_area());
}
return SAH;
}
+uint BVHNode::update_visibility()
+{
+ if(!is_leaf() && m_visibility == 0) {
+ InnerNode *inner = (InnerNode*)this;
+ BVHNode *child0 = inner->children[0];
+ BVHNode *child1 = inner->children[1];
+
+ m_visibility = child0->update_visibility()|child1->update_visibility();
+ }
+
+ return m_visibility;
+}
+
+/* Inner Node */
+
void InnerNode::print(int depth) const
{
for(int i = 0; i < depth; i++)
diff --git a/intern/cycles/bvh/bvh_node.h b/intern/cycles/bvh/bvh_node.h
index 5e0a17a1193..5c00f7b7a38 100644
--- a/intern/cycles/bvh/bvh_node.h
+++ b/intern/cycles/bvh/bvh_node.h
@@ -49,8 +49,6 @@ public:
virtual int num_triangles() const { return 0; }
virtual void print(int depth = 0) const = 0;
- float getArea() const { return m_bounds.area(); }
-
BoundBox m_bounds;
uint m_visibility;
@@ -58,6 +56,8 @@ public:
int getSubtreeSize(BVH_STAT stat=BVH_STAT_NODE_COUNT) const;
float computeSubtreeSAHCost(const BVHParams& p, float probability = 1.0f) const;
void deleteSubtree();
+
+ uint update_visibility();
};
class InnerNode : public BVHNode
@@ -66,9 +66,21 @@ public:
InnerNode(const BoundBox& bounds, BVHNode* child0, BVHNode* child1)
{
m_bounds = bounds;
- m_visibility = child0->m_visibility|child1->m_visibility;
children[0] = child0;
children[1] = child1;
+
+ if(child0 && child1)
+ m_visibility = child0->m_visibility|child1->m_visibility;
+ else
+ m_visibility = 0; /* happens on build cancel */
+ }
+
+ InnerNode(const BoundBox& bounds)
+ {
+ m_bounds = bounds;
+ m_visibility = 0;
+ children[0] = NULL;
+ children[1] = NULL;
}
bool is_leaf() const { return false; }
diff --git a/intern/cycles/bvh/bvh_params.h b/intern/cycles/bvh/bvh_params.h
index 38093438500..0cf5e905fea 100644
--- a/intern/cycles/bvh/bvh_params.h
+++ b/intern/cycles/bvh/bvh_params.h
@@ -18,6 +18,8 @@
#ifndef __BVH_PARAMS_H__
#define __BVH_PARAMS_H__
+#include "util_boundbox.h"
+
CCL_NAMESPACE_BEGIN
/* BVH Parameters */
@@ -73,14 +75,97 @@ public:
}
/* SAH costs */
- float cost(int num_nodes, int num_tris) const
+ __forceinline float cost(int num_nodes, int num_tris) const
{ return node_cost(num_nodes) + triangle_cost(num_tris); }
- float triangle_cost(int n) const
+ __forceinline float triangle_cost(int n) const
{ return n*sah_triangle_cost; }
- float node_cost(int n) const
+ __forceinline float node_cost(int n) const
{ return n*sah_node_cost; }
+
+ __forceinline bool small_enough_for_leaf(int size, int level)
+ { return (size <= min_leaf_size || level >= MAX_DEPTH); }
+};
+
+/* BVH Reference
+ *
+ * Reference to a primitive. Primitive index and object are sneakily packed
+ * into BoundBox to reduce memory usage and align nicely */
+
+class BVHReference
+{
+public:
+ __forceinline BVHReference() {}
+
+ __forceinline BVHReference(const BoundBox& bounds_, int prim_index, int prim_object)
+ : rbounds(bounds_)
+ {
+ rbounds.min.w = __int_as_float(prim_index);
+ rbounds.max.w = __int_as_float(prim_object);
+ }
+
+ __forceinline const BoundBox& bounds() const { return rbounds; }
+ __forceinline int prim_index() const { return __float_as_int(rbounds.min.w); }
+ __forceinline int prim_object() const { return __float_as_int(rbounds.max.w); }
+
+protected:
+ BoundBox rbounds;
+};
+
+/* BVH Range
+ *
+ * Build range used during construction, to indicate the bounds and place in
+ * the reference array of a subset of pirmitives Again uses trickery to pack
+ * integers into BoundBox for alignment purposes. */
+
+class BVHRange
+{
+public:
+ __forceinline BVHRange()
+ {
+ rbounds.min.w = __int_as_float(0);
+ rbounds.max.w = __int_as_float(0);
+ }
+
+ __forceinline BVHRange(const BoundBox& bounds_, int start_, int size_)
+ : rbounds(bounds_)
+ {
+ rbounds.min.w = __int_as_float(start_);
+ rbounds.max.w = __int_as_float(size_);
+ }
+
+ __forceinline BVHRange(const BoundBox& bounds_, const BoundBox& cbounds_, int start_, int size_)
+ : rbounds(bounds_), cbounds(cbounds_)
+ {
+ rbounds.min.w = __int_as_float(start_);
+ rbounds.max.w = __int_as_float(size_);
+ }
+
+ __forceinline void set_start(int start_) { rbounds.min.w = __int_as_float(start_); }
+
+ __forceinline const BoundBox& bounds() const { return rbounds; }
+ __forceinline const BoundBox& cent_bounds() const { return cbounds; }
+ __forceinline int start() const { return __float_as_int(rbounds.min.w); }
+ __forceinline int size() const { return __float_as_int(rbounds.max.w); }
+ __forceinline int end() const { return start() + size(); }
+
+protected:
+ BoundBox rbounds;
+ BoundBox cbounds;
+};
+
+/* BVH Spatial Bin */
+
+struct BVHSpatialBin
+{
+ BoundBox bounds;
+ int enter;
+ int exit;
+
+ __forceinline BVHSpatialBin()
+ {
+ }
};
CCL_NAMESPACE_END
diff --git a/intern/cycles/bvh/bvh_sort.cpp b/intern/cycles/bvh/bvh_sort.cpp
index ee4531a4843..bef384be592 100644
--- a/intern/cycles/bvh/bvh_sort.cpp
+++ b/intern/cycles/bvh/bvh_sort.cpp
@@ -32,23 +32,23 @@ public:
dim = dim_;
}
- bool operator()(const BVHBuild::Reference& ra, const BVHBuild::Reference& rb)
+ bool operator()(const BVHReference& ra, const BVHReference& rb)
{
- float ca = ra.bounds.min[dim] + ra.bounds.max[dim];
- float cb = rb.bounds.min[dim] + rb.bounds.max[dim];
+ float ca = ra.bounds().min[dim] + ra.bounds().max[dim];
+ float cb = rb.bounds().min[dim] + rb.bounds().max[dim];
if(ca < cb) return true;
else if(ca > cb) return false;
- else if(ra.prim_object < rb.prim_object) return true;
- else if(ra.prim_object > rb.prim_object) return false;
- else if(ra.prim_index < rb.prim_index) return true;
- else if(ra.prim_index > rb.prim_index) return false;
+ else if(ra.prim_object() < rb.prim_object()) return true;
+ else if(ra.prim_object() > rb.prim_object()) return false;
+ else if(ra.prim_index() < rb.prim_index()) return true;
+ else if(ra.prim_index() > rb.prim_index()) return false;
return false;
}
};
-void bvh_reference_sort(int start, int end, BVHBuild::Reference *data, int dim)
+void bvh_reference_sort(int start, int end, BVHReference *data, int dim)
{
sort(data+start, data+end, BVHReferenceCompare(dim));
}
diff --git a/intern/cycles/bvh/bvh_sort.h b/intern/cycles/bvh/bvh_sort.h
index f0676948146..ba35ba3fae7 100644
--- a/intern/cycles/bvh/bvh_sort.h
+++ b/intern/cycles/bvh/bvh_sort.h
@@ -20,7 +20,7 @@
CCL_NAMESPACE_BEGIN
-void bvh_reference_sort(int start, int end, BVHBuild::Reference *data, int dim);
+void bvh_reference_sort(int start, int end, BVHReference *data, int dim);
CCL_NAMESPACE_END
diff --git a/intern/cycles/bvh/bvh_split.cpp b/intern/cycles/bvh/bvh_split.cpp
new file mode 100644
index 00000000000..263c5834428
--- /dev/null
+++ b/intern/cycles/bvh/bvh_split.cpp
@@ -0,0 +1,293 @@
+/*
+ * Adapted from code copyright 2009-2010 NVIDIA Corporation
+ * Modifications Copyright 2011, Blender Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "bvh_build.h"
+#include "bvh_split.h"
+#include "bvh_sort.h"
+
+#include "mesh.h"
+#include "object.h"
+
+#include "util_algorithm.h"
+
+CCL_NAMESPACE_BEGIN
+
+/* Object Split */
+
+BVHObjectSplit::BVHObjectSplit(BVHBuild *builder, const BVHRange& range, float nodeSAH)
+: sah(FLT_MAX), dim(0), num_left(0), left_bounds(BoundBox::empty), right_bounds(BoundBox::empty)
+{
+ const BVHReference *ref_ptr = &builder->references[range.start()];
+ float min_sah = FLT_MAX;
+
+ for(int dim = 0; dim < 3; dim++) {
+ /* sort references */
+ bvh_reference_sort(range.start(), range.end(), &builder->references[0], dim);
+
+ /* sweep right to left and determine bounds. */
+ BoundBox right_bounds = BoundBox::empty;
+
+ for(int i = range.size() - 1; i > 0; i--) {
+ right_bounds.grow(ref_ptr[i].bounds());
+ builder->spatial_right_bounds[i - 1] = right_bounds;
+ }
+
+ /* sweep left to right and select lowest SAH. */
+ BoundBox left_bounds = BoundBox::empty;
+
+ for(int i = 1; i < range.size(); i++) {
+ left_bounds.grow(ref_ptr[i - 1].bounds());
+ right_bounds = builder->spatial_right_bounds[i - 1];
+
+ float sah = nodeSAH +
+ left_bounds.safe_area() * builder->params.triangle_cost(i) +
+ right_bounds.safe_area() * builder->params.triangle_cost(range.size() - i);
+
+ if(sah < min_sah) {
+ min_sah = sah;
+
+ this->sah = sah;
+ this->dim = dim;
+ this->num_left = i;
+ this->left_bounds = left_bounds;
+ this->right_bounds = right_bounds;
+ }
+ }
+ }
+}
+
+void BVHObjectSplit::split(BVHBuild *builder, BVHRange& left, BVHRange& right, const BVHRange& range)
+{
+ /* sort references according to split */
+ bvh_reference_sort(range.start(), range.end(), &builder->references[0], this->dim);
+
+ /* split node ranges */
+ left = BVHRange(this->left_bounds, range.start(), this->num_left);
+ right = BVHRange(this->right_bounds, left.end(), range.size() - this->num_left);
+
+}
+
+/* Spatial Split */
+
+BVHSpatialSplit::BVHSpatialSplit(BVHBuild *builder, const BVHRange& range, float nodeSAH)
+: sah(FLT_MAX), dim(0), pos(0.0f)
+{
+ /* initialize bins. */
+ float3 origin = range.bounds().min;
+ float3 binSize = (range.bounds().max - origin) * (1.0f / (float)BVHParams::NUM_SPATIAL_BINS);
+ float3 invBinSize = 1.0f / binSize;
+
+ for(int dim = 0; dim < 3; dim++) {
+ for(int i = 0; i < BVHParams::NUM_SPATIAL_BINS; i++) {
+ BVHSpatialBin& bin = builder->spatial_bins[dim][i];
+
+ bin.bounds = BoundBox::empty;
+ bin.enter = 0;
+ bin.exit = 0;
+ }
+ }
+
+ /* chop references into bins. */
+ for(unsigned int refIdx = range.start(); refIdx < range.end(); refIdx++) {
+ const BVHReference& ref = builder->references[refIdx];
+ float3 firstBinf = (ref.bounds().min - origin) * invBinSize;
+ float3 lastBinf = (ref.bounds().max - origin) * invBinSize;
+ int3 firstBin = make_int3((int)firstBinf.x, (int)firstBinf.y, (int)firstBinf.z);
+ int3 lastBin = make_int3((int)lastBinf.x, (int)lastBinf.y, (int)lastBinf.z);
+
+ firstBin = clamp(firstBin, 0, BVHParams::NUM_SPATIAL_BINS - 1);
+ lastBin = clamp(lastBin, firstBin, BVHParams::NUM_SPATIAL_BINS - 1);
+
+ for(int dim = 0; dim < 3; dim++) {
+ BVHReference currRef = ref;
+
+ for(int i = firstBin[dim]; i < lastBin[dim]; i++) {
+ BVHReference leftRef, rightRef;
+
+ split_reference(builder, leftRef, rightRef, currRef, dim, origin[dim] + binSize[dim] * (float)(i + 1));
+ builder->spatial_bins[dim][i].bounds.grow(leftRef.bounds());
+ currRef = rightRef;
+ }
+
+ builder->spatial_bins[dim][lastBin[dim]].bounds.grow(currRef.bounds());
+ builder->spatial_bins[dim][firstBin[dim]].enter++;
+ builder->spatial_bins[dim][lastBin[dim]].exit++;
+ }
+ }
+
+ /* select best split plane. */
+ for(int dim = 0; dim < 3; dim++) {
+ /* sweep right to left and determine bounds. */
+ BoundBox right_bounds = BoundBox::empty;
+
+ for(int i = BVHParams::NUM_SPATIAL_BINS - 1; i > 0; i--) {
+ right_bounds.grow(builder->spatial_bins[dim][i].bounds);
+ builder->spatial_right_bounds[i - 1] = right_bounds;
+ }
+
+ /* sweep left to right and select lowest SAH. */
+ BoundBox left_bounds = BoundBox::empty;
+ int leftNum = 0;
+ int rightNum = range.size();
+
+ for(int i = 1; i < BVHParams::NUM_SPATIAL_BINS; i++) {
+ left_bounds.grow(builder->spatial_bins[dim][i - 1].bounds);
+ leftNum += builder->spatial_bins[dim][i - 1].enter;
+ rightNum -= builder->spatial_bins[dim][i - 1].exit;
+
+ float sah = nodeSAH +
+ left_bounds.safe_area() * builder->params.triangle_cost(leftNum) +
+ builder->spatial_right_bounds[i - 1].safe_area() * builder->params.triangle_cost(rightNum);
+
+ if(sah < this->sah) {
+ this->sah = sah;
+ this->dim = dim;
+ this->pos = origin[dim] + binSize[dim] * (float)i;
+ }
+ }
+ }
+}
+
+void BVHSpatialSplit::split(BVHBuild *builder, BVHRange& left, BVHRange& right, const BVHRange& range)
+{
+ /* Categorize references and compute bounds.
+ *
+ * Left-hand side: [left_start, left_end[
+ * Uncategorized/split: [left_end, right_start[
+ * Right-hand side: [right_start, refs.size()[ */
+
+ vector<BVHReference>& refs = builder->references;
+ int left_start = range.start();
+ int left_end = left_start;
+ int right_start = range.end();
+ int right_end = range.end();
+ BoundBox left_bounds = BoundBox::empty;
+ BoundBox right_bounds = BoundBox::empty;
+
+ for(int i = left_end; i < right_start; i++) {
+ if(refs[i].bounds().max[this->dim] <= this->pos) {
+ /* entirely on the left-hand side */
+ left_bounds.grow(refs[i].bounds());
+ swap(refs[i], refs[left_end++]);
+ }
+ else if(refs[i].bounds().min[this->dim] >= this->pos) {
+ /* entirely on the right-hand side */
+ right_bounds.grow(refs[i].bounds());
+ swap(refs[i--], refs[--right_start]);
+ }
+ }
+
+ /* duplicate or unsplit references intersecting both sides. */
+ while(left_end < right_start) {
+ /* split reference. */
+ BVHReference lref, rref;
+
+ split_reference(builder, lref, rref, refs[left_end], this->dim, this->pos);
+
+ /* compute SAH for duplicate/unsplit candidates. */
+ BoundBox lub = left_bounds; // Unsplit to left: new left-hand bounds.
+ BoundBox rub = right_bounds; // Unsplit to right: new right-hand bounds.
+ BoundBox ldb = left_bounds; // Duplicate: new left-hand bounds.
+ BoundBox rdb = right_bounds; // Duplicate: new right-hand bounds.
+
+ lub.grow(refs[left_end].bounds());
+ rub.grow(refs[left_end].bounds());
+ ldb.grow(lref.bounds());
+ rdb.grow(rref.bounds());
+
+ float lac = builder->params.triangle_cost(left_end - left_start);
+ float rac = builder->params.triangle_cost(right_end - right_start);
+ float lbc = builder->params.triangle_cost(left_end - left_start + 1);
+ float rbc = builder->params.triangle_cost(right_end - right_start + 1);
+
+ float unsplitLeftSAH = lub.safe_area() * lbc + right_bounds.safe_area() * rac;
+ float unsplitRightSAH = left_bounds.safe_area() * lac + rub.safe_area() * rbc;
+ float duplicateSAH = ldb.safe_area() * lbc + rdb.safe_area() * rbc;
+ float minSAH = min(min(unsplitLeftSAH, unsplitRightSAH), duplicateSAH);
+
+ if(minSAH == unsplitLeftSAH) {
+ /* unsplit to left */
+ left_bounds = lub;
+ left_end++;
+ }
+ else if(minSAH == unsplitRightSAH) {
+ /* unsplit to right */
+ right_bounds = rub;
+ swap(refs[left_end], refs[--right_start]);
+ }
+ else {
+ /* duplicate */
+ left_bounds = ldb;
+ right_bounds = rdb;
+ refs[left_end++] = lref;
+ refs.insert(refs.begin() + right_end, rref);
+ right_end++;
+ }
+ }
+
+ left = BVHRange(left_bounds, left_start, left_end - left_start);
+ right = BVHRange(right_bounds, right_start, right_end - right_start);
+}
+
+void BVHSpatialSplit::split_reference(BVHBuild *builder, BVHReference& left, BVHReference& right, const BVHReference& ref, int dim, float pos)
+{
+ /* initialize boundboxes */
+ BoundBox left_bounds = BoundBox::empty;
+ BoundBox right_bounds = BoundBox::empty;
+
+ /* loop over vertices/edges. */
+ Object *ob = builder->objects[ref.prim_object()];
+ const Mesh *mesh = ob->mesh;
+ const int *inds = mesh->triangles[ref.prim_index()].v;
+ const float3 *verts = &mesh->verts[0];
+ const float3* v1 = &verts[inds[2]];
+
+ for(int i = 0; i < 3; i++) {
+ const float3* v0 = v1;
+ int vindex = inds[i];
+ v1 = &verts[vindex];
+ float v0p = (*v0)[dim];
+ float v1p = (*v1)[dim];
+
+ /* insert vertex to the boxes it belongs to. */
+ if(v0p <= pos)
+ left_bounds.grow(*v0);
+
+ if(v0p >= pos)
+ right_bounds.grow(*v0);
+
+ /* edge intersects the plane => insert intersection to both boxes. */
+ if((v0p < pos && v1p > pos) || (v0p > pos && v1p < pos)) {
+ float3 t = lerp(*v0, *v1, clamp((pos - v0p) / (v1p - v0p), 0.0f, 1.0f));
+ left_bounds.grow(t);
+ right_bounds.grow(t);
+ }
+ }
+
+ /* intersect with original bounds. */
+ left_bounds.max[dim] = pos;
+ right_bounds.min[dim] = pos;
+ left_bounds.intersect(ref.bounds());
+ right_bounds.intersect(ref.bounds());
+
+ /* set referecnes */
+ left = BVHReference(left_bounds, ref.prim_index(), ref.prim_object());
+ right = BVHReference(right_bounds, ref.prim_index(), ref.prim_object());
+}
+
+CCL_NAMESPACE_END
+
diff --git a/intern/cycles/bvh/bvh_split.h b/intern/cycles/bvh/bvh_split.h
new file mode 100644
index 00000000000..1f4befbe8e2
--- /dev/null
+++ b/intern/cycles/bvh/bvh_split.h
@@ -0,0 +1,110 @@
+/*
+ * Adapted from code copyright 2009-2010 NVIDIA Corporation
+ * Modifications Copyright 2011, Blender Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __BVH_SPLIT_H__
+#define __BVH_SPLIT_H__
+
+#include "bvh_build.h"
+#include "bvh_params.h"
+
+CCL_NAMESPACE_BEGIN
+
+class BVHBuild;
+
+/* Object Split */
+
+class BVHObjectSplit
+{
+public:
+ float sah;
+ int dim;
+ int num_left;
+ BoundBox left_bounds;
+ BoundBox right_bounds;
+
+ BVHObjectSplit() {}
+ BVHObjectSplit(BVHBuild *builder, const BVHRange& range, float nodeSAH);
+
+ void split(BVHBuild *builder, BVHRange& left, BVHRange& right, const BVHRange& range);
+};
+
+/* Spatial Split */
+
+class BVHSpatialSplit
+{
+public:
+ float sah;
+ int dim;
+ float pos;
+
+ BVHSpatialSplit() : sah(FLT_MAX), dim(0), pos(0.0f) {}
+ BVHSpatialSplit(BVHBuild *builder, const BVHRange& range, float nodeSAH);
+
+ void split(BVHBuild *builder, BVHRange& left, BVHRange& right, const BVHRange& range);
+ void split_reference(BVHBuild *builder, BVHReference& left, BVHReference& right, const BVHReference& ref, int dim, float pos);
+};
+
+/* Mixed Object-Spatial Split */
+
+class BVHMixedSplit
+{
+public:
+ BVHObjectSplit object;
+ BVHSpatialSplit spatial;
+
+ float leafSAH;
+ float nodeSAH;
+ float minSAH;
+
+ bool no_split;
+
+ __forceinline BVHMixedSplit(BVHBuild *builder, const BVHRange& range, int level)
+ {
+ /* find split candidates. */
+ float area = range.bounds().safe_area();
+
+ leafSAH = area * builder->params.triangle_cost(range.size());
+ nodeSAH = area * builder->params.node_cost(2);
+
+ object = BVHObjectSplit(builder, range, nodeSAH);
+
+ if(builder->params.use_spatial_split && level < BVHParams::MAX_SPATIAL_DEPTH) {
+ BoundBox overlap = object.left_bounds;
+ overlap.intersect(object.right_bounds);
+
+ if(overlap.safe_area() >= builder->spatial_min_overlap)
+ spatial = BVHSpatialSplit(builder, range, nodeSAH);
+ }
+
+ /* leaf SAH is the lowest => create leaf. */
+ minSAH = min(min(leafSAH, object.sah), spatial.sah);
+ no_split = (minSAH == leafSAH && range.size() <= builder->params.max_leaf_size);
+ }
+
+ __forceinline void split(BVHBuild *builder, BVHRange& left, BVHRange& right, const BVHRange& range)
+ {
+ if(builder->params.use_spatial_split && minSAH == spatial.sah)
+ spatial.split(builder, left, right, range);
+ if(!left.size() || !right.size())
+ object.split(builder, left, right, range);
+ }
+};
+
+CCL_NAMESPACE_END
+
+#endif /* __BVH_SPLIT_H__ */
+
diff --git a/intern/cycles/device/device.cpp b/intern/cycles/device/device.cpp
index cceec8b8e5c..42dda1180c7 100644
--- a/intern/cycles/device/device.cpp
+++ b/intern/cycles/device/device.cpp
@@ -58,15 +58,6 @@ void DeviceTask::split_max_size(list<DeviceTask>& tasks, int max_size)
split(tasks, num);
}
-void DeviceTask::split(ThreadQueue<DeviceTask>& queue, int num)
-{
- list<DeviceTask> tasks;
- split(tasks, num);
-
- foreach(DeviceTask& task, tasks)
- queue.push(task);
-}
-
void DeviceTask::split(list<DeviceTask>& tasks, int num)
{
if(type == SHADER) {
diff --git a/intern/cycles/device/device.h b/intern/cycles/device/device.h
index af2567498d9..87f255e54e7 100644
--- a/intern/cycles/device/device.h
+++ b/intern/cycles/device/device.h
@@ -25,6 +25,7 @@
#include "util_list.h"
#include "util_string.h"
+#include "util_task.h"
#include "util_thread.h"
#include "util_types.h"
#include "util_vector.h"
@@ -66,7 +67,7 @@ public:
/* Device Task */
-class DeviceTask {
+class DeviceTask : public Task {
public:
typedef enum { PATH_TRACE, TONEMAP, SHADER } Type;
Type type;
@@ -87,7 +88,6 @@ public:
DeviceTask(Type type = PATH_TRACE);
void split(list<DeviceTask>& tasks, int num);
- void split(ThreadQueue<DeviceTask>& tasks, int num);
void split_max_size(list<DeviceTask>& tasks, int max_size);
};
diff --git a/intern/cycles/device/device_cpu.cpp b/intern/cycles/device/device_cpu.cpp
index da977ed8472..07988d32aff 100644
--- a/intern/cycles/device/device_cpu.cpp
+++ b/intern/cycles/device/device_cpu.cpp
@@ -40,8 +40,7 @@ CCL_NAMESPACE_BEGIN
class CPUDevice : public Device
{
public:
- vector<thread*> threads;
- ThreadQueue<DeviceTask> tasks;
+ TaskPool task_pool;
KernelGlobals *kg;
CPUDevice(int threads_num)
@@ -50,25 +49,11 @@ public:
/* do now to avoid thread issues */
system_cpu_support_optimized();
-
- if(threads_num == 0)
- threads_num = system_cpu_thread_count();
-
- threads.resize(threads_num);
-
- for(size_t i = 0; i < threads.size(); i++)
- threads[i] = new thread(function_bind(&CPUDevice::thread_run, this, i));
}
~CPUDevice()
{
- tasks.stop();
-
- foreach(thread *t, threads) {
- t->join();
- delete t;
- }
-
+ task_pool.stop();
kernel_globals_free(kg);
}
@@ -127,25 +112,28 @@ public:
#endif
}
- void thread_run(int t)
+ void thread_run(DeviceTask *task)
{
- DeviceTask task;
-
- while(tasks.worker_wait_pop(task)) {
- if(task.type == DeviceTask::PATH_TRACE)
- thread_path_trace(task);
- else if(task.type == DeviceTask::TONEMAP)
- thread_tonemap(task);
- else if(task.type == DeviceTask::SHADER)
- thread_shader(task);
+ if(task->type == DeviceTask::PATH_TRACE)
+ thread_path_trace(*task);
+ else if(task->type == DeviceTask::TONEMAP)
+ thread_tonemap(*task);
+ else if(task->type == DeviceTask::SHADER)
+ thread_shader(*task);
+ }
- tasks.worker_done();
+ class CPUDeviceTask : public DeviceTask {
+ public:
+ CPUDeviceTask(CPUDevice *device, DeviceTask& task)
+ : DeviceTask(task)
+ {
+ run = function_bind(&CPUDevice::thread_run, device, this);
}
- }
+ };
void thread_path_trace(DeviceTask& task)
{
- if(tasks.worker_cancel())
+ if(task_pool.cancelled())
return;
#ifdef WITH_OSL
@@ -160,7 +148,7 @@ public:
kernel_cpu_optimized_path_trace(kg, (float*)task.buffer, (unsigned int*)task.rng_state,
task.sample, x, y, task.offset, task.stride);
- if(tasks.worker_cancel())
+ if(task_pool.cancelled())
break;
}
}
@@ -172,7 +160,7 @@ public:
kernel_cpu_path_trace(kg, (float*)task.buffer, (unsigned int*)task.rng_state,
task.sample, x, y, task.offset, task.stride);
- if(tasks.worker_cancel())
+ if(task_pool.cancelled())
break;
}
}
@@ -214,7 +202,7 @@ public:
for(int x = task.shader_x; x < task.shader_x + task.shader_w; x++) {
kernel_cpu_optimized_shader(kg, (uint4*)task.shader_input, (float4*)task.shader_output, task.shader_eval_type, x);
- if(tasks.worker_cancel())
+ if(task_pool.cancelled())
break;
}
}
@@ -224,7 +212,7 @@ public:
for(int x = task.shader_x; x < task.shader_x + task.shader_w; x++) {
kernel_cpu_shader(kg, (uint4*)task.shader_input, (float4*)task.shader_output, task.shader_eval_type, x);
- if(tasks.worker_cancel())
+ if(task_pool.cancelled())
break;
}
}
@@ -239,17 +227,22 @@ public:
{
/* split task into smaller ones, more than number of threads for uneven
workloads where some parts of the image render slower than others */
- task.split(tasks, threads.size()*10);
+ list<DeviceTask> tasks;
+
+ task.split(tasks, TaskScheduler::num_threads()*10);
+
+ foreach(DeviceTask& task, tasks)
+ task_pool.push(new CPUDeviceTask(this, task));
}
void task_wait()
{
- tasks.wait_done();
+ task_pool.wait_work();
}
void task_cancel()
{
- tasks.cancel();
+ task_pool.cancel();
}
};
diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp
index 0c08baae3ff..0a780e5f576 100644
--- a/intern/cycles/device/device_cuda.cpp
+++ b/intern/cycles/device/device_cuda.cpp
@@ -172,11 +172,18 @@ public:
CUresult result;
- if(background)
+ if(background) {
result = cuCtxCreate(&cuContext, 0, cuDevice);
- else
+ }
+ else {
result = cuGLCtxCreate(&cuContext, 0, cuDevice);
+ if(result != CUDA_SUCCESS) {
+ result = cuCtxCreate(&cuContext, 0, cuDevice);
+ background = true;
+ }
+ }
+
if(cuda_error(result))
return;
@@ -686,14 +693,25 @@ public:
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glBindTexture(GL_TEXTURE_2D, 0);
- cuda_assert(cuGraphicsGLRegisterBuffer(&pmem.cuPBOresource, pmem.cuPBO, CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE))
+ CUresult result = cuGraphicsGLRegisterBuffer(&pmem.cuPBOresource, pmem.cuPBO, CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE);
- cuda_pop_context();
+ if(!cuda_error(result)) {
+ cuda_pop_context();
- mem.device_pointer = pmem.cuTexId;
- pixel_mem_map[mem.device_pointer] = pmem;
+ mem.device_pointer = pmem.cuTexId;
+ pixel_mem_map[mem.device_pointer] = pmem;
- return;
+ return;
+ }
+ else {
+ /* failed to register buffer, fallback to no interop */
+ glDeleteBuffers(1, &pmem.cuPBO);
+ glDeleteTextures(1, &pmem.cuTexId);
+
+ cuda_pop_context();
+
+ background = true;
+ }
}
Device::pixels_alloc(mem);
diff --git a/intern/cycles/device/device_multi.cpp b/intern/cycles/device/device_multi.cpp
index 1f69f2c53fa..9f7d65e640b 100644
--- a/intern/cycles/device/device_multi.cpp
+++ b/intern/cycles/device/device_multi.cpp
@@ -257,13 +257,14 @@ public:
void task_add(DeviceTask& task)
{
- ThreadQueue<DeviceTask> tasks;
+ list<DeviceTask> tasks;
task.split(tasks, devices.size());
foreach(SubDevice& sub, devices) {
- DeviceTask subtask;
+ if(!tasks.empty()) {
+ DeviceTask subtask = tasks.front();
+ tasks.pop_front();
- if(tasks.worker_wait_pop(subtask)) {
if(task.buffer) subtask.buffer = sub.ptr_map[task.buffer];
if(task.rng_state) subtask.rng_state = sub.ptr_map[task.rng_state];
if(task.rgba) subtask.rgba = sub.ptr_map[task.rgba];
diff --git a/intern/cycles/kernel/CMakeLists.txt b/intern/cycles/kernel/CMakeLists.txt
index e9820010b63..d165716aaca 100644
--- a/intern/cycles/kernel/CMakeLists.txt
+++ b/intern/cycles/kernel/CMakeLists.txt
@@ -33,6 +33,7 @@ set(SRC_HEADERS
kernel_object.h
kernel_passes.h
kernel_path.h
+ kernel_projection.h
kernel_qbvh.h
kernel_random.h
kernel_shader.h
diff --git a/intern/cycles/kernel/kernel_accumulate.h b/intern/cycles/kernel/kernel_accumulate.h
index 9a52531eec0..6c3ade1c531 100644
--- a/intern/cycles/kernel/kernel_accumulate.h
+++ b/intern/cycles/kernel/kernel_accumulate.h
@@ -266,7 +266,7 @@ __device_inline void path_radiance_accum_background(PathRadiance *L, float3 thro
#endif
}
-__device_inline float3 path_radiance_sum(PathRadiance *L)
+__device_inline float3 path_radiance_sum(KernelGlobals *kg, PathRadiance *L)
{
#ifdef __PASSES__
if(L->use_light_pass) {
@@ -283,9 +283,14 @@ __device_inline float3 path_radiance_sum(PathRadiance *L)
L->indirect_glossy *= L->indirect;
L->indirect_transmission *= L->indirect;
- return L->emission + L->background
+ float3 L_sum = L->emission
+ L->direct_diffuse + L->direct_glossy + L->direct_transmission
+ L->indirect_diffuse + L->indirect_glossy + L->indirect_transmission;
+
+ if(!kernel_data.background.transparent)
+ L_sum += L->background;
+
+ return L_sum;
}
else
return L->emission;
diff --git a/intern/cycles/kernel/kernel_bvh.h b/intern/cycles/kernel/kernel_bvh.h
index 523ae8ae926..5da4253bd86 100644
--- a/intern/cycles/kernel/kernel_bvh.h
+++ b/intern/cycles/kernel/kernel_bvh.h
@@ -57,7 +57,7 @@ __device_inline float3 bvh_inverse_direction(float3 dir)
__device_inline void bvh_instance_push(KernelGlobals *kg, int object, const Ray *ray, float3 *P, float3 *idir, float *t, const float tmax)
{
- Transform tfm = object_fetch_transform(kg, object, OBJECT_INVERSE_TRANSFORM);
+ Transform tfm = object_fetch_transform(kg, object, ray->time, OBJECT_INVERSE_TRANSFORM);
*P = transform_point(&tfm, ray->P);
@@ -74,7 +74,7 @@ __device_inline void bvh_instance_push(KernelGlobals *kg, int object, const Ray
__device_inline void bvh_instance_pop(KernelGlobals *kg, int object, const Ray *ray, float3 *P, float3 *idir, float *t, const float tmax)
{
- Transform tfm = object_fetch_transform(kg, object, OBJECT_TRANSFORM);
+ Transform tfm = object_fetch_transform(kg, object, ray->time, OBJECT_TRANSFORM);
if(*t != FLT_MAX)
*t *= len(transform_direction(&tfm, 1.0f/(*idir)));
@@ -341,7 +341,7 @@ __device_inline float3 ray_offset(float3 P, float3 Ng)
#endif
}
-__device_inline float3 bvh_triangle_refine(KernelGlobals *kg, const Intersection *isect, const Ray *ray)
+__device_inline float3 bvh_triangle_refine(KernelGlobals *kg, ShaderData *sd, const Intersection *isect, const Ray *ray)
{
float3 P = ray->P;
float3 D = ray->D;
@@ -349,7 +349,11 @@ __device_inline float3 bvh_triangle_refine(KernelGlobals *kg, const Intersection
#ifdef __INTERSECTION_REFINE__
if(isect->object != ~0) {
- Transform tfm = object_fetch_transform(kg, isect->object, OBJECT_INVERSE_TRANSFORM);
+#ifdef __MOTION__
+ Transform tfm = sd->ob_itfm;
+#else
+ Transform tfm = object_fetch_transform(kg, isect->object, ray->time, OBJECT_INVERSE_TRANSFORM);
+#endif
P = transform_point(&tfm, P);
D = transform_direction(&tfm, D*t);
@@ -366,7 +370,12 @@ __device_inline float3 bvh_triangle_refine(KernelGlobals *kg, const Intersection
P = P + D*rt;
if(isect->object != ~0) {
- Transform tfm = object_fetch_transform(kg, isect->object, OBJECT_TRANSFORM);
+#ifdef __MOTION__
+ Transform tfm = sd->ob_tfm;
+#else
+ Transform tfm = object_fetch_transform(kg, isect->object, ray->time, OBJECT_TRANSFORM);
+#endif
+
P = transform_point(&tfm, P);
}
diff --git a/intern/cycles/kernel/kernel_camera.h b/intern/cycles/kernel/kernel_camera.h
index 58c482212df..e1b474d8537 100644
--- a/intern/cycles/kernel/kernel_camera.h
+++ b/intern/cycles/kernel/kernel_camera.h
@@ -63,6 +63,11 @@ __device void camera_sample_perspective(KernelGlobals *kg, float raster_x, float
/* transform ray from camera to world */
Transform cameratoworld = kernel_data.cam.cameratoworld;
+#ifdef __MOTION__
+ if(kernel_data.cam.have_motion)
+ transform_motion_interpolate(&cameratoworld, &kernel_data.cam.motion, ray->time);
+#endif
+
ray->P = transform_point(&cameratoworld, ray->P);
ray->D = transform_direction(&cameratoworld, ray->D);
ray->D = normalize(ray->D);
@@ -101,6 +106,11 @@ __device void camera_sample_orthographic(KernelGlobals *kg, float raster_x, floa
/* transform ray from camera to world */
Transform cameratoworld = kernel_data.cam.cameratoworld;
+#ifdef __MOTION__
+ if(kernel_data.cam.have_motion)
+ transform_motion_interpolate(&cameratoworld, &kernel_data.cam.motion, ray->time);
+#endif
+
ray->P = transform_point(&cameratoworld, ray->P);
ray->D = transform_direction(&cameratoworld, ray->D);
ray->D = normalize(ray->D);
@@ -122,20 +132,39 @@ __device void camera_sample_orthographic(KernelGlobals *kg, float raster_x, floa
#endif
}
-/* Environment Camera */
+/* Panorama Camera */
-__device void camera_sample_environment(KernelGlobals *kg, float raster_x, float raster_y, Ray *ray)
+__device void camera_sample_panorama(KernelGlobals *kg, float raster_x, float raster_y, Ray *ray)
{
Transform rastertocamera = kernel_data.cam.rastertocamera;
float3 Pcamera = transform_perspective(&rastertocamera, make_float3(raster_x, raster_y, 0.0f));
/* create ray form raster position */
- ray->P = make_float3(0.0, 0.0f, 0.0f);
- ray->D = equirectangular_to_direction(Pcamera.x, Pcamera.y);
+ ray->P = make_float3(0.0f, 0.0f, 0.0f);
+
+#ifdef __CAMERA_CLIPPING__
+ /* clipping */
+ ray->t = kernel_data.cam.cliplength;
+#else
+ ray->t = FLT_MAX;
+#endif
+
+ ray->D = panorama_to_direction(kg, Pcamera.x, Pcamera.y);
+
+ /* indicates ray should not receive any light, outside of the lens */
+ if(len_squared(ray->D) == 0.0f) {
+ ray->t = 0.0f;
+ return;
+ }
/* transform ray from camera to world */
Transform cameratoworld = kernel_data.cam.cameratoworld;
+#ifdef __MOTION__
+ if(kernel_data.cam.have_motion)
+ transform_motion_interpolate(&cameratoworld, &kernel_data.cam.motion, ray->time);
+#endif
+
ray->P = transform_point(&cameratoworld, ray->P);
ray->D = transform_direction(&cameratoworld, ray->D);
ray->D = normalize(ray->D);
@@ -146,30 +175,30 @@ __device void camera_sample_environment(KernelGlobals *kg, float raster_x, float
ray->dP.dy = make_float3(0.0f, 0.0f, 0.0f);
Pcamera = transform_perspective(&rastertocamera, make_float3(raster_x + 1.0f, raster_y, 0.0f));
- ray->dD.dx = normalize(transform_direction(&cameratoworld, equirectangular_to_direction(Pcamera.x, Pcamera.y))) - ray->D;
+ ray->dD.dx = normalize(transform_direction(&cameratoworld, panorama_to_direction(kg, Pcamera.x, Pcamera.y))) - ray->D;
Pcamera = transform_perspective(&rastertocamera, make_float3(raster_x, raster_y + 1.0f, 0.0f));
- ray->dD.dy = normalize(transform_direction(&cameratoworld, equirectangular_to_direction(Pcamera.x, Pcamera.y))) - ray->D;
-#endif
+ ray->dD.dy = normalize(transform_direction(&cameratoworld, panorama_to_direction(kg, Pcamera.x, Pcamera.y))) - ray->D;
-#ifdef __CAMERA_CLIPPING__
- /* clipping */
- ray->t = kernel_data.cam.cliplength;
-#else
- ray->t = FLT_MAX;
#endif
}
/* Common */
-__device void camera_sample(KernelGlobals *kg, int x, int y, float filter_u, float filter_v, float lens_u, float lens_v, Ray *ray)
+__device void camera_sample(KernelGlobals *kg, int x, int y, float filter_u, float filter_v,
+ float lens_u, float lens_v, float time, Ray *ray)
{
/* pixel filter */
float raster_x = x + kernel_tex_interp(__filter_table, filter_u, FILTER_TABLE_SIZE);
float raster_y = y + kernel_tex_interp(__filter_table, filter_v, FILTER_TABLE_SIZE);
+#ifdef __MOTION__
/* motion blur */
- //ray->time = lerp(time_t, kernel_data.cam.shutter_open, kernel_data.cam.shutter_close);
+ if(kernel_data.cam.shuttertime == 0.0f)
+ ray->time = TIME_INVALID;
+ else
+ ray->time = 0.5f + (time - 0.5f)*kernel_data.cam.shuttertime;
+#endif
/* sample */
if(kernel_data.cam.type == CAMERA_PERSPECTIVE)
@@ -177,7 +206,7 @@ __device void camera_sample(KernelGlobals *kg, int x, int y, float filter_u, flo
else if(kernel_data.cam.type == CAMERA_ORTHOGRAPHIC)
camera_sample_orthographic(kg, raster_x, raster_y, ray);
else
- camera_sample_environment(kg, raster_x, raster_y, ray);
+ camera_sample_panorama(kg, raster_x, raster_y, ray);
}
CCL_NAMESPACE_END
diff --git a/intern/cycles/kernel/kernel_compat_opencl.h b/intern/cycles/kernel/kernel_compat_opencl.h
index 9fbd8566ecd..a9d18588cc8 100644
--- a/intern/cycles/kernel/kernel_compat_opencl.h
+++ b/intern/cycles/kernel/kernel_compat_opencl.h
@@ -78,7 +78,7 @@ __device float kernel_tex_interp_(__global float *data, int width, float x)
#define make_float2(x, y) ((float2)(x, y))
#ifdef __CL_NO_FLOAT3__
-#define make_float3(x, y, z) ((float4)(x, y, z, 0.0))
+#define make_float3(x, y, z) ((float4)(x, y, z, 0.0f))
#else
#define make_float3(x, y, z) ((float3)(x, y, z))
#endif
diff --git a/intern/cycles/kernel/kernel_emission.h b/intern/cycles/kernel/kernel_emission.h
index 764ac599991..0ef1425e68a 100644
--- a/intern/cycles/kernel/kernel_emission.h
+++ b/intern/cycles/kernel/kernel_emission.h
@@ -21,7 +21,7 @@ CCL_NAMESPACE_BEGIN
/* Direction Emission */
__device float3 direct_emissive_eval(KernelGlobals *kg, float rando,
- LightSample *ls, float u, float v, float3 I)
+ LightSample *ls, float u, float v, float3 I, float t, float time)
{
/* setup shading at emitter */
ShaderData sd;
@@ -40,7 +40,7 @@ __device float3 direct_emissive_eval(KernelGlobals *kg, float rando,
else
#endif
{
- shader_setup_from_sample(kg, &sd, ls->P, ls->Ng, I, ls->shader, ls->object, ls->prim, u, v);
+ shader_setup_from_sample(kg, &sd, ls->P, ls->Ng, I, ls->shader, ls->object, ls->prim, u, v, t, time);
ls->Ng = sd.Ng;
/* no path flag, we're evaluating this for all closures. that's weak but
@@ -76,7 +76,7 @@ __device bool direct_emission(KernelGlobals *kg, ShaderData *sd, int lindex,
#endif
{
/* sample a light and position on int */
- light_sample(kg, randt, randu, randv, sd->P, &ls, &pdf);
+ light_sample(kg, randt, randu, randv, sd->time, sd->P, &ls, &pdf);
}
/* compute pdf */
@@ -87,7 +87,7 @@ __device bool direct_emission(KernelGlobals *kg, ShaderData *sd, int lindex,
return false;
/* evaluate closure */
- float3 light_eval = direct_emissive_eval(kg, rando, &ls, randu, randv, -ls.D);
+ float3 light_eval = direct_emissive_eval(kg, rando, &ls, randu, randv, -ls.D, ls.t, sd->time);
if(is_zero(light_eval))
return false;
diff --git a/intern/cycles/kernel/kernel_light.h b/intern/cycles/kernel/kernel_light.h
index 42260577069..cd9557bd0bf 100644
--- a/intern/cycles/kernel/kernel_light.h
+++ b/intern/cycles/kernel/kernel_light.h
@@ -251,7 +251,7 @@ __device float regular_light_pdf(KernelGlobals *kg,
/* Triangle Light */
__device void triangle_light_sample(KernelGlobals *kg, int prim, int object,
- float randu, float randv, LightSample *ls)
+ float randu, float randv, float time, LightSample *ls)
{
/* triangle, so get position, normal, shader */
ls->P = triangle_sample_MT(kg, prim, randu, randv);
@@ -264,8 +264,11 @@ __device void triangle_light_sample(KernelGlobals *kg, int prim, int object,
#ifdef __INSTANCING__
/* instance transform */
if(ls->object >= 0) {
- object_position_transform(kg, ls->object, &ls->P);
- object_normal_transform(kg, ls->object, &ls->Ng);
+ Transform tfm = object_fetch_transform(kg, ls->object, time, OBJECT_TRANSFORM);
+ Transform itfm = object_fetch_transform(kg, ls->object, time, OBJECT_INVERSE_TRANSFORM);
+
+ ls->P = transform_point(&tfm, ls->P);
+ ls->Ng = normalize(transform_direction_transposed(&itfm, ls->Ng));
}
#endif
}
@@ -313,7 +316,7 @@ __device int light_distribution_sample(KernelGlobals *kg, float randt)
/* Generic Light */
-__device void light_sample(KernelGlobals *kg, float randt, float randu, float randv, float3 P, LightSample *ls, float *pdf)
+__device void light_sample(KernelGlobals *kg, float randt, float randu, float randv, float time, float3 P, LightSample *ls, float *pdf)
{
/* sample index */
int index = light_distribution_sample(kg, randt);
@@ -324,7 +327,7 @@ __device void light_sample(KernelGlobals *kg, float randt, float randu, float ra
if(prim >= 0) {
int object = __float_as_int(l.w);
- triangle_light_sample(kg, prim, object, randu, randv, ls);
+ triangle_light_sample(kg, prim, object, randu, randv, time, ls);
}
else {
int point = -prim-1;
diff --git a/intern/cycles/kernel/kernel_montecarlo.h b/intern/cycles/kernel/kernel_montecarlo.h
index 68f007cfd97..bdd147f83d3 100644
--- a/intern/cycles/kernel/kernel_montecarlo.h
+++ b/intern/cycles/kernel/kernel_montecarlo.h
@@ -91,8 +91,8 @@ __device_inline void sample_uniform_hemisphere(const float3 N,
float3 *omega_in, float *pdf)
{
float z = randu;
- float r = sqrtf(max(0.f, 1.f - z*z));
- float phi = 2.f * M_PI_F * randv;
+ float r = sqrtf(max(0.0f, 1.0f - z*z));
+ float phi = 2.0f * M_PI_F * randv;
float x = r * cosf(phi);
float y = r * sinf(phi);
@@ -185,77 +185,6 @@ __device float2 regular_polygon_sample(float corners, float rotation, float u, f
return make_float2(cr*p.x - sr*p.y, sr*p.x + cr*p.y);
}
-/* Spherical coordinates <-> Cartesian direction */
-
-__device float2 direction_to_spherical(float3 dir)
-{
- float theta = acosf(dir.z);
- float phi = atan2f(dir.x, dir.y);
-
- return make_float2(theta, phi);
-}
-
-__device float3 spherical_to_direction(float theta, float phi)
-{
- return make_float3(
- sinf(theta)*cosf(phi),
- sinf(theta)*sinf(phi),
- cosf(theta));
-}
-
-/* Equirectangular coordinates <-> Cartesian direction */
-
-__device float2 direction_to_equirectangular(float3 dir)
-{
- float u = -atan2f(dir.y, dir.x)/(2.0f*M_PI_F) + 0.5f;
- float v = atan2f(dir.z, hypotf(dir.x, dir.y))/M_PI_F + 0.5f;
-
- return make_float2(u, v);
-}
-
-__device float3 equirectangular_to_direction(float u, float v)
-{
- float phi = M_PI_F*(1.0f - 2.0f*u);
- float theta = M_PI_F*(1.0f - v);
-
- return make_float3(
- sin(theta)*cos(phi),
- sin(theta)*sin(phi),
- cos(theta));
-}
-
-/* Mirror Ball <-> Cartesion direction */
-
-__device float3 mirrorball_to_direction(float u, float v)
-{
- /* point on sphere */
- float3 dir;
-
- dir.x = 2.0f*u - 1.0f;
- dir.z = 2.0f*v - 1.0f;
- dir.y = -sqrt(max(1.0f - dir.x*dir.x - dir.z*dir.z, 0.0f));
-
- /* reflection */
- float3 I = make_float3(0.0f, -1.0f, 0.0f);
-
- return 2.0f*dot(dir, I)*dir - I;
-}
-
-__device float2 direction_to_mirrorball(float3 dir)
-{
- /* inverse of mirrorball_to_direction */
- dir.y -= 1.0f;
-
- float div = 2.0f*sqrt(max(-0.5f*dir.y, 0.0f));
- if(div > 0.0f)
- dir /= div;
-
- float u = 0.5f*(dir.x + 1.0f);
- float v = 0.5f*(dir.z + 1.0f);
-
- return make_float2(u, v);
-}
-
CCL_NAMESPACE_END
#endif /* __KERNEL_MONTECARLO_CL__ */
diff --git a/intern/cycles/kernel/kernel_object.h b/intern/cycles/kernel/kernel_object.h
index b676f58e5d4..abe427d8345 100644
--- a/intern/cycles/kernel/kernel_object.h
+++ b/intern/cycles/kernel/kernel_object.h
@@ -20,41 +20,101 @@ CCL_NAMESPACE_BEGIN
enum ObjectTransform {
OBJECT_TRANSFORM = 0,
- OBJECT_INVERSE_TRANSFORM = 4,
- OBJECT_NORMAL_TRANSFORM = 8,
- OBJECT_PROPERTIES = 12
+ OBJECT_INVERSE_TRANSFORM = 3,
+ OBJECT_PROPERTIES = 6,
+ OBJECT_TRANSFORM_MOTION_PRE = 8,
+ OBJECT_TRANSFORM_MOTION_POST = 12
};
-__device_inline Transform object_fetch_transform(KernelGlobals *kg, int object, enum ObjectTransform type)
+__device_inline Transform object_fetch_transform(KernelGlobals *kg, int object, float time, enum ObjectTransform type)
{
Transform tfm;
+#ifdef __MOTION__
+ /* if we do motion blur */
+ if(sd->flag & SD_OBJECT_MOTION) {
+ /* fetch motion transforms */
+ MotionTransform motion;
+
+ motion.pre.x = have_motion;
+ motion.pre.y = kernel_tex_fetch(__objects, offset + 1);
+ motion.pre.z = kernel_tex_fetch(__objects, offset + 2);
+ motion.pre.w = kernel_tex_fetch(__objects, offset + 3);
+
+ motion.post.x = kernel_tex_fetch(__objects, offset + 4);
+ motion.post.y = kernel_tex_fetch(__objects, offset + 5);
+ motion.post.z = kernel_tex_fetch(__objects, offset + 6);
+ motion.post.w = kernel_tex_fetch(__objects, offset + 7);
+
+ /* interpolate (todo: do only once per object) */
+ transform_motion_interpolate(&tfm, &motion, time);
+
+ /* invert */
+ if(type == OBJECT_INVERSE_TRANSFORM)
+ tfm = transform_quick_inverse(tfm);
+
+ return tfm;
+ }
+#endif
+
int offset = object*OBJECT_SIZE + (int)type;
tfm.x = kernel_tex_fetch(__objects, offset + 0);
tfm.y = kernel_tex_fetch(__objects, offset + 1);
tfm.z = kernel_tex_fetch(__objects, offset + 2);
- tfm.w = kernel_tex_fetch(__objects, offset + 3);
+ tfm.w = make_float4(0.0f, 0.0f, 0.0f, 1.0f);
return tfm;
}
-__device_inline void object_position_transform(KernelGlobals *kg, int object, float3 *P)
+__device_inline void object_position_transform(KernelGlobals *kg, ShaderData *sd, float3 *P)
{
- Transform tfm = object_fetch_transform(kg, object, OBJECT_TRANSFORM);
+#ifdef __MOTION__
+ *P = transform_point(&sd->ob_tfm, *P);
+#else
+ Transform tfm = object_fetch_transform(kg, sd->object, TIME_INVALID, OBJECT_TRANSFORM);
*P = transform_point(&tfm, *P);
+#endif
+}
+
+__device_inline void object_inverse_position_transform(KernelGlobals *kg, ShaderData *sd, float3 *P)
+{
+#ifdef __MOTION__
+ *P = transform_point(&sd->ob_itfm, *P);
+#else
+ Transform tfm = object_fetch_transform(kg, sd->object, TIME_INVALID, OBJECT_INVERSE_TRANSFORM);
+ *P = transform_point(&tfm, *P);
+#endif
+}
+
+__device_inline void object_inverse_normal_transform(KernelGlobals *kg, ShaderData *sd, float3 *N)
+{
+#ifdef __MOTION__
+ *N = normalize(transform_direction_transposed(&sd->ob_tfm, *N));
+#else
+ Transform tfm = object_fetch_transform(kg, sd->object, TIME_INVALID, OBJECT_TRANSFORM);
+ *N = normalize(transform_direction_transposed(&tfm, *N));
+#endif
}
-__device_inline void object_normal_transform(KernelGlobals *kg, int object, float3 *N)
+__device_inline void object_normal_transform(KernelGlobals *kg, ShaderData *sd, float3 *N)
{
- Transform tfm = object_fetch_transform(kg, object, OBJECT_NORMAL_TRANSFORM);
- *N = normalize(transform_direction(&tfm, *N));
+#ifdef __MOTION__
+ *N = normalize(transform_direction_transposed(&sd->ob_itfm, *N));
+#else
+ Transform tfm = object_fetch_transform(kg, sd->object, TIME_INVALID, OBJECT_INVERSE_TRANSFORM);
+ *N = normalize(transform_direction_transposed(&tfm, *N));
+#endif
}
-__device_inline void object_dir_transform(KernelGlobals *kg, int object, float3 *D)
+__device_inline void object_dir_transform(KernelGlobals *kg, ShaderData *sd, float3 *D)
{
- Transform tfm = object_fetch_transform(kg, object, OBJECT_TRANSFORM);
+#ifdef __MOTION__
+ *D = transform_direction(&sd->ob_tfm, *D);
+#else
+ Transform tfm = object_fetch_transform(kg, sd->object, 0.0f, OBJECT_TRANSFORM);
*D = transform_direction(&tfm, *D);
+#endif
}
__device_inline float object_surface_area(KernelGlobals *kg, int object)
diff --git a/intern/cycles/kernel/kernel_passes.h b/intern/cycles/kernel/kernel_passes.h
index fd4ee17cdc1..f3ddda4a392 100644
--- a/intern/cycles/kernel/kernel_passes.h
+++ b/intern/cycles/kernel/kernel_passes.h
@@ -72,9 +72,14 @@ __device_inline void kernel_write_data_passes(KernelGlobals *kg, __global float
kernel_write_pass_float3(buffer + kernel_data.film.pass_normal, sample, normal);
}
if(flag & PASS_UV) {
- float3 uv = make_float3(0.0f, 0.0f, 0.0f); /* todo: request and lookup */
+ float3 uv = triangle_uv(kg, sd);
kernel_write_pass_float3(buffer + kernel_data.film.pass_uv, sample, uv);
}
+ if(flag & PASS_MOTION) {
+ float4 speed = triangle_motion_vector(kg, sd);
+ kernel_write_pass_float4(buffer + kernel_data.film.pass_motion, sample, speed);
+ kernel_write_pass_float(buffer + kernel_data.film.pass_motion_weight, sample, 1.0f);
+ }
}
if(flag & (PASS_DIFFUSE_INDIRECT|PASS_DIFFUSE_COLOR|PASS_DIFFUSE_DIRECT))
diff --git a/intern/cycles/kernel/kernel_path.h b/intern/cycles/kernel/kernel_path.h
index ff12e85375c..e0e17ee57dc 100644
--- a/intern/cycles/kernel/kernel_path.h
+++ b/intern/cycles/kernel/kernel_path.h
@@ -18,8 +18,9 @@
#include "kernel_differential.h"
#include "kernel_montecarlo.h"
-#include "kernel_triangle.h"
+#include "kernel_projection.h"
#include "kernel_object.h"
+#include "kernel_triangle.h"
#ifdef __QBVH__
#include "kernel_qbvh.h"
#else
@@ -223,6 +224,7 @@ __device float4 kernel_path_integrate(KernelGlobals *kg, RNG *rng, int sample, R
path_radiance_init(&L, kernel_data.film.use_light_pass);
+ float min_ray_pdf = FLT_MAX;
float ray_pdf = 0.0f;
PathState state;
int rng_offset = PRNG_BASE_NUM;
@@ -239,13 +241,17 @@ __device float4 kernel_path_integrate(KernelGlobals *kg, RNG *rng, int sample, R
/* eval background shader if nothing hit */
if(kernel_data.background.transparent && (state.flag & PATH_RAY_CAMERA)) {
L_transparent += average(throughput);
+
+#ifdef __PASSES__
+ if(!(kernel_data.film.pass_flag & PASS_BACKGROUND))
+#endif
+ break;
}
+
#ifdef __BACKGROUND__
- else {
- /* sample background shader */
- float3 L_background = indirect_background(kg, &ray, state.flag, ray_pdf);
- path_radiance_accum_background(&L, throughput, L_background, state.bounce);
- }
+ /* sample background shader */
+ float3 L_background = indirect_background(kg, &ray, state.flag, ray_pdf);
+ path_radiance_accum_background(&L, throughput, L_background, state.bounce);
#endif
break;
@@ -259,13 +265,34 @@ __device float4 kernel_path_integrate(KernelGlobals *kg, RNG *rng, int sample, R
kernel_write_data_passes(kg, buffer, &L, &sd, sample, state.flag, throughput);
+ /* blurring of bsdf after bounces, for rays that have a small likelihood
+ of following this particular path (diffuse, rough glossy) */
+ if(kernel_data.integrator.filter_glossy != FLT_MAX) {
+ float blur_pdf = kernel_data.integrator.filter_glossy*min_ray_pdf;
+
+ if(blur_pdf < 1.0f) {
+ float blur_roughness = sqrtf(1.0f - blur_pdf)*0.5f;
+ shader_bsdf_blur(kg, &sd, blur_roughness);
+ }
+ }
+
+ /* holdout */
#ifdef __HOLDOUT__
- if((sd.flag & SD_HOLDOUT) && (state.flag & PATH_RAY_CAMERA)) {
- float3 holdout_weight = shader_holdout_eval(kg, &sd);
+ if((sd.flag & (SD_HOLDOUT|SD_HOLDOUT_MASK)) && (state.flag & PATH_RAY_CAMERA)) {
+ if(kernel_data.background.transparent) {
+ float3 holdout_weight;
+
+ if(sd.flag & SD_HOLDOUT_MASK)
+ holdout_weight = make_float3(1.0f, 1.0f, 1.0f);
+ else
+ shader_holdout_eval(kg, &sd);
- if(kernel_data.background.transparent)
/* any throughput is ok, should all be identical here */
L_transparent += average(holdout_weight*throughput);
+ }
+
+ if(sd.flag & SD_HOLDOUT_MASK)
+ break;
}
#endif
@@ -307,6 +334,9 @@ __device float4 kernel_path_integrate(KernelGlobals *kg, RNG *rng, int sample, R
light_ray.P = ray_offset(sd.P, sd.Ng);
light_ray.D = ao_D;
light_ray.t = kernel_data.background.ao_distance;
+#ifdef __MOTION__
+ light_ray.time = sd.time;
+#endif
if(!shadow_blocked(kg, &state, &light_ray, &ao_shadow)) {
float3 ao_bsdf = shader_bsdf_diffuse(kg, &sd)*kernel_data.background.ao_factor;
@@ -329,6 +359,10 @@ __device float4 kernel_path_integrate(KernelGlobals *kg, RNG *rng, int sample, R
BsdfEval L_light;
bool is_lamp;
+#ifdef __MOTION__
+ light_ray.time = sd.time;
+#endif
+
#ifdef __MULTI_LIGHT__
/* index -1 means randomly sample from distribution */
int i = (kernel_data.integrator.num_distribution)? -1: 0;
@@ -378,8 +412,10 @@ __device float4 kernel_path_integrate(KernelGlobals *kg, RNG *rng, int sample, R
path_radiance_bsdf_bounce(&L, &throughput, &bsdf_eval, bsdf_pdf, state.bounce, label);
/* set labels */
- if(!(label & LABEL_TRANSPARENT))
+ if(!(label & LABEL_TRANSPARENT)) {
ray_pdf = bsdf_pdf;
+ min_ray_pdf = fminf(bsdf_pdf, min_ray_pdf);
+ }
/* update path state */
path_state_next(kg, &state, label);
@@ -394,7 +430,7 @@ __device float4 kernel_path_integrate(KernelGlobals *kg, RNG *rng, int sample, R
#endif
}
- float3 L_sum = path_radiance_sum(&L);
+ float3 L_sum = path_radiance_sum(kg, &L);
#ifdef __CLAMP_SAMPLE__
path_radiance_clamp(&L, &L_sum, kernel_data.integrator.sample_clamp);
@@ -430,10 +466,21 @@ __device void kernel_path_trace(KernelGlobals *kg,
float lens_u = path_rng(kg, &rng, sample, PRNG_LENS_U);
float lens_v = path_rng(kg, &rng, sample, PRNG_LENS_V);
- camera_sample(kg, x, y, filter_u, filter_v, lens_u, lens_v, &ray);
+#ifdef __MOTION__
+ float time = path_rng(kg, &rng, sample, PRNG_TIME);
+#else
+ float time = 0.0f;
+#endif
+
+ camera_sample(kg, x, y, filter_u, filter_v, lens_u, lens_v, time, &ray);
/* integrate */
- float4 L = kernel_path_integrate(kg, &rng, sample, ray, buffer);
+ float4 L;
+
+ if (ray.t != 0.f)
+ L = kernel_path_integrate(kg, &rng, sample, ray, buffer);
+ else
+ L = make_float4(0.f, 0.f, 0.f, 0.f);
/* accumulate result in output buffer */
kernel_write_pass_float4(buffer, sample, L);
diff --git a/intern/cycles/kernel/kernel_projection.h b/intern/cycles/kernel/kernel_projection.h
new file mode 100644
index 00000000000..a5735920cd9
--- /dev/null
+++ b/intern/cycles/kernel/kernel_projection.h
@@ -0,0 +1,210 @@
+/*
+ * Parts adapted from Open Shading Language with this license:
+ *
+ * Copyright (c) 2009-2010 Sony Pictures Imageworks Inc., et al.
+ * All Rights Reserved.
+ *
+ * Modifications Copyright 2011, Blender Foundation.
+ *
+ * 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 Sony Pictures Imageworks 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 AND CONTRIBUTORS
+ * "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.
+*/
+
+#ifndef __KERNEL_PROJECTION_CL__
+#define __KERNEL_PROJECTION_CL__
+
+CCL_NAMESPACE_BEGIN
+
+/* Spherical coordinates <-> Cartesian direction */
+
+__device float2 direction_to_spherical(float3 dir)
+{
+ float theta = acosf(dir.z);
+ float phi = atan2f(dir.x, dir.y);
+
+ return make_float2(theta, phi);
+}
+
+__device float3 spherical_to_direction(float theta, float phi)
+{
+ return make_float3(
+ sinf(theta)*cosf(phi),
+ sinf(theta)*sinf(phi),
+ cosf(theta));
+}
+
+/* Equirectangular coordinates <-> Cartesian direction */
+
+__device float2 direction_to_equirectangular(float3 dir)
+{
+ float u = -atan2f(dir.y, dir.x)/(2.0f*M_PI_F) + 0.5f;
+ float v = atan2f(dir.z, hypotf(dir.x, dir.y))/M_PI_F + 0.5f;
+
+ return make_float2(u, v);
+}
+
+__device float3 equirectangular_to_direction(float u, float v)
+{
+ float phi = M_PI_F*(1.0f - 2.0f*u);
+ float theta = M_PI_F*(1.0f - v);
+
+ return make_float3(
+ sin(theta)*cos(phi),
+ sin(theta)*sin(phi),
+ cos(theta));
+}
+
+/* Fisheye <-> Cartesian direction */
+
+__device float2 direction_to_fisheye(float3 dir, float fov)
+{
+ float r = atan2f(sqrt(dir.y*dir.y + dir.z*dir.z), dir.x) / fov;
+ float phi = atan2(dir.z, dir.y);
+
+ float u = r * cos(phi) + 0.5f;
+ float v = r * sin(phi) + 0.5f;
+
+ return make_float2(u, v);
+}
+
+__device float3 fisheye_to_direction(float u, float v, float fov)
+{
+ u = (u - 0.5f) * 2.0f;
+ v = (v - 0.5f) * 2.0f;
+
+ float r = sqrt(u*u + v*v);
+
+ if(r > 1.0f)
+ return make_float3(0.0f, 0.0f, 0.0f);
+
+ float phi = acosf((r != 0.0f)? u/r: 0.0f);
+ float theta = asinf(r) * (fov / M_PI_F);
+
+ if(v < 0.0f) phi = -phi;
+
+ return make_float3(
+ cosf(theta),
+ -cosf(phi)*sinf(theta),
+ sinf(phi)*sinf(theta)
+ );
+}
+
+__device float2 direction_to_fisheye_equisolid(float3 dir, float lens, float width, float height)
+{
+ float theta = acosf(dir.x);
+ float r = 2.0f * lens * sinf(theta * 0.5f);
+ float phi = atan2f(dir.z, dir.y);
+
+ float u = r * cosf(phi) / width + 0.5f;
+ float v = r * sinf(phi) / height + 0.5f;
+
+ return make_float2(u, v);
+}
+
+__device float3 fisheye_equisolid_to_direction(float u, float v, float lens, float fov, float width, float height)
+{
+ u = (u - 0.5f) * width;
+ v = (v - 0.5f) * height;
+
+ float rmax = 2.0f * lens * sinf(fov * 0.25f);
+ float r = sqrt(u*u + v*v);
+
+ if(r > rmax)
+ return make_float3(0.0f, 0.0f, 0.0f);
+
+ float phi = acosf((r != 0.0f)? u/r: 0.0f);
+ float theta = 2.0f * asinf(r/(2.0f * lens));
+
+ if(v < 0.0f) phi = -phi;
+
+ return make_float3(
+ cosf(theta),
+ -cosf(phi)*sinf(theta),
+ sinf(phi)*sinf(theta)
+ );
+}
+
+/* Mirror Ball <-> Cartesion direction */
+
+__device float3 mirrorball_to_direction(float u, float v)
+{
+ /* point on sphere */
+ float3 dir;
+
+ dir.x = 2.0f*u - 1.0f;
+ dir.z = 2.0f*v - 1.0f;
+ dir.y = -sqrt(max(1.0f - dir.x*dir.x - dir.z*dir.z, 0.0f));
+
+ /* reflection */
+ float3 I = make_float3(0.0f, -1.0f, 0.0f);
+
+ return 2.0f*dot(dir, I)*dir - I;
+}
+
+__device float2 direction_to_mirrorball(float3 dir)
+{
+ /* inverse of mirrorball_to_direction */
+ dir.y -= 1.0f;
+
+ float div = 2.0f*sqrt(max(-0.5f*dir.y, 0.0f));
+ if(div > 0.0f)
+ dir /= div;
+
+ float u = 0.5f*(dir.x + 1.0f);
+ float v = 0.5f*(dir.z + 1.0f);
+
+ return make_float2(u, v);
+}
+
+__device float3 panorama_to_direction(KernelGlobals *kg, float u, float v)
+{
+ switch(kernel_data.cam.panorama_type) {
+ case PANORAMA_EQUIRECTANGULAR:
+ return equirectangular_to_direction(u, v);
+ case PANORAMA_FISHEYE_EQUIDISTANT:
+ return fisheye_to_direction(u, v, kernel_data.cam.fisheye_fov);
+ case PANORAMA_FISHEYE_EQUISOLID:
+ default:
+ return fisheye_equisolid_to_direction(u, v, kernel_data.cam.fisheye_lens,
+ kernel_data.cam.fisheye_fov, kernel_data.cam.sensorwidth, kernel_data.cam.sensorheight);
+ }
+}
+
+__device float2 direction_to_panorama(KernelGlobals *kg, float3 dir)
+{
+ switch(kernel_data.cam.panorama_type) {
+ case PANORAMA_EQUIRECTANGULAR:
+ return direction_to_equirectangular(dir);
+ case PANORAMA_FISHEYE_EQUIDISTANT:
+ return direction_to_fisheye(dir, kernel_data.cam.fisheye_fov);
+ case PANORAMA_FISHEYE_EQUISOLID:
+ default:
+ return direction_to_fisheye_equisolid(dir, kernel_data.cam.fisheye_lens,
+ kernel_data.cam.sensorwidth, kernel_data.cam.sensorheight);
+ }
+}
+
+CCL_NAMESPACE_END
+
+#endif /* __KERNEL_PROJECTION_CL__ */
+
diff --git a/intern/cycles/kernel/kernel_shader.h b/intern/cycles/kernel/kernel_shader.h
index 46ef5d2022a..2138038e49d 100644
--- a/intern/cycles/kernel/kernel_shader.h
+++ b/intern/cycles/kernel/kernel_shader.h
@@ -53,16 +53,9 @@ __device_inline void shader_setup_from_ray(KernelGlobals *kg, ShaderData *sd,
float3 Ng = make_float3(Ns.x, Ns.y, Ns.z);
int shader = __float_as_int(Ns.w);
- /* vectors */
- sd->P = bvh_triangle_refine(kg, isect, ray);
- sd->Ng = Ng;
- sd->N = Ng;
- sd->I = -ray->D;
- sd->shader = shader;
-
/* triangle */
#ifdef __INSTANCING__
- sd->object = isect->object;
+ sd->object = (isect->object == ~0)? kernel_tex_fetch(__prim_object, isect->prim): isect->object;
#endif
sd->prim = prim;
#ifdef __UV__
@@ -70,11 +63,28 @@ __device_inline void shader_setup_from_ray(KernelGlobals *kg, ShaderData *sd,
sd->v = isect->v;
#endif
+ /* matrices and time */
+#ifdef __MOTION__
+ sd->ob_tfm = object_fetch_transform(kg, sd->object, ray->time, OBJECT_TRANSFORM);
+ sd->ob_itfm = object_fetch_transform(kg, sd->object, ray->time, OBJECT_INVERSE_TRANSFORM);
+
+ sd->time = ray->time;
+#endif
+
+ /* vectors */
+ sd->P = bvh_triangle_refine(kg, sd, isect, ray);
+ sd->Ng = Ng;
+ sd->N = Ng;
+ sd->I = -ray->D;
+ sd->shader = shader;
+ sd->ray_length = isect->t;
+
/* smooth normal */
if(sd->shader & SHADER_SMOOTH_NORMAL)
sd->N = triangle_smooth_normal(kg, sd->prim, sd->u, sd->v);
sd->flag = kernel_tex_fetch(__shader_flag, (sd->shader & SHADER_MASK)*2);
+ sd->flag |= kernel_tex_fetch(__object_flag, sd->object);
#ifdef __DPDU__
/* dPdu/dPdv */
@@ -82,19 +92,15 @@ __device_inline void shader_setup_from_ray(KernelGlobals *kg, ShaderData *sd,
#endif
#ifdef __INSTANCING__
- if(sd->object != ~0) {
+ if(isect->object != ~0) {
/* instance transform */
- object_normal_transform(kg, sd->object, &sd->N);
- object_normal_transform(kg, sd->object, &sd->Ng);
+ object_normal_transform(kg, sd, &sd->N);
+ object_normal_transform(kg, sd, &sd->Ng);
#ifdef __DPDU__
- object_dir_transform(kg, sd->object, &sd->dPdu);
- object_dir_transform(kg, sd->object, &sd->dPdv);
+ object_dir_transform(kg, sd, &sd->dPdu);
+ object_dir_transform(kg, sd, &sd->dPdv);
#endif
}
- else {
- /* non-instanced object index */
- sd->object = kernel_tex_fetch(__prim_object, isect->prim);
- }
#endif
/* backfacing test */
@@ -122,7 +128,7 @@ __device_inline void shader_setup_from_ray(KernelGlobals *kg, ShaderData *sd,
__device void shader_setup_from_sample(KernelGlobals *kg, ShaderData *sd,
const float3 P, const float3 Ng, const float3 I,
- int shader, int object, int prim, float u, float v)
+ int shader, int object, int prim, float u, float v, float t, float time)
{
/* vectors */
sd->P = P;
@@ -140,6 +146,7 @@ __device void shader_setup_from_sample(KernelGlobals *kg, ShaderData *sd,
sd->u = u;
sd->v = v;
#endif
+ sd->ray_length = t;
/* detect instancing, for non-instanced the object index is -object-1 */
#ifdef __INSTANCING__
@@ -155,17 +162,26 @@ __device void shader_setup_from_sample(KernelGlobals *kg, ShaderData *sd,
}
#endif
+#ifdef __MOTION__
+ sd->time = time;
+
+ sd->ob_tfm = object_fetch_transform(kg, sd->object, time, OBJECT_TRANSFORM);
+ sd->ob_itfm = object_fetch_transform(kg, sd->object, time, OBJECT_INVERSE_TRANSFORM);
+#endif
+
/* smooth normal */
if(sd->shader & SHADER_SMOOTH_NORMAL) {
sd->N = triangle_smooth_normal(kg, sd->prim, sd->u, sd->v);
#ifdef __INSTANCING__
if(instanced)
- object_normal_transform(kg, sd->object, &sd->N);
+ object_normal_transform(kg, sd, &sd->N);
#endif
}
sd->flag = kernel_tex_fetch(__shader_flag, (sd->shader & SHADER_MASK)*2);
+ if(sd->object != -1)
+ sd->flag |= kernel_tex_fetch(__object_flag, sd->object);
#ifdef __DPDU__
/* dPdu/dPdv */
@@ -178,8 +194,8 @@ __device void shader_setup_from_sample(KernelGlobals *kg, ShaderData *sd,
#ifdef __INSTANCING__
if(instanced) {
- object_dir_transform(kg, sd->object, &sd->dPdu);
- object_dir_transform(kg, sd->object, &sd->dPdv);
+ object_dir_transform(kg, sd, &sd->dPdu);
+ object_dir_transform(kg, sd, &sd->dPdv);
}
#endif
}
@@ -229,7 +245,7 @@ __device void shader_setup_from_displace(KernelGlobals *kg, ShaderData *sd,
/* watch out: no instance transform currently */
- shader_setup_from_sample(kg, sd, P, Ng, I, shader, object, prim, u, v);
+ shader_setup_from_sample(kg, sd, P, Ng, I, shader, object, prim, u, v, 0.0f, TIME_INVALID);
}
/* ShaderData setup from ray into background */
@@ -243,6 +259,10 @@ __device_inline void shader_setup_from_background(KernelGlobals *kg, ShaderData
sd->I = -sd->P;
sd->shader = kernel_data.background.shader;
sd->flag = kernel_tex_fetch(__shader_flag, (sd->shader & SHADER_MASK)*2);
+#ifdef __MOTION__
+ sd->time = ray->time;
+#endif
+ sd->ray_length = 0.0f;
#ifdef __INSTANCING__
sd->object = ~0;
diff --git a/intern/cycles/kernel/kernel_textures.h b/intern/cycles/kernel/kernel_textures.h
index 8bab735d0d1..f4de4c100c4 100644
--- a/intern/cycles/kernel/kernel_textures.h
+++ b/intern/cycles/kernel/kernel_textures.h
@@ -39,6 +39,7 @@ KERNEL_TEX(float2, texture_float2, __light_background_conditional_cdf)
/* shaders */
KERNEL_TEX(uint4, texture_uint4, __svm_nodes)
KERNEL_TEX(uint, texture_uint, __shader_flag)
+KERNEL_TEX(uint, texture_uint, __object_flag)
/* camera/film */
KERNEL_TEX(float, texture_float, __filter_table)
diff --git a/intern/cycles/kernel/kernel_triangle.h b/intern/cycles/kernel/kernel_triangle.h
index 7eaf54d14bf..674c3b52539 100644
--- a/intern/cycles/kernel/kernel_triangle.h
+++ b/intern/cycles/kernel/kernel_triangle.h
@@ -179,5 +179,95 @@ __device float3 triangle_attribute_float3(KernelGlobals *kg, const ShaderData *s
}
}
+/* motion */
+
+__device int triangle_find_attribute(KernelGlobals *kg, ShaderData *sd, uint id)
+{
+ /* find attribute by unique id */
+ uint attr_offset = sd->object*kernel_data.bvh.attributes_map_stride;
+ uint4 attr_map = kernel_tex_fetch(__attributes_map, attr_offset);
+
+ while(attr_map.x != id)
+ attr_map = kernel_tex_fetch(__attributes_map, ++attr_offset);
+
+ /* return result */
+ return (attr_map.y == ATTR_ELEMENT_NONE)? ATTR_STD_NOT_FOUND: attr_map.z;
+}
+
+__device float4 triangle_motion_vector(KernelGlobals *kg, ShaderData *sd)
+{
+ float3 motion_pre = sd->P, motion_post = sd->P;
+
+ /* deformation motion */
+ int offset_pre = triangle_find_attribute(kg, sd, ATTR_STD_MOTION_PRE);
+ int offset_post = triangle_find_attribute(kg, sd, ATTR_STD_MOTION_POST);
+
+ if(offset_pre != ATTR_STD_NOT_FOUND)
+ motion_pre = triangle_attribute_float3(kg, sd, ATTR_ELEMENT_VERTEX, offset_pre, NULL, NULL);
+ if(offset_post != ATTR_STD_NOT_FOUND)
+ motion_post = triangle_attribute_float3(kg, sd, ATTR_ELEMENT_VERTEX, offset_post, NULL, NULL);
+
+ /* object motion. note that depending on the mesh having motion vectors, this
+ transformation was set match the world/object space of motion_pre/post */
+ Transform tfm;
+
+ tfm = object_fetch_transform(kg, sd->object, TIME_INVALID, OBJECT_TRANSFORM_MOTION_PRE);
+ motion_pre = transform_point(&tfm, motion_pre);
+
+ tfm = object_fetch_transform(kg, sd->object, TIME_INVALID, OBJECT_TRANSFORM_MOTION_POST);
+ motion_post = transform_point(&tfm, motion_post);
+
+ float3 P;
+
+ /* camera motion, for perspective/orthographic motion.pre/post will be a
+ world-to-raster matrix, for panorama it's world-to-camera */
+ if (kernel_data.cam.type != CAMERA_PANORAMA) {
+ tfm = kernel_data.cam.worldtoraster;
+ P = transform_perspective(&tfm, sd->P);
+
+ tfm = kernel_data.cam.motion.pre;
+ motion_pre = transform_perspective(&tfm, motion_pre);
+
+ tfm = kernel_data.cam.motion.post;
+ motion_post = transform_perspective(&tfm, motion_post);
+ }
+ else {
+ tfm = kernel_data.cam.worldtocamera;
+ P = normalize(transform_point(&tfm, sd->P));
+ P = float2_to_float3(direction_to_panorama(kg, P));
+ P.x *= kernel_data.cam.width;
+ P.y *= kernel_data.cam.height;
+
+ tfm = kernel_data.cam.motion.pre;
+ motion_pre = normalize(transform_point(&tfm, motion_pre));
+ motion_pre = float2_to_float3(direction_to_panorama(kg, motion_pre));
+ motion_pre.x *= kernel_data.cam.width;
+ motion_pre.y *= kernel_data.cam.height;
+
+ tfm = kernel_data.cam.motion.post;
+ motion_post = normalize(transform_point(&tfm, motion_post));
+ motion_post = float2_to_float3(direction_to_panorama(kg, motion_post));
+ motion_post.x *= kernel_data.cam.width;
+ motion_post.y *= kernel_data.cam.height;
+ }
+
+ motion_pre = motion_pre - P;
+ motion_post = P - motion_post;
+
+ return make_float4(motion_pre.x, motion_pre.y, motion_post.x, motion_post.y);
+}
+
+__device float3 triangle_uv(KernelGlobals *kg, ShaderData *sd)
+{
+ int offset_uv = triangle_find_attribute(kg, sd, ATTR_STD_UV);
+
+ if(offset_uv == ATTR_STD_NOT_FOUND)
+ return make_float3(0.0f, 0.0f, 0.0f);
+
+ float3 uv = triangle_attribute_float3(kg, sd, ATTR_ELEMENT_CORNER, offset_uv, NULL, NULL);
+ uv.z = 1.0f;
+ return uv;
+}
+
CCL_NAMESPACE_END
diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h
index 391dcd12dad..edca9f8d34d 100644
--- a/intern/cycles/kernel/kernel_types.h
+++ b/intern/cycles/kernel/kernel_types.h
@@ -20,9 +20,12 @@
#define __KERNEL_TYPES_H__
#include "kernel_math.h"
-
#include "svm/svm_types.h"
+#ifndef __KERNEL_GPU__
+#define __KERNEL_CPU__
+#endif
+
CCL_NAMESPACE_BEGIN
/* constants */
@@ -30,6 +33,7 @@ CCL_NAMESPACE_BEGIN
#define LIGHT_SIZE 4
#define FILTER_TABLE_SIZE 256
#define RAMP_TABLE_SIZE 256
+#define TIME_INVALID FLT_MAX
/* device capabilities */
#ifdef __KERNEL_CPU__
@@ -75,6 +79,7 @@ CCL_NAMESPACE_BEGIN
#define __PASSES__
#define __BACKGROUND_MIS__
#define __AO__
+//#define __MOTION__
#endif
//#define __MULTI_LIGHT__
@@ -90,14 +95,21 @@ enum ShaderEvalType {
SHADER_EVAL_BACKGROUND
};
-/* Path Tracing */
+/* Path Tracing
+ * note we need to keep the u/v pairs at even values */
enum PathTraceDimension {
PRNG_FILTER_U = 0,
PRNG_FILTER_V = 1,
PRNG_LENS_U = 2,
PRNG_LENS_V = 3,
+#ifdef __MOTION__
+ PRNG_TIME = 4,
+ PRNG_UNUSED = 5,
+ PRNG_BASE_NUM = 6,
+#else
PRNG_BASE_NUM = 4,
+#endif
PRNG_BSDF_U = 0,
PRNG_BSDF_V = 1,
@@ -161,23 +173,25 @@ typedef enum PassType {
PASS_NONE = 0,
PASS_COMBINED = 1,
PASS_DEPTH = 2,
- PASS_NORMAL = 8,
- PASS_UV = 16,
- PASS_OBJECT_ID = 32,
- PASS_MATERIAL_ID = 64,
- PASS_DIFFUSE_COLOR = 128,
- PASS_GLOSSY_COLOR = 256,
- PASS_TRANSMISSION_COLOR = 512,
- PASS_DIFFUSE_INDIRECT = 1024,
- PASS_GLOSSY_INDIRECT = 2048,
- PASS_TRANSMISSION_INDIRECT = 4096,
- PASS_DIFFUSE_DIRECT = 8192,
- PASS_GLOSSY_DIRECT = 16384,
- PASS_TRANSMISSION_DIRECT = 32768,
- PASS_EMISSION = 65536,
- PASS_BACKGROUND = 131072,
- PASS_AO = 262144,
- PASS_SHADOW = 524288
+ PASS_NORMAL = 4,
+ PASS_UV = 8,
+ PASS_OBJECT_ID = 16,
+ PASS_MATERIAL_ID = 32,
+ PASS_DIFFUSE_COLOR = 64,
+ PASS_GLOSSY_COLOR = 128,
+ PASS_TRANSMISSION_COLOR = 256,
+ PASS_DIFFUSE_INDIRECT = 512,
+ PASS_GLOSSY_INDIRECT = 1024,
+ PASS_TRANSMISSION_INDIRECT = 2048,
+ PASS_DIFFUSE_DIRECT = 4096,
+ PASS_GLOSSY_DIRECT = 8192,
+ PASS_TRANSMISSION_DIRECT = 16384,
+ PASS_EMISSION = 32768,
+ PASS_BACKGROUND = 65536,
+ PASS_AO = 131072,
+ PASS_SHADOW = 262144,
+ PASS_MOTION = 524288,
+ PASS_MOTION_WEIGHT = 1048576
} PassType;
#define PASS_ALL (~0)
@@ -254,7 +268,15 @@ typedef enum LightType {
enum CameraType {
CAMERA_PERSPECTIVE,
CAMERA_ORTHOGRAPHIC,
- CAMERA_ENVIRONMENT
+ CAMERA_PANORAMA
+};
+
+/* Panorama Type */
+
+enum PanoramaType {
+ PANORAMA_EQUIRECTANGULAR,
+ PANORAMA_FISHEYE_EQUIDISTANT,
+ PANORAMA_FISHEYE_EQUISOLID
};
/* Differential */
@@ -275,6 +297,7 @@ typedef struct Ray {
float3 P;
float3 D;
float t;
+ float time;
#ifdef __RAY_DIFFERENTIALS__
differential3 dP;
@@ -300,6 +323,21 @@ typedef enum AttributeElement {
ATTR_ELEMENT_NONE
} AttributeElement;
+typedef enum AttributeStandard {
+ ATTR_STD_NONE = 0,
+ ATTR_STD_VERTEX_NORMAL,
+ ATTR_STD_FACE_NORMAL,
+ ATTR_STD_UV,
+ ATTR_STD_GENERATED,
+ ATTR_STD_POSITION_UNDEFORMED,
+ ATTR_STD_POSITION_UNDISPLACED,
+ ATTR_STD_MOTION_PRE,
+ ATTR_STD_MOTION_POST,
+ ATTR_STD_NUM,
+
+ ATTR_STD_NOT_FOUND = ~0
+} AttributeStandard;
+
/* Closure data */
#define MAX_CLOSURE 8
@@ -340,7 +378,11 @@ enum ShaderDataFlag {
SD_SAMPLE_AS_LIGHT = 128, /* direct light sample */
SD_HAS_SURFACE_TRANSPARENT = 256, /* has surface transparency */
SD_HAS_VOLUME = 512, /* has volume shader */
- SD_HOMOGENEOUS_VOLUME = 1024 /* has homogeneous volume */
+ SD_HOMOGENEOUS_VOLUME = 1024, /* has homogeneous volume */
+
+ /* object flags */
+ SD_HOLDOUT_MASK = 2048, /* holdout for camera rays */
+ SD_OBJECT_MOTION = 4096 /* has object motion blur */
};
typedef struct ShaderData {
@@ -365,6 +407,19 @@ typedef struct ShaderData {
/* object id if there is one, ~0 otherwise */
int object;
+ /* motion blur sample time */
+ float time;
+
+ /* length of the ray being shaded */
+ float ray_length;
+
+#ifdef __MOTION__
+ /* object <-> world space transformations, cached to avoid
+ * re-interpolating them constantly for shading */
+ Transform ob_tfm;
+ Transform ob_itfm;
+#endif
+
#ifdef __RAY_DIFFERENTIALS__
/* differential of P. these are orthogonal to Ng, not N */
differential3 dP;
@@ -405,7 +460,11 @@ typedef struct ShaderData {
typedef struct KernelCamera {
/* type */
int type;
- int pad1, pad2, pad3;
+
+ /* panorama */
+ int panorama_type;
+ float fisheye_fov;
+ float fisheye_lens;
/* matrices */
Transform cameratoworld;
@@ -422,13 +481,20 @@ typedef struct KernelCamera {
float focaldistance;
/* motion blur */
- float shutteropen;
- float shutterclose;
+ float shuttertime;
+ int have_motion;
/* clipping */
float nearclip;
float cliplength;
+ /* sensor size */
+ float sensorwidth;
+ float sensorheight;
+
+ /* render size */
+ float width, height;
+
/* more matrices */
Transform screentoworld;
Transform rastertoworld;
@@ -437,6 +503,8 @@ typedef struct KernelCamera {
Transform worldtoraster;
Transform worldtondc;
Transform worldtocamera;
+
+ MotionTransform motion;
} KernelCamera;
typedef struct KernelFilm {
@@ -448,27 +516,32 @@ typedef struct KernelFilm {
int pass_combined;
int pass_depth;
int pass_normal;
- int pass_pad;
+ int pass_motion;
+ int pass_motion_weight;
int pass_uv;
int pass_object_id;
int pass_material_id;
- int pass_diffuse_color;
+ int pass_diffuse_color;
int pass_glossy_color;
int pass_transmission_color;
int pass_diffuse_indirect;
- int pass_glossy_indirect;
+ int pass_glossy_indirect;
int pass_transmission_indirect;
int pass_diffuse_direct;
int pass_glossy_direct;
- int pass_transmission_direct;
+ int pass_transmission_direct;
int pass_emission;
int pass_background;
int pass_ao;
+
int pass_shadow;
+ int pass_pad1;
+ int pass_pad2;
+ int pass_pad3;
} KernelFilm;
typedef struct KernelBackground {
@@ -516,6 +589,7 @@ typedef struct KernelIntegrator {
/* caustics */
int no_caustics;
+ float filter_glossy;
/* seed */
int seed;
@@ -525,9 +599,6 @@ typedef struct KernelIntegrator {
/* clamp */
float sample_clamp;
-
- /* padding */
- int pad;
} KernelIntegrator;
typedef struct KernelBVH {
diff --git a/intern/cycles/kernel/svm/svm.h b/intern/cycles/kernel/svm/svm.h
index 50181c0cf2c..5f4d7bbd0c4 100644
--- a/intern/cycles/kernel/svm/svm.h
+++ b/intern/cycles/kernel/svm/svm.h
@@ -326,6 +326,9 @@ __device_noinline void svm_eval_nodes(KernelGlobals *kg, ShaderData *sd, ShaderT
case NODE_MAPPING:
svm_node_mapping(kg, sd, stack, node.y, node.z, &offset);
break;
+ case NODE_MIN_MAX:
+ svm_node_min_max(kg, sd, stack, node.y, node.z, &offset);
+ break;
case NODE_TEX_COORD:
svm_node_tex_coord(kg, sd, stack, node.y, node.z);
break;
@@ -344,6 +347,9 @@ __device_noinline void svm_eval_nodes(KernelGlobals *kg, ShaderData *sd, ShaderT
case NODE_RGB_CURVES:
svm_node_rgb_curves(kg, sd, stack, node, &offset);
break;
+ case NODE_LIGHT_FALLOFF:
+ svm_node_light_falloff(sd, stack, node);
+ break;
case NODE_END:
default:
#ifndef __MULTI_CLOSURE__
diff --git a/intern/cycles/kernel/svm/svm_gamma.h b/intern/cycles/kernel/svm/svm_gamma.h
index 4a8967011c7..c62a01a2d58 100644
--- a/intern/cycles/kernel/svm/svm_gamma.h
+++ b/intern/cycles/kernel/svm/svm_gamma.h
@@ -23,11 +23,11 @@ __device void svm_node_gamma(ShaderData *sd, float *stack, uint in_gamma, uint i
float3 color = stack_load_float3(stack, in_color);
float gamma = stack_load_float(stack, in_gamma);
- if (color.x > 0.0)
+ if (color.x > 0.0f)
color.x = powf(color.x, gamma);
- if (color.y > 0.0)
+ if (color.y > 0.0f)
color.y = powf(color.y, gamma);
- if (color.z > 0.0)
+ if (color.z > 0.0f)
color.z = powf(color.z, gamma);
if (stack_valid(out_color))
diff --git a/intern/cycles/kernel/svm/svm_light_path.h b/intern/cycles/kernel/svm/svm_light_path.h
index 1b13fd93a0f..b29dc9cbd45 100644
--- a/intern/cycles/kernel/svm/svm_light_path.h
+++ b/intern/cycles/kernel/svm/svm_light_path.h
@@ -33,10 +33,38 @@ __device void svm_node_light_path(ShaderData *sd, float *stack, uint type, uint
case NODE_LP_reflection: info = (path_flag & PATH_RAY_REFLECT)? 1.0f: 0.0f; break;
case NODE_LP_transmission: info = (path_flag & PATH_RAY_TRANSMIT)? 1.0f: 0.0f; break;
case NODE_LP_backfacing: info = (sd->flag & SD_BACKFACING)? 1.0f: 0.0f; break;
+ case NODE_LP_ray_length: info = sd->ray_length; break;
}
stack_store_float(stack, out_offset, info);
}
+/* Light Falloff Node */
+
+__device void svm_node_light_falloff(ShaderData *sd, float *stack, uint4 node)
+{
+ uint strength_offset, out_offset, smooth_offset;
+
+ decode_node_uchar4(node.z, &strength_offset, &smooth_offset, &out_offset, NULL);
+
+ float strength = stack_load_float(stack, strength_offset);
+ uint type = node.y;
+
+ switch(type) {
+ case NODE_LIGHT_FALLOFF_QUADRATIC: break;
+ case NODE_LIGHT_FALLOFF_LINEAR: strength *= sd->ray_length; break;
+ case NODE_LIGHT_FALLOFF_CONSTANT: strength *= sd->ray_length*sd->ray_length; break;
+ }
+
+ float smooth = stack_load_float(stack, smooth_offset);
+
+ if(smooth > 0.0f) {
+ float squared = sd->ray_length*sd->ray_length;
+ strength *= squared/(smooth + squared);
+ }
+
+ stack_store_float(stack, out_offset, strength);
+}
+
CCL_NAMESPACE_END
diff --git a/intern/cycles/kernel/svm/svm_mapping.h b/intern/cycles/kernel/svm/svm_mapping.h
index 6dc74aece08..96645ac97db 100644
--- a/intern/cycles/kernel/svm/svm_mapping.h
+++ b/intern/cycles/kernel/svm/svm_mapping.h
@@ -34,5 +34,16 @@ __device void svm_node_mapping(KernelGlobals *kg, ShaderData *sd, float *stack,
stack_store_float3(stack, out_offset, r);
}
+__device void svm_node_min_max(KernelGlobals *kg, ShaderData *sd, float *stack, uint vec_offset, uint out_offset, int *offset)
+{
+ float3 v = stack_load_float3(stack, vec_offset);
+
+ float3 mn = float4_to_float3(read_node_float(kg, offset));
+ float3 mx = float4_to_float3(read_node_float(kg, offset));
+
+ float3 r = min(max(mn, v), mx);
+ stack_store_float3(stack, out_offset, r);
+}
+
CCL_NAMESPACE_END
diff --git a/intern/cycles/kernel/svm/svm_tex_coord.h b/intern/cycles/kernel/svm/svm_tex_coord.h
index f494b6d66e1..aa924bcc38b 100644
--- a/intern/cycles/kernel/svm/svm_tex_coord.h
+++ b/intern/cycles/kernel/svm/svm_tex_coord.h
@@ -20,12 +20,35 @@ CCL_NAMESPACE_BEGIN
/* Texture Coordinate Node */
-__device float3 svm_background_offset(KernelGlobals *kg)
+__device_inline float3 svm_background_offset(KernelGlobals *kg)
{
Transform cameratoworld = kernel_data.cam.cameratoworld;
return make_float3(cameratoworld.x.w, cameratoworld.y.w, cameratoworld.z.w);
}
+__device_inline float3 svm_world_to_ndc(KernelGlobals *kg, ShaderData *sd, float3 P)
+{
+ if(kernel_data.cam.type != CAMERA_PANORAMA) {
+ if(sd->object != ~0)
+ P += svm_background_offset(kg);
+
+ Transform tfm = kernel_data.cam.worldtondc;
+ return transform_perspective(&tfm, P);
+ }
+ else {
+ Transform tfm = kernel_data.cam.worldtocamera;
+
+ if(sd->object != ~0)
+ P = normalize(transform_point(&tfm, P));
+ else
+ P = normalize(transform_direction(&tfm, P));
+
+ float2 uv = direction_to_panorama(kg, P);;
+
+ return make_float3(uv.x, uv.y, 0.0f);
+ }
+}
+
__device void svm_node_tex_coord(KernelGlobals *kg, ShaderData *sd, float *stack, uint type, uint out_offset)
{
float3 data;
@@ -33,13 +56,22 @@ __device void svm_node_tex_coord(KernelGlobals *kg, ShaderData *sd, float *stack
switch(type) {
case NODE_TEXCO_OBJECT: {
if(sd->object != ~0) {
- Transform tfm = object_fetch_transform(kg, sd->object, OBJECT_INVERSE_TRANSFORM);
- data = transform_point(&tfm, sd->P);
+ data = sd->P;
+ object_inverse_position_transform(kg, sd, &data);
}
else
data = sd->P;
break;
}
+ case NODE_TEXCO_NORMAL: {
+ if(sd->object != ~0) {
+ data = sd->N;
+ object_inverse_normal_transform(kg, sd, &data);
+ }
+ else
+ data = sd->N;
+ break;
+ }
case NODE_TEXCO_CAMERA: {
Transform tfm = kernel_data.cam.worldtocamera;
@@ -50,12 +82,7 @@ __device void svm_node_tex_coord(KernelGlobals *kg, ShaderData *sd, float *stack
break;
}
case NODE_TEXCO_WINDOW: {
- Transform tfm = kernel_data.cam.worldtondc;
-
- if(sd->object != ~0)
- data = transform_perspective(&tfm, sd->P);
- else
- data = transform_perspective(&tfm, sd->P + svm_background_offset(kg));
+ data = svm_world_to_ndc(kg, sd, sd->P);
break;
}
case NODE_TEXCO_REFLECTION: {
@@ -78,13 +105,22 @@ __device void svm_node_tex_coord_bump_dx(KernelGlobals *kg, ShaderData *sd, floa
switch(type) {
case NODE_TEXCO_OBJECT: {
if(sd->object != ~0) {
- Transform tfm = object_fetch_transform(kg, sd->object, OBJECT_INVERSE_TRANSFORM);
- data = transform_point(&tfm, sd->P + sd->dP.dx);
+ data = sd->P + sd->dP.dx;
+ object_inverse_position_transform(kg, sd, &data);
}
else
data = sd->P + sd->dP.dx;
break;
}
+ case NODE_TEXCO_NORMAL: {
+ if(sd->object != ~0) {
+ data = sd->N;
+ object_inverse_normal_transform(kg, sd, &data);
+ }
+ else
+ data = sd->N;
+ break;
+ }
case NODE_TEXCO_CAMERA: {
Transform tfm = kernel_data.cam.worldtocamera;
@@ -95,12 +131,7 @@ __device void svm_node_tex_coord_bump_dx(KernelGlobals *kg, ShaderData *sd, floa
break;
}
case NODE_TEXCO_WINDOW: {
- Transform tfm = kernel_data.cam.worldtondc;
-
- if(sd->object != ~0)
- data = transform_perspective(&tfm, sd->P + sd->dP.dx);
- else
- data = transform_perspective(&tfm, sd->P + sd->dP.dx + svm_background_offset(kg));
+ data = svm_world_to_ndc(kg, sd, sd->P + sd->dP.dx);
break;
}
case NODE_TEXCO_REFLECTION: {
@@ -126,13 +157,22 @@ __device void svm_node_tex_coord_bump_dy(KernelGlobals *kg, ShaderData *sd, floa
switch(type) {
case NODE_TEXCO_OBJECT: {
if(sd->object != ~0) {
- Transform tfm = object_fetch_transform(kg, sd->object, OBJECT_INVERSE_TRANSFORM);
- data = transform_point(&tfm, sd->P + sd->dP.dy);
+ data = sd->P + sd->dP.dy;
+ object_inverse_position_transform(kg, sd, &data);
}
else
data = sd->P + sd->dP.dy;
break;
}
+ case NODE_TEXCO_NORMAL: {
+ if(sd->object != ~0) {
+ data = sd->N;
+ object_inverse_normal_transform(kg, sd, &data);
+ }
+ else
+ data = sd->N;
+ break;
+ }
case NODE_TEXCO_CAMERA: {
Transform tfm = kernel_data.cam.worldtocamera;
@@ -143,12 +183,7 @@ __device void svm_node_tex_coord_bump_dy(KernelGlobals *kg, ShaderData *sd, floa
break;
}
case NODE_TEXCO_WINDOW: {
- Transform tfm = kernel_data.cam.worldtondc;
-
- if(sd->object != ~0)
- data = transform_perspective(&tfm, sd->P + sd->dP.dy);
- else
- data = transform_perspective(&tfm, sd->P + sd->dP.dy + svm_background_offset(kg));
+ data = svm_world_to_ndc(kg, sd, sd->P + sd->dP.dy);
break;
}
case NODE_TEXCO_REFLECTION: {
diff --git a/intern/cycles/kernel/svm/svm_types.h b/intern/cycles/kernel/svm/svm_types.h
index 68eb39bdd29..867709f29e0 100644
--- a/intern/cycles/kernel/svm/svm_types.h
+++ b/intern/cycles/kernel/svm/svm_types.h
@@ -90,7 +90,9 @@ typedef enum NodeType {
NODE_TEX_CHECKER = 5700,
NODE_BRIGHTCONTRAST = 5800,
NODE_RGB_RAMP = 5900,
- NODE_RGB_CURVES = 6000
+ NODE_RGB_CURVES = 6000,
+ NODE_MIN_MAX = 6100,
+ NODE_LIGHT_FALLOFF = 6200
} NodeType;
typedef enum NodeAttributeType {
@@ -115,10 +117,18 @@ typedef enum NodeLightPath {
NODE_LP_singular,
NODE_LP_reflection,
NODE_LP_transmission,
- NODE_LP_backfacing
+ NODE_LP_backfacing,
+ NODE_LP_ray_length
} NodeLightPath;
+typedef enum NodeLightFalloff {
+ NODE_LIGHT_FALLOFF_QUADRATIC,
+ NODE_LIGHT_FALLOFF_LINEAR,
+ NODE_LIGHT_FALLOFF_CONSTANT
+} NodeLightFalloff;
+
typedef enum NodeTexCoord {
+ NODE_TEXCO_NORMAL,
NODE_TEXCO_OBJECT,
NODE_TEXCO_CAMERA,
NODE_TEXCO_WINDOW,
diff --git a/intern/cycles/render/CMakeLists.txt b/intern/cycles/render/CMakeLists.txt
index db92cf4ef54..4d4fbfe6814 100644
--- a/intern/cycles/render/CMakeLists.txt
+++ b/intern/cycles/render/CMakeLists.txt
@@ -16,7 +16,7 @@ set(SRC
buffers.cpp
camera.cpp
film.cpp
- # film_response.cpp # XXX, why isn't this in?
+ # film_response.cpp (code unused)
filter.cpp
graph.cpp
image.cpp
@@ -41,7 +41,7 @@ set(SRC_HEADERS
buffers.h
camera.h
film.h
- # film_response.h # XXX, why isn't this in?
+ # film_response.h (code unused)
filter.h
graph.h
image.h
diff --git a/intern/cycles/render/attribute.cpp b/intern/cycles/render/attribute.cpp
index 9e90bf1b625..c1a089cc872 100644
--- a/intern/cycles/render/attribute.cpp
+++ b/intern/cycles/render/attribute.cpp
@@ -31,7 +31,7 @@ void Attribute::set(ustring name_, TypeDesc type_, Element element_)
name = name_;
type = type_;
element = element_;
- std = STD_NONE;
+ std = ATTR_STD_NONE;
/* string and matrix not supported! */
assert(type == TypeDesc::TypeFloat || type == TypeDesc::TypeColor ||
@@ -81,20 +81,24 @@ bool Attribute::same_storage(TypeDesc a, TypeDesc b)
return false;
}
-ustring Attribute::standard_name(Attribute::Standard std)
+ustring Attribute::standard_name(AttributeStandard std)
{
- if(std == Attribute::STD_VERTEX_NORMAL)
+ if(std == ATTR_STD_VERTEX_NORMAL)
return ustring("N");
- else if(std == Attribute::STD_FACE_NORMAL)
+ else if(std == ATTR_STD_FACE_NORMAL)
return ustring("Ng");
- else if(std == Attribute::STD_UV)
+ else if(std == ATTR_STD_UV)
return ustring("uv");
- else if(std == Attribute::STD_GENERATED)
+ else if(std == ATTR_STD_GENERATED)
return ustring("generated");
- else if(std == Attribute::STD_POSITION_UNDEFORMED)
+ else if(std == ATTR_STD_POSITION_UNDEFORMED)
return ustring("undeformed");
- else if(std == Attribute::STD_POSITION_UNDISPLACED)
+ else if(std == ATTR_STD_POSITION_UNDISPLACED)
return ustring("undisplaced");
+ else if(std == ATTR_STD_MOTION_PRE)
+ return ustring("motion_pre");
+ else if(std == ATTR_STD_MOTION_POST)
+ return ustring("motion_post");
return ustring();
}
@@ -164,24 +168,28 @@ void AttributeSet::remove(ustring name)
}
}
-Attribute *AttributeSet::add(Attribute::Standard std, ustring name)
+Attribute *AttributeSet::add(AttributeStandard std, ustring name)
{
Attribute *attr = NULL;
if(name == ustring())
name = Attribute::standard_name(std);
- if(std == Attribute::STD_VERTEX_NORMAL)
+ if(std == ATTR_STD_VERTEX_NORMAL)
attr = add(name, TypeDesc::TypeNormal, Attribute::VERTEX);
- else if(std == Attribute::STD_FACE_NORMAL)
+ else if(std == ATTR_STD_FACE_NORMAL)
attr = add(name, TypeDesc::TypeNormal, Attribute::FACE);
- else if(std == Attribute::STD_UV)
+ else if(std == ATTR_STD_UV)
attr = add(name, TypeDesc::TypePoint, Attribute::CORNER);
- else if(std == Attribute::STD_GENERATED)
+ else if(std == ATTR_STD_GENERATED)
attr = add(name, TypeDesc::TypePoint, Attribute::VERTEX);
- else if(std == Attribute::STD_POSITION_UNDEFORMED)
+ else if(std == ATTR_STD_POSITION_UNDEFORMED)
attr = add(name, TypeDesc::TypePoint, Attribute::VERTEX);
- else if(std == Attribute::STD_POSITION_UNDISPLACED)
+ else if(std == ATTR_STD_POSITION_UNDISPLACED)
+ attr = add(name, TypeDesc::TypePoint, Attribute::VERTEX);
+ else if(std == ATTR_STD_MOTION_PRE)
+ attr = add(name, TypeDesc::TypePoint, Attribute::VERTEX);
+ else if(std == ATTR_STD_MOTION_POST)
attr = add(name, TypeDesc::TypePoint, Attribute::VERTEX);
else
assert(0);
@@ -191,7 +199,7 @@ Attribute *AttributeSet::add(Attribute::Standard std, ustring name)
return attr;
}
-Attribute *AttributeSet::find(Attribute::Standard std)
+Attribute *AttributeSet::find(AttributeStandard std)
{
foreach(Attribute& attr, attributes)
if(attr.std == std)
@@ -200,7 +208,7 @@ Attribute *AttributeSet::find(Attribute::Standard std)
return NULL;
}
-void AttributeSet::remove(Attribute::Standard std)
+void AttributeSet::remove(AttributeStandard std)
{
Attribute *attr = find(std);
@@ -218,7 +226,7 @@ void AttributeSet::remove(Attribute::Standard std)
Attribute *AttributeSet::find(AttributeRequest& req)
{
- if(req.std == Attribute::STD_NONE)
+ if(req.std == ATTR_STD_NONE)
return find(req.name);
else
return find(req.std);
@@ -240,14 +248,14 @@ void AttributeSet::clear()
AttributeRequest::AttributeRequest(ustring name_)
{
name = name_;
- std = Attribute::STD_NONE;
+ std = ATTR_STD_NONE;
type = TypeDesc::TypeFloat;
element = ATTR_ELEMENT_NONE;
offset = 0;
}
-AttributeRequest::AttributeRequest(Attribute::Standard std_)
+AttributeRequest::AttributeRequest(AttributeStandard std_)
{
name = ustring();
std = std_;
@@ -296,7 +304,7 @@ void AttributeRequestSet::add(ustring name)
requests.push_back(AttributeRequest(name));
}
-void AttributeRequestSet::add(Attribute::Standard std)
+void AttributeRequestSet::add(AttributeStandard std)
{
foreach(AttributeRequest& req, requests)
if(req.std == std)
@@ -308,7 +316,7 @@ void AttributeRequestSet::add(Attribute::Standard std)
void AttributeRequestSet::add(AttributeRequestSet& reqs)
{
foreach(AttributeRequest& req, reqs.requests) {
- if(req.std == Attribute::STD_NONE)
+ if(req.std == ATTR_STD_NONE)
add(req.name);
else
add(req.std);
@@ -324,7 +332,7 @@ bool AttributeRequestSet::find(ustring name)
return false;
}
-bool AttributeRequestSet::find(Attribute::Standard std)
+bool AttributeRequestSet::find(AttributeStandard std)
{
foreach(AttributeRequest& req, requests)
if(req.std == std)
diff --git a/intern/cycles/render/attribute.h b/intern/cycles/render/attribute.h
index 7af4657daa3..707d558fc79 100644
--- a/intern/cycles/render/attribute.h
+++ b/intern/cycles/render/attribute.h
@@ -47,19 +47,8 @@ public:
CORNER
};
- enum Standard {
- STD_NONE = 0,
- STD_VERTEX_NORMAL,
- STD_FACE_NORMAL,
- STD_UV,
- STD_GENERATED,
- STD_POSITION_UNDEFORMED,
- STD_POSITION_UNDISPLACED,
- STD_NUM
- };
-
ustring name;
- Standard std;
+ AttributeStandard std;
TypeDesc type;
vector<char> buffer;
@@ -82,7 +71,7 @@ public:
const float *data_float() const { return (float*)data(); }
static bool same_storage(TypeDesc a, TypeDesc b);
- static ustring standard_name(Attribute::Standard std);
+ static ustring standard_name(AttributeStandard std);
};
/* Attribute Set
@@ -101,9 +90,9 @@ public:
Attribute *find(ustring name);
void remove(ustring name);
- Attribute *add(Attribute::Standard std, ustring name = ustring());
- Attribute *find(Attribute::Standard std);
- void remove(Attribute::Standard std);
+ Attribute *add(AttributeStandard std, ustring name = ustring());
+ Attribute *find(AttributeStandard std);
+ void remove(AttributeStandard std);
Attribute *find(AttributeRequest& req);
@@ -120,7 +109,7 @@ public:
class AttributeRequest {
public:
ustring name;
- Attribute::Standard std;
+ AttributeStandard std;
/* temporary variables used by MeshManager */
TypeDesc type;
@@ -128,7 +117,7 @@ public:
int offset;
AttributeRequest(ustring name_);
- AttributeRequest(Attribute::Standard std);
+ AttributeRequest(AttributeStandard std);
};
/* AttributeRequestSet
@@ -143,11 +132,11 @@ public:
~AttributeRequestSet();
void add(ustring name);
- void add(Attribute::Standard std);
+ void add(AttributeStandard std);
void add(AttributeRequestSet& reqs);
bool find(ustring name);
- bool find(Attribute::Standard std);
+ bool find(AttributeStandard std);
size_t size();
void clear();
diff --git a/intern/cycles/render/buffers.cpp b/intern/cycles/render/buffers.cpp
index bda20a8ab9d..a80851b945a 100644
--- a/intern/cycles/render/buffers.cpp
+++ b/intern/cycles/render/buffers.cpp
@@ -221,6 +221,28 @@ bool RenderBuffers::get_pass(PassType type, float exposure, int sample, int comp
pixels[3] = 1.0f;
}
}
+ else if(type == PASS_MOTION) {
+ /* need to normalize by number of samples accumulated for motion */
+ pass_offset = 0;
+ foreach(Pass& color_pass, params.passes) {
+ if(color_pass.type == PASS_MOTION_WEIGHT)
+ break;
+ pass_offset += color_pass.components;
+ }
+
+ float *in_weight = (float*)buffer.data_pointer + pass_offset;
+
+ for(int i = 0; i < size; i++, in += pass_stride, in_weight += pass_stride, pixels += 4) {
+ float4 f = make_float4(in[0], in[1], in[2], in[3]);
+ float w = in_weight[0];
+ float invw = (w > 0.0f)? 1.0f/w: 0.0f;
+
+ pixels[0] = f.x*invw;
+ pixels[1] = f.y*invw;
+ pixels[2] = f.z*invw;
+ pixels[3] = f.w*invw;
+ }
+ }
else {
for(int i = 0; i < size; i++, in += pass_stride, pixels += 4) {
float4 f = make_float4(in[0], in[1], in[2], in[3]);
diff --git a/intern/cycles/render/camera.cpp b/intern/cycles/render/camera.cpp
index f9290dfc835..3ecffab7cbc 100644
--- a/intern/cycles/render/camera.cpp
+++ b/intern/cycles/render/camera.cpp
@@ -25,8 +25,7 @@ CCL_NAMESPACE_BEGIN
Camera::Camera()
{
- shutteropen = 0.0f;
- shutterclose = 1.0f;
+ shuttertime = 1.0f;
aperturesize = 0.0f;
focaldistance = 10.0f;
@@ -35,9 +34,19 @@ Camera::Camera()
matrix = transform_identity();
+ motion.pre = transform_identity();
+ motion.post = transform_identity();
+ use_motion = false;
+
type = CAMERA_PERSPECTIVE;
+ panorama_type = PANORAMA_EQUIRECTANGULAR;
+ fisheye_fov = M_PI_F;
+ fisheye_lens = 10.5f;
fov = M_PI_F/4.0f;
+ sensorwidth = 0.036;
+ sensorheight = 0.024;
+
nearclip = 1e-5f;
farclip = 1e5f;
@@ -124,7 +133,7 @@ void Camera::update()
need_device_update = true;
}
-void Camera::device_update(Device *device, DeviceScene *dscene)
+void Camera::device_update(Device *device, DeviceScene *dscene, Scene *scene)
{
update();
@@ -140,10 +149,44 @@ void Camera::device_update(Device *device, DeviceScene *dscene)
kcam->rastertocamera = rastertocamera;
kcam->cameratoworld = cameratoworld;
kcam->worldtoscreen = transform_inverse(screentoworld);
- kcam->worldtoraster = transform_inverse(rastertoworld);
+ kcam->worldtoraster = worldtoraster;
kcam->worldtondc = transform_inverse(ndctoworld);
kcam->worldtocamera = transform_inverse(cameratoworld);
+ /* camera motion */
+ Scene::MotionType need_motion = scene->need_motion();
+ kcam->have_motion = 0;
+
+ if(need_motion == Scene::MOTION_PASS) {
+ if(type == CAMERA_PANORAMA) {
+ if(use_motion) {
+ kcam->motion.pre = transform_inverse(motion.pre);
+ kcam->motion.post = transform_inverse(motion.post);
+ }
+ else {
+ kcam->motion.pre = kcam->worldtocamera;
+ kcam->motion.post = kcam->worldtocamera;
+ }
+ }
+ else {
+ if(use_motion) {
+ kcam->motion.pre = transform_inverse(motion.pre * rastertocamera);
+ kcam->motion.post = transform_inverse(motion.post * rastertocamera);
+ }
+ else {
+ kcam->motion.pre = worldtoraster;
+ kcam->motion.post = worldtoraster;
+ }
+ }
+ }
+ else if(need_motion == Scene::MOTION_BLUR) {
+ /* todo: exact camera position will not be hit this way */
+ if(use_motion) {
+ transform_motion_decompose(&kcam->motion, &motion);
+ kcam->have_motion = 1;
+ }
+ }
+
/* depth of field */
kcam->aperturesize = aperturesize;
kcam->focaldistance = focaldistance;
@@ -151,12 +194,24 @@ void Camera::device_update(Device *device, DeviceScene *dscene)
kcam->bladesrotation = bladesrotation;
/* motion blur */
- kcam->shutteropen = shutteropen;
- kcam->shutterclose = shutterclose;
+ kcam->shuttertime= (need_motion == Scene::MOTION_BLUR)? shuttertime: 0.0f;
/* type */
kcam->type = type;
+ /* panorama */
+ kcam->panorama_type = panorama_type;
+ kcam->fisheye_fov = fisheye_fov;
+ kcam->fisheye_lens = fisheye_lens;
+
+ /* sensor size */
+ kcam->sensorwidth = sensorwidth;
+ kcam->sensorheight = sensorheight;
+
+ /* render size */
+ kcam->width = width;
+ kcam->height = height;
+
/* store differentials */
kcam->dx = float3_to_float4(dx);
kcam->dy = float3_to_float4(dy);
@@ -175,8 +230,7 @@ void Camera::device_free(Device *device, DeviceScene *dscene)
bool Camera::modified(const Camera& cam)
{
- return !((shutteropen == cam.shutteropen) &&
- (shutterclose == cam.shutterclose) &&
+ return !((shuttertime== cam.shuttertime) &&
(aperturesize == cam.aperturesize) &&
(blades == cam.blades) &&
(bladesrotation == cam.bladesrotation) &&
@@ -185,6 +239,8 @@ bool Camera::modified(const Camera& cam)
(fov == cam.fov) &&
(nearclip == cam.nearclip) &&
(farclip == cam.farclip) &&
+ (sensorwidth == cam.sensorwidth) &&
+ (sensorheight == cam.sensorheight) &&
// modified for progressive render
// (width == cam.width) &&
// (height == cam.height) &&
@@ -192,7 +248,12 @@ bool Camera::modified(const Camera& cam)
(right == cam.right) &&
(bottom == cam.bottom) &&
(top == cam.top) &&
- (matrix == cam.matrix));
+ (matrix == cam.matrix) &&
+ (motion == cam.motion) &&
+ (use_motion == cam.use_motion) &&
+ (panorama_type == cam.panorama_type) &&
+ (fisheye_fov == cam.fisheye_fov) &&
+ (fisheye_lens == cam.fisheye_lens));
}
void Camera::tag_update()
diff --git a/intern/cycles/render/camera.h b/intern/cycles/render/camera.h
index cfcc5406ee3..7a09b5981e4 100644
--- a/intern/cycles/render/camera.h
+++ b/intern/cycles/render/camera.h
@@ -28,6 +28,7 @@ CCL_NAMESPACE_BEGIN
class Device;
class DeviceScene;
+class Scene;
/* Camera
*
@@ -37,8 +38,7 @@ class DeviceScene;
class Camera {
public:
/* motion blur */
- float shutteropen;
- float shutterclose;
+ float shuttertime;
/* depth of field */
float focaldistance;
@@ -50,6 +50,15 @@ public:
CameraType type;
float fov;
+ /* panorama */
+ PanoramaType panorama_type;
+ float fisheye_fov;
+ float fisheye_lens;
+
+ /* sensor */
+ float sensorwidth;
+ float sensorheight;
+
/* clipping */
float nearclip;
float farclip;
@@ -61,6 +70,10 @@ public:
/* transformation */
Transform matrix;
+ /* motion */
+ MotionTransform motion;
+ bool use_motion;
+
/* computed camera parameters */
Transform screentoworld;
Transform rastertoworld;
@@ -82,7 +95,7 @@ public:
void update();
- void device_update(Device *device, DeviceScene *dscene);
+ void device_update(Device *device, DeviceScene *dscene, Scene *scene);
void device_free(Device *device, DeviceScene *dscene);
bool modified(const Camera& cam);
diff --git a/intern/cycles/render/film.cpp b/intern/cycles/render/film.cpp
index cc17f86fcb6..55c89b7b1b2 100644
--- a/intern/cycles/render/film.cpp
+++ b/intern/cycles/render/film.cpp
@@ -67,6 +67,13 @@ void Pass::add(PassType type, vector<Pass>& passes)
case PASS_UV:
pass.components = 4;
break;
+ case PASS_MOTION:
+ pass.components = 4;
+ pass.divide_type = PASS_MOTION_WEIGHT;
+ break;
+ case PASS_MOTION_WEIGHT:
+ pass.components = 1;
+ break;
case PASS_OBJECT_ID:
pass.components = 1;
pass.filter = false;
@@ -154,6 +161,15 @@ bool Pass::equals(const vector<Pass>& A, const vector<Pass>& B)
return true;
}
+bool Pass::contains(const vector<Pass>& passes, PassType type)
+{
+ foreach(const Pass& pass, passes)
+ if(pass.type == type)
+ return true;
+
+ return false;
+}
+
/* Film */
Film::Film()
@@ -196,6 +212,12 @@ void Film::device_update(Device *device, DeviceScene *dscene)
case PASS_UV:
kfilm->pass_uv = kfilm->pass_stride;
break;
+ case PASS_MOTION:
+ kfilm->pass_motion = kfilm->pass_stride;
+ break;
+ case PASS_MOTION_WEIGHT:
+ kfilm->pass_motion_weight = kfilm->pass_stride;
+ break;
case PASS_OBJECT_ID:
kfilm->pass_object_id = kfilm->pass_stride;
break;
diff --git a/intern/cycles/render/film.h b/intern/cycles/render/film.h
index 8a3dbbf1b08..c7d2ee24388 100644
--- a/intern/cycles/render/film.h
+++ b/intern/cycles/render/film.h
@@ -40,6 +40,7 @@ public:
static void add(PassType type, vector<Pass>& passes);
static bool equals(const vector<Pass>& A, const vector<Pass>& B);
+ static bool contains(const vector<Pass>& passes, PassType);
};
class Film {
diff --git a/intern/cycles/render/graph.cpp b/intern/cycles/render/graph.cpp
index cc29047f048..d9486de47c9 100644
--- a/intern/cycles/render/graph.cpp
+++ b/intern/cycles/render/graph.cpp
@@ -120,9 +120,9 @@ void ShaderNode::attributes(AttributeRequestSet *attributes)
foreach(ShaderInput *input, inputs) {
if(!input->link) {
if(input->default_value == ShaderInput::TEXTURE_GENERATED)
- attributes->add(Attribute::STD_GENERATED);
+ attributes->add(ATTR_STD_GENERATED);
else if(input->default_value == ShaderInput::TEXTURE_UV)
- attributes->add(Attribute::STD_UV);
+ attributes->add(ATTR_STD_UV);
}
}
}
diff --git a/intern/cycles/render/image.cpp b/intern/cycles/render/image.cpp
index 78b8f06c7b4..856363491ca 100644
--- a/intern/cycles/render/image.cpp
+++ b/intern/cycles/render/image.cpp
@@ -324,8 +324,10 @@ bool ImageManager::file_load_float_image(Image *img, device_vector<float4>& tex_
return true;
}
-void ImageManager::device_load_image(Device *device, DeviceScene *dscene, int slot)
+void ImageManager::device_load_image(Device *device, DeviceScene *dscene, int slot, Progress *progress)
{
+ if(progress->get_cancel())
+ return;
if(osl_texture_system)
return;
@@ -342,6 +344,9 @@ void ImageManager::device_load_image(Device *device, DeviceScene *dscene, int sl
}
if(is_float) {
+ string filename = path_filename(float_images[slot - TEX_IMAGE_FLOAT_START]->filename);
+ progress->set_status("Updating Images", "Loading " + filename);
+
device_vector<float4>& tex_img = dscene->tex_float_image[slot - TEX_IMAGE_FLOAT_START];
if(tex_img.device_pointer)
@@ -365,6 +370,9 @@ void ImageManager::device_load_image(Device *device, DeviceScene *dscene, int sl
device->tex_alloc(name.c_str(), tex_img, true, true);
}
else {
+ string filename = path_filename(images[slot]->filename);
+ progress->set_status("Updating Images", "Loading " + filename);
+
device_vector<uchar4>& tex_img = dscene->tex_image[slot];
if(tex_img.device_pointer)
@@ -387,6 +395,8 @@ void ImageManager::device_load_image(Device *device, DeviceScene *dscene, int sl
device->tex_alloc(name.c_str(), tex_img, true, true);
}
+
+ img->need_load = false;
}
void ImageManager::device_free_image(Device *device, DeviceScene *dscene, int slot)
@@ -431,39 +441,37 @@ void ImageManager::device_update(Device *device, DeviceScene *dscene, Progress&
{
if(!need_update)
return;
+
+ TaskPool pool;
for(size_t slot = 0; slot < images.size(); slot++) {
- if(images[slot]) {
- if(images[slot]->users == 0) {
- device_free_image(device, dscene, slot);
- }
- else if(images[slot]->need_load) {
- string name = path_filename(images[slot]->filename);
- progress.set_status("Updating Images", "Loading " + name);
- device_load_image(device, dscene, slot);
- images[slot]->need_load = false;
- }
+ if(!images[slot])
+ continue;
- if(progress.get_cancel()) return;
+ if(images[slot]->users == 0) {
+ device_free_image(device, dscene, slot);
+ }
+ else if(images[slot]->need_load) {
+ if(!osl_texture_system)
+ pool.push(function_bind(&ImageManager::device_load_image, this, device, dscene, slot, &progress));
}
}
for(size_t slot = 0; slot < float_images.size(); slot++) {
- if(float_images[slot]) {
- if(float_images[slot]->users == 0) {
- device_free_image(device, dscene, slot + TEX_IMAGE_FLOAT_START);
- }
- else if(float_images[slot]->need_load) {
- string name = path_filename(float_images[slot]->filename);
- progress.set_status("Updating Images", "Loading " + name);
- device_load_image(device, dscene, slot + TEX_IMAGE_FLOAT_START);
- float_images[slot]->need_load = false;
- }
+ if(!float_images[slot])
+ continue;
- if(progress.get_cancel()) return;
+ if(float_images[slot]->users == 0) {
+ device_free_image(device, dscene, slot + TEX_IMAGE_FLOAT_START);
+ }
+ else if(float_images[slot]->need_load) {
+ if(!osl_texture_system)
+ pool.push(function_bind(&ImageManager::device_load_image, this, device, dscene, slot + TEX_IMAGE_FLOAT_START, &progress));
}
}
+ pool.wait_work();
+
need_update = false;
}
diff --git a/intern/cycles/render/image.h b/intern/cycles/render/image.h
index d789e6885e3..cc01b4a8e4c 100644
--- a/intern/cycles/render/image.h
+++ b/intern/cycles/render/image.h
@@ -65,7 +65,7 @@ private:
bool file_load_image(Image *img, device_vector<uchar4>& tex_img);
bool file_load_float_image(Image *img, device_vector<float4>& tex_img);
- void device_load_image(Device *device, DeviceScene *dscene, int slot);
+ void device_load_image(Device *device, DeviceScene *dscene, int slot, Progress *progess);
void device_free_image(Device *device, DeviceScene *dscene, int slot);
};
diff --git a/intern/cycles/render/integrator.cpp b/intern/cycles/render/integrator.cpp
index 6e6d30f3879..b26ebfd91e1 100644
--- a/intern/cycles/render/integrator.cpp
+++ b/intern/cycles/render/integrator.cpp
@@ -41,9 +41,11 @@ Integrator::Integrator()
transparent_shadows = false;
no_caustics = false;
+ filter_glossy = 0.0f;
seed = 0;
layer_flag = ~0;
sample_clamp = 0.0f;
+ motion_blur = false;
need_update = true;
}
@@ -81,6 +83,8 @@ void Integrator::device_update(Device *device, DeviceScene *dscene)
kintegrator->transparent_shadows = transparent_shadows;
kintegrator->no_caustics = no_caustics;
+ kintegrator->filter_glossy = (filter_glossy == 0.0f)? FLT_MAX: 1.0f/filter_glossy;
+
kintegrator->seed = hash_int(seed);
kintegrator->layer_flag = layer_flag << PATH_RAY_LAYER_SHIFT;
@@ -119,9 +123,11 @@ bool Integrator::modified(const Integrator& integrator)
transparent_probalistic == integrator.transparent_probalistic &&
transparent_shadows == integrator.transparent_shadows &&
no_caustics == integrator.no_caustics &&
+ filter_glossy == integrator.filter_glossy &&
layer_flag == integrator.layer_flag &&
seed == integrator.seed &&
- sample_clamp == integrator.sample_clamp);
+ sample_clamp == integrator.sample_clamp &&
+ motion_blur == integrator.motion_blur);
}
void Integrator::tag_update(Scene *scene)
diff --git a/intern/cycles/render/integrator.h b/intern/cycles/render/integrator.h
index abbbaca894c..afda41a857d 100644
--- a/intern/cycles/render/integrator.h
+++ b/intern/cycles/render/integrator.h
@@ -41,11 +41,13 @@ public:
bool transparent_shadows;
bool no_caustics;
+ float filter_glossy;
int seed;
int layer_flag;
float sample_clamp;
+ bool motion_blur;
bool need_update;
diff --git a/intern/cycles/render/light.cpp b/intern/cycles/render/light.cpp
index 316e5cec9aa..267cb8e6d3a 100644
--- a/intern/cycles/render/light.cpp
+++ b/intern/cycles/render/light.cpp
@@ -26,8 +26,6 @@
#include "util_foreach.h"
#include "util_progress.h"
-#include "kernel_montecarlo.h"
-
CCL_NAMESPACE_BEGIN
static void dump_background_pixels(Device *device, DeviceScene *dscene, int res, vector<float3>& pixels)
diff --git a/intern/cycles/render/mesh.cpp b/intern/cycles/render/mesh.cpp
index a7eb365f983..0422f97a706 100644
--- a/intern/cycles/render/mesh.cpp
+++ b/intern/cycles/render/mesh.cpp
@@ -43,6 +43,7 @@ Mesh::Mesh()
transform_applied = false;
transform_negative_scaled = false;
displacement_method = DISPLACE_BUMP;
+ bounds = BoundBox::empty;
bvh = NULL;
@@ -96,7 +97,7 @@ void Mesh::add_triangle(int v0, int v1, int v2, int shader_, bool smooth_)
void Mesh::compute_bounds()
{
- BoundBox bnds;
+ BoundBox bnds = BoundBox::empty;
size_t verts_size = verts.size();
for(size_t i = 0; i < verts_size; i++)
@@ -112,11 +113,11 @@ void Mesh::compute_bounds()
void Mesh::add_face_normals()
{
/* don't compute if already there */
- if(attributes.find(Attribute::STD_FACE_NORMAL))
+ if(attributes.find(ATTR_STD_FACE_NORMAL))
return;
/* get attributes */
- Attribute *attr_fN = attributes.add(Attribute::STD_FACE_NORMAL);
+ Attribute *attr_fN = attributes.add(ATTR_STD_FACE_NORMAL);
float3 *fN = attr_fN->data_float3();
/* compute face normals */
@@ -144,12 +145,12 @@ void Mesh::add_face_normals()
void Mesh::add_vertex_normals()
{
/* don't compute if already there */
- if(attributes.find(Attribute::STD_VERTEX_NORMAL))
+ if(attributes.find(ATTR_STD_VERTEX_NORMAL))
return;
/* get attributes */
- Attribute *attr_fN = attributes.find(Attribute::STD_FACE_NORMAL);
- Attribute *attr_vN = attributes.add(Attribute::STD_VERTEX_NORMAL);
+ Attribute *attr_fN = attributes.find(ATTR_STD_FACE_NORMAL);
+ Attribute *attr_vN = attributes.add(ATTR_STD_VERTEX_NORMAL);
float3 *fN = attr_fN->data_float3();
float3 *vN = attr_vN->data_float3();
@@ -178,8 +179,8 @@ void Mesh::add_vertex_normals()
void Mesh::pack_normals(Scene *scene, float4 *normal, float4 *vnormal)
{
- Attribute *attr_fN = attributes.find(Attribute::STD_FACE_NORMAL);
- Attribute *attr_vN = attributes.find(Attribute::STD_VERTEX_NORMAL);
+ Attribute *attr_fN = attributes.find(ATTR_STD_FACE_NORMAL);
+ Attribute *attr_vN = attributes.find(ATTR_STD_VERTEX_NORMAL);
float3 *fN = attr_fN->data_float3();
float3 *vN = attr_vN->data_float3();
@@ -241,31 +242,47 @@ void Mesh::pack_verts(float4 *tri_verts, float4 *tri_vindex, size_t vert_offset)
}
}
-void Mesh::compute_bvh(SceneParams *params, Progress& progress)
+void Mesh::compute_bvh(SceneParams *params, Progress *progress, int n, int total)
{
- Object object;
- object.mesh = this;
+ if(progress->get_cancel())
+ return;
- vector<Object*> objects;
- objects.push_back(&object);
+ compute_bounds();
- if(bvh && !need_update_rebuild) {
- progress.set_substatus("Refitting BVH");
- bvh->objects = objects;
- bvh->refit(progress);
- }
- else {
- progress.set_substatus("Building BVH");
+ if(!transform_applied) {
+ string msg = "Updating Mesh BVH ";
+ if(name == "")
+ msg += string_printf("%u/%u", (uint)(n+1), (uint)total);
+ else
+ msg += string_printf("%s %u/%u", name.c_str(), (uint)(n+1), (uint)total);
- BVHParams bparams;
- bparams.use_cache = params->use_bvh_cache;
- bparams.use_spatial_split = params->use_bvh_spatial_split;
- bparams.use_qbvh = params->use_qbvh;
+ Object object;
+ object.mesh = this;
- delete bvh;
- bvh = BVH::create(bparams, objects);
- bvh->build(progress);
+ vector<Object*> objects;
+ objects.push_back(&object);
+
+ if(bvh && !need_update_rebuild) {
+ progress->set_status(msg, "Refitting BVH");
+ bvh->objects = objects;
+ bvh->refit(*progress);
+ }
+ else {
+ progress->set_status(msg, "Building BVH");
+
+ BVHParams bparams;
+ bparams.use_cache = params->use_bvh_cache;
+ bparams.use_spatial_split = params->use_bvh_spatial_split;
+ bparams.use_qbvh = params->use_qbvh;
+
+ delete bvh;
+ bvh = BVH::create(bparams, objects);
+ bvh->build(*progress);
+ }
}
+
+ need_update = false;
+ need_update_rebuild = false;
}
void Mesh::tag_update(Scene *scene, bool rebuild)
@@ -347,7 +364,7 @@ void MeshManager::update_osl_attributes(Device *device, Scene *scene, vector<Att
else
osl_attr.type = TypeDesc::TypeColor;
- if(req.std != Attribute::STD_NONE) {
+ if(req.std != ATTR_STD_NONE) {
/* if standard attribute, add lookup by std:: name convention */
ustring stdname = ustring(string("std::") + Attribute::standard_name(req.std).c_str());
og->attribute_map[i][stdname] = osl_attr;
@@ -370,7 +387,7 @@ void MeshManager::update_svm_attributes(Device *device, DeviceScene *dscene, Sce
int attr_map_stride = 0;
for(size_t i = 0; i < scene->meshes.size(); i++)
- attr_map_stride = max(attr_map_stride, mesh_attributes[i].size());
+ attr_map_stride = max(attr_map_stride, mesh_attributes[i].size()+1);
if(attr_map_stride == 0)
return;
@@ -392,13 +409,12 @@ void MeshManager::update_svm_attributes(Device *device, DeviceScene *dscene, Sce
AttributeRequestSet& attributes = mesh_attributes[j];
/* set object attributes */
- j = 0;
+ int index = i*attr_map_stride;
foreach(AttributeRequest& req, attributes.requests) {
- int index = i*attr_map_stride + j;
uint id;
- if(req.std == Attribute::STD_NONE)
+ if(req.std == ATTR_STD_NONE)
id = scene->shader_manager->get_attribute_id(req.name);
else
id = scene->shader_manager->get_attribute_id(req.std);
@@ -412,8 +428,14 @@ void MeshManager::update_svm_attributes(Device *device, DeviceScene *dscene, Sce
else
attr_map[index].w = NODE_ATTR_FLOAT3;
- j++;
+ index++;
}
+
+ /* terminator */
+ attr_map[index].x = ATTR_STD_NONE;
+ attr_map[index].y = 0;
+ attr_map[index].z = 0;
+ attr_map[index].w = 0;
}
/* copy to device */
@@ -433,6 +455,8 @@ void MeshManager::device_update_attributes(Device *device, DeviceScene *dscene,
for(size_t i = 0; i < scene->meshes.size(); i++) {
Mesh *mesh = scene->meshes[i];
+ scene->need_global_attributes(mesh_attributes[i]);
+
foreach(uint sindex, mesh->used_shaders) {
Shader *shader = scene->shaders[sindex];
mesh_attributes[i].add(shader->attributes);
@@ -455,8 +479,8 @@ void MeshManager::device_update_attributes(Device *device, DeviceScene *dscene,
Attribute *mattr = mesh->attributes.find(req);
/* todo: get rid of this exception */
- if(!mattr && req.std == Attribute::STD_GENERATED) {
- mattr = mesh->attributes.add(Attribute::STD_GENERATED);
+ if(!mattr && req.std == ATTR_STD_GENERATED) {
+ mattr = mesh->attributes.add(ATTR_STD_GENERATED);
if(mesh->verts.size())
memcpy(mattr->data_float3(), &mesh->verts[0], sizeof(float3)*mesh->verts.size());
}
@@ -488,19 +512,19 @@ void MeshManager::device_update_attributes(Device *device, DeviceScene *dscene,
float *data = mattr->data_float();
req.offset = attr_float.size();
+ attr_float.resize(attr_float.size() + size);
+
for(size_t k = 0; k < size; k++)
- attr_float.push_back(data[k]);
+ attr_float[req.offset+k] = data[k];
}
else {
float3 *data = mattr->data_float3();
req.offset = attr_float3.size();
- for(size_t k = 0; k < size; k++) {
- float3 f3 = data[k];
- float4 f4 = make_float4(f3.x, f3.y, f3.z, 0.0f);
+ attr_float3.resize(attr_float3.size() + size);
- attr_float3.push_back(f4);
- }
+ for(size_t k = 0; k < size; k++)
+ attr_float3[req.offset+k] = float3_to_float4(data[k]);
}
/* mesh vertex/triangle index is global, not per object, so we sneak
@@ -678,41 +702,30 @@ void MeshManager::device_update(Device *device, DeviceScene *dscene, Scene *scen
}
/* update bvh */
- size_t i = 0, num_instance_bvh = 0;
+ size_t i = 0, num_bvh = 0;
foreach(Mesh *mesh, scene->meshes)
if(mesh->need_update && !mesh->transform_applied)
- num_instance_bvh++;
+ num_bvh++;
+
+ TaskPool pool;
foreach(Mesh *mesh, scene->meshes) {
if(mesh->need_update) {
- mesh->compute_bounds();
-
- if(!mesh->transform_applied) {
- string msg = "Updating Mesh BVH ";
- if(mesh->name == "")
- msg += string_printf("%u/%u", (uint)(i+1), (uint)num_instance_bvh);
- else
- msg += string_printf("%s %u/%u", mesh->name.c_str(), (uint)(i+1), (uint)num_instance_bvh);
- progress.set_status(msg, "Building BVH");
-
- mesh->compute_bvh(&scene->params, progress);
- }
-
- if(progress.get_cancel()) return;
-
- mesh->need_update = false;
- mesh->need_update_rebuild = false;
+ pool.push(function_bind(&Mesh::compute_bvh, mesh, &scene->params, &progress, i, num_bvh));
+ i++;
}
-
- i++;
}
+
+ pool.wait_work();
foreach(Shader *shader, scene->shaders)
shader->need_update_attributes = false;
+ bool motion_blur = scene->need_motion() == Scene::MOTION_BLUR;
+
foreach(Object *object, scene->objects)
- object->compute_bounds();
+ object->compute_bounds(motion_blur);
if(progress.get_cancel()) return;
@@ -758,5 +771,32 @@ void MeshManager::tag_update(Scene *scene)
scene->object_manager->need_update = true;
}
+bool Mesh::need_attribute(Scene *scene, AttributeStandard std)
+{
+ if(std == ATTR_STD_NONE)
+ return false;
+
+ if(scene->need_global_attribute(std))
+ return true;
+
+ foreach(uint shader, used_shaders)
+ if(scene->shaders[shader]->attributes.find(std))
+ return true;
+
+ return false;
+}
+
+bool Mesh::need_attribute(Scene *scene, ustring name)
+{
+ if(name == ustring())
+ return false;
+
+ foreach(uint shader, used_shaders)
+ if(scene->shaders[shader]->attributes.find(name))
+ return true;
+
+ return false;
+}
+
CCL_NAMESPACE_END
diff --git a/intern/cycles/render/mesh.h b/intern/cycles/render/mesh.h
index 585203484c7..637143f5adf 100644
--- a/intern/cycles/render/mesh.h
+++ b/intern/cycles/render/mesh.h
@@ -96,7 +96,10 @@ public:
void pack_normals(Scene *scene, float4 *normal, float4 *vnormal);
void pack_verts(float4 *tri_verts, float4 *tri_vindex, size_t vert_offset);
- void compute_bvh(SceneParams *params, Progress& progress);
+ void compute_bvh(SceneParams *params, Progress *progress, int n, int total);
+
+ bool need_attribute(Scene *scene, AttributeStandard std);
+ bool need_attribute(Scene *scene, ustring name);
void tag_update(Scene *scene, bool rebuild);
};
diff --git a/intern/cycles/render/mesh_displace.cpp b/intern/cycles/render/mesh_displace.cpp
index a6f8e3f6be8..dea694a811e 100644
--- a/intern/cycles/render/mesh_displace.cpp
+++ b/intern/cycles/render/mesh_displace.cpp
@@ -140,11 +140,11 @@ bool MeshManager::displace(Device *device, Scene *scene, Mesh *mesh, Progress& p
* normals, as bump mapping in the shader will already alter the
* vertex normal, so we start from the non-displaced vertex normals
* to avoid applying the perturbation twice. */
- mesh->attributes.remove(Attribute::STD_FACE_NORMAL);
+ mesh->attributes.remove(ATTR_STD_FACE_NORMAL);
mesh->add_face_normals();
if(mesh->displacement_method == Mesh::DISPLACE_TRUE) {
- mesh->attributes.remove(Attribute::STD_VERTEX_NORMAL);
+ mesh->attributes.remove(ATTR_STD_VERTEX_NORMAL);
mesh->add_vertex_normals();
}
diff --git a/intern/cycles/render/nodes.cpp b/intern/cycles/render/nodes.cpp
index db696993737..57fe2fb01b7 100644
--- a/intern/cycles/render/nodes.cpp
+++ b/intern/cycles/render/nodes.cpp
@@ -33,6 +33,11 @@ TextureMapping::TextureMapping()
rotation = make_float3(0.0f, 0.0f, 0.0f);
scale = make_float3(1.0f, 1.0f, 1.0f);
+ min = make_float3(-FLT_MAX, -FLT_MAX, -FLT_MAX);
+ max = make_float3(FLT_MAX, FLT_MAX, FLT_MAX);
+
+ use_minmax = false;
+
x_mapping = X;
y_mapping = Y;
z_mapping = Z;
@@ -69,6 +74,8 @@ bool TextureMapping::skip()
if(x_mapping != X || y_mapping != Y || z_mapping != Z)
return false;
+ if(use_minmax)
+ return false;
return true;
}
@@ -85,6 +92,12 @@ void TextureMapping::compile(SVMCompiler& compiler, int offset_in, int offset_ou
compiler.add_node(tfm.y);
compiler.add_node(tfm.z);
compiler.add_node(tfm.w);
+
+ if(use_minmax) {
+ compiler.add_node(NODE_MIN_MAX, offset_out, offset_out);
+ compiler.add_node(float3_to_float4(min));
+ compiler.add_node(float3_to_float4(max));
+ }
}
/* Image Texture */
@@ -1503,6 +1516,7 @@ TextureCoordinateNode::TextureCoordinateNode()
{
add_input("Normal", SHADER_SOCKET_NORMAL, ShaderInput::NORMAL, true);
add_output("Generated", SHADER_SOCKET_POINT);
+ add_output("Normal", SHADER_SOCKET_NORMAL);
add_output("UV", SHADER_SOCKET_POINT);
add_output("Object", SHADER_SOCKET_POINT);
add_output("Camera", SHADER_SOCKET_POINT);
@@ -1513,9 +1527,9 @@ TextureCoordinateNode::TextureCoordinateNode()
void TextureCoordinateNode::attributes(AttributeRequestSet *attributes)
{
if(!output("Generated")->links.empty())
- attributes->add(Attribute::STD_GENERATED);
+ attributes->add(ATTR_STD_GENERATED);
if(!output("UV")->links.empty())
- attributes->add(Attribute::STD_UV);
+ attributes->add(ATTR_STD_UV);
ShaderNode::attributes(attributes);
}
@@ -1545,15 +1559,21 @@ void TextureCoordinateNode::compile(SVMCompiler& compiler)
compiler.add_node(geom_node, NODE_GEOM_P, out->stack_offset);
}
else {
- int attr = compiler.attribute(Attribute::STD_GENERATED);
+ int attr = compiler.attribute(ATTR_STD_GENERATED);
compiler.stack_assign(out);
compiler.add_node(attr_node, attr, out->stack_offset, NODE_ATTR_FLOAT3);
}
}
+ out = output("Normal");
+ if(!out->links.empty()) {
+ compiler.stack_assign(out);
+ compiler.add_node(texco_node, NODE_TEXCO_NORMAL, out->stack_offset);
+ }
+
out = output("UV");
if(!out->links.empty()) {
- int attr = compiler.attribute(Attribute::STD_UV);
+ int attr = compiler.attribute(ATTR_STD_UV);
compiler.stack_assign(out);
compiler.add_node(attr_node, attr, out->stack_offset, NODE_ATTR_FLOAT3);
}
@@ -1616,6 +1636,7 @@ LightPathNode::LightPathNode()
add_output("Is Singular Ray", SHADER_SOCKET_FLOAT);
add_output("Is Reflection Ray", SHADER_SOCKET_FLOAT);
add_output("Is Transmission Ray", SHADER_SOCKET_FLOAT);
+ add_output("Ray Length", SHADER_SOCKET_FLOAT);
}
void LightPathNode::compile(SVMCompiler& compiler)
@@ -1664,6 +1685,13 @@ void LightPathNode::compile(SVMCompiler& compiler)
compiler.stack_assign(out);
compiler.add_node(NODE_LIGHT_PATH, NODE_LP_transmission, out->stack_offset);
}
+
+ out = output("Ray Length");
+ if(!out->links.empty()) {
+ compiler.stack_assign(out);
+ compiler.add_node(NODE_LIGHT_PATH, NODE_LP_ray_length, out->stack_offset);
+ }
+
}
void LightPathNode::compile(OSLCompiler& compiler)
@@ -1671,6 +1699,53 @@ void LightPathNode::compile(OSLCompiler& compiler)
compiler.add(this, "node_light_path");
}
+/* Light Path */
+
+LightFalloffNode::LightFalloffNode()
+: ShaderNode("light_path")
+{
+ add_input("Strength", SHADER_SOCKET_FLOAT, 100.0f);
+ add_input("Smooth", SHADER_SOCKET_FLOAT, 0.0f);
+ add_output("Quadratic", SHADER_SOCKET_FLOAT);
+ add_output("Linear", SHADER_SOCKET_FLOAT);
+ add_output("Constant", SHADER_SOCKET_FLOAT);
+}
+
+void LightFalloffNode::compile(SVMCompiler& compiler)
+{
+ ShaderInput *strength_in = input("Strength");
+ ShaderInput *smooth_in = input("Smooth");
+
+ compiler.stack_assign(strength_in);
+ compiler.stack_assign(smooth_in);
+
+ ShaderOutput *out = output("Quadratic");
+ if(!out->links.empty()) {
+ compiler.stack_assign(out);
+ compiler.add_node(NODE_LIGHT_FALLOFF, NODE_LIGHT_FALLOFF_QUADRATIC,
+ compiler.encode_uchar4(strength_in->stack_offset, smooth_in->stack_offset, out->stack_offset));
+ }
+
+ out = output("Linear");
+ if(!out->links.empty()) {
+ compiler.stack_assign(out);
+ compiler.add_node(NODE_LIGHT_FALLOFF, NODE_LIGHT_FALLOFF_LINEAR,
+ compiler.encode_uchar4(strength_in->stack_offset, smooth_in->stack_offset, out->stack_offset));
+ }
+
+ out = output("Constant");
+ if(!out->links.empty()) {
+ compiler.stack_assign(out);
+ compiler.add_node(NODE_LIGHT_FALLOFF, NODE_LIGHT_FALLOFF_CONSTANT,
+ compiler.encode_uchar4(strength_in->stack_offset, smooth_in->stack_offset, out->stack_offset));
+ }
+}
+
+void LightFalloffNode::compile(OSLCompiler& compiler)
+{
+ compiler.add(this, "node_light_falloff");
+}
+
/* Value */
ValueNode::ValueNode()
diff --git a/intern/cycles/render/nodes.h b/intern/cycles/render/nodes.h
index 364209f8c5e..ff9e3647d01 100644
--- a/intern/cycles/render/nodes.h
+++ b/intern/cycles/render/nodes.h
@@ -41,6 +41,9 @@ public:
float3 rotation;
float3 scale;
+ float3 min, max;
+ bool use_minmax;
+
enum Mapping { NONE=0, X=1, Y=2, Z=3 };
Mapping x_mapping, y_mapping, z_mapping;
@@ -277,6 +280,11 @@ public:
SHADER_NODE_CLASS(LightPathNode)
};
+class LightFalloffNode : public ShaderNode {
+public:
+ SHADER_NODE_CLASS(LightFalloffNode)
+};
+
class ValueNode : public ShaderNode {
public:
SHADER_NODE_CLASS(ValueNode)
diff --git a/intern/cycles/render/object.cpp b/intern/cycles/render/object.cpp
index 5f7a5810c09..cae69c06f7d 100644
--- a/intern/cycles/render/object.cpp
+++ b/intern/cycles/render/object.cpp
@@ -37,15 +37,39 @@ Object::Object()
tfm = transform_identity();
visibility = ~0;
pass_id = 0;
+ bounds = BoundBox::empty;
+ motion.pre = transform_identity();
+ motion.post = transform_identity();
+ use_motion = false;
+ use_holdout = false;
}
Object::~Object()
{
}
-void Object::compute_bounds()
+void Object::compute_bounds(bool motion_blur)
{
- bounds = mesh->bounds.transformed(&tfm);
+ BoundBox mbounds = mesh->bounds;
+
+ if(motion_blur && use_motion) {
+ MotionTransform decomp;
+ transform_motion_decompose(&decomp, &motion);
+
+ bounds = BoundBox::empty;
+
+ /* todo: this is really terrible. according to pbrt there is a better
+ * way to find this iteratively, but did not find implementation yet
+ * or try to implement myself */
+ for(float t = 0.0f; t < 1.0f; t += 1.0f/128.0f) {
+ Transform ttfm;
+
+ transform_motion_interpolate(&ttfm, &decomp, t);
+ bounds.grow(mbounds.transformed(&ttfm));
+ }
+ }
+ else
+ bounds = mbounds.transformed(&tfm);
}
void Object::apply_transform()
@@ -56,8 +80,8 @@ void Object::apply_transform()
for(size_t i = 0; i < mesh->verts.size(); i++)
mesh->verts[i] = transform_point(&tfm, mesh->verts[i]);
- Attribute *attr_fN = mesh->attributes.find(Attribute::STD_FACE_NORMAL);
- Attribute *attr_vN = mesh->attributes.find(Attribute::STD_VERTEX_NORMAL);
+ Attribute *attr_fN = mesh->attributes.find(ATTR_STD_FACE_NORMAL);
+ Attribute *attr_vN = mesh->attributes.find(ATTR_STD_VERTEX_NORMAL);
Transform ntfm = transform_transpose(transform_inverse(tfm));
@@ -82,7 +106,7 @@ void Object::apply_transform()
if(bounds.valid()) {
mesh->compute_bounds();
- compute_bounds();
+ compute_bounds(false);
}
tfm = transform_identity();
@@ -120,16 +144,18 @@ ObjectManager::~ObjectManager()
void ObjectManager::device_update_transforms(Device *device, DeviceScene *dscene, Scene *scene, Progress& progress)
{
float4 *objects = dscene->objects.resize(OBJECT_SIZE*scene->objects.size());
+ uint *object_flag = dscene->object_flag.resize(OBJECT_SIZE*scene->objects.size());
int i = 0;
map<Mesh*, float> surface_area_map;
+ Scene::MotionType need_motion = scene->need_motion();
foreach(Object *ob, scene->objects) {
Mesh *mesh = ob->mesh;
+ uint flag = 0;
/* compute transformations */
Transform tfm = ob->tfm;
Transform itfm = transform_inverse(tfm);
- Transform ntfm = transform_transpose(itfm);
/* compute surface area. for uniform scale we can do avoid the many
transform calls and share computation for instances */
@@ -170,10 +196,44 @@ void ObjectManager::device_update_transforms(Device *device, DeviceScene *dscene
/* pack in texture */
int offset = i*OBJECT_SIZE;
- memcpy(&objects[offset], &tfm, sizeof(float4)*4);
- memcpy(&objects[offset+4], &itfm, sizeof(float4)*4);
- memcpy(&objects[offset+8], &ntfm, sizeof(float4)*4);
- objects[offset+12] = make_float4(surface_area, pass_id, 0.0f, 0.0f);
+ memcpy(&objects[offset], &tfm, sizeof(float4)*3);
+ memcpy(&objects[offset+3], &itfm, sizeof(float4)*3);
+ objects[offset+6] = make_float4(surface_area, pass_id, 0.0f, 0.0f);
+
+ if(need_motion == Scene::MOTION_PASS) {
+ /* motion transformations, is world/object space depending if mesh
+ comes with deformed position in object space, or if we transform
+ the shading point in world space */
+ Transform mtfm_pre = ob->motion.pre;
+ Transform mtfm_post = ob->motion.post;
+
+ if(!mesh->attributes.find(ATTR_STD_MOTION_PRE))
+ mtfm_pre = mtfm_pre * itfm;
+ if(!mesh->attributes.find(ATTR_STD_MOTION_POST))
+ mtfm_post = mtfm_post * itfm;
+
+ memcpy(&objects[offset+8], &mtfm_pre, sizeof(float4)*4);
+ memcpy(&objects[offset+12], &mtfm_post, sizeof(float4)*4);
+ }
+ else if(need_motion == Scene::MOTION_BLUR) {
+ if(ob->use_motion) {
+ /* decompose transformations for interpolation */
+ MotionTransform decomp;
+
+ transform_motion_decompose(&decomp, &ob->motion);
+ memcpy(&objects[offset+8], &decomp, sizeof(float4)*8);
+ flag |= SD_OBJECT_MOTION;
+ }
+ else {
+ float4 no_motion = make_float4(FLT_MAX);
+ memcpy(&objects[offset+8], &no_motion, sizeof(float4));
+ }
+ }
+
+ /* object flag */
+ if(ob->use_holdout)
+ flag |= SD_HOLDOUT_MASK;
+ object_flag[i] = flag;
i++;
@@ -181,6 +241,7 @@ void ObjectManager::device_update_transforms(Device *device, DeviceScene *dscene
}
device->tex_alloc("__objects", dscene->objects);
+ device->tex_alloc("__object_flag", dscene->object_flag);
}
void ObjectManager::device_update(Device *device, DeviceScene *dscene, Scene *scene, Progress& progress)
@@ -215,6 +276,9 @@ void ObjectManager::device_free(Device *device, DeviceScene *dscene)
{
device->tex_free(dscene->objects);
dscene->objects.clear();
+
+ device->tex_free(dscene->object_flag);
+ dscene->object_flag.clear();
}
void ObjectManager::apply_static_transforms(Scene *scene, Progress& progress)
@@ -224,6 +288,7 @@ void ObjectManager::apply_static_transforms(Scene *scene, Progress& progress)
/* counter mesh users */
map<Mesh*, int> mesh_users;
+ bool motion_blur = scene->need_motion() == Scene::MOTION_BLUR;
foreach(Object *object, scene->objects) {
map<Mesh*, int>::iterator it = mesh_users.find(object->mesh);
@@ -239,12 +304,14 @@ void ObjectManager::apply_static_transforms(Scene *scene, Progress& progress)
/* apply transforms for objects with single user meshes */
foreach(Object *object, scene->objects) {
if(mesh_users[object->mesh] == 1) {
- if(!object->mesh->transform_applied) {
- object->apply_transform();
- object->mesh->transform_applied = true;
- }
+ if(!(motion_blur && object->use_motion)) {
+ if(!object->mesh->transform_applied) {
+ object->apply_transform();
+ object->mesh->transform_applied = true;
- if(progress.get_cancel()) return;
+ if(progress.get_cancel()) return;
+ }
+ }
}
}
}
diff --git a/intern/cycles/render/object.h b/intern/cycles/render/object.h
index 14da2cfb35d..267052bfca7 100644
--- a/intern/cycles/render/object.h
+++ b/intern/cycles/render/object.h
@@ -44,13 +44,16 @@ public:
int pass_id;
vector<ParamValue> attributes;
uint visibility;
+ MotionTransform motion;
+ bool use_motion;
+ bool use_holdout;
Object();
~Object();
void tag_update(Scene *scene);
- void compute_bounds();
+ void compute_bounds(bool motion_blur);
void apply_transform();
};
diff --git a/intern/cycles/render/scene.cpp b/intern/cycles/render/scene.cpp
index 079f2744e73..b6453339d41 100644
--- a/intern/cycles/render/scene.cpp
+++ b/intern/cycles/render/scene.cpp
@@ -128,7 +128,7 @@ void Scene::device_update(Device *device_, Progress& progress)
if(progress.get_cancel()) return;
progress.set_status("Updating Camera");
- camera->device_update(device, &dscene);
+ camera->device_update(device, &dscene, this);
if(progress.get_cancel()) return;
@@ -166,6 +166,33 @@ void Scene::device_update(Device *device_, Progress& progress)
device->const_copy_to("__data", &dscene.data, sizeof(dscene.data));
}
+Scene::MotionType Scene::need_motion()
+{
+ if(integrator->motion_blur)
+ return MOTION_BLUR;
+ else if(Pass::contains(film->passes, PASS_MOTION))
+ return MOTION_PASS;
+ else
+ return MOTION_NONE;
+}
+
+bool Scene::need_global_attribute(AttributeStandard std)
+{
+ if(std == ATTR_STD_UV)
+ return Pass::contains(film->passes, PASS_UV);
+ if(std == ATTR_STD_MOTION_PRE || ATTR_STD_MOTION_POST)
+ return need_motion() == MOTION_PASS;
+
+ return false;
+}
+
+void Scene::need_global_attributes(AttributeRequestSet& attributes)
+{
+ for(int std = ATTR_STD_NONE; std < ATTR_STD_NUM; std++)
+ if(need_global_attribute((AttributeStandard)std))
+ attributes.add((AttributeStandard)std);
+}
+
bool Scene::need_update()
{
return (need_reset() || film->need_update);
diff --git a/intern/cycles/render/scene.h b/intern/cycles/render/scene.h
index af4301b1cd9..ca4d9fc9625 100644
--- a/intern/cycles/render/scene.h
+++ b/intern/cycles/render/scene.h
@@ -33,6 +33,7 @@
CCL_NAMESPACE_BEGIN
+class AttributeRequestSet;
class Background;
class Camera;
class Device;
@@ -84,6 +85,7 @@ public:
/* shaders */
device_vector<uint4> svm_nodes;
device_vector<uint> shader_flag;
+ device_vector<uint> object_flag;
/* filter */
device_vector<float> filter_table;
@@ -175,6 +177,12 @@ public:
void device_update(Device *device, Progress& progress);
+ bool need_global_attribute(AttributeStandard std);
+ void need_global_attributes(AttributeRequestSet& attributes);
+
+ enum MotionType { MOTION_NONE = 0, MOTION_PASS, MOTION_BLUR };
+ MotionType need_motion();
+
bool need_update();
bool need_reset();
};
diff --git a/intern/cycles/render/session.cpp b/intern/cycles/render/session.cpp
index 676f42be790..34a0c0ff877 100644
--- a/intern/cycles/render/session.cpp
+++ b/intern/cycles/render/session.cpp
@@ -27,6 +27,7 @@
#include "util_foreach.h"
#include "util_function.h"
+#include "util_task.h"
#include "util_time.h"
CCL_NAMESPACE_BEGIN
@@ -37,6 +38,8 @@ Session::Session(const SessionParams& params_)
{
device_use_gl = ((params.device.type != DEVICE_CPU) && !params.background);
+ TaskScheduler::init(params.threads);
+
device = Device::create(params.device, params.background, params.threads);
buffers = new RenderBuffers(device);
display = new DisplayBuffer(device);
@@ -88,6 +91,8 @@ Session::~Session()
delete display;
delete scene;
delete device;
+
+ TaskScheduler::exit();
}
void Session::start()
diff --git a/intern/cycles/render/shader.cpp b/intern/cycles/render/shader.cpp
index c1f7b3518d2..f50709146ef 100644
--- a/intern/cycles/render/shader.cpp
+++ b/intern/cycles/render/shader.cpp
@@ -133,12 +133,12 @@ uint ShaderManager::get_attribute_id(ustring name)
if(it != unique_attribute_id.end())
return it->second;
- uint id = (uint)Attribute::STD_NUM + unique_attribute_id.size();
+ uint id = (uint)ATTR_STD_NUM + unique_attribute_id.size();
unique_attribute_id[name] = id;
return id;
}
-uint ShaderManager::get_attribute_id(Attribute::Standard std)
+uint ShaderManager::get_attribute_id(AttributeStandard std)
{
return (uint)std;
}
diff --git a/intern/cycles/render/shader.h b/intern/cycles/render/shader.h
index 35f3cfe27f5..48d517ce21a 100644
--- a/intern/cycles/render/shader.h
+++ b/intern/cycles/render/shader.h
@@ -103,7 +103,7 @@ public:
/* get globally unique id for a type of attribute */
uint get_attribute_id(ustring name);
- uint get_attribute_id(Attribute::Standard std);
+ uint get_attribute_id(AttributeStandard std);
/* get shader id for mesh faces */
int get_shader_id(uint shader, Mesh *mesh = NULL, bool smooth = false);
diff --git a/intern/cycles/render/svm.cpp b/intern/cycles/render/svm.cpp
index a52e30c6030..1ff3ac20d50 100644
--- a/intern/cycles/render/svm.cpp
+++ b/intern/cycles/render/svm.cpp
@@ -337,7 +337,7 @@ uint SVMCompiler::attribute(ustring name)
return shader_manager->get_attribute_id(name);
}
-uint SVMCompiler::attribute(Attribute::Standard std)
+uint SVMCompiler::attribute(AttributeStandard std)
{
return shader_manager->get_attribute_id(std);
}
diff --git a/intern/cycles/render/svm.h b/intern/cycles/render/svm.h
index 56c930f6217..0db68f400fc 100644
--- a/intern/cycles/render/svm.h
+++ b/intern/cycles/render/svm.h
@@ -69,7 +69,7 @@ public:
void add_node(const float4& f);
void add_array(float4 *f, int num);
uint attribute(ustring name);
- uint attribute(Attribute::Standard std);
+ uint attribute(AttributeStandard std);
uint encode_uchar4(uint x, uint y = 0, uint z = 0, uint w = 0);
uint closure_mix_weight_offset() { return mix_weight_offset; }
diff --git a/intern/cycles/subd/subd_dice.cpp b/intern/cycles/subd/subd_dice.cpp
index 6b29d1ca51a..6e24bb410b5 100644
--- a/intern/cycles/subd/subd_dice.cpp
+++ b/intern/cycles/subd/subd_dice.cpp
@@ -39,7 +39,7 @@ EdgeDice::EdgeDice(Mesh *mesh_, int shader_, bool smooth_, float dicing_rate_)
smooth = smooth_;
camera = NULL;
- mesh->attributes.add(Attribute::STD_VERTEX_NORMAL);
+ mesh->attributes.add(ATTR_STD_VERTEX_NORMAL);
}
void EdgeDice::reserve(int num_verts, int num_tris)
@@ -49,7 +49,7 @@ void EdgeDice::reserve(int num_verts, int num_tris)
mesh->reserve(vert_offset + num_verts, tri_offset + num_tris);
- Attribute *attr_vN = mesh->attributes.add(Attribute::STD_VERTEX_NORMAL);
+ Attribute *attr_vN = mesh->attributes.add(ATTR_STD_VERTEX_NORMAL);
mesh_P = &mesh->verts[0];
mesh_N = attr_vN->data_float3();
diff --git a/intern/cycles/subd/subd_patch.cpp b/intern/cycles/subd/subd_patch.cpp
index ff477296c7e..f6acc358959 100644
--- a/intern/cycles/subd/subd_patch.cpp
+++ b/intern/cycles/subd/subd_patch.cpp
@@ -93,7 +93,7 @@ void LinearQuadPatch::eval(float3 *P, float3 *dPdu, float3 *dPdv, float u, float
BoundBox LinearQuadPatch::bound()
{
- BoundBox bbox;
+ BoundBox bbox = BoundBox::empty;
for(int i = 0; i < 4; i++)
bbox.grow(hull[i]);
@@ -115,7 +115,7 @@ void LinearTrianglePatch::eval(float3 *P, float3 *dPdu, float3 *dPdv, float u, f
BoundBox LinearTrianglePatch::bound()
{
- BoundBox bbox;
+ BoundBox bbox = BoundBox::empty;
for(int i = 0; i < 3; i++)
bbox.grow(hull[i]);
@@ -132,7 +132,7 @@ void BicubicPatch::eval(float3 *P, float3 *dPdu, float3 *dPdv, float u, float v)
BoundBox BicubicPatch::bound()
{
- BoundBox bbox;
+ BoundBox bbox = BoundBox::empty;
for(int i = 0; i < 16; i++)
bbox.grow(hull[i]);
@@ -152,7 +152,7 @@ void BicubicTangentPatch::eval(float3 *P, float3 *dPdu, float3 *dPdv, float u, f
BoundBox BicubicTangentPatch::bound()
{
- BoundBox bbox;
+ BoundBox bbox = BoundBox::empty;
for(int i = 0; i < 16; i++)
bbox.grow(hull[i]);
@@ -205,7 +205,7 @@ void GregoryQuadPatch::eval(float3 *P, float3 *dPdu, float3 *dPdv, float u, floa
BoundBox GregoryQuadPatch::bound()
{
- BoundBox bbox;
+ BoundBox bbox = BoundBox::empty;
for(int i = 0; i < 20; i++)
bbox.grow(hull[i]);
@@ -276,7 +276,7 @@ void GregoryTrianglePatch::eval(float3 *P, float3 *dPdu, float3 *dPdv, float u,
BoundBox GregoryTrianglePatch::bound()
{
- BoundBox bbox;
+ BoundBox bbox = BoundBox::empty;
for(int i = 0; i < 20; i++)
bbox.grow(hull[i]);
diff --git a/intern/cycles/util/CMakeLists.txt b/intern/cycles/util/CMakeLists.txt
index 9182ee4cbe1..87bd84b4e0f 100644
--- a/intern/cycles/util/CMakeLists.txt
+++ b/intern/cycles/util/CMakeLists.txt
@@ -15,6 +15,7 @@ set(SRC
util_path.cpp
util_string.cpp
util_system.cpp
+ util_task.cpp
util_time.cpp
util_transform.cpp
)
@@ -50,6 +51,7 @@ set(SRC_HEADERS
util_set.h
util_string.h
util_system.h
+ util_task.h
util_thread.h
util_time.h
util_transform.h
diff --git a/intern/cycles/util/util_boundbox.h b/intern/cycles/util/util_boundbox.h
index bb1df0b220f..b35c4c12bb8 100644
--- a/intern/cycles/util/util_boundbox.h
+++ b/intern/cycles/util/util_boundbox.h
@@ -23,6 +23,7 @@
#include <float.h>
#include "util_math.h"
+#include "util_string.h"
#include "util_transform.h"
#include "util_types.h"
@@ -35,45 +36,81 @@ class BoundBox
public:
float3 min, max;
- BoundBox(void)
+ __forceinline BoundBox()
{
- min = make_float3(FLT_MAX, FLT_MAX, FLT_MAX);
- max = make_float3(-FLT_MAX, -FLT_MAX, -FLT_MAX);
}
- BoundBox(const float3& min_, const float3& max_)
+ __forceinline BoundBox(const float3& pt)
+ : min(pt), max(pt)
+ {
+ }
+
+ __forceinline BoundBox(const float3& min_, const float3& max_)
: min(min_), max(max_)
{
}
- void grow(const float3& pt)
+ enum empty_t { empty = 0};
+
+ __forceinline BoundBox(empty_t)
+ : min(make_float3(FLT_MAX, FLT_MAX, FLT_MAX)), max(make_float3(-FLT_MAX, -FLT_MAX, -FLT_MAX))
+ {
+ }
+
+ __forceinline void grow(const float3& pt)
{
min = ccl::min(min, pt);
max = ccl::max(max, pt);
}
- void grow(const BoundBox& bbox)
+ __forceinline void grow(const BoundBox& bbox)
{
grow(bbox.min);
grow(bbox.max);
}
- void intersect(const BoundBox& bbox)
+ __forceinline void intersect(const BoundBox& bbox)
{
min = ccl::max(min, bbox.min);
max = ccl::min(max, bbox.max);
}
- float area(void) const
+ /* todo: avoid using this */
+ __forceinline float safe_area() const
{
- if(!valid())
+ if(!((min.x <= max.x) && (min.y <= max.y) && (min.z <= max.z)))
return 0.0f;
+ return area();
+ }
+
+ __forceinline float area() const
+ {
+ return half_area()*2.0f;
+ }
+
+ __forceinline float half_area() const
+ {
float3 d = max - min;
- return dot(d, d)*2.0f;
+ return (d.x*d.z + d.y*d.z + d.x*d.y);
+ }
+
+ __forceinline float3 center() const
+ {
+ return 0.5f*(min + max);
}
- bool valid(void) const
+ __forceinline float3 center2() const
+ {
+ return min + max;
+ }
+
+ __forceinline float3 size() const
+ {
+ return max - min;
+ }
+
+ __forceinline bool valid() const
{
return (min.x <= max.x) && (min.y <= max.y) && (min.z <= max.z) &&
(isfinite(min.x) && isfinite(min.y) && isfinite(min.z)) &&
@@ -82,7 +119,7 @@ public:
BoundBox transformed(const Transform *tfm)
{
- BoundBox result;
+ BoundBox result = BoundBox::empty;
for(int i = 0; i < 8; i++) {
float3 p;
@@ -98,6 +135,31 @@ public:
}
};
+__forceinline BoundBox merge(const BoundBox& bbox, const float3& pt)
+{
+ return BoundBox(min(bbox.min, pt), max(bbox.max, pt));
+}
+
+__forceinline BoundBox merge(const BoundBox& a, const BoundBox& b)
+{
+ return BoundBox(min(a.min, b.min), max(a.max, b.max));
+}
+
+__forceinline BoundBox merge(const BoundBox& a, const BoundBox& b, const BoundBox& c, const BoundBox& d)
+{
+ return merge(merge(a, b), merge(c, d));
+}
+
+__forceinline BoundBox intersect(const BoundBox& a, const BoundBox& b)
+{
+ return BoundBox(max(a.min, b.min), min(a.max, b.max));
+}
+
+__forceinline BoundBox intersect(const BoundBox& a, const BoundBox& b, const BoundBox& c)
+{
+ return intersect(a, intersect(b, c));
+}
+
CCL_NAMESPACE_END
#endif /* __UTIL_BOUNDBOX_H__ */
diff --git a/intern/cycles/util/util_math.h b/intern/cycles/util/util_math.h
index 019dede07fa..8c0e7105b22 100644
--- a/intern/cycles/util/util_math.h
+++ b/intern/cycles/util/util_math.h
@@ -55,6 +55,10 @@ CCL_NAMESPACE_BEGIN
#ifndef M_2_PI_F
#define M_2_PI_F ((float)0.636619772367581343075535053490057448)
#endif
+#ifndef M_SQRT2_F
+#define M_SQRT2_F ((float)1.41421356237309504880)
+#endif
+
/* Scalar */
@@ -182,93 +186,74 @@ __device_inline float average(const float2 a)
__device_inline float2 operator-(const float2 a)
{
- float2 r = {-a.x, -a.y};
- return r;
+ return make_float2(-a.x, -a.y);
}
__device_inline float2 operator*(const float2 a, const float2 b)
{
- float2 r = {a.x*b.x, a.y*b.y};
- return r;
+ return make_float2(a.x*b.x, a.y*b.y);
}
__device_inline float2 operator*(const float2 a, float f)
{
- float2 r = {a.x*f, a.y*f};
- return r;
+ return make_float2(a.x*f, a.y*f);
}
__device_inline float2 operator*(float f, const float2 a)
{
- float2 r = {a.x*f, a.y*f};
- return r;
+ return make_float2(a.x*f, a.y*f);
}
__device_inline float2 operator/(float f, const float2 a)
{
- float2 r = {f/a.x, f/a.y};
- return r;
+ return make_float2(f/a.x, f/a.y);
}
__device_inline float2 operator/(const float2 a, float f)
{
float invf = 1.0f/f;
- float2 r = {a.x*invf, a.y*invf};
- return r;
+ return make_float2(a.x*invf, a.y*invf);
}
__device_inline float2 operator/(const float2 a, const float2 b)
{
- float2 r = {a.x/b.x, a.y/b.y};
- return r;
+ return make_float2(a.x/b.x, a.y/b.y);
}
__device_inline float2 operator+(const float2 a, const float2 b)
{
- float2 r = {a.x+b.x, a.y+b.y};
- return r;
+ return make_float2(a.x+b.x, a.y+b.y);
}
__device_inline float2 operator-(const float2 a, const float2 b)
{
- float2 r = {a.x-b.x, a.y-b.y};
- return r;
+ return make_float2(a.x-b.x, a.y-b.y);
}
__device_inline float2 operator+=(float2& a, const float2 b)
{
- a.x += b.x;
- a.y += b.y;
- return a;
+ return a = a + b;
}
__device_inline float2 operator*=(float2& a, const float2 b)
{
- a.x *= b.x;
- a.y *= b.y;
- return a;
+ return a = a * b;
}
__device_inline float2 operator*=(float2& a, float f)
{
- a.x *= f;
- a.y *= f;
- return a;
+ return a = a * f;
}
__device_inline float2 operator/=(float2& a, const float2 b)
{
- a.x /= b.x;
- a.y /= b.y;
- return a;
+ return a = a / b;
}
__device_inline float2 operator/=(float2& a, float f)
{
float invf = 1.0f/f;
- a.x *= invf;
- a.y *= invf;
- return a;
+ return a = a * invf;
}
@@ -314,14 +299,12 @@ __device_inline bool operator!=(const float2 a, const float2 b)
__device_inline float2 min(float2 a, float2 b)
{
- float2 r = {min(a.x, b.x), min(a.y, b.y)};
- return r;
+ return make_float2(min(a.x, b.x), min(a.y, b.y));
}
__device_inline float2 max(float2 a, float2 b)
{
- float2 r = {max(a.x, b.x), max(a.y, b.y)};
- return r;
+ return make_float2(max(a.x, b.x), max(a.y, b.y));
}
__device_inline float2 clamp(float2 a, float2 mn, float2 mx)
@@ -361,112 +344,78 @@ __device_inline float2 interp(float2 a, float2 b, float t)
/* Float3 Vector */
-__device_inline bool is_zero(const float3 a)
-{
- return (a.x == 0.0f && a.y == 0.0f && a.z == 0.0f);
-}
-
-__device_inline float average(const float3 a)
-{
- return (a.x + a.y + a.z)*(1.0f/3.0f);
-}
-
#ifndef __KERNEL_OPENCL__
__device_inline float3 operator-(const float3 a)
{
- float3 r = make_float3(-a.x, -a.y, -a.z);
- return r;
+ return make_float3(-a.x, -a.y, -a.z);
}
__device_inline float3 operator*(const float3 a, const float3 b)
{
- float3 r = make_float3(a.x*b.x, a.y*b.y, a.z*b.z);
- return r;
+ return make_float3(a.x*b.x, a.y*b.y, a.z*b.z);
}
__device_inline float3 operator*(const float3 a, float f)
{
- float3 r = make_float3(a.x*f, a.y*f, a.z*f);
- return r;
+ return make_float3(a.x*f, a.y*f, a.z*f);
}
__device_inline float3 operator*(float f, const float3 a)
{
- float3 r = make_float3(a.x*f, a.y*f, a.z*f);
- return r;
+ return make_float3(a.x*f, a.y*f, a.z*f);
}
__device_inline float3 operator/(float f, const float3 a)
{
- float3 r = make_float3(f/a.x, f/a.y, f/a.z);
- return r;
+ return make_float3(f/a.x, f/a.y, f/a.z);
}
__device_inline float3 operator/(const float3 a, float f)
{
float invf = 1.0f/f;
- float3 r = make_float3(a.x*invf, a.y*invf, a.z*invf);
- return r;
+ return make_float3(a.x*invf, a.y*invf, a.z*invf);
}
__device_inline float3 operator/(const float3 a, const float3 b)
{
- float3 r = make_float3(a.x/b.x, a.y/b.y, a.z/b.z);
- return r;
+ return make_float3(a.x/b.x, a.y/b.y, a.z/b.z);
}
__device_inline float3 operator+(const float3 a, const float3 b)
{
- float3 r = make_float3(a.x+b.x, a.y+b.y, a.z+b.z);
- return r;
+ return make_float3(a.x+b.x, a.y+b.y, a.z+b.z);
}
__device_inline float3 operator-(const float3 a, const float3 b)
{
- float3 r = make_float3(a.x-b.x, a.y-b.y, a.z-b.z);
- return r;
+ return make_float3(a.x-b.x, a.y-b.y, a.z-b.z);
}
__device_inline float3 operator+=(float3& a, const float3 b)
{
- a.x += b.x;
- a.y += b.y;
- a.z += b.z;
- return a;
+ return a = a + b;
}
__device_inline float3 operator*=(float3& a, const float3 b)
{
- a.x *= b.x;
- a.y *= b.y;
- a.z *= b.z;
- return a;
+ return a = a * b;
}
__device_inline float3 operator*=(float3& a, float f)
{
- a.x *= f;
- a.y *= f;
- a.z *= f;
- return a;
+ return a = a * f;
}
__device_inline float3 operator/=(float3& a, const float3 b)
{
- a.x /= b.x;
- a.y /= b.y;
- a.z /= b.z;
- return a;
+ return a = a / b;
}
__device_inline float3 operator/=(float3& a, float f)
{
float invf = 1.0f/f;
- a.x *= invf;
- a.y *= invf;
- a.z *= invf;
- return a;
+ return a = a * invf;
}
__device_inline float dot(const float3 a, const float3 b)
@@ -487,6 +436,11 @@ __device_inline float len(const float3 a)
return sqrtf(dot(a, a));
}
+__device_inline float len_squared(const float3 a)
+{
+ return dot(a, a);
+}
+
#ifndef __KERNEL_OPENCL__
__device_inline float3 normalize(const float3 a)
@@ -506,7 +460,11 @@ __device_inline float3 normalize_len(const float3 a, float *t)
__device_inline bool operator==(const float3 a, const float3 b)
{
+#ifdef __KERNEL_SSE__
+ return (_mm_movemask_ps(_mm_cmpeq_ps(a.m128, b.m128)) & 7) == 7;
+#else
return (a.x == b.x && a.y == b.y && a.z == b.z);
+#endif
}
__device_inline bool operator!=(const float3 a, const float3 b)
@@ -516,14 +474,20 @@ __device_inline bool operator!=(const float3 a, const float3 b)
__device_inline float3 min(float3 a, float3 b)
{
- float3 r = make_float3(min(a.x, b.x), min(a.y, b.y), min(a.z, b.z));
- return r;
+#ifdef __KERNEL_SSE__
+ return _mm_min_ps(a.m128, b.m128);
+#else
+ return make_float3(min(a.x, b.x), min(a.y, b.y), min(a.z, b.z));
+#endif
}
__device_inline float3 max(float3 a, float3 b)
{
- float3 r = make_float3(max(a.x, b.x), max(a.y, b.y), max(a.z, b.z));
- return r;
+#ifdef __KERNEL_SSE__
+ return _mm_max_ps(a.m128, b.m128);
+#else
+ return make_float3(max(a.x, b.x), max(a.y, b.y), max(a.z, b.z));
+#endif
}
__device_inline float3 clamp(float3 a, float3 mn, float3 mx)
@@ -533,11 +497,21 @@ __device_inline float3 clamp(float3 a, float3 mn, float3 mx)
__device_inline float3 fabs(float3 a)
{
+#ifdef __KERNEL_SSE__
+ __m128 mask = _mm_castsi128_ps(_mm_set1_epi32(0x7fffffff));
+ return _mm_and_ps(a.m128, mask);
+#else
return make_float3(fabsf(a.x), fabsf(a.y), fabsf(a.z));
+#endif
}
#endif
+__device_inline float3 float2_to_float3(const float2 a)
+{
+ return make_float3(a.x, a.y, 0.0f);
+}
+
__device_inline float3 float4_to_float3(const float4 a)
{
return make_float3(a.x, a.y, a.z);
@@ -555,6 +529,16 @@ __device_inline void print_float3(const char *label, const float3& a)
printf("%s: %.8f %.8f %.8f\n", label, a.x, a.y, a.z);
}
+__device_inline float3 rcp(const float3& a)
+{
+#ifdef __KERNEL_SSE__
+ float4 r = _mm_rcp_ps(a.m128);
+ return _mm_sub_ps(_mm_add_ps(r, r), _mm_mul_ps(_mm_mul_ps(r, r), a));
+#else
+ return make_float3(1.0f/a.x, 1.0f/a.y, 1.0f/a.z);
+#endif
+}
+
#endif
__device_inline float3 interp(float3 a, float3 b, float t)
@@ -562,122 +546,296 @@ __device_inline float3 interp(float3 a, float3 b, float t)
return a + t*(b - a);
}
+__device_inline bool is_zero(const float3 a)
+{
+#ifdef __KERNEL_SSE__
+ return a == make_float3(0.0f);
+#else
+ return (a.x == 0.0f && a.y == 0.0f && a.z == 0.0f);
+#endif
+}
+
+__device_inline float reduce_add(const float3 a)
+{
+#ifdef __KERNEL_SSE__
+ return (a.x + a.y + a.z);
+#else
+ return (a.x + a.y + a.z);
+#endif
+}
+
+__device_inline float average(const float3 a)
+{
+ return reduce_add(a)*(1.0f/3.0f);
+}
+
/* Float4 Vector */
-#ifndef __KERNEL_OPENCL__
+#ifdef __KERNEL_SSE__
-__device_inline bool is_zero(const float4& a)
+template<size_t index_0, size_t index_1, size_t index_2, size_t index_3> __forceinline const float4 shuffle(const float4& b)
{
- return (a.x == 0.0f && a.y == 0.0f && a.z == 0.0f && a.w == 0.0f);
+ return _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(b), _MM_SHUFFLE(index_3, index_2, index_1, index_0)));
}
-__device_inline float average(const float4& a)
+template<> __forceinline const float4 shuffle<0, 0, 2, 2>(const float4& b)
+{
+ return _mm_moveldup_ps(b);
+}
+
+template<> __forceinline const float4 shuffle<1, 1, 3, 3>(const float4& b)
{
- return (a.x + a.y + a.z + a.w)*(1.0f/4.0f);
+ return _mm_movehdup_ps(b);
}
+template<> __forceinline const float4 shuffle<0, 1, 0, 1>(const float4& b)
+{
+ return _mm_castpd_ps(_mm_movedup_pd(_mm_castps_pd(b)));
+}
+
+#endif
+
+#ifndef __KERNEL_OPENCL__
+
__device_inline float4 operator-(const float4& a)
{
- float4 r = {-a.x, -a.y, -a.z, -a.w};
- return r;
+#ifdef __KERNEL_SSE__
+ __m128 mask = _mm_castsi128_ps(_mm_set1_epi32(0x80000000));
+ return _mm_xor_ps(a.m128, mask);
+#else
+ return make_float4(-a.x, -a.y, -a.z, -a.w);
+#endif
}
__device_inline float4 operator*(const float4& a, const float4& b)
{
- float4 r = {a.x*b.x, a.y*b.y, a.z*b.z, a.w*b.w};
- return r;
+#ifdef __KERNEL_SSE__
+ return _mm_mul_ps(a.m128, b.m128);
+#else
+ return make_float4(a.x*b.x, a.y*b.y, a.z*b.z, a.w*b.w);
+#endif
}
__device_inline float4 operator*(const float4& a, float f)
{
- float4 r = {a.x*f, a.y*f, a.z*f, a.w*f};
- return r;
+#ifdef __KERNEL_SSE__
+ return a * make_float4(f);
+#else
+ return make_float4(a.x*f, a.y*f, a.z*f, a.w*f);
+#endif
}
__device_inline float4 operator*(float f, const float4& a)
{
- float4 r = {a.x*f, a.y*f, a.z*f, a.w*f};
- return r;
+ return a * f;
+}
+
+__device_inline float4 rcp(const float4& a)
+{
+#ifdef __KERNEL_SSE__
+ float4 r = _mm_rcp_ps(a.m128);
+ return _mm_sub_ps(_mm_add_ps(r, r), _mm_mul_ps(_mm_mul_ps(r, r), a));
+#else
+ return make_float4(1.0f/a.x, 1.0f/a.y, 1.0f/a.z, 1.0f/a.w);
+#endif
}
__device_inline float4 operator/(const float4& a, float f)
{
- float invf = 1.0f/f;
- float4 r = {a.x*invf, a.y*invf, a.z*invf, a.w*invf};
- return r;
+ return a * (1.0f/f);
}
__device_inline float4 operator/(const float4& a, const float4& b)
{
- float4 r = {a.x/b.x, a.y/b.y, a.z/b.z, a.w/b.w};
- return r;
+#ifdef __KERNEL_SSE__
+ return a * rcp(b);
+#else
+ return make_float4(a.x/b.x, a.y/b.y, a.z/b.z, a.w/b.w);
+#endif
+
}
__device_inline float4 operator+(const float4& a, const float4& b)
{
- float4 r = {a.x+b.x, a.y+b.y, a.z+b.z, a.w+b.w};
- return r;
+#ifdef __KERNEL_SSE__
+ return _mm_add_ps(a.m128, b.m128);
+#else
+ return make_float4(a.x+b.x, a.y+b.y, a.z+b.z, a.w+b.w);
+#endif
}
__device_inline float4 operator-(const float4& a, const float4& b)
{
- float4 r = {a.x-b.x, a.y-b.y, a.z-b.z, a.w-b.w};
- return r;
+#ifdef __KERNEL_SSE__
+ return _mm_sub_ps(a.m128, b.m128);
+#else
+ return make_float4(a.x-b.x, a.y-b.y, a.z-b.z, a.w-b.w);
+#endif
}
__device_inline float4 operator+=(float4& a, const float4& b)
{
- a.x += b.x;
- a.y += b.y;
- a.z += b.z;
- a.w += b.w;
- return a;
+ return a = a + b;
}
__device_inline float4 operator*=(float4& a, const float4& b)
{
- a.x *= b.x;
- a.y *= b.y;
- a.z *= b.z;
- a.w *= b.w;
- return a;
+ return a = a * b;
}
__device_inline float4 operator/=(float4& a, float f)
{
- float invf = 1.0f/f;
- a.x *= invf;
- a.y *= invf;
- a.z *= invf;
- a.w *= invf;
- return a;
+ return a = a / f;
}
-__device_inline float dot(const float4& a, const float4& b)
+__device_inline int4 operator<(const float4& a, const float4& b)
{
- return a.x*b.x + a.y*b.y + a.z*b.z + a.w*b.w;
+#ifdef __KERNEL_SSE__
+ return _mm_cvtps_epi32(_mm_cmplt_ps(a.m128, b.m128)); /* todo: avoid cvt */
+#else
+ return make_int4(a.x < b.x, a.y < b.y, a.z < b.z, a.w < b.w);
+#endif
+}
+
+__device_inline int4 operator>=(float4 a, float4 b)
+{
+#ifdef __KERNEL_SSE__
+ return _mm_cvtps_epi32(_mm_cmpge_ps(a.m128, b.m128)); /* todo: avoid cvt */
+#else
+ return make_int4(a.x >= b.x, a.y >= b.y, a.z >= b.z, a.w >= b.w);
+#endif
+}
+
+__device_inline int4 operator<=(const float4& a, const float4& b)
+{
+#ifdef __KERNEL_SSE__
+ return _mm_cvtps_epi32(_mm_cmple_ps(a.m128, b.m128)); /* todo: avoid cvt */
+#else
+ return make_int4(a.x <= b.x, a.y <= b.y, a.z <= b.z, a.w <= b.w);
+#endif
+}
+
+__device_inline bool operator==(const float4 a, const float4 b)
+{
+#ifdef __KERNEL_SSE__
+ return (_mm_movemask_ps(_mm_cmpeq_ps(a.m128, b.m128)) & 15) == 15;
+#else
+ return (a.x == b.x && a.y == b.y && a.z == b.z && a.w == b.w);
+#endif
}
__device_inline float4 cross(const float4& a, const float4& b)
{
- float4 r = {a.y*b.z - a.z*b.y, a.z*b.x - a.x*b.z, a.x*b.y - a.y*b.x, 0.0f};
- return r;
+#ifdef __KERNEL_SSE__
+ return (shuffle<1,2,0,0>(a)*shuffle<2,0,1,0>(b)) - (shuffle<2,0,1,0>(a)*shuffle<1,2,0,0>(b));
+#else
+ return make_float4(a.y*b.z - a.z*b.y, a.z*b.x - a.x*b.z, a.x*b.y - a.y*b.x, 0.0f);
+#endif
+}
+
+__device_inline bool is_zero(const float4& a)
+{
+#ifdef __KERNEL_SSE__
+ return a == make_float4(0.0f);
+#else
+ return (a.x == 0.0f && a.y == 0.0f && a.z == 0.0f && a.w == 0.0f);
+#endif
+}
+
+__device_inline float reduce_add(const float4& a)
+{
+#ifdef __KERNEL_SSE__
+ float4 h = shuffle<1,0,3,2>(a) + a;
+ return _mm_cvtss_f32(shuffle<2,3,0,1>(h) + h); /* todo: efficiency? */
+#else
+ return ((a.x + a.y) + (a.z + a.w));
+#endif
+}
+
+__device_inline float average(const float4& a)
+{
+ return reduce_add(a) * 0.25f;
+}
+
+__device_inline float dot(const float4& a, const float4& b)
+{
+ return reduce_add(a * b);
+}
+
+__device_inline float len(const float4 a)
+{
+ return sqrtf(dot(a, a));
+}
+
+__device_inline float4 normalize(const float4 a)
+{
+ return a/len(a);
}
__device_inline float4 min(float4 a, float4 b)
{
+#ifdef __KERNEL_SSE__
+ return _mm_min_ps(a.m128, b.m128);
+#else
return make_float4(min(a.x, b.x), min(a.y, b.y), min(a.z, b.z), min(a.w, b.w));
+#endif
}
__device_inline float4 max(float4 a, float4 b)
{
+#ifdef __KERNEL_SSE__
+ return _mm_max_ps(a.m128, b.m128);
+#else
return make_float4(max(a.x, b.x), max(a.y, b.y), max(a.z, b.z), max(a.w, b.w));
+#endif
}
#endif
#ifndef __KERNEL_GPU__
+__device_inline float4 select(const int4& mask, const float4& a, const float4& b)
+{
+#ifdef __KERNEL_SSE__
+ /* blendv is sse4, and apparently broken on vs2008 */
+ return _mm_or_ps(_mm_and_ps(_mm_cvtepi32_ps(mask), a), _mm_andnot_ps(_mm_cvtepi32_ps(mask), b)); /* todo: avoid cvt */
+#else
+ return make_float4((mask.x)? a.x: b.x, (mask.y)? a.y: b.y, (mask.z)? a.z: b.z, (mask.w)? a.w: b.w);
+#endif
+}
+
+__device_inline float4 reduce_min(const float4& a)
+{
+#ifdef __KERNEL_SSE__
+ float4 h = min(shuffle<1,0,3,2>(a), a);
+ return min(shuffle<2,3,0,1>(h), h);
+#else
+ return make_float4(min(min(a.x, a.y), min(a.z, a.w)));
+#endif
+}
+
+__device_inline float4 reduce_max(const float4& a)
+{
+#ifdef __KERNEL_SSE__
+ float4 h = max(shuffle<1,0,3,2>(a), a);
+ return max(shuffle<2,3,0,1>(h), h);
+#else
+ return make_float4(max(max(a.x, a.y), max(a.z, a.w)));
+#endif
+}
+
+#if 0
+__device_inline float4 reduce_add(const float4& a)
+{
+#ifdef __KERNEL_SSE__
+ float4 h = shuffle<1,0,3,2>(a) + a;
+ return shuffle<2,3,0,1>(h) + h;
+#else
+ return make_float4((a.x + a.y) + (a.z + a.w));
+#endif
+}
+#endif
+
__device_inline void print_float4(const char *label, const float4& a)
{
printf("%s: %.8f %.8f %.8f %.8f\n", label, a.x, a.y, a.z, a.w);
@@ -689,22 +847,40 @@ __device_inline void print_float4(const char *label, const float4& a)
#ifndef __KERNEL_OPENCL__
+__device_inline int3 min(int3 a, int3 b)
+{
+#ifdef __KERNEL_SSE__
+ return _mm_min_epi32(a.m128, b.m128);
+#else
+ return make_int3(min(a.x, b.x), min(a.y, b.y), min(a.z, b.z));
+#endif
+}
+
__device_inline int3 max(int3 a, int3 b)
{
- int3 r = {max(a.x, b.x), max(a.y, b.y), max(a.z, b.z)};
- return r;
+#ifdef __KERNEL_SSE__
+ return _mm_max_epi32(a.m128, b.m128);
+#else
+ return make_int3(max(a.x, b.x), max(a.y, b.y), max(a.z, b.z));
+#endif
}
__device_inline int3 clamp(const int3& a, int mn, int mx)
{
- int3 r = {clamp(a.x, mn, mx), clamp(a.y, mn, mx), clamp(a.z, mn, mx)};
- return r;
+#ifdef __KERNEL_SSE__
+ return min(max(a, make_int3(mn)), make_int3(mx));
+#else
+ return make_int3(clamp(a.x, mn, mx), clamp(a.y, mn, mx), clamp(a.z, mn, mx));
+#endif
}
__device_inline int3 clamp(const int3& a, int3& mn, int mx)
{
- int3 r = {clamp(a.x, mn.x, mx), clamp(a.y, mn.y, mx), clamp(a.z, mn.z, mx)};
- return r;
+#ifdef __KERNEL_SSE__
+ return min(max(a, mn), make_int3(mx));
+#else
+ return make_int3(clamp(a.x, mn.x, mx), clamp(a.y, mn.y, mx), clamp(a.z, mn.z, mx));
+#endif
}
#endif
@@ -720,16 +896,63 @@ __device_inline void print_int3(const char *label, const int3& a)
/* Int4 */
-#ifndef __KERNEL_OPENCL__
+#ifndef __KERNEL_GPU__
-__device_inline int4 operator>=(float4 a, float4 b)
+__device_inline int4 operator+(const int4& a, const int4& b)
{
- return make_int4(a.x >= b.x, a.y >= b.y, a.z >= b.z, a.w >= b.w);
+#ifdef __KERNEL_SSE__
+ return _mm_add_epi32(a.m128, b.m128);
+#else
+ return make_int4(a.x+b.x, a.y+b.y, a.z+b.z, a.w+b.w);
+#endif
+}
+
+__device_inline int4 operator+=(int4& a, const int4& b)
+{
+ return a = a + b;
}
+__device_inline int4 operator>>(const int4& a, int i)
+{
+#ifdef __KERNEL_SSE__
+ return _mm_srai_epi32(a.m128, i);
+#else
+ return make_int4(a.x >> i, a.y >> i, a.z >> i, a.w >> i);
#endif
+}
-#ifndef __KERNEL_GPU__
+__device_inline int4 min(int4 a, int4 b)
+{
+#ifdef __KERNEL_SSE__
+ return _mm_min_epi32(a.m128, b.m128);
+#else
+ return make_int4(min(a.x, b.x), min(a.y, b.y), min(a.z, b.z), min(a.w, b.w));
+#endif
+}
+
+__device_inline int4 max(int4 a, int4 b)
+{
+#ifdef __KERNEL_SSE__
+ return _mm_max_epi32(a.m128, b.m128);
+#else
+ return make_int4(max(a.x, b.x), max(a.y, b.y), max(a.z, b.z), max(a.w, b.w));
+#endif
+}
+
+__device_inline int4 clamp(const int4& a, const int4& mn, const int4& mx)
+{
+ return min(max(a, mn), mx);
+}
+
+__device_inline int4 select(const int4& mask, const int4& a, const int4& b)
+{
+#ifdef __KERNEL_SSE__
+ __m128 m = _mm_cvtepi32_ps(mask);
+ return _mm_castps_si128(_mm_or_ps(_mm_and_ps(m, _mm_castsi128_ps(a)), _mm_andnot_ps(m, _mm_castsi128_ps(b)))); /* todo: avoid cvt */
+#else
+ return make_int4((mask.x)? a.x: b.x, (mask.y)? a.y: b.y, (mask.z)? a.z: b.z, (mask.w)? a.w: b.w);
+#endif
+}
__device_inline void print_int4(const char *label, const int4& a)
{
diff --git a/intern/cycles/util/util_progress.h b/intern/cycles/util/util_progress.h
index 2cc2995bcfe..c63aa841c52 100644
--- a/intern/cycles/util/util_progress.h
+++ b/intern/cycles/util/util_progress.h
@@ -153,8 +153,10 @@ public:
void set_update()
{
- if(update_cb)
+ if(update_cb) {
+ thread_scoped_lock lock(update_mutex);
update_cb();
+ }
}
void set_update_callback(boost::function<void(void)> function)
@@ -164,6 +166,7 @@ public:
protected:
thread_mutex progress_mutex;
+ thread_mutex update_mutex;
boost::function<void(void)> update_cb;
boost::function<void(void)> cancel_cb;
diff --git a/intern/cycles/util/util_task.cpp b/intern/cycles/util/util_task.cpp
new file mode 100644
index 00000000000..fc806275ea4
--- /dev/null
+++ b/intern/cycles/util/util_task.cpp
@@ -0,0 +1,274 @@
+/*
+ * Copyright 2011, Blender Foundation.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "util_debug.h"
+#include "util_foreach.h"
+#include "util_system.h"
+#include "util_task.h"
+
+CCL_NAMESPACE_BEGIN
+
+/* Task Pool */
+
+TaskPool::TaskPool()
+{
+ num = 0;
+ num_done = 0;
+
+ do_cancel = false;
+}
+
+TaskPool::~TaskPool()
+{
+ stop();
+}
+
+void TaskPool::push(Task *task, bool front)
+{
+ TaskScheduler::Entry entry;
+
+ entry.task = task;
+ entry.pool = this;
+
+ TaskScheduler::push(entry, front);
+}
+
+void TaskPool::push(const TaskRunFunction& run, bool front)
+{
+ push(new Task(run), front);
+}
+
+void TaskPool::wait_work()
+{
+ thread_scoped_lock done_lock(done_mutex);
+
+ while(num_done != num) {
+ thread_scoped_lock queue_lock(TaskScheduler::queue_mutex);
+
+ /* find task from this pool. if we get a task from another pool,
+ * we can get into deadlock */
+ TaskScheduler::Entry work_entry;
+ bool found_entry = false;
+ list<TaskScheduler::Entry>::iterator it;
+
+ for(it = TaskScheduler::queue.begin(); it != TaskScheduler::queue.end(); it++) {
+ TaskScheduler::Entry& entry = *it;
+
+ if(entry.pool == this) {
+ work_entry = entry;
+ found_entry = true;
+ TaskScheduler::queue.erase(it);
+ break;
+ }
+ }
+
+ queue_lock.unlock();
+
+ /* if found task, do it, otherwise wait until other tasks are done */
+ if(found_entry) {
+ done_lock.unlock();
+
+ /* run task */
+ work_entry.task->run();
+
+ /* delete task */
+ delete work_entry.task;
+
+ /* notify pool task was done */
+ done_increase(1);
+
+ done_lock.lock();
+ }
+ else
+ done_cond.wait(done_lock);
+ }
+}
+
+void TaskPool::cancel()
+{
+ TaskScheduler::clear(this);
+
+ do_cancel = true;
+ {
+ thread_scoped_lock lock(done_mutex);
+
+ while(num_done != num)
+ done_cond.wait(lock);
+ }
+ do_cancel = false;
+}
+
+void TaskPool::stop()
+{
+ TaskScheduler::clear(this);
+
+ assert(num_done == num);
+}
+
+bool TaskPool::cancelled()
+{
+ return do_cancel;
+}
+
+void TaskPool::done_increase(int done)
+{
+ done_mutex.lock();
+ num_done += done;
+ done_mutex.unlock();
+
+ assert(num_done <= num);
+ done_cond.notify_all();
+}
+
+/* Task Scheduler */
+
+thread_mutex TaskScheduler::mutex;
+int TaskScheduler::users = 0;
+vector<thread*> TaskScheduler::threads;
+vector<int> TaskScheduler::thread_level;
+volatile bool TaskScheduler::do_exit = false;
+
+list<TaskScheduler::Entry> TaskScheduler::queue;
+thread_mutex TaskScheduler::queue_mutex;
+thread_condition_variable TaskScheduler::queue_cond;
+
+void TaskScheduler::init(int num_threads)
+{
+ thread_scoped_lock lock(mutex);
+
+ /* multiple cycles instances can use this task scheduler, sharing the same
+ threads, so we keep track of the number of users. */
+ if(users == 0) {
+ do_exit = false;
+
+ /* launch threads that will be waiting for work */
+ if(num_threads == 0)
+ num_threads = system_cpu_thread_count();
+
+ threads.resize(num_threads);
+ thread_level.resize(num_threads);
+
+ for(size_t i = 0; i < threads.size(); i++) {
+ threads[i] = new thread(function_bind(&TaskScheduler::thread_run, i));
+ thread_level[i] = 0;
+ }
+ }
+
+ users++;
+}
+
+void TaskScheduler::exit()
+{
+ thread_scoped_lock lock(mutex);
+
+ users--;
+
+ if(users == 0) {
+ /* stop all waiting threads */
+ do_exit = true;
+ TaskScheduler::queue_cond.notify_all();
+
+ /* delete threads */
+ foreach(thread *t, threads) {
+ t->join();
+ delete t;
+ }
+
+ threads.clear();
+ thread_level.clear();
+ }
+}
+
+bool TaskScheduler::thread_wait_pop(Entry& entry)
+{
+ thread_scoped_lock lock(queue_mutex);
+
+ while(queue.empty() && !do_exit)
+ queue_cond.wait(lock);
+
+ if(queue.empty()) {
+ assert(do_exit);
+ return false;
+ }
+
+ entry = queue.front();
+ queue.pop_front();
+
+ return true;
+}
+
+void TaskScheduler::thread_run(int thread_id)
+{
+ Entry entry;
+
+ /* todo: test affinity/denormal mask */
+
+ /* keep popping off tasks */
+ while(thread_wait_pop(entry)) {
+ /* run task */
+ entry.task->run();
+
+ /* delete task */
+ delete entry.task;
+
+ /* notify pool task was done */
+ entry.pool->done_increase(1);
+ }
+}
+
+void TaskScheduler::push(Entry& entry, bool front)
+{
+ /* add entry to queue */
+ TaskScheduler::queue_mutex.lock();
+ if(front)
+ TaskScheduler::queue.push_front(entry);
+ else
+ TaskScheduler::queue.push_back(entry);
+ entry.pool->num++;
+ TaskScheduler::queue_mutex.unlock();
+
+ TaskScheduler::queue_cond.notify_one();
+}
+
+void TaskScheduler::clear(TaskPool *pool)
+{
+ thread_scoped_lock lock(queue_mutex);
+
+ /* erase all tasks from this pool from the queue */
+ list<Entry>::iterator it = queue.begin();
+ int done = 0;
+
+ while(it != queue.end()) {
+ Entry& entry = *it;
+
+ if(entry.pool == pool) {
+ done++;
+ delete entry.task;
+
+ it = queue.erase(it);
+ }
+ else
+ it++;
+ }
+
+ /* notify done */
+ pool->done_increase(done);
+}
+
+CCL_NAMESPACE_END
+
diff --git a/intern/cycles/util/util_task.h b/intern/cycles/util/util_task.h
new file mode 100644
index 00000000000..6b7562c2267
--- /dev/null
+++ b/intern/cycles/util/util_task.h
@@ -0,0 +1,126 @@
+/*
+ * Copyright 2011, Blender Foundation.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __UTIL_TASK_H__
+#define __UTIL_TASK_H__
+
+#include "util_list.h"
+#include "util_thread.h"
+#include "util_vector.h"
+
+CCL_NAMESPACE_BEGIN
+
+class Task;
+class TaskPool;
+class TaskScheduler;
+
+typedef boost::function<void(void)> TaskRunFunction;
+
+/* Task
+ *
+ * Base class for tasks to be executed in threads. */
+
+class Task
+{
+public:
+ Task() {};
+ Task(const TaskRunFunction& run_) : run(run_) {}
+
+ virtual ~Task() {}
+
+ TaskRunFunction run;
+};
+
+/* Task Pool
+ *
+ * Pool of tasks that will be executed by the central TaskScheduler.For each
+ * pool, we can wait for all tasks to be done, or cancel them before they are
+ * done.
+ *
+ * The run callback that actually executes the task may be create like this:
+ * function_bind(&MyClass::task_execute, this, _1, _2) */
+
+class TaskPool
+{
+public:
+ TaskPool();
+ ~TaskPool();
+
+ void push(Task *task, bool front = false);
+ void push(const TaskRunFunction& run, bool front = false);
+
+ void wait_work(); /* work and wait until all tasks are done */
+ void cancel(); /* cancel all tasks, keep worker threads running */
+ void stop(); /* stop all worker threads */
+
+ bool cancelled(); /* for worker threads, test if cancelled */
+
+protected:
+ friend class TaskScheduler;
+
+ void done_increase(int done);
+
+ thread_mutex done_mutex;
+ thread_condition_variable done_cond;
+
+ volatile int num, num_done;
+ volatile bool do_cancel;
+};
+
+/* Task Scheduler
+ *
+ * Central scheduler that holds running threads ready to execute tasks. A singe
+ * queue holds the task from all pools. */
+
+class TaskScheduler
+{
+public:
+ static void init(int num_threads = 0);
+ static void exit();
+
+ static int num_threads() { return threads.size(); }
+
+protected:
+ friend class TaskPool;
+
+ struct Entry {
+ Task *task;
+ TaskPool *pool;
+ };
+
+ static thread_mutex mutex;
+ static int users;
+ static vector<thread*> threads;
+ static vector<int> thread_level;
+ static volatile bool do_exit;
+
+ static list<Entry> queue;
+ static thread_mutex queue_mutex;
+ static thread_condition_variable queue_cond;
+
+ static void thread_run(int thread_id);
+ static bool thread_wait_pop(Entry& entry);
+
+ static void push(Entry& entry, bool front);
+ static void clear(TaskPool *pool);
+};
+
+CCL_NAMESPACE_END
+
+#endif
+
diff --git a/intern/cycles/util/util_thread.h b/intern/cycles/util/util_thread.h
index 6836be203f5..3d15b342fe5 100644
--- a/intern/cycles/util/util_thread.h
+++ b/intern/cycles/util/util_thread.h
@@ -69,133 +69,6 @@ protected:
bool joined;
};
-/* Thread Safe Queue to pass tasks from one thread to another. Tasks should be
- * pushed into the queue, while the worker thread waits to pop the next task
- * off the queue. Once all tasks are into the queue, calling stop() will stop
- * the worker threads from waiting for more tasks once all tasks are done. */
-
-template<typename T> class ThreadQueue
-{
-public:
- ThreadQueue()
- {
- tot = 0;
- tot_done = 0;
- do_stop = false;
- do_cancel = false;
- }
-
- /* Main thread functions */
-
- /* push a task to be executed */
- void push(const T& value)
- {
- thread_scoped_lock lock(queue_mutex);
- queue.push(value);
- tot++;
- lock.unlock();
-
- queue_cond.notify_one();
- }
-
- /* wait until all tasks are done */
- void wait_done()
- {
- thread_scoped_lock lock(done_mutex);
-
- while(tot_done != tot)
- done_cond.wait(lock);
- }
-
- /* stop all worker threads */
- void stop()
- {
- clear();
- do_stop = true;
- queue_cond.notify_all();
- }
-
- /* cancel all tasks, but keep worker threads running */
- void cancel()
- {
- clear();
- do_cancel = true;
- wait_done();
- do_cancel = false;
- }
-
- /* Worker thread functions
- *
- * while(queue.worker_wait_pop(task)) {
- * for(..) {
- * ... do work ...
- *
- * if(queue.worker_cancel())
- * break;
- * }
- *
- * queue.worker_done();
- * }
- */
-
- bool worker_wait_pop(T& value)
- {
- thread_scoped_lock lock(queue_mutex);
-
- while(queue.empty() && !do_stop)
- queue_cond.wait(lock);
-
- if(queue.empty())
- return false;
-
- value = queue.front();
- queue.pop();
-
- return true;
- }
-
- void worker_done()
- {
- thread_scoped_lock lock(done_mutex);
- tot_done++;
- lock.unlock();
-
- assert(tot_done <= tot);
-
- done_cond.notify_all();
- }
-
- bool worker_cancel()
- {
- return do_cancel;
- }
-
-protected:
- void clear()
- {
- thread_scoped_lock lock(queue_mutex);
-
- while(!queue.empty()) {
- thread_scoped_lock done_lock(done_mutex);
- tot_done++;
- done_lock.unlock();
-
- queue.pop();
- }
-
- done_cond.notify_all();
- }
-
- std::queue<T> queue;
- thread_mutex queue_mutex;
- thread_mutex done_mutex;
- thread_condition_variable queue_cond;
- thread_condition_variable done_cond;
- volatile bool do_stop;
- volatile bool do_cancel;
- volatile int tot, tot_done;
-};
-
/* Thread Local Storage
*
* Boost implementation is a bit slow, and Mac OS X __thread is not supported
diff --git a/intern/cycles/util/util_transform.cpp b/intern/cycles/util/util_transform.cpp
index 61bc36ae888..1780994da27 100644
--- a/intern/cycles/util/util_transform.cpp
+++ b/intern/cycles/util/util_transform.cpp
@@ -53,6 +53,8 @@
CCL_NAMESPACE_BEGIN
+/* Transform Inverse */
+
static bool transform_matrix4_gj_inverse(float R[][4], float M[][4])
{
/* forward elimination */
@@ -129,23 +131,125 @@ static bool transform_matrix4_gj_inverse(float R[][4], float M[][4])
Transform transform_inverse(const Transform& tfm)
{
- union { Transform T; float M[4][4]; } R, M;
-
- R.T = transform_identity();
- M.T = tfm;
+ Transform tfmR = transform_identity();
+ float M[4][4], R[4][4];
+
+ memcpy(R, &tfmR, sizeof(R));
+ memcpy(M, &tfm, sizeof(M));
- if(!transform_matrix4_gj_inverse(R.M, M.M)) {
+ if(!transform_matrix4_gj_inverse(R, M)) {
/* matrix is degenerate (e.g. 0 scale on some axis), ideally we should
never be in this situation, but try to invert it anyway with tweak */
- M.M[0][0] += 1e-8f;
- M.M[1][1] += 1e-8f;
- M.M[2][2] += 1e-8f;
+ M[0][0] += 1e-8f;
+ M[1][1] += 1e-8f;
+ M[2][2] += 1e-8f;
- if(!transform_matrix4_gj_inverse(R.M, M.M))
+ if(!transform_matrix4_gj_inverse(R, M))
return transform_identity();
}
- return R.T;
+ memcpy(&tfmR, R, sizeof(R));
+
+ return tfmR;
+}
+
+/* Motion Transform */
+
+static float4 transform_to_quat(const Transform& tfm)
+{
+ double trace = tfm[0][0] + tfm[1][1] + tfm[2][2];
+ float4 qt;
+
+ if(trace > 0.0f) {
+ double s = sqrt(trace + 1.0);
+
+ qt.w = (float)(s/2.0);
+ s = 0.5/s;
+
+ qt.x = (float)((tfm[2][1] - tfm[1][2]) * s);
+ qt.y = (float)((tfm[0][2] - tfm[2][0]) * s);
+ qt.z = (float)((tfm[1][0] - tfm[0][1]) * s);
+ }
+ else {
+ int i = 0;
+
+ if(tfm[1][1] > tfm[i][i])
+ i = 1;
+ if(tfm[2][2] > tfm[i][i])
+ i = 2;
+
+ int j = (i + 1)%3;
+ int k = (j + 1)%3;
+
+ double s = sqrt((tfm[i][i] - (tfm[j][j] + tfm[k][k])) + 1.0);
+
+ double q[3];
+ q[i] = s * 0.5;
+ if(s != 0.0)
+ s = 0.5/s;
+
+ double w = (tfm[k][j] - tfm[j][k]) * s;
+ q[j] = (tfm[j][i] + tfm[i][j]) * s;
+ q[k] = (tfm[k][i] + tfm[i][k]) * s;
+
+ qt.x = (float)q[0];
+ qt.y = (float)q[1];
+ qt.z = (float)q[2];
+ qt.w = (float)w;
+ }
+
+ return qt;
+}
+
+static void transform_decompose(Transform *decomp, const Transform *tfm)
+{
+ /* extract translation */
+ decomp->y = make_float4(tfm->x.w, tfm->y.w, tfm->z.w, 0.0f);
+
+ /* extract rotation */
+ Transform M = *tfm;
+ M.x.w = 0.0f; M.y.w = 0.0f; M.z.w = 0.0f; M.w.w = 1.0f;
+
+ Transform R = M;
+ float norm;
+ int iteration = 0;
+
+ do {
+ Transform Rnext;
+ Transform Rit = transform_inverse(transform_transpose(R));
+
+ for(int i = 0; i < 4; i++)
+ for(int j = 0; j < 4; j++)
+ Rnext[i][j] = 0.5f * (R[i][j] + Rit[i][j]);
+
+ norm = 0.0f;
+ for(int i = 0; i < 3; i++) {
+ norm = max(norm,
+ fabsf(R[i][0] - Rnext[i][0]) +
+ fabsf(R[i][1] - Rnext[i][1]) +
+ fabsf(R[i][2] - Rnext[i][2]));
+ }
+
+ R = Rnext;
+ iteration++;
+ } while(iteration < 100 && norm > 1e-4f);
+
+ if(transform_negative_scale(R))
+ R = R * transform_scale(-1.0f, -1.0f, -1.0f); /* todo: test scale */
+
+ decomp->x = transform_to_quat(R);
+
+ /* extract scale and pack it */
+ Transform scale = transform_inverse(R) * M;
+ decomp->y.w = scale.x.x;
+ decomp->z = make_float4(scale.x.y, scale.x.z, scale.y.x, scale.y.y);
+ decomp->w = make_float4(scale.y.z, scale.z.x, scale.z.y, scale.z.z);
+}
+
+void transform_motion_decompose(MotionTransform *decomp, const MotionTransform *motion)
+{
+ transform_decompose(&decomp->pre, &motion->pre);
+ transform_decompose(&decomp->post, &motion->post);
}
CCL_NAMESPACE_END
diff --git a/intern/cycles/util/util_transform.h b/intern/cycles/util/util_transform.h
index aeaef7b0e21..e4897ee6787 100644
--- a/intern/cycles/util/util_transform.h
+++ b/intern/cycles/util/util_transform.h
@@ -28,6 +28,8 @@
CCL_NAMESPACE_BEGIN
+/* Data Types */
+
typedef struct Transform {
float4 x, y, z, w; /* rows */
@@ -37,6 +39,17 @@ typedef struct Transform {
#endif
} Transform;
+typedef struct MotionTransform {
+ Transform pre;
+ Transform post;
+} MotionTransform;
+
+/* transform decomposed in rotation/translation/scale. we use the same data
+ * structure as Transform, and tightly pack decomposition into it. first the
+ * rotation (4), then translation (3), then 3x3 scale matrix (9) */
+
+/* Functions */
+
__device_inline float3 transform_perspective(const Transform *t, const float3 a)
{
float4 b = make_float4(a.x, a.y, a.z, 1.0f);
@@ -62,6 +75,15 @@ __device_inline float3 transform_direction(const Transform *t, const float3 a)
return c;
}
+__device_inline float3 transform_direction_transposed(const Transform *t, const float3 a)
+{
+ float3 x = make_float3(t->x.x, t->y.x, t->z.x);
+ float3 y = make_float3(t->x.y, t->y.y, t->z.y);
+ float3 z = make_float3(t->x.z, t->y.z, t->z.z);
+
+ return make_float3(dot(x, a), dot(y, a), dot(z, a));
+}
+
#ifndef __KERNEL_GPU__
__device_inline void print_transform(const char *label, const Transform& t)
@@ -231,15 +253,15 @@ __device_inline bool transform_uniform_scale(const Transform& tfm, float& scale)
/* the epsilon here is quite arbitrary, but this function is only used for
surface area and bump, where we except it to not be so sensitive */
Transform ttfm = transform_transpose(tfm);
- float eps = 1e-7f;
-
- float sx = len(float4_to_float3(tfm.x));
- float sy = len(float4_to_float3(tfm.y));
- float sz = len(float4_to_float3(tfm.z));
- float stx = len(float4_to_float3(ttfm.x));
- float sty = len(float4_to_float3(ttfm.y));
- float stz = len(float4_to_float3(ttfm.z));
+ float eps = 1e-6f;
+ float sx = len_squared(float4_to_float3(tfm.x));
+ float sy = len_squared(float4_to_float3(tfm.y));
+ float sz = len_squared(float4_to_float3(tfm.z));
+ float stx = len_squared(float4_to_float3(ttfm.x));
+ float sty = len_squared(float4_to_float3(ttfm.y));
+ float stz = len_squared(float4_to_float3(ttfm.z));
+
if(fabsf(sx - sy) < eps && fabsf(sx - sz) < eps &&
fabsf(sx - stx) < eps && fabsf(sx - sty) < eps &&
fabsf(sx - stz) < eps) {
@@ -272,6 +294,102 @@ __device_inline Transform transform_clear_scale(const Transform& tfm)
#endif
+/* Motion Transform */
+
+__device_inline float4 quat_interpolate(float4 q1, float4 q2, float t)
+{
+ float costheta = dot(q1, q2);
+
+ if(costheta > 0.9995f) {
+ return normalize((1.0f - t)*q1 + t*q2);
+ }
+ else {
+ float theta = acosf(clamp(costheta, -1.0f, 1.0f));
+ float thetap = theta * t;
+ float4 qperp = normalize(q2 - q1 * costheta);
+ return q1 * cosf(thetap) + qperp * sinf(thetap);
+ }
+}
+
+__device_inline Transform transform_quick_inverse(Transform M)
+{
+ Transform R;
+ float det = M.x.x*(M.z.z*M.y.y - M.z.y*M.y.z) - M.y.x*(M.z.z*M.x.y - M.z.y*M.x.z) + M.z.x*(M.y.z*M.x.y - M.y.y*M.x.z);
+
+ det = (det != 0.0f)? 1.0f/det: 0.0f;
+
+ float3 Rx = det*make_float3(M.z.z*M.y.y - M.z.y*M.y.z, M.z.y*M.x.z - M.z.z*M.x.y, M.y.z*M.x.y - M.y.y*M.x.z);
+ float3 Ry = det*make_float3(M.z.x*M.y.z - M.z.z*M.y.x, M.z.z*M.x.x - M.z.x*M.x.z, M.y.x*M.x.z - M.y.z*M.x.x);
+ float3 Rz = det*make_float3(M.z.y*M.y.x - M.z.x*M.y.y, M.z.x*M.x.y - M.z.y*M.x.x, M.y.y*M.x.x - M.y.x*M.x.y);
+ float3 T = -make_float3(M.x.w, M.y.w, M.z.w);
+
+ R.x = make_float4(Rx.x, Rx.y, Rx.z, dot(Rx, T));
+ R.y = make_float4(Ry.x, Ry.y, Ry.z, dot(Ry, T));
+ R.z = make_float4(Rz.x, Rz.y, Rz.z, dot(Rz, T));
+ R.w = make_float4(0.0f, 0.0f, 0.0f, 1.0f);
+
+ return R;
+}
+
+__device_inline void transform_compose(Transform *tfm, const Transform *decomp)
+{
+ /* rotation */
+ float q0, q1, q2, q3, qda, qdb, qdc, qaa, qab, qac, qbb, qbc, qcc;
+
+ q0 = M_SQRT2_F * decomp->x.w;
+ q1 = M_SQRT2_F * decomp->x.x;
+ q2 = M_SQRT2_F * decomp->x.y;
+ q3 = M_SQRT2_F * decomp->x.z;
+
+ qda = q0*q1;
+ qdb = q0*q2;
+ qdc = q0*q3;
+ qaa = q1*q1;
+ qab = q1*q2;
+ qac = q1*q3;
+ qbb = q2*q2;
+ qbc = q2*q3;
+ qcc = q3*q3;
+
+ float3 rotation_x = make_float3(1.0f-qbb-qcc, -qdc+qab, qdb+qac);
+ float3 rotation_y = make_float3(qdc+qab, 1.0f-qaa-qcc, -qda+qbc);
+ float3 rotation_z = make_float3(-qdb+qac, qda+qbc, 1.0f-qaa-qbb);
+
+ /* scale */
+ float3 scale_x = make_float3(decomp->y.w, decomp->z.z, decomp->w.y);
+ float3 scale_y = make_float3(decomp->z.x, decomp->z.w, decomp->w.z);
+ float3 scale_z = make_float3(decomp->z.y, decomp->w.x, decomp->w.w);
+
+ /* compose with translation */
+ tfm->x = make_float4(dot(rotation_x, scale_x), dot(rotation_x, scale_y), dot(rotation_x, scale_z), decomp->y.x);
+ tfm->y = make_float4(dot(rotation_y, scale_x), dot(rotation_y, scale_y), dot(rotation_y, scale_z), decomp->y.y);
+ tfm->z = make_float4(dot(rotation_z, scale_x), dot(rotation_z, scale_y), dot(rotation_z, scale_z), decomp->y.z);
+ tfm->w = make_float4(0.0f, 0.0f, 0.0f, 1.0f);
+}
+
+__device void transform_motion_interpolate(Transform *tfm, const MotionTransform *motion, float t)
+{
+ Transform decomp;
+
+ decomp.x = quat_interpolate(motion->pre.x, motion->post.x, t);
+ decomp.y = (1.0f - t)*motion->pre.y + t*motion->post.y;
+ decomp.z = (1.0f - t)*motion->pre.z + t*motion->post.z;
+ decomp.w = (1.0f - t)*motion->pre.w + t*motion->post.w;
+
+ transform_compose(tfm, &decomp);
+}
+
+#ifndef __KERNEL_GPU__
+
+__device_inline bool operator==(const MotionTransform& A, const MotionTransform& B)
+{
+ return (A.pre == B.pre && A.post == B.post);
+}
+
+void transform_motion_decompose(MotionTransform *decomp, const MotionTransform *motion);
+
+#endif
+
CCL_NAMESPACE_END
#endif /* __UTIL_TRANSFORM_H__ */
diff --git a/intern/cycles/util/util_types.h b/intern/cycles/util/util_types.h
index efdda98571a..0451d877c45 100644
--- a/intern/cycles/util/util_types.h
+++ b/intern/cycles/util/util_types.h
@@ -36,23 +36,37 @@
#define __shared
#define __constant
-#ifdef __GNUC__
-#define __device_inline static inline __attribute__((always_inline))
-#else
+#if defined(_WIN32) && !defined(FREE_WINDOWS)
#define __device_inline static __forceinline
+#define __align(...) __declspec(align(__VA_ARGS__))
+#else
+#define __device_inline static inline __attribute__((always_inline))
+#define __forceinline inline __attribute__((always_inline))
+#define __align(...) __attribute__((aligned(__VA_ARGS__)))
+#endif
+
#endif
+/* Bitness */
+
+#if defined(__ppc64__) || defined(__PPC64__) || defined(__x86_64__) || defined(__ia64__) || defined(_M_X64)
+#define __KERNEL_64_BIT__
#endif
/* SIMD Types */
-/* not needed yet, will be for qbvh
-#ifndef __KERNEL_GPU__
+/* not enabled, globally applying it just gives slowdown,
+ * but useful for testing. */
+//#define __KERNEL_SSE__
+#ifdef __KERNEL_SSE__
-#include <emmintrin.h>
-#include <xmmintrin.h>
+#include <xmmintrin.h> /* SSE 1 */
+#include <emmintrin.h> /* SSE 2 */
+#include <pmmintrin.h> /* SSE 3 */
+#include <tmmintrin.h> /* SSE 3 */
+#include <smmintrin.h> /* SSE 4 */
-#endif*/
+#endif
#ifndef _WIN32
#ifndef __KERNEL_GPU__
@@ -97,6 +111,12 @@ typedef unsigned int uint32_t;
typedef long long int64_t;
typedef unsigned long long uint64_t;
+#ifdef __KERNEL_64_BIT__
+typedef int64_t ssize_t;
+#else
+typedef int32_t ssize_t;
+#endif
+
#endif
/* Generic Memory Pointer */
@@ -108,89 +128,137 @@ typedef uint64_t device_ptr;
struct uchar2 {
uchar x, y;
- uchar operator[](int i) const { return *(&x + i); }
- uchar& operator[](int i) { return *(&x + i); }
+ __forceinline uchar operator[](int i) const { return *(&x + i); }
+ __forceinline uchar& operator[](int i) { return *(&x + i); }
};
struct uchar3 {
uchar x, y, z;
- uchar operator[](int i) const { return *(&x + i); }
- uchar& operator[](int i) { return *(&x + i); }
+ __forceinline uchar operator[](int i) const { return *(&x + i); }
+ __forceinline uchar& operator[](int i) { return *(&x + i); }
};
struct uchar4 {
uchar x, y, z, w;
- uchar operator[](int i) const { return *(&x + i); }
- uchar& operator[](int i) { return *(&x + i); }
+ __forceinline uchar operator[](int i) const { return *(&x + i); }
+ __forceinline uchar& operator[](int i) { return *(&x + i); }
};
struct int2 {
int x, y;
- int operator[](int i) const { return *(&x + i); }
- int& operator[](int i) { return *(&x + i); }
+ __forceinline int operator[](int i) const { return *(&x + i); }
+ __forceinline int& operator[](int i) { return *(&x + i); }
};
+#ifdef __KERNEL_SSE__
+struct __align(16) int3 {
+ union {
+ __m128i m128;
+ struct { int x, y, z, w; };
+ };
+
+ __forceinline int3() {}
+ __forceinline int3(const __m128i a) : m128(a) {}
+ __forceinline operator const __m128i&(void) const { return m128; }
+ __forceinline operator __m128i&(void) { return m128; }
+#else
struct int3 {
- int x, y, z;
+ int x, y, z, w;
+#endif
- int operator[](int i) const { return *(&x + i); }
- int& operator[](int i) { return *(&x + i); }
+ __forceinline int operator[](int i) const { return *(&x + i); }
+ __forceinline int& operator[](int i) { return *(&x + i); }
};
+#ifdef __KERNEL_SSE__
+struct __align(16) int4 {
+ union {
+ __m128i m128;
+ struct { int x, y, z, w; };
+ };
+
+ __forceinline int4() {}
+ __forceinline int4(const __m128i a) : m128(a) {}
+ __forceinline operator const __m128i&(void) const { return m128; }
+ __forceinline operator __m128i&(void) { return m128; }
+#else
struct int4 {
int x, y, z, w;
+#endif
- int operator[](int i) const { return *(&x + i); }
- int& operator[](int i) { return *(&x + i); }
+ __forceinline int operator[](int i) const { return *(&x + i); }
+ __forceinline int& operator[](int i) { return *(&x + i); }
};
struct uint2 {
uint x, y;
- uint operator[](int i) const { return *(&x + i); }
- uint& operator[](int i) { return *(&x + i); }
+ __forceinline uint operator[](uint i) const { return *(&x + i); }
+ __forceinline uint& operator[](uint i) { return *(&x + i); }
};
struct uint3 {
uint x, y, z;
- uint operator[](int i) const { return *(&x + i); }
- uint& operator[](int i) { return *(&x + i); }
+ __forceinline uint operator[](uint i) const { return *(&x + i); }
+ __forceinline uint& operator[](uint i) { return *(&x + i); }
};
struct uint4 {
uint x, y, z, w;
- uint operator[](int i) const { return *(&x + i); }
- uint& operator[](int i) { return *(&x + i); }
+ __forceinline uint operator[](uint i) const { return *(&x + i); }
+ __forceinline uint& operator[](uint i) { return *(&x + i); }
};
struct float2 {
float x, y;
- float operator[](int i) const { return *(&x + i); }
- float& operator[](int i) { return *(&x + i); }
+ __forceinline float operator[](int i) const { return *(&x + i); }
+ __forceinline float& operator[](int i) { return *(&x + i); }
};
+#ifdef __KERNEL_SSE__
+struct __align(16) float3 {
+ union {
+ __m128 m128;
+ struct { float x, y, z, w; };
+ };
+
+ __forceinline float3() {}
+ __forceinline float3(const __m128 a) : m128(a) {}
+ __forceinline operator const __m128&(void) const { return m128; }
+ __forceinline operator __m128&(void) { return m128; }
+#else
struct float3 {
- float x, y, z;
-
-#ifdef WITH_OPENCL
- float w;
+ float x, y, z, w;
#endif
- float operator[](int i) const { return *(&x + i); }
- float& operator[](int i) { return *(&x + i); }
+ __forceinline float operator[](int i) const { return *(&x + i); }
+ __forceinline float& operator[](int i) { return *(&x + i); }
};
+#ifdef __KERNEL_SSE__
+struct __align(16) float4 {
+ union {
+ __m128 m128;
+ struct { float x, y, z, w; };
+ };
+
+ __forceinline float4() {}
+ __forceinline float4(const __m128 a) : m128(a) {}
+ __forceinline operator const __m128&(void) const { return m128; }
+ __forceinline operator __m128&(void) { return m128; }
+#else
struct float4 {
float x, y, z, w;
+#endif
- float operator[](int i) const { return *(&x + i); }
- float& operator[](int i) { return *(&x + i); }
+ __forceinline float operator[](int i) const { return *(&x + i); }
+ __forceinline float& operator[](int i) { return *(&x + i); }
};
#endif
@@ -201,87 +269,179 @@ struct float4 {
*
* OpenCL does not support C++ class, so we use these instead. */
-__device uchar2 make_uchar2(uchar x, uchar y)
+__device_inline uchar2 make_uchar2(uchar x, uchar y)
{
uchar2 a = {x, y};
return a;
}
-__device uchar3 make_uchar3(uchar x, uchar y, uchar z)
+__device_inline uchar3 make_uchar3(uchar x, uchar y, uchar z)
{
uchar3 a = {x, y, z};
return a;
}
-__device uchar4 make_uchar4(uchar x, uchar y, uchar z, uchar w)
+__device_inline uchar4 make_uchar4(uchar x, uchar y, uchar z, uchar w)
{
uchar4 a = {x, y, z, w};
return a;
}
-__device int2 make_int2(int x, int y)
+__device_inline int2 make_int2(int x, int y)
{
int2 a = {x, y};
return a;
}
-__device int3 make_int3(int x, int y, int z)
+__device_inline int3 make_int3(int x, int y, int z)
{
- int3 a = {x, y, z};
+#ifdef __KERNEL_SSE__
+ int3 a;
+ a.m128 = _mm_set_epi32(0, z, y, x);
+#else
+ int3 a = {x, y, z, 0};
+#endif
+
return a;
}
-__device int4 make_int4(int x, int y, int z, int w)
+__device_inline int4 make_int4(int x, int y, int z, int w)
{
+#ifdef __KERNEL_SSE__
+ int4 a;
+ a.m128 = _mm_set_epi32(w, z, y, x);
+#else
int4 a = {x, y, z, w};
+#endif
+
return a;
}
-__device uint2 make_uint2(uint x, uint y)
+__device_inline uint2 make_uint2(uint x, uint y)
{
uint2 a = {x, y};
return a;
}
-__device uint3 make_uint3(uint x, uint y, uint z)
+__device_inline uint3 make_uint3(uint x, uint y, uint z)
{
uint3 a = {x, y, z};
return a;
}
-__device uint4 make_uint4(uint x, uint y, uint z, uint w)
+__device_inline uint4 make_uint4(uint x, uint y, uint z, uint w)
{
uint4 a = {x, y, z, w};
return a;
}
-__device float2 make_float2(float x, float y)
+__device_inline float2 make_float2(float x, float y)
{
float2 a = {x, y};
return a;
}
-__device float3 make_float3(float x, float y, float z)
+__device_inline float3 make_float3(float x, float y, float z)
{
-#ifdef WITH_OPENCL
- float3 a = {x, y, z, 0.0f};
+#ifdef __KERNEL_SSE__
+ float3 a;
+ a.m128 = _mm_set_ps(0.0f, z, y, x);
#else
- float3 a = {x, y, z};
+ float3 a = {x, y, z, 0.0f};
#endif
+
return a;
}
-__device float4 make_float4(float x, float y, float z, float w)
+__device_inline float4 make_float4(float x, float y, float z, float w)
{
+#ifdef __KERNEL_SSE__
+ float4 a;
+ a.m128 = _mm_set_ps(w, z, y, x);
+#else
float4 a = {x, y, z, w};
+#endif
+
return a;
}
-__device int align_up(int offset, int alignment)
+__device_inline int align_up(int offset, int alignment)
{
return (offset + alignment - 1) & ~(alignment - 1);
}
+__device_inline int3 make_int3(int i)
+{
+#ifdef __KERNEL_SSE__
+ int3 a;
+ a.m128 = _mm_set1_epi32(i);
+#else
+ int3 a = {i, i, i, i};
+#endif
+
+ return a;
+}
+
+__device_inline int4 make_int4(int i)
+{
+#ifdef __KERNEL_SSE__
+ int4 a;
+ a.m128 = _mm_set1_epi32(i);
+#else
+ int4 a = {i, i, i, i};
+#endif
+
+ return a;
+}
+
+__device_inline float3 make_float3(float f)
+{
+#ifdef __KERNEL_SSE__
+ float3 a;
+ a.m128 = _mm_set1_ps(f);
+#else
+ float3 a = {f, f, f, f};
+#endif
+
+ return a;
+}
+
+__device_inline float4 make_float4(float f)
+{
+#ifdef __KERNEL_SSE__
+ float4 a;
+ a.m128 = _mm_set1_ps(f);
+#else
+ float4 a = {f, f, f, f};
+#endif
+
+ return a;
+}
+
+__device_inline float4 make_float4(const int4& i)
+{
+#ifdef __KERNEL_SSE__
+ float4 a;
+ a.m128 = _mm_cvtepi32_ps(i.m128);
+#else
+ float4 a = {(float)i.x, (float)i.y, (float)i.z, (float)i.w};
+#endif
+
+ return a;
+}
+
+__device_inline int4 make_int4(const float3& f)
+{
+#ifdef __KERNEL_SSE__
+ int4 a;
+ a.m128 = _mm_cvtps_epi32(f.m128);
+#else
+ int4 a = {(int)f.x, (int)f.y, (int)f.z, (int)f.w};
+#endif
+
+ return a;
+}
+
#endif
CCL_NAMESPACE_END
diff --git a/intern/dualcon/dualcon.h b/intern/dualcon/dualcon.h
index 53135a7dcc1..1c3d31b6625 100644
--- a/intern/dualcon/dualcon.h
+++ b/intern/dualcon/dualcon.h
@@ -24,7 +24,7 @@
#define __DUALCON_H__
#ifdef __cplusplus
-extern "C" {
+extern "C" {
#endif
typedef float (*DualConCo)[3];
@@ -35,11 +35,11 @@ typedef struct DualConInput {
DualConCo co;
int co_stride;
int totco;
-
+
DualConFaces faces;
int face_stride;
int totface;
-
+
float min[3], max[3];
} DualConInput;
@@ -64,32 +64,32 @@ typedef enum {
} DualConMode;
/* Usage:
-
- The three callback arguments are used for creating the output
- mesh. The alloc_output callback takes the total number of vertices
- and faces (quads) that will be in the output. It should allocate
- and return a structure to hold the output mesh. The add_vert and
- add_quad callbacks will then be called for each new vertex and
- quad, and the callback should add the new mesh elements to the
- structure.
-*/
+ *
+ * The three callback arguments are used for creating the output
+ * mesh. The alloc_output callback takes the total number of vertices
+ * and faces (quads) that will be in the output. It should allocate
+ * and return a structure to hold the output mesh. The add_vert and
+ * add_quad callbacks will then be called for each new vertex and
+ * quad, and the callback should add the new mesh elements to the
+ * structure.
+ */
void *dualcon(const DualConInput *input_mesh,
- /* callbacks for output */
- DualConAllocOutput alloc_output,
- DualConAddVert add_vert,
- DualConAddQuad add_quad,
+ /* callbacks for output */
+ DualConAllocOutput alloc_output,
+ DualConAddVert add_vert,
+ DualConAddQuad add_quad,
- /* flags and settings to control the remeshing
- algorithm */
- DualConFlags flags,
- DualConMode mode,
- float threshold,
- float hermite_num,
- float scale,
- int depth);
+ /* flags and settings to control the remeshing
+ * algorithm */
+ DualConFlags flags,
+ DualConMode mode,
+ float threshold,
+ float hermite_num,
+ float scale,
+ int depth);
#ifdef __cplusplus
-}
+}
#endif
#endif /* __DUALCON_H__ */
diff --git a/intern/dualcon/intern/GeoCommon.h b/intern/dualcon/intern/GeoCommon.h
index 3b2789bec87..9f5a99e9e20 100644
--- a/intern/dualcon/intern/GeoCommon.h
+++ b/intern/dualcon/intern/GeoCommon.h
@@ -36,31 +36,26 @@
// 3d point with integer coordinates
-typedef struct
-{
+typedef struct {
int x, y, z;
} Point3i;
-typedef struct
-{
+typedef struct {
Point3i begin;
Point3i end;
} BoundingBox;
// triangle that points to three vertices
-typedef struct
-{
- float vt[3][3] ;
+typedef struct {
+ float vt[3][3];
} Triangle;
// 3d point with float coordinates
-typedef struct
-{
+typedef struct {
float x, y, z;
} Point3f;
-typedef struct
-{
+typedef struct {
Point3f begin;
Point3f end;
} BoundingBoxf;
diff --git a/intern/dualcon/intern/MemoryAllocator.h b/intern/dualcon/intern/MemoryAllocator.h
index a1be0978409..b704542d27b 100644
--- a/intern/dualcon/intern/MemoryAllocator.h
+++ b/intern/dualcon/intern/MemoryAllocator.h
@@ -43,19 +43,19 @@
class VirtualMemoryAllocator
{
public:
- virtual void * allocate( ) = 0 ;
- virtual void deallocate( void * obj ) = 0 ;
- virtual void destroy( ) = 0 ;
- virtual void printInfo( ) = 0 ;
-
- virtual int getAllocated( ) = 0 ;
- virtual int getAll( ) = 0 ;
- virtual int getBytes( ) = 0 ;
+virtual void *allocate( ) = 0;
+virtual void deallocate(void *obj) = 0;
+virtual void destroy( ) = 0;
+virtual void printInfo( ) = 0;
+
+virtual int getAllocated( ) = 0;
+virtual int getAll( ) = 0;
+virtual int getBytes( ) = 0;
};
/**
* Dynamic memory allocator - allows allocation/deallocation
- *
+ *
* Note: there are 4 bytes overhead for each allocated yet unused object.
*/
template < int N >
@@ -63,157 +63,157 @@ class MemoryAllocator : public VirtualMemoryAllocator
{
private:
- /// Constants
- int HEAP_UNIT, HEAP_MASK ;
+/// Constants
+int HEAP_UNIT, HEAP_MASK;
- /// Data array
- UCHAR ** data ;
+/// Data array
+UCHAR **data;
- /// Allocation stack
- UCHAR *** stack ;
+/// Allocation stack
+UCHAR ***stack;
- /// Number of data blocks
- int datablocknum ;
+/// Number of data blocks
+int datablocknum;
- /// Number of stack blocks
- int stackblocknum ;
+/// Number of stack blocks
+int stackblocknum;
- /// Size of stack
- int stacksize ;
+/// Size of stack
+int stacksize;
- /// Number of available objects on stack
- int available ;
+/// Number of available objects on stack
+int available;
- /**
- * Allocate a memory block
- */
- void allocateDataBlock ( )
- {
- // Allocate a data block
- datablocknum += 1 ;
- data = ( UCHAR ** )realloc( data, sizeof ( UCHAR * ) * datablocknum ) ;
- data[ datablocknum - 1 ] = ( UCHAR * )malloc( HEAP_UNIT * N ) ;
-
- // Update allocation stack
- for ( int i = 0 ; i < HEAP_UNIT ; i ++ )
- {
- stack[ 0 ][ i ] = ( data[ datablocknum - 1 ] + i * N ) ;
- }
- available = HEAP_UNIT ;
- }
+/**
+ * Allocate a memory block
+ */
+void allocateDataBlock( )
+{
+ // Allocate a data block
+ datablocknum += 1;
+ data = ( UCHAR ** )realloc(data, sizeof (UCHAR *) * datablocknum);
+ data[datablocknum - 1] = ( UCHAR * )malloc(HEAP_UNIT * N);
- /**
- * Allocate a stack block, to store more deallocated objects
- */
- void allocateStackBlock( )
+ // Update allocation stack
+ for (int i = 0; i < HEAP_UNIT; i++)
{
- // Allocate a stack block
- stackblocknum += 1 ;
- stacksize += HEAP_UNIT ;
- stack = ( UCHAR *** )realloc( stack, sizeof ( UCHAR ** ) * stackblocknum ) ;
- stack[ stackblocknum - 1 ] = ( UCHAR ** )malloc( HEAP_UNIT * sizeof ( UCHAR * ) ) ;
+ stack[0][i] = (data[datablocknum - 1] + i * N);
}
+ available = HEAP_UNIT;
+}
+
+/**
+ * Allocate a stack block, to store more deallocated objects
+ */
+void allocateStackBlock( )
+{
+ // Allocate a stack block
+ stackblocknum += 1;
+ stacksize += HEAP_UNIT;
+ stack = ( UCHAR *** )realloc(stack, sizeof (UCHAR * *) * stackblocknum);
+ stack[stackblocknum - 1] = ( UCHAR ** )malloc(HEAP_UNIT * sizeof (UCHAR *) );
+}
public:
- /**
- * Constructor
- */
- MemoryAllocator( )
+/**
+ * Constructor
+ */
+MemoryAllocator( )
+{
+ HEAP_UNIT = 1 << HEAP_BASE;
+ HEAP_MASK = (1 << HEAP_BASE) - 1;
+
+ data = ( UCHAR ** )malloc(sizeof(UCHAR *) );
+ data[0] = ( UCHAR * )malloc(HEAP_UNIT * N);
+ datablocknum = 1;
+
+ stack = ( UCHAR *** )malloc(sizeof (UCHAR * *) );
+ stack[0] = ( UCHAR ** )malloc(HEAP_UNIT * sizeof (UCHAR *) );
+ stackblocknum = 1;
+ stacksize = HEAP_UNIT;
+ available = HEAP_UNIT;
+
+ for (int i = 0; i < HEAP_UNIT; i++)
{
- HEAP_UNIT = 1 << HEAP_BASE ;
- HEAP_MASK = ( 1 << HEAP_BASE ) - 1 ;
-
- data = ( UCHAR ** )malloc( sizeof( UCHAR * ) ) ;
- data[ 0 ] = ( UCHAR * )malloc( HEAP_UNIT * N ) ;
- datablocknum = 1 ;
-
- stack = ( UCHAR *** )malloc( sizeof ( UCHAR ** ) ) ;
- stack[ 0 ] = ( UCHAR ** )malloc( HEAP_UNIT * sizeof ( UCHAR * ) ) ;
- stackblocknum = 1 ;
- stacksize = HEAP_UNIT ;
- available = HEAP_UNIT ;
-
- for ( int i = 0 ; i < HEAP_UNIT ; i ++ )
- {
- stack[ 0 ][ i ] = ( data[ 0 ] + i * N ) ;
- }
+ stack[0][i] = (data[0] + i * N);
}
+}
- /**
- * Destructor
- */
- void destroy( )
+/**
+ * Destructor
+ */
+void destroy( )
+{
+ int i;
+ for (i = 0; i < datablocknum; i++)
{
- int i ;
- for ( i = 0 ; i < datablocknum ; i ++ )
- {
- free( data[ i ] ) ;
- }
- for ( i = 0 ; i < stackblocknum ; i ++ )
- {
- free( stack[ i ] ) ;
- }
- free( data ) ;
- free( stack ) ;
+ free(data[i]);
}
-
- /**
- * Allocation method
- */
- void * allocate ( )
+ for (i = 0; i < stackblocknum; i++)
{
- if ( available == 0 )
- {
- allocateDataBlock ( ) ;
- }
-
- // printf("Allocating %d\n", header[ allocated ]) ;
- available -- ;
- return (void*)stack[ available >> HEAP_BASE ][ available & HEAP_MASK ] ;
+ free(stack[i]);
}
+ free(data);
+ free(stack);
+}
- /**
- * De-allocation method
- */
- void deallocate ( void * obj )
+/**
+ * Allocation method
+ */
+void *allocate( )
+{
+ if (available == 0)
{
- if ( available == stacksize )
- {
- allocateStackBlock ( ) ;
- }
-
- // printf("De-allocating %d\n", ( obj - data ) / N ) ;
- stack[ available >> HEAP_BASE ][ available & HEAP_MASK ] = (UCHAR*)obj ;
- available ++ ;
- // printf("%d %d\n", allocated, header[ allocated ]) ;
+ allocateDataBlock( );
}
- /**
- * Print information
- */
- void printInfo ( )
+ // printf("Allocating %d\n", header[ allocated ]) ;
+ available--;
+ return (void *)stack[available >> HEAP_BASE][available & HEAP_MASK];
+}
+
+/**
+ * De-allocation method
+ */
+void deallocate(void *obj)
+{
+ if (available == stacksize)
{
- printf("Bytes: %d Used: %d Allocated: %d Maxfree: %d\n", getBytes(), getAllocated(), getAll(), stacksize ) ;
+ allocateStackBlock( );
}
- /**
- * Query methods
- */
- int getAllocated( )
- {
- return HEAP_UNIT * datablocknum - available ;
- };
+ // printf("De-allocating %d\n", ( obj - data ) / N ) ;
+ stack[available >> HEAP_BASE][available & HEAP_MASK] = (UCHAR *)obj;
+ available++;
+ // printf("%d %d\n", allocated, header[ allocated ]) ;
+}
- int getAll( )
- {
- return HEAP_UNIT * datablocknum ;
- };
+/**
+ * Print information
+ */
+void printInfo( )
+{
+ printf("Bytes: %d Used: %d Allocated: %d Maxfree: %d\n", getBytes(), getAllocated(), getAll(), stacksize);
+}
- int getBytes( )
- {
- return N ;
- };
+/**
+ * Query methods
+ */
+int getAllocated( )
+{
+ return HEAP_UNIT * datablocknum - available;
+};
+
+int getAll( )
+{
+ return HEAP_UNIT * datablocknum;
+};
+
+int getBytes( )
+{
+ return N;
+};
};
#endif
diff --git a/intern/dualcon/intern/ModelReader.h b/intern/dualcon/intern/ModelReader.h
index e70a1586e03..993c5756531 100644
--- a/intern/dualcon/intern/ModelReader.h
+++ b/intern/dualcon/intern/ModelReader.h
@@ -33,31 +33,32 @@
class ModelReader
{
public:
- /// Constructor
- ModelReader(){} ;
+/// Constructor
+ModelReader(){
+};
- /// Get next triangle
- virtual Triangle* getNextTriangle( ) = 0 ;
- virtual int getNextTriangle( int t[3] ) = 0 ;
+/// Get next triangle
+virtual Triangle *getNextTriangle( ) = 0;
+virtual int getNextTriangle(int t[3]) = 0;
- /// Get bounding box
- virtual float getBoundingBox ( float origin[3] ) = 0 ;
+/// Get bounding box
+virtual float getBoundingBox(float origin[3]) = 0;
- /// Get number of triangles
- virtual int getNumTriangles ( ) = 0 ;
+/// Get number of triangles
+virtual int getNumTriangles( ) = 0;
- /// Get storage size
- virtual int getMemory ( ) = 0 ;
+/// Get storage size
+virtual int getMemory( ) = 0;
- /// Reset file reading location
- virtual void reset( ) = 0 ;
+/// Reset file reading location
+virtual void reset( ) = 0;
- /// For explicit vertex models
- virtual int getNumVertices( ) = 0 ;
+/// For explicit vertex models
+virtual int getNumVertices( ) = 0;
- virtual void getNextVertex( float v[3] ) = 0 ;
+virtual void getNextVertex(float v[3]) = 0;
- virtual void printInfo ( ) = 0 ;
+virtual void printInfo( ) = 0;
};
diff --git a/intern/dualcon/intern/Projections.cpp b/intern/dualcon/intern/Projections.cpp
index 1f0831ce973..e50065c004d 100644
--- a/intern/dualcon/intern/Projections.cpp
+++ b/intern/dualcon/intern/Projections.cpp
@@ -37,18 +37,15 @@ const int vertmap[8][3] = {
const int centmap[3][3][3][2] = {
{{{0, 0}, {0, 1}, {1, 1}},
{{0, 2}, {0, 3}, {1, 3}},
- {{2, 2}, {2, 3}, {3, 3}}
- },
-
+ {{2, 2}, {2, 3}, {3, 3}}},
+
{{{0, 4}, {0, 5}, {1, 5}},
{{0, 6}, {0, 7}, {1, 7}},
- {{2, 6}, {2, 7}, {3, 7}}
- },
-
+ {{2, 6}, {2, 7}, {3, 7}}},
+
{{{4, 4}, {4, 5}, {5, 5}},
{{4, 6}, {4, 7}, {5, 7}},
- {{6, 6}, {6, 7}, {7, 7}}
- }
+ {{6, 6}, {6, 7}, {7, 7}}}
};
const int edgemap[12][2] = {
diff --git a/intern/dualcon/intern/Projections.h b/intern/dualcon/intern/Projections.h
index 18533b218ff..7740b0d1634 100644
--- a/intern/dualcon/intern/Projections.h
+++ b/intern/dualcon/intern/Projections.h
@@ -54,20 +54,19 @@ extern const int facemap[6][4];
/**
* Structure for the projections inheritable from parent
*/
-struct InheritableProjections
-{
+struct InheritableProjections {
/// Projections of triangle
- LONG trigProj[13][2] ;
+ LONG trigProj[13][2];
/// Projections of triangle vertices on primary axes
- LONG trigVertProj[13][3] ;
+ LONG trigVertProj[13][3];
/// Projections of triangle edges
- LONG trigEdgeProj[13][3][2] ;
+ LONG trigEdgeProj[13][3][2];
/// Normal of the triangle
- double norm[3] ;
- double normA, normB ;
+ double norm[3];
+ double normA, normB;
/// End points along each axis
//int cubeEnds[13][2] ;
@@ -77,7 +76,7 @@ struct InheritableProjections
#ifdef CONTAINS_INDEX
/// Index of polygon
- int index ;
+ int index;
#endif
};
@@ -88,758 +87,752 @@ struct InheritableProjections
class Projections
{
public:
- /// Inheritable portion
- InheritableProjections* inherit ;
+/// Inheritable portion
+InheritableProjections *inherit;
- /// Projections of the cube vertices
- LONG cubeProj[13][6] ;
+/// Projections of the cube vertices
+LONG cubeProj[13][6];
public:
- Projections( )
- {
- }
+Projections( )
+{
+}
- /**
- * Construction
- * from a cube (axes aligned) and triangle
- */
- Projections( LONG cube[2][3], LONG trig[3][3], LONG error, int triind )
- {
- int i, j ;
- inherit = new InheritableProjections ;
+/**
+ * Construction
+ * from a cube (axes aligned) and triangle
+ */
+Projections(LONG cube[2][3], LONG trig[3][3], LONG error, int triind)
+{
+ int i, j;
+ inherit = new InheritableProjections;
#ifdef CONTAINS_INDEX
- inherit->index = triind ;
+ inherit->index = triind;
#endif
- /// Create axes
- LONG axes[13][3] ;
+ /// Create axes
+ LONG axes[13][3];
- // Cube faces
- axes[0][0] = 1 ;
- axes[0][1] = 0 ;
- axes[0][2] = 0 ;
+ // Cube faces
+ axes[0][0] = 1;
+ axes[0][1] = 0;
+ axes[0][2] = 0;
- axes[1][0] = 0 ;
- axes[1][1] = 1 ;
- axes[1][2] = 0 ;
+ axes[1][0] = 0;
+ axes[1][1] = 1;
+ axes[1][2] = 0;
- axes[2][0] = 0 ;
- axes[2][1] = 0 ;
- axes[2][2] = 1 ;
+ axes[2][0] = 0;
+ axes[2][1] = 0;
+ axes[2][2] = 1;
- // Triangle face
- LONG trigedge[3][3] ;
- for ( i = 0 ; i < 3 ; i ++ )
+ // Triangle face
+ LONG trigedge[3][3];
+ for (i = 0; i < 3; i++)
+ {
+ for (j = 0; j < 3; j++)
{
- for ( j = 0 ; j < 3 ; j ++ )
- {
- trigedge[i][j] = trig[(i+1)%3][j] - trig[i][j] ;
- }
+ trigedge[i][j] = trig[(i + 1) % 3][j] - trig[i][j];
}
- crossProduct( trigedge[0], trigedge[1], axes[3] ) ;
-
- /// Normalize face normal and store
- double dedge1[] = { (double) trig[1][0] - (double) trig[0][0],
- (double) trig[1][1] - (double) trig[0][1],
- (double) trig[1][2] - (double) trig[0][2] } ;
- double dedge2[] = { (double) trig[2][0] - (double) trig[1][0],
- (double) trig[2][1] - (double) trig[1][1],
- (double) trig[2][2] - (double) trig[1][2] } ;
- crossProduct( dedge1, dedge2, inherit->norm ) ;
- normalize( inherit->norm ) ;
+ }
+ crossProduct(trigedge[0], trigedge[1], axes[3]);
+
+ /// Normalize face normal and store
+ double dedge1[] = { (double) trig[1][0] - (double) trig[0][0],
+ (double) trig[1][1] - (double) trig[0][1],
+ (double) trig[1][2] - (double) trig[0][2] };
+ double dedge2[] = { (double) trig[2][0] - (double) trig[1][0],
+ (double) trig[2][1] - (double) trig[1][1],
+ (double) trig[2][2] - (double) trig[1][2] };
+ crossProduct(dedge1, dedge2, inherit->norm);
+ normalize(inherit->norm);
// inherit->normA = norm[ 0 ] ;
// inherit->normB = norm[ 2 ] > 0 ? norm[ 1 ] : 2 + norm[ 1 ] ;
- // Face edges and triangle edges
- int ct = 4 ;
- for ( i = 0 ; i < 3 ; i ++ )
- for ( j = 0 ; j < 3 ; j ++ )
- {
- crossProduct( axes[j], trigedge[i], axes[ct] ) ;
- ct ++ ;
- }
-
- /// Generate projections
- LONG cubeedge[3][3] ;
- for ( i = 0 ; i < 3 ; i ++ )
+ // Face edges and triangle edges
+ int ct = 4;
+ for (i = 0; i < 3; i++)
+ for (j = 0; j < 3; j++)
{
- for ( j = 0 ; j < 3 ; j ++ )
- {
- cubeedge[i][j] = 0 ;
- }
- cubeedge[i][i] = cube[1][i] - cube[0][i] ;
+ crossProduct(axes[j], trigedge[i], axes[ct]);
+ ct++;
}
- for ( j = 0 ; j < 13 ; j ++ )
+ /// Generate projections
+ LONG cubeedge[3][3];
+ for (i = 0; i < 3; i++)
+ {
+ for (j = 0; j < 3; j++)
{
- // Origin
- cubeProj[j][0] = dotProduct( axes[j], cube[0] ) ;
-
- // 3 direction vectors
- for ( i = 1 ; i < 4 ; i ++ )
- {
- cubeProj[j][i] = dotProduct( axes[j], cubeedge[i-1] ) ;
- }
+ cubeedge[i][j] = 0;
+ }
+ cubeedge[i][i] = cube[1][i] - cube[0][i];
+ }
- // Offsets of 2 ends of cube projection
- LONG max = 0 ;
- LONG min = 0 ;
- for ( i = 1 ; i < 8 ; i ++ )
- {
- LONG proj = vertmap[i][0] * cubeProj[j][1] + vertmap[i][1] * cubeProj[j][2] + vertmap[i][2] * cubeProj[j][3] ;
- if ( proj > max )
- {
- max = proj ;
- }
- if ( proj < min )
- {
- min = proj ;
- }
- }
- cubeProj[j][4] = min ;
- cubeProj[j][5] = max ;
+ for (j = 0; j < 13; j++)
+ {
+ // Origin
+ cubeProj[j][0] = dotProduct(axes[j], cube[0]);
+ // 3 direction vectors
+ for (i = 1; i < 4; i++)
+ {
+ cubeProj[j][i] = dotProduct(axes[j], cubeedge[i - 1]);
}
- for ( j = 0 ; j < 13 ; j ++ )
+ // Offsets of 2 ends of cube projection
+ LONG max = 0;
+ LONG min = 0;
+ for (i = 1; i < 8; i++)
{
- LONG vts[3] = { dotProduct( axes[j], trig[0] ),
- dotProduct( axes[j], trig[1] ),
- dotProduct( axes[j], trig[2] ) } ;
-
- // Vertex
- inherit->trigVertProj[j][0] = vts[0] ;
- inherit->trigVertProj[j][1] = vts[1] ;
- inherit->trigVertProj[j][2] = vts[2] ;
-
- // Edge
- for ( i = 0 ; i < 3 ; i ++ )
+ LONG proj = vertmap[i][0] * cubeProj[j][1] + vertmap[i][1] * cubeProj[j][2] + vertmap[i][2] * cubeProj[j][3];
+ if (proj > max)
{
- if ( vts[i] < vts[(i+1) % 3] )
- {
- inherit->trigEdgeProj[j][i][0] = vts[i] ;
- inherit->trigEdgeProj[j][i][1] = vts[(i+1) % 3] ;
- }
- else
- {
- inherit->trigEdgeProj[j][i][1] = vts[i] ;
- inherit->trigEdgeProj[j][i][0] = vts[(i+1) % 3] ;
- }
+ max = proj;
}
-
- // Triangle
- inherit->trigProj[j][0] = vts[0] ;
- inherit->trigProj[j][1] = vts[0] ;
- for ( i = 1 ; i < 3 ; i ++ )
+ if (proj < min)
{
- if ( vts[i] < inherit->trigProj[j][0] )
- {
- inherit->trigProj[j][0] = vts[i] ;
- }
- if ( vts[i] > inherit->trigProj[j][1] )
- {
- inherit->trigProj[j][1] = vts[i] ;
- }
+ min = proj;
}
}
+ cubeProj[j][4] = min;
+ cubeProj[j][5] = max;
}
- /**
- * Construction
- * from a parent Projections object and the index of the children
- */
- Projections ( Projections* parent )
+ for (j = 0; j < 13; j++)
{
- // Copy inheritable projections
- this->inherit = parent->inherit ;
+ LONG vts[3] = { dotProduct(axes[j], trig[0]),
+ dotProduct(axes[j], trig[1]),
+ dotProduct(axes[j], trig[2]) };
- // Shrink cube projections
- for ( int i = 0 ; i < 13 ; i ++ )
+ // Vertex
+ inherit->trigVertProj[j][0] = vts[0];
+ inherit->trigVertProj[j][1] = vts[1];
+ inherit->trigVertProj[j][2] = vts[2];
+
+ // Edge
+ for (i = 0; i < 3; i++)
{
- cubeProj[i][0] = parent->cubeProj[i][0] ;
- for ( int j = 1 ; j < 6 ; j ++ )
+ if (vts[i] < vts[(i + 1) % 3])
{
- cubeProj[i][j] = parent->cubeProj[i][j] >> 1 ;
+ inherit->trigEdgeProj[j][i][0] = vts[i];
+ inherit->trigEdgeProj[j][i][1] = vts[(i + 1) % 3];
+ }
+ else {
+ inherit->trigEdgeProj[j][i][1] = vts[i];
+ inherit->trigEdgeProj[j][i][0] = vts[(i + 1) % 3];
}
}
- };
-
- Projections ( Projections* parent, int box[3], int depth )
- {
- int mask = ( 1 << depth ) - 1 ;
- int nbox[3] = { box[0] & mask, box[1] & mask, box[2] & mask } ;
- // Copy inheritable projections
- this->inherit = parent->inherit ;
-
- // Shrink cube projections
- for ( int i = 0 ; i < 13 ; i ++ )
+ // Triangle
+ inherit->trigProj[j][0] = vts[0];
+ inherit->trigProj[j][1] = vts[0];
+ for (i = 1; i < 3; i++)
{
- for ( int j = 1 ; j < 6 ; j ++ )
+ if (vts[i] < inherit->trigProj[j][0])
{
- cubeProj[i][j] = parent->cubeProj[i][j] >> depth ;
+ inherit->trigProj[j][0] = vts[i];
+ }
+ if (vts[i] > inherit->trigProj[j][1])
+ {
+ inherit->trigProj[j][1] = vts[i];
}
-
- cubeProj[i][0] = parent->cubeProj[i][0] + nbox[0] * cubeProj[i][1] + nbox[1] * cubeProj[i][2] + nbox[2] * cubeProj[i][3] ;
}
- };
+ }
- /**
- * Testing intersection based on vertex/edge masks
- */
- int getIntersectionMasks( UCHAR cedgemask, UCHAR& edgemask )
- {
- int i, j ;
- edgemask = cedgemask ;
+}
- // Pre-processing
- /*
- if ( cvertmask & 1 )
- {
- edgemask |= 5 ;
- }
- if ( cvertmask & 2 )
+/**
+ * Construction
+ * from a parent Projections object and the index of the children
+ */
+Projections (Projections *parent)
+{
+ // Copy inheritable projections
+ this->inherit = parent->inherit;
+
+ // Shrink cube projections
+ for (int i = 0; i < 13; i++)
+ {
+ cubeProj[i][0] = parent->cubeProj[i][0];
+ for (int j = 1; j < 6; j++)
{
- edgemask |= 3 ;
+ cubeProj[i][j] = parent->cubeProj[i][j] >> 1;
}
- if ( cvertmask & 4 )
+ }
+};
+
+Projections (Projections *parent, int box[3], int depth)
+{
+ int mask = (1 << depth) - 1;
+ int nbox[3] = { box[0] & mask, box[1] & mask, box[2] & mask };
+
+ // Copy inheritable projections
+ this->inherit = parent->inherit;
+
+ // Shrink cube projections
+ for (int i = 0; i < 13; i++)
+ {
+ for (int j = 1; j < 6; j++)
{
- edgemask |= 6 ;
+ cubeProj[i][j] = parent->cubeProj[i][j] >> depth;
}
- */
+ cubeProj[i][0] = parent->cubeProj[i][0] + nbox[0] * cubeProj[i][1] + nbox[1] * cubeProj[i][2] + nbox[2] * cubeProj[i][3];
+ }
+};
- // Test axes for edge intersection
- UCHAR bit = 1 ;
- for ( j = 0 ; j < 3 ; j ++ )
+/**
+ * Testing intersection based on vertex/edge masks
+ */
+int getIntersectionMasks(UCHAR cedgemask, UCHAR& edgemask)
+{
+ int i, j;
+ edgemask = cedgemask;
+
+ // Pre-processing
+ /*
+ if ( cvertmask & 1 )
+ {
+ edgemask |= 5 ;
+ }
+ if ( cvertmask & 2 )
+ {
+ edgemask |= 3 ;
+ }
+ if ( cvertmask & 4 )
+ {
+ edgemask |= 6 ;
+ }
+
+ */
+
+ // Test axes for edge intersection
+ UCHAR bit = 1;
+ for (j = 0; j < 3; j++)
+ {
+ if (edgemask & bit)
{
- if ( edgemask & bit )
+ for (i = 0; i < 13; i++)
{
- for ( i = 0 ; i < 13 ; i ++ )
- {
- LONG proj0 = cubeProj[i][0] + cubeProj[i][4] ;
- LONG proj1 = cubeProj[i][0] + cubeProj[i][5] ;
+ LONG proj0 = cubeProj[i][0] + cubeProj[i][4];
+ LONG proj1 = cubeProj[i][0] + cubeProj[i][5];
- if ( proj0 > inherit->trigEdgeProj[i][j][1] ||
- proj1 < inherit->trigEdgeProj[i][j][0] )
- {
- edgemask &= ( ~ bit ) ;
- break ;
- }
+ if (proj0 > inherit->trigEdgeProj[i][j][1] ||
+ proj1 < inherit->trigEdgeProj[i][j][0])
+ {
+ edgemask &= (~bit);
+ break;
}
}
- bit <<= 1 ;
- }
-
- /*
- if ( edgemask != 0 )
- {
- printf("%d %d\n", cedgemask, edgemask) ;
}
- */
+ bit <<= 1;
+ }
- // Test axes for triangle intersection
- if ( edgemask )
- {
- return 1 ;
- }
+ /*
+ if ( edgemask != 0 )
+ {
+ printf("%d %d\n", cedgemask, edgemask) ;
+ }
+ */
- for ( i = 3 ; i < 13 ; i ++ )
- {
- LONG proj0 = cubeProj[i][0] + cubeProj[i][4] ;
- LONG proj1 = cubeProj[i][0] + cubeProj[i][5] ;
+ // Test axes for triangle intersection
+ if (edgemask)
+ {
+ return 1;
+ }
- if ( proj0 > inherit->trigProj[i][1] ||
- proj1 < inherit->trigProj[i][0] )
- {
- return 0 ;
- }
+ for (i = 3; i < 13; i++)
+ {
+ LONG proj0 = cubeProj[i][0] + cubeProj[i][4];
+ LONG proj1 = cubeProj[i][0] + cubeProj[i][5];
+
+ if (proj0 > inherit->trigProj[i][1] ||
+ proj1 < inherit->trigProj[i][0])
+ {
+ return 0;
}
-
- return 1 ;
}
- /**
- * Retrieving children masks using PRIMARY AXES
- */
- UCHAR getChildrenMasks( UCHAR cvertmask, UCHAR vertmask[8] )
+ return 1;
+}
+
+/**
+ * Retrieving children masks using PRIMARY AXES
+ */
+UCHAR getChildrenMasks(UCHAR cvertmask, UCHAR vertmask[8])
+{
+ int i, j, k;
+ int bmask[3][2] = {{0, 0}, {0, 0}, {0, 0}};
+ int vmask[3][3][2] = {{{0, 0}, {0, 0}, {0, 0}}, {{0, 0}, {0, 0}, {0, 0}}, {{0, 0}, {0, 0}, {0, 0}}};
+ UCHAR boxmask = 0;
+ LONG len = cubeProj[0][1] >> 1;
+
+ for (i = 0; i < 3; i++)
{
- int i, j, k ;
- int bmask[3][2] = {{0,0},{0,0},{0,0}} ;
- int vmask[3][3][2] = {{{0,0},{0,0},{0,0}},{{0,0},{0,0},{0,0}},{{0,0},{0,0},{0,0}}} ;
- UCHAR boxmask = 0 ;
- LONG len = cubeProj[0][1] >> 1 ;
-
- for ( i = 0 ; i < 3 ; i ++ )
- {
- LONG mid = cubeProj[i][0] + len ;
+ LONG mid = cubeProj[i][0] + len;
- // Check bounding box
- if ( mid >= inherit->trigProj[i][0] )
- {
- bmask[i][0] = 1 ;
- }
- if ( mid <= inherit->trigProj[i][1] )
- {
- bmask[i][1] = 1 ;
- }
+ // Check bounding box
+ if (mid >= inherit->trigProj[i][0])
+ {
+ bmask[i][0] = 1;
+ }
+ if (mid <= inherit->trigProj[i][1])
+ {
+ bmask[i][1] = 1;
+ }
- // Check vertex mask
- if ( cvertmask )
+ // Check vertex mask
+ if (cvertmask)
+ {
+ for (j = 0; j < 3; j++)
{
- for ( j = 0 ; j < 3 ; j ++ )
+ if (cvertmask & (1 << j) )
{
- if ( cvertmask & ( 1 << j ) )
+ // Only check if it's contained this node
+ if (mid >= inherit->trigVertProj[i][j])
{
- // Only check if it's contained this node
- if ( mid >= inherit->trigVertProj[i][j] )
- {
- vmask[i][j][0] = 1 ;
- }
- if ( mid <= inherit->trigVertProj[i][j] )
- {
- vmask[i][j][1] = 1 ;
- }
+ vmask[i][j][0] = 1;
}
- }
- }
-
- /*
- // Check edge mask
- if ( cedgemask )
- {
- for ( j = 0 ; j < 3 ; j ++ )
- {
- if ( cedgemask & ( 1 << j ) )
+ if (mid <= inherit->trigVertProj[i][j])
{
- // Only check if it's contained this node
- if ( mid >= inherit->trigEdgeProj[i][j][0] )
- {
- emask[i][j][0] = 1 ;
- }
- if ( mid <= inherit->trigEdgeProj[i][j][1] )
- {
- emask[i][j][1] = 1 ;
- }
+ vmask[i][j][1] = 1;
}
}
}
- */
-
}
- // Fill in masks
- int ct = 0 ;
- for ( i = 0 ; i < 2 ; i ++ )
- for ( j = 0 ; j < 2 ; j ++ )
- for ( k = 0 ; k < 2 ; k ++ )
- {
- boxmask |= ( ( bmask[0][i] & bmask[1][j] & bmask[2][k] ) << ct ) ;
- vertmask[ct] = (( vmask[0][0][i] & vmask[1][0][j] & vmask[2][0][k] ) |
- (( vmask[0][1][i] & vmask[1][1][j] & vmask[2][1][k] ) << 1 ) |
- (( vmask[0][2][i] & vmask[1][2][j] & vmask[2][2][k] ) << 2 ) ) ;
- /*
- edgemask[ct] = (( emask[0][0][i] & emask[1][0][j] & emask[2][0][k] ) |
- (( emask[0][1][i] & emask[1][1][j] & emask[2][1][k] ) << 1 ) |
- (( emask[0][2][i] & emask[1][2][j] & emask[2][2][k] ) << 2 ) ) ;
- edgemask[ct] = cedgemask ;
- */
- ct ++ ;
- }
+ /*
+ // Check edge mask
+ if ( cedgemask )
+ {
+ for ( j = 0 ; j < 3 ; j ++ )
+ {
+ if ( cedgemask & ( 1 << j ) )
+ {
+ // Only check if it's contained this node
+ if ( mid >= inherit->trigEdgeProj[i][j][0] )
+ {
+ emask[i][j][0] = 1 ;
+ }
+ if ( mid <= inherit->trigEdgeProj[i][j][1] )
+ {
+ emask[i][j][1] = 1 ;
+ }
+ }
+ }
+ }
+ */
- // Return bounding box masks
- return boxmask ;
}
- UCHAR getBoxMask( )
+ // Fill in masks
+ int ct = 0;
+ for (i = 0; i < 2; i++)
+ for (j = 0; j < 2; j++)
+ for (k = 0; k < 2; k++)
+ {
+ boxmask |= ( (bmask[0][i] & bmask[1][j] & bmask[2][k]) << ct);
+ vertmask[ct] = ((vmask[0][0][i] & vmask[1][0][j] & vmask[2][0][k]) |
+ ((vmask[0][1][i] & vmask[1][1][j] & vmask[2][1][k]) << 1) |
+ ((vmask[0][2][i] & vmask[1][2][j] & vmask[2][2][k]) << 2) );
+ /*
+ edgemask[ct] = (( emask[0][0][i] & emask[1][0][j] & emask[2][0][k] ) |
+ (( emask[0][1][i] & emask[1][1][j] & emask[2][1][k] ) << 1 ) |
+ (( emask[0][2][i] & emask[1][2][j] & emask[2][2][k] ) << 2 ) ) ;
+ edgemask[ct] = cedgemask ;
+ */
+ ct++;
+ }
+
+ // Return bounding box masks
+ return boxmask;
+}
+
+UCHAR getBoxMask( )
+{
+ int i, j, k;
+ int bmask[3][2] = {{0, 0}, {0, 0}, {0, 0}};
+ UCHAR boxmask = 0;
+ LONG len = cubeProj[0][1] >> 1;
+
+ for (i = 0; i < 3; i++)
{
- int i, j, k ;
- int bmask[3][2] = {{0,0},{0,0},{0,0}} ;
- UCHAR boxmask = 0 ;
- LONG len = cubeProj[0][1] >> 1 ;
-
- for ( i = 0 ; i < 3 ; i ++ )
+ LONG mid = cubeProj[i][0] + len;
+
+ // Check bounding box
+ if (mid >= inherit->trigProj[i][0])
+ {
+ bmask[i][0] = 1;
+ }
+ if (mid <= inherit->trigProj[i][1])
{
- LONG mid = cubeProj[i][0] + len ;
+ bmask[i][1] = 1;
+ }
- // Check bounding box
- if ( mid >= inherit->trigProj[i][0] )
- {
- bmask[i][0] = 1 ;
- }
- if ( mid <= inherit->trigProj[i][1] )
+ }
+
+ // Fill in masks
+ int ct = 0;
+ for (i = 0; i < 2; i++)
+ for (j = 0; j < 2; j++)
+ for (k = 0; k < 2; k++)
{
- bmask[i][1] = 1 ;
+ boxmask |= ( (bmask[0][i] & bmask[1][j] & bmask[2][k]) << ct);
+ ct++;
}
- }
+ // Return bounding box masks
+ return boxmask;
+}
- // Fill in masks
- int ct = 0 ;
- for ( i = 0 ; i < 2 ; i ++ )
- for ( j = 0 ; j < 2 ; j ++ )
- for ( k = 0 ; k < 2 ; k ++ )
- {
- boxmask |= ( ( bmask[0][i] & bmask[1][j] & bmask[2][k] ) << ct ) ;
- ct ++ ;
- }
- // Return bounding box masks
- return boxmask ;
- }
+/**
+ * Get projections for sub-cubes (simple axes)
+ */
+void getSubProjectionsSimple(Projections *p[8])
+{
+ // Process the axes cooresponding to the triangle's normal
+ int ind = 3;
+ LONG len = cubeProj[0][1] >> 1;
+ LONG trigproj[3] = { cubeProj[ind][1] >> 1, cubeProj[ind][2] >> 1, cubeProj[ind][3] >> 1 };
+
+ int ct = 0;
+ for (int i = 0; i < 2; i++)
+ for (int j = 0; j < 2; j++)
+ for (int k = 0; k < 2; k++)
+ {
+ p[ct] = new Projections( );
+ p[ct]->inherit = inherit;
+ p[ct]->cubeProj[0][0] = cubeProj[0][0] + i * len;
+ p[ct]->cubeProj[1][0] = cubeProj[1][0] + j * len;
+ p[ct]->cubeProj[2][0] = cubeProj[2][0] + k * len;
+ p[ct]->cubeProj[0][1] = len;
- /**
- * Get projections for sub-cubes (simple axes)
- */
- void getSubProjectionsSimple( Projections* p[8] )
- {
- // Process the axes cooresponding to the triangle's normal
- int ind = 3 ;
- LONG len = cubeProj[ 0 ][ 1 ] >> 1 ;
- LONG trigproj[3] = { cubeProj[ ind ][ 1 ] >> 1, cubeProj[ ind ][ 2 ] >> 1, cubeProj[ ind ][ 3 ] >> 1 } ;
-
- int ct = 0 ;
- for ( int i = 0 ; i < 2 ; i ++ )
- for ( int j = 0 ; j < 2 ; j ++ )
- for ( int k = 0 ; k < 2 ; k ++ )
+ for (int m = 1; m < 4; m++)
{
- p[ct] = new Projections( ) ;
- p[ct]->inherit = inherit ;
+ p[ct]->cubeProj[ind][m] = trigproj[m - 1];
+ }
+ p[ct]->cubeProj[ind][0] = cubeProj[ind][0] + i * trigproj[0] + j * trigproj[1] + k * trigproj[2];
- p[ct]->cubeProj[ 0 ][ 0 ] = cubeProj[ 0 ][ 0 ] + i * len ;
- p[ct]->cubeProj[ 1 ][ 0 ] = cubeProj[ 1 ][ 0 ] + j * len ;
- p[ct]->cubeProj[ 2 ][ 0 ] = cubeProj[ 2 ][ 0 ] + k * len ;
- p[ct]->cubeProj[ 0 ][ 1 ] = len ;
+ ct++;
+ }
+}
- for ( int m = 1 ; m < 4 ; m ++ )
- {
- p[ct]->cubeProj[ ind ][ m ] = trigproj[ m - 1 ] ;
- }
- p[ct]->cubeProj[ ind ][ 0 ] = cubeProj[ ind ][0] + i * trigproj[0] + j * trigproj[1] + k * trigproj[2] ;
+/**
+ * Shifting a cube to a new origin
+ */
+void shift(int off[3])
+{
+ for (int i = 0; i < 13; i++)
+ {
+ cubeProj[i][0] += off[0] * cubeProj[i][1] + off[1] * cubeProj[i][2] + off[2] * cubeProj[i][3];
+ }
+}
- ct ++ ;
- }
+void shiftNoPrimary(int off[3])
+{
+ for (int i = 3; i < 13; i++)
+ {
+ cubeProj[i][0] += off[0] * cubeProj[i][1] + off[1] * cubeProj[i][2] + off[2] * cubeProj[i][3];
}
+}
- /**
- * Shifting a cube to a new origin
- */
- void shift ( int off[3] )
+/**
+ * Method to test intersection of the triangle and the cube
+ */
+int isIntersecting( )
+{
+ for (int i = 0; i < 13; i++)
{
- for ( int i = 0 ; i < 13 ; i ++ )
+ /*
+ LONG proj0 = cubeProj[i][0] +
+ vertmap[inherit->cubeEnds[i][0]][0] * cubeProj[i][1] +
+ vertmap[inherit->cubeEnds[i][0]][1] * cubeProj[i][2] +
+ vertmap[inherit->cubeEnds[i][0]][2] * cubeProj[i][3] ;
+ LONG proj1 = cubeProj[i][0] +
+ vertmap[inherit->cubeEnds[i][1]][0] * cubeProj[i][1] +
+ vertmap[inherit->cubeEnds[i][1]][1] * cubeProj[i][2] +
+ vertmap[inherit->cubeEnds[i][1]][2] * cubeProj[i][3] ;
+ */
+
+ LONG proj0 = cubeProj[i][0] + cubeProj[i][4];
+ LONG proj1 = cubeProj[i][0] + cubeProj[i][5];
+
+ if (proj0 > inherit->trigProj[i][1] ||
+ proj1 < inherit->trigProj[i][0])
{
- cubeProj[i][0] += off[0] * cubeProj[i][1] + off[1] * cubeProj[i][2] + off[2] * cubeProj[i][3] ;
+ return 0;
}
}
- void shiftNoPrimary ( int off[3] )
+ return 1;
+};
+
+int isIntersectingNoPrimary( )
+{
+ for (int i = 3; i < 13; i++)
{
- for ( int i = 3 ; i < 13 ; i ++ )
+ /*
+ LONG proj0 = cubeProj[i][0] +
+ vertmap[inherit->cubeEnds[i][0]][0] * cubeProj[i][1] +
+ vertmap[inherit->cubeEnds[i][0]][1] * cubeProj[i][2] +
+ vertmap[inherit->cubeEnds[i][0]][2] * cubeProj[i][3] ;
+ LONG proj1 = cubeProj[i][0] +
+ vertmap[inherit->cubeEnds[i][1]][0] * cubeProj[i][1] +
+ vertmap[inherit->cubeEnds[i][1]][1] * cubeProj[i][2] +
+ vertmap[inherit->cubeEnds[i][1]][2] * cubeProj[i][3] ;
+ */
+
+ LONG proj0 = cubeProj[i][0] + cubeProj[i][4];
+ LONG proj1 = cubeProj[i][0] + cubeProj[i][5];
+
+ if (proj0 > inherit->trigProj[i][1] ||
+ proj1 < inherit->trigProj[i][0])
{
- cubeProj[i][0] += off[0] * cubeProj[i][1] + off[1] * cubeProj[i][2] + off[2] * cubeProj[i][3] ;
+ return 0;
}
}
- /**
- * Method to test intersection of the triangle and the cube
- */
- int isIntersecting ( )
+ return 1;
+};
+
+/**
+ * Method to test intersection of the triangle and one edge
+ */
+int isIntersecting(int edgeInd)
+{
+ for (int i = 0; i < 13; i++)
{
- for ( int i = 0 ; i < 13 ; i ++ )
+
+ LONG proj0 = cubeProj[i][0] +
+ vertmap[edgemap[edgeInd][0]][0] * cubeProj[i][1] +
+ vertmap[edgemap[edgeInd][0]][1] * cubeProj[i][2] +
+ vertmap[edgemap[edgeInd][0]][2] * cubeProj[i][3];
+ LONG proj1 = cubeProj[i][0] +
+ vertmap[edgemap[edgeInd][1]][0] * cubeProj[i][1] +
+ vertmap[edgemap[edgeInd][1]][1] * cubeProj[i][2] +
+ vertmap[edgemap[edgeInd][1]][2] * cubeProj[i][3];
+
+
+ if (proj0 < proj1)
{
- /*
- LONG proj0 = cubeProj[i][0] +
- vertmap[inherit->cubeEnds[i][0]][0] * cubeProj[i][1] +
- vertmap[inherit->cubeEnds[i][0]][1] * cubeProj[i][2] +
- vertmap[inherit->cubeEnds[i][0]][2] * cubeProj[i][3] ;
- LONG proj1 = cubeProj[i][0] +
- vertmap[inherit->cubeEnds[i][1]][0] * cubeProj[i][1] +
- vertmap[inherit->cubeEnds[i][1]][1] * cubeProj[i][2] +
- vertmap[inherit->cubeEnds[i][1]][2] * cubeProj[i][3] ;
- */
-
- LONG proj0 = cubeProj[i][0] + cubeProj[i][4] ;
- LONG proj1 = cubeProj[i][0] + cubeProj[i][5] ;
-
- if ( proj0 > inherit->trigProj[i][1] ||
- proj1 < inherit->trigProj[i][0] )
+ if (proj0 > inherit->trigProj[i][1] ||
+ proj1 < inherit->trigProj[i][0])
{
- return 0 ;
+ return 0;
}
}
-
- return 1 ;
- };
-
- int isIntersectingNoPrimary ( )
- {
- for ( int i = 3 ; i < 13 ; i ++ )
- {
- /*
- LONG proj0 = cubeProj[i][0] +
- vertmap[inherit->cubeEnds[i][0]][0] * cubeProj[i][1] +
- vertmap[inherit->cubeEnds[i][0]][1] * cubeProj[i][2] +
- vertmap[inherit->cubeEnds[i][0]][2] * cubeProj[i][3] ;
- LONG proj1 = cubeProj[i][0] +
- vertmap[inherit->cubeEnds[i][1]][0] * cubeProj[i][1] +
- vertmap[inherit->cubeEnds[i][1]][1] * cubeProj[i][2] +
- vertmap[inherit->cubeEnds[i][1]][2] * cubeProj[i][3] ;
- */
-
- LONG proj0 = cubeProj[i][0] + cubeProj[i][4] ;
- LONG proj1 = cubeProj[i][0] + cubeProj[i][5] ;
-
- if ( proj0 > inherit->trigProj[i][1] ||
- proj1 < inherit->trigProj[i][0] )
+ else {
+ if (proj1 > inherit->trigProj[i][1] ||
+ proj0 < inherit->trigProj[i][0])
{
- return 0 ;
+ return 0;
}
}
-
- return 1 ;
- };
-
- /**
- * Method to test intersection of the triangle and one edge
- */
- int isIntersecting ( int edgeInd )
+ }
+
+ // printf( "Intersecting: %d %d\n", edgemap[edgeInd][0], edgemap[edgeInd][1] ) ;
+ return 1;
+};
+
+/**
+ * Method to test intersection of one triangle edge and one cube face
+ */
+int isIntersecting(int edgeInd, int faceInd)
+{
+ for (int i = 0; i < 13; i++)
{
- for ( int i = 0 ; i < 13 ; i ++ )
+ LONG trigproj0 = inherit->trigVertProj[i][edgeInd];
+ LONG trigproj1 = inherit->trigVertProj[i][(edgeInd + 1) % 3];
+
+ if (trigproj0 < trigproj1)
{
-
- LONG proj0 = cubeProj[i][0] +
- vertmap[edgemap[edgeInd][0]][0] * cubeProj[i][1] +
- vertmap[edgemap[edgeInd][0]][1] * cubeProj[i][2] +
- vertmap[edgemap[edgeInd][0]][2] * cubeProj[i][3] ;
- LONG proj1 = cubeProj[i][0] +
- vertmap[edgemap[edgeInd][1]][0] * cubeProj[i][1] +
- vertmap[edgemap[edgeInd][1]][1] * cubeProj[i][2] +
- vertmap[edgemap[edgeInd][1]][2] * cubeProj[i][3] ;
-
-
- if ( proj0 < proj1 )
+ int t1 = 1, t2 = 1;
+ for (int j = 0; j < 4; j++)
{
- if ( proj0 > inherit->trigProj[i][1] ||
- proj1 < inherit->trigProj[i][0] )
+ LONG proj = cubeProj[i][0] +
+ vertmap[facemap[faceInd][j]][0] * cubeProj[i][1] +
+ vertmap[facemap[faceInd][j]][1] * cubeProj[i][2] +
+ vertmap[facemap[faceInd][j]][2] * cubeProj[i][3];
+ if (proj >= trigproj0)
{
- return 0 ;
+ t1 = 0;
}
- }
- else
- {
- if ( proj1 > inherit->trigProj[i][1] ||
- proj0 < inherit->trigProj[i][0] )
+ if (proj <= trigproj1)
{
- return 0 ;
+ t2 = 0;
}
}
+ if (t1 || t2)
+ {
+ return 0;
+ }
}
-
- // printf( "Intersecting: %d %d\n", edgemap[edgeInd][0], edgemap[edgeInd][1] ) ;
- return 1 ;
- };
-
- /**
- * Method to test intersection of one triangle edge and one cube face
- */
- int isIntersecting ( int edgeInd, int faceInd )
- {
- for ( int i = 0 ; i < 13 ; i ++ )
- {
- LONG trigproj0 = inherit->trigVertProj[i][edgeInd] ;
- LONG trigproj1 = inherit->trigVertProj[i][(edgeInd+1)%3] ;
-
- if ( trigproj0 < trigproj1 )
+ else {
+ int t1 = 1, t2 = 1;
+ for (int j = 0; j < 4; j++)
{
- int t1 = 1 , t2 = 1 ;
- for ( int j = 0 ; j < 4 ; j ++ )
+ LONG proj = cubeProj[i][0] +
+ vertmap[facemap[faceInd][j]][0] * cubeProj[i][1] +
+ vertmap[facemap[faceInd][j]][1] * cubeProj[i][2] +
+ vertmap[facemap[faceInd][j]][2] * cubeProj[i][3];
+ if (proj >= trigproj1)
{
- LONG proj = cubeProj[i][0] +
- vertmap[facemap[faceInd][j]][0] * cubeProj[i][1] +
- vertmap[facemap[faceInd][j]][1] * cubeProj[i][2] +
- vertmap[facemap[faceInd][j]][2] * cubeProj[i][3] ;
- if ( proj >= trigproj0 )
- {
- t1 = 0 ;
- }
- if ( proj <= trigproj1 )
- {
- t2 = 0 ;
- }
+ t1 = 0;
}
- if ( t1 || t2 )
+ if (proj <= trigproj0)
{
- return 0 ;
+ t2 = 0;
}
}
- else
+ if (t1 || t2)
{
- int t1 = 1 , t2 = 1 ;
- for ( int j = 0 ; j < 4 ; j ++ )
- {
- LONG proj = cubeProj[i][0] +
- vertmap[facemap[faceInd][j]][0] * cubeProj[i][1] +
- vertmap[facemap[faceInd][j]][1] * cubeProj[i][2] +
- vertmap[facemap[faceInd][j]][2] * cubeProj[i][3] ;
- if ( proj >= trigproj1 )
- {
- t1 = 0 ;
- }
- if ( proj <= trigproj0 )
- {
- t2 = 0 ;
- }
- }
- if ( t1 || t2 )
- {
- return 0 ;
- }
+ return 0;
}
}
+ }
- return 1 ;
- };
+ return 1;
+};
- int isIntersectingPrimary ( int edgeInd )
+int isIntersectingPrimary(int edgeInd)
+{
+ for (int i = 0; i < 13; i++)
{
- for ( int i = 0 ; i < 13 ; i ++ )
- {
-
- LONG proj0 = cubeProj[i][0] ;
- LONG proj1 = cubeProj[i][0] + cubeProj[i][edgeInd + 1] ;
- if ( proj0 < proj1 )
- {
- if ( proj0 > inherit->trigProj[i][1] ||
- proj1 < inherit->trigProj[i][0] )
- {
- return 0 ;
- }
- }
- else
- {
- if ( proj1 > inherit->trigProj[i][1] ||
- proj0 < inherit->trigProj[i][0] )
- {
- return 0 ;
- }
- }
-
- }
-
- // printf( "Intersecting: %d %d\n", edgemap[edgeInd][0], edgemap[edgeInd][1] ) ;
- return 1 ;
- };
-
- double getIntersection ( int edgeInd )
- {
- int i = 3 ;
-
- LONG proj0 = cubeProj[i][0] +
- vertmap[edgemap[edgeInd][0]][0] * cubeProj[i][1] +
- vertmap[edgemap[edgeInd][0]][1] * cubeProj[i][2] +
- vertmap[edgemap[edgeInd][0]][2] * cubeProj[i][3] ;
- LONG proj1 = cubeProj[i][0] +
- vertmap[edgemap[edgeInd][1]][0] * cubeProj[i][1] +
- vertmap[edgemap[edgeInd][1]][1] * cubeProj[i][2] +
- vertmap[edgemap[edgeInd][1]][2] * cubeProj[i][3] ;
- LONG proj2 = inherit->trigProj[i][1] ;
+ LONG proj0 = cubeProj[i][0];
+ LONG proj1 = cubeProj[i][0] + cubeProj[i][edgeInd + 1];
- /*
- if ( proj0 < proj1 )
+ if (proj0 < proj1)
{
- if ( proj2 < proj0 || proj2 > proj1 )
+ if (proj0 > inherit->trigProj[i][1] ||
+ proj1 < inherit->trigProj[i][0])
{
- return -1 ;
+ return 0;
}
}
- else
- {
- if ( proj2 < proj1 || proj2 > proj0 )
+ else {
+ if (proj1 > inherit->trigProj[i][1] ||
+ proj0 < inherit->trigProj[i][0])
{
- return -1 ;
+ return 0;
}
}
- */
- double alpha = (double)( proj2 - proj0 ) / (double)( proj1 - proj0 ) ;
- /*
- if ( alpha < 0 )
- {
- alpha = 0.5 ;
- }
- else if ( alpha > 1 )
- {
- alpha = 0.5 ;
- }
- */
+ }
+
+ // printf( "Intersecting: %d %d\n", edgemap[edgeInd][0], edgemap[edgeInd][1] ) ;
+ return 1;
+};
- return alpha ;
- };
+double getIntersection(int edgeInd)
+{
+ int i = 3;
+
+ LONG proj0 = cubeProj[i][0] +
+ vertmap[edgemap[edgeInd][0]][0] * cubeProj[i][1] +
+ vertmap[edgemap[edgeInd][0]][1] * cubeProj[i][2] +
+ vertmap[edgemap[edgeInd][0]][2] * cubeProj[i][3];
+ LONG proj1 = cubeProj[i][0] +
+ vertmap[edgemap[edgeInd][1]][0] * cubeProj[i][1] +
+ vertmap[edgemap[edgeInd][1]][1] * cubeProj[i][2] +
+ vertmap[edgemap[edgeInd][1]][2] * cubeProj[i][3];
+ LONG proj2 = inherit->trigProj[i][1];
+
+ /*
+ if ( proj0 < proj1 )
+ {
+ if ( proj2 < proj0 || proj2 > proj1 )
+ {
+ return -1 ;
+ }
+ }
+ else
+ {
+ if ( proj2 < proj1 || proj2 > proj0 )
+ {
+ return -1 ;
+ }
+ }
+ */
- float getIntersectionPrimary ( int edgeInd )
- {
- int i = 3 ;
+ double alpha = (double)(proj2 - proj0) / (double)(proj1 - proj0);
+ /*
+ if ( alpha < 0 )
+ {
+ alpha = 0.5 ;
+ }
+ else if ( alpha > 1 )
+ {
+ alpha = 0.5 ;
+ }
+ */
-
- LONG proj0 = cubeProj[i][0] ;
- LONG proj1 = cubeProj[i][0] + cubeProj[i][edgeInd + 1] ;
- LONG proj2 = inherit->trigProj[i][1] ;
+ return alpha;
+};
- // double alpha = (double)( ( proj2 - proj0 ) * cubeProj[edgeInd][edgeInd + 1] ) / (double)( proj1 - proj0 ) ;
- double alpha = (double)( ( proj2 - proj0 ) ) / (double)( proj1 - proj0 ) ;
-
- if ( alpha < 0 )
- {
- alpha = 0.5 ;
- }
- else if ( alpha > 1 )
- {
- alpha = 0.5 ;
- }
-
+float getIntersectionPrimary(int edgeInd)
+{
+ int i = 3;
- return (float)alpha ;
- };
- /**
- * Method to perform cross-product
- */
- void crossProduct ( LONG a[3], LONG b[3], LONG res[3] )
- {
- res[0] = a[1] * b[2] - a[2] * b[1] ;
- res[1] = a[2] * b[0] - a[0] * b[2] ;
- res[2] = a[0] * b[1] - a[1] * b[0] ;
- }
- void crossProduct ( double a[3], double b[3], double res[3] )
- {
- res[0] = a[1] * b[2] - a[2] * b[1] ;
- res[1] = a[2] * b[0] - a[0] * b[2] ;
- res[2] = a[0] * b[1] - a[1] * b[0] ;
- }
+ LONG proj0 = cubeProj[i][0];
+ LONG proj1 = cubeProj[i][0] + cubeProj[i][edgeInd + 1];
+ LONG proj2 = inherit->trigProj[i][1];
+ LONG d = proj1 - proj0;
+ double alpha;
- /**
- * Method to perform dot product
- */
- LONG dotProduct ( LONG a[3], LONG b[3] )
- {
- return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] ;
+ if (d == 0)
+ alpha = 0.5;
+ else {
+ alpha = (double)((proj2 - proj0)) / (double)d;
+
+ if (alpha < 0 || alpha > 1)
+ alpha = 0.5;
}
- void normalize( double a[3] )
+ return (float)alpha;
+};
+
+/**
+ * Method to perform cross-product
+ */
+void crossProduct(LONG a[3], LONG b[3], LONG res[3])
+{
+ res[0] = a[1] * b[2] - a[2] * b[1];
+ res[1] = a[2] * b[0] - a[0] * b[2];
+ res[2] = a[0] * b[1] - a[1] * b[0];
+}
+void crossProduct(double a[3], double b[3], double res[3])
+{
+ res[0] = a[1] * b[2] - a[2] * b[1];
+ res[1] = a[2] * b[0] - a[0] * b[2];
+ res[2] = a[0] * b[1] - a[1] * b[0];
+}
+
+/**
+ * Method to perform dot product
+ */
+LONG dotProduct(LONG a[3], LONG b[3])
+{
+ return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
+}
+
+void normalize(double a[3])
+{
+ double mag = a[0] * a[0] + a[1] * a[1] + a[2] * a[2];
+ if (mag > 0)
{
- double mag = a[0] * a[0] + a[1] * a[1] + a[2] * a[2] ;
- if ( mag > 0 )
- {
- mag = sqrt( mag ) ;
- a[0] /= mag ;
- a[1] /= mag ;
- a[2] /= mag ;
- }
+ mag = sqrt(mag);
+ a[0] /= mag;
+ a[1] /= mag;
+ a[2] /= mag;
}
+}
};
diff --git a/intern/dualcon/intern/Queue.h b/intern/dualcon/intern/Queue.h
index 61d7e2af2e8..a2b5b46c72c 100644
--- a/intern/dualcon/intern/Queue.h
+++ b/intern/dualcon/intern/Queue.h
@@ -23,83 +23,81 @@
#ifndef QUEUE_H
#define QUEUE_H
-struct gridQueueEle
-{
+struct gridQueueEle {
int x, y, z;
- UCHAR dir ;
- gridQueueEle* next ;
+ UCHAR dir;
+ gridQueueEle *next;
};
class GridQueue
{
- gridQueueEle* head ;
- gridQueueEle* tail ;
- int numEles ;
+gridQueueEle *head;
+gridQueueEle *tail;
+int numEles;
public:
- GridQueue( )
- {
- head = NULL ;
- tail = NULL ;
- numEles = 0 ;
- }
+GridQueue( )
+{
+ head = NULL;
+ tail = NULL;
+ numEles = 0;
+}
+
+gridQueueEle *getHead( )
+{
+ return head;
+}
+
+int getNumElements( )
+{
+ return numEles;
+}
- gridQueueEle* getHead( )
+
+void pushQueue(int st[3], int dir)
+{
+ gridQueueEle *ele = new gridQueueEle;
+ ele->x = st[0];
+ ele->y = st[1];
+ ele->z = st[2];
+ ele->dir = (UCHAR) dir;
+ ele->next = NULL;
+ if (head == NULL)
{
- return head ;
+ head = ele;
}
+ else {
+ tail->next = ele;
+ }
+ tail = ele;
+ numEles++;
+}
- int getNumElements( )
+int popQueue(int st[3], int& dir)
+{
+ if (head == NULL)
{
- return numEles ;
+ return 0;
}
+ st[0] = head->x;
+ st[1] = head->y;
+ st[2] = head->z;
+ dir = (int) (head->dir);
- void pushQueue( int st[3], int dir )
- {
- gridQueueEle* ele = new gridQueueEle ;
- ele->x = st[0] ;
- ele->y = st[1] ;
- ele->z = st[2] ;
- ele->dir = (UCHAR) dir ;
- ele->next = NULL ;
- if ( head == NULL )
- {
- head = ele ;
- }
- else
- {
- tail->next = ele ;
- }
- tail = ele ;
- numEles ++ ;
- }
+ gridQueueEle *temp = head;
+ head = head->next;
+ delete temp;
- int popQueue( int st[3], int& dir )
+ if (head == NULL)
{
- if ( head == NULL )
- {
- return 0 ;
- }
-
- st[0] = head->x ;
- st[1] = head->y ;
- st[2] = head->z ;
- dir = (int) (head->dir) ;
-
- gridQueueEle* temp = head ;
- head = head->next ;
- delete temp ;
-
- if ( head == NULL )
- {
- tail = NULL ;
- }
- numEles -- ;
-
- return 1 ;
+ tail = NULL;
}
+ numEles--;
+
+ return 1;
+}
};
diff --git a/intern/dualcon/intern/cubes.h b/intern/dualcon/intern/cubes.h
index 0cdd791a649..8b5125e261a 100644
--- a/intern/dualcon/intern/cubes.h
+++ b/intern/dualcon/intern/cubes.h
@@ -29,18 +29,18 @@
class Cubes
{
public:
- /// Get number of triangles
- int getNumTriangle(int mask)
- {
- return marching_cubes_numtri[mask];
- }
+/// Get number of triangles
+int getNumTriangle(int mask)
+{
+ return marching_cubes_numtri[mask];
+}
- /// Get a triangle
- void getTriangle(int mask, int index, int indices[3] )
- {
- for(int i = 0; i < 3; i++)
- indices[i] = marching_cubes_tris[mask][index][i];
- }
+/// Get a triangle
+void getTriangle(int mask, int index, int indices[3])
+{
+ for (int i = 0; i < 3; i++)
+ indices[i] = marching_cubes_tris[mask][index][i];
+}
};
#endif
diff --git a/intern/dualcon/intern/dualcon_c_api.cpp b/intern/dualcon/intern/dualcon_c_api.cpp
index af5ada71146..894ab6b0873 100644
--- a/intern/dualcon/intern/dualcon_c_api.cpp
+++ b/intern/dualcon/intern/dualcon_c_api.cpp
@@ -40,166 +40,169 @@ void veccopy(float dst[3], const float src[3])
}
#define GET_FACE(_mesh, _n) \
- (*(DualConFaces)(((char*)(_mesh)->faces) + ((_n) * (_mesh)->face_stride)))
+ (*(DualConFaces)(((char *)(_mesh)->faces) + ((_n) * (_mesh)->face_stride)))
#define GET_CO(_mesh, _n) \
- (*(DualConCo)(((char*)(_mesh)->co) + ((_n) * (_mesh)->co_stride)))
+ (*(DualConCo)(((char *)(_mesh)->co) + ((_n) * (_mesh)->co_stride)))
class DualConInputReader : public ModelReader
{
private:
- const DualConInput *input_mesh;
- int tottri, curface, offset;
- float min[3], max[3], maxsize;
- float scale;
+const DualConInput *input_mesh;
+int tottri, curface, offset;
+float min[3], max[3], maxsize;
+float scale;
public:
- DualConInputReader(const DualConInput *mesh, float _scale)
+DualConInputReader(const DualConInput *mesh, float _scale)
: input_mesh(mesh), scale(_scale)
- {
- reset();
+{
+ reset();
+}
+
+void reset()
+{
+ tottri = 0;
+ curface = 0;
+ offset = 0;
+ maxsize = 0;
+
+ /* initialize tottri */
+ for (int i = 0; i < input_mesh->totface; i++)
+ tottri += GET_FACE(input_mesh, i)[3] ? 2 : 1;
+
+ veccopy(min, input_mesh->min);
+ veccopy(max, input_mesh->max);
+
+ /* initialize maxsize */
+ for (int i = 0; i < 3; i++) {
+ float d = max[i] - min[i];
+ if (d > maxsize)
+ maxsize = d;
}
- void reset()
+ /* redo the bounds */
+ for (int i = 0; i < 3; i++)
{
- tottri = 0;
- curface = 0;
- offset = 0;
- maxsize = 0;
-
- /* initialize tottri */
- for(int i = 0; i < input_mesh->totface; i++)
- tottri += GET_FACE(input_mesh, i)[3] ? 2 : 1;
+ min[i] = (max[i] + min[i]) / 2 - maxsize / 2;
+ max[i] = (max[i] + min[i]) / 2 + maxsize / 2;
+ }
- veccopy(min, input_mesh->min);
- veccopy(max, input_mesh->max);
+ for (int i = 0; i < 3; i++)
+ min[i] -= maxsize * (1 / scale - 1) / 2;
+ maxsize *= 1 / scale;
+}
- /* initialize maxsize */
- for(int i = 0; i < 3; i++) {
- float d = max[i] - min[i];
- if(d > maxsize)
- maxsize = d;
- }
+Triangle *getNextTriangle()
+{
+ if (curface == input_mesh->totface)
+ return 0;
- /* redo the bounds */
- for(int i = 0; i < 3; i++)
- {
- min[i] = (max[i] + min[i]) / 2 - maxsize / 2;
- max[i] = (max[i] + min[i]) / 2 + maxsize / 2;
- }
+ Triangle *t = new Triangle();
- for(int i = 0; i < 3; i++)
- min[i] -= maxsize * (1 / scale - 1) / 2;
- maxsize *= 1 / scale;
+ unsigned int *f = GET_FACE(input_mesh, curface);
+ if (offset == 0) {
+ veccopy(t->vt[0], GET_CO(input_mesh, f[0]));
+ veccopy(t->vt[1], GET_CO(input_mesh, f[1]));
+ veccopy(t->vt[2], GET_CO(input_mesh, f[2]));
+ }
+ else {
+ veccopy(t->vt[0], GET_CO(input_mesh, f[2]));
+ veccopy(t->vt[1], GET_CO(input_mesh, f[3]));
+ veccopy(t->vt[2], GET_CO(input_mesh, f[0]));
}
- Triangle* getNextTriangle()
- {
- if(curface == input_mesh->totface)
- return 0;
-
- Triangle* t = new Triangle();
-
- unsigned int *f = GET_FACE(input_mesh, curface);
- if(offset == 0) {
- veccopy(t->vt[0], GET_CO(input_mesh, f[0]));
- veccopy(t->vt[1], GET_CO(input_mesh, f[1]));
- veccopy(t->vt[2], GET_CO(input_mesh, f[2]));
- }
- else {
- veccopy(t->vt[0], GET_CO(input_mesh, f[2]));
- veccopy(t->vt[1], GET_CO(input_mesh, f[3]));
- veccopy(t->vt[2], GET_CO(input_mesh, f[0]));
- }
-
- if(offset == 0 && f[3])
- offset++;
- else {
- offset = 0;
- curface++;
- }
-
- /* remove triangle if it contains invalid coords */
- for(int i = 0; i < 3; i++) {
- const float *co = t->vt[i];
- if(isnan(co[0]) || isnan(co[1]) || isnan(co[2])) {
- delete t;
- return getNextTriangle();
- }
- }
-
- return t;
+ if (offset == 0 && f[3])
+ offset++;
+ else {
+ offset = 0;
+ curface++;
}
- int getNextTriangle(int t[3])
- {
- if(curface == input_mesh->totface)
- return 0;
-
- unsigned int *f = GET_FACE(input_mesh, curface);
- if(offset == 0) {
- t[0] = f[0];
- t[1] = f[1];
- t[2] = f[2];
- }
- else {
- t[0] = f[2];
- t[1] = f[3];
- t[2] = f[0];
+ /* remove triangle if it contains invalid coords */
+ for (int i = 0; i < 3; i++) {
+ const float *co = t->vt[i];
+ if (isnan(co[0]) || isnan(co[1]) || isnan(co[2])) {
+ delete t;
+ return getNextTriangle();
}
+ }
- if(offset == 0 && f[3])
- offset++;
- else {
- offset = 0;
- curface++;
- }
+ return t;
+}
- return 1;
+int getNextTriangle(int t[3])
+{
+ if (curface == input_mesh->totface)
+ return 0;
+
+ unsigned int *f = GET_FACE(input_mesh, curface);
+ if (offset == 0) {
+ t[0] = f[0];
+ t[1] = f[1];
+ t[2] = f[2];
}
-
- int getNumTriangles()
- {
- return tottri;
+ else {
+ t[0] = f[2];
+ t[1] = f[3];
+ t[2] = f[0];
}
- int getNumVertices()
- {
- return input_mesh->totco;
+ if (offset == 0 && f[3])
+ offset++;
+ else {
+ offset = 0;
+ curface++;
}
- float getBoundingBox(float origin[3])
- {
- veccopy(origin, min);
- return maxsize ;
- }
+ return 1;
+}
- /* output */
- void getNextVertex(float v[3])
- {
- /* not used */
- }
+int getNumTriangles()
+{
+ return tottri;
+}
+
+int getNumVertices()
+{
+ return input_mesh->totco;
+}
+
+float getBoundingBox(float origin[3])
+{
+ veccopy(origin, min);
+ return maxsize;
+}
+
+/* output */
+void getNextVertex(float v[3])
+{
+ /* not used */
+}
- /* stubs */
- void printInfo() {}
- int getMemory() { return sizeof(DualConInputReader); }
+/* stubs */
+void printInfo() {
+}
+int getMemory() {
+ return sizeof(DualConInputReader);
+}
};
void *dualcon(const DualConInput *input_mesh,
- /* callbacks for output */
- DualConAllocOutput alloc_output,
- DualConAddVert add_vert,
- DualConAddQuad add_quad,
-
- DualConFlags flags,
- DualConMode mode,
- float threshold,
- float hermite_num,
- float scale,
- int depth)
+ /* callbacks for output */
+ DualConAllocOutput alloc_output,
+ DualConAddVert add_vert,
+ DualConAddQuad add_quad,
+
+ DualConFlags flags,
+ DualConMode mode,
+ float threshold,
+ float hermite_num,
+ float scale,
+ int depth)
{
DualConInputReader r(input_mesh, scale);
Octree o(&r, alloc_output, add_vert, add_quad,
- flags, mode, depth, threshold, hermite_num);
+ flags, mode, depth, threshold, hermite_num);
o.scanConvert();
return o.getOutputMesh();
}
diff --git a/intern/dualcon/intern/marching_cubes_table.cpp b/intern/dualcon/intern/marching_cubes_table.cpp
index 4c78108deb5..012757e8a25 100644
--- a/intern/dualcon/intern/marching_cubes_table.cpp
+++ b/intern/dualcon/intern/marching_cubes_table.cpp
@@ -39,516 +39,516 @@ const int marching_cubes_numtri[TOTCONF] = {
/* table of triangles in each configuration */
const int marching_cubes_tris[TOTCONF][MAX_TRIS][3] = {
- {{0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,0,8}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,1,5}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,0,1}, {4,1,5}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,9,2}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,8,9}, {0,9,2}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{1,5,9}, {1,9,2}, {1,2,4}, {1,4,8}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,1,5}, {0,5,9}, {0,9,2}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{5,3,9}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,8,5}, {0,5,3}, {0,3,9}, {0,9,4}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,1,3}, {8,3,9}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,0,1}, {4,1,3}, {4,3,9}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,5,3}, {4,3,2}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,8,5}, {0,5,3}, {0,3,2}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,8,1}, {4,1,3}, {4,3,2}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,1,3}, {0,3,2}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,6,10}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,4,6}, {8,6,10}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{6,10,1}, {6,1,5}, {6,5,8}, {6,8,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,6,10}, {4,10,1}, {4,1,5}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,0,4}, {10,4,9}, {10,9,2}, {10,2,6}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{6,10,8}, {6,8,9}, {6,9,2}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,8,0}, {6,10,1}, {6,1,5}, {6,5,9}, {6,9,2},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{6,10,1}, {6,1,5}, {6,5,9}, {6,9,2}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,0,5}, {0,6,9}, {9,5,0}, {6,10,3}, {5,3,10},
- {3,9,6}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,8,5}, {10,5,3}, {9,4,6}, {6,10,3}, {6,3,9},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,1,3}, {9,8,0}, {9,0,6}, {6,10,3}, {6,3,9},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,6,10}, {4,10,1}, {4,1,3}, {4,3,9}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,4,5}, {3,2,6}, {3,6,10}, {10,0,5}, {10,5,3},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{6,10,8}, {6,8,5}, {6,5,3}, {6,3,2}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,8,0}, {6,10,1}, {6,1,3}, {6,3,2}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{6,10,1}, {6,1,3}, {6,3,2}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,7,1}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,0,10}, {4,10,7}, {4,7,1}, {4,1,8}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,10,7}, {8,7,5}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,0,10}, {4,10,7}, {4,7,5}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,2,4}, {10,4,1}, {7,2,10}, {1,9,7}, {1,4,9},
- {9,2,7}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{1,8,9}, {2,0,10}, {2,10,7}, {7,1,9}, {7,9,2},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,8,10}, {7,5,9}, {7,9,2}, {2,4,10}, {2,10,7},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,10,7}, {0,7,5}, {0,5,9}, {0,9,2}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,7,3}, {10,3,9}, {10,9,5}, {10,5,1}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,5,1}, {4,0,10}, {4,10,7}, {4,7,3}, {4,3,9},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,10,7}, {8,7,3}, {8,3,9}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,0,10}, {4,10,7}, {4,7,3}, {4,3,9}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,5,1}, {4,1,10}, {7,3,2}, {2,4,10}, {2,10,7},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,5,1}, {0,10,7}, {0,7,3}, {0,3,2}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,8,10}, {4,10,7}, {4,7,3}, {4,3,2}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,10,7}, {0,7,3}, {0,3,2}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,6,7}, {0,7,1}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,4,6}, {8,6,7}, {8,7,1}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,0,6}, {8,6,7}, {8,7,5}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,6,7}, {4,7,5}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{1,0,4}, {1,4,9}, {2,6,7}, {7,1,9}, {7,9,2},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{6,7,1}, {6,1,8}, {6,8,9}, {6,9,2}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,8,0}, {6,7,5}, {6,5,9}, {6,9,2}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{6,7,5}, {6,5,9}, {6,9,2}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{5,1,0}, {6,7,3}, {6,3,9}, {9,5,0}, {9,0,6},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,5,1}, {4,6,7}, {4,7,3}, {4,3,9}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,0,6}, {8,6,7}, {8,7,3}, {8,3,9}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,6,7}, {4,7,3}, {4,3,9}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,4,5}, {0,5,1}, {6,7,3}, {6,3,2}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,5,1}, {6,7,3}, {6,3,2}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,8,0}, {6,7,3}, {6,3,2}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{6,7,3}, {6,3,2}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{6,2,11}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,4,2}, {8,2,11}, {8,11,6}, {8,6,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,1,6}, {6,1,11}, {11,1,5}, {2,11,5}, {2,5,8},
- {6,2,8}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{6,0,1}, {5,4,2}, {5,2,11}, {11,6,1}, {11,1,5},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{6,4,9}, {6,9,11}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{6,0,8}, {6,8,9}, {6,9,11}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{6,4,8}, {6,8,1}, {5,9,11}, {11,6,1}, {11,1,5},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{6,0,1}, {6,1,5}, {6,5,9}, {6,9,11}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{6,2,9}, {6,9,5}, {6,5,3}, {6,3,11}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,2,9}, {6,0,8}, {6,8,5}, {6,5,3}, {6,3,11},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{2,9,8}, {1,3,11}, {1,11,6}, {6,2,8}, {6,8,1},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,2,9}, {6,0,1}, {6,1,3}, {6,3,11}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{6,4,5}, {6,5,3}, {6,3,11}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{6,0,8}, {6,8,5}, {6,5,3}, {6,3,11}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{6,4,8}, {6,8,1}, {6,1,3}, {6,3,11}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{6,0,1}, {6,1,3}, {6,3,11}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,0,2}, {10,2,11}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,8,4}, {10,4,2}, {10,2,11}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,0,2}, {11,10,1}, {11,1,5}, {5,8,2}, {5,2,11},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,1,5}, {10,5,4}, {10,4,2}, {10,2,11}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,0,4}, {10,4,9}, {10,9,11}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,8,9}, {10,9,11}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,8,0}, {10,1,5}, {10,5,9}, {10,9,11}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,1,5}, {10,5,9}, {10,9,11}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,2,9}, {0,9,5}, {3,11,10}, {10,0,5}, {10,5,3},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,2,9}, {10,8,5}, {10,5,3}, {10,3,11}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,0,2}, {8,2,9}, {10,1,3}, {10,3,11}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,2,9}, {10,1,3}, {10,3,11}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,0,4}, {10,4,5}, {10,5,3}, {10,3,11}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,8,5}, {10,5,3}, {10,3,11}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,8,0}, {10,1,3}, {10,3,11}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,1,3}, {10,3,11}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{1,10,6}, {1,6,2}, {1,2,11}, {1,11,7}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,10,6}, {7,1,8}, {7,8,4}, {7,4,2}, {7,2,11},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,10,6}, {8,6,2}, {11,7,5}, {5,8,2}, {5,2,11},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,10,6}, {7,5,4}, {7,4,2}, {7,2,11}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,6,4}, {9,11,7}, {9,7,1}, {1,10,4}, {1,4,9},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,10,6}, {7,1,8}, {7,8,9}, {7,9,11}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,8,10}, {4,10,6}, {7,5,9}, {7,9,11}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,10,6}, {7,5,9}, {7,9,11}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{5,1,10}, {5,10,6}, {5,6,2}, {5,2,9}, {7,3,11},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,10,6}, {8,5,1}, {4,2,9}, {7,3,11}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,10,6}, {8,6,2}, {8,2,9}, {7,3,11}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,10,6}, {4,2,9}, {7,3,11}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,6,4}, {10,4,5}, {10,5,1}, {7,3,11}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,10,6}, {8,5,1}, {7,3,11}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,8,10}, {4,10,6}, {7,3,11}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,10,6}, {7,3,11}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{7,1,0}, {7,0,2}, {7,2,11}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{7,1,8}, {7,8,4}, {7,4,2}, {7,2,11}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{7,5,8}, {7,8,0}, {7,0,2}, {7,2,11}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{7,5,4}, {7,4,2}, {7,2,11}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{7,1,0}, {7,0,4}, {7,4,9}, {7,9,11}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{7,1,8}, {7,8,9}, {7,9,11}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,8,0}, {7,5,9}, {7,9,11}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{7,5,9}, {7,9,11}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{5,1,0}, {5,0,2}, {5,2,9}, {7,3,11}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,5,1}, {4,2,9}, {7,3,11}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,0,2}, {8,2,9}, {7,3,11}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,2,9}, {7,3,11}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,4,5}, {0,5,1}, {7,3,11}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,5,1}, {7,3,11}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,8,0}, {7,3,11}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{7,3,11}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{7,11,3}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{7,11,0}, {7,0,8}, {0,11,4}, {8,3,7}, {11,3,4},
- {3,8,4}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,1,7}, {8,7,11}, {8,11,3}, {8,3,5}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,1,7}, {0,7,11}, {3,5,4}, {4,0,11}, {4,11,3},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,9,3}, {4,3,7}, {4,7,11}, {4,11,2}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,9,3}, {8,3,7}, {11,2,0}, {0,8,7}, {0,7,11},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{5,9,3}, {4,8,1}, {4,1,7}, {4,7,11}, {4,11,2},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{5,9,3}, {0,1,7}, {0,7,11}, {0,11,2}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{5,7,11}, {5,11,9}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,5,7}, {11,9,4}, {11,4,0}, {0,8,7}, {0,7,11},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,1,7}, {8,7,11}, {8,11,9}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,0,1}, {4,1,7}, {4,7,11}, {4,11,9}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,5,7}, {4,7,11}, {4,11,2}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,8,5}, {0,5,7}, {0,7,11}, {0,11,2}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,8,1}, {4,1,7}, {4,7,11}, {4,11,2}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,1,7}, {0,7,11}, {0,11,2}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,6,11}, {0,11,3}, {0,3,7}, {0,7,10}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{7,10,8}, {4,6,11}, {4,11,3}, {3,7,8}, {3,8,4},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,1,7}, {5,8,0}, {5,0,6}, {5,6,11}, {5,11,3},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,1,7}, {5,4,6}, {5,6,11}, {5,11,3}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{7,10,0}, {7,0,4}, {7,4,9}, {7,9,3}, {6,11,2},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{7,10,8}, {7,8,9}, {7,9,3}, {6,11,2}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,8,0}, {10,1,7}, {5,9,3}, {6,11,2}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,1,7}, {5,9,3}, {6,11,2}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{5,7,10}, {5,10,0}, {6,11,9}, {9,5,0}, {9,0,6},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,8,5}, {10,5,7}, {4,6,11}, {4,11,9}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,1,7}, {8,0,6}, {8,6,11}, {8,11,9}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,1,7}, {4,6,11}, {4,11,9}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,0,4}, {10,4,5}, {10,5,7}, {6,11,2}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,8,5}, {10,5,7}, {6,11,2}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,8,0}, {10,1,7}, {6,11,2}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,1,7}, {6,11,2}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{1,10,11}, {1,11,3}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,10,11}, {3,1,8}, {3,8,4}, {4,0,11}, {4,11,3},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{5,8,10}, {5,10,11}, {5,11,3}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{5,4,0}, {5,0,10}, {5,10,11}, {5,11,3}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{9,3,1}, {10,11,2}, {10,2,4}, {4,9,1}, {4,1,10},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{1,8,9}, {1,9,3}, {0,10,11}, {0,11,2}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{5,9,3}, {4,8,10}, {4,10,11}, {4,11,2}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{5,9,3}, {0,10,11}, {0,11,2}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{5,1,10}, {5,10,11}, {5,11,9}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,5,1}, {4,0,10}, {4,10,11}, {4,11,9}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,10,11}, {8,11,9}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,0,10}, {4,10,11}, {4,11,9}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,5,1}, {4,1,10}, {4,10,11}, {4,11,2}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,5,1}, {0,10,11}, {0,11,2}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,8,10}, {4,10,11}, {4,11,2}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,10,11}, {0,11,2}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{1,0,6}, {1,6,11}, {1,11,3}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{1,8,4}, {1,4,6}, {1,6,11}, {1,11,3}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{5,8,0}, {5,0,6}, {5,6,11}, {5,11,3}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{5,4,6}, {5,6,11}, {5,11,3}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{1,0,4}, {1,4,9}, {1,9,3}, {6,11,2}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{1,8,9}, {1,9,3}, {6,11,2}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,8,0}, {5,9,3}, {6,11,2}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{5,9,3}, {6,11,2}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{5,1,0}, {5,0,6}, {5,6,11}, {5,11,9}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,5,1}, {4,6,11}, {4,11,9}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,0,6}, {8,6,11}, {8,11,9}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,6,11}, {4,11,9}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,4,5}, {0,5,1}, {6,11,2}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,5,1}, {6,11,2}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,8,0}, {6,11,2}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{6,11,2}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{7,6,2}, {7,2,3}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{7,6,0}, {7,0,8}, {4,2,3}, {3,7,8}, {3,8,4},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{1,7,6}, {2,3,5}, {2,5,8}, {8,1,6}, {8,6,2},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{6,0,1}, {6,1,7}, {5,4,2}, {5,2,3}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{7,6,4}, {7,4,9}, {7,9,3}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{7,6,0}, {7,0,8}, {7,8,9}, {7,9,3}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{6,4,8}, {6,8,1}, {6,1,7}, {5,9,3}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{6,0,1}, {6,1,7}, {5,9,3}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{5,7,6}, {5,6,2}, {5,2,9}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{6,0,8}, {6,8,5}, {6,5,7}, {4,2,9}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,1,7}, {8,7,6}, {8,6,2}, {8,2,9}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{6,0,1}, {6,1,7}, {4,2,9}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{6,4,5}, {6,5,7}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{6,0,8}, {6,8,5}, {6,5,7}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{6,4,8}, {6,8,1}, {6,1,7}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{6,0,1}, {6,1,7}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{7,10,0}, {7,0,2}, {7,2,3}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{7,10,8}, {7,8,4}, {7,4,2}, {7,2,3}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,1,7}, {5,8,0}, {5,0,2}, {5,2,3}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,1,7}, {5,4,2}, {5,2,3}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{7,10,0}, {7,0,4}, {7,4,9}, {7,9,3}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{7,10,8}, {7,8,9}, {7,9,3}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,8,0}, {10,1,7}, {5,9,3}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,1,7}, {5,9,3}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{5,7,10}, {5,10,0}, {5,0,2}, {5,2,9}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,8,5}, {10,5,7}, {4,2,9}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,1,7}, {8,0,2}, {8,2,9}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,1,7}, {4,2,9}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,0,4}, {10,4,5}, {10,5,7}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,8,5}, {10,5,7}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,8,0}, {10,1,7}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,1,7}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{1,10,6}, {1,6,2}, {1,2,3}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,10,6}, {1,8,4}, {1,4,2}, {1,2,3}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{5,8,10}, {5,10,6}, {5,6,2}, {5,2,3}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,10,6}, {5,4,2}, {5,2,3}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{1,10,6}, {1,6,4}, {1,4,9}, {1,9,3}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,10,6}, {1,8,9}, {1,9,3}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,8,10}, {4,10,6}, {5,9,3}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,10,6}, {5,9,3}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{5,1,10}, {5,10,6}, {5,6,2}, {5,2,9}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,10,6}, {8,5,1}, {4,2,9}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,10,6}, {8,6,2}, {8,2,9}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,10,6}, {4,2,9}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{10,6,4}, {10,4,5}, {10,5,1}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,10,6}, {8,5,1}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,8,10}, {4,10,6}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,10,6}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{1,0,2}, {1,2,3}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{1,8,4}, {1,4,2}, {1,2,3}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{5,8,0}, {5,0,2}, {5,2,3}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{5,4,2}, {5,2,3}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{1,0,4}, {1,4,9}, {1,9,3}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{1,8,9}, {1,9,3}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,8,0}, {5,9,3}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{5,9,3}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{5,1,0}, {5,0,2}, {5,2,9}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,5,1}, {4,2,9}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,0,2}, {8,2,9}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,2,9}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,4,5}, {0,5,1}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{8,5,1}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{4,8,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}},
- {{0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0},
- {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}}
+ {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 0, 8}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 1, 5}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 0, 1}, {4, 1, 5}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 9, 2}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 8, 9}, {0, 9, 2}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{1, 5, 9}, {1, 9, 2}, {1, 2, 4}, {1, 4, 8}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 1, 5}, {0, 5, 9}, {0, 9, 2}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{5, 3, 9}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 8, 5}, {0, 5, 3}, {0, 3, 9}, {0, 9, 4}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 1, 3}, {8, 3, 9}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 0, 1}, {4, 1, 3}, {4, 3, 9}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 5, 3}, {4, 3, 2}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 8, 5}, {0, 5, 3}, {0, 3, 2}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 8, 1}, {4, 1, 3}, {4, 3, 2}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 1, 3}, {0, 3, 2}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 6, 10}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 4, 6}, {8, 6, 10}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{6, 10, 1}, {6, 1, 5}, {6, 5, 8}, {6, 8, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 6, 10}, {4, 10, 1}, {4, 1, 5}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 0, 4}, {10, 4, 9}, {10, 9, 2}, {10, 2, 6}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{6, 10, 8}, {6, 8, 9}, {6, 9, 2}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 8, 0}, {6, 10, 1}, {6, 1, 5}, {6, 5, 9}, {6, 9, 2},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{6, 10, 1}, {6, 1, 5}, {6, 5, 9}, {6, 9, 2}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 0, 5}, {0, 6, 9}, {9, 5, 0}, {6, 10, 3}, {5, 3, 10},
+ {3, 9, 6}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 8, 5}, {10, 5, 3}, {9, 4, 6}, {6, 10, 3}, {6, 3, 9},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 1, 3}, {9, 8, 0}, {9, 0, 6}, {6, 10, 3}, {6, 3, 9},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 6, 10}, {4, 10, 1}, {4, 1, 3}, {4, 3, 9}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 4, 5}, {3, 2, 6}, {3, 6, 10}, {10, 0, 5}, {10, 5, 3},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{6, 10, 8}, {6, 8, 5}, {6, 5, 3}, {6, 3, 2}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 8, 0}, {6, 10, 1}, {6, 1, 3}, {6, 3, 2}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{6, 10, 1}, {6, 1, 3}, {6, 3, 2}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 7, 1}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 0, 10}, {4, 10, 7}, {4, 7, 1}, {4, 1, 8}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 10, 7}, {8, 7, 5}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 0, 10}, {4, 10, 7}, {4, 7, 5}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 2, 4}, {10, 4, 1}, {7, 2, 10}, {1, 9, 7}, {1, 4, 9},
+ {9, 2, 7}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{1, 8, 9}, {2, 0, 10}, {2, 10, 7}, {7, 1, 9}, {7, 9, 2},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 8, 10}, {7, 5, 9}, {7, 9, 2}, {2, 4, 10}, {2, 10, 7},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 10, 7}, {0, 7, 5}, {0, 5, 9}, {0, 9, 2}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 7, 3}, {10, 3, 9}, {10, 9, 5}, {10, 5, 1}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 5, 1}, {4, 0, 10}, {4, 10, 7}, {4, 7, 3}, {4, 3, 9},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 10, 7}, {8, 7, 3}, {8, 3, 9}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 0, 10}, {4, 10, 7}, {4, 7, 3}, {4, 3, 9}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 5, 1}, {4, 1, 10}, {7, 3, 2}, {2, 4, 10}, {2, 10, 7},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 5, 1}, {0, 10, 7}, {0, 7, 3}, {0, 3, 2}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 8, 10}, {4, 10, 7}, {4, 7, 3}, {4, 3, 2}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 10, 7}, {0, 7, 3}, {0, 3, 2}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 6, 7}, {0, 7, 1}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 4, 6}, {8, 6, 7}, {8, 7, 1}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 0, 6}, {8, 6, 7}, {8, 7, 5}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 6, 7}, {4, 7, 5}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{1, 0, 4}, {1, 4, 9}, {2, 6, 7}, {7, 1, 9}, {7, 9, 2},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{6, 7, 1}, {6, 1, 8}, {6, 8, 9}, {6, 9, 2}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 8, 0}, {6, 7, 5}, {6, 5, 9}, {6, 9, 2}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{6, 7, 5}, {6, 5, 9}, {6, 9, 2}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{5, 1, 0}, {6, 7, 3}, {6, 3, 9}, {9, 5, 0}, {9, 0, 6},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 5, 1}, {4, 6, 7}, {4, 7, 3}, {4, 3, 9}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 0, 6}, {8, 6, 7}, {8, 7, 3}, {8, 3, 9}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 6, 7}, {4, 7, 3}, {4, 3, 9}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 4, 5}, {0, 5, 1}, {6, 7, 3}, {6, 3, 2}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 5, 1}, {6, 7, 3}, {6, 3, 2}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 8, 0}, {6, 7, 3}, {6, 3, 2}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{6, 7, 3}, {6, 3, 2}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{6, 2, 11}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 4, 2}, {8, 2, 11}, {8, 11, 6}, {8, 6, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 1, 6}, {6, 1, 11}, {11, 1, 5}, {2, 11, 5}, {2, 5, 8},
+ {6, 2, 8}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{6, 0, 1}, {5, 4, 2}, {5, 2, 11}, {11, 6, 1}, {11, 1, 5},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{6, 4, 9}, {6, 9, 11}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{6, 0, 8}, {6, 8, 9}, {6, 9, 11}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{6, 4, 8}, {6, 8, 1}, {5, 9, 11}, {11, 6, 1}, {11, 1, 5},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{6, 0, 1}, {6, 1, 5}, {6, 5, 9}, {6, 9, 11}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{6, 2, 9}, {6, 9, 5}, {6, 5, 3}, {6, 3, 11}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 2, 9}, {6, 0, 8}, {6, 8, 5}, {6, 5, 3}, {6, 3, 11},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{2, 9, 8}, {1, 3, 11}, {1, 11, 6}, {6, 2, 8}, {6, 8, 1},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 2, 9}, {6, 0, 1}, {6, 1, 3}, {6, 3, 11}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{6, 4, 5}, {6, 5, 3}, {6, 3, 11}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{6, 0, 8}, {6, 8, 5}, {6, 5, 3}, {6, 3, 11}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{6, 4, 8}, {6, 8, 1}, {6, 1, 3}, {6, 3, 11}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{6, 0, 1}, {6, 1, 3}, {6, 3, 11}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 0, 2}, {10, 2, 11}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 8, 4}, {10, 4, 2}, {10, 2, 11}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 0, 2}, {11, 10, 1}, {11, 1, 5}, {5, 8, 2}, {5, 2, 11},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 1, 5}, {10, 5, 4}, {10, 4, 2}, {10, 2, 11}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 0, 4}, {10, 4, 9}, {10, 9, 11}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 8, 9}, {10, 9, 11}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 8, 0}, {10, 1, 5}, {10, 5, 9}, {10, 9, 11}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 1, 5}, {10, 5, 9}, {10, 9, 11}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 2, 9}, {0, 9, 5}, {3, 11, 10}, {10, 0, 5}, {10, 5, 3},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 2, 9}, {10, 8, 5}, {10, 5, 3}, {10, 3, 11}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 0, 2}, {8, 2, 9}, {10, 1, 3}, {10, 3, 11}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 2, 9}, {10, 1, 3}, {10, 3, 11}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 0, 4}, {10, 4, 5}, {10, 5, 3}, {10, 3, 11}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 8, 5}, {10, 5, 3}, {10, 3, 11}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 8, 0}, {10, 1, 3}, {10, 3, 11}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 1, 3}, {10, 3, 11}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{1, 10, 6}, {1, 6, 2}, {1, 2, 11}, {1, 11, 7}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 10, 6}, {7, 1, 8}, {7, 8, 4}, {7, 4, 2}, {7, 2, 11},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 10, 6}, {8, 6, 2}, {11, 7, 5}, {5, 8, 2}, {5, 2, 11},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 10, 6}, {7, 5, 4}, {7, 4, 2}, {7, 2, 11}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 6, 4}, {9, 11, 7}, {9, 7, 1}, {1, 10, 4}, {1, 4, 9},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 10, 6}, {7, 1, 8}, {7, 8, 9}, {7, 9, 11}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 8, 10}, {4, 10, 6}, {7, 5, 9}, {7, 9, 11}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 10, 6}, {7, 5, 9}, {7, 9, 11}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{5, 1, 10}, {5, 10, 6}, {5, 6, 2}, {5, 2, 9}, {7, 3, 11},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 10, 6}, {8, 5, 1}, {4, 2, 9}, {7, 3, 11}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 10, 6}, {8, 6, 2}, {8, 2, 9}, {7, 3, 11}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 10, 6}, {4, 2, 9}, {7, 3, 11}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 6, 4}, {10, 4, 5}, {10, 5, 1}, {7, 3, 11}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 10, 6}, {8, 5, 1}, {7, 3, 11}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 8, 10}, {4, 10, 6}, {7, 3, 11}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 10, 6}, {7, 3, 11}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{7, 1, 0}, {7, 0, 2}, {7, 2, 11}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{7, 1, 8}, {7, 8, 4}, {7, 4, 2}, {7, 2, 11}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{7, 5, 8}, {7, 8, 0}, {7, 0, 2}, {7, 2, 11}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{7, 5, 4}, {7, 4, 2}, {7, 2, 11}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{7, 1, 0}, {7, 0, 4}, {7, 4, 9}, {7, 9, 11}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{7, 1, 8}, {7, 8, 9}, {7, 9, 11}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 8, 0}, {7, 5, 9}, {7, 9, 11}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{7, 5, 9}, {7, 9, 11}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{5, 1, 0}, {5, 0, 2}, {5, 2, 9}, {7, 3, 11}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 5, 1}, {4, 2, 9}, {7, 3, 11}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 0, 2}, {8, 2, 9}, {7, 3, 11}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 2, 9}, {7, 3, 11}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 4, 5}, {0, 5, 1}, {7, 3, 11}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 5, 1}, {7, 3, 11}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 8, 0}, {7, 3, 11}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{7, 3, 11}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{7, 11, 3}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{7, 11, 0}, {7, 0, 8}, {0, 11, 4}, {8, 3, 7}, {11, 3, 4},
+ {3, 8, 4}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 1, 7}, {8, 7, 11}, {8, 11, 3}, {8, 3, 5}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 1, 7}, {0, 7, 11}, {3, 5, 4}, {4, 0, 11}, {4, 11, 3},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 9, 3}, {4, 3, 7}, {4, 7, 11}, {4, 11, 2}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 9, 3}, {8, 3, 7}, {11, 2, 0}, {0, 8, 7}, {0, 7, 11},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{5, 9, 3}, {4, 8, 1}, {4, 1, 7}, {4, 7, 11}, {4, 11, 2},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{5, 9, 3}, {0, 1, 7}, {0, 7, 11}, {0, 11, 2}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{5, 7, 11}, {5, 11, 9}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 5, 7}, {11, 9, 4}, {11, 4, 0}, {0, 8, 7}, {0, 7, 11},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 1, 7}, {8, 7, 11}, {8, 11, 9}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 0, 1}, {4, 1, 7}, {4, 7, 11}, {4, 11, 9}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 5, 7}, {4, 7, 11}, {4, 11, 2}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 8, 5}, {0, 5, 7}, {0, 7, 11}, {0, 11, 2}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 8, 1}, {4, 1, 7}, {4, 7, 11}, {4, 11, 2}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 1, 7}, {0, 7, 11}, {0, 11, 2}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 6, 11}, {0, 11, 3}, {0, 3, 7}, {0, 7, 10}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{7, 10, 8}, {4, 6, 11}, {4, 11, 3}, {3, 7, 8}, {3, 8, 4},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 1, 7}, {5, 8, 0}, {5, 0, 6}, {5, 6, 11}, {5, 11, 3},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 1, 7}, {5, 4, 6}, {5, 6, 11}, {5, 11, 3}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{7, 10, 0}, {7, 0, 4}, {7, 4, 9}, {7, 9, 3}, {6, 11, 2},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{7, 10, 8}, {7, 8, 9}, {7, 9, 3}, {6, 11, 2}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 8, 0}, {10, 1, 7}, {5, 9, 3}, {6, 11, 2}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 1, 7}, {5, 9, 3}, {6, 11, 2}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{5, 7, 10}, {5, 10, 0}, {6, 11, 9}, {9, 5, 0}, {9, 0, 6},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 8, 5}, {10, 5, 7}, {4, 6, 11}, {4, 11, 9}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 1, 7}, {8, 0, 6}, {8, 6, 11}, {8, 11, 9}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 1, 7}, {4, 6, 11}, {4, 11, 9}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 0, 4}, {10, 4, 5}, {10, 5, 7}, {6, 11, 2}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 8, 5}, {10, 5, 7}, {6, 11, 2}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 8, 0}, {10, 1, 7}, {6, 11, 2}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 1, 7}, {6, 11, 2}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{1, 10, 11}, {1, 11, 3}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 10, 11}, {3, 1, 8}, {3, 8, 4}, {4, 0, 11}, {4, 11, 3},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{5, 8, 10}, {5, 10, 11}, {5, 11, 3}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{5, 4, 0}, {5, 0, 10}, {5, 10, 11}, {5, 11, 3}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{9, 3, 1}, {10, 11, 2}, {10, 2, 4}, {4, 9, 1}, {4, 1, 10},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{1, 8, 9}, {1, 9, 3}, {0, 10, 11}, {0, 11, 2}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{5, 9, 3}, {4, 8, 10}, {4, 10, 11}, {4, 11, 2}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{5, 9, 3}, {0, 10, 11}, {0, 11, 2}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{5, 1, 10}, {5, 10, 11}, {5, 11, 9}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 5, 1}, {4, 0, 10}, {4, 10, 11}, {4, 11, 9}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 10, 11}, {8, 11, 9}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 0, 10}, {4, 10, 11}, {4, 11, 9}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 5, 1}, {4, 1, 10}, {4, 10, 11}, {4, 11, 2}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 5, 1}, {0, 10, 11}, {0, 11, 2}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 8, 10}, {4, 10, 11}, {4, 11, 2}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 10, 11}, {0, 11, 2}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{1, 0, 6}, {1, 6, 11}, {1, 11, 3}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{1, 8, 4}, {1, 4, 6}, {1, 6, 11}, {1, 11, 3}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{5, 8, 0}, {5, 0, 6}, {5, 6, 11}, {5, 11, 3}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{5, 4, 6}, {5, 6, 11}, {5, 11, 3}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{1, 0, 4}, {1, 4, 9}, {1, 9, 3}, {6, 11, 2}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{1, 8, 9}, {1, 9, 3}, {6, 11, 2}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 8, 0}, {5, 9, 3}, {6, 11, 2}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{5, 9, 3}, {6, 11, 2}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{5, 1, 0}, {5, 0, 6}, {5, 6, 11}, {5, 11, 9}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 5, 1}, {4, 6, 11}, {4, 11, 9}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 0, 6}, {8, 6, 11}, {8, 11, 9}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 6, 11}, {4, 11, 9}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 4, 5}, {0, 5, 1}, {6, 11, 2}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 5, 1}, {6, 11, 2}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 8, 0}, {6, 11, 2}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{6, 11, 2}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{7, 6, 2}, {7, 2, 3}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{7, 6, 0}, {7, 0, 8}, {4, 2, 3}, {3, 7, 8}, {3, 8, 4},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{1, 7, 6}, {2, 3, 5}, {2, 5, 8}, {8, 1, 6}, {8, 6, 2},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{6, 0, 1}, {6, 1, 7}, {5, 4, 2}, {5, 2, 3}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{7, 6, 4}, {7, 4, 9}, {7, 9, 3}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{7, 6, 0}, {7, 0, 8}, {7, 8, 9}, {7, 9, 3}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{6, 4, 8}, {6, 8, 1}, {6, 1, 7}, {5, 9, 3}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{6, 0, 1}, {6, 1, 7}, {5, 9, 3}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{5, 7, 6}, {5, 6, 2}, {5, 2, 9}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{6, 0, 8}, {6, 8, 5}, {6, 5, 7}, {4, 2, 9}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 1, 7}, {8, 7, 6}, {8, 6, 2}, {8, 2, 9}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{6, 0, 1}, {6, 1, 7}, {4, 2, 9}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{6, 4, 5}, {6, 5, 7}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{6, 0, 8}, {6, 8, 5}, {6, 5, 7}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{6, 4, 8}, {6, 8, 1}, {6, 1, 7}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{6, 0, 1}, {6, 1, 7}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{7, 10, 0}, {7, 0, 2}, {7, 2, 3}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{7, 10, 8}, {7, 8, 4}, {7, 4, 2}, {7, 2, 3}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 1, 7}, {5, 8, 0}, {5, 0, 2}, {5, 2, 3}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 1, 7}, {5, 4, 2}, {5, 2, 3}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{7, 10, 0}, {7, 0, 4}, {7, 4, 9}, {7, 9, 3}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{7, 10, 8}, {7, 8, 9}, {7, 9, 3}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 8, 0}, {10, 1, 7}, {5, 9, 3}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 1, 7}, {5, 9, 3}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{5, 7, 10}, {5, 10, 0}, {5, 0, 2}, {5, 2, 9}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 8, 5}, {10, 5, 7}, {4, 2, 9}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 1, 7}, {8, 0, 2}, {8, 2, 9}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 1, 7}, {4, 2, 9}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 0, 4}, {10, 4, 5}, {10, 5, 7}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 8, 5}, {10, 5, 7}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 8, 0}, {10, 1, 7}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 1, 7}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{1, 10, 6}, {1, 6, 2}, {1, 2, 3}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 10, 6}, {1, 8, 4}, {1, 4, 2}, {1, 2, 3}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{5, 8, 10}, {5, 10, 6}, {5, 6, 2}, {5, 2, 3}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 10, 6}, {5, 4, 2}, {5, 2, 3}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{1, 10, 6}, {1, 6, 4}, {1, 4, 9}, {1, 9, 3}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 10, 6}, {1, 8, 9}, {1, 9, 3}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 8, 10}, {4, 10, 6}, {5, 9, 3}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 10, 6}, {5, 9, 3}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{5, 1, 10}, {5, 10, 6}, {5, 6, 2}, {5, 2, 9}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 10, 6}, {8, 5, 1}, {4, 2, 9}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 10, 6}, {8, 6, 2}, {8, 2, 9}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 10, 6}, {4, 2, 9}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{10, 6, 4}, {10, 4, 5}, {10, 5, 1}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 10, 6}, {8, 5, 1}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 8, 10}, {4, 10, 6}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 10, 6}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{1, 0, 2}, {1, 2, 3}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{1, 8, 4}, {1, 4, 2}, {1, 2, 3}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{5, 8, 0}, {5, 0, 2}, {5, 2, 3}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{5, 4, 2}, {5, 2, 3}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{1, 0, 4}, {1, 4, 9}, {1, 9, 3}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{1, 8, 9}, {1, 9, 3}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 8, 0}, {5, 9, 3}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{5, 9, 3}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{5, 1, 0}, {5, 0, 2}, {5, 2, 9}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 5, 1}, {4, 2, 9}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 0, 2}, {8, 2, 9}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 2, 9}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 4, 5}, {0, 5, 1}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{8, 5, 1}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{4, 8, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},
+ {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
+ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}}
};
diff --git a/intern/dualcon/intern/octree.cpp b/intern/dualcon/intern/octree.cpp
index 38b130f979b..c5f50d8af4e 100644
--- a/intern/dualcon/intern/octree.cpp
+++ b/intern/dualcon/intern/octree.cpp
@@ -39,38 +39,38 @@
#define dc_printf printf
#else
/* disable debug printfs */
-#define dc_printf(...) do {} while(0)
+#define dc_printf(...) do {} while (0)
#endif
-Octree::Octree(ModelReader* mr,
- DualConAllocOutput alloc_output_func,
- DualConAddVert add_vert_func,
- DualConAddQuad add_quad_func,
- DualConFlags flags, DualConMode dualcon_mode, int depth,
- float threshold, float sharpness)
+Octree::Octree(ModelReader *mr,
+ DualConAllocOutput alloc_output_func,
+ DualConAddVert add_vert_func,
+ DualConAddQuad add_quad_func,
+ DualConFlags flags, DualConMode dualcon_mode, int depth,
+ float threshold, float sharpness)
: use_flood_fill(flags & DUALCON_FLOOD_FILL),
- /* note on `use_manifold':
-
- After playing around with this option, the only case I could
- find where this option gives different results is on
- relatively thin corners. Sometimes along these corners two
- vertices from seperate sides will be placed in the same
- position, so hole gets filled with a 5-sided face, where two
- of those vertices are in the same 3D location. If
- `use_manifold' is disabled, then the modifier doesn't
- generate two separate vertices so the results end up as all
- quads.
-
- Since the results are just as good with all quads, there
- doesn't seem any reason to allow this to be toggled in
- Blender. -nicholasbishop
- */
- use_manifold(false),
- hermite_num(sharpness),
- mode(dualcon_mode),
- alloc_output(alloc_output_func),
- add_vert(add_vert_func),
- add_quad(add_quad_func)
+ /* note on `use_manifold':
+
+ After playing around with this option, the only case I could
+ find where this option gives different results is on
+ relatively thin corners. Sometimes along these corners two
+ vertices from seperate sides will be placed in the same
+ position, so hole gets filled with a 5-sided face, where two
+ of those vertices are in the same 3D location. If
+ `use_manifold' is disabled, then the modifier doesn't
+ generate two separate vertices so the results end up as all
+ quads.
+
+ Since the results are just as good with all quads, there
+ doesn't seem any reason to allow this to be toggled in
+ Blender. -nicholasbishop
+ */
+ use_manifold(false),
+ hermite_num(sharpness),
+ mode(dualcon_mode),
+ alloc_output(alloc_output_func),
+ add_vert(add_vert_func),
+ add_quad(add_quad_func)
{
thresh = threshold;
reader = mr;
@@ -78,8 +78,8 @@ Octree::Octree(ModelReader* mr,
range = reader->getBoundingBox(origin);
nodeCount = nodeSpace = 0;
maxDepth = depth;
- mindimen =(dimen >> maxDepth);
- minshift =(GRID_DIMENSION - maxDepth);
+ mindimen = (dimen >> maxDepth);
+ minshift = (GRID_DIMENSION - maxDepth);
buildTable();
maxTrianglePerCell = 0;
@@ -90,7 +90,7 @@ Octree::Octree(ModelReader* mr,
dc_printf("Initialize memory...\n");
#endif
initMemory();
- root = (Node*)createInternal(0);
+ root = (Node *)createInternal(0);
// Read MC table
#ifdef IN_VERBOSE_MODE
@@ -112,15 +112,15 @@ void Octree::scanConvert()
clock_t start, finish;
start = clock();
#endif
-
+
addTrian();
resetMinimalEdges();
preparePrimalEdgesMask(&root->internal);
#if DC_DEBUG
finish = clock();
- dc_printf("Time taken: %f seconds \n",
- (double)(finish - start) / CLOCKS_PER_SEC);
+ dc_printf("Time taken: %f seconds \n",
+ (double)(finish - start) / CLOCKS_PER_SEC);
#endif
// Generate signs
@@ -132,18 +132,18 @@ void Octree::scanConvert()
trace();
#if DC_DEBUG
finish = clock();
- dc_printf("Time taken: %f seconds \n", (double)(finish - start) / CLOCKS_PER_SEC);
+ dc_printf("Time taken: %f seconds \n", (double)(finish - start) / CLOCKS_PER_SEC);
#ifdef IN_VERBOSE_MODE
- dc_printf("Holes: %d Average Length: %f Max Length: %d \n", numRings,(float)totRingLengths /(float) numRings, maxRingLength);
+ dc_printf("Holes: %d Average Length: %f Max Length: %d \n", numRings, (float)totRingLengths / (float) numRings, maxRingLength);
#endif
#endif
-
+
// Check again
int tnumRings = numRings;
trace();
#ifdef IN_VERBOSE_MODE
dc_printf("Holes after patching: %d \n", numRings);
-#endif
+#endif
numRings = tnumRings;
#if DC_DEBUG
@@ -153,22 +153,22 @@ void Octree::scanConvert()
buildSigns();
#if DC_DEBUG
finish = clock();
- dc_printf("Time taken: %f seconds \n", (double)(finish - start) / CLOCKS_PER_SEC);
+ dc_printf("Time taken: %f seconds \n", (double)(finish - start) / CLOCKS_PER_SEC);
#endif
- if(use_flood_fill) {
+ if (use_flood_fill) {
/*
- start = clock();
- floodFill();
- // Check again
- tnumRings = numRings;
- trace();
- dc_printf("Holes after filling: %d \n", numRings);
- numRings = tnumRings;
- buildSigns();
- finish = clock();
- dc_printf("Time taken: %f seconds \n", (double)(finish - start) / CLOCKS_PER_SEC);
- */
+ start = clock();
+ floodFill();
+ // Check again
+ tnumRings = numRings;
+ trace();
+ dc_printf("Holes after filling: %d \n", numRings);
+ numRings = tnumRings;
+ buildSigns();
+ finish = clock();
+ dc_printf("Time taken: %f seconds \n", (double)(finish - start) / CLOCKS_PER_SEC);
+ */
#if DC_DEBUG
start = clock();
dc_printf("Removing components...\n");
@@ -179,7 +179,7 @@ void Octree::scanConvert()
// floodFill();
#if DC_DEBUG
finish = clock();
- dc_printf("Time taken: %f seconds \n",(double)(finish - start) / CLOCKS_PER_SEC);
+ dc_printf("Time taken: %f seconds \n", (double)(finish - start) / CLOCKS_PER_SEC);
#endif
}
@@ -202,31 +202,29 @@ void Octree::scanConvert()
void Octree::initMemory()
{
leafalloc[0] = new MemoryAllocator<sizeof(LeafNode)>();
- leafalloc[1] = new MemoryAllocator<sizeof(LeafNode) + sizeof(float) * EDGE_FLOATS>();
- leafalloc[2] = new MemoryAllocator<sizeof(LeafNode) + sizeof(float) * EDGE_FLOATS * 2>();
- leafalloc[3] = new MemoryAllocator<sizeof(LeafNode) + sizeof(float) * EDGE_FLOATS * 3>();
+ leafalloc[1] = new MemoryAllocator<sizeof(LeafNode) + sizeof(float) *EDGE_FLOATS>();
+ leafalloc[2] = new MemoryAllocator<sizeof(LeafNode) + sizeof(float) *EDGE_FLOATS * 2>();
+ leafalloc[3] = new MemoryAllocator<sizeof(LeafNode) + sizeof(float) *EDGE_FLOATS * 3>();
alloc[0] = new MemoryAllocator<sizeof(InternalNode)>();
- alloc[1] = new MemoryAllocator<sizeof(InternalNode) + sizeof(Node*)>();
- alloc[2] = new MemoryAllocator<sizeof(InternalNode) + sizeof(Node*) * 2>();
- alloc[3] = new MemoryAllocator<sizeof(InternalNode) + sizeof(Node*) * 3>();
- alloc[4] = new MemoryAllocator<sizeof(InternalNode) + sizeof(Node*) * 4>();
- alloc[5] = new MemoryAllocator<sizeof(InternalNode) + sizeof(Node*) * 5>();
- alloc[6] = new MemoryAllocator<sizeof(InternalNode) + sizeof(Node*) * 6>();
- alloc[7] = new MemoryAllocator<sizeof(InternalNode) + sizeof(Node*) * 7>();
- alloc[8] = new MemoryAllocator<sizeof(InternalNode) + sizeof(Node*) * 8>();
+ alloc[1] = new MemoryAllocator<sizeof(InternalNode) + sizeof(Node *)>();
+ alloc[2] = new MemoryAllocator<sizeof(InternalNode) + sizeof(Node *) * 2>();
+ alloc[3] = new MemoryAllocator<sizeof(InternalNode) + sizeof(Node *) * 3>();
+ alloc[4] = new MemoryAllocator<sizeof(InternalNode) + sizeof(Node *) * 4>();
+ alloc[5] = new MemoryAllocator<sizeof(InternalNode) + sizeof(Node *) * 5>();
+ alloc[6] = new MemoryAllocator<sizeof(InternalNode) + sizeof(Node *) * 6>();
+ alloc[7] = new MemoryAllocator<sizeof(InternalNode) + sizeof(Node *) * 7>();
+ alloc[8] = new MemoryAllocator<sizeof(InternalNode) + sizeof(Node *) * 8>();
}
void Octree::freeMemory()
{
- for(int i = 0; i < 9; i ++)
- {
+ for (int i = 0; i < 9; i++) {
alloc[i]->destroy();
delete alloc[i];
}
- for(int i = 0; i < 4; i ++)
- {
+ for (int i = 0; i < 4; i++) {
leafalloc[i]->destroy();
delete leafalloc[i];
}
@@ -236,22 +234,20 @@ void Octree::printMemUsage()
{
int totalbytes = 0;
dc_printf("********* Internal nodes: \n");
- for(int i = 0; i < 9; i ++)
- {
+ for (int i = 0; i < 9; i++) {
alloc[i]->printInfo();
totalbytes += alloc[i]->getAll() * alloc[i]->getBytes();
}
dc_printf("********* Leaf nodes: \n");
int totalLeafs = 0;
- for(int i = 0; i < 4; i ++)
- {
+ for (int i = 0; i < 4; i++) {
leafalloc[i]->printInfo();
totalbytes += leafalloc[i]->getAll() * leafalloc[i]->getBytes();
totalLeafs += leafalloc[i]->getAllocated();
}
-
+
dc_printf("Total allocated bytes on disk: %d \n", totalbytes);
dc_printf("Total leaf nodes: %d\n", totalLeafs);
}
@@ -263,9 +259,9 @@ void Octree::resetMinimalEdges()
void Octree::addTrian()
{
- Triangle* trian;
+ Triangle *trian;
int count = 0;
-
+
#if DC_DEBUG
int total = reader->getNumTriangles();
int unitcount = 1000;
@@ -274,196 +270,175 @@ void Octree::addTrian()
srand(0);
- while((trian = reader->getNextTriangle()) != NULL)
- {
+ while ((trian = reader->getNextTriangle()) != NULL) {
// Drop triangles
{
addTrian(trian, count);
}
delete trian;
- count ++;
+ count++;
#if DC_DEBUG
- if(count % unitcount == 0)
- {
+ if (count % unitcount == 0) {
putchar(13);
- switch((count / unitcount) % 4)
- {
- case 0 : dc_printf("-");
- break;
- case 1 : dc_printf("/");
- break;
- case 2 : dc_printf("|");
- break;
- case 3 : dc_printf("\\");
- break;
+ switch ((count / unitcount) % 4) {
+ case 0: dc_printf("-");
+ break;
+ case 1: dc_printf("/");
+ break;
+ case 2: dc_printf("|");
+ break;
+ case 3: dc_printf("\\");
+ break;
}
- float percent =(float) count / total;
-
+ float percent = (float) count / total;
+
/*
- int totbars = 50;
- int bars =(int)(percent * totbars);
- for(int i = 0; i < bars; i ++)
- {
- putchar(219);
- }
- for(i = bars; i < totbars; i ++)
- {
- putchar(176);
- }
- */
+ int totbars = 50;
+ int bars =(int)(percent * totbars);
+ for(int i = 0; i < bars; i ++) {
+ putchar(219);
+ }
+ for(i = bars; i < totbars; i ++) {
+ putchar(176);
+ }
+ */
dc_printf(" %d triangles: ", count);
dc_printf(" %f%% complete.", 100 * percent);
}
#endif
-
+
}
putchar(13);
}
-void Octree::addTrian(Triangle* trian, int triind)
+void Octree::addTrian(Triangle *trian, int triind)
{
int i, j;
// Blowing up the triangle to the grid
float mid[3] = {0, 0, 0};
- for(i = 0; i < 3; i ++)
- for(j = 0; j < 3; j ++)
- {
- trian->vt[i][j] = dimen *(trian->vt[i][j] - origin[j]) / range;
+ for (i = 0; i < 3; i++)
+ for (j = 0; j < 3; j++) {
+ trian->vt[i][j] = dimen * (trian->vt[i][j] - origin[j]) / range;
mid[j] += trian->vt[i][j] / 3;
}
// Generate projections
LONG cube[2][3] = {{0, 0, 0}, {dimen, dimen, dimen}};
LONG trig[3][3];
-
- for(i = 0; i < 3; i ++)
- for( j = 0; j < 3; j ++)
- {
- trig[i][j] =(LONG)(trian->vt[i][j]);
- // Perturb end points, if set so
+
+ for (i = 0; i < 3; i++)
+ for (j = 0; j < 3; j++) {
+ trig[i][j] = (LONG)(trian->vt[i][j]);
+ // Perturb end points, if set so
}
-
+
// Add to the octree
// int start[3] = {0, 0, 0};
- LONG errorvec =(LONG)(0);
- Projections* proj = new Projections(cube, trig, errorvec, triind);
- root = (Node*)addTrian(&root->internal, proj, maxDepth);
-
+ LONG errorvec = (LONG)(0);
+ Projections *proj = new Projections(cube, trig, errorvec, triind);
+ root = (Node *)addTrian(&root->internal, proj, maxDepth);
+
delete proj->inherit;
delete proj;
}
-InternalNode* Octree::addTrian(InternalNode* node, Projections* p, int height)
+InternalNode *Octree::addTrian(InternalNode *node, Projections *p, int height)
{
int i;
- int vertdiff[8][3] = {{0,0,0},{0,0,1},{0,1,-1},{0,0,1},{1,-1,-1},{0,0,1},{0,1,-1},{0,0,1}};
+ int vertdiff[8][3] = {{0, 0, 0}, {0, 0, 1}, {0, 1, -1}, {0, 0, 1}, {1, -1, -1}, {0, 0, 1}, {0, 1, -1}, {0, 0, 1}};
UCHAR boxmask = p->getBoxMask();
- Projections* subp = new Projections(p);
-
+ Projections *subp = new Projections(p);
+
int count = 0;
- int tempdiff[3] = {0,0,0};
- for(i = 0; i < 8; i ++)
- {
+ int tempdiff[3] = {0, 0, 0};
+ for (i = 0; i < 8; i++) {
tempdiff[0] += vertdiff[i][0];
tempdiff[1] += vertdiff[i][1];
tempdiff[2] += vertdiff[i][2];
/* Quick pruning using bounding box */
- if(boxmask &(1 << i))
- {
+ if (boxmask & (1 << i)) {
subp->shift(tempdiff);
tempdiff[0] = tempdiff[1] = tempdiff[2] = 0;
/* Pruning using intersection test */
- if(subp->isIntersecting())
+ if (subp->isIntersecting()) {
// if(subp->getIntersectionMasks(cedgemask, edgemask))
- {
- if(! hasChild(node, i))
- {
- if(height == 1)
- {
+ if (!hasChild(node, i)) {
+ if (height == 1) {
node = addLeafChild(node, i, count, createLeaf(0));
}
- else
- {
+ else {
node = addInternalChild(node, i, count, createInternal(0));
}
}
- Node* chd = getChild(node, count);
-
- if(! isLeaf(node, i))
- {
+ Node *chd = getChild(node, count);
+
+ if (!isLeaf(node, i)) {
// setChild(node, count, addTrian(chd, subp, height - 1, vertmask[i], edgemask));
- setChild(node, count, (Node*)addTrian(&chd->internal, subp, height - 1));
+ setChild(node, count, (Node *)addTrian(&chd->internal, subp, height - 1));
}
- else
- {
- setChild(node, count, (Node*)updateCell(&chd->leaf, subp));
+ else {
+ setChild(node, count, (Node *)updateCell(&chd->leaf, subp));
}
}
}
- if(hasChild(node, i))
- {
- count ++;
+ if (hasChild(node, i)) {
+ count++;
}
}
delete subp;
-
+
return node;
}
-LeafNode* Octree::updateCell(LeafNode* node, Projections* p)
+LeafNode *Octree::updateCell(LeafNode *node, Projections *p)
{
int i;
// Edge connectivity
- int mask[3] = {0, 4, 8 };
+ int mask[3] = {0, 4, 8 };
int oldc = 0, newc = 0;
float offs[3];
float a[3], b[3], c[3];
- for(i = 0; i < 3; i ++)
- {
- if(! getEdgeParity(node, mask[i]))
- {
- if(p->isIntersectingPrimary(i))
- {
+ for (i = 0; i < 3; i++) {
+ if (!getEdgeParity(node, mask[i])) {
+ if (p->isIntersectingPrimary(i)) {
// actualQuads ++;
setEdge(node, mask[i]);
offs[newc] = p->getIntersectionPrimary(i);
- a[newc] =(float) p->inherit->norm[0];
- b[newc] =(float) p->inherit->norm[1];
- c[newc] =(float) p->inherit->norm[2];
- newc ++;
+ a[newc] = (float) p->inherit->norm[0];
+ b[newc] = (float) p->inherit->norm[1];
+ c[newc] = (float) p->inherit->norm[2];
+ newc++;
}
}
- else
- {
+ else {
offs[newc] = getEdgeOffsetNormal(node, oldc, a[newc], b[newc], c[newc]);
// if(p->isIntersectingPrimary(i))
{
// dc_printf("Multiple intersections!\n");
-
+
// setPatchEdge(node, i);
}
-
- oldc ++;
- newc ++;
+
+ oldc++;
+ newc++;
}
}
- if(newc > oldc)
- {
+ if (newc > oldc) {
// New offsets added, update this node
node = updateEdgeOffsetsNormals(node, oldc, newc, offs, a, b, c);
}
@@ -471,45 +446,42 @@ LeafNode* Octree::updateCell(LeafNode* node, Projections* p)
return node;
}
-void Octree::preparePrimalEdgesMask(InternalNode* node)
+void Octree::preparePrimalEdgesMask(InternalNode *node)
{
int count = 0;
- for(int i = 0; i < 8; i ++)
- {
- if(hasChild(node, i))
- {
- if(isLeaf(node, i))
+ for (int i = 0; i < 8; i++) {
+ if (hasChild(node, i)) {
+ if (isLeaf(node, i))
createPrimalEdgesMask(&getChild(node, count)->leaf);
else
preparePrimalEdgesMask(&getChild(node, count)->internal);
- count ++;
+ count++;
}
}
}
void Octree::trace()
{
- int st[3] = {0, 0, 0,};
+ int st[3] = {0, 0, 0, };
numRings = 0;
totRingLengths = 0;
maxRingLength = 0;
- PathList* chdpath = NULL;
+ PathList *chdpath = NULL;
root = trace(root, st, dimen, maxDepth, chdpath);
- if(chdpath != NULL)
- {
- dc_printf("there are incomplete rings.\n");
+ if (chdpath != NULL) {
+ dc_printf("there are incomplete rings.\n");
printPaths(chdpath);
};
}
-Node* Octree::trace(Node* newnode, int* st, int len, int depth, PathList*& paths)
+Node *Octree::trace(Node *newnode, int *st, int len, int depth, PathList *& paths)
{
len >>= 1;
- PathList* chdpaths[8];
- Node* chd[8];
+ PathList *chdpaths[8];
+ Node *chd[8];
int nst[8][3];
int i, j;
@@ -518,55 +490,48 @@ Node* Octree::trace(Node* newnode, int* st, int len, int depth, PathList*& paths
fillChildren(&newnode->internal, chd, chdleaf);
// int count = 0;
- for(i = 0; i < 8; i ++)
- {
- for(j = 0; j < 3; j ++)
- {
+ for (i = 0; i < 8; i++) {
+ for (j = 0; j < 3; j++) {
nst[i][j] = st[j] + len * vertmap[i][j];
}
- if(chd[i] == NULL || isLeaf(&newnode->internal, i))
- {
+ if (chd[i] == NULL || isLeaf(&newnode->internal, i)) {
chdpaths[i] = NULL;
}
- else
- {
+ else {
trace(chd[i], nst[i], len, depth - 1, chdpaths[i]);
}
}
// Get connectors on the faces
- PathList* conn[12];
- Node* nf[2];
+ PathList *conn[12];
+ Node *nf[2];
int lf[2];
int df[2] = {depth - 1, depth - 1};
- int* nstf[2];
+ int *nstf[2];
fillChildren(&newnode->internal, chd, chdleaf);
- for(i = 0; i < 12; i ++)
- {
+ for (i = 0; i < 12; i++) {
int c[2] = {cellProcFaceMask[i][0], cellProcFaceMask[i][1]};
-
- for(int j = 0; j < 2; j ++)
- {
+
+ for (int j = 0; j < 2; j++) {
lf[j] = chdleaf[c[j]];
nf[j] = chd[c[j]];
nstf[j] = nst[c[j]];
}
conn[i] = NULL;
-
- findPaths((Node**)nf, lf, df, nstf, depth - 1, cellProcFaceMask[i][2], conn[i]);
- //if(conn[i])
- //{
+ findPaths((Node **)nf, lf, df, nstf, depth - 1, cellProcFaceMask[i][2], conn[i]);
+
+ //if(conn[i]) {
// printPath(conn[i]);
//}
}
-
+
// Connect paths
- PathList* rings = NULL;
+ PathList *rings = NULL;
combinePaths(chdpaths[0], chdpaths[1], conn[8], rings);
combinePaths(chdpaths[2], chdpaths[3], conn[9], rings);
combinePaths(chdpaths[4], chdpaths[5], conn[10], rings);
@@ -585,25 +550,22 @@ Node* Octree::trace(Node* newnode, int* st, int len, int depth, PathList*& paths
// By now, only chdpaths[0] and rings have contents
// Process rings
- if(rings)
- {
+ if (rings) {
// printPath(rings);
/* Let's count first */
- PathList* trings = rings;
- while(trings)
- {
- numRings ++;
+ PathList *trings = rings;
+ while (trings) {
+ numRings++;
totRingLengths += trings->length;
- if(trings->length > maxRingLength)
- {
+ if (trings->length > maxRingLength) {
maxRingLength = trings->length;
}
trings = trings->next;
}
// printPath(rings);
- newnode = patch(newnode, st,(len << 1), rings);
+ newnode = patch(newnode, st, (len << 1), rings);
}
// Return incomplete paths
@@ -611,34 +573,28 @@ Node* Octree::trace(Node* newnode, int* st, int len, int depth, PathList*& paths
return newnode;
}
-void Octree::findPaths(Node* node[2], int leaf[2], int depth[2], int* st[2], int maxdep, int dir, PathList*& paths)
+void Octree::findPaths(Node *node[2], int leaf[2], int depth[2], int *st[2], int maxdep, int dir, PathList *& paths)
{
- if(!(node[0] && node[1]))
- {
+ if (!(node[0] && node[1])) {
return;
}
- if(!(leaf[0] && leaf[1]))
- {
+ if (!(leaf[0] && leaf[1])) {
// Not at the bottom, recur
// Fill children nodes
int i, j;
- Node* chd[2][8];
+ Node *chd[2][8];
int chdleaf[2][8];
int nst[2][8][3];
- for(j = 0; j < 2; j ++)
- {
- if(! leaf[j])
- {
+ for (j = 0; j < 2; j++) {
+ if (!leaf[j]) {
fillChildren(&node[j]->internal, chd[j], chdleaf[j]);
- int len =(dimen >>(maxDepth - depth[j] + 1));
- for(i = 0; i < 8; i ++)
- {
- for(int k = 0; k < 3; k ++)
- {
+ int len = (dimen >> (maxDepth - depth[j] + 1));
+ for (i = 0; i < 8; i++) {
+ for (int k = 0; k < 3; k++) {
nst[j][i][k] = st[j][k] + len * vertmap[i][k];
}
}
@@ -647,24 +603,20 @@ void Octree::findPaths(Node* node[2], int leaf[2], int depth[2], int* st[2], int
}
// 4 face calls
- Node* nf[2];
+ Node *nf[2];
int df[2];
int lf[2];
- int* nstf[2];
- for(i = 0; i < 4; i ++)
- {
+ int *nstf[2];
+ for (i = 0; i < 4; i++) {
int c[2] = {faceProcFaceMask[dir][i][0], faceProcFaceMask[dir][i][1]};
- for(int j = 0; j < 2; j ++)
- {
- if(leaf[j])
- {
+ for (int j = 0; j < 2; j++) {
+ if (leaf[j]) {
lf[j] = leaf[j];
nf[j] = node[j];
df[j] = depth[j];
nstf[j] = st[j];
}
- else
- {
+ else {
lf[j] = chdleaf[j][c[j]];
nf[j] = chd[j][c[j]];
df[j] = depth[j] - 1;
@@ -675,16 +627,14 @@ void Octree::findPaths(Node* node[2], int leaf[2], int depth[2], int* st[2], int
}
}
- else
- {
+ else {
// At the bottom, check this face
- int ind =(depth[0] == maxdep ? 0 : 1);
- int fcind = 2 * dir +(1 - ind);
- if(getFaceParity((LeafNode*)node[ind], fcind))
- {
+ int ind = (depth[0] == maxdep ? 0 : 1);
+ int fcind = 2 * dir + (1 - ind);
+ if (getFaceParity((LeafNode *)node[ind], fcind)) {
// Add into path
- PathElement* ele1 = new PathElement;
- PathElement* ele2 = new PathElement;
+ PathElement *ele1 = new PathElement;
+ PathElement *ele2 = new PathElement;
ele1->pos[0] = st[0][0];
ele1->pos[1] = st[0][1];
@@ -697,7 +647,7 @@ void Octree::findPaths(Node* node[2], int leaf[2], int depth[2], int* st[2], int
ele1->next = ele2;
ele2->next = NULL;
- PathList* lst = new PathList;
+ PathList *lst = new PathList;
lst->head = ele1;
lst->tail = ele2;
lst->length = 2;
@@ -710,28 +660,25 @@ void Octree::findPaths(Node* node[2], int leaf[2], int depth[2], int* st[2], int
}
-void Octree::combinePaths(PathList*& list1, PathList* list2, PathList* paths, PathList*& rings)
+void Octree::combinePaths(PathList *& list1, PathList *list2, PathList *paths, PathList *& rings)
{
// Make new list of paths
- PathList* nlist = NULL;
+ PathList *nlist = NULL;
// Search for each connectors in paths
- PathList* tpaths = paths;
- PathList* tlist, * pre;
- while(tpaths)
- {
- PathList* singlist = tpaths;
- PathList* templist;
+ PathList *tpaths = paths;
+ PathList *tlist, *pre;
+ while (tpaths) {
+ PathList *singlist = tpaths;
+ PathList *templist;
tpaths = tpaths->next;
singlist->next = NULL;
// Look for hookup in list1
tlist = list1;
pre = NULL;
- while(tlist)
- {
- if((templist = combineSinglePath(list1, pre, tlist, singlist, NULL, singlist)) != NULL)
- {
+ while (tlist) {
+ if ((templist = combineSinglePath(list1, pre, tlist, singlist, NULL, singlist)) != NULL) {
singlist = templist;
continue;
}
@@ -742,10 +689,8 @@ void Octree::combinePaths(PathList*& list1, PathList* list2, PathList* paths, Pa
// Look for hookup in list2
tlist = list2;
pre = NULL;
- while(tlist)
- {
- if((templist = combineSinglePath(list2, pre, tlist, singlist, NULL, singlist)) != NULL)
- {
+ while (tlist) {
+ if ((templist = combineSinglePath(list2, pre, tlist, singlist, NULL, singlist)) != NULL) {
singlist = templist;
continue;
}
@@ -756,10 +701,8 @@ void Octree::combinePaths(PathList*& list1, PathList* list2, PathList* paths, Pa
// Look for hookup in nlist
tlist = nlist;
pre = NULL;
- while(tlist)
- {
- if((templist = combineSinglePath(nlist, pre, tlist, singlist, NULL, singlist)) != NULL)
- {
+ while (tlist) {
+ if ((templist = combineSinglePath(nlist, pre, tlist, singlist, NULL, singlist)) != NULL) {
singlist = templist;
continue;
}
@@ -768,71 +711,60 @@ void Octree::combinePaths(PathList*& list1, PathList* list2, PathList* paths, Pa
}
// Add to nlist or rings
- if(isEqual(singlist->head, singlist->tail))
- {
- PathElement* temp = singlist->head;
+ if (isEqual(singlist->head, singlist->tail)) {
+ PathElement *temp = singlist->head;
singlist->head = temp->next;
delete temp;
- singlist->length --;
+ singlist->length--;
singlist->tail->next = singlist->head;
singlist->next = rings;
rings = singlist;
}
- else
- {
+ else {
singlist->next = nlist;
nlist = singlist;
}
}
- // Append list2 and nlist to the end of list1
+ // Append list2 and nlist to the end of list1
tlist = list1;
- if(tlist != NULL)
- {
- while(tlist->next != NULL)
- {
+ if (tlist != NULL) {
+ while (tlist->next != NULL) {
tlist = tlist->next;
}
tlist->next = list2;
}
- else
- {
+ else {
tlist = list2;
list1 = list2;
}
- if(tlist != NULL)
- {
- while(tlist->next != NULL)
- {
+ if (tlist != NULL) {
+ while (tlist->next != NULL) {
tlist = tlist->next;
}
tlist->next = nlist;
}
- else
- {
+ else {
tlist = nlist;
list1 = nlist;
}
}
-PathList* Octree::combineSinglePath(PathList*& head1, PathList* pre1, PathList*& list1, PathList*& head2, PathList* pre2, PathList*& list2)
+PathList *Octree::combineSinglePath(PathList *& head1, PathList *pre1, PathList *& list1, PathList *& head2, PathList *pre2, PathList *& list2)
{
- if(isEqual(list1->head, list2->head) || isEqual(list1->tail, list2->tail))
- {
+ if (isEqual(list1->head, list2->head) || isEqual(list1->tail, list2->tail)) {
// Reverse the list
- if(list1->length < list2->length)
- {
+ if (list1->length < list2->length) {
// Reverse list1
- PathElement* prev = list1->head;
- PathElement* next = prev->next;
+ PathElement *prev = list1->head;
+ PathElement *next = prev->next;
prev->next = NULL;
- while(next != NULL)
- {
- PathElement* tnext = next->next;
+ while (next != NULL) {
+ PathElement *tnext = next->next;
next->next = prev;
prev = next;
@@ -842,15 +774,13 @@ PathList* Octree::combineSinglePath(PathList*& head1, PathList* pre1, PathList*&
list1->tail = list1->head;
list1->head = prev;
}
- else
- {
+ else {
// Reverse list2
- PathElement* prev = list2->head;
- PathElement* next = prev->next;
+ PathElement *prev = list2->head;
+ PathElement *next = prev->next;
prev->next = NULL;
- while(next != NULL)
- {
- PathElement* tnext = next->next;
+ while (next != NULL) {
+ PathElement *tnext = next->next;
next->next = prev;
prev = next;
@@ -860,17 +790,16 @@ PathList* Octree::combineSinglePath(PathList*& head1, PathList* pre1, PathList*&
list2->tail = list2->head;
list2->head = prev;
}
- }
-
- if(isEqual(list1->head, list2->tail))
- {
+ }
+
+ if (isEqual(list1->head, list2->tail)) {
// Easy case
- PathElement* temp = list1->head->next;
+ PathElement *temp = list1->head->next;
delete list1->head;
list2->tail->next = temp;
- PathList* nlist = new PathList;
+ PathList *nlist = new PathList;
nlist->length = list1->length + list2->length - 1;
nlist->head = list2->head;
nlist->tail = list1->tail;
@@ -880,15 +809,14 @@ PathList* Octree::combineSinglePath(PathList*& head1, PathList* pre1, PathList*&
deletePath(head2, pre2, list2);
return nlist;
- }
- else if(isEqual(list1->tail, list2->head))
- {
+ }
+ else if (isEqual(list1->tail, list2->head)) {
// Easy case
- PathElement* temp = list2->head->next;
+ PathElement *temp = list2->head->next;
delete list2->head;
list1->tail->next = temp;
- PathList* nlist = new PathList;
+ PathList *nlist = new PathList;
nlist->length = list1->length + list2->length - 1;
nlist->head = list1->head;
nlist->tail = list2->tail;
@@ -903,173 +831,158 @@ PathList* Octree::combineSinglePath(PathList*& head1, PathList* pre1, PathList*&
return NULL;
}
-void Octree::deletePath(PathList*& head, PathList* pre, PathList*& curr)
+void Octree::deletePath(PathList *& head, PathList *pre, PathList *& curr)
{
- PathList* temp = curr;
+ PathList *temp = curr;
curr = temp->next;
delete temp;
- if(pre == NULL)
- {
+ if (pre == NULL) {
head = curr;
}
- else
- {
+ else {
pre->next = curr;
}
}
-void Octree::printElement(PathElement* ele)
+void Octree::printElement(PathElement *ele)
{
- if(ele != NULL)
- {
+ if (ele != NULL) {
dc_printf("(%d %d %d)", ele->pos[0], ele->pos[1], ele->pos[2]);
}
}
-void Octree::printPath(PathList* path)
+void Octree::printPath(PathList *path)
{
- PathElement* n = path->head;
+ PathElement *n = path->head;
int same = 0;
#if DC_DEBUG
- int len =(dimen >> maxDepth);
+ int len = (dimen >> maxDepth);
#endif
- while(n &&(same == 0 || n != path->head))
- {
- same ++;
+ while (n && (same == 0 || n != path->head)) {
+ same++;
dc_printf("(%d %d %d)", n->pos[0] / len, n->pos[1] / len, n->pos[2] / len);
n = n->next;
}
- if(n == path->head)
- {
+ if (n == path->head) {
dc_printf(" Ring!\n");
}
- else
- {
+ else {
dc_printf(" %p end!\n", n);
}
}
-void Octree::printPath(PathElement* path)
+void Octree::printPath(PathElement *path)
{
PathElement *n = path;
int same = 0;
#if DC_DEBUG
- int len =(dimen >> maxDepth);
+ int len = (dimen >> maxDepth);
#endif
- while(n &&(same == 0 || n != path))
- {
- same ++;
+ while (n && (same == 0 || n != path)) {
+ same++;
dc_printf("(%d %d %d)", n->pos[0] / len, n->pos[1] / len, n->pos[2] / len);
n = n->next;
}
- if(n == path)
- {
+ if (n == path) {
dc_printf(" Ring!\n");
}
- else
- {
+ else {
dc_printf(" %p end!\n", n);
}
}
-void Octree::printPaths(PathList* path)
+void Octree::printPaths(PathList *path)
{
- PathList* iter = path;
+ PathList *iter = path;
int i = 0;
- while(iter != NULL)
- {
+ while (iter != NULL) {
dc_printf("Path %d:\n", i);
printPath(iter);
iter = iter->next;
- i ++;
+ i++;
}
}
-Node* Octree::patch(Node* newnode, int st[3], int len, PathList* rings)
+Node *Octree::patch(Node *newnode, int st[3], int len, PathList *rings)
{
#ifdef IN_DEBUG_MODE
dc_printf("Call to PATCH with rings: \n");
printPaths(rings);
#endif
- /* Do nothing but couting
- PathList* tlist = rings;
- PathList* ttlist;
- PathElement* telem, * ttelem;
- while(tlist!= NULL)
- {
- // printPath(tlist);
- numRings ++;
- totRingLengths += tlist->length;
- if(tlist->length > maxRingLength)
- {
- maxRingLength = tlist->length;
- }
- ttlist = tlist;
- tlist = tlist->next;
- }
- return node;
- */
-
+ /* Do nothing but couting
+ PathList* tlist = rings;
+ PathList* ttlist;
+ PathElement* telem, * ttelem;
+ while(tlist!= NULL) {
+ // printPath(tlist);
+ numRings ++;
+ totRingLengths += tlist->length;
+ if(tlist->length > maxRingLength) {
+ maxRingLength = tlist->length;
+ }
+ ttlist = tlist;
+ tlist = tlist->next;
+ }
+ return node;
+ */
+
/* Pass onto separate calls in each direction */
- if(len == mindimen)
- {
+ if (len == mindimen) {
dc_printf("Error! should have no list by now.\n");
exit(0);
}
-
+
// YZ plane
- PathList* xlists[2];
+ PathList *xlists[2];
newnode = patchSplit(newnode, st, len, rings, 0, xlists[0], xlists[1]);
-
+
// XZ plane
- PathList* ylists[4];
+ PathList *ylists[4];
newnode = patchSplit(newnode, st, len, xlists[0], 1, ylists[0], ylists[1]);
newnode = patchSplit(newnode, st, len, xlists[1], 1, ylists[2], ylists[3]);
-
+
// XY plane
- PathList* zlists[8];
+ PathList *zlists[8];
newnode = patchSplit(newnode, st, len, ylists[0], 2, zlists[0], zlists[1]);
newnode = patchSplit(newnode, st, len, ylists[1], 2, zlists[2], zlists[3]);
newnode = patchSplit(newnode, st, len, ylists[2], 2, zlists[4], zlists[5]);
newnode = patchSplit(newnode, st, len, ylists[3], 2, zlists[6], zlists[7]);
-
+
// Recur
len >>= 1;
int count = 0;
- for(int i = 0; i < 8; i ++)
- {
- if(zlists[i] != NULL)
- {
+ for (int i = 0; i < 8; i++) {
+ if (zlists[i] != NULL) {
int nori[3] = {
- st[0] + len * vertmap[i][0] ,
- st[1] + len * vertmap[i][1] ,
- st[2] + len * vertmap[i][2]};
- patch(getChild(&newnode->internal , count), nori, len, zlists[i]);
+ st[0] + len * vertmap[i][0],
+ st[1] + len * vertmap[i][1],
+ st[2] + len * vertmap[i][2]
+ };
+ patch(getChild(&newnode->internal, count), nori, len, zlists[i]);
}
- if(hasChild(&newnode->internal, i))
- {
- count ++;
+ if (hasChild(&newnode->internal, i)) {
+ count++;
}
}
#ifdef IN_DEBUG_MODE
dc_printf("Return from PATCH\n");
#endif
return newnode;
-
+
}
-Node* Octree::patchSplit(Node* newnode, int st[3], int len, PathList* rings,
- int dir, PathList*& nrings1, PathList*& nrings2)
+Node *Octree::patchSplit(Node *newnode, int st[3], int len, PathList *rings,
+ int dir, PathList *& nrings1, PathList *& nrings2)
{
#ifdef IN_DEBUG_MODE
dc_printf("Call to PATCHSPLIT with direction %d and rings: \n", dir);
@@ -1078,12 +991,11 @@ Node* Octree::patchSplit(Node* newnode, int st[3], int len, PathList* rings,
nrings1 = NULL;
nrings2 = NULL;
- PathList* tmp;
- while(rings != NULL)
- {
+ PathList *tmp;
+ while (rings != NULL) {
// Process this ring
newnode = patchSplitSingle(newnode, st, len, rings->head, dir, nrings1, nrings2);
-
+
// Delete this ring from the group
tmp = rings;
rings = rings->next;
@@ -1101,91 +1013,78 @@ Node* Octree::patchSplit(Node* newnode, int st[3], int len, PathList* rings,
return newnode;
}
-Node* Octree::patchSplitSingle(Node* newnode, int st[3], int len, PathElement* head, int dir, PathList*& nrings1, PathList*& nrings2)
+Node *Octree::patchSplitSingle(Node *newnode, int st[3], int len, PathElement *head, int dir, PathList *& nrings1, PathList *& nrings2)
{
#ifdef IN_DEBUG_MODE
dc_printf("Call to PATCHSPLITSINGLE with direction %d and path: \n", dir);
printPath(head);
#endif
- if(head == NULL)
- {
+ if (head == NULL) {
#ifdef IN_DEBUG_MODE
dc_printf("Return from PATCHSPLITSINGLE with head==NULL.\n");
#endif
return newnode;
}
- else
- {
+ else {
// printPath(head);
}
-
+
// Walk along the ring to find pair of intersections
- PathElement* pre1 = NULL;
- PathElement* pre2 = NULL;
- int side = findPair(head, st[dir] + len / 2 , dir, pre1, pre2);
-
+ PathElement *pre1 = NULL;
+ PathElement *pre2 = NULL;
+ int side = findPair(head, st[dir] + len / 2, dir, pre1, pre2);
+
/*
- if(pre1 == pre2)
- {
- int edgelen =(dimen >> maxDepth);
- dc_printf("Location: %d %d %d Direction: %d Reso: %d\n", st[0]/edgelen, st[1]/edgelen, st[2]/edgelen, dir, len/edgelen);
- printPath(head);
- exit(0);
- }
- */
-
- if(side)
- {
+ if(pre1 == pre2) {
+ int edgelen =(dimen >> maxDepth);
+ dc_printf("Location: %d %d %d Direction: %d Reso: %d\n", st[0]/edgelen, st[1]/edgelen, st[2]/edgelen, dir, len/edgelen);
+ printPath(head);
+ exit(0);
+ }
+ */
+
+ if (side) {
// Entirely on one side
- PathList* nring = new PathList();
+ PathList *nring = new PathList();
nring->head = head;
-
- if(side == -1)
- {
+
+ if (side == -1) {
nring->next = nrings1;
nrings1 = nring;
}
- else
- {
+ else {
nring->next = nrings2;
nrings2 = nring;
}
}
- else
- {
+ else {
// Break into two parts
- PathElement* nxt1 = pre1->next;
- PathElement* nxt2 = pre2->next;
+ PathElement *nxt1 = pre1->next;
+ PathElement *nxt2 = pre2->next;
pre1->next = nxt2;
pre2->next = nxt1;
newnode = connectFace(newnode, st, len, dir, pre1, pre2);
-
- if(isEqual(pre1, pre1->next))
- {
- if(pre1 == pre1->next)
- {
+
+ if (isEqual(pre1, pre1->next)) {
+ if (pre1 == pre1->next) {
delete pre1;
pre1 = NULL;
}
- else
- {
- PathElement* temp = pre1->next;
+ else {
+ PathElement *temp = pre1->next;
pre1->next = temp->next;
delete temp;
}
}
- if(isEqual(pre2, pre2->next))
- {
- if(pre2 == pre2->next)
- {
+ if (isEqual(pre2, pre2->next)) {
+ if (pre2 == pre2->next) {
delete pre2;
pre2 = NULL;
}
- else
- {
- PathElement* temp = pre2->next;
+ else {
+ PathElement *temp = pre2->next;
pre2->next = temp->next;
delete temp;
}
@@ -1193,11 +1092,11 @@ Node* Octree::patchSplitSingle(Node* newnode, int st[3], int len, PathElement* h
compressRing(pre1);
compressRing(pre2);
-
+
// Recur
newnode = patchSplitSingle(newnode, st, len, pre1, dir, nrings1, nrings2);
newnode = patchSplitSingle(newnode, st, len, pre2, dir, nrings1, nrings2);
-
+
}
#ifdef IN_DEBUG_MODE
@@ -1211,8 +1110,8 @@ Node* Octree::patchSplitSingle(Node* newnode, int st[3], int len, PathElement* h
return newnode;
}
-Node* Octree::connectFace(Node* newnode, int st[3], int len, int dir,
- PathElement* f1, PathElement* f2)
+Node *Octree::connectFace(Node *newnode, int st[3], int len, int dir,
+ PathElement *f1, PathElement *f2)
{
#ifdef IN_DEBUG_MODE
dc_printf("Call to CONNECTFACE with direction %d and length %d path: \n", dir, len);
@@ -1224,45 +1123,43 @@ Node* Octree::connectFace(Node* newnode, int st[3], int len, int dir,
// checkPath(f2);
#endif
- // Setup 2D
+ // Setup 2D
int pos = st[dir] + len / 2;
- int xdir =(dir + 1) % 3;
- int ydir =(dir + 2) % 3;
-
+ int xdir = (dir + 1) % 3;
+ int ydir = (dir + 2) % 3;
+
// Use existing intersections on f1 and f2
int x1, y1, x2, y2;
float p1, q1, p2, q2;
getFacePoint(f2->next, dir, x1, y1, p1, q1);
getFacePoint(f2, dir, x2, y2, p2, q2);
-
+
float dx = x2 + p2 - x1 - p1;
float dy = y2 + q2 - y1 - q1;
-
+
// Do adapted Bresenham line drawing
float rx = p1, ry = q1;
- int incx = 1, incy = 1;
+ int incx = 1, incy = 1;
int lx = x1, ly = y1;
int hx = x2, hy = y2;
int choice;
- if(x2 < x1)
- {
+ if (x2 < x1) {
incx = -1;
rx = 1 - rx;
lx = x2;
hx = x1;
}
- if(y2 < y1)
- {
+ if (y2 < y1) {
incy = -1;
ry = 1 - ry;
ly = y2;
hy = y1;
}
-
+
float sx = dx * incx;
float sy = dy * incy;
-
+
int ori[3];
ori[dir] = pos / mindimen;
ori[xdir] = x1;
@@ -1271,89 +1168,78 @@ Node* Octree::connectFace(Node* newnode, int st[3], int len, int dir,
int inc;
float alpha;
- PathElement* curEleN = f1;
- PathElement* curEleP = f2->next;
+ PathElement *curEleN = f1;
+ PathElement *curEleP = f2->next;
Node *nodeN = NULL, *nodeP = NULL;
LeafNode *curN = locateLeaf(&newnode->internal, len, f1->pos);
LeafNode *curP = locateLeaf(&newnode->internal, len, f2->next->pos);
- if(curN == NULL || curP == NULL)
- {
+ if (curN == NULL || curP == NULL) {
exit(0);
}
int stN[3], stP[3];
int lenN, lenP;
-
+
/* Unused code, leaving for posterity
- float stpt[3], edpt[3];
- stpt[dir] = edpt[dir] =(float) pos;
- stpt[xdir] =(x1 + p1) * mindimen;
- stpt[ydir] =(y1 + q1) * mindimen;
- edpt[xdir] =(x2 + p2) * mindimen;
- edpt[ydir] =(y2 + q2) * mindimen;
- */
- while(ori[xdir] != x2 || ori[ydir] != y2)
- {
+ float stpt[3], edpt[3];
+ stpt[dir] = edpt[dir] =(float) pos;
+ stpt[xdir] =(x1 + p1) * mindimen;
+ stpt[ydir] =(y1 + q1) * mindimen;
+ edpt[xdir] =(x2 + p2) * mindimen;
+ edpt[ydir] =(y2 + q2) * mindimen;
+ */
+ while (ori[xdir] != x2 || ori[ydir] != y2) {
int next;
- if(sy *(1 - rx) > sx *(1 - ry))
- {
- choice = 1;
+ if (sy * (1 - rx) > sx * (1 - ry)) {
+ choice = 1;
next = ori[ydir] + incy;
- if(next < ly || next > hy)
- {
+ if (next < ly || next > hy) {
choice = 4;
next = ori[xdir] + incx;
}
}
- else
- {
+ else {
choice = 2;
next = ori[xdir] + incx;
- if(next < lx || next > hx)
- {
+ if (next < lx || next > hx) {
choice = 3;
next = ori[ydir] + incy;
}
}
-
- if(choice & 1)
- {
+
+ if (choice & 1) {
ori[ydir] = next;
- if(choice == 1)
- {
- rx +=(sy == 0 ? 0 :(1 - ry) * sx / sy );
+ if (choice == 1) {
+ rx += (sy == 0 ? 0 : (1 - ry) * sx / sy);
ry = 0;
}
-
+
walkdir = 2;
inc = incy;
alpha = x2 < x1 ? 1 - rx : rx;
}
- else
- {
+ else {
ori[xdir] = next;
- if(choice == 2)
- {
- ry +=(sx == 0 ? 0 :(1 - rx) * sy / sx);
- rx = 0;
+ if (choice == 2) {
+ ry += (sx == 0 ? 0 : (1 - rx) * sy / sx);
+ rx = 0;
}
-
+
walkdir = 1;
inc = incx;
alpha = y2 < y1 ? 1 - ry : ry;
}
-
+
// Get the exact location of the marcher
int nori[3] = {ori[0] * mindimen, ori[1] * mindimen, ori[2] * mindimen};
- float spt[3] = {(float) nori[0],(float) nori[1],(float) nori[2]};
- spt[(dir +(3 - walkdir)) % 3] += alpha * mindimen;
- if(inc < 0)
- {
+ float spt[3] = {(float) nori[0], (float) nori[1], (float) nori[2]};
+ spt[(dir + (3 - walkdir)) % 3] += alpha * mindimen;
+ if (inc < 0) {
spt[(dir + walkdir) % 3] += mindimen;
}
-
+
// dc_printf("new x,y: %d %d\n", ori[xdir] / edgelen, ori[ydir] / edgelen);
// dc_printf("nori: %d %d %d alpha: %f walkdir: %d\n", nori[0], nori[1], nori[2], alpha, walkdir);
// dc_printf("%f %f %f\n", spt[0], spt[1], spt[2]);
@@ -1366,11 +1252,9 @@ Node* Octree::connectFace(Node* newnode, int st[3], int len, int dir,
int flag = 0;
// Add the cells to the rings and fill in the patch
- PathElement* newEleN;
- if(curEleN->pos[0] != stN[0] || curEleN->pos[1] != stN[1] || curEleN->pos[2] != stN[2])
- {
- if(curEleN->next->pos[0] != stN[0] || curEleN->next->pos[1] != stN[1] || curEleN->next->pos[2] != stN[2])
- {
+ PathElement *newEleN;
+ if (curEleN->pos[0] != stN[0] || curEleN->pos[1] != stN[1] || curEleN->pos[2] != stN[2]) {
+ if (curEleN->next->pos[0] != stN[0] || curEleN->next->pos[1] != stN[1] || curEleN->next->pos[2] != stN[2]) {
newEleN = new PathElement;
newEleN->next = curEleN->next;
newEleN->pos[0] = stN[0];
@@ -1379,23 +1263,20 @@ Node* Octree::connectFace(Node* newnode, int st[3], int len, int dir,
curEleN->next = newEleN;
}
- else
- {
+ else {
newEleN = curEleN->next;
}
curN = patchAdjacent(&newnode->internal, len, curEleN->pos, curN,
- newEleN->pos, (LeafNode*)nodeN, walkdir,
- inc, dir, 1, alpha);
+ newEleN->pos, (LeafNode *)nodeN, walkdir,
+ inc, dir, 1, alpha);
curEleN = newEleN;
- flag ++;
+ flag++;
}
- PathElement* newEleP;
- if(curEleP->pos[0] != stP[0] || curEleP->pos[1] != stP[1] || curEleP->pos[2] != stP[2])
- {
- if(f2->pos[0] != stP[0] || f2->pos[1] != stP[1] || f2->pos[2] != stP[2])
- {
+ PathElement *newEleP;
+ if (curEleP->pos[0] != stP[0] || curEleP->pos[1] != stP[1] || curEleP->pos[2] != stP[2]) {
+ if (f2->pos[0] != stP[0] || f2->pos[1] != stP[1] || f2->pos[2] != stP[2]) {
newEleP = new PathElement;
newEleP->next = curEleP;
newEleP->pos[0] = stP[0];
@@ -1404,27 +1285,25 @@ Node* Octree::connectFace(Node* newnode, int st[3], int len, int dir,
f2->next = newEleP;
}
- else
- {
+ else {
newEleP = f2;
}
curP = patchAdjacent(&newnode->internal, len, curEleP->pos, curP,
- newEleP->pos, (LeafNode*)nodeP, walkdir,
- inc, dir, 0, alpha);
+ newEleP->pos, (LeafNode *)nodeP, walkdir,
+ inc, dir, 0, alpha);
curEleP = newEleP;
- flag ++;
+ flag++;
}
-
+
/*
- if(flag == 0)
- {
- dc_printf("error: non-synchronized patching! at \n");
- }
- */
+ if(flag == 0) {
+ dc_printf("error: non-synchronized patching! at \n");
+ }
+ */
}
#ifdef IN_DEBUG_MODE
@@ -1441,10 +1320,10 @@ Node* Octree::connectFace(Node* newnode, int st[3], int len, int dir,
return newnode;
}
-LeafNode* Octree::patchAdjacent(InternalNode* node, int len, int st1[3],
- LeafNode* leaf1, int st2[3], LeafNode* leaf2,
- int walkdir, int inc, int dir, int side,
- float alpha)
+LeafNode *Octree::patchAdjacent(InternalNode *node, int len, int st1[3],
+ LeafNode *leaf1, int st2[3], LeafNode *leaf2,
+ int walkdir, int inc, int dir, int side,
+ float alpha)
{
#ifdef IN_DEBUG_MODE
dc_printf("Before patching.\n");
@@ -1454,29 +1333,28 @@ LeafNode* Octree::patchAdjacent(InternalNode* node, int len, int st1[3],
#endif
// Get edge index on each leaf
- int edgedir =(dir +(3 - walkdir)) % 3;
- int incdir =(dir + walkdir) % 3;
- int ind1 =(edgedir == 1 ?(dir + 3 - edgedir) % 3 - 1 : 2 -(dir + 3 - edgedir) % 3);
- int ind2 =(edgedir == 1 ?(incdir + 3 - edgedir) % 3 - 1 : 2 -(incdir + 3 - edgedir) % 3);
+ int edgedir = (dir + (3 - walkdir)) % 3;
+ int incdir = (dir + walkdir) % 3;
+ int ind1 = (edgedir == 1 ? (dir + 3 - edgedir) % 3 - 1 : 2 - (dir + 3 - edgedir) % 3);
+ int ind2 = (edgedir == 1 ? (incdir + 3 - edgedir) % 3 - 1 : 2 - (incdir + 3 - edgedir) % 3);
- int eind1 =((edgedir << 2) |(side << ind1) |((inc > 0 ? 1 : 0) << ind2));
- int eind2 =((edgedir << 2) |(side << ind1) |((inc > 0 ? 0 : 1) << ind2));
+ int eind1 = ((edgedir << 2) | (side << ind1) | ((inc > 0 ? 1 : 0) << ind2));
+ int eind2 = ((edgedir << 2) | (side << ind1) | ((inc > 0 ? 0 : 1) << ind2));
#ifdef IN_DEBUG_MODE
dc_printf("Index 1: %d Alpha 1: %f Index 2: %d Alpha 2: %f\n", eind1, alpha, eind2, alpha);
/*
- if(alpha < 0 || alpha > 1)
- {
- dc_printf("Index 1: %d Alpha 1: %f Index 2: %d Alpha 2: %f\n", eind1, alpha, eind2, alpha);
- printInfo(st1);
- printInfo(st2);
- }
- */
+ if(alpha < 0 || alpha > 1) {
+ dc_printf("Index 1: %d Alpha 1: %f Index 2: %d Alpha 2: %f\n", eind1, alpha, eind2, alpha);
+ printInfo(st1);
+ printInfo(st2);
+ }
+ */
#endif
// Flip edge parity
- LeafNode* nleaf1 = flipEdge(leaf1, eind1, alpha);
- LeafNode* nleaf2 = flipEdge(leaf2, eind2, alpha);
+ LeafNode *nleaf1 = flipEdge(leaf1, eind1, alpha);
+ LeafNode *nleaf2 = flipEdge(leaf2, eind2, alpha);
// Update parent link
updateParent(node, len, st1, nleaf1);
@@ -1485,13 +1363,13 @@ LeafNode* Octree::patchAdjacent(InternalNode* node, int len, int st1[3],
// updateParent(nleaf2, mindimen, st2);
/*
- float m[3];
- dc_printf("Adding new point: %f %f %f\n", spt[0], spt[1], spt[2]);
- getMinimizer(leaf1, m);
- dc_printf("Cell %d now has minimizer %f %f %f\n", leaf1, m[0], m[1], m[2]);
- getMinimizer(leaf2, m);
- dc_printf("Cell %d now has minimizer %f %f %f\n", leaf2, m[0], m[1], m[2]);
- */
+ float m[3];
+ dc_printf("Adding new point: %f %f %f\n", spt[0], spt[1], spt[2]);
+ getMinimizer(leaf1, m);
+ dc_printf("Cell %d now has minimizer %f %f %f\n", leaf1, m[0], m[1], m[2]);
+ getMinimizer(leaf2, m);
+ dc_printf("Cell %d now has minimizer %f %f %f\n", leaf2, m[0], m[1], m[2]);
+ */
#ifdef IN_DEBUG_MODE
dc_printf("After patching.\n");
@@ -1501,7 +1379,7 @@ LeafNode* Octree::patchAdjacent(InternalNode* node, int len, int st1[3],
return nleaf2;
}
-Node* Octree::locateCell(InternalNode* node, int st[3], int len, int ori[3], int dir, int side, Node*& rleaf, int rst[3], int& rlen)
+Node *Octree::locateCell(InternalNode *node, int st[3], int len, int ori[3], int dir, int side, Node *& rleaf, int rst[3], int& rlen)
{
#ifdef IN_DEBUG_MODE
// dc_printf("Call to LOCATECELL with node ");
@@ -1511,16 +1389,13 @@ Node* Octree::locateCell(InternalNode* node, int st[3], int len, int ori[3], int
int i;
len >>= 1;
int ind = 0;
- for(i = 0; i < 3; i ++)
- {
+ for (i = 0; i < 3; i++) {
ind <<= 1;
- if(i == dir && side == 1)
- {
- ind |=(ori[i] <=(st[i] + len) ? 0 : 1);
+ if (i == dir && side == 1) {
+ ind |= (ori[i] <= (st[i] + len) ? 0 : 1);
}
- else
- {
- ind |=(ori[i] <(st[i] + len) ? 0 : 1);
+ else {
+ ind |= (ori[i] < (st[i] + len) ? 0 : 1);
}
}
@@ -1532,86 +1407,74 @@ Node* Octree::locateCell(InternalNode* node, int st[3], int len, int ori[3], int
rst[0] = st[0] + vertmap[ind][0] * len;
rst[1] = st[1] + vertmap[ind][1] * len;
rst[2] = st[2] + vertmap[ind][2] * len;
-
- if(hasChild(node, ind))
- {
+
+ if (hasChild(node, ind)) {
int count = getChildCount(node, ind);
- Node* chd = getChild(node, count);
- if(isLeaf(node, ind))
- {
+ Node *chd = getChild(node, count);
+ if (isLeaf(node, ind)) {
rleaf = chd;
rlen = len;
}
- else
- {
+ else {
// Recur
setChild(node, count, locateCell(&chd->internal, rst, len, ori, dir, side, rleaf, rst, rlen));
}
}
- else
- {
+ else {
// Create a new child here
- if(len == mindimen)
- {
- LeafNode* chd = createLeaf(0);
- node = addChild(node, ind, (Node*)chd, 1);
- rleaf = (Node*)chd;
+ if (len == mindimen) {
+ LeafNode *chd = createLeaf(0);
+ node = addChild(node, ind, (Node *)chd, 1);
+ rleaf = (Node *)chd;
rlen = len;
}
- else
- {
+ else {
// Subdivide the empty cube
- InternalNode* chd = createInternal(0);
+ InternalNode *chd = createInternal(0);
node = addChild(node, ind,
- locateCell(chd, rst, len, ori, dir, side, rleaf, rst, rlen), 0);
+ locateCell(chd, rst, len, ori, dir, side, rleaf, rst, rlen), 0);
}
}
-
+
#ifdef IN_DEBUG_MODE
// dc_printf("Return from LOCATECELL with node ");
// printNode(newnode);
#endif
- return (Node*)node;
+ return (Node *)node;
}
-void Octree::checkElement(PathElement* ele)
+void Octree::checkElement(PathElement *ele)
{
/*
- if(ele != NULL && locateLeafCheck(ele->pos) != ele->node)
- {
- dc_printf("Screwed! at pos: %d %d %d\n", ele->pos[0]>>minshift, ele->pos[1]>>minshift, ele->pos[2]>>minshift);
- exit(0);
- }
- */
+ if(ele != NULL && locateLeafCheck(ele->pos) != ele->node) {
+ dc_printf("Screwed! at pos: %d %d %d\n", ele->pos[0]>>minshift, ele->pos[1]>>minshift, ele->pos[2]>>minshift);
+ exit(0);
+ }
+ */
}
-void Octree::checkPath(PathElement* path)
+void Octree::checkPath(PathElement *path)
{
PathElement *n = path;
int same = 0;
- while(n &&(same == 0 || n != path))
- {
- same ++;
+ while (n && (same == 0 || n != path)) {
+ same++;
checkElement(n);
n = n->next;
}
}
-void Octree::testFacePoint(PathElement* e1, PathElement* e2)
+void Octree::testFacePoint(PathElement *e1, PathElement *e2)
{
int i;
- PathElement * e = NULL;
- for(i = 0; i < 3; i ++)
- {
- if(e1->pos[i] != e2->pos[i])
- {
- if(e1->pos[i] < e2->pos[i])
- {
+ PathElement *e = NULL;
+ for (i = 0; i < 3; i++) {
+ if (e1->pos[i] != e2->pos[i]) {
+ if (e1->pos[i] < e2->pos[i]) {
e = e2;
}
- else
- {
+ else {
e = e1;
}
break;
@@ -1624,56 +1487,50 @@ void Octree::testFacePoint(PathElement* e1, PathElement* e2)
getFacePoint(e, i, x, y, p, q);
}
-void Octree::getFacePoint(PathElement* leaf, int dir, int& x, int& y, float& p, float& q)
+void Octree::getFacePoint(PathElement *leaf, int dir, int& x, int& y, float& p, float& q)
{
// Find average intersections
float avg[3] = {0, 0, 0};
float off[3];
int num = 0, num2 = 0;
- LeafNode* leafnode = locateLeaf(leaf->pos);
- for(int i = 0; i < 4; i ++)
- {
+ LeafNode *leafnode = locateLeaf(leaf->pos);
+ for (int i = 0; i < 4; i++) {
int edgeind = faceMap[dir * 2][i];
int nst[3];
- for(int j = 0; j < 3; j ++)
- {
+ for (int j = 0; j < 3; j++) {
nst[j] = leaf->pos[j] + mindimen * vertmap[edgemap[edgeind][0]][j];
}
- if(getEdgeIntersectionByIndex(nst, edgeind / 4, off, 1))
- {
+ if (getEdgeIntersectionByIndex(nst, edgeind / 4, off, 1)) {
avg[0] += off[0];
avg[1] += off[1];
avg[2] += off[2];
- num ++;
+ num++;
}
- if(getEdgeParity(leafnode, edgeind))
- {
- num2 ++;
+ if (getEdgeParity(leafnode, edgeind)) {
+ num2++;
}
}
- if(num == 0)
- {
- dc_printf("Wrong! dir: %d pos: %d %d %d num: %d\n", dir, leaf->pos[0]>>minshift, leaf->pos[1]>>minshift, leaf->pos[2]>>minshift, num2);
- avg[0] =(float) leaf->pos[0];
- avg[1] =(float) leaf->pos[1];
- avg[2] =(float) leaf->pos[2];
+ if (num == 0) {
+ dc_printf("Wrong! dir: %d pos: %d %d %d num: %d\n", dir, leaf->pos[0] >> minshift, leaf->pos[1] >> minshift, leaf->pos[2] >> minshift, num2);
+ avg[0] = (float) leaf->pos[0];
+ avg[1] = (float) leaf->pos[1];
+ avg[2] = (float) leaf->pos[2];
}
- else
- {
-
+ else {
+
avg[0] /= num;
avg[1] /= num;
avg[2] /= num;
-
+
//avg[0] =(float) leaf->pos[0];
//avg[1] =(float) leaf->pos[1];
//avg[2] =(float) leaf->pos[2];
}
-
- int xdir =(dir + 1) % 3;
- int ydir =(dir + 2) % 3;
+
+ int xdir = (dir + 1) % 3;
+ int ydir = (dir + 2) % 3;
float xf = avg[xdir];
float yf = avg[ydir];
@@ -1682,42 +1539,40 @@ void Octree::getFacePoint(PathElement* leaf, int dir, int& x, int& y, float& p,
// Is it outside?
// PathElement* leaf = leaf1->len < leaf2->len ? leaf1 : leaf2;
/*
- float* m =(leaf == leaf1 ? m1 : m2);
- if(xf < leaf->pos[xdir] ||
- yf < leaf->pos[ydir] ||
- xf > leaf->pos[xdir] + leaf->len ||
- yf > leaf->pos[ydir] + leaf->len)
- {
- dc_printf("Outside cube(%d %d %d), %d : %d %d %f %f\n", leaf->pos[0], leaf->pos[1], leaf->pos[2], leaf->len,
- pos, dir, xf, yf);
-
- // For now, snap to cell
- xf = m[xdir];
- yf = m[ydir];
- }
- */
+ float* m =(leaf == leaf1 ? m1 : m2);
+ if(xf < leaf->pos[xdir] ||
+ yf < leaf->pos[ydir] ||
+ xf > leaf->pos[xdir] + leaf->len ||
+ yf > leaf->pos[ydir] + leaf->len) {
+ dc_printf("Outside cube(%d %d %d), %d : %d %d %f %f\n", leaf->pos[0], leaf->pos[1], leaf->pos[2], leaf->len,
+ pos, dir, xf, yf);
+
+ // For now, snap to cell
+ xf = m[xdir];
+ yf = m[ydir];
+ }
+ */
/*
- if(alpha < 0 || alpha > 1 ||
- xf < leaf->pos[xdir] || xf > leaf->pos[xdir] + leaf->len ||
- yf < leaf->pos[ydir] || yf > leaf->pos[ydir] + leaf->len)
- {
- dc_printf("Alpha: %f Address: %d and %d\n", alpha, leaf1->node, leaf2->node);
- dc_printf("GETFACEPOINT result:(%d %d %d) %d min:(%f %f %f);(%d %d %d) %d min:(%f %f %f).\n",
- leaf1->pos[0], leaf1->pos[1], leaf1->pos[2], leaf1->len, m1[0], m1[1], m1[2],
- leaf2->pos[0], leaf2->pos[1], leaf2->pos[2], leaf2->len, m2[0], m2[1], m2[2]);
- dc_printf("Face point at dir %d pos %d: %f %f\n", dir, pos, xf, yf);
- }
- */
+ if(alpha < 0 || alpha > 1 ||
+ xf < leaf->pos[xdir] || xf > leaf->pos[xdir] + leaf->len ||
+ yf < leaf->pos[ydir] || yf > leaf->pos[ydir] + leaf->len) {
+ dc_printf("Alpha: %f Address: %d and %d\n", alpha, leaf1->node, leaf2->node);
+ dc_printf("GETFACEPOINT result:(%d %d %d) %d min:(%f %f %f);(%d %d %d) %d min:(%f %f %f).\n",
+ leaf1->pos[0], leaf1->pos[1], leaf1->pos[2], leaf1->len, m1[0], m1[1], m1[2],
+ leaf2->pos[0], leaf2->pos[1], leaf2->pos[2], leaf2->len, m2[0], m2[1], m2[2]);
+ dc_printf("Face point at dir %d pos %d: %f %f\n", dir, pos, xf, yf);
+ }
+ */
#endif
-
+
// Get the integer and float part
- x =((leaf->pos[xdir]) >> minshift);
- y =((leaf->pos[ydir]) >> minshift);
+ x = ((leaf->pos[xdir]) >> minshift);
+ y = ((leaf->pos[ydir]) >> minshift);
- p =(xf - leaf->pos[xdir]) / mindimen;
- q =(yf - leaf->pos[ydir]) / mindimen;
+ p = (xf - leaf->pos[xdir]) / mindimen;
+ q = (yf - leaf->pos[ydir]) / mindimen;
#ifdef IN_DEBUG_MODE
@@ -1725,41 +1580,37 @@ void Octree::getFacePoint(PathElement* leaf, int dir, int& x, int& y, float& p,
#endif
}
-int Octree::findPair(PathElement* head, int pos, int dir, PathElement*& pre1, PathElement*& pre2)
+int Octree::findPair(PathElement *head, int pos, int dir, PathElement *& pre1, PathElement *& pre2)
{
int side = getSide(head, pos, dir);
- PathElement* cur = head;
- PathElement* anchor;
- PathElement* ppre1, *ppre2;
-
+ PathElement *cur = head;
+ PathElement *anchor;
+ PathElement *ppre1, *ppre2;
+
// Start from this face, find a pair
anchor = cur;
ppre1 = cur;
cur = cur->next;
- while(cur != anchor &&(getSide(cur, pos, dir) == side))
- {
+ while (cur != anchor && (getSide(cur, pos, dir) == side)) {
ppre1 = cur;
cur = cur->next;
}
- if(cur == anchor)
- {
+ if (cur == anchor) {
// No pair found
return side;
}
-
+
side = getSide(cur, pos, dir);
ppre2 = cur;
cur = cur->next;
- while(getSide(cur, pos, dir) == side)
- {
+ while (getSide(cur, pos, dir) == side) {
ppre2 = cur;
cur = cur->next;
}
-
-
+
+
// Switch pre1 and pre2 if we start from the higher side
- if(side == -1)
- {
+ if (side == -1) {
cur = ppre1;
ppre1 = ppre2;
ppre2 = cur;
@@ -1767,24 +1618,23 @@ int Octree::findPair(PathElement* head, int pos, int dir, PathElement*& pre1, Pa
pre1 = ppre1;
pre2 = ppre2;
-
+
return 0;
}
-int Octree::getSide(PathElement* e, int pos, int dir)
+int Octree::getSide(PathElement *e, int pos, int dir)
{
return (e->pos[dir] < pos ? -1 : 1);
}
-int Octree::isEqual(PathElement* e1, PathElement* e2)
+int Octree::isEqual(PathElement *e1, PathElement *e2)
{
return (e1->pos[0] == e2->pos[0] && e1->pos[1] == e2->pos[1] && e1->pos[2] == e2->pos[2]);
}
-void Octree::compressRing(PathElement*& ring)
+void Octree::compressRing(PathElement *& ring)
{
- if(ring == NULL)
- {
+ if (ring == NULL) {
return;
}
#ifdef IN_DEBUG_MODE
@@ -1792,26 +1642,22 @@ void Octree::compressRing(PathElement*& ring)
printPath(ring);
#endif
- PathElement* cur = ring->next->next;
- PathElement* pre = ring->next;
- PathElement* prepre = ring;
- PathElement* anchor = prepre;
-
- do
- {
- while(isEqual(cur, prepre))
- {
+ PathElement *cur = ring->next->next;
+ PathElement *pre = ring->next;
+ PathElement *prepre = ring;
+ PathElement *anchor = prepre;
+
+ do {
+ while (isEqual(cur, prepre)) {
// Delete
- if(cur == prepre)
- {
+ if (cur == prepre) {
// The ring has shrinked to a point
delete pre;
delete cur;
anchor = NULL;
break;
}
- else
- {
+ else {
prepre->next = cur->next;
delete pre;
delete cur;
@@ -1820,17 +1666,16 @@ void Octree::compressRing(PathElement*& ring)
anchor = prepre;
}
}
-
- if(anchor == NULL)
- {
+
+ if (anchor == NULL) {
break;
}
-
+
prepre = pre;
pre = cur;
cur = cur->next;
- } while(prepre != anchor);
-
+ } while (prepre != anchor);
+
ring = anchor;
#ifdef IN_DEBUG_MODE
@@ -1845,18 +1690,14 @@ void Octree::buildSigns()
// dc_printf("Building up look up table...\n");
int size = 1 << 12;
unsigned char table[1 << 12];
- for(int i = 0; i < size; i ++)
- {
+ for (int i = 0; i < size; i++) {
table[i] = 0;
}
- for(int i = 0; i < 256; i ++)
- {
+ for (int i = 0; i < 256; i++) {
int ind = 0;
- for(int j = 11; j >= 0; j --)
- {
+ for (int j = 11; j >= 0; j--) {
ind <<= 1;
- if(((i >> edgemap[j][0]) & 1) ^((i >> edgemap[j][1]) & 1))
- {
+ if (((i >> edgemap[j][0]) & 1) ^ ((i >> edgemap[j][1]) & 1)) {
ind |= 1;
}
}
@@ -1870,21 +1711,18 @@ void Octree::buildSigns()
buildSigns(table, root, 0, sg, cube);
}
-void Octree::buildSigns(unsigned char table[], Node* node, int isLeaf, int sg, int rvalue[8])
+void Octree::buildSigns(unsigned char table[], Node *node, int isLeaf, int sg, int rvalue[8])
{
- if(node == NULL)
- {
- for(int i = 0; i < 8; i ++)
- {
+ if (node == NULL) {
+ for (int i = 0; i < 8; i++) {
rvalue[i] = sg;
}
return;
}
- if(isLeaf == 0)
- {
+ if (isLeaf == 0) {
// Internal node
- Node* chd[8];
+ Node *chd[8];
int leaf[8];
fillChildren(&node->internal, chd, leaf);
@@ -1895,20 +1733,17 @@ void Octree::buildSigns(unsigned char table[], Node* node, int isLeaf, int sg, i
// Get the rest
int cube[8];
- for(int i = 1; i < 8; i ++)
- {
+ for (int i = 1; i < 8; i++) {
buildSigns(table, chd[i], leaf[i], oris[i], cube);
rvalue[i] = cube[i];
}
}
- else
- {
+ else {
// Leaf node
generateSigns(&node->leaf, table, sg);
- for(int i = 0; i < 8; i ++)
- {
+ for (int i = 0; i < 8; i++) {
rvalue[i] = getSign(&node->leaf, i);
}
}
@@ -1935,50 +1770,45 @@ void Octree::floodFill()
}
-void Octree::clearProcessBits(Node* node, int height)
+void Octree::clearProcessBits(Node *node, int height)
{
int i;
- if(height == 0)
- {
- // Leaf cell,
- for(i = 0; i < 12; i ++)
- {
+ if (height == 0) {
+ // Leaf cell,
+ for (i = 0; i < 12; i++) {
setOutProcess(&node->leaf, i);
}
}
- else
- {
+ else {
// Internal cell, recur
int count = 0;
- for(i = 0; i < 8; i ++)
- {
- if(hasChild(&node->internal, i))
- {
+ for (i = 0; i < 8; i++) {
+ if (hasChild(&node->internal, i)) {
clearProcessBits(getChild(&node->internal, count), height - 1);
- count ++;
+ count++;
}
}
- }
+ }
}
-int Octree::floodFill(LeafNode* leaf, int st[3], int len, int height, int threshold)
+int Octree::floodFill(LeafNode *leaf, int st[3], int len, int height, int threshold)
{
int i, j;
int maxtotal = 0;
- // Leaf cell,
+ // Leaf cell,
int par, inp;
// Test if the leaf has intersection edges
- for(i = 0; i < 12; i ++) {
+ for (i = 0; i < 12; i++) {
par = getEdgeParity(leaf, i);
inp = isInProcess(leaf, i);
- if(par == 1 && inp == 0) {
+ if (par == 1 && inp == 0) {
// Intersection edge, hasn't been processed
// Let's start filling
- GridQueue* queue = new GridQueue();
+ GridQueue *queue = new GridQueue();
int total = 1;
// Set to in process
@@ -1994,7 +1824,7 @@ int Octree::floodFill(LeafNode* leaf, int st[3], int len, int height, int thresh
// Queue processing
int nst[3], dir;
- while(queue->popQueue(nst, dir) == 1) {
+ while (queue->popQueue(nst, dir) == 1) {
// dc_printf("nst: %d %d %d, dir: %d\n", nst[0]/mindimen, nst[1]/mindimen, nst[2]/mindimen, dir);
// locations
int stMask[3][3] = {
@@ -2003,14 +1833,14 @@ int Octree::floodFill(LeafNode* leaf, int st[3], int len, int height, int thresh
{0 - len, 0 - len, 0}
};
int cst[2][3];
- for(j = 0; j < 3; j ++) {
+ for (j = 0; j < 3; j++) {
cst[0][j] = nst[j];
cst[1][j] = nst[j] + stMask[dir][j];
}
- // cells
- LeafNode* cs[2];
- for(j = 0; j < 2; j ++) {
+ // cells
+ LeafNode *cs[2];
+ for (j = 0; j < 2; j++) {
cs[j] = locateLeaf(cst[j]);
}
@@ -2018,37 +1848,37 @@ int Octree::floodFill(LeafNode* leaf, int st[3], int len, int height, int thresh
int s = getSign(cs[0], 0);
// Masks
- int fcCells[4] = {1,0,1,0};
+ int fcCells[4] = {1, 0, 1, 0};
int fcEdges[3][4][3] = {
- {{9,2,11},{8,1,10},{5,1,7},{4,2,6}},
- {{10,6,11},{8,5,9},{1,5,3},{0,6,2}},
- {{6,10,7},{4,9,5},{2,9,3},{0,10,1}}
+ {{9, 2, 11}, {8, 1, 10}, {5, 1, 7}, {4, 2, 6}},
+ {{10, 6, 11}, {8, 5, 9}, {1, 5, 3}, {0, 6, 2}},
+ {{6, 10, 7}, {4, 9, 5}, {2, 9, 3}, {0, 10, 1}}
};
// Search for neighboring connected intersection edges
- for(int find = 0; find < 4; find ++) {
+ for (int find = 0; find < 4; find++) {
int cind = fcCells[find];
int eind, edge;
- if(s == 0) {
+ if (s == 0) {
// Original order
- for(eind = 0; eind < 3; eind ++) {
+ for (eind = 0; eind < 3; eind++) {
edge = fcEdges[dir][find][eind];
- if(getEdgeParity(cs[cind], edge) == 1) {
+ if (getEdgeParity(cs[cind], edge) == 1) {
break;
}
}
}
else {
// Inverse order
- for(eind = 2; eind >= 0; eind --) {
+ for (eind = 2; eind >= 0; eind--) {
edge = fcEdges[dir][find][eind];
- if(getEdgeParity(cs[cind], edge) == 1) {
+ if (getEdgeParity(cs[cind], edge) == 1) {
break;
}
}
}
-
- if(eind == 3 || eind == -1) {
+
+ if (eind == 3 || eind == -1) {
dc_printf("Wrong! this is not a consistent sign. %d\n", eind);
}
else {
@@ -2057,12 +1887,12 @@ int Octree::floodFill(LeafNode* leaf, int st[3], int len, int height, int thresh
est[1] = cst[cind][1] + vertmap[edgemap[edge][0]][1] * len;
est[2] = cst[cind][2] + vertmap[edgemap[edge][0]][2] * len;
int edir = edge / 4;
-
- if(isInProcess(cs[cind], edge) == 0) {
+
+ if (isInProcess(cs[cind], edge) == 0) {
setInProcessAll(est, edir);
queue->pushQueue(est, edir);
// dc_printf("Pushed: est: %d %d %d, edir: %d\n", est[0]/len, est[1]/len, est[2]/len, edir);
- total ++;
+ total++;
}
}
}
@@ -2070,16 +1900,16 @@ int Octree::floodFill(LeafNode* leaf, int st[3], int len, int height, int thresh
dc_printf("Size of component: %d ", total);
- if(threshold == 0) {
+ if (threshold == 0) {
// Measuring stage
- if(total > maxtotal) {
+ if (total > maxtotal) {
maxtotal = total;
}
dc_printf(".\n");
continue;
}
-
- if(total >= threshold) {
+
+ if (total >= threshold) {
dc_printf("Maintained.\n");
continue;
}
@@ -2095,7 +1925,7 @@ int Octree::floodFill(LeafNode* leaf, int st[3], int len, int height, int thresh
queue->pushQueue(mst, mdir);
// Queue processing
- while(queue->popQueue(nst, dir) == 1) {
+ while (queue->popQueue(nst, dir) == 1) {
// dc_printf("nst: %d %d %d, dir: %d\n", nst[0]/mindimen, nst[1]/mindimen, nst[2]/mindimen, dir);
// locations
int stMask[3][3] = {
@@ -2104,51 +1934,51 @@ int Octree::floodFill(LeafNode* leaf, int st[3], int len, int height, int thresh
{0 - len, 0 - len, 0}
};
int cst[2][3];
- for(j = 0; j < 3; j ++) {
+ for (j = 0; j < 3; j++) {
cst[0][j] = nst[j];
cst[1][j] = nst[j] + stMask[dir][j];
}
- // cells
- LeafNode* cs[2];
- for(j = 0; j < 2; j ++)
+ // cells
+ LeafNode *cs[2];
+ for (j = 0; j < 2; j++)
cs[j] = locateLeaf(cst[j]);
// Middle sign
int s = getSign(cs[0], 0);
// Masks
- int fcCells[4] = {1,0,1,0};
+ int fcCells[4] = {1, 0, 1, 0};
int fcEdges[3][4][3] = {
- {{9,2,11},{8,1,10},{5,1,7},{4,2,6}},
- {{10,6,11},{8,5,9},{1,5,3},{0,6,2}},
- {{6,10,7},{4,9,5},{2,9,3},{0,10,1}}
+ {{9, 2, 11}, {8, 1, 10}, {5, 1, 7}, {4, 2, 6}},
+ {{10, 6, 11}, {8, 5, 9}, {1, 5, 3}, {0, 6, 2}},
+ {{6, 10, 7}, {4, 9, 5}, {2, 9, 3}, {0, 10, 1}}
};
// Search for neighboring connected intersection edges
- for(int find = 0; find < 4; find ++) {
+ for (int find = 0; find < 4; find++) {
int cind = fcCells[find];
int eind, edge;
- if(s == 0) {
+ if (s == 0) {
// Original order
- for(eind = 0; eind < 3; eind ++) {
+ for (eind = 0; eind < 3; eind++) {
edge = fcEdges[dir][find][eind];
- if(isInProcess(cs[cind], edge) == 1) {
+ if (isInProcess(cs[cind], edge) == 1) {
break;
}
}
}
else {
// Inverse order
- for(eind = 2; eind >= 0; eind --) {
+ for (eind = 2; eind >= 0; eind--) {
edge = fcEdges[dir][find][eind];
- if(isInProcess(cs[cind], edge) == 1) {
+ if (isInProcess(cs[cind], edge) == 1) {
break;
}
}
}
-
- if(eind == 3 || eind == -1) {
+
+ if (eind == 3 || eind == -1) {
dc_printf("Wrong! this is not a consistent sign. %d\n", eind);
}
else {
@@ -2157,12 +1987,12 @@ int Octree::floodFill(LeafNode* leaf, int st[3], int len, int height, int thresh
est[1] = cst[cind][1] + vertmap[edgemap[edge][0]][1] * len;
est[2] = cst[cind][2] + vertmap[edgemap[edge][0]][2] * len;
int edir = edge / 4;
-
- if(getEdgeParity(cs[cind], edge) == 1) {
+
+ if (getEdgeParity(cs[cind], edge) == 1) {
flipParityAll(est, edir);
queue->pushQueue(est, edir);
// dc_printf("Pushed: est: %d %d %d, edir: %d\n", est[0]/len, est[1]/len, est[2]/len, edir);
- total ++;
+ total++;
}
}
}
@@ -2173,35 +2003,30 @@ int Octree::floodFill(LeafNode* leaf, int st[3], int len, int height, int thresh
return maxtotal;
}
-int Octree::floodFill(Node* node, int st[3], int len, int height, int threshold)
+int Octree::floodFill(Node *node, int st[3], int len, int height, int threshold)
{
int i;
int maxtotal = 0;
- if(height == 0)
- {
+ if (height == 0) {
maxtotal = floodFill(&node->leaf, st, len, height, threshold);
}
- else
- {
+ else {
// Internal cell, recur
int count = 0;
len >>= 1;
- for(i = 0; i < 8; i ++)
- {
- if(hasChild((InternalNode*)node, i))
- {
+ for (i = 0; i < 8; i++) {
+ if (hasChild((InternalNode *)node, i)) {
int nst[3];
nst[0] = st[0] + vertmap[i][0] * len;
nst[1] = st[1] + vertmap[i][1] * len;
nst[2] = st[2] + vertmap[i][2] * len;
-
- int d = floodFill(getChild((InternalNode*)node, count), nst, len, height - 1, threshold);
- if(d > maxtotal)
- {
+
+ int d = floodFill(getChild((InternalNode *)node, count), nst, len, height - 1, threshold);
+ if (d > maxtotal) {
maxtotal = d;
}
- count ++;
+ count++;
}
}
}
@@ -2220,7 +2045,7 @@ void Octree::writeOut()
countIntersection(root, maxDepth, numQuads, numVertices, numEdges);
dc_printf("Vertices counted: %d Polys counted: %d \n", numVertices, numQuads);
- output_mesh = alloc_output(numVertices, numQuads);
+ output_mesh = alloc_output(numVertices, numQuads);
int offset = 0;
int st[3] = {0, 0, 0};
@@ -2234,39 +2059,32 @@ void Octree::writeOut()
dc_printf("Vertices written: %d Quads written: %d \n", offset, actualQuads);
}
-void Octree::countIntersection(Node* node, int height, int& nedge, int& ncell, int& nface)
+void Octree::countIntersection(Node *node, int height, int& nedge, int& ncell, int& nface)
{
- if(height > 0)
- {
+ if (height > 0) {
int total = getNumChildren(&node->internal);
- for(int i = 0; i < total; i ++)
- {
+ for (int i = 0; i < total; i++) {
countIntersection(getChild(&node->internal, i), height - 1, nedge, ncell, nface);
}
}
- else
- {
+ else {
nedge += getNumEdges2(&node->leaf);
int smask = getSignMask(&node->leaf);
-
- if(use_manifold)
- {
+
+ if (use_manifold) {
int comps = manifold_table[smask].comps;
ncell += comps;
}
else {
- if(smask > 0 && smask < 255)
- {
- ncell ++;
+ if (smask > 0 && smask < 255) {
+ ncell++;
}
}
-
- for(int i = 0; i < 3; i ++)
- {
- if(getFaceEdgeNum(&node->leaf, i * 2))
- {
- nface ++;
+
+ for (int i = 0; i < 3; i++) {
+ if (getFaceEdgeNum(&node->leaf, i * 2)) {
+ nface++;
}
}
}
@@ -2275,92 +2093,89 @@ void Octree::countIntersection(Node* node, int height, int& nedge, int& ncell, i
/* from http://eigen.tuxfamily.org/bz/show_bug.cgi?id=257 */
template<typename _Matrix_Type_>
void pseudoInverse(const _Matrix_Type_ &a,
- _Matrix_Type_ &result,
- double epsilon = std::numeric_limits<typename _Matrix_Type_::Scalar>::epsilon())
+ _Matrix_Type_ &result,
+ double epsilon = std::numeric_limits<typename _Matrix_Type_::Scalar>::epsilon())
{
Eigen::JacobiSVD< _Matrix_Type_ > svd = a.jacobiSvd(Eigen::ComputeFullU |
- Eigen::ComputeFullV);
+ Eigen::ComputeFullV);
typename _Matrix_Type_::Scalar tolerance = epsilon * std::max(a.cols(),
- a.rows()) *
- svd.singularValues().array().abs().maxCoeff();
+ a.rows()) *
+ svd.singularValues().array().abs().maxCoeff();
result = svd.matrixV() *
- _Matrix_Type_((svd.singularValues().array().abs() >
- tolerance).select(svd.singularValues().
- array().inverse(), 0)).asDiagonal() *
- svd.matrixU().adjoint();
+ _Matrix_Type_((svd.singularValues().array().abs() >
+ tolerance).select(svd.singularValues().
+ array().inverse(), 0)).asDiagonal() *
+ svd.matrixU().adjoint();
}
void solve_least_squares(const float halfA[], const float b[],
- const float midpoint[], float rvalue[])
+ const float midpoint[], float rvalue[])
{
/* calculate pseudo-inverse */
Eigen::MatrixXf A(3, 3), pinv(3, 3);
A << halfA[0], halfA[1], halfA[2],
- halfA[1], halfA[3], halfA[4],
- halfA[2], halfA[4], halfA[5];
+ halfA[1], halfA[3], halfA[4],
+ halfA[2], halfA[4], halfA[5];
pseudoInverse(A, pinv);
Eigen::Vector3f b2(b), mp(midpoint), result;
b2 = b2 + A * -mp;
result = pinv * b2 + mp;
- for(int i = 0; i < 3; i++)
+ for (int i = 0; i < 3; i++)
rvalue[i] = result(i);
}
void minimize(float rvalue[3], float mp[3], const float pts[12][3],
- const float norms[12][3], const int parity[12])
+ const float norms[12][3], const int parity[12])
{
float ata[6] = {0, 0, 0, 0, 0, 0};
float atb[3] = {0, 0, 0};
int ec = 0;
-
- for(int i = 0; i < 12; i ++)
- {
+
+ for (int i = 0; i < 12; i++) {
// if(getEdgeParity(leaf, i))
- if(parity[i])
- {
- const float* norm = norms[i];
- const float* p = pts[i];
+ if (parity[i]) {
+ const float *norm = norms[i];
+ const float *p = pts[i];
// QEF
- ata[0] +=(float)(norm[0] * norm[0]);
- ata[1] +=(float)(norm[0] * norm[1]);
- ata[2] +=(float)(norm[0] * norm[2]);
- ata[3] +=(float)(norm[1] * norm[1]);
- ata[4] +=(float)(norm[1] * norm[2]);
- ata[5] +=(float)(norm[2] * norm[2]);
-
+ ata[0] += (float)(norm[0] * norm[0]);
+ ata[1] += (float)(norm[0] * norm[1]);
+ ata[2] += (float)(norm[0] * norm[2]);
+ ata[3] += (float)(norm[1] * norm[1]);
+ ata[4] += (float)(norm[1] * norm[2]);
+ ata[5] += (float)(norm[2] * norm[2]);
+
double pn = p[0] * norm[0] + p[1] * norm[1] + p[2] * norm[2];
-
- atb[0] +=(float)(norm[0] * pn);
- atb[1] +=(float)(norm[1] * pn);
- atb[2] +=(float)(norm[2] * pn);
+
+ atb[0] += (float)(norm[0] * pn);
+ atb[1] += (float)(norm[1] * pn);
+ atb[2] += (float)(norm[2] * pn);
// Minimizer
mp[0] += p[0];
mp[1] += p[1];
mp[2] += p[2];
-
- ec ++;
+
+ ec++;
}
}
- if(ec == 0)
- {
+ if (ec == 0) {
return;
}
mp[0] /= ec;
mp[1] /= ec;
mp[2] /= ec;
-
+
// Solve least squares
solve_least_squares(ata, atb, mp, rvalue);
}
-void Octree::computeMinimizer(LeafNode* leaf, int st[3], int len, float rvalue[3])
+void Octree::computeMinimizer(LeafNode *leaf, int st[3], int len, float rvalue[3])
{
// First, gather all edge intersections
float pts[12][3], norms[12][3];
@@ -2370,19 +2185,18 @@ void Octree::computeMinimizer(LeafNode* leaf, int st[3], int len, float rvalue[3
// Next, construct QEF and minimizer
float mp[3] = {0, 0, 0};
minimize(rvalue, mp, pts, norms, parity);
-
+
/* Restraining the location of the minimizer */
float nh1 = hermite_num * len;
- float nh2 =(1 + hermite_num) * len;
- if((mode == DUALCON_MASS_POINT || mode == DUALCON_CENTROID) ||
- (rvalue[0] < st[0] - nh1 || rvalue[1] < st[1] - nh1 || rvalue[2] < st[2] - nh1 ||
- rvalue[0] > st[0] + nh2 || rvalue[1] > st[1] + nh2 || rvalue[2] > st[2] + nh2))
- {
- if(mode == DUALCON_CENTROID) {
+ float nh2 = (1 + hermite_num) * len;
+ if ((mode == DUALCON_MASS_POINT || mode == DUALCON_CENTROID) ||
+ (rvalue[0] < st[0] - nh1 || rvalue[1] < st[1] - nh1 || rvalue[2] < st[2] - nh1 ||
+ rvalue[0] > st[0] + nh2 || rvalue[1] > st[1] + nh2 || rvalue[2] > st[2] + nh2)) {
+ if (mode == DUALCON_CENTROID) {
// Use centroids
- rvalue[0] =(float) st[0] + len / 2;
- rvalue[1] =(float) st[1] + len / 2;
- rvalue[2] =(float) st[2] + len / 2;
+ rvalue[0] = (float) st[0] + len / 2;
+ rvalue[1] = (float) st[1] + len / 2;
+ rvalue[2] = (float) st[2] + len / 2;
}
else {
// Use mass point instead
@@ -2393,120 +2207,96 @@ void Octree::computeMinimizer(LeafNode* leaf, int st[3], int len, float rvalue[3
}
}
-void Octree::generateMinimizer(Node* node, int st[3], int len, int height, int& offset)
+void Octree::generateMinimizer(Node *node, int st[3], int len, int height, int& offset)
{
int i, j;
- if(height == 0)
- {
+ if (height == 0) {
// Leaf cell, generate
// First, find minimizer
float rvalue[3];
- rvalue[0] =(float) st[0] + len / 2;
- rvalue[1] =(float) st[1] + len / 2;
- rvalue[2] =(float) st[2] + len / 2;
+ rvalue[0] = (float) st[0] + len / 2;
+ rvalue[1] = (float) st[1] + len / 2;
+ rvalue[2] = (float) st[2] + len / 2;
computeMinimizer(&node->leaf, st, len, rvalue);
// Update
//float fnst[3];
- for(j = 0; j < 3; j ++)
- {
+ for (j = 0; j < 3; j++) {
rvalue[j] = rvalue[j] * range / dimen + origin[j];
//fnst[j] = st[j] * range / dimen + origin[j];
}
int mult = 0, smask = getSignMask(&node->leaf);
-
- if(use_manifold)
- {
+
+ if (use_manifold) {
mult = manifold_table[smask].comps;
}
- else
- {
- if(smask > 0 && smask < 255)
- {
+ else {
+ if (smask > 0 && smask < 255) {
mult = 1;
}
}
- for(j = 0; j < mult; j ++)
- {
+ for (j = 0; j < mult; j++) {
add_vert(output_mesh, rvalue);
}
-
+
// Store the index
setMinimizerIndex(&node->leaf, offset);
offset += mult;
}
- else
- {
+ else {
// Internal cell, recur
int count = 0;
len >>= 1;
- for(i = 0; i < 8; i ++)
- {
- if(hasChild(&node->internal, i))
- {
+ for (i = 0; i < 8; i++) {
+ if (hasChild(&node->internal, i)) {
int nst[3];
nst[0] = st[0] + vertmap[i][0] * len;
nst[1] = st[1] + vertmap[i][1] * len;
nst[2] = st[2] + vertmap[i][2] * len;
-
+
generateMinimizer(getChild(&node->internal, count),
- nst, len, height - 1, offset);
- count ++;
+ nst, len, height - 1, offset);
+ count++;
}
}
}
}
-void Octree::processEdgeWrite(Node* node[4], int depth[4], int maxdep, int dir)
+void Octree::processEdgeWrite(Node *node[4], int depth[4], int maxdep, int dir)
{
//int color = 0;
int i = 3;
{
- if(getEdgeParity((LeafNode*)(node[i]), processEdgeMask[dir][i]))
- {
+ if (getEdgeParity((LeafNode *)(node[i]), processEdgeMask[dir][i])) {
int flip = 0;
int edgeind = processEdgeMask[dir][i];
- if(getSign((LeafNode*)node[i], edgemap[edgeind][1]) > 0)
- {
+ if (getSign((LeafNode *)node[i], edgemap[edgeind][1]) > 0) {
flip = 1;
}
-
+
int num = 0;
{
int ind[8];
- if(use_manifold)
- {
- /* Deprecated
- int ind[4] = {
- getMinimizerIndex(node[0], processEdgeMask[dir][0]),
- getMinimizerIndex(node[1], processEdgeMask[dir][1]),
- getMinimizerIndex(node[3], processEdgeMask[dir][3]),
- getMinimizerIndex(node[2], processEdgeMask[dir][2])
- };
- num = 4;
- */
+ if (use_manifold) {
int vind[2];
- int seq[4] = {0,1,3,2};
- for(int k = 0; k < 4; k ++)
- {
- getMinimizerIndices((LeafNode*)(node[seq[k]]), processEdgeMask[dir][seq[k]], vind);
- ind[num] = vind[0];
- num ++;
-
- if(vind[1] != -1)
- {
- ind[num] = vind[1];
- num ++;
- if(flip == 0)
- {
- ind[num-1] = vind[0];
- ind[num-2] = vind[1];
+ int seq[4] = {0, 1, 3, 2};
+ for (int k = 0; k < 4; k++) {
+ getMinimizerIndices((LeafNode *)(node[seq[k]]), processEdgeMask[dir][seq[k]], vind);
+ ind[num] = vind[0];
+ num++;
+
+ if (vind[1] != -1) {
+ ind[num] = vind[1];
+ num++;
+ if (flip == 0) {
+ ind[num - 1] = vind[0];
+ ind[num - 2] = vind[1];
}
}
}
@@ -2516,125 +2306,67 @@ void Octree::processEdgeWrite(Node* node[4], int depth[4], int maxdep, int dir)
non-quads */
}
else {
- if(flip) {
- ind[0] = getMinimizerIndex((LeafNode*)(node[2]));
- ind[1] = getMinimizerIndex((LeafNode*)(node[3]));
- ind[2] = getMinimizerIndex((LeafNode*)(node[1]));
- ind[3] = getMinimizerIndex((LeafNode*)(node[0]));
+ if (flip) {
+ ind[0] = getMinimizerIndex((LeafNode *)(node[2]));
+ ind[1] = getMinimizerIndex((LeafNode *)(node[3]));
+ ind[2] = getMinimizerIndex((LeafNode *)(node[1]));
+ ind[3] = getMinimizerIndex((LeafNode *)(node[0]));
}
else {
- ind[0] = getMinimizerIndex((LeafNode*)(node[0]));
- ind[1] = getMinimizerIndex((LeafNode*)(node[1]));
- ind[2] = getMinimizerIndex((LeafNode*)(node[3]));
- ind[3] = getMinimizerIndex((LeafNode*)(node[2]));
- }
-
- add_quad(output_mesh, ind);
- }
- /*
- if(outType == 0)
- {
- // OFF
-
- num =(color ? -num : num);
-
- fprintf(fout, "%d ", num);
-
- if(flip)
- {
- for(int k = num - 1; k >= 0; k --)
- {
- fprintf(fout, "%d ", ind[k]);
- }
- }
- else
- {
- for(int k = 0; k < num; k ++)
- {
- fprintf(fout, "%d ", ind[k]);
- }
+ ind[0] = getMinimizerIndex((LeafNode *)(node[0]));
+ ind[1] = getMinimizerIndex((LeafNode *)(node[1]));
+ ind[2] = getMinimizerIndex((LeafNode *)(node[3]));
+ ind[3] = getMinimizerIndex((LeafNode *)(node[2]));
}
- fprintf(fout, "\n");
-
- actualQuads ++;
+ add_quad(output_mesh, ind);
}
- else if(outType == 1)
- {
- // PLY
-
- if(flip)
- {
- int tind[8];
- for(int k = num - 1; k >= 0; k --)
- {
- tind[k] = ind[num-1-k];
- }
- // PLYWriter::writeFace(fout, num, tind);
- }
- else
- {
- // PLYWriter::writeFace(fout, num, ind);
- }
-
- actualQuads ++;
- }*/
}
return;
}
- else
- {
+ else {
return;
}
}
}
-void Octree::edgeProcContour(Node* node[4], int leaf[4], int depth[4], int maxdep, int dir)
+void Octree::edgeProcContour(Node *node[4], int leaf[4], int depth[4], int maxdep, int dir)
{
- if(!(node[0] && node[1] && node[2] && node[3]))
- {
+ if (!(node[0] && node[1] && node[2] && node[3])) {
return;
}
- if(leaf[0] && leaf[1] && leaf[2] && leaf[3])
- {
+ if (leaf[0] && leaf[1] && leaf[2] && leaf[3]) {
processEdgeWrite(node, depth, maxdep, dir);
}
- else
- {
+ else {
int i, j;
- Node* chd[4][8];
- for(j = 0; j < 4; j ++)
- {
- for(i = 0; i < 8; i ++)
- {
+ Node *chd[4][8];
+ for (j = 0; j < 4; j++) {
+ for (i = 0; i < 8; i++) {
chd[j][i] = ((!leaf[j]) && hasChild(&node[j]->internal, i)) ?
- getChild(&node[j]->internal,
- getChildCount(&node[j]->internal, i)) : NULL;
+ getChild(&node[j]->internal,
+ getChildCount(&node[j]->internal, i)) : NULL;
}
}
// 2 edge calls
- Node* ne[4];
+ Node *ne[4];
int le[4];
int de[4];
- for(i = 0; i < 2; i ++)
- {
- int c[4] = {edgeProcEdgeMask[dir][i][0],
- edgeProcEdgeMask[dir][i][1],
- edgeProcEdgeMask[dir][i][2],
- edgeProcEdgeMask[dir][i][3]};
-
- for(int j = 0; j < 4; j ++)
- {
- if(leaf[j])
- {
+ for (i = 0; i < 2; i++) {
+ int c[4] = {edgeProcEdgeMask[dir][i][0],
+ edgeProcEdgeMask[dir][i][1],
+ edgeProcEdgeMask[dir][i][2],
+ edgeProcEdgeMask[dir][i][3]};
+
+ for (int j = 0; j < 4; j++) {
+ if (leaf[j]) {
le[j] = leaf[j];
ne[j] = node[j];
de[j] = depth[j];
}
- else
- {
+ else {
le[j] = isLeaf(&node[j]->internal, c[j]);
ne[j] = chd[j][c[j]];
de[j] = depth[j] - 1;
@@ -2647,45 +2379,37 @@ void Octree::edgeProcContour(Node* node[4], int leaf[4], int depth[4], int maxde
}
}
-void Octree::faceProcContour(Node* node[2], int leaf[2], int depth[2], int maxdep, int dir)
+void Octree::faceProcContour(Node *node[2], int leaf[2], int depth[2], int maxdep, int dir)
{
- if(!(node[0] && node[1]))
- {
+ if (!(node[0] && node[1])) {
return;
}
- if(!(leaf[0] && leaf[1]))
- {
+ if (!(leaf[0] && leaf[1])) {
int i, j;
// Fill children nodes
- Node* chd[2][8];
- for(j = 0; j < 2; j ++)
- {
- for(i = 0; i < 8; i ++)
- {
- chd[j][i] =((!leaf[j]) && hasChild(&node[j]->internal, i)) ?
- getChild(&node[j]->internal,
- getChildCount(&node[j]->internal, i)) : NULL;
+ Node *chd[2][8];
+ for (j = 0; j < 2; j++) {
+ for (i = 0; i < 8; i++) {
+ chd[j][i] = ((!leaf[j]) && hasChild(&node[j]->internal, i)) ?
+ getChild(&node[j]->internal,
+ getChildCount(&node[j]->internal, i)) : NULL;
}
}
// 4 face calls
- Node* nf[2];
+ Node *nf[2];
int df[2];
int lf[2];
- for(i = 0; i < 4; i ++)
- {
+ for (i = 0; i < 4; i++) {
int c[2] = {faceProcFaceMask[dir][i][0], faceProcFaceMask[dir][i][1]};
- for(int j = 0; j < 2; j ++)
- {
- if(leaf[j])
- {
+ for (int j = 0; j < 2; j++) {
+ if (leaf[j]) {
lf[j] = leaf[j];
nf[j] = node[j];
df[j] = depth[j];
}
- else
- {
+ else {
lf[j] = isLeaf(&node[j]->internal, c[j]);
nf[j] = chd[j][c[j]];
df[j] = depth[j] - 1;
@@ -2696,26 +2420,22 @@ void Octree::faceProcContour(Node* node[2], int leaf[2], int depth[2], int maxde
// 4 edge calls
int orders[2][4] = {{0, 0, 1, 1}, {0, 1, 0, 1}};
- Node* ne[4];
+ Node *ne[4];
int le[4];
int de[4];
-
- for(i = 0; i < 4; i ++)
- {
+
+ for (i = 0; i < 4; i++) {
int c[4] = {faceProcEdgeMask[dir][i][1], faceProcEdgeMask[dir][i][2],
- faceProcEdgeMask[dir][i][3], faceProcEdgeMask[dir][i][4]};
- int* order = orders[faceProcEdgeMask[dir][i][0]];
+ faceProcEdgeMask[dir][i][3], faceProcEdgeMask[dir][i][4]};
+ int *order = orders[faceProcEdgeMask[dir][i][0]];
- for(int j = 0; j < 4; j ++)
- {
- if(leaf[order[j]])
- {
+ for (int j = 0; j < 4; j++) {
+ if (leaf[order[j]]) {
le[j] = leaf[order[j]];
ne[j] = node[order[j]];
de[j] = depth[order[j]];
}
- else
- {
+ else {
le[j] = isLeaf(&node[order[j]]->internal, c[j]);
ne[j] = chd[order[j]][c[j]];
de[j] = depth[order[j]] - 1;
@@ -2728,38 +2448,33 @@ void Octree::faceProcContour(Node* node[2], int leaf[2], int depth[2], int maxde
}
-void Octree::cellProcContour(Node* node, int leaf, int depth)
+void Octree::cellProcContour(Node *node, int leaf, int depth)
{
- if(node == NULL)
- {
+ if (node == NULL) {
return;
}
- if(! leaf)
- {
+ if (!leaf) {
int i;
// Fill children nodes
- Node* chd[8];
- for(i = 0; i < 8; i ++)
- {
- chd[i] =((!leaf) && hasChild(&node->internal, i)) ?
- getChild(&node->internal,
- getChildCount(&node->internal, i)) : NULL;
+ Node *chd[8];
+ for (i = 0; i < 8; i++) {
+ chd[i] = ((!leaf) && hasChild(&node->internal, i)) ?
+ getChild(&node->internal,
+ getChildCount(&node->internal, i)) : NULL;
}
// 8 Cell calls
- for(i = 0; i < 8; i ++)
- {
+ for (i = 0; i < 8; i++) {
cellProcContour(chd[i], isLeaf(&node->internal, i), depth - 1);
}
// 12 face calls
- Node* nf[2];
+ Node *nf[2];
int lf[2];
int df[2] = {depth - 1, depth - 1};
- for(i = 0; i < 12; i ++)
- {
+ for (i = 0; i < 12; i++) {
int c[2] = {cellProcFaceMask[i][0], cellProcFaceMask[i][1]};
lf[0] = isLeaf(&node->internal, c[0]);
@@ -2772,15 +2487,13 @@ void Octree::cellProcContour(Node* node, int leaf, int depth)
}
// 6 edge calls
- Node* ne[4];
+ Node *ne[4];
int le[4];
int de[4] = {depth - 1, depth - 1, depth - 1, depth - 1};
- for(i = 0; i < 6; i ++)
- {
+ for (i = 0; i < 6; i++) {
int c[4] = {cellProcEdgeMask[i][0], cellProcEdgeMask[i][1], cellProcEdgeMask[i][2], cellProcEdgeMask[i][3]};
- for(int j = 0; j < 4; j ++)
- {
+ for (int j = 0; j < 4; j++) {
le[j] = isLeaf(&node->internal, c[j]);
ne[j] = chd[c[j]];
}
@@ -2788,81 +2501,68 @@ void Octree::cellProcContour(Node* node, int leaf, int depth)
edgeProcContour(ne, le, de, depth - 1, cellProcEdgeMask[i][4]);
}
}
-
+
}
-void Octree::processEdgeParity(LeafNode* node[4], int depth[4], int maxdep, int dir)
+void Octree::processEdgeParity(LeafNode *node[4], int depth[4], int maxdep, int dir)
{
int con = 0;
- for(int i = 0; i < 4; i ++)
- {
+ for (int i = 0; i < 4; i++) {
// Minimal cell
// if(op == 0)
{
- if(getEdgeParity(node[i], processEdgeMask[dir][i]))
- {
+ if (getEdgeParity(node[i], processEdgeMask[dir][i])) {
con = 1;
break;
}
}
}
- if(con == 1)
- {
- for(int i = 0; i < 4; i ++)
- {
+ if (con == 1) {
+ for (int i = 0; i < 4; i++) {
setEdge(node[i], processEdgeMask[dir][i]);
}
}
-
+
}
-void Octree::edgeProcParity(Node* node[4], int leaf[4], int depth[4], int maxdep, int dir)
+void Octree::edgeProcParity(Node *node[4], int leaf[4], int depth[4], int maxdep, int dir)
{
- if(!(node[0] && node[1] && node[2] && node[3]))
- {
+ if (!(node[0] && node[1] && node[2] && node[3])) {
return;
}
- if(leaf[0] && leaf[1] && leaf[2] && leaf[3])
- {
- processEdgeParity((LeafNode**)node, depth, maxdep, dir);
+ if (leaf[0] && leaf[1] && leaf[2] && leaf[3]) {
+ processEdgeParity((LeafNode **)node, depth, maxdep, dir);
}
- else
- {
+ else {
int i, j;
- Node* chd[4][8];
- for(j = 0; j < 4; j ++)
- {
- for(i = 0; i < 8; i ++)
- {
- chd[j][i] =((!leaf[j]) && hasChild(&node[j]->internal, i)) ?
- getChild(&node[j]->internal, getChildCount(&node[j]->internal, i)) : NULL;
+ Node *chd[4][8];
+ for (j = 0; j < 4; j++) {
+ for (i = 0; i < 8; i++) {
+ chd[j][i] = ((!leaf[j]) && hasChild(&node[j]->internal, i)) ?
+ getChild(&node[j]->internal, getChildCount(&node[j]->internal, i)) : NULL;
}
}
// 2 edge calls
- Node* ne[4];
+ Node *ne[4];
int le[4];
int de[4];
- for(i = 0; i < 2; i ++)
- {
- int c[4] = {edgeProcEdgeMask[dir][i][0],
- edgeProcEdgeMask[dir][i][1],
- edgeProcEdgeMask[dir][i][2],
- edgeProcEdgeMask[dir][i][3]};
+ for (i = 0; i < 2; i++) {
+ int c[4] = {edgeProcEdgeMask[dir][i][0],
+ edgeProcEdgeMask[dir][i][1],
+ edgeProcEdgeMask[dir][i][2],
+ edgeProcEdgeMask[dir][i][3]};
// int allleaf = 1;
- for(int j = 0; j < 4; j ++)
- {
+ for (int j = 0; j < 4; j++) {
- if(leaf[j])
- {
+ if (leaf[j]) {
le[j] = leaf[j];
ne[j] = node[j];
de[j] = depth[j];
}
- else
- {
+ else {
le[j] = isLeaf(&node[j]->internal, c[j]);
ne[j] = chd[j][c[j]];
de[j] = depth[j] - 1;
@@ -2877,45 +2577,37 @@ void Octree::edgeProcParity(Node* node[4], int leaf[4], int depth[4], int maxdep
}
}
-void Octree::faceProcParity(Node* node[2], int leaf[2], int depth[2], int maxdep, int dir)
+void Octree::faceProcParity(Node *node[2], int leaf[2], int depth[2], int maxdep, int dir)
{
- if(!(node[0] && node[1]))
- {
+ if (!(node[0] && node[1])) {
return;
}
- if(!(leaf[0] && leaf[1]))
- {
+ if (!(leaf[0] && leaf[1])) {
int i, j;
// Fill children nodes
- Node* chd[2][8];
- for(j = 0; j < 2; j ++)
- {
- for(i = 0; i < 8; i ++)
- {
- chd[j][i] =((!leaf[j]) && hasChild(&node[j]->internal, i)) ?
- getChild(&node[j]->internal,
- getChildCount(&node[j]->internal, i)) : NULL;
+ Node *chd[2][8];
+ for (j = 0; j < 2; j++) {
+ for (i = 0; i < 8; i++) {
+ chd[j][i] = ((!leaf[j]) && hasChild(&node[j]->internal, i)) ?
+ getChild(&node[j]->internal,
+ getChildCount(&node[j]->internal, i)) : NULL;
}
}
// 4 face calls
- Node* nf[2];
+ Node *nf[2];
int df[2];
int lf[2];
- for(i = 0; i < 4; i ++)
- {
+ for (i = 0; i < 4; i++) {
int c[2] = {faceProcFaceMask[dir][i][0], faceProcFaceMask[dir][i][1]};
- for(int j = 0; j < 2; j ++)
- {
- if(leaf[j])
- {
+ for (int j = 0; j < 2; j++) {
+ if (leaf[j]) {
lf[j] = leaf[j];
nf[j] = node[j];
df[j] = depth[j];
}
- else
- {
+ else {
lf[j] = isLeaf(&node[j]->internal, c[j]);
nf[j] = chd[j][c[j]];
df[j] = depth[j] - 1;
@@ -2926,27 +2618,23 @@ void Octree::faceProcParity(Node* node[2], int leaf[2], int depth[2], int maxdep
// 4 edge calls
int orders[2][4] = {{0, 0, 1, 1}, {0, 1, 0, 1}};
- Node* ne[4];
+ Node *ne[4];
int le[4];
int de[4];
-
- for(i = 0; i < 4; i ++)
- {
+
+ for (i = 0; i < 4; i++) {
int c[4] = {faceProcEdgeMask[dir][i][1], faceProcEdgeMask[dir][i][2],
- faceProcEdgeMask[dir][i][3], faceProcEdgeMask[dir][i][4]};
- int* order = orders[faceProcEdgeMask[dir][i][0]];
+ faceProcEdgeMask[dir][i][3], faceProcEdgeMask[dir][i][4]};
+ int *order = orders[faceProcEdgeMask[dir][i][0]];
- for(int j = 0; j < 4; j ++)
- {
- if(leaf[order[j]])
- {
+ for (int j = 0; j < 4; j++) {
+ if (leaf[order[j]]) {
le[j] = leaf[order[j]];
ne[j] = node[order[j]];
de[j] = depth[order[j]];
}
- else
- {
- le[j] = isLeaf((InternalNode*)(node[order[j]]), c[j]);
+ else {
+ le[j] = isLeaf((InternalNode *)(node[order[j]]), c[j]);
ne[j] = chd[order[j]][c[j]];
de[j] = depth[order[j]] - 1;
}
@@ -2958,42 +2646,37 @@ void Octree::faceProcParity(Node* node[2], int leaf[2], int depth[2], int maxdep
}
-void Octree::cellProcParity(Node* node, int leaf, int depth)
+void Octree::cellProcParity(Node *node, int leaf, int depth)
{
- if(node == NULL)
- {
+ if (node == NULL) {
return;
}
- if(! leaf)
- {
+ if (!leaf) {
int i;
// Fill children nodes
- Node* chd[8];
- for(i = 0; i < 8; i ++)
- {
- chd[i] =((!leaf) && hasChild((InternalNode*)node, i)) ?
- getChild((InternalNode*)node,
- getChildCount((InternalNode*)node, i)) : NULL;
+ Node *chd[8];
+ for (i = 0; i < 8; i++) {
+ chd[i] = ((!leaf) && hasChild((InternalNode *)node, i)) ?
+ getChild((InternalNode *)node,
+ getChildCount((InternalNode *)node, i)) : NULL;
}
// 8 Cell calls
- for(i = 0; i < 8; i ++)
- {
- cellProcParity(chd[i], isLeaf((InternalNode*)node, i), depth - 1);
+ for (i = 0; i < 8; i++) {
+ cellProcParity(chd[i], isLeaf((InternalNode *)node, i), depth - 1);
}
// 12 face calls
- Node* nf[2];
+ Node *nf[2];
int lf[2];
int df[2] = {depth - 1, depth - 1};
- for(i = 0; i < 12; i ++)
- {
+ for (i = 0; i < 12; i++) {
int c[2] = {cellProcFaceMask[i][0], cellProcFaceMask[i][1]};
- lf[0] = isLeaf((InternalNode*)node, c[0]);
- lf[1] = isLeaf((InternalNode*)node, c[1]);
+ lf[0] = isLeaf((InternalNode *)node, c[0]);
+ lf[1] = isLeaf((InternalNode *)node, c[1]);
nf[0] = chd[c[0]];
nf[1] = chd[c[1]];
@@ -3002,23 +2685,21 @@ void Octree::cellProcParity(Node* node, int leaf, int depth)
}
// 6 edge calls
- Node* ne[4];
+ Node *ne[4];
int le[4];
int de[4] = {depth - 1, depth - 1, depth - 1, depth - 1};
- for(i = 0; i < 6; i ++)
- {
+ for (i = 0; i < 6; i++) {
int c[4] = {cellProcEdgeMask[i][0], cellProcEdgeMask[i][1], cellProcEdgeMask[i][2], cellProcEdgeMask[i][3]};
- for(int j = 0; j < 4; j ++)
- {
- le[j] = isLeaf((InternalNode*)node, c[j]);
+ for (int j = 0; j < 4; j++) {
+ le[j] = isLeaf((InternalNode *)node, c[j]);
ne[j] = chd[c[j]];
}
edgeProcParity(ne, le, de, depth - 1, cellProcEdgeMask[i][4]);
}
}
-
+
}
/* definitions for global arrays */
diff --git a/intern/dualcon/intern/octree.h b/intern/dualcon/intern/octree.h
index aac09549ee6..35d24a074bb 100644
--- a/intern/dualcon/intern/octree.h
+++ b/intern/dualcon/intern/octree.h
@@ -37,7 +37,7 @@
#include "dualcon.h"
/**
- * Main class and structures for scan-convertion, sign-generation,
+ * Main class and structures for scan-convertion, sign-generation,
* and surface reconstruction.
*
* @author Tao Ju
@@ -90,7 +90,7 @@ struct LeafNode /* TODO: remove this attribute once everything is fixed */ {
char signs;
int minimizer_index;
-
+
unsigned short flood_fill;
float edge_intersections[0];
@@ -112,33 +112,31 @@ extern const int faceProcFaceMask[3][4][3];
extern const int edgeProcEdgeMask[3][2][5];
extern const int faceProcEdgeMask[3][4][6];
extern const int processEdgeMask[3][4];
-extern const int dirCell[3][4][3];
+extern const int dirCell[3][4][3];
extern const int dirEdge[3][4];
/**
* Structures for detecting/patching open cycles on the dual surface
*/
-struct PathElement
-{
+struct PathElement {
// Origin
int pos[3];
// link
- PathElement* next;
+ PathElement *next;
};
-struct PathList
-{
+struct PathList {
// Head
- PathElement* head;
- PathElement* tail;
+ PathElement *head;
+ PathElement *tail;
// Length of the list
int length;
// Next list
- PathList* next;
+ PathList *next;
};
@@ -148,1284 +146,1276 @@ struct PathList
class Octree
{
public:
- /* Public members */
+/* Public members */
+
+/// Memory allocators
+VirtualMemoryAllocator *alloc[9];
+VirtualMemoryAllocator *leafalloc[4];
- /// Memory allocators
- VirtualMemoryAllocator * alloc[9];
- VirtualMemoryAllocator * leafalloc[4];
+/// Root node
+Node *root;
- /// Root node
- Node* root;
+/// Model reader
+ModelReader *reader;
- /// Model reader
- ModelReader* reader;
+/// Marching cubes table
+Cubes *cubes;
- /// Marching cubes table
- Cubes* cubes;
+/// Length of grid
+int dimen;
+int mindimen, minshift;
- /// Length of grid
- int dimen;
- int mindimen, minshift;
+/// Maximum depth
+int maxDepth;
- /// Maximum depth
- int maxDepth;
-
- /// The lower corner of the bounding box and the size
- float origin[3];
- float range;
+/// The lower corner of the bounding box and the size
+float origin[3];
+float range;
- /// Counting information
- int nodeCount;
- int nodeSpace;
- int nodeCounts[9];
+/// Counting information
+int nodeCount;
+int nodeSpace;
+int nodeCounts[9];
- int actualQuads, actualVerts;
+int actualQuads, actualVerts;
- PathList* ringList;
+PathList *ringList;
- int maxTrianglePerCell;
- int outType; // 0 for OFF, 1 for PLY, 2 for VOL
+int maxTrianglePerCell;
+int outType; // 0 for OFF, 1 for PLY, 2 for VOL
- // For flood filling
- int use_flood_fill;
- float thresh;
+// For flood filling
+int use_flood_fill;
+float thresh;
- int use_manifold;
+int use_manifold;
- float hermite_num;
+float hermite_num;
- DualConMode mode;
+DualConMode mode;
public:
- /**
- * Construtor
- */
- Octree(ModelReader* mr,
- DualConAllocOutput alloc_output_func,
- DualConAddVert add_vert_func,
- DualConAddQuad add_quad_func,
- DualConFlags flags, DualConMode mode, int depth,
- float threshold, float hermite_num);
-
- /**
- * Destructor
- */
- ~Octree();
+/**
+ * Construtor
+ */
+Octree(ModelReader *mr,
+ DualConAllocOutput alloc_output_func,
+ DualConAddVert add_vert_func,
+ DualConAddQuad add_quad_func,
+ DualConFlags flags, DualConMode mode, int depth,
+ float threshold, float hermite_num);
- /**
- * Scan convert
- */
- void scanConvert();
+/**
+ * Destructor
+ */
+~Octree();
+
+/**
+ * Scan convert
+ */
+void scanConvert();
- void *getOutputMesh() { return output_mesh; }
+void *getOutputMesh() {
+ return output_mesh;
+}
private:
- /* Helper functions */
-
- /**
- * Initialize memory allocators
- */
- void initMemory();
+/* Helper functions */
- /**
- * Release memory
- */
- void freeMemory();
+/**
+ * Initialize memory allocators
+ */
+void initMemory();
- /**
- * Print memory usage
- */
- void printMemUsage();
+/**
+ * Release memory
+ */
+void freeMemory();
+/**
+ * Print memory usage
+ */
+void printMemUsage();
- /**
- * Methods to set / restore minimum edges
- */
- void resetMinimalEdges();
- void cellProcParity(Node* node, int leaf, int depth);
- void faceProcParity(Node* node[2], int leaf[2], int depth[2], int maxdep, int dir);
- void edgeProcParity(Node* node[4], int leaf[4], int depth[4], int maxdep, int dir);
+/**
+ * Methods to set / restore minimum edges
+ */
+void resetMinimalEdges();
- void processEdgeParity(LeafNode* node[4], int depths[4], int maxdep, int dir);
+void cellProcParity(Node *node, int leaf, int depth);
+void faceProcParity(Node * node[2], int leaf[2], int depth[2], int maxdep, int dir);
+void edgeProcParity(Node * node[4], int leaf[4], int depth[4], int maxdep, int dir);
- /**
- * Add triangles to the tree
- */
- void addTrian();
- void addTrian(Triangle* trian, int triind);
- InternalNode* addTrian(InternalNode* node, Projections* p, int height);
+void processEdgeParity(LeafNode * node[4], int depths[4], int maxdep, int dir);
- /**
- * Method to update minimizer in a cell: update edge intersections instead
- */
- LeafNode* updateCell(LeafNode* node, Projections* p);
+/**
+ * Add triangles to the tree
+ */
+void addTrian();
+void addTrian(Triangle *trian, int triind);
+InternalNode *addTrian(InternalNode *node, Projections *p, int height);
- /* Routines to detect and patch holes */
- int numRings;
- int totRingLengths;
- int maxRingLength;
+/**
+ * Method to update minimizer in a cell: update edge intersections instead
+ */
+LeafNode *updateCell(LeafNode *node, Projections *p);
+
+/* Routines to detect and patch holes */
+int numRings;
+int totRingLengths;
+int maxRingLength;
+
+/**
+ * Entry routine.
+ */
+void trace();
+/**
+ * Trace the given node, find patches and fill them in
+ */
+Node *trace(Node *node, int *st, int len, int depth, PathList *& paths);
+/**
+ * Look for path on the face and add to paths
+ */
+void findPaths(Node * node[2], int leaf[2], int depth[2], int *st[2], int maxdep, int dir, PathList * &paths);
+/**
+ * Combine two list1 and list2 into list1 using connecting paths list3,
+ * while closed paths are appended to rings
+ */
+void combinePaths(PathList *& list1, PathList *list2, PathList *paths, PathList *& rings);
+/**
+ * Helper function: combine current paths in list1 and list2 to a single path and append to list3
+ */
+PathList *combineSinglePath(PathList *& head1, PathList *pre1, PathList *& list1, PathList *& head2, PathList *pre2, PathList *& list2);
+
+/**
+ * Functions to patch rings in a node
+ */
+Node *patch(Node * node, int st[3], int len, PathList * rings);
+Node *patchSplit(Node * node, int st[3], int len, PathList * rings, int dir, PathList * &nrings1, PathList * &nrings2);
+Node *patchSplitSingle(Node * node, int st[3], int len, PathElement * head, int dir, PathList * &nrings1, PathList * &nrings2);
+Node *connectFace(Node * node, int st[3], int len, int dir, PathElement * f1, PathElement * f2);
+Node *locateCell(InternalNode * node, int st[3], int len, int ori[3], int dir, int side, Node * &rleaf, int rst[3], int& rlen);
+void compressRing(PathElement *& ring);
+void getFacePoint(PathElement *leaf, int dir, int& x, int& y, float& p, float& q);
+LeafNode *patchAdjacent(InternalNode * node, int len, int st1[3], LeafNode * leaf1, int st2[3], LeafNode * leaf2, int walkdir, int inc, int dir, int side, float alpha);
+int findPair(PathElement *head, int pos, int dir, PathElement *& pre1, PathElement *& pre2);
+int getSide(PathElement *e, int pos, int dir);
+int isEqual(PathElement *e1, PathElement *e2);
+void preparePrimalEdgesMask(InternalNode *node);
+void testFacePoint(PathElement *e1, PathElement *e2);
+
+/**
+ * Path-related functions
+ */
+void deletePath(PathList *& head, PathList *pre, PathList *& curr);
+void printPath(PathList *path);
+void printPath(PathElement *path);
+void printElement(PathElement *ele);
+void printPaths(PathList *path);
+void checkElement(PathElement *ele);
+void checkPath(PathElement *path);
+
+
+/**
+ * Routines to build signs to create a partitioned volume
+ *(after patching rings)
+ */
+void buildSigns();
+void buildSigns(unsigned char table[], Node * node, int isLeaf, int sg, int rvalue[8]);
+
+/************************************************************************/
+/* To remove disconnected components */
+/************************************************************************/
+void floodFill();
+void clearProcessBits(Node *node, int height);
+int floodFill(LeafNode * leaf, int st[3], int len, int height, int threshold);
+int floodFill(Node * node, int st[3], int len, int height, int threshold);
+
+/**
+ * Write out polygon file
+ */
+void writeOut();
+
+void countIntersection(Node *node, int height, int& nedge, int& ncell, int& nface);
+void generateMinimizer(Node * node, int st[3], int len, int height, int& offset);
+void computeMinimizer(LeafNode * leaf, int st[3], int len, float rvalue[3]);
+/**
+ * Traversal functions to generate polygon model
+ * op: 0 for counting, 1 for writing OBJ, 2 for writing OFF, 3 for writing PLY
+ */
+void cellProcContour(Node *node, int leaf, int depth);
+void faceProcContour(Node * node[2], int leaf[2], int depth[2], int maxdep, int dir);
+void edgeProcContour(Node * node[4], int leaf[4], int depth[4], int maxdep, int dir);
+void processEdgeWrite(Node * node[4], int depths[4], int maxdep, int dir);
+
+/* output callbacks/data */
+DualConAllocOutput alloc_output;
+DualConAddVert add_vert;
+DualConAddQuad add_quad;
+void *output_mesh;
- /**
- * Entry routine.
- */
- void trace();
- /**
- * Trace the given node, find patches and fill them in
- */
- Node* trace(Node* node, int* st, int len, int depth, PathList*& paths);
- /**
- * Look for path on the face and add to paths
- */
- void findPaths(Node* node[2], int leaf[2], int depth[2], int* st[2], int maxdep, int dir, PathList*& paths);
- /**
- * Combine two list1 and list2 into list1 using connecting paths list3,
- * while closed paths are appended to rings
- */
- void combinePaths(PathList*& list1, PathList* list2, PathList* paths, PathList*& rings);
- /**
- * Helper function: combine current paths in list1 and list2 to a single path and append to list3
- */
- PathList* combineSinglePath(PathList*& head1, PathList* pre1, PathList*& list1, PathList*& head2, PathList* pre2, PathList*& list2);
-
- /**
- * Functions to patch rings in a node
- */
- Node* patch(Node* node, int st[3], int len, PathList* rings);
- Node* patchSplit(Node* node, int st[3], int len, PathList* rings, int dir, PathList*& nrings1, PathList*& nrings2);
- Node* patchSplitSingle(Node* node, int st[3], int len, PathElement* head, int dir, PathList*& nrings1, PathList*& nrings2);
- Node* connectFace(Node* node, int st[3], int len, int dir, PathElement* f1, PathElement* f2);
- Node* locateCell(InternalNode* node, int st[3], int len, int ori[3], int dir, int side, Node*& rleaf, int rst[3], int& rlen);
- void compressRing(PathElement*& ring);
- void getFacePoint(PathElement* leaf, int dir, int& x, int& y, float& p, float& q);
- LeafNode* patchAdjacent(InternalNode* node, int len, int st1[3], LeafNode* leaf1, int st2[3], LeafNode* leaf2, int walkdir, int inc, int dir, int side, float alpha);
- int findPair(PathElement* head, int pos, int dir, PathElement*& pre1, PathElement*& pre2);
- int getSide(PathElement* e, int pos, int dir);
- int isEqual(PathElement* e1, PathElement* e2) ;
- void preparePrimalEdgesMask(InternalNode* node);
- void testFacePoint(PathElement* e1, PathElement* e2);
-
- /**
- * Path-related functions
- */
- void deletePath(PathList*& head, PathList* pre, PathList*& curr);
- void printPath(PathList* path);
- void printPath(PathElement* path);
- void printElement(PathElement* ele);
- void printPaths(PathList* path);
- void checkElement(PathElement* ele);
- void checkPath(PathElement* path);
-
-
- /**
- * Routines to build signs to create a partitioned volume
- *(after patching rings)
- */
- void buildSigns();
- void buildSigns(unsigned char table[], Node* node, int isLeaf, int sg, int rvalue[8]);
-
- /************************************************************************/
- /* To remove disconnected components */
- /************************************************************************/
- void floodFill();
- void clearProcessBits(Node* node, int height);
- int floodFill(LeafNode* leaf, int st[3], int len, int height, int threshold);
- int floodFill(Node* node, int st[3], int len, int height, int threshold);
-
- /**
- * Write out polygon file
- */
- void writeOut();
-
- void countIntersection(Node* node, int height, int& nedge, int& ncell, int& nface);
- void generateMinimizer(Node* node, int st[3], int len, int height, int& offset);
- void computeMinimizer(LeafNode* leaf, int st[3], int len, float rvalue[3]);
- /**
- * Traversal functions to generate polygon model
- * op: 0 for counting, 1 for writing OBJ, 2 for writing OFF, 3 for writing PLY
- */
- void cellProcContour(Node* node, int leaf, int depth);
- void faceProcContour(Node* node[2], int leaf[2], int depth[2], int maxdep, int dir);
- void edgeProcContour(Node* node[4], int leaf[4], int depth[4], int maxdep, int dir);
- void processEdgeWrite(Node* node[4], int depths[4], int maxdep, int dir);
-
- /* output callbacks/data */
- DualConAllocOutput alloc_output;
- DualConAddVert add_vert;
- DualConAddQuad add_quad;
- void *output_mesh;
-
private:
- /************ Operators for all nodes ************/
+/************ Operators for all nodes ************/
- /// Lookup table
- int numChildrenTable[256];
- int childrenCountTable[256][8];
- int childrenIndexTable[256][8];
- int numEdgeTable[8];
- int edgeCountTable[8][3];
+/// Lookup table
+int numChildrenTable[256];
+int childrenCountTable[256][8];
+int childrenIndexTable[256][8];
+int numEdgeTable[8];
+int edgeCountTable[8][3];
- /// Build up lookup table
- void buildTable()
+/// Build up lookup table
+void buildTable()
+{
+ for (int i = 0; i < 256; i++)
{
- for(int i = 0; i < 256; i ++)
+ numChildrenTable[i] = 0;
+ int count = 0;
+ for (int j = 0; j < 8; j++)
{
- numChildrenTable[i] = 0;
- int count = 0;
- for(int j = 0; j < 8; j ++)
- {
- numChildrenTable[i] +=((i >> j) & 1);
- childrenCountTable[i][j] = count;
- childrenIndexTable[i][count] = j;
- count +=((i >> j) & 1);
- }
+ numChildrenTable[i] += ((i >> j) & 1);
+ childrenCountTable[i][j] = count;
+ childrenIndexTable[i][count] = j;
+ count += ((i >> j) & 1);
}
+ }
- for(int i = 0; i < 8; i ++)
+ for (int i = 0; i < 8; i++)
+ {
+ numEdgeTable[i] = 0;
+ int count = 0;
+ for (int j = 0; j < 3; j++)
{
- numEdgeTable[i] = 0;
- int count = 0;
- for(int j = 0; j < 3; j ++)
- {
- numEdgeTable[i] +=((i >> j) & 1);
- edgeCountTable[i][j] = count;
- count +=((i >> j) & 1);
- }
+ numEdgeTable[i] += ((i >> j) & 1);
+ edgeCountTable[i][j] = count;
+ count += ((i >> j) & 1);
}
}
+}
- int getSign(Node* node, int height, int index)
+int getSign(Node *node, int height, int index)
+{
+ if (height == 0)
{
- if(height == 0)
+ return getSign(&node->leaf, index);
+ }
+ else {
+ if (hasChild(&node->internal, index))
{
- return getSign(&node->leaf, index);
+ return getSign(getChild(&node->internal, getChildCount(&node->internal, index)),
+ height - 1,
+ index);
}
- else
- {
- if(hasChild(&node->internal, index))
- {
- return getSign(getChild(&node->internal, getChildCount(&node->internal, index)),
- height - 1,
- index);
- }
- else
- {
- return getSign(getChild(&node->internal, 0),
- height - 1,
- 7 - getChildIndex(&node->internal, 0));
- }
+ else {
+ return getSign(getChild(&node->internal, 0),
+ height - 1,
+ 7 - getChildIndex(&node->internal, 0));
}
}
+}
- /************ Operators for leaf nodes ************/
+/************ Operators for leaf nodes ************/
- void printInfo(int st[3])
+void printInfo(int st[3])
+{
+ printf("INFO AT: %d %d %d\n", st[0] >> minshift, st[1] >> minshift, st[2] >> minshift);
+ LeafNode *leaf = (LeafNode *)locateLeafCheck(st);
+ if (leaf)
+ printInfo(leaf);
+ else
+ printf("Leaf not exists!\n");
+}
+
+void printInfo(const LeafNode *leaf)
+{
+ /*
+ printf("Edge mask: ");
+ for(int i = 0; i < 12; i ++)
+ {
+ printf("%d ", getEdgeParity(leaf, i));
+ }
+ printf("\n");
+ printf("Stored edge mask: ");
+ for(i = 0; i < 3; i ++)
+ {
+ printf("%d ", getStoredEdgesParity(leaf, i));
+ }
+ printf("\n");
+ */
+ printf("Sign mask: ");
+ for (int i = 0; i < 8; i++)
{
- printf("INFO AT: %d %d %d\n", st[0] >> minshift, st[1] >>minshift, st[2] >> minshift);
- LeafNode* leaf = (LeafNode*)locateLeafCheck(st);
- if(leaf)
- printInfo(leaf);
- else
- printf("Leaf not exists!\n");
+ printf("%d ", getSign(leaf, i));
}
+ printf("\n");
- void printInfo(const LeafNode* leaf)
- {
- /*
- printf("Edge mask: ");
- for(int i = 0; i < 12; i ++)
- {
- printf("%d ", getEdgeParity(leaf, i));
- }
- printf("\n");
- printf("Stored edge mask: ");
- for(i = 0; i < 3; i ++)
- {
- printf("%d ", getStoredEdgesParity(leaf, i));
- }
- printf("\n");
- */
- printf("Sign mask: ");
- for(int i = 0; i < 8; i ++)
- {
- printf("%d ", getSign(leaf, i));
- }
- printf("\n");
+}
- }
+/// Retrieve signs
+int getSign(const LeafNode *leaf, int index)
+{
+ return ((leaf->signs >> index) & 1);
+}
- /// Retrieve signs
- int getSign(const LeafNode* leaf, int index)
- {
- return ((leaf->signs >> index) & 1);
- }
+/// Set sign
+void setSign(LeafNode *leaf, int index)
+{
+ leaf->signs |= (1 << index);
+}
- /// Set sign
- void setSign(LeafNode* leaf, int index)
- {
- leaf->signs |= (1 << index);
- }
+void setSign(LeafNode *leaf, int index, int sign)
+{
+ leaf->signs &= (~(1 << index));
+ leaf->signs |= ((sign & 1) << index);
+}
+
+int getSignMask(const LeafNode *leaf)
+{
+ return leaf->signs;
+}
- void setSign(LeafNode* leaf, int index, int sign)
+void setInProcessAll(int st[3], int dir)
+{
+ int nst[3], eind;
+ for (int i = 0; i < 4; i++)
{
- leaf->signs &= (~(1 << index));
- leaf->signs |= ((sign & 1) << index);
+ nst[0] = st[0] + dirCell[dir][i][0] * mindimen;
+ nst[1] = st[1] + dirCell[dir][i][1] * mindimen;
+ nst[2] = st[2] + dirCell[dir][i][2] * mindimen;
+ eind = dirEdge[dir][i];
+
+ LeafNode *cell = locateLeafCheck(nst);
+ assert(cell);
+
+ setInProcess(cell, eind);
}
+}
- int getSignMask(const LeafNode* leaf)
+void flipParityAll(int st[3], int dir)
+{
+ int nst[3], eind;
+ for (int i = 0; i < 4; i++)
{
- return leaf->signs;
+ nst[0] = st[0] + dirCell[dir][i][0] * mindimen;
+ nst[1] = st[1] + dirCell[dir][i][1] * mindimen;
+ nst[2] = st[2] + dirCell[dir][i][2] * mindimen;
+ eind = dirEdge[dir][i];
+
+ LeafNode *cell = locateLeaf(nst);
+ flipEdge(cell, eind);
}
+}
- void setInProcessAll(int st[3], int dir)
- {
- int nst[3], eind;
- for(int i = 0; i < 4; i ++)
- {
- nst[0] = st[0] + dirCell[dir][i][0] * mindimen;
- nst[1] = st[1] + dirCell[dir][i][1] * mindimen;
- nst[2] = st[2] + dirCell[dir][i][2] * mindimen;
- eind = dirEdge[dir][i];
+void setInProcess(LeafNode *leaf, int eind)
+{
+ assert(eind >= 0 && eind <= 11);
- LeafNode* cell = locateLeafCheck(nst);
- assert(cell);
+ leaf->flood_fill |= (1 << eind);
+}
- setInProcess(cell, eind);
- }
- }
+void setOutProcess(LeafNode *leaf, int eind)
+{
+ assert(eind >= 0 && eind <= 11);
- void flipParityAll(int st[3], int dir)
- {
- int nst[3], eind;
- for(int i = 0; i < 4; i ++)
- {
- nst[0] = st[0] + dirCell[dir][i][0] * mindimen;
- nst[1] = st[1] + dirCell[dir][i][1] * mindimen;
- nst[2] = st[2] + dirCell[dir][i][2] * mindimen;
- eind = dirEdge[dir][i];
+ leaf->flood_fill &= ~(1 << eind);
+}
- LeafNode* cell = locateLeaf(nst);
- flipEdge(cell, eind);
- }
- }
+int isInProcess(LeafNode *leaf, int eind)
+{
+ assert(eind >= 0 && eind <= 11);
- void setInProcess(LeafNode* leaf, int eind)
- {
- assert(eind >= 0 && eind <= 11);
+ return (leaf->flood_fill >> eind) & 1;
+}
- leaf->flood_fill |= (1 << eind);
- }
-
- void setOutProcess(LeafNode* leaf, int eind)
- {
- assert(eind >= 0 && eind <= 11);
-
- leaf->flood_fill &= ~(1 << eind);
- }
+/// Generate signs at the corners from the edge parity
+void generateSigns(LeafNode *leaf, unsigned char table[], int start)
+{
+ leaf->signs = table[leaf->edge_parity];
- int isInProcess(LeafNode* leaf, int eind)
+ if ((start ^ leaf->signs) & 1)
{
- assert(eind >= 0 && eind <= 11);
-
- return (leaf->flood_fill >> eind) & 1;
+ leaf->signs = ~(leaf->signs);
}
+}
- /// Generate signs at the corners from the edge parity
- void generateSigns(LeafNode* leaf, unsigned char table[], int start)
- {
- leaf->signs = table[leaf->edge_parity];
+/// Get edge parity
+int getEdgeParity(LeafNode *leaf, int index)
+{
+ assert(index >= 0 && index <= 11);
- if((start ^ leaf->signs) & 1)
- {
- leaf->signs = ~(leaf->signs);
- }
- }
+ return (leaf->edge_parity >> index) & 1;
+}
- /// Get edge parity
- int getEdgeParity(LeafNode* leaf, int index)
- {
- assert(index >= 0 && index <= 11);
-
- return (leaf->edge_parity >> index) & 1;
- }
+/// Get edge parity on a face
+int getFaceParity(LeafNode *leaf, int index)
+{
+ int a = getEdgeParity(leaf, faceMap[index][0]) +
+ getEdgeParity(leaf, faceMap[index][1]) +
+ getEdgeParity(leaf, faceMap[index][2]) +
+ getEdgeParity(leaf, faceMap[index][3]);
+ return (a & 1);
+}
+int getFaceEdgeNum(LeafNode *leaf, int index)
+{
+ int a = getEdgeParity(leaf, faceMap[index][0]) +
+ getEdgeParity(leaf, faceMap[index][1]) +
+ getEdgeParity(leaf, faceMap[index][2]) +
+ getEdgeParity(leaf, faceMap[index][3]);
+ return a;
+}
+
+/// Set edge parity
+void flipEdge(LeafNode *leaf, int index)
+{
+ assert(index >= 0 && index <= 11);
- /// Get edge parity on a face
- int getFaceParity(LeafNode* leaf, int index)
- {
- int a = getEdgeParity(leaf, faceMap[index][0]) +
- getEdgeParity(leaf, faceMap[index][1]) +
- getEdgeParity(leaf, faceMap[index][2]) +
- getEdgeParity(leaf, faceMap[index][3]);
- return (a & 1);
- }
- int getFaceEdgeNum(LeafNode* leaf, int index)
- {
- int a = getEdgeParity(leaf, faceMap[index][0]) +
- getEdgeParity(leaf, faceMap[index][1]) +
- getEdgeParity(leaf, faceMap[index][2]) +
- getEdgeParity(leaf, faceMap[index][3]);
- return a;
- }
+ leaf->edge_parity ^= (1 << index);
+}
- /// Set edge parity
- void flipEdge(LeafNode* leaf, int index)
- {
- assert(index >= 0 && index <= 11);
+/// Set 1
+void setEdge(LeafNode *leaf, int index)
+{
+ assert(index >= 0 && index <= 11);
- leaf->edge_parity ^= (1 << index);
- }
-
- /// Set 1
- void setEdge(LeafNode* leaf, int index)
- {
- assert(index >= 0 && index <= 11);
+ leaf->edge_parity |= (1 << index);
+}
- leaf->edge_parity |= (1 << index);
- }
-
- /// Set 0
- void resetEdge(LeafNode* leaf, int index)
- {
- assert(index >= 0 && index <= 11);
+/// Set 0
+void resetEdge(LeafNode *leaf, int index)
+{
+ assert(index >= 0 && index <= 11);
- leaf->edge_parity &= ~(1 << index);
- }
+ leaf->edge_parity &= ~(1 << index);
+}
- /// Flipping with a new intersection offset
- void createPrimalEdgesMask(LeafNode* leaf)
- {
- leaf->primary_edge_intersections = getPrimalEdgesMask2(leaf);
- }
+/// Flipping with a new intersection offset
+void createPrimalEdgesMask(LeafNode *leaf)
+{
+ leaf->primary_edge_intersections = getPrimalEdgesMask2(leaf);
+}
- void setStoredEdgesParity(LeafNode* leaf, int pindex)
- {
- assert(pindex <= 2 && pindex >= 0);
-
- leaf->primary_edge_intersections |= (1 << pindex);
- }
- int getStoredEdgesParity(LeafNode* leaf, int pindex)
- {
- assert(pindex <= 2 && pindex >= 0);
-
- return (leaf->primary_edge_intersections >> pindex) & 1;
- }
+void setStoredEdgesParity(LeafNode *leaf, int pindex)
+{
+ assert(pindex <= 2 && pindex >= 0);
- LeafNode* flipEdge(LeafNode* leaf, int index, float alpha)
- {
- flipEdge(leaf, index);
+ leaf->primary_edge_intersections |= (1 << pindex);
+}
+int getStoredEdgesParity(LeafNode *leaf, int pindex)
+{
+ assert(pindex <= 2 && pindex >= 0);
+
+ return (leaf->primary_edge_intersections >> pindex) & 1;
+}
+
+LeafNode *flipEdge(LeafNode *leaf, int index, float alpha)
+{
+ flipEdge(leaf, index);
- if((index & 3) == 0)
+ if ((index & 3) == 0)
+ {
+ int ind = index / 4;
+ if (getEdgeParity(leaf, index) && !getStoredEdgesParity(leaf, ind))
{
- int ind = index / 4;
- if(getEdgeParity(leaf, index) && ! getStoredEdgesParity(leaf, ind))
- {
- // Create a new node
- int num = getNumEdges(leaf) + 1;
- setStoredEdgesParity(leaf, ind);
- int count = getEdgeCount(leaf, ind);
- LeafNode* nleaf = createLeaf(num);
- *nleaf = *leaf;
+ // Create a new node
+ int num = getNumEdges(leaf) + 1;
+ setStoredEdgesParity(leaf, ind);
+ int count = getEdgeCount(leaf, ind);
+ LeafNode *nleaf = createLeaf(num);
+ *nleaf = *leaf;
- setEdgeOffset(nleaf, alpha, count);
+ setEdgeOffset(nleaf, alpha, count);
- if(num > 1)
+ if (num > 1)
+ {
+ float *pts = leaf->edge_intersections;
+ float *npts = nleaf->edge_intersections;
+ for (int i = 0; i < count; i++)
{
- float *pts = leaf->edge_intersections;
- float *npts = nleaf->edge_intersections;
- for(int i = 0; i < count; i ++)
+ for (int j = 0; j < EDGE_FLOATS; j++)
{
- for(int j = 0; j < EDGE_FLOATS; j ++)
- {
- npts[i * EDGE_FLOATS + j] = pts[i * EDGE_FLOATS + j];
- }
+ npts[i * EDGE_FLOATS + j] = pts[i * EDGE_FLOATS + j];
}
- for(int i = count + 1; i < num; i ++)
+ }
+ for (int i = count + 1; i < num; i++)
+ {
+ for (int j = 0; j < EDGE_FLOATS; j++)
{
- for(int j = 0; j < EDGE_FLOATS; j ++)
- {
- npts[i * EDGE_FLOATS + j] = pts[(i - 1) * EDGE_FLOATS + j];
- }
+ npts[i * EDGE_FLOATS + j] = pts[(i - 1) * EDGE_FLOATS + j];
}
}
-
-
- removeLeaf(num-1, (LeafNode*)leaf);
- leaf = nleaf;
}
- }
-
- return leaf;
- }
- /// Update parent link
- void updateParent(InternalNode* node, int len, int st[3], LeafNode* leaf)
- {
- // First, locate the parent
- int count;
- InternalNode* parent = locateParent(node, len, st, count);
- // Update
- setChild(parent, count, (Node*)leaf);
+ removeLeaf(num - 1, (LeafNode *)leaf);
+ leaf = nleaf;
+ }
}
- void updateParent(InternalNode* node, int len, int st[3])
- {
- if(len == dimen)
- {
- root = (Node*)node;
- return;
- }
+ return leaf;
+}
- // First, locate the parent
- int count;
- InternalNode* parent = locateParent(len, st, count);
+/// Update parent link
+void updateParent(InternalNode *node, int len, int st[3], LeafNode *leaf)
+{
+ // First, locate the parent
+ int count;
+ InternalNode *parent = locateParent(node, len, st, count);
- // UPdate
- setChild(parent, count, (Node*)node);
- }
+ // Update
+ setChild(parent, count, (Node *)leaf);
+}
- /// Find edge intersection on a given edge
- int getEdgeIntersectionByIndex(int st[3], int index, float pt[3], int check)
+void updateParent(InternalNode *node, int len, int st[3])
+{
+ if (len == dimen)
{
- // First, locat the leaf
- LeafNode* leaf;
- if(check)
- {
- leaf = locateLeafCheck(st);
- }
- else
- {
- leaf = locateLeaf(st);
- }
+ root = (Node *)node;
+ return;
+ }
- if(leaf && getStoredEdgesParity(leaf, index))
- {
- float off = getEdgeOffset(leaf, getEdgeCount(leaf, index));
- pt[0] =(float) st[0];
- pt[1] =(float) st[1];
- pt[2] =(float) st[2];
- pt[index] += off * mindimen;
+ // First, locate the parent
+ int count;
+ InternalNode *parent = locateParent(len, st, count);
- return 1;
- }
- else
- {
- return 0;
- }
- }
+ // UPdate
+ setChild(parent, count, (Node *)node);
+}
- /// Retrieve number of edges intersected
- int getPrimalEdgesMask(LeafNode* leaf)
+/// Find edge intersection on a given edge
+int getEdgeIntersectionByIndex(int st[3], int index, float pt[3], int check)
+{
+ // First, locat the leaf
+ LeafNode *leaf;
+ if (check)
{
- return leaf->primary_edge_intersections;
+ leaf = locateLeafCheck(st);
}
-
- int getPrimalEdgesMask2(LeafNode* leaf)
- {
- return (((leaf->edge_parity & 0x1) >> 0) |
- ((leaf->edge_parity & 0x10) >> 3) |
- ((leaf->edge_parity & 0x100) >> 6));
+ else {
+ leaf = locateLeaf(st);
}
- /// Get the count for a primary edge
- int getEdgeCount(LeafNode* leaf, int index)
+ if (leaf && getStoredEdgesParity(leaf, index))
{
- return edgeCountTable[getPrimalEdgesMask(leaf)][index];
+ float off = getEdgeOffset(leaf, getEdgeCount(leaf, index));
+ pt[0] = (float) st[0];
+ pt[1] = (float) st[1];
+ pt[2] = (float) st[2];
+ pt[index] += off * mindimen;
+
+ return 1;
}
- int getNumEdges(LeafNode* leaf)
- {
- return numEdgeTable[getPrimalEdgesMask(leaf)];
+ else {
+ return 0;
}
+}
- int getNumEdges2(LeafNode* leaf)
- {
- return numEdgeTable[getPrimalEdgesMask2(leaf)];
- }
+/// Retrieve number of edges intersected
+int getPrimalEdgesMask(LeafNode *leaf)
+{
+ return leaf->primary_edge_intersections;
+}
- /// Set edge intersection
- void setEdgeOffset(LeafNode* leaf, float pt, int count)
- {
- float *pts = leaf->edge_intersections;
- pts[EDGE_FLOATS * count] = pt;
- pts[EDGE_FLOATS * count + 1] = 0;
- pts[EDGE_FLOATS * count + 2] = 0;
- pts[EDGE_FLOATS * count + 3] = 0;
- }
+int getPrimalEdgesMask2(LeafNode *leaf)
+{
+ return (((leaf->edge_parity & 0x1) >> 0) |
+ ((leaf->edge_parity & 0x10) >> 3) |
+ ((leaf->edge_parity & 0x100) >> 6));
+}
- /// Set multiple edge intersections
- void setEdgeOffsets(LeafNode* leaf, float pt[3], int len)
- {
- float * pts = leaf->edge_intersections;
- for(int i = 0; i < len; i ++)
- {
- pts[i] = pt[i];
- }
- }
+/// Get the count for a primary edge
+int getEdgeCount(LeafNode *leaf, int index)
+{
+ return edgeCountTable[getPrimalEdgesMask(leaf)][index];
+}
+int getNumEdges(LeafNode *leaf)
+{
+ return numEdgeTable[getPrimalEdgesMask(leaf)];
+}
- /// Retrieve edge intersection
- float getEdgeOffset(LeafNode* leaf, int count)
+int getNumEdges2(LeafNode *leaf)
+{
+ return numEdgeTable[getPrimalEdgesMask2(leaf)];
+}
+
+/// Set edge intersection
+void setEdgeOffset(LeafNode *leaf, float pt, int count)
+{
+ float *pts = leaf->edge_intersections;
+ pts[EDGE_FLOATS * count] = pt;
+ pts[EDGE_FLOATS * count + 1] = 0;
+ pts[EDGE_FLOATS * count + 2] = 0;
+ pts[EDGE_FLOATS * count + 3] = 0;
+}
+
+/// Set multiple edge intersections
+void setEdgeOffsets(LeafNode *leaf, float pt[3], int len)
+{
+ float *pts = leaf->edge_intersections;
+ for (int i = 0; i < len; i++)
{
- return leaf->edge_intersections[4 * count];
+ pts[i] = pt[i];
}
+}
- /// Update method
- LeafNode* updateEdgeOffsets(LeafNode* leaf, int oldlen, int newlen, float offs[3])
- {
- // First, create a new leaf node
- LeafNode* nleaf = createLeaf(newlen);
- *nleaf = *leaf;
+/// Retrieve edge intersection
+float getEdgeOffset(LeafNode *leaf, int count)
+{
+ return leaf->edge_intersections[4 * count];
+}
- // Next, fill in the offsets
- setEdgeOffsets(nleaf, offs, newlen);
+/// Update method
+LeafNode *updateEdgeOffsets(LeafNode *leaf, int oldlen, int newlen, float offs[3])
+{
+ // First, create a new leaf node
+ LeafNode *nleaf = createLeaf(newlen);
+ *nleaf = *leaf;
- // Finally, delete the old leaf
- removeLeaf(oldlen, leaf);
+ // Next, fill in the offsets
+ setEdgeOffsets(nleaf, offs, newlen);
- return nleaf;
- }
+ // Finally, delete the old leaf
+ removeLeaf(oldlen, leaf);
- /// Set minimizer index
- void setMinimizerIndex(LeafNode* leaf, int index)
- {
- leaf->minimizer_index = index;
- }
+ return nleaf;
+}
- /// Get minimizer index
- int getMinimizerIndex(LeafNode* leaf)
+/// Set minimizer index
+void setMinimizerIndex(LeafNode *leaf, int index)
+{
+ leaf->minimizer_index = index;
+}
+
+/// Get minimizer index
+int getMinimizerIndex(LeafNode *leaf)
+{
+ return leaf->minimizer_index;
+}
+
+int getMinimizerIndex(LeafNode *leaf, int eind)
+{
+ int add = manifold_table[getSignMask(leaf)].pairs[eind][0] - 1;
+ assert(add >= 0);
+ return leaf->minimizer_index + add;
+}
+
+void getMinimizerIndices(LeafNode *leaf, int eind, int inds[2])
+{
+ const int *add = manifold_table[getSignMask(leaf)].pairs[eind];
+ inds[0] = leaf->minimizer_index + add[0] - 1;
+ if (add[0] == add[1])
{
- return leaf->minimizer_index;
+ inds[1] = -1;
}
-
- int getMinimizerIndex(LeafNode* leaf, int eind)
- {
- int add = manifold_table[getSignMask(leaf)].pairs[eind][0] - 1;
- assert(add >= 0);
- return leaf->minimizer_index + add;
+ else {
+ inds[1] = leaf->minimizer_index + add[1] - 1;
}
+}
+
- void getMinimizerIndices(LeafNode* leaf, int eind, int inds[2])
+/// Set edge intersection
+void setEdgeOffsetNormal(LeafNode *leaf, float pt, float a, float b, float c, int count)
+{
+ float *pts = leaf->edge_intersections;
+ pts[4 * count] = pt;
+ pts[4 * count + 1] = a;
+ pts[4 * count + 2] = b;
+ pts[4 * count + 3] = c;
+}
+
+float getEdgeOffsetNormal(LeafNode *leaf, int count, float& a, float& b, float& c)
+{
+ float *pts = leaf->edge_intersections;
+ a = pts[4 * count + 1];
+ b = pts[4 * count + 2];
+ c = pts[4 * count + 3];
+ return pts[4 * count];
+}
+
+/// Set multiple edge intersections
+void setEdgeOffsetsNormals(LeafNode *leaf, float pt[], float a[], float b[], float c[], int len)
+{
+ float *pts = leaf->edge_intersections;
+ for (int i = 0; i < len; i++)
{
- const int* add = manifold_table[getSignMask(leaf)].pairs[eind];
- inds[0] = leaf->minimizer_index + add[0] - 1;
- if(add[0] == add[1])
- {
- inds[1] = -1;
- }
- else
+ if (pt[i] > 1 || pt[i] < 0)
{
- inds[1] = leaf->minimizer_index + add[1] - 1;
+ printf("\noffset: %f\n", pt[i]);
}
+ pts[i * 4] = pt[i];
+ pts[i * 4 + 1] = a[i];
+ pts[i * 4 + 2] = b[i];
+ pts[i * 4 + 3] = c[i];
}
+}
+/// Retrieve complete edge intersection
+void getEdgeIntersectionByIndex(LeafNode *leaf, int index, int st[3], int len, float pt[3], float nm[3])
+{
+ int count = getEdgeCount(leaf, index);
+ float *pts = leaf->edge_intersections;
- /// Set edge intersection
- void setEdgeOffsetNormal(LeafNode* leaf, float pt, float a, float b, float c, int count)
- {
- float * pts = leaf->edge_intersections;
- pts[4 * count] = pt;
- pts[4 * count + 1] = a;
- pts[4 * count + 2] = b;
- pts[4 * count + 3] = c;
- }
+ float off = pts[4 * count];
+
+ pt[0] = (float) st[0];
+ pt[1] = (float) st[1];
+ pt[2] = (float) st[2];
+ pt[index] += (off * len);
+
+ nm[0] = pts[4 * count + 1];
+ nm[1] = pts[4 * count + 2];
+ nm[2] = pts[4 * count + 3];
+}
+
+float getEdgeOffsetNormalByIndex(LeafNode *leaf, int index, float nm[3])
+{
+ int count = getEdgeCount(leaf, index);
+ float *pts = leaf->edge_intersections;
- float getEdgeOffsetNormal(LeafNode* leaf, int count, float& a, float& b, float& c)
+ float off = pts[4 * count];
+
+ nm[0] = pts[4 * count + 1];
+ nm[1] = pts[4 * count + 2];
+ nm[2] = pts[4 * count + 3];
+
+ return off;
+}
+
+void fillEdgeIntersections(LeafNode *leaf, int st[3], int len, float pts[12][3], float norms[12][3])
+{
+ int i;
+ // int stt[3] = {0, 0, 0};
+
+ // The three primal edges are easy
+ int pmask[3] = {0, 4, 8};
+ for (i = 0; i < 3; i++)
{
- float * pts = leaf->edge_intersections;
- a = pts[4 * count + 1];
- b = pts[4 * count + 2];
- c = pts[4 * count + 3];
- return pts[4 * count];
+ if (getEdgeParity(leaf, pmask[i]))
+ {
+ // getEdgeIntersectionByIndex(leaf, i, stt, 1, pts[pmask[i]], norms[pmask[i]]);
+ getEdgeIntersectionByIndex(leaf, i, st, len, pts[pmask[i]], norms[pmask[i]]);
+ }
}
- /// Set multiple edge intersections
- void setEdgeOffsetsNormals(LeafNode* leaf, float pt[], float a[], float b[], float c[], int len)
+ // 3 face adjacent cubes
+ int fmask[3][2] = {{6, 10}, {2, 9}, {1, 5}};
+ int femask[3][2] = {{1, 2}, {0, 2}, {0, 1}};
+ for (i = 0; i < 3; i++)
{
- float *pts = leaf->edge_intersections;
- for(int i = 0; i < len; i ++)
+ int e1 = getEdgeParity(leaf, fmask[i][0]);
+ int e2 = getEdgeParity(leaf, fmask[i][1]);
+ if (e1 || e2)
{
- if(pt[i] > 1 || pt[i] < 0)
+ int nst[3] = {st[0], st[1], st[2]};
+ nst[i] += len;
+ // int nstt[3] = {0, 0, 0};
+ // nstt[i] += 1;
+ LeafNode *node = locateLeaf(nst);
+
+ if (e1)
+ {
+ // getEdgeIntersectionByIndex(node, femask[i][0], nstt, 1, pts[fmask[i][0]], norms[fmask[i][0]]);
+ getEdgeIntersectionByIndex(node, femask[i][0], nst, len, pts[fmask[i][0]], norms[fmask[i][0]]);
+ }
+ if (e2)
{
- printf("\noffset: %f\n", pt[i]);
+ // getEdgeIntersectionByIndex(node, femask[i][1], nstt, 1, pts[fmask[i][1]], norms[fmask[i][1]]);
+ getEdgeIntersectionByIndex(node, femask[i][1], nst, len, pts[fmask[i][1]], norms[fmask[i][1]]);
}
- pts[i * 4] = pt[i];
- pts[i * 4 + 1] = a[i];
- pts[i * 4 + 2] = b[i];
- pts[i * 4 + 3] = c[i];
}
}
- /// Retrieve complete edge intersection
- void getEdgeIntersectionByIndex(LeafNode* leaf, int index, int st[3], int len, float pt[3], float nm[3])
+ // 3 edge adjacent cubes
+ int emask[3] = {3, 7, 11};
+ int eemask[3] = {0, 1, 2};
+ for (i = 0; i < 3; i++)
{
- int count = getEdgeCount(leaf, index);
- float *pts = leaf->edge_intersections;
-
- float off = pts[4 * count];
-
- pt[0] = (float) st[0];
- pt[1] = (float) st[1];
- pt[2] = (float) st[2];
- pt[index] +=(off * len);
-
- nm[0] = pts[4 * count + 1];
- nm[1] = pts[4 * count + 2];
- nm[2] = pts[4 * count + 3];
+ if (getEdgeParity(leaf, emask[i]))
+ {
+ int nst[3] = {st[0] + len, st[1] + len, st[2] + len};
+ nst[i] -= len;
+ // int nstt[3] = {1, 1, 1};
+ // nstt[i] -= 1;
+ LeafNode *node = locateLeaf(nst);
+
+ // getEdgeIntersectionByIndex(node, eemask[i], nstt, 1, pts[emask[i]], norms[emask[i]]);
+ getEdgeIntersectionByIndex(node, eemask[i], nst, len, pts[emask[i]], norms[emask[i]]);
+ }
}
+}
- float getEdgeOffsetNormalByIndex(LeafNode* leaf, int index, float nm[3])
+
+void fillEdgeIntersections(LeafNode *leaf, int st[3], int len, float pts[12][3], float norms[12][3], int parity[12])
+{
+ int i;
+ for (i = 0; i < 12; i++)
{
- int count = getEdgeCount(leaf, index);
- float *pts = leaf->edge_intersections;
-
- float off = pts[4 * count];
-
- nm[0] = pts[4 * count + 1];
- nm[1] = pts[4 * count + 2];
- nm[2] = pts[4 * count + 3];
-
- return off;
+ parity[i] = 0;
}
+ // int stt[3] = {0, 0, 0};
- void fillEdgeIntersections(LeafNode* leaf, int st[3], int len, float pts[12][3], float norms[12][3])
+ // The three primal edges are easy
+ int pmask[3] = {0, 4, 8};
+ for (i = 0; i < 3; i++)
{
- int i;
- // int stt[3] = {0, 0, 0};
+ if (getStoredEdgesParity(leaf, i))
+ {
+ // getEdgeIntersectionByIndex(leaf, i, stt, 1, pts[pmask[i]], norms[pmask[i]]);
+ getEdgeIntersectionByIndex(leaf, i, st, len, pts[pmask[i]], norms[pmask[i]]);
+ parity[pmask[i]] = 1;
+ }
+ }
- // The three primal edges are easy
- int pmask[3] = {0, 4, 8};
- for(i = 0; i < 3; i ++)
+ // 3 face adjacent cubes
+ int fmask[3][2] = {{6, 10}, {2, 9}, {1, 5}};
+ int femask[3][2] = {{1, 2}, {0, 2}, {0, 1}};
+ for (i = 0; i < 3; i++)
+ {
{
- if(getEdgeParity(leaf, pmask[i]))
+ int nst[3] = {st[0], st[1], st[2]};
+ nst[i] += len;
+ // int nstt[3] = {0, 0, 0};
+ // nstt[i] += 1;
+ LeafNode *node = locateLeafCheck(nst);
+ if (node == NULL)
{
- // getEdgeIntersectionByIndex(leaf, i, stt, 1, pts[pmask[i]], norms[pmask[i]]);
- getEdgeIntersectionByIndex(leaf, i, st, len, pts[pmask[i]], norms[pmask[i]]);
+ continue;
}
- }
-
- // 3 face adjacent cubes
- int fmask[3][2] = {{6,10},{2,9},{1,5}};
- int femask[3][2] = {{1,2},{0,2},{0,1}};
- for(i = 0; i < 3; i ++)
- {
- int e1 = getEdgeParity(leaf, fmask[i][0]);
- int e2 = getEdgeParity(leaf, fmask[i][1]);
- if(e1 || e2)
+
+ int e1 = getStoredEdgesParity(node, femask[i][0]);
+ int e2 = getStoredEdgesParity(node, femask[i][1]);
+
+ if (e1)
{
- int nst[3] = {st[0], st[1], st[2]};
- nst[i] += len;
- // int nstt[3] = {0, 0, 0};
- // nstt[i] += 1;
- LeafNode* node = locateLeaf(nst);
-
- if(e1)
- {
- // getEdgeIntersectionByIndex(node, femask[i][0], nstt, 1, pts[fmask[i][0]], norms[fmask[i][0]]);
- getEdgeIntersectionByIndex(node, femask[i][0], nst, len, pts[fmask[i][0]], norms[fmask[i][0]]);
- }
- if(e2)
- {
- // getEdgeIntersectionByIndex(node, femask[i][1], nstt, 1, pts[fmask[i][1]], norms[fmask[i][1]]);
- getEdgeIntersectionByIndex(node, femask[i][1], nst, len, pts[fmask[i][1]], norms[fmask[i][1]]);
- }
+ // getEdgeIntersectionByIndex(node, femask[i][0], nstt, 1, pts[fmask[i][0]], norms[fmask[i][0]]);
+ getEdgeIntersectionByIndex(node, femask[i][0], nst, len, pts[fmask[i][0]], norms[fmask[i][0]]);
+ parity[fmask[i][0]] = 1;
+ }
+ if (e2)
+ {
+ // getEdgeIntersectionByIndex(node, femask[i][1], nstt, 1, pts[fmask[i][1]], norms[fmask[i][1]]);
+ getEdgeIntersectionByIndex(node, femask[i][1], nst, len, pts[fmask[i][1]], norms[fmask[i][1]]);
+ parity[fmask[i][1]] = 1;
}
}
-
- // 3 edge adjacent cubes
- int emask[3] = {3, 7, 11};
- int eemask[3] = {0, 1, 2};
- for(i = 0; i < 3; i ++)
+ }
+
+ // 3 edge adjacent cubes
+ int emask[3] = {3, 7, 11};
+ int eemask[3] = {0, 1, 2};
+ for (i = 0; i < 3; i++)
+ {
+// if(getEdgeParity(leaf, emask[i]))
{
- if(getEdgeParity(leaf, emask[i]))
+ int nst[3] = {st[0] + len, st[1] + len, st[2] + len};
+ nst[i] -= len;
+ // int nstt[3] = {1, 1, 1};
+ // nstt[i] -= 1;
+ LeafNode *node = locateLeafCheck(nst);
+ if (node == NULL)
+ {
+ continue;
+ }
+
+ if (getStoredEdgesParity(node, eemask[i]))
{
- int nst[3] = {st[0] + len, st[1] + len, st[2] + len};
- nst[i] -= len;
- // int nstt[3] = {1, 1, 1};
- // nstt[i] -= 1;
- LeafNode* node = locateLeaf(nst);
-
// getEdgeIntersectionByIndex(node, eemask[i], nstt, 1, pts[emask[i]], norms[emask[i]]);
getEdgeIntersectionByIndex(node, eemask[i], nst, len, pts[emask[i]], norms[emask[i]]);
+ parity[emask[i]] = 1;
}
}
}
+}
+void fillEdgeOffsetsNormals(LeafNode *leaf, int st[3], int len, float pts[12], float norms[12][3], int parity[12])
+{
+ int i;
+ for (i = 0; i < 12; i++)
+ {
+ parity[i] = 0;
+ }
+ // int stt[3] = {0, 0, 0};
- void fillEdgeIntersections(LeafNode* leaf, int st[3], int len, float pts[12][3], float norms[12][3], int parity[12])
+ // The three primal edges are easy
+ int pmask[3] = {0, 4, 8};
+ for (i = 0; i < 3; i++)
{
- int i;
- for(i = 0; i < 12; i ++)
+ if (getStoredEdgesParity(leaf, i))
{
- parity[i] = 0;
+ pts[pmask[i]] = getEdgeOffsetNormalByIndex(leaf, i, norms[pmask[i]]);
+ parity[pmask[i]] = 1;
}
- // int stt[3] = {0, 0, 0};
+ }
- // The three primal edges are easy
- int pmask[3] = {0, 4, 8};
- for(i = 0; i < 3; i ++)
+ // 3 face adjacent cubes
+ int fmask[3][2] = {{6, 10}, {2, 9}, {1, 5}};
+ int femask[3][2] = {{1, 2}, {0, 2}, {0, 1}};
+ for (i = 0; i < 3; i++)
+ {
{
- if(getStoredEdgesParity(leaf, i))
+ int nst[3] = {st[0], st[1], st[2]};
+ nst[i] += len;
+ // int nstt[3] = {0, 0, 0};
+ // nstt[i] += 1;
+ LeafNode *node = locateLeafCheck(nst);
+ if (node == NULL)
{
- // getEdgeIntersectionByIndex(leaf, i, stt, 1, pts[pmask[i]], norms[pmask[i]]);
- getEdgeIntersectionByIndex(leaf, i, st, len, pts[pmask[i]], norms[pmask[i]]);
- parity[pmask[i]] = 1;
+ continue;
}
- }
-
- // 3 face adjacent cubes
- int fmask[3][2] = {{6,10},{2,9},{1,5}};
- int femask[3][2] = {{1,2},{0,2},{0,1}};
- for(i = 0; i < 3; i ++)
- {
+
+ int e1 = getStoredEdgesParity(node, femask[i][0]);
+ int e2 = getStoredEdgesParity(node, femask[i][1]);
+
+ if (e1)
{
- int nst[3] = {st[0], st[1], st[2]};
- nst[i] += len;
- // int nstt[3] = {0, 0, 0};
- // nstt[i] += 1;
- LeafNode* node = locateLeafCheck(nst);
- if(node == NULL)
- {
- continue;
- }
-
- int e1 = getStoredEdgesParity(node, femask[i][0]);
- int e2 = getStoredEdgesParity(node, femask[i][1]);
-
- if(e1)
- {
- // getEdgeIntersectionByIndex(node, femask[i][0], nstt, 1, pts[fmask[i][0]], norms[fmask[i][0]]);
- getEdgeIntersectionByIndex(node, femask[i][0], nst, len, pts[fmask[i][0]], norms[fmask[i][0]]);
- parity[fmask[i][0]] = 1;
- }
- if(e2)
- {
- // getEdgeIntersectionByIndex(node, femask[i][1], nstt, 1, pts[fmask[i][1]], norms[fmask[i][1]]);
- getEdgeIntersectionByIndex(node, femask[i][1], nst, len, pts[fmask[i][1]], norms[fmask[i][1]]);
- parity[fmask[i][1]] = 1;
- }
+ pts[fmask[i][0]] = getEdgeOffsetNormalByIndex(node, femask[i][0], norms[fmask[i][0]]);
+ parity[fmask[i][0]] = 1;
}
- }
-
- // 3 edge adjacent cubes
- int emask[3] = {3, 7, 11};
- int eemask[3] = {0, 1, 2};
- for(i = 0; i < 3; i ++)
- {
-// if(getEdgeParity(leaf, emask[i]))
+ if (e2)
{
- int nst[3] = {st[0] + len, st[1] + len, st[2] + len};
- nst[i] -= len;
- // int nstt[3] = {1, 1, 1};
- // nstt[i] -= 1;
- LeafNode* node = locateLeafCheck(nst);
- if(node == NULL)
- {
- continue;
- }
-
- if(getStoredEdgesParity(node, eemask[i]))
- {
- // getEdgeIntersectionByIndex(node, eemask[i], nstt, 1, pts[emask[i]], norms[emask[i]]);
- getEdgeIntersectionByIndex(node, eemask[i], nst, len, pts[emask[i]], norms[emask[i]]);
- parity[emask[i]] = 1;
- }
+ pts[fmask[i][1]] = getEdgeOffsetNormalByIndex(node, femask[i][1], norms[fmask[i][1]]);
+ parity[fmask[i][1]] = 1;
}
}
}
- void fillEdgeOffsetsNormals(LeafNode* leaf, int st[3], int len, float pts[12], float norms[12][3], int parity[12])
+ // 3 edge adjacent cubes
+ int emask[3] = {3, 7, 11};
+ int eemask[3] = {0, 1, 2};
+ for (i = 0; i < 3; i++)
{
- int i;
- for(i = 0; i < 12; i ++)
- {
- parity[i] = 0;
- }
- // int stt[3] = {0, 0, 0};
-
- // The three primal edges are easy
- int pmask[3] = {0, 4, 8};
- for(i = 0; i < 3; i ++)
+// if(getEdgeParity(leaf, emask[i]))
{
- if(getStoredEdgesParity(leaf, i))
+ int nst[3] = {st[0] + len, st[1] + len, st[2] + len};
+ nst[i] -= len;
+ // int nstt[3] = {1, 1, 1};
+ // nstt[i] -= 1;
+ LeafNode *node = locateLeafCheck(nst);
+ if (node == NULL)
{
- pts[pmask[i]] = getEdgeOffsetNormalByIndex(leaf, i, norms[pmask[i]]);
- parity[pmask[i]] = 1;
+ continue;
}
- }
-
- // 3 face adjacent cubes
- int fmask[3][2] = {{6,10},{2,9},{1,5}};
- int femask[3][2] = {{1,2},{0,2},{0,1}};
- for(i = 0; i < 3; i ++)
- {
- {
- int nst[3] = {st[0], st[1], st[2]};
- nst[i] += len;
- // int nstt[3] = {0, 0, 0};
- // nstt[i] += 1;
- LeafNode* node = locateLeafCheck(nst);
- if(node == NULL)
- {
- continue;
- }
-
- int e1 = getStoredEdgesParity(node, femask[i][0]);
- int e2 = getStoredEdgesParity(node, femask[i][1]);
-
- if(e1)
- {
- pts[fmask[i][0]] = getEdgeOffsetNormalByIndex(node, femask[i][0], norms[fmask[i][0]]);
- parity[fmask[i][0]] = 1;
- }
- if(e2)
- {
- pts[fmask[i][1]] = getEdgeOffsetNormalByIndex(node, femask[i][1], norms[fmask[i][1]]);
- parity[fmask[i][1]] = 1;
- }
- }
- }
-
- // 3 edge adjacent cubes
- int emask[3] = {3, 7, 11};
- int eemask[3] = {0, 1, 2};
- for(i = 0; i < 3; i ++)
- {
-// if(getEdgeParity(leaf, emask[i]))
+
+ if (getStoredEdgesParity(node, eemask[i]))
{
- int nst[3] = {st[0] + len, st[1] + len, st[2] + len};
- nst[i] -= len;
- // int nstt[3] = {1, 1, 1};
- // nstt[i] -= 1;
- LeafNode* node = locateLeafCheck(nst);
- if(node == NULL)
- {
- continue;
- }
-
- if(getStoredEdgesParity(node, eemask[i]))
- {
- pts[emask[i]] = getEdgeOffsetNormalByIndex(node, eemask[i], norms[emask[i]]);
- parity[emask[i]] = 1;
- }
+ pts[emask[i]] = getEdgeOffsetNormalByIndex(node, eemask[i], norms[emask[i]]);
+ parity[emask[i]] = 1;
}
}
}
+}
- /// Update method
- LeafNode* updateEdgeOffsetsNormals(LeafNode* leaf, int oldlen, int newlen, float offs[3], float a[3], float b[3], float c[3])
- {
- // First, create a new leaf node
- LeafNode* nleaf = createLeaf(newlen);
- *nleaf = *leaf;
+/// Update method
+LeafNode *updateEdgeOffsetsNormals(LeafNode *leaf, int oldlen, int newlen, float offs[3], float a[3], float b[3], float c[3])
+{
+ // First, create a new leaf node
+ LeafNode *nleaf = createLeaf(newlen);
+ *nleaf = *leaf;
- // Next, fill in the offsets
- setEdgeOffsetsNormals(nleaf, offs, a, b, c, newlen);
+ // Next, fill in the offsets
+ setEdgeOffsetsNormals(nleaf, offs, a, b, c, newlen);
- // Finally, delete the old leaf
- removeLeaf(oldlen, leaf);
+ // Finally, delete the old leaf
+ removeLeaf(oldlen, leaf);
- return nleaf;
- }
+ return nleaf;
+}
- /// Locate a leaf
- /// WARNING: assuming this leaf already exists!
-
- LeafNode* locateLeaf(int st[3])
- {
- Node* node = (Node*)root;
- for(int i = GRID_DIMENSION - 1; i > GRID_DIMENSION - maxDepth - 1; i --)
- {
- int index =(((st[0] >> i) & 1) << 2) |
- (((st[1] >> i) & 1) << 1) |
- (((st[2] >> i) & 1));
- node = getChild(&node->internal, getChildCount(&node->internal, index));
- }
+/// Locate a leaf
+/// WARNING: assuming this leaf already exists!
- return &node->leaf;
- }
-
- LeafNode* locateLeaf(InternalNode* parent, int len, int st[3])
+LeafNode *locateLeaf(int st[3])
+{
+ Node *node = (Node *)root;
+ for (int i = GRID_DIMENSION - 1; i > GRID_DIMENSION - maxDepth - 1; i--)
{
- Node *node = (Node*)parent;
- int index;
- for(int i = len / 2; i >= mindimen; i >>= 1)
- {
- index =(((st[0] & i) ? 4 : 0) |
- ((st[1] & i) ? 2 : 0) |
- ((st[2] & i) ? 1 : 0));
- node = getChild(&node->internal,
- getChildCount(&node->internal, index));
- }
-
- return &node->leaf;
+ int index = (((st[0] >> i) & 1) << 2) |
+ (((st[1] >> i) & 1) << 1) |
+ (((st[2] >> i) & 1));
+ node = getChild(&node->internal, getChildCount(&node->internal, index));
}
- LeafNode* locateLeafCheck(int st[3])
- {
- Node* node = (Node*)root;
- for(int i = GRID_DIMENSION - 1; i > GRID_DIMENSION - maxDepth - 1; i --)
- {
- int index =(((st[0] >> i) & 1) << 2) |
- (((st[1] >> i) & 1) << 1) |
- (((st[2] >> i) & 1));
- if(!hasChild(&node->internal, index))
- {
- return NULL;
- }
- node = getChild(&node->internal, getChildCount(&node->internal, index));
- }
+ return &node->leaf;
+}
- return &node->leaf;
+LeafNode *locateLeaf(InternalNode *parent, int len, int st[3])
+{
+ Node *node = (Node *)parent;
+ int index;
+ for (int i = len / 2; i >= mindimen; i >>= 1)
+ {
+ index = (((st[0] & i) ? 4 : 0) |
+ ((st[1] & i) ? 2 : 0) |
+ ((st[2] & i) ? 1 : 0));
+ node = getChild(&node->internal,
+ getChildCount(&node->internal, index));
}
- InternalNode* locateParent(int len, int st[3], int& count)
- {
- InternalNode* node = (InternalNode*)root;
- InternalNode* pre = NULL;
- int index = 0;
- for(int i = dimen / 2; i >= len; i >>= 1)
- {
- index =(((st[0] & i) ? 4 : 0) |
- ((st[1] & i) ? 2 : 0) |
- ((st[2] & i) ? 1 : 0));
- pre = node;
- node = &getChild(node, getChildCount(node, index))->internal;
- }
+ return &node->leaf;
+}
- count = getChildCount(pre, index);
- return pre;
- }
-
- InternalNode* locateParent(InternalNode* parent, int len, int st[3], int& count)
+LeafNode *locateLeafCheck(int st[3])
+{
+ Node *node = (Node *)root;
+ for (int i = GRID_DIMENSION - 1; i > GRID_DIMENSION - maxDepth - 1; i--)
{
- InternalNode* node = parent;
- InternalNode* pre = NULL;
- int index = 0;
- for(int i = len / 2; i >= mindimen; i >>= 1)
+ int index = (((st[0] >> i) & 1) << 2) |
+ (((st[1] >> i) & 1) << 1) |
+ (((st[2] >> i) & 1));
+ if (!hasChild(&node->internal, index))
{
- index =(((st[0] & i) ? 4 : 0) |
- ((st[1] & i) ? 2 : 0) |
- ((st[2] & i) ? 1 : 0));
- pre = node;
- node = (InternalNode*)getChild(node, getChildCount(node, index));
+ return NULL;
}
-
- count = getChildCount(pre, index);
- return pre;
+ node = getChild(&node->internal, getChildCount(&node->internal, index));
}
-
- /************ Operators for internal nodes ************/
- /// If child index exists
- int hasChild(InternalNode* node, int index)
- {
- return (node->has_child >> index) & 1;
- }
+ return &node->leaf;
+}
- /// Test if child is leaf
- int isLeaf(InternalNode* node, int index)
+InternalNode *locateParent(int len, int st[3], int& count)
+{
+ InternalNode *node = (InternalNode *)root;
+ InternalNode *pre = NULL;
+ int index = 0;
+ for (int i = dimen / 2; i >= len; i >>= 1)
{
- return (node->child_is_leaf >> index) & 1;
+ index = (((st[0] & i) ? 4 : 0) |
+ ((st[1] & i) ? 2 : 0) |
+ ((st[2] & i) ? 1 : 0));
+ pre = node;
+ node = &getChild(node, getChildCount(node, index))->internal;
}
- /// Get the pointer to child index
- Node* getChild(InternalNode* node, int count)
- {
- return node->children[count];
- };
+ count = getChildCount(pre, index);
+ return pre;
+}
- /// Get total number of children
- int getNumChildren(InternalNode* node)
+InternalNode *locateParent(InternalNode *parent, int len, int st[3], int& count)
+{
+ InternalNode *node = parent;
+ InternalNode *pre = NULL;
+ int index = 0;
+ for (int i = len / 2; i >= mindimen; i >>= 1)
{
- return numChildrenTable[node->has_child];
+ index = (((st[0] & i) ? 4 : 0) |
+ ((st[1] & i) ? 2 : 0) |
+ ((st[2] & i) ? 1 : 0));
+ pre = node;
+ node = (InternalNode *)getChild(node, getChildCount(node, index));
}
- /// Get the count of children
- int getChildCount(InternalNode* node, int index)
- {
- return childrenCountTable[node->has_child][index];
- }
- int getChildIndex(InternalNode* node, int count)
- {
- return childrenIndexTable[node->has_child][count];
- }
- int* getChildCounts(InternalNode* node)
- {
- return childrenCountTable[node->has_child];
- }
+ count = getChildCount(pre, index);
+ return pre;
+}
+
+/************ Operators for internal nodes ************/
+
+/// If child index exists
+int hasChild(InternalNode *node, int index)
+{
+ return (node->has_child >> index) & 1;
+}
+
+/// Test if child is leaf
+int isLeaf(InternalNode *node, int index)
+{
+ return (node->child_is_leaf >> index) & 1;
+}
+
+/// Get the pointer to child index
+Node *getChild(InternalNode *node, int count)
+{
+ return node->children[count];
+};
- /// Get all children
- void fillChildren(InternalNode* node, Node* children[8], int leaf[8])
+/// Get total number of children
+int getNumChildren(InternalNode *node)
+{
+ return numChildrenTable[node->has_child];
+}
+
+/// Get the count of children
+int getChildCount(InternalNode *node, int index)
+{
+ return childrenCountTable[node->has_child][index];
+}
+int getChildIndex(InternalNode *node, int count)
+{
+ return childrenIndexTable[node->has_child][count];
+}
+int *getChildCounts(InternalNode *node)
+{
+ return childrenCountTable[node->has_child];
+}
+
+/// Get all children
+void fillChildren(InternalNode *node, Node *children[8], int leaf[8])
+{
+ int count = 0;
+ for (int i = 0; i < 8; i++)
{
- int count = 0;
- for(int i = 0; i < 8; i ++)
- {
- leaf[i] = isLeaf(node, i);
- if(hasChild(node, i))
- {
- children[i] = getChild(node, count);
- count ++;
- }
- else
- {
- children[i] = NULL;
- leaf[i] = 0;
- }
+ leaf[i] = isLeaf(node, i);
+ if (hasChild(node, i))
+ {
+ children[i] = getChild(node, count);
+ count++;
+ }
+ else {
+ children[i] = NULL;
+ leaf[i] = 0;
}
}
+}
- /// Sets the child pointer
- void setChild(InternalNode* node, int count, Node* chd)
- {
- node->children[count] = chd;
- }
- void setInternalChild(InternalNode* node, int index, int count, InternalNode* chd)
- {
- setChild(node, count, (Node*)chd);
- node->has_child |= (1 << index);
- }
- void setLeafChild(InternalNode* node, int index, int count, LeafNode* chd)
- {
- setChild(node, count, (Node*)chd);
- node->has_child |=(1 << index);
- node->child_is_leaf |= (1 << index);
- }
+/// Sets the child pointer
+void setChild(InternalNode *node, int count, Node *chd)
+{
+ node->children[count] = chd;
+}
+void setInternalChild(InternalNode *node, int index, int count, InternalNode *chd)
+{
+ setChild(node, count, (Node *)chd);
+ node->has_child |= (1 << index);
+}
+void setLeafChild(InternalNode *node, int index, int count, LeafNode *chd)
+{
+ setChild(node, count, (Node *)chd);
+ node->has_child |= (1 << index);
+ node->child_is_leaf |= (1 << index);
+}
+
+/// Add a kid to an existing internal node
+/// Fix me: can we do this without wasting memory ?
+/// Fixed: using variable memory
+InternalNode *addChild(InternalNode *node, int index, Node *child, int aLeaf)
+{
+ // Create new internal node
+ int num = getNumChildren(node);
+ InternalNode *rnode = createInternal(num + 1);
- /// Add a kid to an existing internal node
- /// Fix me: can we do this without wasting memory ?
- /// Fixed: using variable memory
- InternalNode* addChild(InternalNode* node, int index, Node* child, int aLeaf)
+ // Establish children
+ int i;
+ int count1 = 0, count2 = 0;
+ for (i = 0; i < 8; i++)
{
- // Create new internal node
- int num = getNumChildren(node);
- InternalNode* rnode = createInternal(num + 1);
-
- // Establish children
- int i;
- int count1 = 0, count2 = 0;
- for(i = 0; i < 8; i ++)
+ if (i == index)
{
- if(i == index)
+ if (aLeaf)
{
- if(aLeaf)
- {
- setLeafChild(rnode, i, count2, &child->leaf);
- }
- else
- {
- setInternalChild(rnode, i, count2, &child->internal);
- }
- count2 ++;
+ setLeafChild(rnode, i, count2, &child->leaf);
}
- else if(hasChild(node, i))
+ else {
+ setInternalChild(rnode, i, count2, &child->internal);
+ }
+ count2++;
+ }
+ else if (hasChild(node, i))
+ {
+ if (isLeaf(node, i))
{
- if(isLeaf(node, i))
- {
- setLeafChild(rnode, i, count2, &getChild(node, count1)->leaf);
- }
- else
- {
- setInternalChild(rnode, i, count2, &getChild(node, count1)->internal);
- }
- count1 ++;
- count2 ++;
+ setLeafChild(rnode, i, count2, &getChild(node, count1)->leaf);
}
+ else {
+ setInternalChild(rnode, i, count2, &getChild(node, count1)->internal);
+ }
+ count1++;
+ count2++;
}
-
- removeInternal(num, node);
- return rnode;
}
- /// Allocate a node
- InternalNode* createInternal(int length)
- {
- InternalNode* inode = (InternalNode*)alloc[length]->allocate();
- inode->has_child = 0;
- inode->child_is_leaf = 0;
- return inode;
- }
-
- LeafNode* createLeaf(int length)
- {
- assert(length <= 3);
+ removeInternal(num, node);
+ return rnode;
+}
- LeafNode* lnode = (LeafNode*)leafalloc[length]->allocate();
- lnode->edge_parity = 0;
- lnode->primary_edge_intersections = 0;
- lnode->signs = 0;
+/// Allocate a node
+InternalNode *createInternal(int length)
+{
+ InternalNode *inode = (InternalNode *)alloc[length]->allocate();
+ inode->has_child = 0;
+ inode->child_is_leaf = 0;
+ return inode;
+}
- return lnode;
- }
+LeafNode *createLeaf(int length)
+{
+ assert(length <= 3);
- void removeInternal(int num, InternalNode* node)
- {
- alloc[num]->deallocate(node);
- }
+ LeafNode *lnode = (LeafNode *)leafalloc[length]->allocate();
+ lnode->edge_parity = 0;
+ lnode->primary_edge_intersections = 0;
+ lnode->signs = 0;
- void removeLeaf(int num, LeafNode* leaf)
- {
- assert(num >= 0 && num <= 3);
- leafalloc[num]->deallocate(leaf);
- }
+ return lnode;
+}
+
+void removeInternal(int num, InternalNode *node)
+{
+ alloc[num]->deallocate(node);
+}
- /// Add a leaf (by creating a new par node with the leaf added)
- InternalNode* addLeafChild(InternalNode* par, int index, int count,
- LeafNode* leaf)
+void removeLeaf(int num, LeafNode *leaf)
+{
+ assert(num >= 0 && num <= 3);
+ leafalloc[num]->deallocate(leaf);
+}
+
+/// Add a leaf (by creating a new par node with the leaf added)
+InternalNode *addLeafChild(InternalNode *par, int index, int count,
+ LeafNode *leaf)
+{
+ int num = getNumChildren(par) + 1;
+ InternalNode *npar = createInternal(num);
+ *npar = *par;
+
+ if (num == 1)
{
- int num = getNumChildren(par) + 1;
- InternalNode* npar = createInternal(num);
- *npar = *par;
-
- if(num == 1)
+ setLeafChild(npar, index, 0, leaf);
+ }
+ else {
+ int i;
+ for (i = 0; i < count; i++)
{
- setLeafChild(npar, index, 0, leaf);
+ setChild(npar, i, getChild(par, i));
}
- else
+ setLeafChild(npar, index, count, leaf);
+ for (i = count + 1; i < num; i++)
{
- int i;
- for(i = 0; i < count; i ++)
- {
- setChild(npar, i, getChild(par, i));
- }
- setLeafChild(npar, index, count, leaf);
- for(i = count + 1; i < num; i ++)
- {
- setChild(npar, i, getChild(par, i - 1));
- }
+ setChild(npar, i, getChild(par, i - 1));
}
-
- removeInternal(num-1, par);
- return npar;
}
- InternalNode* addInternalChild(InternalNode* par, int index, int count,
- InternalNode* node)
+ removeInternal(num - 1, par);
+ return npar;
+}
+
+InternalNode *addInternalChild(InternalNode *par, int index, int count,
+ InternalNode *node)
+{
+ int num = getNumChildren(par) + 1;
+ InternalNode *npar = createInternal(num);
+ *npar = *par;
+
+ if (num == 1)
{
- int num = getNumChildren(par) + 1;
- InternalNode* npar = createInternal(num);
- *npar = *par;
-
- if(num == 1)
+ setInternalChild(npar, index, 0, node);
+ }
+ else {
+ int i;
+ for (i = 0; i < count; i++)
{
- setInternalChild(npar, index, 0, node);
+ setChild(npar, i, getChild(par, i));
}
- else
+ setInternalChild(npar, index, count, node);
+ for (i = count + 1; i < num; i++)
{
- int i;
- for(i = 0; i < count; i ++)
- {
- setChild(npar, i, getChild(par, i));
- }
- setInternalChild(npar, index, count, node);
- for(i = count + 1; i < num; i ++)
- {
- setChild(npar, i, getChild(par, i - 1));
- }
+ setChild(npar, i, getChild(par, i - 1));
}
-
- removeInternal(num-1, par);
- return npar;
}
+
+ removeInternal(num - 1, par);
+ return npar;
+}
};
#endif
diff --git a/intern/elbeem/intern/ntl_geometrymodel.cpp b/intern/elbeem/intern/ntl_geometrymodel.cpp
index b518416b639..13220736b8e 100644
--- a/intern/elbeem/intern/ntl_geometrymodel.cpp
+++ b/intern/elbeem/intern/ntl_geometrymodel.cpp
@@ -21,14 +21,7 @@
#endif
#endif // WIN32
-#if defined(_WIN64)
-# ifdef __MINGW64__
-# include <basetsd.h>
-# endif
-typedef __int64 int_ptr;
-#else
-typedef long int_ptr;
-#endif
+
/******************************************************************************
* Default Constructor
*****************************************************************************/
@@ -171,7 +164,7 @@ int ntlGeometryObjModel::initModel(int numVertices, float *vertices, int numTria
}
//fprintf(stderr,"initModel DEBUG %d \n",channelSize);
- debMsgStd("ntlGeometryObjModel::initModel",DM_MSG, "Csize:"<<channelSize<<", Cvert:"<<(int_ptr)(channelVertices) ,10);
+ debMsgStd("ntlGeometryObjModel::initModel",DM_MSG, "Csize:"<<channelSize<<", Cvert:"<<(long)(channelVertices) ,10);
if(channelVertices && (channelSize>0)) {
vector<ntlSetVec3f> aniverts;
vector<ntlSetVec3f> aninorms;
diff --git a/intern/elbeem/patches/mingw64_nopermissive.patch b/intern/elbeem/patches/mingw64_nopermissive.patch
deleted file mode 100644
index a01e65d43e4..00000000000
--- a/intern/elbeem/patches/mingw64_nopermissive.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Index: intern/ntl_geometrymodel.cpp
-===================================================================
---- intern/ntl_geometrymodel.cpp (revision 45919)
-+++ intern/ntl_geometrymodel.cpp (working copy)
-@@ -21,7 +21,14 @@
- #endif
- #endif // WIN32
-
--
-+#if defined(_WIN64)
-+# ifdef __MINGW64__
-+# include <basetsd.h>
-+# endif
-+typedef __int64 int_ptr;
-+#else
-+typedef long int_ptr;
-+#endif
- /******************************************************************************
- * Default Constructor
- *****************************************************************************/
-@@ -164,7 +171,7 @@
- }
-
- //fprintf(stderr,"initModel DEBUG %d \n",channelSize);
-- debMsgStd("ntlGeometryObjModel::initModel",DM_MSG, "Csize:"<<channelSize<<", Cvert:"<<(long)(channelVertices) ,10);
-+ debMsgStd("ntlGeometryObjModel::initModel",DM_MSG, "Csize:"<<channelSize<<", Cvert:"<<(int_ptr)(channelVertices) ,10);
- if(channelVertices && (channelSize>0)) {
- vector<ntlSetVec3f> aniverts;
- vector<ntlSetVec3f> aninorms;
diff --git a/intern/ghost/GHOST_Rect.h b/intern/ghost/GHOST_Rect.h
index bcbcaded364..30d9d16b701 100644
--- a/intern/ghost/GHOST_Rect.h
+++ b/intern/ghost/GHOST_Rect.h
@@ -241,8 +241,10 @@ inline void GHOST_Rect::wrapPoint(GHOST_TInt32 &x, GHOST_TInt32 &y, GHOST_TInt32
GHOST_TInt32 h= getHeight();
/* highly unlikely but avoid eternal loop */
- if(w-ofs*2 <= 0 || h-ofs*2 <= 0)
+ if (w-ofs*2 <= 0 || h-ofs*2 <= 0) {
return;
+ }
+
while(x-ofs < m_l) x+= w-(ofs*2);
while(y-ofs < m_t) y+= h-(ofs*2);
while(x+ofs > m_r) x-= w-(ofs*2);
diff --git a/intern/ghost/intern/GHOST_NDOFManager.cpp b/intern/ghost/intern/GHOST_NDOFManager.cpp
index 694394afcde..e5f523ca8ef 100644
--- a/intern/ghost/intern/GHOST_NDOFManager.cpp
+++ b/intern/ghost/intern/GHOST_NDOFManager.cpp
@@ -286,7 +286,7 @@ bool GHOST_NDOFManager::setDevice(unsigned short vendor_id, unsigned short produ
}
if (m_buttonMask == 0)
- m_buttonMask = ~(-1 << m_buttonCount);
+ m_buttonMask = (int) ~(UINT_MAX << m_buttonCount);
#ifdef DEBUG_NDOF_BUTTONS
printf("ndof: %d buttons -> hex:%X\n", m_buttonCount, m_buttonMask);
diff --git a/intern/ghost/intern/GHOST_NDOFManagerX11.cpp b/intern/ghost/intern/GHOST_NDOFManagerX11.cpp
index 1e025cd738a..565324ae211 100644
--- a/intern/ghost/intern/GHOST_NDOFManagerX11.cpp
+++ b/intern/ghost/intern/GHOST_NDOFManagerX11.cpp
@@ -37,6 +37,8 @@ GHOST_NDOFManagerX11::GHOST_NDOFManagerX11(GHOST_System& sys)
setDeadZone(0.1f); /* how to calibrate on Linux? throw away slight motion! */
if (spnav_open() != -1) {
+ m_available = true;
+
/* determine exactly which device (if any) is plugged in */
#define MAX_LINE_LENGTH 100
@@ -49,7 +51,6 @@ GHOST_NDOFManagerX11::GHOST_NDOFManagerX11(GHOST_System& sys)
unsigned short vendor_id = 0, product_id = 0;
if (sscanf(line, "Bus %*d Device %*d: ID %hx:%hx", &vendor_id, &product_id) == 2)
if (setDevice(vendor_id, product_id)) {
- m_available = true;
break; /* stop looking once the first 3D mouse is found */
}
}
@@ -75,28 +76,32 @@ bool GHOST_NDOFManagerX11::available()
bool GHOST_NDOFManagerX11::processEvents()
{
- GHOST_TUns64 now = m_system.getMilliSeconds();
-
bool anyProcessed = false;
- spnav_event e;
- while (spnav_poll_event(&e)) {
- switch (e.type) {
- case SPNAV_EVENT_MOTION:
- {
- /* convert to blender view coords */
- short t[3] = {e.motion.x, e.motion.y, -e.motion.z};
- short r[3] = {-e.motion.rx, -e.motion.ry, e.motion.rz};
-
- updateTranslation(t, now);
- updateRotation(r, now);
- break;
+
+ if (m_available) {
+ GHOST_TUns64 now = m_system.getMilliSeconds();
+
+ spnav_event e;
+ while (spnav_poll_event(&e)) {
+ switch (e.type) {
+ case SPNAV_EVENT_MOTION:
+ {
+ /* convert to blender view coords */
+ short t[3] = {e.motion.x, e.motion.y, -e.motion.z};
+ short r[3] = {-e.motion.rx, -e.motion.ry, e.motion.rz};
+
+ updateTranslation(t, now);
+ updateRotation(r, now);
+ break;
+ }
+ case SPNAV_EVENT_BUTTON:
+ updateButton(e.button.bnum, e.button.press, now);
+ break;
}
- case SPNAV_EVENT_BUTTON:
- updateButton(e.button.bnum, e.button.press, now);
- break;
+ anyProcessed = true;
}
- anyProcessed = true;
}
+
return anyProcessed;
}
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.h b/intern/ghost/intern/GHOST_SystemCocoa.h
index 2220955c270..ce7677aee7a 100644
--- a/intern/ghost/intern/GHOST_SystemCocoa.h
+++ b/intern/ghost/intern/GHOST_SystemCocoa.h
@@ -247,6 +247,7 @@ protected:
* @return Indication whether the event was handled.
*/
GHOST_TSuccess handleTabletEvent(void *eventPtr, short eventType);
+ bool handleTabletEvent(void *eventPtr);
/**
* Handles a mouse event.
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm
index 50d8cfd074b..6013f3519ec 100644
--- a/intern/ghost/intern/GHOST_SystemCocoa.mm
+++ b/intern/ghost/intern/GHOST_SystemCocoa.mm
@@ -1280,7 +1280,7 @@ GHOST_TUns8 GHOST_SystemCocoa::handleQuitRequest()
GHOST_Window* window = (GHOST_Window*)m_windowManager->getActiveWindow();
//Discard quit event if we are in cursor grab sequence
- if (window && (window->getCursorGrabMode() != GHOST_kGrabDisable) && (window->getCursorGrabMode() != GHOST_kGrabNormal))
+ if (window && window->getCursorGrabModeIsWarp())
return GHOST_kExitCancel;
//Check open windows if some changes are not saved
@@ -1329,7 +1329,7 @@ bool GHOST_SystemCocoa::handleOpenDocumentRequest(void *filepathStr)
}
//Discard event if we are in cursor grab sequence, it'll lead to "stuck cursor" situation if the alert panel is raised
- if (window && (window->getCursorGrabMode() != GHOST_kGrabDisable) && (window->getCursorGrabMode() != GHOST_kGrabNormal))
+ if (window && window->getCursorGrabModeIsWarp())
return GHOST_kExitCancel;
//Check open windows if some changes are not saved
@@ -1421,6 +1421,23 @@ GHOST_TSuccess GHOST_SystemCocoa::handleTabletEvent(void *eventPtr, short eventT
return GHOST_kSuccess;
}
+bool GHOST_SystemCocoa::handleTabletEvent(void *eventPtr)
+{
+ NSEvent *event = (NSEvent *)eventPtr;
+
+ switch ([event subtype]) {
+ case NX_SUBTYPE_TABLET_POINT:
+ handleTabletEvent(eventPtr, NSTabletPoint);
+ return true;
+ case NX_SUBTYPE_TABLET_PROXIMITY:
+ handleTabletEvent(eventPtr, NSTabletProximity);
+ return true;
+ default:
+ //No tablet event included : do nothing
+ return false;
+ }
+
+}
GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
{
@@ -1432,7 +1449,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
//printf("\nW failure for event 0x%x",[event type]);
return GHOST_kFailure;
}
-
+
switch ([event type])
{
case NSLeftMouseDown:
@@ -1440,17 +1457,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
case NSOtherMouseDown:
pushEvent(new GHOST_EventButton([event timestamp]*1000, GHOST_kEventButtonDown, window, convertButton([event buttonNumber])));
//Handle tablet events combined with mouse events
- switch ([event subtype]) {
- case NX_SUBTYPE_TABLET_POINT:
- handleTabletEvent(eventPtr, NSTabletPoint);
- break;
- case NX_SUBTYPE_TABLET_PROXIMITY:
- handleTabletEvent(eventPtr, NSTabletProximity);
- break;
- default:
- //No tablet event included : do nothing
- break;
- }
+ handleTabletEvent(event);
break;
case NSLeftMouseUp:
@@ -1458,37 +1465,27 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
case NSOtherMouseUp:
pushEvent(new GHOST_EventButton([event timestamp]*1000, GHOST_kEventButtonUp, window, convertButton([event buttonNumber])));
//Handle tablet events combined with mouse events
- switch ([event subtype]) {
- case NX_SUBTYPE_TABLET_POINT:
- handleTabletEvent(eventPtr, NSTabletPoint);
- break;
- case NX_SUBTYPE_TABLET_PROXIMITY:
- handleTabletEvent(eventPtr, NSTabletProximity);
- break;
- default:
- //No tablet event included : do nothing
- break;
- }
+ handleTabletEvent(event);
break;
case NSLeftMouseDragged:
case NSRightMouseDragged:
case NSOtherMouseDragged:
//Handle tablet events combined with mouse events
- switch ([event subtype]) {
- case NX_SUBTYPE_TABLET_POINT:
- handleTabletEvent(eventPtr, NSTabletPoint);
- break;
- case NX_SUBTYPE_TABLET_PROXIMITY:
- handleTabletEvent(eventPtr, NSTabletProximity);
- break;
- default:
- //No tablet event included : do nothing
- break;
- }
+ handleTabletEvent(event);
- case NSMouseMoved:
- switch (window->getCursorGrabMode()) {
+ case NSMouseMoved:
+ {
+ GHOST_TGrabCursorMode grab_mode = window->getCursorGrabMode();
+
+ /* TODO: CHECK IF THIS IS A TABLET EVENT */
+ bool is_tablet = false;
+
+ if (is_tablet && window->getCursorGrabModeIsWarp()) {
+ grab_mode = GHOST_kGrabDisable;
+ }
+
+ switch (grab_mode) {
case GHOST_kGrabHide: //Cursor hidden grab operation : no cursor move
{
GHOST_TInt32 x_warp, y_warp, x_accum, y_accum, x, y;
@@ -1563,7 +1560,8 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
}
break;
}
- break;
+ }
+ break;
case NSScrollWheel:
{
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index 2d8cf13ac4f..9f2728a581f 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -649,8 +649,10 @@ GHOST_EventCursor* GHOST_SystemWin32::processCursorEvent(GHOST_TEventType type,
system->getCursorPosition(x_screen, y_screen);
- if(window->getCursorGrabMode() != GHOST_kGrabDisable && window->getCursorGrabMode() != GHOST_kGrabNormal)
- {
+ /* TODO: CHECK IF THIS IS A TABLET EVENT */
+ bool is_tablet = false;
+
+ if (is_tablet == false && window->getCursorGrabModeIsWarp()) {
GHOST_TInt32 x_new= x_screen;
GHOST_TInt32 y_new= y_screen;
GHOST_TInt32 x_accum, y_accum;
diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp
index 857d9e79e57..cabec06301a 100644
--- a/intern/ghost/intern/GHOST_SystemX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemX11.cpp
@@ -471,9 +471,14 @@ GHOST_SystemX11::processEvent(XEvent *xe)
case MotionNotify:
{
XMotionEvent &xme = xe->xmotion;
-
- if(window->getCursorGrabMode() != GHOST_kGrabDisable && window->getCursorGrabMode() != GHOST_kGrabNormal)
- {
+
+#ifdef WITH_X11_XINPUT
+ bool is_tablet = window->GetXTablet().CommonData.Active != GHOST_kTabletModeNone;
+#else
+ bool is_tablet = false;
+#endif
+
+ if (is_tablet == false && window->getCursorGrabModeIsWarp()) {
GHOST_TInt32 x_new= xme.x_root;
GHOST_TInt32 y_new= xme.y_root;
GHOST_TInt32 x_accum, y_accum;
diff --git a/intern/ghost/intern/GHOST_Window.h b/intern/ghost/intern/GHOST_Window.h
index 323e0fa3418..23f1b044b60 100644
--- a/intern/ghost/intern/GHOST_Window.h
+++ b/intern/ghost/intern/GHOST_Window.h
@@ -161,6 +161,7 @@ public:
*/
inline virtual bool getCursorVisibility() const;
inline virtual GHOST_TGrabCursorMode getCursorGrabMode() const;
+ inline virtual bool getCursorGrabModeIsWarp() const;
inline virtual void getCursorGrabInitPos(GHOST_TInt32 &x, GHOST_TInt32 &y) const;
inline virtual void getCursorGrabAccum(GHOST_TInt32 &x, GHOST_TInt32 &y) const;
inline virtual void setCursorGrabAccum(GHOST_TInt32 x, GHOST_TInt32 y);
@@ -362,6 +363,12 @@ inline GHOST_TGrabCursorMode GHOST_Window::getCursorGrabMode() const
return m_cursorGrab;
}
+inline bool GHOST_Window::getCursorGrabModeIsWarp() const
+{
+ return (m_cursorGrab == GHOST_kGrabWrap) ||
+ (m_cursorGrab == GHOST_kGrabHide);
+}
+
inline void GHOST_Window::getCursorGrabInitPos(GHOST_TInt32 &x, GHOST_TInt32 &y) const
{
x = m_cursorGrabInitPos[0];
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp
index 9d105748095..3715da12cd6 100644
--- a/intern/ghost/intern/GHOST_WindowWin32.cpp
+++ b/intern/ghost/intern/GHOST_WindowWin32.cpp
@@ -55,7 +55,7 @@
#endif
// Some more multisample defines
-#define WGL_SAMPLE_BUFERS_ARB 0x2041
+#define WGL_SAMPLE_BUFFERS_ARB 0x2041
#define WGL_SAMPLES_ARB 0x2042
// win64 doesn't define GWL_USERDATA
diff --git a/intern/guardedalloc/cpp/mallocn.cpp b/intern/guardedalloc/cpp/mallocn.cpp
index 97e68d06ace..130fcb6960b 100644
--- a/intern/guardedalloc/cpp/mallocn.cpp
+++ b/intern/guardedalloc/cpp/mallocn.cpp
@@ -41,5 +41,7 @@ void* operator new (size_t size, const char *str)
void operator delete (void *p)
{
- MEM_freeN(p);
+ /* delete NULL is valid in c++ */
+ if(p)
+ MEM_freeN(p);
}
diff --git a/intern/guardedalloc/intern/mallocn.c b/intern/guardedalloc/intern/mallocn.c
index 2a6a0df0ff4..bb3a1c66ddc 100644
--- a/intern/guardedalloc/intern/mallocn.c
+++ b/intern/guardedalloc/intern/mallocn.c
@@ -243,7 +243,7 @@ void *MEM_dupallocN(void *vmemh)
MemHead *memh= vmemh;
memh--;
- if(memh->mmap)
+ if (memh->mmap)
newp= MEM_mapallocN(memh->len, "dupli_mapalloc");
else
newp= MEM_mallocN(memh->len, "dupli_alloc");
@@ -265,8 +265,8 @@ void *MEM_reallocN(void *vmemh, size_t len)
memh--;
newp= MEM_mallocN(len, memh->name);
- if(newp) {
- if(len < memh->len)
+ if (newp) {
+ if (len < memh->len)
memcpy(newp, vmemh, len);
else
memcpy(newp, vmemh, memh->len);
@@ -311,14 +311,14 @@ void *MEM_mallocN(size_t len, const char *str)
memh= (MemHead *)malloc(len+sizeof(MemHead)+sizeof(MemTail));
- if(memh) {
+ if (memh) {
make_memhead_header(memh, len, str);
mem_unlock_thread();
- if(malloc_debug_memset && len)
+ if (malloc_debug_memset && len)
memset(memh+1, 255, len);
#ifdef DEBUG_MEMCOUNTER
- if(_mallocn_count==DEBUG_MEMCOUNTER_ERROR_VAL)
+ if (_mallocn_count==DEBUG_MEMCOUNTER_ERROR_VAL)
memcount_raise(__func__);
memh->_count= _mallocn_count++;
#endif
@@ -339,11 +339,11 @@ void *MEM_callocN(size_t len, const char *str)
memh= (MemHead *)calloc(len+sizeof(MemHead)+sizeof(MemTail),1);
- if(memh) {
+ if (memh) {
make_memhead_header(memh, len, str);
mem_unlock_thread();
#ifdef DEBUG_MEMCOUNTER
- if(_mallocn_count==DEBUG_MEMCOUNTER_ERROR_VAL)
+ if (_mallocn_count==DEBUG_MEMCOUNTER_ERROR_VAL)
memcount_raise(__func__);
memh->_count= _mallocn_count++;
#endif
@@ -366,14 +366,14 @@ void *MEM_mapallocN(size_t len, const char *str)
memh= mmap(NULL, len+sizeof(MemHead)+sizeof(MemTail),
PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANON, -1, 0);
- if(memh!=(MemHead *)-1) {
+ if (memh!=(MemHead *)-1) {
make_memhead_header(memh, len, str);
memh->mmap= 1;
mmap_in_use += len;
peak_mem = mmap_in_use > peak_mem ? mmap_in_use : peak_mem;
mem_unlock_thread();
#ifdef DEBUG_MEMCOUNTER
- if(_mallocn_count==DEBUG_MEMCOUNTER_ERROR_VAL)
+ if (_mallocn_count==DEBUG_MEMCOUNTER_ERROR_VAL)
memcount_raise(__func__);
memh->_count= _mallocn_count++;
#endif
@@ -406,9 +406,9 @@ static int compare_len(const void *p1, const void *p2)
const MemPrintBlock *pb1= (const MemPrintBlock*)p1;
const MemPrintBlock *pb2= (const MemPrintBlock*)p2;
- if(pb1->len < pb2->len)
+ if (pb1->len < pb2->len)
return 1;
- else if(pb1->len == pb2->len)
+ else if (pb1->len == pb2->len)
return 0;
else
return -1;
@@ -431,7 +431,7 @@ void MEM_printmemlist_stats(void)
membl = membase->first;
if (membl) membl = MEMNEXT(membl);
- while(membl) {
+ while (membl) {
pb->name= membl->name;
pb->len= membl->len;
pb->items= 1;
@@ -439,18 +439,18 @@ void MEM_printmemlist_stats(void)
totpb++;
pb++;
- if(membl->next)
+ if (membl->next)
membl= MEMNEXT(membl->next);
else break;
}
/* sort by name and add together blocks with the same name */
qsort(printblock, totpb, sizeof(MemPrintBlock), compare_name);
- for(a=0, b=0; a<totpb; a++) {
- if(a == b) {
+ for (a = 0, b=0; a<totpb; a++) {
+ if (a == b) {
continue;
}
- else if(strcmp(printblock[a].name, printblock[b].name) == 0) {
+ else if (strcmp(printblock[a].name, printblock[b].name) == 0) {
printblock[b].len += printblock[a].len;
printblock[b].items++;
}
@@ -465,7 +465,7 @@ void MEM_printmemlist_stats(void)
qsort(printblock, totpb, sizeof(MemPrintBlock), compare_len);
printf("\ntotal memory len: %.3f MB\n", (double)mem_in_use/(double)(1024*1024));
printf(" ITEMS TOTAL-MiB AVERAGE-KiB TYPE\n");
- for(a=0, pb=printblock; a<totpb; a++, pb++)
+ for (a = 0, pb=printblock; a<totpb; a++, pb++)
printf("%6d (%8.3f %8.3f) %s\n", pb->items, (double)pb->len/(double)(1024*1024), (double)pb->len/1024.0/(double)pb->items, pb->name);
free(printblock);
@@ -491,7 +491,7 @@ static void MEM_printmemlist_internal( int pydict )
print_error("# membase_debug.py\n");
print_error("membase = [\\\n");
}
- while(membl) {
+ while (membl) {
if (pydict) {
fprintf(stderr, "{'len':" SIZET_FORMAT ", 'name':'''%s''', 'pointer':'%p'},\\\n", SIZET_ARG(membl->len), membl->name, (void *)(membl+1));
} else {
@@ -501,7 +501,7 @@ static void MEM_printmemlist_internal( int pydict )
print_error("%s len: " SIZET_FORMAT " %p\n", membl->name, SIZET_ARG(membl->len), membl+1);
#endif
}
- if(membl->next)
+ if (membl->next)
membl= MEMNEXT(membl->next);
else break;
}
@@ -536,9 +536,9 @@ void MEM_callbackmemlist(void (*func)(void*)) {
membl = membase->first;
if (membl) membl = MEMNEXT(membl);
- while(membl) {
+ while (membl) {
func(membl+1);
- if(membl->next)
+ if (membl->next)
membl= MEMNEXT(membl->next);
else break;
}
@@ -554,13 +554,13 @@ short MEM_testN(void *vmemh) {
membl = membase->first;
if (membl) membl = MEMNEXT(membl);
- while(membl) {
+ while (membl) {
if (vmemh == membl+1) {
mem_unlock_thread();
return 1;
}
- if(membl->next)
+ if (membl->next)
membl= MEMNEXT(membl->next);
else break;
}
@@ -585,13 +585,13 @@ short MEM_freeN(void *vmemh) /* anders compileertie niet meer */
MemHead *memh= vmemh;
const char *name;
- if (memh == NULL){
+ if (memh == NULL) {
MemorY_ErroR("free","attempt to free NULL pointer");
/* print_error(err_stream, "%d\n", (memh+4000)->tag1); */
return(-1);
}
- if(sizeof(intptr_t)==8) {
+ if (sizeof(intptr_t)==8) {
if (((intptr_t) memh) & 0x7) {
MemorY_ErroR("free","attempt to free illegal pointer");
return(-1);
@@ -605,7 +605,7 @@ short MEM_freeN(void *vmemh) /* anders compileertie niet meer */
}
memh--;
- if(memh->tag1 == MEMFREE && memh->tag2 == MEMFREE) {
+ if (memh->tag1 == MEMFREE && memh->tag2 == MEMFREE) {
MemorY_ErroR(memh->name,"double free");
return(-1);
}
@@ -613,7 +613,7 @@ short MEM_freeN(void *vmemh) /* anders compileertie niet meer */
mem_lock_thread();
if ((memh->tag1 == MEMTAG1) && (memh->tag2 == MEMTAG2) && ((memh->len & 0x3) == 0)) {
memt = (MemTail *)(((char *) memh) + sizeof(MemHead) + memh->len);
- if (memt->tag3 == MEMTAG3){
+ if (memt->tag3 == MEMTAG3) {
memh->tag1 = MEMFREE;
memh->tag2 = MEMFREE;
@@ -628,7 +628,7 @@ short MEM_freeN(void *vmemh) /* anders compileertie niet meer */
error = 2;
MemorY_ErroR(memh->name,"end corrupt");
name = check_memlist(memh);
- if (name != NULL){
+ if (name != NULL) {
if (name != memh->name) MemorY_ErroR(name,"is also corrupt");
}
} else{
@@ -694,13 +694,13 @@ static void rem_memblock(MemHead *memh)
totblock--;
mem_in_use -= memh->len;
- if(memh->mmap) {
+ if (memh->mmap) {
mmap_in_use -= memh->len;
if (munmap(memh, memh->len + sizeof(MemHead) + sizeof(MemTail)))
printf("Couldn't unmap memory %s\n", memh->name);
}
else {
- if(malloc_debug_memset && memh->len)
+ if (malloc_debug_memset && memh->len)
memset(memh+1, 255, memh->len);
free(memh);
}
@@ -723,7 +723,7 @@ static const char *check_memlist(MemHead *memh)
forw = membase->first;
if (forw) forw = MEMNEXT(forw);
forwok = NULL;
- while(forw){
+ while (forw) {
if (forw->tag1 != MEMTAG1 || forw->tag2 != MEMTAG2) break;
forwok = forw;
if (forw->next) forw = MEMNEXT(forw->next);
@@ -733,7 +733,7 @@ static const char *check_memlist(MemHead *memh)
back = (MemHead *) membase->last;
if (back) back = MEMNEXT(back);
backok = NULL;
- while(back){
+ while (back) {
if (back->tag1 != MEMTAG1 || back->tag2 != MEMTAG2) break;
backok = back;
if (back->prev) back = MEMNEXT(back->prev);
@@ -742,13 +742,13 @@ static const char *check_memlist(MemHead *memh)
if (forw != back) return ("MORE THAN 1 MEMORYBLOCK CORRUPT");
- if (forw == NULL && back == NULL){
+ if (forw == NULL && back == NULL) {
/* geen foute headers gevonden dan maar op zoek naar memblock*/
forw = membase->first;
if (forw) forw = MEMNEXT(forw);
forwok = NULL;
- while(forw){
+ while (forw) {
if (forw == memh) break;
if (forw->tag1 != MEMTAG1 || forw->tag2 != MEMTAG2) break;
forwok = forw;
@@ -760,7 +760,7 @@ static const char *check_memlist(MemHead *memh)
back = (MemHead *) membase->last;
if (back) back = MEMNEXT(back);
backok = NULL;
- while(back){
+ while (back) {
if (back == memh) break;
if (back->tag1 != MEMTAG1 || back->tag2 != MEMTAG2) break;
backok = back;
@@ -772,10 +772,10 @@ static const char *check_memlist(MemHead *memh)
if (forwok) name = forwok->nextname;
else name = "No name found";
- if (forw == memh){
+ if (forw == memh) {
/* voor alle zekerheid wordt dit block maar uit de lijst gehaald */
- if (forwok){
- if (backok){
+ if (forwok) {
+ if (backok) {
forwok->next = (MemHead *)&backok->next;
backok->prev = (MemHead *)&forwok->next;
forwok->nextname = backok->name;
@@ -785,7 +785,7 @@ static const char *check_memlist(MemHead *memh)
/* membase->last = (struct Link *) &forwok->next; */
}
} else{
- if (backok){
+ if (backok) {
backok->prev = NULL;
membase->first = &backok->next;
} else{
diff --git a/intern/mikktspace/mikktspace.c b/intern/mikktspace/mikktspace.c
index 2036e601bcb..24c77c439a7 100644
--- a/intern/mikktspace/mikktspace.c
+++ b/intern/mikktspace/mikktspace.c
@@ -193,7 +193,7 @@ static STSpace AvgTSpace(const STSpace * pTS0, const STSpace * pTS1)
// this if is important. Due to floating point precision
// averaging when ts0==ts1 will cause a slight difference
// which results in tangent space splits later on
- if(pTS0->fMagS==pTS1->fMagS && pTS0->fMagT==pTS1->fMagT &&
+ if (pTS0->fMagS==pTS1->fMagS && pTS0->fMagT==pTS1->fMagT &&
veq(pTS0->vOs,pTS1->vOs) && veq(pTS0->vOt, pTS1->vOt))
{
ts_res.fMagS = pTS0->fMagS;
@@ -207,8 +207,8 @@ static STSpace AvgTSpace(const STSpace * pTS0, const STSpace * pTS1)
ts_res.fMagT = 0.5f*(pTS0->fMagT+pTS1->fMagT);
ts_res.vOs = vadd(pTS0->vOs,pTS1->vOs);
ts_res.vOt = vadd(pTS0->vOt,pTS1->vOt);
- if( VNotZero(ts_res.vOs) ) ts_res.vOs = Normalize(ts_res.vOs);
- if( VNotZero(ts_res.vOt) ) ts_res.vOt = Normalize(ts_res.vOt);
+ if ( VNotZero(ts_res.vOs) ) ts_res.vOs = Normalize(ts_res.vOs);
+ if ( VNotZero(ts_res.vOt) ) ts_res.vOt = Normalize(ts_res.vOt);
}
return ts_res;
@@ -246,7 +246,7 @@ tbool genTangSpace(const SMikkTSpaceContext * pContext, const float fAngularThre
const float fThresCos = (float) cos((fAngularThreshold*(float)M_PI)/180.0f);
// verify all call-backs have been set
- if( pContext->m_pInterface->m_getNumFaces==NULL ||
+ if ( pContext->m_pInterface->m_getNumFaces==NULL ||
pContext->m_pInterface->m_getNumVerticesOfFace==NULL ||
pContext->m_pInterface->m_getPosition==NULL ||
pContext->m_pInterface->m_getNormal==NULL ||
@@ -254,21 +254,21 @@ tbool genTangSpace(const SMikkTSpaceContext * pContext, const float fAngularThre
return TFALSE;
// count triangles on supported faces
- for(f=0; f<iNrFaces; f++)
+ for (f=0; f<iNrFaces; f++)
{
const int verts = pContext->m_pInterface->m_getNumVerticesOfFace(pContext, f);
- if(verts==3) ++iNrTrianglesIn;
+ if (verts==3) ++iNrTrianglesIn;
else if(verts==4) iNrTrianglesIn += 2;
}
- if(iNrTrianglesIn<=0) return TFALSE;
+ if (iNrTrianglesIn<=0) return TFALSE;
// allocate memory for an index list
piTriListIn = (int *) malloc(sizeof(int)*3*iNrTrianglesIn);
pTriInfos = (STriInfo *) malloc(sizeof(STriInfo)*iNrTrianglesIn);
- if(piTriListIn==NULL || pTriInfos==NULL)
+ if (piTriListIn==NULL || pTriInfos==NULL)
{
- if(piTriListIn!=NULL) free(piTriListIn);
- if(pTriInfos!=NULL) free(pTriInfos);
+ if (piTriListIn!=NULL) free(piTriListIn);
+ if (pTriInfos!=NULL) free(pTriInfos);
return TFALSE;
}
@@ -283,7 +283,7 @@ tbool genTangSpace(const SMikkTSpaceContext * pContext, const float fAngularThre
// Mark all degenerate triangles
iTotTris = iNrTrianglesIn;
iDegenTriangles = 0;
- for(t=0; t<iTotTris; t++)
+ for (t=0; t<iTotTris; t++)
{
const int i0 = piTriListIn[t*3+0];
const int i1 = piTriListIn[t*3+1];
@@ -291,7 +291,7 @@ tbool genTangSpace(const SMikkTSpaceContext * pContext, const float fAngularThre
const SVec3 p0 = GetPosition(pContext, i0);
const SVec3 p1 = GetPosition(pContext, i1);
const SVec3 p2 = GetPosition(pContext, i2);
- if(veq(p0,p1) || veq(p0,p2) || veq(p1,p2)) // degenerate
+ if (veq(p0,p1) || veq(p0,p2) || veq(p1,p2)) // degenerate
{
pTriInfos[t].iFlag |= MARK_DEGENERATE;
++iDegenTriangles;
@@ -317,10 +317,10 @@ tbool genTangSpace(const SMikkTSpaceContext * pContext, const float fAngularThre
iNrMaxGroups = iNrTrianglesIn*3;
pGroups = (SGroup *) malloc(sizeof(SGroup)*iNrMaxGroups);
piGroupTrianglesBuffer = (int *) malloc(sizeof(int)*iNrTrianglesIn*3);
- if(pGroups==NULL || piGroupTrianglesBuffer==NULL)
+ if (pGroups==NULL || piGroupTrianglesBuffer==NULL)
{
- if(pGroups!=NULL) free(pGroups);
- if(piGroupTrianglesBuffer!=NULL) free(piGroupTrianglesBuffer);
+ if (pGroups!=NULL) free(pGroups);
+ if (piGroupTrianglesBuffer!=NULL) free(piGroupTrianglesBuffer);
free(piTriListIn);
free(pTriInfos);
return TFALSE;
@@ -333,7 +333,7 @@ tbool genTangSpace(const SMikkTSpaceContext * pContext, const float fAngularThre
//
psTspace = (STSpace *) malloc(sizeof(STSpace)*iNrTSPaces);
- if(psTspace==NULL)
+ if (psTspace==NULL)
{
free(piTriListIn);
free(pTriInfos);
@@ -342,7 +342,7 @@ tbool genTangSpace(const SMikkTSpaceContext * pContext, const float fAngularThre
return TFALSE;
}
memset(psTspace, 0, sizeof(STSpace)*iNrTSPaces);
- for(t=0; t<iNrTSPaces; t++)
+ for (t=0; t<iNrTSPaces; t++)
{
psTspace[t].vOs.x=1.0f; psTspace[t].vOs.y=0.0f; psTspace[t].vOs.z=0.0f; psTspace[t].fMagS = 1.0f;
psTspace[t].vOt.x=0.0f; psTspace[t].vOt.y=1.0f; psTspace[t].vOt.z=0.0f; psTspace[t].fMagT = 1.0f;
@@ -359,7 +359,7 @@ tbool genTangSpace(const SMikkTSpaceContext * pContext, const float fAngularThre
free(pGroups);
free(piGroupTrianglesBuffer);
- if(!bRes) // if an allocation in GenerateTSpaces() failed
+ if (!bRes) // if an allocation in GenerateTSpaces() failed
{
// clean up and return false
free(pTriInfos); free(piTriListIn); free(psTspace);
@@ -376,10 +376,10 @@ tbool genTangSpace(const SMikkTSpaceContext * pContext, const float fAngularThre
free(pTriInfos); free(piTriListIn);
index = 0;
- for(f=0; f<iNrFaces; f++)
+ for (f=0; f<iNrFaces; f++)
{
const int verts = pContext->m_pInterface->m_getNumVerticesOfFace(pContext, f);
- if(verts!=3 && verts!=4) continue;
+ if (verts!=3 && verts!=4) continue;
// I've decided to let degenerate triangles and group-with-anythings
@@ -390,28 +390,28 @@ tbool genTangSpace(const SMikkTSpaceContext * pContext, const float fAngularThre
// (this is already the case for good triangles but not for
// degenerate ones and those with bGroupWithAnything==true)
bool bOrient = psTspace[index].bOrient;
- if(psTspace[index].iCounter == 0) // tspace was not derived from a group
+ if (psTspace[index].iCounter == 0) // tspace was not derived from a group
{
// look for a space created in GenerateTSpaces() by iCounter>0
bool bNotFound = true;
int i=1;
- while(i<verts && bNotFound)
+ while (i<verts && bNotFound)
{
- if(psTspace[index+i].iCounter > 0) bNotFound=false;
+ if (psTspace[index+i].iCounter > 0) bNotFound=false;
else ++i;
}
- if(!bNotFound) bOrient = psTspace[index+i].bOrient;
+ if (!bNotFound) bOrient = psTspace[index+i].bOrient;
}*/
// set data
- for(i=0; i<verts; i++)
+ for (i=0; i<verts; i++)
{
const STSpace * pTSpace = &psTspace[index];
float tang[] = {pTSpace->vOs.x, pTSpace->vOs.y, pTSpace->vOs.z};
float bitang[] = {pTSpace->vOt.x, pTSpace->vOt.y, pTSpace->vOt.z};
- if(pContext->m_pInterface->m_setTSpace!=NULL)
+ if (pContext->m_pInterface->m_setTSpace!=NULL)
pContext->m_pInterface->m_setTSpace(pContext, tang, bitang, pTSpace->fMagS, pTSpace->fMagT, pTSpace->bOrient, f, i);
- if(pContext->m_pInterface->m_setTSpaceBasic!=NULL)
+ if (pContext->m_pInterface->m_setTSpaceBasic!=NULL)
pContext->m_pInterface->m_setTSpaceBasic(pContext, tang, pTSpace->bOrient==TTRUE ? 1.0f : (-1.0f), f, i);
++index;
@@ -464,23 +464,23 @@ static void GenerateSharedVerticesIndexList(int piTriList_in_and_out[], const SM
int iMaxCount=0;
SVec3 vMin = GetPosition(pContext, 0), vMax = vMin, vDim;
float fMin, fMax;
- for(i=1; i<(iNrTrianglesIn*3); i++)
+ for (i=1; i<(iNrTrianglesIn*3); i++)
{
const int index = piTriList_in_and_out[i];
const SVec3 vP = GetPosition(pContext, index);
- if(vMin.x > vP.x) vMin.x = vP.x;
+ if (vMin.x > vP.x) vMin.x = vP.x;
else if(vMax.x < vP.x) vMax.x = vP.x;
- if(vMin.y > vP.y) vMin.y = vP.y;
+ if (vMin.y > vP.y) vMin.y = vP.y;
else if(vMax.y < vP.y) vMax.y = vP.y;
- if(vMin.z > vP.z) vMin.z = vP.z;
+ if (vMin.z > vP.z) vMin.z = vP.z;
else if(vMax.z < vP.z) vMax.z = vP.z;
}
vDim = vsub(vMax,vMin);
iChannel = 0;
fMin = vMin.x; fMax=vMax.x;
- if(vDim.y>vDim.x && vDim.y>vDim.z)
+ if (vDim.y>vDim.x && vDim.y>vDim.z)
{
iChannel=1;
fMin = vMin.y, fMax=vMax.y;
@@ -497,12 +497,12 @@ static void GenerateSharedVerticesIndexList(int piTriList_in_and_out[], const SM
piHashOffsets = (int *) malloc(sizeof(int)*g_iCells);
piHashCount2 = (int *) malloc(sizeof(int)*g_iCells);
- if(piHashTable==NULL || piHashCount==NULL || piHashOffsets==NULL || piHashCount2==NULL)
+ if (piHashTable==NULL || piHashCount==NULL || piHashOffsets==NULL || piHashCount2==NULL)
{
- if(piHashTable!=NULL) free(piHashTable);
- if(piHashCount!=NULL) free(piHashCount);
- if(piHashOffsets!=NULL) free(piHashOffsets);
- if(piHashCount2!=NULL) free(piHashCount2);
+ if (piHashTable!=NULL) free(piHashTable);
+ if (piHashCount!=NULL) free(piHashCount);
+ if (piHashOffsets!=NULL) free(piHashOffsets);
+ if (piHashCount2!=NULL) free(piHashCount2);
GenerateSharedVerticesIndexListSlow(piTriList_in_and_out, pContext, iNrTrianglesIn);
return;
}
@@ -510,7 +510,7 @@ static void GenerateSharedVerticesIndexList(int piTriList_in_and_out[], const SM
memset(piHashCount2, 0, sizeof(int)*g_iCells);
// count amount of elements in each cell unit
- for(i=0; i<(iNrTrianglesIn*3); i++)
+ for (i=0; i<(iNrTrianglesIn*3); i++)
{
const int index = piTriList_in_and_out[i];
const SVec3 vP = GetPosition(pContext, index);
@@ -521,11 +521,11 @@ static void GenerateSharedVerticesIndexList(int piTriList_in_and_out[], const SM
// evaluate start index of each cell.
piHashOffsets[0]=0;
- for(k=1; k<g_iCells; k++)
+ for (k=1; k<g_iCells; k++)
piHashOffsets[k]=piHashOffsets[k-1]+piHashCount[k-1];
// insert vertices
- for(i=0; i<(iNrTrianglesIn*3); i++)
+ for (i=0; i<(iNrTrianglesIn*3); i++)
{
const int index = piTriList_in_and_out[i];
const SVec3 vP = GetPosition(pContext, index);
@@ -538,29 +538,29 @@ static void GenerateSharedVerticesIndexList(int piTriList_in_and_out[], const SM
pTable[piHashCount2[iCell]] = i; // vertex i has been inserted.
++piHashCount2[iCell];
}
- for(k=0; k<g_iCells; k++)
+ for (k=0; k<g_iCells; k++)
assert(piHashCount2[k] == piHashCount[k]); // verify the count
free(piHashCount2);
// find maximum amount of entries in any hash entry
iMaxCount = piHashCount[0];
- for(k=1; k<g_iCells; k++)
- if(iMaxCount<piHashCount[k])
+ for (k=1; k<g_iCells; k++)
+ if (iMaxCount<piHashCount[k])
iMaxCount=piHashCount[k];
pTmpVert = (STmpVert *) malloc(sizeof(STmpVert)*iMaxCount);
// complete the merge
- for(k=0; k<g_iCells; k++)
+ for (k=0; k<g_iCells; k++)
{
// extract table of cell k and amount of entries in it
int * pTable = &piHashTable[piHashOffsets[k]];
const int iEntries = piHashCount[k];
- if(iEntries < 2) continue;
+ if (iEntries < 2) continue;
- if(pTmpVert!=NULL)
+ if (pTmpVert!=NULL)
{
- for(e=0; e<iEntries; e++)
+ for (e=0; e<iEntries; e++)
{
int i = pTable[e];
const SVec3 vP = GetPosition(pContext, piTriList_in_and_out[i]);
@@ -573,7 +573,7 @@ static void GenerateSharedVerticesIndexList(int piTriList_in_and_out[], const SM
MergeVertsSlow(piTriList_in_and_out, pContext, pTable, iEntries);
}
- if(pTmpVert!=NULL) { free(pTmpVert); }
+ if (pTmpVert!=NULL) { free(pTmpVert); }
free(piHashTable);
free(piHashCount);
free(piHashOffsets);
@@ -585,11 +585,11 @@ static void MergeVertsFast(int piTriList_in_and_out[], STmpVert pTmpVert[], cons
int c=0, l=0, channel=0;
float fvMin[3], fvMax[3];
float dx=0, dy=0, dz=0, fSep=0;
- for(c=0; c<3; c++)
+ for (c=0; c<3; c++)
{ fvMin[c]=pTmpVert[iL_in].vert[c]; fvMax[c]=fvMin[c]; }
- for(l=(iL_in+1); l<=iR_in; l++)
- for(c=0; c<3; c++)
- if(fvMin[c]>pTmpVert[l].vert[c]) fvMin[c]=pTmpVert[l].vert[c];
+ for (l=(iL_in+1); l<=iR_in; l++)
+ for (c=0; c<3; c++)
+ if (fvMin[c]>pTmpVert[l].vert[c]) fvMin[c]=pTmpVert[l].vert[c];
else if(fvMax[c]<pTmpVert[l].vert[c]) fvMax[c]=pTmpVert[l].vert[c];
dx = fvMax[0]-fvMin[0];
@@ -597,17 +597,17 @@ static void MergeVertsFast(int piTriList_in_and_out[], STmpVert pTmpVert[], cons
dz = fvMax[2]-fvMin[2];
channel = 0;
- if(dy>dx && dy>dz) channel=1;
+ if (dy>dx && dy>dz) channel=1;
else if(dz>dx) channel=2;
fSep = 0.5f*(fvMax[channel]+fvMin[channel]);
// terminate recursion when the separation/average value
// is no longer strictly between fMin and fMax values.
- if(fSep>=fvMax[channel] || fSep<=fvMin[channel])
+ if (fSep>=fvMax[channel] || fSep<=fvMin[channel])
{
// complete the weld
- for(l=iL_in; l<=iR_in; l++)
+ for (l=iL_in; l<=iR_in; l++)
{
int i = pTmpVert[l].index;
const int index = piTriList_in_and_out[i];
@@ -617,7 +617,7 @@ static void MergeVertsFast(int piTriList_in_and_out[], STmpVert pTmpVert[], cons
tbool bNotFound = TTRUE;
int l2=iL_in, i2rec=-1;
- while(l2<l && bNotFound)
+ while (l2<l && bNotFound)
{
const int i2 = pTmpVert[l2].index;
const int index2 = piTriList_in_and_out[i2];
@@ -627,7 +627,7 @@ static void MergeVertsFast(int piTriList_in_and_out[], STmpVert pTmpVert[], cons
i2rec=i2;
//if(vP==vP2 && vN==vN2 && vT==vT2)
- if(vP.x==vP2.x && vP.y==vP2.y && vP.z==vP2.z &&
+ if (vP.x==vP2.x && vP.y==vP2.y && vP.z==vP2.z &&
vN.x==vN2.x && vN.y==vN2.y && vN.z==vN2.z &&
vT.x==vT2.x && vT.y==vT2.y && vT.z==vT2.z)
bNotFound = TFALSE;
@@ -636,7 +636,7 @@ static void MergeVertsFast(int piTriList_in_and_out[], STmpVert pTmpVert[], cons
}
// merge if previously found
- if(!bNotFound)
+ if (!bNotFound)
piTriList_in_and_out[i] = piTriList_in_and_out[i2rec];
}
}
@@ -646,24 +646,24 @@ static void MergeVertsFast(int piTriList_in_and_out[], STmpVert pTmpVert[], cons
assert((iR_in-iL_in)>0); // at least 2 entries
// separate (by fSep) all points between iL_in and iR_in in pTmpVert[]
- while(iL < iR)
+ while (iL < iR)
{
tbool bReadyLeftSwap = TFALSE, bReadyRightSwap = TFALSE;
- while((!bReadyLeftSwap) && iL<iR)
+ while ((!bReadyLeftSwap) && iL<iR)
{
assert(iL>=iL_in && iL<=iR_in);
bReadyLeftSwap = !(pTmpVert[iL].vert[channel]<fSep);
- if(!bReadyLeftSwap) ++iL;
+ if (!bReadyLeftSwap) ++iL;
}
- while((!bReadyRightSwap) && iL<iR)
+ while ((!bReadyRightSwap) && iL<iR)
{
assert(iR>=iL_in && iR<=iR_in);
bReadyRightSwap = pTmpVert[iR].vert[channel]<fSep;
- if(!bReadyRightSwap) --iR;
+ if (!bReadyRightSwap) --iR;
}
assert( (iL<iR) || !(bReadyLeftSwap && bReadyRightSwap) );
- if(bReadyLeftSwap && bReadyRightSwap)
+ if (bReadyLeftSwap && bReadyRightSwap)
{
const STmpVert sTmp = pTmpVert[iL];
assert(iL<iR);
@@ -674,17 +674,17 @@ static void MergeVertsFast(int piTriList_in_and_out[], STmpVert pTmpVert[], cons
}
assert(iL==(iR+1) || (iL==iR));
- if(iL==iR)
+ if (iL==iR)
{
const tbool bReadyRightSwap = pTmpVert[iR].vert[channel]<fSep;
- if(bReadyRightSwap) ++iL;
+ if (bReadyRightSwap) ++iL;
else --iR;
}
// only need to weld when there is more than 1 instance of the (x,y,z)
- if(iL_in < iR)
+ if (iL_in < iR)
MergeVertsFast(piTriList_in_and_out, pTmpVert, pContext, iL_in, iR); // weld all left of fSep
- if(iL < iR_in)
+ if (iL < iR_in)
MergeVertsFast(piTriList_in_and_out, pTmpVert, pContext, iL, iR_in); // weld all right of (or equal to) fSep
}
}
@@ -693,7 +693,7 @@ static void MergeVertsSlow(int piTriList_in_and_out[], const SMikkTSpaceContext
{
// this can be optimized further using a tree structure or more hashing.
int e=0;
- for(e=0; e<iEntries; e++)
+ for (e=0; e<iEntries; e++)
{
int i = pTable[e];
const int index = piTriList_in_and_out[i];
@@ -703,7 +703,7 @@ static void MergeVertsSlow(int piTriList_in_and_out[], const SMikkTSpaceContext
tbool bNotFound = TTRUE;
int e2=0, i2rec=-1;
- while(e2<e && bNotFound)
+ while (e2<e && bNotFound)
{
const int i2 = pTable[e2];
const int index2 = piTriList_in_and_out[i2];
@@ -712,14 +712,14 @@ static void MergeVertsSlow(int piTriList_in_and_out[], const SMikkTSpaceContext
const SVec3 vT2 = GetTexCoord(pContext, index2);
i2rec = i2;
- if(veq(vP,vP2) && veq(vN,vN2) && veq(vT,vT2))
+ if (veq(vP,vP2) && veq(vN,vN2) && veq(vT,vT2))
bNotFound = TFALSE;
else
++e2;
}
// merge if previously found
- if(!bNotFound)
+ if (!bNotFound)
piTriList_in_and_out[i] = piTriList_in_and_out[i2rec];
}
}
@@ -727,9 +727,9 @@ static void MergeVertsSlow(int piTriList_in_and_out[], const SMikkTSpaceContext
static void GenerateSharedVerticesIndexListSlow(int piTriList_in_and_out[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn)
{
int iNumUniqueVerts = 0, t=0, i=0;
- for(t=0; t<iNrTrianglesIn; t++)
+ for (t=0; t<iNrTrianglesIn; t++)
{
- for(i=0; i<3; i++)
+ for (i=0; i<3; i++)
{
const int offs = t*3 + i;
const int index = piTriList_in_and_out[offs];
@@ -740,27 +740,27 @@ static void GenerateSharedVerticesIndexListSlow(int piTriList_in_and_out[], cons
tbool bFound = TFALSE;
int t2=0, index2rec=-1;
- while(!bFound && t2<=t)
+ while (!bFound && t2<=t)
{
int j=0;
- while(!bFound && j<3)
+ while (!bFound && j<3)
{
const int index2 = piTriList_in_and_out[t2*3 + j];
const SVec3 vP2 = GetPosition(pContext, index2);
const SVec3 vN2 = GetNormal(pContext, index2);
const SVec3 vT2 = GetTexCoord(pContext, index2);
- if(veq(vP,vP2) && veq(vN,vN2) && veq(vT,vT2))
+ if (veq(vP,vP2) && veq(vN,vN2) && veq(vT,vT2))
bFound = TTRUE;
else
++j;
}
- if(!bFound) ++t2;
+ if (!bFound) ++t2;
}
assert(bFound);
// if we found our own
- if(index2rec == index) { ++iNumUniqueVerts; }
+ if (index2rec == index) { ++iNumUniqueVerts; }
piTriList_in_and_out[offs] = index2rec;
}
@@ -771,15 +771,15 @@ static int GenerateInitialVerticesIndexList(STriInfo pTriInfos[], int piTriList_
{
int iTSpacesOffs = 0, f=0, t=0;
int iDstTriIndex = 0;
- for(f=0; f<pContext->m_pInterface->m_getNumFaces(pContext); f++)
+ for (f=0; f<pContext->m_pInterface->m_getNumFaces(pContext); f++)
{
const int verts = pContext->m_pInterface->m_getNumVerticesOfFace(pContext, f);
- if(verts!=3 && verts!=4) continue;
+ if (verts!=3 && verts!=4) continue;
pTriInfos[iDstTriIndex].iOrgFaceNumber = f;
pTriInfos[iDstTriIndex].iTSpacesOffs = iTSpacesOffs;
- if(verts==3)
+ if (verts==3)
{
unsigned char * pVerts = pTriInfos[iDstTriIndex].vert_num;
pVerts[0]=0; pVerts[1]=1; pVerts[2]=2;
@@ -810,7 +810,7 @@ static int GenerateInitialVerticesIndexList(STriInfo pTriInfos[], int piTriList_
const float distSQ_02 = LengthSquared(vsub(T2,T0));
const float distSQ_13 = LengthSquared(vsub(T3,T1));
tbool bQuadDiagIs_02;
- if(distSQ_02<distSQ_13)
+ if (distSQ_02<distSQ_13)
bQuadDiagIs_02 = TTRUE;
else if(distSQ_13<distSQ_02)
bQuadDiagIs_02 = TFALSE;
@@ -826,7 +826,7 @@ static int GenerateInitialVerticesIndexList(STriInfo pTriInfos[], int piTriList_
bQuadDiagIs_02 = distSQ_13<distSQ_02 ? TFALSE : TTRUE;
}
- if(bQuadDiagIs_02)
+ if (bQuadDiagIs_02)
{
{
unsigned char * pVerts_A = pTriInfos[iDstTriIndex].vert_num;
@@ -871,7 +871,7 @@ static int GenerateInitialVerticesIndexList(STriInfo pTriInfos[], int piTriList_
assert(iDstTriIndex<=iNrTrianglesIn);
}
- for(t=0; t<iNrTrianglesIn; t++)
+ for (t=0; t<iNrTrianglesIn; t++)
pTriInfos[t].iFlag = 0;
// return total amount of tspaces
@@ -946,8 +946,8 @@ static void InitTriInfo(STriInfo pTriInfos[], const int piTriListIn[], const SMi
// pTriInfos[f].iFlag is cleared in GenerateInitialVerticesIndexList() which is called before this function.
// generate neighbor info list
- for(f=0; f<iNrTrianglesIn; f++)
- for(i=0; i<3; i++)
+ for (f=0; f<iNrTrianglesIn; f++)
+ for (i=0; i<3; i++)
{
pTriInfos[f].FaceNeighbors[i] = -1;
pTriInfos[f].AssignedGroup[i] = NULL;
@@ -962,7 +962,7 @@ static void InitTriInfo(STriInfo pTriInfos[], const int piTriListIn[], const SMi
}
// evaluate first order derivatives
- for(f=0; f<iNrTrianglesIn; f++)
+ for (f=0; f<iNrTrianglesIn; f++)
{
// initial values
const SVec3 v1 = GetPosition(pContext, piTriListIn[f*3+0]);
@@ -986,47 +986,47 @@ static void InitTriInfo(STriInfo pTriInfos[], const int piTriListIn[], const SMi
pTriInfos[f].iFlag |= (fSignedAreaSTx2>0 ? ORIENT_PRESERVING : 0);
- if( NotZero(fSignedAreaSTx2) )
+ if ( NotZero(fSignedAreaSTx2) )
{
const float fAbsArea = fabsf(fSignedAreaSTx2);
const float fLenOs = Length(vOs);
const float fLenOt = Length(vOt);
const float fS = (pTriInfos[f].iFlag&ORIENT_PRESERVING)==0 ? (-1.0f) : 1.0f;
- if( NotZero(fLenOs) ) pTriInfos[f].vOs = vscale(fS/fLenOs, vOs);
- if( NotZero(fLenOt) ) pTriInfos[f].vOt = vscale(fS/fLenOt, vOt);
+ if ( NotZero(fLenOs) ) pTriInfos[f].vOs = vscale(fS/fLenOs, vOs);
+ if ( NotZero(fLenOt) ) pTriInfos[f].vOt = vscale(fS/fLenOt, vOt);
// evaluate magnitudes prior to normalization of vOs and vOt
pTriInfos[f].fMagS = fLenOs / fAbsArea;
pTriInfos[f].fMagT = fLenOt / fAbsArea;
// if this is a good triangle
- if( NotZero(pTriInfos[f].fMagS) && NotZero(pTriInfos[f].fMagT))
+ if ( NotZero(pTriInfos[f].fMagS) && NotZero(pTriInfos[f].fMagT))
pTriInfos[f].iFlag &= (~GROUP_WITH_ANY);
}
}
// force otherwise healthy quads to a fixed orientation
- while(t<(iNrTrianglesIn-1))
+ while (t<(iNrTrianglesIn-1))
{
const int iFO_a = pTriInfos[t].iOrgFaceNumber;
const int iFO_b = pTriInfos[t+1].iOrgFaceNumber;
- if(iFO_a==iFO_b) // this is a quad
+ if (iFO_a==iFO_b) // this is a quad
{
const tbool bIsDeg_a = (pTriInfos[t].iFlag&MARK_DEGENERATE)!=0 ? TTRUE : TFALSE;
const tbool bIsDeg_b = (pTriInfos[t+1].iFlag&MARK_DEGENERATE)!=0 ? TTRUE : TFALSE;
// bad triangles should already have been removed by
// DegenPrologue(), but just in case check bIsDeg_a and bIsDeg_a are false
- if((bIsDeg_a||bIsDeg_b)==TFALSE)
+ if ((bIsDeg_a||bIsDeg_b)==TFALSE)
{
const tbool bOrientA = (pTriInfos[t].iFlag&ORIENT_PRESERVING)!=0 ? TTRUE : TFALSE;
const tbool bOrientB = (pTriInfos[t+1].iFlag&ORIENT_PRESERVING)!=0 ? TTRUE : TFALSE;
// if this happens the quad has extremely bad mapping!!
- if(bOrientA!=bOrientB)
+ if (bOrientA!=bOrientB)
{
//printf("found quad with bad mapping\n");
tbool bChooseOrientFirstTri = TFALSE;
- if((pTriInfos[t+1].iFlag&GROUP_WITH_ANY)!=0) bChooseOrientFirstTri = TTRUE;
+ if ((pTriInfos[t+1].iFlag&GROUP_WITH_ANY)!=0) bChooseOrientFirstTri = TTRUE;
else if( CalcTexArea(pContext, &piTriListIn[t*3+0]) >= CalcTexArea(pContext, &piTriListIn[(t+1)*3+0]) )
bChooseOrientFirstTri = TTRUE;
@@ -1048,7 +1048,7 @@ static void InitTriInfo(STriInfo pTriInfos[], const int piTriListIn[], const SMi
// match up edge pairs
{
SEdge * pEdges = (SEdge *) malloc(sizeof(SEdge)*iNrTrianglesIn*3);
- if(pEdges==NULL)
+ if (pEdges==NULL)
BuildNeighborsSlow(pTriInfos, piTriListIn, iNrTrianglesIn);
else
{
@@ -1070,12 +1070,12 @@ static int Build4RuleGroups(STriInfo pTriInfos[], SGroup pGroups[], int piGroupT
const int iNrMaxGroups = iNrTrianglesIn*3;
int iNrActiveGroups = 0;
int iOffset = 0, f=0, i=0;
- for(f=0; f<iNrTrianglesIn; f++)
+ for (f=0; f<iNrTrianglesIn; f++)
{
- for(i=0; i<3; i++)
+ for (i=0; i<3; i++)
{
// if not assigned to a group
- if((pTriInfos[f].iFlag&GROUP_WITH_ANY)==0 && pTriInfos[f].AssignedGroup[i]==NULL)
+ if ((pTriInfos[f].iFlag&GROUP_WITH_ANY)==0 && pTriInfos[f].AssignedGroup[i]==NULL)
{
tbool bOrPre;
int neigh_indexL, neigh_indexR;
@@ -1092,7 +1092,7 @@ static int Build4RuleGroups(STriInfo pTriInfos[], SGroup pGroups[], int piGroupT
bOrPre = (pTriInfos[f].iFlag&ORIENT_PRESERVING)!=0 ? TTRUE : TFALSE;
neigh_indexL = pTriInfos[f].FaceNeighbors[i];
neigh_indexR = pTriInfos[f].FaceNeighbors[i>0?(i-1):2];
- if(neigh_indexL>=0) // neighbor
+ if (neigh_indexL>=0) // neighbor
{
const tbool bAnswer =
AssignRecur(piTriListIn, pTriInfos, neigh_indexL,
@@ -1102,7 +1102,7 @@ static int Build4RuleGroups(STriInfo pTriInfos[], SGroup pGroups[], int piGroupT
const tbool bDiff = bOrPre!=bOrPre2 ? TTRUE : TFALSE;
assert(bAnswer || bDiff);
}
- if(neigh_indexR>=0) // neighbor
+ if (neigh_indexR>=0) // neighbor
{
const tbool bAnswer =
AssignRecur(piTriListIn, pTriInfos, neigh_indexR,
@@ -1141,20 +1141,20 @@ static tbool AssignRecur(const int piTriListIn[], STriInfo psTriInfos[],
const int iVertRep = pGroup->iVertexRepresentitive;
const int * pVerts = &piTriListIn[3*iMyTriIndex+0];
int i=-1;
- if(pVerts[0]==iVertRep) i=0;
+ if (pVerts[0]==iVertRep) i=0;
else if(pVerts[1]==iVertRep) i=1;
else if(pVerts[2]==iVertRep) i=2;
assert(i>=0 && i<3);
// early out
- if(pMyTriInfo->AssignedGroup[i] == pGroup) return TTRUE;
+ if (pMyTriInfo->AssignedGroup[i] == pGroup) return TTRUE;
else if(pMyTriInfo->AssignedGroup[i]!=NULL) return TFALSE;
- if((pMyTriInfo->iFlag&GROUP_WITH_ANY)!=0)
+ if ((pMyTriInfo->iFlag&GROUP_WITH_ANY)!=0)
{
// first to group with a group-with-anything triangle
// determines it's orientation.
// This is the only existing order dependency in the code!!
- if( pMyTriInfo->AssignedGroup[0] == NULL &&
+ if ( pMyTriInfo->AssignedGroup[0] == NULL &&
pMyTriInfo->AssignedGroup[1] == NULL &&
pMyTriInfo->AssignedGroup[2] == NULL )
{
@@ -1164,7 +1164,7 @@ static tbool AssignRecur(const int piTriListIn[], STriInfo psTriInfos[],
}
{
const tbool bOrient = (pMyTriInfo->iFlag&ORIENT_PRESERVING)!=0 ? TTRUE : TFALSE;
- if(bOrient != pGroup->bOrientPreservering) return TFALSE;
+ if (bOrient != pGroup->bOrientPreservering) return TFALSE;
}
AddTriToGroup(pGroup, iMyTriIndex);
@@ -1173,9 +1173,9 @@ static tbool AssignRecur(const int piTriListIn[], STriInfo psTriInfos[],
{
const int neigh_indexL = pMyTriInfo->FaceNeighbors[i];
const int neigh_indexR = pMyTriInfo->FaceNeighbors[i>0?(i-1):2];
- if(neigh_indexL>=0)
+ if (neigh_indexL>=0)
AssignRecur(piTriListIn, psTriInfos, neigh_indexL, pGroup);
- if(neigh_indexR>=0)
+ if (neigh_indexR>=0)
AssignRecur(piTriListIn, psTriInfos, neigh_indexR, pGroup);
}
@@ -1199,39 +1199,39 @@ static tbool GenerateTSpaces(STSpace psTspace[], const STriInfo pTriInfos[], con
SSubGroup * pUniSubGroups = NULL;
int * pTmpMembers = NULL;
int iMaxNrFaces=0, iUniqueTspaces=0, g=0, i=0;
- for(g=0; g<iNrActiveGroups; g++)
- if(iMaxNrFaces < pGroups[g].iNrFaces)
+ for (g=0; g<iNrActiveGroups; g++)
+ if (iMaxNrFaces < pGroups[g].iNrFaces)
iMaxNrFaces = pGroups[g].iNrFaces;
- if(iMaxNrFaces == 0) return TTRUE;
+ if (iMaxNrFaces == 0) return TTRUE;
// make initial allocations
pSubGroupTspace = (STSpace *) malloc(sizeof(STSpace)*iMaxNrFaces);
pUniSubGroups = (SSubGroup *) malloc(sizeof(SSubGroup)*iMaxNrFaces);
pTmpMembers = (int *) malloc(sizeof(int)*iMaxNrFaces);
- if(pSubGroupTspace==NULL || pUniSubGroups==NULL || pTmpMembers==NULL)
+ if (pSubGroupTspace==NULL || pUniSubGroups==NULL || pTmpMembers==NULL)
{
- if(pSubGroupTspace!=NULL) free(pSubGroupTspace);
- if(pUniSubGroups!=NULL) free(pUniSubGroups);
- if(pTmpMembers!=NULL) free(pTmpMembers);
+ if (pSubGroupTspace!=NULL) free(pSubGroupTspace);
+ if (pUniSubGroups!=NULL) free(pUniSubGroups);
+ if (pTmpMembers!=NULL) free(pTmpMembers);
return TFALSE;
}
iUniqueTspaces = 0;
- for(g=0; g<iNrActiveGroups; g++)
+ for (g=0; g<iNrActiveGroups; g++)
{
const SGroup * pGroup = &pGroups[g];
int iUniqueSubGroups = 0, s=0;
- for(i=0; i<pGroup->iNrFaces; i++) // triangles
+ for (i=0; i<pGroup->iNrFaces; i++) // triangles
{
const int f = pGroup->pFaceIndices[i]; // triangle number
int index=-1, iVertIndex=-1, iOF_1=-1, iMembers=0, j=0, l=0;
SSubGroup tmp_group;
tbool bFound;
SVec3 n, vOs, vOt;
- if(pTriInfos[f].AssignedGroup[0]==pGroup) index=0;
+ if (pTriInfos[f].AssignedGroup[0]==pGroup) index=0;
else if(pTriInfos[f].AssignedGroup[1]==pGroup) index=1;
else if(pTriInfos[f].AssignedGroup[2]==pGroup) index=2;
assert(index>=0 && index<3);
@@ -1245,14 +1245,14 @@ static tbool GenerateTSpaces(STSpace psTspace[], const STriInfo pTriInfos[], con
// project
vOs = vsub(pTriInfos[f].vOs, vscale(vdot(n,pTriInfos[f].vOs), n));
vOt = vsub(pTriInfos[f].vOt, vscale(vdot(n,pTriInfos[f].vOt), n));
- if( VNotZero(vOs) ) vOs = Normalize(vOs);
- if( VNotZero(vOt) ) vOt = Normalize(vOt);
+ if ( VNotZero(vOs) ) vOs = Normalize(vOs);
+ if ( VNotZero(vOt) ) vOt = Normalize(vOt);
// original face number
iOF_1 = pTriInfos[f].iOrgFaceNumber;
iMembers = 0;
- for(j=0; j<pGroup->iNrFaces; j++)
+ for (j=0; j<pGroup->iNrFaces; j++)
{
const int t = pGroup->pFaceIndices[j]; // triangle number
const int iOF_2 = pTriInfos[t].iOrgFaceNumber;
@@ -1260,8 +1260,8 @@ static tbool GenerateTSpaces(STSpace psTspace[], const STriInfo pTriInfos[], con
// project
SVec3 vOs2 = vsub(pTriInfos[t].vOs, vscale(vdot(n,pTriInfos[t].vOs), n));
SVec3 vOt2 = vsub(pTriInfos[t].vOt, vscale(vdot(n,pTriInfos[t].vOt), n));
- if( VNotZero(vOs2) ) vOs2 = Normalize(vOs2);
- if( VNotZero(vOt2) ) vOt2 = Normalize(vOt2);
+ if ( VNotZero(vOs2) ) vOs2 = Normalize(vOs2);
+ if ( VNotZero(vOt2) ) vOt2 = Normalize(vOt2);
{
const tbool bAny = ( (pTriInfos[f].iFlag | pTriInfos[t].iFlag) & GROUP_WITH_ANY )!=0 ? TTRUE : TFALSE;
@@ -1272,7 +1272,7 @@ static tbool GenerateTSpaces(STSpace psTspace[], const STriInfo pTriInfos[], con
const float fCosT = vdot(vOt,vOt2);
assert(f!=t || bSameOrgFace); // sanity check
- if(bAny || bSameOrgFace || (fCosS>fThresCos && fCosT>fThresCos))
+ if (bAny || bSameOrgFace || (fCosS>fThresCos && fCosT>fThresCos))
pTmpMembers[iMembers++] = t;
}
}
@@ -1280,7 +1280,7 @@ static tbool GenerateTSpaces(STSpace psTspace[], const STriInfo pTriInfos[], con
// sort pTmpMembers
tmp_group.iNrFaces = iMembers;
tmp_group.pTriMembers = pTmpMembers;
- if(iMembers>1)
+ if (iMembers>1)
{
unsigned int uSeed = INTERNAL_RND_SORT_SEED; // could replace with a random seed?
QuickSort(pTmpMembers, 0, iMembers-1, uSeed);
@@ -1289,10 +1289,10 @@ static tbool GenerateTSpaces(STSpace psTspace[], const STriInfo pTriInfos[], con
// look for an existing match
bFound = TFALSE;
l=0;
- while(l<iUniqueSubGroups && !bFound)
+ while (l<iUniqueSubGroups && !bFound)
{
bFound = CompareSubGroups(&tmp_group, &pUniSubGroups[l]);
- if(!bFound) ++l;
+ if (!bFound) ++l;
}
// assign tangent space index
@@ -1300,15 +1300,15 @@ static tbool GenerateTSpaces(STSpace psTspace[], const STriInfo pTriInfos[], con
//piTempTangIndices[f*3+index] = iUniqueTspaces+l;
// if no match was found we allocate a new subgroup
- if(!bFound)
+ if (!bFound)
{
// insert new subgroup
int * pIndices = (int *) malloc(sizeof(int)*iMembers);
- if(pIndices==NULL)
+ if (pIndices==NULL)
{
// clean up and return false
int s=0;
- for(s=0; s<iUniqueSubGroups; s++)
+ for (s=0; s<iUniqueSubGroups; s++)
free(pUniSubGroups[s].pTriMembers);
free(pUniSubGroups);
free(pTmpMembers);
@@ -1330,7 +1330,7 @@ static tbool GenerateTSpaces(STSpace psTspace[], const STriInfo pTriInfos[], con
STSpace * pTS_out = &psTspace[iOffs+iVert];
assert(pTS_out->iCounter<2);
assert(((pTriInfos[f].iFlag&ORIENT_PRESERVING)!=0) == pGroup->bOrientPreservering);
- if(pTS_out->iCounter==1)
+ if (pTS_out->iCounter==1)
{
*pTS_out = AvgTSpace(pTS_out, &pSubGroupTspace[l]);
pTS_out->iCounter = 2; // update counter
@@ -1347,7 +1347,7 @@ static tbool GenerateTSpaces(STSpace psTspace[], const STriInfo pTriInfos[], con
}
// clean up and offset iUniqueTspaces
- for(s=0; s<iUniqueSubGroups; s++)
+ for (s=0; s<iUniqueSubGroups; s++)
free(pUniSubGroups[s].pTriMembers);
iUniqueTspaces += iUniqueSubGroups;
}
@@ -1370,17 +1370,17 @@ static STSpace EvalTspace(int face_indices[], const int iFaces, const int piTriL
res.vOt.x=0.0f; res.vOt.y=0.0f; res.vOt.z=0.0f;
res.fMagS = 0; res.fMagT = 0;
- for(face=0; face<iFaces; face++)
+ for (face=0; face<iFaces; face++)
{
const int f = face_indices[face];
// only valid triangles get to add their contribution
- if( (pTriInfos[f].iFlag&GROUP_WITH_ANY)==0 )
+ if ( (pTriInfos[f].iFlag&GROUP_WITH_ANY)==0 )
{
SVec3 n, vOs, vOt, p0, p1, p2, v1, v2;
float fCos, fAngle, fMagS, fMagT;
int i=-1, index=-1, i0=-1, i1=-1, i2=-1;
- if(piTriListIn[3*f+0]==iVertexRepresentitive) i=0;
+ if (piTriListIn[3*f+0]==iVertexRepresentitive) i=0;
else if(piTriListIn[3*f+1]==iVertexRepresentitive) i=1;
else if(piTriListIn[3*f+2]==iVertexRepresentitive) i=2;
assert(i>=0 && i<3);
@@ -1390,8 +1390,8 @@ static STSpace EvalTspace(int face_indices[], const int iFaces, const int piTriL
n = GetNormal(pContext, index);
vOs = vsub(pTriInfos[f].vOs, vscale(vdot(n,pTriInfos[f].vOs), n));
vOt = vsub(pTriInfos[f].vOt, vscale(vdot(n,pTriInfos[f].vOt), n));
- if( VNotZero(vOs) ) vOs = Normalize(vOs);
- if( VNotZero(vOt) ) vOt = Normalize(vOt);
+ if ( VNotZero(vOs) ) vOs = Normalize(vOs);
+ if ( VNotZero(vOt) ) vOt = Normalize(vOt);
i2 = piTriListIn[3*f + (i<2?(i+1):0)];
i1 = piTriListIn[3*f + i];
@@ -1423,9 +1423,9 @@ static STSpace EvalTspace(int face_indices[], const int iFaces, const int piTriL
}
// normalize
- if( VNotZero(res.vOs) ) res.vOs = Normalize(res.vOs);
- if( VNotZero(res.vOt) ) res.vOt = Normalize(res.vOt);
- if(fAngleSum>0)
+ if ( VNotZero(res.vOs) ) res.vOs = Normalize(res.vOs);
+ if ( VNotZero(res.vOt) ) res.vOt = Normalize(res.vOt);
+ if (fAngleSum>0)
{
res.fMagS /= fAngleSum;
res.fMagT /= fAngleSum;
@@ -1438,11 +1438,11 @@ static tbool CompareSubGroups(const SSubGroup * pg1, const SSubGroup * pg2)
{
tbool bStillSame=TTRUE;
int i=0;
- if(pg1->iNrFaces!=pg2->iNrFaces) return TFALSE;
- while(i<pg1->iNrFaces && bStillSame)
+ if (pg1->iNrFaces!=pg2->iNrFaces) return TFALSE;
+ while (i<pg1->iNrFaces && bStillSame)
{
bStillSame = pg1->pTriMembers[i]==pg2->pTriMembers[i] ? TTRUE : TFALSE;
- if(bStillSame) ++i;
+ if (bStillSame) ++i;
}
return bStillSame;
}
@@ -1467,12 +1467,12 @@ static void QuickSort(int* pSortBuffer, int iLeft, int iRight, unsigned int uSee
do
{
- while(pSortBuffer[iL] < iMid)
+ while (pSortBuffer[iL] < iMid)
++iL;
- while(pSortBuffer[iR] > iMid)
+ while (pSortBuffer[iR] > iMid)
--iR;
- if(iL <= iR)
+ if (iL <= iR)
{
iTmp = pSortBuffer[iL];
pSortBuffer[iL] = pSortBuffer[iR];
@@ -1480,11 +1480,11 @@ static void QuickSort(int* pSortBuffer, int iLeft, int iRight, unsigned int uSee
++iL; --iR;
}
}
- while(iL <= iR);
+ while (iL <= iR);
- if(iLeft < iR)
+ if (iLeft < iR)
QuickSort(pSortBuffer, iLeft, iR, uSeed);
- if(iL < iRight)
+ if (iL < iRight)
QuickSort(pSortBuffer, iL, iRight, uSeed);
}
@@ -1499,8 +1499,8 @@ static void BuildNeighborsFast(STriInfo pTriInfos[], SEdge * pEdges, const int p
// build array of edges
unsigned int uSeed = INTERNAL_RND_SORT_SEED; // could replace with a random seed?
int iEntries=0, iCurStartIndex=-1, f=0, i=0;
- for(f=0; f<iNrTrianglesIn; f++)
- for(i=0; i<3; i++)
+ for (f=0; f<iNrTrianglesIn; f++)
+ for (i=0; i<3; i++)
{
const int i0 = piTriListIn[f*3+i];
const int i1 = piTriListIn[f*3+(i<2?(i+1):0)];
@@ -1517,9 +1517,9 @@ static void BuildNeighborsFast(STriInfo pTriInfos[], SEdge * pEdges, const int p
// with i0 as msb in the quicksort call above.
iEntries = iNrTrianglesIn*3;
iCurStartIndex = 0;
- for(i=1; i<iEntries; i++)
+ for (i=1; i<iEntries; i++)
{
- if(pEdges[iCurStartIndex].i0 != pEdges[i].i0)
+ if (pEdges[iCurStartIndex].i0 != pEdges[i].i0)
{
const int iL = iCurStartIndex;
const int iR = i-1;
@@ -1533,9 +1533,9 @@ static void BuildNeighborsFast(STriInfo pTriInfos[], SEdge * pEdges, const int p
// this step is to remain compliant with BuildNeighborsSlow() when
// more than 2 triangles use the same edge (such as a butterfly topology).
iCurStartIndex = 0;
- for(i=1; i<iEntries; i++)
+ for (i=1; i<iEntries; i++)
{
- if(pEdges[iCurStartIndex].i0 != pEdges[i].i0 || pEdges[iCurStartIndex].i1 != pEdges[i].i1)
+ if (pEdges[iCurStartIndex].i0 != pEdges[i].i0 || pEdges[iCurStartIndex].i1 != pEdges[i].i1)
{
const int iL = iCurStartIndex;
const int iR = i-1;
@@ -1546,7 +1546,7 @@ static void BuildNeighborsFast(STriInfo pTriInfos[], SEdge * pEdges, const int p
}
// pair up, adjacent triangles
- for(i=0; i<iEntries; i++)
+ for (i=0; i<iEntries; i++)
{
const int i0=pEdges[i].i0;
const int i1=pEdges[i].i1;
@@ -1558,12 +1558,12 @@ static void BuildNeighborsFast(STriInfo pTriInfos[], SEdge * pEdges, const int p
GetEdge(&i0_A, &i1_A, &edgenum_A, &piTriListIn[f*3], i0, i1); // resolve index ordering and edge_num
bUnassigned_A = pTriInfos[f].FaceNeighbors[edgenum_A] == -1 ? TTRUE : TFALSE;
- if(bUnassigned_A)
+ if (bUnassigned_A)
{
// get true index ordering
int j=i+1, t;
tbool bNotFound = TTRUE;
- while(j<iEntries && i0==pEdges[j].i0 && i1==pEdges[j].i1 && bNotFound)
+ while (j<iEntries && i0==pEdges[j].i0 && i1==pEdges[j].i1 && bNotFound)
{
tbool bUnassigned_B;
int i0_B, i1_B;
@@ -1572,13 +1572,13 @@ static void BuildNeighborsFast(STriInfo pTriInfos[], SEdge * pEdges, const int p
GetEdge(&i1_B, &i0_B, &edgenum_B, &piTriListIn[t*3], pEdges[j].i0, pEdges[j].i1); // resolve index ordering and edge_num
//assert(!(i0_A==i1_B && i1_A==i0_B));
bUnassigned_B = pTriInfos[t].FaceNeighbors[edgenum_B]==-1 ? TTRUE : TFALSE;
- if(i0_A==i0_B && i1_A==i1_B && bUnassigned_B)
+ if (i0_A==i0_B && i1_A==i1_B && bUnassigned_B)
bNotFound = TFALSE;
else
++j;
}
- if(!bNotFound)
+ if (!bNotFound)
{
int t = pEdges[j].f;
pTriInfos[f].FaceNeighbors[edgenum_A] = t;
@@ -1592,12 +1592,12 @@ static void BuildNeighborsFast(STriInfo pTriInfos[], SEdge * pEdges, const int p
static void BuildNeighborsSlow(STriInfo pTriInfos[], const int piTriListIn[], const int iNrTrianglesIn)
{
int f=0, i=0;
- for(f=0; f<iNrTrianglesIn; f++)
+ for (f=0; f<iNrTrianglesIn; f++)
{
- for(i=0; i<3; i++)
+ for (i=0; i<3; i++)
{
// if unassigned
- if(pTriInfos[f].FaceNeighbors[i] == -1)
+ if (pTriInfos[f].FaceNeighbors[i] == -1)
{
const int i0_A = piTriListIn[f*3+i];
const int i1_A = piTriListIn[f*3+(i<2?(i+1):0)];
@@ -1605,29 +1605,29 @@ static void BuildNeighborsSlow(STriInfo pTriInfos[], const int piTriListIn[], co
// search for a neighbor
tbool bFound = TFALSE;
int t=0, j=0;
- while(!bFound && t<iNrTrianglesIn)
+ while (!bFound && t<iNrTrianglesIn)
{
- if(t!=f)
+ if (t!=f)
{
j=0;
- while(!bFound && j<3)
+ while (!bFound && j<3)
{
// in rev order
const int i1_B = piTriListIn[t*3+j];
const int i0_B = piTriListIn[t*3+(j<2?(j+1):0)];
//assert(!(i0_A==i1_B && i1_A==i0_B));
- if(i0_A==i0_B && i1_A==i1_B)
+ if (i0_A==i0_B && i1_A==i1_B)
bFound = TTRUE;
else
++j;
}
}
- if(!bFound) ++t;
+ if (!bFound) ++t;
}
// assign neighbors
- if(bFound)
+ if (bFound)
{
pTriInfos[f].FaceNeighbors[i] = t;
//assert(pTriInfos[t].FaceNeighbors[j]==-1);
@@ -1646,10 +1646,10 @@ static void QuickSortEdges(SEdge * pSortBuffer, int iLeft, int iRight, const int
// early out
SEdge sTmp;
const int iElems = iRight-iLeft+1;
- if(iElems<2) return;
+ if (iElems<2) return;
else if(iElems==2)
{
- if(pSortBuffer[iLeft].array[channel] > pSortBuffer[iRight].array[channel])
+ if (pSortBuffer[iLeft].array[channel] > pSortBuffer[iRight].array[channel])
{
sTmp = pSortBuffer[iLeft];
pSortBuffer[iLeft] = pSortBuffer[iRight];
@@ -1673,12 +1673,12 @@ static void QuickSortEdges(SEdge * pSortBuffer, int iLeft, int iRight, const int
do
{
- while(pSortBuffer[iL].array[channel] < iMid)
+ while (pSortBuffer[iL].array[channel] < iMid)
++iL;
- while(pSortBuffer[iR].array[channel] > iMid)
+ while (pSortBuffer[iR].array[channel] > iMid)
--iR;
- if(iL <= iR)
+ if (iL <= iR)
{
sTmp = pSortBuffer[iL];
pSortBuffer[iL] = pSortBuffer[iR];
@@ -1686,11 +1686,11 @@ static void QuickSortEdges(SEdge * pSortBuffer, int iLeft, int iRight, const int
++iL; --iR;
}
}
- while(iL <= iR);
+ while (iL <= iR);
- if(iLeft < iR)
+ if (iLeft < iR)
QuickSortEdges(pSortBuffer, iLeft, iR, channel, uSeed);
- if(iL < iRight)
+ if (iL < iRight)
QuickSortEdges(pSortBuffer, iL, iRight, channel, uSeed);
}
@@ -1700,10 +1700,10 @@ static void GetEdge(int * i0_out, int * i1_out, int * edgenum_out, const int ind
*edgenum_out = -1;
// test if first index is on the edge
- if(indices[0]==i0_in || indices[0]==i1_in)
+ if (indices[0]==i0_in || indices[0]==i1_in)
{
// test if second index is on the edge
- if(indices[1]==i0_in || indices[1]==i1_in)
+ if (indices[1]==i0_in || indices[1]==i1_in)
{
edgenum_out[0]=0; // first edge
i0_out[0]=indices[0];
@@ -1736,15 +1736,15 @@ static void DegenPrologue(STriInfo pTriInfos[], int piTriList_out[], const int i
// locate quads with only one good triangle
int t=0;
- while(t<(iTotTris-1))
+ while (t<(iTotTris-1))
{
const int iFO_a = pTriInfos[t].iOrgFaceNumber;
const int iFO_b = pTriInfos[t+1].iOrgFaceNumber;
- if(iFO_a==iFO_b) // this is a quad
+ if (iFO_a==iFO_b) // this is a quad
{
const tbool bIsDeg_a = (pTriInfos[t].iFlag&MARK_DEGENERATE)!=0 ? TTRUE : TFALSE;
const tbool bIsDeg_b = (pTriInfos[t+1].iFlag&MARK_DEGENERATE)!=0 ? TTRUE : TFALSE;
- if((bIsDeg_a^bIsDeg_b)!=0)
+ if ((bIsDeg_a^bIsDeg_b)!=0)
{
pTriInfos[t].iFlag |= QUAD_ONE_DEGEN_TRI;
pTriInfos[t+1].iFlag |= QUAD_ONE_DEGEN_TRI;
@@ -1760,12 +1760,12 @@ static void DegenPrologue(STriInfo pTriInfos[], int piTriList_out[], const int i
iNextGoodTriangleSearchIndex = 1;
t=0;
bStillFindingGoodOnes = TTRUE;
- while(t<iNrTrianglesIn && bStillFindingGoodOnes)
+ while (t<iNrTrianglesIn && bStillFindingGoodOnes)
{
const tbool bIsGood = (pTriInfos[t].iFlag&MARK_DEGENERATE)==0 ? TTRUE : TFALSE;
- if(bIsGood)
+ if (bIsGood)
{
- if(iNextGoodTriangleSearchIndex < (t+2))
+ if (iNextGoodTriangleSearchIndex < (t+2))
iNextGoodTriangleSearchIndex = t+2;
}
else
@@ -1773,10 +1773,10 @@ static void DegenPrologue(STriInfo pTriInfos[], int piTriList_out[], const int i
int t0, t1;
// search for the first good triangle.
tbool bJustADegenerate = TTRUE;
- while(bJustADegenerate && iNextGoodTriangleSearchIndex<iTotTris)
+ while (bJustADegenerate && iNextGoodTriangleSearchIndex<iTotTris)
{
const tbool bIsGood = (pTriInfos[iNextGoodTriangleSearchIndex].iFlag&MARK_DEGENERATE)==0 ? TTRUE : TFALSE;
- if(bIsGood) bJustADegenerate=TFALSE;
+ if (bIsGood) bJustADegenerate=TFALSE;
else ++iNextGoodTriangleSearchIndex;
}
@@ -1786,10 +1786,10 @@ static void DegenPrologue(STriInfo pTriInfos[], int piTriList_out[], const int i
assert(iNextGoodTriangleSearchIndex > (t+1));
// swap triangle t0 and t1
- if(!bJustADegenerate)
+ if (!bJustADegenerate)
{
int i=0;
- for(i=0; i<3; i++)
+ for (i=0; i<3; i++)
{
const int index = piTriList_out[t0*3+i];
piTriList_out[t0*3+i] = piTriList_out[t1*3+i];
@@ -1805,7 +1805,7 @@ static void DegenPrologue(STriInfo pTriInfos[], int piTriList_out[], const int i
bStillFindingGoodOnes = TFALSE; // this is not supposed to happen
}
- if(bStillFindingGoodOnes) ++t;
+ if (bStillFindingGoodOnes) ++t;
}
assert(bStillFindingGoodOnes); // code will still work.
@@ -1817,28 +1817,28 @@ static void DegenEpilogue(STSpace psTspace[], STriInfo pTriInfos[], int piTriLis
int t=0, i=0;
// deal with degenerate triangles
// punishment for degenerate triangles is O(N^2)
- for(t=iNrTrianglesIn; t<iTotTris; t++)
+ for (t=iNrTrianglesIn; t<iTotTris; t++)
{
// degenerate triangles on a quad with one good triangle are skipped
// here but processed in the next loop
const tbool bSkip = (pTriInfos[t].iFlag&QUAD_ONE_DEGEN_TRI)!=0 ? TTRUE : TFALSE;
- if(!bSkip)
+ if (!bSkip)
{
- for(i=0; i<3; i++)
+ for (i=0; i<3; i++)
{
const int index1 = piTriListIn[t*3+i];
// search through the good triangles
tbool bNotFound = TTRUE;
int j=0;
- while(bNotFound && j<(3*iNrTrianglesIn))
+ while (bNotFound && j<(3*iNrTrianglesIn))
{
const int index2 = piTriListIn[j];
- if(index1==index2) bNotFound=TFALSE;
+ if (index1==index2) bNotFound=TFALSE;
else ++j;
}
- if(!bNotFound)
+ if (!bNotFound)
{
const int iTri = j/3;
const int iVert = j%3;
@@ -1855,11 +1855,11 @@ static void DegenEpilogue(STSpace psTspace[], STriInfo pTriInfos[], int piTriLis
}
// deal with degenerate quads with one good triangle
- for(t=0; t<iNrTrianglesIn; t++)
+ for (t=0; t<iNrTrianglesIn; t++)
{
// this triangle belongs to a quad where the
// other triangle is degenerate
- if( (pTriInfos[t].iFlag&QUAD_ONE_DEGEN_TRI)!=0 )
+ if ( (pTriInfos[t].iFlag&QUAD_ONE_DEGEN_TRI)!=0 )
{
SVec3 vDstP;
int iOrgF=-1, i=0;
@@ -1867,7 +1867,7 @@ static void DegenEpilogue(STSpace psTspace[], STriInfo pTriInfos[], int piTriLis
unsigned char * pV = pTriInfos[t].vert_num;
int iFlag = (1<<pV[0]) | (1<<pV[1]) | (1<<pV[2]);
int iMissingIndex = 0;
- if((iFlag&2)==0) iMissingIndex=1;
+ if ((iFlag&2)==0) iMissingIndex=1;
else if((iFlag&4)==0) iMissingIndex=2;
else if((iFlag&8)==0) iMissingIndex=3;
@@ -1875,11 +1875,11 @@ static void DegenEpilogue(STSpace psTspace[], STriInfo pTriInfos[], int piTriLis
vDstP = GetPosition(pContext, MakeIndex(iOrgF, iMissingIndex));
bNotFound = TTRUE;
i=0;
- while(bNotFound && i<3)
+ while (bNotFound && i<3)
{
const int iVert = pV[i];
const SVec3 vSrcP = GetPosition(pContext, MakeIndex(iOrgF, iVert));
- if(veq(vSrcP, vDstP)==TTRUE)
+ if (veq(vSrcP, vDstP)==TTRUE)
{
const int iOffs = pTriInfos[t].iTSpacesOffs;
psTspace[iOffs+iMissingIndex] = psTspace[iOffs+iVert];
diff --git a/intern/smoke/extern/smoke_API.h b/intern/smoke/extern/smoke_API.h
index 9d5dfd98823..a0eb1bf38e0 100644
--- a/intern/smoke/extern/smoke_API.h
+++ b/intern/smoke/extern/smoke_API.h
@@ -41,11 +41,11 @@ struct FLUID_3D;
void smoke_export(struct FLUID_3D *fluid, float *dt, float *dx, float **dens, float **densold, float **heat, float **heatold, float **vx, float **vy, float **vz, float **vxold, float **vyold, float **vzold, unsigned char **obstacles);
// low res
-struct FLUID_3D *smoke_init(int *res, float *p0);
+struct FLUID_3D *smoke_init(int *res, float *p0, float dtdef);
void smoke_free(struct FLUID_3D *fluid);
void smoke_initBlenderRNA(struct FLUID_3D *fluid, float *alpha, float *beta, float *dt_factor, float *vorticity, int *border_colli);
-void smoke_step(struct FLUID_3D *fluid, size_t framenr, float fps);
+void smoke_step(struct FLUID_3D *fluid, float dtSubdiv);
float *smoke_get_density(struct FLUID_3D *fluid);
float *smoke_get_heat(struct FLUID_3D *fluid);
@@ -53,6 +53,9 @@ float *smoke_get_velocity_x(struct FLUID_3D *fluid);
float *smoke_get_velocity_y(struct FLUID_3D *fluid);
float *smoke_get_velocity_z(struct FLUID_3D *fluid);
+/* Moving obstacle velocity provided by blender */
+void smoke_get_ob_velocity(struct FLUID_3D *fluid, float **x, float **y, float **z);
+
float *smoke_get_force_x(struct FLUID_3D *fluid);
float *smoke_get_force_y(struct FLUID_3D *fluid);
float *smoke_get_force_z(struct FLUID_3D *fluid);
diff --git a/intern/smoke/intern/FLUID_3D.cpp b/intern/smoke/intern/FLUID_3D.cpp
index 9f036cc6d2f..04971f898e9 100644
--- a/intern/smoke/intern/FLUID_3D.cpp
+++ b/intern/smoke/intern/FLUID_3D.cpp
@@ -34,6 +34,8 @@
#include "SPHERE.h"
#include <zlib.h>
+#include "float.h"
+
#if PARALLEL==1
#include <omp.h>
#endif // PARALLEL
@@ -42,11 +44,11 @@
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
-FLUID_3D::FLUID_3D(int *res, float *p0) :
+FLUID_3D::FLUID_3D(int *res, float *p0, float dtdef) :
_xRes(res[0]), _yRes(res[1]), _zRes(res[2]), _res(0.0f)
{
// set simulation consts
- _dt = DT_DEFAULT; // just in case. set in step from a RNA factor
+ _dt = dtdef; // just in case. set in step from a RNA factor
// start point of array
_p0[0] = p0[0];
@@ -81,6 +83,9 @@ FLUID_3D::FLUID_3D(int *res, float *p0) :
_xVelocity = new float[_totalCells];
_yVelocity = new float[_totalCells];
_zVelocity = new float[_totalCells];
+ _xVelocityOb = new float[_totalCells];
+ _yVelocityOb = new float[_totalCells];
+ _zVelocityOb = new float[_totalCells];
_xVelocityOld = new float[_totalCells];
_yVelocityOld = new float[_totalCells];
_zVelocityOld = new float[_totalCells];
@@ -111,6 +116,9 @@ FLUID_3D::FLUID_3D(int *res, float *p0) :
_xVelocity[x] = 0.0f;
_yVelocity[x] = 0.0f;
_zVelocity[x] = 0.0f;
+ _xVelocityOb[x] = 0.0f;
+ _yVelocityOb[x] = 0.0f;
+ _zVelocityOb[x] = 0.0f;
_xVelocityOld[x] = 0.0f;
_yVelocityOld[x] = 0.0f;
_zVelocityOld[x] = 0.0f;
@@ -131,9 +139,15 @@ FLUID_3D::FLUID_3D(int *res, float *p0) :
_colloPrev = 1; // default value
+ setBorderObstacles(); // walls
+
+}
+void FLUID_3D::setBorderObstacles()
+{
+
// set side obstacles
- int index;
+ unsigned int index;
for (int y = 0; y < _yRes; y++)
for (int x = 0; x < _xRes; x++)
{
@@ -169,7 +183,6 @@ FLUID_3D::FLUID_3D(int *res, float *p0) :
index += _xRes - 1;
if(_domainBcRight==1) _obstacles[index] = 1;
}
-
}
FLUID_3D::~FLUID_3D()
@@ -177,6 +190,9 @@ FLUID_3D::~FLUID_3D()
if (_xVelocity) delete[] _xVelocity;
if (_yVelocity) delete[] _yVelocity;
if (_zVelocity) delete[] _zVelocity;
+ if (_xVelocityOb) delete[] _xVelocityOb;
+ if (_yVelocityOb) delete[] _yVelocityOb;
+ if (_zVelocityOb) delete[] _zVelocityOb;
if (_xVelocityOld) delete[] _xVelocityOld;
if (_yVelocityOld) delete[] _yVelocityOld;
if (_zVelocityOld) delete[] _zVelocityOld;
@@ -214,10 +230,18 @@ void FLUID_3D::initBlenderRNA(float *alpha, float *beta, float *dt_factor, float
//////////////////////////////////////////////////////////////////////
void FLUID_3D::step(float dt)
{
+#if 0
// If border rules have been changed
if (_colloPrev != *_borderColli) {
+ printf("Border collisions changed\n");
+
+ // DG TODO: Need to check that no animated obstacle flags are overwritten
setBorderCollisions();
}
+#endif
+
+ // DG: TODO for the moment redo border for every timestep since it's been deleted every time by moving obstacles
+ setBorderCollisions();
// set delta time by dt_factor
@@ -786,6 +810,7 @@ void FLUID_3D::project()
memset(_pressure, 0, sizeof(float)*_totalCells);
memset(_divergence, 0, sizeof(float)*_totalCells);
+ // set velocity and pressure inside of obstacles to zero
setObstacleBoundaries(_pressure, 0, _zRes);
// copy out the boundaries
@@ -798,12 +823,49 @@ void FLUID_3D::project()
if(_domainBcTop == 0) setNeumannZ(_zVelocity, _res, 0, _zRes);
else setZeroZ(_zVelocity, _res, 0, _zRes);
+ /*
+ {
+ float maxx = 0, maxy = 0, maxz = 0;
+ for(unsigned int i = 0; i < _xRes * _yRes * _zRes; i++)
+ {
+ if(_xVelocity[i] > maxx)
+ maxx = _xVelocity[i];
+ if(_yVelocity[i] > maxy)
+ maxy = _yVelocity[i];
+ if(_zVelocity[i] > maxz)
+ maxz = _zVelocity[i];
+ }
+ printf("Max velx: %f, vely: %f, velz: %f\n", maxx, maxy, maxz);
+ }
+ */
+
+ /*
+ {
+ float maxvalue = 0;
+ for(unsigned int i = 0; i < _xRes * _yRes * _zRes; i++)
+ {
+ if(_heat[i] > maxvalue)
+ maxvalue = _heat[i];
+
+ }
+ printf("Max heat: %f\n", maxvalue);
+ }
+ */
+
// calculate divergence
index = _slabSize + _xRes + 1;
for (z = 1; z < _zRes - 1; z++, index += 2 * _xRes)
for (y = 1; y < _yRes - 1; y++, index += 2)
for (x = 1; x < _xRes - 1; x++, index++)
{
+
+ if(_obstacles[index])
+ {
+ _divergence[index] = 0.0f;
+ continue;
+ }
+
+
float xright = _xVelocity[index + 1];
float xleft = _xVelocity[index - 1];
float yup = _yVelocity[index + _xRes];
@@ -811,26 +873,82 @@ void FLUID_3D::project()
float ztop = _zVelocity[index + _slabSize];
float zbottom = _zVelocity[index - _slabSize];
- if(_obstacles[index+1]) xright = - _xVelocity[index];
+ if(_obstacles[index+1]) xright = - _xVelocity[index]; // DG: +=
if(_obstacles[index-1]) xleft = - _xVelocity[index];
if(_obstacles[index+_xRes]) yup = - _yVelocity[index];
if(_obstacles[index-_xRes]) ydown = - _yVelocity[index];
if(_obstacles[index+_slabSize]) ztop = - _zVelocity[index];
if(_obstacles[index-_slabSize]) zbottom = - _zVelocity[index];
+ if(_obstacles[index+1] & 8) xright += _xVelocityOb[index + 1];
+ if(_obstacles[index-1] & 8) xleft += _xVelocityOb[index - 1];
+ if(_obstacles[index+_xRes] & 8) yup += _yVelocityOb[index + _xRes];
+ if(_obstacles[index-_xRes] & 8) ydown += _yVelocityOb[index - _xRes];
+ if(_obstacles[index+_slabSize] & 8) ztop += _zVelocityOb[index + _slabSize];
+ if(_obstacles[index-_slabSize] & 8) zbottom += _zVelocityOb[index - _slabSize];
+
_divergence[index] = -_dx * 0.5f * (
xright - xleft +
yup - ydown +
ztop - zbottom );
- // DG: commenting this helps CG to get a better start, 10-20% speed improvement
- // _pressure[index] = 0.0f;
+ // Pressure is zero anyway since now a local array is used
+ _pressure[index] = 0.0f;
}
+
+
+ /*
+ {
+ float maxvalue = 0;
+ for(unsigned int i = 0; i < _xRes * _yRes * _zRes; i++)
+ {
+ if(_divergence[i] > maxvalue)
+ maxvalue = _divergence[i];
+
+ }
+ printf("Max divergence: %f\n", maxvalue);
+ }
+ */
+
copyBorderAll(_pressure, 0, _zRes);
+ /*
+ {
+ float maxvalue = 0;
+ for(unsigned int i = 0; i < _xRes * _yRes * _zRes; i++)
+ {
+ if(_pressure[i] > maxvalue)
+ maxvalue = _pressure[i];
+ }
+ printf("Max pressure BEFORE: %f\n", maxvalue);
+ }
+ */
+
// solve Poisson equation
solvePressurePre(_pressure, _divergence, _obstacles);
+ {
+ float maxvalue = 0;
+ for(unsigned int i = 0; i < _xRes * _yRes * _zRes; i++)
+ {
+ if(_pressure[i] > maxvalue)
+ maxvalue = _pressure[i];
+
+ /* HACK: Animated collision object sometimes result in a non converging solvePressurePre() */
+ if(_pressure[i] > _dx * _dt)
+ _pressure[i] = _dx * _dt;
+ else if(_pressure[i] < -_dx * _dt)
+ _pressure[i] = -_dx * _dt;
+
+ // if(_obstacle[i] && _pressure[i] != 0.0)
+ // printf("BAD PRESSURE i\n");
+
+ // if(_pressure[i]>1)
+ // printf("index: %d\n", i);
+ }
+ // printf("Max pressure: %f, dx: %f\n", maxvalue, _dx);
+ }
+
setObstaclePressure(_pressure, 0, _zRes);
// project out solution
@@ -848,12 +966,74 @@ void FLUID_3D::project()
}
}
+ setObstacleVelocity(0, _zRes);
+
if (_pressure) delete[] _pressure;
if (_divergence) delete[] _divergence;
}
+//////////////////////////////////////////////////////////////////////
+// calculate the obstacle velocity at boundary
+//////////////////////////////////////////////////////////////////////
+void FLUID_3D::setObstacleVelocity(int zBegin, int zEnd)
+{
+
+ // completely TODO <-- who wrote this and what is here TODO? DG
+ const size_t index_ = _slabSize + _xRes + 1;
+
+ //int vIndex=_slabSize + _xRes + 1;
+
+ int bb=0;
+ int bt=0;
+
+ if (zBegin == 0) {bb = 1;}
+ if (zEnd == _zRes) {bt = 1;}
+ // tag remaining obstacle blocks
+ for (int z = zBegin + bb; z < zEnd - bt; z++)
+ {
+ size_t index = index_ +(z-1)*_slabSize;
+
+ for (int y = 1; y < _yRes - 1; y++, index += 2)
+ {
+ for (int x = 1; x < _xRes - 1; x++, index++)
+ {
+ if (!_obstacles[index])
+ {
+ // if(_obstacles[index+1]) xright = - _xVelocityOb[index];
+ if((_obstacles[index - 1] & 8) && abs(_xVelocityOb[index - 1]) > FLT_EPSILON )
+ {
+ // printf("velocity x!\n");
+ _xVelocity[index] = _xVelocityOb[index - 1];
+ _xVelocity[index - 1] = _xVelocityOb[index - 1];
+ }
+ // if(_obstacles[index+_xRes]) yup = - _yVelocityOb[index];
+ if((_obstacles[index - _xRes] & 8) && abs(_yVelocityOb[index - _xRes]) > FLT_EPSILON)
+ {
+ // printf("velocity y!\n");
+ _yVelocity[index] = _yVelocityOb[index - _xRes];
+ _yVelocity[index - _xRes] = _yVelocityOb[index - _xRes];
+ }
+ // if(_obstacles[index+_slabSize]) ztop = - _zVelocityOb[index];
+ if((_obstacles[index - _slabSize] & 8) && abs(_zVelocityOb[index - _slabSize]) > FLT_EPSILON)
+ {
+ // printf("velocity z!\n");
+ _zVelocity[index] = _zVelocityOb[index - _slabSize];
+ _zVelocity[index - _slabSize] = _zVelocityOb[index - _slabSize];
+ }
+ }
+ else
+ {
+ _density[index] = 0;
+ }
+ //vIndex++;
+ } // x loop
+ //vIndex += 2;
+ } // y loop
+ //vIndex += 2 * _xRes;
+ } // z loop
+}
//////////////////////////////////////////////////////////////////////
// diffuse heat
@@ -892,7 +1072,7 @@ void FLUID_3D::addObstacle(OBSTACLE* obstacle)
void FLUID_3D::setObstaclePressure(float *_pressure, int zBegin, int zEnd)
{
- // compleately TODO
+ // completely TODO <-- who wrote this and what is here TODO? DG
const size_t index_ = _slabSize + _xRes + 1;
@@ -914,7 +1094,7 @@ void FLUID_3D::setObstaclePressure(float *_pressure, int zBegin, int zEnd)
for (int x = 1; x < _xRes - 1; x++, index++)
{
// could do cascade of ifs, but they are a pain
- if (_obstacles[index])
+ if (_obstacles[index] /* && !(_obstacles[index] & 8) DG TODO TEST THIS CONDITION */)
{
const int top = _obstacles[index + _slabSize];
const int bottom= _obstacles[index - _slabSize];
@@ -928,9 +1108,11 @@ void FLUID_3D::setObstaclePressure(float *_pressure, int zBegin, int zEnd)
// const bool fully = (up && down);
//const bool fullx = (left && right);
+ /*
_xVelocity[index] =
_yVelocity[index] =
_zVelocity[index] = 0.0f;
+ */
_pressure[index] = 0.0f;
// average pressure neighbors
@@ -1253,7 +1435,35 @@ void FLUID_3D::advectMacCormackEnd2(int zBegin, int zEnd)
setZeroBorder(_density, res, zBegin, zEnd);
setZeroBorder(_heat, res, zBegin, zEnd);
+#if 0
+ {
+ const size_t index_ = _slabSize + _xRes + 1;
+ int bb=0;
+ int bt=0;
+
+ if (zBegin == 0) {bb = 1;}
+ if (zEnd == _zRes) {bt = 1;}
+
+ for (int z = zBegin + bb; z < zEnd - bt; z++)
+ {
+ size_t index = index_ +(z-1)*_slabSize;
+ for (int y = 1; y < _yRes - 1; y++, index += 2)
+ {
+ for (int x = 1; x < _xRes - 1; x++, index++)
+ {
+ // clean custom velocities from moving obstacles again
+ if (_obstacles[index])
+ {
+ _xVelocity[index] =
+ _yVelocity[index] =
+ _zVelocity[index] = 0.0f;
+ }
+ }
+ }
+ }
+ }
+#endif
/*int begin=zBegin * _slabSize;
int end=begin + (zEnd - zBegin) * _slabSize;
diff --git a/intern/smoke/intern/FLUID_3D.h b/intern/smoke/intern/FLUID_3D.h
index c9e18926fb2..5704cba3ed4 100644
--- a/intern/smoke/intern/FLUID_3D.h
+++ b/intern/smoke/intern/FLUID_3D.h
@@ -39,9 +39,6 @@
// #include "WTURBULENCE.h"
#include "VEC3.h"
-// timestep default value for nice appearance
-#define DT_DEFAULT 0.1f;
-
using namespace std;
using namespace BasicVector;
class WTURBULENCE;
@@ -49,7 +46,7 @@ class WTURBULENCE;
class FLUID_3D
{
public:
- FLUID_3D(int *res, /* int amplify, */ float *p0);
+ FLUID_3D(int *res, /* int amplify, */ float *p0, float dtdef);
FLUID_3D() {};
virtual ~FLUID_3D();
@@ -72,7 +69,7 @@ class FLUID_3D
int yRes() const { return _yRes; };
int zRes() const { return _zRes; };
- public:
+ public:
// dimensions
int _xRes, _yRes, _zRes, _maxRes;
Vec3Int _res;
@@ -89,6 +86,8 @@ class FLUID_3D
void artificialDampingSL(int zBegin, int zEnd);
void artificialDampingExactSL(int pos);
+ void setBorderObstacles();
+
// fields
float* _density;
float* _densityOld;
@@ -97,13 +96,17 @@ class FLUID_3D
float* _xVelocity;
float* _yVelocity;
float* _zVelocity;
+ float* _xVelocityOb;
+ float* _yVelocityOb;
+ float* _zVelocityOb;
float* _xVelocityOld;
float* _yVelocityOld;
float* _zVelocityOld;
float* _xForce;
float* _yForce;
float* _zForce;
- unsigned char* _obstacles;
+ unsigned char* _obstacles; /* only used (usefull) for static obstacles like domain boundaries */
+ unsigned char* _obstaclesAnim;
// Required for proper threading:
float* _xVelocityTemp;
@@ -137,6 +140,8 @@ class FLUID_3D
// have to recalibrate borders if nothing has changed
void setBorderCollisions();
+ void setObstacleVelocity(int zBegin, int zEnd);
+
// WTURBULENCE object, if active
// WTURBULENCE* _wTurbulence;
diff --git a/intern/smoke/intern/OBSTACLE.h b/intern/smoke/intern/OBSTACLE.h
index 61d47b727f0..da8ec6be024 100644
--- a/intern/smoke/intern/OBSTACLE.h
+++ b/intern/smoke/intern/OBSTACLE.h
@@ -27,9 +27,11 @@
#define OBSTACLE_H
enum OBSTACLE_FLAGS {
- EMPTY = 0,
+ EMPTY = 0,
+ /* 1 is used to flag an object cell */
MARCHED = 2,
- RETIRED = 4
+ RETIRED = 4,
+ ANIMATED = 8,
};
class OBSTACLE
diff --git a/intern/smoke/intern/WTURBULENCE.cpp b/intern/smoke/intern/WTURBULENCE.cpp
index cd18cf7b344..83bec466c9f 100644
--- a/intern/smoke/intern/WTURBULENCE.cpp
+++ b/intern/smoke/intern/WTURBULENCE.cpp
@@ -431,8 +431,11 @@ void WTURBULENCE::decomposeEnergy(float *_energy, float *_highFreqEnergy)
// compute velocity from energies and march into obstacles
// for wavelet decomposition
//////////////////////////////////////////////////////////////////////
-void WTURBULENCE::computeEnergy(float *_energy, float* xvel, float* yvel, float* zvel, unsigned char *obstacles)
+void WTURBULENCE::computeEnergy(float *_energy, float* xvel, float* yvel, float* zvel, unsigned char *origObstacles)
{
+ unsigned char *obstacles = new unsigned char[_totalCellsSm];
+ memcpy(obstacles, origObstacles, sizeof(unsigned char) * _totalCellsSm);
+
// compute everywhere
for (int x = 0; x < _totalCellsSm; x++)
_energy[x] = 0.5f * (xvel[x] * xvel[x] + yvel[x] * yvel[x] + zvel[x] * zvel[x]);
@@ -506,7 +509,9 @@ void WTURBULENCE::computeEnergy(float *_energy, float* xvel, float* yvel, float*
for (int y = 1; y < _yResSm - 1; y++, index += 2)
for (int x = 1; x < _xResSm - 1; x++, index++)
if (obstacles[index])
- obstacles[index] = 1;
+ obstacles[index] = 1; // DG TODO ? animated obstacle flag?
+
+ free(obstacles);
}
//////////////////////////////////////////////////////////////////////////////////////////
diff --git a/intern/smoke/intern/smoke_API.cpp b/intern/smoke/intern/smoke_API.cpp
index a2f3c21bbbf..ce298cff0d2 100644
--- a/intern/smoke/intern/smoke_API.cpp
+++ b/intern/smoke/intern/smoke_API.cpp
@@ -19,6 +19,7 @@
* All rights reserved.
*
* Contributor(s): Daniel Genrich
+ * Blender Foundation
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -36,10 +37,10 @@
#include <math.h>
// y in smoke is z in blender
-extern "C" FLUID_3D *smoke_init(int *res, float *p0)
+extern "C" FLUID_3D *smoke_init(int *res, float *p0, float dtdef)
{
// smoke lib uses y as top-bottom/vertical axis where blender uses z
- FLUID_3D *fluid = new FLUID_3D(res, p0);
+ FLUID_3D *fluid = new FLUID_3D(res, p0, dtdef);
// printf("xres: %d, yres: %d, zres: %d\n", res[0], res[1], res[2]);
@@ -78,41 +79,9 @@ extern "C" size_t smoke_get_index2d(int x, int max_x, int y /*, int max_y, int z
return x + y * max_x;
}
-extern "C" void smoke_step(FLUID_3D *fluid, size_t framenr, float fps)
+extern "C" void smoke_step(FLUID_3D *fluid, float dtSubdiv)
{
- /* stability values copied from wturbulence.cpp */
- const int maxSubSteps = 25;
- const float maxVel = 0.5f; /* TODO: maybe 0.5 is still too high, please confirm! -dg */
-
- float dt = DT_DEFAULT;
- float maxVelMag = 0.0f;
- int totalSubsteps;
- int substep = 0;
- float dtSubdiv;
-
- /* get max velocity and lower the dt value if it is too high */
- size_t size= fluid->_xRes * fluid->_yRes * fluid->_zRes;
-
- for(size_t i = 0; i < size; i++)
- {
- float vtemp = (fluid->_xVelocity[i]*fluid->_xVelocity[i]+fluid->_yVelocity[i]*fluid->_yVelocity[i]+fluid->_zVelocity[i]*fluid->_zVelocity[i]);
- if(vtemp > maxVelMag)
- maxVelMag = vtemp;
- }
-
- /* adapt timestep for different framerates, dt = 0.1 is at 25fps */
- dt *= (25.0f / fps);
-
- maxVelMag = sqrt(maxVelMag) * dt * (*(fluid->_dtFactor));
- totalSubsteps = (int)((maxVelMag / maxVel) + 1.0f); /* always round up */
- totalSubsteps = (totalSubsteps < 1) ? 1 : totalSubsteps;
- totalSubsteps = (totalSubsteps > maxSubSteps) ? maxSubSteps : totalSubsteps;
- dtSubdiv = (float)dt / (float)totalSubsteps;
-
- // printf("totalSubsteps: %d, maxVelMag: %f, dt: %f\n", totalSubsteps, maxVelMag, dt);
-
- for(substep = 0; substep < totalSubsteps; substep++)
- fluid->step(dtSubdiv);
+ fluid->step(dtSubdiv);
}
extern "C" void smoke_turbulence_step(WTURBULENCE *wt, FLUID_3D *fluid)
@@ -307,6 +276,18 @@ extern "C" unsigned char *smoke_get_obstacle(FLUID_3D *fluid)
return fluid->_obstacles;
}
+extern "C" void smoke_get_ob_velocity(FLUID_3D *fluid, float **x, float **y, float **z)
+{
+ *x = fluid->_xVelocityOb;
+ *y = fluid->_yVelocityOb;
+ *z = fluid->_zVelocityOb;
+}
+
+extern "C" unsigned char *smoke_get_obstacle_anim(FLUID_3D *fluid)
+{
+ return fluid->_obstaclesAnim;
+}
+
extern "C" void smoke_turbulence_set_noise(WTURBULENCE *wt, int type)
{
wt->setNoise(type);
diff --git a/intern/utfconv/utf_winfunc.c b/intern/utfconv/utf_winfunc.c
index 2e200ea3ad3..68d1d6bb403 100644
--- a/intern/utfconv/utf_winfunc.c
+++ b/intern/utfconv/utf_winfunc.c
@@ -39,7 +39,7 @@ FILE * ufopen(const char * filename, const char * mode)
UTF16_ENCODE(filename);
UTF16_ENCODE (mode);
- if(filename_16 && mode_16) {
+ if (filename_16 && mode_16) {
f = _wfopen(filename_16, mode_16);
}
@@ -81,7 +81,7 @@ int urename(const char *oldname, const char *newname )
UTF16_ENCODE(oldname);
UTF16_ENCODE (newname);
- if(oldname_16 && newname_16) r = _wrename(oldname_16, newname_16);
+ if (oldname_16 && newname_16) r = _wrename(oldname_16, newname_16);
UTF16_UN_ENCODE(newname);
UTF16_UN_ENCODE(oldname);
@@ -94,7 +94,7 @@ int umkdir(const char *pathname)
BOOL r = 0;
UTF16_ENCODE(pathname);
- if(pathname_16) r = CreateDirectoryW(pathname_16, NULL);
+ if (pathname_16) r = CreateDirectoryW(pathname_16, NULL);
UTF16_UN_ENCODE(pathname);
@@ -123,10 +123,10 @@ int uput_getenv(const char *varname, char * value, size_t buffsize)
{
int r = 0;
wchar_t * str;
- if(!buffsize) return r;
+ if (!buffsize) return r;
UTF16_ENCODE(varname);
- if(varname_16) {
+ if (varname_16) {
str = _wgetenv(varname_16);
conv_utf_16_to_8(str, value, buffsize);
r = 1;
@@ -143,7 +143,7 @@ int uputenv(const char *name, const char *value)
int r = -1;
UTF16_ENCODE(name);
UTF16_ENCODE(value);
- if(name_16 && value_16) {
+ if (name_16 && value_16) {
r = (SetEnvironmentVariableW(name_16,value_16)!= 0) ? 0 : -1;
}
UTF16_UN_ENCODE(value);
diff --git a/release/datafiles/splash.png b/release/datafiles/splash.png
index 47aca040453..2dab9257905 100644
--- a/release/datafiles/splash.png
+++ b/release/datafiles/splash.png
Binary files differ
diff --git a/release/plugins/sequence/blur.c b/release/plugins/sequence/blur.c
index e95c243b558..b59d7fbd005 100644
--- a/release/plugins/sequence/blur.c
+++ b/release/plugins/sequence/blur.c
@@ -106,20 +106,20 @@ void blurbuf(struct ImBuf *ibuf, int nr, Cast *cast)
x4= ibuf->x/4;
/* This doesn't seem to work... paprmh */
- if(cast->gamma != 1.0) gamwarp(tbuf, cast->gamma);
+ if (cast->gamma != 1.0) gamwarp(tbuf, cast->gamma);
/* reduce */
- for(i=0; i<nr; i++) {
+ for (i=0; i<nr; i++) {
ttbuf = onehalf(tbuf);
if (ttbuf) {
freeImBuf(tbuf);
tbuf = ttbuf;
}
- if(tbuf->x<4 || tbuf->y<4) break;
+ if (tbuf->x<4 || tbuf->y<4) break;
}
/* enlarge */
- for(i=0; i<nr; i++) {
+ for (i=0; i<nr; i++) {
ttbuf = double_x(tbuf);
if (ttbuf) {
freeImBuf(tbuf);
@@ -130,18 +130,18 @@ void blurbuf(struct ImBuf *ibuf, int nr, Cast *cast)
freeImBuf(tbuf);
tbuf = ttbuf;
}
- if(tbuf->x > x4) {
+ if (tbuf->x > x4) {
scaleImBuf(tbuf, ibuf->x, ibuf->y);
break;
}
}
/* this doesn't seem to work...paprmh*/
- if(cast->gamma != 1.0) gamwarp(tbuf, 1.0 / cast->gamma);
+ if (cast->gamma != 1.0) gamwarp(tbuf, 1.0 / cast->gamma);
- if(ibuf->rect)memcpy(ibuf->rect, tbuf->rect, 4*ibuf->x*ibuf->y);
+ if (ibuf->rect)memcpy(ibuf->rect, tbuf->rect, 4*ibuf->x*ibuf->y);
- if(ibuf->rect_float)
+ if (ibuf->rect_float)
memcpy(ibuf->rect_float, tbuf->rect_float, 4*ibuf->x*ibuf->y*sizeof(float));
freeImBuf(tbuf);
@@ -161,13 +161,13 @@ void doblur(struct ImBuf *mbuf, float fac, Cast *cast)
/* which buffers ? */
- if(fac>7.0) fac= 7.0;
- if(fac<=1.0) return;
+ if (fac>7.0) fac= 7.0;
+ if (fac<=1.0) return;
pfac= 2.0;
pbuf= dupImBuf(mbuf);
n= 1;
- while(pfac < fac) {
+ while (pfac < fac) {
blurbuf(pbuf, n, cast);
blurbuf(pbuf, n, cast);
@@ -185,10 +185,10 @@ void doblur(struct ImBuf *mbuf, float fac, Cast *cast)
fac= (fac-pfac)/(ifac-pfac);
n= mbuf->x*mbuf->y;
- if(cast->show) fac=cast->show-1;
+ if (cast->show) fac=cast->show-1;
- if(mbuf->rect_float){
- if(fac>=1) {
+ if (mbuf->rect_float){
+ if (fac>=1) {
memcpy(mbuf->rect_float, ibuf->rect_float, 4*n*sizeof(float));
}
else if(fac<=0) {
@@ -200,7 +200,7 @@ void doblur(struct ImBuf *mbuf, float fac, Cast *cast)
irectf= (float *)ibuf->rect_float;
prectf= (float *)pbuf->rect_float;
mrectf= (float *)mbuf->rect_float;
- while(n--) {
+ while (n--) {
mrectf[0]= irectf[0]*fac+ prectf[0]*infac;
mrectf[1]= irectf[1]*fac+ prectf[1]*infac;
mrectf[2]= irectf[2]*fac+ prectf[2]*infac;
@@ -213,10 +213,10 @@ void doblur(struct ImBuf *mbuf, float fac, Cast *cast)
}
else if(mbuf->rect){
b1= (int)fac*255.0;
- if(b1>255) b1= 255;
+ if (b1>255) b1= 255;
b2= 255-b1;
- if(b1==255) {
+ if (b1==255) {
memcpy(mbuf->rect, ibuf->rect, 4*n);
}
else if(b1==0) {
@@ -226,7 +226,7 @@ void doblur(struct ImBuf *mbuf, float fac, Cast *cast)
irect= (char *)ibuf->rect;
prect= (char *)pbuf->rect;
mrect= (char *)mbuf->rect;
- while(n--) {
+ while (n--) {
mrect[0]= (irect[0]*b1+ prect[0]*b2)>>8;
mrect[1]= (irect[1]*b1+ prect[1]*b2)>>8;
mrect[2]= (irect[2]*b1+ prect[2]*b2)>>8;
@@ -247,7 +247,7 @@ void plugin_seq_doit(Cast *cast, float facf0, float facf1, int x, int y, ImBuf *
{
float bfacf0, bfacf1;
- if(cast->use_ipo==0) {
+ if (cast->use_ipo==0) {
bfacf0= bfacf1= cast->blur+1.0;
}
else {
@@ -255,8 +255,8 @@ void plugin_seq_doit(Cast *cast, float facf0, float facf1, int x, int y, ImBuf *
bfacf1 = (facf1 * 6.0) + 1.0;
}
- if(out->rect) memcpy(out->rect, ibuf1->rect, 4*out->x*out->y);
- if(out->rect_float) memcpy(out->rect_float, ibuf1->rect_float, 4*out->x*out->y*sizeof(float));
+ if (out->rect) memcpy(out->rect, ibuf1->rect, 4*out->x*out->y);
+ if (out->rect_float) memcpy(out->rect_float, ibuf1->rect_float, 4*out->x*out->y*sizeof(float));
/****************I can't get this field code to work... works ok without...paprmh****************/
@@ -269,13 +269,13 @@ void plugin_seq_doit(Cast *cast, float facf0, float facf1, int x, int y, ImBuf *
doblur(out, bfacf0, cast); /*fieldA*/
-/* if(out->rect)out->rect += out->x * out->y;
- if(out->rect_float)out->rect_float += out->x * out->y;
+/* if (out->rect)out->rect += out->x * out->y;
+ if (out->rect_float)out->rect_float += out->x * out->y;
doblur(out, bfacf1, cast);*/ /*fieldB*/
-/* if(out->rect)out->rect -= out->x * out->y;
- if(out->rect_float)out->rect_float -= out->x * out->y;
+/* if (out->rect)out->rect -= out->x * out->y;
+ if (out->rect_float)out->rect_float -= out->x * out->y;
out->flags |= IB_fields;
interlace(out);*/
diff --git a/release/plugins/texture/clouds2.c b/release/plugins/texture/clouds2.c
index fc20f5769ef..8561d11dc3b 100644
--- a/release/plugins/texture/clouds2.c
+++ b/release/plugins/texture/clouds2.c
@@ -150,7 +150,7 @@ int plugin_tex_doit(int stype, Cast *cast, float *texvec, float *dxt, float *dyt
/* always return this value */
result[0] = CLAMP (val+cast->offset, 0.0, 1.0) * pow (fabs(sqrt(tv[0]*tv[0]+tv[1]*tv[1]+tv[2]*tv[2])), cast->falloff);
- if(stype==1) {
+ if (stype==1) {
/*
* this is r, g, b, a:
*/
@@ -161,7 +161,7 @@ int plugin_tex_doit(int stype, Cast *cast, float *texvec, float *dxt, float *dyt
res |= TEX_RGB;
}
- if(stype==2) {
+ if (stype==2) {
/*
* This value is the displacement of the actual normal in
* the Material calculation.
diff --git a/release/plugins/texture/tiles.c b/release/plugins/texture/tiles.c
index 151f64b6dab..11e1ed8f8af 100644
--- a/release/plugins/texture/tiles.c
+++ b/release/plugins/texture/tiles.c
@@ -124,7 +124,7 @@ float sample_wave(float freq, float coord, float pixsize)
float fac, frac, retval;
int part1, part2;
- if(pixsize > freq) return 0.5;
+ if (pixsize > freq) return 0.5;
pixsize/= freq;
@@ -132,19 +132,19 @@ float sample_wave(float freq, float coord, float pixsize)
part1= ffloor(fac);
frac= fac - part1;
- if(part1 & 1) retval= 0.0;
- else retval= 1.0;
+ if (part1 & 1) retval= 0.0;
+ else retval = 1.0;
- if(pixsize != 0.0) {
+ if (pixsize != 0.0) {
/* is coord+pixsize another value? */
part2= ffloor(fac + pixsize);
- if(part1==part2) return retval;
+ if (part1==part2) return retval;
/* antialias */
- if(retval==1.0) retval= (1.0-frac)/pixsize;
- else retval= 1.0-(1.0-frac)/pixsize;
+ if (retval == 1.0) retval= (1.0 - frac) / pixsize;
+ else retval= 1.0 - (1.0 - frac) / pixsize;
}
return retval;
}
@@ -153,23 +153,23 @@ int plugin_tex_doit(int stype, Cast *cast, float *texvec, float *dxt, float *dyt
{
float xwave, ywave;
- if(stype==1) {
+ if (stype==1) {
texvec[0]+= hnoise(cast->noise, texvec[0], texvec[1], texvec[2]);
texvec[1]+= hnoise(cast->noise, texvec[1], texvec[2], texvec[0]);
}
- if(dxt && dyt) {
+ if (dxt && dyt) {
xwave= sample_wave(cast->size, texvec[0], fabs(dxt[0]) + fabs(dyt[0]) );
ywave= sample_wave(cast->size, texvec[1], fabs(dxt[1]) + fabs(dyt[1]) );
- if(xwave > ywave) result[0]= xwave-ywave;
+ if (xwave > ywave) result[0]= xwave-ywave;
else result[0]= ywave-xwave;
}
else {
xwave= sample_wave(cast->size, texvec[0], 0.0 );
ywave= sample_wave(cast->size, texvec[1], 0.0 );
- if(xwave > ywave) result[0]= xwave-ywave;
+ if (xwave > ywave) result[0]= xwave-ywave;
else result[0]= ywave-xwave;
}
diff --git a/release/scripts/modules/addon_utils.py b/release/scripts/modules/addon_utils.py
index 588c10eea54..695bb8cb6b6 100644
--- a/release/scripts/modules/addon_utils.py
+++ b/release/scripts/modules/addon_utils.py
@@ -212,10 +212,13 @@ def check(module_name):
loaded_state = False
+ if mod and getattr(mod, "__addon_persistent__", False):
+ loaded_default = True
+
return loaded_default, loaded_state
-def enable(module_name, default_set=True):
+def enable(module_name, default_set=True, persistent=False):
"""
Enables an addon by name.
@@ -283,6 +286,7 @@ def enable(module_name, default_set=True):
ext.module = module_name
mod.__addon_enabled__ = True
+ mod.__addon_persistent__ = persistent
if _bpy.app.debug_python:
print("\taddon_utils.enable", mod.__name__)
@@ -305,6 +309,7 @@ def disable(module_name, default_set=True):
# the addon in the user prefs.
if mod:
mod.__addon_enabled__ = False
+ mod.__addon_persistent = False
try:
mod.unregister()
diff --git a/release/scripts/modules/blend_render_info.py b/release/scripts/modules/blend_render_info.py
index 7c30b480d6b..5a09f664637 100755
--- a/release/scripts/modules/blend_render_info.py
+++ b/release/scripts/modules/blend_render_info.py
@@ -75,7 +75,7 @@ def read_blend_rend_chunk(path):
# Now we want the scene name, start and end frame. this is 32bites long
start_frame, end_frame = struct.unpack('>2i' if is_big_endian else '<2i', blendfile.read(8))
- scene_name = blendfile.read(24)
+ scene_name = blendfile.read(64)
scene_name = scene_name[:scene_name.index(b'\0')]
diff --git a/release/scripts/presets/tracking_settings/blurry_movie.py b/release/scripts/presets/tracking_settings/blurry_movie.py
new file mode 100644
index 00000000000..8a503bec9bd
--- /dev/null
+++ b/release/scripts/presets/tracking_settings/blurry_movie.py
@@ -0,0 +1,11 @@
+import bpy
+settings = bpy.context.edit_movieclip.tracking.settings
+
+settings.default_tracker = 'KLT'
+settings.default_pyramid_levels = 4
+settings.default_correlation_min = 0.75
+settings.default_pattern_size = 11
+settings.default_search_size = 202
+settings.default_frames_limit = 25
+settings.default_pattern_match = 'KEYFRAME'
+settings.default_margin = 0
diff --git a/release/scripts/startup/bl_operators/image.py b/release/scripts/startup/bl_operators/image.py
index 1b7d5e3a40d..6af6488e86b 100644
--- a/release/scripts/startup/bl_operators/image.py
+++ b/release/scripts/startup/bl_operators/image.py
@@ -118,16 +118,24 @@ class SaveDirty(Operator):
unique_paths = set()
for image in bpy.data.images:
if image.is_dirty:
- filepath = bpy.path.abspath(image.filepath)
- if "\\" not in filepath and "/" not in filepath:
- self.report({'WARNING'}, "Invalid path: " + filepath)
- elif filepath in unique_paths:
- self.report({'WARNING'},
- "Path used by more then one image: %r" %
- filepath)
+ if image.packed_file:
+ if image.library:
+ self.report({'WARNING'},
+ "Packed library image: %r from library %r can't be re-packed" %
+ (image.name, image.library.filepath))
+ else:
+ image.pack(as_png=True)
else:
- unique_paths.add(filepath)
- image.save()
+ filepath = bpy.path.abspath(image.filepath, library=image.library)
+ if "\\" not in filepath and "/" not in filepath:
+ self.report({'WARNING'}, "Invalid path: " + filepath)
+ elif filepath in unique_paths:
+ self.report({'WARNING'},
+ "Path used by more then one image: %r" %
+ filepath)
+ else:
+ unique_paths.add(filepath)
+ image.save()
return {'FINISHED'}
diff --git a/release/scripts/startup/bl_operators/uvcalc_lightmap.py b/release/scripts/startup/bl_operators/uvcalc_lightmap.py
index 3bd0d6fa4cc..b184c81d6a7 100644
--- a/release/scripts/startup/bl_operators/uvcalc_lightmap.py
+++ b/release/scripts/startup/bl_operators/uvcalc_lightmap.py
@@ -157,18 +157,17 @@ class prettyface(object):
angles_co.sort()
I = [i for a, i in angles_co]
- #~ fuv = f.uv
uv_layer = f.id_data.uv_layers.active.data
- fuv = [uv_layer[i].uv for i in f.loops] # XXX25
+ fuv = [uv_layer[i].uv for i in f.loop_indices]
if self.rot:
- fuv[I[2]] = p1
- fuv[I[1]] = p2
- fuv[I[0]] = p3
+ fuv[I[2]][:] = p1
+ fuv[I[1]][:] = p2
+ fuv[I[0]][:] = p3
else:
- fuv[I[2]] = p1
- fuv[I[0]] = p2
- fuv[I[1]] = p3
+ fuv[I[2]][:] = p1
+ fuv[I[0]][:] = p2
+ fuv[I[1]][:] = p3
f, lens, lensord = uv[0]
@@ -179,10 +178,10 @@ class prettyface(object):
set_uv(f, (x2, y2), (x2, y1 + margin_h), (x1 + margin_w, y2))
else: # 1 QUAD
- uv[1][0], uv[1][1] = x1, y1
- uv[2][0], uv[2][1] = x1, y2
- uv[3][0], uv[3][1] = x2, y2
- uv[0][0], uv[0][1] = x2, y1
+ uv[1][:] = x1, y1
+ uv[2][:] = x1, y2
+ uv[3][:] = x2, y2
+ uv[0][:] = x2, y1
def __hash__(self):
# None unique hash
diff --git a/release/scripts/startup/bl_ui/properties_animviz.py b/release/scripts/startup/bl_ui/properties_animviz.py
index 93feb8adc7a..1f798f46590 100644
--- a/release/scripts/startup/bl_ui/properties_animviz.py
+++ b/release/scripts/startup/bl_ui/properties_animviz.py
@@ -31,16 +31,18 @@ class MotionPathButtonsPanel():
bl_label = "Motion Paths"
bl_options = {'DEFAULT_CLOSED'}
- def draw_settings(self, context, avs, bones=False):
+ def draw_settings(self, context, avs, mpath, bones=False):
layout = self.layout
mps = avs.motion_path
-
+
+ # Display Range
layout.prop(mps, "type", expand=True)
split = layout.split()
col = split.column()
+ col.label(text="Display Range:")
sub = col.column(align=True)
if (mps.type == 'CURRENT_FRAME'):
sub.prop(mps, "frame_before", text="Before")
@@ -48,18 +50,44 @@ class MotionPathButtonsPanel():
elif (mps.type == 'RANGE'):
sub.prop(mps, "frame_start", text="Start")
sub.prop(mps, "frame_end", text="End")
-
+
sub.prop(mps, "frame_step", text="Step")
+
+ col = split.column()
if bones:
- col.row().prop(mps, "bake_location", expand=True)
-
+ col.label(text="Cache for Bone:")
+ else:
+ col.label(text="Cache:")
+
+ if mpath:
+ sub = col.column(align=True)
+ sub.enabled = False
+ sub.prop(mpath, "frame_start", text="From")
+ sub.prop(mpath, "frame_end", text="To")
+
+ if bones:
+ col.operator("pose.paths_update", text="Update Paths", icon='BONE_DATA')
+ else:
+ col.operator("object.paths_update", text="Update Paths", icon='OBJECT_DATA')
+ else:
+ col.label(text="Not available yet...", icon='ERROR')
+ col.label(text="Calculate Paths first", icon='INFO')
+
+
+ # Display Settings
+ split = layout.split()
+
col = split.column()
- col.label(text="Display:")
+ col.label(text="Show:")
col.prop(mps, "show_frame_numbers", text="Frame Numbers")
+
+ col = split.column()
col.prop(mps, "show_keyframe_highlight", text="Keyframes")
+ sub = col.column()
+ sub.enabled = mps.show_keyframe_highlight
if bones:
- col.prop(mps, "show_keyframe_action_all", text="+ Non-Grouped Keyframes")
- col.prop(mps, "show_keyframe_numbers", text="Keyframe Numbers")
+ sub.prop(mps, "show_keyframe_action_all", text="+ Non-Grouped Keyframes")
+ sub.prop(mps, "show_keyframe_numbers", text="Keyframe Numbers")
# FIXME: this panel still needs to be ported so that it will work correctly with animviz
diff --git a/release/scripts/startup/bl_ui/properties_data_armature.py b/release/scripts/startup/bl_ui/properties_data_armature.py
index 08529a0423d..529d7c5f981 100644
--- a/release/scripts/startup/bl_ui/properties_data_armature.py
+++ b/release/scripts/startup/bl_ui/properties_data_armature.py
@@ -65,14 +65,10 @@ class DATA_PT_skeleton(ArmatureButtonsPanel, Panel):
col.label(text="Protected Layers:")
col.prop(arm, "layers_protected", text="")
- layout.label(text="Deform:")
- flow = layout.column_flow()
- flow.prop(arm, "use_deform_vertex_groups", text="Vertex Groups")
- flow.prop(arm, "use_deform_envelopes", text="Envelopes")
- flow.prop(arm, "use_deform_preserve_volume", text="Quaternion")
-
if context.scene.render.engine == 'BLENDER_GAME':
- layout.row().prop(arm, "deform_method", expand=True)
+ col = layout.column()
+ col.label(text="Deform:")
+ col.prop(arm, "deform_method", expand=True)
class DATA_PT_display(ArmatureButtonsPanel, Panel):
@@ -308,14 +304,12 @@ class DATA_PT_motion_paths(MotionPathButtonsPanel, Panel):
layout = self.layout
ob = context.object
-
- self.draw_settings(context, ob.pose.animation_visualisation, bones=True)
-
- layout.separator()
-
- split = layout.split()
- split.operator("pose.paths_calculate", text="Calculate Paths")
- split.operator("pose.paths_clear", text="Clear Paths")
+ avs = ob.pose.animation_visualisation
+
+ pchan = context.active_pose_bone
+ mpath = pchan.motion_path if pchan else None
+
+ self.draw_settings(context, avs, mpath, bones=True)
class DATA_PT_onion_skinning(OnionSkinButtonsPanel): # , Panel): # inherit from panel when ready
diff --git a/release/scripts/startup/bl_ui/properties_data_camera.py b/release/scripts/startup/bl_ui/properties_data_camera.py
index 5da41a668f6..49457b8e569 100644
--- a/release/scripts/startup/bl_ui/properties_data_camera.py
+++ b/release/scripts/startup/bl_ui/properties_data_camera.py
@@ -87,10 +87,16 @@ class DATA_PT_lens(CameraButtonsPanel, Panel):
elif cam.type == 'ORTHO':
col.prop(cam, "ortho_scale")
- col = layout.column()
- col.enabled = cam.type == 'PERSP'
-
- col.prop(cam, "use_panorama")
+ elif cam.type == 'PANO':
+ if context.scene.render.engine == 'CYCLES':
+ ccam = cam.cycles
+ col.prop(ccam, "panorama_type", text="Type")
+ if ccam.panorama_type == 'FISHEYE_EQUIDISTANT':
+ col.prop(ccam, "fisheye_fov")
+ elif ccam.panorama_type == 'FISHEYE_EQUISOLID':
+ row = layout.row()
+ row.prop(ccam, "fisheye_lens", text="Lens")
+ row.prop(ccam, "fisheye_fov")
split = layout.split()
diff --git a/release/scripts/startup/bl_ui/properties_data_curve.py b/release/scripts/startup/bl_ui/properties_data_curve.py
index b8a37e38a17..6a7415f7cec 100644
--- a/release/scripts/startup/bl_ui/properties_data_curve.py
+++ b/release/scripts/startup/bl_ui/properties_data_curve.py
@@ -173,9 +173,11 @@ class DATA_PT_geometry_curve(CurveButtonsPanel, Panel):
col.label(text="Bevel Object:")
col.prop(curve, "bevel_object", text="")
- row = col.row()
- row.active = (curve.bevel_object is not None)
- row.prop(curve, "use_fill_caps")
+ col = layout.column(align=True)
+ col.active = (curve.bevel_object is not None)
+ col.prop(curve, "use_fill_caps")
+ col.prop(curve, "bevel_factor_start")
+ col.prop(curve, "bevel_factor_end")
class DATA_PT_pathanim(CurveButtonsPanelCurve, Panel):
diff --git a/release/scripts/startup/bl_ui/properties_data_lamp.py b/release/scripts/startup/bl_ui/properties_data_lamp.py
index 974924be46c..25b85591873 100644
--- a/release/scripts/startup/bl_ui/properties_data_lamp.py
+++ b/release/scripts/startup/bl_ui/properties_data_lamp.py
@@ -190,7 +190,7 @@ class DATA_PT_sunsky(DataButtonsPanel, Panel):
class DATA_PT_shadow(DataButtonsPanel, Panel):
bl_label = "Shadow"
- COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
@classmethod
def poll(cls, context):
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index a4e7d107099..b46f0fc8923 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -440,11 +440,15 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
layout.separator()
- flow = layout.column_flow()
- flow.prop(md, "time")
- flow.prop(md, "resolution")
- flow.prop(md, "spatial_size")
- flow.prop(md, "depth")
+ split = layout.split()
+
+ col = split.column()
+ col.prop(md, "time")
+ col.prop(md, "resolution")
+
+ col = split.column()
+ col.prop(md, "spatial_size")
+ col.prop(md, "depth")
layout.label("Waves:")
diff --git a/release/scripts/startup/bl_ui/properties_game.py b/release/scripts/startup/bl_ui/properties_game.py
index c3f1c42d8a8..2aff07bd98e 100644
--- a/release/scripts/startup/bl_ui/properties_game.py
+++ b/release/scripts/startup/bl_ui/properties_game.py
@@ -653,5 +653,64 @@ class WORLD_PT_game_physics_obstacles(WorldButtonsPanel, Panel):
layout.prop(gs, "level_height")
layout.prop(gs, "show_obstacle_simulation")
+
+class DataButtonsPanel():
+ bl_space_type = 'PROPERTIES'
+ bl_region_type = 'WINDOW'
+ bl_context = "data"
+
+
+class DATA_PT_shadow_game(DataButtonsPanel, Panel):
+ bl_label = "Shadow"
+ COMPAT_ENGINES = {'BLENDER_GAME'}
+
+ @classmethod
+ def poll(cls, context):
+ COMPAT_LIGHTS = {'SPOT', 'SUN'}
+ lamp = context.lamp
+ engine = context.scene.render.engine
+ return (lamp and lamp.type in COMPAT_LIGHTS) and (engine in cls.COMPAT_ENGINES)
+
+ def draw_header(self, context):
+ lamp = context.lamp
+
+ self.layout.prop(lamp, "use_shadow", text="")
+
+ def draw(self, context):
+ layout = self.layout
+
+ lamp = context.lamp
+
+ layout.active = lamp.use_shadow
+
+ split = layout.split()
+
+ col = split.column()
+ col.prop(lamp, "shadow_color", text="")
+
+ col = split.column()
+ col.prop(lamp, "use_shadow_layer", text="This Layer Only")
+ col.prop(lamp, "use_only_shadow")
+
+ col = layout.column()
+ col.label("Buffer Type:")
+ col.prop(lamp, "ge_shadow_buffer_type", text="", toggle=True)
+ col.label("Quality:")
+ col = layout.column(align=True)
+ col.prop(lamp, "shadow_buffer_size", text="Size")
+ col.prop(lamp, "shadow_buffer_bias", text="Bias")
+ col.prop(lamp, "shadow_buffer_bleed_bias", text="Bleed Bias")
+
+ row = layout.row()
+ row.label("Clipping:")
+ row = layout.row(align=True)
+ row.prop(lamp, "shadow_buffer_clip_start", text="Clip Start")
+ row.prop(lamp, "shadow_buffer_clip_end", text="Clip End")
+
+ if lamp.type == 'SUN':
+ row = layout.row()
+ row.prop(lamp, "shadow_frustum_size", text="Frustum Size")
+
+
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)
diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py
index d7b4b1a2b44..cdef7e703e5 100644
--- a/release/scripts/startup/bl_ui/properties_object.py
+++ b/release/scripts/startup/bl_ui/properties_object.py
@@ -299,14 +299,10 @@ class OBJECT_PT_motion_paths(MotionPathButtonsPanel, Panel):
layout = self.layout
ob = context.object
-
- self.draw_settings(context, ob.animation_visualisation)
-
- layout.separator()
-
- row = layout.row()
- row.operator("object.paths_calculate", text="Calculate Paths")
- row.operator("object.paths_clear", text="Clear Paths")
+ avs = ob.animation_visualisation
+ mpath = ob.motion_path
+
+ self.draw_settings(context, avs, mpath)
class OBJECT_PT_onion_skinning(OnionSkinButtonsPanel): # , Panel): # inherit from panel when ready
diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py
index 25ea85a9a6a..94df1ed6cf5 100644
--- a/release/scripts/startup/bl_ui/properties_paint_common.py
+++ b/release/scripts/startup/bl_ui/properties_paint_common.py
@@ -47,6 +47,8 @@ class UnifiedPaintPanel():
parent.label(text="Unified Settings:")
parent.prop(ups, "use_unified_size", text="Size")
parent.prop(ups, "use_unified_strength", text="Strength")
+ if context.weight_paint_object:
+ parent.prop(ups, "use_unified_weight", text="Weight")
@staticmethod
def prop_unified_size(parent, context, brush, prop_name, icon='NONE', text="", slider=False):
@@ -59,3 +61,9 @@ class UnifiedPaintPanel():
ups = context.tool_settings.unified_paint_settings
ptr = ups if ups.use_unified_strength else brush
parent.prop(ptr, prop_name, icon=icon, text=text, slider=slider)
+
+ @staticmethod
+ def prop_unified_weight(parent, context, brush, prop_name, icon='NONE', text="", slider=False):
+ ups = context.tool_settings.unified_paint_settings
+ ptr = ups if ups.use_unified_weight else brush
+ parent.prop(ptr, prop_name, icon=icon, text=text, slider=slider)
diff --git a/release/scripts/startup/bl_ui/properties_physics_common.py b/release/scripts/startup/bl_ui/properties_physics_common.py
index f623d9a37eb..4db056e77a2 100644
--- a/release/scripts/startup/bl_ui/properties_physics_common.py
+++ b/release/scripts/startup/bl_ui/properties_physics_common.py
@@ -94,18 +94,25 @@ def point_cache_ui(self, context, cache, enabled, cachetype):
if cachetype in {'PSYS', 'HAIR', 'SMOKE'}:
row.prop(cache, "use_external")
- if cache.use_external:
- split = layout.split(percentage=0.80)
- split.prop(cache, "name", text="File Name")
- split.prop(cache, "index", text="")
-
- row = layout.row()
- row.label(text="File Path:")
- row.prop(cache, "use_library_path", "Use Lib Path")
+ if cachetype == 'SMOKE':
+ row.prop(cache, "use_library_path", "Use Lib Path")
- layout.prop(cache, "filepath", text="")
+ if cache.use_external:
+ split = layout.split(percentage=0.35)
+ col = split.column()
+ col.label(text="File Name:")
+ if cache.use_external:
+ col.label(text="File Path:")
- layout.label(text=cache.info)
+ col = split.column()
+ sub = col.split(percentage=0.70, align=True)
+ sub.prop(cache, "name", text="")
+ sub.prop(cache, "index", text="")
+ col.prop(cache, "filepath", text="")
+
+ cache_info = cache.info
+ if cache_info:
+ layout.label(text=cache_info)
else:
if cachetype in {'SMOKE', 'DYNAMIC_PAINT'}:
if not bpy.data.is_saved:
@@ -117,6 +124,7 @@ def point_cache_ui(self, context, cache, enabled, cachetype):
else:
layout.prop(cache, "name", text="Cache Name")
+ if not cache.use_external or cachetype == 'SMOKE':
row = layout.row(align=True)
if cachetype not in {'PSYS', 'DYNAMIC_PAINT'}:
diff --git a/release/scripts/startup/bl_ui/properties_physics_smoke.py b/release/scripts/startup/bl_ui/properties_physics_smoke.py
index 9f760f2f024..012aefebb6e 100644
--- a/release/scripts/startup/bl_ui/properties_physics_smoke.py
+++ b/release/scripts/startup/bl_ui/properties_physics_smoke.py
@@ -101,6 +101,14 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel, Panel):
sub.prop(flow, "density")
sub.prop(flow, "temperature")
+ elif md.smoke_type == 'COLLISION':
+ coll = md.coll_settings
+
+ split = layout.split()
+
+ col = split.column()
+ col.prop(coll, "collision_type")
+
class PHYSICS_PT_smoke_groups(PhysicButtonsPanel, Panel):
bl_label = "Smoke Groups"
diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py
index 5cbe03bba1a..bd3f087e38a 100644
--- a/release/scripts/startup/bl_ui/space_clip.py
+++ b/release/scripts/startup/bl_ui/space_clip.py
@@ -38,19 +38,20 @@ class CLIP_HT_header(Header):
sub = row.row(align=True)
sub.menu("CLIP_MT_view")
- if clip:
- sub.menu("CLIP_MT_select")
+ if sc.view == 'CLIP':
+ if clip:
+ sub.menu("CLIP_MT_select")
- sub.menu("CLIP_MT_clip")
+ sub.menu("CLIP_MT_clip")
- if clip:
sub.menu("CLIP_MT_track")
sub.menu("CLIP_MT_reconstruction")
- if clip:
- layout.prop(sc, "mode", text="")
- layout.prop(sc, "view", text="", expand=True)
+ layout.prop(sc, "view", text="", expand=True)
+ if clip:
+ if sc.view == 'CLIP':
+ layout.prop(sc, "mode", text="")
if sc.view == 'GRAPH':
row = layout.row(align=True)
@@ -79,24 +80,61 @@ class CLIP_HT_header(Header):
else:
r = tracking.reconstruction
- if r.is_valid:
+ if r.is_valid and sc.view == 'CLIP':
layout.label(text="Average solve error: %.4f" %
(r.average_error))
+ if sc.view == 'DOPESHEET':
+ layout.label(text="Sort by:")
+ layout.prop(sc, "dopesheet_sort_method", text="")
+ layout.prop(sc, "invert_dopesheet_sort", text="Invert")
+
layout.template_running_jobs()
-class CLIP_PT_tools_marker(Panel):
- bl_space_type = 'CLIP_EDITOR'
- bl_region_type = 'TOOLS'
- bl_label = "Marker"
+class CLIP_PT_clip_view_panel:
+
+ @classmethod
+ def poll(cls, context):
+ sc = context.space_data
+ clip = sc.clip
+
+ return clip and sc.view == 'CLIP'
+
+class CLIP_PT_tracking_panel:
+
+ @classmethod
+ def poll(cls, context):
+ sc = context.space_data
+ clip = sc.clip
+
+ return clip and sc.mode == 'TRACKING' and sc.view == 'CLIP'
+
+
+class CLIP_PT_reconstruction_panel:
+
+ @classmethod
+ def poll(cls, context):
+ sc = context.space_data
+ clip = sc.clip
+
+ return clip and sc.mode == 'RECONSTRUCTION' and sc.view == 'CLIP'
+
+
+class CLIP_PT_distortion_panel:
@classmethod
def poll(cls, context):
sc = context.space_data
clip = sc.clip
- return clip and sc.mode == 'TRACKING'
+ return clip and sc.mode == 'DISTORTION' and sc.view == 'CLIP'
+
+
+class CLIP_PT_tools_marker(CLIP_PT_tracking_panel, Panel):
+ bl_space_type = 'CLIP_EDITOR'
+ bl_region_type = 'TOOLS'
+ bl_label = "Marker"
def draw(self, context):
sc = context.space_data
@@ -162,18 +200,11 @@ class CLIP_PT_tools_marker(Panel):
text="Copy From Active Track")
-class CLIP_PT_tools_tracking(Panel):
+class CLIP_PT_tools_tracking(CLIP_PT_tracking_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'TOOLS'
bl_label = "Track"
- @classmethod
- def poll(cls, context):
- sc = context.space_data
- clip = sc.clip
-
- return clip and sc.mode == 'TRACKING'
-
def draw(self, context):
layout = self.layout
@@ -201,18 +232,11 @@ class CLIP_PT_tools_tracking(Panel):
layout.operator("clip.join_tracks", text="Join")
-class CLIP_PT_tools_solve(Panel):
+class CLIP_PT_tools_solve(CLIP_PT_tracking_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'TOOLS'
bl_label = "Solve"
- @classmethod
- def poll(cls, context):
- sc = context.space_data
- clip = sc.clip
-
- return clip and sc.mode == 'TRACKING'
-
def draw(self, context):
layout = self.layout
clip = context.space_data.clip
@@ -227,28 +251,25 @@ class CLIP_PT_tools_solve(Panel):
else "Object Motion")
col.operator("clip.clear_solution")
+ col = layout.column()
+ col.prop(settings, "use_tripod_solver")
+
col = layout.column(align=True)
+ col.active = not settings.use_tripod_solver
col.prop(settings, "keyframe_a")
col.prop(settings, "keyframe_b")
col = layout.column(align=True)
- col.active = tracking_object.is_camera
+ col.active = tracking_object.is_camera and not settings.use_tripod_solver
col.label(text="Refine:")
col.prop(settings, "refine_intrinsics", text="")
-class CLIP_PT_tools_cleanup(Panel):
+class CLIP_PT_tools_cleanup(CLIP_PT_tracking_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'TOOLS'
bl_label = "Clean up"
- @classmethod
- def poll(cls, context):
- sc = context.space_data
- clip = sc.clip
-
- return clip and sc.mode == 'TRACKING'
-
def draw(self, context):
layout = self.layout
clip = context.space_data.clip
@@ -261,18 +282,11 @@ class CLIP_PT_tools_cleanup(Panel):
layout.prop(settings, 'clean_action', text="")
-class CLIP_PT_tools_geometry(Panel):
+class CLIP_PT_tools_geometry(CLIP_PT_reconstruction_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'TOOLS'
bl_label = "Geometry"
- @classmethod
- def poll(cls, context):
- sc = context.space_data
- clip = sc.clip
-
- return clip and sc.mode == 'RECONSTRUCTION'
-
def draw(self, context):
layout = self.layout
@@ -280,18 +294,11 @@ class CLIP_PT_tools_geometry(Panel):
layout.operator("clip.track_to_empty")
-class CLIP_PT_tools_orientation(Panel):
+class CLIP_PT_tools_orientation(CLIP_PT_reconstruction_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'TOOLS'
bl_label = "Orientation"
- @classmethod
- def poll(cls, context):
- sc = context.space_data
- clip = sc.clip
-
- return clip and sc.mode == 'RECONSTRUCTION'
-
def draw(self, context):
sc = context.space_data
layout = self.layout
@@ -316,18 +323,19 @@ class CLIP_PT_tools_orientation(Panel):
col.prop(settings, "distance")
-class CLIP_PT_tools_object(Panel):
+class CLIP_PT_tools_object(CLIP_PT_reconstruction_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'TOOLS'
bl_label = "Object"
@classmethod
def poll(cls, context):
- sc = context.space_data
- clip = sc.clip
+ if CLIP_PT_reconstruction_panel.poll(context):
+ sc = context.space_data
+ clip = sc.clip
- if clip and sc.mode == 'RECONSTRUCTION':
tracking_object = clip.tracking.objects.active
+
return not tracking_object.is_camera
return False
@@ -350,18 +358,11 @@ class CLIP_PT_tools_object(Panel):
col.prop(settings, "object_distance")
-class CLIP_PT_tools_grease_pencil(Panel):
+class CLIP_PT_tools_grease_pencil(CLIP_PT_distortion_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'TOOLS'
bl_label = "Grease Pencil"
- @classmethod
- def poll(cls, context):
- sc = context.space_data
- clip = sc.clip
-
- return clip and sc.mode == 'DISTORTION'
-
def draw(self, context):
layout = self.layout
@@ -379,18 +380,12 @@ class CLIP_PT_tools_grease_pencil(Panel):
row.prop(context.tool_settings, "use_grease_pencil_sessions")
-class CLIP_PT_objects(Panel):
+class CLIP_PT_objects(CLIP_PT_clip_view_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
bl_label = "Objects"
bl_options = {'DEFAULT_CLOSED'}
- @classmethod
- def poll(cls, context):
- sc = context.space_data
-
- return sc.clip
-
def draw(self, context):
layout = self.layout
@@ -411,18 +406,11 @@ class CLIP_PT_objects(Panel):
layout.prop(active, "name")
-class CLIP_PT_track(Panel):
+class CLIP_PT_track(CLIP_PT_tracking_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
bl_label = "Track"
- @classmethod
- def poll(cls, context):
- sc = context.space_data
- clip = sc.clip
-
- return sc.mode == 'TRACKING' and clip
-
def draw(self, context):
layout = self.layout
sc = context.space_data
@@ -478,18 +466,12 @@ class CLIP_PT_track(Panel):
layout.label(text=label_text)
-class CLIP_PT_track_settings(Panel):
+class CLIP_PT_track_settings(CLIP_PT_tracking_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
bl_label = "Tracking Settings"
bl_options = {'DEFAULT_CLOSED'}
- @classmethod
- def poll(cls, context):
- sc = context.space_data
-
- return sc.mode == 'TRACKING' and sc.clip
-
def draw(self, context):
layout = self.layout
clip = context.space_data.clip
@@ -521,9 +503,12 @@ class CLIP_PT_tracking_camera(Panel):
@classmethod
def poll(cls, context):
- sc = context.space_data
+ if CLIP_PT_clip_view_panel.poll(context):
+ sc = context.space_data
+
+ return sc.mode in {'TRACKING', 'DISTORTION'} and sc.clip
- return sc.mode in {'TRACKING', 'DISTORTION'} and sc.clip
+ return False
def draw(self, context):
layout = self.layout
@@ -564,7 +549,7 @@ class CLIP_PT_tracking_camera(Panel):
col.prop(clip.tracking.camera, "k3")
-class CLIP_PT_display(Panel):
+class CLIP_PT_display(CLIP_PT_clip_view_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
bl_label = "Display"
@@ -609,7 +594,7 @@ class CLIP_PT_display(Panel):
row.prop(clip, "display_aspect", text="")
-class CLIP_PT_marker_display(Panel):
+class CLIP_PT_marker_display(CLIP_PT_clip_view_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
bl_label = "Marker Display"
@@ -632,18 +617,12 @@ class CLIP_PT_marker_display(Panel):
row.prop(sc, "path_length", text="Length")
-class CLIP_PT_stabilization(Panel):
+class CLIP_PT_stabilization(CLIP_PT_reconstruction_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
bl_label = "2D Stabilization"
bl_options = {'DEFAULT_CLOSED'}
- @classmethod
- def poll(cls, context):
- sc = context.space_data
-
- return sc.mode == 'RECONSTRUCTION' and sc.clip
-
def draw_header(self, context):
stab = context.space_data.clip.tracking.stabilization
@@ -691,19 +670,12 @@ class CLIP_PT_stabilization(Panel):
layout.prop(stab, "filter_type")
-class CLIP_PT_marker(Panel):
+class CLIP_PT_marker(CLIP_PT_tracking_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
bl_label = "Marker"
bl_options = {'DEFAULT_CLOSED'}
- @classmethod
- def poll(cls, context):
- sc = context.space_data
- clip = sc.clip
-
- return sc.mode == 'TRACKING' and clip
-
def draw(self, context):
layout = self.layout
sc = context.space_data
@@ -717,18 +689,12 @@ class CLIP_PT_marker(Panel):
layout.label(text="No active track")
-class CLIP_PT_proxy(Panel):
+class CLIP_PT_proxy(CLIP_PT_clip_view_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
bl_label = "Proxy / Timecode"
bl_options = {'DEFAULT_CLOSED'}
- @classmethod
- def poll(cls, context):
- sc = context.space_data
-
- return sc.clip
-
def draw_header(self, context):
sc = context.space_data
@@ -778,18 +744,12 @@ class CLIP_PT_proxy(Panel):
col.prop(sc.clip_user, "use_render_undistorted")
-class CLIP_PT_footage(Panel):
+class CLIP_PT_footage(CLIP_PT_clip_view_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
bl_label = "Footage Settings"
bl_options = {'DEFAULT_CLOSED'}
- @classmethod
- def poll(cls, context):
- sc = context.space_data
-
- return sc.clip
-
def draw(self, context):
layout = self.layout
@@ -802,17 +762,11 @@ class CLIP_PT_footage(Panel):
layout.operator("clip.open", icon='FILESEL')
-class CLIP_PT_tools_clip(Panel):
+class CLIP_PT_tools_clip(CLIP_PT_clip_view_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'TOOLS'
bl_label = "Clip"
- @classmethod
- def poll(cls, context):
- sc = context.space_data
-
- return sc.clip
-
def draw(self, context):
layout = self.layout
@@ -825,25 +779,30 @@ class CLIP_MT_view(Menu):
def draw(self, context):
layout = self.layout
+ sc = context.space_data
- layout.operator("clip.properties", icon='MENU_PANEL')
- layout.operator("clip.tools", icon='MENU_PANEL')
- layout.separator()
+ if sc.view == 'CLIP':
+ layout.operator("clip.properties", icon='MENU_PANEL')
+ layout.operator("clip.tools", icon='MENU_PANEL')
+ layout.separator()
- layout.operator("clip.view_selected")
- layout.operator("clip.view_all")
+ layout.operator("clip.view_selected")
+ layout.operator("clip.view_all")
- layout.separator()
- layout.operator("clip.view_zoom_in")
- layout.operator("clip.view_zoom_out")
+ layout.separator()
+ layout.operator("clip.view_zoom_in")
+ layout.operator("clip.view_zoom_out")
- layout.separator()
+ layout.separator()
- ratios = ((1, 8), (1, 4), (1, 2), (1, 1), (2, 1), (4, 1), (8, 1))
+ ratios = ((1, 8), (1, 4), (1, 2), (1, 1), (2, 1), (4, 1), (8, 1))
- for a, b in ratios:
- text = "Zoom %d:%d" % (a, b)
- layout.operator("clip.view_zoom_ratio", text=text).ratio = a / b
+ for a, b in ratios:
+ text = "Zoom %d:%d" % (a, b)
+ layout.operator("clip.view_zoom_ratio", text=text).ratio = a / b
+ else:
+ layout.prop(sc, "show_seconds")
+ layout.separator()
layout.separator()
layout.operator("screen.area_dupli")
diff --git a/release/scripts/startup/bl_ui/space_info.py b/release/scripts/startup/bl_ui/space_info.py
index 66d18fc6f19..0c38829b54f 100644
--- a/release/scripts/startup/bl_ui/space_info.py
+++ b/release/scripts/startup/bl_ui/space_info.py
@@ -42,6 +42,7 @@ class INFO_HT_header(Header):
sub.menu("INFO_MT_game")
else:
sub.menu("INFO_MT_render")
+ sub.menu("INFO_MT_window")
sub.menu("INFO_MT_help")
if window.screen.show_fullscreen:
@@ -66,9 +67,6 @@ class INFO_HT_header(Header):
row.operator("wm.splash", text="", icon='BLENDER', emboss=False)
row.label(text=scene.statistics())
- # XXX: this should be right-aligned to the RHS of the region
- layout.operator("wm.window_fullscreen_toggle", icon='FULLSCREEN_ENTER', text="")
-
# XXX: BEFORE RELEASE, MOVE FILE MENU OUT OF INFO!!!
"""
sinfo = context.space_data
@@ -352,17 +350,29 @@ class INFO_MT_render(Menu):
layout.operator("render.play_rendered_anim")
-class INFO_MT_help(Menu):
- bl_label = "Help"
+class INFO_MT_window(Menu):
+ bl_label = "Window"
def draw(self, context):
import sys
layout = self.layout
+ layout.operator("wm.window_duplicate")
+ layout.operator("wm.window_fullscreen_toggle", icon='FULLSCREEN_ENTER')
+ if sys.platform[:3] == "win":
+ layout.separator()
+ layout.operator("wm.console_toggle", icon='CONSOLE')
+
+
+class INFO_MT_help(Menu):
+ bl_label = "Help"
+
+ def draw(self, context):
+ layout = self.layout
+
layout.operator("wm.url_open", text="Manual", icon='HELP').url = 'http://wiki.blender.org/index.php/Doc:2.6/Manual'
layout.operator("wm.url_open", text="Release Log", icon='URL').url = 'http://www.blender.org/development/release-logs/blender-263/'
-
layout.separator()
layout.operator("wm.url_open", text="Blender Website", icon='URL').url = 'http://www.blender.org/'
@@ -377,12 +387,10 @@ class INFO_MT_help(Menu):
layout.operator("wm.operator_cheat_sheet", icon='TEXT')
layout.operator("wm.sysinfo", icon='TEXT')
layout.separator()
- if sys.platform[:3] == "win":
- layout.operator("wm.console_toggle", icon='CONSOLE')
- layout.separator()
layout.operator("anim.update_data_paths", text="FCurve/Driver Version fix", icon='HELP')
layout.operator("logic.texface_convert", text="TexFace to Material Convert", icon='GAME')
layout.separator()
+
layout.operator("wm.splash", icon='BLENDER')
if __name__ == "__main__": # only for live edit.
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index aae950519a4..43d675c1417 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -220,7 +220,6 @@ class SEQUENCER_MT_add_effect(Menu):
layout.operator("sequencer.effect_strip_add", text="Gamma Cross").type = 'GAMMA_CROSS'
layout.operator("sequencer.effect_strip_add", text="Multiply").type = 'MULTIPLY'
layout.operator("sequencer.effect_strip_add", text="Over Drop").type = 'OVER_DROP'
- layout.operator("sequencer.effect_strip_add", text="Plugin").type = 'PLUGIN'
layout.operator("sequencer.effect_strip_add", text="Wipe").type = 'WIPE'
layout.operator("sequencer.effect_strip_add", text="Glow").type = 'GLOW'
layout.operator("sequencer.effect_strip_add", text="Transform").type = 'TRANSFORM'
@@ -488,7 +487,7 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel):
col = layout.column(align=True)
if strip.type == 'SPEED':
col.prop(strip, "multiply_speed")
- elif strip.type in {'CROSS', 'GAMMA_CROSS', 'PLUGIN', 'WIPE'}:
+ elif strip.type in {'CROSS', 'GAMMA_CROSS', 'WIPE'}:
col.prop(strip, "use_default_fade", "Default fade")
if not strip.use_default_fade:
col.prop(strip, "effect_fader", text="Effect fader")
@@ -553,7 +552,6 @@ class SEQUENCER_PT_input(SequencerButtonsPanel, Panel):
return strip.type in {'MOVIE', 'IMAGE', 'SCENE', 'MOVIECLIP', 'META',
'ADD', 'SUBTRACT', 'ALPHA_OVER', 'ALPHA_UNDER',
'CROSS', 'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP',
- 'PLUGIN',
'WIPE', 'GLOW', 'TRANSFORM',
'MULTICAM', 'SPEED', 'ADJUSTMENT'}
@@ -716,7 +714,6 @@ class SEQUENCER_PT_filter(SequencerButtonsPanel, Panel):
return strip.type in {'MOVIE', 'IMAGE', 'SCENE', 'MOVIECLIP', 'META',
'ADD', 'SUBTRACT', 'ALPHA_OVER', 'ALPHA_UNDER',
'CROSS', 'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP',
- 'PLUGIN',
'WIPE', 'GLOW', 'TRANSFORM', 'COLOR',
'MULTICAM', 'SPEED', 'ADJUSTMENT'}
diff --git a/release/scripts/startup/bl_ui/space_text.py b/release/scripts/startup/bl_ui/space_text.py
index 7249e9522ff..d1daa4a5554 100644
--- a/release/scripts/startup/bl_ui/space_text.py
+++ b/release/scripts/startup/bl_ui/space_text.py
@@ -273,6 +273,14 @@ class TEXT_MT_edit(Menu):
layout.operator("text.cut")
layout.operator("text.copy")
layout.operator("text.paste")
+ layout.operator("text.duplicate_line")
+
+ layout.separator()
+
+ layout.operator("text.move_lines",
+ text="Move line(s) up").direction = 'UP'
+ layout.operator("text.move_lines",
+ text="Move line(s) down").direction = 'DOWN'
layout.separator()
diff --git a/release/scripts/startup/bl_ui/space_time.py b/release/scripts/startup/bl_ui/space_time.py
index 7720fddb084..8fb587e2634 100644
--- a/release/scripts/startup/bl_ui/space_time.py
+++ b/release/scripts/startup/bl_ui/space_time.py
@@ -81,10 +81,12 @@ class TIME_HT_header(Header):
row = layout.row(align=True)
row.prop(toolsettings, "use_keyframe_insert_auto", text="", toggle=True)
- row.prop(toolsettings, "use_keyframe_insert_keyingset", text="", toggle=True)
- if screen.is_animation_playing and toolsettings.use_keyframe_insert_auto:
- subsub = row.row()
- subsub.prop(toolsettings, "use_record_with_nla", toggle=True)
+ if toolsettings.use_keyframe_insert_auto:
+ row.prop(toolsettings, "use_keyframe_insert_keyingset", text="", toggle=True)
+
+ if screen.is_animation_playing:
+ subsub = row.row()
+ subsub.prop(toolsettings, "use_record_with_nla", toggle=True)
row = layout.row(align=True)
row.prop_search(scene.keying_sets_all, "active", scene, "keying_sets_all", text="")
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 7010c4f07cf..113c370e687 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -637,10 +637,6 @@ class USERPREF_PT_theme(Panel):
col.label(text="Tooltip:")
ui_items_general(col, ui)
- ui = theme.user_interface.wcol_tooltip
- col.label(text="Tooltip:")
- ui_items_general(col, ui)
-
ui = theme.user_interface.wcol_menu_item
col.label(text="Menu Item:")
ui_items_general(col, ui)
@@ -785,8 +781,6 @@ class USERPREF_PT_file(Panel):
sub = col1.column()
sub.label(text="Fonts:")
sub.label(text="Textures:")
- sub.label(text="Texture Plugins:")
- sub.label(text="Sequence Plugins:")
sub.label(text="Render Output:")
sub.label(text="Scripts:")
sub.label(text="Sounds:")
@@ -797,8 +791,6 @@ class USERPREF_PT_file(Panel):
sub = col1.column()
sub.prop(paths, "font_directory", text="")
sub.prop(paths, "texture_directory", text="")
- sub.prop(paths, "texture_plugin_directory", text="")
- sub.prop(paths, "sequence_plugin_directory", text="")
sub.prop(paths, "render_output_directory", text="")
sub.prop(paths, "script_directory", text="")
sub.prop(paths, "sound_directory", text="")
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 31ef6b79be3..7e53cfed282 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -69,7 +69,7 @@ class VIEW3D_HT_header(Header):
row.prop(toolsettings.particle_edit, "select_mode", text="", expand=True)
# Occlude geometry
- if view.viewport_shade in {'SOLID', 'SHADED', 'TEXTURED'} and (obj.mode == 'PARTICLE_EDIT' or (obj.mode == 'EDIT' and obj.type == 'MESH')):
+ if view.viewport_shade not in {'BOUNDBOX', 'WIREFRAME'} and (obj.mode == 'PARTICLE_EDIT' or (obj.mode == 'EDIT' and obj.type == 'MESH')):
row.prop(view, "use_occlude_geometry", text="")
# Proportional editing
@@ -131,11 +131,13 @@ class ShowHideMenu():
layout = self.layout
layout.operator("%s.reveal" % self._operator_name, text="Show Hidden")
- layout.operator("%s.hide" % self._operator_name, text="Hide Selected")
+ layout.operator("%s.hide" % self._operator_name, text="Hide Selected").unselected = False
layout.operator("%s.hide" % self._operator_name, text="Hide Unselected").unselected = True
-class VIEW3D_MT_transform(Menu):
+# Standard transforms which apply to all cases
+# NOTE: this doesn't seem to be able to be used directly
+class VIEW3D_MT_transform_base(Menu):
bl_label = "Transform"
# TODO: get rid of the custom text strings?
@@ -156,22 +158,38 @@ class VIEW3D_MT_transform(Menu):
layout.operator("transform.warp", text="Warp")
layout.operator("transform.push_pull", text="Push/Pull")
+
+# Generic transform menu - geometry types
+class VIEW3D_MT_transform(VIEW3D_MT_transform_base):
+ def draw(self, context):
+ # base menu
+ VIEW3D_MT_transform_base.draw(self, context)
+
+ # generic...
+ layout = self.layout
layout.separator()
layout.operator("transform.translate", text="Move Texture Space").texture_space = True
layout.operator("transform.resize", text="Scale Texture Space").texture_space = True
- layout.separator()
- obj = context.object
- if obj.type == 'ARMATURE' and obj.mode in {'EDIT', 'POSE'} and obj.data.draw_type in {'BBONE', 'ENVELOPE'}:
- layout.operator("transform.transform", text="Scale Envelope/BBone").mode = 'BONE_SIZE'
+# Object-specific extensions to Transform menu
+class VIEW3D_MT_transform_object(VIEW3D_MT_transform_base):
+ def draw(self, context):
+ # base menu
+ VIEW3D_MT_transform_base.draw(self, context)
+
+ # object-specific option follow...
+ layout = self.layout
+ layout.separator()
- if context.edit_object and context.edit_object.type == 'ARMATURE':
- layout.operator("armature.align")
- else:
- layout.operator_context = 'EXEC_REGION_WIN'
- layout.operator("transform.transform", text="Align to Transform Orientation").mode = 'ALIGN' # XXX see alignmenu() in edit.c of b2.4x to get this working
+ layout.operator("transform.translate", text="Move Texture Space").texture_space = True
+ layout.operator("transform.resize", text="Scale Texture Space").texture_space = True
+
+ layout.separator()
+
+ layout.operator_context = 'EXEC_REGION_WIN'
+ layout.operator("transform.transform", text="Align to Transform Orientation").mode = 'ALIGN' # XXX see alignmenu() in edit.c of b2.4x to get this working
layout.separator()
@@ -191,6 +209,25 @@ class VIEW3D_MT_transform(Menu):
layout.operator("object.anim_transforms_to_deltas")
+# Armature EditMode extensions to Transform menu
+class VIEW3D_MT_transform_armature(VIEW3D_MT_transform_base):
+ def draw(self, context):
+ # base menu
+ VIEW3D_MT_transform_base.draw(self, context)
+
+ # armature specific extensions follow...
+ layout = self.layout
+ layout.separator()
+
+ obj = context.object
+ if (obj.type == 'ARMATURE' and obj.mode in {'EDIT', 'POSE'} and
+ obj.data.draw_type in {'BBONE', 'ENVELOPE'}):
+ layout.operator("transform.transform", text="Scale Envelope/BBone").mode = 'BONE_SIZE'
+
+ if context.edit_object and context.edit_object.type == 'ARMATURE':
+ layout.operator("armature.align")
+
+
class VIEW3D_MT_mirror(Menu):
bl_label = "Mirror"
@@ -377,6 +414,11 @@ class VIEW3D_MT_view_align(Menu):
layout.operator("view3d.view_selected")
layout.operator("view3d.view_center_cursor")
+ layout.separator()
+
+ layout.operator("view3d.view_lock_to_active")
+ layout.operator("view3d.view_lock_clear")
+
class VIEW3D_MT_view_align_selected(Menu):
bl_label = "Align View to Selected"
@@ -699,7 +741,7 @@ class VIEW3D_MT_object(Menu):
layout.separator()
- layout.menu("VIEW3D_MT_transform")
+ layout.menu("VIEW3D_MT_transform_object")
layout.menu("VIEW3D_MT_mirror")
layout.menu("VIEW3D_MT_object_clear")
layout.menu("VIEW3D_MT_object_apply")
@@ -1152,7 +1194,7 @@ class VIEW3D_MT_vertex_group(Menu):
if ob.mode == 'EDIT' or (ob.mode == 'WEIGHT_PAINT' and ob.type == 'MESH' and ob.data.use_paint_mask_vertex):
if ob.vertex_groups.active:
layout.separator()
- layout.operator("object.vertex_group_assign", text="Assign to Active Group")
+ layout.operator("object.vertex_group_assign", text="Assign to Active Group").new = False
layout.operator("object.vertex_group_remove_from", text="Remove from Active Group").all = False
layout.operator("object.vertex_group_remove_from", text="Remove from All").all = True
layout.separator()
@@ -1317,7 +1359,7 @@ class VIEW3D_MT_pose(Menu):
layout.separator()
- layout.menu("VIEW3D_MT_transform")
+ layout.menu("VIEW3D_MT_transform_armature")
layout.menu("VIEW3D_MT_pose_transform")
layout.menu("VIEW3D_MT_pose_apply")
@@ -1496,6 +1538,24 @@ class VIEW3D_MT_pose_apply(Menu):
layout.operator("pose.visual_transform_apply")
+class VIEW3D_MT_pose_specials(Menu):
+ bl_label = "Specials"
+
+ def draw(self, context):
+ layout = self.layout
+ layout.operator("pose.select_constraint_target")
+ layout.operator("pose.flip_names")
+ layout.operator("pose.paths_calculate")
+ layout.operator("pose.paths_clear")
+ layout.operator("pose.user_transforms_clear")
+ layout.operator("pose.user_transforms_clear", text="Clear User Transforms (All)").only_selected = False
+ layout.operator("pose.relax")
+
+ layout.separator()
+
+ layout.operator_menu_enum("pose.autoside_names", "axis")
+
+
class BoneOptions:
def draw(self, context):
layout = self.layout
@@ -1602,7 +1662,7 @@ class VIEW3D_MT_edit_mesh_specials(Menu):
layout.operator("mesh.subdivide", text="Subdivide Smooth").smoothness = 1.0
layout.operator("mesh.merge", text="Merge...")
layout.operator("mesh.remove_doubles")
- layout.operator("mesh.hide", text="Hide")
+ layout.operator("mesh.hide", text="Hide").unselected = False
layout.operator("mesh.reveal", text="Reveal")
layout.operator("mesh.select_all", text="Select Inverse").action = 'INVERT'
layout.operator("mesh.flip_normals")
@@ -1615,6 +1675,7 @@ class VIEW3D_MT_edit_mesh_specials(Menu):
layout.operator("mesh.blend_from_shape")
layout.operator("mesh.shape_propagate_to_all")
layout.operator("mesh.select_vertex_path")
+ layout.operator("mesh.sort_elements")
class VIEW3D_MT_edit_mesh_select_mode(Menu):
@@ -1690,8 +1751,7 @@ class VIEW3D_MT_edit_mesh_vertices(Menu):
layout.operator("mesh.vertices_smooth")
layout.operator("mesh.remove_doubles")
- layout.operator("mesh.vertices_sort")
- layout.operator("mesh.vertices_randomize")
+ layout.operator("mesh.sort_elements", text="Sort Vertices").elements = {"VERT"}
layout.operator("mesh.select_vertex_path")
@@ -1736,6 +1796,7 @@ class VIEW3D_MT_edit_mesh_edges(Menu):
layout.operator("mesh.bevel")
layout.operator("mesh.edge_split")
layout.operator("mesh.bridge_edge_loops")
+ layout.operator("mesh.sort_elements", text="Sort Edges").elements = {"EDGE"}
layout.separator()
@@ -1767,7 +1828,8 @@ class VIEW3D_MT_edit_mesh_faces(Menu):
layout.operator("mesh.inset")
layout.operator("mesh.bevel")
layout.operator("mesh.solidify")
- layout.operator("mesh.sort_faces")
+ layout.operator("mesh.wireframe")
+ layout.operator("mesh.sort_elements", text="Sort Faces").elements = {"FACE"}
layout.separator()
@@ -2036,7 +2098,7 @@ class VIEW3D_MT_edit_meta_showhide(Menu):
layout = self.layout
layout.operator("mball.reveal_metaelems", text="Show Hidden")
- layout.operator("mball.hide_metaelems", text="Hide Selected")
+ layout.operator("mball.hide_metaelems", text="Hide Selected").unselected = False
layout.operator("mball.hide_metaelems", text="Hide Unselected").unselected = True
@@ -2071,7 +2133,7 @@ class VIEW3D_MT_edit_armature(Menu):
edit_object = context.edit_object
arm = edit_object.data
- layout.menu("VIEW3D_MT_transform")
+ layout.menu("VIEW3D_MT_transform_armature")
layout.menu("VIEW3D_MT_mirror")
layout.menu("VIEW3D_MT_snap")
layout.menu("VIEW3D_MT_edit_armature_roll")
@@ -2378,9 +2440,10 @@ class VIEW3D_PT_view3d_meshdisplay(Panel):
col.separator()
col.label(text="Normals:")
- row = col.row(align=True)
- row.prop(mesh, "show_normal_vertex", text="", icon='VERTEXSEL')
- row.prop(mesh, "show_normal_face", text="", icon='FACESEL')
+ row = col.row()
+ sub = row.row(align=True)
+ sub.prop(mesh, "show_normal_vertex", text="", icon='VERTEXSEL')
+ sub.prop(mesh, "show_normal_face", text="", icon='FACESEL')
row.prop(context.scene.tool_settings, "normal_size", text="Size")
col.separator()
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index c494590d005..f220ec19bfe 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -145,10 +145,10 @@ class VIEW3D_PT_tools_meshedit(View3DPanel, Panel):
row = col.row(align=True)
props = row.operator("mesh.knife_tool", text="Knife")
props.use_occlude_geometry = True
- props.only_select = False
+ props.only_selected = False
props = row.operator("mesh.knife_tool", text="Select")
props.use_occlude_geometry = False
- props.only_select = True
+ props.only_selected = True
col = layout.column(align=True)
col.label(text="Remove:")
@@ -652,13 +652,15 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
# Weight Paint Mode #
elif context.weight_paint_object and brush:
- layout.prop(toolsettings, "vertex_group_weight", text="Weight", slider=True)
layout.prop(toolsettings, "use_auto_normalize", text="Auto Normalize")
layout.prop(toolsettings, "use_multipaint", text="Multi-Paint")
col = layout.column()
row = col.row(align=True)
+ self.prop_unified_weight(row, context, brush, "weight", slider=True, text="Weight")
+
+ row = col.row(align=True)
self.prop_unified_size(row, context, brush, "size", slider=True, text="Radius")
self.prop_unified_size(row, context, brush, "use_pressure_size")
diff --git a/release/scripts/startup/keyingsets_builtins.py b/release/scripts/startup/keyingsets_builtins.py
index 3527ece2bd3..b7693880f9c 100644
--- a/release/scripts/startup/keyingsets_builtins.py
+++ b/release/scripts/startup/keyingsets_builtins.py
@@ -45,7 +45,7 @@ ANIM_KS_ROTATION_ID = "Rotation"
ANIM_KS_SCALING_ID = "Scaling"
ANIM_KS_LOC_ROT_SCALE_ID = "LocRotScale"
ANIM_KS_AVAILABLE_ID = "Available"
-ANIM_KS_WHOLE_CHARACTER_ID = "Whole Character"
+ANIM_KS_WHOLE_CHARACTER_ID = "WholeCharacter"
# Location
diff --git a/release/scripts/templates/operator_modal_timer.py b/release/scripts/templates/operator_modal_timer.py
index ec47390da81..ebbf6395df5 100644
--- a/release/scripts/templates/operator_modal_timer.py
+++ b/release/scripts/templates/operator_modal_timer.py
@@ -14,7 +14,7 @@ class ModalTimerOperator(bpy.types.Operator):
if event.type == 'TIMER':
# change theme color, silly!
- color = context.user_preferences.themes[0].view_3d.back
+ color = context.user_preferences.themes[0].view_3d.space.back
color.s = 1.0
color.h += 0.01
diff --git a/release/windows/installer/00.sconsblender.nsi b/release/windows/installer/00.sconsblender.nsi
index eb9b6629108..f6e5b783faa 100644
--- a/release/windows/installer/00.sconsblender.nsi
+++ b/release/windows/installer/00.sconsblender.nsi
@@ -90,7 +90,6 @@ Function .onInit
${If} ${RunningX64}
${If} "[BITNESS]" == "32"
- ${OrIf} "[BITNESS]" == "-mingw"
StrCpy $INSTDIR "$PROGRAMFILES32\Blender Foundation\Blender" ; Can't use InstallDir inside Section
${ElseIf} "[BITNESS]" == "64"
StrCpy $INSTDIR "$PROGRAMFILES64\Blender Foundation\Blender"
diff --git a/source/blender/avi/AVI_avi.h b/source/blender/avi/AVI_avi.h
index a579bf7dfec..76e11ebad08 100644
--- a/source/blender/avi/AVI_avi.h
+++ b/source/blender/avi/AVI_avi.h
@@ -57,124 +57,124 @@
#include <stdio.h> /* for FILE */
typedef struct _AviChunk {
- int fcc;
- int size;
+ int fcc;
+ int size;
} AviChunk;
typedef struct _AviList {
- int fcc;
- int size;
- int ids;
+ int fcc;
+ int size;
+ int ids;
} AviList;
typedef struct _AviMainHeader {
- int fcc;
- int size;
- int MicroSecPerFrame; /* MicroSecPerFrame - timing between frames */
- int MaxBytesPerSec; /* MaxBytesPerSec - approx bps system must handle */
- int PaddingGranularity;
- int Flags;
+ int fcc;
+ int size;
+ int MicroSecPerFrame; /* MicroSecPerFrame - timing between frames */
+ int MaxBytesPerSec; /* MaxBytesPerSec - approx bps system must handle */
+ int PaddingGranularity;
+ int Flags;
#define AVIF_HASINDEX 0x00000010 /* had idx1 chunk */
#define AVIF_MUSTUSEINDEX 0x00000020 /* must use idx1 chunk to determine order */
#define AVIF_ISINTERLEAVED 0x00000100 /* AVI file is interleaved */
#define AVIF_TRUSTCKTYPE 0x00000800
#define AVIF_WASCAPTUREFILE 0x00010000 /* specially allocated used for capturing real time video */
#define AVIF_COPYRIGHTED 0x00020000 /* contains copyrighted data */
-
- int TotalFrames;
- int InitialFrames; /* InitialFrames - initial frame before interleaving */
- int Streams;
- int SuggestedBufferSize;
- int Width;
- int Height;
- int Reserved[4];
+
+ int TotalFrames;
+ int InitialFrames; /* InitialFrames - initial frame before interleaving */
+ int Streams;
+ int SuggestedBufferSize;
+ int Width;
+ int Height;
+ int Reserved[4];
} AviMainHeader;
typedef struct _AviStreamHeader {
- int fcc;
- int size;
- int Type;
+ int fcc;
+ int size;
+ int Type;
#define AVIST_VIDEO FCC("vids")
#define AVIST_AUDIO FCC("auds")
#define AVIST_MIDI FCC("mids")
#define AVIST_TEXT FCC("txts")
-
- int Handler;
- int Flags;
+
+ int Handler;
+ int Flags;
#define AVISF_DISABLED 0x00000001
#define AVISF_VIDEO_PALCHANGES 0x00010000
-
- short Priority;
- short Language;
- int InitialFrames;
- int Scale;
- int Rate;
- int Start;
- int Length;
- int SuggestedBufferSize;
- int Quality;
- int SampleSize;
- short left;
- short top;
- short right;
- short bottom;
+
+ short Priority;
+ short Language;
+ int InitialFrames;
+ int Scale;
+ int Rate;
+ int Start;
+ int Length;
+ int SuggestedBufferSize;
+ int Quality;
+ int SampleSize;
+ short left;
+ short top;
+ short right;
+ short bottom;
} AviStreamHeader;
typedef struct _AviBitmapInfoHeader {
- int fcc;
- int size;
- int Size;
- int Width;
- int Height;
- short Planes;
- short BitCount;
- int Compression;
- int SizeImage;
- int XPelsPerMeter;
- int YPelsPerMeter;
- int ClrUsed;
- int ClrImportant;
+ int fcc;
+ int size;
+ int Size;
+ int Width;
+ int Height;
+ short Planes;
+ short BitCount;
+ int Compression;
+ int SizeImage;
+ int XPelsPerMeter;
+ int YPelsPerMeter;
+ int ClrUsed;
+ int ClrImportant;
} AviBitmapInfoHeader;
typedef struct _AviMJPEGUnknown {
- int a;
- int b;
- int c;
- int d;
- int e;
- int f;
- int g;
+ int a;
+ int b;
+ int c;
+ int d;
+ int e;
+ int f;
+ int g;
} AviMJPEGUnknown;
typedef struct _AviIndexEntry {
- int ChunkId;
- int Flags;
+ int ChunkId;
+ int Flags;
#define AVIIF_LIST 0x00000001
#define AVIIF_KEYFRAME 0x00000010
#define AVIIF_NO_TIME 0x00000100
#define AVIIF_COMPRESSOR 0x0FFF0000
- int Offset;
- int Size;
+ int Offset;
+ int Size;
} AviIndexEntry;
typedef struct _AviIndex {
- int fcc;
- int size;
- AviIndexEntry *entrys;
+ int fcc;
+ int size;
+ AviIndexEntry *entrys;
} AviIndex;
typedef enum {
- AVI_FORMAT_RGB24, /* The most basic of forms, 3 bytes per pixel, 1 per r, g, b */
- AVI_FORMAT_RGB32, /* The second most basic of forms, 4 bytes per pixel, 1 per r, g, b, alpha */
- AVI_FORMAT_AVI_RGB, /* Same as above, but is in the weird AVI order (bottom to top, left to right) */
- AVI_FORMAT_MJPEG /* Motion-JPEG */
+ AVI_FORMAT_RGB24, /* The most basic of forms, 3 bytes per pixel, 1 per r, g, b */
+ AVI_FORMAT_RGB32, /* The second most basic of forms, 4 bytes per pixel, 1 per r, g, b, alpha */
+ AVI_FORMAT_AVI_RGB, /* Same as above, but is in the weird AVI order (bottom to top, left to right) */
+ AVI_FORMAT_MJPEG /* Motion-JPEG */
} AviFormat;
typedef struct _AviStreamRec {
- AviStreamHeader sh;
- void *sf;
- int sf_size;
- AviFormat format;
+ AviStreamHeader sh;
+ void *sf;
+ int sf_size;
+ AviFormat format;
} AviStreamRec;
typedef struct _AviMovie {
@@ -201,23 +201,23 @@ typedef struct _AviMovie {
} AviMovie;
typedef enum {
- AVI_ERROR_NONE=0,
- AVI_ERROR_COMPRESSION,
- AVI_ERROR_OPEN,
- AVI_ERROR_READING,
- AVI_ERROR_WRITING,
- AVI_ERROR_FORMAT,
- AVI_ERROR_ALLOC,
- AVI_ERROR_FOUND,
- AVI_ERROR_OPTION
+ AVI_ERROR_NONE=0,
+ AVI_ERROR_COMPRESSION,
+ AVI_ERROR_OPEN,
+ AVI_ERROR_READING,
+ AVI_ERROR_WRITING,
+ AVI_ERROR_FORMAT,
+ AVI_ERROR_ALLOC,
+ AVI_ERROR_FOUND,
+ AVI_ERROR_OPTION
} AviError;
/* belongs to the option-setting function. */
typedef enum {
- AVI_OPTION_WIDTH=0,
- AVI_OPTION_HEIGHT,
- AVI_OPTION_QUALITY,
- AVI_OPTION_FRAMERATE
+ AVI_OPTION_WIDTH=0,
+ AVI_OPTION_HEIGHT,
+ AVI_OPTION_QUALITY,
+ AVI_OPTION_FRAMERATE
} AviOption;
/* The offsets that will always stay the same in AVI files we
@@ -235,28 +235,28 @@ typedef enum {
/**
* Test whether this is an avi-format.
*/
-int AVI_is_avi (const char *name);
+int AVI_is_avi(const char *name);
/**
* Open a compressed file, decompress it into memory.
*/
-AviError AVI_open_compress (char *name, AviMovie *movie, int streams, ...);
+AviError AVI_open_compress(char *name, AviMovie *movie, int streams, ...);
/**
* Finalize a compressed output stream.
*/
-AviError AVI_close_compress (AviMovie *movie);
+AviError AVI_close_compress(AviMovie *movie);
/**
* Choose a compression option for \<movie\>. Possible options are
* AVI_OPTION_TYPE_MAIN, AVI_OPTION_TYPE_STRH, AVI_OPTION_TYPE_STRF
*/
-AviError AVI_set_compress_option (AviMovie *movie,
- int option_type,
- int stream,
- AviOption option,
- void *opt_data);
+AviError AVI_set_compress_option(AviMovie *movie,
+ int option_type,
+ int stream,
+ AviOption option,
+ void *opt_data);
/* Hmmm... there should be some explanantion about what these mean */
/**
* Compression option, for use in avi_set_compress_option
@@ -275,35 +275,34 @@ AviError AVI_set_compress_option (AviMovie *movie,
* Direct the streams \<avist_type\> to \<movie\>. Redirect \<stream_num\>
* streams.
*/
-int AVI_get_stream (AviMovie *movie, int avist_type, int stream_num);
+int AVI_get_stream(AviMovie *movie, int avist_type, int stream_num);
/**
* Open a movie stream from file.
*/
-AviError AVI_open_movie (const char *name, AviMovie *movie);
+AviError AVI_open_movie(const char *name, AviMovie *movie);
/**
* Read a frame from a movie stream.
*/
-void *AVI_read_frame (AviMovie *movie,
- AviFormat format,
- int frame,
- int stream);
+void *AVI_read_frame(AviMovie *movie,
+ AviFormat format,
+ int frame,
+ int stream);
/**
* Close an open movie stream.
*/
-AviError AVI_close (AviMovie *movie);
+AviError AVI_close(AviMovie *movie);
/**
* Write frames to a movie stream.
*/
-AviError AVI_write_frame (AviMovie *movie, int frame_num, ...);
+AviError AVI_write_frame(AviMovie *movie, int frame_num, ...);
/**
* Unused but still external
*/
-AviError AVI_print_error (AviError error);
-void AVI_set_debug (int mode);
+AviError AVI_print_error(AviError error);
+void AVI_set_debug(int mode);
#endif /* __AVI_AVI_H__ */
-
diff --git a/source/blender/avi/intern/avi.c b/source/blender/avi/intern/avi.c
index 59ce879520e..861e07f6eb3 100644
--- a/source/blender/avi/intern/avi.c
+++ b/source/blender/avi/intern/avi.c
@@ -1,7 +1,4 @@
/*
- *
- * This is external code.
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -31,6 +28,8 @@
/** \file blender/avi/intern/avi.c
* \ingroup avi
+ *
+ * This is external code.
*/
@@ -52,20 +51,20 @@
#include "endian.h"
-static int AVI_DEBUG=0;
+static int AVI_DEBUG = 0;
static char DEBUG_FCC[4];
#define DEBUG_PRINT(x) if (AVI_DEBUG) { printf("AVI DEBUG: " x); } (void)0
/* local functions */
-char *fcc_to_char (unsigned int fcc);
-char *tcc_to_char (unsigned int tcc);
+char *fcc_to_char(unsigned int fcc);
+char *tcc_to_char(unsigned int tcc);
/* implemetation */
-unsigned int GET_FCC (FILE *fp)
+unsigned int GET_FCC(FILE *fp)
{
unsigned char tmp[4];
@@ -74,10 +73,10 @@ unsigned int GET_FCC (FILE *fp)
tmp[2] = getc(fp);
tmp[3] = getc(fp);
- return FCC (tmp);
+ return FCC(tmp);
}
-unsigned int GET_TCC (FILE *fp)
+unsigned int GET_TCC(FILE *fp)
{
char tmp[5];
@@ -86,37 +85,37 @@ unsigned int GET_TCC (FILE *fp)
tmp[2] = 0;
tmp[3] = 0;
- return FCC (tmp);
+ return FCC(tmp);
}
-char *fcc_to_char (unsigned int fcc)
+char *fcc_to_char(unsigned int fcc)
{
- DEBUG_FCC[0]= (fcc)&127;
- DEBUG_FCC[1]= (fcc>>8)&127;
- DEBUG_FCC[2]= (fcc>>16)&127;
- DEBUG_FCC[3]= (fcc>>24)&127;
+ DEBUG_FCC[0] = (fcc) & 127;
+ DEBUG_FCC[1] = (fcc >> 8) & 127;
+ DEBUG_FCC[2] = (fcc >> 16) & 127;
+ DEBUG_FCC[3] = (fcc >> 24) & 127;
return DEBUG_FCC;
}
-char *tcc_to_char (unsigned int tcc)
+char *tcc_to_char(unsigned int tcc)
{
- DEBUG_FCC[0]= (tcc)&127;
- DEBUG_FCC[1]= (tcc>>8)&127;
- DEBUG_FCC[2]= 0;
- DEBUG_FCC[3]= 0;
+ DEBUG_FCC[0] = (tcc) & 127;
+ DEBUG_FCC[1] = (tcc >> 8) & 127;
+ DEBUG_FCC[2] = 0;
+ DEBUG_FCC[3] = 0;
return DEBUG_FCC;
}
-int AVI_get_stream (AviMovie *movie, int avist_type, int stream_num)
+int AVI_get_stream(AviMovie *movie, int avist_type, int stream_num)
{
int cur_stream;
if (movie == NULL)
return -AVI_ERROR_OPTION;
- for (cur_stream=0; cur_stream < movie->header->Streams; cur_stream++) {
+ for (cur_stream = 0; cur_stream < movie->header->Streams; cur_stream++) {
if (movie->streams[cur_stream].sh.Type == avist_type) {
if (stream_num == 0)
return cur_stream;
@@ -128,28 +127,28 @@ int AVI_get_stream (AviMovie *movie, int avist_type, int stream_num)
return -AVI_ERROR_FOUND;
}
-static int fcc_get_stream (int fcc)
+static int fcc_get_stream(int fcc)
{
char fccs[4];
fccs[0] = fcc;
- fccs[1] = fcc>>8;
- fccs[2] = fcc>>16;
- fccs[3] = fcc>>24;
+ fccs[1] = fcc >> 8;
+ fccs[2] = fcc >> 16;
+ fccs[3] = fcc >> 24;
- return 10*(fccs[0]-'0') + (fccs[1]-'0');
+ return 10 * (fccs[0] - '0') + (fccs[1] - '0');
}
-static int fcc_is_data (int fcc)
+static int fcc_is_data(int fcc)
{
char fccs[4];
fccs[0] = fcc;
- fccs[1] = fcc>>8;
- fccs[2] = fcc>>16;
- fccs[3] = fcc>>24;
+ fccs[1] = fcc >> 8;
+ fccs[2] = fcc >> 16;
+ fccs[3] = fcc >> 24;
- if (!isdigit (fccs[0]) || !isdigit (fccs[1]) || (fccs[2] != 'd' && fccs[2] != 'w'))
+ if (!isdigit(fccs[0]) || !isdigit(fccs[1]) || (fccs[2] != 'd' && fccs[2] != 'w'))
return 0;
if (fccs[3] != 'b' && fccs[3] != 'c')
return 0;
@@ -157,7 +156,7 @@ static int fcc_is_data (int fcc)
return 1;
}
-AviError AVI_print_error (AviError in_error)
+AviError AVI_print_error(AviError in_error)
{
int error;
@@ -167,56 +166,56 @@ AviError AVI_print_error (AviError in_error)
error = in_error;
switch (error) {
- case AVI_ERROR_NONE:
- break;
- case AVI_ERROR_COMPRESSION:
- printf ("AVI ERROR: compressed in an unsupported format\n");
- break;
- case AVI_ERROR_OPEN:
- printf ("AVI ERROR: could not open file\n");
- break;
- case AVI_ERROR_READING:
- printf ("AVI ERROR: could not read from file\n");
- break;
- case AVI_ERROR_WRITING:
- printf ("AVI ERROR: could not write to file\n");
- break;
- case AVI_ERROR_FORMAT:
- printf ("AVI ERROR: file is in an illegal or unrecognized format\n");
- break;
- case AVI_ERROR_ALLOC:
- printf ("AVI ERROR: error encountered while allocating memory\n");
- break;
- case AVI_ERROR_OPTION:
- printf ("AVI ERROR: program made illegal request\n");
- break;
- case AVI_ERROR_FOUND:
- printf ("AVI ERROR: movie did not contain expected item\n");
- break;
- default:
- break;
+ case AVI_ERROR_NONE:
+ break;
+ case AVI_ERROR_COMPRESSION:
+ printf("AVI ERROR: compressed in an unsupported format\n");
+ break;
+ case AVI_ERROR_OPEN:
+ printf("AVI ERROR: could not open file\n");
+ break;
+ case AVI_ERROR_READING:
+ printf("AVI ERROR: could not read from file\n");
+ break;
+ case AVI_ERROR_WRITING:
+ printf("AVI ERROR: could not write to file\n");
+ break;
+ case AVI_ERROR_FORMAT:
+ printf("AVI ERROR: file is in an illegal or unrecognized format\n");
+ break;
+ case AVI_ERROR_ALLOC:
+ printf("AVI ERROR: error encountered while allocating memory\n");
+ break;
+ case AVI_ERROR_OPTION:
+ printf("AVI ERROR: program made illegal request\n");
+ break;
+ case AVI_ERROR_FOUND:
+ printf("AVI ERROR: movie did not contain expected item\n");
+ break;
+ default:
+ break;
}
return in_error;
}
#if 0
-void AVI_set_debug (int mode)
+void AVI_set_debug(int mode)
{
- AVI_DEBUG= mode;
+ AVI_DEBUG = mode;
}
-int AVI_is_avi (char *name)
+int AVI_is_avi(char *name)
{
FILE *fp;
int ret;
- fp = fopen (name, "rb");
+ fp = fopen(name, "rb");
if (fp == NULL)
return 0;
- if (GET_FCC (fp) != FCC("RIFF") ||
- !GET_FCC (fp) ||
- GET_FCC (fp) != FCC("AVI ")) {
+ if (GET_FCC(fp) != FCC("RIFF") ||
+ !GET_FCC(fp) ||
+ GET_FCC(fp) != FCC("AVI ")) {
ret = 0;
}
else {
@@ -228,10 +227,10 @@ int AVI_is_avi (char *name)
}
#endif
-int AVI_is_avi (const char *name)
+int AVI_is_avi(const char *name)
{
int temp, fcca, j;
- AviMovie movie= {NULL};
+ AviMovie movie = {NULL};
AviMainHeader header;
AviBitmapInfoHeader bheader;
int movie_tracks = 0;
@@ -239,26 +238,26 @@ int AVI_is_avi (const char *name)
DEBUG_PRINT("opening movie\n");
movie.type = AVI_MOVIE_READ;
- movie.fp = fopen (name, "rb");
+ movie.fp = fopen(name, "rb");
movie.offset_table = NULL;
if (movie.fp == NULL)
return 0;
- if (GET_FCC (movie.fp) != FCC("RIFF") ||
- !(movie.size = GET_FCC (movie.fp))) {
+ if (GET_FCC(movie.fp) != FCC("RIFF") ||
+ !(movie.size = GET_FCC(movie.fp))) {
fclose(movie.fp);
return 0;
}
movie.header = &header;
- if (GET_FCC (movie.fp) != FCC("AVI ") ||
- GET_FCC (movie.fp) != FCC("LIST") ||
- !GET_FCC (movie.fp) ||
- GET_FCC (movie.fp) != FCC("hdrl") ||
- (movie.header->fcc = GET_FCC (movie.fp)) != FCC("avih") ||
- !(movie.header->size = GET_FCC (movie.fp))) {
+ if (GET_FCC(movie.fp) != FCC("AVI ") ||
+ GET_FCC(movie.fp) != FCC("LIST") ||
+ !GET_FCC(movie.fp) ||
+ GET_FCC(movie.fp) != FCC("hdrl") ||
+ (movie.header->fcc = GET_FCC(movie.fp)) != FCC("avih") ||
+ !(movie.header->size = GET_FCC(movie.fp))) {
DEBUG_PRINT("bad initial header info\n");
fclose(movie.fp);
return 0;
@@ -279,7 +278,7 @@ int AVI_is_avi (const char *name)
movie.header->Reserved[2] = GET_FCC(movie.fp);
movie.header->Reserved[3] = GET_FCC(movie.fp);
- fseek (movie.fp, movie.header->size-14*4, SEEK_CUR);
+ fseek(movie.fp, movie.header->size - 14 * 4, SEEK_CUR);
if (movie.header->Streams < 1) {
DEBUG_PRINT("streams less than 1\n");
@@ -287,15 +286,16 @@ int AVI_is_avi (const char *name)
return 0;
}
- movie.streams = (AviStreamRec *) MEM_callocN (sizeof(AviStreamRec) * movie.header->Streams, "moviestreams");
+ movie.streams = (AviStreamRec *) MEM_callocN(sizeof(AviStreamRec) * movie.header->Streams, "moviestreams");
- for (temp=0; temp < movie.header->Streams; temp++) {
+ for (temp = 0; temp < movie.header->Streams; temp++) {
if (GET_FCC(movie.fp) != FCC("LIST") ||
- !GET_FCC (movie.fp) ||
- GET_FCC (movie.fp) != FCC ("strl") ||
- (movie.streams[temp].sh.fcc = GET_FCC (movie.fp)) != FCC ("strh") ||
- !(movie.streams[temp].sh.size = GET_FCC (movie.fp))) {
+ !GET_FCC(movie.fp) ||
+ GET_FCC(movie.fp) != FCC("strl") ||
+ (movie.streams[temp].sh.fcc = GET_FCC(movie.fp)) != FCC("strh") ||
+ !(movie.streams[temp].sh.size = GET_FCC(movie.fp)))
+ {
DEBUG_PRINT("bad stream header information\n");
MEM_freeN(movie.streams);
@@ -303,20 +303,21 @@ int AVI_is_avi (const char *name)
return 0;
}
- movie.streams[temp].sh.Type = GET_FCC (movie.fp);
- movie.streams[temp].sh.Handler = GET_FCC (movie.fp);
+ movie.streams[temp].sh.Type = GET_FCC(movie.fp);
+ movie.streams[temp].sh.Handler = GET_FCC(movie.fp);
fcca = movie.streams[temp].sh.Handler;
if (movie.streams[temp].sh.Type == FCC("vids")) {
- if (fcca == FCC ("DIB ") ||
- fcca == FCC ("RGB ") ||
- fcca == FCC ("rgb ") ||
- fcca == FCC ("RAW ") ||
- fcca == 0) {
+ if (fcca == FCC("DIB ") ||
+ fcca == FCC("RGB ") ||
+ fcca == FCC("rgb ") ||
+ fcca == FCC("RAW ") ||
+ fcca == 0)
+ {
movie.streams[temp].format = AVI_FORMAT_AVI_RGB;
}
- else if (fcca == FCC ("mjpg")||fcca == FCC ("MJPG")) {
+ else if (fcca == FCC("mjpg") || fcca == FCC("MJPG")) {
movie.streams[temp].format = AVI_FORMAT_MJPEG;
}
else {
@@ -327,67 +328,70 @@ int AVI_is_avi (const char *name)
movie_tracks++;
}
- movie.streams[temp].sh.Flags = GET_FCC (movie.fp);
- movie.streams[temp].sh.Priority = GET_TCC (movie.fp);
- movie.streams[temp].sh.Language = GET_TCC (movie.fp);
- movie.streams[temp].sh.InitialFrames = GET_FCC (movie.fp);
- movie.streams[temp].sh.Scale = GET_FCC (movie.fp);
- movie.streams[temp].sh.Rate = GET_FCC (movie.fp);
- movie.streams[temp].sh.Start = GET_FCC (movie.fp);
- movie.streams[temp].sh.Length = GET_FCC (movie.fp);
- movie.streams[temp].sh.SuggestedBufferSize = GET_FCC (movie.fp);
- movie.streams[temp].sh.Quality = GET_FCC (movie.fp);
- movie.streams[temp].sh.SampleSize = GET_FCC (movie.fp);
- movie.streams[temp].sh.left = GET_TCC (movie.fp);
- movie.streams[temp].sh.top = GET_TCC (movie.fp);
- movie.streams[temp].sh.right = GET_TCC (movie.fp);
- movie.streams[temp].sh.bottom = GET_TCC (movie.fp);
-
- fseek (movie.fp, movie.streams[temp].sh.size-14*4, SEEK_CUR);
-
- if (GET_FCC (movie.fp) != FCC("strf")) {
+ movie.streams[temp].sh.Flags = GET_FCC(movie.fp);
+ movie.streams[temp].sh.Priority = GET_TCC(movie.fp);
+ movie.streams[temp].sh.Language = GET_TCC(movie.fp);
+ movie.streams[temp].sh.InitialFrames = GET_FCC(movie.fp);
+ movie.streams[temp].sh.Scale = GET_FCC(movie.fp);
+ movie.streams[temp].sh.Rate = GET_FCC(movie.fp);
+ movie.streams[temp].sh.Start = GET_FCC(movie.fp);
+ movie.streams[temp].sh.Length = GET_FCC(movie.fp);
+ movie.streams[temp].sh.SuggestedBufferSize = GET_FCC(movie.fp);
+ movie.streams[temp].sh.Quality = GET_FCC(movie.fp);
+ movie.streams[temp].sh.SampleSize = GET_FCC(movie.fp);
+ movie.streams[temp].sh.left = GET_TCC(movie.fp);
+ movie.streams[temp].sh.top = GET_TCC(movie.fp);
+ movie.streams[temp].sh.right = GET_TCC(movie.fp);
+ movie.streams[temp].sh.bottom = GET_TCC(movie.fp);
+
+ fseek(movie.fp, movie.streams[temp].sh.size - 14 * 4, SEEK_CUR);
+
+ if (GET_FCC(movie.fp) != FCC("strf")) {
DEBUG_PRINT("no stream format information\n");
MEM_freeN(movie.streams);
fclose(movie.fp);
return 0;
}
- movie.streams[temp].sf_size= GET_FCC(movie.fp);
+ movie.streams[temp].sf_size = GET_FCC(movie.fp);
if (movie.streams[temp].sh.Type == FCC("vids")) {
j = movie.streams[temp].sf_size - (sizeof(AviBitmapInfoHeader) - 8);
if (j >= 0) {
AviBitmapInfoHeader *bi;
- movie.streams[temp].sf= &bheader;
- bi= (AviBitmapInfoHeader *) movie.streams[temp].sf;
+ movie.streams[temp].sf = &bheader;
+ bi = (AviBitmapInfoHeader *) movie.streams[temp].sf;
- bi->fcc= FCC("strf");
- bi->size= movie.streams[temp].sf_size;
- bi->Size= GET_FCC(movie.fp);
- bi->Width= GET_FCC(movie.fp);
- bi->Height= GET_FCC(movie.fp);
- bi->Planes= GET_TCC(movie.fp);
- bi->BitCount= GET_TCC(movie.fp);
- bi->Compression= GET_FCC(movie.fp);
- bi->SizeImage= GET_FCC(movie.fp);
- bi->XPelsPerMeter= GET_FCC(movie.fp);
- bi->YPelsPerMeter= GET_FCC(movie.fp);
- bi->ClrUsed= GET_FCC(movie.fp);
- bi->ClrImportant= GET_FCC(movie.fp);
+ bi->fcc = FCC("strf");
+ bi->size = movie.streams[temp].sf_size;
+ bi->Size = GET_FCC(movie.fp);
+ bi->Width = GET_FCC(movie.fp);
+ bi->Height = GET_FCC(movie.fp);
+ bi->Planes = GET_TCC(movie.fp);
+ bi->BitCount = GET_TCC(movie.fp);
+ bi->Compression = GET_FCC(movie.fp);
+ bi->SizeImage = GET_FCC(movie.fp);
+ bi->XPelsPerMeter = GET_FCC(movie.fp);
+ bi->YPelsPerMeter = GET_FCC(movie.fp);
+ bi->ClrUsed = GET_FCC(movie.fp);
+ bi->ClrImportant = GET_FCC(movie.fp);
fcca = bi->Compression;
- if ( movie.streams[temp].format ==
- AVI_FORMAT_AVI_RGB) {
- if (fcca == FCC ("DIB ") ||
- fcca == FCC ("RGB ") ||
- fcca == FCC ("rgb ") ||
- fcca == FCC ("RAW ") ||
- fcca == 0 ) {
+ if (movie.streams[temp].format ==
+ AVI_FORMAT_AVI_RGB) {
+ if (fcca == FCC("DIB ") ||
+ fcca == FCC("RGB ") ||
+ fcca == FCC("rgb ") ||
+ fcca == FCC("RAW ") ||
+ fcca == 0)
+ {
+ /* pass */
}
- else if ( fcca == FCC ("mjpg") ||
- fcca == FCC ("MJPG")) {
- movie.streams[temp].format = AVI_FORMAT_MJPEG;
+ else if (fcca == FCC("mjpg") ||
+ fcca == FCC("MJPG"))
+ {
+ movie.streams[temp].format = AVI_FORMAT_MJPEG;
}
else {
MEM_freeN(movie.streams);
@@ -397,14 +401,14 @@ int AVI_is_avi (const char *name)
}
}
- if (j > 0) fseek (movie.fp, j, SEEK_CUR);
+ if (j > 0) fseek(movie.fp, j, SEEK_CUR);
}
- else fseek (movie.fp, movie.streams[temp].sf_size, SEEK_CUR);
+ else fseek(movie.fp, movie.streams[temp].sf_size, SEEK_CUR);
/* Walk to the next LIST */
- while (GET_FCC (movie.fp) != FCC("LIST")) {
- temp= GET_FCC (movie.fp);
- if (temp<0 || ftell(movie.fp) > movie.size) {
+ while (GET_FCC(movie.fp) != FCC("LIST")) {
+ temp = GET_FCC(movie.fp);
+ if (temp < 0 || ftell(movie.fp) > movie.size) {
DEBUG_PRINT("incorrect size in header or error in AVI\n");
MEM_freeN(movie.streams);
@@ -425,7 +429,7 @@ int AVI_is_avi (const char *name)
}
-AviError AVI_open_movie (const char *name, AviMovie *movie)
+AviError AVI_open_movie(const char *name, AviMovie *movie)
{
int temp, fcca, size, j;
@@ -434,24 +438,27 @@ AviError AVI_open_movie (const char *name, AviMovie *movie)
memset(movie, 0, sizeof(AviMovie));
movie->type = AVI_MOVIE_READ;
- movie->fp = fopen (name, "rb");
+ movie->fp = fopen(name, "rb");
movie->offset_table = NULL;
if (movie->fp == NULL)
return AVI_ERROR_OPEN;
- if (GET_FCC (movie->fp) != FCC("RIFF") ||
- !(movie->size = GET_FCC (movie->fp)))
+ if (GET_FCC(movie->fp) != FCC("RIFF") ||
+ !(movie->size = GET_FCC(movie->fp)))
+ {
return AVI_ERROR_FORMAT;
+ }
- movie->header = (AviMainHeader *) MEM_mallocN (sizeof (AviMainHeader), "movieheader");
+ movie->header = (AviMainHeader *) MEM_mallocN(sizeof (AviMainHeader), "movieheader");
- if (GET_FCC (movie->fp) != FCC("AVI ") ||
- GET_FCC (movie->fp) != FCC("LIST") ||
- !GET_FCC (movie->fp) ||
- GET_FCC (movie->fp) != FCC("hdrl") ||
- (movie->header->fcc = GET_FCC (movie->fp)) != FCC("avih") ||
- !(movie->header->size = GET_FCC (movie->fp))) {
+ if (GET_FCC(movie->fp) != FCC("AVI ") ||
+ GET_FCC(movie->fp) != FCC("LIST") ||
+ !GET_FCC(movie->fp) ||
+ GET_FCC(movie->fp) != FCC("hdrl") ||
+ (movie->header->fcc = GET_FCC(movie->fp)) != FCC("avih") ||
+ !(movie->header->size = GET_FCC(movie->fp)))
+ {
DEBUG_PRINT("bad initial header info\n");
return AVI_ERROR_FORMAT;
}
@@ -471,40 +478,42 @@ AviError AVI_open_movie (const char *name, AviMovie *movie)
movie->header->Reserved[2] = GET_FCC(movie->fp);
movie->header->Reserved[3] = GET_FCC(movie->fp);
- fseek (movie->fp, movie->header->size-14*4, SEEK_CUR);
+ fseek(movie->fp, movie->header->size - 14 * 4, SEEK_CUR);
if (movie->header->Streams < 1) {
DEBUG_PRINT("streams less than 1\n");
return AVI_ERROR_FORMAT;
}
- movie->streams = (AviStreamRec *) MEM_callocN (sizeof(AviStreamRec) * movie->header->Streams, "moviestreams");
+ movie->streams = (AviStreamRec *) MEM_callocN(sizeof(AviStreamRec) * movie->header->Streams, "moviestreams");
- for (temp=0; temp < movie->header->Streams; temp++) {
+ for (temp = 0; temp < movie->header->Streams; temp++) {
if (GET_FCC(movie->fp) != FCC("LIST") ||
- !GET_FCC (movie->fp) ||
- GET_FCC (movie->fp) != FCC ("strl") ||
- (movie->streams[temp].sh.fcc = GET_FCC (movie->fp)) != FCC ("strh") ||
- !(movie->streams[temp].sh.size = GET_FCC (movie->fp))) {
+ !GET_FCC(movie->fp) ||
+ GET_FCC(movie->fp) != FCC("strl") ||
+ (movie->streams[temp].sh.fcc = GET_FCC(movie->fp)) != FCC("strh") ||
+ !(movie->streams[temp].sh.size = GET_FCC(movie->fp)))
+ {
DEBUG_PRINT("bad stream header information\n");
- return AVI_ERROR_FORMAT;
+ return AVI_ERROR_FORMAT;
}
- movie->streams[temp].sh.Type = GET_FCC (movie->fp);
- movie->streams[temp].sh.Handler = GET_FCC (movie->fp);
+ movie->streams[temp].sh.Type = GET_FCC(movie->fp);
+ movie->streams[temp].sh.Handler = GET_FCC(movie->fp);
fcca = movie->streams[temp].sh.Handler;
if (movie->streams[temp].sh.Type == FCC("vids")) {
- if (fcca == FCC ("DIB ") ||
- fcca == FCC ("RGB ") ||
- fcca == FCC ("rgb ") ||
- fcca == FCC ("RAW ") ||
- fcca == 0) {
+ if (fcca == FCC("DIB ") ||
+ fcca == FCC("RGB ") ||
+ fcca == FCC("rgb ") ||
+ fcca == FCC("RAW ") ||
+ fcca == 0)
+ {
movie->streams[temp].format = AVI_FORMAT_AVI_RGB;
}
- else if (fcca == FCC ("mjpg")||fcca == FCC ("MJPG")) {
+ else if (fcca == FCC("mjpg") || fcca == FCC("MJPG")) {
movie->streams[temp].format = AVI_FORMAT_MJPEG;
}
else {
@@ -512,66 +521,70 @@ AviError AVI_open_movie (const char *name, AviMovie *movie)
}
}
- movie->streams[temp].sh.Flags = GET_FCC (movie->fp);
- movie->streams[temp].sh.Priority = GET_TCC (movie->fp);
- movie->streams[temp].sh.Language = GET_TCC (movie->fp);
- movie->streams[temp].sh.InitialFrames = GET_FCC (movie->fp);
- movie->streams[temp].sh.Scale = GET_FCC (movie->fp);
- movie->streams[temp].sh.Rate = GET_FCC (movie->fp);
- movie->streams[temp].sh.Start = GET_FCC (movie->fp);
- movie->streams[temp].sh.Length = GET_FCC (movie->fp);
- movie->streams[temp].sh.SuggestedBufferSize = GET_FCC (movie->fp);
- movie->streams[temp].sh.Quality = GET_FCC (movie->fp);
- movie->streams[temp].sh.SampleSize = GET_FCC (movie->fp);
- movie->streams[temp].sh.left = GET_TCC (movie->fp);
- movie->streams[temp].sh.top = GET_TCC (movie->fp);
- movie->streams[temp].sh.right = GET_TCC (movie->fp);
- movie->streams[temp].sh.bottom = GET_TCC (movie->fp);
-
- fseek (movie->fp, movie->streams[temp].sh.size-14*4, SEEK_CUR);
-
- if (GET_FCC (movie->fp) != FCC("strf")) {
+ movie->streams[temp].sh.Flags = GET_FCC(movie->fp);
+ movie->streams[temp].sh.Priority = GET_TCC(movie->fp);
+ movie->streams[temp].sh.Language = GET_TCC(movie->fp);
+ movie->streams[temp].sh.InitialFrames = GET_FCC(movie->fp);
+ movie->streams[temp].sh.Scale = GET_FCC(movie->fp);
+ movie->streams[temp].sh.Rate = GET_FCC(movie->fp);
+ movie->streams[temp].sh.Start = GET_FCC(movie->fp);
+ movie->streams[temp].sh.Length = GET_FCC(movie->fp);
+ movie->streams[temp].sh.SuggestedBufferSize = GET_FCC(movie->fp);
+ movie->streams[temp].sh.Quality = GET_FCC(movie->fp);
+ movie->streams[temp].sh.SampleSize = GET_FCC(movie->fp);
+ movie->streams[temp].sh.left = GET_TCC(movie->fp);
+ movie->streams[temp].sh.top = GET_TCC(movie->fp);
+ movie->streams[temp].sh.right = GET_TCC(movie->fp);
+ movie->streams[temp].sh.bottom = GET_TCC(movie->fp);
+
+ fseek(movie->fp, movie->streams[temp].sh.size - 14 * 4, SEEK_CUR);
+
+ if (GET_FCC(movie->fp) != FCC("strf")) {
DEBUG_PRINT("no stream format information\n");
return AVI_ERROR_FORMAT;
}
- movie->streams[temp].sf_size= GET_FCC(movie->fp);
+ movie->streams[temp].sf_size = GET_FCC(movie->fp);
if (movie->streams[temp].sh.Type == FCC("vids")) {
j = movie->streams[temp].sf_size - (sizeof(AviBitmapInfoHeader) - 8);
if (j >= 0) {
AviBitmapInfoHeader *bi;
- movie->streams[temp].sf= MEM_mallocN(sizeof(AviBitmapInfoHeader), "streamformat");
+ movie->streams[temp].sf = MEM_mallocN(sizeof(AviBitmapInfoHeader), "streamformat");
- bi= (AviBitmapInfoHeader *) movie->streams[temp].sf;
+ bi = (AviBitmapInfoHeader *) movie->streams[temp].sf;
- bi->fcc= FCC("strf");
- bi->size= movie->streams[temp].sf_size;
- bi->Size= GET_FCC(movie->fp);
- bi->Width= GET_FCC(movie->fp);
- bi->Height= GET_FCC(movie->fp);
- bi->Planes= GET_TCC(movie->fp);
- bi->BitCount= GET_TCC(movie->fp);
- bi->Compression= GET_FCC(movie->fp);
- bi->SizeImage= GET_FCC(movie->fp);
- bi->XPelsPerMeter= GET_FCC(movie->fp);
- bi->YPelsPerMeter= GET_FCC(movie->fp);
- bi->ClrUsed= GET_FCC(movie->fp);
- bi->ClrImportant= GET_FCC(movie->fp);
+ bi->fcc = FCC("strf");
+ bi->size = movie->streams[temp].sf_size;
+ bi->Size = GET_FCC(movie->fp);
+ bi->Width = GET_FCC(movie->fp);
+ bi->Height = GET_FCC(movie->fp);
+ bi->Planes = GET_TCC(movie->fp);
+ bi->BitCount = GET_TCC(movie->fp);
+ bi->Compression = GET_FCC(movie->fp);
+ bi->SizeImage = GET_FCC(movie->fp);
+ bi->XPelsPerMeter = GET_FCC(movie->fp);
+ bi->YPelsPerMeter = GET_FCC(movie->fp);
+ bi->ClrUsed = GET_FCC(movie->fp);
+ bi->ClrImportant = GET_FCC(movie->fp);
fcca = bi->Compression;
- if ( movie->streams[temp].format ==
- AVI_FORMAT_AVI_RGB) {
- if (fcca == FCC ("DIB ") ||
- fcca == FCC ("RGB ") ||
- fcca == FCC ("rgb ") ||
- fcca == FCC ("RAW ") ||
- fcca == 0 ) {
+ if (movie->streams[temp].format ==
+ AVI_FORMAT_AVI_RGB)
+ {
+ if (fcca == FCC("DIB ") ||
+ fcca == FCC("RGB ") ||
+ fcca == FCC("rgb ") ||
+ fcca == FCC("RAW ") ||
+ fcca == 0)
+ {
+ /* pass */
}
- else if ( fcca == FCC ("mjpg") ||
- fcca == FCC ("MJPG")) {
- movie->streams[temp].format = AVI_FORMAT_MJPEG;
+ else if (fcca == FCC("mjpg") ||
+ fcca == FCC("MJPG"))
+ {
+ movie->streams[temp].format = AVI_FORMAT_MJPEG;
}
else {
return AVI_ERROR_COMPRESSION;
@@ -579,38 +592,38 @@ AviError AVI_open_movie (const char *name, AviMovie *movie)
}
}
- if (j > 0) fseek (movie->fp, j, SEEK_CUR);
+ if (j > 0) fseek(movie->fp, j, SEEK_CUR);
}
- else fseek (movie->fp, movie->streams[temp].sf_size, SEEK_CUR);
+ else fseek(movie->fp, movie->streams[temp].sf_size, SEEK_CUR);
/* Walk to the next LIST */
- while (GET_FCC (movie->fp) != FCC("LIST")) {
- temp= GET_FCC (movie->fp);
- if (temp<0 || ftell(movie->fp) > movie->size) {
+ while (GET_FCC(movie->fp) != FCC("LIST")) {
+ temp = GET_FCC(movie->fp);
+ if (temp < 0 || ftell(movie->fp) > movie->size) {
DEBUG_PRINT("incorrect size in header or error in AVI\n");
- return AVI_ERROR_FORMAT;
+ return AVI_ERROR_FORMAT;
}
- fseek(movie->fp, temp, SEEK_CUR);
+ fseek(movie->fp, temp, SEEK_CUR);
}
- fseek(movie->fp, -4L, SEEK_CUR);
+ fseek(movie->fp, -4L, SEEK_CUR);
}
while (1) {
- temp = GET_FCC (movie->fp);
- size = GET_FCC (movie->fp);
+ temp = GET_FCC(movie->fp);
+ size = GET_FCC(movie->fp);
if (size == 0)
break;
if (temp == FCC("LIST")) {
- if (GET_FCC(movie->fp) == FCC ("movi"))
+ if (GET_FCC(movie->fp) == FCC("movi"))
break;
else
- fseek (movie->fp, size-4, SEEK_CUR);
+ fseek(movie->fp, size - 4, SEEK_CUR);
}
else {
- fseek (movie->fp, size, SEEK_CUR);
+ fseek(movie->fp, size, SEEK_CUR);
}
if (ftell(movie->fp) > movie->size) {
DEBUG_PRINT("incorrect size in header or error in AVI\n");
@@ -618,31 +631,31 @@ AviError AVI_open_movie (const char *name, AviMovie *movie)
}
}
- movie->movi_offset = ftell (movie->fp);
+ movie->movi_offset = ftell(movie->fp);
movie->read_offset = movie->movi_offset;
/* Read in the index if the file has one, otherwise create one */
if (movie->header->Flags & AVIF_HASINDEX) {
- fseek(movie->fp, size-4, SEEK_CUR);
+ fseek(movie->fp, size - 4, SEEK_CUR);
if (GET_FCC(movie->fp) != FCC("idx1")) {
DEBUG_PRINT("bad index informatio\n");
return AVI_ERROR_FORMAT;
}
- movie->index_entries = GET_FCC (movie->fp)/sizeof(AviIndexEntry);
+ movie->index_entries = GET_FCC(movie->fp) / sizeof(AviIndexEntry);
if (movie->index_entries == 0) {
DEBUG_PRINT("no index entries\n");
return AVI_ERROR_FORMAT;
}
- movie->entries = (AviIndexEntry *) MEM_mallocN (movie->index_entries * sizeof(AviIndexEntry),"movieentries");
+ movie->entries = (AviIndexEntry *) MEM_mallocN(movie->index_entries * sizeof(AviIndexEntry), "movieentries");
- for (temp=0; temp < movie->index_entries; temp++) {
- movie->entries[temp].ChunkId = GET_FCC (movie->fp);
- movie->entries[temp].Flags = GET_FCC (movie->fp);
- movie->entries[temp].Offset = GET_FCC (movie->fp);
- movie->entries[temp].Size = GET_FCC (movie->fp);
+ for (temp = 0; temp < movie->index_entries; temp++) {
+ movie->entries[temp].ChunkId = GET_FCC(movie->fp);
+ movie->entries[temp].Flags = GET_FCC(movie->fp);
+ movie->entries[temp].Offset = GET_FCC(movie->fp);
+ movie->entries[temp].Size = GET_FCC(movie->fp);
if (AVI_DEBUG) {
printf("Index entry %04d: ChunkId:%s Flags:%d Offset:%d Size:%d\n",
@@ -659,31 +672,32 @@ AviError AVI_open_movie (const char *name, AviMovie *movie)
* undetermined reason */
if (movie->entries[0].Offset == movie->movi_offset)
- movie->read_offset= 4;
+ movie->read_offset = 4;
}
DEBUG_PRINT("movie succesfully opened\n");
return AVI_ERROR_NONE;
}
-void *AVI_read_frame (AviMovie *movie, AviFormat format, int frame, int stream)
+void *AVI_read_frame(AviMovie *movie, AviFormat format, int frame, int stream)
{
- int cur_frame=-1, temp, i=0, rewind=1;
+ int cur_frame = -1, temp, i = 0, rewind = 1;
void *buffer;
/* Retrieve the record number of the desired frame in the index
* If a chunk has Size 0 we need to rewind to previous frame */
while (rewind && frame > -1) {
- i=0;
- cur_frame=-1;
+ i = 0;
+ cur_frame = -1;
rewind = 0;
while (cur_frame < frame && i < movie->index_entries) {
- if (fcc_is_data (movie->entries[i].ChunkId) &&
- fcc_get_stream (movie->entries[i].ChunkId) == stream) {
- if ((cur_frame == frame -1) && (movie->entries[i].Size == 0)) {
+ if (fcc_is_data(movie->entries[i].ChunkId) &&
+ fcc_get_stream(movie->entries[i].ChunkId) == stream)
+ {
+ if ((cur_frame == frame - 1) && (movie->entries[i].Size == 0)) {
rewind = 1;
- frame = frame -1;
+ frame = frame - 1;
}
else {
cur_frame++;
@@ -696,46 +710,46 @@ void *AVI_read_frame (AviMovie *movie, AviFormat format, int frame, int stream)
if (cur_frame != frame) return NULL;
- fseek (movie->fp, movie->read_offset + movie->entries[i-1].Offset, SEEK_SET);
+ fseek(movie->fp, movie->read_offset + movie->entries[i - 1].Offset, SEEK_SET);
temp = GET_FCC(movie->fp);
- buffer = MEM_mallocN (temp,"readbuffer");
+ buffer = MEM_mallocN(temp, "readbuffer");
- if (fread (buffer, 1, temp, movie->fp) != temp) {
+ if (fread(buffer, 1, temp, movie->fp) != temp) {
MEM_freeN(buffer);
return NULL;
}
- buffer = avi_format_convert (movie, stream, buffer, movie->streams[stream].format, format, &temp);
+ buffer = avi_format_convert(movie, stream, buffer, movie->streams[stream].format, format, &temp);
return buffer;
}
-AviError AVI_close (AviMovie *movie)
+AviError AVI_close(AviMovie *movie)
{
int i;
- fclose (movie->fp);
+ fclose(movie->fp);
- for (i=0; i < movie->header->Streams; i++) {
+ for (i = 0; i < movie->header->Streams; i++) {
if (movie->streams[i].sf != NULL)
- MEM_freeN (movie->streams[i].sf);
+ MEM_freeN(movie->streams[i].sf);
}
if (movie->header != NULL)
- MEM_freeN (movie->header);
- if (movie->streams!= NULL)
- MEM_freeN (movie->streams);
+ MEM_freeN(movie->header);
+ if (movie->streams != NULL)
+ MEM_freeN(movie->streams);
if (movie->entries != NULL)
- MEM_freeN (movie->entries);
+ MEM_freeN(movie->entries);
if (movie->offset_table != NULL)
- MEM_freeN (movie->offset_table);
+ MEM_freeN(movie->offset_table);
return AVI_ERROR_NONE;
}
-AviError AVI_open_compress (char *name, AviMovie *movie, int streams, ...)
+AviError AVI_open_compress(char *name, AviMovie *movie, int streams, ...)
{
va_list ap;
AviList list;
@@ -746,21 +760,21 @@ AviError AVI_open_compress (char *name, AviMovie *movie, int streams, ...)
int64_t junk_pos;
movie->type = AVI_MOVIE_WRITE;
- movie->fp = fopen (name, "wb");
+ movie->fp = fopen(name, "wb");
movie->index_entries = 0;
if (movie->fp == NULL)
return AVI_ERROR_OPEN;
- movie->offset_table = (int64_t *) MEM_mallocN ((1+streams*2) * sizeof (int64_t),"offsettable");
+ movie->offset_table = (int64_t *) MEM_mallocN((1 + streams * 2) * sizeof (int64_t), "offsettable");
- for (i=0; i < 1 + streams*2; i++)
+ for (i = 0; i < 1 + streams * 2; i++)
movie->offset_table[i] = -1L;
movie->entries = NULL;
- movie->header = (AviMainHeader *) MEM_mallocN (sizeof(AviMainHeader),"movieheader");
+ movie->header = (AviMainHeader *) MEM_mallocN(sizeof(AviMainHeader), "movieheader");
movie->header->fcc = FCC("avih");
movie->header->size = 56;
@@ -779,20 +793,20 @@ AviError AVI_open_compress (char *name, AviMovie *movie, int streams, ...)
movie->header->Reserved[2] = 0;
movie->header->Reserved[3] = 0;
- movie->streams = (AviStreamRec *) MEM_mallocN (sizeof(AviStreamRec) * movie->header->Streams,"moviestreams");
+ movie->streams = (AviStreamRec *) MEM_mallocN(sizeof(AviStreamRec) * movie->header->Streams, "moviestreams");
- va_start (ap, streams);
+ va_start(ap, streams);
- for (i=0; i < movie->header->Streams; i++) {
+ for (i = 0; i < movie->header->Streams; i++) {
movie->streams[i].format = va_arg(ap, AviFormat);
- movie->streams[i].sh.fcc = FCC ("strh");
+ movie->streams[i].sh.fcc = FCC("strh");
movie->streams[i].sh.size = 56;
- movie->streams[i].sh.Type = avi_get_format_type (movie->streams[i].format);
+ movie->streams[i].sh.Type = avi_get_format_type(movie->streams[i].format);
if (movie->streams[i].sh.Type == 0)
return AVI_ERROR_FORMAT;
- movie->streams[i].sh.Handler = avi_get_format_fcc (movie->streams[i].format);
+ movie->streams[i].sh.Handler = avi_get_format_fcc(movie->streams[i].format);
if (movie->streams[i].sh.Handler == 0)
return AVI_ERROR_FORMAT;
@@ -815,30 +829,30 @@ AviError AVI_open_compress (char *name, AviMovie *movie, int streams, ...)
if (movie->streams[i].sh.Type == FCC("vids")) {
#if 0
if (movie->streams[i].format == AVI_FORMAT_MJPEG) {
- movie->streams[i].sf = MEM_mallocN (sizeof(AviBitmapInfoHeader)
- + sizeof(AviMJPEGUnknown),"moviestreamformatL");
+ movie->streams[i].sf = MEM_mallocN(sizeof(AviBitmapInfoHeader)
+ + sizeof(AviMJPEGUnknown), "moviestreamformatL");
movie->streams[i].sf_size = sizeof(AviBitmapInfoHeader) + sizeof(AviMJPEGUnknown);
}
else {
#endif
- movie->streams[i].sf = MEM_mallocN (sizeof(AviBitmapInfoHeader), "moviestreamformatS");
+ movie->streams[i].sf = MEM_mallocN(sizeof(AviBitmapInfoHeader), "moviestreamformatS");
movie->streams[i].sf_size = sizeof(AviBitmapInfoHeader);
- ((AviBitmapInfoHeader *) movie->streams[i].sf)->fcc = FCC ("strf");
+ ((AviBitmapInfoHeader *) movie->streams[i].sf)->fcc = FCC("strf");
((AviBitmapInfoHeader *) movie->streams[i].sf)->size = movie->streams[i].sf_size - 8;
((AviBitmapInfoHeader *) movie->streams[i].sf)->Size = movie->streams[i].sf_size - 8;
((AviBitmapInfoHeader *) movie->streams[i].sf)->Width = 0;
((AviBitmapInfoHeader *) movie->streams[i].sf)->Height = 0;
((AviBitmapInfoHeader *) movie->streams[i].sf)->Planes = 1;
((AviBitmapInfoHeader *) movie->streams[i].sf)->BitCount = 24;
- ((AviBitmapInfoHeader *) movie->streams[i].sf)->Compression = avi_get_format_compression (movie->streams[i].format);
+ ((AviBitmapInfoHeader *) movie->streams[i].sf)->Compression = avi_get_format_compression(movie->streams[i].format);
((AviBitmapInfoHeader *) movie->streams[i].sf)->SizeImage = 0;
((AviBitmapInfoHeader *) movie->streams[i].sf)->XPelsPerMeter = 0;
((AviBitmapInfoHeader *) movie->streams[i].sf)->YPelsPerMeter = 0;
((AviBitmapInfoHeader *) movie->streams[i].sf)->ClrUsed = 0;
((AviBitmapInfoHeader *) movie->streams[i].sf)->ClrImportant = 0;
-/*
+#if 0
if (movie->streams[i].format == AVI_FORMAT_MJPEG) {
AviMJPEGUnknown *tmp;
@@ -856,7 +870,7 @@ AviError AVI_open_compress (char *name, AviMovie *movie, int streams, ...)
else if (movie->streams[i].sh.Type == FCC("auds")) {
// pass
}
-*/
+#endif
}
}
@@ -864,53 +878,53 @@ AviError AVI_open_compress (char *name, AviMovie *movie, int streams, ...)
list.size = 0;
list.ids = FCC("AVI ");
- awrite (movie, &list, 1, sizeof(AviList), movie->fp, AVI_LIST);
+ awrite(movie, &list, 1, sizeof(AviList), movie->fp, AVI_LIST);
list.fcc = FCC("LIST");
list.size = 0;
list.ids = FCC("hdrl");
- awrite (movie, &list, 1, sizeof(AviList), movie->fp, AVI_LIST);
+ awrite(movie, &list, 1, sizeof(AviList), movie->fp, AVI_LIST);
header_pos1 = ftell(movie->fp);
movie->offset_table[0] = ftell(movie->fp);
- awrite (movie, movie->header, 1, sizeof(AviMainHeader), movie->fp, AVI_MAINH);
+ awrite(movie, movie->header, 1, sizeof(AviMainHeader), movie->fp, AVI_MAINH);
- for (i=0; i < movie->header->Streams; i++) {
+ for (i = 0; i < movie->header->Streams; i++) {
list.fcc = FCC("LIST");
list.size = 0;
list.ids = FCC("strl");
- awrite (movie, &list, 1, sizeof(AviList), movie->fp, AVI_LIST);
+ awrite(movie, &list, 1, sizeof(AviList), movie->fp, AVI_LIST);
stream_pos1 = ftell(movie->fp);
- movie->offset_table[1+i*2] = ftell(movie->fp);
- awrite (movie, &movie->streams[i].sh, 1, sizeof(AviStreamHeader), movie->fp, AVI_STREAMH);
+ movie->offset_table[1 + i * 2] = ftell(movie->fp);
+ awrite(movie, &movie->streams[i].sh, 1, sizeof(AviStreamHeader), movie->fp, AVI_STREAMH);
- movie->offset_table[1+i*2+1] = ftell(movie->fp);
- awrite (movie, movie->streams[i].sf, 1, movie->streams[i].sf_size, movie->fp, AVI_BITMAPH);
+ movie->offset_table[1 + i * 2 + 1] = ftell(movie->fp);
+ awrite(movie, movie->streams[i].sf, 1, movie->streams[i].sf_size, movie->fp, AVI_BITMAPH);
stream_pos2 = ftell(movie->fp);
- fseek (movie->fp, stream_pos1-8, SEEK_SET);
+ fseek(movie->fp, stream_pos1 - 8, SEEK_SET);
- PUT_FCCN((stream_pos2-stream_pos1+4L), movie->fp);
+ PUT_FCCN((stream_pos2 - stream_pos1 + 4L), movie->fp);
- fseek (movie->fp, stream_pos2, SEEK_SET);
+ fseek(movie->fp, stream_pos2, SEEK_SET);
}
- junk_pos= ftell(movie->fp);
+ junk_pos = ftell(movie->fp);
if (junk_pos < 2024 - 8) {
chunk.fcc = FCC("JUNK");
chunk.size = 2024 - 8 - (int)junk_pos;
- awrite (movie, &chunk, 1, sizeof(AviChunk), movie->fp, AVI_CHUNK);
+ awrite(movie, &chunk, 1, sizeof(AviChunk), movie->fp, AVI_CHUNK);
- for (i=0; i < chunk.size; i++)
+ for (i = 0; i < chunk.size; i++)
putc(0, movie->fp);
}
@@ -920,18 +934,18 @@ AviError AVI_open_compress (char *name, AviMovie *movie, int streams, ...)
list.size = 0;
list.ids = FCC("movi");
- awrite (movie, &list, 1, sizeof(AviList), movie->fp, AVI_LIST);
+ awrite(movie, &list, 1, sizeof(AviList), movie->fp, AVI_LIST);
- movie->movi_offset = ftell(movie->fp)-8L;
+ movie->movi_offset = ftell(movie->fp) - 8L;
- fseek (movie->fp, AVI_HDRL_SOFF, SEEK_SET);
+ fseek(movie->fp, AVI_HDRL_SOFF, SEEK_SET);
- PUT_FCCN((header_pos2-header_pos1+4L), movie->fp);
+ PUT_FCCN((header_pos2 - header_pos1 + 4L), movie->fp);
return AVI_ERROR_NONE;
}
-AviError AVI_write_frame (AviMovie *movie, int frame_num, ...)
+AviError AVI_write_frame(AviMovie *movie, int frame_num, ...)
{
AviList list;
AviChunk chunk;
@@ -948,133 +962,132 @@ AviError AVI_write_frame (AviMovie *movie, int frame_num, ...)
/* Allocate the new memory for the index entry */
- if (frame_num+1 > movie->index_entries) {
- temp = (AviIndexEntry *) MEM_mallocN ((frame_num+1) *
- (movie->header->Streams+1) * sizeof(AviIndexEntry),"newidxentry");
+ if (frame_num + 1 > movie->index_entries) {
+ temp = (AviIndexEntry *) MEM_mallocN((frame_num + 1) *
+ (movie->header->Streams + 1) * sizeof(AviIndexEntry), "newidxentry");
if (movie->entries != NULL) {
- memcpy (temp, movie->entries, movie->index_entries * (movie->header->Streams+1)
- * sizeof(AviIndexEntry));
- MEM_freeN (movie->entries);
+ memcpy(temp, movie->entries, movie->index_entries * (movie->header->Streams + 1) * sizeof(AviIndexEntry));
+ MEM_freeN(movie->entries);
}
movie->entries = temp;
- movie->index_entries = frame_num+1;
+ movie->index_entries = frame_num + 1;
}
/* Slap a new record entry onto the end of the file */
- fseek (movie->fp, 0L, SEEK_END);
+ fseek(movie->fp, 0L, SEEK_END);
list.fcc = FCC("LIST");
list.size = 0;
list.ids = FCC("rec ");
- awrite (movie, &list, 1, sizeof(AviList), movie->fp, AVI_LIST);
+ awrite(movie, &list, 1, sizeof(AviList), movie->fp, AVI_LIST);
- rec_off = ftell (movie->fp)-8L;
+ rec_off = ftell(movie->fp) - 8L;
/* Write a frame for every stream */
- va_start (ap, frame_num);
+ va_start(ap, frame_num);
- for (stream=0; stream < movie->header->Streams; stream++) {
- unsigned int tbuf=0;
+ for (stream = 0; stream < movie->header->Streams; stream++) {
+ unsigned int tbuf = 0;
- format = va_arg (ap, AviFormat);
- buffer = va_arg (ap, void*);
- size = va_arg (ap, int);
+ format = va_arg(ap, AviFormat);
+ buffer = va_arg(ap, void *);
+ size = va_arg(ap, int);
/* Convert the buffer into the output format */
- buffer = avi_format_convert (movie, stream, buffer, format, movie->streams[stream].format, &size);
+ buffer = avi_format_convert(movie, stream, buffer, format, movie->streams[stream].format, &size);
/* Write the header info for this data chunk */
- fseek (movie->fp, 0L, SEEK_END);
+ fseek(movie->fp, 0L, SEEK_END);
- chunk.fcc = avi_get_data_id (format, stream);
+ chunk.fcc = avi_get_data_id(format, stream);
chunk.size = size;
- if (size%4) chunk.size += 4 - size%4;
+ if (size % 4) chunk.size += 4 - size % 4;
- awrite (movie, &chunk, 1, sizeof(AviChunk), movie->fp, AVI_CHUNK);
+ awrite(movie, &chunk, 1, sizeof(AviChunk), movie->fp, AVI_CHUNK);
/* Write the index entry for this data chunk */
- movie->entries[frame_num * (movie->header->Streams+1) + stream + 1].ChunkId = chunk.fcc;
- movie->entries[frame_num * (movie->header->Streams+1) + stream + 1].Flags = AVIIF_KEYFRAME;
- movie->entries[frame_num * (movie->header->Streams+1) + stream + 1].Offset = ftell(movie->fp)-12L-movie->movi_offset;
- movie->entries[frame_num * (movie->header->Streams+1) + stream + 1].Size = chunk.size;
+ movie->entries[frame_num * (movie->header->Streams + 1) + stream + 1].ChunkId = chunk.fcc;
+ movie->entries[frame_num * (movie->header->Streams + 1) + stream + 1].Flags = AVIIF_KEYFRAME;
+ movie->entries[frame_num * (movie->header->Streams + 1) + stream + 1].Offset = (int)(ftell(movie->fp) - 12L - movie->movi_offset);
+ movie->entries[frame_num * (movie->header->Streams + 1) + stream + 1].Size = chunk.size;
/* Write the chunk */
- awrite (movie, buffer, 1, size, movie->fp, AVI_RAW);
- MEM_freeN (buffer);
+ awrite(movie, buffer, 1, size, movie->fp, AVI_RAW);
+ MEM_freeN(buffer);
- if (size%4) awrite (movie, &tbuf, 1, 4-size%4, movie->fp, AVI_RAW);
+ if (size % 4) awrite(movie, &tbuf, 1, 4 - size % 4, movie->fp, AVI_RAW);
/* Update the stream headers length field */
movie->streams[stream].sh.Length++;
- fseek (movie->fp, movie->offset_table[1+stream*2], SEEK_SET);
- awrite (movie, &movie->streams[stream].sh, 1, sizeof(AviStreamHeader), movie->fp, AVI_STREAMH);
+ fseek(movie->fp, movie->offset_table[1 + stream * 2], SEEK_SET);
+ awrite(movie, &movie->streams[stream].sh, 1, sizeof(AviStreamHeader), movie->fp, AVI_STREAMH);
}
- va_end (ap);
+ va_end(ap);
/* Record the entry for the new record */
- fseek (movie->fp, 0L, SEEK_END);
+ fseek(movie->fp, 0L, SEEK_END);
- movie->entries[frame_num * (movie->header->Streams+1)].ChunkId = FCC("rec ");
- movie->entries[frame_num * (movie->header->Streams+1)].Flags = AVIIF_LIST;
- movie->entries[frame_num * (movie->header->Streams+1)].Offset = rec_off-8L-movie->movi_offset;
- movie->entries[frame_num * (movie->header->Streams+1)].Size = ftell(movie->fp)-(rec_off+4L);
+ movie->entries[frame_num * (movie->header->Streams + 1)].ChunkId = FCC("rec ");
+ movie->entries[frame_num * (movie->header->Streams + 1)].Flags = AVIIF_LIST;
+ movie->entries[frame_num * (movie->header->Streams + 1)].Offset = (int)(rec_off - 8L - movie->movi_offset);
+ movie->entries[frame_num * (movie->header->Streams + 1)].Size = (int)(ftell(movie->fp) - (rec_off + 4L));
/* Update the record size */
- fseek (movie->fp, rec_off, SEEK_SET);
- PUT_FCCN (movie->entries[frame_num * (movie->header->Streams+1)].Size, movie->fp);
+ fseek(movie->fp, rec_off, SEEK_SET);
+ PUT_FCCN(movie->entries[frame_num * (movie->header->Streams + 1)].Size, movie->fp);
/* Update the main header information in the file */
movie->header->TotalFrames++;
- fseek (movie->fp, movie->offset_table[0], SEEK_SET);
- awrite (movie, movie->header, 1, sizeof(AviMainHeader), movie->fp, AVI_MAINH);
+ fseek(movie->fp, movie->offset_table[0], SEEK_SET);
+ awrite(movie, movie->header, 1, sizeof(AviMainHeader), movie->fp, AVI_MAINH);
return AVI_ERROR_NONE;
}
-AviError AVI_close_compress (AviMovie *movie)
+AviError AVI_close_compress(AviMovie *movie)
{
int temp, movi_size, i;
- fseek (movie->fp, 0L, SEEK_END);
- movi_size = ftell (movie->fp);
+ fseek(movie->fp, 0L, SEEK_END);
+ movi_size = (int)ftell(movie->fp);
- PUT_FCC ("idx1", movie->fp);
- PUT_FCCN ((movie->index_entries*(movie->header->Streams+1)*16), movie->fp);
+ PUT_FCC("idx1", movie->fp);
+ PUT_FCCN((movie->index_entries * (movie->header->Streams + 1) * 16), movie->fp);
- for (temp=0; temp < movie->index_entries*(movie->header->Streams+1); temp++)
- awrite (movie, &movie->entries[temp], 1, sizeof(AviIndexEntry), movie->fp, AVI_INDEXE);
+ for (temp = 0; temp < movie->index_entries * (movie->header->Streams + 1); temp++)
+ awrite(movie, &movie->entries[temp], 1, sizeof(AviIndexEntry), movie->fp, AVI_INDEXE);
- temp = ftell (movie->fp);
+ temp = (int)ftell(movie->fp);
- fseek (movie->fp, AVI_RIFF_SOFF, SEEK_SET);
+ fseek(movie->fp, AVI_RIFF_SOFF, SEEK_SET);
- PUT_FCCN((temp-8L), movie->fp);
+ PUT_FCCN((temp - 8L), movie->fp);
- fseek (movie->fp, movie->movi_offset, SEEK_SET);
+ fseek(movie->fp, movie->movi_offset, SEEK_SET);
- PUT_FCCN((movi_size-(movie->movi_offset+4L)),movie->fp);
+ PUT_FCCN((movi_size - (movie->movi_offset + 4L)), movie->fp);
- fclose (movie->fp);
+ fclose(movie->fp);
- for (i=0; i < movie->header->Streams; i++) {
+ for (i = 0; i < movie->header->Streams; i++) {
if (movie->streams[i].sf != NULL)
- MEM_freeN (movie->streams[i].sf);
+ MEM_freeN(movie->streams[i].sf);
}
if (movie->header != NULL)
- MEM_freeN (movie->header);
+ MEM_freeN(movie->header);
if (movie->entries != NULL)
- MEM_freeN (movie->entries);
+ MEM_freeN(movie->entries);
if (movie->streams != NULL)
- MEM_freeN (movie->streams);
+ MEM_freeN(movie->streams);
if (movie->offset_table != NULL)
- MEM_freeN (movie->offset_table);
+ MEM_freeN(movie->offset_table);
return AVI_ERROR_NONE;
}
diff --git a/source/blender/avi/intern/avirgb.c b/source/blender/avi/intern/avirgb.c
index 8e5806c09cf..78316990d54 100644
--- a/source/blender/avi/intern/avirgb.c
+++ b/source/blender/avi/intern/avirgb.c
@@ -1,7 +1,4 @@
/*
- *
- * This is external code. Converts rgb-type avi-s.
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -31,6 +28,8 @@
/** \file blender/avi/intern/avirgb.c
* \ingroup avi
+ *
+ * This is external code. Converts rgb-type avi-s.
*/
@@ -43,108 +42,108 @@
/* implementation */
-void *avi_converter_from_avi_rgb (AviMovie *movie, int stream, unsigned char *buffer, int *size)
+void *avi_converter_from_avi_rgb(AviMovie *movie, int stream, unsigned char *buffer, int *size)
{
- int x, y,i, rowstride;
+ int x, y, i, rowstride;
unsigned char *buf;
AviBitmapInfoHeader *bi;
- short bits= 32;
+ short bits = 32;
(void)size; /* unused */
- bi= (AviBitmapInfoHeader *) movie->streams[stream].sf;
- if (bi) bits= bi->BitCount;
+ bi = (AviBitmapInfoHeader *) movie->streams[stream].sf;
+ if (bi) bits = bi->BitCount;
- if (bits==16) {
+ if (bits == 16) {
unsigned short *pxl;
unsigned char *to;
#ifdef __BIG_ENDIAN__
unsigned char *pxla;
#endif
- buf = MEM_mallocN (movie->header->Height * movie->header->Width * 3, "fromavirgbbuf");
+ buf = MEM_mallocN(movie->header->Height * movie->header->Width * 3, "fromavirgbbuf");
- y= movie->header->Height;
- to= buf;
+ y = movie->header->Height;
+ to = buf;
while (y--) {
- pxl= (unsigned short *) (buffer + y * movie->header->Width * 2);
+ pxl = (unsigned short *) (buffer + y * movie->header->Width * 2);
#ifdef __BIG_ENDIAN__
- pxla= (unsigned char *)pxl;
+ pxla = (unsigned char *)pxl;
#endif
- x= movie->header->Width;
+ x = movie->header->Width;
while (x--) {
#ifdef __BIG_ENDIAN__
- i= pxla[0];
- pxla[0]= pxla[1];
- pxla[1]= i;
+ i = pxla[0];
+ pxla[0] = pxla[1];
+ pxla[1] = i;
- pxla+=2;
+ pxla += 2;
#endif
- *(to++)= ((*pxl>>10)&0x1f)*8;
- *(to++)= ((*pxl>>5)&0x1f)*8;
- *(to++)= (*pxl&0x1f)*8;
+ *(to++) = ((*pxl >> 10) & 0x1f) * 8;
+ *(to++) = ((*pxl >> 5) & 0x1f) * 8;
+ *(to++) = (*pxl & 0x1f) * 8;
pxl++;
}
}
- MEM_freeN (buffer);
+ MEM_freeN(buffer);
return buf;
}
else {
- buf = MEM_mallocN (movie->header->Height * movie->header->Width * 3, "fromavirgbbuf");
+ buf = MEM_mallocN(movie->header->Height * movie->header->Width * 3, "fromavirgbbuf");
- rowstride = movie->header->Width*3;
- if (bits!=16) if (movie->header->Width%2) rowstride++;
+ rowstride = movie->header->Width * 3;
+ if (bits != 16) if (movie->header->Width % 2) rowstride++;
- for (y=0; y < movie->header->Height; y++) {
- memcpy (&buf[y*movie->header->Width*3], &buffer[((movie->header->Height-1)-y)*rowstride], movie->header->Width*3);
+ for (y = 0; y < movie->header->Height; y++) {
+ memcpy(&buf[y * movie->header->Width * 3], &buffer[((movie->header->Height - 1) - y) * rowstride], movie->header->Width * 3);
}
- for (y=0; y < movie->header->Height*movie->header->Width*3; y+=3) {
+ for (y = 0; y < movie->header->Height * movie->header->Width * 3; y += 3) {
i = buf[y];
- buf[y] = buf[y+2];
- buf[y+2] = i;
+ buf[y] = buf[y + 2];
+ buf[y + 2] = i;
}
- MEM_freeN (buffer);
+ MEM_freeN(buffer);
return buf;
}
}
-void *avi_converter_to_avi_rgb (AviMovie *movie, int stream, unsigned char *buffer, int *size)
+void *avi_converter_to_avi_rgb(AviMovie *movie, int stream, unsigned char *buffer, int *size)
{
int y, x, i, rowstride;
unsigned char *buf;
(void)stream; /* unused */
- *size= movie->header->Height * movie->header->Width * 3;
- if (movie->header->Width%2) *size+= movie->header->Height;
+ *size = movie->header->Height * movie->header->Width * 3;
+ if (movie->header->Width % 2) *size += movie->header->Height;
- buf = MEM_mallocN (*size,"toavirgbbuf");
+ buf = MEM_mallocN(*size, "toavirgbbuf");
- rowstride = movie->header->Width*3;
- if (movie->header->Width%2) rowstride++;
+ rowstride = movie->header->Width * 3;
+ if (movie->header->Width % 2) rowstride++;
- for (y=0; y < movie->header->Height; y++) {
- memcpy (&buf[y*rowstride], &buffer[((movie->header->Height-1)-y)*movie->header->Width*3], movie->header->Width*3);
+ for (y = 0; y < movie->header->Height; y++) {
+ memcpy(&buf[y * rowstride], &buffer[((movie->header->Height - 1) - y) * movie->header->Width * 3], movie->header->Width * 3);
}
- for (y=0; y < movie->header->Height; y++) {
- for (x=0; x < movie->header->Width*3; x+=3) {
- i = buf[y*rowstride+x];
- buf[y*rowstride+x] = buf[y*rowstride+x+2];
- buf[y*rowstride+x+2] = i;
+ for (y = 0; y < movie->header->Height; y++) {
+ for (x = 0; x < movie->header->Width * 3; x += 3) {
+ i = buf[y * rowstride + x];
+ buf[y * rowstride + x] = buf[y * rowstride + x + 2];
+ buf[y * rowstride + x + 2] = i;
}
}
- MEM_freeN (buffer);
+ MEM_freeN(buffer);
return buf;
}
diff --git a/source/blender/avi/intern/codecs.c b/source/blender/avi/intern/codecs.c
index 73af7097994..01e228d570e 100644
--- a/source/blender/avi/intern/codecs.c
+++ b/source/blender/avi/intern/codecs.c
@@ -1,7 +1,4 @@
/*
- *
- * This is external code. Identify and convert different avi-files.
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -30,6 +27,8 @@
/** \file blender/avi/intern/codecs.c
* \ingroup avi
+ *
+ * This is external code. Identify and convert different avi-files.
*/
@@ -40,108 +39,110 @@
#include "mjpeg.h"
#include "rgb32.h"
-void *avi_format_convert (AviMovie *movie, int stream, void *buffer, AviFormat from, AviFormat to, int *size)
+void *avi_format_convert(AviMovie *movie, int stream, void *buffer, AviFormat from, AviFormat to, int *size)
{
if (from == to)
return buffer;
if (from != AVI_FORMAT_RGB24 &&
- to != AVI_FORMAT_RGB24)
+ to != AVI_FORMAT_RGB24)
+ {
return avi_format_convert(movie, stream,
- avi_format_convert (movie, stream, buffer, from, AVI_FORMAT_RGB24, size),
- AVI_FORMAT_RGB24, to, size);
+ avi_format_convert(movie, stream, buffer, from, AVI_FORMAT_RGB24, size),
+ AVI_FORMAT_RGB24, to, size);
+ }
switch (to) {
- case AVI_FORMAT_RGB24:
- switch (from) {
+ case AVI_FORMAT_RGB24:
+ switch (from) {
+ case AVI_FORMAT_AVI_RGB:
+ buffer = avi_converter_from_avi_rgb(movie, stream, buffer, size);
+ break;
+ case AVI_FORMAT_MJPEG:
+ buffer = avi_converter_from_mjpeg(movie, stream, buffer, size);
+ break;
+ case AVI_FORMAT_RGB32:
+ buffer = avi_converter_from_rgb32(movie, stream, buffer, size);
+ break;
+ default:
+ break;
+ }
+ break;
case AVI_FORMAT_AVI_RGB:
- buffer = avi_converter_from_avi_rgb (movie, stream, buffer, size);
+ buffer = avi_converter_to_avi_rgb(movie, stream, buffer, size);
break;
case AVI_FORMAT_MJPEG:
- buffer = avi_converter_from_mjpeg (movie, stream, buffer, size);
+ buffer = avi_converter_to_mjpeg(movie, stream, buffer, size);
break;
case AVI_FORMAT_RGB32:
- buffer = avi_converter_from_rgb32 (movie, stream, buffer, size);
+ buffer = avi_converter_to_rgb32(movie, stream, buffer, size);
break;
default:
break;
- }
- break;
- case AVI_FORMAT_AVI_RGB:
- buffer = avi_converter_to_avi_rgb (movie, stream, buffer, size);
- break;
- case AVI_FORMAT_MJPEG:
- buffer = avi_converter_to_mjpeg (movie, stream, buffer, size);
- break;
- case AVI_FORMAT_RGB32:
- buffer = avi_converter_to_rgb32 (movie, stream, buffer, size);
- break;
- default:
- break;
}
return buffer;
}
-int avi_get_data_id (AviFormat format, int stream)
+int avi_get_data_id(AviFormat format, int stream)
{
char fcc[5];
- if (avi_get_format_type (format) == FCC("vids"))
- sprintf (fcc,"%2.2ddc",stream);
- else if (avi_get_format_type (format) == FCC("auds"))
- sprintf (fcc,"%2.2ddc",stream);
+ if (avi_get_format_type(format) == FCC("vids"))
+ sprintf(fcc, "%2.2ddc", stream);
+ else if (avi_get_format_type(format) == FCC("auds"))
+ sprintf(fcc, "%2.2ddc", stream);
else
return 0;
return FCC(fcc);
}
-int avi_get_format_type (AviFormat format)
+int avi_get_format_type(AviFormat format)
{
switch (format) {
- case AVI_FORMAT_RGB24:
- case AVI_FORMAT_RGB32:
- case AVI_FORMAT_AVI_RGB:
- case AVI_FORMAT_MJPEG:
- return FCC("vids");
- break;
- default:
- return 0;
- break;
+ case AVI_FORMAT_RGB24:
+ case AVI_FORMAT_RGB32:
+ case AVI_FORMAT_AVI_RGB:
+ case AVI_FORMAT_MJPEG:
+ return FCC("vids");
+ break;
+ default:
+ return 0;
+ break;
}
}
-int avi_get_format_fcc (AviFormat format)
+int avi_get_format_fcc(AviFormat format)
{
switch (format) {
- case AVI_FORMAT_RGB24:
- case AVI_FORMAT_RGB32:
- case AVI_FORMAT_AVI_RGB:
- return FCC("DIB ");
- break;
- case AVI_FORMAT_MJPEG:
- return FCC("MJPG");
- break;
- default:
- return 0;
- break;
+ case AVI_FORMAT_RGB24:
+ case AVI_FORMAT_RGB32:
+ case AVI_FORMAT_AVI_RGB:
+ return FCC("DIB ");
+ break;
+ case AVI_FORMAT_MJPEG:
+ return FCC("MJPG");
+ break;
+ default:
+ return 0;
+ break;
}
}
-int avi_get_format_compression (AviFormat format)
+int avi_get_format_compression(AviFormat format)
{
switch (format) {
- case AVI_FORMAT_RGB24:
- case AVI_FORMAT_RGB32:
- case AVI_FORMAT_AVI_RGB:
- return 0;
- break;
- case AVI_FORMAT_MJPEG:
- return FCC("MJPG");
- break;
- default:
- return 0;
- break;
+ case AVI_FORMAT_RGB24:
+ case AVI_FORMAT_RGB32:
+ case AVI_FORMAT_AVI_RGB:
+ return 0;
+ break;
+ case AVI_FORMAT_MJPEG:
+ return FCC("MJPG");
+ break;
+ default:
+ return 0;
+ break;
}
}
diff --git a/source/blender/avi/intern/endian.c b/source/blender/avi/intern/endian.c
index adcc7e8750a..c9b95d25810 100644
--- a/source/blender/avi/intern/endian.c
+++ b/source/blender/avi/intern/endian.c
@@ -1,8 +1,4 @@
/*
- *
- * This is external code. Streams bytes to output depending on the
- * endianness of the system.
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -32,6 +28,9 @@
/** \file blender/avi/intern/endian.c
* \ingroup avi
+ *
+ * This is external code. Streams bytes to output depending on the
+ * endianness of the system.
*/
@@ -47,180 +46,180 @@
#endif
#ifdef __BIG_ENDIAN__
-static void invert (int *num)
+static void invert(int *num)
{
- int new=0,i,j;
+ int new = 0, i, j;
- for (j=0; j < 4; j++) {
- for (i=0; i<8; i++) {
- new |= ((*num>>(j*8+i))&1)<<((3-j)*8+i);
+ for (j = 0; j < 4; j++) {
+ for (i = 0; i < 8; i++) {
+ new |= ((*num >> (j * 8 + i)) & 1) << ((3 - j) * 8 + i);
}
}
*num = new;
}
-static void sinvert (short int *num)
+static void sinvert(short int *num)
{
- short int new=0;
- int i,j;
+ short int new = 0;
+ int i, j;
- for (j=0; j < 2; j++) {
- for (i=0; i<8; i++) {
- new |= ((*num>>(j*8+i))&1)<<((1-j)*8+i);
+ for (j = 0; j < 2; j++) {
+ for (i = 0; i < 8; i++) {
+ new |= ((*num >> (j * 8 + i)) & 1) << ((1 - j) * 8 + i);
}
}
*num = new;
}
-static void Ichunk (AviChunk *chunk)
+static void Ichunk(AviChunk *chunk)
{
- invert (&chunk->fcc);
- invert (&chunk->size);
+ invert(&chunk->fcc);
+ invert(&chunk->size);
}
#endif
#ifdef __BIG_ENDIAN__
-static void Ilist (AviList *list)
+static void Ilist(AviList *list)
{
- invert (&list->fcc);
- invert (&list->size);
- invert (&list->ids);
+ invert(&list->fcc);
+ invert(&list->size);
+ invert(&list->ids);
}
-static void Imainh (AviMainHeader *mainh)
+static void Imainh(AviMainHeader *mainh)
{
- invert (&mainh->fcc);
- invert (&mainh->size);
- invert (&mainh->MicroSecPerFrame);
- invert (&mainh->MaxBytesPerSec);
- invert (&mainh->PaddingGranularity);
- invert (&mainh->Flags);
- invert (&mainh->TotalFrames);
- invert (&mainh->InitialFrames);
- invert (&mainh->Streams);
- invert (&mainh->SuggestedBufferSize);
- invert (&mainh->Width);
- invert (&mainh->Height);
- invert (&mainh->Reserved[0]);
- invert (&mainh->Reserved[1]);
- invert (&mainh->Reserved[2]);
- invert (&mainh->Reserved[3]);
+ invert(&mainh->fcc);
+ invert(&mainh->size);
+ invert(&mainh->MicroSecPerFrame);
+ invert(&mainh->MaxBytesPerSec);
+ invert(&mainh->PaddingGranularity);
+ invert(&mainh->Flags);
+ invert(&mainh->TotalFrames);
+ invert(&mainh->InitialFrames);
+ invert(&mainh->Streams);
+ invert(&mainh->SuggestedBufferSize);
+ invert(&mainh->Width);
+ invert(&mainh->Height);
+ invert(&mainh->Reserved[0]);
+ invert(&mainh->Reserved[1]);
+ invert(&mainh->Reserved[2]);
+ invert(&mainh->Reserved[3]);
}
-static void Istreamh (AviStreamHeader *streamh)
+static void Istreamh(AviStreamHeader *streamh)
{
- invert (&streamh->fcc);
- invert (&streamh->size);
- invert (&streamh->Type);
- invert (&streamh->Handler);
- invert (&streamh->Flags);
- sinvert (&streamh->Priority);
- sinvert (&streamh->Language);
- invert (&streamh->InitialFrames);
- invert (&streamh->Scale);
- invert (&streamh->Rate);
- invert (&streamh->Start);
- invert (&streamh->Length);
- invert (&streamh->SuggestedBufferSize);
- invert (&streamh->Quality);
- invert (&streamh->SampleSize);
- sinvert (&streamh->left);
- sinvert (&streamh->right);
- sinvert (&streamh->top);
- sinvert (&streamh->bottom);
+ invert(&streamh->fcc);
+ invert(&streamh->size);
+ invert(&streamh->Type);
+ invert(&streamh->Handler);
+ invert(&streamh->Flags);
+ sinvert(&streamh->Priority);
+ sinvert(&streamh->Language);
+ invert(&streamh->InitialFrames);
+ invert(&streamh->Scale);
+ invert(&streamh->Rate);
+ invert(&streamh->Start);
+ invert(&streamh->Length);
+ invert(&streamh->SuggestedBufferSize);
+ invert(&streamh->Quality);
+ invert(&streamh->SampleSize);
+ sinvert(&streamh->left);
+ sinvert(&streamh->right);
+ sinvert(&streamh->top);
+ sinvert(&streamh->bottom);
}
-static void Ibitmaph (AviBitmapInfoHeader *bitmaph)
+static void Ibitmaph(AviBitmapInfoHeader *bitmaph)
{
- invert (&bitmaph->fcc);
- invert (&bitmaph->size);
- invert (&bitmaph->Size);
- invert (&bitmaph->Width);
- invert (&bitmaph->Height);
- sinvert (&bitmaph->Planes);
- sinvert (&bitmaph->BitCount);
- invert (&bitmaph->Compression);
- invert (&bitmaph->SizeImage);
- invert (&bitmaph->XPelsPerMeter);
- invert (&bitmaph->YPelsPerMeter);
- invert (&bitmaph->ClrUsed);
- invert (&bitmaph->ClrImportant);
+ invert(&bitmaph->fcc);
+ invert(&bitmaph->size);
+ invert(&bitmaph->Size);
+ invert(&bitmaph->Width);
+ invert(&bitmaph->Height);
+ sinvert(&bitmaph->Planes);
+ sinvert(&bitmaph->BitCount);
+ invert(&bitmaph->Compression);
+ invert(&bitmaph->SizeImage);
+ invert(&bitmaph->XPelsPerMeter);
+ invert(&bitmaph->YPelsPerMeter);
+ invert(&bitmaph->ClrUsed);
+ invert(&bitmaph->ClrImportant);
}
-static void Imjpegu (AviMJPEGUnknown *mjpgu)
+static void Imjpegu(AviMJPEGUnknown *mjpgu)
{
- invert (&mjpgu->a);
- invert (&mjpgu->b);
- invert (&mjpgu->c);
- invert (&mjpgu->d);
- invert (&mjpgu->e);
- invert (&mjpgu->f);
- invert (&mjpgu->g);
+ invert(&mjpgu->a);
+ invert(&mjpgu->b);
+ invert(&mjpgu->c);
+ invert(&mjpgu->d);
+ invert(&mjpgu->e);
+ invert(&mjpgu->f);
+ invert(&mjpgu->g);
}
-static void Iindexe (AviIndexEntry *indexe)
+static void Iindexe(AviIndexEntry *indexe)
{
- invert (&indexe->ChunkId);
- invert (&indexe->Flags);
- invert (&indexe->Offset);
- invert (&indexe->Size);
+ invert(&indexe->ChunkId);
+ invert(&indexe->Flags);
+ invert(&indexe->Offset);
+ invert(&indexe->Size);
}
#endif /* __BIG_ENDIAN__ */
-void awrite (AviMovie *movie, void *datain, int block, int size, FILE *fp, int type)
+void awrite(AviMovie *movie, void *datain, int block, int size, FILE *fp, int type)
{
#ifdef __BIG_ENDIAN__
void *data;
- data = MEM_mallocN (size, "avi endian");
+ data = MEM_mallocN(size, "avi endian");
- memcpy (data, datain, size);
+ memcpy(data, datain, size);
switch (type) {
- case AVI_RAW:
- fwrite (data, block, size, fp);
- break;
- case AVI_CHUNK:
- Ichunk ((AviChunk *) data);
- fwrite (data, block, size, fp);
- break;
- case AVI_LIST:
- Ilist ((AviList *) data);
- fwrite (data, block, size, fp);
- break;
- case AVI_MAINH:
- Imainh ((AviMainHeader *) data);
- fwrite (data, block, size, fp);
- break;
- case AVI_STREAMH:
- Istreamh ((AviStreamHeader *) data);
- fwrite (data, block, size, fp);
- break;
- case AVI_BITMAPH:
- Ibitmaph ((AviBitmapInfoHeader *) data);
- if (size==sizeof(AviBitmapInfoHeader) + sizeof(AviMJPEGUnknown)) {
- Imjpegu((AviMJPEGUnknown*)((char*)data+sizeof(AviBitmapInfoHeader)));
- }
- fwrite (data, block, size, fp);
- break;
- case AVI_MJPEGU:
- Imjpegu ((AviMJPEGUnknown *) data);
- fwrite (data, block, size, fp);
- break;
- case AVI_INDEXE:
- Iindexe ((AviIndexEntry *) data);
- fwrite (data, block, size, fp);
- break;
- default:
- break;
+ case AVI_RAW:
+ fwrite(data, block, size, fp);
+ break;
+ case AVI_CHUNK:
+ Ichunk((AviChunk *) data);
+ fwrite(data, block, size, fp);
+ break;
+ case AVI_LIST:
+ Ilist((AviList *) data);
+ fwrite(data, block, size, fp);
+ break;
+ case AVI_MAINH:
+ Imainh((AviMainHeader *) data);
+ fwrite(data, block, size, fp);
+ break;
+ case AVI_STREAMH:
+ Istreamh((AviStreamHeader *) data);
+ fwrite(data, block, size, fp);
+ break;
+ case AVI_BITMAPH:
+ Ibitmaph((AviBitmapInfoHeader *) data);
+ if (size == sizeof(AviBitmapInfoHeader) + sizeof(AviMJPEGUnknown)) {
+ Imjpegu((AviMJPEGUnknown *)((char *)data + sizeof(AviBitmapInfoHeader)));
+ }
+ fwrite(data, block, size, fp);
+ break;
+ case AVI_MJPEGU:
+ Imjpegu((AviMJPEGUnknown *) data);
+ fwrite(data, block, size, fp);
+ break;
+ case AVI_INDEXE:
+ Iindexe((AviIndexEntry *) data);
+ fwrite(data, block, size, fp);
+ break;
+ default:
+ break;
}
- MEM_freeN (data);
+ MEM_freeN(data);
#else /* __BIG_ENDIAN__ */
(void)movie; /* unused */
(void)type; /* unused */
- fwrite (datain, block, size, fp);
+ fwrite(datain, block, size, fp);
#endif /* __BIG_ENDIAN__ */
}
diff --git a/source/blender/avi/intern/endian.h b/source/blender/avi/intern/endian.h
index 3229f32cbbd..7ef49cb1699 100644
--- a/source/blender/avi/intern/endian.h
+++ b/source/blender/avi/intern/endian.h
@@ -1,7 +1,4 @@
/*
- *
- * This is external code.
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -26,14 +23,14 @@
* Contributor(s): none yet.
*
* ***** END GPL LICENSE BLOCK *****
- *
*/
/** \file blender/avi/intern/endian.h
* \ingroup avi
+ *
+ * This is external code.
*/
-
#ifndef __ENDIAN_H__
#define __ENDIAN_H__
@@ -49,7 +46,7 @@
#define AVI_INDEXE 6
#define AVI_MJPEGU 7
-void awrite (AviMovie *movie, void *datain, int block, int size, FILE *fp, int type);
+void awrite(AviMovie *movie, void *datain, int block, int size, FILE *fp, int type);
#endif
diff --git a/source/blender/avi/intern/mjpeg.c b/source/blender/avi/intern/mjpeg.c
index f6ebcab2aeb..a700284bf68 100644
--- a/source/blender/avi/intern/mjpeg.c
+++ b/source/blender/avi/intern/mjpeg.c
@@ -1,7 +1,4 @@
/*
- *
- * This is external code. Converts between avi and mpeg/jpeg.
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -31,6 +28,8 @@
/** \file blender/avi/intern/mjpeg.c
* \ingroup avi
+ *
+ * This is external code. Converts between avi and mpeg/jpeg.
*/
@@ -43,14 +42,14 @@
#include "mjpeg.h"
-#define PADUP(num, amt) ((num+(amt-1))&~(amt-1))
+#define PADUP(num, amt) ((num + (amt - 1)) & ~(amt - 1))
-static void jpegmemdestmgr_build (j_compress_ptr cinfo, unsigned char *buffer, int bufsize);
-static void jpegmemsrcmgr_build (j_decompress_ptr dinfo, unsigned char *buffer, int bufsize);
+static void jpegmemdestmgr_build(j_compress_ptr cinfo, unsigned char *buffer, int bufsize);
+static void jpegmemsrcmgr_build(j_decompress_ptr dinfo, unsigned char *buffer, int bufsize);
static int numbytes;
-static void add_huff_table (j_decompress_ptr dinfo, JHUFF_TBL **htblptr, const UINT8 *bits, const UINT8 *val)
+static void add_huff_table(j_decompress_ptr dinfo, JHUFF_TBL **htblptr, const UINT8 *bits, const UINT8 *val)
{
if (*htblptr == NULL)
*htblptr = jpeg_alloc_huff_table((j_common_ptr) dinfo);
@@ -65,25 +64,30 @@ static void add_huff_table (j_decompress_ptr dinfo, JHUFF_TBL **htblptr, const U
/* Set up the standard Huffman tables (cf. JPEG standard section K.3) */
/* IMPORTANT: these are only valid for 8-bit data precision! */
-static void std_huff_tables (j_decompress_ptr dinfo)
+static void std_huff_tables(j_decompress_ptr dinfo)
{
static const UINT8 bits_dc_luminance[17] =
{ /* 0-base */
- 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 };
+ 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0
+ };
static const UINT8 val_dc_luminance[] =
{
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
+ };
static const UINT8 bits_dc_chrominance[17] =
{ /* 0-base */
- 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 };
+ 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0
+ };
static const UINT8 val_dc_chrominance[] =
{
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
+ };
static const UINT8 bits_ac_luminance[17] =
{ /* 0-base */
- 0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d };
+ 0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d
+ };
static const UINT8 val_ac_luminance[] =
{
0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12,
@@ -106,10 +110,12 @@ static void std_huff_tables (j_decompress_ptr dinfo)
0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe1, 0xe2,
0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea,
0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8,
- 0xf9, 0xfa };
+ 0xf9, 0xfa
+ };
static const UINT8 bits_ac_chrominance[17] =
{ /* 0-base */
- 0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77 };
+ 0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77
+ };
static const UINT8 val_ac_chrominance[] =
{
0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21,
@@ -132,16 +138,17 @@ static void std_huff_tables (j_decompress_ptr dinfo)
0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda,
0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9,
0xea, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8,
- 0xf9, 0xfa };
+ 0xf9, 0xfa
+ };
add_huff_table(dinfo, &dinfo->dc_huff_tbl_ptrs[0],
- bits_dc_luminance, val_dc_luminance);
+ bits_dc_luminance, val_dc_luminance);
add_huff_table(dinfo, &dinfo->ac_huff_tbl_ptrs[0],
- bits_ac_luminance, val_ac_luminance);
+ bits_ac_luminance, val_ac_luminance);
add_huff_table(dinfo, &dinfo->dc_huff_tbl_ptrs[1],
- bits_dc_chrominance, val_dc_chrominance);
+ bits_dc_chrominance, val_dc_chrominance);
add_huff_table(dinfo, &dinfo->ac_huff_tbl_ptrs[1],
- bits_ac_chrominance, val_ac_chrominance);
+ bits_ac_chrominance, val_ac_chrominance);
}
static int Decode_JPEG(unsigned char *inBuffer, unsigned char *outBuffer, unsigned int width, unsigned int height, int bufsize)
@@ -153,7 +160,7 @@ static int Decode_JPEG(unsigned char *inBuffer, unsigned char *outBuffer, unsign
(void)width; /* unused */
- numbytes= 0;
+ numbytes = 0;
dinfo.err = jpeg_std_error(&jerr);
jpeg_create_decompress(&dinfo);
@@ -167,8 +174,8 @@ static int Decode_JPEG(unsigned char *inBuffer, unsigned char *outBuffer, unsign
jpeg_start_decompress(&dinfo);
- rowstride= dinfo.output_width*dinfo.output_components;
- for (y= 0; y<dinfo.output_height; y++) {
+ rowstride = dinfo.output_width * dinfo.output_components;
+ for (y = 0; y < dinfo.output_height; y++) {
jpeg_read_scanlines(&dinfo, (JSAMPARRAY) &outBuffer, 1);
outBuffer += rowstride;
}
@@ -176,18 +183,18 @@ static int Decode_JPEG(unsigned char *inBuffer, unsigned char *outBuffer, unsign
if (dinfo.output_height >= height) return 0;
- inBuffer+= numbytes;
- jpegmemsrcmgr_build(&dinfo, inBuffer, bufsize-numbytes);
+ inBuffer += numbytes;
+ jpegmemsrcmgr_build(&dinfo, inBuffer, bufsize - numbytes);
- numbytes= 0;
+ numbytes = 0;
jpeg_read_header(&dinfo, TRUE);
if (dinfo.dc_huff_tbl_ptrs[0] == NULL) {
std_huff_tables(&dinfo);
}
jpeg_start_decompress(&dinfo);
- rowstride= dinfo.output_width*dinfo.output_components;
- for (y= 0; y<dinfo.output_height; y++) {
+ rowstride = dinfo.output_width * dinfo.output_components;
+ for (y = 0; y < dinfo.output_height; y++) {
jpeg_read_scanlines(&dinfo, (JSAMPARRAY) &outBuffer, 1);
outBuffer += rowstride;
}
@@ -215,9 +222,9 @@ static void Compress_JPEG(int quality, unsigned char *outbuffer, unsigned char *
cinfo.in_color_space = JCS_RGB;
jpeg_set_defaults(&cinfo);
- jpeg_set_colorspace (&cinfo, JCS_YCbCr);
+ jpeg_set_colorspace(&cinfo, JCS_YCbCr);
- jpeg_set_quality (&cinfo, quality, TRUE);
+ jpeg_set_quality(&cinfo, quality, TRUE);
cinfo.dc_huff_tbl_ptrs[0]->sent_table = TRUE;
cinfo.dc_huff_tbl_ptrs[1]->sent_table = TRUE;
@@ -233,24 +240,24 @@ static void Compress_JPEG(int quality, unsigned char *outbuffer, unsigned char *
jpeg_start_compress(&cinfo, FALSE);
- i=0;
+ i = 0;
marker[i++] = 'A';
marker[i++] = 'V';
marker[i++] = 'I';
marker[i++] = '1';
marker[i++] = 0;
- while (i<60)
+ while (i < 60)
marker[i++] = 32;
- jpeg_write_marker (&cinfo, JPEG_APP0, marker, 60);
+ jpeg_write_marker(&cinfo, JPEG_APP0, marker, 60);
- i=0;
- while (i<60)
+ i = 0;
+ while (i < 60)
marker[i++] = 0;
- jpeg_write_marker (&cinfo, JPEG_COM, marker, 60);
+ jpeg_write_marker(&cinfo, JPEG_COM, marker, 60);
- rowstride= cinfo.image_width*cinfo.input_components;
+ rowstride = cinfo.image_width * cinfo.input_components;
for (y = 0; y < cinfo.image_height; y++) {
jpeg_write_scanlines(&cinfo, (JSAMPARRAY) &inBuffer, 1);
inBuffer += rowstride;
@@ -261,43 +268,43 @@ static void Compress_JPEG(int quality, unsigned char *outbuffer, unsigned char *
static void interlace(unsigned char *to, unsigned char *from, int width, int height)
{
- int i, rowstride= width*3;
+ int i, rowstride = width * 3;
- for (i=0; i<height; i++) {
- if (i&1)
- memcpy (&to[i*rowstride], &from[(i/2 + height/2)*rowstride], rowstride);
+ for (i = 0; i < height; i++) {
+ if (i & 1)
+ memcpy(&to[i * rowstride], &from[(i / 2 + height / 2) * rowstride], rowstride);
else
- memcpy (&to[i*rowstride], &from[(i/2)*rowstride], rowstride);
+ memcpy(&to[i * rowstride], &from[(i / 2) * rowstride], rowstride);
}
}
static void deinterlace(int odd, unsigned char *to, unsigned char *from, int width, int height)
{
- int i, rowstride= width*3;
+ int i, rowstride = width * 3;
- for (i=0; i<height; i++) {
- if ((i&1)==odd)
- memcpy (&to[(i/2 + height/2)*rowstride], &from[i*rowstride], rowstride);
+ for (i = 0; i < height; i++) {
+ if ((i & 1) == odd)
+ memcpy(&to[(i / 2 + height / 2) * rowstride], &from[i * rowstride], rowstride);
else
- memcpy (&to[(i/2)*rowstride], &from[i*rowstride], rowstride);
+ memcpy(&to[(i / 2) * rowstride], &from[i * rowstride], rowstride);
}
}
static int check_and_decode_jpeg(unsigned char *inbuf, unsigned char *outbuf, int width, int height, int bufsize)
{
- /* JPEG's are always multiples of 16, extra is cropped out AVI's */
- if ((width&0xF) || (height&0xF)) {
+ /* JPEG's are always multiples of 16, extra is cropped out AVI's */
+ if ((width & 0xF) || (height & 0xF)) {
int i, rrowstride, jrowstride;
- int jwidth= PADUP(width, 16);
- int jheight= PADUP(height, 16);
- unsigned char *tmpbuf= MEM_mallocN(jwidth*jheight*3, "avi.check_and_decode_jpeg");
- int ret= Decode_JPEG(inbuf, tmpbuf, jwidth, jheight, bufsize);
-
- /* crop the tmpbuf into the real buffer */
- rrowstride= width*3;
- jrowstride= jwidth*3;
- for (i=0; i<height; i++)
- memcpy(&outbuf[i*rrowstride], &tmpbuf[i*jrowstride], rrowstride);
+ int jwidth = PADUP(width, 16);
+ int jheight = PADUP(height, 16);
+ unsigned char *tmpbuf = MEM_mallocN(jwidth * jheight * 3, "avi.check_and_decode_jpeg");
+ int ret = Decode_JPEG(inbuf, tmpbuf, jwidth, jheight, bufsize);
+
+ /* crop the tmpbuf into the real buffer */
+ rrowstride = width * 3;
+ jrowstride = jwidth * 3;
+ for (i = 0; i < height; i++)
+ memcpy(&outbuf[i * rrowstride], &tmpbuf[i * jrowstride], rrowstride);
MEM_freeN(tmpbuf);
return ret;
@@ -309,22 +316,22 @@ static int check_and_decode_jpeg(unsigned char *inbuf, unsigned char *outbuf, in
static void check_and_compress_jpeg(int quality, unsigned char *outbuf, unsigned char *inbuf, int width, int height, int bufsize)
{
- /* JPEG's are always multiples of 16, extra is ignored in AVI's */
- if ((width&0xF) || (height&0xF)) {
+ /* JPEG's are always multiples of 16, extra is ignored in AVI's */
+ if ((width & 0xF) || (height & 0xF)) {
int i, rrowstride, jrowstride;
- int jwidth= PADUP(width, 16);
- int jheight= PADUP(height, 16);
- unsigned char *tmpbuf= MEM_mallocN(jwidth*jheight*3, "avi.check_and_compress_jpeg");
-
- /* resize the realbuf into the tmpbuf */
- rrowstride= width*3;
- jrowstride= jwidth*3;
- for (i=0; i<jheight; i++) {
- if (i<height)
- memcpy(&tmpbuf[i*jrowstride], &inbuf[i*rrowstride], rrowstride);
+ int jwidth = PADUP(width, 16);
+ int jheight = PADUP(height, 16);
+ unsigned char *tmpbuf = MEM_mallocN(jwidth * jheight * 3, "avi.check_and_compress_jpeg");
+
+ /* resize the realbuf into the tmpbuf */
+ rrowstride = width * 3;
+ jrowstride = jwidth * 3;
+ for (i = 0; i < jheight; i++) {
+ if (i < height)
+ memcpy(&tmpbuf[i * jrowstride], &inbuf[i * rrowstride], rrowstride);
else
- memset(&tmpbuf[i*jrowstride], 0, rrowstride);
- memset(&tmpbuf[i*jrowstride+rrowstride], 0, jrowstride-rrowstride);
+ memset(&tmpbuf[i * jrowstride], 0, rrowstride);
+ memset(&tmpbuf[i * jrowstride + rrowstride], 0, jrowstride - rrowstride);
}
Compress_JPEG(quality, outbuf, tmpbuf, jwidth, jheight, bufsize);
@@ -336,57 +343,57 @@ static void check_and_compress_jpeg(int quality, unsigned char *outbuf, unsigned
}
}
-void *avi_converter_from_mjpeg (AviMovie *movie, int stream, unsigned char *buffer, int *size)
+void *avi_converter_from_mjpeg(AviMovie *movie, int stream, unsigned char *buffer, int *size)
{
int deint;
unsigned char *buf;
(void)stream; /* unused */
- buf= MEM_mallocN (movie->header->Height * movie->header->Width * 3, "avi.avi_converter_from_mjpeg 1");
+ buf = MEM_mallocN(movie->header->Height * movie->header->Width * 3, "avi.avi_converter_from_mjpeg 1");
- deint= check_and_decode_jpeg(buffer, buf, movie->header->Width, movie->header->Height, *size);
+ deint = check_and_decode_jpeg(buffer, buf, movie->header->Width, movie->header->Height, *size);
MEM_freeN(buffer);
if (deint) {
- buffer = MEM_mallocN (movie->header->Height * movie->header->Width * 3, "avi.avi_converter_from_mjpeg 2");
- interlace (buffer, buf, movie->header->Width, movie->header->Height);
- MEM_freeN (buf);
+ buffer = MEM_mallocN(movie->header->Height * movie->header->Width * 3, "avi.avi_converter_from_mjpeg 2");
+ interlace(buffer, buf, movie->header->Width, movie->header->Height);
+ MEM_freeN(buf);
- buf= buffer;
+ buf = buffer;
}
return buf;
}
-void *avi_converter_to_mjpeg (AviMovie *movie, int stream, unsigned char *buffer, int *size)
+void *avi_converter_to_mjpeg(AviMovie *movie, int stream, unsigned char *buffer, int *size)
{
unsigned char *buf;
- int bufsize= *size;
+ int bufsize = *size;
numbytes = 0;
- *size= 0;
+ *size = 0;
- buf = MEM_mallocN (movie->header->Height * movie->header->Width * 3, "avi.avi_converter_to_mjpeg 1");
+ buf = MEM_mallocN(movie->header->Height * movie->header->Width * 3, "avi.avi_converter_to_mjpeg 1");
if (!movie->interlace) {
- check_and_compress_jpeg(movie->streams[stream].sh.Quality/100, buf, buffer, movie->header->Width, movie->header->Height, bufsize);
+ check_and_compress_jpeg(movie->streams[stream].sh.Quality / 100, buf, buffer, movie->header->Width, movie->header->Height, bufsize);
}
else {
- deinterlace (movie->odd_fields, buf, buffer, movie->header->Width, movie->header->Height);
- MEM_freeN (buffer);
+ deinterlace(movie->odd_fields, buf, buffer, movie->header->Width, movie->header->Height);
+ MEM_freeN(buffer);
- buffer= buf;
- buf= MEM_mallocN (movie->header->Height * movie->header->Width * 3, "avi.avi_converter_to_mjpeg 2");
+ buffer = buf;
+ buf = MEM_mallocN(movie->header->Height * movie->header->Width * 3, "avi.avi_converter_to_mjpeg 2");
- check_and_compress_jpeg(movie->streams[stream].sh.Quality/100, buf, buffer, movie->header->Width, movie->header->Height/2, bufsize/2);
- *size+= numbytes;
- numbytes=0;
- check_and_compress_jpeg(movie->streams[stream].sh.Quality/100, buf+*size, buffer+(movie->header->Height/2)*movie->header->Width*3, movie->header->Width, movie->header->Height/2, bufsize/2);
+ check_and_compress_jpeg(movie->streams[stream].sh.Quality / 100, buf, buffer, movie->header->Width, movie->header->Height / 2, bufsize / 2);
+ *size += numbytes;
+ numbytes = 0;
+ check_and_compress_jpeg(movie->streams[stream].sh.Quality / 100, buf + *size, buffer + (movie->header->Height / 2) * movie->header->Width * 3, movie->header->Width, movie->header->Height / 2, bufsize / 2);
}
*size += numbytes;
- MEM_freeN (buffer);
+ MEM_freeN(buffer);
return buf;
}
@@ -406,23 +413,23 @@ static boolean jpegmemdestmgr_empty_output_buffer(j_compress_ptr cinfo)
static void jpegmemdestmgr_term_destination(j_compress_ptr cinfo)
{
- numbytes-= cinfo->dest->free_in_buffer;
+ numbytes -= cinfo->dest->free_in_buffer;
MEM_freeN(cinfo->dest);
}
static void jpegmemdestmgr_build(j_compress_ptr cinfo, unsigned char *buffer, int bufsize)
{
- cinfo->dest= MEM_mallocN(sizeof(*(cinfo->dest)), "avi.jpegmemdestmgr_build");
+ cinfo->dest = MEM_mallocN(sizeof(*(cinfo->dest)), "avi.jpegmemdestmgr_build");
- cinfo->dest->init_destination= jpegmemdestmgr_init_destination;
- cinfo->dest->empty_output_buffer= jpegmemdestmgr_empty_output_buffer;
- cinfo->dest->term_destination= jpegmemdestmgr_term_destination;
+ cinfo->dest->init_destination = jpegmemdestmgr_init_destination;
+ cinfo->dest->empty_output_buffer = jpegmemdestmgr_empty_output_buffer;
+ cinfo->dest->term_destination = jpegmemdestmgr_term_destination;
- cinfo->dest->next_output_byte= buffer;
- cinfo->dest->free_in_buffer= bufsize;
+ cinfo->dest->next_output_byte = buffer;
+ cinfo->dest->free_in_buffer = bufsize;
- numbytes= bufsize;
+ numbytes = bufsize;
}
/* Decompression from memory */
@@ -434,48 +441,48 @@ static void jpegmemsrcmgr_init_source(j_decompress_ptr dinfo)
static boolean jpegmemsrcmgr_fill_input_buffer(j_decompress_ptr dinfo)
{
- unsigned char *buf= (unsigned char*) dinfo->src->next_input_byte-2;
+ unsigned char *buf = (unsigned char *) dinfo->src->next_input_byte - 2;
- /* if we get called, must have run out of data */
+ /* if we get called, must have run out of data */
WARNMS(dinfo, JWRN_JPEG_EOF);
- buf[0]= (JOCTET) 0xFF;
- buf[1]= (JOCTET) JPEG_EOI;
+ buf[0] = (JOCTET) 0xFF;
+ buf[1] = (JOCTET) JPEG_EOI;
- dinfo->src->next_input_byte= buf;
- dinfo->src->bytes_in_buffer= 2;
+ dinfo->src->next_input_byte = buf;
+ dinfo->src->bytes_in_buffer = 2;
return TRUE;
}
static void jpegmemsrcmgr_skip_input_data(j_decompress_ptr dinfo, long skipcnt)
{
- if (dinfo->src->bytes_in_buffer<skipcnt)
- skipcnt= dinfo->src->bytes_in_buffer;
+ if (dinfo->src->bytes_in_buffer < skipcnt)
+ skipcnt = dinfo->src->bytes_in_buffer;
- dinfo->src->next_input_byte+= skipcnt;
- dinfo->src->bytes_in_buffer-= skipcnt;
+ dinfo->src->next_input_byte += skipcnt;
+ dinfo->src->bytes_in_buffer -= skipcnt;
}
static void jpegmemsrcmgr_term_source(j_decompress_ptr dinfo)
{
- numbytes-= dinfo->src->bytes_in_buffer;
+ numbytes -= dinfo->src->bytes_in_buffer;
MEM_freeN(dinfo->src);
}
static void jpegmemsrcmgr_build(j_decompress_ptr dinfo, unsigned char *buffer, int bufsize)
{
- dinfo->src= MEM_mallocN(sizeof(*(dinfo->src)), "avi.jpegmemsrcmgr_build");
+ dinfo->src = MEM_mallocN(sizeof(*(dinfo->src)), "avi.jpegmemsrcmgr_build");
- dinfo->src->init_source= jpegmemsrcmgr_init_source;
- dinfo->src->fill_input_buffer= jpegmemsrcmgr_fill_input_buffer;
- dinfo->src->skip_input_data= jpegmemsrcmgr_skip_input_data;
- dinfo->src->resync_to_restart= jpeg_resync_to_restart;
- dinfo->src->term_source= jpegmemsrcmgr_term_source;
+ dinfo->src->init_source = jpegmemsrcmgr_init_source;
+ dinfo->src->fill_input_buffer = jpegmemsrcmgr_fill_input_buffer;
+ dinfo->src->skip_input_data = jpegmemsrcmgr_skip_input_data;
+ dinfo->src->resync_to_restart = jpeg_resync_to_restart;
+ dinfo->src->term_source = jpegmemsrcmgr_term_source;
- dinfo->src->bytes_in_buffer= bufsize;
- dinfo->src->next_input_byte= buffer;
+ dinfo->src->bytes_in_buffer = bufsize;
+ dinfo->src->next_input_byte = buffer;
- numbytes= bufsize;
+ numbytes = bufsize;
}
diff --git a/source/blender/avi/intern/options.c b/source/blender/avi/intern/options.c
index a2fd756ddaa..7de91318ecf 100644
--- a/source/blender/avi/intern/options.c
+++ b/source/blender/avi/intern/options.c
@@ -1,8 +1,4 @@
/*
- *
- * This is external code. Sets some compression related options
- * (width, height quality, framerate).
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -32,6 +28,9 @@
/** \file blender/avi/intern/options.c
* \ingroup avi
+ *
+ * This is external code. Sets some compression related options
+ * (width, height quality, framerate).
*/
#include "AVI_avi.h"
@@ -44,7 +43,7 @@
/* avi_set_compress_options gets its own file... now don't WE feel important? */
-AviError AVI_set_compress_option (AviMovie *movie, int option_type, int stream, AviOption option, void *opt_data)
+AviError AVI_set_compress_option(AviMovie *movie, int option_type, int stream, AviOption option, void *opt_data)
{
int i;
int useconds;
@@ -55,78 +54,78 @@ AviError AVI_set_compress_option (AviMovie *movie, int option_type, int stream,
return AVI_ERROR_OPTION;
switch (option_type) {
- case AVI_OPTION_TYPE_MAIN:
- switch (option) {
- case AVI_OPTION_WIDTH:
- movie->header->Width = *((int *) opt_data);
- movie->header->SuggestedBufferSize = movie->header->Width*movie->header->Height*3;
-
- for (i=0; i < movie->header->Streams; i++) {
- if (avi_get_format_type(movie->streams[i].format) == FCC("vids")) {
- ((AviBitmapInfoHeader *) movie->streams[i].sf)->Width = *((int *) opt_data);
- movie->streams[i].sh.SuggestedBufferSize = movie->header->SuggestedBufferSize;
- movie->streams[i].sh.right = *((int *) opt_data);
- ((AviBitmapInfoHeader *) movie->streams[i].sf)->SizeImage = movie->header->SuggestedBufferSize;
- fseek (movie->fp, movie->offset_table[1+i*2+1], SEEK_SET);
- awrite (movie, movie->streams[i].sf, 1, movie->streams[i].sf_size, movie->fp, AVI_BITMAPH);
- }
- }
+ case AVI_OPTION_TYPE_MAIN:
+ switch (option) {
+ case AVI_OPTION_WIDTH:
+ movie->header->Width = *((int *) opt_data);
+ movie->header->SuggestedBufferSize = movie->header->Width * movie->header->Height * 3;
+
+ for (i = 0; i < movie->header->Streams; i++) {
+ if (avi_get_format_type(movie->streams[i].format) == FCC("vids")) {
+ ((AviBitmapInfoHeader *) movie->streams[i].sf)->Width = *((int *) opt_data);
+ movie->streams[i].sh.SuggestedBufferSize = movie->header->SuggestedBufferSize;
+ movie->streams[i].sh.right = *((int *) opt_data);
+ ((AviBitmapInfoHeader *) movie->streams[i].sf)->SizeImage = movie->header->SuggestedBufferSize;
+ fseek(movie->fp, movie->offset_table[1 + i * 2 + 1], SEEK_SET);
+ awrite(movie, movie->streams[i].sf, 1, movie->streams[i].sf_size, movie->fp, AVI_BITMAPH);
+ }
+ }
+
+ break;
+
+ case AVI_OPTION_HEIGHT:
+ movie->header->Height = *((int *) opt_data);
+ movie->header->SuggestedBufferSize = movie->header->Width * movie->header->Height * 3;
+
+ for (i = 0; i < movie->header->Streams; i++) {
+ if (avi_get_format_type(movie->streams[i].format) == FCC("vids")) {
+ ((AviBitmapInfoHeader *) movie->streams[i].sf)->Height = *((int *) opt_data);
+ movie->streams[i].sh.SuggestedBufferSize = movie->header->SuggestedBufferSize;
+ movie->streams[i].sh.bottom = *((int *) opt_data);
+ ((AviBitmapInfoHeader *) movie->streams[i].sf)->SizeImage = movie->header->SuggestedBufferSize;
+ fseek(movie->fp, movie->offset_table[1 + i * 2 + 1], SEEK_SET);
+ awrite(movie, movie->streams[i].sf, 1, movie->streams[i].sf_size, movie->fp, AVI_BITMAPH);
+ }
+ }
+
+ break;
+
+ case AVI_OPTION_QUALITY:
+ for (i = 0; i < movie->header->Streams; i++) {
+ if (avi_get_format_type(movie->streams[i].format) == FCC("vids")) {
+ movie->streams[i].sh.Quality = (*((int *) opt_data)) * 100;
+ fseek(movie->fp, movie->offset_table[1 + i * 2 + 1], SEEK_SET);
+ awrite(movie, movie->streams[i].sf, 1, movie->streams[i].sf_size, movie->fp, AVI_BITMAPH);
+ }
+ }
+ break;
+
+ case AVI_OPTION_FRAMERATE:
+ useconds = (int)(1000000 / (*((double *) opt_data)));
+ if (useconds)
+ movie->header->MicroSecPerFrame = useconds;
+
+ for (i = 0; i < movie->header->Streams; i++) {
+ if (avi_get_format_type(movie->streams[i].format) == FCC("vids")) {
+ movie->streams[i].sh.Scale = movie->header->MicroSecPerFrame;
+ fseek(movie->fp, movie->offset_table[1 + i * 2 + 1], SEEK_SET);
+ awrite(movie, movie->streams[i].sf, 1, movie->streams[i].sf_size, movie->fp, AVI_BITMAPH);
+ }
+ }
- break;
-
- case AVI_OPTION_HEIGHT:
- movie->header->Height = *((int *) opt_data);
- movie->header->SuggestedBufferSize = movie->header->Width*movie->header->Height*3;
-
- for (i=0; i < movie->header->Streams; i++) {
- if (avi_get_format_type(movie->streams[i].format) == FCC("vids")) {
- ((AviBitmapInfoHeader *) movie->streams[i].sf)->Height = *((int *) opt_data);
- movie->streams[i].sh.SuggestedBufferSize = movie->header->SuggestedBufferSize;
- movie->streams[i].sh.bottom = *((int *) opt_data);
- ((AviBitmapInfoHeader *) movie->streams[i].sf)->SizeImage = movie->header->SuggestedBufferSize;
- fseek (movie->fp, movie->offset_table[1+i*2+1], SEEK_SET);
- awrite (movie, movie->streams[i].sf, 1, movie->streams[i].sf_size, movie->fp, AVI_BITMAPH);
- }
}
- break;
+ fseek(movie->fp, movie->offset_table[0], SEEK_SET);
+ awrite(movie, movie->header, 1, sizeof(AviMainHeader), movie->fp, AVI_MAINH);
- case AVI_OPTION_QUALITY:
- for (i=0; i < movie->header->Streams; i++) {
- if (avi_get_format_type(movie->streams[i].format) == FCC("vids")) {
- movie->streams[i].sh.Quality = (*((int *) opt_data))*100;
- fseek (movie->fp, movie->offset_table[1+i*2+1], SEEK_SET);
- awrite (movie, movie->streams[i].sf, 1, movie->streams[i].sf_size, movie->fp, AVI_BITMAPH);
- }
- }
break;
-
- case AVI_OPTION_FRAMERATE:
- useconds = (int)(1000000/(*((double *) opt_data)));
- if (useconds)
- movie->header->MicroSecPerFrame = useconds;
-
- for (i=0; i < movie->header->Streams; i++) {
- if (avi_get_format_type(movie->streams[i].format) == FCC("vids")) {
- movie->streams[i].sh.Scale = movie->header->MicroSecPerFrame;
- fseek (movie->fp, movie->offset_table[1+i*2+1], SEEK_SET);
- awrite (movie, movie->streams[i].sf, 1, movie->streams[i].sf_size, movie->fp, AVI_BITMAPH);
- }
- }
-
- }
-
- fseek (movie->fp, movie->offset_table[0], SEEK_SET);
- awrite (movie, movie->header, 1, sizeof(AviMainHeader), movie->fp, AVI_MAINH);
-
- break;
- case AVI_OPTION_TYPE_STRH:
- break;
- case AVI_OPTION_TYPE_STRF:
- break;
- default:
- return AVI_ERROR_OPTION;
- break;
+ case AVI_OPTION_TYPE_STRH:
+ break;
+ case AVI_OPTION_TYPE_STRF:
+ break;
+ default:
+ return AVI_ERROR_OPTION;
+ break;
}
return AVI_ERROR_NONE;
diff --git a/source/blender/avi/intern/rgb32.c b/source/blender/avi/intern/rgb32.c
index c6830d9666a..84630f09fe5 100644
--- a/source/blender/avi/intern/rgb32.c
+++ b/source/blender/avi/intern/rgb32.c
@@ -1,7 +1,4 @@
/*
- *
- * This is external code. Converts between rgb32 and avi.
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -31,6 +28,8 @@
/** \file blender/avi/intern/rgb32.c
* \ingroup avi
+ *
+ * This is external code. Converts between rgb32 and avi.
*/
@@ -40,33 +39,33 @@
#include "MEM_guardedalloc.h"
#include "rgb32.h"
-void *avi_converter_from_rgb32 (AviMovie *movie, int stream, unsigned char *buffer, int *size)
+void *avi_converter_from_rgb32(AviMovie *movie, int stream, unsigned char *buffer, int *size)
{
int y, x, rowstridea, rowstrideb;
unsigned char *buf;
(void)stream; /* unused */
- buf = MEM_mallocN (movie->header->Height * movie->header->Width * 3, "fromrgb32buf");
+ buf = MEM_mallocN(movie->header->Height * movie->header->Width * 3, "fromrgb32buf");
*size = movie->header->Height * movie->header->Width * 3;
- rowstridea = movie->header->Width*3;
- rowstrideb = movie->header->Width*4;
+ rowstridea = movie->header->Width * 3;
+ rowstrideb = movie->header->Width * 4;
- for (y=0; y < movie->header->Height; y++) {
- for (x=0; x < movie->header->Width; x++) {
- buf[y*rowstridea + x*3 + 0] = buffer[y*rowstrideb + x*4 + 3];
- buf[y*rowstridea + x*3 + 1] = buffer[y*rowstrideb + x*4 + 2];
- buf[y*rowstridea + x*3 + 2] = buffer[y*rowstrideb + x*4 + 1];
+ for (y = 0; y < movie->header->Height; y++) {
+ for (x = 0; x < movie->header->Width; x++) {
+ buf[y * rowstridea + x * 3 + 0] = buffer[y * rowstrideb + x * 4 + 3];
+ buf[y * rowstridea + x * 3 + 1] = buffer[y * rowstrideb + x * 4 + 2];
+ buf[y * rowstridea + x * 3 + 2] = buffer[y * rowstrideb + x * 4 + 1];
}
}
- MEM_freeN (buffer);
+ MEM_freeN(buffer);
return buf;
}
-void *avi_converter_to_rgb32 (AviMovie *movie, int stream, unsigned char *buffer, int *size)
+void *avi_converter_to_rgb32(AviMovie *movie, int stream, unsigned char *buffer, int *size)
{
int i;
unsigned char *buf;
@@ -74,20 +73,20 @@ void *avi_converter_to_rgb32 (AviMovie *movie, int stream, unsigned char *buffer
(void)stream; /* unused */
- buf= MEM_mallocN (movie->header->Height * movie->header->Width * 4, "torgb32buf");
- *size= movie->header->Height * movie->header->Width * 4;
+ buf = MEM_mallocN(movie->header->Height * movie->header->Width * 4, "torgb32buf");
+ *size = movie->header->Height * movie->header->Width * 4;
memset(buf, 255, *size);
- to= buf; from= buffer;
- i=movie->header->Height*movie->header->Width;
+ to = buf; from = buffer;
+ i = movie->header->Height * movie->header->Width;
while (i--) {
memcpy(to, from, 3);
- to+=4; from+=3;
+ to += 4; from += 3;
}
- MEM_freeN (buffer);
+ MEM_freeN(buffer);
return buf;
}
diff --git a/source/blender/blenfont/intern/blf_glyph.c b/source/blender/blenfont/intern/blf_glyph.c
index 033efbfc1fc..9309cf15667 100644
--- a/source/blender/blenfont/intern/blf_glyph.c
+++ b/source/blender/blenfont/intern/blf_glyph.c
@@ -341,7 +341,7 @@ static void blf_texture5_draw(const float shadow_col[4], float uv[2][2], float x
static void blf_texture3_draw(const float shadow_col[4], float uv[2][2], float x1, float y1, float x2, float y2)
{
float soft[9] = {1/16.0f, 2/16.0f, 1/16.0f,
- 2/16.0f,4/16.0f, 2/16.0f,
+ 2/16.0f, 4/16.0f, 2/16.0f,
1/16.0f, 2/16.0f, 1/16.0f};
float color[4], *fp = soft;
diff --git a/source/blender/blenfont/intern/blf_internal_types.h b/source/blender/blenfont/intern/blf_internal_types.h
index cbe7975fdd6..bf9b9858348 100644
--- a/source/blender/blenfont/intern/blf_internal_types.h
+++ b/source/blender/blenfont/intern/blf_internal_types.h
@@ -180,7 +180,7 @@ typedef struct FontBLF {
/* max texture size. */
int max_tex_size;
- /* current opengl texture bind, avoids calling glGet */
+ /* cache current OpenGL texture to save calls into the API */
int tex_bind_state;
/* font options. */
diff --git a/source/blender/blenfont/intern/blf_lang.c b/source/blender/blenfont/intern/blf_lang.c
index 435ca8776bc..96d3a231ba5 100644
--- a/source/blender/blenfont/intern/blf_lang.c
+++ b/source/blender/blenfont/intern/blf_lang.c
@@ -106,6 +106,7 @@ static const char *locales[] = {
"serbian (latin)", "sr_RS@latin",
"kyrgyz", "ky_KG",
"turkish", "tr_TR",
+ "hungarian", "hu_HU",
};
void BLF_lang_init(void)
@@ -182,9 +183,9 @@ void BLF_lang_set(const char *str)
char *envStr;
if (U.language == 0)/* use system setting */
- envStr = BLI_sprintfN( "LANG=%s", getenv("LANG") );
+ envStr = BLI_sprintfN("LANG=%s", getenv("LANG"));
else
- envStr = BLI_sprintfN( "LANG=%s", short_locale );
+ envStr = BLI_sprintfN("LANG=%s", short_locale);
gettext_putenv(envStr);
MEM_freeN(envStr);
diff --git a/source/blender/blenkernel/BKE_DerivedMesh.h b/source/blender/blenkernel/BKE_DerivedMesh.h
index 3a28af97166..a15192f156a 100644
--- a/source/blender/blenkernel/BKE_DerivedMesh.h
+++ b/source/blender/blenkernel/BKE_DerivedMesh.h
@@ -664,22 +664,22 @@ void DM_update_weight_mcol(struct Object *ob, struct DerivedMesh *dm, int const
typedef struct DMVertexAttribs {
struct {
struct MTFace *array;
- int emOffset, glIndex, glTexco;
+ int em_offset, gl_index, gl_texco;
} tface[MAX_MTFACE];
struct {
struct MCol *array;
- int emOffset, glIndex;
+ int em_offset, gl_index;
} mcol[MAX_MCOL];
struct {
float (*array)[4];
- int emOffset, glIndex;
+ int em_offset, gl_index;
} tang;
struct {
float (*array)[3];
- int emOffset, glIndex, glTexco;
+ int em_offset, gl_index, gl_texco;
} orco;
int tottface, totmcol, tottang, totorco;
diff --git a/source/blender/blenkernel/BKE_action.h b/source/blender/blenkernel/BKE_action.h
index 564cd235869..a326b514f9a 100644
--- a/source/blender/blenkernel/BKE_action.h
+++ b/source/blender/blenkernel/BKE_action.h
@@ -59,13 +59,13 @@ extern "C" {
struct bAction *add_empty_action(const char name[]);
/* Allocate a copy of the given Action and all its data */
-struct bAction *copy_action(struct bAction *src);
+struct bAction *BKE_action_copy(struct bAction *src);
/* Deallocate all of the Action's data, but not the Action itself */
-void free_action(struct bAction *act);
+void BKE_action_free(struct bAction *act);
// XXX is this needed?
-void make_local_action(struct bAction *act);
+void BKE_action_make_local(struct bAction *act);
/* Action API ----------------- */
@@ -122,7 +122,7 @@ void action_groups_add_channel(struct bAction *act, struct bActionGroup *agrp, s
void action_groups_remove_channel(struct bAction *act, struct FCurve *fcu);
/* Find a group with the given name */
-struct bActionGroup *action_groups_find_named(struct bAction *act, const char name[]);
+struct bActionGroup *BKE_action_group_find_name(struct bAction *act, const char name[]);
/* Clear all 'temp' flags on all groups */
void action_groups_clear_tempflags(struct bAction *act);
@@ -133,71 +133,71 @@ void action_groups_clear_tempflags(struct bAction *act);
* Deallocates a pose channel.
* Does not free the pose channel itself.
*/
-void free_pose_channel(struct bPoseChannel *pchan);
+void BKE_pose_channel_free(struct bPoseChannel *pchan);
/**
* Removes and deallocates all channels from a pose.
* Does not free the pose itself.
*/
-void free_pose_channels(struct bPose *pose);
+void BKE_pose_channels_free(struct bPose *pose);
/**
* Removes the hash for quick lookup of channels, must
* be done when adding/removing channels.
*/
-void make_pose_channels_hash(struct bPose *pose);
-void free_pose_channels_hash(struct bPose *pose);
+void BKE_pose_channels_hash_make(struct bPose *pose);
+void BKE_pose_channels_hash_free(struct bPose *pose);
/**
* Removes and deallocates all data from a pose, and also frees the pose.
*/
-void free_pose(struct bPose *pose);
+void BKE_pose_free(struct bPose *pose);
/**
* Allocate a new pose on the heap, and copy the src pose and it's channels
* into the new pose. *dst is set to the newly allocated structure, and assumed to be NULL.
*/
-void copy_pose(struct bPose **dst, struct bPose *src, int copyconstraints);
+void BKE_pose_copy_data(struct bPose **dst, struct bPose *src, int copyconstraints);
/**
* Copy the internal members of each pose channel including constraints
* and ID-Props, used when duplicating bones in editmode.
*/
-void duplicate_pose_channel_data(struct bPoseChannel *pchan, const struct bPoseChannel *pchan_from);
+void BKE_pose_channel_copy_data(struct bPoseChannel *pchan, const struct bPoseChannel *pchan_from);
/**
* Return a pointer to the pose channel of the given name
* from this pose.
*/
-struct bPoseChannel *get_pose_channel(const struct bPose *pose, const char *name);
+struct bPoseChannel *BKE_pose_channel_find_name(const struct bPose *pose, const char *name);
/**
* Return a pointer to the active pose channel from this Object.
* (Note: Object, not bPose is used here, as we need layer info from Armature)
*/
-struct bPoseChannel *get_active_posechannel(struct Object *ob);
+struct bPoseChannel *BKE_pose_channel_active(struct Object *ob);
/**
* Looks to see if the channel with the given name
* already exists in this pose - if not a new one is
* allocated and initialized.
*/
-struct bPoseChannel *verify_pose_channel(struct bPose* pose, const char* name);
+struct bPoseChannel *BKE_pose_channel_verify(struct bPose* pose, const char* name);
/* Copy the data from the action-pose (src) into the pose */
void extract_pose_from_pose(struct bPose *pose, const struct bPose *src);
/* sets constraint flags */
-void update_pose_constraint_flags(struct bPose *pose);
+void BKE_pose_update_constraint_flags(struct bPose *pose);
/* return the name of structure pointed by pose->ikparam */
-const char *get_ikparam_name(struct bPose *pose);
+const char *BKE_pose_ikparam_get_name(struct bPose *pose);
/* allocate and initialize pose->ikparam according to pose->iksolver */
-void init_pose_ikparam(struct bPose *pose);
+void BKE_pose_ikparam_init(struct bPose *pose);
/* initialize a bItasc structure with default value */
-void init_pose_itasc(struct bItasc *itasc);
+void BKE_pose_itasc_init(struct bItasc *itasc);
/* clears BONE_UNKEYED flags for frame changing */
// XXX to be depreceated for a more general solution in animsys...
@@ -206,10 +206,10 @@ void framechange_poses_clear_unkeyed(void);
/* Bone Groups API --------------------- */
/* Adds a new bone-group */
-void pose_add_group(struct Object *ob);
+void BKE_pose_add_group(struct Object *ob);
/* Remove the active bone-group */
-void pose_remove_group(struct Object *ob);
+void BKE_pose_remove_group(struct Object *ob);
/* Assorted Evaluation ----------------- */
@@ -217,9 +217,9 @@ void pose_remove_group(struct Object *ob);
void what_does_obaction(struct Object *ob, struct Object *workob, struct bPose *pose, struct bAction *act, char groupname[], float cframe);
/* for proxy */
-void copy_pose_result(struct bPose *to, struct bPose *from);
+void BKE_pose_copy_result(struct bPose *to, struct bPose *from);
/* clear all transforms */
-void rest_pose(struct bPose *pose);
+void BKE_pose_rest(struct bPose *pose);
#ifdef __cplusplus
};
diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h
index dfe3fde17eb..b8c2c42f8d5 100644
--- a/source/blender/blenkernel/BKE_armature.h
+++ b/source/blender/blenkernel/BKE_armature.h
@@ -75,28 +75,28 @@ typedef struct PoseTree
extern "C" {
#endif
-struct bArmature *add_armature(const char *name);
-struct bArmature *get_armature(struct Object *ob);
-void free_bonelist (struct ListBase *lb);
-void free_armature(struct bArmature *arm);
-void make_local_armature(struct bArmature *arm);
-struct bArmature *copy_armature(struct bArmature *arm);
+struct bArmature *BKE_armature_add(const char *name);
+struct bArmature *BKE_armature_from_object(struct Object *ob);
+void BKE_armature_bonelist_free (struct ListBase *lb);
+void BKE_armature_free(struct bArmature *arm);
+void BKE_armature_make_local(struct bArmature *arm);
+struct bArmature *BKE_armature_copy(struct bArmature *arm);
/* Bounding box. */
-struct BoundBox *BKE_armature_get_bb(struct Object *ob);
+struct BoundBox *BKE_armature_boundbox_get(struct Object *ob);
int bone_autoside_name (char name[64], int strip_number, short axis, float head, float tail);
-struct Bone *get_named_bone (struct bArmature *arm, const char *name);
+struct Bone *BKE_armature_find_bone_name (struct bArmature *arm, const char *name);
float distfactor_to_bone(const float vec[3], const float b1[3], const float b2[3], float r1, float r2, float rdist);
-void where_is_armature (struct bArmature *arm);
-void where_is_armature_bone(struct Bone *bone, struct Bone *prevbone);
-void armature_rebuild_pose(struct Object *ob, struct bArmature *arm);
-void where_is_pose (struct Scene *scene, struct Object *ob);
-void where_is_pose_bone(struct Scene *scene, struct Object *ob, struct bPoseChannel *pchan, float ctime, int do_extra);
-void where_is_pose_bone_tail(struct bPoseChannel *pchan);
+void BKE_armature_where_is(struct bArmature *arm);
+void BKE_armature_where_is_bone(struct Bone *bone, struct Bone *prevbone);
+void BKE_pose_rebuild(struct Object *ob, struct bArmature *arm);
+void BKE_pose_where_is(struct Scene *scene, struct Object *ob);
+void BKE_pose_where_is_bone(struct Scene *scene, struct Object *ob, struct bPoseChannel *pchan, float ctime, int do_extra);
+void BKE_pose_where_is_bone_tail(struct bPoseChannel *pchan);
/* get_objectspace_bone_matrix has to be removed still */
void get_objectspace_bone_matrix (struct Bone* bone, float M_accumulatedMatrix[][4], int root, int posed);
@@ -106,23 +106,23 @@ void mat3_to_vec_roll(float mat[][3], float *vec, float *roll);
int get_selected_defgroups(struct Object *ob, char *defbase_sel, int defbase_len);
/* Common Conversions Between Co-ordinate Spaces */
-void armature_mat_world_to_pose(struct Object *ob, float inmat[][4], float outmat[][4]);
-void armature_loc_world_to_pose(struct Object *ob, const float inloc[3], float outloc[3]);
-void armature_mat_pose_to_bone(struct bPoseChannel *pchan, float inmat[][4], float outmat[][4]);
-void armature_loc_pose_to_bone(struct bPoseChannel *pchan, const float inloc[3], float outloc[3]);
-void armature_mat_bone_to_pose(struct bPoseChannel *pchan, float inmat[][4], float outmat[][4]);
-void armature_mat_pose_to_delta(float delta_mat[][4], float pose_mat[][4], float arm_mat[][4]);
+void BKE_armature_mat_world_to_pose(struct Object *ob, float inmat[][4], float outmat[][4]);
+void BKE_armature_loc_world_to_pose(struct Object *ob, const float inloc[3], float outloc[3]);
+void BKE_armature_mat_pose_to_bone(struct bPoseChannel *pchan, float inmat[][4], float outmat[][4]);
+void BKE_armature_loc_pose_to_bone(struct bPoseChannel *pchan, const float inloc[3], float outloc[3]);
+void BKE_armature_mat_bone_to_pose(struct bPoseChannel *pchan, float inmat[][4], float outmat[][4]);
+void BKE_armature_mat_pose_to_delta(float delta_mat[][4], float pose_mat[][4], float arm_mat[][4]);
-void armature_mat_pose_to_bone_ex(struct Object *ob, struct bPoseChannel *pchan, float inmat[][4], float outmat[][4]);
+void BKE_armature_mat_pose_to_bone_ex(struct Object *ob, struct bPoseChannel *pchan, float inmat[][4], float outmat[][4]);
-void pchan_mat3_to_rot(struct bPoseChannel *pchan, float mat[][3], short use_compat);
-void pchan_apply_mat4(struct bPoseChannel *pchan, float mat[][4], short use_comat);
-void pchan_to_mat4(struct bPoseChannel *pchan, float chan_mat[4][4]);
-void pchan_calc_mat(struct bPoseChannel *pchan);
+void BKE_pchan_mat3_to_rot(struct bPoseChannel *pchan, float mat[][3], short use_compat);
+void BKE_pchan_apply_mat4(struct bPoseChannel *pchan, float mat[][4], short use_comat);
+void BKE_pchan_to_mat4(struct bPoseChannel *pchan, float chan_mat[4][4]);
+void BKE_pchan_calc_mat(struct bPoseChannel *pchan);
/* Get the "pchan to pose" transform matrix. These matrices apply the effects of
* HINGE/NO_SCALE/NO_LOCAL_LOCATION options over the pchan loc/rot/scale transformations. */
-void pchan_to_pose_mat(struct bPoseChannel *pchan, float rotscale_mat[][4], float loc_mat[][4]);
+void BKE_pchan_to_pose_mat(struct bPoseChannel *pchan, float rotscale_mat[][4], float loc_mat[][4]);
/* Rotation Mode Conversions - Used for PoseChannels + Objects... */
void BKE_rotMode_change_values(float quat[4], float eul[3], float axis[3], float *angle, short oldMode, short newMode);
diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h
index e0fac79359d..62f1dbc5867 100644
--- a/source/blender/blenkernel/BKE_blender.h
+++ b/source/blender/blenkernel/BKE_blender.h
@@ -41,7 +41,7 @@ extern "C" {
/* these lines are grep'd, watch out for our not-so-awesome regex
* and keep comment above the defines.
* Use STRINGIFY() rather than defining with quotes */
-#define BLENDER_VERSION 262
+#define BLENDER_VERSION 263
#define BLENDER_SUBVERSION 4
#define BLENDER_MINVERSION 250
@@ -51,7 +51,7 @@ extern "C" {
/* can be left blank, otherwise a,b,c... etc with no quotes */
#define BLENDER_VERSION_CHAR
/* alpha/beta/rc/release, docs use this */
-#define BLENDER_VERSION_CYCLE rc
+#define BLENDER_VERSION_CYCLE alpha
extern char versionstr[]; /* from blender.c */
diff --git a/source/blender/blenkernel/BKE_brush.h b/source/blender/blenkernel/BKE_brush.h
index 1ff9bc46638..b5edc8f3e50 100644
--- a/source/blender/blenkernel/BKE_brush.h
+++ b/source/blender/blenkernel/BKE_brush.h
@@ -41,34 +41,34 @@ struct wmOperator;
// enum CurveMappingPreset;
/* datablock functions */
-struct Brush *add_brush(const char *name);
-struct Brush *copy_brush(struct Brush *brush);
-void make_local_brush(struct Brush *brush);
-void free_brush(struct Brush *brush);
+struct Brush *BKE_brush_add(const char *name);
+struct Brush *BKE_brush_copy(struct Brush *brush);
+void BKE_brush_make_local(struct Brush *brush);
+void BKE_brush_free(struct Brush *brush);
-void brush_reset_sculpt(struct Brush *brush);
+void BKE_brush_sculpt_reset(struct Brush *brush);
/* image icon function */
struct ImBuf *get_brush_icon(struct Brush *brush);
/* brush library operations used by different paint panels */
-int brush_texture_set_nr(struct Brush *brush, int nr);
-int brush_texture_delete(struct Brush *brush);
-int brush_clone_image_set_nr(struct Brush *brush, int nr);
-int brush_clone_image_delete(struct Brush *brush);
+int BKE_brush_texture_set_nr(struct Brush *brush, int nr);
+int BKE_brush_texture_delete(struct Brush *brush);
+int BKE_brush_clone_image_set_nr(struct Brush *brush, int nr);
+int BKE_brush_clone_image_delete(struct Brush *brush);
/* jitter */
-void brush_jitter_pos(const struct Scene *scene, struct Brush *brush,
+void BKE_brush_jitter_pos(const struct Scene *scene, struct Brush *brush,
const float pos[2], float jitterpos[2]);
/* brush curve */
-void brush_curve_preset(struct Brush *b, /*enum CurveMappingPreset*/int preset);
-float brush_curve_strength_clamp(struct Brush *br, float p, const float len);
-float brush_curve_strength(struct Brush *br, float p, const float len); /* used for sculpt */
+void BKE_brush_curve_preset(struct Brush *b, /*enum CurveMappingPreset*/int preset);
+float BKE_brush_curve_strength_clamp(struct Brush *br, float p, const float len);
+float BKE_brush_curve_strength(struct Brush *br, float p, const float len); /* used for sculpt */
/* sampling */
-void brush_sample_tex(const struct Scene *scene, struct Brush *brush, const float xy[2], float rgba[4], const int thread);
-void brush_imbuf_new(const struct Scene *scene, struct Brush *brush, short flt, short texfalloff, int size,
+void BKE_brush_sample_tex(const struct Scene *scene, struct Brush *brush, const float xy[2], float rgba[4], const int thread);
+void BKE_brush_imbuf_new(const struct Scene *scene, struct Brush *brush, short flt, short texfalloff, int size,
struct ImBuf **imbuf, int use_color_correction);
/* painting */
@@ -76,46 +76,48 @@ struct BrushPainter;
typedef struct BrushPainter BrushPainter;
typedef int (*BrushFunc)(void *user, struct ImBuf *ibuf, const float lastpos[2], const float pos[2]);
-BrushPainter *brush_painter_new(struct Scene *scene, struct Brush *brush);
-void brush_painter_require_imbuf(BrushPainter *painter, short flt,
+BrushPainter *BKE_brush_painter_new(struct Scene *scene, struct Brush *brush);
+void BKE_brush_painter_require_imbuf(BrushPainter *painter, short flt,
short texonly, int size);
-int brush_painter_paint(BrushPainter *painter, BrushFunc func, const float pos[2],
+int BKE_brush_painter_paint(BrushPainter *painter, BrushFunc func, const float pos[2],
double time, float pressure, void *user, int use_color_correction);
-void brush_painter_break_stroke(BrushPainter *painter);
-void brush_painter_free(BrushPainter *painter);
+void BKE_brush_painter_break_stroke(BrushPainter *painter);
+void BKE_brush_painter_free(BrushPainter *painter);
/* texture */
-unsigned int *brush_gen_texture_cache(struct Brush *br, int half_side);
+unsigned int *BKE_brush_gen_texture_cache(struct Brush *br, int half_side);
/* radial control */
-struct ImBuf *brush_gen_radial_control_imbuf(struct Brush *br);
+struct ImBuf *BKE_brush_gen_radial_control_imbuf(struct Brush *br);
/* unified strength and size */
-int brush_size(const struct Scene *scene, struct Brush *brush);
-void brush_set_size(struct Scene *scene, struct Brush *brush, int value);
+int BKE_brush_size_get(const struct Scene *scene, struct Brush *brush);
+void BKE_brush_size_set(struct Scene *scene, struct Brush *brush, int value);
-float brush_unprojected_radius(const struct Scene *scene, struct Brush *brush);
-void brush_set_unprojected_radius(struct Scene *scene, struct Brush *brush, float value);
+float BKE_brush_unprojected_radius_get(const struct Scene *scene, struct Brush *brush);
+void BKE_brush_unprojected_radius_set(struct Scene *scene, struct Brush *brush, float value);
-float brush_alpha(const struct Scene *scene, struct Brush *brush);
+float BKE_brush_alpha_get(const struct Scene *scene, struct Brush *brush);
+float BKE_brush_weight_get(const Scene *scene, struct Brush *brush);
+void BKE_brush_weight_set(const Scene *scene, struct Brush *brush, float value);
-int brush_use_locked_size(const struct Scene *scene, struct Brush *brush);
-int brush_use_alpha_pressure(const struct Scene *scene, struct Brush *brush);
-int brush_use_size_pressure(const struct Scene *scene, struct Brush *brush);
+int BKE_brush_use_locked_size(const struct Scene *scene, struct Brush *brush);
+int BKE_brush_use_alpha_pressure(const struct Scene *scene, struct Brush *brush);
+int BKE_brush_use_size_pressure(const struct Scene *scene, struct Brush *brush);
/* scale unprojected radius to reflect a change in the brush's 2D size */
-void brush_scale_unprojected_radius(float *unprojected_radius,
+void BKE_brush_scale_unprojected_radius(float *unprojected_radius,
int new_brush_size,
int old_brush_size);
/* scale brush size to reflect a change in the brush's unprojected radius */
-void brush_scale_size(int *brush_size,
+void BKE_brush_scale_size(int *BKE_brush_size_get,
float new_unprojected_radius,
float old_unprojected_radius);
/* debugging only */
-void brush_debug_print_state(struct Brush *br);
+void BKE_brush_debug_print_state(struct Brush *br);
#endif
diff --git a/source/blender/blenkernel/BKE_camera.h b/source/blender/blenkernel/BKE_camera.h
index 6d10219e74c..8f68d7abcac 100644
--- a/source/blender/blenkernel/BKE_camera.h
+++ b/source/blender/blenkernel/BKE_camera.h
@@ -48,18 +48,18 @@ struct View3D;
/* Camera Datablock */
-void *add_camera(const char *name);
-struct Camera *copy_camera(struct Camera *cam);
-void make_local_camera(struct Camera *cam);
-void free_camera(struct Camera *ca);
+void *BKE_camera_add(const char *name);
+struct Camera *BKE_camera_copy(struct Camera *cam);
+void BKE_camera_make_local(struct Camera *cam);
+void BKE_camera_free(struct Camera *ca);
/* Camera Usage */
-float object_camera_dof_distance(struct Object *ob);
-void object_camera_mode(struct RenderData *rd, struct Object *ob);
+float BKE_camera_object_dof_distance(struct Object *ob);
+void BKE_camera_object_mode(struct RenderData *rd, struct Object *ob);
-int camera_sensor_fit(int sensor_fit, float sizex, float sizey);
-float camera_sensor_size(int sensor_fit, float sensor_x, float sensor_y);
+int BKE_camera_sensor_fit(int sensor_fit, float sizex, float sizey);
+float BKE_camera_sensor_size(int sensor_fit, float sensor_x, float sensor_y);
/* Camera Parameters:
*
@@ -102,21 +102,21 @@ typedef struct CameraParams {
float winmat[4][4];
} CameraParams;
-void camera_params_init(CameraParams *params);
-void camera_params_from_object(CameraParams *params, struct Object *camera);
-void camera_params_from_view3d(CameraParams *params, struct View3D *v3d, struct RegionView3D *rv3d);
+void BKE_camera_params_init(CameraParams *params);
+void BKE_camera_params_from_object(CameraParams *params, struct Object *camera);
+void BKE_camera_params_from_view3d(CameraParams *params, struct View3D *v3d, struct RegionView3D *rv3d);
-void camera_params_compute_viewplane(CameraParams *params, int winx, int winy, float aspx, float aspy);
-void camera_params_compute_matrix(CameraParams *params);
+void BKE_camera_params_compute_viewplane(CameraParams *params, int winx, int winy, float aspx, float aspy);
+void BKE_camera_params_compute_matrix(CameraParams *params);
/* Camera View Frame */
-void camera_view_frame_ex(struct Scene *scene, struct Camera *camera, float drawsize, const short do_clip, const float scale[3],
+void BKE_camera_view_frame_ex(struct Scene *scene, struct Camera *camera, float drawsize, const short do_clip, const float scale[3],
float r_asp[2], float r_shift[2], float *r_drawsize, float r_vec[4][3]);
-void camera_view_frame(struct Scene *scene, struct Camera *camera, float r_vec[4][3]);
+void BKE_camera_view_frame(struct Scene *scene, struct Camera *camera, float r_vec[4][3]);
-int camera_view_frame_fit_to_scene(
+int BKE_camera_view_frame_fit_to_scene(
struct Scene *scene, struct View3D *v3d, struct Object *camera_ob,
float r_co[3]);
diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h
index 623dbd9c7ac..378cc72beb1 100644
--- a/source/blender/blenkernel/BKE_cloth.h
+++ b/source/blender/blenkernel/BKE_cloth.h
@@ -169,10 +169,10 @@ typedef enum
/* Spring types as defined in the paper.*/
typedef enum
{
- CLOTH_SPRING_TYPE_STRUCTURAL = ( 1 << 1 ),
- CLOTH_SPRING_TYPE_SHEAR = ( 1 << 2 ) ,
- CLOTH_SPRING_TYPE_BENDING = ( 1 << 3 ),
- CLOTH_SPRING_TYPE_GOAL = ( 1 << 4 ),
+ CLOTH_SPRING_TYPE_STRUCTURAL = (1 << 1),
+ CLOTH_SPRING_TYPE_SHEAR = (1 << 2),
+ CLOTH_SPRING_TYPE_BENDING = (1 << 3),
+ CLOTH_SPRING_TYPE_GOAL = (1 << 4)
} CLOTH_SPRING_TYPES;
/* SPRING FLAGS */
diff --git a/source/blender/blenkernel/BKE_constraint.h b/source/blender/blenkernel/BKE_constraint.h
index f834ad5e774..35d07e7a7a7 100644
--- a/source/blender/blenkernel/BKE_constraint.h
+++ b/source/blender/blenkernel/BKE_constraint.h
@@ -62,7 +62,7 @@ typedef struct bConstraintOb {
/* ---------------------------------------------------------------------------- */
/* Callback format for performing operations on ID-pointers for Constraints */
-typedef void (*ConstraintIDFunc)(struct bConstraint *con, struct ID **idpoin, void *userdata);
+typedef void (*ConstraintIDFunc)(struct bConstraint *con, struct ID **idpoin, short isReference, void *userdata);
/* ....... */
@@ -87,8 +87,6 @@ typedef struct bConstraintTypeInfo {
/* data management function pointers - special handling */
/* free any data that is allocated separately (optional) */
void (*free_data)(struct bConstraint *con);
- /* adjust pointer to other ID-data using ID_NEW(), but not to targets (optional) */
- void (*relink_data)(struct bConstraint *con);
/* run the provided callback function on all the ID-blocks linked to the constraint */
void (*id_looper)(struct bConstraint *con, ConstraintIDFunc func, void *userdata);
/* copy any special data that is allocated separately (optional) */
diff --git a/source/blender/blenkernel/BKE_curve.h b/source/blender/blenkernel/BKE_curve.h
index fa3a1a6897a..6267104022c 100644
--- a/source/blender/blenkernel/BKE_curve.h
+++ b/source/blender/blenkernel/BKE_curve.h
@@ -53,72 +53,83 @@ struct Scene;
#define CU_DO_TILT(cu, nu) (((nu->flag & CU_2D) && (cu->flag & CU_3D)==0) ? 0 : 1)
#define CU_DO_RADIUS(cu, nu) ((CU_DO_TILT(cu, nu) || ((cu)->flag & CU_PATH_RADIUS) || (cu)->bevobj || (cu)->ext1!=0.0f || (cu)->ext2!=0.0f) ? 1:0)
+/* ** Curve ** */
+void BKE_curve_unlink(struct Curve *cu);
+void BKE_curve_free(struct Curve *cu);
+void BKE_curve_editfont_free(struct Curve *cu);
+struct Curve *BKE_curve_add(const char *name, int type);
+struct Curve *BKE_curve_copy(struct Curve *cu);
+void BKE_curve_make_local(struct Curve *cu);
+short BKE_curve_type_get(struct Curve *cu);
+void BKE_curve_type_test(struct Object *ob);
+void BKE_curve_curve_dimension_update(struct Curve *cu);
+void BKE_curve_texspace_calc(struct Curve *cu);
-void unlink_curve(struct Curve *cu);
-void free_curve_editNurb_keyIndex(struct EditNurb *editnurb);
-void free_curve_editNurb(struct Curve *cu);
-void free_curve(struct Curve *cu);
-void BKE_free_editfont(struct Curve *cu);
-struct Curve *add_curve(const char *name, int type);
-struct Curve *copy_curve(struct Curve *cu);
-void make_local_curve(struct Curve *cu);
-struct ListBase *curve_editnurbs(struct Curve *cu);
-short curve_type(struct Curve *cu);
-void test_curve_type(struct Object *ob);
-void update_curve_dimension(struct Curve *cu );
-void tex_space_curve(struct Curve *cu);
-int count_curveverts(struct ListBase *nurb);
-int count_curveverts_without_handles(struct ListBase *nurb);
-void freeNurb(struct Nurb *nu);
-void freeNurblist(struct ListBase *lb);
-struct Nurb *duplicateNurb(struct Nurb *nu);
-void duplicateNurblist(struct ListBase *lb1, struct ListBase *lb2);
-void test2DNurb(struct Nurb *nu);
-void minmaxNurb(struct Nurb *nu, float *min, float *max);
-
-void nurbs_knot_calc_u(struct Nurb *nu);
-void nurbs_knot_calc_v(struct Nurb *nu);
-
-void makeNurbfaces(struct Nurb *nu, float *coord_array, int rowstride, int resolu, int resolv);
-void makeNurbcurve(struct Nurb *nu, float *coord_array, float *tilt_array, float *radius_array, float *weight_array, int resolu, int stride);
-void forward_diff_bezier(float q0, float q1, float q2, float q3, float *p, int it, int stride);
-float *make_orco_curve(struct Scene *scene, struct Object *ob);
-float *make_orco_surf(struct Object *ob);
-void makebevelcurve(struct Scene *scene, struct Object *ob, struct ListBase *disp, int forRender);
-
-void makeBevelList(struct Object *ob);
-
-void calchandleNurb(struct BezTriple *bezt, struct BezTriple *prev, struct BezTriple *next, int mode);
-void calchandlesNurb(struct Nurb *nu);
-void testhandlesNurb(struct Nurb *nu);
-void autocalchandlesNurb(struct Nurb *nu, int flag);
-void autocalchandlesNurb_all(ListBase *editnurb, int flag);
-void sethandlesNurb(ListBase *editnurb, short code);
-
-void switchdirectionNurb(struct Nurb *nu);
-
-void addNurbPoints(struct Nurb *nu, int number);
-void addNurbPointsBezier(struct Nurb *nu, int number);
-
-float (*curve_getVertexCos(struct Curve *cu, struct ListBase *lb, int *numVerts_r))[3];
-void curve_applyVertexCos(struct Curve *cu, struct ListBase *lb, float (*vertexCos)[3]);
-
-float (*curve_getKeyVertexCos(struct Curve *cu, struct ListBase *lb, float *key))[3];
-void curve_applyKeyVertexTilts(struct Curve *cu, struct ListBase *lb, float *key);
+int BKE_curve_minmax(struct Curve *cu, float min[3], float max[3]);
+int BKE_curve_center_median(struct Curve *cu, float cent[3]);
+int BKE_curve_center_bounds(struct Curve *cu, float cent[3]);
+void BKE_curve_translate(struct Curve *cu, float offset[3], int do_keys);
+void BKE_curve_delete_material_index(struct Curve *cu, int index);
+
+ListBase *BKE_curve_nurbs_get(struct Curve *cu);
+
+float (*BKE_curve_vertexCos_get(struct Curve *cu, struct ListBase *lb, int *numVerts_r))[3];
+void BK_curve_vertexCos_apply(struct Curve *cu, struct ListBase *lb, float (*vertexCos)[3]);
+
+float (*BKE_curve_keyVertexCos_get(struct Curve *cu, struct ListBase *lb, float *key))[3];
+void BKE_curve_keyVertexTilts_apply(struct Curve *cu, struct ListBase *lb, float *key);
+
+void BKE_curve_editNurb_keyIndex_free(struct EditNurb *editnurb);
+void BKE_curve_editNurb_free(struct Curve *cu);
+struct ListBase *BKE_curve_editNurbs_get(struct Curve *cu);
+
+float *BKE_curve_make_orco(struct Scene *scene, struct Object *ob);
+float *BKE_curve_surf_make_orco(struct Object *ob);
+
+void BKE_curve_bevelList_make(struct Object *ob);
+void BKE_curve_bevel_make(struct Scene *scene, struct Object *ob, struct ListBase *disp, int forRender);
+
+void BKE_curve_forward_diff_bezier(float q0, float q1, float q2, float q3, float *p, int it, int stride);
+
+/* ** Nurbs ** */
+
+int BKE_nurbList_verts_count(struct ListBase *nurb);
+int BKE_nurbList_verts_count_without_handles(struct ListBase *nurb);
+
+void BKE_nurbList_free(struct ListBase *lb);
+void BKE_nurbList_duplicate(struct ListBase *lb1, struct ListBase *lb2);
+void BKE_nurbList_handles_set(struct ListBase *editnurb, short code);
+
+void BKE_nurbList_handles_autocalc(ListBase *editnurb, int flag);
+
+void BKE_nurb_free(struct Nurb *nu);
+struct Nurb *BKE_nurb_duplicate(struct Nurb *nu);
+
+void BKE_nurb_test2D(struct Nurb *nu);
+void BKE_nurb_minmax(struct Nurb *nu, float *min, float *max);
+
+void BKE_nurb_makeFaces(struct Nurb *nu, float *coord_array, int rowstride, int resolu, int resolv);
+void BKE_nurb_makeCurve(struct Nurb *nu, float *coord_array, float *tilt_array, float *radius_array, float *weight_array, int resolu, int stride);
+
+void BKE_nurb_knot_calc_u(struct Nurb *nu);
+void BKE_nurb_knot_calc_v(struct Nurb *nu);
/* nurb checks if they can be drawn, also clamp order func */
-int check_valid_nurb_u(struct Nurb *nu);
-int check_valid_nurb_v(struct Nurb *nu);
+int BKE_nurb_check_valid_u(struct Nurb *nu);
+int BKE_nurb_check_valid_v(struct Nurb *nu);
-int clamp_nurb_order_u(struct Nurb *nu);
-int clamp_nurb_order_v(struct Nurb *nu);
+int BKE_nurb_order_clamp_u(struct Nurb *nu);
+int BKE_nurb_order_clamp_v(struct Nurb *nu);
-ListBase *BKE_curve_nurbs(struct Curve *cu);
+void BKE_nurb_direction_switch(struct Nurb *nu);
-int minmax_curve(struct Curve *cu, float min[3], float max[3]);
-int curve_center_median(struct Curve *cu, float cent[3]);
-int curve_center_bounds(struct Curve *cu, float cent[3]);
-void curve_translate(struct Curve *cu, float offset[3], int do_keys);
-void curve_delete_material_index(struct Curve *cu, int index);
-#endif
+void BKE_nurb_points_add(struct Nurb *nu, int number);
+void BKE_nurb_bezierPoints_add(struct Nurb *nu, int number);
+
+void BKE_nurb_handle_calc(struct BezTriple *bezt, struct BezTriple *prev, struct BezTriple *next, int mode);
+void BKE_nurb_handles_calc(struct Nurb *nu);
+void BKE_nurb_handles_autocalc(struct Nurb *nu, int flag);
+void BKE_nurb_handles_test(struct Nurb *nu);
+
+#endif
diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h
index 6a3625e2133..4b52189d8b7 100644
--- a/source/blender/blenkernel/BKE_customdata.h
+++ b/source/blender/blenkernel/BKE_customdata.h
@@ -305,6 +305,7 @@ int CustomData_sizeof(int type);
/* get the name of a layer type */
const char *CustomData_layertype_name(int type);
+int CustomData_layertype_is_singleton(int type);
/* make sure the name of layer at index is unique */
void CustomData_set_layer_unique_name(struct CustomData *data, int index);
diff --git a/source/blender/blenkernel/BKE_deform.h b/source/blender/blenkernel/BKE_deform.h
index 17275b6ea7d..559dd4571f5 100644
--- a/source/blender/blenkernel/BKE_deform.h
+++ b/source/blender/blenkernel/BKE_deform.h
@@ -69,9 +69,13 @@ void defvert_flip_merged(struct MDeformVert *dvert, const int *flip_map, const i
void defvert_normalize(struct MDeformVert *dvert);
void defvert_normalize_lock(struct MDeformVert *dvert, const int def_nr_lock);
-/* utility function, note that 32 chars is the maximum string length since its only
+/* utility function, note that MAX_VGROUP_NAME chars is the maximum string length since its only
* used with defgroups currently */
-void flip_side_name(char name[64], const char from_name[64], int strip_number);
+
+void BKE_deform_split_suffix(const char string[MAX_VGROUP_NAME], char base[MAX_VGROUP_NAME], char ext[MAX_VGROUP_NAME]);
+void BKE_deform_split_prefix(const char string[MAX_VGROUP_NAME], char base[MAX_VGROUP_NAME], char ext[MAX_VGROUP_NAME]);
+
+void flip_side_name(char name[MAX_VGROUP_NAME], const char from_name[MAX_VGROUP_NAME], int strip_number);
#endif
diff --git a/source/blender/blenkernel/BKE_displist.h b/source/blender/blenkernel/BKE_displist.h
index 5a36add2834..cb8ddbf0b00 100644
--- a/source/blender/blenkernel/BKE_displist.h
+++ b/source/blender/blenkernel/BKE_displist.h
@@ -1,5 +1,4 @@
/*
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -24,8 +23,7 @@
* Contributor(s): none yet.
*
* ***** END GPL LICENSE BLOCK *****
-
-*/
+ */
#ifndef __BKE_DISPLIST_H__
#define __BKE_DISPLIST_H__
@@ -80,29 +78,28 @@ typedef struct DispList {
unsigned int *bevelSplitFlag;
} DispList;
-extern void copy_displist(struct ListBase *lbn, struct ListBase *lb);
-extern void free_disp_elem(DispList *dl);
-extern DispList *find_displist_create(struct ListBase *lb, int type);
-extern DispList *find_displist(struct ListBase *lb, int type);
-extern void addnormalsDispList(struct ListBase *lb);
-extern void count_displist(struct ListBase *lb, int *totvert, int *totface);
-extern void freedisplist(struct ListBase *lb);
-extern int displist_has_faces(struct ListBase *lb);
+void BKE_displist_copy(struct ListBase *lbn, struct ListBase *lb);
+void BKE_displist_elem_free(DispList *dl);
+DispList *BKE_displist_find_or_create(struct ListBase *lb, int type);
+DispList *BKE_displist_find(struct ListBase *lb, int type);
+void BKE_displist_normals_add(struct ListBase *lb);
+void BKE_displist_count(struct ListBase *lb, int *totvert, int *totface);
+void BKE_displist_free(struct ListBase *lb);
+int BKE_displist_has_faces(struct ListBase *lb);
-extern void makeDispListSurf(struct Scene *scene, struct Object *ob, struct ListBase *dispbase, struct DerivedMesh **derivedFinal, int forRender, int forOrco);
-extern void makeDispListCurveTypes(struct Scene *scene, struct Object *ob, int forOrco);
-extern void makeDispListCurveTypes_forRender(struct Scene *scene, struct Object *ob, struct ListBase *dispbase, struct DerivedMesh **derivedFinal, int forOrco);
-extern void makeDispListCurveTypes_forOrco(struct Scene *scene, struct Object *ob, struct ListBase *dispbase);
-extern void makeDispListMBall(struct Scene *scene, struct Object *ob);
-extern void makeDispListMBall_forRender(struct Scene *scene, struct Object *ob, struct ListBase *dispbase);
+void BKE_displist_make_surf(struct Scene *scene, struct Object *ob, struct ListBase *dispbase, struct DerivedMesh **derivedFinal, int forRender, int forOrco);
+void BKE_displist_make_curveTypes(struct Scene *scene, struct Object *ob, int forOrco);
+void BKE_displist_make_curveTypes_forRender(struct Scene *scene, struct Object *ob, struct ListBase *dispbase, struct DerivedMesh **derivedFinal, int forOrco);
+void BKE_displist_make_curveTypes_forOrco(struct Scene *scene, struct Object *ob, struct ListBase *dispbase);
+void BKE_displist_make_mball(struct Scene *scene, struct Object *ob);
+void BKE_displist_make_mball_forRender(struct Scene *scene, struct Object *ob, struct ListBase *dispbase);
-int surfindex_displist(DispList *dl, int a, int *b, int *p1, int *p2, int *p3, int *p4);
-void filldisplist(struct ListBase *dispbase, struct ListBase *to, int flipnormal);
+int BKE_displist_surfindex_get(DispList *dl, int a, int *b, int *p1, int *p2, int *p3, int *p4);
+void BKE_displist_fill(struct ListBase *dispbase, struct ListBase *to, int flipnormal);
-float calc_taper(struct Scene *scene, struct Object *taperobj, int cur, int tot);
+float BKE_displist_calc_taper(struct Scene *scene, struct Object *taperobj, int cur, int tot);
/* add Orco layer to the displist object which has got derived mesh and return orco */
-float *makeOrcoDispList(struct Scene *scene, struct Object *ob, struct DerivedMesh *derivedFinal, int forRender);
+float *BKE_displist_make_orco(struct Scene *scene, struct Object *ob, struct DerivedMesh *derivedFinal, int forRender);
#endif
-
diff --git a/source/blender/blenkernel/BKE_dynamicpaint.h b/source/blender/blenkernel/BKE_dynamicpaint.h
index a71522773fe..59f8864bb21 100644
--- a/source/blender/blenkernel/BKE_dynamicpaint.h
+++ b/source/blender/blenkernel/BKE_dynamicpaint.h
@@ -1,4 +1,4 @@
-/**
+/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -6,6 +6,15 @@
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
* Contributor(s): Miika Hämäläinen
*
* ***** END GPL LICENSE BLOCK *****
@@ -14,6 +23,10 @@
#ifndef __BKE_DYNAMICPAINT_H__
#define __BKE_DYNAMICPAINT_H__
+/** \file BKE_dynamicpaint.h
+ * \ingroup bke
+ */
+
struct bContext;
struct wmOperator;
diff --git a/source/blender/blenkernel/BKE_font.h b/source/blender/blenkernel/BKE_font.h
index e94787cfd3c..6636a70e94d 100644
--- a/source/blender/blenkernel/BKE_font.h
+++ b/source/blender/blenkernel/BKE_font.h
@@ -49,7 +49,7 @@ struct Main;
struct chartrans {
float xof, yof;
float rot;
- short linenr,charnr;
+ short linenr, charnr;
char dobreak;
};
@@ -71,17 +71,17 @@ typedef struct EditFont {
} EditFont;
-void BKE_font_register_builtin(void *mem, int size);
+void BKE_vfont_builtin_register(void *mem, int size);
-void free_vfont(struct VFont *sc);
-void free_ttfont(void);
-struct VFont *get_builtin_font(void);
-struct VFont *load_vfont(struct Main *bmain, const char *name);
-struct TmpFont *vfont_find_tmpfont(struct VFont *vfont);
+void BKE_vfont_free(struct VFont *sc);
+void BKE_vfont_free_global_ttf(void);
+struct VFont *BKE_vfont_builtin_get(void);
+struct VFont *BKE_vfont_load(struct Main *bmain, const char *name);
+struct TmpFont *BKE_vfont_find_tmpfont(struct VFont *vfont);
-struct chartrans *BKE_text_to_curve(struct Main *bmain, struct Scene *scene, struct Object *ob, int mode);
+struct chartrans *BKE_vfont_to_curve(struct Main *bmain, struct Scene *scene, struct Object *ob, int mode);
-int BKE_font_getselection(struct Object *ob, int *start, int *end);
+int BKE_vfont_select_get(struct Object *ob, int *start, int *end);
#ifdef __cplusplus
}
diff --git a/source/blender/blenkernel/BKE_gpencil.h b/source/blender/blenkernel/BKE_gpencil.h
index bb0216fe11c..134ec1acd8e 100644
--- a/source/blender/blenkernel/BKE_gpencil.h
+++ b/source/blender/blenkernel/BKE_gpencil.h
@@ -41,7 +41,7 @@ struct bGPDframe;
void free_gpencil_strokes(struct bGPDframe *gpf);
void free_gpencil_frames(struct bGPDlayer *gpl);
void free_gpencil_layers(struct ListBase *list);
-void free_gpencil_data(struct bGPdata *gpd);
+void BKE_gpencil_free(struct bGPdata *gpd);
struct bGPDframe *gpencil_frame_addnew(struct bGPDlayer *gpl, int cframe);
struct bGPDlayer *gpencil_layer_addnew(struct bGPdata *gpd);
diff --git a/source/blender/blenkernel/BKE_group.h b/source/blender/blenkernel/BKE_group.h
index 6629f0bdf7f..ccf9e0cef5b 100644
--- a/source/blender/blenkernel/BKE_group.h
+++ b/source/blender/blenkernel/BKE_group.h
@@ -40,10 +40,10 @@ struct Object;
struct bAction;
struct Scene;
-void free_group_objects(struct Group *group);
-void unlink_group(struct Group *group);
+void BKE_group_free(struct Group *group);
+void BKE_group_unlink(struct Group *group);
struct Group *add_group(const char *name);
-struct Group *copy_group(struct Group *group);
+struct Group *BKE_group_copy(struct Group *group);
int add_to_group(struct Group *group, struct Object *ob, struct Scene *scene, struct Base *base);
int rem_from_group(struct Group *group, struct Object *ob, struct Scene *scene, struct Base *base);
struct Group *find_group(struct Object *ob, struct Group *group);
diff --git a/source/blender/blenkernel/BKE_image.h b/source/blender/blenkernel/BKE_image.h
index c2112d1e169..563f066bda6 100644
--- a/source/blender/blenkernel/BKE_image.h
+++ b/source/blender/blenkernel/BKE_image.h
@@ -46,14 +46,14 @@ struct Object;
struct ImageFormatData;
/* call from library */
-void free_image(struct Image *me);
+void BKE_image_free(struct Image *me);
-void BKE_stamp_info(struct Scene *scene, struct Object *camera, struct ImBuf *ibuf);
+void BKE_imbuf_stamp_info(struct Scene *scene, struct Object *camera, struct ImBuf *ibuf);
void BKE_stamp_buf(struct Scene *scene, struct Object *camera, unsigned char *rect, float *rectf, int width, int height, int channels);
-int BKE_alphatest_ibuf(struct ImBuf *ibuf);
-int BKE_write_ibuf_stamp(struct Scene *scene, struct Object *camera, struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf);
-int BKE_write_ibuf(struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf);
-int BKE_write_ibuf_as(struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf, const short is_copy);
+int BKE_imbuf_alpha_test(struct ImBuf *ibuf);
+int BKE_imbuf_write_stamp(struct Scene *scene, struct Object *camera, struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf);
+int BKE_imbuf_write(struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf);
+int BKE_imbuf_write_as(struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf, const short is_copy);
void BKE_makepicstring(char *string, const char *base, const char *relbase, int frame, const char imtype, const short use_ext, const short use_frames);
int BKE_add_image_extension(char *string, const char imtype);
char BKE_ftype_to_imtype(const int ftype);
@@ -72,11 +72,11 @@ void BKE_imformat_defaults(struct ImageFormatData *im_format);
struct anim *openanim(const char *name, int flags, int streamindex);
-void image_de_interlace(struct Image *ima, int odd);
+void BKE_image_de_interlace(struct Image *ima, int odd);
-void make_local_image(struct Image *ima);
+void BKE_image_make_local(struct Image *ima);
-void tag_image_time(struct Image *ima);
+void BKE_image_tag_time(struct Image *ima);
void free_old_images(void);
/* ********************************** NEW IMAGE API *********************** */
@@ -130,13 +130,15 @@ struct ImBuf *BKE_image_get_ibuf(struct Image *ima, struct ImageUser *iuser);
struct ImBuf *BKE_image_acquire_ibuf(struct Image *ima, struct ImageUser *iuser, void **lock_r);
void BKE_image_release_ibuf(struct Image *ima, void *lock);
+/* returns a new image or NULL if it can't load */
+struct Image *BKE_image_load(const char *filepath);
/* returns existing Image when filename/type is same (frame optional) */
-struct Image *BKE_add_image_file(const char *name);
+struct Image *BKE_image_load_exists(const char *filepath);
/* adds image, adds ibuf, generates color or pattern */
-struct Image *BKE_add_image_size(unsigned int width, unsigned int height, const char *name, int depth, int floatbuf, short uvtestgrid, float color[4]);
+struct Image *BKE_image_add_generated(unsigned int width, unsigned int height, const char *name, int depth, int floatbuf, short uvtestgrid, float color[4]);
/* adds image from imbuf, owns imbuf */
-struct Image *BKE_add_image_imbuf(struct ImBuf *ibuf);
+struct Image *BKE_image_add_from_imbuf(struct ImBuf *ibuf);
/* for reload, refresh, pack */
void BKE_image_signal(struct Image *ima, struct ImageUser *iuser, int signal);
@@ -148,8 +150,8 @@ struct Image *BKE_image_verify_viewer(int type, const char *name);
void BKE_image_assign_ibuf(struct Image *ima, struct ImBuf *ibuf);
/* called on frame change or before render */
-void BKE_image_user_calc_frame(struct ImageUser *iuser, int cfra, int fieldnr);
-int BKE_image_user_get_frame(const struct ImageUser *iuser, int cfra, int fieldnr);
+void BKE_image_user_frame_calc(struct ImageUser *iuser, int cfra, int fieldnr);
+int BKE_image_user_frame_get(const struct ImageUser *iuser, int cfra, int fieldnr);
/* sets index offset for multilayer files */
struct RenderPass *BKE_image_multilayer_index(struct RenderResult *rr, struct ImageUser *iuser);
@@ -176,7 +178,7 @@ void BKE_image_memorypack(struct Image *ima);
void BKE_image_print_memlist(void);
/* empty image block, of similar type and filename */
-struct Image *copy_image(struct Image *ima);
+struct Image *BKE_image_copy(struct Image *ima);
/* merge source into dest, and free source */
void BKE_image_merge(struct Image *dest, struct Image *source);
diff --git a/source/blender/blenkernel/BKE_ipo.h b/source/blender/blenkernel/BKE_ipo.h
index 547e7de7634..ca86e90f192 100644
--- a/source/blender/blenkernel/BKE_ipo.h
+++ b/source/blender/blenkernel/BKE_ipo.h
@@ -45,7 +45,7 @@ void do_versions_ipos_to_animato(struct Main *main);
/* --------------------- xxx stuff ------------------------ */
-void free_ipo(struct Ipo *ipo);
+void BKE_ipo_free(struct Ipo *ipo);
#ifdef __cplusplus
};
diff --git a/source/blender/blenkernel/BKE_key.h b/source/blender/blenkernel/BKE_key.h
index 63d9d731097..757952515e5 100644
--- a/source/blender/blenkernel/BKE_key.h
+++ b/source/blender/blenkernel/BKE_key.h
@@ -47,12 +47,12 @@ struct Mesh;
extern "C" {
#endif
-void free_key(struct Key *sc);
+void BKE_key_free(struct Key *sc);
void free_key_nolib(struct Key *key);
struct Key *add_key(struct ID *id);
-struct Key *copy_key(struct Key *key);
+struct Key *BKE_key_copy(struct Key *key);
struct Key *copy_key_nolib(struct Key *key);
-void make_local_key(struct Key *key);
+void BKE_key_make_local(struct Key *key);
void sort_keys(struct Key *key);
void key_curve_position_weights(float t, float *data, int type);
diff --git a/source/blender/blenkernel/BKE_lamp.h b/source/blender/blenkernel/BKE_lamp.h
index 50e25576320..f9137e50d74 100644
--- a/source/blender/blenkernel/BKE_lamp.h
+++ b/source/blender/blenkernel/BKE_lamp.h
@@ -38,11 +38,11 @@ extern "C" {
struct Lamp;
-void *add_lamp(const char *name);
-struct Lamp *copy_lamp(struct Lamp *la);
+void *BKE_lamp_add(const char *name);
+struct Lamp *BKE_lamp_copy(struct Lamp *la);
struct Lamp *localize_lamp(struct Lamp *la);
-void make_local_lamp(struct Lamp *la);
-void free_lamp(struct Lamp *la);
+void BKE_lamp_make_local(struct Lamp *la);
+void BKE_lamp_free(struct Lamp *la);
#ifdef __cplusplus
}
diff --git a/source/blender/blenkernel/BKE_lattice.h b/source/blender/blenkernel/BKE_lattice.h
index 29c78510fd8..9a952fc6b1e 100644
--- a/source/blender/blenkernel/BKE_lattice.h
+++ b/source/blender/blenkernel/BKE_lattice.h
@@ -41,15 +41,15 @@ struct DerivedMesh;
struct BPoint;
struct MDeformVert;
-void resizelattice(struct Lattice *lt, int u, int v, int w, struct Object *ltOb);
-struct Lattice *add_lattice(const char *name);
-struct Lattice *copy_lattice(struct Lattice *lt);
-void free_lattice(struct Lattice *lt);
-void make_local_lattice(struct Lattice *lt);
+void BKE_lattice_resize(struct Lattice *lt, int u, int v, int w, struct Object *ltOb);
+struct Lattice *BKE_lattice_add(const char *name);
+struct Lattice *BKE_lattice_copy(struct Lattice *lt);
+void BKE_lattice_free(struct Lattice *lt);
+void BKE_lattice_make_local(struct Lattice *lt);
void calc_lat_fudu(int flag, int res, float *fu, float *du);
void init_latt_deform(struct Object *oblatt, struct Object *ob);
-void calc_latt_deform(struct Object *, float *co, float weight);
+void calc_latt_deform(struct Object *, float co[3], float weight);
void end_latt_deform(struct Object *);
int object_deform_mball(struct Object *ob, struct ListBase *dispbase);
@@ -69,11 +69,11 @@ void armature_deform_verts(struct Object *armOb, struct Object *target,
float (*defMats)[3][3], int numVerts, int deformflag,
float (*prevCos)[3], const char *defgrp_name);
-float (*lattice_getVertexCos(struct Object *ob, int *numVerts_r))[3];
-void lattice_applyVertexCos(struct Object *ob, float (*vertexCos)[3]);
-void lattice_calc_modifiers(struct Scene *scene, struct Object *ob);
+float (*BKE_lattice_vertexcos_get(struct Object *ob, int *numVerts_r))[3];
+void BKE_lattice_vertexcos_apply(struct Object *ob, float (*vertexCos)[3]);
+void BKE_lattice_modifiers_calc(struct Scene *scene, struct Object *ob);
-struct MDeformVert* lattice_get_deform_verts(struct Object *lattice);
+struct MDeformVert* BKE_lattice_deform_verts_get(struct Object *lattice);
#endif
diff --git a/source/blender/blenkernel/BKE_library.h b/source/blender/blenkernel/BKE_library.h
index b18d25094dc..2804eb407db 100644
--- a/source/blender/blenkernel/BKE_library.h
+++ b/source/blender/blenkernel/BKE_library.h
@@ -45,15 +45,16 @@ struct bContext;
struct PointerRNA;
struct PropertyRNA;
-void *alloc_libblock(struct ListBase *lb, short type, const char *name);
-void *copy_libblock(struct ID *id);
-void copy_libblock_data(struct ID *id, const struct ID *id_from, const short do_action);
+void *BKE_libblock_alloc(struct ListBase *lb, short type, const char *name);
+void *BKE_libblock_copy(struct ID *id);
+void BKE_libblock_copy_data(struct ID *id, const struct ID *id_from, const short do_action);
void BKE_id_lib_local_paths(struct Main *bmain, struct Library *lib, struct ID *id);
void id_lib_extern(struct ID *id);
void BKE_library_filepath_set(struct Library *lib, const char *filepath);
void id_us_plus(struct ID *id);
void id_us_min(struct ID *id);
+
int id_make_local(struct ID *id, int test);
int id_single_user(struct bContext *C, struct ID *id, struct PointerRNA *ptr, struct PropertyRNA *prop);
int id_copy(struct ID *id, struct ID **newid, int test);
@@ -68,8 +69,8 @@ struct ListBase *which_libbase(struct Main *mainlib, short type);
#define MAX_LIBARRAY 40
int set_listbasepointers(struct Main *main, struct ListBase **lb);
-void free_libblock(struct ListBase *lb, void *idv);
-void free_libblock_us(struct ListBase *lb, void *idv);
+void BKE_libblock_free(struct ListBase *lb, void *idv);
+void BKE_libblock_free_us(struct ListBase *lb, void *idv);
void free_main(struct Main *mainvar);
void tag_main_idcode(struct Main *mainvar, const short type, const short tag);
@@ -81,11 +82,11 @@ void name_uiprefix_id(char *name, struct ID *id);
void test_idbutton(char *name);
void text_idbutton(struct ID *id, char *text);
void BKE_library_make_local(struct Main *bmain, struct Library *lib, int untagged_only);
-struct ID *find_id(const char *type, const char *name);
+struct ID *BKE_libblock_find_name(const short type, const char *name);
void clear_id_newpoins(void);
void IDnames_to_pupstring(const char **str, const char *title, const char *extraops,
- struct ListBase *lb,struct ID* link, short *nr);
+ struct ListBase *lb, struct ID* link, short *nr);
void IMAnames_to_pupstring(const char **str, const char *title, const char *extraops,
struct ListBase *lb, struct ID *link, short *nr);
diff --git a/source/blender/blenkernel/BKE_material.h b/source/blender/blenkernel/BKE_material.h
index 99561a687b9..801724d1d4f 100644
--- a/source/blender/blenkernel/BKE_material.h
+++ b/source/blender/blenkernel/BKE_material.h
@@ -46,15 +46,15 @@ struct MTFace;
/* materials */
void init_def_material(void);
-void free_material(struct Material *sc);
+void BKE_material_free(struct Material *sc);
void test_object_materials(struct ID *id);
void resize_object_material(struct Object *ob, const short totcol);
void init_material(struct Material *ma);
-struct Material *add_material(const char *name);
-struct Material *copy_material(struct Material *ma);
+struct Material *BKE_material_add(const char *name);
+struct Material *BKE_material_copy(struct Material *ma);
struct Material *localize_material(struct Material *ma);
struct Material *give_node_material(struct Material *ma); /* returns node material or self */
-void make_local_material(struct Material *ma);
+void BKE_material_make_local(struct Material *ma);
void extern_local_matarar(struct Material **matar, short totcol);
void automatname(struct Material *);
diff --git a/source/blender/blenkernel/BKE_mball.h b/source/blender/blenkernel/BKE_mball.h
index fafd2a3d30e..356f2c8901c 100644
--- a/source/blender/blenkernel/BKE_mball.h
+++ b/source/blender/blenkernel/BKE_mball.h
@@ -37,147 +37,30 @@ struct Object;
struct Scene;
struct MetaElem;
-typedef struct point { /* a three-dimensional point */
- float x, y, z; /* its coordinates */
-} MB_POINT;
+void BKE_mball_unlink(struct MetaBall *mb);
+void BKE_mball_free(struct MetaBall *mb);
+struct MetaBall *BKE_mball_add(const char *name);
+struct MetaBall *BKE_mball_copy(struct MetaBall *mb);
-typedef struct vertex { /* surface vertex */
- MB_POINT position, normal; /* position and surface normal */
-} VERTEX;
+void BKE_mball_make_local(struct MetaBall *mb);
-typedef struct vertices { /* list of vertices in polygonization */
- int count, max; /* # vertices, max # allowed */
- VERTEX *ptr; /* dynamically allocated */
-} VERTICES;
+void BKE_mball_cubeTable_free(void);
-typedef struct corner { /* corner of a cube */
- int i, j, k; /* (i, j, k) is index within lattice */
- float x, y, z, value; /* location and function value */
- struct corner *next;
-} CORNER;
+void BKE_mball_polygonize(struct Scene *scene, struct Object *ob, struct ListBase *dispbase);
+int BKE_mball_is_basis_for(struct Object *ob1, struct Object *ob2);
+int BKE_mball_is_basis(struct Object *ob);
+struct Object *BKE_mball_basis_find(struct Scene *scene, struct Object *ob);
-typedef struct cube { /* partitioning cell (cube) */
- int i, j, k; /* lattice location of cube */
- CORNER *corners[8]; /* eight corners */
-} CUBE;
+void BKE_mball_texspace_calc(struct Object *ob);
+float *BKE_mball_make_orco(struct Object *ob, struct ListBase *dispbase);
-typedef struct cubes { /* linked list of cubes acting as stack */
- CUBE cube; /* a single cube */
- struct cubes *next; /* remaining elements */
-} CUBES;
+void BKE_mball_properties_copy(struct Scene *scene, struct Object *active_object);
-typedef struct centerlist { /* list of cube locations */
- int i, j, k; /* cube location */
- struct centerlist *next; /* remaining elements */
-} CENTERLIST;
+int BKE_mball_minmax(struct MetaBall *mb, float min[3], float max[3]);
+int BKE_mball_center_median(struct MetaBall *mb, float cent[3]);
+int BKE_mball_center_bounds(struct MetaBall *mb, float cent[3]);
+void BKE_mball_translate(struct MetaBall *mb, float offset[3]);
-typedef struct edgelist { /* list of edges */
- int i1, j1, k1, i2, j2, k2; /* edge corner ids */
- int vid; /* vertex id */
- struct edgelist *next; /* remaining elements */
-} EDGELIST;
-
-typedef struct intlist { /* list of integers */
- int i; /* an integer */
- struct intlist *next; /* remaining elements */
-} INTLIST;
-
-typedef struct intlists { /* list of list of integers */
- INTLIST *list; /* a list of integers */
- struct intlists *next; /* remaining elements */
-} INTLISTS;
-
-typedef struct process { /* parameters, function, storage */
- /* what happens here? floats, I think. */
- /* float (*function)(void); */ /* implicit surface function */
- float (*function)(float, float, float);
- float size, delta; /* cube size, normal delta */
- int bounds; /* cube range within lattice */
- CUBES *cubes; /* active cubes */
- VERTICES vertices; /* surface vertices */
- CENTERLIST **centers; /* cube center hash table */
- CORNER **corners; /* corner value hash table */
- EDGELIST **edges; /* edge and vertex id hash table */
-} PROCESS;
-
-/* dividing scene using octal tree makes polygonisation faster */
-typedef struct ml_pointer {
- struct ml_pointer *next, *prev;
- struct MetaElem *ml;
-} ml_pointer;
-
-typedef struct octal_node {
- struct octal_node *nodes[8]; /* children of current node */
- struct octal_node *parent; /* parent of current node */
- struct ListBase elems; /* ListBase of MetaElem pointers (ml_pointer) */
- float x_min, y_min, z_min; /* 1st border point */
- float x_max, y_max, z_max; /* 7th border point */
- float x,y,z; /* center of node */
- int pos, neg; /* number of positive and negative MetaElements in the node */
- int count; /* number of MetaElems, which belongs to the node */
-} octal_node;
-
-typedef struct octal_tree {
- struct octal_node *first; /* first node */
- int pos, neg; /* number of positive and negative MetaElements in the scene */
- short depth; /* number of scene subdivision */
-} octal_tree;
-
-struct pgn_elements {
- struct pgn_elements *next, *prev;
- char *data;
-};
-
-octal_node* find_metaball_octal_node(octal_node *node, float x, float y, float z, short depth);
-
-void freepolygonize(PROCESS *p);
-void docube(CUBE *cube, PROCESS *p, struct MetaBall *mb);
-void testface(int i, int j, int k, CUBE* old, int bit, int c1, int c2, int c3, int c4, PROCESS *p);
-CORNER *setcorner (PROCESS* p, int i, int j, int k);
-int vertid (CORNER *c1, CORNER *c2, PROCESS *p, struct MetaBall *mb);
-int setcenter(CENTERLIST *table[], int i, int j, int k);
-int otherface (int edge, int face);
-void makecubetable (void);
-void setedge (EDGELIST *table[], int i1, int j1, int k1, int i2, int j2, int k2, int vid);
-int getedge (EDGELIST *table[], int i1, int j1, int k1, int i2, int j2, int k2);
-void addtovertices (VERTICES *vertices, VERTEX v);
-void vnormal (MB_POINT *point, PROCESS *p, MB_POINT *v);
-void converge (MB_POINT *p1, MB_POINT *p2, float v1, float v2, float (*function)(float, float, float), MB_POINT *p, struct MetaBall *mb, int f);
-void add_cube(PROCESS *mbproc, int i, int j, int k, int count);
-void find_first_points(PROCESS *mbproc, struct MetaBall *mb, int a);
-
-void fill_metaball_octal_node(octal_node *node, struct MetaElem *ml, short i);
-void subdivide_metaball_octal_node(octal_node *node, float size_x, float size_y, float size_z, short depth);
-void free_metaball_octal_node(octal_node *node);
-void init_metaball_octal_tree(int depth);
-void polygonize(PROCESS *mbproc, struct MetaBall *mb);
-float init_meta(struct Scene *scene, struct Object *ob);
-
-void unlink_mball(struct MetaBall *mb);
-void free_mball(struct MetaBall *mb);
-struct MetaBall *add_mball(const char *name);
-struct MetaBall *copy_mball(struct MetaBall *mb);
-void make_local_mball(struct MetaBall *mb);
-struct MetaElem *add_metaball_element(struct MetaBall *mb, const int type);
-void tex_space_mball(struct Object *ob);
-float *make_orco_mball(struct Object *ob, struct ListBase *dispbase);
-void copy_mball_properties(struct Scene *scene, struct Object *active_object);
-struct Object *find_basis_mball(struct Scene *scene, struct Object *ob);
-int is_basis_mball(struct Object *ob);
-int is_mball_basis_for(struct Object *ob1, struct Object *ob2);
-void metaball_polygonize(struct Scene *scene, struct Object *ob, struct ListBase *dispbase);
-void calc_mballco(struct MetaElem *ml, float vec[3]);
-float densfunc(struct MetaElem *ball, float x, float y, float z);
-float metaball(float x, float y, float z);
-void accum_mballfaces(int i1, int i2, int i3, int i4);
-void *new_pgn_element(int size);
-int nextcwedge (int edge, int face);
-void BKE_freecubetable(void);
-
-int BKE_metaball_minmax(struct MetaBall *mb, float min[3], float max[3]);
-int BKE_metaball_center_median(struct MetaBall *mb, float cent[3]);
-int BKE_metaball_center_bounds(struct MetaBall *mb, float cent[3]);
-void BKE_metaball_translate(struct MetaBall *mb, float offset[3]);
+struct MetaElem *BKE_mball_element_add(struct MetaBall *mb, const int type);
#endif
-
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h
index 742e6ef0b89..bdadce2c7c7 100644
--- a/source/blender/blenkernel/BKE_mesh.h
+++ b/source/blender/blenkernel/BKE_mesh.h
@@ -76,109 +76,109 @@ struct BMesh *BKE_mesh_to_bmesh(struct Mesh *me, struct Object *ob);
* if both of the above are 0, it'll use the indices of the mpolys of the MPoly
* data in pdata, and ignore the origindex layer altogether.
*/
-int mesh_recalcTessellation(struct CustomData *fdata, struct CustomData *ldata, struct CustomData *pdata,
- struct MVert *mvert,
- int totface, int totloop, int totpoly,
- const int do_face_normals);
+int BKE_mesh_recalc_tessellation(struct CustomData *fdata, struct CustomData *ldata, struct CustomData *pdata,
+ struct MVert *mvert,
+ int totface, int totloop, int totpoly,
+ const int do_face_normals);
/* for forwards compat only quad->tri polys to mface, skip ngons.
*/
-int mesh_mpoly_to_mface(struct CustomData *fdata, struct CustomData *ldata,
- struct CustomData *pdata, int totface, int totloop, int totpoly);
+int BKE_mesh_mpoly_to_mface(struct CustomData *fdata, struct CustomData *ldata,
+ struct CustomData *pdata, int totface, int totloop, int totpoly);
/*calculates a face normal.*/
void mesh_calc_poly_normal(struct MPoly *mpoly, struct MLoop *loopstart,
struct MVert *mvarray, float no[3]);
-void mesh_calc_poly_normal_coords(struct MPoly *mpoly, struct MLoop *loopstart,
- const float (*vertex_coords)[3], float no[3]);
+void BKE_mesh_calc_poly_normal_coords(struct MPoly *mpoly, struct MLoop *loopstart,
+ const float (*vertex_coords)[3], float no[3]);
-void mesh_calc_poly_center(struct MPoly *mpoly, struct MLoop *loopstart,
- struct MVert *mvarray, float cent[3]);
+void BKE_mesh_calc_poly_center(struct MPoly *mpoly, struct MLoop *loopstart,
+ struct MVert *mvarray, float cent[3]);
-float mesh_calc_poly_area(struct MPoly *mpoly, struct MLoop *loopstart,
- struct MVert *mvarray, float polynormal[3]);
+float BKE_mesh_calc_poly_area(struct MPoly *mpoly, struct MLoop *loopstart,
+ struct MVert *mvarray, float polynormal[3]);
/* Find the index of the loop in 'poly' which references vertex,
* returns -1 if not found */
int poly_find_loop_from_vert(const struct MPoly *poly,
- const struct MLoop *loopstart,
- unsigned vert);
+ const struct MLoop *loopstart,
+ unsigned vert);
/* Fill 'adj_r' with the loop indices in 'poly' adjacent to the
* vertex. Returns the index of the loop matching vertex, or -1 if the
* vertex is not in 'poly' */
int poly_get_adj_loops_from_vert(unsigned adj_r[3], const struct MPoly *poly,
- const struct MLoop *mloop, unsigned vert);
+ const struct MLoop *mloop, unsigned vert);
/* update the hide flag for edges and polys from the corresponding
* flag in verts */
-void mesh_flush_hidden_from_verts(const struct MVert *mvert,
- const struct MLoop *mloop,
- struct MEdge *medge, int totedge,
- struct MPoly *mpoly, int totpoly);
-
-void unlink_mesh(struct Mesh *me);
-void free_mesh(struct Mesh *me, int unlink);
-struct Mesh *add_mesh(const char *name);
-struct Mesh *copy_mesh(struct Mesh *me);
+void BKE_mesh_flush_hidden_from_verts(const struct MVert *mvert,
+ const struct MLoop *mloop,
+ struct MEdge *medge, int totedge,
+ struct MPoly *mpoly, int totpoly);
+
+void BKE_mesh_unlink(struct Mesh *me);
+void BKE_mesh_free(struct Mesh *me, int unlink);
+struct Mesh *BKE_mesh_add(const char *name);
+struct Mesh *BKE_mesh_copy(struct Mesh *me);
void mesh_update_customdata_pointers(struct Mesh *me, const short do_ensure_tess_cd);
-void make_local_mesh(struct Mesh *me);
-void boundbox_mesh(struct Mesh *me, float *loc, float *size);
-void tex_space_mesh(struct Mesh *me);
-float *get_mesh_orco_verts(struct Object *ob);
-void transform_mesh_orco_verts(struct Mesh *me, float (*orco)[3], int totvert, int invert);
+void BKE_mesh_make_local(struct Mesh *me);
+void BKE_mesh_boundbox_calc(struct Mesh *me, float *loc, float *size);
+void BKE_mesh_texspace_calc(struct Mesh *me);
+float *BKE_mesh_orco_verts_get(struct Object *ob);
+void BKE_mesh_orco_verts_transform(struct Mesh *me, float (*orco)[3], int totvert, int invert);
int test_index_face(struct MFace *mface, struct CustomData *mfdata, int mfindex, int nr);
-struct Mesh *get_mesh(struct Object *ob);
+struct Mesh *BKE_mesh_from_object(struct Object *ob);
void set_mesh(struct Object *ob, struct Mesh *me);
-void mball_to_mesh(struct ListBase *lb, struct Mesh *me);
-int nurbs_to_mdata(struct Object *ob, struct MVert **allvert, int *totvert,
- struct MEdge **alledge, int *totedge, struct MLoop **allloop, struct MPoly **allpoly,
- int *totloop, int *totpoly);
-int nurbs_to_mdata_customdb(struct Object *ob, struct ListBase *dispbase, struct MVert **allvert, int *_totvert,
- struct MEdge **alledge, int *_totedge, struct MLoop **allloop, struct MPoly **allpoly,
- int *_totloop, int *_totpoly);
-void nurbs_to_mesh(struct Object *ob);
-void mesh_to_curve(struct Scene *scene, struct Object *ob);
+void BKE_mesh_from_metaball(struct ListBase *lb, struct Mesh *me);
+int BKE_mesh_nurbs_to_mdata(struct Object *ob, struct MVert **allvert, int *totvert,
+ struct MEdge **alledge, int *totedge, struct MLoop **allloop, struct MPoly **allpoly,
+ int *totloop, int *totpoly);
+int BKE_mesh_nurbs_to_mdata_customdb(struct Object *ob, struct ListBase *dispbase, struct MVert **allvert, int *_totvert,
+ struct MEdge **alledge, int *_totedge, struct MLoop **allloop, struct MPoly **allpoly,
+ int *_totloop, int *_totpoly);
+void BKE_mesh_from_nurbs(struct Object *ob);
+void BKE_mesh_from_curve(struct Scene *scene, struct Object *ob);
void free_dverts(struct MDeformVert *dvert, int totvert);
void copy_dverts(struct MDeformVert *dst, struct MDeformVert *src, int totvert); /* __NLA */
-void mesh_delete_material_index(struct Mesh *me, short index);
-void mesh_set_smooth_flag(struct Object *meshOb, int enableSmooth);
+void BKE_mesh_delete_material_index(struct Mesh *me, short index);
+void BKE_mesh_smooth_flag_set(struct Object *meshOb, int enableSmooth);
void BKE_mesh_convert_mfaces_to_mpolys(struct Mesh *mesh);
-void mesh_calc_normals_tessface(struct MVert *mverts, int numVerts,struct MFace *mfaces, int numFaces, float (*faceNors_r)[3]);
+void BKE_mesh_calc_normals_tessface(struct MVert *mverts, int numVerts, struct MFace *mfaces, int numFaces, float (*faceNors_r)[3]);
/* used for unit testing; compares two meshes, checking only
* differences we care about. should be usable with leaf's
* testing framework I get RNA work done, will use hackish
* testing code for now.*/
-const char *mesh_cmp(struct Mesh *me1, struct Mesh *me2, float thresh);
+const char *BKE_mesh_cmp(struct Mesh *me1, struct Mesh *me2, float thresh);
-struct BoundBox *mesh_get_bb(struct Object *ob);
-void mesh_get_texspace(struct Mesh *me, float r_loc[3], float r_rot[3], float r_size[3]);
+struct BoundBox *BKE_mesh_boundbox_get(struct Object *ob);
+void BKE_mesh_texspace_get(struct Mesh *me, float r_loc[3], float r_rot[3], float r_size[3]);
/* if old, it converts mface->edcode to edge drawflags */
-void make_edges(struct Mesh *me, int old);
+void BKE_mesh_make_edges(struct Mesh *me, int old);
-void mesh_strip_loose_faces(struct Mesh *me); /* Needed for compatibility (some old read code). */
-void mesh_strip_loose_polysloops(struct Mesh *me);
-void mesh_strip_loose_edges(struct Mesh *me);
+void BKE_mesh_strip_loose_faces(struct Mesh *me); /* Needed for compatibility (some old read code). */
+void BKE_mesh_strip_loose_polysloops(struct Mesh *me);
+void BKE_mesh_strip_loose_edges(struct Mesh *me);
/* Calculate vertex and face normals, face normals are returned in *faceNors_r if non-NULL
* and vertex normals are stored in actual mverts.
*/
-void mesh_calc_normals_mapping(
+void BKE_mesh_calc_normals_mapping(
struct MVert *mverts, int numVerts,
struct MLoop *mloop, struct MPoly *mpolys, int numLoops, int numPolys, float (*polyNors_r)[3],
struct MFace *mfaces, int numFaces, int *origIndexFace, float (*faceNors_r)[3]);
- /* extended version of 'mesh_calc_normals' with option not to calc vertex normals */
-void mesh_calc_normals_mapping_ex(
+ /* extended version of 'BKE_mesh_calc_normals' with option not to calc vertex normals */
+void BKE_mesh_calc_normals_mapping_ex(
struct MVert *mverts, int numVerts,
struct MLoop *mloop, struct MPoly *mpolys, int numLoops, int numPolys, float (*polyNors_r)[3],
struct MFace *mfaces, int numFaces, int *origIndexFace, float (*faceNors_r)[3],
const short only_face_normals);
-void mesh_calc_normals(
+void BKE_mesh_calc_normals(
struct MVert *mverts, int numVerts,
struct MLoop *mloop, struct MPoly *mpolys,
int numLoops, int numPolys, float (*polyNors_r)[3]);
@@ -246,9 +246,10 @@ typedef struct UvElementMap {
* to make that many islands, he can bite me :p */
#define INVALID_ISLAND 0xFFFF
-UvVertMap *make_uv_vert_map(struct MPoly *mpoly, struct MLoop *mloop, struct MLoopUV *mloopuv, unsigned int totpoly, unsigned int totvert, int selected, float *limit);
-UvMapVert *get_uv_map_vert(UvVertMap *vmap, unsigned int v);
-void free_uv_vert_map(UvVertMap *vmap);
+UvVertMap *BKE_mesh_uv_vert_map_make(struct MPoly *mpoly, struct MLoop *mloop, struct MLoopUV *mloopuv,
+ unsigned int totpoly, unsigned int totvert, int selected, float *limit);
+UvMapVert *BKE_mesh_uv_vert_map_get_vert(UvVertMap *vmap, unsigned int v);
+void BKE_mesh_uv_vert_map_free(UvVertMap *vmap);
/* Connectivity data */
typedef struct MeshElemMap {
@@ -270,10 +271,10 @@ void create_vert_edge_map(struct ListBase **map, IndexNode **mem, const struct M
/* vertex level transformations & checks (no derived mesh) */
-int minmax_mesh(struct Mesh *me, float min[3], float max[3]);
-int mesh_center_median(struct Mesh *me, float cent[3]);
-int mesh_center_bounds(struct Mesh *me, float cent[3]);
-void mesh_translate(struct Mesh *me, float offset[3], int do_keys);
+int BKE_mesh_minmax(struct Mesh *me, float r_min[3], float r_max[3]);
+int BKE_mesh_center_median(struct Mesh *me, float cent[3]);
+int BKE_mesh_center_bounds(struct Mesh *me, float cent[3]);
+void BKE_mesh_translate(struct Mesh *me, float offset[3], int do_keys);
/* mesh_validate.c */
/* XXX Loop v/e are unsigned, so using max uint_32 value as invalid marker... */
@@ -298,10 +299,13 @@ void BKE_mesh_tessface_ensure(struct Mesh *mesh);
void BKE_mesh_tessface_clear(struct Mesh *mesh);
/* Convert a triangle or quadrangle of loop/poly data to tessface data */
-void mesh_loops_to_mface_corners(struct CustomData *fdata, struct CustomData *ldata,
- struct CustomData *pdata, int lindex[4], int findex,
- const int polyindex, const int mf_len,
- const int numTex, const int numCol, const int hasPCol, const int hasOrigSpace);
+void BKE_mesh_loops_to_mface_corners(struct CustomData *fdata, struct CustomData *ldata,
+ struct CustomData *pdata, int lindex[4], int findex,
+ const int polyindex, const int mf_len,
+ const int numTex, const int numCol, const int hasPCol, const int hasOrigSpace);
+
+void BKE_mesh_poly_calc_angles(struct MVert *mvert, struct MLoop *mloop,
+ struct MPoly *mp, float angles[]);
#ifdef __cplusplus
}
diff --git a/source/blender/blenkernel/BKE_movieclip.h b/source/blender/blenkernel/BKE_movieclip.h
index d7b2f271a83..29924542494 100644
--- a/source/blender/blenkernel/BKE_movieclip.h
+++ b/source/blender/blenkernel/BKE_movieclip.h
@@ -40,10 +40,10 @@ struct MovieClipUser;
struct MovieTrackingTrack;
struct MovieDistortion;
-void free_movieclip(struct MovieClip *clip);
-void unlink_movieclip(struct Main *bmain, struct MovieClip *clip);
+void BKE_movieclip_free(struct MovieClip *clip);
+void BKE_movieclip_unlink(struct Main *bmain, struct MovieClip *clip);
-struct MovieClip *BKE_add_movieclip_file(const char *name);
+struct MovieClip *BKE_movieclip_file_add(const char *name);
void BKE_movieclip_reload(struct MovieClip *clip);
struct ImBuf *BKE_movieclip_get_ibuf(struct MovieClip *clip, struct MovieClipUser *user);
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h
index cb161b26ee5..fcb56bf8027 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -123,7 +123,7 @@ typedef struct bNodeTemplate {
* implementing the node behavior.
*/
typedef struct bNodeType {
- void *next,*prev;
+ void *next, *prev;
short needs_free; /* set for allocated types that need to be freed */
int type;
@@ -145,6 +145,9 @@ typedef struct bNodeType {
void (*uifunc)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr);
/// Additional parameters in the side panel.
void (*uifuncbut)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr);
+ /// Draw a node socket. Default draws the input value button.
+ NodeSocketButtonFunction drawinputfunc;
+ NodeSocketButtonFunction drawoutputfunc;
/// Optional custom label function for the node header.
const char *(*labelfunc)(struct bNode *);
/// Optional custom resize handle polling.
@@ -505,9 +508,10 @@ struct ShadeResult;
#define SH_NODE_LAYER_WEIGHT 160
#define SH_NODE_VOLUME_TRANSPARENT 161
#define SH_NODE_VOLUME_ISOTROPIC 162
-#define SH_NODE_GAMMA 163
-#define SH_NODE_TEX_CHECKER 164
+#define SH_NODE_GAMMA 163
+#define SH_NODE_TEX_CHECKER 164
#define SH_NODE_BRIGHTCONTRAST 165
+#define SH_NODE_LIGHT_FALLOFF 166
/* custom defines options for Material node */
#define SH_NODE_MAT_DIFF 1
diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h
index 971320765e9..92a447f9351 100644
--- a/source/blender/blenkernel/BKE_object.h
+++ b/source/blender/blenkernel/BKE_object.h
@@ -50,64 +50,66 @@ struct RenderData;
struct rctf;
struct MovieClip;
-void clear_workob(struct Object *workob);
-void what_does_parent(struct Scene *scene, struct Object *ob, struct Object *workob);
+void BKE_object_workob_clear(struct Object *workob);
+void BKE_object_workob_calc_parent(struct Scene *scene, struct Object *ob, struct Object *workob);
-void copy_baseflags(struct Scene *scene);
-void copy_objectflags(struct Scene *scene);
struct SoftBody *copy_softbody(struct SoftBody *sb);
struct BulletSoftBody *copy_bulletsoftbody(struct BulletSoftBody *sb);
-void copy_object_particlesystems(struct Object *obn, struct Object *ob);
-void copy_object_softbody(struct Object *obn, struct Object *ob);
-void object_free_particlesystems(struct Object *ob);
-void object_free_softbody(struct Object *ob);
-void object_free_bulletsoftbody(struct Object *ob);
-void update_base_layer(struct Scene *scene, struct Object *ob);
+void BKE_object_copy_particlesystems(struct Object *obn, struct Object *ob);
+void BKE_object_copy_softbody(struct Object *obn, struct Object *ob);
+void BKE_object_free_particlesystems(struct Object *ob);
+void BKE_object_free_softbody(struct Object *ob);
+void BKE_object_free_bulletsoftbody(struct Object *ob);
+void BKE_object_update_base_layer(struct Scene *scene, struct Object *ob);
-void free_object(struct Object *ob);
-void object_free_display(struct Object *ob);
+void BKE_object_free(struct Object *ob);
+void BKE_object_free_display(struct Object *ob);
-int object_support_modifier_type(struct Object *ob, int modifier_type);
+int BKE_object_support_modifier_type_check(struct Object *ob, int modifier_type);
-void object_link_modifiers(struct Object *ob, struct Object *from);
-void object_free_modifiers(struct Object *ob);
+void BKE_object_link_modifiers(struct Object *ob, struct Object *from);
+void BKE_object_free_modifiers(struct Object *ob);
-void object_make_proxy(struct Object *ob, struct Object *target, struct Object *gob);
-void object_copy_proxy_drivers(struct Object *ob, struct Object *target);
+void BKE_object_make_proxy(struct Object *ob, struct Object *target, struct Object *gob);
+void BKE_object_copy_proxy_drivers(struct Object *ob, struct Object *target);
-void unlink_object(struct Object *ob);
-int exist_object(struct Object *obtest);
+void BKE_object_unlink(struct Object *ob);
+int BKE_object_exists_check(struct Object *obtest);
-struct Object *add_only_object(int type, const char *name);
-struct Object *add_object(struct Scene *scene, int type);
-
-struct Object *copy_object(struct Object *ob);
-void make_local_object(struct Object *ob);
-int object_is_libdata(struct Object *ob);
-int object_data_is_libdata(struct Object *ob);
-
-void object_scale_to_mat3(struct Object *ob, float mat[][3]);
-void object_rot_to_mat3(struct Object *ob, float mat[][3]);
-void object_mat3_to_rot(struct Object *ob, float mat[][3], short use_compat);
-void object_to_mat3(struct Object *ob, float mat[][3]);
-void object_to_mat4(struct Object *ob, float mat[][4]);
-void object_apply_mat4(struct Object *ob, float mat[][4], const short use_compat, const short use_parent);
-
-struct Object *object_pose_armature_get(struct Object *ob);
-
-void where_is_object_time(struct Scene *scene, struct Object *ob, float ctime);
-void where_is_object(struct Scene *scene, struct Object *ob);
-void where_is_object_simul(struct Scene *scene, struct Object *ob);
-void where_is_object_mat(struct Scene *scene, struct Object *ob, float obmat[4][4]);
-
-struct BoundBox *unit_boundbox(void);
-void boundbox_set_from_min_max(struct BoundBox *bb, float min[3], float max[3]);
-struct BoundBox *object_get_boundbox(struct Object *ob);
-void object_get_dimensions(struct Object *ob, float vec[3]);
-void object_set_dimensions(struct Object *ob, const float *value);
-void object_boundbox_flag(struct Object *ob, int flag, int set);
-void minmax_object(struct Object *ob, float min[3], float max[3]);
-int minmax_object_duplis(struct Scene *scene, struct Object *ob, float min[3], float max[3]);
+struct Object *BKE_object_add_only_object(int type, const char *name);
+struct Object *BKE_object_add(struct Scene *scene, int type);
+void *BKE_object_obdata_add_from_type(int type);
+
+struct Object *BKE_object_copy(struct Object *ob);
+void BKE_object_make_local(struct Object *ob);
+int BKE_object_is_libdata(struct Object *ob);
+int BKE_object_obdata_is_libdata(struct Object *ob);
+
+void BKE_object_scale_to_mat3(struct Object *ob, float mat[][3]);
+void BKE_object_rot_to_mat3(struct Object *ob, float mat[][3]);
+void BKE_object_mat3_to_rot(struct Object *ob, float mat[][3], short use_compat);
+void BKE_object_to_mat3(struct Object *ob, float mat[][3]);
+void BKE_object_to_mat4(struct Object *ob, float mat[][4]);
+void BKE_object_apply_mat4(struct Object *ob, float mat[][4], const short use_compat, const short use_parent);
+
+struct Object *BKE_object_pose_armature_get(struct Object *ob);
+
+void BKE_object_where_is_calc(struct Scene *scene, struct Object *ob);
+void BKE_object_where_is_calc_time(struct Scene *scene, struct Object *ob, float ctime);
+void BKE_object_where_is_calc_simul(struct Scene *scene, struct Object *ob);
+void BKE_object_where_is_calc_mat4(struct Scene *scene, struct Object *ob, float obmat[4][4]);
+
+/* possibly belong in own moduke? */
+struct BoundBox *BKE_boundbox_alloc_unit(void);
+void BKE_boundbox_init_from_minmax(struct BoundBox *bb, float min[3], float max[3]);
+int BKE_boundbox_ray_hit_check(struct BoundBox *bb, float ray_start[3], float ray_normal[3]);
+
+struct BoundBox *BKE_object_boundbox_get(struct Object *ob);
+void BKE_object_dimensions_get(struct Object *ob, float vec[3]);
+void BKE_object_dimensions_set(struct Object *ob, const float *value);
+void BKE_object_boundbox_flag(struct Object *ob, int flag, int set);
+void BKE_object_minmax(struct Object *ob, float r_min[3], float r_max[3]);
+int BKE_object_minmax_dupli(struct Scene *scene, struct Object *ob, float r_min[3], float r_max[3]);
/* sometimes min-max isn't enough, we need to loop over each point */
void BKE_object_foreach_display_point(
@@ -121,10 +123,8 @@ void BKE_scene_foreach_display_point(
int BKE_object_parent_loop_check(const struct Object *parent, const struct Object *ob);
-int ray_hit_boundbox(struct BoundBox *bb, float ray_start[3], float ray_normal[3]);
-
-void *object_tfm_backup(struct Object *ob);
-void object_tfm_restore(struct Object *ob, void *obtfm_pt);
+void *BKE_object_tfm_backup(struct Object *ob);
+void BKE_object_tfm_restore(struct Object *ob, void *obtfm_pt);
typedef struct ObjectTfmProtectedChannels {
float loc[3], dloc[3];
@@ -135,27 +135,28 @@ typedef struct ObjectTfmProtectedChannels {
float rotAngle, drotAngle;
} ObjectTfmProtectedChannels;
-void object_tfm_protected_backup(const struct Object *ob,
- ObjectTfmProtectedChannels *obtfm);
+void BKE_object_tfm_protected_backup(const struct Object *ob,
+ ObjectTfmProtectedChannels *obtfm);
-void object_tfm_protected_restore(struct Object *ob,
- const ObjectTfmProtectedChannels *obtfm,
- const short protectflag);
+void BKE_object_tfm_protected_restore(struct Object *ob,
+ const ObjectTfmProtectedChannels *obtfm,
+ const short protectflag);
-void object_handle_update(struct Scene *scene, struct Object *ob);
-void object_sculpt_modifiers_changed(struct Object *ob);
+void BKE_object_handle_update(struct Scene *scene, struct Object *ob);
+void BKE_object_sculpt_modifiers_changed(struct Object *ob);
-int give_obdata_texspace(struct Object *ob, short **texflag, float **loc, float **size, float **rot);
+int BKE_object_obdata_texspace_get(struct Object *ob, short **r_texflag, float **r_loc, float **r_size, float **r_rot);
-int object_insert_ptcache(struct Object *ob);
+int BKE_object_insert_ptcache(struct Object *ob);
// void object_delete_ptcache(struct Object *ob, int index);
-struct KeyBlock *object_insert_shape_key(struct Scene *scene, struct Object *ob, const char *name, int from_mix);
+struct KeyBlock *BKE_object_insert_shape_key(struct Scene *scene, struct Object *ob, const char *name, int from_mix);
-int object_is_modified(struct Scene *scene, struct Object *ob);
+int BKE_object_is_modified(struct Scene *scene, struct Object *ob);
+int BKE_object_is_deform_modified(struct Scene *scene, struct Object *ob);
-void object_relink(struct Object *ob);
+void BKE_object_relink(struct Object *ob);
-struct MovieClip *object_get_movieclip(struct Scene *scene, struct Object *ob, int use_default);
+struct MovieClip *BKE_object_movieclip_get(struct Scene *scene, struct Object *ob, int use_default);
#ifdef __cplusplus
}
diff --git a/source/blender/blenkernel/BKE_ocean.h b/source/blender/blenkernel/BKE_ocean.h
index 7c0d99b35ea..1c659b61d7d 100644
--- a/source/blender/blenkernel/BKE_ocean.h
+++ b/source/blender/blenkernel/BKE_ocean.h
@@ -32,17 +32,16 @@ extern "C" {
typedef struct OceanResult {
float disp[3];
- float normal[3];
+ float normal[3];
float foam;
/* raw eigenvalues/vectors */
float Jminus;
- float Jplus;
+ float Jplus;
float Eminus[3];
- float Eplus[3];
+ float Eplus[3];
} OceanResult;
-
-
+
typedef struct OceanCache {
struct ImBuf **ibufs_disp;
struct ImBuf **ibufs_foam;
@@ -74,13 +73,12 @@ typedef struct OceanCache {
#define OCEAN_CACHING 1
#define OCEAN_CACHED 2
-
struct Ocean *BKE_add_ocean(void);
void BKE_free_ocean_data(struct Ocean *oc);
void BKE_free_ocean(struct Ocean *oc);
-void BKE_init_ocean(struct Ocean* o, int M,int N, float Lx, float Lz, float V, float l, float A, float w, float damp,
- float alignment, float depth, float time, short do_height_field, short do_chop, short do_normals, short do_jacobian, int seed);
+void BKE_init_ocean(struct Ocean* o, int M, int N, float Lx, float Lz, float V, float l, float A, float w, float damp,
+ float alignment, float depth, float time, short do_height_field, short do_chop, short do_normals, short do_jacobian, int seed);
void BKE_simulate_ocean(struct Ocean *o, float t, float scale, float chop_amount);
/* sampling the ocean surface */
diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h
index acf39d83370..bd31a62abf9 100644
--- a/source/blender/blenkernel/BKE_paint.h
+++ b/source/blender/blenkernel/BKE_paint.h
@@ -103,6 +103,10 @@ typedef struct SculptSession {
struct SculptStroke *stroke;
struct StrokeCache *cache;
+
+ /* last paint/sculpt stroke location */
+ int last_stroke_valid;
+ float last_stroke[3];
} SculptSession;
void free_sculptsession(struct Object *ob);
diff --git a/source/blender/blenkernel/BKE_particle.h b/source/blender/blenkernel/BKE_particle.h
index 67dba6fd7a7..f776295b912 100644
--- a/source/blender/blenkernel/BKE_particle.h
+++ b/source/blender/blenkernel/BKE_particle.h
@@ -246,7 +246,7 @@ void psys_check_group_weights(struct ParticleSettings *part);
int psys_uses_gravity(struct ParticleSimulationData *sim);
/* free */
-void psys_free_settings(struct ParticleSettings *part);
+void BKE_particlesettings_free(struct ParticleSettings *part);
void psys_free_path_cache(struct ParticleSystem *psys, struct PTCacheEdit *edit);
void psys_free(struct Object * ob, struct ParticleSystem * psys);
@@ -266,8 +266,8 @@ struct ParticleSystemModifierData *psys_get_modifier(struct Object *ob, struct P
struct ModifierData *object_add_particle_system(struct Scene *scene, struct Object *ob, const char *name);
void object_remove_particle_system(struct Scene *scene, struct Object *ob);
struct ParticleSettings *psys_new_settings(const char *name, struct Main *main);
-struct ParticleSettings *psys_copy_settings(struct ParticleSettings *part);
-void make_local_particlesettings(struct ParticleSettings *part);
+struct ParticleSettings *BKE_particlesettings_copy(struct ParticleSettings *part);
+void BKE_particlesettings_make_local(struct ParticleSettings *part);
void psys_reset(struct ParticleSystem *psys, int mode);
diff --git a/source/blender/blenkernel/BKE_report.h b/source/blender/blenkernel/BKE_report.h
index f6307806491..aa625fab3b2 100644
--- a/source/blender/blenkernel/BKE_report.h
+++ b/source/blender/blenkernel/BKE_report.h
@@ -54,7 +54,11 @@ __attribute__ ((format (printf, 3, 4)))
;
void BKE_reports_prepend(ReportList *reports, const char *prepend);
-void BKE_reports_prependf(ReportList *reports, const char *prepend, ...);
+void BKE_reports_prependf(ReportList *reports, const char *prepend, ...)
+#ifdef __GNUC__
+__attribute__ ((format (printf, 2, 3)))
+#endif
+;
ReportType BKE_report_print_level(ReportList *reports);
void BKE_report_print_level_set(ReportList *reports, ReportType level);
diff --git a/source/blender/blenkernel/BKE_scene.h b/source/blender/blenkernel/BKE_scene.h
index e46d99ed873..3a93562707d 100644
--- a/source/blender/blenkernel/BKE_scene.h
+++ b/source/blender/blenkernel/BKE_scene.h
@@ -61,40 +61,44 @@ struct Base *_setlooper_base_step(struct Scene **sce_iter, struct Base *base);
void free_avicodecdata(struct AviCodecData *acd);
void free_qtcodecdata(struct QuicktimeCodecData *acd);
-void free_scene(struct Scene *sce);
-struct Scene *add_scene(const char *name);
-struct Base *object_in_scene(struct Object *ob, struct Scene *sce);
+void BKE_scene_free(struct Scene *sce);
+struct Scene *BKE_scene_add(const char *name);
-void set_scene_bg(struct Main *bmain, struct Scene *sce);
-struct Scene *set_scene_name(struct Main *bmain, const char *name);
+/* base functions */
+struct Base *BKE_scene_base_find(struct Scene *scene, struct Object *ob);
+struct Base *BKE_scene_base_add(struct Scene *sce, struct Object *ob);
+void BKE_scene_base_deselect_all(struct Scene *sce);
+void BKE_scene_base_select(struct Scene *sce, struct Base *selbase);
+int BKE_scene_base_iter_next(struct Scene **scene, int val, struct Base **base, struct Object **ob);
-struct Scene *copy_scene(struct Scene *sce, int type);
-void unlink_scene(struct Main *bmain, struct Scene *sce, struct Scene *newsce);
+void BKE_scene_base_flag_to_objects(struct Scene *scene);
+void BKE_scene_base_flag_from_objects(struct Scene *scene);
-int next_object(struct Scene **scene, int val, struct Base **base, struct Object **ob);
-struct Object *scene_find_camera(struct Scene *sc);
-struct Object *scene_camera_switch_find(struct Scene *scene); // DURIAN_CAMERA_SWITCH
-int scene_camera_switch_update(struct Scene *scene);
+void BKE_scene_set_background(struct Main *bmain, struct Scene *sce);
+struct Scene *BKE_scene_set_name(struct Main *bmain, const char *name);
-char *scene_find_marker_name(struct Scene *scene, int frame);
-char *scene_find_last_marker_name(struct Scene *scene, int frame);
+struct Scene *BKE_scene_copy(struct Scene *sce, int type);
+void BKE_scene_unlink(struct Main *bmain, struct Scene *sce, struct Scene *newsce);
-struct Base *scene_add_base(struct Scene *sce, struct Object *ob);
-void scene_deselect_all(struct Scene *sce);
-void scene_select_base(struct Scene *sce, struct Base *selbase);
+struct Object *BKE_scene_camera_find(struct Scene *sc);
+struct Object *BKE_scene_camera_switch_find(struct Scene *scene); // DURIAN_CAMERA_SWITCH
+int BKE_scene_camera_switch_update(struct Scene *scene);
+
+char *BKE_scene_find_marker_name(struct Scene *scene, int frame);
+char *BKE_scene_find_last_marker_name(struct Scene *scene, int frame);
/* checks for cycle, returns 1 if it's all OK */
-int scene_check_setscene(struct Main *bmain, struct Scene *sce);
+int BKE_scene_validate_setscene(struct Main *bmain, struct Scene *sce);
-float BKE_curframe(struct Scene *scene);
-float BKE_frame_to_ctime(struct Scene *scene, const float frame);
+float BKE_scene_frame_get(struct Scene *scene);
+float BKE_scene_frame_get_from_ctime(struct Scene *scene, const float frame);
-void scene_update_tagged(struct Main *bmain, struct Scene *sce);
+void BKE_scene_update_tagged(struct Main *bmain, struct Scene *sce);
-void scene_update_for_newframe(struct Main *bmain, struct Scene *sce, unsigned int lay);
+void BKE_scene_update_for_newframe(struct Main *bmain, struct Scene *sce, unsigned int lay);
-struct SceneRenderLayer *scene_add_render_layer(struct Scene *sce, const char *name);
-int scene_remove_render_layer(struct Main *main, struct Scene *scene, struct SceneRenderLayer *srl);
+struct SceneRenderLayer *BKE_scene_add_render_layer(struct Scene *sce, const char *name);
+int BKE_scene_remove_render_layer(struct Main *main, struct Scene *scene, struct SceneRenderLayer *srl);
/* render profile */
int get_render_subsurf_level(struct RenderData *r, int level);
@@ -102,7 +106,7 @@ int get_render_child_particle_number(struct RenderData *r, int num);
int get_render_shadow_samples(struct RenderData *r, int samples);
float get_render_aosss_error(struct RenderData *r, float error);
-int scene_use_new_shading_nodes(struct Scene *scene);
+int BKE_scene_use_new_shading_nodes(struct Scene *scene);
#ifdef __cplusplus
}
diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h
index fbb93c761c2..af6e793cf2f 100644
--- a/source/blender/blenkernel/BKE_screen.h
+++ b/source/blender/blenkernel/BKE_screen.h
@@ -252,7 +252,7 @@ float BKE_screen_view3d_zoom_to_fac(float camzoom);
float BKE_screen_view3d_zoom_from_fac(float zoomfac);
/* screen */
-void free_screen(struct bScreen *sc);
+void BKE_screen_free(struct bScreen *sc);
unsigned int BKE_screen_visible_layers(struct bScreen *screen, struct Scene *scene);
#endif
diff --git a/source/blender/blenkernel/BKE_softbody.h b/source/blender/blenkernel/BKE_softbody.h
index 6714225f513..547fd9e4393 100644
--- a/source/blender/blenkernel/BKE_softbody.h
+++ b/source/blender/blenkernel/BKE_softbody.h
@@ -39,9 +39,9 @@ typedef struct BodyPoint {
float origS[3], origE[3], origT[3], pos[3], vec[3], force[3];
float goal;
float prevpos[3], prevvec[3], prevdx[3], prevdv[3]; /* used for Heun integration */
- float impdv[3],impdx[3];
+ float impdv[3], impdx[3];
int nofsprings; int *springs;
- float choke,choke2,frozen;
+ float choke, choke2, frozen;
float colball;
short loc_flag; //reserved by locale module specific states
//char octantflag;
@@ -68,7 +68,7 @@ extern void sbObjectToSoftbody(struct Object *ob);
/* pass NULL to unlink again */
extern void sbSetInterruptCallBack(int (*f)(void));
-extern void SB_estimate_transform(Object *ob,float lloc[3],float lrot[3][3],float lscale[3][3]);
+extern void SB_estimate_transform(Object *ob, float lloc[3], float lrot[3][3], float lscale[3][3]);
#endif
diff --git a/source/blender/blenkernel/BKE_sound.h b/source/blender/blenkernel/BKE_sound.h
index 8b01dbde531..5234f10ddb3 100644
--- a/source/blender/blenkernel/BKE_sound.h
+++ b/source/blender/blenkernel/BKE_sound.h
@@ -77,7 +77,7 @@ void sound_delete_cache(struct bSound* sound);
void sound_load(struct Main *main, struct bSound* sound);
-void sound_free(struct bSound* sound);
+void BKE_sound_free(struct bSound* sound);
#ifdef __AUD_C_API_H__
AUD_Device* sound_mixdown(struct Scene *scene, AUD_DeviceSpecs specs, int start, float volume);
diff --git a/source/blender/blenkernel/BKE_speaker.h b/source/blender/blenkernel/BKE_speaker.h
index fddcfb2c7f3..52c177fce57 100644
--- a/source/blender/blenkernel/BKE_speaker.h
+++ b/source/blender/blenkernel/BKE_speaker.h
@@ -33,9 +33,9 @@
* \brief General operations for speakers.
*/
-void *add_speaker(const char *name);
-struct Speaker *copy_speaker(struct Speaker *spk);
-void make_local_speaker(struct Speaker *spk);
-void free_speaker(struct Speaker *spk);
+void *BKE_speaker_add(const char *name);
+struct Speaker *BKE_speaker_copy(struct Speaker *spk);
+void BKE_speaker_make_local(struct Speaker *spk);
+void BKE_speaker_free(struct Speaker *spk);
#endif
diff --git a/source/blender/blenkernel/BKE_tessmesh.h b/source/blender/blenkernel/BKE_tessmesh.h
index d9d2c21e2b3..3a806651d61 100644
--- a/source/blender/blenkernel/BKE_tessmesh.h
+++ b/source/blender/blenkernel/BKE_tessmesh.h
@@ -23,6 +23,7 @@
#ifndef __BKE_TESSMESH_H__
#define __BKE_TESSMESH_H__
+#include "BKE_customdata.h"
#include "bmesh.h"
struct BMesh;
@@ -58,7 +59,7 @@ typedef struct BMEditMesh {
/*derivedmesh stuff*/
struct DerivedMesh *derivedFinal, *derivedCage;
- int lastDataMask;
+ CustomDataMask lastDataMask;
/* index tables, to map indices to elements via
* EDBM_index_arrays_init and associated functions. don't
diff --git a/source/blender/blenkernel/BKE_text.h b/source/blender/blenkernel/BKE_text.h
index 0a94d89a121..875903f2e20 100644
--- a/source/blender/blenkernel/BKE_text.h
+++ b/source/blender/blenkernel/BKE_text.h
@@ -42,17 +42,17 @@ struct Text;
struct TextLine;
struct SpaceText;
-void free_text (struct Text *text);
+void BKE_text_free (struct Text *text);
void txt_set_undostate (int u);
int txt_get_undostate (void);
-struct Text* add_empty_text (const char *name);
+struct Text* BKE_text_add (const char *name);
int txt_extended_ascii_as_utf8(char **str);
-int reopen_text (struct Text *text);
-struct Text* add_text (const char *file, const char *relpath);
-struct Text* copy_text (struct Text *ta);
-void unlink_text (struct Main *bmain, struct Text *text);
-void clear_text(struct Text *text);
-void write_text(struct Text *text, const char *str);
+int BKE_text_reload (struct Text *text);
+struct Text* BKE_text_load (const char *file, const char *relpath);
+struct Text* BKE_text_copy (struct Text *ta);
+void BKE_text_unlink (struct Main *bmain, struct Text *text);
+void BKE_text_clear (struct Text *text);
+void BKE_text_write (struct Text *text, const char *str);
char* txt_to_buf (struct Text *text);
void txt_clean_text (struct Text *text);
@@ -96,6 +96,8 @@ void txt_unindent (struct Text *text);
void txt_comment (struct Text *text);
void txt_indent (struct Text *text);
void txt_uncomment (struct Text *text);
+void txt_move_lines (struct Text *text, const int direction);
+void txt_duplicate_line (struct Text *text);
int setcurr_tab_spaces (struct Text *text, int space);
void txt_add_marker (struct Text *text, struct TextLine *line, int start, int end, const unsigned char color[4], int group, int flags);
@@ -113,6 +115,11 @@ int text_check_digit(const char ch);
int text_check_identifier(const char ch);
int text_check_whitespace(const char ch);
+enum {
+ TXT_MOVE_LINE_UP = -1,
+ TXT_MOVE_LINE_DOWN = 1
+};
+
/* Undo opcodes */
@@ -169,6 +176,11 @@ int text_check_whitespace(const char ch);
#define UNDO_COMMENT 034
#define UNDO_UNCOMMENT 035
+#define UNDO_MOVE_LINES_UP 036
+#define UNDO_MOVE_LINES_DOWN 037
+
+#define UNDO_DUPLICATE 040
+
/* Marker flags */
#define TMARK_TEMP 0x01 /* Remove on non-editing events, don't save */
#define TMARK_EDITALL 0x02 /* Edit all markers of the same group as one */
diff --git a/source/blender/blenkernel/BKE_texture.h b/source/blender/blenkernel/BKE_texture.h
index 2574c45eec2..ed58620b716 100644
--- a/source/blender/blenkernel/BKE_texture.h
+++ b/source/blender/blenkernel/BKE_texture.h
@@ -59,7 +59,7 @@ struct World;
#define MAXCOLORBAND 32
-void free_texture(struct Tex *t);
+void BKE_texture_free(struct Tex *t);
int test_dlerr(const char *name, const char *symbol);
void open_plugin_tex(struct PluginTex *pit);
struct PluginTex *add_plugin_tex(char *str);
@@ -79,9 +79,9 @@ void tex_set_type(struct Tex *tex, int type);
void default_mtex(struct MTex *mtex);
struct MTex *add_mtex(void);
struct MTex *add_mtex_id(struct ID *id, int slot);
-struct Tex *copy_texture(struct Tex *tex);
+struct Tex *BKE_texture_copy(struct Tex *tex);
struct Tex *localize_texture(struct Tex *tex);
-void make_local_texture(struct Tex *tex);
+void BKE_texture_make_local(struct Tex *tex);
void autotexname(struct Tex *tex);
struct Tex *give_current_object_texture(struct Object *ob);
diff --git a/source/blender/blenkernel/BKE_tracking.h b/source/blender/blenkernel/BKE_tracking.h
index 2bb8fc691f0..817cb477aba 100644
--- a/source/blender/blenkernel/BKE_tracking.h
+++ b/source/blender/blenkernel/BKE_tracking.h
@@ -164,6 +164,10 @@ struct MovieTrackingObject *BKE_tracking_named_object(struct MovieTracking *trac
void BKE_tracking_select_track(struct ListBase *tracksbase, struct MovieTrackingTrack *track, int area, int extend);
void BKE_tracking_deselect_track(struct MovieTrackingTrack *track, int area);
+/* Dopesheet */
+void BKE_tracking_dopesheet_tag_update(struct MovieTracking *tracking);
+void BKE_tracking_dopesheet_update(struct MovieTracking *tracking, int sort_method, int inverse);
+
#define TRACK_SELECTED(track) ((track)->flag&SELECT || (track)->pat_flag&SELECT || (track)->search_flag&SELECT)
#define TRACK_AREA_SELECTED(track, area) ((area)==TRACK_AREA_POINT ? (track)->flag&SELECT : \
@@ -175,7 +179,7 @@ void BKE_tracking_deselect_track(struct MovieTrackingTrack *track, int area);
(((sc)->flag & SC_SHOW_MARKER_PATTERN) && TRACK_AREA_SELECTED(track, TRACK_AREA_PAT)) || \
(((sc)->flag & SC_SHOW_MARKER_SEARCH) && TRACK_AREA_SELECTED(track, TRACK_AREA_SEARCH))))
-#define MARKER_VISIBLE(sc, marker) (((marker)->flag & MARKER_DISABLED)==0 || ((sc)->flag & SC_HIDE_DISABLED)==0)
+#define MARKER_VISIBLE(sc, track, marker) (((marker)->flag & MARKER_DISABLED)==0 || ((sc)->flag & SC_HIDE_DISABLED)==0 || (sc->clip->tracking.act_track == track))
#define TRACK_CLEAR_UPTO 0
#define TRACK_CLEAR_REMAINED 1
@@ -194,4 +198,9 @@ void BKE_tracking_deselect_track(struct MovieTrackingTrack *track, int area);
#define TRACK_AREA_ALL (TRACK_AREA_POINT|TRACK_AREA_PAT|TRACK_AREA_SEARCH)
+#define TRACK_SORT_NONE -1
+#define TRACK_SORT_NAME 0
+#define TRACK_SORT_LONGEST 1
+#define TRACK_SORT_TOTAL 2
+
#endif
diff --git a/source/blender/blenkernel/BKE_utildefines.h b/source/blender/blenkernel/BKE_utildefines.h
index 39458cb3a13..591be9e81c4 100644
--- a/source/blender/blenkernel/BKE_utildefines.h
+++ b/source/blender/blenkernel/BKE_utildefines.h
@@ -1,5 +1,4 @@
-/*
- *
+/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/blenkernel/BKE_world.h b/source/blender/blenkernel/BKE_world.h
index 16ff3acaf71..67896fffc4d 100644
--- a/source/blender/blenkernel/BKE_world.h
+++ b/source/blender/blenkernel/BKE_world.h
@@ -35,11 +35,11 @@
struct World;
-void free_world(struct World *sc);
+void BKE_world_free(struct World *sc);
struct World *add_world(const char *name);
-struct World *copy_world(struct World *wrld);
+struct World *BKE_world_copy(struct World *wrld);
struct World *localize_world(struct World *wrld);
-void make_local_world(struct World *wrld);
+void BKE_world_make_local(struct World *wrld);
#endif
diff --git a/source/blender/blenkernel/BKE_writeavi.h b/source/blender/blenkernel/BKE_writeavi.h
index 03174fb5284..78875951ca4 100644
--- a/source/blender/blenkernel/BKE_writeavi.h
+++ b/source/blender/blenkernel/BKE_writeavi.h
@@ -51,8 +51,8 @@ typedef struct bMovieHandle {
void (*get_movie_path)(char *string, struct RenderData *rd); /* optional */
} bMovieHandle;
-bMovieHandle *BKE_get_movie_handle(const char imtype);
-void BKE_makeanimstring(char *string, struct RenderData *rd);
+bMovieHandle *BKE_movie_handle_get(const char imtype);
+void BKE_movie_filepath_get(char *string, struct RenderData *rd);
#ifdef __cplusplus
}
diff --git a/source/blender/blenkernel/BKE_writeffmpeg.h b/source/blender/blenkernel/BKE_writeffmpeg.h
index c35105f7b8b..f8382f75c0a 100644
--- a/source/blender/blenkernel/BKE_writeffmpeg.h
+++ b/source/blender/blenkernel/BKE_writeffmpeg.h
@@ -66,20 +66,20 @@ struct RenderData;
struct ReportList;
struct Scene;
-extern int start_ffmpeg(struct Scene *scene, struct RenderData *rd, int rectx, int recty, struct ReportList *reports);
-extern void end_ffmpeg(void);
-extern int append_ffmpeg(struct RenderData *rd, int start_frame, int frame, int *pixels,
- int rectx, int recty, struct ReportList *reports);
-void filepath_ffmpeg(char* string, struct RenderData* rd);
+int BKE_ffmpeg_start(struct Scene *scene, struct RenderData *rd, int rectx, int recty, struct ReportList *reports);
+void BKE_ffmpeg_end(void);
+int BKE_ffmpeg_append(struct RenderData *rd, int start_frame, int frame, int *pixels,
+ int rectx, int recty, struct ReportList *reports);
+void BKE_ffmpeg_filepath_get(char* string, struct RenderData* rd);
-extern void ffmpeg_set_preset(struct RenderData *rd, int preset);
-extern void ffmpeg_verify_image_type(struct RenderData *rd, struct ImageFormatData *imf);
-extern void ffmpeg_verify_codec_settings(struct RenderData *rd);
-extern int ffmpeg_alpha_channel_supported(struct RenderData *rd);
+void BKE_ffmpeg_preset_set(struct RenderData *rd, int preset);
+void BKE_ffmpeg_image_type_verify(struct RenderData *rd, struct ImageFormatData *imf);
+void BKE_ffmpeg_codec_settings_verify(struct RenderData *rd);
+int BKE_ffmpeg_alpha_channel_is_supported(struct RenderData *rd);
-extern struct IDProperty *ffmpeg_property_add(struct RenderData *Rd, const char *type, int opt_index, int parent_index);
-extern int ffmpeg_property_add_string(struct RenderData *rd, const char *type, const char *str);
-extern void ffmpeg_property_del(struct RenderData *rd, void *type, void *prop_);
+struct IDProperty *BKE_ffmpeg_property_add(struct RenderData *Rd, const char *type, int opt_index, int parent_index);
+int BKE_ffmpeg_property_add_string(struct RenderData *rd, const char *type, const char *str);
+void BKE_ffmpeg_property_del(struct RenderData *rd, void *type, void *prop_);
#ifdef __cplusplus
}
diff --git a/source/blender/blenkernel/BKE_writeframeserver.h b/source/blender/blenkernel/BKE_writeframeserver.h
index cb607e1473c..bdce9abe8ad 100644
--- a/source/blender/blenkernel/BKE_writeframeserver.h
+++ b/source/blender/blenkernel/BKE_writeframeserver.h
@@ -40,11 +40,11 @@ struct RenderData;
struct ReportList;
struct Scene;
-extern int start_frameserver(struct Scene *scene, struct RenderData *rd, int rectx, int recty, struct ReportList *reports);
-extern void end_frameserver(void);
-extern int append_frameserver(struct RenderData *rd, int start_frame, int frame, int *pixels,
- int rectx, int recty, struct ReportList *reports);
-extern int frameserver_loop(struct RenderData *rd, struct ReportList *reports);
+int BKE_frameserver_start(struct Scene *scene, struct RenderData *rd, int rectx, int recty, struct ReportList *reports);
+void BKE_frameserver_end(void);
+int BKE_frameserver_append(struct RenderData *rd, int start_frame, int frame, int *pixels,
+ int rectx, int recty, struct ReportList *reports);
+int BKE_frameserver_loop(struct RenderData *rd, struct ReportList *reports);
#ifdef __cplusplus
}
diff --git a/source/blender/blenkernel/depsgraph_private.h b/source/blender/blenkernel/depsgraph_private.h
index f27ee2f1a41..c5e2f0900f0 100644
--- a/source/blender/blenkernel/depsgraph_private.h
+++ b/source/blender/blenkernel/depsgraph_private.h
@@ -117,10 +117,10 @@ DagNode * get_top_node_queue(DagNodeQueue *queue);
DagForest *getMainDag(void);
void setMainDag(DagForest *dag);
DagForest * dag_init(void);
-DagNode * dag_find_node (DagForest *forest,void * fob);
-DagNode * dag_add_node (DagForest *forest,void * fob);
-DagNode * dag_get_node (DagForest *forest,void * fob);
-DagNode * dag_get_sub_node (DagForest *forest,void * fob);
+DagNode * dag_find_node (DagForest *forest, void * fob);
+DagNode * dag_add_node (DagForest *forest, void * fob);
+DagNode * dag_get_node (DagForest *forest, void * fob);
+DagNode * dag_get_sub_node (DagForest *forest, void * fob);
void dag_add_relation(DagForest *forest, DagNode *fob1, DagNode *fob2, short rel, const char *name);
void graph_bfs(void);
diff --git a/source/blender/blenkernel/intern/CCGSubSurf.c b/source/blender/blenkernel/intern/CCGSubSurf.c
index f5718974f9f..53e4a973cd4 100644
--- a/source/blender/blenkernel/intern/CCGSubSurf.c
+++ b/source/blender/blenkernel/intern/CCGSubSurf.c
@@ -1272,7 +1272,9 @@ CCGError ccgSubSurf_syncFace(CCGSubSurf *ss, CCGFaceHDL fHDL, int numVerts, CCGV
if (f->numVerts != numVerts ||
memcmp(FACE_getVerts(f), ss->tempVerts, sizeof(*ss->tempVerts) * numVerts) ||
memcmp(FACE_getEdges(f), ss->tempEdges, sizeof(*ss->tempEdges) * numVerts))
+ {
topologyChanged = 1;
+ }
}
if (!f || topologyChanged) {
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index c28958d5b0d..e74a412420c 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -322,7 +322,7 @@ int DM_release(DerivedMesh *dm)
{
if (dm->needsFree) {
bvhcache_free(&dm->bvhCache);
- GPU_drawobject_free( dm );
+ GPU_drawobject_free(dm);
CustomData_free(&dm->vertData, dm->numVertData);
CustomData_free(&dm->edgeData, dm->numEdgeData);
CustomData_free(&dm->faceData, dm->numTessFaceData);
@@ -371,7 +371,7 @@ void DM_ensure_tessface(DerivedMesh *dm)
const int numTessFaces = dm->getNumTessFaces(dm);
const int numPolys = dm->getNumPolys(dm);
- if ( (numTessFaces == 0) && (numPolys != 0)) {
+ if ((numTessFaces == 0) && (numPolys != 0)) {
dm->recalcTessellation(dm);
if (dm->getNumTessFaces(dm) != 0) {
@@ -446,10 +446,10 @@ void DM_update_tessface_data(DerivedMesh *dm)
not_done--;
}
}
- mesh_loops_to_mface_corners(fdata, ldata, pdata,
- ml_idx, mf_idx, polyindex[mf_idx],
- mf_len,
- numTex, numCol, hasPCol, hasOrigSpace);
+ BKE_mesh_loops_to_mface_corners(fdata, ldata, pdata,
+ ml_idx, mf_idx, polyindex[mf_idx],
+ mf_len,
+ numTex, numCol, hasPCol, hasOrigSpace);
}
if (G.debug & G_DEBUG)
@@ -870,7 +870,7 @@ static void *get_orco_coords_dm(Object *ob, BMEditMesh *em, int layer, int *free
if (em)
return (float(*)[3])get_editbmesh_orco_verts(em);
else
- return (float(*)[3])get_mesh_orco_verts(ob);
+ return (float(*)[3])BKE_mesh_orco_verts_get(ob);
}
else if (layer == CD_CLOTH_ORCO) {
/* apply shape key for cloth, this should really be solved
@@ -932,7 +932,7 @@ static void add_orco_dm(Object *ob, BMEditMesh *em, DerivedMesh *dm,
if (orco) {
if (layer == CD_ORCO)
- transform_mesh_orco_verts(ob->data, orco, totvert, 0);
+ BKE_mesh_orco_verts_transform(ob->data, orco, totvert, 0);
if (!(layerorco = DM_get_vert_data_layer(dm, layer))) {
DM_add_vert_layer(dm, layer, CD_CALLOC, NULL);
@@ -1223,7 +1223,7 @@ void DM_update_weight_mcol(Object *ob, DerivedMesh *dm, int const draw_flag,
for (i=0; i<dm->numPolyData; i++, mp++) {
ml = mloop + mp->loopstart;
- BLI_array_growitems(wtcol_l, mp->totloop);
+ BLI_array_grow_items(wtcol_l, mp->totloop);
for (j = 0; j < mp->totloop; j++, ml++, totloop++) {
copy_v4_v4_char((char *)&wtcol_l[totloop],
(char *)&wtcol_v[4 * ml->v]);
@@ -2097,7 +2097,7 @@ static void clear_mesh_caches(Object *ob)
me->bb = NULL;
}
- freedisplist(&ob->disp);
+ BKE_displist_free(&ob->disp);
if (ob->derivedFinal) {
ob->derivedFinal->needsFree = 1;
@@ -2111,7 +2111,7 @@ static void clear_mesh_caches(Object *ob)
}
if (ob->sculpt) {
- object_sculpt_modifiers_changed(ob);
+ BKE_object_sculpt_modifiers_changed(ob);
}
}
@@ -2279,8 +2279,10 @@ DerivedMesh *editbmesh_get_derived_cage_and_final(Scene *scene, Object *obedit,
* the data we need, rebuild the derived mesh
*/
if (!em->derivedCage ||
- (em->lastDataMask & dataMask) != dataMask)
+ (em->lastDataMask & dataMask) != dataMask)
+ {
editbmesh_build_data(scene, obedit, em, dataMask);
+ }
*final_r = em->derivedFinal;
return em->derivedCage;
@@ -2292,8 +2294,10 @@ DerivedMesh *editbmesh_get_derived_cage(Scene *scene, Object *obedit, BMEditMesh
* the data we need, rebuild the derived mesh
*/
if (!em->derivedCage ||
- (em->lastDataMask & dataMask) != dataMask)
+ (em->lastDataMask & dataMask) != dataMask)
+ {
editbmesh_build_data(scene, obedit, em, dataMask);
+ }
return em->derivedCage;
}
@@ -2409,7 +2413,7 @@ static void GetTextureCoordinate(const SMikkTSpaceContext * pContext, float fUV[
}
else {
const float *orco= pMesh->orco[(&pMesh->mface[face_num].v1)[vert_index]];
- map_to_sphere( &fUV[0], &fUV[1], orco[0], orco[1], orco[2]);
+ map_to_sphere(&fUV[0], &fUV[1], orco[0], orco[1], orco[2]);
}
}
@@ -2532,11 +2536,11 @@ void DM_add_tangent_layer(DerivedMesh *dm)
if (mf->v4) {
v4= &mvert[mf->v4];
- normal_quad_v3( fno,v4->co, v3->co, v2->co, v1->co);
+ normal_quad_v3(fno, v4->co, v3->co, v2->co, v1->co);
}
else {
v4= NULL;
- normal_tri_v3( fno,v3->co, v2->co, v1->co);
+ normal_tri_v3(fno, v3->co, v2->co, v1->co);
}
if (mtface) {
@@ -2547,11 +2551,11 @@ void DM_add_tangent_layer(DerivedMesh *dm)
}
else {
uv1= uv[0]; uv2= uv[1]; uv3= uv[2]; uv4= uv[3];
- map_to_sphere( &uv[0][0], &uv[0][1],orco[mf->v1][0], orco[mf->v1][1], orco[mf->v1][2]);
- map_to_sphere( &uv[1][0], &uv[1][1],orco[mf->v2][0], orco[mf->v2][1], orco[mf->v2][2]);
- map_to_sphere( &uv[2][0], &uv[2][1],orco[mf->v3][0], orco[mf->v3][1], orco[mf->v3][2]);
+ map_to_sphere(&uv[0][0], &uv[0][1], orco[mf->v1][0], orco[mf->v1][1], orco[mf->v1][2]);
+ map_to_sphere(&uv[1][0], &uv[1][1], orco[mf->v2][0], orco[mf->v2][1], orco[mf->v2][2]);
+ map_to_sphere(&uv[2][0], &uv[2][1], orco[mf->v3][0], orco[mf->v3][1], orco[mf->v3][2]);
if (v4)
- map_to_sphere( &uv[3][0], &uv[3][1],orco[mf->v4][0], orco[mf->v4][1], orco[mf->v4][2]);
+ map_to_sphere(&uv[3][0], &uv[3][1], orco[mf->v4][0], orco[mf->v4][1], orco[mf->v4][2]);
}
tangent_from_uv(uv1, uv2, uv3, v1->co, v2->co, v3->co, fno, tang);
@@ -2574,11 +2578,11 @@ void DM_add_tangent_layer(DerivedMesh *dm)
len= (mf->v4)? 4 : 3;
if (mtface == NULL) {
- map_to_sphere( &uv[0][0], &uv[0][1],orco[mf->v1][0], orco[mf->v1][1], orco[mf->v1][2]);
- map_to_sphere( &uv[1][0], &uv[1][1],orco[mf->v2][0], orco[mf->v2][1], orco[mf->v2][2]);
- map_to_sphere( &uv[2][0], &uv[2][1],orco[mf->v3][0], orco[mf->v3][1], orco[mf->v3][2]);
+ map_to_sphere(&uv[0][0], &uv[0][1], orco[mf->v1][0], orco[mf->v1][1], orco[mf->v1][2]);
+ map_to_sphere(&uv[1][0], &uv[1][1], orco[mf->v2][0], orco[mf->v2][1], orco[mf->v2][2]);
+ map_to_sphere(&uv[2][0], &uv[2][1], orco[mf->v3][0], orco[mf->v3][1], orco[mf->v3][2]);
if (len==4)
- map_to_sphere( &uv[3][0], &uv[3][1],orco[mf->v4][0], orco[mf->v4][1], orco[mf->v4][2]);
+ map_to_sphere(&uv[3][0], &uv[3][1], orco[mf->v4][0], orco[mf->v4][1], orco[mf->v4][2]);
}
mf_vi[0]= mf->v1;
@@ -2612,7 +2616,7 @@ void DM_calc_auto_bump_scale(DerivedMesh *dm)
int nr_accumulated = 0;
int f;
- for ( f=0; f < totface; f++ ) {
+ for (f=0; f < totface; f++ ) {
{
float * verts[4], * tex_coords[4];
const int nr_verts = mface[f].v4!=0 ? 4 : 3;
@@ -2628,7 +2632,7 @@ void DM_calc_auto_bump_scale(DerivedMesh *dm)
// discard degenerate faces
is_degenerate = 0;
if ( equals_v3v3(verts[0], verts[1]) || equals_v3v3(verts[0], verts[2]) || equals_v3v3(verts[1], verts[2]) ||
- equals_v2v2(tex_coords[0], tex_coords[1]) || equals_v2v2(tex_coords[0], tex_coords[2]) || equals_v2v2(tex_coords[1], tex_coords[2]) )
+ equals_v2v2(tex_coords[0], tex_coords[1]) || equals_v2v2(tex_coords[0], tex_coords[2]) || equals_v2v2(tex_coords[1], tex_coords[2]))
{
is_degenerate = 1;
}
@@ -2636,7 +2640,7 @@ void DM_calc_auto_bump_scale(DerivedMesh *dm)
// verify last vertex as well if this is a quad
if (is_degenerate == 0 && nr_verts == 4) {
if (equals_v3v3(verts[3], verts[0]) || equals_v3v3(verts[3], verts[1]) || equals_v3v3(verts[3], verts[2]) ||
- equals_v2v2(tex_coords[3], tex_coords[0]) || equals_v2v2(tex_coords[3], tex_coords[1]) || equals_v2v2(tex_coords[3], tex_coords[2]) )
+ equals_v2v2(tex_coords[3], tex_coords[0]) || equals_v2v2(tex_coords[3], tex_coords[1]) || equals_v2v2(tex_coords[3], tex_coords[2]))
{
is_degenerate = 1;
}
@@ -2662,7 +2666,7 @@ void DM_calc_auto_bump_scale(DerivedMesh *dm)
if (is_degenerate == 0) {
copy_v2_v2(prev_edge, cur_edge);
- ++i;
+ i++;
}
}
}
@@ -2701,8 +2705,7 @@ void DM_calc_auto_bump_scale(DerivedMesh *dm)
if (nr_tris_to_pile==1 || nr_tris_to_pile==2) {
const int indices[] = {offs+0, offs+1, offs+2, offs+0, offs+2, (offs+3)&0x3 };
int t;
- for ( t=0; t<nr_tris_to_pile; t++ )
- {
+ for (t=0; t<nr_tris_to_pile; t++ ) {
float f2x_area_uv;
float * p0 = verts[indices[t*3+0]];
float * p1 = verts[indices[t*3+1]];
@@ -2722,7 +2725,7 @@ void DM_calc_auto_bump_scale(DerivedMesh *dm)
f2x_surf_area = len_v3(norm);
fsurf_ratio = f2x_surf_area/f2x_area_uv; // tri area divided by texture area
- ++nr_accumulated;
+ nr_accumulated++;
dsum += (double)(fsurf_ratio);
}
}
@@ -2783,9 +2786,9 @@ void DM_vertex_attributes_from_gpu(DerivedMesh *dm, GPUVertexAttribs *gattribs,
a = attribs->tottface++;
attribs->tface[a].array = tfdata->layers[layer].data;
- attribs->tface[a].emOffset = tfdata->layers[layer].offset;
- attribs->tface[a].glIndex = gattribs->layer[b].glindex;
- attribs->tface[a].glTexco = gattribs->layer[b].gltexco;
+ attribs->tface[a].em_offset = tfdata->layers[layer].offset;
+ attribs->tface[a].gl_index = gattribs->layer[b].glindex;
+ attribs->tface[a].gl_texco = gattribs->layer[b].gltexco;
}
}
else {
@@ -2799,9 +2802,9 @@ void DM_vertex_attributes_from_gpu(DerivedMesh *dm, GPUVertexAttribs *gattribs,
a = attribs->tottface++;
attribs->tface[a].array = tfdata->layers[layer].data;
- attribs->tface[a].emOffset = tfdata->layers[layer].offset;
- attribs->tface[a].glIndex = gattribs->layer[b].glindex;
- attribs->tface[a].glTexco = gattribs->layer[b].gltexco;
+ attribs->tface[a].em_offset = tfdata->layers[layer].offset;
+ attribs->tface[a].gl_index = gattribs->layer[b].glindex;
+ attribs->tface[a].gl_texco = gattribs->layer[b].gltexco;
}
}
}
@@ -2820,8 +2823,8 @@ void DM_vertex_attributes_from_gpu(DerivedMesh *dm, GPUVertexAttribs *gattribs,
a = attribs->totmcol++;
attribs->mcol[a].array = tfdata->layers[layer].data;
- attribs->mcol[a].emOffset = tfdata->layers[layer].offset;
- attribs->mcol[a].glIndex = gattribs->layer[b].glindex;
+ attribs->mcol[a].em_offset = tfdata->layers[layer].offset;
+ attribs->mcol[a].gl_index = gattribs->layer[b].glindex;
}
}
else {
@@ -2836,8 +2839,8 @@ void DM_vertex_attributes_from_gpu(DerivedMesh *dm, GPUVertexAttribs *gattribs,
a = attribs->totmcol++;
attribs->mcol[a].array = tfdata->layers[layer].data;
- attribs->mcol[a].emOffset = tfdata->layers[layer].offset;
- attribs->mcol[a].glIndex = gattribs->layer[b].glindex;
+ attribs->mcol[a].em_offset = tfdata->layers[layer].offset;
+ attribs->mcol[a].gl_index = gattribs->layer[b].glindex;
}
}
}
@@ -2849,8 +2852,8 @@ void DM_vertex_attributes_from_gpu(DerivedMesh *dm, GPUVertexAttribs *gattribs,
attribs->tottang = 1;
attribs->tang.array = fdata->layers[layer].data;
- attribs->tang.emOffset = fdata->layers[layer].offset;
- attribs->tang.glIndex = gattribs->layer[b].glindex;
+ attribs->tang.em_offset = fdata->layers[layer].offset;
+ attribs->tang.gl_index = gattribs->layer[b].glindex;
}
}
else if (gattribs->layer[b].type == CD_ORCO) {
@@ -2861,9 +2864,9 @@ void DM_vertex_attributes_from_gpu(DerivedMesh *dm, GPUVertexAttribs *gattribs,
attribs->totorco = 1;
attribs->orco.array = vdata->layers[layer].data;
- attribs->orco.emOffset = vdata->layers[layer].offset;
- attribs->orco.glIndex = gattribs->layer[b].glindex;
- attribs->orco.glTexco = gattribs->layer[b].gltexco;
+ attribs->orco.em_offset = vdata->layers[layer].offset;
+ attribs->orco.gl_index = gattribs->layer[b].glindex;
+ attribs->orco.gl_texco = gattribs->layer[b].gltexco;
}
}
}
@@ -2881,7 +2884,7 @@ void DM_set_object_boundbox(Object *ob, DerivedMesh *dm)
if (!ob->bb)
ob->bb= MEM_callocN(sizeof(BoundBox), "DM-BoundBox");
- boundbox_set_from_min_max(ob->bb, min, max);
+ BKE_boundbox_init_from_minmax(ob->bb, min, max);
}
/* --- NAVMESH (begin) --- */
@@ -2933,7 +2936,7 @@ static void navmesh_drawColored(DerivedMesh *dm)
glDisable(GL_LIGHTING);
/* if (GPU_buffer_legacy(dm) ) */ { /* TODO - VBO draw code, not high priority - campbell */
- DEBUG_VBO( "Using legacy code. drawNavMeshColored\n" );
+ DEBUG_VBO("Using legacy code. drawNavMeshColored\n");
//glShadeModel(GL_SMOOTH);
glBegin(glmode = GL_QUADS);
for (a = 0; a < dm->numTessFaceData; a++, mface++) {
@@ -3114,7 +3117,7 @@ static void dm_debug_info_layers(DynStr *dynstr, DerivedMesh *dm, void *(*getEle
CustomData_file_write_info(type, &structname, &structnum);
BLI_dynstr_appendf(dynstr,
" dict(name='%s', struct='%s', type=%d, ptr='%p', elem=%d, length=%d),\n",
- name, structname, type, (void *)pt, size, (int)(MEM_allocN_len(pt) / size));
+ name, structname, type, (void *)pt, size, (int)(MEM_allocN_len(pt) / size));
}
}
}
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index 93401a528ab..9e46d03a3ab 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -69,7 +69,7 @@
* - Pose is the local (object level) component of armature. The current
* object pose is saved in files, and (will be) is presorted for dependency
* - Actions have fewer (or other) channels, and write data to a Pose
- * - Currently ob->pose data is controlled in where_is_pose only. The (recalc)
+ * - Currently ob->pose data is controlled in BKE_pose_where_is only. The (recalc)
* event system takes care of calling that
* - The NLA system (here too) uses Poses as interpolation format for Actions
* - Therefore we assume poses to be static, and duplicates of poses have channels in
@@ -83,14 +83,14 @@ bAction *add_empty_action(const char name[])
{
bAction *act;
- act= alloc_libblock(&G.main->action, ID_AC, name);
+ act = BKE_libblock_alloc(&G.main->action, ID_AC, name);
return act;
}
/* .................................. */
-/* temp data for make_local_action */
+/* temp data for BKE_action_make_local */
typedef struct tMakeLocalActionContext {
bAction *act; /* original action */
bAction *act_new; /* new action */
@@ -99,18 +99,18 @@ typedef struct tMakeLocalActionContext {
int is_local; /* some action users were not libraries */
} tMakeLocalActionContext;
-/* helper function for make_local_action() - local/lib init step */
+/* helper function for BKE_action_make_local() - local/lib init step */
static void make_localact_init_cb(ID *id, AnimData *adt, void *mlac_ptr)
{
tMakeLocalActionContext *mlac = (tMakeLocalActionContext *)mlac_ptr;
if (adt->action == mlac->act) {
- if (id->lib) mlac->is_lib= TRUE;
- else mlac->is_local= TRUE;
+ if (id->lib) mlac->is_lib = TRUE;
+ else mlac->is_local = TRUE;
}
}
-/* helper function for make_local_action() - change references */
+/* helper function for BKE_action_make_local() - change references */
static void make_localact_apply_cb(ID *id, AnimData *adt, void *mlac_ptr)
{
tMakeLocalActionContext *mlac = (tMakeLocalActionContext *)mlac_ptr;
@@ -126,28 +126,28 @@ static void make_localact_apply_cb(ID *id, AnimData *adt, void *mlac_ptr)
}
// does copy_fcurve...
-void make_local_action(bAction *act)
+void BKE_action_make_local(bAction *act)
{
tMakeLocalActionContext mlac = {act, NULL, FALSE, FALSE};
- Main *bmain= G.main;
+ Main *bmain = G.main;
- if (act->id.lib==NULL)
+ if (act->id.lib == NULL)
return;
// XXX: double-check this; it used to be just single-user check, but that was when fake-users were still default
- if ((act->id.flag & LIB_FAKEUSER) && (act->id.us<=1)) {
+ if ((act->id.flag & LIB_FAKEUSER) && (act->id.us <= 1)) {
id_clear_lib_data(bmain, &act->id);
return;
}
BKE_animdata_main_cb(bmain, make_localact_init_cb, &mlac);
- if (mlac.is_local && mlac.is_lib==FALSE) {
+ if (mlac.is_local && mlac.is_lib == FALSE) {
id_clear_lib_data(bmain, &act->id);
}
else if (mlac.is_local && mlac.is_lib) {
- mlac.act_new= copy_action(act);
- mlac.act_new->id.us= 0;
+ mlac.act_new = BKE_action_copy(act);
+ mlac.act_new->id.us = 0;
BKE_id_lib_local_paths(bmain, act->id.lib, &mlac.act_new->id);
@@ -157,7 +157,7 @@ void make_local_action(bAction *act)
/* .................................. */
-void free_action (bAction *act)
+void BKE_action_free(bAction *act)
{
/* sanity check */
if (act == NULL)
@@ -177,7 +177,7 @@ void free_action (bAction *act)
/* .................................. */
-bAction *copy_action (bAction *src)
+bAction *BKE_action_copy(bAction *src)
{
bAction *dst = NULL;
bActionGroup *dgrp, *sgrp;
@@ -185,29 +185,29 @@ bAction *copy_action (bAction *src)
if (src == NULL)
return NULL;
- dst= copy_libblock(&src->id);
+ dst = BKE_libblock_copy(&src->id);
/* duplicate the lists of groups and markers */
BLI_duplicatelist(&dst->groups, &src->groups);
BLI_duplicatelist(&dst->markers, &src->markers);
/* copy F-Curves, fixing up the links as we go */
- dst->curves.first= dst->curves.last= NULL;
+ dst->curves.first = dst->curves.last = NULL;
- for (sfcu= src->curves.first; sfcu; sfcu= sfcu->next) {
+ for (sfcu = src->curves.first; sfcu; sfcu = sfcu->next) {
/* duplicate F-Curve */
- dfcu= copy_fcurve(sfcu);
+ dfcu = copy_fcurve(sfcu);
BLI_addtail(&dst->curves, dfcu);
/* fix group links (kindof bad list-in-list search, but this is the most reliable way) */
- for (dgrp=dst->groups.first, sgrp=src->groups.first; dgrp && sgrp; dgrp=dgrp->next, sgrp=sgrp->next) {
+ for (dgrp = dst->groups.first, sgrp = src->groups.first; dgrp && sgrp; dgrp = dgrp->next, sgrp = sgrp->next) {
if (sfcu->grp == sgrp) {
- dfcu->grp= dgrp;
+ dfcu->grp = dgrp;
if (dgrp->channels.first == sfcu)
- dgrp->channels.first= dfcu;
+ dgrp->channels.first = dfcu;
if (dgrp->channels.last == sfcu)
- dgrp->channels.last= dfcu;
+ dgrp->channels.last = dfcu;
break;
}
@@ -220,12 +220,12 @@ bAction *copy_action (bAction *src)
/* *************** Action Groups *************** */
/* Get the active action-group for an Action */
-bActionGroup *get_active_actiongroup (bAction *act)
+bActionGroup *get_active_actiongroup(bAction *act)
{
- bActionGroup *agrp= NULL;
+ bActionGroup *agrp = NULL;
if (act && act->groups.first) {
- for (agrp= act->groups.first; agrp; agrp= agrp->next) {
+ for (agrp = act->groups.first; agrp; agrp = agrp->next) {
if (agrp->flag & AGRP_ACTIVE)
break;
}
@@ -235,7 +235,7 @@ bActionGroup *get_active_actiongroup (bAction *act)
}
/* Make the given Action-Group the active one */
-void set_active_action_group (bAction *act, bActionGroup *agrp, short select)
+void set_active_action_group(bAction *act, bActionGroup *agrp, short select)
{
bActionGroup *grp;
@@ -244,8 +244,8 @@ void set_active_action_group (bAction *act, bActionGroup *agrp, short select)
return;
/* Deactive all others */
- for (grp= act->groups.first; grp; grp= grp->next) {
- if ((grp==agrp) && (select))
+ for (grp = act->groups.first; grp; grp = grp->next) {
+ if ((grp == agrp) && (select))
grp->flag |= AGRP_ACTIVE;
else
grp->flag &= ~AGRP_ACTIVE;
@@ -253,7 +253,7 @@ void set_active_action_group (bAction *act, bActionGroup *agrp, short select)
}
/* Add a new action group with the given name to the action */
-bActionGroup *action_groups_add_new (bAction *act, const char name[])
+bActionGroup *action_groups_add_new(bAction *act, const char name[])
{
bActionGroup *agrp;
@@ -280,7 +280,7 @@ bActionGroup *action_groups_add_new (bAction *act, const char name[])
* - assumes that channel is not linked to anything anymore
* - always adds at the end of the group
*/
-void action_groups_add_channel (bAction *act, bActionGroup *agrp, FCurve *fcurve)
+void action_groups_add_channel(bAction *act, bActionGroup *agrp, FCurve *fcurve)
{
/* sanity checks */
if (ELEM3(NULL, act, agrp, fcurve))
@@ -303,7 +303,7 @@ void action_groups_add_channel (bAction *act, bActionGroup *agrp, FCurve *fcurve
* the lists will be in sync after linking
*/
if (agrp->channels.last == act->curves.last)
- act->curves.last= fcurve;
+ act->curves.last = fcurve;
/* link in the given F-Curve after the last F-Curve in the group,
* which means that it should be able to fit in with the rest of the
@@ -320,7 +320,7 @@ void action_groups_add_channel (bAction *act, bActionGroup *agrp, FCurve *fcurve
agrp->channels.first = agrp->channels.last = fcurve;
/* step through the groups preceding this one, finding the F-Curve there to attach this one after */
- for (grp= agrp->prev; grp; grp= grp->prev) {
+ for (grp = agrp->prev; grp; grp = grp->prev) {
/* if this group has F-Curves, we want weave the given one in right after the last channel there,
* but via the Action's list not this group's list
* - this is so that the F-Curve is in the right place in the Action,
@@ -342,11 +342,11 @@ void action_groups_add_channel (bAction *act, bActionGroup *agrp, FCurve *fcurve
}
/* set the F-Curve's new group */
- fcurve->grp= agrp;
+ fcurve->grp = agrp;
}
/* Remove the given channel from all groups */
-void action_groups_remove_channel (bAction *act, FCurve *fcu)
+void action_groups_remove_channel(bAction *act, FCurve *fcu)
{
/* sanity checks */
if (ELEM(NULL, act, fcu))
@@ -354,28 +354,28 @@ void action_groups_remove_channel (bAction *act, FCurve *fcu)
/* check if any group used this directly */
if (fcu->grp) {
- bActionGroup *agrp= fcu->grp;
+ bActionGroup *agrp = fcu->grp;
if (agrp->channels.first == agrp->channels.last) {
if (agrp->channels.first == fcu) {
- agrp->channels.first= NULL;
- agrp->channels.last= NULL;
+ agrp->channels.first = NULL;
+ agrp->channels.last = NULL;
}
}
else if (agrp->channels.first == fcu) {
- if ((fcu->next) && (fcu->next->grp==agrp))
- agrp->channels.first= fcu->next;
+ if ((fcu->next) && (fcu->next->grp == agrp))
+ agrp->channels.first = fcu->next;
else
- agrp->channels.first= NULL;
+ agrp->channels.first = NULL;
}
else if (agrp->channels.last == fcu) {
- if ((fcu->prev) && (fcu->prev->grp==agrp))
- agrp->channels.last= fcu->prev;
+ if ((fcu->prev) && (fcu->prev->grp == agrp))
+ agrp->channels.last = fcu->prev;
else
- agrp->channels.last= NULL;
+ agrp->channels.last = NULL;
}
- fcu->grp= NULL;
+ fcu->grp = NULL;
}
/* now just remove from list */
@@ -383,7 +383,7 @@ void action_groups_remove_channel (bAction *act, FCurve *fcu)
}
/* Find a group with the given name */
-bActionGroup *action_groups_find_named (bAction *act, const char name[])
+bActionGroup *BKE_action_group_find_name(bAction *act, const char name[])
{
/* sanity checks */
if (ELEM3(NULL, act, act->groups.first, name) || (name[0] == 0))
@@ -394,7 +394,7 @@ bActionGroup *action_groups_find_named (bAction *act, const char name[])
}
/* Clear all 'temp' flags on all groups */
-void action_groups_clear_tempflags (bAction *act)
+void action_groups_clear_tempflags(bAction *act)
{
bActionGroup *agrp;
@@ -410,7 +410,7 @@ void action_groups_clear_tempflags (bAction *act)
/* *************** Pose channels *************** */
/* usually used within a loop, so we got a N^2 slowdown */
-bPoseChannel *get_pose_channel(const bPose *pose, const char *name)
+bPoseChannel *BKE_pose_channel_find_name(const bPose *pose, const char *name)
{
if (ELEM(NULL, pose, name) || (name[0] == 0))
return NULL;
@@ -423,7 +423,7 @@ bPoseChannel *get_pose_channel(const bPose *pose, const char *name)
/* Use with care, not on Armature poses but for temporal ones */
/* (currently used for action constraints and in rebuild_pose) */
-bPoseChannel *verify_pose_channel(bPose *pose, const char *name)
+bPoseChannel *BKE_pose_channel_verify(bPose *pose, const char *name)
{
bPoseChannel *chan;
@@ -431,7 +431,7 @@ bPoseChannel *verify_pose_channel(bPose *pose, const char *name)
return NULL;
/* See if this channel exists */
- chan= BLI_findstring(&pose->chanbase, name, offsetof(bPoseChannel, name));
+ chan = BLI_findstring(&pose->chanbase, name, offsetof(bPoseChannel, name));
if (chan) {
return chan;
}
@@ -445,24 +445,24 @@ bPoseChannel *verify_pose_channel(bPose *pose, const char *name)
unit_axis_angle(chan->rotAxis, &chan->rotAngle);
chan->size[0] = chan->size[1] = chan->size[2] = 1.0f;
- chan->limitmin[0]= chan->limitmin[1]= chan->limitmin[2]= -180.0f;
- chan->limitmax[0]= chan->limitmax[1]= chan->limitmax[2]= 180.0f;
- chan->stiffness[0]= chan->stiffness[1]= chan->stiffness[2]= 0.0f;
+ chan->limitmin[0] = chan->limitmin[1] = chan->limitmin[2] = -180.0f;
+ chan->limitmax[0] = chan->limitmax[1] = chan->limitmax[2] = 180.0f;
+ chan->stiffness[0] = chan->stiffness[1] = chan->stiffness[2] = 0.0f;
chan->ikrotweight = chan->iklinweight = 0.0f;
unit_m4(chan->constinv);
- chan->protectflag = OB_LOCK_ROT4D; /* lock by components by default */
+ chan->protectflag = OB_LOCK_ROT4D; /* lock by components by default */
BLI_addtail(&pose->chanbase, chan);
- free_pose_channels_hash(pose);
+ BKE_pose_channels_hash_free(pose);
return chan;
}
/* Find the active posechannel for an object (we can't just use pose, as layer info is in armature) */
-bPoseChannel *get_active_posechannel (Object *ob)
+bPoseChannel *BKE_pose_channel_active(Object *ob)
{
- bArmature *arm= (ob) ? ob->data : NULL;
+ bArmature *arm = (ob) ? ob->data : NULL;
bPoseChannel *pchan;
if (ELEM3(NULL, ob, ob->pose, arm)) {
@@ -470,7 +470,7 @@ bPoseChannel *get_active_posechannel (Object *ob)
}
/* find active */
- for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
+ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
if ((pchan->bone) && (pchan->bone == arm->act_bone) && (pchan->bone->layer & arm->layer))
return pchan;
}
@@ -478,37 +478,37 @@ bPoseChannel *get_active_posechannel (Object *ob)
return NULL;
}
-const char *get_ikparam_name(bPose *pose)
+const char *BKE_pose_ikparam_get_name(bPose *pose)
{
if (pose) {
switch (pose->iksolver) {
- case IKSOLVER_LEGACY:
- return NULL;
- case IKSOLVER_ITASC:
- return "bItasc";
+ case IKSOLVER_LEGACY:
+ return NULL;
+ case IKSOLVER_ITASC:
+ return "bItasc";
}
}
return NULL;
}
/* dst should be freed already, makes entire duplicate */
-void copy_pose (bPose **dst, bPose *src, int copycon)
+void BKE_pose_copy_data(bPose **dst, bPose *src, int copycon)
{
bPose *outPose;
bPoseChannel *pchan;
ListBase listb;
if (!src) {
- *dst=NULL;
+ *dst = NULL;
return;
}
- if (*dst==src) {
- printf("copy_pose source and target are the same\n");
- *dst=NULL;
+ if (*dst == src) {
+ printf("BKE_pose_copy_data source and target are the same\n");
+ *dst = NULL;
return;
}
- outPose= MEM_callocN(sizeof(bPose), "pose");
+ outPose = MEM_callocN(sizeof(bPose), "pose");
BLI_duplicatelist(&outPose->chanbase, &src->chanbase);
@@ -516,16 +516,16 @@ void copy_pose (bPose **dst, bPose *src, int copycon)
outPose->ikdata = NULL;
outPose->ikparam = MEM_dupallocN(src->ikparam);
- for (pchan=outPose->chanbase.first; pchan; pchan=pchan->next) {
+ for (pchan = outPose->chanbase.first; pchan; pchan = pchan->next) {
// TODO: rename this argument...
if (copycon) {
copy_constraints(&listb, &pchan->constraints, TRUE); // copy_constraints NULLs listb
- pchan->constraints= listb;
- pchan->mpath= NULL; /* motion paths should not get copied yet... */
+ pchan->constraints = listb;
+ pchan->mpath = NULL; /* motion paths should not get copied yet... */
}
if (pchan->prop) {
- pchan->prop= IDP_CopyProperty(pchan->prop);
+ pchan->prop = IDP_CopyProperty(pchan->prop);
}
}
@@ -533,10 +533,10 @@ void copy_pose (bPose **dst, bPose *src, int copycon)
if (copycon)
BLI_duplicatelist(&outPose->agroups, &src->agroups);
- *dst=outPose;
+ *dst = outPose;
}
-void init_pose_itasc(bItasc *itasc)
+void BKE_pose_itasc_init(bItasc *itasc)
{
if (itasc) {
itasc->iksolver = IKSOLVER_ITASC;
@@ -545,7 +545,7 @@ void init_pose_itasc(bItasc *itasc)
itasc->numiter = 100;
itasc->numstep = 4;
itasc->precision = 0.005f;
- itasc->flag = ITASC_AUTO_STEP|ITASC_INITIAL_REITERATION;
+ itasc->flag = ITASC_AUTO_STEP | ITASC_INITIAL_REITERATION;
itasc->feedback = 20.0f;
itasc->maxvel = 50.0f;
itasc->solver = ITASC_SOLVER_SDLS;
@@ -553,48 +553,48 @@ void init_pose_itasc(bItasc *itasc)
itasc->dampeps = 0.15;
}
}
-void init_pose_ikparam(bPose *pose)
+void BKE_pose_ikparam_init(bPose *pose)
{
bItasc *itasc;
switch (pose->iksolver) {
- case IKSOLVER_ITASC:
- itasc = MEM_callocN(sizeof(bItasc), "itasc");
- init_pose_itasc(itasc);
- pose->ikparam = itasc;
- break;
- case IKSOLVER_LEGACY:
- default:
- pose->ikparam = NULL;
- break;
+ case IKSOLVER_ITASC:
+ itasc = MEM_callocN(sizeof(bItasc), "itasc");
+ BKE_pose_itasc_init(itasc);
+ pose->ikparam = itasc;
+ break;
+ case IKSOLVER_LEGACY:
+ default:
+ pose->ikparam = NULL;
+ break;
}
}
-void make_pose_channels_hash(bPose *pose)
+void BKE_pose_channels_hash_make(bPose *pose)
{
if (!pose->chanhash) {
bPoseChannel *pchan;
- pose->chanhash= BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, "make_pose_chan gh");
- for (pchan=pose->chanbase.first; pchan; pchan=pchan->next)
+ pose->chanhash = BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, "make_pose_chan gh");
+ for (pchan = pose->chanbase.first; pchan; pchan = pchan->next)
BLI_ghash_insert(pose->chanhash, pchan->name, pchan);
}
}
-void free_pose_channels_hash(bPose *pose)
+void BKE_pose_channels_hash_free(bPose *pose)
{
if (pose->chanhash) {
BLI_ghash_free(pose->chanhash, NULL, NULL);
- pose->chanhash= NULL;
+ pose->chanhash = NULL;
}
}
-void free_pose_channel(bPoseChannel *pchan)
+void BKE_pose_channel_free(bPoseChannel *pchan)
{
if (pchan->mpath) {
animviz_free_motionpath(pchan->mpath);
- pchan->mpath= NULL;
+ pchan->mpath = NULL;
}
free_constraints(&pchan->constraints);
@@ -605,25 +605,25 @@ void free_pose_channel(bPoseChannel *pchan)
}
}
-void free_pose_channels(bPose *pose)
+void BKE_pose_channels_free(bPose *pose)
{
bPoseChannel *pchan;
if (pose->chanbase.first) {
- for (pchan = pose->chanbase.first; pchan; pchan=pchan->next)
- free_pose_channel(pchan);
+ for (pchan = pose->chanbase.first; pchan; pchan = pchan->next)
+ BKE_pose_channel_free(pchan);
BLI_freelistN(&pose->chanbase);
}
- free_pose_channels_hash(pose);
+ BKE_pose_channels_hash_free(pose);
}
-void free_pose(bPose *pose)
+void BKE_pose_free(bPose *pose)
{
if (pose) {
/* free pose-channels */
- free_pose_channels(pose);
+ BKE_pose_channels_free(pose);
/* free pose-groups */
if (pose->agroups.first)
@@ -649,24 +649,24 @@ static void copy_pose_channel_data(bPoseChannel *pchan, const bPoseChannel *chan
copy_v3_v3(pchan->size, chan->size);
copy_v3_v3(pchan->eul, chan->eul);
copy_v3_v3(pchan->rotAxis, chan->rotAxis);
- pchan->rotAngle= chan->rotAngle;
+ pchan->rotAngle = chan->rotAngle;
copy_qt_qt(pchan->quat, chan->quat);
- pchan->rotmode= chan->rotmode;
+ pchan->rotmode = chan->rotmode;
copy_m4_m4(pchan->chan_mat, (float(*)[4])chan->chan_mat);
copy_m4_m4(pchan->pose_mat, (float(*)[4])chan->pose_mat);
- pchan->flag= chan->flag;
+ pchan->flag = chan->flag;
- con= chan->constraints.first;
- for (pcon= pchan->constraints.first; pcon && con; pcon= pcon->next, con= con->next) {
- pcon->enforce= con->enforce;
- pcon->headtail= con->headtail;
+ con = chan->constraints.first;
+ for (pcon = pchan->constraints.first; pcon && con; pcon = pcon->next, con = con->next) {
+ pcon->enforce = con->enforce;
+ pcon->headtail = con->headtail;
}
}
/* makes copies of internal data, unlike copy_pose_channel_data which only
* copies the pose state.
- * hint: use when copying bones in editmode (on returned value from verify_pose_channel) */
-void duplicate_pose_channel_data(bPoseChannel *pchan, const bPoseChannel *pchan_from)
+ * hint: use when copying bones in editmode (on returned value from BKE_pose_channel_verify) */
+void BKE_pose_channel_copy_data(bPoseChannel *pchan, const bPoseChannel *pchan_from)
{
/* copy transform locks */
pchan->protectflag = pchan_from->protectflag;
@@ -675,16 +675,16 @@ void duplicate_pose_channel_data(bPoseChannel *pchan, const bPoseChannel *pchan_
pchan->rotmode = pchan_from->rotmode;
/* copy bone group */
- pchan->agrp_index= pchan_from->agrp_index;
+ pchan->agrp_index = pchan_from->agrp_index;
/* ik (dof) settings */
pchan->ikflag = pchan_from->ikflag;
copy_v3_v3(pchan->limitmin, pchan_from->limitmin);
copy_v3_v3(pchan->limitmax, pchan_from->limitmax);
copy_v3_v3(pchan->stiffness, pchan_from->stiffness);
- pchan->ikstretch= pchan_from->ikstretch;
- pchan->ikrotweight= pchan_from->ikrotweight;
- pchan->iklinweight= pchan_from->iklinweight;
+ pchan->ikstretch = pchan_from->ikstretch;
+ pchan->ikrotweight = pchan_from->ikrotweight;
+ pchan->iklinweight = pchan_from->iklinweight;
/* constraints */
copy_constraints(&pchan->constraints, &pchan_from->constraints, TRUE);
@@ -694,14 +694,14 @@ void duplicate_pose_channel_data(bPoseChannel *pchan, const bPoseChannel *pchan_
/* unlikely but possible it exists */
IDP_FreeProperty(pchan->prop);
MEM_freeN(pchan->prop);
- pchan->prop= NULL;
+ pchan->prop = NULL;
}
if (pchan_from->prop) {
- pchan->prop= IDP_CopyProperty(pchan_from->prop);
+ pchan->prop = IDP_CopyProperty(pchan_from->prop);
}
/* custom shape */
- pchan->custom= pchan_from->custom;
+ pchan->custom = pchan_from->custom;
}
@@ -709,45 +709,45 @@ void duplicate_pose_channel_data(bPoseChannel *pchan, const bPoseChannel *pchan_
* can do more constraints flags later
*/
/* pose should be entirely OK */
-void update_pose_constraint_flags(bPose *pose)
+void BKE_pose_update_constraint_flags(bPose *pose)
{
bPoseChannel *pchan, *parchan;
bConstraint *con;
/* clear */
- for (pchan= pose->chanbase.first; pchan; pchan= pchan->next) {
- pchan->constflag= 0;
+ for (pchan = pose->chanbase.first; pchan; pchan = pchan->next) {
+ pchan->constflag = 0;
}
pose->flag &= ~POSE_CONSTRAINTS_TIMEDEPEND;
/* detect */
- for (pchan= pose->chanbase.first; pchan; pchan=pchan->next) {
- for (con= pchan->constraints.first; con; con= con->next) {
- if (con->type==CONSTRAINT_TYPE_KINEMATIC) {
- bKinematicConstraint *data = (bKinematicConstraint*)con->data;
+ for (pchan = pose->chanbase.first; pchan; pchan = pchan->next) {
+ for (con = pchan->constraints.first; con; con = con->next) {
+ if (con->type == CONSTRAINT_TYPE_KINEMATIC) {
+ bKinematicConstraint *data = (bKinematicConstraint *)con->data;
pchan->constflag |= PCHAN_HAS_IK;
- if (data->tar==NULL || (data->tar->type==OB_ARMATURE && data->subtarget[0]==0))
+ if (data->tar == NULL || (data->tar->type == OB_ARMATURE && data->subtarget[0] == 0))
pchan->constflag |= PCHAN_HAS_TARGET;
/* negative rootbone = recalc rootbone index. used in do_versions */
- if (data->rootbone<0) {
- data->rootbone= 0;
+ if (data->rootbone < 0) {
+ data->rootbone = 0;
- if (data->flag & CONSTRAINT_IK_TIP) parchan= pchan;
- else parchan= pchan->parent;
+ if (data->flag & CONSTRAINT_IK_TIP) parchan = pchan;
+ else parchan = pchan->parent;
while (parchan) {
data->rootbone++;
- if ((parchan->bone->flag & BONE_CONNECTED)==0)
+ if ((parchan->bone->flag & BONE_CONNECTED) == 0)
break;
- parchan= parchan->parent;
+ parchan = parchan->parent;
}
}
}
else if (con->type == CONSTRAINT_TYPE_FOLLOWPATH) {
- bFollowPathConstraint *data= (bFollowPathConstraint *)con->data;
+ bFollowPathConstraint *data = (bFollowPathConstraint *)con->data;
/* for drawing constraint colors when color set allows this */
pchan->constflag |= PCHAN_HAS_CONST;
@@ -755,7 +755,7 @@ void update_pose_constraint_flags(bPose *pose)
/* if we have a valid target, make sure that this will get updated on frame-change
* (needed for when there is no anim-data for this pose)
*/
- if ((data->tar) && (data->tar->type==OB_CURVE))
+ if ((data->tar) && (data->tar->type == OB_CURVE))
pose->flag |= POSE_CONSTRAINTS_TIMEDEPEND;
}
else if (con->type == CONSTRAINT_TYPE_SPLINEIK)
@@ -778,10 +778,10 @@ void framechange_poses_clear_unkeyed(void)
/* This needs to be done for each object that has a pose */
// TODO: proxies may/may not be correctly handled here... (this needs checking)
- for (ob= G.main->object.first; ob; ob= ob->id.next) {
+ for (ob = G.main->object.first; ob; ob = ob->id.next) {
/* we only need to do this on objects with a pose */
- if ( (pose= ob->pose) ) {
- for (pchan= pose->chanbase.first; pchan; pchan= pchan->next) {
+ if ( (pose = ob->pose) ) {
+ for (pchan = pose->chanbase.first; pchan; pchan = pchan->next) {
if (pchan->bone)
pchan->bone->flag &= ~BONE_UNKEYED;
}
@@ -792,26 +792,26 @@ void framechange_poses_clear_unkeyed(void)
/* ************************** Bone Groups ************************** */
/* Adds a new bone-group */
-void pose_add_group (Object *ob)
+void BKE_pose_add_group(Object *ob)
{
- bPose *pose= (ob) ? ob->pose : NULL;
+ bPose *pose = (ob) ? ob->pose : NULL;
bActionGroup *grp;
if (ELEM(NULL, ob, ob->pose))
return;
- grp= MEM_callocN(sizeof(bActionGroup), "PoseGroup");
+ grp = MEM_callocN(sizeof(bActionGroup), "PoseGroup");
BLI_strncpy(grp->name, "Group", sizeof(grp->name));
BLI_addtail(&pose->agroups, grp);
BLI_uniquename(&pose->agroups, grp, "Group", '.', offsetof(bActionGroup, name), sizeof(grp->name));
- pose->active_group= BLI_countlist(&pose->agroups);
+ pose->active_group = BLI_countlist(&pose->agroups);
}
/* Remove the active bone-group */
-void pose_remove_group (Object *ob)
+void BKE_pose_remove_group(Object *ob)
{
- bPose *pose= (ob) ? ob->pose : NULL;
+ bPose *pose = (ob) ? ob->pose : NULL;
bActionGroup *grp = NULL;
bPoseChannel *pchan;
@@ -822,15 +822,15 @@ void pose_remove_group (Object *ob)
return;
/* get group to remove */
- grp= BLI_findlink(&pose->agroups, pose->active_group-1);
+ grp = BLI_findlink(&pose->agroups, pose->active_group - 1);
if (grp) {
/* adjust group references (the trouble of using indices!):
* - firstly, make sure nothing references it
* - also, make sure that those after this item get corrected
*/
- for (pchan= pose->chanbase.first; pchan; pchan= pchan->next) {
+ for (pchan = pose->chanbase.first; pchan; pchan = pchan->next) {
if (pchan->agrp_index == pose->active_group)
- pchan->agrp_index= 0;
+ pchan->agrp_index = 0;
else if (pchan->agrp_index > pose->active_group)
pchan->agrp_index--;
}
@@ -839,7 +839,7 @@ void pose_remove_group (Object *ob)
BLI_freelinkN(&pose->agroups, grp);
pose->active_group--;
if (pose->active_group < 0 || pose->agroups.first == NULL) {
- pose->active_group= 0;
+ pose->active_group = 0;
}
}
}
@@ -853,7 +853,7 @@ short action_has_motion(const bAction *act)
/* return on the first F-Curve that has some keyframes/samples defined */
if (act) {
- for (fcu= act->curves.first; fcu; fcu= fcu->next) {
+ for (fcu = act->curves.first; fcu; fcu = fcu->next) {
if (fcu->totvert)
return 1;
}
@@ -867,11 +867,11 @@ short action_has_motion(const bAction *act)
void calc_action_range(const bAction *act, float *start, float *end, short incl_modifiers)
{
FCurve *fcu;
- float min=999999999.0f, max=-999999999.0f;
- short foundvert=0, foundmod=0;
+ float min = 999999999.0f, max = -999999999.0f;
+ short foundvert = 0, foundmod = 0;
if (act) {
- for (fcu= act->curves.first; fcu; fcu= fcu->next) {
+ for (fcu = act->curves.first; fcu; fcu = fcu->next) {
/* if curve has keyframes, consider them first */
if (fcu->totvert) {
float nmin, nmax;
@@ -881,77 +881,77 @@ void calc_action_range(const bAction *act, float *start, float *end, short incl_
calc_fcurve_range(fcu, &nmin, &nmax, FALSE, TRUE);
/* compare to the running tally */
- min= MIN2(min, nmin);
- max= MAX2(max, nmax);
+ min = MIN2(min, nmin);
+ max = MAX2(max, nmax);
- foundvert= 1;
+ foundvert = 1;
}
/* if incl_modifiers is enabled, need to consider modifiers too
* - only really care about the last modifier
*/
if ((incl_modifiers) && (fcu->modifiers.last)) {
- FModifier *fcm= fcu->modifiers.last;
+ FModifier *fcm = fcu->modifiers.last;
/* only use the maximum sensible limits of the modifiers if they are more extreme */
switch (fcm->type) {
case FMODIFIER_TYPE_LIMITS: /* Limits F-Modifier */
{
- FMod_Limits *fmd= (FMod_Limits *)fcm->data;
+ FMod_Limits *fmd = (FMod_Limits *)fcm->data;
if (fmd->flag & FCM_LIMIT_XMIN) {
- min= MIN2(min, fmd->rect.xmin);
+ min = MIN2(min, fmd->rect.xmin);
}
if (fmd->flag & FCM_LIMIT_XMAX) {
- max= MAX2(max, fmd->rect.xmax);
+ max = MAX2(max, fmd->rect.xmax);
}
}
- break;
+ break;
case FMODIFIER_TYPE_CYCLES: /* Cycles F-Modifier */
{
- FMod_Cycles *fmd= (FMod_Cycles *)fcm->data;
+ FMod_Cycles *fmd = (FMod_Cycles *)fcm->data;
if (fmd->before_mode != FCM_EXTRAPOLATE_NONE)
- min= MINAFRAMEF;
+ min = MINAFRAMEF;
if (fmd->after_mode != FCM_EXTRAPOLATE_NONE)
- max= MAXFRAMEF;
+ max = MAXFRAMEF;
}
- break;
+ break;
// TODO: function modifier may need some special limits
default: /* all other standard modifiers are on the infinite range... */
- min= MINAFRAMEF;
- max= MAXFRAMEF;
+ min = MINAFRAMEF;
+ max = MAXFRAMEF;
break;
}
- foundmod= 1;
+ foundmod = 1;
}
}
}
if (foundvert || foundmod) {
- if (min==max) max+= 1.0f;
- *start= min;
- *end= max;
+ if (min == max) max += 1.0f;
+ *start = min;
+ *end = max;
}
else {
- *start= 0.0f;
- *end= 1.0f;
+ *start = 0.0f;
+ *end = 1.0f;
}
}
/* Return flags indicating which transforms the given object/posechannel has
* - if 'curves' is provided, a list of links to these curves are also returned
*/
-short action_get_item_transforms (bAction *act, Object *ob, bPoseChannel *pchan, ListBase *curves)
+short action_get_item_transforms(bAction *act, Object *ob, bPoseChannel *pchan, ListBase *curves)
{
PointerRNA ptr;
FCurve *fcu;
- char *basePath=NULL;
- short flags=0;
+ char *basePath = NULL;
+ short flags = 0;
/* build PointerRNA from provided data to obtain the paths to use */
if (pchan)
@@ -962,15 +962,15 @@ short action_get_item_transforms (bAction *act, Object *ob, bPoseChannel *pchan,
return 0;
/* get the basic path to the properties of interest */
- basePath= RNA_path_from_ID_to_struct(&ptr);
+ basePath = RNA_path_from_ID_to_struct(&ptr);
if (basePath == NULL)
return 0;
/* search F-Curves for the given properties
* - we cannot use the groups, since they may not be grouped in that way...
*/
- for (fcu= act->curves.first; fcu; fcu= fcu->next) {
- char *bPtr=NULL, *pPtr=NULL;
+ for (fcu = act->curves.first; fcu; fcu = fcu->next) {
+ char *bPtr = NULL, *pPtr = NULL;
/* if enough flags have been found, we can stop checking unless we're also getting the curves */
if ((flags == ACT_TRANS_ALL) && (curves == NULL))
@@ -981,7 +981,7 @@ short action_get_item_transforms (bAction *act, Object *ob, bPoseChannel *pchan,
continue;
/* step 1: check for matching base path */
- bPtr= strstr(fcu->rna_path, basePath);
+ bPtr = strstr(fcu->rna_path, basePath);
if (bPtr) {
/* we must add len(basePath) bytes to the match so that we are at the end of the
@@ -991,13 +991,13 @@ short action_get_item_transforms (bAction *act, Object *ob, bPoseChannel *pchan,
/* step 2: check for some property with transforms
* - to speed things up, only check for the ones not yet found
- * unless we're getting the curves too
+ * unless we're getting the curves too
* - if we're getting the curves, the BLI_genericNodeN() creates a LinkData
* node wrapping the F-Curve, which then gets added to the list
* - once a match has been found, the curve cannot possibly be any other one
*/
if ((curves) || (flags & ACT_TRANS_LOC) == 0) {
- pPtr= strstr(bPtr, "location");
+ pPtr = strstr(bPtr, "location");
if (pPtr) {
flags |= ACT_TRANS_LOC;
@@ -1008,7 +1008,7 @@ short action_get_item_transforms (bAction *act, Object *ob, bPoseChannel *pchan,
}
if ((curves) || (flags & ACT_TRANS_SCALE) == 0) {
- pPtr= strstr(bPtr, "scale");
+ pPtr = strstr(bPtr, "scale");
if (pPtr) {
flags |= ACT_TRANS_SCALE;
@@ -1019,7 +1019,7 @@ short action_get_item_transforms (bAction *act, Object *ob, bPoseChannel *pchan,
}
if ((curves) || (flags & ACT_TRANS_ROT) == 0) {
- pPtr= strstr(bPtr, "rotation");
+ pPtr = strstr(bPtr, "rotation");
if (pPtr) {
flags |= ACT_TRANS_ROT;
@@ -1031,7 +1031,7 @@ short action_get_item_transforms (bAction *act, Object *ob, bPoseChannel *pchan,
if ((curves) || (flags & ACT_TRANS_PROP) == 0) {
/* custom properties only */
- pPtr= strstr(bPtr, "[\""); /* extra '"' comment here to keep my texteditor functionlist working :) */
+ pPtr = strstr(bPtr, "[\""); /* extra '"' comment here to keep my texteditor functionlist working :) */
if (pPtr) {
flags |= ACT_TRANS_PROP;
@@ -1059,20 +1059,20 @@ short action_get_item_transforms (bAction *act, Object *ob, bPoseChannel *pchan,
void extract_pose_from_pose(bPose *pose, const bPose *src)
{
const bPoseChannel *schan;
- bPoseChannel *pchan= pose->chanbase.first;
+ bPoseChannel *pchan = pose->chanbase.first;
- if (pose==src) {
+ if (pose == src) {
printf("extract_pose_from_pose source and target are the same\n");
return;
}
- for (schan=src->chanbase.first; (schan && pchan); schan=schan->next, pchan= pchan->next) {
+ for (schan = src->chanbase.first; (schan && pchan); schan = schan->next, pchan = pchan->next) {
copy_pose_channel_data(pchan, schan);
}
}
/* for do_all_pose_actions, clears the pose. Now also exported for proxy and tools */
-void rest_pose(bPose *pose)
+void BKE_pose_rest(bPose *pose)
{
bPoseChannel *pchan;
@@ -1082,35 +1082,35 @@ void rest_pose(bPose *pose)
memset(pose->stride_offset, 0, sizeof(pose->stride_offset));
memset(pose->cyclic_offset, 0, sizeof(pose->cyclic_offset));
- for (pchan=pose->chanbase.first; pchan; pchan= pchan->next) {
+ for (pchan = pose->chanbase.first; pchan; pchan = pchan->next) {
zero_v3(pchan->loc);
zero_v3(pchan->eul);
unit_qt(pchan->quat);
unit_axis_angle(pchan->rotAxis, &pchan->rotAngle);
- pchan->size[0]= pchan->size[1]= pchan->size[2]= 1.0f;
+ pchan->size[0] = pchan->size[1] = pchan->size[2] = 1.0f;
- pchan->flag &= ~(POSE_LOC|POSE_ROT|POSE_SIZE);
+ pchan->flag &= ~(POSE_LOC | POSE_ROT | POSE_SIZE);
}
}
/* both poses should be in sync */
-void copy_pose_result(bPose *to, bPose *from)
+void BKE_pose_copy_result(bPose *to, bPose *from)
{
bPoseChannel *pchanto, *pchanfrom;
- if (to==NULL || from==NULL) {
+ if (to == NULL || from == NULL) {
printf("pose result copy error to:%p from:%p\n", (void *)to, (void *)from); // debug temp
return;
}
- if (to==from) {
- printf("copy_pose_result source and target are the same\n");
+ if (to == from) {
+ printf("BKE_pose_copy_result source and target are the same\n");
return;
}
- for (pchanfrom= from->chanbase.first; pchanfrom; pchanfrom= pchanfrom->next) {
- pchanto= get_pose_channel(to, pchanfrom->name);
+ for (pchanfrom = from->chanbase.first; pchanfrom; pchanfrom = pchanfrom->next) {
+ pchanto = BKE_pose_channel_find_name(to, pchanfrom->name);
if (pchanto) {
copy_m4_m4(pchanto->pose_mat, pchanfrom->pose_mat);
copy_m4_m4(pchanto->chan_mat, pchanfrom->chan_mat);
@@ -1124,9 +1124,9 @@ void copy_pose_result(bPose *to, bPose *from)
copy_v3_v3(pchanto->pose_head, pchanfrom->pose_head);
copy_v3_v3(pchanto->pose_tail, pchanfrom->pose_tail);
- pchanto->rotmode= pchanfrom->rotmode;
- pchanto->flag= pchanfrom->flag;
- pchanto->protectflag= pchanfrom->protectflag;
+ pchanto->rotmode = pchanfrom->rotmode;
+ pchanto->flag = pchanfrom->flag;
+ pchanto->protectflag = pchanfrom->protectflag;
}
}
}
@@ -1134,33 +1134,33 @@ void copy_pose_result(bPose *to, bPose *from)
/* For the calculation of the effects of an Action at the given frame on an object
* This is currently only used for the Action Constraint
*/
-void what_does_obaction (Object *ob, Object *workob, bPose *pose, bAction *act, char groupname[], float cframe)
+void what_does_obaction(Object *ob, Object *workob, bPose *pose, bAction *act, char groupname[], float cframe)
{
- bActionGroup *agrp= action_groups_find_named(act, groupname);
+ bActionGroup *agrp = BKE_action_group_find_name(act, groupname);
/* clear workob */
- clear_workob(workob);
+ BKE_object_workob_clear(workob);
/* init workob */
copy_m4_m4(workob->obmat, ob->obmat);
copy_m4_m4(workob->parentinv, ob->parentinv);
copy_m4_m4(workob->constinv, ob->constinv);
- workob->parent= ob->parent;
+ workob->parent = ob->parent;
- workob->rotmode= ob->rotmode;
+ workob->rotmode = ob->rotmode;
- workob->trackflag= ob->trackflag;
- workob->upflag= ob->upflag;
+ workob->trackflag = ob->trackflag;
+ workob->upflag = ob->upflag;
- workob->partype= ob->partype;
- workob->par1= ob->par1;
- workob->par2= ob->par2;
- workob->par3= ob->par3;
+ workob->partype = ob->partype;
+ workob->par1 = ob->par1;
+ workob->par2 = ob->par2;
+ workob->par3 = ob->par3;
workob->constraints.first = ob->constraints.first;
workob->constraints.last = ob->constraints.last;
- workob->pose= pose; /* need to set pose too, since this is used for both types of Action Constraint */
+ workob->pose = pose; /* need to set pose too, since this is used for both types of Action Constraint */
BLI_strncpy(workob->parsubstr, ob->parsubstr, sizeof(workob->parsubstr));
BLI_strncpy(workob->id.name, "OB<ConstrWorkOb>", sizeof(workob->id.name)); /* we don't use real object name, otherwise RNA screws with the real thing */
@@ -1177,13 +1177,13 @@ void what_does_obaction (Object *ob, Object *workob, bPose *pose, bAction *act,
animsys_evaluate_action_group(&id_ptr, act, agrp, NULL, cframe);
}
else {
- AnimData adt= {NULL};
+ AnimData adt = {NULL};
/* init animdata, and attach to workob */
- workob->adt= &adt;
+ workob->adt = &adt;
- adt.recalc= ADT_RECALC_ANIM;
- adt.action= act;
+ adt.recalc = ADT_RECALC_ANIM;
+ adt.action = act;
/* execute effects of Action on to workob (or it's PoseChannels) */
BKE_animsys_evaluate_animdata(NULL, &workob->id, &adt, cframe, ADT_RECALC_ANIM);
@@ -1207,7 +1207,7 @@ static void blend_pose_strides(bPose *dst, bPose *src, float srcweight, short mo
case ACTSTRIPMODE_ADD:
dstweight = 1.0F;
break;
- default :
+ default:
dstweight = 1.0F;
}
@@ -1238,30 +1238,30 @@ static void blend_pose_offset_bone(bActionStrip *strip, bPose *dst, bPose *src,
/* matching offset bones */
/* take dst offset, and put src on on that location */
- if (strip->offs_bone[0]==0)
+ if (strip->offs_bone[0] == 0)
return;
/* are we also blending with matching bones? */
- if (strip->prev && strip->start>=strip->prev->start) {
- bPoseChannel *dpchan= get_pose_channel(dst, strip->offs_bone);
+ if (strip->prev && strip->start >= strip->prev->start) {
+ bPoseChannel *dpchan = BKE_pose_channel_find_name(dst, strip->offs_bone);
if (dpchan) {
- bPoseChannel *spchan= get_pose_channel(src, strip->offs_bone);
+ bPoseChannel *spchan = BKE_pose_channel_find_name(src, strip->offs_bone);
if (spchan) {
float vec[3];
/* dst->ctime has the internal strip->prev action time */
/* map this time to nla time */
- float ctime= get_actionstrip_frame(strip, src->ctime, 1);
+ float ctime = get_actionstrip_frame(strip, src->ctime, 1);
- if ( ctime > strip->prev->end) {
+ if (ctime > strip->prev->end) {
bActionChannel *achan;
/* add src to dest, minus the position of src on strip->prev->end */
- ctime= get_actionstrip_frame(strip, strip->prev->end, 0);
+ ctime = get_actionstrip_frame(strip, strip->prev->end, 0);
- achan= get_action_channel(strip->act, strip->offs_bone);
+ achan = get_action_channel(strip->act, strip->offs_bone);
if (achan && achan->ipo) {
bPoseChannel pchan;
/* Evaluates and sets the internal ipo value */
@@ -1298,63 +1298,63 @@ static void blend_pose_offset_bone(bActionStrip *strip, bPose *dst, bPose *src,
*/
static float stridechannel_frame(Object *ob, float sizecorr, bActionStrip *strip, Path *path, float pathdist, float *stride_offset)
{
- bAction *act= strip->act;
- const char *name= strip->stridechannel;
- bActionChannel *achan= get_action_channel(act, name);
- int stride_axis= strip->stride_axis;
+ bAction *act = strip->act;
+ const char *name = strip->stridechannel;
+ bActionChannel *achan = get_action_channel(act, name);
+ int stride_axis = strip->stride_axis;
if (achan && achan->ipo) {
- IpoCurve *icu= NULL;
- float minx=0.0f, maxx=0.0f, miny=0.0f, maxy=0.0f;
- int foundvert= 0;
-
- if (stride_axis==0) stride_axis= AC_LOC_X;
- else if (stride_axis==1) stride_axis= AC_LOC_Y;
- else stride_axis= AC_LOC_Z;
+ IpoCurve *icu = NULL;
+ float minx = 0.0f, maxx = 0.0f, miny = 0.0f, maxy = 0.0f;
+ int foundvert = 0;
+
+ if (stride_axis == 0) stride_axis = AC_LOC_X;
+ else if (stride_axis == 1) stride_axis = AC_LOC_Y;
+ else stride_axis = AC_LOC_Z;
/* calculate the min/max */
- for (icu=achan->ipo->curve.first; icu; icu=icu->next) {
- if (icu->adrcode==stride_axis) {
- if (icu->totvert>1) {
- foundvert= 1;
- minx= icu->bezt[0].vec[1][0];
- maxx= icu->bezt[icu->totvert-1].vec[1][0];
+ for (icu = achan->ipo->curve.first; icu; icu = icu->next) {
+ if (icu->adrcode == stride_axis) {
+ if (icu->totvert > 1) {
+ foundvert = 1;
+ minx = icu->bezt[0].vec[1][0];
+ maxx = icu->bezt[icu->totvert - 1].vec[1][0];
- miny= icu->bezt[0].vec[1][1];
- maxy= icu->bezt[icu->totvert-1].vec[1][1];
+ miny = icu->bezt[0].vec[1][1];
+ maxy = icu->bezt[icu->totvert - 1].vec[1][1];
}
break;
}
}
- if (foundvert && miny!=maxy) {
- float stridelen= sizecorr*fabs(maxy-miny), striptime;
+ if (foundvert && miny != maxy) {
+ float stridelen = sizecorr * fabs(maxy - miny), striptime;
float actiondist, pdist, pdistNewNormalized, offs;
float vec1[4], vec2[4], dir[3];
/* internal cycling, actoffs is in frames */
- offs= stridelen*strip->actoffs/(maxx-minx);
+ offs = stridelen * strip->actoffs / (maxx - minx);
/* amount path moves object */
- pdist = (float)fmod (pathdist+offs, stridelen);
- striptime= pdist/stridelen;
+ pdist = (float)fmod(pathdist + offs, stridelen);
+ striptime = pdist / stridelen;
/* amount stride bone moves */
- actiondist= sizecorr*eval_icu(icu, minx + striptime*(maxx-minx)) - miny;
+ actiondist = sizecorr * eval_icu(icu, minx + striptime * (maxx - minx)) - miny;
pdist = fabs(actiondist) - pdist;
- pdistNewNormalized = (pathdist+pdist)/path->totdist;
+ pdistNewNormalized = (pathdist + pdist) / path->totdist;
/* now we need to go pdist further (or less) on cu path */
- where_on_path(ob, (pathdist)/path->totdist, vec1, dir); /* vec needs size 4 */
+ where_on_path(ob, (pathdist) / path->totdist, vec1, dir); /* vec needs size 4 */
if (pdistNewNormalized <= 1) {
// search for correction in positive path-direction
- where_on_path(ob, pdistNewNormalized, vec2, dir); /* vec needs size 4 */
+ where_on_path(ob, pdistNewNormalized, vec2, dir); /* vec needs size 4 */
sub_v3_v3v3(stride_offset, vec2, vec1);
}
else {
// we reached the end of the path, search backwards instead
- where_on_path(ob, (pathdist-pdist)/path->totdist, vec2, dir); /* vec needs size 4 */
+ where_on_path(ob, (pathdist - pdist) / path->totdist, vec2, dir); /* vec needs size 4 */
sub_v3_v3v3(stride_offset, vec1, vec2);
}
mul_mat3_m4_v3(ob->obmat, stride_offset);
@@ -1368,52 +1368,52 @@ static void cyclic_offs_bone(Object *ob, bPose *pose, bActionStrip *strip, float
{
/* only called when strip has cyclic, so >= 1.0f works... */
if (time >= 1.0f) {
- bActionChannel *achan= get_action_channel(strip->act, strip->offs_bone);
+ bActionChannel *achan = get_action_channel(strip->act, strip->offs_bone);
if (achan && achan->ipo) {
- IpoCurve *icu= NULL;
+ IpoCurve *icu = NULL;
Bone *bone;
- float min[3]={0.0f, 0.0f, 0.0f}, max[3]={0.0f, 0.0f, 0.0f};
- int index=0, foundvert= 0;
+ float min[3] = {0.0f, 0.0f, 0.0f}, max[3] = {0.0f, 0.0f, 0.0f};
+ int index = 0, foundvert = 0;
/* calculate the min/max */
- for (icu=achan->ipo->curve.first; icu; icu=icu->next) {
- if (icu->totvert>1) {
+ for (icu = achan->ipo->curve.first; icu; icu = icu->next) {
+ if (icu->totvert > 1) {
- if (icu->adrcode==AC_LOC_X)
- index= 0;
- else if (icu->adrcode==AC_LOC_Y)
- index= 1;
- else if (icu->adrcode==AC_LOC_Z)
- index= 2;
+ if (icu->adrcode == AC_LOC_X)
+ index = 0;
+ else if (icu->adrcode == AC_LOC_Y)
+ index = 1;
+ else if (icu->adrcode == AC_LOC_Z)
+ index = 2;
else
continue;
- foundvert= 1;
- min[index]= icu->bezt[0].vec[1][1];
- max[index]= icu->bezt[icu->totvert-1].vec[1][1];
+ foundvert = 1;
+ min[index] = icu->bezt[0].vec[1][1];
+ max[index] = icu->bezt[icu->totvert - 1].vec[1][1];
}
}
if (foundvert) {
/* bring it into armature space */
sub_v3_v3v3(min, max, min);
- bone= get_named_bone(ob->data, strip->offs_bone); /* weak */
+ bone = BKE_armature_find_bone_name(ob->data, strip->offs_bone); /* weak */
if (bone) {
mul_mat3_m4_v3(bone->arm_mat, min);
- /* dominant motion, cyclic_offset was cleared in rest_pose */
+ /* dominant motion, cyclic_offset was cleared in BKE_pose_rest */
if (strip->flag & (ACTSTRIP_CYCLIC_USEX | ACTSTRIP_CYCLIC_USEY | ACTSTRIP_CYCLIC_USEZ)) {
- if (strip->flag & ACTSTRIP_CYCLIC_USEX) pose->cyclic_offset[0]= time*min[0];
- if (strip->flag & ACTSTRIP_CYCLIC_USEY) pose->cyclic_offset[1]= time*min[1];
- if (strip->flag & ACTSTRIP_CYCLIC_USEZ) pose->cyclic_offset[2]= time*min[2];
+ if (strip->flag & ACTSTRIP_CYCLIC_USEX) pose->cyclic_offset[0] = time * min[0];
+ if (strip->flag & ACTSTRIP_CYCLIC_USEY) pose->cyclic_offset[1] = time * min[1];
+ if (strip->flag & ACTSTRIP_CYCLIC_USEZ) pose->cyclic_offset[2] = time * min[2];
}
else {
- if ( fabs(min[0]) >= fabs(min[1]) && fabs(min[0]) >= fabs(min[2]))
- pose->cyclic_offset[0]= time*min[0];
- else if ( fabs(min[1]) >= fabs(min[0]) && fabs(min[1]) >= fabs(min[2]))
- pose->cyclic_offset[1]= time*min[1];
+ if (fabs(min[0]) >= fabs(min[1]) && fabs(min[0]) >= fabs(min[2]))
+ pose->cyclic_offset[0] = time * min[0];
+ else if (fabs(min[1]) >= fabs(min[0]) && fabs(min[1]) >= fabs(min[2]))
+ pose->cyclic_offset[1] = time * min[1];
else
- pose->cyclic_offset[2]= time*min[2];
+ pose->cyclic_offset[2] = time * min[2];
}
}
}
@@ -1427,13 +1427,13 @@ static Object *get_parent_path(Object *ob)
{
bConstraint *con;
- if (ob->parent && ob->parent->type==OB_CURVE)
+ if (ob->parent && ob->parent->type == OB_CURVE)
return ob->parent;
- for (con = ob->constraints.first; con; con=con->next) {
- if (con->type==CONSTRAINT_TYPE_FOLLOWPATH) {
- if (con->enforce>0.5f) {
- bFollowPathConstraint *data= con->data;
+ for (con = ob->constraints.first; con; con = con->next) {
+ if (con->type == CONSTRAINT_TYPE_FOLLOWPATH) {
+ if (con->enforce > 0.5f) {
+ bFollowPathConstraint *data = con->data;
return data->tar;
}
}
@@ -1447,71 +1447,71 @@ static Object *get_parent_path(Object *ob)
static void do_nla(Scene *scene, Object *ob, int blocktype)
{
- bPose *tpose= NULL;
- Key *key= NULL;
- ListBase tchanbase={NULL, NULL}, chanbase={NULL, NULL};
- bActionStrip *strip, *striplast=NULL, *stripfirst=NULL;
+ bPose *tpose = NULL;
+ Key *key = NULL;
+ ListBase tchanbase = {NULL, NULL}, chanbase = {NULL, NULL};
+ bActionStrip *strip, *striplast = NULL, *stripfirst = NULL;
float striptime, frametime, length, actlength;
float blendfac, stripframe;
- float scene_cfra= BKE_curframe(scene);
- int doit, dostride;
+ float scene_cfra = BKE_scene_frame_get(scene);
+ int doit, dostride;
- if (blocktype==ID_AR) {
- copy_pose(&tpose, ob->pose, 1);
- rest_pose(ob->pose); // potentially destroying current not-keyed pose
+ if (blocktype == ID_AR) {
+ BKE_pose_copy_data(&tpose, ob->pose, 1);
+ BKE_pose_rest(ob->pose); // potentially destroying current not-keyed pose
}
else {
- key= ob_get_key(ob);
+ key = ob_get_key(ob);
}
/* check on extend to left or right, when no strip is hit by 'cfra' */
- for (strip=ob->nlastrips.first; strip; strip=strip->next) {
+ for (strip = ob->nlastrips.first; strip; strip = strip->next) {
/* escape loop on a hit */
- if ( scene_cfra >= strip->start && scene_cfra <= strip->end + 0.1f) /* note 0.1 comes back below */
+ if (scene_cfra >= strip->start && scene_cfra <= strip->end + 0.1f) /* note 0.1 comes back below */
break;
if (scene_cfra < strip->start) {
- if (stripfirst==NULL)
- stripfirst= strip;
+ if (stripfirst == NULL)
+ stripfirst = strip;
else if (stripfirst->start > strip->start)
- stripfirst= strip;
+ stripfirst = strip;
}
else if (scene_cfra > strip->end) {
- if (striplast==NULL)
- striplast= strip;
+ if (striplast == NULL)
+ striplast = strip;
else if (striplast->end < strip->end)
- striplast= strip;
+ striplast = strip;
}
}
- if (strip==NULL) { /* extend */
+ if (strip == NULL) { /* extend */
if (striplast)
- scene_cfra= striplast->end;
+ scene_cfra = striplast->end;
else if (stripfirst)
- scene_cfra= stripfirst->start;
+ scene_cfra = stripfirst->start;
}
/* and now go over all strips */
- for (strip=ob->nlastrips.first; strip; strip=strip->next) {
- doit=dostride= 0;
+ for (strip = ob->nlastrips.first; strip; strip = strip->next) {
+ doit = dostride = 0;
- if (strip->act && !(strip->flag & ACTSTRIP_MUTE)) { /* so theres an action */
+ if (strip->act && !(strip->flag & ACTSTRIP_MUTE)) { /* so theres an action */
/* Determine if the current frame is within the strip's range */
- length = strip->end-strip->start;
- actlength = strip->actend-strip->actstart;
+ length = strip->end - strip->start;
+ actlength = strip->actend - strip->actstart;
striptime = (scene_cfra - strip->start) / length;
stripframe = (scene_cfra - strip->start);
- if (striptime>=0.0) {
+ if (striptime >= 0.0) {
- if (blocktype==ID_AR)
- rest_pose(tpose);
+ if (blocktype == ID_AR)
+ BKE_pose_rest(tpose);
/* To handle repeat, we add 0.1 frame extra to make sure the last frame is included */
- if (striptime < 1.0f + 0.1f/length) {
+ if (striptime < 1.0f + 0.1f / length) {
/* Handle path */
- if ((strip->flag & ACTSTRIP_USESTRIDE) && (blocktype==ID_AR) && (ob->ipoflag & OB_DISABLE_PATH)==0) {
- Object *parent= get_parent_path(ob);
+ if ((strip->flag & ACTSTRIP_USESTRIDE) && (blocktype == ID_AR) && (ob->ipoflag & OB_DISABLE_PATH) == 0) {
+ Object *parent = get_parent_path(ob);
if (parent) {
Curve *cu = parent->data;
@@ -1519,43 +1519,43 @@ static void do_nla(Scene *scene, Object *ob, int blocktype)
if (cu->flag & CU_PATH) {
/* Ensure we have a valid path */
- if (cu->path==NULL || cu->path->data==NULL) makeDispListCurveTypes(scene, parent, 0);
+ if (cu->path == NULL || cu->path->data == NULL) makeDispListCurveTypes(scene, parent, 0);
if (cu->path) {
/* Find the position on the path */
- ctime= bsystem_time(scene, ob, scene_cfra, 0.0);
+ ctime = bsystem_time(scene, ob, scene_cfra, 0.0);
- if (calc_ipo_spec(cu->ipo, CU_SPEED, &ctime)==0) {
+ if (calc_ipo_spec(cu->ipo, CU_SPEED, &ctime) == 0) {
/* correct for actions not starting on zero */
- ctime= (ctime - strip->actstart)/cu->pathlen;
+ ctime = (ctime - strip->actstart) / cu->pathlen;
CLAMP(ctime, 0.0, 1.0);
}
- pdist = ctime*cu->path->totdist;
+ pdist = ctime * cu->path->totdist;
if (tpose && strip->stridechannel[0]) {
- striptime= stridechannel_frame(parent, ob->size[0], strip, cu->path, pdist, tpose->stride_offset);
+ striptime = stridechannel_frame(parent, ob->size[0], strip, cu->path, pdist, tpose->stride_offset);
}
else {
if (strip->stridelen) {
striptime = pdist / strip->stridelen;
- striptime = (float)fmod (striptime+strip->actoffs, 1.0);
+ striptime = (float)fmod(striptime + strip->actoffs, 1.0);
}
else
striptime = 0;
}
frametime = (striptime * actlength) + strip->actstart;
- frametime= bsystem_time(scene, ob, frametime, 0.0);
+ frametime = bsystem_time(scene, ob, frametime, 0.0);
- if (blocktype==ID_AR) {
- extract_pose_from_action (tpose, strip->act, frametime);
+ if (blocktype == ID_AR) {
+ extract_pose_from_action(tpose, strip->act, frametime);
}
- else if (blocktype==ID_OB) {
+ else if (blocktype == ID_OB) {
extract_ipochannels_from_action(&tchanbase, &ob->id, strip->act, "Object", frametime);
if (key)
extract_ipochannels_from_action(&tchanbase, &key->id, strip->act, "Shape", frametime);
}
- doit=dostride= 1;
+ doit = dostride = 1;
}
}
}
@@ -1564,29 +1564,29 @@ static void do_nla(Scene *scene, Object *ob, int blocktype)
else {
/* Mod to repeat */
- if (strip->repeat!=1.0f) {
- float cycle= striptime*strip->repeat;
+ if (strip->repeat != 1.0f) {
+ float cycle = striptime * strip->repeat;
- striptime = (float)fmod (cycle, 1.0f + 0.1f/length);
- cycle-= striptime;
+ striptime = (float)fmod(cycle, 1.0f + 0.1f / length);
+ cycle -= striptime;
- if (blocktype==ID_AR)
+ if (blocktype == ID_AR)
cyclic_offs_bone(ob, tpose, strip, cycle);
}
frametime = (striptime * actlength) + strip->actstart;
- frametime= nla_time(scene, frametime, (float)strip->repeat);
+ frametime = nla_time(scene, frametime, (float)strip->repeat);
- if (blocktype==ID_AR) {
- extract_pose_from_action (tpose, strip->act, frametime);
+ if (blocktype == ID_AR) {
+ extract_pose_from_action(tpose, strip->act, frametime);
}
- else if (blocktype==ID_OB) {
+ else if (blocktype == ID_OB) {
extract_ipochannels_from_action(&tchanbase, &ob->id, strip->act, "Object", frametime);
if (key)
extract_ipochannels_from_action(&tchanbase, &key->id, strip->act, "Shape", frametime);
}
- doit=1;
+ doit = 1;
}
}
/* Handle extend */
@@ -1594,25 +1594,25 @@ static void do_nla(Scene *scene, Object *ob, int blocktype)
if (strip->flag & ACTSTRIP_HOLDLASTFRAME) {
/* we want the strip to hold on the exact fraction of the repeat value */
- frametime = actlength * (strip->repeat-(int)strip->repeat);
- if (frametime<=0.000001f) frametime= actlength; /* rounding errors... */
- frametime= bsystem_time(scene, ob, frametime+strip->actstart, 0.0);
-
- if (blocktype==ID_AR)
- extract_pose_from_action (tpose, strip->act, frametime);
- else if (blocktype==ID_OB) {
+ frametime = actlength * (strip->repeat - (int)strip->repeat);
+ if (frametime <= 0.000001f) frametime = actlength; /* rounding errors... */
+ frametime = bsystem_time(scene, ob, frametime + strip->actstart, 0.0);
+
+ if (blocktype == ID_AR)
+ extract_pose_from_action(tpose, strip->act, frametime);
+ else if (blocktype == ID_OB) {
extract_ipochannels_from_action(&tchanbase, &ob->id, strip->act, "Object", frametime);
if (key)
extract_ipochannels_from_action(&tchanbase, &key->id, strip->act, "Shape", frametime);
}
/* handle cycle hold */
- if (strip->repeat!=1.0f) {
- if (blocktype==ID_AR)
- cyclic_offs_bone(ob, tpose, strip, strip->repeat-1.0f);
+ if (strip->repeat != 1.0f) {
+ if (blocktype == ID_AR)
+ cyclic_offs_bone(ob, tpose, strip, strip->repeat - 1.0f);
}
- doit=1;
+ doit = 1;
}
}
@@ -1620,22 +1620,22 @@ static void do_nla(Scene *scene, Object *ob, int blocktype)
if (doit) {
/* Handle blendin */
- if (strip->blendin>0.0 && stripframe<=strip->blendin && scene_cfra>=strip->start) {
- blendfac = stripframe/strip->blendin;
+ if (strip->blendin > 0.0 && stripframe <= strip->blendin && scene_cfra >= strip->start) {
+ blendfac = stripframe / strip->blendin;
}
- else if (strip->blendout>0.0 && stripframe>=(length-strip->blendout) && scene_cfra<=strip->end) {
- blendfac = (length-stripframe)/(strip->blendout);
+ else if (strip->blendout > 0.0 && stripframe >= (length - strip->blendout) && scene_cfra <= strip->end) {
+ blendfac = (length - stripframe) / (strip->blendout);
}
else
blendfac = 1;
- if (blocktype==ID_AR) {/* Blend this pose with the accumulated pose */
+ if (blocktype == ID_AR) { /* Blend this pose with the accumulated pose */
/* offset bone, for matching cycles */
- blend_pose_offset_bone (strip, ob->pose, tpose, blendfac, strip->mode);
+ blend_pose_offset_bone(strip, ob->pose, tpose, blendfac, strip->mode);
- blend_poses (ob->pose, tpose, blendfac, strip->mode);
+ blend_poses(ob->pose, tpose, blendfac, strip->mode);
if (dostride)
- blend_pose_strides (ob->pose, tpose, blendfac, strip->mode);
+ blend_pose_strides(ob->pose, tpose, blendfac, strip->mode);
}
else {
blend_ipochannels(&chanbase, &tchanbase, blendfac, strip->mode);
@@ -1646,17 +1646,17 @@ static void do_nla(Scene *scene, Object *ob, int blocktype)
}
}
- if (blocktype==ID_OB) {
+ if (blocktype == ID_OB) {
execute_ipochannels(&chanbase);
}
- else if (blocktype==ID_AR) {
+ else if (blocktype == ID_AR) {
/* apply stride offset to object */
add_v3_v3(ob->obmat[3], ob->pose->stride_offset);
}
/* free */
if (tpose)
- free_pose(tpose);
+ BKE_pose_free(tpose);
if (chanbase.first)
BLI_freelistN(&chanbase);
}
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c
index 1ec9f7d8a10..ed6eceb036b 100644
--- a/source/blender/blenkernel/intern/anim.c
+++ b/source/blender/blenkernel/intern/anim.c
@@ -88,23 +88,23 @@ void animviz_settings_init(bAnimVizSettings *avs)
return;
/* ghosting settings */
- avs->ghost_bc= avs->ghost_ac= 10;
+ avs->ghost_bc = avs->ghost_ac = 10;
- avs->ghost_sf= 1; // xxx - take from scene instead?
- avs->ghost_ef= 250; // xxx - take from scene instead?
+ avs->ghost_sf = 1; // xxx - take from scene instead?
+ avs->ghost_ef = 250; // xxx - take from scene instead?
- avs->ghost_step= 1;
+ avs->ghost_step = 1;
/* path settings */
- avs->path_bc= avs->path_ac= 10;
+ avs->path_bc = avs->path_ac = 10;
- avs->path_sf= 1; // xxx - take from scene instead?
- avs->path_ef= 250; // xxx - take from scene instead?
+ avs->path_sf = 1; // xxx - take from scene instead?
+ avs->path_ef = 250; // xxx - take from scene instead?
- avs->path_viewflag= (MOTIONPATH_VIEW_KFRAS|MOTIONPATH_VIEW_KFNOS);
+ avs->path_viewflag = (MOTIONPATH_VIEW_KFRAS | MOTIONPATH_VIEW_KFNOS);
- avs->path_step= 1;
+ avs->path_step = 1;
}
/* ------------------- */
@@ -121,8 +121,8 @@ void animviz_free_motionpath_cache(bMotionPath *mpath)
MEM_freeN(mpath->points);
/* reset the relevant parameters */
- mpath->points= NULL;
- mpath->length= 0;
+ mpath->points = NULL;
+ mpath->length = 0;
}
/* Free the given motion path instance and its data
@@ -144,9 +144,11 @@ void animviz_free_motionpath(bMotionPath *mpath)
/* ------------------- */
/* Setup motion paths for the given data
- * - scene: current scene (for frame ranges, etc.)
- * - ob: object to add paths for (must be provided)
- * - pchan: posechannel to add paths for (optional; if not provided, object-paths are assumed)
+ * - Only used when explicitly calculating paths on bones which may/may not be consider already
+ *
+ * < scene: current scene (for frame ranges, etc.)
+ * < ob: object to add paths for (must be provided)
+ * < pchan: posechannel to add paths for (optional; if not provided, object-paths are assumed)
*/
bMotionPath *animviz_verify_motionpaths(ReportList *reports, Scene *scene, Object *ob, bPoseChannel *pchan)
{
@@ -160,46 +162,57 @@ bMotionPath *animviz_verify_motionpaths(ReportList *reports, Scene *scene, Objec
/* get destination data */
if (pchan) {
/* paths for posechannel - assume that posechannel belongs to the object */
- avs= &ob->pose->avs;
- dst= &pchan->mpath;
+ avs = &ob->pose->avs;
+ dst = &pchan->mpath;
}
else {
/* paths for object */
- avs= &ob->avs;
- dst= &ob->mpath;
+ avs = &ob->avs;
+ dst = &ob->mpath;
}
/* avoid 0 size allocs */
if (avs->path_sf >= avs->path_ef) {
BKE_reportf(reports, RPT_ERROR,
- "Motion Path frame extents invalid for %s (%d to %d).%s\n",
- (pchan)? pchan->name : ob->id.name,
- avs->path_sf, avs->path_ef,
- (avs->path_sf == avs->path_ef)? " Cannot have single-frame paths." : "");
+ "Motion Path frame extents invalid for %s (%d to %d).%s\n",
+ (pchan) ? pchan->name : ob->id.name,
+ avs->path_sf, avs->path_ef,
+ (avs->path_sf == avs->path_ef) ? " Cannot have single-frame paths." : "");
return NULL;
}
/* if there is already a motionpath, just return that,
- * but provided it's settings are ok
+ * provided it's settings are ok (saves extra free+alloc)
*/
if (*dst != NULL) {
- mpath= *dst;
+ int expected_length = avs->path_ef - avs->path_sf;
+
+ mpath = *dst;
- /* if range is not invalid, and/or length is set ok, just return */
- if ((mpath->start_frame != mpath->end_frame) && (mpath->length > 0))
- return mpath;
+ /* path is "valid" if length is valid, but must also be of the same length as is being requested */
+ if ((mpath->start_frame != mpath->end_frame) && (mpath->length > 0)) {
+ /* outer check ensures that we have some curve data for this path */
+ if (mpath->length == expected_length) {
+ /* return/use this as it is already valid length */
+ return mpath;
+ }
+ else {
+ /* clear the existing path (as the range has changed), and reallocate below */
+ animviz_free_motionpath_cache(mpath);
+ }
+ }
}
else {
/* create a new motionpath, and assign it */
- mpath= MEM_callocN(sizeof(bMotionPath), "bMotionPath");
- *dst= mpath;
+ mpath = MEM_callocN(sizeof(bMotionPath), "bMotionPath");
+ *dst = mpath;
}
/* set settings from the viz settings */
- mpath->start_frame= avs->path_sf;
- mpath->end_frame= avs->path_ef;
+ mpath->start_frame = avs->path_sf;
+ mpath->end_frame = avs->path_ef;
- mpath->length= mpath->end_frame - mpath->start_frame;
+ mpath->length = mpath->end_frame - mpath->start_frame;
if (avs->path_bakeflag & MOTIONPATH_BAKE_HEADS)
mpath->flag |= MOTIONPATH_FLAG_BHEAD;
@@ -207,7 +220,7 @@ bMotionPath *animviz_verify_motionpaths(ReportList *reports, Scene *scene, Objec
mpath->flag &= ~MOTIONPATH_FLAG_BHEAD;
/* allocate a cache */
- mpath->points= MEM_callocN(sizeof(bMotionPathVert)*mpath->length, "bMotionPathVerts");
+ mpath->points = MEM_callocN(sizeof(bMotionPathVert) * mpath->length, "bMotionPathVerts");
/* tag viz settings as currently having some path(s) which use it */
avs->path_bakeflag |= MOTIONPATH_BAKE_HAS_PATHS;
@@ -222,16 +235,16 @@ bMotionPath *animviz_verify_motionpaths(ReportList *reports, Scene *scene, Objec
typedef struct MPathTarget {
struct MPathTarget *next, *prev;
- bMotionPath *mpath; /* motion path in question */
+ bMotionPath *mpath; /* motion path in question */
- Object *ob; /* source object */
- bPoseChannel *pchan; /* source posechannel (if applicable) */
+ Object *ob; /* source object */
+ bPoseChannel *pchan; /* source posechannel (if applicable) */
} MPathTarget;
/* ........ */
/* get list of motion paths to be baked for the given object
- * - assumes the given list is ready to be used
+ * - assumes the given list is ready to be used
*/
// TODO: it would be nice in future to be able to update objects dependent on these bones too?
void animviz_get_object_motionpaths(Object *ob, ListBase *targets)
@@ -241,27 +254,27 @@ void animviz_get_object_motionpaths(Object *ob, ListBase *targets)
/* object itself first */
if ((ob->avs.recalc & ANIMVIZ_RECALC_PATHS) && (ob->mpath)) {
/* new target for object */
- mpt= MEM_callocN(sizeof(MPathTarget), "MPathTarget Ob");
+ mpt = MEM_callocN(sizeof(MPathTarget), "MPathTarget Ob");
BLI_addtail(targets, mpt);
- mpt->mpath= ob->mpath;
- mpt->ob= ob;
+ mpt->mpath = ob->mpath;
+ mpt->ob = ob;
}
/* bones */
if ((ob->pose) && (ob->pose->avs.recalc & ANIMVIZ_RECALC_PATHS)) {
- bArmature *arm= ob->data;
+ bArmature *arm = ob->data;
bPoseChannel *pchan;
- for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
+ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
if ((pchan->bone) && (arm->layer & pchan->bone->layer) && (pchan->mpath)) {
/* new target for bone */
- mpt= MEM_callocN(sizeof(MPathTarget), "MPathTarget PoseBone");
+ mpt = MEM_callocN(sizeof(MPathTarget), "MPathTarget PoseBone");
BLI_addtail(targets, mpt);
- mpt->mpath= pchan->mpath;
- mpt->ob= ob;
- mpt->pchan= pchan;
+ mpt->mpath = pchan->mpath;
+ mpt->ob = ob;
+ mpt->pchan = pchan;
}
}
}
@@ -283,12 +296,12 @@ static void motionpaths_calc_optimise_depsgraph(Scene *scene, ListBase *targets)
MPathTarget *mpt;
/* make sure our temp-tag isn't already in use */
- for (base= scene->base.first; base; base= base->next)
+ for (base = scene->base.first; base; base = base->next)
base->object->flag &= ~BA_TEMP_TAG;
/* for each target, dump its object to the start of the list if it wasn't moved already */
- for (mpt= targets->first; mpt; mpt= mpt->next) {
- for (base=scene->base.first; base; base=baseNext) {
+ for (mpt = targets->first; mpt; mpt = mpt->next) {
+ for (base = scene->base.first; base; base = baseNext) {
baseNext = base->next;
if ((base->object == mpt->ob) && !(mpt->ob->flag & BA_TEMP_TAG)) {
@@ -309,7 +322,7 @@ static void motionpaths_calc_optimise_depsgraph(Scene *scene, ListBase *targets)
static void motionpaths_calc_update_scene(Scene *scene)
{
#if 1 // 'production' optimisations always on
- Base *base, *last=NULL;
+ Base *base, *last = NULL;
/* only stuff that moves or needs display still */
DAG_scene_update_flags(G.main, scene, scene->lay, TRUE);
@@ -318,7 +331,7 @@ static void motionpaths_calc_update_scene(Scene *scene)
* - all those afterwards are assumed to not be relevant for our calculations
*/
// optimize further by moving out...
- for (base=scene->base.first; base; base=base->next) {
+ for (base = scene->base.first; base; base = base->next) {
if (base->object->flag & BA_TEMP_TAG)
last = base;
}
@@ -326,21 +339,21 @@ static void motionpaths_calc_update_scene(Scene *scene)
/* perform updates for tagged objects */
// XXX: this will break if rigs depend on scene or other data that
// is animated but not attached to/updatable from objects
- for (base=scene->base.first; base; base=base->next) {
+ for (base = scene->base.first; base; base = base->next) {
/* update this object */
- object_handle_update(scene, base->object);
+ BKE_object_handle_update(scene, base->object);
/* if this is the last one we need to update, let's stop to save some time */
if (base == last)
break;
}
#else // original, 'always correct' version
- /* do all updates
- * - if this is too slow, resort to using a more efficient way
- * that doesn't force complete update, but for now, this is the
- * most accurate way!
- */
- scene_update_for_newframe(G.main, scene, scene->lay); // XXX this is the best way we can get anything moving
+ /* do all updates
+ * - if this is too slow, resort to using a more efficient way
+ * that doesn't force complete update, but for now, this is the
+ * most accurate way!
+ */
+ BKE_scene_update_for_newframe(G.main, scene, scene->lay); // XXX this is the best way we can get anything moving
#endif
}
@@ -352,8 +365,8 @@ static void motionpaths_calc_bake_targets(Scene *scene, ListBase *targets)
MPathTarget *mpt;
/* for each target, check if it can be baked on the current frame */
- for (mpt= targets->first; mpt; mpt= mpt->next) {
- bMotionPath *mpath= mpt->mpath;
+ for (mpt = targets->first; mpt; mpt = mpt->next) {
+ bMotionPath *mpath = mpt->mpath;
bMotionPathVert *mpv;
/* current frame must be within the range the cache works for
@@ -363,7 +376,7 @@ static void motionpaths_calc_bake_targets(Scene *scene, ListBase *targets)
continue;
/* get the relevant cache vert to write to */
- mpv= mpath->points + (CFRA - mpath->start_frame);
+ mpv = mpath->points + (CFRA - mpath->start_frame);
/* pose-channel or object path baking? */
if (mpt->pchan) {
@@ -408,10 +421,10 @@ void animviz_calc_motionpaths(Scene *scene, ListBase *targets)
// TODO: this method could be improved...
// 1) max range for standard baking
// 2) minimum range for recalc baking (i.e. between keyframes, but how?)
- for (mpt= targets->first; mpt; mpt= mpt->next) {
+ for (mpt = targets->first; mpt; mpt = mpt->next) {
/* try to increase area to do (only as much as needed) */
- sfra= MIN2(sfra, mpt->mpath->start_frame);
- efra= MAX2(efra, mpt->mpath->end_frame);
+ sfra = MIN2(sfra, mpt->mpath->start_frame);
+ efra = MAX2(efra, mpt->mpath->end_frame);
}
if (efra <= sfra) return;
@@ -420,7 +433,7 @@ void animviz_calc_motionpaths(Scene *scene, ListBase *targets)
motionpaths_calc_optimise_depsgraph(scene, targets);
/* calculate path over requested range */
- for (CFRA=sfra; CFRA<=efra; CFRA++) {
+ for (CFRA = sfra; CFRA <= efra; CFRA++) {
/* update relevant data for new frame */
motionpaths_calc_update_scene(scene);
@@ -429,18 +442,18 @@ void animviz_calc_motionpaths(Scene *scene, ListBase *targets)
}
/* reset original environment */
- CFRA= cfra;
+ CFRA = cfra;
motionpaths_calc_update_scene(scene);
/* clear recalc flags from targets */
- for (mpt= targets->first; mpt; mpt= mpt->next) {
+ for (mpt = targets->first; mpt; mpt = mpt->next) {
bAnimVizSettings *avs;
/* get pointer to animviz settings for each target */
if (mpt->pchan)
- avs= &mpt->ob->pose->avs;
+ avs = &mpt->ob->pose->avs;
else
- avs= &mpt->ob->avs;
+ avs = &mpt->ob->avs;
/* clear the flag requesting recalculation of targets */
avs->recalc &= ~ANIMVIZ_RECALC_PATHS;
@@ -461,7 +474,7 @@ void free_path(Path *path)
}
/* calculate a curve-deform path for a curve
- * - only called from displist.c -> do_makeDispListCurveTypes
+ * - only called from displist.c -> do_makeDispListCurveTypes
*/
void calc_curvepath(Object *ob)
{
@@ -472,92 +485,92 @@ void calc_curvepath(Object *ob)
Nurb *nu;
Path *path;
float *fp, *dist, *maxdist, xyz[3];
- float fac, d=0, fac1, fac2;
- int a, tot, cycl=0;
+ float fac, d = 0, fac1, fac2;
+ int a, tot, cycl = 0;
ListBase *nurbs;
/* in a path vertices are with equal differences: path->len = number of verts */
/* NOW WITH BEVELCURVE!!! */
- if (ob==NULL || ob->type != OB_CURVE) return;
- cu= ob->data;
+ if (ob == NULL || ob->type != OB_CURVE) return;
+ cu = ob->data;
- nurbs= BKE_curve_nurbs(cu);
- nu= nurbs->first;
+ nurbs = BKE_curve_nurbs_get(cu);
+ nu = nurbs->first;
if (cu->path) free_path(cu->path);
- cu->path= NULL;
+ cu->path = NULL;
- bl= cu->bev.first;
- if (bl==NULL || !bl->nr) return;
+ bl = cu->bev.first;
+ if (bl == NULL || !bl->nr) return;
- cu->path=path= MEM_callocN(sizeof(Path), "calc_curvepath");
+ cu->path = path = MEM_callocN(sizeof(Path), "calc_curvepath");
/* if POLY: last vertice != first vertice */
- cycl= (bl->poly!= -1);
+ cycl = (bl->poly != -1);
- if (cycl) tot= bl->nr;
- else tot= bl->nr-1;
+ if (cycl) tot = bl->nr;
+ else tot = bl->nr - 1;
- path->len= tot+1;
+ path->len = tot + 1;
/* exception: vector handle paths and polygon paths should be subdivided at least a factor resolu */
- if (path->len<nu->resolu*SEGMENTSU(nu)) path->len= nu->resolu*SEGMENTSU(nu);
+ if (path->len < nu->resolu * SEGMENTSU(nu)) path->len = nu->resolu * SEGMENTSU(nu);
- dist= (float *)MEM_mallocN((tot+1)*4, "calcpathdist");
+ dist = (float *)MEM_mallocN((tot + 1) * 4, "calcpathdist");
- /* all lengths in *dist */
- bevp= bevpfirst= (BevPoint *)(bl+1);
- fp= dist;
- *fp= 0;
- for (a=0; a<tot; a++) {
+ /* all lengths in *dist */
+ bevp = bevpfirst = (BevPoint *)(bl + 1);
+ fp = dist;
+ *fp = 0;
+ for (a = 0; a < tot; a++) {
fp++;
- if (cycl && a==tot-1)
+ if (cycl && a == tot - 1)
sub_v3_v3v3(xyz, bevpfirst->vec, bevp->vec);
else
- sub_v3_v3v3(xyz, (bevp+1)->vec, bevp->vec);
+ sub_v3_v3v3(xyz, (bevp + 1)->vec, bevp->vec);
- *fp= *(fp-1)+len_v3(xyz);
+ *fp = *(fp - 1) + len_v3(xyz);
bevp++;
}
- path->totdist= *fp;
+ path->totdist = *fp;
- /* the path verts in path->data */
- /* now also with TILT value */
- pp= path->data = (PathPoint *)MEM_callocN(sizeof(PathPoint)*path->len, "pathdata");
-
- bevp= bevpfirst;
- bevpn= bevp+1;
- bevplast= bevpfirst + (bl->nr-1);
- fp= dist+1;
- maxdist= dist+tot;
- fac= 1.0f/((float)path->len-1.0f);
- fac = fac * path->totdist;
+ /* the path verts in path->data */
+ /* now also with TILT value */
+ pp = path->data = (PathPoint *)MEM_callocN(sizeof(PathPoint) * path->len, "pathdata");
+
+ bevp = bevpfirst;
+ bevpn = bevp + 1;
+ bevplast = bevpfirst + (bl->nr - 1);
+ fp = dist + 1;
+ maxdist = dist + tot;
+ fac = 1.0f / ((float)path->len - 1.0f);
+ fac = fac * path->totdist;
- for (a=0; a<path->len; a++) {
+ for (a = 0; a < path->len; a++) {
- d= ((float)a)*fac;
+ d = ((float)a) * fac;
/* we're looking for location (distance) 'd' in the array */
- while ((d>= *fp) && fp<maxdist) {
+ while ((d >= *fp) && fp < maxdist) {
fp++;
- if (bevp<bevplast) bevp++;
- bevpn= bevp+1;
- if (bevpn>bevplast) {
- if (cycl) bevpn= bevpfirst;
- else bevpn= bevplast;
+ if (bevp < bevplast) bevp++;
+ bevpn = bevp + 1;
+ if (bevpn > bevplast) {
+ if (cycl) bevpn = bevpfirst;
+ else bevpn = bevplast;
}
}
- fac1= *(fp)- *(fp-1);
- fac2= *(fp)-d;
- fac1= fac2/fac1;
- fac2= 1.0f-fac1;
+ fac1 = *(fp) - *(fp - 1);
+ fac2 = *(fp) - d;
+ fac1 = fac2 / fac1;
+ fac2 = 1.0f - fac1;
interp_v3_v3v3(pp->vec, bevp->vec, bevpn->vec, fac2);
- pp->vec[3]= fac1*bevp->alfa + fac2*bevpn->alfa;
- pp->radius= fac1*bevp->radius + fac2*bevpn->radius;
- pp->weight= fac1*bevp->weight + fac2*bevpn->weight;
+ pp->vec[3] = fac1 * bevp->alfa + fac2 * bevpn->alfa;
+ pp->radius = fac1 * bevp->radius + fac2 * bevpn->radius;
+ pp->weight = fac1 * bevp->weight + fac2 * bevpn->weight;
interp_qt_qtqt(pp->quat, bevp->quat, bevpn->quat, fac2);
normalize_qt(pp->quat);
@@ -573,13 +586,13 @@ int interval_test(int min, int max, int p1, int cycl)
{
if (cycl) {
if (p1 < min)
- p1= ((p1 -min) % (max-min+1)) + max+1;
+ p1 = ((p1 - min) % (max - min + 1)) + max + 1;
else if (p1 > max)
- p1= ((p1 -min) % (max-min+1)) + min;
+ p1 = ((p1 - min) % (max - min + 1)) + min;
}
else {
- if (p1 < min) p1= min;
- else if (p1 > max) p1= max;
+ if (p1 < min) p1 = min;
+ else if (p1 > max) p1 = max;
}
return p1;
}
@@ -601,84 +614,84 @@ int where_on_path(Object *ob, float ctime, float vec[4], float dir[3], float qua
PathPoint *pp, *p0, *p1, *p2, *p3;
float fac;
float data[4];
- int cycl=0, s0, s1, s2, s3;
+ int cycl = 0, s0, s1, s2, s3;
- if (ob==NULL || ob->type != OB_CURVE) return 0;
- cu= ob->data;
- if (cu->path==NULL || cu->path->data==NULL) {
+ if (ob == NULL || ob->type != OB_CURVE) return 0;
+ cu = ob->data;
+ if (cu->path == NULL || cu->path->data == NULL) {
printf("no path!\n");
return 0;
}
- path= cu->path;
- pp= path->data;
+ path = cu->path;
+ pp = path->data;
/* test for cyclic */
- bl= cu->bev.first;
+ bl = cu->bev.first;
if (!bl) return 0;
if (!bl->nr) return 0;
- if (bl->poly> -1) cycl= 1;
+ if (bl->poly > -1) cycl = 1;
- ctime *= (path->len-1);
+ ctime *= (path->len - 1);
- s1= (int)floor(ctime);
- fac= (float)(s1+1)-ctime;
+ s1 = (int)floor(ctime);
+ fac = (float)(s1 + 1) - ctime;
/* path->len is corected for cyclic */
- s0= interval_test(0, path->len-1-cycl, s1-1, cycl);
- s1= interval_test(0, path->len-1-cycl, s1, cycl);
- s2= interval_test(0, path->len-1-cycl, s1+1, cycl);
- s3= interval_test(0, path->len-1-cycl, s1+2, cycl);
+ s0 = interval_test(0, path->len - 1 - cycl, s1 - 1, cycl);
+ s1 = interval_test(0, path->len - 1 - cycl, s1, cycl);
+ s2 = interval_test(0, path->len - 1 - cycl, s1 + 1, cycl);
+ s3 = interval_test(0, path->len - 1 - cycl, s1 + 2, cycl);
- p0= pp + s0;
- p1= pp + s1;
- p2= pp + s2;
- p3= pp + s3;
+ p0 = pp + s0;
+ p1 = pp + s1;
+ p2 = pp + s2;
+ p3 = pp + s3;
/* note, commented out for follow constraint */
//if (cu->flag & CU_FOLLOW) {
- key_curve_tangent_weights(1.0f-fac, data, KEY_BSPLINE);
+ key_curve_tangent_weights(1.0f - fac, data, KEY_BSPLINE);
- interp_v3_v3v3v3v3(dir, p0->vec, p1->vec, p2->vec, p3->vec, data);
+ interp_v3_v3v3v3v3(dir, p0->vec, p1->vec, p2->vec, p3->vec, data);
- /* make compatible with vectoquat */
- negate_v3(dir);
+ /* make compatible with vectoquat */
+ negate_v3(dir);
//}
- nu= cu->nurb.first;
+ nu = cu->nurb.first;
/* make sure that first and last frame are included in the vectors here */
- if (nu->type == CU_POLY) key_curve_position_weights(1.0f-fac, data, KEY_LINEAR);
- else if (nu->type == CU_BEZIER) key_curve_position_weights(1.0f-fac, data, KEY_LINEAR);
- else if (s0==s1 || p2==p3) key_curve_position_weights(1.0f-fac, data, KEY_CARDINAL);
- else key_curve_position_weights(1.0f-fac, data, KEY_BSPLINE);
+ if (nu->type == CU_POLY) key_curve_position_weights(1.0f - fac, data, KEY_LINEAR);
+ else if (nu->type == CU_BEZIER) key_curve_position_weights(1.0f - fac, data, KEY_LINEAR);
+ else if (s0 == s1 || p2 == p3) key_curve_position_weights(1.0f - fac, data, KEY_CARDINAL);
+ else key_curve_position_weights(1.0f - fac, data, KEY_BSPLINE);
- vec[0]= data[0]*p0->vec[0] + data[1]*p1->vec[0] + data[2]*p2->vec[0] + data[3]*p3->vec[0] ; /* X */
- vec[1]= data[0]*p0->vec[1] + data[1]*p1->vec[1] + data[2]*p2->vec[1] + data[3]*p3->vec[1] ; /* Y */
- vec[2]= data[0]*p0->vec[2] + data[1]*p1->vec[2] + data[2]*p2->vec[2] + data[3]*p3->vec[2] ; /* Z */
- vec[3]= data[0]*p0->vec[3] + data[1]*p1->vec[3] + data[2]*p2->vec[3] + data[3]*p3->vec[3] ; /* Tilt, should not be needed since we have quat still used */
+ vec[0] = data[0] * p0->vec[0] + data[1] * p1->vec[0] + data[2] * p2->vec[0] + data[3] * p3->vec[0]; /* X */
+ vec[1] = data[0] * p0->vec[1] + data[1] * p1->vec[1] + data[2] * p2->vec[1] + data[3] * p3->vec[1]; /* Y */
+ vec[2] = data[0] * p0->vec[2] + data[1] * p1->vec[2] + data[2] * p2->vec[2] + data[3] * p3->vec[2]; /* Z */
+ vec[3] = data[0] * p0->vec[3] + data[1] * p1->vec[3] + data[2] * p2->vec[3] + data[3] * p3->vec[3]; /* Tilt, should not be needed since we have quat still used */
if (quat) {
float totfac, q1[4], q2[4];
- totfac= data[0]+data[3];
- if (totfac>FLT_EPSILON) interp_qt_qtqt(q1, p0->quat, p3->quat, data[3] / totfac);
- else copy_qt_qt(q1, p1->quat);
+ totfac = data[0] + data[3];
+ if (totfac > FLT_EPSILON) interp_qt_qtqt(q1, p0->quat, p3->quat, data[3] / totfac);
+ else copy_qt_qt(q1, p1->quat);
- totfac= data[1]+data[2];
- if (totfac>FLT_EPSILON) interp_qt_qtqt(q2, p1->quat, p2->quat, data[2] / totfac);
- else copy_qt_qt(q2, p3->quat);
+ totfac = data[1] + data[2];
+ if (totfac > FLT_EPSILON) interp_qt_qtqt(q2, p1->quat, p2->quat, data[2] / totfac);
+ else copy_qt_qt(q2, p3->quat);
- totfac = data[0]+data[1]+data[2]+data[3];
- if (totfac>FLT_EPSILON) interp_qt_qtqt(quat, q1, q2, (data[1]+data[2]) / totfac);
- else copy_qt_qt(quat, q2);
+ totfac = data[0] + data[1] + data[2] + data[3];
+ if (totfac > FLT_EPSILON) interp_qt_qtqt(quat, q1, q2, (data[1] + data[2]) / totfac);
+ else copy_qt_qt(quat, q2);
}
if (radius)
- *radius= data[0]*p0->radius + data[1]*p1->radius + data[2]*p2->radius + data[3]*p3->radius;
+ *radius = data[0] * p0->radius + data[1] * p1->radius + data[2] * p2->radius + data[3] * p3->radius;
if (weight)
- *weight= data[0]*p0->weight + data[1]*p1->weight + data[2]*p2->weight + data[3]*p3->weight;
+ *weight = data[0] * p0->weight + data[1] * p1->weight + data[2] * p2->weight + data[3] * p3->weight;
return 1;
}
@@ -688,17 +701,17 @@ int where_on_path(Object *ob, float ctime, float vec[4], float dir[3], float qua
static DupliObject *new_dupli_object(ListBase *lb, Object *ob, float mat[][4], int lay, int index, int type, int animated)
{
- DupliObject *dob= MEM_callocN(sizeof(DupliObject), "dupliobject");
+ DupliObject *dob = MEM_callocN(sizeof(DupliObject), "dupliobject");
BLI_addtail(lb, dob);
- dob->ob= ob;
+ dob->ob = ob;
copy_m4_m4(dob->mat, mat);
copy_m4_m4(dob->omat, ob->obmat);
- dob->origlay= ob->lay;
- dob->index= index;
- dob->type= type;
- dob->animated= (type == OB_DUPLIGROUP) && animated;
- ob->lay= lay;
+ dob->origlay = ob->lay;
+ dob->index = index;
+ dob->type = type;
+ dob->animated = (type == OB_DUPLIGROUP) && animated;
+ ob->lay = lay;
return dob;
}
@@ -710,20 +723,20 @@ static void group_duplilist(ListBase *lb, Scene *scene, Object *ob, int level, i
GroupObject *go;
float mat[4][4], tmat[4][4];
- if (ob->dup_group==NULL) return;
- group= ob->dup_group;
+ if (ob->dup_group == NULL) return;
+ group = ob->dup_group;
/* simple preventing of too deep nested groups */
- if (level>MAX_DUPLI_RECUR) return;
+ if (level > MAX_DUPLI_RECUR) return;
/* handles animated groups, and */
/* we need to check update for objects that are not in scene... */
group_handle_recalc_and_update(scene, ob, group);
- animated= animated || group_is_animated(ob, group);
+ animated = animated || group_is_animated(ob, group);
- for (go= group->gobject.first; go; go= go->next) {
+ for (go = group->gobject.first; go; go = go->next) {
/* note, if you check on layer here, render goes wrong... it still deforms verts and uses parent imat */
- if (go->ob!=ob) {
+ if (go->ob != ob) {
/* group dupli offset, should apply after everything else */
if (!is_zero_v3(group->dupli_ofs)) {
@@ -735,22 +748,22 @@ static void group_duplilist(ListBase *lb, Scene *scene, Object *ob, int level, i
mult_m4_m4m4(mat, ob->obmat, go->ob->obmat);
}
- dob= new_dupli_object(lb, go->ob, mat, ob->lay, 0, OB_DUPLIGROUP, animated);
+ dob = new_dupli_object(lb, go->ob, mat, ob->lay, 0, OB_DUPLIGROUP, animated);
/* check the group instance and object layers match, also that the object visible flags are ok. */
- if ( (dob->origlay & group->layer)==0 ||
- (G.rendering==0 && dob->ob->restrictflag & OB_RESTRICT_VIEW) ||
- (G.rendering && dob->ob->restrictflag & OB_RESTRICT_RENDER)
- ) {
- dob->no_draw= 1;
+ if ( (dob->origlay & group->layer) == 0 ||
+ (G.rendering == 0 && dob->ob->restrictflag & OB_RESTRICT_VIEW) ||
+ (G.rendering && dob->ob->restrictflag & OB_RESTRICT_RENDER)
+ ) {
+ dob->no_draw = 1;
}
else {
- dob->no_draw= 0;
+ dob->no_draw = 0;
}
if (go->ob->transflag & OB_DUPLI) {
copy_m4_m4(dob->ob->obmat, dob->mat);
- object_duplilist_recursive(&group->id, scene, go->ob, lb, ob->obmat, level+1, animated);
+ object_duplilist_recursive(&group->id, scene, go->ob, lb, ob->obmat, level + 1, animated);
copy_m4_m4(dob->ob->obmat, dob->omat);
}
}
@@ -759,7 +772,7 @@ static void group_duplilist(ListBase *lb, Scene *scene, Object *ob, int level, i
static void frames_duplilist(ListBase *lb, Scene *scene, Object *ob, int level, int animated)
{
- extern int enable_cu_speed; /* object.c */
+ extern int enable_cu_speed; /* object.c */
Object copyob;
int cfrao = scene->r.cfra;
int dupend = ob->dupend;
@@ -770,7 +783,7 @@ static void frames_duplilist(ListBase *lb, Scene *scene, Object *ob, int level,
/* if we don't have any data/settings which will lead to object movement,
* don't waste time trying, as it will all look the same...
*/
- if (ob->parent==NULL && ob->constraints.first==NULL && ob->adt==NULL)
+ if (ob->parent == NULL && ob->constraints.first == NULL && ob->adt == NULL)
return;
/* make a copy of the object's original data (before any dupli-data overwrites it)
@@ -781,18 +794,18 @@ static void frames_duplilist(ListBase *lb, Scene *scene, Object *ob, int level,
copyob = *ob;
/* duplicate over the required range */
- if (ob->transflag & OB_DUPLINOSPEED) enable_cu_speed= 0;
+ if (ob->transflag & OB_DUPLINOSPEED) enable_cu_speed = 0;
- for (scene->r.cfra= ob->dupsta; scene->r.cfra<=dupend; scene->r.cfra++) {
- short ok= 1;
+ for (scene->r.cfra = ob->dupsta; scene->r.cfra <= dupend; scene->r.cfra++) {
+ short ok = 1;
/* - dupoff = how often a frames within the range shouldn't be made into duplis
* - dupon = the length of each "skipping" block in frames
*/
if (ob->dupoff) {
- ok= scene->r.cfra - ob->dupsta;
- ok= ok % (ob->dupon+ob->dupoff);
- ok= (ok < ob->dupon);
+ ok = scene->r.cfra - ob->dupsta;
+ ok = ok % (ob->dupon + ob->dupoff);
+ ok = (ok < ob->dupon);
}
if (ok) {
@@ -803,22 +816,22 @@ static void frames_duplilist(ListBase *lb, Scene *scene, Object *ob, int level,
* However, this has always been the way that this worked (i.e. pre 2.5), so I guess that it'll be fine!
*/
BKE_animsys_evaluate_animdata(scene, &ob->id, ob->adt, (float)scene->r.cfra, ADT_RECALC_ANIM); /* ob-eval will do drivers, so we don't need to do them */
- where_is_object_time(scene, ob, (float)scene->r.cfra);
+ BKE_object_where_is_calc_time(scene, ob, (float)scene->r.cfra);
- dob= new_dupli_object(lb, ob, ob->obmat, ob->lay, scene->r.cfra, OB_DUPLIFRAMES, animated);
+ dob = new_dupli_object(lb, ob, ob->obmat, ob->lay, scene->r.cfra, OB_DUPLIFRAMES, animated);
copy_m4_m4(dob->omat, copyob.obmat);
}
}
- enable_cu_speed= 1;
+ enable_cu_speed = 1;
/* reset frame to original frame, then re-evaluate animation as above
* as 2.5 animation data may have far-reaching consequences
*/
- scene->r.cfra= cfrao;
+ scene->r.cfra = cfrao;
BKE_animsys_evaluate_animdata(scene, &ob->id, ob->adt, (float)scene->r.cfra, ADT_RECALC_ANIM); /* ob-eval will do drivers, so we don't need to do them */
- where_is_object_time(scene, ob, (float)scene->r.cfra);
+ BKE_object_where_is_calc_time(scene, ob, (float)scene->r.cfra);
/* but, to make sure unkeyed object transforms are still sane,
* let's copy object's original data back over
@@ -844,7 +857,7 @@ static void vertex_dupli__mapFunc(void *userData, int index, const float co[3],
const float no_f[3], const short no_s[3])
{
DupliObject *dob;
- vertexDupliData *vdd= userData;
+ vertexDupliData *vdd = userData;
float vec[3], q2[4], mat[3][3], tmat[4][4], obmat[4][4];
int origlay;
@@ -857,22 +870,22 @@ static void vertex_dupli__mapFunc(void *userData, int index, const float co[3],
if (vdd->par->transflag & OB_DUPLIROT) {
if (no_f) {
- vec[0]= -no_f[0]; vec[1]= -no_f[1]; vec[2]= -no_f[2];
+ vec[0] = -no_f[0]; vec[1] = -no_f[1]; vec[2] = -no_f[2];
}
else if (no_s) {
- vec[0]= -no_s[0]; vec[1]= -no_s[1]; vec[2]= -no_s[2];
+ vec[0] = -no_s[0]; vec[1] = -no_s[1]; vec[2] = -no_s[2];
}
- vec_to_quat( q2,vec, vdd->ob->trackflag, vdd->ob->upflag);
+ vec_to_quat(q2, vec, vdd->ob->trackflag, vdd->ob->upflag);
- quat_to_mat3( mat,q2);
+ quat_to_mat3(mat, q2);
copy_m4_m4(tmat, obmat);
mul_m4_m4m3(obmat, tmat, mat);
}
origlay = vdd->ob->lay;
- dob= new_dupli_object(vdd->lb, vdd->ob, obmat, vdd->par->lay, index, OB_DUPLIVERTS, vdd->animated);
+ dob = new_dupli_object(vdd->lb, vdd->ob, obmat, vdd->par->lay, index, OB_DUPLIVERTS, vdd->animated);
/* restore the original layer so that each dupli will have proper dob->origlay */
vdd->ob->lay = origlay;
@@ -884,7 +897,7 @@ static void vertex_dupli__mapFunc(void *userData, int index, const float co[3],
float tmpmat[4][4];
copy_m4_m4(tmpmat, vdd->ob->obmat);
copy_m4_m4(vdd->ob->obmat, obmat); /* pretend we are really this mat */
- object_duplilist_recursive((ID *)vdd->id, vdd->scene, vdd->ob, vdd->lb, obmat, vdd->level+1, vdd->animated);
+ object_duplilist_recursive((ID *)vdd->id, vdd->scene, vdd->ob, vdd->lb, obmat, vdd->level + 1, vdd->animated);
copy_m4_m4(vdd->ob->obmat, tmpmat);
}
}
@@ -892,13 +905,13 @@ static void vertex_dupli__mapFunc(void *userData, int index, const float co[3],
static void vertex_duplilist(ListBase *lb, ID *id, Scene *scene, Object *par, float par_space_mat[][4], int level, int animated)
{
Object *ob, *ob_iter;
- Mesh *me= par->data;
+ Mesh *me = par->data;
Base *base = NULL;
DerivedMesh *dm;
vertexDupliData vdd;
Scene *sce = NULL;
Group *group = NULL;
- GroupObject * go = NULL;
+ GroupObject *go = NULL;
BMEditMesh *em;
float vec[3], no[3], pmat[4][4];
int totvert, a, oblay;
@@ -907,54 +920,54 @@ static void vertex_duplilist(ListBase *lb, ID *id, Scene *scene, Object *par, fl
copy_m4_m4(pmat, par->obmat);
/* simple preventing of too deep nested groups */
- if (level>MAX_DUPLI_RECUR) return;
+ if (level > MAX_DUPLI_RECUR) return;
em = me->edit_btmesh;
if (em) {
- dm= editbmesh_get_derived_cage(scene, par, em, CD_MASK_BAREMESH);
+ dm = editbmesh_get_derived_cage(scene, par, em, CD_MASK_BAREMESH);
}
else
- dm= mesh_get_derived_deform(scene, par, CD_MASK_BAREMESH);
+ dm = mesh_get_derived_deform(scene, par, CD_MASK_BAREMESH);
if (G.rendering) {
- vdd.orco= (float(*)[3])get_mesh_orco_verts(par);
- transform_mesh_orco_verts(me, vdd.orco, me->totvert, 0);
+ vdd.orco = (float(*)[3])BKE_mesh_orco_verts_get(par);
+ BKE_mesh_orco_verts_transform(me, vdd.orco, me->totvert, 0);
}
else
- vdd.orco= NULL;
+ vdd.orco = NULL;
totvert = dm->getNumVerts(dm);
/* having to loop on scene OR group objects is NOT FUN */
if (GS(id->name) == ID_SCE) {
sce = (Scene *)id;
- lay= sce->lay;
- base= sce->base.first;
+ lay = sce->lay;
+ base = sce->base.first;
}
else {
group = (Group *)id;
- lay= group->layer;
+ lay = group->layer;
go = group->gobject.first;
}
/* Start looping on Scene OR Group objects */
while (base || go) {
if (sce) {
- ob_iter= base->object;
+ ob_iter = base->object;
oblay = base->lay;
}
else {
- ob_iter= go->ob;
+ ob_iter = go->ob;
oblay = ob_iter->lay;
}
- if (lay & oblay && scene->obedit!=ob_iter) {
- ob=ob_iter->parent;
+ if (lay & oblay && scene->obedit != ob_iter) {
+ ob = ob_iter->parent;
while (ob) {
- if (ob==par) {
+ if (ob == par) {
ob = ob_iter;
- /* End Scene/Group object loop, below is generic */
+ /* End Scene/Group object loop, below is generic */
/* par_space_mat - only used for groups so we can modify the space dupli's are in
@@ -965,23 +978,23 @@ static void vertex_duplilist(ListBase *lb, ID *id, Scene *scene, Object *par, fl
else
copy_m4_m4(vdd.obmat, ob->obmat);
- vdd.id= id;
- vdd.level= level;
- vdd.animated= animated;
- vdd.lb= lb;
- vdd.ob= ob;
- vdd.scene= scene;
- vdd.par= par;
+ vdd.id = id;
+ vdd.level = level;
+ vdd.animated = animated;
+ vdd.lb = lb;
+ vdd.ob = ob;
+ vdd.scene = scene;
+ vdd.par = par;
copy_m4_m4(vdd.pmat, pmat);
/* mballs have a different dupli handling */
- if (ob->type!=OB_MBALL) ob->flag |= OB_DONE; /* doesnt render */
+ if (ob->type != OB_MBALL) ob->flag |= OB_DONE; /* doesnt render */
if (me->edit_btmesh) {
- dm->foreachMappedVert(dm, vertex_dupli__mapFunc, (void*) &vdd);
+ dm->foreachMappedVert(dm, vertex_dupli__mapFunc, (void *) &vdd);
}
else {
- for (a=0; a<totvert; a++) {
+ for (a = 0; a < totvert; a++) {
dm->getVertCo(dm, a, vec);
dm->getVertNo(dm, a, no);
@@ -999,11 +1012,11 @@ static void vertex_duplilist(ListBase *lb, ID *id, Scene *scene, Object *par, fl
break;
}
- ob= ob->parent;
+ ob = ob->parent;
}
}
- if (sce) base= base->next; /* scene loop */
- else go= go->next; /* group loop */
+ if (sce) base = base->next; /* scene loop */
+ else go = go->next; /* group loop */
}
if (vdd.orco)
@@ -1017,7 +1030,7 @@ static void face_duplilist(ListBase *lb, ID *id, Scene *scene, Object *par, floa
Base *base = NULL;
DupliObject *dob;
DerivedMesh *dm;
- Mesh *me= par->data;
+ Mesh *me = par->data;
MLoopUV *mloopuv;
MPoly *mpoly, *mp;
MLoop *mloop;
@@ -1031,63 +1044,63 @@ static void face_duplilist(ListBase *lb, ID *id, Scene *scene, Object *par, floa
float ob__obmat[4][4]; /* needed for groups where the object matrix needs to be modified */
/* simple preventing of too deep nested groups */
- if (level>MAX_DUPLI_RECUR) return;
+ if (level > MAX_DUPLI_RECUR) return;
copy_m4_m4(pmat, par->obmat);
em = me->edit_btmesh;
if (em) {
- dm= editbmesh_get_derived_cage(scene, par, em, CD_MASK_BAREMESH);
+ dm = editbmesh_get_derived_cage(scene, par, em, CD_MASK_BAREMESH);
}
else {
dm = mesh_get_derived_deform(scene, par, CD_MASK_BAREMESH);
}
- totface= dm->getNumPolys(dm);
- mpoly= dm->getPolyArray(dm);
- mloop= dm->getLoopArray(dm);
- mvert= dm->getVertArray(dm);
+ totface = dm->getNumPolys(dm);
+ mpoly = dm->getPolyArray(dm);
+ mloop = dm->getLoopArray(dm);
+ mvert = dm->getVertArray(dm);
if (G.rendering) {
- orco= (float(*)[3])get_mesh_orco_verts(par);
- transform_mesh_orco_verts(me, orco, me->totvert, 0);
- mloopuv= me->mloopuv;
+ orco = (float(*)[3])BKE_mesh_orco_verts_get(par);
+ BKE_mesh_orco_verts_transform(me, orco, me->totvert, 0);
+ mloopuv = me->mloopuv;
}
else {
- orco= NULL;
- mloopuv= NULL;
+ orco = NULL;
+ mloopuv = NULL;
}
/* having to loop on scene OR group objects is NOT FUN */
if (GS(id->name) == ID_SCE) {
sce = (Scene *)id;
- lay= sce->lay;
- base= sce->base.first;
+ lay = sce->lay;
+ base = sce->base.first;
}
else {
group = (Group *)id;
- lay= group->layer;
+ lay = group->layer;
go = group->gobject.first;
}
/* Start looping on Scene OR Group objects */
while (base || go) {
if (sce) {
- ob_iter= base->object;
+ ob_iter = base->object;
oblay = base->lay;
}
else {
- ob_iter= go->ob;
+ ob_iter = go->ob;
oblay = ob_iter->lay;
}
- if (lay & oblay && scene->obedit!=ob_iter) {
- ob=ob_iter->parent;
+ if (lay & oblay && scene->obedit != ob_iter) {
+ ob = ob_iter->parent;
while (ob) {
- if (ob==par) {
+ if (ob == par) {
ob = ob_iter;
- /* End Scene/Group object loop, below is generic */
+ /* End Scene/Group object loop, below is generic */
/* par_space_mat - only used for groups so we can modify the space dupli's are in
* when par_space_mat is NULL ob->obmat can be used instead of ob__obmat
@@ -1100,9 +1113,9 @@ static void face_duplilist(ListBase *lb, ID *id, Scene *scene, Object *par, floa
copy_m3_m4(imat, ob->parentinv);
/* mballs have a different dupli handling */
- if (ob->type!=OB_MBALL) ob->flag |= OB_DONE; /* doesnt render */
+ if (ob->type != OB_MBALL) ob->flag |= OB_DONE; /* doesnt render */
- for (a=0, mp= mpoly; a<totface; a++, mp++) {
+ for (a = 0, mp = mpoly; a < totface; a++, mp++) {
int mv1;
int mv2;
int mv3;
@@ -1112,25 +1125,25 @@ static void face_duplilist(ListBase *lb, ID *id, Scene *scene, Object *par, floa
float *v3;
/* float *v4; */ /* UNUSED */
float cent[3], quat[4], mat[3][3], mat3[3][3], tmat[4][4], obmat[4][4];
- MLoop *loopstart= mloop + mp->loopstart;
+ MLoop *loopstart = mloop + mp->loopstart;
if (mp->totloop < 3) {
/* highly unlikely but to be safe */
continue;
}
else {
- v1= mvert[(mv1= loopstart[0].v)].co;
- v2= mvert[(mv2= loopstart[1].v)].co;
- v3= mvert[(mv3= loopstart[2].v)].co;
+ v1 = mvert[(mv1 = loopstart[0].v)].co;
+ v2 = mvert[(mv2 = loopstart[1].v)].co;
+ v3 = mvert[(mv3 = loopstart[2].v)].co;
#if 0
if (mp->totloop > 3) {
- v4= mvert[(mv4= loopstart[3].v)].co;
+ v4 = mvert[(mv4 = loopstart[3].v)].co;
}
#endif
}
/* translation */
- mesh_calc_poly_center(mp, loopstart, mvert, cent);
+ BKE_mesh_calc_poly_center(mp, loopstart, mvert, cent);
mul_m4_v3(pmat, cent);
@@ -1142,13 +1155,13 @@ static void face_duplilist(ListBase *lb, ID *id, Scene *scene, Object *par, floa
copy_v3_v3(obmat[3], cent);
/* rotation */
- tri_to_quat( quat,v1, v2, v3);
- quat_to_mat3( mat,quat);
+ tri_to_quat(quat, v1, v2, v3);
+ quat_to_mat3(mat, quat);
/* scale */
if (par->transflag & OB_DUPLIFACES_SCALE) {
- float size= mesh_calc_poly_area(mp, loopstart, mvert, NULL);
- size= sqrtf(size) * par->dupfacesca;
+ float size = BKE_mesh_calc_poly_area(mp, loopstart, mvert, NULL);
+ size = sqrtf(size) * par->dupfacesca;
mul_m3_fl(mat, size);
}
@@ -1158,9 +1171,9 @@ static void face_duplilist(ListBase *lb, ID *id, Scene *scene, Object *par, floa
copy_m4_m4(tmat, obmat);
mul_m4_m4m3(obmat, tmat, mat);
- dob= new_dupli_object(lb, ob, obmat, par->lay, a, OB_DUPLIFACES, animated);
+ dob = new_dupli_object(lb, ob, obmat, par->lay, a, OB_DUPLIFACES, animated);
if (G.rendering) {
- w= 1.0f / (float)mp->totloop;
+ w = 1.0f / (float)mp->totloop;
if (orco) {
int j;
@@ -1181,18 +1194,18 @@ static void face_duplilist(ListBase *lb, ID *id, Scene *scene, Object *par, floa
float tmpmat[4][4];
copy_m4_m4(tmpmat, ob->obmat);
copy_m4_m4(ob->obmat, obmat); /* pretend we are really this mat */
- object_duplilist_recursive((ID *)id, scene, ob, lb, ob->obmat, level+1, animated);
+ object_duplilist_recursive((ID *)id, scene, ob, lb, ob->obmat, level + 1, animated);
copy_m4_m4(ob->obmat, tmpmat);
}
}
break;
}
- ob= ob->parent;
+ ob = ob->parent;
}
}
- if (sce) base= base->next; /* scene loop */
- else go= go->next; /* group loop */
+ if (sce) base = base->next; /* scene loop */
+ else go = go->next; /* group loop */
}
if (orco)
@@ -1204,30 +1217,30 @@ static void face_duplilist(ListBase *lb, ID *id, Scene *scene, Object *par, floa
static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *par, float par_space_mat[][4], ParticleSystem *psys, int level, int animated)
{
GroupObject *go;
- Object *ob=NULL, **oblist=NULL, obcopy, *obcopylist=NULL;
+ Object *ob = NULL, **oblist = NULL, obcopy, *obcopylist = NULL;
DupliObject *dob;
ParticleDupliWeight *dw;
ParticleSettings *part;
ParticleData *pa;
- ChildParticle *cpa=NULL;
+ ChildParticle *cpa = NULL;
ParticleKey state;
ParticleCacheKey *cache;
float ctime, pa_time, scale = 1.0f;
- float tmat[4][4], mat[4][4], pamat[4][4], vec[3], size=0.0;
+ float tmat[4][4], mat[4][4], pamat[4][4], vec[3], size = 0.0;
float (*obmat)[4], (*oldobmat)[4];
int a, b, counter, hair = 0;
- int totpart, totchild, totgroup=0 /*, pa_num */;
+ int totpart, totchild, totgroup = 0 /*, pa_num */;
int no_draw_flag = PARS_UNEXIST;
- if (psys==NULL) return;
+ if (psys == NULL) return;
/* simple preventing of too deep nested groups */
- if (level>MAX_DUPLI_RECUR) return;
+ if (level > MAX_DUPLI_RECUR) return;
- part=psys->part;
+ part = psys->part;
- if (part==NULL)
+ if (part == NULL)
return;
if (!psys_check_enabled(par, psys))
@@ -1236,19 +1249,19 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
if (G.rendering == 0)
no_draw_flag |= PARS_NO_DISP;
- ctime = BKE_curframe(scene); /* NOTE: in old animsys, used parent object's timeoffset... */
+ ctime = BKE_scene_frame_get(scene); /* NOTE: in old animsys, used parent object's timeoffset... */
totpart = psys->totpart;
totchild = psys->totchild;
BLI_srandom(31415926 + psys->seed);
- if ((psys->renderdata || part->draw_as==PART_DRAW_REND) && ELEM(part->ren_as, PART_DRAW_OB, PART_DRAW_GR)) {
- ParticleSimulationData sim= {NULL};
- sim.scene= scene;
- sim.ob= par;
- sim.psys= psys;
- sim.psmd= psys_get_modifier(par, psys);
+ if ((psys->renderdata || part->draw_as == PART_DRAW_REND) && ELEM(part->ren_as, PART_DRAW_OB, PART_DRAW_GR)) {
+ ParticleSimulationData sim = {NULL};
+ sim.scene = scene;
+ sim.ob = par;
+ sim.psys = psys;
+ sim.psmd = psys_get_modifier(par, psys);
/* make sure emitter imat is in global coordinates instead of render view coordinates */
invert_m4_m4(par->imat, par->obmat);
@@ -1261,7 +1274,7 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
if (part->dup_group == NULL || part->dup_group->gobject.first == NULL)
return;
- for (go=part->dup_group->gobject.first; go; go=go->next)
+ for (go = part->dup_group->gobject.first; go; go = go->next)
if (go->ob == par)
return;
}
@@ -1269,7 +1282,7 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
/* if we have a hair particle system, use the path cache */
if (part->type == PART_HAIR) {
if (psys->flag & PSYS_HAIR_DONE)
- hair= (totchild == 0 || psys->childcache) && psys->pathcache;
+ hair = (totchild == 0 || psys->childcache) && psys->pathcache;
if (!hair)
return;
@@ -1283,29 +1296,29 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
psys->lattice = psys_get_lattice(&sim);
/* gather list of objects or single object */
- if (part->ren_as==PART_DRAW_GR) {
+ if (part->ren_as == PART_DRAW_GR) {
group_handle_recalc_and_update(scene, par, part->dup_group);
if (part->draw & PART_DRAW_COUNT_GR) {
- for (dw=part->dupliweights.first; dw; dw=dw->next)
+ for (dw = part->dupliweights.first; dw; dw = dw->next)
totgroup += dw->count;
}
else {
- for (go=part->dup_group->gobject.first; go; go=go->next)
+ for (go = part->dup_group->gobject.first; go; go = go->next)
totgroup++;
}
/* we also copy the actual objects to restore afterwards, since
- * where_is_object_time will change the object which breaks transform */
- oblist = MEM_callocN(totgroup*sizeof(Object *), "dupgroup object list");
- obcopylist = MEM_callocN(totgroup*sizeof(Object), "dupgroup copy list");
+ * BKE_object_where_is_calc_time will change the object which breaks transform */
+ oblist = MEM_callocN(totgroup * sizeof(Object *), "dupgroup object list");
+ obcopylist = MEM_callocN(totgroup * sizeof(Object), "dupgroup copy list");
if (part->draw & PART_DRAW_COUNT_GR && totgroup) {
dw = part->dupliweights.first;
- for (a=0; a<totgroup; dw=dw->next) {
- for (b=0; b<dw->count; b++, a++) {
+ for (a = 0; a < totgroup; dw = dw->next) {
+ for (b = 0; b < dw->count; b++, a++) {
oblist[a] = dw->ob;
obcopylist[a] = *dw->ob;
}
@@ -1313,7 +1326,7 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
}
else {
go = part->dup_group->gobject.first;
- for (a=0; a<totgroup; a++, go=go->next) {
+ for (a = 0; a < totgroup; a++, go = go->next) {
oblist[a] = go->ob;
obcopylist[a] = *go->ob;
}
@@ -1324,13 +1337,13 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
obcopy = *ob;
}
- if (totchild==0 || part->draw & PART_DRAW_PARENT)
+ if (totchild == 0 || part->draw & PART_DRAW_PARENT)
a = 0;
else
a = totpart;
- for (pa=psys->particles,counter=0; a<totpart+totchild; a++,pa++,counter++) {
- if (a<totpart) {
+ for (pa = psys->particles, counter = 0; a < totpart + totchild; a++, pa++, counter++) {
+ if (a < totpart) {
/* handle parent particle */
if (pa->flag & no_draw_flag)
continue;
@@ -1350,28 +1363,30 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
/* some hair paths might be non-existent so they can't be used for duplication */
if (hair &&
- ((a < totpart && psys->pathcache[a]->steps < 0) ||
- (a >= totpart && psys->childcache[a-totpart]->steps < 0)))
+ ((a < totpart && psys->pathcache[a]->steps < 0) ||
+ (a >= totpart && psys->childcache[a - totpart]->steps < 0)))
+ {
continue;
+ }
- if (part->ren_as==PART_DRAW_GR) {
+ if (part->ren_as == PART_DRAW_GR) {
/* prevent divide by zero below [#28336] */
if (totgroup == 0)
continue;
/* for groups, pick the object based on settings */
- if (part->draw&PART_DRAW_RAND_GR)
- b= BLI_rand() % totgroup;
+ if (part->draw & PART_DRAW_RAND_GR)
+ b = BLI_rand() % totgroup;
else
- b= a % totgroup;
+ b = a % totgroup;
ob = oblist[b];
obmat = oblist[b]->obmat;
oldobmat = obcopylist[b].obmat;
}
else {
- obmat= ob->obmat;
- oldobmat= obcopy.obmat;
+ obmat = ob->obmat;
+ oldobmat = obcopy.obmat;
}
if (hair) {
@@ -1381,12 +1396,12 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
psys_get_dupli_path_transform(&sim, pa, NULL, cache, pamat, &scale);
}
else {
- cache = psys->childcache[a-totpart];
+ cache = psys->childcache[a - totpart];
psys_get_dupli_path_transform(&sim, NULL, cpa, cache, pamat, &scale);
}
copy_v3_v3(pamat[3], cache->co);
- pamat[3][3]= 1.0f;
+ pamat[3][3] = 1.0f;
}
else {
@@ -1400,17 +1415,17 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
normalize_qt_qt(tquat, state.rot);
quat_to_mat4(pamat, tquat);
copy_v3_v3(pamat[3], state.co);
- pamat[3][3]= 1.0f;
+ pamat[3][3] = 1.0f;
}
}
- if (part->ren_as==PART_DRAW_GR && psys->part->draw & PART_DRAW_WHOLE_GR) {
- for (go= part->dup_group->gobject.first, b=0; go; go= go->next, b++) {
+ if (part->ren_as == PART_DRAW_GR && psys->part->draw & PART_DRAW_WHOLE_GR) {
+ for (go = part->dup_group->gobject.first, b = 0; go; go = go->next, b++) {
copy_m4_m4(tmat, oblist[b]->obmat);
/* apply particle scale */
- mul_mat3_m4_fl(tmat, size*scale);
- mul_v3_fl(tmat[3], size*scale);
+ mul_mat3_m4_fl(tmat, size * scale);
+ mul_v3_fl(tmat[3], size * scale);
/* group dupli offset, should apply after everything else */
if (!is_zero_v3(part->dup_group->dupli_ofs))
sub_v3_v3v3(tmat[3], tmat[3], part->dup_group->dupli_ofs);
@@ -1422,7 +1437,7 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
else
copy_m4_m4(mat, tmat);
- dob= new_dupli_object(lb, go->ob, mat, par->lay, counter, OB_DUPLIPARTS, animated);
+ dob = new_dupli_object(lb, go->ob, mat, par->lay, counter, OB_DUPLIPARTS, animated);
copy_m4_m4(dob->omat, obcopylist[b].obmat);
if (G.rendering)
psys_get_dupli_texture(psys, part, sim.psmd, pa, cpa, dob->uv, dob->orco);
@@ -1430,7 +1445,7 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
}
else {
/* to give ipos in object correct offset */
- where_is_object_time(scene, ob, ctime-pa_time);
+ BKE_object_where_is_calc_time(scene, ob, ctime - pa_time);
copy_v3_v3(vec, obmat[3]);
obmat[3][0] = obmat[3][1] = obmat[3][2] = 0.0f;
@@ -1442,7 +1457,7 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
xvec[1] = xvec[2] = 0;
vec_to_quat(q, xvec, ob->trackflag, ob->upflag);
quat_to_mat4(obmat, q);
- obmat[3][3]= 1.0f;
+ obmat[3][3] = 1.0f;
}
/* Normal particles and cached hair live in global space so we need to
@@ -1454,7 +1469,7 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
copy_m4_m4(mat, pamat);
mult_m4_m4m4(tmat, mat, obmat);
- mul_mat3_m4_fl(tmat, size*scale);
+ mul_mat3_m4_fl(tmat, size * scale);
if (par_space_mat)
mult_m4_m4m4(mat, par_space_mat, tmat);
@@ -1464,20 +1479,20 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
if (part->draw & PART_DRAW_GLOBAL_OB)
add_v3_v3v3(mat[3], mat[3], vec);
- dob= new_dupli_object(lb, ob, mat, ob->lay, counter, GS(id->name) == ID_GR ? OB_DUPLIGROUP : OB_DUPLIPARTS, animated);
+ dob = new_dupli_object(lb, ob, mat, ob->lay, counter, GS(id->name) == ID_GR ? OB_DUPLIGROUP : OB_DUPLIPARTS, animated);
copy_m4_m4(dob->omat, oldobmat);
if (G.rendering)
psys_get_dupli_texture(psys, part, sim.psmd, pa, cpa, dob->uv, dob->orco);
}
}
- /* restore objects since they were changed in where_is_object_time */
- if (part->ren_as==PART_DRAW_GR) {
- for (a=0; a<totgroup; a++)
- *(oblist[a])= obcopylist[a];
+ /* restore objects since they were changed in BKE_object_where_is_calc_time */
+ if (part->ren_as == PART_DRAW_GR) {
+ for (a = 0; a < totgroup; a++)
+ *(oblist[a]) = obcopylist[a];
}
else
- *ob= obcopy;
+ *ob = obcopy;
}
/* clean up */
@@ -1497,19 +1512,19 @@ static Object *find_family_object(Object **obar, char *family, char ch)
Object *ob;
int flen;
- if ( obar[(int)ch] ) return obar[(int)ch];
+ if (obar[(int)ch]) return obar[(int)ch];
- flen= strlen(family);
+ flen = strlen(family);
- ob= G.main->object.first;
+ ob = G.main->object.first;
while (ob) {
- if ( ob->id.name[flen+2]==ch ) {
- if ( strncmp(ob->id.name+2, family, flen)==0 ) break;
+ if (ob->id.name[flen + 2] == ch) {
+ if (strncmp(ob->id.name + 2, family, flen) == 0) break;
}
- ob= ob->id.next;
+ ob = ob->id.next;
}
- obar[(int)ch]= ob;
+ obar[(int)ch] = ob;
return ob;
}
@@ -1517,37 +1532,37 @@ static Object *find_family_object(Object **obar, char *family, char ch)
static void font_duplilist(ListBase *lb, Scene *scene, Object *par, int level, int animated)
{
- Object *ob, *obar[256]= {NULL};
+ Object *ob, *obar[256] = {NULL};
Curve *cu;
struct chartrans *ct, *chartransdata;
float vec[3], obmat[4][4], pmat[4][4], fsize, xof, yof;
int slen, a;
/* simple preventing of too deep nested groups */
- if (level>MAX_DUPLI_RECUR) return;
+ if (level > MAX_DUPLI_RECUR) return;
copy_m4_m4(pmat, par->obmat);
/* in par the family name is stored, use this to find the other objects */
- chartransdata= BKE_text_to_curve(G.main, scene, par, FO_DUPLI);
- if (chartransdata==NULL) return;
+ chartransdata = BKE_vfont_to_curve(G.main, scene, par, FO_DUPLI);
+ if (chartransdata == NULL) return;
- cu= par->data;
- slen= strlen(cu->str);
- fsize= cu->fsize;
- xof= cu->xof;
- yof= cu->yof;
+ cu = par->data;
+ slen = strlen(cu->str);
+ fsize = cu->fsize;
+ xof = cu->xof;
+ yof = cu->yof;
- ct= chartransdata;
+ ct = chartransdata;
- for (a=0; a<slen; a++, ct++) {
+ for (a = 0; a < slen; a++, ct++) {
- ob= find_family_object(obar, cu->family, cu->str[a]);
+ ob = find_family_object(obar, cu->family, cu->str[a]);
if (ob) {
- vec[0]= fsize*(ct->xof - xof);
- vec[1]= fsize*(ct->yof - yof);
- vec[2]= 0.0;
+ vec[0] = fsize * (ct->xof - xof);
+ vec[1] = fsize * (ct->yof - yof);
+ vec[2] = 0.0;
mul_m4_v3(pmat, vec);
@@ -1565,7 +1580,7 @@ static void font_duplilist(ListBase *lb, Scene *scene, Object *par, int level, i
static void object_duplilist_recursive(ID *id, Scene *scene, Object *ob, ListBase *duplilist, float par_space_mat[][4], int level, int animated)
{
- if ((ob->transflag & OB_DUPLI)==0)
+ if ((ob->transflag & OB_DUPLI) == 0)
return;
/* Should the dupli's be generated for this object? - Respect restrict flags */
@@ -1582,35 +1597,35 @@ static void object_duplilist_recursive(ID *id, Scene *scene, Object *ob, ListBas
if (ob->transflag & OB_DUPLIPARTS) {
ParticleSystem *psys = ob->particlesystem.first;
- for (; psys; psys=psys->next)
- new_particle_duplilist(duplilist, id, scene, ob, par_space_mat, psys, level+1, animated);
+ for (; psys; psys = psys->next)
+ new_particle_duplilist(duplilist, id, scene, ob, par_space_mat, psys, level + 1, animated);
}
else if (ob->transflag & OB_DUPLIVERTS) {
- if (ob->type==OB_MESH) {
- vertex_duplilist(duplilist, id, scene, ob, par_space_mat, level+1, animated);
+ if (ob->type == OB_MESH) {
+ vertex_duplilist(duplilist, id, scene, ob, par_space_mat, level + 1, animated);
}
- else if (ob->type==OB_FONT) {
- if (GS(id->name)==ID_SCE) { /* TODO - support dupligroups */
- font_duplilist(duplilist, scene, ob, level+1, animated);
+ else if (ob->type == OB_FONT) {
+ if (GS(id->name) == ID_SCE) { /* TODO - support dupligroups */
+ font_duplilist(duplilist, scene, ob, level + 1, animated);
}
}
}
else if (ob->transflag & OB_DUPLIFACES) {
- if (ob->type==OB_MESH)
- face_duplilist(duplilist, id, scene, ob, par_space_mat, level+1, animated);
+ if (ob->type == OB_MESH)
+ face_duplilist(duplilist, id, scene, ob, par_space_mat, level + 1, animated);
}
else if (ob->transflag & OB_DUPLIFRAMES) {
- if (GS(id->name)==ID_SCE) { /* TODO - support dupligroups */
- frames_duplilist(duplilist, scene, ob, level+1, animated);
+ if (GS(id->name) == ID_SCE) { /* TODO - support dupligroups */
+ frames_duplilist(duplilist, scene, ob, level + 1, animated);
}
}
else if (ob->transflag & OB_DUPLIGROUP) {
DupliObject *dob;
- group_duplilist(duplilist, scene, ob, level+1, animated); /* now recursive */
+ group_duplilist(duplilist, scene, ob, level + 1, animated); /* now recursive */
- if (level==0) {
- for (dob= duplilist->first; dob; dob= dob->next)
+ if (level == 0) {
+ for (dob = duplilist->first; dob; dob = dob->next)
if (dob->type == OB_DUPLIGROUP)
copy_m4_m4(dob->ob->obmat, dob->mat);
}
@@ -1621,8 +1636,8 @@ static void object_duplilist_recursive(ID *id, Scene *scene, Object *ob, ListBas
* note; group dupli's already set transform matrix. see note in group_duplilist() */
ListBase *object_duplilist(Scene *sce, Object *ob)
{
- ListBase *duplilist= MEM_mallocN(sizeof(ListBase), "duplilist");
- duplilist->first= duplilist->last= NULL;
+ ListBase *duplilist = MEM_mallocN(sizeof(ListBase), "duplilist");
+ duplilist->first = duplilist->last = NULL;
object_duplilist_recursive((ID *)sce, sce, ob, duplilist, NULL, 0, 0);
return duplilist;
}
@@ -1634,8 +1649,8 @@ void free_object_duplilist(ListBase *lb)
/* loop in reverse order, if object is instanced multiple times
* the original layer may not really be original otherwise, proper
* solution is more complicated */
- for (dob= lb->last; dob; dob= dob->prev) {
- dob->ob->lay= dob->origlay;
+ for (dob = lb->last; dob; dob = dob->prev) {
+ dob->ob->lay = dob->origlay;
copy_m4_m4(dob->ob->obmat, dob->omat);
}
@@ -1647,16 +1662,16 @@ int count_duplilist(Object *ob)
{
if (ob->transflag & OB_DUPLI) {
if (ob->transflag & OB_DUPLIVERTS) {
- if (ob->type==OB_MESH) {
+ if (ob->type == OB_MESH) {
if (ob->transflag & OB_DUPLIVERTS) {
ParticleSystem *psys = ob->particlesystem.first;
- int pdup=0;
+ int pdup = 0;
- for (; psys; psys=psys->next)
+ for (; psys; psys = psys->next)
pdup += psys->totpart;
- if (pdup==0) {
- Mesh *me= ob->data;
+ if (pdup == 0) {
+ Mesh *me = ob->data;
return me->totvert;
}
else
@@ -1665,9 +1680,9 @@ int count_duplilist(Object *ob)
}
}
else if (ob->transflag & OB_DUPLIFRAMES) {
- int tot= ob->dupend - ob->dupsta;
- tot/= (ob->dupon+ob->dupoff);
- return tot*ob->dupon;
+ int tot = ob->dupend - ob->dupsta;
+ tot /= (ob->dupon + ob->dupoff);
+ return tot * ob->dupon;
}
}
return 1;
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index fc58799eb18..de70ffcaaef 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -71,7 +71,7 @@
/* Getter/Setter -------------------------------------------- */
/* Check if ID can have AnimData */
-short id_type_can_have_animdata (ID *id)
+short id_type_can_have_animdata(ID *id)
{
/* sanity check */
if (id == NULL)
@@ -152,7 +152,7 @@ AnimData *BKE_id_add_animdata (ID *id)
/* Action Setter --------------------------------------- */
/* Called when user tries to change the active action of an AnimData block (via RNA, Outliner, etc.) */
-short BKE_animdata_set_action (ReportList *reports, ID *id, bAction *act)
+short BKE_animdata_set_action(ReportList *reports, ID *id, bAction *act)
{
AnimData *adt = BKE_animdata_from_id(id);
short ok = 0;
@@ -205,7 +205,7 @@ short BKE_animdata_set_action (ReportList *reports, ID *id, bAction *act)
/* Freeing -------------------------------------------- */
/* Free AnimData used by the nominated ID-block, and clear ID-block's AnimData pointer */
-void BKE_free_animdata (ID *id)
+void BKE_free_animdata(ID *id)
{
/* Only some ID-blocks have this info for now, so we cast the
* types that do to be of type IdAdtTemplate
@@ -253,8 +253,8 @@ AnimData *BKE_copy_animdata (AnimData *adt, const short do_action)
/* make a copy of action - at worst, user has to delete copies... */
if (do_action) {
- dadt->action= copy_action(adt->action);
- dadt->tmpact= copy_action(adt->tmpact);
+ dadt->action= BKE_action_copy(adt->action);
+ dadt->tmpact= BKE_action_copy(adt->tmpact);
}
else {
id_us_plus((ID *)dadt->action);
@@ -274,7 +274,7 @@ AnimData *BKE_copy_animdata (AnimData *adt, const short do_action)
return dadt;
}
-int BKE_copy_animdata_id (ID *id_to, ID *id_from, const short do_action)
+int BKE_copy_animdata_id(ID *id_to, ID *id_from, const short do_action)
{
AnimData *adt;
@@ -298,11 +298,11 @@ void BKE_copy_animdata_id_action(ID *id)
if (adt) {
if (adt->action) {
id_us_min((ID *)adt->action);
- adt->action= copy_action(adt->action);
+ adt->action= BKE_action_copy(adt->action);
}
if (adt->tmpact) {
id_us_min((ID *)adt->tmpact);
- adt->tmpact= copy_action(adt->tmpact);
+ adt->tmpact= BKE_action_copy(adt->tmpact);
}
}
}
@@ -314,8 +314,8 @@ static void make_local_strips(ListBase *strips)
NlaStrip *strip;
for (strip=strips->first; strip; strip=strip->next) {
- if (strip->act) make_local_action(strip->act);
- if (strip->remap && strip->remap->target) make_local_action(strip->remap->target);
+ if (strip->act) BKE_action_make_local(strip->act);
+ if (strip->remap && strip->remap->target) BKE_action_make_local(strip->remap->target);
make_local_strips(&strip->strips);
}
@@ -327,10 +327,10 @@ void BKE_animdata_make_local(AnimData *adt)
NlaTrack *nlt;
/* Actions - Active and Temp */
- if (adt->action) make_local_action(adt->action);
- if (adt->tmpact) make_local_action(adt->tmpact);
+ if (adt->action) BKE_action_make_local(adt->action);
+ if (adt->tmpact) BKE_action_make_local(adt->tmpact);
/* Remaps */
- if (adt->remap && adt->remap->target) make_local_action(adt->remap->target);
+ if (adt->remap && adt->remap->target) BKE_action_make_local(adt->remap->target);
/* Drivers */
// TODO: need to remap the ID-targets too?
@@ -344,7 +344,7 @@ void BKE_animdata_make_local(AnimData *adt)
/* When duplicating data (i.e. objects), drivers referring to the original data will
* get updated to point to the duplicated data (if drivers belong to the new data)
*/
-void BKE_relink_animdata (AnimData *adt)
+void BKE_relink_animdata(AnimData *adt)
{
/* sanity check */
if (adt == NULL)
@@ -393,7 +393,7 @@ static short animpath_matches_basepath (const char path[], const char basepath[]
* - This is used when data moves from one datablock to another, causing the
* F-Curves to need to be moved over too
*/
-void action_move_fcurves_by_basepath (bAction *srcAct, bAction *dstAct, const char basepath[])
+void action_move_fcurves_by_basepath(bAction *srcAct, bAction *dstAct, const char basepath[])
{
FCurve *fcu, *fcn=NULL;
@@ -425,7 +425,7 @@ void action_move_fcurves_by_basepath (bAction *srcAct, bAction *dstAct, const ch
/* if grouped... */
if (fcu->grp) {
/* make sure there will be a matching group on the other side for the migrants */
- agrp = action_groups_find_named(dstAct, fcu->grp->name);
+ agrp = BKE_action_group_find_name(dstAct, fcu->grp->name);
if (agrp == NULL) {
/* add a new one with a similar name (usually will be the same though) */
@@ -473,7 +473,7 @@ void action_move_fcurves_by_basepath (bAction *srcAct, bAction *dstAct, const ch
* animation data is based off "basepath", creating new AnimData and
* associated data as necessary
*/
-void BKE_animdata_separate_by_basepath (ID *srcID, ID *dstID, ListBase *basepaths)
+void BKE_animdata_separate_by_basepath(ID *srcID, ID *dstID, ListBase *basepaths)
{
AnimData *srcAdt=NULL, *dstAdt=NULL;
LinkData *ld;
@@ -735,7 +735,7 @@ void BKE_animdata_fix_paths_rename(ID *owner_id, AnimData *adt, ID *ref_id, cons
/* Whole Database Ops -------------------------------------------- */
/* apply the given callback function on all data in main database */
-void BKE_animdata_main_cb (Main *mainptr, ID_AnimData_Edit_Callback func, void *user_data)
+void BKE_animdata_main_cb(Main *mainptr, ID_AnimData_Edit_Callback func, void *user_data)
{
ID *id;
@@ -1028,7 +1028,7 @@ KS_Path *BKE_keyingset_add_path (KeyingSet *ks, ID *id, const char group_name[],
}
/* Free the given Keying Set path */
-void BKE_keyingset_free_path (KeyingSet *ks, KS_Path *ksp)
+void BKE_keyingset_free_path(KeyingSet *ks, KS_Path *ksp)
{
/* sanity check */
if (ELEM(NULL, ks, ksp))
@@ -1043,7 +1043,7 @@ void BKE_keyingset_free_path (KeyingSet *ks, KS_Path *ksp)
}
/* Copy all KeyingSets in the given list */
-void BKE_keyingsets_copy (ListBase *newlist, ListBase *list)
+void BKE_keyingsets_copy(ListBase *newlist, ListBase *list)
{
KeyingSet *ksn;
KS_Path *kspn;
@@ -1061,7 +1061,7 @@ void BKE_keyingsets_copy (ListBase *newlist, ListBase *list)
/* Freeing Tools --------------------------- */
/* Free data for KeyingSet but not set itself */
-void BKE_keyingset_free (KeyingSet *ks)
+void BKE_keyingset_free(KeyingSet *ks)
{
KS_Path *ksp, *kspn;
@@ -1077,7 +1077,7 @@ void BKE_keyingset_free (KeyingSet *ks)
}
/* Free all the KeyingSets in the given list */
-void BKE_keyingsets_free (ListBase *list)
+void BKE_keyingsets_free(ListBase *list)
{
KeyingSet *ks, *ksn;
@@ -1250,8 +1250,7 @@ static void animsys_evaluate_fcurves (PointerRNA *ptr, ListBase *list, AnimMappe
FCurve *fcu;
/* calculate then execute each curve */
- for (fcu= list->first; fcu; fcu= fcu->next)
- {
+ for (fcu= list->first; fcu; fcu= fcu->next) {
/* check if this F-Curve doesn't belong to a muted group */
if ((fcu->grp == NULL) || (fcu->grp->flag & AGRP_MUTED)==0) {
/* check if this curve should be skipped */
@@ -1274,8 +1273,7 @@ static void animsys_evaluate_drivers (PointerRNA *ptr, AnimData *adt, float ctim
/* drivers are stored as F-Curves, but we cannot use the standard code, as we need to check if
* the depsgraph requested that this driver be evaluated...
*/
- for (fcu= adt->drivers.first; fcu; fcu= fcu->next)
- {
+ for (fcu= adt->drivers.first; fcu; fcu= fcu->next) {
ChannelDriver *driver= fcu->driver;
short ok= 0;
@@ -1336,7 +1334,7 @@ static void action_idcode_patch_check (ID *id, bAction *act)
/* ----------------------------------------- */
/* Evaluate Action Group */
-void animsys_evaluate_action_group (PointerRNA *ptr, bAction *act, bActionGroup *agrp, AnimMapper *remap, float ctime)
+void animsys_evaluate_action_group(PointerRNA *ptr, bAction *act, bActionGroup *agrp, AnimMapper *remap, float ctime)
{
FCurve *fcu;
@@ -1351,8 +1349,7 @@ void animsys_evaluate_action_group (PointerRNA *ptr, bAction *act, bActionGroup
return;
/* calculate then execute each curve */
- for (fcu= agrp->channels.first; (fcu) && (fcu->grp == agrp); fcu= fcu->next)
- {
+ for (fcu= agrp->channels.first; (fcu) && (fcu->grp == agrp); fcu= fcu->next) {
/* check if this curve should be skipped */
if ((fcu->flag & (FCURVE_MUTED|FCURVE_DISABLED)) == 0) {
calculate_fcurve(fcu, ctime);
@@ -1362,7 +1359,7 @@ void animsys_evaluate_action_group (PointerRNA *ptr, bAction *act, bActionGroup
}
/* Evaluate Action (F-Curve Bag) */
-void animsys_evaluate_action (PointerRNA *ptr, bAction *act, AnimMapper *remap, float ctime)
+void animsys_evaluate_action(PointerRNA *ptr, bAction *act, AnimMapper *remap, float ctime)
{
/* check if mapper is appropriate for use here (we set to NULL if it's inappropriate) */
if (act == NULL) return;
@@ -1919,7 +1916,7 @@ static void nlastrip_evaluate_meta (PointerRNA *ptr, ListBase *channels, ListBas
}
/* evaluates the given evaluation strip */
-void nlastrip_evaluate (PointerRNA *ptr, ListBase *channels, ListBase *modifiers, NlaEvalStrip *nes)
+void nlastrip_evaluate(PointerRNA *ptr, ListBase *channels, ListBase *modifiers, NlaEvalStrip *nes)
{
NlaStrip *strip= nes->strip;
@@ -1952,7 +1949,7 @@ void nlastrip_evaluate (PointerRNA *ptr, ListBase *channels, ListBase *modifiers
}
/* write the accumulated settings to */
-void nladata_flush_channels (ListBase *channels)
+void nladata_flush_channels(ListBase *channels)
{
NlaEvalChannel *nec;
@@ -1968,8 +1965,7 @@ void nladata_flush_channels (ListBase *channels)
float value= nec->value;
/* write values - see animsys_write_rna_setting() to sync the code */
- switch (RNA_property_type(prop))
- {
+ switch (RNA_property_type(prop)) {
case PROP_BOOLEAN:
if (RNA_property_array_length(ptr, prop))
RNA_property_boolean_set_index(ptr, prop, array_index, ANIMSYS_FLOAT_AS_BOOL(value));
@@ -2039,8 +2035,10 @@ static void animsys_evaluate_nla (ListBase *echannels, PointerRNA *ptr, AnimData
/* add 'active' Action (may be tweaking track) as last strip to evaluate in NLA stack
* - only do this if we're not exclusively evaluating the 'solo' NLA-track
+ * - however, if the 'solo' track houses the current 'tweaking' strip,
+ * then we should allow this to play, otherwise nothing happens
*/
- if ((adt->action) && !(adt->flag & ADT_NLA_SOLO_TRACK)) {
+ if ((adt->action) && ((adt->flag & ADT_NLA_SOLO_TRACK)==0 || (adt->flag & ADT_NLA_EDIT_ON))) {
/* if there are strips, evaluate action as per NLA rules */
if ((has_strips) || (adt->actstrip)) {
/* make dummy NLA strip, and add that to the stack */
@@ -2171,7 +2169,7 @@ static void animsys_evaluate_overrides (PointerRNA *ptr, AnimData *adt)
*
* Current Status:
* - Currently (as of September 2009), overrides we haven't needed to (fully) implement overrides.
- * However, the code fo this is relatively harmless, so is left in the code for now.
+ * However, the code for this is relatively harmless, so is left in the code for now.
*/
/* Evaluation loop for evaluation animation data
@@ -2180,7 +2178,7 @@ static void animsys_evaluate_overrides (PointerRNA *ptr, AnimData *adt)
* and that the flags for which parts of the anim-data settings need to be recalculated
* have been set already by the depsgraph. Now, we use the recalc
*/
-void BKE_animsys_evaluate_animdata (Scene *scene, ID *id, AnimData *adt, float ctime, short recalc)
+void BKE_animsys_evaluate_animdata(Scene *scene, ID *id, AnimData *adt, float ctime, short recalc)
{
PointerRNA id_ptr;
@@ -2217,7 +2215,9 @@ void BKE_animsys_evaluate_animdata (Scene *scene, ID *id, AnimData *adt, float c
* or be layered on top of existing animation data.
* - Drivers should be in the appropriate order to be evaluated without problems...
*/
- if ((recalc & ADT_RECALC_DRIVERS) /*&& (adt->recalc & ADT_RECALC_DRIVERS)*/) // XXX for now, don't check yet, as depsgraph hasn't been updated
+ if ((recalc & ADT_RECALC_DRIVERS)
+ /* XXX for now, don't check yet, as depsgraph hasn't been updated */
+ /* && (adt->recalc & ADT_RECALC_DRIVERS)*/)
{
animsys_evaluate_drivers(&id_ptr, adt, ctime);
}
@@ -2248,7 +2248,7 @@ void BKE_animsys_evaluate_animdata (Scene *scene, ID *id, AnimData *adt, float c
* 'local' (i.e. belonging in the nearest ID-block that setting is related to, not a
* standard 'root') block are overridden by a larger 'user'
*/
-void BKE_animsys_evaluate_all_animation (Main *main, Scene *scene, float ctime)
+void BKE_animsys_evaluate_all_animation(Main *main, Scene *scene, float ctime)
{
ID *id;
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index 0f3e27a9b6e..09b295aabf1 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -75,25 +75,25 @@
/* **************** Generic Functions, data level *************** */
-bArmature *add_armature(const char *name)
+bArmature *BKE_armature_add(const char *name)
{
bArmature *arm;
- arm = alloc_libblock (&G.main->armature, ID_AR, name);
- arm->deformflag = ARM_DEF_VGROUP|ARM_DEF_ENVELOPE;
+ arm = BKE_libblock_alloc(&G.main->armature, ID_AR, name);
+ arm->deformflag = ARM_DEF_VGROUP | ARM_DEF_ENVELOPE;
arm->flag = ARM_COL_CUSTOM; /* custom bone-group colors */
arm->layer = 1;
return arm;
}
-bArmature *get_armature(Object *ob)
+bArmature *BKE_armature_from_object(Object *ob)
{
if (ob->type == OB_ARMATURE)
return (bArmature *)ob->data;
return NULL;
}
-void free_bonelist(ListBase *lb)
+void BKE_armature_bonelist_free(ListBase *lb)
{
Bone *bone;
@@ -102,16 +102,16 @@ void free_bonelist(ListBase *lb)
IDP_FreeProperty(bone->prop);
MEM_freeN(bone->prop);
}
- free_bonelist(&bone->childbase);
+ BKE_armature_bonelist_free(&bone->childbase);
}
BLI_freelistN(lb);
}
-void free_armature(bArmature *arm)
+void BKE_armature_free(bArmature *arm)
{
if (arm) {
- free_bonelist(&arm->bonebase);
+ BKE_armature_bonelist_free(&arm->bonebase);
/* free editmode data */
if (arm->edbo) {
@@ -135,7 +135,7 @@ void free_armature(bArmature *arm)
}
}
-void make_local_armature(bArmature *arm)
+void BKE_armature_make_local(bArmature *arm)
{
Main *bmain = G.main;
int is_local = FALSE, is_lib = FALSE;
@@ -161,7 +161,7 @@ void make_local_armature(bArmature *arm)
id_clear_lib_data(bmain, &arm->id);
}
else if (is_local && is_lib) {
- bArmature *arm_new = copy_armature(arm);
+ bArmature *arm_new = BKE_armature_copy(arm);
arm_new->id.us = 0;
/* Remap paths of new ID using old library as base. */
@@ -179,7 +179,7 @@ void make_local_armature(bArmature *arm)
}
}
-static void copy_bonechildren(Bone* newBone, Bone* oldBone, Bone* actBone, Bone **newActBone)
+static void copy_bonechildren(Bone *newBone, Bone *oldBone, Bone *actBone, Bone **newActBone)
{
Bone *curBone, *newChildBone;
@@ -201,13 +201,13 @@ static void copy_bonechildren(Bone* newBone, Bone* oldBone, Bone* actBone, Bone
}
}
-bArmature *copy_armature(bArmature *arm)
+bArmature *BKE_armature_copy(bArmature *arm)
{
bArmature *newArm;
Bone *oldBone, *newBone;
- Bone *newActBone= NULL;
+ Bone *newActBone = NULL;
- newArm = copy_libblock(&arm->id);
+ newArm = BKE_libblock_copy(&arm->id);
BLI_duplicatelist(&newArm->bonebase, &arm->bonebase);
/* Duplicate the childrens' lists*/
@@ -245,7 +245,7 @@ static Bone *get_named_bone_bonechildren(Bone *bone, const char *name)
/* Walk the list until the bone is found */
-Bone *get_named_bone(bArmature *arm, const char *name)
+Bone *BKE_armature_find_bone_name(bArmature *arm, const char *name)
{
Bone *bone = NULL, *curBone;
@@ -340,27 +340,27 @@ int bone_autoside_name(char name[MAXBONENAME], int UNUSED(strip_number), short a
while (change) { /* remove extensions */
change = 0;
- if (len > 2 && basename[len-2] == '.') {
- if (basename[len-1] == 'L' || basename[len-1] == 'R') { /* L R */
- basename[len-2] = '\0';
+ if (len > 2 && basename[len - 2] == '.') {
+ if (basename[len - 1] == 'L' || basename[len - 1] == 'R') { /* L R */
+ basename[len - 2] = '\0';
len -= 2;
change = 1;
}
}
- else if (len > 3 && basename[len-3] == '.') {
- if ((basename[len-2] == 'F' && basename[len-1] == 'r') || /* Fr */
- (basename[len-2] == 'B' && basename[len-1] == 'k')) /* Bk */
+ else if (len > 3 && basename[len - 3] == '.') {
+ if ((basename[len - 2] == 'F' && basename[len - 1] == 'r') || /* Fr */
+ (basename[len - 2] == 'B' && basename[len - 1] == 'k')) /* Bk */
{
- basename[len-3] = '\0';
+ basename[len - 3] = '\0';
len -= 3;
change = 1;
}
}
- else if (len > 4 && basename[len-4] == '.') {
- if ((basename[len-3] == 'T' && basename[len-2] == 'o' && basename[len-1] == 'p') || /* Top */
- (basename[len-3] == 'B' && basename[len-2] == 'o' && basename[len-1] == 't')) /* Bot */
+ else if (len > 4 && basename[len - 4] == '.') {
+ if ((basename[len - 3] == 'T' && basename[len - 2] == 'o' && basename[len - 1] == 'p') || /* Top */
+ (basename[len - 3] == 'B' && basename[len - 2] == 'o' && basename[len - 1] == 't')) /* Bot */
{
- basename[len-4] = '\0';
+ basename[len - 4] = '\0';
len -= 4;
change = 1;
}
@@ -368,7 +368,7 @@ int bone_autoside_name(char name[MAXBONENAME], int UNUSED(strip_number), short a
}
if ((MAXBONENAME - len) < strlen(extension) + 1) { /* add 1 for the '.' */
- strncpy(name, basename, len-strlen(extension));
+ strncpy(name, basename, len - strlen(extension));
}
BLI_snprintf(name, MAXBONENAME, "%s.%s", basename, extension);
@@ -382,44 +382,44 @@ int bone_autoside_name(char name[MAXBONENAME], int UNUSED(strip_number), short a
/* ************* B-Bone support ******************* */
-#define MAX_BBONE_SUBDIV 32
+#define MAX_BBONE_SUBDIV 32
/* data has MAX_BBONE_SUBDIV+1 interpolated points, will become desired amount with equal distances */
static void equalize_bezier(float *data, int desired)
{
float *fp, totdist, ddist, dist, fac1, fac2;
- float pdist[MAX_BBONE_SUBDIV+1];
- float temp[MAX_BBONE_SUBDIV+1][4];
+ float pdist[MAX_BBONE_SUBDIV + 1];
+ float temp[MAX_BBONE_SUBDIV + 1][4];
int a, nr;
pdist[0] = 0.0f;
for (a = 0, fp = data; a < MAX_BBONE_SUBDIV; a++, fp += 4) {
copy_qt_qt(temp[a], fp);
- pdist[a+1] = pdist[a] + len_v3v3(fp, fp+4);
+ pdist[a + 1] = pdist[a] + len_v3v3(fp, fp + 4);
}
/* do last point */
copy_qt_qt(temp[a], fp);
totdist = pdist[a];
/* go over distances and calculate new points */
- ddist = totdist/((float)desired);
+ ddist = totdist / ((float)desired);
nr = 1;
- for (a = 1, fp = data+4; a < desired; a++, fp += 4) {
- dist = ((float)a)*ddist;
+ for (a = 1, fp = data + 4; a < desired; a++, fp += 4) {
+ dist = ((float)a) * ddist;
/* we're looking for location (distance) 'dist' in the array */
while ((dist >= pdist[nr]) && nr < MAX_BBONE_SUBDIV)
nr++;
- fac1 = pdist[nr] - pdist[nr-1];
+ fac1 = pdist[nr] - pdist[nr - 1];
fac2 = pdist[nr] - dist;
fac1 = fac2 / fac1;
fac2 = 1.0f - fac1;
- fp[0] = fac1*temp[nr-1][0] + fac2*temp[nr][0];
- fp[1] = fac1*temp[nr-1][1] + fac2*temp[nr][1];
- fp[2] = fac1*temp[nr-1][2] + fac2*temp[nr][2];
- fp[3] = fac1*temp[nr-1][3] + fac2*temp[nr][3];
+ fp[0] = fac1 * temp[nr - 1][0] + fac2 * temp[nr][0];
+ fp[1] = fac1 * temp[nr - 1][1] + fac2 * temp[nr][1];
+ fp[2] = fac1 * temp[nr - 1][2] + fac2 * temp[nr][2];
+ fp[3] = fac1 * temp[nr - 1][3] + fac2 * temp[nr][3];
}
/* set last point, needed for orientation calculus */
copy_qt_qt(fp, temp[MAX_BBONE_SUBDIV]);
@@ -436,7 +436,7 @@ Mat4 *b_bone_spline_setup(bPoseChannel *pchan, int rest)
Bone *bone = pchan->bone;
float h1[3], h2[3], scale[3], length, hlength1, hlength2, roll1 = 0.0f, roll2;
float mat3[3][3], imat[4][4], posemat[4][4], scalemat[4][4], iscalemat[4][4];
- float data[MAX_BBONE_SUBDIV+1][4], *fp;
+ float data[MAX_BBONE_SUBDIV + 1][4], *fp;
int a, doscale = 0;
length = bone->length;
@@ -459,8 +459,8 @@ Mat4 *b_bone_spline_setup(bPoseChannel *pchan, int rest)
}
}
- hlength1 = bone->ease1*length*0.390464f; /* 0.5*sqrt(2)*kappa, the handle length for near-perfect circles */
- hlength2 = bone->ease2*length*0.390464f;
+ hlength1 = bone->ease1 * length * 0.390464f; /* 0.5*sqrt(2)*kappa, the handle length for near-perfect circles */
+ hlength2 = bone->ease2 * length * 0.390464f;
/* evaluate next and prev bones */
if (bone->flag & BONE_CONNECTED)
@@ -471,7 +471,7 @@ Mat4 *b_bone_spline_setup(bPoseChannel *pchan, int rest)
next = pchan->child;
/* find the handle points, since this is inside bone space, the
- * first point = (0,0,0)
+ * first point = (0, 0, 0)
* last point = (0, length, 0) */
if (rest) {
invert_m4_m4(imat, pchan->bone->arm_mat);
@@ -494,7 +494,7 @@ Mat4 *b_bone_spline_setup(bPoseChannel *pchan, int rest)
copy_v3_v3(h1, prev->pose_head);
mul_m4_v3(imat, h1);
- if (prev->bone->segments>1) {
+ if (prev->bone->segments > 1) {
/* if previous bone is B-bone too, use average handle direction */
h1[1] -= length;
roll1 = 0.0f;
@@ -534,10 +534,10 @@ Mat4 *b_bone_spline_setup(bPoseChannel *pchan, int rest)
mul_m4_v3(imat, h2);
/* if next bone is B-bone too, use average handle direction */
- if (next->bone->segments>1)
+ if (next->bone->segments > 1)
;
else
- h2[1]-= length;
+ h2[1] -= length;
normalize_v3(h2);
/* find the next roll to interpolate as well */
@@ -566,20 +566,20 @@ Mat4 *b_bone_spline_setup(bPoseChannel *pchan, int rest)
if (bone->segments > MAX_BBONE_SUBDIV)
bone->segments = MAX_BBONE_SUBDIV;
- forward_diff_bezier(0.0, h1[0], h2[0], 0.0, data[0],
+ BKE_curve_forward_diff_bezier(0.0, h1[0], h2[0], 0.0, data[0],
MAX_BBONE_SUBDIV, 4*sizeof(float));
- forward_diff_bezier(0.0, h1[1], length + h2[1], length, data[0]+1,
+ BKE_curve_forward_diff_bezier(0.0, h1[1], length + h2[1], length, data[0]+1,
MAX_BBONE_SUBDIV, 4*sizeof(float));
- forward_diff_bezier(0.0, h1[2], h2[2], 0.0, data[0]+2,
+ BKE_curve_forward_diff_bezier(0.0, h1[2], h2[2], 0.0, data[0]+2,
MAX_BBONE_SUBDIV, 4*sizeof(float));
- forward_diff_bezier(roll1, roll1 + 0.390464f*(roll2-roll1), roll2 - 0.390464f*(roll2-roll1), roll2, data[0]+3,
+ BKE_curve_forward_diff_bezier(roll1, roll1 + 0.390464f*(roll2-roll1), roll2 - 0.390464f*(roll2-roll1), roll2, data[0]+3,
MAX_BBONE_SUBDIV, 4*sizeof(float));
equalize_bezier(data[0], bone->segments); /* note: does stride 4! */
/* make transformation matrices for the segments for drawing */
for (a = 0, fp = data[0]; a < bone->segments; a++, fp += 4) {
- sub_v3_v3v3(h1, fp+4, fp);
+ sub_v3_v3v3(h1, fp + 4, fp);
vec_roll_to_mat3(h1, fp[3], mat3); /* fp[3] is roll */
copy_m4_m3(result_array[a].mat, mat3);
@@ -613,11 +613,11 @@ static void pchan_b_bone_defmats(bPoseChannel *pchan, bPoseChanDeform *pdef_info
int a;
/* allocate b_bone matrices and dual quats */
- b_bone_mats = MEM_mallocN((1+bone->segments)*sizeof(Mat4), "BBone defmats");
+ b_bone_mats = MEM_mallocN((1 + bone->segments) * sizeof(Mat4), "BBone defmats");
pdef_info->b_bone_mats = b_bone_mats;
if (use_quaternion) {
- b_bone_dual_quats = MEM_mallocN((bone->segments)*sizeof(DualQuat), "BBone dqs");
+ b_bone_dual_quats = MEM_mallocN((bone->segments) * sizeof(DualQuat), "BBone dqs");
pdef_info->b_bone_dual_quats = b_bone_dual_quats;
}
@@ -634,11 +634,11 @@ static void pchan_b_bone_defmats(bPoseChannel *pchan, bPoseChanDeform *pdef_info
for (a = 0; a < bone->segments; a++) {
invert_m4_m4(tmat, b_bone_rest[a].mat);
- mul_serie_m4(b_bone_mats[a+1].mat, pchan->chan_mat, bone->arm_mat, b_bone[a].mat, tmat, b_bone_mats[0].mat,
+ mul_serie_m4(b_bone_mats[a + 1].mat, pchan->chan_mat, bone->arm_mat, b_bone[a].mat, tmat, b_bone_mats[0].mat,
NULL, NULL, NULL);
if (use_quaternion)
- mat4_to_dquat(&b_bone_dual_quats[a], bone->arm_mat, b_bone_mats[a+1].mat);
+ mat4_to_dquat(&b_bone_dual_quats[a], bone->arm_mat, b_bone_mats[a + 1].mat);
}
}
@@ -650,24 +650,24 @@ static void b_bone_deform(bPoseChanDeform *pdef_info, Bone *bone, float co[3], D
int a;
/* need to transform co back to bonespace, only need y */
- y = mat[0][1]*co[0] + mat[1][1]*co[1] + mat[2][1]*co[2] + mat[3][1];
+ y = mat[0][1] * co[0] + mat[1][1] * co[1] + mat[2][1] * co[2] + mat[3][1];
/* now calculate which of the b_bones are deforming this */
- segment = bone->length/((float)bone->segments);
- a = (int)(y/segment);
+ segment = bone->length / ((float)bone->segments);
+ a = (int)(y / segment);
/* note; by clamping it extends deform at endpoints, goes best with
* straight joints in restpos. */
- CLAMP(a, 0, bone->segments-1);
+ CLAMP(a, 0, bone->segments - 1);
if (dq) {
copy_dq_dq(dq, &(pdef_info->b_bone_dual_quats)[a]);
}
else {
- mul_m4_v3(b_bone[a+1].mat, co);
+ mul_m4_v3(b_bone[a + 1].mat, co);
if (defmat) {
- copy_m3_m4(defmat, b_bone[a+1].mat);
+ copy_m3_m4(defmat, b_bone[a + 1].mat);
}
}
}
@@ -699,27 +699,27 @@ float distfactor_to_bone(const float vec[3], const float b1[3], const float b2[3
rad = rad2;
}
else {
- dist = (hsqr - (a*a));
+ dist = (hsqr - (a * a));
if (l != 0.0f) {
- rad = a/l;
- rad = rad*rad2 + (1.0f-rad)*rad1;
+ rad = a / l;
+ rad = rad * rad2 + (1.0f - rad) * rad1;
}
else
rad = rad1;
}
- a = rad*rad;
+ a = rad * rad;
if (dist < a)
return 1.0f;
else {
- l = rad+rdist;
+ l = rad + rdist;
l *= l;
if (rdist == 0.0f || dist >= l)
return 0.0f;
else {
- a = sqrtf(dist)-rad;
- return 1.0f-( a*a )/( rdist*rdist );
+ a = sqrtf(dist) - rad;
+ return 1.0f - (a * a) / (rdist * rdist);
}
}
}
@@ -796,15 +796,15 @@ static void pchan_bone_deform(bPoseChannel *pchan, bPoseChanDeform *pdef_info, f
copy_v3_v3(cop, co);
if (vec) {
- if (pchan->bone->segments>1)
+ if (pchan->bone->segments > 1)
/* applies on cop and bbonemat */
b_bone_deform(pdef_info, pchan->bone, cop, NULL, (mat) ? bbonemat : NULL);
else
mul_m4_v3(pchan->chan_mat, cop);
- vec[0] += (cop[0]-co[0])*weight;
- vec[1] += (cop[1]-co[1])*weight;
- vec[2] += (cop[2]-co[2])*weight;
+ vec[0] += (cop[0] - co[0]) * weight;
+ vec[1] += (cop[1] - co[1]) * weight;
+ vec[2] += (cop[2] - co[2]) * weight;
if (mat)
pchan_deform_mat_add(pchan, weight, bbonemat, mat);
@@ -856,10 +856,10 @@ void armature_deform_verts(Object *armOb, Object *target, DerivedMesh *dm, float
totchan = BLI_countlist(&armOb->pose->chanbase);
if (use_quaternion) {
- dualquats = MEM_callocN(sizeof(DualQuat)*totchan, "dualquats");
+ dualquats = MEM_callocN(sizeof(DualQuat) * totchan, "dualquats");
}
- pdef_info_array = MEM_callocN(sizeof(bPoseChanDeform)*totchan, "bPoseChanDeform");
+ pdef_info_array = MEM_callocN(sizeof(bPoseChanDeform) * totchan, "bPoseChanDeform");
totchan = 0;
pdef_info = pdef_info_array;
@@ -891,7 +891,7 @@ void armature_deform_verts(Object *armOb, Object *target, DerivedMesh *dm, float
Lattice *lt = target->data;
dverts = lt->dvert;
if (dverts)
- target_totvert = lt->pntsu*lt->pntsv*lt->pntsw;
+ target_totvert = lt->pntsu * lt->pntsv * lt->pntsw;
}
}
@@ -909,7 +909,7 @@ void armature_deform_verts(Object *armOb, Object *target, DerivedMesh *dm, float
defnrToPC = MEM_callocN(sizeof(*defnrToPC) * defbase_tot, "defnrToBone");
defnrToPCIndex = MEM_callocN(sizeof(*defnrToPCIndex) * defbase_tot, "defnrToIndex");
for (i = 0, dg = target->defbase.first; dg; i++, dg = dg->next) {
- defnrToPC[i] = get_pose_channel(armOb->pose, dg->name);
+ defnrToPC[i] = BKE_pose_channel_find_name(armOb->pose, dg->name);
/* exclude non-deforming bones */
if (defnrToPC[i]) {
if (defnrToPC[i]->bone->flag & BONE_NO_DEFORM) {
@@ -963,7 +963,7 @@ void armature_deform_verts(Object *armOb, Object *target, DerivedMesh *dm, float
armature_weight = defvert_find_weight(dvert, armature_def_nr);
if (invert_vgroup)
- armature_weight = 1.0f-armature_weight;
+ armature_weight = 1.0f - armature_weight;
/* hackish: the blending factor can be used for blending with prevCos too */
if (prevCos) {
@@ -1028,18 +1028,18 @@ void armature_deform_verts(Object *armOb, Object *target, DerivedMesh *dm, float
if (armature_weight != 1.0f) {
copy_v3_v3(dco, co);
- mul_v3m3_dq( dco, (defMats) ? summat : NULL,dq);
+ mul_v3m3_dq(dco, (defMats) ? summat : NULL, dq);
sub_v3_v3(dco, co);
mul_v3_fl(dco, armature_weight);
add_v3_v3(co, dco);
}
else
- mul_v3m3_dq( co, (defMats) ? summat : NULL,dq);
+ mul_v3m3_dq(co, (defMats) ? summat : NULL, dq);
smat = summat;
}
else {
- mul_v3_fl(vec, armature_weight/contrib);
+ mul_v3_fl(vec, armature_weight / contrib);
add_v3_v3v3(co, vec, co);
}
@@ -1051,7 +1051,7 @@ void armature_deform_verts(Object *armOb, Object *target, DerivedMesh *dm, float
copy_m3_m3(tmpmat, defMats[i]);
if (!use_quaternion) /* quaternion already is scale corrected */
- mul_m3_fl(smat, armature_weight/contrib);
+ mul_m3_fl(smat, armature_weight / contrib);
mul_serie_m3(defMats[i], tmpmat, pre, smat, post, NULL, NULL, NULL, NULL);
}
@@ -1063,9 +1063,9 @@ void armature_deform_verts(Object *armOb, Object *target, DerivedMesh *dm, float
/* interpolate with previous modifier position using weight group */
if (prevCos) {
float mw = 1.0f - prevco_weight;
- vertexCos[i][0] = prevco_weight*vertexCos[i][0] + mw*co[0];
- vertexCos[i][1] = prevco_weight*vertexCos[i][1] + mw*co[1];
- vertexCos[i][2] = prevco_weight*vertexCos[i][2] + mw*co[2];
+ vertexCos[i][0] = prevco_weight * vertexCos[i][0] + mw * co[0];
+ vertexCos[i][1] = prevco_weight * vertexCos[i][1] + mw * co[1];
+ vertexCos[i][2] = prevco_weight * vertexCos[i][2] + mw * co[2];
}
}
@@ -1090,7 +1090,7 @@ void armature_deform_verts(Object *armOb, Object *target, DerivedMesh *dm, float
/* ************ END Armature Deform ******************* */
-void get_objectspace_bone_matrix(struct Bone* bone, float M_accumulatedMatrix[][4], int UNUSED(root),
+void get_objectspace_bone_matrix(struct Bone *bone, float M_accumulatedMatrix[][4], int UNUSED(root),
int UNUSED(posed))
{
copy_m4_m4(M_accumulatedMatrix, bone->arm_mat);
@@ -1099,7 +1099,7 @@ void get_objectspace_bone_matrix(struct Bone* bone, float M_accumulatedMatrix[][
/* **************** Space to Space API ****************** */
/* Convert World-Space Matrix to Pose-Space Matrix */
-void armature_mat_world_to_pose(Object *ob, float inmat[][4], float outmat[][4])
+void BKE_armature_mat_world_to_pose(Object *ob, float inmat[][4], float outmat[][4])
{
float obmat[4][4];
@@ -1117,7 +1117,7 @@ void armature_mat_world_to_pose(Object *ob, float inmat[][4], float outmat[][4])
/* Convert World-Space Location to Pose-Space Location
* NOTE: this cannot be used to convert to pose-space location of the supplied
* pose-channel into its local space (i.e. 'visual'-keyframing) */
-void armature_loc_world_to_pose(Object *ob, const float inloc[3], float outloc[3])
+void BKE_armature_loc_world_to_pose(Object *ob, const float inloc[3], float outloc[3])
{
float xLocMat[4][4] = MAT4_UNITY;
float nLocMat[4][4];
@@ -1126,7 +1126,7 @@ void armature_loc_world_to_pose(Object *ob, const float inloc[3], float outloc[3
copy_v3_v3(xLocMat[3], inloc);
/* get bone-space cursor matrix and extract location */
- armature_mat_world_to_pose(ob, xLocMat, nLocMat);
+ BKE_armature_mat_world_to_pose(ob, xLocMat, nLocMat);
copy_v3_v3(outloc, nLocMat[3]);
}
@@ -1165,7 +1165,7 @@ static void get_offset_bone_mat(Bone *bone, float offs_bone[][4])
* pose-channel into its local space (i.e. 'visual'-keyframing).
* (note: I don't understand that, so I keep it :p --mont29).
*/
-void pchan_to_pose_mat(bPoseChannel *pchan, float rotscale_mat[][4], float loc_mat[][4])
+void BKE_pchan_to_pose_mat(bPoseChannel *pchan, float rotscale_mat[][4], float loc_mat[][4])
{
Bone *bone, *parbone;
bPoseChannel *parchan;
@@ -1208,9 +1208,8 @@ void pchan_to_pose_mat(bPoseChannel *pchan, float rotscale_mat[][4], float loc_m
else
mult_m4_m4m4(rotscale_mat, parchan->pose_mat, offs_bone);
-# if 1
/* Compose the loc matrix for this bone. */
- /* NOTE: That version deos not modify bone's loc when HINGE/NO_SCALE options are set. */
+ /* NOTE: That version does not modify bone's loc when HINGE/NO_SCALE options are set. */
/* In this case, use the object's space *orientation*. */
if (bone->flag & BONE_NO_LOCAL_LOCATION) {
@@ -1230,64 +1229,12 @@ void pchan_to_pose_mat(bPoseChannel *pchan, float rotscale_mat[][4], float loc_m
mult_m4_m4m4(loc_mat, bone_loc, tmat4);
}
/* Those flags do not affect position, use plain parent transform space! */
- else if (bone->flag & (BONE_HINGE|BONE_NO_SCALE)) {
+ else if (bone->flag & (BONE_HINGE | BONE_NO_SCALE)) {
mult_m4_m4m4(loc_mat, parchan->pose_mat, offs_bone);
}
/* Else (i.e. default, usual case), just use the same matrix for rotation/scaling, and location. */
else
copy_m4_m4(loc_mat, rotscale_mat);
-# endif
-# if 0
- /* Compose the loc matrix for this bone. */
- /* NOTE: That version modifies bone's loc when HINGE/NO_SCALE options are set. */
-
- /* In these cases we need to compute location separately */
- if (bone->flag & (BONE_HINGE|BONE_NO_SCALE|BONE_NO_LOCAL_LOCATION)) {
- float bone_loc[4][4], bone_rotscale[3][3], tmat4[4][4], tmat3[3][3];
- unit_m4(bone_loc);
- unit_m4(loc_mat);
- unit_m4(tmat4);
-
- mul_v3_m4v3(bone_loc[3], parchan->pose_mat, offs_bone[3]);
-
- /* "No local location" is not transformed by bone matrix. */
- /* This only affects orientations (rotations), as scale is always 1.0 here. */
- if (bone->flag & BONE_NO_LOCAL_LOCATION)
- unit_m3(bone_rotscale);
- else
- /* We could also use bone->bone_mat directly, here... */
- copy_m3_m4(bone_rotscale, offs_bone);
-
- if (bone->flag & BONE_HINGE) {
- copy_m3_m4(tmat3, parbone->arm_mat);
- /* for hinge-only, we use armature *rotation*, but pose mat *scale*! */
- if (!(bone->flag & BONE_NO_SCALE)) {
- float size[3], tsmat[3][3];
- mat4_to_size(size, parchan->pose_mat);
- size_to_mat3(tsmat, size);
- mul_m3_m3m3(tmat3, tsmat, tmat3);
- }
- mul_m3_m3m3(bone_rotscale, tmat3, bone_rotscale);
- }
- else if (bone->flag & BONE_NO_SCALE) {
- /* For no-scale only, normalized parent pose mat is enough! */
- copy_m3_m4(tmat3, parchan->pose_mat);
- normalize_m3(tmat3);
- mul_m3_m3m3(bone_rotscale, tmat3, bone_rotscale);
- }
- /* NO_LOCAL_LOCATION only. */
- else {
- copy_m3_m4(tmat3, parchan->pose_mat);
- mul_m3_m3m3(bone_rotscale, tmat3, bone_rotscale);
- }
-
- copy_m4_m3(tmat4, bone_rotscale);
- mult_m4_m4m4(loc_mat, bone_loc, tmat4);
- }
- /* Else, just use the same matrix for rotation/scaling, and location. */
- else
- copy_m4_m4(loc_mat, rotscale_mat);
-# endif
}
/* Root bones. */
else {
@@ -1307,14 +1254,14 @@ void pchan_to_pose_mat(bPoseChannel *pchan, float rotscale_mat[][4], float loc_m
/* Convert Pose-Space Matrix to Bone-Space Matrix.
* NOTE: this cannot be used to convert to pose-space transforms of the supplied
* pose-channel into its local space (i.e. 'visual'-keyframing) */
-void armature_mat_pose_to_bone(bPoseChannel *pchan, float inmat[][4], float outmat[][4])
+void BKE_armature_mat_pose_to_bone(bPoseChannel *pchan, float inmat[][4], float outmat[][4])
{
float rotscale_mat[4][4], loc_mat[4][4], inmat_[4][4];
/* Security, this allows to call with inmat == outmat! */
copy_m4_m4(inmat_, inmat);
- pchan_to_pose_mat(pchan, rotscale_mat, loc_mat);
+ BKE_pchan_to_pose_mat(pchan, rotscale_mat, loc_mat);
invert_m4(rotscale_mat);
invert_m4(loc_mat);
@@ -1323,14 +1270,14 @@ void armature_mat_pose_to_bone(bPoseChannel *pchan, float inmat[][4], float outm
}
/* Convert Bone-Space Matrix to Pose-Space Matrix. */
-void armature_mat_bone_to_pose(bPoseChannel *pchan, float inmat[][4], float outmat[][4])
+void BKE_armature_mat_bone_to_pose(bPoseChannel *pchan, float inmat[][4], float outmat[][4])
{
float rotscale_mat[4][4], loc_mat[4][4], inmat_[4][4];
/* Security, this allows to call with inmat == outmat! */
copy_m4_m4(inmat_, inmat);
- pchan_to_pose_mat(pchan, rotscale_mat, loc_mat);
+ BKE_pchan_to_pose_mat(pchan, rotscale_mat, loc_mat);
mult_m4_m4m4(outmat, rotscale_mat, inmat_);
mul_v3_m4v3(outmat[3], loc_mat, inmat_[3]);
@@ -1339,7 +1286,7 @@ void armature_mat_bone_to_pose(bPoseChannel *pchan, float inmat[][4], float outm
/* Convert Pose-Space Location to Bone-Space Location
* NOTE: this cannot be used to convert to pose-space location of the supplied
* pose-channel into its local space (i.e. 'visual'-keyframing) */
-void armature_loc_pose_to_bone(bPoseChannel *pchan, const float inloc[3], float outloc[3])
+void BKE_armature_loc_pose_to_bone(bPoseChannel *pchan, const float inloc[3], float outloc[3])
{
float xLocMat[4][4] = MAT4_UNITY;
float nLocMat[4][4];
@@ -1348,31 +1295,31 @@ void armature_loc_pose_to_bone(bPoseChannel *pchan, const float inloc[3], float
copy_v3_v3(xLocMat[3], inloc);
/* get bone-space cursor matrix and extract location */
- armature_mat_pose_to_bone(pchan, xLocMat, nLocMat);
+ BKE_armature_mat_pose_to_bone(pchan, xLocMat, nLocMat);
copy_v3_v3(outloc, nLocMat[3]);
}
-void armature_mat_pose_to_bone_ex(Object *ob, bPoseChannel *pchan, float inmat[][4], float outmat[][4])
+void BKE_armature_mat_pose_to_bone_ex(Object *ob, bPoseChannel *pchan, float inmat[][4], float outmat[][4])
{
bPoseChannel work_pchan = *pchan;
/* recalculate pose matrix with only parent transformations,
* bone loc/sca/rot is ignored, scene and frame are not used. */
- where_is_pose_bone(NULL, ob, &work_pchan, 0.0f, FALSE);
+ BKE_pose_where_is_bone(NULL, ob, &work_pchan, 0.0f, FALSE);
/* find the matrix, need to remove the bone transforms first so this is
* calculated as a matrix to set rather then a difference ontop of whats
* already there. */
unit_m4(outmat);
- pchan_apply_mat4(&work_pchan, outmat, FALSE);
+ BKE_pchan_apply_mat4(&work_pchan, outmat, FALSE);
- armature_mat_pose_to_bone(&work_pchan, inmat, outmat);
+ BKE_armature_mat_pose_to_bone(&work_pchan, inmat, outmat);
}
-/* same as object_mat3_to_rot() */
-void pchan_mat3_to_rot(bPoseChannel *pchan, float mat[][3], short use_compat)
+/* same as BKE_object_mat3_to_rot() */
+void BKE_pchan_mat3_to_rot(bPoseChannel *pchan, float mat[][3], short use_compat)
{
- switch(pchan->rotmode) {
+ switch (pchan->rotmode) {
case ROT_MODE_QUAT:
mat3_to_quat(pchan->quat, mat);
break;
@@ -1388,18 +1335,18 @@ void pchan_mat3_to_rot(bPoseChannel *pchan, float mat[][3], short use_compat)
}
/* Apply a 4x4 matrix to the pose bone,
- * similar to object_apply_mat4() */
-void pchan_apply_mat4(bPoseChannel *pchan, float mat[][4], short use_compat)
+ * similar to BKE_object_apply_mat4() */
+void BKE_pchan_apply_mat4(bPoseChannel *pchan, float mat[][4], short use_compat)
{
float rot[3][3];
mat4_to_loc_rot_size(pchan->loc, rot, pchan->size, mat);
- pchan_mat3_to_rot(pchan, rot, use_compat);
+ BKE_pchan_mat3_to_rot(pchan, rot, use_compat);
}
/* Remove rest-position effects from pose-transform for obtaining
* 'visual' transformation of pose-channel.
* (used by the Visual-Keyframing stuff) */
-void armature_mat_pose_to_delta(float delta_mat[][4], float pose_mat[][4], float arm_mat[][4])
+void BKE_armature_mat_pose_to_delta(float delta_mat[][4], float pose_mat[][4], float arm_mat[][4])
{
float imat[4][4];
@@ -1413,18 +1360,18 @@ void armature_mat_pose_to_delta(float delta_mat[][4], float pose_mat[][4], float
/* Called from RNA when rotation mode changes
* - the result should be that the rotations given in the provided pointers have had conversions
* applied (as appropriate), such that the rotation of the element hasn't 'visually' changed */
-void BKE_rotMode_change_values (float quat[4], float eul[3], float axis[3], float *angle, short oldMode, short newMode)
+void BKE_rotMode_change_values(float quat[4], float eul[3], float axis[3], float *angle, short oldMode, short newMode)
{
/* check if any change - if so, need to convert data */
if (newMode > 0) { /* to euler */
if (oldMode == ROT_MODE_AXISANGLE) {
/* axis-angle to euler */
- axis_angle_to_eulO( eul, newMode,axis, *angle);
+ axis_angle_to_eulO(eul, newMode, axis, *angle);
}
else if (oldMode == ROT_MODE_QUAT) {
/* quat to euler */
normalize_qt(quat);
- quat_to_eulO(eul, newMode,quat);
+ quat_to_eulO(eul, newMode, quat);
}
/* else { no conversion needed } */
}
@@ -1516,8 +1463,12 @@ void vec_roll_to_mat3(const float vec[3], const float roll, float mat[][3])
*
* was 0.000001, causes bug [#30438] (which is same as [#27675, imho).
* Reseting it to org value seems to cause no more [#23954]...
+ *
+ * was 0.0000000000001, caused bug [#31333], smaller values give unstable
+ * roll when toggling editmode again...
+ * No good value here, trying 0.000000001 as best compromize. :/
*/
- if (dot_v3v3(axis,axis) > 1.0e-13f) {
+ if (dot_v3v3(axis, axis) > 1.0e-9f) {
/* if nor is *not* a multiple of target ... */
normalize_v3(axis);
@@ -1531,7 +1482,7 @@ void vec_roll_to_mat3(const float vec[3], const float roll, float mat[][3])
float updown;
/* point same direction, or opposite? */
- updown = (dot_v3v3(target,nor) > 0) ? 1.0f : -1.0f;
+ updown = (dot_v3v3(target, nor) > 0) ? 1.0f : -1.0f;
/* I think this should work... */
bMatrix[0][0] = updown; bMatrix[0][1] = 0.0; bMatrix[0][2] = 0.0;
@@ -1549,7 +1500,7 @@ void vec_roll_to_mat3(const float vec[3], const float roll, float mat[][3])
/* recursive part, calculates restposition of entire tree of children */
/* used by exiting editmode too */
-void where_is_armature_bone(Bone *bone, Bone *prevbone)
+void BKE_armature_where_is_bone(Bone *bone, Bone *prevbone)
{
float vec[3];
@@ -1582,19 +1533,19 @@ void where_is_armature_bone(Bone *bone, Bone *prevbone)
/* and the kiddies */
prevbone = bone;
for (bone = bone->childbase.first; bone; bone = bone->next) {
- where_is_armature_bone(bone, prevbone);
+ BKE_armature_where_is_bone(bone, prevbone);
}
}
/* updates vectors and matrices on rest-position level, only needed
* after editing armature itself, now only on reading file */
-void where_is_armature(bArmature *arm)
+void BKE_armature_where_is(bArmature *arm)
{
Bone *bone;
/* hierarchical from root to children */
for (bone = arm->bonebase.first; bone; bone = bone->next) {
- where_is_armature_bone(bone, NULL);
+ BKE_armature_where_is_bone(bone, NULL);
}
}
@@ -1614,7 +1565,7 @@ static void pose_proxy_synchronize(Object *ob, Object *from, int layer_protected
* to avoid crashing check for possible errors here */
for (pchan = pose->chanbase.first; pchan; pchan = pchan->next) {
if (pchan->bone->layer & layer_protected) {
- if (get_pose_channel(frompose, pchan->name) == NULL) {
+ if (BKE_pose_channel_find_name(frompose, pchan->name) == NULL) {
printf("failed to sync proxy armature because '%s' is missing pose channel '%s'\n",
from->id.name, pchan->name);
error = 1;
@@ -1626,19 +1577,19 @@ static void pose_proxy_synchronize(Object *ob, Object *from, int layer_protected
return;
/* clear all transformation values from library */
- rest_pose(frompose);
+ BKE_pose_rest(frompose);
/* copy over all of the proxy's bone groups */
- /* TODO for later
- * - implement 'local' bone groups as for constraints
- * Note: this isn't trivial, as bones reference groups by index not by pointer,
- * so syncing things correctly needs careful attention */
+ /* TODO for later
+ * - implement 'local' bone groups as for constraints
+ * Note: this isn't trivial, as bones reference groups by index not by pointer,
+ * so syncing things correctly needs careful attention */
BLI_freelistN(&pose->agroups);
BLI_duplicatelist(&pose->agroups, &frompose->agroups);
pose->active_group = frompose->active_group;
for (pchan = pose->chanbase.first; pchan; pchan = pchan->next) {
- pchanp = get_pose_channel(frompose, pchan->name);
+ pchanp = BKE_pose_channel_find_name(frompose, pchan->name);
if (pchan->bone->layer & layer_protected) {
ListBase proxylocal_constraints = {NULL, NULL};
@@ -1691,7 +1642,7 @@ static void pose_proxy_synchronize(Object *ob, Object *from, int layer_protected
}
/* free stuff from current channel */
- free_pose_channel(pchan);
+ BKE_pose_channel_free(pchan);
/* the final copy */
*pchan = pchanw;
@@ -1725,7 +1676,7 @@ static void pose_proxy_synchronize(Object *ob, Object *from, int layer_protected
static int rebuild_pose_bone(bPose *pose, Bone *bone, bPoseChannel *parchan, int counter)
{
- bPoseChannel *pchan = verify_pose_channel(pose, bone->name); /* verify checks and/or adds */
+ bPoseChannel *pchan = BKE_pose_channel_verify(pose, bone->name); /* verify checks and/or adds */
pchan->bone = bone;
pchan->parent = parchan;
@@ -1736,7 +1687,7 @@ static int rebuild_pose_bone(bPose *pose, Bone *bone, bPoseChannel *parchan, int
counter = rebuild_pose_bone(pose, bone, pchan, counter);
/* for quick detecting of next bone in chain, only b-bone uses it now */
if (bone->flag & BONE_CONNECTED)
- pchan->child = get_pose_channel(pose, bone->name);
+ pchan->child = BKE_pose_channel_find_name(pose, bone->name);
}
return counter;
@@ -1744,7 +1695,7 @@ static int rebuild_pose_bone(bPose *pose, Bone *bone, bPoseChannel *parchan, int
/* only after leave editmode, duplicating, validating older files, library syncing */
/* NOTE: pose->flag is set for it */
-void armature_rebuild_pose(Object *ob, bArmature *arm)
+void BKE_pose_rebuild(Object *ob, bArmature *arm)
{
Bone *bone;
bPose *pose;
@@ -1776,8 +1727,8 @@ void armature_rebuild_pose(Object *ob, bArmature *arm)
for (pchan = pose->chanbase.first; pchan; pchan = next) {
next = pchan->next;
if (pchan->bone == NULL) {
- free_pose_channel(pchan);
- free_pose_channels_hash(pose);
+ BKE_pose_channel_free(pchan);
+ BKE_pose_channels_hash_free(pose);
BLI_freelinkN(&pose->chanbase, pchan);
}
}
@@ -1785,20 +1736,20 @@ void armature_rebuild_pose(Object *ob, bArmature *arm)
/* synchronize protected layers with proxy */
if (ob->proxy) {
- object_copy_proxy_drivers(ob, ob->proxy);
+ BKE_object_copy_proxy_drivers(ob, ob->proxy);
pose_proxy_synchronize(ob, ob->proxy, arm->layer_protected);
}
- update_pose_constraint_flags(ob->pose); /* for IK detection for example */
+ BKE_pose_update_constraint_flags(ob->pose); /* for IK detection for example */
/* the sorting */
- if (counter>1)
+ if (counter > 1)
DAG_pose_sort(ob);
ob->pose->flag &= ~POSE_RECALC;
ob->pose->flag |= POSE_WAS_REBUILT;
- make_pose_channels_hash(ob->pose);
+ BKE_pose_channels_hash_make(ob->pose);
}
@@ -1845,7 +1796,7 @@ static void splineik_init_tree_from_pchan(Scene *scene, Object *UNUSED(ob), bPos
if ((ikData->tar == NULL) || (ikData->tar->type != OB_CURVE))
continue;
/* skip if disabled */
- if ((con->enforce == 0.0f) || (con->flag & (CONSTRAINT_DISABLE|CONSTRAINT_OFF)))
+ if ((con->enforce == 0.0f) || (con->flag & (CONSTRAINT_DISABLE | CONSTRAINT_OFF)))
continue;
/* otherwise, constraint is ok... */
@@ -1867,7 +1818,7 @@ static void splineik_init_tree_from_pchan(Scene *scene, Object *UNUSED(ob), bPos
/* only happens on reload file, but violates depsgraph still... fix! */
if ((cu->path == NULL) || (cu->path->data == NULL))
- makeDispListCurveTypes(scene, ikData->tar, 0);
+ BKE_displist_make_curveTypes(scene, ikData->tar, 0);
}
/* find the root bone and the chain of bones from the root to the tip
@@ -1884,7 +1835,7 @@ static void splineik_init_tree_from_pchan(Scene *scene, Object *UNUSED(ob), bPos
if (segcount == 0)
return;
else
- pchanRoot = pchanChain[segcount-1];
+ pchanRoot = pchanChain[segcount - 1];
/* perform binding step if required */
if ((ikData->flag & CONSTRAINT_SPLINEIK_BOUND) == 0) {
@@ -1894,8 +1845,8 @@ static void splineik_init_tree_from_pchan(Scene *scene, Object *UNUSED(ob), bPos
/* setup new empty array for the points list */
if (ikData->points)
MEM_freeN(ikData->points);
- ikData->numpoints = ikData->chainlen+1;
- ikData->points = MEM_callocN(sizeof(float)*ikData->numpoints, "Spline IK Binding");
+ ikData->numpoints = ikData->chainlen + 1;
+ ikData->points = MEM_callocN(sizeof(float) * ikData->numpoints, "Spline IK Binding");
/* bind 'tip' of chain (i.e. first joint = tip of bone with the Spline IK Constraint) */
ikData->points[0] = 1.0f;
@@ -1909,13 +1860,13 @@ static void splineik_init_tree_from_pchan(Scene *scene, Object *UNUSED(ob), bPos
*/
if ((ikData->flag & CONSTRAINT_SPLINEIK_EVENSPLITS) || (totLength == 0.0f)) {
/* 1) equi-spaced joints */
- ikData->points[i+1] = ikData->points[i] - segmentLen;
+ ikData->points[i + 1] = ikData->points[i] - segmentLen;
}
else {
/* 2) to find this point on the curve, we take a step from the previous joint
* a distance given by the proportion that this bone takes
*/
- ikData->points[i+1] = ikData->points[i] - (boneLengths[i] / totLength);
+ ikData->points[i + 1] = ikData->points[i] - (boneLengths[i] / totLength);
}
}
@@ -1969,8 +1920,8 @@ static void splineik_init_tree_from_pchan(Scene *scene, Object *UNUSED(ob), bPos
tree->chainlen = segcount;
/* copy over the array of links to bones in the chain (from tip to root) */
- tree->chain = MEM_callocN(sizeof(bPoseChannel*)*segcount, "SplineIK Chain");
- memcpy(tree->chain, pchanChain, sizeof(bPoseChannel*)*segcount);
+ tree->chain = MEM_callocN(sizeof(bPoseChannel *) * segcount, "SplineIK Chain");
+ memcpy(tree->chain, pchanChain, sizeof(bPoseChannel *) * segcount);
/* store reference to joint position array */
tree->points = jointPoints;
@@ -2009,10 +1960,10 @@ static void splineik_evaluate_bone(tSplineIK_Tree *tree, Scene *scene, Object *o
{
bSplineIKConstraint *ikData = tree->ikData;
float poseHead[3], poseTail[3], poseMat[4][4];
- float splineVec[3], scaleFac, radius =1.0f;
+ float splineVec[3], scaleFac, radius = 1.0f;
/* firstly, calculate the bone matrix the standard way, since this is needed for roll control */
- where_is_pose_bone(scene, ob, pchan, ctime, 1);
+ BKE_pose_where_is_bone(scene, ob, pchan, ctime, 1);
copy_v3_v3(poseHead, pchan->pose_head);
copy_v3_v3(poseTail, pchan->pose_tail);
@@ -2023,14 +1974,14 @@ static void splineik_evaluate_bone(tSplineIK_Tree *tree, Scene *scene, Object *o
float tailBlendFac = 1.0f;
/* determine if the bone should still be affected by SplineIK */
- if (tree->points[index+1] >= 1.0f) {
+ if (tree->points[index + 1] >= 1.0f) {
/* spline doesn't affect the bone anymore, so done... */
pchan->flag |= POSE_DONE;
return;
}
- else if ((tree->points[index] >= 1.0f) && (tree->points[index+1] < 1.0f)) {
+ else if ((tree->points[index] >= 1.0f) && (tree->points[index + 1] < 1.0f)) {
/* blending factor depends on the amount of the bone still left on the chain */
- tailBlendFac = (1.0f - tree->points[index+1]) / (tree->points[index] - tree->points[index+1]);
+ tailBlendFac = (1.0f - tree->points[index + 1]) / (tree->points[index] - tree->points[index + 1]);
}
/* tail endpoint */
@@ -2050,7 +2001,7 @@ static void splineik_evaluate_bone(tSplineIK_Tree *tree, Scene *scene, Object *o
}
/* head endpoint */
- if (where_on_path(ikData->tar, tree->points[index+1], vec, dir, NULL, &rad, NULL)) {
+ if (where_on_path(ikData->tar, tree->points[index + 1], vec, dir, NULL, &rad, NULL)) {
/* apply curve's object-mode transforms to the position
* unless the option to allow curve to be positioned elsewhere is activated (i.e. no root)
*/
@@ -2062,7 +2013,7 @@ static void splineik_evaluate_bone(tSplineIK_Tree *tree, Scene *scene, Object *o
copy_v3_v3(poseHead, vec);
/* set the new radius (it should be the average value) */
- radius = (radius+rad) / 2;
+ radius = (radius + rad) / 2;
}
}
@@ -2136,7 +2087,7 @@ static void splineik_evaluate_bone(tSplineIK_Tree *tree, Scene *scene, Object *o
scale = len_v3(pchan->pose_mat[2]);
mul_v3_fl(poseMat[2], scale);
}
- break;
+ break;
case CONSTRAINT_SPLINEIK_XZS_VOLUMETRIC:
{
/* 'volume preservation' */
@@ -2159,7 +2110,7 @@ static void splineik_evaluate_bone(tSplineIK_Tree *tree, Scene *scene, Object *o
mul_v3_fl(poseMat[0], scale);
mul_v3_fl(poseMat[2], scale);
}
- break;
+ break;
}
/* finally, multiply the x and z scaling by the radius of the curve too,
@@ -2198,7 +2149,7 @@ static void splineik_evaluate_bone(tSplineIK_Tree *tree, Scene *scene, Object *o
copy_v3_v3(pchan->pose_head, poseHead);
/* recalculate tail, as it's now outdated after the head gets adjusted above! */
- where_is_pose_bone_tail(pchan);
+ BKE_pose_where_is_bone_tail(pchan);
/* done! */
pchan->flag |= POSE_DONE;
@@ -2217,7 +2168,7 @@ static void splineik_execute_tree(Scene *scene, Object *ob, bPoseChannel *pchan_
* - the chain is traversed in the opposite order to storage order (i.e. parent to children)
* so that dependencies are correct
*/
- for (i = tree->chainlen-1; i >= 0; i--) {
+ for (i = tree->chainlen - 1; i >= 0; i--) {
bPoseChannel *pchan = tree->chain[i];
splineik_evaluate_bone(tree, scene, ob, pchan, i, ctime);
}
@@ -2236,7 +2187,7 @@ static void splineik_execute_tree(Scene *scene, Object *ob, bPoseChannel *pchan_
/* ********************** THE POSE SOLVER ******************* */
/* loc/rot/size to given mat4 */
-void pchan_to_mat4(bPoseChannel *pchan, float chan_mat[4][4])
+void BKE_pchan_to_mat4(bPoseChannel *pchan, float chan_mat[4][4])
{
float smat[3][3];
float rmat[3][3];
@@ -2279,12 +2230,12 @@ void pchan_to_mat4(bPoseChannel *pchan, float chan_mat[4][4])
/* loc/rot/size to mat4 */
/* used in constraint.c too */
-void pchan_calc_mat(bPoseChannel *pchan)
+void BKE_pchan_calc_mat(bPoseChannel *pchan)
{
/* this is just a wrapper around the copy of this function which calculates the matrix
* and stores the result in any given channel
*/
- pchan_to_mat4(pchan, pchan->chan_mat);
+ BKE_pchan_to_mat4(pchan, pchan->chan_mat);
}
#if 0 /* XXX OLD ANIMSYS, NLASTRIPS ARE NO LONGER USED */
@@ -2294,116 +2245,116 @@ static void do_strip_modifiers(Scene *scene, Object *armob, Bone *bone, bPoseCha
{
bActionModifier *amod;
bActionStrip *strip, *strip2;
- float scene_cfra= (float)scene->r.cfra;
+ float scene_cfra = (float)scene->r.cfra;
int do_modif;
- for (strip=armob->nlastrips.first; strip; strip=strip->next) {
- do_modif=0;
+ for (strip = armob->nlastrips.first; strip; strip = strip->next) {
+ do_modif = 0;
- if (scene_cfra>=strip->start && scene_cfra<=strip->end)
- do_modif=1;
+ if (scene_cfra >= strip->start && scene_cfra <= strip->end)
+ do_modif = 1;
if ((scene_cfra > strip->end) && (strip->flag & ACTSTRIP_HOLDLASTFRAME)) {
- do_modif=1;
+ do_modif = 1;
/* if there are any other strips active, ignore modifiers for this strip -
* 'hold' option should only hold action modifiers if there are
* no other active strips */
- for (strip2=strip->next; strip2; strip2=strip2->next) {
+ for (strip2 = strip->next; strip2; strip2 = strip2->next) {
if (strip2 == strip) continue;
- if (scene_cfra>=strip2->start && scene_cfra<=strip2->end) {
+ if (scene_cfra >= strip2->start && scene_cfra <= strip2->end) {
if (!(strip2->flag & ACTSTRIP_MUTE))
- do_modif=0;
+ do_modif = 0;
}
}
/* if there are any later, activated, strips with 'hold' set, they take precedence,
* so ignore modifiers for this strip */
- for (strip2=strip->next; strip2; strip2=strip2->next) {
+ for (strip2 = strip->next; strip2; strip2 = strip2->next) {
if (scene_cfra < strip2->start) continue;
if ((strip2->flag & ACTSTRIP_HOLDLASTFRAME) && !(strip2->flag & ACTSTRIP_MUTE)) {
- do_modif=0;
+ do_modif = 0;
}
}
}
if (do_modif) {
/* temporal solution to prevent 2 strips accumulating */
- if (scene_cfra==strip->end && strip->next && strip->next->start==scene_cfra)
+ if (scene_cfra == strip->end && strip->next && strip->next->start == scene_cfra)
continue;
- for (amod= strip->modifiers.first; amod; amod= amod->next) {
+ for (amod = strip->modifiers.first; amod; amod = amod->next) {
switch (amod->type) {
- case ACTSTRIP_MOD_DEFORM:
- {
- /* validate first */
- if (amod->ob && amod->ob->type==OB_CURVE && amod->channel[0]) {
+ case ACTSTRIP_MOD_DEFORM:
+ {
+ /* validate first */
+ if (amod->ob && amod->ob->type == OB_CURVE && amod->channel[0]) {
- if ( strcmp(pchan->name, amod->channel)==0 ) {
- float mat4[4][4], mat3[3][3];
+ if (strcmp(pchan->name, amod->channel) == 0) {
+ float mat4[4][4], mat3[3][3];
- curve_deform_vector(scene, amod->ob, armob, bone->arm_mat[3], pchan->pose_mat[3], mat3, amod->no_rot_axis);
- copy_m4_m4(mat4, pchan->pose_mat);
- mul_m4_m3m4(pchan->pose_mat, mat3, mat4);
+ curve_deform_vector(scene, amod->ob, armob, bone->arm_mat[3], pchan->pose_mat[3], mat3, amod->no_rot_axis);
+ copy_m4_m4(mat4, pchan->pose_mat);
+ mul_m4_m3m4(pchan->pose_mat, mat3, mat4);
+ }
}
}
- }
break;
- case ACTSTRIP_MOD_NOISE:
- {
- if ( strcmp(pchan->name, amod->channel)==0 ) {
- float nor[3], loc[3], ofs;
- float eul[3], size[3], eulo[3], sizeo[3];
-
- /* calculate turbulance */
- ofs = amod->turbul / 200.0f;
-
- /* make a copy of starting conditions */
- copy_v3_v3(loc, pchan->pose_mat[3]);
- mat4_to_eul( eul,pchan->pose_mat);
- mat4_to_size( size,pchan->pose_mat);
- copy_v3_v3(eulo, eul);
- copy_v3_v3(sizeo, size);
-
- /* apply noise to each set of channels */
- if (amod->channels & 4) {
- /* for scaling */
- nor[0] = BLI_gNoise(amod->noisesize, size[0]+ofs, size[1], size[2], 0, 0) - ofs;
- nor[1] = BLI_gNoise(amod->noisesize, size[0], size[1]+ofs, size[2], 0, 0) - ofs;
- nor[2] = BLI_gNoise(amod->noisesize, size[0], size[1], size[2]+ofs, 0, 0) - ofs;
- add_v3_v3(size, nor);
-
- if (sizeo[0] != 0)
- mul_v3_fl(pchan->pose_mat[0], size[0] / sizeo[0]);
- if (sizeo[1] != 0)
- mul_v3_fl(pchan->pose_mat[1], size[1] / sizeo[1]);
- if (sizeo[2] != 0)
- mul_v3_fl(pchan->pose_mat[2], size[2] / sizeo[2]);
- }
- if (amod->channels & 2) {
- /* for rotation */
- nor[0] = BLI_gNoise(amod->noisesize, eul[0]+ofs, eul[1], eul[2], 0, 0) - ofs;
- nor[1] = BLI_gNoise(amod->noisesize, eul[0], eul[1]+ofs, eul[2], 0, 0) - ofs;
- nor[2] = BLI_gNoise(amod->noisesize, eul[0], eul[1], eul[2]+ofs, 0, 0) - ofs;
-
- compatible_eul(nor, eulo);
- add_v3_v3(eul, nor);
- compatible_eul(eul, eulo);
-
- loc_eul_size_to_mat4(pchan->pose_mat, loc, eul, size);
- }
- if (amod->channels & 1) {
- /* for location */
- nor[0] = BLI_gNoise(amod->noisesize, loc[0]+ofs, loc[1], loc[2], 0, 0) - ofs;
- nor[1] = BLI_gNoise(amod->noisesize, loc[0], loc[1]+ofs, loc[2], 0, 0) - ofs;
- nor[2] = BLI_gNoise(amod->noisesize, loc[0], loc[1], loc[2]+ofs, 0, 0) - ofs;
-
- add_v3_v3v3(pchan->pose_mat[3], loc, nor);
+ case ACTSTRIP_MOD_NOISE:
+ {
+ if (strcmp(pchan->name, amod->channel) == 0) {
+ float nor[3], loc[3], ofs;
+ float eul[3], size[3], eulo[3], sizeo[3];
+
+ /* calculate turbulance */
+ ofs = amod->turbul / 200.0f;
+
+ /* make a copy of starting conditions */
+ copy_v3_v3(loc, pchan->pose_mat[3]);
+ mat4_to_eul(eul, pchan->pose_mat);
+ mat4_to_size(size, pchan->pose_mat);
+ copy_v3_v3(eulo, eul);
+ copy_v3_v3(sizeo, size);
+
+ /* apply noise to each set of channels */
+ if (amod->channels & 4) {
+ /* for scaling */
+ nor[0] = BLI_gNoise(amod->noisesize, size[0] + ofs, size[1], size[2], 0, 0) - ofs;
+ nor[1] = BLI_gNoise(amod->noisesize, size[0], size[1] + ofs, size[2], 0, 0) - ofs;
+ nor[2] = BLI_gNoise(amod->noisesize, size[0], size[1], size[2] + ofs, 0, 0) - ofs;
+ add_v3_v3(size, nor);
+
+ if (sizeo[0] != 0)
+ mul_v3_fl(pchan->pose_mat[0], size[0] / sizeo[0]);
+ if (sizeo[1] != 0)
+ mul_v3_fl(pchan->pose_mat[1], size[1] / sizeo[1]);
+ if (sizeo[2] != 0)
+ mul_v3_fl(pchan->pose_mat[2], size[2] / sizeo[2]);
+ }
+ if (amod->channels & 2) {
+ /* for rotation */
+ nor[0] = BLI_gNoise(amod->noisesize, eul[0] + ofs, eul[1], eul[2], 0, 0) - ofs;
+ nor[1] = BLI_gNoise(amod->noisesize, eul[0], eul[1] + ofs, eul[2], 0, 0) - ofs;
+ nor[2] = BLI_gNoise(amod->noisesize, eul[0], eul[1], eul[2] + ofs, 0, 0) - ofs;
+
+ compatible_eul(nor, eulo);
+ add_v3_v3(eul, nor);
+ compatible_eul(eul, eulo);
+
+ loc_eul_size_to_mat4(pchan->pose_mat, loc, eul, size);
+ }
+ if (amod->channels & 1) {
+ /* for location */
+ nor[0] = BLI_gNoise(amod->noisesize, loc[0] + ofs, loc[1], loc[2], 0, 0) - ofs;
+ nor[1] = BLI_gNoise(amod->noisesize, loc[0], loc[1] + ofs, loc[2], 0, 0) - ofs;
+ nor[2] = BLI_gNoise(amod->noisesize, loc[0], loc[1], loc[2] + ofs, 0, 0) - ofs;
+
+ add_v3_v3v3(pchan->pose_mat[3], loc, nor);
+ }
}
}
- }
break;
}
}
@@ -2414,7 +2365,7 @@ static void do_strip_modifiers(Scene *scene, Object *armob, Bone *bone, bPoseCha
#endif
/* calculate tail of posechannel */
-void where_is_pose_bone_tail(bPoseChannel *pchan)
+void BKE_pose_where_is_bone_tail(bPoseChannel *pchan)
{
float vec[3];
@@ -2427,27 +2378,17 @@ void where_is_pose_bone_tail(bPoseChannel *pchan)
/* pchan is validated, as having bone and parent pointer
* 'do_extra': when zero skips loc/size/rot, constraints and strip modifiers.
*/
-void where_is_pose_bone(Scene *scene, Object *ob, bPoseChannel *pchan, float ctime, int do_extra)
+void BKE_pose_where_is_bone(Scene *scene, Object *ob, bPoseChannel *pchan, float ctime, int do_extra)
{
/* This gives a chan_mat with actions (ipos) results. */
if (do_extra)
- pchan_calc_mat(pchan);
+ BKE_pchan_calc_mat(pchan);
else
unit_m4(pchan->chan_mat);
/* Construct the posemat based on PoseChannels, that we do before applying constraints. */
/* pose_mat(b) = pose_mat(b-1) * yoffs(b-1) * d_root(b) * bone_mat(b) * chan_mat(b) */
- armature_mat_bone_to_pose(pchan, pchan->chan_mat, pchan->pose_mat);
-#if 0 /* XXX Old code, will remove this later. */
- {
- float rotscale_mat[4][4], loc_mat[4][4];
- pchan_to_pose_mat(pchan, rotscale_mat, loc_mat);
- /* Rotation and scale. */
- mult_m4_m4m4(pchan->pose_mat, rotscale_mat, pchan->chan_mat);
- /* Location. */
- mul_v3_m4v3(pchan->pose_mat[3], loc_mat, pchan->chan_mat[3]);
- }
-#endif
+ BKE_armature_mat_bone_to_pose(pchan, pchan->chan_mat, pchan->pose_mat);
/* Only rootbones get the cyclic offset (unless user doesn't want that). */
/* XXX That could be a problem for snapping and other "reverse transform" features... */
@@ -2457,7 +2398,7 @@ void where_is_pose_bone(Scene *scene, Object *ob, bPoseChannel *pchan, float cti
}
if (do_extra) {
-#if 0 /* XXX OLD ANIMSYS, NLASTRIPS ARE NO LONGER USED */
+#if 0 /* XXX OLD ANIMSYS, NLASTRIPS ARE NO LONGER USED */
/* do NLA strip modifiers - i.e. curve follow */
do_strip_modifiers(scene, ob, bone, pchan);
#endif
@@ -2476,7 +2417,7 @@ void where_is_pose_bone(Scene *scene, Object *ob, bPoseChannel *pchan, float cti
cob = constraints_make_evalob(scene, ob, pchan, CONSTRAINT_OBTYPE_BONE);
/* Solve PoseChannel's Constraints */
- solve_constraints(&pchan->constraints, cob, ctime); /* ctime doesnt alter objects */
+ solve_constraints(&pchan->constraints, cob, ctime); /* ctime doesnt alter objects */
/* cleanup after Constraint Solving
* - applies matrix back to pchan, and frees temporary struct used
@@ -2493,12 +2434,12 @@ void where_is_pose_bone(Scene *scene, Object *ob, bPoseChannel *pchan, float cti
/* calculate head */
copy_v3_v3(pchan->pose_head, pchan->pose_mat[3]);
/* calculate tail */
- where_is_pose_bone_tail(pchan);
+ BKE_pose_where_is_bone_tail(pchan);
}
/* This only reads anim data from channels, and writes to channels */
/* This is the only function adding poses */
-void where_is_pose (Scene *scene, Object *ob)
+void BKE_pose_where_is(Scene *scene, Object *ob)
{
bArmature *arm;
Bone *bone;
@@ -2513,9 +2454,9 @@ void where_is_pose (Scene *scene, Object *ob)
if (ELEM(NULL, arm, scene))
return;
if ((ob->pose == NULL) || (ob->pose->flag & POSE_RECALC))
- armature_rebuild_pose(ob, arm);
+ BKE_pose_rebuild(ob, arm);
- ctime = BKE_curframe(scene); /* not accurate... */
+ ctime = BKE_scene_frame_get(scene); /* not accurate... */
/* In editmode or restposition we read the data from the bones */
if (arm->edbo || (arm->flag & ARM_RESTPOS)) {
@@ -2533,7 +2474,7 @@ void where_is_pose (Scene *scene, Object *ob)
/* 1. clear flags */
for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
- pchan->flag &= ~(POSE_DONE|POSE_CHAIN|POSE_IKTREE|POSE_IKSPLINE);
+ pchan->flag &= ~(POSE_DONE | POSE_CHAIN | POSE_IKTREE | POSE_IKSPLINE);
}
/* 2a. construct the IK tree (standard IK) */
@@ -2557,7 +2498,7 @@ void where_is_pose (Scene *scene, Object *ob)
}
/* 5. otherwise just call the normal solver */
else if (!(pchan->flag & POSE_DONE)) {
- where_is_pose_bone(scene, ob, pchan, ctime, 1);
+ BKE_pose_where_is_bone(scene, ob, pchan, ctime, 1);
}
}
/* 6. release the IK tree */
@@ -2580,13 +2521,13 @@ int get_selected_defgroups(Object *ob, char *dg_selection, int defbase_tot)
{
bDeformGroup *defgroup;
unsigned int i;
- Object *armob = object_pose_armature_get(ob);
+ Object *armob = BKE_object_pose_armature_get(ob);
int dg_flags_sel_tot = 0;
if (armob) {
bPose *pose = armob->pose;
for (i = 0, defgroup = ob->defbase.first; i < defbase_tot && defgroup; defgroup = defgroup->next, i++) {
- bPoseChannel *pchan = get_pose_channel(pose, defgroup->name);
+ bPoseChannel *pchan = BKE_pose_channel_find_name(pose, defgroup->name);
if (pchan && (pchan->bone->flag & BONE_SELECTED)) {
dg_selection[i] = TRUE;
dg_flags_sel_tot++;
@@ -2608,7 +2549,7 @@ int minmax_armature(Object *ob, float min[3], float max[3])
{
bPoseChannel *pchan;
- /* For now, we assume where_is_pose has already been called (hence we have valid data in pachan). */
+ /* For now, we assume BKE_pose_where_is has already been called (hence we have valid data in pachan). */
for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
DO_MINMAX(pchan->pose_head, min, max);
DO_MINMAX(pchan->pose_tail, min, max);
@@ -2644,10 +2585,10 @@ void boundbox_armature(Object *ob, float *loc, float *size)
size[1] = (max[1] - min[1]) / 2.0f;
size[2] = (max[2] - min[2]) / 2.0f;
- boundbox_set_from_min_max(bb, min, max);
+ BKE_boundbox_init_from_minmax(bb, min, max);
}
-BoundBox *BKE_armature_get_bb(Object *ob)
+BoundBox *BKE_armature_boundbox_get(Object *ob)
{
boundbox_armature(ob, NULL, NULL);
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index 9c9b207970c..b2cbf0a1ce1 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -91,11 +91,15 @@
#include "WM_api.h" // XXXXX BAD, very BAD dependency (bad level call) - remove asap, elubie
+#ifdef WITH_PYTHON
+#include "BPY_extern.h"
+#endif
+
Global G;
UserDef U;
/* ListBase = {NULL, NULL}; */
-char versionstr[48]= "";
+char versionstr[48] = "";
/* ********** free ********** */
@@ -104,13 +108,13 @@ void free_blender(void)
{
/* samples are in a global list..., also sets G.main->sound->sample NULL */
free_main(G.main);
- G.main= NULL;
+ G.main = NULL;
- BKE_spacetypes_free(); /* after free main, it uses space callbacks */
+ BKE_spacetypes_free(); /* after free main, it uses space callbacks */
IMB_exit();
- BLI_cb_finalize();
+ BLI_callback_global_finalize();
seq_stripelem_cache_destruct();
IMB_moviecache_destruct();
@@ -122,18 +126,18 @@ void initglobals(void)
{
memset(&G, 0, sizeof(Global));
- U.savetime= 1;
+ U.savetime = 1;
- G.main= MEM_callocN(sizeof(Main), "initglobals");
+ G.main = MEM_callocN(sizeof(Main), "initglobals");
strcpy(G.ima, "//");
if (BLENDER_SUBVERSION)
- BLI_snprintf(versionstr, sizeof(versionstr), "blender.org %d.%d", BLENDER_VERSION, BLENDER_SUBVERSION);
+ BLI_snprintf(versionstr, sizeof(versionstr), "v%d.%02d.%d", BLENDER_VERSION / 100, BLENDER_VERSION % 100, BLENDER_SUBVERSION);
else
- BLI_snprintf(versionstr, sizeof(versionstr), "blender.org %d", BLENDER_VERSION);
+ BLI_snprintf(versionstr, sizeof(versionstr), "v%d.%02d", BLENDER_VERSION / 100, BLENDER_VERSION % 100);
-#ifdef _WIN32 // FULLSCREEN
+#ifdef _WIN32 // FULLSCREEN
G.windowstate = G_WINDOWSTATE_USERDEF;
#endif
@@ -154,11 +158,11 @@ static void clear_global(void)
{
// extern short winqueue_break; /* screen.c */
- free_main(G.main); /* free all lib data */
+ free_main(G.main); /* free all lib data */
// free_vertexpaint();
- G.main= NULL;
+ G.main = NULL;
}
static int clean_paths_visit_cb(void *UNUSED(userdata), char *path_dst, const char *path_src)
@@ -173,9 +177,9 @@ static void clean_paths(Main *main)
{
Scene *scene;
- bpath_traverse_main(main, clean_paths_visit_cb, BPATH_TRAVERSE_SKIP_MULTIFILE, NULL);
+ BLI_bpath_traverse_main(main, clean_paths_visit_cb, BLI_BPATH_TRAVERSE_SKIP_MULTIFILE, NULL);
- for (scene= main->scene.first; scene; scene= scene->id.next) {
+ for (scene = main->scene.first; scene; scene = scene->id.next) {
BLI_clean(scene->r.pic);
}
}
@@ -188,17 +192,17 @@ static void clean_paths(Main *main)
static void setup_app_data(bContext *C, BlendFileData *bfd, const char *filepath)
{
- bScreen *curscreen= NULL;
- Scene *curscene= NULL;
+ bScreen *curscreen = NULL;
+ Scene *curscene = NULL;
int recover;
char mode;
/* 'u' = undo save, 'n' = no UI load */
- if (bfd->main->screen.first==NULL) mode= 'u';
- else if (G.fileflags & G_FILE_NO_UI) mode= 'n';
- else mode= 0;
+ if (bfd->main->screen.first == NULL) mode = 'u';
+ else if (G.fileflags & G_FILE_NO_UI) mode = 'n';
+ else mode = 0;
- recover= (G.fileflags & G_FILE_RECOVER);
+ recover = (G.fileflags & G_FILE_RECOVER);
/* Free all render results, without this stale data gets displayed after loading files */
if (mode != 'u') {
@@ -222,12 +226,12 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, const char *filepath
SWAP(ListBase, G.main->script, bfd->main->script);
/* we re-use current screen */
- curscreen= CTX_wm_screen(C);
+ curscreen = CTX_wm_screen(C);
/* but use new Scene pointer */
- curscene= bfd->curscene;
- if (curscene==NULL) curscene= bfd->main->scene.first;
+ curscene = bfd->curscene;
+ if (curscene == NULL) curscene = bfd->main->scene.first;
/* and we enforce curscene to be in current screen */
- if (curscreen) curscreen->scene= curscene; /* can run in bgmode */
+ if (curscreen) curscreen->scene = curscene; /* can run in bgmode */
/* clear_global will free G.main, here we can still restore pointers */
lib_link_screen_restore(bfd->main, curscreen, curscene);
@@ -240,7 +244,7 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, const char *filepath
/* clear old property update cache, in case some old references are left dangling */
RNA_property_update_cache_free();
- G.main= bfd->main;
+ G.main = bfd->main;
CTX_data_main_set(C, G.main);
@@ -251,7 +255,7 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, const char *filepath
/* only here free userdef themes... */
BKE_userdef_free();
- U= *bfd->user;
+ U = *bfd->user;
MEM_freeN(bfd->user);
}
@@ -261,9 +265,9 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, const char *filepath
CTX_data_scene_set(C, curscene);
}
else {
- G.winpos= bfd->winpos;
- G.displaymode= bfd->displaymode;
- G.fileflags= bfd->fileflags;
+ G.winpos = bfd->winpos;
+ G.displaymode = bfd->displaymode;
+ G.fileflags = bfd->fileflags;
CTX_wm_manager_set(C, bfd->main->wm.first);
CTX_wm_screen_set(C, bfd->curscreen);
CTX_data_scene_set(C, bfd->curscreen->scene);
@@ -273,20 +277,25 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, const char *filepath
}
/* this can happen when active scene was lib-linked, and doesn't exist anymore */
- if (CTX_data_scene(C)==NULL) {
+ if (CTX_data_scene(C) == NULL) {
CTX_data_scene_set(C, bfd->main->scene.first);
- CTX_wm_screen(C)->scene= CTX_data_scene(C);
- curscene= CTX_data_scene(C);
+ CTX_wm_screen(C)->scene = CTX_data_scene(C);
+ curscene = CTX_data_scene(C);
}
/* special cases, override loaded flags: */
if (G.f != bfd->globalf) {
const int flags_keep = (G_SWAP_EXCHANGE | G_SCRIPT_AUTOEXEC | G_SCRIPT_OVERRIDE_PREF);
- bfd->globalf= (bfd->globalf & ~flags_keep) | (G.f & flags_keep);
+ bfd->globalf = (bfd->globalf & ~flags_keep) | (G.f & flags_keep);
}
- G.f= bfd->globalf;
+ G.f = bfd->globalf;
+
+#ifdef WITH_PYTHON
+ /* let python know about new main */
+ BPY_context_update(C);
+#endif
if (!G.background) {
//setscreen(G.curscreen);
@@ -300,12 +309,12 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, const char *filepath
if (recover && bfd->filename[0] && G.relbase_valid) {
/* in case of autosave or quit.blend, use original filename instead
* use relbase_valid to make sure the file is saved, else we get <memory2> in the filename */
- filepath= bfd->filename;
+ filepath = bfd->filename;
}
#if 0
else if (!G.relbase_valid) {
/* otherwise, use an empty string as filename, rather than <memory2> */
- filepath="";
+ filepath = "";
}
#endif
@@ -314,7 +323,7 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, const char *filepath
BLI_strncpy(G.main->name, filepath, FILE_MAX);
/* baseflags, groups, make depsgraph, etc */
- set_scene_bg(G.main, CTX_data_scene(C));
+ BKE_scene_set_background(G.main, CTX_data_scene(C));
MEM_freeN(bfd);
@@ -324,8 +333,8 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, const char *filepath
static int handle_subversion_warning(Main *main, ReportList *reports)
{
if (main->minversionfile > BLENDER_VERSION ||
- (main->minversionfile == BLENDER_VERSION &&
- main->minsubversionfile > BLENDER_SUBVERSION)) {
+ (main->minversionfile == BLENDER_VERSION &&
+ main->minsubversionfile > BLENDER_SUBVERSION)) {
BKE_reportf(reports, RPT_ERROR, "File written by newer Blender binary: %d.%d , expect loss of data!", main->minversionfile, main->minsubversionfile);
}
@@ -348,8 +357,8 @@ void BKE_userdef_free(void)
wmKeyMapItem *kmi;
wmKeyMapDiffItem *kmdi;
- for (km=U.user_keymaps.first; km; km=km->next) {
- for (kmdi=km->diff_items.first; kmdi; kmdi=kmdi->next) {
+ for (km = U.user_keymaps.first; km; km = km->next) {
+ for (kmdi = km->diff_items.first; kmdi; kmdi = kmdi->next) {
if (kmdi->add_item) {
keymap_item_free(kmdi->add_item);
MEM_freeN(kmdi->add_item);
@@ -360,7 +369,7 @@ void BKE_userdef_free(void)
}
}
- for (kmi=km->items.first; kmi; kmi=kmi->next)
+ for (kmi = km->items.first; kmi; kmi = kmi->next)
keymap_item_free(kmi);
BLI_freelistN(&km->diff_items);
@@ -377,41 +386,41 @@ void BKE_userdef_free(void)
int BKE_read_file(bContext *C, const char *filepath, ReportList *reports)
{
BlendFileData *bfd;
- int retval= BKE_READ_FILE_OK;
+ int retval = BKE_READ_FILE_OK;
- if (strstr(filepath, BLENDER_STARTUP_FILE)==NULL) /* don't print user-pref loading */
+ if (strstr(filepath, BLENDER_STARTUP_FILE) == NULL) /* don't print user-pref loading */
printf("read blend: %s\n", filepath);
- bfd= BLO_read_from_file(filepath, reports);
+ bfd = BLO_read_from_file(filepath, reports);
if (bfd) {
- if (bfd->user) retval= BKE_READ_FILE_OK_USERPREFS;
+ if (bfd->user) retval = BKE_READ_FILE_OK_USERPREFS;
- if (0==handle_subversion_warning(bfd->main, reports)) {
+ if (0 == handle_subversion_warning(bfd->main, reports)) {
free_main(bfd->main);
MEM_freeN(bfd);
- bfd= NULL;
- retval= BKE_READ_FILE_FAIL;
+ bfd = NULL;
+ retval = BKE_READ_FILE_FAIL;
}
else
- setup_app_data(C, bfd, filepath); // frees BFD
+ setup_app_data(C, bfd, filepath); // frees BFD
}
else
BKE_reports_prependf(reports, "Loading %s failed: ", filepath);
- return (bfd?retval:BKE_READ_FILE_FAIL);
+ return (bfd ? retval : BKE_READ_FILE_FAIL);
}
-int BKE_read_file_from_memory(bContext *C, char* filebuf, int filelength, ReportList *reports)
+int BKE_read_file_from_memory(bContext *C, char *filebuf, int filelength, ReportList *reports)
{
BlendFileData *bfd;
- bfd= BLO_read_from_memory(filebuf, filelength, reports);
+ bfd = BLO_read_from_memory(filebuf, filelength, reports);
if (bfd)
setup_app_data(C, bfd, "<memory2>");
else
BKE_reports_prepend(reports, "Loading failed: ");
- return (bfd?1:0);
+ return (bfd ? 1 : 0);
}
/* memfile is the undo buffer */
@@ -419,23 +428,23 @@ int BKE_read_file_from_memfile(bContext *C, MemFile *memfile, ReportList *report
{
BlendFileData *bfd;
- bfd= BLO_read_from_memfile(CTX_data_main(C), G.main->name, memfile, reports);
+ bfd = BLO_read_from_memfile(CTX_data_main(C), G.main->name, memfile, reports);
if (bfd)
setup_app_data(C, bfd, "<memory1>");
else
BKE_reports_prepend(reports, "Loading failed: ");
- return (bfd?1:0);
+ return (bfd ? 1 : 0);
}
/* ***************** testing for break ************* */
-static void (*blender_test_break_cb)(void)= NULL;
+static void (*blender_test_break_cb)(void) = NULL;
void set_blender_test_break_cb(void (*func)(void) )
{
- blender_test_break_cb= func;
+ blender_test_break_cb = func;
}
@@ -446,15 +455,15 @@ int blender_test_break(void)
blender_test_break_cb();
}
- return (G.afbreek==1);
+ return (G.afbreek == 1);
}
/* ***************** GLOBAL UNDO *************** */
-#define UNDO_DISK 0
+#define UNDO_DISK 0
-#define MAXUNDONAME 64
+#define MAXUNDONAME 64
typedef struct UndoElem {
struct UndoElem *next, *prev;
char str[FILE_MAX];
@@ -463,31 +472,31 @@ typedef struct UndoElem {
uintptr_t undosize;
} UndoElem;
-static ListBase undobase={NULL, NULL};
-static UndoElem *curundo= NULL;
+static ListBase undobase = {NULL, NULL};
+static UndoElem *curundo = NULL;
static int read_undosave(bContext *C, UndoElem *uel)
{
char mainstr[sizeof(G.main->name)];
- int success=0, fileflags;
+ int success = 0, fileflags;
/* This is needed so undoing/redoing doesn't crash with threaded previews going */
WM_jobs_stop_all(CTX_wm_manager(C));
- BLI_strncpy(mainstr, G.main->name, sizeof(mainstr)); /* temporal store */
+ BLI_strncpy(mainstr, G.main->name, sizeof(mainstr)); /* temporal store */
- fileflags= G.fileflags;
+ fileflags = G.fileflags;
G.fileflags |= G_FILE_NO_UI;
if (UNDO_DISK)
- success= (BKE_read_file(C, uel->str, NULL) != BKE_READ_FILE_FAIL);
+ success = (BKE_read_file(C, uel->str, NULL) != BKE_READ_FILE_FAIL);
else
- success= BKE_read_file_from_memfile(C, &uel->memfile, NULL);
+ success = BKE_read_file_from_memfile(C, &uel->memfile, NULL);
/* restore */
BLI_strncpy(G.main->name, mainstr, sizeof(G.main->name)); /* restore */
- G.fileflags= fileflags;
+ G.fileflags = fileflags;
if (success) {
/* important not to update time here, else non keyed tranforms are lost */
@@ -504,33 +513,33 @@ void BKE_write_undo(bContext *C, const char *name)
int nr /*, success */ /* UNUSED */;
UndoElem *uel;
- if ( (U.uiflag & USER_GLOBALUNDO)==0) return;
- if ( U.undosteps==0) return;
+ if ( (U.uiflag & USER_GLOBALUNDO) == 0) return;
+ if (U.undosteps == 0) return;
/* remove all undos after (also when curundo==NULL) */
while (undobase.last != curundo) {
- uel= undobase.last;
+ uel = undobase.last;
BLI_remlink(&undobase, uel);
BLO_free_memfile(&uel->memfile);
MEM_freeN(uel);
}
/* make new */
- curundo= uel= MEM_callocN(sizeof(UndoElem), "undo file");
+ curundo = uel = MEM_callocN(sizeof(UndoElem), "undo file");
BLI_strncpy(uel->name, name, sizeof(uel->name));
BLI_addtail(&undobase, uel);
/* and limit amount to the maximum */
- nr= 0;
- uel= undobase.last;
+ nr = 0;
+ uel = undobase.last;
while (uel) {
nr++;
- if (nr==U.undosteps) break;
- uel= uel->prev;
+ if (nr == U.undosteps) break;
+ uel = uel->prev;
}
if (uel) {
- while (undobase.first!=uel) {
- UndoElem *first= undobase.first;
+ while (undobase.first != uel) {
+ UndoElem *first = undobase.first;
BLI_remlink(&undobase, first);
/* the merge is because of compression */
BLO_merge_memfile(&first->memfile, &first->next->memfile);
@@ -541,14 +550,14 @@ void BKE_write_undo(bContext *C, const char *name)
/* disk save version */
if (UNDO_DISK) {
- static int counter= 0;
+ static int counter = 0;
char filepath[FILE_MAX];
char numstr[32];
int fileflags = G.fileflags & ~(G_FILE_HISTORY); /* don't do file history on undo */
/* calculate current filepath */
counter++;
- counter= counter % U.undosteps;
+ counter = counter % U.undosteps;
BLI_snprintf(numstr, sizeof(numstr), "%d.blend", counter);
BLI_make_file_string("/", filepath, BLI_temporary_dir(), numstr);
@@ -558,34 +567,34 @@ void BKE_write_undo(bContext *C, const char *name)
BLI_strncpy(curundo->str, filepath, sizeof(curundo->str));
}
else {
- MemFile *prevfile=NULL;
+ MemFile *prevfile = NULL;
- if (curundo->prev) prevfile= &(curundo->prev->memfile);
+ if (curundo->prev) prevfile = &(curundo->prev->memfile);
- memused= MEM_get_memory_in_use();
+ memused = MEM_get_memory_in_use();
/* success= */ /* UNUSED */ BLO_write_file_mem(CTX_data_main(C), prevfile, &curundo->memfile, G.fileflags);
- curundo->undosize= MEM_get_memory_in_use() - memused;
+ curundo->undosize = MEM_get_memory_in_use() - memused;
}
if (U.undomemory != 0) {
/* limit to maximum memory (afterwards, we can't know in advance) */
- totmem= 0;
- maxmem= ((uintptr_t)U.undomemory)*1024*1024;
+ totmem = 0;
+ maxmem = ((uintptr_t)U.undomemory) * 1024 * 1024;
/* keep at least two (original + other) */
- uel= undobase.last;
+ uel = undobase.last;
while (uel && uel->prev) {
- totmem+= uel->undosize;
- if (totmem>maxmem) break;
- uel= uel->prev;
+ totmem += uel->undosize;
+ if (totmem > maxmem) break;
+ uel = uel->prev;
}
if (uel) {
if (uel->prev && uel->prev->prev)
- uel= uel->prev;
+ uel = uel->prev;
- while (undobase.first!=uel) {
- UndoElem *first= undobase.first;
+ while (undobase.first != uel) {
+ UndoElem *first = undobase.first;
BLI_remlink(&undobase, first);
/* the merge is because of compression */
BLO_merge_memfile(&first->memfile, &first->next->memfile);
@@ -599,25 +608,25 @@ void BKE_write_undo(bContext *C, const char *name)
void BKE_undo_step(bContext *C, int step)
{
- if (step==0) {
+ if (step == 0) {
read_undosave(C, curundo);
}
- else if (step==1) {
+ else if (step == 1) {
/* curundo should never be NULL, after restart or load file it should call undo_save */
- if (curundo==NULL || curundo->prev==NULL) ; // XXX error("No undo available");
+ if (curundo == NULL || curundo->prev == NULL) ; // XXX error("No undo available");
else {
if (G.debug & G_DEBUG) printf("undo %s\n", curundo->name);
- curundo= curundo->prev;
+ curundo = curundo->prev;
read_undosave(C, curundo);
}
}
else {
/* curundo has to remain current situation! */
- if (curundo==NULL || curundo->next==NULL) ; // XXX error("No redo available");
+ if (curundo == NULL || curundo->next == NULL) ; // XXX error("No redo available");
else {
read_undosave(C, curundo->next);
- curundo= curundo->next;
+ curundo = curundo->next;
if (G.debug & G_DEBUG) printf("redo %s\n", curundo->name);
}
}
@@ -627,30 +636,30 @@ void BKE_reset_undo(void)
{
UndoElem *uel;
- uel= undobase.first;
+ uel = undobase.first;
while (uel) {
BLO_free_memfile(&uel->memfile);
- uel= uel->next;
+ uel = uel->next;
}
BLI_freelistN(&undobase);
- curundo= NULL;
+ curundo = NULL;
}
/* based on index nr it does a restore */
void BKE_undo_number(bContext *C, int nr)
{
- curundo= BLI_findlink(&undobase, nr);
+ curundo = BLI_findlink(&undobase, nr);
BKE_undo_step(C, 0);
}
/* go back to the last occurance of name in stack */
void BKE_undo_name(bContext *C, const char *name)
{
- UndoElem *uel= BLI_rfindstring(&undobase, name, offsetof(UndoElem, name));
+ UndoElem *uel = BLI_rfindstring(&undobase, name, offsetof(UndoElem, name));
if (uel && uel->prev) {
- curundo= uel->prev;
+ curundo = uel->prev;
BKE_undo_step(C, 0);
}
}
@@ -659,7 +668,7 @@ void BKE_undo_name(bContext *C, const char *name)
int BKE_undo_valid(const char *name)
{
if (name) {
- UndoElem *uel= BLI_rfindstring(&undobase, name, offsetof(UndoElem, name));
+ UndoElem *uel = BLI_rfindstring(&undobase, name, offsetof(UndoElem, name));
return uel && uel->prev;
}
@@ -670,13 +679,13 @@ int BKE_undo_valid(const char *name)
/* if active pointer, set it to 1 if true */
const char *BKE_undo_get_name(int nr, int *active)
{
- UndoElem *uel= BLI_findlink(&undobase, nr);
+ UndoElem *uel = BLI_findlink(&undobase, nr);
- if (active) *active= 0;
+ if (active) *active = 0;
if (uel) {
- if (active && uel==curundo)
- *active= 1;
+ if (active && uel == curundo)
+ *active = 1;
return uel->name;
}
return NULL;
@@ -685,23 +694,23 @@ const char *BKE_undo_get_name(int nr, int *active)
char *BKE_undo_menu_string(void)
{
UndoElem *uel;
- DynStr *ds= BLI_dynstr_new();
+ DynStr *ds = BLI_dynstr_new();
char *menu;
BLI_dynstr_append(ds, "Global Undo History %t");
- for (uel= undobase.first; uel; uel= uel->next) {
+ for (uel = undobase.first; uel; uel = uel->next) {
BLI_dynstr_append(ds, "|");
BLI_dynstr_append(ds, uel->name);
}
- menu= BLI_dynstr_get_cstring(ds);
+ menu = BLI_dynstr_get_cstring(ds);
BLI_dynstr_free(ds);
return menu;
}
- /* saves quit.blend */
+/* saves quit.blend */
void BKE_undo_save_quit(void)
{
UndoElem *uel;
@@ -709,47 +718,47 @@ void BKE_undo_save_quit(void)
int file;
char str[FILE_MAX];
- if ( (U.uiflag & USER_GLOBALUNDO)==0) return;
+ if ( (U.uiflag & USER_GLOBALUNDO) == 0) return;
- uel= curundo;
- if (uel==NULL) {
+ uel = curundo;
+ if (uel == NULL) {
printf("No undo buffer to save recovery file\n");
return;
}
/* no undo state to save */
- if (undobase.first==undobase.last) return;
+ if (undobase.first == undobase.last) return;
BLI_make_file_string("/", str, BLI_temporary_dir(), "quit.blend");
- file = BLI_open(str,O_BINARY+O_WRONLY+O_CREAT+O_TRUNC, 0666);
+ file = BLI_open(str, O_BINARY + O_WRONLY + O_CREAT + O_TRUNC, 0666);
if (file == -1) {
//XXX error("Unable to save %s, check you have permissions", str);
return;
}
- chunk= uel->memfile.chunks.first;
+ chunk = uel->memfile.chunks.first;
while (chunk) {
- if ( write(file, chunk->buf, chunk->size) != chunk->size) break;
- chunk= chunk->next;
+ if (write(file, chunk->buf, chunk->size) != chunk->size) break;
+ chunk = chunk->next;
}
close(file);
- if (chunk) ; //XXX error("Unable to save %s, internal error", str);
+ if (chunk) ; //XXX error("Unable to save %s, internal error", str);
else printf("Saved session recovery to %s\n", str);
}
/* sets curscene */
Main *BKE_undo_get_main(Scene **scene)
{
- Main *mainp= NULL;
- BlendFileData *bfd= BLO_read_from_memfile(G.main, G.main->name, &curundo->memfile, NULL);
+ Main *mainp = NULL;
+ BlendFileData *bfd = BLO_read_from_memfile(G.main, G.main->name, &curundo->memfile, NULL);
if (bfd) {
- mainp= bfd->main;
+ mainp = bfd->main;
if (scene)
- *scene= bfd->curscene;
+ *scene = bfd->curscene;
MEM_freeN(bfd);
}
diff --git a/source/blender/blenkernel/intern/bmfont.c b/source/blender/blenkernel/intern/bmfont.c
index 04ac6cbfb4c..e1f4e45e9c3 100644
--- a/source/blender/blenkernel/intern/bmfont.c
+++ b/source/blender/blenkernel/intern/bmfont.c
@@ -65,8 +65,8 @@ void printfGlyph(bmGlyph * glyph)
printf(" advan: %3d reser: %3d\n", glyph->advance, glyph->reserved);
}
-#define MAX2(x,y) ( (x)>(y) ? (x) : (y) )
-#define MAX3(x,y,z) MAX2( MAX2((x),(y)) , (z) )
+#define MAX2(x,y) ((x) > (y) ? (x) : (y))
+#define MAX3(x,y,z) MAX2(MAX2((x), (y)), (z))
void calcAlpha(ImBuf * ibuf)
{
diff --git a/source/blender/blenkernel/intern/boids.c b/source/blender/blenkernel/intern/boids.c
index a556c99dc7d..014b3f5e40b 100644
--- a/source/blender/blenkernel/intern/boids.c
+++ b/source/blender/blenkernel/intern/boids.c
@@ -230,8 +230,8 @@ static int rule_avoid_collision(BoidRule *rule, BoidBrainData *bbd, BoidValues *
/* avoid head-on collision */
if (dot_v3v3(col.pce.nor, pa->prev_state.ave) < -0.99f) {
- /* don't know why, but uneven range [0.0,1.0] */
- /* works much better than even [-1.0,1.0] */
+ /* don't know why, but uneven range [0.0, 1.0] */
+ /* works much better than even [-1.0, 1.0] */
bbd->wanted_co[0] = BLI_frand();
bbd->wanted_co[1] = BLI_frand();
bbd->wanted_co[2] = BLI_frand();
@@ -262,7 +262,7 @@ static int rule_avoid_collision(BoidRule *rule, BoidBrainData *bbd, BoidValues *
sub_v3_v3v3(vec, vel1, vel2);
- inp = dot_v3v3(vec,vec);
+ inp = dot_v3v3(vec, vec);
/* velocities not parallel */
if (inp != 0.0f) {
@@ -308,7 +308,7 @@ static int rule_avoid_collision(BoidRule *rule, BoidBrainData *bbd, BoidValues *
sub_v3_v3v3(vec, vel1, vel2);
- inp = dot_v3v3(vec,vec);
+ inp = dot_v3v3(vec, vec);
/* velocities not parallel */
if (inp != 0.0f) {
@@ -583,7 +583,7 @@ static int rule_average_speed(BoidRule *rule, BoidBrainData *bbd, BoidValues *va
copy_v3_v3(bbd->wanted_co, pa->prev_state.ave);
/* may happen at birth */
- if (dot_v2v2(bbd->wanted_co,bbd->wanted_co)==0.0f) {
+ if (dot_v2v2(bbd->wanted_co, bbd->wanted_co)==0.0f) {
bbd->wanted_co[0] = 2.0f*(0.5f - BLI_frand());
bbd->wanted_co[1] = 2.0f*(0.5f - BLI_frand());
bbd->wanted_co[2] = 2.0f*(0.5f - BLI_frand());
@@ -610,7 +610,7 @@ static int rule_fight(BoidRule *rule, BoidBrainData *bbd, BoidValues *val, Parti
ParticleData *enemy_pa = NULL;
BoidParticle *bpa;
/* friends & enemies */
- float closest_enemy[3] = {0.0f,0.0f,0.0f};
+ float closest_enemy[3] = {0.0f, 0.0f, 0.0f};
float closest_dist = fbr->distance + 1.0f;
float f_strength = 0.0f, e_strength = 0.0f;
float health = 0.0f;
@@ -748,7 +748,7 @@ static Object *boid_find_ground(BoidBrainData *bbd, ParticleData *pa, float grou
SurfaceModifierData *surmd = NULL;
float x[3], v[3];
- surmd = (SurfaceModifierData *)modifiers_findByType ( bpa->ground, eModifierType_Surface );
+ surmd = (SurfaceModifierData *)modifiers_findByType(bpa->ground, eModifierType_Surface );
/* take surface velocity into account */
closest_point_on_surface(surmd, pa->state.co, x, NULL, v);
@@ -962,7 +962,7 @@ void boid_brain(BoidBrainData *bbd, int p, ParticleData *pa)
set_boid_values(&val, bbd->part->boids, pa);
/* go through rules */
- switch(state->ruleset_type) {
+ switch (state->ruleset_type) {
case eBoidRulesetType_Fuzzy:
{
for (rule = state->rules.first; rule; rule = rule->next) {
@@ -1096,7 +1096,7 @@ void boid_body(BoidBrainData *bbd, ParticleData *pa)
set_boid_values(&val, boids, pa);
/* make sure there's something in new velocity, location & rotation */
- copy_particle_key(&pa->state,&pa->prev_state,0);
+ copy_particle_key(&pa->state, &pa->prev_state, 0);
if (bbd->part->flag & PART_SIZEMASS)
pa_mass*=pa->size;
@@ -1170,13 +1170,13 @@ void boid_body(BoidBrainData *bbd, ParticleData *pa)
angle = MIN2(angle, val.max_ave);
cross_v3_v3v3(nor, old_dir, wanted_dir);
- axis_angle_to_quat( q,nor, angle);
+ axis_angle_to_quat(q, nor, angle);
copy_v3_v3(new_dir, old_dir);
mul_qt_v3(q, new_dir);
normalize_v3(new_dir);
/* save direction in case resulting velocity too small */
- axis_angle_to_quat( q,nor, angle*dtime);
+ axis_angle_to_quat(q, nor, angle*dtime);
copy_v3_v3(pa->state.ave, old_dir);
mul_qt_v3(q, pa->state.ave);
normalize_v3(pa->state.ave);
@@ -1196,7 +1196,7 @@ void boid_body(BoidBrainData *bbd, ParticleData *pa)
/* maintain minimum flying velocity if not landing */
if (level >= landing_level) {
- float len2 = dot_v2v2(new_vel,new_vel);
+ float len2 = dot_v2v2(new_vel, new_vel);
float root;
len2 = MAX2(len2, val.min_speed*val.min_speed);
@@ -1258,7 +1258,7 @@ void boid_body(BoidBrainData *bbd, ParticleData *pa)
bpa->ground = boid_find_ground(bbd, pa, ground_co, ground_nor);
/* change modes, constrain movement & keep track of down vector */
- switch(bpa->data.mode) {
+ switch (bpa->data.mode) {
case eBoidMode_InAir:
{
float grav[3];
@@ -1427,7 +1427,7 @@ void boid_body(BoidBrainData *bbd, ParticleData *pa)
cross_v3_v3v3(mat[1], mat[2], mat[0]);
/* apply rotation */
- mat3_to_quat_is_ok( q,mat);
+ mat3_to_quat_is_ok(q, mat);
copy_qt_qt(pa->state.rot, q);
}
@@ -1437,7 +1437,7 @@ BoidRule *boid_new_rule(int type)
if (type <= 0)
return NULL;
- switch(type) {
+ switch (type) {
case eBoidRuleType_Goal:
case eBoidRuleType_Avoid:
rule = MEM_callocN(sizeof(BoidRuleGoalAvoid), "BoidRuleGoalAvoid");
diff --git a/source/blender/blenkernel/intern/booleanops_mesh.c b/source/blender/blenkernel/intern/booleanops_mesh.c
index 31c90d54d14..972793227a8 100644
--- a/source/blender/blenkernel/intern/booleanops_mesh.c
+++ b/source/blender/blenkernel/intern/booleanops_mesh.c
@@ -1,7 +1,5 @@
#if 0
-
/*
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -80,7 +78,7 @@ MakeCSGMeshFromBlenderBase(
Mesh *me;
if (output == NULL || base == NULL) return 0;
- me = get_mesh(base->object);
+ me = BKE_mesh_from_object(base->object);
output->m_descriptor.user_face_vertex_data_size = 0;
output->m_descriptor.user_data_size = sizeof(FaceData);
@@ -107,7 +105,7 @@ CSG_LoadBlenderMesh(
Mesh *me;
if (output == NULL || obj == NULL) return 0;
- me = get_mesh(obj);
+ me = BKE_mesh_from_object(obj);
output->m_descriptor.user_face_vertex_data_size = 0;
output->m_descriptor.user_data_size = sizeof(FaceData);
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index e7ba09d3959..f019287144d 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -67,7 +67,7 @@
#include "RE_render_ext.h" /* externtex */
#include "RE_shader_ext.h"
-static void brush_set_defaults(Brush *brush)
+static void brush_defaults(Brush *brush)
{
brush->blend = 0;
brush->flag = 0;
@@ -75,86 +75,87 @@ static void brush_set_defaults(Brush *brush)
brush->ob_mode = OB_MODE_ALL_PAINT;
/* BRUSH SCULPT TOOL SETTINGS */
- brush->size= 35; /* radius of the brush in pixels */
- brush->alpha= 0.5f; /* brush strength/intensity probably variable should be renamed? */
- brush->autosmooth_factor= 0.0f;
- brush->crease_pinch_factor= 0.5f;
+ brush->weight = 1.0f; /* weight of brush 0 - 1.0 */
+ brush->size = 35; /* radius of the brush in pixels */
+ brush->alpha = 0.5f; /* brush strength/intensity probably variable should be renamed? */
+ brush->autosmooth_factor = 0.0f;
+ brush->crease_pinch_factor = 0.5f;
brush->sculpt_plane = SCULPT_DISP_DIR_AREA;
- brush->plane_offset= 0.0f; /* how far above or below the plane that is found by averaging the faces */
- brush->plane_trim= 0.5f;
- brush->clone.alpha= 0.5f;
- brush->normal_weight= 0.0f;
+ brush->plane_offset = 0.0f; /* how far above or below the plane that is found by averaging the faces */
+ brush->plane_trim = 0.5f;
+ brush->clone.alpha = 0.5f;
+ brush->normal_weight = 0.0f;
brush->flag |= BRUSH_ALPHA_PRESSURE;
/* BRUSH PAINT TOOL SETTINGS */
- brush->rgb[0]= 1.0f; /* default rgb color of the brush when painting - white */
- brush->rgb[1]= 1.0f;
- brush->rgb[2]= 1.0f;
+ brush->rgb[0] = 1.0f; /* default rgb color of the brush when painting - white */
+ brush->rgb[1] = 1.0f;
+ brush->rgb[2] = 1.0f;
/* BRUSH STROKE SETTINGS */
- brush->flag |= (BRUSH_SPACE|BRUSH_SPACE_ATTEN);
- brush->spacing= 10; /* how far each brush dot should be spaced as a percentage of brush diameter */
+ brush->flag |= (BRUSH_SPACE | BRUSH_SPACE_ATTEN);
+ brush->spacing = 10; /* how far each brush dot should be spaced as a percentage of brush diameter */
- brush->smooth_stroke_radius= 75;
- brush->smooth_stroke_factor= 0.9f;
+ brush->smooth_stroke_radius = 75;
+ brush->smooth_stroke_factor = 0.9f;
- brush->rate= 0.1f; /* time delay between dots of paint or sculpting when doing airbrush mode */
+ brush->rate = 0.1f; /* time delay between dots of paint or sculpting when doing airbrush mode */
- brush->jitter= 0.0f;
+ brush->jitter = 0.0f;
/* BRUSH TEXTURE SETTINGS */
default_mtex(&brush->mtex);
- brush->texture_sample_bias= 0; /* value to added to texture samples */
- brush->texture_overlay_alpha= 33;
+ brush->texture_sample_bias = 0; /* value to added to texture samples */
+ brush->texture_overlay_alpha = 33;
/* brush appearance */
- brush->add_col[0]= 1.00; /* add mode color is light red */
- brush->add_col[1]= 0.39;
- brush->add_col[2]= 0.39;
+ brush->add_col[0] = 1.00; /* add mode color is light red */
+ brush->add_col[1] = 0.39;
+ brush->add_col[2] = 0.39;
- brush->sub_col[0]= 0.39; /* subtract mode color is light blue */
- brush->sub_col[1]= 0.39;
- brush->sub_col[2]= 1.00;
+ brush->sub_col[0] = 0.39; /* subtract mode color is light blue */
+ brush->sub_col[1] = 0.39;
+ brush->sub_col[2] = 1.00;
}
/* Datablock add/copy/free/make_local */
-Brush *add_brush(const char *name)
+Brush *BKE_brush_add(const char *name)
{
Brush *brush;
- brush= alloc_libblock(&G.main->brush, ID_BR, name);
+ brush = BKE_libblock_alloc(&G.main->brush, ID_BR, name);
/* enable fake user by default */
brush->id.flag |= LIB_FAKEUSER;
- brush_set_defaults(brush);
+ brush_defaults(brush);
brush->sculpt_tool = SCULPT_TOOL_DRAW; /* sculpting defaults to the draw tool for new brushes */
- /* the default alpha falloff curve */
- brush_curve_preset(brush, CURVE_PRESET_SMOOTH);
+ /* the default alpha falloff curve */
+ BKE_brush_curve_preset(brush, CURVE_PRESET_SMOOTH);
return brush;
}
-Brush *copy_brush(Brush *brush)
+Brush *BKE_brush_copy(Brush *brush)
{
Brush *brushn;
- brushn= copy_libblock(&brush->id);
+ brushn = BKE_libblock_copy(&brush->id);
if (brush->mtex.tex)
- id_us_plus((ID*)brush->mtex.tex);
+ id_us_plus((ID *)brush->mtex.tex);
if (brush->icon_imbuf)
- brushn->icon_imbuf= IMB_dupImBuf(brush->icon_imbuf);
+ brushn->icon_imbuf = IMB_dupImBuf(brush->icon_imbuf);
brushn->preview = NULL;
- brushn->curve= curvemapping_copy(brush->curve);
+ brushn->curve = curvemapping_copy(brush->curve);
/* enable fake user by default */
if (!(brushn->id.flag & LIB_FAKEUSER)) {
@@ -166,7 +167,7 @@ Brush *copy_brush(Brush *brush)
}
/* not brush itself */
-void free_brush(Brush *brush)
+void BKE_brush_free(Brush *brush)
{
if (brush->mtex.tex)
brush->mtex.tex->id.us--;
@@ -185,7 +186,7 @@ static void extern_local_brush(Brush *brush)
id_lib_extern((ID *)brush->clone.image);
}
-void make_local_brush(Brush *brush)
+void BKE_brush_make_local(Brush *brush)
{
/* - only lib users: do nothing
@@ -193,11 +194,11 @@ void make_local_brush(Brush *brush)
* - mixed: make copy
*/
- Main *bmain= G.main;
+ Main *bmain = G.main;
Scene *scene;
- int is_local= FALSE, is_lib= FALSE;
+ int is_local = FALSE, is_lib = FALSE;
- if (brush->id.lib==NULL) return;
+ if (brush->id.lib == NULL) return;
if (brush->clone.image) {
/* special case: ima always local immediately. Clone image should only
@@ -206,10 +207,10 @@ void make_local_brush(Brush *brush)
extern_local_brush(brush);
}
- for (scene= bmain->scene.first; scene && ELEM(0, is_lib, is_local); scene=scene->id.next) {
- if (paint_brush(&scene->toolsettings->imapaint.paint)==brush) {
- if (scene->id.lib) is_lib= TRUE;
- else is_local= TRUE;
+ for (scene = bmain->scene.first; scene && ELEM(0, is_lib, is_local); scene = scene->id.next) {
+ if (paint_brush(&scene->toolsettings->imapaint.paint) == brush) {
+ if (scene->id.lib) is_lib = TRUE;
+ else is_local = TRUE;
}
}
@@ -224,16 +225,16 @@ void make_local_brush(Brush *brush)
}
}
else if (is_local && is_lib) {
- Brush *brush_new= copy_brush(brush);
- brush_new->id.us= 1; /* only keep fake user */
+ Brush *brush_new = BKE_brush_copy(brush);
+ brush_new->id.us = 1; /* only keep fake user */
brush_new->id.flag |= LIB_FAKEUSER;
/* Remap paths of new ID using old library as base. */
BKE_id_lib_local_paths(bmain, brush->id.lib, &brush_new->id);
- for (scene= bmain->scene.first; scene; scene=scene->id.next) {
- if (paint_brush(&scene->toolsettings->imapaint.paint)==brush) {
- if (scene->id.lib==NULL) {
+ for (scene = bmain->scene.first; scene; scene = scene->id.next) {
+ if (paint_brush(&scene->toolsettings->imapaint.paint) == brush) {
+ if (scene->id.lib == NULL) {
paint_brush_set(&scene->toolsettings->imapaint.paint, brush_new);
}
}
@@ -241,19 +242,19 @@ void make_local_brush(Brush *brush)
}
}
-void brush_debug_print_state(Brush *br)
+void BKE_brush_debug_print_state(Brush *br)
{
/* create a fake brush and set it to the defaults */
- Brush def= {{NULL}};
- brush_set_defaults(&def);
+ Brush def = {{NULL}};
+ brush_defaults(&def);
#define BR_TEST(field, t) \
if (br->field != def.field) \
printf("br->" #field " = %" #t ";\n", br->field)
-#define BR_TEST_FLAG(_f) \
+#define BR_TEST_FLAG(_f) \
if ((br->flag & _f) && !(def.flag & _f)) \
- printf("br->flag |= " #_f ";\n"); \
+ printf("br->flag |= " #_f ";\n"); \
else if (!(br->flag & _f) && (def.flag & _f)) \
printf("br->flag &= ~" #_f ";\n")
@@ -328,87 +329,87 @@ void brush_debug_print_state(Brush *br)
#undef BR_TEST_FLAG
}
-void brush_reset_sculpt(Brush *br)
+void BKE_brush_sculpt_reset(Brush *br)
{
/* enable this to see any non-default
* settings used by a brush: */
- // brush_debug_print_state(br);
-
- brush_set_defaults(br);
- brush_curve_preset(br, CURVE_PRESET_SMOOTH);
-
- switch(br->sculpt_tool) {
- case SCULPT_TOOL_CLAY:
- br->flag |= BRUSH_FRONTFACE;
- break;
- case SCULPT_TOOL_CREASE:
- br->flag |= BRUSH_DIR_IN;
- br->alpha = 0.25;
- break;
- case SCULPT_TOOL_FILL:
- br->add_col[1] = 1;
- br->sub_col[0] = 0.25;
- br->sub_col[1] = 1;
- break;
- case SCULPT_TOOL_FLATTEN:
- br->add_col[1] = 1;
- br->sub_col[0] = 0.25;
- br->sub_col[1] = 1;
- break;
- case SCULPT_TOOL_INFLATE:
- br->add_col[0] = 0.750000;
- br->add_col[1] = 0.750000;
- br->add_col[2] = 0.750000;
- br->sub_col[0] = 0.250000;
- br->sub_col[1] = 0.250000;
- br->sub_col[2] = 0.250000;
- break;
- case SCULPT_TOOL_NUDGE:
- br->add_col[0] = 0.250000;
- br->add_col[1] = 1.000000;
- br->add_col[2] = 0.250000;
- break;
- case SCULPT_TOOL_PINCH:
- br->add_col[0] = 0.750000;
- br->add_col[1] = 0.750000;
- br->add_col[2] = 0.750000;
- br->sub_col[0] = 0.250000;
- br->sub_col[1] = 0.250000;
- br->sub_col[2] = 0.250000;
- break;
- case SCULPT_TOOL_SCRAPE:
- br->add_col[1] = 1.000000;
- br->sub_col[0] = 0.250000;
- br->sub_col[1] = 1.000000;
- break;
- case SCULPT_TOOL_ROTATE:
- br->alpha = 1.0;
- break;
- case SCULPT_TOOL_SMOOTH:
- br->flag &= ~BRUSH_SPACE_ATTEN;
- br->spacing = 5;
- br->add_col[0] = 0.750000;
- br->add_col[1] = 0.750000;
- br->add_col[2] = 0.750000;
- break;
- case SCULPT_TOOL_GRAB:
- case SCULPT_TOOL_SNAKE_HOOK:
- case SCULPT_TOOL_THUMB:
- br->size = 75;
- br->flag &= ~BRUSH_ALPHA_PRESSURE;
- br->flag &= ~BRUSH_SPACE;
- br->flag &= ~BRUSH_SPACE_ATTEN;
- br->add_col[0] = 0.250000;
- br->add_col[1] = 1.000000;
- br->add_col[2] = 0.250000;
- break;
- default:
- break;
+ // BKE_brush_debug_print_state(br);
+
+ brush_defaults(br);
+ BKE_brush_curve_preset(br, CURVE_PRESET_SMOOTH);
+
+ switch (br->sculpt_tool) {
+ case SCULPT_TOOL_CLAY:
+ br->flag |= BRUSH_FRONTFACE;
+ break;
+ case SCULPT_TOOL_CREASE:
+ br->flag |= BRUSH_DIR_IN;
+ br->alpha = 0.25;
+ break;
+ case SCULPT_TOOL_FILL:
+ br->add_col[1] = 1;
+ br->sub_col[0] = 0.25;
+ br->sub_col[1] = 1;
+ break;
+ case SCULPT_TOOL_FLATTEN:
+ br->add_col[1] = 1;
+ br->sub_col[0] = 0.25;
+ br->sub_col[1] = 1;
+ break;
+ case SCULPT_TOOL_INFLATE:
+ br->add_col[0] = 0.750000;
+ br->add_col[1] = 0.750000;
+ br->add_col[2] = 0.750000;
+ br->sub_col[0] = 0.250000;
+ br->sub_col[1] = 0.250000;
+ br->sub_col[2] = 0.250000;
+ break;
+ case SCULPT_TOOL_NUDGE:
+ br->add_col[0] = 0.250000;
+ br->add_col[1] = 1.000000;
+ br->add_col[2] = 0.250000;
+ break;
+ case SCULPT_TOOL_PINCH:
+ br->add_col[0] = 0.750000;
+ br->add_col[1] = 0.750000;
+ br->add_col[2] = 0.750000;
+ br->sub_col[0] = 0.250000;
+ br->sub_col[1] = 0.250000;
+ br->sub_col[2] = 0.250000;
+ break;
+ case SCULPT_TOOL_SCRAPE:
+ br->add_col[1] = 1.000000;
+ br->sub_col[0] = 0.250000;
+ br->sub_col[1] = 1.000000;
+ break;
+ case SCULPT_TOOL_ROTATE:
+ br->alpha = 1.0;
+ break;
+ case SCULPT_TOOL_SMOOTH:
+ br->flag &= ~BRUSH_SPACE_ATTEN;
+ br->spacing = 5;
+ br->add_col[0] = 0.750000;
+ br->add_col[1] = 0.750000;
+ br->add_col[2] = 0.750000;
+ break;
+ case SCULPT_TOOL_GRAB:
+ case SCULPT_TOOL_SNAKE_HOOK:
+ case SCULPT_TOOL_THUMB:
+ br->size = 75;
+ br->flag &= ~BRUSH_ALPHA_PRESSURE;
+ br->flag &= ~BRUSH_SPACE;
+ br->flag &= ~BRUSH_SPACE_ATTEN;
+ br->add_col[0] = 0.250000;
+ br->add_col[1] = 1.000000;
+ br->add_col[2] = 0.250000;
+ break;
+ default:
+ break;
}
}
/* Library Operations */
-void brush_curve_preset(Brush *b, /*CurveMappingPreset*/int preset)
+void BKE_brush_curve_preset(Brush *b, /*CurveMappingPreset*/ int preset)
{
CurveMap *cm = NULL;
@@ -423,22 +424,22 @@ void brush_curve_preset(Brush *b, /*CurveMappingPreset*/int preset)
curvemapping_changed(b->curve, 0);
}
-int brush_texture_set_nr(Brush *brush, int nr)
+int BKE_brush_texture_set_nr(Brush *brush, int nr)
{
- ID *idtest, *id=NULL;
+ ID *idtest, *id = NULL;
- id= (ID *)brush->mtex.tex;
+ id = (ID *)brush->mtex.tex;
- idtest= (ID*)BLI_findlink(&G.main->tex, nr-1);
- if (idtest==NULL) { /* new tex */
- if (id) idtest= (ID *)copy_texture((Tex *)id);
- else idtest= (ID *)add_texture("Tex");
+ idtest = (ID *)BLI_findlink(&G.main->tex, nr - 1);
+ if (idtest == NULL) { /* new tex */
+ if (id) idtest = (ID *)BKE_texture_copy((Tex *)id);
+ else idtest = (ID *)add_texture("Tex");
idtest->us--;
}
- if (idtest!=id) {
- brush_texture_delete(brush);
+ if (idtest != id) {
+ BKE_brush_texture_delete(brush);
- brush->mtex.tex= (Tex*)idtest;
+ brush->mtex.tex = (Tex *)idtest;
id_us_plus(idtest);
return 1;
@@ -447,7 +448,7 @@ int brush_texture_set_nr(Brush *brush, int nr)
return 0;
}
-int brush_texture_delete(Brush *brush)
+int BKE_brush_texture_delete(Brush *brush)
{
if (brush->mtex.tex)
brush->mtex.tex->id.us--;
@@ -455,16 +456,16 @@ int brush_texture_delete(Brush *brush)
return 1;
}
-int brush_clone_image_set_nr(Brush *brush, int nr)
+int BKE_brush_clone_image_set_nr(Brush *brush, int nr)
{
if (brush && nr > 0) {
- Image *ima= (Image*)BLI_findlink(&G.main->image, nr-1);
+ Image *ima = (Image *)BLI_findlink(&G.main->image, nr - 1);
if (ima) {
- brush_clone_image_delete(brush);
- brush->clone.image= ima;
+ BKE_brush_clone_image_delete(brush);
+ brush->clone.image = ima;
id_us_plus(&ima->id);
- brush->clone.offset[0]= brush->clone.offset[1]= 0.0f;
+ brush->clone.offset[0] = brush->clone.offset[1] = 0.0f;
return 1;
}
@@ -473,11 +474,11 @@ int brush_clone_image_set_nr(Brush *brush, int nr)
return 0;
}
-int brush_clone_image_delete(Brush *brush)
+int BKE_brush_clone_image_delete(Brush *brush)
{
if (brush && brush->clone.image) {
brush->clone.image->id.us--;
- brush->clone.image= NULL;
+ brush->clone.image = NULL;
return 1;
}
@@ -485,59 +486,59 @@ int brush_clone_image_delete(Brush *brush)
}
/* Brush Sampling */
-void brush_sample_tex(const Scene *scene, Brush *brush, const float xy[2], float rgba[4], const int thread)
+void BKE_brush_sample_tex(const Scene *scene, Brush *brush, const float xy[2], float rgba[4], const int thread)
{
- MTex *mtex= &brush->mtex;
+ MTex *mtex = &brush->mtex;
if (mtex && mtex->tex) {
float co[3], tin, tr, tg, tb, ta;
int hasrgb;
- const int radius= brush_size(scene, brush);
+ const int radius = BKE_brush_size_get(scene, brush);
- co[0]= xy[0]/radius;
- co[1]= xy[1]/radius;
- co[2]= 0.0f;
+ co[0] = xy[0] / radius;
+ co[1] = xy[1] / radius;
+ co[2] = 0.0f;
- hasrgb= externtex(mtex, co, &tin, &tr, &tg, &tb, &ta, thread);
+ hasrgb = externtex(mtex, co, &tin, &tr, &tg, &tb, &ta, thread);
if (hasrgb) {
- rgba[0]= tr;
- rgba[1]= tg;
- rgba[2]= tb;
- rgba[3]= ta;
+ rgba[0] = tr;
+ rgba[1] = tg;
+ rgba[2] = tb;
+ rgba[3] = ta;
}
else {
- rgba[0]= tin;
- rgba[1]= tin;
- rgba[2]= tin;
- rgba[3]= 1.0f;
+ rgba[0] = tin;
+ rgba[1] = tin;
+ rgba[2] = tin;
+ rgba[3] = 1.0f;
}
}
else {
- rgba[0]= rgba[1]= rgba[2]= rgba[3]= 1.0f;
+ rgba[0] = rgba[1] = rgba[2] = rgba[3] = 1.0f;
}
}
/* TODO, use define for 'texfall' arg */
-void brush_imbuf_new(const Scene *scene, Brush *brush, short flt, short texfall, int bufsize, ImBuf **outbuf, int use_color_correction)
+void BKE_brush_imbuf_new(const Scene *scene, Brush *brush, short flt, short texfall, int bufsize, ImBuf **outbuf, int use_color_correction)
{
ImBuf *ibuf;
float xy[2], rgba[4], *dstf;
int x, y, rowbytes, xoff, yoff, imbflag;
- const int radius= brush_size(scene, brush);
+ const int radius = BKE_brush_size_get(scene, brush);
unsigned char *dst, crgb[3];
- const float alpha= brush_alpha(scene, brush);
+ const float alpha = BKE_brush_alpha_get(scene, brush);
float brush_rgb[3];
- imbflag= (flt)? IB_rectfloat: IB_rect;
- xoff = -bufsize/2.0f + 0.5f;
- yoff = -bufsize/2.0f + 0.5f;
- rowbytes= bufsize*4;
+ imbflag = (flt) ? IB_rectfloat : IB_rect;
+ xoff = -bufsize / 2.0f + 0.5f;
+ yoff = -bufsize / 2.0f + 0.5f;
+ rowbytes = bufsize * 4;
if (*outbuf)
- ibuf= *outbuf;
+ ibuf = *outbuf;
else
- ibuf= IMB_allocImBuf(bufsize, bufsize, 32, imbflag);
+ ibuf = IMB_allocImBuf(bufsize, bufsize, 32, imbflag);
if (flt) {
copy_v3_v3(brush_rgb, brush->rgb);
@@ -545,24 +546,24 @@ void brush_imbuf_new(const Scene *scene, Brush *brush, short flt, short texfall,
srgb_to_linearrgb_v3_v3(brush_rgb, brush_rgb);
}
- for (y=0; y < ibuf->y; y++) {
- dstf = ibuf->rect_float + y*rowbytes;
+ for (y = 0; y < ibuf->y; y++) {
+ dstf = ibuf->rect_float + y * rowbytes;
- for (x=0; x < ibuf->x; x++, dstf+=4) {
+ for (x = 0; x < ibuf->x; x++, dstf += 4) {
xy[0] = x + xoff;
xy[1] = y + yoff;
if (texfall == 0) {
copy_v3_v3(dstf, brush_rgb);
- dstf[3]= alpha*brush_curve_strength_clamp(brush, len_v2(xy), radius);
+ dstf[3] = alpha * BKE_brush_curve_strength_clamp(brush, len_v2(xy), radius);
}
else if (texfall == 1) {
- brush_sample_tex(scene, brush, xy, dstf, 0);
+ BKE_brush_sample_tex(scene, brush, xy, dstf, 0);
}
else {
- brush_sample_tex(scene, brush, xy, rgba, 0);
+ BKE_brush_sample_tex(scene, brush, xy, rgba, 0);
mul_v3_v3v3(dstf, rgba, brush_rgb);
- dstf[3] = rgba[3]*alpha*brush_curve_strength_clamp(brush, len_v2(xy), radius);
+ dstf[3] = rgba[3] *alpha *BKE_brush_curve_strength_clamp(brush, len_v2(xy), radius);
}
}
}
@@ -571,15 +572,15 @@ void brush_imbuf_new(const Scene *scene, Brush *brush, short flt, short texfall,
float alpha_f; /* final float alpha to convert to char */
rgb_float_to_uchar(crgb, brush->rgb);
- for (y=0; y < ibuf->y; y++) {
- dst = (unsigned char *)ibuf->rect + y*rowbytes;
+ for (y = 0; y < ibuf->y; y++) {
+ dst = (unsigned char *)ibuf->rect + y * rowbytes;
- for (x=0; x < ibuf->x; x++, dst+=4) {
+ for (x = 0; x < ibuf->x; x++, dst += 4) {
xy[0] = x + xoff;
xy[1] = y + yoff;
if (texfall == 0) {
- alpha_f = alpha * brush_curve_strength(brush, len_v2(xy), radius);
+ alpha_f = alpha * BKE_brush_curve_strength(brush, len_v2(xy), radius);
dst[0] = crgb[0];
dst[1] = crgb[1];
@@ -587,21 +588,21 @@ void brush_imbuf_new(const Scene *scene, Brush *brush, short flt, short texfall,
dst[3] = FTOCHAR(alpha_f);
}
else if (texfall == 1) {
- brush_sample_tex(scene, brush, xy, rgba, 0);
+ BKE_brush_sample_tex(scene, brush, xy, rgba, 0);
rgba_float_to_uchar(dst, rgba);
}
else if (texfall == 2) {
- brush_sample_tex(scene, brush, xy, rgba, 0);
+ BKE_brush_sample_tex(scene, brush, xy, rgba, 0);
mul_v3_v3(rgba, brush->rgb);
- alpha_f = rgba[3] * alpha * brush_curve_strength_clamp(brush, len_v2(xy), radius);
+ alpha_f = rgba[3] *alpha *BKE_brush_curve_strength_clamp(brush, len_v2(xy), radius);
rgb_float_to_uchar(dst, rgba);
dst[3] = FTOCHAR(alpha_f);
}
else {
- brush_sample_tex(scene, brush, xy, rgba, 0);
- alpha_f = rgba[3] * alpha * brush_curve_strength_clamp(brush, len_v2(xy), radius);
+ BKE_brush_sample_tex(scene, brush, xy, rgba, 0);
+ alpha_f = rgba[3] *alpha *BKE_brush_curve_strength_clamp(brush, len_v2(xy), radius);
dst[0] = crgb[0];
dst[1] = crgb[1];
@@ -612,7 +613,7 @@ void brush_imbuf_new(const Scene *scene, Brush *brush, short flt, short texfall,
}
}
- *outbuf= ibuf;
+ *outbuf = ibuf;
}
/* Unified Size and Strength */
@@ -630,90 +631,107 @@ void brush_imbuf_new(const Scene *scene, Brush *brush, short flt, short texfall,
// In anycase, a better solution is needed to prevent
// inconsistency.
-void brush_set_size(Scene *scene, Brush *brush, int size)
+void BKE_brush_size_set(Scene *scene, Brush *brush, int size)
{
UnifiedPaintSettings *ups = &scene->toolsettings->unified_paint_settings;
if (ups->flag & UNIFIED_PAINT_SIZE)
- ups->size= size;
+ ups->size = size;
else
- brush->size= size;
+ brush->size = size;
}
-int brush_size(const Scene *scene, Brush *brush)
+int BKE_brush_size_get(const Scene *scene, Brush *brush)
{
UnifiedPaintSettings *ups = &scene->toolsettings->unified_paint_settings;
return (ups->flag & UNIFIED_PAINT_SIZE) ? ups->size : brush->size;
}
-int brush_use_locked_size(const Scene *scene, Brush *brush)
+int BKE_brush_use_locked_size(const Scene *scene, Brush *brush)
{
const short us_flag = scene->toolsettings->unified_paint_settings.flag;
return (us_flag & UNIFIED_PAINT_SIZE) ?
- (us_flag & UNIFIED_PAINT_BRUSH_LOCK_SIZE) :
- (brush->flag & BRUSH_LOCK_SIZE);
+ (us_flag & UNIFIED_PAINT_BRUSH_LOCK_SIZE) :
+ (brush->flag & BRUSH_LOCK_SIZE);
}
-int brush_use_size_pressure(const Scene *scene, Brush *brush)
+int BKE_brush_use_size_pressure(const Scene *scene, Brush *brush)
{
const short us_flag = scene->toolsettings->unified_paint_settings.flag;
return (us_flag & UNIFIED_PAINT_SIZE) ?
- (us_flag & UNIFIED_PAINT_BRUSH_SIZE_PRESSURE) :
- (brush->flag & BRUSH_SIZE_PRESSURE);
+ (us_flag & UNIFIED_PAINT_BRUSH_SIZE_PRESSURE) :
+ (brush->flag & BRUSH_SIZE_PRESSURE);
}
-int brush_use_alpha_pressure(const Scene *scene, Brush *brush)
+int BKE_brush_use_alpha_pressure(const Scene *scene, Brush *brush)
{
const short us_flag = scene->toolsettings->unified_paint_settings.flag;
return (us_flag & UNIFIED_PAINT_ALPHA) ?
- (us_flag & UNIFIED_PAINT_BRUSH_ALPHA_PRESSURE) :
- (brush->flag & BRUSH_ALPHA_PRESSURE);
+ (us_flag & UNIFIED_PAINT_BRUSH_ALPHA_PRESSURE) :
+ (brush->flag & BRUSH_ALPHA_PRESSURE);
}
-void brush_set_unprojected_radius(Scene *scene, Brush *brush, float unprojected_radius)
+void BKE_brush_unprojected_radius_set(Scene *scene, Brush *brush, float unprojected_radius)
{
UnifiedPaintSettings *ups = &scene->toolsettings->unified_paint_settings;
if (ups->flag & UNIFIED_PAINT_SIZE)
- ups->unprojected_radius= unprojected_radius;
+ ups->unprojected_radius = unprojected_radius;
else
- brush->unprojected_radius= unprojected_radius;
+ brush->unprojected_radius = unprojected_radius;
}
-float brush_unprojected_radius(const Scene *scene, Brush *brush)
+float BKE_brush_unprojected_radius_get(const Scene *scene, Brush *brush)
{
UnifiedPaintSettings *ups = &scene->toolsettings->unified_paint_settings;
return (ups->flag & UNIFIED_PAINT_SIZE) ?
- ups->unprojected_radius :
- brush->unprojected_radius;
+ ups->unprojected_radius :
+ brush->unprojected_radius;
}
-static void brush_set_alpha(Scene *scene, Brush *brush, float alpha)
+static void brush_alpha_set(Scene *scene, Brush *brush, float alpha)
{
UnifiedPaintSettings *ups = &scene->toolsettings->unified_paint_settings;
if (ups->flag & UNIFIED_PAINT_ALPHA)
- ups->alpha= alpha;
+ ups->alpha = alpha;
else
- brush->alpha= alpha;
+ brush->alpha = alpha;
}
-float brush_alpha(const Scene *scene, Brush *brush)
+float BKE_brush_alpha_get(const Scene *scene, Brush *brush)
{
UnifiedPaintSettings *ups = &scene->toolsettings->unified_paint_settings;
return (ups->flag & UNIFIED_PAINT_ALPHA) ? ups->alpha : brush->alpha;
}
+float BKE_brush_weight_get(const Scene *scene, Brush *brush)
+{
+ UnifiedPaintSettings *ups = &scene->toolsettings->unified_paint_settings;
+
+ return (ups->flag & UNIFIED_PAINT_WEIGHT) ? ups->weight : brush->weight;
+}
+
+void BKE_brush_weight_set(const Scene *scene, Brush *brush, float value)
+{
+ UnifiedPaintSettings *ups = &scene->toolsettings->unified_paint_settings;
+
+ if (ups->flag & UNIFIED_PAINT_WEIGHT)
+ ups->weight = value;
+ else
+ brush->weight = value;
+}
+
/* scale unprojected radius to reflect a change in the brush's 2D size */
-void brush_scale_unprojected_radius(float *unprojected_radius,
- int new_brush_size,
- int old_brush_size)
+void BKE_brush_scale_unprojected_radius(float *unprojected_radius,
+ int new_brush_size,
+ int old_brush_size)
{
float scale = new_brush_size;
/* avoid division by zero */
@@ -723,15 +741,15 @@ void brush_scale_unprojected_radius(float *unprojected_radius,
}
/* scale brush size to reflect a change in the brush's unprojected radius */
-void brush_scale_size(int *brush_size,
- float new_unprojected_radius,
- float old_unprojected_radius)
+void BKE_brush_scale_size(int *BKE_brush_size_get,
+ float new_unprojected_radius,
+ float old_unprojected_radius)
{
float scale = new_unprojected_radius;
/* avoid division by zero */
if (old_unprojected_radius != 0)
scale /= new_unprojected_radius;
- (*brush_size)= (int)((float)(*brush_size) * scale);
+ (*BKE_brush_size_get) = (int)((float)(*BKE_brush_size_get) * scale);
}
/* Brush Painting */
@@ -739,9 +757,9 @@ void brush_scale_size(int *brush_size,
typedef struct BrushPainterCache {
short enabled;
- int size; /* size override, if 0 uses 2*brush_size(brush) */
- short flt; /* need float imbuf? */
- short texonly; /* no alpha, color or fallof, only texture in imbuf */
+ int size; /* size override, if 0 uses 2*BKE_brush_size_get(brush) */
+ short flt; /* need float imbuf? */
+ short texonly; /* no alpha, color or fallof, only texture in imbuf */
int lastsize;
float lastalpha;
@@ -756,18 +774,18 @@ struct BrushPainter {
Scene *scene;
Brush *brush;
- float lastmousepos[2]; /* mouse position of last paint call */
+ float lastmousepos[2]; /* mouse position of last paint call */
- float accumdistance; /* accumulated distance of brush since last paint op */
- float lastpaintpos[2]; /* position of last paint op */
+ float accumdistance; /* accumulated distance of brush since last paint op */
+ float lastpaintpos[2]; /* position of last paint op */
float startpaintpos[2]; /* position of first paint */
- double accumtime; /* accumulated time since last paint op (airbrush) */
- double lasttime; /* time of last update */
+ double accumtime; /* accumulated time since last paint op (airbrush) */
+ double lasttime; /* time of last update */
float lastpressure;
- short firsttouch; /* first paint op */
+ short firsttouch; /* first paint op */
float startsize;
float startalpha;
@@ -777,51 +795,52 @@ struct BrushPainter {
BrushPainterCache cache;
};
-BrushPainter *brush_painter_new(Scene *scene, Brush *brush)
+BrushPainter *BKE_brush_painter_new(Scene *scene, Brush *brush)
{
- BrushPainter *painter= MEM_callocN(sizeof(BrushPainter), "BrushPainter");
+ BrushPainter *painter = MEM_callocN(sizeof(BrushPainter), "BrushPainter");
- painter->brush= brush;
- painter->scene= scene;
- painter->firsttouch= 1;
- painter->cache.lastsize= -1; /* force ibuf create in refresh */
+ painter->brush = brush;
+ painter->scene = scene;
+ painter->firsttouch = 1;
+ painter->cache.lastsize = -1; /* force ibuf create in refresh */
- painter->startsize = brush_size(scene, brush);
- painter->startalpha = brush_alpha(scene, brush);
+ painter->startsize = BKE_brush_size_get(scene, brush);
+ painter->startalpha = BKE_brush_alpha_get(scene, brush);
painter->startjitter = brush->jitter;
painter->startspacing = brush->spacing;
return painter;
}
-void brush_painter_require_imbuf(BrushPainter *painter, short flt, short texonly, int size)
+void BKE_brush_painter_require_imbuf(BrushPainter *painter, short flt, short texonly, int size)
{
if ((painter->cache.flt != flt) || (painter->cache.size != size) ||
- ((painter->cache.texonly != texonly) && texonly)) {
+ ((painter->cache.texonly != texonly) && texonly))
+ {
if (painter->cache.ibuf) IMB_freeImBuf(painter->cache.ibuf);
if (painter->cache.maskibuf) IMB_freeImBuf(painter->cache.maskibuf);
- painter->cache.ibuf= painter->cache.maskibuf= NULL;
- painter->cache.lastsize= -1; /* force ibuf create in refresh */
+ painter->cache.ibuf = painter->cache.maskibuf = NULL;
+ painter->cache.lastsize = -1; /* force ibuf create in refresh */
}
if (painter->cache.flt != flt) {
if (painter->cache.texibuf) IMB_freeImBuf(painter->cache.texibuf);
- painter->cache.texibuf= NULL;
- painter->cache.lastsize= -1; /* force ibuf create in refresh */
+ painter->cache.texibuf = NULL;
+ painter->cache.lastsize = -1; /* force ibuf create in refresh */
}
- painter->cache.size= size;
- painter->cache.flt= flt;
- painter->cache.texonly= texonly;
- painter->cache.enabled= 1;
+ painter->cache.size = size;
+ painter->cache.flt = flt;
+ painter->cache.texonly = texonly;
+ painter->cache.enabled = 1;
}
-void brush_painter_free(BrushPainter *painter)
+void BKE_brush_painter_free(BrushPainter *painter)
{
Brush *brush = painter->brush;
- brush_set_size(painter->scene, brush, painter->startsize);
- brush_set_alpha(painter->scene, brush, painter->startalpha);
+ BKE_brush_size_set(painter->scene, brush, painter->startsize);
+ brush_alpha_set(painter->scene, brush, painter->startalpha);
brush->jitter = painter->startjitter;
brush->spacing = painter->startspacing;
@@ -835,13 +854,13 @@ static void brush_painter_do_partial(BrushPainter *painter, ImBuf *oldtexibuf,
int x, int y, int w, int h, int xt, int yt,
const float pos[2])
{
- Scene *scene= painter->scene;
- Brush *brush= painter->brush;
+ Scene *scene = painter->scene;
+ Brush *brush = painter->brush;
ImBuf *ibuf, *maskibuf, *texibuf;
- float *bf, *mf, *tf, *otf=NULL, xoff, yoff, xy[2], rgba[4];
- unsigned char *b, *m, *t, *ot= NULL;
- int dotexold, origx= x, origy= y;
- const int radius= brush_size(painter->scene, brush);
+ float *bf, *mf, *tf, *otf = NULL, xoff, yoff, xy[2], rgba[4];
+ unsigned char *b, *m, *t, *ot = NULL;
+ int dotexold, origx = x, origy = y;
+ const int radius = BKE_brush_size_get(painter->scene, brush);
xoff = -radius + 0.5f;
yoff = -radius + 0.5f;
@@ -862,14 +881,14 @@ static void brush_painter_do_partial(BrushPainter *painter, ImBuf *oldtexibuf,
if (painter->cache.flt) {
for (; y < h; y++) {
- bf = ibuf->rect_float + (y*ibuf->x + origx)*4;
- tf = texibuf->rect_float + (y*texibuf->x + origx)*4;
- mf = maskibuf->rect_float + (y*maskibuf->x + origx)*4;
+ bf = ibuf->rect_float + (y * ibuf->x + origx) * 4;
+ tf = texibuf->rect_float + (y * texibuf->x + origx) * 4;
+ mf = maskibuf->rect_float + (y * maskibuf->x + origx) * 4;
if (dotexold)
- otf = oldtexibuf->rect_float + ((y - origy + yt)*oldtexibuf->x + xt)*4;
+ otf = oldtexibuf->rect_float + ((y - origy + yt) * oldtexibuf->x + xt) * 4;
- for (x=origx; x < w; x++, bf+=4, mf+=4, tf+=4) {
+ for (x = origx; x < w; x++, bf += 4, mf += 4, tf += 4) {
if (dotexold) {
copy_v3_v3(tf, otf);
tf[3] = otf[3];
@@ -879,26 +898,26 @@ static void brush_painter_do_partial(BrushPainter *painter, ImBuf *oldtexibuf,
xy[0] = x + xoff;
xy[1] = y + yoff;
- brush_sample_tex(scene, brush, xy, tf, 0);
+ BKE_brush_sample_tex(scene, brush, xy, tf, 0);
}
- bf[0] = tf[0]*mf[0];
- bf[1] = tf[1]*mf[1];
- bf[2] = tf[2]*mf[2];
- bf[3] = tf[3]*mf[3];
+ bf[0] = tf[0] * mf[0];
+ bf[1] = tf[1] * mf[1];
+ bf[2] = tf[2] * mf[2];
+ bf[3] = tf[3] * mf[3];
}
}
}
else {
for (; y < h; y++) {
- b = (unsigned char *)ibuf->rect + (y*ibuf->x + origx)*4;
- t = (unsigned char *)texibuf->rect + (y*texibuf->x + origx)*4;
- m = (unsigned char *)maskibuf->rect + (y*maskibuf->x + origx)*4;
+ b = (unsigned char *)ibuf->rect + (y * ibuf->x + origx) * 4;
+ t = (unsigned char *)texibuf->rect + (y * texibuf->x + origx) * 4;
+ m = (unsigned char *)maskibuf->rect + (y * maskibuf->x + origx) * 4;
if (dotexold)
- ot = (unsigned char *)oldtexibuf->rect + ((y - origy + yt)*oldtexibuf->x + xt)*4;
+ ot = (unsigned char *)oldtexibuf->rect + ((y - origy + yt) * oldtexibuf->x + xt) * 4;
- for (x=origx; x < w; x++, b+=4, m+=4, t+=4) {
+ for (x = origx; x < w; x++, b += 4, m += 4, t += 4) {
if (dotexold) {
t[0] = ot[0];
t[1] = ot[1];
@@ -910,14 +929,14 @@ static void brush_painter_do_partial(BrushPainter *painter, ImBuf *oldtexibuf,
xy[0] = x + xoff;
xy[1] = y + yoff;
- brush_sample_tex(scene, brush, xy, rgba, 0);
+ BKE_brush_sample_tex(scene, brush, xy, rgba, 0);
rgba_float_to_uchar(t, rgba);
}
- b[0] = t[0]*m[0]/255;
- b[1] = t[1]*m[1]/255;
- b[2] = t[2]*m[2]/255;
- b[3] = t[3]*m[3]/255;
+ b[0] = t[0] * m[0] / 255;
+ b[1] = t[1] * m[1] / 255;
+ b[2] = t[2] * m[2] / 255;
+ b[3] = t[3] * m[3] / 255;
}
}
}
@@ -925,40 +944,40 @@ static void brush_painter_do_partial(BrushPainter *painter, ImBuf *oldtexibuf,
static void brush_painter_fixed_tex_partial_update(BrushPainter *painter, const float pos[2])
{
- const Scene *scene= painter->scene;
- Brush *brush= painter->brush;
- BrushPainterCache *cache= &painter->cache;
+ const Scene *scene = painter->scene;
+ Brush *brush = painter->brush;
+ BrushPainterCache *cache = &painter->cache;
ImBuf *oldtexibuf, *ibuf;
int imbflag, destx, desty, srcx, srcy, w, h, x1, y1, x2, y2;
- const int diameter= 2*brush_size(scene, brush);
+ const int diameter = 2 * BKE_brush_size_get(scene, brush);
- imbflag= (cache->flt)? IB_rectfloat: IB_rect;
+ imbflag = (cache->flt) ? IB_rectfloat : IB_rect;
if (!cache->ibuf)
- cache->ibuf= IMB_allocImBuf(diameter, diameter, 32, imbflag);
- ibuf= cache->ibuf;
+ cache->ibuf = IMB_allocImBuf(diameter, diameter, 32, imbflag);
+ ibuf = cache->ibuf;
- oldtexibuf= cache->texibuf;
- cache->texibuf= IMB_allocImBuf(diameter, diameter, 32, imbflag);
+ oldtexibuf = cache->texibuf;
+ cache->texibuf = IMB_allocImBuf(diameter, diameter, 32, imbflag);
if (oldtexibuf) {
- srcx= srcy= 0;
- destx= (int)painter->lastpaintpos[0] - (int)pos[0];
- desty= (int)painter->lastpaintpos[1] - (int)pos[1];
- w= oldtexibuf->x;
- h= oldtexibuf->y;
+ srcx = srcy = 0;
+ destx = (int)painter->lastpaintpos[0] - (int)pos[0];
+ desty = (int)painter->lastpaintpos[1] - (int)pos[1];
+ w = oldtexibuf->x;
+ h = oldtexibuf->y;
IMB_rectclip(cache->texibuf, oldtexibuf, &destx, &desty, &srcx, &srcy, &w, &h);
}
else {
- srcx= srcy= 0;
- destx= desty= 0;
- w= h= 0;
+ srcx = srcy = 0;
+ destx = desty = 0;
+ w = h = 0;
}
- x1= destx;
- y1= desty;
- x2= destx+w;
- y2= desty+h;
+ x1 = destx;
+ y1 = desty;
+ x2 = destx + w;
+ y2 = desty + h;
/* blend existing texture in new position */
if ((x1 < x2) && (y1 < y2))
@@ -980,41 +999,41 @@ static void brush_painter_fixed_tex_partial_update(BrushPainter *painter, const
static void brush_painter_refresh_cache(BrushPainter *painter, const float pos[2], int use_color_correction)
{
- const Scene *scene= painter->scene;
- Brush *brush= painter->brush;
- BrushPainterCache *cache= &painter->cache;
- MTex *mtex= &brush->mtex;
+ const Scene *scene = painter->scene;
+ Brush *brush = painter->brush;
+ BrushPainterCache *cache = &painter->cache;
+ MTex *mtex = &brush->mtex;
int size;
short flt;
- const int diameter= 2*brush_size(scene, brush);
- const float alpha= brush_alpha(scene, brush);
+ const int diameter = 2 * BKE_brush_size_get(scene, brush);
+ const float alpha = BKE_brush_alpha_get(scene, brush);
if (diameter != cache->lastsize ||
- alpha != cache->lastalpha ||
- brush->jitter != cache->lastjitter)
+ alpha != cache->lastalpha ||
+ brush->jitter != cache->lastjitter)
{
if (cache->ibuf) {
IMB_freeImBuf(cache->ibuf);
- cache->ibuf= NULL;
+ cache->ibuf = NULL;
}
if (cache->maskibuf) {
IMB_freeImBuf(cache->maskibuf);
- cache->maskibuf= NULL;
+ cache->maskibuf = NULL;
}
- flt= cache->flt;
- size= (cache->size)? cache->size: diameter;
+ flt = cache->flt;
+ size = (cache->size) ? cache->size : diameter;
if (brush->flag & BRUSH_FIXED_TEX) {
- brush_imbuf_new(scene, brush, flt, 3, size, &cache->maskibuf, use_color_correction);
+ BKE_brush_imbuf_new(scene, brush, flt, 3, size, &cache->maskibuf, use_color_correction);
brush_painter_fixed_tex_partial_update(painter, pos);
}
else
- brush_imbuf_new(scene, brush, flt, 2, size, &cache->ibuf, use_color_correction);
+ BKE_brush_imbuf_new(scene, brush, flt, 2, size, &cache->ibuf, use_color_correction);
- cache->lastsize= diameter;
- cache->lastalpha= alpha;
- cache->lastjitter= brush->jitter;
+ cache->lastsize = diameter;
+ cache->lastalpha = alpha;
+ cache->lastjitter = brush->jitter;
}
else if ((brush->flag & BRUSH_FIXED_TEX) && mtex && mtex->tex) {
int dx = (int)painter->lastpaintpos[0] - (int)pos[0];
@@ -1025,203 +1044,203 @@ static void brush_painter_refresh_cache(BrushPainter *painter, const float pos[2
}
}
-void brush_painter_break_stroke(BrushPainter *painter)
+void BKE_brush_painter_break_stroke(BrushPainter *painter)
{
- painter->firsttouch= 1;
+ painter->firsttouch = 1;
}
-static void brush_apply_pressure(BrushPainter *painter, Brush *brush, float pressure)
+static void brush_pressure_apply(BrushPainter *painter, Brush *brush, float pressure)
{
- if (brush_use_alpha_pressure(painter->scene, brush))
- brush_set_alpha(painter->scene, brush, MAX2(0.0f, painter->startalpha*pressure));
- if (brush_use_size_pressure(painter->scene, brush))
- brush_set_size(painter->scene, brush, MAX2(1.0f, painter->startsize*pressure));
+ if (BKE_brush_use_alpha_pressure(painter->scene, brush))
+ brush_alpha_set(painter->scene, brush, MAX2(0.0f, painter->startalpha * pressure));
+ if (BKE_brush_use_size_pressure(painter->scene, brush))
+ BKE_brush_size_set(painter->scene, brush, MAX2(1.0f, painter->startsize * pressure));
if (brush->flag & BRUSH_JITTER_PRESSURE)
- brush->jitter = MAX2(0.0f, painter->startjitter*pressure);
+ brush->jitter = MAX2(0.0f, painter->startjitter * pressure);
if (brush->flag & BRUSH_SPACING_PRESSURE)
- brush->spacing = MAX2(1.0f, painter->startspacing*(1.5f-pressure));
+ brush->spacing = MAX2(1.0f, painter->startspacing * (1.5f - pressure));
}
-void brush_jitter_pos(const Scene *scene, Brush *brush, const float pos[2], float jitterpos[2])
+void BKE_brush_jitter_pos(const Scene *scene, Brush *brush, const float pos[2], float jitterpos[2])
{
- int use_jitter= brush->jitter != 0;
+ int use_jitter = brush->jitter != 0;
/* jitter-ed brush gives weird and unpredictable result for this
* kinds of stroke, so manyally disable jitter usage (sergey) */
- use_jitter &= (brush->flag & (BRUSH_RESTORE_MESH|BRUSH_ANCHORED)) == 0;
+ use_jitter &= (brush->flag & (BRUSH_RESTORE_MESH | BRUSH_ANCHORED)) == 0;
if (use_jitter) {
float rand_pos[2];
- const int radius= brush_size(scene, brush);
- const int diameter= 2*radius;
+ const int radius = BKE_brush_size_get(scene, brush);
+ const int diameter = 2 * radius;
// find random position within a circle of diameter 1
do {
- rand_pos[0] = BLI_frand()-0.5f;
- rand_pos[1] = BLI_frand()-0.5f;
+ rand_pos[0] = BLI_frand() - 0.5f;
+ rand_pos[1] = BLI_frand() - 0.5f;
} while (len_v2(rand_pos) > 0.5f);
- jitterpos[0] = pos[0] + 2*rand_pos[0]*diameter*brush->jitter;
- jitterpos[1] = pos[1] + 2*rand_pos[1]*diameter*brush->jitter;
+ jitterpos[0] = pos[0] + 2 * rand_pos[0] * diameter * brush->jitter;
+ jitterpos[1] = pos[1] + 2 * rand_pos[1] * diameter * brush->jitter;
}
else {
copy_v2_v2(jitterpos, pos);
}
}
-int brush_painter_paint(BrushPainter *painter, BrushFunc func, const float pos[2], double time, float pressure,
- void *user, int use_color_correction)
+int BKE_brush_painter_paint(BrushPainter *painter, BrushFunc func, const float pos[2], double time, float pressure,
+ void *user, int use_color_correction)
{
- Scene *scene= painter->scene;
- Brush *brush= painter->brush;
- int totpaintops= 0;
+ Scene *scene = painter->scene;
+ Brush *brush = painter->brush;
+ int totpaintops = 0;
if (pressure == 0.0f) {
if (painter->lastpressure) // XXX - hack, operator misses
- pressure= painter->lastpressure;
+ pressure = painter->lastpressure;
else
- pressure = 1.0f; /* zero pressure == not using tablet */
+ pressure = 1.0f; /* zero pressure == not using tablet */
}
if (painter->firsttouch) {
/* paint exactly once on first touch */
- painter->startpaintpos[0]= pos[0];
- painter->startpaintpos[1]= pos[1];
+ painter->startpaintpos[0] = pos[0];
+ painter->startpaintpos[1] = pos[1];
- brush_apply_pressure(painter, brush, pressure);
+ brush_pressure_apply(painter, brush, pressure);
if (painter->cache.enabled)
brush_painter_refresh_cache(painter, pos, use_color_correction);
totpaintops += func(user, painter->cache.ibuf, pos, pos);
- painter->lasttime= time;
- painter->firsttouch= 0;
- painter->lastpaintpos[0]= pos[0];
- painter->lastpaintpos[1]= pos[1];
+ painter->lasttime = time;
+ painter->firsttouch = 0;
+ painter->lastpaintpos[0] = pos[0];
+ painter->lastpaintpos[1] = pos[1];
}
#if 0
else if (painter->brush->flag & BRUSH_AIRBRUSH) {
float spacing, step, paintpos[2], dmousepos[2], len;
- double starttime, curtime= time;
+ double starttime, curtime = time;
/* compute brush spacing adapted to brush size */
- spacing= brush->rate; //radius*brush->spacing*0.01f;
+ spacing = brush->rate; //radius*brush->spacing*0.01f;
/* setup starting time, direction vector and accumulated time */
- starttime= painter->accumtime;
+ starttime = painter->accumtime;
sub_v2_v2v2(dmousepos, pos, painter->lastmousepos);
- len= normalize_v2(dmousepos);
+ len = normalize_v2(dmousepos);
painter->accumtime += curtime - painter->lasttime;
/* do paint op over unpainted time distance */
while (painter->accumtime >= spacing) {
- step= (spacing - starttime)*len;
- paintpos[0]= painter->lastmousepos[0] + dmousepos[0]*step;
- paintpos[1]= painter->lastmousepos[1] + dmousepos[1]*step;
+ step = (spacing - starttime) * len;
+ paintpos[0] = painter->lastmousepos[0] + dmousepos[0] * step;
+ paintpos[1] = painter->lastmousepos[1] + dmousepos[1] * step;
if (painter->cache.enabled)
brush_painter_refresh_cache(painter);
totpaintops += func(user, painter->cache.ibuf,
- painter->lastpaintpos, paintpos);
+ painter->lastpaintpos, paintpos);
- painter->lastpaintpos[0]= paintpos[0];
- painter->lastpaintpos[1]= paintpos[1];
+ painter->lastpaintpos[0] = paintpos[0];
+ painter->lastpaintpos[1] = paintpos[1];
painter->accumtime -= spacing;
starttime -= spacing;
}
- painter->lasttime= curtime;
+ painter->lasttime = curtime;
}
#endif
else {
float startdistance, spacing, step, paintpos[2], dmousepos[2], finalpos[2];
float t, len, press;
- const int radius= brush_size(scene, brush);
+ const int radius = BKE_brush_size_get(scene, brush);
/* compute brush spacing adapted to brush radius, spacing may depend
* on pressure, so update it */
- brush_apply_pressure(painter, brush, painter->lastpressure);
- spacing= MAX2(1.0f, radius)*brush->spacing*0.01f;
+ brush_pressure_apply(painter, brush, painter->lastpressure);
+ spacing = MAX2(1.0f, radius) * brush->spacing * 0.01f;
/* setup starting distance, direction vector and accumulated distance */
- startdistance= painter->accumdistance;
+ startdistance = painter->accumdistance;
sub_v2_v2v2(dmousepos, pos, painter->lastmousepos);
- len= normalize_v2(dmousepos);
+ len = normalize_v2(dmousepos);
painter->accumdistance += len;
if (brush->flag & BRUSH_SPACE) {
/* do paint op over unpainted distance */
while ((len > 0.0f) && (painter->accumdistance >= spacing)) {
- step= spacing - startdistance;
- paintpos[0]= painter->lastmousepos[0] + dmousepos[0]*step;
- paintpos[1]= painter->lastmousepos[1] + dmousepos[1]*step;
+ step = spacing - startdistance;
+ paintpos[0] = painter->lastmousepos[0] + dmousepos[0] * step;
+ paintpos[1] = painter->lastmousepos[1] + dmousepos[1] * step;
- t = step/len;
- press= (1.0f-t)*painter->lastpressure + t*pressure;
- brush_apply_pressure(painter, brush, press);
- spacing= MAX2(1.0f, radius)*brush->spacing*0.01f;
+ t = step / len;
+ press = (1.0f - t) * painter->lastpressure + t * pressure;
+ brush_pressure_apply(painter, brush, press);
+ spacing = MAX2(1.0f, radius) * brush->spacing * 0.01f;
- brush_jitter_pos(scene, brush, paintpos, finalpos);
+ BKE_brush_jitter_pos(scene, brush, paintpos, finalpos);
if (painter->cache.enabled)
brush_painter_refresh_cache(painter, finalpos, use_color_correction);
totpaintops +=
- func(user, painter->cache.ibuf, painter->lastpaintpos, finalpos);
+ func(user, painter->cache.ibuf, painter->lastpaintpos, finalpos);
- painter->lastpaintpos[0]= paintpos[0];
- painter->lastpaintpos[1]= paintpos[1];
+ painter->lastpaintpos[0] = paintpos[0];
+ painter->lastpaintpos[1] = paintpos[1];
painter->accumdistance -= spacing;
startdistance -= spacing;
}
}
else {
- brush_jitter_pos(scene, brush, pos, finalpos);
+ BKE_brush_jitter_pos(scene, brush, pos, finalpos);
if (painter->cache.enabled)
brush_painter_refresh_cache(painter, finalpos, use_color_correction);
totpaintops += func(user, painter->cache.ibuf, pos, finalpos);
- painter->lastpaintpos[0]= pos[0];
- painter->lastpaintpos[1]= pos[1];
- painter->accumdistance= 0;
+ painter->lastpaintpos[0] = pos[0];
+ painter->lastpaintpos[1] = pos[1];
+ painter->accumdistance = 0;
}
/* do airbrush paint ops, based on the number of paint ops left over
* from regular painting. this is a temporary solution until we have
* accurate time stamps for mouse move events */
if (brush->flag & BRUSH_AIRBRUSH) {
- double curtime= time;
- double painttime= brush->rate*totpaintops;
+ double curtime = time;
+ double painttime = brush->rate * totpaintops;
painter->accumtime += curtime - painter->lasttime;
if (painter->accumtime <= painttime)
- painter->accumtime= 0.0;
+ painter->accumtime = 0.0;
else
painter->accumtime -= painttime;
while (painter->accumtime >= (double)brush->rate) {
- brush_apply_pressure(painter, brush, pressure);
+ brush_pressure_apply(painter, brush, pressure);
- brush_jitter_pos(scene, brush, pos, finalpos);
+ BKE_brush_jitter_pos(scene, brush, pos, finalpos);
if (painter->cache.enabled)
brush_painter_refresh_cache(painter, finalpos, use_color_correction);
totpaintops +=
- func(user, painter->cache.ibuf, painter->lastmousepos, finalpos);
+ func(user, painter->cache.ibuf, painter->lastmousepos, finalpos);
painter->accumtime -= (double)brush->rate;
}
- painter->lasttime= curtime;
+ painter->lasttime = curtime;
}
}
- painter->lastmousepos[0]= pos[0];
- painter->lastmousepos[1]= pos[1];
- painter->lastpressure= pressure;
+ painter->lastmousepos[0] = pos[0];
+ painter->lastmousepos[1] = pos[1];
+ painter->lastpressure = pressure;
- brush_set_alpha(scene, brush, painter->startalpha);
- brush_set_size(scene, brush, painter->startsize);
+ brush_alpha_set(scene, brush, painter->startalpha);
+ BKE_brush_size_set(scene, brush, painter->startsize);
brush->jitter = painter->startjitter;
brush->spacing = painter->startspacing;
@@ -1229,34 +1248,34 @@ int brush_painter_paint(BrushPainter *painter, BrushFunc func, const float pos[2
}
/* Uses the brush curve control to find a strength value between 0 and 1 */
-float brush_curve_strength_clamp(Brush *br, float p, const float len)
+float BKE_brush_curve_strength_clamp(Brush *br, float p, const float len)
{
- if (p >= len) return 0;
- else p= p/len;
+ if (p >= len) return 0;
+ else p = p / len;
- p= curvemapping_evaluateF(br->curve, 0, p);
- if (p < 0.0f) p= 0.0f;
- else if (p > 1.0f) p= 1.0f;
+ p = curvemapping_evaluateF(br->curve, 0, p);
+ if (p < 0.0f) p = 0.0f;
+ else if (p > 1.0f) p = 1.0f;
return p;
}
/* same as above but can return negative values if the curve enables
* used for sculpt only */
-float brush_curve_strength(Brush *br, float p, const float len)
+float BKE_brush_curve_strength(Brush *br, float p, const float len)
{
if (p >= len)
- p= 1.0f;
+ p = 1.0f;
else
- p= p/len;
+ p = p / len;
return curvemapping_evaluateF(br->curve, 0, p);
}
/* TODO: should probably be unified with BrushPainter stuff? */
-unsigned int *brush_gen_texture_cache(Brush *br, int half_side)
+unsigned int *BKE_brush_gen_texture_cache(Brush *br, int half_side)
{
unsigned int *texcache = NULL;
MTex *mtex = &br->mtex;
- TexResult texres= {0};
+ TexResult texres = {0};
int hasrgb, ix, iy;
int side = half_side * 2;
@@ -1268,11 +1287,11 @@ unsigned int *brush_gen_texture_cache(Brush *br, int half_side)
BKE_image_get_ibuf(mtex->tex->ima, NULL);
/*do normalized cannonical view coords for texture*/
- for (y=-1.0, iy=0; iy<side; iy++, y += step) {
- for (x=-1.0, ix=0; ix<side; ix++, x += step) {
- co[0]= x;
- co[1]= y;
- co[2]= 0.0f;
+ for (y = -1.0, iy = 0; iy < side; iy++, y += step) {
+ for (x = -1.0, ix = 0; ix < side; ix++, x += step) {
+ co[0] = x;
+ co[1] = y;
+ co[2] = 0.0f;
/* This is copied from displace modifier code */
hasrgb = multitex_ext(mtex->tex, co, NULL, NULL, 0, &texres);
@@ -1282,14 +1301,12 @@ unsigned int *brush_gen_texture_cache(Brush *br, int half_side)
* if the texture didn't give an RGB value, copy the intensity across
*/
if (hasrgb & TEX_RGB)
- texres.tin = (0.35f * texres.tr + 0.45f *
- texres.tg + 0.2f * texres.tb);
-
- texres.tin = texres.tin * 255.0f;
- ((char*)texcache)[(iy*side+ix)*4] = (char)texres.tin;
- ((char*)texcache)[(iy*side+ix)*4+1] = (char)texres.tin;
- ((char*)texcache)[(iy*side+ix)*4+2] = (char)texres.tin;
- ((char*)texcache)[(iy*side+ix)*4+3] = (char)texres.tin;
+ texres.tin = rgb_to_grayscale(&texres.tr);
+
+ ((char *)texcache)[(iy * side + ix) * 4] =
+ ((char *)texcache)[(iy * side + ix) * 4 + 1] =
+ ((char *)texcache)[(iy * side + ix) * 4 + 2] =
+ ((char *)texcache)[(iy * side + ix) * 4 + 3] = (char)(texres.tin * 255.0f);
}
}
}
@@ -1298,7 +1315,7 @@ unsigned int *brush_gen_texture_cache(Brush *br, int half_side)
}
/**** Radial Control ****/
-struct ImBuf *brush_gen_radial_control_imbuf(Brush *br)
+struct ImBuf *BKE_brush_gen_radial_control_imbuf(Brush *br)
{
ImBuf *im = MEM_callocN(sizeof(ImBuf), "radial control texture");
unsigned int *texcache;
@@ -1306,23 +1323,23 @@ struct ImBuf *brush_gen_radial_control_imbuf(Brush *br)
int half = side / 2;
int i, j;
- texcache = brush_gen_texture_cache(br, half);
+ texcache = BKE_brush_gen_texture_cache(br, half);
im->rect_float = MEM_callocN(sizeof(float) * side * side, "radial control rect");
im->x = im->y = side;
- for (i=0; i<side; ++i) {
- for (j=0; j<side; ++j) {
- float magn= sqrt(pow(i - half, 2) + pow(j - half, 2));
- im->rect_float[i*side + j]= brush_curve_strength_clamp(br, magn, half);
+ for (i = 0; i < side; ++i) {
+ for (j = 0; j < side; ++j) {
+ float magn = sqrt(pow(i - half, 2) + pow(j - half, 2));
+ im->rect_float[i * side + j] = BKE_brush_curve_strength_clamp(br, magn, half);
}
}
/* Modulate curve with texture */
if (texcache) {
- for (i=0; i<side; ++i) {
- for (j=0; j<side; ++j) {
- const int col= texcache[i*side+j];
- im->rect_float[i*side+j]*= (((char*)&col)[0]+((char*)&col)[1]+((char*)&col)[2])/3.0f/255.0f;
+ for (i = 0; i < side; ++i) {
+ for (j = 0; j < side; ++j) {
+ const int col = texcache[i * side + j];
+ im->rect_float[i * side + j] *= (((char *)&col)[0] + ((char *)&col)[1] + ((char *)&col)[2]) / 3.0f / 255.0f;
}
}
diff --git a/source/blender/blenkernel/intern/bvhutils.c b/source/blender/blenkernel/intern/bvhutils.c
index 009b7ca7f99..24583c124e6 100644
--- a/source/blender/blenkernel/intern/bvhutils.c
+++ b/source/blender/blenkernel/intern/bvhutils.c
@@ -101,12 +101,12 @@ float nearest_point_in_tri_surface(const float v0[3], const float v1[3], const f
sub_v3_v3v3(e1, v2, v0);
A00 = dot_v3v3(e0, e0);
- A01 = dot_v3v3(e0, e1 );
- A11 = dot_v3v3(e1, e1 );
- B0 = dot_v3v3(diff, e0 );
- B1 = dot_v3v3(diff, e1 );
- C = dot_v3v3(diff, diff );
- Det = fabs( A00 * A11 - A01 * A01 );
+ A01 = dot_v3v3(e0, e1);
+ A11 = dot_v3v3(e1, e1);
+ B0 = dot_v3v3(diff, e0);
+ B1 = dot_v3v3(diff, e1);
+ C = dot_v3v3(diff, diff);
+ Det = fabs(A00 * A11 - A01 * A01);
S = A01 * B1 - A11 * B0;
T = A01 * B0 - A00 * B1;
@@ -122,7 +122,7 @@ float nearest_point_in_tri_surface(const float v0[3], const float v1[3], const f
}
else {
if (fabsf(A00) > FLT_EPSILON)
- S = -B0/A00;
+ S = -B0 / A00;
else
S = 0.0f;
sqrDist = B0 * S + C;
@@ -195,7 +195,7 @@ float nearest_point_in_tri_surface(const float v0[3], const float v1[3], const f
}
}
else { /* Region 0 */
- // Minimum at interior lv
+ /* Minimum at interior lv */
float invDet;
if (fabsf(Det) > FLT_EPSILON)
invDet = 1.0f / Det;
@@ -203,8 +203,8 @@ float nearest_point_in_tri_surface(const float v0[3], const float v1[3], const f
invDet = 0.0f;
S *= invDet;
T *= invDet;
- sqrDist = S * ( A00 * S + A01 * T + 2.0f * B0) +
- T * ( A01 * S + A11 * T + 2.0f * B1 ) + C;
+ sqrDist = S * (A00 * S + A01 * T + 2.0f * B0) +
+ T * (A01 * S + A11 * T + 2.0f * B1) + C;
}
}
else {
@@ -213,10 +213,10 @@ float nearest_point_in_tri_surface(const float v0[3], const float v1[3], const f
if (S < 0.0f) { /* Region 2 */
tmp0 = A01 + B0;
tmp1 = A11 + B1;
- if ( tmp1 > tmp0 ) {
+ if (tmp1 > tmp0) {
numer = tmp1 - tmp0;
denom = A00 - 2.0f * A01 + A11;
- if ( numer >= denom ) {
+ if (numer >= denom) {
S = 1.0f;
T = 0.0f;
sqrDist = A00 + 2.0f * B0 + C;
@@ -228,14 +228,14 @@ float nearest_point_in_tri_surface(const float v0[3], const float v1[3], const f
else
S = 0.0f;
T = 1.0f - S;
- sqrDist = S * ( A00 * S + A01 * T + 2.0f * B0 ) +
- T * ( A01 * S + A11 * T + 2.0f * B1 ) + C;
+ sqrDist = S * (A00 * S + A01 * T + 2.0f * B0) +
+ T * (A01 * S + A11 * T + 2.0f * B1) + C;
le = 2;
}
}
else {
S = 0.0f;
- if ( tmp1 <= 0.0f ) {
+ if (tmp1 <= 0.0f) {
T = 1.0f;
sqrDist = A11 + 2.0f * B1 + C;
lv = 2;
@@ -258,10 +258,10 @@ float nearest_point_in_tri_surface(const float v0[3], const float v1[3], const f
else if (T < 0.0f) { /* Region 6 */
tmp0 = A01 + B1;
tmp1 = A00 + B0;
- if ( tmp1 > tmp0 ) {
+ if (tmp1 > tmp0) {
numer = tmp1 - tmp0;
denom = A00 - 2.0f * A01 + A11;
- if ( numer >= denom ) {
+ if (numer >= denom) {
T = 1.0f;
S = 0.0f;
sqrDist = A11 + 2.0f * B1 + C;
@@ -273,8 +273,8 @@ float nearest_point_in_tri_surface(const float v0[3], const float v1[3], const f
else
T = 0.0f;
S = 1.0f - T;
- sqrDist = S * ( A00 * S + A01 * T + 2.0f * B0 ) +
- T * ( A01 * S + A11 * T + 2.0f * B1 ) + C;
+ sqrDist = S * (A00 * S + A01 * T + 2.0f * B0) +
+ T * (A01 * S + A11 * T + 2.0f * B1) + C;
le = 2;
}
}
@@ -302,7 +302,7 @@ float nearest_point_in_tri_surface(const float v0[3], const float v1[3], const f
}
else { /* Region 1 */
numer = A11 + B1 - A01 - B0;
- if ( numer <= 0.0f ) {
+ if (numer <= 0.0f) {
S = 0.0f;
T = 1.0f;
sqrDist = A11 + 2.0f * B1 + C;
@@ -310,7 +310,7 @@ float nearest_point_in_tri_surface(const float v0[3], const float v1[3], const f
}
else {
denom = A00 - 2.0f * A01 + A11;
- if ( numer >= denom ) {
+ if (numer >= denom) {
S = 1.0f;
T = 0.0f;
sqrDist = A00 + 2.0f * B0 + C;
@@ -322,8 +322,8 @@ float nearest_point_in_tri_surface(const float v0[3], const float v1[3], const f
else
S = 0.0f;
T = 1.0f - S;
- sqrDist = S * ( A00 * S + A01 * T + 2.0f * B0 ) +
- T * ( A01 * S + A11 * T + 2.0f * B1 ) + C;
+ sqrDist = S * (A00 * S + A01 * T + 2.0f * B0) +
+ T * (A01 * S + A11 * T + 2.0f * B1) + C;
le = 2;
}
}
@@ -331,7 +331,7 @@ float nearest_point_in_tri_surface(const float v0[3], const float v1[3], const f
}
// Account for numerical round-off error
- if ( sqrDist < FLT_EPSILON )
+ if (sqrDist < FLT_EPSILON)
sqrDist = 0.0f;
{
@@ -362,19 +362,18 @@ float nearest_point_in_tri_surface(const float v0[3], const float v1[3], const f
// userdata must be a BVHMeshCallbackUserdata built from the same mesh as the tree.
static void mesh_faces_nearest_point(void *userdata, int index, const float co[3], BVHTreeNearest *nearest)
{
- const BVHTreeFromMesh *data = (BVHTreeFromMesh*) userdata;
- MVert *vert = data->vert;
+ const BVHTreeFromMesh *data = (BVHTreeFromMesh *) userdata;
+ MVert *vert = data->vert;
MFace *face = data->face + index;
float *t0, *t1, *t2, *t3;
- t0 = vert[ face->v1 ].co;
- t1 = vert[ face->v2 ].co;
- t2 = vert[ face->v3 ].co;
- t3 = face->v4 ? vert[ face->v4].co : NULL;
+ t0 = vert[face->v1].co;
+ t1 = vert[face->v2].co;
+ t2 = vert[face->v3].co;
+ t3 = face->v4 ? vert[face->v4].co : NULL;
- do
- {
+ do {
float nearest_tmp[3], dist;
int vertex, edge;
@@ -383,7 +382,7 @@ static void mesh_faces_nearest_point(void *userdata, int index, const float co[3
nearest->index = index;
nearest->dist = dist;
copy_v3_v3(nearest->co, nearest_tmp);
- normal_tri_v3( nearest->no,t0, t1, t2);
+ normal_tri_v3(nearest->no, t0, t1, t2);
}
t1 = t2;
@@ -397,19 +396,18 @@ static void mesh_faces_nearest_point(void *userdata, int index, const float co[3
// userdata must be a BVHMeshCallbackUserdata built from the same mesh as the tree.
static void mesh_faces_spherecast(void *userdata, int index, const BVHTreeRay *ray, BVHTreeRayHit *hit)
{
- const BVHTreeFromMesh *data = (BVHTreeFromMesh*) userdata;
- MVert *vert = data->vert;
+ const BVHTreeFromMesh *data = (BVHTreeFromMesh *) userdata;
+ MVert *vert = data->vert;
MFace *face = data->face + index;
float *t0, *t1, *t2, *t3;
- t0 = vert[ face->v1 ].co;
- t1 = vert[ face->v2 ].co;
- t2 = vert[ face->v3 ].co;
- t3 = face->v4 ? vert[ face->v4].co : NULL;
+ t0 = vert[face->v1].co;
+ t1 = vert[face->v2].co;
+ t2 = vert[face->v3].co;
+ t3 = face->v4 ? vert[face->v4].co : NULL;
- do
- {
+ do {
float dist;
if (data->sphere_radius == 0.0f)
dist = bvhtree_ray_tri_intersection(ray, hit->dist, t0, t1, t2);
@@ -421,7 +419,7 @@ static void mesh_faces_spherecast(void *userdata, int index, const BVHTreeRay *r
hit->dist = dist;
madd_v3_v3v3fl(hit->co, ray->origin, ray->direction, dist);
- normal_tri_v3( hit->no,t0, t1, t2);
+ normal_tri_v3(hit->no, t0, t1, t2);
}
t1 = t2;
@@ -435,14 +433,14 @@ static void mesh_faces_spherecast(void *userdata, int index, const BVHTreeRay *r
// userdata must be a BVHMeshCallbackUserdata built from the same mesh as the tree.
static void mesh_edges_nearest_point(void *userdata, int index, const float co[3], BVHTreeNearest *nearest)
{
- const BVHTreeFromMesh *data = (BVHTreeFromMesh*) userdata;
- MVert *vert = data->vert;
+ const BVHTreeFromMesh *data = (BVHTreeFromMesh *) userdata;
+ MVert *vert = data->vert;
MEdge *edge = data->edge + index;
float nearest_tmp[3], dist;
float *t0, *t1;
- t0 = vert[ edge->v1 ].co;
- t1 = vert[ edge->v2 ].co;
+ t0 = vert[edge->v1].co;
+ t1 = vert[edge->v2].co;
closest_to_line_segment_v3(nearest_tmp, co, t0, t1);
dist = len_squared_v3v3(nearest_tmp, co);
@@ -460,15 +458,15 @@ static void mesh_edges_nearest_point(void *userdata, int index, const float co[3
* BVH builders
*/
// Builds a bvh tree.. where nodes are the vertexs of the given mesh
-BVHTree* bvhtree_from_mesh_verts(BVHTreeFromMesh *data, DerivedMesh *mesh, float epsilon, int tree_type, int axis)
+BVHTree *bvhtree_from_mesh_verts(BVHTreeFromMesh *data, DerivedMesh *mesh, float epsilon, int tree_type, int axis)
{
BVHTree *tree = bvhcache_find(&mesh->bvhCache, BVHTREE_FROM_VERTICES);
//Not in cache
if (tree == NULL) {
int i;
- int numVerts= mesh->getNumVerts(mesh);
- MVert *vert = mesh->getVertDataArray(mesh, CD_MVERT);
+ int numVerts = mesh->getNumVerts(mesh);
+ MVert *vert = mesh->getVertDataArray(mesh, CD_MVERT);
if (vert != NULL) {
tree = BLI_bvhtree_new(numVerts, epsilon, tree_type, axis);
@@ -514,14 +512,14 @@ BVHTree* bvhtree_from_mesh_verts(BVHTreeFromMesh *data, DerivedMesh *mesh, float
}
// Builds a bvh tree.. where nodes are the faces of the given mesh.
-BVHTree* bvhtree_from_mesh_faces(BVHTreeFromMesh *data, DerivedMesh *mesh, float epsilon, int tree_type, int axis)
+BVHTree *bvhtree_from_mesh_faces(BVHTreeFromMesh *data, DerivedMesh *mesh, float epsilon, int tree_type, int axis)
{
BVHTree *tree = bvhcache_find(&mesh->bvhCache, BVHTREE_FROM_FACES);
//Not in cache
if (tree == NULL) {
int i;
- int numFaces= mesh->getNumTessFaces(mesh);
+ int numFaces = mesh->getNumTessFaces(mesh);
/* BMESH specific check that we have tessfaces,
* we _could_ tessellate here but rather not - campbell
@@ -534,7 +532,7 @@ BVHTree* bvhtree_from_mesh_faces(BVHTreeFromMesh *data, DerivedMesh *mesh, float
/* Create a bvh-tree of the given target */
tree = BLI_bvhtree_new(numFaces, epsilon, tree_type, axis);
if (tree != NULL) {
- BMEditMesh *em= data->em_evil;
+ BMEditMesh *em = data->em_evil;
if (em) {
/* data->em_evil is only set for snapping, and only for the mesh of the object
* which is currently open in edit mode. When set, the bvhtree should not contain
@@ -594,17 +592,17 @@ BVHTree* bvhtree_from_mesh_faces(BVHTreeFromMesh *data, DerivedMesh *mesh, float
}
}
else {
- MVert *vert = mesh->getVertDataArray(mesh, CD_MVERT);
+ MVert *vert = mesh->getVertDataArray(mesh, CD_MVERT);
MFace *face = mesh->getTessFaceDataArray(mesh, CD_MFACE);
if (vert != NULL && face != NULL) {
for (i = 0; i < numFaces; i++) {
float co[4][3];
- copy_v3_v3(co[0], vert[ face[i].v1 ].co);
- copy_v3_v3(co[1], vert[ face[i].v2 ].co);
- copy_v3_v3(co[2], vert[ face[i].v3 ].co);
+ copy_v3_v3(co[0], vert[face[i].v1].co);
+ copy_v3_v3(co[1], vert[face[i].v2].co);
+ copy_v3_v3(co[2], vert[face[i].v3].co);
if (face[i].v4)
- copy_v3_v3(co[3], vert[ face[i].v4 ].co);
+ copy_v3_v3(co[3], vert[face[i].v4].co);
BLI_bvhtree_insert(tree, i, co[0], face[i].v4 ? 4 : 3);
}
@@ -644,16 +642,15 @@ BVHTree* bvhtree_from_mesh_faces(BVHTreeFromMesh *data, DerivedMesh *mesh, float
}
// Builds a bvh tree.. where nodes are the faces of the given mesh.
-BVHTree* bvhtree_from_mesh_edges(BVHTreeFromMesh *data, DerivedMesh *mesh, float epsilon, int tree_type, int axis)
+BVHTree *bvhtree_from_mesh_edges(BVHTreeFromMesh *data, DerivedMesh *mesh, float epsilon, int tree_type, int axis)
{
BVHTree *tree = bvhcache_find(&mesh->bvhCache, BVHTREE_FROM_EDGES);
//Not in cache
- if (tree == NULL)
- {
+ if (tree == NULL) {
int i;
- int numEdges= mesh->getNumEdges(mesh);
- MVert *vert = mesh->getVertDataArray(mesh, CD_MVERT);
+ int numEdges = mesh->getNumEdges(mesh);
+ MVert *vert = mesh->getVertDataArray(mesh, CD_MVERT);
MEdge *edge = mesh->getEdgeDataArray(mesh, CD_MEDGE);
if (vert != NULL && edge != NULL) {
@@ -662,8 +659,8 @@ BVHTree* bvhtree_from_mesh_edges(BVHTreeFromMesh *data, DerivedMesh *mesh, float
if (tree != NULL) {
for (i = 0; i < numEdges; i++) {
float co[4][3];
- copy_v3_v3(co[0], vert[ edge[i].v1 ].co);
- copy_v3_v3(co[1], vert[ edge[i].v2 ].co);
+ copy_v3_v3(co[0], vert[edge[i].v1].co);
+ copy_v3_v3(co[1], vert[edge[i].v2].co);
BLI_bvhtree_insert(tree, i, co[0], 2);
}
@@ -675,8 +672,7 @@ BVHTree* bvhtree_from_mesh_edges(BVHTreeFromMesh *data, DerivedMesh *mesh, float
}
}
}
- else
- {
+ else {
// printf("BVHTree is already build, using cached tree\n");
}
@@ -708,14 +704,13 @@ void free_bvhtree_from_mesh(struct BVHTreeFromMesh *data)
if (!data->cached)
BLI_bvhtree_free(data->tree);
- memset( data, 0, sizeof(*data) );
+ memset(data, 0, sizeof(*data));
}
}
/* BVHCache */
-typedef struct BVHCacheItem
-{
+typedef struct BVHCacheItem {
int type;
BVHTree *tree;
@@ -723,8 +718,8 @@ typedef struct BVHCacheItem
static void bvhcacheitem_set_if_match(void *_cached, void *_search)
{
- BVHCacheItem * cached = (BVHCacheItem *)_cached;
- BVHCacheItem * search = (BVHCacheItem *)_search;
+ BVHCacheItem *cached = (BVHCacheItem *)_cached;
+ BVHCacheItem *search = (BVHCacheItem *)_search;
if (search->type == cached->type) {
search->tree = cached->tree;
@@ -745,11 +740,11 @@ void bvhcache_insert(BVHCache *cache, BVHTree *tree, int type)
{
BVHCacheItem *item = NULL;
- assert( tree != NULL );
- assert( bvhcache_find(cache, type) == NULL );
+ assert(tree != NULL);
+ assert(bvhcache_find(cache, type) == NULL);
item = MEM_mallocN(sizeof(BVHCacheItem), "BVHCacheItem");
- assert( item != NULL );
+ assert(item != NULL);
item->type = type;
item->tree = tree;
diff --git a/source/blender/blenkernel/intern/camera.c b/source/blender/blenkernel/intern/camera.c
index 12801228950..e1cfcee1367 100644
--- a/source/blender/blenkernel/intern/camera.c
+++ b/source/blender/blenkernel/intern/camera.c
@@ -50,57 +50,57 @@
/****************************** Camera Datablock *****************************/
-void *add_camera(const char *name)
+void *BKE_camera_add(const char *name)
{
Camera *cam;
- cam= alloc_libblock(&G.main->camera, ID_CA, name);
-
- cam->lens= 35.0f;
- cam->sensor_x= 32.0f;
- cam->sensor_y= 18.0f;
- cam->clipsta= 0.1f;
- cam->clipend= 100.0f;
- cam->drawsize= 0.5f;
- cam->ortho_scale= 6.0;
+ cam = BKE_libblock_alloc(&G.main->camera, ID_CA, name);
+
+ cam->lens = 35.0f;
+ cam->sensor_x = 32.0f;
+ cam->sensor_y = 18.0f;
+ cam->clipsta = 0.1f;
+ cam->clipend = 100.0f;
+ cam->drawsize = 0.5f;
+ cam->ortho_scale = 6.0;
cam->flag |= CAM_SHOWPASSEPARTOUT;
cam->passepartalpha = 0.5f;
return cam;
}
-Camera *copy_camera(Camera *cam)
+Camera *BKE_camera_copy(Camera *cam)
{
Camera *camn;
- camn= copy_libblock(&cam->id);
+ camn = BKE_libblock_copy(&cam->id);
id_lib_extern((ID *)camn->dof_ob);
return camn;
}
-void make_local_camera(Camera *cam)
+void BKE_camera_make_local(Camera *cam)
{
- Main *bmain= G.main;
+ Main *bmain = G.main;
Object *ob;
- int is_local= FALSE, is_lib= FALSE;
+ int is_local = FALSE, is_lib = FALSE;
/* - only lib users: do nothing
* - only local users: set flag
* - mixed: make copy
*/
- if (cam->id.lib==NULL) return;
- if (cam->id.us==1) {
+ if (cam->id.lib == NULL) return;
+ if (cam->id.us == 1) {
id_clear_lib_data(bmain, &cam->id);
return;
}
- for (ob= bmain->object.first; ob && ELEM(0, is_lib, is_local); ob= ob->id.next) {
- if (ob->data==cam) {
- if (ob->id.lib) is_lib= TRUE;
- else is_local= TRUE;
+ for (ob = bmain->object.first; ob && ELEM(0, is_lib, is_local); ob = ob->id.next) {
+ if (ob->data == cam) {
+ if (ob->id.lib) is_lib = TRUE;
+ else is_local = TRUE;
}
}
@@ -108,17 +108,17 @@ void make_local_camera(Camera *cam)
id_clear_lib_data(bmain, &cam->id);
}
else if (is_local && is_lib) {
- Camera *cam_new= copy_camera(cam);
+ Camera *cam_new = BKE_camera_copy(cam);
- cam_new->id.us= 0;
+ cam_new->id.us = 0;
/* Remap paths of new ID using old library as base. */
BKE_id_lib_local_paths(bmain, cam->id.lib, &cam_new->id);
- for (ob= bmain->object.first; ob; ob= ob->id.next) {
+ for (ob = bmain->object.first; ob; ob = ob->id.next) {
if (ob->data == cam) {
- if (ob->id.lib==NULL) {
- ob->data= cam_new;
+ if (ob->id.lib == NULL) {
+ ob->data = cam_new;
cam_new->id.us++;
cam->id.us--;
}
@@ -127,26 +127,26 @@ void make_local_camera(Camera *cam)
}
}
-void free_camera(Camera *ca)
+void BKE_camera_free(Camera *ca)
{
BKE_free_animdata((ID *)ca);
}
/******************************** Camera Usage *******************************/
-void object_camera_mode(RenderData *rd, Object *cam_ob)
+void BKE_camera_object_mode(RenderData *rd, Object *cam_ob)
{
- rd->mode &= ~(R_ORTHO|R_PANORAMA);
+ rd->mode &= ~(R_ORTHO | R_PANORAMA);
- if (cam_ob && cam_ob->type==OB_CAMERA) {
- Camera *cam= cam_ob->data;
+ if (cam_ob && cam_ob->type == OB_CAMERA) {
+ Camera *cam = cam_ob->data;
if (cam->type == CAM_ORTHO) rd->mode |= R_ORTHO;
- if (cam->flag & CAM_PANORAMA) rd->mode |= R_PANORAMA;
+ if (cam->type == CAM_PANO) rd->mode |= R_PANORAMA;
}
}
/* get the camera's dof value, takes the dof object into account */
-float object_camera_dof_distance(Object *ob)
+float BKE_camera_object_dof_distance(Object *ob)
{
Camera *cam = (Camera *)ob->data;
if (ob->type != OB_CAMERA)
@@ -165,7 +165,7 @@ float object_camera_dof_distance(Object *ob)
return cam->YF_dofdist;
}
-float camera_sensor_size(int sensor_fit, float sensor_x, float sensor_y)
+float BKE_camera_sensor_size(int sensor_fit, float sensor_x, float sensor_y)
{
/* sensor size used to fit to. for auto, sensor_x is both x and y. */
if (sensor_fit == CAMERA_SENSOR_FIT_VERT)
@@ -174,7 +174,7 @@ float camera_sensor_size(int sensor_fit, float sensor_x, float sensor_y)
return sensor_x;
}
-int camera_sensor_fit(int sensor_fit, float sizex, float sizey)
+int BKE_camera_sensor_fit(int sensor_fit, float sizex, float sizey)
{
if (sensor_fit == CAMERA_SENSOR_FIT_AUTO) {
if (sizex >= sizey)
@@ -188,122 +188,122 @@ int camera_sensor_fit(int sensor_fit, float sizex, float sizey)
/******************************** Camera Params *******************************/
-void camera_params_init(CameraParams *params)
+void BKE_camera_params_init(CameraParams *params)
{
memset(params, 0, sizeof(CameraParams));
/* defaults */
- params->sensor_x= DEFAULT_SENSOR_WIDTH;
- params->sensor_y= DEFAULT_SENSOR_HEIGHT;
- params->sensor_fit= CAMERA_SENSOR_FIT_AUTO;
+ params->sensor_x = DEFAULT_SENSOR_WIDTH;
+ params->sensor_y = DEFAULT_SENSOR_HEIGHT;
+ params->sensor_fit = CAMERA_SENSOR_FIT_AUTO;
- params->zoom= 1.0f;
+ params->zoom = 1.0f;
}
-void camera_params_from_object(CameraParams *params, Object *ob)
+void BKE_camera_params_from_object(CameraParams *params, Object *ob)
{
if (!ob)
return;
- if (ob->type==OB_CAMERA) {
+ if (ob->type == OB_CAMERA) {
/* camera object */
- Camera *cam= ob->data;
+ Camera *cam = ob->data;
if (cam->type == CAM_ORTHO)
- params->is_ortho= TRUE;
- params->lens= cam->lens;
- params->ortho_scale= cam->ortho_scale;
+ params->is_ortho = TRUE;
+ params->lens = cam->lens;
+ params->ortho_scale = cam->ortho_scale;
- params->shiftx= cam->shiftx;
- params->shifty= cam->shifty;
+ params->shiftx = cam->shiftx;
+ params->shifty = cam->shifty;
- params->sensor_x= cam->sensor_x;
- params->sensor_y= cam->sensor_y;
- params->sensor_fit= cam->sensor_fit;
+ params->sensor_x = cam->sensor_x;
+ params->sensor_y = cam->sensor_y;
+ params->sensor_fit = cam->sensor_fit;
- params->clipsta= cam->clipsta;
- params->clipend= cam->clipend;
+ params->clipsta = cam->clipsta;
+ params->clipend = cam->clipend;
}
- else if (ob->type==OB_LAMP) {
+ else if (ob->type == OB_LAMP) {
/* lamp object */
- Lamp *la= ob->data;
- float fac= cosf((float)M_PI*la->spotsize/360.0f);
- float phi= acos(fac);
+ Lamp *la = ob->data;
+ float fac = cosf((float)M_PI * la->spotsize / 360.0f);
+ float phi = acos(fac);
- params->lens= 16.0f*fac/sinf(phi);
- if (params->lens==0.0f)
- params->lens= 35.0f;
+ params->lens = 16.0f * fac / sinf(phi);
+ if (params->lens == 0.0f)
+ params->lens = 35.0f;
- params->clipsta= la->clipsta;
- params->clipend= la->clipend;
+ params->clipsta = la->clipsta;
+ params->clipend = la->clipend;
}
}
-void camera_params_from_view3d(CameraParams *params, View3D *v3d, RegionView3D *rv3d)
+void BKE_camera_params_from_view3d(CameraParams *params, View3D *v3d, RegionView3D *rv3d)
{
/* common */
- params->lens= v3d->lens;
- params->clipsta= v3d->near;
- params->clipend= v3d->far;
+ params->lens = v3d->lens;
+ params->clipsta = v3d->near;
+ params->clipend = v3d->far;
- if (rv3d->persp==RV3D_CAMOB) {
+ if (rv3d->persp == RV3D_CAMOB) {
/* camera view */
- camera_params_from_object(params, v3d->camera);
+ BKE_camera_params_from_object(params, v3d->camera);
- params->zoom= BKE_screen_view3d_zoom_to_fac((float)rv3d->camzoom);
+ params->zoom = BKE_screen_view3d_zoom_to_fac((float)rv3d->camzoom);
- params->offsetx= 2.0f*rv3d->camdx*params->zoom;
- params->offsety= 2.0f*rv3d->camdy*params->zoom;
+ params->offsetx = 2.0f * rv3d->camdx * params->zoom;
+ params->offsety = 2.0f * rv3d->camdy * params->zoom;
params->shiftx *= params->zoom;
params->shifty *= params->zoom;
- params->zoom= 1.0f/params->zoom;
+ params->zoom = 1.0f / params->zoom;
}
- else if (rv3d->persp==RV3D_ORTHO) {
+ else if (rv3d->persp == RV3D_ORTHO) {
/* orthographic view */
- params->clipend *= 0.5f; // otherwise too extreme low zbuffer quality
- params->clipsta= - params->clipend;
+ params->clipend *= 0.5f; // otherwise too extreme low zbuffer quality
+ params->clipsta = -params->clipend;
- params->is_ortho= TRUE;
+ params->is_ortho = TRUE;
params->ortho_scale = rv3d->dist;
- params->zoom= 2.0f;
+ params->zoom = 2.0f;
}
else {
/* perspective view */
- params->zoom= 2.0f;
+ params->zoom = 2.0f;
}
}
-void camera_params_compute_viewplane(CameraParams *params, int winx, int winy, float xasp, float yasp)
+void BKE_camera_params_compute_viewplane(CameraParams *params, int winx, int winy, float xasp, float yasp)
{
rctf viewplane;
float pixsize, viewfac, sensor_size, dx, dy;
int sensor_fit;
/* fields rendering */
- params->ycor= yasp/xasp;
+ params->ycor = yasp / xasp;
if (params->use_fields)
params->ycor *= 2.0f;
if (params->is_ortho) {
/* orthographic camera */
/* scale == 1.0 means exact 1 to 1 mapping */
- pixsize= params->ortho_scale;
+ pixsize = params->ortho_scale;
}
else {
/* perspective camera */
- sensor_size= camera_sensor_size(params->sensor_fit, params->sensor_x, params->sensor_y);
- pixsize= (sensor_size * params->clipsta)/params->lens;
+ sensor_size = BKE_camera_sensor_size(params->sensor_fit, params->sensor_x, params->sensor_y);
+ pixsize = (sensor_size * params->clipsta) / params->lens;
}
/* determine sensor fit */
- sensor_fit = camera_sensor_fit(params->sensor_fit, xasp*winx, yasp*winy);
+ sensor_fit = BKE_camera_sensor_fit(params->sensor_fit, xasp * winx, yasp * winy);
- if (sensor_fit==CAMERA_SENSOR_FIT_HOR)
- viewfac= winx;
+ if (sensor_fit == CAMERA_SENSOR_FIT_HOR)
+ viewfac = winx;
else
- viewfac= params->ycor * winy;
+ viewfac = params->ycor * winy;
pixsize /= viewfac;
@@ -312,14 +312,14 @@ void camera_params_compute_viewplane(CameraParams *params, int winx, int winy, f
/* compute view plane:
* fully centered, zbuffer fills in jittered between -.5 and +.5 */
- viewplane.xmin = -0.5f*(float)winx;
- viewplane.ymin = -0.5f*params->ycor*(float)winy;
- viewplane.xmax = 0.5f*(float)winx;
- viewplane.ymax = 0.5f*params->ycor*(float)winy;
+ viewplane.xmin = -0.5f * (float)winx;
+ viewplane.ymin = -0.5f * params->ycor * (float)winy;
+ viewplane.xmax = 0.5f * (float)winx;
+ viewplane.ymax = 0.5f * params->ycor * (float)winy;
/* lens shift and offset */
- dx= params->shiftx*viewfac + winx*params->offsetx;
- dy= params->shifty*viewfac + winy*params->offsety;
+ dx = params->shiftx * viewfac + winx * params->offsetx;
+ dy = params->shifty * viewfac + winy * params->offsety;
viewplane.xmin += dx;
viewplane.ymin += dy;
@@ -329,12 +329,12 @@ void camera_params_compute_viewplane(CameraParams *params, int winx, int winy, f
/* fields offset */
if (params->field_second) {
if (params->field_odd) {
- viewplane.ymin-= 0.5f * params->ycor;
- viewplane.ymax-= 0.5f * params->ycor;
+ viewplane.ymin -= 0.5f * params->ycor;
+ viewplane.ymax -= 0.5f * params->ycor;
}
else {
- viewplane.ymin+= 0.5f * params->ycor;
- viewplane.ymax+= 0.5f * params->ycor;
+ viewplane.ymin += 0.5f * params->ycor;
+ viewplane.ymax += 0.5f * params->ycor;
}
}
@@ -345,101 +345,101 @@ void camera_params_compute_viewplane(CameraParams *params, int winx, int winy, f
viewplane.ymin *= pixsize;
viewplane.ymax *= pixsize;
- params->viewdx= pixsize;
- params->viewdy= params->ycor * pixsize;
- params->viewplane= viewplane;
+ params->viewdx = pixsize;
+ params->viewdy = params->ycor * pixsize;
+ params->viewplane = viewplane;
}
/* viewplane is assumed to be already computed */
-void camera_params_compute_matrix(CameraParams *params)
+void BKE_camera_params_compute_matrix(CameraParams *params)
{
- rctf viewplane= params->viewplane;
+ rctf viewplane = params->viewplane;
/* compute projection matrix */
if (params->is_ortho)
orthographic_m4(params->winmat, viewplane.xmin, viewplane.xmax,
- viewplane.ymin, viewplane.ymax, params->clipsta, params->clipend);
+ viewplane.ymin, viewplane.ymax, params->clipsta, params->clipend);
else
perspective_m4(params->winmat, viewplane.xmin, viewplane.xmax,
- viewplane.ymin, viewplane.ymax, params->clipsta, params->clipend);
+ viewplane.ymin, viewplane.ymax, params->clipsta, params->clipend);
}
/***************************** Camera View Frame *****************************/
-void camera_view_frame_ex(Scene *scene, Camera *camera, float drawsize, const short do_clip, const float scale[3],
- float r_asp[2], float r_shift[2], float *r_drawsize, float r_vec[4][3])
+void BKE_camera_view_frame_ex(Scene *scene, Camera *camera, float drawsize, const short do_clip, const float scale[3],
+ float r_asp[2], float r_shift[2], float *r_drawsize, float r_vec[4][3])
{
float facx, facy;
float depth;
/* aspect correcton */
if (scene) {
- float aspx= (float) scene->r.xsch*scene->r.xasp;
- float aspy= (float) scene->r.ysch*scene->r.yasp;
- int sensor_fit= camera_sensor_fit(camera->sensor_fit, aspx, aspy);
+ float aspx = (float) scene->r.xsch * scene->r.xasp;
+ float aspy = (float) scene->r.ysch * scene->r.yasp;
+ int sensor_fit = BKE_camera_sensor_fit(camera->sensor_fit, aspx, aspy);
- if (sensor_fit==CAMERA_SENSOR_FIT_HOR) {
- r_asp[0]= 1.0;
- r_asp[1]= aspy / aspx;
+ if (sensor_fit == CAMERA_SENSOR_FIT_HOR) {
+ r_asp[0] = 1.0;
+ r_asp[1] = aspy / aspx;
}
else {
- r_asp[0]= aspx / aspy;
- r_asp[1]= 1.0;
+ r_asp[0] = aspx / aspy;
+ r_asp[1] = 1.0;
}
}
else {
- r_asp[0]= 1.0f;
- r_asp[1]= 1.0f;
+ r_asp[0] = 1.0f;
+ r_asp[1] = 1.0f;
}
- if (camera->type==CAM_ORTHO) {
- facx= 0.5f * camera->ortho_scale * r_asp[0] * scale[0];
- facy= 0.5f * camera->ortho_scale * r_asp[1] * scale[1];
- r_shift[0]= camera->shiftx * camera->ortho_scale * scale[0];
- r_shift[1]= camera->shifty * camera->ortho_scale * scale[1];
- depth= do_clip ? -((camera->clipsta * scale[2]) + 0.1f) : - drawsize * camera->ortho_scale * scale[2];
+ if (camera->type == CAM_ORTHO) {
+ facx = 0.5f * camera->ortho_scale * r_asp[0] * scale[0];
+ facy = 0.5f * camera->ortho_scale * r_asp[1] * scale[1];
+ r_shift[0] = camera->shiftx * camera->ortho_scale * scale[0];
+ r_shift[1] = camera->shifty * camera->ortho_scale * scale[1];
+ depth = do_clip ? -((camera->clipsta * scale[2]) + 0.1f) : -drawsize * camera->ortho_scale * scale[2];
- *r_drawsize= 0.5f * camera->ortho_scale;
+ *r_drawsize = 0.5f * camera->ortho_scale;
}
else {
/* that way it's always visible - clipsta+0.1 */
float fac;
- float half_sensor= 0.5f*((camera->sensor_fit==CAMERA_SENSOR_FIT_VERT) ? (camera->sensor_y) : (camera->sensor_x));
+ float half_sensor = 0.5f * ((camera->sensor_fit == CAMERA_SENSOR_FIT_VERT) ? (camera->sensor_y) : (camera->sensor_x));
- *r_drawsize= drawsize / ((scale[0] + scale[1] + scale[2]) / 3.0f);
+ *r_drawsize = drawsize / ((scale[0] + scale[1] + scale[2]) / 3.0f);
if (do_clip) {
/* fixed depth, variable size (avoids exceeding clipping range) */
depth = -(camera->clipsta + 0.1f);
- fac = depth / (camera->lens/(-half_sensor) * scale[2]);
+ fac = depth / (camera->lens / (-half_sensor) * scale[2]);
}
else {
/* fixed size, variable depth (stays a reasonable size in the 3D view) */
- depth= *r_drawsize * camera->lens/(-half_sensor) * scale[2];
- fac= *r_drawsize;
+ depth = *r_drawsize * camera->lens / (-half_sensor) * scale[2];
+ fac = *r_drawsize;
}
- facx= fac * r_asp[0] * scale[0];
- facy= fac * r_asp[1] * scale[1];
- r_shift[0]= camera->shiftx*fac*2 * scale[0];
- r_shift[1]= camera->shifty*fac*2 * scale[1];
+ facx = fac * r_asp[0] * scale[0];
+ facy = fac * r_asp[1] * scale[1];
+ r_shift[0] = camera->shiftx * fac * 2 * scale[0];
+ r_shift[1] = camera->shifty * fac * 2 * scale[1];
}
- r_vec[0][0]= r_shift[0] + facx; r_vec[0][1]= r_shift[1] + facy; r_vec[0][2]= depth;
- r_vec[1][0]= r_shift[0] + facx; r_vec[1][1]= r_shift[1] - facy; r_vec[1][2]= depth;
- r_vec[2][0]= r_shift[0] - facx; r_vec[2][1]= r_shift[1] - facy; r_vec[2][2]= depth;
- r_vec[3][0]= r_shift[0] - facx; r_vec[3][1]= r_shift[1] + facy; r_vec[3][2]= depth;
+ r_vec[0][0] = r_shift[0] + facx; r_vec[0][1] = r_shift[1] + facy; r_vec[0][2] = depth;
+ r_vec[1][0] = r_shift[0] + facx; r_vec[1][1] = r_shift[1] - facy; r_vec[1][2] = depth;
+ r_vec[2][0] = r_shift[0] - facx; r_vec[2][1] = r_shift[1] - facy; r_vec[2][2] = depth;
+ r_vec[3][0] = r_shift[0] - facx; r_vec[3][1] = r_shift[1] + facy; r_vec[3][2] = depth;
}
-void camera_view_frame(Scene *scene, Camera *camera, float r_vec[4][3])
+void BKE_camera_view_frame(Scene *scene, Camera *camera, float r_vec[4][3])
{
float dummy_asp[2];
float dummy_shift[2];
float dummy_drawsize;
- const float dummy_scale[3]= {1.0f, 1.0f, 1.0f};
+ const float dummy_scale[3] = {1.0f, 1.0f, 1.0f};
- camera_view_frame_ex(scene, camera, FALSE, 1.0, dummy_scale,
- dummy_asp, dummy_shift, &dummy_drawsize, r_vec);
+ BKE_camera_view_frame_ex(scene, camera, FALSE, 1.0, dummy_scale,
+ dummy_asp, dummy_shift, &dummy_drawsize, r_vec);
}
@@ -450,15 +450,15 @@ typedef struct CameraViewFrameData {
unsigned int tot;
} CameraViewFrameData;
-static void camera_to_frame_view_cb(const float co[3], void *user_data)
+static void BKE_camera_to_frame_view_cb(const float co[3], void *user_data)
{
- CameraViewFrameData *data= (CameraViewFrameData *)user_data;
+ CameraViewFrameData *data = (CameraViewFrameData *)user_data;
unsigned int i;
- for (i= 0; i < 4; i++) {
- float nd= dist_to_plane_v3(co, data->frame_tx[i], data->normal_tx[i]);
+ for (i = 0; i < 4; i++) {
+ float nd = dist_to_plane_v3(co, data->frame_tx[i], data->normal_tx[i]);
if (nd < data->dist_vals[i]) {
- data->dist_vals[i]= nd;
+ data->dist_vals[i] = nd;
}
}
@@ -467,54 +467,54 @@ static void camera_to_frame_view_cb(const float co[3], void *user_data)
/* don't move the camera, just yield the fit location */
/* only valid for perspective cameras */
-int camera_view_frame_fit_to_scene(Scene *scene, struct View3D *v3d, Object *camera_ob, float r_co[3])
+int BKE_camera_view_frame_fit_to_scene(Scene *scene, struct View3D *v3d, Object *camera_ob, float r_co[3])
{
float shift[2];
float plane_tx[4][3];
float rot_obmat[3][3];
- const float zero[3]= {0,0,0};
+ const float zero[3] = {0, 0, 0};
CameraViewFrameData data_cb;
unsigned int i;
- camera_view_frame(scene, camera_ob->data, data_cb.frame_tx);
+ BKE_camera_view_frame(scene, camera_ob->data, data_cb.frame_tx);
copy_m3_m4(rot_obmat, camera_ob->obmat);
normalize_m3(rot_obmat);
- for (i= 0; i < 4; i++) {
+ for (i = 0; i < 4; i++) {
/* normalize so Z is always 1.0f*/
- mul_v3_fl(data_cb.frame_tx[i], 1.0f/data_cb.frame_tx[i][2]);
+ mul_v3_fl(data_cb.frame_tx[i], 1.0f / data_cb.frame_tx[i][2]);
}
/* get the shift back out of the frame */
- shift[0]= (data_cb.frame_tx[0][0] +
- data_cb.frame_tx[1][0] +
- data_cb.frame_tx[2][0] +
- data_cb.frame_tx[3][0]) / 4.0f;
- shift[1]= (data_cb.frame_tx[0][1] +
- data_cb.frame_tx[1][1] +
- data_cb.frame_tx[2][1] +
- data_cb.frame_tx[3][1]) / 4.0f;
-
- for (i= 0; i < 4; i++) {
+ shift[0] = (data_cb.frame_tx[0][0] +
+ data_cb.frame_tx[1][0] +
+ data_cb.frame_tx[2][0] +
+ data_cb.frame_tx[3][0]) / 4.0f;
+ shift[1] = (data_cb.frame_tx[0][1] +
+ data_cb.frame_tx[1][1] +
+ data_cb.frame_tx[2][1] +
+ data_cb.frame_tx[3][1]) / 4.0f;
+
+ for (i = 0; i < 4; i++) {
mul_m3_v3(rot_obmat, data_cb.frame_tx[i]);
}
- for (i= 0; i < 4; i++) {
+ for (i = 0; i < 4; i++) {
normal_tri_v3(data_cb.normal_tx[i],
zero, data_cb.frame_tx[i], data_cb.frame_tx[(i + 1) % 4]);
}
/* initialize callback data */
- data_cb.dist_vals[0]=
- data_cb.dist_vals[1]=
- data_cb.dist_vals[2]=
- data_cb.dist_vals[3]= FLT_MAX;
- data_cb.tot= 0;
+ data_cb.dist_vals[0] =
+ data_cb.dist_vals[1] =
+ data_cb.dist_vals[2] =
+ data_cb.dist_vals[3] = FLT_MAX;
+ data_cb.tot = 0;
/* run callback on all visible points */
BKE_scene_foreach_display_point(scene, v3d, BA_SELECT,
- camera_to_frame_view_cb, &data_cb);
+ BKE_camera_to_frame_view_cb, &data_cb);
if (data_cb.tot <= 1) {
return FALSE;
@@ -526,7 +526,7 @@ int camera_view_frame_fit_to_scene(Scene *scene, struct View3D *v3d, Object *cam
float plane_isect_pt_1[3], plane_isect_pt_2[3];
/* apply the dist-from-plane's to the transformed plane points */
- for (i= 0; i < 4; i++) {
+ for (i = 0; i < 4; i++) {
mul_v3_v3fl(plane_tx[i], data_cb.normal_tx[i], data_cb.dist_vals[i]);
}
@@ -547,14 +547,14 @@ int camera_view_frame_fit_to_scene(Scene *scene, struct View3D *v3d, Object *cam
return FALSE;
}
else {
- float cam_plane_no[3]= {0.0f, 0.0f, -1.0f};
+ float cam_plane_no[3] = {0.0f, 0.0f, -1.0f};
float plane_isect_delta[3];
float plane_isect_delta_len;
mul_m3_v3(rot_obmat, cam_plane_no);
sub_v3_v3v3(plane_isect_delta, plane_isect_pt_2, plane_isect_pt_1);
- plane_isect_delta_len= len_v3(plane_isect_delta);
+ plane_isect_delta_len = len_v3(plane_isect_delta);
if (dot_v3v3(plane_isect_delta, cam_plane_no) > 0.0f) {
copy_v3_v3(r_co, plane_isect_pt_1);
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c
index 474aa84fec6..db2362b58ce 100644
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@ -1,4 +1,4 @@
- /*
+/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -172,11 +172,11 @@ static void cdDM_copyPolyArray(DerivedMesh *dm, MPoly *poly_r)
static void cdDM_getMinMax(DerivedMesh *dm, float min_r[3], float max_r[3])
{
- CDDerivedMesh *cddm = (CDDerivedMesh*) dm;
+ CDDerivedMesh *cddm = (CDDerivedMesh *) dm;
int i;
if (dm->numVertData) {
- for (i=0; i<dm->numVertData; i++) {
+ for (i = 0; i < dm->numVertData; i++) {
DO_MINMAX(cddm->mvert[i].co, min_r, max_r);
}
}
@@ -188,7 +188,7 @@ static void cdDM_getMinMax(DerivedMesh *dm, float min_r[3], float max_r[3])
static void cdDM_getVertCo(DerivedMesh *dm, int index, float co_r[3])
{
- CDDerivedMesh *cddm = (CDDerivedMesh*) dm;
+ CDDerivedMesh *cddm = (CDDerivedMesh *) dm;
copy_v3_v3(co_r, cddm->mvert[index].co);
}
@@ -204,16 +204,16 @@ static void cdDM_getVertCos(DerivedMesh *dm, float (*cos_r)[3])
static void cdDM_getVertNo(DerivedMesh *dm, int index, float no_r[3])
{
- CDDerivedMesh *cddm = (CDDerivedMesh*) dm;
+ CDDerivedMesh *cddm = (CDDerivedMesh *) dm;
normal_short_to_float_v3(no_r, cddm->mvert[index].no);
}
static const MeshElemMap *cdDM_getPolyMap(Object *ob, DerivedMesh *dm)
{
- CDDerivedMesh *cddm = (CDDerivedMesh*) dm;
+ CDDerivedMesh *cddm = (CDDerivedMesh *) dm;
if (!cddm->pmap && ob->type == OB_MESH) {
- Mesh *me= ob->data;
+ Mesh *me = ob->data;
create_vert_poly_map(&cddm->pmap, &cddm->pmap_mem,
me->mpoly, me->mloop,
@@ -225,19 +225,19 @@ static const MeshElemMap *cdDM_getPolyMap(Object *ob, DerivedMesh *dm)
static int can_pbvh_draw(Object *ob, DerivedMesh *dm)
{
- CDDerivedMesh *cddm = (CDDerivedMesh*) dm;
- Mesh *me= ob->data;
- int deformed= 0;
+ CDDerivedMesh *cddm = (CDDerivedMesh *) dm;
+ Mesh *me = ob->data;
+ int deformed = 0;
/* active modifiers means extra deformation, which can't be handled correct
- * on bith of PBVH and sculpt "layer" levels, so use PBVH only for internal brush
+ * on birth of PBVH and sculpt "layer" levels, so use PBVH only for internal brush
* stuff and show final DerivedMesh so user would see actual object shape */
- deformed|= ob->sculpt->modifiers_active;
+ deformed |= ob->sculpt->modifiers_active;
/* as in case with modifiers, we can't synchronize deformation made against
* PBVH and non-locked keyblock, so also use PBVH only for brushes and
* final DM to give final result to user */
- deformed|= ob->sculpt->kb && (ob->shapeflag&OB_SHAPE_LOCK) == 0;
+ deformed |= ob->sculpt->kb && (ob->shapeflag & OB_SHAPE_LOCK) == 0;
if (deformed)
return 0;
@@ -247,17 +247,18 @@ static int can_pbvh_draw(Object *ob, DerivedMesh *dm)
static struct PBVH *cdDM_getPBVH(Object *ob, DerivedMesh *dm)
{
- CDDerivedMesh *cddm = (CDDerivedMesh*) dm;
+ CDDerivedMesh *cddm = (CDDerivedMesh *) dm;
if (!ob) {
- cddm->pbvh= NULL;
+ cddm->pbvh = NULL;
return NULL;
}
if (!ob->sculpt)
return NULL;
+
if (ob->sculpt->pbvh) {
- cddm->pbvh= ob->sculpt->pbvh;
+ cddm->pbvh = ob->sculpt->pbvh;
cddm->pbvh_draw = can_pbvh_draw(ob, dm);
}
@@ -265,8 +266,10 @@ static struct PBVH *cdDM_getPBVH(Object *ob, DerivedMesh *dm)
* this derivedmesh is just original mesh. it's the multires subsurf dm
* that this is actually for, to support a pbvh on a modified mesh */
if (!cddm->pbvh && ob->type == OB_MESH) {
- SculptSession *ss= ob->sculpt;
- Mesh *me= ob->data;
+ SculptSession *ss = ob->sculpt;
+ Mesh *me = ob->data;
+ int deformed = 0;
+
cddm->pbvh = BLI_pbvh_new();
cddm->pbvh_draw = can_pbvh_draw(ob, dm);
@@ -275,13 +278,15 @@ static struct PBVH *cdDM_getPBVH(Object *ob, DerivedMesh *dm)
BLI_pbvh_build_mesh(cddm->pbvh, me->mface, me->mvert,
me->totface, me->totvert);
- if (ss->modifiers_active && ob->derivedDeform) {
- DerivedMesh *deformdm= ob->derivedDeform;
+ deformed = ss->modifiers_active || me->key;
+
+ if (deformed && ob->derivedDeform) {
+ DerivedMesh *deformdm = ob->derivedDeform;
float (*vertCos)[3];
int totvert;
- totvert= deformdm->getNumVerts(deformdm);
- vertCos= MEM_callocN(3*totvert*sizeof(float), "cdDM_getPBVH vertCos");
+ totvert = deformdm->getNumVerts(deformdm);
+ vertCos = MEM_callocN(3 * totvert * sizeof(float), "cdDM_getPBVH vertCos");
deformdm->getVertCos(deformdm, vertCos);
BLI_pbvh_apply_vertCos(cddm->pbvh, vertCos);
MEM_freeN(vertCos);
@@ -295,7 +300,7 @@ static struct PBVH *cdDM_getPBVH(Object *ob, DerivedMesh *dm)
* TODO: proper fix is to support the pbvh in all drawing modes */
static void cdDM_update_normals_from_pbvh(DerivedMesh *dm)
{
- CDDerivedMesh *cddm = (CDDerivedMesh*) dm;
+ CDDerivedMesh *cddm = (CDDerivedMesh *) dm;
float (*face_nors)[3];
if (!cddm->pbvh || !cddm->pbvh_draw || !dm->numTessFaceData)
@@ -308,23 +313,23 @@ static void cdDM_update_normals_from_pbvh(DerivedMesh *dm)
static void cdDM_drawVerts(DerivedMesh *dm)
{
- CDDerivedMesh *cddm = (CDDerivedMesh*) dm;
+ CDDerivedMesh *cddm = (CDDerivedMesh *) dm;
MVert *mv = cddm->mvert;
int i;
- if ( GPU_buffer_legacy(dm) ) {
+ if (GPU_buffer_legacy(dm)) {
glBegin(GL_POINTS);
for (i = 0; i < dm->numVertData; i++, mv++)
glVertex3fv(mv->co);
glEnd();
}
- else { /* use OpenGL VBOs or Vertex Arrays instead for better, faster rendering */
+ else { /* use OpenGL VBOs or Vertex Arrays instead for better, faster rendering */
GPU_vertex_setup(dm);
- if ( !GPU_buffer_legacy(dm) ) {
+ if (!GPU_buffer_legacy(dm)) {
if (dm->drawObject->tot_triangle_point)
- glDrawArrays(GL_POINTS,0, dm->drawObject->tot_triangle_point);
+ glDrawArrays(GL_POINTS, 0, dm->drawObject->tot_triangle_point);
else
- glDrawArrays(GL_POINTS,0, dm->drawObject->tot_loose_point);
+ glDrawArrays(GL_POINTS, 0, dm->drawObject->tot_loose_point);
}
GPU_buffer_unbind();
}
@@ -332,16 +337,16 @@ static void cdDM_drawVerts(DerivedMesh *dm)
static void cdDM_drawUVEdges(DerivedMesh *dm)
{
- CDDerivedMesh *cddm = (CDDerivedMesh*) dm;
+ CDDerivedMesh *cddm = (CDDerivedMesh *) dm;
MFace *mf = cddm->mface;
MTFace *tf = DM_get_tessface_data_layer(dm, CD_MTFACE);
int i;
if (mf) {
- if ( GPU_buffer_legacy(dm) ) {
+ if (GPU_buffer_legacy(dm)) {
glBegin(GL_LINES);
for (i = 0; i < dm->numTessFaceData; i++, mf++, tf++) {
- if (!(mf->flag&ME_HIDE)) {
+ if (!(mf->flag & ME_HIDE)) {
glVertex2fv(tf->uv[0]);
glVertex2fv(tf->uv[1]);
@@ -370,21 +375,21 @@ static void cdDM_drawUVEdges(DerivedMesh *dm)
int curpos = 0;
GPU_uvedge_setup(dm);
- if ( !GPU_buffer_legacy(dm) ) {
+ if (!GPU_buffer_legacy(dm)) {
for (i = 0; i < dm->numTessFaceData; i++, mf++) {
- if (!(mf->flag&ME_HIDE)) {
+ if (!(mf->flag & ME_HIDE)) {
draw = 1;
}
else {
draw = 0;
}
- if ( prevdraw != draw ) {
- if ( prevdraw > 0 && (curpos-prevstart) > 0) {
- glDrawArrays(GL_LINES,prevstart,curpos-prevstart);
+ if (prevdraw != draw) {
+ if (prevdraw > 0 && (curpos - prevstart) > 0) {
+ glDrawArrays(GL_LINES, prevstart, curpos - prevstart);
}
prevstart = curpos;
}
- if ( mf->v4 ) {
+ if (mf->v4) {
curpos += 8;
}
else {
@@ -392,8 +397,8 @@ static void cdDM_drawUVEdges(DerivedMesh *dm)
}
prevdraw = draw;
}
- if ( prevdraw > 0 && (curpos-prevstart) > 0 ) {
- glDrawArrays(GL_LINES,prevstart,curpos-prevstart);
+ if (prevdraw > 0 && (curpos - prevstart) > 0) {
+ glDrawArrays(GL_LINES, prevstart, curpos - prevstart);
}
}
GPU_buffer_unbind();
@@ -403,13 +408,13 @@ static void cdDM_drawUVEdges(DerivedMesh *dm)
static void cdDM_drawEdges(DerivedMesh *dm, int drawLooseEdges, int drawAllEdges)
{
- CDDerivedMesh *cddm = (CDDerivedMesh*) dm;
+ CDDerivedMesh *cddm = (CDDerivedMesh *) dm;
MVert *mvert = cddm->mvert;
MEdge *medge = cddm->medge;
int i;
- if ( GPU_buffer_legacy(dm) ) {
- DEBUG_VBO( "Using legacy code. cdDM_drawEdges\n" );
+ if (GPU_buffer_legacy(dm)) {
+ DEBUG_VBO("Using legacy code. cdDM_drawEdges\n");
glBegin(GL_LINES);
for (i = 0; i < dm->numEdgeData; i++, medge++) {
if ((drawAllEdges || (medge->flag & ME_EDGEDRAW)) &&
@@ -421,7 +426,7 @@ static void cdDM_drawEdges(DerivedMesh *dm, int drawLooseEdges, int drawAllEdges
}
glEnd();
}
- else { /* use OpenGL VBOs or Vertex Arrays instead for better, faster rendering */
+ else { /* use OpenGL VBOs or Vertex Arrays instead for better, faster rendering */
int prevstart = 0;
int prevdraw = 1;
int draw = TRUE;
@@ -437,16 +442,16 @@ static void cdDM_drawEdges(DerivedMesh *dm, int drawLooseEdges, int drawAllEdges
else {
draw = FALSE;
}
- if ( prevdraw != draw ) {
- if ( prevdraw > 0 && (i-prevstart) > 0 ) {
+ if (prevdraw != draw) {
+ if (prevdraw > 0 && (i - prevstart) > 0) {
GPU_buffer_draw_elements(dm->drawObject->edges, GL_LINES, prevstart * 2, (i - prevstart) * 2);
}
prevstart = i;
}
prevdraw = draw;
}
- if ( prevdraw > 0 && (i-prevstart) > 0 ) {
- GPU_buffer_draw_elements(dm->drawObject->edges, GL_LINES, prevstart * 2, (i-prevstart) * 2);
+ if (prevdraw > 0 && (i - prevstart) > 0) {
+ GPU_buffer_draw_elements(dm->drawObject->edges, GL_LINES, prevstart * 2, (i - prevstart) * 2);
}
}
GPU_buffer_unbind();
@@ -455,45 +460,45 @@ static void cdDM_drawEdges(DerivedMesh *dm, int drawLooseEdges, int drawAllEdges
static void cdDM_drawLooseEdges(DerivedMesh *dm)
{
- CDDerivedMesh *cddm = (CDDerivedMesh*) dm;
+ CDDerivedMesh *cddm = (CDDerivedMesh *) dm;
MVert *mvert = cddm->mvert;
MEdge *medge = cddm->medge;
int i;
- if ( GPU_buffer_legacy(dm) ) {
- DEBUG_VBO( "Using legacy code. cdDM_drawLooseEdges\n" );
+ if (GPU_buffer_legacy(dm)) {
+ DEBUG_VBO("Using legacy code. cdDM_drawLooseEdges\n");
glBegin(GL_LINES);
for (i = 0; i < dm->numEdgeData; i++, medge++) {
- if (medge->flag&ME_LOOSEEDGE) {
+ if (medge->flag & ME_LOOSEEDGE) {
glVertex3fv(mvert[medge->v1].co);
glVertex3fv(mvert[medge->v2].co);
}
}
glEnd();
}
- else { /* use OpenGL VBOs or Vertex Arrays instead for better, faster rendering */
+ else { /* use OpenGL VBOs or Vertex Arrays instead for better, faster rendering */
int prevstart = 0;
int prevdraw = 1;
int draw = 1;
GPU_edge_setup(dm);
- if ( !GPU_buffer_legacy(dm) ) {
+ if (!GPU_buffer_legacy(dm)) {
for (i = 0; i < dm->numEdgeData; i++, medge++) {
- if (medge->flag&ME_LOOSEEDGE) {
+ if (medge->flag & ME_LOOSEEDGE) {
draw = 1;
}
else {
draw = 0;
}
- if ( prevdraw != draw ) {
- if ( prevdraw > 0 && (i-prevstart) > 0) {
+ if (prevdraw != draw) {
+ if (prevdraw > 0 && (i - prevstart) > 0) {
GPU_buffer_draw_elements(dm->drawObject->edges, GL_LINES, prevstart * 2, (i - prevstart) * 2);
}
prevstart = i;
}
prevdraw = draw;
}
- if ( prevdraw > 0 && (i-prevstart) > 0 ) {
+ if (prevdraw > 0 && (i - prevstart) > 0) {
GPU_buffer_draw_elements(dm->drawObject->edges, GL_LINES, prevstart * 2, (i - prevstart) * 2);
}
}
@@ -502,13 +507,13 @@ static void cdDM_drawLooseEdges(DerivedMesh *dm)
}
static void cdDM_drawFacesSolid(DerivedMesh *dm,
- float (*partial_redraw_planes)[4],
- int UNUSED(fast), DMSetMaterial setMaterial)
+ float (*partial_redraw_planes)[4],
+ int UNUSED(fast), DMSetMaterial setMaterial)
{
- CDDerivedMesh *cddm = (CDDerivedMesh*) dm;
+ CDDerivedMesh *cddm = (CDDerivedMesh *) dm;
MVert *mvert = cddm->mvert;
MFace *mface = cddm->mface;
- float *nors= dm->getTessFaceDataArray(dm, CD_NORMAL);
+ float *nors = dm->getTessFaceDataArray(dm, CD_NORMAL);
int a, glmode = -1, shademodel = -1, matnr = -1, drawCurrentMat = 1;
#define PASSVERT(index) { \
@@ -516,7 +521,7 @@ static void cdDM_drawFacesSolid(DerivedMesh *dm,
short *no = mvert[index].no; \
glNormal3sv(no); \
} \
- glVertex3fv(mvert[index].co); \
+ glVertex3fv(mvert[index].co); \
}
if (cddm->pbvh && cddm->pbvh_draw) {
@@ -530,15 +535,15 @@ static void cdDM_drawFacesSolid(DerivedMesh *dm,
return;
}
- if ( GPU_buffer_legacy(dm) ) {
- DEBUG_VBO( "Using legacy code. cdDM_drawFacesSolid\n" );
+ if (GPU_buffer_legacy(dm)) {
+ DEBUG_VBO("Using legacy code. cdDM_drawFacesSolid\n");
glBegin(glmode = GL_QUADS);
for (a = 0; a < dm->numTessFaceData; a++, mface++) {
int new_glmode, new_matnr, new_shademodel;
- new_glmode = mface->v4?GL_QUADS:GL_TRIANGLES;
+ new_glmode = mface->v4 ? GL_QUADS : GL_TRIANGLES;
new_matnr = mface->mat_nr + 1;
- new_shademodel = (mface->flag & ME_SMOOTH)?GL_SMOOTH:GL_FLAT;
+ new_shademodel = (mface->flag & ME_SMOOTH) ? GL_SMOOTH : GL_FLAT;
if (new_glmode != glmode || new_matnr != matnr || new_shademodel != shademodel) {
glEnd();
@@ -558,10 +563,10 @@ static void cdDM_drawFacesSolid(DerivedMesh *dm,
/* TODO make this better (cache facenormals as layer?) */
float nor[3];
if (mface->v4) {
- normal_quad_v3( nor,mvert[mface->v1].co, mvert[mface->v2].co, mvert[mface->v3].co, mvert[mface->v4].co);
+ normal_quad_v3(nor, mvert[mface->v1].co, mvert[mface->v2].co, mvert[mface->v3].co, mvert[mface->v4].co);
}
else {
- normal_tri_v3( nor,mvert[mface->v1].co, mvert[mface->v2].co, mvert[mface->v3].co);
+ normal_tri_v3(nor, mvert[mface->v1].co, mvert[mface->v2].co, mvert[mface->v3].co);
}
glNormal3fv(nor);
}
@@ -579,10 +584,10 @@ static void cdDM_drawFacesSolid(DerivedMesh *dm,
}
glEnd();
}
- else { /* use OpenGL VBOs or Vertex Arrays instead for better, faster rendering */
- GPU_vertex_setup( dm );
- GPU_normal_setup( dm );
- if ( !GPU_buffer_legacy(dm) ) {
+ else { /* use OpenGL VBOs or Vertex Arrays instead for better, faster rendering */
+ GPU_vertex_setup(dm);
+ GPU_normal_setup(dm);
+ if (!GPU_buffer_legacy(dm)) {
glShadeModel(GL_SMOOTH);
for (a = 0; a < dm->drawObject->totmaterial; a++) {
if (setMaterial(dm->drawObject->materials[a].mat_nr + 1, NULL)) {
@@ -591,7 +596,7 @@ static void cdDM_drawFacesSolid(DerivedMesh *dm,
}
}
}
- GPU_buffer_unbind( );
+ GPU_buffer_unbind();
}
#undef PASSVERT
@@ -599,16 +604,16 @@ static void cdDM_drawFacesSolid(DerivedMesh *dm,
}
static void cdDM_drawFacesTex_common(DerivedMesh *dm,
- DMSetDrawOptionsTex drawParams,
- DMSetDrawOptions drawParamsMapped,
- DMCompareDrawOptions compareDrawOptions,
- void *userData)
+ DMSetDrawOptionsTex drawParams,
+ DMSetDrawOptions drawParamsMapped,
+ DMCompareDrawOptions compareDrawOptions,
+ void *userData)
{
- CDDerivedMesh *cddm = (CDDerivedMesh*) dm;
+ CDDerivedMesh *cddm = (CDDerivedMesh *) dm;
MVert *mv = cddm->mvert;
MFace *mf = DM_get_tessface_data_layer(dm, CD_MFACE);
MCol *realcol = dm->getTessFaceDataArray(dm, CD_TEXTURE_MCOL);
- float *nors= dm->getTessFaceDataArray(dm, CD_NORMAL);
+ float *nors = dm->getTessFaceDataArray(dm, CD_NORMAL);
MTFace *tf = DM_get_tessface_data_layer(dm, CD_MTFACE);
int i, j, orig, *index = DM_get_tessface_data_layer(dm, CD_ORIGINDEX);
int startFace = 0 /*, lastFlag = 0xdeadbeef */ /* UNUSED */;
@@ -618,72 +623,72 @@ static void cdDM_drawFacesTex_common(DerivedMesh *dm,
cdDM_update_normals_from_pbvh(dm);
- if ( GPU_buffer_legacy(dm) ) {
- DEBUG_VBO( "Using legacy code. cdDM_drawFacesTex_common\n" );
+ if (GPU_buffer_legacy(dm)) {
+ DEBUG_VBO("Using legacy code. cdDM_drawFacesTex_common\n");
for (i = 0; i < dm->numTessFaceData; i++, mf++) {
MVert *mvert;
DMDrawOption draw_option;
unsigned char *cp = NULL;
if (drawParams) {
- draw_option = drawParams(tf? &tf[i]: NULL, (mcol != NULL), mf->mat_nr);
+ draw_option = drawParams(tf ? &tf[i] : NULL, (mcol != NULL), mf->mat_nr);
}
else {
if (index) {
orig = *index++;
- if (orig == ORIGINDEX_NONE) { if (nors) nors += 3; continue; }
+ if (orig == ORIGINDEX_NONE) { if (nors) nors += 3; continue; }
if (drawParamsMapped) draw_option = drawParamsMapped(userData, orig);
- else { if (nors) nors += 3; continue; }
+ else { if (nors) nors += 3; continue; }
}
else
- if (drawParamsMapped) draw_option = drawParamsMapped(userData, i);
- else { if (nors) nors += 3; continue; }
+ if (drawParamsMapped) draw_option = drawParamsMapped(userData, i);
+ else { if (nors) nors += 3; continue; }
}
if (draw_option != DM_DRAW_OPTION_SKIP) {
if (draw_option != DM_DRAW_OPTION_NO_MCOL && mcol)
- cp= (unsigned char*) &mcol[i*4];
+ cp = (unsigned char *) &mcol[i * 4];
- if (!(mf->flag&ME_SMOOTH)) {
+ if (!(mf->flag & ME_SMOOTH)) {
if (nors) {
glNormal3fv(nors);
}
else {
float nor[3];
if (mf->v4) {
- normal_quad_v3( nor,mv[mf->v1].co, mv[mf->v2].co, mv[mf->v3].co, mv[mf->v4].co);
+ normal_quad_v3(nor, mv[mf->v1].co, mv[mf->v2].co, mv[mf->v3].co, mv[mf->v4].co);
}
else {
- normal_tri_v3( nor,mv[mf->v1].co, mv[mf->v2].co, mv[mf->v3].co);
+ normal_tri_v3(nor, mv[mf->v1].co, mv[mf->v2].co, mv[mf->v3].co);
}
glNormal3fv(nor);
}
}
- glBegin(mf->v4?GL_QUADS:GL_TRIANGLES);
+ glBegin(mf->v4 ? GL_QUADS : GL_TRIANGLES);
if (tf) glTexCoord2fv(tf[i].uv[0]);
if (cp) glColor3ub(cp[3], cp[2], cp[1]);
mvert = &mv[mf->v1];
- if (mf->flag&ME_SMOOTH) glNormal3sv(mvert->no);
+ if (mf->flag & ME_SMOOTH) glNormal3sv(mvert->no);
glVertex3fv(mvert->co);
if (tf) glTexCoord2fv(tf[i].uv[1]);
if (cp) glColor3ub(cp[7], cp[6], cp[5]);
mvert = &mv[mf->v2];
- if (mf->flag&ME_SMOOTH) glNormal3sv(mvert->no);
+ if (mf->flag & ME_SMOOTH) glNormal3sv(mvert->no);
glVertex3fv(mvert->co);
if (tf) glTexCoord2fv(tf[i].uv[2]);
if (cp) glColor3ub(cp[11], cp[10], cp[9]);
mvert = &mv[mf->v3];
- if (mf->flag&ME_SMOOTH) glNormal3sv(mvert->no);
+ if (mf->flag & ME_SMOOTH) glNormal3sv(mvert->no);
glVertex3fv(mvert->co);
if (mf->v4) {
if (tf) glTexCoord2fv(tf[i].uv[3]);
if (cp) glColor3ub(cp[15], cp[14], cp[13]);
mvert = &mv[mf->v4];
- if (mf->flag&ME_SMOOTH) glNormal3sv(mvert->no);
+ if (mf->flag & ME_SMOOTH) glNormal3sv(mvert->no);
glVertex3fv(mvert->co);
}
glEnd();
@@ -697,56 +702,56 @@ static void cdDM_drawFacesTex_common(DerivedMesh *dm,
if (!col)
col = mcol;
- GPU_vertex_setup( dm );
- GPU_normal_setup( dm );
- GPU_uv_setup( dm );
- if ( col != NULL ) {
+ GPU_vertex_setup(dm);
+ GPU_normal_setup(dm);
+ GPU_uv_setup(dm);
+ if (col != NULL) {
#if 0
- if ( realcol && dm->drawObject->colType == CD_TEXTURE_MCOL ) {
+ if (realcol && dm->drawObject->colType == CD_TEXTURE_MCOL) {
col = 0;
}
- else if ( mcol && dm->drawObject->colType == CD_MCOL ) {
+ else if (mcol && dm->drawObject->colType == CD_MCOL) {
col = 0;
}
- if ( col != 0 )
+ if (col != 0)
#endif
{
- unsigned char *colors = MEM_mallocN(dm->getNumTessFaces(dm)*4*3*sizeof(unsigned char), "cdDM_drawFacesTex_common");
- for ( i=0; i < dm->getNumTessFaces(dm); i++ ) {
- for ( j=0; j < 4; j++ ) {
+ unsigned char *colors = MEM_mallocN(dm->getNumTessFaces(dm) * 4 * 3 * sizeof(unsigned char), "cdDM_drawFacesTex_common");
+ for (i = 0; i < dm->getNumTessFaces(dm); i++) {
+ for (j = 0; j < 4; j++) {
/* bgr -> rgb is intentional (and stupid), but how its stored internally */
- colors[i*12+j*3] = col[i*4+j].b;
- colors[i*12+j*3+1] = col[i*4+j].g;
- colors[i*12+j*3+2] = col[i*4+j].r;
+ colors[i * 12 + j * 3] = col[i * 4 + j].b;
+ colors[i * 12 + j * 3 + 1] = col[i * 4 + j].g;
+ colors[i * 12 + j * 3 + 2] = col[i * 4 + j].r;
}
}
- GPU_color3_upload(dm,colors);
+ GPU_color3_upload(dm, colors);
MEM_freeN(colors);
if (realcol)
dm->drawObject->colType = CD_TEXTURE_MCOL;
else if (mcol)
dm->drawObject->colType = CD_MCOL;
}
- GPU_color_setup( dm );
+ GPU_color_setup(dm);
}
- if ( !GPU_buffer_legacy(dm) ) {
- int tottri = dm->drawObject->tot_triangle_point/3;
- int next_actualFace= dm->drawObject->triangle_to_mface[0];
+ if (!GPU_buffer_legacy(dm)) {
+ int tottri = dm->drawObject->tot_triangle_point / 3;
+ int next_actualFace = dm->drawObject->triangle_to_mface[0];
- glShadeModel( GL_SMOOTH );
+ glShadeModel(GL_SMOOTH);
/* lastFlag = 0; */ /* UNUSED */
for (i = 0; i < tottri; i++) {
int actualFace = next_actualFace;
DMDrawOption draw_option = DM_DRAW_OPTION_NORMAL;
int flush = 0;
- if (i != tottri-1)
- next_actualFace= dm->drawObject->triangle_to_mface[i+1];
+ if (i != tottri - 1)
+ next_actualFace = dm->drawObject->triangle_to_mface[i + 1];
if (drawParams) {
- draw_option = drawParams(tf? &tf[actualFace]: NULL, (mcol != NULL), mf[actualFace].mat_nr);
+ draw_option = drawParams(tf ? &tf[actualFace] : NULL, (mcol != NULL), mf[actualFace].mat_nr);
}
else {
if (index) {
@@ -756,23 +761,23 @@ static void cdDM_drawFacesTex_common(DerivedMesh *dm,
draw_option = drawParamsMapped(userData, orig);
}
else
- if (drawParamsMapped)
- draw_option = drawParamsMapped(userData, actualFace);
+ if (drawParamsMapped)
+ draw_option = drawParamsMapped(userData, actualFace);
}
/* flush buffer if current triangle isn't drawable or it's last triangle */
- flush= (draw_option == DM_DRAW_OPTION_SKIP) || (i == tottri - 1);
+ flush = (draw_option == DM_DRAW_OPTION_SKIP) || (i == tottri - 1);
if (!flush && compareDrawOptions) {
/* also compare draw options and flush buffer if they're different
* need for face selection highlight in edit mode */
- flush|= compareDrawOptions(userData, actualFace, next_actualFace) == 0;
+ flush |= compareDrawOptions(userData, actualFace, next_actualFace) == 0;
}
if (flush) {
- int first= startFace*3;
+ int first = startFace * 3;
/* Add one to the length if we're drawing at the end of the array */
- int count= (i-startFace+(draw_option != DM_DRAW_OPTION_SKIP ? 1 : 0))*3;
+ int count = (i - startFace + (draw_option != DM_DRAW_OPTION_SKIP ? 1 : 0)) * 3;
if (count) {
if (col)
@@ -789,29 +794,29 @@ static void cdDM_drawFacesTex_common(DerivedMesh *dm,
}
GPU_buffer_unbind();
- glShadeModel( GL_FLAT );
+ glShadeModel(GL_FLAT);
}
}
static void cdDM_drawFacesTex(DerivedMesh *dm,
- DMSetDrawOptionsTex setDrawOptions,
- DMCompareDrawOptions compareDrawOptions,
- void *userData)
+ DMSetDrawOptionsTex setDrawOptions,
+ DMCompareDrawOptions compareDrawOptions,
+ void *userData)
{
cdDM_drawFacesTex_common(dm, setDrawOptions, NULL, compareDrawOptions, userData);
}
static void cdDM_drawMappedFaces(DerivedMesh *dm,
- DMSetDrawOptions setDrawOptions,
- DMSetMaterial setMaterial,
- DMCompareDrawOptions compareDrawOptions,
- void *userData, DMDrawFlag flag)
+ DMSetDrawOptions setDrawOptions,
+ DMSetMaterial setMaterial,
+ DMCompareDrawOptions compareDrawOptions,
+ void *userData, DMDrawFlag flag)
{
- CDDerivedMesh *cddm = (CDDerivedMesh*) dm;
+ CDDerivedMesh *cddm = (CDDerivedMesh *) dm;
MVert *mv = cddm->mvert;
MFace *mf = cddm->mface;
MCol *mc;
- float *nors= DM_get_tessface_data_layer(dm, CD_NORMAL);
+ float *nors = DM_get_tessface_data_layer(dm, CD_NORMAL);
int useColors = flag & DM_DRAW_USE_COLORS;
int i, orig, *index = DM_get_tessface_data_layer(dm, CD_ORIGINDEX);
@@ -825,18 +830,18 @@ static void cdDM_drawMappedFaces(DerivedMesh *dm,
/* back-buffer always uses legacy since VBO's would need the
* color array temporarily overwritten for drawing, then reset. */
- if ( GPU_buffer_legacy(dm) || G.f & G_BACKBUFSEL) {
- DEBUG_VBO( "Using legacy code. cdDM_drawMappedFaces\n" );
+ if (GPU_buffer_legacy(dm) || G.f & G_BACKBUFSEL) {
+ DEBUG_VBO("Using legacy code. cdDM_drawMappedFaces\n");
for (i = 0; i < dm->numTessFaceData; i++, mf++) {
int drawSmooth = (flag & DM_DRAW_ALWAYS_SMOOTH) ? 1 : (mf->flag & ME_SMOOTH);
- DMDrawOption draw_option= DM_DRAW_OPTION_NORMAL;
+ DMDrawOption draw_option = DM_DRAW_OPTION_NORMAL;
- orig= (index==NULL) ? i : *index++;
+ orig = (index == NULL) ? i : *index++;
if (orig == ORIGINDEX_NONE)
- draw_option= setMaterial(mf->mat_nr + 1, NULL);
+ draw_option = setMaterial(mf->mat_nr + 1, NULL);
else if (setDrawOptions != NULL)
- draw_option= setDrawOptions(userData, orig);
+ draw_option = setDrawOptions(userData, orig);
if (draw_option != DM_DRAW_OPTION_SKIP) {
unsigned char *cp = NULL;
@@ -847,7 +852,7 @@ static void cdDM_drawMappedFaces(DerivedMesh *dm,
/* no need to set shading mode to flat because
* normals are already used to change shading */
glShadeModel(GL_SMOOTH);
- glBegin(mf->v4?GL_QUADS:GL_TRIANGLES);
+ glBegin(mf->v4 ? GL_QUADS : GL_TRIANGLES);
if (!drawSmooth) {
if (nors) {
@@ -856,10 +861,10 @@ static void cdDM_drawMappedFaces(DerivedMesh *dm,
else {
float nor[3];
if (mf->v4) {
- normal_quad_v3( nor,mv[mf->v1].co, mv[mf->v2].co, mv[mf->v3].co, mv[mf->v4].co);
+ normal_quad_v3(nor, mv[mf->v1].co, mv[mf->v2].co, mv[mf->v3].co, mv[mf->v4].co);
}
else {
- normal_tri_v3( nor,mv[mf->v1].co, mv[mf->v2].co, mv[mf->v3].co);
+ normal_tri_v3(nor, mv[mf->v1].co, mv[mf->v2].co, mv[mf->v3].co);
}
glNormal3fv(nor);
}
@@ -902,10 +907,10 @@ static void cdDM_drawMappedFaces(DerivedMesh *dm,
int prevstart = 0;
GPU_vertex_setup(dm);
GPU_normal_setup(dm);
- if ( useColors && mc )
+ if (useColors && mc)
GPU_color_setup(dm);
- if ( !GPU_buffer_legacy(dm) ) {
- int tottri = dm->drawObject->tot_triangle_point/3;
+ if (!GPU_buffer_legacy(dm)) {
+ int tottri = dm->drawObject->tot_triangle_point / 3;
glShadeModel(GL_SMOOTH);
if (tottri == 0) {
@@ -917,44 +922,44 @@ static void cdDM_drawMappedFaces(DerivedMesh *dm,
}
else {
/* we need to check if the next material changes */
- int next_actualFace= dm->drawObject->triangle_to_mface[0];
+ int next_actualFace = dm->drawObject->triangle_to_mface[0];
- for ( i = 0; i < tottri; i++ ) {
+ for (i = 0; i < tottri; i++) {
//int actualFace = dm->drawObject->triangle_to_mface[i];
int actualFace = next_actualFace;
- MFace *mface= mf + actualFace;
+ MFace *mface = mf + actualFace;
/*int drawSmooth= (flag & DM_DRAW_ALWAYS_SMOOTH) ? 1 : (mface->flag & ME_SMOOTH);*/ /* UNUSED */
DMDrawOption draw_option = DM_DRAW_OPTION_NORMAL;
int flush = 0;
- if (i != tottri-1)
- next_actualFace= dm->drawObject->triangle_to_mface[i+1];
+ if (i != tottri - 1)
+ next_actualFace = dm->drawObject->triangle_to_mface[i + 1];
- orig= (index==NULL) ? actualFace : index[actualFace];
+ orig = (index == NULL) ? actualFace : index[actualFace];
if (orig == ORIGINDEX_NONE)
- draw_option= setMaterial(mface->mat_nr + 1, NULL);
+ draw_option = setMaterial(mface->mat_nr + 1, NULL);
else if (setDrawOptions != NULL)
- draw_option= setDrawOptions(userData, orig);
+ draw_option = setDrawOptions(userData, orig);
/* Goal is to draw as long of a contiguous triangle
* array as possible, so draw when we hit either an
* invisible triangle or at the end of the array */
/* flush buffer if current triangle isn't drawable or it's last triangle... */
- flush= (draw_option == DM_DRAW_OPTION_SKIP) || (i == tottri - 1);
+ flush = (draw_option == DM_DRAW_OPTION_SKIP) || (i == tottri - 1);
/* ... or when material setting is dissferent */
- flush|= mf[actualFace].mat_nr != mf[next_actualFace].mat_nr;
+ flush |= mf[actualFace].mat_nr != mf[next_actualFace].mat_nr;
if (!flush && compareDrawOptions) {
- flush|= compareDrawOptions(userData, actualFace, next_actualFace) == 0;
+ flush |= compareDrawOptions(userData, actualFace, next_actualFace) == 0;
}
if (flush) {
- int first= prevstart*3;
+ int first = prevstart * 3;
/* Add one to the length if we're drawing at the end of the array */
- int count= (i-prevstart+(draw_option != DM_DRAW_OPTION_SKIP ? 1 : 0))*3;
+ int count = (i - prevstart + (draw_option != DM_DRAW_OPTION_SKIP ? 1 : 0)) * 3;
if (count)
glDrawArrays(GL_TRIANGLES, first, count);
@@ -971,9 +976,9 @@ static void cdDM_drawMappedFaces(DerivedMesh *dm,
}
static void cdDM_drawMappedFacesTex(DerivedMesh *dm,
- DMSetDrawOptions setDrawOptions,
- DMCompareDrawOptions compareDrawOptions,
- void *userData)
+ DMSetDrawOptions setDrawOptions,
+ DMCompareDrawOptions compareDrawOptions,
+ void *userData)
{
cdDM_drawFacesTex_common(dm, NULL, setDrawOptions, compareDrawOptions, userData);
}
@@ -984,34 +989,34 @@ static void cddm_draw_attrib_vertex(DMVertexAttribs *attribs, MVert *mvert, int
/* orco texture coordinates */
if (attribs->totorco) {
- if (attribs->orco.glTexco)
+ if (attribs->orco.gl_texco)
glTexCoord3fv(attribs->orco.array[index]);
else
- glVertexAttrib3fvARB(attribs->orco.glIndex, attribs->orco.array[index]);
+ glVertexAttrib3fvARB(attribs->orco.gl_index, attribs->orco.array[index]);
}
/* uv texture coordinates */
for (b = 0; b < attribs->tottface; b++) {
MTFace *tf = &attribs->tface[b].array[a];
- if (attribs->tface[b].glTexco)
+ if (attribs->tface[b].gl_texco)
glTexCoord2fv(tf->uv[vert]);
else
- glVertexAttrib2fvARB(attribs->tface[b].glIndex, tf->uv[vert]);
+ glVertexAttrib2fvARB(attribs->tface[b].gl_index, tf->uv[vert]);
}
/* vertex colors */
for (b = 0; b < attribs->totmcol; b++) {
- MCol *cp = &attribs->mcol[b].array[a*4 + vert];
+ MCol *cp = &attribs->mcol[b].array[a * 4 + vert];
GLubyte col[4];
- col[0]= cp->b; col[1]= cp->g; col[2]= cp->r; col[3]= cp->a;
- glVertexAttrib4ubvARB(attribs->mcol[b].glIndex, col);
+ col[0] = cp->b; col[1] = cp->g; col[2] = cp->r; col[3] = cp->a;
+ glVertexAttrib4ubvARB(attribs->mcol[b].gl_index, col);
}
/* tangent for normal mapping */
if (attribs->tottang) {
- float *tang = attribs->tang.array[a*4 + vert];
- glVertexAttrib4fvARB(attribs->tang.glIndex, tang);
+ float *tang = attribs->tang.array[a * 4 + vert];
+ glVertexAttrib4fvARB(attribs->tang.gl_index, tang);
}
/* vertex normal */
@@ -1023,11 +1028,11 @@ static void cddm_draw_attrib_vertex(DMVertexAttribs *attribs, MVert *mvert, int
}
static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm,
- DMSetMaterial setMaterial,
- DMSetDrawOptions setDrawOptions,
- void *userData)
+ DMSetMaterial setMaterial,
+ DMSetDrawOptions setDrawOptions,
+ void *userData)
{
- CDDerivedMesh *cddm = (CDDerivedMesh*) dm;
+ CDDerivedMesh *cddm = (CDDerivedMesh *) dm;
GPUVertexAttribs gattribs;
DMVertexAttribs attribs;
MVert *mvert = cddm->mvert;
@@ -1044,8 +1049,8 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm,
glShadeModel(GL_SMOOTH);
- if ( GPU_buffer_legacy(dm) || setDrawOptions != NULL ) {
- DEBUG_VBO( "Using legacy code. cdDM_drawMappedFacesGLSL\n" );
+ if (GPU_buffer_legacy(dm) || setDrawOptions != NULL) {
+ DEBUG_VBO("Using legacy code. cdDM_drawMappedFacesGLSL\n");
memset(&attribs, 0, sizeof(attribs));
glBegin(GL_QUADS);
@@ -1068,7 +1073,7 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm,
continue;
}
else if (setDrawOptions) {
- orig = (index)? index[a]: a;
+ orig = (index) ? index[a] : a;
if (orig == ORIGINDEX_NONE) {
/* since the material is set by setMaterial(), faces with no
@@ -1088,10 +1093,10 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm,
/* TODO ideally a normal layer should always be available */
float nor[3];
if (mface->v4) {
- normal_quad_v3( nor,mvert[mface->v1].co, mvert[mface->v2].co, mvert[mface->v3].co, mvert[mface->v4].co);
+ normal_quad_v3(nor, mvert[mface->v1].co, mvert[mface->v2].co, mvert[mface->v3].co, mvert[mface->v4].co);
}
else {
- normal_tri_v3( nor,mvert[mface->v1].co, mvert[mface->v2].co, mvert[mface->v3].co);
+ normal_tri_v3(nor, mvert[mface->v1].co, mvert[mface->v2].co, mvert[mface->v3].co);
}
glNormal3fv(nor);
}
@@ -1122,30 +1127,30 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm,
GPU_vertex_setup(dm);
GPU_normal_setup(dm);
- if ( !GPU_buffer_legacy(dm) ) {
- for ( i = 0; i < dm->drawObject->tot_triangle_point/3; i++ ) {
+ if (!GPU_buffer_legacy(dm)) {
+ for (i = 0; i < dm->drawObject->tot_triangle_point / 3; i++) {
a = dm->drawObject->triangle_to_mface[i];
mface = mf + a;
new_matnr = mface->mat_nr + 1;
- if (new_matnr != matnr ) {
+ if (new_matnr != matnr) {
numfaces = curface - start;
- if ( numfaces > 0 ) {
+ if (numfaces > 0) {
- if ( dodraw ) {
+ if (dodraw) {
- if ( numdata != 0 ) {
+ if (numdata != 0) {
GPU_buffer_unlock(buffer);
- GPU_interleaved_attrib_setup(buffer,datatypes,numdata);
+ GPU_interleaved_attrib_setup(buffer, datatypes, numdata);
}
- glDrawArrays(GL_TRIANGLES,start*3,numfaces*3);
+ glDrawArrays(GL_TRIANGLES, start * 3, numfaces * 3);
- if ( numdata != 0 ) {
+ if (numdata != 0) {
GPU_buffer_free(buffer);
@@ -1162,39 +1167,39 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm,
DM_vertex_attributes_from_gpu(dm, &gattribs, &attribs);
if (attribs.totorco) {
- datatypes[numdata].index = attribs.orco.glIndex;
+ datatypes[numdata].index = attribs.orco.gl_index;
datatypes[numdata].size = 3;
datatypes[numdata].type = GL_FLOAT;
numdata++;
}
for (b = 0; b < attribs.tottface; b++) {
- datatypes[numdata].index = attribs.tface[b].glIndex;
+ datatypes[numdata].index = attribs.tface[b].gl_index;
datatypes[numdata].size = 2;
datatypes[numdata].type = GL_FLOAT;
numdata++;
}
for (b = 0; b < attribs.totmcol; b++) {
- datatypes[numdata].index = attribs.mcol[b].glIndex;
+ datatypes[numdata].index = attribs.mcol[b].gl_index;
datatypes[numdata].size = 4;
datatypes[numdata].type = GL_UNSIGNED_BYTE;
numdata++;
}
if (attribs.tottang) {
- datatypes[numdata].index = attribs.tang.glIndex;
+ datatypes[numdata].index = attribs.tang.gl_index;
datatypes[numdata].size = 4;
datatypes[numdata].type = GL_FLOAT;
numdata++;
}
- if ( numdata != 0 ) {
- elementsize = GPU_attrib_element_size( datatypes, numdata );
- buffer = GPU_buffer_alloc( elementsize*dm->drawObject->tot_triangle_point);
- if ( buffer == NULL ) {
+ if (numdata != 0) {
+ elementsize = GPU_attrib_element_size(datatypes, numdata);
+ buffer = GPU_buffer_alloc(elementsize * dm->drawObject->tot_triangle_point);
+ if (buffer == NULL) {
GPU_buffer_unbind();
dm->drawObject->legacy = 1;
return;
}
varray = GPU_buffer_lock_stream(buffer);
- if ( varray == NULL ) {
+ if (varray == NULL) {
GPU_buffer_unbind();
GPU_buffer_free(buffer);
dm->drawObject->legacy = 1;
@@ -1205,89 +1210,89 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm,
/* if the buffer was set, don't use it again.
* prevdraw was assumed true but didnt run so set to false - [#21036] */
/* prevdraw= 0; */ /* UNUSED */
- buffer= NULL;
+ buffer = NULL;
}
}
}
- if (dodraw && numdata != 0 ) {
+ if (dodraw && numdata != 0) {
offset = 0;
if (attribs.totorco) {
- copy_v3_v3((float *)&varray[elementsize*curface*3],(float *)attribs.orco.array[mface->v1]);
- copy_v3_v3((float *)&varray[elementsize*curface*3+elementsize],(float *)attribs.orco.array[mface->v2]);
- copy_v3_v3((float *)&varray[elementsize*curface*3+elementsize*2],(float *)attribs.orco.array[mface->v3]);
- offset += sizeof(float)*3;
+ copy_v3_v3((float *)&varray[elementsize * curface * 3], (float *)attribs.orco.array[mface->v1]);
+ copy_v3_v3((float *)&varray[elementsize * curface * 3 + elementsize], (float *)attribs.orco.array[mface->v2]);
+ copy_v3_v3((float *)&varray[elementsize * curface * 3 + elementsize * 2], (float *)attribs.orco.array[mface->v3]);
+ offset += sizeof(float) * 3;
}
for (b = 0; b < attribs.tottface; b++) {
MTFace *tf = &attribs.tface[b].array[a];
- copy_v2_v2((float *)&varray[elementsize*curface*3+offset],tf->uv[0]);
- copy_v2_v2((float *)&varray[elementsize*curface*3+offset+elementsize],tf->uv[1]);
+ copy_v2_v2((float *)&varray[elementsize * curface * 3 + offset], tf->uv[0]);
+ copy_v2_v2((float *)&varray[elementsize * curface * 3 + offset + elementsize], tf->uv[1]);
- copy_v2_v2((float *)&varray[elementsize*curface*3+offset+elementsize*2],tf->uv[2]);
- offset += sizeof(float)*2;
+ copy_v2_v2((float *)&varray[elementsize * curface * 3 + offset + elementsize * 2], tf->uv[2]);
+ offset += sizeof(float) * 2;
}
for (b = 0; b < attribs.totmcol; b++) {
- MCol *cp = &attribs.mcol[b].array[a*4 + 0];
+ MCol *cp = &attribs.mcol[b].array[a * 4 + 0];
GLubyte col[4];
- col[0]= cp->b; col[1]= cp->g; col[2]= cp->r; col[3]= cp->a;
- copy_v4_v4_char((char *)&varray[elementsize*curface*3+offset], (char *)col);
- cp = &attribs.mcol[b].array[a*4 + 1];
- col[0]= cp->b; col[1]= cp->g; col[2]= cp->r; col[3]= cp->a;
- copy_v4_v4_char((char *)&varray[elementsize*curface*3+offset+elementsize], (char *)col);
- cp = &attribs.mcol[b].array[a*4 + 2];
- col[0]= cp->b; col[1]= cp->g; col[2]= cp->r; col[3]= cp->a;
- copy_v4_v4_char((char *)&varray[elementsize*curface*3+offset+elementsize*2], (char *)col);
- offset += sizeof(unsigned char)*4;
+ col[0] = cp->b; col[1] = cp->g; col[2] = cp->r; col[3] = cp->a;
+ copy_v4_v4_char((char *)&varray[elementsize * curface * 3 + offset], (char *)col);
+ cp = &attribs.mcol[b].array[a * 4 + 1];
+ col[0] = cp->b; col[1] = cp->g; col[2] = cp->r; col[3] = cp->a;
+ copy_v4_v4_char((char *)&varray[elementsize * curface * 3 + offset + elementsize], (char *)col);
+ cp = &attribs.mcol[b].array[a * 4 + 2];
+ col[0] = cp->b; col[1] = cp->g; col[2] = cp->r; col[3] = cp->a;
+ copy_v4_v4_char((char *)&varray[elementsize * curface * 3 + offset + elementsize * 2], (char *)col);
+ offset += sizeof(unsigned char) * 4;
}
if (attribs.tottang) {
- float *tang = attribs.tang.array[a*4 + 0];
- copy_v4_v4((float *)&varray[elementsize*curface*3+offset], tang);
- tang = attribs.tang.array[a*4 + 1];
- copy_v4_v4((float *)&varray[elementsize*curface*3+offset+elementsize], tang);
- tang = attribs.tang.array[a*4 + 2];
- copy_v4_v4((float *)&varray[elementsize*curface*3+offset+elementsize*2], tang);
- offset += sizeof(float)*4;
+ float *tang = attribs.tang.array[a * 4 + 0];
+ copy_v4_v4((float *)&varray[elementsize * curface * 3 + offset], tang);
+ tang = attribs.tang.array[a * 4 + 1];
+ copy_v4_v4((float *)&varray[elementsize * curface * 3 + offset + elementsize], tang);
+ tang = attribs.tang.array[a * 4 + 2];
+ copy_v4_v4((float *)&varray[elementsize * curface * 3 + offset + elementsize * 2], tang);
+ offset += sizeof(float) * 4;
}
(void)offset;
}
curface++;
if (mface->v4) {
- if (dodraw && numdata != 0 ) {
+ if (dodraw && numdata != 0) {
offset = 0;
if (attribs.totorco) {
- copy_v3_v3((float *)&varray[elementsize*curface*3],(float *)attribs.orco.array[mface->v3]);
- copy_v3_v3((float *)&varray[elementsize*curface*3+elementsize],(float *)attribs.orco.array[mface->v4]);
- copy_v3_v3((float *)&varray[elementsize*curface*3+elementsize*2],(float *)attribs.orco.array[mface->v1]);
- offset += sizeof(float)*3;
+ copy_v3_v3((float *)&varray[elementsize * curface * 3], (float *)attribs.orco.array[mface->v3]);
+ copy_v3_v3((float *)&varray[elementsize * curface * 3 + elementsize], (float *)attribs.orco.array[mface->v4]);
+ copy_v3_v3((float *)&varray[elementsize * curface * 3 + elementsize * 2], (float *)attribs.orco.array[mface->v1]);
+ offset += sizeof(float) * 3;
}
for (b = 0; b < attribs.tottface; b++) {
MTFace *tf = &attribs.tface[b].array[a];
- copy_v2_v2((float *)&varray[elementsize*curface*3+offset],tf->uv[2]);
- copy_v2_v2((float *)&varray[elementsize*curface*3+offset+elementsize],tf->uv[3]);
- copy_v2_v2((float *)&varray[elementsize*curface*3+offset+elementsize*2],tf->uv[0]);
- offset += sizeof(float)*2;
+ copy_v2_v2((float *)&varray[elementsize * curface * 3 + offset], tf->uv[2]);
+ copy_v2_v2((float *)&varray[elementsize * curface * 3 + offset + elementsize], tf->uv[3]);
+ copy_v2_v2((float *)&varray[elementsize * curface * 3 + offset + elementsize * 2], tf->uv[0]);
+ offset += sizeof(float) * 2;
}
for (b = 0; b < attribs.totmcol; b++) {
- MCol *cp = &attribs.mcol[b].array[a*4 + 2];
+ MCol *cp = &attribs.mcol[b].array[a * 4 + 2];
GLubyte col[4];
- col[0]= cp->b; col[1]= cp->g; col[2]= cp->r; col[3]= cp->a;
- copy_v4_v4_char((char *)&varray[elementsize*curface*3+offset], (char *)col);
- cp = &attribs.mcol[b].array[a*4 + 3];
- col[0]= cp->b; col[1]= cp->g; col[2]= cp->r; col[3]= cp->a;
- copy_v4_v4_char((char *)&varray[elementsize*curface*3+offset+elementsize], (char *)col);
- cp = &attribs.mcol[b].array[a*4 + 0];
- col[0]= cp->b; col[1]= cp->g; col[2]= cp->r; col[3]= cp->a;
- copy_v4_v4_char((char *)&varray[elementsize*curface*3+offset+elementsize*2], (char *)col);
- offset += sizeof(unsigned char)*4;
+ col[0] = cp->b; col[1] = cp->g; col[2] = cp->r; col[3] = cp->a;
+ copy_v4_v4_char((char *)&varray[elementsize * curface * 3 + offset], (char *)col);
+ cp = &attribs.mcol[b].array[a * 4 + 3];
+ col[0] = cp->b; col[1] = cp->g; col[2] = cp->r; col[3] = cp->a;
+ copy_v4_v4_char((char *)&varray[elementsize * curface * 3 + offset + elementsize], (char *)col);
+ cp = &attribs.mcol[b].array[a * 4 + 0];
+ col[0] = cp->b; col[1] = cp->g; col[2] = cp->r; col[3] = cp->a;
+ copy_v4_v4_char((char *)&varray[elementsize * curface * 3 + offset + elementsize * 2], (char *)col);
+ offset += sizeof(unsigned char) * 4;
}
if (attribs.tottang) {
- float *tang = attribs.tang.array[a*4 + 2];
- copy_v4_v4((float *)&varray[elementsize*curface*3+offset], tang);
- tang = attribs.tang.array[a*4 + 3];
- copy_v4_v4((float *)&varray[elementsize*curface*3+offset+elementsize], tang);
- tang = attribs.tang.array[a*4 + 0];
- copy_v4_v4((float *)&varray[elementsize*curface*3+offset+elementsize*2], tang);
- offset += sizeof(float)*4;
+ float *tang = attribs.tang.array[a * 4 + 2];
+ copy_v4_v4((float *)&varray[elementsize * curface * 3 + offset], tang);
+ tang = attribs.tang.array[a * 4 + 3];
+ copy_v4_v4((float *)&varray[elementsize * curface * 3 + offset + elementsize], tang);
+ tang = attribs.tang.array[a * 4 + 0];
+ copy_v4_v4((float *)&varray[elementsize * curface * 3 + offset + elementsize * 2], tang);
+ offset += sizeof(float) * 4;
}
(void)offset;
}
@@ -1296,13 +1301,13 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm,
}
}
numfaces = curface - start;
- if ( numfaces > 0 ) {
- if ( dodraw ) {
- if ( numdata != 0 ) {
+ if (numfaces > 0) {
+ if (dodraw) {
+ if (numdata != 0) {
GPU_buffer_unlock(buffer);
- GPU_interleaved_attrib_setup(buffer,datatypes,numdata);
+ GPU_interleaved_attrib_setup(buffer, datatypes, numdata);
}
- glDrawArrays(GL_TRIANGLES,start*3,(curface-start)*3);
+ glDrawArrays(GL_TRIANGLES, start * 3, (curface - start) * 3);
}
}
GPU_buffer_unbind();
@@ -1319,10 +1324,10 @@ static void cdDM_drawFacesGLSL(DerivedMesh *dm, DMSetMaterial setMaterial)
}
static void cdDM_drawMappedFacesMat(DerivedMesh *dm,
- void (*setMaterial)(void *userData, int, void *attribs),
- int (*setFace)(void *userData, int index), void *userData)
+ void (*setMaterial)(void *userData, int, void *attribs),
+ int (*setFace)(void *userData, int index), void *userData)
{
- CDDerivedMesh *cddm = (CDDerivedMesh*) dm;
+ CDDerivedMesh *cddm = (CDDerivedMesh *) dm;
GPUVertexAttribs gattribs;
DMVertexAttribs attribs;
MVert *mvert = cddm->mvert;
@@ -1358,7 +1363,7 @@ static void cdDM_drawMappedFacesMat(DerivedMesh *dm,
/* skipping faces */
if (setFace) {
- orig = (index)? index[a]: a;
+ orig = (index) ? index[a] : a;
if (orig != ORIGINDEX_NONE && !setFace(userData, orig))
continue;
@@ -1374,9 +1379,9 @@ static void cdDM_drawMappedFacesMat(DerivedMesh *dm,
float nor[3];
if (mf->v4)
- normal_quad_v3( nor,mvert[mf->v1].co, mvert[mf->v2].co, mvert[mf->v3].co, mvert[mf->v4].co);
+ normal_quad_v3(nor, mvert[mf->v1].co, mvert[mf->v2].co, mvert[mf->v3].co, mvert[mf->v4].co);
else
- normal_tri_v3( nor,mvert[mf->v1].co, mvert[mf->v2].co, mvert[mf->v3].co);
+ normal_tri_v3(nor, mvert[mf->v1].co, mvert[mf->v2].co, mvert[mf->v3].co);
glNormal3fv(nor);
}
@@ -1399,7 +1404,7 @@ static void cdDM_drawMappedFacesMat(DerivedMesh *dm,
static void cdDM_drawMappedEdges(DerivedMesh *dm, DMSetDrawOptions setDrawOptions, void *userData)
{
- CDDerivedMesh *cddm = (CDDerivedMesh*) dm;
+ CDDerivedMesh *cddm = (CDDerivedMesh *) dm;
MVert *vert = cddm->mvert;
MEdge *edge = cddm->medge;
int i, orig, *index = DM_get_edge_data_layer(dm, CD_ORIGINDEX);
@@ -1445,7 +1450,7 @@ static void cdDM_foreachMappedEdge(
void (*func)(void *userData, int index, const float v0co[3], const float v1co[3]),
void *userData)
{
- CDDerivedMesh *cddm = (CDDerivedMesh*) dm;
+ CDDerivedMesh *cddm = (CDDerivedMesh *) dm;
MVert *mv = cddm->mvert;
MEdge *med = cddm->medge;
int i, orig, *index = DM_get_edge_data_layer(dm, CD_ORIGINDEX);
@@ -1466,7 +1471,7 @@ static void cdDM_foreachMappedFaceCenter(
void (*func)(void *userData, int index, const float cent[3], const float no[3]),
void *userData)
{
- CDDerivedMesh *cddm = (CDDerivedMesh*)dm;
+ CDDerivedMesh *cddm = (CDDerivedMesh *)dm;
MVert *mv = cddm->mvert;
MPoly *mp = cddm->mpoly;
MLoop *ml = cddm->mloop;
@@ -1487,7 +1492,7 @@ static void cdDM_foreachMappedFaceCenter(
ml = &cddm->mloop[mp->loopstart];
cent[0] = cent[1] = cent[2] = 0.0f;
- for (j=0; j<mp->totloop; j++, ml++) {
+ for (j = 0; j < mp->totloop; j++, ml++) {
add_v3_v3v3(cent, cent, mv[ml->v].co);
}
mul_v3_fl(cent, 1.0f / (float)j);
@@ -1514,12 +1519,12 @@ static void cdDM_foreachMappedFaceCenter(
void CDDM_recalc_tessellation_ex(DerivedMesh *dm, const int do_face_nor_cpy)
{
- CDDerivedMesh *cddm = (CDDerivedMesh*)dm;
+ CDDerivedMesh *cddm = (CDDerivedMesh *)dm;
- dm->numTessFaceData = mesh_recalcTessellation(&dm->faceData, &dm->loopData, &dm->polyData,
- cddm->mvert,
- dm->numTessFaceData, dm->numLoopData, dm->numPolyData,
- do_face_nor_cpy);
+ dm->numTessFaceData = BKE_mesh_recalc_tessellation(&dm->faceData, &dm->loopData, &dm->polyData,
+ cddm->mvert,
+ dm->numTessFaceData, dm->numLoopData, dm->numPolyData,
+ do_face_nor_cpy);
if (!CustomData_get_layer(&dm->faceData, CD_ORIGINDEX)) {
int *polyIndex = CustomData_get_layer(&dm->faceData, CD_POLYINDEX);
@@ -1546,7 +1551,7 @@ static void cdDM_free_internal(CDDerivedMesh *cddm)
static void cdDM_release(DerivedMesh *dm)
{
- CDDerivedMesh *cddm = (CDDerivedMesh*)dm;
+ CDDerivedMesh *cddm = (CDDerivedMesh *)dm;
if (DM_release(dm)) {
cdDM_free_internal(cddm);
@@ -1666,18 +1671,18 @@ DerivedMesh *CDDM_from_mesh(Mesh *mesh, Object *UNUSED(ob))
/* this does a referenced copy, with an exception for fluidsim */
DM_init(dm, DM_TYPE_CDDM, mesh->totvert, mesh->totedge, mesh->totface,
- mesh->totloop, mesh->totpoly);
+ mesh->totloop, mesh->totpoly);
dm->deformedOnly = 1;
- alloctype= CD_REFERENCE;
+ alloctype = CD_REFERENCE;
CustomData_merge(&mesh->vdata, &dm->vertData, mask, alloctype,
- mesh->totvert);
+ mesh->totvert);
CustomData_merge(&mesh->edata, &dm->edgeData, mask, alloctype,
- mesh->totedge);
- CustomData_merge(&mesh->fdata, &dm->faceData, mask|CD_MASK_POLYINDEX, alloctype,
- mesh->totface);
+ mesh->totedge);
+ CustomData_merge(&mesh->fdata, &dm->faceData, mask | CD_MASK_POLYINDEX, alloctype,
+ mesh->totface);
CustomData_merge(&mesh->ldata, &dm->loopData, mask, alloctype,
mesh->totloop);
CustomData_merge(&mesh->pdata, &dm->polyData, mask, alloctype,
@@ -1718,8 +1723,9 @@ DerivedMesh *CDDM_from_curve_customDB(Object *ob, ListBase *dispbase)
MPoly *allpoly;
int totvert, totedge, totloop, totpoly;
- if (nurbs_to_mdata_customdb(ob, dispbase, &allvert, &totvert, &alledge,
- &totedge, &allloop, &allpoly, &totloop, &totpoly) != 0) {
+ if (BKE_mesh_nurbs_to_mdata_customdb(ob, dispbase, &allvert, &totvert, &alledge,
+ &totedge, &allloop, &allpoly, &totloop, &totpoly) != 0)
+ {
/* Error initializing mdata. This often happens when curve is empty */
return CDDM_new(0, 0, 0, 0, 0);
}
@@ -1727,12 +1733,12 @@ DerivedMesh *CDDM_from_curve_customDB(Object *ob, ListBase *dispbase)
dm = CDDM_new(totvert, totedge, 0, totloop, totpoly);
dm->deformedOnly = 1;
- cddm = (CDDerivedMesh*)dm;
+ cddm = (CDDerivedMesh *)dm;
- memcpy(cddm->mvert, allvert, totvert*sizeof(MVert));
- memcpy(cddm->medge, alledge, totedge*sizeof(MEdge));
- memcpy(cddm->mloop, allloop, totloop*sizeof(MLoop));
- memcpy(cddm->mpoly, allpoly, totpoly*sizeof(MPoly));
+ memcpy(cddm->mvert, allvert, totvert * sizeof(MVert));
+ memcpy(cddm->medge, alledge, totedge * sizeof(MEdge));
+ memcpy(cddm->mloop, allloop, totloop * sizeof(MLoop));
+ memcpy(cddm->mpoly, allpoly, totpoly * sizeof(MPoly));
MEM_freeN(allvert);
MEM_freeN(alledge);
@@ -1745,8 +1751,8 @@ DerivedMesh *CDDM_from_curve_customDB(Object *ob, ListBase *dispbase)
}
static void loops_to_customdata_corners(BMesh *bm, CustomData *facedata,
- int cdindex, BMLoop *l3[3],
- int numCol, int numTex)
+ int cdindex, BMLoop *l3[3],
+ int numCol, int numTex)
{
BMLoop *l;
BMFace *f = l3[0]->f;
@@ -1757,23 +1763,23 @@ static void loops_to_customdata_corners(BMesh *bm, CustomData *facedata,
MLoopUV *mloopuv;
int i, j, hasPCol = CustomData_has_layer(&bm->ldata, CD_PREVIEW_MLOOPCOL);
- for (i=0; i < numTex; i++) {
+ for (i = 0; i < numTex; i++) {
texface = CustomData_get_n(facedata, CD_MTFACE, cdindex, i);
texpoly = CustomData_bmesh_get_n(&bm->pdata, f->head.data, CD_MTEXPOLY, i);
ME_MTEXFACE_CPY(texface, texpoly);
- for (j=0; j<3; j++) {
+ for (j = 0; j < 3; j++) {
l = l3[j];
mloopuv = CustomData_bmesh_get_n(&bm->ldata, l->head.data, CD_MLOOPUV, i);
copy_v2_v2(texface->uv[j], mloopuv->uv);
}
}
- for (i=0; i < numCol; i++) {
+ for (i = 0; i < numCol; i++) {
mcol = CustomData_get_n(facedata, CD_MCOL, cdindex, i);
- for (j=0; j<3; j++) {
+ for (j = 0; j < 3; j++) {
l = l3[j];
mloopcol = CustomData_bmesh_get_n(&bm->ldata, l->head.data, CD_MLOOPCOL, i);
MESH_MLOOPCOL_TO_MCOL(mloopcol, &mcol[j]);
@@ -1783,7 +1789,7 @@ static void loops_to_customdata_corners(BMesh *bm, CustomData *facedata,
if (hasPCol) {
mcol = CustomData_get(facedata, cdindex, CD_PREVIEW_MCOL);
- for (j=0; j<3; j++) {
+ for (j = 0; j < 3; j++) {
l = l3[j];
mloopcol = CustomData_bmesh_get(&bm->ldata, l->head.data, CD_PREVIEW_MLOOPCOL);
MESH_MLOOPCOL_TO_MCOL(mloopcol, &mcol[j]);
@@ -1801,7 +1807,7 @@ DerivedMesh *CDDM_from_BMEditMesh(BMEditMesh *em, Mesh *UNUSED(me), int use_mdis
bm->totloop,
bm->totface);
- CDDerivedMesh *cddm = (CDDerivedMesh*)dm;
+ CDDerivedMesh *cddm = (CDDerivedMesh *)dm;
BMIter iter, liter;
BMVert *eve;
BMEdge *eed;
@@ -1827,7 +1833,7 @@ DerivedMesh *CDDM_from_BMEditMesh(BMEditMesh *em, Mesh *UNUSED(me), int use_mdis
/*don't add origindex layer if one already exists*/
add_orig = !CustomData_has_layer(&bm->pdata, CD_ORIGINDEX);
- mask = use_mdisps ? CD_MASK_DERIVEDMESH|CD_MASK_MDISPS : CD_MASK_DERIVEDMESH;
+ mask = use_mdisps ? CD_MASK_DERIVEDMESH | CD_MASK_MDISPS : CD_MASK_DERIVEDMESH;
/* don't process shapekeys, we only feed them through the modifier stack as needed,
* e.g. for applying modifiers or the like*/
@@ -1849,7 +1855,7 @@ DerivedMesh *CDDM_from_BMEditMesh(BMEditMesh *em, Mesh *UNUSED(me), int use_mdis
index = dm->getVertDataArray(dm, CD_ORIGINDEX);
eve = BM_iter_new(&iter, bm, BM_VERTS_OF_MESH, NULL);
- for (i=0; eve; eve=BM_iter_step(&iter), i++, index++) {
+ for (i = 0; eve; eve = BM_iter_step(&iter), i++, index++) {
MVert *mv = &mvert[i];
copy_v3_v3(mv->co, eve->co);
@@ -1861,7 +1867,7 @@ DerivedMesh *CDDM_from_BMEditMesh(BMEditMesh *em, Mesh *UNUSED(me), int use_mdis
mv->flag = BM_vert_flag_to_mflag(eve);
if (has_vert_bweight)
- mv->bweight = (unsigned char)(BM_elem_float_data_get(&bm->vdata, eve, CD_BWEIGHT)*255.0f);
+ mv->bweight = (unsigned char)(BM_elem_float_data_get(&bm->vdata, eve, CD_BWEIGHT) * 255.0f);
if (add_orig) *index = i;
@@ -1871,7 +1877,7 @@ DerivedMesh *CDDM_from_BMEditMesh(BMEditMesh *em, Mesh *UNUSED(me), int use_mdis
index = dm->getEdgeDataArray(dm, CD_ORIGINDEX);
eed = BM_iter_new(&iter, bm, BM_EDGES_OF_MESH, NULL);
- for (i=0; eed; eed=BM_iter_step(&iter), i++, index++) {
+ for (i = 0; eed; eed = BM_iter_step(&iter), i++, index++) {
MEdge *med = &medge[i];
BM_elem_index_set(eed, i); /* set_inline */
@@ -1880,9 +1886,9 @@ DerivedMesh *CDDM_from_BMEditMesh(BMEditMesh *em, Mesh *UNUSED(me), int use_mdis
med->v2 = BM_elem_index_get(eed->v2);
if (has_crease)
- med->crease = (unsigned char)(BM_elem_float_data_get(&bm->edata, eed, CD_CREASE)*255.0f);
+ med->crease = (unsigned char)(BM_elem_float_data_get(&bm->edata, eed, CD_CREASE) * 255.0f);
if (has_edge_bweight)
- med->bweight = (unsigned char)(BM_elem_float_data_get(&bm->edata, eed, CD_BWEIGHT)*255.0f);
+ med->bweight = (unsigned char)(BM_elem_float_data_get(&bm->edata, eed, CD_BWEIGHT) * 255.0f);
med->flag = BM_edge_flag_to_mflag(eed);
@@ -1911,7 +1917,7 @@ DerivedMesh *CDDM_from_BMEditMesh(BMEditMesh *em, Mesh *UNUSED(me), int use_mdis
mf->mat_nr = efa->mat_nr;
mf->flag = BM_face_flag_to_mflag(efa);
- *index = add_orig ? BM_elem_index_get(efa) : *(int*)CustomData_bmesh_get(&bm->pdata, efa->head.data, CD_ORIGINDEX);
+ *index = add_orig ? BM_elem_index_get(efa) : *(int *)CustomData_bmesh_get(&bm->pdata, efa->head.data, CD_ORIGINDEX);
*polyindex = BM_elem_index_get(efa);
loops_to_customdata_corners(bm, &dm->faceData, i, l, numCol, numTex);
@@ -1922,7 +1928,7 @@ DerivedMesh *CDDM_from_BMEditMesh(BMEditMesh *em, Mesh *UNUSED(me), int use_mdis
index = CustomData_get_layer(&dm->polyData, CD_ORIGINDEX);
j = 0;
efa = BM_iter_new(&iter, bm, BM_FACES_OF_MESH, NULL);
- for (i=0; efa; i++, efa=BM_iter_step(&iter), index++) {
+ for (i = 0; efa; i++, efa = BM_iter_step(&iter), index++) {
BMLoop *l;
MPoly *mp = &mpoly[i];
@@ -1968,7 +1974,7 @@ static DerivedMesh *cddm_copy_ex(DerivedMesh *source, int faces_from_tessfaces)
/* this initializes dm, and copies all non mvert/medge/mface layers */
DM_from_template(dm, source, DM_TYPE_CDDM, numVerts, numEdges, numTessFaces,
- numLoops, numPolys);
+ numLoops, numPolys);
dm->deformedOnly = source->deformedOnly;
dm->dirty = source->dirty;
@@ -2050,7 +2056,7 @@ DerivedMesh *CDDM_from_template(DerivedMesh *source,
void CDDM_apply_vert_coords(DerivedMesh *dm, float (*vertCoords)[3])
{
- CDDerivedMesh *cddm = (CDDerivedMesh*)dm;
+ CDDerivedMesh *cddm = (CDDerivedMesh *)dm;
MVert *vert;
int i;
@@ -2064,7 +2070,7 @@ void CDDM_apply_vert_coords(DerivedMesh *dm, float (*vertCoords)[3])
void CDDM_apply_vert_normals(DerivedMesh *dm, short (*vertNormals)[3])
{
- CDDerivedMesh *cddm = (CDDerivedMesh*)dm;
+ CDDerivedMesh *cddm = (CDDerivedMesh *)dm;
MVert *vert;
int i;
@@ -2078,7 +2084,7 @@ void CDDM_apply_vert_normals(DerivedMesh *dm, short (*vertNormals)[3])
void CDDM_calc_normals_mapping_ex(DerivedMesh *dm, const short only_face_normals)
{
- CDDerivedMesh *cddm = (CDDerivedMesh*)dm;
+ CDDerivedMesh *cddm = (CDDerivedMesh *)dm;
float (*face_nors)[3] = NULL;
if (dm->numVertData == 0) return;
@@ -2108,16 +2114,16 @@ void CDDM_calc_normals_mapping_ex(DerivedMesh *dm, const short only_face_normals
}
- face_nors = MEM_mallocN(sizeof(float)*3*dm->numTessFaceData, "face_nors");
+ face_nors = MEM_mallocN(sizeof(float) * 3 * dm->numTessFaceData, "face_nors");
/* calculate face normals */
- mesh_calc_normals_mapping_ex(cddm->mvert, dm->numVertData, CDDM_get_loops(dm), CDDM_get_polys(dm),
- dm->numLoopData, dm->numPolyData, NULL, cddm->mface, dm->numTessFaceData,
- CustomData_get_layer(&dm->faceData, CD_POLYINDEX), face_nors,
- only_face_normals);
+ BKE_mesh_calc_normals_mapping_ex(cddm->mvert, dm->numVertData, CDDM_get_loops(dm), CDDM_get_polys(dm),
+ dm->numLoopData, dm->numPolyData, NULL, cddm->mface, dm->numTessFaceData,
+ CustomData_get_layer(&dm->faceData, CD_POLYINDEX), face_nors,
+ only_face_normals);
CustomData_add_layer(&dm->faceData, CD_NORMAL, CD_ASSIGN,
- face_nors, dm->numTessFaceData);
+ face_nors, dm->numTessFaceData);
}
@@ -2132,7 +2138,7 @@ void CDDM_calc_normals_mapping(DerivedMesh *dm)
/* bmesh note: this matches what we have in trunk */
void CDDM_calc_normals(DerivedMesh *dm)
{
- CDDerivedMesh *cddm = (CDDerivedMesh*)dm;
+ CDDerivedMesh *cddm = (CDDerivedMesh *)dm;
float (*poly_nors)[3];
if (dm->numVertData == 0) return;
@@ -2146,13 +2152,13 @@ void CDDM_calc_normals(DerivedMesh *dm)
poly_nors = CustomData_add_layer(&dm->polyData, CD_NORMAL, CD_CALLOC, NULL, dm->numPolyData);
}
- mesh_calc_normals(cddm->mvert, dm->numVertData, CDDM_get_loops(dm), CDDM_get_polys(dm),
- dm->numLoopData, dm->numPolyData, poly_nors);
+ BKE_mesh_calc_normals(cddm->mvert, dm->numVertData, CDDM_get_loops(dm), CDDM_get_polys(dm),
+ dm->numLoopData, dm->numPolyData, poly_nors);
}
void CDDM_calc_normals_tessface(DerivedMesh *dm)
{
- CDDerivedMesh *cddm = (CDDerivedMesh*)dm;
+ CDDerivedMesh *cddm = (CDDerivedMesh *)dm;
float (*face_nors)[3];
if (dm->numVertData == 0) return;
@@ -2166,8 +2172,8 @@ void CDDM_calc_normals_tessface(DerivedMesh *dm)
face_nors = CustomData_add_layer(&dm->faceData, CD_NORMAL, CD_CALLOC, NULL, dm->numTessFaceData);
}
- mesh_calc_normals_tessface(cddm->mvert, dm->numVertData,
- cddm->mface, dm->numTessFaceData, face_nors);
+ BKE_mesh_calc_normals_tessface(cddm->mvert, dm->numVertData,
+ cddm->mface, dm->numTessFaceData, face_nors);
}
#if 1
@@ -2184,7 +2190,7 @@ void CDDM_calc_normals_tessface(DerivedMesh *dm)
*/
DerivedMesh *CDDM_merge_verts(DerivedMesh *dm, const int *vtargetmap)
{
- CDDerivedMesh *cddm = (CDDerivedMesh*)dm;
+ CDDerivedMesh *cddm = (CDDerivedMesh *)dm;
CDDerivedMesh *cddm2 = NULL;
MVert *mv, *mvert = NULL;
BLI_array_declare(mvert);
@@ -2203,14 +2209,14 @@ DerivedMesh *CDDM_merge_verts(DerivedMesh *dm, const int *vtargetmap)
totloop = dm->numLoopData;
totpoly = dm->numPolyData;
- newv = MEM_callocN(sizeof(int)*dm->numVertData, "newv vtable CDDM_merge_verts");
- newe = MEM_callocN(sizeof(int)*dm->numEdgeData, "newv etable CDDM_merge_verts");
- newl = MEM_callocN(sizeof(int)*totloop, "newv ltable CDDM_merge_verts");
+ newv = MEM_callocN(sizeof(int) * dm->numVertData, "newv vtable CDDM_merge_verts");
+ newe = MEM_callocN(sizeof(int) * dm->numEdgeData, "newv etable CDDM_merge_verts");
+ newl = MEM_callocN(sizeof(int) * totloop, "newv ltable CDDM_merge_verts");
/*fill newl with destination vertex indices*/
mv = cddm->mvert;
c = 0;
- for (i=0; i<dm->numVertData; i++, mv++) {
+ for (i = 0; i < dm->numVertData; i++, mv++) {
if (vtargetmap[i] == -1) {
BLI_array_append(oldv, i);
newv[i] = c++;
@@ -2219,7 +2225,7 @@ DerivedMesh *CDDM_merge_verts(DerivedMesh *dm, const int *vtargetmap)
}
/*now link target vertices to destination indices*/
- for (i=0; i<dm->numVertData; i++) {
+ for (i = 0; i < dm->numVertData; i++) {
if (vtargetmap[i] != -1) {
newv[i] = newv[vtargetmap[i]];
}
@@ -2227,7 +2233,7 @@ DerivedMesh *CDDM_merge_verts(DerivedMesh *dm, const int *vtargetmap)
/*find-replace merged vertices with target vertices*/
ml = cddm->mloop;
- for (i=0; i<totloop; i++, ml++) {
+ for (i = 0; i < totloop; i++, ml++) {
if (vtargetmap[ml->v] != -1) {
ml->v = vtargetmap[ml->v];
}
@@ -2236,12 +2242,12 @@ DerivedMesh *CDDM_merge_verts(DerivedMesh *dm, const int *vtargetmap)
/*now go through and fix edges and faces*/
med = cddm->medge;
c = 0;
- for (i=0; i<dm->numEdgeData; i++, med++) {
+ for (i = 0; i < dm->numEdgeData; i++, med++) {
if (LIKELY(med->v1 != med->v2)) {
const unsigned int v1 = (vtargetmap[med->v1] != -1) ? vtargetmap[med->v1] : med->v1;
const unsigned int v2 = (vtargetmap[med->v2] != -1) ? vtargetmap[med->v2] : med->v2;
- void **eh_p= BLI_edgehash_lookup_p(ehash, v1, v2);
+ void **eh_p = BLI_edgehash_lookup_p(ehash, v1, v2);
if (eh_p) {
newe[i] = GET_INT_FROM_POINTER(*eh_p);
@@ -2260,17 +2266,17 @@ DerivedMesh *CDDM_merge_verts(DerivedMesh *dm, const int *vtargetmap)
}
mp = cddm->mpoly;
- for (i=0; i<totpoly; i++, mp++) {
+ for (i = 0; i < totpoly; i++, mp++) {
MPoly *mp2;
ml = cddm->mloop + mp->loopstart;
c = 0;
- for (j=0; j<mp->totloop; j++, ml++) {
+ for (j = 0; j < mp->totloop; j++, ml++) {
med = cddm->medge + ml->e;
if (LIKELY(med->v1 != med->v2)) {
- newl[j+mp->loopstart] = BLI_array_count(mloop);
- BLI_array_append(oldl, j+mp->loopstart);
+ newl[j + mp->loopstart] = BLI_array_count(mloop);
+ BLI_array_append(oldl, j + mp->loopstart);
BLI_array_append(mloop, *ml);
c++;
}
@@ -2288,11 +2294,11 @@ DerivedMesh *CDDM_merge_verts(DerivedMesh *dm, const int *vtargetmap)
}
/*create new cddm*/
- cddm2 = (CDDerivedMesh*) CDDM_from_template((DerivedMesh*)cddm, BLI_array_count(mvert), BLI_array_count(medge), 0, BLI_array_count(mloop), BLI_array_count(mpoly));
+ cddm2 = (CDDerivedMesh *) CDDM_from_template((DerivedMesh *)cddm, BLI_array_count(mvert), BLI_array_count(medge), 0, BLI_array_count(mloop), BLI_array_count(mpoly));
/*update edge indices and copy customdata*/
med = medge;
- for (i=0; i<cddm2->dm.numEdgeData; i++, med++) {
+ for (i = 0; i < cddm2->dm.numEdgeData; i++, med++) {
if (newv[med->v1] != -1)
med->v1 = newv[med->v1];
if (newv[med->v2] != -1)
@@ -2303,7 +2309,7 @@ DerivedMesh *CDDM_merge_verts(DerivedMesh *dm, const int *vtargetmap)
/*update loop indices and copy customdata*/
ml = mloop;
- for (i=0; i<cddm2->dm.numLoopData; i++, ml++) {
+ for (i = 0; i < cddm2->dm.numLoopData; i++, ml++) {
if (newe[ml->e] != -1)
ml->e = newe[ml->e];
if (newv[ml->v] != -1)
@@ -2314,21 +2320,21 @@ DerivedMesh *CDDM_merge_verts(DerivedMesh *dm, const int *vtargetmap)
/*copy vertex customdata*/
mv = mvert;
- for (i=0; i<cddm2->dm.numVertData; i++, mv++) {
+ for (i = 0; i < cddm2->dm.numVertData; i++, mv++) {
CustomData_copy_data(&dm->vertData, &cddm2->dm.vertData, oldv[i], i, 1);
}
/*copy poly customdata*/
mp = mpoly;
- for (i=0; i<cddm2->dm.numPolyData; i++, mp++) {
+ for (i = 0; i < cddm2->dm.numPolyData; i++, mp++) {
CustomData_copy_data(&dm->polyData, &cddm2->dm.polyData, oldp[i], i, 1);
}
/*copy over data. CustomData_add_layer can do this, need to look it up.*/
- memcpy(cddm2->mvert, mvert, sizeof(MVert)*BLI_array_count(mvert));
- memcpy(cddm2->medge, medge, sizeof(MEdge)*BLI_array_count(medge));
- memcpy(cddm2->mloop, mloop, sizeof(MLoop)*BLI_array_count(mloop));
- memcpy(cddm2->mpoly, mpoly, sizeof(MPoly)*BLI_array_count(mpoly));
+ memcpy(cddm2->mvert, mvert, sizeof(MVert) * BLI_array_count(mvert));
+ memcpy(cddm2->medge, medge, sizeof(MEdge) * BLI_array_count(medge));
+ memcpy(cddm2->mloop, mloop, sizeof(MLoop) * BLI_array_count(mloop));
+ memcpy(cddm2->mpoly, mpoly, sizeof(MPoly) * BLI_array_count(mpoly));
BLI_array_free(mvert); BLI_array_free(medge); BLI_array_free(mloop); BLI_array_free(mpoly);
if (newv)
@@ -2352,13 +2358,13 @@ DerivedMesh *CDDM_merge_verts(DerivedMesh *dm, const int *vtargetmap)
dm->needsFree = 1;
dm->release(dm);
- return (DerivedMesh*)cddm2;
+ return (DerivedMesh *)cddm2;
}
#endif
void CDDM_calc_edges_tessface(DerivedMesh *dm)
{
- CDDerivedMesh *cddm = (CDDerivedMesh*)dm;
+ CDDerivedMesh *cddm = (CDDerivedMesh *)dm;
CustomData edgeData;
EdgeHashIterator *ehi;
MFace *mf = cddm->mface;
@@ -2395,10 +2401,10 @@ void CDDM_calc_edges_tessface(DerivedMesh *dm)
med = CustomData_get_layer(&edgeData, CD_MEDGE);
index = CustomData_get_layer(&edgeData, CD_ORIGINDEX);
for (i = 0; !BLI_edgehashIterator_isDone(ehi);
- BLI_edgehashIterator_step(ehi), ++i, ++med, ++index) {
+ BLI_edgehashIterator_step(ehi), ++i, ++med, ++index) {
BLI_edgehashIterator_getKey(ehi, &med->v1, &med->v2);
- med->flag = ME_EDGEDRAW|ME_EDGERENDER;
+ med->flag = ME_EDGEDRAW | ME_EDGERENDER;
*index = ORIGINDEX_NONE;
}
BLI_edgehashIterator_free(ehi);
@@ -2416,7 +2422,7 @@ void CDDM_calc_edges_tessface(DerivedMesh *dm)
/* warning, this uses existing edges but CDDM_calc_edges_tessface() doesn't */
void CDDM_calc_edges(DerivedMesh *dm)
{
- CDDerivedMesh *cddm = (CDDerivedMesh*)dm;
+ CDDerivedMesh *cddm = (CDDerivedMesh *)dm;
CustomData edgeData;
EdgeHashIterator *ehi;
MPoly *mp = cddm->mpoly;
@@ -2431,14 +2437,14 @@ void CDDM_calc_edges(DerivedMesh *dm)
med = cddm->medge;
if (med) {
- for (i=0; i < numEdges; i++, med++) {
- BLI_edgehash_insert(eh, med->v1, med->v2, SET_INT_IN_POINTER(i+1));
+ for (i = 0; i < numEdges; i++, med++) {
+ BLI_edgehash_insert(eh, med->v1, med->v2, SET_INT_IN_POINTER(i + 1));
}
}
- for (i=0; i < maxFaces; i++, mp++) {
+ for (i = 0; i < maxFaces; i++, mp++) {
ml = cddm->mloop + mp->loopstart;
- for (j=0; j<mp->totloop; j++, ml++) {
+ for (j = 0; j < mp->totloop; j++, ml++) {
v1 = ml->v;
v2 = ME_POLY_LOOP_NEXT(cddm->mloop, mp, j)->v;
if (!BLI_edgehash_haskey(eh, v1, v2)) {
@@ -2458,12 +2464,12 @@ void CDDM_calc_edges(DerivedMesh *dm)
med = CustomData_get_layer(&edgeData, CD_MEDGE);
index = CustomData_get_layer(&edgeData, CD_ORIGINDEX);
for (i = 0; !BLI_edgehashIterator_isDone(ehi);
- BLI_edgehashIterator_step(ehi), ++i, ++med, ++index) {
+ BLI_edgehashIterator_step(ehi), ++i, ++med, ++index) {
BLI_edgehashIterator_getKey(ehi, &med->v1, &med->v2);
j = GET_INT_FROM_POINTER(BLI_edgehashIterator_getValue(ehi));
- med->flag = ME_EDGEDRAW|ME_EDGERENDER;
- *index = j==0 ? ORIGINDEX_NONE : eindex[j-1];
+ med->flag = ME_EDGEDRAW | ME_EDGERENDER;
+ *index = j == 0 ? ORIGINDEX_NONE : eindex[j - 1];
BLI_edgehashIterator_setValue(ehi, SET_INT_IN_POINTER(i));
}
@@ -2477,9 +2483,9 @@ void CDDM_calc_edges(DerivedMesh *dm)
cddm->medge = CustomData_get_layer(&dm->edgeData, CD_MEDGE);
mp = cddm->mpoly;
- for (i=0; i < maxFaces; i++, mp++) {
+ for (i = 0; i < maxFaces; i++, mp++) {
ml = cddm->mloop + mp->loopstart;
- for (j=0; j<mp->totloop; j++, ml++) {
+ for (j = 0; j < mp->totloop; j++, ml++) {
v1 = ml->v;
v2 = ME_POLY_LOOP_NEXT(cddm->mloop, mp, j)->v;
ml->e = GET_INT_FROM_POINTER(BLI_edgehash_lookup(eh, v1, v2));
@@ -2492,7 +2498,7 @@ void CDDM_calc_edges(DerivedMesh *dm)
void CDDM_lower_num_verts(DerivedMesh *dm, int numVerts)
{
if (numVerts < dm->numVertData)
- CustomData_free_elem(&dm->vertData, numVerts, dm->numVertData-numVerts);
+ CustomData_free_elem(&dm->vertData, numVerts, dm->numVertData - numVerts);
dm->numVertData = numVerts;
}
@@ -2500,7 +2506,7 @@ void CDDM_lower_num_verts(DerivedMesh *dm, int numVerts)
void CDDM_lower_num_edges(DerivedMesh *dm, int numEdges)
{
if (numEdges < dm->numEdgeData)
- CustomData_free_elem(&dm->edgeData, numEdges, dm->numEdgeData-numEdges);
+ CustomData_free_elem(&dm->edgeData, numEdges, dm->numEdgeData - numEdges);
dm->numEdgeData = numEdges;
}
@@ -2508,7 +2514,7 @@ void CDDM_lower_num_edges(DerivedMesh *dm, int numEdges)
void CDDM_lower_num_tessfaces(DerivedMesh *dm, int numTessFaces)
{
if (numTessFaces < dm->numTessFaceData)
- CustomData_free_elem(&dm->faceData, numTessFaces, dm->numTessFaceData-numTessFaces);
+ CustomData_free_elem(&dm->faceData, numTessFaces, dm->numTessFaceData - numTessFaces);
dm->numTessFaceData = numTessFaces;
}
@@ -2516,7 +2522,7 @@ void CDDM_lower_num_tessfaces(DerivedMesh *dm, int numTessFaces)
void CDDM_lower_num_polys(DerivedMesh *dm, int numPolys)
{
if (numPolys < dm->numPolyData)
- CustomData_free_elem(&dm->polyData, numPolys, dm->numPolyData-numPolys);
+ CustomData_free_elem(&dm->polyData, numPolys, dm->numPolyData - numPolys);
dm->numPolyData = numPolys;
}
@@ -2525,60 +2531,60 @@ void CDDM_lower_num_polys(DerivedMesh *dm, int numPolys)
MVert *CDDM_get_vert(DerivedMesh *dm, int index)
{
- return &((CDDerivedMesh*)dm)->mvert[index];
+ return &((CDDerivedMesh *)dm)->mvert[index];
}
MEdge *CDDM_get_edge(DerivedMesh *dm, int index)
{
- return &((CDDerivedMesh*)dm)->medge[index];
+ return &((CDDerivedMesh *)dm)->medge[index];
}
MFace *CDDM_get_tessface(DerivedMesh *dm, int index)
{
- return &((CDDerivedMesh*)dm)->mface[index];
+ return &((CDDerivedMesh *)dm)->mface[index];
}
MLoop *CDDM_get_loop(DerivedMesh *dm, int index)
{
- return &((CDDerivedMesh*)dm)->mloop[index];
+ return &((CDDerivedMesh *)dm)->mloop[index];
}
MPoly *CDDM_get_poly(DerivedMesh *dm, int index)
{
- return &((CDDerivedMesh*)dm)->mpoly[index];
+ return &((CDDerivedMesh *)dm)->mpoly[index];
}
/* array access functions */
MVert *CDDM_get_verts(DerivedMesh *dm)
{
- return ((CDDerivedMesh*)dm)->mvert;
+ return ((CDDerivedMesh *)dm)->mvert;
}
MEdge *CDDM_get_edges(DerivedMesh *dm)
{
- return ((CDDerivedMesh*)dm)->medge;
+ return ((CDDerivedMesh *)dm)->medge;
}
MFace *CDDM_get_tessfaces(DerivedMesh *dm)
{
- return ((CDDerivedMesh*)dm)->mface;
+ return ((CDDerivedMesh *)dm)->mface;
}
MLoop *CDDM_get_loops(DerivedMesh *dm)
{
- return ((CDDerivedMesh*)dm)->mloop;
+ return ((CDDerivedMesh *)dm)->mloop;
}
MPoly *CDDM_get_polys(DerivedMesh *dm)
{
- return ((CDDerivedMesh*)dm)->mpoly;
+ return ((CDDerivedMesh *)dm)->mpoly;
}
void CDDM_tessfaces_to_faces(DerivedMesh *dm)
{
/*converts mfaces to mpolys/mloops*/
- CDDerivedMesh *cddm = (CDDerivedMesh*)dm;
+ CDDerivedMesh *cddm = (CDDerivedMesh *)dm;
MFace *mf;
MEdge *me;
EdgeHash *eh = BLI_edgehash_new();
@@ -2601,13 +2607,13 @@ void CDDM_tessfaces_to_faces(DerivedMesh *dm)
/*build edge hash*/
me = cddm->medge;
- for (i=0; i<cddm->dm.numEdgeData; i++, me++) {
+ for (i = 0; i < cddm->dm.numEdgeData; i++, me++) {
BLI_edgehash_insert(eh, me->v1, me->v2, SET_INT_IN_POINTER(i));
}
mf = cddm->mface;
totloop = 0;
- for (i=0; i<cddm->dm.numTessFaceData; i++, mf++) {
+ for (i = 0; i < cddm->dm.numTessFaceData; i++, mf++) {
totloop += mf->v4 ? 4 : 3;
}
@@ -2622,13 +2628,13 @@ void CDDM_tessfaces_to_faces(DerivedMesh *dm)
MPoly *mp;
int l, *polyindex;
- cddm->mloop = MEM_callocN(sizeof(MLoop)*totloop, "cddm->mloop in CDDM_tessfaces_to_faces");
- cddm->mpoly = MEM_callocN(sizeof(MPoly)*cddm->dm.numTessFaceData, "cddm->mpoly in CDDM_tessfaces_to_faces");
+ cddm->mloop = MEM_callocN(sizeof(MLoop) * totloop, "cddm->mloop in CDDM_tessfaces_to_faces");
+ cddm->mpoly = MEM_callocN(sizeof(MPoly) * cddm->dm.numTessFaceData, "cddm->mpoly in CDDM_tessfaces_to_faces");
CustomData_add_layer(&cddm->dm.loopData, CD_MLOOP, CD_ASSIGN, cddm->mloop, totloop);
CustomData_add_layer(&cddm->dm.polyData, CD_MPOLY, CD_ASSIGN, cddm->mpoly, cddm->dm.numPolyData);
CustomData_merge(&cddm->dm.faceData, &cddm->dm.polyData,
- CD_MASK_ORIGINDEX, CD_DUPLICATE, cddm->dm.numTessFaceData);
+ CD_MASK_ORIGINDEX, CD_DUPLICATE, cddm->dm.numTessFaceData);
polyindex = CustomData_get_layer(&cddm->dm.faceData, CD_POLYINDEX);
@@ -2636,7 +2642,7 @@ void CDDM_tessfaces_to_faces(DerivedMesh *dm)
mp = cddm->mpoly;
ml = cddm->mloop;
l = 0;
- for (i=0; i<cddm->dm.numTessFaceData; i++, mf++, mp++, polyindex++) {
+ for (i = 0; i < cddm->dm.numTessFaceData; i++, mf++, mp++, polyindex++) {
mp->flag = mf->flag;
mp->loopstart = l;
mp->mat_nr = mf->mat_nr;
@@ -2651,12 +2657,12 @@ void CDDM_tessfaces_to_faces(DerivedMesh *dm)
ml++, l++;
ml->v = mf->v3;
- ml->e = GET_INT_FROM_POINTER(BLI_edgehash_lookup(eh, mf->v3, mf->v4?mf->v4:mf->v1));
+ ml->e = GET_INT_FROM_POINTER(BLI_edgehash_lookup(eh, mf->v3, mf->v4 ? mf->v4 : mf->v1));
ml++, l++;
if (mf->v4) {
ml->v = mf->v4;
- ml->e = GET_INT_FROM_POINTER(BLI_edgehash_lookup(eh, mf->v4, mf->v1));
+ ml->e = GET_INT_FROM_POINTER(BLI_edgehash_lookup(eh, mf->v4, mf->v1));
ml++, l++;
}
@@ -2669,7 +2675,7 @@ void CDDM_tessfaces_to_faces(DerivedMesh *dm)
void CDDM_set_mvert(DerivedMesh *dm, MVert *mvert)
{
- CDDerivedMesh *cddm = (CDDerivedMesh*)dm;
+ CDDerivedMesh *cddm = (CDDerivedMesh *)dm;
if (!CustomData_has_layer(&dm->vertData, CD_MVERT))
CustomData_add_layer(&dm->vertData, CD_MVERT, CD_ASSIGN, mvert, dm->numVertData);
@@ -2679,7 +2685,7 @@ void CDDM_set_mvert(DerivedMesh *dm, MVert *mvert)
void CDDM_set_medge(DerivedMesh *dm, MEdge *medge)
{
- CDDerivedMesh *cddm = (CDDerivedMesh*)dm;
+ CDDerivedMesh *cddm = (CDDerivedMesh *)dm;
if (!CustomData_has_layer(&dm->edgeData, CD_MEDGE))
CustomData_add_layer(&dm->edgeData, CD_MEDGE, CD_ASSIGN, medge, dm->numEdgeData);
@@ -2689,7 +2695,7 @@ void CDDM_set_medge(DerivedMesh *dm, MEdge *medge)
void CDDM_set_mface(DerivedMesh *dm, MFace *mface)
{
- CDDerivedMesh *cddm = (CDDerivedMesh*)dm;
+ CDDerivedMesh *cddm = (CDDerivedMesh *)dm;
if (!CustomData_has_layer(&dm->faceData, CD_MFACE))
CustomData_add_layer(&dm->faceData, CD_MFACE, CD_ASSIGN, mface, dm->numTessFaceData);
@@ -2699,7 +2705,7 @@ void CDDM_set_mface(DerivedMesh *dm, MFace *mface)
void CDDM_set_mloop(DerivedMesh *dm, MLoop *mloop)
{
- CDDerivedMesh *cddm = (CDDerivedMesh*)dm;
+ CDDerivedMesh *cddm = (CDDerivedMesh *)dm;
if (!CustomData_has_layer(&dm->loopData, CD_MLOOP))
CustomData_add_layer(&dm->loopData, CD_MLOOP, CD_ASSIGN, mloop, dm->numLoopData);
@@ -2709,7 +2715,7 @@ void CDDM_set_mloop(DerivedMesh *dm, MLoop *mloop)
void CDDM_set_mpoly(DerivedMesh *dm, MPoly *mpoly)
{
- CDDerivedMesh *cddm = (CDDerivedMesh*)dm;
+ CDDerivedMesh *cddm = (CDDerivedMesh *)dm;
if (!CustomData_has_layer(&dm->polyData, CD_MPOLY))
CustomData_add_layer(&dm->polyData, CD_MPOLY, CD_ASSIGN, mpoly, dm->numPolyData);
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c
index a0c273cf962..b521285c626 100644
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@ -51,9 +51,9 @@
#include "BKE_pointcache.h"
#ifdef _WIN32
-void tstart ( void )
+void tstart( void )
{}
-void tend ( void )
+void tend( void )
{
}
double tval( void )
@@ -64,13 +64,13 @@ double tval( void )
#include <sys/time.h>
static struct timeval _tstart, _tend;
static struct timezone tz;
-void tstart ( void )
+void tstart( void )
{
- gettimeofday ( &_tstart, &tz );
+ gettimeofday(&_tstart, &tz);
}
-void tend ( void )
+void tend(void)
{
- gettimeofday ( &_tend,&tz );
+ gettimeofday(&_tend, &tz);
}
double tval(void)
{
@@ -111,7 +111,7 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm );
* 1. create object
* 2. fill object with standard values or with the GUI settings if given
*/
-void cloth_init ( ClothModifierData *clmd )
+void cloth_init(ClothModifierData *clmd )
{
/* Initialize our new data structure to reasonable values. */
clmd->sim_parms->gravity[0] = 0.0;
@@ -191,8 +191,7 @@ static BVHTree *bvhselftree_build_from_cloth (ClothModifierData *clmd, float eps
bvhtree = BLI_bvhtree_new(cloth->numverts, epsilon, 4, 6);
// fill tree
- for (i = 0; i < cloth->numverts; i++, verts++)
- {
+ for (i = 0; i < cloth->numverts; i++, verts++) {
copy_v3_v3(&co[0*3], verts->xold);
BLI_bvhtree_insert(bvhtree, i, co, 1);
@@ -232,8 +231,7 @@ static BVHTree *bvhtree_build_from_cloth (ClothModifierData *clmd, float epsilon
bvhtree = BLI_bvhtree_new(cloth->numfaces, epsilon, 4, 26);
// fill tree
- for (i = 0; i < cloth->numfaces; i++, mfaces++)
- {
+ for (i = 0; i < cloth->numfaces; i++, mfaces++) {
copy_v3_v3(&co[0*3], verts[mfaces->v1].xold);
copy_v3_v3(&co[1*3], verts[mfaces->v2].xold);
copy_v3_v3(&co[2*3], verts[mfaces->v3].xold);
@@ -266,10 +264,8 @@ void bvhtree_update_from_cloth(ClothModifierData *clmd, int moving)
mfaces = cloth->mfaces;
// update vertex position in bvh tree
- if (verts && mfaces)
- {
- for (i = 0; i < cloth->numfaces; i++, mfaces++)
- {
+ if (verts && mfaces) {
+ for (i = 0; i < cloth->numfaces; i++, mfaces++) {
copy_v3_v3(&co[0*3], verts[mfaces->v1].txold);
copy_v3_v3(&co[1*3], verts[mfaces->v2].txold);
copy_v3_v3(&co[2*3], verts[mfaces->v3].txold);
@@ -278,8 +274,7 @@ void bvhtree_update_from_cloth(ClothModifierData *clmd, int moving)
copy_v3_v3(&co[3*3], verts[mfaces->v4].txold);
// copy new locations into array
- if (moving)
- {
+ if (moving) {
// update moving positions
copy_v3_v3(&co_moving[0*3], verts[mfaces->v1].tx);
copy_v3_v3(&co_moving[1*3], verts[mfaces->v2].tx);
@@ -319,15 +314,12 @@ void bvhselftree_update_from_cloth(ClothModifierData *clmd, int moving)
mfaces = cloth->mfaces;
// update vertex position in bvh tree
- if (verts && mfaces)
- {
- for (i = 0; i < cloth->numverts; i++, verts++)
- {
+ if (verts && mfaces) {
+ for (i = 0; i < cloth->numverts; i++, verts++) {
copy_v3_v3(&co[0*3], verts->txold);
// copy new locations into array
- if (moving)
- {
+ if (moving) {
// update moving positions
copy_v3_v3(&co_moving[0*3], verts->tx);
@@ -558,11 +550,9 @@ void cloth_free_modifier(ClothModifierData *clmd )
cloth = clmd->clothObject;
- if ( cloth )
- {
+ if ( cloth ) {
// If our solver provides a free function, call it
- if ( solvers [clmd->sim_parms->solver_type].free )
- {
+ if ( solvers [clmd->sim_parms->solver_type].free ) {
solvers [clmd->sim_parms->solver_type].free ( clmd );
}
@@ -574,11 +564,9 @@ void cloth_free_modifier(ClothModifierData *clmd )
cloth->numverts = 0;
// Free the springs.
- if ( cloth->springs != NULL )
- {
+ if ( cloth->springs != NULL ) {
LinkNode *search = cloth->springs;
- while (search)
- {
+ while (search) {
ClothSpring *spring = search->link;
MEM_freeN ( spring );
@@ -617,7 +605,7 @@ void cloth_free_modifier(ClothModifierData *clmd )
}
/* frees all */
-void cloth_free_modifier_extern ( ClothModifierData *clmd )
+void cloth_free_modifier_extern(ClothModifierData *clmd )
{
Cloth *cloth = NULL;
if (G.rt > 0)
@@ -628,14 +616,12 @@ void cloth_free_modifier_extern ( ClothModifierData *clmd )
cloth = clmd->clothObject;
- if ( cloth )
- {
+ if ( cloth ) {
if (G.rt > 0)
printf("cloth_free_modifier_extern in\n");
// If our solver provides a free function, call it
- if ( solvers [clmd->sim_parms->solver_type].free )
- {
+ if ( solvers [clmd->sim_parms->solver_type].free ) {
solvers [clmd->sim_parms->solver_type].free ( clmd );
}
@@ -647,11 +633,9 @@ void cloth_free_modifier_extern ( ClothModifierData *clmd )
cloth->numverts = 0;
// Free the springs.
- if ( cloth->springs != NULL )
- {
+ if ( cloth->springs != NULL ) {
LinkNode *search = cloth->springs;
- while (search)
- {
+ while (search) {
ClothSpring *spring = search->link;
MEM_freeN ( spring );
@@ -708,8 +692,7 @@ static void cloth_to_object (Object *ob, ClothModifierData *clmd, float (*verte
/* inverse matrix is not uptodate... */
invert_m4_m4(ob->imat, ob->obmat);
- for (i = 0; i < cloth->numverts; i++)
- {
+ for (i = 0; i < cloth->numverts; i++) {
copy_v3_v3 (vertexCos[i], cloth->verts[i].x);
mul_m4_v3(ob->imat, vertexCos[i]); /* cloth is in global coords */
}
@@ -745,21 +728,16 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm )
clothObj = clmd->clothObject;
- numverts = dm->getNumVerts ( dm );
+ numverts = dm->getNumVerts (dm);
verts = clothObj->verts;
- if (cloth_uses_vgroup(clmd))
- {
- for ( i = 0; i < numverts; i++, verts++ )
- {
+ if (cloth_uses_vgroup(clmd)) {
+ for ( i = 0; i < numverts; i++, verts++ ) {
dvert = dm->getVertData ( dm, i, CD_MDEFORMVERT );
- if ( dvert )
- {
- for ( j = 0; j < dvert->totweight; j++ )
- {
- if (( dvert->dw[j].def_nr == (clmd->sim_parms->vgroup_mass-1)) && (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ))
- {
+ if ( dvert ) {
+ for ( j = 0; j < dvert->totweight; j++ ) {
+ if (( dvert->dw[j].def_nr == (clmd->sim_parms->vgroup_mass-1)) && (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL )) {
verts->goal = dvert->dw [j].weight;
/* goalfac= 1.0f; */ /* UNUSED */
@@ -768,23 +746,19 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm )
// ABS ( clmd->sim_parms->maxgoal - clmd->sim_parms->mingoal );
*/
- verts->goal = ( float ) pow ( verts->goal , 4.0f );
- if ( verts->goal >=SOFTGOALSNAP )
- {
+ verts->goal = powf(verts->goal, 4.0f);
+ if ( verts->goal >=SOFTGOALSNAP ) {
verts->flags |= CLOTH_VERT_FLAG_PINNED;
}
}
- if (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_SCALING )
- {
- if ( dvert->dw[j].def_nr == (clmd->sim_parms->vgroup_struct-1))
- {
+ if (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_SCALING ) {
+ if ( dvert->dw[j].def_nr == (clmd->sim_parms->vgroup_struct-1)) {
verts->struct_stiff = dvert->dw [j].weight;
verts->shear_stiff = dvert->dw [j].weight;
}
- if ( dvert->dw[j].def_nr == (clmd->sim_parms->vgroup_bend-1))
- {
+ if ( dvert->dw[j].def_nr == (clmd->sim_parms->vgroup_bend-1)) {
verts->bend_stiff = dvert->dw [j].weight;
}
}
@@ -807,13 +781,12 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d
MVert *mvert = NULL;
ClothVertex *verts = NULL;
float (*shapekey_rest)[3]= NULL;
- float tnull[3] = {0,0,0};
+ float tnull[3] = {0, 0, 0};
Cloth *cloth = NULL;
float maxdist = 0;
// If we have a clothObject, free it.
- if ( clmd->clothObject != NULL )
- {
+ if ( clmd->clothObject != NULL ) {
cloth_free_modifier ( clmd );
if (G.rt > 0)
printf("cloth_free_modifier cloth_from_object\n");
@@ -821,8 +794,7 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d
// Allocate a new cloth object.
clmd->clothObject = MEM_callocN ( sizeof ( Cloth ), "cloth" );
- if ( clmd->clothObject )
- {
+ if ( clmd->clothObject ) {
clmd->clothObject->old_solver_type = 255;
// clmd->clothObject->old_collision_type = 255;
cloth = clmd->clothObject;
@@ -846,22 +818,20 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d
if ( clmd->sim_parms->shapekey_rest )
shapekey_rest = dm->getVertDataArray ( dm, CD_CLOTH_ORCO );
- mvert = dm->getVertArray ( dm );
+ mvert = dm->getVertArray (dm);
verts = clmd->clothObject->verts;
// set initial values
- for ( i = 0; i < dm->getNumVerts(dm); i++, verts++ )
- {
- if (first)
- {
- copy_v3_v3( verts->x, mvert[i].co );
+ for ( i = 0; i < dm->getNumVerts(dm); i++, verts++ ) {
+ if (first) {
+ copy_v3_v3(verts->x, mvert[i].co);
- mul_m4_v3( ob->obmat, verts->x );
+ mul_m4_v3(ob->obmat, verts->x);
if ( shapekey_rest ) {
verts->xrest= shapekey_rest[i];
- mul_m4_v3( ob->obmat, verts->xrest );
+ mul_m4_v3(ob->obmat, verts->xrest);
}
else
verts->xrest = verts->x;
@@ -881,7 +851,7 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d
copy_v3_v3 ( verts->xconst, verts->x );
copy_v3_v3 ( verts->txold, verts->x );
copy_v3_v3 ( verts->tx, verts->x );
- mul_v3_fl( verts->v, 0.0f );
+ mul_v3_fl(verts->v, 0.0f);
verts->impulse_count = 0;
copy_v3_v3 ( verts->impulse, tnull );
@@ -891,18 +861,15 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d
// has to be happen before springs are build!
cloth_apply_vgroup (clmd, dm);
- if ( !cloth_build_springs ( clmd, dm ) )
- {
+ if ( !cloth_build_springs ( clmd, dm ) ) {
cloth_free_modifier ( clmd );
modifier_setError(&(clmd->modifier), "%s", TIP_("Can't build springs."));
printf("cloth_free_modifier cloth_build_springs\n");
return 0;
}
- for ( i = 0; i < dm->getNumVerts(dm); i++)
- {
- if ((!(cloth->verts[i].flags & CLOTH_VERT_FLAG_PINNED)) && (cloth->verts[i].goal > ALMOST_ZERO))
- {
+ for ( i = 0; i < dm->getNumVerts(dm); i++) {
+ if ((!(cloth->verts[i].flags & CLOTH_VERT_FLAG_PINNED)) && (cloth->verts[i].goal > ALMOST_ZERO)) {
cloth_add_spring (clmd, i, i, 0.0, CLOTH_SPRING_TYPE_GOAL);
}
}
@@ -917,8 +884,7 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d
clmd->clothObject->bvhtree = bvhtree_build_from_cloth ( clmd, MAX2(clmd->coll_parms->epsilon, clmd->coll_parms->distance_repel) );
- for (i = 0; i < dm->getNumVerts(dm); i++)
- {
+ for (i = 0; i < dm->getNumVerts(dm); i++) {
maxdist = MAX2(maxdist, clmd->coll_parms->selfepsilon* ( cloth->verts[i].avg_spring_len*2.0f));
}
@@ -929,16 +895,15 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d
static void cloth_from_mesh ( ClothModifierData *clmd, DerivedMesh *dm )
{
- unsigned int numverts = dm->getNumVerts ( dm );
- unsigned int numfaces = dm->getNumTessFaces ( dm );
- MFace *mface = dm->getTessFaceArray( dm );
+ unsigned int numverts = dm->getNumVerts (dm);
+ unsigned int numfaces = dm->getNumTessFaces (dm);
+ MFace *mface = dm->getTessFaceArray(dm);
unsigned int i = 0;
/* Allocate our vertices. */
clmd->clothObject->numverts = numverts;
clmd->clothObject->verts = MEM_callocN ( sizeof ( ClothVertex ) * clmd->clothObject->numverts, "clothVertex" );
- if ( clmd->clothObject->verts == NULL )
- {
+ if ( clmd->clothObject->verts == NULL ) {
cloth_free_modifier ( clmd );
modifier_setError(&(clmd->modifier), "%s", TIP_("Out of memory on allocating clmd->clothObject->verts."));
printf("cloth_free_modifier clmd->clothObject->verts\n");
@@ -948,8 +913,7 @@ static void cloth_from_mesh ( ClothModifierData *clmd, DerivedMesh *dm )
// save face information
clmd->clothObject->numfaces = numfaces;
clmd->clothObject->mfaces = MEM_callocN ( sizeof ( MFace ) * clmd->clothObject->numfaces, "clothMFaces" );
- if ( clmd->clothObject->mfaces == NULL )
- {
+ if ( clmd->clothObject->mfaces == NULL ) {
cloth_free_modifier ( clmd );
modifier_setError(&(clmd->modifier), "%s", TIP_("Out of memory on allocating clmd->clothObject->mfaces."));
printf("cloth_free_modifier clmd->clothObject->mfaces\n");
@@ -972,13 +936,12 @@ static void cloth_from_mesh ( ClothModifierData *clmd, DerivedMesh *dm )
// be careful: implicit solver has to be resettet when using this one!
// --> only for implicit handling of this spring!
-int cloth_add_spring ( ClothModifierData *clmd, unsigned int indexA, unsigned int indexB, float restlength, int spring_type)
+int cloth_add_spring(ClothModifierData *clmd, unsigned int indexA, unsigned int indexB, float restlength, int spring_type)
{
Cloth *cloth = clmd->clothObject;
ClothSpring *spring = NULL;
- if (cloth)
- {
+ if (cloth) {
// TODO: look if this spring is already there
spring = ( ClothSpring * ) MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" );
@@ -1006,11 +969,9 @@ static void cloth_free_errorsprings(Cloth *cloth, EdgeHash *UNUSED(edgehash), Li
{
unsigned int i = 0;
- if ( cloth->springs != NULL )
- {
+ if ( cloth->springs != NULL ) {
LinkNode *search = cloth->springs;
- while (search)
- {
+ while (search) {
ClothSpring *spring = search->link;
MEM_freeN ( spring );
@@ -1021,11 +982,9 @@ static void cloth_free_errorsprings(Cloth *cloth, EdgeHash *UNUSED(edgehash), Li
cloth->springs = NULL;
}
- if (edgelist)
- {
- for ( i = 0; i < cloth->numverts; i++ )
- {
- BLI_linklist_free ( edgelist[i],NULL );
+ if (edgelist) {
+ for ( i = 0; i < cloth->numverts; i++ ) {
+ BLI_linklist_free ( edgelist[i], NULL );
}
MEM_freeN ( edgelist );
@@ -1041,11 +1000,11 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
ClothSpring *spring = NULL, *tspring = NULL, *tspring2 = NULL;
unsigned int struct_springs = 0, shear_springs=0, bend_springs = 0;
unsigned int i = 0;
- unsigned int numverts = (unsigned int)dm->getNumVerts ( dm );
- unsigned int numedges = (unsigned int)dm->getNumEdges ( dm );
- unsigned int numfaces = (unsigned int)dm->getNumTessFaces ( dm );
- MEdge *medge = dm->getEdgeArray ( dm );
- MFace *mface = dm->getTessFaceArray ( dm );
+ unsigned int numverts = (unsigned int)dm->getNumVerts (dm);
+ unsigned int numedges = (unsigned int)dm->getNumEdges (dm);
+ unsigned int numfaces = (unsigned int)dm->getNumTessFaces (dm);
+ MEdge *medge = dm->getEdgeArray (dm);
+ MFace *mface = dm->getTessFaceArray (dm);
int index2 = 0; // our second vertex index
LinkNode **edgelist = NULL;
EdgeHash *edgehash = NULL;
@@ -1062,8 +1021,7 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
if (!edgelist)
return 0;
- for ( i = 0; i < numverts; i++ )
- {
+ for ( i = 0; i < numverts; i++ ) {
edgelist[i] = NULL;
}
@@ -1074,12 +1032,10 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
edgehash = BLI_edgehash_new();
// structural springs
- for ( i = 0; i < numedges; i++ )
- {
+ for ( i = 0; i < numedges; i++ ) {
spring = ( ClothSpring * ) MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" );
- if ( spring )
- {
+ if ( spring ) {
spring->ij = MIN2(medge[i].v1, medge[i].v2);
spring->kl = MAX2(medge[i].v2, medge[i].v1);
spring->restlen = len_v3v3(cloth->verts[spring->kl].xrest, cloth->verts[spring->ij].xrest);
@@ -1104,22 +1060,19 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
if (struct_springs > 0)
clmd->sim_parms->avg_spring_len /= struct_springs;
- for (i = 0; i < numverts; i++)
- {
+ for (i = 0; i < numverts; i++) {
cloth->verts[i].avg_spring_len = cloth->verts[i].avg_spring_len * 0.49f / ((float)cloth->verts[i].spring_count);
}
// shear springs
- for ( i = 0; i < numfaces; i++ )
- {
+ for ( i = 0; i < numfaces; i++ ) {
// triangle faces already have shear springs due to structural geometry
if ( !mface[i].v4 )
continue;
spring = ( ClothSpring *) MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" );
- if (!spring)
- {
+ if (!spring) {
cloth_free_errorsprings(cloth, edgehash, edgelist);
return 0;
}
@@ -1140,8 +1093,7 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
// if ( mface[i].v4 ) --> Quad face
spring = ( ClothSpring * ) MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" );
- if (!spring)
- {
+ if (!spring) {
cloth_free_errorsprings(cloth, edgehash, edgelist);
return 0;
}
@@ -1162,15 +1114,13 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
if (numfaces) {
// bending springs
search2 = cloth->springs;
- for ( i = struct_springs; i < struct_springs+shear_springs; i++ )
- {
+ for ( i = struct_springs; i < struct_springs+shear_springs; i++ ) {
if ( !search2 )
break;
tspring2 = search2->link;
search = edgelist[tspring2->kl];
- while ( search )
- {
+ while ( search ) {
tspring = search->link;
index2 = ( ( tspring->ij==tspring2->kl ) ? ( tspring->kl ) : ( tspring->ij ) );
@@ -1181,8 +1131,7 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
{
spring = ( ClothSpring * ) MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" );
- if (!spring)
- {
+ if (!spring) {
cloth_free_errorsprings(cloth, edgehash, edgelist);
return 0;
}
@@ -1192,7 +1141,7 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
spring->restlen = len_v3v3(cloth->verts[spring->kl].xrest, cloth->verts[spring->ij].xrest);
spring->type = CLOTH_SPRING_TYPE_BENDING;
spring->stiffness = (cloth->verts[spring->kl].bend_stiff + cloth->verts[spring->ij].bend_stiff) / 2.0f;
- BLI_edgehash_insert ( edgehash, spring->ij, spring->kl, NULL );
+ BLI_edgehash_insert(edgehash, spring->ij, spring->kl, NULL);
bend_springs++;
BLI_linklist_prepend ( &cloth->springs, spring );
@@ -1212,16 +1161,14 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
/* of the strands. -jahka */
search = cloth->springs;
search2 = search->next;
- while (search && search2)
- {
+ while (search && search2) {
tspring = search->link;
tspring2 = search2->link;
if (tspring->ij == tspring2->kl) {
spring = ( ClothSpring * ) MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" );
- if (!spring)
- {
+ if (!spring) {
cloth_free_errorsprings(cloth, edgehash, edgelist);
return 0;
}
@@ -1242,27 +1189,24 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
}
/* insert other near springs in edgehash AFTER bending springs are calculated (for selfcolls) */
- for ( i = 0; i < numedges; i++ ) // struct springs
- BLI_edgehash_insert ( edgehash, MIN2(medge[i].v1, medge[i].v2), MAX2(medge[i].v2, medge[i].v1), NULL );
-
- for ( i = 0; i < numfaces; i++ ) // edge springs
- {
- if (mface[i].v4)
- {
- BLI_edgehash_insert ( edgehash, MIN2(mface[i].v1, mface[i].v3), MAX2(mface[i].v3, mface[i].v1), NULL );
+ for (i = 0; i < numedges; i++) { /* struct springs */
+ BLI_edgehash_insert(edgehash, MIN2(medge[i].v1, medge[i].v2), MAX2(medge[i].v2, medge[i].v1), NULL);
+ }
+
+ for (i = 0; i < numfaces; i++) { /* edge springs */
+ if (mface[i].v4) {
+ BLI_edgehash_insert(edgehash, MIN2(mface[i].v1, mface[i].v3), MAX2(mface[i].v3, mface[i].v1), NULL);
- BLI_edgehash_insert ( edgehash, MIN2(mface[i].v2, mface[i].v4), MAX2(mface[i].v2, mface[i].v4), NULL );
+ BLI_edgehash_insert(edgehash, MIN2(mface[i].v2, mface[i].v4), MAX2(mface[i].v2, mface[i].v4), NULL);
}
}
cloth->numsprings = struct_springs + shear_springs + bend_springs;
- if ( edgelist )
- {
- for ( i = 0; i < numverts; i++ )
- {
- BLI_linklist_free ( edgelist[i],NULL );
+ if ( edgelist ) {
+ for ( i = 0; i < numverts; i++ ) {
+ BLI_linklist_free ( edgelist[i], NULL );
}
MEM_freeN ( edgelist );
@@ -1270,8 +1214,8 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
cloth->edgehash = edgehash;
- if (G.rt>0)
- printf("avg_len: %f\n",clmd->sim_parms->avg_spring_len);
+ if (G.rt > 0)
+ printf("avg_len: %f\n", clmd->sim_parms->avg_spring_len);
return 1;
diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c
index 7195fb9c425..609b2d3496c 100644
--- a/source/blender/blenkernel/intern/collision.c
+++ b/source/blender/blenkernel/intern/collision.c
@@ -80,12 +80,11 @@ void collision_move_object(CollisionModifierData *collmd, float step, float prev
float tv[3] = {0, 0, 0};
unsigned int i = 0;
- for ( i = 0; i < collmd->numverts; i++ )
- {
- sub_v3_v3v3 ( tv, collmd->xnew[i].co, collmd->x[i].co );
- VECADDS ( collmd->current_x[i].co, collmd->x[i].co, tv, prevstep );
- VECADDS ( collmd->current_xnew[i].co, collmd->x[i].co, tv, step );
- sub_v3_v3v3 ( collmd->current_v[i].co, collmd->current_xnew[i].co, collmd->current_x[i].co );
+ for ( i = 0; i < collmd->numverts; i++ ) {
+ sub_v3_v3v3(tv, collmd->xnew[i].co, collmd->x[i].co);
+ VECADDS(collmd->current_x[i].co, collmd->x[i].co, tv, prevstep);
+ VECADDS(collmd->current_xnew[i].co, collmd->x[i].co, tv, step);
+ sub_v3_v3v3(collmd->current_v[i].co, collmd->current_xnew[i].co, collmd->current_x[i].co);
}
bvhtree_update_from_mvert ( collmd->bvhtree, collmd->mfaces, collmd->numfaces, collmd->current_x, collmd->current_xnew, collmd->numverts, 1 );
@@ -101,8 +100,7 @@ BVHTree *bvhtree_build_from_mvert ( MFace *mfaces, unsigned int numfaces, MVert
tree = BLI_bvhtree_new ( numfaces*2, epsilon, 4, 26 );
// fill tree
- for ( i = 0; i < numfaces; i++, tface++ )
- {
+ for ( i = 0; i < numfaces; i++, tface++ ) {
copy_v3_v3 ( &co[0*3], x[tface->v1].co );
copy_v3_v3 ( &co[1*3], x[tface->v2].co );
copy_v3_v3 ( &co[2*3], x[tface->v3].co );
@@ -118,7 +116,7 @@ BVHTree *bvhtree_build_from_mvert ( MFace *mfaces, unsigned int numfaces, MVert
return tree;
}
-void bvhtree_update_from_mvert ( BVHTree * bvhtree, MFace *faces, int numfaces, MVert *x, MVert *xnew, int UNUSED(numverts), int moving )
+void bvhtree_update_from_mvert(BVHTree * bvhtree, MFace *faces, int numfaces, MVert *x, MVert *xnew, int UNUSED(numverts), int moving )
{
int i;
MFace *mfaces = faces;
@@ -128,10 +126,8 @@ void bvhtree_update_from_mvert ( BVHTree * bvhtree, MFace *faces, int numfaces,
if ( !bvhtree )
return;
- if ( x )
- {
- for ( i = 0; i < numfaces; i++, mfaces++ )
- {
+ if ( x ) {
+ for ( i = 0; i < numfaces; i++, mfaces++ ) {
copy_v3_v3 ( &co[0*3], x[mfaces->v1].co );
copy_v3_v3 ( &co[1*3], x[mfaces->v2].co );
copy_v3_v3 ( &co[2*3], x[mfaces->v3].co );
@@ -139,8 +135,7 @@ void bvhtree_update_from_mvert ( BVHTree * bvhtree, MFace *faces, int numfaces,
copy_v3_v3 ( &co[3*3], x[mfaces->v4].co );
// copy new locations into array
- if ( moving && xnew )
- {
+ if ( moving && xnew ) {
// update moving positions
copy_v3_v3 ( &co_moving[0*3], xnew[mfaces->v1].co );
copy_v3_v3 ( &co_moving[1*3], xnew[mfaces->v2].co );
@@ -150,8 +145,7 @@ void bvhtree_update_from_mvert ( BVHTree * bvhtree, MFace *faces, int numfaces,
ret = BLI_bvhtree_update_node ( bvhtree, i, co, co_moving, ( mfaces->v4 ? 4 : 3 ) );
}
- else
- {
+ else {
ret = BLI_bvhtree_update_node ( bvhtree, i, co, NULL, ( mfaces->v4 ? 4 : 3 ) );
}
@@ -174,7 +168,7 @@ Collision modifier code end
* copied from SOLVE_CUBIC.C --> GSL
*/
-#define mySWAP(a,b) do { double tmp = b ; b = a ; a = tmp ; } while (0)
+#define mySWAP(a, b) do { double tmp = b ; b = a ; a = tmp ; } while (0)
#if 0 /* UNUSED */
static int
gsl_poly_solve_cubic (double a, double b, double c,
@@ -451,7 +445,7 @@ static int cloth_get_collision_time ( double a[3], double b[3], double c[3], dou
static void collision_compute_barycentric ( float pv[3], float p1[3], float p2[3], float p3[3], float *w1, float *w2, float *w3 )
{
double tempV1[3], tempV2[3], tempV4[3];
- double a,b,c,d,e,f;
+ double a, b, c, d, e, f;
VECSUB ( tempV1, p1, p3 );
VECSUB ( tempV2, p2, p3 );
@@ -465,8 +459,7 @@ static void collision_compute_barycentric ( float pv[3], float p1[3], float p2[3
d = ( a * c - b * b );
- if ( ABS ( d ) < (double)ALMOST_ZERO )
- {
+ if ( ABS ( d ) < (double)ALMOST_ZERO ) {
*w1 = *w2 = *w3 = 1.0 / 3.0;
return;
}
@@ -504,8 +497,7 @@ static int cloth_collision_response_static ( ClothModifierData *clmd, CollisionM
cloth1 = clmd->clothObject;
- for ( ; collpair != collision_end; collpair++ )
- {
+ for ( ; collpair != collision_end; collpair++ ) {
// only handle static collisions here
if ( collpair->flag & COLLISION_IN_FUTURE )
continue;
@@ -529,10 +521,10 @@ static int cloth_collision_response_static ( ClothModifierData *clmd, CollisionM
collision_interpolateOnTriangle ( v2, collmd->current_v[collpair->bp1].co, collmd->current_v[collpair->bp2].co, collmd->current_v[collpair->bp3].co, u1, u2, u3 );
- sub_v3_v3v3 ( relativeVelocity, v2, v1 );
+ sub_v3_v3v3(relativeVelocity, v2, v1);
// Calculate the normal component of the relative velocity (actually only the magnitude - the direction is stored in 'normal').
- magrelVel = dot_v3v3( relativeVelocity, collpair->normal );
+ magrelVel = dot_v3v3(relativeVelocity, collpair->normal);
// printf("magrelVel: %f\n", magrelVel);
@@ -540,8 +532,7 @@ static int cloth_collision_response_static ( ClothModifierData *clmd, CollisionM
// TODO
// If v_n_mag < 0 the edges are approaching each other.
- if ( magrelVel > ALMOST_ZERO )
- {
+ if ( magrelVel > ALMOST_ZERO ) {
// Calculate Impulse magnitude to stop all motion in normal direction.
float magtangent = 0, repulse = 0, d = 0;
double impulse = 0.0;
@@ -550,17 +541,16 @@ static int cloth_collision_response_static ( ClothModifierData *clmd, CollisionM
// calculate tangential velocity
copy_v3_v3 ( temp, collpair->normal );
- mul_v3_fl( temp, magrelVel );
- sub_v3_v3v3 ( vrel_t_pre, relativeVelocity, temp );
+ mul_v3_fl(temp, magrelVel);
+ sub_v3_v3v3(vrel_t_pre, relativeVelocity, temp);
// Decrease in magnitude of relative tangential velocity due to coulomb friction
// in original formula "magrelVel" should be the "change of relative velocity in normal direction"
- magtangent = MIN2 ( clmd->coll_parms->friction * 0.01f * magrelVel, sqrtf( dot_v3v3( vrel_t_pre,vrel_t_pre ) ) );
+ magtangent = MIN2(clmd->coll_parms->friction * 0.01f * magrelVel, sqrtf(dot_v3v3(vrel_t_pre, vrel_t_pre)));
// Apply friction impulse.
- if ( magtangent > ALMOST_ZERO )
- {
- normalize_v3( vrel_t_pre );
+ if ( magtangent > ALMOST_ZERO ) {
+ normalize_v3(vrel_t_pre);
impulse = magtangent / ( 1.0f + w1*w1 + w2*w2 + w3*w3 ); // 2.0 *
VECADDMUL ( cloth1->verts[collpair->ap1].impulse, vrel_t_pre, w1 * impulse );
@@ -583,12 +573,11 @@ static int cloth_collision_response_static ( ClothModifierData *clmd, CollisionM
cloth1->verts[collpair->ap3].impulse_count++;
// Apply repulse impulse if distance too short
- // I_r = -min(dt*kd, m(0,1d/dt - v_n))
+ // I_r = -min(dt*kd, m(0, 1d/dt - v_n))
spf = (float)clmd->sim_parms->stepsPerFrame / clmd->sim_parms->timescale;
d = clmd->coll_parms->epsilon*8.0f/9.0f + epsilon2*8.0f/9.0f - collpair->distance;
- if ( ( magrelVel < 0.1f*d*spf ) && ( d > ALMOST_ZERO ) )
- {
+ if ( ( magrelVel < 0.1f*d*spf ) && ( d > ALMOST_ZERO ) ) {
repulse = MIN2 ( d*1.0f/spf, 0.1f*d*spf - magrelVel );
// stay on the safe side and clamp repulse
@@ -666,8 +655,8 @@ static CollPair* cloth_edge_collision ( ModifierData *md1, ModifierData *md2,
BVHTreeOverlap *overlap, CollPair *collpair,
GHash *visithash, MemArena *arena)
{
- ClothModifierData *clmd = ( ClothModifierData * ) md1;
- CollisionModifierData *collmd = ( CollisionModifierData * ) md2;
+ ClothModifierData *clmd = (ClothModifierData *)md1;
+ CollisionModifierData *collmd = (CollisionModifierData *) md2;
MFace *face1=NULL, *face2 = NULL;
ClothVertex *verts1 = clmd->clothObject->verts;
double distance = 0;
@@ -685,10 +674,8 @@ static CollPair* cloth_edge_collision ( ModifierData *md1, ModifierData *md2,
face2 = & ( collmd->mfaces[overlap->indexB] );
// check all 4 possible collisions
- for ( i = 0; i < 4; i++ )
- {
- if ( i == 0 )
- {
+ for ( i = 0; i < 4; i++ ) {
+ if ( i == 0 ) {
// fill faceA
ap1 = face1->v1;
ap2 = face1->v2;
@@ -699,10 +686,8 @@ static CollPair* cloth_edge_collision ( ModifierData *md1, ModifierData *md2,
bp2 = face2->v2;
bp3 = face2->v3;
}
- else if ( i == 1 )
- {
- if ( face1->v4 )
- {
+ else if ( i == 1 ) {
+ if ( face1->v4 ) {
// fill faceA
ap1 = face1->v1;
ap2 = face1->v3;
@@ -717,10 +702,8 @@ static CollPair* cloth_edge_collision ( ModifierData *md1, ModifierData *md2,
continue;
}
}
- if ( i == 2 )
- {
- if ( face2->v4 )
- {
+ if ( i == 2 ) {
+ if ( face2->v4 ) {
// fill faceA
ap1 = face1->v1;
ap2 = face1->v2;
@@ -735,10 +718,8 @@ static CollPair* cloth_edge_collision ( ModifierData *md1, ModifierData *md2,
continue;
}
}
- else if ( i == 3 )
- {
- if ( face1->v4 && face2->v4 )
- {
+ else if ( i == 3 ) {
+ if ( face1->v4 && face2->v4 ) {
// fill faceA
ap1 = face1->v1;
ap2 = face1->v3;
@@ -847,8 +828,7 @@ static int cloth_edge_collision_response_moving ( ClothModifierData *clmd, Colli
cloth1 = clmd->clothObject;
- for ( ; collpair != collision_end; collpair++ )
- {
+ for ( ; collpair != collision_end; collpair++ ) {
if (!(collpair->flag & COLLISION_IS_EDGES))
continue;
@@ -859,14 +839,13 @@ static int cloth_edge_collision_response_moving ( ClothModifierData *clmd, Colli
VECADDFAC(v1, cloth1->verts[collpair->ap1].tv, cloth1->verts[collpair->ap2].tv, w1);
VECADDFAC(v2, collmd->current_v[collpair->bp1].co, collmd->current_v[collpair->bp2].co, w2);
- sub_v3_v3v3 ( relativeVelocity, v2, v1);
+ sub_v3_v3v3(relativeVelocity, v2, v1);
// Calculate the normal component of the relative velocity (actually only the magnitude - the direction is stored in 'normal').
magrelVel = dot_v3v3 ( relativeVelocity, collpair->normal );
// If v_n_mag < 0 the edges are approaching each other.
- if ( magrelVel > ALMOST_ZERO )
- {
+ if ( magrelVel > ALMOST_ZERO ) {
// Calculate Impulse magnitude to stop all motion in normal direction.
float magtangent = 0, repulse = 0, d = 0;
double impulse = 0.0;
@@ -877,17 +856,16 @@ static int cloth_edge_collision_response_moving ( ClothModifierData *clmd, Colli
// calculate tangential velocity
copy_v3_v3 ( temp, collpair->normal );
- mul_v3_fl( temp, magrelVel );
- sub_v3_v3v3 ( vrel_t_pre, relativeVelocity, temp );
+ mul_v3_fl(temp, magrelVel);
+ sub_v3_v3v3(vrel_t_pre, relativeVelocity, temp);
// Decrease in magnitude of relative tangential velocity due to coulomb friction
// in original formula "magrelVel" should be the "change of relative velocity in normal direction"
- magtangent = MIN2 ( clmd->coll_parms->friction * 0.01 * magrelVel,sqrt ( dot_v3v3 ( vrel_t_pre,vrel_t_pre ) ) );
+ magtangent = MIN2 ( clmd->coll_parms->friction * 0.01 * magrelVel, sqrt ( dot_v3v3 ( vrel_t_pre, vrel_t_pre ) ) );
// Apply friction impulse.
- if ( magtangent > ALMOST_ZERO )
- {
- normalize_v3( vrel_t_pre );
+ if ( magtangent > ALMOST_ZERO ) {
+ normalize_v3(vrel_t_pre);
impulse = magtangent;
VECADDMUL ( pimpulse, vrel_t_pre, impulse);
@@ -902,12 +880,11 @@ static int cloth_edge_collision_response_moving ( ClothModifierData *clmd, Colli
VECADDMUL ( pimpulse, collpair->normal, impulse);
// Apply repulse impulse if distance too short
- // I_r = -min(dt*kd, m(0,1d/dt - v_n))
+ // I_r = -min(dt*kd, m(0, 1d/dt - v_n))
spf = (float)clmd->sim_parms->stepsPerFrame / clmd->sim_parms->timescale;
d = collpair->distance;
- if ( ( magrelVel < 0.1*d*spf && ( d > ALMOST_ZERO ) ) )
- {
+ if ( ( magrelVel < 0.1*d*spf && ( d > ALMOST_ZERO ) ) ) {
repulse = MIN2 ( d*1.0/spf, 0.1*d*spf - magrelVel );
// stay on the safe side and clamp repulse
@@ -949,8 +926,7 @@ static int cloth_collision_response_moving ( ClothModifierData *clmd, CollisionM
cloth1 = clmd->clothObject;
- for ( ; collpair != collision_end; collpair++ )
- {
+ for ( ; collpair != collision_end; collpair++ ) {
if (collpair->flag & COLLISION_IS_EDGES)
continue;
@@ -961,14 +937,13 @@ static int cloth_collision_response_moving ( ClothModifierData *clmd, CollisionM
// Calculate relative "velocity".
collision_interpolateOnTriangle ( v1, collmd->current_v[collpair->bp1].co, collmd->current_v[collpair->bp2].co, collmd->current_v[collpair->bp3].co, w1, w2, w3);
- sub_v3_v3v3 ( relativeVelocity, v1, cloth1->verts[collpair->collp].tv);
+ sub_v3_v3v3(relativeVelocity, v1, cloth1->verts[collpair->collp].tv);
// Calculate the normal component of the relative velocity (actually only the magnitude - the direction is stored in 'normal').
magrelVel = dot_v3v3 ( relativeVelocity, collpair->normal );
// If v_n_mag < 0 the edges are approaching each other.
- if ( magrelVel > ALMOST_ZERO )
- {
+ if ( magrelVel > ALMOST_ZERO ) {
// Calculate Impulse magnitude to stop all motion in normal direction.
float magtangent = 0, repulse = 0, d = 0;
double impulse = 0.0;
@@ -977,17 +952,16 @@ static int cloth_collision_response_moving ( ClothModifierData *clmd, CollisionM
// calculate tangential velocity
copy_v3_v3 ( temp, collpair->normal );
- mul_v3_fl( temp, magrelVel );
- sub_v3_v3v3 ( vrel_t_pre, relativeVelocity, temp );
+ mul_v3_fl(temp, magrelVel);
+ sub_v3_v3v3(vrel_t_pre, relativeVelocity, temp);
// Decrease in magnitude of relative tangential velocity due to coulomb friction
// in original formula "magrelVel" should be the "change of relative velocity in normal direction"
- magtangent = MIN2 ( clmd->coll_parms->friction * 0.01 * magrelVel,sqrt ( dot_v3v3 ( vrel_t_pre,vrel_t_pre ) ) );
+ magtangent = MIN2 ( clmd->coll_parms->friction * 0.01 * magrelVel, sqrt ( dot_v3v3 ( vrel_t_pre, vrel_t_pre ) ) );
// Apply friction impulse.
- if ( magtangent > ALMOST_ZERO )
- {
- normalize_v3( vrel_t_pre );
+ if ( magtangent > ALMOST_ZERO ) {
+ normalize_v3(vrel_t_pre);
impulse = magtangent; // 2.0 *
VECADDMUL ( cloth1->verts[collpair->collp].impulse, vrel_t_pre, impulse);
@@ -1002,12 +976,11 @@ static int cloth_collision_response_moving ( ClothModifierData *clmd, CollisionM
cloth1->verts[collpair->collp].impulse_count++;
// Apply repulse impulse if distance too short
- // I_r = -min(dt*kd, m(0,1d/dt - v_n))
+ // I_r = -min(dt*kd, m(0, 1d/dt - v_n))
spf = (float)clmd->sim_parms->stepsPerFrame / clmd->sim_parms->timescale;
d = -collpair->distance;
- if ( ( magrelVel < 0.1*d*spf ) && ( d > ALMOST_ZERO ) )
- {
+ if ( ( magrelVel < 0.1*d*spf ) && ( d > ALMOST_ZERO ) ) {
repulse = MIN2 ( d*1.0/spf, 0.1*d*spf - magrelVel );
// stay on the safe side and clamp repulse
@@ -1028,14 +1001,13 @@ static int cloth_collision_response_moving ( ClothModifierData *clmd, CollisionM
// Calculate relative "velocity".
collision_interpolateOnTriangle ( v1, cloth1->verts[collpair->ap1].tv, cloth1->verts[collpair->ap2].tv, cloth1->verts[collpair->ap3].tv, w1, w2, w3 );
- sub_v3_v3v3 ( relativeVelocity, collmd->current_v[collpair->collp].co, v1);
+ sub_v3_v3v3(relativeVelocity, collmd->current_v[collpair->collp].co, v1);
// Calculate the normal component of the relative velocity (actually only the magnitude - the direction is stored in 'normal').
magrelVel = dot_v3v3 ( relativeVelocity, collpair->normal );
// If v_n_mag < 0 the edges are approaching each other.
- if ( magrelVel > ALMOST_ZERO )
- {
+ if ( magrelVel > ALMOST_ZERO ) {
// Calculate Impulse magnitude to stop all motion in normal direction.
float magtangent = 0, repulse = 0, d = 0;
double impulse = 0.0;
@@ -1044,17 +1016,16 @@ static int cloth_collision_response_moving ( ClothModifierData *clmd, CollisionM
// calculate tangential velocity
copy_v3_v3 ( temp, collpair->normal );
- mul_v3_fl( temp, magrelVel );
- sub_v3_v3v3 ( vrel_t_pre, relativeVelocity, temp );
+ mul_v3_fl(temp, magrelVel);
+ sub_v3_v3v3(vrel_t_pre, relativeVelocity, temp);
// Decrease in magnitude of relative tangential velocity due to coulomb friction
// in original formula "magrelVel" should be the "change of relative velocity in normal direction"
- magtangent = MIN2 ( clmd->coll_parms->friction * 0.01 * magrelVel,sqrt ( dot_v3v3 ( vrel_t_pre,vrel_t_pre ) ) );
+ magtangent = MIN2 ( clmd->coll_parms->friction * 0.01 * magrelVel, sqrt ( dot_v3v3 ( vrel_t_pre, vrel_t_pre ) ) );
// Apply friction impulse.
- if ( magtangent > ALMOST_ZERO )
- {
- normalize_v3( vrel_t_pre );
+ if ( magtangent > ALMOST_ZERO ) {
+ normalize_v3(vrel_t_pre);
impulse = magtangent; // 2.0 *
VECADDMUL ( pimpulse, vrel_t_pre, impulse);
@@ -1068,12 +1039,11 @@ static int cloth_collision_response_moving ( ClothModifierData *clmd, CollisionM
VECADDMUL ( pimpulse, collpair->normal, impulse);
// Apply repulse impulse if distance too short
- // I_r = -min(dt*kd, m(0,1d/dt - v_n))
+ // I_r = -min(dt*kd, m(0, 1d/dt - v_n))
spf = (float)clmd->sim_parms->stepsPerFrame / clmd->sim_parms->timescale;
d = -collpair->distance;
- if ( ( magrelVel < 0.1*d*spf ) && ( d > ALMOST_ZERO ) )
- {
+ if ( ( magrelVel < 0.1*d*spf ) && ( d > ALMOST_ZERO ) ) {
repulse = MIN2 ( d*1.0/spf, 0.1*d*spf - magrelVel );
// stay on the safe side and clamp repulse
@@ -1185,8 +1155,8 @@ int cloth_point_tri_moving_v3v3_f(float v1[2][3], int i1, float v2[2][3], int i2
static CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2, BVHTreeOverlap *overlap,
CollPair *collpair, double dt, GHash *gh, MemArena *arena)
{
- ClothModifierData *clmd = ( ClothModifierData * ) md1;
- CollisionModifierData *collmd = ( CollisionModifierData * ) md2;
+ ClothModifierData *clmd = (ClothModifierData *)md1;
+ CollisionModifierData *collmd = (CollisionModifierData *) md2;
MFace *face1=NULL, *face2 = NULL;
ClothVertex *verts1 = clmd->clothObject->verts;
double distance = 0;
@@ -1202,10 +1172,8 @@ static CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2, BVHTree
face2 = & ( collmd->mfaces[overlap->indexB] );
// check all 4 possible collisions
- for ( i = 0; i < 4; i++ )
- {
- if ( i == 0 )
- {
+ for ( i = 0; i < 4; i++ ) {
+ if ( i == 0 ) {
// fill faceA
ap1 = face1->v1;
ap2 = face1->v2;
@@ -1216,10 +1184,8 @@ static CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2, BVHTree
bp2 = face2->v2;
bp3 = face2->v3;
}
- else if ( i == 1 )
- {
- if ( face1->v4 )
- {
+ else if ( i == 1 ) {
+ if ( face1->v4 ) {
// fill faceA
ap1 = face1->v1;
ap2 = face1->v3;
@@ -1234,10 +1200,8 @@ static CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2, BVHTree
continue;
}
}
- if ( i == 2 )
- {
- if ( face2->v4 )
- {
+ if ( i == 2 ) {
+ if ( face2->v4 ) {
// fill faceA
ap1 = face1->v1;
ap2 = face1->v2;
@@ -1252,10 +1216,8 @@ static CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2, BVHTree
continue;
}
}
- else if ( i == 3 )
- {
- if ( face1->v4 && face2->v4 )
- {
+ else if ( i == 3 ) {
+ if ( face1->v4 && face2->v4 ) {
// fill faceA
ap1 = face1->v1;
ap2 = face1->v3;
@@ -1400,8 +1362,8 @@ static void machine_epsilon_offset(Cloth *cloth)
static CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2,
BVHTreeOverlap *overlap, CollPair *collpair, float dt )
{
- ClothModifierData *clmd = ( ClothModifierData * ) md1;
- CollisionModifierData *collmd = ( CollisionModifierData * ) md2;
+ ClothModifierData *clmd = (ClothModifierData *)md1;
+ CollisionModifierData *collmd = (CollisionModifierData *) md2;
Cloth *cloth = clmd->clothObject;
MFace *face1=NULL, *face2 = NULL;
#ifdef USE_BULLET
@@ -1417,10 +1379,8 @@ static CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2,
face2 = & ( collmd->mfaces[overlap->indexB] );
// check all 4 possible collisions
- for ( i = 0; i < 4; i++ )
- {
- if ( i == 0 )
- {
+ for ( i = 0; i < 4; i++ ) {
+ if ( i == 0 ) {
// fill faceA
collpair->ap1 = face1->v1;
collpair->ap2 = face1->v2;
@@ -1431,10 +1391,8 @@ static CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2,
collpair->bp2 = face2->v2;
collpair->bp3 = face2->v3;
}
- else if ( i == 1 )
- {
- if ( face1->v4 )
- {
+ else if ( i == 1 ) {
+ if ( face1->v4 ) {
// fill faceA
collpair->ap1 = face1->v1;
collpair->ap2 = face1->v4;
@@ -1448,10 +1406,8 @@ static CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2,
else
i++;
}
- if ( i == 2 )
- {
- if ( face2->v4 )
- {
+ if ( i == 2 ) {
+ if ( face2->v4 ) {
// fill faceA
collpair->ap1 = face1->v1;
collpair->ap2 = face1->v2;
@@ -1465,10 +1421,8 @@ static CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2,
else
break;
}
- else if ( i == 3 )
- {
- if ( face1->v4 && face2->v4 )
- {
+ else if ( i == 3 ) {
+ if ( face1->v4 && face2->v4 ) {
// fill faceA
collpair->ap1 = face1->v1;
collpair->ap2 = face1->v4;
@@ -1507,15 +1461,14 @@ static CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2,
#ifdef USE_BULLET
// calc distance + normal
distance = plNearestPoints (
- verts1[collpair->ap1].txold, verts1[collpair->ap2].txold, verts1[collpair->ap3].txold, collmd->current_x[collpair->bp1].co, collmd->current_x[collpair->bp2].co, collmd->current_x[collpair->bp3].co, collpair->pa,collpair->pb,collpair->vector );
+ verts1[collpair->ap1].txold, verts1[collpair->ap2].txold, verts1[collpair->ap3].txold, collmd->current_x[collpair->bp1].co, collmd->current_x[collpair->bp2].co, collmd->current_x[collpair->bp3].co, collpair->pa, collpair->pb, collpair->vector );
#else
// just be sure that we don't add anything
distance = 2.0 * (double)( epsilon1 + epsilon2 + ALMOST_ZERO );
#endif
- if ( distance <= ( epsilon1 + epsilon2 + ALMOST_ZERO ) )
- {
- normalize_v3_v3( collpair->normal, collpair->vector );
+ if (distance <= (epsilon1 + epsilon2 + ALMOST_ZERO)) {
+ normalize_v3_v3(collpair->normal, collpair->vector);
collpair->distance = distance;
collpair->flag = 0;
@@ -1547,7 +1500,7 @@ static CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2,
collision_interpolateOnTriangle ( v2, collmd->current_v[collpair->bp1].co, collmd->current_v[collpair->bp2].co, collmd->current_v[collpair->bp3].co, u1, u2, u3 );
- sub_v3_v3v3 ( relativeVelocity, v2, v1 );
+ sub_v3_v3v3(relativeVelocity, v2, v1);
if (sqrt(dot_v3v3(relativeVelocity, relativeVelocity)) >= distance)
{
@@ -1594,7 +1547,7 @@ static int cloth_collision_response_moving( ClothModifierData *clmd, CollisionMo
collision_interpolateOnTriangle ( v2, collmd->current_v[collpair->bp1].co, collmd->current_v[collpair->bp2].co, collmd->current_v[collpair->bp3].co, u1, u2, u3 );
- sub_v3_v3v3 ( relativeVelocity, v2, v1 );
+ sub_v3_v3v3(relativeVelocity, v2, v1);
// Calculate the normal component of the relative velocity (actually only the magnitude - the direction is stored in 'normal').
magrelVel = dot_v3v3 ( relativeVelocity, collpair->normal );
@@ -1615,17 +1568,17 @@ static int cloth_collision_response_moving( ClothModifierData *clmd, CollisionMo
// calculate tangential velocity
copy_v3_v3 ( temp, collpair->normal );
- mul_v3_fl( temp, magrelVel );
- sub_v3_v3v3 ( vrel_t_pre, relativeVelocity, temp );
+ mul_v3_fl(temp, magrelVel);
+ sub_v3_v3v3(vrel_t_pre, relativeVelocity, temp);
// Decrease in magnitude of relative tangential velocity due to coulomb friction
// in original formula "magrelVel" should be the "change of relative velocity in normal direction"
- magtangent = MIN2 ( clmd->coll_parms->friction * 0.01 * magrelVel,sqrt ( dot_v3v3 ( vrel_t_pre,vrel_t_pre ) ) );
+ magtangent = MIN2 ( clmd->coll_parms->friction * 0.01 * magrelVel, sqrt ( dot_v3v3 ( vrel_t_pre, vrel_t_pre ) ) );
// Apply friction impulse.
if ( magtangent > ALMOST_ZERO )
{
- normalize_v3( vrel_t_pre );
+ normalize_v3(vrel_t_pre);
impulse = 2.0 * magtangent / ( 1.0 + w1*w1 + w2*w2 + w3*w3 );
VECADDMUL ( cloth1->verts[collpair->ap1].impulse, vrel_t_pre, w1 * impulse );
@@ -1648,7 +1601,7 @@ static int cloth_collision_response_moving( ClothModifierData *clmd, CollisionMo
cloth1->verts[collpair->ap3].impulse_count++;
// Apply repulse impulse if distance too short
- // I_r = -min(dt*kd, m(0,1d/dt - v_n))
+ // I_r = -min(dt*kd, m(0, 1d/dt - v_n))
/*
d = clmd->coll_parms->epsilon*8.0/9.0 + epsilon2*8.0/9.0 - collpair->distance;
if ( ( magrelVel < 0.1*d*clmd->sim_parms->stepsPerFrame ) && ( d > ALMOST_ZERO ) )
@@ -1682,7 +1635,7 @@ static float projectPointOntoLine(float *p, float *a, float *b)
return dot_v3v3(pa, ba) / dot_v3v3(ba, ba);
}
-static void calculateEENormal(float *np1, float *np2, float *np3, float *np4,float *out_normal)
+static void calculateEENormal(float *np1, float *np2, float *np3, float *np4, float *out_normal)
{
float line1[3], line2[3];
float length;
@@ -2008,14 +1961,14 @@ static int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModi
// if ( !cloth_are_edges_adjacent ( clmd, collmd, &edgecollpair ) )
{
// always put coll points in p21/p22
- sub_v3_v3v3 ( x1, verts1[edgecollpair.p12].txold, verts1[edgecollpair.p11].txold );
- sub_v3_v3v3 ( v1, verts1[edgecollpair.p12].tv, verts1[edgecollpair.p11].tv );
+ sub_v3_v3v3(x1, verts1[edgecollpair.p12].txold, verts1[edgecollpair.p11].txold);
+ sub_v3_v3v3(v1, verts1[edgecollpair.p12].tv, verts1[edgecollpair.p11].tv);
- sub_v3_v3v3 ( x2, verts2[edgecollpair.p21].co, verts1[edgecollpair.p11].txold );
- sub_v3_v3v3 ( v2, velocity2[edgecollpair.p21].co, verts1[edgecollpair.p11].tv );
+ sub_v3_v3v3(x2, verts2[edgecollpair.p21].co, verts1[edgecollpair.p11].txold);
+ sub_v3_v3v3(v2, velocity2[edgecollpair.p21].co, verts1[edgecollpair.p11].tv);
- sub_v3_v3v3 ( x3, verts2[edgecollpair.p22].co, verts1[edgecollpair.p11].txold );
- sub_v3_v3v3 ( v3, velocity2[edgecollpair.p22].co, verts1[edgecollpair.p11].tv );
+ sub_v3_v3v3(x3, verts2[edgecollpair.p22].co, verts1[edgecollpair.p11].txold);
+ sub_v3_v3v3(v3, velocity2[edgecollpair.p22].co, verts1[edgecollpair.p11].tv);
numsolutions = cloth_get_collision_time ( x1, v1, x2, v2, x3, v3, solution );
@@ -2034,7 +1987,7 @@ static int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModi
// printf("sol %d: %lf\n", k, solution[k]);
if ( ( solution[k] >= ALMOST_ZERO ) && ( solution[k] <= 1.0 ) && ( solution[k] > ALMOST_ZERO))
{
- float a,b;
+ float a, b;
float out_normal[3];
float distance;
float impulse = 0;
@@ -2283,24 +2236,21 @@ static void cloth_bvh_objcollisions_nearcheck ( ClothModifierData * clmd, Collis
#ifdef WITH_ELTOPO
machine_epsilon_offset(clmd->clothObject);
- for ( i = 0; i < numresult; i++ )
- {
- *collisions_index = cloth_collision ( ( ModifierData * ) clmd, ( ModifierData * ) collmd,
+ for ( i = 0; i < numresult; i++ ) {
+ *collisions_index = cloth_collision ( (ModifierData *)clmd, (ModifierData *)collmd,
overlap+i, *collisions_index, dt, tri_visithash, arena );
}
- for ( i = 0; i < numresult; i++ )
- {
- *collisions_index = cloth_edge_collision ( ( ModifierData * ) clmd, ( ModifierData * ) collmd,
+ for ( i = 0; i < numresult; i++ ) {
+ *collisions_index = cloth_edge_collision ( (ModifierData *)clmd, (ModifierData *)collmd,
overlap+i, *collisions_index, visithash, arena );
}
BLI_ghash_free(visithash, NULL, NULL);
BLI_ghash_free(tri_visithash, NULL, NULL);
BLI_memarena_free(arena);
#else /* WITH_ELTOPO */
- for ( i = 0; i < numresult; i++ )
- {
- *collisions_index = cloth_collision ( ( ModifierData * ) clmd, ( ModifierData * ) collmd,
+ for ( i = 0; i < numresult; i++ ) {
+ *collisions_index = cloth_collision ( (ModifierData *)clmd, (ModifierData *)collmd,
overlap+i, *collisions_index, dt );
}
#endif /* WITH_ELTOPO */
@@ -2310,11 +2260,11 @@ static void cloth_bvh_objcollisions_nearcheck ( ClothModifierData * clmd, Collis
static int cloth_bvh_objcollisions_resolve ( ClothModifierData * clmd, CollisionModifierData *collmd, CollPair *collisions, CollPair *collisions_index)
{
Cloth *cloth = clmd->clothObject;
- int i=0, j = 0, /*numfaces = 0,*/ numverts = 0;
+ int i=0, j = 0, /*numfaces = 0, */ numverts = 0;
ClothVertex *verts = NULL;
int ret = 0;
int result = 0;
- float tnull[3] = {0,0,0};
+ float tnull[3] = {0, 0, 0};
/*numfaces = clmd->clothObject->numfaces;*/ /*UNUSED*/
numverts = clmd->clothObject->numverts;
@@ -2323,12 +2273,10 @@ static int cloth_bvh_objcollisions_resolve ( ClothModifierData * clmd, Collision
// process all collisions (calculate impulses, TODO: also repulses if distance too short)
result = 1;
- for ( j = 0; j < 5; j++ ) // 5 is just a value that ensures convergence
- {
+ for ( j = 0; j < 5; j++ ) { /* 5 is just a value that ensures convergence */
result = 0;
- if ( collmd->bvhtree )
- {
+ if ( collmd->bvhtree ) {
#ifdef WITH_ELTOPO
result += cloth_collision_response_moving(clmd, collmd, collisions, collisions_index);
result += cloth_edge_collision_response_moving(clmd, collmd, collisions, collisions_index);
@@ -2339,14 +2287,11 @@ static int cloth_bvh_objcollisions_resolve ( ClothModifierData * clmd, Collision
{
#else
// apply impulses in parallel
- if ( result )
- {
+ if (result) {
#endif
- for ( i = 0; i < numverts; i++ )
- {
+ for (i = 0; i < numverts; i++) {
// calculate "velocities" (just xnew = xold + v; no dt in v)
- if ( verts[i].impulse_count )
- {
+ if (verts[i].impulse_count) {
VECADDMUL ( verts[i].tv, verts[i].impulse, 1.0f / verts[i].impulse_count );
copy_v3_v3 ( verts[i].impulse, tnull );
verts[i].impulse_count = 0;
@@ -2361,7 +2306,7 @@ static int cloth_bvh_objcollisions_resolve ( ClothModifierData * clmd, Collision
}
// cloth - object collisions
-int cloth_bvh_objcollision (Object *ob, ClothModifierData * clmd, float step, float dt )
+int cloth_bvh_objcollision(Object *ob, ClothModifierData * clmd, float step, float dt )
{
Cloth *cloth= clmd->clothObject;
BVHTree *cloth_bvh= cloth->bvhtree;
@@ -2398,12 +2343,11 @@ int cloth_bvh_objcollision (Object *ob, ClothModifierData * clmd, float step, fl
ret2 = 0;
- collisions = MEM_callocN(sizeof(CollPair *) *numcollobj , "CollPair");
- collisions_index = MEM_callocN(sizeof(CollPair *) *numcollobj , "CollPair");
+ collisions = MEM_callocN(sizeof(CollPair *) *numcollobj, "CollPair");
+ collisions_index = MEM_callocN(sizeof(CollPair *) *numcollobj, "CollPair");
// check all collision objects
- for (i = 0; i < numcollobj; i++)
- {
+ for (i = 0; i < numcollobj; i++) {
Object *collob= collobjs[i];
CollisionModifierData *collmd = (CollisionModifierData*)modifiers_findByType(collob, eModifierType_Collision);
BVHTreeOverlap *overlap = NULL;
@@ -2435,8 +2379,7 @@ int cloth_bvh_objcollision (Object *ob, ClothModifierData * clmd, float step, fl
}
rounds++;
- for (i = 0; i < numcollobj; i++)
- {
+ for (i = 0; i < numcollobj; i++) {
if ( collisions[i] ) MEM_freeN ( collisions[i] );
}
@@ -2449,12 +2392,9 @@ int cloth_bvh_objcollision (Object *ob, ClothModifierData * clmd, float step, fl
////////////////////////////////////////////////////////////
// verts come from clmd
- for ( i = 0; i < numverts; i++ )
- {
- if ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL )
- {
- if ( verts [i].flags & CLOTH_VERT_FLAG_PINNED )
- {
+ for ( i = 0; i < numverts; i++ ) {
+ if ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) {
+ if ( verts [i].flags & CLOTH_VERT_FLAG_PINNED ) {
continue;
}
}
@@ -2467,10 +2407,8 @@ int cloth_bvh_objcollision (Object *ob, ClothModifierData * clmd, float step, fl
////////////////////////////////////////////////////////////
// Test on *simple* selfcollisions
////////////////////////////////////////////////////////////
- if ( clmd->coll_parms->flags & CLOTH_COLLSETTINGS_FLAG_SELF )
- {
- for (l = 0; l < (unsigned int)clmd->coll_parms->self_loop_count; l++)
- {
+ if ( clmd->coll_parms->flags & CLOTH_COLLSETTINGS_FLAG_SELF ) {
+ for (l = 0; l < (unsigned int)clmd->coll_parms->self_loop_count; l++) {
// TODO: add coll quality rounds again
BVHTreeOverlap *overlap = NULL;
unsigned int result = 0;
@@ -2483,14 +2421,12 @@ int cloth_bvh_objcollision (Object *ob, ClothModifierData * clmd, float step, fl
verts = cloth->verts;
- if ( cloth->bvhselftree )
- {
- // search for overlapping collision pairs
+ if ( cloth->bvhselftree ) {
+ // search for overlapping collision pairs
overlap = BLI_bvhtree_overlap ( cloth->bvhselftree, cloth->bvhselftree, &result );
// #pragma omp parallel for private(k, i, j) schedule(static)
- for ( k = 0; k < result; k++ )
- {
+ for ( k = 0; k < result; k++ ) {
float temp[3];
float length = 0;
float mindistance;
@@ -2500,8 +2436,7 @@ int cloth_bvh_objcollision (Object *ob, ClothModifierData * clmd, float step, fl
mindistance = clmd->coll_parms->selfepsilon* ( cloth->verts[i].avg_spring_len + cloth->verts[j].avg_spring_len );
- if ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL )
- {
+ if ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) {
if ( ( cloth->verts [i].flags & CLOTH_VERT_FLAG_PINNED ) &&
( cloth->verts [j].flags & CLOTH_VERT_FLAG_PINNED ) )
{
@@ -2509,38 +2444,33 @@ int cloth_bvh_objcollision (Object *ob, ClothModifierData * clmd, float step, fl
}
}
- sub_v3_v3v3 ( temp, verts[i].tx, verts[j].tx );
+ sub_v3_v3v3(temp, verts[i].tx, verts[j].tx);
if ( ( ABS ( temp[0] ) > mindistance ) || ( ABS ( temp[1] ) > mindistance ) || ( ABS ( temp[2] ) > mindistance ) ) continue;
// check for adjacent points (i must be smaller j)
- if ( BLI_edgehash_haskey ( cloth->edgehash, MIN2(i, j), MAX2(i, j) ) )
- {
+ if ( BLI_edgehash_haskey ( cloth->edgehash, MIN2(i, j), MAX2(i, j) ) ) {
continue;
}
- length = normalize_v3( temp );
+ length = normalize_v3(temp );
- if ( length < mindistance )
- {
+ if ( length < mindistance ) {
float correction = mindistance - length;
- if ( cloth->verts [i].flags & CLOTH_VERT_FLAG_PINNED )
- {
- mul_v3_fl( temp, -correction );
+ if ( cloth->verts [i].flags & CLOTH_VERT_FLAG_PINNED ) {
+ mul_v3_fl(temp, -correction);
VECADD ( verts[j].tx, verts[j].tx, temp );
}
- else if ( cloth->verts [j].flags & CLOTH_VERT_FLAG_PINNED )
- {
- mul_v3_fl( temp, correction );
+ else if ( cloth->verts [j].flags & CLOTH_VERT_FLAG_PINNED ) {
+ mul_v3_fl(temp, correction);
VECADD ( verts[i].tx, verts[i].tx, temp );
}
- else
- {
- mul_v3_fl( temp, correction * -0.5 );
+ else {
+ mul_v3_fl(temp, correction * -0.5);
VECADD ( verts[j].tx, verts[j].tx, temp );
- sub_v3_v3v3 ( verts[i].tx, verts[i].tx, temp );
+ sub_v3_v3v3(verts[i].tx, verts[i].tx, temp);
}
ret = 1;
ret2 += ret;
@@ -2560,13 +2490,10 @@ int cloth_bvh_objcollision (Object *ob, ClothModifierData * clmd, float step, fl
////////////////////////////////////////////////////////////
// SELFCOLLISIONS: update velocities
////////////////////////////////////////////////////////////
- if ( ret2 )
- {
- for ( i = 0; i < cloth->numverts; i++ )
- {
- if ( ! ( verts [i].flags & CLOTH_VERT_FLAG_PINNED ) )
- {
- sub_v3_v3v3 ( verts[i].tv, verts[i].tx, verts[i].txold );
+ if ( ret2 ) {
+ for ( i = 0; i < cloth->numverts; i++ ) {
+ if ( ! ( verts [i].flags & CLOTH_VERT_FLAG_PINNED ) ) {
+ sub_v3_v3v3(verts[i].tv, verts[i].tx, verts[i].txold);
}
}
}
diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c
index 25391a34689..7ba117861bb 100644
--- a/source/blender/blenkernel/intern/colortools.c
+++ b/source/blender/blenkernel/intern/colortools.c
@@ -62,9 +62,9 @@ CurveMapping *curvemapping_add(int tot, float minx, float miny, float maxx, floa
int a;
float clipminx, clipminy, clipmaxx, clipmaxy;
- cumap= MEM_callocN(sizeof(CurveMapping), "new curvemap");
- cumap->flag= CUMA_DO_CLIP;
- if (tot==4) cumap->cur= 3; /* rhms, hack for 'col' curve? */
+ cumap = MEM_callocN(sizeof(CurveMapping), "new curvemap");
+ cumap->flag = CUMA_DO_CLIP;
+ if (tot == 4) cumap->cur = 3; /* rhms, hack for 'col' curve? */
clipminx = MIN2(minx, maxx);
clipminy = MIN2(miny, maxy);
@@ -72,20 +72,20 @@ CurveMapping *curvemapping_add(int tot, float minx, float miny, float maxx, floa
clipmaxy = MAX2(miny, maxy);
BLI_init_rctf(&cumap->curr, clipminx, clipmaxx, clipminy, clipmaxy);
- cumap->clipr= cumap->curr;
+ cumap->clipr = cumap->curr;
- cumap->white[0]= cumap->white[1]= cumap->white[2]= 1.0f;
- cumap->bwmul[0]= cumap->bwmul[1]= cumap->bwmul[2]= 1.0f;
+ cumap->white[0] = cumap->white[1] = cumap->white[2] = 1.0f;
+ cumap->bwmul[0] = cumap->bwmul[1] = cumap->bwmul[2] = 1.0f;
- for (a=0; a<tot; a++) {
- cumap->cm[a].flag= CUMA_EXTEND_EXTRAPOLATE;
- cumap->cm[a].totpoint= 2;
- cumap->cm[a].curve= MEM_callocN(2*sizeof(CurveMapPoint), "curve points");
-
- cumap->cm[a].curve[0].x= minx;
- cumap->cm[a].curve[0].y= miny;
- cumap->cm[a].curve[1].x= maxx;
- cumap->cm[a].curve[1].y= maxy;
+ for (a = 0; a < tot; a++) {
+ cumap->cm[a].flag = CUMA_EXTEND_EXTRAPOLATE;
+ cumap->cm[a].totpoint = 2;
+ cumap->cm[a].curve = MEM_callocN(2 * sizeof(CurveMapPoint), "curve points");
+
+ cumap->cm[a].curve[0].x = minx;
+ cumap->cm[a].curve[0].y = miny;
+ cumap->cm[a].curve[1].x = maxx;
+ cumap->cm[a].curve[1].y = maxy;
}
cumap->changed_timestamp = 0;
@@ -98,7 +98,7 @@ void curvemapping_free(CurveMapping *cumap)
int a;
if (cumap) {
- for (a=0; a<CM_TOT; a++) {
+ for (a = 0; a < CM_TOT; a++) {
if (cumap->cm[a].curve) MEM_freeN(cumap->cm[a].curve);
if (cumap->cm[a].table) MEM_freeN(cumap->cm[a].table);
if (cumap->cm[a].premultable) MEM_freeN(cumap->cm[a].premultable);
@@ -112,14 +112,14 @@ CurveMapping *curvemapping_copy(CurveMapping *cumap)
int a;
if (cumap) {
- CurveMapping *cumapn= MEM_dupallocN(cumap);
- for (a=0; a<CM_TOT; a++) {
+ CurveMapping *cumapn = MEM_dupallocN(cumap);
+ for (a = 0; a < CM_TOT; a++) {
if (cumap->cm[a].curve)
- cumapn->cm[a].curve= MEM_dupallocN(cumap->cm[a].curve);
+ cumapn->cm[a].curve = MEM_dupallocN(cumap->cm[a].curve);
if (cumap->cm[a].table)
- cumapn->cm[a].table= MEM_dupallocN(cumap->cm[a].table);
+ cumapn->cm[a].table = MEM_dupallocN(cumap->cm[a].table);
if (cumap->cm[a].premultable)
- cumapn->cm[a].premultable= MEM_dupallocN(cumap->cm[a].premultable);
+ cumapn->cm[a].premultable = MEM_dupallocN(cumap->cm[a].premultable);
}
return cumapn;
}
@@ -135,11 +135,11 @@ void curvemapping_set_black_white(CurveMapping *cumap, const float black[3], con
if (black)
copy_v3_v3(cumap->black, black);
- for (a=0; a<3; a++) {
- if (cumap->white[a]==cumap->black[a])
- cumap->bwmul[a]= 0.0f;
+ for (a = 0; a < 3; a++) {
+ if (cumap->white[a] == cumap->black[a])
+ cumap->bwmul[a] = 0.0f;
else
- cumap->bwmul[a]= 1.0f/(cumap->white[a] - cumap->black[a]);
+ cumap->bwmul[a] = 1.0f / (cumap->white[a] - cumap->black[a]);
}
}
@@ -149,52 +149,52 @@ void curvemapping_set_black_white(CurveMapping *cumap, const float black[3], con
/* removes with flag set */
void curvemap_remove(CurveMap *cuma, int flag)
{
- CurveMapPoint *cmp= MEM_mallocN((cuma->totpoint)*sizeof(CurveMapPoint), "curve points");
- int a, b, removed=0;
+ CurveMapPoint *cmp = MEM_mallocN((cuma->totpoint) * sizeof(CurveMapPoint), "curve points");
+ int a, b, removed = 0;
/* well, lets keep the two outer points! */
- cmp[0]= cuma->curve[0];
- for (a=1, b=1; a<cuma->totpoint-1; a++) {
+ cmp[0] = cuma->curve[0];
+ for (a = 1, b = 1; a < cuma->totpoint - 1; a++) {
if (!(cuma->curve[a].flag & flag)) {
- cmp[b]= cuma->curve[a];
+ cmp[b] = cuma->curve[a];
b++;
}
else removed++;
}
- cmp[b]= cuma->curve[a];
+ cmp[b] = cuma->curve[a];
MEM_freeN(cuma->curve);
- cuma->curve= cmp;
+ cuma->curve = cmp;
cuma->totpoint -= removed;
}
void curvemap_insert(CurveMap *cuma, float x, float y)
{
- CurveMapPoint *cmp= MEM_callocN((cuma->totpoint+1)*sizeof(CurveMapPoint), "curve points");
- int a, b, foundloc= 0;
+ CurveMapPoint *cmp = MEM_callocN((cuma->totpoint + 1) * sizeof(CurveMapPoint), "curve points");
+ int a, b, foundloc = 0;
/* insert fragments of the old one and the new point to the new curve */
cuma->totpoint++;
- for (a=0, b=0; a<cuma->totpoint; a++) {
+ for (a = 0, b = 0; a < cuma->totpoint; a++) {
if ((x < cuma->curve[a].x) && !foundloc) {
- cmp[a].x= x;
- cmp[a].y= y;
- cmp[a].flag= CUMA_SELECT;
- foundloc= 1;
+ cmp[a].x = x;
+ cmp[a].y = y;
+ cmp[a].flag = CUMA_SELECT;
+ foundloc = 1;
}
else {
- cmp[a].x= cuma->curve[b].x;
- cmp[a].y= cuma->curve[b].y;
- cmp[a].flag= cuma->curve[b].flag;
+ cmp[a].x = cuma->curve[b].x;
+ cmp[a].y = cuma->curve[b].y;
+ cmp[a].flag = cuma->curve[b].flag;
cmp[a].flag &= ~CUMA_SELECT; /* make sure old points don't remain selected */
- cmp[a].shorty= cuma->curve[b].shorty;
+ cmp[a].shorty = cuma->curve[b].shorty;
b++;
}
}
/* free old curve and replace it with new one */
MEM_freeN(cuma->curve);
- cuma->curve= cmp;
+ cuma->curve = cmp;
}
void curvemap_reset(CurveMap *cuma, rctf *clipr, int preset, int slope)
@@ -202,93 +202,92 @@ void curvemap_reset(CurveMap *cuma, rctf *clipr, int preset, int slope)
if (cuma->curve)
MEM_freeN(cuma->curve);
- switch(preset) {
- case CURVE_PRESET_LINE: cuma->totpoint= 2; break;
- case CURVE_PRESET_SHARP: cuma->totpoint= 4; break;
- case CURVE_PRESET_SMOOTH: cuma->totpoint= 4; break;
- case CURVE_PRESET_MAX: cuma->totpoint= 2; break;
- case CURVE_PRESET_MID9: cuma->totpoint= 9; break;
- case CURVE_PRESET_ROUND: cuma->totpoint= 4; break;
- case CURVE_PRESET_ROOT: cuma->totpoint= 4; break;
+ switch (preset) {
+ case CURVE_PRESET_LINE: cuma->totpoint = 2; break;
+ case CURVE_PRESET_SHARP: cuma->totpoint = 4; break;
+ case CURVE_PRESET_SMOOTH: cuma->totpoint = 4; break;
+ case CURVE_PRESET_MAX: cuma->totpoint = 2; break;
+ case CURVE_PRESET_MID9: cuma->totpoint = 9; break;
+ case CURVE_PRESET_ROUND: cuma->totpoint = 4; break;
+ case CURVE_PRESET_ROOT: cuma->totpoint = 4; break;
}
- cuma->curve= MEM_callocN(cuma->totpoint*sizeof(CurveMapPoint), "curve points");
+ cuma->curve = MEM_callocN(cuma->totpoint * sizeof(CurveMapPoint), "curve points");
- switch(preset) {
+ switch (preset) {
case CURVE_PRESET_LINE:
- cuma->curve[0].x= clipr->xmin;
- cuma->curve[0].y= clipr->ymax;
- cuma->curve[0].flag= 0;
- cuma->curve[1].x= clipr->xmax;
- cuma->curve[1].y= clipr->ymin;
- cuma->curve[1].flag= 0;
+ cuma->curve[0].x = clipr->xmin;
+ cuma->curve[0].y = clipr->ymax;
+ cuma->curve[0].flag = 0;
+ cuma->curve[1].x = clipr->xmax;
+ cuma->curve[1].y = clipr->ymin;
+ cuma->curve[1].flag = 0;
break;
case CURVE_PRESET_SHARP:
- cuma->curve[0].x= 0;
- cuma->curve[0].y= 1;
- cuma->curve[1].x= 0.25;
- cuma->curve[1].y= 0.50;
- cuma->curve[2].x= 0.75;
- cuma->curve[2].y= 0.04;
- cuma->curve[3].x= 1;
- cuma->curve[3].y= 0;
+ cuma->curve[0].x = 0;
+ cuma->curve[0].y = 1;
+ cuma->curve[1].x = 0.25;
+ cuma->curve[1].y = 0.50;
+ cuma->curve[2].x = 0.75;
+ cuma->curve[2].y = 0.04;
+ cuma->curve[3].x = 1;
+ cuma->curve[3].y = 0;
break;
case CURVE_PRESET_SMOOTH:
- cuma->curve[0].x= 0;
- cuma->curve[0].y= 1;
- cuma->curve[1].x= 0.25;
- cuma->curve[1].y= 0.94;
- cuma->curve[2].x= 0.75;
- cuma->curve[2].y= 0.06;
- cuma->curve[3].x= 1;
- cuma->curve[3].y= 0;
+ cuma->curve[0].x = 0;
+ cuma->curve[0].y = 1;
+ cuma->curve[1].x = 0.25;
+ cuma->curve[1].y = 0.94;
+ cuma->curve[2].x = 0.75;
+ cuma->curve[2].y = 0.06;
+ cuma->curve[3].x = 1;
+ cuma->curve[3].y = 0;
break;
case CURVE_PRESET_MAX:
- cuma->curve[0].x= 0;
- cuma->curve[0].y= 1;
- cuma->curve[1].x= 1;
- cuma->curve[1].y= 1;
+ cuma->curve[0].x = 0;
+ cuma->curve[0].y = 1;
+ cuma->curve[1].x = 1;
+ cuma->curve[1].y = 1;
break;
case CURVE_PRESET_MID9:
- {
- int i;
- for (i=0; i < cuma->totpoint; i++)
- {
- cuma->curve[i].x= i / ((float)cuma->totpoint-1);
- cuma->curve[i].y= 0.5;
- }
+ {
+ int i;
+ for (i = 0; i < cuma->totpoint; i++) {
+ cuma->curve[i].x = i / ((float)cuma->totpoint - 1);
+ cuma->curve[i].y = 0.5;
}
- break;
+ }
+ break;
case CURVE_PRESET_ROUND:
- cuma->curve[0].x= 0;
- cuma->curve[0].y= 1;
- cuma->curve[1].x= 0.5;
- cuma->curve[1].y= 0.90;
- cuma->curve[2].x= 0.86;
- cuma->curve[2].y= 0.5;
- cuma->curve[3].x= 1;
- cuma->curve[3].y= 0;
+ cuma->curve[0].x = 0;
+ cuma->curve[0].y = 1;
+ cuma->curve[1].x = 0.5;
+ cuma->curve[1].y = 0.90;
+ cuma->curve[2].x = 0.86;
+ cuma->curve[2].y = 0.5;
+ cuma->curve[3].x = 1;
+ cuma->curve[3].y = 0;
break;
case CURVE_PRESET_ROOT:
- cuma->curve[0].x= 0;
- cuma->curve[0].y= 1;
- cuma->curve[1].x= 0.25;
- cuma->curve[1].y= 0.95;
- cuma->curve[2].x= 0.75;
- cuma->curve[2].y= 0.44;
- cuma->curve[3].x= 1;
- cuma->curve[3].y= 0;
+ cuma->curve[0].x = 0;
+ cuma->curve[0].y = 1;
+ cuma->curve[1].x = 0.25;
+ cuma->curve[1].y = 0.95;
+ cuma->curve[2].x = 0.75;
+ cuma->curve[2].y = 0.44;
+ cuma->curve[3].x = 1;
+ cuma->curve[3].y = 0;
break;
}
/* mirror curve in x direction to have positive slope
* rather than default negative slope */
if (slope == CURVEMAP_SLOPE_POSITIVE) {
- int i, last=cuma->totpoint-1;
- CurveMapPoint *newpoints= MEM_dupallocN(cuma->curve);
+ int i, last = cuma->totpoint - 1;
+ CurveMapPoint *newpoints = MEM_dupallocN(cuma->curve);
- for (i=0; i<cuma->totpoint; i++) {
- newpoints[i].y = cuma->curve[last-i].y;
+ for (i = 0; i < cuma->totpoint; i++) {
+ newpoints[i].y = cuma->curve[last - i].y;
}
MEM_freeN(cuma->curve);
@@ -297,7 +296,7 @@ void curvemap_reset(CurveMap *cuma, rctf *clipr, int preset, int slope)
if (cuma->table) {
MEM_freeN(cuma->table);
- cuma->table= NULL;
+ cuma->table = NULL;
}
}
@@ -306,7 +305,7 @@ void curvemap_sethandle(CurveMap *cuma, int type)
{
int a;
- for (a=0; a<cuma->totpoint; a++) {
+ for (a = 0; a < cuma->totpoint; a++) {
if (cuma->curve[a].flag & CUMA_SELECT) {
if (type) cuma->curve[a].flag |= CUMA_VECTOR;
else cuma->curve[a].flag &= ~CUMA_VECTOR;
@@ -319,69 +318,69 @@ void curvemap_sethandle(CurveMap *cuma, int type)
/* reduced copy of garbled calchandleNurb() code in curve.c */
static void calchandle_curvemap(BezTriple *bezt, BezTriple *prev, BezTriple *next, int UNUSED(mode))
{
- float *p1,*p2,*p3,pt[3];
- float len,len_a, len_b;
+ float *p1, *p2, *p3, pt[3];
+ float len, len_a, len_b;
float dvec_a[2], dvec_b[2];
- if (bezt->h1==0 && bezt->h2==0) {
+ if (bezt->h1 == 0 && bezt->h2 == 0) {
return;
}
- p2= bezt->vec[1];
+ p2 = bezt->vec[1];
- if (prev==NULL) {
- p3= next->vec[1];
- pt[0]= 2.0f*p2[0] - p3[0];
- pt[1]= 2.0f*p2[1] - p3[1];
- p1= pt;
+ if (prev == NULL) {
+ p3 = next->vec[1];
+ pt[0] = 2.0f * p2[0] - p3[0];
+ pt[1] = 2.0f * p2[1] - p3[1];
+ p1 = pt;
}
else {
- p1= prev->vec[1];
+ p1 = prev->vec[1];
}
- if (next==NULL) {
- p1= prev->vec[1];
- pt[0]= 2.0f*p2[0] - p1[0];
- pt[1]= 2.0f*p2[1] - p1[1];
- p3= pt;
+ if (next == NULL) {
+ p1 = prev->vec[1];
+ pt[0] = 2.0f * p2[0] - p1[0];
+ pt[1] = 2.0f * p2[1] - p1[1];
+ p3 = pt;
}
else {
- p3= next->vec[1];
+ p3 = next->vec[1];
}
sub_v2_v2v2(dvec_a, p2, p1);
sub_v2_v2v2(dvec_b, p3, p2);
- len_a= len_v2(dvec_a);
- len_b= len_v2(dvec_b);
+ len_a = len_v2(dvec_a);
+ len_b = len_v2(dvec_b);
- if (len_a==0.0f) len_a=1.0f;
- if (len_b==0.0f) len_b=1.0f;
+ if (len_a == 0.0f) len_a = 1.0f;
+ if (len_b == 0.0f) len_b = 1.0f;
- if (bezt->h1==HD_AUTO || bezt->h2==HD_AUTO) { /* auto */
+ if (bezt->h1 == HD_AUTO || bezt->h2 == HD_AUTO) { /* auto */
float tvec[2];
- tvec[0]= dvec_b[0]/len_b + dvec_a[0]/len_a;
- tvec[1]= dvec_b[1]/len_b + dvec_a[1]/len_a;
+ tvec[0] = dvec_b[0] / len_b + dvec_a[0] / len_a;
+ tvec[1] = dvec_b[1] / len_b + dvec_a[1] / len_a;
- len= len_v2(tvec) * 2.5614f;
- if (len!=0.0f) {
+ len = len_v2(tvec) * 2.5614f;
+ if (len != 0.0f) {
- if (bezt->h1==HD_AUTO) {
- len_a/=len;
- madd_v2_v2v2fl(p2-3, p2, tvec, -len_a);
+ if (bezt->h1 == HD_AUTO) {
+ len_a /= len;
+ madd_v2_v2v2fl(p2 - 3, p2, tvec, -len_a);
}
- if (bezt->h2==HD_AUTO) {
- len_b/=len;
- madd_v2_v2v2fl(p2+3, p2, tvec, len_b);
+ if (bezt->h2 == HD_AUTO) {
+ len_b /= len;
+ madd_v2_v2v2fl(p2 + 3, p2, tvec, len_b);
}
}
}
- if (bezt->h1==HD_VECT) { /* vector */
- madd_v2_v2v2fl(p2-3, p2, dvec_a, -1.0f/3.0f);
+ if (bezt->h1 == HD_VECT) { /* vector */
+ madd_v2_v2v2fl(p2 - 3, p2, dvec_a, -1.0f / 3.0f);
}
- if (bezt->h2==HD_VECT) {
- madd_v2_v2v2fl(p2+3, p2, dvec_b, 1.0f/3.0f);
+ if (bezt->h2 == HD_VECT) {
+ madd_v2_v2v2fl(p2 + 3, p2, dvec_b, 1.0f / 3.0f);
}
}
@@ -390,27 +389,27 @@ static void calchandle_curvemap(BezTriple *bezt, BezTriple *prev, BezTriple *nex
static float curvemap_calc_extend(CurveMap *cuma, float x, const float first[2], const float last[2])
{
if (x <= first[0]) {
- if ((cuma->flag & CUMA_EXTEND_EXTRAPOLATE)==0) {
+ if ((cuma->flag & CUMA_EXTEND_EXTRAPOLATE) == 0) {
/* no extrapolate */
return first[1];
}
else {
- if (cuma->ext_in[0]==0.0f)
- return first[1] + cuma->ext_in[1]*10000.0f;
+ if (cuma->ext_in[0] == 0.0f)
+ return first[1] + cuma->ext_in[1] * 10000.0f;
else
- return first[1] + cuma->ext_in[1]*(x - first[0])/cuma->ext_in[0];
+ return first[1] + cuma->ext_in[1] * (x - first[0]) / cuma->ext_in[0];
}
}
else if (x >= last[0]) {
- if ((cuma->flag & CUMA_EXTEND_EXTRAPOLATE)==0) {
+ if ((cuma->flag & CUMA_EXTEND_EXTRAPOLATE) == 0) {
/* no extrapolate */
return last[1];
}
else {
- if (cuma->ext_out[0]==0.0f)
- return last[1] - cuma->ext_out[1]*10000.0f;
+ if (cuma->ext_out[0] == 0.0f)
+ return last[1] - cuma->ext_out[1] * 10000.0f;
else
- return last[1] + cuma->ext_out[1]*(x - last[0])/cuma->ext_out[0];
+ return last[1] + cuma->ext_out[1] * (x - last[0]) / cuma->ext_out[0];
}
}
return 0.0f;
@@ -419,74 +418,74 @@ static float curvemap_calc_extend(CurveMap *cuma, float x, const float first[2],
/* only creates a table for a single channel in CurveMapping */
static void curvemap_make_table(CurveMap *cuma, rctf *clipr)
{
- CurveMapPoint *cmp= cuma->curve;
+ CurveMapPoint *cmp = cuma->curve;
BezTriple *bezt;
float *fp, *allpoints, *lastpoint, curf, range;
int a, totpoint;
- if (cuma->curve==NULL) return;
+ if (cuma->curve == NULL) return;
/* default rect also is table range */
- cuma->mintable= clipr->xmin;
- cuma->maxtable= clipr->xmax;
+ cuma->mintable = clipr->xmin;
+ cuma->maxtable = clipr->xmax;
/* hrmf... we now rely on blender ipo beziers, these are more advanced */
- bezt= MEM_callocN(cuma->totpoint*sizeof(BezTriple), "beztarr");
+ bezt = MEM_callocN(cuma->totpoint * sizeof(BezTriple), "beztarr");
- for (a=0; a<cuma->totpoint; a++) {
- cuma->mintable= MIN2(cuma->mintable, cmp[a].x);
- cuma->maxtable= MAX2(cuma->maxtable, cmp[a].x);
- bezt[a].vec[1][0]= cmp[a].x;
- bezt[a].vec[1][1]= cmp[a].y;
+ for (a = 0; a < cuma->totpoint; a++) {
+ cuma->mintable = MIN2(cuma->mintable, cmp[a].x);
+ cuma->maxtable = MAX2(cuma->maxtable, cmp[a].x);
+ bezt[a].vec[1][0] = cmp[a].x;
+ bezt[a].vec[1][1] = cmp[a].y;
if (cmp[a].flag & CUMA_VECTOR)
- bezt[a].h1= bezt[a].h2= HD_VECT;
+ bezt[a].h1 = bezt[a].h2 = HD_VECT;
else
- bezt[a].h1= bezt[a].h2= HD_AUTO;
+ bezt[a].h1 = bezt[a].h2 = HD_AUTO;
}
- for (a=0; a<cuma->totpoint; a++) {
- if (a==0)
- calchandle_curvemap(bezt, NULL, bezt+1, 0);
- else if (a==cuma->totpoint-1)
- calchandle_curvemap(bezt+a, bezt+a-1, NULL, 0);
+ for (a = 0; a < cuma->totpoint; a++) {
+ if (a == 0)
+ calchandle_curvemap(bezt, NULL, bezt + 1, 0);
+ else if (a == cuma->totpoint - 1)
+ calchandle_curvemap(bezt + a, bezt + a - 1, NULL, 0);
else
- calchandle_curvemap(bezt+a, bezt+a-1, bezt+a+1, 0);
+ calchandle_curvemap(bezt + a, bezt + a - 1, bezt + a + 1, 0);
}
/* first and last handle need correction, instead of pointing to center of next/prev,
* we let it point to the closest handle */
- if (cuma->totpoint>2) {
+ if (cuma->totpoint > 2) {
float hlen, nlen, vec[3];
- if (bezt[0].h2==HD_AUTO) {
+ if (bezt[0].h2 == HD_AUTO) {
- hlen= len_v3v3(bezt[0].vec[1], bezt[0].vec[2]); /* original handle length */
+ hlen = len_v3v3(bezt[0].vec[1], bezt[0].vec[2]); /* original handle length */
/* clip handle point */
copy_v3_v3(vec, bezt[1].vec[0]);
if (vec[0] < bezt[0].vec[1][0])
- vec[0]= bezt[0].vec[1][0];
+ vec[0] = bezt[0].vec[1][0];
sub_v3_v3(vec, bezt[0].vec[1]);
- nlen= len_v3(vec);
- if (nlen>FLT_EPSILON) {
- mul_v3_fl(vec, hlen/nlen);
+ nlen = len_v3(vec);
+ if (nlen > FLT_EPSILON) {
+ mul_v3_fl(vec, hlen / nlen);
add_v3_v3v3(bezt[0].vec[2], vec, bezt[0].vec[1]);
sub_v3_v3v3(bezt[0].vec[0], bezt[0].vec[1], vec);
}
}
- a= cuma->totpoint-1;
- if (bezt[a].h2==HD_AUTO) {
+ a = cuma->totpoint - 1;
+ if (bezt[a].h2 == HD_AUTO) {
- hlen= len_v3v3(bezt[a].vec[1], bezt[a].vec[0]); /* original handle length */
+ hlen = len_v3v3(bezt[a].vec[1], bezt[a].vec[0]); /* original handle length */
/* clip handle point */
- copy_v3_v3(vec, bezt[a-1].vec[2]);
+ copy_v3_v3(vec, bezt[a - 1].vec[2]);
if (vec[0] > bezt[a].vec[1][0])
- vec[0]= bezt[a].vec[1][0];
+ vec[0] = bezt[a].vec[1][0];
sub_v3_v3(vec, bezt[a].vec[1]);
- nlen= len_v3(vec);
- if (nlen>FLT_EPSILON) {
- mul_v3_fl(vec, hlen/nlen);
+ nlen = len_v3(vec);
+ if (nlen > FLT_EPSILON) {
+ mul_v3_fl(vec, hlen / nlen);
add_v3_v3v3(bezt[a].vec[0], vec, bezt[a].vec[1]);
sub_v3_v3v3(bezt[a].vec[2], bezt[a].vec[1], vec);
}
@@ -495,63 +494,63 @@ static void curvemap_make_table(CurveMap *cuma, rctf *clipr)
/* make the bezier curve */
if (cuma->table)
MEM_freeN(cuma->table);
- totpoint= (cuma->totpoint-1)*CM_RESOL;
- fp= allpoints= MEM_callocN(totpoint*2*sizeof(float), "table");
+ totpoint = (cuma->totpoint - 1) * CM_RESOL;
+ fp = allpoints = MEM_callocN(totpoint * 2 * sizeof(float), "table");
- for (a=0; a<cuma->totpoint-1; a++, fp += 2*CM_RESOL) {
- correct_bezpart(bezt[a].vec[1], bezt[a].vec[2], bezt[a+1].vec[0], bezt[a+1].vec[1]);
- forward_diff_bezier(bezt[a].vec[1][0], bezt[a].vec[2][0], bezt[a+1].vec[0][0], bezt[a+1].vec[1][0], fp, CM_RESOL-1, 2*sizeof(float));
- forward_diff_bezier(bezt[a].vec[1][1], bezt[a].vec[2][1], bezt[a+1].vec[0][1], bezt[a+1].vec[1][1], fp+1, CM_RESOL-1, 2*sizeof(float));
+ for (a = 0; a < cuma->totpoint - 1; a++, fp += 2 * CM_RESOL) {
+ correct_bezpart(bezt[a].vec[1], bezt[a].vec[2], bezt[a + 1].vec[0], bezt[a + 1].vec[1]);
+ BKE_curve_forward_diff_bezier(bezt[a].vec[1][0], bezt[a].vec[2][0], bezt[a + 1].vec[0][0], bezt[a + 1].vec[1][0], fp, CM_RESOL - 1, 2 * sizeof(float));
+ BKE_curve_forward_diff_bezier(bezt[a].vec[1][1], bezt[a].vec[2][1], bezt[a + 1].vec[0][1], bezt[a + 1].vec[1][1], fp + 1, CM_RESOL - 1, 2 * sizeof(float));
}
/* store first and last handle for extrapolation, unit length */
- cuma->ext_in[0]= bezt[0].vec[0][0] - bezt[0].vec[1][0];
- cuma->ext_in[1]= bezt[0].vec[0][1] - bezt[0].vec[1][1];
- range= sqrt(cuma->ext_in[0]*cuma->ext_in[0] + cuma->ext_in[1]*cuma->ext_in[1]);
- cuma->ext_in[0]/= range;
- cuma->ext_in[1]/= range;
-
- a= cuma->totpoint-1;
- cuma->ext_out[0]= bezt[a].vec[1][0] - bezt[a].vec[2][0];
- cuma->ext_out[1]= bezt[a].vec[1][1] - bezt[a].vec[2][1];
- range= sqrt(cuma->ext_out[0]*cuma->ext_out[0] + cuma->ext_out[1]*cuma->ext_out[1]);
- cuma->ext_out[0]/= range;
- cuma->ext_out[1]/= range;
+ cuma->ext_in[0] = bezt[0].vec[0][0] - bezt[0].vec[1][0];
+ cuma->ext_in[1] = bezt[0].vec[0][1] - bezt[0].vec[1][1];
+ range = sqrt(cuma->ext_in[0] * cuma->ext_in[0] + cuma->ext_in[1] * cuma->ext_in[1]);
+ cuma->ext_in[0] /= range;
+ cuma->ext_in[1] /= range;
+
+ a = cuma->totpoint - 1;
+ cuma->ext_out[0] = bezt[a].vec[1][0] - bezt[a].vec[2][0];
+ cuma->ext_out[1] = bezt[a].vec[1][1] - bezt[a].vec[2][1];
+ range = sqrt(cuma->ext_out[0] * cuma->ext_out[0] + cuma->ext_out[1] * cuma->ext_out[1]);
+ cuma->ext_out[0] /= range;
+ cuma->ext_out[1] /= range;
/* cleanup */
MEM_freeN(bezt);
- range= CM_TABLEDIV*(cuma->maxtable - cuma->mintable);
- cuma->range= 1.0f/range;
+ range = CM_TABLEDIV * (cuma->maxtable - cuma->mintable);
+ cuma->range = 1.0f / range;
/* now make a table with CM_TABLE equal x distances */
- fp= allpoints;
- lastpoint= allpoints + 2*(totpoint-1);
- cmp= MEM_callocN((CM_TABLE+1)*sizeof(CurveMapPoint), "dist table");
-
- for (a=0; a<=CM_TABLE; a++) {
- curf= cuma->mintable + range*(float)a;
- cmp[a].x= curf;
+ fp = allpoints;
+ lastpoint = allpoints + 2 * (totpoint - 1);
+ cmp = MEM_callocN((CM_TABLE + 1) * sizeof(CurveMapPoint), "dist table");
+
+ for (a = 0; a <= CM_TABLE; a++) {
+ curf = cuma->mintable + range * (float)a;
+ cmp[a].x = curf;
/* get the first x coordinate larger than curf */
- while (curf >= fp[0] && fp!=lastpoint) {
- fp+=2;
+ while (curf >= fp[0] && fp != lastpoint) {
+ fp += 2;
}
- if (fp==allpoints || (curf >= fp[0] && fp==lastpoint))
- cmp[a].y= curvemap_calc_extend(cuma, curf, allpoints, lastpoint);
+ if (fp == allpoints || (curf >= fp[0] && fp == lastpoint))
+ cmp[a].y = curvemap_calc_extend(cuma, curf, allpoints, lastpoint);
else {
- float fac1= fp[0] - fp[-2];
- float fac2= fp[0] - curf;
+ float fac1 = fp[0] - fp[-2];
+ float fac2 = fp[0] - curf;
if (fac1 > FLT_EPSILON)
- fac1= fac2/fac1;
+ fac1 = fac2 / fac1;
else
- fac1= 0.0f;
- cmp[a].y= fac1*fp[-1] + (1.0f-fac1)*fp[1];
+ fac1 = 0.0f;
+ cmp[a].y = fac1 * fp[-1] + (1.0f - fac1) * fp[1];
}
}
MEM_freeN(allpoints);
- cuma->table= cmp;
+ cuma->table = cmp;
}
/* call when you do images etc, needs restore too. also verifies tables */
@@ -562,34 +561,34 @@ void curvemapping_premultiply(CurveMapping *cumap, int restore)
if (restore) {
if (cumap->flag & CUMA_PREMULLED) {
- for (a=0; a<3; a++) {
+ for (a = 0; a < 3; a++) {
MEM_freeN(cumap->cm[a].table);
- cumap->cm[a].table= cumap->cm[a].premultable;
- cumap->cm[a].premultable= NULL;
+ cumap->cm[a].table = cumap->cm[a].premultable;
+ cumap->cm[a].premultable = NULL;
}
cumap->flag &= ~CUMA_PREMULLED;
}
}
else {
- if ((cumap->flag & CUMA_PREMULLED)==0) {
+ if ((cumap->flag & CUMA_PREMULLED) == 0) {
/* verify and copy */
- for (a=0; a<3; a++) {
- if (cumap->cm[a].table==NULL)
- curvemap_make_table(cumap->cm+a, &cumap->clipr);
- cumap->cm[a].premultable= cumap->cm[a].table;
- cumap->cm[a].table= MEM_mallocN((CM_TABLE+1)*sizeof(CurveMapPoint), "premul table");
- memcpy(cumap->cm[a].table, cumap->cm[a].premultable, (CM_TABLE+1)*sizeof(CurveMapPoint));
+ for (a = 0; a < 3; a++) {
+ if (cumap->cm[a].table == NULL)
+ curvemap_make_table(cumap->cm + a, &cumap->clipr);
+ cumap->cm[a].premultable = cumap->cm[a].table;
+ cumap->cm[a].table = MEM_mallocN((CM_TABLE + 1) * sizeof(CurveMapPoint), "premul table");
+ memcpy(cumap->cm[a].table, cumap->cm[a].premultable, (CM_TABLE + 1) * sizeof(CurveMapPoint));
}
- if (cumap->cm[3].table==NULL)
- curvemap_make_table(cumap->cm+3, &cumap->clipr);
+ if (cumap->cm[3].table == NULL)
+ curvemap_make_table(cumap->cm + 3, &cumap->clipr);
/* premul */
- for (a=0; a<3; a++) {
+ for (a = 0; a < 3; a++) {
int b;
- for (b=0; b<=CM_TABLE; b++) {
- cumap->cm[a].table[b].y= curvemap_evaluateF(cumap->cm+3, cumap->cm[a].table[b].y);
+ for (b = 0; b <= CM_TABLE; b++) {
+ cumap->cm[a].table[b].y = curvemap_evaluateF(cumap->cm + 3, cumap->cm[a].table[b].y);
}
}
@@ -600,10 +599,10 @@ void curvemapping_premultiply(CurveMapping *cumap, int restore)
static int sort_curvepoints(const void *a1, const void *a2)
{
- const struct CurveMapPoint *x1=a1, *x2=a2;
+ const struct CurveMapPoint *x1 = a1, *x2 = a2;
- if ( x1->x > x2->x ) return 1;
- else if ( x1->x < x2->x) return -1;
+ if (x1->x > x2->x) return 1;
+ else if (x1->x < x2->x) return -1;
return 0;
}
@@ -612,30 +611,30 @@ static int sort_curvepoints(const void *a1, const void *a2)
/* note; only does current curvemap! */
void curvemapping_changed(CurveMapping *cumap, int rem_doubles)
{
- CurveMap *cuma= cumap->cm+cumap->cur;
- CurveMapPoint *cmp= cuma->curve;
- rctf *clipr= &cumap->clipr;
- float thresh= 0.01f*(clipr->xmax - clipr->xmin);
- float dx= 0.0f, dy= 0.0f;
+ CurveMap *cuma = cumap->cm + cumap->cur;
+ CurveMapPoint *cmp = cuma->curve;
+ rctf *clipr = &cumap->clipr;
+ float thresh = 0.01f * (clipr->xmax - clipr->xmin);
+ float dx = 0.0f, dy = 0.0f;
int a;
cumap->changed_timestamp++;
/* clamp with clip */
if (cumap->flag & CUMA_DO_CLIP) {
- for (a=0; a<cuma->totpoint; a++) {
+ for (a = 0; a < cuma->totpoint; a++) {
if (cmp[a].flag & CUMA_SELECT) {
if (cmp[a].x < clipr->xmin)
- dx= MIN2(dx, cmp[a].x - clipr->xmin);
+ dx = MIN2(dx, cmp[a].x - clipr->xmin);
else if (cmp[a].x > clipr->xmax)
- dx= MAX2(dx, cmp[a].x - clipr->xmax);
+ dx = MAX2(dx, cmp[a].x - clipr->xmax);
if (cmp[a].y < clipr->ymin)
- dy= MIN2(dy, cmp[a].y - clipr->ymin);
+ dy = MIN2(dy, cmp[a].y - clipr->ymin);
else if (cmp[a].y > clipr->ymax)
- dy= MAX2(dy, cmp[a].y - clipr->ymax);
+ dy = MAX2(dy, cmp[a].y - clipr->ymax);
}
}
- for (a=0; a<cuma->totpoint; a++) {
+ for (a = 0; a < cuma->totpoint; a++) {
if (cmp[a].flag & CUMA_SELECT) {
cmp[a].x -= dx;
cmp[a].y -= dy;
@@ -647,25 +646,25 @@ void curvemapping_changed(CurveMapping *cumap, int rem_doubles)
qsort(cmp, cuma->totpoint, sizeof(CurveMapPoint), sort_curvepoints);
/* remove doubles, threshold set on 1% of default range */
- if (rem_doubles && cuma->totpoint>2) {
- for (a=0; a<cuma->totpoint-1; a++) {
- dx= cmp[a].x - cmp[a+1].x;
- dy= cmp[a].y - cmp[a+1].y;
- if ( sqrtf(dx*dx + dy*dy) < thresh ) {
- if (a==0) {
- cmp[a+1].flag|= 2;
- if (cmp[a+1].flag & CUMA_SELECT)
+ if (rem_doubles && cuma->totpoint > 2) {
+ for (a = 0; a < cuma->totpoint - 1; a++) {
+ dx = cmp[a].x - cmp[a + 1].x;
+ dy = cmp[a].y - cmp[a + 1].y;
+ if (sqrtf(dx * dx + dy * dy) < thresh) {
+ if (a == 0) {
+ cmp[a + 1].flag |= 2;
+ if (cmp[a + 1].flag & CUMA_SELECT)
cmp[a].flag |= CUMA_SELECT;
}
else {
- cmp[a].flag|= 2;
+ cmp[a].flag |= 2;
if (cmp[a].flag & CUMA_SELECT)
- cmp[a+1].flag |= CUMA_SELECT;
+ cmp[a + 1].flag |= CUMA_SELECT;
}
- break; /* we assume 1 deletion per edit is ok */
+ break; /* we assume 1 deletion per edit is ok */
}
}
- if (a != cuma->totpoint-1)
+ if (a != cuma->totpoint - 1)
curvemap_remove(cuma, 2);
}
curvemap_make_table(cuma, clipr);
@@ -678,31 +677,31 @@ float curvemap_evaluateF(CurveMap *cuma, float value)
int i;
/* index in table */
- fi= (value-cuma->mintable)*cuma->range;
- i= (int)fi;
+ fi = (value - cuma->mintable) * cuma->range;
+ i = (int)fi;
/* fi is table float index and should check against table range i.e. [0.0 CM_TABLE] */
- if (fi<0.0f || fi>CM_TABLE)
+ if (fi < 0.0f || fi > CM_TABLE)
return curvemap_calc_extend(cuma, value, &cuma->table[0].x, &cuma->table[CM_TABLE].x);
else {
- if (i<0) return cuma->table[0].y;
- if (i>=CM_TABLE) return cuma->table[CM_TABLE].y;
+ if (i < 0) return cuma->table[0].y;
+ if (i >= CM_TABLE) return cuma->table[CM_TABLE].y;
- fi= fi-(float)i;
- return (1.0f-fi)*cuma->table[i].y + (fi)*cuma->table[i+1].y;
+ fi = fi - (float)i;
+ return (1.0f - fi) * cuma->table[i].y + (fi) * cuma->table[i + 1].y;
}
}
/* works with curve 'cur' */
float curvemapping_evaluateF(CurveMapping *cumap, int cur, float value)
{
- CurveMap *cuma= cumap->cm+cur;
+ CurveMap *cuma = cumap->cm + cur;
/* allocate or bail out */
- if (cuma->table==NULL) {
+ if (cuma->table == NULL) {
curvemap_make_table(cuma, &cumap->clipr);
- if (cuma->table==NULL)
- return 1.0f-value;
+ if (cuma->table == NULL)
+ return 1.0f - value;
}
return curvemap_evaluateF(cuma, value);
}
@@ -710,17 +709,17 @@ float curvemapping_evaluateF(CurveMapping *cumap, int cur, float value)
/* vector case */
void curvemapping_evaluate3F(CurveMapping *cumap, float vecout[3], const float vecin[3])
{
- vecout[0]= curvemapping_evaluateF(cumap, 0, vecin[0]);
- vecout[1]= curvemapping_evaluateF(cumap, 1, vecin[1]);
- vecout[2]= curvemapping_evaluateF(cumap, 2, vecin[2]);
+ vecout[0] = curvemapping_evaluateF(cumap, 0, vecin[0]);
+ vecout[1] = curvemapping_evaluateF(cumap, 1, vecin[1]);
+ vecout[2] = curvemapping_evaluateF(cumap, 2, vecin[2]);
}
/* RGB case, no black/white points, no premult */
void curvemapping_evaluateRGBF(CurveMapping *cumap, float vecout[3], const float vecin[3])
{
- vecout[0]= curvemapping_evaluateF(cumap, 0, curvemapping_evaluateF(cumap, 3, vecin[0]));
- vecout[1]= curvemapping_evaluateF(cumap, 1, curvemapping_evaluateF(cumap, 3, vecin[1]));
- vecout[2]= curvemapping_evaluateF(cumap, 2, curvemapping_evaluateF(cumap, 3, vecin[2]));
+ vecout[0] = curvemapping_evaluateF(cumap, 0, curvemapping_evaluateF(cumap, 3, vecin[0]));
+ vecout[1] = curvemapping_evaluateF(cumap, 1, curvemapping_evaluateF(cumap, 3, vecin[1]));
+ vecout[2] = curvemapping_evaluateF(cumap, 2, curvemapping_evaluateF(cumap, 3, vecin[2]));
}
@@ -729,14 +728,14 @@ void curvemapping_evaluate_premulRGBF(CurveMapping *cumap, float vecout[3], cons
{
float fac;
- fac= (vecin[0] - cumap->black[0])*cumap->bwmul[0];
- vecout[0]= curvemap_evaluateF(cumap->cm, fac);
+ fac = (vecin[0] - cumap->black[0]) * cumap->bwmul[0];
+ vecout[0] = curvemap_evaluateF(cumap->cm, fac);
- fac= (vecin[1] - cumap->black[1])*cumap->bwmul[1];
- vecout[1]= curvemap_evaluateF(cumap->cm+1, fac);
+ fac = (vecin[1] - cumap->black[1]) * cumap->bwmul[1];
+ vecout[1] = curvemap_evaluateF(cumap->cm + 1, fac);
- fac= (vecin[2] - cumap->black[2])*cumap->bwmul[2];
- vecout[2]= curvemap_evaluateF(cumap->cm+2, fac);
+ fac = (vecin[2] - cumap->black[2]) * cumap->bwmul[2];
+ vecout[2] = curvemap_evaluateF(cumap->cm + 2, fac);
}
@@ -747,14 +746,14 @@ void curvemapping_do_ibuf(CurveMapping *cumap, ImBuf *ibuf)
int pixel;
float *pix_in;
float col[3];
- int stride= 4;
+ int stride = 4;
float *pix_out;
- if (ibuf==NULL)
+ if (ibuf == NULL)
return;
- if (ibuf->rect_float==NULL)
+ if (ibuf->rect_float == NULL)
IMB_float_from_rect(ibuf);
- else if (ibuf->rect==NULL)
+ else if (ibuf->rect == NULL)
imb_addrectImBuf(ibuf);
if (!ibuf->rect || !ibuf->rect_float)
@@ -766,27 +765,27 @@ void curvemapping_do_ibuf(CurveMapping *cumap, ImBuf *ibuf)
curvemapping_premultiply(cumap, 0);
- pix_in= ibuf->rect_float;
- pix_out= tmpbuf->rect_float;
+ pix_in = ibuf->rect_float;
+ pix_out = tmpbuf->rect_float;
if (ibuf->channels)
- stride= ibuf->channels;
+ stride = ibuf->channels;
- for (pixel= ibuf->x*ibuf->y; pixel>0; pixel--, pix_in+=stride, pix_out+=stride) {
- if (stride<3) {
- col[0]= curvemap_evaluateF(cumap->cm, *pix_in);
+ for (pixel = ibuf->x * ibuf->y; pixel > 0; pixel--, pix_in += stride, pix_out += stride) {
+ if (stride < 3) {
+ col[0] = curvemap_evaluateF(cumap->cm, *pix_in);
- pix_out[1]= pix_out[2]= pix_out[3]= pix_out[0]= col[0];
+ pix_out[1] = pix_out[2] = pix_out[3] = pix_out[0] = col[0];
}
else {
curvemapping_evaluate_premulRGBF(cumap, col, pix_in);
- pix_out[0]= col[0];
- pix_out[1]= col[1];
- pix_out[2]= col[2];
- if (stride>3)
- pix_out[3]= pix_in[3];
+ pix_out[0] = col[0];
+ pix_out[1] = col[1];
+ pix_out[2] = col[2];
+ if (stride > 3)
+ pix_out[3] = pix_in[3];
else
- pix_out[3]= 1.f;
+ pix_out[3] = 1.f;
}
}
@@ -801,16 +800,16 @@ int curvemapping_RGBA_does_something(CurveMapping *cumap)
{
int a;
- if (cumap->black[0]!=0.0f) return 1;
- if (cumap->black[1]!=0.0f) return 1;
- if (cumap->black[2]!=0.0f) return 1;
- if (cumap->white[0]!=1.0f) return 1;
- if (cumap->white[1]!=1.0f) return 1;
- if (cumap->white[2]!=1.0f) return 1;
+ if (cumap->black[0] != 0.0f) return 1;
+ if (cumap->black[1] != 0.0f) return 1;
+ if (cumap->black[2] != 0.0f) return 1;
+ if (cumap->white[0] != 1.0f) return 1;
+ if (cumap->white[1] != 1.0f) return 1;
+ if (cumap->white[2] != 1.0f) return 1;
- for (a=0; a<CM_TOT; a++) {
+ for (a = 0; a < CM_TOT; a++) {
if (cumap->cm[a].curve) {
- if (cumap->cm[a].totpoint!=2) return 1;
+ if (cumap->cm[a].totpoint != 2) return 1;
if (cumap->cm[a].curve[0].x != 0.0f) return 1;
if (cumap->cm[a].curve[0].y != 0.0f) return 1;
@@ -825,11 +824,11 @@ void curvemapping_initialize(CurveMapping *cumap)
{
int a;
- if (cumap==NULL) return;
+ if (cumap == NULL) return;
- for (a=0; a<CM_TOT; a++) {
- if (cumap->cm[a].table==NULL)
- curvemap_make_table(cumap->cm+a, &cumap->clipr);
+ for (a = 0; a < CM_TOT; a++) {
+ if (cumap->cm[a].table == NULL)
+ curvemap_make_table(cumap->cm + a, &cumap->clipr);
}
}
@@ -837,29 +836,29 @@ void curvemapping_table_RGBA(CurveMapping *cumap, float **array, int *size)
{
int a;
- *size = CM_TABLE+1;
- *array = MEM_callocN(sizeof(float)*(*size)*4, "CurveMapping");
+ *size = CM_TABLE + 1;
+ *array = MEM_callocN(sizeof(float) * (*size) * 4, "CurveMapping");
curvemapping_initialize(cumap);
- for (a=0; a<*size; a++) {
+ for (a = 0; a < *size; a++) {
if (cumap->cm[0].table)
- (*array)[a*4+0]= cumap->cm[0].table[a].y;
+ (*array)[a * 4 + 0] = cumap->cm[0].table[a].y;
if (cumap->cm[1].table)
- (*array)[a*4+1]= cumap->cm[1].table[a].y;
+ (*array)[a * 4 + 1] = cumap->cm[1].table[a].y;
if (cumap->cm[2].table)
- (*array)[a*4+2]= cumap->cm[2].table[a].y;
+ (*array)[a * 4 + 2] = cumap->cm[2].table[a].y;
if (cumap->cm[3].table)
- (*array)[a*4+3]= cumap->cm[3].table[a].y;
+ (*array)[a * 4 + 3] = cumap->cm[3].table[a].y;
}
}
/* ***************** Histogram **************** */
-#define INV_255 (1.f/255.f)
+#define INV_255 (1.f / 255.f)
DO_INLINE int get_bin_float(float f)
{
- int bin= (int)((f*255.0f) + 0.5f); /* 0.5 to prevent quantisation differences */
+ int bin = (int)((f * 255.0f) + 0.5f); /* 0.5 to prevent quantisation differences */
/* note: clamp integer instead of float to avoid problems with NaN */
CLAMP(bin, 0, 255);
@@ -908,17 +907,17 @@ void scopes_update(Scopes *scopes, ImBuf *ibuf, int use_color_management)
int x, y, c;
unsigned int n, nl;
double div, divl;
- float *rf=NULL;
- unsigned char *rc=NULL;
+ float *rf = NULL;
+ unsigned char *rc = NULL;
unsigned int *bin_r, *bin_g, *bin_b, *bin_lum;
int savedlines, saveline;
float rgb[3], ycc[3], luma;
- int ycc_mode=-1;
+ int ycc_mode = -1;
const short is_float = (ibuf->rect_float != NULL);
- if (ibuf->rect==NULL && ibuf->rect_float==NULL) return;
+ if (ibuf->rect == NULL && ibuf->rect_float == NULL) return;
- if (scopes->ok == 1 ) return;
+ if (scopes->ok == 1) return;
if (scopes->hist.ymax == 0.f) scopes->hist.ymax = 1.f;
@@ -951,19 +950,19 @@ void scopes_update(Scopes *scopes, ImBuf *ibuf, int use_color_management)
bin_lum = MEM_callocN(256 * sizeof(unsigned int), "temp historgram bins");
/* convert to number of lines with logarithmic scale */
- scopes->sample_lines = (scopes->accuracy*0.01f) * (scopes->accuracy*0.01f) * ibuf->y;
+ scopes->sample_lines = (scopes->accuracy * 0.01f) * (scopes->accuracy * 0.01f) * ibuf->y;
if (scopes->sample_full)
scopes->sample_lines = ibuf->y;
/* scan the image */
- savedlines=0;
- for (c=0; c<3; c++) {
- scopes->minmax[c][0]=25500.0f;
- scopes->minmax[c][1]=-25500.0f;
+ savedlines = 0;
+ for (c = 0; c < 3; c++) {
+ scopes->minmax[c][0] = 25500.0f;
+ scopes->minmax[c][1] = -25500.0f;
}
- scopes->waveform_tot = ibuf->x*scopes->sample_lines;
+ scopes->waveform_tot = ibuf->x * scopes->sample_lines;
if (scopes->waveform_1)
MEM_freeN(scopes->waveform_1);
@@ -974,10 +973,10 @@ void scopes_update(Scopes *scopes, ImBuf *ibuf, int use_color_management)
if (scopes->vecscope)
MEM_freeN(scopes->vecscope);
- scopes->waveform_1= MEM_callocN(scopes->waveform_tot * 2 * sizeof(float), "waveform point channel 1");
- scopes->waveform_2= MEM_callocN(scopes->waveform_tot * 2 * sizeof(float), "waveform point channel 2");
- scopes->waveform_3= MEM_callocN(scopes->waveform_tot * 2 * sizeof(float), "waveform point channel 3");
- scopes->vecscope= MEM_callocN(scopes->waveform_tot * 2 * sizeof(float), "vectorscope point channel");
+ scopes->waveform_1 = MEM_callocN(scopes->waveform_tot * 2 * sizeof(float), "waveform point channel 1");
+ scopes->waveform_2 = MEM_callocN(scopes->waveform_tot * 2 * sizeof(float), "waveform point channel 2");
+ scopes->waveform_3 = MEM_callocN(scopes->waveform_tot * 2 * sizeof(float), "waveform point channel 3");
+ scopes->vecscope = MEM_callocN(scopes->waveform_tot * 2 * sizeof(float), "vectorscope point channel");
if (is_float)
rf = ibuf->rect_float;
@@ -985,7 +984,7 @@ void scopes_update(Scopes *scopes, ImBuf *ibuf, int use_color_management)
rc = (unsigned char *)ibuf->rect;
for (y = 0; y < ibuf->y; y++) {
- if (savedlines<scopes->sample_lines && y>=((savedlines)*ibuf->y)/(scopes->sample_lines+1)) {
+ if (savedlines < scopes->sample_lines && y >= ((savedlines) * ibuf->y) / (scopes->sample_lines + 1)) {
saveline = 1;
}
else {
@@ -1000,7 +999,7 @@ void scopes_update(Scopes *scopes, ImBuf *ibuf, int use_color_management)
copy_v3_v3(rgb, rf);
}
else {
- for (c=0; c<3; c++)
+ for (c = 0; c < 3; c++)
rgb[c] = rc[c] * INV_255;
}
@@ -1008,44 +1007,44 @@ void scopes_update(Scopes *scopes, ImBuf *ibuf, int use_color_management)
luma = rgb_to_luma(rgb);
/* check for min max */
- if (ycc_mode == -1 ) {
- for (c=0; c<3; c++) {
+ if (ycc_mode == -1) {
+ for (c = 0; c < 3; c++) {
if (rgb[c] < scopes->minmax[c][0]) scopes->minmax[c][0] = rgb[c];
if (rgb[c] > scopes->minmax[c][1]) scopes->minmax[c][1] = rgb[c];
}
}
else {
- rgb_to_ycc(rgb[0],rgb[1],rgb[2],&ycc[0],&ycc[1],&ycc[2], ycc_mode);
- for (c=0; c<3; c++) {
- ycc[c] *=INV_255;
+ rgb_to_ycc(rgb[0], rgb[1], rgb[2], &ycc[0], &ycc[1], &ycc[2], ycc_mode);
+ for (c = 0; c < 3; c++) {
+ ycc[c] *= INV_255;
if (ycc[c] < scopes->minmax[c][0]) scopes->minmax[c][0] = ycc[c];
if (ycc[c] > scopes->minmax[c][1]) scopes->minmax[c][1] = ycc[c];
}
}
/* increment count for histo*/
- bin_r[ get_bin_float(rgb[0]) ] += 1;
- bin_g[ get_bin_float(rgb[1]) ] += 1;
- bin_b[ get_bin_float(rgb[2]) ] += 1;
- bin_lum[ get_bin_float(luma) ] += 1;
+ bin_r[get_bin_float(rgb[0])] += 1;
+ bin_g[get_bin_float(rgb[1])] += 1;
+ bin_b[get_bin_float(rgb[2])] += 1;
+ bin_lum[get_bin_float(luma)] += 1;
/* save sample if needed */
if (saveline) {
const float fx = (float)x / (float)ibuf->x;
- const int idx = 2*(ibuf->x*savedlines+x);
+ const int idx = 2 * (ibuf->x * savedlines + x);
save_sample_line(scopes, idx, fx, rgb, ycc);
}
- rf+= ibuf->channels;
- rc+= ibuf->channels;
+ rf += ibuf->channels;
+ rc += ibuf->channels;
}
if (saveline)
- savedlines +=1;
+ savedlines += 1;
}
/* convert hist data to float (proportional to max count) */
- n=0;
- nl=0;
- for (x=0; x<256; x++) {
+ n = 0;
+ nl = 0;
+ for (x = 0; x < 256; x++) {
if (bin_r[x] > n)
n = bin_r[x];
if (bin_g[x] > n)
@@ -1055,9 +1054,9 @@ void scopes_update(Scopes *scopes, ImBuf *ibuf, int use_color_management)
if (bin_lum[x] > nl)
nl = bin_lum[x];
}
- div = 1.0/(double)n;
- divl = 1.0/(double)nl;
- for (x=0; x<256; x++) {
+ div = 1.0 / (double)n;
+ divl = 1.0 / (double)nl;
+ for (x = 0; x < 256; x++) {
scopes->hist.data_r[x] = bin_r[x] * div;
scopes->hist.data_g[x] = bin_g[x] * div;
scopes->hist.data_b[x] = bin_b[x] * div;
@@ -1093,14 +1092,14 @@ void scopes_free(Scopes *scopes)
void scopes_new(Scopes *scopes)
{
- scopes->accuracy=30.0;
- scopes->hist.mode=HISTO_MODE_RGB;
- scopes->wavefrm_alpha=0.3;
- scopes->vecscope_alpha=0.3;
- scopes->wavefrm_height= 100;
- scopes->vecscope_height= 100;
- scopes->hist.height= 100;
- scopes->ok= 0;
+ scopes->accuracy = 30.0;
+ scopes->hist.mode = HISTO_MODE_RGB;
+ scopes->wavefrm_alpha = 0.3;
+ scopes->vecscope_alpha = 0.3;
+ scopes->wavefrm_height = 100;
+ scopes->vecscope_height = 100;
+ scopes->hist.height = 100;
+ scopes->ok = 0;
scopes->waveform_1 = NULL;
scopes->waveform_2 = NULL;
scopes->waveform_3 = NULL;
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index 0a6e8a163cc..868da0fda94 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -69,7 +69,7 @@
#include "BKE_constraint.h"
#include "BKE_displist.h"
#include "BKE_deform.h"
-#include "BKE_DerivedMesh.h" /* for geometry targets */
+#include "BKE_DerivedMesh.h" /* for geometry targets */
#include "BKE_cdderivedmesh.h" /* for geometry targets */
#include "BKE_object.h"
#include "BKE_ipo.h"
@@ -90,7 +90,7 @@
#endif
#ifndef M_PI
-#define M_PI 3.14159265358979323846
+#define M_PI 3.14159265358979323846
#endif
@@ -104,7 +104,7 @@
/* -------------- Naming -------------- */
/* Find the first available, non-duplicate name for a given constraint */
-void unique_constraint_name (bConstraint *con, ListBase *list)
+void unique_constraint_name(bConstraint *con, ListBase *list)
{
BLI_uniquename(list, con, "Const", '.', offsetof(bConstraint, name), sizeof(con->name));
}
@@ -113,15 +113,15 @@ void unique_constraint_name (bConstraint *con, ListBase *list)
/* package an object/bone for use in constraint evaluation */
/* This function MEM_calloc's a bConstraintOb struct, that will need to be freed after evaluation */
-bConstraintOb *constraints_make_evalob (Scene *scene, Object *ob, void *subdata, short datatype)
+bConstraintOb *constraints_make_evalob(Scene *scene, Object *ob, void *subdata, short datatype)
{
bConstraintOb *cob;
/* create regardless of whether we have any data! */
- cob= MEM_callocN(sizeof(bConstraintOb), "bConstraintOb");
+ cob = MEM_callocN(sizeof(bConstraintOb), "bConstraintOb");
/* for system time, part of deglobalization, code nicer later with local time (ton) */
- cob->scene= scene;
+ cob->scene = scene;
/* based on type of available data */
switch (datatype) {
@@ -139,7 +139,7 @@ bConstraintOb *constraints_make_evalob (Scene *scene, Object *ob, void *subdata,
copy_m4_m4(cob->startmat, cob->matrix);
}
- break;
+ break;
case CONSTRAINT_OBTYPE_BONE:
{
/* only set if we have valid bone, otherwise default */
@@ -150,11 +150,11 @@ bConstraintOb *constraints_make_evalob (Scene *scene, Object *ob, void *subdata,
if (cob->pchan->rotmode > 0) {
/* should be some type of Euler order */
- cob->rotOrder= cob->pchan->rotmode;
+ cob->rotOrder = cob->pchan->rotmode;
}
else {
/* Quats, so eulers should just use default order */
- cob->rotOrder= EULER_ORDER_DEFAULT;
+ cob->rotOrder = EULER_ORDER_DEFAULT;
}
/* matrix in world-space */
@@ -165,7 +165,7 @@ bConstraintOb *constraints_make_evalob (Scene *scene, Object *ob, void *subdata,
copy_m4_m4(cob->startmat, cob->matrix);
}
- break;
+ break;
default: /* other types not yet handled */
unit_m4(cob->matrix);
@@ -177,7 +177,7 @@ bConstraintOb *constraints_make_evalob (Scene *scene, Object *ob, void *subdata,
}
/* cleanup after constraint evaluation */
-void constraints_clear_evalob (bConstraintOb *cob)
+void constraints_clear_evalob(bConstraintOb *cob)
{
float delta[4][4], imat[4][4];
@@ -202,7 +202,7 @@ void constraints_clear_evalob (bConstraintOb *cob)
invert_m4_m4(cob->ob->constinv, delta);
}
}
- break;
+ break;
case CONSTRAINT_OBTYPE_BONE:
{
/* cob->ob or cob->pchan might not exist */
@@ -214,7 +214,7 @@ void constraints_clear_evalob (bConstraintOb *cob)
invert_m4_m4(cob->pchan->constinv, delta);
}
}
- break;
+ break;
}
/* free tempolary struct */
@@ -272,13 +272,13 @@ static void constraint_pchan_diff_mat(bPoseChannel *pchan, float diff_mat[4][4])
* of a matrix from one space to another for constraint evaluation.
* For now, this is only implemented for Objects and PoseChannels.
*/
-void constraint_mat_convertspace (Object *ob, bPoseChannel *pchan, float mat[][4], short from, short to)
+void constraint_mat_convertspace(Object *ob, bPoseChannel *pchan, float mat[][4], short from, short to)
{
float diff_mat[4][4];
float imat[4][4];
/* prevent crashes in these unlikely events */
- if (ob==NULL || mat==NULL) return;
+ if (ob == NULL || mat == NULL) return;
/* optimize trick - check if need to do anything */
if (from == to) return;
@@ -298,8 +298,8 @@ void constraint_mat_convertspace (Object *ob, bPoseChannel *pchan, float mat[][4
constraint_mat_convertspace(ob, pchan, mat, CONSTRAINT_SPACE_POSE, to);
}
}
- break;
- case CONSTRAINT_SPACE_POSE: /* ---------- FROM POSESPACE ---------- */
+ break;
+ case CONSTRAINT_SPACE_POSE: /* ---------- FROM POSESPACE ---------- */
{
/* pose to world */
if (to == CONSTRAINT_SPACE_WORLD) {
@@ -308,7 +308,7 @@ void constraint_mat_convertspace (Object *ob, bPoseChannel *pchan, float mat[][4
/* pose to local */
else if (to == CONSTRAINT_SPACE_LOCAL) {
if (pchan->bone) {
- armature_mat_pose_to_bone(pchan, mat, mat);
+ BKE_armature_mat_pose_to_bone(pchan, mat, mat);
#if 0 /* XXX Old code, will remove it later. */
constraint_pchan_diff_mat(pchan, diff_mat);
@@ -317,7 +317,7 @@ void constraint_mat_convertspace (Object *ob, bPoseChannel *pchan, float mat[][4
/* override with local location */
if ((pchan->parent) && (pchan->bone->flag & BONE_NO_LOCAL_LOCATION)) {
- armature_mat_pose_to_bone_ex(ob, pchan, pchan->pose_mat, tempmat);
+ BKE_armature_mat_pose_to_bone_ex(ob, pchan, pchan->pose_mat, tempmat);
copy_v3_v3(mat[3], tempmat[3]);
}
#endif
@@ -331,13 +331,13 @@ void constraint_mat_convertspace (Object *ob, bPoseChannel *pchan, float mat[][4
}
}
}
- break;
+ break;
case CONSTRAINT_SPACE_LOCAL: /* ------------ FROM LOCALSPACE --------- */
{
/* local to pose - do inverse procedure that was done for pose to local */
if (pchan->bone) {
/* we need the posespace_matrix = local_matrix + (parent_posespace_matrix + restpos) */
- armature_mat_bone_to_pose(pchan, mat, mat);
+ BKE_armature_mat_bone_to_pose(pchan, mat, mat);
#if 0
constraint_pchan_diff_mat(pchan, diff_mat);
@@ -351,7 +351,7 @@ void constraint_mat_convertspace (Object *ob, bPoseChannel *pchan, float mat[][4
constraint_mat_convertspace(ob, pchan, mat, CONSTRAINT_SPACE_POSE, to);
}
}
- break;
+ break;
case CONSTRAINT_SPACE_PARLOCAL: /* -------------- FROM LOCAL WITH PARENT ---------- */
{
/* local + parent to pose */
@@ -366,12 +366,12 @@ void constraint_mat_convertspace (Object *ob, bPoseChannel *pchan, float mat[][4
constraint_mat_convertspace(ob, pchan, mat, CONSTRAINT_SPACE_POSE, to);
}
}
- break;
+ break;
}
}
else {
/* objects */
- if (from==CONSTRAINT_SPACE_WORLD && to==CONSTRAINT_SPACE_LOCAL) {
+ if (from == CONSTRAINT_SPACE_WORLD && to == CONSTRAINT_SPACE_LOCAL) {
/* check if object has a parent */
if (ob->parent) {
/* 'subtract' parent's effects from owner */
@@ -383,7 +383,7 @@ void constraint_mat_convertspace (Object *ob, bPoseChannel *pchan, float mat[][4
/* Local space in this case will have to be defined as local to the owner's
* transform-property-rotated axes. So subtract this rotation component.
*/
- object_to_mat4(ob, diff_mat);
+ BKE_object_to_mat4(ob, diff_mat);
normalize_m4(diff_mat);
zero_v3(diff_mat[3]);
@@ -391,7 +391,7 @@ void constraint_mat_convertspace (Object *ob, bPoseChannel *pchan, float mat[][4
mult_m4_m4m4(mat, imat, mat);
}
}
- else if (from==CONSTRAINT_SPACE_LOCAL && to==CONSTRAINT_SPACE_WORLD) {
+ else if (from == CONSTRAINT_SPACE_LOCAL && to == CONSTRAINT_SPACE_WORLD) {
/* check that object has a parent - otherwise this won't work */
if (ob->parent) {
/* 'add' parent's effect back to owner */
@@ -402,7 +402,7 @@ void constraint_mat_convertspace (Object *ob, bPoseChannel *pchan, float mat[][4
/* Local space in this case will have to be defined as local to the owner's
* transform-property-rotated axes. So add back this rotation component.
*/
- object_to_mat4(ob, diff_mat);
+ BKE_object_to_mat4(ob, diff_mat);
normalize_m4(diff_mat);
zero_v3(diff_mat[3]);
@@ -415,15 +415,15 @@ void constraint_mat_convertspace (Object *ob, bPoseChannel *pchan, float mat[][4
/* ------------ General Target Matrix Tools ---------- */
/* function that sets the given matrix based on given vertex group in mesh */
-static void contarget_get_mesh_mat (Object *ob, const char *substring, float mat[][4])
+static void contarget_get_mesh_mat(Object *ob, const char *substring, float mat[][4])
{
DerivedMesh *dm = NULL;
- Mesh *me= ob->data;
+ Mesh *me = ob->data;
BMEditMesh *em = me->edit_btmesh;
float vec[3] = {0.0f, 0.0f, 0.0f};
float normal[3] = {0.0f, 0.0f, 0.0f}, plane[3];
float imat[3][3], tmat[3][3];
- const int defgroup= defgroup_name_index(ob, substring);
+ const int defgroup = defgroup_name_index(ob, substring);
short freeDM = 0;
/* initialize target matrix using target matrix */
@@ -436,7 +436,7 @@ static void contarget_get_mesh_mat (Object *ob, const char *substring, float mat
if (em) {
/* target is in editmode, so get a special derived mesh */
dm = CDDM_from_BMEditMesh(em, ob->data, FALSE, FALSE);
- freeDM= 1;
+ freeDM = 1;
}
else {
/* when not in EditMode, use the 'final' derived mesh, depsgraph
@@ -454,10 +454,10 @@ static void contarget_get_mesh_mat (Object *ob, const char *substring, float mat
/* check that dvert is a valid pointers (just in case) */
if (dvert) {
- MDeformVert *dv= dvert;
+ MDeformVert *dv = dvert;
/* get the average of all verts with that are in the vertex-group */
for (i = 0; i < numVerts; i++, dv++) {
- MDeformWeight *dw= defvert_find_index(dv, defgroup);
+ MDeformWeight *dw = defvert_find_index(dv, defgroup);
if (dw && dw->weight != 0.0f) {
dm->getVertCo(dm, i, co);
dm->getVertNo(dm, i, nor);
@@ -512,20 +512,20 @@ static void contarget_get_mesh_mat (Object *ob, const char *substring, float mat
}
/* function that sets the given matrix based on given vertex group in lattice */
-static void contarget_get_lattice_mat (Object *ob, const char *substring, float mat[][4])
+static void contarget_get_lattice_mat(Object *ob, const char *substring, float mat[][4])
{
- Lattice *lt= (Lattice *)ob->data;
+ Lattice *lt = (Lattice *)ob->data;
- DispList *dl = find_displist(&ob->disp, DL_VERTS);
- float *co = dl?dl->verts:NULL;
+ DispList *dl = BKE_displist_find(&ob->disp, DL_VERTS);
+ float *co = dl ? dl->verts : NULL;
BPoint *bp = lt->def;
MDeformVert *dv = lt->dvert;
- int tot_verts= lt->pntsu*lt->pntsv*lt->pntsw;
- float vec[3]= {0.0f, 0.0f, 0.0f}, tvec[3];
- int grouped=0;
+ int tot_verts = lt->pntsu * lt->pntsv * lt->pntsw;
+ float vec[3] = {0.0f, 0.0f, 0.0f}, tvec[3];
+ int grouped = 0;
int i, n;
- const int defgroup= defgroup_name_index(ob, substring);
+ const int defgroup = defgroup_name_index(ob, substring);
/* initialize target matrix using target matrix */
copy_m4_m4(mat, ob->obmat);
@@ -537,9 +537,9 @@ static void contarget_get_lattice_mat (Object *ob, const char *substring, float
/* 1. Loop through control-points checking if in nominated vertex-group.
* 2. If it is, add it to vec to find the average point.
*/
- for (i=0; i < tot_verts; i++, dv++) {
- for (n= 0; n < dv->totweight; n++) {
- MDeformWeight *dw= defvert_find_index(dv, defgroup);
+ for (i = 0; i < tot_verts; i++, dv++) {
+ for (n = 0; n < dv->totweight; n++) {
+ MDeformWeight *dw = defvert_find_index(dv, defgroup);
if (dw && dw->weight > 0.0f) {
/* copy coordinates of point to temporary vector, then add to find average */
memcpy(tvec, co ? co : bp->vec, 3 * sizeof(float));
@@ -551,7 +551,7 @@ static void contarget_get_lattice_mat (Object *ob, const char *substring, float
/* advance pointer to coordinate data */
if (co) co += 3;
- else bp++;
+ else bp++;
}
/* find average location, then multiply by ob->obmat to find world-space location */
@@ -565,14 +565,14 @@ static void contarget_get_lattice_mat (Object *ob, const char *substring, float
/* generic function to get the appropriate matrix for most target cases */
/* The cases where the target can be object data have not been implemented */
-static void constraint_target_to_mat4 (Object *ob, const char *substring, float mat[][4], short from, short to, float headtail)
+static void constraint_target_to_mat4(Object *ob, const char *substring, float mat[][4], short from, short to, float headtail)
{
/* Case OBJECT */
if (!strlen(substring)) {
copy_m4_m4(mat, ob->obmat);
constraint_mat_convertspace(ob, NULL, mat, from, to);
}
- /* Case VERTEXGROUP */
+ /* Case VERTEXGROUP */
/* Current method just takes the average location of all the points in the
* VertexGroup, and uses that as the location value of the targets. Where
* possible, the orientation will also be calculated, by calculating an
@@ -593,7 +593,7 @@ static void constraint_target_to_mat4 (Object *ob, const char *substring, float
else {
bPoseChannel *pchan;
- pchan = get_pose_channel(ob->pose, substring);
+ pchan = BKE_pose_channel_find_name(ob->pose, substring);
if (pchan) {
/* Multiply the PoseSpace accumulation/final matrix for this
* PoseChannel by the Armature Object's Matrix to get a worldspace
@@ -631,14 +631,14 @@ static void constraint_target_to_mat4 (Object *ob, const char *substring, float
*/
/* Template for type-info data:
- * - make a copy of this when creating new constraints, and just change the functions
- * pointed to as necessary
- * - although the naming of functions doesn't matter, it would help for code
- * readability, to follow the same naming convention as is presented here
- * - any functions that a constraint doesn't need to define, don't define
- * for such cases, just use NULL
- * - these should be defined after all the functions have been defined, so that
- * forward-definitions/prototypes don't need to be used!
+ * - make a copy of this when creating new constraints, and just change the functions
+ * pointed to as necessary
+ * - although the naming of functions doesn't matter, it would help for code
+ * readability, to follow the same naming convention as is presented here
+ * - any functions that a constraint doesn't need to define, don't define
+ * for such cases, just use NULL
+ * - these should be defined after all the functions have been defined, so that
+ * forward-definitions/prototypes don't need to be used!
* - keep this copy #if-def'd so that future constraints can get based off this
*/
#if 0
@@ -648,7 +648,6 @@ static bConstraintTypeInfo CTI_CONSTRNAME = {
"ConstrName", /* name */
"bConstrNameConstraint", /* struct name */
constrname_free, /* free data */
- constrname_relink, /* relink data */
constrname_id_looper, /* id looper */
constrname_copy, /* copy data */
constrname_new_data, /* new data */
@@ -662,7 +661,7 @@ static bConstraintTypeInfo CTI_CONSTRNAME = {
/* This function should be used for the get_target_matrix member of all
* constraints that are not picky about what happens to their target matrix.
*/
-static void default_get_tarmat (bConstraint *con, bConstraintOb *UNUSED(cob), bConstraintTarget *ct, float UNUSED(ctime))
+static void default_get_tarmat(bConstraint *con, bConstraintOb *UNUSED(cob), bConstraintTarget *ct, float UNUSED(ctime))
{
if (VALID_CONS_TARGET(ct))
constraint_target_to_mat4(ct->tar, ct->subtarget, ct->matrix, CONSTRAINT_SPACE_WORLD, ct->space, con->headtail);
@@ -678,26 +677,26 @@ static void default_get_tarmat (bConstraint *con, bConstraintOb *UNUSED(cob), bC
// TODO: cope with getting rotation order...
#define SINGLETARGET_GET_TARS(con, datatar, datasubtarget, ct, list) \
{ \
- ct= MEM_callocN(sizeof(bConstraintTarget), "tempConstraintTarget"); \
+ ct = MEM_callocN(sizeof(bConstraintTarget), "tempConstraintTarget"); \
\
- ct->tar= datatar; \
+ ct->tar = datatar; \
BLI_strncpy(ct->subtarget, datasubtarget, sizeof(ct->subtarget)); \
- ct->space= con->tarspace; \
- ct->flag= CONSTRAINT_TAR_TEMP; \
+ ct->space = con->tarspace; \
+ ct->flag = CONSTRAINT_TAR_TEMP; \
\
if (ct->tar) { \
- if ((ct->tar->type==OB_ARMATURE) && (ct->subtarget[0])) { \
- bPoseChannel *pchan= get_pose_channel(ct->tar->pose, ct->subtarget); \
+ if ((ct->tar->type == OB_ARMATURE) && (ct->subtarget[0])) { \
+ bPoseChannel *pchan = BKE_pose_channel_find_name(ct->tar->pose, ct->subtarget); \
ct->type = CONSTRAINT_OBTYPE_BONE; \
- ct->rotOrder= (pchan) ? (pchan->rotmode) : EULER_ORDER_DEFAULT; \
- }\
+ ct->rotOrder = (pchan) ? (pchan->rotmode) : EULER_ORDER_DEFAULT; \
+ } \
else if (OB_TYPE_SUPPORT_VGROUP(ct->tar->type) && (ct->subtarget[0])) { \
ct->type = CONSTRAINT_OBTYPE_VERT; \
ct->rotOrder = EULER_ORDER_DEFAULT; \
} \
- else {\
+ else { \
ct->type = CONSTRAINT_OBTYPE_OBJECT; \
- ct->rotOrder= ct->tar->rotmode; \
+ ct->rotOrder = ct->tar->rotmode; \
} \
} \
\
@@ -712,11 +711,11 @@ static void default_get_tarmat (bConstraint *con, bConstraintOb *UNUSED(cob), bC
// TODO: cope with getting rotation order...
#define SINGLETARGETNS_GET_TARS(con, datatar, ct, list) \
{ \
- ct= MEM_callocN(sizeof(bConstraintTarget), "tempConstraintTarget"); \
+ ct = MEM_callocN(sizeof(bConstraintTarget), "tempConstraintTarget"); \
\
- ct->tar= datatar; \
- ct->space= con->tarspace; \
- ct->flag= CONSTRAINT_TAR_TEMP; \
+ ct->tar = datatar; \
+ ct->space = con->tarspace; \
+ ct->flag = CONSTRAINT_TAR_TEMP; \
\
if (ct->tar) ct->type = CONSTRAINT_OBTYPE_OBJECT; \
\
@@ -734,13 +733,13 @@ static void default_get_tarmat (bConstraint *con, bConstraintOb *UNUSED(cob), bC
if (ct) { \
bConstraintTarget *ctn = ct->next; \
if (nocopy == 0) { \
- datatar= ct->tar; \
+ datatar = ct->tar; \
BLI_strncpy(datasubtarget, ct->subtarget, sizeof(datasubtarget)); \
- con->tarspace= (char)ct->space; \
+ con->tarspace = (char)ct->space; \
} \
\
BLI_freelinkN(list, ct); \
- ct= ctn; \
+ ct = ctn; \
} \
}
@@ -755,39 +754,39 @@ static void default_get_tarmat (bConstraint *con, bConstraintOb *UNUSED(cob), bC
if (ct) { \
bConstraintTarget *ctn = ct->next; \
if (nocopy == 0) { \
- datatar= ct->tar; \
- con->tarspace= (char)ct->space; \
+ datatar = ct->tar; \
+ con->tarspace = (char)ct->space; \
} \
\
BLI_freelinkN(list, ct); \
- ct= ctn; \
+ ct = ctn; \
} \
}
/* --------- ChildOf Constraint ------------ */
-static void childof_new_data (void *cdata)
+static void childof_new_data(void *cdata)
{
- bChildOfConstraint *data= (bChildOfConstraint *)cdata;
+ bChildOfConstraint *data = (bChildOfConstraint *)cdata;
data->flag = (CHILDOF_LOCX | CHILDOF_LOCY | CHILDOF_LOCZ |
- CHILDOF_ROTX |CHILDOF_ROTY | CHILDOF_ROTZ |
- CHILDOF_SIZEX | CHILDOF_SIZEY | CHILDOF_SIZEZ);
+ CHILDOF_ROTX | CHILDOF_ROTY | CHILDOF_ROTZ |
+ CHILDOF_SIZEX | CHILDOF_SIZEY | CHILDOF_SIZEZ);
unit_m4(data->invmat);
}
-static void childof_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
+static void childof_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
{
- bChildOfConstraint *data= con->data;
+ bChildOfConstraint *data = con->data;
/* target only */
- func(con, (ID**)&data->tar, userdata);
+ func(con, (ID **)&data->tar, FALSE, userdata);
}
-static int childof_get_tars (bConstraint *con, ListBase *list)
+static int childof_get_tars(bConstraint *con, ListBase *list)
{
if (con && list) {
- bChildOfConstraint *data= con->data;
+ bChildOfConstraint *data = con->data;
bConstraintTarget *ct;
/* standard target-getting macro for single-target constraints */
@@ -799,21 +798,21 @@ static int childof_get_tars (bConstraint *con, ListBase *list)
return 0;
}
-static void childof_flush_tars (bConstraint *con, ListBase *list, short nocopy)
+static void childof_flush_tars(bConstraint *con, ListBase *list, short nocopy)
{
if (con && list) {
- bChildOfConstraint *data= con->data;
- bConstraintTarget *ct= list->first;
+ bChildOfConstraint *data = con->data;
+ bConstraintTarget *ct = list->first;
/* the following macro is used for all standard single-target constraints */
SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy)
}
}
-static void childof_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
+static void childof_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targets)
{
- bChildOfConstraint *data= con->data;
- bConstraintTarget *ct= targets->first;
+ bChildOfConstraint *data = con->data;
+ bConstraintTarget *ct = targets->first;
/* only evaluate if there is a target */
if (VALID_CONS_TARGET(ct)) {
@@ -850,15 +849,15 @@ static void childof_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *ta
mat4_to_size(sizo, invmat);
/* disable channels not enabled */
- if (!(data->flag & CHILDOF_LOCX)) loc[0]= loco[0]= 0.0f;
- if (!(data->flag & CHILDOF_LOCY)) loc[1]= loco[1]= 0.0f;
- if (!(data->flag & CHILDOF_LOCZ)) loc[2]= loco[2]= 0.0f;
- if (!(data->flag & CHILDOF_ROTX)) eul[0]= eulo[0]= 0.0f;
- if (!(data->flag & CHILDOF_ROTY)) eul[1]= eulo[1]= 0.0f;
- if (!(data->flag & CHILDOF_ROTZ)) eul[2]= eulo[2]= 0.0f;
- if (!(data->flag & CHILDOF_SIZEX)) size[0]= sizo[0]= 1.0f;
- if (!(data->flag & CHILDOF_SIZEY)) size[1]= sizo[1]= 1.0f;
- if (!(data->flag & CHILDOF_SIZEZ)) size[2]= sizo[2]= 1.0f;
+ if (!(data->flag & CHILDOF_LOCX)) loc[0] = loco[0] = 0.0f;
+ if (!(data->flag & CHILDOF_LOCY)) loc[1] = loco[1] = 0.0f;
+ if (!(data->flag & CHILDOF_LOCZ)) loc[2] = loco[2] = 0.0f;
+ if (!(data->flag & CHILDOF_ROTX)) eul[0] = eulo[0] = 0.0f;
+ if (!(data->flag & CHILDOF_ROTY)) eul[1] = eulo[1] = 0.0f;
+ if (!(data->flag & CHILDOF_ROTZ)) eul[2] = eulo[2] = 0.0f;
+ if (!(data->flag & CHILDOF_SIZEX)) size[0] = sizo[0] = 1.0f;
+ if (!(data->flag & CHILDOF_SIZEY)) size[1] = sizo[1] = 1.0f;
+ if (!(data->flag & CHILDOF_SIZEZ)) size[2] = sizo[2] = 1.0f;
/* make new target mat and offset mat */
loc_eulO_size_to_mat4(ct->matrix, loc, eul, size, ct->rotOrder);
@@ -874,13 +873,13 @@ static void childof_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *ta
*/
copy_m4_m4(tempmat, cob->matrix);
mult_m4_m4m4(cob->matrix, parmat, tempmat);
-
+
/* without this, changes to scale and rotation can change location
* of a parentless bone or a disconnected bone. Even though its set
* to zero above. */
- if (!(data->flag & CHILDOF_LOCX)) cob->matrix[3][0]= tempmat[3][0];
- if (!(data->flag & CHILDOF_LOCY)) cob->matrix[3][1]= tempmat[3][1];
- if (!(data->flag & CHILDOF_LOCZ)) cob->matrix[3][2]= tempmat[3][2];
+ if (!(data->flag & CHILDOF_LOCX)) cob->matrix[3][0] = tempmat[3][0];
+ if (!(data->flag & CHILDOF_LOCY)) cob->matrix[3][1] = tempmat[3][1];
+ if (!(data->flag & CHILDOF_LOCZ)) cob->matrix[3][2] = tempmat[3][2];
}
}
}
@@ -892,7 +891,6 @@ static bConstraintTypeInfo CTI_CHILDOF = {
"ChildOf", /* name */
"bChildOfConstraint", /* struct name */
NULL, /* free data */
- NULL, /* relink data */
childof_id_looper, /* id looper */
NULL, /* copy data */
childof_new_data, /* new data */
@@ -904,26 +902,26 @@ static bConstraintTypeInfo CTI_CHILDOF = {
/* -------- TrackTo Constraint ------- */
-static void trackto_new_data (void *cdata)
+static void trackto_new_data(void *cdata)
{
- bTrackToConstraint *data= (bTrackToConstraint *)cdata;
+ bTrackToConstraint *data = (bTrackToConstraint *)cdata;
data->reserved1 = TRACK_Y;
data->reserved2 = UP_Z;
}
-static void trackto_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
+static void trackto_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
{
- bTrackToConstraint *data= con->data;
+ bTrackToConstraint *data = con->data;
/* target only */
- func(con, (ID**)&data->tar, userdata);
+ func(con, (ID **)&data->tar, FALSE, userdata);
}
-static int trackto_get_tars (bConstraint *con, ListBase *list)
+static int trackto_get_tars(bConstraint *con, ListBase *list)
{
if (con && list) {
- bTrackToConstraint *data= con->data;
+ bTrackToConstraint *data = con->data;
bConstraintTarget *ct;
/* standard target-getting macro for single-target constraints */
@@ -935,11 +933,11 @@ static int trackto_get_tars (bConstraint *con, ListBase *list)
return 0;
}
-static void trackto_flush_tars (bConstraint *con, ListBase *list, short nocopy)
+static void trackto_flush_tars(bConstraint *con, ListBase *list, short nocopy)
{
if (con && list) {
- bTrackToConstraint *data= con->data;
- bConstraintTarget *ct= list->first;
+ bTrackToConstraint *data = con->data;
+ bConstraintTarget *ct = list->first;
/* the following macro is used for all standard single-target constraints */
SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy)
@@ -947,9 +945,9 @@ static void trackto_flush_tars (bConstraint *con, ListBase *list, short nocopy)
}
-static int basis_cross (int n, int m)
+static int basis_cross(int n, int m)
{
- switch (n-m) {
+ switch (n - m) {
case 1:
case -2:
return 1;
@@ -963,7 +961,7 @@ static int basis_cross (int n, int m)
}
}
-static void vectomat (float *vec, float *target_up, short axis, short upflag, short flags, float m[][3])
+static void vectomat(float *vec, float *target_up, short axis, short upflag, short flags, float m[][3])
{
float n[3];
float u[3]; /* vector specifying the up axis */
@@ -1027,10 +1025,10 @@ static void vectomat (float *vec, float *target_up, short axis, short upflag, sh
}
-static void trackto_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
+static void trackto_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targets)
{
- bTrackToConstraint *data= con->data;
- bConstraintTarget *ct= targets->first;
+ bTrackToConstraint *data = con->data;
+ bConstraintTarget *ct = targets->first;
if (VALID_CONS_TARGET(ct)) {
float size[3], vec[3];
@@ -1041,23 +1039,23 @@ static void trackto_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *ta
mat4_to_size(size, cob->matrix);
/* Clear the object's rotation */
- cob->matrix[0][0]=size[0];
- cob->matrix[0][1]=0;
- cob->matrix[0][2]=0;
- cob->matrix[1][0]=0;
- cob->matrix[1][1]=size[1];
- cob->matrix[1][2]=0;
- cob->matrix[2][0]=0;
- cob->matrix[2][1]=0;
- cob->matrix[2][2]=size[2];
+ cob->matrix[0][0] = size[0];
+ cob->matrix[0][1] = 0;
+ cob->matrix[0][2] = 0;
+ cob->matrix[1][0] = 0;
+ cob->matrix[1][1] = size[1];
+ cob->matrix[1][2] = 0;
+ cob->matrix[2][0] = 0;
+ cob->matrix[2][1] = 0;
+ cob->matrix[2][2] = size[2];
/* targetmat[2] instead of ownermat[2] is passed to vectomat
* for backwards compatibility it seems... (Aligorith)
*/
sub_v3_v3v3(vec, cob->matrix[3], ct->matrix[3]);
vectomat(vec, ct->matrix[2],
- (short)data->reserved1, (short)data->reserved2,
- data->flags, totmat);
+ (short)data->reserved1, (short)data->reserved2,
+ data->flags, totmat);
copy_m4_m4(tmat, cob->matrix);
mul_m4_m3m4(cob->matrix, totmat, tmat);
@@ -1070,7 +1068,6 @@ static bConstraintTypeInfo CTI_TRACKTO = {
"TrackTo", /* name */
"bTrackToConstraint", /* struct name */
NULL, /* free data */
- NULL, /* relink data */
trackto_id_looper, /* id looper */
NULL, /* copy data */
trackto_new_data, /* new data */
@@ -1082,32 +1079,32 @@ static bConstraintTypeInfo CTI_TRACKTO = {
/* --------- Inverse-Kinemetics --------- */
-static void kinematic_new_data (void *cdata)
+static void kinematic_new_data(void *cdata)
{
- bKinematicConstraint *data= (bKinematicConstraint *)cdata;
+ bKinematicConstraint *data = (bKinematicConstraint *)cdata;
- data->weight= 1.0f;
- data->orientweight= 1.0f;
+ data->weight = 1.0f;
+ data->orientweight = 1.0f;
data->iterations = 500;
- data->dist= 1.0f;
- data->flag= CONSTRAINT_IK_TIP|CONSTRAINT_IK_STRETCH|CONSTRAINT_IK_POS;
+ data->dist = 1.0f;
+ data->flag = CONSTRAINT_IK_TIP | CONSTRAINT_IK_STRETCH | CONSTRAINT_IK_POS;
}
-static void kinematic_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
+static void kinematic_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
{
- bKinematicConstraint *data= con->data;
+ bKinematicConstraint *data = con->data;
/* chain target */
- func(con, (ID**)&data->tar, userdata);
+ func(con, (ID **)&data->tar, FALSE, userdata);
/* poletarget */
- func(con, (ID**)&data->poletar, userdata);
+ func(con, (ID **)&data->poletar, FALSE, userdata);
}
-static int kinematic_get_tars (bConstraint *con, ListBase *list)
+static int kinematic_get_tars(bConstraint *con, ListBase *list)
{
if (con && list) {
- bKinematicConstraint *data= con->data;
+ bKinematicConstraint *data = con->data;
bConstraintTarget *ct;
/* standard target-getting macro for single-target constraints is used twice here */
@@ -1120,11 +1117,11 @@ static int kinematic_get_tars (bConstraint *con, ListBase *list)
return 0;
}
-static void kinematic_flush_tars (bConstraint *con, ListBase *list, short nocopy)
+static void kinematic_flush_tars(bConstraint *con, ListBase *list, short nocopy)
{
if (con && list) {
- bKinematicConstraint *data= con->data;
- bConstraintTarget *ct= list->first;
+ bKinematicConstraint *data = con->data;
+ bConstraintTarget *ct = list->first;
/* the following macro is used for all standard single-target constraints */
SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy)
@@ -1132,15 +1129,15 @@ static void kinematic_flush_tars (bConstraint *con, ListBase *list, short nocopy
}
}
-static void kinematic_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float UNUSED(ctime))
+static void kinematic_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float UNUSED(ctime))
{
- bKinematicConstraint *data= con->data;
+ bKinematicConstraint *data = con->data;
if (VALID_CONS_TARGET(ct))
constraint_target_to_mat4(ct->tar, ct->subtarget, ct->matrix, CONSTRAINT_SPACE_WORLD, ct->space, con->headtail);
else if (ct) {
if (data->flag & CONSTRAINT_IK_AUTO) {
- Object *ob= cob->ob;
+ Object *ob = cob->ob;
if (ob == NULL) {
unit_m4(ct->matrix);
@@ -1164,7 +1161,6 @@ static bConstraintTypeInfo CTI_KINEMATIC = {
"IK", /* name */
"bKinematicConstraint", /* struct name */
NULL, /* free data */
- NULL, /* relink data */
kinematic_id_looper, /* id looper */
NULL, /* copy data */
kinematic_new_data, /* new data */
@@ -1176,9 +1172,9 @@ static bConstraintTypeInfo CTI_KINEMATIC = {
/* -------- Follow-Path Constraint ---------- */
-static void followpath_new_data (void *cdata)
+static void followpath_new_data(void *cdata)
{
- bFollowPathConstraint *data= (bFollowPathConstraint *)cdata;
+ bFollowPathConstraint *data = (bFollowPathConstraint *)cdata;
data->trackflag = TRACK_Y;
data->upflag = UP_Z;
@@ -1186,18 +1182,18 @@ static void followpath_new_data (void *cdata)
data->followflag = 0;
}
-static void followpath_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
+static void followpath_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
{
- bFollowPathConstraint *data= con->data;
+ bFollowPathConstraint *data = con->data;
/* target only */
- func(con, (ID**)&data->tar, userdata);
+ func(con, (ID **)&data->tar, FALSE, userdata);
}
-static int followpath_get_tars (bConstraint *con, ListBase *list)
+static int followpath_get_tars(bConstraint *con, ListBase *list)
{
if (con && list) {
- bFollowPathConstraint *data= con->data;
+ bFollowPathConstraint *data = con->data;
bConstraintTarget *ct;
/* standard target-getting macro for single-target constraints without subtargets */
@@ -1209,25 +1205,25 @@ static int followpath_get_tars (bConstraint *con, ListBase *list)
return 0;
}
-static void followpath_flush_tars (bConstraint *con, ListBase *list, short nocopy)
+static void followpath_flush_tars(bConstraint *con, ListBase *list, short nocopy)
{
if (con && list) {
- bFollowPathConstraint *data= con->data;
- bConstraintTarget *ct= list->first;
+ bFollowPathConstraint *data = con->data;
+ bConstraintTarget *ct = list->first;
/* the following macro is used for all standard single-target constraints */
SINGLETARGETNS_FLUSH_TARS(con, data->tar, ct, list, nocopy)
}
}
-static void followpath_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float UNUSED(ctime))
+static void followpath_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float UNUSED(ctime))
{
- bFollowPathConstraint *data= con->data;
+ bFollowPathConstraint *data = con->data;
if (VALID_CONS_TARGET(ct)) {
- Curve *cu= ct->tar->data;
+ Curve *cu = ct->tar->data;
float vec[4], dir[3], radius;
- float totmat[4][4]= MAT4_UNITY;
+ float totmat[4][4] = MAT4_UNITY;
float curvetime;
unit_m4(ct->matrix);
@@ -1237,15 +1233,15 @@ static void followpath_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstr
*/
/* only happens on reload file, but violates depsgraph still... fix! */
- if (cu->path==NULL || cu->path->data==NULL)
- makeDispListCurveTypes(cob->scene, ct->tar, 0);
+ if (cu->path == NULL || cu->path->data == NULL)
+ BKE_displist_make_curveTypes(cob->scene, ct->tar, 0);
if (cu->path && cu->path->data) {
float quat[4];
if ((data->followflag & FOLLOWPATH_STATIC) == 0) {
/* animated position along curve depending on time */
Nurb *nu = cu->nurb.first;
- curvetime= cu->ctime - data->offset;
+ curvetime = cu->ctime - data->offset;
/* ctime is now a proper var setting of Curve which gets set by Animato like any other var that's animated,
* but this will only work if it actually is animated...
@@ -1269,21 +1265,21 @@ static void followpath_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstr
}
else {
/* fixed position along curve */
- curvetime= data->offset_fac;
+ curvetime = data->offset_fac;
}
- if ( where_on_path(ct->tar, curvetime, vec, dir, (data->followflag & FOLLOWPATH_FOLLOW) ? quat : NULL, &radius, NULL) ) { /* quat_pt is quat or NULL*/
+ if (where_on_path(ct->tar, curvetime, vec, dir, (data->followflag & FOLLOWPATH_FOLLOW) ? quat : NULL, &radius, NULL) ) { /* quat_pt is quat or NULL*/
if (data->followflag & FOLLOWPATH_FOLLOW) {
#if 0
float x1, q[4];
vec_to_quat(quat, dir, (short)data->trackflag, (short)data->upflag);
normalize_v3(dir);
- q[0]= (float)cos(0.5*vec[3]);
- x1= (float)sin(0.5*vec[3]);
- q[1]= -x1*dir[0];
- q[2]= -x1*dir[1];
- q[3]= -x1*dir[2];
+ q[0] = (float)cos(0.5 * vec[3]);
+ x1 = (float)sin(0.5 * vec[3]);
+ q[1] = -x1 * dir[0];
+ q[2] = -x1 * dir[1];
+ q[3] = -x1 * dir[2];
mul_qt_qtqt(quat, q, quat);
#else
quat_apply_track(quat, data->trackflag, data->upflag);
@@ -1309,15 +1305,15 @@ static void followpath_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstr
unit_m4(ct->matrix);
}
-static void followpath_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
+static void followpath_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targets)
{
- bConstraintTarget *ct= targets->first;
+ bConstraintTarget *ct = targets->first;
/* only evaluate if there is a target */
if (VALID_CONS_TARGET(ct)) {
float obmat[4][4];
float size[3];
- bFollowPathConstraint *data= con->data;
+ bFollowPathConstraint *data = con->data;
/* get Object transform (loc/rot/size) to determine transformation from path */
// TODO: this used to be local at one point, but is probably more useful as-is
@@ -1330,10 +1326,10 @@ static void followpath_evaluate (bConstraint *con, bConstraintOb *cob, ListBase
mul_serie_m4(cob->matrix, ct->matrix, obmat, NULL, NULL, NULL, NULL, NULL, NULL);
/* un-apply scaling caused by path */
- if ((data->followflag & FOLLOWPATH_RADIUS)==0) { /* XXX - assume that scale correction means that radius will have some scale error in it - Campbell */
+ if ((data->followflag & FOLLOWPATH_RADIUS) == 0) { /* XXX - assume that scale correction means that radius will have some scale error in it - Campbell */
float obsize[3];
- mat4_to_size( obsize,cob->matrix);
+ mat4_to_size(obsize, cob->matrix);
if (obsize[0])
mul_v3_fl(cob->matrix[0], size[0] / obsize[0]);
if (obsize[1])
@@ -1350,7 +1346,6 @@ static bConstraintTypeInfo CTI_FOLLOWPATH = {
"Follow Path", /* name */
"bFollowPathConstraint", /* struct name */
NULL, /* free data */
- NULL, /* relink data */
followpath_id_looper, /* id looper */
NULL, /* copy data */
followpath_new_data, /* new data */
@@ -1363,7 +1358,7 @@ static bConstraintTypeInfo CTI_FOLLOWPATH = {
/* --------- Limit Location --------- */
-static void loclimit_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *UNUSED(targets))
+static void loclimit_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *UNUSED(targets))
{
bLocLimitConstraint *data = con->data;
@@ -1399,7 +1394,6 @@ static bConstraintTypeInfo CTI_LOCLIMIT = {
"Limit Location", /* name */
"bLocLimitConstraint", /* struct name */
NULL, /* free data */
- NULL, /* relink data */
NULL, /* id looper */
NULL, /* copy data */
NULL, /* new data */
@@ -1411,7 +1405,7 @@ static bConstraintTypeInfo CTI_LOCLIMIT = {
/* -------- Limit Rotation --------- */
-static void rotlimit_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *UNUSED(targets))
+static void rotlimit_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *UNUSED(targets))
{
bRotLimitConstraint *data = con->data;
float loc[3];
@@ -1457,7 +1451,6 @@ static bConstraintTypeInfo CTI_ROTLIMIT = {
"Limit Rotation", /* name */
"bRotLimitConstraint", /* struct name */
NULL, /* free data */
- NULL, /* relink data */
NULL, /* id looper */
NULL, /* copy data */
NULL, /* new data */
@@ -1470,13 +1463,13 @@ static bConstraintTypeInfo CTI_ROTLIMIT = {
/* --------- Limit Scaling --------- */
-static void sizelimit_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *UNUSED(targets))
+static void sizelimit_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *UNUSED(targets))
{
bSizeLimitConstraint *data = con->data;
float obsize[3], size[3];
- mat4_to_size( size,cob->matrix);
- mat4_to_size( obsize,cob->matrix);
+ mat4_to_size(size, cob->matrix);
+ mat4_to_size(obsize, cob->matrix);
if (data->flag & LIMIT_XMIN) {
if (size[0] < data->xmin)
@@ -1504,11 +1497,11 @@ static void sizelimit_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *
}
if (obsize[0])
- mul_v3_fl(cob->matrix[0], size[0]/obsize[0]);
+ mul_v3_fl(cob->matrix[0], size[0] / obsize[0]);
if (obsize[1])
- mul_v3_fl(cob->matrix[1], size[1]/obsize[1]);
+ mul_v3_fl(cob->matrix[1], size[1] / obsize[1]);
if (obsize[2])
- mul_v3_fl(cob->matrix[2], size[2]/obsize[2]);
+ mul_v3_fl(cob->matrix[2], size[2] / obsize[2]);
}
static bConstraintTypeInfo CTI_SIZELIMIT = {
@@ -1517,7 +1510,6 @@ static bConstraintTypeInfo CTI_SIZELIMIT = {
"Limit Scaling", /* name */
"bSizeLimitConstraint", /* struct name */
NULL, /* free data */
- NULL, /* relink data */
NULL, /* id looper */
NULL, /* copy data */
NULL, /* new data */
@@ -1529,25 +1521,25 @@ static bConstraintTypeInfo CTI_SIZELIMIT = {
/* ----------- Copy Location ------------- */
-static void loclike_new_data (void *cdata)
+static void loclike_new_data(void *cdata)
{
- bLocateLikeConstraint *data= (bLocateLikeConstraint *)cdata;
+ bLocateLikeConstraint *data = (bLocateLikeConstraint *)cdata;
- data->flag = LOCLIKE_X|LOCLIKE_Y|LOCLIKE_Z;
+ data->flag = LOCLIKE_X | LOCLIKE_Y | LOCLIKE_Z;
}
-static void loclike_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
+static void loclike_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
{
- bLocateLikeConstraint *data= con->data;
+ bLocateLikeConstraint *data = con->data;
/* target only */
- func(con, (ID**)&data->tar, userdata);
+ func(con, (ID **)&data->tar, FALSE, userdata);
}
-static int loclike_get_tars (bConstraint *con, ListBase *list)
+static int loclike_get_tars(bConstraint *con, ListBase *list)
{
if (con && list) {
- bLocateLikeConstraint *data= con->data;
+ bLocateLikeConstraint *data = con->data;
bConstraintTarget *ct;
/* standard target-getting macro for single-target constraints */
@@ -1559,21 +1551,21 @@ static int loclike_get_tars (bConstraint *con, ListBase *list)
return 0;
}
-static void loclike_flush_tars (bConstraint *con, ListBase *list, short nocopy)
+static void loclike_flush_tars(bConstraint *con, ListBase *list, short nocopy)
{
if (con && list) {
- bLocateLikeConstraint *data= con->data;
- bConstraintTarget *ct= list->first;
+ bLocateLikeConstraint *data = con->data;
+ bConstraintTarget *ct = list->first;
/* the following macro is used for all standard single-target constraints */
SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy)
}
}
-static void loclike_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
+static void loclike_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targets)
{
- bLocateLikeConstraint *data= con->data;
- bConstraintTarget *ct= targets->first;
+ bLocateLikeConstraint *data = con->data;
+ bConstraintTarget *ct = targets->first;
if (VALID_CONS_TARGET(ct)) {
float offset[3] = {0.0f, 0.0f, 0.0f};
@@ -1608,7 +1600,6 @@ static bConstraintTypeInfo CTI_LOCLIKE = {
"Copy Location", /* name */
"bLocateLikeConstraint", /* struct name */
NULL, /* free data */
- NULL, /* relink data */
loclike_id_looper, /* id looper */
NULL, /* copy data */
loclike_new_data, /* new data */
@@ -1620,25 +1611,25 @@ static bConstraintTypeInfo CTI_LOCLIKE = {
/* ----------- Copy Rotation ------------- */
-static void rotlike_new_data (void *cdata)
+static void rotlike_new_data(void *cdata)
{
- bRotateLikeConstraint *data= (bRotateLikeConstraint *)cdata;
+ bRotateLikeConstraint *data = (bRotateLikeConstraint *)cdata;
- data->flag = ROTLIKE_X|ROTLIKE_Y|ROTLIKE_Z;
+ data->flag = ROTLIKE_X | ROTLIKE_Y | ROTLIKE_Z;
}
-static void rotlike_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
+static void rotlike_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
{
- bChildOfConstraint *data= con->data;
+ bChildOfConstraint *data = con->data;
/* target only */
- func(con, (ID**)&data->tar, userdata);
+ func(con, (ID **)&data->tar, FALSE, userdata);
}
-static int rotlike_get_tars (bConstraint *con, ListBase *list)
+static int rotlike_get_tars(bConstraint *con, ListBase *list)
{
if (con && list) {
- bRotateLikeConstraint *data= con->data;
+ bRotateLikeConstraint *data = con->data;
bConstraintTarget *ct;
/* standard target-getting macro for single-target constraints */
@@ -1650,26 +1641,26 @@ static int rotlike_get_tars (bConstraint *con, ListBase *list)
return 0;
}
-static void rotlike_flush_tars (bConstraint *con, ListBase *list, short nocopy)
+static void rotlike_flush_tars(bConstraint *con, ListBase *list, short nocopy)
{
if (con && list) {
- bRotateLikeConstraint *data= con->data;
- bConstraintTarget *ct= list->first;
+ bRotateLikeConstraint *data = con->data;
+ bConstraintTarget *ct = list->first;
/* the following macro is used for all standard single-target constraints */
SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy)
}
}
-static void rotlike_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
+static void rotlike_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targets)
{
- bRotateLikeConstraint *data= con->data;
- bConstraintTarget *ct= targets->first;
+ bRotateLikeConstraint *data = con->data;
+ bConstraintTarget *ct = targets->first;
if (VALID_CONS_TARGET(ct)) {
- float loc[3];
- float eul[3], obeul[3];
- float size[3];
+ float loc[3];
+ float eul[3], obeul[3];
+ float size[3];
copy_v3_v3(loc, cob->matrix[3]);
mat4_to_size(size, cob->matrix);
@@ -1679,7 +1670,7 @@ static void rotlike_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *ta
/* we must get compatible eulers from the beginning because some of them can be modified below (see bug #21875) */
mat4_to_compatible_eulO(eul, obeul, cob->rotOrder, ct->matrix);
- if ((data->flag & ROTLIKE_X)==0)
+ if ((data->flag & ROTLIKE_X) == 0)
eul[0] = obeul[0];
else {
if (data->flag & ROTLIKE_OFFSET)
@@ -1689,7 +1680,7 @@ static void rotlike_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *ta
eul[0] *= -1;
}
- if ((data->flag & ROTLIKE_Y)==0)
+ if ((data->flag & ROTLIKE_Y) == 0)
eul[1] = obeul[1];
else {
if (data->flag & ROTLIKE_OFFSET)
@@ -1699,7 +1690,7 @@ static void rotlike_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *ta
eul[1] *= -1;
}
- if ((data->flag & ROTLIKE_Z)==0)
+ if ((data->flag & ROTLIKE_Z) == 0)
eul[2] = obeul[2];
else {
if (data->flag & ROTLIKE_OFFSET)
@@ -1721,7 +1712,6 @@ static bConstraintTypeInfo CTI_ROTLIKE = {
"Copy Rotation", /* name */
"bRotateLikeConstraint", /* struct name */
NULL, /* free data */
- NULL, /* relink data */
rotlike_id_looper, /* id looper */
NULL, /* copy data */
rotlike_new_data, /* new data */
@@ -1733,25 +1723,25 @@ static bConstraintTypeInfo CTI_ROTLIKE = {
/* ---------- Copy Scaling ---------- */
-static void sizelike_new_data (void *cdata)
+static void sizelike_new_data(void *cdata)
{
- bSizeLikeConstraint *data= (bSizeLikeConstraint *)cdata;
+ bSizeLikeConstraint *data = (bSizeLikeConstraint *)cdata;
- data->flag = SIZELIKE_X|SIZELIKE_Y|SIZELIKE_Z;
+ data->flag = SIZELIKE_X | SIZELIKE_Y | SIZELIKE_Z;
}
-static void sizelike_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
+static void sizelike_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
{
- bSizeLikeConstraint *data= con->data;
+ bSizeLikeConstraint *data = con->data;
/* target only */
- func(con, (ID**)&data->tar, userdata);
+ func(con, (ID **)&data->tar, FALSE, userdata);
}
-static int sizelike_get_tars (bConstraint *con, ListBase *list)
+static int sizelike_get_tars(bConstraint *con, ListBase *list)
{
if (con && list) {
- bSizeLikeConstraint *data= con->data;
+ bSizeLikeConstraint *data = con->data;
bConstraintTarget *ct;
/* standard target-getting macro for single-target constraints */
@@ -1763,21 +1753,21 @@ static int sizelike_get_tars (bConstraint *con, ListBase *list)
return 0;
}
-static void sizelike_flush_tars (bConstraint *con, ListBase *list, short nocopy)
+static void sizelike_flush_tars(bConstraint *con, ListBase *list, short nocopy)
{
if (con && list) {
- bSizeLikeConstraint *data= con->data;
- bConstraintTarget *ct= list->first;
+ bSizeLikeConstraint *data = con->data;
+ bConstraintTarget *ct = list->first;
/* the following macro is used for all standard single-target constraints */
SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy)
}
}
-static void sizelike_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
+static void sizelike_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targets)
{
- bSizeLikeConstraint *data= con->data;
- bConstraintTarget *ct= targets->first;
+ bSizeLikeConstraint *data = con->data;
+ bConstraintTarget *ct = targets->first;
if (VALID_CONS_TARGET(ct)) {
float obsize[3], size[3];
@@ -1818,7 +1808,6 @@ static bConstraintTypeInfo CTI_SIZELIKE = {
"Copy Scale", /* name */
"bSizeLikeConstraint", /* struct name */
NULL, /* free data */
- NULL, /* relink data */
sizelike_id_looper, /* id looper */
NULL, /* copy data */
sizelike_new_data, /* new data */
@@ -1830,18 +1819,18 @@ static bConstraintTypeInfo CTI_SIZELIKE = {
/* ----------- Copy Transforms ------------- */
-static void translike_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
+static void translike_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
{
- bTransLikeConstraint *data= con->data;
+ bTransLikeConstraint *data = con->data;
/* target only */
- func(con, (ID**)&data->tar, userdata);
+ func(con, (ID **)&data->tar, FALSE, userdata);
}
-static int translike_get_tars (bConstraint *con, ListBase *list)
+static int translike_get_tars(bConstraint *con, ListBase *list)
{
if (con && list) {
- bTransLikeConstraint *data= con->data;
+ bTransLikeConstraint *data = con->data;
bConstraintTarget *ct;
/* standard target-getting macro for single-target constraints */
@@ -1853,20 +1842,20 @@ static int translike_get_tars (bConstraint *con, ListBase *list)
return 0;
}
-static void translike_flush_tars (bConstraint *con, ListBase *list, short nocopy)
+static void translike_flush_tars(bConstraint *con, ListBase *list, short nocopy)
{
if (con && list) {
- bTransLikeConstraint *data= con->data;
- bConstraintTarget *ct= list->first;
+ bTransLikeConstraint *data = con->data;
+ bConstraintTarget *ct = list->first;
/* the following macro is used for all standard single-target constraints */
SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy)
}
}
-static void translike_evaluate (bConstraint *UNUSED(con), bConstraintOb *cob, ListBase *targets)
+static void translike_evaluate(bConstraint *UNUSED(con), bConstraintOb *cob, ListBase *targets)
{
- bConstraintTarget *ct= targets->first;
+ bConstraintTarget *ct = targets->first;
if (VALID_CONS_TARGET(ct)) {
/* just copy the entire transform matrix of the target */
@@ -1880,7 +1869,6 @@ static bConstraintTypeInfo CTI_TRANSLIKE = {
"Copy Transforms", /* name */
"bTransLikeConstraint", /* struct name */
NULL, /* free data */
- NULL, /* relink data */
translike_id_looper, /* id looper */
NULL, /* copy data */
NULL, /* new data */
@@ -1892,17 +1880,17 @@ static bConstraintTypeInfo CTI_TRANSLIKE = {
/* ---------- Maintain Volume ---------- */
-static void samevolume_new_data (void *cdata)
+static void samevolume_new_data(void *cdata)
{
- bSameVolumeConstraint *data= (bSameVolumeConstraint *)cdata;
+ bSameVolumeConstraint *data = (bSameVolumeConstraint *)cdata;
data->flag = SAMEVOL_Y;
data->volume = 1.0f;
}
-static void samevolume_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *UNUSED(targets))
+static void samevolume_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *UNUSED(targets))
{
- bSameVolumeConstraint *data= con->data;
+ bSameVolumeConstraint *data = con->data;
float volume = data->volume;
float fac = 1.0f;
@@ -1937,7 +1925,6 @@ static bConstraintTypeInfo CTI_SAMEVOL = {
"Maintain Volume", /* name */
"bSameVolumeConstraint", /* struct name */
NULL, /* free data */
- NULL, /* relink data */
NULL, /* id looper */
NULL, /* copy data */
samevolume_new_data, /* new data */
@@ -1949,9 +1936,9 @@ static bConstraintTypeInfo CTI_SAMEVOL = {
/* ----------- Python Constraint -------------- */
-static void pycon_free (bConstraint *con)
+static void pycon_free(bConstraint *con)
{
- bPythonConstraint *data= con->data;
+ bPythonConstraint *data = con->data;
/* id-properties */
IDP_FreeProperty(data->prop);
@@ -1961,14 +1948,7 @@ static void pycon_free (bConstraint *con)
BLI_freelistN(&data->targets);
}
-static void pycon_relink (bConstraint *con)
-{
- bPythonConstraint *data= con->data;
-
- ID_NEW(data->text);
-}
-
-static void pycon_copy (bConstraint *con, bConstraint *srccon)
+static void pycon_copy(bConstraint *con, bConstraint *srccon)
{
bPythonConstraint *pycon = (bPythonConstraint *)con->data;
bPythonConstraint *opycon = (bPythonConstraint *)srccon->data;
@@ -1977,19 +1957,19 @@ static void pycon_copy (bConstraint *con, bConstraint *srccon)
BLI_duplicatelist(&pycon->targets, &opycon->targets);
}
-static void pycon_new_data (void *cdata)
+static void pycon_new_data(void *cdata)
{
- bPythonConstraint *data= (bPythonConstraint *)cdata;
+ bPythonConstraint *data = (bPythonConstraint *)cdata;
/* everything should be set correctly by calloc, except for the prop->type constant.*/
data->prop = MEM_callocN(sizeof(IDProperty), "PyConstraintProps");
data->prop->type = IDP_GROUP;
}
-static int pycon_get_tars (bConstraint *con, ListBase *list)
+static int pycon_get_tars(bConstraint *con, ListBase *list)
{
if (con && list) {
- bPythonConstraint *data= con->data;
+ bPythonConstraint *data = con->data;
list->first = data->targets.first;
list->last = data->targets.last;
@@ -2000,34 +1980,34 @@ static int pycon_get_tars (bConstraint *con, ListBase *list)
return 0;
}
-static void pycon_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
+static void pycon_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
{
- bPythonConstraint *data= con->data;
+ bPythonConstraint *data = con->data;
bConstraintTarget *ct;
/* targets */
- for (ct= data->targets.first; ct; ct= ct->next)
- func(con, (ID**)&ct->tar, userdata);
+ for (ct = data->targets.first; ct; ct = ct->next)
+ func(con, (ID **)&ct->tar, FALSE, userdata);
/* script */
- func(con, (ID**)&data->text, userdata);
+ func(con, (ID **)&data->text, TRUE, userdata);
}
/* Whether this approach is maintained remains to be seen (aligorith) */
-static void pycon_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float UNUSED(ctime))
+static void pycon_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float UNUSED(ctime))
{
#ifdef WITH_PYTHON
- bPythonConstraint *data= con->data;
+ bPythonConstraint *data = con->data;
#endif
if (VALID_CONS_TARGET(ct)) {
/* special exception for curves - depsgraph issues */
if (ct->tar->type == OB_CURVE) {
- Curve *cu= ct->tar->data;
+ Curve *cu = ct->tar->data;
/* this check is to make sure curve objects get updated on file load correctly.*/
- if (cu->path==NULL || cu->path->data==NULL) /* only happens on reload file, but violates depsgraph still... fix! */
- makeDispListCurveTypes(cob->scene, ct->tar, 0);
+ if (cu->path == NULL || cu->path->data == NULL) /* only happens on reload file, but violates depsgraph still... fix! */
+ BKE_displist_make_curveTypes(cob->scene, ct->tar, 0);
}
/* firstly calculate the matrix the normal way, then let the py-function override
@@ -2045,16 +2025,16 @@ static void pycon_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstraintT
unit_m4(ct->matrix);
}
-static void pycon_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
+static void pycon_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targets)
{
#ifndef WITH_PYTHON
(void)con; (void)cob; (void)targets; /* unused */
return;
#else
- bPythonConstraint *data= con->data;
+ bPythonConstraint *data = con->data;
/* only evaluate in python if we're allowed to do so */
- if ((G.f & G_SCRIPT_AUTOEXEC)==0) return;
+ if ((G.f & G_SCRIPT_AUTOEXEC) == 0) return;
/* currently removed, until I this can be re-implemented for multiple targets */
#if 0
@@ -2076,7 +2056,6 @@ static bConstraintTypeInfo CTI_PYTHON = {
"Script", /* name */
"bPythonConstraint", /* struct name */
pycon_free, /* free data */
- pycon_relink, /* relink data */
pycon_id_looper, /* id looper */
pycon_copy, /* copy data */
pycon_new_data, /* new data */
@@ -2088,35 +2067,29 @@ static bConstraintTypeInfo CTI_PYTHON = {
/* -------- Action Constraint ----------- */
-static void actcon_relink (bConstraint *con)
+static void actcon_new_data(void *cdata)
{
- bActionConstraint *data= con->data;
- ID_NEW(data->act);
-}
-
-static void actcon_new_data (void *cdata)
-{
- bActionConstraint *data= (bActionConstraint *)cdata;
+ bActionConstraint *data = (bActionConstraint *)cdata;
/* set type to 20 (Loc X), as 0 is Rot X for backwards compatibility */
data->type = 20;
}
-static void actcon_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
+static void actcon_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
{
- bActionConstraint *data= con->data;
+ bActionConstraint *data = con->data;
/* target */
- func(con, (ID**)&data->tar, userdata);
+ func(con, (ID **)&data->tar, FALSE, userdata);
/* action */
- func(con, (ID**)&data->act, userdata);
+ func(con, (ID **)&data->act, TRUE, userdata);
}
-static int actcon_get_tars (bConstraint *con, ListBase *list)
+static int actcon_get_tars(bConstraint *con, ListBase *list)
{
if (con && list) {
- bActionConstraint *data= con->data;
+ bActionConstraint *data = con->data;
bConstraintTarget *ct;
/* standard target-getting macro for single-target constraints */
@@ -2128,18 +2101,18 @@ static int actcon_get_tars (bConstraint *con, ListBase *list)
return 0;
}
-static void actcon_flush_tars (bConstraint *con, ListBase *list, short nocopy)
+static void actcon_flush_tars(bConstraint *con, ListBase *list, short nocopy)
{
if (con && list) {
- bActionConstraint *data= con->data;
- bConstraintTarget *ct= list->first;
+ bActionConstraint *data = con->data;
+ bConstraintTarget *ct = list->first;
/* the following macro is used for all standard single-target constraints */
SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy)
}
}
-static void actcon_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float UNUSED(ctime))
+static void actcon_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float UNUSED(ctime))
{
bActionConstraint *data = con->data;
@@ -2157,33 +2130,33 @@ static void actcon_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstraint
/* determine where in transform range target is */
/* data->type is mapped as follows for backwards compatibility:
* 00,01,02 - rotation (it used to be like this)
- * 10,11,12 - scaling
+ * 10,11,12 - scaling
* 20,21,22 - location
*/
if (data->type < 10) {
/* extract rotation (is in whatever space target should be in) */
mat4_to_eul(vec, tempmat);
mul_v3_fl(vec, RAD2DEGF(1.0f)); /* rad -> deg */
- axis= data->type;
+ axis = data->type;
}
else if (data->type < 20) {
/* extract scaling (is in whatever space target should be in) */
mat4_to_size(vec, tempmat);
- axis= data->type - 10;
+ axis = data->type - 10;
}
else {
/* extract location */
copy_v3_v3(vec, tempmat[3]);
- axis= data->type - 20;
+ axis = data->type - 20;
}
/* Target defines the animation */
- s = (vec[axis]-data->min) / (data->max-data->min);
+ s = (vec[axis] - data->min) / (data->max - data->min);
CLAMP(s, 0, 1);
- t = (s * (data->end-data->start)) + data->start;
+ t = (s * (data->end - data->start)) + data->start;
if (G.debug & G_DEBUG)
- printf("do Action Constraint %s - Ob %s Pchan %s\n", con->name, cob->ob->id.name+2, (cob->pchan)?cob->pchan->name:NULL);
+ printf("do Action Constraint %s - Ob %s Pchan %s\n", con->name, cob->ob->id.name + 2, (cob->pchan) ? cob->pchan->name : NULL);
/* Get the appropriate information from the action */
if (cob->type == CONSTRAINT_OBTYPE_BONE) {
@@ -2199,18 +2172,18 @@ static void actcon_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstraint
*/
pchan = cob->pchan;
- tchan= verify_pose_channel(pose, pchan->name);
- tchan->rotmode= pchan->rotmode;
+ tchan = BKE_pose_channel_verify(pose, pchan->name);
+ tchan->rotmode = pchan->rotmode;
/* evaluate action using workob (it will only set the PoseChannel in question) */
what_does_obaction(cob->ob, &workob, pose, data->act, pchan->name, t);
/* convert animation to matrices for use here */
- pchan_calc_mat(tchan);
+ BKE_pchan_calc_mat(tchan);
copy_m4_m4(ct->matrix, tchan->chan_mat);
/* Clean up */
- free_pose(pose);
+ BKE_pose_free(pose);
}
else if (cob->type == CONSTRAINT_OBTYPE_OBJECT) {
Object workob;
@@ -2218,7 +2191,7 @@ static void actcon_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstraint
/* evaluate using workob */
// FIXME: we don't have any consistent standards on limiting effects on object...
what_does_obaction(cob->ob, &workob, NULL, data->act, NULL, t);
- object_to_mat4(&workob, ct->matrix);
+ BKE_object_to_mat4(&workob, ct->matrix);
}
else {
/* behavior undefined... */
@@ -2227,9 +2200,9 @@ static void actcon_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstraint
}
}
-static void actcon_evaluate (bConstraint *UNUSED(con), bConstraintOb *cob, ListBase *targets)
+static void actcon_evaluate(bConstraint *UNUSED(con), bConstraintOb *cob, ListBase *targets)
{
- bConstraintTarget *ct= targets->first;
+ bConstraintTarget *ct = targets->first;
if (VALID_CONS_TARGET(ct)) {
float temp[4][4];
@@ -2248,7 +2221,6 @@ static bConstraintTypeInfo CTI_ACTION = {
"Action", /* name */
"bActionConstraint", /* struct name */
NULL, /* free data */
- actcon_relink, /* relink data */
actcon_id_looper, /* id looper */
NULL, /* copy data */
actcon_new_data, /* new data */
@@ -2260,26 +2232,26 @@ static bConstraintTypeInfo CTI_ACTION = {
/* --------- Locked Track ---------- */
-static void locktrack_new_data (void *cdata)
+static void locktrack_new_data(void *cdata)
{
- bLockTrackConstraint *data= (bLockTrackConstraint *)cdata;
+ bLockTrackConstraint *data = (bLockTrackConstraint *)cdata;
data->trackflag = TRACK_Y;
data->lockflag = LOCK_Z;
}
-static void locktrack_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
+static void locktrack_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
{
- bLockTrackConstraint *data= con->data;
+ bLockTrackConstraint *data = con->data;
/* target only */
- func(con, (ID**)&data->tar, userdata);
+ func(con, (ID **)&data->tar, FALSE, userdata);
}
-static int locktrack_get_tars (bConstraint *con, ListBase *list)
+static int locktrack_get_tars(bConstraint *con, ListBase *list)
{
if (con && list) {
- bLockTrackConstraint *data= con->data;
+ bLockTrackConstraint *data = con->data;
bConstraintTarget *ct;
/* the following macro is used for all standard single-target constraints */
@@ -2291,24 +2263,24 @@ static int locktrack_get_tars (bConstraint *con, ListBase *list)
return 0;
}
-static void locktrack_flush_tars (bConstraint *con, ListBase *list, short nocopy)
+static void locktrack_flush_tars(bConstraint *con, ListBase *list, short nocopy)
{
if (con && list) {
- bLockTrackConstraint *data= con->data;
- bConstraintTarget *ct= list->first;
+ bLockTrackConstraint *data = con->data;
+ bConstraintTarget *ct = list->first;
/* the following macro is used for all standard single-target constraints */
SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy)
}
}
-static void locktrack_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
+static void locktrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targets)
{
- bLockTrackConstraint *data= con->data;
- bConstraintTarget *ct= targets->first;
+ bLockTrackConstraint *data = con->data;
+ bConstraintTarget *ct = targets->first;
if (VALID_CONS_TARGET(ct)) {
- float vec[3],vec2[3];
+ float vec[3], vec2[3];
float totmat[3][3];
float tmpmat[3][3];
float invmat[3][3];
@@ -2318,217 +2290,217 @@ static void locktrack_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *
/* Vector object -> target */
sub_v3_v3v3(vec, ct->matrix[3], cob->matrix[3]);
switch (data->lockflag) {
- case LOCK_X: /* LOCK X */
- {
- switch (data->trackflag) {
- case TRACK_Y: /* LOCK X TRACK Y */
- {
- /* Projection of Vector on the plane */
- project_v3_v3v3(vec2, vec, cob->matrix[0]);
- sub_v3_v3v3(totmat[1], vec, vec2);
- normalize_v3(totmat[1]);
+ case LOCK_X: /* LOCK X */
+ {
+ switch (data->trackflag) {
+ case TRACK_Y: /* LOCK X TRACK Y */
+ {
+ /* Projection of Vector on the plane */
+ project_v3_v3v3(vec2, vec, cob->matrix[0]);
+ sub_v3_v3v3(totmat[1], vec, vec2);
+ normalize_v3(totmat[1]);
- /* the x axis is fixed */
- normalize_v3_v3(totmat[0], cob->matrix[0]);
+ /* the x axis is fixed */
+ normalize_v3_v3(totmat[0], cob->matrix[0]);
- /* the z axis gets mapped onto a third orthogonal vector */
- cross_v3_v3v3(totmat[2], totmat[0], totmat[1]);
- }
+ /* the z axis gets mapped onto a third orthogonal vector */
+ cross_v3_v3v3(totmat[2], totmat[0], totmat[1]);
+ }
break;
- case TRACK_Z: /* LOCK X TRACK Z */
- {
- /* Projection of Vector on the plane */
- project_v3_v3v3(vec2, vec, cob->matrix[0]);
- sub_v3_v3v3(totmat[2], vec, vec2);
- normalize_v3(totmat[2]);
+ case TRACK_Z: /* LOCK X TRACK Z */
+ {
+ /* Projection of Vector on the plane */
+ project_v3_v3v3(vec2, vec, cob->matrix[0]);
+ sub_v3_v3v3(totmat[2], vec, vec2);
+ normalize_v3(totmat[2]);
- /* the x axis is fixed */
- normalize_v3_v3(totmat[0], cob->matrix[0]);
+ /* the x axis is fixed */
+ normalize_v3_v3(totmat[0], cob->matrix[0]);
- /* the z axis gets mapped onto a third orthogonal vector */
- cross_v3_v3v3(totmat[1], totmat[2], totmat[0]);
- }
+ /* the z axis gets mapped onto a third orthogonal vector */
+ cross_v3_v3v3(totmat[1], totmat[2], totmat[0]);
+ }
break;
- case TRACK_nY: /* LOCK X TRACK -Y */
- {
- /* Projection of Vector on the plane */
- project_v3_v3v3(vec2, vec, cob->matrix[0]);
- sub_v3_v3v3(totmat[1], vec, vec2);
- normalize_v3(totmat[1]);
- negate_v3(totmat[1]);
+ case TRACK_nY: /* LOCK X TRACK -Y */
+ {
+ /* Projection of Vector on the plane */
+ project_v3_v3v3(vec2, vec, cob->matrix[0]);
+ sub_v3_v3v3(totmat[1], vec, vec2);
+ normalize_v3(totmat[1]);
+ negate_v3(totmat[1]);
- /* the x axis is fixed */
- normalize_v3_v3(totmat[0], cob->matrix[0]);
+ /* the x axis is fixed */
+ normalize_v3_v3(totmat[0], cob->matrix[0]);
- /* the z axis gets mapped onto a third orthogonal vector */
- cross_v3_v3v3(totmat[2], totmat[0], totmat[1]);
- }
+ /* the z axis gets mapped onto a third orthogonal vector */
+ cross_v3_v3v3(totmat[2], totmat[0], totmat[1]);
+ }
break;
- case TRACK_nZ: /* LOCK X TRACK -Z */
- {
- /* Projection of Vector on the plane */
- project_v3_v3v3(vec2, vec, cob->matrix[0]);
- sub_v3_v3v3(totmat[2], vec, vec2);
- normalize_v3(totmat[2]);
- negate_v3(totmat[2]);
+ case TRACK_nZ: /* LOCK X TRACK -Z */
+ {
+ /* Projection of Vector on the plane */
+ project_v3_v3v3(vec2, vec, cob->matrix[0]);
+ sub_v3_v3v3(totmat[2], vec, vec2);
+ normalize_v3(totmat[2]);
+ negate_v3(totmat[2]);
- /* the x axis is fixed */
- normalize_v3_v3(totmat[0], cob->matrix[0]);
+ /* the x axis is fixed */
+ normalize_v3_v3(totmat[0], cob->matrix[0]);
- /* the z axis gets mapped onto a third orthogonal vector */
- cross_v3_v3v3(totmat[1], totmat[2], totmat[0]);
- }
+ /* the z axis gets mapped onto a third orthogonal vector */
+ cross_v3_v3v3(totmat[1], totmat[2], totmat[0]);
+ }
break;
- default:
- {
- unit_m3(totmat);
- }
+ default:
+ {
+ unit_m3(totmat);
+ }
break;
+ }
}
- }
break;
- case LOCK_Y: /* LOCK Y */
- {
- switch (data->trackflag) {
- case TRACK_X: /* LOCK Y TRACK X */
- {
- /* Projection of Vector on the plane */
- project_v3_v3v3(vec2, vec, cob->matrix[1]);
- sub_v3_v3v3(totmat[0], vec, vec2);
- normalize_v3(totmat[0]);
+ case LOCK_Y: /* LOCK Y */
+ {
+ switch (data->trackflag) {
+ case TRACK_X: /* LOCK Y TRACK X */
+ {
+ /* Projection of Vector on the plane */
+ project_v3_v3v3(vec2, vec, cob->matrix[1]);
+ sub_v3_v3v3(totmat[0], vec, vec2);
+ normalize_v3(totmat[0]);
- /* the y axis is fixed */
- normalize_v3_v3(totmat[1], cob->matrix[1]);
+ /* the y axis is fixed */
+ normalize_v3_v3(totmat[1], cob->matrix[1]);
- /* the z axis gets mapped onto a third orthogonal vector */
- cross_v3_v3v3(totmat[2], totmat[0], totmat[1]);
- }
+ /* the z axis gets mapped onto a third orthogonal vector */
+ cross_v3_v3v3(totmat[2], totmat[0], totmat[1]);
+ }
break;
- case TRACK_Z: /* LOCK Y TRACK Z */
- {
- /* Projection of Vector on the plane */
- project_v3_v3v3(vec2, vec, cob->matrix[1]);
- sub_v3_v3v3(totmat[2], vec, vec2);
- normalize_v3(totmat[2]);
+ case TRACK_Z: /* LOCK Y TRACK Z */
+ {
+ /* Projection of Vector on the plane */
+ project_v3_v3v3(vec2, vec, cob->matrix[1]);
+ sub_v3_v3v3(totmat[2], vec, vec2);
+ normalize_v3(totmat[2]);
- /* the y axis is fixed */
- normalize_v3_v3(totmat[1], cob->matrix[1]);
+ /* the y axis is fixed */
+ normalize_v3_v3(totmat[1], cob->matrix[1]);
- /* the z axis gets mapped onto a third orthogonal vector */
- cross_v3_v3v3(totmat[0], totmat[1], totmat[2]);
- }
+ /* the z axis gets mapped onto a third orthogonal vector */
+ cross_v3_v3v3(totmat[0], totmat[1], totmat[2]);
+ }
break;
- case TRACK_nX: /* LOCK Y TRACK -X */
- {
- /* Projection of Vector on the plane */
- project_v3_v3v3(vec2, vec, cob->matrix[1]);
- sub_v3_v3v3(totmat[0], vec, vec2);
- normalize_v3(totmat[0]);
- negate_v3(totmat[0]);
+ case TRACK_nX: /* LOCK Y TRACK -X */
+ {
+ /* Projection of Vector on the plane */
+ project_v3_v3v3(vec2, vec, cob->matrix[1]);
+ sub_v3_v3v3(totmat[0], vec, vec2);
+ normalize_v3(totmat[0]);
+ negate_v3(totmat[0]);
- /* the y axis is fixed */
- normalize_v3_v3(totmat[1], cob->matrix[1]);
+ /* the y axis is fixed */
+ normalize_v3_v3(totmat[1], cob->matrix[1]);
- /* the z axis gets mapped onto a third orthogonal vector */
- cross_v3_v3v3(totmat[2], totmat[0], totmat[1]);
- }
+ /* the z axis gets mapped onto a third orthogonal vector */
+ cross_v3_v3v3(totmat[2], totmat[0], totmat[1]);
+ }
break;
- case TRACK_nZ: /* LOCK Y TRACK -Z */
- {
- /* Projection of Vector on the plane */
- project_v3_v3v3(vec2, vec, cob->matrix[1]);
- sub_v3_v3v3(totmat[2], vec, vec2);
- normalize_v3(totmat[2]);
- negate_v3(totmat[2]);
+ case TRACK_nZ: /* LOCK Y TRACK -Z */
+ {
+ /* Projection of Vector on the plane */
+ project_v3_v3v3(vec2, vec, cob->matrix[1]);
+ sub_v3_v3v3(totmat[2], vec, vec2);
+ normalize_v3(totmat[2]);
+ negate_v3(totmat[2]);
- /* the y axis is fixed */
- normalize_v3_v3(totmat[1], cob->matrix[1]);
+ /* the y axis is fixed */
+ normalize_v3_v3(totmat[1], cob->matrix[1]);
- /* the z axis gets mapped onto a third orthogonal vector */
- cross_v3_v3v3(totmat[0], totmat[1], totmat[2]);
- }
+ /* the z axis gets mapped onto a third orthogonal vector */
+ cross_v3_v3v3(totmat[0], totmat[1], totmat[2]);
+ }
break;
- default:
- {
- unit_m3(totmat);
- }
+ default:
+ {
+ unit_m3(totmat);
+ }
break;
+ }
}
- }
break;
- case LOCK_Z: /* LOCK Z */
- {
- switch (data->trackflag) {
- case TRACK_X: /* LOCK Z TRACK X */
- {
- /* Projection of Vector on the plane */
- project_v3_v3v3(vec2, vec, cob->matrix[2]);
- sub_v3_v3v3(totmat[0], vec, vec2);
- normalize_v3(totmat[0]);
+ case LOCK_Z: /* LOCK Z */
+ {
+ switch (data->trackflag) {
+ case TRACK_X: /* LOCK Z TRACK X */
+ {
+ /* Projection of Vector on the plane */
+ project_v3_v3v3(vec2, vec, cob->matrix[2]);
+ sub_v3_v3v3(totmat[0], vec, vec2);
+ normalize_v3(totmat[0]);
- /* the z axis is fixed */
- normalize_v3_v3(totmat[2], cob->matrix[2]);
+ /* the z axis is fixed */
+ normalize_v3_v3(totmat[2], cob->matrix[2]);
- /* the x axis gets mapped onto a third orthogonal vector */
- cross_v3_v3v3(totmat[1], totmat[2], totmat[0]);
- }
+ /* the x axis gets mapped onto a third orthogonal vector */
+ cross_v3_v3v3(totmat[1], totmat[2], totmat[0]);
+ }
break;
- case TRACK_Y: /* LOCK Z TRACK Y */
- {
- /* Projection of Vector on the plane */
- project_v3_v3v3(vec2, vec, cob->matrix[2]);
- sub_v3_v3v3(totmat[1], vec, vec2);
- normalize_v3(totmat[1]);
+ case TRACK_Y: /* LOCK Z TRACK Y */
+ {
+ /* Projection of Vector on the plane */
+ project_v3_v3v3(vec2, vec, cob->matrix[2]);
+ sub_v3_v3v3(totmat[1], vec, vec2);
+ normalize_v3(totmat[1]);
- /* the z axis is fixed */
- normalize_v3_v3(totmat[2], cob->matrix[2]);
+ /* the z axis is fixed */
+ normalize_v3_v3(totmat[2], cob->matrix[2]);
- /* the x axis gets mapped onto a third orthogonal vector */
- cross_v3_v3v3(totmat[0], totmat[1], totmat[2]);
- }
+ /* the x axis gets mapped onto a third orthogonal vector */
+ cross_v3_v3v3(totmat[0], totmat[1], totmat[2]);
+ }
break;
- case TRACK_nX: /* LOCK Z TRACK -X */
- {
- /* Projection of Vector on the plane */
- project_v3_v3v3(vec2, vec, cob->matrix[2]);
- sub_v3_v3v3(totmat[0], vec, vec2);
- normalize_v3(totmat[0]);
- negate_v3(totmat[0]);
+ case TRACK_nX: /* LOCK Z TRACK -X */
+ {
+ /* Projection of Vector on the plane */
+ project_v3_v3v3(vec2, vec, cob->matrix[2]);
+ sub_v3_v3v3(totmat[0], vec, vec2);
+ normalize_v3(totmat[0]);
+ negate_v3(totmat[0]);
- /* the z axis is fixed */
- normalize_v3_v3(totmat[2], cob->matrix[2]);
+ /* the z axis is fixed */
+ normalize_v3_v3(totmat[2], cob->matrix[2]);
- /* the x axis gets mapped onto a third orthogonal vector */
- cross_v3_v3v3(totmat[1], totmat[2], totmat[0]);
- }
+ /* the x axis gets mapped onto a third orthogonal vector */
+ cross_v3_v3v3(totmat[1], totmat[2], totmat[0]);
+ }
break;
- case TRACK_nY: /* LOCK Z TRACK -Y */
- {
- /* Projection of Vector on the plane */
- project_v3_v3v3(vec2, vec, cob->matrix[2]);
- sub_v3_v3v3(totmat[1], vec, vec2);
- normalize_v3(totmat[1]);
- negate_v3(totmat[1]);
+ case TRACK_nY: /* LOCK Z TRACK -Y */
+ {
+ /* Projection of Vector on the plane */
+ project_v3_v3v3(vec2, vec, cob->matrix[2]);
+ sub_v3_v3v3(totmat[1], vec, vec2);
+ normalize_v3(totmat[1]);
+ negate_v3(totmat[1]);
- /* the z axis is fixed */
- normalize_v3_v3(totmat[2], cob->matrix[2]);
+ /* the z axis is fixed */
+ normalize_v3_v3(totmat[2], cob->matrix[2]);
- /* the x axis gets mapped onto a third orthogonal vector */
- cross_v3_v3v3(totmat[0], totmat[1], totmat[2]);
- }
+ /* the x axis gets mapped onto a third orthogonal vector */
+ cross_v3_v3v3(totmat[0], totmat[1], totmat[2]);
+ }
break;
- default:
- {
- unit_m3(totmat);
- }
+ default:
+ {
+ unit_m3(totmat);
+ }
break;
+ }
}
- }
break;
- default:
- {
- unit_m3(totmat);
- }
+ default:
+ {
+ unit_m3(totmat);
+ }
break;
}
/* Block to keep matrix heading */
@@ -2536,16 +2508,16 @@ static void locktrack_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *
normalize_m3(tmpmat);
invert_m3_m3(invmat, tmpmat);
mul_m3_m3m3(tmpmat, totmat, invmat);
- totmat[0][0] = tmpmat[0][0];totmat[0][1] = tmpmat[0][1];totmat[0][2] = tmpmat[0][2];
- totmat[1][0] = tmpmat[1][0];totmat[1][1] = tmpmat[1][1];totmat[1][2] = tmpmat[1][2];
- totmat[2][0] = tmpmat[2][0];totmat[2][1] = tmpmat[2][1];totmat[2][2] = tmpmat[2][2];
+ totmat[0][0] = tmpmat[0][0]; totmat[0][1] = tmpmat[0][1]; totmat[0][2] = tmpmat[0][2];
+ totmat[1][0] = tmpmat[1][0]; totmat[1][1] = tmpmat[1][1]; totmat[1][2] = tmpmat[1][2];
+ totmat[2][0] = tmpmat[2][0]; totmat[2][1] = tmpmat[2][1]; totmat[2][2] = tmpmat[2][2];
copy_m4_m4(tmat, cob->matrix);
- mdet = determinant_m3( totmat[0][0],totmat[0][1],totmat[0][2],
- totmat[1][0],totmat[1][1],totmat[1][2],
- totmat[2][0],totmat[2][1],totmat[2][2]);
- if (mdet==0) {
+ mdet = determinant_m3(totmat[0][0], totmat[0][1], totmat[0][2],
+ totmat[1][0], totmat[1][1], totmat[1][2],
+ totmat[2][0], totmat[2][1], totmat[2][2]);
+ if (mdet == 0) {
unit_m3(totmat);
}
@@ -2560,7 +2532,6 @@ static bConstraintTypeInfo CTI_LOCKTRACK = {
"Locked Track", /* name */
"bLockTrackConstraint", /* struct name */
NULL, /* free data */
- NULL, /* relink data */
locktrack_id_looper, /* id looper */
NULL, /* copy data */
locktrack_new_data, /* new data */
@@ -2572,25 +2543,25 @@ static bConstraintTypeInfo CTI_LOCKTRACK = {
/* ---------- Limit Distance Constraint ----------- */
-static void distlimit_new_data (void *cdata)
+static void distlimit_new_data(void *cdata)
{
- bDistLimitConstraint *data= (bDistLimitConstraint *)cdata;
+ bDistLimitConstraint *data = (bDistLimitConstraint *)cdata;
- data->dist= 0.0f;
+ data->dist = 0.0f;
}
-static void distlimit_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
+static void distlimit_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
{
- bDistLimitConstraint *data= con->data;
+ bDistLimitConstraint *data = con->data;
/* target only */
- func(con, (ID**)&data->tar, userdata);
+ func(con, (ID **)&data->tar, FALSE, userdata);
}
-static int distlimit_get_tars (bConstraint *con, ListBase *list)
+static int distlimit_get_tars(bConstraint *con, ListBase *list)
{
if (con && list) {
- bDistLimitConstraint *data= con->data;
+ bDistLimitConstraint *data = con->data;
bConstraintTarget *ct;
/* standard target-getting macro for single-target constraints */
@@ -2602,40 +2573,40 @@ static int distlimit_get_tars (bConstraint *con, ListBase *list)
return 0;
}
-static void distlimit_flush_tars (bConstraint *con, ListBase *list, short nocopy)
+static void distlimit_flush_tars(bConstraint *con, ListBase *list, short nocopy)
{
if (con && list) {
- bDistLimitConstraint *data= con->data;
- bConstraintTarget *ct= list->first;
+ bDistLimitConstraint *data = con->data;
+ bConstraintTarget *ct = list->first;
/* the following macro is used for all standard single-target constraints */
SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy)
}
}
-static void distlimit_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
+static void distlimit_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targets)
{
- bDistLimitConstraint *data= con->data;
- bConstraintTarget *ct= targets->first;
+ bDistLimitConstraint *data = con->data;
+ bConstraintTarget *ct = targets->first;
/* only evaluate if there is a target */
if (VALID_CONS_TARGET(ct)) {
- float dvec[3], dist=0.0f, sfac=1.0f;
- short clamp_surf= 0;
+ float dvec[3], dist = 0.0f, sfac = 1.0f;
+ short clamp_surf = 0;
/* calculate our current distance from the target */
- dist= len_v3v3(cob->matrix[3], ct->matrix[3]);
+ dist = len_v3v3(cob->matrix[3], ct->matrix[3]);
/* set distance (flag is only set when user demands it) */
if (data->dist == 0)
- data->dist= dist;
+ data->dist = dist;
/* check if we're which way to clamp from, and calculate interpolation factor (if needed) */
if (data->mode == LIMITDIST_OUTSIDE) {
/* if inside, then move to surface */
if (dist <= data->dist) {
- clamp_surf= 1;
- if (dist != 0.0f) sfac= data->dist / dist;
+ clamp_surf = 1;
+ if (dist != 0.0f) sfac = data->dist / dist;
}
/* if soft-distance is enabled, start fading once owner is dist+softdist from the target */
else if (data->flag & LIMITDIST_USESOFT) {
@@ -2647,24 +2618,24 @@ static void distlimit_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *
else if (data->mode == LIMITDIST_INSIDE) {
/* if outside, then move to surface */
if (dist >= data->dist) {
- clamp_surf= 1;
- if (dist != 0.0f) sfac= data->dist / dist;
+ clamp_surf = 1;
+ if (dist != 0.0f) sfac = data->dist / dist;
}
/* if soft-distance is enabled, start fading once owner is dist-soft from the target */
else if (data->flag & LIMITDIST_USESOFT) {
// FIXME: there's a problem with "jumping" when this kicks in
if (dist >= (data->dist - data->soft)) {
- sfac = (float)( data->soft*(1.0f - expf(-(dist - data->dist)/data->soft)) + data->dist );
+ sfac = (float)(data->soft * (1.0f - expf(-(dist - data->dist) / data->soft)) + data->dist);
if (dist != 0.0f) sfac /= dist;
- clamp_surf= 1;
+ clamp_surf = 1;
}
}
}
else {
- if (IS_EQF(dist, data->dist)==0) {
- clamp_surf= 1;
- if (dist != 0.0f) sfac= data->dist / dist;
+ if (IS_EQF(dist, data->dist) == 0) {
+ clamp_surf = 1;
+ if (dist != 0.0f) sfac = data->dist / dist;
}
}
@@ -2685,7 +2656,6 @@ static bConstraintTypeInfo CTI_DISTLIMIT = {
"Limit Distance", /* name */
"bDistLimitConstraint", /* struct name */
NULL, /* free data */
- NULL, /* relink data */
distlimit_id_looper, /* id looper */
NULL, /* copy data */
distlimit_new_data, /* new data */
@@ -2697,9 +2667,9 @@ static bConstraintTypeInfo CTI_DISTLIMIT = {
/* ---------- Stretch To ------------ */
-static void stretchto_new_data (void *cdata)
+static void stretchto_new_data(void *cdata)
{
- bStretchToConstraint *data= (bStretchToConstraint *)cdata;
+ bStretchToConstraint *data = (bStretchToConstraint *)cdata;
data->volmode = 0;
data->plane = 0;
@@ -2707,18 +2677,18 @@ static void stretchto_new_data (void *cdata)
data->bulge = 1.0;
}
-static void stretchto_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
+static void stretchto_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
{
- bStretchToConstraint *data= con->data;
+ bStretchToConstraint *data = con->data;
/* target only */
- func(con, (ID**)&data->tar, userdata);
+ func(con, (ID **)&data->tar, FALSE, userdata);
}
-static int stretchto_get_tars (bConstraint *con, ListBase *list)
+static int stretchto_get_tars(bConstraint *con, ListBase *list)
{
if (con && list) {
- bStretchToConstraint *data= con->data;
+ bStretchToConstraint *data = con->data;
bConstraintTarget *ct;
/* standard target-getting macro for single-target constraints */
@@ -2730,21 +2700,21 @@ static int stretchto_get_tars (bConstraint *con, ListBase *list)
return 0;
}
-static void stretchto_flush_tars (bConstraint *con, ListBase *list, short nocopy)
+static void stretchto_flush_tars(bConstraint *con, ListBase *list, short nocopy)
{
if (con && list) {
- bStretchToConstraint *data= con->data;
- bConstraintTarget *ct= list->first;
+ bStretchToConstraint *data = con->data;
+ bConstraintTarget *ct = list->first;
/* the following macro is used for all standard single-target constraints */
SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy)
}
}
-static void stretchto_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
+static void stretchto_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targets)
{
- bStretchToConstraint *data= con->data;
- bConstraintTarget *ct= targets->first;
+ bStretchToConstraint *data = con->data;
+ bConstraintTarget *ct = targets->first;
/* only evaluate if there is a target */
if (VALID_CONS_TARGET(ct)) {
@@ -2780,40 +2750,40 @@ static void stretchto_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *
if (data->bulge == 0)
data->bulge = 1.0;
- scale[1] = dist/data->orglength;
+ scale[1] = dist / data->orglength;
switch (data->volmode) {
- /* volume preserving scaling */
- case VOLUME_XZ :
- scale[0] = 1.0f - (float)sqrt(data->bulge) + (float)sqrt(data->bulge*(data->orglength/dist));
- scale[2] = scale[0];
- break;
- case VOLUME_X:
- scale[0] = 1.0f + data->bulge * (data->orglength /dist - 1);
- scale[2] = 1.0;
- break;
- case VOLUME_Z:
- scale[0] = 1.0;
- scale[2] = 1.0f + data->bulge * (data->orglength /dist - 1);
- break;
+ /* volume preserving scaling */
+ case VOLUME_XZ:
+ scale[0] = 1.0f - (float)sqrt(data->bulge) + (float)sqrt(data->bulge * (data->orglength / dist));
+ scale[2] = scale[0];
+ break;
+ case VOLUME_X:
+ scale[0] = 1.0f + data->bulge * (data->orglength / dist - 1);
+ scale[2] = 1.0;
+ break;
+ case VOLUME_Z:
+ scale[0] = 1.0;
+ scale[2] = 1.0f + data->bulge * (data->orglength / dist - 1);
+ break;
/* don't care for volume */
- case NO_VOLUME:
- scale[0] = 1.0;
- scale[2] = 1.0;
- break;
- default: /* should not happen, but in case*/
- return;
+ case NO_VOLUME:
+ scale[0] = 1.0;
+ scale[2] = 1.0;
+ break;
+ default: /* should not happen, but in case*/
+ return;
} /* switch (data->volmode) */
/* Clear the object's rotation and scale */
- cob->matrix[0][0]=size[0]*scale[0];
- cob->matrix[0][1]=0;
- cob->matrix[0][2]=0;
- cob->matrix[1][0]=0;
- cob->matrix[1][1]=size[1]*scale[1];
- cob->matrix[1][2]=0;
- cob->matrix[2][0]=0;
- cob->matrix[2][1]=0;
- cob->matrix[2][2]=size[2]*scale[2];
+ cob->matrix[0][0] = size[0] * scale[0];
+ cob->matrix[0][1] = 0;
+ cob->matrix[0][2] = 0;
+ cob->matrix[1][0] = 0;
+ cob->matrix[1][1] = size[1] * scale[1];
+ cob->matrix[1][2] = 0;
+ cob->matrix[2][0] = 0;
+ cob->matrix[2][1] = 0;
+ cob->matrix[2][2] = size[2] * scale[2];
sub_v3_v3v3(vec, cob->matrix[3], ct->matrix[3]);
normalize_v3(vec);
@@ -2821,32 +2791,32 @@ static void stretchto_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *
/* new Y aligns object target connection*/
negate_v3_v3(totmat[1], vec);
switch (data->plane) {
- case PLANE_X:
- /* build new Z vector */
- /* othogonal to "new Y" "old X! plane */
- cross_v3_v3v3(orth, vec, xx);
- normalize_v3(orth);
-
- /* new Z*/
- copy_v3_v3(totmat[2], orth);
-
- /* we decided to keep X plane*/
- cross_v3_v3v3(xx, orth, vec);
- normalize_v3_v3(totmat[0], xx);
- break;
- case PLANE_Z:
- /* build new X vector */
- /* othogonal to "new Y" "old Z! plane */
- cross_v3_v3v3(orth, vec, zz);
- normalize_v3(orth);
-
- /* new X */
- negate_v3_v3(totmat[0], orth);
-
- /* we decided to keep Z */
- cross_v3_v3v3(zz, orth, vec);
- normalize_v3_v3(totmat[2], zz);
- break;
+ case PLANE_X:
+ /* build new Z vector */
+ /* othogonal to "new Y" "old X! plane */
+ cross_v3_v3v3(orth, vec, xx);
+ normalize_v3(orth);
+
+ /* new Z*/
+ copy_v3_v3(totmat[2], orth);
+
+ /* we decided to keep X plane*/
+ cross_v3_v3v3(xx, orth, vec);
+ normalize_v3_v3(totmat[0], xx);
+ break;
+ case PLANE_Z:
+ /* build new X vector */
+ /* othogonal to "new Y" "old Z! plane */
+ cross_v3_v3v3(orth, vec, zz);
+ normalize_v3(orth);
+
+ /* new X */
+ negate_v3_v3(totmat[0], orth);
+
+ /* we decided to keep Z */
+ cross_v3_v3v3(zz, orth, vec);
+ normalize_v3_v3(totmat[2], zz);
+ break;
} /* switch (data->plane) */
copy_m4_m4(tmat, cob->matrix);
@@ -2860,7 +2830,6 @@ static bConstraintTypeInfo CTI_STRETCHTO = {
"Stretch To", /* name */
"bStretchToConstraint", /* struct name */
NULL, /* free data */
- NULL, /* relink data */
stretchto_id_looper, /* id looper */
NULL, /* copy data */
stretchto_new_data, /* new data */
@@ -2872,9 +2841,9 @@ static bConstraintTypeInfo CTI_STRETCHTO = {
/* ---------- Floor ------------ */
-static void minmax_new_data (void *cdata)
+static void minmax_new_data(void *cdata)
{
- bMinMaxConstraint *data= (bMinMaxConstraint *)cdata;
+ bMinMaxConstraint *data = (bMinMaxConstraint *)cdata;
data->minmaxflag = TRACK_Z;
data->offset = 0.0f;
@@ -2882,18 +2851,18 @@ static void minmax_new_data (void *cdata)
data->flag = 0;
}
-static void minmax_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
+static void minmax_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
{
- bMinMaxConstraint *data= con->data;
+ bMinMaxConstraint *data = con->data;
/* target only */
- func(con, (ID**)&data->tar, userdata);
+ func(con, (ID **)&data->tar, FALSE, userdata);
}
-static int minmax_get_tars (bConstraint *con, ListBase *list)
+static int minmax_get_tars(bConstraint *con, ListBase *list)
{
if (con && list) {
- bMinMaxConstraint *data= con->data;
+ bMinMaxConstraint *data = con->data;
bConstraintTarget *ct;
/* standard target-getting macro for single-target constraints */
@@ -2905,21 +2874,21 @@ static int minmax_get_tars (bConstraint *con, ListBase *list)
return 0;
}
-static void minmax_flush_tars (bConstraint *con, ListBase *list, short nocopy)
+static void minmax_flush_tars(bConstraint *con, ListBase *list, short nocopy)
{
if (con && list) {
- bMinMaxConstraint *data= con->data;
- bConstraintTarget *ct= list->first;
+ bMinMaxConstraint *data = con->data;
+ bConstraintTarget *ct = list->first;
/* the following macro is used for all standard single-target constraints */
SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy)
}
}
-static void minmax_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
+static void minmax_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targets)
{
- bMinMaxConstraint *data= con->data;
- bConstraintTarget *ct= targets->first;
+ bMinMaxConstraint *data = con->data;
+ bConstraintTarget *ct = targets->first;
/* only evaluate if there is a target */
if (VALID_CONS_TARGET(ct)) {
@@ -2939,38 +2908,38 @@ static void minmax_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *tar
}
switch (data->minmaxflag) {
- case TRACK_Z:
- val1 = tarmat[3][2];
- val2 = obmat[3][2]-data->offset;
- index = 2;
- break;
- case TRACK_Y:
- val1 = tarmat[3][1];
- val2 = obmat[3][1]-data->offset;
- index = 1;
- break;
- case TRACK_X:
- val1 = tarmat[3][0];
- val2 = obmat[3][0]-data->offset;
- index = 0;
- break;
- case TRACK_nZ:
- val2 = tarmat[3][2];
- val1 = obmat[3][2]-data->offset;
- index = 2;
- break;
- case TRACK_nY:
- val2 = tarmat[3][1];
- val1 = obmat[3][1]-data->offset;
- index = 1;
- break;
- case TRACK_nX:
- val2 = tarmat[3][0];
- val1 = obmat[3][0]-data->offset;
- index = 0;
- break;
- default:
- return;
+ case TRACK_Z:
+ val1 = tarmat[3][2];
+ val2 = obmat[3][2] - data->offset;
+ index = 2;
+ break;
+ case TRACK_Y:
+ val1 = tarmat[3][1];
+ val2 = obmat[3][1] - data->offset;
+ index = 1;
+ break;
+ case TRACK_X:
+ val1 = tarmat[3][0];
+ val2 = obmat[3][0] - data->offset;
+ index = 0;
+ break;
+ case TRACK_nZ:
+ val2 = tarmat[3][2];
+ val1 = obmat[3][2] - data->offset;
+ index = 2;
+ break;
+ case TRACK_nY:
+ val2 = tarmat[3][1];
+ val1 = obmat[3][1] - data->offset;
+ index = 1;
+ break;
+ case TRACK_nX:
+ val2 = tarmat[3][0];
+ val1 = obmat[3][0] - data->offset;
+ index = 0;
+ break;
+ default:
+ return;
}
if (val1 > val2) {
@@ -3005,7 +2974,6 @@ static bConstraintTypeInfo CTI_MINMAX = {
"Floor", /* name */
"bMinMaxConstraint", /* struct name */
NULL, /* free data */
- NULL, /* relink data */
minmax_id_looper, /* id looper */
NULL, /* copy data */
minmax_new_data, /* new data */
@@ -3017,27 +2985,27 @@ static bConstraintTypeInfo CTI_MINMAX = {
/* ------- RigidBody Joint ---------- */
-static void rbj_new_data (void *cdata)
+static void rbj_new_data(void *cdata)
{
- bRigidBodyJointConstraint *data= (bRigidBodyJointConstraint *)cdata;
+ bRigidBodyJointConstraint *data = (bRigidBodyJointConstraint *)cdata;
// removed code which set target of this constraint
- data->type=1;
+ data->type = 1;
}
-static void rbj_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
+static void rbj_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
{
- bRigidBodyJointConstraint *data= con->data;
+ bRigidBodyJointConstraint *data = con->data;
/* target only */
- func(con, (ID**)&data->tar, userdata);
- func(con, (ID**)&data->child, userdata);
+ func(con, (ID **)&data->tar, FALSE, userdata);
+ func(con, (ID **)&data->child, FALSE, userdata);
}
-static int rbj_get_tars (bConstraint *con, ListBase *list)
+static int rbj_get_tars(bConstraint *con, ListBase *list)
{
if (con && list) {
- bRigidBodyJointConstraint *data= con->data;
+ bRigidBodyJointConstraint *data = con->data;
bConstraintTarget *ct;
/* standard target-getting macro for single-target constraints without subtargets */
@@ -3049,11 +3017,11 @@ static int rbj_get_tars (bConstraint *con, ListBase *list)
return 0;
}
-static void rbj_flush_tars (bConstraint *con, ListBase *list, short nocopy)
+static void rbj_flush_tars(bConstraint *con, ListBase *list, short nocopy)
{
if (con && list) {
- bRigidBodyJointConstraint *data= con->data;
- bConstraintTarget *ct= list->first;
+ bRigidBodyJointConstraint *data = con->data;
+ bConstraintTarget *ct = list->first;
/* the following macro is used for all standard single-target constraints */
SINGLETARGETNS_FLUSH_TARS(con, data->tar, ct, list, nocopy)
@@ -3066,7 +3034,6 @@ static bConstraintTypeInfo CTI_RIGIDBODYJOINT = {
"Rigid Body Joint", /* name */
"bRigidBodyJointConstraint", /* struct name */
NULL, /* free data */
- NULL, /* relink data */
rbj_id_looper, /* id looper */
NULL, /* copy data */
rbj_new_data, /* new data */
@@ -3078,18 +3045,18 @@ static bConstraintTypeInfo CTI_RIGIDBODYJOINT = {
/* -------- Clamp To ---------- */
-static void clampto_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
+static void clampto_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
{
- bClampToConstraint *data= con->data;
+ bClampToConstraint *data = con->data;
/* target only */
- func(con, (ID**)&data->tar, userdata);
+ func(con, (ID **)&data->tar, FALSE, userdata);
}
-static int clampto_get_tars (bConstraint *con, ListBase *list)
+static int clampto_get_tars(bConstraint *con, ListBase *list)
{
if (con && list) {
- bClampToConstraint *data= con->data;
+ bClampToConstraint *data = con->data;
bConstraintTarget *ct;
/* standard target-getting macro for single-target constraints without subtargets */
@@ -3101,29 +3068,29 @@ static int clampto_get_tars (bConstraint *con, ListBase *list)
return 0;
}
-static void clampto_flush_tars (bConstraint *con, ListBase *list, short nocopy)
+static void clampto_flush_tars(bConstraint *con, ListBase *list, short nocopy)
{
if (con && list) {
- bClampToConstraint *data= con->data;
- bConstraintTarget *ct= list->first;
+ bClampToConstraint *data = con->data;
+ bConstraintTarget *ct = list->first;
/* the following macro is used for all standard single-target constraints */
SINGLETARGETNS_FLUSH_TARS(con, data->tar, ct, list, nocopy)
}
}
-static void clampto_get_tarmat (bConstraint *UNUSED(con), bConstraintOb *cob, bConstraintTarget *ct, float UNUSED(ctime))
+static void clampto_get_tarmat(bConstraint *UNUSED(con), bConstraintOb *cob, bConstraintTarget *ct, float UNUSED(ctime))
{
if (VALID_CONS_TARGET(ct)) {
- Curve *cu= ct->tar->data;
+ Curve *cu = ct->tar->data;
/* note: when creating constraints that follow path, the curve gets the CU_PATH set now,
* currently for paths to work it needs to go through the bevlist/displist system (ton)
*/
/* only happens on reload file, but violates depsgraph still... fix! */
- if (cu->path==NULL || cu->path->data==NULL)
- makeDispListCurveTypes(cob->scene, ct->tar, 0);
+ if (cu->path == NULL || cu->path->data == NULL)
+ BKE_displist_make_curveTypes(cob->scene, ct->tar, 0);
}
/* technically, this isn't really needed for evaluation, but we don't know what else
@@ -3133,23 +3100,23 @@ static void clampto_get_tarmat (bConstraint *UNUSED(con), bConstraintOb *cob, bC
unit_m4(ct->matrix);
}
-static void clampto_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
+static void clampto_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targets)
{
- bClampToConstraint *data= con->data;
- bConstraintTarget *ct= targets->first;
+ bClampToConstraint *data = con->data;
+ bConstraintTarget *ct = targets->first;
/* only evaluate if there is a target and it is a curve */
if (VALID_CONS_TARGET(ct) && (ct->tar->type == OB_CURVE)) {
- Curve *cu= data->tar->data;
+ Curve *cu = data->tar->data;
float obmat[4][4], ownLoc[3];
float curveMin[3], curveMax[3];
- float targetMatrix[4][4]= MAT4_UNITY;
+ float targetMatrix[4][4] = MAT4_UNITY;
copy_m4_m4(obmat, cob->matrix);
copy_v3_v3(ownLoc, obmat[3]);
INIT_MINMAX(curveMin, curveMax)
- minmax_object(ct->tar, curveMin, curveMax);
+ BKE_object_minmax(ct->tar, curveMin, curveMax);
/* get targetmatrix */
if (cu->path && cu->path->data) {
@@ -3167,20 +3134,20 @@ static void clampto_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *ta
* extent. Otherwise, default to the x-axis, as that is quite
* frequently used.
*/
- if ((size[2]>size[0]) && (size[2]>size[1]))
- clamp_axis= CLAMPTO_Z - 1;
- else if ((size[1]>size[0]) && (size[1]>size[2]))
- clamp_axis= CLAMPTO_Y - 1;
+ if ((size[2] > size[0]) && (size[2] > size[1]))
+ clamp_axis = CLAMPTO_Z - 1;
+ else if ((size[1] > size[0]) && (size[1] > size[2]))
+ clamp_axis = CLAMPTO_Y - 1;
else
clamp_axis = CLAMPTO_X - 1;
}
else
- clamp_axis= data->flag - 1;
+ clamp_axis = data->flag - 1;
/* 2. determine position relative to curve on a 0-1 scale based on bounding box */
if (data->flag2 & CLAMPTO_CYCLIC) {
/* cyclic, so offset within relative bounding box is used */
- float len= (curveMax[clamp_axis] - curveMin[clamp_axis]);
+ float len = (curveMax[clamp_axis] - curveMin[clamp_axis]);
float offset;
/* check to make sure len is not so close to zero that it'll cause errors */
@@ -3195,7 +3162,7 @@ static void clampto_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *ta
}
else if (ownLoc[clamp_axis] > curveMax[clamp_axis]) {
/* bounding-box range is after */
- offset= curveMax[clamp_axis] + (int)((ownLoc[clamp_axis] - curveMax[clamp_axis]) / len) * len;
+ offset = curveMax[clamp_axis] + (int)((ownLoc[clamp_axis] - curveMax[clamp_axis]) / len) * len;
/* now, we calculate as per normal, except using offset instead of curveMax[clamp_axis] */
curvetime = (ownLoc[clamp_axis] - offset) / (len);
@@ -3207,7 +3174,7 @@ static void clampto_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *ta
}
else {
/* as length is close to zero, curvetime by default should be 0 (i.e. the start) */
- curvetime= 0.0f;
+ curvetime = 0.0f;
}
}
else {
@@ -3216,7 +3183,7 @@ static void clampto_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *ta
curvetime = 0.0f;
else if (ownLoc[clamp_axis] >= curveMax[clamp_axis])
curvetime = 1.0f;
- else if ( IS_EQ((curveMax[clamp_axis] - curveMin[clamp_axis]), 0) == 0 )
+ else if (IS_EQ((curveMax[clamp_axis] - curveMin[clamp_axis]), 0) == 0)
curvetime = (ownLoc[clamp_axis] - curveMin[clamp_axis]) / (curveMax[clamp_axis] - curveMin[clamp_axis]);
else
curvetime = 0.0f;
@@ -3242,7 +3209,6 @@ static bConstraintTypeInfo CTI_CLAMPTO = {
"Clamp To", /* name */
"bClampToConstraint", /* struct name */
NULL, /* free data */
- NULL, /* relink data */
clampto_id_looper, /* id looper */
NULL, /* copy data */
NULL, /* new data */
@@ -3254,27 +3220,27 @@ static bConstraintTypeInfo CTI_CLAMPTO = {
/* ---------- Transform Constraint ----------- */
-static void transform_new_data (void *cdata)
+static void transform_new_data(void *cdata)
{
- bTransformConstraint *data= (bTransformConstraint *)cdata;
+ bTransformConstraint *data = (bTransformConstraint *)cdata;
- data->map[0]= 0;
- data->map[1]= 1;
- data->map[2]= 2;
+ data->map[0] = 0;
+ data->map[1] = 1;
+ data->map[2] = 2;
}
-static void transform_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
+static void transform_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
{
- bTransformConstraint *data= con->data;
+ bTransformConstraint *data = con->data;
/* target only */
- func(con, (ID**)&data->tar, userdata);
+ func(con, (ID **)&data->tar, FALSE, userdata);
}
-static int transform_get_tars (bConstraint *con, ListBase *list)
+static int transform_get_tars(bConstraint *con, ListBase *list)
{
if (con && list) {
- bTransformConstraint *data= con->data;
+ bTransformConstraint *data = con->data;
bConstraintTarget *ct;
/* standard target-getting macro for single-target constraints */
@@ -3286,21 +3252,21 @@ static int transform_get_tars (bConstraint *con, ListBase *list)
return 0;
}
-static void transform_flush_tars (bConstraint *con, ListBase *list, short nocopy)
+static void transform_flush_tars(bConstraint *con, ListBase *list, short nocopy)
{
if (con && list) {
- bTransformConstraint *data= con->data;
- bConstraintTarget *ct= list->first;
+ bTransformConstraint *data = con->data;
+ bConstraintTarget *ct = list->first;
/* the following macro is used for all standard single-target constraints */
SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy)
}
}
-static void transform_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
+static void transform_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targets)
{
- bTransformConstraint *data= con->data;
- bConstraintTarget *ct= targets->first;
+ bTransformConstraint *data = con->data;
+ bConstraintTarget *ct = targets->first;
/* only evaluate if there is a target */
if (VALID_CONS_TARGET(ct)) {
@@ -3311,7 +3277,7 @@ static void transform_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *
/* obtain target effect */
switch (data->from) {
case 2: /* scale */
- mat4_to_size( dvec,ct->matrix);
+ mat4_to_size(dvec, ct->matrix);
break;
case 1: /* rotation (convert to degrees first) */
mat4_to_eulO(dvec, cob->rotOrder, ct->matrix);
@@ -3329,21 +3295,21 @@ static void transform_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *
/* determine where in range current transforms lie */
if (data->expo) {
- for (i=0; i<3; i++) {
+ for (i = 0; i < 3; i++) {
if (data->from_max[i] - data->from_min[i])
- sval[i]= (dvec[i] - data->from_min[i]) / (data->from_max[i] - data->from_min[i]);
+ sval[i] = (dvec[i] - data->from_min[i]) / (data->from_max[i] - data->from_min[i]);
else
- sval[i]= 0.0f;
+ sval[i] = 0.0f;
}
}
else {
/* clamp transforms out of range */
- for (i=0; i<3; i++) {
+ for (i = 0; i < 3; i++) {
CLAMP(dvec[i], data->from_min[i], data->from_max[i]);
if (data->from_max[i] - data->from_min[i])
- sval[i]= (dvec[i] - data->from_min[i]) / (data->from_max[i] - data->from_min[i]);
+ sval[i] = (dvec[i] - data->from_min[i]) / (data->from_max[i] - data->from_min[i]);
else
- sval[i]= 0.0f;
+ sval[i] = 0.0f;
}
}
@@ -3351,18 +3317,18 @@ static void transform_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *
/* apply transforms */
switch (data->to) {
case 2: /* scaling */
- for (i=0; i<3; i++)
- size[i]= data->to_min[i] + (sval[(int)data->map[i]] * (data->to_max[i] - data->to_min[i]));
+ for (i = 0; i < 3; i++)
+ size[i] = data->to_min[i] + (sval[(int)data->map[i]] * (data->to_max[i] - data->to_min[i]));
break;
case 1: /* rotation */
- for (i=0; i<3; i++) {
+ for (i = 0; i < 3; i++) {
float tmin, tmax;
- tmin= data->to_min[i];
- tmax= data->to_max[i];
+ tmin = data->to_min[i];
+ tmax = data->to_max[i];
/* all values here should be in degrees */
- eul[i]= tmin + (sval[(int)data->map[i]] * (tmax - tmin));
+ eul[i] = tmin + (sval[(int)data->map[i]] * (tmax - tmin));
/* now convert final value back to radians */
eul[i] = DEG2RADF(eul[i]);
@@ -3370,8 +3336,8 @@ static void transform_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *
break;
default: /* location */
/* get new location */
- for (i=0; i<3; i++)
- loc[i]= (data->to_min[i] + (sval[(int)data->map[i]] * (data->to_max[i] - data->to_min[i])));
+ for (i = 0; i < 3; i++)
+ loc[i] = (data->to_min[i] + (sval[(int)data->map[i]] * (data->to_max[i] - data->to_min[i])));
/* add original location back on (so that it can still be moved) */
add_v3_v3v3(loc, cob->matrix[3], loc);
@@ -3389,7 +3355,6 @@ static bConstraintTypeInfo CTI_TRANSFORM = {
"Transform", /* name */
"bTransformConstraint", /* struct name */
NULL, /* free data */
- NULL, /* relink data */
transform_id_looper, /* id looper */
NULL, /* copy data */
transform_new_data, /* new data */
@@ -3401,15 +3366,15 @@ static bConstraintTypeInfo CTI_TRANSFORM = {
/* ---------- Shrinkwrap Constraint ----------- */
-static void shrinkwrap_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
+static void shrinkwrap_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
{
- bShrinkwrapConstraint *data= con->data;
+ bShrinkwrapConstraint *data = con->data;
/* target only */
- func(con, (ID**)&data->target, userdata);
+ func(con, (ID **)&data->target, FALSE, userdata);
}
-static int shrinkwrap_get_tars (bConstraint *con, ListBase *list)
+static int shrinkwrap_get_tars(bConstraint *con, ListBase *list)
{
if (con && list) {
bShrinkwrapConstraint *data = con->data;
@@ -3424,23 +3389,22 @@ static int shrinkwrap_get_tars (bConstraint *con, ListBase *list)
}
-static void shrinkwrap_flush_tars (bConstraint *con, ListBase *list, short nocopy)
+static void shrinkwrap_flush_tars(bConstraint *con, ListBase *list, short nocopy)
{
if (con && list) {
bShrinkwrapConstraint *data = con->data;
- bConstraintTarget *ct= list->first;
+ bConstraintTarget *ct = list->first;
SINGLETARGETNS_FLUSH_TARS(con, data->target, ct, list, nocopy)
}
}
-static void shrinkwrap_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float UNUSED(ctime))
+static void shrinkwrap_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float UNUSED(ctime))
{
bShrinkwrapConstraint *scon = (bShrinkwrapConstraint *) con->data;
- if ( VALID_CONS_TARGET(ct) && (ct->tar->type == OB_MESH) )
- {
+ if (VALID_CONS_TARGET(ct) && (ct->tar->type == OB_MESH) ) {
int fail = FALSE;
float co[3] = {0.0f, 0.0f, 0.0f};
float no[3] = {0.0f, 0.0f, 0.0f};
@@ -3451,7 +3415,7 @@ static void shrinkwrap_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstr
BVHTreeRayHit hit;
BVHTreeNearest nearest;
- BVHTreeFromMesh treeData= {NULL};
+ BVHTreeFromMesh treeData = {NULL};
nearest.index = -1;
nearest.dist = FLT_MAX;
@@ -3461,12 +3425,10 @@ static void shrinkwrap_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstr
unit_m4(ct->matrix);
- if (target != NULL)
- {
+ if (target != NULL) {
space_transform_from_matrixs(&transform, cob->matrix, ct->tar->obmat);
- switch(scon->shrinkType)
- {
+ switch (scon->shrinkType) {
case MOD_SHRINKWRAP_NEAREST_SURFACE:
case MOD_SHRINKWRAP_NEAREST_VERTEX:
@@ -3475,8 +3437,7 @@ static void shrinkwrap_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstr
else
bvhtree_from_mesh_faces(&treeData, target, 0.0, 2, 6);
- if (treeData.tree == NULL)
- {
+ if (treeData.tree == NULL) {
fail = TRUE;
break;
}
@@ -3487,10 +3448,10 @@ static void shrinkwrap_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstr
dist = len_v3v3(co, nearest.co);
if (dist != 0.0f) {
- interp_v3_v3v3(co, co, nearest.co, (dist - scon->dist)/dist); /* linear interpolation */
+ interp_v3_v3v3(co, co, nearest.co, (dist - scon->dist) / dist); /* linear interpolation */
}
space_transform_invert(&transform, co);
- break;
+ break;
case MOD_SHRINKWRAP_PROJECT:
if (scon->projAxis & MOD_SHRINKWRAP_PROJECT_OVER_X_AXIS) no[0] = 1.0f;
@@ -3506,19 +3467,17 @@ static void shrinkwrap_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstr
bvhtree_from_mesh_faces(&treeData, target, scon->dist, 4, 6);
- if (treeData.tree == NULL)
- {
+ if (treeData.tree == NULL) {
fail = TRUE;
break;
}
- if (normal_projection_project_vertex(0, co, no, &transform, treeData.tree, &hit, treeData.raycast_callback, &treeData) == FALSE)
- {
+ if (normal_projection_project_vertex(0, co, no, &transform, treeData.tree, &hit, treeData.raycast_callback, &treeData) == FALSE) {
fail = TRUE;
break;
}
copy_v3_v3(co, hit.co);
- break;
+ break;
}
free_bvhtree_from_mesh(&treeData);
@@ -3537,13 +3496,12 @@ static void shrinkwrap_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstr
}
}
-static void shrinkwrap_evaluate (bConstraint *UNUSED(con), bConstraintOb *cob, ListBase *targets)
+static void shrinkwrap_evaluate(bConstraint *UNUSED(con), bConstraintOb *cob, ListBase *targets)
{
- bConstraintTarget *ct= targets->first;
+ bConstraintTarget *ct = targets->first;
/* only evaluate if there is a target */
- if (VALID_CONS_TARGET(ct))
- {
+ if (VALID_CONS_TARGET(ct)) {
copy_v3_v3(cob->matrix[3], ct->matrix[3]);
}
}
@@ -3554,7 +3512,6 @@ static bConstraintTypeInfo CTI_SHRINKWRAP = {
"Shrinkwrap", /* name */
"bShrinkwrapConstraint", /* struct name */
NULL, /* free data */
- NULL, /* relink data */
shrinkwrap_id_looper, /* id looper */
NULL, /* copy data */
NULL, /* new data */
@@ -3566,25 +3523,25 @@ static bConstraintTypeInfo CTI_SHRINKWRAP = {
/* --------- Damped Track ---------- */
-static void damptrack_new_data (void *cdata)
+static void damptrack_new_data(void *cdata)
{
- bDampTrackConstraint *data= (bDampTrackConstraint *)cdata;
+ bDampTrackConstraint *data = (bDampTrackConstraint *)cdata;
data->trackflag = TRACK_Y;
}
-static void damptrack_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
+static void damptrack_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
{
- bDampTrackConstraint *data= con->data;
+ bDampTrackConstraint *data = con->data;
/* target only */
- func(con, (ID**)&data->tar, userdata);
+ func(con, (ID **)&data->tar, FALSE, userdata);
}
-static int damptrack_get_tars (bConstraint *con, ListBase *list)
+static int damptrack_get_tars(bConstraint *con, ListBase *list)
{
if (con && list) {
- bDampTrackConstraint *data= con->data;
+ bDampTrackConstraint *data = con->data;
bConstraintTarget *ct;
/* the following macro is used for all standard single-target constraints */
@@ -3596,11 +3553,11 @@ static int damptrack_get_tars (bConstraint *con, ListBase *list)
return 0;
}
-static void damptrack_flush_tars (bConstraint *con, ListBase *list, short nocopy)
+static void damptrack_flush_tars(bConstraint *con, ListBase *list, short nocopy)
{
if (con && list) {
- bDampTrackConstraint *data= con->data;
- bConstraintTarget *ct= list->first;
+ bDampTrackConstraint *data = con->data;
+ bConstraintTarget *ct = list->first;
/* the following macro is used for all standard single-target constraints */
SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy)
@@ -3609,14 +3566,14 @@ static void damptrack_flush_tars (bConstraint *con, ListBase *list, short nocopy
/* array of direction vectors for the tracking flags */
static const float track_dir_vecs[6][3] = {
- {+1,0,0}, {0,+1,0}, {0,0,+1}, /* TRACK_X, TRACK_Y, TRACK_Z */
- {-1,0,0}, {0,-1,0}, {0,0,-1} /* TRACK_NX, TRACK_NY, TRACK_NZ */
+ {+1, 0, 0}, {0, +1, 0}, {0, 0, +1}, /* TRACK_X, TRACK_Y, TRACK_Z */
+ {-1, 0, 0}, {0, -1, 0}, {0, 0, -1} /* TRACK_NX, TRACK_NY, TRACK_NZ */
};
-static void damptrack_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
+static void damptrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targets)
{
- bDampTrackConstraint *data= con->data;
- bConstraintTarget *ct= targets->first;
+ bDampTrackConstraint *data = con->data;
+ bConstraintTarget *ct = targets->first;
if (VALID_CONS_TARGET(ct)) {
float obvec[3], tarvec[3], obloc[3];
@@ -3657,8 +3614,8 @@ static void damptrack_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *
*/
cross_v3_v3v3(raxis, obvec, tarvec);
- rangle= dot_v3v3(obvec, tarvec);
- rangle= acos( MAX2(-1.0f, MIN2(1.0f, rangle)) );
+ rangle = dot_v3v3(obvec, tarvec);
+ rangle = acos(MAX2(-1.0f, MIN2(1.0f, rangle)) );
/* construct rotation matrix from the axis-angle rotation found above
* - this call takes care to make sure that the axis provided is a unit vector first
@@ -3682,7 +3639,6 @@ static bConstraintTypeInfo CTI_DAMPTRACK = {
"Damped Track", /* name */
"bDampTrackConstraint", /* struct name */
NULL, /* free data */
- NULL, /* relink data */
damptrack_id_looper, /* id looper */
NULL, /* copy data */
damptrack_new_data, /* new data */
@@ -3694,43 +3650,43 @@ static bConstraintTypeInfo CTI_DAMPTRACK = {
/* ----------- Spline IK ------------ */
-static void splineik_free (bConstraint *con)
+static void splineik_free(bConstraint *con)
{
- bSplineIKConstraint *data= con->data;
+ bSplineIKConstraint *data = con->data;
/* binding array */
if (data->points)
MEM_freeN(data->points);
}
-static void splineik_copy (bConstraint *con, bConstraint *srccon)
+static void splineik_copy(bConstraint *con, bConstraint *srccon)
{
- bSplineIKConstraint *src= srccon->data;
- bSplineIKConstraint *dst= con->data;
+ bSplineIKConstraint *src = srccon->data;
+ bSplineIKConstraint *dst = con->data;
/* copy the binding array */
- dst->points= MEM_dupallocN(src->points);
+ dst->points = MEM_dupallocN(src->points);
}
-static void splineik_new_data (void *cdata)
+static void splineik_new_data(void *cdata)
{
- bSplineIKConstraint *data= (bSplineIKConstraint *)cdata;
+ bSplineIKConstraint *data = (bSplineIKConstraint *)cdata;
- data->chainlen= 1;
+ data->chainlen = 1;
}
-static void splineik_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
+static void splineik_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
{
- bSplineIKConstraint *data= con->data;
+ bSplineIKConstraint *data = con->data;
/* target only */
- func(con, (ID**)&data->tar, userdata);
+ func(con, (ID **)&data->tar, FALSE, userdata);
}
-static int splineik_get_tars (bConstraint *con, ListBase *list)
+static int splineik_get_tars(bConstraint *con, ListBase *list)
{
if (con && list) {
- bSplineIKConstraint *data= con->data;
+ bSplineIKConstraint *data = con->data;
bConstraintTarget *ct;
/* standard target-getting macro for single-target constraints without subtargets */
@@ -3742,29 +3698,29 @@ static int splineik_get_tars (bConstraint *con, ListBase *list)
return 0;
}
-static void splineik_flush_tars (bConstraint *con, ListBase *list, short nocopy)
+static void splineik_flush_tars(bConstraint *con, ListBase *list, short nocopy)
{
if (con && list) {
- bSplineIKConstraint *data= con->data;
- bConstraintTarget *ct= list->first;
+ bSplineIKConstraint *data = con->data;
+ bConstraintTarget *ct = list->first;
/* the following macro is used for all standard single-target constraints */
SINGLETARGETNS_FLUSH_TARS(con, data->tar, ct, list, nocopy)
}
}
-static void splineik_get_tarmat (bConstraint *UNUSED(con), bConstraintOb *cob, bConstraintTarget *ct, float UNUSED(ctime))
+static void splineik_get_tarmat(bConstraint *UNUSED(con), bConstraintOb *cob, bConstraintTarget *ct, float UNUSED(ctime))
{
if (VALID_CONS_TARGET(ct)) {
- Curve *cu= ct->tar->data;
+ Curve *cu = ct->tar->data;
/* note: when creating constraints that follow path, the curve gets the CU_PATH set now,
* currently for paths to work it needs to go through the bevlist/displist system (ton)
*/
/* only happens on reload file, but violates depsgraph still... fix! */
- if (cu->path==NULL || cu->path->data==NULL)
- makeDispListCurveTypes(cob->scene, ct->tar, 0);
+ if (cu->path == NULL || cu->path->data == NULL)
+ BKE_displist_make_curveTypes(cob->scene, ct->tar, 0);
}
/* technically, this isn't really needed for evaluation, but we don't know what else
@@ -3780,7 +3736,6 @@ static bConstraintTypeInfo CTI_SPLINEIK = {
"Spline IK", /* name */
"bSplineIKConstraint", /* struct name */
splineik_free, /* free data */
- NULL, /* relink data */
splineik_id_looper, /* id looper */
splineik_copy, /* copy data */
splineik_new_data, /* new data */
@@ -3792,18 +3747,18 @@ static bConstraintTypeInfo CTI_SPLINEIK = {
/* ----------- Pivot ------------- */
-static void pivotcon_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
+static void pivotcon_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
{
- bPivotConstraint *data= con->data;
+ bPivotConstraint *data = con->data;
/* target only */
- func(con, (ID**)&data->tar, userdata);
+ func(con, (ID **)&data->tar, FALSE, userdata);
}
-static int pivotcon_get_tars (bConstraint *con, ListBase *list)
+static int pivotcon_get_tars(bConstraint *con, ListBase *list)
{
if (con && list) {
- bPivotConstraint *data= con->data;
+ bPivotConstraint *data = con->data;
bConstraintTarget *ct;
/* standard target-getting macro for single-target constraints */
@@ -3815,21 +3770,21 @@ static int pivotcon_get_tars (bConstraint *con, ListBase *list)
return 0;
}
-static void pivotcon_flush_tars (bConstraint *con, ListBase *list, short nocopy)
+static void pivotcon_flush_tars(bConstraint *con, ListBase *list, short nocopy)
{
if (con && list) {
- bPivotConstraint *data= con->data;
- bConstraintTarget *ct= list->first;
+ bPivotConstraint *data = con->data;
+ bConstraintTarget *ct = list->first;
/* the following macro is used for all standard single-target constraints */
SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy)
}
}
-static void pivotcon_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
+static void pivotcon_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targets)
{
- bPivotConstraint *data= con->data;
- bConstraintTarget *ct= targets->first;
+ bPivotConstraint *data = con->data;
+ bConstraintTarget *ct = targets->first;
float pivot[3], vec[3];
float rotMat[3][3];
@@ -3890,11 +3845,11 @@ static void pivotcon_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *t
}
/* perform the pivoting... */
- /* 1. take the vector from owner to the pivot */
+ /* 1. take the vector from owner to the pivot */
sub_v3_v3v3(vec, cob->matrix[3], pivot);
- /* 2. rotate this vector by the rotation of the object... */
+ /* 2. rotate this vector by the rotation of the object... */
mul_m3_v3(rotMat, vec);
- /* 3. make the rotation in terms of the pivot now */
+ /* 3. make the rotation in terms of the pivot now */
add_v3_v3v3(cob->matrix[3], pivot, vec);
}
@@ -3905,7 +3860,6 @@ static bConstraintTypeInfo CTI_PIVOT = {
"Pivot", /* name */
"bPivotConstraint", /* struct name */
NULL, /* free data */
- NULL, /* relink data */
pivotcon_id_looper, /* id looper */
NULL, /* copy data */
NULL, /* new data */ // XXX: might be needed to get 'normal' pivot behavior...
@@ -3929,9 +3883,9 @@ static void followtrack_id_looper(bConstraint *con, ConstraintIDFunc func, void
{
bFollowTrackConstraint *data = con->data;
- func(con, (ID**)&data->clip, userdata);
- func(con, (ID**)&data->camera, userdata);
- func(con, (ID**)&data->depth_ob, userdata);
+ func(con, (ID **)&data->clip, TRUE, userdata);
+ func(con, (ID **)&data->camera, FALSE, userdata);
+ func(con, (ID **)&data->depth_ob, FALSE, userdata);
}
static void followtrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *UNUSED(targets))
@@ -3942,10 +3896,10 @@ static void followtrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase
MovieTracking *tracking;
MovieTrackingTrack *track;
MovieTrackingObject *tracking_object;
- Object *camob= data->camera ? data->camera : scene->camera;
+ Object *camob = data->camera ? data->camera : scene->camera;
if (data->flag & FOLLOWTRACK_ACTIVECLIP)
- clip= scene->clip;
+ clip = scene->clip;
if (!clip || !data->track[0] || !camob)
return;
@@ -3971,7 +3925,7 @@ static void followtrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase
copy_m4_m4(obmat, cob->matrix);
- if ((tracking_object->flag & TRACKING_OBJECT_CAMERA)==0) {
+ if ((tracking_object->flag & TRACKING_OBJECT_CAMERA) == 0) {
float imat[4][4];
copy_m4_m4(mat, camob->obmat);
@@ -3993,10 +3947,10 @@ static void followtrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase
else {
MovieTrackingMarker *marker;
float vec[3], disp[3], axis[3], mat[4][4];
- float aspect= (scene->r.xsch * scene->r.xasp) / (scene->r.ysch * scene->r.yasp);
+ float aspect = (scene->r.xsch * scene->r.xasp) / (scene->r.ysch * scene->r.yasp);
float len, d;
- where_is_object_mat(scene, camob, mat);
+ BKE_object_where_is_calc_mat4(scene, camob, mat);
/* camera axis */
vec[0] = 0.0f;
@@ -4019,8 +3973,8 @@ static void followtrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase
add_v2_v2v2(pos, marker->pos, track->offset);
- camera_params_init(&params);
- camera_params_from_object(&params, camob);
+ BKE_camera_params_init(&params);
+ BKE_camera_params_from_object(&params, camob);
if (params.is_ortho) {
vec[0] = params.ortho_scale * (pos[0] - 0.5f + params.shiftx);
@@ -4041,7 +3995,7 @@ static void followtrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase
copy_v3_v3(cob->matrix[3], disp);
}
else {
- d= (len * params.sensor_x) / (2.0f * params.lens);
+ d = (len * params.sensor_x) / (2.0f * params.lens);
vec[0] = d * (2.0f * (pos[0] + params.shiftx) - 1.0f);
vec[1] = d * (2.0f * (pos[1] + params.shifty) - 1.0f);
@@ -4099,7 +4053,6 @@ static bConstraintTypeInfo CTI_FOLLOWTRACK = {
"Follow Track", /* name */
"bFollowTrackConstraint", /* struct name */
NULL, /* free data */
- NULL, /* relink data */
followtrack_id_looper, /* id looper */
NULL, /* copy data */
followtrack_new_data, /* new data */
@@ -4123,7 +4076,7 @@ static void camerasolver_id_looper(bConstraint *con, ConstraintIDFunc func, void
{
bCameraSolverConstraint *data = con->data;
- func(con, (ID**)&data->clip, userdata);
+ func(con, (ID **)&data->clip, TRUE, userdata);
}
static void camerasolver_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *UNUSED(targets))
@@ -4154,7 +4107,6 @@ static bConstraintTypeInfo CTI_CAMERASOLVER = {
"Camera Solver", /* name */
"bCameraSolverConstraint", /* struct name */
NULL, /* free data */
- NULL, /* relink data */
camerasolver_id_looper, /* id looper */
NULL, /* copy data */
camerasolver_new_data, /* new data */
@@ -4177,10 +4129,10 @@ static void objectsolver_new_data(void *cdata)
static void objectsolver_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
{
- bObjectSolverConstraint *data= con->data;
+ bObjectSolverConstraint *data = con->data;
- func(con, (ID**)&data->clip, userdata);
- func(con, (ID**)&data->camera, userdata);
+ func(con, (ID **)&data->clip, FALSE, userdata);
+ func(con, (ID **)&data->camera, FALSE, userdata);
}
static void objectsolver_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *UNUSED(targets))
@@ -4191,7 +4143,7 @@ static void objectsolver_evaluate(bConstraint *con, bConstraintOb *cob, ListBase
Object *camob = data->camera ? data->camera : scene->camera;
if (data->flag & OBJECTSOLVER_ACTIVECLIP)
- clip= scene->clip;
+ clip = scene->clip;
if (!camob || !clip)
return;
@@ -4205,7 +4157,7 @@ static void objectsolver_evaluate(bConstraint *con, bConstraintOb *cob, ListBase
if (object) {
float mat[4][4], obmat[4][4], imat[4][4], cammat[4][4], camimat[4][4], parmat[4][4];
- where_is_object_mat(scene, camob, cammat);
+ BKE_object_where_is_calc_mat4(scene, camob, cammat);
BKE_tracking_get_interpolated_camera(tracking, object, scene->r.cfra, mat);
@@ -4228,7 +4180,6 @@ static bConstraintTypeInfo CTI_OBJECTSOLVER = {
"Object Solver", /* name */
"bObjectSolverConstraint", /* struct name */
NULL, /* free data */
- NULL, /* relink data */
objectsolver_id_looper, /* id looper */
NULL, /* copy data */
objectsolver_new_data, /* new data */
@@ -4245,46 +4196,46 @@ static bConstraintTypeInfo CTI_OBJECTSOLVER = {
/* These globals only ever get directly accessed in this file */
static bConstraintTypeInfo *constraintsTypeInfo[NUM_CONSTRAINT_TYPES];
-static short CTI_INIT= 1; /* when non-zero, the list needs to be updated */
+static short CTI_INIT = 1; /* when non-zero, the list needs to be updated */
/* This function only gets called when CTI_INIT is non-zero */
-static void constraints_init_typeinfo (void)
-{
- constraintsTypeInfo[0]= NULL; /* 'Null' Constraint */
- constraintsTypeInfo[1]= &CTI_CHILDOF; /* ChildOf Constraint */
- constraintsTypeInfo[2]= &CTI_TRACKTO; /* TrackTo Constraint */
- constraintsTypeInfo[3]= &CTI_KINEMATIC; /* IK Constraint */
- constraintsTypeInfo[4]= &CTI_FOLLOWPATH; /* Follow-Path Constraint */
- constraintsTypeInfo[5]= &CTI_ROTLIMIT; /* Limit Rotation Constraint */
- constraintsTypeInfo[6]= &CTI_LOCLIMIT; /* Limit Location Constraint */
- constraintsTypeInfo[7]= &CTI_SIZELIMIT; /* Limit Scaling Constraint */
- constraintsTypeInfo[8]= &CTI_ROTLIKE; /* Copy Rotation Constraint */
- constraintsTypeInfo[9]= &CTI_LOCLIKE; /* Copy Location Constraint */
- constraintsTypeInfo[10]= &CTI_SIZELIKE; /* Copy Scaling Constraint */
- constraintsTypeInfo[11]= &CTI_PYTHON; /* Python/Script Constraint */
- constraintsTypeInfo[12]= &CTI_ACTION; /* Action Constraint */
- constraintsTypeInfo[13]= &CTI_LOCKTRACK; /* Locked-Track Constraint */
- constraintsTypeInfo[14]= &CTI_DISTLIMIT; /* Limit Distance Constraint */
- constraintsTypeInfo[15]= &CTI_STRETCHTO; /* StretchTo Constaint */
- constraintsTypeInfo[16]= &CTI_MINMAX; /* Floor Constraint */
- constraintsTypeInfo[17]= &CTI_RIGIDBODYJOINT; /* RigidBody Constraint */
- constraintsTypeInfo[18]= &CTI_CLAMPTO; /* ClampTo Constraint */
- constraintsTypeInfo[19]= &CTI_TRANSFORM; /* Transformation Constraint */
- constraintsTypeInfo[20]= &CTI_SHRINKWRAP; /* Shrinkwrap Constraint */
- constraintsTypeInfo[21]= &CTI_DAMPTRACK; /* Damped TrackTo Constraint */
- constraintsTypeInfo[22]= &CTI_SPLINEIK; /* Spline IK Constraint */
- constraintsTypeInfo[23]= &CTI_TRANSLIKE; /* Copy Transforms Constraint */
- constraintsTypeInfo[24]= &CTI_SAMEVOL; /* Maintain Volume Constraint */
- constraintsTypeInfo[25]= &CTI_PIVOT; /* Pivot Constraint */
- constraintsTypeInfo[26]= &CTI_FOLLOWTRACK; /* Follow Track Constraint */
- constraintsTypeInfo[27]= &CTI_CAMERASOLVER; /* Camera Solver Constraint */
- constraintsTypeInfo[28]= &CTI_OBJECTSOLVER; /* Object Solver Constraint */
+static void constraints_init_typeinfo(void)
+{
+ constraintsTypeInfo[0] = NULL; /* 'Null' Constraint */
+ constraintsTypeInfo[1] = &CTI_CHILDOF; /* ChildOf Constraint */
+ constraintsTypeInfo[2] = &CTI_TRACKTO; /* TrackTo Constraint */
+ constraintsTypeInfo[3] = &CTI_KINEMATIC; /* IK Constraint */
+ constraintsTypeInfo[4] = &CTI_FOLLOWPATH; /* Follow-Path Constraint */
+ constraintsTypeInfo[5] = &CTI_ROTLIMIT; /* Limit Rotation Constraint */
+ constraintsTypeInfo[6] = &CTI_LOCLIMIT; /* Limit Location Constraint */
+ constraintsTypeInfo[7] = &CTI_SIZELIMIT; /* Limit Scaling Constraint */
+ constraintsTypeInfo[8] = &CTI_ROTLIKE; /* Copy Rotation Constraint */
+ constraintsTypeInfo[9] = &CTI_LOCLIKE; /* Copy Location Constraint */
+ constraintsTypeInfo[10] = &CTI_SIZELIKE; /* Copy Scaling Constraint */
+ constraintsTypeInfo[11] = &CTI_PYTHON; /* Python/Script Constraint */
+ constraintsTypeInfo[12] = &CTI_ACTION; /* Action Constraint */
+ constraintsTypeInfo[13] = &CTI_LOCKTRACK; /* Locked-Track Constraint */
+ constraintsTypeInfo[14] = &CTI_DISTLIMIT; /* Limit Distance Constraint */
+ constraintsTypeInfo[15] = &CTI_STRETCHTO; /* StretchTo Constaint */
+ constraintsTypeInfo[16] = &CTI_MINMAX; /* Floor Constraint */
+ constraintsTypeInfo[17] = &CTI_RIGIDBODYJOINT; /* RigidBody Constraint */
+ constraintsTypeInfo[18] = &CTI_CLAMPTO; /* ClampTo Constraint */
+ constraintsTypeInfo[19] = &CTI_TRANSFORM; /* Transformation Constraint */
+ constraintsTypeInfo[20] = &CTI_SHRINKWRAP; /* Shrinkwrap Constraint */
+ constraintsTypeInfo[21] = &CTI_DAMPTRACK; /* Damped TrackTo Constraint */
+ constraintsTypeInfo[22] = &CTI_SPLINEIK; /* Spline IK Constraint */
+ constraintsTypeInfo[23] = &CTI_TRANSLIKE; /* Copy Transforms Constraint */
+ constraintsTypeInfo[24] = &CTI_SAMEVOL; /* Maintain Volume Constraint */
+ constraintsTypeInfo[25] = &CTI_PIVOT; /* Pivot Constraint */
+ constraintsTypeInfo[26] = &CTI_FOLLOWTRACK; /* Follow Track Constraint */
+ constraintsTypeInfo[27] = &CTI_CAMERASOLVER; /* Camera Solver Constraint */
+ constraintsTypeInfo[28] = &CTI_OBJECTSOLVER; /* Object Solver Constraint */
}
/* This function should be used for getting the appropriate type-info when only
* a constraint type is known
*/
-bConstraintTypeInfo *get_constraint_typeinfo (int type)
+bConstraintTypeInfo *get_constraint_typeinfo(int type)
{
/* initialize the type-info list? */
if (CTI_INIT) {
@@ -4294,7 +4245,7 @@ bConstraintTypeInfo *get_constraint_typeinfo (int type)
/* only return for valid types */
if ( (type >= CONSTRAINT_TYPE_NULL) &&
- (type < NUM_CONSTRAINT_TYPES ) )
+ (type < NUM_CONSTRAINT_TYPES) )
{
/* there shouldn't be any segfaults here... */
return constraintsTypeInfo[type];
@@ -4309,7 +4260,7 @@ bConstraintTypeInfo *get_constraint_typeinfo (int type)
/* This function should always be used to get the appropriate type-info, as it
* has checks which prevent segfaults in some weird cases.
*/
-bConstraintTypeInfo *constraint_get_typeinfo (bConstraint *con)
+bConstraintTypeInfo *constraint_get_typeinfo(bConstraint *con)
{
/* only return typeinfo for valid constraints */
if (con)
@@ -4325,17 +4276,31 @@ bConstraintTypeInfo *constraint_get_typeinfo (bConstraint *con)
/* ---------- Data Management ------- */
+/* helper function for free_constraint_data() - unlinks references */
+static void con_unlink_refs_cb(bConstraint *UNUSED(con), ID **idpoin, short isReference, void *UNUSED(userData))
+{
+ if (*idpoin && isReference)
+ id_us_min(*idpoin);
+}
+
/* Free data of a specific constraint if it has any info.
* be sure to run BIK_clear_data() when freeing an IK constraint,
- * unless DAG_scene_sort is called. */
-void free_constraint_data (bConstraint *con)
+ * unless DAG_scene_sort is called.
+ */
+void free_constraint_data(bConstraint *con)
{
if (con->data) {
- bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
+ bConstraintTypeInfo *cti = constraint_get_typeinfo(con);
- /* perform any special freeing constraint may have */
- if (cti && cti->free_data)
- cti->free_data(con);
+ if (cti) {
+ /* perform any special freeing constraint may have */
+ if (cti->free_data)
+ cti->free_data(con);
+
+ /* unlink the referenced resources it uses */
+ if (cti->id_looper)
+ cti->id_looper(con, con_unlink_refs_cb, NULL);
+ }
/* free constraint data now */
MEM_freeN(con->data);
@@ -4343,12 +4308,12 @@ void free_constraint_data (bConstraint *con)
}
/* Free all constraints from a constraint-stack */
-void free_constraints (ListBase *list)
+void free_constraints(ListBase *list)
{
bConstraint *con;
/* Free constraint data and also any extra data */
- for (con= list->first; con; con= con->next)
+ for (con = list->first; con; con = con->next)
free_constraint_data(con);
/* Free the whole list */
@@ -4357,7 +4322,7 @@ void free_constraints (ListBase *list)
/* Remove the specified constraint from the given constraint stack */
-int remove_constraint (ListBase *list, bConstraint *con)
+int remove_constraint(ListBase *list, bConstraint *con)
{
if (con) {
free_constraint_data(con);
@@ -4369,7 +4334,7 @@ int remove_constraint (ListBase *list, bConstraint *con)
}
/* Remove all the constraints of the specified type from the given constraint stack */
-void remove_constraints_type (ListBase *list, short type, short last_only)
+void remove_constraints_type(ListBase *list, short type, short last_only)
{
bConstraint *con, *conp;
@@ -4377,8 +4342,8 @@ void remove_constraints_type (ListBase *list, short type, short last_only)
return;
/* remove from the end of the list to make it faster to find the last instance */
- for (con= list->last; con; con= conp) {
- conp= con->prev;
+ for (con = list->last; con; con = conp) {
+ conp = con->prev;
if (con->type == type) {
remove_constraint(list, con);
@@ -4391,10 +4356,10 @@ void remove_constraints_type (ListBase *list, short type, short last_only)
/* ......... */
/* Creates a new constraint, initializes its data, and returns it */
-static bConstraint *add_new_constraint_internal (const char *name, short type)
+static bConstraint *add_new_constraint_internal(const char *name, short type)
{
- bConstraint *con= MEM_callocN(sizeof(bConstraint), "Constraint");
- bConstraintTypeInfo *cti= get_constraint_typeinfo(type);
+ bConstraint *con = MEM_callocN(sizeof(bConstraint), "Constraint");
+ bConstraintTypeInfo *cti = get_constraint_typeinfo(type);
const char *newName;
/* Set up a generic constraint datablock */
@@ -4412,12 +4377,12 @@ static bConstraint *add_new_constraint_internal (const char *name, short type)
cti->new_data(con->data);
/* if no name is provided, use the type of the constraint as the name */
- newName= (name && name[0]) ? name : cti->name;
+ newName = (name && name[0]) ? name : cti->name;
}
else {
/* if no name is provided, use the generic "Const" name */
// NOTE: any constraint type that gets here really shouldn't get added...
- newName= (name && name[0]) ? name : "Const";
+ newName = (name && name[0]) ? name : "Const";
}
/* copy the name */
@@ -4428,13 +4393,13 @@ static bConstraint *add_new_constraint_internal (const char *name, short type)
}
/* if pchan is not NULL then assume we're adding a pose constraint */
-static bConstraint *add_new_constraint (Object *ob, bPoseChannel *pchan, const char *name, short type)
+static bConstraint *add_new_constraint(Object *ob, bPoseChannel *pchan, const char *name, short type)
{
bConstraint *con;
ListBase *list;
/* add the constraint */
- con= add_new_constraint_internal(name, type);
+ con = add_new_constraint_internal(name, type);
/* find the constraint stack - bone or object? */
list = (pchan) ? (&pchan->constraints) : (&ob->constraints);
@@ -4469,7 +4434,7 @@ static bConstraint *add_new_constraint (Object *ob, bPoseChannel *pchan, const c
con->flag |= CONSTRAINT_SPACEONCE;
}
}
- break;
+ break;
}
return con;
@@ -4478,7 +4443,7 @@ static bConstraint *add_new_constraint (Object *ob, bPoseChannel *pchan, const c
/* ......... */
/* Add new constraint for the given bone */
-bConstraint *add_pose_constraint (Object *ob, bPoseChannel *pchan, const char *name, short type)
+bConstraint *add_pose_constraint(Object *ob, bPoseChannel *pchan, const char *name, short type)
{
if (pchan == NULL)
return NULL;
@@ -4494,43 +4459,34 @@ bConstraint *add_ob_constraint(Object *ob, const char *name, short type)
/* ......... */
+/* helper for relink_constraints() - call ID_NEW() on every ID reference the constraint has */
+static void con_relink_id_cb(bConstraint *UNUSED(con), ID **idpoin, short UNUSED(isReference), void *UNUSED(userdata))
+{
+ /* ID_NEW() expects a struct with inline "id" member as first
+ * since we've got the actual ID block, let's just inline this
+ * code.
+ *
+ * See ID_NEW(a) in BKE_utildefines.h
+ */
+ if ((*idpoin) && (*idpoin)->newid)
+ (*idpoin) = (void *)(*idpoin)->newid;
+}
+
/* Reassign links that constraints have to other data (called during file loading?) */
-void relink_constraints (ListBase *conlist)
+void relink_constraints(ListBase *conlist)
{
- bConstraint *con;
- bConstraintTarget *ct;
-
- for (con= conlist->first; con; con= con->next) {
- bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
-
- if (cti) {
- /* relink any targets */
- if (cti->get_constraint_targets) {
- ListBase targets = {NULL, NULL};
-
- cti->get_constraint_targets(con, &targets);
- for (ct= targets.first; ct; ct= ct->next) {
- ID_NEW(ct->tar);
- }
-
- if (cti->flush_constraint_targets)
- cti->flush_constraint_targets(con, &targets, 0);
- }
-
- /* relink any other special data */
- if (cti->relink_data)
- cti->relink_data(con);
- }
- }
+ /* just a wrapper around ID-loop for just calling ID_NEW() on all ID refs */
+ id_loop_constraints(conlist, con_relink_id_cb, NULL);
}
+
/* Run the given callback on all ID-blocks in list of constraints */
-void id_loop_constraints (ListBase *conlist, ConstraintIDFunc func, void *userdata)
+void id_loop_constraints(ListBase *conlist, ConstraintIDFunc func, void *userdata)
{
bConstraint *con;
- for (con= conlist->first; con; con= con->next) {
- bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
+ for (con = conlist->first; con; con = con->next) {
+ bConstraintTypeInfo *cti = constraint_get_typeinfo(con);
if (cti) {
if (cti->id_looper)
@@ -4542,22 +4498,30 @@ void id_loop_constraints (ListBase *conlist, ConstraintIDFunc func, void *userda
/* ......... */
/* helper for copy_constraints(), to be used for making sure that ID's are valid */
-static void con_extern_cb(bConstraint *UNUSED(con), ID **idpoin, void *UNUSED(userData))
+static void con_extern_cb(bConstraint *UNUSED(con), ID **idpoin, short UNUSED(isReference), void *UNUSED(userData))
{
if (*idpoin && (*idpoin)->lib)
id_lib_extern(*idpoin);
}
+/* helper for copy_constraints(), to be used for making sure that usercounts of copied ID's are fixed up */
+static void con_fix_copied_refs_cb(bConstraint *UNUSED(con), ID **idpoin, short isReference, void *UNUSED(userData))
+{
+ /* increment usercount if this is a reference type */
+ if ((*idpoin) && (isReference))
+ id_us_plus(*idpoin);
+}
+
/* duplicate all of the constraints in a constraint stack */
-void copy_constraints (ListBase *dst, const ListBase *src, int do_extern)
+void copy_constraints(ListBase *dst, const ListBase *src, int do_extern)
{
bConstraint *con, *srccon;
- dst->first= dst->last= NULL;
+ dst->first = dst->last = NULL;
BLI_duplicatelist(dst, src);
- for (con=dst->first, srccon=src->first; con && srccon; srccon=srccon->next, con=con->next) {
- bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
+ for (con = dst->first, srccon = src->first; con && srccon; srccon = srccon->next, con = con->next) {
+ bConstraintTypeInfo *cti = constraint_get_typeinfo(con);
/* make a new copy of the constraint's data */
con->data = MEM_dupallocN(con->data);
@@ -4567,6 +4531,10 @@ void copy_constraints (ListBase *dst, const ListBase *src, int do_extern)
/* perform custom copying operations if needed */
if (cti->copy_data)
cti->copy_data(con, srccon);
+
+ /* fix usercounts for all referenced data in referenced data */
+ if (cti->id_looper)
+ cti->id_looper(con, con_fix_copied_refs_cb, NULL);
/* for proxies we don't want to make extern */
if (do_extern) {
@@ -4586,13 +4554,13 @@ bConstraint *constraints_findByName(ListBase *list, const char *name)
}
/* finds the 'active' constraint in a constraint stack */
-bConstraint *constraints_get_active (ListBase *list)
+bConstraint *constraints_get_active(ListBase *list)
{
bConstraint *con;
/* search for the first constraint with the 'active' flag set */
if (list) {
- for (con= list->first; con; con= con->next) {
+ for (con = list->first; con; con = con->next) {
if (con->flag & CONSTRAINT_ACTIVE)
return con;
}
@@ -4603,12 +4571,12 @@ bConstraint *constraints_get_active (ListBase *list)
}
/* Set the given constraint as the active one (clearing all the others) */
-void constraints_set_active (ListBase *list, bConstraint *con)
+void constraints_set_active(ListBase *list, bConstraint *con)
{
bConstraint *c;
if (list) {
- for (c= list->first; c; c= c->next) {
+ for (c = list->first; c; c = c->next) {
if (c == con)
c->flag |= CONSTRAINT_ACTIVE;
else
@@ -4620,13 +4588,13 @@ void constraints_set_active (ListBase *list, bConstraint *con)
/* -------- Constraints and Proxies ------- */
/* Rescue all constraints tagged as being CONSTRAINT_PROXY_LOCAL (i.e. added to bone that's proxy-synced in this file) */
-void extract_proxylocal_constraints (ListBase *dst, ListBase *src)
+void extract_proxylocal_constraints(ListBase *dst, ListBase *src)
{
bConstraint *con, *next;
/* for each tagged constraint, remove from src and move to dst */
- for (con= src->first; con; con= next) {
- next= con->next;
+ for (con = src->first; con; con = next) {
+ next = con->next;
/* check if tagged */
if (con->flag & CONSTRAINT_PROXY_LOCAL) {
@@ -4637,12 +4605,12 @@ void extract_proxylocal_constraints (ListBase *dst, ListBase *src)
}
/* Returns if the owner of the constraint is proxy-protected */
-short proxylocked_constraints_owner (Object *ob, bPoseChannel *pchan)
+short proxylocked_constraints_owner(Object *ob, bPoseChannel *pchan)
{
/* Currently, constraints can only be on object or bone level */
if (ob && ob->proxy) {
if (ob->pose && pchan) {
- bArmature *arm= ob->data;
+ bArmature *arm = ob->data;
/* On bone-level, check if bone is on proxy-protected layer */
if ((pchan->bone) && (pchan->bone->layer & arm->layer_protected))
@@ -4666,23 +4634,23 @@ short proxylocked_constraints_owner (Object *ob, bPoseChannel *pchan)
* None of the actual calculations of the matrices should be done here! Also, this function is
* not to be used by any new constraints, particularly any that have multiple targets.
*/
-void get_constraint_target_matrix (struct Scene *scene, bConstraint *con, int n, short ownertype, void *ownerdata, float mat[][4], float ctime)
+void get_constraint_target_matrix(struct Scene *scene, bConstraint *con, int n, short ownertype, void *ownerdata, float mat[][4], float ctime)
{
- bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
+ bConstraintTypeInfo *cti = constraint_get_typeinfo(con);
ListBase targets = {NULL, NULL};
bConstraintOb *cob;
bConstraintTarget *ct;
if (cti && cti->get_constraint_targets) {
/* make 'constraint-ob' */
- cob= MEM_callocN(sizeof(bConstraintOb), "tempConstraintOb");
- cob->type= ownertype;
+ cob = MEM_callocN(sizeof(bConstraintOb), "tempConstraintOb");
+ cob->type = ownertype;
cob->scene = scene;
switch (ownertype) {
case CONSTRAINT_OBTYPE_OBJECT: /* it is usually this case */
{
- cob->ob= (Object *)ownerdata;
- cob->pchan= NULL;
+ cob->ob = (Object *)ownerdata;
+ cob->pchan = NULL;
if (cob->ob) {
copy_m4_m4(cob->matrix, cob->ob->obmat);
copy_m4_m4(cob->startmat, cob->matrix);
@@ -4692,11 +4660,11 @@ void get_constraint_target_matrix (struct Scene *scene, bConstraint *con, int n,
unit_m4(cob->startmat);
}
}
- break;
+ break;
case CONSTRAINT_OBTYPE_BONE: /* this may occur in some cases */
{
- cob->ob= NULL; /* this might not work at all :/ */
- cob->pchan= (bPoseChannel *)ownerdata;
+ cob->ob = NULL; /* this might not work at all :/ */
+ cob->pchan = (bPoseChannel *)ownerdata;
if (cob->pchan) {
copy_m4_m4(cob->matrix, cob->pchan->pose_mat);
copy_m4_m4(cob->startmat, cob->matrix);
@@ -4706,16 +4674,16 @@ void get_constraint_target_matrix (struct Scene *scene, bConstraint *con, int n,
unit_m4(cob->startmat);
}
}
- break;
+ break;
}
/* get targets - we only need the first one though (and there should only be one) */
cti->get_constraint_targets(con, &targets);
/* only calculate the target matrix on the first target */
- ct= (bConstraintTarget *)targets.first;
+ ct = (bConstraintTarget *)targets.first;
while (ct && n-- > 0)
- ct= ct->next;
+ ct = ct->next;
if (ct) {
if (cti->get_target_matrix)
@@ -4735,28 +4703,28 @@ void get_constraint_target_matrix (struct Scene *scene, bConstraint *con, int n,
}
/* Get the list of targets required for solving a constraint */
-void get_constraint_targets_for_solving (bConstraint *con, bConstraintOb *cob, ListBase *targets, float ctime)
+void get_constraint_targets_for_solving(bConstraint *con, bConstraintOb *cob, ListBase *targets, float ctime)
{
- bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
+ bConstraintTypeInfo *cti = constraint_get_typeinfo(con);
if (cti && cti->get_constraint_targets) {
bConstraintTarget *ct;
/* get targets
- * - constraints should use ct->matrix, not directly accessing values
+ * - constraints should use ct->matrix, not directly accessing values
* - ct->matrix members have not yet been calculated here!
*/
cti->get_constraint_targets(con, targets);
/* set matrices
- * - calculate if possible, otherwise just initialize as identity matrix
+ * - calculate if possible, otherwise just initialize as identity matrix
*/
if (cti->get_target_matrix) {
- for (ct= targets->first; ct; ct= ct->next)
+ for (ct = targets->first; ct; ct = ct->next)
cti->get_target_matrix(con, cob, ct, ctime);
}
else {
- for (ct= targets->first; ct; ct= ct->next)
+ for (ct = targets->first; ct; ct = ct->next)
unit_m4(ct->matrix);
}
}
@@ -4770,7 +4738,7 @@ void get_constraint_targets_for_solving (bConstraint *con, bConstraintOb *cob, L
* constraints_make_evalob and constraints_clear_evalob should be called before and
* after running this function, to sort out cob
*/
-void solve_constraints (ListBase *conlist, bConstraintOb *cob, float ctime)
+void solve_constraints(ListBase *conlist, bConstraintOb *cob, float ctime)
{
bConstraint *con;
float oldmat[4][4];
@@ -4781,20 +4749,20 @@ void solve_constraints (ListBase *conlist, bConstraintOb *cob, float ctime)
return;
/* loop over available constraints, solving and blending them */
- for (con= conlist->first; con; con= con->next) {
- bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
+ for (con = conlist->first; con; con = con->next) {
+ bConstraintTypeInfo *cti = constraint_get_typeinfo(con);
ListBase targets = {NULL, NULL};
/* these we can skip completely (invalid constraints...) */
if (cti == NULL) continue;
- if (con->flag & (CONSTRAINT_DISABLE|CONSTRAINT_OFF)) continue;
+ if (con->flag & (CONSTRAINT_DISABLE | CONSTRAINT_OFF)) continue;
/* these constraints can't be evaluated anyway */
if (cti->evaluate_constraint == NULL) continue;
/* influence == 0 should be ignored */
if (con->enforce == 0.0f) continue;
/* influence of constraint
- * - value should have been set from animation data already
+ * - value should have been set from animation data already
*/
enf = con->enforce;
@@ -4823,9 +4791,9 @@ void solve_constraints (ListBase *conlist, bConstraintOb *cob, float ctime)
constraint_mat_convertspace(cob->ob, cob->pchan, cob->matrix, con->ownspace, CONSTRAINT_SPACE_WORLD);
/* Interpolate the enforcement, to blend result of constraint into final owner transform
- * - all this happens in worldspace to prevent any weirdness creeping in ([#26014] and [#25725]),
- * since some constraints may not convert the solution back to the input space before blending
- * but all are guaranteed to end up in good "worldspace" result
+ * - all this happens in worldspace to prevent any weirdness creeping in ([#26014] and [#25725]),
+ * since some constraints may not convert the solution back to the input space before blending
+ * but all are guaranteed to end up in good "worldspace" result
*/
/* Note: all kind of stuff here before (caused trouble), much easier to just interpolate, or did I miss something? -jahka */
if (enf < 1.0f) {
diff --git a/source/blender/blenkernel/intern/context.c b/source/blender/blenkernel/intern/context.c
index e9dd4d01b0e..d736309f605 100644
--- a/source/blender/blenkernel/intern/context.c
+++ b/source/blender/blenkernel/intern/context.c
@@ -92,14 +92,14 @@ bContext *CTX_create(void)
{
bContext *C;
- C= MEM_callocN(sizeof(bContext), "bContext");
+ C = MEM_callocN(sizeof(bContext), "bContext");
return C;
}
bContext *CTX_copy(const bContext *C)
{
- bContext *newC= MEM_dupallocN((void*)C);
+ bContext *newC = MEM_dupallocN((void *)C);
return newC;
}
@@ -118,23 +118,23 @@ bContextStore *CTX_store_add(ListBase *contexts, const char *name, PointerRNA *p
/* ensure we have a context to put the entry in, if it was already used
* we have to copy the context to ensure */
- ctx= contexts->last;
+ ctx = contexts->last;
if (!ctx || ctx->used) {
if (ctx) {
- lastctx= ctx;
- ctx= MEM_dupallocN(lastctx);
+ lastctx = ctx;
+ ctx = MEM_dupallocN(lastctx);
BLI_duplicatelist(&ctx->entries, &lastctx->entries);
}
else
- ctx= MEM_callocN(sizeof(bContextStore), "bContextStore");
+ ctx = MEM_callocN(sizeof(bContextStore), "bContextStore");
BLI_addtail(contexts, ctx);
}
- entry= MEM_callocN(sizeof(bContextStoreEntry), "bContextStoreEntry");
+ entry = MEM_callocN(sizeof(bContextStoreEntry), "bContextStoreEntry");
BLI_strncpy(entry->name, name, sizeof(entry->name));
- entry->ptr= *ptr;
+ entry->ptr = *ptr;
BLI_addtail(&ctx->entries, entry);
@@ -148,22 +148,22 @@ bContextStore *CTX_store_add_all(ListBase *contexts, bContextStore *context)
/* ensure we have a context to put the entries in, if it was already used
* we have to copy the context to ensure */
- ctx= contexts->last;
+ ctx = contexts->last;
if (!ctx || ctx->used) {
if (ctx) {
- lastctx= ctx;
- ctx= MEM_dupallocN(lastctx);
+ lastctx = ctx;
+ ctx = MEM_dupallocN(lastctx);
BLI_duplicatelist(&ctx->entries, &lastctx->entries);
}
else
- ctx= MEM_callocN(sizeof(bContextStore), "bContextStore");
+ ctx = MEM_callocN(sizeof(bContextStore), "bContextStore");
BLI_addtail(contexts, ctx);
}
- for (tentry= context->entries.first; tentry; tentry= tentry->next) {
- entry= MEM_dupallocN(tentry);
+ for (tentry = context->entries.first; tentry; tentry = tentry->next) {
+ entry = MEM_dupallocN(tentry);
BLI_addtail(&ctx->entries, entry);
}
@@ -172,14 +172,14 @@ bContextStore *CTX_store_add_all(ListBase *contexts, bContextStore *context)
void CTX_store_set(bContext *C, bContextStore *store)
{
- C->wm.store= store;
+ C->wm.store = store;
}
bContextStore *CTX_store_copy(bContextStore *store)
{
bContextStore *ctx;
- ctx= MEM_dupallocN(store);
+ ctx = MEM_dupallocN(store);
BLI_duplicatelist(&ctx->entries, &store->entries);
return ctx;
@@ -195,20 +195,21 @@ void CTX_store_free_list(ListBase *contexts)
{
bContextStore *ctx;
- while ((ctx= contexts->first)) {
+ while ((ctx = contexts->first)) {
BLI_remlink(contexts, ctx);
CTX_store_free(ctx);
}
}
/* is python initialied? */
+
int CTX_py_init_get(bContext *C)
{
return C->data.py_init;
}
void CTX_py_init_set(bContext *C, int value)
{
- C->data.py_init= value;
+ C->data.py_init = value;
}
void *CTX_py_dict_get(const bContext *C)
@@ -217,238 +218,7 @@ void *CTX_py_dict_get(const bContext *C)
}
void CTX_py_dict_set(bContext *C, void *value)
{
- C->data.py_context= value;
-}
-
-/* window manager context */
-
-wmWindowManager *CTX_wm_manager(const bContext *C)
-{
- return C->wm.manager;
-}
-
-wmWindow *CTX_wm_window(const bContext *C)
-{
- return C->wm.window;
-}
-
-bScreen *CTX_wm_screen(const bContext *C)
-{
- return C->wm.screen;
-}
-
-ScrArea *CTX_wm_area(const bContext *C)
-{
- return C->wm.area;
-}
-
-SpaceLink *CTX_wm_space_data(const bContext *C)
-{
- return (C->wm.area)? C->wm.area->spacedata.first: NULL;
-}
-
-ARegion *CTX_wm_region(const bContext *C)
-{
- return C->wm.region;
-}
-
-void *CTX_wm_region_data(const bContext *C)
-{
- return (C->wm.region)? C->wm.region->regiondata: NULL;
-}
-
-struct ARegion *CTX_wm_menu(const bContext *C)
-{
- return C->wm.menu;
-}
-
-struct ReportList *CTX_wm_reports(const bContext *C)
-{
- if (C->wm.manager)
- return &(C->wm.manager->reports);
-
- return NULL;
-}
-
-View3D *CTX_wm_view3d(const bContext *C)
-{
- if (C->wm.area && C->wm.area->spacetype==SPACE_VIEW3D)
- return C->wm.area->spacedata.first;
- return NULL;
-}
-
-RegionView3D *CTX_wm_region_view3d(const bContext *C)
-{
- if (C->wm.area && C->wm.area->spacetype==SPACE_VIEW3D)
- if (C->wm.region)
- return C->wm.region->regiondata;
- return NULL;
-}
-
-struct SpaceText *CTX_wm_space_text(const bContext *C)
-{
- if (C->wm.area && C->wm.area->spacetype==SPACE_TEXT)
- return C->wm.area->spacedata.first;
- return NULL;
-}
-
-struct SpaceConsole *CTX_wm_space_console(const bContext *C)
-{
- if (C->wm.area && C->wm.area->spacetype==SPACE_CONSOLE)
- return C->wm.area->spacedata.first;
- return NULL;
-}
-
-struct SpaceImage *CTX_wm_space_image(const bContext *C)
-{
- if (C->wm.area && C->wm.area->spacetype==SPACE_IMAGE)
- return C->wm.area->spacedata.first;
- return NULL;
-}
-
-struct SpaceButs *CTX_wm_space_buts(const bContext *C)
-{
- if (C->wm.area && C->wm.area->spacetype==SPACE_BUTS)
- return C->wm.area->spacedata.first;
- return NULL;
-}
-
-struct SpaceFile *CTX_wm_space_file(const bContext *C)
-{
- if (C->wm.area && C->wm.area->spacetype==SPACE_FILE)
- return C->wm.area->spacedata.first;
- return NULL;
-}
-
-struct SpaceSeq *CTX_wm_space_seq(const bContext *C)
-{
- if (C->wm.area && C->wm.area->spacetype==SPACE_SEQ)
- return C->wm.area->spacedata.first;
- return NULL;
-}
-
-struct SpaceOops *CTX_wm_space_outliner(const bContext *C)
-{
- if (C->wm.area && C->wm.area->spacetype==SPACE_OUTLINER)
- return C->wm.area->spacedata.first;
- return NULL;
-}
-
-struct SpaceNla *CTX_wm_space_nla(const bContext *C)
-{
- if (C->wm.area && C->wm.area->spacetype==SPACE_NLA)
- return C->wm.area->spacedata.first;
- return NULL;
-}
-
-struct SpaceTime *CTX_wm_space_time(const bContext *C)
-{
- if (C->wm.area && C->wm.area->spacetype==SPACE_TIME)
- return C->wm.area->spacedata.first;
- return NULL;
-}
-
-struct SpaceNode *CTX_wm_space_node(const bContext *C)
-{
- if (C->wm.area && C->wm.area->spacetype==SPACE_NODE)
- return C->wm.area->spacedata.first;
- return NULL;
-}
-
-struct SpaceLogic *CTX_wm_space_logic(const bContext *C)
-{
- if (C->wm.area && C->wm.area->spacetype==SPACE_LOGIC)
- return C->wm.area->spacedata.first;
- return NULL;
-}
-
-struct SpaceIpo *CTX_wm_space_graph(const bContext *C)
-{
- if (C->wm.area && C->wm.area->spacetype==SPACE_IPO)
- return C->wm.area->spacedata.first;
- return NULL;
-}
-
-struct SpaceAction *CTX_wm_space_action(const bContext *C)
-{
- if (C->wm.area && C->wm.area->spacetype==SPACE_ACTION)
- return C->wm.area->spacedata.first;
- return NULL;
-}
-
-struct SpaceInfo *CTX_wm_space_info(const bContext *C)
-{
- if (C->wm.area && C->wm.area->spacetype==SPACE_INFO)
- return C->wm.area->spacedata.first;
- return NULL;
-}
-
-struct SpaceUserPref *CTX_wm_space_userpref(const bContext *C)
-{
- if (C->wm.area && C->wm.area->spacetype==SPACE_USERPREF)
- return C->wm.area->spacedata.first;
- return NULL;
-}
-
-struct SpaceClip *CTX_wm_space_clip(const bContext *C)
-{
- if (C->wm.area && C->wm.area->spacetype==SPACE_CLIP)
- return C->wm.area->spacedata.first;
- return NULL;
-}
-
-void CTX_wm_manager_set(bContext *C, wmWindowManager *wm)
-{
- C->wm.manager= wm;
- C->wm.window= NULL;
- C->wm.screen= NULL;
- C->wm.area= NULL;
- C->wm.region= NULL;
-}
-
-void CTX_wm_window_set(bContext *C, wmWindow *win)
-{
- C->wm.window= win;
- C->wm.screen= (win)? win->screen: NULL;
- if (C->wm.screen)
- C->data.scene= C->wm.screen->scene;
- C->wm.area= NULL;
- C->wm.region= NULL;
-}
-
-void CTX_wm_screen_set(bContext *C, bScreen *screen)
-{
- C->wm.screen= screen;
- if (C->wm.screen)
- C->data.scene= C->wm.screen->scene;
- C->wm.area= NULL;
- C->wm.region= NULL;
-}
-
-void CTX_wm_area_set(bContext *C, ScrArea *area)
-{
- C->wm.area= area;
- C->wm.region= NULL;
-}
-
-void CTX_wm_region_set(bContext *C, ARegion *region)
-{
- C->wm.region= region;
-}
-
-void CTX_wm_menu_set(bContext *C, ARegion *menu)
-{
- C->wm.menu= menu;
-}
-
-void CTX_wm_operator_poll_msg_set(bContext *C, const char *msg)
-{
- C->wm.operator_poll_msg= msg;
-}
-
-const char *CTX_wm_operator_poll_msg_get(bContext *C)
-{
- return C->wm.operator_poll_msg;
+ C->data.py_context = value;
}
/* data context utility functions */
@@ -460,10 +230,29 @@ struct bContextDataResult {
short type; /* 0: normal, 1: seq */
};
+static void *ctx_wm_python_context_get(const bContext *C, const char *member, void *fall_through)
+{
+#ifdef WITH_PYTHON
+ bContextDataResult result;
+
+ if (C && CTX_py_dict_get(C)) {
+ memset(&result, 0, sizeof(bContextDataResult));
+ BPY_context_member_get((bContext *)C, member, &result);
+ if (result.ptr.data)
+ return result.ptr.data;
+ }
+#endif
+
+ return fall_through;
+}
+
static int ctx_data_get(bContext *C, const char *member, bContextDataResult *result)
{
- int done= 0, recursion= C->data.recursion;
- int ret= 0;
+ bScreen *sc;
+ ScrArea *sa;
+ ARegion *ar;
+ int done = 0, recursion = C->data.recursion;
+ int ret = 0;
memset(result, 0, sizeof(bContextDataResult));
#ifdef WITH_PYTHON
@@ -482,42 +271,42 @@ static int ctx_data_get(bContext *C, const char *member, bContextDataResult *res
* Values in order of importance
* (0, -1, 1) - Where 1 is highest priority
* */
- if (done!=1 && recursion < 1 && C->wm.store) {
+ if (done != 1 && recursion < 1 && C->wm.store) {
bContextStoreEntry *entry;
- C->data.recursion= 1;
+ C->data.recursion = 1;
- entry= BLI_rfindstring(&C->wm.store->entries, member, offsetof(bContextStoreEntry, name));
+ entry = BLI_rfindstring(&C->wm.store->entries, member, offsetof(bContextStoreEntry, name));
if (entry) {
- result->ptr= entry->ptr;
- done= 1;
+ result->ptr = entry->ptr;
+ done = 1;
}
}
- if (done!=1 && recursion < 2 && C->wm.region) {
- C->data.recursion= 2;
- if (C->wm.region->type && C->wm.region->type->context) {
- ret = C->wm.region->type->context(C, member, result);
- if (ret) done= -(-ret | -done);
+ if (done != 1 && recursion < 2 && (ar = CTX_wm_region(C))) {
+ C->data.recursion = 2;
+ if (ar->type && ar->type->context) {
+ ret = ar->type->context(C, member, result);
+ if (ret) done = -(-ret | -done);
}
}
- if (done!=1 && recursion < 3 && C->wm.area) {
- C->data.recursion= 3;
- if (C->wm.area->type && C->wm.area->type->context) {
- ret = C->wm.area->type->context(C, member, result);
- if (ret) done= -(-ret | -done);
+ if (done != 1 && recursion < 3 && (sa = CTX_wm_area(C))) {
+ C->data.recursion = 3;
+ if (sa->type && sa->type->context) {
+ ret = sa->type->context(C, member, result);
+ if (ret) done = -(-ret | -done);
}
}
- if (done!=1 && recursion < 4 && C->wm.screen) {
- bContextDataCallback cb= C->wm.screen->context;
- C->data.recursion= 4;
+ if (done != 1 && recursion < 4 && (sc = CTX_wm_screen(C))) {
+ bContextDataCallback cb = sc->context;
+ C->data.recursion = 4;
if (cb) {
ret = cb(C, member, result);
- if (ret) done= -(-ret | -done);
+ if (ret) done = -(-ret | -done);
}
}
- C->data.recursion= recursion;
+ C->data.recursion = recursion;
return done;
}
@@ -526,7 +315,7 @@ static void *ctx_data_pointer_get(const bContext *C, const char *member)
{
bContextDataResult result;
- if (C && ctx_data_get((bContext*)C, member, &result)==1)
+ if (C && ctx_data_get((bContext *)C, member, &result) == 1)
return result.ptr.data;
return NULL;
@@ -538,15 +327,15 @@ static int ctx_data_pointer_verify(const bContext *C, const char *member, void *
/* if context is NULL, pointer must be NULL too and that is a valid return */
if (C == NULL) {
- *pointer= NULL;
+ *pointer = NULL;
return 1;
}
- else if (ctx_data_get((bContext*)C, member, &result)==1) {
- *pointer= result.ptr.data;
+ else if (ctx_data_get((bContext *)C, member, &result) == 1) {
+ *pointer = result.ptr.data;
return 1;
}
else {
- *pointer= NULL;
+ *pointer = NULL;
return 0;
}
}
@@ -555,13 +344,13 @@ static int ctx_data_collection_get(const bContext *C, const char *member, ListBa
{
bContextDataResult result;
- if (ctx_data_get((bContext*)C, member, &result)==1) {
- *list= result.list;
+ if (ctx_data_get((bContext *)C, member, &result) == 1) {
+ *list = result.list;
return 1;
}
- list->first= NULL;
- list->last= NULL;
+ list->first = NULL;
+ list->last = NULL;
return 0;
}
@@ -570,7 +359,7 @@ PointerRNA CTX_data_pointer_get(const bContext *C, const char *member)
{
bContextDataResult result;
- if (ctx_data_get((bContext*)C, member, &result)==1)
+ if (ctx_data_get((bContext *)C, member, &result) == 1)
return result.ptr;
else
return PointerRNA_NULL;
@@ -590,11 +379,11 @@ ListBase CTX_data_collection_get(const bContext *C, const char *member)
{
bContextDataResult result;
- if (ctx_data_get((bContext*)C, member, &result)==1) {
+ if (ctx_data_get((bContext *)C, member, &result) == 1) {
return result.list;
}
else {
- ListBase list= {NULL, NULL};
+ ListBase list = {NULL, NULL};
return list;
}
}
@@ -603,17 +392,17 @@ ListBase CTX_data_collection_get(const bContext *C, const char *member)
int CTX_data_get(const bContext *C, const char *member, PointerRNA *r_ptr, ListBase *r_lb, short *r_type)
{
bContextDataResult result;
- int ret= ctx_data_get((bContext*)C, member, &result);
+ int ret = ctx_data_get((bContext *)C, member, &result);
- if (ret==1) {
- *r_ptr= result.ptr;
- *r_lb= result.list;
- *r_type= result.type;
+ if (ret == 1) {
+ *r_ptr = result.ptr;
+ *r_lb = result.list;
+ *r_type = result.type;
}
else {
memset(r_ptr, 0, sizeof(*r_ptr));
memset(r_lb, 0, sizeof(*r_lb));
- *r_type= 0;
+ *r_type = 0;
}
return ret;
@@ -629,8 +418,8 @@ static void data_dir_add(ListBase *lb, const char *member)
if (BLI_findstring(lb, member, offsetof(LinkData, data)))
return;
- link= MEM_callocN(sizeof(LinkData), "LinkData");
- link->data= (void*)member;
+ link = MEM_callocN(sizeof(LinkData), "LinkData");
+ link->data = (void *)member;
BLI_addtail(lb, link);
}
@@ -638,6 +427,9 @@ ListBase CTX_data_dir_get(const bContext *C)
{
bContextDataResult result;
ListBase lb;
+ bScreen *sc;
+ ScrArea *sa;
+ ARegion *ar;
int a;
memset(&lb, 0, sizeof(lb));
@@ -645,32 +437,32 @@ ListBase CTX_data_dir_get(const bContext *C)
if (C->wm.store) {
bContextStoreEntry *entry;
- for (entry=C->wm.store->entries.first; entry; entry=entry->next)
+ for (entry = C->wm.store->entries.first; entry; entry = entry->next)
data_dir_add(&lb, entry->name);
}
- if (C->wm.region && C->wm.region->type && C->wm.region->type->context) {
+ if ((ar = CTX_wm_region(C)) && ar->type && ar->type->context) {
memset(&result, 0, sizeof(result));
- C->wm.region->type->context(C, "", &result);
+ ar->type->context(C, "", &result);
if (result.dir)
- for (a=0; result.dir[a]; a++)
+ for (a = 0; result.dir[a]; a++)
data_dir_add(&lb, result.dir[a]);
}
- if (C->wm.area && C->wm.area->type && C->wm.area->type->context) {
+ if ((sa = CTX_wm_area(C)) && sa->type && sa->type->context) {
memset(&result, 0, sizeof(result));
- C->wm.area->type->context(C, "", &result);
+ sa->type->context(C, "", &result);
if (result.dir)
- for (a=0; result.dir[a]; a++)
+ for (a = 0; result.dir[a]; a++)
data_dir_add(&lb, result.dir[a]);
}
- if (C->wm.screen && C->wm.screen->context) {
- bContextDataCallback cb= C->wm.screen->context;
+ if ((sc = CTX_wm_screen(C)) && sc->context) {
+ bContextDataCallback cb = sc->context;
memset(&result, 0, sizeof(result));
cb(C, "", &result);
if (result.dir)
- for (a=0; result.dir[a]; a++)
+ for (a = 0; result.dir[a]; a++)
data_dir_add(&lb, result.dir[a]);
}
@@ -701,7 +493,7 @@ void CTX_data_id_list_add(bContextDataResult *result, ID *id)
{
CollectionPointerLink *link;
- link= MEM_callocN(sizeof(CollectionPointerLink), "CTX_data_id_list_add");
+ link = MEM_callocN(sizeof(CollectionPointerLink), "CTX_data_id_list_add");
RNA_id_pointer_create(id, &link->ptr);
BLI_addtail(&result->list, link);
@@ -711,18 +503,18 @@ void CTX_data_list_add(bContextDataResult *result, ID *id, StructRNA *type, void
{
CollectionPointerLink *link;
- link= MEM_callocN(sizeof(CollectionPointerLink), "CTX_data_list_add");
+ link = MEM_callocN(sizeof(CollectionPointerLink), "CTX_data_list_add");
RNA_pointer_create(id, type, data, &link->ptr);
BLI_addtail(&result->list, link);
}
-int ctx_data_list_count(const bContext *C, int (*func)(const bContext*, ListBase*))
+int ctx_data_list_count(const bContext *C, int (*func)(const bContext *, ListBase *))
{
ListBase list;
if (func(C, &list)) {
- int tot= BLI_countlist(&list);
+ int tot = BLI_countlist(&list);
BLI_freelistN(&list);
return tot;
}
@@ -732,12 +524,12 @@ int ctx_data_list_count(const bContext *C, int (*func)(const bContext*, ListBase
void CTX_data_dir_set(bContextDataResult *result, const char **dir)
{
- result->dir= dir;
+ result->dir = dir;
}
void CTX_data_type_set(bContextDataResult *result, short type)
{
- result->type= type;
+ result->type = type;
}
short CTX_data_type_get(bContextDataResult *result)
@@ -745,13 +537,268 @@ short CTX_data_type_get(bContextDataResult *result)
return result->type;
}
+
+
+/* window manager context */
+
+wmWindowManager *CTX_wm_manager(const bContext *C)
+{
+ return C->wm.manager;
+}
+
+wmWindow *CTX_wm_window(const bContext *C)
+{
+ return ctx_wm_python_context_get(C, "window", C->wm.window);
+}
+
+bScreen *CTX_wm_screen(const bContext *C)
+{
+ return ctx_wm_python_context_get(C, "screen", C->wm.screen);
+}
+
+ScrArea *CTX_wm_area(const bContext *C)
+{
+ return ctx_wm_python_context_get(C, "area", C->wm.area);
+}
+
+SpaceLink *CTX_wm_space_data(const bContext *C)
+{
+ ScrArea *sa = CTX_wm_area(C);
+ return (sa) ? sa->spacedata.first : NULL;
+}
+
+ARegion *CTX_wm_region(const bContext *C)
+{
+ return ctx_wm_python_context_get(C, "region", C->wm.region);
+}
+
+void *CTX_wm_region_data(const bContext *C)
+{
+ ARegion *ar = CTX_wm_region(C);
+ return (ar) ? ar->regiondata : NULL;
+}
+
+struct ARegion *CTX_wm_menu(const bContext *C)
+{
+ return C->wm.menu;
+}
+
+struct ReportList *CTX_wm_reports(const bContext *C)
+{
+ if (C->wm.manager)
+ return &(C->wm.manager->reports);
+
+ return NULL;
+}
+
+View3D *CTX_wm_view3d(const bContext *C)
+{
+ ScrArea *sa = CTX_wm_area(C);
+ if (sa && sa->spacetype == SPACE_VIEW3D)
+ return sa->spacedata.first;
+ return NULL;
+}
+
+RegionView3D *CTX_wm_region_view3d(const bContext *C)
+{
+ ScrArea *sa = CTX_wm_area(C);
+ ARegion *ar = CTX_wm_region(C);
+
+ if (sa && sa->spacetype == SPACE_VIEW3D)
+ if (ar)
+ return ar->regiondata;
+ return NULL;
+}
+
+struct SpaceText *CTX_wm_space_text(const bContext *C)
+{
+ ScrArea *sa = CTX_wm_area(C);
+ if (sa && sa->spacetype == SPACE_TEXT)
+ return sa->spacedata.first;
+ return NULL;
+}
+
+struct SpaceConsole *CTX_wm_space_console(const bContext *C)
+{
+ ScrArea *sa = CTX_wm_area(C);
+ if (sa && sa->spacetype == SPACE_CONSOLE)
+ return sa->spacedata.first;
+ return NULL;
+}
+
+struct SpaceImage *CTX_wm_space_image(const bContext *C)
+{
+ ScrArea *sa = CTX_wm_area(C);
+ if (sa && sa->spacetype == SPACE_IMAGE)
+ return sa->spacedata.first;
+ return NULL;
+}
+
+struct SpaceButs *CTX_wm_space_buts(const bContext *C)
+{
+ ScrArea *sa = CTX_wm_area(C);
+ if (sa && sa->spacetype == SPACE_BUTS)
+ return sa->spacedata.first;
+ return NULL;
+}
+
+struct SpaceFile *CTX_wm_space_file(const bContext *C)
+{
+ ScrArea *sa = CTX_wm_area(C);
+ if (sa && sa->spacetype == SPACE_FILE)
+ return sa->spacedata.first;
+ return NULL;
+}
+
+struct SpaceSeq *CTX_wm_space_seq(const bContext *C)
+{
+ ScrArea *sa = CTX_wm_area(C);
+ if (sa && sa->spacetype == SPACE_SEQ)
+ return sa->spacedata.first;
+ return NULL;
+}
+
+struct SpaceOops *CTX_wm_space_outliner(const bContext *C)
+{
+ ScrArea *sa = CTX_wm_area(C);
+ if (sa && sa->spacetype == SPACE_OUTLINER)
+ return sa->spacedata.first;
+ return NULL;
+}
+
+struct SpaceNla *CTX_wm_space_nla(const bContext *C)
+{
+ ScrArea *sa = CTX_wm_area(C);
+ if (sa && sa->spacetype == SPACE_NLA)
+ return sa->spacedata.first;
+ return NULL;
+}
+
+struct SpaceTime *CTX_wm_space_time(const bContext *C)
+{
+ ScrArea *sa = CTX_wm_area(C);
+ if (sa && sa->spacetype == SPACE_TIME)
+ return sa->spacedata.first;
+ return NULL;
+}
+
+struct SpaceNode *CTX_wm_space_node(const bContext *C)
+{
+ ScrArea *sa = CTX_wm_area(C);
+ if (sa && sa->spacetype == SPACE_NODE)
+ return sa->spacedata.first;
+ return NULL;
+}
+
+struct SpaceLogic *CTX_wm_space_logic(const bContext *C)
+{
+ ScrArea *sa = CTX_wm_area(C);
+ if (sa && sa->spacetype == SPACE_LOGIC)
+ return sa->spacedata.first;
+ return NULL;
+}
+
+struct SpaceIpo *CTX_wm_space_graph(const bContext *C)
+{
+ ScrArea *sa = CTX_wm_area(C);
+ if (sa && sa->spacetype == SPACE_IPO)
+ return sa->spacedata.first;
+ return NULL;
+}
+
+struct SpaceAction *CTX_wm_space_action(const bContext *C)
+{
+ ScrArea *sa = CTX_wm_area(C);
+ if (sa && sa->spacetype == SPACE_ACTION)
+ return sa->spacedata.first;
+ return NULL;
+}
+
+struct SpaceInfo *CTX_wm_space_info(const bContext *C)
+{
+ ScrArea *sa = CTX_wm_area(C);
+ if (sa && sa->spacetype == SPACE_INFO)
+ return sa->spacedata.first;
+ return NULL;
+}
+
+struct SpaceUserPref *CTX_wm_space_userpref(const bContext *C)
+{
+ ScrArea *sa = CTX_wm_area(C);
+ if (sa && sa->spacetype == SPACE_USERPREF)
+ return sa->spacedata.first;
+ return NULL;
+}
+
+struct SpaceClip *CTX_wm_space_clip(const bContext *C)
+{
+ ScrArea *sa = CTX_wm_area(C);
+ if (sa && sa->spacetype == SPACE_CLIP)
+ return sa->spacedata.first;
+ return NULL;
+}
+
+void CTX_wm_manager_set(bContext *C, wmWindowManager *wm)
+{
+ C->wm.manager = wm;
+ C->wm.window = NULL;
+ C->wm.screen = NULL;
+ C->wm.area = NULL;
+ C->wm.region = NULL;
+}
+
+void CTX_wm_window_set(bContext *C, wmWindow *win)
+{
+ C->wm.window = win;
+ C->wm.screen = (win) ? win->screen : NULL;
+ if (C->wm.screen)
+ C->data.scene = C->wm.screen->scene;
+ C->wm.area = NULL;
+ C->wm.region = NULL;
+}
+
+void CTX_wm_screen_set(bContext *C, bScreen *screen)
+{
+ C->wm.screen = screen;
+ if (C->wm.screen)
+ C->data.scene = C->wm.screen->scene;
+ C->wm.area = NULL;
+ C->wm.region = NULL;
+}
+
+void CTX_wm_area_set(bContext *C, ScrArea *area)
+{
+ C->wm.area = area;
+ C->wm.region = NULL;
+}
+
+void CTX_wm_region_set(bContext *C, ARegion *region)
+{
+ C->wm.region = region;
+}
+
+void CTX_wm_menu_set(bContext *C, ARegion *menu)
+{
+ C->wm.menu = menu;
+}
+
+void CTX_wm_operator_poll_msg_set(bContext *C, const char *msg)
+{
+ C->wm.operator_poll_msg = msg;
+}
+
+const char *CTX_wm_operator_poll_msg_get(bContext *C)
+{
+ return C->wm.operator_poll_msg;
+}
+
/* data context */
Main *CTX_data_main(const bContext *C)
{
Main *bmain;
- if (ctx_data_pointer_verify(C, "blend_data", (void*)&bmain))
+ if (ctx_data_pointer_verify(C, "blend_data", (void *)&bmain))
return bmain;
else
return C->data.main;
@@ -759,14 +806,14 @@ Main *CTX_data_main(const bContext *C)
void CTX_data_main_set(bContext *C, Main *bmain)
{
- C->data.main= bmain;
+ C->data.main = bmain;
}
Scene *CTX_data_scene(const bContext *C)
{
Scene *scene;
- if (ctx_data_pointer_verify(C, "scene", (void*)&scene))
+ if (ctx_data_pointer_verify(C, "scene", (void *)&scene))
return scene;
else
return C->data.scene;
@@ -774,10 +821,10 @@ Scene *CTX_data_scene(const bContext *C)
int CTX_data_mode_enum(const bContext *C)
{
- Object *obedit= CTX_data_edit_object(C);
+ Object *obedit = CTX_data_edit_object(C);
if (obedit) {
- switch(obedit->type) {
+ switch (obedit->type) {
case OB_MESH:
return CTX_MODE_EDIT_MESH;
case OB_CURVE:
@@ -799,7 +846,7 @@ int CTX_data_mode_enum(const bContext *C)
if (ob) {
if (ob->mode & OB_MODE_POSE) return CTX_MODE_POSE;
- else if (ob->mode & OB_MODE_SCULPT) return CTX_MODE_SCULPT;
+ else if (ob->mode & OB_MODE_SCULPT) return CTX_MODE_SCULPT;
else if (ob->mode & OB_MODE_WEIGHT_PAINT) return CTX_MODE_PAINT_WEIGHT;
else if (ob->mode & OB_MODE_VERTEX_PAINT) return CTX_MODE_PAINT_VERTEX;
else if (ob->mode & OB_MODE_TEXTURE_PAINT) return CTX_MODE_PAINT_TEXTURE;
@@ -837,7 +884,7 @@ const char *CTX_data_mode_string(const bContext *C)
void CTX_data_scene_set(bContext *C, Scene *scene)
{
- C->data.scene= scene;
+ C->data.scene = scene;
}
ToolSettings *CTX_data_tool_settings(const bContext *C)
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index 9232fe8ec04..43cc63aefa6 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -32,7 +32,7 @@
#include <math.h> // floor
#include <string.h>
-#include <stdlib.h>
+#include <stdlib.h>
#include "MEM_guardedalloc.h"
@@ -42,24 +42,24 @@
#include "BLI_utildefines.h"
#include "BLI_ghash.h"
-#include "DNA_curve_types.h"
-#include "DNA_material_types.h"
+#include "DNA_curve_types.h"
+#include "DNA_material_types.h"
/* for dereferencing pointers */
-#include "DNA_key_types.h"
-#include "DNA_scene_types.h"
-#include "DNA_vfont_types.h"
+#include "DNA_key_types.h"
+#include "DNA_scene_types.h"
+#include "DNA_vfont_types.h"
#include "DNA_object_types.h"
#include "BKE_animsys.h"
-#include "BKE_anim.h"
-#include "BKE_curve.h"
-#include "BKE_displist.h"
-#include "BKE_font.h"
-#include "BKE_global.h"
-#include "BKE_key.h"
-#include "BKE_library.h"
-#include "BKE_main.h"
+#include "BKE_anim.h"
+#include "BKE_curve.h"
+#include "BKE_displist.h"
+#include "BKE_font.h"
+#include "BKE_global.h"
+#include "BKE_key.h"
+#include "BKE_library.h"
+#include "BKE_main.h"
#include "BKE_object.h"
#include "BKE_material.h"
@@ -70,201 +70,222 @@ static int cu_isectLL(const float v1[3], const float v2[3], const float v3[3], c
short cox, short coy,
float *labda, float *mu, float vec[3]);
-void unlink_curve(Curve *cu)
+void BKE_curve_unlink(Curve *cu)
{
int a;
-
- for (a=0; a<cu->totcol; a++) {
+
+ for (a = 0; a < cu->totcol; a++) {
if (cu->mat[a]) cu->mat[a]->id.us--;
- cu->mat[a]= NULL;
+ cu->mat[a] = NULL;
}
- if (cu->vfont) cu->vfont->id.us--;
- cu->vfont= NULL;
+ if (cu->vfont)
+ cu->vfont->id.us--;
+ cu->vfont = NULL;
+
+ if (cu->vfontb)
+ cu->vfontb->id.us--;
+ cu->vfontb = NULL;
- if (cu->vfontb) cu->vfontb->id.us--;
- cu->vfontb= NULL;
+ if (cu->vfonti)
+ cu->vfonti->id.us--;
+ cu->vfonti = NULL;
- if (cu->vfonti) cu->vfonti->id.us--;
- cu->vfonti= NULL;
+ if (cu->vfontbi)
+ cu->vfontbi->id.us--;
+ cu->vfontbi = NULL;
- if (cu->vfontbi) cu->vfontbi->id.us--;
- cu->vfontbi= NULL;
-
- if (cu->key) cu->key->id.us--;
- cu->key= NULL;
+ if (cu->key)
+ cu->key->id.us--;
+ cu->key = NULL;
}
/* frees editcurve entirely */
-void BKE_free_editfont(Curve *cu)
+void BKE_curve_editfont_free(Curve *cu)
{
if (cu->editfont) {
- EditFont *ef= cu->editfont;
-
- if (ef->oldstr) MEM_freeN(ef->oldstr);
- if (ef->oldstrinfo) MEM_freeN(ef->oldstrinfo);
- if (ef->textbuf) MEM_freeN(ef->textbuf);
- if (ef->textbufinfo) MEM_freeN(ef->textbufinfo);
- if (ef->copybuf) MEM_freeN(ef->copybuf);
- if (ef->copybufinfo) MEM_freeN(ef->copybufinfo);
-
+ EditFont *ef = cu->editfont;
+
+ if (ef->oldstr)
+ MEM_freeN(ef->oldstr);
+ if (ef->oldstrinfo)
+ MEM_freeN(ef->oldstrinfo);
+ if (ef->textbuf)
+ MEM_freeN(ef->textbuf);
+ if (ef->textbufinfo)
+ MEM_freeN(ef->textbufinfo);
+ if (ef->copybuf)
+ MEM_freeN(ef->copybuf);
+ if (ef->copybufinfo)
+ MEM_freeN(ef->copybufinfo);
+
MEM_freeN(ef);
- cu->editfont= NULL;
+ cu->editfont = NULL;
}
}
-void free_curve_editNurb_keyIndex(EditNurb *editnurb)
+void BKE_curve_editNurb_keyIndex_free(EditNurb *editnurb)
{
if (!editnurb->keyindex) {
return;
}
BLI_ghash_free(editnurb->keyindex, NULL, (GHashValFreeFP)MEM_freeN);
- editnurb->keyindex= NULL;
+ editnurb->keyindex = NULL;
}
-void free_curve_editNurb (Curve *cu)
+void BKE_curve_editNurb_free(Curve *cu)
{
if (cu->editnurb) {
- freeNurblist(&cu->editnurb->nurbs);
- free_curve_editNurb_keyIndex(cu->editnurb);
+ BKE_nurbList_free(&cu->editnurb->nurbs);
+ BKE_curve_editNurb_keyIndex_free(cu->editnurb);
MEM_freeN(cu->editnurb);
- cu->editnurb= NULL;
+ cu->editnurb = NULL;
}
}
/* don't free curve itself */
-void free_curve(Curve *cu)
+void BKE_curve_free(Curve *cu)
{
- freeNurblist(&cu->nurb);
+ BKE_nurbList_free(&cu->nurb);
BLI_freelistN(&cu->bev);
- freedisplist(&cu->disp);
- BKE_free_editfont(cu);
+ BKE_displist_free(&cu->disp);
+ BKE_curve_editfont_free(cu);
- free_curve_editNurb(cu);
- unlink_curve(cu);
+ BKE_curve_editNurb_free(cu);
+ BKE_curve_unlink(cu);
BKE_free_animdata((ID *)cu);
-
- if (cu->mat) MEM_freeN(cu->mat);
- if (cu->str) MEM_freeN(cu->str);
- if (cu->strinfo) MEM_freeN(cu->strinfo);
- if (cu->bb) MEM_freeN(cu->bb);
- if (cu->path) free_path(cu->path);
- if (cu->tb) MEM_freeN(cu->tb);
+
+ if (cu->mat)
+ MEM_freeN(cu->mat);
+ if (cu->str)
+ MEM_freeN(cu->str);
+ if (cu->strinfo)
+ MEM_freeN(cu->strinfo);
+ if (cu->bb)
+ MEM_freeN(cu->bb);
+ if (cu->path)
+ free_path(cu->path);
+ if (cu->tb)
+ MEM_freeN(cu->tb);
}
-Curve *add_curve(const char *name, int type)
+Curve *BKE_curve_add(const char *name, int type)
{
Curve *cu;
- cu = alloc_libblock(&G.main->curve, ID_CU, name);
+ cu = BKE_libblock_alloc(&G.main->curve, ID_CU, name);
copy_v3_fl(cu->size, 1.0f);
- cu->flag= CU_FRONT|CU_BACK|CU_DEFORM_BOUNDS_OFF|CU_PATH_RADIUS;
- cu->pathlen= 100;
- cu->resolu= cu->resolv= (type == OB_SURF) ? 4 : 12;
- cu->width= 1.0;
+ cu->flag = CU_FRONT | CU_BACK | CU_DEFORM_BOUNDS_OFF | CU_PATH_RADIUS;
+ cu->pathlen = 100;
+ cu->resolu = cu->resolv = (type == OB_SURF) ? 4 : 12;
+ cu->width = 1.0;
cu->wordspace = 1.0;
- cu->spacing= cu->linedist= 1.0;
- cu->fsize= 1.0;
- cu->ulheight = 0.05;
- cu->texflag= CU_AUTOSPACE;
- cu->smallcaps_scale= 0.75f;
- cu->twist_mode= CU_TWIST_MINIMUM; // XXX: this one seems to be the best one in most cases, at least for curve deform...
- cu->type= type;
-
- cu->bb= unit_boundbox();
-
- if (type==OB_FONT) {
- cu->vfont= cu->vfontb= cu->vfonti= cu->vfontbi= get_builtin_font();
- cu->vfont->id.us+=4;
- cu->str= MEM_mallocN(12, "str");
+ cu->spacing = cu->linedist = 1.0;
+ cu->fsize = 1.0;
+ cu->ulheight = 0.05;
+ cu->texflag = CU_AUTOSPACE;
+ cu->smallcaps_scale = 0.75f;
+ /* XXX: this one seems to be the best one in most cases, at least for curve deform... */
+ cu->twist_mode = CU_TWIST_MINIMUM;
+ cu->type = type;
+ cu->bevfac1 = 0.0f;
+ cu->bevfac2 = 1.0f;
+
+ cu->bb = BKE_boundbox_alloc_unit();
+
+ if (type == OB_FONT) {
+ cu->vfont = cu->vfontb = cu->vfonti = cu->vfontbi = BKE_vfont_builtin_get();
+ cu->vfont->id.us += 4;
+ cu->str = MEM_mallocN(12, "str");
BLI_strncpy(cu->str, "Text", 12);
- cu->len= cu->pos= 4;
- cu->strinfo= MEM_callocN(12*sizeof(CharInfo), "strinfo new");
- cu->totbox= cu->actbox= 1;
- cu->tb= MEM_callocN(MAXTEXTBOX*sizeof(TextBox), "textbox");
+ cu->len = cu->pos = 4;
+ cu->strinfo = MEM_callocN(12 * sizeof(CharInfo), "strinfo new");
+ cu->totbox = cu->actbox = 1;
+ cu->tb = MEM_callocN(MAXTEXTBOX * sizeof(TextBox), "textbox");
cu->tb[0].w = cu->tb[0].h = 0.0;
}
-
+
return cu;
}
-Curve *copy_curve(Curve *cu)
+Curve *BKE_curve_copy(Curve *cu)
{
Curve *cun;
int a;
-
- cun= copy_libblock(&cu->id);
- cun->nurb.first= cun->nurb.last= NULL;
- duplicateNurblist( &(cun->nurb), &(cu->nurb));
- cun->mat= MEM_dupallocN(cu->mat);
- for (a=0; a<cun->totcol; a++) {
+ cun = BKE_libblock_copy(&cu->id);
+ cun->nurb.first = cun->nurb.last = NULL;
+ BKE_nurbList_duplicate(&(cun->nurb), &(cu->nurb));
+
+ cun->mat = MEM_dupallocN(cu->mat);
+ for (a = 0; a < cun->totcol; a++) {
id_us_plus((ID *)cun->mat[a]);
}
-
- cun->str= MEM_dupallocN(cu->str);
- cun->strinfo= MEM_dupallocN(cu->strinfo);
- cun->tb= MEM_dupallocN(cu->tb);
- cun->bb= MEM_dupallocN(cu->bb);
-
- cun->key= copy_key(cu->key);
- if (cun->key) cun->key->from= (ID *)cun;
-
- cun->disp.first= cun->disp.last= NULL;
- cun->bev.first= cun->bev.last= NULL;
- cun->path= NULL;
-
- cun->editnurb= NULL;
- cun->editfont= NULL;
- cun->selboxes= NULL;
-
-#if 0 // XXX old animation system
+
+ cun->str = MEM_dupallocN(cu->str);
+ cun->strinfo = MEM_dupallocN(cu->strinfo);
+ cun->tb = MEM_dupallocN(cu->tb);
+ cun->bb = MEM_dupallocN(cu->bb);
+
+ cun->key = BKE_key_copy(cu->key);
+ if (cun->key) cun->key->from = (ID *)cun;
+
+ cun->disp.first = cun->disp.last = NULL;
+ cun->bev.first = cun->bev.last = NULL;
+ cun->path = NULL;
+
+ cun->editnurb = NULL;
+ cun->editfont = NULL;
+ cun->selboxes = NULL;
+
+#if 0 // XXX old animation system
/* single user ipo too */
- if (cun->ipo) cun->ipo= copy_ipo(cun->ipo);
+ if (cun->ipo) cun->ipo = copy_ipo(cun->ipo);
#endif // XXX old animation system
id_us_plus((ID *)cun->vfont);
- id_us_plus((ID *)cun->vfontb);
+ id_us_plus((ID *)cun->vfontb);
id_us_plus((ID *)cun->vfonti);
id_us_plus((ID *)cun->vfontbi);
-
+
return cun;
}
static void extern_local_curve(Curve *cu)
-{
+{
id_lib_extern((ID *)cu->vfont);
- id_lib_extern((ID *)cu->vfontb);
+ id_lib_extern((ID *)cu->vfontb);
id_lib_extern((ID *)cu->vfonti);
id_lib_extern((ID *)cu->vfontbi);
-
+
if (cu->mat) {
extern_local_matarar(cu->mat, cu->totcol);
}
}
-void make_local_curve(Curve *cu)
+void BKE_curve_make_local(Curve *cu)
{
- Main *bmain= G.main;
+ Main *bmain = G.main;
Object *ob;
- int is_local= FALSE, is_lib= FALSE;
-
+ int is_local = FALSE, is_lib = FALSE;
+
/* - when there are only lib users: don't do
* - when there are only local users: set flag
* - mixed: do a copy
*/
-
- if (cu->id.lib==NULL) return;
- if (cu->id.us==1) {
+ if (cu->id.lib == NULL)
+ return;
+
+ if (cu->id.us == 1) {
id_clear_lib_data(bmain, &cu->id);
extern_local_curve(cu);
return;
}
- for (ob= bmain->object.first; ob && ELEM(0, is_lib, is_local); ob= ob->id.next) {
+ for (ob = bmain->object.first; ob && ELEM(0, is_lib, is_local); ob = ob->id.next) {
if (ob->data == cu) {
- if (ob->id.lib) is_lib= TRUE;
- else is_local= TRUE;
+ if (ob->id.lib) is_lib = TRUE;
+ else is_local = TRUE;
}
}
@@ -273,15 +294,15 @@ void make_local_curve(Curve *cu)
extern_local_curve(cu);
}
else if (is_local && is_lib) {
- Curve *cu_new= copy_curve(cu);
- cu_new->id.us= 0;
+ Curve *cu_new = BKE_curve_copy(cu);
+ cu_new->id.us = 0;
BKE_id_lib_local_paths(bmain, cu->id.lib, &cu_new->id);
- for (ob= bmain->object.first; ob; ob= ob->id.next) {
- if (ob->data==cu) {
- if (ob->id.lib==NULL) {
- ob->data= cu_new;
+ for (ob = bmain->object.first; ob; ob = ob->id.next) {
+ if (ob->data == cu) {
+ if (ob->id.lib == NULL) {
+ ob->data = cu_new;
cu_new->id.us++;
cu->id.us--;
}
@@ -291,7 +312,7 @@ void make_local_curve(Curve *cu)
}
/* Get list of nurbs from editnurbs structure */
-ListBase *curve_editnurbs(Curve *cu)
+ListBase *BKE_curve_editNurbs_get(Curve *cu)
{
if (cu->editnurb) {
return &cu->editnurb->nurbs;
@@ -300,21 +321,21 @@ ListBase *curve_editnurbs(Curve *cu)
return NULL;
}
-short curve_type(Curve *cu)
+short BKE_curve_type_get(Curve *cu)
{
Nurb *nu;
- int type= cu->type;
+ int type = cu->type;
if (cu->vfont) {
return OB_FONT;
}
if (!cu->type) {
- type= OB_CURVE;
+ type = OB_CURVE;
- for (nu= cu->nurb.first; nu; nu= nu->next) {
- if (nu->pntsv>1) {
- type= OB_SURF;
+ for (nu = cu->nurb.first; nu; nu = nu->next) {
+ if (nu->pntsv > 1) {
+ type = OB_SURF;
}
}
}
@@ -322,60 +343,60 @@ short curve_type(Curve *cu)
return type;
}
-void update_curve_dimension(Curve *cu)
+void BKE_curve_curve_dimension_update(Curve *cu)
{
- ListBase *nurbs= BKE_curve_nurbs(cu);
- Nurb *nu= nurbs->first;
+ ListBase *nurbs = BKE_curve_nurbs_get(cu);
+ Nurb *nu = nurbs->first;
- if (cu->flag&CU_3D) {
- for ( ; nu; nu= nu->next) {
+ if (cu->flag & CU_3D) {
+ for (; nu; nu = nu->next) {
nu->flag &= ~CU_2D;
}
}
else {
- for ( ; nu; nu= nu->next) {
+ for (; nu; nu = nu->next) {
nu->flag |= CU_2D;
- test2DNurb(nu);
+ BKE_nurb_test2D(nu);
/* since the handles are moved they need to be auto-located again */
if (nu->type == CU_BEZIER)
- calchandlesNurb(nu);
+ BKE_nurb_handles_calc(nu);
}
}
}
-void test_curve_type(Object *ob)
+void BKE_curve_type_test(Object *ob)
{
- ob->type= curve_type(ob->data);
+ ob->type = BKE_curve_type_get(ob->data);
- if (ob->type==OB_CURVE)
- update_curve_dimension((Curve *)ob->data);
+ if (ob->type == OB_CURVE)
+ BKE_curve_curve_dimension_update((Curve *)ob->data);
}
-void tex_space_curve(Curve *cu)
+void BKE_curve_texspace_calc(Curve *cu)
{
DispList *dl;
BoundBox *bb;
float *fp, min[3], max[3];
- int tot, doit= 0;
-
- if (cu->bb==NULL) cu->bb= MEM_callocN(sizeof(BoundBox), "boundbox");
- bb= cu->bb;
-
+ int tot, doit = 0;
+
+ if (cu->bb == NULL)
+ cu->bb = MEM_callocN(sizeof(BoundBox), "boundbox");
+ bb = cu->bb;
+
INIT_MINMAX(min, max);
- dl= cu->disp.first;
+ dl = cu->disp.first;
while (dl) {
-
tot = ELEM(dl->type, DL_INDEX3, DL_INDEX4) ? dl->nr : dl->nr * dl->parts;
- if (tot) doit= 1;
- fp= dl->verts;
+ if (tot) doit = 1;
+ fp = dl->verts;
while (tot--) {
DO_MINMAX(fp, min, max);
fp += 3;
}
- dl= dl->next;
+ dl = dl->next;
}
if (!doit) {
@@ -383,76 +404,84 @@ void tex_space_curve(Curve *cu)
max[0] = max[1] = max[2] = 1.0f;
}
- boundbox_set_from_min_max(bb, min, max);
+ BKE_boundbox_init_from_minmax(bb, min, max);
if (cu->texflag & CU_AUTOSPACE) {
mid_v3_v3v3(cu->loc, min, max);
- cu->size[0]= (max[0]-min[0])/2.0f;
- cu->size[1]= (max[1]-min[1])/2.0f;
- cu->size[2]= (max[2]-min[2])/2.0f;
+ cu->size[0] = (max[0] - min[0]) / 2.0f;
+ cu->size[1] = (max[1] - min[1]) / 2.0f;
+ cu->size[2] = (max[2] - min[2]) / 2.0f;
zero_v3(cu->rot);
- if (cu->size[0]==0.0f) cu->size[0]= 1.0f;
- else if (cu->size[0]>0.0f && cu->size[0]<0.00001f) cu->size[0]= 0.00001f;
- else if (cu->size[0]<0.0f && cu->size[0]> -0.00001f) cu->size[0]= -0.00001f;
-
- if (cu->size[1]==0.0f) cu->size[1]= 1.0f;
- else if (cu->size[1]>0.0f && cu->size[1]<0.00001f) cu->size[1]= 0.00001f;
- else if (cu->size[1]<0.0f && cu->size[1]> -0.00001f) cu->size[1]= -0.00001f;
-
- if (cu->size[2]==0.0f) cu->size[2]= 1.0f;
- else if (cu->size[2]>0.0f && cu->size[2]<0.00001f) cu->size[2]= 0.00001f;
- else if (cu->size[2]<0.0f && cu->size[2]> -0.00001f) cu->size[2]= -0.00001f;
+ if (cu->size[0] == 0.0f) cu->size[0] = 1.0f;
+ else if (cu->size[0] > 0.0f && cu->size[0] < 0.00001f) cu->size[0] = 0.00001f;
+ else if (cu->size[0] < 0.0f && cu->size[0] > -0.00001f) cu->size[0] = -0.00001f;
+
+ if (cu->size[1] == 0.0f) cu->size[1] = 1.0f;
+ else if (cu->size[1] > 0.0f && cu->size[1] < 0.00001f) cu->size[1] = 0.00001f;
+ else if (cu->size[1] < 0.0f && cu->size[1] > -0.00001f) cu->size[1] = -0.00001f;
+
+ if (cu->size[2] == 0.0f) cu->size[2] = 1.0f;
+ else if (cu->size[2] > 0.0f && cu->size[2] < 0.00001f) cu->size[2] = 0.00001f;
+ else if (cu->size[2] < 0.0f && cu->size[2] > -0.00001f) cu->size[2] = -0.00001f;
}
}
-int count_curveverts(ListBase *nurb)
+int BKE_nurbList_verts_count(ListBase *nurb)
{
Nurb *nu;
- int tot=0;
-
- nu= nurb->first;
+ int tot = 0;
+
+ nu = nurb->first;
while (nu) {
- if (nu->bezt) tot+= 3*nu->pntsu;
- else if (nu->bp) tot+= nu->pntsu*nu->pntsv;
-
- nu= nu->next;
+ if (nu->bezt)
+ tot += 3 * nu->pntsu;
+ else if (nu->bp)
+ tot += nu->pntsu * nu->pntsv;
+
+ nu = nu->next;
}
return tot;
}
-int count_curveverts_without_handles(ListBase *nurb)
+int BKE_nurbList_verts_count_without_handles(ListBase *nurb)
{
Nurb *nu;
- int tot=0;
-
- nu= nurb->first;
+ int tot = 0;
+
+ nu = nurb->first;
while (nu) {
- if (nu->bezt) tot+= nu->pntsu;
- else if (nu->bp) tot+= nu->pntsu*nu->pntsv;
-
- nu= nu->next;
+ if (nu->bezt)
+ tot += nu->pntsu;
+ else if (nu->bp)
+ tot += nu->pntsu * nu->pntsv;
+
+ nu = nu->next;
}
return tot;
}
/* **************** NURBS ROUTINES ******************** */
-void freeNurb(Nurb *nu)
+void BKE_nurb_free(Nurb *nu)
{
- if (nu==NULL) return;
+ if (nu == NULL) return;
- if (nu->bezt) MEM_freeN(nu->bezt);
- nu->bezt= NULL;
- if (nu->bp) MEM_freeN(nu->bp);
- nu->bp= NULL;
- if (nu->knotsu) MEM_freeN(nu->knotsu);
- nu->knotsu= NULL;
- if (nu->knotsv) MEM_freeN(nu->knotsv);
- nu->knotsv= NULL;
+ if (nu->bezt)
+ MEM_freeN(nu->bezt);
+ nu->bezt = NULL;
+ if (nu->bp)
+ MEM_freeN(nu->bp);
+ nu->bp = NULL;
+ if (nu->knotsu)
+ MEM_freeN(nu->knotsu);
+ nu->knotsu = NULL;
+ if (nu->knotsv)
+ MEM_freeN(nu->knotsv);
+ nu->knotsv = NULL;
/* if (nu->trim.first) freeNurblist(&(nu->trim)); */
MEM_freeN(nu);
@@ -460,114 +489,114 @@ void freeNurb(Nurb *nu)
}
-void freeNurblist(ListBase *lb)
+void BKE_nurbList_free(ListBase *lb)
{
Nurb *nu, *next;
- if (lb==NULL) return;
+ if (lb == NULL) return;
- nu= lb->first;
+ nu = lb->first;
while (nu) {
- next= nu->next;
- freeNurb(nu);
- nu= next;
+ next = nu->next;
+ BKE_nurb_free(nu);
+ nu = next;
}
- lb->first= lb->last= NULL;
+ lb->first = lb->last = NULL;
}
-Nurb *duplicateNurb(Nurb *nu)
+Nurb *BKE_nurb_duplicate(Nurb *nu)
{
Nurb *newnu;
int len;
- newnu= (Nurb*)MEM_mallocN(sizeof(Nurb),"duplicateNurb");
- if (newnu==NULL) return NULL;
+ newnu = (Nurb *)MEM_mallocN(sizeof(Nurb), "duplicateNurb");
+ if (newnu == NULL) return NULL;
memcpy(newnu, nu, sizeof(Nurb));
if (nu->bezt) {
- newnu->bezt=
- (BezTriple*)MEM_mallocN((nu->pntsu)* sizeof(BezTriple),"duplicateNurb2");
- memcpy(newnu->bezt, nu->bezt, nu->pntsu*sizeof(BezTriple));
+ newnu->bezt =
+ (BezTriple *)MEM_mallocN((nu->pntsu) * sizeof(BezTriple), "duplicateNurb2");
+ memcpy(newnu->bezt, nu->bezt, nu->pntsu * sizeof(BezTriple));
}
else {
- len= nu->pntsu*nu->pntsv;
- newnu->bp=
- (BPoint*)MEM_mallocN((len)* sizeof(BPoint),"duplicateNurb3");
- memcpy(newnu->bp, nu->bp, len*sizeof(BPoint));
-
- newnu->knotsu= newnu->knotsv= NULL;
-
+ len = nu->pntsu * nu->pntsv;
+ newnu->bp =
+ (BPoint *)MEM_mallocN((len) * sizeof(BPoint), "duplicateNurb3");
+ memcpy(newnu->bp, nu->bp, len * sizeof(BPoint));
+
+ newnu->knotsu = newnu->knotsv = NULL;
+
if (nu->knotsu) {
- len= KNOTSU(nu);
+ len = KNOTSU(nu);
if (len) {
- newnu->knotsu= MEM_mallocN(len*sizeof(float), "duplicateNurb4");
- memcpy(newnu->knotsu, nu->knotsu, sizeof(float)*len);
+ newnu->knotsu = MEM_mallocN(len * sizeof(float), "duplicateNurb4");
+ memcpy(newnu->knotsu, nu->knotsu, sizeof(float) * len);
}
}
- if (nu->pntsv>1 && nu->knotsv) {
- len= KNOTSV(nu);
+ if (nu->pntsv > 1 && nu->knotsv) {
+ len = KNOTSV(nu);
if (len) {
- newnu->knotsv= MEM_mallocN(len*sizeof(float), "duplicateNurb5");
- memcpy(newnu->knotsv, nu->knotsv, sizeof(float)*len);
+ newnu->knotsv = MEM_mallocN(len * sizeof(float), "duplicateNurb5");
+ memcpy(newnu->knotsv, nu->knotsv, sizeof(float) * len);
}
}
}
return newnu;
}
-void duplicateNurblist(ListBase *lb1, ListBase *lb2)
+void BKE_nurbList_duplicate(ListBase *lb1, ListBase *lb2)
{
Nurb *nu, *nun;
-
- freeNurblist(lb1);
-
- nu= lb2->first;
+
+ BKE_nurbList_free(lb1);
+
+ nu = lb2->first;
while (nu) {
- nun= duplicateNurb(nu);
+ nun = BKE_nurb_duplicate(nu);
BLI_addtail(lb1, nun);
-
- nu= nu->next;
+
+ nu = nu->next;
}
}
-void test2DNurb(Nurb *nu)
+void BKE_nurb_test2D(Nurb *nu)
{
BezTriple *bezt;
BPoint *bp;
int a;
-
- if ((nu->flag & CU_2D)==0)
+
+ if ((nu->flag & CU_2D) == 0)
return;
if (nu->type == CU_BEZIER) {
- a= nu->pntsu;
- bezt= nu->bezt;
+ a = nu->pntsu;
+ bezt = nu->bezt;
while (a--) {
- bezt->vec[0][2]= 0.0;
- bezt->vec[1][2]= 0.0;
- bezt->vec[2][2]= 0.0;
+ bezt->vec[0][2] = 0.0;
+ bezt->vec[1][2] = 0.0;
+ bezt->vec[2][2] = 0.0;
bezt++;
}
}
else {
- a= nu->pntsu*nu->pntsv;
- bp= nu->bp;
+ a = nu->pntsu * nu->pntsv;
+ bp = nu->bp;
while (a--) {
- bp->vec[2]= 0.0;
+ bp->vec[2] = 0.0;
bp++;
}
}
}
-void minmaxNurb(Nurb *nu, float *min, float *max)
+void BKE_nurb_minmax(Nurb *nu, float *min, float *max)
{
BezTriple *bezt;
BPoint *bp;
int a;
if (nu->type == CU_BEZIER) {
- a= nu->pntsu;
- bezt= nu->bezt;
+ a = nu->pntsu;
+ bezt = nu->bezt;
while (a--) {
DO_MINMAX(bezt->vec[0], min, max);
DO_MINMAX(bezt->vec[1], min, max);
@@ -576,8 +605,8 @@ void minmaxNurb(Nurb *nu, float *min, float *max)
}
}
else {
- a= nu->pntsu*nu->pntsv;
- bp= nu->bp;
+ a = nu->pntsu * nu->pntsv;
+ bp = nu->bp;
while (a--) {
DO_MINMAX(bp->vec, min, max);
bp++;
@@ -586,11 +615,11 @@ void minmaxNurb(Nurb *nu, float *min, float *max)
}
/* be sure to call makeknots after this */
-void addNurbPoints(Nurb *nu, int number)
+void BKE_nurb_points_add(Nurb *nu, int number)
{
- BPoint *tmp= nu->bp;
+ BPoint *tmp = nu->bp;
int i;
- nu->bp= (BPoint *)MEM_mallocN((nu->pntsu + number) * sizeof(BPoint), "rna_Curve_spline_points_add");
+ nu->bp = (BPoint *)MEM_mallocN((nu->pntsu + number) * sizeof(BPoint), "rna_Curve_spline_points_add");
if (tmp) {
memmove(nu->bp, tmp, nu->pntsu * sizeof(BPoint));
@@ -599,18 +628,18 @@ void addNurbPoints(Nurb *nu, int number)
memset(nu->bp + nu->pntsu, 0, number * sizeof(BPoint));
- for (i=0, tmp= nu->bp + nu->pntsu; i < number; i++, tmp++) {
- tmp->radius= 1.0f;
+ for (i = 0, tmp = nu->bp + nu->pntsu; i < number; i++, tmp++) {
+ tmp->radius = 1.0f;
}
nu->pntsu += number;
}
-void addNurbPointsBezier(Nurb *nu, int number)
+void BKE_nurb_bezierPoints_add(Nurb *nu, int number)
{
- BezTriple *tmp= nu->bezt;
+ BezTriple *tmp = nu->bezt;
int i;
- nu->bezt= (BezTriple *)MEM_mallocN((nu->pntsu + number) * sizeof(BezTriple), "rna_Curve_spline_points_add");
+ nu->bezt = (BezTriple *)MEM_mallocN((nu->pntsu + number) * sizeof(BezTriple), "rna_Curve_spline_points_add");
if (tmp) {
memmove(nu->bezt, tmp, nu->pntsu * sizeof(BezTriple));
@@ -619,8 +648,8 @@ void addNurbPointsBezier(Nurb *nu, int number)
memset(nu->bezt + nu->pntsu, 0, number * sizeof(BezTriple));
- for (i=0, tmp= nu->bezt + nu->pntsu; i < number; i++, tmp++) {
- tmp->radius= 1.0f;
+ for (i = 0, tmp = nu->bezt + nu->pntsu; i < number; i++, tmp++) {
+ tmp->radius = 1.0f;
}
nu->pntsu += number;
@@ -632,44 +661,46 @@ void addNurbPointsBezier(Nurb *nu, int number)
static void calcknots(float *knots, const short pnts, const short order, const short flag)
{
/* knots: number of pnts NOT corrected for cyclic */
- const int pnts_order= pnts + order;
+ const int pnts_order = pnts + order;
float k;
int a;
- switch(flag & (CU_NURB_ENDPOINT|CU_NURB_BEZIER)) {
- case CU_NURB_ENDPOINT:
- k= 0.0;
- for (a=1; a <= pnts_order; a++) {
- knots[a-1]= k;
- if (a >= order && a <= pnts) k+= 1.0f;
- }
- break;
- case CU_NURB_BEZIER:
- /* Warning, the order MUST be 2 or 4,
- * if this is not enforced, the displist will be corrupt */
- if (order==4) {
- k= 0.34;
- for (a=0; a < pnts_order; a++) {
- knots[a]= floorf(k);
- k+= (1.0f/3.0f);
+ switch (flag & (CU_NURB_ENDPOINT | CU_NURB_BEZIER)) {
+ case CU_NURB_ENDPOINT:
+ k = 0.0;
+ for (a = 1; a <= pnts_order; a++) {
+ knots[a - 1] = k;
+ if (a >= order && a <= pnts)
+ k += 1.0f;
}
- }
- else if (order==3) {
- k= 0.6f;
- for (a=0; a < pnts_order; a++) {
- if (a >= order && a <= pnts) k+= 0.5f;
- knots[a]= floorf(k);
+ break;
+ case CU_NURB_BEZIER:
+ /* Warning, the order MUST be 2 or 4,
+ * if this is not enforced, the displist will be corrupt */
+ if (order == 4) {
+ k = 0.34;
+ for (a = 0; a < pnts_order; a++) {
+ knots[a] = floorf(k);
+ k += (1.0f / 3.0f);
+ }
}
- }
- else {
- printf("bez nurb curve order is not 3 or 4, should never happen\n");
- }
- break;
- default:
- for (a=0; a < pnts_order; a++) {
- knots[a]= (float)a;
- }
- break;
+ else if (order == 3) {
+ k = 0.6f;
+ for (a = 0; a < pnts_order; a++) {
+ if (a >= order && a <= pnts)
+ k += 0.5f;
+ knots[a] = floorf(k);
+ }
+ }
+ else {
+ printf("bez nurb curve order is not 3 or 4, should never happen\n");
+ }
+ break;
+ default:
+ for (a = 0; a < pnts_order; a++) {
+ knots[a] = (float)a;
+ }
+ break;
}
}
@@ -678,23 +709,26 @@ static void makecyclicknots(float *knots, short pnts, short order)
{
int a, b, order2, c;
- if (knots==NULL) return;
+ if (knots == NULL)
+ return;
- order2=order-1;
+ order2 = order - 1;
/* do first long rows (order -1), remove identical knots at endpoints */
- if (order>2) {
- b= pnts+order2;
- for (a=1; a<order2; a++) {
- if (knots[b]!= knots[b-a]) break;
+ if (order > 2) {
+ b = pnts + order2;
+ for (a = 1; a < order2; a++) {
+ if (knots[b] != knots[b - a])
+ break;
}
- if (a==order2) knots[pnts+order-2]+= 1.0f;
+ if (a == order2)
+ knots[pnts + order - 2] += 1.0f;
}
- b= order;
- c=pnts + order + order2;
- for (a=pnts+order2; a<c; a++) {
- knots[a]= knots[a-1]+ (knots[b]-knots[b-1]);
+ b = order;
+ c = pnts + order + order2;
+ for (a = pnts + order2; a < c; a++) {
+ knots[a] = knots[a - 1] + (knots[b] - knots[b - 1]);
b--;
}
}
@@ -705,9 +739,10 @@ static void makeknots(Nurb *nu, short uv)
{
if (nu->type == CU_NURBS) {
if (uv == 1) {
- if (nu->knotsu) MEM_freeN(nu->knotsu);
- if (check_valid_nurb_u(nu)) {
- nu->knotsu= MEM_callocN(4+sizeof(float)*KNOTSU(nu), "makeknots");
+ if (nu->knotsu)
+ MEM_freeN(nu->knotsu);
+ if (BKE_nurb_check_valid_u(nu)) {
+ nu->knotsu = MEM_callocN(4 + sizeof(float) * KNOTSU(nu), "makeknots");
if (nu->flagu & CU_NURB_CYCLIC) {
calcknots(nu->knotsu, nu->pntsu, nu->orderu, 0); /* cyclic should be uniform */
makecyclicknots(nu->knotsu, nu->pntsu, nu->orderu);
@@ -716,13 +751,14 @@ static void makeknots(Nurb *nu, short uv)
calcknots(nu->knotsu, nu->pntsu, nu->orderu, nu->flagu);
}
}
- else nu->knotsu= NULL;
-
+ else
+ nu->knotsu = NULL;
}
else if (uv == 2) {
- if (nu->knotsv) MEM_freeN(nu->knotsv);
- if (check_valid_nurb_v(nu)) {
- nu->knotsv= MEM_callocN(4+sizeof(float)*KNOTSV(nu), "makeknots");
+ if (nu->knotsv)
+ MEM_freeN(nu->knotsv);
+ if (BKE_nurb_check_valid_v(nu)) {
+ nu->knotsv = MEM_callocN(4 + sizeof(float) * KNOTSV(nu), "makeknots");
if (nu->flagv & CU_NURB_CYCLIC) {
calcknots(nu->knotsv, nu->pntsv, nu->orderv, 0); /* cyclic should be uniform */
makecyclicknots(nu->knotsv, nu->pntsv, nu->orderv);
@@ -731,17 +767,17 @@ static void makeknots(Nurb *nu, short uv)
calcknots(nu->knotsv, nu->pntsv, nu->orderv, nu->flagv);
}
}
- else nu->knotsv= NULL;
+ else nu->knotsv = NULL;
}
}
}
-void nurbs_knot_calc_u(Nurb *nu)
+void BKE_nurb_knot_calc_u(Nurb *nu)
{
makeknots(nu, 1);
}
-void nurbs_knot_calc_v(Nurb *nu)
+void BKE_nurb_knot_calc_v(Nurb *nu)
{
makeknots(nu, 2);
}
@@ -749,67 +785,70 @@ void nurbs_knot_calc_v(Nurb *nu)
static void basisNurb(float t, short order, short pnts, float *knots, float *basis, int *start, int *end)
{
float d, e;
- int i, i1 = 0, i2 = 0 ,j, orderpluspnts, opp2, o2;
+ int i, i1 = 0, i2 = 0, j, orderpluspnts, opp2, o2;
- orderpluspnts= order+pnts;
- opp2 = orderpluspnts-1;
+ orderpluspnts = order + pnts;
+ opp2 = orderpluspnts - 1;
/* this is for float inaccuracy */
- if (t < knots[0]) t= knots[0];
- else if (t > knots[opp2]) t= knots[opp2];
+ if (t < knots[0])
+ t = knots[0];
+ else
+ if (t > knots[opp2]) t = knots[opp2];
/* this part is order '1' */
- o2 = order + 1;
- for (i=0;i<opp2;i++) {
- if (knots[i]!=knots[i+1] && t>= knots[i] && t<=knots[i+1]) {
- basis[i]= 1.0;
- i1= i-o2;
- if (i1<0) i1= 0;
- i2= i;
+ o2 = order + 1;
+ for (i = 0; i < opp2; i++) {
+ if (knots[i] != knots[i + 1] && t >= knots[i] && t <= knots[i + 1]) {
+ basis[i] = 1.0;
+ i1 = i - o2;
+ if (i1 < 0) i1 = 0;
+ i2 = i;
i++;
- while (i<opp2) {
- basis[i]= 0.0;
+ while (i < opp2) {
+ basis[i] = 0.0;
i++;
}
break;
}
- else basis[i]= 0.0;
+ else
+ basis[i] = 0.0;
}
- basis[i]= 0.0;
-
- /* this is order 2,3,... */
- for (j=2; j<=order; j++) {
+ basis[i] = 0.0;
+
+ /* this is order 2, 3, ... */
+ for (j = 2; j <= order; j++) {
- if (i2+j>= orderpluspnts) i2= opp2-j;
+ if (i2 + j >= orderpluspnts) i2 = opp2 - j;
- for (i= i1; i<=i2; i++) {
- if (basis[i]!=0.0f)
- d= ((t-knots[i])*basis[i]) / (knots[i+j-1]-knots[i]);
+ for (i = i1; i <= i2; i++) {
+ if (basis[i] != 0.0f)
+ d = ((t - knots[i]) * basis[i]) / (knots[i + j - 1] - knots[i]);
else
- d= 0.0f;
+ d = 0.0f;
- if (basis[i+1] != 0.0f)
- e= ((knots[i+j]-t)*basis[i+1]) / (knots[i+j]-knots[i+1]);
+ if (basis[i + 1] != 0.0f)
+ e = ((knots[i + j] - t) * basis[i + 1]) / (knots[i + j] - knots[i + 1]);
else
- e= 0.0;
+ e = 0.0;
- basis[i]= d+e;
+ basis[i] = d + e;
}
}
- *start= 1000;
- *end= 0;
+ *start = 1000;
+ *end = 0;
- for (i=i1; i<=i2; i++) {
+ for (i = i1; i <= i2; i++) {
if (basis[i] > 0.0f) {
- *end= i;
- if (*start==1000) *start= i;
+ *end = i;
+ if (*start == 1000) *start = i;
}
}
}
-void makeNurbfaces(Nurb *nu, float *coord_array, int rowstride, int resolu, int resolv)
+void BKE_nurb_makeFaces(Nurb *nu, float *coord_array, int rowstride, int resolu, int resolv)
/* coord_array has to be 3*4*resolu*resolv in size, and zero-ed */
{
BPoint *bp;
@@ -817,151 +856,165 @@ void makeNurbfaces(Nurb *nu, float *coord_array, int rowstride, int resolu, int
float u, v, ustart, uend, ustep, vstart, vend, vstep, sumdiv;
int i, j, iofs, jofs, cycl, len, curu, curv;
int istart, iend, jsta, jen, *jstart, *jend, ratcomp;
-
- int totu = nu->pntsu*resolu, totv = nu->pntsv*resolv;
-
- if (nu->knotsu==NULL || nu->knotsv==NULL) return;
- if (nu->orderu>nu->pntsu) return;
- if (nu->orderv>nu->pntsv) return;
- if (coord_array==NULL) return;
-
+
+ int totu = nu->pntsu * resolu, totv = nu->pntsv * resolv;
+
+ if (nu->knotsu == NULL || nu->knotsv == NULL)
+ return;
+ if (nu->orderu > nu->pntsu)
+ return;
+ if (nu->orderv > nu->pntsv)
+ return;
+ if (coord_array == NULL)
+ return;
+
/* allocate and initialize */
len = totu * totv;
- if (len==0) return;
-
-
-
- sum= (float *)MEM_callocN(sizeof(float)*len, "makeNurbfaces1");
-
- len= totu*totv;
- if (len==0) {
+ if (len == 0)
+ return;
+
+ sum = (float *)MEM_callocN(sizeof(float) * len, "makeNurbfaces1");
+
+ len = totu * totv;
+ if (len == 0) {
MEM_freeN(sum);
return;
}
- bp= nu->bp;
- i= nu->pntsu*nu->pntsv;
- ratcomp=0;
+ bp = nu->bp;
+ i = nu->pntsu * nu->pntsv;
+ ratcomp = 0;
while (i--) {
if (bp->vec[3] != 1.0f) {
- ratcomp= 1;
+ ratcomp = 1;
break;
}
bp++;
}
-
- fp= nu->knotsu;
- ustart= fp[nu->orderu-1];
- if (nu->flagu & CU_NURB_CYCLIC) uend= fp[nu->pntsu+nu->orderu-1];
- else uend= fp[nu->pntsu];
- ustep= (uend-ustart)/((nu->flagu & CU_NURB_CYCLIC) ? totu : totu - 1);
-
- basisu= (float *)MEM_mallocN(sizeof(float)*KNOTSU(nu), "makeNurbfaces3");
-
- fp= nu->knotsv;
- vstart= fp[nu->orderv-1];
-
- if (nu->flagv & CU_NURB_CYCLIC) vend= fp[nu->pntsv+nu->orderv-1];
- else vend= fp[nu->pntsv];
- vstep= (vend-vstart)/((nu->flagv & CU_NURB_CYCLIC) ? totv : totv - 1);
-
- len= KNOTSV(nu);
- basisv= (float *)MEM_mallocN(sizeof(float)*len*totv, "makeNurbfaces3");
- jstart= (int *)MEM_mallocN(sizeof(float)*totv, "makeNurbfaces4");
- jend= (int *)MEM_mallocN(sizeof(float)*totv, "makeNurbfaces5");
-
- /* precalculation of basisv and jstart,jend */
- if (nu->flagv & CU_NURB_CYCLIC) cycl= nu->orderv-1;
- else cycl= 0;
- v= vstart;
- basis= basisv;
- curv= totv;
- while (curv--) {
- basisNurb(v, nu->orderv, (short)(nu->pntsv+cycl), nu->knotsv, basis, jstart+curv, jend+curv);
- basis+= KNOTSV(nu);
- v+= vstep;
- }
- if (nu->flagu & CU_NURB_CYCLIC) cycl= nu->orderu-1;
- else cycl= 0;
- in= coord_array;
- u= ustart;
- curu= totu;
+ fp = nu->knotsu;
+ ustart = fp[nu->orderu - 1];
+ if (nu->flagu & CU_NURB_CYCLIC)
+ uend = fp[nu->pntsu + nu->orderu - 1];
+ else
+ uend = fp[nu->pntsu];
+ ustep = (uend - ustart) / ((nu->flagu & CU_NURB_CYCLIC) ? totu : totu - 1);
+
+ basisu = (float *)MEM_mallocN(sizeof(float) * KNOTSU(nu), "makeNurbfaces3");
+
+ fp = nu->knotsv;
+ vstart = fp[nu->orderv - 1];
+
+ if (nu->flagv & CU_NURB_CYCLIC)
+ vend = fp[nu->pntsv + nu->orderv - 1];
+ else
+ vend = fp[nu->pntsv];
+ vstep = (vend - vstart) / ((nu->flagv & CU_NURB_CYCLIC) ? totv : totv - 1);
+
+ len = KNOTSV(nu);
+ basisv = (float *)MEM_mallocN(sizeof(float) * len * totv, "makeNurbfaces3");
+ jstart = (int *)MEM_mallocN(sizeof(float) * totv, "makeNurbfaces4");
+ jend = (int *)MEM_mallocN(sizeof(float) * totv, "makeNurbfaces5");
+
+ /* precalculation of basisv and jstart, jend */
+ if (nu->flagv & CU_NURB_CYCLIC)
+ cycl = nu->orderv - 1;
+ else cycl = 0;
+ v = vstart;
+ basis = basisv;
+ curv = totv;
+ while (curv--) {
+ basisNurb(v, nu->orderv, (short)(nu->pntsv + cycl), nu->knotsv, basis, jstart + curv, jend + curv);
+ basis += KNOTSV(nu);
+ v += vstep;
+ }
+
+ if (nu->flagu & CU_NURB_CYCLIC)
+ cycl = nu->orderu - 1;
+ else
+ cycl = 0;
+ in = coord_array;
+ u = ustart;
+ curu = totu;
while (curu--) {
+ basisNurb(u, nu->orderu, (short)(nu->pntsu + cycl), nu->knotsu, basisu, &istart, &iend);
- basisNurb(u, nu->orderu, (short)(nu->pntsu+cycl), nu->knotsu, basisu, &istart, &iend);
-
- basis= basisv;
- curv= totv;
+ basis = basisv;
+ curv = totv;
while (curv--) {
-
- jsta= jstart[curv];
- jen= jend[curv];
+ jsta = jstart[curv];
+ jen = jend[curv];
/* calculate sum */
- sumdiv= 0.0;
- fp= sum;
+ sumdiv = 0.0;
+ fp = sum;
- for (j= jsta; j<=jen; j++) {
+ for (j = jsta; j <= jen; j++) {
- if (j>=nu->pntsv) jofs= (j - nu->pntsv);
- else jofs= j;
- bp= nu->bp+ nu->pntsu*jofs+istart-1;
-
- for (i= istart; i<=iend; i++, fp++) {
+ if (j >= nu->pntsv)
+ jofs = (j - nu->pntsv);
+ else
+ jofs = j;
+ bp = nu->bp + nu->pntsu * jofs + istart - 1;
- if (i>= nu->pntsu) {
- iofs= i- nu->pntsu;
- bp= nu->bp+ nu->pntsu*jofs+iofs;
+ for (i = istart; i <= iend; i++, fp++) {
+ if (i >= nu->pntsu) {
+ iofs = i - nu->pntsu;
+ bp = nu->bp + nu->pntsu * jofs + iofs;
}
- else bp++;
+ else
+ bp++;
if (ratcomp) {
- *fp= basisu[i]*basis[j]*bp->vec[3];
- sumdiv+= *fp;
+ *fp = basisu[i] * basis[j] * bp->vec[3];
+ sumdiv += *fp;
}
- else *fp= basisu[i]*basis[j];
+ else
+ *fp = basisu[i] * basis[j];
}
}
-
+
if (ratcomp) {
- fp= sum;
- for (j= jsta; j<=jen; j++) {
- for (i= istart; i<=iend; i++, fp++) {
- *fp/= sumdiv;
+ fp = sum;
+ for (j = jsta; j <= jen; j++) {
+ for (i = istart; i <= iend; i++, fp++) {
+ *fp /= sumdiv;
}
}
}
/* one! (1.0) real point now */
- fp= sum;
- for (j= jsta; j<=jen; j++) {
+ fp = sum;
+ for (j = jsta; j <= jen; j++) {
- if (j>=nu->pntsv) jofs= (j - nu->pntsv);
- else jofs= j;
- bp= nu->bp+ nu->pntsu*jofs+istart-1;
-
- for (i= istart; i<=iend; i++, fp++) {
+ if (j >= nu->pntsv)
+ jofs = (j - nu->pntsv);
+ else
+ jofs = j;
+ bp = nu->bp + nu->pntsu * jofs + istart - 1;
- if (i>= nu->pntsu) {
- iofs= i- nu->pntsu;
- bp= nu->bp+ nu->pntsu*jofs+iofs;
+ for (i = istart; i <= iend; i++, fp++) {
+ if (i >= nu->pntsu) {
+ iofs = i - nu->pntsu;
+ bp = nu->bp + nu->pntsu * jofs + iofs;
}
- else bp++;
+ else
+ bp++;
if (*fp != 0.0f) {
- in[0]+= (*fp) * bp->vec[0];
- in[1]+= (*fp) * bp->vec[1];
- in[2]+= (*fp) * bp->vec[2];
+ in[0] += (*fp) * bp->vec[0];
+ in[1] += (*fp) * bp->vec[1];
+ in[2] += (*fp) * bp->vec[2];
}
}
}
- in+=3;
- basis+= KNOTSV(nu);
+ in += 3;
+ basis += KNOTSV(nu);
}
- u+= ustep;
- if (rowstride!=0) in = (float*) (((unsigned char*) in) + (rowstride - 3*totv*sizeof(*in)));
+ u += ustep;
+ if (rowstride != 0)
+ in = (float *) (((unsigned char *) in) + (rowstride - 3 * totv * sizeof(*in)));
}
/* free */
@@ -972,100 +1025,112 @@ void makeNurbfaces(Nurb *nu, float *coord_array, int rowstride, int resolu, int
MEM_freeN(jend);
}
-void makeNurbcurve(Nurb *nu, float *coord_array, float *tilt_array, float *radius_array, float *weight_array, int resolu, int stride)
+void BKE_nurb_makeCurve(Nurb *nu, float *coord_array, float *tilt_array, float *radius_array, float *weight_array,
+ int resolu, int stride)
/* coord_array has to be 3*4*pntsu*resolu in size and zero-ed
* tilt_array and radius_array will be written to if valid */
{
BPoint *bp;
float u, ustart, uend, ustep, sumdiv;
float *basisu, *sum, *fp;
- float *coord_fp= coord_array, *tilt_fp= tilt_array, *radius_fp= radius_array, *weight_fp= weight_array;
+ float *coord_fp = coord_array, *tilt_fp = tilt_array, *radius_fp = radius_array, *weight_fp = weight_array;
int i, len, istart, iend, cycl;
- if (nu->knotsu==NULL) return;
- if (nu->orderu>nu->pntsu) return;
- if (coord_array==NULL) return;
+ if (nu->knotsu == NULL)
+ return;
+ if (nu->orderu > nu->pntsu)
+ return;
+ if (coord_array == NULL)
+ return;
/* allocate and initialize */
- len= nu->pntsu;
- if (len==0) return;
- sum= (float *)MEM_callocN(sizeof(float)*len, "makeNurbcurve1");
-
- resolu= (resolu*SEGMENTSU(nu));
-
- if (resolu==0) {
+ len = nu->pntsu;
+ if (len == 0)
+ return;
+ sum = (float *)MEM_callocN(sizeof(float) * len, "makeNurbcurve1");
+
+ resolu = (resolu * SEGMENTSU(nu));
+
+ if (resolu == 0) {
MEM_freeN(sum);
return;
}
- fp= nu->knotsu;
- ustart= fp[nu->orderu-1];
- if (nu->flagu & CU_NURB_CYCLIC) uend= fp[nu->pntsu+nu->orderu-1];
- else uend= fp[nu->pntsu];
- ustep= (uend-ustart)/(resolu - ((nu->flagu & CU_NURB_CYCLIC) ? 0 : 1));
-
- basisu= (float *)MEM_mallocN(sizeof(float)*KNOTSU(nu), "makeNurbcurve3");
+ fp = nu->knotsu;
+ ustart = fp[nu->orderu - 1];
+ if (nu->flagu & CU_NURB_CYCLIC)
+ uend = fp[nu->pntsu + nu->orderu - 1];
+ else
+ uend = fp[nu->pntsu];
+ ustep = (uend - ustart) / (resolu - ((nu->flagu & CU_NURB_CYCLIC) ? 0 : 1));
+
+ basisu = (float *)MEM_mallocN(sizeof(float) * KNOTSU(nu), "makeNurbcurve3");
- if (nu->flagu & CU_NURB_CYCLIC) cycl= nu->orderu-1;
- else cycl= 0;
+ if (nu->flagu & CU_NURB_CYCLIC)
+ cycl = nu->orderu - 1;
+ else
+ cycl = 0;
- u= ustart;
+ u = ustart;
while (resolu--) {
+ basisNurb(u, nu->orderu, (short)(nu->pntsu + cycl), nu->knotsu, basisu, &istart, &iend);
- basisNurb(u, nu->orderu, (short)(nu->pntsu+cycl), nu->knotsu, basisu, &istart, &iend);
/* calc sum */
- sumdiv= 0.0;
- fp= sum;
- bp= nu->bp+ istart-1;
- for (i= istart; i<=iend; i++, fp++) {
-
- if (i>=nu->pntsu) bp= nu->bp+(i - nu->pntsu);
- else bp++;
+ sumdiv = 0.0;
+ fp = sum;
+ bp = nu->bp + istart - 1;
+ for (i = istart; i <= iend; i++, fp++) {
+ if (i >= nu->pntsu)
+ bp = nu->bp + (i - nu->pntsu);
+ else
+ bp++;
- *fp= basisu[i]*bp->vec[3];
- sumdiv+= *fp;
+ *fp = basisu[i] * bp->vec[3];
+ sumdiv += *fp;
}
if (sumdiv != 0.0f) if (sumdiv < 0.999f || sumdiv > 1.001f) {
- /* is normalizing needed? */
- fp= sum;
- for (i= istart; i<=iend; i++, fp++) {
- *fp/= sumdiv;
+ /* is normalizing needed? */
+ fp = sum;
+ for (i = istart; i <= iend; i++, fp++) {
+ *fp /= sumdiv;
+ }
}
- }
/* one! (1.0) real point */
- fp= sum;
- bp= nu->bp+ istart-1;
- for (i= istart; i<=iend; i++, fp++) {
-
- if (i>=nu->pntsu) bp= nu->bp+(i - nu->pntsu);
- else bp++;
+ fp = sum;
+ bp = nu->bp + istart - 1;
+ for (i = istart; i <= iend; i++, fp++) {
+ if (i >= nu->pntsu)
+ bp = nu->bp + (i - nu->pntsu);
+ else
+ bp++;
if (*fp != 0.0f) {
-
- coord_fp[0]+= (*fp) * bp->vec[0];
- coord_fp[1]+= (*fp) * bp->vec[1];
- coord_fp[2]+= (*fp) * bp->vec[2];
-
+ coord_fp[0] += (*fp) * bp->vec[0];
+ coord_fp[1] += (*fp) * bp->vec[1];
+ coord_fp[2] += (*fp) * bp->vec[2];
+
if (tilt_fp)
(*tilt_fp) += (*fp) * bp->alfa;
-
+
if (radius_fp)
(*radius_fp) += (*fp) * bp->radius;
if (weight_fp)
(*weight_fp) += (*fp) * bp->weight;
-
}
}
coord_fp = (float *)(((char *)coord_fp) + stride);
-
- if (tilt_fp) tilt_fp = (float *)(((char *)tilt_fp) + stride);
- if (radius_fp) radius_fp = (float *)(((char *)radius_fp) + stride);
- if (weight_fp) weight_fp = (float *)(((char *)weight_fp) + stride);
-
- u+= ustep;
+
+ if (tilt_fp)
+ tilt_fp = (float *)(((char *)tilt_fp) + stride);
+ if (radius_fp)
+ radius_fp = (float *)(((char *)radius_fp) + stride);
+ if (weight_fp)
+ weight_fp = (float *)(((char *)weight_fp) + stride);
+
+ u += ustep;
}
/* free */
@@ -1074,30 +1139,30 @@ void makeNurbcurve(Nurb *nu, float *coord_array, float *tilt_array, float *radiu
}
/* forward differencing method for bezier curve */
-void forward_diff_bezier(float q0, float q1, float q2, float q3, float *p, int it, int stride)
+void BKE_curve_forward_diff_bezier(float q0, float q1, float q2, float q3, float *p, int it, int stride)
{
- float rt0,rt1,rt2,rt3,f;
+ float rt0, rt1, rt2, rt3, f;
int a;
- f= (float)it;
- rt0= q0;
- rt1= 3.0f*(q1-q0)/f;
- f*= f;
- rt2= 3.0f*(q0-2.0f*q1+q2)/f;
- f*= it;
- rt3= (q3-q0+3.0f*(q1-q2))/f;
+ f = (float)it;
+ rt0 = q0;
+ rt1 = 3.0f * (q1 - q0) / f;
+ f *= f;
+ rt2 = 3.0f * (q0 - 2.0f * q1 + q2) / f;
+ f *= it;
+ rt3 = (q3 - q0 + 3.0f * (q1 - q2)) / f;
- q0= rt0;
- q1= rt1+rt2+rt3;
- q2= 2*rt2+6*rt3;
- q3= 6*rt3;
+ q0 = rt0;
+ q1 = rt1 + rt2 + rt3;
+ q2 = 2 * rt2 + 6 * rt3;
+ q3 = 6 * rt3;
- for (a=0; a<=it; a++) {
- *p= q0;
- p = (float *)(((char *)p)+stride);
- q0+= q1;
- q1+= q2;
- q2+= q3;
+ for (a = 0; a <= it; a++) {
+ *p = q0;
+ p = (float *)(((char *)p) + stride);
+ q0 += q1;
+ q1 += q2;
+ q2 += q3;
}
}
@@ -1108,33 +1173,33 @@ static void forward_diff_bezier_cotangent(float *p0, float *p1, float *p2, float
*
* This could also be optimized like forward_diff_bezier */
int a;
- for (a=0; a<=it; a++) {
+ for (a = 0; a <= it; a++) {
float t = (float)a / (float)it;
int i;
- for (i=0; i<3; i++) {
- p[i]= (-6*t + 6)*p0[i] + (18*t - 12)*p1[i] + (-18*t + 6)*p2[i] + (6*t)*p3[i];
+ for (i = 0; i < 3; i++) {
+ p[i] = (-6 * t + 6) * p0[i] + (18 * t - 12) * p1[i] + (-18 * t + 6) * p2[i] + (6 * t) * p3[i];
}
normalize_v3(p);
- p = (float *)(((char *)p)+stride);
+ p = (float *)(((char *)p) + stride);
}
}
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
-float *make_orco_surf(Object *ob)
+float *BKE_curve_surf_make_orco(Object *ob)
{
/* Note: this function is used in convertblender only atm, so
* suppose nonzero curve's render resolution should always be used */
- Curve *cu= ob->data;
+ Curve *cu = ob->data;
Nurb *nu;
- int a, b, tot=0;
+ int a, b, tot = 0;
int sizeu, sizev;
int resolu, resolv;
float *fp, *coord_array;
-
+
/* first calculate the size of the datablock */
- nu= cu->nurb.first;
+ nu = cu->nurb.first;
while (nu) {
/* as we want to avoid the seam in a cyclic nurbs
* texture wrapping, reserve extra orco data space to save these extra needed
@@ -1145,86 +1210,94 @@ float *make_orco_surf(Object *ob)
* See also convertblender.c: init_render_surf()
*/
- resolu= cu->resolu_ren ? cu->resolu_ren : nu->resolu;
- resolv= cu->resolv_ren ? cu->resolv_ren : nu->resolv;
-
- sizeu = nu->pntsu*resolu;
- sizev = nu->pntsv*resolv;
+ resolu = cu->resolu_ren ? cu->resolu_ren : nu->resolu;
+ resolv = cu->resolv_ren ? cu->resolv_ren : nu->resolv;
+
+ sizeu = nu->pntsu * resolu;
+ sizev = nu->pntsv * resolv;
if (nu->flagu & CU_NURB_CYCLIC) sizeu++;
if (nu->flagv & CU_NURB_CYCLIC) sizev++;
- if (nu->pntsv>1) tot+= sizeu * sizev;
-
- nu= nu->next;
+ if (nu->pntsv > 1) tot += sizeu * sizev;
+
+ nu = nu->next;
}
/* makeNurbfaces wants zeros */
- fp= coord_array= MEM_callocN(3*sizeof(float)*tot, "make_orco");
-
- nu= cu->nurb.first;
+ fp = coord_array = MEM_callocN(3 * sizeof(float) * tot, "make_orco");
+
+ nu = cu->nurb.first;
while (nu) {
- resolu= cu->resolu_ren ? cu->resolu_ren : nu->resolu;
- resolv= cu->resolv_ren ? cu->resolv_ren : nu->resolv;
-
- if (nu->pntsv>1) {
- sizeu = nu->pntsu*resolu;
- sizev = nu->pntsv*resolv;
- if (nu->flagu & CU_NURB_CYCLIC) sizeu++;
- if (nu->flagv & CU_NURB_CYCLIC) sizev++;
-
+ resolu = cu->resolu_ren ? cu->resolu_ren : nu->resolu;
+ resolv = cu->resolv_ren ? cu->resolv_ren : nu->resolv;
+
+ if (nu->pntsv > 1) {
+ sizeu = nu->pntsu * resolu;
+ sizev = nu->pntsv * resolv;
+
+ if (nu->flagu & CU_NURB_CYCLIC)
+ sizeu++;
+ if (nu->flagv & CU_NURB_CYCLIC)
+ sizev++;
+
if (cu->flag & CU_UV_ORCO) {
- for (b=0; b< sizeu; b++) {
- for (a=0; a< sizev; a++) {
-
- if (sizev <2) fp[0]= 0.0f;
- else fp[0]= -1.0f + 2.0f*((float)a)/(sizev - 1);
-
- if (sizeu <2) fp[1]= 0.0f;
- else fp[1]= -1.0f + 2.0f*((float)b)/(sizeu - 1);
-
- fp[2]= 0.0;
-
- fp+= 3;
+ for (b = 0; b < sizeu; b++) {
+ for (a = 0; a < sizev; a++) {
+
+ if (sizev < 2)
+ fp[0] = 0.0f;
+ else
+ fp[0] = -1.0f + 2.0f * ((float)a) / (sizev - 1);
+
+ if (sizeu < 2)
+ fp[1] = 0.0f;
+ else
+ fp[1] = -1.0f + 2.0f * ((float)b) / (sizeu - 1);
+
+ fp[2] = 0.0;
+
+ fp += 3;
}
}
}
else {
- float *_tdata= MEM_callocN((nu->pntsu*resolu) * (nu->pntsv*resolv) *3*sizeof(float), "temp data");
- float *tdata= _tdata;
-
- makeNurbfaces(nu, tdata, 0, resolu, resolv);
-
- for (b=0; b<sizeu; b++) {
- int use_b= b;
- if (b==sizeu-1 && (nu->flagu & CU_NURB_CYCLIC))
- use_b= 0;
-
- for (a=0; a<sizev; a++) {
- int use_a= a;
- if (a==sizev-1 && (nu->flagv & CU_NURB_CYCLIC))
- use_a= 0;
-
- tdata = _tdata + 3 * (use_b * (nu->pntsv*resolv) + use_a);
-
- fp[0]= (tdata[0]-cu->loc[0])/cu->size[0];
- fp[1]= (tdata[1]-cu->loc[1])/cu->size[1];
- fp[2]= (tdata[2]-cu->loc[2])/cu->size[2];
- fp+= 3;
+ int size = (nu->pntsu * resolu) * (nu->pntsv * resolv) * 3 * sizeof(float);
+ float *_tdata = MEM_callocN(size, "temp data");
+ float *tdata = _tdata;
+
+ BKE_nurb_makeFaces(nu, tdata, 0, resolu, resolv);
+
+ for (b = 0; b < sizeu; b++) {
+ int use_b = b;
+ if (b == sizeu - 1 && (nu->flagu & CU_NURB_CYCLIC))
+ use_b = 0;
+
+ for (a = 0; a < sizev; a++) {
+ int use_a = a;
+ if (a == sizev - 1 && (nu->flagv & CU_NURB_CYCLIC))
+ use_a = 0;
+
+ tdata = _tdata + 3 * (use_b * (nu->pntsv * resolv) + use_a);
+
+ fp[0] = (tdata[0] - cu->loc[0]) / cu->size[0];
+ fp[1] = (tdata[1] - cu->loc[1]) / cu->size[1];
+ fp[2] = (tdata[2] - cu->loc[2]) / cu->size[2];
+ fp += 3;
}
}
-
+
MEM_freeN(_tdata);
}
}
- nu= nu->next;
+ nu = nu->next;
}
-
+
return coord_array;
}
- /* NOTE: This routine is tied to the order of vertex
- * built by displist and as passed to the renderer.
- */
-float *make_orco_curve(Scene *scene, Object *ob)
+/* NOTE: This routine is tied to the order of vertex
+ * built by displist and as passed to the renderer.
+ */
+float *BKE_curve_make_orco(Scene *scene, Object *ob)
{
Curve *cu = ob->data;
DispList *dl;
@@ -1232,79 +1305,81 @@ float *make_orco_curve(Scene *scene, Object *ob)
float *fp, *coord_array;
ListBase disp = {NULL, NULL};
- makeDispListCurveTypes_forOrco(scene, ob, &disp);
+ BKE_displist_make_curveTypes_forOrco(scene, ob, &disp);
numVerts = 0;
- for (dl=disp.first; dl; dl=dl->next) {
- if (dl->type==DL_INDEX3) {
+ for (dl = disp.first; dl; dl = dl->next) {
+ if (dl->type == DL_INDEX3) {
numVerts += dl->nr;
}
- else if (dl->type==DL_SURF) {
- /* convertblender.c uses the Surface code for creating renderfaces when cyclic U only (closed circle beveling) */
+ else if (dl->type == DL_SURF) {
+ /* convertblender.c uses the Surface code for creating renderfaces when cyclic U only
+ * (closed circle beveling)
+ */
if (dl->flag & DL_CYCL_U) {
if (dl->flag & DL_CYCL_V)
- numVerts += (dl->parts+1)*(dl->nr+1);
+ numVerts += (dl->parts + 1) * (dl->nr + 1);
else
- numVerts += dl->parts*(dl->nr+1);
+ numVerts += dl->parts * (dl->nr + 1);
}
else
- numVerts += dl->parts*dl->nr;
+ numVerts += dl->parts * dl->nr;
}
}
- fp= coord_array= MEM_mallocN(3*sizeof(float)*numVerts, "cu_orco");
- for (dl=disp.first; dl; dl=dl->next) {
- if (dl->type==DL_INDEX3) {
- for (u=0; u<dl->nr; u++, fp+=3) {
+ fp = coord_array = MEM_mallocN(3 * sizeof(float) * numVerts, "cu_orco");
+ for (dl = disp.first; dl; dl = dl->next) {
+ if (dl->type == DL_INDEX3) {
+ for (u = 0; u < dl->nr; u++, fp += 3) {
if (cu->flag & CU_UV_ORCO) {
- fp[0]= 2.0f*u/(dl->nr-1) - 1.0f;
- fp[1]= 0.0;
- fp[2]= 0.0;
+ fp[0] = 2.0f * u / (dl->nr - 1) - 1.0f;
+ fp[1] = 0.0;
+ fp[2] = 0.0;
}
else {
- copy_v3_v3(fp, &dl->verts[u*3]);
+ copy_v3_v3(fp, &dl->verts[u * 3]);
- fp[0]= (fp[0]-cu->loc[0])/cu->size[0];
- fp[1]= (fp[1]-cu->loc[1])/cu->size[1];
- fp[2]= (fp[2]-cu->loc[2])/cu->size[2];
+ fp[0] = (fp[0] - cu->loc[0]) / cu->size[0];
+ fp[1] = (fp[1] - cu->loc[1]) / cu->size[1];
+ fp[2] = (fp[2] - cu->loc[2]) / cu->size[2];
}
}
}
- else if (dl->type==DL_SURF) {
- int sizeu= dl->nr, sizev= dl->parts;
-
+ else if (dl->type == DL_SURF) {
+ int sizeu = dl->nr, sizev = dl->parts;
+
/* exception as handled in convertblender.c too */
if (dl->flag & DL_CYCL_U) {
sizeu++;
if (dl->flag & DL_CYCL_V)
sizev++;
}
-
- for (u=0; u<sizev; u++) {
- for (v=0; v<sizeu; v++,fp+=3) {
+
+ for (u = 0; u < sizev; u++) {
+ for (v = 0; v < sizeu; v++, fp += 3) {
if (cu->flag & CU_UV_ORCO) {
- fp[0]= 2.0f*u/(sizev - 1) - 1.0f;
- fp[1]= 2.0f*v/(sizeu - 1) - 1.0f;
- fp[2]= 0.0;
+ fp[0] = 2.0f * u / (sizev - 1) - 1.0f;
+ fp[1] = 2.0f * v / (sizeu - 1) - 1.0f;
+ fp[2] = 0.0;
}
else {
float *vert;
- int realv= v % dl->nr;
- int realu= u % dl->parts;
-
- vert= dl->verts + 3*(dl->nr*realu + realv);
+ int realv = v % dl->nr;
+ int realu = u % dl->parts;
+
+ vert = dl->verts + 3 * (dl->nr * realu + realv);
copy_v3_v3(fp, vert);
- fp[0]= (fp[0]-cu->loc[0])/cu->size[0];
- fp[1]= (fp[1]-cu->loc[1])/cu->size[1];
- fp[2]= (fp[2]-cu->loc[2])/cu->size[2];
+ fp[0] = (fp[0] - cu->loc[0]) / cu->size[0];
+ fp[1] = (fp[1] - cu->loc[1]) / cu->size[1];
+ fp[2] = (fp[2] - cu->loc[2]) / cu->size[2];
}
}
}
}
}
- freedisplist(&disp);
+ BKE_displist_free(&disp);
return coord_array;
}
@@ -1312,196 +1387,197 @@ float *make_orco_curve(Scene *scene, Object *ob)
/* ***************** BEVEL ****************** */
-void makebevelcurve(Scene *scene, Object *ob, ListBase *disp, int forRender)
+void BKE_curve_bevel_make(Scene *scene, Object *ob, ListBase *disp, int forRender)
{
DispList *dl, *dlnew;
Curve *bevcu, *cu;
float *fp, facx, facy, angle, dangle;
int nr, a;
- cu= ob->data;
+ cu = ob->data;
disp->first = disp->last = NULL;
/* if a font object is being edited, then do nothing */
// XXX if ( ob == obedit && ob->type == OB_FONT ) return;
if (cu->bevobj) {
- if (cu->bevobj->type!=OB_CURVE) return;
+ if (cu->bevobj->type != OB_CURVE)
+ return;
- bevcu= cu->bevobj->data;
- if (bevcu->ext1==0.0f && bevcu->ext2==0.0f) {
- ListBase bevdisp= {NULL, NULL};
- facx= cu->bevobj->size[0];
- facy= cu->bevobj->size[1];
+ bevcu = cu->bevobj->data;
+ if (bevcu->ext1 == 0.0f && bevcu->ext2 == 0.0f) {
+ ListBase bevdisp = {NULL, NULL};
+ facx = cu->bevobj->size[0];
+ facy = cu->bevobj->size[1];
if (forRender) {
- makeDispListCurveTypes_forRender(scene, cu->bevobj, &bevdisp, NULL, 0);
- dl= bevdisp.first;
+ BKE_displist_make_curveTypes_forRender(scene, cu->bevobj, &bevdisp, NULL, 0);
+ dl = bevdisp.first;
}
else {
- dl= cu->bevobj->disp.first;
- if (dl==NULL) {
- makeDispListCurveTypes(scene, cu->bevobj, 0);
- dl= cu->bevobj->disp.first;
+ dl = cu->bevobj->disp.first;
+ if (dl == NULL) {
+ BKE_displist_make_curveTypes(scene, cu->bevobj, 0);
+ dl = cu->bevobj->disp.first;
}
}
while (dl) {
if (ELEM(dl->type, DL_POLY, DL_SEGM)) {
- dlnew= MEM_mallocN(sizeof(DispList), "makebevelcurve1");
- *dlnew= *dl;
- dlnew->verts= MEM_mallocN(3*sizeof(float)*dl->parts*dl->nr, "makebevelcurve1");
- memcpy(dlnew->verts, dl->verts, 3*sizeof(float)*dl->parts*dl->nr);
+ dlnew = MEM_mallocN(sizeof(DispList), "makebevelcurve1");
+ *dlnew = *dl;
+ dlnew->verts = MEM_mallocN(3 * sizeof(float) * dl->parts * dl->nr, "makebevelcurve1");
+ memcpy(dlnew->verts, dl->verts, 3 * sizeof(float) * dl->parts * dl->nr);
- if (dlnew->type==DL_SEGM) dlnew->flag |= (DL_FRONT_CURVE|DL_BACK_CURVE);
+ if (dlnew->type == DL_SEGM)
+ dlnew->flag |= (DL_FRONT_CURVE | DL_BACK_CURVE);
BLI_addtail(disp, dlnew);
- fp= dlnew->verts;
- nr= dlnew->parts*dlnew->nr;
+ fp = dlnew->verts;
+ nr = dlnew->parts * dlnew->nr;
while (nr--) {
- fp[2]= fp[1]*facy;
- fp[1]= -fp[0]*facx;
- fp[0]= 0.0;
- fp+= 3;
+ fp[2] = fp[1] * facy;
+ fp[1] = -fp[0] * facx;
+ fp[0] = 0.0;
+ fp += 3;
}
}
- dl= dl->next;
+ dl = dl->next;
}
- freedisplist(&bevdisp);
+ BKE_displist_free(&bevdisp);
}
}
- else if (cu->ext1==0.0f && cu->ext2==0.0f) {
+ else if (cu->ext1 == 0.0f && cu->ext2 == 0.0f) {
;
}
- else if (cu->ext2==0.0f) {
- dl= MEM_callocN(sizeof(DispList), "makebevelcurve2");
- dl->verts= MEM_mallocN(2*3*sizeof(float), "makebevelcurve2");
+ else if (cu->ext2 == 0.0f) {
+ dl = MEM_callocN(sizeof(DispList), "makebevelcurve2");
+ dl->verts = MEM_mallocN(2 * 3 * sizeof(float), "makebevelcurve2");
BLI_addtail(disp, dl);
- dl->type= DL_SEGM;
- dl->parts= 1;
- dl->flag= DL_FRONT_CURVE|DL_BACK_CURVE;
- dl->nr= 2;
-
- fp= dl->verts;
- fp[0]= fp[1]= 0.0;
- fp[2]= -cu->ext1;
- fp[3]= fp[4]= 0.0;
- fp[5]= cu->ext1;
- }
- else if ( (cu->flag & (CU_FRONT|CU_BACK))==0 && cu->ext1==0.0f) { // we make a full round bevel in that case
-
- nr= 4+ 2*cu->bevresol;
-
- dl= MEM_callocN(sizeof(DispList), "makebevelcurve p1");
- dl->verts= MEM_mallocN(nr*3*sizeof(float), "makebevelcurve p1");
+ dl->type = DL_SEGM;
+ dl->parts = 1;
+ dl->flag = DL_FRONT_CURVE | DL_BACK_CURVE;
+ dl->nr = 2;
+
+ fp = dl->verts;
+ fp[0] = fp[1] = 0.0;
+ fp[2] = -cu->ext1;
+ fp[3] = fp[4] = 0.0;
+ fp[5] = cu->ext1;
+ }
+ else if ( (cu->flag & (CU_FRONT | CU_BACK)) == 0 && cu->ext1 == 0.0f) { // we make a full round bevel in that case
+ nr = 4 + 2 * cu->bevresol;
+
+ dl = MEM_callocN(sizeof(DispList), "makebevelcurve p1");
+ dl->verts = MEM_mallocN(nr * 3 * sizeof(float), "makebevelcurve p1");
BLI_addtail(disp, dl);
- dl->type= DL_POLY;
- dl->parts= 1;
- dl->flag= DL_BACK_CURVE;
- dl->nr= nr;
+ dl->type = DL_POLY;
+ dl->parts = 1;
+ dl->flag = DL_BACK_CURVE;
+ dl->nr = nr;
/* a circle */
- fp= dl->verts;
- dangle= (2.0f*(float)M_PI/(nr));
- angle= -(nr-1)*dangle;
-
- for (a=0; a<nr; a++) {
- fp[0]= 0.0;
- fp[1]= (cosf(angle)*(cu->ext2));
- fp[2]= (sinf(angle)*(cu->ext2)) - cu->ext1;
- angle+= dangle;
- fp+= 3;
+ fp = dl->verts;
+ dangle = (2.0f * (float)M_PI / (nr));
+ angle = -(nr - 1) * dangle;
+
+ for (a = 0; a < nr; a++) {
+ fp[0] = 0.0;
+ fp[1] = (cosf(angle) * (cu->ext2));
+ fp[2] = (sinf(angle) * (cu->ext2)) - cu->ext1;
+ angle += dangle;
+ fp += 3;
}
}
else {
short dnr;
-
+
/* bevel now in three parts, for proper vertex normals */
/* part 1, back */
if ((cu->flag & CU_BACK) || !(cu->flag & CU_FRONT)) {
- dnr= nr= 2+ cu->bevresol;
- if ( (cu->flag & (CU_FRONT|CU_BACK))==0)
- nr= 3+ 2*cu->bevresol;
+ dnr = nr = 2 + cu->bevresol;
+ if ( (cu->flag & (CU_FRONT | CU_BACK)) == 0)
+ nr = 3 + 2 * cu->bevresol;
- dl= MEM_callocN(sizeof(DispList), "makebevelcurve p1");
- dl->verts= MEM_mallocN(nr*3*sizeof(float), "makebevelcurve p1");
+ dl = MEM_callocN(sizeof(DispList), "makebevelcurve p1");
+ dl->verts = MEM_mallocN(nr * 3 * sizeof(float), "makebevelcurve p1");
BLI_addtail(disp, dl);
- dl->type= DL_SEGM;
- dl->parts= 1;
- dl->flag= DL_BACK_CURVE;
- dl->nr= nr;
+ dl->type = DL_SEGM;
+ dl->parts = 1;
+ dl->flag = DL_BACK_CURVE;
+ dl->nr = nr;
/* half a circle */
- fp= dl->verts;
- dangle= (0.5*M_PI/(dnr-1));
- angle= -(nr-1)*dangle;
+ fp = dl->verts;
+ dangle = (0.5 * M_PI / (dnr - 1));
+ angle = -(nr - 1) * dangle;
- for (a=0; a<nr; a++) {
- fp[0]= 0.0;
- fp[1]= (float)(cosf(angle)*(cu->ext2));
- fp[2]= (float)(sinf(angle)*(cu->ext2)) - cu->ext1;
- angle+= dangle;
- fp+= 3;
+ for (a = 0; a < nr; a++) {
+ fp[0] = 0.0;
+ fp[1] = (float)(cosf(angle) * (cu->ext2));
+ fp[2] = (float)(sinf(angle) * (cu->ext2)) - cu->ext1;
+ angle += dangle;
+ fp += 3;
}
}
-
+
/* part 2, sidefaces */
- if (cu->ext1!=0.0f) {
- nr= 2;
-
- dl= MEM_callocN(sizeof(DispList), "makebevelcurve p2");
- dl->verts= MEM_callocN(nr*3*sizeof(float), "makebevelcurve p2");
+ if (cu->ext1 != 0.0f) {
+ nr = 2;
+
+ dl = MEM_callocN(sizeof(DispList), "makebevelcurve p2");
+ dl->verts = MEM_callocN(nr * 3 * sizeof(float), "makebevelcurve p2");
BLI_addtail(disp, dl);
- dl->type= DL_SEGM;
- dl->parts= 1;
- dl->nr= nr;
-
- fp= dl->verts;
- fp[1]= cu->ext2;
- fp[2]= -cu->ext1;
- fp[4]= cu->ext2;
- fp[5]= cu->ext1;
-
- if ( (cu->flag & (CU_FRONT|CU_BACK))==0) {
- dl= MEM_dupallocN(dl);
- dl->verts= MEM_dupallocN(dl->verts);
+ dl->type = DL_SEGM;
+ dl->parts = 1;
+ dl->nr = nr;
+
+ fp = dl->verts;
+ fp[1] = cu->ext2;
+ fp[2] = -cu->ext1;
+ fp[4] = cu->ext2;
+ fp[5] = cu->ext1;
+
+ if ( (cu->flag & (CU_FRONT | CU_BACK)) == 0) {
+ dl = MEM_dupallocN(dl);
+ dl->verts = MEM_dupallocN(dl->verts);
BLI_addtail(disp, dl);
-
- fp= dl->verts;
- fp[1]= -fp[1];
- fp[2]= -fp[2];
- fp[4]= -fp[4];
- fp[5]= -fp[5];
+
+ fp = dl->verts;
+ fp[1] = -fp[1];
+ fp[2] = -fp[2];
+ fp[4] = -fp[4];
+ fp[5] = -fp[5];
}
}
-
+
/* part 3, front */
if ((cu->flag & CU_FRONT) || !(cu->flag & CU_BACK)) {
- dnr= nr= 2+ cu->bevresol;
- if ( (cu->flag & (CU_FRONT|CU_BACK))==0)
- nr= 3+ 2*cu->bevresol;
+ dnr = nr = 2 + cu->bevresol;
+ if ( (cu->flag & (CU_FRONT | CU_BACK)) == 0)
+ nr = 3 + 2 * cu->bevresol;
- dl= MEM_callocN(sizeof(DispList), "makebevelcurve p3");
- dl->verts= MEM_mallocN(nr*3*sizeof(float), "makebevelcurve p3");
+ dl = MEM_callocN(sizeof(DispList), "makebevelcurve p3");
+ dl->verts = MEM_mallocN(nr * 3 * sizeof(float), "makebevelcurve p3");
BLI_addtail(disp, dl);
- dl->type= DL_SEGM;
- dl->flag= DL_FRONT_CURVE;
- dl->parts= 1;
- dl->nr= nr;
+ dl->type = DL_SEGM;
+ dl->flag = DL_FRONT_CURVE;
+ dl->parts = 1;
+ dl->nr = nr;
/* half a circle */
- fp= dl->verts;
- angle= 0.0;
- dangle= (0.5*M_PI/(dnr-1));
+ fp = dl->verts;
+ angle = 0.0;
+ dangle = (0.5 * M_PI / (dnr - 1));
- for (a=0; a<nr; a++) {
- fp[0]= 0.0;
- fp[1]= (float)(cosf(angle)*(cu->ext2));
- fp[2]= (float)(sinf(angle)*(cu->ext2)) + cu->ext1;
- angle+= dangle;
- fp+= 3;
+ for (a = 0; a < nr; a++) {
+ fp[0] = 0.0;
+ fp[1] = (float)(cosf(angle) * (cu->ext2));
+ fp[2] = (float)(sinf(angle) * (cu->ext2)) + cu->ext1;
+ angle += dangle;
+ fp += 3;
}
}
}
@@ -1519,80 +1595,83 @@ static int cu_isectLL(const float v1[3], const float v2[3], const float v3[3], c
*/
float deler;
- deler= (v1[cox]-v2[cox])*(v3[coy]-v4[coy])-(v3[cox]-v4[cox])*(v1[coy]-v2[coy]);
- if (deler==0.0f) return -1;
+ deler = (v1[cox] - v2[cox]) * (v3[coy] - v4[coy]) - (v3[cox] - v4[cox]) * (v1[coy] - v2[coy]);
+ if (deler == 0.0f)
+ return -1;
- *labda= (v1[coy]-v3[coy])*(v3[cox]-v4[cox])-(v1[cox]-v3[cox])*(v3[coy]-v4[coy]);
- *labda= -(*labda/deler);
+ *labda = (v1[coy] - v3[coy]) * (v3[cox] - v4[cox]) - (v1[cox] - v3[cox]) * (v3[coy] - v4[coy]);
+ *labda = -(*labda / deler);
- deler= v3[coy]-v4[coy];
- if (deler==0) {
- deler=v3[cox]-v4[cox];
- *mu= -(*labda*(v2[cox]-v1[cox])+v1[cox]-v3[cox])/deler;
+ deler = v3[coy] - v4[coy];
+ if (deler == 0) {
+ deler = v3[cox] - v4[cox];
+ *mu = -(*labda * (v2[cox] - v1[cox]) + v1[cox] - v3[cox]) / deler;
}
else {
- *mu= -(*labda*(v2[coy]-v1[coy])+v1[coy]-v3[coy])/deler;
+ *mu = -(*labda * (v2[coy] - v1[coy]) + v1[coy] - v3[coy]) / deler;
}
- vec[cox]= *labda*(v2[cox]-v1[cox])+v1[cox];
- vec[coy]= *labda*(v2[coy]-v1[coy])+v1[coy];
+ vec[cox] = *labda * (v2[cox] - v1[cox]) + v1[cox];
+ vec[coy] = *labda * (v2[coy] - v1[coy]) + v1[coy];
- if (*labda>=0.0f && *labda<=1.0f && *mu>=0.0f && *mu<=1.0f) {
- if (*labda==0.0f || *labda==1.0f || *mu==0.0f || *mu==1.0f) return 1;
+ if (*labda >= 0.0f && *labda <= 1.0f && *mu >= 0.0f && *mu <= 1.0f) {
+ if (*labda == 0.0f || *labda == 1.0f || *mu == 0.0f || *mu == 1.0f)
+ return 1;
return 2;
}
return 0;
}
-static short bevelinside(BevList *bl1,BevList *bl2)
+static short bevelinside(BevList *bl1, BevList *bl2)
{
/* is bl2 INSIDE bl1 ? with left-right method and "labda's" */
/* returns '1' if correct hole */
BevPoint *bevp, *prevbevp;
- float min,max,vec[3],hvec1[3],hvec2[3],lab,mu;
- int nr, links=0,rechts=0,mode;
+ float min, max, vec[3], hvec1[3], hvec2[3], lab, mu;
+ int nr, links = 0, rechts = 0, mode;
/* take first vertex of possible hole */
- bevp= (BevPoint *)(bl2+1);
- hvec1[0]= bevp->vec[0];
- hvec1[1]= bevp->vec[1];
- hvec1[2]= 0.0;
- copy_v3_v3(hvec2,hvec1);
- hvec2[0]+=1000;
+ bevp = (BevPoint *)(bl2 + 1);
+ hvec1[0] = bevp->vec[0];
+ hvec1[1] = bevp->vec[1];
+ hvec1[2] = 0.0;
+ copy_v3_v3(hvec2, hvec1);
+ hvec2[0] += 1000;
/* test it with all edges of potential surounding poly */
/* count number of transitions left-right */
- bevp= (BevPoint *)(bl1+1);
- nr= bl1->nr;
- prevbevp= bevp+(nr-1);
+ bevp = (BevPoint *)(bl1 + 1);
+ nr = bl1->nr;
+ prevbevp = bevp + (nr - 1);
while (nr--) {
- min= prevbevp->vec[1];
- max= bevp->vec[1];
- if (max<min) {
- min= max;
- max= prevbevp->vec[1];
- }
- if (min!=max) {
- if (min<=hvec1[1] && max>=hvec1[1]) {
+ min = prevbevp->vec[1];
+ max = bevp->vec[1];
+ if (max < min) {
+ min = max;
+ max = prevbevp->vec[1];
+ }
+ if (min != max) {
+ if (min <= hvec1[1] && max >= hvec1[1]) {
/* there's a transition, calc intersection point */
- mode= cu_isectLL(prevbevp->vec, bevp->vec, hvec1, hvec2, 0, 1, &lab, &mu, vec);
+ mode = cu_isectLL(prevbevp->vec, bevp->vec, hvec1, hvec2, 0, 1, &lab, &mu, vec);
/* if lab==0.0 or lab==1.0 then the edge intersects exactly a transition
* only allow for one situation: we choose lab= 1.0
*/
if (mode >= 0 && lab != 0.0f) {
- if (vec[0]<hvec1[0]) links++;
+ if (vec[0] < hvec1[0]) links++;
else rechts++;
}
}
}
- prevbevp= bevp;
+ prevbevp = bevp;
bevp++;
}
-
- if ( (links & 1) && (rechts & 1) ) return 1;
+
+ if ( (links & 1) && (rechts & 1) )
+ return 1;
return 0;
}
@@ -1605,10 +1684,12 @@ struct bevelsort {
static int vergxcobev(const void *a1, const void *a2)
{
- const struct bevelsort *x1=a1,*x2=a2;
+ const struct bevelsort *x1 = a1, *x2 = a2;
- if ( x1->left > x2->left ) return 1;
- else if ( x1->left < x2->left) return -1;
+ if (x1->left > x2->left)
+ return 1;
+ else if (x1->left < x2->left)
+ return -1;
return 0;
}
@@ -1618,103 +1699,119 @@ static void calc_bevel_sin_cos(float x1, float y1, float x2, float y2, float *si
{
float t01, t02, x3, y3;
- t01= (float)sqrt(x1*x1+y1*y1);
- t02= (float)sqrt(x2*x2+y2*y2);
- if (t01==0.0f) t01= 1.0f;
- if (t02==0.0f) t02= 1.0f;
-
- x1/=t01;
- y1/=t01;
- x2/=t02;
- y2/=t02;
-
- t02= x1*x2+y1*y2;
- if (fabs(t02)>=1.0) t02= .5*M_PI;
- else t02= (saacos(t02))/2.0f;
-
- t02= (float)sin(t02);
- if (t02==0.0f) t02= 1.0f;
-
- x3= x1-x2;
- y3= y1-y2;
- if (x3==0 && y3==0) {
- x3= y1;
- y3= -x1;
+ t01 = (float)sqrt(x1 * x1 + y1 * y1);
+ t02 = (float)sqrt(x2 * x2 + y2 * y2);
+ if (t01 == 0.0f)
+ t01 = 1.0f;
+ if (t02 == 0.0f)
+ t02 = 1.0f;
+
+ x1 /= t01;
+ y1 /= t01;
+ x2 /= t02;
+ y2 /= t02;
+
+ t02 = x1 * x2 + y1 * y2;
+ if (fabs(t02) >= 1.0)
+ t02 = .5 * M_PI;
+ else
+ t02 = (saacos(t02)) / 2.0f;
+
+ t02 = (float)sin(t02);
+ if (t02 == 0.0f)
+ t02 = 1.0f;
+
+ x3 = x1 - x2;
+ y3 = y1 - y2;
+ if (x3 == 0 && y3 == 0) {
+ x3 = y1;
+ y3 = -x1;
}
else {
- t01= (float)sqrt(x3*x3+y3*y3);
- x3/=t01;
- y3/=t01;
+ t01 = (float)sqrt(x3 * x3 + y3 * y3);
+ x3 /= t01;
+ y3 /= t01;
}
- *sina= -y3/t02;
- *cosa= x3/t02;
+ *sina = -y3 / t02;
+ *cosa = x3 / t02;
}
-static void alfa_bezpart(BezTriple *prevbezt, BezTriple *bezt, Nurb *nu, float *tilt_array, float *radius_array, float *weight_array, int resolu, int stride)
+static void alfa_bezpart(BezTriple *prevbezt, BezTriple *bezt, Nurb *nu, float *tilt_array, float *radius_array,
+ float *weight_array, int resolu, int stride)
{
BezTriple *pprev, *next, *last;
float fac, dfac, t[4];
int a;
-
- if (tilt_array==NULL && radius_array==NULL)
+
+ if (tilt_array == NULL && radius_array == NULL)
return;
-
- last= nu->bezt+(nu->pntsu-1);
-
+
+ last = nu->bezt + (nu->pntsu - 1);
+
/* returns a point */
- if (prevbezt==nu->bezt) {
- if (nu->flagu & CU_NURB_CYCLIC) pprev= last;
- else pprev= prevbezt;
+ if (prevbezt == nu->bezt) {
+ if (nu->flagu & CU_NURB_CYCLIC)
+ pprev = last;
+ else
+ pprev = prevbezt;
}
- else pprev= prevbezt-1;
-
+ else
+ pprev = prevbezt - 1;
+
/* next point */
- if (bezt==last) {
- if (nu->flagu & CU_NURB_CYCLIC) next= nu->bezt;
- else next= bezt;
- }
- else next= bezt+1;
-
- fac= 0.0;
- dfac= 1.0f/(float)resolu;
-
- for (a=0; a<resolu; a++, fac+= dfac) {
+ if (bezt == last) {
+ if (nu->flagu & CU_NURB_CYCLIC)
+ next = nu->bezt;
+ else
+ next = bezt;
+ }
+ else
+ next = bezt + 1;
+
+ fac = 0.0;
+ dfac = 1.0f / (float)resolu;
+
+ for (a = 0; a < resolu; a++, fac += dfac) {
if (tilt_array) {
- if (nu->tilt_interp==KEY_CU_EASE) { /* May as well support for tilt also 2.47 ease interp */
- *tilt_array = prevbezt->alfa + (bezt->alfa - prevbezt->alfa)*(3.0f*fac*fac - 2.0f*fac*fac*fac);
+ if (nu->tilt_interp == KEY_CU_EASE) { /* May as well support for tilt also 2.47 ease interp */
+ *tilt_array = prevbezt->alfa +
+ (bezt->alfa - prevbezt->alfa) * (3.0f * fac * fac - 2.0f * fac * fac * fac);
}
else {
key_curve_position_weights(fac, t, nu->tilt_interp);
- *tilt_array= t[0]*pprev->alfa + t[1]*prevbezt->alfa + t[2]*bezt->alfa + t[3]*next->alfa;
+ *tilt_array = t[0] * pprev->alfa + t[1] * prevbezt->alfa + t[2] * bezt->alfa + t[3] * next->alfa;
}
-
- tilt_array = (float *)(((char *)tilt_array) + stride);
+
+ tilt_array = (float *)(((char *)tilt_array) + stride);
}
-
+
if (radius_array) {
- if (nu->radius_interp==KEY_CU_EASE) {
+ if (nu->radius_interp == KEY_CU_EASE) {
/* Support 2.47 ease interp
* Note! - this only takes the 2 points into account,
* giving much more localized results to changes in radius, sometimes you want that */
- *radius_array = prevbezt->radius + (bezt->radius - prevbezt->radius)*(3.0f*fac*fac - 2.0f*fac*fac*fac);
+ *radius_array = prevbezt->radius +
+ (bezt->radius - prevbezt->radius) * (3.0f * fac * fac - 2.0f * fac * fac * fac);
}
else {
-
+
/* reuse interpolation from tilt if we can */
- if (tilt_array==NULL || nu->tilt_interp != nu->radius_interp) {
+ if (tilt_array == NULL || nu->tilt_interp != nu->radius_interp) {
key_curve_position_weights(fac, t, nu->radius_interp);
}
- *radius_array= t[0]*pprev->radius + t[1]*prevbezt->radius + t[2]*bezt->radius + t[3]*next->radius;
+ *radius_array = t[0] * pprev->radius + t[1] * prevbezt->radius +
+ t[2] * bezt->radius + t[3] * next->radius;
}
-
- radius_array = (float *)(((char *)radius_array) + stride);
+
+ radius_array = (float *)(((char *)radius_array) + stride);
}
if (weight_array) {
/* basic interpolation for now, could copy tilt interp too */
- *weight_array = prevbezt->weight + (bezt->weight - prevbezt->weight)*(3.0f*fac*fac - 2.0f*fac*fac*fac);
+ *weight_array = prevbezt->weight +
+ (bezt->weight - prevbezt->weight) * (3.0f * fac * fac - 2.0f * fac * fac * fac);
weight_array = (float *)(((char *)weight_array) + stride);
}
@@ -1730,35 +1827,36 @@ static void bevel_list_cyclic_fix_3D(BevList *bl)
{
BevPoint *bevp, *bevp1;
- bevp= (BevPoint *)(bl+1);
- bevp1= bevp+1;
+ bevp = (BevPoint *)(bl + 1);
+ bevp1 = bevp + 1;
copy_qt_qt(bevp->quat, bevp1->quat);
copy_v3_v3(bevp->dir, bevp1->dir);
copy_v3_v3(bevp->tan, bevp1->tan);
- bevp= (BevPoint *)(bl+1);
- bevp+= (bl->nr-1);
- bevp1= bevp-1;
+ bevp = (BevPoint *)(bl + 1);
+ bevp += (bl->nr - 1);
+ bevp1 = bevp - 1;
copy_qt_qt(bevp->quat, bevp1->quat);
copy_v3_v3(bevp->dir, bevp1->dir);
copy_v3_v3(bevp->tan, bevp1->tan);
}
+
/* utility for make_bevel_list_3D_* funcs */
static void bevel_list_calc_bisect(BevList *bl)
{
BevPoint *bevp2, *bevp1, *bevp0;
int nr;
- bevp2= (BevPoint *)(bl+1);
- bevp1= bevp2+(bl->nr-1);
- bevp0= bevp1-1;
+ bevp2 = (BevPoint *)(bl + 1);
+ bevp1 = bevp2 + (bl->nr - 1);
+ bevp0 = bevp1 - 1;
- nr= bl->nr;
+ nr = bl->nr;
while (nr--) {
/* totally simple */
bisect_v3_v3v3v3(bevp1->dir, bevp0->vec, bevp1->vec, bevp2->vec);
- bevp0= bevp1;
- bevp1= bevp2;
+ bevp0 = bevp1;
+ bevp1 = bevp2;
bevp2++;
}
}
@@ -1767,17 +1865,17 @@ static void bevel_list_flip_tangents(BevList *bl)
BevPoint *bevp2, *bevp1, *bevp0;
int nr;
- bevp2= (BevPoint *)(bl+1);
- bevp1= bevp2+(bl->nr-1);
- bevp0= bevp1-1;
+ bevp2 = (BevPoint *)(bl + 1);
+ bevp1 = bevp2 + (bl->nr - 1);
+ bevp0 = bevp1 - 1;
- nr= bl->nr;
+ nr = bl->nr;
while (nr--) {
if (RAD2DEGF(angle_v2v2(bevp0->tan, bevp1->tan)) > 90.0f)
negate_v3(bevp1->tan);
- bevp0= bevp1;
- bevp1= bevp2;
+ bevp0 = bevp1;
+ bevp1 = bevp2;
bevp2++;
}
}
@@ -1788,16 +1886,16 @@ static void bevel_list_apply_tilt(BevList *bl)
int nr;
float q[4];
- bevp2= (BevPoint *)(bl+1);
- bevp1= bevp2+(bl->nr-1);
+ bevp2 = (BevPoint *)(bl + 1);
+ bevp1 = bevp2 + (bl->nr - 1);
- nr= bl->nr;
+ nr = bl->nr;
while (nr--) {
axis_angle_to_quat(q, bevp1->dir, bevp1->alfa);
mul_qt_qtqt(bevp1->quat, q, bevp1->quat);
normalize_qt(bevp1->quat);
- bevp1= bevp2;
+ bevp1 = bevp2;
bevp2++;
}
}
@@ -1811,33 +1909,31 @@ static void bevel_list_smooth(BevList *bl, int smooth_iter)
float bevp0_quat[4];
int a;
- for (a=0; a < smooth_iter; a++) {
-
- bevp2= (BevPoint *)(bl+1);
- bevp1= bevp2+(bl->nr-1);
- bevp0= bevp1-1;
+ for (a = 0; a < smooth_iter; a++) {
+ bevp2 = (BevPoint *)(bl + 1);
+ bevp1 = bevp2 + (bl->nr - 1);
+ bevp0 = bevp1 - 1;
- nr= bl->nr;
+ nr = bl->nr;
- if (bl->poly== -1) { /* check its not cyclic */
+ if (bl->poly == -1) { /* check its not cyclic */
/* skip the first point */
/* bevp0= bevp1; */
- bevp1= bevp2;
+ bevp1 = bevp2;
bevp2++;
nr--;
- bevp0= bevp1;
- bevp1= bevp2;
+ bevp0 = bevp1;
+ bevp1 = bevp2;
bevp2++;
nr--;
-
}
copy_qt_qt(bevp0_quat, bevp0->quat);
while (nr--) {
/* interpolate quats */
- float zaxis[3] = {0,0,1}, cross[3], q2[4];
+ float zaxis[3] = {0, 0, 1}, cross[3], q2[4];
interp_qt_qtqt(q, bevp0_quat, bevp2->quat, 0.5);
normalize_qt(q);
@@ -1851,9 +1947,8 @@ static void bevel_list_smooth(BevList *bl, int smooth_iter)
interp_qt_qtqt(bevp1->quat, bevp1->quat, q, 0.5);
normalize_qt(bevp1->quat);
-
/* bevp0= bevp1; */ /* UNUSED */
- bevp1= bevp2;
+ bevp1 = bevp2;
bevp2++;
}
}
@@ -1864,18 +1959,18 @@ static void make_bevel_list_3D_zup(BevList *bl)
BevPoint *bevp2, *bevp1, *bevp0; /* standard for all make_bevel_list_3D_* funcs */
int nr;
- bevp2= (BevPoint *)(bl+1);
- bevp1= bevp2+(bl->nr-1);
- bevp0= bevp1-1;
+ bevp2 = (BevPoint *)(bl + 1);
+ bevp1 = bevp2 + (bl->nr - 1);
+ bevp0 = bevp1 - 1;
- nr= bl->nr;
+ nr = bl->nr;
while (nr--) {
/* totally simple */
bisect_v3_v3v3v3(bevp1->dir, bevp0->vec, bevp1->vec, bevp2->vec);
- vec_to_quat( bevp1->quat,bevp1->dir, 5, 1);
+ vec_to_quat(bevp1->quat, bevp1->dir, 5, 1);
- bevp0= bevp1;
- bevp1= bevp2;
+ bevp0 = bevp1;
+ bevp1 = bevp2;
bevp2++;
}
}
@@ -1888,18 +1983,18 @@ static void make_bevel_list_3D_minimum_twist(BevList *bl)
bevel_list_calc_bisect(bl);
- bevp2= (BevPoint *)(bl+1);
- bevp1= bevp2+(bl->nr-1);
- bevp0= bevp1-1;
+ bevp2 = (BevPoint *)(bl + 1);
+ bevp1 = bevp2 + (bl->nr - 1);
+ bevp0 = bevp1 - 1;
- nr= bl->nr;
+ nr = bl->nr;
while (nr--) {
- if (nr+4 > bl->nr) { /* first time and second time, otherwise first point adjusts last */
- vec_to_quat( bevp1->quat,bevp1->dir, 5, 1);
+ if (nr + 4 > bl->nr) { /* first time and second time, otherwise first point adjusts last */
+ vec_to_quat(bevp1->quat, bevp1->dir, 5, 1);
}
else {
- float angle= angle_normalized_v3v3(bevp0->dir, bevp1->dir);
+ float angle = angle_normalized_v3v3(bevp0->dir, bevp1->dir);
if (angle > 0.0f) { /* otherwise we can keep as is */
float cross_tmp[3];
@@ -1912,8 +2007,8 @@ static void make_bevel_list_3D_minimum_twist(BevList *bl)
}
}
- bevp0= bevp1;
- bevp1= bevp2;
+ bevp0 = bevp1;
+ bevp1 = bevp2;
bevp2++;
}
@@ -1930,14 +2025,14 @@ static void make_bevel_list_3D_minimum_twist(BevList *bl)
*
* this is why we compare last with second last
* */
- float vec_1[3]= {0,1,0}, vec_2[3]= {0,1,0}, angle, ang_fac, cross_tmp[3];
+ float vec_1[3] = {0, 1, 0}, vec_2[3] = {0, 1, 0}, angle, ang_fac, cross_tmp[3];
BevPoint *bevp_first;
BevPoint *bevp_last;
- bevp_first= (BevPoint *)(bl+1);
- bevp_first+= bl->nr-1;
+ bevp_first = (BevPoint *)(bl + 1);
+ bevp_first += bl->nr - 1;
bevp_last = bevp_first;
bevp_last--;
@@ -1948,7 +2043,7 @@ static void make_bevel_list_3D_minimum_twist(BevList *bl)
normalize_v3(vec_2);
/* align the vector, can avoid this and it looks 98% OK but
- * better to align the angle quat roll's before comparing */
+ * better to align the angle quat roll's before comparing */
{
cross_v3_v3v3(cross_tmp, bevp_last->dir, bevp_first->dir);
angle = angle_normalized_v3v3(bevp_first->dir, bevp_last->dir);
@@ -1956,7 +2051,7 @@ static void make_bevel_list_3D_minimum_twist(BevList *bl)
mul_qt_v3(q, vec_2);
}
- angle= angle_normalized_v3v3(vec_1, vec_2);
+ angle = angle_normalized_v3v3(vec_1, vec_2);
/* flip rotation if needs be */
cross_v3_v3v3(cross_tmp, vec_1, vec_2);
@@ -1964,19 +2059,19 @@ static void make_bevel_list_3D_minimum_twist(BevList *bl)
if (angle_normalized_v3v3(bevp_first->dir, cross_tmp) < DEG2RADF(90.0f))
angle = -angle;
- bevp2= (BevPoint *)(bl+1);
- bevp1= bevp2+(bl->nr-1);
- bevp0= bevp1-1;
+ bevp2 = (BevPoint *)(bl + 1);
+ bevp1 = bevp2 + (bl->nr - 1);
+ bevp0 = bevp1 - 1;
- nr= bl->nr;
+ nr = bl->nr;
while (nr--) {
- ang_fac= angle * (1.0f-((float)nr/bl->nr)); /* also works */
+ ang_fac = angle * (1.0f - ((float)nr / bl->nr)); /* also works */
axis_angle_to_quat(q, bevp1->dir, ang_fac);
mul_qt_qtqt(bevp1->quat, q, bevp1->quat);
- bevp0= bevp1;
- bevp1= bevp2;
+ bevp0 = bevp1;
+ bevp1 = bevp2;
bevp2++;
}
}
@@ -1990,66 +2085,64 @@ static void make_bevel_list_3D_tangent(BevList *bl)
float bevp0_tan[3], cross_tmp[3];
bevel_list_calc_bisect(bl);
- if (bl->poly== -1) /* check its not cyclic */
- bevel_list_cyclic_fix_3D(bl); // XXX - run this now so tangents will be right before doing the flipping
+ if (bl->poly == -1) /* check its not cyclic */
+ bevel_list_cyclic_fix_3D(bl); // XXX - run this now so tangents will be right before doing the flipping
bevel_list_flip_tangents(bl);
/* correct the tangents */
- bevp2= (BevPoint *)(bl+1);
- bevp1= bevp2+(bl->nr-1);
- bevp0= bevp1-1;
+ bevp2 = (BevPoint *)(bl + 1);
+ bevp1 = bevp2 + (bl->nr - 1);
+ bevp0 = bevp1 - 1;
- nr= bl->nr;
+ nr = bl->nr;
while (nr--) {
-
cross_v3_v3v3(cross_tmp, bevp1->tan, bevp1->dir);
cross_v3_v3v3(bevp1->tan, cross_tmp, bevp1->dir);
normalize_v3(bevp1->tan);
- bevp0= bevp1;
- bevp1= bevp2;
+ bevp0 = bevp1;
+ bevp1 = bevp2;
bevp2++;
}
/* now for the real twist calc */
- bevp2= (BevPoint *)(bl+1);
- bevp1= bevp2+(bl->nr-1);
- bevp0= bevp1-1;
+ bevp2 = (BevPoint *)(bl + 1);
+ bevp1 = bevp2 + (bl->nr - 1);
+ bevp0 = bevp1 - 1;
copy_v3_v3(bevp0_tan, bevp0->tan);
- nr= bl->nr;
+ nr = bl->nr;
while (nr--) {
-
/* make perpendicular, modify tan in place, is ok */
float cross_tmp[3];
- float zero[3] = {0,0,0};
+ float zero[3] = {0, 0, 0};
cross_v3_v3v3(cross_tmp, bevp1->tan, bevp1->dir);
normalize_v3(cross_tmp);
- tri_to_quat( bevp1->quat,zero, cross_tmp, bevp1->tan); /* XXX - could be faster */
+ tri_to_quat(bevp1->quat, zero, cross_tmp, bevp1->tan); /* XXX - could be faster */
/* bevp0= bevp1; */ /* UNUSED */
- bevp1= bevp2;
+ bevp1 = bevp2;
bevp2++;
}
}
static void make_bevel_list_3D(BevList *bl, int smooth_iter, int twist_mode)
{
- switch(twist_mode) {
- case CU_TWIST_TANGENT:
- make_bevel_list_3D_tangent(bl);
- break;
- case CU_TWIST_MINIMUM:
- make_bevel_list_3D_minimum_twist(bl);
- break;
- default: /* CU_TWIST_Z_UP default, pre 2.49c */
- make_bevel_list_3D_zup(bl);
+ switch (twist_mode) {
+ case CU_TWIST_TANGENT:
+ make_bevel_list_3D_tangent(bl);
+ break;
+ case CU_TWIST_MINIMUM:
+ make_bevel_list_3D_minimum_twist(bl);
+ break;
+ default: /* CU_TWIST_Z_UP default, pre 2.49c */
+ make_bevel_list_3D_zup(bl);
}
- if (bl->poly== -1) /* check its not cyclic */
+ if (bl->poly == -1) /* check its not cyclic */
bevel_list_cyclic_fix_3D(bl);
if (smooth_iter)
@@ -2058,21 +2151,19 @@ static void make_bevel_list_3D(BevList *bl, int smooth_iter, int twist_mode)
bevel_list_apply_tilt(bl);
}
-
-
/* only for 2 points */
static void make_bevel_list_segment_3D(BevList *bl)
{
float q[4];
- BevPoint *bevp2= (BevPoint *)(bl+1);
- BevPoint *bevp1= bevp2+1;
+ BevPoint *bevp2 = (BevPoint *)(bl + 1);
+ BevPoint *bevp1 = bevp2 + 1;
/* simple quat/dir */
sub_v3_v3v3(bevp1->dir, bevp1->vec, bevp2->vec);
normalize_v3(bevp1->dir);
- vec_to_quat( bevp1->quat,bevp1->dir, 5, 1);
+ vec_to_quat(bevp1->quat, bevp1->dir, 5, 1);
axis_angle_to_quat(q, bevp1->dir, bevp1->alfa);
mul_qt_qtqt(bevp1->quat, q, bevp1->quat);
@@ -2081,9 +2172,7 @@ static void make_bevel_list_segment_3D(BevList *bl)
copy_qt_qt(bevp2->quat, bevp1->quat);
}
-
-
-void makeBevelList(Object *ob)
+void BKE_curve_bevelList_make(Object *ob)
{
/*
* - convert all curves to polys, with indication of resol and flags for double-vertices
@@ -2101,210 +2190,211 @@ void makeBevelList(Object *ob)
struct bevelsort *sortdata, *sd, *sd1;
int a, b, nr, poly, resolu = 0, len = 0;
int do_tilt, do_radius, do_weight;
-
+
/* this function needs an object, because of tflag and upflag */
- cu= ob->data;
+ cu = ob->data;
/* do we need to calculate the radius for each point? */
/* do_radius = (cu->bevobj || cu->taperobj || (cu->flag & CU_FRONT) || (cu->flag & CU_BACK)) ? 0 : 1; */
-
+
/* STEP 1: MAKE POLYS */
BLI_freelistN(&(cu->bev));
- if (cu->editnurb && ob->type!=OB_FONT) {
- ListBase *nurbs= curve_editnurbs(cu);
+ if (cu->editnurb && ob->type != OB_FONT) {
+ ListBase *nurbs = BKE_curve_editNurbs_get(cu);
nu = nurbs->first;
}
else {
nu = cu->nurb.first;
}
-
+
while (nu) {
-
/* check if we will calculate tilt data */
do_tilt = CU_DO_TILT(cu, nu);
do_radius = CU_DO_RADIUS(cu, nu); /* normal display uses the radius, better just to calculate them */
do_weight = 1;
-
+
/* check we are a single point? also check we are not a surface and that the orderu is sane,
* enforced in the UI but can go wrong possibly */
- if (!check_valid_nurb_u(nu)) {
- bl= MEM_callocN(sizeof(BevList)+1*sizeof(BevPoint), "makeBevelList1");
+ if (!BKE_nurb_check_valid_u(nu)) {
+ bl = MEM_callocN(sizeof(BevList) + 1 * sizeof(BevPoint), "makeBevelList1");
BLI_addtail(&(cu->bev), bl);
- bl->nr= 0;
+ bl->nr = 0;
}
else {
- if (G.rendering && cu->resolu_ren!=0)
- resolu= cu->resolu_ren;
+ if (G.rendering && cu->resolu_ren != 0)
+ resolu = cu->resolu_ren;
else
- resolu= nu->resolu;
-
+ resolu = nu->resolu;
+
if (nu->type == CU_POLY) {
- len= nu->pntsu;
- bl= MEM_callocN(sizeof(BevList)+len*sizeof(BevPoint), "makeBevelList2");
+ len = nu->pntsu;
+ bl = MEM_callocN(sizeof(BevList) + len * sizeof(BevPoint), "makeBevelList2");
BLI_addtail(&(cu->bev), bl);
-
- if (nu->flagu & CU_NURB_CYCLIC) bl->poly= 0;
- else bl->poly= -1;
- bl->nr= len;
- bl->dupe_nr= 0;
- bevp= (BevPoint *)(bl+1);
- bp= nu->bp;
-
+
+ if (nu->flagu & CU_NURB_CYCLIC) bl->poly = 0;
+ else bl->poly = -1;
+ bl->nr = len;
+ bl->dupe_nr = 0;
+ bevp = (BevPoint *)(bl + 1);
+ bp = nu->bp;
+
while (len--) {
copy_v3_v3(bevp->vec, bp->vec);
- bevp->alfa= bp->alfa;
- bevp->radius= bp->radius;
- bevp->weight= bp->weight;
- bevp->split_tag= TRUE;
+ bevp->alfa = bp->alfa;
+ bevp->radius = bp->radius;
+ bevp->weight = bp->weight;
+ bevp->split_tag = TRUE;
bevp++;
bp++;
}
}
else if (nu->type == CU_BEZIER) {
-
- len= resolu*(nu->pntsu+ (nu->flagu & CU_NURB_CYCLIC) -1)+1; /* in case last point is not cyclic */
- bl= MEM_callocN(sizeof(BevList)+len*sizeof(BevPoint), "makeBevelBPoints");
+ /* in case last point is not cyclic */
+ len = resolu * (nu->pntsu + (nu->flagu & CU_NURB_CYCLIC) - 1) + 1;
+ bl = MEM_callocN(sizeof(BevList) + len * sizeof(BevPoint), "makeBevelBPoints");
BLI_addtail(&(cu->bev), bl);
-
- if (nu->flagu & CU_NURB_CYCLIC) bl->poly= 0;
- else bl->poly= -1;
- bevp= (BevPoint *)(bl+1);
-
- a= nu->pntsu-1;
- bezt= nu->bezt;
+
+ if (nu->flagu & CU_NURB_CYCLIC) bl->poly = 0;
+ else bl->poly = -1;
+ bevp = (BevPoint *)(bl + 1);
+
+ a = nu->pntsu - 1;
+ bezt = nu->bezt;
if (nu->flagu & CU_NURB_CYCLIC) {
a++;
- prevbezt= nu->bezt+(nu->pntsu-1);
+ prevbezt = nu->bezt + (nu->pntsu - 1);
}
else {
- prevbezt= bezt;
+ prevbezt = bezt;
bezt++;
}
-
+
while (a--) {
- if (prevbezt->h2==HD_VECT && bezt->h1==HD_VECT) {
+ if (prevbezt->h2 == HD_VECT && bezt->h1 == HD_VECT) {
copy_v3_v3(bevp->vec, prevbezt->vec[1]);
- bevp->alfa= prevbezt->alfa;
- bevp->radius= prevbezt->radius;
- bevp->weight= prevbezt->weight;
- bevp->split_tag= TRUE;
- bevp->dupe_tag= FALSE;
+ bevp->alfa = prevbezt->alfa;
+ bevp->radius = prevbezt->radius;
+ bevp->weight = prevbezt->weight;
+ bevp->split_tag = TRUE;
+ bevp->dupe_tag = FALSE;
bevp++;
bl->nr++;
- bl->dupe_nr= 1;
+ bl->dupe_nr = 1;
}
else {
/* always do all three, to prevent data hanging around */
int j;
-
+
/* BevPoint must stay aligned to 4 so sizeof(BevPoint)/sizeof(float) works */
- for (j=0; j<3; j++) {
- forward_diff_bezier( prevbezt->vec[1][j], prevbezt->vec[2][j],
- bezt->vec[0][j], bezt->vec[1][j],
- &(bevp->vec[j]), resolu, sizeof(BevPoint));
+ for (j = 0; j < 3; j++) {
+ BKE_curve_forward_diff_bezier(prevbezt->vec[1][j], prevbezt->vec[2][j],
+ bezt->vec[0][j], bezt->vec[1][j],
+ &(bevp->vec[j]), resolu, sizeof(BevPoint));
}
-
+
/* if both arrays are NULL do nothiong */
- alfa_bezpart( prevbezt, bezt, nu,
- do_tilt ? &bevp->alfa : NULL,
- do_radius ? &bevp->radius : NULL,
- do_weight ? &bevp->weight : NULL,
- resolu, sizeof(BevPoint));
-
-
- if (cu->twist_mode==CU_TWIST_TANGENT) {
- forward_diff_bezier_cotangent(
- prevbezt->vec[1], prevbezt->vec[2],
- bezt->vec[0], bezt->vec[1],
- bevp->tan, resolu, sizeof(BevPoint));
+ alfa_bezpart(prevbezt, bezt, nu,
+ do_tilt ? &bevp->alfa : NULL,
+ do_radius ? &bevp->radius : NULL,
+ do_weight ? &bevp->weight : NULL,
+ resolu, sizeof(BevPoint));
+
+
+ if (cu->twist_mode == CU_TWIST_TANGENT) {
+ forward_diff_bezier_cotangent(prevbezt->vec[1], prevbezt->vec[2],
+ bezt->vec[0], bezt->vec[1],
+ bevp->tan, resolu, sizeof(BevPoint));
}
/* indicate with handlecodes double points */
- if (prevbezt->h1==prevbezt->h2) {
- if (prevbezt->h1==0 || prevbezt->h1==HD_VECT) bevp->split_tag= TRUE;
+ if (prevbezt->h1 == prevbezt->h2) {
+ if (prevbezt->h1 == 0 || prevbezt->h1 == HD_VECT)
+ bevp->split_tag = TRUE;
}
else {
- if (prevbezt->h1==0 || prevbezt->h1==HD_VECT) bevp->split_tag= TRUE;
- else if (prevbezt->h2==0 || prevbezt->h2==HD_VECT) bevp->split_tag= TRUE;
+ if (prevbezt->h1 == 0 || prevbezt->h1 == HD_VECT)
+ bevp->split_tag = TRUE;
+ else if (prevbezt->h2 == 0 || prevbezt->h2 == HD_VECT)
+ bevp->split_tag = TRUE;
}
- bl->nr+= resolu;
- bevp+= resolu;
+ bl->nr += resolu;
+ bevp += resolu;
}
- prevbezt= bezt;
+ prevbezt = bezt;
bezt++;
}
-
- if ((nu->flagu & CU_NURB_CYCLIC)==0) { /* not cyclic: endpoint */
+
+ if ((nu->flagu & CU_NURB_CYCLIC) == 0) { /* not cyclic: endpoint */
copy_v3_v3(bevp->vec, prevbezt->vec[1]);
- bevp->alfa= prevbezt->alfa;
- bevp->radius= prevbezt->radius;
- bevp->weight= prevbezt->weight;
+ bevp->alfa = prevbezt->alfa;
+ bevp->radius = prevbezt->radius;
+ bevp->weight = prevbezt->weight;
bl->nr++;
}
}
else if (nu->type == CU_NURBS) {
- if (nu->pntsv==1) {
- len= (resolu*SEGMENTSU(nu));
-
- bl= MEM_callocN(sizeof(BevList)+len*sizeof(BevPoint), "makeBevelList3");
+ if (nu->pntsv == 1) {
+ len = (resolu * SEGMENTSU(nu));
+
+ bl = MEM_callocN(sizeof(BevList) + len * sizeof(BevPoint), "makeBevelList3");
BLI_addtail(&(cu->bev), bl);
- bl->nr= len;
- bl->dupe_nr= 0;
- if (nu->flagu & CU_NURB_CYCLIC) bl->poly= 0;
- else bl->poly= -1;
- bevp= (BevPoint *)(bl+1);
-
- makeNurbcurve( nu, &bevp->vec[0],
- do_tilt ? &bevp->alfa : NULL,
- do_radius ? &bevp->radius : NULL,
- do_weight ? &bevp->weight : NULL,
- resolu, sizeof(BevPoint));
+ bl->nr = len;
+ bl->dupe_nr = 0;
+ if (nu->flagu & CU_NURB_CYCLIC) bl->poly = 0;
+ else bl->poly = -1;
+ bevp = (BevPoint *)(bl + 1);
+
+ BKE_nurb_makeCurve(nu, &bevp->vec[0],
+ do_tilt ? &bevp->alfa : NULL,
+ do_radius ? &bevp->radius : NULL,
+ do_weight ? &bevp->weight : NULL,
+ resolu, sizeof(BevPoint));
}
}
}
- nu= nu->next;
+ nu = nu->next;
}
/* STEP 2: DOUBLE POINTS AND AUTOMATIC RESOLUTION, REDUCE DATABLOCKS */
- bl= cu->bev.first;
+ bl = cu->bev.first;
while (bl) {
if (bl->nr) { /* null bevel items come from single points */
- nr= bl->nr;
- bevp1= (BevPoint *)(bl+1);
- bevp0= bevp1+(nr-1);
+ nr = bl->nr;
+ bevp1 = (BevPoint *)(bl + 1);
+ bevp0 = bevp1 + (nr - 1);
nr--;
while (nr--) {
- if ( fabs(bevp0->vec[0]-bevp1->vec[0])<0.00001 ) {
- if ( fabs(bevp0->vec[1]-bevp1->vec[1])<0.00001 ) {
- if ( fabs(bevp0->vec[2]-bevp1->vec[2])<0.00001 ) {
- bevp0->dupe_tag= TRUE;
+ if (fabs(bevp0->vec[0] - bevp1->vec[0]) < 0.00001) {
+ if (fabs(bevp0->vec[1] - bevp1->vec[1]) < 0.00001) {
+ if (fabs(bevp0->vec[2] - bevp1->vec[2]) < 0.00001) {
+ bevp0->dupe_tag = TRUE;
bl->dupe_nr++;
}
}
}
- bevp0= bevp1;
+ bevp0 = bevp1;
bevp1++;
}
}
- bl= bl->next;
+ bl = bl->next;
}
- bl= cu->bev.first;
+ bl = cu->bev.first;
while (bl) {
- blnext= bl->next;
+ blnext = bl->next;
if (bl->nr && bl->dupe_nr) {
- nr= bl->nr- bl->dupe_nr+1; /* +1 because vectorbezier sets flag too */
- blnew= MEM_mallocN(sizeof(BevList)+nr*sizeof(BevPoint), "makeBevelList4");
+ nr = bl->nr - bl->dupe_nr + 1; /* +1 because vectorbezier sets flag too */
+ blnew = MEM_mallocN(sizeof(BevList) + nr * sizeof(BevPoint), "makeBevelList4");
memcpy(blnew, bl, sizeof(BevList));
- blnew->nr= 0;
+ blnew->nr = 0;
BLI_remlink(&(cu->bev), bl);
- BLI_insertlinkbefore(&(cu->bev),blnext,blnew); /* to make sure bevlijst is tuned with nurblist */
- bevp0= (BevPoint *)(bl+1);
- bevp1= (BevPoint *)(blnew+1);
- nr= bl->nr;
+ BLI_insertlinkbefore(&(cu->bev), blnext, blnew); /* to make sure bevlijst is tuned with nurblist */
+ bevp0 = (BevPoint *)(bl + 1);
+ bevp1 = (BevPoint *)(blnew + 1);
+ nr = bl->nr;
while (nr--) {
- if (bevp0->dupe_tag==0) {
+ if (bevp0->dupe_tag == 0) {
memcpy(bevp1, bevp0, sizeof(BevPoint));
bevp1++;
blnew->nr++;
@@ -2312,84 +2402,90 @@ void makeBevelList(Object *ob)
bevp0++;
}
MEM_freeN(bl);
- blnew->dupe_nr= 0;
+ blnew->dupe_nr = 0;
}
- bl= blnext;
+ bl = blnext;
}
/* STEP 3: POLYS COUNT AND AUTOHOLE */
- bl= cu->bev.first;
- poly= 0;
+ bl = cu->bev.first;
+ poly = 0;
while (bl) {
- if (bl->nr && bl->poly>=0) {
+ if (bl->nr && bl->poly >= 0) {
poly++;
- bl->poly= poly;
- bl->hole= 0;
+ bl->poly = poly;
+ bl->hole = 0;
}
- bl= bl->next;
+ bl = bl->next;
}
-
/* find extreme left points, also test (turning) direction */
- if (poly>0) {
- sd= sortdata= MEM_mallocN(sizeof(struct bevelsort)*poly, "makeBevelList5");
- bl= cu->bev.first;
+ if (poly > 0) {
+ sd = sortdata = MEM_mallocN(sizeof(struct bevelsort) * poly, "makeBevelList5");
+ bl = cu->bev.first;
while (bl) {
- if (bl->poly>0) {
+ if (bl->poly > 0) {
- min= 300000.0;
- bevp= (BevPoint *)(bl+1);
- nr= bl->nr;
+ min = 300000.0;
+ bevp = (BevPoint *)(bl + 1);
+ nr = bl->nr;
while (nr--) {
- if (min>bevp->vec[0]) {
- min= bevp->vec[0];
- bevp1= bevp;
+ if (min > bevp->vec[0]) {
+ min = bevp->vec[0];
+ bevp1 = bevp;
}
bevp++;
}
- sd->bl= bl;
- sd->left= min;
+ sd->bl = bl;
+ sd->left = min;
- bevp= (BevPoint *)(bl+1);
- if (bevp1== bevp) bevp0= bevp+ (bl->nr-1);
- else bevp0= bevp1-1;
- bevp= bevp+ (bl->nr-1);
- if (bevp1== bevp) bevp2= (BevPoint *)(bl+1);
- else bevp2= bevp1+1;
+ bevp = (BevPoint *)(bl + 1);
+ if (bevp1 == bevp)
+ bevp0 = bevp + (bl->nr - 1);
+ else
+ bevp0 = bevp1 - 1;
+ bevp = bevp + (bl->nr - 1);
+ if (bevp1 == bevp)
+ bevp2 = (BevPoint *)(bl + 1);
+ else
+ bevp2 = bevp1 + 1;
- inp= (bevp1->vec[0]- bevp0->vec[0]) * (bevp0->vec[1]- bevp2->vec[1]) + (bevp0->vec[1]- bevp1->vec[1]) * (bevp0->vec[0]- bevp2->vec[0]);
+ inp = (bevp1->vec[0] - bevp0->vec[0]) * (bevp0->vec[1] - bevp2->vec[1]) +
+ (bevp0->vec[1] - bevp1->vec[1]) * (bevp0->vec[0] - bevp2->vec[0]);
- if (inp > 0.0f) sd->dir= 1;
- else sd->dir= 0;
+ if (inp > 0.0f)
+ sd->dir = 1;
+ else
+ sd->dir = 0;
sd++;
}
- bl= bl->next;
+ bl = bl->next;
}
- qsort(sortdata,poly,sizeof(struct bevelsort), vergxcobev);
+ qsort(sortdata, poly, sizeof(struct bevelsort), vergxcobev);
- sd= sortdata+1;
- for (a=1; a<poly; a++, sd++) {
- bl= sd->bl; /* is bl a hole? */
- sd1= sortdata+ (a-1);
- for (b=a-1; b>=0; b--, sd1--) { /* all polys to the left */
+ sd = sortdata + 1;
+ for (a = 1; a < poly; a++, sd++) {
+ bl = sd->bl; /* is bl a hole? */
+ sd1 = sortdata + (a - 1);
+ for (b = a - 1; b >= 0; b--, sd1--) { /* all polys to the left */
if (bevelinside(sd1->bl, bl)) {
- bl->hole= 1- sd1->bl->hole;
+ bl->hole = 1 - sd1->bl->hole;
break;
}
}
}
/* turning direction */
- if ((cu->flag & CU_3D)==0) {
- sd= sortdata;
- for (a=0; a<poly; a++, sd++) {
- if (sd->bl->hole==sd->dir) {
- bl= sd->bl;
- bevp1= (BevPoint *)(bl+1);
- bevp2= bevp1+ (bl->nr-1);
- nr= bl->nr/2;
+ if ((cu->flag & CU_3D) == 0) {
+ sd = sortdata;
+ for (a = 0; a < poly; a++, sd++) {
+ if (sd->bl->hole == sd->dir) {
+ bl = sd->bl;
+ bevp1 = (BevPoint *)(bl + 1);
+ bevp2 = bevp1 + (bl->nr - 1);
+ nr = bl->nr / 2;
while (nr--) {
SWAP(BevPoint, *bevp1, *bevp2);
bevp1++;
@@ -2402,87 +2498,87 @@ void makeBevelList(Object *ob)
}
/* STEP 4: 2D-COSINES or 3D ORIENTATION */
- if ((cu->flag & CU_3D)==0) {
+ if ((cu->flag & CU_3D) == 0) {
/* note: bevp->dir and bevp->quat are not needed for beveling but are
* used when making a path from a 2D curve, therefor they need to be set - Campbell */
- bl= cu->bev.first;
+ bl = cu->bev.first;
while (bl) {
if (bl->nr < 2) {
/* do nothing */
}
- else if (bl->nr==2) { /* 2 pnt, treat separate */
- bevp2= (BevPoint *)(bl+1);
- bevp1= bevp2+1;
+ else if (bl->nr == 2) { /* 2 pnt, treat separate */
+ bevp2 = (BevPoint *)(bl + 1);
+ bevp1 = bevp2 + 1;
- x1= bevp1->vec[0]- bevp2->vec[0];
- y1= bevp1->vec[1]- bevp2->vec[1];
+ x1 = bevp1->vec[0] - bevp2->vec[0];
+ y1 = bevp1->vec[1] - bevp2->vec[1];
calc_bevel_sin_cos(x1, y1, -x1, -y1, &(bevp1->sina), &(bevp1->cosa));
- bevp2->sina= bevp1->sina;
- bevp2->cosa= bevp1->cosa;
+ bevp2->sina = bevp1->sina;
+ bevp2->cosa = bevp1->cosa;
/* fill in dir & quat */
make_bevel_list_segment_3D(bl);
}
else {
- bevp2= (BevPoint *)(bl+1);
- bevp1= bevp2+(bl->nr-1);
- bevp0= bevp1-1;
+ bevp2 = (BevPoint *)(bl + 1);
+ bevp1 = bevp2 + (bl->nr - 1);
+ bevp0 = bevp1 - 1;
- nr= bl->nr;
+ nr = bl->nr;
while (nr--) {
- x1= bevp1->vec[0]- bevp0->vec[0];
- x2= bevp1->vec[0]- bevp2->vec[0];
- y1= bevp1->vec[1]- bevp0->vec[1];
- y2= bevp1->vec[1]- bevp2->vec[1];
+ x1 = bevp1->vec[0] - bevp0->vec[0];
+ x2 = bevp1->vec[0] - bevp2->vec[0];
+ y1 = bevp1->vec[1] - bevp0->vec[1];
+ y2 = bevp1->vec[1] - bevp2->vec[1];
calc_bevel_sin_cos(x1, y1, x2, y2, &(bevp1->sina), &(bevp1->cosa));
/* from: make_bevel_list_3D_zup, could call but avoid a second loop.
* no need for tricky tilt calculation as with 3D curves */
bisect_v3_v3v3v3(bevp1->dir, bevp0->vec, bevp1->vec, bevp2->vec);
- vec_to_quat( bevp1->quat,bevp1->dir, 5, 1);
+ vec_to_quat(bevp1->quat, bevp1->dir, 5, 1);
/* done with inline make_bevel_list_3D_zup */
- bevp0= bevp1;
- bevp1= bevp2;
+ bevp0 = bevp1;
+ bevp1 = bevp2;
bevp2++;
}
/* correct non-cyclic cases */
- if (bl->poly== -1) {
- bevp= (BevPoint *)(bl+1);
- bevp1= bevp+1;
- bevp->sina= bevp1->sina;
- bevp->cosa= bevp1->cosa;
- bevp= (BevPoint *)(bl+1);
- bevp+= (bl->nr-1);
- bevp1= bevp-1;
- bevp->sina= bevp1->sina;
- bevp->cosa= bevp1->cosa;
+ if (bl->poly == -1) {
+ bevp = (BevPoint *)(bl + 1);
+ bevp1 = bevp + 1;
+ bevp->sina = bevp1->sina;
+ bevp->cosa = bevp1->cosa;
+ bevp = (BevPoint *)(bl + 1);
+ bevp += (bl->nr - 1);
+ bevp1 = bevp - 1;
+ bevp->sina = bevp1->sina;
+ bevp->cosa = bevp1->cosa;
/* correct for the dir/quat, see above why its needed */
bevel_list_cyclic_fix_3D(bl);
}
}
- bl= bl->next;
+ bl = bl->next;
}
}
else { /* 3D Curves */
- bl= cu->bev.first;
+ bl = cu->bev.first;
while (bl) {
if (bl->nr < 2) {
/* do nothing */
}
- else if (bl->nr==2) { /* 2 pnt, treat separate */
+ else if (bl->nr == 2) { /* 2 pnt, treat separate */
make_bevel_list_segment_3D(bl);
}
else {
- make_bevel_list_3D(bl, (int)(resolu*cu->twist_smooth), cu->twist_mode);
+ make_bevel_list_3D(bl, (int)(resolu * cu->twist_smooth), cu->twist_mode);
}
- bl= bl->next;
+ bl = bl->next;
}
}
}
@@ -2497,114 +2593,116 @@ void makeBevelList(Object *ob)
/* mode: is not zero when FCurve, is 2 when forced horizontal for autohandles */
static void calchandleNurb_intern(BezTriple *bezt, BezTriple *prev, BezTriple *next, int mode, int skip_align)
{
- float *p1,*p2,*p3, pt[3];
+ float *p1, *p2, *p3, pt[3];
float dvec_a[3], dvec_b[3];
float len, len_a, len_b;
- const float eps= 1e-5;
+ const float eps = 1e-5;
- if (bezt->h1==0 && bezt->h2==0) {
+ if (bezt->h1 == 0 && bezt->h2 == 0) {
return;
}
- p2= bezt->vec[1];
+ p2 = bezt->vec[1];
- if (prev==NULL) {
- p3= next->vec[1];
- pt[0]= 2.0f*p2[0] - p3[0];
- pt[1]= 2.0f*p2[1] - p3[1];
- pt[2]= 2.0f*p2[2] - p3[2];
- p1= pt;
+ if (prev == NULL) {
+ p3 = next->vec[1];
+ pt[0] = 2.0f * p2[0] - p3[0];
+ pt[1] = 2.0f * p2[1] - p3[1];
+ pt[2] = 2.0f * p2[2] - p3[2];
+ p1 = pt;
}
else {
- p1= prev->vec[1];
+ p1 = prev->vec[1];
}
- if (next==NULL) {
- pt[0]= 2.0f*p2[0] - p1[0];
- pt[1]= 2.0f*p2[1] - p1[1];
- pt[2]= 2.0f*p2[2] - p1[2];
- p3= pt;
+ if (next == NULL) {
+ pt[0] = 2.0f * p2[0] - p1[0];
+ pt[1] = 2.0f * p2[1] - p1[1];
+ pt[2] = 2.0f * p2[2] - p1[2];
+ p3 = pt;
}
else {
- p3= next->vec[1];
+ p3 = next->vec[1];
}
sub_v3_v3v3(dvec_a, p2, p1);
sub_v3_v3v3(dvec_b, p3, p2);
if (mode != 0) {
- len_a= dvec_a[0];
- len_b= dvec_b[0];
+ len_a = dvec_a[0];
+ len_b = dvec_b[0];
}
else {
- len_a= len_v3(dvec_a);
- len_b= len_v3(dvec_b);
+ len_a = len_v3(dvec_a);
+ len_b = len_v3(dvec_b);
}
- if (len_a==0.0f) len_a=1.0f;
- if (len_b==0.0f) len_b=1.0f;
+ if (len_a == 0.0f) len_a = 1.0f;
+ if (len_b == 0.0f) len_b = 1.0f;
- if (ELEM(bezt->h1,HD_AUTO,HD_AUTO_ANIM) || ELEM(bezt->h2,HD_AUTO,HD_AUTO_ANIM)) { /* auto */
+ if (ELEM(bezt->h1, HD_AUTO, HD_AUTO_ANIM) || ELEM(bezt->h2, HD_AUTO, HD_AUTO_ANIM)) { /* auto */
float tvec[3];
- tvec[0]= dvec_b[0]/len_b + dvec_a[0]/len_a;
- tvec[1]= dvec_b[1]/len_b + dvec_a[1]/len_a;
- tvec[2]= dvec_b[2]/len_b + dvec_a[2]/len_a;
- len= len_v3(tvec) * 2.5614f;
-
- if (len!=0.0f) {
- int leftviolate=0, rightviolate=0; /* for mode==2 */
-
- if (len_a>5.0f*len_b) len_a= 5.0f*len_b;
- if (len_b>5.0f*len_a) len_b= 5.0f*len_a;
-
- if (ELEM(bezt->h1,HD_AUTO,HD_AUTO_ANIM)) {
- len_a/=len;
- madd_v3_v3v3fl(p2-3, p2, tvec, -len_a);
-
- if ((bezt->h1==HD_AUTO_ANIM) && next && prev) { /* keep horizontal if extrema */
- float ydiff1= prev->vec[1][1] - bezt->vec[1][1];
- float ydiff2= next->vec[1][1] - bezt->vec[1][1];
- if ( (ydiff1 <= 0.0f && ydiff2 <= 0.0f) || (ydiff1 >= 0.0f && ydiff2 >= 0.0f) ) {
- bezt->vec[0][1]= bezt->vec[1][1];
+ tvec[0] = dvec_b[0] / len_b + dvec_a[0] / len_a;
+ tvec[1] = dvec_b[1] / len_b + dvec_a[1] / len_a;
+ tvec[2] = dvec_b[2] / len_b + dvec_a[2] / len_a;
+ len = len_v3(tvec) * 2.5614f;
+
+ if (len != 0.0f) {
+ int leftviolate = 0, rightviolate = 0; /* for mode==2 */
+
+ if (len_a > 5.0f * len_b)
+ len_a = 5.0f * len_b;
+ if (len_b > 5.0f * len_a)
+ len_b = 5.0f * len_a;
+
+ if (ELEM(bezt->h1, HD_AUTO, HD_AUTO_ANIM)) {
+ len_a /= len;
+ madd_v3_v3v3fl(p2 - 3, p2, tvec, -len_a);
+
+ if ((bezt->h1 == HD_AUTO_ANIM) && next && prev) { /* keep horizontal if extrema */
+ float ydiff1 = prev->vec[1][1] - bezt->vec[1][1];
+ float ydiff2 = next->vec[1][1] - bezt->vec[1][1];
+ if ((ydiff1 <= 0.0f && ydiff2 <= 0.0f) || (ydiff1 >= 0.0f && ydiff2 >= 0.0f)) {
+ bezt->vec[0][1] = bezt->vec[1][1];
}
else { /* handles should not be beyond y coord of two others */
if (ydiff1 <= 0.0f) {
if (prev->vec[1][1] > bezt->vec[0][1]) {
- bezt->vec[0][1]= prev->vec[1][1];
- leftviolate= 1;
+ bezt->vec[0][1] = prev->vec[1][1];
+ leftviolate = 1;
}
}
else {
if (prev->vec[1][1] < bezt->vec[0][1]) {
- bezt->vec[0][1]= prev->vec[1][1];
- leftviolate= 1;
+ bezt->vec[0][1] = prev->vec[1][1];
+ leftviolate = 1;
}
}
}
}
}
- if (ELEM(bezt->h2,HD_AUTO,HD_AUTO_ANIM)) {
- len_b/=len;
- madd_v3_v3v3fl(p2+3, p2, tvec, len_b);
-
- if ((bezt->h2==HD_AUTO_ANIM) && next && prev) { /* keep horizontal if extrema */
- float ydiff1= prev->vec[1][1] - bezt->vec[1][1];
- float ydiff2= next->vec[1][1] - bezt->vec[1][1];
+ if (ELEM(bezt->h2, HD_AUTO, HD_AUTO_ANIM)) {
+ len_b /= len;
+ madd_v3_v3v3fl(p2 + 3, p2, tvec, len_b);
+
+ if ((bezt->h2 == HD_AUTO_ANIM) && next && prev) { /* keep horizontal if extrema */
+ float ydiff1 = prev->vec[1][1] - bezt->vec[1][1];
+ float ydiff2 = next->vec[1][1] - bezt->vec[1][1];
if ( (ydiff1 <= 0.0f && ydiff2 <= 0.0f) || (ydiff1 >= 0.0f && ydiff2 >= 0.0f) ) {
- bezt->vec[2][1]= bezt->vec[1][1];
+ bezt->vec[2][1] = bezt->vec[1][1];
}
else { /* andles should not be beyond y coord of two others */
if (ydiff1 <= 0.0f) {
if (next->vec[1][1] < bezt->vec[2][1]) {
- bezt->vec[2][1]= next->vec[1][1];
- rightviolate= 1;
+ bezt->vec[2][1] = next->vec[1][1];
+ rightviolate = 1;
}
}
else {
if (next->vec[1][1] > bezt->vec[2][1]) {
- bezt->vec[2][1]= next->vec[1][1];
- rightviolate= 1;
+ bezt->vec[2][1] = next->vec[1][1];
+ rightviolate = 1;
}
}
}
@@ -2613,33 +2711,32 @@ static void calchandleNurb_intern(BezTriple *bezt, BezTriple *prev, BezTriple *n
if (leftviolate || rightviolate) { /* align left handle */
float h1[3], h2[3];
float dot;
-
- sub_v3_v3v3(h1, p2-3, p2);
- sub_v3_v3v3(h2, p2, p2+3);
- len_a= normalize_v3(h1);
- len_b= normalize_v3(h2);
+ sub_v3_v3v3(h1, p2 - 3, p2);
+ sub_v3_v3v3(h2, p2, p2 + 3);
+
+ len_a = normalize_v3(h1);
+ len_b = normalize_v3(h2);
- dot= dot_v3v3(h1, h2);
+ dot = dot_v3v3(h1, h2);
if (leftviolate) {
mul_v3_fl(h1, dot * len_b);
- sub_v3_v3v3(p2+3, p2, h1);
+ sub_v3_v3v3(p2 + 3, p2, h1);
}
else {
mul_v3_fl(h2, dot * len_a);
- add_v3_v3v3(p2-3, p2, h2);
+ add_v3_v3v3(p2 - 3, p2, h2);
}
}
-
}
}
- if (bezt->h1==HD_VECT) { /* vector */
- madd_v3_v3v3fl(p2-3, p2, dvec_a, -1.0f/3.0f);
+ if (bezt->h1 == HD_VECT) { /* vector */
+ madd_v3_v3v3fl(p2 - 3, p2, dvec_a, -1.0f / 3.0f);
}
- if (bezt->h2==HD_VECT) {
- madd_v3_v3v3fl(p2+3, p2, dvec_b, 1.0f/3.0f);
+ if (bezt->h2 == HD_VECT) {
+ madd_v3_v3v3fl(p2 + 3, p2, dvec_b, 1.0f / 3.0f);
}
if (skip_align) {
@@ -2649,44 +2746,46 @@ static void calchandleNurb_intern(BezTriple *bezt, BezTriple *prev, BezTriple *n
return;
}
- len_b= len_v3v3(p2, p2+3);
- len_a= len_v3v3(p2, p2-3);
- if (len_a==0.0f) len_a= 1.0f;
- if (len_b==0.0f) len_b= 1.0f;
+ len_b = len_v3v3(p2, p2 + 3);
+ len_a = len_v3v3(p2, p2 - 3);
+ if (len_a == 0.0f)
+ len_a = 1.0f;
+ if (len_b == 0.0f)
+ len_b = 1.0f;
if (bezt->f1 & SELECT) { /* order of calculation */
- if (bezt->h2==HD_ALIGN) { /* aligned */
- if (len_a>eps) {
- len= len_b/len_a;
- p2[3]= p2[0]+len*(p2[0] - p2[-3]);
- p2[4]= p2[1]+len*(p2[1] - p2[-2]);
- p2[5]= p2[2]+len*(p2[2] - p2[-1]);
+ if (bezt->h2 == HD_ALIGN) { /* aligned */
+ if (len_a > eps) {
+ len = len_b / len_a;
+ p2[3] = p2[0] + len * (p2[0] - p2[-3]);
+ p2[4] = p2[1] + len * (p2[1] - p2[-2]);
+ p2[5] = p2[2] + len * (p2[2] - p2[-1]);
}
}
- if (bezt->h1==HD_ALIGN) {
- if (len_b>eps) {
- len= len_a/len_b;
- p2[-3]= p2[0]+len*(p2[0] - p2[3]);
- p2[-2]= p2[1]+len*(p2[1] - p2[4]);
- p2[-1]= p2[2]+len*(p2[2] - p2[5]);
+ if (bezt->h1 == HD_ALIGN) {
+ if (len_b > eps) {
+ len = len_a / len_b;
+ p2[-3] = p2[0] + len * (p2[0] - p2[3]);
+ p2[-2] = p2[1] + len * (p2[1] - p2[4]);
+ p2[-1] = p2[2] + len * (p2[2] - p2[5]);
}
}
}
else {
- if (bezt->h1==HD_ALIGN) {
- if (len_b>eps) {
- len= len_a/len_b;
- p2[-3]= p2[0]+len*(p2[0] - p2[3]);
- p2[-2]= p2[1]+len*(p2[1] - p2[4]);
- p2[-1]= p2[2]+len*(p2[2] - p2[5]);
+ if (bezt->h1 == HD_ALIGN) {
+ if (len_b > eps) {
+ len = len_a / len_b;
+ p2[-3] = p2[0] + len * (p2[0] - p2[3]);
+ p2[-2] = p2[1] + len * (p2[1] - p2[4]);
+ p2[-1] = p2[2] + len * (p2[2] - p2[5]);
}
}
- if (bezt->h2==HD_ALIGN) { /* aligned */
- if (len_a>eps) {
- len= len_b/len_a;
- p2[3]= p2[0]+len*(p2[0] - p2[-3]);
- p2[4]= p2[1]+len*(p2[1] - p2[-2]);
- p2[5]= p2[2]+len*(p2[2] - p2[-1]);
+ if (bezt->h2 == HD_ALIGN) { /* aligned */
+ if (len_a > eps) {
+ len = len_b / len_a;
+ p2[3] = p2[0] + len * (p2[0] - p2[-3]);
+ p2[4] = p2[1] + len * (p2[1] - p2[-2]);
+ p2[5] = p2[2] + len * (p2[2] - p2[-1]);
}
}
}
@@ -2697,40 +2796,45 @@ static void calchandlesNurb_intern(Nurb *nu, int skip_align)
BezTriple *bezt, *prev, *next;
short a;
- if (nu->type != CU_BEZIER) return;
- if (nu->pntsu<2) return;
-
- a= nu->pntsu;
- bezt= nu->bezt;
- if (nu->flagu & CU_NURB_CYCLIC) prev= bezt+(a-1);
- else prev= NULL;
- next= bezt+1;
+ if (nu->type != CU_BEZIER)
+ return;
+ if (nu->pntsu < 2)
+ return;
+
+ a = nu->pntsu;
+ bezt = nu->bezt;
+ if (nu->flagu & CU_NURB_CYCLIC) prev = bezt + (a - 1);
+ else prev = NULL;
+ next = bezt + 1;
while (a--) {
calchandleNurb_intern(bezt, prev, next, 0, skip_align);
- prev= bezt;
- if (a==1) {
- if (nu->flagu & CU_NURB_CYCLIC) next= nu->bezt;
- else next= NULL;
+ prev = bezt;
+ if (a == 1) {
+ if (nu->flagu & CU_NURB_CYCLIC)
+ next = nu->bezt;
+ else
+ next = NULL;
}
- else next++;
+ else
+ next++;
bezt++;
}
}
-void calchandleNurb(BezTriple *bezt, BezTriple *prev, BezTriple *next, int mode)
+void BKE_nurb_handle_calc(BezTriple *bezt, BezTriple *prev, BezTriple *next, int mode)
{
calchandleNurb_intern(bezt, prev, next, mode, FALSE);
}
-void calchandlesNurb(Nurb *nu) /* first, if needed, set handle flags */
+void BKE_nurb_handles_calc(Nurb *nu) /* first, if needed, set handle flags */
{
calchandlesNurb_intern(nu, FALSE);
}
-void testhandlesNurb(Nurb *nu)
+void BKE_nurb_handles_test(Nurb *nu)
{
/* use when something has changed with handles.
* it treats all BezTriples with the following rules:
@@ -2744,118 +2848,123 @@ void testhandlesNurb(Nurb *nu)
if (nu->type != CU_BEZIER) return;
- bezt= nu->bezt;
- a= nu->pntsu;
+ bezt = nu->bezt;
+ a = nu->pntsu;
while (a--) {
- flag= 0;
- if (bezt->f1 & SELECT) flag++;
- if (bezt->f2 & SELECT) flag += 2;
- if (bezt->f3 & SELECT) flag += 4;
-
- if ( !(flag==0 || flag==7) ) {
+ flag = 0;
+ if (bezt->f1 & SELECT)
+ flag++;
+ if (bezt->f2 & SELECT)
+ flag += 2;
+ if (bezt->f3 & SELECT)
+ flag += 4;
+
+ if (!(flag == 0 || flag == 7) ) {
if (ELEM(bezt->h1, HD_AUTO, HD_AUTO_ANIM)) { /* auto */
- bezt->h1= HD_ALIGN;
+ bezt->h1 = HD_ALIGN;
}
if (ELEM(bezt->h2, HD_AUTO, HD_AUTO_ANIM)) { /* auto */
- bezt->h2= HD_ALIGN;
+ bezt->h2 = HD_ALIGN;
}
-
- if (bezt->h1==HD_VECT) { /* vector */
- if (flag < 4) bezt->h1= 0;
+
+ if (bezt->h1 == HD_VECT) { /* vector */
+ if (flag < 4) bezt->h1 = 0;
}
- if (bezt->h2==HD_VECT) { /* vector */
- if ( flag > 3) bezt->h2= 0;
+ if (bezt->h2 == HD_VECT) { /* vector */
+ if (flag > 3) bezt->h2 = 0;
}
}
bezt++;
}
-
- calchandlesNurb(nu);
+
+ BKE_nurb_handles_calc(nu);
}
-void autocalchandlesNurb(Nurb *nu, int flag)
+void BKE_nurb_handles_autocalc(Nurb *nu, int flag)
{
/* checks handle coordinates and calculates type */
-
+
BezTriple *bezt2, *bezt1, *bezt0;
int i, align, leftsmall, rightsmall;
- if (nu==NULL || nu->bezt==NULL) return;
-
+ if (nu == NULL || nu->bezt == NULL)
+ return;
+
bezt2 = nu->bezt;
- bezt1 = bezt2 + (nu->pntsu-1);
+ bezt1 = bezt2 + (nu->pntsu - 1);
bezt0 = bezt1 - 1;
i = nu->pntsu;
while (i--) {
-
- align= leftsmall= rightsmall= 0;
-
+ align = leftsmall = rightsmall = 0;
+
/* left handle: */
- if (flag==0 || (bezt1->f1 & flag) ) {
- bezt1->h1= 0;
+ if (flag == 0 || (bezt1->f1 & flag) ) {
+ bezt1->h1 = 0;
/* distance too short: vectorhandle */
- if ( len_v3v3( bezt1->vec[1], bezt0->vec[1] ) < 0.0001f) {
- bezt1->h1= HD_VECT;
- leftsmall= 1;
+ if (len_v3v3(bezt1->vec[1], bezt0->vec[1]) < 0.0001f) {
+ bezt1->h1 = HD_VECT;
+ leftsmall = 1;
}
else {
/* aligned handle? */
if (dist_to_line_v2(bezt1->vec[1], bezt1->vec[0], bezt1->vec[2]) < 0.0001f) {
- align= 1;
- bezt1->h1= HD_ALIGN;
+ align = 1;
+ bezt1->h1 = HD_ALIGN;
}
/* or vector handle? */
if (dist_to_line_v2(bezt1->vec[0], bezt1->vec[1], bezt0->vec[1]) < 0.0001f)
- bezt1->h1= HD_VECT;
-
+ bezt1->h1 = HD_VECT;
}
}
/* right handle: */
- if (flag==0 || (bezt1->f3 & flag) ) {
- bezt1->h2= 0;
+ if (flag == 0 || (bezt1->f3 & flag) ) {
+ bezt1->h2 = 0;
/* distance too short: vectorhandle */
- if ( len_v3v3( bezt1->vec[1], bezt2->vec[1] ) < 0.0001f) {
- bezt1->h2= HD_VECT;
- rightsmall= 1;
+ if (len_v3v3(bezt1->vec[1], bezt2->vec[1]) < 0.0001f) {
+ bezt1->h2 = HD_VECT;
+ rightsmall = 1;
}
else {
/* aligned handle? */
- if (align) bezt1->h2= HD_ALIGN;
+ if (align) bezt1->h2 = HD_ALIGN;
/* or vector handle? */
if (dist_to_line_v2(bezt1->vec[2], bezt1->vec[1], bezt2->vec[1]) < 0.0001f)
- bezt1->h2= HD_VECT;
-
+ bezt1->h2 = HD_VECT;
}
}
- if (leftsmall && bezt1->h2==HD_ALIGN) bezt1->h2= 0;
- if (rightsmall && bezt1->h1==HD_ALIGN) bezt1->h1= 0;
-
+ if (leftsmall && bezt1->h2 == HD_ALIGN)
+ bezt1->h2 = 0;
+ if (rightsmall && bezt1->h1 == HD_ALIGN)
+ bezt1->h1 = 0;
+
/* undesired combination: */
- if (bezt1->h1==HD_ALIGN && bezt1->h2==HD_VECT) bezt1->h1= 0;
- if (bezt1->h2==HD_ALIGN && bezt1->h1==HD_VECT) bezt1->h2= 0;
-
- bezt0= bezt1;
- bezt1= bezt2;
+ if (bezt1->h1 == HD_ALIGN && bezt1->h2 == HD_VECT)
+ bezt1->h1 = 0;
+ if (bezt1->h2 == HD_ALIGN && bezt1->h1 == HD_VECT)
+ bezt1->h2 = 0;
+
+ bezt0 = bezt1;
+ bezt1 = bezt2;
bezt2++;
}
- calchandlesNurb(nu);
+ BKE_nurb_handles_calc(nu);
}
-void autocalchandlesNurb_all(ListBase *editnurb, int flag)
+void BKE_nurbList_handles_autocalc(ListBase *editnurb, int flag)
{
Nurb *nu;
-
- nu= editnurb->first;
+
+ nu = editnurb->first;
while (nu) {
- autocalchandlesNurb(nu, flag);
- nu= nu->next;
+ BKE_nurb_handles_autocalc(nu, flag);
+ nu = nu->next;
}
}
-void sethandlesNurb(ListBase *editnurb, short code)
+void BKE_nurbList_handles_set(ListBase *editnurb, short code)
{
/* code==1: set autohandle */
/* code==2: set vectorhandle */
@@ -2865,34 +2974,37 @@ void sethandlesNurb(ListBase *editnurb, short code)
/* code==6: Clear align, like 3 but no toggle */
Nurb *nu;
BezTriple *bezt;
- short a, ok=0;
+ short a, ok = 0;
- if (code==1 || code==2) {
- nu= editnurb->first;
+ if (code == 1 || code == 2) {
+ nu = editnurb->first;
while (nu) {
if (nu->type == CU_BEZIER) {
- bezt= nu->bezt;
- a= nu->pntsu;
+ bezt = nu->bezt;
+ a = nu->pntsu;
while (a--) {
if ((bezt->f1 & SELECT) || (bezt->f3 & SELECT)) {
- if (bezt->f1 & SELECT) bezt->h1= code;
- if (bezt->f3 & SELECT) bezt->h2= code;
- if (bezt->h1!=bezt->h2) {
- if (ELEM(bezt->h1, HD_ALIGN, HD_AUTO)) bezt->h1 = HD_FREE;
- if (ELEM(bezt->h2, HD_ALIGN, HD_AUTO)) bezt->h2 = HD_FREE;
+ if (bezt->f1 & SELECT)
+ bezt->h1 = code;
+ if (bezt->f3 & SELECT)
+ bezt->h2 = code;
+ if (bezt->h1 != bezt->h2) {
+ if (ELEM(bezt->h1, HD_ALIGN, HD_AUTO))
+ bezt->h1 = HD_FREE;
+ if (ELEM(bezt->h2, HD_ALIGN, HD_AUTO))
+ bezt->h2 = HD_FREE;
}
}
bezt++;
}
- calchandlesNurb(nu);
+ BKE_nurb_handles_calc(nu);
}
- nu= nu->next;
+ nu = nu->next;
}
}
else {
/* there is 1 handle not FREE: FREE it all, else make ALIGNED */
-
- nu= editnurb->first;
+ nu = editnurb->first;
if (code == 5) {
ok = HD_ALIGN;
}
@@ -2903,34 +3015,34 @@ void sethandlesNurb(ListBase *editnurb, short code)
/* Toggle */
while (nu) {
if (nu->type == CU_BEZIER) {
- bezt= nu->bezt;
- a= nu->pntsu;
+ bezt = nu->bezt;
+ a = nu->pntsu;
while (a--) {
- if ((bezt->f1 & SELECT) && bezt->h1) ok= 1;
- if ((bezt->f3 & SELECT) && bezt->h2) ok= 1;
+ if ((bezt->f1 & SELECT) && bezt->h1) ok = 1;
+ if ((bezt->f3 & SELECT) && bezt->h2) ok = 1;
if (ok) break;
bezt++;
}
}
- nu= nu->next;
+ nu = nu->next;
}
- if (ok) ok= HD_FREE;
- else ok= HD_ALIGN;
+ if (ok) ok = HD_FREE;
+ else ok = HD_ALIGN;
}
- nu= editnurb->first;
+ nu = editnurb->first;
while (nu) {
if (nu->type == CU_BEZIER) {
- bezt= nu->bezt;
- a= nu->pntsu;
+ bezt = nu->bezt;
+ a = nu->pntsu;
while (a--) {
- if (bezt->f1 & SELECT) bezt->h1= ok;
- if (bezt->f3 & SELECT) bezt->h2= ok;
-
+ if (bezt->f1 & SELECT) bezt->h1 = ok;
+ if (bezt->f3 & SELECT) bezt->h2 = ok;
+
bezt++;
}
- calchandlesNurb(nu);
+ BKE_nurb_handles_calc(nu);
}
- nu= nu->next;
+ nu = nu->next;
}
}
}
@@ -2938,9 +3050,9 @@ void sethandlesNurb(ListBase *editnurb, short code)
static void swapdata(void *adr1, void *adr2, int len)
{
- if (len<=0) return;
+ if (len <= 0) return;
- if (len<65) {
+ if (len < 65) {
char adr[64];
memcpy(adr, adr1, len);
@@ -2950,7 +3062,7 @@ static void swapdata(void *adr1, void *adr2, int len)
else {
char *adr;
- adr= (char *)MEM_mallocN(len, "curve swap");
+ adr = (char *)MEM_mallocN(len, "curve swap");
memcpy(adr, adr1, len);
memcpy(adr1, adr2, len);
memcpy(adr2, adr, len);
@@ -2958,85 +3070,87 @@ static void swapdata(void *adr1, void *adr2, int len)
}
}
-void switchdirectionNurb(Nurb *nu)
+void BKE_nurb_direction_switch(Nurb *nu)
{
BezTriple *bezt1, *bezt2;
BPoint *bp1, *bp2;
float *fp1, *fp2, *tempf;
int a, b;
- if (nu->pntsu==1 && nu->pntsv==1) return;
+ if (nu->pntsu == 1 && nu->pntsv == 1) return;
if (nu->type == CU_BEZIER) {
- a= nu->pntsu;
- bezt1= nu->bezt;
- bezt2= bezt1+(a-1);
- if (a & 1) a+= 1; /* if odd, also swap middle content */
- a/= 2;
- while (a>0) {
- if (bezt1!=bezt2) SWAP(BezTriple, *bezt1, *bezt2);
+ a = nu->pntsu;
+ bezt1 = nu->bezt;
+ bezt2 = bezt1 + (a - 1);
+ if (a & 1) a += 1; /* if odd, also swap middle content */
+ a /= 2;
+ while (a > 0) {
+ if (bezt1 != bezt2)
+ SWAP(BezTriple, *bezt1, *bezt2);
swapdata(bezt1->vec[0], bezt1->vec[2], 12);
- if (bezt1!=bezt2) swapdata(bezt2->vec[0], bezt2->vec[2], 12);
+ if (bezt1 != bezt2)
+ swapdata(bezt2->vec[0], bezt2->vec[2], 12);
SWAP(char, bezt1->h1, bezt1->h2);
SWAP(short, bezt1->f1, bezt1->f3);
-
- if (bezt1!=bezt2) {
+
+ if (bezt1 != bezt2) {
SWAP(char, bezt2->h1, bezt2->h2);
SWAP(short, bezt2->f1, bezt2->f3);
- bezt1->alfa= -bezt1->alfa;
- bezt2->alfa= -bezt2->alfa;
+ bezt1->alfa = -bezt1->alfa;
+ bezt2->alfa = -bezt2->alfa;
}
a--;
- bezt1++;
+ bezt1++;
bezt2--;
}
}
- else if (nu->pntsv==1) {
- a= nu->pntsu;
- bp1= nu->bp;
- bp2= bp1+(a-1);
- a/= 2;
- while (bp1!=bp2 && a>0) {
+ else if (nu->pntsv == 1) {
+ a = nu->pntsu;
+ bp1 = nu->bp;
+ bp2 = bp1 + (a - 1);
+ a /= 2;
+ while (bp1 != bp2 && a > 0) {
SWAP(BPoint, *bp1, *bp2);
a--;
- bp1->alfa= -bp1->alfa;
- bp2->alfa= -bp2->alfa;
- bp1++;
+ bp1->alfa = -bp1->alfa;
+ bp2->alfa = -bp2->alfa;
+ bp1++;
bp2--;
}
if (nu->type == CU_NURBS) {
/* no knots for too short paths */
if (nu->knotsu) {
/* inverse knots */
- a= KNOTSU(nu);
- fp1= nu->knotsu;
- fp2= fp1+(a-1);
- a/= 2;
- while (fp1!=fp2 && a>0) {
+ a = KNOTSU(nu);
+ fp1 = nu->knotsu;
+ fp2 = fp1 + (a - 1);
+ a /= 2;
+ while (fp1 != fp2 && a > 0) {
SWAP(float, *fp1, *fp2);
a--;
- fp1++;
+ fp1++;
fp2--;
}
/* and make in increasing order again */
- a= KNOTSU(nu);
- fp1= nu->knotsu;
- fp2=tempf= MEM_mallocN(sizeof(float)*a, "switchdirect");
+ a = KNOTSU(nu);
+ fp1 = nu->knotsu;
+ fp2 = tempf = MEM_mallocN(sizeof(float) * a, "switchdirect");
while (a--) {
- fp2[0]= fabs(fp1[1]-fp1[0]);
+ fp2[0] = fabs(fp1[1] - fp1[0]);
fp1++;
fp2++;
}
-
- a= KNOTSU(nu)-1;
- fp1= nu->knotsu;
- fp2= tempf;
- fp1[0]= 0.0;
+
+ a = KNOTSU(nu) - 1;
+ fp1 = nu->knotsu;
+ fp2 = tempf;
+ fp1[0] = 0.0;
fp1++;
while (a--) {
- fp1[0]= fp1[-1]+fp2[0];
+ fp1[0] = fp1[-1] + fp2[0];
fp1++;
fp2++;
}
@@ -3045,18 +3159,16 @@ void switchdirectionNurb(Nurb *nu)
}
}
else {
-
- for (b=0; b<nu->pntsv; b++) {
-
- bp1= nu->bp+b*nu->pntsu;
- a= nu->pntsu;
- bp2= bp1+(a-1);
- a/= 2;
-
- while (bp1!=bp2 && a>0) {
+ for (b = 0; b < nu->pntsv; b++) {
+ bp1 = nu->bp + b * nu->pntsu;
+ a = nu->pntsu;
+ bp2 = bp1 + (a - 1);
+ a /= 2;
+
+ while (bp1 != bp2 && a > 0) {
SWAP(BPoint, *bp1, *bp2);
a--;
- bp1++;
+ bp1++;
bp2--;
}
}
@@ -3064,28 +3176,28 @@ void switchdirectionNurb(Nurb *nu)
}
-float (*curve_getVertexCos(Curve *UNUSED(cu), ListBase *lb, int *numVerts_r))[3]
+float (*BKE_curve_vertexCos_get(Curve * UNUSED(cu), ListBase * lb, int *numVerts_r))[3]
{
- int i, numVerts = *numVerts_r = count_curveverts(lb);
- float *co, (*cos)[3] = MEM_mallocN(sizeof(*cos)*numVerts, "cu_vcos");
+ int i, numVerts = *numVerts_r = BKE_nurbList_verts_count(lb);
+ float *co, (*cos)[3] = MEM_mallocN(sizeof(*cos) * numVerts, "cu_vcos");
Nurb *nu;
co = cos[0];
- for (nu=lb->first; nu; nu=nu->next) {
+ for (nu = lb->first; nu; nu = nu->next) {
if (nu->type == CU_BEZIER) {
BezTriple *bezt = nu->bezt;
- for (i=0; i<nu->pntsu; i++,bezt++) {
- copy_v3_v3(co, bezt->vec[0]); co+=3;
- copy_v3_v3(co, bezt->vec[1]); co+=3;
- copy_v3_v3(co, bezt->vec[2]); co+=3;
+ for (i = 0; i < nu->pntsu; i++, bezt++) {
+ copy_v3_v3(co, bezt->vec[0]); co += 3;
+ copy_v3_v3(co, bezt->vec[1]); co += 3;
+ copy_v3_v3(co, bezt->vec[2]); co += 3;
}
}
else {
BPoint *bp = nu->bp;
- for (i=0; i<nu->pntsu*nu->pntsv; i++,bp++) {
- copy_v3_v3(co, bp->vec); co+=3;
+ for (i = 0; i < nu->pntsu * nu->pntsv; i++, bp++) {
+ copy_v3_v3(co, bp->vec); co += 3;
}
}
}
@@ -3093,27 +3205,27 @@ float (*curve_getVertexCos(Curve *UNUSED(cu), ListBase *lb, int *numVerts_r))[3]
return cos;
}
-void curve_applyVertexCos(Curve *UNUSED(cu), ListBase *lb, float (*vertexCos)[3])
+void BK_curve_vertexCos_apply(Curve *UNUSED(cu), ListBase *lb, float (*vertexCos)[3])
{
float *co = vertexCos[0];
Nurb *nu;
int i;
- for (nu=lb->first; nu; nu=nu->next) {
+ for (nu = lb->first; nu; nu = nu->next) {
if (nu->type == CU_BEZIER) {
BezTriple *bezt = nu->bezt;
- for (i=0; i<nu->pntsu; i++,bezt++) {
- copy_v3_v3(bezt->vec[0], co); co+=3;
- copy_v3_v3(bezt->vec[1], co); co+=3;
- copy_v3_v3(bezt->vec[2], co); co+=3;
+ for (i = 0; i < nu->pntsu; i++, bezt++) {
+ copy_v3_v3(bezt->vec[0], co); co += 3;
+ copy_v3_v3(bezt->vec[1], co); co += 3;
+ copy_v3_v3(bezt->vec[2], co); co += 3;
}
}
else {
BPoint *bp = nu->bp;
- for (i=0; i<nu->pntsu*nu->pntsv; i++,bp++) {
- copy_v3_v3(bp->vec, co); co+=3;
+ for (i = 0; i < nu->pntsu * nu->pntsv; i++, bp++) {
+ copy_v3_v3(bp->vec, co); co += 3;
}
}
@@ -3121,29 +3233,29 @@ void curve_applyVertexCos(Curve *UNUSED(cu), ListBase *lb, float (*vertexCos)[3]
}
}
-float (*curve_getKeyVertexCos(Curve *UNUSED(cu), ListBase *lb, float *key))[3]
+float (*BKE_curve_keyVertexCos_get(Curve * UNUSED(cu), ListBase * lb, float *key))[3]
{
- int i, numVerts = count_curveverts(lb);
- float *co, (*cos)[3] = MEM_mallocN(sizeof(*cos)*numVerts, "cu_vcos");
+ int i, numVerts = BKE_nurbList_verts_count(lb);
+ float *co, (*cos)[3] = MEM_mallocN(sizeof(*cos) * numVerts, "cu_vcos");
Nurb *nu;
co = cos[0];
- for (nu=lb->first; nu; nu=nu->next) {
+ for (nu = lb->first; nu; nu = nu->next) {
if (nu->type == CU_BEZIER) {
BezTriple *bezt = nu->bezt;
- for (i=0; i<nu->pntsu; i++,bezt++) {
- copy_v3_v3(co, key); co+=3; key+=3;
- copy_v3_v3(co, key); co+=3; key+=3;
- copy_v3_v3(co, key); co+=3; key+=3;
- key+=3; /* skip tilt */
+ for (i = 0; i < nu->pntsu; i++, bezt++) {
+ copy_v3_v3(co, key); co += 3; key += 3;
+ copy_v3_v3(co, key); co += 3; key += 3;
+ copy_v3_v3(co, key); co += 3; key += 3;
+ key += 3; /* skip tilt */
}
}
else {
BPoint *bp = nu->bp;
- for (i=0; i<nu->pntsu*nu->pntsv; i++,bp++) {
- copy_v3_v3(co, key); co+=3; key+=3;
+ for (i = 0; i < nu->pntsu * nu->pntsv; i++, bp++) {
+ copy_v3_v3(co, key); co += 3; key += 3;
key++; /* skip tilt */
}
}
@@ -3152,97 +3264,112 @@ float (*curve_getKeyVertexCos(Curve *UNUSED(cu), ListBase *lb, float *key))[3]
return cos;
}
-void curve_applyKeyVertexTilts(Curve *UNUSED(cu), ListBase *lb, float *key)
+void BKE_curve_keyVertexTilts_apply(Curve *UNUSED(cu), ListBase *lb, float *key)
{
Nurb *nu;
int i;
- for (nu=lb->first; nu; nu=nu->next) {
+ for (nu = lb->first; nu; nu = nu->next) {
if (nu->type == CU_BEZIER) {
BezTriple *bezt = nu->bezt;
- for (i=0; i<nu->pntsu; i++,bezt++) {
- key+=3*3;
- bezt->alfa= *key;
- key+=3;
+ for (i = 0; i < nu->pntsu; i++, bezt++) {
+ key += 3 * 3;
+ bezt->alfa = *key;
+ key += 3;
}
}
else {
BPoint *bp = nu->bp;
- for (i=0; i<nu->pntsu*nu->pntsv; i++,bp++) {
- key+=3;
- bp->alfa= *key;
+ for (i = 0; i < nu->pntsu * nu->pntsv; i++, bp++) {
+ key += 3;
+ bp->alfa = *key;
key++;
}
}
}
}
-int check_valid_nurb_u( struct Nurb *nu )
+int BKE_nurb_check_valid_u(struct Nurb *nu)
{
- if (nu==NULL) return 0;
- if (nu->pntsu <= 1) return 0;
- if (nu->type != CU_NURBS) return 1; /* not a nurb, lets assume its valid */
-
- if (nu->pntsu < nu->orderu) return 0;
- if (((nu->flag & CU_NURB_CYCLIC)==0) && (nu->flagu & CU_NURB_BEZIER)) { /* Bezier U Endpoints */
- if (nu->orderu==4) {
- if (nu->pntsu < 5) return 0; /* bezier with 4 orderu needs 5 points */
+ if (nu == NULL)
+ return 0;
+ if (nu->pntsu <= 1)
+ return 0;
+ if (nu->type != CU_NURBS)
+ return 1; /* not a nurb, lets assume its valid */
+
+ if (nu->pntsu < nu->orderu) return 0;
+ if (((nu->flag & CU_NURB_CYCLIC) == 0) && (nu->flagu & CU_NURB_BEZIER)) { /* Bezier U Endpoints */
+ if (nu->orderu == 4) {
+ if (nu->pntsu < 5)
+ return 0; /* bezier with 4 orderu needs 5 points */
+ }
+ else {
+ if (nu->orderu != 3)
+ return 0; /* order must be 3 or 4 */
}
- else if (nu->orderu != 3) return 0; /* order must be 3 or 4 */
}
return 1;
}
-int check_valid_nurb_v( struct Nurb *nu)
+int BKE_nurb_check_valid_v(struct Nurb *nu)
{
- if (nu==NULL) return 0;
- if (nu->pntsv <= 1) return 0;
- if (nu->type != CU_NURBS) return 1; /* not a nurb, lets assume its valid */
-
- if (nu->pntsv < nu->orderv) return 0;
- if (((nu->flag & CU_NURB_CYCLIC)==0) && (nu->flagv & CU_NURB_BEZIER)) { /* Bezier V Endpoints */
- if (nu->orderv==4) {
- if (nu->pntsv < 5) return 0; /* bezier with 4 orderu needs 5 points */
+ if (nu == NULL)
+ return 0;
+ if (nu->pntsv <= 1)
+ return 0;
+ if (nu->type != CU_NURBS)
+ return 1; /* not a nurb, lets assume its valid */
+
+ if (nu->pntsv < nu->orderv)
+ return 0;
+ if (((nu->flag & CU_NURB_CYCLIC) == 0) && (nu->flagv & CU_NURB_BEZIER)) { /* Bezier V Endpoints */
+ if (nu->orderv == 4) {
+ if (nu->pntsv < 5)
+ return 0; /* bezier with 4 orderu needs 5 points */
+ }
+ else {
+ if (nu->orderv != 3)
+ return 0; /* order must be 3 or 4 */
}
- else if (nu->orderv != 3) return 0; /* order must be 3 or 4 */
}
return 1;
}
-int clamp_nurb_order_u( struct Nurb *nu )
+int BKE_nurb_order_clamp_u(struct Nurb *nu)
{
int change = 0;
- if (nu->pntsu<nu->orderu) {
- nu->orderu= nu->pntsu;
- change= 1;
+ if (nu->pntsu < nu->orderu) {
+ nu->orderu = nu->pntsu;
+ change = 1;
}
- if (((nu->flagu & CU_NURB_CYCLIC)==0) && (nu->flagu & CU_NURB_BEZIER)) {
- CLAMP(nu->orderu, 3,4);
- change= 1;
+ if (((nu->flagu & CU_NURB_CYCLIC) == 0) && (nu->flagu & CU_NURB_BEZIER)) {
+ CLAMP(nu->orderu, 3, 4);
+ change = 1;
}
return change;
}
-int clamp_nurb_order_v( struct Nurb *nu)
+int BKE_nurb_order_clamp_v(struct Nurb *nu)
{
int change = 0;
- if (nu->pntsv<nu->orderv) {
- nu->orderv= nu->pntsv;
- change= 1;
+ if (nu->pntsv < nu->orderv) {
+ nu->orderv = nu->pntsv;
+ change = 1;
}
- if (((nu->flagv & CU_NURB_CYCLIC)==0) && (nu->flagv & CU_NURB_BEZIER)) {
- CLAMP(nu->orderv, 3,4);
- change= 1;
+ if (((nu->flagv & CU_NURB_CYCLIC) == 0) && (nu->flagv & CU_NURB_BEZIER)) {
+ CLAMP(nu->orderv, 3, 4);
+ change = 1;
}
return change;
}
/* Get edit nurbs or normal nurbs list */
-ListBase *BKE_curve_nurbs(Curve *cu)
+ListBase *BKE_curve_nurbs_get(Curve *cu)
{
if (cu->editnurb) {
- return curve_editnurbs(cu);
+ return BKE_curve_editNurbs_get(cu);
}
return &cu->nurb;
@@ -3250,33 +3377,33 @@ ListBase *BKE_curve_nurbs(Curve *cu)
/* basic vertex data functions */
-int minmax_curve(Curve *cu, float min[3], float max[3])
+int BKE_curve_minmax(Curve *cu, float min[3], float max[3])
{
- ListBase *nurb_lb= BKE_curve_nurbs(cu);
+ ListBase *nurb_lb = BKE_curve_nurbs_get(cu);
Nurb *nu;
- for (nu= nurb_lb->first; nu; nu= nu->next)
- minmaxNurb(nu, min, max);
+ for (nu = nurb_lb->first; nu; nu = nu->next)
+ BKE_nurb_minmax(nu, min, max);
return (nurb_lb->first != NULL);
}
-int curve_center_median(Curve *cu, float cent[3])
+int BKE_curve_center_median(Curve *cu, float cent[3])
{
- ListBase *nurb_lb= BKE_curve_nurbs(cu);
+ ListBase *nurb_lb = BKE_curve_nurbs_get(cu);
Nurb *nu;
- int total= 0;
+ int total = 0;
zero_v3(cent);
- for (nu= nurb_lb->first; nu; nu= nu->next) {
+ for (nu = nurb_lb->first; nu; nu = nu->next) {
int i;
if (nu->type == CU_BEZIER) {
BezTriple *bezt;
- i= nu->pntsu;
+ i = nu->pntsu;
total += i * 3;
- for (bezt= nu->bezt; i--; bezt++) {
+ for (bezt = nu->bezt; i--; bezt++) {
add_v3_v3(cent, bezt->vec[0]);
add_v3_v3(cent, bezt->vec[1]);
add_v3_v3(cent, bezt->vec[2]);
@@ -3284,24 +3411,24 @@ int curve_center_median(Curve *cu, float cent[3])
}
else {
BPoint *bp;
- i= nu->pntsu*nu->pntsv;
+ i = nu->pntsu * nu->pntsv;
total += i;
- for (bp= nu->bp; i--; bp++) {
+ for (bp = nu->bp; i--; bp++) {
add_v3_v3(cent, bp->vec);
}
}
}
- mul_v3_fl(cent, 1.0f/(float)total);
+ mul_v3_fl(cent, 1.0f / (float)total);
return (total != 0);
}
-int curve_center_bounds(Curve *cu, float cent[3])
+int BKE_curve_center_bounds(Curve *cu, float cent[3])
{
float min[3], max[3];
INIT_MINMAX(min, max);
- if (minmax_curve(cu, min, max)) {
+ if (BKE_curve_minmax(cu, min, max)) {
mid_v3_v3v3(cent, min, max);
return 1;
}
@@ -3309,27 +3436,27 @@ int curve_center_bounds(Curve *cu, float cent[3])
return 0;
}
-void curve_translate(Curve *cu, float offset[3], int do_keys)
+void BKE_curve_translate(Curve *cu, float offset[3], int do_keys)
{
- ListBase *nurb_lb= BKE_curve_nurbs(cu);
+ ListBase *nurb_lb = BKE_curve_nurbs_get(cu);
Nurb *nu;
int i;
- for (nu= nurb_lb->first; nu; nu= nu->next) {
+ for (nu = nurb_lb->first; nu; nu = nu->next) {
BezTriple *bezt;
BPoint *bp;
if (nu->type == CU_BEZIER) {
- i= nu->pntsu;
- for (bezt= nu->bezt; i--; bezt++) {
+ i = nu->pntsu;
+ for (bezt = nu->bezt; i--; bezt++) {
add_v3_v3(bezt->vec[0], offset);
add_v3_v3(bezt->vec[1], offset);
add_v3_v3(bezt->vec[2], offset);
}
}
else {
- i= nu->pntsu*nu->pntsv;
- for (bp= nu->bp; i--; bp++) {
+ i = nu->pntsu * nu->pntsv;
+ for (bp = nu->bp; i--; bp++) {
add_v3_v3(bp->vec, offset);
}
}
@@ -3337,24 +3464,24 @@ void curve_translate(Curve *cu, float offset[3], int do_keys)
if (do_keys && cu->key) {
KeyBlock *kb;
- for (kb=cu->key->block.first; kb; kb=kb->next) {
- float *fp= kb->data;
- for (i= kb->totelem; i--; fp+=3) {
+ for (kb = cu->key->block.first; kb; kb = kb->next) {
+ float *fp = kb->data;
+ for (i = kb->totelem; i--; fp += 3) {
add_v3_v3(fp, offset);
}
}
}
}
-void curve_delete_material_index(Curve *cu, int index)
+void BKE_curve_delete_material_index(Curve *cu, int index)
{
- const int curvetype= curve_type(cu);
+ const int curvetype = BKE_curve_type_get(cu);
if (curvetype == OB_FONT) {
- struct CharInfo *info= cu->strinfo;
+ struct CharInfo *info = cu->strinfo;
int i;
- for (i= cu->len-1; i >= 0; i--, info++) {
- if (info->mat_nr && info->mat_nr>=index) {
+ for (i = cu->len - 1; i >= 0; i--, info++) {
+ if (info->mat_nr && info->mat_nr >= index) {
info->mat_nr--;
}
}
@@ -3362,10 +3489,11 @@ void curve_delete_material_index(Curve *cu, int index)
else {
Nurb *nu;
- for (nu= cu->nurb.first; nu; nu= nu->next) {
- if (nu->mat_nr && nu->mat_nr>=index) {
+ for (nu = cu->nurb.first; nu; nu = nu->next) {
+ if (nu->mat_nr && nu->mat_nr >= index) {
nu->mat_nr--;
- if (curvetype == OB_CURVE) nu->charidx--;
+ if (curvetype == OB_CURVE)
+ nu->charidx--;
}
}
}
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index afb5e85ffa8..a335d00c9a0 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -71,7 +71,11 @@ typedef struct LayerTypeInfo {
int size; /* the memory size of one element of this layer's data */
const char *structname; /* name of the struct used, for file writing */
int structnum; /* number of structs per element, for file writing */
- const char *defaultname; /* default layer name */
+
+ /* default layer name.
+ * note! when NULL this is a way to ensure there is only ever one item
+ * see: CustomData_layertype_is_singleton() */
+ const char *defaultname;
/* a function to copy count elements of this layer's data
* (deep copy if appropriate)
@@ -167,7 +171,7 @@ static void layerCopy_bmesh_elem_py_ptr(const void *UNUSED(source), void *dest,
int i, size = sizeof(void *);
for (i = 0; i < count; ++i) {
- void **ptr = (void **)((char *)dest + i * size);
+ void **ptr = (void **)((char *)dest + i * size);
*ptr = NULL;
}
}
@@ -582,7 +586,7 @@ static int layerEqual_mloopcol(void *data1, void *data2)
b = m1->b - m2->b;
a = m1->a - m2->a;
- return r*r + g*g + b*b + a*a < 0.001;
+ return r * r + g * g + b * b + a * a < 0.001f;
}
static void layerMultiply_mloopcol(void *data, float fac)
@@ -638,7 +642,7 @@ static void layerInitMinMax_mloopcol(void *vmin, void *vmax)
static void layerDefault_mloopcol(void *data, int count)
{
- MLoopCol default_mloopcol = {255,255,255,255};
+ MLoopCol default_mloopcol = {255, 255, 255, 255};
MLoopCol *mlcol = (MLoopCol*)data;
int i;
for (i = 0; i < count; i++)
@@ -986,11 +990,11 @@ static const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] = {
/* 9: CD_POLYINDEX */
{sizeof(int), "MIntProperty", 1, NULL, NULL, NULL, NULL, NULL, NULL},
/* 10: CD_PROP_FLT */
- {sizeof(MFloatProperty), "MFloatProperty",1,"Float", layerCopy_propFloat,NULL,NULL,NULL},
+ {sizeof(MFloatProperty), "MFloatProperty", 1, "Float", layerCopy_propFloat, NULL, NULL, NULL},
/* 11: CD_PROP_INT */
- {sizeof(MIntProperty), "MIntProperty",1,"Int",layerCopy_propInt,NULL,NULL,NULL},
+ {sizeof(MIntProperty), "MIntProperty", 1, "Int", layerCopy_propInt, NULL, NULL, NULL},
/* 12: CD_PROP_STR */
- {sizeof(MStringProperty), "MStringProperty",1,"String",layerCopy_propString,NULL,NULL,NULL},
+ {sizeof(MStringProperty), "MStringProperty", 1, "String", layerCopy_propString, NULL, NULL, NULL},
/* 13: CD_ORIGSPACE */
{sizeof(OrigSpaceFace), "OrigSpaceFace", 1, "UVMap", layerCopy_origspace_face, NULL,
layerInterp_origspace_face, layerSwap_origspace_face, layerDefault_origspace_face},
@@ -1026,10 +1030,9 @@ static const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] = {
/* 23: CD_CLOTH_ORCO */
{sizeof(float)*3, "", 0, NULL, NULL, NULL, NULL, NULL, NULL},
/* 24: CD_RECAST */
- {sizeof(MRecast), "MRecast", 1,"Recast",NULL,NULL,NULL,NULL}
+ {sizeof(MRecast), "MRecast", 1, "Recast", NULL, NULL, NULL, NULL},
/* BMESH ONLY */
- ,
/* 25: CD_MPOLY */
{sizeof(MPoly), "MPoly", 1, "NGon Face", NULL, NULL, NULL, NULL, NULL},
/* 26: CD_MLOOP */
@@ -1042,7 +1045,7 @@ static const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] = {
{sizeof(float), "", 0, "BevelWeight", NULL, NULL, layerInterp_bweight},
/* 30: CD_CREASE */
{sizeof(float), "", 0, "SubSurfCrease", NULL, NULL, layerInterp_bweight},
- /* 31: CD_ORIGSPACE_MLOOP */
+ /* 31: CD_ORIGSPACE_MLOOP */
{sizeof(OrigSpaceLoop), "OrigSpaceLoop", 1, "OS Loop", NULL, NULL, layerInterp_mloop_origspace, NULL, NULL,
layerEqual_mloop_origspace, layerMultiply_mloop_origspace, layerInitMinMax_mloop_origspace,
layerAdd_mloop_origspace, layerDoMinMax_mloop_origspace, layerCopyValue_mloop_origspace},
@@ -1064,12 +1067,11 @@ static const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] = {
static const char *LAYERTYPENAMES[CD_NUMTYPES] = {
/* 0-4 */ "CDMVert", "CDMSticky", "CDMDeformVert", "CDMEdge", "CDMFace",
/* 5-9 */ "CDMTFace", "CDMCol", "CDOrigIndex", "CDNormal", "CDFlags",
- /* 10-14 */ "CDMFloatProperty", "CDMIntProperty","CDMStringProperty", "CDOrigSpace", "CDOrco",
+ /* 10-14 */ "CDMFloatProperty", "CDMIntProperty", "CDMStringProperty", "CDOrigSpace", "CDOrco",
/* 15-19 */ "CDMTexPoly", "CDMLoopUV", "CDMloopCol", "CDTangent", "CDMDisps",
- /* 20-24 */"CDPreviewMCol", "CDIDMCol", "CDTextureMCol", "CDClothOrco", "CDMRecast"
+ /* 20-24 */"CDPreviewMCol", "CDIDMCol", "CDTextureMCol", "CDClothOrco", "CDMRecast",
/* BMESH ONLY */
- ,
/* 25-29 */ "CDMPoly", "CDMLoop", "CDShapeKeyIndex", "CDShapeKey", "CDBevelWeight",
/* 30-32 */ "CDSubSurfCrease", "CDOrigSpaceLoop", "CDPreviewLoopCol"
/* END BMESH ONLY */
@@ -1913,8 +1915,7 @@ void CustomData_interp(const CustomData *source, CustomData *dest,
void *src_data = source->layers[src_i].data;
for (j = 0; j < count; ++j)
- sources[j] = (char *)src_data
- + typeInfo->size * src_indices[j];
+ sources[j] = (char *)src_data + typeInfo->size * src_indices[j];
dest_offset = dest_index * typeInfo->size;
@@ -2337,7 +2338,10 @@ int CustomData_layer_has_math(struct CustomData *data, int layer_n)
const LayerTypeInfo *typeInfo = layerType_getInfo(data->layers[layer_n].type);
if (typeInfo->equal && typeInfo->add && typeInfo->multiply &&
- typeInfo->initminmax && typeInfo->dominmax) return 1;
+ typeInfo->initminmax && typeInfo->dominmax)
+ {
+ return 1;
+ }
return 0;
}
@@ -2598,6 +2602,16 @@ const char *CustomData_layertype_name(int type)
return layerType_getName(type);
}
+
+/**
+ * Can only ever be one of these.
+ */
+int CustomData_layertype_is_singleton(int type)
+{
+ const LayerTypeInfo *typeInfo = layerType_getInfo(type);
+ return typeInfo->defaultname == NULL;
+}
+
static int CustomData_is_property_layer(int type)
{
if ((type == CD_PROP_FLT) || (type == CD_PROP_INT) || (type == CD_PROP_STR))
@@ -2684,7 +2698,9 @@ int CustomData_verify_versions(struct CustomData *data, int index)
if (!typeInfo->defaultname && (index > 0) &&
data->layers[index-1].type == layer->type)
+ {
keeplayer = 0; /* multiple layers of which we only support one */
+ }
}
if (!keeplayer) {
diff --git a/source/blender/blenkernel/intern/deform.c b/source/blender/blenkernel/intern/deform.c
index 1232177fa10..ebf5735c1cd 100644
--- a/source/blender/blenkernel/intern/deform.c
+++ b/source/blender/blenkernel/intern/deform.c
@@ -437,11 +437,51 @@ void defgroup_unique_name(bDeformGroup *dg, Object *ob)
BLI_uniquename_cb(defgroup_unique_check, &data, "Group", '.', dg->name, sizeof(dg->name));
}
-BLI_INLINE int is_char_sep(const char c)
+static int is_char_sep(const char c)
{
return ELEM4(c, '.', ' ', '-', '_');
}
+/* based on BLI_split_dirfile() / os.path.splitext(), "a.b.c" -> ("a.b", ".c") */
+
+void BKE_deform_split_suffix(const char string[MAX_VGROUP_NAME], char body[MAX_VGROUP_NAME], char suf[MAX_VGROUP_NAME])
+{
+ size_t len = BLI_strnlen(string, MAX_VGROUP_NAME);
+ size_t i;
+
+ body[0] = suf[0] = '\0';
+
+ for (i = len - 1; i > 1; i--) {
+ if (is_char_sep(string[i])) {
+ BLI_strncpy(body, string, i + 1);
+ BLI_strncpy(suf, string + i, (len + 1) - i);
+ return;
+ }
+ }
+
+ BLI_strncpy(body, string, len);
+}
+
+/* "a.b.c" -> ("a.", "b.c") */
+void BKE_deform_split_prefix(const char string[MAX_VGROUP_NAME], char pre[MAX_VGROUP_NAME], char body[MAX_VGROUP_NAME])
+{
+ size_t len = BLI_strnlen(string, MAX_VGROUP_NAME);
+ size_t i;
+
+ body[0] = pre[0] = '\0';
+
+ for (i = 1; i < len; i++) {
+ if (is_char_sep(string[i])) {
+ i++;
+ BLI_strncpy(pre, string, i + 1);
+ BLI_strncpy(body, string + i, (len + 1) - i);
+ return;
+ }
+ }
+
+ BLI_strncpy(body, string, len);
+}
+
/* finds the best possible flipped name. For renaming; check for unique names afterwards */
/* if strip_number: removes number extensions
* note: don't use sizeof() for 'name' or 'from_name' */
@@ -466,7 +506,7 @@ void flip_side_name(char name[MAX_VGROUP_NAME], const char from_name[MAX_VGROUP_
/* We first check the case with a .### extension, let's find the last period */
if (isdigit(name[len - 1])) {
index = strrchr(name, '.'); // last occurrence
- if (index && isdigit(index[1]) ) { // doesnt handle case bone.1abc2 correct..., whatever!
+ if (index && isdigit(index[1])) { // doesnt handle case bone.1abc2 correct..., whatever!
if (strip_number == 0) {
BLI_strncpy(number, index, sizeof(number));
}
@@ -478,8 +518,8 @@ void flip_side_name(char name[MAX_VGROUP_NAME], const char from_name[MAX_VGROUP_
BLI_strncpy(prefix, name, sizeof(prefix));
/* first case; separator . - _ with extensions r R l L */
- if (is_char_sep(name[len - 2]) ) {
- switch(name[len - 1]) {
+ if (is_char_sep(name[len - 2])) {
+ switch (name[len - 1]) {
case 'l':
prefix[len - 1] = 0;
strcpy(replace, "r");
@@ -499,8 +539,8 @@ void flip_side_name(char name[MAX_VGROUP_NAME], const char from_name[MAX_VGROUP_
}
}
/* case; beginning with r R l L , with separator after it */
- else if (is_char_sep(name[1]) ) {
- switch(name[0]) {
+ else if (is_char_sep(name[1])) {
+ switch (name[0]) {
case 'l':
strcpy(replace, "r");
BLI_strncpy(suffix, name + 1, sizeof(suffix));
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index aa6d42977ca..fc54ea6eed5 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -72,6 +72,7 @@
#include "BKE_pointcache.h"
#include "BKE_scene.h"
#include "BKE_screen.h"
+#include "BKE_tracking.h"
#include "BKE_utildefines.h"
#include "depsgraph_private.h"
@@ -81,24 +82,24 @@
* the queue store a list of freenodes to avoid successive alloc/dealloc
*/
-DagNodeQueue * queue_create (int slots)
+DagNodeQueue *queue_create(int slots)
{
- DagNodeQueue * queue;
- DagNodeQueueElem * elem;
+ DagNodeQueue *queue;
+ DagNodeQueueElem *elem;
int i;
- queue = MEM_mallocN(sizeof(DagNodeQueue),"DAG queue");
- queue->freenodes = MEM_mallocN(sizeof(DagNodeQueue),"DAG queue");
+ queue = MEM_mallocN(sizeof(DagNodeQueue), "DAG queue");
+ queue->freenodes = MEM_mallocN(sizeof(DagNodeQueue), "DAG queue");
queue->count = 0;
queue->maxlevel = 0;
queue->first = queue->last = NULL;
- elem = MEM_mallocN(sizeof(DagNodeQueueElem),"DAG queue elem3");
+ elem = MEM_mallocN(sizeof(DagNodeQueueElem), "DAG queue elem3");
elem->node = NULL;
elem->next = NULL;
queue->freenodes->first = queue->freenodes->last = elem;
- for (i = 1; i <slots;i++) {
- elem = MEM_mallocN(sizeof(DagNodeQueueElem),"DAG queue elem4");
+ for (i = 1; i < slots; i++) {
+ elem = MEM_mallocN(sizeof(DagNodeQueueElem), "DAG queue elem4");
elem->node = NULL;
elem->next = NULL;
queue->freenodes->last->next = elem;
@@ -110,7 +111,7 @@ DagNodeQueue * queue_create (int slots)
void queue_raz(DagNodeQueue *queue)
{
- DagNodeQueueElem * elem;
+ DagNodeQueueElem *elem;
elem = queue->first;
if (queue->freenodes->last)
@@ -131,8 +132,8 @@ void queue_raz(DagNodeQueue *queue)
void queue_delete(DagNodeQueue *queue)
{
- DagNodeQueueElem * elem;
- DagNodeQueueElem * temp;
+ DagNodeQueueElem *elem;
+ DagNodeQueueElem *temp;
elem = queue->first;
while (elem) {
@@ -155,32 +156,32 @@ void queue_delete(DagNodeQueue *queue)
/* insert in queue, remove in front */
void push_queue(DagNodeQueue *queue, DagNode *node)
{
- DagNodeQueueElem * elem;
+ DagNodeQueueElem *elem;
int i;
if (node == NULL) {
- fprintf(stderr,"pushing null node\n");
+ fprintf(stderr, "pushing null node\n");
return;
}
- /*fprintf(stderr,"BFS push : %s %d\n",((ID *) node->ob)->name, queue->count);*/
+ /*fprintf(stderr, "BFS push : %s %d\n", ((ID *) node->ob)->name, queue->count);*/
elem = queue->freenodes->first;
if (elem != NULL) {
queue->freenodes->first = elem->next;
- if ( queue->freenodes->last == elem) {
+ if (queue->freenodes->last == elem) {
queue->freenodes->last = NULL;
queue->freenodes->first = NULL;
}
queue->freenodes->count--;
}
else { /* alllocating more */
- elem = MEM_mallocN(sizeof(DagNodeQueueElem),"DAG queue elem1");
+ elem = MEM_mallocN(sizeof(DagNodeQueueElem), "DAG queue elem1");
elem->node = NULL;
elem->next = NULL;
queue->freenodes->first = queue->freenodes->last = elem;
- for (i = 1; i <DAGQUEUEALLOC;i++) {
- elem = MEM_mallocN(sizeof(DagNodeQueueElem),"DAG queue elem2");
+ for (i = 1; i < DAGQUEUEALLOC; i++) {
+ elem = MEM_mallocN(sizeof(DagNodeQueueElem), "DAG queue elem2");
elem->node = NULL;
elem->next = NULL;
queue->freenodes->last->next = elem;
@@ -206,26 +207,26 @@ void push_queue(DagNodeQueue *queue, DagNode *node)
/* insert in front, remove in front */
void push_stack(DagNodeQueue *queue, DagNode *node)
{
- DagNodeQueueElem * elem;
+ DagNodeQueueElem *elem;
int i;
elem = queue->freenodes->first;
if (elem != NULL) {
queue->freenodes->first = elem->next;
- if ( queue->freenodes->last == elem) {
+ if (queue->freenodes->last == elem) {
queue->freenodes->last = NULL;
queue->freenodes->first = NULL;
}
queue->freenodes->count--;
}
else { /* alllocating more */
- elem = MEM_mallocN(sizeof(DagNodeQueueElem),"DAG queue elem1");
+ elem = MEM_mallocN(sizeof(DagNodeQueueElem), "DAG queue elem1");
elem->node = NULL;
elem->next = NULL;
queue->freenodes->first = queue->freenodes->last = elem;
- for (i = 1; i <DAGQUEUEALLOC;i++) {
- elem = MEM_mallocN(sizeof(DagNodeQueueElem),"DAG queue elem2");
+ for (i = 1; i < DAGQUEUEALLOC; i++) {
+ elem = MEM_mallocN(sizeof(DagNodeQueueElem), "DAG queue elem2");
elem->node = NULL;
elem->next = NULL;
queue->freenodes->last->next = elem;
@@ -245,24 +246,24 @@ void push_stack(DagNodeQueue *queue, DagNode *node)
}
-DagNode * pop_queue(DagNodeQueue *queue)
+DagNode *pop_queue(DagNodeQueue *queue)
{
- DagNodeQueueElem * elem;
+ DagNodeQueueElem *elem;
DagNode *node;
elem = queue->first;
if (elem) {
queue->first = elem->next;
if (queue->last == elem) {
- queue->last=NULL;
- queue->first=NULL;
+ queue->last = NULL;
+ queue->first = NULL;
}
queue->count--;
if (queue->freenodes->last)
- queue->freenodes->last->next=elem;
- queue->freenodes->last=elem;
+ queue->freenodes->last->next = elem;
+ queue->freenodes->last = elem;
if (queue->freenodes->first == NULL)
- queue->freenodes->first=elem;
+ queue->freenodes->first = elem;
node = elem->node;
elem->node = NULL;
elem->next = NULL;
@@ -270,22 +271,22 @@ DagNode * pop_queue(DagNodeQueue *queue)
return node;
}
else {
- fprintf(stderr,"return null\n");
+ fprintf(stderr, "return null\n");
return NULL;
}
}
-void *pop_ob_queue(struct DagNodeQueue *queue)
+void *pop_ob_queue(struct DagNodeQueue *queue)
{
return(pop_queue(queue)->ob);
}
-DagNode * get_top_node_queue(DagNodeQueue *queue)
+DagNode *get_top_node_queue(DagNodeQueue *queue)
{
return queue->first->node;
}
-int queue_count(struct DagNodeQueue *queue)
+int queue_count(struct DagNodeQueue *queue)
{
return queue->count;
}
@@ -295,7 +296,7 @@ DagForest *dag_init(void)
{
DagForest *forest;
/* use callocN to init all zero */
- forest = MEM_callocN(sizeof(DagForest),"DAG root");
+ forest = MEM_callocN(sizeof(DagForest), "DAG root");
return forest;
}
@@ -306,37 +307,37 @@ static void dag_add_driver_relation(AnimData *adt, DagForest *dag, DagNode *node
FCurve *fcu;
DagNode *node1;
- for (fcu= adt->drivers.first; fcu; fcu= fcu->next) {
- ChannelDriver *driver= fcu->driver;
+ for (fcu = adt->drivers.first; fcu; fcu = fcu->next) {
+ ChannelDriver *driver = fcu->driver;
DriverVar *dvar;
int isdata_fcu = isdata || (fcu->rna_path && strstr(fcu->rna_path, "modifiers["));
/* loop over variables to get the target relationships */
- for (dvar= driver->variables.first; dvar; dvar= dvar->next) {
+ for (dvar = driver->variables.first; dvar; dvar = dvar->next) {
/* only used targets */
DRIVER_TARGETS_USED_LOOPER(dvar)
{
if (dtar->id) {
// FIXME: other data types need to be added here so that they can work!
- if (GS(dtar->id->name)==ID_OB) {
- Object *ob= (Object *)dtar->id;
+ if (GS(dtar->id->name) == ID_OB) {
+ Object *ob = (Object *)dtar->id;
/* normal channel-drives-channel */
node1 = dag_get_node(dag, dtar->id);
/* check if bone... */
- if ((ob->type==OB_ARMATURE) &&
- ( ((dtar->rna_path) && strstr(dtar->rna_path, "pose.bones[")) ||
- ((dtar->flag & DTAR_FLAG_STRUCT_REF) && (dtar->pchan_name[0])) ))
+ if ((ob->type == OB_ARMATURE) &&
+ ( ((dtar->rna_path) && strstr(dtar->rna_path, "pose.bones[")) ||
+ ((dtar->flag & DTAR_FLAG_STRUCT_REF) && (dtar->pchan_name[0])) ))
{
- dag_add_relation(dag, node1, node, isdata_fcu?DAG_RL_DATA_DATA:DAG_RL_DATA_OB, "Driver");
+ dag_add_relation(dag, node1, node, isdata_fcu ? DAG_RL_DATA_DATA : DAG_RL_DATA_OB, "Driver");
}
/* check if ob data */
else if (dtar->rna_path && strstr(dtar->rna_path, "data."))
- dag_add_relation(dag, node1, node, isdata_fcu?DAG_RL_DATA_DATA:DAG_RL_DATA_OB, "Driver");
+ dag_add_relation(dag, node1, node, isdata_fcu ? DAG_RL_DATA_DATA : DAG_RL_DATA_OB, "Driver");
/* normal */
else
- dag_add_relation(dag, node1, node, isdata_fcu?DAG_RL_OB_DATA:DAG_RL_OB_OB, "Driver");
+ dag_add_relation(dag, node1, node, isdata_fcu ? DAG_RL_OB_DATA : DAG_RL_OB_OB, "Driver");
}
}
}
@@ -352,12 +353,12 @@ static void dag_add_collision_field_relation(DagForest *dag, Scene *scene, Objec
// would be nice to have a list of colliders here
// so for now walk all objects in scene check 'same layer rule'
- for (base = scene->base.first; base; base= base->next) {
+ for (base = scene->base.first; base; base = base->next) {
if ((base->lay & ob->lay) && base->object->pd) {
- Object *ob1= base->object;
+ Object *ob1 = base->object;
if ((ob1->pd->deflect || ob1->pd->forcefield) && (ob1 != ob)) {
node2 = dag_get_node(dag, ob1);
- dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA|DAG_RL_OB_DATA, "Field Collision");
+ dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Field Collision");
}
}
}
@@ -366,53 +367,53 @@ static void dag_add_collision_field_relation(DagForest *dag, Scene *scene, Objec
static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, Object *ob, int mask)
{
bConstraint *con;
- DagNode * node;
- DagNode * node2;
- DagNode * node3;
+ DagNode *node;
+ DagNode *node2;
+ DagNode *node3;
Key *key;
ParticleSystem *psys;
- int addtoroot= 1;
+ int addtoroot = 1;
node = dag_get_node(dag, ob);
- if ((ob->data) && (mask&DAG_RL_DATA)) {
- node2 = dag_get_node(dag,ob->data);
- dag_add_relation(dag,node,node2,DAG_RL_DATA, "Object-Data Relation");
+ if ((ob->data) && (mask & DAG_RL_DATA)) {
+ node2 = dag_get_node(dag, ob->data);
+ dag_add_relation(dag, node, node2, DAG_RL_DATA, "Object-Data Relation");
node2->first_ancestor = ob;
node2->ancestor_count += 1;
}
/* also build a custom data mask for dependencies that need certain layers */
- node->customdata_mask= 0;
+ node->customdata_mask = 0;
if (ob->type == OB_ARMATURE) {
if (ob->pose) {
bPoseChannel *pchan;
bConstraint *con;
- for (pchan = ob->pose->chanbase.first; pchan; pchan=pchan->next) {
- for (con = pchan->constraints.first; con; con=con->next) {
- bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
+ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
+ for (con = pchan->constraints.first; con; con = con->next) {
+ bConstraintTypeInfo *cti = constraint_get_typeinfo(con);
ListBase targets = {NULL, NULL};
bConstraintTarget *ct;
if (cti && cti->get_constraint_targets) {
cti->get_constraint_targets(con, &targets);
- for (ct= targets.first; ct; ct= ct->next) {
+ for (ct = targets.first; ct; ct = ct->next) {
if (ct->tar && ct->tar != ob) {
- // fprintf(stderr,"armature %s target :%s\n", ob->id.name, target->id.name);
+ // fprintf(stderr, "armature %s target :%s\n", ob->id.name, target->id.name);
node3 = dag_get_node(dag, ct->tar);
if (ct->subtarget[0]) {
- dag_add_relation(dag,node3,node, DAG_RL_OB_DATA|DAG_RL_DATA_DATA, cti->name);
+ dag_add_relation(dag, node3, node, DAG_RL_OB_DATA | DAG_RL_DATA_DATA, cti->name);
if (ct->tar->type == OB_MESH)
node3->customdata_mask |= CD_MASK_MDEFORMVERT;
}
else if (ELEM3(con->type, CONSTRAINT_TYPE_FOLLOWPATH, CONSTRAINT_TYPE_CLAMPTO, CONSTRAINT_TYPE_SPLINEIK))
- dag_add_relation(dag,node3,node, DAG_RL_DATA_DATA|DAG_RL_OB_DATA, cti->name);
+ dag_add_relation(dag, node3, node, DAG_RL_DATA_DATA | DAG_RL_OB_DATA, cti->name);
else
- dag_add_relation(dag,node3,node, DAG_RL_OB_DATA, cti->name);
+ dag_add_relation(dag, node3, node, DAG_RL_OB_DATA, cti->name);
}
}
@@ -430,13 +431,13 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
if (ob->nlastrips.first) {
bActionStrip *strip;
bActionChannel *chan;
- for (strip= ob->nlastrips.first; strip; strip= strip->next) {
+ for (strip = ob->nlastrips.first; strip; strip = strip->next) {
if (strip->modifiers.first) {
bActionModifier *amod;
- for (amod= strip->modifiers.first; amod; amod= amod->next) {
+ for (amod = strip->modifiers.first; amod; amod = amod->next) {
if (amod->ob) {
node2 = dag_get_node(dag, amod->ob);
- dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA|DAG_RL_OB_DATA, "NLA Strip Modifier");
+ dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "NLA Strip Modifier");
}
}
}
@@ -444,65 +445,65 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
}
#endif // XXX old animation system
if (ob->adt)
- dag_add_driver_relation(ob->adt, dag, node, (ob->type == OB_ARMATURE)); // XXX isdata arg here doesn't give an accurate picture of situation
+ dag_add_driver_relation(ob->adt, dag, node, (ob->type == OB_ARMATURE)); // XXX isdata arg here doesn't give an accurate picture of situation
- key= ob_get_key(ob);
+ key = ob_get_key(ob);
if (key && key->adt)
dag_add_driver_relation(key->adt, dag, node, 1);
if (ob->modifiers.first) {
ModifierData *md;
- for (md=ob->modifiers.first; md; md=md->next) {
+ for (md = ob->modifiers.first; md; md = md->next) {
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
if (mti->updateDepgraph) mti->updateDepgraph(md, dag, scene, ob, node);
}
}
if (ob->parent) {
- node2 = dag_get_node(dag,ob->parent);
+ node2 = dag_get_node(dag, ob->parent);
- switch(ob->partype) {
+ switch (ob->partype) {
case PARSKEL:
- dag_add_relation(dag,node2,node,DAG_RL_DATA_DATA|DAG_RL_OB_OB, "Parent");
+ dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA | DAG_RL_OB_OB, "Parent");
break;
case PARVERT1: case PARVERT3:
- dag_add_relation(dag,node2,node,DAG_RL_DATA_OB|DAG_RL_OB_OB, "Vertex Parent");
+ dag_add_relation(dag, node2, node, DAG_RL_DATA_OB | DAG_RL_OB_OB, "Vertex Parent");
node2->customdata_mask |= CD_MASK_ORIGINDEX;
break;
case PARBONE:
- dag_add_relation(dag,node2,node,DAG_RL_DATA_OB|DAG_RL_OB_OB, "Bone Parent");
+ dag_add_relation(dag, node2, node, DAG_RL_DATA_OB | DAG_RL_OB_OB, "Bone Parent");
break;
default:
- if (ob->parent->type==OB_LATTICE)
- dag_add_relation(dag,node2,node,DAG_RL_DATA_DATA|DAG_RL_OB_OB, "Lattice Parent");
- else if (ob->parent->type==OB_CURVE) {
- Curve *cu= ob->parent->data;
+ if (ob->parent->type == OB_LATTICE)
+ dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA | DAG_RL_OB_OB, "Lattice Parent");
+ else if (ob->parent->type == OB_CURVE) {
+ Curve *cu = ob->parent->data;
if (cu->flag & CU_PATH)
- dag_add_relation(dag,node2,node,DAG_RL_DATA_OB|DAG_RL_OB_OB, "Curve Parent");
+ dag_add_relation(dag, node2, node, DAG_RL_DATA_OB | DAG_RL_OB_OB, "Curve Parent");
else
- dag_add_relation(dag,node2,node,DAG_RL_OB_OB, "Curve Parent");
+ dag_add_relation(dag, node2, node, DAG_RL_OB_OB, "Curve Parent");
}
else
- dag_add_relation(dag,node2,node,DAG_RL_OB_OB, "Parent");
+ dag_add_relation(dag, node2, node, DAG_RL_OB_OB, "Parent");
}
/* exception case: parent is duplivert */
- if (ob->type==OB_MBALL && (ob->parent->transflag & OB_DUPLIVERTS)) {
- dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA|DAG_RL_OB_OB, "Duplivert");
+ if (ob->type == OB_MBALL && (ob->parent->transflag & OB_DUPLIVERTS)) {
+ dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA | DAG_RL_OB_OB, "Duplivert");
}
addtoroot = 0;
}
if (ob->proxy) {
node2 = dag_get_node(dag, ob->proxy);
- dag_add_relation(dag, node, node2, DAG_RL_DATA_DATA|DAG_RL_OB_OB, "Proxy");
+ dag_add_relation(dag, node, node2, DAG_RL_DATA_DATA | DAG_RL_OB_OB, "Proxy");
/* inverted relation, so addtoroot shouldn't be set to zero */
}
if (ob->transflag & OB_DUPLI) {
if ((ob->transflag & OB_DUPLIGROUP) && ob->dup_group) {
GroupObject *go;
- for (go= ob->dup_group->gobject.first; go; go= go->next) {
+ for (go = ob->dup_group->gobject.first; go; go = go->next) {
if (go->ob) {
node2 = dag_get_node(dag, go->ob);
/* node2 changes node1, this keeps animations updated in groups?? not logical? */
@@ -513,14 +514,14 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
}
/* softbody collision */
- if ((ob->type==OB_MESH) || (ob->type==OB_CURVE) || (ob->type==OB_LATTICE)) {
+ if ((ob->type == OB_MESH) || (ob->type == OB_CURVE) || (ob->type == OB_LATTICE)) {
if (modifiers_isSoftbodyEnabled(ob) || modifiers_isClothEnabled(ob) || ob->particlesystem.first)
- dag_add_collision_field_relation(dag, scene, ob, node); /* TODO: use effectorweight->group */
+ dag_add_collision_field_relation(dag, scene, ob, node); /* TODO: use effectorweight->group */
}
/* object data drivers */
if (ob->data) {
- AnimData *adt= BKE_animdata_from_id((ID *)ob->data);
+ AnimData *adt = BKE_animdata_from_id((ID *)ob->data);
if (adt)
dag_add_driver_relation(adt, dag, node, 1);
}
@@ -533,52 +534,52 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
if (cam->dof_ob) {
node2 = dag_get_node(dag, cam->dof_ob);
- dag_add_relation(dag,node2,node,DAG_RL_OB_OB, "Camera DoF");
+ dag_add_relation(dag, node2, node, DAG_RL_OB_OB, "Camera DoF");
}
}
- break;
+ break;
case OB_MBALL:
{
- Object *mom= find_basis_mball(scene, ob);
+ Object *mom = BKE_mball_basis_find(scene, ob);
- if (mom!=ob) {
+ if (mom != ob) {
node2 = dag_get_node(dag, mom);
- dag_add_relation(dag,node,node2,DAG_RL_DATA_DATA|DAG_RL_OB_DATA, "Metaball"); // mom depends on children!
+ dag_add_relation(dag, node, node2, DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Metaball"); // mom depends on children!
}
}
- break;
+ break;
case OB_CURVE:
case OB_FONT:
{
- Curve *cu= ob->data;
+ Curve *cu = ob->data;
if (cu->bevobj) {
node2 = dag_get_node(dag, cu->bevobj);
- dag_add_relation(dag,node2,node,DAG_RL_DATA_DATA|DAG_RL_OB_DATA, "Curve Bevel");
+ dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Curve Bevel");
}
if (cu->taperobj) {
node2 = dag_get_node(dag, cu->taperobj);
- dag_add_relation(dag,node2,node,DAG_RL_DATA_DATA|DAG_RL_OB_DATA, "Curve Taper");
+ dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Curve Taper");
}
if (ob->type == OB_FONT) {
if (cu->textoncurve) {
node2 = dag_get_node(dag, cu->textoncurve);
- dag_add_relation(dag,node2,node,DAG_RL_DATA_DATA|DAG_RL_OB_DATA, "Texture On Curve");
+ dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Texture On Curve");
}
}
}
- break;
+ break;
}
/* particles */
- psys= ob->particlesystem.first;
+ psys = ob->particlesystem.first;
if (psys) {
GroupObject *go;
- for (; psys; psys=psys->next) {
+ for (; psys; psys = psys->next) {
BoidRule *rule = NULL;
BoidState *state = NULL;
- ParticleSettings *part= psys->part;
+ ParticleSettings *part = psys->part;
ListBase *effectors = NULL;
EffectorCache *eff;
@@ -587,15 +588,15 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
if (!psys_check_enabled(ob, psys))
continue;
- if (ELEM(part->phystype,PART_PHYS_KEYED,PART_PHYS_BOIDS)) {
+ if (ELEM(part->phystype, PART_PHYS_KEYED, PART_PHYS_BOIDS)) {
ParticleTarget *pt = psys->targets.first;
- for (; pt; pt=pt->next) {
- if (pt->ob && BLI_findlink(&pt->ob->particlesystem, pt->psys-1)) {
+ for (; pt; pt = pt->next) {
+ if (pt->ob && BLI_findlink(&pt->ob->particlesystem, pt->psys - 1)) {
node2 = dag_get_node(dag, pt->ob);
- dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA|DAG_RL_OB_DATA, "Particle Targets");
+ dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Particle Targets");
}
- }
+ }
}
if (part->ren_as == PART_DRAW_OB && part->dup_ob) {
@@ -609,7 +610,7 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
}
if (part->ren_as == PART_DRAW_GR && part->dup_group) {
- for (go=part->dup_group->gobject.first; go; go=go->next) {
+ for (go = part->dup_group->gobject.first; go; go = go->next) {
node2 = dag_get_node(dag, go->ob);
dag_add_relation(dag, node2, node, DAG_RL_OB_OB, "Particle Group Visualisation");
}
@@ -617,23 +618,25 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
effectors = pdInitEffectors(scene, ob, psys, part->effector_weights);
- if (effectors) for (eff = effectors->first; eff; eff=eff->next) {
- if (eff->psys) {
- node2 = dag_get_node(dag, eff->ob);
- dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA|DAG_RL_OB_DATA, "Particle Field");
+ if (effectors) {
+ for (eff = effectors->first; eff; eff = eff->next) {
+ if (eff->psys) {
+ node2 = dag_get_node(dag, eff->ob);
+ dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Particle Field");
+ }
}
}
pdEndEffectors(&effectors);
if (part->boids) {
- for (state = part->boids->states.first; state; state=state->next) {
- for (rule = state->rules.first; rule; rule=rule->next) {
+ for (state = part->boids->states.first; state; state = state->next) {
+ for (rule = state->rules.first; rule; rule = rule->next) {
Object *ruleob = NULL;
- if (rule->type==eBoidRuleType_Avoid)
- ruleob = ((BoidRuleGoalAvoid*)rule)->ob;
- else if (rule->type==eBoidRuleType_FollowLeader)
- ruleob = ((BoidRuleFollowLeader*)rule)->ob;
+ if (rule->type == eBoidRuleType_Avoid)
+ ruleob = ((BoidRuleGoalAvoid *)rule)->ob;
+ else if (rule->type == eBoidRuleType_FollowLeader)
+ ruleob = ((BoidRuleFollowLeader *)rule)->ob;
if (ruleob) {
node2 = dag_get_node(dag, ruleob);
@@ -646,8 +649,8 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
}
/* object constraints */
- for (con = ob->constraints.first; con; con=con->next) {
- bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
+ for (con = ob->constraints.first; con; con = con->next) {
+ bConstraintTypeInfo *cti = constraint_get_typeinfo(con);
ListBase targets = {NULL, NULL};
bConstraintTarget *ct;
@@ -656,47 +659,47 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
/* special case for camera tracking -- it doesn't use targets to define relations */
if (ELEM3(cti->type, CONSTRAINT_TYPE_FOLLOWTRACK, CONSTRAINT_TYPE_CAMERASOLVER, CONSTRAINT_TYPE_OBJECTSOLVER)) {
- int depends_on_camera= 0;
+ int depends_on_camera = 0;
- if (cti->type==CONSTRAINT_TYPE_FOLLOWTRACK) {
- bFollowTrackConstraint *data= (bFollowTrackConstraint *)con->data;
+ if (cti->type == CONSTRAINT_TYPE_FOLLOWTRACK) {
+ bFollowTrackConstraint *data = (bFollowTrackConstraint *)con->data;
- if ((data->clip || data->flag&FOLLOWTRACK_ACTIVECLIP) && data->track[0])
- depends_on_camera= 1;
+ if ((data->clip || data->flag & FOLLOWTRACK_ACTIVECLIP) && data->track[0])
+ depends_on_camera = 1;
if (data->depth_ob) {
node2 = dag_get_node(dag, data->depth_ob);
- dag_add_relation(dag, node2, node, DAG_RL_DATA_OB|DAG_RL_OB_OB, cti->name);
+ dag_add_relation(dag, node2, node, DAG_RL_DATA_OB | DAG_RL_OB_OB, cti->name);
}
}
- else if (cti->type==CONSTRAINT_TYPE_OBJECTSOLVER)
- depends_on_camera= 1;
+ else if (cti->type == CONSTRAINT_TYPE_OBJECTSOLVER)
+ depends_on_camera = 1;
if (depends_on_camera && scene->camera) {
node2 = dag_get_node(dag, scene->camera);
- dag_add_relation(dag, node2, node, DAG_RL_DATA_OB|DAG_RL_OB_OB, cti->name);
+ dag_add_relation(dag, node2, node, DAG_RL_DATA_OB | DAG_RL_OB_OB, cti->name);
}
- dag_add_relation(dag,scenenode,node,DAG_RL_SCENE, "Scene Relation");
+ dag_add_relation(dag, scenenode, node, DAG_RL_SCENE, "Scene Relation");
addtoroot = 0;
}
else if (cti->get_constraint_targets) {
cti->get_constraint_targets(con, &targets);
- for (ct= targets.first; ct; ct= ct->next) {
+ for (ct = targets.first; ct; ct = ct->next) {
Object *obt;
if (ct->tar)
- obt= ct->tar;
+ obt = ct->tar;
else
continue;
node2 = dag_get_node(dag, obt);
if (ELEM(con->type, CONSTRAINT_TYPE_FOLLOWPATH, CONSTRAINT_TYPE_CLAMPTO))
- dag_add_relation(dag, node2, node, DAG_RL_DATA_OB|DAG_RL_OB_OB, cti->name);
+ dag_add_relation(dag, node2, node, DAG_RL_DATA_OB | DAG_RL_OB_OB, cti->name);
else {
if (ELEM3(obt->type, OB_ARMATURE, OB_MESH, OB_LATTICE) && (ct->subtarget[0])) {
- dag_add_relation(dag, node2, node, DAG_RL_DATA_OB|DAG_RL_OB_OB, cti->name);
+ dag_add_relation(dag, node2, node, DAG_RL_DATA_OB | DAG_RL_OB_OB, cti->name);
if (obt->type == OB_MESH)
node2->customdata_mask |= CD_MASK_MDEFORMVERT;
}
@@ -711,12 +714,11 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
}
}
- if (addtoroot == 1 )
- dag_add_relation(dag,scenenode,node,DAG_RL_SCENE, "Scene Relation");
+ if (addtoroot == 1)
+ dag_add_relation(dag, scenenode, node, DAG_RL_SCENE, "Scene Relation");
}
-struct DagForest *build_dag(Main *bmain, Scene *sce, short mask)
-{
+struct DagForest *build_dag(Main *bmain, Scene *sce, short mask){
Base *base;
Object *ob;
Group *group;
@@ -727,9 +729,9 @@ struct DagForest *build_dag(Main *bmain, Scene *sce, short mask)
DagAdjList *itA;
dag = sce->theDag;
- sce->dagisvalid=1;
- if ( dag)
- free_forest( dag );
+ sce->dagisvalid = 1;
+ if (dag)
+ free_forest(dag);
else {
dag = dag_init();
sce->theDag = dag;
@@ -739,8 +741,8 @@ struct DagForest *build_dag(Main *bmain, Scene *sce, short mask)
scenenode = dag_add_node(dag, sce);
/* add current scene objects */
- for (base = sce->base.first; base; base= base->next) {
- ob= base->object;
+ for (base = sce->base.first; base; base = base->next) {
+ ob = base->object;
build_dag_object(dag, scenenode, sce, ob, mask);
if (ob->proxy)
@@ -752,9 +754,9 @@ struct DagForest *build_dag(Main *bmain, Scene *sce, short mask)
}
/* add groups used in current scene objects */
- for (group= bmain->group.first; group; group= group->id.next) {
+ for (group = bmain->group.first; group; group = group->id.next) {
if (group->id.flag & LIB_DOIT) {
- for (go= group->gobject.first; go; go= go->next) {
+ for (go = group->gobject.first; go; go = go->next) {
build_dag_object(dag, scenenode, sce, go->ob, mask);
}
group->id.flag &= ~LIB_DOIT;
@@ -766,23 +768,23 @@ struct DagForest *build_dag(Main *bmain, Scene *sce, short mask)
* the relation type has to be synced. One of the parents can change, and should give same event to child */
/* nodes were callocced, so we can use node->color for temporal storage */
- for (node = sce->theDag->DagNode.first; node; node= node->next) {
- if (node->type==ID_OB) {
- for (itA = node->child; itA; itA= itA->next) {
- if (itA->node->type==ID_OB) {
+ for (node = sce->theDag->DagNode.first; node; node = node->next) {
+ if (node->type == ID_OB) {
+ for (itA = node->child; itA; itA = itA->next) {
+ if (itA->node->type == ID_OB) {
itA->node->color |= itA->type;
}
}
/* also flush custom data mask */
- ((Object*)node->ob)->customdata_mask= node->customdata_mask;
+ ((Object *)node->ob)->customdata_mask = node->customdata_mask;
}
}
/* now set relations equal, so that when only one parent changes, the correct recalcs are found */
- for (node = sce->theDag->DagNode.first; node; node= node->next) {
- if (node->type==ID_OB) {
- for (itA = node->child; itA; itA= itA->next) {
- if (itA->node->type==ID_OB) {
+ for (node = sce->theDag->DagNode.first; node; node = node->next) {
+ if (node->type == ID_OB) {
+ for (itA = node->child; itA; itA = itA->next) {
+ if (itA->node->type == ID_OB) {
itA->type |= itA->node->color;
}
}
@@ -824,14 +826,14 @@ void free_forest(DagForest *Dag)
}
BLI_ghash_free(Dag->nodeHash, NULL, NULL);
- Dag->nodeHash= NULL;
+ Dag->nodeHash = NULL;
Dag->DagNode.first = NULL;
Dag->DagNode.last = NULL;
Dag->numNodes = 0;
}
-DagNode * dag_find_node (DagForest *forest,void * fob)
+DagNode *dag_find_node(DagForest *forest, void *fob)
{
if (forest->nodeHash)
return BLI_ghash_lookup(forest->nodeHash, fob);
@@ -839,20 +841,20 @@ DagNode * dag_find_node (DagForest *forest,void * fob)
return NULL;
}
-static int ugly_hack_sorry= 1; // prevent type check
-static int dag_print_dependencies= 0; // debugging
+static int ugly_hack_sorry = 1; // prevent type check
+static int dag_print_dependencies = 0; // debugging
/* no checking of existence, use dag_find_node first or dag_get_node */
-DagNode * dag_add_node (DagForest *forest, void * fob)
+DagNode *dag_add_node(DagForest *forest, void *fob)
{
DagNode *node;
- node = MEM_callocN(sizeof(DagNode),"DAG node");
+ node = MEM_callocN(sizeof(DagNode), "DAG node");
if (node) {
node->ob = fob;
node->color = DAG_WHITE;
- if (ugly_hack_sorry) node->type = GS(((ID *) fob)->name); // sorry, done for pose sorting
+ if (ugly_hack_sorry) node->type = GS(((ID *) fob)->name); // sorry, done for pose sorting
if (forest->numNodes) {
((DagNode *) forest->DagNode.last)->next = node;
forest->DagNode.last = node;
@@ -865,18 +867,18 @@ DagNode * dag_add_node (DagForest *forest, void * fob)
}
if (!forest->nodeHash)
- forest->nodeHash= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "dag_add_node gh");
+ forest->nodeHash = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "dag_add_node gh");
BLI_ghash_insert(forest->nodeHash, fob, node);
}
return node;
}
-DagNode * dag_get_node (DagForest *forest,void * fob)
+DagNode *dag_get_node(DagForest *forest, void *fob)
{
DagNode *node;
- node = dag_find_node (forest, fob);
+ node = dag_find_node(forest, fob);
if (!node)
node = dag_add_node(forest, fob);
return node;
@@ -884,10 +886,10 @@ DagNode * dag_get_node (DagForest *forest,void * fob)
-DagNode * dag_get_sub_node (DagForest *forest,void * fob)
+DagNode *dag_get_sub_node(DagForest *forest, void *fob)
{
DagNode *node;
- DagAdjList *mainchild, *prev=NULL;
+ DagAdjList *mainchild, *prev = NULL;
mainchild = ((DagNode *) forest->DagNode.first)->child;
/* remove from first node (scene) adj list if present */
@@ -907,7 +909,7 @@ DagNode * dag_get_sub_node (DagForest *forest,void * fob)
prev = mainchild;
mainchild = mainchild->next;
}
- node = dag_find_node (forest, fob);
+ node = dag_find_node(forest, fob);
if (!node)
node = dag_add_node(forest, fob);
return node;
@@ -926,7 +928,7 @@ static void dag_add_parent_relation(DagForest *UNUSED(forest), DagNode *fob1, Da
itA = itA->next;
}
/* create new relation and insert at head. MALLOC alert! */
- itA = MEM_mallocN(sizeof(DagAdjList),"DAG adj list");
+ itA = MEM_mallocN(sizeof(DagAdjList), "DAG adj list");
itA->node = fob1;
itA->type = rel;
itA->count = 1;
@@ -951,7 +953,7 @@ void dag_add_relation(DagForest *forest, DagNode *fob1, DagNode *fob2, short rel
itA = itA->next;
}
/* create new relation and insert at head. MALLOC alert! */
- itA = MEM_mallocN(sizeof(DagAdjList),"DAG adj list");
+ itA = MEM_mallocN(sizeof(DagAdjList), "DAG adj list");
itA->node = fob2;
itA->type = rel;
itA->count = 1;
@@ -965,9 +967,9 @@ static const char *dag_node_name(DagNode *node)
if (node->ob == NULL)
return "null";
else if (ugly_hack_sorry)
- return ((ID*)(node->ob))->name+2;
+ return ((ID *)(node->ob))->name + 2;
else
- return ((bPoseChannel*)(node->ob))->name;
+ return ((bPoseChannel *)(node->ob))->name;
}
static void dag_node_print_dependencies(DagNode *node)
@@ -976,7 +978,7 @@ static void dag_node_print_dependencies(DagNode *node)
printf("%s depends on:\n", dag_node_name(node));
- for (itA= node->parent; itA; itA= itA->next)
+ for (itA = node->parent; itA; itA = itA->next)
printf(" %s through %s\n", dag_node_name(itA->node), itA->name);
printf("\n");
}
@@ -988,12 +990,12 @@ static int dag_node_print_dependency_recurs(DagNode *node, DagNode *endnode)
if (node->color == DAG_BLACK)
return 0;
- node->color= DAG_BLACK;
+ node->color = DAG_BLACK;
if (node == endnode)
return 1;
- for (itA= node->parent; itA; itA= itA->next) {
+ for (itA = node->parent; itA; itA = itA->next) {
if (dag_node_print_dependency_recurs(itA->node, endnode)) {
printf(" %s depends on %s through %s.\n", dag_node_name(node), dag_node_name(itA->node), itA->name);
return 1;
@@ -1007,8 +1009,8 @@ static void dag_node_print_dependency_cycle(DagForest *dag, DagNode *startnode,
{
DagNode *node;
- for (node = dag->DagNode.first; node; node= node->next)
- node->color= DAG_WHITE;
+ for (node = dag->DagNode.first; node; node = node->next)
+ node->color = DAG_WHITE;
printf(" %s depends on %s through %s.\n", dag_node_name(endnode), dag_node_name(startnode), name);
dag_node_print_dependency_recurs(startnode, endnode);
@@ -1020,16 +1022,16 @@ static int dag_node_recurs_level(DagNode *node, int level)
DagAdjList *itA;
int newlevel;
- node->color= DAG_BLACK; /* done */
- newlevel= ++level;
+ node->color = DAG_BLACK; /* done */
+ newlevel = ++level;
- for (itA= node->parent; itA; itA= itA->next) {
- if (itA->node->color==DAG_WHITE) {
- itA->node->ancestor_count= dag_node_recurs_level(itA->node, level);
- newlevel= MAX2(newlevel, level+itA->node->ancestor_count);
+ for (itA = node->parent; itA; itA = itA->next) {
+ if (itA->node->color == DAG_WHITE) {
+ itA->node->ancestor_count = dag_node_recurs_level(itA->node, level);
+ newlevel = MAX2(newlevel, level + itA->node->ancestor_count);
}
else
- newlevel= MAX2(newlevel, level+itA->node->ancestor_count);
+ newlevel = MAX2(newlevel, level + itA->node->ancestor_count);
}
return newlevel;
@@ -1042,22 +1044,22 @@ static void dag_check_cycle(DagForest *dag)
/* debugging print */
if (dag_print_dependencies)
- for (node = dag->DagNode.first; node; node= node->next)
+ for (node = dag->DagNode.first; node; node = node->next)
dag_node_print_dependencies(node);
/* tag nodes unchecked */
- for (node = dag->DagNode.first; node; node= node->next)
- node->color= DAG_WHITE;
+ for (node = dag->DagNode.first; node; node = node->next)
+ node->color = DAG_WHITE;
- for (node = dag->DagNode.first; node; node= node->next) {
- if (node->color==DAG_WHITE) {
- node->ancestor_count= dag_node_recurs_level(node, 0);
+ for (node = dag->DagNode.first; node; node = node->next) {
+ if (node->color == DAG_WHITE) {
+ node->ancestor_count = dag_node_recurs_level(node, 0);
}
}
/* check relations, and print errors */
- for (node = dag->DagNode.first; node; node= node->next) {
- for (itA= node->parent; itA; itA= itA->next) {
+ for (node = dag->DagNode.first; node; node = node->next) {
+ for (itA = node->parent; itA; itA = itA->next) {
if (itA->node->ancestor_count > node->ancestor_count) {
if (node->ob && itA->node->ob) {
printf("Dependency cycle detected:\n");
@@ -1068,7 +1070,7 @@ static void dag_check_cycle(DagForest *dag)
}
/* parent relations are only needed for cycle checking, so free now */
- for (node = dag->DagNode.first; node; node= node->next) {
+ for (node = dag->DagNode.first; node; node = node->next) {
while (node->parent) {
itA = node->parent->next;
MEM_freeN(node->parent);
@@ -1081,7 +1083,7 @@ static void dag_check_cycle(DagForest *dag)
* MainDAG is the DAG of all objects in current scene
* used only for drawing there is one also in each scene
*/
-static DagForest * MainDag = NULL;
+static DagForest *MainDag = NULL;
DagForest *getMainDag(void)
{
@@ -1118,9 +1120,9 @@ void graph_bfs(void)
DagAdjList *itA;
int minheight;
- /* fprintf(stderr,"starting BFS\n ------------\n"); */
+ /* fprintf(stderr, "starting BFS\n ------------\n"); */
nqueue = queue_create(DAGQUEUEALLOC);
- for ( i=0; i<50; i++)
+ for (i = 0; i < 50; i++)
pos[i] = 0;
/* Init
@@ -1138,7 +1140,7 @@ void graph_bfs(void)
if (node->color == DAG_WHITE) {
node->color = DAG_GRAY;
node->BFS_dist = 1;
- push_queue(nqueue,node);
+ push_queue(nqueue, node);
while (nqueue->count) {
node = pop_queue(nqueue);
@@ -1149,27 +1151,27 @@ void graph_bfs(void)
itA->node->color = DAG_GRAY;
itA->node->BFS_dist = node->BFS_dist + 1;
itA->node->k = (float) minheight;
- push_queue(nqueue,itA->node);
+ push_queue(nqueue, itA->node);
}
else {
- fprintf(stderr,"bfs not dag tree edge color :%i\n",itA->node->color);
+ fprintf(stderr, "bfs not dag tree edge color :%i\n", itA->node->color);
}
itA = itA->next;
}
- if (pos[node->BFS_dist] > node->k ) {
+ if (pos[node->BFS_dist] > node->k) {
pos[node->BFS_dist] += 1;
node->k = (float) pos[node->BFS_dist];
}
else {
- pos[node->BFS_dist] = (int) node->k +1;
+ pos[node->BFS_dist] = (int) node->k + 1;
}
- set_node_xy(node, node->BFS_dist*DEPSX*2, pos[node->BFS_dist]*DEPSY*2);
+ set_node_xy(node, node->BFS_dist * DEPSX * 2, pos[node->BFS_dist] * DEPSY * 2);
node->color = DAG_BLACK;
- // fprintf(stderr,"BFS node : %20s %i %5.0f %5.0f\n",((ID *) node->ob)->name,node->BFS_dist, node->x, node->y);
+ // fprintf(stderr, "BFS node : %20s %i %5.0f %5.0f\n", ((ID *) node->ob)->name, node->BFS_dist, node->x, node->y);
}
}
queue_delete(nqueue);
@@ -1189,8 +1191,8 @@ int pre_and_post_source_BFS(DagForest *dag, short mask, DagNode *source, graph_a
DagNode *node;
DagNodeQueue *nqueue;
DagAdjList *itA;
- int retval = 0;
- /* fprintf(stderr,"starting BFS\n ------------\n"); */
+ int retval = 0;
+ /* fprintf(stderr, "starting BFS\n ------------\n"); */
/* Init
* dagnode.first is always the root (scene)
@@ -1207,7 +1209,7 @@ int pre_and_post_source_BFS(DagForest *dag, short mask, DagNode *source, graph_a
if (node->color == DAG_WHITE) {
node->color = DAG_GRAY;
node->BFS_dist = 1;
- pre_func(node->ob,data);
+ pre_func(node->ob, data);
while (nqueue->count) {
node = pop_queue(nqueue);
@@ -1217,8 +1219,8 @@ int pre_and_post_source_BFS(DagForest *dag, short mask, DagNode *source, graph_a
if ((itA->node->color == DAG_WHITE) && (itA->type & mask)) {
itA->node->color = DAG_GRAY;
itA->node->BFS_dist = node->BFS_dist + 1;
- push_queue(nqueue,itA->node);
- pre_func(node->ob,data);
+ push_queue(nqueue, itA->node);
+ pre_func(node->ob, data);
}
else { // back or cross edge
@@ -1226,10 +1228,10 @@ int pre_and_post_source_BFS(DagForest *dag, short mask, DagNode *source, graph_a
}
itA = itA->next;
}
- post_func(node->ob,data);
+ post_func(node->ob, data);
node->color = DAG_BLACK;
- // fprintf(stderr,"BFS node : %20s %i %5.0f %5.0f\n",((ID *) node->ob)->name,node->BFS_dist, node->x, node->y);
+ // fprintf(stderr, "BFS node : %20s %i %5.0f %5.0f\n", ((ID *) node->ob)->name, node->BFS_dist, node->x, node->y);
}
}
queue_delete(nqueue);
@@ -1237,7 +1239,7 @@ int pre_and_post_source_BFS(DagForest *dag, short mask, DagNode *source, graph_a
}
/* non recursive version of DFS, return queue -- outer loop present to catch odd cases (first level cycles)*/
-DagNodeQueue * graph_dfs(void)
+DagNodeQueue *graph_dfs(void)
{
DagNode *node;
DagNodeQueue *nqueue;
@@ -1248,14 +1250,14 @@ DagNodeQueue * graph_dfs(void)
int time;
int skip = 0;
int minheight;
- int maxpos=0;
+ int maxpos = 0;
/* int is_cycle = 0; */ /* UNUSED */
/*
- *fprintf(stderr,"starting DFS\n ------------\n");
+ *fprintf(stderr, "starting DFS\n ------------\n");
*/
nqueue = queue_create(DAGQUEUEALLOC);
retqueue = queue_create(MainDag->numNodes);
- for ( i=0; i<50; i++)
+ for (i = 0; i < 50; i++)
pos[i] = 0;
/* Init
@@ -1275,89 +1277,89 @@ DagNodeQueue * graph_dfs(void)
node = MainDag->DagNode.first;
do {
- if (node->color == DAG_WHITE) {
- node->color = DAG_GRAY;
- node->DFS_dist = 1;
- node->DFS_dvtm = time;
- time++;
- push_stack(nqueue,node);
+ if (node->color == DAG_WHITE) {
+ node->color = DAG_GRAY;
+ node->DFS_dist = 1;
+ node->DFS_dvtm = time;
+ time++;
+ push_stack(nqueue, node);
- while (nqueue->count) {
- //graph_print_queue(nqueue);
+ while (nqueue->count) {
+ //graph_print_queue(nqueue);
- skip = 0;
- node = get_top_node_queue(nqueue);
+ skip = 0;
+ node = get_top_node_queue(nqueue);
- minheight = pos[node->DFS_dist];
+ minheight = pos[node->DFS_dist];
- itA = node->child;
- while (itA != NULL) {
- if (itA->node->color == DAG_WHITE) {
- itA->node->DFS_dvtm = time;
- itA->node->color = DAG_GRAY;
+ itA = node->child;
+ while (itA != NULL) {
+ if (itA->node->color == DAG_WHITE) {
+ itA->node->DFS_dvtm = time;
+ itA->node->color = DAG_GRAY;
- time++;
- itA->node->DFS_dist = node->DFS_dist + 1;
- itA->node->k = (float) minheight;
- push_stack(nqueue,itA->node);
- skip = 1;
- break;
- }
- else {
- if (itA->node->color == DAG_GRAY) { // back edge
- fprintf(stderr,"dfs back edge :%15s %15s\n",((ID *) node->ob)->name, ((ID *) itA->node->ob)->name);
- /* is_cycle = 1; */ /* UNUSED */
+ time++;
+ itA->node->DFS_dist = node->DFS_dist + 1;
+ itA->node->k = (float) minheight;
+ push_stack(nqueue, itA->node);
+ skip = 1;
+ break;
}
- else if (itA->node->color == DAG_BLACK) {
- /* already processed node but we may want later to change distance either to shorter to longer.
- * DFS_dist is the first encounter
- */
+ else {
+ if (itA->node->color == DAG_GRAY) { // back edge
+ fprintf(stderr, "dfs back edge :%15s %15s\n", ((ID *) node->ob)->name, ((ID *) itA->node->ob)->name);
+ /* is_cycle = 1; */ /* UNUSED */
+ }
+ else if (itA->node->color == DAG_BLACK) {
+ /* already processed node but we may want later to change distance either to shorter to longer.
+ * DFS_dist is the first encounter
+ */
#if 0
- if (node->DFS_dist >= itA->node->DFS_dist)
- itA->node->DFS_dist = node->DFS_dist + 1;
-
- fprintf(stderr,"dfs forward or cross edge :%15s %i-%i %15s %i-%i\n",
- ((ID *) node->ob)->name,
- node->DFS_dvtm,
- node->DFS_fntm,
- ((ID *) itA->node->ob)->name,
- itA->node->DFS_dvtm,
- itA->node->DFS_fntm);
+ if (node->DFS_dist >= itA->node->DFS_dist)
+ itA->node->DFS_dist = node->DFS_dist + 1;
+
+ fprintf(stderr, "dfs forward or cross edge :%15s %i-%i %15s %i-%i\n",
+ ((ID *) node->ob)->name,
+ node->DFS_dvtm,
+ node->DFS_fntm,
+ ((ID *) itA->node->ob)->name,
+ itA->node->DFS_dvtm,
+ itA->node->DFS_fntm);
#endif
+ }
+ else
+ fprintf(stderr, "dfs unknown edge\n");
}
- else
- fprintf(stderr,"dfs unknown edge\n");
+ itA = itA->next;
}
- itA = itA->next;
- }
- if (!skip) {
- node = pop_queue(nqueue);
- node->color = DAG_BLACK;
+ if (!skip) {
+ node = pop_queue(nqueue);
+ node->color = DAG_BLACK;
- node->DFS_fntm = time;
- time++;
- if (node->DFS_dist > maxpos)
- maxpos = node->DFS_dist;
- if (pos[node->DFS_dist] > node->k ) {
- pos[node->DFS_dist] += 1;
- node->k = (float) pos[node->DFS_dist];
- }
- else {
- pos[node->DFS_dist] = (int) node->k +1;
- }
- set_node_xy(node, node->DFS_dist*DEPSX*2, pos[node->DFS_dist]*DEPSY*2);
+ node->DFS_fntm = time;
+ time++;
+ if (node->DFS_dist > maxpos)
+ maxpos = node->DFS_dist;
+ if (pos[node->DFS_dist] > node->k) {
+ pos[node->DFS_dist] += 1;
+ node->k = (float) pos[node->DFS_dist];
+ }
+ else {
+ pos[node->DFS_dist] = (int) node->k + 1;
+ }
+ set_node_xy(node, node->DFS_dist * DEPSX * 2, pos[node->DFS_dist] * DEPSY * 2);
- // fprintf(stderr,"DFS node : %20s %i %i %i %i\n",((ID *) node->ob)->name,node->BFS_dist, node->DFS_dist, node->DFS_dvtm, node->DFS_fntm );
+ // fprintf(stderr, "DFS node : %20s %i %i %i %i\n", ((ID *) node->ob)->name, node->BFS_dist, node->DFS_dist, node->DFS_dvtm, node->DFS_fntm );
- push_stack(retqueue,node);
+ push_stack(retqueue, node);
+ }
}
}
- }
node = node->next;
} while (node);
-// fprintf(stderr,"i size : %i\n", maxpos);
+// fprintf(stderr, "i size : %i\n", maxpos);
queue_delete(nqueue);
return(retqueue);
@@ -1381,7 +1383,7 @@ int pre_and_post_source_DFS(DagForest *dag, short mask, DagNode *source, graph_a
int skip = 0;
int retval = 0;
/*
- *fprintf(stderr,"starting DFS\n ------------\n");
+ * fprintf(stderr, "starting DFS\n ------------\n");
*/
nqueue = queue_create(DAGQUEUEALLOC);
@@ -1406,8 +1408,8 @@ int pre_and_post_source_DFS(DagForest *dag, short mask, DagNode *source, graph_a
node->DFS_dist = 1;
node->DFS_dvtm = time;
time++;
- push_stack(nqueue,node);
- pre_func(node->ob,data);
+ push_stack(nqueue, node);
+ pre_func(node->ob, data);
while (nqueue->count) {
skip = 0;
@@ -1421,14 +1423,14 @@ int pre_and_post_source_DFS(DagForest *dag, short mask, DagNode *source, graph_a
time++;
itA->node->DFS_dist = node->DFS_dist + 1;
- push_stack(nqueue,itA->node);
- pre_func(node->ob,data);
+ push_stack(nqueue, itA->node);
+ pre_func(node->ob, data);
skip = 1;
break;
}
else {
- if (itA->node->color == DAG_GRAY) {// back edge
+ if (itA->node->color == DAG_GRAY) { // back edge
retval = 1;
}
// else if (itA->node->color == DAG_BLACK) { // cross or forward
@@ -1444,7 +1446,7 @@ int pre_and_post_source_DFS(DagForest *dag, short mask, DagNode *source, graph_a
node->DFS_fntm = time;
time++;
- post_func(node->ob,data);
+ post_func(node->ob, data);
}
}
}
@@ -1456,19 +1458,18 @@ int pre_and_post_source_DFS(DagForest *dag, short mask, DagNode *source, graph_a
// used to get the obs owning a datablock
-struct DagNodeQueue *get_obparents(struct DagForest *dag, void *ob)
-{
- DagNode * node, *node1;
+struct DagNodeQueue *get_obparents(struct DagForest *dag, void *ob){
+ DagNode *node, *node1;
DagNodeQueue *nqueue;
DagAdjList *itA;
- node = dag_find_node(dag,ob);
- if (node==NULL) {
+ node = dag_find_node(dag, ob);
+ if (node == NULL) {
return NULL;
}
else if (node->ancestor_count == 1) { // simple case
nqueue = queue_create(1);
- push_queue(nqueue,node);
+ push_queue(nqueue, node);
}
else { /* need to go over the whole dag for adj list */
nqueue = queue_create(node->ancestor_count);
@@ -1479,7 +1480,7 @@ struct DagNodeQueue *get_obparents(struct DagForest *dag, void *ob)
itA = node->child;
while (itA != NULL) {
if ((itA->node == node) && (itA->type == DAG_RL_DATA)) {
- push_queue(nqueue,node);
+ push_queue(nqueue, node);
}
itA = itA->next;
}
@@ -1490,13 +1491,12 @@ struct DagNodeQueue *get_obparents(struct DagForest *dag, void *ob)
return nqueue;
}
-struct DagNodeQueue *get_first_ancestors(struct DagForest *dag, void *ob)
-{
- DagNode * node, *node1;
+struct DagNodeQueue *get_first_ancestors(struct DagForest *dag, void *ob){
+ DagNode *node, *node1;
DagNodeQueue *nqueue;
DagAdjList *itA;
- node = dag_find_node(dag,ob);
+ node = dag_find_node(dag, ob);
// need to go over the whole dag for adj list
nqueue = queue_create(node->ancestor_count);
@@ -1507,7 +1507,7 @@ struct DagNodeQueue *get_first_ancestors(struct DagForest *dag, void *ob)
itA = node->child;
while (itA != NULL) {
if (itA->node == node) {
- push_queue(nqueue,node);
+ push_queue(nqueue, node);
}
itA = itA->next;
}
@@ -1519,8 +1519,7 @@ struct DagNodeQueue *get_first_ancestors(struct DagForest *dag, void *ob)
}
// standard DFS list
-struct DagNodeQueue *get_all_childs(struct DagForest *dag, void *ob)
-{
+struct DagNodeQueue *get_all_childs(struct DagForest *dag, void *ob){
DagNode *node;
DagNodeQueue *nqueue;
DagNodeQueue *retqueue;
@@ -1544,7 +1543,7 @@ struct DagNodeQueue *get_all_childs(struct DagForest *dag, void *ob)
node->color = DAG_GRAY;
time++;
- push_stack(nqueue,node);
+ push_stack(nqueue, node);
while (nqueue->count) {
@@ -1558,7 +1557,7 @@ struct DagNodeQueue *get_all_childs(struct DagForest *dag, void *ob)
itA->node->color = DAG_GRAY;
time++;
- push_stack(nqueue,itA->node);
+ push_stack(nqueue, itA->node);
skip = 1;
break;
}
@@ -1570,7 +1569,7 @@ struct DagNodeQueue *get_all_childs(struct DagForest *dag, void *ob)
node->color = DAG_BLACK;
time++;
- push_stack(retqueue,node);
+ push_stack(retqueue, node);
}
}
}
@@ -1580,9 +1579,9 @@ struct DagNodeQueue *get_all_childs(struct DagForest *dag, void *ob)
/* unused */
#if 0
-short are_obs_related(struct DagForest *dag, void *ob1, void *ob2)
+short are_obs_related(struct DagForest *dag, void *ob1, void *ob2)
{
- DagNode * node;
+ DagNode *node;
DagAdjList *itA;
node = dag_find_node(dag, ob1);
@@ -1598,7 +1597,7 @@ short are_obs_related(struct DagForest *dag, void *ob1, void *ob2)
}
#endif
-int is_acyclic( DagForest *dag)
+int is_acyclic(DagForest *dag)
{
return dag->is_acyclic;
}
@@ -1618,10 +1617,10 @@ void graph_print_queue(DagNodeQueue *nqueue)
queueElem = nqueue->first;
while (queueElem) {
- fprintf(stderr,"** %s %i %i-%i ",((ID *) queueElem->node->ob)->name,queueElem->node->color,queueElem->node->DFS_dvtm,queueElem->node->DFS_fntm);
+ fprintf(stderr, "** %s %i %i-%i ", ((ID *) queueElem->node->ob)->name, queueElem->node->color, queueElem->node->DFS_dvtm, queueElem->node->DFS_fntm);
queueElem = queueElem->next;
}
- fprintf(stderr,"\n");
+ fprintf(stderr, "\n");
}
void graph_print_queue_dist(DagNodeQueue *nqueue)
@@ -1632,16 +1631,16 @@ void graph_print_queue_dist(DagNodeQueue *nqueue)
queueElem = nqueue->first;
count = 0;
while (queueElem) {
- fprintf(stderr,"** %25s %2.2i-%2.2i ",((ID *) queueElem->node->ob)->name,queueElem->node->DFS_dvtm,queueElem->node->DFS_fntm);
- while (count < queueElem->node->DFS_dvtm-1) { fputc(' ',stderr); count++;}
- fputc('|',stderr);
- while (count < queueElem->node->DFS_fntm-2) { fputc('-',stderr); count++;}
- fputc('|',stderr);
- fputc('\n',stderr);
+ fprintf(stderr, "** %25s %2.2i-%2.2i ", ((ID *) queueElem->node->ob)->name, queueElem->node->DFS_dvtm, queueElem->node->DFS_fntm);
+ while (count < queueElem->node->DFS_dvtm - 1) { fputc(' ', stderr); count++; }
+ fputc('|', stderr);
+ while (count < queueElem->node->DFS_fntm - 2) { fputc('-', stderr); count++; }
+ fputc('|', stderr);
+ fputc('\n', stderr);
count = 0;
queueElem = queueElem->next;
}
- fprintf(stderr,"\n");
+ fprintf(stderr, "\n");
}
void graph_print_adj_list(void)
@@ -1651,14 +1650,14 @@ void graph_print_adj_list(void)
node = (getMainDag())->DagNode.first;
while (node) {
- fprintf(stderr,"node : %s col: %i",((ID *) node->ob)->name, node->color);
+ fprintf(stderr, "node : %s col: %i", ((ID *) node->ob)->name, node->color);
itA = node->child;
while (itA) {
- fprintf(stderr,"-- %s ",((ID *) itA->node->ob)->name);
+ fprintf(stderr, "-- %s ", ((ID *) itA->node->ob)->name);
itA = itA->next;
}
- fprintf(stderr,"\n");
+ fprintf(stderr, "\n");
node = node->next;
}
}
@@ -1667,13 +1666,13 @@ void graph_print_adj_list(void)
/* mechanism to allow editors to be informed of depsgraph updates,
* to do their own updates based on changes... */
-static void (*EditorsUpdateIDCb)(Main *bmain, ID *id)= NULL;
-static void (*EditorsUpdateSceneCb)(Main *bmain, Scene *scene, int updated)= NULL;
+static void (*EditorsUpdateIDCb)(Main *bmain, ID *id) = NULL;
+static void (*EditorsUpdateSceneCb)(Main *bmain, Scene *scene, int updated) = NULL;
void DAG_editors_update_cb(void (*id_func)(Main *bmain, ID *id), void (*scene_func)(Main *bmain, Scene *scene, int updated))
{
- EditorsUpdateIDCb= id_func;
- EditorsUpdateSceneCb= scene_func;
+ EditorsUpdateIDCb = id_func;
+ EditorsUpdateSceneCb = scene_func;
}
static void dag_editors_id_update(Main *bmain, ID *id)
@@ -1697,37 +1696,37 @@ static void scene_sort_groups(Main *bmain, Scene *sce)
Object *ob;
/* test; are group objects all in this scene? */
- for (ob= bmain->object.first; ob; ob= ob->id.next) {
+ for (ob = bmain->object.first; ob; ob = ob->id.next) {
ob->id.flag &= ~LIB_DOIT;
- ob->id.newid= NULL; /* newid abuse for GroupObject */
+ ob->id.newid = NULL; /* newid abuse for GroupObject */
}
- for (base = sce->base.first; base; base= base->next)
+ for (base = sce->base.first; base; base = base->next)
base->object->id.flag |= LIB_DOIT;
- for (group= bmain->group.first; group; group= group->id.next) {
- for (go= group->gobject.first; go; go= go->next) {
- if ((go->ob->id.flag & LIB_DOIT)==0)
+ for (group = bmain->group.first; group; group = group->id.next) {
+ for (go = group->gobject.first; go; go = go->next) {
+ if ((go->ob->id.flag & LIB_DOIT) == 0)
break;
}
/* this group is entirely in this scene */
- if (go==NULL) {
- ListBase listb= {NULL, NULL};
+ if (go == NULL) {
+ ListBase listb = {NULL, NULL};
- for (go= group->gobject.first; go; go= go->next)
- go->ob->id.newid= (ID *)go;
+ for (go = group->gobject.first; go; go = go->next)
+ go->ob->id.newid = (ID *)go;
/* in order of sorted bases we reinsert group objects */
- for (base = sce->base.first; base; base= base->next) {
+ for (base = sce->base.first; base; base = base->next) {
if (base->object->id.newid) {
- go= (GroupObject *)base->object->id.newid;
- base->object->id.newid= NULL;
- BLI_remlink( &group->gobject, go);
- BLI_addtail( &listb, go);
+ go = (GroupObject *)base->object->id.newid;
+ base->object->id.newid = NULL;
+ BLI_remlink(&group->gobject, go);
+ BLI_addtail(&listb, go);
}
}
/* copy the newly sorted listbase */
- group->gobject= listb;
+ group->gobject = listb;
}
}
}
@@ -1743,7 +1742,7 @@ void DAG_scene_sort(Main *bmain, Scene *sce)
ListBase tempbase;
Base *base;
- tempbase.first= tempbase.last= NULL;
+ tempbase.first = tempbase.last = NULL;
build_dag(bmain, sce, DAG_RL_ALL_BUT_DATA);
@@ -1751,7 +1750,7 @@ void DAG_scene_sort(Main *bmain, Scene *sce)
nqueue = queue_create(DAGQUEUEALLOC);
- for (node = sce->theDag->DagNode.first; node; node= node->next) {
+ for (node = sce->theDag->DagNode.first; node; node = node->next) {
node->color = DAG_WHITE;
}
@@ -1760,7 +1759,7 @@ void DAG_scene_sort(Main *bmain, Scene *sce)
rootnode = sce->theDag->DagNode.first;
rootnode->color = DAG_GRAY;
time++;
- push_stack(nqueue,rootnode);
+ push_stack(nqueue, rootnode);
while (nqueue->count) {
@@ -1774,7 +1773,7 @@ void DAG_scene_sort(Main *bmain, Scene *sce)
itA->node->color = DAG_GRAY;
time++;
- push_stack(nqueue,itA->node);
+ push_stack(nqueue, itA->node);
skip = 1;
break;
}
@@ -1784,7 +1783,7 @@ void DAG_scene_sort(Main *bmain, Scene *sce)
if (!skip) {
if (node) {
node = pop_queue(nqueue);
- if (node->ob == sce) // we are done
+ if (node->ob == sce) // we are done
break;
node->color = DAG_BLACK;
@@ -1793,8 +1792,8 @@ void DAG_scene_sort(Main *bmain, Scene *sce)
while (base && base->object != node->ob)
base = base->next;
if (base) {
- BLI_remlink(&sce->base,base);
- BLI_addhead(&tempbase,base);
+ BLI_remlink(&sce->base, base);
+ BLI_addhead(&tempbase, base);
}
}
}
@@ -1803,10 +1802,10 @@ void DAG_scene_sort(Main *bmain, Scene *sce)
/* temporal correction for circular dependencies */
base = sce->base.first;
while (base) {
- BLI_remlink(&sce->base,base);
- BLI_addhead(&tempbase,base);
+ BLI_remlink(&sce->base, base);
+ BLI_addhead(&tempbase, base);
//if (G.debug & G_DEBUG)
- printf("cyclic %s\n", base->object->id.name);
+ printf("cyclic %s\n", base->object->id.name);
base = sce->base.first;
}
@@ -1818,12 +1817,12 @@ void DAG_scene_sort(Main *bmain, Scene *sce)
if (G.debug & G_DEBUG) {
printf("\nordered\n");
- for (base = sce->base.first; base; base= base->next) {
+ for (base = sce->base.first; base; base = base->next) {
printf(" %s\n", base->object->id.name);
}
}
/* temporal...? */
- sce->recalc |= SCE_PRV_CHANGED; /* test for 3d preview */
+ sce->recalc |= SCE_PRV_CHANGED; /* test for 3d preview */
}
static void lib_id_recalc_tag(Main *bmain, ID *id)
@@ -1841,26 +1840,26 @@ static void lib_id_recalc_data_tag(Main *bmain, ID *id)
/* node was checked to have lasttime != curtime and is if type ID_OB */
static void flush_update_node(DagNode *node, unsigned int layer, int curtime)
{
- Main *bmain= G.main;
+ Main *bmain = G.main;
DagAdjList *itA;
Object *ob, *obc;
- int oldflag, changed=0;
+ int oldflag, changed = 0;
unsigned int all_layer;
- node->lasttime= curtime;
+ node->lasttime = curtime;
- ob= node->ob;
+ ob = node->ob;
if (ob && (ob->recalc & OB_RECALC_ALL)) {
- all_layer= node->scelay;
+ all_layer = node->scelay;
/* got an object node that changes, now check relations */
- for (itA = node->child; itA; itA= itA->next) {
+ for (itA = node->child; itA; itA = itA->next) {
all_layer |= itA->lay;
/* the relationship is visible */
if ((itA->lay & layer)) { // XXX || (itA->node->ob == obedit)
- if (itA->node->type==ID_OB) {
- obc= itA->node->ob;
- oldflag= obc->recalc;
+ if (itA->node->type == ID_OB) {
+ obc = itA->node->ob;
+ oldflag = obc->recalc;
/* got a ob->obc relation, now check if flag needs flush */
if (ob->recalc & OB_RECALC_OB) {
@@ -1887,15 +1886,15 @@ static void flush_update_node(DagNode *node, unsigned int layer, int curtime)
lib_id_recalc_data_tag(bmain, &obc->id);
}
}
- if (oldflag!=obc->recalc) changed= 1;
+ if (oldflag != obc->recalc) changed = 1;
}
}
}
/* even nicer, we can clear recalc flags... */
- if ((all_layer & layer)==0) { // XXX && (ob != obedit)) {
+ if ((all_layer & layer) == 0) { // XXX && (ob != obedit)) {
/* but existing displaylists or derivedmesh should be freed */
if (ob->recalc & OB_RECALC_DATA)
- object_free_display(ob);
+ BKE_object_free_display(ob);
ob->recalc &= ~OB_RECALC_ALL;
}
@@ -1904,15 +1903,15 @@ static void flush_update_node(DagNode *node, unsigned int layer, int curtime)
/* check case where child changes and parent forcing obdata to change */
/* should be done regardless if this ob has recalc set */
/* could merge this in with loop above...? (ton) */
- for (itA = node->child; itA; itA= itA->next) {
+ for (itA = node->child; itA; itA = itA->next) {
/* the relationship is visible */
- if ((itA->lay & layer)) { // XXX || (itA->node->ob == obedit)
- if (itA->node->type==ID_OB) {
- obc= itA->node->ob;
+ if ((itA->lay & layer)) { // XXX || (itA->node->ob == obedit)
+ if (itA->node->type == ID_OB) {
+ obc = itA->node->ob;
/* child moves */
- if ((obc->recalc & OB_RECALC_ALL)==OB_RECALC_OB) {
+ if ((obc->recalc & OB_RECALC_ALL) == OB_RECALC_OB) {
/* parent has deforming info */
- if (itA->type & (DAG_RL_OB_DATA|DAG_RL_DATA_DATA)) {
+ if (itA->type & (DAG_RL_OB_DATA | DAG_RL_DATA_DATA)) {
// printf("parent %s changes ob %s\n", ob->id.name, obc->id.name);
obc->recalc |= OB_RECALC_DATA;
lib_id_recalc_data_tag(bmain, &obc->id);
@@ -1923,27 +1922,27 @@ static void flush_update_node(DagNode *node, unsigned int layer, int curtime)
}
/* we only go deeper if node not checked or something changed */
- for (itA = node->child; itA; itA= itA->next) {
- if (changed || itA->node->lasttime!=curtime)
+ for (itA = node->child; itA; itA = itA->next) {
+ if (changed || itA->node->lasttime != curtime)
flush_update_node(itA->node, layer, curtime);
}
}
-/* node was checked to have lasttime != curtime , and is of type ID_OB */
+/* node was checked to have lasttime != curtime, and is of type ID_OB */
static unsigned int flush_layer_node(Scene *sce, DagNode *node, int curtime)
{
DagAdjList *itA;
- node->lasttime= curtime;
- node->lay= node->scelay;
+ node->lasttime = curtime;
+ node->lay = node->scelay;
- for (itA = node->child; itA; itA= itA->next) {
- if (itA->node->type==ID_OB) {
- if (itA->node->lasttime!=curtime) {
- itA->lay= flush_layer_node(sce, itA->node, curtime); // lay is only set once for each relation
+ for (itA = node->child; itA; itA = itA->next) {
+ if (itA->node->type == ID_OB) {
+ if (itA->node->lasttime != curtime) {
+ itA->lay = flush_layer_node(sce, itA->node, curtime); // lay is only set once for each relation
}
- else itA->lay= itA->node->lay;
+ else itA->lay = itA->node->lay;
node->lay |= itA->lay;
}
@@ -1952,19 +1951,19 @@ static unsigned int flush_layer_node(Scene *sce, DagNode *node, int curtime)
return node->lay;
}
-/* node was checked to have lasttime != curtime , and is of type ID_OB */
+/* node was checked to have lasttime != curtime, and is of type ID_OB */
static void flush_pointcache_reset(Scene *scene, DagNode *node, int curtime, int reset)
{
- Main *bmain= G.main;
+ Main *bmain = G.main;
DagAdjList *itA;
Object *ob;
- node->lasttime= curtime;
+ node->lasttime = curtime;
- for (itA = node->child; itA; itA= itA->next) {
- if (itA->node->type==ID_OB) {
- if (itA->node->lasttime!=curtime) {
- ob= (Object*)(itA->node->ob);
+ for (itA = node->child; itA; itA = itA->next) {
+ if (itA->node->type == ID_OB) {
+ if (itA->node->lasttime != curtime) {
+ ob = (Object *)(itA->node->ob);
if (reset || (ob->recalc & OB_RECALC_ALL)) {
if (BKE_ptcache_object_reset(scene, ob, PTCACHE_RESET_DEPSGRAPH)) {
@@ -1989,18 +1988,18 @@ static void dag_scene_flush_layers(Scene *sce, int lay)
Base *base;
int lasttime;
- firstnode= sce->theDag->DagNode.first; // always scene node
+ firstnode = sce->theDag->DagNode.first; // always scene node
- for (itA = firstnode->child; itA; itA= itA->next)
- itA->lay= 0;
+ for (itA = firstnode->child; itA; itA = itA->next)
+ itA->lay = 0;
- sce->theDag->time++; // so we know which nodes were accessed
- lasttime= sce->theDag->time;
+ sce->theDag->time++; // so we know which nodes were accessed
+ lasttime = sce->theDag->time;
/* update layer flags in nodes */
- for (base= sce->base.first; base; base= base->next) {
- node= dag_get_node(sce->theDag, base->object);
- node->scelay= base->object->lay;
+ for (base = sce->base.first; base; base = base->next) {
+ node = dag_get_node(sce->theDag, base->object);
+ node->scelay = base->object->lay;
}
/* ensure cameras are set as if they are on a visible layer, because
@@ -2008,7 +2007,7 @@ static void dag_scene_flush_layers(Scene *sce, int lay)
*
* XXX, this wont work for local view / unlocked camera's */
if (sce->camera) {
- node= dag_get_node(sce->theDag, sce->camera);
+ node = dag_get_node(sce->theDag, sce->camera);
node->scelay |= lay;
}
@@ -2016,9 +2015,9 @@ static void dag_scene_flush_layers(Scene *sce, int lay)
{
TimeMarker *m;
- for (m= sce->markers.first; m; m= m->next) {
+ for (m = sce->markers.first; m; m = m->next) {
if (m->camera) {
- node= dag_get_node(sce->theDag, m->camera);
+ node = dag_get_node(sce->theDag, m->camera);
node->scelay |= lay;
}
}
@@ -2026,8 +2025,8 @@ static void dag_scene_flush_layers(Scene *sce, int lay)
#endif
/* flush layer nodes to dependencies */
- for (itA = firstnode->child; itA; itA= itA->next)
- if (itA->node->lasttime!=lasttime && itA->node->type==ID_OB)
+ for (itA = firstnode->child; itA; itA = itA->next)
+ if (itA->node->lasttime != lasttime && itA->node->type == ID_OB)
flush_layer_node(sce, itA->node, lasttime);
}
@@ -2036,16 +2035,16 @@ static void dag_tag_renderlayers(Scene *sce, unsigned int lay)
if (sce->nodetree) {
bNode *node;
Base *base;
- unsigned int lay_changed= 0;
+ unsigned int lay_changed = 0;
- for (base= sce->base.first; base; base= base->next)
+ for (base = sce->base.first; base; base = base->next)
if (base->lay & lay)
if (base->object->recalc)
lay_changed |= base->lay;
- for (node= sce->nodetree->nodes.first; node; node= node->next) {
- if (node->id==(ID *)sce) {
- SceneRenderLayer *srl= BLI_findlink(&sce->r.layers, node->custom1);
+ for (node = sce->nodetree->nodes.first; node; node = node->next) {
+ if (node->id == (ID *)sce) {
+ SceneRenderLayer *srl = BLI_findlink(&sce->r.layers, node->custom1);
if (srl && (srl->lay & lay_changed))
nodeUpdate(sce->nodetree, node);
}
@@ -2061,30 +2060,30 @@ void DAG_scene_flush_update(Main *bmain, Scene *sce, unsigned int lay, const sho
Object *ob;
int lasttime;
- if (sce->theDag==NULL) {
+ if (sce->theDag == NULL) {
printf("DAG zero... not allowed to happen!\n");
DAG_scene_sort(bmain, sce);
}
- firstnode= sce->theDag->DagNode.first; // always scene node
+ firstnode = sce->theDag->DagNode.first; // always scene node
/* first we flush the layer flags */
dag_scene_flush_layers(sce, lay);
/* then we use the relationships + layer info to flush update events */
- sce->theDag->time++; // so we know which nodes were accessed
- lasttime= sce->theDag->time;
- for (itA = firstnode->child; itA; itA= itA->next)
- if (itA->node->lasttime!=lasttime && itA->node->type==ID_OB)
+ sce->theDag->time++; // so we know which nodes were accessed
+ lasttime = sce->theDag->time;
+ for (itA = firstnode->child; itA; itA = itA->next)
+ if (itA->node->lasttime != lasttime && itA->node->type == ID_OB)
flush_update_node(itA->node, lay, lasttime);
/* if update is not due to time change, do pointcache clears */
if (!time) {
- sce->theDag->time++; // so we know which nodes were accessed
- lasttime= sce->theDag->time;
- for (itA = firstnode->child; itA; itA= itA->next) {
- if (itA->node->lasttime!=lasttime && itA->node->type==ID_OB) {
- ob= (Object*)(itA->node->ob);
+ sce->theDag->time++; // so we know which nodes were accessed
+ lasttime = sce->theDag->time;
+ for (itA = firstnode->child; itA; itA = itA->next) {
+ if (itA->node->lasttime != lasttime && itA->node->type == ID_OB) {
+ ob = (Object *)(itA->node->ob);
if (ob->recalc & OB_RECALC_ALL) {
if (BKE_ptcache_object_reset(sce, ob, PTCACHE_RESET_DEPSGRAPH)) {
@@ -2108,7 +2107,7 @@ static int object_modifiers_use_time(Object *ob)
ModifierData *md;
/* check if a modifier in modifier stack needs time input */
- for (md=ob->modifiers.first; md; md=md->next)
+ for (md = ob->modifiers.first; md; md = md->next)
if (modifier_dependsOnTime(md))
return 1;
@@ -2147,14 +2146,14 @@ static short animdata_use_time(AnimData *adt)
{
NlaTrack *nlt;
- if (adt==NULL) return 0;
+ if (adt == NULL) return 0;
/* check action - only if assigned, and it has anim curves */
if (adt->action && adt->action->curves.first)
return 1;
/* check NLA tracks + strips */
- for (nlt= adt->nla_tracks.first; nlt; nlt= nlt->next) {
+ for (nlt = adt->nla_tracks.first; nlt; nlt = nlt->next) {
if (nlt->strips.first)
return 1;
}
@@ -2183,8 +2182,8 @@ static void dag_object_time_update_flags(Object *ob)
{
if (ob->constraints.first) {
bConstraint *con;
- for (con = ob->constraints.first; con; con=con->next) {
- bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
+ for (con = ob->constraints.first; con; con = con->next) {
+ bConstraintTypeInfo *cti = constraint_get_typeinfo(con);
ListBase targets = {NULL, NULL};
bConstraintTarget *ct;
@@ -2196,7 +2195,7 @@ static void dag_object_time_update_flags(Object *ob)
else if (cti->get_constraint_targets) {
cti->get_constraint_targets(con, &targets);
- for (ct= targets.first; ct; ct= ct->next) {
+ for (ct = targets.first; ct; ct = ct->next) {
if (ct->tar) {
ob->recalc |= OB_RECALC_OB;
break;
@@ -2213,7 +2212,7 @@ static void dag_object_time_update_flags(Object *ob)
if (ob->parent) {
/* motion path or bone child */
- if (ob->parent->type==OB_CURVE || ob->parent->type==OB_ARMATURE) ob->recalc |= OB_RECALC_OB;
+ if (ob->parent->type == OB_CURVE || ob->parent->type == OB_ARMATURE) ob->recalc |= OB_RECALC_OB;
}
#if 0 // XXX old animation system
@@ -2221,7 +2220,7 @@ static void dag_object_time_update_flags(Object *ob)
if (ob->dup_group) {
bActionStrip *strip;
/* this case is for groups with nla, whilst nla target has no action or nla */
- for (strip= ob->nlastrips.first; strip; strip= strip->next) {
+ for (strip = ob->nlastrips.first; strip; strip = strip->next) {
if (strip->object)
strip->object->recalc |= OB_RECALC_ALL;
}
@@ -2234,20 +2233,20 @@ static void dag_object_time_update_flags(Object *ob)
ob->adt->recalc |= ADT_RECALC_ANIM;
}
- if ((ob->adt) && (ob->type==OB_ARMATURE)) ob->recalc |= OB_RECALC_DATA;
+ if ((ob->adt) && (ob->type == OB_ARMATURE)) ob->recalc |= OB_RECALC_DATA;
if (object_modifiers_use_time(ob)) ob->recalc |= OB_RECALC_DATA;
if ((ob->pose) && (ob->pose->flag & POSE_CONSTRAINTS_TIMEDEPEND)) ob->recalc |= OB_RECALC_DATA;
{
- AnimData *adt= BKE_animdata_from_id((ID *)ob->data);
+ AnimData *adt = BKE_animdata_from_id((ID *)ob->data);
Mesh *me;
Curve *cu;
Lattice *lt;
- switch(ob->type) {
+ switch (ob->type) {
case OB_MESH:
- me= ob->data;
+ me = ob->data;
if (me->key) {
if (!(ob->shapeflag & OB_SHAPE_LOCK)) {
ob->recalc |= OB_RECALC_DATA;
@@ -2258,7 +2257,7 @@ static void dag_object_time_update_flags(Object *ob)
break;
case OB_CURVE:
case OB_SURF:
- cu= ob->data;
+ cu = ob->data;
if (cu->key) {
if (!(ob->shapeflag & OB_SHAPE_LOCK)) {
ob->recalc |= OB_RECALC_DATA;
@@ -2266,18 +2265,18 @@ static void dag_object_time_update_flags(Object *ob)
}
break;
case OB_FONT:
- cu= ob->data;
- if (cu->nurb.first==NULL && cu->str && cu->vfont)
+ cu = ob->data;
+ if (cu->nurb.first == NULL && cu->str && cu->vfont)
ob->recalc |= OB_RECALC_DATA;
break;
case OB_LATTICE:
- lt= ob->data;
+ lt = ob->data;
if (lt->key) {
if (!(ob->shapeflag & OB_SHAPE_LOCK)) {
ob->recalc |= OB_RECALC_DATA;
}
}
- break;
+ break;
case OB_MBALL:
if (ob->transflag & OB_DUPLI) ob->recalc |= OB_RECALC_DATA;
break;
@@ -2289,9 +2288,9 @@ static void dag_object_time_update_flags(Object *ob)
}
if (ob->particlesystem.first) {
- ParticleSystem *psys= ob->particlesystem.first;
+ ParticleSystem *psys = ob->particlesystem.first;
- for (; psys; psys=psys->next) {
+ for (; psys; psys = psys->next) {
if (psys_check_enabled(ob, psys)) {
ob->recalc |= OB_RECALC_DATA;
break;
@@ -2318,7 +2317,7 @@ void DAG_scene_update_flags(Main *bmain, Scene *scene, unsigned int lay, const s
/* set ob flags where animated systems are */
for (SETLOOPER(scene, sce_iter, base)) {
- ob= base->object;
+ ob = base->object;
if (do_time) {
/* now if DagNode were part of base, the node->lay could be checked... */
@@ -2333,22 +2332,22 @@ void DAG_scene_update_flags(Main *bmain, Scene *scene, unsigned int lay, const s
if (do_time) {
/* we do groups each once */
- for (group= bmain->group.first; group; group= group->id.next) {
+ for (group = bmain->group.first; group; group = group->id.next) {
if (group->id.flag & LIB_DOIT) {
- for (go= group->gobject.first; go; go= go->next) {
+ for (go = group->gobject.first; go; go = go->next) {
dag_object_time_update_flags(go->ob);
}
}
}
}
- for (sce_iter= scene; sce_iter; sce_iter= sce_iter->set)
+ for (sce_iter = scene; sce_iter; sce_iter = sce_iter->set)
DAG_scene_flush_update(bmain, sce_iter, lay, 1);
if (do_time) {
/* test: set time flag, to disable baked systems to update */
for (SETLOOPER(scene, sce_iter, base)) {
- ob= base->object;
+ ob = base->object;
if (ob->recalc)
ob->recalc |= OB_RECALC_TIME;
}
@@ -2359,10 +2358,10 @@ void DAG_scene_update_flags(Main *bmain, Scene *scene, unsigned int lay, const s
}
/* and store the info in groupobject */
- for (group= bmain->group.first; group; group= group->id.next) {
+ for (group = bmain->group.first; group; group = group->id.next) {
if (group->id.flag & LIB_DOIT) {
- for (go= group->gobject.first; go; go= go->next) {
- go->recalc= go->ob->recalc;
+ for (go = group->gobject.first; go; go = go->next) {
+ go->recalc = go->ob->recalc;
// printf("ob %s recalc %d\n", go->ob->id.name, go->recalc);
}
group->id.flag &= ~LIB_DOIT;
@@ -2379,22 +2378,22 @@ static void dag_current_scene_layers(Main *bmain, Scene **sce, unsigned int *lay
/* only one scene supported currently, making more scenes work
* correctly requires changes beyond just the dependency graph */
- *sce= NULL;
- *lay= 0;
+ *sce = NULL;
+ *lay = 0;
- if ((wm= bmain->wm.first)) {
+ if ((wm = bmain->wm.first)) {
/* if we have a windowmanager, look into windows */
- for (win=wm->windows.first; win; win=win->next) {
+ for (win = wm->windows.first; win; win = win->next) {
if (win->screen) {
- if (!*sce) *sce= win->screen->scene;
+ if (!*sce) *sce = win->screen->scene;
*lay |= BKE_screen_visible_layers(win->screen, win->screen->scene);
}
}
}
else {
/* if not, use the first sce */
- *sce= bmain->scene.first;
- if (*sce) *lay= (*sce)->lay;
+ *sce = bmain->scene.first;
+ if (*sce) *lay = (*sce)->lay;
/* XXX for background mode, we should get the scene
* from somewhere, for the -S option, but it's in
@@ -2434,9 +2433,9 @@ void DAG_on_visible_update(Main *bmain, const short do_time)
dag_scene_flush_layers(scene, lay);
for (SETLOOPER(scene, sce_iter, base)) {
- ob= base->object;
- node= (sce_iter->theDag)? dag_get_node(sce_iter->theDag, ob): NULL;
- oblay= (node)? node->lay: ob->lay;
+ ob = base->object;
+ node = (sce_iter->theDag) ? dag_get_node(sce_iter->theDag, ob) : NULL;
+ oblay = (node) ? node->lay : ob->lay;
if ((oblay & lay) & ~scene->lay_updated) {
if (ELEM6(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_MBALL, OB_LATTICE))
@@ -2446,9 +2445,9 @@ void DAG_on_visible_update(Main *bmain, const short do_time)
}
}
- for (group= bmain->group.first; group; group= group->id.next) {
+ for (group = bmain->group.first; group; group = group->id.next) {
if (group->id.flag & LIB_DOIT) {
- for (go= group->gobject.first; go; go= go->next) {
+ for (go = group->gobject.first; go; go = go->next) {
if (ELEM6(go->ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_MBALL, OB_LATTICE))
go->ob->recalc |= OB_RECALC_DATA;
if (go->ob->proxy_from)
@@ -2472,7 +2471,7 @@ static void dag_id_flush_update__isDependentTexture(void *userData, Object *UNUS
{
struct { ID *id; int is_dependent; } *data = userData;
- if (*idpoin && GS((*idpoin)->name)==ID_TE) {
+ if (*idpoin && GS((*idpoin)->name) == ID_TE) {
if (data->id == (*idpoin))
data->is_dependent = 1;
}
@@ -2480,8 +2479,8 @@ static void dag_id_flush_update__isDependentTexture(void *userData, Object *UNUS
static void dag_id_flush_update(Scene *sce, ID *id)
{
- Main *bmain= G.main;
- Object *obt, *ob= NULL;
+ Main *bmain = G.main;
+ Object *obt, *ob = NULL;
short idtype;
/* here we flush a few things before actual scene wide flush, mostly
@@ -2489,27 +2488,27 @@ static void dag_id_flush_update(Scene *sce, ID *id)
/* set flags & pointcache for object */
if (GS(id->name) == ID_OB) {
- ob= (Object*)id;
+ ob = (Object *)id;
BKE_ptcache_object_reset(sce, ob, PTCACHE_RESET_DEPSGRAPH);
if (ob->recalc & OB_RECALC_DATA) {
/* all users of this ob->data should be checked */
- id= ob->data;
+ id = ob->data;
/* no point in trying in this cases */
if (id && id->us <= 1) {
dag_editors_id_update(bmain, id);
- id= NULL;
+ id = NULL;
}
}
}
/* set flags & pointcache for object data */
if (id) {
- idtype= GS(id->name);
+ idtype = GS(id->name);
if (ELEM8(idtype, ID_ME, ID_CU, ID_MB, ID_LA, ID_LT, ID_CA, ID_AR, ID_SPK)) {
- for (obt=bmain->object.first; obt; obt= obt->id.next) {
+ for (obt = bmain->object.first; obt; obt = obt->id.next) {
if (!(ob && obt == ob) && obt->data == id) {
obt->recalc |= OB_RECALC_DATA;
lib_id_recalc_data_tag(bmain, &obt->id);
@@ -2520,10 +2519,10 @@ static void dag_id_flush_update(Scene *sce, ID *id)
/* set flags based on textures - can influence depgraph via modifiers */
if (idtype == ID_TE) {
- for (obt=bmain->object.first; obt; obt= obt->id.next) {
+ for (obt = bmain->object.first; obt; obt = obt->id.next) {
struct { ID *id; int is_dependent; } data;
- data.id= id;
- data.is_dependent= 0;
+ data.id = id;
+ data.is_dependent = 0;
modifiers_foreachIDLink(obt, dag_id_flush_update__isDependentTexture, &data);
if (data.is_dependent) {
@@ -2536,11 +2535,11 @@ static void dag_id_flush_update(Scene *sce, ID *id)
ParticleSystem *psys = obt->particlesystem.first;
MTex **mtexp, *mtex;
int a;
- for (; psys; psys=psys->next) {
+ for (; psys; psys = psys->next) {
mtexp = psys->part->mtex;
- for (a=0; a<MAX_MTEX; a++, mtexp++) {
+ for (a = 0; a < MAX_MTEX; a++, mtexp++) {
mtex = *mtexp;
- if (mtex && mtex->tex == (Tex*)id) {
+ if (mtex && mtex->tex == (Tex *)id) {
obt->recalc |= OB_RECALC_DATA;
lib_id_recalc_data_tag(bmain, &obt->id);
@@ -2559,10 +2558,10 @@ static void dag_id_flush_update(Scene *sce, ID *id)
/* set flags based on ShapeKey */
if (idtype == ID_KE) {
- for (obt=bmain->object.first; obt; obt= obt->id.next) {
- Key *key= ob_get_key(obt);
+ for (obt = bmain->object.first; obt; obt = obt->id.next) {
+ Key *key = ob_get_key(obt);
if (!(ob && obt == ob) && ((ID *)key == id)) {
- obt->flag |= (OB_RECALC_OB|OB_RECALC_DATA);
+ obt->flag |= (OB_RECALC_OB | OB_RECALC_DATA);
lib_id_recalc_tag(bmain, &obt->id);
lib_id_recalc_data_tag(bmain, &obt->id);
BKE_ptcache_object_reset(sce, obt, PTCACHE_RESET_DEPSGRAPH);
@@ -2573,19 +2572,23 @@ static void dag_id_flush_update(Scene *sce, ID *id)
/* set flags based on particle settings */
if (idtype == ID_PA) {
ParticleSystem *psys;
- for (obt=bmain->object.first; obt; obt= obt->id.next)
- for (psys=obt->particlesystem.first; psys; psys=psys->next)
+ for (obt = bmain->object.first; obt; obt = obt->id.next)
+ for (psys = obt->particlesystem.first; psys; psys = psys->next)
if (&psys->part->id == id)
BKE_ptcache_object_reset(sce, obt, PTCACHE_RESET_DEPSGRAPH);
}
if (idtype == ID_MC) {
- for (obt=bmain->object.first; obt; obt= obt->id.next) {
+ MovieClip *clip = (MovieClip *) id;
+
+ BKE_tracking_dopesheet_tag_update(&clip->tracking);
+
+ for (obt = bmain->object.first; obt; obt = obt->id.next) {
bConstraint *con;
- for (con = obt->constraints.first; con; con=con->next) {
- bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
+ for (con = obt->constraints.first; con; con = con->next) {
+ bConstraintTypeInfo *cti = constraint_get_typeinfo(con);
if (ELEM3(cti->type, CONSTRAINT_TYPE_FOLLOWTRACK, CONSTRAINT_TYPE_CAMERASOLVER,
- CONSTRAINT_TYPE_OBJECTSOLVER))
+ CONSTRAINT_TYPE_OBJECTSOLVER))
{
obt->recalc |= OB_RECALC_OB;
break;
@@ -2596,8 +2599,8 @@ static void dag_id_flush_update(Scene *sce, ID *id)
if (sce->nodetree) {
bNode *node;
- for (node= sce->nodetree->nodes.first; node; node= node->next) {
- if (node->id==id) {
+ for (node = sce->nodetree->nodes.first; node; node = node->next) {
+ if (node->id == id) {
nodeUpdate(sce->nodetree, node);
}
}
@@ -2608,7 +2611,7 @@ static void dag_id_flush_update(Scene *sce, ID *id)
* so it should happen tracking-related constraints recalculation
* when camera is changing (sergey) */
if (sce->camera && &sce->camera->id == id) {
- MovieClip *clip = object_get_movieclip(sce, sce->camera, 1);
+ MovieClip *clip = BKE_object_movieclip_get(sce, sce->camera, 1);
if (clip)
dag_id_flush_update(sce, &clip->id);
@@ -2641,8 +2644,8 @@ void DAG_ids_flush_tagged(Main *bmain)
/* we tag based on first ID type character to avoid
* looping over all ID's in case there are no tags */
if (id && bmain->id_tag_update[id->name[0]]) {
- for (; id; id=id->next) {
- if (id->flag & (LIB_ID_RECALC|LIB_ID_RECALC_DATA)) {
+ for (; id; id = id->next) {
+ if (id->flag & (LIB_ID_RECALC | LIB_ID_RECALC_DATA)) {
dag_id_flush_update(sce, id);
do_flush = 1;
}
@@ -2670,7 +2673,7 @@ void DAG_ids_check_recalc(Main *bmain, Scene *scene, int time)
/* we tag based on first ID type character to avoid
* looping over all ID's in case there are no tags */
if (id && bmain->id_tag_update[id->name[0]]) {
- updated= 1;
+ updated = 1;
break;
}
}
@@ -2693,9 +2696,9 @@ void DAG_ids_clear_recalc(Main *bmain)
/* we tag based on first ID type character to avoid
* looping over all ID's in case there are no tags */
if (id && bmain->id_tag_update[id->name[0]]) {
- for (; id; id=id->next)
- if (id->flag & (LIB_ID_RECALC|LIB_ID_RECALC_DATA))
- id->flag &= ~(LIB_ID_RECALC|LIB_ID_RECALC_DATA);
+ for (; id; id = id->next)
+ if (id->flag & (LIB_ID_RECALC | LIB_ID_RECALC_DATA))
+ id->flag &= ~(LIB_ID_RECALC | LIB_ID_RECALC_DATA);
}
}
@@ -2704,15 +2707,15 @@ void DAG_ids_clear_recalc(Main *bmain)
void DAG_id_tag_update(ID *id, short flag)
{
- Main *bmain= G.main;
+ Main *bmain = G.main;
- if (id==NULL) return;
+ if (id == NULL) return;
/* tag ID for update */
if (flag) {
if (flag & OB_RECALC_OB)
lib_id_recalc_tag(bmain, id);
- if (flag & (OB_RECALC_DATA|PSYS_RECALC))
+ if (flag & (OB_RECALC_DATA | PSYS_RECALC))
lib_id_recalc_data_tag(bmain, id);
}
else
@@ -2725,14 +2728,14 @@ void DAG_id_tag_update(ID *id, short flag)
if (idtype == ID_OB) {
/* only quick tag */
- ob = (Object*)id;
+ ob = (Object *)id;
ob->recalc |= (flag & OB_RECALC_ALL);
}
else if (idtype == ID_PA) {
ParticleSystem *psys;
/* this is weak still, should be done delayed as well */
- for (ob=bmain->object.first; ob; ob=ob->id.next) {
- for (psys=ob->particlesystem.first; psys; psys=psys->next) {
+ for (ob = bmain->object.first; ob; ob = ob->id.next) {
+ for (psys = ob->particlesystem.first; psys; psys = psys->next) {
if (&psys->part->id == id) {
ob->recalc |= (flag & OB_RECALC_ALL);
psys->recalc |= (flag & PSYS_RECALC);
@@ -2752,12 +2755,12 @@ void DAG_id_tag_update(ID *id, short flag)
void DAG_id_type_tag(struct Main *bmain, short idtype)
{
- bmain->id_tag_update[((char*)&idtype)[0]] = 1;
+ bmain->id_tag_update[((char *)&idtype)[0]] = 1;
}
int DAG_id_type_tagged(Main *bmain, short idtype)
{
- return bmain->id_tag_update[((char*)&idtype)[0]];
+ return bmain->id_tag_update[((char *)&idtype)[0]];
}
#if 0 // UNUSED
@@ -2767,22 +2770,22 @@ static int parent_check_node(DagNode *node, int curtime)
{
DagAdjList *itA;
- node->lasttime= curtime;
+ node->lasttime = curtime;
- if (node->color==DAG_GRAY)
+ if (node->color == DAG_GRAY)
return DAG_GRAY;
- for (itA = node->child; itA; itA= itA->next) {
- if (itA->node->type==ID_OB) {
+ for (itA = node->child; itA; itA = itA->next) {
+ if (itA->node->type == ID_OB) {
- if (itA->node->color==DAG_GRAY)
+ if (itA->node->color == DAG_GRAY)
return DAG_GRAY;
/* descend if not done */
- if (itA->node->lasttime!=curtime) {
- itA->node->color= parent_check_node(itA->node, curtime);
+ if (itA->node->lasttime != curtime) {
+ itA->node->color = parent_check_node(itA->node, curtime);
- if (itA->node->color==DAG_GRAY)
+ if (itA->node->color == DAG_GRAY)
return DAG_GRAY;
}
}
@@ -2797,7 +2800,7 @@ static int parent_check_node(DagNode *node, int curtime)
/* we assume its an armature with pose */
void DAG_pose_sort(Object *ob)
{
- bPose *pose= ob->pose;
+ bPose *pose = ob->pose;
bPoseChannel *pchan;
bConstraint *con;
DagNode *node;
@@ -2810,12 +2813,12 @@ void DAG_pose_sort(Object *ob)
int skip = 0;
dag = dag_init();
- ugly_hack_sorry= 0; // no ID structs
+ ugly_hack_sorry = 0; // no ID structs
- rootnode = dag_add_node(dag, NULL); // node->ob becomes NULL
+ rootnode = dag_add_node(dag, NULL); // node->ob becomes NULL
/* we add the hierarchy and the constraints */
- for (pchan = pose->chanbase.first; pchan; pchan= pchan->next) {
+ for (pchan = pose->chanbase.first; pchan; pchan = pchan->next) {
int addtoroot = 1;
node = dag_get_node(dag, pchan);
@@ -2825,40 +2828,40 @@ void DAG_pose_sort(Object *ob)
dag_add_relation(dag, node2, node, 0, "Parent Relation");
addtoroot = 0;
}
- for (con = pchan->constraints.first; con; con=con->next) {
- bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
+ for (con = pchan->constraints.first; con; con = con->next) {
+ bConstraintTypeInfo *cti = constraint_get_typeinfo(con);
ListBase targets = {NULL, NULL};
bConstraintTarget *ct;
if (cti && cti->get_constraint_targets) {
cti->get_constraint_targets(con, &targets);
- for (ct= targets.first; ct; ct= ct->next) {
- if (ct->tar==ob && ct->subtarget[0]) {
- bPoseChannel *target= get_pose_channel(ob->pose, ct->subtarget);
+ for (ct = targets.first; ct; ct = ct->next) {
+ if (ct->tar == ob && ct->subtarget[0]) {
+ bPoseChannel *target = BKE_pose_channel_find_name(ob->pose, ct->subtarget);
if (target) {
- node2= dag_get_node(dag, target);
+ node2 = dag_get_node(dag, target);
dag_add_relation(dag, node2, node, 0, "Pose Constraint");
- if (con->type==CONSTRAINT_TYPE_KINEMATIC) {
+ if (con->type == CONSTRAINT_TYPE_KINEMATIC) {
bKinematicConstraint *data = (bKinematicConstraint *)con->data;
bPoseChannel *parchan;
- int segcount= 0;
+ int segcount = 0;
/* exclude tip from chain? */
if (!(data->flag & CONSTRAINT_IK_TIP))
- parchan= pchan->parent;
+ parchan = pchan->parent;
else
- parchan= pchan;
+ parchan = pchan;
/* Walk to the chain's root */
while (parchan) {
- node3= dag_get_node(dag, parchan);
+ node3 = dag_get_node(dag, parchan);
dag_add_relation(dag, node2, node3, 0, "IK Constraint");
segcount++;
- if (segcount==data->rootbone || segcount>255) break; // 255 is weak
- parchan= parchan->parent;
+ if (segcount == data->rootbone || segcount > 255) break; // 255 is weak
+ parchan = parchan->parent;
}
}
}
@@ -2869,7 +2872,7 @@ void DAG_pose_sort(Object *ob)
cti->flush_constraint_targets(con, &targets, 1);
}
}
- if (addtoroot == 1 ) {
+ if (addtoroot == 1) {
dag_add_relation(dag, rootnode, node, 0, "Root Bone Relation");
}
}
@@ -2877,12 +2880,12 @@ void DAG_pose_sort(Object *ob)
dag_check_cycle(dag);
/* now we try to sort... */
- tempbase.first= tempbase.last= NULL;
+ tempbase.first = tempbase.last = NULL;
nqueue = queue_create(DAGQUEUEALLOC);
/* tag nodes unchecked */
- for (node = dag->DagNode.first; node; node= node->next)
+ for (node = dag->DagNode.first; node; node = node->next)
node->color = DAG_WHITE;
rootnode->color = DAG_GRAY;
@@ -2897,7 +2900,7 @@ void DAG_pose_sort(Object *ob)
while (itA != NULL) {
if (itA->node->color == DAG_WHITE) {
itA->node->color = DAG_GRAY;
- push_stack(nqueue,itA->node);
+ push_stack(nqueue, itA->node);
skip = 1;
break;
}
@@ -2907,7 +2910,7 @@ void DAG_pose_sort(Object *ob)
if (!skip) {
if (node) {
node = pop_queue(nqueue);
- if (node->ob == NULL) // we are done
+ if (node->ob == NULL) // we are done
break;
node->color = DAG_BLACK;
@@ -2920,7 +2923,7 @@ void DAG_pose_sort(Object *ob)
/* temporal correction for circular dependencies */
while (pose->chanbase.first) {
- pchan= pose->chanbase.first;
+ pchan = pose->chanbase.first;
BLI_remlink(&pose->chanbase, pchan);
BLI_addhead(&tempbase, pchan);
@@ -2935,10 +2938,10 @@ void DAG_pose_sort(Object *ob)
// printf(" %s\n", pchan->name);
// }
- free_forest( dag );
- MEM_freeN( dag );
+ free_forest(dag);
+ MEM_freeN(dag);
- ugly_hack_sorry= 1;
+ ugly_hack_sorry = 1;
}
/* ************************ DAG DEBUGGING ********************* */
@@ -2946,17 +2949,17 @@ void DAG_pose_sort(Object *ob)
void DAG_print_dependencies(Main *bmain, Scene *scene, Object *ob)
{
/* utility for debugging dependencies */
- dag_print_dependencies= 1;
+ dag_print_dependencies = 1;
if (ob && (ob->mode & OB_MODE_POSE)) {
- printf("\nDEPENDENCY RELATIONS for %s\n\n", ob->id.name+2);
+ printf("\nDEPENDENCY RELATIONS for %s\n\n", ob->id.name + 2);
DAG_pose_sort(ob);
}
else {
- printf("\nDEPENDENCY RELATIONS for %s\n\n", scene->id.name+2);
+ printf("\nDEPENDENCY RELATIONS for %s\n\n", scene->id.name + 2);
DAG_scene_sort(bmain, scene);
}
- dag_print_dependencies= 0;
+ dag_print_dependencies = 0;
}
diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c
index 01d5d6ef2ad..a3f5c5c23c6 100644
--- a/source/blender/blenkernel/intern/displist.c
+++ b/source/blender/blenkernel/intern/displist.c
@@ -64,7 +64,7 @@
static void boundbox_displist(Object *ob);
-void free_disp_elem(DispList *dl)
+void BKE_displist_elem_free(DispList *dl)
{
if (dl) {
if (dl->verts) MEM_freeN(dl->verts);
@@ -77,84 +77,87 @@ void free_disp_elem(DispList *dl)
}
}
-void freedisplist(ListBase *lb)
+void BKE_displist_free(ListBase *lb)
{
DispList *dl;
- dl= lb->first;
+ dl = lb->first;
while (dl) {
BLI_remlink(lb, dl);
- free_disp_elem(dl);
- dl= lb->first;
+ BKE_displist_elem_free(dl);
+ dl = lb->first;
}
}
-DispList *find_displist_create(ListBase *lb, int type)
+DispList *BKE_displist_find_or_create(ListBase *lb, int type)
{
DispList *dl;
-
- dl= lb->first;
+
+ dl = lb->first;
while (dl) {
- if (dl->type==type) return dl;
- dl= dl->next;
+ if (dl->type == type)
+ return dl;
+ dl = dl->next;
}
- dl= MEM_callocN(sizeof(DispList), "find_disp");
- dl->type= type;
+ dl = MEM_callocN(sizeof(DispList), "find_disp");
+ dl->type = type;
BLI_addtail(lb, dl);
return dl;
}
-DispList *find_displist(ListBase *lb, int type)
+DispList *BKE_displist_find(ListBase *lb, int type)
{
DispList *dl;
-
- dl= lb->first;
+
+ dl = lb->first;
while (dl) {
- if (dl->type==type) return dl;
- dl= dl->next;
+ if (dl->type == type)
+ return dl;
+ dl = dl->next;
}
return NULL;
}
-int displist_has_faces(ListBase *lb)
+int BKE_displist_has_faces(ListBase *lb)
{
DispList *dl;
- for (dl= lb->first; dl; dl= dl->next) {
+
+ for (dl = lb->first; dl; dl = dl->next) {
if (ELEM3(dl->type, DL_INDEX3, DL_INDEX4, DL_SURF)) {
- return 1;
+ return TRUE;
}
}
- return 0;
+
+ return FALSE;
}
-void copy_displist(ListBase *lbn, ListBase *lb)
+void BKE_displist_copy(ListBase *lbn, ListBase *lb)
{
DispList *dln, *dl;
-
- freedisplist(lbn);
-
- dl= lb->first;
+
+ BKE_displist_free(lbn);
+
+ dl = lb->first;
while (dl) {
-
- dln= MEM_dupallocN(dl);
+ dln = MEM_dupallocN(dl);
BLI_addtail(lbn, dln);
- dln->verts= MEM_dupallocN(dl->verts);
- dln->nors= MEM_dupallocN(dl->nors);
- dln->index= MEM_dupallocN(dl->index);
- dln->col1= MEM_dupallocN(dl->col1);
- dln->col2= MEM_dupallocN(dl->col2);
+ dln->verts = MEM_dupallocN(dl->verts);
+ dln->nors = MEM_dupallocN(dl->nors);
+ dln->index = MEM_dupallocN(dl->index);
+ dln->col1 = MEM_dupallocN(dl->col1);
+ dln->col2 = MEM_dupallocN(dl->col2);
if (dl->bevelSplitFlag)
- dln->bevelSplitFlag= MEM_dupallocN(dl->bevelSplitFlag);
+ dln->bevelSplitFlag = MEM_dupallocN(dl->bevelSplitFlag);
- dl= dl->next;
+ dl = dl->next;
}
}
-void addnormalsDispList(ListBase *lb)
+void BKE_displist_normals_add(ListBase *lb)
{
DispList *dl = NULL;
float *vdata, *ndata, nor[3];
@@ -162,117 +165,118 @@ void addnormalsDispList(ListBase *lb)
float *n1, *n2, *n3, *n4;
int a, b, p1, p2, p3, p4;
+ dl = lb->first;
- dl= lb->first;
-
while (dl) {
- if (dl->type==DL_INDEX3) {
- if (dl->nors==NULL) {
- dl->nors= MEM_callocN(sizeof(float)*3, "dlnors");
- if (dl->verts[2] < 0.0f) dl->nors[2]= -1.0f;
- else dl->nors[2]= 1.0f;
+ if (dl->type == DL_INDEX3) {
+ if (dl->nors == NULL) {
+ dl->nors = MEM_callocN(sizeof(float) * 3, "dlnors");
+
+ if (dl->verts[2] < 0.0f)
+ dl->nors[2] = -1.0f;
+ else
+ dl->nors[2] = 1.0f;
}
}
- else if (dl->type==DL_SURF) {
- if (dl->nors==NULL) {
- dl->nors= MEM_callocN(sizeof(float)*3*dl->nr*dl->parts, "dlnors");
-
- vdata= dl->verts;
- ndata= dl->nors;
-
- for (a=0; a<dl->parts; a++) {
-
- if (surfindex_displist(dl, a, &b, &p1, &p2, &p3, &p4)==0)
+ else if (dl->type == DL_SURF) {
+ if (dl->nors == NULL) {
+ dl->nors = MEM_callocN(sizeof(float) * 3 * dl->nr * dl->parts, "dlnors");
+
+ vdata = dl->verts;
+ ndata = dl->nors;
+
+ for (a = 0; a < dl->parts; a++) {
+
+ if (BKE_displist_surfindex_get(dl, a, &b, &p1, &p2, &p3, &p4) == 0)
break;
-
- v1= vdata+ 3*p1;
- n1= ndata+ 3*p1;
- v2= vdata+ 3*p2;
- n2= ndata+ 3*p2;
- v3= vdata+ 3*p3;
- n3= ndata+ 3*p3;
- v4= vdata+ 3*p4;
- n4= ndata+ 3*p4;
-
- for (; b<dl->nr; b++) {
-
- normal_quad_v3( nor,v1, v3, v4, v2);
-
+
+ v1 = vdata + 3 * p1;
+ n1 = ndata + 3 * p1;
+ v2 = vdata + 3 * p2;
+ n2 = ndata + 3 * p2;
+ v3 = vdata + 3 * p3;
+ n3 = ndata + 3 * p3;
+ v4 = vdata + 3 * p4;
+ n4 = ndata + 3 * p4;
+
+ for (; b < dl->nr; b++) {
+ normal_quad_v3(nor, v1, v3, v4, v2);
+
add_v3_v3(n1, nor);
add_v3_v3(n2, nor);
add_v3_v3(n3, nor);
add_v3_v3(n4, nor);
-
- v2= v1; v1+= 3;
- v4= v3; v3+= 3;
- n2= n1; n1+= 3;
- n4= n3; n3+= 3;
+
+ v2 = v1; v1 += 3;
+ v4 = v3; v3 += 3;
+ n2 = n1; n1 += 3;
+ n4 = n3; n3 += 3;
}
}
- a= dl->parts*dl->nr;
- v1= ndata;
+ a = dl->parts * dl->nr;
+ v1 = ndata;
while (a--) {
normalize_v3(v1);
- v1+= 3;
+ v1 += 3;
}
}
}
- dl= dl->next;
+ dl = dl->next;
}
}
-void count_displist(ListBase *lb, int *totvert, int *totface)
+void BKE_displist_count(ListBase *lb, int *totvert, int *totface)
{
DispList *dl;
-
- dl= lb->first;
+
+ dl = lb->first;
while (dl) {
-
- switch(dl->type) {
+ switch (dl->type) {
case DL_SURF:
- *totvert+= dl->nr*dl->parts;
- *totface+= (dl->nr-1)*(dl->parts-1);
+ *totvert += dl->nr * dl->parts;
+ *totface += (dl->nr - 1) * (dl->parts - 1);
break;
case DL_INDEX3:
case DL_INDEX4:
- *totvert+= dl->nr;
- *totface+= dl->parts;
+ *totvert += dl->nr;
+ *totface += dl->parts;
break;
case DL_POLY:
case DL_SEGM:
- *totvert+= dl->nr*dl->parts;
+ *totvert += dl->nr * dl->parts;
+ break;
}
-
- dl= dl->next;
+
+ dl = dl->next;
}
}
-int surfindex_displist(DispList *dl, int a, int *b, int *p1, int *p2, int *p3, int *p4)
+int BKE_displist_surfindex_get(DispList *dl, int a, int *b, int *p1, int *p2, int *p3, int *p4)
{
- if ((dl->flag & DL_CYCL_V)==0 && a==(dl->parts)-1) {
+ if ((dl->flag & DL_CYCL_V) == 0 && a == (dl->parts) - 1) {
return 0;
}
-
+
if (dl->flag & DL_CYCL_U) {
- (*p1)= dl->nr*a;
- (*p2)= (*p1)+ dl->nr-1;
- (*p3)= (*p1)+ dl->nr;
- (*p4)= (*p2)+ dl->nr;
- (*b)= 0;
+ (*p1) = dl->nr * a;
+ (*p2) = (*p1) + dl->nr - 1;
+ (*p3) = (*p1) + dl->nr;
+ (*p4) = (*p2) + dl->nr;
+ (*b) = 0;
}
else {
- (*p2)= dl->nr*a;
- (*p1)= (*p2)+1;
- (*p4)= (*p2)+ dl->nr;
- (*p3)= (*p1)+ dl->nr;
- (*b)= 1;
+ (*p2) = dl->nr * a;
+ (*p1) = (*p2) + 1;
+ (*p4) = (*p2) + dl->nr;
+ (*p3) = (*p1) + dl->nr;
+ (*b) = 1;
}
-
- if ( (dl->flag & DL_CYCL_V) && a==dl->parts-1) {
- (*p3)-= dl->nr*dl->parts;
- (*p4)-= dl->nr*dl->parts;
+
+ if ((dl->flag & DL_CYCL_V) && a == dl->parts - 1) {
+ (*p3) -= dl->nr * dl->parts;
+ (*p4) -= dl->nr * dl->parts;
}
-
+
return 1;
}
@@ -286,239 +290,246 @@ static void curve_to_displist(Curve *cu, ListBase *nubase, ListBase *dispbase, i
BPoint *bp;
float *data;
int a, len, resolu;
-
- nu= nubase->first;
+
+ nu = nubase->first;
while (nu) {
- if (nu->hide==0) {
-
- if (forRender && cu->resolu_ren!=0)
- resolu= cu->resolu_ren;
+ if (nu->hide == 0) {
+ if (forRender && cu->resolu_ren != 0)
+ resolu = cu->resolu_ren;
else
- resolu= nu->resolu;
-
- if (!check_valid_nurb_u(nu));
+ resolu = nu->resolu;
+
+ if (!BKE_nurb_check_valid_u(nu)) ;
else if (nu->type == CU_BEZIER) {
-
/* count */
- len= 0;
- a= nu->pntsu-1;
+ len = 0;
+ a = nu->pntsu - 1;
if (nu->flagu & CU_NURB_CYCLIC) a++;
- prevbezt= nu->bezt;
- bezt= prevbezt+1;
+ prevbezt = nu->bezt;
+ bezt = prevbezt + 1;
while (a--) {
- if (a==0 && (nu->flagu & CU_NURB_CYCLIC)) bezt= nu->bezt;
-
- if (prevbezt->h2==HD_VECT && bezt->h1==HD_VECT) len++;
- else len+= resolu;
-
- if (a==0 && (nu->flagu & CU_NURB_CYCLIC)==0) len++;
-
- prevbezt= bezt;
+ if (a == 0 && (nu->flagu & CU_NURB_CYCLIC))
+ bezt = nu->bezt;
+
+ if (prevbezt->h2 == HD_VECT && bezt->h1 == HD_VECT)
+ len++;
+ else
+ len += resolu;
+
+ if (a == 0 && (nu->flagu & CU_NURB_CYCLIC) == 0)
+ len++;
+
+ prevbezt = bezt;
bezt++;
}
-
- dl= MEM_callocN(sizeof(DispList), "makeDispListbez");
+
+ dl = MEM_callocN(sizeof(DispList), "makeDispListbez");
/* len+1 because of 'forward_diff_bezier' function */
- dl->verts= MEM_callocN( (len+1)*3*sizeof(float), "dlverts");
+ dl->verts = MEM_callocN((len + 1) * 3 * sizeof(float), "dlverts");
BLI_addtail(dispbase, dl);
- dl->parts= 1;
- dl->nr= len;
- dl->col= nu->mat_nr;
- dl->charidx= nu->charidx;
+ dl->parts = 1;
+ dl->nr = len;
+ dl->col = nu->mat_nr;
+ dl->charidx = nu->charidx;
- data= dl->verts;
+ data = dl->verts;
if (nu->flagu & CU_NURB_CYCLIC) {
- dl->type= DL_POLY;
- a= nu->pntsu;
+ dl->type = DL_POLY;
+ a = nu->pntsu;
}
else {
- dl->type= DL_SEGM;
- a= nu->pntsu-1;
+ dl->type = DL_SEGM;
+ a = nu->pntsu - 1;
}
-
- prevbezt= nu->bezt;
- bezt= prevbezt+1;
-
+
+ prevbezt = nu->bezt;
+ bezt = prevbezt + 1;
+
while (a--) {
- if (a==0 && dl->type== DL_POLY) bezt= nu->bezt;
-
- if (prevbezt->h2==HD_VECT && bezt->h1==HD_VECT) {
+ if (a == 0 && dl->type == DL_POLY)
+ bezt = nu->bezt;
+
+ if (prevbezt->h2 == HD_VECT && bezt->h1 == HD_VECT) {
copy_v3_v3(data, prevbezt->vec[1]);
- data+= 3;
+ data += 3;
}
else {
int j;
- for (j=0; j<3; j++) {
- forward_diff_bezier( prevbezt->vec[1][j],
- prevbezt->vec[2][j],
- bezt->vec[0][j],
- bezt->vec[1][j],
- data+j, resolu, 3*sizeof(float));
+ for (j = 0; j < 3; j++) {
+ BKE_curve_forward_diff_bezier(prevbezt->vec[1][j],
+ prevbezt->vec[2][j],
+ bezt->vec[0][j],
+ bezt->vec[1][j],
+ data + j, resolu, 3 * sizeof(float));
}
-
- data+= 3*resolu;
+
+ data += 3 * resolu;
}
-
- if (a==0 && dl->type==DL_SEGM) {
+
+ if (a == 0 && dl->type == DL_SEGM) {
copy_v3_v3(data, bezt->vec[1]);
}
-
- prevbezt= bezt;
+
+ prevbezt = bezt;
bezt++;
}
}
else if (nu->type == CU_NURBS) {
- len= (resolu*SEGMENTSU(nu));
-
- dl= MEM_callocN(sizeof(DispList), "makeDispListsurf");
- dl->verts= MEM_callocN(len*3*sizeof(float), "dlverts");
+ len = (resolu * SEGMENTSU(nu));
+
+ dl = MEM_callocN(sizeof(DispList), "makeDispListsurf");
+ dl->verts = MEM_callocN(len * 3 * sizeof(float), "dlverts");
BLI_addtail(dispbase, dl);
- dl->parts= 1;
-
- dl->nr= len;
- dl->col= nu->mat_nr;
+ dl->parts = 1;
+
+ dl->nr = len;
+ dl->col = nu->mat_nr;
dl->charidx = nu->charidx;
- data= dl->verts;
- if (nu->flagu & CU_NURB_CYCLIC) dl->type= DL_POLY;
- else dl->type= DL_SEGM;
- makeNurbcurve(nu, data, NULL, NULL, NULL, resolu, 3*sizeof(float));
+ data = dl->verts;
+ if (nu->flagu & CU_NURB_CYCLIC)
+ dl->type = DL_POLY;
+ else dl->type = DL_SEGM;
+ BKE_nurb_makeCurve(nu, data, NULL, NULL, NULL, resolu, 3 * sizeof(float));
}
else if (nu->type == CU_POLY) {
- len= nu->pntsu;
- dl= MEM_callocN(sizeof(DispList), "makeDispListpoly");
- dl->verts= MEM_callocN(len*3*sizeof(float), "dlverts");
+ len = nu->pntsu;
+ dl = MEM_callocN(sizeof(DispList), "makeDispListpoly");
+ dl->verts = MEM_callocN(len * 3 * sizeof(float), "dlverts");
BLI_addtail(dispbase, dl);
- dl->parts= 1;
- dl->nr= len;
- dl->col= nu->mat_nr;
+ dl->parts = 1;
+ dl->nr = len;
+ dl->col = nu->mat_nr;
dl->charidx = nu->charidx;
- data= dl->verts;
- if (nu->flagu & CU_NURB_CYCLIC) dl->type= DL_POLY;
- else dl->type= DL_SEGM;
-
- a= len;
- bp= nu->bp;
+ data = dl->verts;
+ if (nu->flagu & CU_NURB_CYCLIC) dl->type = DL_POLY;
+ else dl->type = DL_SEGM;
+
+ a = len;
+ bp = nu->bp;
while (a--) {
copy_v3_v3(data, bp->vec);
bp++;
- data+= 3;
+ data += 3;
}
}
}
- nu= nu->next;
+ nu = nu->next;
}
}
-void filldisplist(ListBase *dispbase, ListBase *to, int flipnormal)
+void BKE_displist_fill(ListBase *dispbase, ListBase *to, int flipnormal)
{
ScanFillContext sf_ctx;
ScanFillVert *eve, *v1, *vlast;
ScanFillFace *efa;
- DispList *dlnew=NULL, *dl;
+ DispList *dlnew = NULL, *dl;
float *f1;
- int colnr=0, charidx=0, cont=1, tot, a, *index, nextcol= 0;
+ int colnr = 0, charidx = 0, cont = 1, tot, a, *index, nextcol = 0;
intptr_t totvert;
-
- if (dispbase==NULL) return;
- if (dispbase->first==NULL) return;
+
+ if (dispbase == NULL)
+ return;
+ if (dispbase->first == NULL)
+ return;
while (cont) {
- cont= 0;
- totvert= 0;
- nextcol= 0;
-
- BLI_begin_edgefill(&sf_ctx);
-
- dl= dispbase->first;
+ cont = 0;
+ totvert = 0;
+ nextcol = 0;
+
+ BLI_scanfill_begin(&sf_ctx);
+
+ dl = dispbase->first;
while (dl) {
-
- if (dl->type==DL_POLY) {
- if (charidx<dl->charidx) cont= 1;
- else if (charidx==dl->charidx) { /* character with needed index */
- if (colnr==dl->col) {
+ if (dl->type == DL_POLY) {
+ if (charidx < dl->charidx)
+ cont = 1;
+ else if (charidx == dl->charidx) { /* character with needed index */
+ if (colnr == dl->col) {
/* make editverts and edges */
- f1= dl->verts;
- a= dl->nr;
- eve= v1= NULL;
-
+ f1 = dl->verts;
+ a = dl->nr;
+ eve = v1 = NULL;
+
while (a--) {
- vlast= eve;
+ vlast = eve;
- eve = BLI_addfillvert(&sf_ctx, f1);
+ eve = BLI_scanfill_vert_add(&sf_ctx, f1);
totvert++;
- if (vlast==NULL) v1= eve;
+ if (vlast == NULL)
+ v1 = eve;
else {
- BLI_addfilledge(&sf_ctx, vlast, eve);
+ BLI_scanfill_edge_add(&sf_ctx, vlast, eve);
}
- f1+=3;
+ f1 += 3;
}
- if (eve!=NULL && v1!=NULL) {
- BLI_addfilledge(&sf_ctx, eve, v1);
+ if (eve != NULL && v1 != NULL) {
+ BLI_scanfill_edge_add(&sf_ctx, eve, v1);
}
}
- else if (colnr<dl->col) {
+ else if (colnr < dl->col) {
/* got poly with next material at current char */
- cont= 1;
- nextcol= 1;
+ cont = 1;
+ nextcol = 1;
}
}
}
- dl= dl->next;
+ dl = dl->next;
}
-
- if (totvert && (tot= BLI_edgefill(&sf_ctx, FALSE))) { // XXX (obedit && obedit->actcol)?(obedit->actcol-1):0)) {
+
+ /* XXX (obedit && obedit->actcol)?(obedit->actcol-1):0)) { */
+ if (totvert && (tot = BLI_scanfill_calc(&sf_ctx, FALSE))) {
if (tot) {
- dlnew= MEM_callocN(sizeof(DispList), "filldisplist");
- dlnew->type= DL_INDEX3;
- dlnew->col= colnr;
- dlnew->nr= totvert;
- dlnew->parts= tot;
-
- dlnew->index= MEM_mallocN(tot*3*sizeof(int), "dlindex");
- dlnew->verts= MEM_mallocN(totvert*3*sizeof(float), "dlverts");
-
+ dlnew = MEM_callocN(sizeof(DispList), "filldisplist");
+ dlnew->type = DL_INDEX3;
+ dlnew->col = colnr;
+ dlnew->nr = totvert;
+ dlnew->parts = tot;
+
+ dlnew->index = MEM_mallocN(tot * 3 * sizeof(int), "dlindex");
+ dlnew->verts = MEM_mallocN(totvert * 3 * sizeof(float), "dlverts");
+
/* vert data */
- f1= dlnew->verts;
- totvert= 0;
- eve= sf_ctx.fillvertbase.first;
+ f1 = dlnew->verts;
+ totvert = 0;
+ eve = sf_ctx.fillvertbase.first;
while (eve) {
copy_v3_v3(f1, eve->co);
- f1+= 3;
-
+ f1 += 3;
+
/* index number */
eve->tmp.l = totvert;
totvert++;
-
- eve= eve->next;
+
+ eve = eve->next;
}
-
+
/* index data */
efa = sf_ctx.fillfacebase.first;
- index= dlnew->index;
+ index = dlnew->index;
while (efa) {
- index[0]= (intptr_t)efa->v1->tmp.l;
- index[1]= (intptr_t)efa->v2->tmp.l;
- index[2]= (intptr_t)efa->v3->tmp.l;
+ index[0] = (intptr_t)efa->v1->tmp.l;
+ index[1] = (intptr_t)efa->v2->tmp.l;
+ index[2] = (intptr_t)efa->v3->tmp.l;
if (flipnormal)
SWAP(int, index[0], index[2]);
-
- index+= 3;
- efa= efa->next;
+
+ index += 3;
+ efa = efa->next;
}
}
BLI_addhead(to, dlnew);
-
}
- BLI_end_edgefill(&sf_ctx);
+ BLI_scanfill_end(&sf_ctx);
if (nextcol) {
/* stay at current char but fill polys with next material */
@@ -527,12 +538,11 @@ void filldisplist(ListBase *dispbase, ListBase *to, int flipnormal)
else {
/* switch to next char and start filling from first material */
charidx++;
- colnr= 0;
+ colnr = 0;
}
}
-
+
/* do not free polys, needed for wireframe display */
-
}
static void bevels_to_filledpoly(Curve *cu, ListBase *dispbase)
@@ -541,77 +551,77 @@ static void bevels_to_filledpoly(Curve *cu, ListBase *dispbase)
DispList *dl, *dlnew;
float *fp, *fp1;
int a, dpoly;
-
- front.first= front.last= back.first= back.last= NULL;
-
- dl= dispbase->first;
+
+ front.first = front.last = back.first = back.last = NULL;
+
+ dl = dispbase->first;
while (dl) {
- if (dl->type==DL_SURF) {
- if ( (dl->flag & DL_CYCL_V) && (dl->flag & DL_CYCL_U)==0 ) {
- if ( (cu->flag & CU_BACK) && (dl->flag & DL_BACK_CURVE) ) {
- dlnew= MEM_callocN(sizeof(DispList), "filldisp");
+ if (dl->type == DL_SURF) {
+ if ((dl->flag & DL_CYCL_V) && (dl->flag & DL_CYCL_U) == 0) {
+ if ( (cu->flag & CU_BACK) && (dl->flag & DL_BACK_CURVE)) {
+ dlnew = MEM_callocN(sizeof(DispList), "filldisp");
BLI_addtail(&front, dlnew);
- dlnew->verts= fp1= MEM_mallocN(sizeof(float)*3*dl->parts, "filldisp1");
- dlnew->nr= dl->parts;
- dlnew->parts= 1;
- dlnew->type= DL_POLY;
- dlnew->col= dl->col;
+ dlnew->verts = fp1 = MEM_mallocN(sizeof(float) * 3 * dl->parts, "filldisp1");
+ dlnew->nr = dl->parts;
+ dlnew->parts = 1;
+ dlnew->type = DL_POLY;
+ dlnew->col = dl->col;
dlnew->charidx = dl->charidx;
-
- fp= dl->verts;
- dpoly= 3*dl->nr;
-
- a= dl->parts;
+
+ fp = dl->verts;
+ dpoly = 3 * dl->nr;
+
+ a = dl->parts;
while (a--) {
copy_v3_v3(fp1, fp);
- fp1+= 3;
- fp+= dpoly;
+ fp1 += 3;
+ fp += dpoly;
}
}
- if ( (cu->flag & CU_FRONT) && (dl->flag & DL_FRONT_CURVE) ) {
- dlnew= MEM_callocN(sizeof(DispList), "filldisp");
+ if ((cu->flag & CU_FRONT) && (dl->flag & DL_FRONT_CURVE)) {
+ dlnew = MEM_callocN(sizeof(DispList), "filldisp");
BLI_addtail(&back, dlnew);
- dlnew->verts= fp1= MEM_mallocN(sizeof(float)*3*dl->parts, "filldisp1");
- dlnew->nr= dl->parts;
- dlnew->parts= 1;
- dlnew->type= DL_POLY;
- dlnew->col= dl->col;
- dlnew->charidx= dl->charidx;
-
- fp= dl->verts+3*(dl->nr-1);
- dpoly= 3*dl->nr;
-
- a= dl->parts;
+ dlnew->verts = fp1 = MEM_mallocN(sizeof(float) * 3 * dl->parts, "filldisp1");
+ dlnew->nr = dl->parts;
+ dlnew->parts = 1;
+ dlnew->type = DL_POLY;
+ dlnew->col = dl->col;
+ dlnew->charidx = dl->charidx;
+
+ fp = dl->verts + 3 * (dl->nr - 1);
+ dpoly = 3 * dl->nr;
+
+ a = dl->parts;
while (a--) {
copy_v3_v3(fp1, fp);
- fp1+= 3;
- fp+= dpoly;
+ fp1 += 3;
+ fp += dpoly;
}
}
}
}
- dl= dl->next;
+ dl = dl->next;
}
- filldisplist(&front, dispbase, 1);
- filldisplist(&back, dispbase, 0);
-
- freedisplist(&front);
- freedisplist(&back);
+ BKE_displist_fill(&front, dispbase, 1);
+ BKE_displist_fill(&back, dispbase, 0);
- filldisplist(dispbase, dispbase, 0);
-
+ BKE_displist_free(&front);
+ BKE_displist_free(&back);
+
+ BKE_displist_fill(dispbase, dispbase, 0);
}
static void curve_to_filledpoly(Curve *cu, ListBase *UNUSED(nurb), ListBase *dispbase)
{
- if (cu->flag & CU_3D) return;
+ if (cu->flag & CU_3D)
+ return;
- if (dispbase->first && ((DispList*) dispbase->first)->type==DL_SURF) {
+ if (dispbase->first && ((DispList *) dispbase->first)->type == DL_SURF) {
bevels_to_filledpoly(cu, dispbase);
}
else {
- filldisplist(dispbase, dispbase, 0);
+ BKE_displist_fill(dispbase, dispbase, 0);
}
}
@@ -620,74 +630,77 @@ static void curve_to_filledpoly(Curve *cu, ListBase *UNUSED(nurb), ListBase *dis
* - first point left, last point right
* - based on subdivided points in original curve, not on points in taper curve (still)
*/
-float calc_taper(Scene *scene, Object *taperobj, int cur, int tot)
+float BKE_displist_calc_taper(Scene *scene, Object *taperobj, int cur, int tot)
{
DispList *dl;
-
- if (taperobj==NULL || taperobj->type!=OB_CURVE) return 1.0;
-
- dl= taperobj->disp.first;
- if (dl==NULL) {
- makeDispListCurveTypes(scene, taperobj, 0);
- dl= taperobj->disp.first;
+
+ if (taperobj == NULL || taperobj->type != OB_CURVE)
+ return 1.0;
+
+ dl = taperobj->disp.first;
+ if (dl == NULL) {
+ BKE_displist_make_curveTypes(scene, taperobj, 0);
+ dl = taperobj->disp.first;
}
if (dl) {
- float fac= ((float)cur)/(float)(tot-1);
+ float fac = ((float)cur) / (float)(tot - 1);
float minx, dx, *fp;
int a;
-
+
/* horizontal size */
- minx= dl->verts[0];
- dx= dl->verts[3*(dl->nr-1)] - minx;
+ minx = dl->verts[0];
+ dx = dl->verts[3 * (dl->nr - 1)] - minx;
if (dx > 0.0f) {
-
- fp= dl->verts;
- for (a=0; a<dl->nr; a++, fp+=3) {
- if ( (fp[0]-minx)/dx >= fac) {
+ fp = dl->verts;
+ for (a = 0; a < dl->nr; a++, fp += 3) {
+ if ((fp[0] - minx) / dx >= fac) {
/* interpolate with prev */
- if (a>0) {
- float fac1= (fp[-3]-minx)/dx;
- float fac2= (fp[0]-minx)/dx;
- if (fac1!=fac2)
- return fp[1]*(fac1-fac)/(fac1-fac2) + fp[-2]*(fac-fac2)/(fac1-fac2);
+ if (a > 0) {
+ float fac1 = (fp[-3] - minx) / dx;
+ float fac2 = (fp[0] - minx) / dx;
+ if (fac1 != fac2)
+ return fp[1] * (fac1 - fac) / (fac1 - fac2) + fp[-2] * (fac - fac2) / (fac1 - fac2);
}
return fp[1];
}
}
- return fp[-2]; // last y coord
+ return fp[-2]; // last y coord
}
}
-
+
return 1.0;
}
-void makeDispListMBall(Scene *scene, Object *ob)
+void BKE_displist_make_mball(Scene *scene, Object *ob)
{
- if (!ob || ob->type!=OB_MBALL) return;
+ if (!ob || ob->type != OB_MBALL)
+ return;
- // XXX: mball stuff uses plenty of global variables
- // while this is unchanged updating during render is unsafe
- if (G.rendering) return;
+ /* XXX: mball stuff uses plenty of global variables
+ * while this is unchanged updating during render is unsafe
+ */
+ if (G.rendering)
+ return;
- freedisplist(&(ob->disp));
+ BKE_displist_free(&(ob->disp));
- if (ob->type==OB_MBALL) {
- if (ob==find_basis_mball(scene, ob)) {
- metaball_polygonize(scene, ob, &ob->disp);
- tex_space_mball(ob);
+ if (ob->type == OB_MBALL) {
+ if (ob == BKE_mball_basis_find(scene, ob)) {
+ BKE_mball_polygonize(scene, ob, &ob->disp);
+ BKE_mball_texspace_calc(ob);
object_deform_mball(ob, &ob->disp);
}
}
-
+
boundbox_displist(ob);
}
-void makeDispListMBall_forRender(Scene *scene, Object *ob, ListBase *dispbase)
+void BKE_displist_make_mball_forRender(Scene *scene, Object *ob, ListBase *dispbase)
{
- metaball_polygonize(scene, ob, dispbase);
- tex_space_mball(ob);
-
+ BKE_mball_polygonize(scene, ob, dispbase);
+ BKE_mball_texspace_calc(ob);
+
object_deform_mball(ob, dispbase);
}
@@ -697,27 +710,33 @@ static ModifierData *curve_get_tessellate_point(Scene *scene, Object *ob, int fo
ModifierData *pretessellatePoint;
int required_mode;
- if (forRender) required_mode = eModifierMode_Render;
- else required_mode = eModifierMode_Realtime;
+ if (forRender)
+ required_mode = eModifierMode_Render;
+ else
+ required_mode = eModifierMode_Realtime;
- if (editmode) required_mode |= eModifierMode_Editmode;
+ if (editmode)
+ required_mode |= eModifierMode_Editmode;
pretessellatePoint = NULL;
- for (; md; md=md->next) {
+ for (; md; md = md->next) {
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
- if (!modifier_isEnabled(scene, md, required_mode)) continue;
- if (mti->type == eModifierTypeType_Constructive) return pretessellatePoint;
+ if (!modifier_isEnabled(scene, md, required_mode))
+ continue;
+ if (mti->type == eModifierTypeType_Constructive)
+ return pretessellatePoint;
if (ELEM3(md->type, eModifierType_Hook, eModifierType_Softbody, eModifierType_MeshDeform)) {
pretessellatePoint = md;
/* this modifiers are moving point of tessellation automatically
* (some of them even can't be applied on tessellated curve), set flag
- * for incformation button in modifier's header */
+ * for incformation button in modifier's header
+ */
md->mode |= eModifierMode_ApplyOnSpline;
}
- else if (md->mode&eModifierMode_ApplyOnSpline) {
+ else if (md->mode & eModifierMode_ApplyOnSpline) {
pretessellatePoint = md;
}
}
@@ -725,66 +744,73 @@ static ModifierData *curve_get_tessellate_point(Scene *scene, Object *ob, int fo
return pretessellatePoint;
}
-static void curve_calc_modifiers_pre(Scene *scene, Object *ob, int forRender, float (**originalVerts_r)[3], float (**deformedVerts_r)[3], int *numVerts_r)
+static void curve_calc_modifiers_pre(Scene *scene, Object *ob, int forRender, float (**originalVerts_r)[3],
+ float (**deformedVerts_r)[3], int *numVerts_r)
{
ModifierData *md = modifiers_getVirtualModifierList(ob);
ModifierData *pretessellatePoint;
- Curve *cu= ob->data;
- ListBase *nurb= BKE_curve_nurbs(cu);
+ Curve *cu = ob->data;
+ ListBase *nurb = BKE_curve_nurbs_get(cu);
int numVerts = 0;
int editmode = (!forRender && cu->editnurb);
float (*originalVerts)[3] = NULL;
float (*deformedVerts)[3] = NULL;
- float *keyVerts= NULL;
+ float *keyVerts = NULL;
int required_mode;
- if (forRender) required_mode = eModifierMode_Render;
- else required_mode = eModifierMode_Realtime;
+ if (forRender)
+ required_mode = eModifierMode_Render;
+ else
+ required_mode = eModifierMode_Realtime;
pretessellatePoint = curve_get_tessellate_point(scene, ob, forRender, editmode);
-
- if (editmode) required_mode |= eModifierMode_Editmode;
- if (cu->editnurb==NULL) {
- keyVerts= do_ob_key(scene, ob);
+ if (editmode)
+ required_mode |= eModifierMode_Editmode;
+
+ if (cu->editnurb == NULL) {
+ keyVerts = do_ob_key(scene, ob);
if (keyVerts) {
/* split coords from key data, the latter also includes
* tilts, which is passed through in the modifier stack.
* this is also the reason curves do not use a virtual
* shape key modifier yet. */
- deformedVerts= curve_getKeyVertexCos(cu, nurb, keyVerts);
- originalVerts= MEM_dupallocN(deformedVerts);
- numVerts = count_curveverts_without_handles(nurb);
+ deformedVerts = BKE_curve_keyVertexCos_get(cu, nurb, keyVerts);
+ originalVerts = MEM_dupallocN(deformedVerts);
+ numVerts = BKE_nurbList_verts_count_without_handles(nurb);
}
}
-
+
if (pretessellatePoint) {
- for (; md; md=md->next) {
+ for (; md; md = md->next) {
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
- md->scene= scene;
-
- if ((md->mode & required_mode) != required_mode) continue;
- if (mti->isDisabled && mti->isDisabled(md, forRender)) continue;
- if (mti->type!=eModifierTypeType_OnlyDeform) continue;
+ md->scene = scene;
+
+ if ((md->mode & required_mode) != required_mode)
+ continue;
+ if (mti->isDisabled && mti->isDisabled(md, forRender))
+ continue;
+ if (mti->type != eModifierTypeType_OnlyDeform)
+ continue;
if (!deformedVerts) {
- deformedVerts = curve_getVertexCos(cu, nurb, &numVerts);
+ deformedVerts = BKE_curve_vertexCos_get(cu, nurb, &numVerts);
originalVerts = MEM_dupallocN(deformedVerts);
}
mti->deformVerts(md, ob, NULL, deformedVerts, numVerts, forRender, editmode);
- if (md==pretessellatePoint)
+ if (md == pretessellatePoint)
break;
}
}
if (deformedVerts)
- curve_applyVertexCos(cu, nurb, deformedVerts);
+ BK_curve_vertexCos_apply(cu, nurb, deformedVerts);
if (keyVerts) /* these are not passed through modifier stack */
- curve_applyKeyVertexTilts(cu, nurb, keyVerts);
+ BKE_curve_keyVertexTilts_apply(cu, nurb, keyVerts);
if (keyVerts)
MEM_freeN(keyVerts);
@@ -794,22 +820,22 @@ static void curve_calc_modifiers_pre(Scene *scene, Object *ob, int forRender, fl
*numVerts_r = numVerts;
}
-static float (*displist_get_allverts (ListBase *dispbase, int *totvert))[3]
+static float (*displist_get_allverts(ListBase * dispbase, int *totvert))[3]
{
DispList *dl;
float (*allverts)[3], *fp;
- *totvert= 0;
+ *totvert = 0;
- for (dl=dispbase->first; dl; dl=dl->next)
- *totvert+= (dl->type==DL_INDEX3)?dl->nr:dl->parts*dl->nr;
+ for (dl = dispbase->first; dl; dl = dl->next)
+ *totvert += (dl->type == DL_INDEX3) ? dl->nr : dl->parts * dl->nr;
- allverts= MEM_mallocN((*totvert)*sizeof(float)*3, "displist_get_allverts allverts");
- fp= (float*)allverts;
- for (dl=dispbase->first; dl; dl=dl->next) {
- int offs= 3 * ((dl->type==DL_INDEX3)?dl->nr:dl->parts*dl->nr);
+ allverts = MEM_mallocN((*totvert) * sizeof(float) * 3, "displist_get_allverts allverts");
+ fp = (float *)allverts;
+ for (dl = dispbase->first; dl; dl = dl->next) {
+ int offs = 3 * ((dl->type == DL_INDEX3) ? dl->nr : dl->parts * dl->nr);
memcpy(fp, dl->verts, sizeof(float) * offs);
- fp+= offs;
+ fp += offs;
}
return allverts;
@@ -820,52 +846,57 @@ static void displist_apply_allverts(ListBase *dispbase, float (*allverts)[3])
DispList *dl;
float *fp;
- fp= (float*)allverts;
- for (dl=dispbase->first; dl; dl=dl->next) {
- int offs= 3 * ((dl->type==DL_INDEX3)?dl->nr:dl->parts*dl->nr);
+ fp = (float *)allverts;
+ for (dl = dispbase->first; dl; dl = dl->next) {
+ int offs = 3 * ((dl->type == DL_INDEX3) ? dl->nr : dl->parts * dl->nr);
memcpy(dl->verts, fp, sizeof(float) * offs);
- fp+= offs;
+ fp += offs;
}
}
-static void curve_calc_modifiers_post(Scene *scene, Object *ob, ListBase *dispbase,
- DerivedMesh **derivedFinal, int forRender, float (*originalVerts)[3], float (*deformedVerts)[3])
+static void curve_calc_modifiers_post(Scene *scene, Object *ob, ListBase *dispbase, DerivedMesh **derivedFinal,
+ int forRender, float (*originalVerts)[3], float (*deformedVerts)[3])
{
ModifierData *md = modifiers_getVirtualModifierList(ob);
ModifierData *pretessellatePoint;
- Curve *cu= ob->data;
- ListBase *nurb= BKE_curve_nurbs(cu);
+ Curve *cu = ob->data;
+ ListBase *nurb = BKE_curve_nurbs_get(cu);
int required_mode = 0, totvert = 0;
int editmode = (!forRender && cu->editnurb);
- DerivedMesh *dm= NULL, *ndm;
+ DerivedMesh *dm = NULL, *ndm;
float (*vertCos)[3] = NULL;
int useCache = !forRender;
- if (forRender) required_mode = eModifierMode_Render;
- else required_mode = eModifierMode_Realtime;
+ if (forRender)
+ required_mode = eModifierMode_Render;
+ else
+ required_mode = eModifierMode_Realtime;
pretessellatePoint = curve_get_tessellate_point(scene, ob, forRender, editmode);
-
- if (editmode) required_mode |= eModifierMode_Editmode;
+
+ if (editmode)
+ required_mode |= eModifierMode_Editmode;
if (pretessellatePoint) {
md = pretessellatePoint->next;
}
if (derivedFinal && *derivedFinal) {
- (*derivedFinal)->release (*derivedFinal);
+ (*derivedFinal)->release(*derivedFinal);
}
- for (; md; md=md->next) {
+ for (; md; md = md->next) {
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
- md->scene= scene;
+ md->scene = scene;
- if ((md->mode & required_mode) != required_mode) continue;
- if (mti->isDisabled && mti->isDisabled(md, forRender)) continue;
+ if ((md->mode & required_mode) != required_mode)
+ continue;
+ if (mti->isDisabled && mti->isDisabled(md, forRender))
+ continue;
if (mti->type == eModifierTypeType_OnlyDeform ||
- (mti->type == eModifierTypeType_DeformOrConstruct && !dm)) {
+ (mti->type == eModifierTypeType_DeformOrConstruct && !dm)) {
if (dm) {
if (!vertCos) {
totvert = dm->getNumVerts(dm);
@@ -877,7 +908,7 @@ static void curve_calc_modifiers_post(Scene *scene, Object *ob, ListBase *dispba
}
else {
if (!vertCos) {
- vertCos= displist_get_allverts(dispbase, &totvert);
+ vertCos = displist_get_allverts(dispbase, &totvert);
}
mti->deformVerts(md, ob, NULL, vertCos, totvert, forRender, editmode);
@@ -885,9 +916,10 @@ static void curve_calc_modifiers_post(Scene *scene, Object *ob, ListBase *dispba
}
else {
if (!derivedFinal) {
- /* makeDisplistCurveTypes could be used for beveling, where derived mesh */
- /* is totally unnecessary, so we could stop modifiers applying */
- /* when we found constructive modifier but derived mesh is unwanted result */
+ /* makeDisplistCurveTypes could be used for beveling, where derived mesh
+ * is totally unnecessary, so we could stop modifiers applying
+ * when we found constructive modifier but derived mesh is unwanted result
+ */
break;
}
@@ -910,7 +942,7 @@ static void curve_calc_modifiers_post(Scene *scene, Object *ob, ListBase *dispba
curve_to_filledpoly(cu, nurb, dispbase);
}
- dm= CDDM_from_curve_customDB(ob, dispbase);
+ dm = CDDM_from_curve_customDB(ob, dispbase);
CDDM_calc_normals_mapping(dm);
}
@@ -918,7 +950,7 @@ static void curve_calc_modifiers_post(Scene *scene, Object *ob, ListBase *dispba
if (vertCos) {
/* Vertex coordinates were applied to necessary data, could free it */
MEM_freeN(vertCos);
- vertCos= NULL;
+ vertCos = NULL;
}
ndm = mti->applyModifier(md, ob, dm, forRender, useCache);
@@ -927,7 +959,7 @@ static void curve_calc_modifiers_post(Scene *scene, Object *ob, ListBase *dispba
/* Modifier returned a new derived mesh */
if (dm && dm != ndm) /* Modifier */
- dm->release (dm);
+ dm->release(dm);
dm = ndm;
}
}
@@ -946,17 +978,18 @@ static void curve_calc_modifiers_post(Scene *scene, Object *ob, ListBase *dispba
else {
displist_apply_allverts(dispbase, vertCos);
MEM_freeN(vertCos);
- vertCos= NULL;
+ vertCos = NULL;
}
}
if (derivedFinal) {
- if (dm) DM_ensure_tessface(dm); /* needed for drawing */
+ if (dm)
+ DM_ensure_tessface(dm); /* needed for drawing */
(*derivedFinal) = dm;
}
if (deformedVerts) {
- curve_applyVertexCos(ob->data, nurb, originalVerts);
+ BK_curve_vertexCos_apply(ob->data, nurb, originalVerts);
MEM_freeN(originalVerts);
MEM_freeN(deformedVerts);
}
@@ -966,42 +999,40 @@ static void displist_surf_indices(DispList *dl)
{
int a, b, p1, p2, p3, p4;
int *index;
-
- dl->totindex= 0;
-
- index=dl->index= MEM_mallocN( 4*sizeof(int)*(dl->parts+1)*(dl->nr+1), "index array nurbs");
-
- for (a=0; a<dl->parts; a++) {
-
- if (surfindex_displist(dl, a, &b, &p1, &p2, &p3, &p4)==0)
+
+ dl->totindex = 0;
+
+ index = dl->index = MEM_mallocN(4 * sizeof(int) * (dl->parts + 1) * (dl->nr + 1), "index array nurbs");
+
+ for (a = 0; a < dl->parts; a++) {
+
+ if (BKE_displist_surfindex_get(dl, a, &b, &p1, &p2, &p3, &p4) == 0)
break;
-
- for (; b<dl->nr; b++, index+=4) {
- index[0]= p1;
- index[1]= p2;
- index[2]= p4;
- index[3]= p3;
-
+
+ for (; b < dl->nr; b++, index += 4) {
+ index[0] = p1;
+ index[1] = p2;
+ index[2] = p4;
+ index[3] = p3;
+
dl->totindex++;
-
- p2= p1; p1++;
- p4= p3; p3++;
+ p2 = p1; p1++;
+ p4 = p3; p3++;
}
}
-
}
static DerivedMesh *create_orco_dm(Scene *scene, Object *ob)
{
DerivedMesh *dm;
- ListBase disp= {NULL, NULL};
+ ListBase disp = {NULL, NULL};
/* OrcoDM should be created from underformed disp lists */
- makeDispListCurveTypes_forOrco(scene, ob, &disp);
- dm= CDDM_from_curve_customDB(ob, &disp);
+ BKE_displist_make_curveTypes_forOrco(scene, ob, &disp);
+ dm = CDDM_from_curve_customDB(ob, &disp);
- freedisplist(&disp);
+ BKE_displist_free(&disp);
return dm;
}
@@ -1010,12 +1041,12 @@ static void add_orco_dm(Scene *scene, Object *ob, DerivedMesh *dm, DerivedMesh *
{
float (*orco)[3], (*layerorco)[3];
int totvert, a;
- Curve *cu= ob->data;
+ Curve *cu = ob->data;
- totvert= dm->getNumVerts(dm);
+ totvert = dm->getNumVerts(dm);
if (orcodm) {
- orco= MEM_callocN(sizeof(float)*3*totvert, "dm orco");
+ orco = MEM_callocN(sizeof(float) * 3 * totvert, "dm orco");
if (orcodm->getNumVerts(orcodm) == totvert)
orcodm->getVertCos(orcodm, orco);
@@ -1023,18 +1054,18 @@ static void add_orco_dm(Scene *scene, Object *ob, DerivedMesh *dm, DerivedMesh *
dm->getVertCos(dm, orco);
}
else {
- orco= (float(*)[3])make_orco_curve(scene, ob);
+ orco = (float(*)[3])BKE_curve_make_orco(scene, ob);
}
- for (a=0; a<totvert; a++) {
+ for (a = 0; a < totvert; a++) {
float *co = orco[a];
- co[0] = (co[0]-cu->loc[0])/cu->size[0];
- co[1] = (co[1]-cu->loc[1])/cu->size[1];
- co[2] = (co[2]-cu->loc[2])/cu->size[2];
+ co[0] = (co[0] - cu->loc[0]) / cu->size[0];
+ co[1] = (co[1] - cu->loc[1]) / cu->size[1];
+ co[2] = (co[2] - cu->loc[2]) / cu->size[2];
}
if ((layerorco = DM_get_vert_data_layer(dm, CD_ORCO))) {
- memcpy(layerorco, orco, sizeof(float)*totvert);
+ memcpy(layerorco, orco, sizeof(float) * totvert);
MEM_freeN(orco);
}
else
@@ -1043,38 +1074,45 @@ static void add_orco_dm(Scene *scene, Object *ob, DerivedMesh *dm, DerivedMesh *
static void curve_calc_orcodm(Scene *scene, Object *ob, DerivedMesh *derivedFinal, int forRender)
{
- /* this function represents logic of mesh's orcodm calculation */
- /* for displist-based objects */
+ /* this function represents logic of mesh's orcodm calculation
+ * for displist-based objects
+ */
ModifierData *md = modifiers_getVirtualModifierList(ob);
ModifierData *pretessellatePoint;
- Curve *cu= ob->data;
+ Curve *cu = ob->data;
int required_mode;
int editmode = (!forRender && cu->editnurb);
- DerivedMesh *ndm, *orcodm= NULL;
+ DerivedMesh *ndm, *orcodm = NULL;
- if (forRender) required_mode = eModifierMode_Render;
- else required_mode = eModifierMode_Realtime;
+ if (forRender)
+ required_mode = eModifierMode_Render;
+ else
+ required_mode = eModifierMode_Realtime;
pretessellatePoint = curve_get_tessellate_point(scene, ob, forRender, editmode);
- if (editmode) required_mode |= eModifierMode_Editmode;
+ if (editmode)
+ required_mode |= eModifierMode_Editmode;
if (pretessellatePoint) {
md = pretessellatePoint->next;
}
- for (; md; md=md->next) {
+ for (; md; md = md->next) {
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
- md->scene= scene;
+ md->scene = scene;
- if ((md->mode & required_mode) != required_mode) continue;
- if (mti->isDisabled && mti->isDisabled(md, forRender)) continue;
- if (mti->type!=eModifierTypeType_Constructive) continue;
+ if ((md->mode & required_mode) != required_mode)
+ continue;
+ if (mti->isDisabled && mti->isDisabled(md, forRender))
+ continue;
+ if (mti->type != eModifierTypeType_Constructive)
+ continue;
if (!orcodm)
- orcodm= create_orco_dm(scene, ob);
+ orcodm = create_orco_dm(scene, ob);
ndm = mti->applyModifier(md, ob, orcodm, forRender, 0);
@@ -1094,8 +1132,8 @@ static void curve_calc_orcodm(Scene *scene, Object *ob, DerivedMesh *derivedFina
orcodm->release(orcodm);
}
-void makeDispListSurf(Scene *scene, Object *ob, ListBase *dispbase,
- DerivedMesh **derivedFinal, int forRender, int forOrco)
+void BKE_displist_make_surf(Scene *scene, Object *ob, ListBase *dispbase,
+ DerivedMesh **derivedFinal, int forRender, int forOrco)
{
ListBase *nubase;
Nurb *nu;
@@ -1108,68 +1146,70 @@ void makeDispListSurf(Scene *scene, Object *ob, ListBase *dispbase,
float (*deformedVerts)[3];
if (!forRender && cu->editnurb)
- nubase= curve_editnurbs(cu);
+ nubase = BKE_curve_editNurbs_get(cu);
else
- nubase= &cu->nurb;
+ nubase = &cu->nurb;
if (!forOrco)
curve_calc_modifiers_pre(scene, ob, forRender, &originalVerts, &deformedVerts, &numVerts);
- for (nu=nubase->first; nu; nu=nu->next) {
- if (forRender || nu->hide==0) {
- int resolu= nu->resolu, resolv= nu->resolv;
+ for (nu = nubase->first; nu; nu = nu->next) {
+ if (forRender || nu->hide == 0) {
+ int resolu = nu->resolu, resolv = nu->resolv;
if (forRender) {
- if (cu->resolu_ren) resolu= cu->resolu_ren;
- if (cu->resolv_ren) resolv= cu->resolv_ren;
+ if (cu->resolu_ren)
+ resolu = cu->resolu_ren;
+ if (cu->resolv_ren)
+ resolv = cu->resolv_ren;
}
- if (nu->pntsv==1) {
- len= SEGMENTSU(nu)*resolu;
+ if (nu->pntsv == 1) {
+ len = SEGMENTSU(nu) * resolu;
- dl= MEM_callocN(sizeof(DispList), "makeDispListsurf");
- dl->verts= MEM_callocN(len*3*sizeof(float), "dlverts");
+ dl = MEM_callocN(sizeof(DispList), "makeDispListsurf");
+ dl->verts = MEM_callocN(len * 3 * sizeof(float), "dlverts");
BLI_addtail(dispbase, dl);
- dl->parts= 1;
- dl->nr= len;
- dl->col= nu->mat_nr;
- dl->charidx= nu->charidx;
+ dl->parts = 1;
+ dl->nr = len;
+ dl->col = nu->mat_nr;
+ dl->charidx = nu->charidx;
/* dl->rt will be used as flag for render face and */
/* CU_2D conflicts with R_NOPUNOFLIP */
- dl->rt= nu->flag & ~CU_2D;
+ dl->rt = nu->flag & ~CU_2D;
- data= dl->verts;
- if (nu->flagu & CU_NURB_CYCLIC) dl->type= DL_POLY;
- else dl->type= DL_SEGM;
+ data = dl->verts;
+ if (nu->flagu & CU_NURB_CYCLIC) dl->type = DL_POLY;
+ else dl->type = DL_SEGM;
- makeNurbcurve(nu, data, NULL, NULL, NULL, resolu, 3*sizeof(float));
+ BKE_nurb_makeCurve(nu, data, NULL, NULL, NULL, resolu, 3 * sizeof(float));
}
else {
- len= (nu->pntsu*resolu) * (nu->pntsv*resolv);
-
- dl= MEM_callocN(sizeof(DispList), "makeDispListsurf");
- dl->verts= MEM_callocN(len*3*sizeof(float), "dlverts");
+ len = (nu->pntsu * resolu) * (nu->pntsv * resolv);
+
+ dl = MEM_callocN(sizeof(DispList), "makeDispListsurf");
+ dl->verts = MEM_callocN(len * 3 * sizeof(float), "dlverts");
BLI_addtail(dispbase, dl);
- dl->col= nu->mat_nr;
- dl->charidx= nu->charidx;
+ dl->col = nu->mat_nr;
+ dl->charidx = nu->charidx;
/* dl->rt will be used as flag for render face and */
/* CU_2D conflicts with R_NOPUNOFLIP */
- dl->rt= nu->flag & ~CU_2D;
+ dl->rt = nu->flag & ~CU_2D;
+
+ data = dl->verts;
+ dl->type = DL_SURF;
- data= dl->verts;
- dl->type= DL_SURF;
+ dl->parts = (nu->pntsu * resolu); /* in reverse, because makeNurbfaces works that way */
+ dl->nr = (nu->pntsv * resolv);
+ if (nu->flagv & CU_NURB_CYCLIC) dl->flag |= DL_CYCL_U; /* reverse too! */
+ if (nu->flagu & CU_NURB_CYCLIC) dl->flag |= DL_CYCL_V;
- dl->parts= (nu->pntsu*resolu); /* in reverse, because makeNurbfaces works that way */
- dl->nr= (nu->pntsv*resolv);
- if (nu->flagv & CU_NURB_CYCLIC) dl->flag|= DL_CYCL_U; /* reverse too! */
- if (nu->flagu & CU_NURB_CYCLIC) dl->flag|= DL_CYCL_V;
+ BKE_nurb_makeFaces(nu, data, 0, resolu, resolv);
- makeNurbfaces(nu, data, 0, resolu, resolv);
-
/* gl array drawing: using indices */
displist_surf_indices(dl);
}
@@ -1179,15 +1219,16 @@ void makeDispListSurf(Scene *scene, Object *ob, ListBase *dispbase,
/* make copy of 'undeformed" displist for texture space calculation
* actually, it's not totally undeformed -- pre-tessellation modifiers are
* already applied, thats how it worked for years, so keep for compatibility (sergey) */
- copy_displist(&cu->disp, dispbase);
+ BKE_displist_copy(&cu->disp, dispbase);
if (!forRender) {
- tex_space_curve(cu);
+ BKE_curve_texspace_calc(cu);
}
- if (!forOrco)
+ if (!forOrco) {
curve_calc_modifiers_post(scene, ob, dispbase, derivedFinal,
- forRender, originalVerts, deformedVerts);
+ forRender, originalVerts, deformedVerts);
+ }
}
static void rotateBevelPiece(Curve *cu, BevPoint *bevp, DispList *dlb, float widfac, float fac, float **data_r)
@@ -1196,64 +1237,66 @@ static void rotateBevelPiece(Curve *cu, BevPoint *bevp, DispList *dlb, float wid
int b;
fp = dlb->verts;
- for (b = 0; b<dlb->nr; b++,fp += 3,data += 3) {
+ for (b = 0; b < dlb->nr; b++, fp += 3, data += 3) {
if (cu->flag & CU_3D) {
float vec[3];
- vec[0] = fp[1]+widfac;
+ vec[0] = fp[1] + widfac;
vec[1] = fp[2];
- vec[2 ]= 0.0;
+ vec[2] = 0.0;
mul_qt_v3(bevp->quat, vec);
- data[0] = bevp->vec[0] + fac*vec[0];
- data[1] = bevp->vec[1] + fac*vec[1];
- data[2] = bevp->vec[2] + fac*vec[2];
+ data[0] = bevp->vec[0] + fac * vec[0];
+ data[1] = bevp->vec[1] + fac * vec[1];
+ data[2] = bevp->vec[2] + fac * vec[2];
}
else {
- data[0] = bevp->vec[0] + fac*(widfac+fp[1])*bevp->sina;
- data[1] = bevp->vec[1] + fac*(widfac+fp[1])*bevp->cosa;
- data[2] = bevp->vec[2] + fac*fp[2];
+ data[0] = bevp->vec[0] + fac * (widfac + fp[1]) * bevp->sina;
+ data[1] = bevp->vec[1] + fac * (widfac + fp[1]) * bevp->cosa;
+ data[2] = bevp->vec[2] + fac * fp[2];
}
}
*data_r = data;
}
-static void fillBevelCap(Curve *cu, Nurb *nu, BevPoint *bevp, DispList *dlb, float fac, float widfac, ListBase *dispbase)
+static void fillBevelCap(Nurb *nu, DispList *dlb, float *prev_fp, ListBase *dispbase)
{
DispList *dl;
float *data;
+ int b;
- dl= MEM_callocN(sizeof(DispList), "makeDispListbev2");
- dl->verts= data= MEM_callocN(3*sizeof(float)*dlb->nr, "dlverts");
+ dl = MEM_callocN(sizeof(DispList), "makeDispListbev2");
+ dl->verts = data = MEM_callocN(3 * sizeof(float) * dlb->nr, "dlverts");
- dl->type= DL_POLY;
+ dl->type = DL_POLY;
- dl->parts= 1;
- dl->nr= dlb->nr;
- dl->col= nu->mat_nr;
- dl->charidx= nu->charidx;
+ dl->parts = 1;
+ dl->nr = dlb->nr;
+ dl->col = nu->mat_nr;
+ dl->charidx = nu->charidx;
/* dl->rt will be used as flag for render face and */
/* CU_2D conflicts with R_NOPUNOFLIP */
- dl->rt= nu->flag & ~CU_2D;
+ dl->rt = nu->flag & ~CU_2D;
- rotateBevelPiece(cu, bevp, dlb, widfac, fac, &data);
+ for (b = 0; b < dlb->nr; b++, prev_fp += 3, data += 3)
+ copy_v3_v3(data, prev_fp);
BLI_addtail(dispbase, dl);
}
static void do_makeDispListCurveTypes(Scene *scene, Object *ob, ListBase *dispbase,
- DerivedMesh **derivedFinal, int forRender, int forOrco)
+ DerivedMesh **derivedFinal, int forRender, int forOrco)
{
Curve *cu = ob->data;
/* we do allow duplis... this is only displist on curve level */
if (!ELEM3(ob->type, OB_SURF, OB_CURVE, OB_FONT)) return;
- if (ob->type==OB_SURF) {
- makeDispListSurf(scene, ob, dispbase, derivedFinal, forRender, forOrco);
+ if (ob->type == OB_SURF) {
+ BKE_displist_make_surf(scene, ob, dispbase, derivedFinal, forRender, forOrco);
}
else if (ELEM(ob->type, OB_CURVE, OB_FONT)) {
ListBase dlbev;
@@ -1262,32 +1305,34 @@ static void do_makeDispListCurveTypes(Scene *scene, Object *ob, ListBase *dispba
float (*deformedVerts)[3];
int numVerts;
- nubase= BKE_curve_nurbs(cu);
+ nubase = BKE_curve_nurbs_get(cu);
BLI_freelistN(&(cu->bev));
if (cu->path) free_path(cu->path);
- cu->path= NULL;
+ cu->path = NULL;
- if (ob->type==OB_FONT) BKE_text_to_curve(G.main, scene, ob, 0);
+ if (ob->type == OB_FONT)
+ BKE_vfont_to_curve(G.main, scene, ob, 0);
- if (!forOrco) curve_calc_modifiers_pre(scene, ob, forRender, &originalVerts, &deformedVerts, &numVerts);
+ if (!forOrco)
+ curve_calc_modifiers_pre(scene, ob, forRender, &originalVerts, &deformedVerts, &numVerts);
- makeBevelList(ob);
+ BKE_curve_bevelList_make(ob);
/* If curve has no bevel will return nothing */
- makebevelcurve(scene, ob, &dlbev, forRender);
+ BKE_curve_bevel_make(scene, ob, &dlbev, forRender);
/* no bevel or extrude, and no width correction? */
- if (!dlbev.first && cu->width==1.0f) {
+ if (!dlbev.first && cu->width == 1.0f) {
curve_to_displist(cu, nubase, dispbase, forRender);
}
else {
- float widfac= cu->width - 1.0f;
- BevList *bl= cu->bev.first;
- Nurb *nu= nubase->first;
+ float widfac = cu->width - 1.0f;
+ BevList *bl = cu->bev.first;
+ Nurb *nu = nubase->first;
- for (; bl && nu; bl=bl->next,nu=nu->next) {
+ for (; bl && nu; bl = bl->next, nu = nu->next) {
DispList *dl;
float *data;
BevPoint *bevp;
@@ -1296,34 +1341,34 @@ static void do_makeDispListCurveTypes(Scene *scene, Object *ob, ListBase *dispba
if (bl->nr) { /* blank bevel lists can happen */
/* exception handling; curve without bevel or extrude, with width correction */
- if (dlbev.first==NULL) {
- dl= MEM_callocN(sizeof(DispList), "makeDispListbev");
- dl->verts= MEM_callocN(3*sizeof(float)*bl->nr, "dlverts");
+ if (dlbev.first == NULL) {
+ dl = MEM_callocN(sizeof(DispList), "makeDispListbev");
+ dl->verts = MEM_callocN(3 * sizeof(float) * bl->nr, "dlverts");
BLI_addtail(dispbase, dl);
- if (bl->poly!= -1) dl->type= DL_POLY;
- else dl->type= DL_SEGM;
+ if (bl->poly != -1) dl->type = DL_POLY;
+ else dl->type = DL_SEGM;
- if (dl->type==DL_SEGM) dl->flag = (DL_FRONT_CURVE|DL_BACK_CURVE);
+ if (dl->type == DL_SEGM) dl->flag = (DL_FRONT_CURVE | DL_BACK_CURVE);
- dl->parts= 1;
- dl->nr= bl->nr;
- dl->col= nu->mat_nr;
- dl->charidx= nu->charidx;
+ dl->parts = 1;
+ dl->nr = bl->nr;
+ dl->col = nu->mat_nr;
+ dl->charidx = nu->charidx;
/* dl->rt will be used as flag for render face and */
/* CU_2D conflicts with R_NOPUNOFLIP */
- dl->rt= nu->flag & ~CU_2D;
+ dl->rt = nu->flag & ~CU_2D;
- a= dl->nr;
- bevp= (BevPoint *)(bl+1);
- data= dl->verts;
+ a = dl->nr;
+ bevp = (BevPoint *)(bl + 1);
+ data = dl->verts;
while (a--) {
- data[0]= bevp->vec[0]+widfac*bevp->sina;
- data[1]= bevp->vec[1]+widfac*bevp->cosa;
- data[2]= bevp->vec[2];
+ data[0] = bevp->vec[0] + widfac * bevp->sina;
+ data[1] = bevp->vec[1] + widfac * bevp->cosa;
+ data[2] = bevp->vec[2];
bevp++;
- data+=3;
+ data += 3;
}
}
else {
@@ -1331,53 +1376,93 @@ static void do_makeDispListCurveTypes(Scene *scene, Object *ob, ListBase *dispba
ListBase bottom_capbase = {NULL, NULL};
ListBase top_capbase = {NULL, NULL};
- for (dlb=dlbev.first; dlb; dlb=dlb->next) {
+ for (dlb = dlbev.first; dlb; dlb = dlb->next) {
+ int i, start, steps;
+ float bevfac1 = MIN2(cu->bevfac1, cu->bevfac2), bevfac2 = MAX2(cu->bevfac1, cu->bevfac2);
+ float firstblend = 0.0f, lastblend = 0.0f;
+
+ if (cu->bevfac1 - cu->bevfac2 == 0.0f)
+ continue;
+
+ start = (int)(bevfac1 * (bl->nr - 1));
+ steps = 2 + (int)((bevfac2) * (bl->nr - 1)) - start;
+ firstblend = 1.0f - ((float)bevfac1 * (bl->nr - 1) - (int)((float)bevfac1 * (bl->nr - 1)));
+ lastblend = (float)bevfac2 * (bl->nr - 1) - (int)((float)bevfac2 * (bl->nr - 1));
+
+ if (steps > bl->nr) {
+ steps = bl->nr;
+ lastblend = 1.0f;
+ }
+
/* for each part of the bevel use a separate displblock */
- dl= MEM_callocN(sizeof(DispList), "makeDispListbev1");
- dl->verts= data= MEM_callocN(3*sizeof(float)*dlb->nr*bl->nr, "dlverts");
+ dl = MEM_callocN(sizeof(DispList), "makeDispListbev1");
+ dl->verts = data = MEM_callocN(3 * sizeof(float) * dlb->nr * steps, "dlverts");
BLI_addtail(dispbase, dl);
-
- dl->type= DL_SURF;
-
- dl->flag= dlb->flag & (DL_FRONT_CURVE|DL_BACK_CURVE);
- if (dlb->type==DL_POLY) dl->flag |= DL_CYCL_U;
- if (bl->poly>=0) dl->flag |= DL_CYCL_V;
-
- dl->parts= bl->nr;
- dl->nr= dlb->nr;
- dl->col= nu->mat_nr;
- dl->charidx= nu->charidx;
+
+ dl->type = DL_SURF;
+
+ dl->flag = dlb->flag & (DL_FRONT_CURVE | DL_BACK_CURVE);
+ if (dlb->type == DL_POLY) dl->flag |= DL_CYCL_U;
+ if (bl->poly >= 0) dl->flag |= DL_CYCL_V;
+
+ dl->parts = steps;
+ dl->nr = dlb->nr;
+ dl->col = nu->mat_nr;
+ dl->charidx = nu->charidx;
/* dl->rt will be used as flag for render face and */
/* CU_2D conflicts with R_NOPUNOFLIP */
- dl->rt= nu->flag & ~CU_2D;
+ dl->rt = nu->flag & ~CU_2D;
+
+ dl->bevelSplitFlag = MEM_callocN(sizeof(*dl->col2) * ((steps + 0x1F) >> 5),
+ "bevelSplitFlag");
- dl->bevelSplitFlag= MEM_callocN(sizeof(*dl->col2)*((bl->nr+0x1F)>>5), "bevelSplitFlag");
-
/* for each point of poly make a bevel piece */
- bevp= (BevPoint *)(bl+1);
- for (a=0; a<bl->nr; a++,bevp++) {
- float fac=1.0;
- if (cu->taperobj==NULL) {
- if ( (cu->bevobj!=NULL) || !((cu->flag & CU_FRONT) || (cu->flag & CU_BACK)) )
+ bevp = (BevPoint *)(bl + 1) + start;
+ for (i = start, a = 0; a < steps; i++, bevp++, a++) {
+ float fac = 1.0;
+ float *cur_data = data;
+
+ if (cu->taperobj == NULL) {
+ if ( (cu->bevobj != NULL) || !((cu->flag & CU_FRONT) || (cu->flag & CU_BACK)) )
fac = bevp->radius;
}
else {
- fac = calc_taper(scene, cu->taperobj, a, bl->nr);
+ fac = BKE_displist_calc_taper(scene, cu->taperobj, i, bl->nr);
}
if (bevp->split_tag) {
- dl->bevelSplitFlag[a>>5] |= 1<<(a&0x1F);
+ dl->bevelSplitFlag[a >> 5] |= 1 << (a & 0x1F);
}
-
+
/* rotate bevel piece and write in data */
rotateBevelPiece(cu, bevp, dlb, widfac, fac, &data);
+ if (a == 1 || a == steps - 1) {
+ float *cur_fp = cur_data, *prev_fp = cur_data - 3 * dlb->nr;
+ int b;
+
+ for (b = 0; b < dlb->nr; b++, prev_fp += 3, cur_fp += 3) {
+ float cur[3], prev[3];
+
+ copy_v3_v3(cur, cur_fp);
+ copy_v3_v3(prev, prev_fp);
+
+ if (a == 1)
+ interp_v3_v3v3(prev, cur_fp, prev_fp, firstblend);
+ if (a == steps - 1)
+ interp_v3_v3v3(cur, prev_fp, cur_fp, lastblend);
+
+ copy_v3_v3(cur_fp, cur);
+ copy_v3_v3(prev_fp, prev);
+ }
+ }
+
if (cu->bevobj && (cu->flag & CU_FILL_CAPS)) {
- if (a == 0)
- fillBevelCap(cu, nu, bevp, dlb, fac, widfac, &bottom_capbase);
- else if (a == bl->nr - 1)
- fillBevelCap(cu, nu, bevp, dlb, fac, widfac, &top_capbase);
+ if (a == 1)
+ fillBevelCap(nu, dlb, cur_data - 3 * dlb->nr, &bottom_capbase);
+ if (a == steps - 1)
+ fillBevelCap(nu, dlb, cur_data, &top_capbase);
}
}
@@ -1386,34 +1471,36 @@ static void do_makeDispListCurveTypes(Scene *scene, Object *ob, ListBase *dispba
}
if (bottom_capbase.first) {
- filldisplist(&bottom_capbase, dispbase, 1);
- filldisplist(&top_capbase, dispbase, 0);
- freedisplist(&bottom_capbase);
- freedisplist(&top_capbase);
+ BKE_displist_fill(&bottom_capbase, dispbase, 1);
+ BKE_displist_fill(&top_capbase, dispbase, 0);
+ BKE_displist_free(&bottom_capbase);
+ BKE_displist_free(&top_capbase);
}
}
}
}
- freedisplist(&dlbev);
+ BKE_displist_free(&dlbev);
}
if (!(cu->flag & CU_DEFORM_FILL)) {
curve_to_filledpoly(cu, nubase, dispbase);
}
- if ((cu->flag & CU_PATH) && !forOrco) calc_curvepath(ob);
+ if ((cu->flag & CU_PATH) && !forOrco)
+ calc_curvepath(ob);
/* make copy of 'undeformed" displist for texture space calculation
* actually, it's not totally undeformed -- pre-tessellation modifiers are
* already applied, thats how it worked for years, so keep for compatibility (sergey) */
- copy_displist(&cu->disp, dispbase);
+ BKE_displist_copy(&cu->disp, dispbase);
if (!forRender) {
- tex_space_curve(cu);
+ BKE_curve_texspace_calc(cu);
}
- if (!forOrco) curve_calc_modifiers_post(scene, ob, dispbase, derivedFinal, forRender, originalVerts, deformedVerts);
+ if (!forOrco)
+ curve_calc_modifiers_post(scene, ob, dispbase, derivedFinal, forRender, originalVerts, deformedVerts);
if (cu->flag & CU_DEFORM_FILL && !ob->derivedFinal) {
curve_to_filledpoly(cu, nubase, dispbase);
@@ -1421,66 +1508,67 @@ static void do_makeDispListCurveTypes(Scene *scene, Object *ob, ListBase *dispba
}
}
-void makeDispListCurveTypes(Scene *scene, Object *ob, int forOrco)
+void BKE_displist_make_curveTypes(Scene *scene, Object *ob, int forOrco)
{
- Curve *cu= ob->data;
+ Curve *cu = ob->data;
ListBase *dispbase;
/* The same check for duplis as in do_makeDispListCurveTypes.
* Happens when curve used for constraint/bevel was converted to mesh.
* check there is still needed for render displist and orco displists. */
- if (!ELEM3(ob->type, OB_SURF, OB_CURVE, OB_FONT)) return;
+ if (!ELEM3(ob->type, OB_SURF, OB_CURVE, OB_FONT))
+ return;
- freedisplist(&(ob->disp));
- dispbase= &(ob->disp);
- freedisplist(dispbase);
+ BKE_displist_free(&(ob->disp));
+ dispbase = &(ob->disp);
+ BKE_displist_free(dispbase);
/* free displist used for textspace */
- freedisplist(&cu->disp);
+ BKE_displist_free(&cu->disp);
do_makeDispListCurveTypes(scene, ob, dispbase, &ob->derivedFinal, 0, forOrco);
if (ob->derivedFinal) {
- DM_set_object_boundbox (ob, ob->derivedFinal);
+ DM_set_object_boundbox(ob, ob->derivedFinal);
}
else {
- boundbox_displist (ob);
+ boundbox_displist(ob);
/* if there is no derivedMesh, object's boundbox is unneeded */
if (ob->bb) {
MEM_freeN(ob->bb);
- ob->bb= NULL;
+ ob->bb = NULL;
}
}
}
-void makeDispListCurveTypes_forRender(Scene *scene, Object *ob, ListBase *dispbase,
- DerivedMesh **derivedFinal, int forOrco)
+void BKE_displist_make_curveTypes_forRender(Scene *scene, Object *ob, ListBase *dispbase,
+ DerivedMesh **derivedFinal, int forOrco)
{
do_makeDispListCurveTypes(scene, ob, dispbase, derivedFinal, 1, forOrco);
}
-void makeDispListCurveTypes_forOrco(struct Scene *scene, struct Object *ob, struct ListBase *dispbase)
+void BKE_displist_make_curveTypes_forOrco(struct Scene *scene, struct Object *ob, struct ListBase *dispbase)
{
do_makeDispListCurveTypes(scene, ob, dispbase, NULL, 1, 1);
}
/* add Orco layer to the displist object which has got derived mesh and return orco */
-float *makeOrcoDispList(Scene *scene, Object *ob, DerivedMesh *derivedFinal, int forRender)
+float *BKE_displist_make_orco(Scene *scene, Object *ob, DerivedMesh *derivedFinal, int forRender)
{
float *orco;
if (derivedFinal == NULL)
- derivedFinal= ob->derivedFinal;
+ derivedFinal = ob->derivedFinal;
if (!derivedFinal->getVertDataArray(derivedFinal, CD_ORCO)) {
curve_calc_orcodm(scene, ob, derivedFinal, forRender);
}
- orco= derivedFinal->getVertDataArray(derivedFinal, CD_ORCO);
+ orco = derivedFinal->getVertDataArray(derivedFinal, CD_ORCO);
if (orco) {
- orco= MEM_dupallocN(orco);
+ orco = MEM_dupallocN(orco);
}
return orco;
@@ -1489,46 +1577,45 @@ float *makeOrcoDispList(Scene *scene, Object *ob, DerivedMesh *derivedFinal, int
/* this is confusing, there's also min_max_object, appplying the obmat... */
static void boundbox_displist(Object *ob)
{
- BoundBox *bb=NULL;
+ BoundBox *bb = NULL;
float min[3], max[3];
DispList *dl;
float *vert;
- int a, tot=0;
-
+ int a, tot = 0;
+
INIT_MINMAX(min, max);
if (ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT)) {
- Curve *cu= ob->data;
- int doit= 0;
+ Curve *cu = ob->data;
+ int doit = 0;
+
+ if (cu->bb == NULL) cu->bb = MEM_callocN(sizeof(BoundBox), "boundbox");
+ bb = cu->bb;
- if (cu->bb==NULL) cu->bb= MEM_callocN(sizeof(BoundBox), "boundbox");
- bb= cu->bb;
-
- dl= ob->disp.first;
+ dl = ob->disp.first;
while (dl) {
- if (dl->type==DL_INDEX3) tot= dl->nr;
- else tot= dl->nr*dl->parts;
-
- vert= dl->verts;
- for (a=0; a<tot; a++, vert+=3) {
- doit= 1;
+ if (dl->type == DL_INDEX3) tot = dl->nr;
+ else tot = dl->nr * dl->parts;
+
+ vert = dl->verts;
+ for (a = 0; a < tot; a++, vert += 3) {
+ doit = 1;
DO_MINMAX(vert, min, max);
}
- dl= dl->next;
+ dl = dl->next;
}
-
+
if (!doit) {
/* there's no geometry in displist, use zero-sized boundbox */
zero_v3(min);
zero_v3(max);
}
-
+
}
-
+
if (bb) {
- boundbox_set_from_min_max(bb, min, max);
+ BKE_boundbox_init_from_minmax(bb, min, max);
}
}
-
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index 9ce4d68eeed..2bde31cfd63 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -1,11 +1,20 @@
-/**
-***** BEGIN GPL LICENSE BLOCK *****
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
* Contributor(s): Miika Hämäläinen
*
* ***** END GPL LICENSE BLOCK *****
@@ -78,15 +87,15 @@
/* precalculated gaussian factors for 5x super sampling */
static float gaussianFactors[5] = { 0.996849f,
- 0.596145f,
- 0.596145f,
- 0.596145f,
- 0.524141f};
+ 0.596145f,
+ 0.596145f,
+ 0.596145f,
+ 0.524141f};
static float gaussianTotal = 3.309425f;
/* UV Image neighboring pixel table x and y list */
-static int neighX[8] = {1,1,0,-1,-1,-1, 0, 1};
-static int neighY[8] = {0,1,1, 1, 0,-1,-1,-1};
+static int neighX[8] = {1, 1, 0, -1, -1, -1, 0, 1};
+static int neighY[8] = {0, 1, 1, 1, 0, -1, -1, -1};
/* subframe_updateObject() flags */
#define UPDATE_PARENTS (1<<0)
@@ -110,7 +119,7 @@ static int neighY[8] = {0,1,1, 1, 0,-1,-1,-1};
#define MIN_WETNESS 0.001f
#define MAX_WETNESS 5.0f
/* dissolve macro */
-#define VALUE_DISSOLVE(VALUE, TIME, SCALE, LOG) (VALUE) = (LOG) ? (VALUE) * (pow(MIN_WETNESS,1.0f/(1.2f*((float)(TIME))/(SCALE)))) : (VALUE) - 1.0f/(TIME)*(SCALE)
+#define VALUE_DISSOLVE(VALUE, TIME, SCALE, LOG) (VALUE) = (LOG) ? (VALUE) * (pow(MIN_WETNESS, 1.0f/(1.2f*((float)(TIME))/(SCALE)))) : (VALUE) - 1.0f/(TIME)*(SCALE)
/***************************** Internal Structs ***************************/
@@ -231,13 +240,22 @@ static int dynamicPaint_surfaceNumOfPoints(DynamicPaintSurface *surface)
/* checks whether surface's format/type has realtime preview */
int dynamicPaint_surfaceHasColorPreview(DynamicPaintSurface *surface)
{
- if (surface->format == MOD_DPAINT_SURFACE_F_IMAGESEQ) return 0;
+ if (surface->format == MOD_DPAINT_SURFACE_F_IMAGESEQ) {
+ return 0;
+ }
else if (surface->format == MOD_DPAINT_SURFACE_F_VERTEX) {
if (surface->type == MOD_DPAINT_SURFACE_T_DISPLACE ||
- surface->type == MOD_DPAINT_SURFACE_T_WAVE) return 0;
- else return 1;
+ surface->type == MOD_DPAINT_SURFACE_T_WAVE)
+ {
+ return 0;
+ }
+ else {
+ return 1;
+ }
+ }
+ else {
+ return 1;
}
- else return 1;
}
/* get currently active surface (in user interface) */
@@ -367,18 +385,18 @@ void dynamicPaintSurface_updateType(struct DynamicPaintSurface *surface)
}
if (surface->type == MOD_DPAINT_SURFACE_T_PAINT) {
- strcat(surface->output_name,"paintmap");
- strcat(surface->output_name2,"wetmap");
+ strcat(surface->output_name, "paintmap");
+ strcat(surface->output_name2, "wetmap");
surface_setUniqueOutputName(surface, surface->output_name2, 1);
}
else if (surface->type == MOD_DPAINT_SURFACE_T_DISPLACE) {
- strcat(surface->output_name,"displace");
+ strcat(surface->output_name, "displace");
}
else if (surface->type == MOD_DPAINT_SURFACE_T_WEIGHT) {
- strcat(surface->output_name,"weight");
+ strcat(surface->output_name, "weight");
}
else if (surface->type == MOD_DPAINT_SURFACE_T_WAVE) {
- strcat(surface->output_name,"wave");
+ strcat(surface->output_name, "wave");
}
surface_setUniqueOutputName(surface, surface->output_name, 0);
@@ -393,11 +411,15 @@ void dynamicPaintSurface_updateType(struct DynamicPaintSurface *surface)
static int surface_totalSamples(DynamicPaintSurface *surface)
{
if (surface->format == MOD_DPAINT_SURFACE_F_IMAGESEQ &&
- surface->flags & MOD_DPAINT_ANTIALIAS)
- return (surface->data->total_points*5);
+ surface->flags & MOD_DPAINT_ANTIALIAS)
+ {
+ return (surface->data->total_points * 5);
+ }
if (surface->format == MOD_DPAINT_SURFACE_F_VERTEX &&
- surface->flags & MOD_DPAINT_ANTIALIAS && surface->data->adj_data)
+ surface->flags & MOD_DPAINT_ANTIALIAS && surface->data->adj_data)
+ {
return (surface->data->total_points+surface->data->adj_data->total_targets);
+ }
return surface->data->total_points;
}
@@ -518,11 +540,11 @@ static int subframe_updateObject(Scene *scene, Object *ob, int flags, float fram
/* ignore cache clear during subframe updates
* to not mess up cache validity */
object_cacheIgnoreClear(ob, 1);
- object_handle_update(scene, ob);
+ BKE_object_handle_update(scene, ob);
object_cacheIgnoreClear(ob, 0);
}
else
- where_is_object_time(scene, ob, frame);
+ BKE_object_where_is_calc_time(scene, ob, frame);
return 0;
}
@@ -548,8 +570,7 @@ static int surface_getBrushFlags(DynamicPaintSurface *surface, Scene *scene)
else
base = scene->base.first;
- while (base || go)
- {
+ while (base || go) {
brushObj = NULL;
/* select object */
@@ -559,8 +580,7 @@ static int surface_getBrushFlags(DynamicPaintSurface *surface, Scene *scene)
else
brushObj = base->object;
- if (!brushObj)
- {
+ if (!brushObj) {
if (surface->brush_group) go = go->next;
else base= base->next;
continue;
@@ -572,12 +592,10 @@ static int surface_getBrushFlags(DynamicPaintSurface *surface, Scene *scene)
base= base->next;
md = modifiers_findByType(brushObj, eModifierType_DynamicPaint);
- if (md && md->mode & (eModifierMode_Realtime | eModifierMode_Render))
- {
+ if (md && md->mode & (eModifierMode_Realtime | eModifierMode_Render)) {
DynamicPaintModifierData *pmd2 = (DynamicPaintModifierData *)md;
- if (pmd2->brush)
- {
+ if (pmd2->brush) {
DynamicPaintBrushSettings *brush = pmd2->brush;
if (brush->flags & MOD_DPAINT_USES_VELOCITY)
@@ -711,14 +729,14 @@ static void surfaceGenerateGrid(struct DynamicPaintSurface *surface)
/* get dimensions */
sub_v3_v3v3(dim, grid->grid_bounds.max, grid->grid_bounds.min);
copy_v3_v3(td, dim);
- min_dim = MAX3(td[0],td[1],td[2]) / 1000.f;
+ min_dim = MAX3(td[0], td[1], td[2]) / 1000.f;
/* deactivate zero axises */
for (i=0; i<3; i++) {
if (td[i]<min_dim) {td[i]=1.0f; axis-=1;}
}
- if (axis == 0 || MAX3(td[0],td[1],td[2]) < 0.0001f) {
+ if (axis == 0 || MAX3(td[0], td[1], td[2]) < 0.0001f) {
MEM_freeN(grid_bounds);
MEM_freeN(bData->grid);
bData->grid = NULL;
@@ -888,8 +906,10 @@ void surface_freeUnusedData(DynamicPaintSurface *surface)
/* free bakedata if not active or surface is baked */
if (!(surface->flags & MOD_DPAINT_ACTIVE) ||
- (surface->pointcache && surface->pointcache->flag & PTCACHE_BAKED))
+ (surface->pointcache && surface->pointcache->flag & PTCACHE_BAKED))
+ {
free_bakeData(surface->data);
+ }
}
void dynamicPaint_freeSurfaceData(DynamicPaintSurface *surface)
@@ -1219,9 +1239,13 @@ static int surface_usesAdjData(DynamicPaintSurface *surface)
{
if (surface_usesAdjDistance(surface)) return 1;
if (surface->format == MOD_DPAINT_SURFACE_F_VERTEX &&
- surface->flags & MOD_DPAINT_ANTIALIAS) return 1;
-
- return 0;
+ surface->flags & MOD_DPAINT_ANTIALIAS)
+ {
+ return 1;
+ }
+ else {
+ return 0;
+ }
}
/* initialize surface adjacency data */
@@ -1294,10 +1318,12 @@ static void dynamicPaint_initAdjacencyData(DynamicPaintSurface *surface, int for
/* now check if total number of edges+faces for
* each vertex is even, if not -> vertex is on mesh edge */
for (i=0; i<sData->total_points; i++) {
- if ((temp_data[i]%2) ||
- temp_data[i] < 4)
+ if ((temp_data[i] % 2) ||
+ (temp_data[i] < 4))
+ {
ad->flags[i] |= ADJ_ON_MESH_EDGE;
-
+ }
+
/* reset temp data */
temp_data[i] = 0;
}
@@ -1411,8 +1437,8 @@ void dynamicPaint_setInitialColor(DynamicPaintSurface *surface)
}
/* interpolate final uv pos */
- interp_v3_v3v3v3( uv_final, &uv[0], &uv[3], &uv[6],
- f_data->barycentricWeights[i*samples].v);
+ interp_v3_v3v3v3(uv_final, &uv[0], &uv[3], &uv[6],
+ f_data->barycentricWeights[i*samples].v);
/* remap to -1.0 to 1.0 */
uv_final[0] = uv_final[0]*2.0f - 1.0f;
uv_final[1] = uv_final[1]*2.0f - 1.0f;
@@ -1452,7 +1478,7 @@ void dynamicPaint_setInitialColor(DynamicPaintSurface *surface)
#pragma omp parallel for schedule(static)
for (i=0; i<sData->total_points; i++) {
int face_ind = f_data->uv_p[i].face_index;
- float colors[3][4] = {{0.0f,0.0f,0.0f,0.0f}};
+ float colors[3][4] = {{0.0f, 0.0f, 0.0f, 0.0f}};
float final_color[4];
int j;
/* collect color values */
@@ -1465,8 +1491,8 @@ void dynamicPaint_setInitialColor(DynamicPaintSurface *surface)
}
/* interpolate final color */
- interp_v4_v4v4v4( final_color, colors[0], colors[1], colors[2],
- f_data->barycentricWeights[i*samples].v);
+ interp_v4_v4v4v4(final_color, colors[0], colors[1], colors[2],
+ f_data->barycentricWeights[i*samples].v);
copy_v3_v3(pPoint[i].color, final_color);
pPoint[i].alpha = final_color[3];
@@ -1863,8 +1889,10 @@ static void dynamicPaint_frameUpdate(DynamicPaintModifierData *pmd, Scene *scene
/* restore canvas derivedmesh if required */
if (surface->type == MOD_DPAINT_SURFACE_T_DISPLACE &&
- surface->flags & MOD_DPAINT_DISP_INCREMENTAL && surface->next)
+ surface->flags & MOD_DPAINT_DISP_INCREMENTAL && surface->next)
+ {
canvas_copyDerivedMesh(canvas, dm);
+ }
BKE_ptcache_validate(cache, surface->current_frame);
BKE_ptcache_write(&pid, surface->current_frame);
@@ -1895,8 +1923,8 @@ struct DerivedMesh *dynamicPaint_Modifier_do(DynamicPaintModifierData *pmd, Scen
* Tries to find the neighboring pixel in given (uv space) direction.
* Result is used by effect system to move paint on the surface.
*
-* px,py : origin pixel x and y
-* n_index : lookup direction index (use neighX,neighY to get final index)
+* px, py : origin pixel x and y
+* n_index : lookup direction index (use neighX, neighY to get final index)
*/
static int dynamicPaint_findNeighbourPixel(PaintUVPoint *tempPoints, DerivedMesh *dm,
const char *uvname, int w, int h, int px, int py, int n_index)
@@ -1906,7 +1934,7 @@ static int dynamicPaint_findNeighbourPixel(PaintUVPoint *tempPoints, DerivedMesh
* and faster/simplier than including possible face tip point links)
*/
- int x,y;
+ int x, y;
PaintUVPoint *tPoint = NULL;
PaintUVPoint *cPoint = NULL;
@@ -2042,9 +2070,12 @@ static int dynamicPaint_findNeighbourPixel(PaintUVPoint *tempPoints, DerivedMesh
//printf("connected UV : %f,%f & %f,%f - %f,%f & %f,%f\n", s_uv1[0], s_uv1[1], s_uv2[0], s_uv2[1], t_uv1[0], t_uv1[1], t_uv2[0], t_uv2[1]);
if (((s_uv1[0] == t_uv1[0] && s_uv1[1] == t_uv1[1]) &&
- (s_uv2[0] == t_uv2[0] && s_uv2[1] == t_uv2[1]) ) ||
- ((s_uv2[0] == t_uv1[0] && s_uv2[1] == t_uv1[1]) &&
- (s_uv1[0] == t_uv2[0] && s_uv1[1] == t_uv2[1]) )) return ((px+neighX[n_index]) + w*(py+neighY[n_index]));
+ (s_uv2[0] == t_uv2[0] && s_uv2[1] == t_uv2[1]) ) ||
+ ((s_uv2[0] == t_uv1[0] && s_uv2[1] == t_uv1[1]) &&
+ (s_uv1[0] == t_uv2[0] && s_uv1[1] == t_uv2[1]) ))
+ {
+ return ((px+neighX[n_index]) + w*(py+neighY[n_index]));
+ }
/*
* Find a point that is relatively at same edge position
@@ -2099,7 +2130,7 @@ int dynamicPaint_createUVSurface(DynamicPaintSurface *surface)
0.4f, -0.2f,
-0.4f, 0.3f};
int ty;
- int w,h;
+ int w, h;
int numOfFaces;
char uvname[MAX_CUSTOMDATA_LAYER_NAME];
int active_points = 0;
@@ -2185,11 +2216,9 @@ int dynamicPaint_createUVSurface(DynamicPaintSurface *surface)
*/
if (!error) {
#pragma omp parallel for schedule(static)
- for (ty = 0; ty < h; ty++)
- {
+ for (ty = 0; ty < h; ty++) {
int tx;
- for (tx = 0; tx < w; tx++)
- {
+ for (tx = 0; tx < w; tx++) {
int i, sample;
int index = tx+w*ty;
PaintUVPoint *tPoint = (&tempPoints[index]);
@@ -2197,7 +2226,7 @@ int dynamicPaint_createUVSurface(DynamicPaintSurface *surface)
short isInside = 0; /* if point is inside a uv face */
float d1[2], d2[2], d3[2], point[5][2];
- float dot00,dot01,dot02,dot11,dot12, invDenom, u,v;
+ float dot00, dot01, dot02, dot11, dot12, invDenom, u, v;
/* Init per pixel settings */
tPoint->face_index = -1;
@@ -2238,7 +2267,7 @@ int dynamicPaint_createUVSurface(DynamicPaintSurface *surface)
if (faceBB[i].max[1] < (point[sample][1])) continue;
/* Calculate point inside a triangle check
- * for uv0,1,2 */
+ * for uv0, 1, 2 */
sub_v2_v2v2(d1, tface[i].uv[2], tface[i].uv[0]); // uv2 - uv0
sub_v2_v2v2(d2, tface[i].uv[1], tface[i].uv[0]); // uv1 - uv0
sub_v2_v2v2(d3, point[sample], tface[i].uv[0]); // point - uv0
@@ -2257,8 +2286,7 @@ int dynamicPaint_createUVSurface(DynamicPaintSurface *surface)
/* If collision wasn't found but the face is a quad
* do another check for the second half */
- if ((!isInside) && mface[i].v4)
- {
+ if ((!isInside) && mface[i].v4) {
/* change d2 to test the other half */
sub_v2_v2v2(d2, tface[i].uv[3], tface[i].uv[0]); // uv3 - uv0
@@ -2330,18 +2358,16 @@ int dynamicPaint_createUVSurface(DynamicPaintSurface *surface)
* (To avoid seams on uv island edges)
*/
#pragma omp parallel for schedule(static)
- for (ty = 0; ty < h; ty++)
- {
+ for (ty = 0; ty < h; ty++) {
int tx;
- for (tx = 0; tx < w; tx++)
- {
+ for (tx = 0; tx < w; tx++) {
int index = tx+w*ty;
PaintUVPoint *tPoint = (&tempPoints[index]);
/* If point isn't't on canvas mesh */
if (tPoint->face_index == -1) {
int u_min, u_max, v_min, v_max;
- int u,v, ind;
+ int u, v, ind;
float point[2];
/* get loop area */
@@ -2408,11 +2434,9 @@ int dynamicPaint_createUVSurface(DynamicPaintSurface *surface)
* When base loop is over convert found neighbor indexes to real ones
* Also count the final number of active surface points
*/
- for (ty = 0; ty < h; ty++)
- {
+ for (ty = 0; ty < h; ty++) {
int tx;
- for (tx = 0; tx < w; tx++)
- {
+ for (tx = 0; tx < w; tx++) {
int index = tx+w*ty;
PaintUVPoint *tPoint = (&tempPoints[index]);
@@ -2440,11 +2464,9 @@ int dynamicPaint_createUVSurface(DynamicPaintSurface *surface)
if (sData->adj_data) {
PaintAdjData *ed = sData->adj_data;
unsigned int n_pos = 0;
- for (ty = 0; ty < h; ty++)
- {
+ for (ty = 0; ty < h; ty++) {
int tx;
- for (tx = 0; tx < w; tx++)
- {
+ for (tx = 0; tx < w; tx++) {
int i, index = tx+w*ty;
if (tempPoints[index].face_index != -1) {
@@ -2576,8 +2598,7 @@ void dynamicPaint_outputSurfaceImage(DynamicPaintSurface *surface, char* filenam
if (ibuf == NULL) {setError(surface->canvas, "Image save failed: Not enough free memory.");return;}
#pragma omp parallel for schedule(static)
- for (index = 0; index < sData->total_points; index++)
- {
+ for (index = 0; index < sData->total_points; index++) {
int pos=f_data->uv_p[index].pixel_index*4; /* image buffer position */
/* Set values of preferred type */
@@ -2684,7 +2705,7 @@ static void dynamicPaint_updateBrushMaterials(Object *brushOb, Material *ui_mat,
if (tot) {
bMats->ob_mats = MEM_callocN(sizeof(Material*)*(tot), "BrushMaterials");
for (i=0; i<tot; i++) {
- bMats->ob_mats[i] = RE_init_sample_material(give_current_material(brushOb,(i+1)), scene);
+ bMats->ob_mats[i] = RE_init_sample_material(give_current_material(brushOb, (i+1)), scene);
}
}
bMats->tot = tot;
@@ -2759,8 +2780,7 @@ static void mesh_faces_spherecast_dp(void *userdata, int index, const BVHTreeRay
{
float dist = bvhtree_ray_tri_intersection(ray, hit->dist, t0, t1, t2);
- if (dist >= 0 && dist < hit->dist)
- {
+ if (dist >= 0 && dist < hit->dist) {
hit->index = index;
hit->dist = dist;
hit->no[0] = (quad) ? 1.0f : 0.0f;
@@ -2780,7 +2800,7 @@ static void mesh_faces_spherecast_dp(void *userdata, int index, const BVHTreeRay
* To optimize brush detection speed this doesn't calculate hit normal.
* If ray hit the second half of a quad, no[0] is set to 1.0f, else 0.0f
*/
-static void mesh_faces_nearest_point_dp(void *userdata, int index, const float *co, BVHTreeNearest *nearest)
+static void mesh_faces_nearest_point_dp(void *userdata, int index, const float co[3], BVHTreeNearest *nearest)
{
const BVHTreeFromMesh *data = (BVHTreeFromMesh*) userdata;
MVert *vert = data->vert;
@@ -2799,8 +2819,7 @@ static void mesh_faces_nearest_point_dp(void *userdata, int index, const float *
int vertex, edge;
dist = nearest_point_in_tri_surface(t0, t1, t2, co, &vertex, &edge, nearest_tmp);
- if (dist < nearest->dist)
- {
+ if (dist < nearest->dist) {
nearest->index = index;
nearest->dist = dist;
copy_v3_v3(nearest->co, nearest_tmp);
@@ -3047,7 +3066,7 @@ static void dynamicPaint_brushMeshCalculateVelocity(Scene *scene, Object *ob, Dy
scene->r.cfra = prev_fra;
scene->r.subframe = prev_sfra;
- subframe_updateObject(scene, ob, UPDATE_EVERYTHING, BKE_curframe(scene));
+ subframe_updateObject(scene, ob, UPDATE_EVERYTHING, BKE_scene_frame_get(scene));
dm_p = CDDM_copy(brush->dm);
numOfVerts_p = dm_p->getNumVerts(dm_p);
mvert_p = dm_p->getVertArray(dm_p);
@@ -3057,7 +3076,7 @@ static void dynamicPaint_brushMeshCalculateVelocity(Scene *scene, Object *ob, Dy
scene->r.cfra = cur_fra;
scene->r.subframe = cur_sfra;
- subframe_updateObject(scene, ob, UPDATE_EVERYTHING, BKE_curframe(scene));
+ subframe_updateObject(scene, ob, UPDATE_EVERYTHING, BKE_scene_frame_get(scene));
dm_c = brush->dm;
numOfVerts_c = dm_c->getNumVerts(dm_c);
mvert_c = dm_p->getVertArray(dm_c);
@@ -3107,13 +3126,13 @@ static void dynamicPaint_brushObjectCalculateVelocity(Scene *scene, Object *ob,
/* previous frame dm */
scene->r.cfra = prev_fra;
scene->r.subframe = prev_sfra;
- subframe_updateObject(scene, ob, UPDATE_PARENTS, BKE_curframe(scene));
+ subframe_updateObject(scene, ob, UPDATE_PARENTS, BKE_scene_frame_get(scene));
copy_m4_m4(prev_obmat, ob->obmat);
/* current frame dm */
scene->r.cfra = cur_fra;
scene->r.subframe = cur_sfra;
- subframe_updateObject(scene, ob, UPDATE_PARENTS, BKE_curframe(scene));
+ subframe_updateObject(scene, ob, UPDATE_PARENTS, BKE_scene_frame_get(scene));
/* calculate speed */
mul_m4_v3(prev_obmat, prev_loc);
@@ -3179,7 +3198,7 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface,
if (brush->flags & MOD_DPAINT_PROX_PROJECT && brush->collision != MOD_DPAINT_COL_VOLUME) {
mul_v3_fl(avg_brushNor, 1.0f/(float)numOfVerts);
/* instead of null vector use positive z */
- if (!(MIN3(avg_brushNor[0],avg_brushNor[1],avg_brushNor[2])))
+ if (!(MIN3(avg_brushNor[0], avg_brushNor[1], avg_brushNor[2])))
avg_brushNor[2] = 1.0f;
else
normalize_v3(avg_brushNor);
@@ -3188,8 +3207,7 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface,
/* check bounding box collision */
if (grid && meshBrush_boundsIntersect(&grid->grid_bounds, &mesh_bb, brush, brush_radius))
/* Build a bvh tree from transformed vertices */
- if (bvhtree_from_mesh_faces(&treeData, dm, 0.0f, 4, 8))
- {
+ if (bvhtree_from_mesh_faces(&treeData, dm, 0.0f, 4, 8)) {
int c_index;
int total_cells = grid->dim[0]*grid->dim[1]*grid->dim[2];
@@ -3203,8 +3221,7 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface,
/* loop through cell points and process brush */
#pragma omp parallel for schedule(static)
- for (id = 0; id < grid->s_num[c_index]; id++)
- {
+ for (id = 0; id < grid->s_num[c_index]; id++) {
int index = grid->t_index[grid->s_pos[c_index] + id];
int ss, samples = bData->s_num[index];
float total_sample = (float)samples;
@@ -3220,8 +3237,7 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface,
total_sample = gaussianTotal;
/* Supersampling */
- for (ss=0; ss<samples; ss++)
- {
+ for (ss=0; ss<samples; ss++) {
float ray_start[3], ray_dir[3];
float sample_factor = 0.0f;
@@ -3263,8 +3279,7 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface,
/* Check volume collision */
if (brush->collision == MOD_DPAINT_COL_VOLUME || brush->collision == MOD_DPAINT_COL_VOLDIST)
- if (BLI_bvhtree_ray_cast(treeData.tree, ray_start, ray_dir, 0.0f, &hit, mesh_faces_spherecast_dp, &treeData) != -1)
- {
+ if (BLI_bvhtree_ray_cast(treeData.tree, ray_start, ray_dir, 0.0f, &hit, mesh_faces_spherecast_dp, &treeData) != -1) {
/* We hit a triangle, now check if collision point normal is facing the point */
/* For optimization sake, hit point normal isn't calculated in ray cast loop */
@@ -3272,13 +3287,12 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface,
float dot;
if (quad) {v2=mface[hit.index].v3; v3=mface[hit.index].v4;}
- normal_tri_v3( hit.no, mvert[v1].co, mvert[v2].co, mvert[v3].co);
+ normal_tri_v3(hit.no, mvert[v1].co, mvert[v2].co, mvert[v3].co);
dot = ray_dir[0]*hit.no[0] + ray_dir[1]*hit.no[1] + ray_dir[2]*hit.no[2];
/* If ray and hit face normal are facing same direction
* hit point is inside a closed mesh. */
- if (dot>=0)
- {
+ if (dot>=0) {
float dist = hit.dist;
int f_index = hit.index;
@@ -3342,8 +3356,7 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface,
hit.dist = brush_radius;
/* Do a face normal directional raycast, and use that distance */
- if (BLI_bvhtree_ray_cast(treeData.tree, ray_start, proj_ray, 0.0f, &hit, mesh_faces_spherecast_dp, &treeData) != -1)
- {
+ if (BLI_bvhtree_ray_cast(treeData.tree, ray_start, proj_ray, 0.0f, &hit, mesh_faces_spherecast_dp, &treeData) != -1) {
proxDist = hit.dist;
madd_v3_v3v3fl(hitCo, ray_start, proj_ray, hit.dist); /* Calculate final hit coordinates */
hQuad = (hit.no[0] == 1.0f);
@@ -3398,7 +3411,7 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface,
/* velocity brush, only do on main sample */
if (brush->flags & MOD_DPAINT_USES_VELOCITY && ss==0 && brushVelocity) {
- int v1,v2,v3;
+ int v1, v2, v3;
float weights[4];
float brushPointVelocity[3];
float velocity[3];
@@ -3420,10 +3433,10 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface,
* todo: perhaps implement something that handles volume movement as well */
/* interpolate vertex speed vectors to get hit point velocity */
- interp_v3_v3v3v3( brushPointVelocity,
- brushVelocity[v1].v,
- brushVelocity[v2].v,
- brushVelocity[v3].v, weights);
+ interp_v3_v3v3v3(brushPointVelocity,
+ brushVelocity[v1].v,
+ brushVelocity[v2].v,
+ brushVelocity[v3].v, weights);
/* substract canvas point velocity */
if (bData->velocity) {
@@ -3446,8 +3459,7 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface,
/*
* Process hit color and alpha
*/
- if (surface->type == MOD_DPAINT_SURFACE_T_PAINT)
- {
+ if (surface->type == MOD_DPAINT_SURFACE_T_PAINT) {
float sampleColor[3];
float alpha_factor = 1.0f;
@@ -3589,8 +3601,7 @@ static int dynamicPaint_paintParticles(DynamicPaintSurface *surface,
BLI_begin_threaded_malloc();
/* only continue if particle bb is close enough to canvas bb */
- if (boundsIntersectDist(&grid->grid_bounds, &part_bb, range))
- {
+ if (boundsIntersectDist(&grid->grid_bounds, &part_bb, range)) {
int c_index;
int total_cells = grid->dim[0]*grid->dim[1]*grid->dim[2];
@@ -3603,13 +3614,14 @@ static int dynamicPaint_paintParticles(DynamicPaintSurface *surface,
/* check cell bounding box */
if (!grid->s_num[c_index] ||
- !boundsIntersectDist(&grid->bounds[c_index], &part_bb, range))
+ !boundsIntersectDist(&grid->bounds[c_index], &part_bb, range))
+ {
continue;
+ }
/* loop through cell points */
#pragma omp parallel for schedule(static)
- for (id = 0; id < grid->s_num[c_index]; id++)
- {
+ for (id = 0; id < grid->s_num[c_index]; id++) {
int index = grid->t_index[grid->s_pos[c_index] + id];
float disp_intersect = 0.0f;
float radius = 0.0f;
@@ -3714,8 +3726,7 @@ static int dynamicPaint_paintParticles(DynamicPaintSurface *surface,
}
}
- if (strength > 0.001f)
- {
+ if (strength > 0.001f) {
float paintColor[4] = {0.0f};
float depth = 0.0f;
@@ -3781,8 +3792,7 @@ static int dynamicPaint_paintSinglePoint(DynamicPaintSurface *surface, float *po
* Loop through every surface point
*/
#pragma omp parallel for schedule(static)
- for (index = 0; index < sData->total_points; index++)
- {
+ for (index = 0; index < sData->total_points; index++) {
float distance = len_v3v3(pointCoord, bData->realCoord[bData->s_pos[index]].v);
float colorband[4] = {0.0f};
float strength;
@@ -3887,12 +3897,11 @@ static void dynamicPaint_prepareAdjacencyData(DynamicPaintSurface *surface, int
if ((!surface_usesAdjDistance(surface) && !force_init) || !sData->adj_data) return;
if (bData->bNeighs) MEM_freeN(bData->bNeighs);
- bNeighs = bData->bNeighs = MEM_mallocN(sData->adj_data->total_targets*sizeof(struct BakeAdjPoint),"PaintEffectBake");
+ bNeighs = bData->bNeighs = MEM_mallocN(sData->adj_data->total_targets*sizeof(struct BakeAdjPoint), "PaintEffectBake");
if (!bNeighs) return;
#pragma omp parallel for schedule(static)
- for (index = 0; index < sData->total_points; index++)
- {
+ for (index = 0; index < sData->total_points; index++) {
int i;
int numOfNeighs = adj_data->n_num[index];
@@ -3911,8 +3920,7 @@ static void dynamicPaint_prepareAdjacencyData(DynamicPaintSurface *surface, int
/* calculate average values (single thread) */
bData->average_dist = 0.0f;
- for (index = 0; index < sData->total_points; index++)
- {
+ for (index = 0; index < sData->total_points; index++) {
int i;
int numOfNeighs = adj_data->n_num[index];
@@ -4080,8 +4088,7 @@ static int dynamicPaint_prepareEffectStep(DynamicPaintSurface *surface, Scene *s
if (*force) {
#pragma omp parallel for schedule(static)
- for (index = 0; index < sData->total_points; index++)
- {
+ for (index = 0; index < sData->total_points; index++) {
float forc[3] = {0};
/* apply force fields */
@@ -4121,8 +4128,7 @@ static int dynamicPaint_prepareEffectStep(DynamicPaintSurface *surface, Scene *s
}
/* calculate average values (single thread) */
- for (index = 0; index < sData->total_points; index++)
- {
+ for (index = 0; index < sData->total_points; index++) {
average_force += (*force)[index*4+3];
}
average_force /= sData->total_points;
@@ -4171,8 +4177,7 @@ static void dynamicPaint_doEffectStep(DynamicPaintSurface *surface, float *force
memcpy(prevPoint, sData->type_data, sData->total_points*sizeof(struct PaintPoint));
#pragma omp parallel for schedule(static)
- for (index = 0; index < sData->total_points; index++)
- {
+ for (index = 0; index < sData->total_points; index++) {
int i;
int numOfNeighs = sData->adj_data->n_num[index];
PaintPoint *pPoint = &((PaintPoint*)sData->type_data)[index];
@@ -4214,8 +4219,7 @@ static void dynamicPaint_doEffectStep(DynamicPaintSurface *surface, float *force
memcpy(prevPoint, sData->type_data, sData->total_points*sizeof(struct PaintPoint));
#pragma omp parallel for schedule(static)
- for (index = 0; index < sData->total_points; index++)
- {
+ for (index = 0; index < sData->total_points; index++) {
int i;
int numOfNeighs = sData->adj_data->n_num[index];
float totalAlpha = 0.0f;
@@ -4256,8 +4260,7 @@ static void dynamicPaint_doEffectStep(DynamicPaintSurface *surface, float *force
/*
* Drip Effect
*/
- if (surface->effect & MOD_DPAINT_EFFECT_DO_DRIP && force)
- {
+ if (surface->effect & MOD_DPAINT_EFFECT_DO_DRIP && force) {
float eff_scale = distance_scale*EFF_MOVEMENT_PER_FRAME*timescale/2.0f;
/* Copy current surface to the previous points array to read unmodified values */
memcpy(prevPoint, sData->type_data, sData->total_points*sizeof(struct PaintPoint));
@@ -4335,8 +4338,7 @@ void dynamicPaint_doWaveStep(DynamicPaintSurface *surface, float timescale)
if (!prevPoint) return;
/* calculate average neigh distance (single thread) */
- for (index = 0; index < sData->total_points; index++)
- {
+ for (index = 0; index < sData->total_points; index++) {
int i;
int numOfNeighs = sData->adj_data->n_num[index];
@@ -4435,8 +4437,7 @@ static void dynamicPaint_surfacePreStep(DynamicPaintSurface *surface, float time
int index;
#pragma omp parallel for schedule(static)
- for (index=0; index<sData->total_points; index++)
- {
+ for (index=0; index<sData->total_points; index++) {
/* Do drying dissolve effects */
if (surface->type == MOD_DPAINT_SURFACE_T_PAINT) {
PaintPoint *pPoint = &((PaintPoint*)sData->type_data)[index];
@@ -4651,8 +4652,7 @@ static int dynamicPaint_generateBakeData(DynamicPaintSurface *surface, Scene *sc
* Prepare each surface point for a new step
*/
#pragma omp parallel for schedule(static)
- for (index=0; index<sData->total_points; index++)
- {
+ for (index=0; index<sData->total_points; index++) {
float prev_point[3] = {0.0f, 0.0f, 0.0f};
if (do_velocity_data && !new_bdata) {
copy_v3_v3(prev_point, bData->realCoord[bData->s_pos[index]].v);
@@ -4671,10 +4671,11 @@ static int dynamicPaint_generateBakeData(DynamicPaintSurface *surface, Scene *sc
/* per sample coordinates */
for (ss=0; ss<bData->s_num[index]; ss++) {
- interp_v3_v3v3v3( bData->realCoord[bData->s_pos[index]+ss].v,
- canvas_verts[tPoint->v1].v,
- canvas_verts[tPoint->v2].v,
- canvas_verts[tPoint->v3].v, f_data->barycentricWeights[index*bData->s_num[index]+ss].v);
+ interp_v3_v3v3v3(bData->realCoord[bData->s_pos[index]+ss].v,
+ canvas_verts[tPoint->v1].v,
+ canvas_verts[tPoint->v2].v,
+ canvas_verts[tPoint->v3].v,
+ f_data->barycentricWeights[index * bData->s_num[index] + ss].v);
}
/* Calculate current pixel surface normal */
@@ -4682,8 +4683,8 @@ static int dynamicPaint_generateBakeData(DynamicPaintSurface *surface, Scene *sc
normal_short_to_float_v3(n2, mvert[tPoint->v2].no);
normal_short_to_float_v3(n3, mvert[tPoint->v3].no);
- interp_v3_v3v3v3( bData->bNormal[index].invNorm,
- n1, n2, n3, f_data->barycentricWeights[index*bData->s_num[index]].v);
+ interp_v3_v3v3v3(bData->bNormal[index].invNorm,
+ n1, n2, n3, f_data->barycentricWeights[index*bData->s_num[index]].v);
mul_mat3_m4_v3(ob->obmat, bData->bNormal[index].invNorm);
normalize_v3(bData->bNormal[index].invNorm);
negate_v3(bData->bNormal[index].invNorm);
@@ -4796,8 +4797,7 @@ static int dynamicPaint_doStep(Scene *scene, Object *ob, DynamicPaintSurface *su
else
base = scene->base.first;
- while (base || go)
- {
+ while (base || go) {
brushObj = NULL;
/* select object */
if (surface->brush_group) {
@@ -4821,12 +4821,10 @@ static int dynamicPaint_doStep(Scene *scene, Object *ob, DynamicPaintSurface *su
/* check if target has an active dp modifier */
md = modifiers_findByType(brushObj, eModifierType_DynamicPaint);
- if (md && md->mode & (eModifierMode_Realtime | eModifierMode_Render))
- {
+ if (md && md->mode & (eModifierMode_Realtime | eModifierMode_Render)) {
DynamicPaintModifierData *pmd2 = (DynamicPaintModifierData *)md;
/* make sure we're dealing with a brush */
- if (pmd2->brush)
- {
+ if (pmd2->brush) {
DynamicPaintBrushSettings *brush = pmd2->brush;
BrushMaterials bMats = {0};
@@ -4843,7 +4841,7 @@ static int dynamicPaint_doStep(Scene *scene, Object *ob, DynamicPaintSurface *su
/* update object data on this subframe */
if (subframe) {
scene_setSubframe(scene, subframe);
- subframe_updateObject(scene, brushObj, UPDATE_EVERYTHING, BKE_curframe(scene));
+ subframe_updateObject(scene, brushObj, UPDATE_EVERYTHING, BKE_scene_frame_get(scene));
}
/* Prepare materials if required */
if (brush_usesMaterial(brush, scene))
@@ -4856,7 +4854,7 @@ static int dynamicPaint_doStep(Scene *scene, Object *ob, DynamicPaintSurface *su
psys_check_enabled(brushObj, brush->psys)) {
/* Paint a particle system */
- BKE_animsys_evaluate_animdata(scene, &brush->psys->part->id, brush->psys->part->adt, BKE_curframe(scene), ADT_RECALC_ANIM);
+ BKE_animsys_evaluate_animdata(scene, &brush->psys->part->id, brush->psys->part->adt, BKE_scene_frame_get(scene), ADT_RECALC_ANIM);
dynamicPaint_paintParticles(surface, brush->psys, brush, timescale);
}
}
@@ -4876,7 +4874,7 @@ static int dynamicPaint_doStep(Scene *scene, Object *ob, DynamicPaintSurface *su
if (subframe) {
scene->r.cfra = scene_frame;
scene->r.subframe = scene_subframe;
- subframe_updateObject(scene, brushObj, UPDATE_EVERYTHING, BKE_curframe(scene));
+ subframe_updateObject(scene, brushObj, UPDATE_EVERYTHING, BKE_scene_frame_get(scene));
}
/* process special brush effects, like smudge */
diff --git a/source/blender/blenkernel/intern/editderivedmesh.c b/source/blender/blenkernel/intern/editderivedmesh.c
index 857f6e75e2c..428dc176e1d 100644
--- a/source/blender/blenkernel/intern/editderivedmesh.c
+++ b/source/blender/blenkernel/intern/editderivedmesh.c
@@ -150,8 +150,7 @@ static void BMEdit_RecalcTessellation_intern(BMEditMesh *tm)
#endif
- f = BM_iter_new(&iter, bm, BM_FACES_OF_MESH, NULL);
- for ( ; f; f=BM_iter_step(&iter)) {
+ BM_ITER_MESH (f, &iter, bm, BM_FACES_OF_MESH) {
/*don't consider two-edged faces*/
if (f->len < 3) {
/* do nothing */
@@ -162,7 +161,7 @@ static void BMEdit_RecalcTessellation_intern(BMEditMesh *tm)
/* no need to ensure the loop order, we know its ok */
else if (f->len == 3) {
- BLI_array_growone(looptris);
+ BLI_array_grow_one(looptris);
l = BM_iter_new(&liter, bm, BM_LOOPS_OF_FACE, f);
for (j=0; l; l=BM_iter_step(&liter), j++) {
looptris[i][j] = l;
@@ -171,7 +170,7 @@ static void BMEdit_RecalcTessellation_intern(BMEditMesh *tm)
}
else if (f->len == 4) {
BMLoop *ltmp[4];
- BLI_array_growitems(looptris, 2);
+ BLI_array_grow_items(looptris, 2);
l = BM_iter_new(&liter, bm, BM_LOOPS_OF_FACE, f);
for (j=0; l; l=BM_iter_step(&liter), j++) {
@@ -197,18 +196,18 @@ static void BMEdit_RecalcTessellation_intern(BMEditMesh *tm)
ScanFillFace *efa;
int totfilltri;
- BLI_begin_edgefill(&sf_ctx);
+ BLI_scanfill_begin(&sf_ctx);
/*scanfill time*/
l = BM_iter_new(&liter, bm, BM_LOOPS_OF_FACE, f);
for (j=0; l; l=BM_iter_step(&liter), j++) {
/*mark order*/
BM_elem_index_set(l, j); /* set_loop */
- v = BLI_addfillvert(&sf_ctx, l->v->co);
+ v = BLI_scanfill_vert_add(&sf_ctx, l->v->co);
v->tmp.p = l;
if (lastv) {
- /* e = */ BLI_addfilledge(&sf_ctx, lastv, v);
+ /* e = */ BLI_scanfill_edge_add(&sf_ctx, lastv, v);
}
lastv = v;
@@ -216,10 +215,10 @@ static void BMEdit_RecalcTessellation_intern(BMEditMesh *tm)
}
/*complete the loop*/
- BLI_addfilledge(&sf_ctx, firstv, v);
+ BLI_scanfill_edge_add(&sf_ctx, firstv, v);
- totfilltri = BLI_edgefill_ex(&sf_ctx, FALSE, f->no);
- BLI_array_growitems(looptris, totfilltri);
+ totfilltri = BLI_scanfill_calc_ex(&sf_ctx, FALSE, f->no);
+ BLI_array_grow_items(looptris, totfilltri);
for (efa = sf_ctx.fillfacebase.first; efa; efa=efa->next) {
BMLoop *l1= efa->v1->tmp.p;
@@ -236,7 +235,7 @@ static void BMEdit_RecalcTessellation_intern(BMEditMesh *tm)
i += 1;
}
- BLI_end_edgefill(&sf_ctx);
+ BLI_scanfill_end(&sf_ctx);
}
}
@@ -357,17 +356,18 @@ static void emDM_foreachMappedVert(
void (*func)(void *userData, int index, const float co[3], const float no_f[3], const short no_s[3]),
void *userData)
{
- EditDerivedBMesh *bmdm= (EditDerivedBMesh*) dm;
+ EditDerivedBMesh *bmdm= (EditDerivedBMesh *)dm;
BMVert *eve;
BMIter iter;
int i;
- eve = BM_iter_new(&iter, bmdm->tc->bm, BM_VERTS_OF_MESH, NULL);
- for (i=0; eve; i++, eve=BM_iter_step(&iter)) {
- if (bmdm->vertexCos) {
+ if (bmdm->vertexCos) {
+ BM_ITER_MESH_INDEX (eve, &iter, bmdm->tc->bm, BM_VERTS_OF_MESH, i) {
func(userData, i, bmdm->vertexCos[i], bmdm->vertexNos[i], NULL);
}
- else {
+ }
+ else {
+ BM_ITER_MESH_INDEX (eve, &iter, bmdm->tc->bm, BM_VERTS_OF_MESH, i) {
func(userData, i, eve->co, eve->no, NULL);
}
}
@@ -377,7 +377,7 @@ static void emDM_foreachMappedEdge(
void (*func)(void *userData, int index, const float v0co[3], const float v1co[3]),
void *userData)
{
- EditDerivedBMesh *bmdm= (EditDerivedBMesh*) dm;
+ EditDerivedBMesh *bmdm= (EditDerivedBMesh *)dm;
BMEdge *eed;
BMIter iter;
int i;
@@ -387,14 +387,14 @@ static void emDM_foreachMappedEdge(
BM_mesh_elem_index_ensure(bmdm->tc->bm, BM_VERT);
eed = BM_iter_new(&iter, bmdm->tc->bm, BM_EDGES_OF_MESH, NULL);
- for (i=0; eed; i++,eed=BM_iter_step(&iter))
+ for (i=0; eed; i++, eed=BM_iter_step(&iter))
func(userData, i,
bmdm->vertexCos[BM_elem_index_get(eed->v1)],
bmdm->vertexCos[BM_elem_index_get(eed->v2)]);
}
else {
eed = BM_iter_new(&iter, bmdm->tc->bm, BM_EDGES_OF_MESH, NULL);
- for (i=0; eed; i++,eed=BM_iter_step(&iter))
+ for (i=0; eed; i++, eed=BM_iter_step(&iter))
func(userData, i, eed->v1->co, eed->v2->co);
}
}
@@ -404,7 +404,7 @@ static void emDM_drawMappedEdges(
DMSetDrawOptions setDrawOptions,
void *userData)
{
- EditDerivedBMesh *bmdm= (EditDerivedBMesh*) dm;
+ EditDerivedBMesh *bmdm= (EditDerivedBMesh *)dm;
BMEdge *eed;
BMIter iter;
int i;
@@ -415,7 +415,7 @@ static void emDM_drawMappedEdges(
glBegin(GL_LINES);
eed = BM_iter_new(&iter, bmdm->tc->bm, BM_EDGES_OF_MESH, NULL);
- for (i=0; eed; i++,eed=BM_iter_step(&iter)) {
+ for (i=0; eed; i++, eed=BM_iter_step(&iter)) {
if (!setDrawOptions || (setDrawOptions(userData, i) != DM_DRAW_OPTION_SKIP)) {
glVertex3fv(bmdm->vertexCos[BM_elem_index_get(eed->v1)]);
glVertex3fv(bmdm->vertexCos[BM_elem_index_get(eed->v2)]);
@@ -426,7 +426,7 @@ static void emDM_drawMappedEdges(
else {
glBegin(GL_LINES);
eed = BM_iter_new(&iter, bmdm->tc->bm, BM_EDGES_OF_MESH, NULL);
- for (i=0; eed; i++,eed=BM_iter_step(&iter)) {
+ for (i=0; eed; i++, eed=BM_iter_step(&iter)) {
if (!setDrawOptions || (setDrawOptions(userData, i) != DM_DRAW_OPTION_SKIP)) {
glVertex3fv(eed->v1->co);
glVertex3fv(eed->v2->co);
@@ -449,7 +449,7 @@ static void emDM_drawMappedEdgesInterp(
DMSetDrawInterpOptions setDrawInterpOptions,
void *userData)
{
- EditDerivedBMesh *bmdm= (EditDerivedBMesh*) dm;
+ EditDerivedBMesh *bmdm= (EditDerivedBMesh *)dm;
BMEdge *eed;
BMIter iter;
int i;
@@ -460,7 +460,7 @@ static void emDM_drawMappedEdgesInterp(
glBegin(GL_LINES);
eed = BM_iter_new(&iter, bmdm->tc->bm, BM_EDGES_OF_MESH, NULL);
- for (i=0; eed; i++,eed=BM_iter_step(&iter)) {
+ for (i=0; eed; i++, eed=BM_iter_step(&iter)) {
if (!setDrawOptions || (setDrawOptions(userData, i) != DM_DRAW_OPTION_SKIP)) {
setDrawInterpOptions(userData, i, 0.0);
glVertex3fv(bmdm->vertexCos[BM_elem_index_get(eed->v1)]);
@@ -473,7 +473,7 @@ static void emDM_drawMappedEdgesInterp(
else {
glBegin(GL_LINES);
eed = BM_iter_new(&iter, bmdm->tc->bm, BM_EDGES_OF_MESH, NULL);
- for (i=0; eed; i++,eed=BM_iter_step(&iter)) {
+ for (i=0; eed; i++, eed=BM_iter_step(&iter)) {
if (!setDrawOptions || (setDrawOptions(userData, i) != DM_DRAW_OPTION_SKIP)) {
setDrawInterpOptions(userData, i, 0.0);
glVertex3fv(eed->v1->co);
@@ -487,7 +487,7 @@ static void emDM_drawMappedEdgesInterp(
static void emDM_drawUVEdges(DerivedMesh *dm)
{
- EditDerivedBMesh *bmdm= (EditDerivedBMesh*) dm;
+ EditDerivedBMesh *bmdm= (EditDerivedBMesh *)dm;
BMEditMesh *em = bmdm->tc;
BMFace *efa;
BMIter iter;
@@ -557,7 +557,7 @@ static void emDM_foreachMappedFaceCenter(
void (*func)(void *userData, int index, const float co[3], const float no[3]),
void *userData)
{
- EditDerivedBMesh *bmdm= (EditDerivedBMesh*) dm;
+ EditDerivedBMesh *bmdm= (EditDerivedBMesh *)dm;
float (*polyNos)[3] = NULL;
BMFace *efa;
BMIter iter;
@@ -572,8 +572,7 @@ static void emDM_foreachMappedFaceCenter(
BLI_assert(polyNos != NULL);
}
- efa = BM_iter_new(&iter, bmdm->tc->bm, BM_FACES_OF_MESH, NULL);
- for (i=0; efa; efa=BM_iter_step(&iter), i++) {
+ BM_ITER_MESH_INDEX (efa, &iter, bmdm->tc->bm, BM_FACES_OF_MESH, i) {
emDM__calcFaceCent(bmdm->tc->bm, efa, cent, bmdm->vertexCos);
func(userData, i, cent, polyNos ? polyNos[i] : efa->no);
}
@@ -587,18 +586,18 @@ static void emDM_drawMappedFaces(
void *userData,
DMDrawFlag flag)
{
- EditDerivedBMesh *bmdm= (EditDerivedBMesh*) dm;
+ EditDerivedBMesh *bmdm = (EditDerivedBMesh *)dm;
BMFace *efa;
- struct BMLoop *(*looptris)[3]= bmdm->tc->looptris;
- const int tottri= bmdm->tc->tottri;
- const int lasttri= tottri - 1; /* compare agasint this a lot */
+ struct BMLoop *(*looptris)[3] = bmdm->tc->looptris;
+ const int tottri = bmdm->tc->tottri;
+ const int lasttri = tottri - 1; /* compare agasint this a lot */
DMDrawOption draw_option;
int i, flush;
- const int skip_normals= !glIsEnabled(GL_LIGHTING); /* could be passed as an arg */
+ const int skip_normals = !glIsEnabled(GL_LIGHTING); /* could be passed as an arg */
/* GL_ZERO is used to detect if drawing has started or not */
- GLenum poly_prev= GL_ZERO;
- GLenum shade_prev= GL_ZERO;
+ GLenum poly_prev = GL_ZERO;
+ GLenum shade_prev = GL_ZERO;
(void)setMaterial; /* UNUSED */
@@ -607,29 +606,29 @@ static void emDM_drawMappedFaces(
if (bmdm->vertexCos) {
/* add direct access */
- float (*vertexCos)[3]= bmdm->vertexCos;
- float (*vertexNos)[3]= bmdm->vertexNos;
- float (*polyNos)[3]= bmdm->polyNos;
+ float (*vertexCos)[3] = bmdm->vertexCos;
+ float (*vertexNos)[3] = bmdm->vertexNos;
+ float (*polyNos)[3] = bmdm->polyNos;
// int *triPolyMap= bmdm->triPolyMap;
BM_mesh_elem_index_ensure(bmdm->tc->bm, BM_VERT | BM_FACE);
- for (i=0; i < tottri; i++) {
+ for (i = 0; i < tottri; i++) {
BMLoop **l = looptris[i];
int drawSmooth;
efa = l[0]->f;
- drawSmooth= (flag & DM_DRAW_ALWAYS_SMOOTH) ? 1 : BM_elem_flag_test(efa, BM_ELEM_SMOOTH);
+ drawSmooth = (flag & DM_DRAW_ALWAYS_SMOOTH) ? 1 : BM_elem_flag_test(efa, BM_ELEM_SMOOTH);
draw_option = (!setDrawOptions ?
DM_DRAW_OPTION_NORMAL :
setDrawOptions(userData, BM_elem_index_get(efa)));
if (draw_option != DM_DRAW_OPTION_SKIP) {
- const GLenum poly_type= GL_TRIANGLES; /* BMESH NOTE, this is odd but keep it for now to match trunk */
+ const GLenum poly_type = GL_TRIANGLES; /* BMESH NOTE, this is odd but keep it for now to match trunk */
if (draw_option == DM_DRAW_OPTION_STIPPLE) { /* enabled with stipple */
if (poly_prev != GL_ZERO) glEnd();
- poly_prev= GL_ZERO; /* force glBegin */
+ poly_prev = GL_ZERO; /* force glBegin */
glEnable(GL_POLYGON_STIPPLE);
glPolygonStipple(stipple_quarttone);
@@ -638,22 +637,22 @@ static void emDM_drawMappedFaces(
if (skip_normals) {
if (poly_type != poly_prev) {
if (poly_prev != GL_ZERO) glEnd();
- glBegin((poly_prev= poly_type)); /* BMesh: will always be GL_TRIANGLES */
+ glBegin((poly_prev = poly_type)); /* BMesh: will always be GL_TRIANGLES */
}
glVertex3fv(vertexCos[BM_elem_index_get(l[0]->v)]);
glVertex3fv(vertexCos[BM_elem_index_get(l[1]->v)]);
glVertex3fv(vertexCos[BM_elem_index_get(l[2]->v)]);
}
else {
- const GLenum shade_type= drawSmooth ? GL_SMOOTH : GL_FLAT;
+ const GLenum shade_type = drawSmooth ? GL_SMOOTH : GL_FLAT;
if (shade_type != shade_prev) {
if (poly_prev != GL_ZERO) glEnd();
- glShadeModel((shade_prev= shade_type)); /* same as below but switch shading */
- glBegin((poly_prev= poly_type)); /* BMesh: will always be GL_TRIANGLES */
+ glShadeModel((shade_prev = shade_type)); /* same as below but switch shading */
+ glBegin((poly_prev = poly_type)); /* BMesh: will always be GL_TRIANGLES */
}
if (poly_type != poly_prev) {
if (poly_prev != GL_ZERO) glEnd();
- glBegin((poly_prev= poly_type)); /* BMesh: will always be GL_TRIANGLES */
+ glBegin((poly_prev = poly_type)); /* BMesh: will always be GL_TRIANGLES */
}
if (!drawSmooth) {
@@ -672,13 +671,13 @@ static void emDM_drawMappedFaces(
}
}
- flush= (draw_option == DM_DRAW_OPTION_STIPPLE);
+ flush = (draw_option == DM_DRAW_OPTION_STIPPLE);
if (!skip_normals && !flush && (i != lasttri))
- flush|= efa->mat_nr != looptris[i + 1][0]->f->mat_nr; /* TODO, make this neater */
+ flush |= efa->mat_nr != looptris[i + 1][0]->f->mat_nr; /* TODO, make this neater */
if (flush) {
glEnd();
- poly_prev= GL_ZERO; /* force glBegin */
+ poly_prev = GL_ZERO; /* force glBegin */
glDisable(GL_POLYGON_STIPPLE);
}
@@ -699,11 +698,11 @@ static void emDM_drawMappedFaces(
DM_DRAW_OPTION_NORMAL :
setDrawOptions(userData, BM_elem_index_get(efa)));
if (draw_option != DM_DRAW_OPTION_SKIP) {
- const GLenum poly_type= GL_TRIANGLES; /* BMESH NOTE, this is odd but keep it for now to match trunk */
+ const GLenum poly_type = GL_TRIANGLES; /* BMESH NOTE, this is odd but keep it for now to match trunk */
if (draw_option == DM_DRAW_OPTION_STIPPLE) { /* enabled with stipple */
if (poly_prev != GL_ZERO) glEnd();
- poly_prev= GL_ZERO; /* force glBegin */
+ poly_prev = GL_ZERO; /* force glBegin */
glEnable(GL_POLYGON_STIPPLE);
glPolygonStipple(stipple_quarttone);
@@ -712,22 +711,22 @@ static void emDM_drawMappedFaces(
if (skip_normals) {
if (poly_type != poly_prev) {
if (poly_prev != GL_ZERO) glEnd();
- glBegin((poly_prev= poly_type)); /* BMesh: will always be GL_TRIANGLES */
+ glBegin((poly_prev = poly_type)); /* BMesh: will always be GL_TRIANGLES */
}
glVertex3fv(l[0]->v->co);
glVertex3fv(l[1]->v->co);
glVertex3fv(l[2]->v->co);
}
else {
- const GLenum shade_type= drawSmooth ? GL_SMOOTH : GL_FLAT;
+ const GLenum shade_type = drawSmooth ? GL_SMOOTH : GL_FLAT;
if (shade_type != shade_prev) {
if (poly_prev != GL_ZERO) glEnd();
- glShadeModel((shade_prev= shade_type)); /* same as below but switch shading */
- glBegin((poly_prev= poly_type)); /* BMesh: will always be GL_TRIANGLES */
+ glShadeModel((shade_prev = shade_type)); /* same as below but switch shading */
+ glBegin((poly_prev = poly_type)); /* BMesh: will always be GL_TRIANGLES */
}
if (poly_type != poly_prev) {
if (poly_prev != GL_ZERO) glEnd();
- glBegin((poly_prev= poly_type)); /* BMesh: will always be GL_TRIANGLES */
+ glBegin((poly_prev = poly_type)); /* BMesh: will always be GL_TRIANGLES */
}
if (!drawSmooth) {
@@ -746,9 +745,9 @@ static void emDM_drawMappedFaces(
}
}
- flush= (draw_option == DM_DRAW_OPTION_STIPPLE);
+ flush = (draw_option == DM_DRAW_OPTION_STIPPLE);
if (!skip_normals && !flush && (i != lasttri)) {
- flush|= efa->mat_nr != looptris[i + 1][0]->f->mat_nr; /* TODO, make this neater */
+ flush |= efa->mat_nr != looptris[i + 1][0]->f->mat_nr; /* TODO, make this neater */
}
if (flush) {
@@ -766,7 +765,7 @@ static void emDM_drawMappedFaces(
}
static void bmdm_get_tri_tex(BMesh *bm, BMLoop **ls, MLoopUV *luv[3], MLoopCol *lcol[3],
- int has_uv, int has_col)
+ int has_uv, int has_col)
{
if (has_uv) {
luv[0] = CustomData_bmesh_get(&bm->ldata, ls[0]->head.data, CD_MLOOPUV);
@@ -790,11 +789,11 @@ static void emDM_drawFacesTex_common(
DMCompareDrawOptions compareDrawOptions,
void *userData)
{
- EditDerivedBMesh *bmdm= (EditDerivedBMesh*) dm;
+ EditDerivedBMesh *bmdm = (EditDerivedBMesh *)dm;
BMEditMesh *em = bmdm->tc;
- BMesh *bm= bmdm->tc->bm;
- float (*vertexCos)[3]= bmdm->vertexCos;
- float (*vertexNos)[3]= bmdm->vertexNos;
+ BMesh *bm = bmdm->tc->bm;
+ float (*vertexCos)[3] = bmdm->vertexCos;
+ float (*vertexNos)[3] = bmdm->vertexNos;
BMFace *efa;
MLoopUV *luv[3], dummyluv = {{0}};
MLoopCol *lcol[3] = {NULL}, dummylcol = {0};
@@ -815,13 +814,12 @@ static void emDM_drawFacesTex_common(
if (vertexCos) {
BM_mesh_elem_index_ensure(bm, BM_VERT);
- glBegin(GL_TRIANGLES);
- for (i=0; i<em->tottri; i++) {
+ for (i = 0; i < em->tottri; i++) {
BMLoop **ls = em->looptris[i];
- MTexPoly *tp= has_uv ? CustomData_bmesh_get(&bm->pdata, ls[0]->f->head.data, CD_MTEXPOLY) : NULL;
+ MTexPoly *tp = has_uv ? CustomData_bmesh_get(&bm->pdata, ls[0]->f->head.data, CD_MTEXPOLY) : NULL;
MTFace mtf = {{{0}}};
/*unsigned char *cp= NULL;*/ /*UNUSED*/
- int drawSmooth= BM_elem_flag_test(ls[0]->f, BM_ELEM_SMOOTH);
+ int drawSmooth = BM_elem_flag_test(ls[0]->f, BM_ELEM_SMOOTH);
DMDrawOption draw_option;
efa = ls[0]->f;
@@ -831,14 +829,15 @@ static void emDM_drawFacesTex_common(
}
if (drawParams)
- draw_option= drawParams(&mtf, has_vcol, efa->mat_nr);
+ draw_option = drawParams(&mtf, has_vcol, efa->mat_nr);
else if (drawParamsMapped)
- draw_option= drawParamsMapped(userData, BM_elem_index_get(efa));
+ draw_option = drawParamsMapped(userData, BM_elem_index_get(efa));
else
- draw_option= DM_DRAW_OPTION_NORMAL;
+ draw_option = DM_DRAW_OPTION_NORMAL;
if (draw_option != DM_DRAW_OPTION_SKIP) {
+ glBegin(GL_TRIANGLES);
if (!drawSmooth) {
glNormal3fv(bmdm->polyNos[BM_elem_index_get(efa)]);
@@ -880,19 +879,19 @@ static void emDM_drawFacesTex_common(
glNormal3fv(vertexNos[BM_elem_index_get(ls[2]->v)]);
glVertex3fv(vertexCos[BM_elem_index_get(ls[2]->v)]);
}
+ glEnd();
}
}
- glEnd();
}
else {
BM_mesh_elem_index_ensure(bm, BM_VERT);
- for (i=0; i<em->tottri; i++) {
+ for (i = 0; i < em->tottri; i++) {
BMLoop **ls = em->looptris[i];
- MTexPoly *tp= has_uv ? CustomData_bmesh_get(&bm->pdata, ls[0]->f->head.data, CD_MTEXPOLY) : NULL;
+ MTexPoly *tp = has_uv ? CustomData_bmesh_get(&bm->pdata, ls[0]->f->head.data, CD_MTEXPOLY) : NULL;
MTFace mtf = {{{0}}};
/*unsigned char *cp= NULL;*/ /*UNUSED*/
- int drawSmooth= BM_elem_flag_test(ls[0]->f, BM_ELEM_SMOOTH);
+ int drawSmooth = BM_elem_flag_test(ls[0]->f, BM_ELEM_SMOOTH);
DMDrawOption draw_option;
efa = ls[0]->f;
@@ -902,11 +901,11 @@ static void emDM_drawFacesTex_common(
}
if (drawParams)
- draw_option= drawParams(&mtf, has_vcol, efa->mat_nr);
+ draw_option = drawParams(&mtf, has_vcol, efa->mat_nr);
else if (drawParamsMapped)
- draw_option= drawParamsMapped(userData, BM_elem_index_get(efa));
+ draw_option = drawParamsMapped(userData, BM_elem_index_get(efa));
else
- draw_option= DM_DRAW_OPTION_NORMAL;
+ draw_option = DM_DRAW_OPTION_NORMAL;
if (draw_option != DM_DRAW_OPTION_SKIP) {
@@ -990,11 +989,11 @@ static void emDM_drawMappedFacesGLSL(
DMSetDrawOptions setDrawOptions,
void *userData)
{
- EditDerivedBMesh *bmdm= (EditDerivedBMesh*) dm;
- BMesh *bm= bmdm->tc->bm;
+ EditDerivedBMesh *bmdm = (EditDerivedBMesh *)dm;
+ BMesh *bm = bmdm->tc->bm;
BMEditMesh *em = bmdm->tc;
- float (*vertexCos)[3]= bmdm->vertexCos;
- float (*vertexNos)[3]= bmdm->vertexNos;
+ float (*vertexCos)[3] = bmdm->vertexCos;
+ float (*vertexNos)[3] = bmdm->vertexNos;
BMFace *efa;
BMLoop **ltri;
DMVertexAttribs attribs;
@@ -1014,30 +1013,30 @@ static void emDM_drawMappedFacesGLSL(
#define PASSATTRIB(loop, eve, vert) { \
if (attribs.totorco) { \
float *orco = attribs.orco.array[BM_elem_index_get(eve)]; \
- glVertexAttrib3fvARB(attribs.orco.glIndex, orco); \
+ glVertexAttrib3fvARB(attribs.orco.gl_index, orco); \
} \
for (b = 0; b < attribs.tottface; b++) { \
MLoopUV *_luv = CustomData_bmesh_get_n(&bm->ldata, loop->head.data, CD_MLOOPUV, b);\
- glVertexAttrib2fvARB(attribs.tface[b].glIndex, _luv->uv); \
+ glVertexAttrib2fvARB(attribs.tface[b].gl_index, _luv->uv); \
} \
for (b = 0; b < attribs.totmcol; b++) { \
MLoopCol *_cp = CustomData_bmesh_get_n(&bm->ldata, loop->head.data, CD_MLOOPCOL, b);\
GLubyte _col[4]; \
_col[0]= _cp->b; _col[1]= _cp->g; _col[2]= _cp->r; _col[3]= _cp->a; \
- glVertexAttrib4ubvARB(attribs.mcol[b].glIndex, _col); \
+ glVertexAttrib4ubvARB(attribs.mcol[b].gl_index, _col); \
} \
if (attribs.tottang) { \
float *tang = attribs.tang.array[i*4 + vert]; \
- glVertexAttrib3fvARB(attribs.tang.glIndex, tang); \
+ glVertexAttrib3fvARB(attribs.tang.gl_index, tang); \
} \
}
- for (i=0, ltri=em->looptris[0]; i<em->tottri; i++, ltri += 3) {
+ for (i = 0, ltri = em->looptris[0]; i < em->tottri; i++, ltri += 3) {
int drawSmooth;
efa = ltri[0]->f;
- drawSmooth= BM_elem_flag_test(efa, BM_ELEM_SMOOTH);
+ drawSmooth = BM_elem_flag_test(efa, BM_ELEM_SMOOTH);
if (setDrawOptions && (setDrawOptions(userData, BM_elem_index_get(efa)) == DM_DRAW_OPTION_SKIP))
continue;
@@ -1116,14 +1115,14 @@ static void emDM_drawMappedFacesMat(
void (*setMaterial)(void *userData, int, void *attribs),
int (*setFace)(void *userData, int index), void *userData)
{
- EditDerivedBMesh *bmdm= (EditDerivedBMesh*) dm;
- BMesh *bm= bmdm->tc->bm;
+ EditDerivedBMesh *bmdm = (EditDerivedBMesh *)dm;
+ BMesh *bm = bmdm->tc->bm;
BMEditMesh *em = bmdm->tc;
- float (*vertexCos)[3]= bmdm->vertexCos;
- float (*vertexNos)[3]= bmdm->vertexNos;
+ float (*vertexCos)[3] = bmdm->vertexCos;
+ float (*vertexNos)[3] = bmdm->vertexNos;
BMFace *efa;
BMLoop **ltri;
- DMVertexAttribs attribs= {{{0}}};
+ DMVertexAttribs attribs = {{{0}}};
GPUVertexAttribs gattribs;
int i, b, matnr, new_matnr;
@@ -1132,36 +1131,36 @@ static void emDM_drawMappedFacesMat(
/* always use smooth shading even for flat faces, else vertex colors wont interpolate */
glShadeModel(GL_SMOOTH);
- BM_mesh_elem_index_ensure(bm, BM_VERT|BM_FACE);
+ BM_mesh_elem_index_ensure(bm, BM_VERT | BM_FACE);
#define PASSATTRIB(loop, eve, vert) { \
if (attribs.totorco) { \
float *orco = attribs.orco.array[BM_elem_index_get(eve)]; \
- if (attribs.orco.glTexco) \
+ if (attribs.orco.gl_texco) \
glTexCoord3fv(orco); \
else \
- glVertexAttrib3fvARB(attribs.orco.glIndex, orco); \
+ glVertexAttrib3fvARB(attribs.orco.gl_index, orco); \
} \
for (b = 0; b < attribs.tottface; b++) { \
MLoopUV *_luv = CustomData_bmesh_get_n(&bm->ldata, loop->head.data, CD_MLOOPUV, b);\
- if (attribs.tface[b].glTexco) \
+ if (attribs.tface[b].gl_texco) \
glTexCoord2fv(_luv->uv); \
else \
- glVertexAttrib2fvARB(attribs.tface[b].glIndex, _luv->uv); \
+ glVertexAttrib2fvARB(attribs.tface[b].gl_index, _luv->uv); \
} \
for (b = 0; b < attribs.totmcol; b++) { \
MLoopCol *_cp = CustomData_bmesh_get_n(&bm->ldata, loop->head.data, CD_MLOOPCOL, b);\
GLubyte _col[4]; \
_col[0]= _cp->b; _col[1]= _cp->g; _col[2]= _cp->r; _col[3]= _cp->a; \
- glVertexAttrib4ubvARB(attribs.mcol[b].glIndex, _col); \
+ glVertexAttrib4ubvARB(attribs.mcol[b].gl_index, _col); \
} \
if (attribs.tottang) { \
float *tang = attribs.tang.array[i*4 + vert]; \
- glVertexAttrib4fvARB(attribs.tang.glIndex, tang); \
+ glVertexAttrib4fvARB(attribs.tang.gl_index, tang); \
} \
}
- for (i=0, ltri=em->looptris[0]; i<em->tottri; i++, ltri += 3) {
+ for (i = 0, ltri = em->looptris[0]; i < em->tottri; i++, ltri += 3) {
int drawSmooth;
efa = ltri[0]->f;
@@ -1235,18 +1234,19 @@ static void emDM_drawMappedFacesMat(
static void emDM_getMinMax(DerivedMesh *dm, float min_r[3], float max_r[3])
{
- EditDerivedBMesh *bmdm= (EditDerivedBMesh*) dm;
+ EditDerivedBMesh *bmdm = (EditDerivedBMesh *)dm;
BMVert *eve;
BMIter iter;
int i;
if (bmdm->tc->bm->totvert) {
- eve = BM_iter_new(&iter, bmdm->tc->bm, BM_VERTS_OF_MESH, NULL);
- for (i=0; eve; eve=BM_iter_step(&iter), i++) {
- if (bmdm->vertexCos) {
+ if (bmdm->vertexCos) {
+ BM_ITER_MESH_INDEX (eve, &iter, bmdm->tc->bm, BM_VERTS_OF_MESH, i) {
DO_MINMAX(bmdm->vertexCos[i], min_r, max_r);
}
- else {
+ }
+ else {
+ BM_ITER_MESH (eve, &iter, bmdm->tc->bm, BM_VERTS_OF_MESH) {
DO_MINMAX(eve->co, min_r, max_r);
}
}
@@ -1258,35 +1258,35 @@ static void emDM_getMinMax(DerivedMesh *dm, float min_r[3], float max_r[3])
}
static int emDM_getNumVerts(DerivedMesh *dm)
{
- EditDerivedBMesh *bmdm= (EditDerivedBMesh*) dm;
+ EditDerivedBMesh *bmdm = (EditDerivedBMesh *)dm;
return bmdm->tc->bm->totvert;
}
static int emDM_getNumEdges(DerivedMesh *dm)
{
- EditDerivedBMesh *bmdm= (EditDerivedBMesh*) dm;
+ EditDerivedBMesh *bmdm = (EditDerivedBMesh *)dm;
return bmdm->tc->bm->totedge;
}
static int emDM_getNumTessFaces(DerivedMesh *dm)
{
- EditDerivedBMesh *bmdm= (EditDerivedBMesh*) dm;
+ EditDerivedBMesh *bmdm = (EditDerivedBMesh *)dm;
return bmdm->tc->tottri;
}
static int emDM_getNumLoops(DerivedMesh *dm)
{
- EditDerivedBMesh *bmdm= (EditDerivedBMesh*) dm;
+ EditDerivedBMesh *bmdm = (EditDerivedBMesh *)dm;
return bmdm->tc->bm->totloop;
}
static int emDM_getNumPolys(DerivedMesh *dm)
{
- EditDerivedBMesh *bmdm= (EditDerivedBMesh*) dm;
+ EditDerivedBMesh *bmdm = (EditDerivedBMesh *)dm;
return bmdm->tc->bm->totface;
}
@@ -1413,8 +1413,7 @@ static void emDM_copyEdgeArray(DerivedMesh *dm, MEdge *edge_r)
BM_mesh_elem_index_ensure(bm, BM_VERT);
- ee = BM_iter_new(&iter, bm, BM_EDGES_OF_MESH, NULL);
- for ( ; ee; ee=BM_iter_step(&iter), edge_r++) {
+ for (ee = BM_iter_new(&iter, bm, BM_EDGES_OF_MESH, NULL); ee; ee = BM_iter_step(&iter), edge_r++) {
if (has_bweight) {
edge_r->bweight = (unsigned char) (BM_elem_float_data_get(&bm->edata, ee, CD_BWEIGHT)*255.0f);
}
@@ -1440,7 +1439,7 @@ static void emDM_copyTessFaceArray(DerivedMesh *dm, MFace *face_r)
BM_mesh_elem_index_ensure(bm, BM_VERT);
- for (i=0; i<bmdm->tc->tottri; i++, face_r++) {
+ for (i = 0; i < bmdm->tc->tottri; i++, face_r++) {
l = bmdm->tc->looptris[i];
ef = l[0]->f;
@@ -1499,8 +1498,8 @@ static void emDM_copyPolyArray(DerivedMesh *dm, MPoly *poly_r)
static void *emDM_getTessFaceDataArray(DerivedMesh *dm, int type)
{
- EditDerivedBMesh *bmdm= (EditDerivedBMesh*) dm;
- BMesh *bm= bmdm->tc->bm;
+ EditDerivedBMesh *bmdm = (EditDerivedBMesh *)dm;
+ BMesh *bm = bmdm->tc->bm;
void *datalayer;
datalayer = DM_get_tessface_data_layer(dm, type);
@@ -1553,27 +1552,26 @@ static void *emDM_getTessFaceDataArray(DerivedMesh *dm, int type)
static void emDM_getVertCos(DerivedMesh *dm, float (*cos_r)[3])
{
- EditDerivedBMesh *emdm= (EditDerivedBMesh*) dm;
+ EditDerivedBMesh *emdm = (EditDerivedBMesh *)dm;
BMVert *eve;
BMIter iter;
int i;
- i= 0;
- BM_ITER_MESH (eve, &iter, emdm->tc->bm, BM_VERTS_OF_MESH) {
- if (emdm->vertexCos) {
+ if (emdm->vertexCos) {
+ BM_ITER_MESH_INDEX (eve, &iter, emdm->tc->bm, BM_VERTS_OF_MESH, i) {
copy_v3_v3(cos_r[i], emdm->vertexCos[i]);
}
- else {
+ }
+ else {
+ BM_ITER_MESH_INDEX (eve, &iter, emdm->tc->bm, BM_VERTS_OF_MESH, i) {
copy_v3_v3(cos_r[i], eve->co);
}
-
- i++;
}
}
static void emDM_release(DerivedMesh *dm)
{
- EditDerivedBMesh *bmdm= (EditDerivedBMesh *)dm;
+ EditDerivedBMesh *bmdm = (EditDerivedBMesh *)dm;
if (DM_release(dm)) {
if (bmdm->vertexCos) {
@@ -1690,10 +1688,10 @@ DerivedMesh *getEditDerivedBMesh(
DM_add_vert_layer(&bmdm->dm, CD_MDEFORMVERT, CD_CALLOC, NULL);
- eve = BM_iter_new(&iter, bmdm->tc->bm, BM_VERTS_OF_MESH, NULL);
- for (i=0; eve; eve=BM_iter_step(&iter), i++)
+ BM_ITER_MESH_INDEX (eve, &iter, bmdm->tc->bm, BM_VERTS_OF_MESH, i) {
DM_set_vert_data(&bmdm->dm, i, CD_MDEFORMVERT,
CustomData_bmesh_get(&bm->vdata, eve->head.data, CD_MDEFORMVERT));
+ }
}
if (vertexCos) {
@@ -1708,16 +1706,13 @@ DerivedMesh *getEditDerivedBMesh(
bmdm->vertexNos = MEM_callocN(sizeof(*bmdm->vertexNos) * bm->totvert, "bmdm_vno");
bmdm->polyNos = MEM_mallocN(sizeof(*bmdm->polyNos)*bm->totface, "bmdm_pno");
- i = 0;
- BM_ITER_MESH (efa, &fiter, bm, BM_FACES_OF_MESH) {
+ BM_ITER_MESH_INDEX (efa, &fiter, bm, BM_FACES_OF_MESH, i) {
BM_elem_index_set(efa, i); /* set_inline */
BM_face_normal_update_vcos(bm, efa, bmdm->polyNos[i], (float const (*)[3])vertexCos);
- i++;
}
bm->elem_index_dirty &= ~BM_FACE;
- eve=BM_iter_new(&viter, bm, BM_VERTS_OF_MESH, NULL);
- for (i=0; eve; eve=BM_iter_step(&viter), i++) {
+ BM_ITER_MESH_INDEX (eve, &viter, bm, BM_VERTS_OF_MESH, i) {
float *no = bmdm->vertexNos[i];
BM_ITER_ELEM (efa, &fiter, eve, BM_FACES_OF_VERT) {
add_v3_v3(no, bmdm->polyNos[BM_elem_index_get(efa)]);
@@ -1725,14 +1720,14 @@ DerivedMesh *getEditDerivedBMesh(
/* following Mesh convention; we use vertex coordinate itself
* for normal in this case */
- if (normalize_v3(no)==0.0) {
+ if (normalize_v3(no) == 0.0f) {
copy_v3_v3(no, vertexCos[i]);
normalize_v3(no);
}
}
}
- return (DerivedMesh*) bmdm;
+ return (DerivedMesh *)bmdm;
}
/**
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index 4f320b41184..1d109d5f616 100644
--- a/source/blender/blenkernel/intern/effect.c
+++ b/source/blender/blenkernel/intern/effect.c
@@ -129,7 +129,7 @@ PartDeflect *object_add_collision_fields(int type)
pd->f_damp = 1.0f;
/* set sensible defaults based on type */
- switch(type) {
+ switch (type) {
case PFIELD_VORTEX:
pd->shape = PFIELD_SHAPE_PLANE;
break;
@@ -181,7 +181,7 @@ static void precalculate_effector(EffectorCache *eff)
Curve *cu= eff->ob->data;
if (cu->flag & CU_PATH) {
if (cu->path==NULL || cu->path->data==NULL)
- makeDispListCurveTypes(eff->scene, eff->ob, 0);
+ BKE_displist_make_curveTypes(eff->scene, eff->ob, 0);
if (cu->path && cu->path->data) {
where_on_path(eff->ob, 0.0, eff->guide_loc, eff->guide_dir, NULL, &eff->guide_radius, NULL);
@@ -202,9 +202,9 @@ static void precalculate_effector(EffectorCache *eff)
if (eff->ob) {
float old_vel[3];
- where_is_object_time(eff->scene, eff->ob, cfra - 1.0f);
+ BKE_object_where_is_calc_time(eff->scene, eff->ob, cfra - 1.0f);
copy_v3_v3(old_vel, eff->ob->obmat[3]);
- where_is_object_time(eff->scene, eff->ob, cfra);
+ BKE_object_where_is_calc_time(eff->scene, eff->ob, cfra);
sub_v3_v3v3(eff->velocity, eff->ob->obmat[3], old_vel);
}
}
@@ -419,8 +419,7 @@ static float eff_calc_visibility(ListBase *colliders, EffectorCache *eff, Effect
len = normalize_v3(norm);
// check all collision objects
- for (col = colls->first; col; col = col->next)
- {
+ for (col = colls->first; col; col = col->next) {
CollisionModifierData *collmd = col->collmd;
if (col->ob == eff->ob)
@@ -506,7 +505,8 @@ float effector_falloff(EffectorCache *eff, EffectorData *efd, EffectedPoint *UNU
falloff=0.0f;
else if (eff->pd->zdir == PFIELD_Z_NEG && fac > 0.0f)
falloff=0.0f;
- else switch(eff->pd->falloff) {
+ else {
+ switch (eff->pd->falloff) {
case PFIELD_FALL_SPHERE:
falloff*= falloff_func_dist(eff->pd, efd->distance);
break;
@@ -529,6 +529,7 @@ float effector_falloff(EffectorCache *eff, EffectorData *efd, EffectedPoint *UNU
falloff*= falloff_func_rad(eff->pd, r_fac);
break;
+ }
}
return falloff;
@@ -755,7 +756,7 @@ static void do_texture_effector(EffectorCache *eff, EffectorData *efd, EffectedP
strength= eff->pd->f_strength * efd->falloff;
- copy_v3_v3(tex_co,point->loc);
+ copy_v3_v3(tex_co, point->loc);
if (eff->pd->flag & PFIELD_TEX_2D) {
float fac=-dot_v3v3(tex_co, efd->nor);
@@ -766,7 +767,7 @@ static void do_texture_effector(EffectorCache *eff, EffectorData *efd, EffectedP
mul_m4_v3(eff->ob->imat, tex_co);
}
- hasrgb = multitex_ext(eff->pd->tex, tex_co, NULL,NULL, 0, result);
+ hasrgb = multitex_ext(eff->pd->tex, tex_co, NULL, NULL, 0, result);
if (hasrgb && mode==PFIELD_TEX_RGB) {
force[0] = (0.5f - result->tr) * strength;
@@ -819,7 +820,7 @@ static void do_physical_effector(EffectorCache *eff, EffectorData *efd, Effected
{
PartDeflect *pd = eff->pd;
RNG *rng = pd->rng;
- float force[3]={0,0,0};
+ float force[3]={0, 0, 0};
float temp[3];
float fac;
float strength = pd->f_strength;
@@ -835,7 +836,7 @@ static void do_physical_effector(EffectorCache *eff, EffectorData *efd, Effected
copy_v3_v3(force, efd->vec_to_point);
- switch(pd->forcefield) {
+ switch (pd->forcefield) {
case PFIELD_WIND:
copy_v3_v3(force, efd->nor);
mul_v3_fl(force, strength * efd->falloff);
@@ -904,9 +905,9 @@ static void do_physical_effector(EffectorCache *eff, EffectorData *efd, Effected
else {
add_v3_v3v3(temp, efd->vec_to_point2, efd->nor2);
}
- force[0] = -1.0f + 2.0f * BLI_gTurbulence(pd->f_size, temp[0], temp[1], temp[2], 2,0,2);
- force[1] = -1.0f + 2.0f * BLI_gTurbulence(pd->f_size, temp[1], temp[2], temp[0], 2,0,2);
- force[2] = -1.0f + 2.0f * BLI_gTurbulence(pd->f_size, temp[2], temp[0], temp[1], 2,0,2);
+ force[0] = -1.0f + 2.0f * BLI_gTurbulence(pd->f_size, temp[0], temp[1], temp[2], 2, 0, 2);
+ force[1] = -1.0f + 2.0f * BLI_gTurbulence(pd->f_size, temp[1], temp[2], temp[0], 2, 0, 2);
+ force[2] = -1.0f + 2.0f * BLI_gTurbulence(pd->f_size, temp[2], temp[0], temp[1], 2, 0, 2);
mul_v3_fl(force, strength * efd->falloff);
break;
case PFIELD_DRAG:
@@ -992,7 +993,7 @@ void pdDoEffectors(ListBase *effectors, ListBase *colliders, EffectorWeights *we
else if (eff->pd->forcefield == PFIELD_TEXTURE)
do_texture_effector(eff, &efd, point, force);
else {
- float temp1[3]={0,0,0}, temp2[3];
+ float temp1[3]={0, 0, 0}, temp2[3];
copy_v3_v3(temp1, force);
do_physical_effector(eff, &efd, point, force);
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index bb8cfe37a88..9d878cd185f 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -71,7 +71,7 @@
/* ---------------------- Freeing --------------------------- */
/* Frees the F-Curve itself too, so make sure BLI_remlink is called before calling this... */
-void free_fcurve (FCurve *fcu)
+void free_fcurve(FCurve *fcu)
{
if (fcu == NULL)
return;
@@ -95,7 +95,7 @@ void free_fcurve (FCurve *fcu)
}
/* Frees a list of F-Curves */
-void free_fcurves (ListBase *list)
+void free_fcurves(ListBase *list)
{
FCurve *fcu, *fcn;
@@ -107,19 +107,19 @@ void free_fcurves (ListBase *list)
* as we store reference to next, and freeing only touches the curve
* it's given
*/
- for (fcu= list->first; fcu; fcu= fcn) {
- fcn= fcu->next;
+ for (fcu = list->first; fcu; fcu = fcn) {
+ fcn = fcu->next;
free_fcurve(fcu);
}
/* clear pointers just in case */
- list->first= list->last= NULL;
+ list->first = list->last = NULL;
}
/* ---------------------- Copy --------------------------- */
/* duplicate an F-Curve */
-FCurve *copy_fcurve (FCurve *fcu)
+FCurve *copy_fcurve(FCurve *fcu)
{
FCurve *fcu_d;
@@ -128,20 +128,20 @@ FCurve *copy_fcurve (FCurve *fcu)
return NULL;
/* make a copy */
- fcu_d= MEM_dupallocN(fcu);
+ fcu_d = MEM_dupallocN(fcu);
- fcu_d->next= fcu_d->prev= NULL;
- fcu_d->grp= NULL;
+ fcu_d->next = fcu_d->prev = NULL;
+ fcu_d->grp = NULL;
/* copy curve data */
- fcu_d->bezt= MEM_dupallocN(fcu_d->bezt);
- fcu_d->fpt= MEM_dupallocN(fcu_d->fpt);
+ fcu_d->bezt = MEM_dupallocN(fcu_d->bezt);
+ fcu_d->fpt = MEM_dupallocN(fcu_d->fpt);
/* copy rna-path */
- fcu_d->rna_path= MEM_dupallocN(fcu_d->rna_path);
+ fcu_d->rna_path = MEM_dupallocN(fcu_d->rna_path);
/* copy driver */
- fcu_d->driver= fcurve_copy_driver(fcu_d->driver);
+ fcu_d->driver = fcurve_copy_driver(fcu_d->driver);
/* copy modifiers */
copy_fmodifiers(&fcu_d->modifiers, &fcu->modifiers);
@@ -151,7 +151,7 @@ FCurve *copy_fcurve (FCurve *fcu)
}
/* duplicate a list of F-Curves */
-void copy_fcurves (ListBase *dst, ListBase *src)
+void copy_fcurves(ListBase *dst, ListBase *src)
{
FCurve *dfcu, *sfcu;
@@ -160,11 +160,11 @@ void copy_fcurves (ListBase *dst, ListBase *src)
return;
/* clear destination list first */
- dst->first= dst->last= NULL;
+ dst->first = dst->last = NULL;
/* copy one-by-one */
- for (sfcu= src->first; sfcu; sfcu= sfcu->next) {
- dfcu= copy_fcurve(sfcu);
+ for (sfcu = src->first; sfcu; sfcu = sfcu->next) {
+ dfcu = copy_fcurve(sfcu);
BLI_addtail(dst, dfcu);
}
}
@@ -175,8 +175,8 @@ void copy_fcurves (ListBase *dst, ListBase *src)
FCurve *id_data_find_fcurve(ID *id, void *data, StructRNA *type, const char *prop_name, int index, char *driven)
{
/* anim vars */
- AnimData *adt= BKE_animdata_from_id(id);
- FCurve *fcu= NULL;
+ AnimData *adt = BKE_animdata_from_id(id);
+ FCurve *fcu = NULL;
/* rna vars */
PointerRNA ptr;
@@ -194,16 +194,16 @@ FCurve *id_data_find_fcurve(ID *id, void *data, StructRNA *type, const char *pro
prop = RNA_struct_find_property(&ptr, prop_name);
if (prop) {
- path= RNA_path_from_ID_to_property(&ptr, prop);
+ path = RNA_path_from_ID_to_property(&ptr, prop);
if (path) {
/* animation takes priority over drivers */
if ((adt->action) && (adt->action->curves.first))
- fcu= list_find_fcurve(&adt->action->curves, path, index);
+ fcu = list_find_fcurve(&adt->action->curves, path, index);
/* if not animated, check if driven */
if ((fcu == NULL) && (adt->drivers.first)) {
- fcu= list_find_fcurve(&adt->drivers, path, index);
+ fcu = list_find_fcurve(&adt->drivers, path, index);
if (fcu && driven)
*driven = TRUE;
fcu = NULL;
@@ -218,16 +218,16 @@ FCurve *id_data_find_fcurve(ID *id, void *data, StructRNA *type, const char *pro
/* Find the F-Curve affecting the given RNA-access path + index, in the list of F-Curves provided */
-FCurve *list_find_fcurve (ListBase *list, const char rna_path[], const int array_index)
+FCurve *list_find_fcurve(ListBase *list, const char rna_path[], const int array_index)
{
FCurve *fcu;
/* sanity checks */
- if ( ELEM(NULL, list, rna_path) || (array_index < 0) )
+ if (ELEM(NULL, list, rna_path) || (array_index < 0) )
return NULL;
/* check paths of curves, then array indices... */
- for (fcu= list->first; fcu; fcu= fcu->next) {
+ for (fcu = list->first; fcu; fcu = fcu->next) {
/* simple string-compare (this assumes that they have the same root...) */
if (fcu->rna_path && !strcmp(fcu->rna_path, rna_path)) {
/* now check indices */
@@ -241,7 +241,7 @@ FCurve *list_find_fcurve (ListBase *list, const char rna_path[], const int array
}
/* quick way to loop over all fcurves of a given 'path' */
-FCurve *iter_step_fcurve (FCurve *fcu_iter, const char rna_path[])
+FCurve *iter_step_fcurve(FCurve *fcu_iter, const char rna_path[])
{
FCurve *fcu;
@@ -250,7 +250,7 @@ FCurve *iter_step_fcurve (FCurve *fcu_iter, const char rna_path[])
return NULL;
/* check paths of curves, then array indices... */
- for (fcu= fcu_iter; fcu; fcu= fcu->next) {
+ for (fcu = fcu_iter; fcu; fcu = fcu->next) {
/* simple string-compare (this assumes that they have the same root...) */
if (fcu->rna_path && !strcmp(fcu->rna_path, rna_path)) {
return fcu;
@@ -267,10 +267,10 @@ FCurve *iter_step_fcurve (FCurve *fcu_iter, const char rna_path[])
* List must be freed after use, and is assumed to be empty when passed.
* - src: list of F-Curves to search through
* Filters...
- * - dataPrefix: i.e. 'pose.bones[' or 'nodes['
- * - dataName: name of entity within "" immediately following the prefix
+ * - dataPrefix: i.e. 'pose.bones[' or 'nodes['
+ * - dataName: name of entity within "" immediately following the prefix
*/
-int list_find_data_fcurves (ListBase *dst, ListBase *src, const char *dataPrefix, const char *dataName)
+int list_find_data_fcurves(ListBase *dst, ListBase *src, const char *dataPrefix, const char *dataName)
{
FCurve *fcu;
int matches = 0;
@@ -282,17 +282,17 @@ int list_find_data_fcurves (ListBase *dst, ListBase *src, const char *dataPrefix
return 0;
/* search each F-Curve one by one */
- for (fcu= src->first; fcu; fcu= fcu->next) {
+ for (fcu = src->first; fcu; fcu = fcu->next) {
/* check if quoted string matches the path */
if ((fcu->rna_path) && strstr(fcu->rna_path, dataPrefix)) {
- char *quotedName= BLI_getQuotedStr(fcu->rna_path, dataPrefix);
+ char *quotedName = BLI_getQuotedStr(fcu->rna_path, dataPrefix);
if (quotedName) {
/* check if the quoted name matches the required name */
if (strcmp(quotedName, dataName) == 0) {
- LinkData *ld= MEM_callocN(sizeof(LinkData), "list_find_data_fcurves");
+ LinkData *ld = MEM_callocN(sizeof(LinkData), "list_find_data_fcurves");
- ld->data= fcu;
+ ld->data = fcu;
BLI_addtail(dst, ld);
matches++;
@@ -308,37 +308,37 @@ int list_find_data_fcurves (ListBase *dst, ListBase *src, const char *dataPrefix
return matches;
}
-FCurve *rna_get_fcurve (PointerRNA *ptr, PropertyRNA *prop, int rnaindex, bAction **action, int *driven)
+FCurve *rna_get_fcurve(PointerRNA *ptr, PropertyRNA *prop, int rnaindex, bAction **action, int *driven)
{
- FCurve *fcu= NULL;
+ FCurve *fcu = NULL;
- *driven= 0;
+ *driven = 0;
/* there must be some RNA-pointer + property combon */
if (prop && ptr->id.data && RNA_property_animateable(ptr, prop)) {
- AnimData *adt= BKE_animdata_from_id(ptr->id.data);
+ AnimData *adt = BKE_animdata_from_id(ptr->id.data);
char *path;
if (adt) {
if ((adt->action && adt->action->curves.first) || (adt->drivers.first)) {
/* XXX this function call can become a performance bottleneck */
- path= RNA_path_from_ID_to_property(ptr, prop);
+ path = RNA_path_from_ID_to_property(ptr, prop);
if (path) {
/* animation takes priority over drivers */
if (adt->action && adt->action->curves.first)
- fcu= list_find_fcurve(&adt->action->curves, path, rnaindex);
+ fcu = list_find_fcurve(&adt->action->curves, path, rnaindex);
/* if not animated, check if driven */
if (!fcu && (adt->drivers.first)) {
- fcu= list_find_fcurve(&adt->drivers, path, rnaindex);
+ fcu = list_find_fcurve(&adt->drivers, path, rnaindex);
if (fcu)
- *driven= 1;
+ *driven = 1;
}
if (fcu && action)
- *action= adt->action;
+ *action = adt->action;
MEM_freeN(path);
}
@@ -352,18 +352,18 @@ FCurve *rna_get_fcurve (PointerRNA *ptr, PropertyRNA *prop, int rnaindex, bActio
/* ----------------- Finding Keyframes/Extents -------------------------- */
/* threshold for binary-searching keyframes - threshold here should be good enough for now, but should become userpref */
-#define BEZT_BINARYSEARCH_THRESH 0.01f /* was 0.00001, but giving errors */
+#define BEZT_BINARYSEARCH_THRESH 0.01f /* was 0.00001, but giving errors */
/* Binary search algorithm for finding where to insert BezTriple. (for use by insert_bezt_fcurve)
* Returns the index to insert at (data already at that index will be offset if replace is 0)
*/
-int binarysearch_bezt_index (BezTriple array[], float frame, int arraylen, short *replace)
+int binarysearch_bezt_index(BezTriple array[], float frame, int arraylen, short *replace)
{
- int start=0, end=arraylen;
- int loopbreaker= 0, maxloop= arraylen * 2;
+ int start = 0, end = arraylen;
+ int loopbreaker = 0, maxloop = arraylen * 2;
/* initialize replace-flag first */
- *replace= 0;
+ *replace = 0;
/* sneaky optimisations (don't go through searching process if...):
* - keyframe to be added is to be added out of current bounds
@@ -378,7 +378,7 @@ int binarysearch_bezt_index (BezTriple array[], float frame, int arraylen, short
float framenum;
/* 'First' Keyframe (when only one keyframe, this case is used) */
- framenum= array[0].vec[1][0];
+ framenum = array[0].vec[1][0];
if (IS_EQT(frame, framenum, BEZT_BINARYSEARCH_THRESH)) {
*replace = 1;
return 0;
@@ -387,9 +387,9 @@ int binarysearch_bezt_index (BezTriple array[], float frame, int arraylen, short
return 0;
/* 'Last' Keyframe */
- framenum= array[(arraylen-1)].vec[1][0];
+ framenum = array[(arraylen - 1)].vec[1][0];
if (IS_EQT(frame, framenum, BEZT_BINARYSEARCH_THRESH)) {
- *replace= 1;
+ *replace = 1;
return (arraylen - 1);
}
else if (frame > framenum)
@@ -400,10 +400,10 @@ int binarysearch_bezt_index (BezTriple array[], float frame, int arraylen, short
/* most of the time, this loop is just to find where to put it
* 'loopbreaker' is just here to prevent infinite loops
*/
- for (loopbreaker=0; (start <= end) && (loopbreaker < maxloop); loopbreaker++) {
+ for (loopbreaker = 0; (start <= end) && (loopbreaker < maxloop); loopbreaker++) {
/* compute and get midpoint */
- int mid = start + ((end - start) / 2); /* we calculate the midpoint this way to avoid int overflows... */
- float midfra= array[mid].vec[1][0];
+ int mid = start + ((end - start) / 2); /* we calculate the midpoint this way to avoid int overflows... */
+ float midfra = array[mid].vec[1][0];
/* check if exactly equal to midpoint */
if (IS_EQT(frame, midfra, BEZT_BINARYSEARCH_THRESH)) {
@@ -413,13 +413,13 @@ int binarysearch_bezt_index (BezTriple array[], float frame, int arraylen, short
/* repeat in upper/lower half */
if (frame > midfra)
- start= mid + 1;
+ start = mid + 1;
else if (frame < midfra)
- end= mid - 1;
+ end = mid - 1;
}
/* print error if loop-limit exceeded */
- if (loopbreaker == (maxloop-1)) {
+ if (loopbreaker == (maxloop - 1)) {
printf("Error: binarysearch_bezt_index() was taking too long\n");
// include debug info
@@ -433,8 +433,8 @@ int binarysearch_bezt_index (BezTriple array[], float frame, int arraylen, short
/* ...................................... */
/* helper for calc_fcurve_* functions -> find first and last BezTriple to be used */
-static void get_fcurve_end_keyframes (FCurve *fcu, BezTriple **first, BezTriple **last,
- const short do_sel_only)
+static void get_fcurve_end_keyframes(FCurve *fcu, BezTriple **first, BezTriple **last,
+ const short do_sel_only)
{
/* init outputs */
*first = NULL;
@@ -451,18 +451,18 @@ static void get_fcurve_end_keyframes (FCurve *fcu, BezTriple **first, BezTriple
/* find first selected */
bezt = fcu->bezt;
- for (i=0; i < fcu->totvert; bezt++, i++) {
+ for (i = 0; i < fcu->totvert; bezt++, i++) {
if (BEZSELECTED(bezt)) {
- *first= bezt;
+ *first = bezt;
break;
}
}
/* find last selected */
bezt = ARRAY_LAST_ITEM(fcu->bezt, BezTriple, sizeof(BezTriple), fcu->totvert);
- for (i=0; i < fcu->totvert; bezt--, i++) {
+ for (i = 0; i < fcu->totvert; bezt--, i++) {
if (BEZSELECTED(bezt)) {
- *last= bezt;
+ *last = bezt;
break;
}
}
@@ -476,17 +476,17 @@ static void get_fcurve_end_keyframes (FCurve *fcu, BezTriple **first, BezTriple
/* Calculate the extents of F-Curve's data */
-void calc_fcurve_bounds (FCurve *fcu, float *xmin, float *xmax, float *ymin, float *ymax,
- const short do_sel_only)
+void calc_fcurve_bounds(FCurve *fcu, float *xmin, float *xmax, float *ymin, float *ymax,
+ const short do_sel_only)
{
- float xminv=999999999.0f, xmaxv=-999999999.0f;
- float yminv=999999999.0f, ymaxv=-999999999.0f;
- short foundvert= FALSE;
+ float xminv = 999999999.0f, xmaxv = -999999999.0f;
+ float yminv = 999999999.0f, ymaxv = -999999999.0f;
+ short foundvert = FALSE;
unsigned int i;
if (fcu->totvert) {
if (fcu->bezt) {
- BezTriple *bezt_first= NULL, *bezt_last= NULL;
+ BezTriple *bezt_first = NULL, *bezt_last = NULL;
if (xmin || xmax) {
/* get endpoint keyframes */
@@ -495,8 +495,8 @@ void calc_fcurve_bounds (FCurve *fcu, float *xmin, float *xmax, float *ymin, flo
if (bezt_first) {
BLI_assert(bezt_last != NULL);
- xminv= MIN2(xminv, bezt_first->vec[1][0]);
- xmaxv= MAX2(xmaxv, bezt_last->vec[1][0]);
+ xminv = MIN2(xminv, bezt_first->vec[1][0]);
+ xmaxv = MAX2(xmaxv, bezt_last->vec[1][0]);
}
}
@@ -504,13 +504,13 @@ void calc_fcurve_bounds (FCurve *fcu, float *xmin, float *xmax, float *ymin, flo
if (ymin || ymax) {
BezTriple *bezt;
- for (bezt=fcu->bezt, i=0; i < fcu->totvert; bezt++, i++) {
+ for (bezt = fcu->bezt, i = 0; i < fcu->totvert; bezt++, i++) {
if ((do_sel_only == 0) || BEZSELECTED(bezt)) {
if (bezt->vec[1][1] < yminv)
- yminv= bezt->vec[1][1];
+ yminv = bezt->vec[1][1];
if (bezt->vec[1][1] > ymaxv)
- ymaxv= bezt->vec[1][1];
- foundvert= TRUE;
+ ymaxv = bezt->vec[1][1];
+ foundvert = TRUE;
}
}
}
@@ -518,55 +518,55 @@ void calc_fcurve_bounds (FCurve *fcu, float *xmin, float *xmax, float *ymin, flo
else if (fcu->fpt) {
/* frame range can be directly calculated from end verts */
if (xmin || xmax) {
- xminv= MIN2(xminv, fcu->fpt[0].vec[0]);
- xmaxv= MAX2(xmaxv, fcu->fpt[fcu->totvert-1].vec[0]);
+ xminv = MIN2(xminv, fcu->fpt[0].vec[0]);
+ xmaxv = MAX2(xmaxv, fcu->fpt[fcu->totvert - 1].vec[0]);
}
/* only loop over keyframes to find extents for values if needed */
if (ymin || ymax) {
FPoint *fpt;
- for (fpt=fcu->fpt, i=0; i < fcu->totvert; fpt++, i++) {
+ for (fpt = fcu->fpt, i = 0; i < fcu->totvert; fpt++, i++) {
if (fpt->vec[1] < yminv)
- yminv= fpt->vec[1];
+ yminv = fpt->vec[1];
if (fpt->vec[1] > ymaxv)
- ymaxv= fpt->vec[1];
+ ymaxv = fpt->vec[1];
- foundvert= TRUE;
+ foundvert = TRUE;
}
}
}
}
if (foundvert) {
- if (xmin) *xmin= xminv;
- if (xmax) *xmax= xmaxv;
+ if (xmin) *xmin = xminv;
+ if (xmax) *xmax = xmaxv;
- if (ymin) *ymin= yminv;
- if (ymax) *ymax= ymaxv;
+ if (ymin) *ymin = yminv;
+ if (ymax) *ymax = ymaxv;
}
else {
if (G.debug & G_DEBUG)
printf("F-Curve calc bounds didn't find anything, so assuming minimum bounds of 1.0\n");
- if (xmin) *xmin= 0.0f;
- if (xmax) *xmax= 1.0f;
+ if (xmin) *xmin = 0.0f;
+ if (xmax) *xmax = 1.0f;
- if (ymin) *ymin= 0.0f;
- if (ymax) *ymax= 1.0f;
+ if (ymin) *ymin = 0.0f;
+ if (ymax) *ymax = 1.0f;
}
}
/* Calculate the extents of F-Curve's keyframes */
-void calc_fcurve_range (FCurve *fcu, float *start, float *end,
- const short do_sel_only, const short do_min_length)
+void calc_fcurve_range(FCurve *fcu, float *start, float *end,
+ const short do_sel_only, const short do_min_length)
{
- float min=999999999.0f, max=-999999999.0f;
- short foundvert= FALSE;
+ float min = 999999999.0f, max = -999999999.0f;
+ short foundvert = FALSE;
if (fcu->totvert) {
if (fcu->bezt) {
- BezTriple *bezt_first= NULL, *bezt_last= NULL;
+ BezTriple *bezt_first = NULL, *bezt_last = NULL;
/* get endpoint keyframes */
get_fcurve_end_keyframes(fcu, &bezt_first, &bezt_last, do_sel_only);
@@ -574,23 +574,23 @@ void calc_fcurve_range (FCurve *fcu, float *start, float *end,
if (bezt_first) {
BLI_assert(bezt_last != NULL);
- min= MIN2(min, bezt_first->vec[1][0]);
- max= MAX2(max, bezt_last->vec[1][0]);
+ min = MIN2(min, bezt_first->vec[1][0]);
+ max = MAX2(max, bezt_last->vec[1][0]);
- foundvert= TRUE;
+ foundvert = TRUE;
}
}
else if (fcu->fpt) {
- min= MIN2(min, fcu->fpt[0].vec[0]);
- max= MAX2(max, fcu->fpt[fcu->totvert-1].vec[0]);
+ min = MIN2(min, fcu->fpt[0].vec[0]);
+ max = MAX2(max, fcu->fpt[fcu->totvert - 1].vec[0]);
- foundvert= TRUE;
+ foundvert = TRUE;
}
}
if (foundvert == FALSE) {
- min= max= 0.0f;
+ min = max = 0.0f;
}
if (do_min_length) {
@@ -600,8 +600,8 @@ void calc_fcurve_range (FCurve *fcu, float *start, float *end,
}
}
- *start= min;
- *end= max;
+ *start = min;
+ *end = max;
}
/* ----------------- Status Checks -------------------------- */
@@ -610,7 +610,7 @@ void calc_fcurve_range (FCurve *fcu, float *start, float *end,
* Usability of keyframes refers to whether they should be displayed,
* and also whether they will have any influence on the final result.
*/
-short fcurve_are_keyframes_usable (FCurve *fcu)
+short fcurve_are_keyframes_usable(FCurve *fcu)
{
/* F-Curve must exist */
if (fcu == NULL)
@@ -628,7 +628,7 @@ short fcurve_are_keyframes_usable (FCurve *fcu)
// TODO: optionally, only check modifier if it is the active one...
for (fcm = fcu->modifiers.last; fcm; fcm = fcm->prev) {
/* ignore if muted/disabled */
- if (fcm->flag & (FMODIFIER_FLAG_DISABLED|FMODIFIER_FLAG_MUTED))
+ if (fcm->flag & (FMODIFIER_FLAG_DISABLED | FMODIFIER_FLAG_MUTED))
continue;
/* type checks */
@@ -647,7 +647,7 @@ short fcurve_are_keyframes_usable (FCurve *fcu)
if ((data->flag & FCM_GENERATOR_ADDITIVE) == 0)
return 0;
}
- break;
+ break;
case FMODIFIER_TYPE_FN_GENERATOR:
{
FMod_FunctionGenerator *data = (FMod_FunctionGenerator *)fcm->data;
@@ -655,7 +655,7 @@ short fcurve_are_keyframes_usable (FCurve *fcu)
if ((data->flag & FCM_GENERATOR_ADDITIVE) == 0)
return 0;
}
- break;
+ break;
/* always harmful - cannot allow */
default:
@@ -671,7 +671,7 @@ short fcurve_are_keyframes_usable (FCurve *fcu)
/* Can keyframes be added to F-Curve?
* Keyframes can only be added if they are already visible
*/
-short fcurve_is_keyframable (FCurve *fcu)
+short fcurve_is_keyframable(FCurve *fcu)
{
/* F-Curve's keyframes must be "usable" (i.e. visible + have an effect on final result) */
if (fcurve_are_keyframes_usable(fcu) == 0)
@@ -688,14 +688,14 @@ short fcurve_is_keyframable (FCurve *fcu)
/* ***************************** Keyframe Column Tools ********************************* */
/* add a BezTriple to a column */
-void bezt_add_to_cfra_elem (ListBase *lb, BezTriple *bezt)
+void bezt_add_to_cfra_elem(ListBase *lb, BezTriple *bezt)
{
CfraElem *ce, *cen;
- for (ce= lb->first; ce; ce= ce->next) {
+ for (ce = lb->first; ce; ce = ce->next) {
/* double key? */
if (ce->cfra == bezt->vec[1][0]) {
- if (bezt->f2 & SELECT) ce->sel= bezt->f2;
+ if (bezt->f2 & SELECT) ce->sel = bezt->f2;
return;
}
/* should key be inserted before this column? */
@@ -703,12 +703,12 @@ void bezt_add_to_cfra_elem (ListBase *lb, BezTriple *bezt)
}
/* create a new column */
- cen= MEM_callocN(sizeof(CfraElem), "add_to_cfra_elem");
+ cen = MEM_callocN(sizeof(CfraElem), "add_to_cfra_elem");
if (ce) BLI_insertlinkbefore(lb, ce, cen);
else BLI_addtail(lb, cen);
- cen->cfra= bezt->vec[1][0];
- cen->sel= bezt->f2;
+ cen->cfra = bezt->vec[1][0];
+ cen->sel = bezt->f2;
}
/* ***************************** Samples Utilities ******************************* */
@@ -721,7 +721,7 @@ void bezt_add_to_cfra_elem (ListBase *lb, BezTriple *bezt)
/* Basic sampling callback which acts as a wrapper for evaluate_fcurve()
* 'data' arg here is unneeded here...
*/
-float fcurve_samplingcb_evalcurve (FCurve *fcu, void *UNUSED(data), float evaltime)
+float fcurve_samplingcb_evalcurve(FCurve *fcu, void *UNUSED(data), float evaltime)
{
/* assume any interference from drivers on the curve is intended... */
return evaluate_fcurve(fcu, evaltime);
@@ -731,7 +731,7 @@ float fcurve_samplingcb_evalcurve (FCurve *fcu, void *UNUSED(data), float evalti
/* Main API function for creating a set of sampled curve data, given some callback function
* used to retrieve the values to store.
*/
-void fcurve_store_samples (FCurve *fcu, void *data, int start, int end, FcuSampleFunc sample_cb)
+void fcurve_store_samples(FCurve *fcu, void *data, int start, int end, FcuSampleFunc sample_cb)
{
FPoint *fpt, *new_fpt;
int cfra;
@@ -748,12 +748,12 @@ void fcurve_store_samples (FCurve *fcu, void *data, int start, int end, FcuSampl
}
/* set up sample data */
- fpt= new_fpt= MEM_callocN(sizeof(FPoint)*(end-start+1), "FPoint Samples");
+ fpt = new_fpt = MEM_callocN(sizeof(FPoint) * (end - start + 1), "FPoint Samples");
/* use the sampling callback at 1-frame intervals from start to end frames */
- for (cfra= start; cfra <= end; cfra++, fpt++) {
- fpt->vec[0]= (float)cfra;
- fpt->vec[1]= sample_cb(fcu, data, (float)cfra);
+ for (cfra = start; cfra <= end; cfra++, fpt++) {
+ fpt->vec[0] = (float)cfra;
+ fpt->vec[1] = sample_cb(fcu, data, (float)cfra);
}
/* free any existing sample/keyframe data on curve */
@@ -761,9 +761,9 @@ void fcurve_store_samples (FCurve *fcu, void *data, int start, int end, FcuSampl
if (fcu->fpt) MEM_freeN(fcu->fpt);
/* store the samples */
- fcu->bezt= NULL;
- fcu->fpt= new_fpt;
- fcu->totvert= end - start + 1;
+ fcu->bezt = NULL;
+ fcu->fpt = new_fpt;
+ fcu->totvert = end - start + 1;
}
/* ***************************** F-Curve Sanity ********************************* */
@@ -775,10 +775,10 @@ void fcurve_store_samples (FCurve *fcu, void *data, int start, int end, FcuSampl
/* This function recalculates the handles of an F-Curve
* If the BezTriples have been rearranged, sort them first before using this.
*/
-void calchandles_fcurve (FCurve *fcu)
+void calchandles_fcurve(FCurve *fcu)
{
BezTriple *bezt, *prev, *next;
- int a= fcu->totvert;
+ int a = fcu->totvert;
/* Error checking:
* - need at least two points
@@ -789,33 +789,33 @@ void calchandles_fcurve (FCurve *fcu)
return;
/* get initial pointers */
- bezt= fcu->bezt;
- prev= NULL;
- next= (bezt + 1);
+ bezt = fcu->bezt;
+ prev = NULL;
+ next = (bezt + 1);
/* loop over all beztriples, adjusting handles */
while (a--) {
/* clamp timing of handles to be on either side of beztriple */
- if (bezt->vec[0][0] > bezt->vec[1][0]) bezt->vec[0][0]= bezt->vec[1][0];
- if (bezt->vec[2][0] < bezt->vec[1][0]) bezt->vec[2][0]= bezt->vec[1][0];
+ if (bezt->vec[0][0] > bezt->vec[1][0]) bezt->vec[0][0] = bezt->vec[1][0];
+ if (bezt->vec[2][0] < bezt->vec[1][0]) bezt->vec[2][0] = bezt->vec[1][0];
/* calculate auto-handles */
- calchandleNurb(bezt, prev, next, 1); /* 1==special autohandle */
+ BKE_nurb_handle_calc(bezt, prev, next, 1); /* 1==special autohandle */
/* for automatic ease in and out */
- if (ELEM(bezt->h1,HD_AUTO,HD_AUTO_ANIM) && ELEM(bezt->h2,HD_AUTO,HD_AUTO_ANIM)) {
+ if (ELEM(bezt->h1, HD_AUTO, HD_AUTO_ANIM) && ELEM(bezt->h2, HD_AUTO, HD_AUTO_ANIM)) {
/* only do this on first or last beztriple */
- if ((a == 0) || (a == fcu->totvert-1)) {
+ if ((a == 0) || (a == fcu->totvert - 1)) {
/* set both handles to have same horizontal value as keyframe */
if (fcu->extend == FCURVE_EXTRAPOLATE_CONSTANT) {
- bezt->vec[0][1]= bezt->vec[2][1]= bezt->vec[1][1];
+ bezt->vec[0][1] = bezt->vec[2][1] = bezt->vec[1][1];
}
}
}
/* advance pointers for next iteration */
- prev= bezt;
- if (a == 1) next= NULL;
+ prev = bezt;
+ if (a == 1) next = NULL;
else next++;
bezt++;
}
@@ -824,11 +824,11 @@ void calchandles_fcurve (FCurve *fcu)
/* Use when F-Curve with handles has changed
* It treats all BezTriples with the following rules:
* - PHASE 1: do types have to be altered?
- * -> Auto handles: become aligned when selection status is NOT(000 || 111)
- * -> Vector handles: become 'nothing' when (one half selected AND other not)
+ * -> Auto handles: become aligned when selection status is NOT(000 || 111)
+ * -> Vector handles: become 'nothing' when (one half selected AND other not)
* - PHASE 2: recalculate handles
*/
-void testhandles_fcurve (FCurve *fcu, const short use_handle)
+void testhandles_fcurve(FCurve *fcu, const short use_handle)
{
BezTriple *bezt;
unsigned int a;
@@ -838,41 +838,41 @@ void testhandles_fcurve (FCurve *fcu, const short use_handle)
return;
/* loop over beztriples */
- for (a=0, bezt=fcu->bezt; a < fcu->totvert; a++, bezt++) {
- short flag= 0;
+ for (a = 0, bezt = fcu->bezt; a < fcu->totvert; a++, bezt++) {
+ short flag = 0;
/* flag is initialized as selection status
* of beztriple control-points (labelled 0,1,2)
*/
- if (bezt->f2 & SELECT) flag |= (1<<1); // == 2
+ if (bezt->f2 & SELECT) flag |= (1 << 1); // == 2
if (use_handle == FALSE) {
if (flag & 2) {
- flag |= (1<<0) | (1<<2);
+ flag |= (1 << 0) | (1 << 2);
}
}
else {
- if (bezt->f1 & SELECT) flag |= (1<<0); // == 1
- if (bezt->f3 & SELECT) flag |= (1<<2); // == 4
+ if (bezt->f1 & SELECT) flag |= (1 << 0); // == 1
+ if (bezt->f3 & SELECT) flag |= (1 << 2); // == 4
}
/* one or two handles selected only */
- if (ELEM(flag, 0, 7)==0) {
+ if (ELEM(flag, 0, 7) == 0) {
/* auto handles become aligned */
if (ELEM(bezt->h1, HD_AUTO, HD_AUTO_ANIM))
- bezt->h1= HD_ALIGN;
+ bezt->h1 = HD_ALIGN;
if (ELEM(bezt->h2, HD_AUTO, HD_AUTO_ANIM))
- bezt->h2= HD_ALIGN;
+ bezt->h2 = HD_ALIGN;
/* vector handles become 'free' when only one half selected */
- if (bezt->h1==HD_VECT) {
+ if (bezt->h1 == HD_VECT) {
/* only left half (1 or 2 or 1+2) */
if (flag < 4)
- bezt->h1= 0;
+ bezt->h1 = 0;
}
- if (bezt->h2==HD_VECT) {
+ if (bezt->h2 == HD_VECT) {
/* only right half (4 or 2+4) */
if (flag > 3)
- bezt->h2= 0;
+ bezt->h2 = 0;
}
}
}
@@ -884,13 +884,13 @@ void testhandles_fcurve (FCurve *fcu, const short use_handle)
/* This function sorts BezTriples so that they are arranged in chronological order,
* as tools working on F-Curves expect that the BezTriples are in order.
*/
-void sort_time_fcurve (FCurve *fcu)
+void sort_time_fcurve(FCurve *fcu)
{
- short ok= 1;
+ short ok = 1;
/* keep adjusting order of beztriples until nothing moves (bubble-sort) */
while (ok) {
- ok= 0;
+ ok = 0;
/* currently, will only be needed when there are beztriples */
if (fcu->bezt) {
@@ -898,13 +898,13 @@ void sort_time_fcurve (FCurve *fcu)
unsigned int a;
/* loop over ALL points to adjust position in array and recalculate handles */
- for (a=0, bezt=fcu->bezt; a < fcu->totvert; a++, bezt++) {
+ for (a = 0, bezt = fcu->bezt; a < fcu->totvert; a++, bezt++) {
/* check if thee's a next beztriple which we could try to swap with current */
- if (a < (fcu->totvert-1)) {
+ if (a < (fcu->totvert - 1)) {
/* swap if one is after the other (and indicate that order has changed) */
- if (bezt->vec[1][0] > (bezt+1)->vec[1][0]) {
- SWAP(BezTriple, *bezt, *(bezt+1));
- ok= 1;
+ if (bezt->vec[1][0] > (bezt + 1)->vec[1][0]) {
+ SWAP(BezTriple, *bezt, *(bezt + 1));
+ ok = 1;
}
/* if either one of both of the points exceeds crosses over the keyframe time... */
@@ -916,9 +916,9 @@ void sort_time_fcurve (FCurve *fcu)
else {
/* clamp handles */
if (bezt->vec[0][0] > bezt->vec[1][0])
- bezt->vec[0][0]= bezt->vec[1][0];
+ bezt->vec[0][0] = bezt->vec[1][0];
if (bezt->vec[2][0] < bezt->vec[1][0])
- bezt->vec[2][0]= bezt->vec[1][0];
+ bezt->vec[2][0] = bezt->vec[1][0];
}
}
}
@@ -927,7 +927,7 @@ void sort_time_fcurve (FCurve *fcu)
}
/* This function tests if any BezTriples are out of order, thus requiring a sort */
-short test_time_fcurve (FCurve *fcu)
+short test_time_fcurve(FCurve *fcu)
{
unsigned int a;
@@ -940,8 +940,8 @@ short test_time_fcurve (FCurve *fcu)
BezTriple *bezt;
/* loop through all BezTriples, stopping when one exceeds the one after it */
- for (a=0, bezt= fcu->bezt; a < (fcu->totvert - 1); a++, bezt++) {
- if (bezt->vec[1][0] > (bezt+1)->vec[1][0])
+ for (a = 0, bezt = fcu->bezt; a < (fcu->totvert - 1); a++, bezt++) {
+ if (bezt->vec[1][0] > (bezt + 1)->vec[1][0])
return 1;
}
}
@@ -949,8 +949,8 @@ short test_time_fcurve (FCurve *fcu)
FPoint *fpt;
/* loop through all FPoints, stopping when one exceeds the one after it */
- for (a=0, fpt= fcu->fpt; a < (fcu->totvert - 1); a++, fpt++) {
- if (fpt->vec[0] > (fpt+1)->vec[0])
+ for (a = 0, fpt = fcu->fpt; a < (fcu->totvert - 1); a++, fpt++) {
+ if (fpt->vec[0] > (fpt + 1)->vec[0])
return 1;
}
}
@@ -969,9 +969,9 @@ typedef struct DriverVarTypeInfo {
float (*get_value)(ChannelDriver *driver, DriverVar *dvar);
/* allocation of target slots */
- int num_targets; /* number of target slots required */
- const char *target_names[MAX_DRIVER_TARGETS]; /* UI names that should be given to the slots */
- int target_flags[MAX_DRIVER_TARGETS]; /* flags defining the requirements for each slot */
+ int num_targets; /* number of target slots required */
+ const char *target_names[MAX_DRIVER_TARGETS]; /* UI names that should be given to the slots */
+ int target_flags[MAX_DRIVER_TARGETS]; /* flags defining the requirements for each slot */
} DriverVarTypeInfo;
/* Macro to begin definitions */
@@ -986,25 +986,25 @@ typedef struct DriverVarTypeInfo {
static ID *dtar_id_ensure_proxy_from(ID *id)
{
- if (id && GS(id->name)==ID_OB && ((Object *)id)->proxy_from)
+ if (id && GS(id->name) == ID_OB && ((Object *)id)->proxy_from)
return (ID *)(((Object *)id)->proxy_from);
return id;
}
/* Helper function to obtain a value using RNA from the specified source (for evaluating drivers) */
-static float dtar_get_prop_val (ChannelDriver *driver, DriverTarget *dtar)
+static float dtar_get_prop_val(ChannelDriver *driver, DriverTarget *dtar)
{
PointerRNA id_ptr, ptr;
PropertyRNA *prop;
ID *id;
int index;
- float value= 0.0f;
+ float value = 0.0f;
/* sanity check */
if (ELEM(NULL, driver, dtar))
return 0.0f;
- id= dtar_id_ensure_proxy_from(dtar->id);
+ id = dtar_id_ensure_proxy_from(dtar->id);
/* error check for missing pointer... */
// TODO: tag the specific target too as having issues
@@ -1024,37 +1024,37 @@ static float dtar_get_prop_val (ChannelDriver *driver, DriverTarget *dtar)
/* array */
if (index < RNA_property_array_length(&ptr, prop)) {
switch (RNA_property_type(prop)) {
+ case PROP_BOOLEAN:
+ value = (float)RNA_property_boolean_get_index(&ptr, prop, index);
+ break;
+ case PROP_INT:
+ value = (float)RNA_property_int_get_index(&ptr, prop, index);
+ break;
+ case PROP_FLOAT:
+ value = RNA_property_float_get_index(&ptr, prop, index);
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ else {
+ /* not an array */
+ switch (RNA_property_type(prop)) {
case PROP_BOOLEAN:
- value= (float)RNA_property_boolean_get_index(&ptr, prop, index);
+ value = (float)RNA_property_boolean_get(&ptr, prop);
break;
case PROP_INT:
- value= (float)RNA_property_int_get_index(&ptr, prop, index);
+ value = (float)RNA_property_int_get(&ptr, prop);
break;
case PROP_FLOAT:
- value= RNA_property_float_get_index(&ptr, prop, index);
+ value = RNA_property_float_get(&ptr, prop);
+ break;
+ case PROP_ENUM:
+ value = (float)RNA_property_enum_get(&ptr, prop);
break;
default:
break;
- }
- }
- }
- else {
- /* not an array */
- switch (RNA_property_type(prop)) {
- case PROP_BOOLEAN:
- value= (float)RNA_property_boolean_get(&ptr, prop);
- break;
- case PROP_INT:
- value= (float)RNA_property_int_get(&ptr, prop);
- break;
- case PROP_FLOAT:
- value= RNA_property_float_get(&ptr, prop);
- break;
- case PROP_ENUM:
- value= (float)RNA_property_enum_get(&ptr, prop);
- break;
- default:
- break;
}
}
@@ -1071,21 +1071,21 @@ static float dtar_get_prop_val (ChannelDriver *driver, DriverTarget *dtar)
}
/* Helper function to obtain a pointer to a Pose Channel (for evaluating drivers) */
-static bPoseChannel *dtar_get_pchan_ptr (ChannelDriver *driver, DriverTarget *dtar)
+static bPoseChannel *dtar_get_pchan_ptr(ChannelDriver *driver, DriverTarget *dtar)
{
ID *id;
/* sanity check */
if (ELEM(NULL, driver, dtar))
return NULL;
- id= dtar_id_ensure_proxy_from(dtar->id);
+ id = dtar_id_ensure_proxy_from(dtar->id);
/* check if the ID here is a valid object */
if (id && GS(id->name)) {
- Object *ob= (Object *)id;
+ Object *ob = (Object *)id;
/* get pose, and subsequently, posechannel */
- return get_pose_channel(ob->pose, dtar->pchan_name);
+ return BKE_pose_channel_find_name(ob->pose, dtar->pchan_name);
}
else {
/* cannot find a posechannel this way */
@@ -1096,21 +1096,21 @@ static bPoseChannel *dtar_get_pchan_ptr (ChannelDriver *driver, DriverTarget *dt
/* ......... */
/* evaluate 'single prop' driver variable */
-static float dvar_eval_singleProp (ChannelDriver *driver, DriverVar *dvar)
+static float dvar_eval_singleProp(ChannelDriver *driver, DriverVar *dvar)
{
/* just evaluate the first target slot */
return dtar_get_prop_val(driver, &dvar->targets[0]);
}
/* evaluate 'rotation difference' driver variable */
-static float dvar_eval_rotDiff (ChannelDriver *driver, DriverVar *dvar)
+static float dvar_eval_rotDiff(ChannelDriver *driver, DriverVar *dvar)
{
bPoseChannel *pchan, *pchan2;
float q1[4], q2[4], quat[4], angle;
/* get pose channels, and check if we've got two */
- pchan= dtar_get_pchan_ptr(driver, &dvar->targets[0]);
- pchan2= dtar_get_pchan_ptr(driver, &dvar->targets[1]);
+ pchan = dtar_get_pchan_ptr(driver, &dvar->targets[0]);
+ pchan2 = dtar_get_pchan_ptr(driver, &dvar->targets[1]);
if (ELEM(NULL, pchan, pchan2)) {
/* disable this driver, since it doesn't work correctly... */
@@ -1135,24 +1135,24 @@ static float dvar_eval_rotDiff (ChannelDriver *driver, DriverVar *dvar)
invert_qt(q1);
mul_qt_qtqt(quat, q1, q2);
angle = 2.0f * (saacos(quat[0]));
- angle= ABS(angle);
+ angle = ABS(angle);
return (angle > (float)M_PI) ? (float)((2.0f * (float)M_PI) - angle) : (float)(angle);
}
/* evaluate 'location difference' driver variable */
// TODO: this needs to take into account space conversions...
-static float dvar_eval_locDiff (ChannelDriver *driver, DriverVar *dvar)
+static float dvar_eval_locDiff(ChannelDriver *driver, DriverVar *dvar)
{
- float loc1[3] = {0.0f,0.0f,0.0f};
- float loc2[3] = {0.0f,0.0f,0.0f};
+ float loc1[3] = {0.0f, 0.0f, 0.0f};
+ float loc2[3] = {0.0f, 0.0f, 0.0f};
/* get two location values */
// NOTE: for now, these are all just worldspace
DRIVER_TARGETS_USED_LOOPER(dvar)
{
/* get pointer to loc values to store in */
- Object *ob= (Object *)dtar_id_ensure_proxy_from(dtar->id);
+ Object *ob = (Object *)dtar_id_ensure_proxy_from(dtar->id);
bPoseChannel *pchan;
float tmp_loc[3];
@@ -1164,7 +1164,7 @@ static float dvar_eval_locDiff (ChannelDriver *driver, DriverVar *dvar)
}
/* try to get posechannel */
- pchan= get_pose_channel(ob->pose, dtar->pchan_name);
+ pchan = BKE_pose_channel_find_name(ob->pose, dtar->pchan_name);
/* check if object or bone */
if (pchan) {
@@ -1234,14 +1234,14 @@ static float dvar_eval_locDiff (ChannelDriver *driver, DriverVar *dvar)
}
/* evaluate 'transform channel' driver variable */
-static float dvar_eval_transChan (ChannelDriver *driver, DriverVar *dvar)
+static float dvar_eval_transChan(ChannelDriver *driver, DriverVar *dvar)
{
- DriverTarget *dtar= &dvar->targets[0];
- Object *ob= (Object *)dtar_id_ensure_proxy_from(dtar->id);
+ DriverTarget *dtar = &dvar->targets[0];
+ Object *ob = (Object *)dtar_id_ensure_proxy_from(dtar->id);
bPoseChannel *pchan;
float mat[4][4];
- float oldEul[3] = {0.0f,0.0f,0.0f};
- short useEulers=0, rotOrder=ROT_MODE_EUL;
+ float oldEul[3] = {0.0f, 0.0f, 0.0f};
+ short useEulers = 0, rotOrder = ROT_MODE_EUL;
/* check if this target has valid data */
if ((ob == NULL) || (GS(ob->id.name) != ID_OB)) {
@@ -1251,7 +1251,7 @@ static float dvar_eval_transChan (ChannelDriver *driver, DriverVar *dvar)
}
/* try to get posechannel */
- pchan= get_pose_channel(ob->pose, dtar->pchan_name);
+ pchan = BKE_pose_channel_find_name(ob->pose, dtar->pchan_name);
/* check if object or bone, and get transform matrix accordingly
* - "useEulers" code is used to prevent the problems associated with non-uniqueness
@@ -1263,7 +1263,7 @@ static float dvar_eval_transChan (ChannelDriver *driver, DriverVar *dvar)
/* bone */
if (pchan->rotmode > 0) {
copy_v3_v3(oldEul, pchan->eul);
- rotOrder= pchan->rotmode;
+ rotOrder = pchan->rotmode;
useEulers = 1;
}
@@ -1278,7 +1278,7 @@ static float dvar_eval_transChan (ChannelDriver *driver, DriverVar *dvar)
* since it stores delta transform of pose_mat so that deforms work
* so it cannot be used here for "transform" space
*/
- pchan_to_mat4(pchan, mat);
+ BKE_pchan_to_mat4(pchan, mat);
}
}
else {
@@ -1290,7 +1290,7 @@ static float dvar_eval_transChan (ChannelDriver *driver, DriverVar *dvar)
/* object */
if (ob->rotmode > 0) {
copy_v3_v3(oldEul, ob->rot);
- rotOrder= ob->rotmode;
+ rotOrder = ob->rotmode;
useEulers = 1;
}
@@ -1302,7 +1302,7 @@ static float dvar_eval_transChan (ChannelDriver *driver, DriverVar *dvar)
}
else {
/* transforms to matrix */
- object_to_mat4(ob, mat);
+ BKE_object_to_mat4(ob, mat);
}
}
else {
@@ -1353,36 +1353,36 @@ static float dvar_eval_transChan (ChannelDriver *driver, DriverVar *dvar)
/* Table of Driver Varaiable Type Info Data */
static DriverVarTypeInfo dvar_types[MAX_DVAR_TYPES] = {
BEGIN_DVAR_TYPEDEF(DVAR_TYPE_SINGLE_PROP)
- dvar_eval_singleProp, /* eval callback */
- 1, /* number of targets used */
- {"Property"}, /* UI names for targets */
- {0} /* flags */
+ dvar_eval_singleProp, /* eval callback */
+ 1, /* number of targets used */
+ {"Property"}, /* UI names for targets */
+ {0} /* flags */
END_DVAR_TYPEDEF,
BEGIN_DVAR_TYPEDEF(DVAR_TYPE_ROT_DIFF)
- dvar_eval_rotDiff, /* eval callback */
- 2, /* number of targets used */
- {"Bone 1", "Bone 2"}, /* UI names for targets */
- {DTAR_FLAG_STRUCT_REF|DTAR_FLAG_ID_OB_ONLY, DTAR_FLAG_STRUCT_REF|DTAR_FLAG_ID_OB_ONLY} /* flags */
+ dvar_eval_rotDiff, /* eval callback */
+ 2, /* number of targets used */
+ {"Bone 1", "Bone 2"}, /* UI names for targets */
+ {DTAR_FLAG_STRUCT_REF | DTAR_FLAG_ID_OB_ONLY, DTAR_FLAG_STRUCT_REF | DTAR_FLAG_ID_OB_ONLY} /* flags */
END_DVAR_TYPEDEF,
BEGIN_DVAR_TYPEDEF(DVAR_TYPE_LOC_DIFF)
- dvar_eval_locDiff, /* eval callback */
- 2, /* number of targets used */
- {"Object/Bone 1", "Object/Bone 2"}, /* UI names for targets */
- {DTAR_FLAG_STRUCT_REF|DTAR_FLAG_ID_OB_ONLY, DTAR_FLAG_STRUCT_REF|DTAR_FLAG_ID_OB_ONLY} /* flags */
+ dvar_eval_locDiff, /* eval callback */
+ 2, /* number of targets used */
+ {"Object/Bone 1", "Object/Bone 2"}, /* UI names for targets */
+ {DTAR_FLAG_STRUCT_REF | DTAR_FLAG_ID_OB_ONLY, DTAR_FLAG_STRUCT_REF | DTAR_FLAG_ID_OB_ONLY} /* flags */
END_DVAR_TYPEDEF,
BEGIN_DVAR_TYPEDEF(DVAR_TYPE_TRANSFORM_CHAN)
- dvar_eval_transChan, /* eval callback */
- 1, /* number of targets used */
- {"Object/Bone"}, /* UI names for targets */
- {DTAR_FLAG_STRUCT_REF|DTAR_FLAG_ID_OB_ONLY} /* flags */
+ dvar_eval_transChan, /* eval callback */
+ 1, /* number of targets used */
+ {"Object/Bone"}, /* UI names for targets */
+ {DTAR_FLAG_STRUCT_REF | DTAR_FLAG_ID_OB_ONLY} /* flags */
END_DVAR_TYPEDEF,
};
/* Get driver variable typeinfo */
-static DriverVarTypeInfo *get_dvar_typeinfo (int type)
+static DriverVarTypeInfo *get_dvar_typeinfo(int type)
{
/* check if valid type */
if ((type >= 0) && (type < MAX_DVAR_TYPES))
@@ -1394,7 +1394,7 @@ static DriverVarTypeInfo *get_dvar_typeinfo (int type)
/* Driver API --------------------------------- */
/* This frees the driver variable itself */
-void driver_free_variable (ChannelDriver *driver, DriverVar *dvar)
+void driver_free_variable(ChannelDriver *driver, DriverVar *dvar)
{
/* sanity checks */
if (dvar == NULL)
@@ -1403,7 +1403,7 @@ void driver_free_variable (ChannelDriver *driver, DriverVar *dvar)
/* free target vars
* - need to go over all of them, not just up to the ones that are used
* currently, since there may be some lingering RNA paths from
- * previous users needing freeing
+ * previous users needing freeing
*/
DRIVER_TARGETS_LOOPER(dvar)
{
@@ -1418,23 +1418,23 @@ void driver_free_variable (ChannelDriver *driver, DriverVar *dvar)
#ifdef WITH_PYTHON
/* since driver variables are cached, the expression needs re-compiling too */
- if (driver->type==DRIVER_TYPE_PYTHON)
+ if (driver->type == DRIVER_TYPE_PYTHON)
driver->flag |= DRIVER_FLAG_RENAMEVAR;
#endif
}
/* Change the type of driver variable */
-void driver_change_variable_type (DriverVar *dvar, int type)
+void driver_change_variable_type(DriverVar *dvar, int type)
{
- DriverVarTypeInfo *dvti= get_dvar_typeinfo(type);
+ DriverVarTypeInfo *dvti = get_dvar_typeinfo(type);
/* sanity check */
if (ELEM(NULL, dvar, dvti))
return;
/* set the new settings */
- dvar->type= type;
- dvar->num_targets= dvti->num_targets;
+ dvar->type = type;
+ dvar->num_targets = dvti->num_targets;
/* make changes to the targets based on the defines for these types
* NOTE: only need to make sure the ones we're using here are valid...
@@ -1448,13 +1448,13 @@ void driver_change_variable_type (DriverVar *dvar, int type)
/* object ID types only, or idtype not yet initialized*/
if ((flags & DTAR_FLAG_ID_OB_ONLY) || (dtar->idtype == 0))
- dtar->idtype= ID_OB;
+ dtar->idtype = ID_OB;
}
DRIVER_TARGETS_LOOPER_END
}
/* Add a new driver variable */
-DriverVar *driver_add_new_variable (ChannelDriver *driver)
+DriverVar *driver_add_new_variable(ChannelDriver *driver)
{
DriverVar *dvar;
@@ -1463,7 +1463,7 @@ DriverVar *driver_add_new_variable (ChannelDriver *driver)
return NULL;
/* make a new variable */
- dvar= MEM_callocN(sizeof(DriverVar), "DriverVar");
+ dvar = MEM_callocN(sizeof(DriverVar), "DriverVar");
BLI_addtail(&driver->variables, dvar);
/* give the variable a 'unique' name */
@@ -1475,7 +1475,7 @@ DriverVar *driver_add_new_variable (ChannelDriver *driver)
#ifdef WITH_PYTHON
/* since driver variables are cached, the expression needs re-compiling too */
- if (driver->type==DRIVER_TYPE_PYTHON)
+ if (driver->type == DRIVER_TYPE_PYTHON)
driver->flag |= DRIVER_FLAG_RENAMEVAR;
#endif
@@ -1492,11 +1492,11 @@ void fcurve_free_driver(FCurve *fcu)
/* sanity checks */
if (ELEM(NULL, fcu, fcu->driver))
return;
- driver= fcu->driver;
+ driver = fcu->driver;
/* free driver targets */
- for (dvar= driver->variables.first; dvar; dvar= dvarn) {
- dvarn= dvar->next;
+ for (dvar = driver->variables.first; dvar; dvar = dvarn) {
+ dvarn = dvar->next;
driver_free_variable(driver, dvar);
}
@@ -1508,11 +1508,11 @@ void fcurve_free_driver(FCurve *fcu)
/* free driver itself, then set F-Curve's point to this to NULL (as the curve may still be used) */
MEM_freeN(driver);
- fcu->driver= NULL;
+ fcu->driver = NULL;
}
/* This makes a copy of the given driver */
-ChannelDriver *fcurve_copy_driver (ChannelDriver *driver)
+ChannelDriver *fcurve_copy_driver(ChannelDriver *driver)
{
ChannelDriver *ndriver;
DriverVar *dvar;
@@ -1522,14 +1522,14 @@ ChannelDriver *fcurve_copy_driver (ChannelDriver *driver)
return NULL;
/* copy all data */
- ndriver= MEM_dupallocN(driver);
- ndriver->expr_comp= NULL;
+ ndriver = MEM_dupallocN(driver);
+ ndriver->expr_comp = NULL;
/* copy variables */
- ndriver->variables.first= ndriver->variables.last= NULL;
+ ndriver->variables.first = ndriver->variables.last = NULL;
BLI_duplicatelist(&ndriver->variables, &driver->variables);
- for (dvar= ndriver->variables.first; dvar; dvar= dvar->next) {
+ for (dvar = ndriver->variables.first; dvar; dvar = dvar->next) {
/* need to go over all targets so that we don't leave any dangling paths */
DRIVER_TARGETS_LOOPER(dvar)
{
@@ -1547,7 +1547,7 @@ ChannelDriver *fcurve_copy_driver (ChannelDriver *driver)
/* Driver Evaluation -------------------------- */
/* Evaluate a Driver Variable to get a value that contributes to the final */
-float driver_get_variable_value (ChannelDriver *driver, DriverVar *dvar)
+float driver_get_variable_value(ChannelDriver *driver, DriverVar *dvar)
{
DriverVarTypeInfo *dvti;
@@ -1559,21 +1559,21 @@ float driver_get_variable_value (ChannelDriver *driver, DriverVar *dvar)
* using the variable type info, storing the obtained value
* in dvar->curval so that drivers can be debugged
*/
- dvti= get_dvar_typeinfo(dvar->type);
+ dvti = get_dvar_typeinfo(dvar->type);
if (dvti && dvti->get_value)
- dvar->curval= dvti->get_value(driver, dvar);
+ dvar->curval = dvti->get_value(driver, dvar);
else
- dvar->curval= 0.0f;
+ dvar->curval = 0.0f;
return dvar->curval;
}
/* Evaluate an Channel-Driver to get a 'time' value to use instead of "evaltime"
* - "evaltime" is the frame at which F-Curve is being evaluated
- * - has to return a float value
+ * - has to return a float value
*/
-static float evaluate_driver (ChannelDriver *driver, const float evaltime)
+static float evaluate_driver(ChannelDriver *driver, const float evaltime)
{
DriverVar *dvar;
@@ -1588,8 +1588,8 @@ static float evaluate_driver (ChannelDriver *driver, const float evaltime)
/* check how many variables there are first (i.e. just one?) */
if (driver->variables.first == driver->variables.last) {
/* just one target, so just use that */
- dvar= driver->variables.first;
- driver->curval= driver_get_variable_value(driver, dvar);
+ dvar = driver->variables.first;
+ driver->curval = driver_get_variable_value(driver, dvar);
}
else {
/* more than one target, so average the values of the targets */
@@ -1597,19 +1597,19 @@ static float evaluate_driver (ChannelDriver *driver, const float evaltime)
int tot = 0;
/* loop through targets, adding (hopefully we don't get any overflow!) */
- for (dvar= driver->variables.first; dvar; dvar=dvar->next) {
+ for (dvar = driver->variables.first; dvar; dvar = dvar->next) {
value += driver_get_variable_value(driver, dvar);
tot++;
}
/* perform operations on the total if appropriate */
if (driver->type == DRIVER_TYPE_AVERAGE)
- driver->curval= (value / (float)tot);
+ driver->curval = (value / (float)tot);
else
- driver->curval= value;
+ driver->curval = value;
}
}
- break;
+ break;
case DRIVER_TYPE_MIN: /* smallest value */
case DRIVER_TYPE_MAX: /* largest value */
@@ -1617,9 +1617,9 @@ static float evaluate_driver (ChannelDriver *driver, const float evaltime)
float value = 0.0f;
/* loop through the variables, getting the values and comparing them to existing ones */
- for (dvar= driver->variables.first; dvar; dvar= dvar->next) {
+ for (dvar = driver->variables.first; dvar; dvar = dvar->next) {
/* get value */
- float tmp_val= driver_get_variable_value(driver, dvar);
+ float tmp_val = driver_get_variable_value(driver, dvar);
/* store this value if appropriate */
if (dvar->prev) {
@@ -1627,52 +1627,51 @@ static float evaluate_driver (ChannelDriver *driver, const float evaltime)
if (driver->type == DRIVER_TYPE_MAX) {
/* max? */
if (tmp_val > value)
- value= tmp_val;
+ value = tmp_val;
}
else {
/* min? */
if (tmp_val < value)
- value= tmp_val;
+ value = tmp_val;
}
}
else {
/* first item - make this the baseline for comparisons */
- value= tmp_val;
+ value = tmp_val;
}
}
/* store value in driver */
- driver->curval= value;
+ driver->curval = value;
}
- break;
+ break;
case DRIVER_TYPE_PYTHON: /* expression */
{
#ifdef WITH_PYTHON
/* check for empty or invalid expression */
if ( (driver->expression[0] == '\0') ||
- (driver->flag & DRIVER_FLAG_INVALID) )
+ (driver->flag & DRIVER_FLAG_INVALID) )
{
- driver->curval= 0.0f;
+ driver->curval = 0.0f;
}
- else
- {
- /* this evaluates the expression using Python,and returns its result:
- * - on errors it reports, then returns 0.0f
+ else {
+ /* this evaluates the expression using Python, and returns its result:
+ * - on errors it reports, then returns 0.0f
*/
- driver->curval= BPY_driver_exec(driver, evaltime);
+ driver->curval = BPY_driver_exec(driver, evaltime);
}
#else /* WITH_PYTHON*/
- (void)evaltime;
+ (void)evaltime;
#endif /* WITH_PYTHON*/
}
- break;
+ break;
default:
{
/* special 'hack' - just use stored value
* This is currently used as the mechanism which allows animated settings to be able
- * to be changed via the UI.
+ * to be changed via the UI.
*/
}
}
@@ -1692,127 +1691,127 @@ void correct_bezpart(float v1[2], float v2[2], float v3[2], float v4[2])
float h1[2], h2[2], len1, len2, len, fac;
/* calculate handle deltas */
- h1[0]= v1[0] - v2[0];
- h1[1]= v1[1] - v2[1];
+ h1[0] = v1[0] - v2[0];
+ h1[1] = v1[1] - v2[1];
- h2[0]= v4[0] - v3[0];
- h2[1]= v4[1] - v3[1];
+ h2[0] = v4[0] - v3[0];
+ h2[1] = v4[1] - v3[1];
/* calculate distances:
- * - len = span of time between keyframes
+ * - len = span of time between keyframes
* - len1 = length of handle of start key
- * - len2 = length of handle of end key
+ * - len2 = length of handle of end key
*/
- len= v4[0]- v1[0];
- len1= fabsf(h1[0]);
- len2= fabsf(h2[0]);
+ len = v4[0] - v1[0];
+ len1 = fabsf(h1[0]);
+ len2 = fabsf(h2[0]);
/* if the handles have no length, no need to do any corrections */
- if ((len1+len2) == 0.0f)
+ if ((len1 + len2) == 0.0f)
return;
/* the two handles cross over each other, so force them
* apart using the proportion they overlap
*/
- if ((len1+len2) > len) {
- fac= len / (len1+len2);
+ if ((len1 + len2) > len) {
+ fac = len / (len1 + len2);
- v2[0]= (v1[0] - fac*h1[0]);
- v2[1]= (v1[1] - fac*h1[1]);
+ v2[0] = (v1[0] - fac * h1[0]);
+ v2[1] = (v1[1] - fac * h1[1]);
- v3[0]= (v4[0] - fac*h2[0]);
- v3[1]= (v4[1] - fac*h2[1]);
+ v3[0] = (v4[0] - fac * h2[0]);
+ v3[1] = (v4[1] - fac * h2[1]);
}
}
/* find root ('zero') */
-static int findzero (float x, float q0, float q1, float q2, float q3, float *o)
+static int findzero(float x, float q0, float q1, float q2, float q3, float *o)
{
double c0, c1, c2, c3, a, b, c, p, q, d, t, phi;
- int nr= 0;
+ int nr = 0;
- c0= q0 - x;
- c1= 3.0f * (q1 - q0);
- c2= 3.0f * (q0 - 2.0f*q1 + q2);
- c3= q3 - q0 + 3.0f * (q1 - q2);
+ c0 = q0 - x;
+ c1 = 3.0f * (q1 - q0);
+ c2 = 3.0f * (q0 - 2.0f * q1 + q2);
+ c3 = q3 - q0 + 3.0f * (q1 - q2);
if (c3 != 0.0) {
- a= c2/c3;
- b= c1/c3;
- c= c0/c3;
- a= a/3;
-
- p= b/3 - a*a;
- q= (2*a*a*a - a*b + c) / 2;
- d= q*q + p*p*p;
+ a = c2 / c3;
+ b = c1 / c3;
+ c = c0 / c3;
+ a = a / 3;
+
+ p = b / 3 - a * a;
+ q = (2 * a * a * a - a * b + c) / 2;
+ d = q * q + p * p * p;
if (d > 0.0) {
- t= sqrt(d);
- o[0]= (float)(sqrt3d(-q+t) + sqrt3d(-q-t) - a);
+ t = sqrt(d);
+ o[0] = (float)(sqrt3d(-q + t) + sqrt3d(-q - t) - a);
if ((o[0] >= (float)SMALL) && (o[0] <= 1.000001f)) return 1;
else return 0;
}
else if (d == 0.0) {
- t= sqrt3d(-q);
- o[0]= (float)(2*t - a);
+ t = sqrt3d(-q);
+ o[0] = (float)(2 * t - a);
if ((o[0] >= (float)SMALL) && (o[0] <= 1.000001f)) nr++;
- o[nr]= (float)(-t-a);
+ o[nr] = (float)(-t - a);
- if ((o[nr] >= (float)SMALL) && (o[nr] <= 1.000001f)) return nr+1;
+ if ((o[nr] >= (float)SMALL) && (o[nr] <= 1.000001f)) return nr + 1;
else return nr;
}
else {
- phi= acos(-q / sqrt(-(p*p*p)));
- t= sqrt(-p);
- p= cos(phi/3);
- q= sqrt(3 - 3*p*p);
- o[0]= (float)(2*t*p - a);
+ phi = acos(-q / sqrt(-(p * p * p)));
+ t = sqrt(-p);
+ p = cos(phi / 3);
+ q = sqrt(3 - 3 * p * p);
+ o[0] = (float)(2 * t * p - a);
if ((o[0] >= (float)SMALL) && (o[0] <= 1.000001f)) nr++;
- o[nr]= (float)(-t * (p + q) - a);
+ o[nr] = (float)(-t * (p + q) - a);
if ((o[nr] >= (float)SMALL) && (o[nr] <= 1.000001f)) nr++;
- o[nr]= (float)(-t * (p - q) - a);
+ o[nr] = (float)(-t * (p - q) - a);
- if ((o[nr] >= (float)SMALL) && (o[nr] <= 1.000001f)) return nr+1;
+ if ((o[nr] >= (float)SMALL) && (o[nr] <= 1.000001f)) return nr + 1;
else return nr;
}
}
else {
- a=c2;
- b=c1;
- c=c0;
+ a = c2;
+ b = c1;
+ c = c0;
if (a != 0.0) {
// discriminant
- p= b*b - 4*a*c;
+ p = b * b - 4 * a * c;
if (p > 0) {
- p= sqrt(p);
- o[0]= (float)((-b-p) / (2 * a));
+ p = sqrt(p);
+ o[0] = (float)((-b - p) / (2 * a));
if ((o[0] >= (float)SMALL) && (o[0] <= 1.000001f)) nr++;
- o[nr]= (float)((-b+p)/(2*a));
+ o[nr] = (float)((-b + p) / (2 * a));
- if ((o[nr] >= (float)SMALL) && (o[nr] <= 1.000001f)) return nr+1;
+ if ((o[nr] >= (float)SMALL) && (o[nr] <= 1.000001f)) return nr + 1;
else return nr;
}
else if (p == 0) {
- o[0]= (float)(-b / (2 * a));
+ o[0] = (float)(-b / (2 * a));
if ((o[0] >= (float)SMALL) && (o[0] <= 1.000001f)) return 1;
else return 0;
}
}
else if (b != 0.0) {
- o[0]= (float)(-c/b);
+ o[0] = (float)(-c / b);
if ((o[0] >= (float)SMALL) && (o[0] <= 1.000001f)) return 1;
else return 0;
}
else if (c == 0.0) {
- o[0]= 0.0;
+ o[0] = 0.0;
return 1;
}
@@ -1820,36 +1819,36 @@ static int findzero (float x, float q0, float q1, float q2, float q3, float *o)
}
}
-static void berekeny (float f1, float f2, float f3, float f4, float *o, int b)
+static void berekeny(float f1, float f2, float f3, float f4, float *o, int b)
{
float t, c0, c1, c2, c3;
int a;
- c0= f1;
- c1= 3.0f * (f2 - f1);
- c2= 3.0f * (f1 - 2.0f*f2 + f3);
- c3= f4 - f1 + 3.0f * (f2 - f3);
-
- for (a=0; a < b; a++) {
- t= o[a];
- o[a]= c0 + t*c1 + t*t*c2 + t*t*t*c3;
+ c0 = f1;
+ c1 = 3.0f * (f2 - f1);
+ c2 = 3.0f * (f1 - 2.0f * f2 + f3);
+ c3 = f4 - f1 + 3.0f * (f2 - f3);
+
+ for (a = 0; a < b; a++) {
+ t = o[a];
+ o[a] = c0 + t * c1 + t * t * c2 + t * t * t * c3;
}
}
#if 0
-static void berekenx (float *f, float *o, int b)
+static void berekenx(float *f, float *o, int b)
{
float t, c0, c1, c2, c3;
int a;
- c0= f[0];
- c1= 3.0f * (f[3] - f[0]);
- c2= 3.0f * (f[0] - 2.0f*f[3] + f[6]);
- c3= f[9] - f[0] + 3.0f * (f[3] - f[6]);
-
- for (a=0; a < b; a++) {
- t= o[a];
- o[a]= c0 + t*c1 + t*t*c2 + t*t*t*c3;
+ c0 = f[0];
+ c1 = 3.0f * (f[3] - f[0]);
+ c2 = 3.0f * (f[0] - 2.0f * f[3] + f[6]);
+ c3 = f[9] - f[0] + 3.0f * (f[3] - f[6]);
+
+ for (a = 0; a < b; a++) {
+ t = o[a];
+ o[a] = c0 + t * c1 + t * t * c2 + t * t * t * c3;
}
}
#endif
@@ -1858,7 +1857,7 @@ static void berekenx (float *f, float *o, int b)
/* -------------------------- */
/* Calculate F-Curve value for 'evaltime' using BezTriple keyframes */
-static float fcurve_eval_keyframes (FCurve *fcu, BezTriple *bezts, float evaltime)
+static float fcurve_eval_keyframes(FCurve *fcu, BezTriple *bezts, float evaltime)
{
BezTriple *bezt, *prevbezt, *lastbezt;
float v1[2], v2[2], v3[2], v4[2], opl[32], dx, fac;
@@ -1867,37 +1866,37 @@ static float fcurve_eval_keyframes (FCurve *fcu, BezTriple *bezts, float evaltim
float cvalue = 0.0f;
/* get pointers */
- a= fcu->totvert-1;
- prevbezt= bezts;
- bezt= prevbezt+1;
- lastbezt= prevbezt + a;
+ a = fcu->totvert - 1;
+ prevbezt = bezts;
+ bezt = prevbezt + 1;
+ lastbezt = prevbezt + a;
/* evaluation time at or past endpoints? */
if (prevbezt->vec[1][0] >= evaltime) {
/* before or on first keyframe */
if ( (fcu->extend == FCURVE_EXTRAPOLATE_LINEAR) && (prevbezt->ipo != BEZT_IPO_CONST) &&
- !(fcu->flag & FCURVE_DISCRETE_VALUES) )
+ !(fcu->flag & FCURVE_DISCRETE_VALUES) )
{
/* linear or bezier interpolation */
- if (prevbezt->ipo==BEZT_IPO_LIN) {
+ if (prevbezt->ipo == BEZT_IPO_LIN) {
/* Use the next center point instead of our own handle for
* linear interpolated extrapolate
*/
if (fcu->totvert == 1) {
- cvalue= prevbezt->vec[1][1];
+ cvalue = prevbezt->vec[1][1];
}
else {
- bezt = prevbezt+1;
- dx= prevbezt->vec[1][0] - evaltime;
- fac= bezt->vec[1][0] - prevbezt->vec[1][0];
+ bezt = prevbezt + 1;
+ dx = prevbezt->vec[1][0] - evaltime;
+ fac = bezt->vec[1][0] - prevbezt->vec[1][0];
/* prevent division by zero */
if (fac) {
- fac= (bezt->vec[1][1] - prevbezt->vec[1][1]) / fac;
- cvalue= prevbezt->vec[1][1] - (fac * dx);
+ fac = (bezt->vec[1][1] - prevbezt->vec[1][1]) / fac;
+ cvalue = prevbezt->vec[1][1] - (fac * dx);
}
else {
- cvalue= prevbezt->vec[1][1];
+ cvalue = prevbezt->vec[1][1];
}
}
}
@@ -1905,16 +1904,16 @@ static float fcurve_eval_keyframes (FCurve *fcu, BezTriple *bezts, float evaltim
/* Use the first handle (earlier) of first BezTriple to calculate the
* gradient and thus the value of the curve at evaltime
*/
- dx= prevbezt->vec[1][0] - evaltime;
- fac= prevbezt->vec[1][0] - prevbezt->vec[0][0];
+ dx = prevbezt->vec[1][0] - evaltime;
+ fac = prevbezt->vec[1][0] - prevbezt->vec[0][0];
/* prevent division by zero */
if (fac) {
- fac= (prevbezt->vec[1][1] - prevbezt->vec[0][1]) / fac;
- cvalue= prevbezt->vec[1][1] - (fac * dx);
+ fac = (prevbezt->vec[1][1] - prevbezt->vec[0][1]) / fac;
+ cvalue = prevbezt->vec[1][1] - (fac * dx);
}
else {
- cvalue= prevbezt->vec[1][1];
+ cvalue = prevbezt->vec[1][1];
}
}
}
@@ -1922,34 +1921,34 @@ static float fcurve_eval_keyframes (FCurve *fcu, BezTriple *bezts, float evaltim
/* constant (BEZT_IPO_HORIZ) extrapolation or constant interpolation,
* so just extend first keyframe's value
*/
- cvalue= prevbezt->vec[1][1];
+ cvalue = prevbezt->vec[1][1];
}
}
else if (lastbezt->vec[1][0] <= evaltime) {
/* after or on last keyframe */
if ( (fcu->extend == FCURVE_EXTRAPOLATE_LINEAR) && (lastbezt->ipo != BEZT_IPO_CONST) &&
- !(fcu->flag & FCURVE_DISCRETE_VALUES) )
+ !(fcu->flag & FCURVE_DISCRETE_VALUES) )
{
/* linear or bezier interpolation */
- if (lastbezt->ipo==BEZT_IPO_LIN) {
+ if (lastbezt->ipo == BEZT_IPO_LIN) {
/* Use the next center point instead of our own handle for
* linear interpolated extrapolate
*/
if (fcu->totvert == 1) {
- cvalue= lastbezt->vec[1][1];
+ cvalue = lastbezt->vec[1][1];
}
else {
prevbezt = lastbezt - 1;
- dx= evaltime - lastbezt->vec[1][0];
- fac= lastbezt->vec[1][0] - prevbezt->vec[1][0];
+ dx = evaltime - lastbezt->vec[1][0];
+ fac = lastbezt->vec[1][0] - prevbezt->vec[1][0];
/* prevent division by zero */
if (fac) {
- fac= (lastbezt->vec[1][1] - prevbezt->vec[1][1]) / fac;
- cvalue= lastbezt->vec[1][1] + (fac * dx);
+ fac = (lastbezt->vec[1][1] - prevbezt->vec[1][1]) / fac;
+ cvalue = lastbezt->vec[1][1] + (fac * dx);
}
else {
- cvalue= lastbezt->vec[1][1];
+ cvalue = lastbezt->vec[1][1];
}
}
}
@@ -1957,16 +1956,16 @@ static float fcurve_eval_keyframes (FCurve *fcu, BezTriple *bezts, float evaltim
/* Use the gradient of the second handle (later) of last BezTriple to calculate the
* gradient and thus the value of the curve at evaltime
*/
- dx= evaltime - lastbezt->vec[1][0];
- fac= lastbezt->vec[2][0] - lastbezt->vec[1][0];
+ dx = evaltime - lastbezt->vec[1][0];
+ fac = lastbezt->vec[2][0] - lastbezt->vec[1][0];
/* prevent division by zero */
if (fac) {
- fac= (lastbezt->vec[2][1] - lastbezt->vec[1][1]) / fac;
- cvalue= lastbezt->vec[1][1] + (fac * dx);
+ fac = (lastbezt->vec[2][1] - lastbezt->vec[1][1]) / fac;
+ cvalue = lastbezt->vec[1][1] + (fac * dx);
}
else {
- cvalue= lastbezt->vec[1][1];
+ cvalue = lastbezt->vec[1][1];
}
}
}
@@ -1974,57 +1973,57 @@ static float fcurve_eval_keyframes (FCurve *fcu, BezTriple *bezts, float evaltim
/* constant (BEZT_IPO_HORIZ) extrapolation or constant interpolation,
* so just extend last keyframe's value
*/
- cvalue= lastbezt->vec[1][1];
+ cvalue = lastbezt->vec[1][1];
}
}
else {
/* evaltime occurs somewhere in the middle of the curve */
- for (a=0; prevbezt && bezt && (a < fcu->totvert-1); a++, prevbezt=bezt, bezt++) {
+ for (a = 0; prevbezt && bezt && (a < fcu->totvert - 1); a++, prevbezt = bezt, bezt++) {
/* use if the key is directly on the frame, rare cases this is needed else we get 0.0 instead. */
if (fabsf(bezt->vec[1][0] - evaltime) < SMALL_NUMBER) {
- cvalue= bezt->vec[1][1];
+ cvalue = bezt->vec[1][1];
}
/* evaltime occurs within the interval defined by these two keyframes */
else if ((prevbezt->vec[1][0] <= evaltime) && (bezt->vec[1][0] >= evaltime)) {
/* value depends on interpolation mode */
if ((prevbezt->ipo == BEZT_IPO_CONST) || (fcu->flag & FCURVE_DISCRETE_VALUES)) {
/* constant (evaltime not relevant, so no interpolation needed) */
- cvalue= prevbezt->vec[1][1];
+ cvalue = prevbezt->vec[1][1];
}
else if (prevbezt->ipo == BEZT_IPO_LIN) {
/* linear - interpolate between values of the two keyframes */
- fac= bezt->vec[1][0] - prevbezt->vec[1][0];
+ fac = bezt->vec[1][0] - prevbezt->vec[1][0];
/* prevent division by zero */
if (fac) {
- fac= (evaltime - prevbezt->vec[1][0]) / fac;
- cvalue= prevbezt->vec[1][1] + (fac * (bezt->vec[1][1] - prevbezt->vec[1][1]));
+ fac = (evaltime - prevbezt->vec[1][0]) / fac;
+ cvalue = prevbezt->vec[1][1] + (fac * (bezt->vec[1][1] - prevbezt->vec[1][1]));
}
else {
- cvalue= prevbezt->vec[1][1];
+ cvalue = prevbezt->vec[1][1];
}
}
else {
/* bezier interpolation */
- /* v1,v2 are the first keyframe and its 2nd handle */
- v1[0]= prevbezt->vec[1][0];
- v1[1]= prevbezt->vec[1][1];
- v2[0]= prevbezt->vec[2][0];
- v2[1]= prevbezt->vec[2][1];
- /* v3,v4 are the last keyframe's 1st handle + the last keyframe */
- v3[0]= bezt->vec[0][0];
- v3[1]= bezt->vec[0][1];
- v4[0]= bezt->vec[1][0];
- v4[1]= bezt->vec[1][1];
+ /* v1,v2 are the first keyframe and its 2nd handle */
+ v1[0] = prevbezt->vec[1][0];
+ v1[1] = prevbezt->vec[1][1];
+ v2[0] = prevbezt->vec[2][0];
+ v2[1] = prevbezt->vec[2][1];
+ /* v3,v4 are the last keyframe's 1st handle + the last keyframe */
+ v3[0] = bezt->vec[0][0];
+ v3[1] = bezt->vec[0][1];
+ v4[0] = bezt->vec[1][0];
+ v4[1] = bezt->vec[1][1];
/* adjust handles so that they don't overlap (forming a loop) */
correct_bezpart(v1, v2, v3, v4);
/* try to get a value for this position - if failure, try another set of points */
- b= findzero(evaltime, v1[0], v2[0], v3[0], v4[0], opl);
+ b = findzero(evaltime, v1[0], v2[0], v3[0], v4[0], opl);
if (b) {
berekeny(v1[1], v2[1], v3[1], v4[1], opl, 1);
- cvalue= opl[0];
+ cvalue = opl[0];
break;
}
}
@@ -2037,35 +2036,35 @@ static float fcurve_eval_keyframes (FCurve *fcu, BezTriple *bezts, float evaltim
}
/* Calculate F-Curve value for 'evaltime' using FPoint samples */
-static float fcurve_eval_samples (FCurve *fcu, FPoint *fpts, float evaltime)
+static float fcurve_eval_samples(FCurve *fcu, FPoint *fpts, float evaltime)
{
FPoint *prevfpt, *lastfpt, *fpt;
- float cvalue= 0.0f;
+ float cvalue = 0.0f;
/* get pointers */
- prevfpt= fpts;
- lastfpt= prevfpt + fcu->totvert-1;
+ prevfpt = fpts;
+ lastfpt = prevfpt + fcu->totvert - 1;
/* evaluation time at or past endpoints? */
if (prevfpt->vec[0] >= evaltime) {
/* before or on first sample, so just extend value */
- cvalue= prevfpt->vec[1];
+ cvalue = prevfpt->vec[1];
}
else if (lastfpt->vec[0] <= evaltime) {
/* after or on last sample, so just extend value */
- cvalue= lastfpt->vec[1];
+ cvalue = lastfpt->vec[1];
}
else {
- float t= (float)abs(evaltime - (int)evaltime);
+ float t = (float)abs(evaltime - (int)evaltime);
/* find the one on the right frame (assume that these are spaced on 1-frame intervals) */
- fpt= prevfpt + (int)(evaltime - prevfpt->vec[0]);
+ fpt = prevfpt + (int)(evaltime - prevfpt->vec[0]);
/* if not exactly on the frame, perform linear interpolation with the next one */
if (t != 0.0f)
- cvalue= interpf(fpt->vec[1], (fpt+1)->vec[1], t);
+ cvalue = interpf(fpt->vec[1], (fpt + 1)->vec[1], t);
else
- cvalue= fpt->vec[1];
+ cvalue = fpt->vec[1];
}
/* return value */
@@ -2077,9 +2076,9 @@ static float fcurve_eval_samples (FCurve *fcu, FPoint *fpts, float evaltime)
/* Evaluate and return the value of the given F-Curve at the specified frame ("evaltime")
* Note: this is also used for drivers
*/
-float evaluate_fcurve (FCurve *fcu, float evaltime)
+float evaluate_fcurve(FCurve *fcu, float evaltime)
{
- float cvalue= 0.0f;
+ float cvalue = 0.0f;
float devaltime;
/* if there is a driver (only if this F-Curve is acting as 'driver'), evaluate it to find value to use as "evaltime"
@@ -2088,20 +2087,20 @@ float evaluate_fcurve (FCurve *fcu, float evaltime)
*/
if (fcu->driver) {
/* evaltime now serves as input for the curve */
- evaltime= cvalue= evaluate_driver(fcu->driver, evaltime);
+ evaltime = cvalue = evaluate_driver(fcu->driver, evaltime);
}
/* evaluate modifiers which modify time to evaluate the base curve at */
- devaltime= evaluate_time_fmodifiers(&fcu->modifiers, fcu, cvalue, evaltime);
+ devaltime = evaluate_time_fmodifiers(&fcu->modifiers, fcu, cvalue, evaltime);
/* evaluate curve-data
* - 'devaltime' instead of 'evaltime', as this is the time that the last time-modifying
* F-Curve modifier on the stack requested the curve to be evaluated at
*/
if (fcu->bezt)
- cvalue= fcurve_eval_keyframes(fcu, fcu->bezt, devaltime);
+ cvalue = fcurve_eval_keyframes(fcu, fcu->bezt, devaltime);
else if (fcu->fpt)
- cvalue= fcurve_eval_samples(fcu, fcu->fpt, devaltime);
+ cvalue = fcurve_eval_samples(fcu, fcu->fpt, devaltime);
/* evaluate modifiers */
evaluate_value_fmodifiers(&fcu->modifiers, fcu, &cvalue, evaltime);
@@ -2110,23 +2109,23 @@ float evaluate_fcurve (FCurve *fcu, float evaltime)
* here so that the curve can be sampled correctly
*/
if (fcu->flag & FCURVE_INT_VALUES)
- cvalue= floorf(cvalue + 0.5f);
+ cvalue = floorf(cvalue + 0.5f);
/* return evaluated value */
return cvalue;
}
/* Calculate the value of the given F-Curve at the given frame, and set its curval */
-void calculate_fcurve (FCurve *fcu, float ctime)
+void calculate_fcurve(FCurve *fcu, float ctime)
{
/* only calculate + set curval (overriding the existing value) if curve has
* any data which warrants this...
*/
- if ( (fcu->totvert) || (fcu->driver && !(fcu->driver->flag & DRIVER_FLAG_INVALID)) ||
- list_has_suitable_fmodifier(&fcu->modifiers, 0, FMI_TYPE_GENERATE_CURVE) )
+ if ((fcu->totvert) || (fcu->driver && !(fcu->driver->flag & DRIVER_FLAG_INVALID)) ||
+ list_has_suitable_fmodifier(&fcu->modifiers, 0, FMI_TYPE_GENERATE_CURVE))
{
/* calculate and set curval (evaluates driver too if necessary) */
- fcu->curval= evaluate_fcurve(fcu, ctime);
+ fcu->curval = evaluate_fcurve(fcu, ctime);
}
}
diff --git a/source/blender/blenkernel/intern/fluidsim.c b/source/blender/blenkernel/intern/fluidsim.c
index a930818dd15..9be599ac66c 100644
--- a/source/blender/blenkernel/intern/fluidsim.c
+++ b/source/blender/blenkernel/intern/fluidsim.c
@@ -78,7 +78,8 @@ void initElbeemMesh(struct Scene *scene, struct Object *ob,
int *tris;
dm = mesh_create_derived_index_render(scene, ob, CD_MASK_BAREMESH, modifierIndex);
- //dm = mesh_create_derived_no_deform(ob,NULL);
+
+ DM_ensure_tessface(dm);
mvert = dm->getVertArray(dm);
mface = dm->getTessFaceArray(dm);
@@ -86,7 +87,7 @@ void initElbeemMesh(struct Scene *scene, struct Object *ob,
totface = dm->getNumTessFaces(dm);
*numVertices = totvert;
- verts = MEM_callocN( totvert*3*sizeof(float), "elbeemmesh_vertices");
+ verts = MEM_callocN(totvert*3*sizeof(float), "elbeemmesh_vertices");
for (i=0; i<totvert; i++) {
copy_v3_v3(&verts[i*3], mvert[i].co);
if (useGlobalCoords) { mul_m4_v3(ob->obmat, &verts[i*3]); }
@@ -98,7 +99,7 @@ void initElbeemMesh(struct Scene *scene, struct Object *ob,
if (mface[i].v4) { countTris++; }
}
*numTriangles = countTris;
- tris = MEM_callocN( countTris*3*sizeof(int), "elbeemmesh_triangles");
+ tris = MEM_callocN(countTris*3*sizeof(int), "elbeemmesh_triangles");
countTris = 0;
for (i=0; i<totface; i++) {
int face[4];
@@ -122,3 +123,4 @@ void initElbeemMesh(struct Scene *scene, struct Object *ob,
dm->release(dm);
}
+
diff --git a/source/blender/blenkernel/intern/fmodifier.c b/source/blender/blenkernel/intern/fmodifier.c
index ed5cf5e7924..59c8a529d85 100644
--- a/source/blender/blenkernel/intern/fmodifier.c
+++ b/source/blender/blenkernel/intern/fmodifier.c
@@ -68,14 +68,14 @@
*/
/* Template for type-info data:
- * - make a copy of this when creating new modifiers, and just change the functions
- * pointed to as necessary
- * - although the naming of functions doesn't matter, it would help for code
- * readability, to follow the same naming convention as is presented here
- * - any functions that a constraint doesn't need to define, don't define
- * for such cases, just use NULL
- * - these should be defined after all the functions have been defined, so that
- * forward-definitions/prototypes don't need to be used!
+ * - make a copy of this when creating new modifiers, and just change the functions
+ * pointed to as necessary
+ * - although the naming of functions doesn't matter, it would help for code
+ * readability, to follow the same naming convention as is presented here
+ * - any functions that a constraint doesn't need to define, don't define
+ * for such cases, just use NULL
+ * - these should be defined after all the functions have been defined, so that
+ * forward-definitions/prototypes don't need to be used!
* - keep this copy #if-def'd so that future constraints can get based off this
*/
#if 0
@@ -99,74 +99,74 @@ static FModifierTypeInfo FMI_MODNAME = {
/* Generator F-Curve Modifier --------------------------- */
/* Generators available:
- * 1) simple polynomial generator:
+ * 1) simple polynomial generator:
* - Exanded form - (y = C[0]*(x^(n)) + C[1]*(x^(n-1)) + ... + C[n])
* - Factorized form - (y = (C[0][0]*x + C[0][1]) * (C[1][0]*x + C[1][1]) * ... * (C[n][0]*x + C[n][1]))
*/
-static void fcm_generator_free (FModifier *fcm)
+static void fcm_generator_free(FModifier *fcm)
{
- FMod_Generator *data= (FMod_Generator *)fcm->data;
+ FMod_Generator *data = (FMod_Generator *)fcm->data;
/* free polynomial coefficients array */
if (data->coefficients)
MEM_freeN(data->coefficients);
}
-static void fcm_generator_copy (FModifier *fcm, FModifier *src)
+static void fcm_generator_copy(FModifier *fcm, FModifier *src)
{
- FMod_Generator *gen= (FMod_Generator *)fcm->data;
- FMod_Generator *ogen= (FMod_Generator *)src->data;
+ FMod_Generator *gen = (FMod_Generator *)fcm->data;
+ FMod_Generator *ogen = (FMod_Generator *)src->data;
/* copy coefficients array? */
if (ogen->coefficients)
- gen->coefficients= MEM_dupallocN(ogen->coefficients);
+ gen->coefficients = MEM_dupallocN(ogen->coefficients);
}
-static void fcm_generator_new_data (void *mdata)
+static void fcm_generator_new_data(void *mdata)
{
- FMod_Generator *data= (FMod_Generator *)mdata;
+ FMod_Generator *data = (FMod_Generator *)mdata;
float *cp;
/* set default generator to be linear 0-1 (gradient = 1, y-offset = 0) */
- data->poly_order= 1;
- data->arraysize= 2;
- cp= data->coefficients= MEM_callocN(sizeof(float)*2, "FMod_Generator_Coefs");
+ 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
}
-static void fcm_generator_verify (FModifier *fcm)
+static void fcm_generator_verify(FModifier *fcm)
{
- FMod_Generator *data= (FMod_Generator *)fcm->data;
+ FMod_Generator *data = (FMod_Generator *)fcm->data;
/* requirements depend on mode */
switch (data->mode) {
case FCM_GENERATOR_POLYNOMIAL: /* expanded polynomial expression */
{
/* arraysize needs to be order+1, so resize if not */
- if (data->arraysize != (data->poly_order+1)) {
+ if (data->arraysize != (data->poly_order + 1)) {
float *nc;
/* make new coefficients array, and copy over as much data as can fit */
- nc= MEM_callocN(sizeof(float)*(data->poly_order+1), "FMod_Generator_Coefs");
+ nc = MEM_callocN(sizeof(float) * (data->poly_order + 1), "FMod_Generator_Coefs");
if (data->coefficients) {
- if ((int)data->arraysize > (data->poly_order+1))
- memcpy(nc, data->coefficients, sizeof(float)*(data->poly_order+1));
+ if ((int)data->arraysize > (data->poly_order + 1))
+ memcpy(nc, data->coefficients, sizeof(float) * (data->poly_order + 1));
else
- memcpy(nc, data->coefficients, sizeof(float)*data->arraysize);
+ memcpy(nc, data->coefficients, sizeof(float) * data->arraysize);
/* free the old data */
MEM_freeN(data->coefficients);
}
/* set the new data */
- data->coefficients= nc;
- data->arraysize= data->poly_order+1;
+ data->coefficients = nc;
+ data->arraysize = data->poly_order + 1;
}
}
- break;
+ break;
case FCM_GENERATOR_POLYNOMIAL_FACTORISED: /* expanded polynomial expression */
{
@@ -175,30 +175,30 @@ static void fcm_generator_verify (FModifier *fcm)
float *nc;
/* make new coefficients array, and copy over as much data as can fit */
- nc= MEM_callocN(sizeof(float)*(data->poly_order*2), "FMod_Generator_Coefs");
+ nc = MEM_callocN(sizeof(float) * (data->poly_order * 2), "FMod_Generator_Coefs");
if (data->coefficients) {
if (data->arraysize > (unsigned int)(data->poly_order * 2))
- memcpy(nc, data->coefficients, sizeof(float)*(data->poly_order * 2));
+ memcpy(nc, data->coefficients, sizeof(float) * (data->poly_order * 2));
else
- memcpy(nc, data->coefficients, sizeof(float)*data->arraysize);
+ memcpy(nc, data->coefficients, sizeof(float) * data->arraysize);
/* free the old data */
MEM_freeN(data->coefficients);
}
/* set the new data */
- data->coefficients= nc;
- data->arraysize= data->poly_order * 2;
+ data->coefficients = nc;
+ data->arraysize = data->poly_order * 2;
}
}
- break;
+ break;
}
}
-static void fcm_generator_evaluate (FCurve *UNUSED(fcu), FModifier *fcm, float *cvalue, float evaltime)
+static void fcm_generator_evaluate(FCurve *UNUSED(fcu), FModifier *fcm, float *cvalue, float evaltime)
{
- FMod_Generator *data= (FMod_Generator *)fcm->data;
+ FMod_Generator *data = (FMod_Generator *)fcm->data;
/* behavior depends on mode
* NOTE: the data in its default state is fine too
@@ -207,23 +207,23 @@ static void fcm_generator_evaluate (FCurve *UNUSED(fcu), FModifier *fcm, float *
case FCM_GENERATOR_POLYNOMIAL: /* expanded polynomial expression */
{
/* we overwrite cvalue with the sum of the polynomial */
- float *powers = MEM_callocN(sizeof(float)*data->arraysize, "Poly Powers");
- float value= 0.0f;
+ float *powers = MEM_callocN(sizeof(float) * data->arraysize, "Poly Powers");
+ float value = 0.0f;
unsigned int i;
/* for each x^n, precalculate value based on previous one first... this should be
* faster that calling pow() for each entry
*/
- for (i=0; i < data->arraysize; i++) {
+ for (i = 0; i < data->arraysize; i++) {
/* first entry is x^0 = 1, otherwise, calculate based on previous */
if (i)
- powers[i]= powers[i-1] * evaltime;
+ powers[i] = powers[i - 1] * evaltime;
else
- powers[0]= 1;
+ powers[0] = 1;
}
/* for each coefficient, add to value, which we'll write to *cvalue in one go */
- for (i=0; i < data->arraysize; i++)
+ for (i = 0; i < data->arraysize; i++)
value += data->coefficients[i] * powers[i];
/* only if something changed, write *cvalue in one go */
@@ -231,33 +231,33 @@ static void fcm_generator_evaluate (FCurve *UNUSED(fcu), FModifier *fcm, float *
if (data->flag & FCM_GENERATOR_ADDITIVE)
*cvalue += value;
else
- *cvalue= value;
+ *cvalue = value;
}
/* cleanup */
if (powers)
MEM_freeN(powers);
}
- break;
+ break;
case FCM_GENERATOR_POLYNOMIAL_FACTORISED: /* Factorized polynomial */
{
- float value= 1.0f, *cp=NULL;
+ float value = 1.0f, *cp = NULL;
unsigned int i;
/* for each coefficient pair, solve for that bracket before accumulating in value by multiplying */
- for (cp=data->coefficients, i=0; (cp) && (i < (unsigned int)data->poly_order); cp+=2, i++)
- value *= (cp[0]*evaltime + cp[1]);
+ for (cp = data->coefficients, i = 0; (cp) && (i < (unsigned int)data->poly_order); cp += 2, i++)
+ value *= (cp[0] * evaltime + cp[1]);
/* only if something changed, write *cvalue in one go */
if (data->poly_order) {
if (data->flag & FCM_GENERATOR_ADDITIVE)
*cvalue += value;
else
- *cvalue= value;
+ *cvalue = value;
}
}
- break;
+ break;
}
}
@@ -279,7 +279,7 @@ static FModifierTypeInfo FMI_GENERATOR = {
/* Built-In Function Generator F-Curve Modifier --------------------------- */
/* This uses the general equation for equations:
- * y = amplitude * fn(phase_multiplier*x + phase_offset) + y_offset
+ * y = amplitude * fn(phase_multiplier*x + phase_offset) + y_offset
*
* where amplitude, phase_multiplier/offset, y_offset are user-defined coefficients,
* x is the evaluation 'time', and 'y' is the resultant value
@@ -288,20 +288,20 @@ static FModifierTypeInfo FMI_GENERATOR = {
* sin, cos, tan, sinc (normalised sin), natural log, square root
*/
-static void fcm_fn_generator_new_data (void *mdata)
+static void fcm_fn_generator_new_data(void *mdata)
{
- FMod_FunctionGenerator *data= (FMod_FunctionGenerator *)mdata;
+ FMod_FunctionGenerator *data = (FMod_FunctionGenerator *)mdata;
/* set amplitude and phase multiplier to 1.0f so that something is generated */
- data->amplitude= 1.0f;
- data->phase_multiplier= 1.0f;
+ data->amplitude = 1.0f;
+ data->phase_multiplier = 1.0f;
}
/* Unary 'normalised sine' function
- * y = sin(PI + x) / (PI * x),
+ * y = sin(PI + x) / (PI * x),
* except for x = 0 when y = 1.
*/
-static double sinc (double x)
+static double sinc(double x)
{
if (fabs(x) < 0.0001)
return 1.0;
@@ -309,26 +309,25 @@ static double sinc (double x)
return sin(M_PI * x) / (M_PI * x);
}
-static void fcm_fn_generator_evaluate (FCurve *UNUSED(fcu), FModifier *fcm, float *cvalue, float evaltime)
+static void fcm_fn_generator_evaluate(FCurve *UNUSED(fcu), FModifier *fcm, float *cvalue, float evaltime)
{
- FMod_FunctionGenerator *data= (FMod_FunctionGenerator *)fcm->data;
- double arg= data->phase_multiplier*evaltime + data->phase_offset;
+ FMod_FunctionGenerator *data = (FMod_FunctionGenerator *)fcm->data;
+ double arg = data->phase_multiplier * evaltime + data->phase_offset;
double (*fn)(double v) = NULL;
/* get function pointer to the func to use:
* WARNING: must perform special argument validation hereto guard against crashes
*/
- switch (data->type)
- {
+ switch (data->type) {
/* simple ones */
case FCM_GENERATOR_FN_SIN: /* sine wave */
- fn= sin;
+ fn = sin;
break;
case FCM_GENERATOR_FN_COS: /* cosine wave */
- fn= cos;
+ fn = cos;
break;
case FCM_GENERATOR_FN_SINC: /* normalised sine wave */
- fn= sinc;
+ fn = sinc;
break;
/* validation required */
@@ -337,36 +336,36 @@ static void fcm_fn_generator_evaluate (FCurve *UNUSED(fcu), FModifier *fcm, floa
/* check that argument is not on one of the discontinuities (i.e. 90deg, 270 deg, etc) */
if (IS_EQ(fmod((arg - M_PI_2), M_PI), 0.0)) {
if ((data->flag & FCM_GENERATOR_ADDITIVE) == 0)
- *cvalue = 0.0f; /* no value possible here */
+ *cvalue = 0.0f; /* no value possible here */
}
else
- fn= tan;
+ fn = tan;
}
- break;
+ break;
case FCM_GENERATOR_FN_LN: /* natural log */
{
/* check that value is greater than 1? */
if (arg > 1.0) {
- fn= log;
+ fn = log;
}
else {
if ((data->flag & FCM_GENERATOR_ADDITIVE) == 0)
- *cvalue = 0.0f; /* no value possible here */
+ *cvalue = 0.0f; /* no value possible here */
}
}
- break;
+ break;
case FCM_GENERATOR_FN_SQRT: /* square root */
{
/* no negative numbers */
if (arg > 0.0) {
- fn= sqrt;
+ fn = sqrt;
}
else {
if ((data->flag & FCM_GENERATOR_ADDITIVE) == 0)
- *cvalue = 0.0f; /* no value possible here */
+ *cvalue = 0.0f; /* no value possible here */
}
}
- break;
+ break;
default:
printf("Invalid Function-Generator for F-Modifier - %d\n", data->type);
@@ -374,12 +373,12 @@ static void fcm_fn_generator_evaluate (FCurve *UNUSED(fcu), FModifier *fcm, floa
/* execute function callback to set value if appropriate */
if (fn) {
- float value= (float)(data->amplitude*(float)fn(arg) + data->value_offset);
+ float value = (float)(data->amplitude * (float)fn(arg) + data->value_offset);
if (data->flag & FCM_GENERATOR_ADDITIVE)
*cvalue += value;
else
- *cvalue= value;
+ *cvalue = value;
}
}
@@ -400,37 +399,37 @@ static FModifierTypeInfo FMI_FN_GENERATOR = {
/* Envelope F-Curve Modifier --------------------------- */
-static void fcm_envelope_free (FModifier *fcm)
+static void fcm_envelope_free(FModifier *fcm)
{
- FMod_Envelope *env= (FMod_Envelope *)fcm->data;
+ FMod_Envelope *env = (FMod_Envelope *)fcm->data;
/* free envelope data array */
if (env->data)
MEM_freeN(env->data);
}
-static void fcm_envelope_copy (FModifier *fcm, FModifier *src)
+static void fcm_envelope_copy(FModifier *fcm, FModifier *src)
{
- FMod_Envelope *env= (FMod_Envelope *)fcm->data;
- FMod_Envelope *oenv= (FMod_Envelope *)src->data;
+ FMod_Envelope *env = (FMod_Envelope *)fcm->data;
+ FMod_Envelope *oenv = (FMod_Envelope *)src->data;
/* copy envelope data array */
if (oenv->data)
- env->data= MEM_dupallocN(oenv->data);
+ env->data = MEM_dupallocN(oenv->data);
}
-static void fcm_envelope_new_data (void *mdata)
+static void fcm_envelope_new_data(void *mdata)
{
- FMod_Envelope *env= (FMod_Envelope *)mdata;
+ FMod_Envelope *env = (FMod_Envelope *)mdata;
/* set default min/max ranges */
- env->min= -1.0f;
- env->max= 1.0f;
+ env->min = -1.0f;
+ env->max = 1.0f;
}
-static void fcm_envelope_verify (FModifier *fcm)
+static void fcm_envelope_verify(FModifier *fcm)
{
- FMod_Envelope *env= (FMod_Envelope *)fcm->data;
+ FMod_Envelope *env = (FMod_Envelope *)fcm->data;
/* if the are points, perform bubble-sort on them, as user may have changed the order */
if (env->data) {
@@ -438,44 +437,44 @@ static void fcm_envelope_verify (FModifier *fcm)
}
}
-static void fcm_envelope_evaluate (FCurve *UNUSED(fcu), FModifier *fcm, float *cvalue, float evaltime)
+static void fcm_envelope_evaluate(FCurve *UNUSED(fcu), FModifier *fcm, float *cvalue, float evaltime)
{
- FMod_Envelope *env= (FMod_Envelope *)fcm->data;
+ FMod_Envelope *env = (FMod_Envelope *)fcm->data;
FCM_EnvelopeData *fed, *prevfed, *lastfed;
- float min=0.0f, max=0.0f, fac=0.0f;
+ float min = 0.0f, max = 0.0f, fac = 0.0f;
int a;
/* get pointers */
if (env->data == NULL) return;
- prevfed= env->data;
- fed= prevfed + 1;
- lastfed= prevfed + (env->totvert-1);
+ prevfed = env->data;
+ fed = prevfed + 1;
+ lastfed = prevfed + (env->totvert - 1);
/* get min/max values for envelope at evaluation time (relative to mid-value) */
if (prevfed->time >= evaltime) {
/* before or on first sample, so just extend value */
- min= prevfed->min;
- max= prevfed->max;
+ min = prevfed->min;
+ max = prevfed->max;
}
else if (lastfed->time <= evaltime) {
/* after or on last sample, so just extend value */
- min= lastfed->min;
- max= lastfed->max;
+ min = lastfed->min;
+ max = lastfed->max;
}
else {
/* evaltime occurs somewhere between segments */
// TODO: implement binary search for this to make it faster?
- for (a=0; prevfed && fed && (a < env->totvert-1); a++, prevfed=fed, fed++) {
+ for (a = 0; prevfed && fed && (a < env->totvert - 1); a++, prevfed = fed, fed++) {
/* evaltime occurs within the interval defined by these two envelope points */
if ((prevfed->time <= evaltime) && (fed->time >= evaltime)) {
float afac, bfac, diff;
- diff= fed->time - prevfed->time;
- afac= (evaltime - prevfed->time) / diff;
- bfac= (fed->time - evaltime) / diff;
+ diff = fed->time - prevfed->time;
+ afac = (evaltime - prevfed->time) / diff;
+ bfac = (fed->time - evaltime) / diff;
- min= bfac*prevfed->min + afac*fed->min;
- max= bfac*prevfed->max + afac*fed->max;
+ min = bfac * prevfed->min + afac * fed->min;
+ max = bfac * prevfed->max + afac * fed->max;
break;
}
@@ -486,8 +485,8 @@ static void fcm_envelope_evaluate (FCurve *UNUSED(fcu), FModifier *fcm, float *c
* - fac is the ratio of how the current y-value corresponds to the reference range
* - thus, the new value is found by mapping the old range to the new!
*/
- fac= (*cvalue - (env->midval + env->min)) / (env->max - env->min);
- *cvalue= min + fac*(max - min);
+ fac = (*cvalue - (env->midval + env->min)) / (env->max - env->min);
+ *cvalue = min + fac * (max - min);
}
static FModifierTypeInfo FMI_ENVELOPE = {
@@ -521,23 +520,23 @@ static FModifierTypeInfo FMI_ENVELOPE = {
/* temp data used during evaluation */
typedef struct tFCMED_Cycles {
- float cycyofs; /* y-offset to apply */
+ float cycyofs; /* y-offset to apply */
} tFCMED_Cycles;
-static void fcm_cycles_new_data (void *mdata)
+static void fcm_cycles_new_data(void *mdata)
{
- FMod_Cycles *data= (FMod_Cycles *)mdata;
+ FMod_Cycles *data = (FMod_Cycles *)mdata;
/* turn on cycles by default */
- data->before_mode= data->after_mode= FCM_EXTRAPOLATE_CYCLIC;
+ data->before_mode = data->after_mode = FCM_EXTRAPOLATE_CYCLIC;
}
-static float fcm_cycles_time (FCurve *fcu, FModifier *fcm, float UNUSED(cvalue), float evaltime)
+static float fcm_cycles_time(FCurve *fcu, FModifier *fcm, float UNUSED(cvalue), float evaltime)
{
- FMod_Cycles *data= (FMod_Cycles *)fcm->data;
- float prevkey[2], lastkey[2], cycyofs=0.0f;
- short side=0, mode=0;
- int cycles=0, ofs=0;
+ FMod_Cycles *data = (FMod_Cycles *)fcm->data;
+ float prevkey[2], lastkey[2], cycyofs = 0.0f;
+ short side = 0, mode = 0;
+ int cycles = 0, ofs = 0;
/* check if modifier is first in stack, otherwise disable ourself... */
// FIXME...
@@ -548,24 +547,24 @@ static float fcm_cycles_time (FCurve *fcu, FModifier *fcm, float UNUSED(cvalue),
/* calculate new evaltime due to cyclic interpolation */
if (fcu && fcu->bezt) {
- BezTriple *prevbezt= fcu->bezt;
- BezTriple *lastbezt= prevbezt + fcu->totvert-1;
+ BezTriple *prevbezt = fcu->bezt;
+ BezTriple *lastbezt = prevbezt + fcu->totvert - 1;
- prevkey[0]= prevbezt->vec[1][0];
- prevkey[1]= prevbezt->vec[1][1];
+ prevkey[0] = prevbezt->vec[1][0];
+ prevkey[1] = prevbezt->vec[1][1];
- lastkey[0]= lastbezt->vec[1][0];
- lastkey[1]= lastbezt->vec[1][1];
+ lastkey[0] = lastbezt->vec[1][0];
+ lastkey[1] = lastbezt->vec[1][1];
}
else if (fcu && fcu->fpt) {
- FPoint *prevfpt= fcu->fpt;
- FPoint *lastfpt= prevfpt + fcu->totvert-1;
+ FPoint *prevfpt = fcu->fpt;
+ FPoint *lastfpt = prevfpt + fcu->totvert - 1;
- prevkey[0]= prevfpt->vec[0];
- prevkey[1]= prevfpt->vec[1];
+ prevkey[0] = prevfpt->vec[0];
+ prevkey[1] = prevfpt->vec[1];
- lastkey[0]= lastfpt->vec[0];
- lastkey[1]= lastfpt->vec[1];
+ lastkey[0] = lastfpt->vec[0];
+ lastkey[1] = lastfpt->vec[1];
}
else
return evaltime;
@@ -576,18 +575,18 @@ static float fcm_cycles_time (FCurve *fcu, FModifier *fcm, float UNUSED(cvalue),
*/
if (evaltime < prevkey[0]) {
if (data->before_mode) {
- side= -1;
- mode= data->before_mode;
- cycles= data->before_cycles;
- ofs= prevkey[0];
+ side = -1;
+ mode = data->before_mode;
+ cycles = data->before_cycles;
+ ofs = prevkey[0];
}
}
else if (evaltime > lastkey[0]) {
if (data->after_mode) {
- side= 1;
- mode= data->after_mode;
- cycles= data->after_cycles;
- ofs= lastkey[0];
+ side = 1;
+ mode = data->after_mode;
+ cycles = data->after_cycles;
+ ofs = lastkey[0];
}
}
if ((ELEM(0, side, mode)))
@@ -595,22 +594,22 @@ static float fcm_cycles_time (FCurve *fcu, FModifier *fcm, float UNUSED(cvalue),
/* find relative place within a cycle */
{
- float cycdx=0, cycdy=0;
- float cycle= 0, cyct=0;
+ float cycdx = 0, cycdy = 0;
+ float cycle = 0, cyct = 0;
/* calculate period and amplitude (total height) of a cycle */
- cycdx= lastkey[0] - prevkey[0];
- cycdy= lastkey[1] - prevkey[1];
+ cycdx = lastkey[0] - prevkey[0];
+ cycdy = lastkey[1] - prevkey[1];
/* check if cycle is infinitely small, to be point of being impossible to use */
if (cycdx == 0)
return evaltime;
/* calculate the 'number' of the cycle */
- cycle= ((float)side * (evaltime - ofs) / cycdx);
+ cycle = ((float)side * (evaltime - ofs) / cycdx);
/* calculate the time inside the cycle */
- cyct= fmod(evaltime - ofs, cycdx);
+ cyct = fmod(evaltime - ofs, cycdx);
/* check that cyclic is still enabled for the specified time */
if (cycles == 0) {
@@ -642,19 +641,19 @@ static float fcm_cycles_time (FCurve *fcu, FModifier *fcm, float UNUSED(cvalue),
evaltime = (side == 1 ? prevkey[0] : lastkey[0]);
}
/* calculate where in the cycle we are (overwrite evaltime to reflect this) */
- else if ((mode == FCM_EXTRAPOLATE_MIRROR) && ((int)(cycle+1) % 2)) {
+ else if ((mode == FCM_EXTRAPOLATE_MIRROR) && ((int)(cycle + 1) % 2)) {
/* when 'mirror' option is used and cycle number is odd, this cycle is played in reverse
* - for 'before' extrapolation, we need to flip in a different way, otherwise values past
* then end of the curve get referenced (result of fmod will be negative, and with different phase)
*/
if (side < 0)
- evaltime= prevkey[0] - cyct;
+ evaltime = prevkey[0] - cyct;
else
- evaltime= lastkey[0] - cyct;
+ evaltime = lastkey[0] - cyct;
}
else {
/* the cycle is played normally... */
- evaltime= prevkey[0] + cyct;
+ evaltime = prevkey[0] + cyct;
}
if (evaltime < prevkey[0]) evaltime += cycdx;
}
@@ -664,17 +663,17 @@ static float fcm_cycles_time (FCurve *fcu, FModifier *fcm, float UNUSED(cvalue),
tFCMED_Cycles *edata;
/* for now, this is just a float, but we could get more stuff... */
- fcm->edata= edata= MEM_callocN(sizeof(tFCMED_Cycles), "tFCMED_Cycles");
- edata->cycyofs= cycyofs;
+ fcm->edata = edata = MEM_callocN(sizeof(tFCMED_Cycles), "tFCMED_Cycles");
+ edata->cycyofs = cycyofs;
}
/* return the new frame to evaluate */
return evaltime;
}
-static void fcm_cycles_evaluate (FCurve *UNUSED(fcu), FModifier *fcm, float *cvalue, float UNUSED(evaltime))
+static void fcm_cycles_evaluate(FCurve *UNUSED(fcu), FModifier *fcm, float *cvalue, float UNUSED(evaltime))
{
- tFCMED_Cycles *edata= (tFCMED_Cycles *)fcm->edata;
+ tFCMED_Cycles *edata = (tFCMED_Cycles *)fcm->edata;
/* use temp data */
if (edata) {
@@ -683,7 +682,7 @@ static void fcm_cycles_evaluate (FCurve *UNUSED(fcu), FModifier *fcm, float *cva
/* free temp data */
MEM_freeN(edata);
- fcm->edata= NULL;
+ fcm->edata = NULL;
}
}
@@ -704,21 +703,21 @@ static FModifierTypeInfo FMI_CYCLES = {
/* Noise F-Curve Modifier --------------------------- */
-static void fcm_noise_new_data (void *mdata)
+static void fcm_noise_new_data(void *mdata)
{
- FMod_Noise *data= (FMod_Noise *)mdata;
+ FMod_Noise *data = (FMod_Noise *)mdata;
/* defaults */
- data->size= 1.0f;
- data->strength= 1.0f;
- data->phase= 1.0f;
+ data->size = 1.0f;
+ data->strength = 1.0f;
+ data->phase = 1.0f;
data->depth = 0;
data->modification = FCM_NOISE_MODIF_REPLACE;
}
-static void fcm_noise_evaluate (FCurve *UNUSED(fcu), FModifier *fcm, float *cvalue, float evaltime)
+static void fcm_noise_evaluate(FCurve *UNUSED(fcu), FModifier *fcm, float *cvalue, float evaltime)
{
- FMod_Noise *data= (FMod_Noise *)fcm->data;
+ FMod_Noise *data = (FMod_Noise *)fcm->data;
float noise;
/* generate noise using good ol' Blender Noise
@@ -730,17 +729,17 @@ static void fcm_noise_evaluate (FCurve *UNUSED(fcu), FModifier *fcm, float *cval
/* combine the noise with existing motion data */
switch (data->modification) {
case FCM_NOISE_MODIF_ADD:
- *cvalue= *cvalue + noise * data->strength;
+ *cvalue = *cvalue + noise * data->strength;
break;
case FCM_NOISE_MODIF_SUBTRACT:
- *cvalue= *cvalue - noise * data->strength;
+ *cvalue = *cvalue - noise * data->strength;
break;
case FCM_NOISE_MODIF_MULTIPLY:
- *cvalue= *cvalue * noise * data->strength;
+ *cvalue = *cvalue * noise * data->strength;
break;
case FCM_NOISE_MODIF_REPLACE:
default:
- *cvalue= *cvalue + (noise - 0.5f) * data->strength;
+ *cvalue = *cvalue + (noise - 0.5f) * data->strength;
break;
}
}
@@ -782,25 +781,25 @@ static FModifierTypeInfo FMI_FILTER = {
/* Python F-Curve Modifier --------------------------- */
-static void fcm_python_free (FModifier *fcm)
+static void fcm_python_free(FModifier *fcm)
{
- FMod_Python *data= (FMod_Python *)fcm->data;
+ FMod_Python *data = (FMod_Python *)fcm->data;
/* id-properties */
IDP_FreeProperty(data->prop);
MEM_freeN(data->prop);
}
-static void fcm_python_new_data (void *mdata)
+static void fcm_python_new_data(void *mdata)
{
- FMod_Python *data= (FMod_Python *)mdata;
+ FMod_Python *data = (FMod_Python *)mdata;
/* everything should be set correctly by calloc, except for the prop->type constant.*/
data->prop = MEM_callocN(sizeof(IDProperty), "PyFModifierProps");
data->prop->type = IDP_GROUP;
}
-static void fcm_python_copy (FModifier *fcm, FModifier *src)
+static void fcm_python_copy(FModifier *fcm, FModifier *src)
{
FMod_Python *pymod = (FMod_Python *)fcm->data;
FMod_Python *opymod = (FMod_Python *)src->data;
@@ -808,7 +807,7 @@ static void fcm_python_copy (FModifier *fcm, FModifier *src)
pymod->prop = IDP_CopyProperty(opymod->prop);
}
-static void fcm_python_evaluate (FCurve *UNUSED(fcu), FModifier *UNUSED(fcm), float *UNUSED(cvalue), float UNUSED(evaltime))
+static void fcm_python_evaluate(FCurve *UNUSED(fcu), FModifier *UNUSED(fcm), float *UNUSED(cvalue), float UNUSED(evaltime))
{
#ifdef WITH_PYTHON
//FMod_Python *data= (FMod_Python *)fcm->data;
@@ -837,9 +836,9 @@ static FModifierTypeInfo FMI_PYTHON = {
/* Limits F-Curve Modifier --------------------------- */
-static float fcm_limits_time (FCurve *UNUSED(fcu), FModifier *fcm, float UNUSED(cvalue), float evaltime)
+static float fcm_limits_time(FCurve *UNUSED(fcu), FModifier *fcm, float UNUSED(cvalue), float evaltime)
{
- FMod_Limits *data= (FMod_Limits *)fcm->data;
+ FMod_Limits *data = (FMod_Limits *)fcm->data;
/* check for the time limits */
if ((data->flag & FCM_LIMIT_XMIN) && (evaltime < data->rect.xmin))
@@ -851,15 +850,15 @@ static float fcm_limits_time (FCurve *UNUSED(fcu), FModifier *fcm, float UNUSED(
return evaltime;
}
-static void fcm_limits_evaluate (FCurve *UNUSED(fcu), FModifier *fcm, float *cvalue, float UNUSED(evaltime))
+static void fcm_limits_evaluate(FCurve *UNUSED(fcu), FModifier *fcm, float *cvalue, float UNUSED(evaltime))
{
- FMod_Limits *data= (FMod_Limits *)fcm->data;
+ FMod_Limits *data = (FMod_Limits *)fcm->data;
/* value limits now */
if ((data->flag & FCM_LIMIT_YMIN) && (*cvalue < data->rect.ymin))
- *cvalue= data->rect.ymin;
+ *cvalue = data->rect.ymin;
if ((data->flag & FCM_LIMIT_YMAX) && (*cvalue > data->rect.ymax))
- *cvalue= data->rect.ymax;
+ *cvalue = data->rect.ymax;
}
static FModifierTypeInfo FMI_LIMITS = {
@@ -879,18 +878,18 @@ static FModifierTypeInfo FMI_LIMITS = {
/* Stepped F-Curve Modifier --------------------------- */
-static void fcm_stepped_new_data (void *mdata)
+static void fcm_stepped_new_data(void *mdata)
{
- FMod_Stepped *data= (FMod_Stepped *)mdata;
+ FMod_Stepped *data = (FMod_Stepped *)mdata;
/* just need to set the step-size to 2-frames by default */
// XXX: or would 5 be more normal?
data->step_size = 2.0f;
}
-static float fcm_stepped_time (FCurve *UNUSED(fcu), FModifier *fcm, float UNUSED(cvalue), float evaltime)
+static float fcm_stepped_time(FCurve *UNUSED(fcu), FModifier *fcm, float UNUSED(cvalue), float evaltime)
{
- FMod_Stepped *data= (FMod_Stepped *)fcm->data;
+ FMod_Stepped *data = (FMod_Stepped *)fcm->data;
int snapblock;
/* check range clamping to see if we should alter the timing to achieve the desired results */
@@ -937,27 +936,27 @@ static FModifierTypeInfo FMI_STEPPED = {
/* These globals only ever get directly accessed in this file */
static FModifierTypeInfo *fmodifiersTypeInfo[FMODIFIER_NUM_TYPES];
-static short FMI_INIT= 1; /* when non-zero, the list needs to be updated */
+static short FMI_INIT = 1; /* when non-zero, the list needs to be updated */
/* This function only gets called when FMI_INIT is non-zero */
-static void fmods_init_typeinfo (void)
+static void fmods_init_typeinfo(void)
{
- fmodifiersTypeInfo[0]= NULL; /* 'Null' F-Curve Modifier */
- fmodifiersTypeInfo[1]= &FMI_GENERATOR; /* Generator F-Curve Modifier */
- fmodifiersTypeInfo[2]= &FMI_FN_GENERATOR; /* Built-In Function Generator F-Curve Modifier */
- 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[7]= &FMI_PYTHON; /* Custom Python F-Curve Modifier */
- fmodifiersTypeInfo[8]= &FMI_LIMITS; /* Limits F-Curve Modifier */
- fmodifiersTypeInfo[9]= &FMI_STEPPED; /* Stepped F-Curve Modifier */
+ fmodifiersTypeInfo[0] = NULL; /* 'Null' F-Curve Modifier */
+ fmodifiersTypeInfo[1] = &FMI_GENERATOR; /* Generator F-Curve Modifier */
+ fmodifiersTypeInfo[2] = &FMI_FN_GENERATOR; /* Built-In Function Generator F-Curve Modifier */
+ 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[7] = &FMI_PYTHON; /* Custom Python F-Curve Modifier */
+ fmodifiersTypeInfo[8] = &FMI_LIMITS; /* Limits F-Curve Modifier */
+ fmodifiersTypeInfo[9] = &FMI_STEPPED; /* Stepped F-Curve Modifier */
}
/* This function should be used for getting the appropriate type-info when only
* a F-Curve modifier type is known
*/
-FModifierTypeInfo *get_fmodifier_typeinfo (int type)
+FModifierTypeInfo *get_fmodifier_typeinfo(int type)
{
/* initialize the type-info list? */
if (FMI_INIT) {
@@ -967,7 +966,7 @@ FModifierTypeInfo *get_fmodifier_typeinfo (int type)
/* only return for valid types */
if ( (type >= FMODIFIER_TYPE_NULL) &&
- (type <= FMODIFIER_NUM_TYPES ) )
+ (type <= FMODIFIER_NUM_TYPES) )
{
/* there shouldn't be any segfaults here... */
return fmodifiersTypeInfo[type];
@@ -982,7 +981,7 @@ FModifierTypeInfo *get_fmodifier_typeinfo (int type)
/* This function should always be used to get the appropriate type-info, as it
* has checks which prevent segfaults in some weird cases.
*/
-FModifierTypeInfo *fmodifier_get_typeinfo (FModifier *fcm)
+FModifierTypeInfo *fmodifier_get_typeinfo(FModifier *fcm)
{
/* only return typeinfo for valid modifiers */
if (fcm)
@@ -994,9 +993,9 @@ FModifierTypeInfo *fmodifier_get_typeinfo (FModifier *fcm)
/* API --------------------------- */
/* Add a new F-Curve Modifier to the given F-Curve of a certain type */
-FModifier *add_fmodifier (ListBase *modifiers, int type)
+FModifier *add_fmodifier(ListBase *modifiers, int type)
{
- FModifierTypeInfo *fmi= get_fmodifier_typeinfo(type);
+ FModifierTypeInfo *fmi = get_fmodifier_typeinfo(type);
FModifier *fcm;
/* sanity checks */
@@ -1012,7 +1011,7 @@ FModifier *add_fmodifier (ListBase *modifiers, int type)
}
/* add modifier itself */
- fcm= MEM_callocN(sizeof(FModifier), "F-Curve Modifier");
+ fcm = MEM_callocN(sizeof(FModifier), "F-Curve Modifier");
fcm->type = type;
fcm->flag = FMODIFIER_FLAG_EXPANDED;
fcm->influence = 1.0f;
@@ -1023,7 +1022,7 @@ FModifier *add_fmodifier (ListBase *modifiers, int type)
fcm->flag |= FMODIFIER_FLAG_ACTIVE;
/* add modifier's data */
- fcm->data= MEM_callocN(fmi->size, fmi->structName);
+ fcm->data = MEM_callocN(fmi->size, fmi->structName);
/* init custom settings if necessary */
if (fmi->new_data)
@@ -1034,9 +1033,9 @@ FModifier *add_fmodifier (ListBase *modifiers, int type)
}
/* Make a copy of the specified F-Modifier */
-FModifier *copy_fmodifier (FModifier *src)
+FModifier *copy_fmodifier(FModifier *src)
{
- FModifierTypeInfo *fmi= fmodifier_get_typeinfo(src);
+ FModifierTypeInfo *fmi = fmodifier_get_typeinfo(src);
FModifier *dst;
/* sanity check */
@@ -1059,18 +1058,18 @@ FModifier *copy_fmodifier (FModifier *src)
}
/* Duplicate all of the F-Modifiers in the Modifier stacks */
-void copy_fmodifiers (ListBase *dst, ListBase *src)
+void copy_fmodifiers(ListBase *dst, ListBase *src)
{
FModifier *fcm, *srcfcm;
if (ELEM(NULL, dst, src))
return;
- dst->first= dst->last= NULL;
+ dst->first = dst->last = NULL;
BLI_duplicatelist(dst, src);
- for (fcm=dst->first, srcfcm=src->first; fcm && srcfcm; srcfcm=srcfcm->next, fcm=fcm->next) {
- FModifierTypeInfo *fmi= fmodifier_get_typeinfo(fcm);
+ for (fcm = dst->first, srcfcm = src->first; fcm && srcfcm; srcfcm = srcfcm->next, fcm = fcm->next) {
+ FModifierTypeInfo *fmi = fmodifier_get_typeinfo(fcm);
/* make a new copy of the F-Modifier's data */
fcm->data = MEM_dupallocN(fcm->data);
@@ -1082,9 +1081,9 @@ void copy_fmodifiers (ListBase *dst, ListBase *src)
}
/* Remove and free the given F-Modifier from the given stack */
-int remove_fmodifier (ListBase *modifiers, FModifier *fcm)
+int remove_fmodifier(ListBase *modifiers, FModifier *fcm)
{
- FModifierTypeInfo *fmi= fmodifier_get_typeinfo(fcm);
+ FModifierTypeInfo *fmi = fmodifier_get_typeinfo(fcm);
/* sanity check */
if (fcm == NULL)
@@ -1113,7 +1112,7 @@ int remove_fmodifier (ListBase *modifiers, FModifier *fcm)
}
/* Remove all of a given F-Curve's modifiers */
-void free_fmodifiers (ListBase *modifiers)
+void free_fmodifiers(ListBase *modifiers)
{
FModifier *fcm, *fmn;
@@ -1122,14 +1121,14 @@ void free_fmodifiers (ListBase *modifiers)
return;
/* free each modifier in order - modifier is unlinked from list and freed */
- for (fcm= modifiers->first; fcm; fcm= fmn) {
- fmn= fcm->next;
+ for (fcm = modifiers->first; fcm; fcm = fmn) {
+ fmn = fcm->next;
remove_fmodifier(modifiers, fcm);
}
}
/* Find the active F-Modifier */
-FModifier *find_active_fmodifier (ListBase *modifiers)
+FModifier *find_active_fmodifier(ListBase *modifiers)
{
FModifier *fcm;
@@ -1138,7 +1137,7 @@ FModifier *find_active_fmodifier (ListBase *modifiers)
return NULL;
/* loop over modifiers until 'active' one is found */
- for (fcm= modifiers->first; fcm; fcm= fcm->next) {
+ for (fcm = modifiers->first; fcm; fcm = fcm->next) {
if (fcm->flag & FMODIFIER_FLAG_ACTIVE)
return fcm;
}
@@ -1148,7 +1147,7 @@ FModifier *find_active_fmodifier (ListBase *modifiers)
}
/* Set the active F-Modifier */
-void set_active_fmodifier (ListBase *modifiers, FModifier *fcm)
+void set_active_fmodifier(ListBase *modifiers, FModifier *fcm)
{
FModifier *fm;
@@ -1157,7 +1156,7 @@ void set_active_fmodifier (ListBase *modifiers, FModifier *fcm)
return;
/* deactivate all, and set current one active */
- for (fm= modifiers->first; fm; fm= fm->next)
+ for (fm = modifiers->first; fm; fm = fm->next)
fm->flag &= ~FMODIFIER_FLAG_ACTIVE;
/* make given modifier active */
@@ -1169,7 +1168,7 @@ void set_active_fmodifier (ListBase *modifiers, FModifier *fcm)
* - mtype - type of modifier (if 0, doesn't matter)
* - acttype - type of action to perform (if -1, doesn't matter)
*/
-short list_has_suitable_fmodifier (ListBase *modifiers, int mtype, short acttype)
+short list_has_suitable_fmodifier(ListBase *modifiers, int mtype, short acttype)
{
FModifier *fcm;
@@ -1182,15 +1181,15 @@ short list_has_suitable_fmodifier (ListBase *modifiers, int mtype, short acttype
return 0;
/* find the first mdifier fitting these criteria */
- for (fcm= modifiers->first; fcm; fcm= fcm->next) {
- FModifierTypeInfo *fmi= fmodifier_get_typeinfo(fcm);
- short mOk=1, aOk=1; /* by default 1, so that when only one test, won't fail */
+ for (fcm = modifiers->first; fcm; fcm = fcm->next) {
+ FModifierTypeInfo *fmi = fmodifier_get_typeinfo(fcm);
+ short mOk = 1, aOk = 1; /* by default 1, so that when only one test, won't fail */
/* check if applicable ones are fullfilled */
if (mtype)
- mOk= (fcm->type == mtype);
+ mOk = (fcm->type == mtype);
if (acttype > -1)
- aOk= (fmi->acttype == acttype);
+ aOk = (fmi->acttype == acttype);
/* if both are ok, we've found a hit */
if (mOk && aOk)
@@ -1204,7 +1203,7 @@ short list_has_suitable_fmodifier (ListBase *modifiers, int mtype, short acttype
/* Evaluation API --------------------------- */
/* helper function - calculate influence of FModifier */
-static float eval_fmodifier_influence (FModifier *fcm, float evaltime)
+static float eval_fmodifier_influence(FModifier *fcm, float evaltime)
{
float influence;
@@ -1253,7 +1252,7 @@ static float eval_fmodifier_influence (FModifier *fcm, float evaltime)
* so nevaltime gets set to whatever the last time-modifying modifier likes...
* - we start from the end of the stack, as only the last one matters for now
*/
-float evaluate_time_fmodifiers (ListBase *modifiers, FCurve *fcu, float cvalue, float evaltime)
+float evaluate_time_fmodifiers(ListBase *modifiers, FCurve *fcu, float cvalue, float evaltime)
{
FModifier *fcm;
@@ -1271,8 +1270,8 @@ float evaluate_time_fmodifiers (ListBase *modifiers, FCurve *fcu, float cvalue,
* effect, which should get us the desired effects when using layered time manipulations
* (such as multiple 'stepped' modifiers in sequence, causing different stepping rates)
*/
- for (fcm= modifiers->last; fcm; fcm= fcm->prev) {
- FModifierTypeInfo *fmi= fmodifier_get_typeinfo(fcm);
+ for (fcm = modifiers->last; fcm; fcm = fcm->prev) {
+ FModifierTypeInfo *fmi = fmodifier_get_typeinfo(fcm);
if (fmi == NULL)
continue;
@@ -1280,12 +1279,12 @@ float evaluate_time_fmodifiers (ListBase *modifiers, FCurve *fcu, float cvalue,
/* if modifier cannot be applied on this frame (whatever scale it is on, it won't affect the results)
* hence we shouldn't bother seeing what it would do given the chance
*/
- if ((fcm->flag & FMODIFIER_FLAG_RANGERESTRICT)==0 ||
- ((fcm->sfra <= evaltime) && (fcm->efra >= evaltime)) )
+ if ((fcm->flag & FMODIFIER_FLAG_RANGERESTRICT) == 0 ||
+ ((fcm->sfra <= evaltime) && (fcm->efra >= evaltime)) )
{
/* only evaluate if there's a callback for this */
if (fmi->evaluate_modifier_time) {
- if ((fcm->flag & (FMODIFIER_FLAG_DISABLED|FMODIFIER_FLAG_MUTED)) == 0) {
+ if ((fcm->flag & (FMODIFIER_FLAG_DISABLED | FMODIFIER_FLAG_MUTED)) == 0) {
float influence = eval_fmodifier_influence(fcm, evaltime);
float nval = fmi->evaluate_modifier_time(fcu, fcm, cvalue, evaltime);
@@ -1302,7 +1301,7 @@ float evaluate_time_fmodifiers (ListBase *modifiers, FCurve *fcu, float cvalue,
/* Evalautes the given set of F-Curve Modifiers using the given data
* Should only be called after evaluate_time_fmodifiers() has been called...
*/
-void evaluate_value_fmodifiers (ListBase *modifiers, FCurve *fcu, float *cvalue, float evaltime)
+void evaluate_value_fmodifiers(ListBase *modifiers, FCurve *fcu, float *cvalue, float evaltime)
{
FModifier *fcm;
@@ -1311,18 +1310,18 @@ void evaluate_value_fmodifiers (ListBase *modifiers, FCurve *fcu, float *cvalue,
return;
/* evaluate modifiers */
- for (fcm= modifiers->first; fcm; fcm= fcm->next) {
- FModifierTypeInfo *fmi= fmodifier_get_typeinfo(fcm);
+ for (fcm = modifiers->first; fcm; fcm = fcm->next) {
+ FModifierTypeInfo *fmi = fmodifier_get_typeinfo(fcm);
if (fmi == NULL)
continue;
/* only evaluate if there's a callback for this, and if F-Modifier can be evaluated on this frame */
- if ((fcm->flag & FMODIFIER_FLAG_RANGERESTRICT)==0 ||
- ((fcm->sfra <= evaltime) && (fcm->efra >= evaltime)) )
+ if ((fcm->flag & FMODIFIER_FLAG_RANGERESTRICT) == 0 ||
+ ((fcm->sfra <= evaltime) && (fcm->efra >= evaltime)) )
{
if (fmi->evaluate_modifier) {
- if ((fcm->flag & (FMODIFIER_FLAG_DISABLED|FMODIFIER_FLAG_MUTED)) == 0) {
+ if ((fcm->flag & (FMODIFIER_FLAG_DISABLED | FMODIFIER_FLAG_MUTED)) == 0) {
float influence = eval_fmodifier_influence(fcm, evaltime);
float nval = *cvalue;
@@ -1339,7 +1338,7 @@ void evaluate_value_fmodifiers (ListBase *modifiers, FCurve *fcu, float *cvalue,
/* Bake modifiers for given F-Curve to curve sample data, in the frame range defined
* by start and end (inclusive).
*/
-void fcurve_bake_modifiers (FCurve *fcu, int start, int end)
+void fcurve_bake_modifiers(FCurve *fcu, int start, int end)
{
ChannelDriver *driver;
@@ -1351,8 +1350,8 @@ void fcurve_bake_modifiers (FCurve *fcu, int start, int end)
}
/* temporarily, disable driver while we sample, so that they don't influence the outcome */
- driver= fcu->driver;
- fcu->driver= NULL;
+ driver = fcu->driver;
+ fcu->driver = NULL;
/* bake the modifiers, by sampling the curve at each frame */
fcurve_store_samples(fcu, NULL, start, end, fcurve_samplingcb_evalcurve);
@@ -1361,5 +1360,5 @@ void fcurve_bake_modifiers (FCurve *fcu, int start, int end)
free_fmodifiers(&fcu->modifiers);
/* restore driver */
- fcu->driver= driver;
+ fcu->driver = driver;
}
diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c
index b2759f18e9b..fda078f5c42 100644
--- a/source/blender/blenkernel/intern/font.c
+++ b/source/blender/blenkernel/intern/font.c
@@ -60,16 +60,15 @@
#include "BKE_curve.h"
#include "BKE_displist.h"
-static ListBase ttfdata= {NULL, NULL};
+static ListBase ttfdata = {NULL, NULL};
/* The vfont code */
-void free_vfont(struct VFont *vf)
+void BKE_vfont_free(struct VFont *vf)
{
if (vf == NULL) return;
if (vf->data) {
- while (vf->data->characters.first)
- {
+ while (vf->data->characters.first) {
VChar *che = vf->data->characters.first;
while (che->nurbsbase.first) {
@@ -91,13 +90,13 @@ void free_vfont(struct VFont *vf)
}
}
-static void *builtin_font_data= NULL;
-static int builtin_font_size= 0;
+static void *builtin_font_data = NULL;
+static int builtin_font_size = 0;
-void BKE_font_register_builtin(void *mem, int size)
+void BKE_vfont_builtin_register(void *mem, int size)
{
- builtin_font_data= mem;
- builtin_font_size= size;
+ builtin_font_data = mem;
+ builtin_font_size = size;
}
static PackedFile *get_builtin_packedfile(void)
@@ -108,7 +107,7 @@ static PackedFile *get_builtin_packedfile(void)
return NULL;
}
else {
- void *mem= MEM_mallocN(builtin_font_size, "vfd_builtin");
+ void *mem = MEM_mallocN(builtin_font_size, "vfd_builtin");
memcpy(mem, builtin_font_data, builtin_font_size);
@@ -116,28 +115,27 @@ static PackedFile *get_builtin_packedfile(void)
}
}
-void free_ttfont(void)
+void BKE_vfont_free_global_ttf(void)
{
struct TmpFont *tf;
- for (tf= ttfdata.first; tf; tf= tf->next) {
- if (tf->pf) freePackedFile(tf->pf); /* NULL when the font file can't be found on disk */
- tf->pf= NULL;
- tf->vfont= NULL;
+ for (tf = ttfdata.first; tf; tf = tf->next) {
+ if (tf->pf) freePackedFile(tf->pf); /* NULL when the font file can't be found on disk */
+ tf->pf = NULL;
+ tf->vfont = NULL;
}
BLI_freelistN(&ttfdata);
}
-struct TmpFont *vfont_find_tmpfont(VFont *vfont)
+struct TmpFont *BKE_vfont_find_tmpfont(VFont *vfont)
{
struct TmpFont *tmpfnt = NULL;
- if (vfont==NULL) return NULL;
+ if (vfont == NULL) return NULL;
// Try finding the font from font list
tmpfnt = ttfdata.first;
- while (tmpfnt)
- {
+ while (tmpfnt) {
if (tmpfnt->vfont == vfont)
break;
tmpfnt = tmpfnt->next;
@@ -150,46 +148,46 @@ static VFontData *vfont_get_data(Main *bmain, VFont *vfont)
struct TmpFont *tmpfnt = NULL;
PackedFile *tpf;
- if (vfont==NULL) return NULL;
+ if (vfont == NULL) return NULL;
// Try finding the font from font list
- tmpfnt = vfont_find_tmpfont(vfont);
+ tmpfnt = BKE_vfont_find_tmpfont(vfont);
// And then set the data
if (!vfont->data) {
PackedFile *pf;
- if (strcmp(vfont->name, FO_BUILTIN_NAME)==0) {
- pf= get_builtin_packedfile();
+ if (strcmp(vfont->name, FO_BUILTIN_NAME) == 0) {
+ pf = get_builtin_packedfile();
}
else {
if (vfont->packedfile) {
- pf= vfont->packedfile;
+ pf = vfont->packedfile;
// We need to copy a tmp font to memory unless it is already there
if (!tmpfnt) {
- tpf= MEM_callocN(sizeof(*tpf), "PackedFile");
- tpf->data= MEM_mallocN(pf->size, "packFile");
- tpf->size= pf->size;
+ tpf = MEM_callocN(sizeof(*tpf), "PackedFile");
+ tpf->data = MEM_mallocN(pf->size, "packFile");
+ tpf->size = pf->size;
memcpy(tpf->data, pf->data, pf->size);
// Add temporary packed file to globals
- tmpfnt= (struct TmpFont *) MEM_callocN(sizeof(struct TmpFont), "temp_font");
- tmpfnt->pf= tpf;
- tmpfnt->vfont= vfont;
+ tmpfnt = (struct TmpFont *) MEM_callocN(sizeof(struct TmpFont), "temp_font");
+ tmpfnt->pf = tpf;
+ tmpfnt->vfont = vfont;
BLI_addtail(&ttfdata, tmpfnt);
}
}
else {
- pf= newPackedFile(NULL, vfont->name, ID_BLEND_PATH(bmain, &vfont->id));
+ pf = newPackedFile(NULL, vfont->name, ID_BLEND_PATH(bmain, &vfont->id));
if (!tmpfnt) {
- tpf= newPackedFile(NULL, vfont->name, ID_BLEND_PATH(bmain, &vfont->id));
+ tpf = newPackedFile(NULL, vfont->name, ID_BLEND_PATH(bmain, &vfont->id));
// Add temporary packed file to globals
- tmpfnt= (struct TmpFont *) MEM_callocN(sizeof(struct TmpFont), "temp_font");
- tmpfnt->pf= tpf;
- tmpfnt->vfont= vfont;
+ tmpfnt = (struct TmpFont *) MEM_callocN(sizeof(struct TmpFont), "temp_font");
+ tmpfnt->pf = tpf;
+ tmpfnt->vfont = vfont;
BLI_addtail(&ttfdata, tmpfnt);
}
}
@@ -197,12 +195,12 @@ static VFontData *vfont_get_data(Main *bmain, VFont *vfont)
printf("Font file doesn't exist: %s\n", vfont->name);
strcpy(vfont->name, FO_BUILTIN_NAME);
- pf= get_builtin_packedfile();
+ pf = get_builtin_packedfile();
}
}
if (pf) {
- vfont->data= BLI_vfontdata_from_freetypefont(pf);
+ vfont->data = BLI_vfontdata_from_freetypefont(pf);
if (pf != vfont->packedfile) {
freePackedFile(pf);
}
@@ -212,20 +210,20 @@ static VFontData *vfont_get_data(Main *bmain, VFont *vfont)
return vfont->data;
}
-VFont *load_vfont(Main *bmain, const char *name)
+VFont *BKE_vfont_load(Main *bmain, const char *name)
{
char filename[FILE_MAXFILE];
- VFont *vfont= NULL;
+ VFont *vfont = NULL;
PackedFile *pf;
PackedFile *tpf = NULL;
int is_builtin;
struct TmpFont *tmpfnt;
- if (strcmp(name, FO_BUILTIN_NAME)==0) {
+ if (strcmp(name, FO_BUILTIN_NAME) == 0) {
BLI_strncpy(filename, name, sizeof(filename));
- pf= get_builtin_packedfile();
- is_builtin= 1;
+ pf = get_builtin_packedfile();
+ is_builtin = 1;
}
else {
char dir[FILE_MAXDIR];
@@ -233,23 +231,23 @@ VFont *load_vfont(Main *bmain, const char *name)
BLI_strncpy(dir, name, sizeof(dir));
BLI_splitdirstring(dir, filename);
- pf= newPackedFile(NULL, name, bmain->name);
- tpf= newPackedFile(NULL, name, bmain->name);
+ pf = newPackedFile(NULL, name, bmain->name);
+ tpf = newPackedFile(NULL, name, bmain->name);
- is_builtin= 0;
+ is_builtin = 0;
}
if (pf) {
VFontData *vfd;
- vfd= BLI_vfontdata_from_freetypefont(pf);
+ vfd = BLI_vfontdata_from_freetypefont(pf);
if (vfd) {
- vfont = alloc_libblock(&bmain->vfont, ID_VF, filename);
+ vfont = BKE_libblock_alloc(&bmain->vfont, ID_VF, filename);
vfont->data = vfd;
/* if there's a font name, use it for the ID name */
if (vfd->name[0] != '\0') {
- BLI_strncpy(vfont->id.name+2, vfd->name, sizeof(vfont->id.name)-2);
+ BLI_strncpy(vfont->id.name + 2, vfd->name, sizeof(vfont->id.name) - 2);
}
BLI_strncpy(vfont->name, name, sizeof(vfont->name));
@@ -260,9 +258,9 @@ VFont *load_vfont(Main *bmain, const char *name)
// Do not add FO_BUILTIN_NAME to temporary listbase
if (strcmp(filename, FO_BUILTIN_NAME)) {
- tmpfnt= (struct TmpFont *) MEM_callocN(sizeof(struct TmpFont), "temp_font");
- tmpfnt->pf= tpf;
- tmpfnt->vfont= vfont;
+ tmpfnt = (struct TmpFont *) MEM_callocN(sizeof(struct TmpFont), "temp_font");
+ tmpfnt->pf = tpf;
+ tmpfnt->vfont = vfont;
BLI_addtail(&ttfdata, tmpfnt);
}
}
@@ -280,32 +278,32 @@ VFont *load_vfont(Main *bmain, const char *name)
static VFont *which_vfont(Curve *cu, CharInfo *info)
{
- switch(info->flag & (CU_CHINFO_BOLD|CU_CHINFO_ITALIC)) {
+ switch (info->flag & (CU_CHINFO_BOLD | CU_CHINFO_ITALIC)) {
case CU_CHINFO_BOLD:
if (cu->vfontb) return(cu->vfontb); else return(cu->vfont);
case CU_CHINFO_ITALIC:
if (cu->vfonti) return(cu->vfonti); else return(cu->vfont);
- case (CU_CHINFO_BOLD|CU_CHINFO_ITALIC):
+ case (CU_CHINFO_BOLD | CU_CHINFO_ITALIC):
if (cu->vfontbi) return(cu->vfontbi); else return(cu->vfont);
default:
return(cu->vfont);
}
}
-VFont *get_builtin_font(void)
+VFont *BKE_vfont_builtin_get(void)
{
VFont *vf;
- for (vf= G.main->vfont.first; vf; vf= vf->id.next)
- if (strcmp(vf->name, FO_BUILTIN_NAME)==0)
+ for (vf = G.main->vfont.first; vf; vf = vf->id.next)
+ if (strcmp(vf->name, FO_BUILTIN_NAME) == 0)
return vf;
- return load_vfont(G.main, FO_BUILTIN_NAME);
+ return BKE_vfont_load(G.main, FO_BUILTIN_NAME);
}
static VChar *find_vfont_char(VFontData *vfd, intptr_t character)
{
- VChar *che= NULL;
+ VChar *che = NULL;
for (che = vfd->characters.first; che; che = che->next) {
if (che->index == character)
@@ -319,21 +317,21 @@ static void build_underline(Curve *cu, float x1, float y1, float x2, float y2, i
Nurb *nu2;
BPoint *bp;
- nu2 =(Nurb*) MEM_callocN(sizeof(Nurb),"underline_nurb");
+ nu2 = (Nurb *) MEM_callocN(sizeof(Nurb), "underline_nurb");
if (nu2 == NULL) return;
- nu2->resolu= cu->resolu;
+ nu2->resolu = cu->resolu;
nu2->bezt = NULL;
nu2->knotsu = nu2->knotsv = NULL;
- nu2->flag= CU_2D;
- nu2->charidx = charidx+1000;
- if (mat_nr > 0) nu2->mat_nr= mat_nr-1;
+ nu2->flag = CU_2D;
+ nu2->charidx = charidx + 1000;
+ if (mat_nr > 0) nu2->mat_nr = mat_nr - 1;
nu2->pntsu = 4;
nu2->pntsv = 1;
nu2->orderu = 4;
nu2->orderv = 1;
nu2->flagu = CU_NURB_CYCLIC;
- bp = (BPoint*)MEM_callocN(4 * sizeof(BPoint),"underline_bp");
+ bp = (BPoint *)MEM_callocN(4 * sizeof(BPoint), "underline_bp");
if (bp == NULL) {
MEM_freeN(nu2);
return;
@@ -370,56 +368,55 @@ static void buildchar(Main *bmain, Curve *cu, unsigned long character, CharInfo
VChar *che = NULL;
int i;
- vfd= vfont_get_data(bmain, which_vfont(cu, info));
+ vfd = vfont_get_data(bmain, which_vfont(cu, info));
if (!vfd) return;
#if 0
if (cu->selend < cu->selstart) {
- if ((charidx >= (cu->selend)) && (charidx <= (cu->selstart-2)))
- sel= 1;
+ if ((charidx >= (cu->selend)) && (charidx <= (cu->selstart - 2)))
+ sel = 1;
}
else {
- if ((charidx >= (cu->selstart-1)) && (charidx <= (cu->selend-1)))
- sel= 1;
+ if ((charidx >= (cu->selstart - 1)) && (charidx <= (cu->selend - 1)))
+ sel = 1;
}
#endif
- /* make a copy at distance ofsx,ofsy with shear*/
- fsize= cu->fsize;
- shear= cu->shear;
- si= (float)sin(rot);
- co= (float)cos(rot);
+ /* make a copy at distance ofsx, ofsy with shear*/
+ fsize = cu->fsize;
+ shear = cu->shear;
+ si = (float)sin(rot);
+ co = (float)cos(rot);
- che= find_vfont_char(vfd, character);
+ che = find_vfont_char(vfd, character);
// Select the glyph data
if (che)
nu1 = che->nurbsbase.first;
// Create the character
- while (nu1)
- {
+ while (nu1) {
bezt1 = nu1->bezt;
if (bezt1) {
- nu2 =(Nurb*) MEM_mallocN(sizeof(Nurb),"duplichar_nurb");
+ nu2 = (Nurb *) MEM_mallocN(sizeof(Nurb), "duplichar_nurb");
if (nu2 == NULL) break;
memcpy(nu2, nu1, sizeof(struct Nurb));
- nu2->resolu= cu->resolu;
+ nu2->resolu = cu->resolu;
nu2->bp = NULL;
nu2->knotsu = nu2->knotsv = NULL;
- nu2->flag= CU_SMOOTH;
+ nu2->flag = CU_SMOOTH;
nu2->charidx = charidx;
if (info->mat_nr > 0) {
- nu2->mat_nr= info->mat_nr-1;
+ nu2->mat_nr = info->mat_nr - 1;
}
else {
- nu2->mat_nr= 0;
+ nu2->mat_nr = 0;
}
/* nu2->trim.first = 0; */
/* nu2->trim.last = 0; */
i = nu2->pntsu;
- bezt2 = (BezTriple*)MEM_mallocN(i * sizeof(BezTriple),"duplichar_bezt2");
+ bezt2 = (BezTriple *)MEM_mallocN(i * sizeof(BezTriple), "duplichar_bezt2");
if (bezt2 == NULL) {
MEM_freeN(nu2);
break;
@@ -430,7 +427,7 @@ static void buildchar(Main *bmain, Curve *cu, unsigned long character, CharInfo
if (shear != 0.0f) {
bezt2 = nu2->bezt;
- for (i= nu2->pntsu; i > 0; i--) {
+ for (i = nu2->pntsu; i > 0; i--) {
bezt2->vec[0][0] += shear * bezt2->vec[0][1];
bezt2->vec[1][0] += shear * bezt2->vec[1][1];
bezt2->vec[2][0] += shear * bezt2->vec[2][1];
@@ -438,19 +435,19 @@ static void buildchar(Main *bmain, Curve *cu, unsigned long character, CharInfo
}
}
if (rot != 0.0f) {
- bezt2= nu2->bezt;
- for (i=nu2->pntsu; i > 0; i--) {
- fp= bezt2->vec[0];
-
- x= fp[0];
- fp[0]= co*x + si*fp[1];
- fp[1]= -si*x + co*fp[1];
- x= fp[3];
- fp[3]= co*x + si*fp[4];
- fp[4]= -si*x + co*fp[4];
- x= fp[6];
- fp[6]= co*x + si*fp[7];
- fp[7]= -si*x + co*fp[7];
+ bezt2 = nu2->bezt;
+ for (i = nu2->pntsu; i > 0; i--) {
+ fp = bezt2->vec[0];
+
+ x = fp[0];
+ fp[0] = co * x + si * fp[1];
+ fp[1] = -si * x + co * fp[1];
+ x = fp[3];
+ fp[3] = co * x + si * fp[4];
+ fp[4] = -si * x + co * fp[4];
+ x = fp[6];
+ fp[6] = co * x + si * fp[7];
+ fp[7] = -si * x + co * fp[7];
bezt2++;
}
@@ -458,9 +455,9 @@ static void buildchar(Main *bmain, Curve *cu, unsigned long character, CharInfo
bezt2 = nu2->bezt;
if (info->flag & CU_CHINFO_SMALLCAPS_CHECK) {
- const float sca= cu->smallcaps_scale;
- for (i= nu2->pntsu; i > 0; i--) {
- fp= bezt2->vec[0];
+ const float sca = cu->smallcaps_scale;
+ for (i = nu2->pntsu; i > 0; i--) {
+ fp = bezt2->vec[0];
fp[0] *= sca;
fp[1] *= sca;
fp[3] *= sca;
@@ -472,14 +469,14 @@ static void buildchar(Main *bmain, Curve *cu, unsigned long character, CharInfo
}
bezt2 = nu2->bezt;
- for (i= nu2->pntsu; i > 0; i--) {
- fp= bezt2->vec[0];
- fp[0]= (fp[0]+ofsx)*fsize;
- fp[1]= (fp[1]+ofsy)*fsize;
- fp[3]= (fp[3]+ofsx)*fsize;
- fp[4]= (fp[4]+ofsy)*fsize;
- fp[6]= (fp[6]+ofsx)*fsize;
- fp[7]= (fp[7]+ofsy)*fsize;
+ for (i = nu2->pntsu; i > 0; i--) {
+ fp = bezt2->vec[0];
+ fp[0] = (fp[0] + ofsx) * fsize;
+ fp[1] = (fp[1] + ofsy) * fsize;
+ fp[3] = (fp[3] + ofsx) * fsize;
+ fp[4] = (fp[4] + ofsy) * fsize;
+ fp[6] = (fp[6] + ofsx) * fsize;
+ fp[7] = (fp[7] + ofsy) * fsize;
bezt2++;
}
@@ -490,21 +487,21 @@ static void buildchar(Main *bmain, Curve *cu, unsigned long character, CharInfo
}
}
-int BKE_font_getselection(Object *ob, int *start, int *end)
+int BKE_vfont_select_get(Object *ob, int *start, int *end)
{
- Curve *cu= ob->data;
+ Curve *cu = ob->data;
- if (cu->editfont==NULL || ob->type != OB_FONT) return 0;
+ if (cu->editfont == NULL || ob->type != OB_FONT) return 0;
if (cu->selstart == 0) return 0;
if (cu->selstart <= cu->selend) {
- *start = cu->selstart-1;
- *end = cu->selend-1;
+ *start = cu->selstart - 1;
+ *end = cu->selend - 1;
return 1;
}
else {
*start = cu->selend;
- *end = cu->selstart-2;
+ *end = cu->selstart - 2;
return -1;
}
}
@@ -523,32 +520,31 @@ static float char_width(Curve *cu, VChar *che, CharInfo *info)
}
}
-struct chartrans *BKE_text_to_curve(Main *bmain, Scene *scene, Object *ob, int mode)
-{
+struct chartrans *BKE_vfont_to_curve(Main *bmain, Scene *scene, Object *ob, int mode){
VFont *vfont, *oldvfont;
- VFontData *vfd= NULL;
+ VFontData *vfd = NULL;
Curve *cu;
CharInfo *info = NULL, *custrinfo;
TextBox *tb;
VChar *che;
- struct chartrans *chartransdata=NULL, *ct;
+ struct chartrans *chartransdata = NULL, *ct;
float *f, xof, yof, xtrax, linedist, *linedata, *linedata2, *linedata3, *linedata4;
- float twidth, maxlen= 0;
+ float twidth, maxlen = 0;
int i, slen, j;
int curbox;
int selstart, selend;
int utf8len;
- short cnr=0, lnr=0, wsnr= 0;
+ short cnr = 0, lnr = 0, wsnr = 0;
wchar_t *mem, *tmp, ascii;
/* renark: do calculations including the trailing '\0' of a string
* because the cursor can be at that location */
- if (ob->type!=OB_FONT) return NULL;
+ if (ob->type != OB_FONT) return NULL;
// Set font data
- cu= (Curve *) ob->data;
- vfont= cu->vfont;
+ cu = (Curve *) ob->data;
+ vfont = cu->vfont;
if (cu->str == NULL) return NULL;
if (vfont == NULL) return NULL;
@@ -565,17 +561,17 @@ struct chartrans *BKE_text_to_curve(Main *bmain, Scene *scene, Object *ob, int m
if (cu->ulheight == 0.0f)
cu->ulheight = 0.05f;
- if (cu->strinfo==NULL) /* old file */
- cu->strinfo = MEM_callocN((slen+4) * sizeof(CharInfo), "strinfo compat");
+ if (cu->strinfo == NULL) /* old file */
+ cu->strinfo = MEM_callocN((slen + 4) * sizeof(CharInfo), "strinfo compat");
- custrinfo= cu->strinfo;
+ custrinfo = cu->strinfo;
if (cu->editfont)
- custrinfo= cu->editfont->textbufinfo;
+ custrinfo = cu->editfont->textbufinfo;
- if (cu->tb==NULL)
- cu->tb= MEM_callocN(MAXTEXTBOX*sizeof(TextBox), "TextBox compat");
+ if (cu->tb == NULL)
+ cu->tb = MEM_callocN(MAXTEXTBOX * sizeof(TextBox), "TextBox compat");
- vfd= vfont_get_data(bmain, vfont);
+ vfd = vfont_get_data(bmain, vfont);
/* The VFont Data can not be found */
if (!vfd) {
@@ -586,66 +582,66 @@ struct chartrans *BKE_text_to_curve(Main *bmain, Scene *scene, Object *ob, int m
/* calc offset and rotation of each char */
ct = chartransdata =
- (struct chartrans*)MEM_callocN((slen+1)* sizeof(struct chartrans),"buildtext");
+ (struct chartrans *)MEM_callocN((slen + 1) * sizeof(struct chartrans), "buildtext");
/* We assume the worst case: 1 character per line (is freed at end anyway) */
- linedata= MEM_mallocN(sizeof(float)*(slen*2 + 1),"buildtext2");
- linedata2= MEM_mallocN(sizeof(float)*(slen*2 + 1),"buildtext3");
- linedata3= MEM_callocN(sizeof(float)*(slen*2 + 1),"buildtext4");
- linedata4= MEM_callocN(sizeof(float)*(slen*2 + 1),"buildtext5");
+ linedata = MEM_mallocN(sizeof(float) * (slen * 2 + 1), "buildtext2");
+ linedata2 = MEM_mallocN(sizeof(float) * (slen * 2 + 1), "buildtext3");
+ linedata3 = MEM_callocN(sizeof(float) * (slen * 2 + 1), "buildtext4");
+ linedata4 = MEM_callocN(sizeof(float) * (slen * 2 + 1), "buildtext5");
- linedist= cu->linedist;
+ linedist = cu->linedist;
- xof= cu->xof + (cu->tb[0].x/cu->fsize);
- yof= cu->yof + (cu->tb[0].y/cu->fsize);
+ xof = cu->xof + (cu->tb[0].x / cu->fsize);
+ yof = cu->yof + (cu->tb[0].y / cu->fsize);
- xtrax= 0.5f*cu->spacing-0.5f;
+ xtrax = 0.5f * cu->spacing - 0.5f;
oldvfont = NULL;
- for (i=0; i<slen; i++) custrinfo[i].flag &= ~(CU_CHINFO_WRAP|CU_CHINFO_SMALLCAPS_CHECK);
+ for (i = 0; i < slen; i++) custrinfo[i].flag &= ~(CU_CHINFO_WRAP | CU_CHINFO_SMALLCAPS_CHECK);
if (cu->selboxes) MEM_freeN(cu->selboxes);
cu->selboxes = NULL;
- if (BKE_font_getselection(ob, &selstart, &selend))
- cu->selboxes = MEM_callocN((selend-selstart+1)*sizeof(SelBox), "font selboxes");
+ if (BKE_vfont_select_get(ob, &selstart, &selend))
+ cu->selboxes = MEM_callocN((selend - selstart + 1) * sizeof(SelBox), "font selboxes");
tb = &(cu->tb[0]);
- curbox= 0;
- for (i = 0 ; i<=slen ; i++) {
- makebreak:
+ curbox = 0;
+ for (i = 0; i <= slen; i++) {
+makebreak:
// Characters in the list
info = &(custrinfo[i]);
ascii = mem[i];
if (info->flag & CU_CHINFO_SMALLCAPS) {
ascii = towupper(ascii);
if (mem[i] != ascii) {
- mem[i]= ascii;
+ mem[i] = ascii;
info->flag |= CU_CHINFO_SMALLCAPS_CHECK;
}
}
vfont = which_vfont(cu, info);
- if (vfont==NULL) break;
+ if (vfont == NULL) break;
- che= find_vfont_char(vfd, ascii);
+ che = find_vfont_char(vfd, ascii);
/*
* The character wasn't in the current curve base so load it
* But if the font is FO_BUILTIN_NAME then do not try loading since
* whole font is in the memory already
*/
- if (che == NULL && strcmp(vfont->name, FO_BUILTIN_NAME)) {
+ if (che == NULL && strcmp(vfont->name, FO_BUILTIN_NAME)) {
BLI_vfontchar_from_freetypefont(vfont, ascii);
}
/* Try getting the character again from the list */
- che= find_vfont_char(vfd, ascii);
+ che = find_vfont_char(vfd, ascii);
/* No VFont found */
- if (vfont==NULL) {
+ if (vfont == NULL) {
if (mem)
MEM_freeN(mem);
MEM_freeN(chartransdata);
@@ -653,7 +649,7 @@ struct chartrans *BKE_text_to_curve(Main *bmain, Scene *scene, Object *ob, int m
}
if (vfont != oldvfont) {
- vfd= vfont_get_data(bmain, vfont);
+ vfd = vfont_get_data(bmain, vfont);
oldvfont = vfont;
}
@@ -668,24 +664,24 @@ struct chartrans *BKE_text_to_curve(Main *bmain, Scene *scene, Object *ob, int m
twidth = char_width(cu, che, info);
// Calculate positions
- if ((tb->w != 0.0f) && (ct->dobreak==0) && ((xof-(tb->x/cu->fsize)+twidth)*cu->fsize) > tb->w + cu->xof*cu->fsize) {
- // fprintf(stderr, "linewidth exceeded: %c%c%c...\n", mem[i], mem[i+1], mem[i+2]);
- for (j=i; j && (mem[j] != '\n') && (mem[j] != '\r') && (chartransdata[j].dobreak==0); j--) {
- if (mem[j]==' ' || mem[j]=='-') {
- ct -= (i-(j-1));
- cnr -= (i-(j-1));
+ if ((tb->w != 0.0f) && (ct->dobreak == 0) && ((xof - (tb->x / cu->fsize) + twidth) * cu->fsize) > tb->w + cu->xof * cu->fsize) {
+ // fprintf(stderr, "linewidth exceeded: %c%c%c...\n", mem[i], mem[i+1], mem[i+2]);
+ for (j = i; j && (mem[j] != '\n') && (mem[j] != '\r') && (chartransdata[j].dobreak == 0); j--) {
+ if (mem[j] == ' ' || mem[j] == '-') {
+ ct -= (i - (j - 1));
+ cnr -= (i - (j - 1));
if (mem[j] == ' ') wsnr--;
if (mem[j] == '-') wsnr++;
- i = j-1;
+ i = j - 1;
xof = ct->xof;
ct[1].dobreak = 1;
- custrinfo[i+1].flag |= CU_CHINFO_WRAP;
+ custrinfo[i + 1].flag |= CU_CHINFO_WRAP;
goto makebreak;
}
if (chartransdata[j].dobreak) {
- // fprintf(stderr, "word too long: %c%c%c...\n", mem[j], mem[j+1], mem[j+2]);
- ct->dobreak= 1;
- custrinfo[i+1].flag |= CU_CHINFO_WRAP;
+ // fprintf(stderr, "word too long: %c%c%c...\n", mem[j], mem[j+1], mem[j+2]);
+ ct->dobreak = 1;
+ custrinfo[i + 1].flag |= CU_CHINFO_WRAP;
ct -= 1;
cnr -= 1;
i--;
@@ -694,27 +690,27 @@ struct chartrans *BKE_text_to_curve(Main *bmain, Scene *scene, Object *ob, int m
}
}
}
- if (ascii== '\n' || ascii== '\r' || ascii==0 || ct->dobreak) {
- ct->xof= xof;
- ct->yof= yof;
- ct->linenr= lnr;
- ct->charnr= cnr;
-
- yof-= linedist;
-
- maxlen= MAX2(maxlen, (xof-tb->x/cu->fsize));
- linedata[lnr]= xof-tb->x/cu->fsize;
- linedata2[lnr]= cnr;
- linedata3[lnr]= tb->w/cu->fsize;
- linedata4[lnr]= wsnr;
+ if (ascii == '\n' || ascii == '\r' || ascii == 0 || ct->dobreak) {
+ ct->xof = xof;
+ ct->yof = yof;
+ ct->linenr = lnr;
+ ct->charnr = cnr;
+
+ yof -= linedist;
+
+ maxlen = MAX2(maxlen, (xof - tb->x / cu->fsize));
+ linedata[lnr] = xof - tb->x / cu->fsize;
+ linedata2[lnr] = cnr;
+ linedata3[lnr] = tb->w / cu->fsize;
+ linedata4[lnr] = wsnr;
if ( (tb->h != 0.0f) &&
- ((-(yof-(tb->y/cu->fsize))) > ((tb->h/cu->fsize)-(linedist*cu->fsize)) - cu->yof) &&
- (cu->totbox > (curbox+1)) ) {
- maxlen= 0;
+ ((-(yof - (tb->y / cu->fsize))) > ((tb->h / cu->fsize) - (linedist * cu->fsize)) - cu->yof) &&
+ (cu->totbox > (curbox + 1)) ) {
+ maxlen = 0;
tb++;
curbox++;
- yof= cu->yof + tb->y/cu->fsize;
+ yof = cu->yof + tb->y / cu->fsize;
}
/* XXX, has been unused for years, need to check if this is useful, r4613 r5282 - campbell */
@@ -722,43 +718,43 @@ struct chartrans *BKE_text_to_curve(Main *bmain, Scene *scene, Object *ob, int m
if (ascii == '\n' || ascii == '\r')
xof = cu->xof;
else
- xof= cu->xof + (tb->x/cu->fsize);
+ xof = cu->xof + (tb->x / cu->fsize);
#else
- xof= cu->xof + (tb->x/cu->fsize);
+ xof = cu->xof + (tb->x / cu->fsize);
#endif
lnr++;
- cnr= 0;
- wsnr= 0;
+ cnr = 0;
+ wsnr = 0;
}
- else if (ascii==9) { /* TAB */
+ else if (ascii == 9) { /* TAB */
float tabfac;
- ct->xof= xof;
- ct->yof= yof;
- ct->linenr= lnr;
- ct->charnr= cnr++;
-
- tabfac= (xof-cu->xof+0.01f);
- tabfac= 2.0f*ceilf(tabfac/2.0f);
- xof= cu->xof+tabfac;
+ ct->xof = xof;
+ ct->yof = yof;
+ ct->linenr = lnr;
+ ct->charnr = cnr++;
+
+ tabfac = (xof - cu->xof + 0.01f);
+ tabfac = 2.0f * ceilf(tabfac / 2.0f);
+ xof = cu->xof + tabfac;
}
else {
- SelBox *sb= NULL;
+ SelBox *sb = NULL;
float wsfac;
- ct->xof= xof;
- ct->yof= yof;
- ct->linenr= lnr;
- ct->charnr= cnr++;
+ ct->xof = xof;
+ ct->yof = yof;
+ ct->linenr = lnr;
+ ct->charnr = cnr++;
- if (cu->selboxes && (i>=selstart) && (i<=selend)) {
- sb = &(cu->selboxes[i-selstart]);
- sb->y = yof*cu->fsize-linedist*cu->fsize*0.1f;
- sb->h = linedist*cu->fsize;
- sb->w = xof*cu->fsize;
+ if (cu->selboxes && (i >= selstart) && (i <= selend)) {
+ sb = &(cu->selboxes[i - selstart]);
+ sb->y = yof * cu->fsize - linedist * cu->fsize * 0.1f;
+ sb->h = linedist * cu->fsize;
+ sb->w = xof * cu->fsize;
}
- if (ascii==32) {
+ if (ascii == 32) {
wsfac = cu->wordspace;
wsnr++;
}
@@ -767,20 +763,20 @@ struct chartrans *BKE_text_to_curve(Main *bmain, Scene *scene, Object *ob, int m
// Set the width of the character
twidth = char_width(cu, che, info);
- xof += (twidth*wsfac*(1.0f+(info->kern/40.0f)) ) + xtrax;
+ xof += (twidth * wsfac * (1.0f + (info->kern / 40.0f)) ) + xtrax;
if (sb)
- sb->w = (xof*cu->fsize) - sb->w;
+ sb->w = (xof * cu->fsize) - sb->w;
}
ct++;
}
- cu->lines= 1;
- ct= chartransdata;
+ cu->lines = 1;
+ ct = chartransdata;
tmp = mem;
- for (i= 0; i<=slen; i++, tmp++, ct++) {
+ for (i = 0; i <= slen; i++, tmp++, ct++) {
ascii = *tmp;
- if (ascii== '\n' || ascii== '\r' || ct->dobreak) cu->lines++;
+ if (ascii == '\n' || ascii == '\r' || ct->dobreak) cu->lines++;
}
// linedata is now: width of line
@@ -788,64 +784,69 @@ struct chartrans *BKE_text_to_curve(Main *bmain, Scene *scene, Object *ob, int m
// linedata3 is now: maxlen of that line
// linedata4 is now: number of whitespaces of line
- if (cu->spacemode!=CU_LEFT) {
- ct= chartransdata;
+ if (cu->spacemode != CU_LEFT) {
+ ct = chartransdata;
- if (cu->spacemode==CU_RIGHT) {
- for (i=0;i<lnr;i++) linedata[i]= linedata3[i]-linedata[i];
- for (i=0; i<=slen; i++) {
- ct->xof+= linedata[ct->linenr];
+ if (cu->spacemode == CU_RIGHT) {
+ for (i = 0; i < lnr; i++) linedata[i] = linedata3[i] - linedata[i];
+ for (i = 0; i <= slen; i++) {
+ ct->xof += linedata[ct->linenr];
ct++;
}
}
- else if (cu->spacemode==CU_MIDDLE) {
- for (i=0;i<lnr;i++) linedata[i]= (linedata3[i]-linedata[i])/2;
- for (i=0; i<=slen; i++) {
- ct->xof+= linedata[ct->linenr];
+ else if (cu->spacemode == CU_MIDDLE) {
+ for (i = 0; i < lnr; i++) linedata[i] = (linedata3[i] - linedata[i]) / 2;
+ for (i = 0; i <= slen; i++) {
+ ct->xof += linedata[ct->linenr];
ct++;
}
}
- else if ((cu->spacemode==CU_FLUSH) &&
- (cu->tb[0].w != 0.0f)) {
- for (i=0;i<lnr;i++)
- if (linedata2[i]>1)
- linedata[i]= (linedata3[i]-linedata[i])/(linedata2[i]-1);
- for (i=0; i<=slen; i++) {
- for (j=i; (!ELEM3(mem[j], '\0', '\n', '\r')) && (chartransdata[j].dobreak == 0) && (j < slen); j++) {
+ else if ((cu->spacemode == CU_FLUSH) &&
+ (cu->tb[0].w != 0.0f)) {
+ for (i = 0; i < lnr; i++)
+ if (linedata2[i] > 1)
+ linedata[i] = (linedata3[i] - linedata[i]) / (linedata2[i] - 1);
+ for (i = 0; i <= slen; i++) {
+ for (j = i; (!ELEM3(mem[j], '\0', '\n', '\r')) && (chartransdata[j].dobreak == 0) && (j < slen); j++) {
/* do nothing */
}
// if ((mem[j]!='\r') && (mem[j]!='\n') && (mem[j])) {
- ct->xof+= ct->charnr*linedata[ct->linenr];
+ ct->xof += ct->charnr * linedata[ct->linenr];
// }
ct++;
}
}
- else if ((cu->spacemode==CU_JUSTIFY) && (cu->tb[0].w != 0.0f)) {
- float curofs= 0.0f;
- for (i=0; i<=slen; i++) {
- for (j=i; (mem[j]) && (mem[j]!='\n') &&
- (mem[j]!='\r') && (chartransdata[j].dobreak==0) && (j<slen); j++);
- if ((mem[j]!='\r') && (mem[j]!='\n') &&
- ((chartransdata[j].dobreak!=0))) {
- if (mem[i]==' ') curofs += (linedata3[ct->linenr]-linedata[ct->linenr])/linedata4[ct->linenr];
- ct->xof+= curofs;
+ else if ((cu->spacemode == CU_JUSTIFY) && (cu->tb[0].w != 0.0f)) {
+ float curofs = 0.0f;
+ for (i = 0; i <= slen; i++) {
+ for (j = i; (mem[j]) && (mem[j] != '\n') &&
+ (mem[j] != '\r') && (chartransdata[j].dobreak == 0) && (j < slen);
+ j++)
+ {
+ /* pass */
+ }
+
+ if ((mem[j] != '\r') && (mem[j] != '\n') &&
+ ((chartransdata[j].dobreak != 0))) {
+ if (mem[i] == ' ') curofs += (linedata3[ct->linenr] - linedata[ct->linenr]) / linedata4[ct->linenr];
+ ct->xof += curofs;
}
- if (mem[i]=='\n' || mem[i]=='\r' || chartransdata[i].dobreak) curofs= 0;
+ if (mem[i] == '\n' || mem[i] == '\r' || chartransdata[i].dobreak) curofs = 0;
ct++;
- }
+ }
}
}
/* TEXT ON CURVE */
/* Note: Only OB_CURVE objects could have a path */
- if (cu->textoncurve && cu->textoncurve->type==OB_CURVE) {
- Curve *cucu= cu->textoncurve->data;
- int oldflag= cucu->flag;
+ if (cu->textoncurve && cu->textoncurve->type == OB_CURVE) {
+ Curve *cucu = cu->textoncurve->data;
+ int oldflag = cucu->flag;
- cucu->flag |= (CU_PATH+CU_FOLLOW);
+ cucu->flag |= (CU_PATH + CU_FOLLOW);
- if (cucu->path==NULL) makeDispListCurveTypes(scene, cu->textoncurve, 0);
+ if (cucu->path == NULL) BKE_displist_make_curveTypes(scene, cu->textoncurve, 0);
if (cucu->path) {
float distfac, imat[4][4], imat3[3][3], cmat[3][3];
float minx, maxx, miny, maxy;
@@ -856,116 +857,116 @@ struct chartrans *BKE_text_to_curve(Main *bmain, Scene *scene, Object *ob, int m
copy_m3_m4(cmat, cu->textoncurve->obmat);
mul_m3_m3m3(cmat, cmat, imat3);
- sizefac= normalize_v3(cmat[0])/cu->fsize;
+ sizefac = normalize_v3(cmat[0]) / cu->fsize;
- minx=miny= 1.0e20f;
- maxx=maxy= -1.0e20f;
- ct= chartransdata;
- for (i=0; i<=slen; i++, ct++) {
- if (minx>ct->xof) minx= ct->xof;
- if (maxx<ct->xof) maxx= ct->xof;
- if (miny>ct->yof) miny= ct->yof;
- if (maxy<ct->yof) maxy= ct->yof;
+ minx = miny = 1.0e20f;
+ maxx = maxy = -1.0e20f;
+ ct = chartransdata;
+ for (i = 0; i <= slen; i++, ct++) {
+ if (minx > ct->xof) minx = ct->xof;
+ if (maxx < ct->xof) maxx = ct->xof;
+ if (miny > ct->yof) miny = ct->yof;
+ if (maxy < ct->yof) maxy = ct->yof;
}
/* we put the x-coordinaat exact at the curve, the y is rotated */
/* length correction */
- distfac= sizefac*cucu->path->totdist/(maxx-minx);
- timeofs= 0.0f;
+ distfac = sizefac * cucu->path->totdist / (maxx - minx);
+ timeofs = 0.0f;
if (distfac > 1.0f) {
/* path longer than text: spacemode involves */
- distfac= 1.0f/distfac;
+ distfac = 1.0f / distfac;
- if (cu->spacemode==CU_RIGHT) {
- timeofs= 1.0f-distfac;
+ if (cu->spacemode == CU_RIGHT) {
+ timeofs = 1.0f - distfac;
}
- else if (cu->spacemode==CU_MIDDLE) {
- timeofs= (1.0f-distfac)/2.0f;
+ else if (cu->spacemode == CU_MIDDLE) {
+ timeofs = (1.0f - distfac) / 2.0f;
}
- else if (cu->spacemode==CU_FLUSH) distfac= 1.0f;
+ else if (cu->spacemode == CU_FLUSH) distfac = 1.0f;
}
- else distfac= 1.0;
+ else distfac = 1.0;
- distfac/= (maxx-minx);
+ distfac /= (maxx - minx);
- timeofs+= distfac*cu->xof; /* not cyclic */
+ timeofs += distfac * cu->xof; /* not cyclic */
- ct= chartransdata;
- for (i=0; i<=slen; i++, ct++) {
+ ct = chartransdata;
+ for (i = 0; i <= slen; i++, ct++) {
float ctime, dtime, vec[4], tvec[4], rotvec[3];
float si, co;
/* rotate around center character */
ascii = mem[i];
- che= find_vfont_char(vfd, ascii);
+ che = find_vfont_char(vfd, ascii);
twidth = char_width(cu, che, info);
- dtime= distfac*0.5f*twidth;
+ dtime = distfac * 0.5f * twidth;
- ctime= timeofs + distfac*( ct->xof - minx);
+ ctime = timeofs + distfac * (ct->xof - minx);
CLAMP(ctime, 0.0f, 1.0f);
/* calc the right loc AND the right rot separately */
/* vec, tvec need 4 items */
where_on_path(cu->textoncurve, ctime, vec, tvec, NULL, NULL, NULL);
- where_on_path(cu->textoncurve, ctime+dtime, tvec, rotvec, NULL, NULL, NULL);
+ where_on_path(cu->textoncurve, ctime + dtime, tvec, rotvec, NULL, NULL, NULL);
mul_v3_fl(vec, sizefac);
- ct->rot= (float)(M_PI-atan2(rotvec[1], rotvec[0]));
+ ct->rot = (float)(M_PI - atan2(rotvec[1], rotvec[0]));
- si= (float)sin(ct->rot);
- co= (float)cos(ct->rot);
+ si = (float)sin(ct->rot);
+ co = (float)cos(ct->rot);
- yof= ct->yof;
+ yof = ct->yof;
- ct->xof= vec[0] + si*yof;
- ct->yof= vec[1] + co*yof;
+ ct->xof = vec[0] + si * yof;
+ ct->yof = vec[1] + co * yof;
}
- cucu->flag= oldflag;
+ cucu->flag = oldflag;
}
}
if (cu->selboxes) {
- ct= chartransdata;
- for (i=0; i<=selend; i++, ct++) {
- if (i>=selstart) {
- cu->selboxes[i-selstart].x = ct->xof*cu->fsize;
- cu->selboxes[i-selstart].y = ct->yof*cu->fsize;
+ ct = chartransdata;
+ for (i = 0; i <= selend; i++, ct++) {
+ if (i >= selstart) {
+ cu->selboxes[i - selstart].x = ct->xof * cu->fsize;
+ cu->selboxes[i - selstart].y = ct->yof * cu->fsize;
}
}
}
- if (mode==FO_CURSUP || mode==FO_CURSDOWN || mode==FO_PAGEUP || mode==FO_PAGEDOWN) {
+ if (mode == FO_CURSUP || mode == FO_CURSDOWN || mode == FO_PAGEUP || mode == FO_PAGEDOWN) {
/* 2: curs up
* 3: curs down */
- ct= chartransdata+cu->pos;
+ ct = chartransdata + cu->pos;
- if ((mode==FO_CURSUP || mode==FO_PAGEUP) && ct->linenr==0);
- else if ((mode==FO_CURSDOWN || mode==FO_PAGEDOWN) && ct->linenr==lnr);
+ if ((mode == FO_CURSUP || mode == FO_PAGEUP) && ct->linenr == 0) ;
+ else if ((mode == FO_CURSDOWN || mode == FO_PAGEDOWN) && ct->linenr == lnr) ;
else {
- switch(mode) {
- case FO_CURSUP: lnr= ct->linenr-1; break;
- case FO_CURSDOWN: lnr= ct->linenr+1; break;
- case FO_PAGEUP: lnr= ct->linenr-10; break;
- case FO_PAGEDOWN: lnr= ct->linenr+10; break;
+ switch (mode) {
+ case FO_CURSUP: lnr = ct->linenr - 1; break;
+ case FO_CURSDOWN: lnr = ct->linenr + 1; break;
+ case FO_PAGEUP: lnr = ct->linenr - 10; break;
+ case FO_PAGEDOWN: lnr = ct->linenr + 10; break;
}
- cnr= ct->charnr;
+ cnr = ct->charnr;
/* seek for char with lnr en cnr */
- cu->pos= 0;
- ct= chartransdata;
- for (i= 0; i<slen; i++) {
- if (ct->linenr==lnr) {
- if (ct->charnr==cnr) break;
- if ( (ct+1)->charnr==0) break;
+ cu->pos = 0;
+ ct = chartransdata;
+ for (i = 0; i < slen; i++) {
+ if (ct->linenr == lnr) {
+ if (ct->charnr == cnr) break;
+ if ( (ct + 1)->charnr == 0) break;
}
- else if (ct->linenr>lnr) break;
+ else if (ct->linenr > lnr) break;
cu->pos++;
ct++;
}
@@ -976,23 +977,23 @@ struct chartrans *BKE_text_to_curve(Main *bmain, Scene *scene, Object *ob, int m
if (cu->editfont) {
float si, co;
- ct= chartransdata+cu->pos;
- si= (float)sin(ct->rot);
- co= (float)cos(ct->rot);
+ ct = chartransdata + cu->pos;
+ si = (float)sin(ct->rot);
+ co = (float)cos(ct->rot);
- f= cu->editfont->textcurs[0];
+ f = cu->editfont->textcurs[0];
- f[0]= cu->fsize*(-0.1f*co + ct->xof);
- f[1]= cu->fsize*(0.1f*si + ct->yof);
+ f[0] = cu->fsize * (-0.1f * co + ct->xof);
+ f[1] = cu->fsize * (0.1f * si + ct->yof);
- f[2]= cu->fsize*(0.1f*co + ct->xof);
- f[3]= cu->fsize*(-0.1f*si + ct->yof);
+ f[2] = cu->fsize * (0.1f * co + ct->xof);
+ f[3] = cu->fsize * (-0.1f * si + ct->yof);
- f[4]= cu->fsize*( 0.1f*co + 0.8f*si + ct->xof);
- f[5]= cu->fsize*(-0.1f*si + 0.8f*co + ct->yof);
+ f[4] = cu->fsize * (0.1f * co + 0.8f * si + ct->xof);
+ f[5] = cu->fsize * (-0.1f * si + 0.8f * co + ct->yof);
- f[6]= cu->fsize*(-0.1f*co + 0.8f*si + ct->xof);
- f[7]= cu->fsize*( 0.1f*si + 0.8f*co + ct->yof);
+ f[6] = cu->fsize * (-0.1f * co + 0.8f * si + ct->xof);
+ f[7] = cu->fsize * (0.1f * si + 0.8f * co + ct->yof);
}
@@ -1009,11 +1010,11 @@ struct chartrans *BKE_text_to_curve(Main *bmain, Scene *scene, Object *ob, int m
if (mode == FO_EDIT) {
/* make nurbdata */
- freeNurblist(&cu->nurb);
+ BKE_nurbList_free(&cu->nurb);
- ct= chartransdata;
- if (cu->sepchar==0) {
- for (i= 0; i<slen; i++) {
+ ct = chartransdata;
+ if (cu->sepchar == 0) {
+ for (i = 0; i < slen; i++) {
unsigned long cha = (uintptr_t) mem[i];
info = &(custrinfo[i]);
if (info->mat_nr > (ob->totcol)) {
@@ -1025,42 +1026,42 @@ struct chartrans *BKE_text_to_curve(Main *bmain, Scene *scene, Object *ob, int m
buildchar(bmain, cu, cha, info, ct->xof, ct->yof, ct->rot, i);
if ((info->flag & CU_CHINFO_UNDERLINE) && (cu->textoncurve == NULL) && (cha != '\n') && (cha != '\r')) {
- float ulwidth, uloverlap= 0.0f;
+ float ulwidth, uloverlap = 0.0f;
- if ( (i<(slen-1)) && (mem[i+1] != '\n') && (mem[i+1] != '\r') &&
- ((mem[i+1] != ' ') || (custrinfo[i+1].flag & CU_CHINFO_UNDERLINE)) && ((custrinfo[i+1].flag & CU_CHINFO_WRAP)==0)
- ) {
+ if ( (i < (slen - 1)) && (mem[i + 1] != '\n') && (mem[i + 1] != '\r') &&
+ ((mem[i + 1] != ' ') || (custrinfo[i + 1].flag & CU_CHINFO_UNDERLINE)) && ((custrinfo[i + 1].flag & CU_CHINFO_WRAP) == 0)
+ ) {
uloverlap = xtrax + 0.1f;
}
// Find the character, the characters has to be in the memory already
// since character checking has been done earlier already.
- che= find_vfont_char(vfd, cha);
+ che = find_vfont_char(vfd, cha);
twidth = char_width(cu, che, info);
- ulwidth = cu->fsize * ((twidth* (1.0f+(info->kern/40.0f)))+uloverlap);
- build_underline(cu, ct->xof*cu->fsize, ct->yof*cu->fsize + (cu->ulpos-0.05f)*cu->fsize,
- ct->xof*cu->fsize + ulwidth,
- ct->yof*cu->fsize + (cu->ulpos-0.05f)*cu->fsize - cu->ulheight*cu->fsize,
- i, info->mat_nr);
+ ulwidth = cu->fsize * ((twidth * (1.0f + (info->kern / 40.0f))) + uloverlap);
+ build_underline(cu, ct->xof * cu->fsize, ct->yof * cu->fsize + (cu->ulpos - 0.05f) * cu->fsize,
+ ct->xof * cu->fsize + ulwidth,
+ ct->yof * cu->fsize + (cu->ulpos - 0.05f) * cu->fsize - cu->ulheight * cu->fsize,
+ i, info->mat_nr);
}
ct++;
}
}
else {
int outta = 0;
- for (i= 0; (i<slen) && (outta==0); i++) {
+ for (i = 0; (i < slen) && (outta == 0); i++) {
ascii = mem[i];
info = &(custrinfo[i]);
- if (cu->sepchar == (i+1)) {
+ if (cu->sepchar == (i + 1)) {
float vecyo[3];
- vecyo[0]= ct->xof;
- vecyo[1]= ct->yof;
- vecyo[2]= 0.0f;
+ vecyo[0] = ct->xof;
+ vecyo[1] = ct->yof;
+ vecyo[2] = 0.0f;
mem[0] = ascii;
mem[1] = 0;
- custrinfo[0]= *info;
+ custrinfo[0] = *info;
cu->pos = 1;
cu->len = 1;
mul_v3_m4v3(ob->loc, ob->obmat, vecyo);
@@ -1072,7 +1073,7 @@ struct chartrans *BKE_text_to_curve(Main *bmain, Scene *scene, Object *ob, int m
}
}
- if (mode==FO_DUPLI) {
+ if (mode == FO_DUPLI) {
MEM_freeN(mem);
return chartransdata;
}
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index 811cb881f6e..6ec19018ab5 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -54,7 +54,7 @@
/* --------- Memory Management ------------ */
/* Free strokes belonging to a gp-frame */
-void free_gpencil_strokes (bGPDframe *gpf)
+void free_gpencil_strokes(bGPDframe *gpf)
{
bGPDstroke *gps, *gpsn;
@@ -62,8 +62,8 @@ void free_gpencil_strokes (bGPDframe *gpf)
if (gpf == NULL) return;
/* free strokes */
- for (gps= gpf->strokes.first; gps; gps= gpsn) {
- gpsn= gps->next;
+ for (gps = gpf->strokes.first; gps; gps = gpsn) {
+ gpsn = gps->next;
/* free stroke memory arrays, then stroke itself */
if (gps->points) MEM_freeN(gps->points);
@@ -72,7 +72,7 @@ void free_gpencil_strokes (bGPDframe *gpf)
}
/* Free all of a gp-layer's frames */
-void free_gpencil_frames (bGPDlayer *gpl)
+void free_gpencil_frames(bGPDlayer *gpl)
{
bGPDframe *gpf, *gpfn;
@@ -80,8 +80,8 @@ void free_gpencil_frames (bGPDlayer *gpl)
if (gpl == NULL) return;
/* free frames */
- for (gpf= gpl->frames.first; gpf; gpf= gpfn) {
- gpfn= gpf->next;
+ for (gpf = gpl->frames.first; gpf; gpf = gpfn) {
+ gpfn = gpf->next;
/* free strokes and their associated memory */
free_gpencil_strokes(gpf);
@@ -90,7 +90,7 @@ void free_gpencil_frames (bGPDlayer *gpl)
}
/* Free all of the gp-layers for a viewport (list should be &gpd->layers or so) */
-void free_gpencil_layers (ListBase *list)
+void free_gpencil_layers(ListBase *list)
{
bGPDlayer *gpl, *gpln;
@@ -98,8 +98,8 @@ void free_gpencil_layers (ListBase *list)
if (list == NULL) return;
/* delete layers*/
- for (gpl= list->first; gpl; gpl= gpln) {
- gpln= gpl->next;
+ for (gpl = list->first; gpl; gpl = gpln) {
+ gpln = gpl->next;
/* free layers and their data */
free_gpencil_frames(gpl);
@@ -108,7 +108,7 @@ void free_gpencil_layers (ListBase *list)
}
/* Free all of GPencil datablock's related data, but not the block itself */
-void free_gpencil_data (bGPdata *gpd)
+void BKE_gpencil_free(bGPdata *gpd)
{
/* free layers */
free_gpencil_layers(&gpd->layers);
@@ -117,32 +117,32 @@ void free_gpencil_data (bGPdata *gpd)
/* -------- Container Creation ---------- */
/* add a new gp-frame to the given layer */
-bGPDframe *gpencil_frame_addnew (bGPDlayer *gpl, int cframe)
+bGPDframe *gpencil_frame_addnew(bGPDlayer *gpl, int cframe)
{
bGPDframe *gpf, *gf;
- short state=0;
+ short state = 0;
/* error checking */
if ((gpl == NULL) || (cframe <= 0))
return NULL;
/* allocate memory for this frame */
- gpf= MEM_callocN(sizeof(bGPDframe), "bGPDframe");
- gpf->framenum= cframe;
+ gpf = MEM_callocN(sizeof(bGPDframe), "bGPDframe");
+ gpf->framenum = cframe;
/* find appropriate place to add frame */
if (gpl->frames.first) {
- for (gf= gpl->frames.first; gf; gf= gf->next) {
+ for (gf = gpl->frames.first; gf; gf = gf->next) {
/* check if frame matches one that is supposed to be added */
if (gf->framenum == cframe) {
- state= -1;
+ state = -1;
break;
}
/* if current frame has already exceeded the frame to add, add before */
if (gf->framenum > cframe) {
BLI_insertlinkbefore(&gpl->frames, gf, gpf);
- state= 1;
+ state = 1;
break;
}
}
@@ -163,7 +163,7 @@ bGPDframe *gpencil_frame_addnew (bGPDlayer *gpl, int cframe)
}
/* add a new gp-layer and make it the active layer */
-bGPDlayer *gpencil_layer_addnew (bGPdata *gpd)
+bGPDlayer *gpencil_layer_addnew(bGPdata *gpd)
{
bGPDlayer *gpl;
@@ -172,13 +172,13 @@ bGPDlayer *gpencil_layer_addnew (bGPdata *gpd)
return NULL;
/* allocate memory for frame and add to end of list */
- gpl= MEM_callocN(sizeof(bGPDlayer), "bGPDlayer");
+ gpl = MEM_callocN(sizeof(bGPDlayer), "bGPDlayer");
/* add to datablock */
BLI_addtail(&gpd->layers, gpl);
/* set basic settings */
- gpl->color[3]= 0.9f;
+ gpl->color[3] = 0.9f;
gpl->thickness = 3;
/* auto-name */
@@ -193,15 +193,15 @@ bGPDlayer *gpencil_layer_addnew (bGPdata *gpd)
}
/* add a new gp-datablock */
-bGPdata *gpencil_data_addnew (const char name[])
+bGPdata *gpencil_data_addnew(const char name[])
{
bGPdata *gpd;
/* allocate memory for a new block */
- gpd= alloc_libblock(&G.main->gpencil, ID_GD, name);
+ gpd = BKE_libblock_alloc(&G.main->gpencil, ID_GD, name);
/* initial settings */
- gpd->flag = (GP_DATA_DISPINFO|GP_DATA_EXPAND);
+ gpd->flag = (GP_DATA_DISPINFO | GP_DATA_EXPAND);
/* for now, stick to view is also enabled by default
* since this is more useful...
@@ -214,7 +214,7 @@ bGPdata *gpencil_data_addnew (const char name[])
/* -------- Data Duplication ---------- */
/* make a copy of a given gpencil frame */
-bGPDframe *gpencil_frame_duplicate (bGPDframe *src)
+bGPDframe *gpencil_frame_duplicate(bGPDframe *src)
{
bGPDstroke *gps, *gpsd;
bGPDframe *dst;
@@ -224,15 +224,15 @@ bGPDframe *gpencil_frame_duplicate (bGPDframe *src)
return NULL;
/* make a copy of the source frame */
- dst= MEM_dupallocN(src);
- dst->prev= dst->next= NULL;
+ dst = MEM_dupallocN(src);
+ dst->prev = dst->next = NULL;
/* copy strokes */
- dst->strokes.first = dst->strokes.last= NULL;
- for (gps= src->strokes.first; gps; gps= gps->next) {
+ dst->strokes.first = dst->strokes.last = NULL;
+ for (gps = src->strokes.first; gps; gps = gps->next) {
/* make copy of source stroke, then adjust pointer to points too */
- gpsd= MEM_dupallocN(gps);
- gpsd->points= MEM_dupallocN(gps->points);
+ gpsd = MEM_dupallocN(gps);
+ gpsd->points = MEM_dupallocN(gps->points);
BLI_addtail(&dst->strokes, gpsd);
}
@@ -242,7 +242,7 @@ bGPDframe *gpencil_frame_duplicate (bGPDframe *src)
}
/* make a copy of a given gpencil layer */
-bGPDlayer *gpencil_layer_duplicate (bGPDlayer *src)
+bGPDlayer *gpencil_layer_duplicate(bGPDlayer *src)
{
bGPDframe *gpf, *gpfd;
bGPDlayer *dst;
@@ -252,19 +252,19 @@ bGPDlayer *gpencil_layer_duplicate (bGPDlayer *src)
return NULL;
/* make a copy of source layer */
- dst= MEM_dupallocN(src);
- dst->prev= dst->next= NULL;
+ dst = MEM_dupallocN(src);
+ dst->prev = dst->next = NULL;
/* copy frames */
- dst->frames.first= dst->frames.last= NULL;
- for (gpf= src->frames.first; gpf; gpf= gpf->next) {
+ dst->frames.first = dst->frames.last = NULL;
+ for (gpf = src->frames.first; gpf; gpf = gpf->next) {
/* make a copy of source frame */
- gpfd= gpencil_frame_duplicate(gpf);
+ gpfd = gpencil_frame_duplicate(gpf);
BLI_addtail(&dst->frames, gpfd);
/* if source frame was the current layer's 'active' frame, reassign that too */
if (gpf == dst->actframe)
- dst->actframe= gpfd;
+ dst->actframe = gpfd;
}
/* return new layer */
@@ -272,7 +272,7 @@ bGPDlayer *gpencil_layer_duplicate (bGPDlayer *src)
}
/* make a copy of a given gpencil datablock */
-bGPdata *gpencil_data_duplicate (bGPdata *src)
+bGPdata *gpencil_data_duplicate(bGPdata *src)
{
bGPDlayer *gpl, *gpld;
bGPdata *dst;
@@ -282,13 +282,13 @@ bGPdata *gpencil_data_duplicate (bGPdata *src)
return NULL;
/* make a copy of the base-data */
- dst= MEM_dupallocN(src);
+ dst = MEM_dupallocN(src);
/* copy layers */
- dst->layers.first= dst->layers.last= NULL;
- for (gpl= src->layers.first; gpl; gpl= gpl->next) {
+ dst->layers.first = dst->layers.last = NULL;
+ for (gpl = src->layers.first; gpl; gpl = gpl->next) {
/* make a copy of source layer and its data */
- gpld= gpencil_layer_duplicate(gpl);
+ gpld = gpencil_layer_duplicate(gpl);
BLI_addtail(&dst->layers, gpld);
}
@@ -299,9 +299,9 @@ bGPdata *gpencil_data_duplicate (bGPdata *src)
/* -------- GP-Frame API ---------- */
/* delete the last stroke of the given frame */
-void gpencil_frame_delete_laststroke (bGPDlayer *gpl, bGPDframe *gpf)
+void gpencil_frame_delete_laststroke(bGPDlayer *gpl, bGPDframe *gpf)
{
- bGPDstroke *gps= (gpf) ? gpf->strokes.last : NULL;
+ bGPDstroke *gps = (gpf) ? gpf->strokes.last : NULL;
int cfra = (gpf) ? gpf->framenum : 0; /* assume that the current frame was not locked */
/* error checking */
@@ -325,7 +325,7 @@ void gpencil_frame_delete_laststroke (bGPDlayer *gpl, bGPDframe *gpf)
* - this sets the layer's actframe var (if allowed to)
* - extension beyond range (if first gp-frame is after all frame in interest and cannot add)
*/
-bGPDframe *gpencil_layer_getframe (bGPDlayer *gpl, int cframe, short addnew)
+bGPDframe *gpencil_layer_getframe(bGPDlayer *gpl, int cframe, short addnew)
{
bGPDframe *gpf = NULL;
short found = 0;
@@ -336,12 +336,12 @@ bGPDframe *gpencil_layer_getframe (bGPDlayer *gpl, int cframe, short addnew)
/* check if there is already an active frame */
if (gpl->actframe) {
- gpf= gpl->actframe;
+ gpf = gpl->actframe;
/* do not allow any changes to layer's active frame if layer is locked from changes
* or if the layer has been set to stay on the current frame
*/
- if (gpl->flag & (GP_LAYER_LOCKED|GP_LAYER_FRAMELOCK))
+ if (gpl->flag & (GP_LAYER_LOCKED | GP_LAYER_FRAMELOCK))
return gpf;
/* do not allow any changes to actframe if frame has painting tag attached to it */
if (gpf->flag & GP_FRAME_PAINT)
@@ -349,13 +349,13 @@ bGPDframe *gpencil_layer_getframe (bGPDlayer *gpl, int cframe, short addnew)
/* try to find matching frame */
if (gpf->framenum < cframe) {
- for (; gpf; gpf= gpf->next) {
+ for (; gpf; gpf = gpf->next) {
if (gpf->framenum == cframe) {
- found= 1;
+ found = 1;
break;
}
else if ((gpf->next) && (gpf->next->framenum > cframe)) {
- found= 1;
+ found = 1;
break;
}
}
@@ -363,19 +363,19 @@ bGPDframe *gpencil_layer_getframe (bGPDlayer *gpl, int cframe, short addnew)
/* set the appropriate frame */
if (addnew) {
if ((found) && (gpf->framenum == cframe))
- gpl->actframe= gpf;
+ gpl->actframe = gpf;
else
- gpl->actframe= gpencil_frame_addnew(gpl, cframe);
+ gpl->actframe = gpencil_frame_addnew(gpl, cframe);
}
else if (found)
- gpl->actframe= gpf;
+ gpl->actframe = gpf;
else
- gpl->actframe= gpl->frames.last;
+ gpl->actframe = gpl->frames.last;
}
else {
- for (; gpf; gpf= gpf->prev) {
+ for (; gpf; gpf = gpf->prev) {
if (gpf->framenum <= cframe) {
- found= 1;
+ found = 1;
break;
}
}
@@ -383,35 +383,35 @@ bGPDframe *gpencil_layer_getframe (bGPDlayer *gpl, int cframe, short addnew)
/* set the appropriate frame */
if (addnew) {
if ((found) && (gpf->framenum == cframe))
- gpl->actframe= gpf;
+ gpl->actframe = gpf;
else
- gpl->actframe= gpencil_frame_addnew(gpl, cframe);
+ gpl->actframe = gpencil_frame_addnew(gpl, cframe);
}
else if (found)
- gpl->actframe= gpf;
+ gpl->actframe = gpf;
else
- gpl->actframe= gpl->frames.first;
+ gpl->actframe = gpl->frames.first;
}
}
else if (gpl->frames.first) {
/* check which of the ends to start checking from */
- const int first= ((bGPDframe *)(gpl->frames.first))->framenum;
- const int last= ((bGPDframe *)(gpl->frames.last))->framenum;
+ const int first = ((bGPDframe *)(gpl->frames.first))->framenum;
+ const int last = ((bGPDframe *)(gpl->frames.last))->framenum;
- if (abs(cframe-first) > abs(cframe-last)) {
+ if (abs(cframe - first) > abs(cframe - last)) {
/* find gp-frame which is less than or equal to cframe */
- for (gpf= gpl->frames.last; gpf; gpf= gpf->prev) {
+ for (gpf = gpl->frames.last; gpf; gpf = gpf->prev) {
if (gpf->framenum <= cframe) {
- found= 1;
+ found = 1;
break;
}
}
}
else {
/* find gp-frame which is less than or equal to cframe */
- for (gpf= gpl->frames.first; gpf; gpf= gpf->next) {
+ for (gpf = gpl->frames.first; gpf; gpf = gpf->next) {
if (gpf->framenum <= cframe) {
- found= 1;
+ found = 1;
break;
}
}
@@ -420,12 +420,12 @@ bGPDframe *gpencil_layer_getframe (bGPDlayer *gpl, int cframe, short addnew)
/* set the appropriate frame */
if (addnew) {
if ((found) && (gpf->framenum == cframe))
- gpl->actframe= gpf;
+ gpl->actframe = gpf;
else
- gpl->actframe= gpencil_frame_addnew(gpl, cframe);
+ gpl->actframe = gpencil_frame_addnew(gpl, cframe);
}
else if (found)
- gpl->actframe= gpf;
+ gpl->actframe = gpf;
else {
/* unresolved errogenous situation! */
printf("Error: cannot find appropriate gp-frame\n");
@@ -435,7 +435,7 @@ bGPDframe *gpencil_layer_getframe (bGPDlayer *gpl, int cframe, short addnew)
else {
/* currently no frames (add if allowed to) */
if (addnew)
- gpl->actframe= gpencil_frame_addnew(gpl, cframe);
+ gpl->actframe = gpencil_frame_addnew(gpl, cframe);
else {
/* don't do anything... this may be when no frames yet! */
/* gpl->actframe should still be NULL */
@@ -447,7 +447,7 @@ bGPDframe *gpencil_layer_getframe (bGPDlayer *gpl, int cframe, short addnew)
}
/* delete the given frame from a layer */
-void gpencil_layer_delframe (bGPDlayer *gpl, bGPDframe *gpf)
+void gpencil_layer_delframe(bGPDlayer *gpl, bGPDframe *gpf)
{
/* error checking */
if (ELEM(NULL, gpl, gpf))
@@ -460,7 +460,7 @@ void gpencil_layer_delframe (bGPDlayer *gpl, bGPDframe *gpf)
}
/* get the active gp-layer for editing */
-bGPDlayer *gpencil_layer_getactive (bGPdata *gpd)
+bGPDlayer *gpencil_layer_getactive(bGPdata *gpd)
{
bGPDlayer *gpl;
@@ -469,7 +469,7 @@ bGPDlayer *gpencil_layer_getactive (bGPdata *gpd)
return NULL;
/* loop over layers until found (assume only one active) */
- for (gpl=gpd->layers.first; gpl; gpl=gpl->next) {
+ for (gpl = gpd->layers.first; gpl; gpl = gpl->next) {
if (gpl->flag & GP_LAYER_ACTIVE)
return gpl;
}
@@ -479,7 +479,7 @@ bGPDlayer *gpencil_layer_getactive (bGPdata *gpd)
}
/* set the active gp-layer */
-void gpencil_layer_setactive (bGPdata *gpd, bGPDlayer *active)
+void gpencil_layer_setactive(bGPdata *gpd, bGPDlayer *active)
{
bGPDlayer *gpl;
@@ -488,7 +488,7 @@ void gpencil_layer_setactive (bGPdata *gpd, bGPDlayer *active)
return;
/* loop over layers deactivating all */
- for (gpl=gpd->layers.first; gpl; gpl=gpl->next)
+ for (gpl = gpd->layers.first; gpl; gpl = gpl->next)
gpl->flag &= ~GP_LAYER_ACTIVE;
/* set as active one */
@@ -496,9 +496,9 @@ void gpencil_layer_setactive (bGPdata *gpd, bGPDlayer *active)
}
/* delete the active gp-layer */
-void gpencil_layer_delactive (bGPdata *gpd)
+void gpencil_layer_delactive(bGPdata *gpd)
{
- bGPDlayer *gpl= gpencil_layer_getactive(gpd);
+ bGPDlayer *gpl = gpencil_layer_getactive(gpd);
/* error checking */
if (ELEM(NULL, gpd, gpl))
diff --git a/source/blender/blenkernel/intern/group.c b/source/blender/blenkernel/intern/group.c
index b20a59ed6f8..2fc436ab4de 100644
--- a/source/blender/blenkernel/intern/group.c
+++ b/source/blender/blenkernel/intern/group.c
@@ -1,5 +1,4 @@
-/*
- *
+/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -53,7 +52,7 @@
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_object.h"
-#include "BKE_scene.h" /* object_in_scene */
+#include "BKE_scene.h" /* BKE_scene_base_find */
static void free_group_object(GroupObject *go)
{
@@ -61,97 +60,97 @@ static void free_group_object(GroupObject *go)
}
-void free_group_objects(Group *group)
+void BKE_group_free(Group *group)
{
/* don't free group itself */
GroupObject *go;
while (group->gobject.first) {
- go= group->gobject.first;
+ go = group->gobject.first;
BLI_remlink(&group->gobject, go);
free_group_object(go);
}
}
-void unlink_group(Group *group)
+void BKE_group_unlink(Group *group)
{
- Main *bmain= G.main;
+ Main *bmain = G.main;
Material *ma;
Object *ob;
Scene *sce;
SceneRenderLayer *srl;
ParticleSystem *psys;
- for (ma= bmain->mat.first; ma; ma= ma->id.next) {
- if (ma->group==group)
- ma->group= NULL;
+ for (ma = bmain->mat.first; ma; ma = ma->id.next) {
+ if (ma->group == group)
+ ma->group = NULL;
}
- for (ma= bmain->mat.first; ma; ma= ma->id.next) {
- if (ma->group==group)
- ma->group= NULL;
+ for (ma = bmain->mat.first; ma; ma = ma->id.next) {
+ if (ma->group == group)
+ ma->group = NULL;
}
- for (sce= bmain->scene.first; sce; sce= sce->id.next) {
- Base *base= sce->base.first;
+ for (sce = bmain->scene.first; sce; sce = sce->id.next) {
+ Base *base = sce->base.first;
/* ensure objects are not in this group */
- for (; base; base= base->next) {
- if (rem_from_group(group, base->object, sce, base) && find_group(base->object, NULL)==NULL) {
+ for (; base; base = base->next) {
+ if (rem_from_group(group, base->object, sce, base) && find_group(base->object, NULL) == NULL) {
base->object->flag &= ~OB_FROMGROUP;
base->flag &= ~OB_FROMGROUP;
}
}
- for (srl= sce->r.layers.first; srl; srl= srl->next) {
- if (srl->light_override==group)
- srl->light_override= NULL;
+ for (srl = sce->r.layers.first; srl; srl = srl->next) {
+ if (srl->light_override == group)
+ srl->light_override = NULL;
}
}
- for (ob= bmain->object.first; ob; ob= ob->id.next) {
+ for (ob = bmain->object.first; ob; ob = ob->id.next) {
- if (ob->dup_group==group) {
- ob->dup_group= NULL;
-#if 0 /* XXX OLD ANIMSYS, NLASTRIPS ARE NO LONGER USED */
+ if (ob->dup_group == group) {
+ ob->dup_group = NULL;
+#if 0 /* XXX OLD ANIMSYS, NLASTRIPS ARE NO LONGER USED */
{
bActionStrip *strip;
/* duplicator strips use a group object, we remove it */
- for (strip= ob->nlastrips.first; strip; strip= strip->next) {
+ for (strip = ob->nlastrips.first; strip; strip = strip->next) {
if (strip->object)
- strip->object= NULL;
+ strip->object = NULL;
}
}
#endif
}
- for (psys=ob->particlesystem.first; psys; psys=psys->next) {
- if (psys->part->dup_group==group)
- psys->part->dup_group= NULL;
-#if 0 /* not used anymore, only keps for readfile.c, no need to account for this */
- if (psys->part->eff_group==group)
- psys->part->eff_group= NULL;
+ for (psys = ob->particlesystem.first; psys; psys = psys->next) {
+ if (psys->part->dup_group == group)
+ psys->part->dup_group = NULL;
+#if 0 /* not used anymore, only keps for readfile.c, no need to account for this */
+ if (psys->part->eff_group == group)
+ psys->part->eff_group = NULL;
#endif
}
}
/* group stays in library, but no members */
- free_group_objects(group);
- group->id.us= 0;
+ BKE_group_free(group);
+ group->id.us = 0;
}
Group *add_group(const char *name)
{
Group *group;
- group = alloc_libblock(&G.main->group, ID_GR, name);
- group->layer= (1<<20)-1;
+ group = BKE_libblock_alloc(&G.main->group, ID_GR, name);
+ group->layer = (1 << 20) - 1;
return group;
}
-Group *copy_group(Group *group)
+Group *BKE_group_copy(Group *group)
{
Group *groupn;
- groupn= MEM_dupallocN(group);
+ groupn = MEM_dupallocN(group);
BLI_duplicatelist(&groupn->gobject, &group->gobject);
return groupn;
@@ -162,17 +161,17 @@ static int add_to_group_internal(Group *group, Object *ob)
{
GroupObject *go;
- if (group==NULL || ob==NULL) return 0;
+ if (group == NULL || ob == NULL) return 0;
/* check if the object has been added already */
- for (go= group->gobject.first; go; go= go->next) {
- if (go->ob==ob) return 0;
+ for (go = group->gobject.first; go; go = go->next) {
+ if (go->ob == ob) return 0;
}
- go= MEM_callocN(sizeof(GroupObject), "groupobject");
- BLI_addtail( &group->gobject, go);
+ go = MEM_callocN(sizeof(GroupObject), "groupobject");
+ BLI_addtail(&group->gobject, go);
- go->ob= ob;
+ go->ob = ob;
return 1;
}
@@ -180,10 +179,10 @@ static int add_to_group_internal(Group *group, Object *ob)
int add_to_group(Group *group, Object *object, Scene *scene, Base *base)
{
if (add_to_group_internal(group, object)) {
- if ((object->flag & OB_FROMGROUP)==0) {
+ if ((object->flag & OB_FROMGROUP) == 0) {
- if (scene && base==NULL)
- base= object_in_scene(object, scene);
+ if (scene && base == NULL)
+ base = BKE_scene_base_find(scene, object);
object->flag |= OB_FROMGROUP;
@@ -202,18 +201,18 @@ static int rem_from_group_internal(Group *group, Object *ob)
{
GroupObject *go, *gon;
int removed = 0;
- if (group==NULL) return 0;
+ if (group == NULL) return 0;
- go= group->gobject.first;
+ go = group->gobject.first;
while (go) {
- gon= go->next;
- if (go->ob==ob) {
+ gon = go->next;
+ if (go->ob == ob) {
BLI_remlink(&group->gobject, go);
free_group_object(go);
removed = 1;
/* should break here since an object being in a group twice cant happen? */
}
- go= gon;
+ go = gon;
}
return removed;
}
@@ -223,8 +222,8 @@ int rem_from_group(Group *group, Object *object, Scene *scene, Base *base)
if (rem_from_group_internal(group, object)) {
/* object can be NULL */
if (object && find_group(object, NULL) == NULL) {
- if (scene && base==NULL)
- base= object_in_scene(object, scene);
+ if (scene && base == NULL)
+ base = BKE_scene_base_find(scene, object);
object->flag &= ~OB_FROMGROUP;
@@ -242,10 +241,10 @@ int object_in_group(Object *ob, Group *group)
{
GroupObject *go;
- if (group==NULL || ob==NULL) return 0;
+ if (group == NULL || ob == NULL) return 0;
- for (go= group->gobject.first; go; go= go->next) {
- if (go->ob==ob)
+ for (go = group->gobject.first; go; go = go->next) {
+ if (go->ob == ob)
return 1;
}
return 0;
@@ -254,14 +253,14 @@ int object_in_group(Object *ob, Group *group)
Group *find_group(Object *ob, Group *group)
{
if (group)
- group= group->id.next;
+ group = group->id.next;
else
- group= G.main->group.first;
+ group = G.main->group.first;
while (group) {
if (object_in_group(ob, group))
return group;
- group= group->id.next;
+ group = group->id.next;
}
return NULL;
}
@@ -270,11 +269,11 @@ void group_tag_recalc(Group *group)
{
GroupObject *go;
- if (group==NULL) return;
+ if (group == NULL) return;
- for (go= group->gobject.first; go; go= go->next) {
+ for (go = group->gobject.first; go; go = go->next) {
if (go->ob)
- go->ob->recalc= go->recalc;
+ go->ob->recalc = go->recalc;
}
}
@@ -287,7 +286,7 @@ int group_is_animated(Object *UNUSED(parent), Group *group)
return 1;
#endif
- for (go= group->gobject.first; go; go= go->next)
+ for (go = group->gobject.first; go; go = go->next)
if (go->ob && go->ob->proxy)
return 1;
@@ -299,38 +298,38 @@ int group_is_animated(Object *UNUSED(parent), Group *group)
/* keep checking nla.c though, in case internal structure of strip changes */
static void group_replaces_nla(Object *parent, Object *target, char mode)
{
- static ListBase nlastrips={NULL, NULL};
- static bAction *action= NULL;
- static int done= 0;
+ static ListBase nlastrips = {NULL, NULL};
+ static bAction *action = NULL;
+ static int done = 0;
bActionStrip *strip, *nstrip;
- if (mode=='s') {
+ if (mode == 's') {
- for (strip= parent->nlastrips.first; strip; strip= strip->next) {
- if (strip->object==target) {
- if (done==0) {
+ for (strip = parent->nlastrips.first; strip; strip = strip->next) {
+ if (strip->object == target) {
+ if (done == 0) {
/* clear nla & action from object */
- nlastrips= target->nlastrips;
- target->nlastrips.first= target->nlastrips.last= NULL;
- action= target->action;
- target->action= NULL;
+ nlastrips = target->nlastrips;
+ target->nlastrips.first = target->nlastrips.last = NULL;
+ action = target->action;
+ target->action = NULL;
target->nlaflag |= OB_NLA_OVERRIDE;
- done= 1;
+ done = 1;
}
- nstrip= MEM_dupallocN(strip);
+ nstrip = MEM_dupallocN(strip);
BLI_addtail(&target->nlastrips, nstrip);
}
}
}
- else if (mode=='e') {
+ else if (mode == 'e') {
if (done) {
BLI_freelistN(&target->nlastrips);
- target->nlastrips= nlastrips;
- target->action= action;
+ target->nlastrips = nlastrips;
+ target->action = action;
- nlastrips.first= nlastrips.last= NULL; /* not needed, but yah... :) */
- action= NULL;
- done= 0;
+ nlastrips.first = nlastrips.last = NULL; /* not needed, but yah... :) */
+ action = NULL;
+ done = 0;
}
}
}
@@ -354,33 +353,33 @@ void group_handle_recalc_and_update(Scene *scene, Object *UNUSED(parent), Group
int cfrao;
/* switch to local time */
- cfrao= scene->r.cfra;
+ cfrao = scene->r.cfra;
/* we need a DAG per group... */
- for (go= group->gobject.first; go; go= go->next) {
+ for (go = group->gobject.first; go; go = go->next) {
if (go->ob && go->recalc) {
- go->ob->recalc= go->recalc;
+ go->ob->recalc = go->recalc;
group_replaces_nla(parent, go->ob, 's');
- object_handle_update(scene, go->ob);
+ BKE_object_handle_update(scene, go->ob);
group_replaces_nla(parent, go->ob, 'e');
/* leave recalc tags in case group members are in normal scene */
- go->ob->recalc= go->recalc;
+ go->ob->recalc = go->recalc;
}
}
/* restore */
- scene->r.cfra= cfrao;
+ scene->r.cfra = cfrao;
}
else
#endif
{
/* only do existing tags, as set by regular depsgraph */
- for (go= group->gobject.first; go; go= go->next) {
+ for (go = group->gobject.first; go; go = go->next) {
if (go->ob) {
if (go->ob->recalc) {
- object_handle_update(scene, go->ob);
+ BKE_object_handle_update(scene, go->ob);
}
}
}
@@ -392,17 +391,17 @@ Object *group_get_member_with_action(Group *group, bAction *act)
{
GroupObject *go;
- if (group==NULL || act==NULL) return NULL;
+ if (group == NULL || act == NULL) return NULL;
- for (go= group->gobject.first; go; go= go->next) {
+ for (go = group->gobject.first; go; go = go->next) {
if (go->ob) {
- if (go->ob->action==act)
+ if (go->ob->action == act)
return go->ob;
if (go->ob->nlastrips.first) {
bActionStrip *strip;
- for (strip= go->ob->nlastrips.first; strip; strip= strip->next) {
- if (strip->act==act)
+ for (strip = go->ob->nlastrips.first; strip; strip = strip->next) {
+ if (strip->act == act)
return go->ob;
}
}
@@ -419,21 +418,21 @@ void group_relink_nla_objects(Object *ob)
GroupObject *go;
bActionStrip *strip;
- if (ob==NULL || ob->dup_group==NULL) return;
- group= ob->dup_group;
+ if (ob == NULL || ob->dup_group == NULL) return;
+ group = ob->dup_group;
- for (strip= ob->nlastrips.first; strip; strip= strip->next) {
+ for (strip = ob->nlastrips.first; strip; strip = strip->next) {
if (strip->object) {
- for (go= group->gobject.first; go; go= go->next) {
+ for (go = group->gobject.first; go; go = go->next) {
if (go->ob) {
- if (strcmp(go->ob->id.name, strip->object->id.name)==0)
+ if (strcmp(go->ob->id.name, strip->object->id.name) == 0)
break;
}
}
if (go)
- strip->object= go->ob;
+ strip->object = go->ob;
else
- strip->object= NULL;
+ strip->object = NULL;
}
}
diff --git a/source/blender/blenkernel/intern/idcode.c b/source/blender/blenkernel/intern/idcode.c
index b52576ec465..cd246681f3c 100644
--- a/source/blender/blenkernel/intern/idcode.c
+++ b/source/blender/blenkernel/intern/idcode.c
@@ -53,7 +53,7 @@ static IDType idtypes[]= {
{ ID_BR, "Brush", "brushes", IDTYPE_FLAGS_ISLINKABLE},
{ ID_CA, "Camera", "cameras", IDTYPE_FLAGS_ISLINKABLE},
{ ID_CU, "Curve", "curves", IDTYPE_FLAGS_ISLINKABLE},
- { ID_GD, "GPencil", "grease_pencil",IDTYPE_FLAGS_ISLINKABLE}, /* rename gpencil */
+ { ID_GD, "GPencil", "grease_pencil", IDTYPE_FLAGS_ISLINKABLE}, /* rename gpencil */
{ ID_GR, "Group", "groups", IDTYPE_FLAGS_ISLINKABLE},
{ ID_ID, "ID", "ids", 0}, /* plural is fake */
{ ID_IM, "Image", "images", IDTYPE_FLAGS_ISLINKABLE},
diff --git a/source/blender/blenkernel/intern/idprop.c b/source/blender/blenkernel/intern/idprop.c
index 1fee5cfa359..e3735cfd374 100644
--- a/source/blender/blenkernel/intern/idprop.c
+++ b/source/blender/blenkernel/intern/idprop.c
@@ -47,16 +47,16 @@ static char idp_size_table[] = {
1, /*strings*/
sizeof(int),
sizeof(float),
- sizeof(float)*3, /*Vector type, deprecated*/
- sizeof(float)*16, /*Matrix type, deprecated*/
+ sizeof(float) * 3, /*Vector type, deprecated*/
+ sizeof(float) * 16, /*Matrix type, deprecated*/
0, /*arrays don't have a fixed size*/
sizeof(ListBase), /*Group type*/
- sizeof(void*),
+ sizeof(void *),
sizeof(double)
};
/* ------------Property Array Type ----------- */
-#define GETPROP(prop, i) (((IDProperty*)(prop)->data.pointer)+(i))
+#define GETPROP(prop, i) (((IDProperty *)(prop)->data.pointer) + (i))
/* --------- property array type -------------*/
@@ -78,10 +78,10 @@ IDProperty *IDP_CopyIDPArray(IDProperty *array)
IDProperty *narray = MEM_mallocN(sizeof(IDProperty), "IDP_CopyIDPArray"), *tmp;
int i;
- *narray= *array;
+ *narray = *array;
narray->data.pointer = MEM_dupallocN(array->data.pointer);
- for (i=0; i<narray->len; i++) {
+ for (i = 0; i < narray->len; i++) {
/* ok, the copy functions always allocate a new structure,
* which doesn't work here. instead, simply copy the
* contents of the new structure into the array cell,
@@ -100,7 +100,7 @@ void IDP_FreeIDPArray(IDProperty *prop)
{
int i;
- for (i=0; i<prop->len; i++)
+ for (i = 0; i < prop->len; i++)
IDP_FreeProperty(GETPROP(prop, i));
if (prop->data.pointer)
@@ -124,22 +124,22 @@ IDProperty *IDP_GetIndexArray(IDProperty *prop, int index)
IDProperty *IDP_AppendArray(IDProperty *prop, IDProperty *item)
{
- IDP_ResizeIDPArray(prop, prop->len+1);
- IDP_SetIndexArray(prop, prop->len-1, item);
+ IDP_ResizeIDPArray(prop, prop->len + 1);
+ IDP_SetIndexArray(prop, prop->len - 1, item);
return item;
}
void IDP_ResizeIDPArray(IDProperty *prop, int newlen)
{
void *newarr;
- int newsize=newlen;
+ int newsize = newlen;
/*first check if the array buffer size has room*/
/*if newlen is 200 chars less then totallen, reallocate anyway*/
if (newlen <= prop->totallen && prop->totallen - newlen < 200) {
int i;
- for (i=newlen; i<prop->len; i++)
+ for (i = newlen; i < prop->len; i++)
IDP_FreeProperty(GETPROP(prop, i));
prop->len = newlen;
@@ -156,18 +156,18 @@ void IDP_ResizeIDPArray(IDProperty *prop, int newlen)
*/
newsize = (newsize >> 3) + (newsize < 9 ? 3 : 6) + newsize;
- newarr = MEM_callocN(sizeof(IDProperty)*newsize, "idproperty array resized");
+ newarr = MEM_callocN(sizeof(IDProperty) * newsize, "idproperty array resized");
if (newlen >= prop->len) {
/* newlen is bigger*/
- memcpy(newarr, prop->data.pointer, prop->len*sizeof(IDProperty));
+ memcpy(newarr, prop->data.pointer, prop->len * sizeof(IDProperty));
}
else {
int i;
/* newlen is smaller*/
- for (i=newlen; i<prop->len; i++) {
+ for (i = newlen; i < prop->len; i++) {
IDP_FreeProperty(GETPROP(prop, i));
}
- memcpy(newarr, prop->data.pointer, newlen*sizeof(IDProperty));
+ memcpy(newarr, prop->data.pointer, newlen * sizeof(IDProperty));
}
if (prop->data.pointer)
@@ -185,21 +185,21 @@ static void idp_resize_group_array(IDProperty *prop, int newlen, void *newarr)
if (newlen >= prop->len) {
/* bigger */
- IDProperty **array= newarr;
+ IDProperty **array = newarr;
IDPropertyTemplate val;
int a;
- for (a=prop->len; a<newlen; a++) {
+ for (a = prop->len; a < newlen; a++) {
val.i = 0; /* silence MSVC warning about uninitialized var when debugging */
- array[a]= IDP_New(IDP_GROUP, &val, "IDP_ResizeArray group");
+ array[a] = IDP_New(IDP_GROUP, &val, "IDP_ResizeArray group");
}
}
else {
/* smaller */
- IDProperty **array= prop->data.pointer;
+ IDProperty **array = prop->data.pointer;
int a;
- for (a=newlen; a<prop->len; a++) {
+ for (a = newlen; a < prop->len; a++) {
IDP_FreeProperty(array[a]);
MEM_freeN(array[a]);
}
@@ -210,7 +210,7 @@ static void idp_resize_group_array(IDProperty *prop, int newlen, void *newarr)
void IDP_ResizeArray(IDProperty *prop, int newlen)
{
void *newarr;
- int newsize=newlen;
+ int newsize = newlen;
/*first check if the array buffer size has room*/
/*if newlen is 200 chars less then totallen, reallocate anyway*/
@@ -230,16 +230,16 @@ void IDP_ResizeArray(IDProperty *prop, int newlen)
*/
newsize = (newsize >> 3) + (newsize < 9 ? 3 : 6) + newsize;
- newarr = MEM_callocN(idp_size_table[(int)prop->subtype]*newsize, "idproperty array resized");
+ newarr = MEM_callocN(idp_size_table[(int)prop->subtype] * newsize, "idproperty array resized");
if (newlen >= prop->len) {
/* newlen is bigger*/
- memcpy(newarr, prop->data.pointer, prop->len*idp_size_table[(int)prop->subtype]);
+ memcpy(newarr, prop->data.pointer, prop->len * idp_size_table[(int)prop->subtype]);
idp_resize_group_array(prop, newlen, newarr);
}
else {
/* newlen is smaller*/
idp_resize_group_array(prop, newlen, newarr);
- memcpy(newarr, prop->data.pointer, newlen*idp_size_table[(int)prop->subtype]);
+ memcpy(newarr, prop->data.pointer, newlen * idp_size_table[(int)prop->subtype]);
}
MEM_freeN(prop->data.pointer);
@@ -257,8 +257,8 @@ void IDP_FreeArray(IDProperty *prop)
}
- static IDProperty *idp_generic_copy(IDProperty *prop)
- {
+static IDProperty *idp_generic_copy(IDProperty *prop)
+{
IDProperty *newp = MEM_callocN(sizeof(IDProperty), "IDProperty array dup");
BLI_strncpy(newp->name, prop->name, MAX_IDPROP_NAME);
@@ -268,7 +268,7 @@ void IDP_FreeArray(IDProperty *prop)
newp->data.val2 = prop->data.val2;
return newp;
- }
+}
static IDProperty *IDP_CopyArray(IDProperty *prop)
{
@@ -278,11 +278,11 @@ static IDProperty *IDP_CopyArray(IDProperty *prop)
newp->data.pointer = MEM_dupallocN(prop->data.pointer);
if (prop->type == IDP_GROUP) {
- IDProperty **array= newp->data.pointer;
+ IDProperty **array = newp->data.pointer;
int a;
- for (a=0; a<prop->len; a++)
- array[a]= IDP_CopyProperty(array[a]);
+ for (a = 0; a < prop->len; a++)
+ array[a] = IDP_CopyProperty(array[a]);
}
}
newp->len = prop->len;
@@ -294,12 +294,12 @@ static IDProperty *IDP_CopyArray(IDProperty *prop)
/*taken from readfile.c*/
#define SWITCH_LONGINT(a) { \
- char s_i, *p_i; \
- p_i= (char *)&(a); \
- s_i=p_i[0]; p_i[0]=p_i[7]; p_i[7]=s_i; \
- s_i=p_i[1]; p_i[1]=p_i[6]; p_i[6]=s_i; \
- s_i=p_i[2]; p_i[2]=p_i[5]; p_i[5]=s_i; \
- s_i=p_i[3]; p_i[3]=p_i[4]; p_i[4]=s_i; }
+ char s_i, *p_i; \
+ p_i = (char *)& (a); \
+ s_i = p_i[0]; p_i[0] = p_i[7]; p_i[7] = s_i; \
+ s_i = p_i[1]; p_i[1] = p_i[6]; p_i[6] = s_i; \
+ s_i = p_i[2]; p_i[2] = p_i[5]; p_i[5] = s_i; \
+ s_i = p_i[3]; p_i[3] = p_i[4]; p_i[4] = s_i; }
@@ -350,7 +350,7 @@ void IDP_AssignString(IDProperty *prop, const char *st, int maxlen)
int stlen = strlen(st);
if (maxlen > 0 && maxlen < stlen)
- stlen= maxlen;
+ stlen = maxlen;
if (prop->subtype == IDP_STRING_SUB_BYTE) {
IDP_ResizeArray(prop, stlen);
@@ -396,14 +396,14 @@ void IDP_FreeString(IDProperty *prop)
void IDP_LinkID(IDProperty *prop, ID *id)
{
- if (prop->data.pointer) ((ID*)prop->data.pointer)->us--;
+ if (prop->data.pointer) ((ID *)prop->data.pointer)->us--;
prop->data.pointer = id;
id_us_plus(id);
}
void IDP_UnlinkID(IDProperty *prop)
{
- ((ID*)prop->data.pointer)->us--;
+ ((ID *)prop->data.pointer)->us--;
}
/*-------- Group Functions -------*/
@@ -414,7 +414,7 @@ static IDProperty *IDP_CopyGroup(IDProperty *prop)
IDProperty *newp = idp_generic_copy(prop), *link;
newp->len = prop->len;
- for (link=prop->data.group.first; link; link=link->next) {
+ for (link = prop->data.group.first; link; link = link->next) {
BLI_addtail(&newp->data.group, IDP_CopyProperty(link));
}
@@ -426,22 +426,22 @@ static IDProperty *IDP_CopyGroup(IDProperty *prop)
void IDP_SyncGroupValues(IDProperty *dest, IDProperty *src)
{
IDProperty *other, *prop;
- for (prop=src->data.group.first; prop; prop=prop->next) {
- other= BLI_findstring(&dest->data.group, prop->name, offsetof(IDProperty, name));
- if (other && prop->type==other->type) {
+ for (prop = src->data.group.first; prop; prop = prop->next) {
+ other = BLI_findstring(&dest->data.group, prop->name, offsetof(IDProperty, name));
+ if (other && prop->type == other->type) {
switch (prop->type) {
case IDP_INT:
case IDP_FLOAT:
case IDP_DOUBLE:
- other->data= prop->data;
+ other->data = prop->data;
break;
case IDP_GROUP:
IDP_SyncGroupValues(other, prop);
break;
default:
{
- IDProperty *tmp= other;
- IDProperty *copy= IDP_CopyProperty(prop);
+ IDProperty *tmp = other;
+ IDProperty *copy = IDP_CopyProperty(prop);
BLI_insertlinkafter(&dest->data.group, other, copy);
BLI_remlink(&dest->data.group, tmp);
@@ -460,8 +460,8 @@ void IDP_SyncGroupValues(IDProperty *dest, IDProperty *src)
void IDP_ReplaceGroupInGroup(IDProperty *dest, IDProperty *src)
{
IDProperty *loop, *prop;
- for (prop=src->data.group.first; prop; prop=prop->next) {
- for (loop=dest->data.group.first; loop; loop=loop->next) {
+ for (prop = src->data.group.first; prop; prop = prop->next) {
+ for (loop = dest->data.group.first; loop; loop = loop->next) {
if (strcmp(loop->name, prop->name) == 0) {
IDProperty *copy = IDP_CopyProperty(prop);
@@ -484,12 +484,12 @@ void IDP_ReplaceGroupInGroup(IDProperty *dest, IDProperty *src)
}
/*
* replaces a property with the same name in a group, or adds
- * it if the propery doesn't exist.
+ * it if the properly doesn't exist.
*/
void IDP_ReplaceInGroup(IDProperty *group, IDProperty *prop)
{
IDProperty *loop;
- if ((loop= IDP_GetPropertyFromGroup(group, prop->name))) {
+ if ((loop = IDP_GetPropertyFromGroup(group, prop->name))) {
BLI_insertlink(&group->data.group, loop, prop);
BLI_remlink(&group->data.group, loop);
@@ -539,7 +539,7 @@ IDProperty *IDP_GetPropertyFromGroup(IDProperty *prop, const char *name)
IDProperty *IDP_GetPropertyTypeFromGroup(IDProperty *prop, const char *name, const char type)
{
- IDProperty *idprop= IDP_GetPropertyFromGroup(prop, name);
+ IDProperty *idprop = IDP_GetPropertyFromGroup(prop, name);
return (idprop && idprop->type == type) ? idprop : NULL;
}
@@ -553,20 +553,20 @@ void *IDP_GetGroupIterator(IDProperty *prop)
IDPIter *iter = MEM_callocN(sizeof(IDPIter), "IDPIter");
iter->next = prop->data.group.first;
iter->parent = prop;
- return (void*) iter;
+ return (void *) iter;
}
IDProperty *IDP_GroupIterNext(void *vself)
{
- IDPIter *self = (IDPIter*) vself;
- Link *next = (Link*) self->next;
+ IDPIter *self = (IDPIter *) vself;
+ Link *next = (Link *) self->next;
if (self->next == NULL) {
MEM_freeN(self);
return NULL;
}
self->next = next->next;
- return (void*) next;
+ return (void *) next;
}
void IDP_FreeIterBeforeEnd(void *vself)
@@ -581,8 +581,7 @@ void IDP_FreeIterBeforeEnd(void *vself)
static void IDP_FreeGroup(IDProperty *prop)
{
IDProperty *loop;
- for (loop=prop->data.group.first; loop; loop=loop->next)
- {
+ for (loop = prop->data.group.first; loop; loop = loop->next) {
IDP_FreeProperty(loop);
}
BLI_freelistN(&prop->data.group);
@@ -636,7 +635,7 @@ int IDP_EqualsProperties(IDProperty *prop1, IDProperty *prop2)
return ((prop1->len == prop2->len) && strncmp(IDP_String(prop1), IDP_String(prop2), prop1->len) == 0);
else if (prop1->type == IDP_ARRAY) {
if (prop1->len == prop2->len && prop1->subtype == prop2->subtype)
- return memcmp(IDP_Array(prop1), IDP_Array(prop2), idp_size_table[(int)prop1->subtype]*prop1->len);
+ return memcmp(IDP_Array(prop1), IDP_Array(prop2), idp_size_table[(int)prop1->subtype] * prop1->len);
else
return 0;
}
@@ -646,8 +645,8 @@ int IDP_EqualsProperties(IDProperty *prop1, IDProperty *prop2)
if (BLI_countlist(&prop1->data.group) != BLI_countlist(&prop2->data.group))
return 0;
- for (link1=prop1->data.group.first; link1; link1=link1->next) {
- link2= IDP_GetPropertyFromGroup(prop2, link1->name);
+ for (link1 = prop1->data.group.first; link1; link1 = link1->next) {
+ link2 = IDP_GetPropertyFromGroup(prop2, link1->name);
if (!IDP_EqualsProperties(link1, link2))
return 0;
@@ -656,14 +655,14 @@ int IDP_EqualsProperties(IDProperty *prop1, IDProperty *prop2)
return 1;
}
else if (prop1->type == IDP_IDPARRAY) {
- IDProperty *array1= IDP_IDPArray(prop1);
- IDProperty *array2= IDP_IDPArray(prop2);
+ IDProperty *array1 = IDP_IDPArray(prop1);
+ IDProperty *array2 = IDP_IDPArray(prop2);
int i;
if (prop1->len != prop2->len)
return 0;
- for (i=0; i<prop1->len; i++)
+ for (i = 0; i < prop1->len; i++)
if (!IDP_EqualsProperties(&array1[i], &array2[i]))
return 0;
}
@@ -674,7 +673,7 @@ int IDP_EqualsProperties(IDProperty *prop1, IDProperty *prop2)
/* 'val' is never NULL, don't check */
IDProperty *IDP_New(const int type, const IDPropertyTemplate *val, const char *name)
{
- IDProperty *prop=NULL;
+ IDProperty *prop = NULL;
switch (type) {
case IDP_INT:
@@ -683,11 +682,11 @@ IDProperty *IDP_New(const int type, const IDPropertyTemplate *val, const char *n
break;
case IDP_FLOAT:
prop = MEM_callocN(sizeof(IDProperty), "IDProperty float");
- *(float*)&prop->data.val = val->f;
+ *(float *)&prop->data.val = val->f;
break;
case IDP_DOUBLE:
prop = MEM_callocN(sizeof(IDProperty), "IDProperty float");
- *(double*)&prop->data.val = val->d;
+ *(double *)&prop->data.val = val->d;
break;
case IDP_ARRAY:
{
@@ -700,7 +699,7 @@ IDProperty *IDP_New(const int type, const IDPropertyTemplate *val, const char *n
prop = MEM_callocN(sizeof(IDProperty), "IDProperty array");
prop->subtype = val->array.type;
if (val->array.len)
- prop->data.pointer = MEM_callocN(idp_size_table[val->array.type]*val->array.len, "id property array");
+ prop->data.pointer = MEM_callocN(idp_size_table[val->array.type] * val->array.len, "id property array");
prop->len = prop->totallen = val->array.len;
break;
}
@@ -725,7 +724,7 @@ IDProperty *IDP_New(const int type, const IDPropertyTemplate *val, const char *n
prop->len = prop->totallen = val->string.len;
memcpy(prop->data.pointer, st, val->string.len);
}
- prop->subtype= IDP_STRING_SUB_BYTE;
+ prop->subtype = IDP_STRING_SUB_BYTE;
}
else {
if (st == NULL) {
@@ -739,7 +738,7 @@ IDProperty *IDP_New(const int type, const IDPropertyTemplate *val, const char *n
prop->len = prop->totallen = stlen;
memcpy(prop->data.pointer, st, stlen);
}
- prop->subtype= IDP_STRING_SUB_UTF8;
+ prop->subtype = IDP_STRING_SUB_UTF8;
}
break;
}
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 6e0330f5316..aff1e65224b 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -92,18 +92,18 @@
#include "BLO_sys_types.h" // for intptr_t support
/* max int, to indicate we don't store sequences in ibuf */
-#define IMA_NO_INDEX 0x7FEFEFEF
+#define IMA_NO_INDEX 0x7FEFEFEF
/* quick lookup: supports 1 million frames, thousand passes */
-#define IMA_MAKE_INDEX(frame, index) ((frame)<<10)+index
-#define IMA_INDEX_FRAME(index) (index>>10)
-#define IMA_INDEX_PASS(index) (index & ~1023)
+#define IMA_MAKE_INDEX(frame, index) ((frame) << 10) + index
+#define IMA_INDEX_FRAME(index) (index >> 10)
+#define IMA_INDEX_PASS(index) (index & ~1023)
/* ******** IMAGE PROCESSING ************* */
-static void de_interlace_ng(struct ImBuf *ibuf) /* neogeo fields */
+static void de_interlace_ng(struct ImBuf *ibuf) /* neogeo fields */
{
- struct ImBuf * tbuf1, * tbuf2;
+ struct ImBuf *tbuf1, *tbuf2;
if (ibuf == NULL) return;
if (ibuf->flags & IB_fields) return;
@@ -129,9 +129,9 @@ static void de_interlace_ng(struct ImBuf *ibuf) /* neogeo fields */
ibuf->y /= 2;
}
-static void de_interlace_st(struct ImBuf *ibuf) /* standard fields */
+static void de_interlace_st(struct ImBuf *ibuf) /* standard fields */
{
- struct ImBuf * tbuf1, * tbuf2;
+ struct ImBuf *tbuf1, *tbuf2;
if (ibuf == NULL) return;
if (ibuf->flags & IB_fields) return;
@@ -157,9 +157,9 @@ static void de_interlace_st(struct ImBuf *ibuf) /* standard fields */
ibuf->y /= 2;
}
-void image_de_interlace(Image *ima, int odd)
+void BKE_image_de_interlace(Image *ima, int odd)
{
- ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL);
+ ImBuf *ibuf = BKE_image_get_ibuf(ima, NULL);
if (ibuf) {
if (odd)
de_interlace_st(ibuf);
@@ -185,20 +185,20 @@ static void image_free_buffers(Image *ima)
}
if (ima->anim) IMB_free_anim(ima->anim);
- ima->anim= NULL;
+ ima->anim = NULL;
if (ima->rr) {
RE_FreeRenderResult(ima->rr);
- ima->rr= NULL;
+ ima->rr = NULL;
}
GPU_free_image(ima);
- ima->ok= IMA_OK;
+ ima->ok = IMA_OK;
}
/* called by library too, do not free ima itself */
-void free_image(Image *ima)
+void BKE_image_free(Image *ima)
{
int a;
@@ -212,10 +212,10 @@ void free_image(Image *ima)
BKE_previewimg_free(&ima->preview);
- for (a=0; a<IMA_MAX_RENDER_SLOT; a++) {
+ for (a = 0; a < IMA_MAX_RENDER_SLOT; a++) {
if (ima->renders[a]) {
RE_FreeRenderResult(ima->renders[a]);
- ima->renders[a]= NULL;
+ ima->renders[a] = NULL;
}
}
}
@@ -225,17 +225,17 @@ static Image *image_alloc(const char *name, short source, short type)
{
Image *ima;
- ima= alloc_libblock(&G.main->image, ID_IM, name);
+ ima = BKE_libblock_alloc(&G.main->image, ID_IM, name);
if (ima) {
- ima->ok= IMA_OK;
+ ima->ok = IMA_OK;
- ima->xrep= ima->yrep= 1;
- ima->aspx= ima->aspy= 1.0;
- ima->gen_x= 1024; ima->gen_y= 1024;
- ima->gen_type= 1; /* no defines yet? */
+ ima->xrep = ima->yrep = 1;
+ ima->aspx = ima->aspy = 1.0;
+ ima->gen_x = 1024; ima->gen_y = 1024;
+ ima->gen_type = 1; /* no defines yet? */
- ima->source= source;
- ima->type= type;
+ ima->source = source;
+ ima->type = type;
}
return ima;
}
@@ -246,14 +246,14 @@ static ImBuf *image_get_ibuf(Image *ima, int index, int frame)
/* this function is intended to be thread safe. with IMA_NO_INDEX this
* should be OK, but when iterating over the list this is more tricky
* */
- if (index==IMA_NO_INDEX)
+ if (index == IMA_NO_INDEX)
return ima->ibufs.first;
else {
ImBuf *ibuf;
- index= IMA_MAKE_INDEX(frame, index);
- for (ibuf= ima->ibufs.first; ibuf; ibuf= ibuf->next)
- if (ibuf->index==index)
+ index = IMA_MAKE_INDEX(frame, index);
+ for (ibuf = ima->ibufs.first; ibuf; ibuf = ibuf->next)
+ if (ibuf->index == index)
return ibuf;
return NULL;
@@ -276,15 +276,15 @@ static void image_assign_ibuf(Image *ima, ImBuf *ibuf, int index, int frame)
if (ibuf) {
ImBuf *link;
- if (index!=IMA_NO_INDEX)
- index= IMA_MAKE_INDEX(frame, index);
+ if (index != IMA_NO_INDEX)
+ index = IMA_MAKE_INDEX(frame, index);
/* insert based on index */
- for (link= ima->ibufs.first; link; link= link->next)
- if (link->index>=index)
+ for (link = ima->ibufs.first; link; link = link->next)
+ if (link->index >= index)
break;
- ibuf->index= index;
+ ibuf->index = index;
if (ima->flag & IMA_CM_PREDIVIDE)
ibuf->flags |= IB_cm_predivide;
else
@@ -294,29 +294,29 @@ static void image_assign_ibuf(Image *ima, ImBuf *ibuf, int index, int frame)
BLI_insertlinkbefore(&ima->ibufs, link, ibuf);
/* now we don't want copies? */
- if (link && ibuf->index==link->index)
+ if (link && ibuf->index == link->index)
image_remove_ibuf(ima, link);
}
}
/* empty image block, of similar type and filename */
-Image *copy_image(Image *ima)
+Image *BKE_image_copy(Image *ima)
{
- Image *nima= image_alloc(ima->id.name+2, ima->source, ima->type);
+ Image *nima = image_alloc(ima->id.name + 2, ima->source, ima->type);
BLI_strncpy(nima->name, ima->name, sizeof(ima->name));
- nima->flag= ima->flag;
- nima->tpageflag= ima->tpageflag;
+ nima->flag = ima->flag;
+ nima->tpageflag = ima->tpageflag;
- nima->gen_x= ima->gen_x;
- nima->gen_y= ima->gen_y;
- nima->gen_type= ima->gen_type;
+ nima->gen_x = ima->gen_x;
+ nima->gen_y = ima->gen_y;
+ nima->gen_type = ima->gen_type;
- nima->animspeed= ima->animspeed;
+ nima->animspeed = ima->animspeed;
- nima->aspx= ima->aspx;
- nima->aspy= ima->aspy;
+ nima->aspx = ima->aspx;
+ nima->aspy = ima->aspy;
return nima;
}
@@ -327,56 +327,56 @@ static void extern_local_image(Image *UNUSED(ima))
* match id_make_local pattern. */
}
-void make_local_image(struct Image *ima)
+void BKE_image_make_local(struct Image *ima)
{
- Main *bmain= G.main;
+ Main *bmain = G.main;
Tex *tex;
Brush *brush;
Mesh *me;
- int is_local= FALSE, is_lib= FALSE;
+ int is_local = FALSE, is_lib = FALSE;
/* - only lib users: do nothing
* - only local users: set flag
* - mixed: make copy
*/
- if (ima->id.lib==NULL) return;
+ if (ima->id.lib == NULL) return;
/* Can't take short cut here: must check meshes at least because of bogus
* texface ID refs. - z0r */
#if 0
- if (ima->id.us==1) {
+ if (ima->id.us == 1) {
id_clear_lib_data(bmain, &ima->id);
extern_local_image(ima);
return;
}
#endif
- for (tex= bmain->tex.first; tex; tex= tex->id.next) {
+ for (tex = bmain->tex.first; tex; tex = tex->id.next) {
if (tex->ima == ima) {
- if (tex->id.lib) is_lib= TRUE;
- else is_local= TRUE;
+ if (tex->id.lib) is_lib = TRUE;
+ else is_local = TRUE;
}
}
- for (brush= bmain->brush.first; brush; brush= brush->id.next) {
+ for (brush = bmain->brush.first; brush; brush = brush->id.next) {
if (brush->clone.image == ima) {
- if (brush->id.lib) is_lib= TRUE;
- else is_local= TRUE;
+ if (brush->id.lib) is_lib = TRUE;
+ else is_local = TRUE;
}
}
- for (me= bmain->mesh.first; me; me= me->id.next) {
+ for (me = bmain->mesh.first; me; me = me->id.next) {
if (me->mtface) {
MTFace *tface;
int a, i;
- for (i=0; i<me->fdata.totlayer; i++) {
+ for (i = 0; i < me->fdata.totlayer; i++) {
if (me->fdata.layers[i].type == CD_MTFACE) {
- tface= (MTFace*)me->fdata.layers[i].data;
+ tface = (MTFace *)me->fdata.layers[i].data;
- for (a=0; a<me->totface; a++, tface++) {
+ for (a = 0; a < me->totface; a++, tface++) {
if (tface->tpage == ima) {
- if (me->id.lib) is_lib= TRUE;
- else is_local= TRUE;
+ if (me->id.lib) is_lib = TRUE;
+ else is_local = TRUE;
}
}
}
@@ -387,14 +387,14 @@ void make_local_image(struct Image *ima)
MTexPoly *mtpoly;
int a, i;
- for (i=0; i<me->pdata.totlayer; i++) {
+ for (i = 0; i < me->pdata.totlayer; i++) {
if (me->pdata.layers[i].type == CD_MTEXPOLY) {
- mtpoly= (MTexPoly*)me->pdata.layers[i].data;
+ mtpoly = (MTexPoly *)me->pdata.layers[i].data;
- for (a=0; a<me->totpoly; a++, mtpoly++) {
+ for (a = 0; a < me->totpoly; a++, mtpoly++) {
if (mtpoly->tpage == ima) {
- if (me->id.lib) is_lib= TRUE;
- else is_local= TRUE;
+ if (me->id.lib) is_lib = TRUE;
+ else is_local = TRUE;
}
}
}
@@ -408,55 +408,55 @@ void make_local_image(struct Image *ima)
extern_local_image(ima);
}
else if (is_local && is_lib) {
- Image *ima_new= copy_image(ima);
+ Image *ima_new = BKE_image_copy(ima);
- ima_new->id.us= 0;
+ ima_new->id.us = 0;
/* Remap paths of new ID using old library as base. */
BKE_id_lib_local_paths(bmain, ima->id.lib, &ima_new->id);
- tex= bmain->tex.first;
+ tex = bmain->tex.first;
while (tex) {
- if (tex->id.lib==NULL) {
- if (tex->ima==ima) {
+ if (tex->id.lib == NULL) {
+ if (tex->ima == ima) {
tex->ima = ima_new;
ima_new->id.us++;
ima->id.us--;
}
}
- tex= tex->id.next;
+ tex = tex->id.next;
}
- brush= bmain->brush.first;
+ brush = bmain->brush.first;
while (brush) {
- if (brush->id.lib==NULL) {
- if (brush->clone.image==ima) {
+ if (brush->id.lib == NULL) {
+ if (brush->clone.image == ima) {
brush->clone.image = ima_new;
ima_new->id.us++;
ima->id.us--;
}
}
- brush= brush->id.next;
+ brush = brush->id.next;
}
/* Transfer references in texfaces. Texfaces don't add to image ID
* user count *unless* there are no other users. See
* readfile.c:lib_link_mtface. */
- me= bmain->mesh.first;
+ me = bmain->mesh.first;
while (me) {
if (me->mtface) {
MTFace *tface;
int a, i;
- for (i=0; i<me->fdata.totlayer; i++) {
+ for (i = 0; i < me->fdata.totlayer; i++) {
if (me->fdata.layers[i].type == CD_MTFACE) {
- tface= (MTFace*)me->fdata.layers[i].data;
+ tface = (MTFace *)me->fdata.layers[i].data;
- for (a=0; a<me->totface; a++, tface++) {
+ for (a = 0; a < me->totface; a++, tface++) {
if (tface->tpage == ima) {
tface->tpage = ima_new;
if (ima_new->id.us == 0) {
- tface->tpage->id.us= 1;
+ tface->tpage->id.us = 1;
}
- id_lib_extern((ID*)ima_new);
+ id_lib_extern((ID *)ima_new);
}
}
}
@@ -467,24 +467,24 @@ void make_local_image(struct Image *ima)
MTexPoly *mtpoly;
int a, i;
- for (i=0; i<me->pdata.totlayer; i++) {
+ for (i = 0; i < me->pdata.totlayer; i++) {
if (me->pdata.layers[i].type == CD_MTEXPOLY) {
- mtpoly= (MTexPoly*)me->pdata.layers[i].data;
+ mtpoly = (MTexPoly *)me->pdata.layers[i].data;
- for (a=0; a<me->totpoly; a++, mtpoly++) {
+ for (a = 0; a < me->totpoly; a++, mtpoly++) {
if (mtpoly->tpage == ima) {
mtpoly->tpage = ima_new;
if (ima_new->id.us == 0) {
- mtpoly->tpage->id.us= 1;
+ mtpoly->tpage->id.us = 1;
}
- id_lib_extern((ID*)ima_new);
+ id_lib_extern((ID *)ima_new);
}
}
}
}
}
- me= me->id.next;
+ me = me->id.next;
}
}
}
@@ -494,140 +494,149 @@ void BKE_image_merge(Image *dest, Image *source)
ImBuf *ibuf;
/* sanity check */
- if (dest && source && dest!=source) {
+ if (dest && source && dest != source) {
- while ((ibuf= source->ibufs.first)) {
+ while ((ibuf = source->ibufs.first)) {
BLI_remlink(&source->ibufs, ibuf);
image_assign_ibuf(dest, ibuf, IMA_INDEX_PASS(ibuf->index), IMA_INDEX_FRAME(ibuf->index));
}
- free_libblock(&G.main->image, source);
+ BKE_libblock_free(&G.main->image, source);
}
}
+Image *BKE_image_load(const char *filepath)
+{
+ Image *ima;
+ int file, len;
+ const char *libname;
+ char str[FILE_MAX];
+
+ BLI_strncpy(str, filepath, sizeof(str));
+ BLI_path_abs(str, G.main->name);
+
+ /* exists? */
+ file = BLI_open(str, O_BINARY | O_RDONLY, 0);
+ if (file == -1) return NULL;
+ close(file);
+
+ /* create a short library name */
+ len = strlen(filepath);
+
+ while (len > 0 && filepath[len - 1] != '/' && filepath[len - 1] != '\\') len--;
+ libname = filepath + len;
+
+ ima = image_alloc(libname, IMA_SRC_FILE, IMA_TYPE_IMAGE);
+ BLI_strncpy(ima->name, filepath, sizeof(ima->name));
+
+ if (BLI_testextensie_array(filepath, imb_ext_movie))
+ ima->source = IMA_SRC_MOVIE;
+
+ return ima;
+}
/* checks if image was already loaded, then returns same image */
/* otherwise creates new. */
/* does not load ibuf itself */
/* pass on optional frame for #name images */
-Image *BKE_add_image_file(const char *name)
+Image *BKE_image_load_exists(const char *filepath)
{
Image *ima;
- int file, len;
- const char *libname;
char str[FILE_MAX], strtest[FILE_MAX];
- BLI_strncpy(str, name, sizeof(str));
+ BLI_strncpy(str, filepath, sizeof(str));
BLI_path_abs(str, G.main->name);
-
- /* exists? */
- file= BLI_open(str, O_BINARY|O_RDONLY, 0);
- if (file== -1) return NULL;
- close(file);
-
+
/* first search an identical image */
- for (ima= G.main->image.first; ima; ima= ima->id.next) {
- if (ima->source!=IMA_SRC_VIEWER && ima->source!=IMA_SRC_GENERATED) {
+ for (ima = G.main->image.first; ima; ima = ima->id.next) {
+ if (ima->source != IMA_SRC_VIEWER && ima->source != IMA_SRC_GENERATED) {
BLI_strncpy(strtest, ima->name, sizeof(ima->name));
BLI_path_abs(strtest, G.main->name);
- if (BLI_path_cmp(strtest, str)==0) {
- if (ima->anim==NULL || ima->id.us==0) {
- BLI_strncpy(ima->name, name, sizeof(ima->name)); /* for stringcode */
- ima->id.us++; /* officially should not, it doesn't link here! */
- if (ima->ok==0)
- ima->ok= IMA_OK;
+ if (BLI_path_cmp(strtest, str) == 0) {
+ if (ima->anim == NULL || ima->id.us == 0) {
+ BLI_strncpy(ima->name, filepath, sizeof(ima->name)); /* for stringcode */
+ ima->id.us++; /* officially should not, it doesn't link here! */
+ if (ima->ok == 0)
+ ima->ok = IMA_OK;
/* RETURN! */
return ima;
}
}
}
}
- /* add new image */
-
- /* create a short library name */
- len= strlen(name);
-
- while (len > 0 && name[len - 1] != '/' && name[len - 1] != '\\') len--;
- libname= name+len;
-
- ima= image_alloc(libname, IMA_SRC_FILE, IMA_TYPE_IMAGE);
- BLI_strncpy(ima->name, name, sizeof(ima->name));
-
- if (BLI_testextensie_array(name, imb_ext_movie))
- ima->source= IMA_SRC_MOVIE;
-
- return ima;
+
+ return BKE_image_load(filepath);
}
static ImBuf *add_ibuf_size(unsigned int width, unsigned int height, const char *name, int depth, int floatbuf, short uvtestgrid, float color[4])
{
ImBuf *ibuf;
- unsigned char *rect= NULL;
- float *rect_float= NULL;
+ unsigned char *rect = NULL;
+ float *rect_float = NULL;
if (floatbuf) {
- ibuf= IMB_allocImBuf(width, height, depth, IB_rectfloat);
- rect_float= (float*)ibuf->rect_float;
+ ibuf = IMB_allocImBuf(width, height, depth, IB_rectfloat);
+ rect_float = (float *)ibuf->rect_float;
}
else {
- ibuf= IMB_allocImBuf(width, height, depth, IB_rect);
- rect= (unsigned char*)ibuf->rect;
+ ibuf = IMB_allocImBuf(width, height, depth, IB_rect);
+ rect = (unsigned char *)ibuf->rect;
}
BLI_strncpy(ibuf->name, name, sizeof(ibuf->name));
ibuf->userflags |= IB_BITMAPDIRTY;
- switch(uvtestgrid) {
- case 1:
- BKE_image_buf_fill_checker(rect, rect_float, width, height);
- break;
- case 2:
- BKE_image_buf_fill_checker_color(rect, rect_float, width, height);
- break;
- default:
- BKE_image_buf_fill_color(rect, rect_float, width, height, color);
+ switch (uvtestgrid) {
+ case 1:
+ BKE_image_buf_fill_checker(rect, rect_float, width, height);
+ break;
+ case 2:
+ BKE_image_buf_fill_checker_color(rect, rect_float, width, height);
+ break;
+ default:
+ BKE_image_buf_fill_color(rect, rect_float, width, height, color);
}
return ibuf;
}
/* adds new image block, creates ImBuf and initializes color */
-Image *BKE_add_image_size(unsigned int width, unsigned int height, const char *name, int depth, int floatbuf, short uvtestgrid, float color[4])
+Image *BKE_image_add_generated(unsigned int width, unsigned int height, const char *name, int depth, int floatbuf, short uvtestgrid, float color[4])
{
/* on save, type is changed to FILE in editsima.c */
- Image *ima= image_alloc(name, IMA_SRC_GENERATED, IMA_TYPE_UV_TEST);
+ Image *ima = image_alloc(name, IMA_SRC_GENERATED, IMA_TYPE_UV_TEST);
if (ima) {
ImBuf *ibuf;
/* BLI_strncpy(ima->name, name, FILE_MAX); */ /* don't do this, this writes in ain invalid filepath! */
- ima->gen_x= width;
- ima->gen_y= height;
- ima->gen_type= uvtestgrid;
+ ima->gen_x = width;
+ ima->gen_y = height;
+ ima->gen_type = uvtestgrid;
ima->gen_flag |= (floatbuf ? IMA_GEN_FLOAT : 0);
- ibuf= add_ibuf_size(width, height, ima->name, depth, floatbuf, uvtestgrid, color);
+ ibuf = add_ibuf_size(width, height, ima->name, depth, floatbuf, uvtestgrid, color);
image_assign_ibuf(ima, ibuf, IMA_NO_INDEX, 0);
- ima->ok= IMA_OK_LOADED;
+ ima->ok = IMA_OK_LOADED;
}
return ima;
}
/* creates an image image owns the imbuf passed */
-Image *BKE_add_image_imbuf(ImBuf *ibuf)
+Image *BKE_image_add_from_imbuf(ImBuf *ibuf)
{
/* on save, type is changed to FILE in editsima.c */
Image *ima;
- ima= image_alloc(BLI_path_basename(ibuf->name), IMA_SRC_FILE, IMA_TYPE_IMAGE);
+ ima = image_alloc(BLI_path_basename(ibuf->name), IMA_SRC_FILE, IMA_TYPE_IMAGE);
if (ima) {
BLI_strncpy(ima->name, ibuf->name, FILE_MAX);
image_assign_ibuf(ima, ibuf, IMA_NO_INDEX, 0);
- ima->ok= IMA_OK_LOADED;
+ ima->ok = IMA_OK_LOADED;
}
return ima;
@@ -636,20 +645,20 @@ Image *BKE_add_image_imbuf(ImBuf *ibuf)
/* packs rect from memory as PNG */
void BKE_image_memorypack(Image *ima)
{
- ImBuf *ibuf= image_get_ibuf(ima, IMA_NO_INDEX, 0);
+ ImBuf *ibuf = image_get_ibuf(ima, IMA_NO_INDEX, 0);
- if (ibuf==NULL)
+ if (ibuf == NULL)
return;
if (ima->packedfile) {
freePackedFile(ima->packedfile);
ima->packedfile = NULL;
}
- ibuf->ftype= PNG;
- ibuf->planes= R_IMF_PLANES_RGBA;
+ ibuf->ftype = PNG;
+ ibuf->planes = R_IMF_PLANES_RGBA;
IMB_saveiff(ibuf, ibuf->name, IB_rect | IB_mem);
- if (ibuf->encodedbuffer==NULL) {
+ if (ibuf->encodedbuffer == NULL) {
printf("memory save for pack error\n");
}
else {
@@ -657,19 +666,19 @@ void BKE_image_memorypack(Image *ima)
pf->data = ibuf->encodedbuffer;
pf->size = ibuf->encodedsize;
- ima->packedfile= pf;
- ibuf->encodedbuffer= NULL;
- ibuf->encodedsize= 0;
+ ima->packedfile = pf;
+ ibuf->encodedbuffer = NULL;
+ ibuf->encodedsize = 0;
ibuf->userflags &= ~IB_BITMAPDIRTY;
- if (ima->source==IMA_SRC_GENERATED) {
- ima->source= IMA_SRC_FILE;
- ima->type= IMA_TYPE_IMAGE;
+ if (ima->source == IMA_SRC_GENERATED) {
+ ima->source = IMA_SRC_FILE;
+ ima->type = IMA_TYPE_IMAGE;
}
}
}
-void tag_image_time(Image *ima)
+void BKE_image_tag_time(Image *ima)
{
if (ima)
ima->lastused = (int)PIL_check_seconds_timer();
@@ -681,7 +690,7 @@ static void tag_all_images_time()
Image *ima;
int ctime = (int)PIL_check_seconds_timer();
- ima= G.main->image.first;
+ ima = G.main->image.first;
while (ima) {
if (ima->bindcode || ima->repbind || ima->ibufs.first) {
ima->lastused = ctime;
@@ -709,9 +718,9 @@ void free_old_images(void)
lasttime = ctime;
- ima= G.main->image.first;
+ ima = G.main->image.first;
while (ima) {
- if ((ima->flag & IMA_NOCOLLECT)==0 && ctime - ima->lastused > U.textimeout) {
+ if ((ima->flag & IMA_NOCOLLECT) == 0 && ctime - ima->lastused > U.textimeout) {
/* If it's in GL memory, deallocate and set time tag to current time
* This gives textures a "second chance" to be used before dying. */
if (ima->bindcode || ima->repbind) {
@@ -733,18 +742,18 @@ static uintptr_t image_mem_size(Image *ima)
int level;
uintptr_t size = 0;
- size= 0;
+ size = 0;
/* viewers have memory depending on other rules, has no valid rect pointer */
- if (ima->source==IMA_SRC_VIEWER)
+ if (ima->source == IMA_SRC_VIEWER)
return 0;
- for (ibuf= ima->ibufs.first; ibuf; ibuf= ibuf->next) {
+ for (ibuf = ima->ibufs.first; ibuf; ibuf = ibuf->next) {
if (ibuf->rect) size += MEM_allocN_len(ibuf->rect);
else if (ibuf->rect_float) size += MEM_allocN_len(ibuf->rect_float);
- for (level=0; level<IB_MIPMAP_LEVELS; level++) {
- ibufm= ibuf->mipmap[level];
+ for (level = 0; level < IB_MIPMAP_LEVELS; level++) {
+ ibufm = ibuf->mipmap[level];
if (ibufm) {
if (ibufm->rect) size += MEM_allocN_len(ibufm->rect);
else if (ibufm->rect_float) size += MEM_allocN_len(ibufm->rect_float);
@@ -758,18 +767,18 @@ static uintptr_t image_mem_size(Image *ima)
void BKE_image_print_memlist(void)
{
Image *ima;
- uintptr_t size, totsize= 0;
+ uintptr_t size, totsize = 0;
- for (ima= G.main->image.first; ima; ima= ima->id.next)
+ for (ima = G.main->image.first; ima; ima = ima->id.next)
totsize += image_mem_size(ima);
- printf("\ntotal image memory len: %.3f MB\n", (double)totsize/(double)(1024*1024));
+ printf("\ntotal image memory len: %.3f MB\n", (double)totsize / (double)(1024 * 1024));
- for (ima= G.main->image.first; ima; ima= ima->id.next) {
- size= image_mem_size(ima);
+ for (ima = G.main->image.first; ima; ima = ima->id.next) {
+ size = image_mem_size(ima);
if (size)
- printf("%s len: %.3f MB\n", ima->id.name+2, (double)size/(double)(1024*1024));
+ printf("%s len: %.3f MB\n", ima->id.name + 2, (double)size / (double)(1024 * 1024));
}
}
@@ -779,30 +788,30 @@ void BKE_image_free_all_textures(void)
Image *ima;
/* unsigned int totsize= 0; */
- for (ima= G.main->image.first; ima; ima= ima->id.next)
+ for (ima = G.main->image.first; ima; ima = ima->id.next)
ima->id.flag &= ~LIB_DOIT;
- for (tex= G.main->tex.first; tex; tex= tex->id.next)
+ for (tex = G.main->tex.first; tex; tex = tex->id.next)
if (tex->ima)
tex->ima->id.flag |= LIB_DOIT;
- for (ima= G.main->image.first; ima; ima= ima->id.next) {
+ for (ima = G.main->image.first; ima; ima = ima->id.next) {
if (ima->ibufs.first && (ima->id.flag & LIB_DOIT)) {
ImBuf *ibuf;
- for (ibuf= ima->ibufs.first; ibuf; ibuf= ibuf->next) {
+ for (ibuf = ima->ibufs.first; ibuf; ibuf = ibuf->next) {
/* escape when image is painted on */
if (ibuf->userflags & IB_BITMAPDIRTY)
break;
#if 0
if (ibuf->mipmap[0])
- totsize+= 1.33*ibuf->x*ibuf->y*4;
+ totsize += 1.33 * ibuf->x * ibuf->y * 4;
else
- totsize+= ibuf->x*ibuf->y*4;
+ totsize += ibuf->x * ibuf->y * 4;
#endif
}
- if (ibuf==NULL)
+ if (ibuf == NULL)
image_free_buffers(ima);
}
}
@@ -814,13 +823,13 @@ void BKE_image_free_anim_ibufs(Image *ima, int except_frame)
{
ImBuf *ibuf, *nbuf;
- for (ibuf= ima->ibufs.first; ibuf; ibuf= nbuf) {
- nbuf= ibuf->next;
+ for (ibuf = ima->ibufs.first; ibuf; ibuf = nbuf) {
+ nbuf = ibuf->next;
if (ibuf->userflags & IB_BITMAPDIRTY)
continue;
- if (ibuf->index==IMA_NO_INDEX)
+ if (ibuf->index == IMA_NO_INDEX)
continue;
- if (except_frame!=IMA_INDEX_FRAME(ibuf->index)) {
+ if (except_frame != IMA_INDEX_FRAME(ibuf->index)) {
BLI_remlink(&ima->ibufs, ibuf);
if (ibuf->userdata) {
@@ -836,7 +845,7 @@ void BKE_image_all_free_anim_ibufs(int cfra)
{
Image *ima;
- for (ima= G.main->image.first; ima; ima= ima->id.next)
+ for (ima = G.main->image.first; ima; ima = ima->id.next)
if (ELEM(ima->source, IMA_SRC_SEQUENCE, IMA_SRC_MOVIE))
BKE_image_free_anim_ibufs(ima, cfra);
}
@@ -846,47 +855,47 @@ void BKE_image_all_free_anim_ibufs(int cfra)
int BKE_imtype_to_ftype(const char imtype)
{
- if (imtype==R_IMF_IMTYPE_TARGA)
+ if (imtype == R_IMF_IMTYPE_TARGA)
return TGA;
- else if (imtype==R_IMF_IMTYPE_RAWTGA)
+ else if (imtype == R_IMF_IMTYPE_RAWTGA)
return RAWTGA;
- else if (imtype== R_IMF_IMTYPE_IRIS)
+ else if (imtype == R_IMF_IMTYPE_IRIS)
return IMAGIC;
#ifdef WITH_HDR
- else if (imtype==R_IMF_IMTYPE_RADHDR)
+ else if (imtype == R_IMF_IMTYPE_RADHDR)
return RADHDR;
#endif
- else if (imtype==R_IMF_IMTYPE_PNG)
+ else if (imtype == R_IMF_IMTYPE_PNG)
return PNG;
#ifdef WITH_DDS
- else if (imtype==R_IMF_IMTYPE_DDS)
+ else if (imtype == R_IMF_IMTYPE_DDS)
return DDS;
#endif
- else if (imtype==R_IMF_IMTYPE_BMP)
+ else if (imtype == R_IMF_IMTYPE_BMP)
return BMP;
#ifdef WITH_TIFF
- else if (imtype==R_IMF_IMTYPE_TIFF)
+ else if (imtype == R_IMF_IMTYPE_TIFF)
return TIF;
#endif
- else if (imtype==R_IMF_IMTYPE_OPENEXR || imtype==R_IMF_IMTYPE_MULTILAYER)
+ else if (imtype == R_IMF_IMTYPE_OPENEXR || imtype == R_IMF_IMTYPE_MULTILAYER)
return OPENEXR;
#ifdef WITH_CINEON
- else if (imtype==R_IMF_IMTYPE_CINEON)
+ else if (imtype == R_IMF_IMTYPE_CINEON)
return CINEON;
- else if (imtype==R_IMF_IMTYPE_DPX)
+ else if (imtype == R_IMF_IMTYPE_DPX)
return DPX;
#endif
#ifdef WITH_OPENJPEG
- else if (imtype==R_IMF_IMTYPE_JP2)
+ else if (imtype == R_IMF_IMTYPE_JP2)
return JP2;
#endif
else
- return JPG|90;
+ return JPG | 90;
}
char BKE_ftype_to_imtype(const int ftype)
{
- if (ftype==0)
+ if (ftype == 0)
return R_IMF_IMTYPE_TARGA;
else if (ftype == IMAGIC)
return R_IMF_IMTYPE_IRIS;
@@ -929,16 +938,16 @@ char BKE_ftype_to_imtype(const int ftype)
int BKE_imtype_is_movie(const char imtype)
{
- switch(imtype) {
- case R_IMF_IMTYPE_AVIRAW:
- case R_IMF_IMTYPE_AVIJPEG:
- case R_IMF_IMTYPE_AVICODEC:
- case R_IMF_IMTYPE_QUICKTIME:
- case R_IMF_IMTYPE_FFMPEG:
- case R_IMF_IMTYPE_H264:
- case R_IMF_IMTYPE_THEORA:
- case R_IMF_IMTYPE_XVID:
- case R_IMF_IMTYPE_FRAMESERVER:
+ switch (imtype) {
+ case R_IMF_IMTYPE_AVIRAW:
+ case R_IMF_IMTYPE_AVIJPEG:
+ case R_IMF_IMTYPE_AVICODEC:
+ case R_IMF_IMTYPE_QUICKTIME:
+ case R_IMF_IMTYPE_FFMPEG:
+ case R_IMF_IMTYPE_H264:
+ case R_IMF_IMTYPE_THEORA:
+ case R_IMF_IMTYPE_XVID:
+ case R_IMF_IMTYPE_FRAMESERVER:
return 1;
}
return 0;
@@ -946,9 +955,9 @@ int BKE_imtype_is_movie(const char imtype)
int BKE_imtype_supports_zbuf(const char imtype)
{
- switch(imtype) {
- case R_IMF_IMTYPE_IRIZ:
- case R_IMF_IMTYPE_OPENEXR: /* but not R_IMF_IMTYPE_MULTILAYER */
+ switch (imtype) {
+ case R_IMF_IMTYPE_IRIZ:
+ case R_IMF_IMTYPE_OPENEXR: /* but not R_IMF_IMTYPE_MULTILAYER */
return 1;
}
return 0;
@@ -956,8 +965,8 @@ int BKE_imtype_supports_zbuf(const char imtype)
int BKE_imtype_supports_compress(const char imtype)
{
- switch(imtype) {
- case R_IMF_IMTYPE_PNG:
+ switch (imtype) {
+ case R_IMF_IMTYPE_PNG:
return 1;
}
return 0;
@@ -965,10 +974,10 @@ int BKE_imtype_supports_compress(const char imtype)
int BKE_imtype_supports_quality(const char imtype)
{
- switch(imtype) {
- case R_IMF_IMTYPE_JPEG90:
- case R_IMF_IMTYPE_JP2:
- case R_IMF_IMTYPE_AVIJPEG:
+ switch (imtype) {
+ case R_IMF_IMTYPE_JPEG90:
+ case R_IMF_IMTYPE_JP2:
+ case R_IMF_IMTYPE_AVIJPEG:
return 1;
}
return 0;
@@ -976,32 +985,32 @@ int BKE_imtype_supports_quality(const char imtype)
char BKE_imtype_valid_channels(const char imtype)
{
- char chan_flag= IMA_CHAN_FLAG_RGB; /* assume all support rgb */
+ char chan_flag = IMA_CHAN_FLAG_RGB; /* assume all support rgb */
/* alpha */
- switch(imtype) {
- case R_IMF_IMTYPE_TARGA:
- case R_IMF_IMTYPE_IRIS:
- case R_IMF_IMTYPE_PNG:
- /* case R_IMF_IMTYPE_BMP: */ /* read but not write */
- case R_IMF_IMTYPE_RADHDR:
- case R_IMF_IMTYPE_TIFF:
- case R_IMF_IMTYPE_OPENEXR:
- case R_IMF_IMTYPE_MULTILAYER:
- case R_IMF_IMTYPE_DDS:
- case R_IMF_IMTYPE_JP2:
- case R_IMF_IMTYPE_QUICKTIME:
+ switch (imtype) {
+ case R_IMF_IMTYPE_TARGA:
+ case R_IMF_IMTYPE_IRIS:
+ case R_IMF_IMTYPE_PNG:
+ /* case R_IMF_IMTYPE_BMP: */ /* read but not write */
+ case R_IMF_IMTYPE_RADHDR:
+ case R_IMF_IMTYPE_TIFF:
+ case R_IMF_IMTYPE_OPENEXR:
+ case R_IMF_IMTYPE_MULTILAYER:
+ case R_IMF_IMTYPE_DDS:
+ case R_IMF_IMTYPE_JP2:
+ case R_IMF_IMTYPE_QUICKTIME:
chan_flag |= IMA_CHAN_FLAG_ALPHA;
}
/* bw */
- switch(imtype) {
- case R_IMF_IMTYPE_PNG:
- case R_IMF_IMTYPE_JPEG90:
- case R_IMF_IMTYPE_TARGA:
- case R_IMF_IMTYPE_RAWTGA:
- case R_IMF_IMTYPE_TIFF:
- case R_IMF_IMTYPE_IRIS:
+ switch (imtype) {
+ case R_IMF_IMTYPE_PNG:
+ case R_IMF_IMTYPE_JPEG90:
+ case R_IMF_IMTYPE_TARGA:
+ case R_IMF_IMTYPE_RAWTGA:
+ case R_IMF_IMTYPE_TIFF:
+ case R_IMF_IMTYPE_IRIS:
chan_flag |= IMA_CHAN_FLAG_BW;
}
@@ -1011,23 +1020,23 @@ char BKE_imtype_valid_channels(const char imtype)
char BKE_imtype_valid_depths(const char imtype)
{
switch (imtype) {
- case R_IMF_IMTYPE_RADHDR:
- return R_IMF_CHAN_DEPTH_32;
- case R_IMF_IMTYPE_TIFF:
- return R_IMF_CHAN_DEPTH_8 | R_IMF_CHAN_DEPTH_16;
- case R_IMF_IMTYPE_OPENEXR:
- return R_IMF_CHAN_DEPTH_16 | R_IMF_CHAN_DEPTH_32;
- case R_IMF_IMTYPE_MULTILAYER:
- return R_IMF_CHAN_DEPTH_32;
- /* eeh, cineone does some strange 10bits per channel */
- case R_IMF_IMTYPE_DPX:
- case R_IMF_IMTYPE_CINEON:
- return R_IMF_CHAN_DEPTH_12;
- case R_IMF_IMTYPE_JP2:
- return R_IMF_CHAN_DEPTH_8 | R_IMF_CHAN_DEPTH_12 | R_IMF_CHAN_DEPTH_16;
- /* most formats are 8bit only */
- default:
- return R_IMF_CHAN_DEPTH_8;
+ case R_IMF_IMTYPE_RADHDR:
+ return R_IMF_CHAN_DEPTH_32;
+ case R_IMF_IMTYPE_TIFF:
+ return R_IMF_CHAN_DEPTH_8 | R_IMF_CHAN_DEPTH_16;
+ case R_IMF_IMTYPE_OPENEXR:
+ return R_IMF_CHAN_DEPTH_16 | R_IMF_CHAN_DEPTH_32;
+ case R_IMF_IMTYPE_MULTILAYER:
+ return R_IMF_CHAN_DEPTH_32;
+ /* eeh, cineone does some strange 10bits per channel */
+ case R_IMF_IMTYPE_DPX:
+ case R_IMF_IMTYPE_CINEON:
+ return R_IMF_CHAN_DEPTH_12;
+ case R_IMF_IMTYPE_JP2:
+ return R_IMF_CHAN_DEPTH_8 | R_IMF_CHAN_DEPTH_12 | R_IMF_CHAN_DEPTH_16;
+ /* most formats are 8bit only */
+ default:
+ return R_IMF_CHAN_DEPTH_8;
}
}
@@ -1036,113 +1045,116 @@ char BKE_imtype_valid_depths(const char imtype)
* creator.c help info */
char BKE_imtype_from_arg(const char *imtype_arg)
{
- if (!strcmp(imtype_arg,"TGA")) return R_IMF_IMTYPE_TARGA;
- else if (!strcmp(imtype_arg,"IRIS")) return R_IMF_IMTYPE_IRIS;
+ if (!strcmp(imtype_arg, "TGA")) return R_IMF_IMTYPE_TARGA;
+ else if (!strcmp(imtype_arg, "IRIS")) return R_IMF_IMTYPE_IRIS;
#ifdef WITH_DDS
- else if (!strcmp(imtype_arg,"DDS")) return R_IMF_IMTYPE_DDS;
+ else if (!strcmp(imtype_arg, "DDS")) return R_IMF_IMTYPE_DDS;
#endif
- else if (!strcmp(imtype_arg,"JPEG")) return R_IMF_IMTYPE_JPEG90;
- else if (!strcmp(imtype_arg,"IRIZ")) return R_IMF_IMTYPE_IRIZ;
- else if (!strcmp(imtype_arg,"RAWTGA")) return R_IMF_IMTYPE_RAWTGA;
- else if (!strcmp(imtype_arg,"AVIRAW")) return R_IMF_IMTYPE_AVIRAW;
- else if (!strcmp(imtype_arg,"AVIJPEG")) return R_IMF_IMTYPE_AVIJPEG;
- else if (!strcmp(imtype_arg,"PNG")) return R_IMF_IMTYPE_PNG;
- else if (!strcmp(imtype_arg,"AVICODEC")) return R_IMF_IMTYPE_AVICODEC;
- else if (!strcmp(imtype_arg,"QUICKTIME")) return R_IMF_IMTYPE_QUICKTIME;
- else if (!strcmp(imtype_arg,"BMP")) return R_IMF_IMTYPE_BMP;
+ else if (!strcmp(imtype_arg, "JPEG")) return R_IMF_IMTYPE_JPEG90;
+ else if (!strcmp(imtype_arg, "IRIZ")) return R_IMF_IMTYPE_IRIZ;
+ else if (!strcmp(imtype_arg, "RAWTGA")) return R_IMF_IMTYPE_RAWTGA;
+ else if (!strcmp(imtype_arg, "AVIRAW")) return R_IMF_IMTYPE_AVIRAW;
+ else if (!strcmp(imtype_arg, "AVIJPEG")) return R_IMF_IMTYPE_AVIJPEG;
+ else if (!strcmp(imtype_arg, "PNG")) return R_IMF_IMTYPE_PNG;
+ else if (!strcmp(imtype_arg, "AVICODEC")) return R_IMF_IMTYPE_AVICODEC;
+ else if (!strcmp(imtype_arg, "QUICKTIME")) return R_IMF_IMTYPE_QUICKTIME;
+ else if (!strcmp(imtype_arg, "BMP")) return R_IMF_IMTYPE_BMP;
#ifdef WITH_HDR
- else if (!strcmp(imtype_arg,"HDR")) return R_IMF_IMTYPE_RADHDR;
+ else if (!strcmp(imtype_arg, "HDR")) return R_IMF_IMTYPE_RADHDR;
#endif
#ifdef WITH_TIFF
- else if (!strcmp(imtype_arg,"TIFF")) return R_IMF_IMTYPE_TIFF;
+ else if (!strcmp(imtype_arg, "TIFF")) return R_IMF_IMTYPE_TIFF;
#endif
#ifdef WITH_OPENEXR
- else if (!strcmp(imtype_arg,"EXR")) return R_IMF_IMTYPE_OPENEXR;
- else if (!strcmp(imtype_arg,"MULTILAYER")) return R_IMF_IMTYPE_MULTILAYER;
+ else if (!strcmp(imtype_arg, "EXR")) return R_IMF_IMTYPE_OPENEXR;
+ else if (!strcmp(imtype_arg, "MULTILAYER")) return R_IMF_IMTYPE_MULTILAYER;
#endif
- else if (!strcmp(imtype_arg,"MPEG")) return R_IMF_IMTYPE_FFMPEG;
- else if (!strcmp(imtype_arg,"FRAMESERVER")) return R_IMF_IMTYPE_FRAMESERVER;
+ else if (!strcmp(imtype_arg, "MPEG")) return R_IMF_IMTYPE_FFMPEG;
+ else if (!strcmp(imtype_arg, "FRAMESERVER")) return R_IMF_IMTYPE_FRAMESERVER;
#ifdef WITH_CINEON
- else if (!strcmp(imtype_arg,"CINEON")) return R_IMF_IMTYPE_CINEON;
- else if (!strcmp(imtype_arg,"DPX")) return R_IMF_IMTYPE_DPX;
+ else if (!strcmp(imtype_arg, "CINEON")) return R_IMF_IMTYPE_CINEON;
+ else if (!strcmp(imtype_arg, "DPX")) return R_IMF_IMTYPE_DPX;
#endif
#ifdef WITH_OPENJPEG
- else if (!strcmp(imtype_arg,"JP2")) return R_IMF_IMTYPE_JP2;
+ else if (!strcmp(imtype_arg, "JP2")) return R_IMF_IMTYPE_JP2;
#endif
else return R_IMF_IMTYPE_INVALID;
}
int BKE_add_image_extension(char *string, const char imtype)
{
- const char *extension= NULL;
+ const char *extension = NULL;
- if (imtype== R_IMF_IMTYPE_IRIS) {
+ if (imtype == R_IMF_IMTYPE_IRIS) {
if (!BLI_testextensie(string, ".rgb"))
- extension= ".rgb";
+ extension = ".rgb";
}
- else if (imtype==R_IMF_IMTYPE_IRIZ) {
+ else if (imtype == R_IMF_IMTYPE_IRIZ) {
if (!BLI_testextensie(string, ".rgb"))
- extension= ".rgb";
+ extension = ".rgb";
}
#ifdef WITH_HDR
- else if (imtype==R_IMF_IMTYPE_RADHDR) {
+ else if (imtype == R_IMF_IMTYPE_RADHDR) {
if (!BLI_testextensie(string, ".hdr"))
- extension= ".hdr";
+ extension = ".hdr";
}
#endif
else if (ELEM5(imtype, R_IMF_IMTYPE_PNG, R_IMF_IMTYPE_FFMPEG, R_IMF_IMTYPE_H264, R_IMF_IMTYPE_THEORA, R_IMF_IMTYPE_XVID)) {
if (!BLI_testextensie(string, ".png"))
- extension= ".png";
+ extension = ".png";
}
#ifdef WITH_DDS
- else if (imtype==R_IMF_IMTYPE_DDS) {
+ else if (imtype == R_IMF_IMTYPE_DDS) {
if (!BLI_testextensie(string, ".dds"))
- extension= ".dds";
+ extension = ".dds";
}
#endif
- else if (imtype==R_IMF_IMTYPE_RAWTGA) {
+ else if (imtype == R_IMF_IMTYPE_RAWTGA) {
if (!BLI_testextensie(string, ".tga"))
- extension= ".tga";
+ extension = ".tga";
}
- else if (imtype==R_IMF_IMTYPE_BMP) {
+ else if (imtype == R_IMF_IMTYPE_BMP) {
if (!BLI_testextensie(string, ".bmp"))
- extension= ".bmp";
+ extension = ".bmp";
}
#ifdef WITH_TIFF
- else if (imtype==R_IMF_IMTYPE_TIFF) {
- if (!BLI_testextensie(string, ".tif") &&
- !BLI_testextensie(string, ".tiff")) extension= ".tif";
+ else if (imtype == R_IMF_IMTYPE_TIFF) {
+ if (!BLI_testextensie(string, ".tif") &&
+ !BLI_testextensie(string, ".tiff"))
+ {
+ extension = ".tif";
+ }
}
#endif
#ifdef WITH_OPENEXR
- else if ( ELEM(imtype, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_MULTILAYER)) {
+ else if (ELEM(imtype, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_MULTILAYER)) {
if (!BLI_testextensie(string, ".exr"))
- extension= ".exr";
+ extension = ".exr";
}
#endif
#ifdef WITH_CINEON
- else if (imtype==R_IMF_IMTYPE_CINEON) {
+ else if (imtype == R_IMF_IMTYPE_CINEON) {
if (!BLI_testextensie(string, ".cin"))
- extension= ".cin";
+ extension = ".cin";
}
- else if (imtype==R_IMF_IMTYPE_DPX) {
+ else if (imtype == R_IMF_IMTYPE_DPX) {
if (!BLI_testextensie(string, ".dpx"))
- extension= ".dpx";
+ extension = ".dpx";
}
#endif
- else if (imtype==R_IMF_IMTYPE_TARGA) {
+ else if (imtype == R_IMF_IMTYPE_TARGA) {
if (!BLI_testextensie(string, ".tga"))
- extension= ".tga";
+ extension = ".tga";
}
#ifdef WITH_OPENJPEG
- else if (imtype==R_IMF_IMTYPE_JP2) {
+ else if (imtype == R_IMF_IMTYPE_JP2) {
if (!BLI_testextensie(string, ".jp2"))
- extension= ".jp2";
+ extension = ".jp2";
}
#endif
else { // R_IMF_IMTYPE_AVICODEC, R_IMF_IMTYPE_AVIRAW, R_IMF_IMTYPE_AVIJPEG, R_IMF_IMTYPE_JPEG90, R_IMF_IMTYPE_QUICKTIME etc
- if (!( BLI_testextensie(string, ".jpg") || BLI_testextensie(string, ".jpeg")))
- extension= ".jpg";
+ if (!(BLI_testextensie(string, ".jpg") || BLI_testextensie(string, ".jpeg")))
+ extension = ".jpg";
}
if (extension) {
@@ -1174,17 +1186,17 @@ void BKE_imformat_defaults(ImageFormatData *im_format)
/* could allow access externally - 512 is for long names, 64 is for id names */
typedef struct StampData {
- char file[512];
- char note[512];
- char date[512];
- char marker[512];
- char time[512];
- char frame[512];
- char camera[64];
- char cameralens[64];
- char scene[64];
- char strip[64];
- char rendertime[64];
+ char file[512];
+ char note[512];
+ char date[512];
+ char marker[512];
+ char time[512];
+ char frame[512];
+ char camera[64];
+ char cameralens[64];
+ char scene[64];
+ char strip[64];
+ char rendertime[64];
} StampData;
static void stampdata(Scene *scene, Object *camera, StampData *stamp_data, int do_prefix)
@@ -1194,7 +1206,7 @@ static void stampdata(Scene *scene, Object *camera, StampData *stamp_data, int d
time_t t;
if (scene->r.stamp & R_STAMP_FILENAME) {
- BLI_snprintf(stamp_data->file, sizeof(stamp_data->file), do_prefix ? "File %s":"%s", G.relbase_valid ? G.main->name:"<untitled>");
+ BLI_snprintf(stamp_data->file, sizeof(stamp_data->file), do_prefix ? "File %s" : "%s", G.relbase_valid ? G.main->name : "<untitled>");
}
else {
stamp_data->file[0] = '\0';
@@ -1211,20 +1223,20 @@ static void stampdata(Scene *scene, Object *camera, StampData *stamp_data, int d
if (scene->r.stamp & R_STAMP_DATE) {
t = time(NULL);
tl = localtime(&t);
- BLI_snprintf(text, sizeof(text), "%04d/%02d/%02d %02d:%02d:%02d", tl->tm_year+1900, tl->tm_mon+1, tl->tm_mday, tl->tm_hour, tl->tm_min, tl->tm_sec);
- BLI_snprintf(stamp_data->date, sizeof(stamp_data->date), do_prefix ? "Date %s":"%s", text);
+ BLI_snprintf(text, sizeof(text), "%04d/%02d/%02d %02d:%02d:%02d", tl->tm_year + 1900, tl->tm_mon + 1, tl->tm_mday, tl->tm_hour, tl->tm_min, tl->tm_sec);
+ BLI_snprintf(stamp_data->date, sizeof(stamp_data->date), do_prefix ? "Date %s" : "%s", text);
}
else {
stamp_data->date[0] = '\0';
}
if (scene->r.stamp & R_STAMP_MARKER) {
- char *name = scene_find_last_marker_name(scene, CFRA);
+ char *name = BKE_scene_find_last_marker_name(scene, CFRA);
- if (name) BLI_strncpy(text, name, sizeof(text));
- else BLI_strncpy(text, "<none>", sizeof(text));
+ if (name) BLI_strncpy(text, name, sizeof(text));
+ else BLI_strncpy(text, "<none>", sizeof(text));
- BLI_snprintf(stamp_data->marker, sizeof(stamp_data->marker), do_prefix ? "Marker %s":"%s", text);
+ BLI_snprintf(stamp_data->marker, sizeof(stamp_data->marker), do_prefix ? "Marker %s" : "%s", text);
}
else {
stamp_data->marker[0] = '\0';
@@ -1233,8 +1245,8 @@ static void stampdata(Scene *scene, Object *camera, StampData *stamp_data, int d
if (scene->r.stamp & R_STAMP_TIME) {
int f = (int)(scene->r.cfra % scene->r.frs_sec);
int s = (int)(scene->r.cfra / scene->r.frs_sec);
- int h= 0;
- int m= 0;
+ int h = 0;
+ int m = 0;
if (s) {
m = (int)(s / 60);
@@ -1251,7 +1263,7 @@ static void stampdata(Scene *scene, Object *camera, StampData *stamp_data, int d
else
BLI_snprintf(text, sizeof(text), "%02d:%02d:%02d.%03d", h, m, s, f);
- BLI_snprintf(stamp_data->time, sizeof(stamp_data->time), do_prefix ? "Time %s":"%s", text);
+ BLI_snprintf(stamp_data->time, sizeof(stamp_data->time), do_prefix ? "Time %s" : "%s", text);
}
else {
stamp_data->time[0] = '\0';
@@ -1259,20 +1271,20 @@ static void stampdata(Scene *scene, Object *camera, StampData *stamp_data, int d
if (scene->r.stamp & R_STAMP_FRAME) {
char fmtstr[32];
- int digits= 1;
+ int digits = 1;
- if (scene->r.efra>9)
- digits= 1 + (int) log10(scene->r.efra);
+ if (scene->r.efra > 9)
+ digits = 1 + (int) log10(scene->r.efra);
- BLI_snprintf(fmtstr, sizeof(fmtstr), do_prefix ? "Frame %%0%di":"%%0%di", digits);
- BLI_snprintf (stamp_data->frame, sizeof(stamp_data->frame), fmtstr, scene->r.cfra);
+ BLI_snprintf(fmtstr, sizeof(fmtstr), do_prefix ? "Frame %%0%di" : "%%0%di", digits);
+ BLI_snprintf(stamp_data->frame, sizeof(stamp_data->frame), fmtstr, scene->r.cfra);
}
else {
stamp_data->frame[0] = '\0';
}
if (scene->r.stamp & R_STAMP_CAMERA) {
- BLI_snprintf(stamp_data->camera, sizeof(stamp_data->camera), do_prefix ? "Camera %s":"%s", camera ? camera->id.name+2 : "<none>");
+ BLI_snprintf(stamp_data->camera, sizeof(stamp_data->camera), do_prefix ? "Camera %s" : "%s", camera ? camera->id.name + 2 : "<none>");
}
else {
stamp_data->camera[0] = '\0';
@@ -1282,41 +1294,41 @@ static void stampdata(Scene *scene, Object *camera, StampData *stamp_data, int d
if (camera && camera->type == OB_CAMERA) {
BLI_snprintf(text, sizeof(text), "%.2f", ((Camera *)camera->data)->lens);
}
- else BLI_strncpy(text, "<none>", sizeof(text));
+ else BLI_strncpy(text, "<none>", sizeof(text));
- BLI_snprintf(stamp_data->cameralens, sizeof(stamp_data->cameralens), do_prefix ? "Lens %s":"%s", text);
+ BLI_snprintf(stamp_data->cameralens, sizeof(stamp_data->cameralens), do_prefix ? "Lens %s" : "%s", text);
}
else {
stamp_data->cameralens[0] = '\0';
}
if (scene->r.stamp & R_STAMP_SCENE) {
- BLI_snprintf(stamp_data->scene, sizeof(stamp_data->scene), do_prefix ? "Scene %s":"%s", scene->id.name+2);
+ BLI_snprintf(stamp_data->scene, sizeof(stamp_data->scene), do_prefix ? "Scene %s" : "%s", scene->id.name + 2);
}
else {
stamp_data->scene[0] = '\0';
}
if (scene->r.stamp & R_STAMP_SEQSTRIP) {
- Sequence *seq= seq_foreground_frame_get(scene, scene->r.cfra);
+ Sequence *seq = seq_foreground_frame_get(scene, scene->r.cfra);
- if (seq) BLI_strncpy(text, seq->name+2, sizeof(text));
- else BLI_strncpy(text, "<none>", sizeof(text));
+ if (seq) BLI_strncpy(text, seq->name + 2, sizeof(text));
+ else BLI_strncpy(text, "<none>", sizeof(text));
- BLI_snprintf(stamp_data->strip, sizeof(stamp_data->strip), do_prefix ? "Strip %s":"%s", text);
+ BLI_snprintf(stamp_data->strip, sizeof(stamp_data->strip), do_prefix ? "Strip %s" : "%s", text);
}
else {
stamp_data->strip[0] = '\0';
}
{
- Render *re= RE_GetRender(scene->id.name);
- RenderStats *stats= re ? RE_GetStats(re):NULL;
+ Render *re = RE_GetRender(scene->id.name);
+ RenderStats *stats = re ? RE_GetStats(re) : NULL;
if (stats && (scene->r.stamp & R_STAMP_RENDERTIME)) {
BLI_timestr(stats->lastframetime, text);
- BLI_snprintf(stamp_data->rendertime, sizeof(stamp_data->rendertime), do_prefix ? "RenderTime %s":"%s", text);
+ BLI_snprintf(stamp_data->rendertime, sizeof(stamp_data->rendertime), do_prefix ? "RenderTime %s" : "%s", text);
}
else {
stamp_data->rendertime[0] = '\0';
@@ -1330,7 +1342,7 @@ void BKE_stamp_buf(Scene *scene, Object *camera, unsigned char *rect, float *rec
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
#define BUFF_MARGIN_X 2
#define BUFF_MARGIN_Y 1
@@ -1342,29 +1354,29 @@ void BKE_stamp_buf(Scene *scene, Object *camera, unsigned char *rect, float *rec
/* TODO, do_versions */
if (scene->r.stamp_font_id < 8)
- scene->r.stamp_font_id= 12;
+ scene->r.stamp_font_id = 12;
/* set before return */
BLF_size(mono, scene->r.stamp_font_id, 72);
BLF_buffer(mono, rectf, rect, width, height, channels);
BLF_buffer_col(mono, scene->r.fg_stamp[0], scene->r.fg_stamp[1], scene->r.fg_stamp[2], 1.0);
- pad= BLF_width_max(mono);
+ pad = BLF_width_max(mono);
/* use 'h_fixed' rather than 'h', aligns better */
- h_fixed= BLF_height_max(mono);
+ h_fixed = BLF_height_max(mono);
y_ofs = -BLF_descender(mono);
- x= 0;
- y= height;
+ x = 0;
+ y = height;
if (stamp_data.file[0]) {
/* Top left corner */
- BLF_width_and_height(mono, stamp_data.file, &w, &h); h= h_fixed;
+ BLF_width_and_height(mono, stamp_data.file, &w, &h); h = h_fixed;
y -= h;
/* also a little of space to the background. */
- buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, x-BUFF_MARGIN_X, y-BUFF_MARGIN_Y, w+BUFF_MARGIN_X, y+h+BUFF_MARGIN_Y);
+ buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, x - BUFF_MARGIN_X, y - BUFF_MARGIN_Y, w + BUFF_MARGIN_X, y + h + BUFF_MARGIN_Y);
/* and draw the text. */
BLF_position(mono, x, y + y_ofs, 0.0);
@@ -1376,11 +1388,11 @@ void BKE_stamp_buf(Scene *scene, Object *camera, unsigned char *rect, float *rec
/* Top left corner, below File */
if (stamp_data.note[0]) {
- BLF_width_and_height(mono, stamp_data.note, &w, &h); h= h_fixed;
+ BLF_width_and_height(mono, stamp_data.note, &w, &h); h = h_fixed;
y -= h;
/* and space for background. */
- buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, 0, y-BUFF_MARGIN_Y, w+BUFF_MARGIN_X, y+h+BUFF_MARGIN_Y);
+ buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, 0, y - BUFF_MARGIN_Y, w + BUFF_MARGIN_X, y + h + BUFF_MARGIN_Y);
BLF_position(mono, x, y + y_ofs, 0.0);
BLF_draw_buffer(mono, stamp_data.note);
@@ -1391,11 +1403,11 @@ void BKE_stamp_buf(Scene *scene, Object *camera, unsigned char *rect, float *rec
/* Top left corner, below File (or Note) */
if (stamp_data.date[0]) {
- BLF_width_and_height(mono, stamp_data.date, &w, &h); h= h_fixed;
+ BLF_width_and_height(mono, stamp_data.date, &w, &h); h = h_fixed;
y -= h;
/* and space for background. */
- buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, 0, y-BUFF_MARGIN_Y, w+BUFF_MARGIN_X, y+h+BUFF_MARGIN_Y);
+ buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, 0, y - BUFF_MARGIN_Y, w + BUFF_MARGIN_X, y + h + BUFF_MARGIN_Y);
BLF_position(mono, x, y + y_ofs, 0.0);
BLF_draw_buffer(mono, stamp_data.date);
@@ -1406,25 +1418,25 @@ void BKE_stamp_buf(Scene *scene, Object *camera, unsigned char *rect, float *rec
/* Top left corner, below File, Date or Note */
if (stamp_data.rendertime[0]) {
- BLF_width_and_height(mono, stamp_data.rendertime, &w, &h); h= h_fixed;
+ BLF_width_and_height(mono, stamp_data.rendertime, &w, &h); h = h_fixed;
y -= h;
/* and space for background. */
- buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, 0, y-BUFF_MARGIN_Y, w+BUFF_MARGIN_X, y+h+BUFF_MARGIN_Y);
+ buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, 0, y - BUFF_MARGIN_Y, w + BUFF_MARGIN_X, y + h + BUFF_MARGIN_Y);
BLF_position(mono, x, y + y_ofs, 0.0);
BLF_draw_buffer(mono, stamp_data.rendertime);
}
- x= 0;
- y= 0;
+ x = 0;
+ y = 0;
/* Bottom left corner, leaving space for timing */
if (stamp_data.marker[0]) {
- BLF_width_and_height(mono, stamp_data.marker, &w, &h); h= h_fixed;
+ BLF_width_and_height(mono, stamp_data.marker, &w, &h); h = h_fixed;
/* extra space for background. */
- buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, x-BUFF_MARGIN_X, y-BUFF_MARGIN_Y, w+BUFF_MARGIN_X, y+h+BUFF_MARGIN_Y);
+ buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, x - BUFF_MARGIN_X, y - BUFF_MARGIN_Y, w + BUFF_MARGIN_X, y + h + BUFF_MARGIN_Y);
/* and pad the text. */
BLF_position(mono, x, y + y_ofs, 0.0);
@@ -1436,10 +1448,10 @@ void BKE_stamp_buf(Scene *scene, Object *camera, unsigned char *rect, float *rec
/* Left bottom corner */
if (stamp_data.time[0]) {
- BLF_width_and_height(mono, stamp_data.time, &w, &h); h= h_fixed;
+ BLF_width_and_height(mono, stamp_data.time, &w, &h); h = h_fixed;
/* extra space for background */
- buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, x-BUFF_MARGIN_X, y, x+w+BUFF_MARGIN_X, y+h+BUFF_MARGIN_Y);
+ buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, x - BUFF_MARGIN_X, y, x + w + BUFF_MARGIN_X, y + h + BUFF_MARGIN_Y);
/* and pad the text. */
BLF_position(mono, x, y + y_ofs, 0.0);
@@ -1450,10 +1462,10 @@ void BKE_stamp_buf(Scene *scene, Object *camera, unsigned char *rect, float *rec
}
if (stamp_data.frame[0]) {
- BLF_width_and_height(mono, stamp_data.frame, &w, &h); h= h_fixed;
+ BLF_width_and_height(mono, stamp_data.frame, &w, &h); h = h_fixed;
/* extra space for background. */
- buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, x-BUFF_MARGIN_X, y-BUFF_MARGIN_Y, x+w+BUFF_MARGIN_X, y+h+BUFF_MARGIN_Y);
+ buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, x - BUFF_MARGIN_X, y - BUFF_MARGIN_Y, x + w + BUFF_MARGIN_X, y + h + BUFF_MARGIN_Y);
/* and pad the text. */
BLF_position(mono, x, y + y_ofs, 0.0);
@@ -1464,10 +1476,10 @@ void BKE_stamp_buf(Scene *scene, Object *camera, unsigned char *rect, float *rec
}
if (stamp_data.camera[0]) {
- BLF_width_and_height(mono, stamp_data.camera, &w, &h); h= h_fixed;
+ BLF_width_and_height(mono, stamp_data.camera, &w, &h); h = h_fixed;
/* extra space for background. */
- buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, x-BUFF_MARGIN_X, y-BUFF_MARGIN_Y, x+w+BUFF_MARGIN_X, y+h+BUFF_MARGIN_Y);
+ buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, x - BUFF_MARGIN_X, y - BUFF_MARGIN_Y, x + w + BUFF_MARGIN_X, y + h + BUFF_MARGIN_Y);
BLF_position(mono, x, y + y_ofs, 0.0);
BLF_draw_buffer(mono, stamp_data.camera);
@@ -1476,37 +1488,37 @@ void BKE_stamp_buf(Scene *scene, Object *camera, unsigned char *rect, float *rec
}
if (stamp_data.cameralens[0]) {
- BLF_width_and_height(mono, stamp_data.cameralens, &w, &h); h= h_fixed;
+ BLF_width_and_height(mono, stamp_data.cameralens, &w, &h); h = h_fixed;
/* extra space for background. */
- buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, x-BUFF_MARGIN_X, y-BUFF_MARGIN_Y, x+w+BUFF_MARGIN_X, y+h+BUFF_MARGIN_Y);
+ buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, x - BUFF_MARGIN_X, y - BUFF_MARGIN_Y, x + w + BUFF_MARGIN_X, y + h + BUFF_MARGIN_Y);
BLF_position(mono, x, y + y_ofs, 0.0);
BLF_draw_buffer(mono, stamp_data.cameralens);
}
if (stamp_data.scene[0]) {
- BLF_width_and_height(mono, stamp_data.scene, &w, &h); h= h_fixed;
+ BLF_width_and_height(mono, stamp_data.scene, &w, &h); h = h_fixed;
/* Bottom right corner, with an extra space because blenfont is too strict! */
- x= width - w - 2;
+ x = width - w - 2;
/* extra space for background. */
- buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, x-BUFF_MARGIN_X, y-BUFF_MARGIN_Y, x+w+BUFF_MARGIN_X, y+h+BUFF_MARGIN_Y);
+ buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, x - BUFF_MARGIN_X, y - BUFF_MARGIN_Y, x + w + BUFF_MARGIN_X, y + h + BUFF_MARGIN_Y);
/* and pad the text. */
- BLF_position(mono, x, y+y_ofs, 0.0);
+ BLF_position(mono, x, y + y_ofs, 0.0);
BLF_draw_buffer(mono, stamp_data.scene);
}
if (stamp_data.strip[0]) {
- BLF_width_and_height(mono, stamp_data.strip, &w, &h); h= h_fixed;
+ BLF_width_and_height(mono, stamp_data.strip, &w, &h); h = h_fixed;
/* Top right corner, with an extra space because blenfont is too strict! */
- x= width - w - pad;
- y= height - h;
+ x = width - w - pad;
+ y = height - h;
/* extra space for background. */
- buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, x-BUFF_MARGIN_X, y-BUFF_MARGIN_Y, x+w+BUFF_MARGIN_X, y+h+BUFF_MARGIN_Y);
+ buf_rectfill_area(rect, rectf, width, height, scene->r.bg_stamp, x - BUFF_MARGIN_X, y - BUFF_MARGIN_Y, x + w + BUFF_MARGIN_X, y + h + BUFF_MARGIN_Y);
BLF_position(mono, x, y + y_ofs, 0.0);
BLF_draw_buffer(mono, stamp_data.strip);
@@ -1519,42 +1531,42 @@ void BKE_stamp_buf(Scene *scene, Object *camera, unsigned char *rect, float *rec
#undef BUFF_MARGIN_Y
}
-void BKE_stamp_info(Scene *scene, Object *camera, struct ImBuf *ibuf)
+void BKE_imbuf_stamp_info(Scene *scene, Object *camera, struct ImBuf *ibuf)
{
struct StampData stamp_data;
- if (!ibuf) return;
+ if (!ibuf) return;
/* fill all the data values, no prefix */
stampdata(scene, camera, &stamp_data, 0);
- if (stamp_data.file[0]) IMB_metadata_change_field (ibuf, "File", stamp_data.file);
- if (stamp_data.note[0]) IMB_metadata_change_field (ibuf, "Note", stamp_data.note);
- if (stamp_data.date[0]) IMB_metadata_change_field (ibuf, "Date", stamp_data.date);
- if (stamp_data.marker[0]) IMB_metadata_change_field (ibuf, "Marker", stamp_data.marker);
- if (stamp_data.time[0]) IMB_metadata_change_field (ibuf, "Time", stamp_data.time);
- if (stamp_data.frame[0]) IMB_metadata_change_field (ibuf, "Frame", stamp_data.frame);
- if (stamp_data.camera[0]) IMB_metadata_change_field (ibuf, "Camera", stamp_data.camera);
- if (stamp_data.cameralens[0]) IMB_metadata_change_field (ibuf, "Lens", stamp_data.cameralens);
- if (stamp_data.scene[0]) IMB_metadata_change_field (ibuf, "Scene", stamp_data.scene);
- if (stamp_data.strip[0]) IMB_metadata_change_field (ibuf, "Strip", stamp_data.strip);
- if (stamp_data.rendertime[0]) IMB_metadata_change_field (ibuf, "RenderTime", stamp_data.rendertime);
+ if (stamp_data.file[0]) IMB_metadata_change_field(ibuf, "File", stamp_data.file);
+ if (stamp_data.note[0]) IMB_metadata_change_field(ibuf, "Note", stamp_data.note);
+ if (stamp_data.date[0]) IMB_metadata_change_field(ibuf, "Date", stamp_data.date);
+ if (stamp_data.marker[0]) IMB_metadata_change_field(ibuf, "Marker", stamp_data.marker);
+ if (stamp_data.time[0]) IMB_metadata_change_field(ibuf, "Time", stamp_data.time);
+ if (stamp_data.frame[0]) IMB_metadata_change_field(ibuf, "Frame", stamp_data.frame);
+ if (stamp_data.camera[0]) IMB_metadata_change_field(ibuf, "Camera", stamp_data.camera);
+ if (stamp_data.cameralens[0]) IMB_metadata_change_field(ibuf, "Lens", stamp_data.cameralens);
+ if (stamp_data.scene[0]) IMB_metadata_change_field(ibuf, "Scene", stamp_data.scene);
+ if (stamp_data.strip[0]) IMB_metadata_change_field(ibuf, "Strip", stamp_data.strip);
+ if (stamp_data.rendertime[0]) IMB_metadata_change_field(ibuf, "RenderTime", stamp_data.rendertime);
}
-int BKE_alphatest_ibuf(ImBuf *ibuf)
+int BKE_imbuf_alpha_test(ImBuf *ibuf)
{
int tot;
if (ibuf->rect_float) {
- float *buf= ibuf->rect_float;
- for (tot= ibuf->x * ibuf->y; tot--; buf+=4) {
+ float *buf = ibuf->rect_float;
+ for (tot = ibuf->x * ibuf->y; tot--; buf += 4) {
if (buf[3] < 1.0f) {
return TRUE;
}
}
}
else if (ibuf->rect) {
- unsigned char *buf= (unsigned char *)ibuf->rect;
- for (tot= ibuf->x * ibuf->y; tot--; buf+=4) {
+ unsigned char *buf = (unsigned char *)ibuf->rect;
+ for (tot = ibuf->x * ibuf->y; tot--; buf += 4) {
if (buf[3] != 255) {
return TRUE;
}
@@ -1566,75 +1578,75 @@ int BKE_alphatest_ibuf(ImBuf *ibuf)
/* note: imf->planes is ignored here, its assumed the image channels
* are already set */
-int BKE_write_ibuf(ImBuf *ibuf, const char *name, ImageFormatData *imf)
+int BKE_imbuf_write(ImBuf *ibuf, const char *name, ImageFormatData *imf)
{
- char imtype= imf->imtype;
- char compress= imf->compress;
- char quality= imf->quality;
+ char imtype = imf->imtype;
+ char compress = imf->compress;
+ char quality = imf->quality;
int ok;
- if (imtype== R_IMF_IMTYPE_IRIS) {
- ibuf->ftype= IMAGIC;
+ if (imtype == R_IMF_IMTYPE_IRIS) {
+ ibuf->ftype = IMAGIC;
}
#ifdef WITH_HDR
- else if (imtype==R_IMF_IMTYPE_RADHDR) {
- ibuf->ftype= RADHDR;
+ else if (imtype == R_IMF_IMTYPE_RADHDR) {
+ ibuf->ftype = RADHDR;
}
#endif
else if (ELEM5(imtype, R_IMF_IMTYPE_PNG, R_IMF_IMTYPE_FFMPEG, R_IMF_IMTYPE_H264, R_IMF_IMTYPE_THEORA, R_IMF_IMTYPE_XVID)) {
- ibuf->ftype= PNG;
+ ibuf->ftype = PNG;
- if (imtype==R_IMF_IMTYPE_PNG)
+ if (imtype == R_IMF_IMTYPE_PNG)
ibuf->ftype |= compress;
}
#ifdef WITH_DDS
- else if (imtype==R_IMF_IMTYPE_DDS) {
- ibuf->ftype= DDS;
+ else if (imtype == R_IMF_IMTYPE_DDS) {
+ ibuf->ftype = DDS;
}
#endif
- else if (imtype==R_IMF_IMTYPE_BMP) {
- ibuf->ftype= BMP;
+ else if (imtype == R_IMF_IMTYPE_BMP) {
+ ibuf->ftype = BMP;
}
#ifdef WITH_TIFF
- else if (imtype==R_IMF_IMTYPE_TIFF) {
- ibuf->ftype= TIF;
+ else if (imtype == R_IMF_IMTYPE_TIFF) {
+ ibuf->ftype = TIF;
if (imf->depth == R_IMF_CHAN_DEPTH_16)
ibuf->ftype |= TIF_16BIT;
}
#endif
#ifdef WITH_OPENEXR
- else if (imtype==R_IMF_IMTYPE_OPENEXR || imtype==R_IMF_IMTYPE_MULTILAYER) {
- ibuf->ftype= OPENEXR;
+ else if (imtype == R_IMF_IMTYPE_OPENEXR || imtype == R_IMF_IMTYPE_MULTILAYER) {
+ ibuf->ftype = OPENEXR;
if (imf->depth == R_IMF_CHAN_DEPTH_16)
ibuf->ftype |= OPENEXR_HALF;
ibuf->ftype |= (imf->exr_codec & OPENEXR_COMPRESS);
if (!(imf->flag & R_IMF_FLAG_ZBUF))
- ibuf->zbuf_float = NULL; /* signal for exr saving */
+ ibuf->zbuf_float = NULL; /* signal for exr saving */
}
#endif
#ifdef WITH_CINEON
- else if (imtype==R_IMF_IMTYPE_CINEON) {
+ else if (imtype == R_IMF_IMTYPE_CINEON) {
ibuf->ftype = CINEON;
}
- else if (imtype==R_IMF_IMTYPE_DPX) {
+ else if (imtype == R_IMF_IMTYPE_DPX) {
ibuf->ftype = DPX;
}
#endif
- else if (imtype==R_IMF_IMTYPE_TARGA) {
- ibuf->ftype= TGA;
+ else if (imtype == R_IMF_IMTYPE_TARGA) {
+ ibuf->ftype = TGA;
}
- else if (imtype==R_IMF_IMTYPE_RAWTGA) {
- ibuf->ftype= RAWTGA;
+ else if (imtype == R_IMF_IMTYPE_RAWTGA) {
+ ibuf->ftype = RAWTGA;
}
#ifdef WITH_OPENJPEG
- else if (imtype==R_IMF_IMTYPE_JP2) {
- if (quality < 10) quality= 90;
- ibuf->ftype= JP2|quality;
+ else if (imtype == R_IMF_IMTYPE_JP2) {
+ if (quality < 10) quality = 90;
+ ibuf->ftype = JP2 | quality;
if (imf->depth == R_IMF_CHAN_DEPTH_16) {
ibuf->ftype |= JP2_16BIT;
@@ -1656,8 +1668,8 @@ int BKE_write_ibuf(ImBuf *ibuf, const char *name, ImageFormatData *imf)
#endif
else {
/* R_IMF_IMTYPE_JPEG90, etc. default we save jpegs */
- if (quality < 10) quality= 90;
- ibuf->ftype= JPG|quality;
+ if (quality < 10) quality = 90;
+ ibuf->ftype = JPG | quality;
}
BLI_make_existing_file(name);
@@ -1670,42 +1682,42 @@ int BKE_write_ibuf(ImBuf *ibuf, const char *name, ImageFormatData *imf)
return(ok);
}
-/* same as BKE_write_ibuf() but crappy workaround not to perminantly modify
+/* same as BKE_imbuf_write() but crappy workaround not to perminantly modify
* _some_, values in the imbuf */
-int BKE_write_ibuf_as(ImBuf *ibuf, const char *name, ImageFormatData *imf,
- const short save_copy)
+int BKE_imbuf_write_as(ImBuf *ibuf, const char *name, ImageFormatData *imf,
+ const short save_copy)
{
- ImBuf ibuf_back= *ibuf;
+ ImBuf ibuf_back = *ibuf;
int ok;
/* all data is rgba anyway,
* this just controls how to save for some formats */
- ibuf->planes= imf->planes;
+ ibuf->planes = imf->planes;
- ok= BKE_write_ibuf(ibuf, name, imf);
+ ok = BKE_imbuf_write(ibuf, name, imf);
if (save_copy) {
/* note that we are not restoring _all_ settings */
- ibuf->planes= ibuf_back.planes;
- ibuf->ftype= ibuf_back.ftype;
+ ibuf->planes = ibuf_back.planes;
+ ibuf->ftype = ibuf_back.ftype;
}
return ok;
}
-int BKE_write_ibuf_stamp(Scene *scene, struct Object *camera, ImBuf *ibuf, const char *name, struct ImageFormatData *imf)
+int BKE_imbuf_write_stamp(Scene *scene, struct Object *camera, ImBuf *ibuf, const char *name, struct ImageFormatData *imf)
{
if (scene && scene->r.stamp & R_STAMP_ALL)
- BKE_stamp_info(scene, camera, ibuf);
+ BKE_imbuf_stamp_info(scene, camera, ibuf);
- return BKE_write_ibuf(ibuf, name, imf);
+ return BKE_imbuf_write(ibuf, name, imf);
}
void BKE_makepicstring(char *string, const char *base, const char *relbase, int frame, const char imtype, const short use_ext, const short use_frames)
{
- if (string==NULL) return;
- BLI_strncpy(string, base, FILE_MAX - 10); /* weak assumption */
+ if (string == NULL) return;
+ BLI_strncpy(string, base, FILE_MAX - 10); /* weak assumption */
BLI_path_abs(string, relbase);
if (use_frames)
@@ -1717,8 +1729,7 @@ void BKE_makepicstring(char *string, const char *base, const char *relbase, int
}
/* used by sequencer too */
-struct anim *openanim(const char *name, int flags, int streamindex)
-{
+struct anim *openanim(const char *name, int flags, int streamindex){
struct anim *anim;
struct ImBuf *ibuf;
@@ -1766,16 +1777,16 @@ Image *BKE_image_verify_viewer(int type, const char *name)
{
Image *ima;
- for (ima=G.main->image.first; ima; ima= ima->id.next)
- if (ima->source==IMA_SRC_VIEWER)
- if (ima->type==type)
+ for (ima = G.main->image.first; ima; ima = ima->id.next)
+ if (ima->source == IMA_SRC_VIEWER)
+ if (ima->type == type)
break;
- if (ima==NULL)
- ima= image_alloc(name, IMA_SRC_VIEWER, type);
+ if (ima == NULL)
+ ima = image_alloc(name, IMA_SRC_VIEWER, type);
/* happens on reload, imagewindow cannot be image user when hidden*/
- if (ima->id.us==0)
+ if (ima->id.us == 0)
id_us_plus(&ima->id);
return ima;
@@ -1788,78 +1799,78 @@ void BKE_image_assign_ibuf(Image *ima, ImBuf *ibuf)
void BKE_image_signal(Image *ima, ImageUser *iuser, int signal)
{
- if (ima==NULL)
+ if (ima == NULL)
return;
- switch(signal) {
- case IMA_SIGNAL_FREE:
- image_free_buffers(ima);
- if (iuser)
- iuser->ok= 1;
- break;
- case IMA_SIGNAL_SRC_CHANGE:
- if (ima->type == IMA_TYPE_UV_TEST)
- if (ima->source != IMA_SRC_GENERATED)
- ima->type= IMA_TYPE_IMAGE;
-
- if (ima->source==IMA_SRC_GENERATED) {
- if (ima->gen_x==0 || ima->gen_y==0) {
- ImBuf *ibuf= image_get_ibuf(ima, IMA_NO_INDEX, 0);
- if (ibuf) {
- ima->gen_x= ibuf->x;
- ima->gen_y= ibuf->y;
+ switch (signal) {
+ case IMA_SIGNAL_FREE:
+ image_free_buffers(ima);
+ if (iuser)
+ iuser->ok = 1;
+ break;
+ case IMA_SIGNAL_SRC_CHANGE:
+ if (ima->type == IMA_TYPE_UV_TEST)
+ if (ima->source != IMA_SRC_GENERATED)
+ ima->type = IMA_TYPE_IMAGE;
+
+ if (ima->source == IMA_SRC_GENERATED) {
+ if (ima->gen_x == 0 || ima->gen_y == 0) {
+ ImBuf *ibuf = image_get_ibuf(ima, IMA_NO_INDEX, 0);
+ if (ibuf) {
+ ima->gen_x = ibuf->x;
+ ima->gen_y = ibuf->y;
+ }
}
}
- }
-
- /* force reload on first use, but not for multilayer, that makes nodes and buttons in ui drawing fail */
- if (ima->type!=IMA_TYPE_MULTILAYER)
- image_free_buffers(ima);
- ima->ok= 1;
- if (iuser)
- iuser->ok= 1;
- break;
-
- case IMA_SIGNAL_RELOAD:
- /* try to repack file */
- if (ima->packedfile) {
- PackedFile *pf;
- pf = newPackedFile(NULL, ima->name, ID_BLEND_PATH(G.main, &ima->id));
- if (pf) {
- freePackedFile(ima->packedfile);
- ima->packedfile = pf;
+ /* force reload on first use, but not for multilayer, that makes nodes and buttons in ui drawing fail */
+ if (ima->type != IMA_TYPE_MULTILAYER)
image_free_buffers(ima);
+
+ ima->ok = 1;
+ if (iuser)
+ iuser->ok = 1;
+ break;
+
+ case IMA_SIGNAL_RELOAD:
+ /* try to repack file */
+ if (ima->packedfile) {
+ PackedFile *pf;
+ pf = newPackedFile(NULL, ima->name, ID_BLEND_PATH(G.main, &ima->id));
+ if (pf) {
+ freePackedFile(ima->packedfile);
+ ima->packedfile = pf;
+ image_free_buffers(ima);
+ }
+ else {
+ printf("ERROR: Image not available. Keeping packed image\n");
+ }
}
- else {
- printf("ERROR: Image not available. Keeping packed image\n");
- }
- }
- else
- image_free_buffers(ima);
+ else
+ image_free_buffers(ima);
- if (iuser)
- iuser->ok= 1;
+ if (iuser)
+ iuser->ok = 1;
- break;
- case IMA_SIGNAL_USER_NEW_IMAGE:
- if (iuser) {
- iuser->ok= 1;
- if (ima->source==IMA_SRC_FILE || ima->source==IMA_SRC_SEQUENCE) {
- if (ima->type==IMA_TYPE_MULTILAYER) {
- iuser->multi_index= 0;
- iuser->layer= iuser->pass= 0;
+ break;
+ case IMA_SIGNAL_USER_NEW_IMAGE:
+ if (iuser) {
+ iuser->ok = 1;
+ if (ima->source == IMA_SRC_FILE || ima->source == IMA_SRC_SEQUENCE) {
+ if (ima->type == IMA_TYPE_MULTILAYER) {
+ iuser->multi_index = 0;
+ iuser->layer = iuser->pass = 0;
+ }
}
}
- }
- break;
+ break;
}
/* don't use notifiers because they are not 100% sure to succeeded
* this also makes sure all scenes are accounted for. */
{
Scene *scene;
- for (scene= G.main->scene.first; scene; scene= scene->id.next) {
+ for (scene = G.main->scene.first; scene; scene = scene->id.next) {
if (scene->nodetree) {
nodeUpdateID(scene->nodetree, &ima->id);
}
@@ -1873,32 +1884,32 @@ void BKE_image_signal(Image *ima, ImageUser *iuser, int signal)
RenderPass *BKE_image_multilayer_index(RenderResult *rr, ImageUser *iuser)
{
RenderLayer *rl;
- RenderPass *rpass= NULL;
+ RenderPass *rpass = NULL;
- if (rr==NULL)
+ if (rr == NULL)
return NULL;
if (iuser) {
- short index= 0, rl_index= 0, rp_index;
+ short index = 0, rl_index = 0, rp_index;
- for (rl= rr->layers.first; rl; rl= rl->next, rl_index++) {
- rp_index= 0;
- for (rpass= rl->passes.first; rpass; rpass= rpass->next, index++, rp_index++)
- if (iuser->layer==rl_index && iuser->pass==rp_index)
+ for (rl = rr->layers.first; rl; rl = rl->next, rl_index++) {
+ rp_index = 0;
+ for (rpass = rl->passes.first; rpass; rpass = rpass->next, index++, rp_index++)
+ if (iuser->layer == rl_index && iuser->pass == rp_index)
break;
if (rpass)
break;
}
if (rpass)
- iuser->multi_index= index;
+ iuser->multi_index = index;
else
- iuser->multi_index= 0;
+ iuser->multi_index = 0;
}
- if (rpass==NULL) {
- rl= rr->layers.first;
+ if (rpass == NULL) {
+ rl = rr->layers.first;
if (rl)
- rpass= rl->passes.first;
+ rpass = rl->passes.first;
}
return rpass;
@@ -1909,7 +1920,7 @@ RenderResult *BKE_image_acquire_renderresult(Scene *scene, Image *ima)
if (ima->rr) {
return ima->rr;
}
- else if (ima->type==IMA_TYPE_R_RESULT) {
+ else if (ima->type == IMA_TYPE_R_RESULT) {
if (ima->render_slot == ima->last_render_slot)
return RE_AcquireResultRead(RE_GetRender(scene->id.name));
else
@@ -1921,8 +1932,8 @@ RenderResult *BKE_image_acquire_renderresult(Scene *scene, Image *ima)
void BKE_image_release_renderresult(Scene *scene, Image *ima)
{
- if (ima->rr);
- else if (ima->type==IMA_TYPE_R_RESULT) {
+ if (ima->rr) ;
+ else if (ima->type == IMA_TYPE_R_RESULT) {
if (ima->render_slot == ima->last_render_slot)
RE_ReleaseResult(RE_GetRender(scene->id.name));
}
@@ -1932,20 +1943,20 @@ void BKE_image_backup_render(Scene *scene, Image *ima)
{
/* called right before rendering, ima->renders contains render
* result pointers for everything but the current render */
- Render *re= RE_GetRender(scene->id.name);
- int slot= ima->render_slot, last= ima->last_render_slot;
+ Render *re = RE_GetRender(scene->id.name);
+ int slot = ima->render_slot, last = ima->last_render_slot;
if (slot != last) {
if (ima->renders[slot]) {
RE_FreeRenderResult(ima->renders[slot]);
- ima->renders[slot]= NULL;
+ ima->renders[slot] = NULL;
}
- ima->renders[last]= NULL;
+ ima->renders[last] = NULL;
RE_SwapResult(re, &ima->renders[last]);
}
- ima->last_render_slot= slot;
+ ima->last_render_slot = slot;
}
/* after imbuf load, openexr type can return with a exrhandle open */
@@ -1953,22 +1964,22 @@ void BKE_image_backup_render(Scene *scene, Image *ima)
static void image_create_multilayer(Image *ima, ImBuf *ibuf, int framenr)
{
- ima->rr= RE_MultilayerConvert(ibuf->userdata, ibuf->x, ibuf->y);
+ ima->rr = RE_MultilayerConvert(ibuf->userdata, ibuf->x, ibuf->y);
#ifdef WITH_OPENEXR
IMB_exr_close(ibuf->userdata);
#endif
- ibuf->userdata= NULL;
+ ibuf->userdata = NULL;
if (ima->rr)
- ima->rr->framenr= framenr;
+ ima->rr->framenr = framenr;
}
/* common stuff to do with images after loading */
static void image_initialize_after_load(Image *ima, ImBuf *ibuf)
{
/* preview is NULL when it has never been used as an icon before */
- if (G.background==0 && ima->preview==NULL)
+ if (G.background == 0 && ima->preview == NULL)
BKE_icon_changed(BKE_icon_getid(&ima->id));
/* fields */
@@ -1979,7 +1990,7 @@ static void image_initialize_after_load(Image *ima, ImBuf *ibuf)
/* timer */
ima->lastused = clock() / CLOCKS_PER_SEC;
- ima->ok= IMA_OK_LOADED;
+ ima->ok = IMA_OK_LOADED;
}
@@ -1994,14 +2005,14 @@ static ImBuf *image_load_sequence_file(Image *ima, ImageUser *iuser, int frame)
if (ima->lastframe != frame)
ima->tpageflag |= IMA_TPAGE_REFRESH;
- ima->lastframe= frame;
+ ima->lastframe = frame;
BLI_strncpy(name, ima->name, sizeof(name));
BLI_stringdec(name, head, tail, &numlen);
BLI_stringenc(name, head, tail, numlen, frame);
BLI_path_abs(name, ID_BLEND_PATH(G.main, &ima->id));
- flag= IB_rect|IB_multilayer;
+ flag = IB_rect | IB_multilayer;
if (ima->flag & IMA_DO_PREMUL)
flag |= IB_premul;
@@ -2010,21 +2021,21 @@ static ImBuf *image_load_sequence_file(Image *ima, ImageUser *iuser, int frame)
#if 0
if (ibuf) {
- printf(AT" loaded %s\n", name);
+ printf(AT " loaded %s\n", name);
}
else {
- printf(AT" missed %s\n", name);
+ printf(AT " missed %s\n", name);
}
#endif
if (ibuf) {
#ifdef WITH_OPENEXR
/* handle multilayer case, don't assign ibuf. will be handled in BKE_image_get_ibuf */
- if (ibuf->ftype==OPENEXR && ibuf->userdata) {
+ if (ibuf->ftype == OPENEXR && ibuf->userdata) {
image_create_multilayer(ima, ibuf, frame);
- ima->type= IMA_TYPE_MULTILAYER;
+ ima->type = IMA_TYPE_MULTILAYER;
IMB_freeImBuf(ibuf);
- ibuf= NULL;
+ ibuf = NULL;
}
else {
image_initialize_after_load(ima, ibuf);
@@ -2036,30 +2047,30 @@ static ImBuf *image_load_sequence_file(Image *ima, ImageUser *iuser, int frame)
#endif
}
else
- ima->ok= 0;
+ ima->ok = 0;
if (iuser)
- iuser->ok= ima->ok;
+ iuser->ok = ima->ok;
return ibuf;
}
static ImBuf *image_load_sequence_multilayer(Image *ima, ImageUser *iuser, int frame)
{
- struct ImBuf *ibuf= NULL;
+ struct ImBuf *ibuf = NULL;
/* either we load from RenderResult, or we have to load a new one */
/* check for new RenderResult */
- if (ima->rr==NULL || frame!=ima->rr->framenr) {
+ if (ima->rr == NULL || frame != ima->rr->framenr) {
/* copy to survive not found multilayer image */
- RenderResult *oldrr= ima->rr;
+ RenderResult *oldrr = ima->rr;
- ima->rr= NULL;
+ ima->rr = NULL;
ibuf = image_load_sequence_file(ima, iuser, frame);
if (ibuf) { /* actually an error */
- ima->type= IMA_TYPE_IMAGE;
+ ima->type = IMA_TYPE_IMAGE;
printf("error, multi is normal image\n");
}
// printf("loaded new result %p\n", ima->rr);
@@ -2069,34 +2080,34 @@ static ImBuf *image_load_sequence_multilayer(Image *ima, ImageUser *iuser, int f
if (oldrr) RE_FreeRenderResult(oldrr);
}
else {
- ima->rr= oldrr;
+ ima->rr = oldrr;
}
}
if (ima->rr) {
- RenderPass *rpass= BKE_image_multilayer_index(ima->rr, iuser);
+ RenderPass *rpass = BKE_image_multilayer_index(ima->rr, iuser);
if (rpass) {
// printf("load from pass %s\n", rpass->name);
/* since we free render results, we copy the rect */
- ibuf= IMB_allocImBuf(ima->rr->rectx, ima->rr->recty, 32, 0);
- ibuf->rect_float= MEM_dupallocN(rpass->rect);
+ ibuf = IMB_allocImBuf(ima->rr->rectx, ima->rr->recty, 32, 0);
+ ibuf->rect_float = MEM_dupallocN(rpass->rect);
ibuf->flags |= IB_rectfloat;
- ibuf->mall= IB_rectfloat;
- ibuf->channels= rpass->channels;
+ ibuf->mall = IB_rectfloat;
+ ibuf->channels = rpass->channels;
ibuf->profile = IB_PROFILE_LINEAR_RGB;
image_initialize_after_load(ima, ibuf);
- image_assign_ibuf(ima, ibuf, iuser?iuser->multi_index:0, frame);
+ image_assign_ibuf(ima, ibuf, iuser ? iuser->multi_index : 0, frame);
}
// else printf("pass not found\n");
}
else
- ima->ok= 0;
+ ima->ok = 0;
if (iuser)
- iuser->ok= ima->ok;
+ iuser->ok = ima->ok;
return ibuf;
}
@@ -2104,11 +2115,11 @@ static ImBuf *image_load_sequence_multilayer(Image *ima, ImageUser *iuser, int f
static ImBuf *image_load_movie_file(Image *ima, ImageUser *iuser, int frame)
{
- struct ImBuf *ibuf= NULL;
+ struct ImBuf *ibuf = NULL;
- ima->lastframe= frame;
+ ima->lastframe = frame;
- if (ima->anim==NULL) {
+ if (ima->anim == NULL) {
char str[FILE_MAX];
BLI_strncpy(str, ima->name, FILE_MAX);
@@ -2118,35 +2129,35 @@ static ImBuf *image_load_movie_file(Image *ima, ImageUser *iuser, int frame)
ima->anim = openanim(str, IB_rect, 0);
/* let's initialize this user */
- if (ima->anim && iuser && iuser->frames==0)
- iuser->frames= IMB_anim_get_duration(ima->anim,
- IMB_TC_RECORD_RUN);
+ if (ima->anim && iuser && iuser->frames == 0)
+ iuser->frames = IMB_anim_get_duration(ima->anim,
+ IMB_TC_RECORD_RUN);
}
if (ima->anim) {
int dur = IMB_anim_get_duration(ima->anim,
- IMB_TC_RECORD_RUN);
- int fra= frame-1;
+ IMB_TC_RECORD_RUN);
+ int fra = frame - 1;
- if (fra<0) fra = 0;
- if (fra>(dur-1)) fra= dur-1;
+ if (fra < 0) fra = 0;
+ if (fra > (dur - 1)) fra = dur - 1;
ibuf = IMB_makeSingleUser(
- IMB_anim_absolute(ima->anim, fra,
- IMB_TC_RECORD_RUN,
- IMB_PROXY_NONE));
+ IMB_anim_absolute(ima->anim, fra,
+ IMB_TC_RECORD_RUN,
+ IMB_PROXY_NONE));
if (ibuf) {
image_initialize_after_load(ima, ibuf);
image_assign_ibuf(ima, ibuf, 0, frame);
}
else
- ima->ok= 0;
+ ima->ok = 0;
}
else
- ima->ok= 0;
+ ima->ok = 0;
if (iuser)
- iuser->ok= ima->ok;
+ iuser->ok = ima->ok;
return ibuf;
}
@@ -2163,13 +2174,13 @@ static ImBuf *image_load_image_file(Image *ima, ImageUser *iuser, int cfra)
/* is there a PackedFile with this image ? */
if (ima->packedfile) {
- flag = IB_rect|IB_multilayer;
+ flag = IB_rect | IB_multilayer;
if (ima->flag & IMA_DO_PREMUL) flag |= IB_premul;
- ibuf = IMB_ibImageFromMemory((unsigned char*)ima->packedfile->data, ima->packedfile->size, flag, "<packed data>");
+ ibuf = IMB_ibImageFromMemory((unsigned char *)ima->packedfile->data, ima->packedfile->size, flag, "<packed data>");
}
else {
- flag= IB_rect|IB_multilayer|IB_metadata;
+ flag = IB_rect | IB_multilayer | IB_metadata;
if (ima->flag & IMA_DO_PREMUL)
flag |= IB_premul;
@@ -2183,15 +2194,15 @@ static ImBuf *image_load_image_file(Image *ima, ImageUser *iuser, int cfra)
if (ibuf) {
/* handle multilayer case, don't assign ibuf. will be handled in BKE_image_get_ibuf */
- if (ibuf->ftype==OPENEXR && ibuf->userdata) {
+ if (ibuf->ftype == OPENEXR && ibuf->userdata) {
image_create_multilayer(ima, ibuf, cfra);
- ima->type= IMA_TYPE_MULTILAYER;
+ ima->type = IMA_TYPE_MULTILAYER;
IMB_freeImBuf(ibuf);
- ibuf= NULL;
+ ibuf = NULL;
}
else {
image_initialize_after_load(ima, ibuf);
- assign= 1;
+ assign = 1;
/* check if the image is a font image... */
detectBitmapFont(ibuf);
@@ -2202,49 +2213,49 @@ static ImBuf *image_load_image_file(Image *ima, ImageUser *iuser, int cfra)
}
}
else
- ima->ok= 0;
+ ima->ok = 0;
if (assign)
image_assign_ibuf(ima, ibuf, IMA_NO_INDEX, 0);
if (iuser)
- iuser->ok= ima->ok;
+ iuser->ok = ima->ok;
return ibuf;
}
static ImBuf *image_get_ibuf_multilayer(Image *ima, ImageUser *iuser)
{
- ImBuf *ibuf= NULL;
+ ImBuf *ibuf = NULL;
- if (ima->rr==NULL) {
+ if (ima->rr == NULL) {
ibuf = image_load_image_file(ima, iuser, 0);
if (ibuf) { /* actually an error */
- ima->type= IMA_TYPE_IMAGE;
+ ima->type = IMA_TYPE_IMAGE;
return ibuf;
}
}
if (ima->rr) {
- RenderPass *rpass= BKE_image_multilayer_index(ima->rr, iuser);
+ RenderPass *rpass = BKE_image_multilayer_index(ima->rr, iuser);
if (rpass) {
- ibuf= IMB_allocImBuf(ima->rr->rectx, ima->rr->recty, 32, 0);
+ ibuf = IMB_allocImBuf(ima->rr->rectx, ima->rr->recty, 32, 0);
image_initialize_after_load(ima, ibuf);
- ibuf->rect_float= rpass->rect;
+ ibuf->rect_float = rpass->rect;
ibuf->flags |= IB_rectfloat;
- ibuf->channels= rpass->channels;
+ ibuf->channels = rpass->channels;
ibuf->profile = IB_PROFILE_LINEAR_RGB;
- image_assign_ibuf(ima, ibuf, iuser?iuser->multi_index:IMA_NO_INDEX, 0);
+ image_assign_ibuf(ima, ibuf, iuser ? iuser->multi_index : IMA_NO_INDEX, 0);
}
}
- if (ibuf==NULL)
- ima->ok= 0;
+ if (ibuf == NULL)
+ ima->ok = 0;
if (iuser)
- iuser->ok= ima->ok;
+ iuser->ok = ima->ok;
return ibuf;
}
@@ -2262,7 +2273,7 @@ static ImBuf *image_get_render_result(Image *ima, ImageUser *iuser, void **lock_
float dither;
int channels, layer, pass;
ImBuf *ibuf;
- int from_render= (ima->render_slot == ima->last_render_slot);
+ int from_render = (ima->render_slot == ima->last_render_slot);
if (!(iuser && iuser->scene))
return NULL;
@@ -2271,18 +2282,18 @@ static ImBuf *image_get_render_result(Image *ima, ImageUser *iuser, void **lock_
if (!lock_r)
return NULL;
- re= RE_GetRender(iuser->scene->id.name);
+ re = RE_GetRender(iuser->scene->id.name);
- channels= 4;
- layer= (iuser)? iuser->layer: 0;
- pass= (iuser)? iuser->pass: 0;
+ channels = 4;
+ layer = (iuser) ? iuser->layer : 0;
+ pass = (iuser) ? iuser->pass : 0;
if (from_render) {
RE_AcquireResultImage(re, &rres);
}
else if (ima->renders[ima->render_slot]) {
- rres= *(ima->renders[ima->render_slot]);
- rres.have_combined= rres.rectf != NULL;
+ rres = *(ima->renders[ima->render_slot]);
+ rres.have_combined = rres.rectf != NULL;
}
else
memset(&rres, 0, sizeof(RenderResult));
@@ -2296,83 +2307,83 @@ static ImBuf *image_get_render_result(Image *ima, ImageUser *iuser, void **lock_
/* release is done in BKE_image_release_ibuf using lock_r */
if (from_render) {
BLI_lock_thread(LOCK_VIEWER);
- *lock_r= re;
+ *lock_r = re;
}
/* this gives active layer, composite or seqence result */
- rect= (unsigned int *)rres.rect32;
- rectf= rres.rectf;
- rectz= rres.rectz;
- dither= iuser->scene->r.dither_intensity;
+ rect = (unsigned int *)rres.rect32;
+ rectf = rres.rectf;
+ rectz = rres.rectz;
+ dither = iuser->scene->r.dither_intensity;
/* combined layer gets added as first layer */
- if (rres.have_combined && layer==0);
+ if (rres.have_combined && layer == 0) ;
else if (rres.layers.first) {
- RenderLayer *rl= BLI_findlink(&rres.layers, layer-(rres.have_combined?1:0));
+ RenderLayer *rl = BLI_findlink(&rres.layers, layer - (rres.have_combined ? 1 : 0));
if (rl) {
RenderPass *rpass;
/* there's no combined pass, is in renderlayer itself */
- if (pass==0) {
- rectf= rl->rectf;
+ if (pass == 0) {
+ rectf = rl->rectf;
}
else {
- rpass= BLI_findlink(&rl->passes, pass-1);
+ rpass = BLI_findlink(&rl->passes, pass - 1);
if (rpass) {
- channels= rpass->channels;
- rectf= rpass->rect;
- dither= 0.0f; /* don't dither passes */
+ channels = rpass->channels;
+ rectf = rpass->rect;
+ dither = 0.0f; /* don't dither passes */
}
}
- for (rpass= rl->passes.first; rpass; rpass= rpass->next)
+ for (rpass = rl->passes.first; rpass; rpass = rpass->next)
if (rpass->passtype == SCE_PASS_Z)
- rectz= rpass->rect;
+ rectz = rpass->rect;
}
}
- ibuf= image_get_ibuf(ima, IMA_NO_INDEX, 0);
+ ibuf = image_get_ibuf(ima, IMA_NO_INDEX, 0);
/* make ibuf if needed, and initialize it */
- if (ibuf==NULL) {
- ibuf= IMB_allocImBuf(rres.rectx, rres.recty, 32, 0);
+ if (ibuf == NULL) {
+ ibuf = IMB_allocImBuf(rres.rectx, rres.recty, 32, 0);
image_assign_ibuf(ima, ibuf, IMA_NO_INDEX, 0);
}
- ibuf->x= rres.rectx;
- ibuf->y= rres.recty;
+ ibuf->x = rres.rectx;
+ ibuf->y = rres.recty;
/* free rect buffer if float buffer changes, so it can be recreated with
* the updated result, and also in case we got byte buffer from sequencer,
* so we don't keep reference to freed buffer */
- if (ibuf->rect_float!=rectf || rect || !rectf)
+ if (ibuf->rect_float != rectf || rect || !rectf)
imb_freerectImBuf(ibuf);
if (rect)
- ibuf->rect= rect;
+ ibuf->rect = rect;
if (rectf) {
- ibuf->rect_float= rectf;
+ ibuf->rect_float = rectf;
ibuf->flags |= IB_rectfloat;
- ibuf->channels= channels;
+ ibuf->channels = channels;
}
else {
- ibuf->rect_float= NULL;
+ ibuf->rect_float = NULL;
ibuf->flags &= ~IB_rectfloat;
}
if (rectz) {
- ibuf->zbuf_float= rectz;
+ ibuf->zbuf_float = rectz;
ibuf->flags |= IB_zbuffloat;
}
else {
- ibuf->zbuf_float= NULL;
+ ibuf->zbuf_float = NULL;
ibuf->flags &= ~IB_zbuffloat;
}
/* since its possible to access the buffer from the image directly, set the profile [#25073] */
- ibuf->profile= (iuser->scene->r.color_mgt_flag & R_COLOR_MANAGEMENT) ? IB_PROFILE_LINEAR_RGB : IB_PROFILE_NONE;
- ibuf->dither= dither;
+ ibuf->profile = (iuser->scene->r.color_mgt_flag & R_COLOR_MANAGEMENT) ? IB_PROFILE_LINEAR_RGB : IB_PROFILE_NONE;
+ ibuf->dither = dither;
if (iuser->scene->r.color_mgt_flag & R_COLOR_MANAGEMENT_PREDIVIDE) {
ibuf->flags |= IB_cm_predivide;
@@ -2383,7 +2394,7 @@ static ImBuf *image_get_render_result(Image *ima, ImageUser *iuser, void **lock_
ima->flag &= ~IMA_CM_PREDIVIDE;
}
- ima->ok= IMA_OK_LOADED;
+ ima->ok = IMA_OK_LOADED;
return ibuf;
}
@@ -2394,18 +2405,18 @@ static ImBuf *image_get_ibuf_threadsafe(Image *ima, ImageUser *iuser, int *frame
int frame = 0, index = 0;
/* see if we already have an appropriate ibuf, with image source and type */
- if (ima->source==IMA_SRC_MOVIE) {
- frame= iuser?iuser->framenr:ima->lastframe;
- ibuf= image_get_ibuf(ima, 0, frame);
+ if (ima->source == IMA_SRC_MOVIE) {
+ frame = iuser ? iuser->framenr : ima->lastframe;
+ ibuf = image_get_ibuf(ima, 0, frame);
/* XXX temp stuff? */
if (ima->lastframe != frame)
ima->tpageflag |= IMA_TPAGE_REFRESH;
ima->lastframe = frame;
}
- else if (ima->source==IMA_SRC_SEQUENCE) {
- if (ima->type==IMA_TYPE_IMAGE) {
- frame= iuser?iuser->framenr:ima->lastframe;
- ibuf= image_get_ibuf(ima, 0, frame);
+ else if (ima->source == IMA_SRC_SEQUENCE) {
+ if (ima->type == IMA_TYPE_IMAGE) {
+ frame = iuser ? iuser->framenr : ima->lastframe;
+ ibuf = image_get_ibuf(ima, 0, frame);
/* XXX temp stuff? */
if (ima->lastframe != frame) {
@@ -2413,20 +2424,20 @@ static ImBuf *image_get_ibuf_threadsafe(Image *ima, ImageUser *iuser, int *frame
}
ima->lastframe = frame;
}
- else if (ima->type==IMA_TYPE_MULTILAYER) {
- frame= iuser?iuser->framenr:ima->lastframe;
- index= iuser?iuser->multi_index:IMA_NO_INDEX;
- ibuf= image_get_ibuf(ima, index, frame);
+ else if (ima->type == IMA_TYPE_MULTILAYER) {
+ frame = iuser ? iuser->framenr : ima->lastframe;
+ index = iuser ? iuser->multi_index : IMA_NO_INDEX;
+ ibuf = image_get_ibuf(ima, index, frame);
}
}
- else if (ima->source==IMA_SRC_FILE) {
- if (ima->type==IMA_TYPE_IMAGE)
- ibuf= image_get_ibuf(ima, IMA_NO_INDEX, 0);
- else if (ima->type==IMA_TYPE_MULTILAYER)
- ibuf= image_get_ibuf(ima, iuser?iuser->multi_index:IMA_NO_INDEX, 0);
+ else if (ima->source == IMA_SRC_FILE) {
+ if (ima->type == IMA_TYPE_IMAGE)
+ ibuf = image_get_ibuf(ima, IMA_NO_INDEX, 0);
+ else if (ima->type == IMA_TYPE_MULTILAYER)
+ ibuf = image_get_ibuf(ima, iuser ? iuser->multi_index : IMA_NO_INDEX, 0);
}
else if (ima->source == IMA_SRC_GENERATED) {
- ibuf= image_get_ibuf(ima, IMA_NO_INDEX, 0);
+ ibuf = image_get_ibuf(ima, IMA_NO_INDEX, 0);
}
else if (ima->source == IMA_SRC_VIEWER) {
/* always verify entirely, not that this shouldn't happen
@@ -2445,9 +2456,9 @@ static ImBuf *image_get_ibuf_threadsafe(Image *ima, ImageUser *iuser, int *frame
* if not, use BKE_image_get_ibuf which doesn't require a release */
ImBuf *BKE_image_acquire_ibuf(Image *ima, ImageUser *iuser, void **lock_r)
{
- ImBuf *ibuf= NULL;
+ ImBuf *ibuf = NULL;
float color[] = {0, 0, 0, 1};
- int frame= 0, index= 0;
+ int frame = 0, index = 0;
/* This function is intended to be thread-safe. It postpones the mutex lock
* until it needs to load the image, if the image is already there it
@@ -2461,20 +2472,20 @@ ImBuf *BKE_image_acquire_ibuf(Image *ima, ImageUser *iuser, void **lock_r)
* 2) set ima/iuser->ok to 0 to IMA_OK_LOADED */
if (lock_r)
- *lock_r= NULL;
+ *lock_r = NULL;
/* quick reject tests */
- if (ima==NULL)
+ if (ima == NULL)
return NULL;
if (iuser) {
- if (iuser->ok==0)
+ if (iuser->ok == 0)
return NULL;
}
- else if (ima->ok==0)
+ else if (ima->ok == 0)
return NULL;
/* try to get the ibuf without locking */
- ibuf= image_get_ibuf_threadsafe(ima, iuser, &frame, &index);
+ ibuf = image_get_ibuf_threadsafe(ima, iuser, &frame, &index);
if (ibuf == NULL) {
/* couldn't get ibuf and image is not ok, so let's lock and try to
@@ -2484,75 +2495,75 @@ ImBuf *BKE_image_acquire_ibuf(Image *ima, ImageUser *iuser, void **lock_r)
/* need to check ok flag and loading ibuf again, because the situation
* might have changed in the meantime */
if (iuser) {
- if (iuser->ok==0) {
+ if (iuser->ok == 0) {
BLI_unlock_thread(LOCK_IMAGE);
return NULL;
}
}
- else if (ima->ok==0) {
+ else if (ima->ok == 0) {
BLI_unlock_thread(LOCK_IMAGE);
return NULL;
}
- ibuf= image_get_ibuf_threadsafe(ima, iuser, &frame, &index);
+ ibuf = image_get_ibuf_threadsafe(ima, iuser, &frame, &index);
if (ibuf == NULL) {
/* we are sure we have to load the ibuf, using source and type */
- if (ima->source==IMA_SRC_MOVIE) {
+ if (ima->source == IMA_SRC_MOVIE) {
/* source is from single file, use flipbook to store ibuf */
- ibuf= image_load_movie_file(ima, iuser, frame);
+ ibuf = image_load_movie_file(ima, iuser, frame);
}
- else if (ima->source==IMA_SRC_SEQUENCE) {
- if (ima->type==IMA_TYPE_IMAGE) {
+ else if (ima->source == IMA_SRC_SEQUENCE) {
+ if (ima->type == IMA_TYPE_IMAGE) {
/* regular files, ibufs in flipbook, allows saving */
- ibuf= image_load_sequence_file(ima, iuser, frame);
+ ibuf = image_load_sequence_file(ima, iuser, frame);
}
/* no else; on load the ima type can change */
- if (ima->type==IMA_TYPE_MULTILAYER) {
+ if (ima->type == IMA_TYPE_MULTILAYER) {
/* only 1 layer/pass stored in imbufs, no exrhandle anim storage, no saving */
- ibuf= image_load_sequence_multilayer(ima, iuser, frame);
+ ibuf = image_load_sequence_multilayer(ima, iuser, frame);
}
}
- else if (ima->source==IMA_SRC_FILE) {
+ else if (ima->source == IMA_SRC_FILE) {
- if (ima->type==IMA_TYPE_IMAGE)
- ibuf= image_load_image_file(ima, iuser, frame); /* cfra only for '#', this global is OK */
+ if (ima->type == IMA_TYPE_IMAGE)
+ ibuf = image_load_image_file(ima, iuser, frame); /* cfra only for '#', this global is OK */
/* no else; on load the ima type can change */
- if (ima->type==IMA_TYPE_MULTILAYER)
+ if (ima->type == IMA_TYPE_MULTILAYER)
/* keeps render result, stores ibufs in listbase, allows saving */
- ibuf= image_get_ibuf_multilayer(ima, iuser);
+ ibuf = image_get_ibuf_multilayer(ima, iuser);
}
else if (ima->source == IMA_SRC_GENERATED) {
/* generated is: ibuf is allocated dynamically */
/* UV testgrid or black or solid etc */
- if (ima->gen_x==0) ima->gen_x= 1024;
- if (ima->gen_y==0) ima->gen_y= 1024;
- ibuf= add_ibuf_size(ima->gen_x, ima->gen_y, ima->name, 24, (ima->gen_flag & IMA_GEN_FLOAT) != 0, ima->gen_type, color);
+ if (ima->gen_x == 0) ima->gen_x = 1024;
+ if (ima->gen_y == 0) ima->gen_y = 1024;
+ ibuf = add_ibuf_size(ima->gen_x, ima->gen_y, ima->name, 24, (ima->gen_flag & IMA_GEN_FLOAT) != 0, ima->gen_type, color);
image_assign_ibuf(ima, ibuf, IMA_NO_INDEX, 0);
- ima->ok= IMA_OK_LOADED;
+ ima->ok = IMA_OK_LOADED;
}
else if (ima->source == IMA_SRC_VIEWER) {
- if (ima->type==IMA_TYPE_R_RESULT) {
+ if (ima->type == IMA_TYPE_R_RESULT) {
/* always verify entirely, and potentially
* returns pointer to release later */
- ibuf= image_get_render_result(ima, iuser, lock_r);
+ ibuf = image_get_render_result(ima, iuser, lock_r);
}
- else if (ima->type==IMA_TYPE_COMPOSITE) {
+ else if (ima->type == IMA_TYPE_COMPOSITE) {
/* requires lock/unlock, otherwise don't return image */
if (lock_r) {
/* unlock in BKE_image_release_ibuf */
BLI_lock_thread(LOCK_VIEWER);
- *lock_r= ima;
+ *lock_r = ima;
/* XXX anim play for viewer nodes not yet supported */
- frame= 0; // XXX iuser?iuser->framenr:0;
- ibuf= image_get_ibuf(ima, 0, frame);
+ frame = 0; // XXX iuser?iuser->framenr:0;
+ ibuf = image_get_ibuf(ima, 0, frame);
if (!ibuf) {
/* Composite Viewer, all handled in compositor */
/* fake ibuf, will be filled in compositor */
- ibuf= IMB_allocImBuf(256, 256, 32, IB_rect);
+ ibuf = IMB_allocImBuf(256, 256, 32, IB_rect);
image_assign_ibuf(ima, ibuf, 0, frame);
}
}
@@ -2563,7 +2574,7 @@ ImBuf *BKE_image_acquire_ibuf(Image *ima, ImageUser *iuser, void **lock_r)
BLI_unlock_thread(LOCK_IMAGE);
}
- tag_image_time(ima);
+ BKE_image_tag_time(ima);
return ibuf;
}
@@ -2587,57 +2598,57 @@ ImBuf *BKE_image_get_ibuf(Image *ima, ImageUser *iuser)
return BKE_image_acquire_ibuf(ima, iuser, NULL);
}
-int BKE_image_user_get_frame(const ImageUser *iuser, int cfra, int fieldnr)
+int BKE_image_user_frame_get(const ImageUser *iuser, int cfra, int fieldnr)
{
- const int len= (iuser->fie_ima*iuser->frames)/2;
+ const int len = (iuser->fie_ima * iuser->frames) / 2;
- if (len==0) {
+ if (len == 0) {
return 0;
}
else {
int framenr;
- cfra= cfra - iuser->sfra+1;
+ cfra = cfra - iuser->sfra + 1;
/* cyclic */
if (iuser->cycl) {
- cfra= ( (cfra) % len );
- if (cfra < 0) cfra+= len;
- if (cfra==0) cfra= len;
+ cfra = ((cfra) % len);
+ if (cfra < 0) cfra += len;
+ if (cfra == 0) cfra = len;
}
- if (cfra<0) cfra= 0;
- else if (cfra>len) cfra= len;
+ if (cfra < 0) cfra = 0;
+ else if (cfra > len) cfra = len;
/* convert current frame to current field */
- cfra= 2*(cfra);
+ cfra = 2 * (cfra);
if (fieldnr) cfra++;
/* transform to images space */
- framenr= (cfra+iuser->fie_ima-2)/iuser->fie_ima;
- if (framenr>iuser->frames) framenr= iuser->frames;
- framenr+= iuser->offset;
+ framenr = (cfra + iuser->fie_ima - 2) / iuser->fie_ima;
+ if (framenr > iuser->frames) framenr = iuser->frames;
+ framenr += iuser->offset;
if (iuser->cycl) {
- framenr= ( (framenr) % len );
- while (framenr < 0) framenr+= len;
- if (framenr==0) framenr= len;
+ framenr = ((framenr) % len);
+ while (framenr < 0) framenr += len;
+ if (framenr == 0) framenr = len;
}
return framenr;
}
}
-void BKE_image_user_calc_frame(ImageUser *iuser, int cfra, int fieldnr)
+void BKE_image_user_frame_calc(ImageUser *iuser, int cfra, int fieldnr)
{
- const int framenr= BKE_image_user_get_frame(iuser, cfra, fieldnr);
+ const int framenr = BKE_image_user_frame_get(iuser, cfra, fieldnr);
/* allows image users to handle redraws */
if (iuser->flag & IMA_ANIM_ALWAYS)
- if (framenr!=iuser->framenr)
+ if (framenr != iuser->framenr)
iuser->flag |= IMA_ANIM_REFRESHED;
- iuser->framenr= framenr;
- if (iuser->ok==0) iuser->ok= 1;
+ iuser->framenr = framenr;
+ if (iuser->ok == 0) iuser->ok = 1;
}
int BKE_image_has_alpha(struct Image *image)
@@ -2646,8 +2657,8 @@ int BKE_image_has_alpha(struct Image *image)
void *lock;
int planes;
- ibuf= BKE_image_acquire_ibuf(image, NULL, &lock);
- planes = (ibuf?ibuf->planes:0);
+ ibuf = BKE_image_acquire_ibuf(image, NULL, &lock);
+ planes = (ibuf ? ibuf->planes : 0);
BKE_image_release_ibuf(image, lock);
if (planes == 32)
diff --git a/source/blender/blenkernel/intern/image_gen.c b/source/blender/blenkernel/intern/image_gen.c
index 675c0771140..4579e6f92aa 100644
--- a/source/blender/blenkernel/intern/image_gen.c
+++ b/source/blender/blenkernel/intern/image_gen.c
@@ -39,10 +39,10 @@ void BKE_image_buf_fill_color(unsigned char *rect, float *rect_float, int width,
/* blank image */
if (rect_float) {
- for (y= 0; y<height; y++) {
- for (x= 0; x<width; x++) {
+ for (y = 0; y < height; y++) {
+ for (x = 0; x < width; x++) {
copy_v4_v4(rect_float, color);
- rect_float+= 4;
+ rect_float += 4;
}
}
}
@@ -52,14 +52,14 @@ void BKE_image_buf_fill_color(unsigned char *rect, float *rect_float, int width,
rgba_float_to_uchar(ccol, color);
- for (y= 0; y<height; y++) {
- for (x= 0; x<width; x++) {
+ for (y = 0; y < height; y++) {
+ for (x = 0; x < width; x++) {
- rect[0]= ccol[0];
- rect[1]= ccol[1];
- rect[2]= ccol[2];
- rect[3]= ccol[3];
- rect+= 4;
+ rect[0] = ccol[0];
+ rect[1] = ccol[1];
+ rect[2] = ccol[2];
+ rect[3] = ccol[3];
+ rect += 4;
}
}
}
@@ -71,84 +71,84 @@ void BKE_image_buf_fill_checker(unsigned char *rect, float *rect_float, int widt
/* these two passes could be combined into one, but it's more readable and
* easy to tweak like this, speed isn't really that much of an issue in this situation... */
- int checkerwidth= 32, dark= 1;
+ int checkerwidth = 32, dark = 1;
int x, y;
- unsigned char *rect_orig= rect;
- float *rect_float_orig= rect_float;
+ unsigned char *rect_orig = rect;
+ float *rect_float_orig = rect_float;
- float h=0.0, hoffs=0.0, hue=0.0, s=0.9, v=0.9, r, g, b;
+ float h = 0.0, hoffs = 0.0, hue = 0.0, s = 0.9, v = 0.9, r, g, b;
/* checkers */
- for (y= 0; y<height; y++) {
- dark= powf(-1.0f, floorf(y / checkerwidth));
+ for (y = 0; y < height; y++) {
+ dark = powf(-1.0f, floorf(y / checkerwidth));
- for (x= 0; x<width; x++) {
- if (x % checkerwidth == 0) dark= -dark;
+ for (x = 0; x < width; x++) {
+ if (x % checkerwidth == 0) dark = -dark;
if (rect_float) {
if (dark > 0) {
- rect_float[0]= rect_float[1]= rect_float[2]= 0.25f;
- rect_float[3]= 1.0f;
+ rect_float[0] = rect_float[1] = rect_float[2] = 0.25f;
+ rect_float[3] = 1.0f;
}
else {
- rect_float[0]= rect_float[1]= rect_float[2]= 0.58f;
- rect_float[3]= 1.0f;
+ rect_float[0] = rect_float[1] = rect_float[2] = 0.58f;
+ rect_float[3] = 1.0f;
}
- rect_float+= 4;
+ rect_float += 4;
}
else {
if (dark > 0) {
- rect[0]= rect[1]= rect[2]= 64;
- rect[3]= 255;
+ rect[0] = rect[1] = rect[2] = 64;
+ rect[3] = 255;
}
else {
- rect[0]= rect[1]= rect[2]= 150;
- rect[3]= 255;
+ rect[0] = rect[1] = rect[2] = 150;
+ rect[3] = 255;
}
- rect+= 4;
+ rect += 4;
}
}
}
- rect= rect_orig;
- rect_float= rect_float_orig;
+ rect = rect_orig;
+ rect_float = rect_float_orig;
/* 2nd pass, colored + */
- for (y= 0; y<height; y++) {
- hoffs= 0.125f * floorf(y / checkerwidth);
+ for (y = 0; y < height; y++) {
+ hoffs = 0.125f * floorf(y / checkerwidth);
- for (x= 0; x<width; x++) {
- h= 0.125f * floorf(x / checkerwidth);
+ for (x = 0; x < width; x++) {
+ h = 0.125f * floorf(x / checkerwidth);
if ((fabs((x % checkerwidth) - (checkerwidth / 2)) < 4) &&
- (fabs((y % checkerwidth) - (checkerwidth / 2)) < 4)) {
+ (fabs((y % checkerwidth) - (checkerwidth / 2)) < 4)) {
if ((fabs((x % checkerwidth) - (checkerwidth / 2)) < 1) ||
- (fabs((y % checkerwidth) - (checkerwidth / 2)) < 1)) {
+ (fabs((y % checkerwidth) - (checkerwidth / 2)) < 1)) {
- hue= fmodf(fabs(h-hoffs), 1.0f);
+ hue = fmodf(fabs(h - hoffs), 1.0f);
hsv_to_rgb(hue, s, v, &r, &g, &b);
if (rect) {
- rect[0]= (char)(r * 255.0f);
- rect[1]= (char)(g * 255.0f);
- rect[2]= (char)(b * 255.0f);
- rect[3]= 255;
+ rect[0] = (char)(r * 255.0f);
+ rect[1] = (char)(g * 255.0f);
+ rect[2] = (char)(b * 255.0f);
+ rect[3] = 255;
}
if (rect_float) {
- rect_float[0]= r;
- rect_float[1]= g;
- rect_float[2]= b;
- rect_float[3]= 1.0f;
+ rect_float[0] = r;
+ rect_float[1] = g;
+ rect_float[2] = b;
+ rect_float[3] = 1.0f;
}
}
}
- if (rect_float) rect_float+= 4;
- if (rect) rect+= 4;
+ if (rect_float) rect_float += 4;
+ if (rect) rect += 4;
}
}
}
@@ -156,7 +156,7 @@ void BKE_image_buf_fill_checker(unsigned char *rect, float *rect_float, int widt
/* Utility functions for BKE_image_buf_fill_checker_color */
-#define BLEND_FLOAT(real, add) (real+add <= 1.0f) ? (real+add) : 1.0f
+#define BLEND_FLOAT(real, add) (real + add <= 1.0f) ? (real + add) : 1.0f
#define BLEND_CHAR(real, add) ((real + (char)(add * 255.0f)) <= 255) ? (real + (char)(add * 255.0f)) : 255
static void checker_board_color_fill(unsigned char *rect, float *rect_float, int width, int height)
@@ -164,34 +164,32 @@ static void checker_board_color_fill(unsigned char *rect, float *rect_float, int
int hue_step, y, x;
float hue, val, sat, r, g, b;
- sat= 1.0;
+ sat = 1.0;
- hue_step= power_of_2_max_i(width / 8);
- if (hue_step < 8) hue_step= 8;
+ hue_step = power_of_2_max_i(width / 8);
+ if (hue_step < 8) hue_step = 8;
- for (y= 0; y < height; y++)
- {
+ for (y = 0; y < height; y++) {
- val= 0.1 + (y * (0.4 / height)); /* use a number lower then 1.0 else its too bright */
- for (x= 0; x < width; x++)
- {
- hue= (float)((double)(x/hue_step) * 1.0 / width * hue_step);
+ val = 0.1 + (y * (0.4 / height)); /* use a number lower then 1.0 else its too bright */
+ for (x = 0; x < width; x++) {
+ hue = (float)((double)(x / hue_step) * 1.0 / width * hue_step);
hsv_to_rgb(hue, sat, val, &r, &g, &b);
if (rect) {
- rect[0]= (char)(r * 255.0f);
- rect[1]= (char)(g * 255.0f);
- rect[2]= (char)(b * 255.0f);
- rect[3]= 255;
+ rect[0] = (char)(r * 255.0f);
+ rect[1] = (char)(g * 255.0f);
+ rect[2] = (char)(b * 255.0f);
+ rect[3] = 255;
rect += 4;
}
if (rect_float) {
- rect_float[0]= r;
- rect_float[1]= g;
- rect_float[2]= b;
- rect_float[3]= 1.0f;
+ rect_float[0] = r;
+ rect_float[1] = g;
+ rect_float[2] = b;
+ rect_float[3] = 1.0f;
rect_float += 4;
}
@@ -202,42 +200,42 @@ static void checker_board_color_fill(unsigned char *rect, float *rect_float, int
static void checker_board_color_tint(unsigned char *rect, float *rect_float, int width, int height, int size, float blend)
{
int x, y;
- float blend_half= blend * 0.5f;
+ float blend_half = blend * 0.5f;
- for (y= 0; y < height; y++) {
- for (x= 0; x < width; x++) {
- if (((y / size) % 2 == 1 && (x / size) % 2 == 1 ) || ( (y / size) % 2 == 0 && (x / size) % 2 == 0 )) {
+ for (y = 0; y < height; y++) {
+ for (x = 0; x < width; x++) {
+ if (((y / size) % 2 == 1 && (x / size) % 2 == 1) || ( (y / size) % 2 == 0 && (x / size) % 2 == 0)) {
if (rect) {
- rect[0]= (char)BLEND_CHAR(rect[0], blend);
- rect[1]= (char)BLEND_CHAR(rect[1], blend);
- rect[2]= (char)BLEND_CHAR(rect[2], blend);
- rect[3]= 255;
+ rect[0] = (char)BLEND_CHAR(rect[0], blend);
+ rect[1] = (char)BLEND_CHAR(rect[1], blend);
+ rect[2] = (char)BLEND_CHAR(rect[2], blend);
+ rect[3] = 255;
rect += 4;
}
if (rect_float) {
- rect_float[0]= BLEND_FLOAT(rect_float[0], blend);
- rect_float[1]= BLEND_FLOAT(rect_float[1], blend);
- rect_float[2]= BLEND_FLOAT(rect_float[2], blend);
- rect_float[3]= 1.0f;
+ rect_float[0] = BLEND_FLOAT(rect_float[0], blend);
+ rect_float[1] = BLEND_FLOAT(rect_float[1], blend);
+ rect_float[2] = BLEND_FLOAT(rect_float[2], blend);
+ rect_float[3] = 1.0f;
rect_float += 4;
}
}
else {
if (rect) {
- rect[0]= (char)BLEND_CHAR(rect[0], blend_half);
- rect[1]= (char)BLEND_CHAR(rect[1], blend_half);
- rect[2]= (char)BLEND_CHAR(rect[2], blend_half);
- rect[3]= 255;
+ rect[0] = (char)BLEND_CHAR(rect[0], blend_half);
+ rect[1] = (char)BLEND_CHAR(rect[1], blend_half);
+ rect[2] = (char)BLEND_CHAR(rect[2], blend_half);
+ rect[3] = 255;
rect += 4;
}
if (rect_float) {
- rect_float[0]= BLEND_FLOAT(rect_float[0], blend_half);
- rect_float[1]= BLEND_FLOAT(rect_float[1], blend_half);
- rect_float[2]= BLEND_FLOAT(rect_float[2], blend_half);
- rect_float[3]= 1.0f;
+ rect_float[0] = BLEND_FLOAT(rect_float[0], blend_half);
+ rect_float[1] = BLEND_FLOAT(rect_float[1], blend_half);
+ rect_float[2] = BLEND_FLOAT(rect_float[2], blend_half);
+ rect_float[3] = 1.0f;
rect_float += 4;
}
@@ -250,22 +248,22 @@ static void checker_board_color_tint(unsigned char *rect, float *rect_float, int
static void checker_board_grid_fill(unsigned char *rect, float *rect_float, int width, int height, float blend)
{
int x, y;
- for (y= 0; y < height; y++) {
- for (x= 0; x < width; x++) {
+ for (y = 0; y < height; y++) {
+ for (x = 0; x < width; x++) {
if (((y % 32) == 0) || ((x % 32) == 0) || x == 0) {
if (rect) {
- rect[0]= BLEND_CHAR(rect[0], blend);
- rect[1]= BLEND_CHAR(rect[1], blend);
- rect[2]= BLEND_CHAR(rect[2], blend);
- rect[3]= 255;
+ rect[0] = BLEND_CHAR(rect[0], blend);
+ rect[1] = BLEND_CHAR(rect[1], blend);
+ rect[2] = BLEND_CHAR(rect[2], blend);
+ rect[3] = 255;
rect += 4;
}
if (rect_float) {
- rect_float[0]= BLEND_FLOAT(rect_float[0], blend);
- rect_float[1]= BLEND_FLOAT(rect_float[1], blend);
- rect_float[2]= BLEND_FLOAT(rect_float[2], blend);
- rect_float[3]= 1.0f;
+ rect_float[0] = BLEND_FLOAT(rect_float[0], blend);
+ rect_float[1] = BLEND_FLOAT(rect_float[1], blend);
+ rect_float[2] = BLEND_FLOAT(rect_float[2], blend);
+ rect_float[3] = 1.0f;
rect_float += 4;
}
@@ -284,19 +282,17 @@ static void checker_board_text(unsigned char *rect, float *rect_float, int width
{
int x, y;
int pen_x, pen_y;
- char text[3]= {'A', '1', '\0'};
- const int mono= blf_mono_font;
+ char text[3] = {'A', '1', '\0'};
+ const int mono = blf_mono_font;
BLF_size(mono, 54, 72); /* hard coded size! */
BLF_buffer(mono, rect_float, rect, width, height, 4);
- for (y= 0; y < height; y+=step)
- {
- text[1]= '1';
+ for (y = 0; y < height; y += step) {
+ text[1] = '1';
- for (x= 0; x < width; x+=step)
- {
+ for (x = 0; x < width; x += step) {
/* hard coded offset */
pen_x = x + 33;
pen_y = y + 44;
@@ -304,22 +300,22 @@ static void checker_board_text(unsigned char *rect, float *rect_float, int width
/* terribly crappy outline font! */
BLF_buffer_col(mono, 1.0, 1.0, 1.0, 1.0);
- BLF_position(mono, pen_x-outline, pen_y, 0.0);
+ BLF_position(mono, pen_x - outline, pen_y, 0.0);
BLF_draw_buffer(mono, text);
- BLF_position(mono, pen_x+outline, pen_y, 0.0);
+ BLF_position(mono, pen_x + outline, pen_y, 0.0);
BLF_draw_buffer(mono, text);
- BLF_position(mono, pen_x, pen_y-outline, 0.0);
+ BLF_position(mono, pen_x, pen_y - outline, 0.0);
BLF_draw_buffer(mono, text);
- BLF_position(mono, pen_x, pen_y+outline, 0.0);
+ BLF_position(mono, pen_x, pen_y + outline, 0.0);
BLF_draw_buffer(mono, text);
- BLF_position(mono, pen_x-outline, pen_y-outline, 0.0);
+ BLF_position(mono, pen_x - outline, pen_y - outline, 0.0);
BLF_draw_buffer(mono, text);
- BLF_position(mono, pen_x+outline, pen_y+outline, 0.0);
+ BLF_position(mono, pen_x + outline, pen_y + outline, 0.0);
BLF_draw_buffer(mono, text);
- BLF_position(mono, pen_x-outline, pen_y+outline, 0.0);
+ BLF_position(mono, pen_x - outline, pen_y + outline, 0.0);
BLF_draw_buffer(mono, text);
- BLF_position(mono, pen_x+outline, pen_y-outline, 0.0);
+ BLF_position(mono, pen_x + outline, pen_y - outline, 0.0);
BLF_draw_buffer(mono, text);
BLF_buffer_col(mono, 0.0, 0.0, 0.0, 1.0);
@@ -342,7 +338,7 @@ void BKE_image_buf_fill_checker_color(unsigned char *rect, float *rect_float, in
checker_board_color_tint(rect, rect_float, width, height, 4, 0.05f);
checker_board_color_tint(rect, rect_float, width, height, 32, 0.07f);
checker_board_color_tint(rect, rect_float, width, height, 128, 0.15f);
- checker_board_grid_fill(rect, rect_float, width, height, 1.0f/4.0f);
+ checker_board_grid_fill(rect, rect_float, width, height, 1.0f / 4.0f);
checker_board_text(rect, rect_float, width, height, 128, 2);
}
diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c
index a4edc1e531a..d4861a27057 100644
--- a/source/blender/blenkernel/intern/implicit.c
+++ b/source/blender/blenkernel/intern/implicit.c
@@ -87,7 +87,7 @@ void itstart(void)
}
static void itend(void)
{
- gettimeofday(&_itend,&itz);
+ gettimeofday(&_itend, &itz);
}
double itval(void)
{
@@ -98,8 +98,8 @@ double itval(void)
}
#endif
-static float I[3][3] = {{1,0,0},{0,1,0},{0,0,1}};
-static float ZERO[3][3] = {{0,0,0}, {0,0,0}, {0,0,0}};
+static float I[3][3] = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}};
+static float ZERO[3][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}};
/*
#define C99
@@ -119,9 +119,9 @@ struct Cloth;
typedef float lfVector[3];
typedef struct fmatrix3x3 {
float m[3][3]; /* 3x3 matrix */
- unsigned int c,r; /* column and row number */
+ unsigned int c, r; /* column and row number */
int pinned; /* is this vertex allowed to move? */
- float n1,n2,n3; /* three normal vectors for collision constrains */
+ float n1, n2, n3; /* three normal vectors for collision constrains */
unsigned int vcount; /* vertex count */
unsigned int scount; /* spring count */
} fmatrix3x3;
@@ -168,7 +168,7 @@ DO_INLINE void mul_fvectorT_fvectorS(float to[3][3], float vectorA[3], float vec
/* printf vector[3] on console: for debug output */
static void print_fvector(float m3[3])
{
- printf("%f\n%f\n%f\n\n",m3[0],m3[1],m3[2]);
+ printf("%f\n%f\n%f\n\n", m3[0], m3[1], m3[2]);
}
///////////////////////////
@@ -178,8 +178,7 @@ static void print_fvector(float m3[3])
DO_INLINE void print_lfvector(float (*fLongVector)[3], unsigned int verts)
{
unsigned int i = 0;
- for (i = 0; i < verts; i++)
- {
+ for (i = 0; i < verts; i++) {
print_fvector(fLongVector[i]);
}
}
@@ -193,8 +192,7 @@ DO_INLINE lfVector *create_lfvector(unsigned int verts)
/* delete long vector */
DO_INLINE void del_lfvector(float (*fLongVector)[3])
{
- if (fLongVector != NULL)
- {
+ if (fLongVector != NULL) {
MEM_freeN (fLongVector);
// cloth_aligned_free(&MEMORY_BASE, fLongVector);
}
@@ -208,8 +206,7 @@ DO_INLINE void cp_lfvector(float (*to)[3], float (*from)[3], unsigned int verts)
DO_INLINE void init_lfvector(float (*fLongVector)[3], float vector[3], unsigned int verts)
{
unsigned int i = 0;
- for (i = 0; i < verts; i++)
- {
+ for (i = 0; i < verts; i++) {
copy_v3_v3(fLongVector[i], vector);
}
}
@@ -223,8 +220,7 @@ DO_INLINE void mul_lfvectorS(float (*to)[3], float (*fLongVector)[3], float scal
{
unsigned int i = 0;
- for (i = 0; i < verts; i++)
- {
+ for (i = 0; i < verts; i++) {
mul_fvector_S(to[i], fLongVector[i], scalar);
}
}
@@ -233,8 +229,7 @@ DO_INLINE void mul_lfvectorS(float (*to)[3], float (*fLongVector)[3], float scal
DO_INLINE void submul_lfvectorS(float (*to)[3], float (*fLongVector)[3], float scalar, unsigned int verts)
{
unsigned int i = 0;
- for (i = 0; i < verts; i++)
- {
+ for (i = 0; i < verts; i++) {
VECSUBMUL(to[i], fLongVector[i], scalar);
}
}
@@ -258,8 +253,7 @@ DO_INLINE void add_lfvector_lfvector(float (*to)[3], float (*fLongVectorA)[3], f
{
unsigned int i = 0;
- for (i = 0; i < verts; i++)
- {
+ for (i = 0; i < verts; i++) {
VECADD(to[i], fLongVectorA[i], fLongVectorB[i]);
}
@@ -269,8 +263,7 @@ DO_INLINE void add_lfvector_lfvectorS(float (*to)[3], float (*fLongVectorA)[3],
{
unsigned int i = 0;
- for (i = 0; i < verts; i++)
- {
+ for (i = 0; i < verts; i++) {
VECADDS(to[i], fLongVectorA[i], fLongVectorB[i], bS);
}
@@ -280,8 +273,7 @@ DO_INLINE void add_lfvectorS_lfvectorS(float (*to)[3], float (*fLongVectorA)[3],
{
unsigned int i = 0;
- for (i = 0; i < verts; i++)
- {
+ for (i = 0; i < verts; i++) {
VECADDSS(to[i], fLongVectorA[i], aS, fLongVectorB[i], bS);
}
}
@@ -289,8 +281,7 @@ DO_INLINE void add_lfvectorS_lfvectorS(float (*to)[3], float (*fLongVectorA)[3],
DO_INLINE void sub_lfvector_lfvectorS(float (*to)[3], float (*fLongVectorA)[3], float (*fLongVectorB)[3], float bS, unsigned int verts)
{
unsigned int i = 0;
- for (i = 0; i < verts; i++)
- {
+ for (i = 0; i < verts; i++) {
VECSUBS(to[i], fLongVectorA[i], fLongVectorB[i], bS);
}
@@ -300,8 +291,7 @@ DO_INLINE void sub_lfvector_lfvector(float (*to)[3], float (*fLongVectorA)[3], f
{
unsigned int i = 0;
- for (i = 0; i < verts; i++)
- {
+ for (i = 0; i < verts; i++) {
sub_v3_v3v3(to[i], fLongVectorA[i], fLongVectorB[i]);
}
@@ -313,9 +303,9 @@ DO_INLINE void sub_lfvector_lfvector(float (*to)[3], float (*fLongVectorA)[3], f
/* printf 3x3 matrix on console: for debug output */
static void print_fmatrix(float m3[3][3])
{
- printf("%f\t%f\t%f\n",m3[0][0],m3[0][1],m3[0][2]);
- printf("%f\t%f\t%f\n",m3[1][0],m3[1][1],m3[1][2]);
- printf("%f\t%f\t%f\n\n",m3[2][0],m3[2][1],m3[2][2]);
+ printf("%f\t%f\t%f\n", m3[0][0], m3[0][1], m3[0][2]);
+ printf("%f\t%f\t%f\n", m3[1][0], m3[1][1], m3[1][2]);
+ printf("%f\t%f\t%f\n\n", m3[2][0], m3[2][1], m3[2][2]);
}
#endif
@@ -350,15 +340,12 @@ DO_INLINE void inverse_fmatrix(float to[3][3], float from[3][3])
unsigned int i, j;
float d;
- if ((d=det_fmatrix(from))==0)
- {
+ if ((d=det_fmatrix(from)) == 0) {
printf("can't build inverse");
exit(0);
}
- for (i=0;i<3;i++)
- {
- for (j=0;j<3;j++)
- {
+ for (i=0;i<3;i++) {
+ for (j=0;j<3;j++) {
int i1=(i+1)%3;
int i2=(i+2)%3;
int j1=(j+1)%3;
@@ -380,9 +367,9 @@ DO_INLINE void inverse_fmatrix(float to[3][3], float from[3][3])
/* STATUS: verified */
DO_INLINE void mul_fmatrix_S(float matrix[3][3], float scalar)
{
- mul_fvector_S(matrix[0], matrix[0],scalar);
- mul_fvector_S(matrix[1], matrix[1],scalar);
- mul_fvector_S(matrix[2], matrix[2],scalar);
+ mul_fvector_S(matrix[0], matrix[0], scalar);
+ mul_fvector_S(matrix[1], matrix[1], scalar);
+ mul_fvector_S(matrix[2], matrix[2], scalar);
}
/* a vector multiplied by a 3x3 matrix */
@@ -398,17 +385,17 @@ DO_INLINE void mul_fvector_fmatrix(float *to, float *from, float matrix[3][3])
/* STATUS: verified */
DO_INLINE void mul_fmatrix_fvector(float *to, float matrix[3][3], float from[3])
{
- to[0] = dot_v3v3(matrix[0],from);
- to[1] = dot_v3v3(matrix[1],from);
- to[2] = dot_v3v3(matrix[2],from);
+ to[0] = dot_v3v3(matrix[0], from);
+ to[1] = dot_v3v3(matrix[1], from);
+ to[2] = dot_v3v3(matrix[2], from);
}
/* 3x3 matrix multiplied by a 3x3 matrix */
/* STATUS: verified */
DO_INLINE void mul_fmatrix_fmatrix(float to[3][3], float matrixA[3][3], float matrixB[3][3])
{
- mul_fvector_fmatrix(to[0], matrixA[0],matrixB);
- mul_fvector_fmatrix(to[1], matrixA[1],matrixB);
- mul_fvector_fmatrix(to[2], matrixA[2],matrixB);
+ mul_fvector_fmatrix(to[0], matrixA[0], matrixB);
+ mul_fvector_fmatrix(to[1], matrixA[1], matrixB);
+ mul_fvector_fmatrix(to[2], matrixA[2], matrixB);
}
/* 3x3 matrix addition with 3x3 matrix */
DO_INLINE void add_fmatrix_fmatrix(float to[3][3], float matrixA[3][3], float matrixB[3][3])
@@ -472,9 +459,9 @@ DO_INLINE void muladd_fvector_fmatrix(float to[3], float from[3], float matrix[3
/* 3x3 matrix multiplied and added to/by a 3x3 matrix and added to another 3x3 matrix */
DO_INLINE void muladd_fmatrix_fmatrix(float to[3][3], float matrixA[3][3], float matrixB[3][3])
{
- muladd_fvector_fmatrix(to[0], matrixA[0],matrixB);
- muladd_fvector_fmatrix(to[1], matrixA[1],matrixB);
- muladd_fvector_fmatrix(to[2], matrixA[2],matrixB);
+ muladd_fvector_fmatrix(to[0], matrixA[0], matrixB);
+ muladd_fvector_fmatrix(to[1], matrixA[1], matrixB);
+ muladd_fvector_fmatrix(to[2], matrixA[2], matrixB);
}
/* a vector multiplied and sub'd to/by a 3x3 matrix */
DO_INLINE void mulsub_fvector_fmatrix(float to[3], float from[3], float matrix[3][3])
@@ -486,9 +473,9 @@ DO_INLINE void mulsub_fvector_fmatrix(float to[3], float from[3], float matrix[3
/* 3x3 matrix multiplied and sub'd to/by a 3x3 matrix and added to another 3x3 matrix */
DO_INLINE void mulsub_fmatrix_fmatrix(float to[3][3], float matrixA[3][3], float matrixB[3][3])
{
- mulsub_fvector_fmatrix(to[0], matrixA[0],matrixB);
- mulsub_fvector_fmatrix(to[1], matrixA[1],matrixB);
- mulsub_fvector_fmatrix(to[2], matrixA[2],matrixB);
+ mulsub_fvector_fmatrix(to[0], matrixA[0], matrixB);
+ mulsub_fvector_fmatrix(to[1], matrixA[1], matrixB);
+ mulsub_fvector_fmatrix(to[2], matrixA[2], matrixB);
}
/* 3x3 matrix multiplied+added by a vector */
/* STATUS: verified */
@@ -535,8 +522,7 @@ DO_INLINE fmatrix3x3 *create_bfmatrix(unsigned int verts, unsigned int springs)
/* delete big matrix */
DO_INLINE void del_bfmatrix(fmatrix3x3 *matrix)
{
- if (matrix != NULL)
- {
+ if (matrix != NULL) {
MEM_freeN (matrix);
}
}
@@ -545,7 +531,7 @@ DO_INLINE void del_bfmatrix(fmatrix3x3 *matrix)
DO_INLINE void cp_bfmatrix(fmatrix3x3 *to, fmatrix3x3 *from)
{
// TODO bounds checking
- memcpy(to, from, sizeof(fmatrix3x3) * (from[0].vcount+from[0].scount) );
+ memcpy(to, from, sizeof(fmatrix3x3) * (from[0].vcount+from[0].scount));
}
/* init big matrix */
@@ -554,8 +540,7 @@ DO_INLINE void init_bfmatrix(fmatrix3x3 *matrix, float m3[3][3])
{
unsigned int i;
- for (i = 0; i < matrix[0].vcount+matrix[0].scount; i++)
- {
+ for (i = 0; i < matrix[0].vcount+matrix[0].scount; i++) {
cp_fmatrix(matrix[i].m, m3);
}
}
@@ -564,15 +549,13 @@ DO_INLINE void init_bfmatrix(fmatrix3x3 *matrix, float m3[3][3])
// slow in parallel
DO_INLINE void initdiag_bfmatrix(fmatrix3x3 *matrix, float m3[3][3])
{
- unsigned int i,j;
- float tmatrix[3][3] = {{0,0,0},{0,0,0},{0,0,0}};
+ unsigned int i, j;
+ float tmatrix[3][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}};
- for (i = 0; i < matrix[0].vcount; i++)
- {
+ for (i = 0; i < matrix[0].vcount; i++) {
cp_fmatrix(matrix[i].m, m3);
}
- for (j = matrix[0].vcount; j < matrix[0].vcount+matrix[0].scount; j++)
- {
+ for (j = matrix[0].vcount; j < matrix[0].vcount+matrix[0].scount; j++) {
cp_fmatrix(matrix[j].m, tmatrix);
}
}
@@ -581,8 +564,7 @@ DO_INLINE void initdiag_bfmatrix(fmatrix3x3 *matrix, float m3[3][3])
DO_INLINE void mul_bfmatrix_S(fmatrix3x3 *matrix, float scalar)
{
unsigned int i = 0;
- for (i = 0; i < matrix[0].vcount+matrix[0].scount; i++)
- {
+ for (i = 0; i < matrix[0].vcount+matrix[0].scount; i++) {
mul_fmatrix_S(matrix[i].m, scalar);
}
}
@@ -601,15 +583,13 @@ DO_INLINE void mul_bfmatrix_lfvector( float (*to)[3], fmatrix3x3 *from, lfVector
{
#pragma omp section
{
- for (i = from[0].vcount; i < from[0].vcount+from[0].scount; i++)
- {
+ for (i = from[0].vcount; i < from[0].vcount+from[0].scount; i++) {
muladd_fmatrix_fvector(to[from[i].c], from[i].m, fLongVector[from[i].r]);
}
}
#pragma omp section
{
- for (i = 0; i < from[0].vcount+from[0].scount; i++)
- {
+ for (i = 0; i < from[0].vcount+from[0].scount; i++) {
muladd_fmatrix_fvector(temp[from[i].r], from[i].m, fLongVector[from[i].c]);
}
}
@@ -627,8 +607,7 @@ DO_INLINE void mul_prevfmatrix_lfvector( float (*to)[3], fmatrix3x3 *from, lfVec
{
unsigned int i = 0;
- for (i = 0; i < from[0].vcount; i++)
- {
+ for (i = 0; i < from[0].vcount; i++) {
mul_fmatrix_fvector(to[from[i].r], from[i].m, fLongVector[from[i].c]);
}
}
@@ -639,8 +618,7 @@ DO_INLINE void add_bfmatrix_bfmatrix( fmatrix3x3 *to, fmatrix3x3 *from, fmatrix
unsigned int i = 0;
/* process diagonal elements */
- for (i = 0; i < matrix[0].vcount+matrix[0].scount; i++)
- {
+ for (i = 0; i < matrix[0].vcount+matrix[0].scount; i++) {
add_fmatrix_fmatrix(to[i].m, from[i].m, matrix[i].m);
}
@@ -651,8 +629,7 @@ DO_INLINE void addadd_bfmatrix_bfmatrix( fmatrix3x3 *to, fmatrix3x3 *from, fmat
unsigned int i = 0;
/* process diagonal elements */
- for (i = 0; i < matrix[0].vcount+matrix[0].scount; i++)
- {
+ for (i = 0; i < matrix[0].vcount+matrix[0].scount; i++) {
addadd_fmatrix_fmatrix(to[i].m, from[i].m, matrix[i].m);
}
@@ -663,8 +640,7 @@ DO_INLINE void subadd_bfmatrix_bfmatrix( fmatrix3x3 *to, fmatrix3x3 *from, fmat
unsigned int i = 0;
/* process diagonal elements */
- for (i = 0; i < matrix[0].vcount+matrix[0].scount; i++)
- {
+ for (i = 0; i < matrix[0].vcount+matrix[0].scount; i++) {
subadd_fmatrix_fmatrix(to[i].m, from[i].m, matrix[i].m);
}
@@ -675,8 +651,7 @@ DO_INLINE void sub_bfmatrix_bfmatrix( fmatrix3x3 *to, fmatrix3x3 *from, fmatrix
unsigned int i = 0;
/* process diagonal elements */
- for (i = 0; i < matrix[0].vcount+matrix[0].scount; i++)
- {
+ for (i = 0; i < matrix[0].vcount+matrix[0].scount; i++) {
sub_fmatrix_fmatrix(to[i].m, from[i].m, matrix[i].m);
}
@@ -687,8 +662,7 @@ DO_INLINE void sub_bfmatrix_Smatrix( fmatrix3x3 *to, fmatrix3x3 *from, fmatrix3
unsigned int i = 0;
/* process diagonal elements */
- for (i = 0; i < matrix[0].vcount; i++)
- {
+ for (i = 0; i < matrix[0].vcount; i++) {
sub_fmatrix_fmatrix(to[matrix[i].c].m, from[matrix[i].c].m, matrix[i].m);
}
@@ -699,8 +673,7 @@ DO_INLINE void addsub_bfmatrix_bfmatrix( fmatrix3x3 *to, fmatrix3x3 *from, fmat
unsigned int i = 0;
/* process diagonal elements */
- for (i = 0; i < matrix[0].vcount+matrix[0].scount; i++)
- {
+ for (i = 0; i < matrix[0].vcount+matrix[0].scount; i++) {
addsub_fmatrix_fmatrix(to[i].m, from[i].m, matrix[i].m);
}
@@ -713,8 +686,7 @@ DO_INLINE void subadd_bfmatrixS_bfmatrixS( fmatrix3x3 *to, fmatrix3x3 *from, flo
unsigned int i = 0;
/* process diagonal elements */
- for (i = 0; i < matrix[0].vcount+matrix[0].scount; i++)
- {
+ for (i = 0; i < matrix[0].vcount+matrix[0].scount; i++) {
subadd_fmatrixS_fmatrixS(to[i].m, from[i].m, aS, matrix[i].m, bS);
}
@@ -729,7 +701,7 @@ typedef struct Implicit_Data
fmatrix3x3 *A, *dFdV, *dFdX, *S, *P, *Pinv, *bigI, *M;
} Implicit_Data;
-int implicit_init (Object *UNUSED(ob), ClothModifierData *clmd)
+int implicit_init(Object *UNUSED(ob), ClothModifierData *clmd)
{
unsigned int i = 0;
unsigned int pinned = 0;
@@ -772,12 +744,10 @@ int implicit_init (Object *UNUSED(ob), ClothModifierData *clmd)
id->dV = create_lfvector(cloth->numverts);
id->z = create_lfvector(cloth->numverts);
- for (i=0;i<cloth->numverts;i++)
- {
+ for (i=0;i<cloth->numverts;i++) {
id->A[i].r = id->A[i].c = id->dFdV[i].r = id->dFdV[i].c = id->dFdX[i].r = id->dFdX[i].c = id->P[i].c = id->P[i].r = id->Pinv[i].c = id->Pinv[i].r = id->bigI[i].c = id->bigI[i].r = id->M[i].r = id->M[i].c = i;
- if (verts [i].flags & CLOTH_VERT_FLAG_PINNED)
- {
+ if (verts [i].flags & CLOTH_VERT_FLAG_PINNED) {
id->S[pinned].pinned = 1;
id->S[pinned].c = id->S[pinned].r = i;
pinned++;
@@ -791,8 +761,7 @@ int implicit_init (Object *UNUSED(ob), ClothModifierData *clmd)
// init springs
search = cloth->springs;
- for (i=0;i<cloth->numsprings;i++)
- {
+ for (i=0;i<cloth->numsprings;i++) {
spring = search->link;
// dFdV_start[i].r = big_I[i].r = big_zero[i].r =
@@ -810,25 +779,22 @@ int implicit_init (Object *UNUSED(ob), ClothModifierData *clmd)
initdiag_bfmatrix(id->bigI, I);
- for (i = 0; i < cloth->numverts; i++)
- {
+ for (i = 0; i < cloth->numverts; i++) {
copy_v3_v3(id->X[i], verts[i].x);
}
return 1;
}
-int implicit_free (ClothModifierData *clmd)
+int implicit_free(ClothModifierData *clmd)
{
Implicit_Data *id;
Cloth *cloth;
cloth = (Cloth *)clmd->clothObject;
- if (cloth)
- {
+ if (cloth) {
id = cloth->implicit;
- if (id)
- {
+ if (id) {
del_bfmatrix(id->A);
del_bfmatrix(id->dFdV);
del_bfmatrix(id->dFdX);
@@ -858,14 +824,14 @@ int implicit_free (ClothModifierData *clmd)
DO_INLINE float fb(float length, float L)
{
float x = length/L;
- return (-11.541f*pow(x,4)+34.193f*pow(x,3)-39.083f*pow(x,2)+23.116f*x-9.713f);
+ return (-11.541f*pow(x, 4)+34.193f*pow(x, 3)-39.083f*pow(x, 2)+23.116f*x-9.713f);
}
DO_INLINE float fbderiv(float length, float L)
{
float x = length/L;
- return (-46.164f*pow(x,3)+102.579f*pow(x,2)-78.166f*x+23.116f);
+ return (-46.164f*pow(x, 3)+102.579f*pow(x, 2)-78.166f*x+23.116f);
}
DO_INLINE float fbstar(float length, float L, float kb, float cb)
@@ -886,12 +852,10 @@ DO_INLINE float fbstar_jacobi(float length, float L, float kb, float cb)
float tempfb = kb * fb(length, L);
float fbstar = cb * (length - L);
- if (tempfb < fbstar)
- {
+ if (tempfb < fbstar) {
return cb;
}
- else
- {
+ else {
return kb * fbderiv(length, L);
}
}
@@ -900,8 +864,7 @@ DO_INLINE void filter(lfVector *V, fmatrix3x3 *S)
{
unsigned int i=0;
- for (i=0;i<S[0].vcount;i++)
- {
+ for (i = 0; i < S[0].vcount; i++) {
mul_fvector_fmatrix(V[S[i].r], V[S[i].r], S[i].m);
}
}
@@ -924,24 +887,23 @@ 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);
- filter(r,S);
+ filter(r, S);
cp_lfvector(d, r, numverts);
s = dot_lfvector(r, r, numverts);
starget = s * sqrt(conjgrad_epsilon);
- while (s>starget && conjgrad_loopcount < conjgrad_looplimit)
- {
- // Mul(q,A,d); // q = A*d;
+ while (s>starget && conjgrad_loopcount < conjgrad_looplimit) {
+ // Mul(q, A, d); // q = A*d;
mul_bfmatrix_lfvector(q, lA, d);
- filter(q,S);
+ filter(q, S);
a = s/dot_lfvector(d, q, numverts);
@@ -957,7 +919,7 @@ static int cg_filtered(lfVector *ldV, fmatrix3x3 *lA, lfVector *lB, lfVector *z
//d = r+d*(s/s_prev);
add_lfvector_lfvectorS(d, r, d, (s/s_prev), numverts);
- filter(d,S);
+ filter(d, S);
conjgrad_loopcount++;
}
@@ -979,8 +941,7 @@ DO_INLINE void BuildPPinv(fmatrix3x3 *lA, fmatrix3x3 *P, fmatrix3x3 *Pinv)
// 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++)
- {
+ for (i = 0; i<lA[0].vcount; i++) {
// block diagonalizer
cp_fmatrix(P[i].m, lA[i].m);
inverse_fmatrix(Pinv[i].m, P[i].m);
@@ -1165,7 +1126,7 @@ static int cg_filtered_pre(lfVector *dv, fmatrix3x3 *lA, lfVector *lB, lfVector
DO_INLINE void dfdx_spring_type1(float to[3][3], float extent[3], float length, float L, float dot, float k)
{
// dir is unit length direction, rest is spring's restlength, k is spring constant.
- // return (outerprod(dir,dir)*k + (I - outerprod(dir,dir))*(k - ((k*L)/length)));
+ // return (outerprod(dir, dir)*k + (I - outerprod(dir, dir))*(k - ((k*L)/length)));
float temp[3][3];
float temp1 = k*(1.0 - (L/length));
@@ -1187,7 +1148,7 @@ DO_INLINE void dfdx_spring_type1(float to[3][3], float extent[3], float length,
DO_INLINE void dfdx_spring_type2(float to[3][3], float dir[3], float length, float L, float k, float cb)
{
- // return outerprod(dir,dir)*fbstar_jacobi(length, L, k, cb);
+ // return outerprod(dir, dir)*fbstar_jacobi(length, L, k, cb);
mul_fvectorT_fvectorS(to, dir, dir, fbstar_jacobi(length, L, k, cb));
}
@@ -1198,10 +1159,10 @@ DO_INLINE void dfdv_damp(float to[3][3], float dir[3], float damping)
}
-DO_INLINE void dfdx_spring(float to[3][3], float dir[3],float length,float L,float k)
+DO_INLINE void dfdx_spring(float to[3][3], float dir[3], float length, float L, float k)
{
// 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;
+ //return ( (I-outerprod(dir, dir))*Min(1.0f, rest/length) - I) * -k;
mul_fvectorT_fvector(to, dir, dir);
sub_fmatrix_fmatrix(to, I, to);
@@ -1211,13 +1172,13 @@ DO_INLINE void dfdx_spring(float to[3][3], float dir[3],float length,float L,fl
}
// unused atm
-DO_INLINE void dfdx_damp(float to[3][3], float dir[3],float length,const float vel[3],float rest,float damping)
+DO_INLINE void dfdx_damp(float to[3][3], float dir[3], float length, const float vel[3], float rest, float damping)
{
// inner spring damping vel is the relative velocity of the endpoints.
- // return (I-outerprod(dir,dir)) * (-damping * -(dot(dir,vel)/Max(length,rest)));
+ // return (I-outerprod(dir, dir)) * (-damping * -(dot(dir, vel)/Max(length, rest)));
mul_fvectorT_fvector(to, dir, dir);
sub_fmatrix_fmatrix(to, I, to);
- mul_fmatrix_S(to, (-damping * -(dot_v3v3(dir,vel)/MAX2(length,rest))));
+ mul_fmatrix_S(to, (-damping * -(dot_v3v3(dir, vel)/MAX2(length, rest))));
}
@@ -1227,17 +1188,17 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s,
ClothVertex *verts = cloth->verts;
float extent[3];
float length = 0, dot = 0;
- float dir[3] = {0,0,0};
+ float dir[3] = {0, 0, 0};
float vel[3];
float k = 0.0f;
float L = s->restlen;
float cb; /* = clmd->sim_parms->structural; */ /*UNUSED*/
- float nullf[3] = {0,0,0};
- float stretch_force[3] = {0,0,0};
- float bending_force[3] = {0,0,0};
- float damping_force[3] = {0,0,0};
- float nulldfdx[3][3]={ {0,0,0}, {0,0,0}, {0,0,0}};
+ float nullf[3] = {0, 0, 0};
+ float stretch_force[3] = {0, 0, 0};
+ float bending_force[3] = {0, 0, 0};
+ float damping_force[3] = {0, 0, 0};
+ float nulldfdx[3][3]={ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}};
float scaling = 0.0;
@@ -1255,8 +1216,7 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s,
s->flags &= ~CLOTH_SPRING_FLAG_NEEDED;
- if (length > ALMOST_ZERO)
- {
+ if (length > ALMOST_ZERO) {
/*
if (length>L)
{
@@ -1270,16 +1230,13 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s,
*/
mul_fvector_S(dir, extent, 1.0f/length);
}
- else
- {
+ else {
mul_fvector_S(dir, extent, 0.0f);
}
// calculate force of structural + shear springs
- if ((s->type & CLOTH_SPRING_TYPE_STRUCTURAL) || (s->type & CLOTH_SPRING_TYPE_SHEAR))
- {
- if (length > L || no_compress)
- {
+ if ((s->type & CLOTH_SPRING_TYPE_STRUCTURAL) || (s->type & CLOTH_SPRING_TYPE_SHEAR)) {
+ if (length > L || no_compress) {
s->flags |= CLOTH_SPRING_FLAG_NEEDED;
k = clmd->sim_parms->structural;
@@ -1337,10 +1294,8 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s,
// dfdx_spring(s->dfdx, dir, length, 0.0, k);
// dfdv_damp(s->dfdv, dir, MIN2(1.0, (clmd->sim_parms->goalfrict/100.0)));
}
- else // calculate force of bending springs
- {
- if (length < L)
- {
+ else { /* calculate force of bending springs */
+ if (length < L) {
s->flags |= CLOTH_SPRING_FLAG_NEEDED;
k = clmd->sim_parms->bending;
@@ -1351,17 +1306,15 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s,
mul_fvector_S(bending_force, dir, fbstar(length, L, k, cb));
VECADD(s->f, s->f, bending_force);
- dfdx_spring_type2(s->dfdx, dir, length,L, k, cb);
+ dfdx_spring_type2(s->dfdx, dir, length, L, k, cb);
}
}
}
DO_INLINE void cloth_apply_spring_force(ClothModifierData *UNUSED(clmd), ClothSpring *s, lfVector *lF, lfVector *UNUSED(X), lfVector *UNUSED(V), fmatrix3x3 *dFdV, fmatrix3x3 *dFdX)
{
- if (s->flags & CLOTH_SPRING_FLAG_NEEDED)
- {
- if (!(s->type & CLOTH_SPRING_TYPE_BENDING))
- {
+ if (s->flags & CLOTH_SPRING_FLAG_NEEDED) {
+ if (!(s->type & CLOTH_SPRING_TYPE_BENDING)) {
sub_fmatrix_fmatrix(dFdV[s->ij].m, dFdV[s->ij].m, s->dfdv);
sub_fmatrix_fmatrix(dFdV[s->kl].m, dFdV[s->kl].m, s->dfdv);
add_fmatrix_fmatrix(dFdV[s->matrix_index].m, dFdV[s->matrix_index].m, s->dfdv);
@@ -1381,7 +1334,7 @@ DO_INLINE void cloth_apply_spring_force(ClothModifierData *UNUSED(clmd), ClothSp
static void CalcFloat( float *v1, float *v2, float *v3, float *n)
{
- float n1[3],n2[3];
+ float n1[3], n2[3];
n1[0]= v1[0]-v2[0];
n2[0]= v2[0]-v3[0];
@@ -1397,7 +1350,7 @@ static void CalcFloat( float *v1, float *v2, float *v3, float *n)
static void CalcFloat4( float *v1, float *v2, float *v3, float *v4, float *n)
{
/* real cross! */
- float n1[3],n2[3];
+ float n1[3], n2[3];
n1[0]= v1[0]-v3[0];
n1[1]= v1[1]-v3[1];
@@ -1486,8 +1439,7 @@ static void hair_velocity_smoothing(ClothModifierData *clmd, lfVector *lF, lfVec
}
/* gather colliders */
- if (colliders && collfac > 0.0f) for (col = colliders->first; col; col = col->next)
- {
+ if (colliders && collfac > 0.0f) for (col = colliders->first; col; col = col->next) {
MVert *loc0 = col->collmd->x;
MVert *loc1 = col->collmd->xnew;
float vel[3];
@@ -1560,7 +1512,7 @@ static void hair_velocity_smoothing(ClothModifierData *clmd, lfVector *lF, lfVec
static void cloth_calc_force(ClothModifierData *clmd, float UNUSED(frame), lfVector *lF, lfVector *lX, lfVector *lV, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX, ListBase *effectors, float time, fmatrix3x3 *M)
{
- /* Collect forces and derivatives: F,dFdX,dFdV */
+ /* Collect forces and derivatives: F, dFdX, dFdV */
Cloth *cloth = clmd->clothObject;
unsigned int i = 0;
float spring_air = clmd->sim_parms->Cvi * 0.01f; /* viscosity of air scaled in percent */
@@ -1593,8 +1545,7 @@ static void cloth_calc_force(ClothModifierData *clmd, float UNUSED(frame), lfVec
/* multiply lF with mass matrix
* force = mass * acceleration (in this case: gravity)
*/
- for (i = 0; i < numverts; i++)
- {
+ for (i = 0; i < numverts; i++) {
float temp[3];
copy_v3_v3(temp, lF[i]);
mul_fmatrix_fvector(lF[i], M[i].m, temp);
@@ -1603,8 +1554,7 @@ static void cloth_calc_force(ClothModifierData *clmd, float UNUSED(frame), lfVec
submul_lfvectorS(lF, lV, spring_air, numverts);
/* handle external forces like wind */
- if (effectors)
- {
+ if (effectors) {
// 0 = force, 1 = normalized force
winvec = create_lfvector(cloth->numverts);
@@ -1612,25 +1562,23 @@ static void cloth_calc_force(ClothModifierData *clmd, float UNUSED(frame), lfVec
printf("winvec: out of memory in implicit.c\n");
// precalculate wind forces
- for (i = 0; i < cloth->numverts; i++)
- {
+ for (i = 0; i < cloth->numverts; i++) {
pd_point_from_loc(clmd->scene, (float*)lX[i], (float*)lV[i], i, &epoint);
pdDoEffectors(effectors, NULL, clmd->sim_parms->effector_weights, &epoint, winvec[i], NULL);
}
- for (i = 0; i < cloth->numfaces; i++)
- {
- float trinormal[3]={0,0,0}; // normalized triangle normal
- float triunnormal[3]={0,0,0}; // not-normalized-triangle normal
- float tmp[3]={0,0,0};
+ for (i = 0; i < cloth->numfaces; i++) {
+ float trinormal[3]={0, 0, 0}; // normalized triangle normal
+ float triunnormal[3]={0, 0, 0}; // not-normalized-triangle normal
+ float tmp[3]={0, 0, 0};
float factor = (mfaces[i].v4) ? 0.25 : 1.0 / 3.0;
factor *= 0.02;
// calculate face normal
if (mfaces[i].v4)
- CalcFloat4(lX[mfaces[i].v1],lX[mfaces[i].v2],lX[mfaces[i].v3],lX[mfaces[i].v4],triunnormal);
+ CalcFloat4(lX[mfaces[i].v1], lX[mfaces[i].v2], lX[mfaces[i].v3], lX[mfaces[i].v4], triunnormal);
else
- CalcFloat(lX[mfaces[i].v1],lX[mfaces[i].v2],lX[mfaces[i].v3],triunnormal);
+ CalcFloat(lX[mfaces[i].v1], lX[mfaces[i].v2], lX[mfaces[i].v3], triunnormal);
normalize_v3_v3(trinormal, triunnormal);
@@ -1650,8 +1598,7 @@ static void cloth_calc_force(ClothModifierData *clmd, float UNUSED(frame), lfVec
VECADDS(lF[mfaces[i].v3], lF[mfaces[i].v3], tmp, factor);
// add wind from v4
- if (mfaces[i].v4)
- {
+ if (mfaces[i].v4) {
copy_v3_v3(tmp, trinormal);
mul_v3_fl(tmp, calculateVertexWindForce(winvec[mfaces[i].v4], triunnormal));
VECADDS(lF[mfaces[i].v4], lF[mfaces[i].v4], tmp, factor);
@@ -1661,9 +1608,9 @@ static void cloth_calc_force(ClothModifierData *clmd, float UNUSED(frame), lfVec
/* Hair has only edges */
if (cloth->numfaces == 0) {
ClothSpring *spring;
- float edgevec[3]={0,0,0}; //edge vector
- float edgeunnormal[3]={0,0,0}; // not-normalized-edge normal
- float tmp[3]={0,0,0};
+ float edgevec[3]={0, 0, 0}; //edge vector
+ float edgeunnormal[3]={0, 0, 0}; // not-normalized-edge normal
+ float tmp[3]={0, 0, 0};
float factor = 0.01;
search = cloth->springs;
@@ -1692,8 +1639,7 @@ static void cloth_calc_force(ClothModifierData *clmd, float UNUSED(frame), lfVec
// calculate spring forces
search = cloth->springs;
- while (search)
- {
+ while (search) {
// only handle active springs
// if (((clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED) && !(springs[i].flags & CSPRING_FLAG_DEACTIVATE))|| !(clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED)) {}
cloth_calc_spring_force(clmd, search->link, lF, lX, lV, dFdV, dFdX, time);
@@ -1703,8 +1649,7 @@ static void cloth_calc_force(ClothModifierData *clmd, float UNUSED(frame), lfVec
// apply spring forces
search = cloth->springs;
- while (search)
- {
+ while (search) {
// only handle active springs
// if (((clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED) && !(springs[i].flags & CSPRING_FLAG_DEACTIVATE))|| !(clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED))
cloth_apply_spring_force(clmd, search->link, lF, lX, lV, dFdV, dFdX);
@@ -1823,7 +1768,7 @@ int cloth_calc_helper_forces(Object *UNUSED(ob), ClothModifierData * clmd, float
return 1;
}
-int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase *effectors)
+int implicit_solver(Object *ob, float frame, ClothModifierData *clmd, ListBase *effectors)
{
unsigned int i=0;
float step=0.0f, tf=clmd->sim_parms->timescale;
@@ -1836,21 +1781,17 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase
Implicit_Data *id = cloth->implicit;
int do_extra_solve;
- if (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) /* do goal stuff */
- {
- for (i = 0; i < numverts; i++)
- {
+ if (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) { /* do goal stuff */
+ for (i = 0; i < numverts; i++) {
// update velocities with constrained velocities from pinned verts
- if (verts [i].flags & CLOTH_VERT_FLAG_PINNED)
- {
+ if (verts [i].flags & CLOTH_VERT_FLAG_PINNED) {
sub_v3_v3v3(id->V[i], verts[i].xconst, verts[i].xold);
// mul_v3_fl(id->V[i], clmd->sim_parms->stepsPerFrame);
}
}
}
- while (step < tf)
- {
+ while (step < tf) {
// damping velocity for artistic reasons
mul_lfvectorS(id->V, id->V, clmd->sim_parms->vel_damping, numverts);
@@ -1864,13 +1805,10 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase
add_lfvector_lfvectorS(id->Xnew, id->X, id->Vnew, dt, numverts);
/* move pinned verts to correct position */
- for (i = 0; i < numverts; i++)
- {
- if (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL)
- {
- if (verts [i].flags & CLOTH_VERT_FLAG_PINNED)
- {
- float tvect[3] = {.0,.0,.0};
+ for (i = 0; i < numverts; i++) {
+ if (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) {
+ if (verts[i].flags & CLOTH_VERT_FLAG_PINNED) {
+ float tvect[3] = {0.0f, 0.0f, 0.0f};
sub_v3_v3v3(tvect, verts[i].xconst, verts[i].xold);
mul_fvector_S(tvect, tvect, step+dt);
VECADD(tvect, tvect, verts[i].xold);
@@ -1881,14 +1819,12 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase
copy_v3_v3(verts[i].txold, id->X[i]);
}
- if (clmd->coll_parms->flags & CLOTH_COLLSETTINGS_FLAG_ENABLED && clmd->clothObject->bvhtree)
- {
+ if (clmd->coll_parms->flags & CLOTH_COLLSETTINGS_FLAG_ENABLED && clmd->clothObject->bvhtree) {
// collisions
// itstart();
// update verts to current positions
- for (i = 0; i < numverts; i++)
- {
+ for (i = 0; i < numverts; i++) {
copy_v3_v3(verts[i].tx, id->Xnew[i]);
sub_v3_v3v3(verts[i].tv, verts[i].tx, verts[i].txold);
@@ -1904,8 +1840,7 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase
do_extra_solve = cloth_bvh_objcollision(ob, clmd, step/clmd->sim_parms->timescale, dt/clmd->sim_parms->timescale);
// copy corrected positions back to simulation
- for (i = 0; i < numverts; i++)
- {
+ for (i = 0; i < numverts; i++) {
// correct velocity again, just to be sure we had to change it due to adaptive collisions
sub_v3_v3v3(verts[i].tv, verts[i].tx, id->X[i]);
}
@@ -1913,11 +1848,9 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase
//if (do_extra_solve)
// cloth_calc_helper_forces(ob, clmd, initial_cos, step/clmd->sim_parms->timescale, dt/clmd->sim_parms->timescale);
- for (i = 0; i < numverts; i++)
- {
+ for (i = 0; i < numverts; i++) {
- if (do_extra_solve)
- {
+ if (do_extra_solve) {
if ((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (verts [i].flags & CLOTH_VERT_FLAG_PINNED))
continue;
@@ -1933,8 +1866,7 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase
// if there were collisions, advance the velocity from v_n+1/2 to v_n+1
- if (do_extra_solve)
- {
+ if (do_extra_solve) {
// V = Vnew;
cp_lfvector(id->V, id->Vnew, numverts);
@@ -1944,8 +1876,7 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase
simulate_implicit_euler(id->Vnew, id->X, id->V, id->F, id->dFdV, id->dFdX, dt / 2.0f, id->A, id->B, id->dV, id->S, id->z, id->olddV, id->P, id->Pinv, id->M, id->bigI);
}
}
- else
- {
+ else {
// X = Xnew;
cp_lfvector(id->X, id->Xnew, numverts);
}
@@ -1959,16 +1890,13 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase
step += dt;
}
- for (i = 0; i < numverts; i++)
- {
- if ((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (verts [i].flags & CLOTH_VERT_FLAG_PINNED))
- {
+ for (i = 0; i < numverts; i++) {
+ if ((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (verts [i].flags & CLOTH_VERT_FLAG_PINNED)) {
copy_v3_v3(verts[i].txold, verts[i].xconst); // TODO: test --> should be .x
copy_v3_v3(verts[i].x, verts[i].xconst);
copy_v3_v3(verts[i].v, id->V[i]);
}
- else
- {
+ else {
copy_v3_v3(verts[i].txold, id->X[i]);
copy_v3_v3(verts[i].x, id->X[i]);
copy_v3_v3(verts[i].v, id->V[i]);
@@ -1980,15 +1908,14 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase
return 1;
}
-void implicit_set_positions (ClothModifierData *clmd)
+void implicit_set_positions(ClothModifierData *clmd)
{
Cloth *cloth = clmd->clothObject;
ClothVertex *verts = cloth->verts;
unsigned int numverts = cloth->numverts, i;
Implicit_Data *id = cloth->implicit;
- for (i = 0; i < numverts; i++)
- {
+ for (i = 0; i < numverts; i++) {
copy_v3_v3(id->X[i], verts[i].x);
copy_v3_v3(id->V[i], verts[i].v);
}
diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c
index 2fd1d291363..1077b5ad7c3 100644
--- a/source/blender/blenkernel/intern/ipo.c
+++ b/source/blender/blenkernel/intern/ipo.c
@@ -81,13 +81,13 @@
/* Free data from old IPO-Blocks (those which haven't been converted), but not IPO block itself */
// XXX this shouldn't be necessary anymore, but may occur while not all data is converted yet
-void free_ipo (Ipo *ipo)
+void BKE_ipo_free(Ipo *ipo)
{
IpoCurve *icu, *icn;
- int n= 0;
+ int n = 0;
- for (icu= ipo->curve.first; icu; icu= icn) {
- icn= icu->next;
+ for (icu = ipo->curve.first; icu; icu = icn) {
+ icn = icu->next;
n++;
if (icu->bezt) MEM_freeN(icu->bezt);
@@ -98,7 +98,7 @@ void free_ipo (Ipo *ipo)
}
if (G.debug & G_DEBUG)
- printf("Freed %d (Unconverted) Ipo-Curves from IPO '%s'\n", n, ipo->id.name+2);
+ printf("Freed %d (Unconverted) Ipo-Curves from IPO '%s'\n", n, ipo->id.name + 2);
}
/* *************************************************** */
@@ -115,35 +115,35 @@ typedef struct AdrBit2Path {
/* Mapping Tables to use bits <-> RNA paths */
/* Object layers */
-static AdrBit2Path ob_layer_bits[]= {
- {(1<<0), "layers", 0},
- {(1<<1), "layers", 1},
- {(1<<2), "layers", 2},
- {(1<<3), "layers", 3},
- {(1<<4), "layers", 4},
- {(1<<5), "layers", 5},
- {(1<<6), "layers", 6},
- {(1<<7), "layers", 7},
- {(1<<8), "layers", 8},
- {(1<<9), "layers", 9},
- {(1<<10), "layers", 10},
- {(1<<11), "layers", 11},
- {(1<<12), "layers", 12},
- {(1<<13), "layers", 13},
- {(1<<14), "layers", 14},
- {(1<<15), "layers", 15},
- {(1<<16), "layers", 16},
- {(1<<17), "layers", 17},
- {(1<<18), "layers", 18},
- {(1<<19), "layers", 19}
+static AdrBit2Path ob_layer_bits[] = {
+ {(1 << 0), "layers", 0},
+ {(1 << 1), "layers", 1},
+ {(1 << 2), "layers", 2},
+ {(1 << 3), "layers", 3},
+ {(1 << 4), "layers", 4},
+ {(1 << 5), "layers", 5},
+ {(1 << 6), "layers", 6},
+ {(1 << 7), "layers", 7},
+ {(1 << 8), "layers", 8},
+ {(1 << 9), "layers", 9},
+ {(1 << 10), "layers", 10},
+ {(1 << 11), "layers", 11},
+ {(1 << 12), "layers", 12},
+ {(1 << 13), "layers", 13},
+ {(1 << 14), "layers", 14},
+ {(1 << 15), "layers", 15},
+ {(1 << 16), "layers", 16},
+ {(1 << 17), "layers", 17},
+ {(1 << 18), "layers", 18},
+ {(1 << 19), "layers", 19}
};
/* Material mode */
-static AdrBit2Path ma_mode_bits[]= {
+static AdrBit2Path ma_mode_bits[] = {
// {MA_TRACEBLE, "traceable", 0},
-// {MA_SHADOW, "shadow", 0},
+// {MA_SHADOW, "shadow", 0},
// {MA_SHLESS, "shadeless", 0},
-// ...
+// ...
{MA_RAYTRANSP, "transparency", 0},
{MA_RAYMIRROR, "raytrace_mirror.enabled", 0},
// {MA_HALO, "type", MA_TYPE_HALO}
@@ -154,99 +154,99 @@ static AdrBit2Path ma_mode_bits[]= {
/* quick macro for returning the appropriate array for adrcode_bitmaps_to_paths() */
#define RET_ABP(items) \
{ \
- *tot= sizeof(items)/sizeof(AdrBit2Path); \
+ *tot = sizeof(items) / sizeof(AdrBit2Path); \
return items; \
}
/* This function checks if a Blocktype+Adrcode combo, returning a mapping table */
-static AdrBit2Path *adrcode_bitmaps_to_paths (int blocktype, int adrcode, int *tot)
+static AdrBit2Path *adrcode_bitmaps_to_paths(int blocktype, int adrcode, int *tot)
{
/* Object layers */
if ((blocktype == ID_OB) && (adrcode == OB_LAY))
RET_ABP(ob_layer_bits)
- else if ((blocktype == ID_MA) && (adrcode == MA_MODE))
- RET_ABP(ma_mode_bits)
- // XXX TODO: add other types...
+ else if ((blocktype == ID_MA) && (adrcode == MA_MODE))
+ RET_ABP(ma_mode_bits)
+ // XXX TODO: add other types...
- /* Normal curve */
- return NULL;
+ /* Normal curve */
+ return NULL;
}
/* *************************************************** */
/* ADRCODE to RNA-Path Conversion Code - Standard */
/* Object types */
-static const char *ob_adrcodes_to_paths (int adrcode, int *array_index)
+static const char *ob_adrcodes_to_paths(int adrcode, int *array_index)
{
/* set array index like this in-case nothing sets it correctly */
- *array_index= 0;
+ *array_index = 0;
/* result depends on adrcode */
switch (adrcode) {
case OB_LOC_X:
- *array_index= 0; return "location";
+ *array_index = 0; return "location";
case OB_LOC_Y:
- *array_index= 1; return "location";
+ *array_index = 1; return "location";
case OB_LOC_Z:
- *array_index= 2; return "location";
+ *array_index = 2; return "location";
case OB_DLOC_X:
- *array_index= 0; return "delta_location";
+ *array_index = 0; return "delta_location";
case OB_DLOC_Y:
- *array_index= 1; return "delta_location";
+ *array_index = 1; return "delta_location";
case OB_DLOC_Z:
- *array_index= 2; return "delta_location";
+ *array_index = 2; return "delta_location";
case OB_ROT_X:
- *array_index= 0; return "rotation_euler";
+ *array_index = 0; return "rotation_euler";
case OB_ROT_Y:
- *array_index= 1; return "rotation_euler";
+ *array_index = 1; return "rotation_euler";
case OB_ROT_Z:
- *array_index= 2; return "rotation_euler";
+ *array_index = 2; return "rotation_euler";
case OB_DROT_X:
- *array_index= 0; return "delta_rotation_euler";
+ *array_index = 0; return "delta_rotation_euler";
case OB_DROT_Y:
- *array_index= 1; return "delta_rotation_euler";
+ *array_index = 1; return "delta_rotation_euler";
case OB_DROT_Z:
- *array_index= 2; return "delta_rotation_euler";
+ *array_index = 2; return "delta_rotation_euler";
case OB_SIZE_X:
- *array_index= 0; return "scale";
+ *array_index = 0; return "scale";
case OB_SIZE_Y:
- *array_index= 1; return "scale";
+ *array_index = 1; return "scale";
case OB_SIZE_Z:
- *array_index= 2; return "scale";
+ *array_index = 2; return "scale";
case OB_DSIZE_X:
- *array_index= 0; return "delta_scale";
+ *array_index = 0; return "delta_scale";
case OB_DSIZE_Y:
- *array_index= 1; return "delta_scale";
+ *array_index = 1; return "delta_scale";
case OB_DSIZE_Z:
- *array_index= 2; return "delta_scale";
+ *array_index = 2; return "delta_scale";
case OB_COL_R:
- *array_index= 0; return "color";
+ *array_index = 0; return "color";
case OB_COL_G:
- *array_index= 1; return "color";
+ *array_index = 1; return "color";
case OB_COL_B:
- *array_index= 2; return "color";
+ *array_index = 2; return "color";
case OB_COL_A:
- *array_index= 3; return "color";
+ *array_index = 3; return "color";
#if 0
case OB_PD_FSTR:
- if (ob->pd) poin= &(ob->pd->f_strength);
+ if (ob->pd) poin = &(ob->pd->f_strength);
break;
case OB_PD_FFALL:
- if (ob->pd) poin= &(ob->pd->f_power);
+ if (ob->pd) poin = &(ob->pd->f_power);
break;
case OB_PD_SDAMP:
- if (ob->pd) poin= &(ob->pd->pdef_damp);
+ if (ob->pd) poin = &(ob->pd->pdef_damp);
break;
case OB_PD_RDAMP:
- if (ob->pd) poin= &(ob->pd->pdef_rdamp);
+ if (ob->pd) poin = &(ob->pd->pdef_rdamp);
break;
case OB_PD_PERM:
- if (ob->pd) poin= &(ob->pd->pdef_perm);
+ if (ob->pd) poin = &(ob->pd->pdef_perm);
break;
case OB_PD_FMAXD:
- if (ob->pd) poin= &(ob->pd->maxdist);
+ if (ob->pd) poin = &(ob->pd->maxdist);
break;
#endif
}
@@ -257,42 +257,42 @@ static const char *ob_adrcodes_to_paths (int adrcode, int *array_index)
/* PoseChannel types
* NOTE: pchan name comes from 'actname' added earlier...
*/
-static const char *pchan_adrcodes_to_paths (int adrcode, int *array_index)
+static const char *pchan_adrcodes_to_paths(int adrcode, int *array_index)
{
/* set array index like this in-case nothing sets it correctly */
- *array_index= 0;
+ *array_index = 0;
/* result depends on adrcode */
switch (adrcode) {
case AC_QUAT_W:
- *array_index= 0; return "rotation_quaternion";
+ *array_index = 0; return "rotation_quaternion";
case AC_QUAT_X:
- *array_index= 1; return "rotation_quaternion";
+ *array_index = 1; return "rotation_quaternion";
case AC_QUAT_Y:
- *array_index= 2; return "rotation_quaternion";
+ *array_index = 2; return "rotation_quaternion";
case AC_QUAT_Z:
- *array_index= 3; return "rotation_quaternion";
+ *array_index = 3; return "rotation_quaternion";
case AC_EUL_X:
- *array_index= 0; return "rotation_euler";
+ *array_index = 0; return "rotation_euler";
case AC_EUL_Y:
- *array_index= 1; return "rotation_euler";
+ *array_index = 1; return "rotation_euler";
case AC_EUL_Z:
- *array_index= 2; return "rotation_euler";
+ *array_index = 2; return "rotation_euler";
case AC_LOC_X:
- *array_index= 0; return "location";
+ *array_index = 0; return "location";
case AC_LOC_Y:
- *array_index= 1; return "location";
+ *array_index = 1; return "location";
case AC_LOC_Z:
- *array_index= 2; return "location";
+ *array_index = 2; return "location";
case AC_SIZE_X:
- *array_index= 0; return "scale";
+ *array_index = 0; return "scale";
case AC_SIZE_Y:
- *array_index= 1; return "scale";
+ *array_index = 1; return "scale";
case AC_SIZE_Z:
- *array_index= 2; return "scale";
+ *array_index = 2; return "scale";
}
/* for debugging only */
@@ -301,16 +301,16 @@ static const char *pchan_adrcodes_to_paths (int adrcode, int *array_index)
}
/* Constraint types */
-static const char *constraint_adrcodes_to_paths (int adrcode, int *array_index)
+static const char *constraint_adrcodes_to_paths(int adrcode, int *array_index)
{
/* set array index like this in-case nothing sets it correctly */
- *array_index= 0;
+ *array_index = 0;
/* result depends on adrcode */
switch (adrcode) {
case CO_ENFORCE:
return "influence";
- case CO_HEADTAIL: // XXX this needs to be wrapped in RNA.. probably then this path will be invalid
+ case CO_HEADTAIL: // XXX this needs to be wrapped in RNA.. probably then this path will be invalid
return "data.head_tail";
}
@@ -321,7 +321,7 @@ static const char *constraint_adrcodes_to_paths (int adrcode, int *array_index)
* NOTE: as we don't have access to the keyblock where the data comes from (for now),
* we'll just use numerical indices for now...
*/
-static char *shapekey_adrcodes_to_paths (int adrcode, int *UNUSED(array_index))
+static char *shapekey_adrcodes_to_paths(int adrcode, int *UNUSED(array_index))
{
static char buf[128];
@@ -338,64 +338,64 @@ static char *shapekey_adrcodes_to_paths (int adrcode, int *UNUSED(array_index))
}
/* MTex (Texture Slot) types */
-static const char *mtex_adrcodes_to_paths (int adrcode, int *UNUSED(array_index))
+static const char *mtex_adrcodes_to_paths(int adrcode, int *UNUSED(array_index))
{
- const char *base=NULL, *prop=NULL;
+ const char *base = NULL, *prop = NULL;
static char buf[128];
/* base part of path */
- if (adrcode & MA_MAP1) base= "textures[0]";
- else if (adrcode & MA_MAP2) base= "textures[1]";
- else if (adrcode & MA_MAP3) base= "textures[2]";
- else if (adrcode & MA_MAP4) base= "textures[3]";
- else if (adrcode & MA_MAP5) base= "textures[4]";
- else if (adrcode & MA_MAP6) base= "textures[5]";
- else if (adrcode & MA_MAP7) base= "textures[6]";
- else if (adrcode & MA_MAP8) base= "textures[7]";
- else if (adrcode & MA_MAP9) base= "textures[8]";
- else if (adrcode & MA_MAP10) base= "textures[9]";
- else if (adrcode & MA_MAP11) base= "textures[10]";
- else if (adrcode & MA_MAP12) base= "textures[11]";
- else if (adrcode & MA_MAP13) base= "textures[12]";
- else if (adrcode & MA_MAP14) base= "textures[13]";
- else if (adrcode & MA_MAP15) base= "textures[14]";
- else if (adrcode & MA_MAP16) base= "textures[15]";
- else if (adrcode & MA_MAP17) base= "textures[16]";
- else if (adrcode & MA_MAP18) base= "textures[17]";
+ if (adrcode & MA_MAP1) base = "textures[0]";
+ else if (adrcode & MA_MAP2) base = "textures[1]";
+ else if (adrcode & MA_MAP3) base = "textures[2]";
+ else if (adrcode & MA_MAP4) base = "textures[3]";
+ else if (adrcode & MA_MAP5) base = "textures[4]";
+ else if (adrcode & MA_MAP6) base = "textures[5]";
+ else if (adrcode & MA_MAP7) base = "textures[6]";
+ else if (adrcode & MA_MAP8) base = "textures[7]";
+ else if (adrcode & MA_MAP9) base = "textures[8]";
+ else if (adrcode & MA_MAP10) base = "textures[9]";
+ else if (adrcode & MA_MAP11) base = "textures[10]";
+ else if (adrcode & MA_MAP12) base = "textures[11]";
+ else if (adrcode & MA_MAP13) base = "textures[12]";
+ else if (adrcode & MA_MAP14) base = "textures[13]";
+ else if (adrcode & MA_MAP15) base = "textures[14]";
+ else if (adrcode & MA_MAP16) base = "textures[15]";
+ else if (adrcode & MA_MAP17) base = "textures[16]";
+ else if (adrcode & MA_MAP18) base = "textures[17]";
/* property identifier for path */
- adrcode= (adrcode & (MA_MAP1-1));
+ adrcode = (adrcode & (MA_MAP1 - 1));
switch (adrcode) {
#if 0 // XXX these are not wrapped in RNA yet!
case MAP_OFS_X:
- poin= &(mtex->ofs[0]); break;
+ poin = &(mtex->ofs[0]); break;
case MAP_OFS_Y:
- poin= &(mtex->ofs[1]); break;
+ poin = &(mtex->ofs[1]); break;
case MAP_OFS_Z:
- poin= &(mtex->ofs[2]); break;
+ poin = &(mtex->ofs[2]); break;
case MAP_SIZE_X:
- poin= &(mtex->size[0]); break;
+ poin = &(mtex->size[0]); break;
case MAP_SIZE_Y:
- poin= &(mtex->size[1]); break;
+ poin = &(mtex->size[1]); break;
case MAP_SIZE_Z:
- poin= &(mtex->size[2]); break;
+ poin = &(mtex->size[2]); break;
case MAP_R:
- poin= &(mtex->r); break;
+ poin = &(mtex->r); break;
case MAP_G:
- poin= &(mtex->g); break;
+ poin = &(mtex->g); break;
case MAP_B:
- poin= &(mtex->b); break;
+ poin = &(mtex->b); break;
case MAP_DVAR:
- poin= &(mtex->def_var); break;
+ poin = &(mtex->def_var); break;
case MAP_COLF:
- poin= &(mtex->colfac); break;
+ poin = &(mtex->colfac); break;
case MAP_NORF:
- poin= &(mtex->norfac); break;
+ poin = &(mtex->norfac); break;
case MAP_VARF:
- poin= &(mtex->varfac); break;
+ poin = &(mtex->varfac); break;
#endif
case MAP_DISP:
- prop= "warp_factor"; break;
+ prop = "warp_factor"; break;
}
/* only build and return path if there's a property */
@@ -408,10 +408,10 @@ static const char *mtex_adrcodes_to_paths (int adrcode, int *UNUSED(array_index)
}
/* Texture types */
-static const char *texture_adrcodes_to_paths (int adrcode, int *array_index)
+static const char *texture_adrcodes_to_paths(int adrcode, int *array_index)
{
/* set array index like this in-case nothing sets it correctly */
- *array_index= 0;
+ *array_index = 0;
/* result depends on adrcode */
switch (adrcode) {
@@ -420,7 +420,7 @@ 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
@@ -432,15 +432,15 @@ static const char *texture_adrcodes_to_paths (int adrcode, int *array_index)
case TE_N_BAS2:
return "noise_basis"; // XXX this is not yet defined in RNA...
- /* voronoi */
+ /* voronoi */
case TE_VNW1:
- *array_index= 0; return "feature_weights";
+ *array_index = 0; return "feature_weights";
case TE_VNW2:
- *array_index= 1; return "feature_weights";
+ *array_index = 1; return "feature_weights";
case TE_VNW3:
- *array_index= 2; return "feature_weights";
+ *array_index = 2; return "feature_weights";
case TE_VNW4:
- *array_index= 3; return "feature_weights";
+ *array_index = 3; return "feature_weights";
case TE_VNMEXP:
return "minkovsky_exponent";
case TE_VN_DISTM:
@@ -448,17 +448,17 @@ static const char *texture_adrcodes_to_paths (int adrcode, int *array_index)
case TE_VN_COLT:
return "color_type";
- /* distorted noise / voronoi */
+ /* distorted noise / voronoi */
case TE_ISCA:
return "noise_intensity";
- /* distorted noise */
+ /* distorted noise */
case TE_DISTA:
return "distortion_amount";
- /* musgrave */
+ /* musgrave */
case TE_MG_TYP: // XXX texture RNA undefined
- // poin= &(tex->stype); *type= IPO_SHORT; break;
+ // poin= &(tex->stype); *type= IPO_SHORT; break;
break;
case TE_MGH:
return "highest_dimension";
@@ -472,11 +472,11 @@ static const char *texture_adrcodes_to_paths (int adrcode, int *array_index)
return "gain";
case TE_COL_R:
- *array_index= 0; return "rgb_factor";
+ *array_index = 0; return "rgb_factor";
case TE_COL_G:
- *array_index= 1; return "rgb_factor";
+ *array_index = 1; return "rgb_factor";
case TE_COL_B:
- *array_index= 2; return "rgb_factor";
+ *array_index = 2; return "rgb_factor";
case TE_BRIGHT:
return "brightness";
@@ -488,33 +488,33 @@ static const char *texture_adrcodes_to_paths (int adrcode, int *array_index)
}
/* Material Types */
-static const char *material_adrcodes_to_paths (int adrcode, int *array_index)
+static const char *material_adrcodes_to_paths(int adrcode, int *array_index)
{
/* set array index like this in-case nothing sets it correctly */
- *array_index= 0;
+ *array_index = 0;
/* result depends on adrcode */
switch (adrcode) {
case MA_COL_R:
- *array_index= 0; return "diffuse_color";
+ *array_index = 0; return "diffuse_color";
case MA_COL_G:
- *array_index= 1; return "diffuse_color";
+ *array_index = 1; return "diffuse_color";
case MA_COL_B:
- *array_index= 2; return "diffuse_color";
+ *array_index = 2; return "diffuse_color";
case MA_SPEC_R:
- *array_index= 0; return "specular_color";
+ *array_index = 0; return "specular_color";
case MA_SPEC_G:
- *array_index= 1; return "specular_color";
+ *array_index = 1; return "specular_color";
case MA_SPEC_B:
- *array_index= 2; return "specular_color";
+ *array_index = 2; return "specular_color";
case MA_MIR_R:
- *array_index= 0; return "mirror_color";
+ *array_index = 0; return "mirror_color";
case MA_MIR_G:
- *array_index= 1; return "mirror_color";
+ *array_index = 1; return "mirror_color";
case MA_MIR_B:
- *array_index= 2; return "mirror_color";
+ *array_index = 2; return "mirror_color";
case MA_ALPHA:
return "alpha";
@@ -572,10 +572,10 @@ static const char *material_adrcodes_to_paths (int adrcode, int *array_index)
}
/* Camera Types */
-static const char *camera_adrcodes_to_paths (int adrcode, int *array_index)
+static const char *camera_adrcodes_to_paths(int adrcode, int *array_index)
{
/* set array index like this in-case nothing sets it correctly */
- *array_index= 0;
+ *array_index = 0;
/* result depends on adrcode */
switch (adrcode) {
@@ -596,9 +596,9 @@ static const char *camera_adrcodes_to_paths (int adrcode, int *array_index)
#if 0 // XXX these are not defined in RNA
case CAM_YF_APERT:
- poin= &(ca->YF_aperture); break;
+ poin = &(ca->YF_aperture); break;
case CAM_YF_FDIST:
- poin= &(ca->YF_dofdist); break;
+ poin = &(ca->YF_dofdist); break;
#endif // XXX these are not defined in RNA
case CAM_SHIFT_X:
@@ -612,10 +612,10 @@ static const char *camera_adrcodes_to_paths (int adrcode, int *array_index)
}
/* Lamp Types */
-static const char *lamp_adrcodes_to_paths (int adrcode, int *array_index)
+static const char *lamp_adrcodes_to_paths(int adrcode, int *array_index)
{
/* set array index like this in-case nothing sets it correctly */
- *array_index= 0;
+ *array_index = 0;
/* result depends on adrcode */
switch (adrcode) {
@@ -623,11 +623,11 @@ static const char *lamp_adrcodes_to_paths (int adrcode, int *array_index)
return "energy";
case LA_COL_R:
- *array_index= 0; return "color";
+ *array_index = 0; return "color";
case LA_COL_G:
- *array_index= 1; return "color";
+ *array_index = 1; return "color";
case LA_COL_B:
- *array_index= 2; return "color";
+ *array_index = 2; return "color";
case LA_DIST:
return "distance";
@@ -654,10 +654,10 @@ static const char *lamp_adrcodes_to_paths (int adrcode, int *array_index)
}
/* Sound Types */
-static const char *sound_adrcodes_to_paths (int adrcode, int *array_index)
+static const char *sound_adrcodes_to_paths(int adrcode, int *array_index)
{
/* set array index like this in-case nothing sets it correctly */
- *array_index= 0;
+ *array_index = 0;
/* result depends on adrcode */
switch (adrcode) {
@@ -665,7 +665,7 @@ static const char *sound_adrcodes_to_paths (int adrcode, int *array_index)
return "volume";
case SND_PITCH:
return "pitch";
- /* XXX Joshua -- I had wrapped panning in rna, but someone commented out, calling it "unused" */
+ /* XXX Joshua -- I had wrapped panning in rna, but someone commented out, calling it "unused" */
#if 0
case SND_PANNING:
return "panning";
@@ -679,25 +679,25 @@ static const char *sound_adrcodes_to_paths (int adrcode, int *array_index)
}
/* World Types */
-static const char *world_adrcodes_to_paths (int adrcode, int *array_index)
+static const char *world_adrcodes_to_paths(int adrcode, int *array_index)
{
/* set array index like this in-case nothing sets it correctly */
- *array_index= 0;
+ *array_index = 0;
/* result depends on adrcode */
switch (adrcode) {
case WO_HOR_R:
- *array_index= 0; return "horizon_color";
+ *array_index = 0; return "horizon_color";
case WO_HOR_G:
- *array_index= 1; return "horizon_color";
+ *array_index = 1; return "horizon_color";
case WO_HOR_B:
- *array_index= 2; return "horizon_color";
+ *array_index = 2; return "horizon_color";
case WO_ZEN_R:
- *array_index= 0; return "zenith_color";
+ *array_index = 0; return "zenith_color";
case WO_ZEN_G:
- *array_index= 1; return "zenith_color";
+ *array_index = 1; return "zenith_color";
case WO_ZEN_B:
- *array_index= 2; return "zenith_color";
+ *array_index = 2; return "zenith_color";
case WO_EXPOS:
return "exposure";
@@ -724,16 +724,16 @@ static const char *world_adrcodes_to_paths (int adrcode, int *array_index)
default: /* for now, we assume that the others were MTex channels */
return mtex_adrcodes_to_paths(adrcode, array_index);
- }
+ }
return NULL;
}
/* Particle Types */
-static const char *particle_adrcodes_to_paths (int adrcode, int *array_index)
+static const char *particle_adrcodes_to_paths(int adrcode, int *array_index)
{
/* set array index like this in-case nothing sets it correctly */
- *array_index= 0;
+ *array_index = 0;
/* result depends on adrcode */
switch (adrcode) {
@@ -752,11 +752,11 @@ static const char *particle_adrcodes_to_paths (int adrcode, int *array_index)
case PART_LENGTH:
return "settings.length";
case PART_GRAV_X:
- *array_index= 0; return "settings.acceleration";
+ *array_index = 0; return "settings.acceleration";
case PART_GRAV_Y:
- *array_index= 1; return "settings.acceleration";
+ *array_index = 1; return "settings.acceleration";
case PART_GRAV_Z:
- *array_index= 2; return "settings.acceleration";
+ *array_index = 2; return "settings.acceleration";
case PART_KINK_AMP:
return "settings.kink_amplitude";
case PART_KINK_FREQ:
@@ -773,22 +773,22 @@ static const char *particle_adrcodes_to_paths (int adrcode, int *array_index)
* as the similar object forces */
#if 0
case PART_PD_FSTR:
- if (part->pd) poin= &(part->pd->f_strength);
+ if (part->pd) poin = &(part->pd->f_strength);
break;
case PART_PD_FFALL:
- if (part->pd) poin= &(part->pd->f_power);
+ if (part->pd) poin = &(part->pd->f_power);
break;
case PART_PD_FMAXD:
- if (part->pd) poin= &(part->pd->maxdist);
+ if (part->pd) poin = &(part->pd->maxdist);
break;
case PART_PD2_FSTR:
- if (part->pd2) poin= &(part->pd2->f_strength);
+ if (part->pd2) poin = &(part->pd2->f_strength);
break;
case PART_PD2_FFALL:
- if (part->pd2) poin= &(part->pd2->f_power);
+ if (part->pd2) poin = &(part->pd2->f_power);
break;
case PART_PD2_FMAXD:
- if (part->pd2) poin= &(part->pd2->maxdist);
+ if (part->pd2) poin = &(part->pd2->maxdist);
break;
#endif
@@ -807,84 +807,84 @@ static const char *particle_adrcodes_to_paths (int adrcode, int *array_index)
* - array_index - index in property's array (if applicable) to use
* - return - the allocated path...
*/
-static char *get_rna_access (int blocktype, int adrcode, char actname[], char constname[], Sequence *seq, int *array_index)
+static char *get_rna_access(int blocktype, int adrcode, char actname[], char constname[], Sequence *seq, int *array_index)
{
- DynStr *path= BLI_dynstr_new();
- const char *propname=NULL;
- char *rpath=NULL;
+ DynStr *path = BLI_dynstr_new();
+ const char *propname = NULL;
+ char *rpath = NULL;
char buf[512];
- int dummy_index= 0;
+ int dummy_index = 0;
/* hack: if constname is set, we can only be dealing with an Constraint curve */
if (constname)
- blocktype= ID_CO;
+ blocktype = ID_CO;
/* get property name based on blocktype */
switch (blocktype) {
case ID_OB: /* object */
- propname= ob_adrcodes_to_paths(adrcode, &dummy_index);
+ propname = ob_adrcodes_to_paths(adrcode, &dummy_index);
break;
case ID_PO: /* pose channel */
- propname= pchan_adrcodes_to_paths(adrcode, &dummy_index);
+ propname = pchan_adrcodes_to_paths(adrcode, &dummy_index);
break;
case ID_KE: /* shapekeys */
- propname= shapekey_adrcodes_to_paths(adrcode, &dummy_index);
+ propname = shapekey_adrcodes_to_paths(adrcode, &dummy_index);
break;
case ID_CO: /* constraint */
- propname= constraint_adrcodes_to_paths(adrcode, &dummy_index);
+ propname = constraint_adrcodes_to_paths(adrcode, &dummy_index);
break;
case ID_TE: /* texture */
- propname= texture_adrcodes_to_paths(adrcode, &dummy_index);
+ propname = texture_adrcodes_to_paths(adrcode, &dummy_index);
break;
case ID_MA: /* material */
- propname= material_adrcodes_to_paths(adrcode, &dummy_index);
+ propname = material_adrcodes_to_paths(adrcode, &dummy_index);
break;
case ID_CA: /* camera */
- propname= camera_adrcodes_to_paths(adrcode, &dummy_index);
+ propname = camera_adrcodes_to_paths(adrcode, &dummy_index);
break;
case ID_LA: /* lamp */
- propname= lamp_adrcodes_to_paths(adrcode, &dummy_index);
+ propname = lamp_adrcodes_to_paths(adrcode, &dummy_index);
break;
case ID_SO: /* sound */
- propname= sound_adrcodes_to_paths(adrcode, &dummy_index);
+ propname = sound_adrcodes_to_paths(adrcode, &dummy_index);
break;
case ID_WO: /* world */
- propname= world_adrcodes_to_paths(adrcode, &dummy_index);
+ propname = world_adrcodes_to_paths(adrcode, &dummy_index);
break;
case ID_PA: /* particle */
- propname= particle_adrcodes_to_paths(adrcode, &dummy_index);
+ propname = particle_adrcodes_to_paths(adrcode, &dummy_index);
break;
case ID_CU: /* curve */
/* this used to be a 'dummy' curve which got evaluated on the fly...
* now we've got real var for this!
*/
- propname= "eval_time";
+ propname = "eval_time";
break;
/* XXX problematic blocktypes */
case ID_SEQ: /* sequencer strip */
//SEQ_FAC1:
switch (adrcode) {
- case SEQ_FAC1:
- propname= "effect_fader";
- break;
- case SEQ_FAC_SPEED:
- propname= "speed_fader";
- break;
- case SEQ_FAC_OPACITY:
- propname= "blend_opacity";
- break;
+ case SEQ_FAC1:
+ propname = "effect_fader";
+ break;
+ case SEQ_FAC_SPEED:
+ propname = "speed_fader";
+ break;
+ case SEQ_FAC_OPACITY:
+ propname = "blend_opacity";
+ break;
}
// poin= &(seq->facf0); // XXX this doesn't seem to be included anywhere in sequencer RNA...
break;
@@ -906,7 +906,7 @@ static char *get_rna_access (int blocktype, int adrcode, char actname[], char co
if ((propname == NULL) && (blocktype > 0)) {
/* nothing was found, so exit */
if (array_index)
- *array_index= 0;
+ *array_index = 0;
BLI_dynstr_free(path);
@@ -914,7 +914,7 @@ static char *get_rna_access (int blocktype, int adrcode, char actname[], char co
}
else {
if (array_index)
- *array_index= dummy_index;
+ *array_index = dummy_index;
}
/* 'buf' _must_ be initialized in this block */
@@ -925,11 +925,11 @@ static char *get_rna_access (int blocktype, int adrcode, char actname[], char co
BLI_snprintf(buf, sizeof(buf), "pose.bones[\"%s\"].constraints[\"%s\"]", actname, constname);
}
else if (actname && actname[0]) {
- if ((blocktype == ID_OB) && strcmp(actname, "Object")==0) {
+ if ((blocktype == ID_OB) && strcmp(actname, "Object") == 0) {
/* Actionified "Object" IPO's... no extra path stuff needed */
- buf[0]= '\0'; /* empty string */
+ buf[0] = '\0'; /* empty string */
}
- else if ((blocktype == ID_KE) && strcmp(actname, "Shape")==0) {
+ else if ((blocktype == ID_KE) && strcmp(actname, "Shape") == 0) {
/* Actionified "Shape" IPO's - these are forced onto object level via the action container there... */
strcpy(buf, "data.shape_keys");
}
@@ -944,10 +944,10 @@ static char *get_rna_access (int blocktype, int adrcode, char actname[], char co
}
else if (seq) {
/* Sequence names in Scene */
- BLI_snprintf(buf, sizeof(buf), "sequence_editor.sequences_all[\"%s\"]", seq->name+2);
+ BLI_snprintf(buf, sizeof(buf), "sequence_editor.sequences_all[\"%s\"]", seq->name + 2);
}
else {
- buf[0]= '\0'; /* empty string */
+ buf[0] = '\0'; /* empty string */
}
BLI_dynstr_append(path, buf);
@@ -966,7 +966,7 @@ static char *get_rna_access (int blocktype, int adrcode, char actname[], char co
}
/* convert to normal MEM_malloc'd string */
- rpath= BLI_dynstr_get_cstring(path);
+ rpath = BLI_dynstr_get_cstring(path);
BLI_dynstr_free(path);
/* return path... */
@@ -977,7 +977,7 @@ static char *get_rna_access (int blocktype, int adrcode, char actname[], char co
/* Conversion Utilities */
/* Convert adrcodes to driver target transform channel types */
-static short adrcode_to_dtar_transchan (short adrcode)
+static short adrcode_to_dtar_transchan(short adrcode)
{
switch (adrcode) {
case OB_LOC_X:
@@ -1007,12 +1007,12 @@ static short adrcode_to_dtar_transchan (short adrcode)
}
/* Convert IpoDriver to ChannelDriver - will free the old data (i.e. the old driver) */
-static ChannelDriver *idriver_to_cdriver (IpoDriver *idriver)
+static ChannelDriver *idriver_to_cdriver(IpoDriver *idriver)
{
ChannelDriver *cdriver;
/* allocate memory for new driver */
- cdriver= MEM_callocN(sizeof(ChannelDriver), "ChannelDriver");
+ cdriver = MEM_callocN(sizeof(ChannelDriver), "ChannelDriver");
/* if 'pydriver', just copy data across */
if (idriver->type == IPO_DRIVER_TYPE_PYTHON) {
@@ -1027,54 +1027,54 @@ static ChannelDriver *idriver_to_cdriver (IpoDriver *idriver)
DriverTarget *dtar = NULL;
/* this should be ok for all types here... */
- cdriver->type= DRIVER_TYPE_AVERAGE;
+ cdriver->type = DRIVER_TYPE_AVERAGE;
/* what to store depends on the 'blocktype' - object or posechannel */
if (idriver->blocktype == ID_AR) { /* PoseChannel */
if (idriver->adrcode == OB_ROT_DIFF) {
/* Rotational Difference requires a special type of variable */
- dvar= driver_add_new_variable(cdriver);
+ dvar = driver_add_new_variable(cdriver);
driver_change_variable_type(dvar, DVAR_TYPE_ROT_DIFF);
- /* first bone target */
- dtar= &dvar->targets[0];
- dtar->id= (ID *)idriver->ob;
- dtar->idtype= ID_OB;
+ /* first bone target */
+ dtar = &dvar->targets[0];
+ dtar->id = (ID *)idriver->ob;
+ dtar->idtype = ID_OB;
if (idriver->name[0])
BLI_strncpy(dtar->pchan_name, idriver->name, sizeof(dtar->pchan_name));
- /* second bone target (name was stored in same var as the first one) */
- dtar= &dvar->targets[1];
- dtar->id= (ID *)idriver->ob;
- dtar->idtype= ID_OB;
+ /* second bone target (name was stored in same var as the first one) */
+ dtar = &dvar->targets[1];
+ dtar->id = (ID *)idriver->ob;
+ dtar->idtype = ID_OB;
if (idriver->name[0]) // xxx... for safety
- BLI_strncpy(dtar->pchan_name, idriver->name+DRIVER_NAME_OFFS, sizeof(dtar->pchan_name));
+ BLI_strncpy(dtar->pchan_name, idriver->name + DRIVER_NAME_OFFS, sizeof(dtar->pchan_name));
}
else {
/* only a single variable, of type 'transform channel' */
- dvar= driver_add_new_variable(cdriver);
+ dvar = driver_add_new_variable(cdriver);
driver_change_variable_type(dvar, DVAR_TYPE_TRANSFORM_CHAN);
/* only requires a single target */
- dtar= &dvar->targets[0];
- dtar->id= (ID *)idriver->ob;
- dtar->idtype= ID_OB;
+ dtar = &dvar->targets[0];
+ dtar->id = (ID *)idriver->ob;
+ dtar->idtype = ID_OB;
if (idriver->name[0])
BLI_strncpy(dtar->pchan_name, idriver->name, sizeof(dtar->pchan_name));
- dtar->transChan= adrcode_to_dtar_transchan(idriver->adrcode);
+ dtar->transChan = adrcode_to_dtar_transchan(idriver->adrcode);
dtar->flag |= DTAR_FLAG_LOCALSPACE; /* old drivers took local space */
}
}
else { /* Object */
- /* only a single variable, of type 'transform channel' */
- dvar= driver_add_new_variable(cdriver);
+ /* only a single variable, of type 'transform channel' */
+ dvar = driver_add_new_variable(cdriver);
driver_change_variable_type(dvar, DVAR_TYPE_TRANSFORM_CHAN);
- /* only requires single target */
- dtar= &dvar->targets[0];
- dtar->id= (ID *)idriver->ob;
- dtar->idtype= ID_OB;
- dtar->transChan= adrcode_to_dtar_transchan(idriver->adrcode);
+ /* only requires single target */
+ dtar = &dvar->targets[0];
+ dtar->id = (ID *)idriver->ob;
+ dtar->idtype = ID_OB;
+ dtar->transChan = adrcode_to_dtar_transchan(idriver->adrcode);
}
}
@@ -1085,7 +1085,7 @@ static ChannelDriver *idriver_to_cdriver (IpoDriver *idriver)
/* Add F-Curve to the correct list
* - grpname is needed to be used as group name where relevant, and is usually derived from actname
*/
-static void fcurve_add_to_list (ListBase *groups, ListBase *list, FCurve *fcu, char *grpname, int muteipo)
+static void fcurve_add_to_list(ListBase *groups, ListBase *list, FCurve *fcu, char *grpname, int muteipo)
{
/* If we're adding to an action, we will have groups to write to... */
if (groups && grpname) {
@@ -1093,22 +1093,22 @@ static void fcurve_add_to_list (ListBase *groups, ListBase *list, FCurve *fcu, c
* and extract the resultant lists...
*/
bAction tmp_act;
- bActionGroup *agrp= NULL;
+ bActionGroup *agrp = NULL;
/* init the temp action */
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;
- tmp_act.curves.last= list->last;
+ tmp_act.groups.first = groups->first;
+ tmp_act.groups.last = groups->last;
+ tmp_act.curves.first = list->first;
+ tmp_act.curves.last = list->last;
/* ... xxx, the other vars don't need to be filled in */
/* get the group to use */
- agrp= action_groups_find_named(&tmp_act, grpname);
+ agrp = BKE_action_group_find_name(&tmp_act, grpname);
/* no matching group, so add one */
if (agrp == NULL) {
/* Add a new group, and make it active */
- agrp= MEM_callocN(sizeof(bActionGroup), "bActionGroup");
+ agrp = MEM_callocN(sizeof(bActionGroup), "bActionGroup");
agrp->flag = AGRP_SELECTED;
if (muteipo) agrp->flag |= AGRP_MUTED;
@@ -1127,10 +1127,10 @@ static void fcurve_add_to_list (ListBase *groups, ListBase *list, FCurve *fcu, c
fcu->flag |= FCURVE_MUTED;
/* set the output lists based on the ones in the temp action */
- groups->first= tmp_act.groups.first;
- groups->last= tmp_act.groups.last;
- list->first= tmp_act.curves.first;
- list->last= tmp_act.curves.last;
+ groups->first = tmp_act.groups.first;
+ groups->last = tmp_act.groups.last;
+ list->first = tmp_act.curves.first;
+ list->last = tmp_act.curves.last;
}
else {
/* simply add the F-Curve to the end of the given list */
@@ -1144,18 +1144,18 @@ static void fcurve_add_to_list (ListBase *groups, ListBase *list, FCurve *fcu, c
* constname: name of Constraint-Channel (if applicable) that IPO-Curve's IPO-block belonged to
* seq: sequencer-strip (if applicable) that IPO-Curve's IPO-block belonged to
*/
-static void icu_to_fcurves (ID *id, ListBase *groups, ListBase *list, IpoCurve *icu, char *actname, char *constname, Sequence * seq, int muteipo)
+static void icu_to_fcurves(ID *id, ListBase *groups, ListBase *list, IpoCurve *icu, char *actname, char *constname, Sequence *seq, int muteipo)
{
AdrBit2Path *abp;
FCurve *fcu;
int totbits;
/* allocate memory for a new F-Curve */
- fcu= MEM_callocN(sizeof(FCurve), "FCurve");
+ fcu = MEM_callocN(sizeof(FCurve), "FCurve");
/* convert driver */
if (icu->driver)
- fcu->driver= idriver_to_cdriver(icu->driver);
+ fcu->driver = idriver_to_cdriver(icu->driver);
/* copy flags */
if (icu->flag & IPO_VISIBLE) fcu->flag |= FCURVE_VISIBLE;
@@ -1170,9 +1170,9 @@ static void icu_to_fcurves (ID *id, ListBase *groups, ListBase *list, IpoCurve *
case IPO_DIR: /* linear extrapolation */
{
/* just copy, as the new defines match the old ones... */
- fcu->extend= icu->extrap;
+ fcu->extend = icu->extrap;
}
- break;
+ break;
case IPO_CYCL: /* cyclic extrapolation */
case IPO_CYCLX: /* cyclic extrapolation + offset */
@@ -1180,22 +1180,22 @@ static void icu_to_fcurves (ID *id, ListBase *groups, ListBase *list, IpoCurve *
/* Add a new FModifier (Cyclic) instead of setting extend value
* as that's the new equivalent of that option.
*/
- FModifier *fcm= add_fmodifier(&fcu->modifiers, FMODIFIER_TYPE_CYCLES);
- FMod_Cycles *data= (FMod_Cycles *)fcm->data;
+ FModifier *fcm = add_fmodifier(&fcu->modifiers, FMODIFIER_TYPE_CYCLES);
+ FMod_Cycles *data = (FMod_Cycles *)fcm->data;
/* if 'offset' one is in use, set appropriate settings */
if (icu->extrap == IPO_CYCLX)
- data->before_mode= data->after_mode= FCM_EXTRAPOLATE_CYCLIC_OFFSET;
+ data->before_mode = data->after_mode = FCM_EXTRAPOLATE_CYCLIC_OFFSET;
else
- data->before_mode= data->after_mode= FCM_EXTRAPOLATE_CYCLIC;
+ data->before_mode = data->after_mode = FCM_EXTRAPOLATE_CYCLIC;
}
- break;
+ break;
}
/* -------- */
/* get adrcode <-> bitflags mapping to handle nasty bitflag curves? */
- abp= adrcode_bitmaps_to_paths(icu->blocktype, icu->adrcode, &totbits);
+ abp = adrcode_bitmaps_to_paths(icu->blocktype, icu->adrcode, &totbits);
if (abp && totbits) {
FCurve *fcurve;
int b;
@@ -1203,49 +1203,49 @@ static void icu_to_fcurves (ID *id, ListBase *groups, ListBase *list, IpoCurve *
if (G.debug & G_DEBUG) printf("\tconvert bitflag ipocurve, totbits = %d\n", totbits);
/* add the 'only int values' flag */
- fcu->flag |= (FCURVE_INT_VALUES|FCURVE_DISCRETE_VALUES);
+ fcu->flag |= (FCURVE_INT_VALUES | FCURVE_DISCRETE_VALUES);
/* for each bit we have to remap + check for:
* 1) we need to make copy the existing F-Curve data (fcu -> fcurve),
- * except for the last one which will use the original
+ * except for the last one which will use the original
* 2) copy the relevant path info across
* 3) filter the keyframes for the flag of interest
*/
- for (b=0; b < totbits; b++, abp++) {
- unsigned int i=0;
+ for (b = 0; b < totbits; b++, abp++) {
+ unsigned int i = 0;
/* make a copy of existing base-data if not the last curve */
- if (b < (totbits-1))
- fcurve= copy_fcurve(fcu);
+ if (b < (totbits - 1))
+ fcurve = copy_fcurve(fcu);
else
- fcurve= fcu;
+ fcurve = fcu;
/* set path */
- fcurve->rna_path= BLI_strdup(abp->path);
- fcurve->array_index= abp->array_index;
+ fcurve->rna_path = BLI_strdup(abp->path);
+ fcurve->array_index = abp->array_index;
/* convert keyframes
* - beztriples and bpoints are mutually exclusive, so we won't have both at the same time
* - beztriples are more likely to be encountered as they are keyframes (the other type wasn't used yet)
*/
- fcurve->totvert= icu->totvert;
+ fcurve->totvert = icu->totvert;
if (icu->bezt) {
BezTriple *dst, *src;
/* allocate new array for keyframes/beztriples */
- fcurve->bezt= MEM_callocN(sizeof(BezTriple)*fcurve->totvert, "BezTriples");
+ fcurve->bezt = MEM_callocN(sizeof(BezTriple) * fcurve->totvert, "BezTriples");
/* loop through copying all BezTriples individually, as we need to modify a few things */
- for (dst=fcurve->bezt, src=icu->bezt, i=0; i < fcurve->totvert; i++, dst++, src++) {
+ for (dst = fcurve->bezt, src = icu->bezt, i = 0; i < fcurve->totvert; i++, dst++, src++) {
/* firstly, copy BezTriple data */
- *dst= *src;
+ *dst = *src;
/* interpolation can only be constant... */
- dst->ipo= BEZT_IPO_CONST;
+ dst->ipo = BEZT_IPO_CONST;
/* 'hide' flag is now used for keytype - only 'keyframes' existed before */
- dst->hide= BEZT_KEYTYPE_KEYFRAME;
+ dst->hide = BEZT_KEYTYPE_KEYFRAME;
/* auto-handles - per curve to per handle */
if (icu->flag & IPO_AUTO_HORIZ) {
@@ -1255,9 +1255,9 @@ static void icu_to_fcurves (ID *id, ListBase *groups, ListBase *list, IpoCurve *
/* correct values, by checking if the flag of interest is set */
if ( ((int)(dst->vec[1][1])) & (abp->bit) )
- dst->vec[0][1]= dst->vec[1][1]= dst->vec[2][1] = 1.0f;
+ dst->vec[0][1] = dst->vec[1][1] = dst->vec[2][1] = 1.0f;
else
- dst->vec[0][1]= dst->vec[1][1]= dst->vec[2][1] = 0.0f;
+ dst->vec[0][1] = dst->vec[1][1] = dst->vec[2][1] = 0.0f;
}
}
else if (icu->bp) {
@@ -1271,12 +1271,12 @@ static void icu_to_fcurves (ID *id, ListBase *groups, ListBase *list, IpoCurve *
}
}
else {
- unsigned int i=0;
+ unsigned int i = 0;
/* get rna-path
* - we will need to set the 'disabled' flag if no path is able to be made (for now)
*/
- fcu->rna_path= get_rna_access(icu->blocktype, icu->adrcode, actname, constname, seq, &fcu->array_index);
+ fcu->rna_path = get_rna_access(icu->blocktype, icu->adrcode, actname, constname, seq, &fcu->array_index);
if (fcu->rna_path == NULL)
fcu->flag |= FCURVE_DISABLED;
@@ -1284,25 +1284,25 @@ static void icu_to_fcurves (ID *id, ListBase *groups, ListBase *list, IpoCurve *
* - beztriples and bpoints are mutually exclusive, so we won't have both at the same time
* - beztriples are more likely to be encountered as they are keyframes (the other type wasn't used yet)
*/
- fcu->totvert= icu->totvert;
+ fcu->totvert = icu->totvert;
if (icu->bezt) {
BezTriple *dst, *src;
/* allocate new array for keyframes/beztriples */
- fcu->bezt= MEM_callocN(sizeof(BezTriple)*fcu->totvert, "BezTriples");
+ fcu->bezt = MEM_callocN(sizeof(BezTriple) * fcu->totvert, "BezTriples");
/* loop through copying all BezTriples individually, as we need to modify a few things */
- for (dst=fcu->bezt, src=icu->bezt, i=0; i < fcu->totvert; i++, dst++, src++) {
+ for (dst = fcu->bezt, src = icu->bezt, i = 0; i < fcu->totvert; i++, dst++, src++) {
/* firstly, copy BezTriple data */
- *dst= *src;
+ *dst = *src;
/* now copy interpolation from curve (if not already set) */
if (icu->ipo != IPO_MIXED)
- dst->ipo= icu->ipo;
+ dst->ipo = icu->ipo;
/* 'hide' flag is now used for keytype - only 'keyframes' existed before */
- dst->hide= BEZT_KEYTYPE_KEYFRAME;
+ dst->hide = BEZT_KEYTYPE_KEYFRAME;
/* auto-handles - per curve to per handle */
if (icu->flag & IPO_AUTO_HORIZ) {
@@ -1315,9 +1315,9 @@ static void icu_to_fcurves (ID *id, ListBase *groups, ListBase *list, IpoCurve *
* - we need radians for RNA to do the right thing
*/
if ( ((icu->blocktype == ID_OB) && ELEM3(icu->adrcode, OB_ROT_X, OB_ROT_Y, OB_ROT_Z)) ||
- ((icu->blocktype == ID_PO) && ELEM3(icu->adrcode, AC_EUL_X, AC_EUL_Y, AC_EUL_Z)) )
+ ((icu->blocktype == ID_PO) && ELEM3(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;
@@ -1329,7 +1329,7 @@ static void icu_to_fcurves (ID *id, ListBase *groups, ListBase *list, IpoCurve *
* - we now need as 'frames'
*/
if ( (id) && (icu->blocktype == GS(id->name)) &&
- (fcu->rna_path && strcmp(fcu->rna_path, "eval_time")==0) )
+ (fcu->rna_path && strcmp(fcu->rna_path, "eval_time") == 0) )
{
Curve *cu = (Curve *)id;
@@ -1340,15 +1340,15 @@ static void icu_to_fcurves (ID *id, ListBase *groups, ListBase *list, IpoCurve *
/* correct times for rotation drivers
* - need to go from degrees to radians...
- * - there's only really 1 target to worry about
+ * - there's only really 1 target to worry about
* - were also degrees/10
*/
if (fcu->driver && fcu->driver->variables.first) {
- DriverVar *dvar= fcu->driver->variables.first;
- DriverTarget *dtar= &dvar->targets[0];
+ DriverVar *dvar = fcu->driver->variables.first;
+ DriverTarget *dtar = &dvar->targets[0];
if (ELEM3(dtar->transChan, DTAR_TRANSCHAN_ROTX, DTAR_TRANSCHAN_ROTY, DTAR_TRANSCHAN_ROTZ)) {
- const float fac= (float)M_PI / 18.0f;
+ const float fac = (float)M_PI / 18.0f;
dst->vec[0][0] *= fac;
dst->vec[1][0] *= fac;
@@ -1358,8 +1358,8 @@ static void icu_to_fcurves (ID *id, ListBase *groups, ListBase *list, IpoCurve *
/* correct values for sequencer curves, that were not locked to frame */
if (seq && (seq->flag & SEQ_IPO_FRAME_LOCKED) == 0) {
- double mul= (seq->enddisp-seq->startdisp)/100.0f;
- double offset= seq->startdisp;
+ double mul = (seq->enddisp - seq->startdisp) / 100.0f;
+ double offset = seq->startdisp;
dst->vec[0][0] *= mul;
dst->vec[0][0] += offset;
@@ -1389,7 +1389,7 @@ static void icu_to_fcurves (ID *id, ListBase *groups, ListBase *list, IpoCurve *
* This does not assume that any ID or AnimData uses it, but does assume that
* it is given two lists, which it will perform driver/animation-data separation.
*/
-static void ipo_to_animato (ID *id, Ipo *ipo, char actname[], char constname[], Sequence *seq, ListBase *animgroups, ListBase *anim, ListBase *drivers)
+static void ipo_to_animato(ID *id, Ipo *ipo, char actname[], char constname[], Sequence *seq, ListBase *animgroups, ListBase *anim, ListBase *drivers)
{
IpoCurve *icu;
@@ -1407,13 +1407,13 @@ static void ipo_to_animato (ID *id, Ipo *ipo, char actname[], char constname[],
*/
if (actname) {
if ((ipo->blocktype == ID_OB) && (strcmp(actname, "Object") == 0))
- actname= NULL;
+ actname = NULL;
else if ((ipo->blocktype == ID_OB) && (strcmp(actname, "Shape") == 0))
- actname= NULL;
+ actname = NULL;
}
/* loop over IPO-Curves, freeing as we progress */
- for (icu= ipo->curve.first; icu; icu= icu->next) {
+ for (icu = ipo->curve.first; icu; icu = icu->next) {
/* Since an IPO-Curve may end up being made into many F-Curves (i.e. bitflag curves),
* we figure out the best place to put the channel, then tell the curve-converter to just dump there
*/
@@ -1424,7 +1424,7 @@ static void ipo_to_animato (ID *id, Ipo *ipo, char actname[], char constname[],
}
else {
MEM_freeN(icu->driver);
- icu->driver= NULL;
+ icu->driver = NULL;
}
}
else
@@ -1436,8 +1436,8 @@ static void ipo_to_animato (ID *id, Ipo *ipo, char actname[], char constname[],
if (ID_REAL_USERS(ipo) <= 0) {
IpoCurve *icn;
- for (icu= ipo->curve.first; icu; icu= icn) {
- icn= icu->next;
+ for (icu = ipo->curve.first; icu; icu = icn) {
+ icn = icu->next;
/* free driver */
if (icu->driver)
@@ -1458,7 +1458,7 @@ static void ipo_to_animato (ID *id, Ipo *ipo, char actname[], char constname[],
* to Objects, where ob->ipo and ob->action need to be combined).
* NOTE: we need to be careful here, as same data-structs are used for new system too!
*/
-static void action_to_animato (ID *id, bAction *act, ListBase *groups, ListBase *curves, ListBase *drivers)
+static void action_to_animato(ID *id, bAction *act, ListBase *groups, ListBase *curves, ListBase *drivers)
{
bActionChannel *achan, *achann;
bConstraintChannel *conchan, *conchann;
@@ -1473,27 +1473,27 @@ static void action_to_animato (ID *id, bAction *act, ListBase *groups, ListBase
BLI_freelistN(&act->groups);
/* loop through Action-Channels, converting data, freeing as we go */
- for (achan= act->chanbase.first; achan; achan= achann) {
+ for (achan = act->chanbase.first; achan; achan = achann) {
/* get pointer to next Action Channel */
- achann= achan->next;
+ achann = achan->next;
/* convert Action Channel's IPO data */
if (achan->ipo) {
ipo_to_animato(id, achan->ipo, achan->name, NULL, NULL, groups, curves, drivers);
achan->ipo->id.us--;
- achan->ipo= NULL;
+ achan->ipo = NULL;
}
/* convert constraint channel IPO-data */
- for (conchan= achan->constraintChannels.first; conchan; conchan= conchann) {
+ for (conchan = achan->constraintChannels.first; conchan; conchan = conchann) {
/* get pointer to next Constraint Channel */
- conchann= conchan->next;
+ conchann = conchan->next;
/* convert Constraint Channel's IPO data */
if (conchan->ipo) {
ipo_to_animato(id, conchan->ipo, achan->name, conchan->name, NULL, groups, curves, drivers);
conchan->ipo->id.us--;
- conchan->ipo= NULL;
+ conchan->ipo = NULL;
}
/* free Constraint Channel */
@@ -1512,9 +1512,9 @@ static void action_to_animato (ID *id, bAction *act, ListBase *groups, ListBase
* This assumes that AnimData has been added already. Separation of drivers
* from animation data is accomplished here too...
*/
-static void ipo_to_animdata (ID *id, Ipo *ipo, char actname[], char constname[], Sequence *seq)
+static void ipo_to_animdata(ID *id, Ipo *ipo, char actname[], char constname[], Sequence *seq)
{
- AnimData *adt= BKE_animdata_from_id(id);
+ AnimData *adt = BKE_animdata_from_id(id);
ListBase anim = {NULL, NULL};
ListBase drivers = {NULL, NULL};
@@ -1528,8 +1528,8 @@ static void ipo_to_animdata (ID *id, Ipo *ipo, char actname[], char constname[],
if (G.debug & G_DEBUG) {
printf("ipo to animdata - ID:%s, IPO:%s, actname:%s constname:%s seqname:%s curves:%d\n",
- id->name+2, ipo->id.name+2, (actname)?actname:"<None>", (constname)?constname:"<None>", (seq)?(seq->name+2):"<None>",
- BLI_countlist(&ipo->curve));
+ id->name + 2, ipo->id.name + 2, (actname) ? actname : "<None>", (constname) ? constname : "<None>", (seq) ? (seq->name + 2) : "<None>",
+ BLI_countlist(&ipo->curve));
}
/* Convert curves to animato system (separated into separate lists of F-Curves for animation and drivers),
@@ -1545,9 +1545,9 @@ static void ipo_to_animdata (ID *id, Ipo *ipo, char actname[], char constname[],
if (adt->action == NULL) {
char nameBuf[MAX_ID_NAME];
- BLI_snprintf(nameBuf, sizeof(nameBuf), "CDA:%s", ipo->id.name+2);
+ BLI_snprintf(nameBuf, sizeof(nameBuf), "CDA:%s", ipo->id.name + 2);
- adt->action= add_empty_action(nameBuf);
+ adt->action = add_empty_action(nameBuf);
if (G.debug & G_DEBUG) printf("\t\tadded new action - '%s'\n", nameBuf);
}
@@ -1566,9 +1566,9 @@ static void ipo_to_animdata (ID *id, Ipo *ipo, char actname[], char constname[],
/* Convert Action-block to new system
* NOTE: we need to be careful here, as same data-structs are used for new system too!
*/
-static void action_to_animdata (ID *id, bAction *act)
+static void action_to_animdata(ID *id, bAction *act)
{
- AnimData *adt= BKE_animdata_from_id(id);
+ AnimData *adt = BKE_animdata_from_id(id);
/* only continue if there are Action Channels (indicating unconverted data) */
if (ELEM(NULL, adt, act->chanbase.first))
@@ -1578,7 +1578,7 @@ static void action_to_animdata (ID *id, bAction *act)
if (adt->action == NULL) {
/* set this Action as AnimData's Action */
if (G.debug & G_DEBUG) printf("act_to_adt - set adt action to act\n");
- adt->action= act;
+ adt->action = act;
}
/* convert Action data */
@@ -1592,16 +1592,16 @@ static void action_to_animdata (ID *id, bAction *act)
// - NLA curve/stride modifiers...
/* Convert NLA-Strip to new system */
-static void nlastrips_to_animdata (ID *id, ListBase *strips)
+static void nlastrips_to_animdata(ID *id, ListBase *strips)
{
- AnimData *adt= BKE_animdata_from_id(id);
+ AnimData *adt = BKE_animdata_from_id(id);
NlaTrack *nlt = NULL;
NlaStrip *strip;
bActionStrip *as, *asn;
/* for each one of the original strips, convert to a new strip and free the old... */
- for (as= strips->first; as; as= asn) {
- asn= as->next;
+ for (as = strips->first; as; as = asn) {
+ asn = as->next;
/* this old strip is only worth something if it had an action... */
if (as->act) {
@@ -1614,36 +1614,36 @@ static void nlastrips_to_animdata (ID *id, ListBase *strips)
* - no need to muck around with the user-counts, since this is just
* passing over the ref to the new owner, not creating an additional ref
*/
- strip= MEM_callocN(sizeof(NlaStrip), "NlaStrip");
- strip->act= as->act;
-
- /* endpoints */
- strip->start= as->start;
- strip->end= as->end;
- strip->actstart= as->actstart;
- strip->actend= as->actend;
+ strip = MEM_callocN(sizeof(NlaStrip), "NlaStrip");
+ strip->act = as->act;
- /* action reuse */
- strip->repeat= as->repeat;
- strip->scale= as->scale;
- if (as->flag & ACTSTRIP_LOCK_ACTION) strip->flag |= NLASTRIP_FLAG_SYNC_LENGTH;
-
- /* blending */
- strip->blendin= as->blendin;
- strip->blendout= as->blendout;
- strip->blendmode= (as->mode==ACTSTRIPMODE_ADD) ? NLASTRIP_MODE_ADD : NLASTRIP_MODE_REPLACE;
- if (as->flag & ACTSTRIP_AUTO_BLENDS) strip->flag |= NLASTRIP_FLAG_AUTO_BLENDS;
-
- /* assorted setting flags */
- if (as->flag & ACTSTRIP_SELECT) strip->flag |= NLASTRIP_FLAG_SELECT;
- if (as->flag & ACTSTRIP_ACTIVE) strip->flag |= NLASTRIP_FLAG_ACTIVE;
-
- if (as->flag & ACTSTRIP_MUTE) strip->flag |= NLASTRIP_FLAG_MUTED;
- if (as->flag & ACTSTRIP_REVERSE) strip->flag |= NLASTRIP_FLAG_REVERSE;
-
- /* by default, we now always extrapolate, while in the past this was optional */
- if ((as->flag & ACTSTRIP_HOLDLASTFRAME)==0)
- strip->extendmode= NLASTRIP_EXTEND_NOTHING;
+ /* endpoints */
+ strip->start = as->start;
+ strip->end = as->end;
+ strip->actstart = as->actstart;
+ strip->actend = as->actend;
+
+ /* action reuse */
+ strip->repeat = as->repeat;
+ strip->scale = as->scale;
+ if (as->flag & ACTSTRIP_LOCK_ACTION) strip->flag |= NLASTRIP_FLAG_SYNC_LENGTH;
+
+ /* blending */
+ strip->blendin = as->blendin;
+ strip->blendout = as->blendout;
+ strip->blendmode = (as->mode == ACTSTRIPMODE_ADD) ? NLASTRIP_MODE_ADD : NLASTRIP_MODE_REPLACE;
+ if (as->flag & ACTSTRIP_AUTO_BLENDS) strip->flag |= NLASTRIP_FLAG_AUTO_BLENDS;
+
+ /* assorted setting flags */
+ if (as->flag & ACTSTRIP_SELECT) strip->flag |= NLASTRIP_FLAG_SELECT;
+ if (as->flag & ACTSTRIP_ACTIVE) strip->flag |= NLASTRIP_FLAG_ACTIVE;
+
+ if (as->flag & ACTSTRIP_MUTE) strip->flag |= NLASTRIP_FLAG_MUTED;
+ if (as->flag & ACTSTRIP_REVERSE) strip->flag |= NLASTRIP_FLAG_REVERSE;
+
+ /* by default, we now always extrapolate, while in the past this was optional */
+ if ((as->flag & ACTSTRIP_HOLDLASTFRAME) == 0)
+ strip->extendmode = NLASTRIP_EXTEND_NOTHING;
}
/* try to add this strip to the current NLA-Track (i.e. the 'last' one on the stack atm) */
@@ -1651,7 +1651,7 @@ static void nlastrips_to_animdata (ID *id, ListBase *strips)
/* trying to add to the current failed (no space),
* so add a new track to the stack, and add to that...
*/
- nlt= add_nlatrack(adt, NULL);
+ nlt = add_nlatrack(adt, NULL);
BKE_nlatrack_add_strip(nlt, strip);
}
}
@@ -1701,13 +1701,13 @@ void do_versions_ipos_to_animato(Main *main)
/* ----------- Animation Attached to Data -------------- */
/* objects */
- for (id= main->object.first; id; id= id->next) {
- Object *ob= (Object *)id;
+ for (id = main->object.first; id; id = id->next) {
+ Object *ob = (Object *)id;
bPoseChannel *pchan;
bConstraint *con;
bConstraintChannel *conchan, *conchann;
- if (G.debug & G_DEBUG) printf("\tconverting ob %s\n", id->name+2);
+ if (G.debug & G_DEBUG) printf("\tconverting ob %s\n", id->name + 2);
/* check if object has any animation data */
if (ob->nlastrips.first) {
@@ -1719,7 +1719,7 @@ void do_versions_ipos_to_animato(Main *main)
ipo_to_animdata(id, ob->ipo, NULL, NULL, NULL);
ob->ipo->id.us--;
- ob->ipo= NULL;
+ ob->ipo = NULL;
}
/* Action is skipped since it'll be used by some strip in the NLA anyway,
@@ -1727,7 +1727,7 @@ void do_versions_ipos_to_animato(Main *main)
*/
if (ob->action) {
ob->action->id.us--;
- ob->action= NULL;
+ ob->action = NULL;
}
/* finally NLA */
@@ -1735,7 +1735,7 @@ void do_versions_ipos_to_animato(Main *main)
}
else if ((ob->ipo) || (ob->action)) {
/* Add AnimData block */
- AnimData *adt= BKE_id_add_animdata(id);
+ AnimData *adt = BKE_id_add_animdata(id);
/* Action first - so that Action name get conserved */
if (ob->action) {
@@ -1744,7 +1744,7 @@ void do_versions_ipos_to_animato(Main *main)
/* only decrease usercount if this Action isn't now being used by AnimData */
if (ob->action != adt->action) {
ob->action->id.us--;
- ob->action= NULL;
+ ob->action = NULL;
}
}
@@ -1752,7 +1752,7 @@ void do_versions_ipos_to_animato(Main *main)
if (ob->ipo) {
ipo_to_animdata(id, ob->ipo, NULL, NULL, NULL);
ob->ipo->id.us--;
- ob->ipo= NULL;
+ ob->ipo = NULL;
}
}
@@ -1761,8 +1761,8 @@ void do_versions_ipos_to_animato(Main *main)
/* Verify if there's AnimData block */
BKE_id_add_animdata(id);
- for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
- for (con= pchan->constraints.first; con; con= con->next) {
+ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
+ for (con = pchan->constraints.first; con; con = con->next) {
/* if constraint has own IPO, convert add these to Object
* (NOTE: they're most likely to be drivers too)
*/
@@ -1772,14 +1772,14 @@ void do_versions_ipos_to_animato(Main *main)
*/
ipo_to_animdata(id, con->ipo, pchan->name, con->name, NULL);
con->ipo->id.us--;
- con->ipo= NULL;
+ con->ipo = NULL;
}
}
}
}
/* check constraints for local IPO's */
- for (con= ob->constraints.first; con; con= con->next) {
+ for (con = ob->constraints.first; con; con = con->next) {
/* if constraint has own IPO, convert add these to Object
* (NOTE: they're most likely to be drivers too)
*/
@@ -1792,7 +1792,7 @@ void do_versions_ipos_to_animato(Main *main)
*/
ipo_to_animdata(id, con->ipo, NULL, con->name, NULL);
con->ipo->id.us--;
- con->ipo= NULL;
+ con->ipo = NULL;
}
/* check for Action Constraint */
@@ -1804,15 +1804,15 @@ void do_versions_ipos_to_animato(Main *main)
/* Verify if there's AnimData block */
BKE_id_add_animdata(id);
- for (conchan= ob->constraintChannels.first; conchan; conchan= conchann) {
+ for (conchan = ob->constraintChannels.first; conchan; conchan = conchann) {
/* get pointer to next Constraint Channel */
- conchann= conchan->next;
+ conchann = conchan->next;
/* convert Constraint Channel's IPO data */
if (conchan->ipo) {
ipo_to_animdata(id, conchan->ipo, NULL, conchan->name, NULL);
conchan->ipo->id.us--;
- conchan->ipo= NULL;
+ conchan->ipo = NULL;
}
/* free Constraint Channel */
@@ -1822,17 +1822,17 @@ void do_versions_ipos_to_animato(Main *main)
/* object's action will always be object-rooted */
{
- AnimData *adt= BKE_animdata_from_id(id);
+ AnimData *adt = BKE_animdata_from_id(id);
if (adt && adt->action)
adt->action->idroot = ID_OB;
}
}
/* shapekeys */
- for (id= main->key.first; id; id= id->next) {
- Key *key= (Key *)id;
+ for (id = main->key.first; id; id = id->next) {
+ Key *key = (Key *)id;
- if (G.debug & G_DEBUG) printf("\tconverting key %s\n", id->name+2);
+ if (G.debug & G_DEBUG) printf("\tconverting key %s\n", id->name + 2);
/* we're only interested in the IPO
* NOTE: for later, it might be good to port these over to Object instead, as many of these
@@ -1840,7 +1840,7 @@ void do_versions_ipos_to_animato(Main *main)
*/
if (key->ipo) {
/* Add AnimData block */
- AnimData *adt= BKE_id_add_animdata(id);
+ AnimData *adt = BKE_id_add_animdata(id);
/* Convert Shapekey data... */
ipo_to_animdata(id, key->ipo, NULL, NULL, NULL);
@@ -1849,20 +1849,20 @@ void do_versions_ipos_to_animato(Main *main)
adt->action->idroot = key->ipo->blocktype;
key->ipo->id.us--;
- key->ipo= NULL;
+ key->ipo = NULL;
}
}
/* materials */
- for (id= main->mat.first; id; id= id->next) {
- Material *ma= (Material *)id;
+ for (id = main->mat.first; id; id = id->next) {
+ Material *ma = (Material *)id;
- if (G.debug & G_DEBUG) printf("\tconverting material %s\n", id->name+2);
+ if (G.debug & G_DEBUG) printf("\tconverting material %s\n", id->name + 2);
/* we're only interested in the IPO */
if (ma->ipo) {
/* Add AnimData block */
- AnimData *adt= BKE_id_add_animdata(id);
+ AnimData *adt = BKE_id_add_animdata(id);
/* Convert Material data... */
ipo_to_animdata(id, ma->ipo, NULL, NULL, NULL);
@@ -1871,20 +1871,20 @@ void do_versions_ipos_to_animato(Main *main)
adt->action->idroot = ma->ipo->blocktype;
ma->ipo->id.us--;
- ma->ipo= NULL;
+ ma->ipo = NULL;
}
}
/* worlds */
- for (id= main->world.first; id; id= id->next) {
- World *wo= (World *)id;
+ for (id = main->world.first; id; id = id->next) {
+ World *wo = (World *)id;
- if (G.debug & G_DEBUG) printf("\tconverting world %s\n", id->name+2);
+ if (G.debug & G_DEBUG) printf("\tconverting world %s\n", id->name + 2);
/* we're only interested in the IPO */
if (wo->ipo) {
/* Add AnimData block */
- AnimData *adt= BKE_id_add_animdata(id);
+ AnimData *adt = BKE_id_add_animdata(id);
/* Convert World data... */
ipo_to_animdata(id, wo->ipo, NULL, NULL, NULL);
@@ -1893,25 +1893,26 @@ void do_versions_ipos_to_animato(Main *main)
adt->action->idroot = wo->ipo->blocktype;
wo->ipo->id.us--;
- wo->ipo= NULL;
+ wo->ipo = NULL;
}
}
/* sequence strips */
- for (id= main->scene.first; id; id= id->next) {
+ for (id = main->scene.first; id; id = id->next) {
Scene *scene = (Scene *)id;
- Editing * ed = scene->ed;
+ Editing *ed = scene->ed;
if (ed && ed->seqbasep) {
- Sequence * seq;
+ Sequence *seq;
- AnimData *adt= BKE_id_add_animdata(id);
+ AnimData *adt = BKE_id_add_animdata(id);
- SEQ_BEGIN(ed, seq) {
+ SEQ_BEGIN(ed, seq)
+ {
IpoCurve *icu = (seq->ipo) ? seq->ipo->curve.first : NULL;
short adrcode = SEQ_FAC1;
if (G.debug & G_DEBUG)
- printf("\tconverting sequence strip %s\n", seq->name+2);
+ printf("\tconverting sequence strip %s\n", seq->name + 2);
if (ELEM(NULL, seq->ipo, icu)) {
seq->flag |= SEQ_USE_EFFECT_DEFAULT_FADE;
@@ -1940,7 +1941,7 @@ void do_versions_ipos_to_animato(Main *main)
ipo_to_animdata((ID *)scene, seq->ipo, NULL, NULL, seq);
if (adt->action)
- adt->action->idroot = ID_SCE; /* scene-rooted */
+ adt->action->idroot = ID_SCE; /* scene-rooted */
seq->ipo->id.us--;
seq->ipo = NULL;
@@ -1951,15 +1952,15 @@ void do_versions_ipos_to_animato(Main *main)
/* textures */
- for (id= main->tex.first; id; id= id->next) {
- Tex *te= (Tex *)id;
+ for (id = main->tex.first; id; id = id->next) {
+ Tex *te = (Tex *)id;
- if (G.debug & G_DEBUG) printf("\tconverting texture %s\n", id->name+2);
+ if (G.debug & G_DEBUG) printf("\tconverting texture %s\n", id->name + 2);
/* we're only interested in the IPO */
if (te->ipo) {
/* Add AnimData block */
- AnimData *adt= BKE_id_add_animdata(id);
+ AnimData *adt = BKE_id_add_animdata(id);
/* Convert Texture data... */
ipo_to_animdata(id, te->ipo, NULL, NULL, NULL);
@@ -1968,20 +1969,20 @@ void do_versions_ipos_to_animato(Main *main)
adt->action->idroot = te->ipo->blocktype;
te->ipo->id.us--;
- te->ipo= NULL;
+ te->ipo = NULL;
}
}
/* cameras */
- for (id= main->camera.first; id; id= id->next) {
- Camera *ca= (Camera *)id;
+ for (id = main->camera.first; id; id = id->next) {
+ Camera *ca = (Camera *)id;
- if (G.debug & G_DEBUG) printf("\tconverting camera %s\n", id->name+2);
+ if (G.debug & G_DEBUG) printf("\tconverting camera %s\n", id->name + 2);
/* we're only interested in the IPO */
if (ca->ipo) {
/* Add AnimData block */
- AnimData *adt= BKE_id_add_animdata(id);
+ AnimData *adt = BKE_id_add_animdata(id);
/* Convert Camera data... */
ipo_to_animdata(id, ca->ipo, NULL, NULL, NULL);
@@ -1990,20 +1991,20 @@ void do_versions_ipos_to_animato(Main *main)
adt->action->idroot = ca->ipo->blocktype;
ca->ipo->id.us--;
- ca->ipo= NULL;
+ ca->ipo = NULL;
}
}
/* lamps */
- for (id= main->lamp.first; id; id= id->next) {
- Lamp *la= (Lamp *)id;
+ for (id = main->lamp.first; id; id = id->next) {
+ Lamp *la = (Lamp *)id;
- if (G.debug & G_DEBUG) printf("\tconverting lamp %s\n", id->name+2);
+ if (G.debug & G_DEBUG) printf("\tconverting lamp %s\n", id->name + 2);
/* we're only interested in the IPO */
if (la->ipo) {
/* Add AnimData block */
- AnimData *adt= BKE_id_add_animdata(id);
+ AnimData *adt = BKE_id_add_animdata(id);
/* Convert Lamp data... */
ipo_to_animdata(id, la->ipo, NULL, NULL, NULL);
@@ -2012,20 +2013,20 @@ void do_versions_ipos_to_animato(Main *main)
adt->action->idroot = la->ipo->blocktype;
la->ipo->id.us--;
- la->ipo= NULL;
+ la->ipo = NULL;
}
}
/* curves */
- for (id= main->curve.first; id; id= id->next) {
- Curve *cu= (Curve *)id;
+ for (id = main->curve.first; id; id = id->next) {
+ Curve *cu = (Curve *)id;
- if (G.debug & G_DEBUG) printf("\tconverting curve %s\n", id->name+2);
+ if (G.debug & G_DEBUG) printf("\tconverting curve %s\n", id->name + 2);
/* we're only interested in the IPO */
if (cu->ipo) {
/* Add AnimData block */
- AnimData *adt= BKE_id_add_animdata(id);
+ AnimData *adt = BKE_id_add_animdata(id);
/* Convert Curve data... */
ipo_to_animdata(id, cu->ipo, NULL, NULL, NULL);
@@ -2034,7 +2035,7 @@ void do_versions_ipos_to_animato(Main *main)
adt->action->idroot = cu->ipo->blocktype;
cu->ipo->id.us--;
- cu->ipo= NULL;
+ cu->ipo = NULL;
}
}
@@ -2050,10 +2051,10 @@ void do_versions_ipos_to_animato(Main *main)
*/
/* actions */
- for (id= main->action.first; id; id= id->next) {
- bAction *act= (bAction *)id;
+ for (id = main->action.first; id; id = id->next) {
+ bAction *act = (bAction *)id;
- if (G.debug & G_DEBUG) printf("\tconverting action %s\n", id->name+2);
+ if (G.debug & G_DEBUG) printf("\tconverting action %s\n", id->name + 2);
/* if old action, it will be object-only... */
if (act->chanbase.first)
@@ -2064,23 +2065,23 @@ void do_versions_ipos_to_animato(Main *main)
}
/* ipo's */
- for (id= main->ipo.first; id; id= id->next) {
- Ipo *ipo= (Ipo *)id;
+ for (id = main->ipo.first; id; id = id->next) {
+ Ipo *ipo = (Ipo *)id;
- if (G.debug & G_DEBUG) printf("\tconverting ipo %s\n", id->name+2);
+ if (G.debug & G_DEBUG) printf("\tconverting ipo %s\n", id->name + 2);
/* most likely this IPO has already been processed, so check if any curves left to convert */
if (ipo->curve.first) {
bAction *new_act;
/* add a new action for this, and convert all data into that action */
- new_act= add_empty_action("ConvIPO_Action"); // XXX need a better name...
+ new_act = add_empty_action("ConvIPO_Action"); // XXX need a better name...
ipo_to_animato(NULL, ipo, NULL, NULL, NULL, NULL, &new_act->curves, &drivers);
new_act->idroot = ipo->blocktype;
}
/* clear fake-users, and set user-count to zero to make sure it is cleared on file-save */
- ipo->id.us= 0;
+ ipo->id.us = 0;
ipo->id.flag &= ~LIB_FAKEUSER;
}
diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c
index 0a1c0467244..e36e7bf6cf3 100644
--- a/source/blender/blenkernel/intern/key.c
+++ b/source/blender/blenkernel/intern/key.c
@@ -78,7 +78,7 @@
int slurph_opt = 1;
-void free_key(Key *key)
+void BKE_key_free(Key *key)
{
KeyBlock *kb;
@@ -126,7 +126,7 @@ Key *add_key(ID *id) /* common function */
Key *key;
char *el;
- key = alloc_libblock(&G.main->key, ID_KE, "Key");
+ key = BKE_libblock_alloc(&G.main->key, ID_KE, "Key");
key->type = KEY_NORMAL;
key->from = id;
@@ -170,14 +170,14 @@ Key *add_key(ID *id) /* common function */
return key;
}
-Key *copy_key(Key *key)
+Key *BKE_key_copy(Key *key)
{
Key *keyn;
KeyBlock *kbn, *kb;
if (key == NULL) return NULL;
- keyn = copy_libblock(&key->id);
+ keyn = BKE_libblock_copy(&key->id);
BLI_duplicatelist(&keyn->block, &key->block);
@@ -223,7 +223,7 @@ Key *copy_key_nolib(Key *key)
return keyn;
}
-void make_local_key(Key *key)
+void BKE_key_make_local(Key *key)
{
/* - only lib users: do nothing
@@ -1594,7 +1594,7 @@ void curve_to_key(Curve *cu, KeyBlock *kb, ListBase *nurb)
int a, tot;
/* count */
- tot = count_curveverts(nurb);
+ tot = BKE_nurbList_verts_count(nurb);
if (tot == 0) return;
if (kb->data) MEM_freeN(kb->data);
@@ -1647,7 +1647,7 @@ void key_to_curve(KeyBlock *kb, Curve *UNUSED(cu), ListBase *nurb)
nu = nurb->first;
fp = kb->data;
- tot = count_curveverts(nurb);
+ tot = BKE_nurbList_verts_count(nurb);
tot = MIN2(kb->totelem, tot);
@@ -1742,7 +1742,7 @@ float (*key_to_vertcos(Object * ob, KeyBlock * kb))[3]
}
else if (ELEM(ob->type, OB_CURVE, OB_SURF)) {
Curve *cu = (Curve *)ob->data;
- tot = count_curveverts(&cu->nurb);
+ tot = BKE_nurbList_verts_count(&cu->nurb);
}
if (tot == 0) return NULL;
@@ -1822,7 +1822,7 @@ void vertcos_to_key(Object *ob, KeyBlock *kb, float (*vertCos)[3])
else if (ELEM(ob->type, OB_CURVE, OB_SURF)) {
Curve *cu = (Curve *)ob->data;
elemsize = cu->key->elemsize;
- tot = count_curveverts(&cu->nurb);
+ tot = BKE_nurbList_verts_count(&cu->nurb);
}
if (tot == 0) {
diff --git a/source/blender/blenkernel/intern/lamp.c b/source/blender/blenkernel/intern/lamp.c
index e981d772df6..20e3edc7044 100644
--- a/source/blender/blenkernel/intern/lamp.c
+++ b/source/blender/blenkernel/intern/lamp.c
@@ -51,34 +51,34 @@
#include "BKE_main.h"
#include "BKE_node.h"
-void *add_lamp(const char *name)
+void *BKE_lamp_add(const char *name)
{
Lamp *la;
- la= alloc_libblock(&G.main->lamp, ID_LA, name);
-
- la->r= la->g= la->b= la->k= 1.0f;
- la->haint= la->energy= 1.0f;
- la->dist= 25.0f;
- la->spotsize= 45.0f;
- la->spotblend= 0.15f;
- la->att2= 1.0f;
- la->mode= LA_SHAD_BUF;
- la->bufsize= 512;
- la->clipsta= 0.5f;
- la->clipend= 40.0f;
- la->shadspotsize= 45.0f;
- la->samp= 3;
- la->bias= 1.0f;
- la->soft= 3.0f;
- la->compressthresh= 0.05f;
- la->ray_samp= la->ray_sampy= la->ray_sampz= 1;
- la->area_size=la->area_sizey=la->area_sizez= 1.0f;
- la->buffers= 1;
- la->buftype= LA_SHADBUF_HALFWAY;
+ la = BKE_libblock_alloc(&G.main->lamp, ID_LA, name);
+
+ la->r = la->g = la->b = la->k = 1.0f;
+ la->haint = la->energy = 1.0f;
+ la->dist = 25.0f;
+ la->spotsize = 45.0f;
+ la->spotblend = 0.15f;
+ la->att2 = 1.0f;
+ la->mode = LA_SHAD_BUF;
+ la->bufsize = 512;
+ la->clipsta = 0.5f;
+ la->clipend = 40.0f;
+ la->shadspotsize = 45.0f;
+ la->samp = 3;
+ la->bias = 1.0f;
+ la->soft = 3.0f;
+ la->compressthresh = 0.05f;
+ la->ray_samp = la->ray_sampy = la->ray_sampz = 1;
+ la->area_size = la->area_sizey = la->area_sizez = 1.0f;
+ la->buffers = 1;
+ la->buftype = LA_SHADBUF_HALFWAY;
la->ray_samp_method = LA_SAMP_HALTON;
la->adapt_thresh = 0.001f;
- la->preview=NULL;
+ la->preview = NULL;
la->falloff_type = LA_FALLOFF_INVSQUARE;
la->curfalloff = curvemapping_add(1, 0.0f, 1.0f, 1.0f, 0.0f);
la->sun_effect_type = 0;
@@ -92,25 +92,26 @@ void *add_lamp(const char *name)
la->atm_extinction_factor = 1.0f;
la->atm_distance_factor = 1.0f;
la->sun_intensity = 1.0f;
- la->skyblendtype= MA_RAMP_ADD;
- la->skyblendfac= 1.0f;
- la->sky_colorspace= BLI_XYZ_CIE;
- la->sky_exposure= 1.0f;
+ la->skyblendtype = MA_RAMP_ADD;
+ la->skyblendfac = 1.0f;
+ la->sky_colorspace = BLI_XYZ_CIE;
+ la->sky_exposure = 1.0f;
+ la->shadow_frustum_size = 10.0f;
curvemapping_initialize(la->curfalloff);
return la;
}
-Lamp *copy_lamp(Lamp *la)
+Lamp *BKE_lamp_copy(Lamp *la)
{
Lamp *lan;
int a;
- lan= copy_libblock(&la->id);
+ lan = BKE_libblock_copy(&la->id);
- for (a=0; a<MAX_MTEX; a++) {
+ for (a = 0; a < MAX_MTEX; a++) {
if (lan->mtex[a]) {
- lan->mtex[a]= MEM_mallocN(sizeof(MTex), "copylamptex");
+ lan->mtex[a] = MEM_mallocN(sizeof(MTex), "copylamptex");
memcpy(lan->mtex[a], la->mtex[a], sizeof(MTex));
id_us_plus((ID *)lan->mtex[a]->tex);
}
@@ -119,7 +120,7 @@ Lamp *copy_lamp(Lamp *la)
lan->curfalloff = curvemapping_copy(la->curfalloff);
if (la->nodetree)
- lan->nodetree= ntreeCopyTree(la->nodetree);
+ lan->nodetree = ntreeCopyTree(la->nodetree);
if (la->preview)
lan->preview = BKE_previewimg_copy(la->preview);
@@ -132,12 +133,12 @@ Lamp *localize_lamp(Lamp *la)
Lamp *lan;
int a;
- lan= copy_libblock(&la->id);
+ lan = BKE_libblock_copy(&la->id);
BLI_remlink(&G.main->lamp, lan);
- for (a=0; a<MAX_MTEX; a++) {
+ for (a = 0; a < MAX_MTEX; a++) {
if (lan->mtex[a]) {
- lan->mtex[a]= MEM_mallocN(sizeof(MTex), "localize_lamp");
+ lan->mtex[a] = MEM_mallocN(sizeof(MTex), "localize_lamp");
memcpy(lan->mtex[a], la->mtex[a], sizeof(MTex));
/* free lamp decrements */
id_us_plus((ID *)lan->mtex[a]->tex);
@@ -147,71 +148,71 @@ Lamp *localize_lamp(Lamp *la)
lan->curfalloff = curvemapping_copy(la->curfalloff);
if (la->nodetree)
- lan->nodetree= ntreeLocalize(la->nodetree);
+ lan->nodetree = ntreeLocalize(la->nodetree);
- lan->preview= NULL;
+ lan->preview = NULL;
return lan;
}
-void make_local_lamp(Lamp *la)
+void BKE_lamp_make_local(Lamp *la)
{
- Main *bmain= G.main;
+ Main *bmain = G.main;
Object *ob;
- int is_local= FALSE, is_lib= FALSE;
+ int is_local = FALSE, is_lib = FALSE;
/* - only lib users: do nothing
* - only local users: set flag
* - mixed: make copy
*/
- if (la->id.lib==NULL) return;
- if (la->id.us==1) {
+ if (la->id.lib == NULL) return;
+ if (la->id.us == 1) {
id_clear_lib_data(bmain, &la->id);
return;
}
- ob= bmain->object.first;
+ ob = bmain->object.first;
while (ob) {
- if (ob->data==la) {
- if (ob->id.lib) is_lib= TRUE;
- else is_local= TRUE;
+ if (ob->data == la) {
+ if (ob->id.lib) is_lib = TRUE;
+ else is_local = TRUE;
}
- ob= ob->id.next;
+ ob = ob->id.next;
}
if (is_local && is_lib == FALSE) {
id_clear_lib_data(bmain, &la->id);
}
else if (is_local && is_lib) {
- Lamp *la_new= copy_lamp(la);
- la_new->id.us= 0;
+ Lamp *la_new = BKE_lamp_copy(la);
+ la_new->id.us = 0;
/* Remap paths of new ID using old library as base. */
BKE_id_lib_local_paths(bmain, la->id.lib, &la_new->id);
- ob= bmain->object.first;
+ ob = bmain->object.first;
while (ob) {
- if (ob->data==la) {
+ if (ob->data == la) {
- if (ob->id.lib==NULL) {
- ob->data= la_new;
+ if (ob->id.lib == NULL) {
+ ob->data = la_new;
la_new->id.us++;
la->id.us--;
}
}
- ob= ob->id.next;
+ ob = ob->id.next;
}
}
}
-void free_lamp(Lamp *la)
+void BKE_lamp_free(Lamp *la)
{
MTex *mtex;
int a;
- for (a=0; a<MAX_MTEX; a++) {
- mtex= la->mtex[a];
+ for (a = 0; a < MAX_MTEX; a++) {
+ mtex = la->mtex[a];
if (mtex && mtex->tex) mtex->tex->id.us--;
if (mtex) MEM_freeN(mtex);
}
diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c
index f182d7bcb7c..8ac8acf6edf 100644
--- a/source/blender/blenkernel/intern/lattice.c
+++ b/source/blender/blenkernel/intern/lattice.c
@@ -69,71 +69,71 @@
void calc_lat_fudu(int flag, int res, float *fu, float *du)
{
- if (res==1) {
- *fu= 0.0;
- *du= 0.0;
+ if (res == 1) {
+ *fu = 0.0;
+ *du = 0.0;
}
else if (flag & LT_GRID) {
- *fu= -0.5f*(res-1);
- *du= 1.0f;
+ *fu = -0.5f * (res - 1);
+ *du = 1.0f;
}
else {
- *fu= -1.0f;
- *du= 2.0f/(res-1);
+ *fu = -1.0f;
+ *du = 2.0f / (res - 1);
}
}
-void resizelattice(Lattice *lt, int uNew, int vNew, int wNew, Object *ltOb)
+void BKE_lattice_resize(Lattice *lt, int uNew, int vNew, int wNew, Object *ltOb)
{
BPoint *bp;
int i, u, v, w;
- float fu, fv, fw, uc, vc, wc, du=0.0, dv=0.0, dw=0.0;
+ float fu, fv, fw, uc, vc, wc, du = 0.0, dv = 0.0, dw = 0.0;
float *co, (*vertexCos)[3] = NULL;
/* vertex weight groups are just freed all for now */
if (lt->dvert) {
- free_dverts(lt->dvert, lt->pntsu*lt->pntsv*lt->pntsw);
- lt->dvert= NULL;
+ free_dverts(lt->dvert, lt->pntsu * lt->pntsv * lt->pntsw);
+ lt->dvert = NULL;
}
- while (uNew*vNew*wNew > 32000) {
- if ( uNew>=vNew && uNew>=wNew) uNew--;
- else if ( vNew>=uNew && vNew>=wNew) vNew--;
+ while (uNew * vNew * wNew > 32000) {
+ if (uNew >= vNew && uNew >= wNew) uNew--;
+ else if (vNew >= uNew && vNew >= wNew) vNew--;
else wNew--;
}
- vertexCos = MEM_mallocN(sizeof(*vertexCos)*uNew*vNew*wNew, "tmp_vcos");
+ vertexCos = MEM_mallocN(sizeof(*vertexCos) * uNew * vNew * wNew, "tmp_vcos");
calc_lat_fudu(lt->flag, uNew, &fu, &du);
calc_lat_fudu(lt->flag, vNew, &fv, &dv);
calc_lat_fudu(lt->flag, wNew, &fw, &dw);
- /* If old size is different then resolution changed in interface,
- * try to do clever reinit of points. Pretty simply idea, we just
- * deform new verts by old lattice, but scaling them to match old
- * size first.
- */
+ /* If old size is different then resolution changed in interface,
+ * try to do clever reinit of points. Pretty simply idea, we just
+ * deform new verts by old lattice, but scaling them to match old
+ * size first.
+ */
if (ltOb) {
- if (uNew!=1 && lt->pntsu!=1) {
+ if (uNew != 1 && lt->pntsu != 1) {
fu = lt->fu;
- du = (lt->pntsu-1)*lt->du/(uNew-1);
+ du = (lt->pntsu - 1) * lt->du / (uNew - 1);
}
- if (vNew!=1 && lt->pntsv!=1) {
+ if (vNew != 1 && lt->pntsv != 1) {
fv = lt->fv;
- dv = (lt->pntsv-1)*lt->dv/(vNew-1);
+ dv = (lt->pntsv - 1) * lt->dv / (vNew - 1);
}
- if (wNew!=1 && lt->pntsw!=1) {
+ if (wNew != 1 && lt->pntsw != 1) {
fw = lt->fw;
- dw = (lt->pntsw-1)*lt->dw/(wNew-1);
+ dw = (lt->pntsw - 1) * lt->dw / (wNew - 1);
}
}
co = vertexCos[0];
- for (w=0,wc=fw; w<wNew; w++,wc+=dw) {
- for (v=0,vc=fv; v<vNew; v++,vc+=dv) {
- for (u=0,uc=fu; u<uNew; u++,co+=3,uc+=du) {
+ for (w = 0, wc = fw; w < wNew; w++, wc += dw) {
+ for (v = 0, vc = fv; v < vNew; v++, vc += dv) {
+ for (u = 0, uc = fu; u < uNew; u++, co += 3, uc += du) {
co[0] = uc;
co[1] = vc;
co[2] = wc;
@@ -145,15 +145,15 @@ void resizelattice(Lattice *lt, int uNew, int vNew, int wNew, Object *ltOb)
float mat[4][4];
int typeu = lt->typeu, typev = lt->typev, typew = lt->typew;
- /* works best if we force to linear type (endpoints match) */
+ /* works best if we force to linear type (endpoints match) */
lt->typeu = lt->typev = lt->typew = KEY_LINEAR;
- /* prevent using deformed locations */
- freedisplist(&ltOb->disp);
+ /* prevent using deformed locations */
+ BKE_displist_free(&ltOb->disp);
copy_m4_m4(mat, ltOb->obmat);
unit_m4(ltOb->obmat);
- lattice_deform_verts(ltOb, NULL, NULL, vertexCos, uNew*vNew*wNew, NULL, 1.0f);
+ lattice_deform_verts(ltOb, NULL, NULL, vertexCos, uNew * vNew * wNew, NULL, 1.0f);
copy_m4_m4(ltOb->obmat, mat);
lt->typeu = typeu;
@@ -173,63 +173,63 @@ void resizelattice(Lattice *lt, int uNew, int vNew, int wNew, Object *ltOb)
lt->pntsw = wNew;
MEM_freeN(lt->def);
- lt->def= MEM_callocN(lt->pntsu*lt->pntsv*lt->pntsw*sizeof(BPoint), "lattice bp");
+ lt->def = MEM_callocN(lt->pntsu * lt->pntsv * lt->pntsw * sizeof(BPoint), "lattice bp");
- bp= lt->def;
+ bp = lt->def;
- for (i=0; i<lt->pntsu*lt->pntsv*lt->pntsw; i++,bp++) {
+ for (i = 0; i < lt->pntsu * lt->pntsv * lt->pntsw; i++, bp++) {
copy_v3_v3(bp->vec, vertexCos[i]);
}
MEM_freeN(vertexCos);
}
-Lattice *add_lattice(const char *name)
+Lattice *BKE_lattice_add(const char *name)
{
Lattice *lt;
- lt= alloc_libblock(&G.main->latt, ID_LT, name);
+ lt = BKE_libblock_alloc(&G.main->latt, ID_LT, name);
- lt->flag= LT_GRID;
+ lt->flag = LT_GRID;
- lt->typeu= lt->typev= lt->typew= KEY_BSPLINE;
+ lt->typeu = lt->typev = lt->typew = KEY_BSPLINE;
- lt->def= MEM_callocN(sizeof(BPoint), "lattvert"); /* temporary */
- resizelattice(lt, 2, 2, 2, NULL); /* creates a uniform lattice */
+ lt->def = MEM_callocN(sizeof(BPoint), "lattvert"); /* temporary */
+ BKE_lattice_resize(lt, 2, 2, 2, NULL); /* creates a uniform lattice */
return lt;
}
-Lattice *copy_lattice(Lattice *lt)
+Lattice *BKE_lattice_copy(Lattice *lt)
{
Lattice *ltn;
- ltn= copy_libblock(&lt->id);
- ltn->def= MEM_dupallocN(lt->def);
+ ltn = BKE_libblock_copy(&lt->id);
+ ltn->def = MEM_dupallocN(lt->def);
- ltn->key= copy_key(ltn->key);
- if (ltn->key) ltn->key->from= (ID *)ltn;
+ ltn->key = BKE_key_copy(ltn->key);
+ if (ltn->key) ltn->key->from = (ID *)ltn;
if (lt->dvert) {
- int tot= lt->pntsu*lt->pntsv*lt->pntsw;
- ltn->dvert = MEM_mallocN (sizeof (MDeformVert)*tot, "Lattice MDeformVert");
+ int tot = lt->pntsu * lt->pntsv * lt->pntsw;
+ ltn->dvert = MEM_mallocN(sizeof (MDeformVert) * tot, "Lattice MDeformVert");
copy_dverts(ltn->dvert, lt->dvert, tot);
}
- ltn->editlatt= NULL;
+ ltn->editlatt = NULL;
return ltn;
}
-void free_lattice(Lattice *lt)
+void BKE_lattice_free(Lattice *lt)
{
if (lt->def) MEM_freeN(lt->def);
- if (lt->dvert) free_dverts(lt->dvert, lt->pntsu*lt->pntsv*lt->pntsw);
+ if (lt->dvert) free_dverts(lt->dvert, lt->pntsu * lt->pntsv * lt->pntsw);
if (lt->editlatt) {
- Lattice *editlt= lt->editlatt->latt;
+ Lattice *editlt = lt->editlatt->latt;
if (editlt->def) MEM_freeN(editlt->def);
- if (editlt->dvert) free_dverts(editlt->dvert, lt->pntsu*lt->pntsv*lt->pntsw);
+ if (editlt->dvert) free_dverts(editlt->dvert, lt->pntsu * lt->pntsv * lt->pntsw);
MEM_freeN(editlt);
MEM_freeN(lt->editlatt);
@@ -238,49 +238,49 @@ void free_lattice(Lattice *lt)
/* free animation data */
if (lt->adt) {
BKE_free_animdata(&lt->id);
- lt->adt= NULL;
+ lt->adt = NULL;
}
}
-void make_local_lattice(Lattice *lt)
+void BKE_lattice_make_local(Lattice *lt)
{
- Main *bmain= G.main;
+ Main *bmain = G.main;
Object *ob;
- int is_local= FALSE, is_lib= FALSE;
+ int is_local = FALSE, is_lib = FALSE;
/* - only lib users: do nothing
* - only local users: set flag
* - mixed: make copy
*/
- if (lt->id.lib==NULL) return;
- if (lt->id.us==1) {
+ if (lt->id.lib == NULL) return;
+ if (lt->id.us == 1) {
id_clear_lib_data(bmain, &lt->id);
return;
}
- for (ob= bmain->object.first; ob && ELEM(FALSE, is_lib, is_local); ob= ob->id.next) {
- if (ob->data==lt) {
- if (ob->id.lib) is_lib= TRUE;
- else is_local= TRUE;
+ for (ob = bmain->object.first; ob && ELEM(FALSE, is_lib, is_local); ob = ob->id.next) {
+ if (ob->data == lt) {
+ if (ob->id.lib) is_lib = TRUE;
+ else is_local = TRUE;
}
}
- if (is_local && is_lib==FALSE) {
+ if (is_local && is_lib == FALSE) {
id_clear_lib_data(bmain, &lt->id);
}
else if (is_local && is_lib) {
- Lattice *lt_new= copy_lattice(lt);
- lt_new->id.us= 0;
+ Lattice *lt_new = BKE_lattice_copy(lt);
+ lt_new->id.us = 0;
/* Remap paths of new ID using old library as base. */
BKE_id_lib_local_paths(bmain, lt->id.lib, &lt_new->id);
- for (ob= bmain->object.first; ob; ob= ob->id.next) {
- if (ob->data==lt) {
- if (ob->id.lib==NULL) {
- ob->data= lt_new;
+ for (ob = bmain->object.first; ob; ob = ob->id.next) {
+ if (ob->data == lt) {
+ if (ob->id.lib == NULL) {
+ ob->data = lt_new;
lt_new->id.us++;
lt->id.us--;
}
@@ -291,22 +291,22 @@ void make_local_lattice(Lattice *lt)
void init_latt_deform(Object *oblatt, Object *ob)
{
- /* we make an array with all differences */
- Lattice *lt= oblatt->data;
+ /* we make an array with all differences */
+ Lattice *lt = oblatt->data;
BPoint *bp;
- DispList *dl = find_displist(&oblatt->disp, DL_VERTS);
- float *co = dl?dl->verts:NULL;
+ DispList *dl = BKE_displist_find(&oblatt->disp, DL_VERTS);
+ float *co = dl ? dl->verts : NULL;
float *fp, imat[4][4];
float fu, fv, fw;
int u, v, w;
- if (lt->editlatt) lt= lt->editlatt->latt;
+ if (lt->editlatt) lt = lt->editlatt->latt;
bp = lt->def;
- fp= lt->latticedata= MEM_mallocN(sizeof(float)*3*lt->pntsu*lt->pntsv*lt->pntsw, "latticedata");
+ fp = lt->latticedata = MEM_mallocN(sizeof(float) * 3 * lt->pntsu * lt->pntsv * lt->pntsw, "latticedata");
- /* for example with a particle system: ob==0 */
- if (ob==NULL) {
+ /* for example with a particle system: ob==0 */
+ if (ob == NULL) {
/* in deformspace, calc matrix */
invert_m4_m4(lt->latmat, oblatt->obmat);
@@ -322,9 +322,9 @@ void init_latt_deform(Object *oblatt, Object *ob)
invert_m4_m4(imat, lt->latmat);
}
- for (w=0,fw=lt->fw; w<lt->pntsw; w++,fw+=lt->dw) {
- for (v=0,fv=lt->fv; v<lt->pntsv; v++, fv+=lt->dv) {
- for (u=0,fu=lt->fu; u<lt->pntsu; u++, bp++, co+=3, fp+=3, fu+=lt->du) {
+ for (w = 0, fw = lt->fw; w < lt->pntsw; w++, fw += lt->dw) {
+ for (v = 0, fv = lt->fv; v < lt->pntsv; v++, fv += lt->dv) {
+ for (u = 0, fu = lt->fu; u < lt->pntsu; u++, bp++, co += 3, fp += 3, fu += lt->du) {
if (dl) {
fp[0] = co[0] - fu;
fp[1] = co[1] - fv;
@@ -342,25 +342,25 @@ void init_latt_deform(Object *oblatt, Object *ob)
}
}
-void calc_latt_deform(Object *ob, float *co, float weight)
+void calc_latt_deform(Object *ob, float co[3], float weight)
{
- Lattice *lt= ob->data;
+ Lattice *lt = ob->data;
float u, v, w, tu[4], tv[4], tw[4];
float vec[3];
int idx_w, idx_v, idx_u;
int ui, vi, wi, uu, vv, ww;
/* vgroup influence */
- int defgroup_nr= -1;
- float co_prev[3], weight_blend= 0.0f;
- MDeformVert *dvert= lattice_get_deform_verts(ob);
+ int defgroup_nr = -1;
+ float co_prev[3], weight_blend = 0.0f;
+ MDeformVert *dvert = BKE_lattice_deform_verts_get(ob);
- if (lt->editlatt) lt= lt->editlatt->latt;
- if (lt->latticedata==NULL) return;
+ if (lt->editlatt) lt = lt->editlatt->latt;
+ if (lt->latticedata == NULL) return;
if (lt->vgroup[0] && dvert) {
- defgroup_nr= defgroup_name_index(ob, lt->vgroup);
+ defgroup_nr = defgroup_name_index(ob, lt->vgroup);
copy_v3_v3(co_prev, co);
}
@@ -369,68 +369,68 @@ void calc_latt_deform(Object *ob, float *co, float weight)
/* u v w coords */
- if (lt->pntsu>1) {
- u= (vec[0]-lt->fu)/lt->du;
- ui= (int)floor(u);
+ if (lt->pntsu > 1) {
+ u = (vec[0] - lt->fu) / lt->du;
+ ui = (int)floor(u);
u -= ui;
key_curve_position_weights(u, tu, lt->typeu);
}
else {
- tu[0]= tu[2]= tu[3]= 0.0; tu[1]= 1.0;
- ui= 0;
+ tu[0] = tu[2] = tu[3] = 0.0; tu[1] = 1.0;
+ ui = 0;
}
- if (lt->pntsv>1) {
- v= (vec[1]-lt->fv)/lt->dv;
- vi= (int)floor(v);
+ if (lt->pntsv > 1) {
+ v = (vec[1] - lt->fv) / lt->dv;
+ vi = (int)floor(v);
v -= vi;
key_curve_position_weights(v, tv, lt->typev);
}
else {
- tv[0]= tv[2]= tv[3]= 0.0; tv[1]= 1.0;
- vi= 0;
+ tv[0] = tv[2] = tv[3] = 0.0; tv[1] = 1.0;
+ vi = 0;
}
- if (lt->pntsw>1) {
- w= (vec[2]-lt->fw)/lt->dw;
- wi= (int)floor(w);
+ if (lt->pntsw > 1) {
+ w = (vec[2] - lt->fw) / lt->dw;
+ wi = (int)floor(w);
w -= wi;
key_curve_position_weights(w, tw, lt->typew);
}
else {
- tw[0]= tw[2]= tw[3]= 0.0; tw[1]= 1.0;
- wi= 0;
+ tw[0] = tw[2] = tw[3] = 0.0; tw[1] = 1.0;
+ wi = 0;
}
- for (ww= wi-1; ww<=wi+2; ww++) {
- w= tw[ww-wi+1];
+ for (ww = wi - 1; ww <= wi + 2; ww++) {
+ w = tw[ww - wi + 1];
if (w != 0.0f) {
- if (ww>0) {
- if (ww<lt->pntsw) idx_w= ww*lt->pntsu*lt->pntsv;
- else idx_w= (lt->pntsw-1)*lt->pntsu*lt->pntsv;
+ if (ww > 0) {
+ if (ww < lt->pntsw) idx_w = ww * lt->pntsu * lt->pntsv;
+ else idx_w = (lt->pntsw - 1) * lt->pntsu * lt->pntsv;
}
- else idx_w= 0;
+ else idx_w = 0;
- for (vv= vi-1; vv<=vi+2; vv++) {
- v= w*tv[vv-vi+1];
+ for (vv = vi - 1; vv <= vi + 2; vv++) {
+ v = w * tv[vv - vi + 1];
if (v != 0.0f) {
- if (vv>0) {
- if (vv<lt->pntsv) idx_v= idx_w + vv*lt->pntsu;
- else idx_v= idx_w + (lt->pntsv-1)*lt->pntsu;
+ if (vv > 0) {
+ if (vv < lt->pntsv) idx_v = idx_w + vv * lt->pntsu;
+ else idx_v = idx_w + (lt->pntsv - 1) * lt->pntsu;
}
- else idx_v= idx_w;
+ else idx_v = idx_w;
- for (uu= ui-1; uu<=ui+2; uu++) {
- u= weight*v*tu[uu-ui+1];
+ for (uu = ui - 1; uu <= ui + 2; uu++) {
+ u = weight * v * tu[uu - ui + 1];
if (u != 0.0f) {
- if (uu>0) {
- if (uu<lt->pntsu) idx_u= idx_v + uu;
- else idx_u= idx_v + (lt->pntsu-1);
+ if (uu > 0) {
+ if (uu < lt->pntsu) idx_u = idx_v + uu;
+ else idx_u = idx_v + (lt->pntsu - 1);
}
- else idx_u= idx_v;
+ else idx_u = idx_v;
madd_v3_v3fl(co, &lt->latticedata[idx_u * 3], u);
@@ -450,18 +450,18 @@ void calc_latt_deform(Object *ob, float *co, float weight)
void end_latt_deform(Object *ob)
{
- Lattice *lt= ob->data;
+ Lattice *lt = ob->data;
- if (lt->editlatt) lt= lt->editlatt->latt;
+ if (lt->editlatt) lt = lt->editlatt->latt;
if (lt->latticedata)
MEM_freeN(lt->latticedata);
- lt->latticedata= NULL;
+ lt->latticedata = NULL;
}
- /* calculations is in local space of deformed object
- * so we store in latmat transform from path coord inside object
- */
+/* calculations is in local space of deformed object
+ * so we store in latmat transform from path coord inside object
+ */
typedef struct {
float dmin[3], dmax[3];
float curvespace[4][4], objectspace[4][4], objectspace3[3][3];
@@ -474,7 +474,7 @@ static void init_curve_deform(Object *par, Object *ob, CurveDeform *cd)
mult_m4_m4m4(cd->objectspace, ob->imat, par->obmat);
invert_m4_m4(cd->curvespace, cd->objectspace);
copy_m3_m4(cd->objectspace3, cd->objectspace);
- cd->no_rot_axis= 0;
+ cd->no_rot_axis = 0;
}
/* this makes sure we can extend for non-cyclic.
@@ -483,41 +483,41 @@ static void init_curve_deform(Object *par, Object *ob, CurveDeform *cd)
*/
static int where_on_path_deform(Object *ob, float ctime, float vec[4], float dir[3], float quat[4], float *radius)
{
- Curve *cu= ob->data;
+ Curve *cu = ob->data;
BevList *bl;
float ctime1;
- int cycl=0;
+ int cycl = 0;
/* test for cyclic */
- bl= cu->bev.first;
+ bl = cu->bev.first;
if (!bl->nr) return 0;
- if (bl && bl->poly> -1) cycl= 1;
+ if (bl && bl->poly > -1) cycl = 1;
- if (cycl==0) {
- ctime1= CLAMPIS(ctime, 0.0f, 1.0f);
+ if (cycl == 0) {
+ ctime1 = CLAMPIS(ctime, 0.0f, 1.0f);
}
- else ctime1= ctime;
+ else ctime1 = ctime;
/* vec needs 4 items */
if (where_on_path(ob, ctime1, vec, dir, quat, radius, NULL)) {
- if (cycl==0) {
- Path *path= cu->path;
+ if (cycl == 0) {
+ Path *path = cu->path;
float dvec[3];
if (ctime < 0.0f) {
sub_v3_v3v3(dvec, path->data[1].vec, path->data[0].vec);
- mul_v3_fl(dvec, ctime*(float)path->len);
+ mul_v3_fl(dvec, ctime * (float)path->len);
add_v3_v3(vec, dvec);
if (quat) copy_qt_qt(quat, path->data[0].quat);
- if (radius) *radius= path->data[0].radius;
+ if (radius) *radius = path->data[0].radius;
}
else if (ctime > 1.0f) {
- sub_v3_v3v3(dvec, path->data[path->len-1].vec, path->data[path->len-2].vec);
- mul_v3_fl(dvec, (ctime-1.0f)*(float)path->len);
+ sub_v3_v3v3(dvec, path->data[path->len - 1].vec, path->data[path->len - 2].vec);
+ mul_v3_fl(dvec, (ctime - 1.0f) * (float)path->len);
add_v3_v3(vec, dvec);
- if (quat) copy_qt_qt(quat, path->data[path->len-1].quat);
- if (radius) *radius= path->data[path->len-1].radius;
+ if (quat) copy_qt_qt(quat, path->data[path->len - 1].quat);
+ if (radius) *radius = path->data[path->len - 1].radius;
/* weight - not used but could be added */
}
}
@@ -534,43 +534,43 @@ static int where_on_path_deform(Object *ob, float ctime, float vec[4], float dir
static int calc_curve_deform(Scene *scene, Object *par, float co[3],
const short axis, CurveDeform *cd, float quat_r[4])
{
- Curve *cu= par->data;
+ Curve *cu = par->data;
float fac, loc[4], dir[3], new_quat[4], radius;
short index;
const int is_neg_axis = (axis > 2);
/* to be sure, mostly after file load */
- if (cu->path==NULL) {
- makeDispListCurveTypes(scene, par, 0);
- if (cu->path==NULL) return 0; // happens on append...
+ if (cu->path == NULL) {
+ BKE_displist_make_curveTypes(scene, par, 0);
+ if (cu->path == NULL) return 0; // happens on append...
}
/* options */
if (is_neg_axis) {
index = axis - 3;
if (cu->flag & CU_STRETCH)
- fac= (-co[index]-cd->dmax[index])/(cd->dmax[index] - cd->dmin[index]);
+ fac = (-co[index] - cd->dmax[index]) / (cd->dmax[index] - cd->dmin[index]);
else
- fac= - (co[index]-cd->dmax[index])/(cu->path->totdist);
+ fac = -(co[index] - cd->dmax[index]) / (cu->path->totdist);
}
else {
index = axis;
if (cu->flag & CU_STRETCH)
- fac= (co[index]-cd->dmin[index])/(cd->dmax[index] - cd->dmin[index]);
+ fac = (co[index] - cd->dmin[index]) / (cd->dmax[index] - cd->dmin[index]);
else
- fac= + (co[index]-cd->dmin[index])/(cu->path->totdist);
+ fac = +(co[index] - cd->dmin[index]) / (cu->path->totdist);
}
- if ( where_on_path_deform(par, fac, loc, dir, new_quat, &radius)) { /* returns OK */
+ if (where_on_path_deform(par, fac, loc, dir, new_quat, &radius)) { /* returns OK */
float quat[4], cent[3];
- if (cd->no_rot_axis) { /* set by caller */
+ if (cd->no_rot_axis) { /* set by caller */
/* this is not exactly the same as 2.4x, since the axis is having rotation removed rather than
* changing the axis before calculating the tilt but serves much the same purpose */
- float dir_flat[3]={0,0,0}, q[4];
+ float dir_flat[3] = {0, 0, 0}, q[4];
copy_v3_v3(dir_flat, dir);
- dir_flat[cd->no_rot_axis-1]= 0.0f;
+ dir_flat[cd->no_rot_axis - 1] = 0.0f;
normalize_v3(dir);
normalize_v3(dir_flat);
@@ -598,9 +598,9 @@ static int calc_curve_deform(Scene *scene, Object *par, float co[3],
/* zero the axis which is not used,
* the big block of text above now applies to these 3 lines */
- quat_apply_track(quat, axis, (axis == 0 || axis == 2) ? 1:0); /* up flag is a dummy, set so no rotation is done */
+ quat_apply_track(quat, axis, (axis == 0 || axis == 2) ? 1 : 0); /* up flag is a dummy, set so no rotation is done */
vec_apply_track(cent, axis);
- cent[index]= 0.0f;
+ cent[index] = 0.0f;
/* scale if enabled */
@@ -637,26 +637,26 @@ void curve_deform_verts(Scene *scene, Object *cuOb, Object *target,
cu = cuOb->data;
flag = cu->flag;
- cu->flag |= (CU_PATH|CU_FOLLOW); // needed for path & bevlist
+ cu->flag |= (CU_PATH | CU_FOLLOW); // needed for path & bevlist
init_curve_deform(cuOb, target, &cd);
/* dummy bounds, keep if CU_DEFORM_BOUNDS_OFF is set */
if (is_neg_axis == FALSE) {
- cd.dmin[0]= cd.dmin[1]= cd.dmin[2]= 0.0f;
- cd.dmax[0]= cd.dmax[1]= cd.dmax[2]= 1.0f;
+ cd.dmin[0] = cd.dmin[1] = cd.dmin[2] = 0.0f;
+ cd.dmax[0] = cd.dmax[1] = cd.dmax[2] = 1.0f;
}
else {
/* negative, these bounds give a good rest position */
- cd.dmin[0]= cd.dmin[1]= cd.dmin[2]= -1.0f;
- cd.dmax[0]= cd.dmax[1]= cd.dmax[2]= 0.0f;
+ cd.dmin[0] = cd.dmin[1] = cd.dmin[2] = -1.0f;
+ cd.dmax[0] = cd.dmax[1] = cd.dmax[2] = 0.0f;
}
/* check whether to use vertex groups (only possible if target is a Mesh)
* we want either a Mesh with no derived data, or derived data with
* deformverts
*/
- if (target && target->type==OB_MESH) {
+ if (target && target->type == OB_MESH) {
/* if there's derived data without deformverts, don't use vgroups */
if (dm && !dm->getVertData(dm, 0, CD_MDEFORMVERT))
use_vgroups = 0;
@@ -668,8 +668,8 @@ void curve_deform_verts(Scene *scene, Object *cuOb, Object *target,
}
if (vgroup && vgroup[0] && use_vgroups) {
- Mesh *me= target->data;
- int index= defgroup_name_index(target, vgroup);
+ Mesh *me = target->data;
+ int index = defgroup_name_index(target, vgroup);
if (index != -1 && (me->dvert || dm)) {
MDeformVert *dvert = me->dvert;
@@ -681,7 +681,7 @@ void curve_deform_verts(Scene *scene, Object *cuOb, Object *target,
dvert = me->dvert;
for (a = 0; a < numVerts; a++, dvert++) {
if (dm) dvert = dm->getVertData(dm, a, CD_MDEFORMVERT);
- weight= defvert_find_weight(dvert, index);
+ weight = defvert_find_weight(dvert, index);
if (weight > 0.0f) {
mul_m4_v3(cd.curvespace, vertexCos[a]);
@@ -709,7 +709,7 @@ void curve_deform_verts(Scene *scene, Object *cuOb, Object *target,
for (a = 0; a < numVerts; a++, dvert++) {
if (dm) dvert = dm->getVertData(dm, a, CD_MDEFORMVERT);
- weight= defvert_find_weight(dvert, index);
+ weight = defvert_find_weight(dvert, index);
if (weight > 0.0f) {
/* already in 'cd.curvespace', prev for loop */
@@ -764,7 +764,7 @@ void curve_deform_vector(Scene *scene, Object *cuOb, Object *target,
}
init_curve_deform(cuOb, target, &cd);
- cd.no_rot_axis= no_rot_axis; /* option to only rotate for XY, for example */
+ cd.no_rot_axis = no_rot_axis; /* option to only rotate for XY, for example */
copy_v3_v3(cd.dmin, orco);
copy_v3_v3(cd.dmax, orco);
@@ -774,7 +774,7 @@ void curve_deform_vector(Scene *scene, Object *cuOb, Object *target,
if (calc_curve_deform(scene, cuOb, vec, target->trackflag, &cd, quat)) {
float qmat[3][3];
- quat_to_mat3( qmat,quat);
+ quat_to_mat3(qmat, quat);
mul_m3_m3m3(mat, qmat, cd.objectspace3);
}
else
@@ -799,7 +799,7 @@ void lattice_deform_verts(Object *laOb, Object *target, DerivedMesh *dm,
* we want either a Mesh with no derived data, or derived data with
* deformverts
*/
- if (target && target->type==OB_MESH) {
+ if (target && target->type == OB_MESH) {
/* if there's derived data without deformverts, don't use vgroups */
if (dm && !dm->getVertData(dm, 0, CD_MDEFORMVERT))
use_vgroups = 0;
@@ -821,7 +821,7 @@ void lattice_deform_verts(Object *laOb, Object *target, DerivedMesh *dm,
for (a = 0; a < numVerts; a++, dvert++) {
if (dm) dvert = dm->getVertData(dm, a, CD_MDEFORMVERT);
- weight= defvert_find_weight(dvert, index);
+ weight = defvert_find_weight(dvert, index);
if (weight > 0.0f)
calc_latt_deform(laOb, vertexCos[a], weight * fac);
@@ -838,12 +838,12 @@ void lattice_deform_verts(Object *laOb, Object *target, DerivedMesh *dm,
int object_deform_mball(Object *ob, ListBase *dispbase)
{
- if (ob->parent && ob->parent->type==OB_LATTICE && ob->partype==PARSKEL) {
+ if (ob->parent && ob->parent->type == OB_LATTICE && ob->partype == PARSKEL) {
DispList *dl;
- for (dl=dispbase->first; dl; dl=dl->next) {
+ for (dl = dispbase->first; dl; dl = dl->next) {
lattice_deform_verts(ob->parent, ob, NULL,
- (float(*)[3]) dl->verts, dl->nr, NULL, 1.0f);
+ (float(*)[3])dl->verts, dl->nr, NULL, 1.0f);
}
return 1;
@@ -862,52 +862,52 @@ void outside_lattice(Lattice *lt)
{
BPoint *bp, *bp1, *bp2;
int u, v, w;
- float fac1, du=0.0, dv=0.0, dw=0.0;
+ float fac1, du = 0.0, dv = 0.0, dw = 0.0;
if (lt->flag & LT_OUTSIDE) {
- bp= lt->def;
+ bp = lt->def;
- if (lt->pntsu>1) du= 1.0f/((float)lt->pntsu-1);
- if (lt->pntsv>1) dv= 1.0f/((float)lt->pntsv-1);
- if (lt->pntsw>1) dw= 1.0f/((float)lt->pntsw-1);
+ if (lt->pntsu > 1) du = 1.0f / ((float)lt->pntsu - 1);
+ if (lt->pntsv > 1) dv = 1.0f / ((float)lt->pntsv - 1);
+ if (lt->pntsw > 1) dw = 1.0f / ((float)lt->pntsw - 1);
- for (w=0; w<lt->pntsw; w++) {
+ for (w = 0; w < lt->pntsw; w++) {
- for (v=0; v<lt->pntsv; v++) {
+ for (v = 0; v < lt->pntsv; v++) {
- for (u=0; u<lt->pntsu; u++, bp++) {
- if (u==0 || v==0 || w==0 || u==lt->pntsu-1 || v==lt->pntsv-1 || w==lt->pntsw-1);
+ for (u = 0; u < lt->pntsu; u++, bp++) {
+ if (u == 0 || v == 0 || w == 0 || u == lt->pntsu - 1 || v == lt->pntsv - 1 || w == lt->pntsw - 1) ;
else {
- bp->hide= 1;
+ bp->hide = 1;
bp->f1 &= ~SELECT;
/* u extrema */
- bp1= latt_bp(lt, 0, v, w);
- bp2= latt_bp(lt, lt->pntsu-1, v, w);
+ bp1 = latt_bp(lt, 0, v, w);
+ bp2 = latt_bp(lt, lt->pntsu - 1, v, w);
- fac1= du*u;
- bp->vec[0]= (1.0f-fac1)*bp1->vec[0] + fac1*bp2->vec[0];
- bp->vec[1]= (1.0f-fac1)*bp1->vec[1] + fac1*bp2->vec[1];
- bp->vec[2]= (1.0f-fac1)*bp1->vec[2] + fac1*bp2->vec[2];
+ fac1 = du * u;
+ bp->vec[0] = (1.0f - fac1) * bp1->vec[0] + fac1 * bp2->vec[0];
+ bp->vec[1] = (1.0f - fac1) * bp1->vec[1] + fac1 * bp2->vec[1];
+ bp->vec[2] = (1.0f - fac1) * bp1->vec[2] + fac1 * bp2->vec[2];
/* v extrema */
- bp1= latt_bp(lt, u, 0, w);
- bp2= latt_bp(lt, u, lt->pntsv-1, w);
+ bp1 = latt_bp(lt, u, 0, w);
+ bp2 = latt_bp(lt, u, lt->pntsv - 1, w);
- fac1= dv*v;
- bp->vec[0]+= (1.0f-fac1)*bp1->vec[0] + fac1*bp2->vec[0];
- bp->vec[1]+= (1.0f-fac1)*bp1->vec[1] + fac1*bp2->vec[1];
- bp->vec[2]+= (1.0f-fac1)*bp1->vec[2] + fac1*bp2->vec[2];
+ fac1 = dv * v;
+ bp->vec[0] += (1.0f - fac1) * bp1->vec[0] + fac1 * bp2->vec[0];
+ bp->vec[1] += (1.0f - fac1) * bp1->vec[1] + fac1 * bp2->vec[1];
+ bp->vec[2] += (1.0f - fac1) * bp1->vec[2] + fac1 * bp2->vec[2];
/* w extrema */
- bp1= latt_bp(lt, u, v, 0);
- bp2= latt_bp(lt, u, v, lt->pntsw-1);
+ bp1 = latt_bp(lt, u, v, 0);
+ bp2 = latt_bp(lt, u, v, lt->pntsw - 1);
- fac1= dw*w;
- bp->vec[0]+= (1.0f-fac1)*bp1->vec[0] + fac1*bp2->vec[0];
- bp->vec[1]+= (1.0f-fac1)*bp1->vec[1] + fac1*bp2->vec[1];
- bp->vec[2]+= (1.0f-fac1)*bp1->vec[2] + fac1*bp2->vec[2];
+ fac1 = dw * w;
+ bp->vec[0] += (1.0f - fac1) * bp1->vec[0] + fac1 * bp2->vec[0];
+ bp->vec[1] += (1.0f - fac1) * bp1->vec[1] + fac1 * bp2->vec[1];
+ bp->vec[2] += (1.0f - fac1) * bp1->vec[2] + fac1 * bp2->vec[2];
mul_v3_fl(bp->vec, 0.3333333f);
@@ -919,84 +919,84 @@ void outside_lattice(Lattice *lt)
}
}
else {
- bp= lt->def;
+ bp = lt->def;
- for (w=0; w<lt->pntsw; w++)
- for (v=0; v<lt->pntsv; v++)
- for (u=0; u<lt->pntsu; u++, bp++)
- bp->hide= 0;
+ for (w = 0; w < lt->pntsw; w++)
+ for (v = 0; v < lt->pntsv; v++)
+ for (u = 0; u < lt->pntsu; u++, bp++)
+ bp->hide = 0;
}
}
-float (*lattice_getVertexCos(struct Object *ob, int *numVerts_r))[3]
+float (*BKE_lattice_vertexcos_get(struct Object *ob, int *numVerts_r))[3]
{
Lattice *lt = ob->data;
int i, numVerts;
float (*vertexCos)[3];
- if (lt->editlatt) lt= lt->editlatt->latt;
- numVerts = *numVerts_r = lt->pntsu*lt->pntsv*lt->pntsw;
+ if (lt->editlatt) lt = lt->editlatt->latt;
+ numVerts = *numVerts_r = lt->pntsu * lt->pntsv * lt->pntsw;
- vertexCos = MEM_mallocN(sizeof(*vertexCos)*numVerts,"lt_vcos");
+ vertexCos = MEM_mallocN(sizeof(*vertexCos) * numVerts, "lt_vcos");
- for (i=0; i<numVerts; i++) {
+ for (i = 0; i < numVerts; i++) {
copy_v3_v3(vertexCos[i], lt->def[i].vec);
}
return vertexCos;
}
-void lattice_applyVertexCos(struct Object *ob, float (*vertexCos)[3])
+void BKE_lattice_vertexcos_apply(struct Object *ob, float (*vertexCos)[3])
{
Lattice *lt = ob->data;
- int i, numVerts = lt->pntsu*lt->pntsv*lt->pntsw;
+ int i, numVerts = lt->pntsu * lt->pntsv * lt->pntsw;
- for (i=0; i<numVerts; i++) {
+ for (i = 0; i < numVerts; i++) {
copy_v3_v3(lt->def[i].vec, vertexCos[i]);
}
}
-void lattice_calc_modifiers(Scene *scene, Object *ob)
+void BKE_lattice_modifiers_calc(Scene *scene, Object *ob)
{
- Lattice *lt= ob->data;
+ Lattice *lt = ob->data;
ModifierData *md = modifiers_getVirtualModifierList(ob);
float (*vertexCos)[3] = NULL;
- int numVerts, editmode = (lt->editlatt!=NULL);
+ int numVerts, editmode = (lt->editlatt != NULL);
- freedisplist(&ob->disp);
+ BKE_displist_free(&ob->disp);
- for (; md; md=md->next) {
+ for (; md; md = md->next) {
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
- md->scene= scene;
+ md->scene = scene;
- if (!(md->mode&eModifierMode_Realtime)) continue;
- if (editmode && !(md->mode&eModifierMode_Editmode)) continue;
+ if (!(md->mode & eModifierMode_Realtime)) continue;
+ if (editmode && !(md->mode & eModifierMode_Editmode)) continue;
if (mti->isDisabled && mti->isDisabled(md, 0)) continue;
- if (mti->type!=eModifierTypeType_OnlyDeform) continue;
+ if (mti->type != eModifierTypeType_OnlyDeform) continue;
- if (!vertexCos) vertexCos = lattice_getVertexCos(ob, &numVerts);
+ if (!vertexCos) vertexCos = BKE_lattice_vertexcos_get(ob, &numVerts);
mti->deformVerts(md, ob, NULL, vertexCos, numVerts, 0, 0);
}
/* always displist to make this work like derivedmesh */
- if (!vertexCos) vertexCos = lattice_getVertexCos(ob, &numVerts);
+ if (!vertexCos) vertexCos = BKE_lattice_vertexcos_get(ob, &numVerts);
{
DispList *dl = MEM_callocN(sizeof(*dl), "lt_dl");
dl->type = DL_VERTS;
dl->parts = 1;
dl->nr = numVerts;
- dl->verts = (float*) vertexCos;
+ dl->verts = (float *) vertexCos;
BLI_addtail(&ob->disp, dl);
}
}
-struct MDeformVert* lattice_get_deform_verts(struct Object *oblatt)
+struct MDeformVert *BKE_lattice_deform_verts_get(struct Object *oblatt)
{
- Lattice *lt = (Lattice*)oblatt->data;
+ Lattice *lt = (Lattice *)oblatt->data;
BLI_assert(oblatt->type == OB_LATTICE);
- if (lt->editlatt) lt= lt->editlatt->latt;
+ if (lt->editlatt) lt = lt->editlatt->latt;
return lt->dvert;
}
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index 7e756e853b1..25e34bf1879 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -115,14 +115,14 @@
#include "BPY_extern.h"
#endif
-#define MAX_IDPUP 60 /* was 24 */
+#define MAX_IDPUP 60 /* was 24 */
/* GS reads the memory pointed at in a specific ordering.
* only use this definition, makes little and big endian systems
* work fine, in conjunction with MAKE_ID */
/* from blendef: */
-#define GS(a) (*((short *)(a)))
+#define GS(a) (*((short *)(a)))
/* ************* general ************************ */
@@ -133,12 +133,12 @@
* also note that the id _must_ have a library - campbell */
void BKE_id_lib_local_paths(Main *bmain, Library *lib, ID *id)
{
- char *bpath_user_data[2]= {bmain->name, lib->filepath};
+ char *bpath_user_data[2] = {bmain->name, lib->filepath};
- bpath_traverse_id(bmain, id,
- bpath_relocate_visitor,
- BPATH_TRAVERSE_SKIP_MULTIFILE,
- bpath_user_data);
+ BLI_bpath_traverse_id(bmain, id,
+ BLI_bpath_relocate_visitor,
+ BLI_BPATH_TRAVERSE_SKIP_MULTIFILE,
+ bpath_user_data);
}
void id_lib_extern(ID *id)
@@ -166,7 +166,7 @@ void id_us_min(ID *id)
{
if (id) {
if (id->us < 2 && (id->flag & LIB_FAKEUSER)) {
- id->us= 1;
+ id->us = 1;
}
else if (id->us <= 0) {
printf("ID user decrement error: %s\n", id->name);
@@ -182,60 +182,60 @@ int id_make_local(ID *id, int test)
if (id->flag & LIB_INDIRECT)
return 0;
- switch(GS(id->name)) {
+ switch (GS(id->name)) {
case ID_SCE:
return 0; /* not implemented */
case ID_LI:
return 0; /* can't be linked */
case ID_OB:
- if (!test) make_local_object((Object*)id);
+ if (!test) BKE_object_make_local((Object *)id);
return 1;
case ID_ME:
if (!test) {
- make_local_mesh((Mesh*)id);
- make_local_key(((Mesh*)id)->key);
+ BKE_mesh_make_local((Mesh *)id);
+ BKE_key_make_local(((Mesh *)id)->key);
}
return 1;
case ID_CU:
if (!test) {
- make_local_curve((Curve*)id);
- make_local_key(((Curve*)id)->key);
+ BKE_curve_make_local((Curve *)id);
+ BKE_key_make_local(((Curve *)id)->key);
}
return 1;
case ID_MB:
- if (!test) make_local_mball((MetaBall*)id);
+ if (!test) BKE_mball_make_local((MetaBall *)id);
return 1;
case ID_MA:
- if (!test) make_local_material((Material*)id);
+ if (!test) BKE_material_make_local((Material *)id);
return 1;
case ID_TE:
- if (!test) make_local_texture((Tex*)id);
+ if (!test) BKE_texture_make_local((Tex *)id);
return 1;
case ID_IM:
- if (!test) make_local_image((Image*)id);
+ if (!test) BKE_image_make_local((Image *)id);
return 1;
case ID_LT:
if (!test) {
- make_local_lattice((Lattice*)id);
- make_local_key(((Lattice*)id)->key);
+ BKE_lattice_make_local((Lattice *)id);
+ BKE_key_make_local(((Lattice *)id)->key);
}
return 1;
case ID_LA:
- if (!test) make_local_lamp((Lamp*)id);
+ if (!test) BKE_lamp_make_local((Lamp *)id);
return 1;
case ID_CA:
- if (!test) make_local_camera((Camera*)id);
+ if (!test) BKE_camera_make_local((Camera *)id);
return 1;
case ID_SPK:
- if (!test) make_local_speaker((Speaker*)id);
+ if (!test) BKE_speaker_make_local((Speaker *)id);
return 1;
case ID_IP:
return 0; /* deprecated */
case ID_KE:
- if (!test) make_local_key((Key*)id);
+ if (!test) BKE_key_make_local((Key *)id);
return 1;
case ID_WO:
- if (!test) make_local_world((World*)id);
+ if (!test) BKE_world_make_local((World *)id);
return 1;
case ID_SCR:
return 0; /* can't be linked */
@@ -250,18 +250,18 @@ int id_make_local(ID *id, int test)
case ID_GR:
return 0; /* not implemented */
case ID_AR:
- if (!test) make_local_armature((bArmature*)id);
+ if (!test) BKE_armature_make_local((bArmature *)id);
return 1;
case ID_AC:
- if (!test) make_local_action((bAction*)id);
+ if (!test) BKE_action_make_local((bAction *)id);
return 1;
case ID_NT:
return 0; /* not implemented */
case ID_BR:
- if (!test) make_local_brush((Brush*)id);
+ if (!test) BKE_brush_make_local((Brush *)id);
return 1;
case ID_PA:
- if (!test) make_local_particlesettings((ParticleSettings*)id);
+ if (!test) BKE_particlesettings_make_local((ParticleSettings *)id);
return 1;
case ID_WM:
return 0; /* can't be linked */
@@ -274,85 +274,85 @@ int id_make_local(ID *id, int test)
int id_copy(ID *id, ID **newid, int test)
{
- if (!test) *newid= NULL;
+ if (!test) *newid = NULL;
/* conventions:
* - make shallow copy, only this ID block
* - id.us of the new ID is set to 1 */
- switch(GS(id->name)) {
+ switch (GS(id->name)) {
case ID_SCE:
return 0; /* can't be copied from here */
case ID_LI:
return 0; /* can't be copied from here */
case ID_OB:
- if (!test) *newid= (ID*)copy_object((Object*)id);
+ if (!test) *newid = (ID *)BKE_object_copy((Object *)id);
return 1;
case ID_ME:
- if (!test) *newid= (ID*)copy_mesh((Mesh*)id);
+ if (!test) *newid = (ID *)BKE_mesh_copy((Mesh *)id);
return 1;
case ID_CU:
- if (!test) *newid= (ID*)copy_curve((Curve*)id);
+ if (!test) *newid = (ID *)BKE_curve_copy((Curve *)id);
return 1;
case ID_MB:
- if (!test) *newid= (ID*)copy_mball((MetaBall*)id);
+ if (!test) *newid = (ID *)BKE_mball_copy((MetaBall *)id);
return 1;
case ID_MA:
- if (!test) *newid= (ID*)copy_material((Material*)id);
+ if (!test) *newid = (ID *)BKE_material_copy((Material *)id);
return 1;
case ID_TE:
- if (!test) *newid= (ID*)copy_texture((Tex*)id);
+ if (!test) *newid = (ID *)BKE_texture_copy((Tex *)id);
return 1;
case ID_IM:
- if (!test) *newid= (ID*)copy_image((Image*)id);
+ if (!test) *newid = (ID *)BKE_image_copy((Image *)id);
return 1;
case ID_LT:
- if (!test) *newid= (ID*)copy_lattice((Lattice*)id);
+ if (!test) *newid = (ID *)BKE_lattice_copy((Lattice *)id);
return 1;
case ID_LA:
- if (!test) *newid= (ID*)copy_lamp((Lamp*)id);
+ if (!test) *newid = (ID *)BKE_lamp_copy((Lamp *)id);
return 1;
case ID_SPK:
- if (!test) *newid= (ID*)copy_speaker((Speaker*)id);
+ if (!test) *newid = (ID *)BKE_speaker_copy((Speaker *)id);
return 1;
case ID_CA:
- if (!test) *newid= (ID*)copy_camera((Camera*)id);
+ if (!test) *newid = (ID *)BKE_camera_copy((Camera *)id);
return 1;
case ID_IP:
return 0; /* deprecated */
case ID_KE:
- if (!test) *newid= (ID*)copy_key((Key*)id);
+ if (!test) *newid = (ID *)BKE_key_copy((Key *)id);
return 1;
case ID_WO:
- if (!test) *newid= (ID*)copy_world((World*)id);
+ if (!test) *newid = (ID *)BKE_world_copy((World *)id);
return 1;
case ID_SCR:
return 0; /* can't be copied from here */
case ID_VF:
return 0; /* not implemented */
case ID_TXT:
- if (!test) *newid= (ID*)copy_text((Text*)id);
+ if (!test) *newid = (ID *)BKE_text_copy((Text *)id);
return 1;
case ID_SCRIPT:
return 0; /* deprecated */
case ID_SO:
return 0; /* not implemented */
case ID_GR:
- if (!test) *newid= (ID*)copy_group((Group*)id);
+ if (!test) *newid = (ID *)BKE_group_copy((Group *)id);
return 1;
case ID_AR:
- if (!test) *newid= (ID*)copy_armature((bArmature*)id);
+ if (!test) *newid = (ID *)BKE_armature_copy((bArmature *)id);
return 1;
case ID_AC:
- if (!test) *newid= (ID*)copy_action((bAction*)id);
+ if (!test) *newid = (ID *)BKE_action_copy((bAction *)id);
return 1;
case ID_NT:
- if (!test) *newid= (ID*)ntreeCopyTree((bNodeTree*)id);
+ if (!test) *newid = (ID *)ntreeCopyTree((bNodeTree *)id);
return 1;
case ID_BR:
- if (!test) *newid= (ID*)copy_brush((Brush*)id);
+ if (!test) *newid = (ID *)BKE_brush_copy((Brush *)id);
return 1;
case ID_PA:
- if (!test) *newid= (ID*)psys_copy_settings((ParticleSettings*)id);
+ if (!test) *newid = (ID *)BKE_particlesettings_copy((ParticleSettings *)id);
return 1;
case ID_WM:
return 0; /* can't be copied from here */
@@ -365,29 +365,29 @@ int id_copy(ID *id, ID **newid, int test)
int id_unlink(ID *id, int test)
{
- Main *mainlib= G.main;
+ Main *mainlib = G.main;
ListBase *lb;
- switch(GS(id->name)) {
+ switch (GS(id->name)) {
case ID_TXT:
if (test) return 1;
- unlink_text(mainlib, (Text*)id);
+ BKE_text_unlink(mainlib, (Text *)id);
break;
case ID_GR:
if (test) return 1;
- unlink_group((Group*)id);
+ BKE_group_unlink((Group *)id);
break;
case ID_OB:
if (test) return 1;
- unlink_object((Object*)id);
+ BKE_object_unlink((Object *)id);
break;
}
if (id->us == 0) {
if (test) return 1;
- lb= which_libbase(mainlib, GS(id->name));
- free_libblock(lb, id);
+ lb = which_libbase(mainlib, GS(id->name));
+ BKE_libblock_free(lb, id);
return 1;
}
@@ -425,7 +425,7 @@ int id_single_user(bContext *C, ID *id, PointerRNA *ptr, PropertyRNA *prop)
ListBase *which_libbase(Main *mainlib, short type)
{
- switch( type ) {
+ switch (type) {
case ID_SCE:
return &(mainlib->scene);
case ID_LI:
@@ -495,11 +495,11 @@ void flag_listbase_ids(ListBase *lb, short flag, short value)
{
ID *id;
if (value) {
- for (id= lb->first; id; id= id->next) id->flag |= flag;
+ for (id = lb->first; id; id = id->next) id->flag |= flag;
}
else {
flag = ~flag;
- for (id= lb->first; id; id= id->next) id->flag &= flag;
+ for (id = lb->first; id; id = id->next) id->flag &= flag;
}
}
@@ -508,8 +508,8 @@ void flag_all_listbases_ids(short flag, short value)
{
ListBase *lbarray[MAX_LIBARRAY];
int a;
- a= set_listbasepointers(G.main, lbarray);
- while (a--) flag_listbase_ids(lbarray[a], flag, value);
+ a = set_listbasepointers(G.main, lbarray);
+ while (a--) flag_listbase_ids(lbarray[a], flag, value);
}
void recalc_all_library_objects(Main *main)
@@ -517,9 +517,9 @@ void recalc_all_library_objects(Main *main)
Object *ob;
/* flag for full recalc */
- for (ob=main->object.first; ob; ob=ob->id.next)
+ for (ob = main->object.first; ob; ob = ob->id.next)
if (ob->id.lib)
- ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
+ ob->recalc |= OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME;
}
/* note: MAX_LIBARRAY define should match this code */
@@ -530,131 +530,131 @@ int set_listbasepointers(Main *main, ListBase **lb)
/* BACKWARDS! also watch order of free-ing! (mesh<->mat), first items freed last.
* This is important because freeing data decreases usercounts of other datablocks,
* if this data is its self freed it can crash. */
- lb[a++]= &(main->ipo);
- lb[a++]= &(main->action); // xxx moved here to avoid problems when freeing with animato (aligorith)
- lb[a++]= &(main->key);
- lb[a++]= &(main->gpencil); /* referenced by nodes, objects, view, scene etc, before to free after. */
- lb[a++]= &(main->nodetree);
- lb[a++]= &(main->image);
- lb[a++]= &(main->tex);
- lb[a++]= &(main->mat);
- lb[a++]= &(main->vfont);
+ lb[a++] = &(main->ipo);
+ lb[a++] = &(main->action); // xxx moved here to avoid problems when freeing with animato (aligorith)
+ lb[a++] = &(main->key);
+ lb[a++] = &(main->gpencil); /* referenced by nodes, objects, view, scene etc, before to free after. */
+ lb[a++] = &(main->nodetree);
+ lb[a++] = &(main->image);
+ lb[a++] = &(main->tex);
+ lb[a++] = &(main->mat);
+ lb[a++] = &(main->vfont);
/* Important!: When adding a new object type,
* the specific data should be inserted here
*/
- lb[a++]= &(main->armature);
-
- lb[a++]= &(main->mesh);
- lb[a++]= &(main->curve);
- lb[a++]= &(main->mball);
-
- lb[a++]= &(main->latt);
- lb[a++]= &(main->lamp);
- lb[a++]= &(main->camera);
-
- lb[a++]= &(main->text);
- lb[a++]= &(main->sound);
- lb[a++]= &(main->group);
- lb[a++]= &(main->brush);
- lb[a++]= &(main->script);
- lb[a++]= &(main->particle);
- lb[a++]= &(main->speaker);
-
- lb[a++]= &(main->world);
- lb[a++]= &(main->screen);
- lb[a++]= &(main->object);
- lb[a++]= &(main->scene);
- lb[a++]= &(main->library);
- lb[a++]= &(main->wm);
- lb[a++]= &(main->movieclip);
+ lb[a++] = &(main->armature);
+
+ lb[a++] = &(main->mesh);
+ lb[a++] = &(main->curve);
+ lb[a++] = &(main->mball);
+
+ lb[a++] = &(main->latt);
+ lb[a++] = &(main->lamp);
+ lb[a++] = &(main->camera);
+
+ lb[a++] = &(main->text);
+ lb[a++] = &(main->sound);
+ lb[a++] = &(main->group);
+ lb[a++] = &(main->brush);
+ lb[a++] = &(main->script);
+ lb[a++] = &(main->particle);
+ lb[a++] = &(main->speaker);
+
+ lb[a++] = &(main->world);
+ lb[a++] = &(main->screen);
+ lb[a++] = &(main->object);
+ lb[a++] = &(main->scene);
+ lb[a++] = &(main->library);
+ lb[a++] = &(main->wm);
+ lb[a++] = &(main->movieclip);
- lb[a]= NULL;
+ lb[a] = NULL;
return a;
}
/* *********** ALLOC AND FREE *****************
*
- * free_libblock(ListBase *lb, ID *id )
+ * BKE_libblock_free(ListBase *lb, ID *id )
* provide a list-basis and datablock, but only ID is read
*
- * void *alloc_libblock(ListBase *lb, type, name)
+ * void *BKE_libblock_alloc(ListBase *lb, type, name)
* inserts in list and returns a new ID
*
* **************************** */
static ID *alloc_libblock_notest(short type)
{
- ID *id= NULL;
+ ID *id = NULL;
- switch( type ) {
+ switch (type) {
case ID_SCE:
- id= MEM_callocN(sizeof(Scene), "scene");
+ id = MEM_callocN(sizeof(Scene), "scene");
break;
case ID_LI:
- id= MEM_callocN(sizeof(Library), "library");
+ id = MEM_callocN(sizeof(Library), "library");
break;
case ID_OB:
- id= MEM_callocN(sizeof(Object), "object");
+ id = MEM_callocN(sizeof(Object), "object");
break;
case ID_ME:
- id= MEM_callocN(sizeof(Mesh), "mesh");
+ id = MEM_callocN(sizeof(Mesh), "mesh");
break;
case ID_CU:
- id= MEM_callocN(sizeof(Curve), "curve");
+ id = MEM_callocN(sizeof(Curve), "curve");
break;
case ID_MB:
- id= MEM_callocN(sizeof(MetaBall), "mball");
+ id = MEM_callocN(sizeof(MetaBall), "mball");
break;
case ID_MA:
- id= MEM_callocN(sizeof(Material), "mat");
+ id = MEM_callocN(sizeof(Material), "mat");
break;
case ID_TE:
- id= MEM_callocN(sizeof(Tex), "tex");
+ id = MEM_callocN(sizeof(Tex), "tex");
break;
case ID_IM:
- id= MEM_callocN(sizeof(Image), "image");
+ id = MEM_callocN(sizeof(Image), "image");
break;
case ID_LT:
- id= MEM_callocN(sizeof(Lattice), "latt");
+ id = MEM_callocN(sizeof(Lattice), "latt");
break;
case ID_LA:
- id= MEM_callocN(sizeof(Lamp), "lamp");
+ id = MEM_callocN(sizeof(Lamp), "lamp");
break;
case ID_CA:
- id= MEM_callocN(sizeof(Camera), "camera");
+ id = MEM_callocN(sizeof(Camera), "camera");
break;
case ID_IP:
- id= MEM_callocN(sizeof(Ipo), "ipo");
+ id = MEM_callocN(sizeof(Ipo), "ipo");
break;
case ID_KE:
- id= MEM_callocN(sizeof(Key), "key");
+ id = MEM_callocN(sizeof(Key), "key");
break;
case ID_WO:
- id= MEM_callocN(sizeof(World), "world");
+ id = MEM_callocN(sizeof(World), "world");
break;
case ID_SCR:
- id= MEM_callocN(sizeof(bScreen), "screen");
+ id = MEM_callocN(sizeof(bScreen), "screen");
break;
case ID_VF:
- id= MEM_callocN(sizeof(VFont), "vfont");
+ id = MEM_callocN(sizeof(VFont), "vfont");
break;
case ID_TXT:
- id= MEM_callocN(sizeof(Text), "text");
+ id = MEM_callocN(sizeof(Text), "text");
break;
case ID_SCRIPT:
//XXX id= MEM_callocN(sizeof(Script), "script");
break;
case ID_SPK:
- id= MEM_callocN(sizeof(Speaker), "speaker");
+ id = MEM_callocN(sizeof(Speaker), "speaker");
break;
case ID_SO:
- id= MEM_callocN(sizeof(bSound), "sound");
+ id = MEM_callocN(sizeof(bSound), "sound");
break;
case ID_GR:
- id= MEM_callocN(sizeof(Group), "group");
+ id = MEM_callocN(sizeof(Group), "group");
break;
case ID_AR:
id = MEM_callocN(sizeof(bArmature), "armature");
@@ -685,16 +685,16 @@ static ID *alloc_libblock_notest(short type)
}
/* used everywhere in blenkernel and text.c */
-void *alloc_libblock(ListBase *lb, short type, const char *name)
+void *BKE_libblock_alloc(ListBase *lb, short type, const char *name)
{
- ID *id= NULL;
+ ID *id = NULL;
- id= alloc_libblock_notest(type);
+ id = alloc_libblock_notest(type);
if (id) {
BLI_addtail(lb, id);
- id->us= 1;
+ id->us = 1;
id->icon_id = 0;
- *( (short *)id->name )= type;
+ *( (short *)id->name) = type;
new_id(lb, id, name);
/* alphabetic insterion: is in new_id */
}
@@ -705,16 +705,16 @@ void *alloc_libblock(ListBase *lb, short type, const char *name)
/* and, trust that BKE_animdata_from_id() will only find AnimData for valid ID-types */
static void id_copy_animdata(ID *id, const short do_action)
{
- AnimData *adt= BKE_animdata_from_id(id);
+ AnimData *adt = BKE_animdata_from_id(id);
if (adt) {
IdAdtTemplate *iat = (IdAdtTemplate *)id;
- iat->adt= BKE_copy_animdata(iat->adt, do_action); /* could be set to FALSE, need to investigate */
+ iat->adt = BKE_copy_animdata(iat->adt, do_action); /* could be set to FALSE, need to investigate */
}
}
/* material nodes use this since they are not treated as libdata */
-void copy_libblock_data(ID *id, const ID *id_from, const short do_action)
+void BKE_libblock_copy_data(ID *id, const ID *id_from, const short do_action)
{
if (id_from->properties)
id->properties = IDP_CopyProperty(id_from->properties);
@@ -724,43 +724,43 @@ void copy_libblock_data(ID *id, const ID *id_from, const short do_action)
}
/* used everywhere in blenkernel */
-void *copy_libblock(ID *id)
+void *BKE_libblock_copy(ID *id)
{
ID *idn;
ListBase *lb;
size_t idn_len;
- lb= which_libbase(G.main, GS(id->name));
- idn= alloc_libblock(lb, GS(id->name), id->name+2);
+ lb = which_libbase(G.main, GS(id->name));
+ idn = BKE_libblock_alloc(lb, GS(id->name), id->name + 2);
assert(idn != NULL);
- idn_len= MEM_allocN_len(idn);
+ idn_len = MEM_allocN_len(idn);
if ((int)idn_len - (int)sizeof(ID) > 0) { /* signed to allow neg result */
- const char *cp= (const char *)id;
- char *cpn= (char *)idn;
+ const char *cp = (const char *)id;
+ char *cpn = (char *)idn;
- memcpy(cpn+sizeof(ID), cp+sizeof(ID), idn_len - sizeof(ID));
+ memcpy(cpn + sizeof(ID), cp + sizeof(ID), idn_len - sizeof(ID));
}
- id->newid= idn;
+ id->newid = idn;
idn->flag |= LIB_NEW;
- copy_libblock_data(idn, id, FALSE);
+ BKE_libblock_copy_data(idn, id, FALSE);
return idn;
}
-static void free_library(Library *UNUSED(lib))
+static void BKE_library_free(Library *UNUSED(lib))
{
/* no freeing needed for libraries yet */
}
-static void (*free_windowmanager_cb)(bContext *, wmWindowManager *)= NULL;
+static void (*free_windowmanager_cb)(bContext *, wmWindowManager *) = NULL;
void set_free_windowmanager_cb(void (*func)(bContext *C, wmWindowManager *) )
{
- free_windowmanager_cb= func;
+ free_windowmanager_cb = func;
}
static void animdata_dtar_clear_cb(ID *UNUSED(id), AnimData *adt, void *userdata)
@@ -769,16 +769,16 @@ static void animdata_dtar_clear_cb(ID *UNUSED(id), AnimData *adt, void *userdata
FCurve *fcu;
/* find the driver this belongs to and update it */
- for (fcu=adt->drivers.first; fcu; fcu=fcu->next) {
- driver= fcu->driver;
+ for (fcu = adt->drivers.first; fcu; fcu = fcu->next) {
+ driver = fcu->driver;
if (driver) {
DriverVar *dvar;
- for (dvar= driver->variables.first; dvar; dvar= dvar->next) {
+ for (dvar = driver->variables.first; dvar; dvar = dvar->next) {
DRIVER_TARGETS_USED_LOOPER(dvar)
{
if (dtar->id == userdata)
- dtar->id= NULL;
+ dtar->id = NULL;
}
DRIVER_TARGETS_LOOPER_END
}
@@ -788,105 +788,105 @@ static void animdata_dtar_clear_cb(ID *UNUSED(id), AnimData *adt, void *userdata
/* used in headerbuttons.c image.c mesh.c screen.c sound.c and library.c */
-void free_libblock(ListBase *lb, void *idv)
+void BKE_libblock_free(ListBase *lb, void *idv)
{
- ID *id= idv;
+ ID *id = idv;
#ifdef WITH_PYTHON
BPY_id_release(id);
#endif
- switch( GS(id->name) ) { /* GetShort from util.h */
+ switch (GS(id->name) ) { /* GetShort from util.h */
case ID_SCE:
- free_scene((Scene *)id);
+ BKE_scene_free((Scene *)id);
break;
case ID_LI:
- free_library((Library *)id);
+ BKE_library_free((Library *)id);
break;
case ID_OB:
- free_object((Object *)id);
+ BKE_object_free((Object *)id);
break;
case ID_ME:
- free_mesh((Mesh *)id, 1);
+ BKE_mesh_free((Mesh *)id, 1);
break;
case ID_CU:
- free_curve((Curve *)id);
+ BKE_curve_free((Curve *)id);
break;
case ID_MB:
- free_mball((MetaBall *)id);
+ BKE_mball_free((MetaBall *)id);
break;
case ID_MA:
- free_material((Material *)id);
+ BKE_material_free((Material *)id);
break;
case ID_TE:
- free_texture((Tex *)id);
+ BKE_texture_free((Tex *)id);
break;
case ID_IM:
- free_image((Image *)id);
+ BKE_image_free((Image *)id);
break;
case ID_LT:
- free_lattice((Lattice *)id);
+ BKE_lattice_free((Lattice *)id);
break;
case ID_LA:
- free_lamp((Lamp *)id);
+ BKE_lamp_free((Lamp *)id);
break;
case ID_CA:
- free_camera((Camera*) id);
+ BKE_camera_free((Camera *) id);
break;
case ID_IP:
- free_ipo((Ipo *)id);
+ BKE_ipo_free((Ipo *)id);
break;
case ID_KE:
- free_key((Key *)id);
+ BKE_key_free((Key *)id);
break;
case ID_WO:
- free_world((World *)id);
+ BKE_world_free((World *)id);
break;
case ID_SCR:
- free_screen((bScreen *)id);
+ BKE_screen_free((bScreen *)id);
break;
case ID_VF:
- free_vfont((VFont *)id);
+ BKE_vfont_free((VFont *)id);
break;
case ID_TXT:
- free_text((Text *)id);
+ BKE_text_free((Text *)id);
break;
case ID_SCRIPT:
//XXX free_script((Script *)id);
break;
case ID_SPK:
- free_speaker((Speaker *)id);
+ BKE_speaker_free((Speaker *)id);
break;
case ID_SO:
- sound_free((bSound*)id);
+ BKE_sound_free((bSound *)id);
break;
case ID_GR:
- free_group_objects((Group *)id);
+ BKE_group_free((Group *)id);
break;
case ID_AR:
- free_armature((bArmature *)id);
+ BKE_armature_free((bArmature *)id);
break;
case ID_AC:
- free_action((bAction *)id);
+ BKE_action_free((bAction *)id);
break;
case ID_NT:
ntreeFreeTree((bNodeTree *)id);
break;
case ID_BR:
- free_brush((Brush *)id);
+ BKE_brush_free((Brush *)id);
break;
case ID_PA:
- psys_free_settings((ParticleSettings *)id);
+ BKE_particlesettings_free((ParticleSettings *)id);
break;
case ID_WM:
if (free_windowmanager_cb)
free_windowmanager_cb(NULL, (wmWindowManager *)id);
break;
case ID_GD:
- free_gpencil_data((bGPdata *)id);
+ BKE_gpencil_free((bGPdata *)id);
break;
case ID_MC:
- free_movieclip((MovieClip *)id);
+ BKE_movieclip_free((MovieClip *)id);
break;
}
@@ -903,20 +903,20 @@ void free_libblock(ListBase *lb, void *idv)
MEM_freeN(id);
}
-void free_libblock_us(ListBase *lb, void *idv) /* test users */
+void BKE_libblock_free_us(ListBase *lb, void *idv) /* test users */
{
- ID *id= idv;
+ ID *id = idv;
id->us--;
- if (id->us<0) {
+ if (id->us < 0) {
if (id->lib) printf("ERROR block %s %s users %d\n", id->lib->name, id->name, id->us);
else printf("ERROR block %s users %d\n", id->name, id->us);
}
- if (id->us==0) {
- if ( GS(id->name)==ID_OB ) unlink_object((Object *)id);
+ if (id->us == 0) {
+ if (GS(id->name) == ID_OB) BKE_object_unlink((Object *)id);
- free_libblock(lb, id);
+ BKE_libblock_free(lb, id);
}
}
@@ -927,13 +927,13 @@ void free_main(Main *mainvar)
ListBase *lbarray[MAX_LIBARRAY];
int a;
- a= set_listbasepointers(mainvar, lbarray);
+ a = set_listbasepointers(mainvar, lbarray);
while (a--) {
- ListBase *lb= lbarray[a];
+ ListBase *lb = lbarray[a];
ID *id;
- while ( (id= lb->first) ) {
- free_libblock(lb, id);
+ while ( (id = lb->first) ) {
+ BKE_libblock_free(lb, id);
}
}
@@ -943,85 +943,85 @@ void free_main(Main *mainvar)
/* ***************** ID ************************ */
-ID *find_id(const char *type, const char *name) /* type: "OB" or "MA" etc */
+ID *BKE_libblock_find_name(const short type, const char *name) /* type: "OB" or "MA" etc */
{
- ListBase *lb= which_libbase(G.main, GS(type));
+ ListBase *lb = which_libbase(G.main, type);
+ BLI_assert(lb != NULL);
return BLI_findstring(lb, name, offsetof(ID, name) + 2);
}
static void get_flags_for_id(ID *id, char *buf)
{
- int isfake= id->flag & LIB_FAKEUSER;
- int isnode=0;
- /* Writeout the flags for the entry, note there
- * is a small hack that writes 5 spaces instead
- * of 4 if no flags are displayed... this makes
- * things usually line up ok - better would be
- * to have that explicit, oh well - zr
- */
+ int isfake = id->flag & LIB_FAKEUSER;
+ int isnode = 0;
+ /* Writeout the flags for the entry, note there
+ * is a small hack that writes 5 spaces instead
+ * of 4 if no flags are displayed... this makes
+ * things usually line up ok - better would be
+ * to have that explicit, oh well - zr
+ */
- if (GS(id->name)==ID_MA)
- isnode= ((Material *)id)->use_nodes;
- if (GS(id->name)==ID_TE)
- isnode= ((Tex *)id)->use_nodes;
+ if (GS(id->name) == ID_MA)
+ isnode = ((Material *)id)->use_nodes;
+ if (GS(id->name) == ID_TE)
+ isnode = ((Tex *)id)->use_nodes;
- if (id->us<0)
+ if (id->us < 0)
strcpy(buf, "-1W ");
else if (!id->lib && !isfake && id->us && !isnode)
strcpy(buf, " ");
else if (isnode)
- sprintf(buf, "%c%cN%c ", id->lib?'L':' ', isfake?'F':' ', (id->us==0)?'O':' ');
+ sprintf(buf, "%c%cN%c ", id->lib ? 'L' : ' ', isfake ? 'F' : ' ', (id->us == 0) ? 'O' : ' ');
else
- sprintf(buf, "%c%c%c ", id->lib?'L':' ', isfake?'F':' ', (id->us==0)?'O':' ');
+ sprintf(buf, "%c%c%c ", id->lib ? 'L' : ' ', isfake ? 'F' : ' ', (id->us == 0) ? 'O' : ' ');
}
#define IDPUP_NO_VIEWER 1
static void IDnames_to_dyn_pupstring(DynStr *pupds, ListBase *lb, ID *link, short *nr, int hideflag)
{
- int i, nids= BLI_countlist(lb);
+ int i, nids = BLI_countlist(lb);
- if (nr) *nr= -1;
+ if (nr) *nr = -1;
- if (nr && nids>MAX_IDPUP) {
+ if (nr && nids > MAX_IDPUP) {
BLI_dynstr_append(pupds, "DataBrowse %x-2");
- *nr= -2;
+ *nr = -2;
}
else {
ID *id;
- for (i=0, id= lb->first; id; id= id->next, i++) {
+ for (i = 0, id = lb->first; id; id = id->next, i++) {
char numstr[32];
- if (nr && id==link) *nr= i+1;
+ if (nr && id == link) *nr = i + 1;
- if (U.uiflag & USER_HIDE_DOT && id->name[2]=='.')
+ if (U.uiflag & USER_HIDE_DOT && id->name[2] == '.')
continue;
if (hideflag & IDPUP_NO_VIEWER)
- if (GS(id->name)==ID_IM)
- if ( ((Image *)id)->source==IMA_SRC_VIEWER )
+ if (GS(id->name) == ID_IM)
+ if ( ((Image *)id)->source == IMA_SRC_VIEWER)
continue;
get_flags_for_id(id, numstr);
BLI_dynstr_append(pupds, numstr);
- BLI_dynstr_append(pupds, id->name+2);
- BLI_snprintf(numstr, sizeof(numstr), "%%x%d", i+1);
+ BLI_dynstr_append(pupds, id->name + 2);
+ BLI_snprintf(numstr, sizeof(numstr), "%%x%d", i + 1);
BLI_dynstr_append(pupds, numstr);
/* icon */
- switch(GS(id->name))
- {
- case ID_MA: /* fall through */
- case ID_TE: /* fall through */
- case ID_IM: /* fall through */
- case ID_WO: /* fall through */
- case ID_LA: /* fall through */
- BLI_snprintf(numstr, sizeof(numstr), "%%i%d", BKE_icon_getid(id) );
- BLI_dynstr_append(pupds, numstr);
- break;
- default:
- break;
+ switch (GS(id->name)) {
+ case ID_MA: /* fall through */
+ case ID_TE: /* fall through */
+ case ID_IM: /* fall through */
+ case ID_WO: /* fall through */
+ case ID_LA: /* fall through */
+ BLI_snprintf(numstr, sizeof(numstr), "%%i%d", BKE_icon_getid(id));
+ BLI_dynstr_append(pupds, numstr);
+ break;
+ default:
+ break;
}
if (id->next)
@@ -1035,7 +1035,7 @@ static void IDnames_to_dyn_pupstring(DynStr *pupds, ListBase *lb, ID *link, shor
/* if nr==NULL no MAX_IDPUP, this for non-header browsing */
void IDnames_to_pupstring(const char **str, const char *title, const char *extraops, ListBase *lb, ID *link, short *nr)
{
- DynStr *pupds= BLI_dynstr_new();
+ DynStr *pupds = BLI_dynstr_new();
if (title) {
BLI_dynstr_append(pupds, title);
@@ -1050,7 +1050,7 @@ void IDnames_to_pupstring(const char **str, const char *title, const char *extra
IDnames_to_dyn_pupstring(pupds, lb, link, nr, 0);
- *str= BLI_dynstr_get_cstring(pupds);
+ *str = BLI_dynstr_get_cstring(pupds);
BLI_dynstr_free(pupds);
}
@@ -1058,7 +1058,7 @@ void IDnames_to_pupstring(const char **str, const char *title, const char *extra
#if 0 /* unused */
void IMAnames_to_pupstring(const char **str, const char *title, const char *extraops, ListBase *lb, ID *link, short *nr)
{
- DynStr *pupds= BLI_dynstr_new();
+ DynStr *pupds = BLI_dynstr_new();
if (title) {
BLI_dynstr_append(pupds, title);
@@ -1073,7 +1073,7 @@ void IMAnames_to_pupstring(const char **str, const char *title, const char *extr
IDnames_to_dyn_pupstring(pupds, lb, link, nr, IDPUP_NO_VIEWER);
- *str= BLI_dynstr_get_cstring(pupds);
+ *str = BLI_dynstr_get_cstring(pupds);
BLI_dynstr_free(pupds);
}
#endif
@@ -1083,19 +1083,19 @@ void id_sort_by_name(ListBase *lb, ID *id)
ID *idtest;
/* insert alphabetically */
- if (lb->first!=lb->last) {
+ if (lb->first != lb->last) {
BLI_remlink(lb, id);
- idtest= lb->first;
+ idtest = lb->first;
while (idtest) {
- if (BLI_strcasecmp(idtest->name, id->name)>0 || (idtest->lib && !id->lib)) {
+ if (BLI_strcasecmp(idtest->name, id->name) > 0 || (idtest->lib && !id->lib)) {
BLI_insertlinkbefore(lb, idtest, id);
break;
}
- idtest= idtest->next;
+ idtest = idtest->next;
}
/* as last */
- if (idtest==NULL) {
+ if (idtest == NULL) {
BLI_addtail(lb, id);
}
}
@@ -1108,15 +1108,15 @@ void id_sort_by_name(ListBase *lb, ID *id)
*/
static ID *is_dupid(ListBase *lb, ID *id, const char *name)
{
- ID *idtest=NULL;
+ ID *idtest = NULL;
- for ( idtest = lb->first; idtest; idtest = idtest->next ) {
+ for (idtest = lb->first; idtest; idtest = idtest->next) {
/* if idtest is not a lib */
- if ( id != idtest && idtest->lib == NULL ) {
+ if (id != idtest && idtest->lib == NULL) {
/* do not test alphabetic! */
/* optimized */
- if ( idtest->name[2] == name[0] ) {
- if (strcmp(name, idtest->name+2)==0) break;
+ if (idtest->name[2] == name[0]) {
+ if (strcmp(name, idtest->name + 2) == 0) break;
}
}
}
@@ -1137,7 +1137,7 @@ static ID *is_dupid(ListBase *lb, ID *id, const char *name)
static int check_for_dupid(ListBase *lb, ID *id, char *name)
{
ID *idtest;
- int nr= 0, nrtest, a, left_len;
+ int nr = 0, nrtest, a, left_len;
char in_use[64]; /* use as a boolean array, unrelated to name length */
char left[MAX_ID_NAME + 8], leftest[MAX_ID_NAME + 8];
@@ -1152,43 +1152,44 @@ static int check_for_dupid(ListBase *lb, ID *id, char *name)
idtest = is_dupid(lb, id, name);
/* if there is no double, done */
- if ( idtest == NULL ) return 0;
+ if (idtest == NULL) return 0;
/* we have a dup; need to make a new name */
/* quick check so we can reuse one of first 64 ids if vacant */
memset(in_use, 0, sizeof(in_use));
/* get name portion, number portion ("name.number") */
- left_len= BLI_split_name_num(left, &nr, name, '.');
+ left_len = BLI_split_name_num(left, &nr, name, '.');
/* if new name will be too long, truncate it */
if (nr > 999 && left_len > (MAX_ID_NAME - 8)) {
- left[MAX_ID_NAME - 8]= 0;
- left_len= MAX_ID_NAME - 8;
+ left[MAX_ID_NAME - 8] = 0;
+ left_len = MAX_ID_NAME - 8;
}
else if (left_len > (MAX_ID_NAME - 7)) {
- left[MAX_ID_NAME - 7]= 0;
- left_len= MAX_ID_NAME - 7;
+ left[MAX_ID_NAME - 7] = 0;
+ left_len = MAX_ID_NAME - 7;
}
- for (idtest= lb->first; idtest; idtest= idtest->next) {
- if ( (id != idtest) &&
- (idtest->lib == NULL) &&
- (*name == *(idtest->name+2)) &&
- (strncmp(name, idtest->name+2, left_len)==0) &&
- (BLI_split_name_num(leftest, &nrtest, idtest->name+2, '.') == left_len)
- ) {
+ for (idtest = lb->first; idtest; idtest = idtest->next) {
+ if ( (id != idtest) &&
+ (idtest->lib == NULL) &&
+ (*name == *(idtest->name + 2)) &&
+ (strncmp(name, idtest->name + 2, left_len) == 0) &&
+ (BLI_split_name_num(leftest, &nrtest, idtest->name + 2, '.') == left_len)
+ )
+ {
if (nrtest < sizeof(in_use))
- in_use[nrtest]= 1; /* mark as used */
+ in_use[nrtest] = 1; /* mark as used */
if (nr <= nrtest)
- nr= nrtest+1; /* track largest unused */
+ nr = nrtest + 1; /* track largest unused */
}
}
/* decide which value of nr to use */
- for (a=0; a < sizeof(in_use); a++) {
- if (a>=nr) break; /* stop when we've check up to biggest */
- if ( in_use[a]==0 ) { /* found an unused value */
+ for (a = 0; a < sizeof(in_use); a++) {
+ if (a >= nr) break; /* stop when we've check up to biggest */
+ if (in_use[a] == 0) { /* found an unused value */
nr = a;
break;
}
@@ -1198,13 +1199,13 @@ static int check_for_dupid(ListBase *lb, ID *id, char *name)
* rather than just chopping and adding numbers,
* shave off the end chars until we have a unique name.
* Check the null terminators match as well so we don't get Cube.000 -> Cube.00 */
- if (nr==0 && name[left_len]== '\0') {
- int len = left_len-1;
- idtest= is_dupid(lb, id, name);
+ if (nr == 0 && name[left_len] == '\0') {
+ int len = left_len - 1;
+ idtest = is_dupid(lb, id, name);
- while (idtest && len> 1) {
+ while (idtest && len > 1) {
name[len--] = '\0';
- idtest= is_dupid(lb, id, name);
+ idtest = is_dupid(lb, id, name);
}
if (idtest == NULL) return 1;
/* otherwise just continue and use a number suffix */
@@ -1218,7 +1219,7 @@ static int check_for_dupid(ListBase *lb, ID *id, char *name)
continue;
}
/* this format specifier is from hell... */
- BLI_snprintf(name, sizeof(id->name) - 2,"%s.%.3d", left, nr);
+ BLI_snprintf(name, sizeof(id->name) - 2, "%s.%.3d", left, nr);
return 1;
}
@@ -1234,24 +1235,24 @@ static int check_for_dupid(ListBase *lb, ID *id, char *name)
int new_id(ListBase *lb, ID *id, const char *tname)
{
int result;
- char name[MAX_ID_NAME-2];
+ char name[MAX_ID_NAME - 2];
/* if library, don't rename */
if (id->lib) return 0;
/* if no libdata given, look up based on ID */
- if (lb==NULL) lb= which_libbase(G.main, GS(id->name));
+ if (lb == NULL) lb = which_libbase(G.main, GS(id->name));
/* if no name given, use name of current ID
* else make a copy (tname args can be const) */
- if (tname==NULL)
- tname= id->name+2;
+ if (tname == NULL)
+ tname = id->name + 2;
- strncpy(name, tname, sizeof(name)-1);
+ strncpy(name, tname, sizeof(name) - 1);
/* if result > MAX_ID_NAME-3, strncpy don't put the final '\0' to name.
* easier to assign each time then to check if its needed */
- name[sizeof(name)-1]= 0;
+ name[sizeof(name) - 1] = 0;
if (name[0] == '\0') {
/* disallow empty names */
@@ -1264,14 +1265,14 @@ int new_id(ListBase *lb, ID *id, const char *tname)
}
result = check_for_dupid(lb, id, name);
- strcpy(id->name+2, name);
+ strcpy(id->name + 2, name);
/* This was in 2.43 and previous releases
* however all data in blender should be sorted, not just duplicate names
* sorting should not hurt, but noting just incause it alters the way other
* functions work, so sort every time */
#if 0
- if ( result )
+ if (result)
id_sort_by_name(lb, id);
#endif
@@ -1286,8 +1287,8 @@ void id_clear_lib_data(Main *bmain, ID *id)
{
BKE_id_lib_local_paths(bmain, id->lib, id);
- id->lib= NULL;
- id->flag= LIB_LOCAL;
+ id->lib = NULL;
+ id->flag = LIB_LOCAL;
new_id(which_libbase(bmain, GS(id->name)), id, NULL);
}
@@ -1298,18 +1299,18 @@ void clear_id_newpoins(void)
ID *id;
int a;
- a= set_listbasepointers(G.main, lbarray);
+ a = set_listbasepointers(G.main, lbarray);
while (a--) {
- id= lbarray[a]->first;
+ id = lbarray[a]->first;
while (id) {
- id->newid= NULL;
+ id->newid = NULL;
id->flag &= ~LIB_NEW;
- id= id->next;
+ id = id->next;
}
}
}
-#define LIBTAG(a) if (a && a->id.lib) {a->id.flag &=~LIB_INDIRECT; a->id.flag |= LIB_EXTERN;}
+#define LIBTAG(a) if (a && a->id.lib) {a->id.flag &= ~LIB_INDIRECT; a->id.flag |= LIB_EXTERN; }
static void lib_indirect_test_id(ID *id, Library *lib)
{
@@ -1323,17 +1324,17 @@ static void lib_indirect_test_id(ID *id, Library *lib)
return;
}
- if (GS(id->name)==ID_OB) {
- Object *ob= (Object *)id;
+ if (GS(id->name) == ID_OB) {
+ Object *ob = (Object *)id;
Mesh *me;
int a;
-#if 0 /* XXX OLD ANIMSYS, NLASTRIPS ARE NO LONGER USED */
+#if 0 /* XXX OLD ANIMSYS, NLASTRIPS ARE NO LONGER USED */
// XXX old animation system! --------------------------------------
{
bActionStrip *strip;
- for (strip=ob->nlastrips.first; strip; strip=strip->next) {
+ for (strip = ob->nlastrips.first; strip; strip = strip->next) {
LIBTAG(strip->object);
LIBTAG(strip->act);
LIBTAG(strip->ipo);
@@ -1342,14 +1343,14 @@ static void lib_indirect_test_id(ID *id, Library *lib)
// XXX: new animation system needs something like this?
#endif
- for (a=0; a<ob->totcol; a++) {
+ for (a = 0; a < ob->totcol; a++) {
LIBTAG(ob->mat[a]);
}
LIBTAG(ob->dup_group);
LIBTAG(ob->proxy);
- me= ob->data;
+ me = ob->data;
LIBTAG(me);
}
}
@@ -1358,12 +1359,12 @@ void tag_main_lb(ListBase *lb, const short tag)
{
ID *id;
if (tag) {
- for (id= lb->first; id; id= id->next) {
+ for (id = lb->first; id; id = id->next) {
id->flag |= LIB_DOIT;
}
}
else {
- for (id= lb->first; id; id= id->next) {
+ for (id = lb->first; id; id = id->next) {
id->flag &= ~LIB_DOIT;
}
}
@@ -1371,7 +1372,7 @@ void tag_main_lb(ListBase *lb, const short tag)
void tag_main_idcode(struct Main *mainvar, const short type, const short tag)
{
- ListBase *lb= which_libbase(mainvar, type);
+ ListBase *lb = which_libbase(mainvar, type);
tag_main_lb(lb, tag);
}
@@ -1381,7 +1382,7 @@ void tag_main(struct Main *mainvar, const short tag)
ListBase *lbarray[MAX_LIBARRAY];
int a;
- a= set_listbasepointers(mainvar, lbarray);
+ a = set_listbasepointers(mainvar, lbarray);
while (a--) {
tag_main_lb(lbarray[a], tag);
}
@@ -1391,27 +1392,27 @@ void tag_main(struct Main *mainvar, const short tag)
* bmain is almost certainly G.main */
void BKE_library_make_local(Main *bmain, Library *lib, int untagged_only)
{
- ListBase *lbarray[MAX_LIBARRAY], tempbase={NULL, NULL};
+ ListBase *lbarray[MAX_LIBARRAY], tempbase = {NULL, NULL};
ID *id, *idn;
int a;
- a= set_listbasepointers(bmain, lbarray);
+ a = set_listbasepointers(bmain, lbarray);
while (a--) {
- id= lbarray[a]->first;
+ id = lbarray[a]->first;
while (id) {
- id->newid= NULL;
- idn= id->next; /* id is possibly being inserted again */
+ id->newid = NULL;
+ idn = id->next; /* id is possibly being inserted again */
/* The check on the second line (LIB_PRE_EXISTING) is done so its
* possible to tag data you don't want to be made local, used for
* appending data, so any libdata already linked wont become local
* (very nasty to discover all your links are lost after appending)
* */
- if (id->flag & (LIB_EXTERN|LIB_INDIRECT|LIB_NEW) &&
- (untagged_only==0 || !(id->flag & LIB_PRE_EXISTING)))
+ if (id->flag & (LIB_EXTERN | LIB_INDIRECT | LIB_NEW) &&
+ (untagged_only == 0 || !(id->flag & LIB_PRE_EXISTING)))
{
- if (lib==NULL || id->lib==lib) {
+ if (lib == NULL || id->lib == lib) {
if (id->lib) {
id_clear_lib_data(bmain, id); /* sets 'id->flag' */
@@ -1420,15 +1421,15 @@ void BKE_library_make_local(Main *bmain, Library *lib, int untagged_only)
id_sort_by_name(lbarray[a], id);
}
else {
- id->flag &= ~(LIB_EXTERN|LIB_INDIRECT|LIB_NEW);
+ id->flag &= ~(LIB_EXTERN | LIB_INDIRECT | LIB_NEW);
}
}
}
- id= idn;
+ id = idn;
}
/* patch2: make it aphabetically */
- while ( (id=tempbase.first) ) {
+ while ( (id = tempbase.first) ) {
BLI_remlink(&tempbase, id);
BLI_addtail(lbarray[a], id);
new_id(lbarray[a], id, NULL);
@@ -1436,9 +1437,9 @@ void BKE_library_make_local(Main *bmain, Library *lib, int untagged_only)
}
/* patch 3: make sure library data isn't indirect falsely... */
- a= set_listbasepointers(bmain, lbarray);
+ a = set_listbasepointers(bmain, lbarray);
while (a--) {
- for (id= lbarray[a]->first; id; id=id->next)
+ for (id = lbarray[a]->first; id; id = id->next)
lib_indirect_test_id(id, lib);
}
}
@@ -1451,34 +1452,34 @@ void test_idbutton(char *name)
ID *idtest;
- lb= which_libbase(G.main, GS(name-2) );
- if (lb==NULL) return;
+ lb = which_libbase(G.main, GS(name - 2) );
+ if (lb == NULL) return;
/* search for id */
- idtest= BLI_findstring(lb, name, offsetof(ID, name) + 2);
+ idtest = BLI_findstring(lb, name, offsetof(ID, name) + 2);
- if (idtest) if ( new_id(lb, idtest, name)==0 ) id_sort_by_name(lb, idtest);
+ if (idtest) if (new_id(lb, idtest, name) == 0) id_sort_by_name(lb, idtest);
}
void text_idbutton(struct ID *id, char *text)
{
if (id) {
- if (GS(id->name)==ID_SCE)
+ if (GS(id->name) == ID_SCE)
strcpy(text, "SCE: ");
- else if (GS(id->name)==ID_SCR)
+ else if (GS(id->name) == ID_SCR)
strcpy(text, "SCR: ");
- else if (GS(id->name)==ID_MA && ((Material*)id)->use_nodes)
+ else if (GS(id->name) == ID_MA && ((Material *)id)->use_nodes)
strcpy(text, "NT: ");
else {
- text[0]= id->name[0];
- text[1]= id->name[1];
- text[2]= ':';
- text[3]= ' ';
- text[4]= 0;
+ text[0] = id->name[0];
+ text[1] = id->name[1];
+ text[2] = ':';
+ text[3] = ' ';
+ text[4] = 0;
}
}
else {
- text[0]= '\0';
+ text[0] = '\0';
}
}
@@ -1486,19 +1487,19 @@ void rename_id(ID *id, const char *name)
{
ListBase *lb;
- BLI_strncpy(id->name+2, name, sizeof(id->name)-2);
- lb= which_libbase(G.main, GS(id->name) );
+ BLI_strncpy(id->name + 2, name, sizeof(id->name) - 2);
+ lb = which_libbase(G.main, GS(id->name) );
new_id(lb, id, name);
}
void name_uiprefix_id(char *name, ID *id)
{
- name[0] = id->lib ? 'L':' ';
- name[1] = id->flag & LIB_FAKEUSER ? 'F': (id->us==0)?'0':' ';
+ name[0] = id->lib ? 'L' : ' ';
+ name[1] = id->flag & LIB_FAKEUSER ? 'F' : (id->us == 0) ? '0' : ' ';
name[2] = ' ';
- strcpy(name+3, id->name+2);
+ strcpy(name + 3, id->name + 2);
}
void BKE_library_filepath_set(Library *lib, const char *filepath)
@@ -1519,7 +1520,7 @@ void BKE_library_filepath_set(Library *lib, const char *filepath)
* outliner, and its not really supported but allow from here for now
* since making local could cause this to be directly linked - campbell
*/
- const char *basepath= lib->parent ? lib->parent->filepath : G.main->name;
+ const char *basepath = lib->parent ? lib->parent->filepath : G.main->name;
BLI_path_abs(lib->filepath, basepath);
}
}
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index 6d44282c60a..0eeb16be699 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -77,13 +77,13 @@ void init_def_material(void)
}
/* not material itself */
-void free_material(Material *ma)
+void BKE_material_free(Material *ma)
{
MTex *mtex;
int a;
- for (a=0; a<MAX_MTEX; a++) {
- mtex= ma->mtex[a];
+ for (a = 0; a < MAX_MTEX; a++) {
+ mtex = ma->mtex[a];
if (mtex && mtex->tex) mtex->tex->id.us--;
if (mtex) MEM_freeN(mtex);
}
@@ -95,7 +95,7 @@ void free_material(Material *ma)
if (ma->preview)
BKE_previewimg_free(&ma->preview);
- BKE_icon_delete((struct ID*)ma);
+ BKE_icon_delete((struct ID *)ma);
ma->id.icon_id = 0;
/* is no lib link block, but material extension */
@@ -110,67 +110,67 @@ void free_material(Material *ma)
void init_material(Material *ma)
{
- ma->r= ma->g= ma->b= ma->ref= 0.8;
- ma->specr= ma->specg= ma->specb= 1.0;
- ma->mirr= ma->mirg= ma->mirb= 1.0;
- ma->spectra= 1.0;
- ma->amb= 1.0;
- ma->alpha= 1.0;
- ma->spec= ma->hasize= 0.5;
- ma->har= 50;
- ma->starc= ma->ringc= 4;
- ma->linec= 12;
- ma->flarec= 1;
- ma->flaresize= ma->subsize= 1.0;
- ma->flareboost= 1;
- ma->seed2= 6;
- ma->friction= 0.5;
- ma->refrac= 4.0;
- ma->roughness= 0.5;
- ma->param[0]= 0.5;
- ma->param[1]= 0.1;
- ma->param[2]= 0.5;
- ma->param[3]= 0.1;
- ma->rms= 0.1;
- ma->darkness= 1.0;
-
- ma->strand_sta= ma->strand_end= 1.0f;
-
- ma->ang= 1.0;
- ma->ray_depth= 2;
- ma->ray_depth_tra= 2;
- ma->fresnel_mir= 0.0;
- ma->fresnel_tra= 0.0;
- ma->fresnel_tra_i= 1.25;
- ma->fresnel_mir_i= 1.25;
- ma->tx_limit= 0.0;
- ma->tx_falloff= 1.0;
- ma->shad_alpha= 1.0f;
-
- ma->gloss_mir = ma->gloss_tra= 1.0;
- ma->samp_gloss_mir = ma->samp_gloss_tra= 18;
+ ma->r = ma->g = ma->b = ma->ref = 0.8;
+ ma->specr = ma->specg = ma->specb = 1.0;
+ ma->mirr = ma->mirg = ma->mirb = 1.0;
+ ma->spectra = 1.0;
+ ma->amb = 1.0;
+ ma->alpha = 1.0;
+ ma->spec = ma->hasize = 0.5;
+ ma->har = 50;
+ ma->starc = ma->ringc = 4;
+ ma->linec = 12;
+ ma->flarec = 1;
+ ma->flaresize = ma->subsize = 1.0;
+ ma->flareboost = 1;
+ ma->seed2 = 6;
+ ma->friction = 0.5;
+ ma->refrac = 4.0;
+ ma->roughness = 0.5;
+ ma->param[0] = 0.5;
+ ma->param[1] = 0.1;
+ ma->param[2] = 0.5;
+ ma->param[3] = 0.1;
+ ma->rms = 0.1;
+ ma->darkness = 1.0;
+
+ ma->strand_sta = ma->strand_end = 1.0f;
+
+ ma->ang = 1.0;
+ ma->ray_depth = 2;
+ ma->ray_depth_tra = 2;
+ ma->fresnel_mir = 0.0;
+ ma->fresnel_tra = 0.0;
+ ma->fresnel_tra_i = 1.25;
+ ma->fresnel_mir_i = 1.25;
+ ma->tx_limit = 0.0;
+ ma->tx_falloff = 1.0;
+ ma->shad_alpha = 1.0f;
+
+ ma->gloss_mir = ma->gloss_tra = 1.0;
+ ma->samp_gloss_mir = ma->samp_gloss_tra = 18;
ma->adapt_thresh_mir = ma->adapt_thresh_tra = 0.005;
ma->dist_mir = 0.0;
ma->fadeto_mir = MA_RAYMIR_FADETOSKY;
- ma->rampfac_col= 1.0;
- ma->rampfac_spec= 1.0;
- ma->pr_lamp= 3; /* two lamps, is bits */
- ma->pr_type= MA_SPHERE;
-
- ma->sss_radius[0]= 1.0f;
- ma->sss_radius[1]= 1.0f;
- ma->sss_radius[2]= 1.0f;
- ma->sss_col[0]= 1.0f;
- ma->sss_col[1]= 1.0f;
- ma->sss_col[2]= 1.0f;
- ma->sss_error= 0.05f;
- ma->sss_scale= 0.1f;
- ma->sss_ior= 1.3f;
- ma->sss_colfac= 1.0f;
- ma->sss_texfac= 0.0f;
- ma->sss_front= 1.0f;
- ma->sss_back= 1.0f;
+ ma->rampfac_col = 1.0;
+ ma->rampfac_spec = 1.0;
+ ma->pr_lamp = 3; /* two lamps, is bits */
+ ma->pr_type = MA_SPHERE;
+
+ ma->sss_radius[0] = 1.0f;
+ ma->sss_radius[1] = 1.0f;
+ ma->sss_radius[2] = 1.0f;
+ ma->sss_col[0] = 1.0f;
+ ma->sss_col[1] = 1.0f;
+ ma->sss_col[2] = 1.0f;
+ ma->sss_error = 0.05f;
+ ma->sss_scale = 0.1f;
+ ma->sss_ior = 1.3f;
+ ma->sss_colfac = 1.0f;
+ ma->sss_texfac = 0.0f;
+ ma->sss_front = 1.0f;
+ ma->sss_back = 1.0f;
ma->vol.density = 1.0f;
ma->vol.emission = 0.0f;
@@ -191,19 +191,19 @@ void init_material(Material *ma)
ma->vol.ms_intensity = 1.f;
ma->game.flag = GEMAT_BACKCULL;
- ma->game.alpha_blend=0;
- ma->game.face_orientation=0;
+ ma->game.alpha_blend = 0;
+ ma->game.face_orientation = 0;
- ma->mode= MA_TRACEBLE|MA_SHADBUF|MA_SHADOW|MA_RAYBIAS|MA_TANGENT_STR|MA_ZTRANSP;
- ma->shade_flag= MA_APPROX_OCCLUSION;
+ ma->mode = MA_TRACEBLE | MA_SHADBUF | MA_SHADOW | MA_RAYBIAS | MA_TANGENT_STR | MA_ZTRANSP;
+ ma->shade_flag = MA_APPROX_OCCLUSION;
ma->preview = NULL;
}
-Material *add_material(const char *name)
+Material *BKE_material_add(const char *name)
{
Material *ma;
- ma= alloc_libblock(&G.main->mat, ID_MA, name);
+ ma = BKE_libblock_alloc(&G.main->mat, ID_MA, name);
init_material(ma);
@@ -211,33 +211,33 @@ Material *add_material(const char *name)
}
/* XXX keep synced with next function */
-Material *copy_material(Material *ma)
+Material *BKE_material_copy(Material *ma)
{
Material *man;
int a;
- man= copy_libblock(&ma->id);
+ man = BKE_libblock_copy(&ma->id);
id_lib_extern((ID *)man->group);
- for (a=0; a<MAX_MTEX; a++) {
+ for (a = 0; a < MAX_MTEX; a++) {
if (ma->mtex[a]) {
- man->mtex[a]= MEM_mallocN(sizeof(MTex), "copymaterial");
+ man->mtex[a] = MEM_mallocN(sizeof(MTex), "copymaterial");
memcpy(man->mtex[a], ma->mtex[a], sizeof(MTex));
id_us_plus((ID *)man->mtex[a]->tex);
}
}
- if (ma->ramp_col) man->ramp_col= MEM_dupallocN(ma->ramp_col);
- if (ma->ramp_spec) man->ramp_spec= MEM_dupallocN(ma->ramp_spec);
+ if (ma->ramp_col) man->ramp_col = MEM_dupallocN(ma->ramp_col);
+ if (ma->ramp_spec) man->ramp_spec = MEM_dupallocN(ma->ramp_spec);
if (ma->preview) man->preview = BKE_previewimg_copy(ma->preview);
if (ma->nodetree) {
- man->nodetree= ntreeCopyTree(ma->nodetree); /* 0 == full new tree */
+ man->nodetree = ntreeCopyTree(ma->nodetree); /* 0 == full new tree */
}
- man->gpumaterial.first= man->gpumaterial.last= NULL;
+ man->gpumaterial.first = man->gpumaterial.last = NULL;
return man;
}
@@ -248,26 +248,26 @@ Material *localize_material(Material *ma)
Material *man;
int a;
- man= copy_libblock(&ma->id);
+ man = BKE_libblock_copy(&ma->id);
BLI_remlink(&G.main->mat, man);
/* no increment for texture ID users, in previewrender.c it prevents decrement */
- for (a=0; a<MAX_MTEX; a++) {
+ for (a = 0; a < MAX_MTEX; a++) {
if (ma->mtex[a]) {
- man->mtex[a]= MEM_mallocN(sizeof(MTex), "copymaterial");
+ man->mtex[a] = MEM_mallocN(sizeof(MTex), "copymaterial");
memcpy(man->mtex[a], ma->mtex[a], sizeof(MTex));
}
}
- if (ma->ramp_col) man->ramp_col= MEM_dupallocN(ma->ramp_col);
- if (ma->ramp_spec) man->ramp_spec= MEM_dupallocN(ma->ramp_spec);
+ if (ma->ramp_col) man->ramp_col = MEM_dupallocN(ma->ramp_col);
+ if (ma->ramp_spec) man->ramp_spec = MEM_dupallocN(ma->ramp_spec);
man->preview = NULL;
if (ma->nodetree)
- man->nodetree= ntreeLocalize(ma->nodetree);
+ man->nodetree = ntreeLocalize(ma->nodetree);
- man->gpumaterial.first= man->gpumaterial.last= NULL;
+ man->gpumaterial.first = man->gpumaterial.last = NULL;
return man;
}
@@ -275,29 +275,29 @@ Material *localize_material(Material *ma)
static void extern_local_material(Material *ma)
{
int i;
- for (i=0; i < MAX_MTEX; i++) {
+ for (i = 0; i < MAX_MTEX; i++) {
if (ma->mtex[i]) id_lib_extern((ID *)ma->mtex[i]->tex);
}
}
-void make_local_material(Material *ma)
+void BKE_material_make_local(Material *ma)
{
- Main *bmain= G.main;
+ Main *bmain = G.main;
Object *ob;
Mesh *me;
Curve *cu;
MetaBall *mb;
- int a, is_local= FALSE, is_lib= FALSE;
+ int a, is_local = FALSE, is_lib = FALSE;
/* - only lib users: do nothing
* - only local users: set flag
* - mixed: make copy
*/
- if (ma->id.lib==NULL) return;
+ if (ma->id.lib == NULL) return;
/* One local user; set flag and return. */
- if (ma->id.us==1) {
+ if (ma->id.us == 1) {
id_clear_lib_data(bmain, &ma->id);
extern_local_material(ma);
return;
@@ -306,56 +306,56 @@ void make_local_material(Material *ma)
/* Check which other IDs reference this one to determine if it's used by
* lib or local */
/* test objects */
- ob= bmain->object.first;
+ ob = bmain->object.first;
while (ob) {
if (ob->mat) {
- for (a=0; a<ob->totcol; a++) {
- if (ob->mat[a]==ma) {
- if (ob->id.lib) is_lib= TRUE;
- else is_local= TRUE;
+ for (a = 0; a < ob->totcol; a++) {
+ if (ob->mat[a] == ma) {
+ if (ob->id.lib) is_lib = TRUE;
+ else is_local = TRUE;
}
}
}
- ob= ob->id.next;
+ ob = ob->id.next;
}
/* test meshes */
- me= bmain->mesh.first;
+ me = bmain->mesh.first;
while (me) {
if (me->mat) {
- for (a=0; a<me->totcol; a++) {
- if (me->mat[a]==ma) {
- if (me->id.lib) is_lib= TRUE;
- else is_local= TRUE;
+ for (a = 0; a < me->totcol; a++) {
+ if (me->mat[a] == ma) {
+ if (me->id.lib) is_lib = TRUE;
+ else is_local = TRUE;
}
}
}
- me= me->id.next;
+ me = me->id.next;
}
/* test curves */
- cu= bmain->curve.first;
+ cu = bmain->curve.first;
while (cu) {
if (cu->mat) {
- for (a=0; a<cu->totcol; a++) {
- if (cu->mat[a]==ma) {
- if (cu->id.lib) is_lib= TRUE;
- else is_local= TRUE;
+ for (a = 0; a < cu->totcol; a++) {
+ if (cu->mat[a] == ma) {
+ if (cu->id.lib) is_lib = TRUE;
+ else is_local = TRUE;
}
}
}
- cu= cu->id.next;
+ cu = cu->id.next;
}
/* test mballs */
- mb= bmain->mball.first;
+ mb = bmain->mball.first;
while (mb) {
if (mb->mat) {
- for (a=0; a<mb->totcol; a++) {
- if (mb->mat[a]==ma) {
- if (mb->id.lib) is_lib= TRUE;
- else is_local= TRUE;
+ for (a = 0; a < mb->totcol; a++) {
+ if (mb->mat[a] == ma) {
+ if (mb->id.lib) is_lib = TRUE;
+ else is_local = TRUE;
}
}
}
- mb= mb->id.next;
+ mb = mb->id.next;
}
/* Only local users. */
@@ -365,76 +365,76 @@ void make_local_material(Material *ma)
}
/* Both user and local, so copy. */
else if (is_local && is_lib) {
- Material *ma_new= copy_material(ma);
+ Material *ma_new = BKE_material_copy(ma);
- ma_new->id.us= 0;
+ ma_new->id.us = 0;
/* Remap paths of new ID using old library as base. */
BKE_id_lib_local_paths(bmain, ma->id.lib, &ma_new->id);
/* do objects */
- ob= bmain->object.first;
+ ob = bmain->object.first;
while (ob) {
if (ob->mat) {
- for (a=0; a<ob->totcol; a++) {
- if (ob->mat[a]==ma) {
- if (ob->id.lib==NULL) {
- ob->mat[a]= ma_new;
+ for (a = 0; a < ob->totcol; a++) {
+ if (ob->mat[a] == ma) {
+ if (ob->id.lib == NULL) {
+ ob->mat[a] = ma_new;
ma_new->id.us++;
ma->id.us--;
}
}
}
}
- ob= ob->id.next;
+ ob = ob->id.next;
}
/* do meshes */
- me= bmain->mesh.first;
+ me = bmain->mesh.first;
while (me) {
if (me->mat) {
- for (a=0; a<me->totcol; a++) {
- if (me->mat[a]==ma) {
- if (me->id.lib==NULL) {
- me->mat[a]= ma_new;
+ for (a = 0; a < me->totcol; a++) {
+ if (me->mat[a] == ma) {
+ if (me->id.lib == NULL) {
+ me->mat[a] = ma_new;
ma_new->id.us++;
ma->id.us--;
}
}
}
}
- me= me->id.next;
+ me = me->id.next;
}
/* do curves */
- cu= bmain->curve.first;
+ cu = bmain->curve.first;
while (cu) {
if (cu->mat) {
- for (a=0; a<cu->totcol; a++) {
- if (cu->mat[a]==ma) {
- if (cu->id.lib==NULL) {
- cu->mat[a]= ma_new;
+ for (a = 0; a < cu->totcol; a++) {
+ if (cu->mat[a] == ma) {
+ if (cu->id.lib == NULL) {
+ cu->mat[a] = ma_new;
ma_new->id.us++;
ma->id.us--;
}
}
}
}
- cu= cu->id.next;
+ cu = cu->id.next;
}
/* do mballs */
- mb= bmain->mball.first;
+ mb = bmain->mball.first;
while (mb) {
if (mb->mat) {
- for (a=0; a<mb->totcol; a++) {
- if (mb->mat[a]==ma) {
- if (mb->id.lib==NULL) {
- mb->mat[a]= ma_new;
+ for (a = 0; a < mb->totcol; a++) {
+ if (mb->mat[a] == ma) {
+ if (mb->id.lib == NULL) {
+ mb->mat[a] = ma_new;
ma_new->id.us++;
ma->id.us--;
}
}
}
}
- mb= mb->id.next;
+ mb = mb->id.next;
}
}
}
@@ -443,7 +443,7 @@ void make_local_material(Material *ma)
void extern_local_matarar(struct Material **matar, short totcol)
{
short i;
- for (i= 0; i < totcol; i++) {
+ for (i = 0; i < totcol; i++) {
id_lib_extern((ID *)matar[i]);
}
}
@@ -454,16 +454,16 @@ Material ***give_matarar(Object *ob)
Curve *cu;
MetaBall *mb;
- if (ob->type==OB_MESH) {
- me= ob->data;
+ if (ob->type == OB_MESH) {
+ me = ob->data;
return &(me->mat);
}
else if (ELEM3(ob->type, OB_CURVE, OB_FONT, OB_SURF)) {
- cu= ob->data;
+ cu = ob->data;
return &(cu->mat);
}
- else if (ob->type==OB_MBALL) {
- mb= ob->data;
+ else if (ob->type == OB_MBALL) {
+ mb = ob->data;
return &(mb->mat);
}
return NULL;
@@ -475,16 +475,16 @@ short *give_totcolp(Object *ob)
Curve *cu;
MetaBall *mb;
- if (ob->type==OB_MESH) {
- me= ob->data;
+ if (ob->type == OB_MESH) {
+ me = ob->data;
return &(me->totcol);
}
else if (ELEM3(ob->type, OB_CURVE, OB_FONT, OB_SURF)) {
- cu= ob->data;
+ cu = ob->data;
return &(cu->totcol);
}
- else if (ob->type==OB_MBALL) {
- mb= ob->data;
+ else if (ob->type == OB_MBALL) {
+ mb = ob->data;
return &(mb->totcol);
}
return NULL;
@@ -493,62 +493,62 @@ short *give_totcolp(Object *ob)
/* same as above but for ID's */
Material ***give_matarar_id(ID *id)
{
- switch(GS(id->name)) {
- case ID_ME:
- return &(((Mesh *)id)->mat);
- break;
- case ID_CU:
- return &(((Curve *)id)->mat);
- break;
- case ID_MB:
- return &(((MetaBall *)id)->mat);
- break;
+ switch (GS(id->name)) {
+ case ID_ME:
+ return &(((Mesh *)id)->mat);
+ break;
+ case ID_CU:
+ return &(((Curve *)id)->mat);
+ break;
+ case ID_MB:
+ return &(((MetaBall *)id)->mat);
+ break;
}
return NULL;
}
short *give_totcolp_id(ID *id)
{
- switch(GS(id->name)) {
- case ID_ME:
- return &(((Mesh *)id)->totcol);
- break;
- case ID_CU:
- return &(((Curve *)id)->totcol);
- break;
- case ID_MB:
- return &(((MetaBall *)id)->totcol);
- break;
+ switch (GS(id->name)) {
+ case ID_ME:
+ return &(((Mesh *)id)->totcol);
+ break;
+ case ID_CU:
+ return &(((Curve *)id)->totcol);
+ break;
+ case ID_MB:
+ return &(((MetaBall *)id)->totcol);
+ break;
}
return NULL;
}
static void data_delete_material_index_id(ID *id, short index)
{
- switch(GS(id->name)) {
- case ID_ME:
- mesh_delete_material_index((Mesh *)id, index);
- break;
- case ID_CU:
- curve_delete_material_index((Curve *)id, index);
- break;
- case ID_MB:
- /* meta-elems don't have materials atm */
- break;
+ switch (GS(id->name)) {
+ case ID_ME:
+ BKE_mesh_delete_material_index((Mesh *)id, index);
+ break;
+ case ID_CU:
+ BKE_curve_delete_material_index((Curve *)id, index);
+ break;
+ case ID_MB:
+ /* meta-elems don't have materials atm */
+ break;
}
}
void material_append_id(ID *id, Material *ma)
{
Material ***matar;
- if ((matar= give_matarar_id(id))) {
- short *totcol= give_totcolp_id(id);
- Material **mat= MEM_callocN(sizeof(void *) * ((*totcol) + 1), "newmatar");
+ if ((matar = give_matarar_id(id))) {
+ short *totcol = give_totcolp_id(id);
+ Material **mat = MEM_callocN(sizeof(void *) * ((*totcol) + 1), "newmatar");
if (*totcol) memcpy(mat, *matar, sizeof(void *) * (*totcol));
if (*matar) MEM_freeN(*matar);
- *matar= mat;
- (*matar)[(*totcol)++]= ma;
+ *matar = mat;
+ (*matar)[(*totcol)++] = ma;
id_us_plus((ID *)ma);
test_object_materials(id);
@@ -557,33 +557,33 @@ void material_append_id(ID *id, Material *ma)
Material *material_pop_id(ID *id, int index_i, int remove_material_slot)
{
- short index= (short)index_i;
- Material *ret= NULL;
+ short index = (short)index_i;
+ Material *ret = NULL;
Material ***matar;
- if ((matar= give_matarar_id(id))) {
- short *totcol= give_totcolp_id(id);
+ if ((matar = give_matarar_id(id))) {
+ short *totcol = give_totcolp_id(id);
if (index >= 0 && index < (*totcol)) {
- ret= (*matar)[index];
+ ret = (*matar)[index];
id_us_min((ID *)ret);
if (remove_material_slot) {
if (*totcol <= 1) {
- *totcol= 0;
+ *totcol = 0;
MEM_freeN(*matar);
- *matar= NULL;
+ *matar = NULL;
}
else {
Material **mat;
if (index + 1 != (*totcol))
- memmove((*matar)+index, (*matar)+(index+1), sizeof(void *) * ((*totcol) - (index + 1)));
+ memmove((*matar) + index, (*matar) + (index + 1), sizeof(void *) * ((*totcol) - (index + 1)));
(*totcol)--;
- mat= MEM_callocN(sizeof(void *) * (*totcol), "newmatar");
+ mat = MEM_callocN(sizeof(void *) * (*totcol), "newmatar");
memcpy(mat, *matar, sizeof(void *) * (*totcol));
MEM_freeN(*matar);
- *matar= mat;
+ *matar = mat;
test_object_materials(id);
}
@@ -593,7 +593,7 @@ Material *material_pop_id(ID *id, int index_i, int remove_material_slot)
/* don't remove material slot, only clear it*/
else
- (*matar)[index]= NULL;
+ (*matar)[index] = NULL;
}
}
@@ -605,33 +605,33 @@ Material *give_current_material(Object *ob, short act)
Material ***matarar, *ma;
short *totcolp;
- if (ob==NULL) return NULL;
+ if (ob == NULL) return NULL;
/* if object cannot have material, totcolp==NULL */
- totcolp= give_totcolp(ob);
- if (totcolp==NULL || ob->totcol==0) return NULL;
+ totcolp = give_totcolp(ob);
+ if (totcolp == NULL || ob->totcol == 0) return NULL;
- if (act<0) {
+ if (act < 0) {
printf("no!\n");
}
- if (act>ob->totcol) act= ob->totcol;
- else if (act<=0) act= 1;
+ if (act > ob->totcol) act = ob->totcol;
+ else if (act <= 0) act = 1;
- if (ob->matbits && ob->matbits[act-1]) { /* in object */
- ma= ob->mat[act-1];
+ if (ob->matbits && ob->matbits[act - 1]) { /* in object */
+ ma = ob->mat[act - 1];
}
- else { /* in data */
+ else { /* in data */
/* check for inconsistency */
if (*totcolp < ob->totcol)
- ob->totcol= *totcolp;
- if (act>ob->totcol) act= ob->totcol;
+ ob->totcol = *totcolp;
+ if (act > ob->totcol) act = ob->totcol;
- matarar= give_matarar(ob);
+ matarar = give_matarar(ob);
- if (matarar && *matarar) ma= (*matarar)[act-1];
- else ma= NULL;
+ if (matarar && *matarar) ma = (*matarar)[act - 1];
+ else ma = NULL;
}
@@ -641,19 +641,19 @@ Material *give_current_material(Object *ob, short act)
ID *material_from(Object *ob, short act)
{
- if (ob==NULL) return NULL;
+ if (ob == NULL) return NULL;
- if (ob->totcol==0) return ob->data;
- if (act==0) act= 1;
+ if (ob->totcol == 0) return ob->data;
+ if (act == 0) act = 1;
- if (ob->matbits[act-1]) return (ID *)ob;
+ if (ob->matbits[act - 1]) return (ID *)ob;
else return ob->data;
}
Material *give_node_material(Material *ma)
{
if (ma && ma->use_nodes && ma->nodetree) {
- bNode *node= nodeGetActiveID(ma->nodetree, ID_MA);
+ bNode *node = nodeGetActiveID(ma->nodetree, ID_MA);
if (node)
return (Material *)node->id;
@@ -670,7 +670,7 @@ Material *give_node_material(Material *ma)
* well. I expect we'll sort it out soon... */
/* from blendef: */
-#define GS(a) (*((short *)(a)))
+#define GS(a) (*((short *)(a)))
/* from misc_util: flip the bytes from x */
/* #define GS(x) (((unsigned char *)(x))[0] << 8 | ((unsigned char *)(x))[1]) */
@@ -680,29 +680,29 @@ void resize_object_material(Object *ob, const short totcol)
Material **newmatar;
char *newmatbits;
- if (totcol==0) {
+ if (totcol == 0) {
if (ob->totcol) {
MEM_freeN(ob->mat);
MEM_freeN(ob->matbits);
- ob->mat= NULL;
- ob->matbits= NULL;
+ ob->mat = NULL;
+ ob->matbits = NULL;
}
}
- else if (ob->totcol<totcol) {
- newmatar= MEM_callocN(sizeof(void *)*totcol, "newmatar");
- newmatbits= MEM_callocN(sizeof(char)*totcol, "newmatbits");
+ else if (ob->totcol < totcol) {
+ newmatar = MEM_callocN(sizeof(void *) * totcol, "newmatar");
+ newmatbits = MEM_callocN(sizeof(char) * totcol, "newmatbits");
if (ob->totcol) {
- memcpy(newmatar, ob->mat, sizeof(void *)*ob->totcol);
- memcpy(newmatbits, ob->matbits, sizeof(char)*ob->totcol);
+ memcpy(newmatar, ob->mat, sizeof(void *) * ob->totcol);
+ memcpy(newmatbits, ob->matbits, sizeof(char) * ob->totcol);
MEM_freeN(ob->mat);
MEM_freeN(ob->matbits);
}
- ob->mat= newmatar;
- ob->matbits= newmatbits;
+ ob->mat = newmatar;
+ ob->matbits = newmatbits;
}
- ob->totcol= totcol;
- if (ob->totcol && ob->actcol==0) ob->actcol= 1;
- if (ob->actcol>ob->totcol) ob->actcol= ob->totcol;
+ ob->totcol = totcol;
+ if (ob->totcol && ob->actcol == 0) ob->actcol = 1;
+ if (ob->actcol > ob->totcol) ob->actcol = ob->totcol;
}
void test_object_materials(ID *id)
@@ -711,12 +711,12 @@ void test_object_materials(ID *id)
Object *ob;
short *totcol;
- if (id==NULL || (totcol=give_totcolp_id(id))==NULL) {
+ if (id == NULL || (totcol = give_totcolp_id(id)) == NULL) {
return;
}
- for (ob= G.main->object.first; ob; ob= ob->id.next) {
- if (ob->data==id) {
+ for (ob = G.main->object.first; ob; ob = ob->id.next) {
+ if (ob->data == id) {
resize_object_material(ob, *totcol);
}
}
@@ -727,8 +727,8 @@ void assign_material_id(ID *id, Material *ma, short act)
Material *mao, **matar, ***matarar;
short *totcolp;
- if (act>MAXMAT) return;
- if (act<1) act= 1;
+ if (act > MAXMAT) return;
+ if (act < 1) act = 1;
/* prevent crashing when using accidentally */
BLI_assert(id->lib == NULL);
@@ -736,27 +736,27 @@ void assign_material_id(ID *id, Material *ma, short act)
/* test arraylens */
- totcolp= give_totcolp_id(id);
- matarar= give_matarar_id(id);
+ totcolp = give_totcolp_id(id);
+ matarar = give_matarar_id(id);
- if (totcolp==NULL || matarar==NULL) return;
+ if (totcolp == NULL || matarar == NULL) return;
if (act > *totcolp) {
- matar= MEM_callocN(sizeof(void *)*act, "matarray1");
+ matar = MEM_callocN(sizeof(void *) * act, "matarray1");
if (*totcolp) {
- memcpy(matar, *matarar, sizeof(void *)*(*totcolp));
+ memcpy(matar, *matarar, sizeof(void *) * (*totcolp));
MEM_freeN(*matarar);
}
- *matarar= matar;
- *totcolp= act;
+ *matarar = matar;
+ *totcolp = act;
}
/* in data */
- mao= (*matarar)[act-1];
+ mao = (*matarar)[act - 1];
if (mao) mao->id.us--;
- (*matarar)[act-1]= ma;
+ (*matarar)[act - 1] = ma;
if (ma)
id_us_plus((ID *)ma);
@@ -770,8 +770,8 @@ void assign_material(Object *ob, Material *ma, short act)
char *matbits;
short *totcolp;
- if (act>MAXMAT) return;
- if (act<1) act= 1;
+ if (act > MAXMAT) return;
+ if (act < 1) act = 1;
/* prevent crashing when using accidentally */
BLI_assert(ob->id.lib == NULL);
@@ -779,54 +779,54 @@ void assign_material(Object *ob, Material *ma, short act)
/* test arraylens */
- totcolp= give_totcolp(ob);
- matarar= give_matarar(ob);
+ totcolp = give_totcolp(ob);
+ matarar = give_matarar(ob);
- if (totcolp==NULL || matarar==NULL) return;
+ if (totcolp == NULL || matarar == NULL) return;
if (act > *totcolp) {
- matar= MEM_callocN(sizeof(void *)*act, "matarray1");
+ matar = MEM_callocN(sizeof(void *) * act, "matarray1");
if (*totcolp) {
- memcpy(matar, *matarar, sizeof(void *)*(*totcolp));
+ memcpy(matar, *matarar, sizeof(void *) * (*totcolp));
MEM_freeN(*matarar);
}
- *matarar= matar;
- *totcolp= act;
+ *matarar = matar;
+ *totcolp = act;
}
if (act > ob->totcol) {
- matar= MEM_callocN(sizeof(void *)*act, "matarray2");
- matbits= MEM_callocN(sizeof(char)*act, "matbits1");
- if ( ob->totcol) {
- memcpy(matar, ob->mat, sizeof(void *)*( ob->totcol ));
- memcpy(matbits, ob->matbits, sizeof(char)*(*totcolp));
+ matar = MEM_callocN(sizeof(void *) * act, "matarray2");
+ matbits = MEM_callocN(sizeof(char) * act, "matbits1");
+ if (ob->totcol) {
+ memcpy(matar, ob->mat, sizeof(void *) * ob->totcol);
+ memcpy(matbits, ob->matbits, sizeof(char) * (*totcolp));
MEM_freeN(ob->mat);
MEM_freeN(ob->matbits);
}
- ob->mat= matar;
- ob->matbits= matbits;
- ob->totcol= act;
+ ob->mat = matar;
+ ob->matbits = matbits;
+ ob->totcol = act;
/* copy object/mesh linking, or assign based on userpref */
if (ob->actcol)
- ob->matbits[act-1]= ob->matbits[ob->actcol-1];
+ ob->matbits[act - 1] = ob->matbits[ob->actcol - 1];
else
- ob->matbits[act-1]= (U.flag & USER_MAT_ON_OB)? 1: 0;
+ ob->matbits[act - 1] = (U.flag & USER_MAT_ON_OB) ? 1 : 0;
}
/* do it */
- if (ob->matbits[act-1]) { /* in object */
- mao= ob->mat[act-1];
+ if (ob->matbits[act - 1]) { /* in object */
+ mao = ob->mat[act - 1];
if (mao) mao->id.us--;
- ob->mat[act-1]= ma;
+ ob->mat[act - 1] = ma;
}
- else { /* in data */
- mao= (*matarar)[act-1];
+ else { /* in data */
+ mao = (*matarar)[act - 1];
if (mao) mao->id.us--;
- (*matarar)[act-1]= ma;
+ (*matarar)[act - 1] = ma;
}
if (ma)
@@ -837,19 +837,19 @@ void assign_material(Object *ob, Material *ma, short act)
/* XXX - this calls many more update calls per object then are needed, could be optimized */
void assign_matarar(struct Object *ob, struct Material ***matar, short totcol)
{
- int actcol_orig= ob->actcol;
+ int actcol_orig = ob->actcol;
short i;
while (object_remove_material_slot(ob)) {};
/* now we have the right number of slots */
- for (i=0; i<totcol; i++)
- assign_material(ob, (*matar)[i], i+1);
+ for (i = 0; i < totcol; i++)
+ assign_material(ob, (*matar)[i], i + 1);
if (actcol_orig > ob->totcol)
- actcol_orig= ob->totcol;
+ actcol_orig = ob->totcol;
- ob->actcol= actcol_orig;
+ ob->actcol = actcol_orig;
}
@@ -858,45 +858,45 @@ short find_material_index(Object *ob, Material *ma)
Material ***matarar;
short a, *totcolp;
- if (ma==NULL) return 0;
+ if (ma == NULL) return 0;
- totcolp= give_totcolp(ob);
- matarar= give_matarar(ob);
+ totcolp = give_totcolp(ob);
+ matarar = give_matarar(ob);
- if (totcolp==NULL || matarar==NULL) return 0;
+ if (totcolp == NULL || matarar == NULL) return 0;
- for (a=0; a<*totcolp; a++)
- if ((*matarar)[a]==ma)
- break;
- if (a<*totcolp)
- return a+1;
+ for (a = 0; a < *totcolp; a++)
+ if ((*matarar)[a] == ma)
+ break;
+ if (a < *totcolp)
+ return a + 1;
return 0;
}
int object_add_material_slot(Object *ob)
{
- if (ob==NULL) return FALSE;
- if (ob->totcol>=MAXMAT) return FALSE;
+ if (ob == NULL) return FALSE;
+ if (ob->totcol >= MAXMAT) return FALSE;
- assign_material(ob, NULL, ob->totcol+1);
- ob->actcol= ob->totcol;
+ assign_material(ob, NULL, ob->totcol + 1);
+ ob->actcol = ob->totcol;
return TRUE;
}
static void do_init_render_material(Material *ma, int r_mode, float *amb)
{
MTex *mtex;
- int a, needuv=0, needtang=0;
+ int a, needuv = 0, needtang = 0;
- if (ma->flarec==0) ma->flarec= 1;
+ if (ma->flarec == 0) ma->flarec = 1;
/* add all texcoflags from mtex, texco and mapto were cleared in advance */
- for (a=0; a<MAX_MTEX; a++) {
+ for (a = 0; a < MAX_MTEX; a++) {
/* separate tex switching */
- if (ma->septex & (1<<a)) continue;
+ if (ma->septex & (1 << a)) continue;
- mtex= ma->mtex[a];
+ mtex = ma->mtex[a];
if (mtex && mtex->tex && (mtex->tex->type | (mtex->tex->use_nodes && mtex->tex->nodetree) )) {
ma->texco |= mtex->texco;
@@ -904,41 +904,41 @@ static void do_init_render_material(Material *ma, int r_mode, float *amb)
/* always get derivatives for these textures */
if (ELEM3(mtex->tex->type, TEX_IMAGE, TEX_PLUGIN, TEX_ENVMAP)) ma->texco |= TEXCO_OSA;
- else if (mtex->texflag & (MTEX_COMPAT_BUMP|MTEX_3TAP_BUMP|MTEX_5TAP_BUMP|MTEX_BICUBIC_BUMP)) ma->texco |= TEXCO_OSA;
+ else if (mtex->texflag & (MTEX_COMPAT_BUMP | MTEX_3TAP_BUMP | MTEX_5TAP_BUMP | MTEX_BICUBIC_BUMP)) ma->texco |= TEXCO_OSA;
- if (ma->texco & (TEXCO_ORCO|TEXCO_REFL|TEXCO_NORM|TEXCO_STRAND|TEXCO_STRESS)) needuv= 1;
- else if (ma->texco & (TEXCO_GLOB|TEXCO_UV|TEXCO_OBJECT|TEXCO_SPEED)) needuv= 1;
- else if (ma->texco & (TEXCO_LAVECTOR|TEXCO_VIEW|TEXCO_STICKY)) needuv= 1;
+ if (ma->texco & (TEXCO_ORCO | TEXCO_REFL | TEXCO_NORM | TEXCO_STRAND | TEXCO_STRESS)) needuv = 1;
+ else if (ma->texco & (TEXCO_GLOB | TEXCO_UV | TEXCO_OBJECT | TEXCO_SPEED)) needuv = 1;
+ else if (ma->texco & (TEXCO_LAVECTOR | TEXCO_VIEW | TEXCO_STICKY)) needuv = 1;
if ((ma->mapto & MAP_NORM) && (mtex->normapspace == MTEX_NSPACE_TANGENT))
- needtang= 1;
+ needtang = 1;
}
}
if (needtang) ma->mode |= MA_NORMAP_TANG;
else ma->mode &= ~MA_NORMAP_TANG;
- if (ma->mode & (MA_VERTEXCOL|MA_VERTEXCOLP|MA_FACETEXTURE)) {
- needuv= 1;
- if (r_mode & R_OSA) ma->texco |= TEXCO_OSA; /* for texfaces */
+ if (ma->mode & (MA_VERTEXCOL | MA_VERTEXCOLP | MA_FACETEXTURE)) {
+ needuv = 1;
+ if (r_mode & R_OSA) ma->texco |= TEXCO_OSA; /* for texfaces */
}
if (needuv) ma->texco |= NEED_UV;
/* since the raytracer doesnt recalc O structs for each ray, we have to preset them all */
if (r_mode & R_RAYTRACE) {
- if ((ma->mode & (MA_RAYMIRROR|MA_SHADOW_TRA)) || ((ma->mode & MA_TRANSP) && (ma->mode & MA_RAYTRANSP))) {
- ma->texco |= NEED_UV|TEXCO_ORCO|TEXCO_REFL|TEXCO_NORM;
+ if ((ma->mode & (MA_RAYMIRROR | MA_SHADOW_TRA)) || ((ma->mode & MA_TRANSP) && (ma->mode & MA_RAYTRANSP))) {
+ ma->texco |= NEED_UV | TEXCO_ORCO | TEXCO_REFL | TEXCO_NORM;
if (r_mode & R_OSA) ma->texco |= TEXCO_OSA;
}
}
if (amb) {
- ma->ambr= ma->amb*amb[0];
- ma->ambg= ma->amb*amb[1];
- ma->ambb= ma->amb*amb[2];
+ ma->ambr = ma->amb * amb[0];
+ ma->ambg = ma->amb * amb[1];
+ ma->ambb = ma->amb * amb[2];
}
/* will become or-ed result of all node modes */
- ma->mode_l= ma->mode;
+ ma->mode_l = ma->mode;
ma->mode_l &= ~MA_SHLESS;
if (ma->strand_surfnor > 0.0f)
@@ -953,17 +953,17 @@ static void init_render_nodetree(bNodeTree *ntree, Material *basemat, int r_mode
{
bNode *node;
- for (node=ntree->nodes.first; node; node= node->next) {
+ for (node = ntree->nodes.first; node; node = node->next) {
if (node->id) {
- if (GS(node->id->name)==ID_MA) {
- Material *ma= (Material *)node->id;
- if (ma!=basemat) {
+ if (GS(node->id->name) == ID_MA) {
+ Material *ma = (Material *)node->id;
+ if (ma != basemat) {
do_init_render_material(ma, r_mode, amb);
basemat->texco |= ma->texco;
- basemat->mode_l |= ma->mode_l & ~(MA_TRANSP|MA_ZTRANSP|MA_RAYTRANSP);
+ basemat->mode_l |= ma->mode_l & ~(MA_TRANSP | MA_ZTRANSP | MA_RAYTRANSP);
}
}
- else if (node->type==NODE_GROUP)
+ else if (node->type == NODE_GROUP)
init_render_nodetree((bNodeTree *)node->id, basemat, r_mode, amb);
}
}
@@ -989,15 +989,15 @@ void init_render_materials(Main *bmain, int r_mode, float *amb)
/* clear these flags before going over materials, to make sure they
* are cleared only once, otherwise node materials contained in other
* node materials can go wrong */
- for (ma= bmain->mat.first; ma; ma= ma->id.next) {
+ for (ma = bmain->mat.first; ma; ma = ma->id.next) {
if (ma->id.us) {
- ma->texco= 0;
- ma->mapto= 0;
+ ma->texco = 0;
+ ma->mapto = 0;
}
}
/* two steps, first initialize, then or the flags for layers */
- for (ma= bmain->mat.first; ma; ma= ma->id.next) {
+ for (ma = bmain->mat.first; ma; ma = ma->id.next) {
/* is_used flag comes back in convertblender.c */
ma->flag &= ~MA_IS_USED;
if (ma->id.us)
@@ -1019,7 +1019,7 @@ void end_render_material(Material *mat)
void end_render_materials(Main *bmain)
{
Material *ma;
- for (ma= bmain->mat.first; ma; ma= ma->id.next)
+ for (ma = bmain->mat.first; ma; ma = ma->id.next)
if (ma->id.us)
end_render_material(ma);
}
@@ -1028,13 +1028,13 @@ static int material_in_nodetree(bNodeTree *ntree, Material *mat)
{
bNode *node;
- for (node=ntree->nodes.first; node; node= node->next) {
- if (node->id && GS(node->id->name)==ID_MA) {
- if (node->id==(ID*)mat)
+ for (node = ntree->nodes.first; node; node = node->next) {
+ if (node->id && GS(node->id->name) == ID_MA) {
+ if (node->id == (ID *)mat)
return 1;
}
- else if (node->type==NODE_GROUP)
- if (material_in_nodetree((bNodeTree*)node->id, mat))
+ else if (node->type == NODE_GROUP)
+ if (material_in_nodetree((bNodeTree *)node->id, mat))
return 1;
}
@@ -1043,7 +1043,7 @@ static int material_in_nodetree(bNodeTree *ntree, Material *mat)
int material_in_material(Material *parmat, Material *mat)
{
- if (parmat==mat)
+ if (parmat == mat)
return 1;
else if (parmat->nodetree && parmat->use_nodes)
return material_in_nodetree(parmat->nodetree, mat);
@@ -1054,31 +1054,31 @@ int material_in_material(Material *parmat, Material *mat)
/* ****************** */
#if 0 /* UNUSED */
static char colname_array[125][20]= {
-"Black","DarkRed","HalfRed","Red","Red",
-"DarkGreen","DarkOlive","Brown","Chocolate","OrangeRed",
-"HalfGreen","GreenOlive","DryOlive","Goldenrod","DarkOrange",
-"LightGreen","Chartreuse","YellowGreen","Yellow","Gold",
-"Green","LawnGreen","GreenYellow","LightOlive","Yellow",
-"DarkBlue","DarkPurple","HotPink","VioletPink","RedPink",
-"SlateGray","DarkGrey","PalePurple","IndianRed","Tomato",
-"SeaGreen","PaleGreen","GreenKhaki","LightBrown","LightSalmon",
-"SpringGreen","PaleGreen","MediumOlive","YellowBrown","LightGold",
-"LightGreen","LightGreen","LightGreen","GreenYellow","PaleYellow",
-"HalfBlue","DarkSky","HalfMagenta","VioletRed","DeepPink",
-"SteelBlue","SkyBlue","Orchid","LightHotPink","HotPink",
-"SeaGreen","SlateGray","MediumGrey","Burlywood","LightPink",
-"SpringGreen","Aquamarine","PaleGreen","Khaki","PaleOrange",
-"SpringGreen","SeaGreen","PaleGreen","PaleWhite","YellowWhite",
-"LightBlue","Purple","MediumOrchid","Magenta","Magenta",
-"RoyalBlue","SlateBlue","MediumOrchid","Orchid","Magenta",
-"DeepSkyBlue","LightSteelBlue","LightSkyBlue","Violet","LightPink",
-"Cyan","DarkTurquoise","SkyBlue","Grey","Snow",
-"Mint","Mint","Aquamarine","MintCream","Ivory",
-"Blue","Blue","DarkMagenta","DarkOrchid","Magenta",
-"SkyBlue","RoyalBlue","LightSlateBlue","MediumOrchid","Magenta",
-"DodgerBlue","SteelBlue","MediumPurple","PalePurple","Plum",
-"DeepSkyBlue","PaleBlue","LightSkyBlue","PalePurple","Thistle",
-"Cyan","ColdBlue","PaleTurquoise","GhostWhite","White"
+"Black", "DarkRed", "HalfRed", "Red", "Red",
+"DarkGreen", "DarkOlive", "Brown", "Chocolate", "OrangeRed",
+"HalfGreen", "GreenOlive", "DryOlive", "Goldenrod", "DarkOrange",
+"LightGreen", "Chartreuse", "YellowGreen", "Yellow", "Gold",
+"Green", "LawnGreen", "GreenYellow", "LightOlive", "Yellow",
+"DarkBlue", "DarkPurple", "HotPink", "VioletPink", "RedPink",
+"SlateGray", "DarkGrey", "PalePurple", "IndianRed", "Tomato",
+"SeaGreen", "PaleGreen", "GreenKhaki", "LightBrown", "LightSalmon",
+"SpringGreen", "PaleGreen", "MediumOlive", "YellowBrown", "LightGold",
+"LightGreen", "LightGreen", "LightGreen", "GreenYellow", "PaleYellow",
+"HalfBlue", "DarkSky", "HalfMagenta", "VioletRed", "DeepPink",
+"SteelBlue", "SkyBlue", "Orchid", "LightHotPink", "HotPink",
+"SeaGreen", "SlateGray", "MediumGrey", "Burlywood", "LightPink",
+"SpringGreen", "Aquamarine", "PaleGreen", "Khaki", "PaleOrange",
+"SpringGreen", "SeaGreen", "PaleGreen", "PaleWhite", "YellowWhite",
+"LightBlue", "Purple", "MediumOrchid", "Magenta", "Magenta",
+"RoyalBlue", "SlateBlue", "MediumOrchid", "Orchid", "Magenta",
+"DeepSkyBlue", "LightSteelBlue", "LightSkyBlue", "Violet", "LightPink",
+"Cyan", "DarkTurquoise", "SkyBlue", "Grey", "Snow",
+"Mint", "Mint", "Aquamarine", "MintCream", "Ivory",
+"Blue", "Blue", "DarkMagenta", "DarkOrchid", "Magenta",
+"SkyBlue", "RoyalBlue", "LightSlateBlue", "MediumOrchid", "Magenta",
+"DodgerBlue", "SteelBlue", "MediumPurple", "PalePurple", "Plum",
+"DeepSkyBlue", "PaleBlue", "LightSkyBlue", "PalePurple", "Thistle",
+"Cyan", "ColdBlue", "PaleTurquoise", "GhostWhite", "White"
};
void automatname(Material *ma)
@@ -1086,15 +1086,15 @@ void automatname(Material *ma)
int nr, r, g, b;
float ref;
- if (ma==NULL) return;
- if (ma->mode & MA_SHLESS) ref= 1.0;
- else ref= ma->ref;
-
- r= (int)(4.99f*(ref*ma->r));
- g= (int)(4.99f*(ref*ma->g));
- b= (int)(4.99f*(ref*ma->b));
- nr= r + 5*g + 25*b;
- if (nr>124) nr= 124;
+ if (ma == NULL) return;
+ if (ma->mode & MA_SHLESS) ref = 1.0;
+ else ref = ma->ref;
+
+ r = (int)(4.99f * (ref * ma->r));
+ g = (int)(4.99f * (ref * ma->g));
+ b = (int)(4.99f * (ref * ma->b));
+ nr = r + 5 * g + 25 * b;
+ if (nr > 124) nr = 124;
new_id(&G.main->mat, (ID *)ma, colname_array[nr]);
}
@@ -1107,7 +1107,7 @@ int object_remove_material_slot(Object *ob)
short *totcolp;
short a, actcol;
- if (ob==NULL || ob->totcol==0) {
+ if (ob == NULL || ob->totcol == 0) {
return FALSE;
}
@@ -1124,55 +1124,55 @@ int object_remove_material_slot(Object *ob)
* after that check indices in mesh/curve/mball!!!
*/
- totcolp= give_totcolp(ob);
- matarar= give_matarar(ob);
+ totcolp = give_totcolp(ob);
+ matarar = give_matarar(ob);
- if (*matarar==NULL) return FALSE;
+ if (*matarar == NULL) return FALSE;
/* we delete the actcol */
- mao= (*matarar)[ob->actcol-1];
+ mao = (*matarar)[ob->actcol - 1];
if (mao) mao->id.us--;
- for (a=ob->actcol; a<ob->totcol; a++)
- (*matarar)[a-1]= (*matarar)[a];
+ for (a = ob->actcol; a < ob->totcol; a++)
+ (*matarar)[a - 1] = (*matarar)[a];
(*totcolp)--;
- if (*totcolp==0) {
+ if (*totcolp == 0) {
MEM_freeN(*matarar);
- *matarar= NULL;
+ *matarar = NULL;
}
- actcol= ob->actcol;
- obt= G.main->object.first;
+ actcol = ob->actcol;
+ obt = G.main->object.first;
while (obt) {
- if (obt->data==ob->data) {
+ if (obt->data == ob->data) {
/* WATCH IT: do not use actcol from ob or from obt (can become zero) */
- mao= obt->mat[actcol-1];
+ mao = obt->mat[actcol - 1];
if (mao) mao->id.us--;
- for (a=actcol; a<obt->totcol; a++) {
- obt->mat[a-1]= obt->mat[a];
- obt->matbits[a-1]= obt->matbits[a];
+ for (a = actcol; a < obt->totcol; a++) {
+ obt->mat[a - 1] = obt->mat[a];
+ obt->matbits[a - 1] = obt->matbits[a];
}
obt->totcol--;
- if (obt->actcol > obt->totcol) obt->actcol= obt->totcol;
+ if (obt->actcol > obt->totcol) obt->actcol = obt->totcol;
- if (obt->totcol==0) {
+ if (obt->totcol == 0) {
MEM_freeN(obt->mat);
MEM_freeN(obt->matbits);
- obt->mat= NULL;
- obt->matbits= NULL;
+ obt->mat = NULL;
+ obt->matbits = NULL;
}
}
- obt= obt->id.next;
+ obt = obt->id.next;
}
/* check indices from mesh */
if (ELEM4(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT)) {
- data_delete_material_index_id((ID *)ob->data, actcol-1);
- freedisplist(&ob->disp);
+ data_delete_material_index_id((ID *)ob->data, actcol - 1);
+ BKE_displist_free(&ob->disp);
}
return TRUE;
@@ -1182,253 +1182,253 @@ int object_remove_material_slot(Object *ob)
/* r_col = current value, col = new value, fac==0 is no change */
void ramp_blend(int type, float r_col[3], const float fac, const float col[3])
{
- float tmp, facm= 1.0f-fac;
+ float tmp, facm = 1.0f - fac;
switch (type) {
case MA_RAMP_BLEND:
- r_col[0] = facm*(r_col[0]) + fac*col[0];
- r_col[1] = facm*(r_col[1]) + fac*col[1];
- r_col[2] = facm*(r_col[2]) + fac*col[2];
+ r_col[0] = facm * (r_col[0]) + fac * col[0];
+ r_col[1] = facm * (r_col[1]) + fac * col[1];
+ r_col[2] = facm * (r_col[2]) + fac * col[2];
break;
case MA_RAMP_ADD:
- r_col[0] += fac*col[0];
- r_col[1] += fac*col[1];
- r_col[2] += fac*col[2];
+ r_col[0] += fac * col[0];
+ r_col[1] += fac * col[1];
+ r_col[2] += fac * col[2];
break;
case MA_RAMP_MULT:
- r_col[0] *= (facm + fac*col[0]);
- r_col[1] *= (facm + fac*col[1]);
- r_col[2] *= (facm + fac*col[2]);
+ r_col[0] *= (facm + fac * col[0]);
+ r_col[1] *= (facm + fac * col[1]);
+ r_col[2] *= (facm + fac * col[2]);
break;
case MA_RAMP_SCREEN:
- r_col[0] = 1.0f - (facm + fac*(1.0f - col[0])) * (1.0f - r_col[0]);
- r_col[1] = 1.0f - (facm + fac*(1.0f - col[1])) * (1.0f - r_col[1]);
- r_col[2] = 1.0f - (facm + fac*(1.0f - col[2])) * (1.0f - r_col[2]);
+ r_col[0] = 1.0f - (facm + fac * (1.0f - col[0])) * (1.0f - r_col[0]);
+ r_col[1] = 1.0f - (facm + fac * (1.0f - col[1])) * (1.0f - r_col[1]);
+ r_col[2] = 1.0f - (facm + fac * (1.0f - col[2])) * (1.0f - r_col[2]);
break;
case MA_RAMP_OVERLAY:
if (r_col[0] < 0.5f)
- r_col[0] *= (facm + 2.0f*fac*col[0]);
+ r_col[0] *= (facm + 2.0f * fac * col[0]);
else
- r_col[0] = 1.0f - (facm + 2.0f*fac*(1.0f - col[0])) * (1.0f - r_col[0]);
+ r_col[0] = 1.0f - (facm + 2.0f * fac * (1.0f - col[0])) * (1.0f - r_col[0]);
if (r_col[1] < 0.5f)
- r_col[1] *= (facm + 2.0f*fac*col[1]);
+ r_col[1] *= (facm + 2.0f * fac * col[1]);
else
- r_col[1] = 1.0f - (facm + 2.0f*fac*(1.0f - col[1])) * (1.0f - r_col[1]);
+ r_col[1] = 1.0f - (facm + 2.0f * fac * (1.0f - col[1])) * (1.0f - r_col[1]);
if (r_col[2] < 0.5f)
- r_col[2] *= (facm + 2.0f*fac*col[2]);
+ r_col[2] *= (facm + 2.0f * fac * col[2]);
else
- r_col[2] = 1.0f - (facm + 2.0f*fac*(1.0f - col[2])) * (1.0f - r_col[2]);
+ r_col[2] = 1.0f - (facm + 2.0f * fac * (1.0f - col[2])) * (1.0f - r_col[2]);
break;
case MA_RAMP_SUB:
- r_col[0] -= fac*col[0];
- r_col[1] -= fac*col[1];
- r_col[2] -= fac*col[2];
+ r_col[0] -= fac * col[0];
+ r_col[1] -= fac * col[1];
+ r_col[2] -= fac * col[2];
break;
case MA_RAMP_DIV:
- if (col[0]!=0.0f)
- r_col[0] = facm*(r_col[0]) + fac*(r_col[0])/col[0];
- if (col[1]!=0.0f)
- r_col[1] = facm*(r_col[1]) + fac*(r_col[1])/col[1];
- if (col[2]!=0.0f)
- r_col[2] = facm*(r_col[2]) + fac*(r_col[2])/col[2];
+ if (col[0] != 0.0f)
+ r_col[0] = facm * (r_col[0]) + fac * (r_col[0]) / col[0];
+ if (col[1] != 0.0f)
+ r_col[1] = facm * (r_col[1]) + fac * (r_col[1]) / col[1];
+ if (col[2] != 0.0f)
+ r_col[2] = facm * (r_col[2]) + fac * (r_col[2]) / col[2];
break;
case MA_RAMP_DIFF:
- r_col[0] = facm*(r_col[0]) + fac*fabsf(r_col[0]-col[0]);
- r_col[1] = facm*(r_col[1]) + fac*fabsf(r_col[1]-col[1]);
- r_col[2] = facm*(r_col[2]) + fac*fabsf(r_col[2]-col[2]);
+ r_col[0] = facm * (r_col[0]) + fac *fabsf(r_col[0] - col[0]);
+ r_col[1] = facm * (r_col[1]) + fac *fabsf(r_col[1] - col[1]);
+ r_col[2] = facm * (r_col[2]) + fac *fabsf(r_col[2] - col[2]);
break;
case MA_RAMP_DARK:
- tmp=col[0]+((1-col[0])*facm);
- if (tmp < r_col[0]) r_col[0]= tmp;
- tmp=col[1]+((1-col[1])*facm);
- if (tmp < r_col[1]) r_col[1]= tmp;
- tmp=col[2]+((1-col[2])*facm);
- if (tmp < r_col[2]) r_col[2]= tmp;
+ tmp = col[0] + ((1 - col[0]) * facm);
+ if (tmp < r_col[0]) r_col[0] = tmp;
+ tmp = col[1] + ((1 - col[1]) * facm);
+ if (tmp < r_col[1]) r_col[1] = tmp;
+ tmp = col[2] + ((1 - col[2]) * facm);
+ if (tmp < r_col[2]) r_col[2] = tmp;
break;
case MA_RAMP_LIGHT:
- tmp= fac*col[0];
- if (tmp > r_col[0]) r_col[0]= tmp;
- tmp= fac*col[1];
- if (tmp > r_col[1]) r_col[1]= tmp;
- tmp= fac*col[2];
- if (tmp > r_col[2]) r_col[2]= tmp;
- break;
+ tmp = fac * col[0];
+ if (tmp > r_col[0]) r_col[0] = tmp;
+ tmp = fac * col[1];
+ if (tmp > r_col[1]) r_col[1] = tmp;
+ tmp = fac * col[2];
+ if (tmp > r_col[2]) r_col[2] = tmp;
+ break;
case MA_RAMP_DODGE:
if (r_col[0] != 0.0f) {
- tmp = 1.0f - fac*col[0];
+ tmp = 1.0f - fac * col[0];
if (tmp <= 0.0f)
r_col[0] = 1.0f;
- else if ((tmp = (r_col[0]) / tmp)> 1.0f)
+ else if ((tmp = (r_col[0]) / tmp) > 1.0f)
r_col[0] = 1.0f;
else
r_col[0] = tmp;
}
if (r_col[1] != 0.0f) {
- tmp = 1.0f - fac*col[1];
- if (tmp <= 0.0f )
+ tmp = 1.0f - fac * col[1];
+ if (tmp <= 0.0f)
r_col[1] = 1.0f;
- else if ((tmp = (r_col[1]) / tmp) > 1.0f )
+ else if ((tmp = (r_col[1]) / tmp) > 1.0f)
r_col[1] = 1.0f;
else
r_col[1] = tmp;
}
if (r_col[2] != 0.0f) {
- tmp = 1.0f - fac*col[2];
+ tmp = 1.0f - fac * col[2];
if (tmp <= 0.0f)
r_col[2] = 1.0f;
- else if ((tmp = (r_col[2]) / tmp) > 1.0f )
+ else if ((tmp = (r_col[2]) / tmp) > 1.0f)
r_col[2] = 1.0f;
else
r_col[2] = tmp;
}
break;
case MA_RAMP_BURN:
- tmp = facm + fac*col[0];
+ tmp = facm + fac * col[0];
if (tmp <= 0.0f)
r_col[0] = 0.0f;
- else if (( tmp = (1.0f - (1.0f - (r_col[0])) / tmp )) < 0.0f)
- r_col[0] = 0.0f;
+ else if ((tmp = (1.0f - (1.0f - (r_col[0])) / tmp)) < 0.0f)
+ r_col[0] = 0.0f;
else if (tmp > 1.0f)
- r_col[0]=1.0f;
+ r_col[0] = 1.0f;
else
r_col[0] = tmp;
- tmp = facm + fac*col[1];
+ tmp = facm + fac * col[1];
if (tmp <= 0.0f)
r_col[1] = 0.0f;
- else if (( tmp = (1.0f - (1.0f - (r_col[1])) / tmp )) < 0.0f )
- r_col[1] = 0.0f;
- else if (tmp >1.0f)
- r_col[1]=1.0f;
+ else if ((tmp = (1.0f - (1.0f - (r_col[1])) / tmp)) < 0.0f)
+ r_col[1] = 0.0f;
+ else if (tmp > 1.0f)
+ r_col[1] = 1.0f;
else
r_col[1] = tmp;
- tmp = facm + fac*col[2];
- if (tmp <= 0.0f)
+ tmp = facm + fac * col[2];
+ if (tmp <= 0.0f)
r_col[2] = 0.0f;
- else if (( tmp = (1.0f - (1.0f - (r_col[2])) / tmp )) < 0.0f )
- r_col[2] = 0.0f;
- else if (tmp >1.0f)
- r_col[2]= 1.0f;
+ else if ((tmp = (1.0f - (1.0f - (r_col[2])) / tmp)) < 0.0f)
+ r_col[2] = 0.0f;
+ else if (tmp > 1.0f)
+ r_col[2] = 1.0f;
else
r_col[2] = tmp;
break;
case MA_RAMP_HUE:
- {
- float rH,rS,rV;
- float colH,colS,colV;
- float tmpr,tmpg,tmpb;
- rgb_to_hsv(col[0],col[1],col[2],&colH,&colS,&colV);
- if (colS != 0) {
- rgb_to_hsv(r_col[0],r_col[1],r_col[2],&rH,&rS,&rV);
- hsv_to_rgb( colH , rS, rV, &tmpr, &tmpg, &tmpb);
- r_col[0] = facm*(r_col[0]) + fac*tmpr;
- r_col[1] = facm*(r_col[1]) + fac*tmpg;
- r_col[2] = facm*(r_col[2]) + fac*tmpb;
- }
+ {
+ float rH, rS, rV;
+ float colH, colS, colV;
+ float tmpr, tmpg, tmpb;
+ rgb_to_hsv(col[0], col[1], col[2], &colH, &colS, &colV);
+ if (colS != 0) {
+ rgb_to_hsv(r_col[0], r_col[1], r_col[2], &rH, &rS, &rV);
+ hsv_to_rgb(colH, rS, rV, &tmpr, &tmpg, &tmpb);
+ r_col[0] = facm * (r_col[0]) + fac * tmpr;
+ r_col[1] = facm * (r_col[1]) + fac * tmpg;
+ r_col[2] = facm * (r_col[2]) + fac * tmpb;
}
- break;
+ }
+ break;
case MA_RAMP_SAT:
- {
- float rH,rS,rV;
- float colH,colS,colV;
- rgb_to_hsv(r_col[0],r_col[1],r_col[2],&rH,&rS,&rV);
- if (rS != 0) {
- rgb_to_hsv(col[0],col[1],col[2],&colH,&colS,&colV);
- hsv_to_rgb( rH, (facm*rS +fac*colS), rV, r_col+0, r_col+1, r_col+2);
- }
+ {
+ float rH, rS, rV;
+ float colH, colS, colV;
+ rgb_to_hsv(r_col[0], r_col[1], r_col[2], &rH, &rS, &rV);
+ if (rS != 0) {
+ rgb_to_hsv(col[0], col[1], col[2], &colH, &colS, &colV);
+ hsv_to_rgb(rH, (facm * rS + fac * colS), rV, r_col + 0, r_col + 1, r_col + 2);
}
- break;
+ }
+ break;
case MA_RAMP_VAL:
- {
- float rH,rS,rV;
- float colH,colS,colV;
- rgb_to_hsv(r_col[0],r_col[1],r_col[2],&rH,&rS,&rV);
- rgb_to_hsv(col[0],col[1],col[2],&colH,&colS,&colV);
- hsv_to_rgb( rH, rS, (facm*rV +fac*colV), r_col+0, r_col+1, r_col+2);
- }
- break;
+ {
+ float rH, rS, rV;
+ float colH, colS, colV;
+ rgb_to_hsv(r_col[0], r_col[1], r_col[2], &rH, &rS, &rV);
+ rgb_to_hsv(col[0], col[1], col[2], &colH, &colS, &colV);
+ hsv_to_rgb(rH, rS, (facm * rV + fac * colV), r_col + 0, r_col + 1, r_col + 2);
+ }
+ break;
case MA_RAMP_COLOR:
- {
- float rH,rS,rV;
- float colH,colS,colV;
- float tmpr,tmpg,tmpb;
- rgb_to_hsv(col[0],col[1],col[2],&colH,&colS,&colV);
- if (colS != 0) {
- rgb_to_hsv(r_col[0],r_col[1],r_col[2],&rH,&rS,&rV);
- hsv_to_rgb( colH, colS, rV, &tmpr, &tmpg, &tmpb);
- r_col[0] = facm*(r_col[0]) + fac*tmpr;
- r_col[1] = facm*(r_col[1]) + fac*tmpg;
- r_col[2] = facm*(r_col[2]) + fac*tmpb;
- }
+ {
+ float rH, rS, rV;
+ float colH, colS, colV;
+ float tmpr, tmpg, tmpb;
+ rgb_to_hsv(col[0], col[1], col[2], &colH, &colS, &colV);
+ if (colS != 0) {
+ rgb_to_hsv(r_col[0], r_col[1], r_col[2], &rH, &rS, &rV);
+ hsv_to_rgb(colH, colS, rV, &tmpr, &tmpg, &tmpb);
+ r_col[0] = facm * (r_col[0]) + fac * tmpr;
+ r_col[1] = facm * (r_col[1]) + fac * tmpg;
+ r_col[2] = facm * (r_col[2]) + fac * tmpb;
}
- break;
+ }
+ break;
case MA_RAMP_SOFT:
- {
- float scr, scg, scb;
+ {
+ float scr, scg, scb;
- /* first calculate non-fac based Screen mix */
- scr = 1.0f - (1.0f - col[0]) * (1.0f - r_col[0]);
- scg = 1.0f - (1.0f - col[1]) * (1.0f - r_col[1]);
- scb = 1.0f - (1.0f - col[2]) * (1.0f - r_col[2]);
+ /* first calculate non-fac based Screen mix */
+ scr = 1.0f - (1.0f - col[0]) * (1.0f - r_col[0]);
+ scg = 1.0f - (1.0f - col[1]) * (1.0f - r_col[1]);
+ scb = 1.0f - (1.0f - col[2]) * (1.0f - r_col[2]);
- r_col[0] = facm*(r_col[0]) + fac*(((1.0f - r_col[0]) * col[0] * (r_col[0])) + (r_col[0] * scr));
- r_col[1] = facm*(r_col[1]) + fac*(((1.0f - r_col[1]) * col[1] * (r_col[1])) + (r_col[1] * scg));
- r_col[2] = facm*(r_col[2]) + fac*(((1.0f - r_col[2]) * col[2] * (r_col[2])) + (r_col[2] * scb));
- }
- break;
+ r_col[0] = facm * (r_col[0]) + fac * (((1.0f - r_col[0]) * col[0] * (r_col[0])) + (r_col[0] * scr));
+ r_col[1] = facm * (r_col[1]) + fac * (((1.0f - r_col[1]) * col[1] * (r_col[1])) + (r_col[1] * scg));
+ r_col[2] = facm * (r_col[2]) + fac * (((1.0f - r_col[2]) * col[2] * (r_col[2])) + (r_col[2] * scb));
+ }
+ break;
case MA_RAMP_LINEAR:
if (col[0] > 0.5f)
- r_col[0] = r_col[0] + fac*(2.0f*(col[0]-0.5f));
+ r_col[0] = r_col[0] + fac * (2.0f * (col[0] - 0.5f));
else
- r_col[0] = r_col[0] + fac*(2.0f*(col[0]) - 1.0f);
+ r_col[0] = r_col[0] + fac * (2.0f * (col[0]) - 1.0f);
if (col[1] > 0.5f)
- r_col[1] = r_col[1] + fac*(2.0f*(col[1]-0.5f));
+ r_col[1] = r_col[1] + fac * (2.0f * (col[1] - 0.5f));
else
- r_col[1] = r_col[1] + fac*(2.0f*(col[1]) -1.0f);
+ r_col[1] = r_col[1] + fac * (2.0f * (col[1]) - 1.0f);
if (col[2] > 0.5f)
- r_col[2] = r_col[2] + fac*(2.0f*(col[2]-0.5f));
+ r_col[2] = r_col[2] + fac * (2.0f * (col[2] - 0.5f));
else
- r_col[2] = r_col[2] + fac*(2.0f*(col[2]) - 1.0f);
+ r_col[2] = r_col[2] + fac * (2.0f * (col[2]) - 1.0f);
break;
}
}
/* copy/paste buffer, if we had a propper py api that would be better */
static Material matcopybuf;
-static short matcopied= 0;
+static short matcopied = 0;
void clear_matcopybuf(void)
{
memset(&matcopybuf, 0, sizeof(Material));
- matcopied= 0;
+ matcopied = 0;
}
void free_matcopybuf(void)
{
int a;
- for (a=0; a<MAX_MTEX; a++) {
+ for (a = 0; a < MAX_MTEX; a++) {
if (matcopybuf.mtex[a]) {
MEM_freeN(matcopybuf.mtex[a]);
- matcopybuf.mtex[a]= NULL;
+ matcopybuf.mtex[a] = NULL;
}
}
if (matcopybuf.ramp_col) MEM_freeN(matcopybuf.ramp_col);
if (matcopybuf.ramp_spec) MEM_freeN(matcopybuf.ramp_spec);
- matcopybuf.ramp_col= NULL;
- matcopybuf.ramp_spec= NULL;
+ matcopybuf.ramp_col = NULL;
+ matcopybuf.ramp_spec = NULL;
if (matcopybuf.nodetree) {
ntreeFreeTree(matcopybuf.nodetree);
MEM_freeN(matcopybuf.nodetree);
- matcopybuf.nodetree= NULL;
+ matcopybuf.nodetree = NULL;
}
- matcopied= 0;
+ matcopied = 0;
}
void copy_matcopybuf(Material *ma)
@@ -1440,19 +1440,19 @@ void copy_matcopybuf(Material *ma)
free_matcopybuf();
memcpy(&matcopybuf, ma, sizeof(Material));
- if (matcopybuf.ramp_col) matcopybuf.ramp_col= MEM_dupallocN(matcopybuf.ramp_col);
- if (matcopybuf.ramp_spec) matcopybuf.ramp_spec= MEM_dupallocN(matcopybuf.ramp_spec);
+ if (matcopybuf.ramp_col) matcopybuf.ramp_col = MEM_dupallocN(matcopybuf.ramp_col);
+ if (matcopybuf.ramp_spec) matcopybuf.ramp_spec = MEM_dupallocN(matcopybuf.ramp_spec);
- for (a=0; a<MAX_MTEX; a++) {
- mtex= matcopybuf.mtex[a];
+ for (a = 0; a < MAX_MTEX; a++) {
+ mtex = matcopybuf.mtex[a];
if (mtex) {
- matcopybuf.mtex[a]= MEM_dupallocN(mtex);
+ matcopybuf.mtex[a] = MEM_dupallocN(mtex);
}
}
- matcopybuf.nodetree= ntreeCopyTree(ma->nodetree);
- matcopybuf.preview= NULL;
- matcopybuf.gpumaterial.first= matcopybuf.gpumaterial.last= NULL;
- matcopied= 1;
+ matcopybuf.nodetree = ntreeCopyTree(ma->nodetree);
+ matcopybuf.preview = NULL;
+ matcopybuf.gpumaterial.first = matcopybuf.gpumaterial.last = NULL;
+ matcopied = 1;
}
void paste_matcopybuf(Material *ma)
@@ -1461,13 +1461,13 @@ void paste_matcopybuf(Material *ma)
MTex *mtex;
ID id;
- if (matcopied==0)
+ if (matcopied == 0)
return;
/* free current mat */
if (ma->ramp_col) MEM_freeN(ma->ramp_col);
if (ma->ramp_spec) MEM_freeN(ma->ramp_spec);
- for (a=0; a<MAX_MTEX; a++) {
- mtex= ma->mtex[a];
+ for (a = 0; a < MAX_MTEX; a++) {
+ mtex = ma->mtex[a];
if (mtex && mtex->tex) mtex->tex->id.us--;
if (mtex) MEM_freeN(mtex);
}
@@ -1479,22 +1479,22 @@ void paste_matcopybuf(Material *ma)
GPU_material_free(ma);
- id= (ma->id);
+ id = (ma->id);
memcpy(ma, &matcopybuf, sizeof(Material));
- (ma->id)= id;
+ (ma->id) = id;
- if (matcopybuf.ramp_col) ma->ramp_col= MEM_dupallocN(matcopybuf.ramp_col);
- if (matcopybuf.ramp_spec) ma->ramp_spec= MEM_dupallocN(matcopybuf.ramp_spec);
+ if (matcopybuf.ramp_col) ma->ramp_col = MEM_dupallocN(matcopybuf.ramp_col);
+ if (matcopybuf.ramp_spec) ma->ramp_spec = MEM_dupallocN(matcopybuf.ramp_spec);
- for (a=0; a<MAX_MTEX; a++) {
- mtex= ma->mtex[a];
+ for (a = 0; a < MAX_MTEX; a++) {
+ mtex = ma->mtex[a];
if (mtex) {
- ma->mtex[a]= MEM_dupallocN(mtex);
+ ma->mtex[a] = MEM_dupallocN(mtex);
if (mtex->tex) id_us_plus((ID *)mtex->tex);
}
}
- ma->nodetree= ntreeCopyTree(matcopybuf.nodetree);
+ ma->nodetree = ntreeCopyTree(matcopybuf.nodetree);
}
@@ -1530,7 +1530,7 @@ static int encode_tfaceflag(MTFace *tf, int convertall)
static void decode_tfaceflag(Material *ma, int flag, int convertall)
{
int alphablend;
- GameSettings *game= &ma->game;
+ GameSettings *game = &ma->game;
/* flag is shifted in 1 to make 0 != no flag yet (see encode_tfaceflag) */
flag -= 1;
@@ -1539,7 +1539,7 @@ static void decode_tfaceflag(Material *ma, int flag, int convertall)
(*game).flag = 0;
/* General Material Options */
- if ((flag & TF_DYNAMIC)==0) (*game).flag |= GEMAT_NOPHYSICS;
+ if ((flag & TF_DYNAMIC) == 0) (*game).flag |= GEMAT_NOPHYSICS;
/* Material Offline Rendering Properties */
if (convertall) {
@@ -1547,8 +1547,8 @@ static void decode_tfaceflag(Material *ma, int flag, int convertall)
}
/* Special Face Properties */
- if ((flag & TF_TWOSIDE)==0) (*game).flag |= GEMAT_BACKCULL;
- if (flag & TF_INVISIBLE)(*game).flag |= GEMAT_INVISIBLE;
+ if ((flag & TF_TWOSIDE) == 0) (*game).flag |= GEMAT_BACKCULL;
+ if (flag & TF_INVISIBLE) (*game).flag |= GEMAT_INVISIBLE;
if (flag & TF_BMFONT) (*game).flag |= GEMAT_TEXT;
/* Face Orientation */
@@ -1570,7 +1570,7 @@ static int check_tfaceneedmaterial(int flag)
// also if only flags are visible and collision see if all objects using this mesh have this option in physics
/* flag is shifted in 1 to make 0 != no flag yet (see encode_tfaceflag) */
- flag -=1;
+ flag -= 1;
// deprecated flags
flag &= ~TF_OBCOL;
@@ -1597,11 +1597,11 @@ static int check_tfaceneedmaterial(int flag)
// XXX to be optmized or replaced by an equivalent blender internal function
static int integer_getdigits(int number)
{
- int i=0;
+ int i = 0;
if (number == 0) return 1;
while (number != 0) {
- number = (int)(number/10);
+ number = (int)(number / 10);
i++;
}
return i;
@@ -1615,7 +1615,7 @@ static void calculate_tface_materialname(char *matname, char *newname, int flag)
int digits = integer_getdigits(flag);
/* clamp the old name, remove the MA prefix and add the .TF.flag suffix
* e.g. matname = "MALoooooooooooooongName"; newname = "Loooooooooooooon.TF.2" */
- BLI_snprintf(newname, MAX_ID_NAME, "%.*s.TF.%0*d", MAX_ID_NAME-(digits+5), matname, digits, flag);
+ BLI_snprintf(newname, MAX_ID_NAME, "%.*s.TF.%0*d", MAX_ID_NAME - (digits + 5), matname, digits, flag);
}
/* returns -1 if no match */
@@ -1623,7 +1623,7 @@ static short mesh_getmaterialnumber(Mesh *me, Material *ma)
{
short a;
- for (a=0; a<me->totcol; a++) {
+ for (a = 0; a < me->totcol; a++) {
if (me->mat[a] == ma) {
return a;
}
@@ -1636,11 +1636,11 @@ static short mesh_getmaterialnumber(Mesh *me, Material *ma)
static short mesh_addmaterial(Mesh *me, Material *ma)
{
material_append_id(&me->id, NULL);
- me->mat[me->totcol-1]= ma;
+ me->mat[me->totcol - 1] = ma;
id_us_plus(&ma->id);
- return me->totcol-1;
+ return me->totcol - 1;
}
static void set_facetexture_flags(Material *ma, Image *image)
@@ -1659,26 +1659,26 @@ static short convert_tfacenomaterial(Main *main, Mesh *me, MTFace *tf, int flag)
{
Material *ma;
char idname[MAX_ID_NAME];
- short mat_nr= -1;
+ short mat_nr = -1;
/* new material, the name uses the flag*/
BLI_snprintf(idname, sizeof(idname), "MAMaterial.TF.%0*d", integer_getdigits(flag), flag);
- if ((ma= BLI_findstring(&main->mat, idname+2, offsetof(ID, name)+2))) {
- mat_nr= mesh_getmaterialnumber(me, ma);
+ if ((ma = BLI_findstring(&main->mat, idname + 2, offsetof(ID, name) + 2))) {
+ mat_nr = mesh_getmaterialnumber(me, ma);
/* assign the material to the mesh */
- if (mat_nr == -1) mat_nr= mesh_addmaterial(me, ma);
+ if (mat_nr == -1) mat_nr = mesh_addmaterial(me, ma);
/* if needed set "Face Textures [Alpha]" Material options */
set_facetexture_flags(ma, tf->tpage);
}
/* create a new material */
else {
- ma= add_material(idname+2);
+ ma = BKE_material_add(idname + 2);
if (ma) {
- printf("TexFace Convert: Material \"%s\" created.\n", idname+2);
- mat_nr= mesh_addmaterial(me, ma);
+ printf("TexFace Convert: Material \"%s\" created.\n", idname + 2);
+ mat_nr = mesh_addmaterial(me, ma);
/* if needed set "Face Textures [Alpha]" Material options */
set_facetexture_flags(ma, tf->tpage);
@@ -1690,7 +1690,7 @@ static short convert_tfacenomaterial(Main *main, Mesh *me, MTFace *tf, int flag)
ma->game.flag = -flag;
id_us_min((ID *)ma);
}
- else printf("Error: Unable to create Material \"%s\" for Mesh \"%s\".", idname+2, me->id.name+2);
+ else printf("Error: Unable to create Material \"%s\" for Mesh \"%s\".", idname + 2, me->id.name + 2);
}
/* set as converted, no need to go bad to this face */
@@ -1711,49 +1711,49 @@ static void convert_tfacematerial(Main *main, Material *ma)
CustomDataLayer *cdl;
char idname[MAX_ID_NAME];
- for (me=main->mesh.first; me; me=me->id.next) {
+ for (me = main->mesh.first; me; me = me->id.next) {
/* check if this mesh uses this material */
- for (a=0;a<me->totcol;a++)
+ for (a = 0; a < me->totcol; a++)
if (me->mat[a] == ma) break;
/* no material found */
if (a == me->totcol) continue;
/* get the active tface layer */
- index= CustomData_get_active_layer_index(&me->fdata, CD_MTFACE);
- cdl= (index == -1)? NULL: &me->fdata.layers[index];
+ index = CustomData_get_active_layer_index(&me->fdata, CD_MTFACE);
+ cdl = (index == -1) ? NULL : &me->fdata.layers[index];
if (!cdl) continue;
/* loop over all the faces and stop at the ones that use the material*/
- for (a=0, mf=me->mface; a<me->totface; a++, mf++) {
+ for (a = 0, mf = me->mface; a < me->totface; a++, mf++) {
if (me->mat[mf->mat_nr] != ma) continue;
/* texface data for this face */
- tf = ((MTFace*)cdl->data) + a;
+ tf = ((MTFace *)cdl->data) + a;
flag = encode_tfaceflag(tf, 1);
/* the name of the new material */
calculate_tface_materialname(ma->id.name, (char *)&idname, flag);
- if ((mat_new= BLI_findstring(&main->mat, idname+2, offsetof(ID, name)+2))) {
+ if ((mat_new = BLI_findstring(&main->mat, idname + 2, offsetof(ID, name) + 2))) {
/* material already existent, see if the mesh has it */
mat_nr = mesh_getmaterialnumber(me, mat_new);
/* material is not in the mesh, add it */
- if (mat_nr == -1) mat_nr= mesh_addmaterial(me, mat_new);
+ if (mat_nr == -1) mat_nr = mesh_addmaterial(me, mat_new);
}
/* create a new material */
else {
- mat_new=copy_material(ma);
+ mat_new = BKE_material_copy(ma);
if (mat_new) {
/* rename the material*/
strcpy(mat_new->id.name, idname);
id_us_min((ID *)mat_new);
- mat_nr= mesh_addmaterial(me, mat_new);
+ mat_nr = mesh_addmaterial(me, mat_new);
decode_tfaceflag(mat_new, flag, 1);
}
else {
- printf("Error: Unable to create Material \"%s\" for Mesh \"%s.", idname+2, me->id.name+2);
+ printf("Error: Unable to create Material \"%s\" for Mesh \"%s.", idname + 2, me->id.name + 2);
mat_nr = mf->mat_nr;
continue;
}
@@ -1770,8 +1770,8 @@ static void convert_tfacematerial(Main *main, Material *ma)
mf->mat_nr = mat_nr;
}
/* remove material from mesh */
- for (a=0;a<me->totcol;)
- if (me->mat[a] == ma) material_pop_id(&me->id, a, 1);else a++;
+ for (a = 0; a < me->totcol; )
+ if (me->mat[a] == ma) material_pop_id(&me->id, a, 1); else a++;
}
}
@@ -1805,20 +1805,20 @@ int do_version_tface(Main *main, int fileload)
*/
/* 1st part: marking mesh materials to update */
- for (me=main->mesh.first; me; me=me->id.next) {
+ for (me = main->mesh.first; me; me = me->id.next) {
if (me->id.lib) continue;
/* get the active tface layer */
- index= CustomData_get_active_layer_index(&me->fdata, CD_MTFACE);
- cdl= (index == -1)? NULL: &me->fdata.layers[index];
+ index = CustomData_get_active_layer_index(&me->fdata, CD_MTFACE);
+ cdl = (index == -1) ? NULL : &me->fdata.layers[index];
if (!cdl) continue;
- nomaterialslots = (me->totcol==0?1:0);
+ nomaterialslots = (me->totcol == 0 ? 1 : 0);
/* loop over all the faces*/
- for (a=0, mf=me->mface; a<me->totface; a++, mf++) {
+ for (a = 0, mf = me->mface; a < me->totface; a++, mf++) {
/* texface data for this face */
- tf = ((MTFace*)cdl->data) + a;
+ tf = ((MTFace *)cdl->data) + a;
/* conversion should happen only once */
if (fileload)
@@ -1834,7 +1834,7 @@ int do_version_tface(Main *main, int fileload)
/* create/find a new material and assign to the face */
if (check_tfaceneedmaterial(flag)) {
- mf->mat_nr= convert_tfacenomaterial(main, me, tf, flag);
+ mf->mat_nr = convert_tfacenomaterial(main, me, tf, flag);
}
/* else mark them as no-material to be reverted to 0 later */
else {
@@ -1842,7 +1842,7 @@ int do_version_tface(Main *main, int fileload)
}
}
else if (mf->mat_nr < me->totcol) {
- ma= me->mat[mf->mat_nr];
+ ma = me->mat[mf->mat_nr];
/* no material create one if necessary */
if (!ma) {
@@ -1851,7 +1851,7 @@ int do_version_tface(Main *main, int fileload)
/* create/find a new material and assign to the face */
if (check_tfaceneedmaterial(flag))
- mf->mat_nr= convert_tfacenomaterial(main, me, tf, flag);
+ mf->mat_nr = convert_tfacenomaterial(main, me, tf, flag);
continue;
}
@@ -1869,11 +1869,11 @@ int do_version_tface(Main *main, int fileload)
/* found a material */
else {
- flag = encode_tfaceflag(tf, ((fileload)?0:1));
+ flag = encode_tfaceflag(tf, ((fileload) ? 0 : 1));
/* first time changing this material */
if (ma->game.flag == 0)
- ma->game.flag= -flag;
+ ma->game.flag = -flag;
/* mark material as disputed */
else if (ma->game.flag != -flag) {
@@ -1902,18 +1902,18 @@ int do_version_tface(Main *main, int fileload)
/* if we didn't have material slot and now we do, we need to
* make sure the materials are correct */
if (nomaterialslots) {
- if (me->totcol>0) {
- for (a=0, mf=me->mface; a<me->totface; a++, mf++) {
+ if (me->totcol > 0) {
+ for (a = 0, mf = me->mface; a < me->totface; a++, mf++) {
if (mf->mat_nr == -1) {
/* texface data for this face */
- tf = ((MTFace*)cdl->data) + a;
- mf->mat_nr= convert_tfacenomaterial(main, me, tf, encode_tfaceflag(tf, 1));
+ tf = ((MTFace *)cdl->data) + a;
+ mf->mat_nr = convert_tfacenomaterial(main, me, tf, encode_tfaceflag(tf, 1));
}
}
}
else {
- for (a=0, mf=me->mface; a<me->totface; a++, mf++) {
- mf->mat_nr=0;
+ for (a = 0, mf = me->mface; a < me->totface; a++, mf++) {
+ mf->mat_nr = 0;
}
}
}
@@ -1924,14 +1924,14 @@ int do_version_tface(Main *main, int fileload)
/* skip library files */
/* we shouldn't loop through the materials created in the loop. make the loop stop at its original length) */
- for (ma= main->mat.first, a=0; ma; ma= ma->id.next, a++) {
+ for (ma = main->mat.first, a = 0; ma; ma = ma->id.next, a++) {
if (ma->id.lib) continue;
/* disputed material */
if (ma->game.flag == MAT_BGE_DISPUTED) {
ma->game.flag = 0;
if (fileload) {
- printf("Warning: material \"%s\" skipped - to convert old game texface to material go to the Help menu.\n", ma->id.name+2);
+ printf("Warning: material \"%s\" skipped - to convert old game texface to material go to the Help menu.\n", ma->id.name + 2);
nowarning = 0;
}
else
@@ -1947,24 +1947,24 @@ int do_version_tface(Main *main, int fileload)
/* material is good make sure all faces using
* this material are set to converted */
if (fileload) {
- for (me=main->mesh.first; me; me=me->id.next) {
+ for (me = main->mesh.first; me; me = me->id.next) {
/* check if this mesh uses this material */
- for (a=0;a<me->totcol;a++)
+ for (a = 0; a < me->totcol; a++)
if (me->mat[a] == ma) break;
/* no material found */
if (a == me->totcol) continue;
/* get the active tface layer */
- index= CustomData_get_active_layer_index(&me->fdata, CD_MTFACE);
- cdl= (index == -1)? NULL: &me->fdata.layers[index];
+ index = CustomData_get_active_layer_index(&me->fdata, CD_MTFACE);
+ cdl = (index == -1) ? NULL : &me->fdata.layers[index];
if (!cdl) continue;
/* loop over all the faces and stop at the ones that use the material*/
- for (a=0, mf=me->mface; a<me->totface; a++, mf++) {
+ for (a = 0, mf = me->mface; a < me->totface; a++, mf++) {
if (me->mat[mf->mat_nr] == ma) {
/* texface data for this face */
- tf = ((MTFace*)cdl->data) + a;
+ tf = ((MTFace *)cdl->data) + a;
tf->mode |= TF_CONVERTED;
}
}
diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c
index da5e02c17f1..8075aaa21d3 100644
--- a/source/blender/blenkernel/intern/mball.c
+++ b/source/blender/blenkernel/intern/mball.c
@@ -65,29 +65,129 @@
#include "BKE_object.h"
#include "BKE_material.h"
+/* Data types */
+
+typedef struct point { /* a three-dimensional point */
+ float x, y, z; /* its coordinates */
+} MB_POINT;
+
+typedef struct vertex { /* surface vertex */
+ MB_POINT position, normal; /* position and surface normal */
+} VERTEX;
+
+typedef struct vertices { /* list of vertices in polygonization */
+ int count, max; /* # vertices, max # allowed */
+ VERTEX *ptr; /* dynamically allocated */
+} VERTICES;
+
+typedef struct corner { /* corner of a cube */
+ int i, j, k; /* (i, j, k) is index within lattice */
+ float x, y, z, value; /* location and function value */
+ struct corner *next;
+} CORNER;
+
+typedef struct cube { /* partitioning cell (cube) */
+ int i, j, k; /* lattice location of cube */
+ CORNER *corners[8]; /* eight corners */
+} CUBE;
+
+typedef struct cubes { /* linked list of cubes acting as stack */
+ CUBE cube; /* a single cube */
+ struct cubes *next; /* remaining elements */
+} CUBES;
+
+typedef struct centerlist { /* list of cube locations */
+ int i, j, k; /* cube location */
+ struct centerlist *next; /* remaining elements */
+} CENTERLIST;
+
+typedef struct edgelist { /* list of edges */
+ int i1, j1, k1, i2, j2, k2; /* edge corner ids */
+ int vid; /* vertex id */
+ struct edgelist *next; /* remaining elements */
+} EDGELIST;
+
+typedef struct intlist { /* list of integers */
+ int i; /* an integer */
+ struct intlist *next; /* remaining elements */
+} INTLIST;
+
+typedef struct intlists { /* list of list of integers */
+ INTLIST *list; /* a list of integers */
+ struct intlists *next; /* remaining elements */
+} INTLISTS;
+
+typedef struct process { /* parameters, function, storage */
+ /* what happens here? floats, I think. */
+ /* float (*function)(void); */ /* implicit surface function */
+ float (*function)(float, float, float);
+ float size, delta; /* cube size, normal delta */
+ int bounds; /* cube range within lattice */
+ CUBES *cubes; /* active cubes */
+ VERTICES vertices; /* surface vertices */
+ CENTERLIST **centers; /* cube center hash table */
+ CORNER **corners; /* corner value hash table */
+ EDGELIST **edges; /* edge and vertex id hash table */
+} PROCESS;
+
+/* dividing scene using octal tree makes polygonisation faster */
+typedef struct ml_pointer {
+ struct ml_pointer *next, *prev;
+ struct MetaElem *ml;
+} ml_pointer;
+
+typedef struct octal_node {
+ struct octal_node *nodes[8];/* children of current node */
+ struct octal_node *parent; /* parent of current node */
+ struct ListBase elems; /* ListBase of MetaElem pointers (ml_pointer) */
+ float x_min, y_min, z_min; /* 1st border point */
+ float x_max, y_max, z_max; /* 7th border point */
+ float x, y, z; /* center of node */
+ int pos, neg; /* number of positive and negative MetaElements in the node */
+ int count; /* number of MetaElems, which belongs to the node */
+} octal_node;
+
+typedef struct octal_tree {
+ struct octal_node *first; /* first node */
+ int pos, neg; /* number of positive and negative MetaElements in the scene */
+ short depth; /* number of scene subdivision */
+} octal_tree;
+
+struct pgn_elements {
+ struct pgn_elements *next, *prev;
+ char *data;
+};
+
+/* Forward declarations */
+static int vertid(CORNER *c1, CORNER *c2, PROCESS *p, MetaBall *mb);
+static int setcenter(CENTERLIST *table[], int i, int j, int k);
+static CORNER *setcorner(PROCESS *p, int i, int j, int k);
+static void converge(MB_POINT *p1, MB_POINT *p2, float v1, float v2,
+ float (*function)(float, float, float), MB_POINT *p, MetaBall *mb, int f);
+
/* Global variables */
-static float thresh= 0.6f;
-static int totelem=0;
+static float thresh = 0.6f;
+static int totelem = 0;
static MetaElem **mainb;
static octal_tree *metaball_tree = NULL;
/* Functions */
-void unlink_mball(MetaBall *mb)
+void BKE_mball_unlink(MetaBall *mb)
{
int a;
- for (a=0; a<mb->totcol; a++) {
+ for (a = 0; a < mb->totcol; a++) {
if (mb->mat[a]) mb->mat[a]->id.us--;
- mb->mat[a]= NULL;
+ mb->mat[a] = NULL;
}
}
/* do not free mball itself */
-void free_mball(MetaBall *mb)
+void BKE_mball_free(MetaBall *mb)
{
- unlink_mball(mb);
+ BKE_mball_unlink(mb);
if (mb->adt) {
BKE_free_animdata((ID *)mb);
@@ -96,42 +196,42 @@ void free_mball(MetaBall *mb)
if (mb->mat) MEM_freeN(mb->mat);
if (mb->bb) MEM_freeN(mb->bb);
BLI_freelistN(&mb->elems);
- if (mb->disp.first) freedisplist(&mb->disp);
+ if (mb->disp.first) BKE_displist_free(&mb->disp);
}
-MetaBall *add_mball(const char *name)
+MetaBall *BKE_mball_add(const char *name)
{
MetaBall *mb;
- mb= alloc_libblock(&G.main->mball, ID_MB, name);
+ mb = BKE_libblock_alloc(&G.main->mball, ID_MB, name);
- mb->size[0]= mb->size[1]= mb->size[2]= 1.0;
- mb->texflag= MB_AUTOSPACE;
+ mb->size[0] = mb->size[1] = mb->size[2] = 1.0;
+ mb->texflag = MB_AUTOSPACE;
- mb->wiresize= 0.4f;
- mb->rendersize= 0.2f;
- mb->thresh= 0.6f;
+ mb->wiresize = 0.4f;
+ mb->rendersize = 0.2f;
+ mb->thresh = 0.6f;
return mb;
}
-MetaBall *copy_mball(MetaBall *mb)
+MetaBall *BKE_mball_copy(MetaBall *mb)
{
MetaBall *mbn;
int a;
- mbn= copy_libblock(&mb->id);
+ mbn = BKE_libblock_copy(&mb->id);
BLI_duplicatelist(&mbn->elems, &mb->elems);
- mbn->mat= MEM_dupallocN(mb->mat);
- for (a=0; a<mbn->totcol; a++) {
+ mbn->mat = MEM_dupallocN(mb->mat);
+ for (a = 0; a < mbn->totcol; a++) {
id_us_plus((ID *)mbn->mat[a]);
}
- mbn->bb= MEM_dupallocN(mb->bb);
+ mbn->bb = MEM_dupallocN(mb->bb);
- mbn->editelems= NULL;
- mbn->lastelem= NULL;
+ mbn->editelems = NULL;
+ mbn->lastelem = NULL;
return mbn;
}
@@ -143,29 +243,29 @@ static void extern_local_mball(MetaBall *mb)
}
}
-void make_local_mball(MetaBall *mb)
+void BKE_mball_make_local(MetaBall *mb)
{
- Main *bmain= G.main;
+ Main *bmain = G.main;
Object *ob;
- int is_local= FALSE, is_lib= FALSE;
+ int is_local = FALSE, is_lib = FALSE;
/* - only lib users: do nothing
* - only local users: set flag
* - mixed: make copy
*/
- if (mb->id.lib==NULL) return;
- if (mb->id.us==1) {
+ if (mb->id.lib == NULL) return;
+ if (mb->id.us == 1) {
id_clear_lib_data(bmain, &mb->id);
extern_local_mball(mb);
return;
}
- for (ob= G.main->object.first; ob && ELEM(0, is_lib, is_local); ob= ob->id.next) {
+ for (ob = G.main->object.first; ob && ELEM(0, is_lib, is_local); ob = ob->id.next) {
if (ob->data == mb) {
- if (ob->id.lib) is_lib= TRUE;
- else is_local= TRUE;
+ if (ob->id.lib) is_lib = TRUE;
+ else is_local = TRUE;
}
}
@@ -174,16 +274,16 @@ void make_local_mball(MetaBall *mb)
extern_local_mball(mb);
}
else if (is_local && is_lib) {
- MetaBall *mb_new= copy_mball(mb);
- mb_new->id.us= 0;
+ MetaBall *mb_new = BKE_mball_copy(mb);
+ mb_new->id.us = 0;
/* Remap paths of new ID using old library as base. */
BKE_id_lib_local_paths(bmain, mb->id.lib, &mb_new->id);
- for (ob= G.main->object.first; ob; ob= ob->id.next) {
+ for (ob = G.main->object.first; ob; ob = ob->id.next) {
if (ob->data == mb) {
- if (ob->id.lib==NULL) {
- ob->data= mb_new;
+ if (ob->id.lib == NULL) {
+ ob->data = mb_new;
mb_new->id.us++;
mb->id.us--;
}
@@ -194,46 +294,46 @@ void make_local_mball(MetaBall *mb)
/* most simple meta-element adding function
* don't do context manipulation here (rna uses) */
-MetaElem *add_metaball_element(MetaBall *mb, const int type)
+MetaElem *BKE_mball_element_add(MetaBall *mb, const int type)
{
- MetaElem *ml= MEM_callocN(sizeof(MetaElem), "metaelem");
+ MetaElem *ml = MEM_callocN(sizeof(MetaElem), "metaelem");
unit_qt(ml->quat);
- ml->rad= 2.0;
- ml->s= 2.0;
- ml->flag= MB_SCALE_RAD;
-
- switch(type) {
- case MB_BALL:
- ml->type = MB_BALL;
- ml->expx= ml->expy= ml->expz= 1.0;
-
- break;
- case MB_TUBE:
- ml->type = MB_TUBE;
- ml->expx= ml->expy= ml->expz= 1.0;
-
- break;
- case MB_PLANE:
- ml->type = MB_PLANE;
- ml->expx= ml->expy= ml->expz= 1.0;
-
- break;
- case MB_ELIPSOID:
- ml->type = MB_ELIPSOID;
- ml->expx= 1.2f;
- ml->expy= 0.8f;
- ml->expz= 1.0;
-
- break;
- case MB_CUBE:
- ml->type = MB_CUBE;
- ml->expx= ml->expy= ml->expz= 1.0;
+ ml->rad = 2.0;
+ ml->s = 2.0;
+ ml->flag = MB_SCALE_RAD;
+
+ switch (type) {
+ case MB_BALL:
+ ml->type = MB_BALL;
+ ml->expx = ml->expy = ml->expz = 1.0;
+
+ break;
+ case MB_TUBE:
+ ml->type = MB_TUBE;
+ ml->expx = ml->expy = ml->expz = 1.0;
+
+ break;
+ case MB_PLANE:
+ ml->type = MB_PLANE;
+ ml->expx = ml->expy = ml->expz = 1.0;
- break;
- default:
- break;
+ break;
+ case MB_ELIPSOID:
+ ml->type = MB_ELIPSOID;
+ ml->expx = 1.2f;
+ ml->expy = 0.8f;
+ ml->expz = 1.0;
+
+ break;
+ case MB_CUBE:
+ ml->type = MB_CUBE;
+ ml->expx = ml->expy = ml->expz = 1.0;
+
+ break;
+ default:
+ break;
}
BLI_addtail(&mb->elems, ml);
@@ -246,32 +346,32 @@ MetaElem *add_metaball_element(MetaBall *mb, const int type)
* basic MetaBall (usually with name Meta). All other MetaBalls (with
* names Meta.001, Meta.002, etc) are included in this Bounding Box.
*/
-void tex_space_mball(Object *ob)
+void BKE_mball_texspace_calc(Object *ob)
{
DispList *dl;
BoundBox *bb;
float *data, min[3], max[3] /*, loc[3], size[3] */;
- int tot, doit=0;
+ int tot, doit = 0;
- if (ob->bb==NULL) ob->bb= MEM_callocN(sizeof(BoundBox), "mb boundbox");
- bb= ob->bb;
+ if (ob->bb == NULL) ob->bb = MEM_callocN(sizeof(BoundBox), "mb boundbox");
+ bb = ob->bb;
/* Weird one, this. */
-/* INIT_MINMAX(min, max); */
- (min)[0]= (min)[1]= (min)[2]= 1.0e30f;
- (max)[0]= (max)[1]= (max)[2]= -1.0e30f;
+/* INIT_MINMAX(min, max); */
+ (min)[0] = (min)[1] = (min)[2] = 1.0e30f;
+ (max)[0] = (max)[1] = (max)[2] = -1.0e30f;
- dl= ob->disp.first;
+ dl = ob->disp.first;
while (dl) {
- tot= dl->nr;
- if (tot) doit= 1;
- data= dl->verts;
+ tot = dl->nr;
+ if (tot) doit = 1;
+ data = dl->verts;
while (tot--) {
/* Also weird... but longer. From utildefines. */
DO_MINMAX(data, min, max);
- data+= 3;
+ data += 3;
}
- dl= dl->next;
+ dl = dl->next;
}
if (!doit) {
@@ -279,18 +379,18 @@ void tex_space_mball(Object *ob)
max[0] = max[1] = max[2] = 1.0f;
}
#if 0
- loc[0]= (min[0]+max[0])/2.0f;
- loc[1]= (min[1]+max[1])/2.0f;
- loc[2]= (min[2]+max[2])/2.0f;
-
- size[0]= (max[0]-min[0])/2.0f;
- size[1]= (max[1]-min[1])/2.0f;
- size[2]= (max[2]-min[2])/2.0f;
+ loc[0] = (min[0] + max[0]) / 2.0f;
+ loc[1] = (min[1] + max[1]) / 2.0f;
+ loc[2] = (min[2] + max[2]) / 2.0f;
+
+ size[0] = (max[0] - min[0]) / 2.0f;
+ size[1] = (max[1] - min[1]) / 2.0f;
+ size[2] = (max[2] - min[2]) / 2.0f;
#endif
- boundbox_set_from_min_max(bb, min, max);
+ BKE_boundbox_init_from_minmax(bb, min, max);
}
-float *make_orco_mball(Object *ob, ListBase *dispbase)
+float *BKE_mball_make_orco(Object *ob, ListBase *dispbase)
{
BoundBox *bb;
DispList *dl;
@@ -299,27 +399,27 @@ float *make_orco_mball(Object *ob, ListBase *dispbase)
int a;
/* restore size and loc */
- bb= ob->bb;
- loc[0]= (bb->vec[0][0]+bb->vec[4][0])/2.0f;
- size[0]= bb->vec[4][0]-loc[0];
- loc[1]= (bb->vec[0][1]+bb->vec[2][1])/2.0f;
- size[1]= bb->vec[2][1]-loc[1];
- loc[2]= (bb->vec[0][2]+bb->vec[1][2])/2.0f;
- size[2]= bb->vec[1][2]-loc[2];
-
- dl= dispbase->first;
- orcodata= MEM_mallocN(sizeof(float)*3*dl->nr, "MballOrco");
-
- data= dl->verts;
- orco= orcodata;
- a= dl->nr;
+ bb = ob->bb;
+ loc[0] = (bb->vec[0][0] + bb->vec[4][0]) / 2.0f;
+ size[0] = bb->vec[4][0] - loc[0];
+ loc[1] = (bb->vec[0][1] + bb->vec[2][1]) / 2.0f;
+ size[1] = bb->vec[2][1] - loc[1];
+ loc[2] = (bb->vec[0][2] + bb->vec[1][2]) / 2.0f;
+ size[2] = bb->vec[1][2] - loc[2];
+
+ dl = dispbase->first;
+ orcodata = MEM_mallocN(sizeof(float) * 3 * dl->nr, "MballOrco");
+
+ data = dl->verts;
+ orco = orcodata;
+ a = dl->nr;
while (a--) {
- orco[0]= (data[0]-loc[0])/size[0];
- orco[1]= (data[1]-loc[1])/size[1];
- orco[2]= (data[2]-loc[2])/size[2];
+ orco[0] = (data[0] - loc[0]) / size[0];
+ orco[1] = (data[1] - loc[1]) / size[1];
+ orco[2] = (data[2] - loc[2]) / size[2];
- data+= 3;
- orco+= 3;
+ data += 3;
+ orco += 3;
}
return orcodata;
@@ -342,26 +442,26 @@ float *make_orco_mball(Object *ob, ListBase *dispbase)
* It test last character of Object ID name. If last character
* is digit it return 0, else it return 1.
*/
-int is_basis_mball(Object *ob)
+int BKE_mball_is_basis(Object *ob)
{
int len;
/* just a quick test */
- len= strlen(ob->id.name);
- if ( isdigit(ob->id.name[len-1]) ) return 0;
+ len = strlen(ob->id.name);
+ if (isdigit(ob->id.name[len - 1]) ) return 0;
return 1;
}
/* return nonzero if ob1 is a basis mball for ob */
-int is_mball_basis_for (Object *ob1, Object *ob2)
+int BKE_mball_is_basis_for(Object *ob1, Object *ob2)
{
int basis1nr, basis2nr;
char basis1name[MAX_ID_NAME], basis2name[MAX_ID_NAME];
- BLI_split_name_num(basis1name, &basis1nr, ob1->id.name+2, '.');
- BLI_split_name_num(basis2name, &basis2nr, ob2->id.name+2, '.');
+ BLI_split_name_num(basis1name, &basis1nr, ob1->id.name + 2, '.');
+ BLI_split_name_num(basis2name, &basis2nr, ob2->id.name + 2, '.');
- if (!strcmp(basis1name, basis2name)) return is_basis_mball(ob1);
+ if (!strcmp(basis1name, basis2name)) return BKE_mball_is_basis(ob1);
else return 0;
}
@@ -371,36 +471,36 @@ int is_mball_basis_for (Object *ob1, Object *ob2)
* are copied to all metaballs in same "group" (metaballs with same base name: MBall,
* MBall.001, MBall.002, etc). The most important is to copy properties to the base metaball,
* because this metaball influence polygonisation of metaballs. */
-void copy_mball_properties(Scene *scene, Object *active_object)
+void BKE_mball_properties_copy(Scene *scene, Object *active_object)
{
- Scene *sce_iter= scene;
+ Scene *sce_iter = scene;
Base *base;
Object *ob;
- MetaBall *active_mball = (MetaBall*)active_object->data;
+ MetaBall *active_mball = (MetaBall *)active_object->data;
int basisnr, obnr;
char basisname[MAX_ID_NAME], obname[MAX_ID_NAME];
- BLI_split_name_num(basisname, &basisnr, active_object->id.name+2, '.');
+ BLI_split_name_num(basisname, &basisnr, active_object->id.name + 2, '.');
- /* XXX recursion check, see scene.c, just too simple code this next_object() */
- if (F_ERROR==next_object(&sce_iter, 0, NULL, NULL))
+ /* XXX recursion check, see scene.c, just too simple code this BKE_scene_base_iter_next() */
+ if (F_ERROR == BKE_scene_base_iter_next(&sce_iter, 0, NULL, NULL))
return;
- while (next_object(&sce_iter, 1, &base, &ob)) {
- if (ob->type==OB_MBALL) {
+ while (BKE_scene_base_iter_next(&sce_iter, 1, &base, &ob)) {
+ if (ob->type == OB_MBALL) {
if (ob != active_object) {
- BLI_split_name_num(obname, &obnr, ob->id.name+2, '.');
+ BLI_split_name_num(obname, &obnr, ob->id.name + 2, '.');
/* Object ob has to be in same "group" ... it means, that it has to have
* same base of its name */
- if (strcmp(obname, basisname)==0) {
- MetaBall *mb= ob->data;
+ if (strcmp(obname, basisname) == 0) {
+ MetaBall *mb = ob->data;
/* Copy properties from selected/edited metaball */
- mb->wiresize= active_mball->wiresize;
- mb->rendersize= active_mball->rendersize;
- mb->thresh= active_mball->thresh;
- mb->flag= active_mball->flag;
+ mb->wiresize = active_mball->wiresize;
+ mb->rendersize = active_mball->rendersize;
+ mb->thresh = active_mball->thresh;
+ mb->flag = active_mball->flag;
}
}
}
@@ -416,52 +516,52 @@ void copy_mball_properties(Scene *scene, Object *active_object)
*
* warning!, is_basis_mball() can fail on returned object, see long note above.
*/
-Object *find_basis_mball(Scene *scene, Object *basis)
+Object *BKE_mball_basis_find(Scene *scene, Object *basis)
{
- Scene *sce_iter= scene;
+ Scene *sce_iter = scene;
Base *base;
- Object *ob,*bob= basis;
- MetaElem *ml=NULL;
+ Object *ob, *bob = basis;
+ MetaElem *ml = NULL;
int basisnr, obnr;
char basisname[MAX_ID_NAME], obname[MAX_ID_NAME];
- BLI_split_name_num(basisname, &basisnr, basis->id.name+2, '.');
- totelem= 0;
+ BLI_split_name_num(basisname, &basisnr, basis->id.name + 2, '.');
+ totelem = 0;
- /* XXX recursion check, see scene.c, just too simple code this next_object() */
- if (F_ERROR==next_object(&sce_iter, 0, NULL, NULL))
+ /* XXX recursion check, see scene.c, just too simple code this BKE_scene_base_iter_next() */
+ if (F_ERROR == BKE_scene_base_iter_next(&sce_iter, 0, NULL, NULL))
return NULL;
- while (next_object(&sce_iter, 1, &base, &ob)) {
+ while (BKE_scene_base_iter_next(&sce_iter, 1, &base, &ob)) {
- if (ob->type==OB_MBALL) {
- if (ob==bob) {
- MetaBall *mb= ob->data;
+ if (ob->type == OB_MBALL) {
+ if (ob == bob) {
+ MetaBall *mb = ob->data;
/* if bob object is in edit mode, then dynamic list of all MetaElems
* is stored in editelems */
- if (mb->editelems) ml= mb->editelems->first;
+ if (mb->editelems) ml = mb->editelems->first;
/* if bob object is in object mode */
- else ml= mb->elems.first;
+ else ml = mb->elems.first;
}
else {
- BLI_split_name_num(obname, &obnr, ob->id.name+2, '.');
+ BLI_split_name_num(obname, &obnr, ob->id.name + 2, '.');
/* object ob has to be in same "group" ... it means, that it has to have
* same base of its name */
- if (strcmp(obname, basisname)==0) {
- MetaBall *mb= ob->data;
+ if (strcmp(obname, basisname) == 0) {
+ MetaBall *mb = ob->data;
/* if object is in edit mode, then dynamic list of all MetaElems
* is stored in editelems */
- if (mb->editelems) ml= mb->editelems->first;
+ if (mb->editelems) ml = mb->editelems->first;
/* if bob object is in object mode */
- else ml= mb->elems.first;
+ else ml = mb->elems.first;
if (obnr < basisnr) {
if (!(ob->flag & OB_FROMDUPLI)) {
- basis= ob;
- basisnr= obnr;
+ basis = ob;
+ basisnr = obnr;
}
}
}
@@ -469,7 +569,7 @@ Object *find_basis_mball(Scene *scene, Object *basis)
while (ml) {
if (!(ml->flag & MB_HIDE)) totelem++;
- ml= ml->next;
+ ml = ml->next;
}
}
}
@@ -491,121 +591,121 @@ Object *find_basis_mball(Scene *scene, Object *basis)
* Permission is granted to reproduce, use and distribute this code for
* any and all purposes, provided that this notice appears in all copies. */
-#define RES 12 /* # converge iterations */
-
-#define L 0 /* left direction: -x, -i */
-#define R 1 /* right direction: +x, +i */
-#define B 2 /* bottom direction: -y, -j */
-#define T 3 /* top direction: +y, +j */
-#define N 4 /* near direction: -z, -k */
-#define F 5 /* far direction: +z, +k */
-#define LBN 0 /* left bottom near corner */
-#define LBF 1 /* left bottom far corner */
-#define LTN 2 /* left top near corner */
-#define LTF 3 /* left top far corner */
-#define RBN 4 /* right bottom near corner */
-#define RBF 5 /* right bottom far corner */
-#define RTN 6 /* right top near corner */
-#define RTF 7 /* right top far corner */
+#define RES 12 /* # converge iterations */
+
+#define L 0 /* left direction: -x, -i */
+#define R 1 /* right direction: +x, +i */
+#define B 2 /* bottom direction: -y, -j */
+#define T 3 /* top direction: +y, +j */
+#define N 4 /* near direction: -z, -k */
+#define F 5 /* far direction: +z, +k */
+#define LBN 0 /* left bottom near corner */
+#define LBF 1 /* left bottom far corner */
+#define LTN 2 /* left top near corner */
+#define LTF 3 /* left top far corner */
+#define RBN 4 /* right bottom near corner */
+#define RBF 5 /* right bottom far corner */
+#define RTN 6 /* right top near corner */
+#define RTF 7 /* right top far corner */
/* the LBN corner of cube (i, j, k), corresponds with location
* (i-0.5)*size, (j-0.5)*size, (k-0.5)*size) */
-#define HASHBIT (5)
-#define HASHSIZE (size_t)(1<<(3*HASHBIT)) /*! < hash table size (32768) */
+#define HASHBIT (5)
+#define HASHSIZE (size_t)(1 << (3 * HASHBIT)) /*! < hash table size (32768) */
-#define HASH(i,j,k) ((((( (i) & 31)<<5) | ( (j) & 31))<<5 ) | ( (k) & 31) )
+#define HASH(i, j, k) ((((( (i) & 31) << 5) | ( (j) & 31)) << 5) | ( (k) & 31) )
-#define MB_BIT(i, bit) (((i)>>(bit))&1)
-#define FLIP(i,bit) ((i)^1<<(bit)) /* flip the given bit of i */
+#define MB_BIT(i, bit) (((i) >> (bit)) & 1)
+#define FLIP(i, bit) ((i) ^ 1 << (bit)) /* flip the given bit of i */
/* **************** POLYGONIZATION ************************ */
-void calc_mballco(MetaElem *ml, float vec[3])
+static void calc_mballco(MetaElem *ml, float vec[3])
{
if (ml->mat) {
- mul_m4_v3((float ( * )[4])ml->mat, vec);
+ mul_m4_v3((float (*)[4])ml->mat, vec);
}
}
-float densfunc(MetaElem *ball, float x, float y, float z)
+static float densfunc(MetaElem *ball, float x, float y, float z)
{
float dist2 = 0.0, dx, dy, dz;
float vec[3];
- vec[0]= x;
- vec[1]= y;
- vec[2]= z;
- mul_m4_v3((float ( * )[4])ball->imat, vec);
- dx= vec[0];
- dy= vec[1];
- dz= vec[2];
-
- if (ball->type==MB_BALL) {
- }
- else if (ball->type==MB_TUBEX) {
- if ( dx > ball->len) dx-= ball->len;
- else if (dx< -ball->len) dx+= ball->len;
- else dx= 0.0;
- }
- else if (ball->type==MB_TUBEY) {
- if ( dy > ball->len) dy-= ball->len;
- else if (dy< -ball->len) dy+= ball->len;
- else dy= 0.0;
- }
- else if (ball->type==MB_TUBEZ) {
- if ( dz > ball->len) dz-= ball->len;
- else if (dz< -ball->len) dz+= ball->len;
- else dz= 0.0;
- }
- else if (ball->type==MB_TUBE) {
- if ( dx > ball->expx) dx-= ball->expx;
- else if (dx< -ball->expx) dx+= ball->expx;
- else dx= 0.0;
- }
- else if (ball->type==MB_PLANE) {
- if ( dx > ball->expx) dx-= ball->expx;
- else if (dx< -ball->expx) dx+= ball->expx;
- else dx= 0.0;
- if ( dy > ball->expy) dy-= ball->expy;
- else if (dy< -ball->expy) dy+= ball->expy;
- else dy= 0.0;
- }
- else if (ball->type==MB_ELIPSOID) {
- dx *= 1/ball->expx;
- dy *= 1/ball->expy;
- dz *= 1/ball->expz;
- }
- else if (ball->type==MB_CUBE) {
- if ( dx > ball->expx) dx-= ball->expx;
- else if (dx< -ball->expx) dx+= ball->expx;
- else dx= 0.0;
- if ( dy > ball->expy) dy-= ball->expy;
- else if (dy< -ball->expy) dy+= ball->expy;
- else dy= 0.0;
- if ( dz > ball->expz) dz-= ball->expz;
- else if (dz< -ball->expz) dz+= ball->expz;
- else dz= 0.0;
- }
-
- dist2= (dx*dx + dy*dy + dz*dz);
+ vec[0] = x;
+ vec[1] = y;
+ vec[2] = z;
+ mul_m4_v3((float (*)[4])ball->imat, vec);
+ dx = vec[0];
+ dy = vec[1];
+ dz = vec[2];
+
+ if (ball->type == MB_BALL) {
+ }
+ else if (ball->type == MB_TUBEX) {
+ if (dx > ball->len) dx -= ball->len;
+ else if (dx < -ball->len) dx += ball->len;
+ else dx = 0.0;
+ }
+ else if (ball->type == MB_TUBEY) {
+ if (dy > ball->len) dy -= ball->len;
+ else if (dy < -ball->len) dy += ball->len;
+ else dy = 0.0;
+ }
+ else if (ball->type == MB_TUBEZ) {
+ if (dz > ball->len) dz -= ball->len;
+ else if (dz < -ball->len) dz += ball->len;
+ else dz = 0.0;
+ }
+ else if (ball->type == MB_TUBE) {
+ if (dx > ball->expx) dx -= ball->expx;
+ else if (dx < -ball->expx) dx += ball->expx;
+ else dx = 0.0;
+ }
+ else if (ball->type == MB_PLANE) {
+ if (dx > ball->expx) dx -= ball->expx;
+ else if (dx < -ball->expx) dx += ball->expx;
+ else dx = 0.0;
+ if (dy > ball->expy) dy -= ball->expy;
+ else if (dy < -ball->expy) dy += ball->expy;
+ else dy = 0.0;
+ }
+ else if (ball->type == MB_ELIPSOID) {
+ dx *= 1 / ball->expx;
+ dy *= 1 / ball->expy;
+ dz *= 1 / ball->expz;
+ }
+ else if (ball->type == MB_CUBE) {
+ if (dx > ball->expx) dx -= ball->expx;
+ else if (dx < -ball->expx) dx += ball->expx;
+ else dx = 0.0;
+ if (dy > ball->expy) dy -= ball->expy;
+ else if (dy < -ball->expy) dy += ball->expy;
+ else dy = 0.0;
+ if (dz > ball->expz) dz -= ball->expz;
+ else if (dz < -ball->expz) dz += ball->expz;
+ else dz = 0.0;
+ }
+
+ dist2 = (dx * dx + dy * dy + dz * dz);
if (ball->flag & MB_NEGATIVE) {
- dist2= 1.0f-(dist2/ball->rad2);
+ dist2 = 1.0f - (dist2 / ball->rad2);
if (dist2 < 0.0f) return 0.5f;
- return 0.5f-ball->s*dist2*dist2*dist2;
+ return 0.5f - ball->s * dist2 * dist2 * dist2;
}
else {
- dist2= 1.0f-(dist2/ball->rad2);
+ dist2 = 1.0f - (dist2 / ball->rad2);
if (dist2 < 0.0f) return -0.5f;
- return ball->s*dist2*dist2*dist2 -0.5f;
+ return ball->s * dist2 * dist2 * dist2 - 0.5f;
}
}
-octal_node* find_metaball_octal_node(octal_node *node, float x, float y, float z, short depth)
+static octal_node *find_metaball_octal_node(octal_node *node, float x, float y, float z, short depth)
{
if (!depth) return node;
@@ -613,13 +713,13 @@ octal_node* find_metaball_octal_node(octal_node *node, float x, float y, float z
if (y < node->y) {
if (x < node->x) {
if (node->nodes[0])
- return find_metaball_octal_node(node->nodes[0],x,y,z,depth--);
+ return find_metaball_octal_node(node->nodes[0], x, y, z, depth--);
else
return node;
}
else {
if (node->nodes[1])
- return find_metaball_octal_node(node->nodes[1],x,y,z,depth--);
+ return find_metaball_octal_node(node->nodes[1], x, y, z, depth--);
else
return node;
}
@@ -627,13 +727,13 @@ octal_node* find_metaball_octal_node(octal_node *node, float x, float y, float z
else {
if (x < node->x) {
if (node->nodes[3])
- return find_metaball_octal_node(node->nodes[3],x,y,z,depth--);
+ return find_metaball_octal_node(node->nodes[3], x, y, z, depth--);
else
return node;
}
else {
if (node->nodes[2])
- return find_metaball_octal_node(node->nodes[2],x,y,z,depth--);
+ return find_metaball_octal_node(node->nodes[2], x, y, z, depth--);
else
return node;
}
@@ -643,13 +743,13 @@ octal_node* find_metaball_octal_node(octal_node *node, float x, float y, float z
if (y < node->y) {
if (x < node->x) {
if (node->nodes[4])
- return find_metaball_octal_node(node->nodes[4],x,y,z,depth--);
+ return find_metaball_octal_node(node->nodes[4], x, y, z, depth--);
else
return node;
}
else {
if (node->nodes[5])
- return find_metaball_octal_node(node->nodes[5],x,y,z,depth--);
+ return find_metaball_octal_node(node->nodes[5], x, y, z, depth--);
else
return node;
}
@@ -657,13 +757,13 @@ octal_node* find_metaball_octal_node(octal_node *node, float x, float y, float z
else {
if (x < node->x) {
if (node->nodes[7])
- return find_metaball_octal_node(node->nodes[7],x,y,z,depth--);
+ return find_metaball_octal_node(node->nodes[7], x, y, z, depth--);
else
return node;
}
else {
if (node->nodes[6])
- return find_metaball_octal_node(node->nodes[6],x,y,z,depth--);
+ return find_metaball_octal_node(node->nodes[6], x, y, z, depth--);
else
return node;
}
@@ -673,29 +773,29 @@ octal_node* find_metaball_octal_node(octal_node *node, float x, float y, float z
return node;
}
-float metaball(float x, float y, float z)
+static float metaball(float x, float y, float z)
/* float x, y, z; */
{
struct octal_node *node;
struct ml_pointer *ml_p;
- float dens=0;
+ float dens = 0;
int a;
if (totelem > 1) {
- node= find_metaball_octal_node(metaball_tree->first, x, y, z, metaball_tree->depth);
+ node = find_metaball_octal_node(metaball_tree->first, x, y, z, metaball_tree->depth);
if (node) {
- ml_p= node->elems.first;
+ ml_p = node->elems.first;
while (ml_p) {
- dens+=densfunc(ml_p->ml, x, y, z);
- ml_p= ml_p->next;
+ dens += densfunc(ml_p->ml, x, y, z);
+ ml_p = ml_p->next;
}
- dens+= -0.5f*(metaball_tree->pos - node->pos);
- dens+= 0.5f*(metaball_tree->neg - node->neg);
+ dens += -0.5f * (metaball_tree->pos - node->pos);
+ dens += 0.5f * (metaball_tree->neg - node->neg);
}
else {
- for (a=0; a<totelem; a++) {
+ for (a = 0; a < totelem; a++) {
dens += densfunc(mainb[a], x, y, z);
}
}
@@ -709,87 +809,87 @@ float metaball(float x, float y, float z)
/* ******************************************** */
-static int *indices=NULL;
+static int *indices = NULL;
static int totindex, curindex;
-void accum_mballfaces(int i1, int i2, int i3, int i4)
+static void accum_mballfaces(int i1, int i2, int i3, int i4)
{
int *newi, *cur;
/* static int i=0; I would like to delete altogether, but I don't dare to, yet */
- if (totindex==curindex) {
- totindex+= 256;
- newi= MEM_mallocN(4*sizeof(int)*totindex, "vertindex");
+ if (totindex == curindex) {
+ totindex += 256;
+ newi = MEM_mallocN(4 * sizeof(int) * totindex, "vertindex");
if (indices) {
- memcpy(newi, indices, 4*sizeof(int)*(totindex-256));
+ memcpy(newi, indices, 4 * sizeof(int) * (totindex - 256));
MEM_freeN(indices);
}
- indices= newi;
+ indices = newi;
}
- cur= indices+4*curindex;
+ cur = indices + 4 * curindex;
/* displists now support array drawing, we treat tri's as fake quad */
- cur[0]= i1;
- cur[1]= i2;
- cur[2]= i3;
- if (i4==0)
- cur[3]= i3;
+ cur[0] = i1;
+ cur[1] = i2;
+ cur[2] = i3;
+ if (i4 == 0)
+ cur[3] = i3;
else
- cur[3]= i4;
+ cur[3] = i4;
curindex++;
}
/* ******************* MEMORY MANAGEMENT *********************** */
-void *new_pgn_element(int size)
+static void *new_pgn_element(int size)
{
/* during polygonize 1000s of elements are allocated
* and never freed in between. Freeing only done at the end.
*/
- int blocksize= 16384;
- static int offs= 0; /* the current free address */
- static struct pgn_elements *cur= NULL;
- static ListBase lb= {NULL, NULL};
+ int blocksize = 16384;
+ static int offs = 0; /* the current free address */
+ static struct pgn_elements *cur = NULL;
+ static ListBase lb = {NULL, NULL};
void *adr;
- if (size>10000 || size==0) {
+ if (size > 10000 || size == 0) {
printf("incorrect use of new_pgn_element\n");
}
- else if (size== -1) {
- cur= lb.first;
+ else if (size == -1) {
+ cur = lb.first;
while (cur) {
MEM_freeN(cur->data);
- cur= cur->next;
+ cur = cur->next;
}
BLI_freelistN(&lb);
return NULL;
}
- size= 4*( (size+3)/4 );
+ size = 4 * ( (size + 3) / 4);
if (cur) {
- if (size+offs < blocksize) {
- adr= (void *) (cur->data+offs);
- offs+= size;
+ if (size + offs < blocksize) {
+ adr = (void *) (cur->data + offs);
+ offs += size;
return adr;
}
}
- cur= MEM_callocN( sizeof(struct pgn_elements), "newpgn");
- cur->data= MEM_callocN(blocksize, "newpgn");
+ cur = MEM_callocN(sizeof(struct pgn_elements), "newpgn");
+ cur->data = MEM_callocN(blocksize, "newpgn");
BLI_addtail(&lb, cur);
- offs= size;
+ offs = size;
return cur->data;
}
-void freepolygonize(PROCESS *p)
+static void freepolygonize(PROCESS *p)
{
MEM_freeN(p->corners);
MEM_freeN(p->edges);
@@ -802,43 +902,47 @@ void freepolygonize(PROCESS *p)
/**** Cubical Polygonization (optional) ****/
-#define LB 0 /* left bottom edge */
-#define LT 1 /* left top edge */
-#define LN 2 /* left near edge */
-#define LF 3 /* left far edge */
-#define RB 4 /* right bottom edge */
-#define RT 5 /* right top edge */
-#define RN 6 /* right near edge */
-#define RF 7 /* right far edge */
-#define BN 8 /* bottom near edge */
-#define BF 9 /* bottom far edge */
-#define TN 10 /* top near edge */
-#define TF 11 /* top far edge */
+#define LB 0 /* left bottom edge */
+#define LT 1 /* left top edge */
+#define LN 2 /* left near edge */
+#define LF 3 /* left far edge */
+#define RB 4 /* right bottom edge */
+#define RT 5 /* right top edge */
+#define RN 6 /* right near edge */
+#define RF 7 /* right far edge */
+#define BN 8 /* bottom near edge */
+#define BF 9 /* bottom far edge */
+#define TN 10 /* top near edge */
+#define TF 11 /* top far edge */
static INTLISTS *cubetable[256];
/* edge: LB, LT, LN, LF, RB, RT, RN, RF, BN, BF, TN, TF */
-static int corner1[12] = {
- LBN,LTN,LBN,LBF,RBN,RTN,RBN,RBF,LBN,LBF,LTN,LTF};
-static int corner2[12] = {
- LBF,LTF,LTN,LTF,RBF,RTF,RTN,RTF,RBN,RBF,RTN,RTF};
-static int leftface[12] = {
- B, L, L, F, R, T, N, R, N, B, T, F};
+static int corner1[12] = {
+ LBN, LTN, LBN, LBF, RBN, RTN, RBN, RBF, LBN, LBF, LTN, LTF
+};
+static int corner2[12] = {
+ LBF, LTF, LTN, LTF, RBF, RTF, RTN, RTF, RBN, RBF, RTN, RTF
+};
+static int leftface[12] = {
+ B, L, L, F, R, T, N, R, N, B, T, F
+};
/* face on left when going corner1 to corner2 */
-static int rightface[12] = {
- L, T, N, L, B, R, R, F, B, F, N, T};
+static int rightface[12] = {
+ L, T, N, L, B, R, R, F, B, F, N, T
+};
/* face on right when going corner1 to corner2 */
/* docube: triangulate the cube directly, without decomposition */
-void docube(CUBE *cube, PROCESS *p, MetaBall *mb)
+static void docube(CUBE *cube, PROCESS *p, MetaBall *mb)
{
INTLISTS *polys;
CORNER *c1, *c2;
int i, index = 0, count, indexar[8];
- for (i = 0; i < 8; i++) if (cube->corners[i]->value > 0.0f) index += (1<<i);
+ for (i = 0; i < 8; i++) if (cube->corners[i]->value > 0.0f) index += (1 << i);
for (polys = cubetable[index]; polys; polys = polys->next) {
INTLIST *edges;
@@ -852,44 +956,44 @@ void docube(CUBE *cube, PROCESS *p, MetaBall *mb)
indexar[count] = vertid(c1, c2, p, mb);
count++;
}
- if (count>2) {
- switch(count) {
- case 3:
- accum_mballfaces(indexar[2], indexar[1], indexar[0], 0);
- break;
- case 4:
- if (indexar[0]==0) accum_mballfaces(indexar[0], indexar[3], indexar[2], indexar[1]);
- else accum_mballfaces(indexar[3], indexar[2], indexar[1], indexar[0]);
- break;
- case 5:
- if (indexar[0]==0) accum_mballfaces(indexar[0], indexar[3], indexar[2], indexar[1]);
- else accum_mballfaces(indexar[3], indexar[2], indexar[1], indexar[0]);
-
- accum_mballfaces(indexar[4], indexar[3], indexar[0], 0);
- break;
- case 6:
- if (indexar[0]==0) {
- accum_mballfaces(indexar[0], indexar[3], indexar[2], indexar[1]);
- accum_mballfaces(indexar[0], indexar[5], indexar[4], indexar[3]);
- }
- else {
- accum_mballfaces(indexar[3], indexar[2], indexar[1], indexar[0]);
- accum_mballfaces(indexar[5], indexar[4], indexar[3], indexar[0]);
- }
- break;
- case 7:
- if (indexar[0]==0) {
- accum_mballfaces(indexar[0], indexar[3], indexar[2], indexar[1]);
- accum_mballfaces(indexar[0], indexar[5], indexar[4], indexar[3]);
- }
- else {
- accum_mballfaces(indexar[3], indexar[2], indexar[1], indexar[0]);
- accum_mballfaces(indexar[5], indexar[4], indexar[3], indexar[0]);
- }
+ if (count > 2) {
+ switch (count) {
+ case 3:
+ accum_mballfaces(indexar[2], indexar[1], indexar[0], 0);
+ break;
+ case 4:
+ if (indexar[0] == 0) accum_mballfaces(indexar[0], indexar[3], indexar[2], indexar[1]);
+ else accum_mballfaces(indexar[3], indexar[2], indexar[1], indexar[0]);
+ break;
+ case 5:
+ if (indexar[0] == 0) accum_mballfaces(indexar[0], indexar[3], indexar[2], indexar[1]);
+ else accum_mballfaces(indexar[3], indexar[2], indexar[1], indexar[0]);
- accum_mballfaces(indexar[6], indexar[5], indexar[0], 0);
+ accum_mballfaces(indexar[4], indexar[3], indexar[0], 0);
+ break;
+ case 6:
+ if (indexar[0] == 0) {
+ accum_mballfaces(indexar[0], indexar[3], indexar[2], indexar[1]);
+ accum_mballfaces(indexar[0], indexar[5], indexar[4], indexar[3]);
+ }
+ else {
+ accum_mballfaces(indexar[3], indexar[2], indexar[1], indexar[0]);
+ accum_mballfaces(indexar[5], indexar[4], indexar[3], indexar[0]);
+ }
+ break;
+ case 7:
+ if (indexar[0] == 0) {
+ accum_mballfaces(indexar[0], indexar[3], indexar[2], indexar[1]);
+ accum_mballfaces(indexar[0], indexar[5], indexar[4], indexar[3]);
+ }
+ else {
+ accum_mballfaces(indexar[3], indexar[2], indexar[1], indexar[0]);
+ accum_mballfaces(indexar[5], indexar[4], indexar[3], indexar[0]);
+ }
- break;
+ accum_mballfaces(indexar[6], indexar[5], indexar[0], 0);
+
+ break;
}
}
}
@@ -900,17 +1004,17 @@ void docube(CUBE *cube, PROCESS *p, MetaBall *mb)
* if surface crosses face, compute other four corners of adjacent cube
* and add new cube to cube stack */
-void testface(int i, int j, int k, CUBE* old, int bit, int c1, int c2, int c3, int c4, PROCESS *p)
+static void testface(int i, int j, int k, CUBE *old, int bit, int c1, int c2, int c3, int c4, PROCESS *p)
{
CUBE newc;
CUBES *oldcubes = p->cubes;
CORNER *corn1, *corn2, *corn3, *corn4;
int n, pos;
- corn1= old->corners[c1];
- corn2= old->corners[c2];
- corn3= old->corners[c3];
- corn4= old->corners[c4];
+ corn1 = old->corners[c1];
+ corn2 = old->corners[c2];
+ corn3 = old->corners[c3];
+ corn4 = old->corners[c4];
pos = corn1->value > 0.0f ? 1 : 0;
@@ -936,22 +1040,22 @@ void testface(int i, int j, int k, CUBE* old, int bit, int c1, int c2, int c3, i
newc.corners[FLIP(c3, bit)] = corn3;
newc.corners[FLIP(c4, bit)] = corn4;
- if (newc.corners[0]==NULL) newc.corners[0] = setcorner(p, i, j, k);
- if (newc.corners[1]==NULL) newc.corners[1] = setcorner(p, i, j, k+1);
- if (newc.corners[2]==NULL) newc.corners[2] = setcorner(p, i, j+1, k);
- if (newc.corners[3]==NULL) newc.corners[3] = setcorner(p, i, j+1, k+1);
- if (newc.corners[4]==NULL) newc.corners[4] = setcorner(p, i+1, j, k);
- if (newc.corners[5]==NULL) newc.corners[5] = setcorner(p, i+1, j, k+1);
- if (newc.corners[6]==NULL) newc.corners[6] = setcorner(p, i+1, j+1, k);
- if (newc.corners[7]==NULL) newc.corners[7] = setcorner(p, i+1, j+1, k+1);
+ if (newc.corners[0] == NULL) newc.corners[0] = setcorner(p, i, j, k);
+ if (newc.corners[1] == NULL) newc.corners[1] = setcorner(p, i, j, k + 1);
+ if (newc.corners[2] == NULL) newc.corners[2] = setcorner(p, i, j + 1, k);
+ if (newc.corners[3] == NULL) newc.corners[3] = setcorner(p, i, j + 1, k + 1);
+ if (newc.corners[4] == NULL) newc.corners[4] = setcorner(p, i + 1, j, k);
+ if (newc.corners[5] == NULL) newc.corners[5] = setcorner(p, i + 1, j, k + 1);
+ if (newc.corners[6] == NULL) newc.corners[6] = setcorner(p, i + 1, j + 1, k);
+ if (newc.corners[7] == NULL) newc.corners[7] = setcorner(p, i + 1, j + 1, k + 1);
- p->cubes->cube= newc;
+ p->cubes->cube = newc;
}
/* setcorner: return corner with the given lattice location
* set (and cache) its function value */
-CORNER *setcorner (PROCESS* p, int i, int j, int k)
+static CORNER *setcorner(PROCESS *p, int i, int j, int k)
{
/* for speed, do corner value caching here */
CORNER *c;
@@ -970,11 +1074,11 @@ CORNER *setcorner (PROCESS* p, int i, int j, int k)
c = (CORNER *) new_pgn_element(sizeof(CORNER));
c->i = i;
- c->x = ((float)i-0.5f)*p->size;
+ c->x = ((float)i - 0.5f) * p->size;
c->j = j;
- c->y = ((float)j-0.5f)*p->size;
+ c->y = ((float)j - 0.5f) * p->size;
c->k = k;
- c->z = ((float)k-0.5f)*p->size;
+ c->z = ((float)k - 0.5f) * p->size;
c->value = p->function(c->x, c->y, c->z);
c->next = p->corners[index];
@@ -986,33 +1090,33 @@ CORNER *setcorner (PROCESS* p, int i, int j, int k)
/* nextcwedge: return next clockwise edge from given edge around given face */
-int nextcwedge (int edge, int face)
+static int nextcwedge(int edge, int face)
{
switch (edge) {
- case LB:
- return (face == L)? LF : BN;
- case LT:
- return (face == L)? LN : TF;
- case LN:
- return (face == L)? LB : TN;
- case LF:
- return (face == L)? LT : BF;
- case RB:
- return (face == R)? RN : BF;
- case RT:
- return (face == R)? RF : TN;
- case RN:
- return (face == R)? RT : BN;
- case RF:
- return (face == R)? RB : TF;
- case BN:
- return (face == B)? RB : LN;
- case BF:
- return (face == B)? LB : RF;
- case TN:
- return (face == T)? LT : RN;
- case TF:
- return (face == T)? RT : LF;
+ case LB:
+ return (face == L) ? LF : BN;
+ case LT:
+ return (face == L) ? LN : TF;
+ case LN:
+ return (face == L) ? LB : TN;
+ case LF:
+ return (face == L) ? LT : BF;
+ case RB:
+ return (face == R) ? RN : BF;
+ case RT:
+ return (face == R) ? RF : TN;
+ case RN:
+ return (face == R) ? RT : BN;
+ case RF:
+ return (face == R) ? RB : TF;
+ case BN:
+ return (face == B) ? RB : LN;
+ case BF:
+ return (face == B) ? LB : RF;
+ case TN:
+ return (face == T) ? LT : RN;
+ case TF:
+ return (face == T) ? RT : LF;
}
return 0;
}
@@ -1020,22 +1124,22 @@ int nextcwedge (int edge, int face)
/* otherface: return face adjoining edge that is not the given face */
-int otherface (int edge, int face)
+static int otherface(int edge, int face)
{
int other = leftface[edge];
- return face == other? rightface[edge] : other;
+ return face == other ? rightface[edge] : other;
}
/* makecubetable: create the 256 entry table for cubical polygonization */
-void makecubetable (void)
+static void makecubetable(void)
{
- static int isdone= 0;
+ static int isdone = 0;
int i, e, c, done[12], pos[8];
if (isdone) return;
- isdone= 1;
+ isdone = 1;
for (i = 0; i < 256; i++) {
for (e = 0; e < 12; e++) done[e] = 0;
@@ -1047,7 +1151,7 @@ void makecubetable (void)
int start = e, edge = e;
/* get face that is to right of edge from pos to neg corner: */
- int face = pos[corner1[e]]? rightface[e] : leftface[e];
+ int face = pos[corner1[e]] ? rightface[e] : leftface[e];
while (1) {
edge = nextcwedge(edge, face);
@@ -1070,43 +1174,43 @@ void makecubetable (void)
}
}
-void BKE_freecubetable(void)
+void BKE_mball_cubeTable_free(void)
{
int i;
INTLISTS *lists, *nlists;
INTLIST *ints, *nints;
for (i = 0; i < 256; i++) {
- lists= cubetable[i];
+ lists = cubetable[i];
while (lists) {
- nlists= lists->next;
+ nlists = lists->next;
- ints= lists->list;
+ ints = lists->list;
while (ints) {
- nints= ints->next;
+ nints = ints->next;
MEM_freeN(ints);
- ints= nints;
+ ints = nints;
}
MEM_freeN(lists);
- lists= nlists;
+ lists = nlists;
}
- cubetable[i]= NULL;
+ cubetable[i] = NULL;
}
}
/**** Storage ****/
-/* setcenter: set (i,j,k) entry of table[]
+/* setcenter: set (i, j, k) entry of table[]
* return 1 if already set; otherwise, set and return 0 */
-int setcenter(CENTERLIST *table[], int i, int j, int k)
+static int setcenter(CENTERLIST *table[], int i, int j, int k)
{
int index;
CENTERLIST *newc, *l, *q;
- index= HASH(i, j, k);
- q= table[index];
+ index = HASH(i, j, k);
+ q = table[index];
for (l = q; l != NULL; l = l->next) {
if (l->i == i && l->j == j && l->k == k) return 1;
@@ -1125,25 +1229,25 @@ int setcenter(CENTERLIST *table[], int i, int j, int k)
/* setedge: set vertex id for edge */
-void setedge (EDGELIST *table[],
- int i1, int j1,
- int k1, int i2,
- int j2, int k2,
- int vid)
+static void setedge(EDGELIST *table[],
+ int i1, int j1,
+ int k1, int i2,
+ int j2, int k2,
+ int vid)
{
unsigned int index;
EDGELIST *newe;
- if (i1>i2 || (i1==i2 && (j1>j2 || (j1==j2 && k1>k2)))) {
- int t=i1;
- i1=i2;
- i2=t;
- t=j1;
- j1=j2;
- j2=t;
- t=k1;
- k1=k2;
- k2=t;
+ if (i1 > i2 || (i1 == i2 && (j1 > j2 || (j1 == j2 && k1 > k2)))) {
+ int t = i1;
+ i1 = i2;
+ i2 = t;
+ t = j1;
+ j1 = j2;
+ j2 = t;
+ t = k1;
+ k1 = k2;
+ k2 = t;
}
index = HASH(i1, j1, k1) + HASH(i2, j2, k2);
newe = (EDGELIST *) new_pgn_element(sizeof(EDGELIST));
@@ -1161,28 +1265,31 @@ void setedge (EDGELIST *table[],
/* getedge: return vertex id for edge; return -1 if not set */
-int getedge (EDGELIST *table[],
- int i1, int j1, int k1,
- int i2, int j2, int k2)
+static int getedge(EDGELIST *table[],
+ int i1, int j1, int k1,
+ int i2, int j2, int k2)
{
EDGELIST *q;
- if (i1>i2 || (i1==i2 && (j1>j2 || (j1==j2 && k1>k2)))) {
- int t=i1;
- i1=i2;
- i2=t;
- t=j1;
- j1=j2;
- j2=t;
- t=k1;
- k1=k2;
- k2=t;
- }
- q = table[HASH(i1, j1, k1)+HASH(i2, j2, k2)];
- for (; q != NULL; q = q->next)
+ if (i1 > i2 || (i1 == i2 && (j1 > j2 || (j1 == j2 && k1 > k2)))) {
+ int t = i1;
+ i1 = i2;
+ i2 = t;
+ t = j1;
+ j1 = j2;
+ j2 = t;
+ t = k1;
+ k1 = k2;
+ k2 = t;
+ }
+ q = table[HASH(i1, j1, k1) + HASH(i2, j2, k2)];
+ for (; q != NULL; q = q->next) {
if (q->i1 == i1 && q->j1 == j1 && q->k1 == k1 &&
- q->i2 == i2 && q->j2 == j2 && q->k2 == k2)
+ q->i2 == i2 && q->j2 == j2 && q->k2 == k2)
+ {
return q->vid;
+ }
+ }
return -1;
}
@@ -1199,12 +1306,12 @@ int getedge (EDGELIST *table[],
/* addtovertices: add v to sequence of vertices */
-void addtovertices (VERTICES *vertices, VERTEX v)
+static void addtovertices(VERTICES *vertices, VERTEX v)
{
if (vertices->count == vertices->max) {
int i;
VERTEX *newv;
- vertices->max = vertices->count == 0 ? 10 : 2*vertices->count;
+ vertices->max = vertices->count == 0 ? 10 : 2 * vertices->count;
newv = (VERTEX *) MEM_callocN(vertices->max * sizeof(VERTEX), "addtovertices");
for (i = 0; i < vertices->count; i++) newv[i] = vertices->ptr[i];
@@ -1217,15 +1324,15 @@ void addtovertices (VERTICES *vertices, VERTEX v)
/* vnormal: compute unit length surface normal at point */
-void vnormal (MB_POINT *point, PROCESS *p, MB_POINT *v)
+static void vnormal(MB_POINT *point, PROCESS *p, MB_POINT *v)
{
- float delta= 0.2f*p->delta;
+ float delta = 0.2f * p->delta;
float f = p->function(point->x, point->y, point->z);
- v->x = p->function(point->x+delta, point->y, point->z)-f;
- v->y = p->function(point->x, point->y+delta, point->z)-f;
- v->z = p->function(point->x, point->y, point->z+delta)-f;
- f = sqrtf(v->x*v->x + v->y*v->y + v->z*v->z);
+ v->x = p->function(point->x + delta, point->y, point->z) - f;
+ v->y = p->function(point->x, point->y + delta, point->z) - f;
+ v->z = p->function(point->x, point->y, point->z + delta) - f;
+ f = sqrtf(v->x * v->x + v->y * v->y + v->z * v->z);
if (f != 0.0f) {
v->x /= f;
@@ -1240,21 +1347,21 @@ void vnormal (MB_POINT *point, PROCESS *p, MB_POINT *v)
f = p->function(point->x, point->y, point->z);
- temp.x = p->function(point->x+delta, point->y, point->z)-f;
- temp.y = p->function(point->x, point->y+delta, point->z)-f;
- temp.z = p->function(point->x, point->y, point->z+delta)-f;
- f = sqrtf(temp.x*temp.x + temp.y*temp.y + temp.z*temp.z);
+ temp.x = p->function(point->x + delta, point->y, point->z) - f;
+ temp.y = p->function(point->x, point->y + delta, point->z) - f;
+ temp.z = p->function(point->x, point->y, point->z + delta) - f;
+ f = sqrtf(temp.x * temp.x + temp.y * temp.y + temp.z * temp.z);
if (f != 0.0f) {
temp.x /= f;
temp.y /= f;
temp.z /= f;
- v->x+= temp.x;
- v->y+= temp.y;
- v->z+= temp.z;
+ v->x += temp.x;
+ v->y += temp.y;
+ v->z += temp.z;
- f = sqrtf(v->x*v->x + v->y*v->y + v->z*v->z);
+ f = sqrtf(v->x * v->x + v->y * v->y + v->z * v->z);
if (f != 0.0f) {
v->x /= f;
@@ -1267,13 +1374,13 @@ void vnormal (MB_POINT *point, PROCESS *p, MB_POINT *v)
}
-int vertid (CORNER *c1, CORNER *c2, PROCESS *p, MetaBall *mb)
+static int vertid(CORNER *c1, CORNER *c2, PROCESS *p, MetaBall *mb)
{
VERTEX v;
MB_POINT a, b;
int vid = getedge(p->edges, c1->i, c1->j, c1->k, c2->i, c2->j, c2->k);
- if (vid != -1) return vid; /* previously computed */
+ if (vid != -1) return vid; /* previously computed */
a.x = c1->x;
a.y = c1->y;
a.z = c1->z;
@@ -1284,8 +1391,8 @@ int vertid (CORNER *c1, CORNER *c2, PROCESS *p, MetaBall *mb)
converge(&a, &b, c1->value, c2->value, p->function, &v.position, mb, 1); /* position */
vnormal(&v.position, p, &v.normal);
- addtovertices(&p->vertices, v); /* save vertex */
- vid = p->vertices.count-1;
+ addtovertices(&p->vertices, v); /* save vertex */
+ vid = p->vertices.count - 1;
setedge(p->edges, c1->i, c1->j, c1->k, c2->i, c2->j, c2->k, vid);
return vid;
@@ -1296,23 +1403,23 @@ int vertid (CORNER *c1, CORNER *c2, PROCESS *p, MetaBall *mb)
/* converge: from two points of differing sign, converge to zero crossing */
/* watch it: p1 and p2 are used to calculate */
-void converge (MB_POINT *p1, MB_POINT *p2, float v1, float v2,
- float (*function)(float, float, float), MB_POINT *p, MetaBall *mb, int f)
+static void converge(MB_POINT *p1, MB_POINT *p2, float v1, float v2,
+ float (*function)(float, float, float), MB_POINT *p, MetaBall *mb, int f)
{
int i = 0;
MB_POINT pos, neg;
float positive = 0.0f, negative = 0.0f;
- float dx = 0.0f ,dy = 0.0f ,dz = 0.0f;
+ float dx = 0.0f, dy = 0.0f, dz = 0.0f;
if (v1 < 0) {
- pos= *p2;
- neg= *p1;
+ pos = *p2;
+ neg = *p1;
positive = v2;
negative = v1;
}
else {
- pos= *p1;
- neg= *p2;
+ pos = *p1;
+ neg = *p2;
positive = v1;
negative = v2;
}
@@ -1323,25 +1430,25 @@ void converge (MB_POINT *p1, MB_POINT *p2, float v1, float v2,
/* Approximation by linear interpolation is faster then binary subdivision,
* but it results sometimes (mb->thresh < 0.2) into the strange results */
- if ((mb->thresh > 0.2f) && (f==1)) {
- if ((dy == 0.0f) && (dz == 0.0f)) {
- p->x = neg.x - negative*dx/(positive-negative);
- p->y = neg.y;
- p->z = neg.z;
- return;
- }
- if ((dx == 0.0f) && (dz == 0.0f)) {
- p->x = neg.x;
- p->y = neg.y - negative*dy/(positive-negative);
- p->z = neg.z;
- return;
- }
- if ((dx == 0.0f) && (dy == 0.0f)) {
- p->x = neg.x;
- p->y = neg.y;
- p->z = neg.z - negative*dz/(positive-negative);
- return;
- }
+ if ((mb->thresh > 0.2f) && (f == 1)) {
+ if ((dy == 0.0f) && (dz == 0.0f)) {
+ p->x = neg.x - negative * dx / (positive - negative);
+ p->y = neg.y;
+ p->z = neg.z;
+ return;
+ }
+ if ((dx == 0.0f) && (dz == 0.0f)) {
+ p->x = neg.x;
+ p->y = neg.y - negative * dy / (positive - negative);
+ p->z = neg.z;
+ return;
+ }
+ if ((dx == 0.0f) && (dy == 0.0f)) {
+ p->x = neg.x;
+ p->y = neg.y;
+ p->z = neg.z - negative * dz / (positive - negative);
+ return;
+ }
}
if ((dy == 0.0f) && (dz == 0.0f)) {
@@ -1349,8 +1456,8 @@ void converge (MB_POINT *p1, MB_POINT *p2, float v1, float v2,
p->z = neg.z;
while (1) {
if (i++ == RES) return;
- p->x = 0.5f*(pos.x + neg.x);
- if ((function(p->x,p->y,p->z)) > 0.0f) pos.x = p->x; else neg.x = p->x;
+ p->x = 0.5f * (pos.x + neg.x);
+ if ((function(p->x, p->y, p->z)) > 0.0f) pos.x = p->x; else neg.x = p->x;
}
}
@@ -1359,26 +1466,26 @@ void converge (MB_POINT *p1, MB_POINT *p2, float v1, float v2,
p->z = neg.z;
while (1) {
if (i++ == RES) return;
- p->y = 0.5f*(pos.y + neg.y);
- if ((function(p->x,p->y,p->z)) > 0.0f) pos.y = p->y; else neg.y = p->y;
+ p->y = 0.5f * (pos.y + neg.y);
+ if ((function(p->x, p->y, p->z)) > 0.0f) pos.y = p->y; else neg.y = p->y;
}
- }
+ }
if ((dx == 0.0f) && (dy == 0.0f)) {
p->x = neg.x;
p->y = neg.y;
while (1) {
if (i++ == RES) return;
- p->z = 0.5f*(pos.z + neg.z);
- if ((function(p->x,p->y,p->z)) > 0.0f) pos.z = p->z; else neg.z = p->z;
+ p->z = 0.5f * (pos.z + neg.z);
+ if ((function(p->x, p->y, p->z)) > 0.0f) pos.z = p->z; else neg.z = p->z;
}
}
/* This is necessary to find start point */
while (1) {
- p->x = 0.5f*(pos.x + neg.x);
- p->y = 0.5f*(pos.y + neg.y);
- p->z = 0.5f*(pos.z + neg.z);
+ p->x = 0.5f * (pos.x + neg.x);
+ p->y = 0.5f * (pos.y + neg.y);
+ p->z = 0.5f * (pos.z + neg.z);
if (i++ == RES) return;
@@ -1396,7 +1503,7 @@ void converge (MB_POINT *p1, MB_POINT *p2, float v1, float v2,
}
/* ************************************** */
-void add_cube(PROCESS *mbproc, int i, int j, int k, int count)
+static void add_cube(PROCESS *mbproc, int i, int j, int k, int count)
{
CUBES *ncube;
int n;
@@ -1404,91 +1511,91 @@ void add_cube(PROCESS *mbproc, int i, int j, int k, int count)
/* hmmm, not only one, but eight cube will be added on the stack
* ... */
- for (a=i-1; a<i+count; a++)
- for (b=j-1; b<j+count; b++)
- for (c=k-1; c<k+count; c++) {
+ for (a = i - 1; a < i + count; a++)
+ for (b = j - 1; b < j + count; b++)
+ for (c = k - 1; c < k + count; c++) {
/* test if cube has been found before */
- if ( setcenter(mbproc->centers, a, b, c)==0 ) {
+ if (setcenter(mbproc->centers, a, b, c) == 0) {
/* push cube on stack: */
- ncube= (CUBES *) new_pgn_element(sizeof(CUBES));
- ncube->next= mbproc->cubes;
- mbproc->cubes= ncube;
+ ncube = (CUBES *) new_pgn_element(sizeof(CUBES));
+ ncube->next = mbproc->cubes;
+ mbproc->cubes = ncube;
- ncube->cube.i= a;
- ncube->cube.j= b;
- ncube->cube.k= c;
+ ncube->cube.i = a;
+ ncube->cube.j = b;
+ ncube->cube.k = c;
/* set corners of initial cube: */
for (n = 0; n < 8; n++)
- ncube->cube.corners[n] = setcorner(mbproc, a+MB_BIT(n,2), b+MB_BIT(n,1), c+MB_BIT(n,0));
+ ncube->cube.corners[n] = setcorner(mbproc, a + MB_BIT(n, 2), b + MB_BIT(n, 1), c + MB_BIT(n, 0));
}
}
}
-void find_first_points(PROCESS *mbproc, MetaBall *mb, int a)
+static void find_first_points(PROCESS *mbproc, MetaBall *mb, int a)
{
MB_POINT IN, in, OUT, out; /*point;*/
MetaElem *ml;
int i, j, k, c_i, c_j, c_k;
- int index[3]={1,0,-1};
- float f =0.0f;
+ int index[3] = {1, 0, -1};
+ float f = 0.0f;
float in_v /*, out_v*/;
MB_POINT workp;
float tmp_v, workp_v, max_len, len, dx, dy, dz, nx, ny, nz, MAXN;
ml = mainb[a];
- f = 1-(mb->thresh/ml->s);
+ f = 1 - (mb->thresh / ml->s);
/* Skip, when Stiffness of MetaElement is too small ... MetaElement can't be
* visible alone ... but still can influence others MetaElements :-) */
if (f > 0.0f) {
- OUT.x = IN.x = in.x= 0.0;
- OUT.y = IN.y = in.y= 0.0;
- OUT.z = IN.z = in.z= 0.0;
+ OUT.x = IN.x = in.x = 0.0;
+ OUT.y = IN.y = in.y = 0.0;
+ OUT.z = IN.z = in.z = 0.0;
calc_mballco(ml, (float *)&in);
in_v = mbproc->function(in.x, in.y, in.z);
- for (i=0;i<3;i++) {
+ for (i = 0; i < 3; i++) {
switch (ml->type) {
case MB_BALL:
- OUT.x = out.x= IN.x + index[i]*ml->rad;
+ OUT.x = out.x = IN.x + index[i] * ml->rad;
break;
case MB_TUBE:
case MB_PLANE:
case MB_ELIPSOID:
case MB_CUBE:
- OUT.x = out.x= IN.x + index[i]*(ml->expx + ml->rad);
+ OUT.x = out.x = IN.x + index[i] * (ml->expx + ml->rad);
break;
}
- for (j=0;j<3;j++) {
+ for (j = 0; j < 3; j++) {
switch (ml->type) {
case MB_BALL:
- OUT.y = out.y= IN.y + index[j]*ml->rad;
+ OUT.y = out.y = IN.y + index[j] * ml->rad;
break;
case MB_TUBE:
case MB_PLANE:
case MB_ELIPSOID:
case MB_CUBE:
- OUT.y = out.y= IN.y + index[j]*(ml->expy + ml->rad);
+ OUT.y = out.y = IN.y + index[j] * (ml->expy + ml->rad);
break;
}
- for (k=0;k<3;k++) {
+ for (k = 0; k < 3; k++) {
out.x = OUT.x;
out.y = OUT.y;
switch (ml->type) {
case MB_BALL:
case MB_TUBE:
case MB_PLANE:
- out.z= IN.z + index[k]*ml->rad;
+ out.z = IN.z + index[k] * ml->rad;
break;
case MB_ELIPSOID:
case MB_CUBE:
- out.z= IN.z + index[k]*(ml->expz + ml->rad);
+ out.z = IN.z + index[k] * (ml->expz + ml->rad);
break;
}
@@ -1501,32 +1608,32 @@ void find_first_points(PROCESS *mbproc, MetaBall *mb, int a)
workp.y = in.y;
workp.z = in.z;
workp_v = in_v;
- max_len = sqrtf((out.x-in.x)*(out.x-in.x) + (out.y-in.y)*(out.y-in.y) + (out.z-in.z)*(out.z-in.z));
+ max_len = sqrtf((out.x - in.x) * (out.x - in.x) + (out.y - in.y) * (out.y - in.y) + (out.z - in.z) * (out.z - in.z));
- nx = abs((out.x - in.x)/mbproc->size);
- ny = abs((out.y - in.y)/mbproc->size);
- nz = abs((out.z - in.z)/mbproc->size);
+ nx = abs((out.x - in.x) / mbproc->size);
+ ny = abs((out.y - in.y) / mbproc->size);
+ nz = abs((out.z - in.z) / mbproc->size);
- MAXN = MAX3(nx,ny,nz);
- if (MAXN!=0.0f) {
- dx = (out.x - in.x)/MAXN;
- dy = (out.y - in.y)/MAXN;
- dz = (out.z - in.z)/MAXN;
+ MAXN = MAX3(nx, ny, nz);
+ if (MAXN != 0.0f) {
+ dx = (out.x - in.x) / MAXN;
+ dy = (out.y - in.y) / MAXN;
+ dz = (out.z - in.z) / MAXN;
len = 0.0;
- while (len<=max_len) {
+ while (len <= max_len) {
workp.x += dx;
workp.y += dy;
workp.z += dz;
/* compute value of implicite function */
tmp_v = mbproc->function(workp.x, workp.y, workp.z);
/* add cube to the stack, when value of implicite function crosses zero value */
- if ((tmp_v<0.0f && workp_v>=0.0f)||(tmp_v>0.0f && workp_v<=0.0f)) {
+ if ((tmp_v < 0.0f && workp_v >= 0.0f) || (tmp_v > 0.0f && workp_v <= 0.0f)) {
/* indexes of CUBE, which includes "first point" */
- c_i= (int)floor(workp.x/mbproc->size);
- c_j= (int)floor(workp.y/mbproc->size);
- c_k= (int)floor(workp.z/mbproc->size);
+ c_i = (int)floor(workp.x / mbproc->size);
+ c_j = (int)floor(workp.y / mbproc->size);
+ c_k = (int)floor(workp.z / mbproc->size);
/* add CUBE (with indexes c_i, c_j, c_k) to the stack,
* this cube includes found point of Implicit Surface */
@@ -1535,7 +1642,7 @@ void find_first_points(PROCESS *mbproc, MetaBall *mb, int a)
else
add_cube(mbproc, c_i, c_j, c_k, 1);
}
- len = sqrtf((workp.x-in.x)*(workp.x-in.x) + (workp.y-in.y)*(workp.y-in.y) + (workp.z-in.z)*(workp.z-in.z));
+ len = sqrtf((workp.x - in.x) * (workp.x - in.x) + (workp.y - in.y) * (workp.y - in.y) + (workp.z - in.z) * (workp.z - in.z));
workp_v = tmp_v;
}
@@ -1546,7 +1653,7 @@ void find_first_points(PROCESS *mbproc, MetaBall *mb, int a)
}
}
-void polygonize(PROCESS *mbproc, MetaBall *mb)
+static void polygonize(PROCESS *mbproc, MetaBall *mb)
{
CUBE c;
int a;
@@ -1557,10 +1664,10 @@ void polygonize(PROCESS *mbproc, MetaBall *mb)
/* allocate hash tables and build cube polygon table: */
mbproc->centers = MEM_callocN(HASHSIZE * sizeof(CENTERLIST *), "mbproc->centers");
mbproc->corners = MEM_callocN(HASHSIZE * sizeof(CORNER *), "mbproc->corners");
- mbproc->edges = MEM_callocN(2*HASHSIZE * sizeof(EDGELIST *), "mbproc->edges");
+ mbproc->edges = MEM_callocN(2 * HASHSIZE * sizeof(EDGELIST *), "mbproc->edges");
makecubetable();
- for (a=0; a<totelem; a++) {
+ for (a = 0; a < totelem; a++) {
/* try to find 8 points on the surface for each MetaElem */
find_first_points(mbproc, mb, a);
@@ -1577,232 +1684,232 @@ void polygonize(PROCESS *mbproc, MetaBall *mb)
mbproc->cubes = mbproc->cubes->next;
/* test six face directions, maybe add to stack: */
- testface(c.i-1, c.j, c.k, &c, 2, LBN, LBF, LTN, LTF, mbproc);
- testface(c.i+1, c.j, c.k, &c, 2, RBN, RBF, RTN, RTF, mbproc);
- testface(c.i, c.j-1, c.k, &c, 1, LBN, LBF, RBN, RBF, mbproc);
- testface(c.i, c.j+1, c.k, &c, 1, LTN, LTF, RTN, RTF, mbproc);
- testface(c.i, c.j, c.k-1, &c, 0, LBN, LTN, RBN, RTN, mbproc);
- testface(c.i, c.j, c.k+1, &c, 0, LBF, LTF, RBF, RTF, mbproc);
+ testface(c.i - 1, c.j, c.k, &c, 2, LBN, LBF, LTN, LTF, mbproc);
+ testface(c.i + 1, c.j, c.k, &c, 2, RBN, RBF, RTN, RTF, mbproc);
+ testface(c.i, c.j - 1, c.k, &c, 1, LBN, LBF, RBN, RBF, mbproc);
+ testface(c.i, c.j + 1, c.k, &c, 1, LTN, LTF, RTN, RTF, mbproc);
+ testface(c.i, c.j, c.k - 1, &c, 0, LBN, LTN, RBN, RTN, mbproc);
+ testface(c.i, c.j, c.k + 1, &c, 0, LBF, LTF, RBF, RTF, mbproc);
}
}
-float init_meta(Scene *scene, Object *ob) /* return totsize */
+static float init_meta(Scene *scene, Object *ob) /* return totsize */
{
- Scene *sce_iter= scene;
+ Scene *sce_iter = scene;
Base *base;
Object *bob;
MetaBall *mb;
MetaElem *ml;
float size, totsize, obinv[4][4], obmat[4][4], vec[3];
//float max=0.0;
- int a, obnr, zero_size=0;
+ int a, obnr, zero_size = 0;
char obname[MAX_ID_NAME];
- copy_m4_m4(obmat, ob->obmat); /* to cope with duplicators from next_object */
+ copy_m4_m4(obmat, ob->obmat); /* to cope with duplicators from BKE_scene_base_iter_next */
invert_m4_m4(obinv, ob->obmat);
- a= 0;
+ a = 0;
- BLI_split_name_num(obname, &obnr, ob->id.name+2, '.');
+ BLI_split_name_num(obname, &obnr, ob->id.name + 2, '.');
/* make main array */
- next_object(&sce_iter, 0, NULL, NULL);
- while (next_object(&sce_iter, 1, &base, &bob)) {
+ BKE_scene_base_iter_next(&sce_iter, 0, NULL, NULL);
+ while (BKE_scene_base_iter_next(&sce_iter, 1, &base, &bob)) {
- if (bob->type==OB_MBALL) {
- zero_size= 0;
- ml= NULL;
+ if (bob->type == OB_MBALL) {
+ zero_size = 0;
+ ml = NULL;
- if (bob==ob && (base->flag & OB_FROMDUPLI)==0) {
- mb= ob->data;
+ if (bob == ob && (base->flag & OB_FROMDUPLI) == 0) {
+ mb = ob->data;
- if (mb->editelems) ml= mb->editelems->first;
- else ml= mb->elems.first;
+ if (mb->editelems) ml = mb->editelems->first;
+ else ml = mb->elems.first;
}
else {
char name[MAX_ID_NAME];
int nr;
- BLI_split_name_num(name, &nr, bob->id.name+2, '.');
- if ( strcmp(obname, name)==0 ) {
- mb= bob->data;
+ BLI_split_name_num(name, &nr, bob->id.name + 2, '.');
+ if (strcmp(obname, name) == 0) {
+ mb = bob->data;
- if (mb->editelems) ml= mb->editelems->first;
- else ml= mb->elems.first;
+ if (mb->editelems) ml = mb->editelems->first;
+ else ml = mb->elems.first;
}
}
/* when metaball object has zero scale, then MetaElem to this MetaBall
* will not be put to mainb array */
- if (bob->size[0]==0.0f || bob->size[1]==0.0f || bob->size[2]==0.0f) {
- zero_size= 1;
+ if (bob->size[0] == 0.0f || bob->size[1] == 0.0f || bob->size[2] == 0.0f) {
+ zero_size = 1;
}
else if (bob->parent) {
- struct Object *pob=bob->parent;
+ struct Object *pob = bob->parent;
while (pob) {
- if (pob->size[0]==0.0f || pob->size[1]==0.0f || pob->size[2]==0.0f) {
- zero_size= 1;
+ if (pob->size[0] == 0.0f || pob->size[1] == 0.0f || pob->size[2] == 0.0f) {
+ zero_size = 1;
break;
}
- pob= pob->parent;
+ pob = pob->parent;
}
}
if (zero_size) {
- unsigned int ml_count=0;
+ unsigned int ml_count = 0;
while (ml) {
ml_count++;
- ml= ml->next;
+ ml = ml->next;
}
totelem -= ml_count;
}
else {
- while (ml) {
- if (!(ml->flag & MB_HIDE)) {
- int i;
- float temp1[4][4], temp2[4][4], temp3[4][4];
- float (*mat)[4] = NULL, (*imat)[4] = NULL;
- float max_x, max_y, max_z, min_x, min_y, min_z;
-
- max_x = max_y = max_z = -3.4e38;
- min_x = min_y = min_z = 3.4e38;
-
- /* too big stiffness seems only ugly due to linear interpolation
- * no need to have possibility for too big stiffness */
- if (ml->s > 10.0f) ml->s = 10.0f;
+ while (ml) {
+ if (!(ml->flag & MB_HIDE)) {
+ int i;
+ float temp1[4][4], temp2[4][4], temp3[4][4];
+ float (*mat)[4] = NULL, (*imat)[4] = NULL;
+ float max_x, max_y, max_z, min_x, min_y, min_z;
+
+ max_x = max_y = max_z = -3.4e38;
+ min_x = min_y = min_z = 3.4e38;
+
+ /* too big stiffness seems only ugly due to linear interpolation
+ * no need to have possibility for too big stiffness */
+ if (ml->s > 10.0f) ml->s = 10.0f;
+
+ /* Rotation of MetaElem is stored in quat */
+ quat_to_mat4(temp3, ml->quat);
+
+ /* Translation of MetaElem */
+ unit_m4(temp2);
+ temp2[3][0] = ml->x;
+ temp2[3][1] = ml->y;
+ temp2[3][2] = ml->z;
+
+ mult_m4_m4m4(temp1, temp2, temp3);
+
+ /* make a copy because of duplicates */
+ mainb[a] = new_pgn_element(sizeof(MetaElem));
+ *(mainb[a]) = *ml;
+ mainb[a]->bb = new_pgn_element(sizeof(BoundBox));
+
+ mat = new_pgn_element(4 * 4 * sizeof(float));
+ imat = new_pgn_element(4 * 4 * sizeof(float));
+
+ /* mat is the matrix to transform from mball into the basis-mball */
+ invert_m4_m4(obinv, obmat);
+ mult_m4_m4m4(temp2, obinv, bob->obmat);
+ /* MetaBall transformation */
+ mult_m4_m4m4(mat, temp2, temp1);
+
+ invert_m4_m4(imat, mat);
+
+ mainb[a]->rad2 = ml->rad * ml->rad;
+
+ mainb[a]->mat = (float *) mat;
+ mainb[a]->imat = (float *) imat;
+
+ /* untransformed Bounding Box of MetaElem */
+ /* 0 */
+ mainb[a]->bb->vec[0][0] = -ml->expx;
+ mainb[a]->bb->vec[0][1] = -ml->expy;
+ mainb[a]->bb->vec[0][2] = -ml->expz;
+ /* 1 */
+ mainb[a]->bb->vec[1][0] = ml->expx;
+ mainb[a]->bb->vec[1][1] = -ml->expy;
+ mainb[a]->bb->vec[1][2] = -ml->expz;
+ /* 2 */
+ mainb[a]->bb->vec[2][0] = ml->expx;
+ mainb[a]->bb->vec[2][1] = ml->expy;
+ mainb[a]->bb->vec[2][2] = -ml->expz;
+ /* 3 */
+ mainb[a]->bb->vec[3][0] = -ml->expx;
+ mainb[a]->bb->vec[3][1] = ml->expy;
+ mainb[a]->bb->vec[3][2] = -ml->expz;
+ /* 4 */
+ mainb[a]->bb->vec[4][0] = -ml->expx;
+ mainb[a]->bb->vec[4][1] = -ml->expy;
+ mainb[a]->bb->vec[4][2] = ml->expz;
+ /* 5 */
+ mainb[a]->bb->vec[5][0] = ml->expx;
+ mainb[a]->bb->vec[5][1] = -ml->expy;
+ mainb[a]->bb->vec[5][2] = ml->expz;
+ /* 6 */
+ mainb[a]->bb->vec[6][0] = ml->expx;
+ mainb[a]->bb->vec[6][1] = ml->expy;
+ mainb[a]->bb->vec[6][2] = ml->expz;
+ /* 7 */
+ mainb[a]->bb->vec[7][0] = -ml->expx;
+ mainb[a]->bb->vec[7][1] = ml->expy;
+ mainb[a]->bb->vec[7][2] = ml->expz;
+
+ /* transformation of Metalem bb */
+ for (i = 0; i < 8; i++)
+ mul_m4_v3((float (*)[4])mat, mainb[a]->bb->vec[i]);
+
+ /* find max and min of transformed bb */
+ for (i = 0; i < 8; i++) {
+ /* find maximums */
+ if (mainb[a]->bb->vec[i][0] > max_x) max_x = mainb[a]->bb->vec[i][0];
+ if (mainb[a]->bb->vec[i][1] > max_y) max_y = mainb[a]->bb->vec[i][1];
+ if (mainb[a]->bb->vec[i][2] > max_z) max_z = mainb[a]->bb->vec[i][2];
+ /* find minimums */
+ if (mainb[a]->bb->vec[i][0] < min_x) min_x = mainb[a]->bb->vec[i][0];
+ if (mainb[a]->bb->vec[i][1] < min_y) min_y = mainb[a]->bb->vec[i][1];
+ if (mainb[a]->bb->vec[i][2] < min_z) min_z = mainb[a]->bb->vec[i][2];
+ }
- /* Rotation of MetaElem is stored in quat */
- quat_to_mat4( temp3,ml->quat);
+ /* create "new" bb, only point 0 and 6, which are
+ * necessary for octal tree filling */
+ mainb[a]->bb->vec[0][0] = min_x - ml->rad;
+ mainb[a]->bb->vec[0][1] = min_y - ml->rad;
+ mainb[a]->bb->vec[0][2] = min_z - ml->rad;
- /* Translation of MetaElem */
- unit_m4(temp2);
- temp2[3][0]= ml->x;
- temp2[3][1]= ml->y;
- temp2[3][2]= ml->z;
+ mainb[a]->bb->vec[6][0] = max_x + ml->rad;
+ mainb[a]->bb->vec[6][1] = max_y + ml->rad;
+ mainb[a]->bb->vec[6][2] = max_z + ml->rad;
- mult_m4_m4m4(temp1, temp2, temp3);
-
- /* make a copy because of duplicates */
- mainb[a]= new_pgn_element(sizeof(MetaElem));
- *(mainb[a])= *ml;
- mainb[a]->bb = new_pgn_element(sizeof(BoundBox));
-
- mat= new_pgn_element(4*4*sizeof(float));
- imat= new_pgn_element(4*4*sizeof(float));
-
- /* mat is the matrix to transform from mball into the basis-mball */
- invert_m4_m4(obinv, obmat);
- mult_m4_m4m4(temp2, obinv, bob->obmat);
- /* MetaBall transformation */
- mult_m4_m4m4(mat, temp2, temp1);
-
- invert_m4_m4(imat,mat);
-
- mainb[a]->rad2= ml->rad*ml->rad;
-
- mainb[a]->mat= (float*) mat;
- mainb[a]->imat= (float*) imat;
-
- /* untransformed Bounding Box of MetaElem */
- /* 0 */
- mainb[a]->bb->vec[0][0]= -ml->expx;
- mainb[a]->bb->vec[0][1]= -ml->expy;
- mainb[a]->bb->vec[0][2]= -ml->expz;
- /* 1 */
- mainb[a]->bb->vec[1][0]= ml->expx;
- mainb[a]->bb->vec[1][1]= -ml->expy;
- mainb[a]->bb->vec[1][2]= -ml->expz;
- /* 2 */
- mainb[a]->bb->vec[2][0]= ml->expx;
- mainb[a]->bb->vec[2][1]= ml->expy;
- mainb[a]->bb->vec[2][2]= -ml->expz;
- /* 3 */
- mainb[a]->bb->vec[3][0]= -ml->expx;
- mainb[a]->bb->vec[3][1]= ml->expy;
- mainb[a]->bb->vec[3][2]= -ml->expz;
- /* 4 */
- mainb[a]->bb->vec[4][0]= -ml->expx;
- mainb[a]->bb->vec[4][1]= -ml->expy;
- mainb[a]->bb->vec[4][2]= ml->expz;
- /* 5 */
- mainb[a]->bb->vec[5][0]= ml->expx;
- mainb[a]->bb->vec[5][1]= -ml->expy;
- mainb[a]->bb->vec[5][2]= ml->expz;
- /* 6 */
- mainb[a]->bb->vec[6][0]= ml->expx;
- mainb[a]->bb->vec[6][1]= ml->expy;
- mainb[a]->bb->vec[6][2]= ml->expz;
- /* 7 */
- mainb[a]->bb->vec[7][0]= -ml->expx;
- mainb[a]->bb->vec[7][1]= ml->expy;
- mainb[a]->bb->vec[7][2]= ml->expz;
-
- /* transformation of Metalem bb */
- for (i=0; i<8; i++)
- mul_m4_v3((float ( * )[4])mat, mainb[a]->bb->vec[i]);
-
- /* find max and min of transformed bb */
- for (i=0; i<8; i++) {
- /* find maximums */
- if (mainb[a]->bb->vec[i][0] > max_x) max_x = mainb[a]->bb->vec[i][0];
- if (mainb[a]->bb->vec[i][1] > max_y) max_y = mainb[a]->bb->vec[i][1];
- if (mainb[a]->bb->vec[i][2] > max_z) max_z = mainb[a]->bb->vec[i][2];
- /* find minimums */
- if (mainb[a]->bb->vec[i][0] < min_x) min_x = mainb[a]->bb->vec[i][0];
- if (mainb[a]->bb->vec[i][1] < min_y) min_y = mainb[a]->bb->vec[i][1];
- if (mainb[a]->bb->vec[i][2] < min_z) min_z = mainb[a]->bb->vec[i][2];
+ a++;
}
-
- /* create "new" bb, only point 0 and 6, which are
- * necessary for octal tree filling */
- mainb[a]->bb->vec[0][0] = min_x - ml->rad;
- mainb[a]->bb->vec[0][1] = min_y - ml->rad;
- mainb[a]->bb->vec[0][2] = min_z - ml->rad;
-
- mainb[a]->bb->vec[6][0] = max_x + ml->rad;
- mainb[a]->bb->vec[6][1] = max_y + ml->rad;
- mainb[a]->bb->vec[6][2] = max_z + ml->rad;
-
- a++;
+ ml = ml->next;
}
- ml= ml->next;
- }
}
}
}
/* totsize (= 'manhattan' radius) */
- totsize= 0.0;
- for (a=0; a<totelem; a++) {
+ totsize = 0.0;
+ for (a = 0; a < totelem; a++) {
- vec[0]= mainb[a]->x + mainb[a]->rad + mainb[a]->expx;
- vec[1]= mainb[a]->y + mainb[a]->rad + mainb[a]->expy;
- vec[2]= mainb[a]->z + mainb[a]->rad + mainb[a]->expz;
+ vec[0] = mainb[a]->x + mainb[a]->rad + mainb[a]->expx;
+ vec[1] = mainb[a]->y + mainb[a]->rad + mainb[a]->expy;
+ vec[2] = mainb[a]->z + mainb[a]->rad + mainb[a]->expz;
calc_mballco(mainb[a], vec);
- size= fabsf( vec[0] );
- if ( size > totsize ) totsize= size;
- size= fabsf( vec[1] );
- if ( size > totsize ) totsize= size;
- size= fabsf( vec[2] );
- if ( size > totsize ) totsize= size;
+ size = fabsf(vec[0]);
+ if (size > totsize) totsize = size;
+ size = fabsf(vec[1]);
+ if (size > totsize) totsize = size;
+ size = fabsf(vec[2]);
+ if (size > totsize) totsize = size;
- vec[0]= mainb[a]->x - mainb[a]->rad;
- vec[1]= mainb[a]->y - mainb[a]->rad;
- vec[2]= mainb[a]->z - mainb[a]->rad;
+ vec[0] = mainb[a]->x - mainb[a]->rad;
+ vec[1] = mainb[a]->y - mainb[a]->rad;
+ vec[2] = mainb[a]->z - mainb[a]->rad;
calc_mballco(mainb[a], vec);
- size= fabsf( vec[0] );
- if ( size > totsize ) totsize= size;
- size= fabsf( vec[1] );
- if ( size > totsize ) totsize= size;
- size= fabsf( vec[2] );
- if ( size > totsize ) totsize= size;
+ size = fabsf(vec[0]);
+ if (size > totsize) totsize = size;
+ size = fabsf(vec[1]);
+ if (size > totsize) totsize = size;
+ size = fabsf(vec[2]);
+ if (size > totsize) totsize = size;
}
- for (a=0; a<totelem; a++) {
+ for (a = 0; a < totelem; a++) {
thresh += densfunc(mainb[a], 2.0f * totsize, 2.0f * totsize, 2.0f * totsize);
}
@@ -1812,12 +1919,12 @@ float init_meta(Scene *scene, Object *ob) /* return totsize */
/* if MetaElem lies in node, then node includes MetaElem pointer (ml_p)
* pointing at MetaElem (ml)
*/
-void fill_metaball_octal_node(octal_node *node, MetaElem *ml, short i)
+static void fill_metaball_octal_node(octal_node *node, MetaElem *ml, short i)
{
ml_pointer *ml_p;
- ml_p= MEM_mallocN(sizeof(ml_pointer), "ml_pointer");
- ml_p->ml= ml;
+ ml_p = MEM_mallocN(sizeof(ml_pointer), "ml_pointer");
+ ml_p->ml = ml;
BLI_addtail(&(node->nodes[i]->elems), ml_p);
node->count++;
@@ -1844,24 +1951,24 @@ void fill_metaball_octal_node(octal_node *node, MetaElem *ml, short i)
* +------+------+
*
*/
-void subdivide_metaball_octal_node(octal_node *node, float size_x, float size_y, float size_z, short depth)
+static void subdivide_metaball_octal_node(octal_node *node, float size_x, float size_y, float size_z, short depth)
{
MetaElem *ml;
ml_pointer *ml_p;
- float x,y,z;
- int a,i;
+ float x, y, z;
+ int a, i;
/* create new nodes */
- for (a=0;a<8;a++) {
- node->nodes[a]= MEM_mallocN(sizeof(octal_node),"octal_node");
- for (i=0;i<8;i++)
- node->nodes[a]->nodes[i]= NULL;
- node->nodes[a]->parent= node;
- node->nodes[a]->elems.first= NULL;
- node->nodes[a]->elems.last= NULL;
- node->nodes[a]->count= 0;
- node->nodes[a]->neg= 0;
- node->nodes[a]->pos= 0;
+ for (a = 0; a < 8; a++) {
+ node->nodes[a] = MEM_mallocN(sizeof(octal_node), "octal_node");
+ for (i = 0; i < 8; i++)
+ node->nodes[a]->nodes[i] = NULL;
+ node->nodes[a]->parent = node;
+ node->nodes[a]->elems.first = NULL;
+ node->nodes[a]->elems.last = NULL;
+ node->nodes[a]->count = 0;
+ node->nodes[a]->neg = 0;
+ node->nodes[a]->pos = 0;
}
size_x /= 2;
@@ -1877,64 +1984,64 @@ void subdivide_metaball_octal_node(octal_node *node, float size_x, float size_y,
node->nodes[0]->x_min = node->x_min;
node->nodes[0]->y_min = node->y_min;
node->nodes[0]->z_min = node->z_min;
- node->nodes[0]->x = node->nodes[0]->x_min + size_x/2;
- node->nodes[0]->y = node->nodes[0]->y_min + size_y/2;
- node->nodes[0]->z = node->nodes[0]->z_min + size_z/2;
+ node->nodes[0]->x = node->nodes[0]->x_min + size_x / 2;
+ node->nodes[0]->y = node->nodes[0]->y_min + size_y / 2;
+ node->nodes[0]->z = node->nodes[0]->z_min + size_z / 2;
node->nodes[1]->x_min = x;
node->nodes[1]->y_min = node->y_min;
node->nodes[1]->z_min = node->z_min;
- node->nodes[1]->x = node->nodes[1]->x_min + size_x/2;
- node->nodes[1]->y = node->nodes[1]->y_min + size_y/2;
- node->nodes[1]->z = node->nodes[1]->z_min + size_z/2;
+ node->nodes[1]->x = node->nodes[1]->x_min + size_x / 2;
+ node->nodes[1]->y = node->nodes[1]->y_min + size_y / 2;
+ node->nodes[1]->z = node->nodes[1]->z_min + size_z / 2;
node->nodes[2]->x_min = x;
node->nodes[2]->y_min = y;
node->nodes[2]->z_min = node->z_min;
- node->nodes[2]->x = node->nodes[2]->x_min + size_x/2;
- node->nodes[2]->y = node->nodes[2]->y_min + size_y/2;
- node->nodes[2]->z = node->nodes[2]->z_min + size_z/2;
+ node->nodes[2]->x = node->nodes[2]->x_min + size_x / 2;
+ node->nodes[2]->y = node->nodes[2]->y_min + size_y / 2;
+ node->nodes[2]->z = node->nodes[2]->z_min + size_z / 2;
node->nodes[3]->x_min = node->x_min;
node->nodes[3]->y_min = y;
node->nodes[3]->z_min = node->z_min;
- node->nodes[3]->x = node->nodes[3]->x_min + size_x/2;
- node->nodes[3]->y = node->nodes[3]->y_min + size_y/2;
- node->nodes[3]->z = node->nodes[3]->z_min + size_z/2;
+ node->nodes[3]->x = node->nodes[3]->x_min + size_x / 2;
+ node->nodes[3]->y = node->nodes[3]->y_min + size_y / 2;
+ node->nodes[3]->z = node->nodes[3]->z_min + size_z / 2;
node->nodes[4]->x_min = node->x_min;
node->nodes[4]->y_min = node->y_min;
node->nodes[4]->z_min = z;
- node->nodes[4]->x = node->nodes[4]->x_min + size_x/2;
- node->nodes[4]->y = node->nodes[4]->y_min + size_y/2;
- node->nodes[4]->z = node->nodes[4]->z_min + size_z/2;
+ node->nodes[4]->x = node->nodes[4]->x_min + size_x / 2;
+ node->nodes[4]->y = node->nodes[4]->y_min + size_y / 2;
+ node->nodes[4]->z = node->nodes[4]->z_min + size_z / 2;
node->nodes[5]->x_min = x;
node->nodes[5]->y_min = node->y_min;
node->nodes[5]->z_min = z;
- node->nodes[5]->x = node->nodes[5]->x_min + size_x/2;
- node->nodes[5]->y = node->nodes[5]->y_min + size_y/2;
- node->nodes[5]->z = node->nodes[5]->z_min + size_z/2;
+ node->nodes[5]->x = node->nodes[5]->x_min + size_x / 2;
+ node->nodes[5]->y = node->nodes[5]->y_min + size_y / 2;
+ node->nodes[5]->z = node->nodes[5]->z_min + size_z / 2;
node->nodes[6]->x_min = x;
node->nodes[6]->y_min = y;
node->nodes[6]->z_min = z;
- node->nodes[6]->x = node->nodes[6]->x_min + size_x/2;
- node->nodes[6]->y = node->nodes[6]->y_min + size_y/2;
- node->nodes[6]->z = node->nodes[6]->z_min + size_z/2;
+ node->nodes[6]->x = node->nodes[6]->x_min + size_x / 2;
+ node->nodes[6]->y = node->nodes[6]->y_min + size_y / 2;
+ node->nodes[6]->z = node->nodes[6]->z_min + size_z / 2;
node->nodes[7]->x_min = node->x_min;
node->nodes[7]->y_min = y;
node->nodes[7]->z_min = z;
- node->nodes[7]->x = node->nodes[7]->x_min + size_x/2;
- node->nodes[7]->y = node->nodes[7]->y_min + size_y/2;
- node->nodes[7]->z = node->nodes[7]->z_min + size_z/2;
+ node->nodes[7]->x = node->nodes[7]->x_min + size_x / 2;
+ node->nodes[7]->y = node->nodes[7]->y_min + size_y / 2;
+ node->nodes[7]->z = node->nodes[7]->z_min + size_z / 2;
- ml_p= node->elems.first;
+ ml_p = node->elems.first;
/* setting up references of MetaElems for new nodes */
while (ml_p) {
- ml= ml_p->ml;
+ ml = ml_p->ml;
if (ml->bb->vec[0][2] < z) {
if (ml->bb->vec[0][1] < y) {
/* vec[0][0] lies in first octant */
@@ -2084,7 +2191,7 @@ void subdivide_metaball_octal_node(octal_node *node, float size_x, float size_y,
fill_metaball_octal_node(node, ml, 6);
}
}
- ml_p= ml_p->next;
+ ml_p = ml_p->next;
}
/* free references of MetaElems for curent node (it is not needed anymore) */
@@ -2092,8 +2199,8 @@ void subdivide_metaball_octal_node(octal_node *node, float size_x, float size_y,
depth--;
- if (depth>0) {
- for (a=0;a<8;a++) {
+ if (depth > 0) {
+ for (a = 0; a < 8; a++) {
if (node->nodes[a]->count > 0) /* if node is not empty, then it is subdivided */
subdivide_metaball_octal_node(node->nodes[a], size_x, size_y, size_z, depth);
}
@@ -2101,54 +2208,54 @@ void subdivide_metaball_octal_node(octal_node *node, float size_x, float size_y,
}
/* free all octal nodes recursively */
-void free_metaball_octal_node(octal_node *node)
+static void free_metaball_octal_node(octal_node *node)
{
int a;
- for (a=0;a<8;a++) {
- if (node->nodes[a]!=NULL) free_metaball_octal_node(node->nodes[a]);
+ for (a = 0; a < 8; a++) {
+ if (node->nodes[a] != NULL) free_metaball_octal_node(node->nodes[a]);
}
BLI_freelistN(&node->elems);
MEM_freeN(node);
}
/* If scene include more then one MetaElem, then octree is used */
-void init_metaball_octal_tree(int depth)
+static void init_metaball_octal_tree(int depth)
{
struct octal_node *node;
ml_pointer *ml_p;
float size[3];
int a;
- metaball_tree= MEM_mallocN(sizeof(octal_tree), "metaball_octal_tree");
- metaball_tree->first= node= MEM_mallocN(sizeof(octal_node), "metaball_octal_node");
+ metaball_tree = MEM_mallocN(sizeof(octal_tree), "metaball_octal_tree");
+ metaball_tree->first = node = MEM_mallocN(sizeof(octal_node), "metaball_octal_node");
/* maximal depth of octree */
- metaball_tree->depth= depth;
+ metaball_tree->depth = depth;
- metaball_tree->neg= node->neg=0;
- metaball_tree->pos= node->pos=0;
+ metaball_tree->neg = node->neg = 0;
+ metaball_tree->pos = node->pos = 0;
- node->elems.first= NULL;
- node->elems.last= NULL;
- node->count=0;
+ node->elems.first = NULL;
+ node->elems.last = NULL;
+ node->count = 0;
- for (a=0;a<8;a++)
- node->nodes[a]=NULL;
+ for (a = 0; a < 8; a++)
+ node->nodes[a] = NULL;
- node->x_min= node->y_min= node->z_min= FLT_MAX;
- node->x_max= node->y_max= node->z_max= -FLT_MAX;
+ node->x_min = node->y_min = node->z_min = FLT_MAX;
+ node->x_max = node->y_max = node->z_max = -FLT_MAX;
/* size of octal tree scene */
- for (a=0;a<totelem;a++) {
- if (mainb[a]->bb->vec[0][0] < node->x_min) node->x_min= mainb[a]->bb->vec[0][0];
- if (mainb[a]->bb->vec[0][1] < node->y_min) node->y_min= mainb[a]->bb->vec[0][1];
- if (mainb[a]->bb->vec[0][2] < node->z_min) node->z_min= mainb[a]->bb->vec[0][2];
-
- if (mainb[a]->bb->vec[6][0] > node->x_max) node->x_max= mainb[a]->bb->vec[6][0];
- if (mainb[a]->bb->vec[6][1] > node->y_max) node->y_max= mainb[a]->bb->vec[6][1];
- if (mainb[a]->bb->vec[6][2] > node->z_max) node->z_max= mainb[a]->bb->vec[6][2];
+ for (a = 0; a < totelem; a++) {
+ if (mainb[a]->bb->vec[0][0] < node->x_min) node->x_min = mainb[a]->bb->vec[0][0];
+ if (mainb[a]->bb->vec[0][1] < node->y_min) node->y_min = mainb[a]->bb->vec[0][1];
+ if (mainb[a]->bb->vec[0][2] < node->z_min) node->z_min = mainb[a]->bb->vec[0][2];
+
+ if (mainb[a]->bb->vec[6][0] > node->x_max) node->x_max = mainb[a]->bb->vec[6][0];
+ if (mainb[a]->bb->vec[6][1] > node->y_max) node->y_max = mainb[a]->bb->vec[6][1];
+ if (mainb[a]->bb->vec[6][2] > node->z_max) node->z_max = mainb[a]->bb->vec[6][2];
- ml_p= MEM_mallocN(sizeof(ml_pointer), "ml_pointer");
- ml_p->ml= mainb[a];
+ ml_p = MEM_mallocN(sizeof(ml_pointer), "ml_pointer");
+ ml_p->ml = mainb[a];
BLI_addtail(&node->elems, ml_p);
if (mainb[a]->flag & MB_NEGATIVE) {
@@ -2162,15 +2269,15 @@ void init_metaball_octal_tree(int depth)
}
/* size of first node */
- size[0]= node->x_max - node->x_min;
- size[1]= node->y_max - node->y_min;
- size[2]= node->z_max - node->z_min;
+ size[0] = node->x_max - node->x_min;
+ size[1] = node->y_max - node->y_min;
+ size[2] = node->z_max - node->z_min;
/* first node is subdivided recursively */
subdivide_metaball_octal_node(node, size[0], size[1], size[2], metaball_tree->depth);
}
-void metaball_polygonize(Scene *scene, Object *ob, ListBase *dispbase)
+void BKE_mball_polygonize(Scene *scene, Object *ob, ListBase *dispbase)
{
PROCESS mbproc;
MetaBall *mb;
@@ -2178,41 +2285,41 @@ void metaball_polygonize(Scene *scene, Object *ob, ListBase *dispbase)
int a, nr_cubes;
float *ve, *no, totsize, width;
- mb= ob->data;
+ mb = ob->data;
- if (totelem==0) return;
- if (!(G.rendering) && (mb->flag==MB_UPDATE_NEVER)) return;
- if (G.moving && mb->flag==MB_UPDATE_FAST) return;
+ if (totelem == 0) return;
+ if (!(G.rendering) && (mb->flag == MB_UPDATE_NEVER)) return;
+ if (G.moving && mb->flag == MB_UPDATE_FAST) return;
- curindex= totindex= 0;
- indices= NULL;
- thresh= mb->thresh;
+ curindex = totindex = 0;
+ indices = NULL;
+ thresh = mb->thresh;
/* total number of MetaElems (totelem) is precomputed in find_basis_mball() function */
- mainb= MEM_mallocN(sizeof(void *)*totelem, "mainb");
+ mainb = MEM_mallocN(sizeof(void *) * totelem, "mainb");
/* initialize all mainb (MetaElems) */
- totsize= init_meta(scene, ob);
+ totsize = init_meta(scene, ob);
if (metaball_tree) {
free_metaball_octal_node(metaball_tree->first);
MEM_freeN(metaball_tree);
- metaball_tree= NULL;
+ metaball_tree = NULL;
}
/* if scene includes more then one MetaElem, then octal tree optimalisation is used */
if ((totelem > 1) && (totelem <= 64)) init_metaball_octal_tree(1);
if ((totelem > 64) && (totelem <= 128)) init_metaball_octal_tree(2);
- if ((totelem > 128) && (totelem <= 512)) init_metaball_octal_tree(3);
+ if ((totelem > 128) && (totelem <= 512)) init_metaball_octal_tree(3);
if ((totelem > 512) && (totelem <= 1024)) init_metaball_octal_tree(4);
if (totelem > 1024) init_metaball_octal_tree(5);
/* don't polygonize metaballs with too high resolution (base mball to small)
* note: Eps was 0.0001f but this was giving problems for blood animation for durian, using 0.00001f */
if (metaball_tree) {
- if ( ob->size[0] <= 0.00001f * (metaball_tree->first->x_max - metaball_tree->first->x_min) ||
- ob->size[1] <= 0.00001f * (metaball_tree->first->y_max - metaball_tree->first->y_min) ||
- ob->size[2] <= 0.00001f * (metaball_tree->first->z_max - metaball_tree->first->z_min))
+ if (ob->size[0] <= 0.00001f * (metaball_tree->first->x_max - metaball_tree->first->x_min) ||
+ ob->size[1] <= 0.00001f * (metaball_tree->first->y_max - metaball_tree->first->y_min) ||
+ ob->size[2] <= 0.00001f * (metaball_tree->first->z_max - metaball_tree->first->z_min))
{
new_pgn_element(-1); /* free values created by init_meta */
@@ -2221,27 +2328,27 @@ void metaball_polygonize(Scene *scene, Object *ob, ListBase *dispbase)
/* free tree */
free_metaball_octal_node(metaball_tree->first);
MEM_freeN(metaball_tree);
- metaball_tree= NULL;
+ metaball_tree = NULL;
return;
}
}
/* width is size per polygonize cube */
- if (G.rendering) width= mb->rendersize;
+ if (G.rendering) width = mb->rendersize;
else {
- width= mb->wiresize;
- if (G.moving && mb->flag==MB_UPDATE_HALFRES) width*= 2;
+ width = mb->wiresize;
+ if (G.moving && mb->flag == MB_UPDATE_HALFRES) width *= 2;
}
/* nr_cubes is just for safety, minimum is totsize */
- nr_cubes= (int)(0.5f+totsize/width);
+ nr_cubes = (int)(0.5f + totsize / width);
/* init process */
mbproc.function = metaball;
mbproc.size = width;
mbproc.bounds = nr_cubes;
- mbproc.cubes= NULL;
- mbproc.delta = width/(float)(RES*RES);
+ mbproc.cubes = NULL;
+ mbproc.delta = width / (float)(RES * RES);
polygonize(&mbproc, mb);
@@ -2251,31 +2358,31 @@ void metaball_polygonize(Scene *scene, Object *ob, ListBase *dispbase)
if (totelem > 1) {
free_metaball_octal_node(metaball_tree->first);
MEM_freeN(metaball_tree);
- metaball_tree= NULL;
+ metaball_tree = NULL;
}
if (curindex) {
- dl= MEM_callocN(sizeof(DispList), "mbaldisp");
+ dl = MEM_callocN(sizeof(DispList), "mbaldisp");
BLI_addtail(dispbase, dl);
- dl->type= DL_INDEX4;
- dl->nr= mbproc.vertices.count;
- dl->parts= curindex;
+ dl->type = DL_INDEX4;
+ dl->nr = mbproc.vertices.count;
+ dl->parts = curindex;
- dl->index= indices;
- indices= NULL;
-
- a= mbproc.vertices.count;
- dl->verts= ve= MEM_mallocN(sizeof(float)*3*a, "mballverts");
- dl->nors= no= MEM_mallocN(sizeof(float)*3*a, "mballnors");
-
- for (a=0; a<mbproc.vertices.count; a++, no+=3, ve+=3) {
- ve[0]= mbproc.vertices.ptr[a].position.x;
- ve[1]= mbproc.vertices.ptr[a].position.y;
- ve[2]= mbproc.vertices.ptr[a].position.z;
-
- no[0]= mbproc.vertices.ptr[a].normal.x;
- no[1]= mbproc.vertices.ptr[a].normal.y;
- no[2]= mbproc.vertices.ptr[a].normal.z;
+ dl->index = indices;
+ indices = NULL;
+
+ a = mbproc.vertices.count;
+ dl->verts = ve = MEM_mallocN(sizeof(float) * 3 * a, "mballverts");
+ dl->nors = no = MEM_mallocN(sizeof(float) * 3 * a, "mballnors");
+
+ for (a = 0; a < mbproc.vertices.count; a++, no += 3, ve += 3) {
+ ve[0] = mbproc.vertices.ptr[a].position.x;
+ ve[1] = mbproc.vertices.ptr[a].position.y;
+ ve[2] = mbproc.vertices.ptr[a].position.z;
+
+ no[0] = mbproc.vertices.ptr[a].normal.x;
+ no[1] = mbproc.vertices.ptr[a].normal.y;
+ no[2] = mbproc.vertices.ptr[a].normal.z;
}
}
@@ -2283,7 +2390,7 @@ void metaball_polygonize(Scene *scene, Object *ob, ListBase *dispbase)
}
/* basic vertex data functions */
-int BKE_metaball_minmax(MetaBall *mb, float min[3], float max[3])
+int BKE_mball_minmax(MetaBall *mb, float min[3], float max[3])
{
MetaElem *ml;
@@ -2296,10 +2403,10 @@ int BKE_metaball_minmax(MetaBall *mb, float min[3], float max[3])
return (mb->elems.first != NULL);
}
-int BKE_metaball_center_median(MetaBall *mb, float cent[3])
+int BKE_mball_center_median(MetaBall *mb, float cent[3])
{
MetaElem *ml;
- int total= 0;
+ int total = 0;
zero_v3(cent);
@@ -2308,16 +2415,16 @@ int BKE_metaball_center_median(MetaBall *mb, float cent[3])
}
if (total)
- mul_v3_fl(cent, 1.0f/(float)total);
+ mul_v3_fl(cent, 1.0f / (float)total);
return (total != 0);
}
-int BKE_metaball_center_bounds(MetaBall *mb, float cent[3])
+int BKE_mball_center_bounds(MetaBall *mb, float cent[3])
{
float min[3], max[3];
- if (BKE_metaball_minmax(mb, min, max)) {
+ if (BKE_mball_minmax(mb, min, max)) {
mid_v3_v3v3(cent, min, max);
return 1;
}
@@ -2325,7 +2432,7 @@ int BKE_metaball_center_bounds(MetaBall *mb, float cent[3])
return 0;
}
-void BKE_metaball_translate(MetaBall *mb, float offset[3])
+void BKE_mball_translate(MetaBall *mb, float offset[3])
{
MetaElem *ml;
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c
index 7280af18493..944f06cf740 100644
--- a/source/blender/blenkernel/intern/mesh.c
+++ b/source/blender/blenkernel/intern/mesh.c
@@ -97,28 +97,28 @@ static const char *cmpcode_to_str(int code)
case MESHCMP_DVERT_WEIGHTMISMATCH:
return "Vertex Weight Mismatch";
case MESHCMP_DVERT_GROUPMISMATCH:
- return "Vertex Group Mismatch";
+ return "Vertex Group Mismatch";
case MESHCMP_DVERT_TOTGROUPMISMATCH:
- return "Vertex Doesn't Belong To Same Number Of Groups";
+ return "Vertex Doesn't Belong To Same Number Of Groups";
case MESHCMP_LOOPCOLMISMATCH:
- return "Vertex Color Mismatch";
+ return "Vertex Color Mismatch";
case MESHCMP_LOOPUVMISMATCH:
- return "UV Mismatch";
+ return "UV Mismatch";
case MESHCMP_LOOPMISMATCH:
- return "Loop Mismatch";
+ return "Loop Mismatch";
case MESHCMP_POLYVERTMISMATCH:
- return "Loop Vert Mismatch In Poly Test";
+ return "Loop Vert Mismatch In Poly Test";
case MESHCMP_POLYMISMATCH:
- return "Loop Vert Mismatch";
+ return "Loop Vert Mismatch";
case MESHCMP_EDGEUNKNOWN:
- return "Edge Mismatch";
+ return "Edge Mismatch";
case MESHCMP_VERTCOMISMATCH:
- return "Vertex Coordinate Mismatch";
+ return "Vertex Coordinate Mismatch";
case MESHCMP_CDLAYERS_MISMATCH:
- return "CustomData Layer Count Mismatch";
+ return "CustomData Layer Count Mismatch";
default:
- return "Mesh Comparison Code Unknown";
- }
+ return "Mesh Comparison Code Unknown";
+ }
}
/* thresh is threshold for comparing vertices, uvs, vertex colors,
@@ -126,41 +126,49 @@ static const char *cmpcode_to_str(int code)
static int customdata_compare(CustomData *c1, CustomData *c2, Mesh *m1, Mesh *m2, float thresh)
{
CustomDataLayer *l1, *l2;
- int i, i1=0, i2=0, tot, j;
+ int i, i1 = 0, i2 = 0, tot, j;
- for (i=0; i<c1->totlayer; i++) {
- if (ELEM7(c1->layers[i].type, CD_MVERT, CD_MEDGE, CD_MPOLY,
- CD_MLOOPUV, CD_MLOOPCOL, CD_MTEXPOLY, CD_MDEFORMVERT))
+ for (i = 0; i < c1->totlayer; i++) {
+ if (ELEM7(c1->layers[i].type, CD_MVERT, CD_MEDGE, CD_MPOLY,
+ CD_MLOOPUV, CD_MLOOPCOL, CD_MTEXPOLY, CD_MDEFORMVERT))
+ {
i1++;
+ }
}
-
- for (i=0; i<c2->totlayer; i++) {
- if (ELEM7(c2->layers[i].type, CD_MVERT, CD_MEDGE, CD_MPOLY,
- CD_MLOOPUV, CD_MLOOPCOL, CD_MTEXPOLY, CD_MDEFORMVERT))
+
+ for (i = 0; i < c2->totlayer; i++) {
+ if (ELEM7(c2->layers[i].type, CD_MVERT, CD_MEDGE, CD_MPOLY,
+ CD_MLOOPUV, CD_MLOOPCOL, CD_MTEXPOLY, CD_MDEFORMVERT))
+ {
i2++;
+ }
}
-
+
if (i1 != i2)
return MESHCMP_CDLAYERS_MISMATCH;
l1 = c1->layers; l2 = c2->layers;
tot = i1;
i1 = 0; i2 = 0;
- for (i=0; i < tot; i++) {
+ for (i = 0; i < tot; i++) {
while (i1 < c1->totlayer && !ELEM7(l1->type, CD_MVERT, CD_MEDGE, CD_MPOLY,
- CD_MLOOPUV, CD_MLOOPCOL, CD_MTEXPOLY, CD_MDEFORMVERT))
+ CD_MLOOPUV, CD_MLOOPCOL, CD_MTEXPOLY, CD_MDEFORMVERT))
+ {
i1++, l1++;
+ }
- while (i2 < c2->totlayer && !ELEM7(l2->type, CD_MVERT, CD_MEDGE, CD_MPOLY,
- CD_MLOOPUV, CD_MLOOPCOL, CD_MTEXPOLY, CD_MDEFORMVERT))
+ while (i2 < c2->totlayer && !ELEM7(l2->type, CD_MVERT, CD_MEDGE, CD_MPOLY,
+ CD_MLOOPUV, CD_MLOOPCOL, CD_MTEXPOLY, CD_MDEFORMVERT))
+ {
i2++, l2++;
+ }
if (l1->type == CD_MVERT) {
MVert *v1 = l1->data;
MVert *v2 = l2->data;
int vtot = m1->totvert;
- for (j=0; j<vtot; j++, v1++, v2++) {
+ for (j = 0; j < vtot; j++, v1++, v2++) {
if (len_v3v3(v1->co, v2->co) > thresh)
return MESHCMP_VERTCOMISMATCH;
/*I don't care about normals, let's just do coodinates*/
@@ -174,11 +182,11 @@ static int customdata_compare(CustomData *c1, CustomData *c2, Mesh *m1, Mesh *m2
EdgeHash *eh = BLI_edgehash_new();
int etot = m1->totedge;
- for (j=0; j<etot; j++, e1++) {
+ for (j = 0; j < etot; j++, e1++) {
BLI_edgehash_insert(eh, e1->v1, e1->v2, e1);
}
- for (j=0; j<etot; j++, e2++) {
+ for (j = 0; j < etot; j++, e2++) {
if (!BLI_edgehash_lookup(eh, e2->v1, e2->v2))
return MESHCMP_EDGEUNKNOWN;
}
@@ -190,7 +198,7 @@ static int customdata_compare(CustomData *c1, CustomData *c2, Mesh *m1, Mesh *m2
MPoly *p2 = l2->data;
int ptot = m1->totpoly;
- for (j=0; j<ptot; j++, p1++, p2++) {
+ for (j = 0; j < ptot; j++, p1++, p2++) {
MLoop *lp1, *lp2;
int k;
@@ -200,7 +208,7 @@ static int customdata_compare(CustomData *c1, CustomData *c2, Mesh *m1, Mesh *m2
lp1 = m1->mloop + p1->loopstart;
lp2 = m2->mloop + p2->loopstart;
- for (k=0; k<p1->totloop; k++, lp1++, lp2++) {
+ for (k = 0; k < p1->totloop; k++, lp1++, lp2++) {
if (lp1->v != lp2->v)
return MESHCMP_POLYVERTMISMATCH;
}
@@ -211,7 +219,7 @@ static int customdata_compare(CustomData *c1, CustomData *c2, Mesh *m1, Mesh *m2
MLoop *lp2 = l2->data;
int ltot = m1->totloop;
- for (j=0; j<ltot; j++, lp1++, lp2++) {
+ for (j = 0; j < ltot; j++, lp1++, lp2++) {
if (lp1->v != lp2->v)
return MESHCMP_LOOPMISMATCH;
}
@@ -221,7 +229,7 @@ static int customdata_compare(CustomData *c1, CustomData *c2, Mesh *m1, Mesh *m2
MLoopUV *lp2 = l2->data;
int ltot = m1->totloop;
- for (j=0; j<ltot; j++, lp1++, lp2++) {
+ for (j = 0; j < ltot; j++, lp1++, lp2++) {
if (len_v2v2(lp1->uv, lp2->uv) > thresh)
return MESHCMP_LOOPUVMISMATCH;
}
@@ -232,7 +240,7 @@ static int customdata_compare(CustomData *c1, CustomData *c2, Mesh *m1, Mesh *m2
MLoopCol *lp2 = l2->data;
int ltot = m1->totloop;
- for (j=0; j<ltot; j++, lp1++, lp2++) {
+ for (j = 0; j < ltot; j++, lp1++, lp2++) {
if (ABS(lp1->r - lp2->r) > thresh ||
ABS(lp1->g - lp2->g) > thresh ||
ABS(lp1->b - lp2->b) > thresh ||
@@ -248,14 +256,14 @@ static int customdata_compare(CustomData *c1, CustomData *c2, Mesh *m1, Mesh *m2
MDeformVert *dv2 = l2->data;
int dvtot = m1->totvert;
- for (j=0; j<dvtot; j++, dv1++, dv2++) {
+ for (j = 0; j < dvtot; j++, dv1++, dv2++) {
int k;
- MDeformWeight *dw1 = dv1->dw, *dw2=dv2->dw;
+ MDeformWeight *dw1 = dv1->dw, *dw2 = dv2->dw;
if (dv1->totweight != dv2->totweight)
return MESHCMP_DVERT_TOTGROUPMISMATCH;
- for (k=0; k<dv1->totweight; k++, dw1++, dw2++) {
+ for (k = 0; k < dv1->totweight; k++, dw1++, dw2++) {
if (dw1->def_nr != dw2->def_nr)
return MESHCMP_DVERT_GROUPMISMATCH;
if (ABS(dw1->weight - dw2->weight) > thresh)
@@ -269,7 +277,7 @@ static int customdata_compare(CustomData *c1, CustomData *c2, Mesh *m1, Mesh *m2
}
/*used for testing. returns an error string the two meshes don't match*/
-const char *mesh_cmp(Mesh *me1, Mesh *me2, float thresh)
+const char *BKE_mesh_cmp(Mesh *me1, Mesh *me2, float thresh)
{
int c;
@@ -285,7 +293,7 @@ const char *mesh_cmp(Mesh *me1, Mesh *me2, float thresh)
if (me1->totpoly != me2->totpoly)
return "Number of faces don't match";
- if (me1->totloop !=me2->totloop)
+ if (me1->totloop != me2->totloop)
return "Number of loops don't match";
if ((c = customdata_compare(&me1->vdata, &me2->vdata, me1, me2, thresh)))
@@ -319,7 +327,7 @@ static void mesh_ensure_tessellation_customdata(Mesh *me)
const int totcol_tessface = CustomData_number_of_layers(&me->fdata, CD_MCOL);
if (tottex_tessface != tottex_original ||
- totcol_tessface != totcol_original )
+ totcol_tessface != totcol_original)
{
BKE_mesh_tessface_clear(me);
@@ -327,13 +335,13 @@ static void mesh_ensure_tessellation_customdata(Mesh *me)
/* TODO - add some --debug-mesh option */
if (G.debug & G_DEBUG) {
- /* note: this warning may be un-called for if we are inirializing the mesh for the
+ /* note: this warning may be un-called for if we are initializing the mesh for the
* first time from bmesh, rather then giving a warning about this we could be smarter
* and check if there was any data to begin with, for now just print the warning with
* some info to help troubleshoot whats going on - campbell */
printf("%s: warning! Tessellation uvs or vcol data got out of sync, "
- "had to reset!\n CD_MTFACE: %d != CD_MTEXPOLY: %d || CD_MCOL: %d != CD_MLOOPCOL: %d\n",
- __func__, tottex_tessface, tottex_original, totcol_tessface, totcol_original);
+ "had to reset!\n CD_MTFACE: %d != CD_MTEXPOLY: %d || CD_MCOL: %d != CD_MLOOPCOL: %d\n",
+ __func__, tottex_tessface, tottex_original, totcol_tessface, totcol_original);
}
}
}
@@ -384,30 +392,30 @@ void mesh_update_customdata_pointers(Mesh *me, const short do_ensure_tess_cd)
* we need a more generic method, like the expand() functions in
* readfile.c */
-void unlink_mesh(Mesh *me)
+void BKE_mesh_unlink(Mesh *me)
{
int a;
- if (me==NULL) return;
+ if (me == NULL) return;
- for (a=0; a<me->totcol; a++) {
+ for (a = 0; a < me->totcol; a++) {
if (me->mat[a]) me->mat[a]->id.us--;
- me->mat[a]= NULL;
+ me->mat[a] = NULL;
}
if (me->key) {
me->key->id.us--;
}
- me->key= NULL;
+ me->key = NULL;
- if (me->texcomesh) me->texcomesh= NULL;
+ if (me->texcomesh) me->texcomesh = NULL;
}
/* do not free mesh itself */
-void free_mesh(Mesh *me, int unlink)
+void BKE_mesh_free(Mesh *me, int unlink)
{
if (unlink)
- unlink_mesh(me);
+ BKE_mesh_unlink(me);
CustomData_free(&me->vdata, me->totvert);
CustomData_free(&me->edata, me->totedge);
@@ -417,7 +425,7 @@ void free_mesh(Mesh *me, int unlink)
if (me->adt) {
BKE_free_animdata(&me->id);
- me->adt= NULL;
+ me->adt = NULL;
}
if (me->mat) MEM_freeN(me->mat);
@@ -435,12 +443,12 @@ void copy_dverts(MDeformVert *dst, MDeformVert *src, int copycount)
if (!src || !dst)
return;
- memcpy (dst, src, copycount * sizeof(MDeformVert));
+ memcpy(dst, src, copycount * sizeof(MDeformVert));
- for (i=0; i<copycount; i++) {
+ for (i = 0; i < copycount; i++) {
if (src[i].dw) {
- dst[i].dw = MEM_callocN (sizeof(MDeformWeight)*src[i].totweight, "copy_deformWeight");
- memcpy (dst[i].dw, src[i].dw, sizeof (MDeformWeight)*src[i].totweight);
+ dst[i].dw = MEM_callocN(sizeof(MDeformWeight) * src[i].totweight, "copy_deformWeight");
+ memcpy(dst[i].dw, src[i].dw, sizeof (MDeformWeight) * src[i].totweight);
}
}
@@ -451,16 +459,16 @@ void free_dverts(MDeformVert *dvert, int totvert)
/* Instead of freeing the verts directly,
* call this function to delete any special
* vert data */
- int i;
+ int i;
if (!dvert)
return;
/* Free any special data from the verts */
- for (i=0; i<totvert; i++) {
- if (dvert[i].dw) MEM_freeN (dvert[i].dw);
+ for (i = 0; i < totvert; i++) {
+ if (dvert[i].dw) MEM_freeN(dvert[i].dw);
}
- MEM_freeN (dvert);
+ MEM_freeN(dvert);
}
static void mesh_tessface_clear_intern(Mesh *mesh, int free_customdata)
@@ -476,23 +484,22 @@ static void mesh_tessface_clear_intern(Mesh *mesh, int free_customdata)
memset(&mesh->fdata, 0, sizeof(mesh->fdata));
}
-Mesh *add_mesh(const char *name)
+Mesh *BKE_mesh_add(const char *name)
{
Mesh *me;
- me= alloc_libblock(&G.main->mesh, ID_ME, name);
+ me = BKE_libblock_alloc(&G.main->mesh, ID_ME, name);
- me->size[0]= me->size[1]= me->size[2]= 1.0;
- me->smoothresh= 30;
- me->texflag= ME_AUTOSPACE;
- me->flag= ME_TWOSIDED;
- me->bb= unit_boundbox();
- me->drawflag= ME_DRAWEDGES|ME_DRAWFACES|ME_DRAWCREASES;
+ me->size[0] = me->size[1] = me->size[2] = 1.0;
+ me->smoothresh = 30;
+ me->texflag = ME_AUTOSPACE;
+ me->flag = ME_TWOSIDED;
+ me->drawflag = ME_DRAWEDGES | ME_DRAWFACES | ME_DRAWCREASES;
return me;
}
-Mesh *copy_mesh(Mesh *me)
+Mesh *BKE_mesh_copy(Mesh *me)
{
Mesh *men;
MTFace *tface;
@@ -500,10 +507,10 @@ Mesh *copy_mesh(Mesh *me)
int a, i;
const int do_tessface = ((me->totface != 0) && (me->totpoly == 0)); /* only do tessface if we have no polys */
- men= copy_libblock(&me->id);
+ men = BKE_libblock_copy(&me->id);
- men->mat= MEM_dupallocN(me->mat);
- for (a=0; a<men->totcol; a++) {
+ men->mat = MEM_dupallocN(me->mat);
+ for (a = 0; a < men->totcol; a++) {
id_us_plus((ID *)men->mat[a]);
}
id_us_plus((ID *)men->texcomesh);
@@ -522,33 +529,33 @@ Mesh *copy_mesh(Mesh *me)
mesh_update_customdata_pointers(men, do_tessface);
/* ensure indirect linked data becomes lib-extern */
- for (i=0; i<me->fdata.totlayer; i++) {
+ for (i = 0; i < me->fdata.totlayer; i++) {
if (me->fdata.layers[i].type == CD_MTFACE) {
- tface= (MTFace*)me->fdata.layers[i].data;
+ tface = (MTFace *)me->fdata.layers[i].data;
- for (a=0; a<me->totface; a++, tface++)
+ for (a = 0; a < me->totface; a++, tface++)
if (tface->tpage)
- id_lib_extern((ID*)tface->tpage);
+ id_lib_extern((ID *)tface->tpage);
}
}
- for (i=0; i<me->pdata.totlayer; i++) {
+ for (i = 0; i < me->pdata.totlayer; i++) {
if (me->pdata.layers[i].type == CD_MTEXPOLY) {
- txface= (MTexPoly*)me->pdata.layers[i].data;
+ txface = (MTexPoly *)me->pdata.layers[i].data;
- for (a=0; a<me->totpoly; a++, txface++)
+ for (a = 0; a < me->totpoly; a++, txface++)
if (txface->tpage)
- id_lib_extern((ID*)txface->tpage);
+ id_lib_extern((ID *)txface->tpage);
}
}
- men->mselect= NULL;
- men->edit_btmesh= NULL;
+ men->mselect = NULL;
+ men->edit_btmesh = NULL;
- men->bb= MEM_dupallocN(men->bb);
+ men->bb = MEM_dupallocN(men->bb);
- men->key= copy_key(me->key);
- if (men->key) men->key->from= (ID *)men;
+ men->key = BKE_key_copy(me->key);
+ if (men->key) men->key->from = (ID *)men;
return men;
}
@@ -571,11 +578,11 @@ static void expand_local_mesh(Mesh *me)
if (me->mtface || me->mtpoly) {
int a, i;
- for (i=0; i<me->pdata.totlayer; i++) {
+ for (i = 0; i < me->pdata.totlayer; i++) {
if (me->pdata.layers[i].type == CD_MTEXPOLY) {
- MTexPoly *txface= (MTexPoly*)me->fdata.layers[i].data;
+ MTexPoly *txface = (MTexPoly *)me->fdata.layers[i].data;
- for (a=0; a<me->totpoly; a++, txface++) {
+ for (a = 0; a < me->totpoly; a++, txface++) {
/* special case: ima always local immediately */
if (txface->tpage) {
id_lib_extern((ID *)txface->tpage);
@@ -584,11 +591,11 @@ static void expand_local_mesh(Mesh *me)
}
}
- for (i=0; i<me->fdata.totlayer; i++) {
+ for (i = 0; i < me->fdata.totlayer; i++) {
if (me->fdata.layers[i].type == CD_MTFACE) {
- MTFace *tface= (MTFace*)me->fdata.layers[i].data;
+ MTFace *tface = (MTFace *)me->fdata.layers[i].data;
- for (a=0; a<me->totface; a++, tface++) {
+ for (a = 0; a < me->totface; a++, tface++) {
/* special case: ima always local immediately */
if (tface->tpage) {
id_lib_extern((ID *)tface->tpage);
@@ -603,28 +610,28 @@ static void expand_local_mesh(Mesh *me)
}
}
-void make_local_mesh(Mesh *me)
+void BKE_mesh_make_local(Mesh *me)
{
- Main *bmain= G.main;
+ Main *bmain = G.main;
Object *ob;
- int is_local= FALSE, is_lib= FALSE;
+ int is_local = FALSE, is_lib = FALSE;
/* - only lib users: do nothing
* - only local users: set flag
* - mixed: make copy
*/
- if (me->id.lib==NULL) return;
- if (me->id.us==1) {
+ if (me->id.lib == NULL) return;
+ if (me->id.us == 1) {
id_clear_lib_data(bmain, &me->id);
expand_local_mesh(me);
return;
}
- for (ob= bmain->object.first; ob && ELEM(0, is_lib, is_local); ob= ob->id.next) {
+ for (ob = bmain->object.first; ob && ELEM(0, is_lib, is_local); ob = ob->id.next) {
if (me == ob->data) {
- if (ob->id.lib) is_lib= TRUE;
- else is_local= TRUE;
+ if (ob->id.lib) is_lib = TRUE;
+ else is_local = TRUE;
}
}
@@ -633,16 +640,16 @@ void make_local_mesh(Mesh *me)
expand_local_mesh(me);
}
else if (is_local && is_lib) {
- Mesh *me_new= copy_mesh(me);
- me_new->id.us= 0;
+ Mesh *me_new = BKE_mesh_copy(me);
+ me_new->id.us = 0;
/* Remap paths of new ID using old library as base. */
BKE_id_lib_local_paths(bmain, me->id.lib, &me_new->id);
- for (ob= bmain->object.first; ob; ob= ob->id.next) {
+ for (ob = bmain->object.first; ob; ob = ob->id.next) {
if (me == ob->data) {
- if (ob->id.lib==NULL) {
+ if (ob->id.lib == NULL) {
set_mesh(ob, me_new);
}
}
@@ -650,45 +657,45 @@ void make_local_mesh(Mesh *me)
}
}
-void boundbox_mesh(Mesh *me, float *loc, float *size)
+void BKE_mesh_boundbox_calc(Mesh *me, float r_loc[3], float r_size[3])
{
BoundBox *bb;
float min[3], max[3];
float mloc[3], msize[3];
- if (me->bb==NULL) me->bb= MEM_callocN(sizeof(BoundBox), "boundbox");
- bb= me->bb;
+ if (me->bb == NULL) me->bb = MEM_callocN(sizeof(BoundBox), "boundbox");
+ bb = me->bb;
- if (!loc) loc= mloc;
- if (!size) size= msize;
+ if (!r_loc) r_loc = mloc;
+ if (!r_size) r_size = msize;
INIT_MINMAX(min, max);
- if (!minmax_mesh(me, min, max)) {
+ if (!BKE_mesh_minmax(me, min, max)) {
min[0] = min[1] = min[2] = -1.0f;
max[0] = max[1] = max[2] = 1.0f;
}
- mid_v3_v3v3(loc, min, max);
+ mid_v3_v3v3(r_loc, min, max);
- size[0]= (max[0]-min[0])/2.0f;
- size[1]= (max[1]-min[1])/2.0f;
- size[2]= (max[2]-min[2])/2.0f;
+ r_size[0] = (max[0] - min[0]) / 2.0f;
+ r_size[1] = (max[1] - min[1]) / 2.0f;
+ r_size[2] = (max[2] - min[2]) / 2.0f;
- boundbox_set_from_min_max(bb, min, max);
+ BKE_boundbox_init_from_minmax(bb, min, max);
}
-void tex_space_mesh(Mesh *me)
+void BKE_mesh_texspace_calc(Mesh *me)
{
float loc[3], size[3];
int a;
- boundbox_mesh(me, loc, size);
+ BKE_mesh_boundbox_calc(me, loc, size);
if (me->texflag & ME_AUTOSPACE) {
- for (a=0; a<3; a++) {
- if (size[a]==0.0f) size[a]= 1.0f;
- else if (size[a]>0.0f && size[a]<0.00001f) size[a]= 0.00001f;
- else if (size[a]<0.0f && size[a]> -0.00001f) size[a]= -0.00001f;
+ for (a = 0; a < 3; a++) {
+ if (size[a] == 0.0f) size[a] = 1.0f;
+ else if (size[a] > 0.0f && size[a] < 0.00001f) size[a] = 0.00001f;
+ else if (size[a] < 0.0f && size[a] > -0.00001f) size[a] = -0.00001f;
}
copy_v3_v3(me->loc, loc);
@@ -697,69 +704,69 @@ void tex_space_mesh(Mesh *me)
}
}
-BoundBox *mesh_get_bb(Object *ob)
+BoundBox *BKE_mesh_boundbox_get(Object *ob)
{
- Mesh *me= ob->data;
+ Mesh *me = ob->data;
if (ob->bb)
return ob->bb;
if (!me->bb)
- tex_space_mesh(me);
+ BKE_mesh_texspace_calc(me);
return me->bb;
}
-void mesh_get_texspace(Mesh *me, float r_loc[3], float r_rot[3], float r_size[3])
+void BKE_mesh_texspace_get(Mesh *me, float r_loc[3], float r_rot[3], float r_size[3])
{
if (!me->bb) {
- tex_space_mesh(me);
+ BKE_mesh_texspace_calc(me);
}
- if (r_loc) copy_v3_v3(r_loc, me->loc);
- if (r_rot) copy_v3_v3(r_rot, me->rot);
+ if (r_loc) copy_v3_v3(r_loc, me->loc);
+ if (r_rot) copy_v3_v3(r_rot, me->rot);
if (r_size) copy_v3_v3(r_size, me->size);
}
-float *get_mesh_orco_verts(Object *ob)
+float *BKE_mesh_orco_verts_get(Object *ob)
{
Mesh *me = ob->data;
MVert *mvert = NULL;
- Mesh *tme = me->texcomesh?me->texcomesh:me;
+ Mesh *tme = me->texcomesh ? me->texcomesh : me;
int a, totvert;
float (*vcos)[3] = NULL;
/* Get appropriate vertex coordinates */
- vcos = MEM_callocN(sizeof(*vcos)*me->totvert, "orco mesh");
+ vcos = MEM_callocN(sizeof(*vcos) * me->totvert, "orco mesh");
mvert = tme->mvert;
totvert = MIN2(tme->totvert, me->totvert);
- for (a=0; a<totvert; a++, mvert++) {
+ for (a = 0; a < totvert; a++, mvert++) {
copy_v3_v3(vcos[a], mvert->co);
}
- return (float*)vcos;
+ return (float *)vcos;
}
-void transform_mesh_orco_verts(Mesh *me, float (*orco)[3], int totvert, int invert)
+void BKE_mesh_orco_verts_transform(Mesh *me, float (*orco)[3], int totvert, int invert)
{
float loc[3], size[3];
int a;
- mesh_get_texspace(me->texcomesh?me->texcomesh:me, loc, NULL, size);
+ BKE_mesh_texspace_get(me->texcomesh ? me->texcomesh : me, loc, NULL, size);
if (invert) {
- for (a=0; a<totvert; a++) {
+ for (a = 0; a < totvert; a++) {
float *co = orco[a];
madd_v3_v3v3v3(co, loc, co, size);
}
}
else {
- for (a=0; a<totvert; a++) {
+ for (a = 0; a < totvert; a++) {
float *co = orco[a];
- co[0] = (co[0]-loc[0])/size[0];
- co[1] = (co[1]-loc[1])/size[1];
- co[2] = (co[2]-loc[2])/size[2];
+ co[0] = (co[0] - loc[0]) / size[0];
+ co[1] = (co[1] - loc[1]) / size[1];
+ co[2] = (co[2] - loc[2]) / size[2];
}
}
}
@@ -769,51 +776,51 @@ void transform_mesh_orco_verts(Mesh *me, float (*orco)[3], int totvert, int inve
int test_index_face(MFace *mface, CustomData *fdata, int mfindex, int nr)
{
/* first test if the face is legal */
- if ((mface->v3 || nr==4) && mface->v3==mface->v4) {
- mface->v4= 0;
+ if ((mface->v3 || nr == 4) && mface->v3 == mface->v4) {
+ mface->v4 = 0;
nr--;
}
- if ((mface->v2 || mface->v4) && mface->v2==mface->v3) {
- mface->v3= mface->v4;
- mface->v4= 0;
+ if ((mface->v2 || mface->v4) && mface->v2 == mface->v3) {
+ mface->v3 = mface->v4;
+ mface->v4 = 0;
nr--;
}
- if (mface->v1==mface->v2) {
- mface->v2= mface->v3;
- mface->v3= mface->v4;
- mface->v4= 0;
+ if (mface->v1 == mface->v2) {
+ mface->v2 = mface->v3;
+ mface->v3 = mface->v4;
+ mface->v4 = 0;
nr--;
}
/* check corrupt cases, bowtie geometry, cant handle these because edge data wont exist so just return 0 */
- if (nr==3) {
+ if (nr == 3) {
if (
- /* real edges */
- mface->v1==mface->v2 ||
- mface->v2==mface->v3 ||
- mface->v3==mface->v1
- ) {
+ /* real edges */
+ mface->v1 == mface->v2 ||
+ mface->v2 == mface->v3 ||
+ mface->v3 == mface->v1)
+ {
return 0;
}
}
- else if (nr==4) {
+ else if (nr == 4) {
if (
- /* real edges */
- mface->v1==mface->v2 ||
- mface->v2==mface->v3 ||
- mface->v3==mface->v4 ||
- mface->v4==mface->v1 ||
- /* across the face */
- mface->v1==mface->v3 ||
- mface->v2==mface->v4
- ) {
+ /* real edges */
+ mface->v1 == mface->v2 ||
+ mface->v2 == mface->v3 ||
+ mface->v3 == mface->v4 ||
+ mface->v4 == mface->v1 ||
+ /* across the face */
+ mface->v1 == mface->v3 ||
+ mface->v2 == mface->v4
+ ) {
return 0;
}
}
/* prevent a zero at wrong index location */
- if (nr==3) {
- if (mface->v3==0) {
+ if (nr == 3) {
+ if (mface->v3 == 0) {
static int corner_indices[4] = {1, 2, 0, 3};
SWAP(unsigned int, mface->v1, mface->v2);
@@ -823,8 +830,8 @@ int test_index_face(MFace *mface, CustomData *fdata, int mfindex, int nr)
CustomData_swap(fdata, mfindex, corner_indices);
}
}
- else if (nr==4) {
- if (mface->v3==0 || mface->v4==0) {
+ else if (nr == 4) {
+ if (mface->v3 == 0 || mface->v4 == 0) {
static int corner_indices[4] = {2, 3, 0, 1};
SWAP(unsigned int, mface->v1, mface->v3);
@@ -838,27 +845,27 @@ int test_index_face(MFace *mface, CustomData *fdata, int mfindex, int nr)
return nr;
}
-Mesh *get_mesh(Object *ob)
+Mesh *BKE_mesh_from_object(Object *ob)
{
- if (ob==NULL) return NULL;
- if (ob->type==OB_MESH) return ob->data;
+ if (ob == NULL) return NULL;
+ if (ob->type == OB_MESH) return ob->data;
else return NULL;
}
void set_mesh(Object *ob, Mesh *me)
{
- Mesh *old=NULL;
+ Mesh *old = NULL;
multires_force_update(ob);
- if (ob==NULL) return;
+ if (ob == NULL) return;
- if (ob->type==OB_MESH) {
- old= ob->data;
+ if (ob->type == OB_MESH) {
+ old = ob->data;
if (old)
old->id.us--;
- ob->data= me;
+ ob->data = me;
id_us_plus((ID *)me);
}
@@ -879,24 +886,24 @@ static void to_edgesort(struct edgesort *ed,
unsigned int v1, unsigned int v2,
short is_loose, short is_draw)
{
- if (v1<v2) {
- ed->v1= v1; ed->v2= v2;
+ if (v1 < v2) {
+ ed->v1 = v1; ed->v2 = v2;
}
else {
- ed->v1= v2; ed->v2= v1;
+ ed->v1 = v2; ed->v2 = v1;
}
- ed->is_loose= is_loose;
- ed->is_draw= is_draw;
+ ed->is_loose = is_loose;
+ ed->is_draw = is_draw;
}
static int vergedgesort(const void *v1, const void *v2)
{
- const struct edgesort *x1=v1, *x2=v2;
+ const struct edgesort *x1 = v1, *x2 = v2;
- if ( x1->v1 > x2->v1) return 1;
- else if ( x1->v1 < x2->v1) return -1;
- else if ( x1->v2 > x2->v2) return 1;
- else if ( x1->v2 < x2->v2) return -1;
+ if (x1->v1 > x2->v1) return 1;
+ else if (x1->v1 < x2->v1) return -1;
+ else if (x1->v2 > x2->v2) return 1;
+ else if (x1->v2 < x2->v2) return -1;
return 0;
}
@@ -904,8 +911,8 @@ static int vergedgesort(const void *v1, const void *v2)
/* Create edges based on known verts and faces */
static void make_edges_mdata(MVert *UNUSED(allvert), MFace *allface, MLoop *allloop,
- MPoly *allpoly, int UNUSED(totvert), int totface, int UNUSED(totloop), int totpoly,
- int old, MEdge **alledge, int *_totedge)
+ MPoly *allpoly, int UNUSED(totvert), int totface, int UNUSED(totloop), int totpoly,
+ int old, MEdge **alledge, int *_totedge)
{
MPoly *mpoly;
MLoop *mloop;
@@ -913,26 +920,26 @@ static void make_edges_mdata(MVert *UNUSED(allvert), MFace *allface, MLoop *alll
MEdge *medge;
EdgeHash *hash = BLI_edgehash_new();
struct edgesort *edsort, *ed;
- int a, b, totedge=0, final=0;
+ int a, b, totedge = 0, final = 0;
/* we put all edges in array, sort them, and detect doubles that way */
- for (a= totface, mface= allface; a>0; a--, mface++) {
- if (mface->v4) totedge+=4;
- else if (mface->v3) totedge+=3;
- else totedge+=1;
+ for (a = totface, mface = allface; a > 0; a--, mface++) {
+ if (mface->v4) totedge += 4;
+ else if (mface->v3) totedge += 3;
+ else totedge += 1;
}
- if (totedge==0) {
+ if (totedge == 0) {
/* flag that mesh has edges */
- (*alledge)= MEM_callocN(0, "make mesh edges");
+ (*alledge) = MEM_callocN(0, "make mesh edges");
(*_totedge) = 0;
return;
}
- ed= edsort= MEM_mallocN(totedge*sizeof(struct edgesort), "edgesort");
+ ed = edsort = MEM_mallocN(totedge * sizeof(struct edgesort), "edgesort");
- for (a= totface, mface= allface; a>0; a--, mface++) {
+ for (a = totface, mface = allface; a > 0; a--, mface++) {
to_edgesort(ed++, mface->v1, mface->v2, !mface->v3, mface->edcode & ME_V1V2);
if (mface->v4) {
to_edgesort(ed++, mface->v2, mface->v3, 0, mface->edcode & ME_V2V3);
@@ -948,54 +955,54 @@ static void make_edges_mdata(MVert *UNUSED(allvert), MFace *allface, MLoop *alll
qsort(edsort, totedge, sizeof(struct edgesort), vergedgesort);
/* count final amount */
- for (a=totedge, ed=edsort; a>1; a--, ed++) {
+ for (a = totedge, ed = edsort; a > 1; a--, ed++) {
/* edge is unique when it differs from next edge, or is last */
- if (ed->v1 != (ed+1)->v1 || ed->v2 != (ed+1)->v2) final++;
+ if (ed->v1 != (ed + 1)->v1 || ed->v2 != (ed + 1)->v2) final++;
}
final++;
- (*alledge)= medge= MEM_callocN(sizeof (MEdge) * final, "make_edges mdge");
- (*_totedge)= final;
+ (*alledge) = medge = MEM_callocN(sizeof (MEdge) * final, "BKE_mesh_make_edges mdge");
+ (*_totedge) = final;
- for (a=totedge, ed=edsort; a>1; a--, ed++) {
+ for (a = totedge, ed = edsort; a > 1; a--, ed++) {
/* edge is unique when it differs from next edge, or is last */
- if (ed->v1 != (ed+1)->v1 || ed->v2 != (ed+1)->v2) {
- medge->v1= ed->v1;
- medge->v2= ed->v2;
- if (old==0 || ed->is_draw) medge->flag= ME_EDGEDRAW|ME_EDGERENDER;
- if (ed->is_loose) medge->flag|= ME_LOOSEEDGE;
+ if (ed->v1 != (ed + 1)->v1 || ed->v2 != (ed + 1)->v2) {
+ medge->v1 = ed->v1;
+ medge->v2 = ed->v2;
+ if (old == 0 || ed->is_draw) medge->flag = ME_EDGEDRAW | ME_EDGERENDER;
+ if (ed->is_loose) medge->flag |= ME_LOOSEEDGE;
/* order is swapped so extruding this edge as a surface wont flip face normals
* with cyclic curves */
- if (ed->v1+1 != ed->v2) {
+ if (ed->v1 + 1 != ed->v2) {
SWAP(unsigned int, medge->v1, medge->v2);
}
medge++;
}
else {
/* equal edge, we merge the drawflag */
- (ed+1)->is_draw |= ed->is_draw;
+ (ed + 1)->is_draw |= ed->is_draw;
}
}
/* last edge */
- medge->v1= ed->v1;
- medge->v2= ed->v2;
- medge->flag= ME_EDGEDRAW;
- if (ed->is_loose) medge->flag|= ME_LOOSEEDGE;
+ medge->v1 = ed->v1;
+ medge->v2 = ed->v2;
+ medge->flag = ME_EDGEDRAW;
+ if (ed->is_loose) medge->flag |= ME_LOOSEEDGE;
medge->flag |= ME_EDGERENDER;
MEM_freeN(edsort);
/*set edge members of mloops*/
- medge= *alledge;
- for (a=0; a<*_totedge; a++, medge++) {
+ medge = *alledge;
+ for (a = 0; a < *_totedge; a++, medge++) {
BLI_edgehash_insert(hash, medge->v1, medge->v2, SET_INT_IN_POINTER(a));
}
mpoly = allpoly;
- for (a=0; a<totpoly; a++, mpoly++) {
+ for (a = 0; a < totpoly; a++, mpoly++) {
mloop = allloop + mpoly->loopstart;
- for (b=0; b<mpoly->totloop; b++) {
+ for (b = 0; b < mpoly->totloop; b++) {
int v1, v2;
v1 = mloop[b].v;
@@ -1007,28 +1014,28 @@ static void make_edges_mdata(MVert *UNUSED(allvert), MFace *allface, MLoop *alll
BLI_edgehash_free(hash, NULL);
}
-void make_edges(Mesh *me, int old)
+void BKE_mesh_make_edges(Mesh *me, int old)
{
MEdge *medge;
- int totedge=0;
+ int totedge = 0;
make_edges_mdata(me->mvert, me->mface, me->mloop, me->mpoly, me->totvert, me->totface, me->totloop, me->totpoly, old, &medge, &totedge);
- if (totedge==0) {
+ if (totedge == 0) {
/* flag that mesh has edges */
me->medge = medge;
me->totedge = 0;
return;
}
- medge= CustomData_add_layer(&me->edata, CD_MEDGE, CD_ASSIGN, medge, totedge);
- me->medge= medge;
- me->totedge= totedge;
+ medge = CustomData_add_layer(&me->edata, CD_MEDGE, CD_ASSIGN, medge, totedge);
+ me->medge = medge;
+ me->totedge = totedge;
- mesh_strip_loose_faces(me);
+ BKE_mesh_strip_loose_faces(me);
}
/* We need to keep this for edge creation (for now?), and some old readfile code... */
-void mesh_strip_loose_faces(Mesh *me)
+void BKE_mesh_strip_loose_faces(Mesh *me)
{
MFace *f;
int a, b;
@@ -1052,7 +1059,7 @@ void mesh_strip_loose_faces(Mesh *me)
/* Note: It won't try to guess which loops of an invalid poly to remove!
* this is the work of the caller, to mark those loops...
* See e.g. BKE_mesh_validate_arrays(). */
-void mesh_strip_loose_polysloops(Mesh *me)
+void BKE_mesh_strip_loose_polysloops(Mesh *me)
{
MPoly *p;
MLoop *l;
@@ -1104,7 +1111,7 @@ void mesh_strip_loose_polysloops(Mesh *me)
b++;
}
else {
- /* XXX Theorically, we should be able to not do this, as no remaining poly
+ /* XXX Theoretically, we should be able to not do this, as no remaining poly
* should use any stripped loop. But for security's sake... */
new_idx[a] = -a;
}
@@ -1123,12 +1130,12 @@ void mesh_strip_loose_polysloops(Mesh *me)
MEM_freeN(new_idx);
}
-void mesh_strip_loose_edges(Mesh *me)
+void BKE_mesh_strip_loose_edges(Mesh *me)
{
MEdge *e;
MLoop *l;
int a, b;
- unsigned int *new_idx = MEM_mallocN(sizeof(int) * me->totedge, "strip_loose_edges old2new idx mapping for loops.");
+ unsigned int *new_idx = MEM_mallocN(sizeof(int) * me->totedge, __func__);
for (a = b = 0, e = me->medge; a < me->totedge; a++, e++) {
if (e->v1 != e->v2) {
@@ -1154,9 +1161,11 @@ void mesh_strip_loose_edges(Mesh *me)
for (a = 0, l = me->mloop; a < me->totloop; a++, l++) {
l->e = new_idx[l->e];
}
+
+ MEM_freeN(new_idx);
}
-void mball_to_mesh(ListBase *lb, Mesh *me)
+void BKE_mesh_from_metaball(ListBase *lb, Mesh *me)
{
DispList *dl;
MVert *mvert;
@@ -1165,55 +1174,55 @@ void mball_to_mesh(ListBase *lb, Mesh *me)
float *nors, *verts;
int a, *index;
- dl= lb->first;
- if (dl==NULL) return;
-
- if (dl->type==DL_INDEX4) {
- mvert= CustomData_add_layer(&me->vdata, CD_MVERT, CD_CALLOC, NULL, dl->nr);
- allloop= mloop= CustomData_add_layer(&me->ldata, CD_MLOOP, CD_CALLOC, NULL, dl->parts * 4);
- mpoly= CustomData_add_layer(&me->pdata, CD_MPOLY, CD_CALLOC, NULL, dl->parts);
- me->mvert= mvert;
- me->mloop= mloop;
- me->mpoly= mpoly;
- me->totvert= dl->nr;
- me->totpoly= dl->parts;
-
- a= dl->nr;
- nors= dl->nors;
- verts= dl->verts;
+ dl = lb->first;
+ if (dl == NULL) return;
+
+ if (dl->type == DL_INDEX4) {
+ mvert = CustomData_add_layer(&me->vdata, CD_MVERT, CD_CALLOC, NULL, dl->nr);
+ allloop = mloop = CustomData_add_layer(&me->ldata, CD_MLOOP, CD_CALLOC, NULL, dl->parts * 4);
+ mpoly = CustomData_add_layer(&me->pdata, CD_MPOLY, CD_CALLOC, NULL, dl->parts);
+ me->mvert = mvert;
+ me->mloop = mloop;
+ me->mpoly = mpoly;
+ me->totvert = dl->nr;
+ me->totpoly = dl->parts;
+
+ a = dl->nr;
+ nors = dl->nors;
+ verts = dl->verts;
while (a--) {
copy_v3_v3(mvert->co, verts);
normal_float_to_short_v3(mvert->no, nors);
mvert++;
- nors+= 3;
- verts+= 3;
+ nors += 3;
+ verts += 3;
}
- a= dl->parts;
- index= dl->index;
+ a = dl->parts;
+ index = dl->index;
while (a--) {
- int count= index[2] != index[3] ? 4 : 3;
+ int count = index[2] != index[3] ? 4 : 3;
- mloop[0].v= index[0];
- mloop[1].v= index[1];
- mloop[2].v= index[2];
+ mloop[0].v = index[0];
+ mloop[1].v = index[1];
+ mloop[2].v = index[2];
if (count == 4)
- mloop[3].v= index[3];
+ mloop[3].v = index[3];
- mpoly->totloop= count;
- mpoly->loopstart= (int)(mloop - allloop);
- mpoly->flag= ME_SMOOTH;
+ mpoly->totloop = count;
+ mpoly->loopstart = (int)(mloop - allloop);
+ mpoly->flag = ME_SMOOTH;
mpoly++;
- mloop+= count;
- me->totloop+= count;
- index+= 4;
+ mloop += count;
+ me->totloop += count;
+ index += 4;
}
mesh_update_customdata_pointers(me, TRUE);
- mesh_calc_normals(me->mvert, me->totvert, me->mloop, me->mpoly, me->totloop, me->totpoly, NULL);
+ BKE_mesh_calc_normals(me->mvert, me->totvert, me->mloop, me->mpoly, me->totloop, me->totpoly, NULL);
BKE_mesh_calc_edges(me, TRUE);
}
@@ -1221,15 +1230,15 @@ void mball_to_mesh(ListBase *lb, Mesh *me)
/* Initialize mverts, medges and, faces for converting nurbs to mesh and derived mesh */
/* return non-zero on error */
-int nurbs_to_mdata(Object *ob, MVert **allvert, int *totvert,
- MEdge **alledge, int *totedge, MLoop **allloop, MPoly **allpoly,
- int *totloop, int *totpoly)
+int BKE_mesh_nurbs_to_mdata(Object *ob, MVert **allvert, int *totvert,
+ MEdge **alledge, int *totedge, MLoop **allloop, MPoly **allpoly,
+ int *totloop, int *totpoly)
{
- return nurbs_to_mdata_customdb(ob, &ob->disp,
- allvert, totvert,
- alledge, totedge,
- allloop, allpoly,
- totloop, totpoly);
+ return BKE_mesh_nurbs_to_mdata_customdb(ob, &ob->disp,
+ allvert, totvert,
+ alledge, totedge,
+ allloop, allpoly,
+ totloop, totpoly);
}
/* BMESH: this doesn't calculate all edges from polygons,
@@ -1237,11 +1246,11 @@ int nurbs_to_mdata(Object *ob, MVert **allvert, int *totvert,
/* Initialize mverts, medges and, faces for converting nurbs to mesh and derived mesh */
/* use specified dispbase */
-int nurbs_to_mdata_customdb(Object *ob, ListBase *dispbase,
- MVert **allvert, int *_totvert,
- MEdge **alledge, int *_totedge,
- MLoop **allloop, MPoly **allpoly,
- int *_totloop, int *_totpoly)
+int BKE_mesh_nurbs_to_mdata_customdb(Object *ob, ListBase *dispbase,
+ MVert **allvert, int *_totvert,
+ MEdge **alledge, int *_totedge,
+ MLoop **allloop, MPoly **allpoly,
+ int *_totloop, int *_totpoly)
{
DispList *dl;
Curve *cu;
@@ -1250,46 +1259,46 @@ int nurbs_to_mdata_customdb(Object *ob, ListBase *dispbase,
MLoop *mloop;
MEdge *medge;
float *data;
- int a, b, ofs, vertcount, startvert, totvert=0, totedge=0, totloop=0, totvlak=0;
+ int a, b, ofs, vertcount, startvert, totvert = 0, totedge = 0, totloop = 0, totvlak = 0;
int p1, p2, p3, p4, *index;
- int conv_polys= 0;
+ int conv_polys = 0;
- cu= ob->data;
+ cu = ob->data;
- conv_polys|= cu->flag & CU_3D; /* 2d polys are filled with DL_INDEX3 displists */
- conv_polys|= ob->type == OB_SURF; /* surf polys are never filled */
+ conv_polys |= cu->flag & CU_3D; /* 2d polys are filled with DL_INDEX3 displists */
+ conv_polys |= ob->type == OB_SURF; /* surf polys are never filled */
/* count */
- dl= dispbase->first;
+ dl = dispbase->first;
while (dl) {
- if (dl->type==DL_SEGM) {
- totvert+= dl->parts*dl->nr;
- totedge+= dl->parts*(dl->nr-1);
+ if (dl->type == DL_SEGM) {
+ totvert += dl->parts * dl->nr;
+ totedge += dl->parts * (dl->nr - 1);
}
- else if (dl->type==DL_POLY) {
+ else if (dl->type == DL_POLY) {
if (conv_polys) {
- totvert+= dl->parts*dl->nr;
- totedge+= dl->parts*dl->nr;
+ totvert += dl->parts * dl->nr;
+ totedge += dl->parts * dl->nr;
}
}
- else if (dl->type==DL_SURF) {
+ else if (dl->type == DL_SURF) {
int tot;
- totvert+= dl->parts*dl->nr;
- tot = (dl->parts-1+((dl->flag & DL_CYCL_V)==2))*(dl->nr-1+(dl->flag & DL_CYCL_U));
+ totvert += dl->parts * dl->nr;
+ tot = (dl->parts - 1 + ((dl->flag & DL_CYCL_V) == 2)) * (dl->nr - 1 + (dl->flag & DL_CYCL_U));
totvlak += tot;
totloop += tot * 4;
}
- else if (dl->type==DL_INDEX3) {
+ else if (dl->type == DL_INDEX3) {
int tot;
- totvert+= dl->nr;
+ totvert += dl->nr;
tot = dl->parts;
- totvlak+= tot;
+ totvlak += tot;
totloop += tot * 3;
}
- dl= dl->next;
+ dl = dl->next;
}
- if (totvert==0) {
+ if (totvert == 0) {
/* error("can't convert"); */
/* Make Sure you check ob->data is a curve */
return -1;
@@ -1301,28 +1310,28 @@ int nurbs_to_mdata_customdb(Object *ob, ListBase *dispbase,
*allpoly = mpoly = MEM_callocN(sizeof(MPoly) * totvlak, "nurbs_init mloop");
/* verts and faces */
- vertcount= 0;
+ vertcount = 0;
- dl= dispbase->first;
+ dl = dispbase->first;
while (dl) {
- int smooth= dl->rt & CU_SMOOTH ? 1 : 0;
+ int smooth = dl->rt & CU_SMOOTH ? 1 : 0;
- if (dl->type==DL_SEGM) {
- startvert= vertcount;
- a= dl->parts*dl->nr;
- data= dl->verts;
+ if (dl->type == DL_SEGM) {
+ startvert = vertcount;
+ a = dl->parts * dl->nr;
+ data = dl->verts;
while (a--) {
copy_v3_v3(mvert->co, data);
- data+=3;
+ data += 3;
vertcount++;
mvert++;
}
- for (a=0; a<dl->parts; a++) {
- ofs= a*dl->nr;
- for (b=1; b<dl->nr; b++) {
- medge->v1= startvert+ofs+b-1;
- medge->v2= startvert+ofs+b;
+ for (a = 0; a < dl->parts; a++) {
+ ofs = a * dl->nr;
+ for (b = 1; b < dl->nr; b++) {
+ medge->v1 = startvert + ofs + b - 1;
+ medge->v2 = startvert + ofs + b;
medge->flag = ME_LOOSEEDGE | ME_EDGERENDER | ME_EDGEDRAW;
medge++;
@@ -1330,122 +1339,122 @@ int nurbs_to_mdata_customdb(Object *ob, ListBase *dispbase,
}
}
- else if (dl->type==DL_POLY) {
+ else if (dl->type == DL_POLY) {
if (conv_polys) {
- startvert= vertcount;
- a= dl->parts*dl->nr;
- data= dl->verts;
+ startvert = vertcount;
+ a = dl->parts * dl->nr;
+ data = dl->verts;
while (a--) {
copy_v3_v3(mvert->co, data);
- data+=3;
+ data += 3;
vertcount++;
mvert++;
}
- for (a=0; a<dl->parts; a++) {
- ofs= a*dl->nr;
- for (b=0; b<dl->nr; b++) {
- medge->v1= startvert+ofs+b;
- if (b==dl->nr-1) medge->v2= startvert+ofs;
- else medge->v2= startvert+ofs+b+1;
+ for (a = 0; a < dl->parts; a++) {
+ ofs = a * dl->nr;
+ for (b = 0; b < dl->nr; b++) {
+ medge->v1 = startvert + ofs + b;
+ if (b == dl->nr - 1) medge->v2 = startvert + ofs;
+ else medge->v2 = startvert + ofs + b + 1;
medge->flag = ME_LOOSEEDGE | ME_EDGERENDER | ME_EDGEDRAW;
medge++;
}
}
}
}
- else if (dl->type==DL_INDEX3) {
- startvert= vertcount;
- a= dl->nr;
- data= dl->verts;
+ else if (dl->type == DL_INDEX3) {
+ startvert = vertcount;
+ a = dl->nr;
+ data = dl->verts;
while (a--) {
copy_v3_v3(mvert->co, data);
- data+=3;
+ data += 3;
vertcount++;
mvert++;
}
- a= dl->parts;
- index= dl->index;
+ a = dl->parts;
+ index = dl->index;
while (a--) {
- mloop[0].v = startvert+index[0];
- mloop[1].v = startvert+index[2];
- mloop[2].v = startvert+index[1];
+ mloop[0].v = startvert + index[0];
+ mloop[1].v = startvert + index[2];
+ mloop[2].v = startvert + index[1];
mpoly->loopstart = (int)(mloop - (*allloop));
mpoly->totloop = 3;
mpoly->mat_nr = dl->col;
if (smooth) mpoly->flag |= ME_SMOOTH;
mpoly++;
- mloop+= 3;
- index+= 3;
+ mloop += 3;
+ index += 3;
}
}
- else if (dl->type==DL_SURF) {
- startvert= vertcount;
- a= dl->parts*dl->nr;
- data= dl->verts;
+ else if (dl->type == DL_SURF) {
+ startvert = vertcount;
+ a = dl->parts * dl->nr;
+ data = dl->verts;
while (a--) {
copy_v3_v3(mvert->co, data);
- data+=3;
+ data += 3;
vertcount++;
mvert++;
}
- for (a=0; a<dl->parts; a++) {
+ for (a = 0; a < dl->parts; a++) {
- if ( (dl->flag & DL_CYCL_V)==0 && a==dl->parts-1) break;
+ if ( (dl->flag & DL_CYCL_V) == 0 && a == dl->parts - 1) break;
- if (dl->flag & DL_CYCL_U) { /* p2 -> p1 -> */
- p1= startvert+ dl->nr*a; /* p4 -> p3 -> */
- p2= p1+ dl->nr-1; /* -----> next row */
- p3= p1+ dl->nr;
- p4= p2+ dl->nr;
- b= 0;
+ if (dl->flag & DL_CYCL_U) { /* p2 -> p1 -> */
+ p1 = startvert + dl->nr * a; /* p4 -> p3 -> */
+ p2 = p1 + dl->nr - 1; /* -----> next row */
+ p3 = p1 + dl->nr;
+ p4 = p2 + dl->nr;
+ b = 0;
}
else {
- p2= startvert+ dl->nr*a;
- p1= p2+1;
- p4= p2+ dl->nr;
- p3= p1+ dl->nr;
- b= 1;
+ p2 = startvert + dl->nr * a;
+ p1 = p2 + 1;
+ p4 = p2 + dl->nr;
+ p3 = p1 + dl->nr;
+ b = 1;
}
- if ( (dl->flag & DL_CYCL_V) && a==dl->parts-1) {
- p3-= dl->parts*dl->nr;
- p4-= dl->parts*dl->nr;
+ if ( (dl->flag & DL_CYCL_V) && a == dl->parts - 1) {
+ p3 -= dl->parts * dl->nr;
+ p4 -= dl->parts * dl->nr;
}
- for (; b<dl->nr; b++) {
- mloop[0].v= p1;
- mloop[1].v= p3;
- mloop[2].v= p4;
- mloop[3].v= p2;
+ for (; b < dl->nr; b++) {
+ mloop[0].v = p1;
+ mloop[1].v = p3;
+ mloop[2].v = p4;
+ mloop[3].v = p2;
mpoly->loopstart = (int)(mloop - (*allloop));
mpoly->totloop = 4;
mpoly->mat_nr = dl->col;
if (smooth) mpoly->flag |= ME_SMOOTH;
mpoly++;
- mloop+= 4;
+ mloop += 4;
- p4= p3;
+ p4 = p3;
p3++;
- p2= p1;
+ p2 = p1;
p1++;
}
}
}
- dl= dl->next;
+ dl = dl->next;
}
- *_totpoly= totvlak;
- *_totloop= totloop;
- *_totedge= totedge;
- *_totvert= totvert;
+ *_totpoly = totvlak;
+ *_totloop = totloop;
+ *_totedge = totedge;
+ *_totvert = totvert;
/* not uded for bmesh */
#if 0
@@ -1457,72 +1466,75 @@ int nurbs_to_mdata_customdb(Object *ob, ListBase *dispbase,
}
/* this may fail replacing ob->data, be sure to check ob->type */
-void nurbs_to_mesh(Object *ob)
+void BKE_mesh_from_nurbs(Object *ob)
{
- Main *bmain= G.main;
+ Main *bmain = G.main;
Object *ob1;
- DerivedMesh *dm= ob->derivedFinal;
+ DerivedMesh *dm = ob->derivedFinal;
Mesh *me;
Curve *cu;
- MVert *allvert= NULL;
- MEdge *alledge= NULL;
+ MVert *allvert = NULL;
+ MEdge *alledge = NULL;
MLoop *allloop = NULL;
MPoly *allpoly = NULL;
int totvert, totedge, totloop, totpoly;
- cu= ob->data;
+ cu = ob->data;
if (dm == NULL) {
- if (nurbs_to_mdata(ob, &allvert, &totvert, &alledge, &totedge, &allloop, &allpoly, &totloop, &totpoly) != 0) {
+ if (BKE_mesh_nurbs_to_mdata(ob, &allvert, &totvert,
+ &alledge, &totedge, &allloop,
+ &allpoly, &totloop, &totpoly) != 0)
+ {
/* Error initializing */
return;
}
/* make mesh */
- me= add_mesh("Mesh");
- me->totvert= totvert;
- me->totedge= totedge;
+ me = BKE_mesh_add("Mesh");
+ me->totvert = totvert;
+ me->totedge = totedge;
me->totloop = totloop;
me->totpoly = totpoly;
- me->mvert= CustomData_add_layer(&me->vdata, CD_MVERT, CD_ASSIGN, allvert, me->totvert);
- me->medge= CustomData_add_layer(&me->edata, CD_MEDGE, CD_ASSIGN, alledge, me->totedge);
- me->mloop= CustomData_add_layer(&me->ldata, CD_MLOOP, CD_ASSIGN, allloop, me->totloop);
- me->mpoly= CustomData_add_layer(&me->pdata, CD_MPOLY, CD_ASSIGN, allpoly, me->totpoly);
+ me->mvert = CustomData_add_layer(&me->vdata, CD_MVERT, CD_ASSIGN, allvert, me->totvert);
+ me->medge = CustomData_add_layer(&me->edata, CD_MEDGE, CD_ASSIGN, alledge, me->totedge);
+ me->mloop = CustomData_add_layer(&me->ldata, CD_MLOOP, CD_ASSIGN, allloop, me->totloop);
+ me->mpoly = CustomData_add_layer(&me->pdata, CD_MPOLY, CD_ASSIGN, allpoly, me->totpoly);
- mesh_calc_normals(me->mvert, me->totvert, me->mloop, me->mpoly, me->totloop, me->totpoly, NULL);
+ BKE_mesh_calc_normals(me->mvert, me->totvert, me->mloop, me->mpoly, me->totloop, me->totpoly, NULL);
BKE_mesh_calc_edges(me, TRUE);
}
else {
- me= add_mesh("Mesh");
+ me = BKE_mesh_add("Mesh");
DM_to_mesh(dm, me, ob);
}
- me->totcol= cu->totcol;
- me->mat= cu->mat;
+ me->totcol = cu->totcol;
+ me->mat = cu->mat;
- tex_space_mesh(me);
+ BKE_mesh_texspace_calc(me);
- cu->mat= NULL;
- cu->totcol= 0;
+ cu->mat = NULL;
+ cu->totcol = 0;
if (ob->data) {
- free_libblock(&bmain->curve, ob->data);
+ BKE_libblock_free(&bmain->curve, ob->data);
}
- ob->data= me;
- ob->type= OB_MESH;
+ ob->data = me;
+ ob->type = OB_MESH;
/* other users */
- ob1= bmain->object.first;
+ ob1 = bmain->object.first;
while (ob1) {
- if (ob1->data==cu) {
- ob1->type= OB_MESH;
+ if (ob1->data == cu) {
+ ob1->type = OB_MESH;
- ob1->data= ob->data;
+ ob1->data = ob->data;
id_us_plus((ID *)ob->data);
}
- ob1= ob1->id.next;
+ ob1 = ob1->id.next;
}
}
@@ -1538,26 +1550,26 @@ typedef struct VertLink {
static void prependPolyLineVert(ListBase *lb, unsigned int index)
{
- VertLink *vl= MEM_callocN(sizeof(VertLink), "VertLink");
+ VertLink *vl = MEM_callocN(sizeof(VertLink), "VertLink");
vl->index = index;
BLI_addhead(lb, vl);
}
static void appendPolyLineVert(ListBase *lb, unsigned int index)
{
- VertLink *vl= MEM_callocN(sizeof(VertLink), "VertLink");
+ VertLink *vl = MEM_callocN(sizeof(VertLink), "VertLink");
vl->index = index;
BLI_addtail(lb, vl);
}
-void mesh_to_curve(Scene *scene, Object *ob)
+void BKE_mesh_from_curve(Scene *scene, Object *ob)
{
/* make new mesh data from the original copy */
- DerivedMesh *dm= mesh_get_derived_final(scene, ob, CD_MASK_MESH);
+ DerivedMesh *dm = mesh_get_derived_final(scene, ob, CD_MASK_MESH);
- MVert *mverts= dm->getVertArray(dm);
- MEdge *med, *medge= dm->getEdgeArray(dm);
- MFace *mf, *mface= dm->getTessFaceArray(dm);
+ MVert *mverts = dm->getVertArray(dm);
+ MEdge *med, *medge = dm->getEdgeArray(dm);
+ MFace *mf, *mface = dm->getTessFaceArray(dm);
int totedge = dm->getNumEdges(dm);
int totface = dm->getNumTessFaces(dm);
@@ -1572,7 +1584,7 @@ void mesh_to_curve(Scene *scene, Object *ob)
ListBase edges = {NULL, NULL};
/* create edges from all faces (so as to find edges not in any faces) */
- mf= mface;
+ mf = mface;
for (i = 0; i < totface; i++, mf++) {
if (!BLI_edgehash_haskey(eh, mf->v1, mf->v2))
BLI_edgehash_insert(eh, mf->v1, mf->v2, NULL);
@@ -1591,22 +1603,22 @@ void mesh_to_curve(Scene *scene, Object *ob)
}
}
- med= medge;
- for (i=0; i<totedge; i++, med++) {
+ med = medge;
+ for (i = 0; i < totedge; i++, med++) {
if (!BLI_edgehash_haskey(eh, med->v1, med->v2)) {
- EdgeLink *edl= MEM_callocN(sizeof(EdgeLink), "EdgeLink");
+ EdgeLink *edl = MEM_callocN(sizeof(EdgeLink), "EdgeLink");
BLI_edgehash_insert(eh_edge, med->v1, med->v2, NULL);
- edl->edge= med;
+ edl->edge = med;
- BLI_addtail(&edges, edl); totedges++;
+ BLI_addtail(&edges, edl); totedges++;
}
}
BLI_edgehash_free(eh_edge, NULL);
BLI_edgehash_free(eh, NULL);
if (edges.first) {
- Curve *cu = add_curve(ob->id.name+2, OB_CURVE);
+ Curve *cu = BKE_curve_add(ob->id.name + 2, OB_CURVE);
cu->flag |= CU_3D;
while (edges.first) {
@@ -1614,55 +1626,55 @@ void mesh_to_curve(Scene *scene, Object *ob)
ListBase polyline = {NULL, NULL}; /* store a list of VertLink's */
int closed = FALSE;
- int totpoly= 0;
- MEdge *med_current= ((EdgeLink *)edges.last)->edge;
- unsigned int startVert= med_current->v1;
- unsigned int endVert= med_current->v2;
- int ok= TRUE;
+ int totpoly = 0;
+ MEdge *med_current = ((EdgeLink *)edges.last)->edge;
+ unsigned int startVert = med_current->v1;
+ unsigned int endVert = med_current->v2;
+ int ok = TRUE;
- appendPolyLineVert(&polyline, startVert); totpoly++;
- appendPolyLineVert(&polyline, endVert); totpoly++;
- BLI_freelinkN(&edges, edges.last); totedges--;
+ appendPolyLineVert(&polyline, startVert); totpoly++;
+ appendPolyLineVert(&polyline, endVert); totpoly++;
+ BLI_freelinkN(&edges, edges.last); totedges--;
while (ok) { /* while connected edges are found... */
ok = FALSE;
- i= totedges;
+ i = totedges;
while (i) {
EdgeLink *edl;
- i-=1;
- edl= BLI_findlink(&edges, i);
- med= edl->edge;
+ i -= 1;
+ edl = BLI_findlink(&edges, i);
+ med = edl->edge;
- if (med->v1==endVert) {
+ if (med->v1 == endVert) {
endVert = med->v2;
- appendPolyLineVert(&polyline, med->v2); totpoly++;
- BLI_freelinkN(&edges, edl); totedges--;
- ok= TRUE;
+ appendPolyLineVert(&polyline, med->v2); totpoly++;
+ BLI_freelinkN(&edges, edl); totedges--;
+ ok = TRUE;
}
- else if (med->v2==endVert) {
+ else if (med->v2 == endVert) {
endVert = med->v1;
- appendPolyLineVert(&polyline, endVert); totpoly++;
- BLI_freelinkN(&edges, edl); totedges--;
- ok= TRUE;
+ appendPolyLineVert(&polyline, endVert); totpoly++;
+ BLI_freelinkN(&edges, edl); totedges--;
+ ok = TRUE;
}
- else if (med->v1==startVert) {
+ else if (med->v1 == startVert) {
startVert = med->v2;
- prependPolyLineVert(&polyline, startVert); totpoly++;
- BLI_freelinkN(&edges, edl); totedges--;
- ok= TRUE;
+ prependPolyLineVert(&polyline, startVert); totpoly++;
+ BLI_freelinkN(&edges, edl); totedges--;
+ ok = TRUE;
}
- else if (med->v2==startVert) {
+ else if (med->v2 == startVert) {
startVert = med->v1;
- prependPolyLineVert(&polyline, startVert); totpoly++;
- BLI_freelinkN(&edges, edl); totedges--;
- ok= TRUE;
+ prependPolyLineVert(&polyline, startVert); totpoly++;
+ BLI_freelinkN(&edges, edl); totedges--;
+ ok = TRUE;
}
}
}
/* Now we have a polyline, make into a curve */
- if (startVert==endVert) {
+ if (startVert == endVert) {
BLI_freelinkN(&polyline, polyline.last);
totpoly--;
closed = TRUE;
@@ -1677,19 +1689,19 @@ void mesh_to_curve(Scene *scene, Object *ob)
/* create new 'nurb' within the curve */
nu = (Nurb *)MEM_callocN(sizeof(Nurb), "MeshNurb");
- nu->pntsu= totpoly;
- nu->pntsv= 1;
- nu->orderu= 4;
- nu->flagu= CU_NURB_ENDPOINT | (closed ? CU_NURB_CYCLIC:0); /* endpoint */
- nu->resolu= 12;
+ nu->pntsu = totpoly;
+ nu->pntsv = 1;
+ nu->orderu = 4;
+ nu->flagu = CU_NURB_ENDPOINT | (closed ? CU_NURB_CYCLIC : 0); /* endpoint */
+ nu->resolu = 12;
- nu->bp= (BPoint *)MEM_callocN(sizeof(BPoint)*totpoly, "bpoints");
+ nu->bp = (BPoint *)MEM_callocN(sizeof(BPoint) * totpoly, "bpoints");
/* add points */
- vl= polyline.first;
- for (i=0, bp=nu->bp; i < totpoly; i++, bp++, vl=(VertLink *)vl->next) {
+ vl = polyline.first;
+ for (i = 0, bp = nu->bp; i < totpoly; i++, bp++, vl = (VertLink *)vl->next) {
copy_v3_v3(bp->vec, mverts[vl->index].co);
- bp->f1= SELECT;
+ bp->f1 = SELECT;
bp->radius = bp->weight = 1.0;
}
BLI_freelistN(&polyline);
@@ -1701,11 +1713,11 @@ void mesh_to_curve(Scene *scene, Object *ob)
}
((Mesh *)ob->data)->id.us--;
- ob->data= cu;
- ob->type= OB_CURVE;
+ ob->data = cu;
+ ob->type = OB_CURVE;
/* curve objects can't contain DM in usual cases, we could free memory */
- needsFree= 1;
+ needsFree = 1;
}
dm->needsFree = needsFree;
@@ -1717,35 +1729,35 @@ void mesh_to_curve(Scene *scene, Object *ob)
/* curve object could have got bounding box only in special cases */
if (ob->bb) {
MEM_freeN(ob->bb);
- ob->bb= NULL;
+ ob->bb = NULL;
}
}
}
-void mesh_delete_material_index(Mesh *me, short index)
+void BKE_mesh_delete_material_index(Mesh *me, short index)
{
int i;
- for (i=0; i<me->totpoly; i++) {
- MPoly *mp = &((MPoly*) me->mpoly)[i];
- if (mp->mat_nr && mp->mat_nr>=index)
+ for (i = 0; i < me->totpoly; i++) {
+ MPoly *mp = &((MPoly *) me->mpoly)[i];
+ if (mp->mat_nr && mp->mat_nr >= index)
mp->mat_nr--;
}
- for (i=0; i<me->totface; i++) {
- MFace *mf = &((MFace*) me->mface)[i];
- if (mf->mat_nr && mf->mat_nr>=index)
+ for (i = 0; i < me->totface; i++) {
+ MFace *mf = &((MFace *) me->mface)[i];
+ if (mf->mat_nr && mf->mat_nr >= index)
mf->mat_nr--;
}
}
-void mesh_set_smooth_flag(Object *meshOb, int enableSmooth)
+void BKE_mesh_smooth_flag_set(Object *meshOb, int enableSmooth)
{
Mesh *me = meshOb->data;
int i;
- for (i=0; i<me->totpoly; i++) {
- MPoly *mp = &((MPoly*) me->mpoly)[i];
+ for (i = 0; i < me->totpoly; i++) {
+ MPoly *mp = &((MPoly *) me->mpoly)[i];
if (enableSmooth) {
mp->flag |= ME_SMOOTH;
@@ -1755,8 +1767,8 @@ void mesh_set_smooth_flag(Object *meshOb, int enableSmooth)
}
}
- for (i=0; i<me->totface; i++) {
- MFace *mf = &((MFace*) me->mface)[i];
+ for (i = 0; i < me->totface; i++) {
+ MFace *mf = &((MFace *) me->mface)[i];
if (enableSmooth) {
mf->flag |= ME_SMOOTH;
@@ -1767,20 +1779,20 @@ void mesh_set_smooth_flag(Object *meshOb, int enableSmooth)
}
}
-void mesh_calc_normals_mapping(MVert *mverts, int numVerts,
- MLoop *mloop, MPoly *mpolys, int numLoops, int numPolys, float (*polyNors_r)[3],
- MFace *mfaces, int numFaces, int *origIndexFace, float (*faceNors_r)[3])
+void BKE_mesh_calc_normals_mapping(MVert *mverts, int numVerts,
+ MLoop *mloop, MPoly *mpolys, int numLoops, int numPolys, float (*polyNors_r)[3],
+ MFace *mfaces, int numFaces, int *origIndexFace, float (*faceNors_r)[3])
{
- mesh_calc_normals_mapping_ex(mverts, numVerts, mloop, mpolys,
- numLoops, numPolys, polyNors_r, mfaces, numFaces,
- origIndexFace, faceNors_r, TRUE);
+ BKE_mesh_calc_normals_mapping_ex(mverts, numVerts, mloop, mpolys,
+ numLoops, numPolys, polyNors_r, mfaces, numFaces,
+ origIndexFace, faceNors_r, FALSE);
}
-void mesh_calc_normals_mapping_ex(MVert *mverts, int numVerts,
- MLoop *mloop, MPoly *mpolys,
- int numLoops, int numPolys, float (*polyNors_r)[3],
- MFace *mfaces, int numFaces, int *origIndexFace, float (*faceNors_r)[3],
- const short only_face_normals)
+void BKE_mesh_calc_normals_mapping_ex(MVert *mverts, int numVerts,
+ MLoop *mloop, MPoly *mpolys,
+ int numLoops, int numPolys, float (*polyNors_r)[3],
+ MFace *mfaces, int numFaces, int *origIndexFace, float (*faceNors_r)[3],
+ const short only_face_normals)
{
float (*pnors)[3] = polyNors_r, (*fnors)[3] = faceNors_r;
int i;
@@ -1804,29 +1816,29 @@ void mesh_calc_normals_mapping_ex(MVert *mverts, int numVerts,
if (only_face_normals == FALSE) {
/* vertex normals are optional, they require some extra calculations,
* so make them optional */
- mesh_calc_normals(mverts, numVerts, mloop, mpolys, numLoops, numPolys, pnors);
+ BKE_mesh_calc_normals(mverts, numVerts, mloop, mpolys, numLoops, numPolys, pnors);
}
else {
/* only calc poly normals */
mp = mpolys;
- for (i=0; i<numPolys; i++, mp++) {
- mesh_calc_poly_normal(mp, mloop+mp->loopstart, mverts, pnors[i]);
+ for (i = 0; i < numPolys; i++, mp++) {
+ mesh_calc_poly_normal(mp, mloop + mp->loopstart, mverts, pnors[i]);
}
}
- if ( origIndexFace &&
- /* fnors==faceNors_r */ /* NO NEED TO ALLOC YET */
- fnors != NULL &&
- numFaces)
+ if (origIndexFace &&
+ /* fnors==faceNors_r */ /* NO NEED TO ALLOC YET */
+ fnors != NULL &&
+ numFaces)
{
mf = mfaces;
- for (i=0; i<numFaces; i++, mf++, origIndexFace++) {
+ for (i = 0; i < numFaces; i++, mf++, origIndexFace++) {
if (*origIndexFace < numPolys) {
copy_v3_v3(fnors[i], pnors[*origIndexFace]);
}
else {
/* eek, we're not corresponding to polys */
- printf("error in mesh_calc_normals; tessellation face indices are incorrect. normals may look bad.\n");
+ printf("error in BKE_mesh_calc_normals; tessellation face indices are incorrect. normals may look bad.\n");
}
}
}
@@ -1838,12 +1850,12 @@ void mesh_calc_normals_mapping_ex(MVert *mverts, int numVerts,
}
-void mesh_calc_normals(MVert *mverts, int numVerts, MLoop *mloop, MPoly *mpolys,
- int UNUSED(numLoops), int numPolys, float (*polyNors_r)[3])
+void BKE_mesh_calc_normals(MVert *mverts, int numVerts, MLoop *mloop, MPoly *mpolys,
+ int UNUSED(numLoops), int numPolys, float (*polyNors_r)[3])
{
float (*pnors)[3] = polyNors_r;
- float (*tnorms)[3], (*edgevecbuf)[3]= NULL;
+ float (*tnorms)[3], (*edgevecbuf)[3] = NULL;
float **vertcos = NULL, **vertnos = NULL;
BLI_array_declare(vertcos);
BLI_array_declare(vertnos);
@@ -1856,26 +1868,26 @@ void mesh_calc_normals(MVert *mverts, int numVerts, MLoop *mloop, MPoly *mpolys,
if (!pnors) pnors = MEM_callocN(sizeof(float) * 3 * numPolys, "poly_nors mesh.c");
/*first go through and calculate normals for all the polys*/
- tnorms = MEM_callocN(sizeof(float)*3*numVerts, "tnorms mesh.c");
+ tnorms = MEM_callocN(sizeof(float) * 3 * numVerts, "tnorms mesh.c");
mp = mpolys;
- for (i=0; i<numPolys; i++, mp++) {
- mesh_calc_poly_normal(mp, mloop+mp->loopstart, mverts, pnors[i]);
+ for (i = 0; i < numPolys; i++, mp++) {
+ mesh_calc_poly_normal(mp, mloop + mp->loopstart, mverts, pnors[i]);
ml = mloop + mp->loopstart;
BLI_array_empty(vertcos);
BLI_array_empty(vertnos);
- BLI_array_growitems(vertcos, mp->totloop);
- BLI_array_growitems(vertnos, mp->totloop);
+ BLI_array_grow_items(vertcos, mp->totloop);
+ BLI_array_grow_items(vertnos, mp->totloop);
- for (j=0; j < mp->totloop; j++) {
+ for (j = 0; j < mp->totloop; j++) {
int vindex = ml[j].v;
vertcos[j] = mverts[vindex].co;
vertnos[j] = tnorms[vindex];
}
BLI_array_empty(edgevecbuf);
- BLI_array_growitems(edgevecbuf, mp->totloop);
+ BLI_array_grow_items(edgevecbuf, mp->totloop);
accumulate_vertex_normals_poly(vertnos, pnors[i], vertcos, edgevecbuf, mp->totloop);
}
@@ -1885,9 +1897,9 @@ void mesh_calc_normals(MVert *mverts, int numVerts, MLoop *mloop, MPoly *mpolys,
BLI_array_free(edgevecbuf);
/* following Mesh convention; we use vertex coordinate itself for normal in this case */
- for (i=0; i<numVerts; i++) {
- MVert *mv= &mverts[i];
- float *no= tnorms[i];
+ for (i = 0; i < numVerts; i++) {
+ MVert *mv = &mverts[i];
+ float *no = tnorms[i];
if (normalize_v3(no) == 0.0f)
normalize_v3_v3(no, mv->co);
@@ -1900,17 +1912,17 @@ void mesh_calc_normals(MVert *mverts, int numVerts, MLoop *mloop, MPoly *mpolys,
if (pnors != polyNors_r) MEM_freeN(pnors);
}
-void mesh_calc_normals_tessface(MVert *mverts, int numVerts, MFace *mfaces, int numFaces, float (*faceNors_r)[3])
+void BKE_mesh_calc_normals_tessface(MVert *mverts, int numVerts, MFace *mfaces, int numFaces, float (*faceNors_r)[3])
{
- float (*tnorms)[3]= MEM_callocN(numVerts*sizeof(*tnorms), "tnorms");
- float (*fnors)[3]= (faceNors_r)? faceNors_r: MEM_callocN(sizeof(*fnors)*numFaces, "meshnormals");
+ float (*tnorms)[3] = MEM_callocN(numVerts * sizeof(*tnorms), "tnorms");
+ float (*fnors)[3] = (faceNors_r) ? faceNors_r : MEM_callocN(sizeof(*fnors) * numFaces, "meshnormals");
int i;
- for (i=0; i<numFaces; i++) {
- MFace *mf= &mfaces[i];
- float *f_no= fnors[i];
- float *n4 = (mf->v4)? tnorms[mf->v4]: NULL;
- float *c4 = (mf->v4)? mverts[mf->v4].co: NULL;
+ for (i = 0; i < numFaces; i++) {
+ MFace *mf = &mfaces[i];
+ float *f_no = fnors[i];
+ float *n4 = (mf->v4) ? tnorms[mf->v4] : NULL;
+ float *c4 = (mf->v4) ? mverts[mf->v4].co : NULL;
if (mf->v4)
normal_quad_v3(f_no, mverts[mf->v1].co, mverts[mf->v2].co, mverts[mf->v3].co, mverts[mf->v4].co);
@@ -1918,13 +1930,13 @@ void mesh_calc_normals_tessface(MVert *mverts, int numVerts, MFace *mfaces, int
normal_tri_v3(f_no, mverts[mf->v1].co, mverts[mf->v2].co, mverts[mf->v3].co);
accumulate_vertex_normals(tnorms[mf->v1], tnorms[mf->v2], tnorms[mf->v3], n4,
- f_no, mverts[mf->v1].co, mverts[mf->v2].co, mverts[mf->v3].co, c4);
+ f_no, mverts[mf->v1].co, mverts[mf->v2].co, mverts[mf->v3].co, c4);
}
/* following Mesh convention; we use vertex coordinate itself for normal in this case */
- for (i=0; i<numVerts; i++) {
- MVert *mv= &mverts[i];
- float *no= tnorms[i];
+ for (i = 0; i < numVerts; i++) {
+ MVert *mv = &mverts[i];
+ float *no = tnorms[i];
if (normalize_v3(no) == 0.0f)
normalize_v3_v3(no, mv->co);
@@ -1951,7 +1963,7 @@ static void bm_corners_to_loops(Mesh *me, int findex, int loopstart, int numTex,
mf = me->mface + findex;
- for (i=0; i < numTex; i++) {
+ for (i = 0; i < numTex; i++) {
texface = CustomData_get_n(&me->fdata, CD_MTFACE, findex, i);
texpoly = CustomData_get_n(&me->pdata, CD_MTEXPOLY, findex, i);
@@ -1967,7 +1979,7 @@ static void bm_corners_to_loops(Mesh *me, int findex, int loopstart, int numTex,
}
}
- for (i=0; i < numCol; i++) {
+ for (i = 0; i < numCol; i++) {
mloopcol = CustomData_get_n(&me->ldata, CD_MLOOPCOL, loopstart, i);
mcol = CustomData_get_n(&me->fdata, CD_MCOL, findex, i);
@@ -1988,7 +2000,7 @@ static void bm_corners_to_loops(Mesh *me, int findex, int loopstart, int numTex,
if (CustomData_external_test(&me->fdata, CD_MDISPS)) {
CustomData_external_add(&me->ldata, &me->id, CD_MDISPS,
- me->totloop, me->fdata.external->filename);
+ me->totloop, me->fdata.external->filename);
}
corners = multires_mdisp_corners(fd);
@@ -2002,16 +2014,16 @@ static void bm_corners_to_loops(Mesh *me, int findex, int loopstart, int numTex,
else {
side = sqrt(fd->totdisp / corners);
- for (i=0; i<tot; i++, disps += side*side, ld++) {
- ld->totdisp = side*side;
- ld->level = (int)(logf(side - 1.0f) / M_LN2) + 1;
+ for (i = 0; i < tot; i++, disps += side * side, ld++) {
+ ld->totdisp = side * side;
+ ld->level = (int)(logf(side - 1.0f) / (float)M_LN2) + 1;
if (ld->disps)
MEM_freeN(ld->disps);
- ld->disps = MEM_callocN(sizeof(float)*3*side*side, "converted loop mdisps");
+ ld->disps = MEM_callocN(sizeof(float) * 3 * side * side, "converted loop mdisps");
if (fd->disps) {
- memcpy(ld->disps, disps, sizeof(float)*3*side*side);
+ memcpy(ld->disps, disps, sizeof(float) * 3 * side * side);
}
}
}
@@ -2035,7 +2047,7 @@ void BKE_mesh_convert_mfaces_to_mpolys(Mesh *mesh)
memset(&mesh->pdata, 0, sizeof(mesh->pdata));
mesh->totpoly = mesh->totface;
- mesh->mpoly = MEM_callocN(sizeof(MPoly)*mesh->totpoly, "mpoly converted");
+ mesh->mpoly = MEM_callocN(sizeof(MPoly) * mesh->totpoly, "mpoly converted");
CustomData_add_layer(&mesh->pdata, CD_MPOLY, CD_ASSIGN, mesh->mpoly, mesh->totpoly);
numTex = CustomData_number_of_layers(&mesh->fdata, CD_MTFACE);
@@ -2043,16 +2055,16 @@ void BKE_mesh_convert_mfaces_to_mpolys(Mesh *mesh)
totloop = 0;
mf = mesh->mface;
- for (i=0; i<mesh->totface; i++, mf++) {
+ for (i = 0; i < mesh->totface; i++, mf++) {
totloop += mf->v4 ? 4 : 3;
}
mesh->totloop = totloop;
- mesh->mloop = MEM_callocN(sizeof(MLoop)*mesh->totloop, "mloop converted");
+ mesh->mloop = MEM_callocN(sizeof(MLoop) * mesh->totloop, "mloop converted");
CustomData_add_layer(&mesh->ldata, CD_MLOOP, CD_ASSIGN, mesh->mloop, totloop);
CustomData_to_bmeshpoly(&mesh->fdata, &mesh->pdata, &mesh->ldata,
- mesh->totloop, mesh->totpoly);
+ mesh->totloop, mesh->totpoly);
/* ensure external data is transferred */
CustomData_external_read(&mesh->fdata, &mesh->id, CD_MASK_MDISPS, mesh->totface);
@@ -2072,7 +2084,7 @@ void BKE_mesh_convert_mfaces_to_mpolys(Mesh *mesh)
ml = mesh->mloop;
mf = mesh->mface;
mp = mesh->mpoly;
- for (i=0; i<mesh->totface; i++, mf++, mp++) {
+ for (i = 0; i < mesh->totface; i++, mf++, mp++) {
mp->loopstart = j;
mp->totloop = mf->v4 ? 4 : 3;
@@ -2080,7 +2092,8 @@ void BKE_mesh_convert_mfaces_to_mpolys(Mesh *mesh)
mp->mat_nr = mf->mat_nr;
mp->flag = mf->flag;
-# define ML(v1, v2) {ml->v = mf->v1; ml->e = GET_INT_FROM_POINTER(BLI_edgehash_lookup(eh, mf->v1, mf->v2)); ml++; j++;}
+# define ML(v1, v2) {ml->v = mf->v1; ml->e = GET_INT_FROM_POINTER(BLI_edgehash_lookup(eh, mf->v1, mf->v2)); ml++; j++; \
+}
ML(v1, v2);
ML(v2, v3);
@@ -2092,7 +2105,7 @@ void BKE_mesh_convert_mfaces_to_mpolys(Mesh *mesh)
ML(v3, v1);
}
-# undef ML
+# undef ML
bm_corners_to_loops(mesh, i, mp->loopstart, numTex, numCol);
}
@@ -2105,13 +2118,13 @@ void BKE_mesh_convert_mfaces_to_mpolys(Mesh *mesh)
BLI_edgehash_free(eh, NULL);
}
-float (*mesh_getVertexCos(Mesh *me, int *numVerts_r))[3]
+float (*mesh_getVertexCos(Mesh * me, int *numVerts_r))[3]
{
int i, numVerts = me->totvert;
- float (*cos)[3] = MEM_mallocN(sizeof(*cos)*numVerts, "vertexcos1");
+ float (*cos)[3] = MEM_mallocN(sizeof(*cos) * numVerts, "vertexcos1");
if (numVerts_r) *numVerts_r = numVerts;
- for (i=0; i<numVerts; i++)
+ for (i = 0; i < numVerts; i++)
copy_v3_v3(cos[i], me->mvert[i].co);
return cos;
@@ -2122,103 +2135,103 @@ float (*mesh_getVertexCos(Mesh *me, int *numVerts_r))[3]
/* this replaces the non bmesh function (in trunk) which takes MTFace's, if we ever need it back we could
* but for now this replaces it because its unused. */
-UvVertMap *make_uv_vert_map(struct MPoly *mpoly, struct MLoop *mloop, struct MLoopUV *mloopuv, unsigned int totpoly, unsigned int totvert, int selected, float *limit)
+UvVertMap *BKE_mesh_uv_vert_map_make(struct MPoly *mpoly, struct MLoop *mloop, struct MLoopUV *mloopuv, unsigned int totpoly, unsigned int totvert, int selected, float *limit)
{
UvVertMap *vmap;
UvMapVert *buf;
MPoly *mp;
unsigned int a;
- int i, totuv, nverts;
+ int i, totuv, nverts;
totuv = 0;
/* generate UvMapVert array */
- mp= mpoly;
- for (a=0; a<totpoly; a++, mp++)
+ mp = mpoly;
+ for (a = 0; a < totpoly; a++, mp++)
if (!selected || (!(mp->flag & ME_HIDE) && (mp->flag & ME_FACE_SEL)))
totuv += mp->totloop;
- if (totuv==0)
+ if (totuv == 0)
return NULL;
- vmap= (UvVertMap*)MEM_callocN(sizeof(*vmap), "UvVertMap");
+ vmap = (UvVertMap *)MEM_callocN(sizeof(*vmap), "UvVertMap");
if (!vmap)
return NULL;
- vmap->vert= (UvMapVert**)MEM_callocN(sizeof(*vmap->vert)*totvert, "UvMapVert*");
- buf= vmap->buf= (UvMapVert*)MEM_callocN(sizeof(*vmap->buf)*totuv, "UvMapVert");
+ vmap->vert = (UvMapVert **)MEM_callocN(sizeof(*vmap->vert) * totvert, "UvMapVert*");
+ buf = vmap->buf = (UvMapVert *)MEM_callocN(sizeof(*vmap->buf) * totuv, "UvMapVert");
if (!vmap->vert || !vmap->buf) {
- free_uv_vert_map(vmap);
+ BKE_mesh_uv_vert_map_free(vmap);
return NULL;
}
- mp= mpoly;
- for (a=0; a<totpoly; a++, mp++) {
+ mp = mpoly;
+ for (a = 0; a < totpoly; a++, mp++) {
if (!selected || (!(mp->flag & ME_HIDE) && (mp->flag & ME_FACE_SEL))) {
- nverts= mp->totloop;
+ nverts = mp->totloop;
- for (i=0; i<nverts; i++) {
- buf->tfindex= i;
- buf->f= a;
+ for (i = 0; i < nverts; i++) {
+ buf->tfindex = i;
+ buf->f = a;
buf->separate = 0;
- buf->next= vmap->vert[mloop[mp->loopstart + i].v];
- vmap->vert[mloop[mp->loopstart + i].v]= buf;
+ buf->next = vmap->vert[mloop[mp->loopstart + i].v];
+ vmap->vert[mloop[mp->loopstart + i].v] = buf;
buf++;
}
}
}
/* sort individual uvs for each vert */
- for (a=0; a<totvert; a++) {
- UvMapVert *newvlist= NULL, *vlist=vmap->vert[a];
+ for (a = 0; a < totvert; a++) {
+ UvMapVert *newvlist = NULL, *vlist = vmap->vert[a];
UvMapVert *iterv, *v, *lastv, *next;
float *uv, *uv2, uvdiff[2];
while (vlist) {
- v= vlist;
- vlist= vlist->next;
- v->next= newvlist;
- newvlist= v;
+ v = vlist;
+ vlist = vlist->next;
+ v->next = newvlist;
+ newvlist = v;
- uv= mloopuv[mpoly[v->f].loopstart + v->tfindex].uv;
- lastv= NULL;
- iterv= vlist;
+ uv = mloopuv[mpoly[v->f].loopstart + v->tfindex].uv;
+ lastv = NULL;
+ iterv = vlist;
while (iterv) {
- next= iterv->next;
+ next = iterv->next;
- uv2= mloopuv[mpoly[iterv->f].loopstart + iterv->tfindex].uv;
+ uv2 = mloopuv[mpoly[iterv->f].loopstart + iterv->tfindex].uv;
sub_v2_v2v2(uvdiff, uv2, uv);
- if (fabsf(uv[0]-uv2[0]) < limit[0] && fabsf(uv[1]-uv2[1]) < limit[1]) {
- if (lastv) lastv->next= next;
- else vlist= next;
- iterv->next= newvlist;
- newvlist= iterv;
+ if (fabsf(uv[0] - uv2[0]) < limit[0] && fabsf(uv[1] - uv2[1]) < limit[1]) {
+ if (lastv) lastv->next = next;
+ else vlist = next;
+ iterv->next = newvlist;
+ newvlist = iterv;
}
else
- lastv=iterv;
+ lastv = iterv;
- iterv= next;
+ iterv = next;
}
newvlist->separate = 1;
}
- vmap->vert[a]= newvlist;
+ vmap->vert[a] = newvlist;
}
return vmap;
}
-UvMapVert *get_uv_map_vert(UvVertMap *vmap, unsigned int v)
+UvMapVert *BKE_mesh_uv_vert_map_get_vert(UvVertMap *vmap, unsigned int v)
{
return vmap->vert[v];
}
-void free_uv_vert_map(UvVertMap *vmap)
+void BKE_mesh_uv_vert_map_free(UvVertMap *vmap)
{
if (vmap) {
if (vmap->vert) MEM_freeN(vmap->vert);
@@ -2287,22 +2300,22 @@ void create_vert_edge_map(ListBase **map, IndexNode **mem, const MEdge *medge, c
for (i = 0; i < totedge; ++i) {
for (j = 0; j < 2; ++j, ++node) {
node->index = i;
- BLI_addtail(&(*map)[((unsigned int*)(&medge[i].v1))[j]], node);
+ BLI_addtail(&(*map)[((unsigned int *)(&medge[i].v1))[j]], node);
}
}
}
-void mesh_loops_to_mface_corners(CustomData *fdata, CustomData *ldata,
- CustomData *pdata, int lindex[4], int findex,
- const int polyindex,
- const int mf_len, /* 3 or 4 */
+void BKE_mesh_loops_to_mface_corners(CustomData *fdata, CustomData *ldata,
+ CustomData *pdata, int lindex[4], int findex,
+ const int polyindex,
+ const int mf_len, /* 3 or 4 */
- /* cache values to avoid lookups every time */
- const int numTex, /* CustomData_number_of_layers(pdata, CD_MTEXPOLY) */
- const int numCol, /* CustomData_number_of_layers(ldata, CD_MLOOPCOL) */
- const int hasPCol, /* CustomData_has_layer(ldata, CD_PREVIEW_MLOOPCOL) */
- const int hasOrigSpace /* CustomData_has_layer(ldata, CD_ORIGSPACE_MLOOP) */
- )
+ /* cache values to avoid lookups every time */
+ const int numTex, /* CustomData_number_of_layers(pdata, CD_MTEXPOLY) */
+ const int numCol, /* CustomData_number_of_layers(ldata, CD_MLOOPCOL) */
+ const int hasPCol, /* CustomData_has_layer(ldata, CD_PREVIEW_MLOOPCOL) */
+ const int hasOrigSpace /* CustomData_has_layer(ldata, CD_ORIGSPACE_MLOOP) */
+ )
{
MTFace *texface;
MTexPoly *texpoly;
@@ -2311,22 +2324,22 @@ void mesh_loops_to_mface_corners(CustomData *fdata, CustomData *ldata,
MLoopUV *mloopuv;
int i, j;
- for (i=0; i < numTex; i++) {
+ for (i = 0; i < numTex; i++) {
texface = CustomData_get_n(fdata, CD_MTFACE, findex, i);
texpoly = CustomData_get_n(pdata, CD_MTEXPOLY, polyindex, i);
ME_MTEXFACE_CPY(texface, texpoly);
- for (j=0; j < mf_len; j++) {
+ for (j = 0; j < mf_len; j++) {
mloopuv = CustomData_get_n(ldata, CD_MLOOPUV, lindex[j], i);
copy_v2_v2(texface->uv[j], mloopuv->uv);
}
}
- for (i=0; i < numCol; i++) {
+ for (i = 0; i < numCol; i++) {
mcol = CustomData_get_n(fdata, CD_MCOL, findex, i);
- for (j=0; j < mf_len; j++) {
+ for (j = 0; j < mf_len; j++) {
mloopcol = CustomData_get_n(ldata, CD_MLOOPCOL, lindex[j], i);
MESH_MLOOPCOL_TO_MCOL(mloopcol, &mcol[j]);
}
@@ -2335,7 +2348,7 @@ void mesh_loops_to_mface_corners(CustomData *fdata, CustomData *ldata,
if (hasPCol) {
mcol = CustomData_get(fdata, findex, CD_PREVIEW_MCOL);
- for (j=0; j < mf_len; j++) {
+ for (j = 0; j < mf_len; j++) {
mloopcol = CustomData_get(ldata, lindex[j], CD_PREVIEW_MLOOPCOL);
MESH_MLOOPCOL_TO_MCOL(mloopcol, &mcol[j]);
}
@@ -2345,7 +2358,7 @@ void mesh_loops_to_mface_corners(CustomData *fdata, CustomData *ldata,
OrigSpaceFace *of = CustomData_get(fdata, findex, CD_ORIGSPACE);
OrigSpaceLoop *lof;
- for (j=0; j < mf_len; j++) {
+ for (j = 0; j < mf_len; j++) {
lof = CustomData_get(ldata, lindex[j], CD_ORIGSPACE_MLOOP);
copy_v2_v2(of->uv[j], lof->uv);
}
@@ -2356,13 +2369,13 @@ void mesh_loops_to_mface_corners(CustomData *fdata, CustomData *ldata,
* this function recreates a tessellation.
* returns number of tessellation faces.
*/
-int mesh_recalcTessellation(CustomData *fdata,
- CustomData *ldata, CustomData *pdata,
- MVert *mvert, int totface, int UNUSED(totloop),
- int totpoly,
- /* when tessellating to recalculate normals after
- * we can skip copying here */
- const int do_face_nor_cpy)
+int BKE_mesh_recalc_tessellation(CustomData *fdata,
+ CustomData *ldata, CustomData *pdata,
+ MVert *mvert, int totface, int UNUSED(totloop),
+ int totpoly,
+ /* when tessellating to recalculate normals after
+ * we can skip copying here */
+ const int do_face_nor_cpy)
{
/* use this to avoid locking pthread for _every_ polygon
* and calling the fill function */
@@ -2370,8 +2383,8 @@ int mesh_recalcTessellation(CustomData *fdata,
#define USE_TESSFACE_SPEEDUP
#define USE_TESSFACE_QUADS // NEEDS FURTHER TESTING
-#define TESSFACE_SCANFILL (1<<0)
-#define TESSFACE_IS_QUAD (1<<1)
+#define TESSFACE_SCANFILL (1 << 0)
+#define TESSFACE_IS_QUAD (1 << 1)
MPoly *mp, *mpoly;
MLoop *ml, *mloop;
@@ -2412,10 +2425,10 @@ int mesh_recalcTessellation(CustomData *fdata,
#ifdef USE_TESSFACE_SPEEDUP
#define ML_TO_MF(i1, i2, i3) \
- BLI_array_growone(mface_to_poly_map); \
- BLI_array_growone(mface); \
+ BLI_array_grow_one(mface_to_poly_map); \
+ BLI_array_grow_one(mface); \
mface_to_poly_map[mface_index] = poly_index; \
- mf= &mface[mface_index]; \
+ mf = &mface[mface_index]; \
/* set loop indices, transformed to vert indices later */ \
mf->v1 = mp->loopstart + i1; \
mf->v2 = mp->loopstart + i2; \
@@ -2431,10 +2444,10 @@ int mesh_recalcTessellation(CustomData *fdata,
/* ALMOST IDENTICAL TO DEFINE ABOVE (see EXCEPTION) */
#define ML_TO_MF_QUAD() \
- BLI_array_growone(mface_to_poly_map); \
- BLI_array_growone(mface); \
+ BLI_array_grow_one(mface_to_poly_map); \
+ BLI_array_grow_one(mface); \
mface_to_poly_map[mface_index] = poly_index; \
- mf= &mface[mface_index]; \
+ mf = &mface[mface_index]; \
/* set loop indices, transformed to vert indices later */ \
mf->v1 = mp->loopstart + 0; /* EXCEPTION */ \
mf->v2 = mp->loopstart + 1; /* EXCEPTION */ \
@@ -2471,34 +2484,34 @@ int mesh_recalcTessellation(CustomData *fdata,
ml = mloop + mp->loopstart;
- BLI_begin_edgefill(&sf_ctx);
+ BLI_scanfill_begin(&sf_ctx);
firstv = NULL;
lastv = NULL;
- for (j=0; j<mp->totloop; j++, ml++) {
- v = BLI_addfillvert(&sf_ctx, mvert[ml->v].co);
+ for (j = 0; j < mp->totloop; j++, ml++) {
+ v = BLI_scanfill_vert_add(&sf_ctx, mvert[ml->v].co);
v->keyindex = mp->loopstart + j;
if (lastv)
- BLI_addfilledge(&sf_ctx, lastv, v);
+ BLI_scanfill_edge_add(&sf_ctx, lastv, v);
if (!firstv)
firstv = v;
lastv = v;
}
- BLI_addfilledge(&sf_ctx, lastv, firstv);
+ BLI_scanfill_edge_add(&sf_ctx, lastv, firstv);
- totfilltri = BLI_edgefill(&sf_ctx, FALSE);
+ totfilltri = BLI_scanfill_calc(&sf_ctx, FALSE);
if (totfilltri) {
- BLI_array_growitems(mface_to_poly_map, totfilltri);
- BLI_array_growitems(mface, totfilltri);
+ BLI_array_grow_items(mface_to_poly_map, totfilltri);
+ BLI_array_grow_items(mface, totfilltri);
if (poly_orig_index) {
- BLI_array_growitems(mface_orig_index, totfilltri);
+ BLI_array_grow_items(mface_orig_index, totfilltri);
}
for (f = sf_ctx.fillfacebase.first; f; f = f->next, mf++) {
mface_to_poly_map[mface_index] = poly_index;
- mf= &mface[mface_index];
+ mf = &mface[mface_index];
/* set loop indices, transformed to vert indices later */
mf->v1 = f->v1->keyindex;
@@ -2521,7 +2534,7 @@ int mesh_recalcTessellation(CustomData *fdata,
}
}
- BLI_end_edgefill(&sf_ctx);
+ BLI_scanfill_end(&sf_ctx);
}
}
@@ -2566,7 +2579,7 @@ int mesh_recalcTessellation(CustomData *fdata,
}
mf = mface;
- for (mface_index=0; mface_index < totface; mface_index++, mf++) {
+ for (mface_index = 0; mface_index < totface; mface_index++, mf++) {
#ifdef USE_TESSFACE_QUADS
const int mf_len = mf->edcode & TESSFACE_IS_QUAD ? 4 : 3;
@@ -2608,14 +2621,14 @@ int mesh_recalcTessellation(CustomData *fdata,
if (mf_len == 4) mf->v4 = mloop[mf->v4].v;
#endif
- mesh_loops_to_mface_corners(fdata, ldata, pdata,
- lindex, mface_index, mface_to_poly_map[mface_index],
+ BKE_mesh_loops_to_mface_corners(fdata, ldata, pdata,
+ lindex, mface_index, mface_to_poly_map[mface_index],
#ifdef USE_TESSFACE_QUADS
- mf_len,
+ mf_len,
#else
- 3,
+ 3,
#endif
- numTex, numCol, hasPCol, hasOrigSpace);
+ numTex, numCol, hasPCol, hasOrigSpace);
#ifdef USE_TESSFACE_QUADS
@@ -2637,8 +2650,8 @@ int mesh_recalcTessellation(CustomData *fdata,
* this function recreates a tessellation.
* returns number of tessellation faces.
*/
-int mesh_mpoly_to_mface(struct CustomData *fdata, struct CustomData *ldata,
- struct CustomData *pdata, int totface, int UNUSED(totloop), int totpoly)
+int BKE_mesh_mpoly_to_mface(struct CustomData *fdata, struct CustomData *ldata,
+ struct CustomData *pdata, int totface, int UNUSED(totloop), int totpoly)
{
MLoop *mloop;
@@ -2660,9 +2673,9 @@ int mesh_mpoly_to_mface(struct CustomData *fdata, struct CustomData *ldata,
mp = mpoly;
k = 0;
- for (i = 0; i<totpoly; i++, mp++) {
+ for (i = 0; i < totpoly; i++, mp++) {
if (ELEM(mp->totloop, 3, 4)) {
- BLI_array_growone(mface);
+ BLI_array_grow_one(mface);
mf = &mface[k];
mf->mat_nr = mp->mat_nr;
@@ -2683,7 +2696,7 @@ int mesh_mpoly_to_mface(struct CustomData *fdata, struct CustomData *ldata,
CustomData_free(fdata, totface);
memset(fdata, 0, sizeof(CustomData));
- totface= k;
+ totface = k;
CustomData_add_layer(fdata, CD_MFACE, CD_ASSIGN, mface, totface);
@@ -2691,7 +2704,7 @@ int mesh_mpoly_to_mface(struct CustomData *fdata, struct CustomData *ldata,
mp = mpoly;
k = 0;
- for (i = 0; i<totpoly; i++, mp++) {
+ for (i = 0; i < totpoly; i++, mp++) {
if (ELEM(mp->totloop, 3, 4)) {
mf = &mface[k];
@@ -2709,9 +2722,9 @@ int mesh_mpoly_to_mface(struct CustomData *fdata, struct CustomData *ldata,
mf->v2 = mloop[mf->v2].v;
mf->v3 = mloop[mf->v3].v;
- mesh_loops_to_mface_corners(fdata, ldata, pdata,
- lindex, k, i, 3,
- numTex, numCol, hasPCol, hasOrigSpace);
+ BKE_mesh_loops_to_mface_corners(fdata, ldata, pdata,
+ lindex, k, i, 3,
+ numTex, numCol, hasPCol, hasOrigSpace);
test_index_face(mf, fdata, k, 3);
}
else {
@@ -2729,13 +2742,13 @@ int mesh_mpoly_to_mface(struct CustomData *fdata, struct CustomData *ldata,
mf->v3 = mloop[mf->v3].v;
mf->v4 = mloop[mf->v4].v;
- mesh_loops_to_mface_corners(fdata, ldata, pdata,
- lindex, k, i, 4,
- numTex, numCol, hasPCol, hasOrigSpace);
+ BKE_mesh_loops_to_mface_corners(fdata, ldata, pdata,
+ lindex, k, i, 4,
+ numTex, numCol, hasPCol, hasOrigSpace);
test_index_face(mf, fdata, k, 4);
}
- mf->edcode= 0;
+ mf->edcode = 0;
k++;
}
@@ -2756,64 +2769,20 @@ int mesh_mpoly_to_mface(struct CustomData *fdata, struct CustomData *ldata,
static void mesh_calc_ngon_normal(MPoly *mpoly, MLoop *loopstart,
MVert *mvert, float normal[3])
{
-
- MVert *v1, *v2, *v3;
- double u[3], v[3], w[3];
- double n[3] = {0.0, 0.0, 0.0}, l;
+ const int nverts = mpoly->totloop;
+ float const *v_prev = mvert[loopstart[nverts - 1].v].co;
+ float const *v_curr = mvert[loopstart->v].co;
+ float n[3] = {0.0f};
int i;
- for (i = 0; i < mpoly->totloop; i++) {
- v1 = mvert + loopstart[i].v;
- v2 = mvert + loopstart[(i+1)%mpoly->totloop].v;
- v3 = mvert + loopstart[(i+2)%mpoly->totloop].v;
-
- copy_v3db_v3fl(u, v1->co);
- copy_v3db_v3fl(v, v2->co);
- copy_v3db_v3fl(w, v3->co);
-
- /*this fixes some weird numerical error*/
- if (i==0) {
- u[0] += 0.0001f;
- u[1] += 0.0001f;
- u[2] += 0.0001f;
- }
-
- /* newell's method
- *
- * so thats?:
- * (a[1] - b[1]) * (a[2] + b[2]);
- * a[1]*b[2] - b[1]*a[2] - b[1]*b[2] + a[1]*a[2]
- *
- * odd. half of that is the cross product. . .what's the
- * other half?
- *
- * also could be like a[1]*(b[2] + a[2]) - b[1]*(a[2] - b[2])
- */
-
- n[0] += (u[1] - v[1]) * (u[2] + v[2]);
- n[1] += (u[2] - v[2]) * (u[0] + v[0]);
- n[2] += (u[0] - v[0]) * (u[1] + v[1]);
+ /* Newell's Method */
+ for (i = 0; i < nverts; v_prev = v_curr, v_curr = mvert[loopstart[++i].v].co) {
+ add_newell_cross_v3_v3v3(n, v_prev, v_curr);
}
-
- l = n[0]*n[0]+n[1]*n[1]+n[2]*n[2];
- l = sqrt(l);
- if (l == 0.0) {
- normal[0] = 0.0f;
- normal[1] = 0.0f;
- normal[2] = 1.0f;
-
- return;
+ if (UNLIKELY(normalize_v3_v3(normal, n) == 0.0f)) {
+ normal[2] = 1.0f; /* other axis set to 0.0 */
}
- else l = 1.0f / l;
-
- n[0] *= l;
- n[1] *= l;
- n[2] *= l;
-
- normal[0] = (float) n[0];
- normal[1] = (float) n[1];
- normal[2] = (float) n[2];
}
void mesh_calc_poly_normal(MPoly *mpoly, MLoop *loopstart,
@@ -2847,58 +2816,24 @@ void mesh_calc_poly_normal(MPoly *mpoly, MLoop *loopstart,
static void mesh_calc_ngon_normal_coords(MPoly *mpoly, MLoop *loopstart,
const float (*vertex_coords)[3], float normal[3])
{
-
- const float *v1, *v2, *v3;
- double u[3], v[3], w[3];
- double n[3] = {0.0, 0.0, 0.0}, l;
+ const int nverts = mpoly->totloop;
+ float const *v_prev = vertex_coords[loopstart[nverts - 1].v];
+ float const *v_curr = vertex_coords[loopstart->v];
+ float n[3] = {0.0f};
int i;
- for (i = 0; i < mpoly->totloop; i++) {
- v1 = (const float *)(vertex_coords + loopstart[i].v);
- v2 = (const float *)(vertex_coords + loopstart[(i+1)%mpoly->totloop].v);
- v3 = (const float *)(vertex_coords + loopstart[(i+2)%mpoly->totloop].v);
-
- copy_v3db_v3fl(u, v1);
- copy_v3db_v3fl(v, v2);
- copy_v3db_v3fl(w, v3);
-
- /*this fixes some weird numerical error*/
- if (i==0) {
- u[0] += 0.0001f;
- u[1] += 0.0001f;
- u[2] += 0.0001f;
- }
-
- n[0] += (u[1] - v[1]) * (u[2] + v[2]);
- n[1] += (u[2] - v[2]) * (u[0] + v[0]);
- n[2] += (u[0] - v[0]) * (u[1] + v[1]);
+ /* Newell's Method */
+ for (i = 0; i < nverts; v_prev = v_curr, v_curr = vertex_coords[loopstart[++i].v]) {
+ add_newell_cross_v3_v3v3(n, v_prev, v_curr);
}
- l = n[0]*n[0]+n[1]*n[1]+n[2]*n[2];
- l = sqrt(l);
-
- if (l == 0.0) {
- normal[0] = 0.0f;
- normal[1] = 0.0f;
- normal[2] = 1.0f;
-
- return;
+ if (UNLIKELY(normalize_v3_v3(normal, n) == 0.0f)) {
+ normal[2] = 1.0f; /* other axis set to 0.0 */
}
- else {
- l = 1.0f / l;
- }
-
- n[0] *= l;
- n[1] *= l;
- n[2] *= l;
-
- normal[0] = (float) n[0];
- normal[1] = (float) n[1];
- normal[2] = (float) n[2];
}
-void mesh_calc_poly_normal_coords(MPoly *mpoly, MLoop *loopstart,
- const float (*vertex_coords)[3], float no[3])
+void BKE_mesh_calc_poly_normal_coords(MPoly *mpoly, MLoop *loopstart,
+ const float (*vertex_coords)[3], float no[3])
{
if (mpoly->totloop > 4) {
mesh_calc_ngon_normal_coords(mpoly, loopstart, vertex_coords, no);
@@ -2928,7 +2863,7 @@ void mesh_calc_poly_normal_coords(MPoly *mpoly, MLoop *loopstart,
static void mesh_calc_ngon_center(MPoly *mpoly, MLoop *loopstart,
MVert *mvert, float cent[3])
{
- const float w= 1.0f / (float)mpoly->totloop;
+ const float w = 1.0f / (float)mpoly->totloop;
int i;
zero_v3(cent);
@@ -2938,8 +2873,8 @@ static void mesh_calc_ngon_center(MPoly *mpoly, MLoop *loopstart,
}
}
-void mesh_calc_poly_center(MPoly *mpoly, MLoop *loopstart,
- MVert *mvarray, float cent[3])
+void BKE_mesh_calc_poly_center(MPoly *mpoly, MLoop *loopstart,
+ MVert *mvarray, float cent[3])
{
if (mpoly->totloop == 3) {
cent_tri_v3(cent,
@@ -2962,8 +2897,8 @@ void mesh_calc_poly_center(MPoly *mpoly, MLoop *loopstart,
}
/* note, passing polynormal is only a speedup so we can skip calculating it */
-float mesh_calc_poly_area(MPoly *mpoly, MLoop *loopstart,
- MVert *mvarray, float polynormal[3])
+float BKE_mesh_calc_poly_area(MPoly *mpoly, MLoop *loopstart,
+ MVert *mvarray, float polynormal[3])
{
if (mpoly->totloop == 3) {
return area_tri_v3(mvarray[loopstart[0].v].co,
@@ -2982,7 +2917,7 @@ float mesh_calc_poly_area(MPoly *mpoly, MLoop *loopstart,
int i;
MLoop *l_iter = loopstart;
float area, polynorm_local[3], (*vertexcos)[3];
- float *no= polynormal ? polynormal : polynorm_local;
+ float *no = polynormal ? polynormal : polynorm_local;
BLI_array_fixedstack_declare(vertexcos, BM_NGON_STACK_SIZE, mpoly->totloop, __func__);
/* pack vertex cos into an array for area_poly_v3 */
@@ -3007,7 +2942,7 @@ float mesh_calc_poly_area(MPoly *mpoly, MLoop *loopstart,
/* Find the index of the loop in 'poly' which references vertex,
* returns -1 if not found */
int poly_find_loop_from_vert(const MPoly *poly, const MLoop *loopstart,
- unsigned vert)
+ unsigned vert)
{
int j;
for (j = 0; j < poly->totloop; j++, loopstart++) {
@@ -3022,11 +2957,11 @@ int poly_find_loop_from_vert(const MPoly *poly, const MLoop *loopstart,
* vertex. Returns the index of the loop matching vertex, or -1 if the
* vertex is not in 'poly' */
int poly_get_adj_loops_from_vert(unsigned adj_r[3], const MPoly *poly,
- const MLoop *mloop, unsigned vert)
+ const MLoop *mloop, unsigned vert)
{
int corner = poly_find_loop_from_vert(poly,
- &mloop[poly->loopstart],
- vert);
+ &mloop[poly->loopstart],
+ vert);
if (corner != -1) {
const MLoop *ml = &mloop[poly->loopstart + corner];
@@ -3042,20 +2977,23 @@ int poly_get_adj_loops_from_vert(unsigned adj_r[3], const MPoly *poly,
/* update the hide flag for edges and faces from the corresponding
* flag in verts */
-void mesh_flush_hidden_from_verts(const MVert *mvert,
- const MLoop *mloop,
- MEdge *medge, int totedge,
- MPoly *mpoly, int totpoly)
+void BKE_mesh_flush_hidden_from_verts(const MVert *mvert,
+ const MLoop *mloop,
+ MEdge *medge, int totedge,
+ MPoly *mpoly, int totpoly)
{
int i, j;
for (i = 0; i < totedge; i++) {
MEdge *e = &medge[i];
if (mvert[e->v1].flag & ME_HIDE ||
- mvert[e->v2].flag & ME_HIDE)
+ mvert[e->v2].flag & ME_HIDE)
+ {
e->flag |= ME_HIDE;
- else
+ }
+ else {
e->flag &= ~ME_HIDE;
+ }
}
for (i = 0; i < totpoly; i++) {
MPoly *p = &mpoly[i];
@@ -3068,38 +3006,38 @@ void mesh_flush_hidden_from_verts(const MVert *mvert,
}
/* basic vertex data functions */
-int minmax_mesh(Mesh *me, float min[3], float max[3])
+int BKE_mesh_minmax(Mesh *me, float r_min[3], float r_max[3])
{
- int i= me->totvert;
+ int i = me->totvert;
MVert *mvert;
- for (mvert= me->mvert; i--; mvert++) {
- DO_MINMAX(mvert->co, min, max);
+ for (mvert = me->mvert; i--; mvert++) {
+ DO_MINMAX(mvert->co, r_min, r_max);
}
return (me->totvert != 0);
}
-int mesh_center_median(Mesh *me, float cent[3])
+int BKE_mesh_center_median(Mesh *me, float cent[3])
{
- int i= me->totvert;
+ int i = me->totvert;
MVert *mvert;
zero_v3(cent);
- for (mvert= me->mvert; i--; mvert++) {
+ for (mvert = me->mvert; i--; mvert++) {
add_v3_v3(cent, mvert->co);
}
/* otherwise we get NAN for 0 verts */
if (me->totvert) {
- mul_v3_fl(cent, 1.0f/(float)me->totvert);
+ mul_v3_fl(cent, 1.0f / (float)me->totvert);
}
return (me->totvert != 0);
}
-int mesh_center_bounds(Mesh *me, float cent[3])
+int BKE_mesh_center_bounds(Mesh *me, float cent[3])
{
float min[3], max[3];
INIT_MINMAX(min, max);
- if (minmax_mesh(me, min, max)) {
+ if (BKE_mesh_minmax(me, min, max)) {
mid_v3_v3v3(cent, min, max);
return 1;
}
@@ -3107,19 +3045,19 @@ int mesh_center_bounds(Mesh *me, float cent[3])
return 0;
}
-void mesh_translate(Mesh *me, float offset[3], int do_keys)
+void BKE_mesh_translate(Mesh *me, float offset[3], int do_keys)
{
- int i= me->totvert;
+ int i = me->totvert;
MVert *mvert;
- for (mvert= me->mvert; i--; mvert++) {
+ for (mvert = me->mvert; i--; mvert++) {
add_v3_v3(mvert->co, offset);
}
if (do_keys && me->key) {
KeyBlock *kb;
- for (kb=me->key->block.first; kb; kb=kb->next) {
- float *fp= kb->data;
- for (i= kb->totelem; i--; fp+=3) {
+ for (kb = me->key->block.first; kb; kb = kb->next) {
+ float *fp = kb->data;
+ for (i = kb->totelem; i--; fp += 3) {
add_v3_v3(fp, offset);
}
}
@@ -3134,9 +3072,9 @@ void BKE_mesh_ensure_navmesh(Mesh *me)
int numFaces = me->totpoly;
int *recastData;
CustomData_add_layer_named(&me->pdata, CD_RECAST, CD_CALLOC, NULL, numFaces, "recastData");
- recastData = (int*)CustomData_get_layer(&me->pdata, CD_RECAST);
- for (i=0; i<numFaces; i++) {
- recastData[i] = i+1;
+ recastData = (int *)CustomData_get_layer(&me->pdata, CD_RECAST);
+ for (i = 0; i < numFaces; i++) {
+ recastData[i] = i + 1;
}
CustomData_add_layer_named(&me->pdata, CD_RECAST, CD_REFERENCE, recastData, numFaces, "recastData");
}
@@ -3144,11 +3082,11 @@ void BKE_mesh_ensure_navmesh(Mesh *me)
void BKE_mesh_tessface_calc(Mesh *mesh)
{
- mesh->totface = mesh_recalcTessellation(&mesh->fdata, &mesh->ldata, &mesh->pdata,
- mesh->mvert,
- mesh->totface, mesh->totloop, mesh->totpoly,
- /* calc normals right after, don't copy from polys here */
- FALSE);
+ mesh->totface = BKE_mesh_recalc_tessellation(&mesh->fdata, &mesh->ldata, &mesh->pdata,
+ mesh->mvert,
+ mesh->totface, mesh->totloop, mesh->totpoly,
+ /* calc normals right after, don't copy from polys here */
+ FALSE);
mesh_update_customdata_pointers(mesh, TRUE);
}
@@ -3164,3 +3102,51 @@ void BKE_mesh_tessface_clear(Mesh *mesh)
{
mesh_tessface_clear_intern(mesh, TRUE);
}
+
+#if 0 /* slow version of the function below */
+void BKE_mesh_poly_calc_angles(MVert *mvert, MLoop *mloop,
+ MPoly *mp, float angles[])
+{
+ MLoop *ml;
+
+ int j;
+ for (j = 0, ml = mloop + mp->loopstart; j < mp->totloop; j++, ml++) {
+ MLoop *ml_prev = ME_POLY_LOOP_PREV(mloop, mp, j);
+ MLoop *ml_next = ME_POLY_LOOP_NEXT(mloop, mp, j);
+
+ float e1[3], e2[3];
+
+ sub_v3_v3v3(e1, mvert[ml_next->v].co, mvert[ml->v].co);
+ sub_v3_v3v3(e2, mvert[ml_prev->v].co, mvert[ml->v].co);
+
+ angles[j] = (float)M_PI - angle_v3v3(e1, e2);
+ }
+}
+
+#else /* equivalent the function above but avoid multiple subtractions + normalize */
+
+void BKE_mesh_poly_calc_angles(MVert *mvert, MLoop *mloop,
+ MPoly *mp, float angles[])
+{
+ MLoop *ml = mloop + mp->loopstart;
+ float nor_prev[3];
+ float nor_next[3];
+
+ int i_this = mp->totloop - 1;
+ int i_next = 0;
+
+ sub_v3_v3v3(nor_prev, mvert[ml[i_this - 1].v].co, mvert[ml[i_this].v].co);
+ normalize_v3(nor_prev);
+
+ while (i_next < mp->totloop) {
+ sub_v3_v3v3(nor_next, mvert[ml[i_this].v].co, mvert[ml[i_next].v].co);
+ normalize_v3(nor_next);
+ angles[i_this] = angle_normalized_v3v3(nor_prev, nor_next);
+
+ /* step */
+ copy_v3_v3(nor_prev, nor_next);
+ i_this = i_next;
+ i_next++;
+ }
+}
+#endif
diff --git a/source/blender/blenkernel/intern/mesh_validate.c b/source/blender/blenkernel/intern/mesh_validate.c
index aebbcd4208d..1645a8c9c9b 100644
--- a/source/blender/blenkernel/intern/mesh_validate.c
+++ b/source/blender/blenkernel/intern/mesh_validate.c
@@ -240,9 +240,23 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
PRINT(" loop %u has invalid vert reference (%u)\n", sp->loopstart + j, ml->v);
sp->invalid = TRUE;
}
+
+ mverts[ml->v].flag |= ME_VERT_TMP_TAG;
*v = ml->v;
}
+ /* is the same vertex used more then once */
+ if (!sp->invalid) {
+ v = sp->verts;
+ for (j = 0; j < mp->totloop; j++, v++) {
+ if ((mverts[*v].flag & ME_VERT_TMP_TAG) == 0) {
+ PRINT(" poly %u has duplicate vert reference at corner (%u)\n", i, j);
+ sp->invalid = TRUE;
+ }
+ mverts[*v].flag &= ~ME_VERT_TMP_TAG;
+ }
+ }
+
if (sp->invalid)
continue;
@@ -522,11 +536,11 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
if (mesh) {
if (do_polyloop_free) {
- mesh_strip_loose_polysloops(mesh);
+ BKE_mesh_strip_loose_polysloops(mesh);
}
if (do_edge_free) {
- mesh_strip_loose_edges(mesh);
+ BKE_mesh_strip_loose_edges(mesh);
}
if (do_edge_recalc) {
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c
index 12aa6232cb0..2159837c9a0 100644
--- a/source/blender/blenkernel/intern/modifier.c
+++ b/source/blender/blenkernel/intern/modifier.c
@@ -68,12 +68,12 @@
ModifierTypeInfo *modifierType_getInfo(ModifierType type)
{
- static ModifierTypeInfo *types[NUM_MODIFIER_TYPES]= {NULL};
+ static ModifierTypeInfo *types[NUM_MODIFIER_TYPES] = {NULL};
static int types_init = 1;
if (types_init) {
modifier_type_init(types); /* MOD_utils.c */
- types_init= 0;
+ types_init = 0;
}
/* type unsigned, no need to check < 0 */
@@ -96,8 +96,7 @@ ModifierData *modifier_new(int type)
BLI_strncpy(md->name, mti->name, sizeof(md->name));
md->type = type;
- md->mode = eModifierMode_Realtime
- | eModifierMode_Render | eModifierMode_Expanded;
+ md->mode = eModifierMode_Realtime | eModifierMode_Render | eModifierMode_Expanded;
if (mti->flags & eModifierTypeFlag_EnableInEditmode)
md->mode |= eModifierMode_Editmode;
@@ -137,8 +136,8 @@ int modifier_supportsMapping(ModifierData *md)
{
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
- return (mti->type==eModifierTypeType_OnlyDeform ||
- (mti->flags & eModifierTypeFlag_SupportsMapping));
+ return (mti->type == eModifierTypeType_OnlyDeform ||
+ (mti->flags & eModifierTypeFlag_SupportsMapping));
}
int modifier_isPreview(ModifierData *md)
@@ -158,8 +157,8 @@ ModifierData *modifiers_findByType(Object *ob, ModifierType type)
{
ModifierData *md = ob->modifiers.first;
- for (; md; md=md->next)
- if (md->type==type)
+ for (; md; md = md->next)
+ if (md->type == type)
break;
return md;
@@ -175,7 +174,7 @@ void modifiers_clearErrors(Object *ob)
ModifierData *md = ob->modifiers.first;
/* int qRedraw = 0; */
- for (; md; md=md->next) {
+ for (; md; md = md->next) {
if (md->error) {
MEM_freeN(md->error);
md->error = NULL;
@@ -186,11 +185,11 @@ void modifiers_clearErrors(Object *ob)
}
void modifiers_foreachObjectLink(Object *ob, ObjectWalkFunc walk,
- void *userData)
+ void *userData)
{
ModifierData *md = ob->modifiers.first;
- for (; md; md=md->next) {
+ for (; md; md = md->next) {
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
if (mti->foreachObjectLink)
@@ -202,7 +201,7 @@ void modifiers_foreachIDLink(Object *ob, IDWalkFunc walk, void *userData)
{
ModifierData *md = ob->modifiers.first;
- for (; md; md=md->next) {
+ for (; md; md = md->next) {
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
if (mti->foreachIDLink) mti->foreachIDLink(md, ob, walk, userData);
@@ -218,7 +217,7 @@ void modifiers_foreachTexLink(Object *ob, TexWalkFunc walk, void *userData)
{
ModifierData *md = ob->modifiers.first;
- for (; md; md=md->next) {
+ for (; md; md = md->next) {
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
if (mti->foreachTexLink)
@@ -240,12 +239,12 @@ int modifier_couldBeCage(struct Scene *scene, ModifierData *md)
{
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
- md->scene= scene;
+ md->scene = scene;
- return ( (md->mode & eModifierMode_Realtime) &&
- (md->mode & eModifierMode_Editmode) &&
- (!mti->isDisabled || !mti->isDisabled(md, 0)) &&
- modifier_supportsMapping(md));
+ return ((md->mode & eModifierMode_Realtime) &&
+ (md->mode & eModifierMode_Editmode) &&
+ (!mti->isDisabled || !mti->isDisabled(md, 0)) &&
+ modifier_supportsMapping(md));
}
int modifier_sameTopology(ModifierData *md)
@@ -269,7 +268,7 @@ void modifier_setError(ModifierData *md, const char *format, ...)
va_start(ap, format);
vsnprintf(buffer, sizeof(buffer), format, ap);
va_end(ap);
- buffer[sizeof(buffer) - 1]= '\0';
+ buffer[sizeof(buffer) - 1] = '\0';
if (md->error)
MEM_freeN(md->error);
@@ -287,19 +286,19 @@ void modifier_setError(ModifierData *md, const char *format, ...)
*/
int modifiers_getCageIndex(struct Scene *scene, Object *ob, int *lastPossibleCageIndex_r, int virtual_)
{
- ModifierData *md = (virtual_)? modifiers_getVirtualModifierList(ob): ob->modifiers.first;
+ ModifierData *md = (virtual_) ? modifiers_getVirtualModifierList(ob) : ob->modifiers.first;
int i, cageIndex = -1;
if (lastPossibleCageIndex_r) {
/* ensure the value is initialized */
- *lastPossibleCageIndex_r= -1;
+ *lastPossibleCageIndex_r = -1;
}
/* Find the last modifier acting on the cage. */
- for (i=0; md; i++,md=md->next) {
+ for (i = 0; md; i++, md = md->next) {
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
- md->scene= scene;
+ md->scene = scene;
if (!(md->mode & eModifierMode_Realtime)) continue;
if (!(md->mode & eModifierMode_Editmode)) continue;
@@ -344,7 +343,7 @@ int modifier_isEnabled(struct Scene *scene, ModifierData *md, int required_mode)
{
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
- md->scene= scene;
+ md->scene = scene;
if ((md->mode & required_mode) != required_mode) return 0;
if (mti->isDisabled && mti->isDisabled(md, required_mode == eModifierMode_Render)) return 0;
@@ -396,7 +395,7 @@ CDMaskLink *modifiers_calcDataMasks(struct Scene *scene, Object *ob, ModifierDat
}
/* reverse the list so it's in the correct order */
- BLI_linklist_reverse((LinkNode**)&dataMasks);
+ BLI_linklist_reverse((LinkNode **)&dataMasks);
return dataMasks;
}
@@ -416,6 +415,7 @@ ModifierData *modifiers_getLastPreview(struct Scene *scene, ModifierData *md, in
return tmp_md;
}
+/* NOTE: these aren't used anymore */
ModifierData *modifiers_getVirtualModifierList(Object *ob)
{
/* Kinda hacky, but should be fine since we are never
@@ -430,19 +430,19 @@ ModifierData *modifiers_getVirtualModifierList(Object *ob)
if (init) {
md = modifier_new(eModifierType_Armature);
- amd = *((ArmatureModifierData*) md);
+ amd = *((ArmatureModifierData *) md);
modifier_free(md);
md = modifier_new(eModifierType_Curve);
- cmd = *((CurveModifierData*) md);
+ cmd = *((CurveModifierData *) md);
modifier_free(md);
md = modifier_new(eModifierType_Lattice);
- lmd = *((LatticeModifierData*) md);
+ lmd = *((LatticeModifierData *) md);
modifier_free(md);
md = modifier_new(eModifierType_ShapeKey);
- smd = *((ShapeKeyModifierData*) md);
+ smd = *((ShapeKeyModifierData *) md);
modifier_free(md);
amd.modifier.mode |= eModifierMode_Virtual;
@@ -456,19 +456,19 @@ ModifierData *modifiers_getVirtualModifierList(Object *ob)
md = ob->modifiers.first;
if (ob->parent) {
- if (ob->parent->type==OB_ARMATURE && ob->partype==PARSKEL) {
+ if (ob->parent->type == OB_ARMATURE && ob->partype == PARSKEL) {
amd.object = ob->parent;
amd.modifier.next = md;
- amd.deformflag= ((bArmature *)(ob->parent->data))->deformflag;
+ amd.deformflag = ((bArmature *)(ob->parent->data))->deformflag;
md = &amd.modifier;
}
- else if (ob->parent->type==OB_CURVE && ob->partype==PARSKEL) {
+ else if (ob->parent->type == OB_CURVE && ob->partype == PARSKEL) {
cmd.object = ob->parent;
cmd.defaxis = ob->trackflag + 1;
cmd.modifier.next = md;
md = &cmd.modifier;
}
- else if (ob->parent->type==OB_LATTICE && ob->partype==PARSKEL) {
+ else if (ob->parent->type == OB_LATTICE && ob->partype == PARSKEL) {
lmd.object = ob->parent;
lmd.modifier.next = md;
md = &lmd.modifier;
@@ -478,9 +478,9 @@ ModifierData *modifiers_getVirtualModifierList(Object *ob)
/* shape key modifier, not yet for curves */
if (ELEM(ob->type, OB_MESH, OB_LATTICE) && ob_get_key(ob)) {
if (ob->type == OB_MESH && (ob->shapeflag & OB_SHAPE_EDIT_MODE))
- smd.modifier.mode |= eModifierMode_Editmode|eModifierMode_OnCage;
+ smd.modifier.mode |= eModifierMode_Editmode | eModifierMode_OnCage;
else
- smd.modifier.mode &= ~eModifierMode_Editmode|eModifierMode_OnCage;
+ smd.modifier.mode &= ~eModifierMode_Editmode | eModifierMode_OnCage;
smd.modifier.next = md;
md = &smd.modifier;
@@ -495,12 +495,12 @@ ModifierData *modifiers_getVirtualModifierList(Object *ob)
Object *modifiers_isDeformedByArmature(Object *ob)
{
ModifierData *md = modifiers_getVirtualModifierList(ob);
- ArmatureModifierData *amd= NULL;
+ ArmatureModifierData *amd = NULL;
/* return the first selected armature, this lets us use multiple armatures */
- for (; md; md=md->next) {
- if (md->type==eModifierType_Armature) {
- amd = (ArmatureModifierData*) md;
+ for (; md; md = md->next) {
+ if (md->type == eModifierType_Armature) {
+ amd = (ArmatureModifierData *) md;
if (amd->object && (amd->object->flag & SELECT))
return amd->object;
}
@@ -519,12 +519,12 @@ Object *modifiers_isDeformedByArmature(Object *ob)
Object *modifiers_isDeformedByLattice(Object *ob)
{
ModifierData *md = modifiers_getVirtualModifierList(ob);
- LatticeModifierData *lmd= NULL;
+ LatticeModifierData *lmd = NULL;
/* return the first selected lattice, this lets us use multiple lattices */
- for (; md; md=md->next) {
- if (md->type==eModifierType_Lattice) {
- lmd = (LatticeModifierData*) md;
+ for (; md; md = md->next) {
+ if (md->type == eModifierType_Lattice) {
+ lmd = (LatticeModifierData *) md;
if (lmd->object && (lmd->object->flag & SELECT))
return lmd->object;
}
@@ -542,10 +542,10 @@ int modifiers_usesArmature(Object *ob, bArmature *arm)
{
ModifierData *md = modifiers_getVirtualModifierList(ob);
- for (; md; md=md->next) {
- if (md->type==eModifierType_Armature) {
- ArmatureModifierData *amd = (ArmatureModifierData*) md;
- if (amd->object && amd->object->data==arm)
+ for (; md; md = md->next) {
+ if (md->type == eModifierType_Armature) {
+ ArmatureModifierData *amd = (ArmatureModifierData *) md;
+ if (amd->object && amd->object->data == arm)
return 1;
}
}
@@ -555,9 +555,9 @@ int modifiers_usesArmature(Object *ob, bArmature *arm)
int modifier_isCorrectableDeformed(ModifierData *md)
{
- if (md->type==eModifierType_Armature)
+ if (md->type == eModifierType_Armature)
return 1;
- if (md->type==eModifierType_ShapeKey)
+ if (md->type == eModifierType_ShapeKey)
return 1;
return 0;
@@ -567,11 +567,11 @@ int modifiers_isCorrectableDeformed(Object *ob)
{
ModifierData *md = modifiers_getVirtualModifierList(ob);
- for (; md; md=md->next) {
- if (ob->mode==OB_MODE_EDIT && (md->mode & eModifierMode_Editmode)==0);
+ for (; md; md = md->next) {
+ if (ob->mode == OB_MODE_EDIT && (md->mode & eModifierMode_Editmode) == 0) ;
else
- if (modifier_isCorrectableDeformed(md))
- return 1;
+ if (modifier_isCorrectableDeformed(md))
+ return 1;
}
return 0;
}
@@ -592,22 +592,22 @@ int modifiers_isPreview(Object *ob)
int modifiers_indexInObject(Object *ob, ModifierData *md_seek)
{
- int i= 0;
+ int i = 0;
ModifierData *md;
- for (md=ob->modifiers.first; (md && md_seek!=md); md=md->next, i++);
- if (!md) return -1; /* modifier isn't in the object */
+ for (md = ob->modifiers.first; (md && md_seek != md); md = md->next, i++) ;
+ if (!md) return -1; /* modifier isn't in the object */
return i;
}
void modifier_freeTemporaryData(ModifierData *md)
{
if (md->type == eModifierType_Armature) {
- ArmatureModifierData *amd= (ArmatureModifierData*)md;
+ ArmatureModifierData *amd = (ArmatureModifierData *)md;
if (amd->prevCos) {
MEM_freeN(amd->prevCos);
- amd->prevCos= NULL;
+ amd->prevCos = NULL;
}
}
}
@@ -624,7 +624,7 @@ void test_object_modifiers(Object *ob)
for (md = ob->modifiers.first; md; md = md->next) {
if (md->type == eModifierType_Multires) {
- MultiresModifierData *mmd = (MultiresModifierData*)md;
+ MultiresModifierData *mmd = (MultiresModifierData *)md;
multiresModifier_set_levels_from_disps(mmd, ob);
}
diff --git a/source/blender/blenkernel/intern/modifiers_bmesh.c b/source/blender/blenkernel/intern/modifiers_bmesh.c
index 573b8a725b3..99bb3468320 100644
--- a/source/blender/blenkernel/intern/modifiers_bmesh.c
+++ b/source/blender/blenkernel/intern/modifiers_bmesh.c
@@ -117,8 +117,8 @@ void DM_to_bmesh_ex(DerivedMesh *dm, BMesh *bm)
BLI_array_empty(verts);
BLI_array_empty(edges);
- BLI_array_growitems(verts, mp->totloop);
- BLI_array_growitems(edges, mp->totloop);
+ BLI_array_grow_items(verts, mp->totloop);
+ BLI_array_grow_items(edges, mp->totloop);
ml = mloop + mp->loopstart;
for (j = 0; j < mp->totloop; j++, ml++) {
diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c
index 9a640bcb8eb..f07de7f0127 100644
--- a/source/blender/blenkernel/intern/movieclip.c
+++ b/source/blender/blenkernel/intern/movieclip.c
@@ -71,7 +71,7 @@
#include "BKE_main.h"
#include "BKE_utildefines.h"
#include "BKE_movieclip.h"
-#include "BKE_image.h" /* openanim */
+#include "BKE_image.h" /* openanim */
#include "BKE_tracking.h"
#include "IMB_imbuf_types.h"
@@ -155,7 +155,7 @@ static void get_sequence_fname(MovieClip *clip, int framenr, char *name)
/* movieclips always points to first image from sequence,
* autoguess offset for now. could be something smarter in the future */
- offset= sequence_guess_offset(clip->name, strlen(head), numlen);
+ offset = sequence_guess_offset(clip->name, strlen(head), numlen);
if (numlen)
BLI_stringenc(name, head, tail, numlen, offset + framenr - 1);
@@ -195,7 +195,7 @@ static ImBuf *movieclip_load_sequence_file(MovieClip *clip, MovieClipUser *user,
{
struct ImBuf *ibuf;
char name[FILE_MAX];
- int loadflag, use_proxy= 0;
+ int loadflag, use_proxy = 0;
use_proxy = (flag & MCLIP_USE_PROXY) && user->render_size != MCLIP_PROXY_RENDER_SIZE_FULL;
if (use_proxy) {
@@ -205,7 +205,7 @@ static ImBuf *movieclip_load_sequence_file(MovieClip *clip, MovieClipUser *user,
else
get_sequence_fname(clip, framenr, name);
- loadflag = IB_rect|IB_multilayer;
+ loadflag = IB_rect | IB_multilayer;
/* read ibuf */
ibuf = IMB_loadiffname(name, loadflag);
@@ -250,7 +250,7 @@ static ImBuf *movieclip_load_movie_file(MovieClip *clip, MovieClipUser *user, in
dur = IMB_anim_get_duration(clip->anim, tc);
fra = framenr - 1;
- if (fra<0)
+ if (fra < 0)
fra = 0;
if (fra > (dur - 1))
@@ -283,7 +283,7 @@ static void movieclip_calc_length(MovieClip *clip)
clip->len = framenr + 1;
}
else {
- for (;;) {
+ for (;; ) {
get_sequence_fname(clip, framenr, name);
if (!BLI_exists(name)) {
@@ -338,7 +338,7 @@ typedef struct MovieClipImBufCacheKey {
static void moviecache_keydata(void *userkey, int *framenr, int *proxy, int *render_flags)
{
- MovieClipImBufCacheKey *key = (MovieClipImBufCacheKey*)userkey;
+ MovieClipImBufCacheKey *key = (MovieClipImBufCacheKey *)userkey;
*framenr = key->framenr;
*proxy = key->proxy;
@@ -347,7 +347,7 @@ static void moviecache_keydata(void *userkey, int *framenr, int *proxy, int *ren
static unsigned int moviecache_hashhash(const void *keyv)
{
- MovieClipImBufCacheKey *key = (MovieClipImBufCacheKey*)keyv;
+ MovieClipImBufCacheKey *key = (MovieClipImBufCacheKey *)keyv;
int rval = key->framenr;
return rval;
@@ -355,8 +355,8 @@ static unsigned int moviecache_hashhash(const void *keyv)
static int moviecache_hashcmp(const void *av, const void *bv)
{
- const MovieClipImBufCacheKey *a = (MovieClipImBufCacheKey*)av;
- const MovieClipImBufCacheKey *b = (MovieClipImBufCacheKey*)bv;
+ const MovieClipImBufCacheKey *a = (MovieClipImBufCacheKey *)av;
+ const MovieClipImBufCacheKey *b = (MovieClipImBufCacheKey *)bv;
if (a->framenr < b->framenr)
return -1;
@@ -406,7 +406,7 @@ static void put_imbuf_cache(MovieClip *clip, MovieClipUser *user, ImBuf *ibuf, i
clip->cache = MEM_callocN(sizeof(MovieClipCache), "movieClipCache");
clip->cache->moviecache = IMB_moviecache_create(sizeof(MovieClipImBufCacheKey), moviecache_hashhash,
- moviecache_hashcmp, moviecache_keydata);
+ moviecache_hashcmp, moviecache_keydata);
}
key.framenr = user->framenr;
@@ -430,9 +430,9 @@ static MovieClip *movieclip_alloc(const char *name)
{
MovieClip *clip;
- clip = alloc_libblock(&G.main->movieclip, ID_MC, name);
+ clip = BKE_libblock_alloc(&G.main->movieclip, ID_MC, name);
- clip->aspx = clip->aspy= 1.0f;
+ clip->aspx = clip->aspy = 1.0f;
BKE_tracking_init_settings(&clip->tracking);
@@ -450,10 +450,10 @@ static MovieClip *movieclip_alloc(const char *name)
* otherwise creates new.
* does not load ibuf itself
* pass on optional frame for #name images */
-MovieClip *BKE_add_movieclip_file(const char *name)
+MovieClip *BKE_movieclip_file_add(const char *name)
{
MovieClip *clip;
- MovieClipUser user;
+ MovieClipUser user = {0};
int file, len, width, height;
const char *libname;
char str[FILE_MAX], strtest[FILE_MAX];
@@ -462,7 +462,7 @@ MovieClip *BKE_add_movieclip_file(const char *name)
BLI_path_abs(str, G.main->name);
/* exists? */
- file = BLI_open(str, O_BINARY|O_RDONLY,0);
+ file = BLI_open(str, O_BINARY | O_RDONLY, 0);
if (file == -1)
return NULL;
close(file);
@@ -517,7 +517,7 @@ static void real_ibuf_size(MovieClip *clip, MovieClipUser *user, ImBuf *ibuf, in
*height = ibuf->y;
if (clip->flag & MCLIP_USE_PROXY) {
- switch(user->render_size) {
+ switch (user->render_size) {
case MCLIP_PROXY_RENDER_SIZE_25:
(*width) *= 4;
(*height) *= 4;
@@ -529,8 +529,8 @@ static void real_ibuf_size(MovieClip *clip, MovieClipUser *user, ImBuf *ibuf, in
break;
case MCLIP_PROXY_RENDER_SIZE_75:
- *width = ((float)*width)*4.0f/3.0f;
- *height = ((float)*height)*4.0f/3.0f;
+ *width = ((float)*width) * 4.0f / 3.0f;
+ *height = ((float)*height) * 4.0f / 3.0f;
break;
}
}
@@ -635,7 +635,8 @@ static ImBuf *get_postprocessed_cached_frame(MovieClip *clip, MovieClipUser *use
return cache->postprocessed.ibuf;
}
-static ImBuf *put_postprocessed_frame_to_cache(MovieClip *clip, MovieClipUser *user, ImBuf *ibuf, int flag, int postprocess_flag)
+static ImBuf *put_postprocessed_frame_to_cache(MovieClip *clip, MovieClipUser *user, ImBuf *ibuf,
+ int flag, int postprocess_flag)
{
MovieClipCache *cache = clip->cache;
MovieTrackingCamera *camera = &clip->tracking.camera;
@@ -660,7 +661,7 @@ static ImBuf *put_postprocessed_frame_to_cache(MovieClip *clip, MovieClipUser *u
copy_v2_v2(cache->postprocessed.principal, camera->principal);
copy_v3_v3(&cache->postprocessed.k1, &camera->k1);
cache->postprocessed.undistoriton_used = TRUE;
- postproc_ibuf= get_undistorted_ibuf(clip, NULL, ibuf);
+ postproc_ibuf = get_undistorted_ibuf(clip, NULL, ibuf);
}
else {
cache->postprocessed.undistoriton_used = FALSE;
@@ -669,8 +670,8 @@ static ImBuf *put_postprocessed_frame_to_cache(MovieClip *clip, MovieClipUser *u
if (postprocess_flag) {
int disable_red = postprocess_flag & MOVIECLIP_DISABLE_RED,
disable_green = postprocess_flag & MOVIECLIP_DISABLE_GREEN,
- disable_blue = postprocess_flag & MOVIECLIP_DISABLE_BLUE,
- grayscale = postprocess_flag & MOVIECLIP_PREVIEW_GRAYSCALE;
+ disable_blue = postprocess_flag & MOVIECLIP_DISABLE_BLUE,
+ grayscale = postprocess_flag & MOVIECLIP_PREVIEW_GRAYSCALE;
if (!postproc_ibuf)
postproc_ibuf = IMB_dupImBuf(ibuf);
@@ -704,14 +705,14 @@ static ImBuf *movieclip_get_postprocessed_ibuf(MovieClip *clip, MovieClipUser *u
/* try to obtain cached postprocessed frame first */
if (need_postprocessed_frame(user, flag, postprocess_flag)) {
- ibuf= get_postprocessed_cached_frame(clip, user, flag, postprocess_flag);
+ ibuf = get_postprocessed_cached_frame(clip, user, flag, postprocess_flag);
if (!ibuf)
need_postprocess = TRUE;
}
if (!ibuf)
- ibuf= get_imbuf_cache(clip, user, flag);
+ ibuf = get_imbuf_cache(clip, user, flag);
if (!ibuf) {
int use_sequence = FALSE;
@@ -801,8 +802,8 @@ static ImBuf *get_stable_cached_frame(MovieClip *clip, MovieClipUser *user, int
/* check for stabilization parameters */
if (tscale != cache->stabilized.scale ||
- tangle != cache->stabilized.angle ||
- !equals_v2v2(tloc, cache->stabilized.loc))
+ tangle != cache->stabilized.angle ||
+ !equals_v2v2(tloc, cache->stabilized.loc))
{
return NULL;
}
@@ -825,7 +826,7 @@ static ImBuf *put_stabilized_frame_to_cache(MovieClip *clip, MovieClipUser *user
stableibuf = BKE_tracking_stabilize(&clip->tracking, framenr, ibuf, tloc, &tscale, &tangle);
- cache->stabilized.ibuf= stableibuf;
+ cache->stabilized.ibuf = stableibuf;
copy_v2_v2(cache->stabilized.loc, tloc);
@@ -851,7 +852,8 @@ static ImBuf *put_stabilized_frame_to_cache(MovieClip *clip, MovieClipUser *user
return stableibuf;
}
-ImBuf *BKE_movieclip_get_stable_ibuf(MovieClip *clip, MovieClipUser *user, float loc[2], float *scale, float *angle, int postprocess_flag)
+ImBuf *BKE_movieclip_get_stable_ibuf(MovieClip *clip, MovieClipUser *user, float loc[2], float *scale, float *angle,
+ int postprocess_flag)
{
ImBuf *ibuf, *stableibuf = NULL;
int framenr = user->framenr;
@@ -862,7 +864,7 @@ ImBuf *BKE_movieclip_get_stable_ibuf(MovieClip *clip, MovieClipUser *user, float
return NULL;
if (clip->tracking.stabilization.flag & TRACKING_2D_STABILIZATION) {
- MovieClipCache *cache= clip->cache;
+ MovieClipCache *cache = clip->cache;
stableibuf = get_stable_cached_frame(clip, user, framenr, postprocess_flag);
@@ -873,20 +875,20 @@ ImBuf *BKE_movieclip_get_stable_ibuf(MovieClip *clip, MovieClipUser *user, float
copy_v2_v2(loc, cache->stabilized.loc);
if (scale)
- *scale= cache->stabilized.scale;
+ *scale = cache->stabilized.scale;
if (angle)
- *angle= cache->stabilized.angle;
+ *angle = cache->stabilized.angle;
}
else {
if (loc)
zero_v2(loc);
if (scale)
- *scale= 1.0f;
+ *scale = 1.0f;
if (angle)
- *angle= 0.0f;
+ *angle = 0.0f;
stableibuf = ibuf;
}
@@ -925,8 +927,8 @@ void BKE_movieclip_get_size(MovieClip *clip, MovieClipUser *user, int *width, in
real_ibuf_size(clip, user, ibuf, width, height);
}
else {
- *width = 0;
- *height = 0;
+ *width = clip->lastsize[0];
+ *height = clip->lastsize[1];
}
if (ibuf)
@@ -1038,34 +1040,34 @@ void BKE_movieclip_update_scopes(MovieClip *clip, MovieClipUser *user, MovieClip
scopes->track_disabled = FALSE;
- if (ibuf && ibuf->rect) {
+ if (ibuf && (ibuf->rect || ibuf->rect_float)) {
ImBuf *tmpibuf;
MovieTrackingMarker undist_marker = *marker;
if (user->render_flag & MCLIP_PROXY_RENDER_UNDISTORT) {
int width, height;
- float aspy= 1.0f / clip->tracking.camera.pixel_aspect;
+ float aspy = 1.0f / clip->tracking.camera.pixel_aspect;
BKE_movieclip_get_size(clip, user, &width, &height);
undist_marker.pos[0] *= width;
- undist_marker.pos[1] *= height*aspy;
+ undist_marker.pos[1] *= height * aspy;
BKE_tracking_invert_intrinsics(&clip->tracking, undist_marker.pos, undist_marker.pos);
undist_marker.pos[0] /= width;
- undist_marker.pos[1] /= height*aspy;
+ undist_marker.pos[1] /= height * aspy;
}
/* NOTE: margin should be kept in sync with value from ui_draw_but_TRACKPREVIEW */
- tmpibuf= BKE_tracking_get_pattern_imbuf(ibuf, track, &undist_marker, 3 /* margin */,
- 1 /* anchor */, scopes->track_pos, NULL);
+ tmpibuf = BKE_tracking_get_pattern_imbuf(ibuf, track, &undist_marker, 3 /* margin */,
+ 1 /* anchor */, scopes->track_pos, NULL);
if (tmpibuf->rect_float)
IMB_rect_from_float(tmpibuf);
if (tmpibuf->rect)
- scopes->track_preview= tmpibuf;
+ scopes->track_preview = tmpibuf;
else
IMB_freeImBuf(tmpibuf);
}
@@ -1073,11 +1075,11 @@ void BKE_movieclip_update_scopes(MovieClip *clip, MovieClipUser *user, MovieClip
IMB_freeImBuf(ibuf);
}
- if ((track->flag & TRACK_LOCKED)==0) {
+ if ((track->flag & TRACK_LOCKED) == 0) {
scopes->marker = marker;
scopes->track = track;
- scopes->slide_scale[0] = track->pat_max[0]-track->pat_min[0];
- scopes->slide_scale[1] = track->pat_max[1]-track->pat_min[1];
+ scopes->slide_scale[0] = track->pat_max[0] - track->pat_min[0];
+ scopes->slide_scale[1] = track->pat_max[1] - track->pat_min[1];
}
}
}
@@ -1149,14 +1151,14 @@ void BKE_movieclip_build_proxy_frame(MovieClip *clip, int clip_flag, struct Movi
}
}
-void free_movieclip(MovieClip *clip)
+void BKE_movieclip_free(MovieClip *clip)
{
free_buffers(clip);
BKE_tracking_free(&clip->tracking);
}
-void unlink_movieclip(Main *bmain, MovieClip *clip)
+void BKE_movieclip_unlink(Main *bmain, MovieClip *clip)
{
bScreen *scr;
ScrArea *area;
diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c
index 7580f2eee4d..bee1f534d05 100644
--- a/source/blender/blenkernel/intern/multires.c
+++ b/source/blender/blenkernel/intern/multires.c
@@ -82,30 +82,30 @@ static void multiresModifier_disp_run(DerivedMesh *dm, Mesh *me, DerivedMesh *dm
void multires_customdata_delete(Mesh *me)
{
if (me->edit_btmesh) {
- BMEditMesh *em= me->edit_btmesh;
+ BMEditMesh *em = me->edit_btmesh;
/* CustomData_external_remove is used here only to mark layer
* as non-external for further free-ing, so zero element count
* looks safer than em->totface */
CustomData_external_remove(&em->bm->ldata, &me->id,
- CD_MDISPS, 0);
+ CD_MDISPS, 0);
BM_data_layer_free(em->bm, &em->bm->ldata, CD_MDISPS);
}
else {
CustomData_external_remove(&me->ldata, &me->id,
- CD_MDISPS, me->totloop);
+ CD_MDISPS, me->totloop);
CustomData_free_layer_active(&me->ldata, CD_MDISPS,
- me->totloop);
+ me->totloop);
}
}
/** Grid hiding **/
static BLI_bitmap multires_mdisps_upsample_hidden(BLI_bitmap lo_hidden,
- int lo_level,
- int hi_level,
+ int lo_level,
+ int hi_level,
- /* assumed to be at hi_level (or
- * null) */
- BLI_bitmap prev_hidden)
+ /* assumed to be at hi_level (or
+ * null) */
+ BLI_bitmap prev_hidden)
{
BLI_bitmap subd;
int hi_gridsize = ccg_gridsize(hi_level);
@@ -163,8 +163,8 @@ static BLI_bitmap multires_mdisps_upsample_hidden(BLI_bitmap lo_hidden,
}
static BLI_bitmap multires_mdisps_downsample_hidden(BLI_bitmap old_hidden,
- int old_level,
- int new_level)
+ int old_level,
+ int new_level)
{
BLI_bitmap new_hidden;
int new_gridsize = ccg_gridsize(new_level);
@@ -174,16 +174,16 @@ static BLI_bitmap multires_mdisps_downsample_hidden(BLI_bitmap old_hidden,
BLI_assert(new_level <= old_level);
factor = ccg_factor(new_level, old_level);
new_hidden = BLI_BITMAP_NEW(new_gridsize * new_gridsize,
- "downsample hidden");
+ "downsample hidden");
for (y = 0; y < new_gridsize; y++) {
for (x = 0; x < new_gridsize; x++) {
old_value = BLI_BITMAP_GET(old_hidden,
- factor*y*old_gridsize + x*factor);
+ factor * y * old_gridsize + x * factor);
- BLI_BITMAP_MODIFY(new_hidden, y*new_gridsize + x, old_value);
+ BLI_BITMAP_MODIFY(new_hidden, y * new_gridsize + x, old_value);
}
}
@@ -191,7 +191,7 @@ static BLI_bitmap multires_mdisps_downsample_hidden(BLI_bitmap old_hidden,
}
static void multires_output_hidden_to_ccgdm(CCGDerivedMesh *ccgdm,
- Mesh *me, int level)
+ Mesh *me, int level)
{
const MDisps *mdisps = CustomData_get_layer(&me->ldata, CD_MDISPS);
BLI_bitmap *grid_hidden = ccgdm->gridHidden;
@@ -208,7 +208,7 @@ static void multires_output_hidden_to_ccgdm(CCGDerivedMesh *ccgdm,
if (gh) {
grid_hidden[g] =
- multires_mdisps_downsample_hidden(gh, md->level, level);
+ multires_mdisps_downsample_hidden(gh, md->level, level);
}
}
}
@@ -227,9 +227,9 @@ static void multires_mdisps_subdivide_hidden(MDisps *md, int new_level)
return;
subd = multires_mdisps_upsample_hidden(md->hidden,
- md->level,
- new_level,
- NULL);
+ md->level,
+ new_level,
+ NULL);
/* swap in the subdivided data */
MEM_freeN(md->hidden);
@@ -239,7 +239,7 @@ static void multires_mdisps_subdivide_hidden(MDisps *md, int new_level)
static MDisps *multires_mdisps_initialize_hidden(Mesh *me, int level)
{
MDisps *mdisps = CustomData_add_layer(&me->ldata, CD_MDISPS,
- CD_CALLOC, 0, me->totloop);
+ CD_CALLOC, 0, me->totloop);
int gridsize = ccg_gridsize(level);
int gridarea = gridsize * gridsize;
int i, j, k;
@@ -274,7 +274,7 @@ static MDisps *multires_mdisps_initialize_hidden(Mesh *me, int level)
DerivedMesh *get_multires_dm(Scene *scene, MultiresModifierData *mmd, Object *ob)
{
- ModifierData *md= (ModifierData *)mmd;
+ ModifierData *md = (ModifierData *)mmd;
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
DerivedMesh *tdm = mesh_get_derived_deform(scene, ob, CD_MASK_BAREMESH);
DerivedMesh *dm;
@@ -294,7 +294,7 @@ MultiresModifierData *find_multires_modifier_before(Scene *scene, ModifierData *
for (md = lastmd; md; md = md->prev) {
if (md->type == eModifierType_Multires) {
if (modifier_isEnabled(scene, md, eModifierMode_Realtime))
- return (MultiresModifierData*)md;
+ return (MultiresModifierData *)md;
}
}
@@ -307,16 +307,16 @@ MultiresModifierData *find_multires_modifier_before(Scene *scene, ModifierData *
MultiresModifierData *get_multires_modifier(Scene *scene, Object *ob, int use_first)
{
ModifierData *md;
- MultiresModifierData *mmd= NULL, *firstmmd= NULL;
+ MultiresModifierData *mmd = NULL, *firstmmd = NULL;
/* find first active multires modifier */
for (md = ob->modifiers.first; md; md = md->next) {
if (md->type == eModifierType_Multires) {
if (!firstmmd)
- firstmmd= (MultiresModifierData*)md;
+ firstmmd = (MultiresModifierData *)md;
if (modifier_isEnabled(scene, md, eModifierMode_Realtime)) {
- mmd= (MultiresModifierData*)md;
+ mmd = (MultiresModifierData *)md;
break;
}
}
@@ -334,11 +334,11 @@ MultiresModifierData *get_multires_modifier(Scene *scene, Object *ob, int use_fi
static int multires_get_level(Object *ob, MultiresModifierData *mmd, int render)
{
if (render)
- return (mmd->modifier.scene)? get_render_subsurf_level(&mmd->modifier.scene->r, mmd->renderlvl): mmd->renderlvl;
+ return (mmd->modifier.scene) ? get_render_subsurf_level(&mmd->modifier.scene->r, mmd->renderlvl) : mmd->renderlvl;
else if (ob->mode == OB_MODE_SCULPT)
return mmd->sculptlvl;
else
- return (mmd->modifier.scene)? get_render_subsurf_level(&mmd->modifier.scene->r, mmd->lvl): mmd->lvl;
+ return (mmd->modifier.scene) ? get_render_subsurf_level(&mmd->modifier.scene->r, mmd->lvl) : mmd->lvl;
}
static void multires_set_tot_level(Object *ob, MultiresModifierData *mmd, int lvl)
@@ -354,7 +354,7 @@ static void multires_set_tot_level(Object *ob, MultiresModifierData *mmd, int lv
static void multires_dm_mark_as_modified(DerivedMesh *dm, MultiresModifiedFlags flags)
{
- CCGDerivedMesh *ccgdm = (CCGDerivedMesh*)dm;
+ CCGDerivedMesh *ccgdm = (CCGDerivedMesh *)dm;
ccgdm->multires.modified_flags |= flags;
}
@@ -368,20 +368,20 @@ void multires_force_update(Object *ob)
{
if (ob) {
if (ob->derivedFinal) {
- ob->derivedFinal->needsFree =1;
+ ob->derivedFinal->needsFree = 1;
ob->derivedFinal->release(ob->derivedFinal);
ob->derivedFinal = NULL;
}
if (ob->sculpt && ob->sculpt->pbvh) {
BLI_pbvh_free(ob->sculpt->pbvh);
- ob->sculpt->pbvh= NULL;
+ ob->sculpt->pbvh = NULL;
}
}
}
void multires_force_external_reload(Object *ob)
{
- Mesh *me = get_mesh(ob);
+ Mesh *me = BKE_mesh_from_object(ob);
CustomData_external_reload(&me->ldata, &me->id, CD_MASK_MDISPS, me->totloop);
multires_force_update(ob);
@@ -394,9 +394,9 @@ void multires_force_render_update(Object *ob)
}
int multiresModifier_reshapeFromDM(Scene *scene, MultiresModifierData *mmd,
- Object *ob, DerivedMesh *srcdm)
+ Object *ob, DerivedMesh *srcdm)
{
- DerivedMesh *mrdm = get_multires_dm (scene, mmd, ob);
+ DerivedMesh *mrdm = get_multires_dm(scene, mmd, ob);
if (mrdm && srcdm && mrdm->getNumVerts(mrdm) == srcdm->getNumVerts(srcdm)) {
multires_mvert_to_ss(mrdm, srcdm->getVertArray(srcdm));
@@ -422,7 +422,7 @@ int multiresModifier_reshape(Scene *scene, MultiresModifierData *mmd, Object *ds
}
int multiresModifier_reshapeFromDeformMod(Scene *scene, MultiresModifierData *mmd,
- Object *ob, ModifierData *md)
+ Object *ob, ModifierData *md)
{
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
DerivedMesh *dm, *ndm;
@@ -434,20 +434,20 @@ int multiresModifier_reshapeFromDeformMod(Scene *scene, MultiresModifierData *mm
/* Create DerivedMesh for deformation modifier */
dm = get_multires_dm(scene, mmd, ob);
- numVerts= dm->getNumVerts(dm);
- deformedVerts= MEM_callocN(sizeof(float)*numVerts*3, "multiresReshape_deformVerts");
+ numVerts = dm->getNumVerts(dm);
+ deformedVerts = MEM_callocN(sizeof(float) * numVerts * 3, "multiresReshape_deformVerts");
dm->getVertCos(dm, deformedVerts);
mti->deformVerts(md, ob, dm, deformedVerts, numVerts, 0, 0);
- ndm= CDDM_copy(dm);
+ ndm = CDDM_copy(dm);
CDDM_apply_vert_coords(ndm, deformedVerts);
MEM_freeN(deformedVerts);
dm->release(dm);
/* Reshaping */
- result= multiresModifier_reshapeFromDM(scene, mmd, ob, ndm);
+ result = multiresModifier_reshapeFromDM(scene, mmd, ob, ndm);
/* Cleanup */
ndm->release(ndm);
@@ -460,25 +460,25 @@ static int get_levels_from_disps(Object *ob)
{
Mesh *me = ob->data;
MDisps *mdisp, *md;
- int i, j, totlvl= 0;
+ int i, j, totlvl = 0;
mdisp = CustomData_get_layer(&me->ldata, CD_MDISPS);
for (i = 0; i < me->totpoly; ++i) {
md = mdisp + me->mpoly[i].loopstart;
- for (j=0; j<me->mpoly[i].totloop; j++, md++) {
+ for (j = 0; j < me->mpoly[i].totloop; j++, md++) {
if (md->totdisp == 0) continue;
while (1) {
- int side = (1 << (totlvl-1)) + 1;
- int lvl_totdisp = side*side;
+ int side = (1 << (totlvl - 1)) + 1;
+ int lvl_totdisp = side * side;
if (md->totdisp == lvl_totdisp)
break;
else if (md->totdisp < lvl_totdisp)
- --totlvl;
+ totlvl--;
else
- ++totlvl;
+ totlvl++;
}
@@ -510,7 +510,7 @@ void multiresModifier_set_levels_from_disps(MultiresModifierData *mmd, Object *o
static void multires_set_tot_mdisps(Mesh *me, int lvl)
{
- MDisps *mdisps= CustomData_get_layer(&me->ldata, CD_MDISPS);
+ MDisps *mdisps = CustomData_get_layer(&me->ldata, CD_MDISPS);
int i;
if (mdisps) {
@@ -554,18 +554,18 @@ static void multires_copy_grid(float (*gridA)[3], float (*gridB)[3], int sizeA,
int x, y, j, skip;
if (sizeA > sizeB) {
- skip = (sizeA-1)/(sizeB-1);
+ skip = (sizeA - 1) / (sizeB - 1);
for (j = 0, y = 0; y < sizeB; y++)
for (x = 0; x < sizeB; x++, j++)
- copy_v3_v3(gridA[y*skip*sizeA + x*skip], gridB[j]);
+ copy_v3_v3(gridA[y * skip * sizeA + x * skip], gridB[j]);
}
else {
- skip = (sizeB-1)/(sizeA-1);
+ skip = (sizeB - 1) / (sizeA - 1);
for (j = 0, y = 0; y < sizeA; y++)
for (x = 0; x < sizeA; x++, j++)
- copy_v3_v3(gridA[j], gridB[y*skip*sizeB + x*skip]);
+ copy_v3_v3(gridA[j], gridB[y * skip * sizeB + x * skip]);
}
}
@@ -574,30 +574,30 @@ static void multires_copy_dm_grid(DMGridData *gridA, DMGridData *gridB, int size
int x, y, j, skip;
if (sizeA > sizeB) {
- skip = (sizeA-1)/(sizeB-1);
+ skip = (sizeA - 1) / (sizeB - 1);
for (j = 0, y = 0; y < sizeB; y++)
for (x = 0; x < sizeB; x++, j++)
- copy_v3_v3(gridA[y*skip*sizeA + x*skip].co, gridB[j].co);
+ copy_v3_v3(gridA[y * skip * sizeA + x * skip].co, gridB[j].co);
}
else {
- skip = (sizeB-1)/(sizeA-1);
+ skip = (sizeB - 1) / (sizeA - 1);
for (j = 0, y = 0; y < sizeA; y++)
for (x = 0; x < sizeA; x++, j++)
- copy_v3_v3(gridA[j].co, gridB[y*skip*sizeB + x*skip].co);
+ copy_v3_v3(gridA[j].co, gridB[y * skip * sizeB + x * skip].co);
}
}
static void multires_del_higher(MultiresModifierData *mmd, Object *ob, int lvl)
{
- Mesh *me = (Mesh*)ob->data;
+ Mesh *me = (Mesh *)ob->data;
int levels = mmd->totlvl - lvl;
MDisps *mdisps;
multires_set_tot_mdisps(me, mmd->totlvl);
CustomData_external_read(&me->ldata, &me->id, CD_MASK_MDISPS, me->totloop);
- mdisps= CustomData_get_layer(&me->ldata, CD_MDISPS);
+ mdisps = CustomData_get_layer(&me->ldata, CD_MDISPS);
multires_force_update(ob);
@@ -609,8 +609,8 @@ static void multires_del_higher(MultiresModifierData *mmd, Object *ob, int lvl)
int i, j;
for (i = 0; i < me->totpoly; ++i) {
- for (j=0; j<me->mpoly[i].totloop; j++) {
- MDisps *mdisp= &mdisps[me->mpoly[i].loopstart+j];
+ for (j = 0; j < me->mpoly[i].totloop; j++) {
+ MDisps *mdisp = &mdisps[me->mpoly[i].loopstart + j];
float (*disps)[3], (*ndisps)[3], (*hdisps)[3];
int totdisp = multires_grid_tot[lvl];
@@ -622,15 +622,15 @@ static void multires_del_higher(MultiresModifierData *mmd, Object *ob, int lvl)
multires_copy_grid(ndisps, hdisps, nsize, hsize);
if (mdisp->hidden) {
BLI_bitmap gh =
- multires_mdisps_downsample_hidden(mdisp->hidden,
- mdisp->level,
- lvl);
+ multires_mdisps_downsample_hidden(mdisp->hidden,
+ mdisp->level,
+ lvl);
MEM_freeN(mdisp->hidden);
mdisp->hidden = gh;
}
- ndisps += nsize*nsize;
- hdisps += hsize*hsize;
+ ndisps += nsize * nsize;
+ hdisps += hsize * hsize;
MEM_freeN(mdisp->disps);
mdisp->disps = disps;
@@ -650,14 +650,14 @@ static void multires_del_higher(MultiresModifierData *mmd, Object *ob, int lvl)
/* direction=1 for delete higher, direction=0 for lower (not implemented yet) */
void multiresModifier_del_levels(MultiresModifierData *mmd, Object *ob, int direction)
{
- Mesh *me = get_mesh(ob);
+ Mesh *me = BKE_mesh_from_object(ob);
int lvl = multires_get_level(ob, mmd, 0);
int levels = mmd->totlvl - lvl;
MDisps *mdisps;
multires_set_tot_mdisps(me, mmd->totlvl);
CustomData_external_read(&me->ldata, &me->id, CD_MASK_MDISPS, me->totloop);
- mdisps= CustomData_get_layer(&me->ldata, CD_MDISPS);
+ mdisps = CustomData_get_layer(&me->ldata, CD_MDISPS);
multires_force_update(ob);
@@ -670,7 +670,7 @@ void multiresModifier_del_levels(MultiresModifierData *mmd, Object *ob, int dire
static DerivedMesh *multires_dm_create_local(Object *ob, DerivedMesh *dm, int lvl, int totlvl, int simple)
{
- MultiresModifierData mmd= {{NULL}};
+ MultiresModifierData mmd = {{NULL}};
mmd.lvl = lvl;
mmd.sculptlvl = lvl;
@@ -683,7 +683,7 @@ static DerivedMesh *multires_dm_create_local(Object *ob, DerivedMesh *dm, int lv
static DerivedMesh *subsurf_dm_create_local(Object *ob, DerivedMesh *dm, int lvl, int simple, int optimal, int plain_uv)
{
- SubsurfModifierData smd= {{NULL}};
+ SubsurfModifierData smd = {{NULL}};
smd.levels = smd.renderLevels = lvl;
if (!plain_uv)
@@ -717,7 +717,7 @@ void multiresModifier_base_apply(MultiresModifierData *mmd, Object *ob)
multires_force_update(ob);
- me = get_mesh(ob);
+ me = BKE_mesh_from_object(ob);
totlvl = mmd->totlvl;
/* nothing to do */
@@ -742,12 +742,12 @@ void multiresModifier_base_apply(MultiresModifierData *mmd, Object *ob)
cddm = CDDM_from_mesh(me, NULL);
pmap = cddm->getPolyMap(ob, cddm);
- origco = MEM_callocN(sizeof(float)*3*me->totvert, "multires apply base origco");
- for (i = 0; i < me->totvert ;++i)
+ origco = MEM_callocN(sizeof(float) * 3 * me->totvert, "multires apply base origco");
+ for (i = 0; i < me->totvert; ++i)
copy_v3_v3(origco[i], me->mvert[i].co);
for (i = 0; i < me->totvert; ++i) {
- float avg_no[3] = {0,0,0}, center[3] = {0,0,0}, push[3];
+ float avg_no[3] = {0, 0, 0}, center[3] = {0, 0, 0}, push[3];
float dist;
int tot = 0;
@@ -764,7 +764,7 @@ void multiresModifier_base_apply(MultiresModifierData *mmd, Object *ob)
int vndx = me->mloop[p->loopstart + k].v;
if (vndx != i) {
add_v3_v3(center, origco[vndx]);
- ++tot;
+ tot++;
}
}
}
@@ -779,7 +779,7 @@ void multiresModifier_base_apply(MultiresModifierData *mmd, Object *ob)
float no[3];
/* set up poly, loops, and coords in order to call
- * mesh_calc_poly_normal_coords() */
+ * BKE_mesh_calc_poly_normal_coords() */
fake_poly.totloop = p->totloop;
fake_poly.loopstart = 0;
fake_loops = MEM_mallocN(sizeof(MLoop) * p->totloop, "fake_loops");
@@ -796,8 +796,8 @@ void multiresModifier_base_apply(MultiresModifierData *mmd, Object *ob)
copy_v3_v3(fake_co[k], origco[vndx]);
}
- mesh_calc_poly_normal_coords(&fake_poly, fake_loops,
- (const float(*)[3])fake_co, no);
+ BKE_mesh_calc_poly_normal_coords(&fake_poly, fake_loops,
+ (const float(*)[3])fake_co, no);
MEM_freeN(fake_loops);
MEM_freeN(fake_co);
@@ -833,9 +833,9 @@ static void multires_subdivide(MultiresModifierData *mmd, Object *ob, int totlvl
{
Mesh *me = ob->data;
MDisps *mdisps;
- int lvl= mmd->totlvl;
+ int lvl = mmd->totlvl;
- if (totlvl > multires_max_levels)
+ if ((totlvl > multires_max_levels) || (me->totpoly == 0))
return;
multires_force_update(ob);
@@ -867,12 +867,12 @@ static void multires_subdivide(MultiresModifierData *mmd, Object *ob, int totlvl
lowGridSize = lowdm->getGridSize(lowdm);
lowGridData = lowdm->getGridData(lowdm);
- subGridData = MEM_callocN(sizeof(float*)*numGrids, "subGridData*");
+ subGridData = MEM_callocN(sizeof(float *) * numGrids, "subGridData*");
for (i = 0; i < numGrids; ++i) {
/* backup subsurf grids */
- subGridData[i] = MEM_callocN(sizeof(DMGridData)*highGridSize*highGridSize, "subGridData");
- memcpy(subGridData[i], highGridData[i], sizeof(DMGridData)*highGridSize*highGridSize);
+ subGridData[i] = MEM_callocN(sizeof(DMGridData) * highGridSize * highGridSize, "subGridData");
+ memcpy(subGridData[i], highGridData[i], sizeof(DMGridData) * highGridSize * highGridSize);
/* overwrite with current displaced grids */
multires_copy_dm_grid(highGridData[i], lowGridData[i], highGridSize, lowGridSize);
@@ -882,7 +882,7 @@ static void multires_subdivide(MultiresModifierData *mmd, Object *ob, int totlvl
lowdm->release(lowdm);
/* subsurf higher levels again with displaced data */
- ss= ((CCGDerivedMesh*)highdm)->ss;
+ ss = ((CCGDerivedMesh *)highdm)->ss;
ccgSubSurf_updateFromFaces(ss, lvl, NULL, 0);
ccgSubSurf_updateLevels(ss, lvl, NULL, 0);
@@ -908,7 +908,7 @@ static void multires_subdivide(MultiresModifierData *mmd, Object *ob, int totlvl
void multiresModifier_subdivide(MultiresModifierData *mmd, Object *ob, int updateblock, int simple)
{
- multires_subdivide(mmd, ob, mmd->totlvl+1, updateblock, simple);
+ multires_subdivide(mmd, ob, mmd->totlvl + 1, updateblock, simple);
}
void grid_tangent(int gridSize, int index, int x, int y, int axis, DMGridData **gridData, float t[3])
@@ -916,33 +916,33 @@ void grid_tangent(int gridSize, int index, int x, int y, int axis, DMGridData **
if (axis == 0) {
if (x == gridSize - 1) {
if (y == gridSize - 1)
- sub_v3_v3v3(t, gridData[index][x + gridSize*(y - 1)].co, gridData[index][x - 1 + gridSize*(y - 1)].co);
+ sub_v3_v3v3(t, gridData[index][x + gridSize * (y - 1)].co, gridData[index][x - 1 + gridSize * (y - 1)].co);
else
- sub_v3_v3v3(t, gridData[index][x + gridSize*y].co, gridData[index][x - 1 + gridSize*y].co);
+ sub_v3_v3v3(t, gridData[index][x + gridSize * y].co, gridData[index][x - 1 + gridSize * y].co);
}
else
- sub_v3_v3v3(t, gridData[index][x + 1 + gridSize*y].co, gridData[index][x + gridSize*y].co);
+ sub_v3_v3v3(t, gridData[index][x + 1 + gridSize * y].co, gridData[index][x + gridSize * y].co);
}
else if (axis == 1) {
if (y == gridSize - 1) {
if (x == gridSize - 1)
- sub_v3_v3v3(t, gridData[index][x - 1 + gridSize*y].co, gridData[index][x - 1 + gridSize*(y - 1)].co);
+ sub_v3_v3v3(t, gridData[index][x - 1 + gridSize * y].co, gridData[index][x - 1 + gridSize * (y - 1)].co);
else
- sub_v3_v3v3(t, gridData[index][x + gridSize*y].co, gridData[index][x + gridSize*(y - 1)].co);
+ sub_v3_v3v3(t, gridData[index][x + gridSize * y].co, gridData[index][x + gridSize * (y - 1)].co);
}
else
- sub_v3_v3v3(t, gridData[index][x + gridSize*(y + 1)].co, gridData[index][x + gridSize*y].co);
+ sub_v3_v3v3(t, gridData[index][x + gridSize * (y + 1)].co, gridData[index][x + gridSize * y].co);
}
}
static void multiresModifier_disp_run(DerivedMesh *dm, Mesh *me, DerivedMesh *dm2, DispOp op, DMGridData **oldGridData, int totlvl)
{
- CCGDerivedMesh *ccgdm = (CCGDerivedMesh*)dm;
+ CCGDerivedMesh *ccgdm = (CCGDerivedMesh *)dm;
DMGridData **gridData, **subGridData;
MPoly *mpoly = me->mpoly;
MDisps *mdisps = CustomData_get_layer(&me->ldata, CD_MDISPS);
int *gridOffset;
- int i, k, /*numGrids,*/ gridSize, dGridSize, dSkip;
+ int i, k, /*numGrids, */ gridSize, dGridSize, dSkip;
int totloop, totpoly;
/* this happens in the dm made by bmesh_mdisps_space_set */
@@ -968,10 +968,10 @@ static void multiresModifier_disp_run(DerivedMesh *dm, Mesh *me, DerivedMesh *dm
gridSize = dm->getGridSize(dm);
gridData = dm->getGridData(dm);
gridOffset = dm->getGridOffset(dm);
- subGridData = (oldGridData)? oldGridData: gridData;
+ subGridData = (oldGridData) ? oldGridData : gridData;
dGridSize = multires_side_tot[totlvl];
- dSkip = (dGridSize-1)/(gridSize-1);
+ dSkip = (dGridSize - 1) / (gridSize - 1);
k = 0; /*current loop/mdisp index within the mloop array*/
@@ -982,7 +982,7 @@ static void multiresModifier_disp_run(DerivedMesh *dm, Mesh *me, DerivedMesh *dm
int S, x, y, gIndex = gridOffset[i];
for (S = 0; S < numVerts; ++S, ++gIndex, ++k) {
- MDisps *mdisp = &mdisps[mpoly[i].loopstart+S];
+ MDisps *mdisp = &mdisps[mpoly[i].loopstart + S];
DMGridData *grid = gridData[gIndex];
DMGridData *subgrid = subGridData[gIndex];
float (*dispgrid)[3] = NULL;
@@ -998,10 +998,10 @@ static void multiresModifier_disp_run(DerivedMesh *dm, Mesh *me, DerivedMesh *dm
for (y = 0; y < gridSize; y++) {
for (x = 0; x < gridSize; x++) {
- float *co = grid[x + y*gridSize].co;
- float *sco = subgrid[x + y*gridSize].co;
- float *no = subgrid[x + y*gridSize].no;
- float *data = dispgrid[dGridSize*y*dSkip + x*dSkip];
+ float *co = grid[x + y * gridSize].co;
+ float *sco = subgrid[x + y * gridSize].co;
+ float *no = subgrid[x + y * gridSize].no;
+ float *data = dispgrid[dGridSize * y * dSkip + x * dSkip];
float mat[3][3], tx[3], ty[3], disp[3], d[3];
/* construct tangent space matrix */
@@ -1017,27 +1017,27 @@ static void multiresModifier_disp_run(DerivedMesh *dm, Mesh *me, DerivedMesh *dm
column_vectors_to_mat3(mat, tx, ty, no);
- switch(op) {
- case APPLY_DISPLACEMENTS:
- /* Convert displacement to object space
- * and add to grid points */
- mul_v3_m3v3(disp, mat, data);
- add_v3_v3v3(co, sco, disp);
- break;
- case CALC_DISPLACEMENTS:
- /* Calculate displacement between new and old
- * grid points and convert to tangent space */
- sub_v3_v3v3(disp, co, sco);
- invert_m3(mat);
- mul_v3_m3v3(data, mat, disp);
- break;
- case ADD_DISPLACEMENTS:
- /* Convert subdivided displacements to tangent
- * space and add to the original displacements */
- invert_m3(mat);
- mul_v3_m3v3(d, mat, co);
- add_v3_v3(data, d);
- break;
+ switch (op) {
+ case APPLY_DISPLACEMENTS:
+ /* Convert displacement to object space
+ * and add to grid points */
+ mul_v3_m3v3(disp, mat, data);
+ add_v3_v3v3(co, sco, disp);
+ break;
+ case CALC_DISPLACEMENTS:
+ /* Calculate displacement between new and old
+ * grid points and convert to tangent space */
+ sub_v3_v3v3(disp, co, sco);
+ invert_m3(mat);
+ mul_v3_m3v3(data, mat, disp);
+ break;
+ case ADD_DISPLACEMENTS:
+ /* Convert subdivided displacements to tangent
+ * space and add to the original displacements */
+ invert_m3(mat);
+ mul_v3_m3v3(d, mat, co);
+ add_v3_v3(data, d);
+ break;
}
}
}
@@ -1052,7 +1052,7 @@ static void multiresModifier_disp_run(DerivedMesh *dm, Mesh *me, DerivedMesh *dm
void multires_modifier_update_mdisps(struct DerivedMesh *dm)
{
- CCGDerivedMesh *ccgdm= (CCGDerivedMesh*)dm;
+ CCGDerivedMesh *ccgdm = (CCGDerivedMesh *)dm;
Object *ob;
Mesh *me;
MDisps *mdisps;
@@ -1095,16 +1095,16 @@ void multires_modifier_update_mdisps(struct DerivedMesh *dm)
lowGridData = lowdm->getGridData(lowdm);
gridData = dm->getGridData(dm);
- subGridData = MEM_callocN(sizeof(DMGridData*)*numGrids, "subGridData*");
- diffGrid = MEM_callocN(sizeof(DMGridData)*lowGridSize*lowGridSize, "diff");
+ subGridData = MEM_callocN(sizeof(DMGridData *) * numGrids, "subGridData*");
+ diffGrid = MEM_callocN(sizeof(DMGridData) * lowGridSize * lowGridSize, "diff");
for (i = 0; i < numGrids; ++i) {
/* backup subsurf grids */
- subGridData[i] = MEM_callocN(sizeof(DMGridData)*highGridSize*highGridSize, "subGridData");
- memcpy(subGridData[i], highGridData[i], sizeof(DMGridData)*highGridSize*highGridSize);
+ subGridData[i] = MEM_callocN(sizeof(DMGridData) * highGridSize * highGridSize, "subGridData");
+ memcpy(subGridData[i], highGridData[i], sizeof(DMGridData) * highGridSize * highGridSize);
/* write difference of subsurf and displaced low level into high subsurf */
- for (j = 0; j < lowGridSize*lowGridSize; ++j)
+ for (j = 0; j < lowGridSize * lowGridSize; ++j)
sub_v3_v3v3(diffGrid[j].co, gridData[i][j].co, lowGridData[i][j].co);
multires_copy_dm_grid(highGridData[i], diffGrid, highGridSize, lowGridSize);
@@ -1115,7 +1115,7 @@ void multires_modifier_update_mdisps(struct DerivedMesh *dm)
lowdm->release(lowdm);
/* subsurf higher levels again with difference of coordinates */
- ss= ((CCGDerivedMesh*)highdm)->ss;
+ ss = ((CCGDerivedMesh *)highdm)->ss;
ccgSubSurf_updateFromFaces(ss, lvl, NULL, 0);
ccgSubSurf_updateLevels(ss, lvl, NULL, 0);
@@ -1147,8 +1147,8 @@ void multires_modifier_update_mdisps(struct DerivedMesh *dm)
void multires_modifier_update_hidden(DerivedMesh *dm)
{
- CCGDerivedMesh *ccgdm= (CCGDerivedMesh*)dm;
- BLI_bitmap *grid_hidden= ccgdm->gridHidden;
+ CCGDerivedMesh *ccgdm = (CCGDerivedMesh *)dm;
+ BLI_bitmap *grid_hidden = ccgdm->gridHidden;
Mesh *me = ccgdm->multires.ob->data;
MDisps *mdisps = CustomData_get_layer(&me->ldata, CD_MDISPS);
int totlvl = ccgdm->multires.totlvl;
@@ -1167,7 +1167,7 @@ void multires_modifier_update_hidden(DerivedMesh *dm)
}
else if (gh) {
gh = multires_mdisps_upsample_hidden(gh, lvl, totlvl,
- md->hidden);
+ md->hidden);
if (md->hidden)
MEM_freeN(md->hidden);
@@ -1180,7 +1180,7 @@ void multires_modifier_update_hidden(DerivedMesh *dm)
void multires_set_space(DerivedMesh *dm, Object *ob, int from, int to)
{
DerivedMesh *ccgdm = NULL, *subsurf = NULL;
- DMGridData **gridData, **subGridData=NULL;
+ DMGridData **gridData, **subGridData = NULL;
MPoly *mpoly = CustomData_get_layer(&dm->polyData, CD_MPOLY);
MDisps *mdisps;
MultiresModifierData *mmd = get_multires_modifier(NULL, ob, 1);
@@ -1200,26 +1200,26 @@ void multires_set_space(DerivedMesh *dm, Object *ob, int from, int to)
ccgdm = multires_dm_create_local(ob, dm, totlvl, totlvl, mmd->simple);
subsurf = subsurf_dm_create_local(ob, dm, totlvl,
- mmd->simple, mmd->flags & eMultiresModifierFlag_ControlEdges, mmd->flags & eMultiresModifierFlag_PlainUv);
+ mmd->simple, mmd->flags & eMultiresModifierFlag_ControlEdges, mmd->flags & eMultiresModifierFlag_PlainUv);
numGrids = subsurf->getNumGrids(subsurf);
gridSize = subsurf->getGridSize(subsurf);
gridData = subsurf->getGridData(subsurf);
- subGridData = MEM_callocN(sizeof(DMGridData*)*numGrids, "subGridData*");
+ subGridData = MEM_callocN(sizeof(DMGridData *) * numGrids, "subGridData*");
for (i = 0; i < numGrids; i++) {
- subGridData[i] = MEM_callocN(sizeof(DMGridData)*gridSize*gridSize, "subGridData");
- memcpy(subGridData[i], gridData[i], sizeof(DMGridData)*gridSize*gridSize);
+ subGridData[i] = MEM_callocN(sizeof(DMGridData) * gridSize * gridSize, "subGridData");
+ memcpy(subGridData[i], gridData[i], sizeof(DMGridData) * gridSize * gridSize);
}
/*numGrids = ccgdm->dm->getNumGrids((DerivedMesh*)ccgdm);*/ /*UNUSED*/
- gridSize = ccgdm->getGridSize((DerivedMesh*)ccgdm);
- gridData = ccgdm->getGridData((DerivedMesh*)ccgdm);
- gridOffset = ccgdm->getGridOffset((DerivedMesh*)ccgdm);
+ gridSize = ccgdm->getGridSize((DerivedMesh *)ccgdm);
+ gridData = ccgdm->getGridData((DerivedMesh *)ccgdm);
+ gridOffset = ccgdm->getGridOffset((DerivedMesh *)ccgdm);
dGridSize = multires_side_tot[totlvl];
- dSkip = (dGridSize-1)/(gridSize-1);
+ dSkip = (dGridSize - 1) / (gridSize - 1);
k = 0; /*current loop/mdisp index within the mloop array*/
@@ -1230,25 +1230,25 @@ void multires_set_space(DerivedMesh *dm, Object *ob, int from, int to)
int S, x, y, gIndex = gridOffset[i];
for (S = 0; S < numVerts; ++S, ++gIndex, ++k) {
- MDisps *mdisp = &mdisps[mpoly[i].loopstart+S];
+ MDisps *mdisp = &mdisps[mpoly[i].loopstart + S];
/* DMGridData *grid = gridData[gIndex]; */ /* UNUSED */
DMGridData *subgrid = subGridData[gIndex];
float (*dispgrid)[3] = NULL;
/* when adding new faces in edit mode, need to allocate disps */
if (!mdisp->disps) {
- mdisp->totdisp = gridSize*gridSize;
+ mdisp->totdisp = gridSize * gridSize;
mdisp->level = totlvl;
- mdisp->disps = MEM_callocN(sizeof(float)*3*mdisp->totdisp, "disp in multires_set_space");
+ mdisp->disps = MEM_callocN(sizeof(float) * 3 * mdisp->totdisp, "disp in multires_set_space");
}
dispgrid = mdisp->disps;
for (y = 0; y < gridSize; y++) {
for (x = 0; x < gridSize; x++) {
- float *data = dispgrid[dGridSize*y*dSkip + x*dSkip];
- float *no = subgrid[x + y*gridSize].no;
- float *co = subgrid[x + y*gridSize].co;
+ float *data = dispgrid[dGridSize * y * dSkip + x * dSkip];
+ float *no = subgrid[x + y * gridSize].no;
+ float *co = subgrid[x + y * gridSize].co;
float mat[3][3], tx[3], ty[3], dco[3];
/* construct tangent space matrix */
@@ -1308,12 +1308,12 @@ void multires_stitch_grids(Object *ob)
{
/* utility for smooth brush */
if (ob && ob->derivedFinal) {
- CCGDerivedMesh *ccgdm = (CCGDerivedMesh*)ob->derivedFinal;
+ CCGDerivedMesh *ccgdm = (CCGDerivedMesh *)ob->derivedFinal;
CCGFace **faces;
int totface;
if (ccgdm->pbvh) {
- BLI_pbvh_get_grid_updates(ccgdm->pbvh, 0, (void***)&faces, &totface);
+ BLI_pbvh_get_grid_updates(ccgdm->pbvh, 0, (void ***)&faces, &totface);
if (totface) {
ccgSubSurf_stitchFaces(ccgdm->ss, 0, faces, totface);
@@ -1324,25 +1324,25 @@ void multires_stitch_grids(Object *ob)
}
DerivedMesh *multires_dm_create_from_derived(MultiresModifierData *mmd,
- int local_mmd, DerivedMesh *dm,
- Object *ob, int useRenderParams)
+ int local_mmd, DerivedMesh *dm,
+ Object *ob, int useRenderParams)
{
- Mesh *me= ob->data;
+ Mesh *me = ob->data;
DerivedMesh *result;
CCGDerivedMesh *ccgdm = NULL;
DMGridData **gridData, **subGridData;
- int lvl= multires_get_level(ob, mmd, useRenderParams);
+ int lvl = multires_get_level(ob, mmd, useRenderParams);
int i, gridSize, numGrids;
if (lvl == 0)
return dm;
result = subsurf_dm_create_local(ob, dm, lvl,
- mmd->simple, mmd->flags & eMultiresModifierFlag_ControlEdges,
- mmd->flags & eMultiresModifierFlag_PlainUv);
+ mmd->simple, mmd->flags & eMultiresModifierFlag_ControlEdges,
+ mmd->flags & eMultiresModifierFlag_PlainUv);
if (!local_mmd) {
- ccgdm = (CCGDerivedMesh*)result;
+ ccgdm = (CCGDerivedMesh *)result;
ccgdm->multires.ob = ob;
ccgdm->multires.mmd = mmd;
@@ -1356,11 +1356,11 @@ DerivedMesh *multires_dm_create_from_derived(MultiresModifierData *mmd,
gridSize = result->getGridSize(result);
gridData = result->getGridData(result);
- subGridData = MEM_callocN(sizeof(DMGridData*)*numGrids, "subGridData*");
+ subGridData = MEM_callocN(sizeof(DMGridData *) * numGrids, "subGridData*");
for (i = 0; i < numGrids; i++) {
- subGridData[i] = MEM_callocN(sizeof(DMGridData)*gridSize*gridSize, "subGridData");
- memcpy(subGridData[i], gridData[i], sizeof(DMGridData)*gridSize*gridSize);
+ subGridData[i] = MEM_callocN(sizeof(DMGridData) * gridSize * gridSize, "subGridData");
+ memcpy(subGridData[i], gridData[i], sizeof(DMGridData) * gridSize * gridSize);
}
multires_set_tot_mdisps(me, mmd->totlvl);
@@ -1430,22 +1430,22 @@ void old_mdisps_bilinear(float out[3], float (*disps)[3], const int st, float u,
static void old_mdisps_rotate(int S, int UNUSED(newside), int oldside, int x, int y, float *u, float *v)
{
- float offset = oldside*0.5f - 0.5f;
+ float offset = oldside * 0.5f - 0.5f;
- if (S == 1) { *u= offset + x; *v = offset - y; }
- if (S == 2) { *u= offset + y; *v = offset + x; }
- if (S == 3) { *u= offset - x; *v = offset + y; }
- if (S == 0) { *u= offset - y; *v = offset - x; }
+ if (S == 1) { *u = offset + x; *v = offset - y; }
+ if (S == 2) { *u = offset + y; *v = offset + x; }
+ if (S == 3) { *u = offset - x; *v = offset + y; }
+ if (S == 0) { *u = offset - y; *v = offset - x; }
}
static void old_mdisps_convert(MFace *mface, MDisps *mdisp)
{
- int newlvl = log(sqrt(mdisp->totdisp)-1)/M_LN2;
- int oldlvl = newlvl+1;
+ int newlvl = log(sqrt(mdisp->totdisp) - 1) / M_LN2;
+ int oldlvl = newlvl + 1;
int oldside = multires_side_tot[oldlvl];
int newside = multires_side_tot[newlvl];
- int nvert = (mface->v4)? 4: 3;
- int newtotdisp = multires_grid_tot[newlvl]*nvert;
+ int nvert = (mface->v4) ? 4 : 3;
+ int newtotdisp = multires_grid_tot[newlvl] * nvert;
int x, y, S;
float (*disps)[3], (*out)[3], u = 0.0f, v = 0.0f; /* Quite gcc barking. */
@@ -1458,19 +1458,19 @@ static void old_mdisps_convert(MFace *mface, MDisps *mdisp)
old_mdisps_rotate(S, newside, oldside, x, y, &u, &v);
old_mdisps_bilinear(*out, mdisp->disps, oldside, u, v);
- if (S == 1) { (*out)[1]= -(*out)[1]; }
+ if (S == 1) { (*out)[1] = -(*out)[1]; }
else if (S == 2) { SWAP(float, (*out)[0], (*out)[1]); }
- else if (S == 3) { (*out)[0]= -(*out)[0]; }
- else if (S == 0) { SWAP(float, (*out)[0], (*out)[1]); (*out)[0]= -(*out)[0]; (*out)[1]= -(*out)[1]; };
+ else if (S == 3) { (*out)[0] = -(*out)[0]; }
+ else if (S == 0) { SWAP(float, (*out)[0], (*out)[1]); (*out)[0] = -(*out)[0]; (*out)[1] = -(*out)[1]; };
}
}
}
MEM_freeN(mdisp->disps);
- mdisp->totdisp= newtotdisp;
- mdisp->level= newlvl;
- mdisp->disps= disps;
+ mdisp->totdisp = newtotdisp;
+ mdisp->level = newlvl;
+ mdisp->disps = disps;
}
void multires_load_old_250(Mesh *me)
@@ -1479,10 +1479,10 @@ void multires_load_old_250(Mesh *me)
MFace *mf;
int i, j, k;
- mdisps= CustomData_get_layer(&me->fdata, CD_MDISPS);
+ mdisps = CustomData_get_layer(&me->fdata, CD_MDISPS);
if (mdisps) {
- for (i=0; i<me->totface; i++)
+ for (i = 0; i < me->totface; i++)
if (mdisps[i].totdisp)
old_mdisps_convert(&me->mface[i], &mdisps[i]);
@@ -1491,15 +1491,15 @@ void multires_load_old_250(Mesh *me)
k = 0;
mf = me->mface;
- for (i=0; i<me->totface; i++, mf++) {
+ for (i = 0; i < me->totface; i++, mf++) {
int nvert = mf->v4 ? 4 : 3;
int totdisp = mdisps[i].totdisp / nvert;
- for (j=0; j < mf->v4 ? 4 : 3; j++, k++) {
- mdisps2[k].disps = MEM_callocN(sizeof(float)*3*totdisp, "multires disp in conversion");
+ for (j = 0; j < mf->v4 ? 4 : 3; j++, k++) {
+ mdisps2[k].disps = MEM_callocN(sizeof(float) * 3 * totdisp, "multires disp in conversion");
mdisps2[k].totdisp = totdisp;
mdisps2[k].level = mdisps[i].level;
- memcpy(mdisps2[k].disps, mdisps[i].disps + totdisp*j, totdisp);
+ memcpy(mdisps2[k].disps, mdisps[i].disps + totdisp * j, totdisp);
}
}
@@ -1519,7 +1519,7 @@ static void multires_free_level(MultiresLevel *lvl)
void multires_free(Multires *mr)
{
if (mr) {
- MultiresLevel* lvl= mr->levels.first;
+ MultiresLevel *lvl = mr->levels.first;
/* Free the first-level data */
if (lvl) {
@@ -1533,7 +1533,7 @@ void multires_free(Multires *mr)
while (lvl) {
multires_free_level(lvl);
- lvl= lvl->next;
+ lvl = lvl->next;
}
MEM_freeN(mr->verts);
@@ -1545,18 +1545,18 @@ void multires_free(Multires *mr)
}
static void create_old_vert_face_map(ListBase **map, IndexNode **mem, const MultiresFace *mface,
- const int totvert, const int totface)
+ const int totvert, const int totface)
{
- int i,j;
+ int i, j;
IndexNode *node = NULL;
(*map) = MEM_callocN(sizeof(ListBase) * totvert, "vert face map");
- (*mem) = MEM_callocN(sizeof(IndexNode) * totface*4, "vert face map mem");
+ (*mem) = MEM_callocN(sizeof(IndexNode) * totface * 4, "vert face map mem");
node = *mem;
/* Find the users */
for (i = 0; i < totface; ++i) {
- for (j = 0; j < (mface[i].v[3]?4:3); ++j, ++node) {
+ for (j = 0; j < (mface[i].v[3] ? 4 : 3); ++j, ++node) {
node->index = i;
BLI_addtail(&(*map)[mface[i].v[j]], node);
}
@@ -1564,13 +1564,13 @@ static void create_old_vert_face_map(ListBase **map, IndexNode **mem, const Mult
}
static void create_old_vert_edge_map(ListBase **map, IndexNode **mem, const MultiresEdge *medge,
- const int totvert, const int totedge)
+ const int totvert, const int totedge)
{
- int i,j;
+ int i, j;
IndexNode *node = NULL;
(*map) = MEM_callocN(sizeof(ListBase) * totvert, "vert edge map");
- (*mem) = MEM_callocN(sizeof(IndexNode) * totedge*2, "vert edge map mem");
+ (*mem) = MEM_callocN(sizeof(IndexNode) * totedge * 2, "vert edge map mem");
node = *mem;
/* Find the users */
@@ -1587,10 +1587,10 @@ static MultiresFace *find_old_face(ListBase *map, MultiresFace *faces, int v1, i
IndexNode *n1;
int v[4], i, j;
- v[0]= v1;
- v[1]= v2;
- v[2]= v3;
- v[3]= v4;
+ v[0] = v1;
+ v[1] = v2;
+ v[2] = v3;
+ v[3] = v4;
for (n1 = map[v1].first; n1; n1 = n1->next) {
int fnd[4] = {0, 0, 0, 0};
@@ -1635,7 +1635,7 @@ static void multires_load_old_edges(ListBase **emap, MultiresLevel *lvl, int *vv
}
static void multires_load_old_faces(ListBase **fmap, ListBase **emap, MultiresLevel *lvl, int *vvmap, int dst,
- int v1, int v2, int v3, int v4, int st2, int st3)
+ int v1, int v2, int v3, int v4, int st2, int st3)
{
int fmid;
int emid13, emid14, emid23, emid24;
@@ -1651,16 +1651,16 @@ static void multires_load_old_faces(ListBase **fmap, ListBase **emap, MultiresLe
multires_load_old_faces(fmap + 1, emap + 1, lvl->next, vvmap, dst + st2 * st3 + st3,
- fmid, v2, emid23, emid24, st2, st3 / 2);
+ fmid, v2, emid23, emid24, st2, st3 / 2);
multires_load_old_faces(fmap + 1, emap + 1, lvl->next, vvmap, dst - st2 * st3 + st3,
- emid14, emid24, fmid, v4, st2, st3 / 2);
+ emid14, emid24, fmid, v4, st2, st3 / 2);
multires_load_old_faces(fmap + 1, emap + 1, lvl->next, vvmap, dst + st2 * st3 - st3,
- emid13, emid23, v3, fmid, st2, st3 / 2);
+ emid13, emid23, v3, fmid, st2, st3 / 2);
multires_load_old_faces(fmap + 1, emap + 1, lvl->next, vvmap, dst - st2 * st3 - st3,
- v1, fmid, emid13, emid14, st2, st3 / 2);
+ v1, fmid, emid13, emid14, st2, st3 / 2);
if (lvl->next->next) {
multires_load_old_edges(emap, lvl->next, vvmap, dst, emid24, fmid, st3);
@@ -1673,7 +1673,7 @@ static void multires_load_old_faces(ListBase **fmap, ListBase **emap, MultiresLe
static void multires_mvert_to_ss(DerivedMesh *dm, MVert *mvert)
{
- CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm;
+ CCGDerivedMesh *ccgdm = (CCGDerivedMesh *) dm;
CCGSubSurf *ss = ccgdm->ss;
DMGridData *vd;
int index;
@@ -1687,13 +1687,13 @@ static void multires_mvert_to_ss(DerivedMesh *dm, MVert *mvert)
CCGFace *f = ccgdm->faceMap[index].face;
int x, y, S, numVerts = ccgSubSurf_getFaceNumVerts(f);
- vd= ccgSubSurf_getFaceCenterData(f);
+ vd = ccgSubSurf_getFaceCenterData(f);
copy_v3_v3(vd->co, mvert[i].co);
i++;
for (S = 0; S < numVerts; S++) {
for (x = 1; x < gridSize - 1; x++, i++) {
- vd= ccgSubSurf_getFaceGridEdgeData(ss, f, S, x);
+ vd = ccgSubSurf_getFaceGridEdgeData(ss, f, S, x);
copy_v3_v3(vd->co, mvert[i].co);
}
}
@@ -1701,7 +1701,7 @@ static void multires_mvert_to_ss(DerivedMesh *dm, MVert *mvert)
for (S = 0; S < numVerts; S++) {
for (y = 1; y < gridSize - 1; y++) {
for (x = 1; x < gridSize - 1; x++, i++) {
- vd= ccgSubSurf_getFaceGridData(ss, f, S, x, y);
+ vd = ccgSubSurf_getFaceGridData(ss, f, S, x, y);
copy_v3_v3(vd->co, mvert[i].co);
}
}
@@ -1714,7 +1714,7 @@ static void multires_mvert_to_ss(DerivedMesh *dm, MVert *mvert)
int x;
for (x = 1; x < edgeSize - 1; x++, i++) {
- vd= ccgSubSurf_getEdgeData(ss, e, x);
+ vd = ccgSubSurf_getEdgeData(ss, e, x);
copy_v3_v3(vd->co, mvert[i].co);
}
}
@@ -1723,7 +1723,7 @@ static void multires_mvert_to_ss(DerivedMesh *dm, MVert *mvert)
for (index = 0; index < totvert; index++) {
CCGVert *v = ccgdm->vertMap[index].vert;
- vd= ccgSubSurf_getVertData(ss, v);
+ vd = ccgSubSurf_getVertData(ss, v);
copy_v3_v3(vd->co, mvert[i].co);
i++;
}
@@ -1735,7 +1735,7 @@ static void multires_mvert_to_ss(DerivedMesh *dm, MVert *mvert)
static void multires_load_old_dm(DerivedMesh *dm, Mesh *me, int totlvl)
{
MultiresLevel *lvl, *lvl1;
- Multires *mr= me->mr;
+ Multires *mr = me->mr;
MVert *vsrc, *vdst;
unsigned int src, dst;
int st = multires_side_tot[totlvl - 1] - 1;
@@ -1755,7 +1755,7 @@ static void multires_load_old_dm(DerivedMesh *dm, Mesh *me, int totlvl)
/* Load base verts */
for (i = 0; i < lvl1->totvert; ++i) {
vvmap[totvert - lvl1->totvert + i] = src;
- ++src;
+ src++;
}
/* Original edges */
@@ -1801,7 +1801,7 @@ static void multires_load_old_dm(DerivedMesh *dm, Mesh *me, int totlvl)
int sides = lvl1->faces[i].v[3] ? 4 : 3;
lvl = lvl1->next->next;
- ++dst;
+ dst++;
for (j = 3; j <= mr->level_count; ++j) {
int base = multires_side_tot[totlvl - j + 1] - 2;
@@ -1819,7 +1819,7 @@ static void multires_load_old_dm(DerivedMesh *dm, Mesh *me, int totlvl)
for (s = 0; s < sides; ++s) {
for (x = 0; x < st2; ++x) {
vvmap[dst + crossedgelen * (s + 1) - base - x * skip - 1] = lsrc;
- ++lsrc;
+ lsrc++;
}
}
@@ -1834,10 +1834,10 @@ static void multires_load_old_dm(DerivedMesh *dm, Mesh *me, int totlvl)
}
/* calculate vert to edge/face maps for each level (except the last) */
- fmap = MEM_callocN(sizeof(ListBase*) * (mr->level_count-1), "multires fmap");
- emap = MEM_callocN(sizeof(ListBase*) * (mr->level_count-1), "multires emap");
- fmem = MEM_callocN(sizeof(IndexNode*) * (mr->level_count-1), "multires fmem");
- emem = MEM_callocN(sizeof(IndexNode*) * (mr->level_count-1), "multires emem");
+ fmap = MEM_callocN(sizeof(ListBase *) * (mr->level_count - 1), "multires fmap");
+ emap = MEM_callocN(sizeof(ListBase *) * (mr->level_count - 1), "multires emap");
+ fmem = MEM_callocN(sizeof(IndexNode *) * (mr->level_count - 1), "multires fmem");
+ emem = MEM_callocN(sizeof(IndexNode *) * (mr->level_count - 1), "multires emem");
lvl = lvl1;
for (i = 0; i < (unsigned int)mr->level_count - 1; ++i) {
create_old_vert_face_map(fmap + i, fmem + i, lvl->faces, lvl->totvert, lvl->totface);
@@ -1862,10 +1862,10 @@ static void multires_load_old_dm(DerivedMesh *dm, Mesh *me, int totlvl)
int pv = lvl1->faces[j].v[s == 0 ? sides - 1 : s - 1];
multires_load_old_faces(fmap, emap, lvl1->next, vvmap, mid,
- vvmap[dst], cv,
- find_old_edge(emap[0], lvl1->edges, pv, cv)->mid,
- find_old_edge(emap[0], lvl1->edges, cv, nv)->mid,
- st2, st4);
+ vvmap[dst], cv,
+ find_old_edge(emap[0], lvl1->edges, pv, cv)->mid,
+ find_old_edge(emap[0], lvl1->edges, cv, nv)->mid,
+ st2, st4);
ldst += (st - 1) * (st - 1);
}
@@ -1920,10 +1920,10 @@ static void multires_load_old_vcols(Mesh *me)
for (i = 0; i < me->totface; ++i) {
for (j = 0; j < 4; ++j) {
- mcol[i*4 + j].a = colface[i].col[j].a;
- mcol[i*4 + j].r = colface[i].col[j].r;
- mcol[i*4 + j].g = colface[i].col[j].g;
- mcol[i*4 + j].b = colface[i].col[j].b;
+ mcol[i * 4 + j].a = colface[i].col[j].a;
+ mcol[i * 4 + j].r = colface[i].col[j].r;
+ mcol[i * 4 + j].g = colface[i].col[j].g;
+ mcol[i * 4 + j].b = colface[i].col[j].b;
}
}
}
@@ -1982,7 +1982,7 @@ void multires_load_old(Object *ob, Mesh *me)
md = ob->modifiers.first;
while (md && modifierType_getInfo(md->type)->type == eModifierTypeType_OnlyDeform)
md = md->next;
- mmd = (MultiresModifierData*)modifier_new(eModifierType_Multires);
+ mmd = (MultiresModifierData *)modifier_new(eModifierType_Multires);
BLI_insertlinkbefore(&ob->modifiers, md, mmd);
for (i = 0; i < me->mr->level_count - 1; ++i)
@@ -1992,7 +1992,7 @@ void multires_load_old(Object *ob, Mesh *me)
orig = CDDM_from_mesh(me, NULL);
dm = multires_dm_create_from_derived(mmd, 0, orig, ob, 0);
- multires_load_old_dm(dm, me, mmd->totlvl+1);
+ multires_load_old_dm(dm, me, mmd->totlvl + 1);
multires_dm_mark_as_modified(dm, MULTIRES_COORDS_MODIFIED);
dm->release(dm);
@@ -2011,13 +2011,13 @@ void multires_load_old(Object *ob, Mesh *me)
/* Remove the old multires */
multires_free(me->mr);
- me->mr= NULL;
+ me->mr = NULL;
}
static void multires_sync_levels(Scene *scene, Object *ob, Object *to_ob)
{
- MultiresModifierData *mmd= get_multires_modifier(scene, ob, 1);
- MultiresModifierData *to_mmd= get_multires_modifier(scene, to_ob, 1);
+ MultiresModifierData *mmd = get_multires_modifier(scene, ob, 1);
+ MultiresModifierData *to_mmd = get_multires_modifier(scene, to_ob, 1);
if (!mmd) {
/* object could have MDISP even when there is no multires modifier
@@ -2030,77 +2030,77 @@ static void multires_sync_levels(Scene *scene, Object *ob, Object *to_ob)
if (!mmd || !to_mmd) return;
- if (mmd->totlvl>to_mmd->totlvl) multires_del_higher(mmd, ob, to_mmd->totlvl);
+ if (mmd->totlvl > to_mmd->totlvl) multires_del_higher(mmd, ob, to_mmd->totlvl);
else multires_subdivide(mmd, ob, to_mmd->totlvl, 0, mmd->simple);
}
static void multires_apply_smat(Scene *scene, Object *ob, float smat[3][3])
{
- DerivedMesh *dm= NULL, *cddm= NULL, *subdm= NULL;
+ DerivedMesh *dm = NULL, *cddm = NULL, *subdm = NULL;
DMGridData **gridData, **subGridData;
- Mesh *me= (Mesh*)ob->data;
- MPoly *mpoly= me->mpoly;
+ Mesh *me = (Mesh *)ob->data;
+ MPoly *mpoly = me->mpoly;
/* MLoop *mloop = me->mloop; */ /* UNUSED */
MDisps *mdisps;
int *gridOffset;
- int i, /*numGrids,*/ gridSize, dGridSize, dSkip, totvert;
+ int i, /*numGrids, */ gridSize, dGridSize, dSkip, totvert;
float (*vertCos)[3] = NULL;
- MultiresModifierData *mmd= get_multires_modifier(scene, ob, 1);
+ MultiresModifierData *mmd = get_multires_modifier(scene, ob, 1);
MultiresModifierData high_mmd;
CustomData_external_read(&me->ldata, &me->id, CD_MASK_MDISPS, me->totloop);
- mdisps= CustomData_get_layer(&me->ldata, CD_MDISPS);
+ mdisps = CustomData_get_layer(&me->ldata, CD_MDISPS);
if (!mdisps || !mmd || !mmd->totlvl) return;
/* we need derived mesh created from highest resolution */
- high_mmd= *mmd;
- high_mmd.lvl= high_mmd.totlvl;
+ high_mmd = *mmd;
+ high_mmd.lvl = high_mmd.totlvl;
/* unscaled multires with applied displacement */
- subdm= get_multires_dm(scene, &high_mmd, ob);
+ subdm = get_multires_dm(scene, &high_mmd, ob);
/* prepare scaled CDDM to create ccgDN */
- cddm= mesh_get_derived_deform(scene, ob, CD_MASK_BAREMESH);
+ cddm = mesh_get_derived_deform(scene, ob, CD_MASK_BAREMESH);
- totvert= cddm->getNumVerts(cddm);
- vertCos= MEM_mallocN(sizeof(*vertCos) * totvert, "multiresScale vertCos");
+ totvert = cddm->getNumVerts(cddm);
+ vertCos = MEM_mallocN(sizeof(*vertCos) * totvert, "multiresScale vertCos");
cddm->getVertCos(cddm, vertCos);
- for (i=0; i<totvert; i++)
+ for (i = 0; i < totvert; i++)
mul_m3_v3(smat, vertCos[i]);
CDDM_apply_vert_coords(cddm, vertCos);
MEM_freeN(vertCos);
/* scaled ccgDM for tangent space of object with applied scale */
- dm= subsurf_dm_create_local(ob, cddm, high_mmd.totlvl, high_mmd.simple, 0, mmd->flags & eMultiresModifierFlag_PlainUv);
+ dm = subsurf_dm_create_local(ob, cddm, high_mmd.totlvl, high_mmd.simple, 0, mmd->flags & eMultiresModifierFlag_PlainUv);
cddm->release(cddm);
/*numGrids= dm->getNumGrids(dm);*/ /*UNUSED*/
- gridSize= dm->getGridSize(dm);
- gridData= dm->getGridData(dm);
- gridOffset= dm->getGridOffset(dm);
- subGridData= subdm->getGridData(subdm);
+ gridSize = dm->getGridSize(dm);
+ gridData = dm->getGridData(dm);
+ gridOffset = dm->getGridOffset(dm);
+ subGridData = subdm->getGridData(subdm);
- dGridSize= multires_side_tot[high_mmd.totlvl];
- dSkip= (dGridSize-1)/(gridSize-1);
+ dGridSize = multires_side_tot[high_mmd.totlvl];
+ dSkip = (dGridSize - 1) / (gridSize - 1);
#pragma omp parallel for private(i) if (me->totface*gridSize*gridSize*4 >= CCG_OMP_LIMIT)
for (i = 0; i < me->totpoly; ++i) {
- const int numVerts= mpoly[i].totloop;
- MDisps *mdisp= &mdisps[mpoly[i].loopstart];
+ const int numVerts = mpoly[i].totloop;
+ MDisps *mdisp = &mdisps[mpoly[i].loopstart];
int S, x, y, gIndex = gridOffset[i];
for (S = 0; S < numVerts; ++S, ++gIndex, mdisp++) {
- DMGridData *grid= gridData[gIndex];
- DMGridData *subgrid= subGridData[gIndex];
- float (*dispgrid)[3]= mdisp->disps;
+ DMGridData *grid = gridData[gIndex];
+ DMGridData *subgrid = subGridData[gIndex];
+ float (*dispgrid)[3] = mdisp->disps;
for (y = 0; y < gridSize; y++) {
for (x = 0; x < gridSize; x++) {
- float *co= grid[x + y*gridSize].co;
- float *sco= subgrid[x + y*gridSize].co;
- float *no= grid[x + y*gridSize].no;
- float *data= dispgrid[dGridSize*y*dSkip + x*dSkip];
+ float *co = grid[x + y * gridSize].co;
+ float *sco = subgrid[x + y * gridSize].co;
+ float *no = grid[x + y * gridSize].no;
+ float *data = dispgrid[dGridSize * y * dSkip + x * dSkip];
float mat[3][3], tx[3], ty[3], disp[3];
/* construct tangent space matrix */
@@ -2130,11 +2130,11 @@ static void multires_apply_smat(Scene *scene, Object *ob, float smat[3][3])
int multires_mdisp_corners(MDisps *s)
{
- int lvl= 13;
+ int lvl = 13;
while (lvl > 0) {
- int side = (1 << (lvl-1)) + 1;
- if ((s->totdisp % (side*side)) == 0) return s->totdisp / (side*side);
+ int side = (1 << (lvl - 1)) + 1;
+ if ((s->totdisp % (side * side)) == 0) return s->totdisp / (side * side);
lvl--;
}
@@ -2146,7 +2146,7 @@ void multiresModifier_scale_disp(Scene *scene, Object *ob)
float smat[3][3];
/* object's scale matrix */
- object_scale_to_mat3(ob, smat);
+ BKE_object_scale_to_mat3(ob, smat);
multires_apply_smat(scene, ob, smat);
}
@@ -2157,9 +2157,9 @@ void multiresModifier_prepare_join(Scene *scene, Object *ob, Object *to_ob)
multires_sync_levels(scene, ob, to_ob);
/* construct scale matrix for displacement */
- object_scale_to_mat3(to_ob, tmat);
+ BKE_object_scale_to_mat3(to_ob, tmat);
invert_m3(tmat);
- object_scale_to_mat3(ob, smat);
+ BKE_object_scale_to_mat3(ob, smat);
mul_m3_m3m3(mat, smat, tmat);
multires_apply_smat(scene, ob, mat);
@@ -2204,14 +2204,14 @@ void multires_topology_changed(Mesh *me)
/* Find per-corner coordinate with given per-face UV coord */
int mdisp_rot_face_to_crn(const int corners, const int face_side, const float u, const float v, float *x, float *y)
{
- const float offset = face_side*0.5f - 0.5f;
+ const float offset = face_side * 0.5f - 0.5f;
int S = 0;
if (corners == 4) {
if (u <= offset && v <= offset) S = 0;
else if (u > offset && v <= offset) S = 1;
else if (u > offset && v > offset) S = 2;
- else if (u <= offset && v >= offset) S = 3;
+ else if (u <= offset && v >= offset) S = 3;
if (S == 0) {
*y = offset - u;
@@ -2226,7 +2226,7 @@ int mdisp_rot_face_to_crn(const int corners, const int face_side, const float u,
*x = v - offset;
}
else if (S == 3) {
- *x= offset - u;
+ *x = offset - u;
*y = v - offset;
}
}
@@ -2235,15 +2235,15 @@ int mdisp_rot_face_to_crn(const int corners, const int face_side, const float u,
float w = (face_side - 1) - u - v;
float W1, W2;
- if (u >= v && u >= w) {S = 0; W1= w; W2= v;}
- else if (v >= u && v >= w) {S = 1; W1 = u; W2 = w;}
- else {S = 2; W1 = v; W2 = u;}
+ if (u >= v && u >= w) {S = 0; W1 = w; W2 = v; }
+ else if (v >= u && v >= w) {S = 1; W1 = u; W2 = w; }
+ else {S = 2; W1 = v; W2 = u; }
- W1 /= (face_side-1);
- W2 /= (face_side-1);
+ W1 /= (face_side - 1);
+ W2 /= (face_side - 1);
- *x = (1-(2*W1)/(1-W2)) * grid_size;
- *y = (1-(2*W2)/(1-W1)) * grid_size;
+ *x = (1 - (2 * W1) / (1 - W2)) * grid_size;
+ *y = (1 - (2 * W2) / (1 - W1)) * grid_size;
}
return S;
diff --git a/source/blender/blenkernel/intern/navmesh_conversion.c b/source/blender/blenkernel/intern/navmesh_conversion.c
index 34e0be1de92..24382b3bf91 100644
--- a/source/blender/blenkernel/intern/navmesh_conversion.c
+++ b/source/blender/blenkernel/intern/navmesh_conversion.c
@@ -57,8 +57,7 @@ BLI_INLINE int left(const float* a, const float* b, const float* c)
int polyNumVerts(const unsigned short* p, const int vertsPerPoly)
{
int i, nv = 0;
- for (i=0; i<vertsPerPoly; i++)
- {
+ for (i=0; i<vertsPerPoly; i++) {
if (p[i]==0xffff)
break;
nv++;
@@ -71,8 +70,7 @@ int polyIsConvex(const unsigned short* p, const int vertsPerPoly, const float* v
int j, nv = polyNumVerts(p, vertsPerPoly);
if (nv<3)
return 0;
- for (j=0; j<nv; j++)
- {
+ for (j=0; j<nv; j++) {
const float* v = &verts[3*p[j]];
const float* v_next = &verts[3*p[(j+1)%nv]];
const float* v_prev = &verts[3*p[(nv+j-1)%nv]];
@@ -88,8 +86,8 @@ float distPointToSegmentSq(const float* point, const float* a, const float* b)
float abx[3], dx[3];
float d, t;
- sub_v3_v3v3(abx, b,a);
- sub_v3_v3v3(dx, point,a);
+ sub_v3_v3v3(abx, b, a);
+ sub_v3_v3v3(dx, point, a);
d = abx[0]*abx[0]+abx[2]*abx[2];
t = abx[0]*dx[0]+abx[2]*dx[2];
@@ -119,8 +117,7 @@ int buildRawVertIndicesData(DerivedMesh* dm, int *nverts_r, float **verts_r,
MFace *faces;
nverts = dm->getNumVerts(dm);
- if (nverts>=0xffff)
- {
+ if (nverts>=0xffff) {
printf("Converting navmesh: Error! Too many vertices. Max number of vertices %d\n", 0xffff);
return 0;
}
@@ -128,8 +125,7 @@ int buildRawVertIndicesData(DerivedMesh* dm, int *nverts_r, float **verts_r,
dm->getVertCos(dm, (float(*)[3])verts);
//flip coordinates
- for (vi=0; vi<nverts; vi++)
- {
+ for (vi=0; vi<nverts; vi++) {
SWAP(float, verts[3*vi+1], verts[3*vi+2]);
}
@@ -137,8 +133,7 @@ int buildRawVertIndicesData(DerivedMesh* dm, int *nverts_r, float **verts_r,
nfaces = dm->getNumTessFaces(dm);
faces = dm->getTessFaceArray(dm);
ntris = nfaces;
- for (fi=0; fi<nfaces; fi++)
- {
+ for (fi=0; fi<nfaces; fi++) {
MFace* face = &faces[fi];
if (face->v4)
ntris++;
@@ -149,15 +144,13 @@ int buildRawVertIndicesData(DerivedMesh* dm, int *nverts_r, float **verts_r,
tris = MEM_callocN(sizeof(unsigned short)*3*ntris, "buildRawVertIndicesData tris");
tri = tris;
triIdx = 0;
- for (fi=0; fi<nfaces; fi++)
- {
+ for (fi=0; fi<nfaces; fi++) {
MFace* face = &faces[fi];
tri[3*triIdx+0] = (unsigned short) face->v1;
tri[3*triIdx+1] = (unsigned short) face->v3;
tri[3*triIdx+2] = (unsigned short) face->v2;
trisToFacesMap[triIdx++]=fi;
- if (face->v4)
- {
+ if (face->v4) {
tri[3*triIdx+0] = (unsigned short) face->v1;
tri[3*triIdx+1] = (unsigned short) face->v4;
tri[3*triIdx+2] = (unsigned short) face->v3;
@@ -187,8 +180,7 @@ int buildPolygonsByDetailedMeshes(const int vertsPerPoly, const int npolys,
unsigned short* newPoly = MEM_callocN(sizeof(unsigned short)*capacity, "buildPolygonsByDetailedMeshes newPoly");
memset(newPoly, 0xff, sizeof(unsigned short)*capacity);
- for (polyidx=0; polyidx<npolys; polyidx++)
- {
+ for (polyidx=0; polyidx<npolys; polyidx++) {
size_t i;
int j, k;
int nv = 0;
@@ -202,22 +194,18 @@ int buildPolygonsByDetailedMeshes(const int vertsPerPoly, const int npolys,
int adjustedNv;
int allBorderTraversed;
- for (j=0; j<dtrisNum && btri==-1;j++)
- {
+ for (j=0; j<dtrisNum && btri==-1;j++) {
int curpolytri = dtrisBase+j;
- for (k=0; k<3; k++)
- {
+ for (k=0; k<3; k++) {
unsigned short neighbortri = dtris[curpolytri*3*2+3+k];
- if ( neighbortri==0xffff || dtrisToPolysMap[neighbortri]!=polyidx+1)
- {
+ if ( neighbortri==0xffff || dtrisToPolysMap[neighbortri]!=polyidx+1) {
btri = curpolytri;
bedge = k;
break;
}
}
}
- if (btri==-1 || bedge==-1)
- {
+ if (btri==-1 || bedge==-1) {
//can't find triangle with border edge
MEM_freeN(traversedTris);
MEM_freeN(newPoly);
@@ -229,13 +217,10 @@ int buildPolygonsByDetailedMeshes(const int vertsPerPoly, const int npolys,
tri = btri;
edge = (bedge+1)%3;
traversedTris[tri-dtrisBase] = 1;
- while (tri!=btri || edge!=bedge)
- {
+ while (tri != btri || edge != bedge) {
int neighbortri = dtris[tri*3*2+3+edge];
- if (neighbortri==0xffff || dtrisToPolysMap[neighbortri]!=polyidx+1)
- {
- if (nv==capacity)
- {
+ if (neighbortri==0xffff || dtrisToPolysMap[neighbortri]!=polyidx+1) {
+ if (nv==capacity) {
unsigned short* newPolyBig;
capacity += vertsPerPoly;
newPolyBig = MEM_callocN(sizeof(unsigned short)*capacity, "buildPolygonsByDetailedMeshes newPolyBig");
@@ -251,16 +236,13 @@ int buildPolygonsByDetailedMeshes(const int vertsPerPoly, const int npolys,
else {
//move to next tri
int twinedge = -1;
- for (k=0; k<3; k++)
- {
- if (dtris[neighbortri*3*2+3+k] == tri)
- {
+ for (k=0; k<3; k++) {
+ if (dtris[neighbortri*3*2+3+k] == tri) {
twinedge = k;
break;
}
}
- if (twinedge==-1)
- {
+ if (twinedge==-1) {
printf("Converting navmesh: Error! Can't find neighbor edge - invalid adjacency info\n");
MEM_freeN(traversedTris);
goto returnLabel;
@@ -273,8 +255,7 @@ int buildPolygonsByDetailedMeshes(const int vertsPerPoly, const int npolys,
adjustedPoly = MEM_callocN(sizeof(unsigned short)*nv, "buildPolygonsByDetailedMeshes adjustedPoly");
adjustedNv = 0;
- for (i=0; i<nv; i++)
- {
+ for (i=0; i<nv; i++) {
unsigned short prev = newPoly[(nv+i-1)%nv];
unsigned short cur = newPoly[i];
unsigned short next = newPoly[(i+1)%nv];
@@ -288,17 +269,13 @@ int buildPolygonsByDetailedMeshes(const int vertsPerPoly, const int npolys,
nv = adjustedNv;
allBorderTraversed = 1;
- for (i=0; i<dtrisNum; i++)
- {
- if (traversedTris[i]==0)
- {
+ for (i=0; i<dtrisNum; i++) {
+ if (traversedTris[i]==0) {
//check whether it has border edges
int curpolytri = dtrisBase+i;
- for (k=0; k<3; k++)
- {
+ for (k=0; k<3; k++) {
unsigned short neighbortri = dtris[curpolytri*3*2+3+k];
- if ( neighbortri==0xffff || dtrisToPolysMap[neighbortri]!=polyidx+1)
- {
+ if ( neighbortri==0xffff || dtrisToPolysMap[neighbortri]!=polyidx+1) {
allBorderTraversed = 0;
break;
}
@@ -306,10 +283,8 @@ int buildPolygonsByDetailedMeshes(const int vertsPerPoly, const int npolys,
}
}
- if (nv<=vertsPerPoly && allBorderTraversed)
- {
- for (i=0; i<nv; i++)
- {
+ if (nv<=vertsPerPoly && allBorderTraversed) {
+ for (i=0; i<nv; i++) {
polys[polyidx*vertsPerPoly*2+i] = newPoly[i];
}
}
@@ -353,8 +328,7 @@ int buildNavMeshData(const int nverts, const float* verts,
unsigned short *dtris, *dmeshes, *polys;
int *dtrisToPolysMap, *dtrisToTrisMap;
- if (!recastData)
- {
+ if (!recastData) {
printf("Converting navmesh: Error! Can't find recast custom data\n");
return 0;
}
@@ -370,17 +344,14 @@ int buildNavMeshData(const int nverts, const float* verts,
//search first valid triangle - triangle of convex polygon
validTriStart = -1;
- for (i=0; i< ntris; i++)
- {
- if (recastData[trisToFacesMap[trisMapping[i]]]>0)
- {
+ for (i=0; i< ntris; i++) {
+ if (recastData[trisToFacesMap[trisMapping[i]]]>0) {
validTriStart = i;
break;
}
}
- if (validTriStart<0)
- {
+ if (validTriStart<0) {
printf("Converting navmesh: Error! No valid polygons in mesh\n");
MEM_freeN(trisMapping);
return 0;
@@ -396,8 +367,7 @@ int buildNavMeshData(const int nverts, const float* verts,
//and reserve memory for adjacency info
dtris = MEM_callocN(sizeof(unsigned short)*3*2*ndtris, "buildNavMeshData dtris");
memset(dtris, 0xffff, sizeof(unsigned short)*3*2*ndtris);
- for (i=0; i<ndtris; i++)
- {
+ for (i=0; i<ndtris; i++) {
memcpy(dtris+3*2*i, tris+3*dtrisToTrisMap[i], sizeof(unsigned short)*3);
}
@@ -405,11 +375,9 @@ int buildNavMeshData(const int nverts, const float* verts,
prevPolyIdx = -1;
newPolyIdx = 0;
dtrisToPolysMap = MEM_callocN(sizeof(int)*ndtris, "buildNavMeshData dtrisToPolysMap");
- for (i=0; i<ndtris; i++)
- {
+ for (i=0; i<ndtris; i++) {
curPolyIdx = recastData[trisToFacesMap[dtrisToTrisMap[i]]];
- if (curPolyIdx!=prevPolyIdx)
- {
+ if (curPolyIdx!=prevPolyIdx) {
newPolyIdx++;
prevPolyIdx=curPolyIdx;
}
@@ -426,13 +394,10 @@ int buildNavMeshData(const int nverts, const float* verts,
memset(dmeshes, 0, npolys*4*sizeof(unsigned short));
dmesh = NULL;
prevpolyidx = 0;
- for (i=0; i<ndtris; i++)
- {
+ for (i=0; i<ndtris; i++) {
int curpolyidx = dtrisToPolysMap[i];
- if (curpolyidx!=prevpolyidx)
- {
- if (curpolyidx!=prevpolyidx+1)
- {
+ if (curpolyidx!=prevpolyidx) {
+ if (curpolyidx!=prevpolyidx+1) {
printf("Converting navmesh: Error! Wrong order of detailed mesh faces\n");
return 0;
}
@@ -476,17 +441,15 @@ int buildNavMeshDataByDerivedMesh(DerivedMesh *dm, int *vertsPerPoly,
unsigned short *tris=NULL;
res = buildRawVertIndicesData(dm, nverts, verts, &ntris, &tris, trisToFacesMap, &recastData);
- if (!res)
- {
+ if (!res) {
printf("Converting navmesh: Error! Can't get vertices and indices from mesh\n");
goto exit;
}
res = buildNavMeshData(*nverts, *verts, ntris, tris, recastData, *trisToFacesMap,
- ndtris, dtris, npolys, dmeshes,polys, vertsPerPoly,
+ ndtris, dtris, npolys, dmeshes, polys, vertsPerPoly,
dtrisToPolysMap, dtrisToTrisMap);
- if (!res)
- {
+ if (!res) {
printf("Converting navmesh: Error! Can't get vertices and indices from mesh\n");
goto exit;
}
@@ -501,12 +464,10 @@ exit:
int polyFindVertex(const unsigned short* p, const int vertsPerPoly, unsigned short vertexIdx)
{
int i, res = -1;
- for (i=0; i<vertsPerPoly; i++)
- {
+ for (i=0; i<vertsPerPoly; i++) {
if (p[i]==0xffff)
break;
- if (p[i]==vertexIdx)
- {
+ if (p[i] == vertexIdx) {
res = i;
break;
}
diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c
index 56fec119cce..96c62a32139 100644
--- a/source/blender/blenkernel/intern/nla.c
+++ b/source/blender/blenkernel/intern/nla.c
@@ -73,7 +73,7 @@
/* Remove the given NLA strip from the NLA track it occupies, free the strip's data,
* and the strip itself.
*/
-void free_nlastrip (ListBase *strips, NlaStrip *strip)
+void free_nlastrip(ListBase *strips, NlaStrip *strip)
{
NlaStrip *cs, *csn;
@@ -111,7 +111,7 @@ void free_nlastrip (ListBase *strips, NlaStrip *strip)
/* Remove the given NLA track from the set of NLA tracks, free the track's data,
* and the track itself.
*/
-void free_nlatrack (ListBase *tracks, NlaTrack *nlt)
+void free_nlatrack(ListBase *tracks, NlaTrack *nlt)
{
NlaStrip *strip, *stripn;
@@ -135,7 +135,7 @@ void free_nlatrack (ListBase *tracks, NlaTrack *nlt)
/* Free the elements of type NLA Tracks provided in the given list, but do not free
* the list itself since that is not free-standing
*/
-void free_nladata (ListBase *tracks)
+void free_nladata(ListBase *tracks)
{
NlaTrack *nlt, *nltn;
@@ -216,7 +216,7 @@ NlaTrack *copy_nlatrack (NlaTrack *nlt)
}
/* Copy all NLA data */
-void copy_nladata (ListBase *dst, ListBase *src)
+void copy_nladata(ListBase *dst, ListBase *src)
{
NlaTrack *nlt, *nlt_d;
@@ -357,7 +357,7 @@ NlaStrip *add_nla_soundstrip (Scene *scene, Speaker *speaker)
strip->end = (float)ceil((double)info.length * FPS);
}
- else
+ else
#endif
{
strip->end = 10.0f;
@@ -373,7 +373,7 @@ NlaStrip *add_nla_soundstrip (Scene *scene, Speaker *speaker)
strip->extendmode = NLASTRIP_EXTEND_NOTHING; /* nothing to extend... */
/* strip should be referenced as-is */
- strip->scale= 1.0f;
+ strip->scale = 1.0f;
strip->repeat = 1.0f;
/* return this strip */
@@ -486,7 +486,7 @@ static float nlastrip_get_frame_transition (NlaStrip *strip, float cframe, short
* only secure for 'internal' (i.e. within AnimSys evaluation) operations,
* but should not be directly relied on for stuff which interacts with editors
*/
-float nlastrip_get_frame (NlaStrip *strip, float cframe, short mode)
+float nlastrip_get_frame(NlaStrip *strip, float cframe, short mode)
{
switch (strip->type) {
case NLASTRIP_TYPE_META: /* meta - for now, does the same as transition (is really just an empty container) */
@@ -506,7 +506,7 @@ float nlastrip_get_frame (NlaStrip *strip, float cframe, short mode)
* Public API method - perform this mapping using the given AnimData block
* and perform any necessary sanity checks on the value
*/
-float BKE_nla_tweakedit_remap (AnimData *adt, float cframe, short mode)
+float BKE_nla_tweakedit_remap(AnimData *adt, float cframe, short mode)
{
NlaStrip *strip;
@@ -546,7 +546,7 @@ float BKE_nla_tweakedit_remap (AnimData *adt, float cframe, short mode)
/* (these functions are used for NLA-Tracks and also for nested/meta-strips) */
/* Check if there is any space in the given list to add the given strip */
-short BKE_nlastrips_has_space (ListBase *strips, float start, float end)
+short BKE_nlastrips_has_space(ListBase *strips, float start, float end)
{
NlaStrip *strip;
@@ -580,7 +580,7 @@ short BKE_nlastrips_has_space (ListBase *strips, float start, float end)
/* Rearrange the strips in the track so that they are always in order
* (usually only needed after a strip has been moved)
*/
-void BKE_nlastrips_sort_strips (ListBase *strips)
+void BKE_nlastrips_sort_strips(ListBase *strips)
{
ListBase tmp = {NULL, NULL};
NlaStrip *strip, *sstrip, *stripn;
@@ -624,7 +624,7 @@ void BKE_nlastrips_sort_strips (ListBase *strips)
/* Add the given NLA-Strip to the given list of strips, assuming that it
* isn't currently a member of another list
*/
-short BKE_nlastrips_add_strip (ListBase *strips, NlaStrip *strip)
+short BKE_nlastrips_add_strip(ListBase *strips, NlaStrip *strip)
{
NlaStrip *ns;
short not_added = 1;
@@ -662,7 +662,7 @@ short BKE_nlastrips_add_strip (ListBase *strips, NlaStrip *strip)
* contained within 'Meta-Strips' which act as strips which contain strips.
* temp: are the meta-strips to be created 'temporary' ones used for transforms?
*/
-void BKE_nlastrips_make_metas (ListBase *strips, short temp)
+void BKE_nlastrips_make_metas(ListBase *strips, short temp)
{
NlaStrip *mstrip = NULL;
NlaStrip *strip, *stripn;
@@ -714,7 +714,7 @@ void BKE_nlastrips_make_metas (ListBase *strips, short temp)
}
/* Split a meta-strip into a set of normal strips */
-void BKE_nlastrips_clear_metastrip (ListBase *strips, NlaStrip *strip)
+void BKE_nlastrips_clear_metastrip(ListBase *strips, NlaStrip *strip)
{
NlaStrip *cs, *csn;
@@ -739,7 +739,7 @@ void BKE_nlastrips_clear_metastrip (ListBase *strips, NlaStrip *strip)
* sel: only consider selected meta-strips, otherwise all meta-strips are removed
* onlyTemp: only remove the 'temporary' meta-strips used for transforms
*/
-void BKE_nlastrips_clear_metas (ListBase *strips, short onlySel, short onlyTemp)
+void BKE_nlastrips_clear_metas(ListBase *strips, short onlySel, short onlyTemp)
{
NlaStrip *strip, *stripn;
@@ -766,7 +766,7 @@ void BKE_nlastrips_clear_metas (ListBase *strips, short onlySel, short onlyTemp)
/* Add the given NLA-Strip to the given Meta-Strip, assuming that the
* strip isn't attached to anyy list of strips
*/
-short BKE_nlameta_add_strip (NlaStrip *mstrip, NlaStrip *strip)
+short BKE_nlameta_add_strip(NlaStrip *mstrip, NlaStrip *strip)
{
/* sanity checks */
if (ELEM(NULL, mstrip, strip))
@@ -816,7 +816,7 @@ short BKE_nlameta_add_strip (NlaStrip *mstrip, NlaStrip *strip)
/* Adjust the settings of NLA-Strips contained within a Meta-Strip (recursively),
* until the Meta-Strips children all fit within the Meta-Strip's new dimensions
*/
-void BKE_nlameta_flush_transforms (NlaStrip *mstrip)
+void BKE_nlameta_flush_transforms(NlaStrip *mstrip)
{
NlaStrip *strip;
float oStart, oEnd, offset;
@@ -915,7 +915,7 @@ NlaTrack *BKE_nlatrack_find_active (ListBase *tracks)
/* Toggle the 'solo' setting for the given NLA-track, making sure that it is the only one
* that has this status in its AnimData block.
*/
-void BKE_nlatrack_solo_toggle (AnimData *adt, NlaTrack *nlt)
+void BKE_nlatrack_solo_toggle(AnimData *adt, NlaTrack *nlt)
{
NlaTrack *nt;
@@ -947,7 +947,7 @@ void BKE_nlatrack_solo_toggle (AnimData *adt, NlaTrack *nlt)
/* Make the given NLA-track the active one for the given stack. If no track is provided,
* this function can be used to simply deactivate all the NLA tracks in the given stack too.
*/
-void BKE_nlatrack_set_active (ListBase *tracks, NlaTrack *nlt_a)
+void BKE_nlatrack_set_active(ListBase *tracks, NlaTrack *nlt_a)
{
NlaTrack *nlt;
@@ -965,7 +965,7 @@ void BKE_nlatrack_set_active (ListBase *tracks, NlaTrack *nlt_a)
}
/* Check if there is any space in the given track to add a strip of the given length */
-short BKE_nlatrack_has_space (NlaTrack *nlt, float start, float end)
+short BKE_nlatrack_has_space(NlaTrack *nlt, float start, float end)
{
/* sanity checks
* - track must exist
@@ -987,7 +987,7 @@ short BKE_nlatrack_has_space (NlaTrack *nlt, float start, float end)
/* Rearrange the strips in the track so that they are always in order
* (usually only needed after a strip has been moved)
*/
-void BKE_nlatrack_sort_strips (NlaTrack *nlt)
+void BKE_nlatrack_sort_strips(NlaTrack *nlt)
{
/* sanity checks */
if (ELEM(NULL, nlt, nlt->strips.first))
@@ -1000,7 +1000,7 @@ void BKE_nlatrack_sort_strips (NlaTrack *nlt)
/* Add the given NLA-Strip to the given NLA-Track, assuming that it
* isn't currently attached to another one
*/
-short BKE_nlatrack_add_strip (NlaTrack *nlt, NlaStrip *strip)
+short BKE_nlatrack_add_strip(NlaTrack *nlt, NlaStrip *strip)
{
/* sanity checks */
if (ELEM(NULL, nlt, strip))
@@ -1013,7 +1013,7 @@ short BKE_nlatrack_add_strip (NlaTrack *nlt, NlaStrip *strip)
/* Get the extents of the given NLA-Track including gaps between strips,
* returning whether this succeeded or not
*/
-short BKE_nlatrack_get_bounds (NlaTrack *nlt, float bounds[2])
+short BKE_nlatrack_get_bounds(NlaTrack *nlt, float bounds[2])
{
NlaStrip *strip;
@@ -1061,7 +1061,7 @@ NlaStrip *BKE_nlastrip_find_active (NlaTrack *nlt)
}
/* Make the given NLA-Strip the active one within the given block */
-void BKE_nlastrip_set_active (AnimData *adt, NlaStrip *strip)
+void BKE_nlastrip_set_active(AnimData *adt, NlaStrip *strip)
{
NlaTrack *nlt;
NlaStrip *nls;
@@ -1083,7 +1083,7 @@ void BKE_nlastrip_set_active (AnimData *adt, NlaStrip *strip)
/* Does the given NLA-strip fall within the given bounds (times)? */
-short BKE_nlastrip_within_bounds (NlaStrip *strip, float min, float max)
+short BKE_nlastrip_within_bounds(NlaStrip *strip, float min, float max)
{
const float stripLen= (strip) ? strip->end - strip->start : 0.0f;
const float boundsLen= fabsf(max - min);
@@ -1096,15 +1096,15 @@ short BKE_nlastrip_within_bounds (NlaStrip *strip, float min, float max)
* - first 2 cases cover when the strip length is less than the bounding area
* - second 2 cases cover when the strip length is greater than the bounding area
*/
- if ( (stripLen < boundsLen) &&
- !(IN_RANGE(strip->start, min, max) ||
- IN_RANGE(strip->end, min, max)) )
+ if ((stripLen < boundsLen) &&
+ !(IN_RANGE(strip->start, min, max) ||
+ IN_RANGE(strip->end, min, max)))
{
return 0;
}
- if ( (stripLen > boundsLen) &&
- !(IN_RANGE(min, strip->start, strip->end) ||
- IN_RANGE(max, strip->start, strip->end)) )
+ if ((stripLen > boundsLen) &&
+ !(IN_RANGE(min, strip->start, strip->end) ||
+ IN_RANGE(max, strip->start, strip->end)) )
{
return 0;
}
@@ -1116,7 +1116,7 @@ short BKE_nlastrip_within_bounds (NlaStrip *strip, float min, float max)
/* Recalculate the start and end frames for the current strip, after changing
* the extents of the action or the mapping (repeats or scale factor) info
*/
-void BKE_nlastrip_recalculate_bounds (NlaStrip *strip)
+void BKE_nlastrip_recalculate_bounds(NlaStrip *strip)
{
float actlen, mapping;
@@ -1171,7 +1171,7 @@ static short nlastrip_is_first (AnimData *adt, NlaStrip *strip)
/* Animated Strips ------------------------------------------- */
/* Check if the given NLA-Track has any strips with own F-Curves */
-short BKE_nlatrack_has_animated_strips (NlaTrack *nlt)
+short BKE_nlatrack_has_animated_strips(NlaTrack *nlt)
{
NlaStrip *strip;
@@ -1190,7 +1190,7 @@ short BKE_nlatrack_has_animated_strips (NlaTrack *nlt)
}
/* Check if given NLA-Tracks have any strips with own F-Curves */
-short BKE_nlatracks_have_animated_strips (ListBase *tracks)
+short BKE_nlatracks_have_animated_strips(ListBase *tracks)
{
NlaTrack *nlt;
@@ -1209,7 +1209,7 @@ short BKE_nlatracks_have_animated_strips (ListBase *tracks)
}
/* Validate the NLA-Strips 'control' F-Curves based on the flags set*/
-void BKE_nlastrip_validate_fcurves (NlaStrip *strip)
+void BKE_nlastrip_validate_fcurves(NlaStrip *strip)
{
FCurve *fcu;
@@ -1272,7 +1272,7 @@ static int nla_editbone_name_check(void *arg, const char *name)
* as we need to ensure that the name is unique over several lists of tracks,
* not just a single track.
*/
-void BKE_nlastrip_validate_name (AnimData *adt, NlaStrip *strip)
+void BKE_nlastrip_validate_name(AnimData *adt, NlaStrip *strip)
{
GHash *gh;
NlaStrip *tstrip;
@@ -1416,7 +1416,7 @@ static void BKE_nlastrip_validate_autoblends (NlaTrack *nlt, NlaStrip *nls)
}
/* Ensure that auto-blending and other settings are set correctly */
-void BKE_nla_validate_state (AnimData *adt)
+void BKE_nla_validate_state(AnimData *adt)
{
NlaStrip *strip, *fstrip=NULL;
NlaTrack *nlt;
@@ -1470,7 +1470,7 @@ void BKE_nla_validate_state (AnimData *adt)
* so no checks for this are performed.
*/
// TODO: maybe we should have checks for this too...
-void BKE_nla_action_pushdown (AnimData *adt)
+void BKE_nla_action_pushdown(AnimData *adt)
{
NlaStrip *strip;
@@ -1518,7 +1518,7 @@ void BKE_nla_action_pushdown (AnimData *adt)
/* Find the active strip + track combo, and set them up as the tweaking track,
* and return if successful or not.
*/
-short BKE_nla_tweakmode_enter (AnimData *adt)
+short BKE_nla_tweakmode_enter(AnimData *adt)
{
NlaTrack *nlt, *activeTrack=NULL;
NlaStrip *strip, *activeStrip=NULL;
@@ -1619,7 +1619,7 @@ short BKE_nla_tweakmode_enter (AnimData *adt)
}
/* Exit tweakmode for this AnimData block */
-void BKE_nla_tweakmode_exit (AnimData *adt)
+void BKE_nla_tweakmode_exit(AnimData *adt)
{
NlaStrip *strip;
NlaTrack *nlt;
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index 2fb3f81b147..a25cd0d3b38 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -141,8 +141,8 @@ void ntreeInitTypes(bNodeTree *ntree)
/* needed info if the pynode script fails now: */
node->storage= ntree;
if (node->id!=NULL) { /* not an empty script node */
- node->custom1= 0;
- node->custom1= BSET(node->custom1,NODE_DYNAMIC_ADDEXIST);
+ node->custom1 = 0;
+ node->custom1 = BSET(node->custom1, NODE_DYNAMIC_ADDEXIST);
}
// if (node->typeinfo)
// node->typeinfo->initfunc(node);
@@ -339,15 +339,15 @@ bNode *nodeAddNode(bNodeTree *ntree, struct bNodeTemplate *ntemp)
node_add_sockets_from_type(ntree, node, ntype);
- if (ntype->initfunc!=NULL)
- ntype->initfunc(ntree, node, ntemp);
-
/* initialize the node name with the node label */
BLI_strncpy(node->name, nodeLabel(node), NODE_MAXSTR);
nodeUniqueName(ntree, node);
BLI_addtail(&ntree->nodes, node);
+ if (ntype->initfunc!=NULL)
+ ntype->initfunc(ntree, node, ntemp);
+
ntree->update |= NTREE_UPDATE_NODES;
return node;
@@ -643,7 +643,7 @@ bNodeTree *ntreeAddTree(const char *name, int type, int nodetype)
BLI_strncpy(ntree->id.name+2, name, sizeof(ntree->id.name));
}
else
- ntree= alloc_libblock(&G.main->nodetree, ID_NT, name);
+ ntree= BKE_libblock_alloc(&G.main->nodetree, ID_NT, name);
ntree->type= type;
ntree->nodetype = nodetype;
@@ -675,11 +675,11 @@ bNodeTree *ntreeCopyTree(bNodeTree *ntree)
for (newtree=G.main->nodetree.first; newtree; newtree= newtree->id.next)
if (newtree==ntree) break;
if (newtree) {
- newtree= copy_libblock(&ntree->id);
+ newtree= BKE_libblock_copy(&ntree->id);
}
else {
newtree= MEM_dupallocN(ntree);
- copy_libblock_data(&newtree->id, &ntree->id, TRUE); /* copy animdata and ID props */
+ BKE_libblock_copy_data(&newtree->id, &ntree->id, TRUE); /* copy animdata and ID props */
}
id_us_plus((ID *)newtree->gpd);
@@ -931,7 +931,7 @@ void nodeFreeNode(bNodeTree *ntree, bNode *node)
ntree->update |= NTREE_UPDATE_NODES;
}
-/* do not free ntree itself here, free_libblock calls this function too */
+/* do not free ntree itself here, BKE_libblock_free calls this function too */
void ntreeFreeTree(bNodeTree *ntree)
{
bNode *node, *next;
@@ -1969,6 +1969,7 @@ static void registerShaderNodes(bNodeTreeType *ttype)
register_node_type_sh_attribute(ttype);
register_node_type_sh_geometry(ttype);
register_node_type_sh_light_path(ttype);
+ register_node_type_sh_light_falloff(ttype);
register_node_type_sh_fresnel(ttype);
register_node_type_sh_layer_weight(ttype);
register_node_type_sh_tex_coord(ttype);
@@ -2093,7 +2094,7 @@ void free_nodesystem(void)
free_typeinfos(&ntreeGetType(NTREE_TEXTURE)->node_types);
}
-/* called from unlink_scene, when deleting a scene goes over all scenes
+/* called from BKE_scene_unlink, when deleting a scene goes over all scenes
* other than the input, checks if they have render layer nodes referencing
* the to-be-deleted scene, and resets them to NULL. */
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index bc9411b7e02..e43c0999698 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -56,6 +56,7 @@
#include "DNA_space_types.h"
#include "DNA_view3d_types.h"
#include "DNA_world_types.h"
+#include "DNA_object_types.h"
#include "BLI_blenlib.h"
#include "BLI_bpath.h"
@@ -114,77 +115,57 @@
#include "GPU_material.h"
/* Local function protos */
-static void solve_parenting (Scene *scene, Object *ob, Object *par, float obmat[][4], float slowmat[][4], int simul);
+static void solve_parenting(Scene *scene, Object *ob, Object *par, float obmat[][4], float slowmat[][4], int simul);
-float originmat[3][3]; /* after where_is_object(), can be used in other functions (bad!) */
+float originmat[3][3]; /* after BKE_object_where_is_calc(), can be used in other functions (bad!) */
-void clear_workob(Object *workob)
+void BKE_object_workob_clear(Object *workob)
{
memset(workob, 0, sizeof(Object));
- workob->size[0]= workob->size[1]= workob->size[2]= 1.0f;
- workob->dscale[0]= workob->dscale[1]= workob->dscale[2]= 1.0f;
- workob->rotmode= ROT_MODE_EUL;
+ workob->size[0] = workob->size[1] = workob->size[2] = 1.0f;
+ workob->dscale[0] = workob->dscale[1] = workob->dscale[2] = 1.0f;
+ workob->rotmode = ROT_MODE_EUL;
}
-void copy_baseflags(struct Scene *scene)
+void BKE_object_update_base_layer(struct Scene *scene, Object *ob)
{
- Base *base= scene->base.first;
-
- while (base) {
- base->object->flag= base->flag;
- base= base->next;
- }
-}
-
-void copy_objectflags(struct Scene *scene)
-{
- Base *base= scene->base.first;
-
- while (base) {
- base->flag= base->object->flag;
- base= base->next;
- }
-}
-
-void update_base_layer(struct Scene *scene, Object *ob)
-{
- Base *base= scene->base.first;
+ Base *base = scene->base.first;
while (base) {
- if (base->object == ob) base->lay= ob->lay;
- base= base->next;
+ if (base->object == ob) base->lay = ob->lay;
+ base = base->next;
}
}
-void object_free_particlesystems(Object *ob)
+void BKE_object_free_particlesystems(Object *ob)
{
while (ob->particlesystem.first) {
ParticleSystem *psys = ob->particlesystem.first;
- BLI_remlink(&ob->particlesystem,psys);
+ BLI_remlink(&ob->particlesystem, psys);
- psys_free(ob,psys);
+ psys_free(ob, psys);
}
}
-void object_free_softbody(Object *ob)
+void BKE_object_free_softbody(Object *ob)
{
if (ob->soft) {
sbFree(ob->soft);
- ob->soft= NULL;
+ ob->soft = NULL;
}
}
-void object_free_bulletsoftbody(Object *ob)
+void BKE_object_free_bulletsoftbody(Object *ob)
{
if (ob->bsoft) {
bsbFree(ob->bsoft);
- ob->bsoft= NULL;
+ ob->bsoft = NULL;
}
}
-void object_free_modifiers(Object *ob)
+void BKE_object_free_modifiers(Object *ob)
{
while (ob->modifiers.first) {
ModifierData *md = ob->modifiers.first;
@@ -195,31 +176,31 @@ void object_free_modifiers(Object *ob)
}
/* particle modifiers were freed, so free the particlesystems as well */
- object_free_particlesystems(ob);
+ BKE_object_free_particlesystems(ob);
/* same for softbody */
- object_free_softbody(ob);
+ BKE_object_free_softbody(ob);
}
-int object_support_modifier_type(Object *ob, int modifier_type)
+int BKE_object_support_modifier_type_check(Object *ob, int modifier_type)
{
ModifierTypeInfo *mti;
mti = modifierType_getInfo(modifier_type);
if (!((mti->flags & eModifierTypeFlag_AcceptsCVs) ||
- (ob->type==OB_MESH && (mti->flags & eModifierTypeFlag_AcceptsMesh))))
+ (ob->type == OB_MESH && (mti->flags & eModifierTypeFlag_AcceptsMesh))))
{
- return FALSE;
+ return FALSE;
}
return TRUE;
}
-void object_link_modifiers(struct Object *ob, struct Object *from)
+void BKE_object_link_modifiers(struct Object *ob, struct Object *from)
{
ModifierData *md;
- object_free_modifiers(ob);
+ BKE_object_free_modifiers(ob);
if (!ELEM5(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_LATTICE)) {
/* only objects listed above can have modifiers and linking them to objects
@@ -227,12 +208,12 @@ void object_link_modifiers(struct Object *ob, struct Object *from)
return;
}
- for (md=from->modifiers.first; md; md=md->next) {
+ for (md = from->modifiers.first; md; md = md->next) {
ModifierData *nmd = NULL;
if (ELEM4(md->type, eModifierType_Hook, eModifierType_Softbody, eModifierType_ParticleInstance, eModifierType_Collision)) continue;
- if (!object_support_modifier_type(ob, md->type))
+ if (!BKE_object_support_modifier_type_check(ob, md->type))
continue;
nmd = modifier_new(md->type);
@@ -240,28 +221,28 @@ void object_link_modifiers(struct Object *ob, struct Object *from)
BLI_addtail(&ob->modifiers, nmd);
}
- copy_object_particlesystems(ob, from);
- copy_object_softbody(ob, from);
+ BKE_object_copy_particlesystems(ob, from);
+ BKE_object_copy_softbody(ob, from);
// TODO: smoke?, cloth?
}
/* here we will collect all local displist stuff */
/* also (ab)used in depsgraph */
-void object_free_display(Object *ob)
+void BKE_object_free_display(Object *ob)
{
if (ob->derivedDeform) {
ob->derivedDeform->needsFree = 1;
ob->derivedDeform->release(ob->derivedDeform);
- ob->derivedDeform= NULL;
+ ob->derivedDeform = NULL;
}
if (ob->derivedFinal) {
ob->derivedFinal->needsFree = 1;
ob->derivedFinal->release(ob->derivedFinal);
- ob->derivedFinal= NULL;
+ ob->derivedFinal = NULL;
}
- freedisplist(&ob->disp);
+ BKE_displist_free(&ob->disp);
}
void free_sculptsession_deformMats(SculptSession *ss)
@@ -279,12 +260,12 @@ void free_sculptsession(Object *ob)
{
if (ob && ob->sculpt) {
SculptSession *ss = ob->sculpt;
- DerivedMesh *dm= ob->derivedFinal;
+ DerivedMesh *dm = ob->derivedFinal;
if (ss->pbvh)
BLI_pbvh_free(ss->pbvh);
if (dm && dm->getPBVH)
- dm->getPBVH(NULL, dm); /* signal to clear */
+ dm->getPBVH(NULL, dm); /* signal to clear */
if (ss->texcache)
MEM_freeN(ss->texcache);
@@ -307,44 +288,44 @@ void free_sculptsession(Object *ob)
/* do not free object itself */
-void free_object(Object *ob)
+void BKE_object_free(Object *ob)
{
int a;
- object_free_display(ob);
+ BKE_object_free_display(ob);
/* disconnect specific data */
if (ob->data) {
- ID *id= ob->data;
+ ID *id = ob->data;
id->us--;
- if (id->us==0) {
- if (ob->type==OB_MESH) unlink_mesh(ob->data);
- else if (ob->type==OB_CURVE) unlink_curve(ob->data);
- else if (ob->type==OB_MBALL) unlink_mball(ob->data);
+ if (id->us == 0) {
+ if (ob->type == OB_MESH) BKE_mesh_unlink(ob->data);
+ else if (ob->type == OB_CURVE) BKE_curve_unlink(ob->data);
+ else if (ob->type == OB_MBALL) BKE_mball_unlink(ob->data);
}
- ob->data= NULL;
+ ob->data = NULL;
}
- for (a=0; a<ob->totcol; a++) {
+ for (a = 0; a < ob->totcol; a++) {
if (ob->mat[a]) ob->mat[a]->id.us--;
}
if (ob->mat) MEM_freeN(ob->mat);
if (ob->matbits) MEM_freeN(ob->matbits);
- ob->mat= NULL;
- ob->matbits= NULL;
+ ob->mat = NULL;
+ ob->matbits = NULL;
if (ob->bb) MEM_freeN(ob->bb);
- ob->bb= NULL;
+ ob->bb = NULL;
if (ob->adt) BKE_free_animdata((ID *)ob);
if (ob->poselib) ob->poselib->id.us--;
if (ob->gpd) ((ID *)ob->gpd)->us--;
if (ob->defbase.first)
BLI_freelistN(&ob->defbase);
if (ob->pose)
- free_pose(ob->pose);
+ BKE_pose_free(ob->pose);
if (ob->mpath)
animviz_free_motionpath(ob->mpath);
free_properties(&ob->prop);
- object_free_modifiers(ob);
+ BKE_object_free_modifiers(ob);
free_sensors(&ob->sensors);
free_controllers(&ob->controllers);
@@ -367,15 +348,15 @@ static void unlink_object__unlinkModifierLinks(void *userData, Object *ob, Objec
{
Object *unlinkOb = userData;
- if (*obpoin==unlinkOb) {
+ if (*obpoin == unlinkOb) {
*obpoin = NULL;
- ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME; // XXX: should this just be OB_RECALC_DATA?
+ ob->recalc |= OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME; // XXX: should this just be OB_RECALC_DATA?
}
}
-void unlink_object(Object *ob)
+void BKE_object_unlink(Object *ob)
{
- Main *bmain= G.main;
+ Main *bmain = G.main;
Object *obt;
Material *mat;
World *wrld;
@@ -397,55 +378,55 @@ void unlink_object(Object *ob)
/* check all objects: parents en bevels and fields, also from libraries */
// FIXME: need to check all animation blocks (drivers)
- obt= bmain->object.first;
+ obt = bmain->object.first;
while (obt) {
- if (obt->proxy==ob)
- obt->proxy= NULL;
- if (obt->proxy_from==ob) {
- obt->proxy_from= NULL;
+ if (obt->proxy == ob)
+ obt->proxy = NULL;
+ if (obt->proxy_from == ob) {
+ obt->proxy_from = NULL;
obt->recalc |= OB_RECALC_OB;
}
- if (obt->proxy_group==ob)
- obt->proxy_group= NULL;
+ if (obt->proxy_group == ob)
+ obt->proxy_group = NULL;
- if (obt->parent==ob) {
- obt->parent= NULL;
- obt->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
+ if (obt->parent == ob) {
+ obt->parent = NULL;
+ obt->recalc |= OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME;
}
modifiers_foreachObjectLink(obt, unlink_object__unlinkModifierLinks, ob);
if (ELEM(obt->type, OB_CURVE, OB_FONT)) {
- cu= obt->data;
+ cu = obt->data;
- if (cu->bevobj==ob) {
- cu->bevobj= NULL;
- obt->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
+ if (cu->bevobj == ob) {
+ cu->bevobj = NULL;
+ obt->recalc |= OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME;
}
- if (cu->taperobj==ob) {
- cu->taperobj= NULL;
- obt->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
+ if (cu->taperobj == ob) {
+ cu->taperobj = NULL;
+ obt->recalc |= OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME;
}
- if (cu->textoncurve==ob) {
- cu->textoncurve= NULL;
- obt->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
+ if (cu->textoncurve == ob) {
+ cu->textoncurve = NULL;
+ obt->recalc |= OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME;
}
}
- else if (obt->type==OB_ARMATURE && obt->pose) {
+ else if (obt->type == OB_ARMATURE && obt->pose) {
bPoseChannel *pchan;
- for (pchan= obt->pose->chanbase.first; pchan; pchan= pchan->next) {
- for (con = pchan->constraints.first; con; con=con->next) {
- bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
+ for (pchan = obt->pose->chanbase.first; pchan; pchan = pchan->next) {
+ for (con = pchan->constraints.first; con; con = con->next) {
+ bConstraintTypeInfo *cti = constraint_get_typeinfo(con);
ListBase targets = {NULL, NULL};
bConstraintTarget *ct;
if (cti && cti->get_constraint_targets) {
cti->get_constraint_targets(con, &targets);
- for (ct= targets.first; ct; ct= ct->next) {
+ for (ct = targets.first; ct; ct = ct->next) {
if (ct->tar == ob) {
ct->tar = NULL;
- ct->subtarget[0]= '\0';
+ ct->subtarget[0] = '\0';
obt->recalc |= OB_RECALC_DATA;
}
}
@@ -454,29 +435,29 @@ void unlink_object(Object *ob)
cti->flush_constraint_targets(con, &targets, 0);
}
}
- if (pchan->custom==ob)
- pchan->custom= NULL;
+ if (pchan->custom == ob)
+ pchan->custom = NULL;
}
}
else if (ELEM(OB_MBALL, ob->type, obt->type)) {
- if (is_mball_basis_for (obt, ob))
- obt->recalc|= OB_RECALC_DATA;
+ if (BKE_mball_is_basis_for(obt, ob))
+ obt->recalc |= OB_RECALC_DATA;
}
sca_remove_ob_poin(obt, ob);
- for (con = obt->constraints.first; con; con=con->next) {
- bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
+ for (con = obt->constraints.first; con; con = con->next) {
+ bConstraintTypeInfo *cti = constraint_get_typeinfo(con);
ListBase targets = {NULL, NULL};
bConstraintTarget *ct;
if (cti && cti->get_constraint_targets) {
cti->get_constraint_targets(con, &targets);
- for (ct= targets.first; ct; ct= ct->next) {
+ for (ct = targets.first; ct; ct = ct->next) {
if (ct->tar == ob) {
ct->tar = NULL;
- ct->subtarget[0]= '\0';
+ ct->subtarget[0] = '\0';
obt->recalc |= OB_RECALC_DATA;
}
}
@@ -492,73 +473,73 @@ void unlink_object(Object *ob)
obt->recalc |= OB_RECALC_DATA;
/* cloth */
- for (md=obt->modifiers.first; md; md=md->next)
+ for (md = obt->modifiers.first; md; md = md->next)
if (md->type == eModifierType_Cloth)
obt->recalc |= OB_RECALC_DATA;
}
/* strips */
#if 0 // XXX old animation system
- for (strip= obt->nlastrips.first; strip; strip= strip->next) {
- if (strip->object==ob)
- strip->object= NULL;
+ for (strip = obt->nlastrips.first; strip; strip = strip->next) {
+ if (strip->object == ob)
+ strip->object = NULL;
if (strip->modifiers.first) {
bActionModifier *amod;
- for (amod= strip->modifiers.first; amod; amod= amod->next)
- if (amod->ob==ob)
- amod->ob= NULL;
+ for (amod = strip->modifiers.first; amod; amod = amod->next)
+ if (amod->ob == ob)
+ amod->ob = NULL;
}
}
#endif // XXX old animation system
/* particle systems */
if (obt->particlesystem.first) {
- ParticleSystem *tpsys= obt->particlesystem.first;
- for (; tpsys; tpsys=tpsys->next) {
+ ParticleSystem *tpsys = obt->particlesystem.first;
+ for (; tpsys; tpsys = tpsys->next) {
BoidState *state = NULL;
BoidRule *rule = NULL;
ParticleTarget *pt = tpsys->targets.first;
- for (; pt; pt=pt->next) {
- if (pt->ob==ob) {
+ for (; pt; pt = pt->next) {
+ if (pt->ob == ob) {
pt->ob = NULL;
obt->recalc |= OB_RECALC_DATA;
break;
}
}
- if (tpsys->target_ob==ob) {
- tpsys->target_ob= NULL;
+ if (tpsys->target_ob == ob) {
+ tpsys->target_ob = NULL;
obt->recalc |= OB_RECALC_DATA;
}
- if (tpsys->part->dup_ob==ob)
- tpsys->part->dup_ob= NULL;
+ if (tpsys->part->dup_ob == ob)
+ tpsys->part->dup_ob = NULL;
- if (tpsys->part->phystype==PART_PHYS_BOIDS) {
+ if (tpsys->part->phystype == PART_PHYS_BOIDS) {
ParticleData *pa;
BoidParticle *bpa;
int p;
- for (p=0,pa=tpsys->particles; p<tpsys->totpart; p++,pa++) {
+ for (p = 0, pa = tpsys->particles; p < tpsys->totpart; p++, pa++) {
bpa = pa->boid;
if (bpa->ground == ob)
bpa->ground = NULL;
}
}
if (tpsys->part->boids) {
- for (state = tpsys->part->boids->states.first; state; state=state->next) {
- for (rule = state->rules.first; rule; rule=rule->next) {
- if (rule->type==eBoidRuleType_Avoid) {
- BoidRuleGoalAvoid *gabr = (BoidRuleGoalAvoid*)rule;
- if (gabr->ob==ob)
- gabr->ob= NULL;
+ for (state = tpsys->part->boids->states.first; state; state = state->next) {
+ for (rule = state->rules.first; rule; rule = rule->next) {
+ if (rule->type == eBoidRuleType_Avoid) {
+ BoidRuleGoalAvoid *gabr = (BoidRuleGoalAvoid *)rule;
+ if (gabr->ob == ob)
+ gabr->ob = NULL;
}
- else if (rule->type==eBoidRuleType_FollowLeader) {
- BoidRuleFollowLeader *flbr = (BoidRuleFollowLeader*)rule;
- if (flbr->ob==ob)
- flbr->ob= NULL;
+ else if (rule->type == eBoidRuleType_FollowLeader) {
+ BoidRuleFollowLeader *flbr = (BoidRuleFollowLeader *)rule;
+ if (flbr->ob == ob)
+ flbr->ob = NULL;
}
}
}
@@ -568,84 +549,86 @@ void unlink_object(Object *ob)
obt->recalc |= OB_RECALC_DATA;
}
- obt= obt->id.next;
+ obt = obt->id.next;
}
/* materials */
- mat= bmain->mat.first;
+ mat = bmain->mat.first;
while (mat) {
- for (a=0; a<MAX_MTEX; a++) {
- if (mat->mtex[a] && ob==mat->mtex[a]->object) {
+ for (a = 0; a < MAX_MTEX; a++) {
+ if (mat->mtex[a] && ob == mat->mtex[a]->object) {
/* actually, test for lib here... to do */
- mat->mtex[a]->object= NULL;
+ mat->mtex[a]->object = NULL;
}
}
- mat= mat->id.next;
+ mat = mat->id.next;
}
/* textures */
- for (tex= bmain->tex.first; tex; tex= tex->id.next) {
- if (tex->env && (ob==tex->env->object)) tex->env->object= NULL;
- if (tex->pd && (ob==tex->pd->object)) tex->pd->object= NULL;
- if (tex->vd && (ob==tex->vd->object)) tex->vd->object= NULL;
+ for (tex = bmain->tex.first; tex; tex = tex->id.next) {
+ if (tex->env && (ob == tex->env->object)) tex->env->object = NULL;
+ if (tex->pd && (ob == tex->pd->object)) tex->pd->object = NULL;
+ if (tex->vd && (ob == tex->vd->object)) tex->vd->object = NULL;
}
/* worlds */
- wrld= bmain->world.first;
+ wrld = bmain->world.first;
while (wrld) {
- if (wrld->id.lib==NULL) {
- for (a=0; a<MAX_MTEX; a++) {
- if (wrld->mtex[a] && ob==wrld->mtex[a]->object)
- wrld->mtex[a]->object= NULL;
+ if (wrld->id.lib == NULL) {
+ for (a = 0; a < MAX_MTEX; a++) {
+ if (wrld->mtex[a] && ob == wrld->mtex[a]->object)
+ wrld->mtex[a]->object = NULL;
}
}
- wrld= wrld->id.next;
+ wrld = wrld->id.next;
}
/* scenes */
- sce= bmain->scene.first;
+ sce = bmain->scene.first;
while (sce) {
- if (sce->id.lib==NULL) {
- if (sce->camera==ob) sce->camera= NULL;
- if (sce->toolsettings->skgen_template==ob) sce->toolsettings->skgen_template = NULL;
- if (sce->toolsettings->particle.object==ob) sce->toolsettings->particle.object= NULL;
+ if (sce->id.lib == NULL) {
+ if (sce->camera == ob) sce->camera = NULL;
+ if (sce->toolsettings->skgen_template == ob) sce->toolsettings->skgen_template = NULL;
+ if (sce->toolsettings->particle.object == ob) sce->toolsettings->particle.object = NULL;
#ifdef DURIAN_CAMERA_SWITCH
{
TimeMarker *m;
- for (m= sce->markers.first; m; m= m->next) {
- if (m->camera==ob)
- m->camera= NULL;
+ for (m = sce->markers.first; m; m = m->next) {
+ if (m->camera == ob)
+ m->camera = NULL;
}
}
#endif
if (sce->ed) {
Sequence *seq;
SEQ_BEGIN(sce->ed, seq)
- if (seq->scene_camera==ob) {
- seq->scene_camera= NULL;
+ {
+ if (seq->scene_camera == ob) {
+ seq->scene_camera = NULL;
}
+ }
SEQ_END
}
}
- sce= sce->id.next;
+ sce = sce->id.next;
}
/* screens */
- sc= bmain->screen.first;
+ sc = bmain->screen.first;
while (sc) {
- ScrArea *sa= sc->areabase.first;
+ ScrArea *sa = sc->areabase.first;
while (sa) {
SpaceLink *sl;
- for (sl= sa->spacedata.first; sl; sl= sl->next) {
- if (sl->spacetype==SPACE_VIEW3D) {
- View3D *v3d= (View3D*) sl;
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_VIEW3D) {
+ View3D *v3d = (View3D *) sl;
/* found doesn't need to be set here */
if (v3d->ob_centre == ob) {
@@ -657,153 +640,156 @@ void unlink_object(Object *ob)
v3d->localvd->ob_centre_bone[0] = '\0';
}
- found= 0;
- if (v3d->camera==ob) {
- v3d->camera= NULL;
- found= 1;
+ found = 0;
+ if (v3d->camera == ob) {
+ v3d->camera = NULL;
+ found = 1;
}
- if (v3d->localvd && v3d->localvd->camera==ob ) {
- v3d->localvd->camera= NULL;
+ if (v3d->localvd && v3d->localvd->camera == ob) {
+ v3d->localvd->camera = NULL;
found += 2;
}
if (found) {
if (sa->spacetype == SPACE_VIEW3D) {
- for (ar= sa->regionbase.first; ar; ar= ar->next) {
- if (ar->regiontype==RGN_TYPE_WINDOW) {
- rv3d= (RegionView3D *)ar->regiondata;
+ for (ar = sa->regionbase.first; ar; ar = ar->next) {
+ if (ar->regiontype == RGN_TYPE_WINDOW) {
+ rv3d = (RegionView3D *)ar->regiondata;
if (found == 1 || found == 3) {
if (rv3d->persp == RV3D_CAMOB)
- rv3d->persp= RV3D_PERSP;
+ rv3d->persp = RV3D_PERSP;
}
if (found == 2 || found == 3) {
if (rv3d->localvd && rv3d->localvd->persp == RV3D_CAMOB)
- rv3d->localvd->persp= RV3D_PERSP;
+ rv3d->localvd->persp = RV3D_PERSP;
}
}
}
}
}
}
- else if (sl->spacetype==SPACE_OUTLINER) {
- SpaceOops *so= (SpaceOops *)sl;
+ else if (sl->spacetype == SPACE_OUTLINER) {
+ SpaceOops *so = (SpaceOops *)sl;
if (so->treestore) {
- TreeStoreElem *tselem= so->treestore->data;
+ TreeStoreElem *tselem = so->treestore->data;
int a;
- for (a=0; a<so->treestore->usedelem; a++, tselem++) {
- if (tselem->id==(ID *)ob) tselem->id= NULL;
+ for (a = 0; a < so->treestore->usedelem; a++, tselem++) {
+ if (tselem->id == (ID *)ob) tselem->id = NULL;
}
}
}
- else if (sl->spacetype==SPACE_BUTS) {
- SpaceButs *sbuts= (SpaceButs *)sl;
+ else if (sl->spacetype == SPACE_BUTS) {
+ SpaceButs *sbuts = (SpaceButs *)sl;
- if (sbuts->pinid==(ID *)ob) {
- sbuts->flag&= ~SB_PIN_CONTEXT;
- sbuts->pinid= NULL;
+ if (sbuts->pinid == (ID *)ob) {
+ sbuts->flag &= ~SB_PIN_CONTEXT;
+ sbuts->pinid = NULL;
}
}
}
- sa= sa->next;
+ sa = sa->next;
}
- sc= sc->id.next;
+ sc = sc->id.next;
}
/* groups */
- group= bmain->group.first;
+ group = bmain->group.first;
while (group) {
rem_from_group(group, ob, NULL, NULL);
- group= group->id.next;
+ group = group->id.next;
}
/* cameras */
- camera= bmain->camera.first;
+ camera = bmain->camera.first;
while (camera) {
- if (camera->dof_ob==ob) {
+ if (camera->dof_ob == ob) {
camera->dof_ob = NULL;
}
- camera= camera->id.next;
+ camera = camera->id.next;
}
}
-int exist_object(Object *obtest)
+int BKE_object_exists_check(Object *obtest)
{
Object *ob;
- if (obtest==NULL) return 0;
+ if (obtest == NULL) return 0;
- ob= G.main->object.first;
+ ob = G.main->object.first;
while (ob) {
- if (ob==obtest) return 1;
- ob= ob->id.next;
+ if (ob == obtest) return 1;
+ ob = ob->id.next;
}
return 0;
}
/* *************************************************** */
-static void *add_obdata_from_type(int type)
+void *BKE_object_obdata_add_from_type(int type)
{
switch (type) {
- case OB_MESH: return add_mesh("Mesh");
- case OB_CURVE: return add_curve("Curve", OB_CURVE);
- case OB_SURF: return add_curve("Surf", OB_SURF);
- case OB_FONT: return add_curve("Text", OB_FONT);
- case OB_MBALL: return add_mball("Meta");
- case OB_CAMERA: return add_camera("Camera");
- case OB_LAMP: return add_lamp("Lamp");
- case OB_LATTICE: return add_lattice("Lattice");
- case OB_ARMATURE: return add_armature("Armature");
- case OB_SPEAKER: return add_speaker("Speaker");
- case OB_EMPTY: return NULL;
- default:
- printf("add_obdata_from_type: Internal error, bad type: %d\n", type);
- return NULL;
+ case OB_MESH: return BKE_mesh_add("Mesh");
+ case OB_CURVE: return BKE_curve_add("Curve", OB_CURVE);
+ case OB_SURF: return BKE_curve_add("Surf", OB_SURF);
+ case OB_FONT: return BKE_curve_add("Text", OB_FONT);
+ case OB_MBALL: return BKE_mball_add("Meta");
+ case OB_CAMERA: return BKE_camera_add("Camera");
+ case OB_LAMP: return BKE_lamp_add("Lamp");
+ case OB_LATTICE: return BKE_lattice_add("Lattice");
+ case OB_ARMATURE: return BKE_armature_add("Armature");
+ case OB_SPEAKER: return BKE_speaker_add("Speaker");
+ case OB_EMPTY: return NULL;
+ default:
+ printf("BKE_object_obdata_add_from_type: Internal error, bad type: %d\n", type);
+ return NULL;
}
}
static const char *get_obdata_defname(int type)
{
switch (type) {
- case OB_MESH: return "Mesh";
- case OB_CURVE: return "Curve";
- case OB_SURF: return "Surf";
- case OB_FONT: return "Text";
- case OB_MBALL: return "Mball";
- case OB_CAMERA: return "Camera";
- case OB_LAMP: return "Lamp";
- case OB_LATTICE: return "Lattice";
- case OB_ARMATURE: return "Armature";
- case OB_SPEAKER: return "Speaker";
- case OB_EMPTY: return "Empty";
- default:
- printf("get_obdata_defname: Internal error, bad type: %d\n", type);
- return "Empty";
+ case OB_MESH: return "Mesh";
+ case OB_CURVE: return "Curve";
+ case OB_SURF: return "Surf";
+ case OB_FONT: return "Text";
+ case OB_MBALL: return "Mball";
+ case OB_CAMERA: return "Camera";
+ case OB_LAMP: return "Lamp";
+ case OB_LATTICE: return "Lattice";
+ case OB_ARMATURE: return "Armature";
+ case OB_SPEAKER: return "Speaker";
+ case OB_EMPTY: return "Empty";
+ default:
+ printf("get_obdata_defname: Internal error, bad type: %d\n", type);
+ return "Empty";
}
}
/* more general add: creates minimum required data, but without vertices etc. */
-Object *add_only_object(int type, const char *name)
+Object *BKE_object_add_only_object(int type, const char *name)
{
Object *ob;
- ob= alloc_libblock(&G.main->object, ID_OB, name);
+ if (!name)
+ name = get_obdata_defname(type);
+
+ ob = BKE_libblock_alloc(&G.main->object, ID_OB, name);
/* default object vars */
- ob->type= type;
+ ob->type = type;
- ob->col[0]= ob->col[1]= ob->col[2]= 1.0;
- ob->col[3]= 1.0;
+ ob->col[0] = ob->col[1] = ob->col[2] = 1.0;
+ ob->col[3] = 1.0;
- ob->size[0]= ob->size[1]= ob->size[2]= 1.0;
- ob->dscale[0]= ob->dscale[1]= ob->dscale[2]= 1.0;
+ ob->size[0] = ob->size[1] = ob->size[2] = 1.0;
+ ob->dscale[0] = ob->dscale[1] = ob->dscale[2] = 1.0;
/* objects should default to having Euler XYZ rotations,
* but rotations default to quaternions
*/
- ob->rotmode= ROT_MODE_EUL;
+ ob->rotmode = ROT_MODE_EUL;
unit_axis_angle(ob->rotAxis, &ob->rotAngle);
unit_axis_angle(ob->drotAxis, &ob->drotAngle);
@@ -817,35 +803,35 @@ Object *add_only_object(int type, const char *name)
unit_m4(ob->constinv);
unit_m4(ob->parentinv);
unit_m4(ob->obmat);
- ob->dt= OB_TEXTURE;
- ob->empty_drawtype= OB_PLAINAXES;
- ob->empty_drawsize= 1.0;
+ ob->dt = OB_TEXTURE;
+ ob->empty_drawtype = OB_PLAINAXES;
+ ob->empty_drawsize = 1.0;
- if (type==OB_CAMERA || type==OB_LAMP || type==OB_SPEAKER) {
- ob->trackflag= OB_NEGZ;
- ob->upflag= OB_POSY;
+ if (type == OB_CAMERA || type == OB_LAMP || type == OB_SPEAKER) {
+ ob->trackflag = OB_NEGZ;
+ ob->upflag = OB_POSY;
}
else {
- ob->trackflag= OB_POSY;
- ob->upflag= OB_POSZ;
+ ob->trackflag = OB_POSY;
+ ob->upflag = OB_POSZ;
}
- ob->dupon= 1; ob->dupoff= 0;
- ob->dupsta= 1; ob->dupend= 100;
+ ob->dupon = 1; ob->dupoff = 0;
+ ob->dupsta = 1; ob->dupend = 100;
ob->dupfacesca = 1.0;
/* Game engine defaults*/
- ob->mass= ob->inertia= 1.0f;
- ob->formfactor= 0.4f;
- ob->damping= 0.04f;
- ob->rdamping= 0.1f;
+ ob->mass = ob->inertia = 1.0f;
+ ob->formfactor = 0.4f;
+ ob->damping = 0.04f;
+ ob->rdamping = 0.1f;
ob->anisotropicFriction[0] = 1.0f;
ob->anisotropicFriction[1] = 1.0f;
ob->anisotropicFriction[2] = 1.0f;
- ob->gameflag= OB_PROP|OB_COLLISION;
+ ob->gameflag = OB_PROP | OB_COLLISION;
ob->margin = 0.0;
- ob->init_state=1;
- ob->state=1;
+ ob->init_state = 1;
+ ob->state = 1;
/* ob->pad3 == Contact Processing Threshold */
ob->m_contactProcessingThreshold = 1.0f;
ob->obstacleRad = 1.0f;
@@ -863,22 +849,23 @@ Object *add_only_object(int type, const char *name)
/* general add: to scene, with layer from area and default name */
/* creates minimum required data, but without vertices etc. */
-Object *add_object(struct Scene *scene, int type)
+Object *BKE_object_add(struct Scene *scene, int type)
{
Object *ob;
Base *base;
char name[MAX_ID_NAME];
BLI_strncpy(name, get_obdata_defname(type), sizeof(name));
- ob = add_only_object(type, name);
+ ob = BKE_object_add_only_object(type, name);
- ob->data= add_obdata_from_type(type);
+ ob->data = BKE_object_obdata_add_from_type(type);
- ob->lay= scene->lay;
+ ob->lay = scene->lay;
- base= scene_add_base(scene, ob);
- scene_select_base(scene, base);
- ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
+ base = BKE_scene_base_add(scene, ob);
+ BKE_scene_base_deselect_all(scene);
+ BKE_scene_base_select(scene, base);
+ ob->recalc |= OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME;
return ob;
}
@@ -887,19 +874,19 @@ SoftBody *copy_softbody(SoftBody *sb)
{
SoftBody *sbn;
- if (sb==NULL) return(NULL);
+ if (sb == NULL) return(NULL);
- sbn= MEM_dupallocN(sb);
- sbn->totspring= sbn->totpoint= 0;
- sbn->bpoint= NULL;
- sbn->bspring= NULL;
+ sbn = MEM_dupallocN(sb);
+ sbn->totspring = sbn->totpoint = 0;
+ sbn->bpoint = NULL;
+ sbn->bspring = NULL;
- sbn->keys= NULL;
- sbn->totkey= sbn->totpointkey= 0;
+ sbn->keys = NULL;
+ sbn->totkey = sbn->totpointkey = 0;
- sbn->scratch= NULL;
+ sbn->scratch = NULL;
- sbn->pointcache= BKE_ptcache_copy_list(&sbn->ptcaches, &sb->ptcaches);
+ sbn->pointcache = BKE_ptcache_copy_list(&sbn->ptcaches, &sb->ptcaches);
if (sb->effector_weights)
sbn->effector_weights = MEM_dupallocN(sb->effector_weights);
@@ -924,12 +911,12 @@ static ParticleSystem *copy_particlesystem(ParticleSystem *psys)
ParticleData *pa;
int p;
- psysn= MEM_dupallocN(psys);
- psysn->particles= MEM_dupallocN(psys->particles);
- psysn->child= MEM_dupallocN(psys->child);
+ psysn = MEM_dupallocN(psys);
+ psysn->particles = MEM_dupallocN(psys->particles);
+ psysn->child = MEM_dupallocN(psys->child);
if (psys->part->type == PART_HAIR) {
- for (p=0, pa=psysn->particles; p<psysn->totpart; p++, pa++)
+ for (p = 0, pa = psysn->particles; p < psysn->totpart; p++, pa++)
pa->hair = MEM_dupallocN(pa->hair);
}
@@ -943,7 +930,7 @@ static ParticleSystem *copy_particlesystem(ParticleSystem *psys)
if (boid)
boid = MEM_dupallocN(boid);
- for (p=0, pa=psysn->particles; p<psysn->totpart; p++, pa++) {
+ for (p = 0, pa = psysn->particles; p < psysn->totpart; p++, pa++) {
if (boid)
pa->boid = boid++;
if (key) {
@@ -955,29 +942,29 @@ static ParticleSystem *copy_particlesystem(ParticleSystem *psys)
if (psys->clmd) {
psysn->clmd = (ClothModifierData *)modifier_new(eModifierType_Cloth);
- modifier_copyData((ModifierData*)psys->clmd, (ModifierData*)psysn->clmd);
+ modifier_copyData((ModifierData *)psys->clmd, (ModifierData *)psysn->clmd);
psys->hair_in_dm = psys->hair_out_dm = NULL;
}
BLI_duplicatelist(&psysn->targets, &psys->targets);
- psysn->pathcache= NULL;
- psysn->childcache= NULL;
- psysn->edit= NULL;
- psysn->frand= NULL;
- psysn->pdd= NULL;
- psysn->effectors= NULL;
+ psysn->pathcache = NULL;
+ psysn->childcache = NULL;
+ psysn->edit = NULL;
+ psysn->frand = NULL;
+ psysn->pdd = NULL;
+ psysn->effectors = NULL;
psysn->pathcachebufs.first = psysn->pathcachebufs.last = NULL;
psysn->childcachebufs.first = psysn->childcachebufs.last = NULL;
psysn->renderdata = NULL;
- psysn->pointcache= BKE_ptcache_copy_list(&psysn->ptcaches, &psys->ptcaches);
+ psysn->pointcache = BKE_ptcache_copy_list(&psysn->ptcaches, &psys->ptcaches);
/* XXX - from reading existing code this seems correct but intended usage of
* pointcache should /w cloth should be added in 'ParticleSystem' - campbell */
if (psysn->clmd) {
- psysn->clmd->point_cache= psysn->pointcache;
+ psysn->clmd->point_cache = psysn->pointcache;
}
id_us_plus((ID *)psysn->part);
@@ -985,7 +972,7 @@ static ParticleSystem *copy_particlesystem(ParticleSystem *psys)
return psysn;
}
-void copy_object_particlesystems(Object *obn, Object *ob)
+void BKE_object_copy_particlesystems(Object *obn, Object *ob)
{
ParticleSystem *psys, *npsys;
ModifierData *md;
@@ -995,34 +982,34 @@ void copy_object_particlesystems(Object *obn, Object *ob)
return;
}
- obn->particlesystem.first= obn->particlesystem.last= NULL;
- for (psys=ob->particlesystem.first; psys; psys=psys->next) {
- npsys= copy_particlesystem(psys);
+ obn->particlesystem.first = obn->particlesystem.last = NULL;
+ for (psys = ob->particlesystem.first; psys; psys = psys->next) {
+ npsys = copy_particlesystem(psys);
BLI_addtail(&obn->particlesystem, npsys);
/* need to update particle modifiers too */
- for (md=obn->modifiers.first; md; md=md->next) {
- if (md->type==eModifierType_ParticleSystem) {
- ParticleSystemModifierData *psmd= (ParticleSystemModifierData*)md;
- if (psmd->psys==psys)
- psmd->psys= npsys;
+ for (md = obn->modifiers.first; md; md = md->next) {
+ if (md->type == eModifierType_ParticleSystem) {
+ ParticleSystemModifierData *psmd = (ParticleSystemModifierData *)md;
+ if (psmd->psys == psys)
+ psmd->psys = npsys;
}
- else if (md->type==eModifierType_DynamicPaint) {
- DynamicPaintModifierData *pmd= (DynamicPaintModifierData*)md;
+ else if (md->type == eModifierType_DynamicPaint) {
+ DynamicPaintModifierData *pmd = (DynamicPaintModifierData *)md;
if (pmd->brush) {
- if (pmd->brush->psys==psys) {
- pmd->brush->psys= npsys;
+ if (pmd->brush->psys == psys) {
+ pmd->brush->psys = npsys;
}
}
}
- else if (md->type==eModifierType_Smoke) {
- SmokeModifierData *smd = (SmokeModifierData*) md;
+ else if (md->type == eModifierType_Smoke) {
+ SmokeModifierData *smd = (SmokeModifierData *) md;
- if (smd->type==MOD_SMOKE_TYPE_FLOW) {
+ if (smd->type == MOD_SMOKE_TYPE_FLOW) {
if (smd->flow) {
if (smd->flow->psys == psys)
- smd->flow->psys= npsys;
+ smd->flow->psys = npsys;
}
}
}
@@ -1030,34 +1017,34 @@ void copy_object_particlesystems(Object *obn, Object *ob)
}
}
-void copy_object_softbody(Object *obn, Object *ob)
+void BKE_object_copy_softbody(Object *obn, Object *ob)
{
if (ob->soft)
- obn->soft= copy_softbody(ob->soft);
+ obn->soft = copy_softbody(ob->soft);
}
static void copy_object_pose(Object *obn, Object *ob)
{
bPoseChannel *chan;
- /* note: need to clear obn->pose pointer first, so that copy_pose works (otherwise there's a crash) */
- obn->pose= NULL;
- copy_pose(&obn->pose, ob->pose, 1); /* 1 = copy constraints */
+ /* note: need to clear obn->pose pointer first, so that BKE_pose_copy_data works (otherwise there's a crash) */
+ obn->pose = NULL;
+ BKE_pose_copy_data(&obn->pose, ob->pose, 1); /* 1 = copy constraints */
- for (chan = obn->pose->chanbase.first; chan; chan=chan->next) {
+ for (chan = obn->pose->chanbase.first; chan; chan = chan->next) {
bConstraint *con;
- chan->flag &= ~(POSE_LOC|POSE_ROT|POSE_SIZE);
+ chan->flag &= ~(POSE_LOC | POSE_ROT | POSE_SIZE);
- for (con= chan->constraints.first; con; con= con->next) {
- bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
+ for (con = chan->constraints.first; con; con = con->next) {
+ bConstraintTypeInfo *cti = constraint_get_typeinfo(con);
ListBase targets = {NULL, NULL};
bConstraintTarget *ct;
if (cti && cti->get_constraint_targets) {
cti->get_constraint_targets(con, &targets);
- for (ct= targets.first; ct; ct= ct->next) {
+ for (ct = targets.first; ct; ct = ct->next) {
if (ct->tar == ob)
ct->tar = obn;
}
@@ -1071,11 +1058,11 @@ static void copy_object_pose(Object *obn, Object *ob)
static int object_pose_context(Object *ob)
{
- if ( (ob) &&
- (ob->type == OB_ARMATURE) &&
- (ob->pose) &&
- (ob->mode & OB_MODE_POSE)
- ) {
+ if ( (ob) &&
+ (ob->type == OB_ARMATURE) &&
+ (ob->pose) &&
+ (ob->mode & OB_MODE_POSE))
+ {
return 1;
}
else {
@@ -1083,15 +1070,15 @@ static int object_pose_context(Object *ob)
}
}
-Object *object_pose_armature_get(Object *ob)
+Object *BKE_object_pose_armature_get(Object *ob)
{
- if (ob==NULL)
+ if (ob == NULL)
return NULL;
if (object_pose_context(ob))
return ob;
- ob= modifiers_isDeformedByArmature(ob);
+ ob = modifiers_isDeformedByArmature(ob);
if (object_pose_context(ob))
return ob;
@@ -1105,31 +1092,31 @@ static void copy_object_transform(Object *ob_tar, Object *ob_src)
copy_v3_v3(ob_tar->rot, ob_src->rot);
copy_v3_v3(ob_tar->quat, ob_src->quat);
copy_v3_v3(ob_tar->rotAxis, ob_src->rotAxis);
- ob_tar->rotAngle= ob_src->rotAngle;
- ob_tar->rotmode= ob_src->rotmode;
+ ob_tar->rotAngle = ob_src->rotAngle;
+ ob_tar->rotmode = ob_src->rotmode;
copy_v3_v3(ob_tar->size, ob_src->size);
}
-Object *copy_object(Object *ob)
+Object *BKE_object_copy(Object *ob)
{
Object *obn;
ModifierData *md;
int a;
- obn= copy_libblock(&ob->id);
+ obn = BKE_libblock_copy(&ob->id);
if (ob->totcol) {
- obn->mat= MEM_dupallocN(ob->mat);
- obn->matbits= MEM_dupallocN(ob->matbits);
- obn->totcol= ob->totcol;
+ obn->mat = MEM_dupallocN(ob->mat);
+ obn->matbits = MEM_dupallocN(ob->matbits);
+ obn->totcol = ob->totcol;
}
- if (ob->bb) obn->bb= MEM_dupallocN(ob->bb);
+ if (ob->bb) obn->bb = MEM_dupallocN(ob->bb);
obn->flag &= ~OB_FROMGROUP;
- obn->modifiers.first = obn->modifiers.last= NULL;
+ obn->modifiers.first = obn->modifiers.last = NULL;
- for (md=ob->modifiers.first; md; md=md->next) {
+ for (md = ob->modifiers.first; md; md = md->next) {
ModifierData *nmd = modifier_new(md->type);
BLI_strncpy(nmd->name, md->name, sizeof(nmd->name));
modifier_copyData(md, nmd);
@@ -1146,8 +1133,8 @@ Object *copy_object(Object *ob)
if (ob->pose) {
copy_object_pose(obn, ob);
/* backwards compat... non-armatures can get poses in older files? */
- if (ob->type==OB_ARMATURE)
- armature_rebuild_pose(obn, obn->data);
+ if (ob->type == OB_ARMATURE)
+ BKE_pose_rebuild(obn, obn->data);
}
defgroup_copy_list(&obn->defbase, &ob->defbase);
copy_constraints(&obn->constraints, &ob->constraints, TRUE);
@@ -1160,21 +1147,21 @@ Object *copy_object(Object *ob)
id_us_plus((ID *)obn->gpd);
id_lib_extern((ID *)obn->dup_group);
- for (a=0; a<obn->totcol; a++) id_us_plus((ID *)obn->mat[a]);
+ for (a = 0; a < obn->totcol; a++) id_us_plus((ID *)obn->mat[a]);
- obn->disp.first= obn->disp.last= NULL;
+ obn->disp.first = obn->disp.last = NULL;
if (ob->pd) {
- obn->pd= MEM_dupallocN(ob->pd);
+ obn->pd = MEM_dupallocN(ob->pd);
if (obn->pd->tex)
id_us_plus(&(obn->pd->tex->id));
if (obn->pd->rng)
obn->pd->rng = MEM_dupallocN(ob->pd->rng);
}
- obn->soft= copy_softbody(ob->soft);
+ obn->soft = copy_softbody(ob->soft);
obn->bsoft = copy_bulletsoftbody(ob->bsoft);
- copy_object_particlesystems(obn, ob);
+ BKE_object_copy_particlesystems(obn, ob);
obn->derivedDeform = NULL;
obn->derivedFinal = NULL;
@@ -1182,7 +1169,7 @@ Object *copy_object(Object *ob)
obn->gpulamp.first = obn->gpulamp.last = NULL;
obn->pc_ids.first = obn->pc_ids.last = NULL;
- obn->mpath= NULL;
+ obn->mpath = NULL;
return obn;
}
@@ -1198,35 +1185,35 @@ static void extern_local_object(Object *ob)
extern_local_matarar(ob->mat, ob->totcol);
- for (psys=ob->particlesystem.first; psys; psys=psys->next)
+ for (psys = ob->particlesystem.first; psys; psys = psys->next)
id_lib_extern((ID *)psys->part);
}
-void make_local_object(Object *ob)
+void BKE_object_make_local(Object *ob)
{
- Main *bmain= G.main;
+ Main *bmain = G.main;
Scene *sce;
Base *base;
- int is_local= FALSE, is_lib= FALSE;
+ int is_local = FALSE, is_lib = FALSE;
/* - only lib users: do nothing
* - only local users: set flag
* - mixed: make copy
*/
- if (ob->id.lib==NULL) return;
+ if (ob->id.lib == NULL) return;
- ob->proxy= ob->proxy_from= NULL;
+ ob->proxy = ob->proxy_from = NULL;
- if (ob->id.us==1) {
+ if (ob->id.us == 1) {
id_clear_lib_data(bmain, &ob->id);
extern_local_object(ob);
}
else {
- for (sce= bmain->scene.first; sce && ELEM(0, is_lib, is_local); sce= sce->id.next) {
- if (object_in_scene(ob, sce)) {
- if (sce->id.lib) is_lib= TRUE;
- else is_local= TRUE;
+ for (sce = bmain->scene.first; sce && ELEM(0, is_lib, is_local); sce = sce->id.next) {
+ if (BKE_scene_base_find(sce, ob)) {
+ if (sce->id.lib) is_lib = TRUE;
+ else is_local = TRUE;
}
}
@@ -1235,27 +1222,27 @@ void make_local_object(Object *ob)
extern_local_object(ob);
}
else if (is_local && is_lib) {
- Object *ob_new= copy_object(ob);
+ Object *ob_new = BKE_object_copy(ob);
- ob_new->id.us= 0;
+ ob_new->id.us = 0;
/* Remap paths of new ID using old library as base. */
BKE_id_lib_local_paths(bmain, ob->id.lib, &ob_new->id);
- sce= bmain->scene.first;
+ sce = bmain->scene.first;
while (sce) {
- if (sce->id.lib==NULL) {
- base= sce->base.first;
+ if (sce->id.lib == NULL) {
+ base = sce->base.first;
while (base) {
- if (base->object==ob) {
- base->object= ob_new;
+ if (base->object == ob) {
+ base->object = ob_new;
ob_new->id.us++;
ob->id.us--;
}
- base= base->next;
+ base = base->next;
}
}
- sce= sce->id.next;
+ sce = sce->id.next;
}
}
}
@@ -1264,7 +1251,7 @@ void make_local_object(Object *ob)
/*
* Returns true if the Object is a from an external blend file (libdata)
*/
-int object_is_libdata(Object *ob)
+int BKE_object_is_libdata(Object *ob)
{
if (!ob) return 0;
if (ob->proxy) return 0;
@@ -1273,12 +1260,12 @@ int object_is_libdata(Object *ob)
}
/* Returns true if the Object data is a from an external blend file (libdata) */
-int object_data_is_libdata(Object *ob)
+int BKE_object_obdata_is_libdata(Object *ob)
{
if (!ob) return 0;
- if (ob->proxy && (ob->data==NULL || ((ID *)ob->data)->lib==NULL)) return 0;
+ if (ob->proxy && (ob->data == NULL || ((ID *)ob->data)->lib == NULL)) return 0;
if (ob->id.lib) return 1;
- if (ob->data==NULL) return 0;
+ if (ob->data == NULL) return 0;
if (((ID *)ob->data)->lib) return 1;
return 0;
@@ -1289,45 +1276,45 @@ int object_data_is_libdata(Object *ob)
/* when you make proxy, ensure the exposed layers are extern */
static void armature_set_id_extern(Object *ob)
{
- bArmature *arm= ob->data;
+ bArmature *arm = ob->data;
bPoseChannel *pchan;
- unsigned int lay= arm->layer_protected;
+ unsigned int lay = arm->layer_protected;
- for (pchan = ob->pose->chanbase.first; pchan; pchan=pchan->next) {
+ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
if (!(pchan->bone->layer & lay))
id_lib_extern((ID *)pchan->custom);
}
}
-void object_copy_proxy_drivers(Object *ob, Object *target)
+void BKE_object_copy_proxy_drivers(Object *ob, Object *target)
{
if ((target->adt) && (target->adt->drivers.first)) {
FCurve *fcu;
/* add new animdata block */
if (!ob->adt)
- ob->adt= BKE_id_add_animdata(&ob->id);
+ ob->adt = BKE_id_add_animdata(&ob->id);
/* make a copy of all the drivers (for now), then correct any links that need fixing */
free_fcurves(&ob->adt->drivers);
copy_fcurves(&ob->adt->drivers, &target->adt->drivers);
- for (fcu= ob->adt->drivers.first; fcu; fcu= fcu->next) {
- ChannelDriver *driver= fcu->driver;
+ for (fcu = ob->adt->drivers.first; fcu; fcu = fcu->next) {
+ ChannelDriver *driver = fcu->driver;
DriverVar *dvar;
- for (dvar= driver->variables.first; dvar; dvar= dvar->next) {
+ for (dvar = driver->variables.first; dvar; dvar = dvar->next) {
/* all drivers */
DRIVER_TARGETS_LOOPER(dvar)
{
if (dtar->id) {
if ((Object *)dtar->id == target)
- dtar->id= (ID *)ob;
+ dtar->id = (ID *)ob;
else {
- /* only on local objects because this causes indirect links a -> b -> c,blend to point directly to a.blend
+ /* only on local objects because this causes indirect links a -> b -> c, blend to point directly to a.blend
* when a.blend has a proxy thats linked into c.blend */
- if (ob->id.lib==NULL)
+ if (ob->id.lib == NULL)
id_lib_extern((ID *)dtar->id);
}
}
@@ -1342,19 +1329,19 @@ void object_copy_proxy_drivers(Object *ob, Object *target)
/* local_object->proxy == pointer to library object, saved in files and read */
/* local_object->proxy_group == pointer to group dupli-object, saved in files and read */
-void object_make_proxy(Object *ob, Object *target, Object *gob)
+void BKE_object_make_proxy(Object *ob, Object *target, Object *gob)
{
/* paranoia checks */
- if (ob->id.lib || target->id.lib==NULL) {
+ if (ob->id.lib || target->id.lib == NULL) {
printf("cannot make proxy\n");
return;
}
- ob->proxy= target;
- ob->proxy_group= gob;
+ ob->proxy = target;
+ ob->proxy_group = gob;
id_lib_extern(&target->id);
- ob->recalc= target->recalc= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
+ ob->recalc = target->recalc = OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME;
/* copy transform
* - gob means this proxy comes from a group, just apply the matrix
@@ -1363,7 +1350,7 @@ void object_make_proxy(Object *ob, Object *target, Object *gob)
* - no gob means this is being made from a linked object,
* this is closer to making a copy of the object - in-place. */
if (gob) {
- ob->rotmode= target->rotmode;
+ ob->rotmode = target->rotmode;
mult_m4_m4m4(ob->obmat, gob->obmat, target->obmat);
if (gob->dup_group) { /* should always be true */
float tvec[3];
@@ -1371,40 +1358,40 @@ void object_make_proxy(Object *ob, Object *target, Object *gob)
mul_mat3_m4_v3(ob->obmat, tvec);
sub_v3_v3(ob->obmat[3], tvec);
}
- object_apply_mat4(ob, ob->obmat, FALSE, TRUE);
+ BKE_object_apply_mat4(ob, ob->obmat, FALSE, TRUE);
}
else {
copy_object_transform(ob, target);
- ob->parent= target->parent; /* libdata */
+ ob->parent = target->parent; /* libdata */
copy_m4_m4(ob->parentinv, target->parentinv);
}
/* copy animdata stuff - drivers only for now... */
- object_copy_proxy_drivers(ob, target);
+ BKE_object_copy_proxy_drivers(ob, target);
/* skip constraints? */
// FIXME: this is considered by many as a bug
/* set object type and link to data */
- ob->type= target->type;
- ob->data= target->data;
- id_us_plus((ID *)ob->data); /* ensures lib data becomes LIB_EXTERN */
+ ob->type = target->type;
+ ob->data = target->data;
+ id_us_plus((ID *)ob->data); /* ensures lib data becomes LIB_EXTERN */
/* copy material and index information */
- ob->actcol= ob->totcol= 0;
+ ob->actcol = ob->totcol = 0;
if (ob->mat) MEM_freeN(ob->mat);
if (ob->matbits) MEM_freeN(ob->matbits);
ob->mat = NULL;
- ob->matbits= NULL;
+ ob->matbits = NULL;
if ((target->totcol) && (target->mat) && OB_TYPE_SUPPORT_MATERIAL(ob->type)) {
int i;
- ob->actcol= target->actcol;
- ob->totcol= target->totcol;
+ ob->actcol = target->actcol;
+ ob->totcol = target->totcol;
ob->mat = MEM_dupallocN(target->mat);
ob->matbits = MEM_dupallocN(target->matbits);
- for (i=0; i<target->totcol; i++) {
+ for (i = 0; i < target->totcol; i++) {
/* don't need to run test_object_materials since we know this object is new and not used elsewhere */
id_us_plus((ID *)ob->mat[i]);
}
@@ -1412,9 +1399,9 @@ void object_make_proxy(Object *ob, Object *target, Object *gob)
/* type conversions */
if (target->type == OB_ARMATURE) {
- copy_object_pose(ob, target); /* data copy, object pointers in constraints */
- rest_pose(ob->pose); /* clear all transforms in channels */
- armature_rebuild_pose(ob, ob->data); /* set all internal links */
+ copy_object_pose(ob, target); /* data copy, object pointers in constraints */
+ BKE_pose_rest(ob->pose); /* clear all transforms in channels */
+ BKE_pose_rebuild(ob, ob->data); /* set all internal links */
armature_set_id_extern(ob);
}
@@ -1427,27 +1414,27 @@ void object_make_proxy(Object *ob, Object *target, Object *gob)
if (ob->id.properties) {
IDP_FreeProperty(ob->id.properties);
MEM_freeN(ob->id.properties);
- ob->id.properties= NULL;
+ ob->id.properties = NULL;
}
if (target->id.properties) {
- ob->id.properties= IDP_CopyProperty(target->id.properties);
+ ob->id.properties = IDP_CopyProperty(target->id.properties);
}
/* copy drawtype info */
- ob->dt= target->dt;
+ ob->dt = target->dt;
}
/* *************** CALC ****************** */
-void object_scale_to_mat3(Object *ob, float mat[][3])
+void BKE_object_scale_to_mat3(Object *ob, float mat[][3])
{
float vec[3];
mul_v3_v3v3(vec, ob->size, ob->dscale);
- size_to_mat3( mat,vec);
+ size_to_mat3(mat, vec);
}
-void object_rot_to_mat3(Object *ob, float mat[][3])
+void BKE_object_rot_to_mat3(Object *ob, float mat[][3])
{
float rmat[3][3], dmat[3][3];
@@ -1481,10 +1468,10 @@ void object_rot_to_mat3(Object *ob, float mat[][3])
mul_m3_m3m3(mat, dmat, rmat);
}
-void object_mat3_to_rot(Object *ob, float mat[][3], short use_compat)
+void BKE_object_mat3_to_rot(Object *ob, float mat[][3], short use_compat)
{
- switch(ob->rotmode) {
- case ROT_MODE_QUAT:
+ switch (ob->rotmode) {
+ case ROT_MODE_QUAT:
{
float dquat[4];
mat3_to_quat(ob->quat, mat);
@@ -1493,12 +1480,12 @@ void object_mat3_to_rot(Object *ob, float mat[][3], short use_compat)
mul_qt_qtqt(ob->quat, dquat, ob->quat);
}
break;
- case ROT_MODE_AXISANGLE:
- mat3_to_axis_angle(ob->rotAxis, &ob->rotAngle, mat);
- sub_v3_v3(ob->rotAxis, ob->drotAxis);
- ob->rotAngle -= ob->drotAngle;
- break;
- default: /* euler */
+ case ROT_MODE_AXISANGLE:
+ mat3_to_axis_angle(ob->rotAxis, &ob->rotAngle, mat);
+ sub_v3_v3(ob->rotAxis, ob->drotAxis);
+ ob->rotAngle -= ob->drotAngle;
+ break;
+ default: /* euler */
{
float quat[4];
float dquat[4];
@@ -1512,19 +1499,19 @@ void object_mat3_to_rot(Object *ob, float mat[][3], short use_compat)
quat_to_mat3(tmat, quat);
/* end drot correction */
- if (use_compat) mat3_to_compatible_eulO(ob->rot, ob->rot, ob->rotmode, tmat);
- else mat3_to_eulO(ob->rot, ob->rotmode, tmat);
+ if (use_compat) mat3_to_compatible_eulO(ob->rot, ob->rot, ob->rotmode, tmat);
+ else mat3_to_eulO(ob->rot, ob->rotmode, tmat);
}
}
}
-void object_tfm_protected_backup(const Object *ob,
- ObjectTfmProtectedChannels *obtfm)
+void BKE_object_tfm_protected_backup(const Object *ob,
+ ObjectTfmProtectedChannels *obtfm)
{
-#define TFMCPY( _v) (obtfm->_v = ob->_v)
-#define TFMCPY3D( _v) copy_v3_v3(obtfm->_v, ob->_v)
-#define TFMCPY4D( _v) copy_v4_v4(obtfm->_v, ob->_v)
+#define TFMCPY(_v) (obtfm->_v = ob->_v)
+#define TFMCPY3D(_v) copy_v3_v3(obtfm->_v, ob->_v)
+#define TFMCPY4D(_v) copy_v4_v4(obtfm->_v, ob->_v)
TFMCPY3D(loc);
TFMCPY3D(dloc);
@@ -1545,46 +1532,46 @@ void object_tfm_protected_backup(const Object *ob,
}
-void object_tfm_protected_restore(Object *ob,
- const ObjectTfmProtectedChannels *obtfm,
- const short protectflag)
+void BKE_object_tfm_protected_restore(Object *ob,
+ const ObjectTfmProtectedChannels *obtfm,
+ const short protectflag)
{
unsigned int i;
- for (i= 0; i < 3; i++) {
- if (protectflag & (OB_LOCK_LOCX<<i)) {
- ob->loc[i]= obtfm->loc[i];
- ob->dloc[i]= obtfm->dloc[i];
+ for (i = 0; i < 3; i++) {
+ if (protectflag & (OB_LOCK_LOCX << i)) {
+ ob->loc[i] = obtfm->loc[i];
+ ob->dloc[i] = obtfm->dloc[i];
}
- if (protectflag & (OB_LOCK_SCALEX<<i)) {
- ob->size[i]= obtfm->size[i];
- ob->dscale[i]= obtfm->dscale[i];
+ if (protectflag & (OB_LOCK_SCALEX << i)) {
+ ob->size[i] = obtfm->size[i];
+ ob->dscale[i] = obtfm->dscale[i];
}
- if (protectflag & (OB_LOCK_ROTX<<i)) {
- ob->rot[i]= obtfm->rot[i];
- ob->drot[i]= obtfm->drot[i];
+ if (protectflag & (OB_LOCK_ROTX << i)) {
+ ob->rot[i] = obtfm->rot[i];
+ ob->drot[i] = obtfm->drot[i];
- ob->quat[i + 1]= obtfm->quat[i + 1];
- ob->dquat[i + 1]= obtfm->dquat[i + 1];
+ ob->quat[i + 1] = obtfm->quat[i + 1];
+ ob->dquat[i + 1] = obtfm->dquat[i + 1];
- ob->rotAxis[i]= obtfm->rotAxis[i];
- ob->drotAxis[i]= obtfm->drotAxis[i];
+ ob->rotAxis[i] = obtfm->rotAxis[i];
+ ob->drotAxis[i] = obtfm->drotAxis[i];
}
}
if ((protectflag & OB_LOCK_ROT4D) && (protectflag & OB_LOCK_ROTW)) {
- ob->quat[0]= obtfm->quat[0];
- ob->dquat[0]= obtfm->dquat[0];
+ ob->quat[0] = obtfm->quat[0];
+ ob->dquat[0] = obtfm->dquat[0];
- ob->rotAngle= obtfm->rotAngle;
- ob->drotAngle= obtfm->drotAngle;
+ ob->rotAngle = obtfm->rotAngle;
+ ob->drotAngle = obtfm->drotAngle;
}
}
-/* see pchan_apply_mat4() for the equivalent 'pchan' function */
-void object_apply_mat4(Object *ob, float mat[][4], const short use_compat, const short use_parent)
+/* see BKE_pchan_apply_mat4() for the equivalent 'pchan' function */
+void BKE_object_apply_mat4(Object *ob, float mat[][4], const short use_compat, const short use_parent)
{
float rot[3][3];
@@ -1593,15 +1580,15 @@ void object_apply_mat4(Object *ob, float mat[][4], const short use_compat, const
mult_m4_m4m4(diff_mat, ob->parent->obmat, ob->parentinv);
invert_m4_m4(imat, diff_mat);
mult_m4_m4m4(rmat, imat, mat); /* get the parent relative matrix */
- object_apply_mat4(ob, rmat, use_compat, FALSE);
+ BKE_object_apply_mat4(ob, rmat, use_compat, FALSE);
/* same as below, use rmat rather than mat */
mat4_to_loc_rot_size(ob->loc, rot, ob->size, rmat);
- object_mat3_to_rot(ob, rot, use_compat);
+ BKE_object_mat3_to_rot(ob, rot, use_compat);
}
else {
mat4_to_loc_rot_size(ob->loc, rot, ob->size, mat);
- object_mat3_to_rot(ob, rot, use_compat);
+ BKE_object_mat3_to_rot(ob, rot, use_compat);
}
sub_v3_v3(ob->loc, ob->dloc);
@@ -1610,28 +1597,28 @@ void object_apply_mat4(Object *ob, float mat[][4], const short use_compat, const
if (ob->dscale[1] != 0.0f) ob->size[1] /= ob->dscale[1];
if (ob->dscale[2] != 0.0f) ob->size[2] /= ob->dscale[2];
- /* object_mat3_to_rot handles delta rotations */
+ /* BKE_object_mat3_to_rot handles delta rotations */
}
-void object_to_mat3(Object *ob, float mat[][3]) /* no parent */
+void BKE_object_to_mat3(Object *ob, float mat[][3]) /* no parent */
{
float smat[3][3];
float rmat[3][3];
/*float q1[4];*/
/* size */
- object_scale_to_mat3(ob, smat);
+ BKE_object_scale_to_mat3(ob, smat);
/* rot */
- object_rot_to_mat3(ob, rmat);
+ BKE_object_rot_to_mat3(ob, rmat);
mul_m3_m3m3(mat, rmat, smat);
}
-void object_to_mat4(Object *ob, float mat[][4])
+void BKE_object_to_mat4(Object *ob, float mat[][4])
{
float tmat[3][3];
- object_to_mat3(ob, tmat);
+ BKE_object_to_mat3(ob, tmat);
copy_m4_m3(mat, tmat);
@@ -1639,7 +1626,7 @@ void object_to_mat4(Object *ob, float mat[][4])
}
/* extern */
-int enable_cu_speed= 1;
+int enable_cu_speed = 1;
static void ob_parcurve(Scene *scene, Object *ob, Object *par, float mat[][4])
{
@@ -1649,14 +1636,14 @@ static void ob_parcurve(Scene *scene, Object *ob, Object *par, float mat[][4])
unit_m4(mat);
- cu= par->data;
- if (cu->path==NULL || cu->path->data==NULL) /* only happens on reload file, but violates depsgraph still... fix! */
- makeDispListCurveTypes(scene, par, 0);
- if (cu->path==NULL) return;
+ cu = par->data;
+ if (cu->path == NULL || cu->path->data == NULL) /* only happens on reload file, but violates depsgraph still... fix! */
+ BKE_displist_make_curveTypes(scene, par, 0);
+ if (cu->path == NULL) return;
/* catch exceptions: feature for nla stride editing */
if (ob->ipoflag & OB_DISABLE_PATH) {
- ctime= 0.0f;
+ ctime = 0.0f;
}
/* catch exceptions: curve paths used as a duplicator */
else if (enable_cu_speed) {
@@ -1667,14 +1654,14 @@ static void ob_parcurve(Scene *scene, Object *ob, Object *par, float mat[][4])
* factor, which then gets clamped to lie within 0.0 - 1.0 range
*/
if (IS_EQF(cu->pathlen, 0.0f) == 0)
- ctime= cu->ctime / cu->pathlen;
+ ctime = cu->ctime / cu->pathlen;
else
- ctime= cu->ctime;
+ ctime = cu->ctime;
CLAMP(ctime, 0.0f, 1.0f);
}
else {
- ctime= scene->r.cfra;
+ ctime = scene->r.cfra;
if (IS_EQF(cu->pathlen, 0.0f) == 0)
ctime /= cu->pathlen;
@@ -1683,7 +1670,7 @@ static void ob_parcurve(Scene *scene, Object *ob, Object *par, float mat[][4])
/* time calculus is correct, now apply distance offset */
if (cu->flag & CU_OFFS_PATHDIST) {
- ctime += timeoffs/cu->path->totdist;
+ ctime += timeoffs / cu->path->totdist;
/* restore */
SWAP(float, sf_orig, ob->sf);
@@ -1691,20 +1678,20 @@ static void ob_parcurve(Scene *scene, Object *ob, Object *par, float mat[][4])
/* vec: 4 items! */
- if ( where_on_path(par, ctime, vec, dir, cu->flag & CU_FOLLOW ? quat:NULL, &radius, NULL) ) {
+ if (where_on_path(par, ctime, vec, dir, cu->flag & CU_FOLLOW ? quat : NULL, &radius, NULL)) {
if (cu->flag & CU_FOLLOW) {
#if 0
float x1, q[4];
- vec_to_quat( quat,dir, ob->trackflag, ob->upflag);
+ vec_to_quat(quat, dir, ob->trackflag, ob->upflag);
/* the tilt */
normalize_v3(dir);
- q[0]= (float)cos(0.5*vec[3]);
- x1= (float)sin(0.5*vec[3]);
- q[1]= -x1*dir[0];
- q[2]= -x1*dir[1];
- q[3]= -x1*dir[2];
+ q[0] = (float)cos(0.5 * vec[3]);
+ x1 = (float)sin(0.5 * vec[3]);
+ q[1] = -x1 * dir[0];
+ q[2] = -x1 * dir[1];
+ q[3] = -x1 * dir[2];
mul_qt_qtqt(quat, q, quat);
#else
quat_apply_track(quat, ob->trackflag, ob->upflag);
@@ -1730,15 +1717,15 @@ static void ob_parbone(Object *ob, Object *par, float mat[][4])
bPoseChannel *pchan;
float vec[3];
- if (par->type!=OB_ARMATURE) {
+ if (par->type != OB_ARMATURE) {
unit_m4(mat);
return;
}
/* Make sure the bone is still valid */
- pchan= get_pose_channel(par->pose, ob->parsubstr);
+ pchan = BKE_pose_channel_find_name(par->pose, ob->parsubstr);
if (!pchan) {
- printf ("Object %s with Bone parent: bone %s doesn't exist\n", ob->id.name+2, ob->parsubstr);
+ printf("Object %s with Bone parent: bone %s doesn't exist\n", ob->id.name + 2, ob->parsubstr);
unit_m4(mat);
return;
}
@@ -1757,15 +1744,15 @@ static void give_parvert(Object *par, int nr, float vec[3])
BMEditMesh *em;
int a, count;
- vec[0]=vec[1]=vec[2]= 0.0f;
+ vec[0] = vec[1] = vec[2] = 0.0f;
- if (par->type==OB_MESH) {
- Mesh *me= par->data;
+ if (par->type == OB_MESH) {
+ Mesh *me = par->data;
DerivedMesh *dm;
em = me->edit_btmesh;
-#if 0 /* this was bmesh only, better, evaluate why this was needed - campbell*/
+#if 0 /* this was bmesh only, better, evaluate why this was needed - campbell*/
if (em) {
BMVert *eve;
BMIter iter;
@@ -1773,7 +1760,7 @@ static void give_parvert(Object *par, int nr, float vec[3])
BM_ITER_MESH (eve, &iter, em->bm, BM_VERTS_OF_MESH) {
int *keyindex = CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_SHAPE_KEYINDEX);
- if (keyindex && *keyindex==nr) {
+ if (keyindex && *keyindex == nr) {
copy_v3_v3(vec, eve->co);
break;
}
@@ -1781,17 +1768,17 @@ static void give_parvert(Object *par, int nr, float vec[3])
}
#endif
- dm = (em)? em->derivedFinal: par->derivedFinal;
+ dm = (em) ? em->derivedFinal : par->derivedFinal;
if (dm) {
- MVert *mvert= dm->getVertArray(dm);
+ MVert *mvert = dm->getVertArray(dm);
int *index = (int *)dm->getVertDataArray(dm, CD_ORIGINDEX);
int i, vindex, numVerts = dm->getNumVerts(dm);
/* get the average of all verts with (original index == nr) */
- count= 0;
+ count = 0;
for (i = 0; i < numVerts; i++) {
- vindex= (index)? index[i]: i;
+ vindex = (index) ? index[i] : i;
if (vindex == nr) {
add_v3_v3(vec, mvert[i].co);
@@ -1799,8 +1786,8 @@ static void give_parvert(Object *par, int nr, float vec[3])
}
}
- if (count==0) {
- /* keep as 0,0,0 */
+ if (count == 0) {
+ /* keep as 0, 0, 0 */
}
else if (count > 0) {
mul_v3_fl(vec, 1.0f / count);
@@ -1817,21 +1804,21 @@ static void give_parvert(Object *par, int nr, float vec[3])
Curve *cu;
BPoint *bp;
BezTriple *bezt;
- int found= 0;
+ int found = 0;
ListBase *nurbs;
- cu= par->data;
- nurbs= BKE_curve_nurbs(cu);
- nu= nurbs->first;
+ cu = par->data;
+ nurbs = BKE_curve_nurbs_get(cu);
+ nu = nurbs->first;
- count= 0;
+ count = 0;
while (nu && !found) {
if (nu->type == CU_BEZIER) {
- bezt= nu->bezt;
- a= nu->pntsu;
+ bezt = nu->bezt;
+ a = nu->pntsu;
while (a--) {
- if (count==nr) {
- found= 1;
+ if (count == nr) {
+ found = 1;
copy_v3_v3(vec, bezt->vec[1]);
break;
}
@@ -1840,43 +1827,43 @@ static void give_parvert(Object *par, int nr, float vec[3])
}
}
else {
- bp= nu->bp;
- a= nu->pntsu*nu->pntsv;
+ bp = nu->bp;
+ a = nu->pntsu * nu->pntsv;
while (a--) {
- if (count==nr) {
- found= 1;
- memcpy(vec, bp->vec, sizeof(float)*3);
+ if (count == nr) {
+ found = 1;
+ memcpy(vec, bp->vec, sizeof(float) * 3);
break;
}
count++;
bp++;
}
}
- nu= nu->next;
+ nu = nu->next;
}
}
- else if (par->type==OB_LATTICE) {
- Lattice *latt= par->data;
+ else if (par->type == OB_LATTICE) {
+ Lattice *latt = par->data;
BPoint *bp;
- DispList *dl = find_displist(&par->disp, DL_VERTS);
- float *co = dl?dl->verts:NULL;
+ DispList *dl = BKE_displist_find(&par->disp, DL_VERTS);
+ float *co = dl ? dl->verts : NULL;
- if (latt->editlatt) latt= latt->editlatt->latt;
+ if (latt->editlatt) latt = latt->editlatt->latt;
- a= latt->pntsu*latt->pntsv*latt->pntsw;
- count= 0;
- bp= latt->def;
+ a = latt->pntsu * latt->pntsv * latt->pntsw;
+ count = 0;
+ bp = latt->def;
while (a--) {
- if (count==nr) {
+ if (count == nr) {
if (co)
- memcpy(vec, co, 3*sizeof(float));
+ memcpy(vec, co, 3 * sizeof(float));
else
- memcpy(vec, bp->vec, 3*sizeof(float));
+ memcpy(vec, bp->vec, 3 * sizeof(float));
break;
}
count++;
- if (co) co+= 3;
+ if (co) co += 3;
else bp++;
}
}
@@ -1895,11 +1882,11 @@ static void ob_parvert3(Object *ob, Object *par, float mat[][4])
give_parvert(par, ob->par2, v2);
give_parvert(par, ob->par3, v3);
- tri_to_quat( q,v1, v2, v3);
- quat_to_mat3( cmat,q);
+ tri_to_quat(q, v1, v2, v3);
+ quat_to_mat3(cmat, q);
copy_m4_m3(mat, cmat);
- if (ob->type==OB_CURVE) {
+ if (ob->type == OB_CURVE) {
copy_v3_v3(mat[3], v1);
}
else {
@@ -1917,48 +1904,48 @@ static int where_is_object_parslow(Object *ob, float obmat[4][4], float slowmat[
int a;
// include framerate
- fac1= ( 1.0f / (1.0f + fabsf(ob->sf)) );
+ fac1 = (1.0f / (1.0f + fabsf(ob->sf)) );
if (fac1 >= 1.0f) return 0;
- fac2= 1.0f-fac1;
+ fac2 = 1.0f - fac1;
- fp1= obmat[0];
- fp2= slowmat[0];
- for (a=0; a<16; a++, fp1++, fp2++) {
- fp1[0]= fac1*fp1[0] + fac2*fp2[0];
+ fp1 = obmat[0];
+ fp2 = slowmat[0];
+ for (a = 0; a < 16; a++, fp1++, fp2++) {
+ fp1[0] = fac1 * fp1[0] + fac2 * fp2[0];
}
return 1;
}
-void where_is_object_time(Scene *scene, Object *ob, float ctime)
+void BKE_object_where_is_calc_time(Scene *scene, Object *ob, float ctime)
{
float slowmat[4][4] = MAT4_UNITY;
- float stime=ctime;
+ float stime = ctime;
/* new version: correct parent+vertexparent and track+parent */
/* this one only calculates direct attached parent and track */
/* is faster, but should keep track of timeoffs */
- if (ob==NULL) return;
+ if (ob == NULL) return;
/* execute drivers only, as animation has already been done */
BKE_animsys_evaluate_animdata(scene, &ob->id, ob->adt, ctime, ADT_RECALC_DRIVERS);
if (ob->parent) {
- Object *par= ob->parent;
+ Object *par = ob->parent;
/* hurms, code below conflicts with depgraph... (ton) */
/* and even worse, it gives bad effects for NLA stride too (try ctime != par->ctime, with MBlur) */
if (stime != par->ctime) {
// only for ipo systems?
- Object tmp= *par;
+ Object tmp = *par;
- if (par->proxy_from); // was a copied matrix, no where_is! bad...
- else where_is_object_time(scene, par, ctime);
+ if (par->proxy_from) ; // was a copied matrix, no where_is! bad...
+ else BKE_object_where_is_calc_time(scene, par, ctime);
solve_parenting(scene, ob, par, ob->obmat, slowmat, 0);
- *par= tmp;
+ *par = tmp;
}
else
solve_parenting(scene, ob, par, ob->obmat, slowmat, 0);
@@ -1972,36 +1959,36 @@ void where_is_object_time(Scene *scene, Object *ob, float ctime)
}
}
else {
- object_to_mat4(ob, ob->obmat);
+ BKE_object_to_mat4(ob, ob->obmat);
}
/* solve constraints */
if (ob->constraints.first && !(ob->transflag & OB_NO_CONSTRAINTS)) {
bConstraintOb *cob;
- cob= constraints_make_evalob(scene, ob, NULL, CONSTRAINT_OBTYPE_OBJECT);
+ cob = constraints_make_evalob(scene, ob, NULL, CONSTRAINT_OBTYPE_OBJECT);
- /* constraints need ctime, not stime. Some call where_is_object_time and bsystem_time */
- solve_constraints (&ob->constraints, cob, ctime);
+ /* constraints need ctime, not stime. Some call BKE_object_where_is_calc_time and bsystem_time */
+ solve_constraints(&ob->constraints, cob, ctime);
constraints_clear_evalob(cob);
}
/* set negative scale flag in object */
- if (is_negative_m4(ob->obmat)) ob->transflag |= OB_NEG_SCALE;
- else ob->transflag &= ~OB_NEG_SCALE;
+ if (is_negative_m4(ob->obmat)) ob->transflag |= OB_NEG_SCALE;
+ else ob->transflag &= ~OB_NEG_SCALE;
}
/* get object transformation matrix without recalculating dependencies and
* constraints -- assume dependencies are already solved by depsgraph.
* no changes to object and it's parent would be done.
* used for bundles orientation in 3d space relative to parented blender camera */
-void where_is_object_mat(Scene *scene, Object *ob, float obmat[4][4])
+void BKE_object_where_is_calc_mat4(Scene *scene, Object *ob, float obmat[4][4])
{
float slowmat[4][4] = MAT4_UNITY;
if (ob->parent) {
- Object *par= ob->parent;
+ Object *par = ob->parent;
solve_parenting(scene, ob, par, obmat, slowmat, 1);
@@ -2009,11 +1996,11 @@ void where_is_object_mat(Scene *scene, Object *ob, float obmat[4][4])
where_is_object_parslow(ob, obmat, slowmat);
}
else {
- object_to_mat4(ob, obmat);
+ BKE_object_to_mat4(ob, obmat);
}
}
-static void solve_parenting (Scene *scene, Object *ob, Object *par, float obmat[][4], float slowmat[][4], int simul)
+static void solve_parenting(Scene *scene, Object *ob, Object *par, float obmat[][4], float slowmat[][4], int simul)
{
float totmat[4][4];
float tmat[4][4];
@@ -2021,58 +2008,58 @@ static void solve_parenting (Scene *scene, Object *ob, Object *par, float obmat[
float vec[3];
int ok;
- object_to_mat4(ob, locmat);
+ BKE_object_to_mat4(ob, locmat);
if (ob->partype & PARSLOW) copy_m4_m4(slowmat, obmat);
- switch(ob->partype & PARTYPE) {
- case PAROBJECT:
- ok= 0;
- if (par->type==OB_CURVE) {
- if ( ((Curve *)par->data)->flag & CU_PATH ) {
- ob_parcurve(scene, ob, par, tmat);
- ok= 1;
+ switch (ob->partype & PARTYPE) {
+ case PAROBJECT:
+ ok = 0;
+ if (par->type == OB_CURVE) {
+ if (((Curve *)par->data)->flag & CU_PATH) {
+ ob_parcurve(scene, ob, par, tmat);
+ ok = 1;
+ }
}
- }
- if (ok) mul_serie_m4(totmat, par->obmat, tmat,
- NULL, NULL, NULL, NULL, NULL, NULL);
- else copy_m4_m4(totmat, par->obmat);
+ if (ok) mul_serie_m4(totmat, par->obmat, tmat,
+ NULL, NULL, NULL, NULL, NULL, NULL);
+ else copy_m4_m4(totmat, par->obmat);
- break;
- case PARBONE:
- ob_parbone(ob, par, tmat);
- mul_serie_m4(totmat, par->obmat, tmat,
- NULL, NULL, NULL, NULL, NULL, NULL);
- break;
+ break;
+ case PARBONE:
+ ob_parbone(ob, par, tmat);
+ mul_serie_m4(totmat, par->obmat, tmat,
+ NULL, NULL, NULL, NULL, NULL, NULL);
+ break;
- case PARVERT1:
- unit_m4(totmat);
- if (simul) {
- copy_v3_v3(totmat[3], par->obmat[3]);
- }
- else {
- give_parvert(par, ob->par1, vec);
- mul_v3_m4v3(totmat[3], par->obmat, vec);
- }
- break;
- case PARVERT3:
- ob_parvert3(ob, par, tmat);
+ case PARVERT1:
+ unit_m4(totmat);
+ if (simul) {
+ copy_v3_v3(totmat[3], par->obmat[3]);
+ }
+ else {
+ give_parvert(par, ob->par1, vec);
+ mul_v3_m4v3(totmat[3], par->obmat, vec);
+ }
+ break;
+ case PARVERT3:
+ ob_parvert3(ob, par, tmat);
- mul_serie_m4(totmat, par->obmat, tmat,
- NULL, NULL, NULL, NULL, NULL, NULL);
- break;
+ mul_serie_m4(totmat, par->obmat, tmat,
+ NULL, NULL, NULL, NULL, NULL, NULL);
+ break;
- case PARSKEL:
- copy_m4_m4(totmat, par->obmat);
- break;
+ case PARSKEL:
+ copy_m4_m4(totmat, par->obmat);
+ break;
}
// total
mul_serie_m4(tmat, totmat, ob->parentinv,
- NULL, NULL, NULL, NULL, NULL, NULL);
+ NULL, NULL, NULL, NULL, NULL, NULL);
mul_serie_m4(obmat, tmat, locmat,
- NULL, NULL, NULL, NULL, NULL, NULL);
+ NULL, NULL, NULL, NULL, NULL, NULL);
if (simul) {
@@ -2082,7 +2069,7 @@ static void solve_parenting (Scene *scene, Object *ob, Object *par, float obmat[
copy_m3_m4(originmat, tmat);
// origin, voor help line
- if ( (ob->partype & PARTYPE)==PARSKEL ) {
+ if ((ob->partype & PARTYPE) == PARSKEL) {
copy_v3_v3(ob->orig, par->obmat[3]);
}
else {
@@ -2092,13 +2079,13 @@ static void solve_parenting (Scene *scene, Object *ob, Object *par, float obmat[
}
-void where_is_object(struct Scene *scene, Object *ob)
+void BKE_object_where_is_calc(struct Scene *scene, Object *ob)
{
- where_is_object_time(scene, ob, (float)scene->r.cfra);
+ BKE_object_where_is_calc_time(scene, ob, (float)scene->r.cfra);
}
-void where_is_object_simul(Scene *scene, Object *ob)
+void BKE_object_where_is_calc_simul(Scene *scene, Object *ob)
/* was written for the old game engine (until 2.04) */
/* It seems that this function is only called
* for a lamp that is the child of another object */
@@ -2111,118 +2098,118 @@ void where_is_object_simul(Scene *scene, Object *ob)
/* NO TIMEOFFS */
if (ob->parent) {
- par= ob->parent;
+ par = ob->parent;
solve_parenting(scene, ob, par, ob->obmat, slowmat, 1);
if (ob->partype & PARSLOW) {
- fac1= (float)(1.0/(1.0+ fabs(ob->sf)));
- fac2= 1.0f-fac1;
- fp1= ob->obmat[0];
- fp2= slowmat[0];
- for (a=0; a<16; a++, fp1++, fp2++) {
- fp1[0]= fac1*fp1[0] + fac2*fp2[0];
+ fac1 = (float)(1.0 / (1.0 + fabs(ob->sf)));
+ fac2 = 1.0f - fac1;
+ fp1 = ob->obmat[0];
+ fp2 = slowmat[0];
+ for (a = 0; a < 16; a++, fp1++, fp2++) {
+ fp1[0] = fac1 * fp1[0] + fac2 * fp2[0];
}
}
}
else {
- object_to_mat4(ob, ob->obmat);
+ BKE_object_to_mat4(ob, ob->obmat);
}
/* solve constraints */
if (ob->constraints.first) {
bConstraintOb *cob;
- cob= constraints_make_evalob(scene, ob, NULL, CONSTRAINT_OBTYPE_OBJECT);
+ cob = constraints_make_evalob(scene, ob, NULL, CONSTRAINT_OBTYPE_OBJECT);
solve_constraints(&ob->constraints, cob, (float)scene->r.cfra);
constraints_clear_evalob(cob);
}
}
/* for calculation of the inverse parent transform, only used for editor */
-void what_does_parent(Scene *scene, Object *ob, Object *workob)
+void BKE_object_workob_calc_parent(Scene *scene, Object *ob, Object *workob)
{
- clear_workob(workob);
+ BKE_object_workob_clear(workob);
unit_m4(workob->obmat);
unit_m4(workob->parentinv);
unit_m4(workob->constinv);
- workob->parent= ob->parent;
+ workob->parent = ob->parent;
- workob->trackflag= ob->trackflag;
- workob->upflag= ob->upflag;
+ workob->trackflag = ob->trackflag;
+ workob->upflag = ob->upflag;
- workob->partype= ob->partype;
- workob->par1= ob->par1;
- workob->par2= ob->par2;
- workob->par3= ob->par3;
+ workob->partype = ob->partype;
+ workob->par1 = ob->par1;
+ workob->par2 = ob->par2;
+ workob->par3 = ob->par3;
workob->constraints.first = ob->constraints.first;
workob->constraints.last = ob->constraints.last;
BLI_strncpy(workob->parsubstr, ob->parsubstr, sizeof(workob->parsubstr));
- where_is_object(scene, workob);
+ BKE_object_where_is_calc(scene, workob);
}
-BoundBox *unit_boundbox(void)
+BoundBox *BKE_boundbox_alloc_unit(void)
{
BoundBox *bb;
- float min[3] = {-1.0f,-1.0f,-1.0f}, max[3] = {-1.0f,-1.0f,-1.0f};
+ float min[3] = {-1.0f, -1.0f, -1.0f}, max[3] = {-1.0f, -1.0f, -1.0f};
- bb= MEM_callocN(sizeof(BoundBox), "OB-BoundBox");
- boundbox_set_from_min_max(bb, min, max);
+ bb = MEM_callocN(sizeof(BoundBox), "OB-BoundBox");
+ BKE_boundbox_init_from_minmax(bb, min, max);
return bb;
}
-void boundbox_set_from_min_max(BoundBox *bb, float min[3], float max[3])
+void BKE_boundbox_init_from_minmax(BoundBox *bb, float min[3], float max[3])
{
- bb->vec[0][0]=bb->vec[1][0]=bb->vec[2][0]=bb->vec[3][0]= min[0];
- bb->vec[4][0]=bb->vec[5][0]=bb->vec[6][0]=bb->vec[7][0]= max[0];
+ bb->vec[0][0] = bb->vec[1][0] = bb->vec[2][0] = bb->vec[3][0] = min[0];
+ bb->vec[4][0] = bb->vec[5][0] = bb->vec[6][0] = bb->vec[7][0] = max[0];
- bb->vec[0][1]=bb->vec[1][1]=bb->vec[4][1]=bb->vec[5][1]= min[1];
- bb->vec[2][1]=bb->vec[3][1]=bb->vec[6][1]=bb->vec[7][1]= max[1];
+ bb->vec[0][1] = bb->vec[1][1] = bb->vec[4][1] = bb->vec[5][1] = min[1];
+ bb->vec[2][1] = bb->vec[3][1] = bb->vec[6][1] = bb->vec[7][1] = max[1];
- bb->vec[0][2]=bb->vec[3][2]=bb->vec[4][2]=bb->vec[7][2]= min[2];
- bb->vec[1][2]=bb->vec[2][2]=bb->vec[5][2]=bb->vec[6][2]= max[2];
+ bb->vec[0][2] = bb->vec[3][2] = bb->vec[4][2] = bb->vec[7][2] = min[2];
+ bb->vec[1][2] = bb->vec[2][2] = bb->vec[5][2] = bb->vec[6][2] = max[2];
}
-BoundBox *object_get_boundbox(Object *ob)
+BoundBox *BKE_object_boundbox_get(Object *ob)
{
- BoundBox *bb= NULL;
+ BoundBox *bb = NULL;
- if (ob->type==OB_MESH) {
- bb = mesh_get_bb(ob);
+ if (ob->type == OB_MESH) {
+ bb = BKE_mesh_boundbox_get(ob);
}
else if (ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT)) {
- bb= ob->bb ? ob->bb : ( (Curve *)ob->data )->bb;
+ bb = ob->bb ? ob->bb : ((Curve *)ob->data)->bb;
}
- else if (ob->type==OB_MBALL) {
- bb= ob->bb;
+ else if (ob->type == OB_MBALL) {
+ bb = ob->bb;
}
return bb;
}
/* used to temporally disable/enable boundbox */
-void object_boundbox_flag(Object *ob, int flag, int set)
+void BKE_object_boundbox_flag(Object *ob, int flag, int set)
{
- BoundBox *bb= object_get_boundbox(ob);
+ BoundBox *bb = BKE_object_boundbox_get(ob);
if (bb) {
if (set) bb->flag |= flag;
else bb->flag &= ~flag;
}
}
-void object_get_dimensions(Object *ob, float vec[3])
+void BKE_object_dimensions_get(Object *ob, float vec[3])
{
BoundBox *bb = NULL;
- bb= object_get_boundbox(ob);
+ bb = BKE_object_boundbox_get(ob);
if (bb) {
float scale[3];
- mat4_to_size( scale,ob->obmat);
+ mat4_to_size(scale, ob->obmat);
vec[0] = fabsf(scale[0]) * (bb->vec[4][0] - bb->vec[0][0]);
vec[1] = fabsf(scale[1]) * (bb->vec[2][1] - bb->vec[0][1]);
@@ -2233,15 +2220,15 @@ void object_get_dimensions(Object *ob, float vec[3])
}
}
-void object_set_dimensions(Object *ob, const float *value)
+void BKE_object_dimensions_set(Object *ob, const float *value)
{
BoundBox *bb = NULL;
- bb= object_get_boundbox(ob);
+ bb = BKE_object_boundbox_get(ob);
if (bb) {
float scale[3], len[3];
- mat4_to_size( scale,ob->obmat);
+ mat4_to_size(scale, ob->obmat);
len[0] = bb->vec[4][0] - bb->vec[0][0];
len[1] = bb->vec[2][1] - bb->vec[0][1];
@@ -2253,117 +2240,117 @@ void object_set_dimensions(Object *ob, const float *value)
}
}
-void minmax_object(Object *ob, float min[3], float max[3])
+void BKE_object_minmax(Object *ob, float min_r[3], float max_r[3])
{
BoundBox bb;
float vec[3];
int a;
- short change= FALSE;
+ short change = FALSE;
- switch(ob->type) {
- case OB_CURVE:
- case OB_FONT:
- case OB_SURF:
+ switch (ob->type) {
+ case OB_CURVE:
+ case OB_FONT:
+ case OB_SURF:
{
- Curve *cu= ob->data;
+ Curve *cu = ob->data;
- if (cu->bb==NULL) tex_space_curve(cu);
- bb= *(cu->bb);
+ if (cu->bb == NULL) BKE_curve_texspace_calc(cu);
+ bb = *(cu->bb);
- for (a=0; a<8; a++) {
+ for (a = 0; a < 8; a++) {
mul_m4_v3(ob->obmat, bb.vec[a]);
- DO_MINMAX(bb.vec[a], min, max);
+ DO_MINMAX(bb.vec[a], min_r, max_r);
}
- change= TRUE;
+ change = TRUE;
}
break;
- case OB_LATTICE:
+ case OB_LATTICE:
{
- Lattice *lt= ob->data;
- BPoint *bp= lt->def;
+ Lattice *lt = ob->data;
+ BPoint *bp = lt->def;
int u, v, w;
- for (w=0; w<lt->pntsw; w++) {
- for (v=0; v<lt->pntsv; v++) {
- for (u=0; u<lt->pntsu; u++, bp++) {
+ for (w = 0; w < lt->pntsw; w++) {
+ for (v = 0; v < lt->pntsv; v++) {
+ for (u = 0; u < lt->pntsu; u++, bp++) {
mul_v3_m4v3(vec, ob->obmat, bp->vec);
- DO_MINMAX(vec, min, max);
+ DO_MINMAX(vec, min_r, max_r);
}
}
}
- change= TRUE;
+ change = TRUE;
}
break;
- case OB_ARMATURE:
- if (ob->pose) {
- bPoseChannel *pchan;
- for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
- mul_v3_m4v3(vec, ob->obmat, pchan->pose_head);
- DO_MINMAX(vec, min, max);
- mul_v3_m4v3(vec, ob->obmat, pchan->pose_tail);
- DO_MINMAX(vec, min, max);
+ case OB_ARMATURE:
+ if (ob->pose) {
+ bPoseChannel *pchan;
+ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
+ mul_v3_m4v3(vec, ob->obmat, pchan->pose_head);
+ DO_MINMAX(vec, min_r, max_r);
+ mul_v3_m4v3(vec, ob->obmat, pchan->pose_tail);
+ DO_MINMAX(vec, min_r, max_r);
+ }
+ change = TRUE;
}
- change= TRUE;
- }
- break;
- case OB_MESH:
+ break;
+ case OB_MESH:
{
- Mesh *me= get_mesh(ob);
+ Mesh *me = BKE_mesh_from_object(ob);
if (me) {
- bb = *mesh_get_bb(ob);
+ bb = *BKE_mesh_boundbox_get(ob);
- for (a=0; a<8; a++) {
+ for (a = 0; a < 8; a++) {
mul_m4_v3(ob->obmat, bb.vec[a]);
- DO_MINMAX(bb.vec[a], min, max);
+ DO_MINMAX(bb.vec[a], min_r, max_r);
}
- change= TRUE;
+ change = TRUE;
}
}
break;
}
if (change == FALSE) {
- DO_MINMAX(ob->obmat[3], min, max);
+ DO_MINMAX(ob->obmat[3], min_r, max_r);
copy_v3_v3(vec, ob->obmat[3]);
add_v3_v3(vec, ob->size);
- DO_MINMAX(vec, min, max);
+ DO_MINMAX(vec, min_r, max_r);
copy_v3_v3(vec, ob->obmat[3]);
sub_v3_v3(vec, ob->size);
- DO_MINMAX(vec, min, max);
+ DO_MINMAX(vec, min_r, max_r);
}
}
-int minmax_object_duplis(Scene *scene, Object *ob, float min[3], float max[3])
+int BKE_object_minmax_dupli(Scene *scene, Object *ob, float r_min[3], float r_max[3])
{
- int ok= 0;
- if ((ob->transflag & OB_DUPLI)==0) {
+ int ok = 0;
+ if ((ob->transflag & OB_DUPLI) == 0) {
return ok;
}
else {
ListBase *lb;
DupliObject *dob;
- lb= object_duplilist(scene, ob);
- for (dob= lb->first; dob; dob= dob->next) {
+ lb = object_duplilist(scene, ob);
+ for (dob = lb->first; dob; dob = dob->next) {
if (dob->no_draw == 0) {
- BoundBox *bb= object_get_boundbox(dob->ob);
+ BoundBox *bb = BKE_object_boundbox_get(dob->ob);
if (bb) {
int i;
- for (i=0; i<8; i++) {
+ for (i = 0; i < 8; i++) {
float vec[3];
mul_v3_m4v3(vec, dob->mat, bb->vec[i]);
- DO_MINMAX(vec, min, max);
+ DO_MINMAX(vec, r_min, r_max);
}
- ok= 1;
+ ok = 1;
}
}
}
- free_object_duplilist(lb); /* does restore */
+ free_object_duplilist(lb); /* does restore */
}
return ok;
@@ -2376,12 +2363,12 @@ void BKE_object_foreach_display_point(
float co[3];
if (ob->derivedFinal) {
- DerivedMesh *dm= ob->derivedFinal;
- MVert *mv= dm->getVertArray(dm);
- int totvert= dm->getNumVerts(dm);
+ DerivedMesh *dm = ob->derivedFinal;
+ MVert *mv = dm->getVertArray(dm);
+ int totvert = dm->getNumVerts(dm);
int i;
- for (i= 0; i < totvert; i++, mv++) {
+ for (i = 0; i < totvert; i++, mv++) {
mul_v3_m4v3(co, obmat, mv->co);
func_cb(co, user_data);
}
@@ -2389,12 +2376,12 @@ void BKE_object_foreach_display_point(
else if (ob->disp.first) {
DispList *dl;
- for (dl=ob->disp.first; dl; dl=dl->next) {
- float *v3= dl->verts;
- int totvert= dl->nr;
+ for (dl = ob->disp.first; dl; dl = dl->next) {
+ float *v3 = dl->verts;
+ int totvert = dl->nr;
int i;
- for (i= 0; i < totvert; i++, v3+=3) {
+ for (i = 0; i < totvert; i++, v3 += 3) {
mul_v3_m4v3(co, obmat, v3);
func_cb(co, user_data);
}
@@ -2409,24 +2396,24 @@ void BKE_scene_foreach_display_point(
Base *base;
Object *ob;
- for (base= FIRSTBASE; base; base = base->next) {
+ for (base = FIRSTBASE; base; base = base->next) {
if (BASE_VISIBLE(v3d, base) && (base->flag & flag) == flag) {
- ob= base->object;
+ ob = base->object;
- if ((ob->transflag & OB_DUPLI)==0) {
+ if ((ob->transflag & OB_DUPLI) == 0) {
BKE_object_foreach_display_point(ob, ob->obmat, func_cb, user_data);
}
else {
ListBase *lb;
DupliObject *dob;
- lb= object_duplilist(scene, ob);
- for (dob= lb->first; dob; dob= dob->next) {
+ lb = object_duplilist(scene, ob);
+ for (dob = lb->first; dob; dob = dob->next) {
if (dob->no_draw == 0) {
BKE_object_foreach_display_point(dob->ob, dob->mat, func_cb, user_data);
}
}
- free_object_duplilist(lb); /* does restore */
+ free_object_duplilist(lb); /* does restore */
}
}
}
@@ -2435,20 +2422,20 @@ void BKE_scene_foreach_display_point(
/* copied from DNA_object_types.h */
typedef struct ObTfmBack {
float loc[3], dloc[3], orig[3];
- float size[3], dscale[3]; /* scale and delta scale */
- float rot[3], drot[3]; /* euler rotation */
- float quat[4], dquat[4]; /* quaternion rotation */
- float rotAxis[3], drotAxis[3]; /* axis angle rotation - axis part */
- float rotAngle, drotAngle; /* axis angle rotation - angle part */
- float obmat[4][4]; /* final worldspace matrix with constraints & animsys applied */
+ float size[3], dscale[3]; /* scale and delta scale */
+ float rot[3], drot[3]; /* euler rotation */
+ float quat[4], dquat[4]; /* quaternion rotation */
+ float rotAxis[3], drotAxis[3]; /* axis angle rotation - axis part */
+ float rotAngle, drotAngle; /* axis angle rotation - angle part */
+ float obmat[4][4]; /* final worldspace matrix with constraints & animsys applied */
float parentinv[4][4]; /* inverse result of parent, so that object doesn't 'stick' to parent */
float constinv[4][4]; /* inverse result of constraints. doesn't include effect of parent or object local transform */
- float imat[4][4]; /* inverse matrix of 'obmat' for during render, old game engine, temporally: ipokeys of transform */
+ float imat[4][4]; /* inverse matrix of 'obmat' for during render, old game engine, temporally: ipokeys of transform */
} ObTfmBack;
-void *object_tfm_backup(Object *ob)
+void *BKE_object_tfm_backup(Object *ob)
{
- ObTfmBack *obtfm= MEM_mallocN(sizeof(ObTfmBack), "ObTfmBack");
+ ObTfmBack *obtfm = MEM_mallocN(sizeof(ObTfmBack), "ObTfmBack");
copy_v3_v3(obtfm->loc, ob->loc);
copy_v3_v3(obtfm->dloc, ob->dloc);
copy_v3_v3(obtfm->orig, ob->orig);
@@ -2460,8 +2447,8 @@ void *object_tfm_backup(Object *ob)
copy_qt_qt(obtfm->dquat, ob->dquat);
copy_v3_v3(obtfm->rotAxis, ob->rotAxis);
copy_v3_v3(obtfm->drotAxis, ob->drotAxis);
- obtfm->rotAngle= ob->rotAngle;
- obtfm->drotAngle= ob->drotAngle;
+ obtfm->rotAngle = ob->rotAngle;
+ obtfm->drotAngle = ob->drotAngle;
copy_m4_m4(obtfm->obmat, ob->obmat);
copy_m4_m4(obtfm->parentinv, ob->parentinv);
copy_m4_m4(obtfm->constinv, ob->constinv);
@@ -2470,9 +2457,9 @@ void *object_tfm_backup(Object *ob)
return (void *)obtfm;
}
-void object_tfm_restore(Object *ob, void *obtfm_pt)
+void BKE_object_tfm_restore(Object *ob, void *obtfm_pt)
{
- ObTfmBack *obtfm= (ObTfmBack *)obtfm_pt;
+ ObTfmBack *obtfm = (ObTfmBack *)obtfm_pt;
copy_v3_v3(ob->loc, obtfm->loc);
copy_v3_v3(ob->dloc, obtfm->dloc);
copy_v3_v3(ob->orig, obtfm->orig);
@@ -2484,8 +2471,8 @@ void object_tfm_restore(Object *ob, void *obtfm_pt)
copy_qt_qt(ob->dquat, obtfm->dquat);
copy_v3_v3(ob->rotAxis, obtfm->rotAxis);
copy_v3_v3(ob->drotAxis, obtfm->drotAxis);
- ob->rotAngle= obtfm->rotAngle;
- ob->drotAngle= obtfm->drotAngle;
+ ob->rotAngle = obtfm->rotAngle;
+ ob->drotAngle = obtfm->drotAngle;
copy_m4_m4(ob->obmat, obtfm->obmat);
copy_m4_m4(ob->parentinv, obtfm->parentinv);
copy_m4_m4(ob->constinv, obtfm->constinv);
@@ -2507,37 +2494,37 @@ int BKE_object_parent_loop_check(const Object *par, const Object *ob)
/* the main object update call, for object matrix, constraints, keys and displist (modifiers) */
/* requires flags to be set! */
-void object_handle_update(Scene *scene, Object *ob)
+void BKE_object_handle_update(Scene *scene, Object *ob)
{
if (ob->recalc & OB_RECALC_ALL) {
/* speed optimization for animation lookups */
if (ob->pose)
- make_pose_channels_hash(ob->pose);
+ BKE_pose_channels_hash_make(ob->pose);
if (ob->recalc & OB_RECALC_DATA) {
- if (ob->type==OB_ARMATURE) {
+ if (ob->type == OB_ARMATURE) {
/* this happens for reading old files and to match library armatures
- * with poses we do it ahead of where_is_object to ensure animation
+ * with poses we do it ahead of BKE_object_where_is_calc to ensure animation
* is evaluated on the rebuilt pose, otherwise we get incorrect poses
* on file load */
- if (ob->pose==NULL || (ob->pose->flag & POSE_RECALC))
- armature_rebuild_pose(ob, ob->data);
+ if (ob->pose == NULL || (ob->pose->flag & POSE_RECALC))
+ BKE_pose_rebuild(ob, ob->data);
}
}
/* XXX new animsys warning: depsgraph tag OB_RECALC_DATA should not skip drivers,
- * which is only in where_is_object now */
+ * which is only in BKE_object_where_is_calc now */
// XXX: should this case be OB_RECALC_OB instead?
if (ob->recalc & OB_RECALC_ALL) {
if (G.debug & G_DEBUG)
- printf("recalcob %s\n", ob->id.name+2);
+ printf("recalcob %s\n", ob->id.name + 2);
/* handle proxy copy for target */
if (ob->id.lib && ob->proxy_from) {
// printf("ob proxy copy, lib ob %s proxy %s\n", ob->id.name, ob->proxy_from->id.name);
- if (ob->proxy_from->proxy_group) {/* transform proxy into group space */
- Object *obg= ob->proxy_from->proxy_group;
+ if (ob->proxy_from->proxy_group) { /* transform proxy into group space */
+ Object *obg = ob->proxy_from->proxy_group;
invert_m4_m4(obg->imat, obg->obmat);
mult_m4_m4m4(ob->obmat, obg->imat, ob->proxy_from->obmat);
if (obg->dup_group) { /* should always be true */
@@ -2548,18 +2535,18 @@ void object_handle_update(Scene *scene, Object *ob)
copy_m4_m4(ob->obmat, ob->proxy_from->obmat);
}
else
- where_is_object(scene, ob);
+ BKE_object_where_is_calc(scene, ob);
}
if (ob->recalc & OB_RECALC_DATA) {
- ID *data_id= (ID *)ob->data;
- AnimData *adt= BKE_animdata_from_id(data_id);
- float ctime= (float)scene->r.cfra; // XXX this is bad...
+ ID *data_id = (ID *)ob->data;
+ AnimData *adt = BKE_animdata_from_id(data_id);
+ float ctime = (float)scene->r.cfra; // XXX this is bad...
ListBase pidlist;
PTCacheID *pid;
if (G.debug & G_DEBUG)
- printf("recalcdata %s\n", ob->id.name+2);
+ printf("recalcdata %s\n", ob->id.name + 2);
if (adt) {
/* evaluate drivers */
@@ -2568,10 +2555,10 @@ void object_handle_update(Scene *scene, Object *ob)
}
/* includes all keys and modifiers */
- switch(ob->type) {
- case OB_MESH:
+ switch (ob->type) {
+ case OB_MESH:
{
-#if 0 // XXX, comment for 2.56a release, background wont set 'scene->customdata_mask'
+#if 0 // XXX, comment for 2.56a release, background wont set 'scene->customdata_mask'
BMEditMesh *em = (ob == scene->obedit) ? BMEdit_FromObject(ob) : NULL;
BLI_assert((scene->customdata_mask & CD_MASK_BAREMESH) == CD_MASK_BAREMESH);
if (em) {
@@ -2581,9 +2568,9 @@ void object_handle_update(Scene *scene, Object *ob)
makeDerivedMesh(scene, ob, NULL, scene->customdata_mask, 0);
}
-#else /* ensure CD_MASK_BAREMESH for now */
+#else /* ensure CD_MASK_BAREMESH for now */
BMEditMesh *em = (ob == scene->obedit) ? BMEdit_FromObject(ob) : NULL;
- uint64_t data_mask= scene->customdata_mask | ob->customdata_mask | CD_MASK_BAREMESH;
+ uint64_t data_mask = scene->customdata_mask | ob->customdata_mask | CD_MASK_BAREMESH;
if (em) {
makeDerivedMesh(scene, ob, em, data_mask, 0); /* was CD_MASK_BAREMESH */
}
@@ -2595,29 +2582,29 @@ void object_handle_update(Scene *scene, Object *ob)
}
break;
- case OB_ARMATURE:
- if (ob->id.lib && ob->proxy_from) {
- // printf("pose proxy copy, lib ob %s proxy %s\n", ob->id.name, ob->proxy_from->id.name);
- copy_pose_result(ob->pose, ob->proxy_from->pose);
- }
- else {
- where_is_pose(scene, ob);
- }
- break;
+ case OB_ARMATURE:
+ if (ob->id.lib && ob->proxy_from) {
+ // printf("pose proxy copy, lib ob %s proxy %s\n", ob->id.name, ob->proxy_from->id.name);
+ BKE_pose_copy_result(ob->pose, ob->proxy_from->pose);
+ }
+ else {
+ BKE_pose_where_is(scene, ob);
+ }
+ break;
- case OB_MBALL:
- makeDispListMBall(scene, ob);
- break;
+ case OB_MBALL:
+ BKE_displist_make_mball(scene, ob);
+ break;
- case OB_CURVE:
- case OB_SURF:
- case OB_FONT:
- makeDispListCurveTypes(scene, ob, 0);
- break;
+ case OB_CURVE:
+ case OB_SURF:
+ case OB_FONT:
+ BKE_displist_make_curveTypes(scene, ob, 0);
+ break;
- case OB_LATTICE:
- lattice_calc_modifiers(scene, ob);
- break;
+ case OB_LATTICE:
+ BKE_lattice_modifiers_calc(scene, ob);
+ break;
}
@@ -2626,7 +2613,7 @@ void object_handle_update(Scene *scene, Object *ob)
DerivedMesh *dm;
ob->transflag &= ~OB_DUPLIPARTS;
- psys= ob->particlesystem.first;
+ psys = ob->particlesystem.first;
while (psys) {
if (psys_check_enabled(ob, psys)) {
/* check use of dupli objects here */
@@ -2638,26 +2625,26 @@ void object_handle_update(Scene *scene, Object *ob)
}
particle_system_update(scene, ob, psys);
- psys= psys->next;
+ psys = psys->next;
}
else if (psys->flag & PSYS_DELETE) {
- tpsys=psys->next;
+ tpsys = psys->next;
BLI_remlink(&ob->particlesystem, psys);
- psys_free(ob,psys);
- psys= tpsys;
+ psys_free(ob, psys);
+ psys = tpsys;
}
else
- psys= psys->next;
+ psys = psys->next;
}
if (G.rendering && ob->transflag & OB_DUPLIPARTS) {
/* this is to make sure we get render level duplis in groups:
* the derivedmesh must be created before init_render_mesh,
* since object_duplilist does dupliparticles before that */
- dm = mesh_create_derived_render(scene, ob, CD_MASK_BAREMESH|CD_MASK_MTFACE|CD_MASK_MCOL);
+ dm = mesh_create_derived_render(scene, ob, CD_MASK_BAREMESH | CD_MASK_MTFACE | CD_MASK_MCOL);
dm->release(dm);
- for (psys=ob->particlesystem.first; psys; psys=psys->next)
+ for (psys = ob->particlesystem.first; psys; psys = psys->next)
psys_get_modifier(ob, psys)->flag &= ~eParticleSystemFlag_psys_updated;
}
}
@@ -2665,18 +2652,18 @@ void object_handle_update(Scene *scene, Object *ob)
/* check if quick cache is needed */
BKE_ptcache_ids_from_object(&pidlist, ob, scene, MAX_DUPLI_RECUR);
- for (pid=pidlist.first; pid; pid=pid->next) {
+ for (pid = pidlist.first; pid; pid = pid->next) {
if ((pid->cache->flag & PTCACHE_BAKED) ||
(pid->cache->flag & PTCACHE_QUICK_CACHE) == 0)
{
continue;
}
- if (pid->cache->flag & PTCACHE_OUTDATED || (pid->cache->flag & PTCACHE_SIMULATION_VALID)==0) {
+ if (pid->cache->flag & PTCACHE_OUTDATED || (pid->cache->flag & PTCACHE_SIMULATION_VALID) == 0) {
scene->physics_settings.quick_cache_step =
- scene->physics_settings.quick_cache_step ?
- MIN2(scene->physics_settings.quick_cache_step, pid->cache->step) :
- pid->cache->step;
+ scene->physics_settings.quick_cache_step ?
+ MIN2(scene->physics_settings.quick_cache_step, pid->cache->step) :
+ pid->cache->step;
}
}
@@ -2684,11 +2671,11 @@ void object_handle_update(Scene *scene, Object *ob)
}
/* the no-group proxy case, we call update */
- if (ob->proxy && ob->proxy_group==NULL) {
+ if (ob->proxy && ob->proxy_group == NULL) {
/* set pointer in library proxy target, for copying, but restore it */
- ob->proxy->proxy_from= ob;
+ ob->proxy->proxy_from = ob;
// printf("call update, lib ob %s proxy %s\n", ob->proxy->id.name, ob->id.name);
- object_handle_update(scene, ob->proxy);
+ BKE_object_handle_update(scene, ob->proxy);
}
ob->recalc &= ~OB_RECALC_ALL;
@@ -2696,22 +2683,22 @@ void object_handle_update(Scene *scene, Object *ob)
/* the case when this is a group proxy, object_update is called in group.c */
if (ob->proxy) {
- ob->proxy->proxy_from= ob;
+ ob->proxy->proxy_from = ob;
// printf("set proxy pointer for later group stuff %s\n", ob->id.name);
}
}
-void object_sculpt_modifiers_changed(Object *ob)
+void BKE_object_sculpt_modifiers_changed(Object *ob)
{
- SculptSession *ss= ob->sculpt;
+ SculptSession *ss = ob->sculpt;
if (!ss->cache) {
/* we free pbvh on changes, except during sculpt since it can't deal with
* changing PVBH node organization, we hope topology does not change in
* the meantime .. weak */
if (ss->pbvh) {
- BLI_pbvh_free(ss->pbvh);
- ss->pbvh= NULL;
+ BLI_pbvh_free(ss->pbvh);
+ ss->pbvh = NULL;
}
free_sculptsession_deformMats(ob->sculpt);
@@ -2729,42 +2716,42 @@ void object_sculpt_modifiers_changed(Object *ob)
}
}
-int give_obdata_texspace(Object *ob, short **texflag, float **loc, float **size, float **rot)
+int BKE_object_obdata_texspace_get(Object *ob, short **r_texflag, float **r_loc, float **r_size, float **r_rot)
{
- if (ob->data==NULL)
+ if (ob->data == NULL)
return 0;
switch (GS(((ID *)ob->data)->name)) {
- case ID_ME:
- {
- Mesh *me= ob->data;
- if (texflag) *texflag = &me->texflag;
- if (loc) *loc = me->loc;
- if (size) *size = me->size;
- if (rot) *rot = me->rot;
- break;
- }
- case ID_CU:
- {
- Curve *cu= ob->data;
- if (texflag) *texflag = &cu->texflag;
- if (loc) *loc = cu->loc;
- if (size) *size = cu->size;
- if (rot) *rot = cu->rot;
- break;
- }
- case ID_MB:
- {
- MetaBall *mb= ob->data;
- if (texflag) *texflag = &mb->texflag;
- if (loc) *loc = mb->loc;
- if (size) *size = mb->size;
- if (rot) *rot = mb->rot;
- break;
- }
- default:
- return 0;
+ case ID_ME:
+ {
+ Mesh *me = ob->data;
+ if (r_texflag) *r_texflag = &me->texflag;
+ if (r_loc) *r_loc = me->loc;
+ if (r_size) *r_size = me->size;
+ if (r_rot) *r_rot = me->rot;
+ break;
+ }
+ case ID_CU:
+ {
+ Curve *cu = ob->data;
+ if (r_texflag) *r_texflag = &cu->texflag;
+ if (r_loc) *r_loc = cu->loc;
+ if (r_size) *r_size = cu->size;
+ if (r_rot) *r_rot = cu->rot;
+ break;
+ }
+ case ID_MB:
+ {
+ MetaBall *mb = ob->data;
+ if (r_texflag) *r_texflag = &mb->texflag;
+ if (r_loc) *r_loc = mb->loc;
+ if (r_size) *r_size = mb->size;
+ if (r_rot) *r_rot = mb->rot;
+ break;
+ }
+ default:
+ return 0;
}
return 1;
}
@@ -2773,7 +2760,7 @@ int give_obdata_texspace(Object *ob, short **texflag, float **loc, float **size,
* Test a bounding box for ray intersection
* assumes the ray is already local to the boundbox space
*/
-int ray_hit_boundbox(struct BoundBox *bb, float ray_start[3], float ray_normal[3])
+int BKE_boundbox_ray_hit_check(struct BoundBox *bb, float ray_start[3], float ray_normal[3])
{
static int triangle_indexes[12][3] = {{0, 1, 2}, {0, 2, 3},
{3, 2, 6}, {3, 6, 7},
@@ -2784,8 +2771,7 @@ int ray_hit_boundbox(struct BoundBox *bb, float ray_start[3], float ray_normal[3
int result = 0;
int i;
- for (i = 0; i < 12 && result == 0; i++)
- {
+ for (i = 0; i < 12 && result == 0; i++) {
float lambda;
int v1, v2, v3;
v1 = triangle_indexes[i][0];
@@ -2805,15 +2791,14 @@ static int pc_cmp(void *a, void *b)
else return 0;
}
-int object_insert_ptcache(Object *ob)
+int BKE_object_insert_ptcache(Object *ob)
{
LinkData *link = NULL;
int i = 0;
BLI_sortlist(&ob->pc_ids, pc_cmp);
- for (link=ob->pc_ids.first, i = 0; link; link=link->next, i++)
- {
+ for (link = ob->pc_ids.first, i = 0; link; link = link->next, i++) {
int index = GET_INT_FROM_POINTER(link->data);
if (i < index)
@@ -2830,18 +2815,18 @@ int object_insert_ptcache(Object *ob)
#if 0
static int pc_findindex(ListBase *listbase, int index)
{
- LinkData *link= NULL;
- int number= 0;
+ LinkData *link = NULL;
+ int number = 0;
if (listbase == NULL) return -1;
- link= listbase->first;
+ link = listbase->first;
while (link) {
if ((int)link->data == index)
return number;
number++;
- link= link->next;
+ link = link->next;
}
return -1;
@@ -2860,30 +2845,30 @@ void object_delete_ptcache(Object *ob, int index)
/************************* Mesh ************************/
static KeyBlock *insert_meshkey(Scene *scene, Object *ob, const char *name, int from_mix)
{
- Mesh *me= ob->data;
- Key *key= me->key;
+ Mesh *me = ob->data;
+ Key *key = me->key;
KeyBlock *kb;
- int newkey= 0;
+ int newkey = 0;
if (key == NULL) {
- key= me->key= add_key((ID *)me);
- key->type= KEY_RELATIVE;
- newkey= 1;
+ key = me->key = add_key((ID *)me);
+ key->type = KEY_RELATIVE;
+ newkey = 1;
}
- if (newkey || from_mix==FALSE) {
+ if (newkey || from_mix == FALSE) {
/* create from mesh */
kb = add_keyblock_ctime(key, name, FALSE);
mesh_to_key(me, kb);
}
else {
/* copy from current values */
- float *data= do_ob_key(scene, ob);
+ float *data = do_ob_key(scene, ob);
/* create new block with prepared data */
kb = add_keyblock_ctime(key, name, FALSE);
- kb->data= data;
- kb->totelem= me->totvert;
+ kb->data = data;
+ kb->totelem = me->totvert;
}
return kb;
@@ -2891,23 +2876,23 @@ static KeyBlock *insert_meshkey(Scene *scene, Object *ob, const char *name, int
/************************* Lattice ************************/
static KeyBlock *insert_lattkey(Scene *scene, Object *ob, const char *name, int from_mix)
{
- Lattice *lt= ob->data;
- Key *key= lt->key;
+ Lattice *lt = ob->data;
+ Key *key = lt->key;
KeyBlock *kb;
- int newkey= 0;
+ int newkey = 0;
- if (key==NULL) {
- key= lt->key= add_key( (ID *)lt);
- key->type= KEY_RELATIVE;
- newkey= 1;
+ if (key == NULL) {
+ key = lt->key = add_key((ID *)lt);
+ key->type = KEY_RELATIVE;
+ newkey = 1;
}
- if (newkey || from_mix==FALSE) {
+ if (newkey || from_mix == FALSE) {
kb = add_keyblock_ctime(key, name, FALSE);
if (!newkey) {
- KeyBlock *basekb= (KeyBlock *)key->block.first;
- kb->data= MEM_dupallocN(basekb->data);
- kb->totelem= basekb->totelem;
+ KeyBlock *basekb = (KeyBlock *)key->block.first;
+ kb->data = MEM_dupallocN(basekb->data);
+ kb->totelem = basekb->totelem;
}
else {
latt_to_key(lt, kb);
@@ -2915,12 +2900,12 @@ static KeyBlock *insert_lattkey(Scene *scene, Object *ob, const char *name, int
}
else {
/* copy from current values */
- float *data= do_ob_key(scene, ob);
+ float *data = do_ob_key(scene, ob);
/* create new block with prepared data */
kb = add_keyblock_ctime(key, name, FALSE);
- kb->totelem= lt->pntsu*lt->pntsv*lt->pntsw;
- kb->data= data;
+ kb->totelem = lt->pntsu * lt->pntsv * lt->pntsw;
+ kb->data = data;
}
return kb;
@@ -2928,25 +2913,25 @@ static KeyBlock *insert_lattkey(Scene *scene, Object *ob, const char *name, int
/************************* Curve ************************/
static KeyBlock *insert_curvekey(Scene *scene, Object *ob, const char *name, int from_mix)
{
- Curve *cu= ob->data;
- Key *key= cu->key;
+ Curve *cu = ob->data;
+ Key *key = cu->key;
KeyBlock *kb;
- ListBase *lb= BKE_curve_nurbs(cu);
- int newkey= 0;
+ ListBase *lb = BKE_curve_nurbs_get(cu);
+ int newkey = 0;
- if (key==NULL) {
- key= cu->key= add_key( (ID *)cu);
+ if (key == NULL) {
+ key = cu->key = add_key((ID *)cu);
key->type = KEY_RELATIVE;
- newkey= 1;
+ newkey = 1;
}
- if (newkey || from_mix==FALSE) {
+ if (newkey || from_mix == FALSE) {
/* create from curve */
kb = add_keyblock_ctime(key, name, FALSE);
if (!newkey) {
- KeyBlock *basekb= (KeyBlock *)key->block.first;
- kb->data= MEM_dupallocN(basekb->data);
- kb->totelem= basekb->totelem;
+ KeyBlock *basekb = (KeyBlock *)key->block.first;
+ kb->data = MEM_dupallocN(basekb->data);
+ kb->totelem = basekb->totelem;
}
else {
curve_to_key(cu, kb, lb);
@@ -2954,18 +2939,18 @@ static KeyBlock *insert_curvekey(Scene *scene, Object *ob, const char *name, int
}
else {
/* copy from current values */
- float *data= do_ob_key(scene, ob);
+ float *data = do_ob_key(scene, ob);
/* create new block with prepared data */
kb = add_keyblock_ctime(key, name, FALSE);
- kb->totelem= count_curveverts(lb);
- kb->data= data;
+ kb->totelem = BKE_nurbList_verts_count(lb);
+ kb->data = data;
}
return kb;
}
-KeyBlock *object_insert_shape_key(Scene *scene, Object *ob, const char *name, int from_mix)
+KeyBlock *BKE_object_insert_shape_key(Scene *scene, Object *ob, const char *name, int from_mix)
{
switch (ob->type) {
case OB_MESH:
@@ -2982,11 +2967,10 @@ KeyBlock *object_insert_shape_key(Scene *scene, Object *ob, const char *name, in
}
/* most important if this is modified it should _always_ return True, in certain
- * cases false positives are hard to avoid (shape keys for eg)
- */
-int object_is_modified(Scene *scene, Object *ob)
+ * cases false positives are hard to avoid (shape keys for example) */
+int BKE_object_is_modified(Scene *scene, Object *ob)
{
- int flag= 0;
+ int flag = 0;
if (ob_get_key(ob)) {
flag |= eModifierMode_Render;
@@ -2994,17 +2978,42 @@ int object_is_modified(Scene *scene, Object *ob)
else {
ModifierData *md;
/* cloth */
- for (md=modifiers_getVirtualModifierList(ob);
+ for (md = modifiers_getVirtualModifierList(ob);
md && (flag != (eModifierMode_Render | eModifierMode_Realtime));
- md=md->next)
+ md = md->next)
{
- if ((flag & eModifierMode_Render) == 0 && modifier_isEnabled(scene, md, eModifierMode_Render)) {
+ if ((flag & eModifierMode_Render) == 0 && modifier_isEnabled(scene, md, eModifierMode_Render))
flag |= eModifierMode_Render;
- }
- if ((flag & eModifierMode_Realtime) == 0 && modifier_isEnabled(scene, md, eModifierMode_Realtime)) {
+ if ((flag & eModifierMode_Realtime) == 0 && modifier_isEnabled(scene, md, eModifierMode_Realtime))
+ flag |= eModifierMode_Realtime;
+ }
+ }
+
+ return flag;
+}
+
+/* test if object is affected by deforming modifiers (for motion blur). again
+ * most important is to avoid false positives, this is to skip computations
+ * and we can still if there was actual deformation afterwards */
+int BKE_object_is_deform_modified(Scene *scene, Object *ob)
+{
+ ModifierData *md;
+ int flag = 0;
+
+ /* cloth */
+ for (md = modifiers_getVirtualModifierList(ob);
+ md && (flag != (eModifierMode_Render | eModifierMode_Realtime));
+ md = md->next)
+ {
+ ModifierTypeInfo *mti = modifierType_getInfo(md->type);
+
+ if (mti->type == eModifierTypeType_OnlyDeform) {
+ if (!(flag & eModifierMode_Render) && modifier_isEnabled(scene, md, eModifierMode_Render))
+ flag |= eModifierMode_Render;
+
+ if (!(flag & eModifierMode_Realtime) && modifier_isEnabled(scene, md, eModifierMode_Realtime))
flag |= eModifierMode_Realtime;
- }
}
}
@@ -3017,7 +3026,7 @@ static void copy_object__forwardModifierLinks(void *UNUSED(userData), Object *UN
if (*idpoin && (*idpoin)->newid) *idpoin = (*idpoin)->newid;
}
-void object_relink(Object *ob)
+void BKE_object_relink(Object *ob)
{
if (ob->id.lib)
return;
@@ -3025,7 +3034,7 @@ void object_relink(Object *ob)
relink_constraints(&ob->constraints);
if (ob->pose) {
bPoseChannel *chan;
- for (chan = ob->pose->chanbase.first; chan; chan=chan->next) {
+ for (chan = ob->pose->chanbase.first; chan; chan = chan->next) {
relink_constraints(&chan->constraints);
}
}
@@ -3040,26 +3049,26 @@ void object_relink(Object *ob)
ID_NEW(ob->proxy_group);
}
-MovieClip *object_get_movieclip(Scene *scene, Object *ob, int use_default)
+MovieClip *BKE_object_movieclip_get(Scene *scene, Object *ob, int use_default)
{
- MovieClip *clip= use_default ? scene->clip : NULL;
- bConstraint *con= ob->constraints.first, *scon= NULL;
+ MovieClip *clip = use_default ? scene->clip : NULL;
+ bConstraint *con = ob->constraints.first, *scon = NULL;
while (con) {
- if (con->type==CONSTRAINT_TYPE_CAMERASOLVER) {
- if (scon==NULL || (scon->flag&CONSTRAINT_OFF))
- scon= con;
+ if (con->type == CONSTRAINT_TYPE_CAMERASOLVER) {
+ if (scon == NULL || (scon->flag & CONSTRAINT_OFF))
+ scon = con;
}
- con= con->next;
+ con = con->next;
}
if (scon) {
- bCameraSolverConstraint *solver= scon->data;
- if ((solver->flag&CAMERASOLVER_ACTIVECLIP)==0)
- clip= solver->clip;
+ bCameraSolverConstraint *solver = scon->data;
+ if ((solver->flag & CAMERASOLVER_ACTIVECLIP) == 0)
+ clip = solver->clip;
else
- clip= scene->clip;
+ clip = scene->clip;
}
return clip;
diff --git a/source/blender/blenkernel/intern/ocean.c b/source/blender/blenkernel/intern/ocean.c
index 907de7888cb..6242976d323 100644
--- a/source/blender/blenkernel/intern/ocean.c
+++ b/source/blender/blenkernel/intern/ocean.c
@@ -172,12 +172,12 @@ static float gaussRand (void)
/**
* Some useful functions
* */
-MINLINE float lerp(float a,float b,float f)
+MINLINE float lerp(float a, float b, float f)
{
return a + (b-a)*f;
}
-MINLINE float catrom(float p0,float p1,float p2,float p3,float f)
+MINLINE float catrom(float p0, float p1, float p2, float p3, float f)
{
return 0.5f *((2.0f * p1) +
(-p0 + p2) * f +
@@ -191,29 +191,27 @@ MINLINE float omega(float k, float depth)
}
// modified Phillips spectrum
-static float Ph(struct Ocean* o, float kx,float kz )
+static float Ph(struct Ocean* o, float kx, float kz )
{
float tmp;
float k2 = kx*kx + kz*kz;
- if (k2 == 0.0f)
- {
+ if (k2 == 0.0f) {
return 0.0f; // no DC component
}
// damp out the waves going in the direction opposite the wind
tmp = (o->_wx * kx + o->_wz * kz)/sqrtf(k2);
- if (tmp < 0)
- {
+ if (tmp < 0) {
tmp *= o->_damp_reflections;
}
- return o->_A * expf( -1.0f / (k2*(o->_L*o->_L))) * expf(-k2 * (o->_l*o->_l)) * powf(fabsf(tmp),o->_wind_alignment) / (k2*k2);
+ return o->_A * expf( -1.0f / (k2*(o->_L*o->_L))) * expf(-k2 * (o->_l*o->_l)) * powf(fabsf(tmp), o->_wind_alignment) / (k2*k2);
}
-static void compute_eigenstuff(struct OceanResult *ocr, float jxx,float jzz,float jxz)
+static void compute_eigenstuff(struct OceanResult *ocr, float jxx, float jzz, float jxz)
{
- float a,b,qplus,qminus;
+ float a, b, qplus, qminus;
a = jxx + jzz;
b = sqrt((jxx - jzz)*(jxx - jzz) + 4 * jxz * jxz);
@@ -306,15 +304,15 @@ float BKE_ocean_jminus_to_foam(float jminus, float coverage)
return foam*foam;
}
-void BKE_ocean_eval_uv(struct Ocean *oc, struct OceanResult *ocr, float u,float v)
+void BKE_ocean_eval_uv(struct Ocean *oc, struct OceanResult *ocr, float u, float v)
{
- int i0,i1,j0,j1;
- float frac_x,frac_z;
- float uu,vv;
+ int i0, i1, j0, j1;
+ float frac_x, frac_z;
+ float uu, vv;
- // first wrap the texture so 0 <= (u,v) < 1
- u = fmodf(u,1.0f);
- v = fmodf(v,1.0f);
+ // first wrap the texture so 0 <= (u, v) < 1
+ u = fmodf(u, 1.0f);
+ v = fmodf(v, 1.0f);
if (u < 0) u += 1.0f;
if (v < 0) v += 1.0f;
@@ -340,7 +338,7 @@ void BKE_ocean_eval_uv(struct Ocean *oc, struct OceanResult *ocr, float u,float
j1 = j1 % oc->_N;
-#define BILERP(m) (lerp(lerp(m[i0*oc->_N+j0],m[i1*oc->_N+j0],frac_x),lerp(m[i0*oc->_N+j1],m[i1*oc->_N+j1],frac_x),frac_z))
+#define BILERP(m) (lerp(lerp(m[i0*oc->_N+j0], m[i1*oc->_N+j0], frac_x), lerp(m[i0*oc->_N+j1], m[i1*oc->_N+j1], frac_x), frac_z))
{
if (oc->_do_disp_y) {
ocr->disp[1] = BILERP(oc->_disp_y);
@@ -362,7 +360,7 @@ void BKE_ocean_eval_uv(struct Ocean *oc, struct OceanResult *ocr, float u,float
}
if (oc->_do_jacobian) {
- compute_eigenstuff(ocr, BILERP(oc->_Jxx),BILERP(oc->_Jzz),BILERP(oc->_Jxz));
+ compute_eigenstuff(ocr, BILERP(oc->_Jxx), BILERP(oc->_Jzz), BILERP(oc->_Jxz));
}
}
#undef BILERP
@@ -371,15 +369,15 @@ void BKE_ocean_eval_uv(struct Ocean *oc, struct OceanResult *ocr, float u,float
}
// use catmullrom interpolation rather than linear
-void BKE_ocean_eval_uv_catrom(struct Ocean *oc, struct OceanResult *ocr, float u,float v)
+void BKE_ocean_eval_uv_catrom(struct Ocean *oc, struct OceanResult *ocr, float u, float v)
{
- int i0,i1,i2,i3,j0,j1,j2,j3;
- float frac_x,frac_z;
- float uu,vv;
+ int i0, i1, i2, i3, j0, j1, j2, j3;
+ float frac_x, frac_z;
+ float uu, vv;
- // first wrap the texture so 0 <= (u,v) < 1
- u = fmod(u,1.0f);
- v = fmod(v,1.0f);
+ // first wrap the texture so 0 <= (u, v) < 1
+ u = fmod(u, 1.0f);
+ v = fmod(v, 1.0f);
if (u < 0) u += 1.0f;
if (v < 0) v += 1.0f;
@@ -414,25 +412,22 @@ void BKE_ocean_eval_uv_catrom(struct Ocean *oc, struct OceanResult *ocr, float u
j0 = j0 < 0 ? j0 + oc->_N : j0;
j3 = j3 >= oc->_N ? j3 - oc->_N : j3;
-#define INTERP(m) catrom(catrom(m[i0*oc->_N+j0],m[i1*oc->_N+j0],m[i2*oc->_N+j0],m[i3*oc->_N+j0],frac_x),\
- catrom(m[i0*oc->_N+j1],m[i1*oc->_N+j1],m[i2*oc->_N+j1],m[i3*oc->_N+j1],frac_x),\
- catrom(m[i0*oc->_N+j2],m[i1*oc->_N+j2],m[i2*oc->_N+j2],m[i3*oc->_N+j2],frac_x),\
- catrom(m[i0*oc->_N+j3],m[i1*oc->_N+j3],m[i2*oc->_N+j3],m[i3*oc->_N+j3],frac_x),\
+#define INTERP(m) catrom(catrom(m[i0*oc->_N+j0], m[i1*oc->_N+j0], m[i2*oc->_N+j0], m[i3*oc->_N+j0], frac_x), \
+ catrom(m[i0*oc->_N+j1], m[i1*oc->_N+j1], m[i2*oc->_N+j1], m[i3*oc->_N+j1], frac_x), \
+ catrom(m[i0*oc->_N+j2], m[i1*oc->_N+j2], m[i2*oc->_N+j2], m[i3*oc->_N+j2], frac_x), \
+ catrom(m[i0*oc->_N+j3], m[i1*oc->_N+j3], m[i2*oc->_N+j3], m[i3*oc->_N+j3], frac_x), \
frac_z)
{
- if (oc->_do_disp_y)
- {
+ if (oc->_do_disp_y) {
ocr->disp[1] = INTERP(oc->_disp_y);
}
- if (oc->_do_normals)
- {
+ if (oc->_do_normals) {
ocr->normal[0] = INTERP(oc->_N_x);
ocr->normal[1] = oc->_N_y/*INTERP(oc->_N_y) (MEM01)*/;
ocr->normal[2] = INTERP(oc->_N_z);
}
- if (oc->_do_chop)
- {
+ if (oc->_do_chop) {
ocr->disp[0] = INTERP(oc->_disp_x);
ocr->disp[2] = INTERP(oc->_disp_z);
}
@@ -441,9 +436,8 @@ void BKE_ocean_eval_uv_catrom(struct Ocean *oc, struct OceanResult *ocr, float u
ocr->disp[2] = 0.0;
}
- if (oc->_do_jacobian)
- {
- compute_eigenstuff(ocr, INTERP(oc->_Jxx),INTERP(oc->_Jzz),INTERP(oc->_Jxz));
+ if (oc->_do_jacobian) {
+ compute_eigenstuff(ocr, INTERP(oc->_Jxx), INTERP(oc->_Jzz), INTERP(oc->_Jxz));
}
}
#undef INTERP
@@ -452,20 +446,20 @@ void BKE_ocean_eval_uv_catrom(struct Ocean *oc, struct OceanResult *ocr, float u
}
-void BKE_ocean_eval_xz(struct Ocean *oc, struct OceanResult *ocr, float x,float z)
+void BKE_ocean_eval_xz(struct Ocean *oc, struct OceanResult *ocr, float x, float z)
{
- BKE_ocean_eval_uv(oc, ocr, x/oc->_Lx,z/oc->_Lz);
+ BKE_ocean_eval_uv(oc, ocr, x/oc->_Lx, z/oc->_Lz);
}
-void BKE_ocean_eval_xz_catrom(struct Ocean *oc, struct OceanResult *ocr, float x,float z)
+void BKE_ocean_eval_xz_catrom(struct Ocean *oc, struct OceanResult *ocr, float x, float z)
{
- BKE_ocean_eval_uv_catrom(oc, ocr, x/oc->_Lx,z/oc->_Lz);
+ BKE_ocean_eval_uv_catrom(oc, ocr, x/oc->_Lx, z/oc->_Lz);
}
-// note that this doesn't wrap properly for i,j < 0, but its
+// note that this doesn't wrap properly for i, j < 0, but its
// not really meant for that being just a way to get the raw data out
// to save in some image format.
-void BKE_ocean_eval_ij(struct Ocean *oc, struct OceanResult *ocr, int i,int j)
+void BKE_ocean_eval_ij(struct Ocean *oc, struct OceanResult *ocr, int i, int j)
{
BLI_rw_mutex_lock(&oc->oceanmutex, THREAD_LOCK_READ);
@@ -474,8 +468,7 @@ void BKE_ocean_eval_ij(struct Ocean *oc, struct OceanResult *ocr, int i,int j)
ocr->disp[1] = oc->_do_disp_y ? oc->_disp_y[i*oc->_N+j] : 0.0f;
- if (oc->_do_chop)
- {
+ if (oc->_do_chop) {
ocr->disp[0] = oc->_disp_x[i*oc->_N+j];
ocr->disp[2] = oc->_disp_z[i*oc->_N+j];
}
@@ -484,8 +477,7 @@ void BKE_ocean_eval_ij(struct Ocean *oc, struct OceanResult *ocr, int i,int j)
ocr->disp[2] = 0.0f;
}
- if (oc->_do_normals)
- {
+ if (oc->_do_normals) {
ocr->normal[0] = oc->_N_x[i*oc->_N+j];
ocr->normal[1] = oc->_N_y/*oc->_N_y[i*oc->_N+j] (MEM01)*/;
ocr->normal[2] = oc->_N_z[i*oc->_N+j];
@@ -493,9 +485,8 @@ void BKE_ocean_eval_ij(struct Ocean *oc, struct OceanResult *ocr, int i,int j)
normalize_v3(ocr->normal);
}
- if (oc->_do_jacobian)
- {
- compute_eigenstuff(ocr, oc->_Jxx[i*oc->_N+j],oc->_Jzz[i*oc->_N+j],oc->_Jxz[i*oc->_N+j]);
+ if (oc->_do_jacobian) {
+ compute_eigenstuff(ocr, oc->_Jxx[i*oc->_N+j], oc->_Jzz[i*oc->_N+j], oc->_Jxz[i*oc->_N+j]);
}
BLI_rw_mutex_unlock(&oc->oceanmutex);
@@ -511,19 +502,17 @@ void BKE_simulate_ocean(struct Ocean *o, float t, float scale, float chop_amount
// compute a new htilda
#pragma omp parallel for private(i, j)
- for (i = 0 ; i < o->_M ; ++i)
- {
+ for (i = 0 ; i < o->_M ; ++i) {
// note the <= _N/2 here, see the fftw doco about
// the mechanics of the complex->real fft storage
- for ( j = 0 ; j <= o->_N / 2 ; ++j)
- {
+ for ( j = 0 ; j <= o->_N / 2 ; ++j) {
fftw_complex exp_param1;
fftw_complex exp_param2;
fftw_complex conj_param;
- init_complex(exp_param1, 0.0, omega(o->_k[i*(1+o->_N/2)+j],o->_depth)*t);
- init_complex(exp_param2, 0.0, -omega(o->_k[i*(1+o->_N/2)+j],o->_depth)*t);
+ init_complex(exp_param1, 0.0, omega(o->_k[i*(1+o->_N/2)+j], o->_depth)*t);
+ init_complex(exp_param2, 0.0, -omega(o->_k[i*(1+o->_N/2)+j], o->_depth)*t);
exp_complex(exp_param1, exp_param1);
exp_complex(exp_param2, exp_param2);
conj_complex(conj_param, o->_h0_minus[i*o->_N+j]);
@@ -541,8 +530,7 @@ void BKE_simulate_ocean(struct Ocean *o, float t, float scale, float chop_amount
#pragma omp section
{
- if (o->_do_disp_y)
- {
+ if (o->_do_disp_y) {
// y displacement
fftw_execute(o->_disp_y_plan);
}
@@ -550,13 +538,10 @@ void BKE_simulate_ocean(struct Ocean *o, float t, float scale, float chop_amount
#pragma omp section
{
- if (o->_do_chop)
- {
+ if (o->_do_chop) {
// x displacement
- for ( i = 0 ; i < o->_M ; ++i)
- {
- for ( j = 0 ; j <= o->_N / 2 ; ++j)
- {
+ for ( i = 0 ; i < o->_M ; ++i) {
+ for ( j = 0 ; j <= o->_N / 2 ; ++j) {
fftw_complex mul_param;
fftw_complex minus_i;
@@ -575,13 +560,10 @@ void BKE_simulate_ocean(struct Ocean *o, float t, float scale, float chop_amount
#pragma omp section
{
- if (o->_do_chop)
- {
+ if (o->_do_chop) {
// z displacement
- for ( i = 0 ; i < o->_M ; ++i)
- {
- for ( j = 0 ; j <= o->_N / 2 ; ++j)
- {
+ for ( i = 0 ; i < o->_M ; ++i) {
+ for ( j = 0 ; j <= o->_N / 2 ; ++j) {
fftw_complex mul_param;
fftw_complex minus_i;
@@ -600,13 +582,10 @@ void BKE_simulate_ocean(struct Ocean *o, float t, float scale, float chop_amount
#pragma omp section
{
- if (o->_do_jacobian)
- {
+ if (o->_do_jacobian) {
// Jxx
- for ( i = 0 ; i < o->_M ; ++i)
- {
- for ( j = 0 ; j <= o->_N / 2 ; ++j)
- {
+ for ( i = 0 ; i < o->_M ; ++i) {
+ for ( j = 0 ; j <= o->_N / 2 ; ++j) {
fftw_complex mul_param;
//init_complex(mul_param, -scale, 0);
@@ -620,10 +599,8 @@ void BKE_simulate_ocean(struct Ocean *o, float t, float scale, float chop_amount
}
fftw_execute(o->_Jxx_plan);
- for ( i = 0 ; i < o->_M ; ++i)
- {
- for ( j = 0 ; j < o->_N ; ++j)
- {
+ for ( i = 0 ; i < o->_M ; ++i) {
+ for ( j = 0 ; j < o->_N ; ++j) {
o->_Jxx[i*o->_N+j] += 1.0;
}
}
@@ -632,13 +609,10 @@ void BKE_simulate_ocean(struct Ocean *o, float t, float scale, float chop_amount
#pragma omp section
{
- if (o->_do_jacobian)
- {
+ if (o->_do_jacobian) {
// Jzz
- for ( i = 0 ; i < o->_M ; ++i)
- {
- for ( j = 0 ; j <= o->_N / 2 ; ++j)
- {
+ for ( i = 0 ; i < o->_M ; ++i) {
+ for ( j = 0 ; j <= o->_N / 2 ; ++j) {
fftw_complex mul_param;
//init_complex(mul_param, -scale, 0);
@@ -651,10 +625,8 @@ void BKE_simulate_ocean(struct Ocean *o, float t, float scale, float chop_amount
}
}
fftw_execute(o->_Jzz_plan);
- for ( i = 0 ; i < o->_M ; ++i)
- {
- for ( j = 0 ; j < o->_N ; ++j)
- {
+ for ( i = 0 ; i < o->_M ; ++i) {
+ for ( j = 0 ; j < o->_N ; ++j) {
o->_Jzz[i*o->_N+j] += 1.0;
}
}
@@ -663,13 +635,10 @@ void BKE_simulate_ocean(struct Ocean *o, float t, float scale, float chop_amount
#pragma omp section
{
- if (o->_do_jacobian)
- {
+ if (o->_do_jacobian) {
// Jxz
- for ( i = 0 ; i < o->_M ; ++i)
- {
- for ( j = 0 ; j <= o->_N / 2 ; ++j)
- {
+ for ( i = 0 ; i < o->_M ; ++i) {
+ for ( j = 0 ; j <= o->_N / 2 ; ++j) {
fftw_complex mul_param;
//init_complex(mul_param, -scale, 0);
@@ -688,12 +657,9 @@ void BKE_simulate_ocean(struct Ocean *o, float t, float scale, float chop_amount
#pragma omp section
{
// fft normals
- if (o->_do_normals)
- {
- for ( i = 0 ; i < o->_M ; ++i)
- {
- for ( j = 0 ; j <= o->_N / 2 ; ++j)
- {
+ if (o->_do_normals) {
+ for ( i = 0 ; i < o->_M ; ++i) {
+ for ( j = 0 ; j <= o->_N / 2 ; ++j) {
fftw_complex mul_param;
init_complex(mul_param, 0.0, -1.0);
@@ -709,12 +675,9 @@ void BKE_simulate_ocean(struct Ocean *o, float t, float scale, float chop_amount
#pragma omp section
{
- if (o->_do_normals)
- {
- for ( i = 0 ; i < o->_M ; ++i)
- {
- for ( j = 0 ; j <= o->_N / 2 ; ++j)
- {
+ if (o->_do_normals) {
+ for ( i = 0 ; i < o->_M ; ++i) {
+ for ( j = 0 ; j <= o->_N / 2 ; ++j) {
fftw_complex mul_param;
init_complex(mul_param, 0.0, -1.0);
@@ -747,7 +710,7 @@ static void set_height_normalize_factor(struct Ocean *oc)
float res = 1.0;
float max_h = 0.0;
- int i,j;
+ int i, j;
if (!oc->_do_disp_y) return;
@@ -757,12 +720,9 @@ static void set_height_normalize_factor(struct Ocean *oc)
BLI_rw_mutex_lock(&oc->oceanmutex, THREAD_LOCK_READ);
- for (i = 0; i < oc->_M; ++i)
- {
- for (j = 0; j < oc->_N; ++j)
- {
- if ( max_h < fabsf(oc->_disp_y[i*oc->_N+j]))
- {
+ for (i = 0; i < oc->_M; ++i) {
+ for (j = 0; j < oc->_N; ++j) {
+ if ( max_h < fabsf(oc->_disp_y[i*oc->_N+j])) {
max_h = fabsf(oc->_disp_y[i*oc->_N+j]);
}
}
@@ -786,10 +746,10 @@ struct Ocean *BKE_add_ocean(void)
return oc;
}
-void BKE_init_ocean(struct Ocean* o, int M,int N, float Lx, float Lz, float V, float l, float A, float w, float damp,
+void BKE_init_ocean(struct Ocean* o, int M, int N, float Lx, float Lz, float V, float l, float A, float w, float damp,
float alignment, float depth, float time, short do_height_field, short do_chop, short do_normals, short do_jacobian, int seed)
{
- int i,j,ii;
+ int i, j, ii;
BLI_rw_mutex_lock(&o->oceanmutex, THREAD_LOCK_WRITE);
@@ -832,7 +792,7 @@ void BKE_init_ocean(struct Ocean* o, int M,int N, float Lx, float Lz, float V, f
o->_kx[i] = 2.0f * (float)M_PI * i / o->_Lx;
// the -ve components
- for (i = o->_M-1,ii=0 ; i > o->_M/2 ; --i,++ii)
+ for (i = o->_M-1, ii=0 ; i > o->_M/2 ; --i, ++ii)
o->_kx[i] = -2.0f * (float)M_PI * ii / o->_Lx;
// the +ve components and DC
@@ -840,7 +800,7 @@ void BKE_init_ocean(struct Ocean* o, int M,int N, float Lx, float Lz, float V, f
o->_kz[i] = 2.0f * (float)M_PI * i / o->_Lz;
// the -ve components
- for (i = o->_N-1,ii=0 ; i > o->_N/2 ; --i,++ii)
+ for (i = o->_N-1, ii=0 ; i > o->_N/2 ; --i, ++ii)
o->_kz[i] = -2.0f * (float)M_PI * ii / o->_Lz;
// pre-calculate the k matrix
@@ -851,17 +811,15 @@ void BKE_init_ocean(struct Ocean* o, int M,int N, float Lx, float Lz, float V, f
/*srand(seed);*/
BLI_srand(seed);
- for (i = 0 ; i < o->_M ; ++i)
- {
- for (j = 0 ; j < o->_N ; ++j)
- {
+ for (i = 0 ; i < o->_M ; ++i) {
+ for (j = 0 ; j < o->_N ; ++j) {
float r1 = gaussRand();
float r2 = gaussRand();
fftw_complex r1r2;
init_complex(r1r2, r1, r2);
mul_complex_f(o->_h0[i*o->_N+j], r1r2, (float)(sqrt(Ph(o, o->_kx[i], o->_kz[j]) / 2.0f)));
- mul_complex_f(o->_h0_minus[i*o->_N+j], r1r2, (float)(sqrt(Ph(o, -o->_kx[i],-o->_kz[j]) / 2.0f)));
+ mul_complex_f(o->_h0_minus[i*o->_N+j], r1r2, (float)(sqrt(Ph(o, -o->_kx[i], -o->_kz[j]) / 2.0f)));
}
}
@@ -870,7 +828,7 @@ void BKE_init_ocean(struct Ocean* o, int M,int N, float Lx, float Lz, float V, f
if (o->_do_disp_y) {
o->_disp_y = (double*) MEM_mallocN(o->_M * o->_N * sizeof(double), "ocean_disp_y");
- o->_disp_y_plan = fftw_plan_dft_c2r_2d(o->_M,o->_N, o->_fft_in, o->_disp_y, FFTW_ESTIMATE);
+ o->_disp_y_plan = fftw_plan_dft_c2r_2d(o->_M, o->_N, o->_fft_in, o->_disp_y, FFTW_ESTIMATE);
}
if (o->_do_normals) {
@@ -881,8 +839,8 @@ void BKE_init_ocean(struct Ocean* o, int M,int N, float Lx, float Lz, float V, f
/*o->_N_y = (float*) fftwf_malloc(o->_M * o->_N * sizeof(float)); (MEM01)*/
o->_N_z = (double*) MEM_mallocN(o->_M * o->_N * sizeof(double), "ocean_N_z");
- o->_N_x_plan = fftw_plan_dft_c2r_2d(o->_M,o->_N, o->_fft_in_nx, o->_N_x, FFTW_ESTIMATE);
- o->_N_z_plan = fftw_plan_dft_c2r_2d(o->_M,o->_N, o->_fft_in_nz, o->_N_z, FFTW_ESTIMATE);
+ o->_N_x_plan = fftw_plan_dft_c2r_2d(o->_M, o->_N, o->_fft_in_nx, o->_N_x, FFTW_ESTIMATE);
+ o->_N_z_plan = fftw_plan_dft_c2r_2d(o->_M, o->_N, o->_fft_in_nz, o->_N_z, FFTW_ESTIMATE);
}
if (o->_do_chop) {
@@ -892,8 +850,8 @@ void BKE_init_ocean(struct Ocean* o, int M,int N, float Lx, float Lz, float V, f
o->_disp_x = (double*) MEM_mallocN(o->_M * o->_N * sizeof(double), "ocean_disp_x");
o->_disp_z = (double*) MEM_mallocN(o->_M * o->_N * sizeof(double), "ocean_disp_z");
- o->_disp_x_plan = fftw_plan_dft_c2r_2d(o->_M,o->_N, o->_fft_in_x, o->_disp_x, FFTW_ESTIMATE);
- o->_disp_z_plan = fftw_plan_dft_c2r_2d(o->_M,o->_N, o->_fft_in_z, o->_disp_z, FFTW_ESTIMATE);
+ o->_disp_x_plan = fftw_plan_dft_c2r_2d(o->_M, o->_N, o->_fft_in_x, o->_disp_x, FFTW_ESTIMATE);
+ o->_disp_z_plan = fftw_plan_dft_c2r_2d(o->_M, o->_N, o->_fft_in_z, o->_disp_z, FFTW_ESTIMATE);
}
if (o->_do_jacobian) {
o->_fft_in_jxx = (fftw_complex*) MEM_mallocN(o->_M * (1+o->_N/2) * sizeof(fftw_complex), "ocean_fft_in_jxx");
@@ -904,9 +862,9 @@ void BKE_init_ocean(struct Ocean* o, int M,int N, float Lx, float Lz, float V, f
o->_Jzz = (double*) MEM_mallocN(o->_M * o->_N * sizeof(double), "ocean_Jzz");
o->_Jxz = (double*) MEM_mallocN(o->_M * o->_N * sizeof(double), "ocean_Jxz");
- o->_Jxx_plan = fftw_plan_dft_c2r_2d(o->_M,o->_N, o->_fft_in_jxx, o->_Jxx, FFTW_ESTIMATE);
- o->_Jzz_plan = fftw_plan_dft_c2r_2d(o->_M,o->_N, o->_fft_in_jzz, o->_Jzz, FFTW_ESTIMATE);
- o->_Jxz_plan = fftw_plan_dft_c2r_2d(o->_M,o->_N, o->_fft_in_jxz, o->_Jxz, FFTW_ESTIMATE);
+ o->_Jxx_plan = fftw_plan_dft_c2r_2d(o->_M, o->_N, o->_fft_in_jxx, o->_Jxx, FFTW_ESTIMATE);
+ o->_Jzz_plan = fftw_plan_dft_c2r_2d(o->_M, o->_N, o->_fft_in_jzz, o->_Jzz, FFTW_ESTIMATE);
+ o->_Jxz_plan = fftw_plan_dft_c2r_2d(o->_M, o->_N, o->_fft_in_jxz, o->_Jxz, FFTW_ESTIMATE);
}
BLI_rw_mutex_unlock(&o->oceanmutex);
@@ -921,14 +879,12 @@ void BKE_free_ocean_data(struct Ocean *oc)
BLI_rw_mutex_lock(&oc->oceanmutex, THREAD_LOCK_WRITE);
- if (oc->_do_disp_y)
- {
+ if (oc->_do_disp_y) {
fftw_destroy_plan(oc->_disp_y_plan);
MEM_freeN(oc->_disp_y);
}
- if (oc->_do_normals)
- {
+ if (oc->_do_normals) {
MEM_freeN(oc->_fft_in_nx);
MEM_freeN(oc->_fft_in_nz);
fftw_destroy_plan(oc->_N_x_plan);
@@ -938,8 +894,7 @@ void BKE_free_ocean_data(struct Ocean *oc)
MEM_freeN(oc->_N_z);
}
- if (oc->_do_chop)
- {
+ if (oc->_do_chop) {
MEM_freeN(oc->_fft_in_x);
MEM_freeN(oc->_fft_in_z);
fftw_destroy_plan(oc->_disp_x_plan);
@@ -948,8 +903,7 @@ void BKE_free_ocean_data(struct Ocean *oc)
MEM_freeN(oc->_disp_z);
}
- if (oc->_do_jacobian)
- {
+ if (oc->_do_jacobian) {
MEM_freeN(oc->_fft_in_jxx);
MEM_freeN(oc->_fft_in_jzz);
MEM_freeN(oc->_fft_in_jxz);
@@ -1002,7 +956,7 @@ static void cache_filename(char *string, const char *path, const char *relbase,
char cachepath[FILE_MAX];
const char *fname;
- switch(type) {
+ switch (type) {
case CACHE_TYPE_FOAM:
fname= "foam_";
break;
@@ -1043,8 +997,7 @@ void BKE_free_ocean_cache(struct OceanCache *och)
if (!och) return;
if (och->ibufs_disp) {
- for (i=och->start, f=0; i<=och->end; i++, f++)
- {
+ for (i=och->start, f=0; i<=och->end; i++, f++) {
if (och->ibufs_disp[f]) {
IMB_freeImBuf(och->ibufs_disp[f]);
}
@@ -1053,8 +1006,7 @@ void BKE_free_ocean_cache(struct OceanCache *och)
}
if (och->ibufs_foam) {
- for (i=och->start, f=0; i<=och->end; i++, f++)
- {
+ for (i=och->start, f=0; i<=och->end; i++, f++) {
if (och->ibufs_foam[f]) {
IMB_freeImBuf(och->ibufs_foam[f]);
}
@@ -1063,8 +1015,7 @@ void BKE_free_ocean_cache(struct OceanCache *och)
}
if (och->ibufs_norm) {
- for (i=och->start, f=0; i<=och->end; i++, f++)
- {
+ for (i=och->start, f=0; i<=och->end; i++, f++) {
if (och->ibufs_norm[f]) {
IMB_freeImBuf(och->ibufs_norm[f]);
}
@@ -1241,7 +1192,7 @@ void BKE_bake_ocean(struct Ocean *o, struct OceanCache *och, void (*update_cb)(v
if (o->_do_jacobian) {
/* TODO, cleanup unused code - campbell */
- float /*r,*/ /* UNUSED */ pr=0.0f, foam_result;
+ float /*r, */ /* UNUSED */ pr=0.0f, foam_result;
float neg_disp, neg_eplus;
ocr.foam = BKE_ocean_jminus_to_foam(ocr.Jminus, och->foam_coverage);
@@ -1300,18 +1251,18 @@ void BKE_bake_ocean(struct Ocean *o, struct OceanCache *och, void (*update_cb)(v
/* write the images */
cache_filename(string, och->bakepath, och->relbase, f, CACHE_TYPE_DISPLACE);
- if (0 == BKE_write_ibuf(ibuf_disp, string, &imf))
+ if (0 == BKE_imbuf_write(ibuf_disp, string, &imf))
printf("Cannot save Displacement File Output to %s\n", string);
if (o->_do_jacobian) {
cache_filename(string, och->bakepath, och->relbase, f, CACHE_TYPE_FOAM);
- if (0 == BKE_write_ibuf(ibuf_foam, string, &imf))
+ if (0 == BKE_imbuf_write(ibuf_foam, string, &imf))
printf("Cannot save Foam File Output to %s\n", string);
}
if (o->_do_normals) {
cache_filename(string, och->bakepath, och->relbase, f, CACHE_TYPE_NORMAL);
- if (0 == BKE_write_ibuf(ibuf_normal, string, &imf))
+ if (0 == BKE_imbuf_write(ibuf_normal, string, &imf))
printf("Cannot save Normal File Output to %s\n", string);
}
@@ -1347,24 +1298,24 @@ float BKE_ocean_jminus_to_foam(float UNUSED(jminus), float UNUSED(coverage))
return 0.0f;
}
-void BKE_ocean_eval_uv(struct Ocean *UNUSED(oc), struct OceanResult *UNUSED(ocr), float UNUSED(u),float UNUSED(v))
+void BKE_ocean_eval_uv(struct Ocean *UNUSED(oc), struct OceanResult *UNUSED(ocr), float UNUSED(u), float UNUSED(v))
{
}
// use catmullrom interpolation rather than linear
-void BKE_ocean_eval_uv_catrom(struct Ocean *UNUSED(oc), struct OceanResult *UNUSED(ocr), float UNUSED(u),float UNUSED(v))
+void BKE_ocean_eval_uv_catrom(struct Ocean *UNUSED(oc), struct OceanResult *UNUSED(ocr), float UNUSED(u), float UNUSED(v))
{
}
-void BKE_ocean_eval_xz(struct Ocean *UNUSED(oc), struct OceanResult *UNUSED(ocr), float UNUSED(x),float UNUSED(z))
+void BKE_ocean_eval_xz(struct Ocean *UNUSED(oc), struct OceanResult *UNUSED(ocr), float UNUSED(x), float UNUSED(z))
{
}
-void BKE_ocean_eval_xz_catrom(struct Ocean *UNUSED(oc), struct OceanResult *UNUSED(ocr), float UNUSED(x),float UNUSED(z))
+void BKE_ocean_eval_xz_catrom(struct Ocean *UNUSED(oc), struct OceanResult *UNUSED(ocr), float UNUSED(x), float UNUSED(z))
{
}
-void BKE_ocean_eval_ij(struct Ocean *UNUSED(oc), struct OceanResult *UNUSED(ocr), int UNUSED(i),int UNUSED(j))
+void BKE_ocean_eval_ij(struct Ocean *UNUSED(oc), struct OceanResult *UNUSED(ocr), int UNUSED(i), int UNUSED(j))
{
}
@@ -1379,7 +1330,7 @@ struct Ocean *BKE_add_ocean(void)
return oc;
}
-void BKE_init_ocean(struct Ocean* UNUSED(o), int UNUSED(M),int UNUSED(N), float UNUSED(Lx), float UNUSED(Lz), float UNUSED(V), float UNUSED(l), float UNUSED(A), float UNUSED(w), float UNUSED(damp),
+void BKE_init_ocean(struct Ocean* UNUSED(o), int UNUSED(M), int UNUSED(N), float UNUSED(Lx), float UNUSED(Lz), float UNUSED(V), float UNUSED(l), float UNUSED(A), float UNUSED(w), float UNUSED(damp),
float UNUSED(alignment), float UNUSED(depth), float UNUSED(time), short UNUSED(do_height_field), short UNUSED(do_chop), short UNUSED(do_normals), short UNUSED(do_jacobian), int UNUSED(seed))
{
}
diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c
index 8a940e339bc..a2c89967f44 100644
--- a/source/blender/blenkernel/intern/packedFile.c
+++ b/source/blender/blenkernel/intern/packedFile.c
@@ -72,18 +72,18 @@ int seekPackedFile(PackedFile *pf, int offset, int whence)
if (pf) {
oldseek = pf->seek;
- switch(whence) {
- case SEEK_CUR:
- seek = oldseek + offset;
- break;
- case SEEK_END:
- seek = pf->size + offset;
- break;
- case SEEK_SET:
- seek = offset;
- break;
- default:
- oldseek = -1;
+ switch (whence) {
+ case SEEK_CUR:
+ seek = oldseek + offset;
+ break;
+ case SEEK_END:
+ seek = pf->size + offset;
+ break;
+ case SEEK_SET:
+ seek = offset;
+ break;
+ default:
+ oldseek = -1;
}
if (seek < 0) {
seek = 0;
@@ -133,15 +133,15 @@ int countPackedFiles(Main *bmain)
int count = 0;
// let's check if there are packed files...
- for (ima=bmain->image.first; ima; ima=ima->id.next)
+ for (ima = bmain->image.first; ima; ima = ima->id.next)
if (ima->packedfile)
count++;
- for (vf=bmain->vfont.first; vf; vf=vf->id.next)
+ for (vf = bmain->vfont.first; vf; vf = vf->id.next)
if (vf->packedfile)
count++;
- for (sound=bmain->sound.first; sound; sound=sound->id.next)
+ for (sound = bmain->sound.first; sound; sound = sound->id.next)
if (sound->packedfile)
count++;
@@ -176,7 +176,7 @@ PackedFile *newPackedFile(ReportList *reports, const char *filename, const char
/* render result has no filename and can be ignored
* any other files with no name can be ignored too */
- if (filename[0]=='\0')
+ if (filename[0] == '\0')
return NULL;
//XXX waitcursor(1);
@@ -189,7 +189,7 @@ PackedFile *newPackedFile(ReportList *reports, const char *filename, const char
// open the file
// and create a PackedFile structure
- file= BLI_open(name, O_BINARY|O_RDONLY,0);
+ file = BLI_open(name, O_BINARY | O_RDONLY, 0);
if (file <= 0) {
BKE_reportf(reports, RPT_ERROR, "Unable to pack file, source path not found: \"%s\"", name);
}
@@ -222,23 +222,23 @@ void packAll(Main *bmain, ReportList *reports)
VFont *vf;
bSound *sound;
- for (ima=bmain->image.first; ima; ima=ima->id.next) {
- if (ima->packedfile == NULL && ima->id.lib==NULL) {
- if (ima->source==IMA_SRC_FILE) {
+ for (ima = bmain->image.first; ima; ima = ima->id.next) {
+ if (ima->packedfile == NULL && ima->id.lib == NULL) {
+ if (ima->source == IMA_SRC_FILE) {
ima->packedfile = newPackedFile(reports, ima->name, ID_BLEND_PATH(bmain, &ima->id));
}
else if (ELEM(ima->source, IMA_SRC_SEQUENCE, IMA_SRC_MOVIE)) {
- BKE_reportf(reports, RPT_WARNING, "Image '%s' skipped, movies and image sequences not supported.", ima->id.name+2);
+ BKE_reportf(reports, RPT_WARNING, "Image '%s' skipped, movies and image sequences not supported.", ima->id.name + 2);
}
}
}
- for (vf=bmain->vfont.first; vf; vf=vf->id.next)
- if (vf->packedfile == NULL && vf->id.lib==NULL && strcmp(vf->name, FO_BUILTIN_NAME) != 0)
+ for (vf = bmain->vfont.first; vf; vf = vf->id.next)
+ if (vf->packedfile == NULL && vf->id.lib == NULL && strcmp(vf->name, FO_BUILTIN_NAME) != 0)
vf->packedfile = newPackedFile(reports, vf->name, bmain->name);
- for (sound=bmain->sound.first; sound; sound=sound->id.next)
- if (sound->packedfile == NULL && sound->id.lib==NULL)
+ for (sound = bmain->sound.first; sound; sound = sound->id.next)
+ if (sound->packedfile == NULL && sound->id.lib == NULL)
sound->packedfile = newPackedFile(reports, sound->name, bmain->name);
}
@@ -257,12 +257,12 @@ static char *find_new_name(char *name)
if (fop_exists(name)) {
for (number = 1; number <= 999; number++) {
BLI_snprintf(tempname, sizeof(tempname), "%s.%03d", name, number);
- if (! fop_exists(tempname)) {
+ if (!fop_exists(tempname)) {
break;
}
}
}
- len= strlen(tempname) + 1;
+ len = strlen(tempname) + 1;
newname = MEM_mallocN(len, "find_new_name");
memcpy(newname, tempname, len * sizeof(char));
return newname;
@@ -275,7 +275,7 @@ int writePackedFile(ReportList *reports, const char *filename, PackedFile *pf, i
int ret_value = RET_OK;
char name[FILE_MAX];
char tempname[FILE_MAX];
-/* void *data; */
+/* void *data; */
if (guimode) {} //XXX waitcursor(1);
@@ -285,7 +285,7 @@ int writePackedFile(ReportList *reports, const char *filename, PackedFile *pf, i
if (BLI_exists(name)) {
for (number = 1; number <= 999; number++) {
BLI_snprintf(tempname, sizeof(tempname), "%s.%03d_", name, number);
- if (! BLI_exists(tempname)) {
+ if (!BLI_exists(tempname)) {
if (BLI_copy(name, tempname) == RET_OK) {
remove_tmp = TRUE;
}
@@ -392,7 +392,7 @@ int checkPackedFile(const char *filename, PackedFile *pf)
/* unpackFile() looks at the existing files (abs_name, local_name) and a packed file.
*
* It returns a char *to the existing file name / new file name or NULL when
- * there was an error or when the user desides to cancel the operation.
+ * there was an error or when the user decides to cancel the operation.
*/
char *unpackFile(ReportList *reports, const char *abs_name, const char *local_name, PackedFile *pf, int how)
@@ -409,7 +409,7 @@ char *unpackFile(ReportList *reports, const char *abs_name, const char *local_na
case PF_KEEP:
break;
case PF_REMOVE:
- temp= abs_name;
+ temp = abs_name;
break;
case PF_USE_LOCAL:
// if file exists use it
@@ -417,7 +417,7 @@ char *unpackFile(ReportList *reports, const char *abs_name, const char *local_na
temp = local_name;
break;
}
- // else fall through and create it
+ // else fall through and create it
case PF_WRITE_LOCAL:
if (writePackedFile(reports, local_name, pf, 1) == RET_OK) {
temp = local_name;
@@ -429,7 +429,7 @@ char *unpackFile(ReportList *reports, const char *abs_name, const char *local_na
temp = abs_name;
break;
}
- // else fall through and create it
+ // else fall through and create it
case PF_WRITE_ORIGINAL:
if (writePackedFile(reports, abs_name, pf, 1) == RET_OK) {
temp = abs_name;
@@ -441,7 +441,7 @@ char *unpackFile(ReportList *reports, const char *abs_name, const char *local_na
}
if (temp) {
- newname= BLI_strdup(temp);
+ newname = BLI_strdup(temp);
}
}
@@ -533,15 +533,15 @@ void unpackAll(Main *bmain, ReportList *reports, int how)
VFont *vf;
bSound *sound;
- for (ima=bmain->image.first; ima; ima=ima->id.next)
+ for (ima = bmain->image.first; ima; ima = ima->id.next)
if (ima->packedfile)
unpackImage(reports, ima, how);
- for (vf=bmain->vfont.first; vf; vf=vf->id.next)
+ for (vf = bmain->vfont.first; vf; vf = vf->id.next)
if (vf->packedfile)
unpackVFont(reports, vf, how);
- for (sound=bmain->sound.first; sound; sound=sound->id.next)
+ for (sound = bmain->sound.first; sound; sound = sound->id.next)
if (sound->packedfile)
unpackSound(bmain, reports, sound, how);
}
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c
index 27f5f7d9eb1..08d8479fd93 100644
--- a/source/blender/blenkernel/intern/paint.c
+++ b/source/blender/blenkernel/intern/paint.c
@@ -59,7 +59,7 @@ Paint *paint_get_active(Scene *sce)
ToolSettings *ts = sce->toolsettings;
if (sce->basact && sce->basact->object) {
- switch(sce->basact->object->mode) {
+ switch (sce->basact->object->mode) {
case OB_MODE_SCULPT:
return &ts->sculpt->paint;
case OB_MODE_VERTEX_PAINT:
@@ -126,7 +126,7 @@ void paint_init(Paint *p, const char col[3])
/* If there's no brush, create one */
brush = paint_brush(p);
if (brush == NULL)
- brush= add_brush("Brush");
+ brush= BKE_brush_add("Brush");
paint_brush_set(p, brush);
memcpy(p->paint_cursor_col, col, 3);
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index a154a1f8926..8676a3e75a0 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -84,35 +84,35 @@
#include "RE_render_ext.h"
static void get_child_modifier_parameters(ParticleSettings *part, ParticleThreadContext *ctx,
- ChildParticle *cpa, short cpa_from, int cpa_num, float *cpa_fuv, float *orco, ParticleTexture *ptex);
+ ChildParticle *cpa, short cpa_from, int cpa_num, float *cpa_fuv, float *orco, ParticleTexture *ptex);
static void do_child_modifiers(ParticleSimulationData *sim,
- ParticleTexture *ptex, ParticleKey *par, float *par_rot, ChildParticle *cpa,
- float *orco, float mat[4][4], ParticleKey *state, float t);
+ ParticleTexture *ptex, ParticleKey *par, float *par_rot, ChildParticle *cpa,
+ float *orco, float mat[4][4], ParticleKey *state, float t);
/* few helpers for countall etc. */
int count_particles(ParticleSystem *psys)
{
- ParticleSettings *part=psys->part;
+ ParticleSettings *part = psys->part;
PARTICLE_P;
- int tot=0;
+ int tot = 0;
LOOP_SHOWN_PARTICLES {
- if (pa->alive == PARS_UNBORN && (part->flag & PART_UNBORN)==0);
- else if (pa->alive == PARS_DEAD && (part->flag & PART_DIED)==0);
+ if (pa->alive == PARS_UNBORN && (part->flag & PART_UNBORN) == 0) ;
+ else if (pa->alive == PARS_DEAD && (part->flag & PART_DIED) == 0) ;
else tot++;
}
return tot;
}
int count_particles_mod(ParticleSystem *psys, int totgr, int cur)
{
- ParticleSettings *part=psys->part;
+ ParticleSettings *part = psys->part;
PARTICLE_P;
- int tot=0;
+ int tot = 0;
LOOP_SHOWN_PARTICLES {
- if (pa->alive == PARS_UNBORN && (part->flag & PART_UNBORN)==0);
- else if (pa->alive == PARS_DEAD && (part->flag & PART_DIED)==0);
- else if (p%totgr==cur) tot++;
+ if (pa->alive == PARS_UNBORN && (part->flag & PART_UNBORN) == 0) ;
+ else if (pa->alive == PARS_DEAD && (part->flag & PART_DIED) == 0) ;
+ else if (p % totgr == cur) tot++;
}
return tot;
}
@@ -127,17 +127,17 @@ static ParticleCacheKey **psys_alloc_path_cache_buffers(ListBase *bufs, int tot,
ParticleCacheKey **cache;
int i, totkey, totbufkey;
- tot= MAX2(tot, 1);
+ tot = MAX2(tot, 1);
totkey = 0;
- cache = MEM_callocN(tot*sizeof(void*), "PathCacheArray");
+ cache = MEM_callocN(tot * sizeof(void *), "PathCacheArray");
while (totkey < tot) {
- totbufkey= MIN2(tot-totkey, PATH_CACHE_BUF_SIZE);
- buf= MEM_callocN(sizeof(LinkData), "PathCacheLinkData");
- buf->data= MEM_callocN(sizeof(ParticleCacheKey)*totbufkey*steps, "ParticleCacheKey");
+ totbufkey = MIN2(tot - totkey, PATH_CACHE_BUF_SIZE);
+ buf = MEM_callocN(sizeof(LinkData), "PathCacheLinkData");
+ buf->data = MEM_callocN(sizeof(ParticleCacheKey) * totbufkey * steps, "ParticleCacheKey");
- for (i=0; i<totbufkey; i++)
- cache[totkey+i] = ((ParticleCacheKey*)buf->data) + i*steps;
+ for (i = 0; i < totbufkey; i++)
+ cache[totkey + i] = ((ParticleCacheKey *)buf->data) + i * steps;
totkey += totbufkey;
BLI_addtail(bufs, buf);
@@ -153,7 +153,7 @@ static void psys_free_path_cache_buffers(ParticleCacheKey **cache, ListBase *buf
if (cache)
MEM_freeN(cache);
- for (buf= bufs->first; buf; buf=buf->next)
+ for (buf = bufs->first; buf; buf = buf->next)
MEM_freeN(buf->data);
BLI_freelistN(bufs);
}
@@ -165,9 +165,9 @@ static void psys_free_path_cache_buffers(ParticleCacheKey **cache, ListBase *buf
ParticleSystem *psys_get_current(Object *ob)
{
ParticleSystem *psys;
- if (ob==NULL) return NULL;
+ if (ob == NULL) return NULL;
- for (psys=ob->particlesystem.first; psys; psys=psys->next) {
+ for (psys = ob->particlesystem.first; psys; psys = psys->next) {
if (psys->flag & PSYS_CURRENT)
return psys;
}
@@ -179,9 +179,9 @@ short psys_get_current_num(Object *ob)
ParticleSystem *psys;
short i;
- if (ob==NULL) return 0;
+ if (ob == NULL) return 0;
- for (psys=ob->particlesystem.first, i=0; psys; psys=psys->next, i++)
+ for (psys = ob->particlesystem.first, i = 0; psys; psys = psys->next, i++)
if (psys->flag & PSYS_CURRENT)
return i;
@@ -192,9 +192,9 @@ void psys_set_current_num(Object *ob, int index)
ParticleSystem *psys;
short i;
- if (ob==NULL) return;
+ if (ob == NULL) return;
- for (psys=ob->particlesystem.first, i=0; psys; psys=psys->next, i++) {
+ for (psys = ob->particlesystem.first, i = 0; psys; psys = psys->next, i++) {
if (i == index)
psys->flag |= PSYS_CURRENT;
else
@@ -209,7 +209,7 @@ Object *psys_find_object(Scene *scene, ParticleSystem *psys)
ParticleSystem *tpsys;
for (base = scene->base.first; base; base = base->next) {
- for (tpsys = base->object->particlesystem.first; psys; psys=psys->next) {
+ for (tpsys = base->object->particlesystem.first; psys; psys = psys->next) {
if (tpsys == psys)
return base->object;
}
@@ -221,16 +221,16 @@ Object *psys_find_object(Scene *scene, ParticleSystem *psys)
Object *psys_get_lattice(ParticleSimulationData *sim)
{
- Object *lattice=NULL;
+ Object *lattice = NULL;
- if (psys_in_edit_mode(sim->scene, sim->psys)==0) {
+ if (psys_in_edit_mode(sim->scene, sim->psys) == 0) {
- ModifierData *md = (ModifierData*)psys_get_modifier(sim->ob, sim->psys);
+ ModifierData *md = (ModifierData *)psys_get_modifier(sim->ob, sim->psys);
- for (; md; md=md->next) {
- if (md->type==eModifierType_Lattice) {
+ for (; md; md = md->next) {
+ if (md->type == eModifierType_Lattice) {
LatticeModifierData *lmd = (LatticeModifierData *)md;
- lattice=lmd->object;
+ lattice = lmd->object;
break;
}
}
@@ -242,21 +242,21 @@ Object *psys_get_lattice(ParticleSimulationData *sim)
}
void psys_disable_all(Object *ob)
{
- ParticleSystem *psys=ob->particlesystem.first;
+ ParticleSystem *psys = ob->particlesystem.first;
- for (; psys; psys=psys->next)
+ for (; psys; psys = psys->next)
psys->flag |= PSYS_DISABLED;
}
void psys_enable_all(Object *ob)
{
- ParticleSystem *psys=ob->particlesystem.first;
+ ParticleSystem *psys = ob->particlesystem.first;
- for (; psys; psys=psys->next)
+ for (; psys; psys = psys->next)
psys->flag &= ~PSYS_DISABLED;
}
int psys_in_edit_mode(Scene *scene, ParticleSystem *psys)
{
- return (scene->basact && (scene->basact->object->mode & OB_MODE_PARTICLE_EDIT) && psys==psys_get_current((scene->basact)->object) && (psys->edit || psys->pointcache->edit) && !psys->renderdata);
+ return (scene->basact && (scene->basact->object->mode & OB_MODE_PARTICLE_EDIT) && psys == psys_get_current((scene->basact)->object) && (psys->edit || psys->pointcache->edit) && !psys->renderdata);
}
static void psys_create_frand(ParticleSystem *psys)
{
@@ -265,7 +265,7 @@ static void psys_create_frand(ParticleSystem *psys)
BLI_srandom(psys->seed);
- for (i=0; i<1024; i++, rand++)
+ for (i = 0; i < 1024; i++, rand++)
*rand = BLI_frand();
}
int psys_check_enabled(Object *ob, ParticleSystem *psys)
@@ -275,7 +275,7 @@ int psys_check_enabled(Object *ob, ParticleSystem *psys)
if (psys->flag & PSYS_DISABLED || psys->flag & PSYS_DELETE || !psys->part)
return 0;
- psmd= psys_get_modifier(ob, psys);
+ psmd = psys_get_modifier(ob, psys);
if (psys->renderdata || G.rendering) {
if (!(psmd->modifier.mode & eModifierMode_Render))
return 0;
@@ -296,7 +296,7 @@ int psys_check_enabled(Object *ob, ParticleSystem *psys)
int psys_check_edited(ParticleSystem *psys)
{
- if (psys->part && psys->part->type==PART_HAIR)
+ if (psys->part && psys->part->type == PART_HAIR)
return (psys->flag & PSYS_EDITED || (psys->edit && psys->edit->edited));
else
return (psys->pointcache->edit && psys->pointcache->edit->edited);
@@ -339,7 +339,7 @@ void psys_check_group_weights(ParticleSettings *part)
}
dw = part->dupliweights.first;
- for (; dw; dw=dw->next) {
+ for (; dw; dw = dw->next) {
if (dw->flag & PART_DUPLIW_CURRENT) {
current = 1;
break;
@@ -369,7 +369,7 @@ static void fluid_free_settings(SPHFluidSettings *fluid)
MEM_freeN(fluid);
}
-void psys_free_settings(ParticleSettings *part)
+void BKE_particlesettings_free(ParticleSettings *part)
{
MTex *mtex;
int a;
@@ -385,8 +385,8 @@ void psys_free_settings(ParticleSettings *part)
boid_free_settings(part->boids);
fluid_free_settings(part->fluid);
- for (a=0; a<MAX_MTEX; a++) {
- mtex= part->mtex[a];
+ for (a = 0; a < MAX_MTEX; a++) {
+ mtex = part->mtex[a];
if (mtex && mtex->tex) mtex->tex->id.us--;
if (mtex) MEM_freeN(mtex);
}
@@ -411,7 +411,7 @@ void free_hair(Object *UNUSED(ob), ParticleSystem *psys, int dynamics)
psys->clmd->point_cache = psys->pointcache = NULL;
psys->clmd->ptcaches.first = psys->clmd->ptcaches.last = NULL;
- modifier_free((ModifierData*)psys->clmd);
+ modifier_free((ModifierData *)psys->clmd);
psys->clmd = NULL;
psys->pointcache = BKE_ptcache_add(&psys->ptcaches);
@@ -441,8 +441,8 @@ void free_keyed_keys(ParticleSystem *psys)
LOOP_PARTICLES {
if (pa->keys) {
- pa->keys= NULL;
- pa->totkey= 0;
+ pa->keys = NULL;
+ pa->totkey = 0;
}
}
}
@@ -457,13 +457,13 @@ void psys_free_path_cache(ParticleSystem *psys, PTCacheEdit *edit)
{
if (edit) {
psys_free_path_cache_buffers(edit->pathcache, &edit->pathcachebufs);
- edit->pathcache= NULL;
- edit->totcached= 0;
+ edit->pathcache = NULL;
+ edit->totcached = 0;
}
if (psys) {
psys_free_path_cache_buffers(psys->pathcache, &psys->pathcachebufs);
- psys->pathcache= NULL;
- psys->totcached= 0;
+ psys->pathcache = NULL;
+ psys->totcached = 0;
free_child_path_cache(psys);
}
@@ -472,8 +472,8 @@ void psys_free_children(ParticleSystem *psys)
{
if (psys->child) {
MEM_freeN(psys->child);
- psys->child= NULL;
- psys->totchild=0;
+ psys->child = NULL;
+ psys->totchild = 0;
}
free_child_path_cache(psys);
@@ -483,7 +483,7 @@ void psys_free_particles(ParticleSystem *psys)
PARTICLE_P;
if (psys->particles) {
- if (psys->part->type==PART_HAIR) {
+ if (psys->part->type == PART_HAIR) {
LOOP_PARTICLES {
if (pa->hair)
MEM_freeN(pa->hair);
@@ -497,8 +497,8 @@ void psys_free_particles(ParticleSystem *psys)
MEM_freeN(psys->particles->boid);
MEM_freeN(psys->particles);
- psys->particles= NULL;
- psys->totpart= 0;
+ psys->particles = NULL;
+ psys->totpart = 0;
}
}
void psys_free_pdd(ParticleSystem *psys)
@@ -525,11 +525,11 @@ void psys_free_pdd(ParticleSystem *psys)
}
}
/* free everything */
-void psys_free(Object *ob, ParticleSystem * psys)
+void psys_free(Object *ob, ParticleSystem *psys)
{
if (psys) {
int nr = 0;
- ParticleSystem * tpsys;
+ ParticleSystem *tpsys;
psys_free_path_cache(psys, NULL);
@@ -547,9 +547,9 @@ void psys_free(Object *ob, ParticleSystem * psys)
}
// check if we are last non-visible particle system
- for (tpsys=ob->particlesystem.first; tpsys; tpsys=tpsys->next) {
+ for (tpsys = ob->particlesystem.first; tpsys; tpsys = tpsys->next) {
if (tpsys->part) {
- if (ELEM(tpsys->part->ren_as,PART_DRAW_OB,PART_DRAW_GR)) {
+ if (ELEM(tpsys->part->ren_as, PART_DRAW_OB, PART_DRAW_GR)) {
nr++;
break;
}
@@ -561,7 +561,7 @@ void psys_free(Object *ob, ParticleSystem * psys)
if (psys->part) {
psys->part->id.us--;
- psys->part=NULL;
+ psys->part = NULL;
}
BKE_ptcache_free_list(&psys->ptcaches);
@@ -622,105 +622,105 @@ typedef struct ParticleRenderData {
static float psys_render_viewport_falloff(double rate, float dist, float width)
{
- return pow(rate, dist/width);
+ return pow(rate, dist / width);
}
static float psys_render_projected_area(ParticleSystem *psys, const float center[3], float area, double vprate, float *viewport)
{
- ParticleRenderData *data= psys->renderdata;
+ ParticleRenderData *data = psys->renderdata;
float co[4], view[3], ortho1[3], ortho2[3], w, dx, dy, radius;
/* transform to view space */
copy_v3_v3(co, center);
- co[3]= 1.0f;
+ co[3] = 1.0f;
mul_m4_v4(data->viewmat, co);
/* compute two vectors orthogonal to view vector */
normalize_v3_v3(view, co);
- ortho_basis_v3v3_v3( ortho1, ortho2,view);
+ ortho_basis_v3v3_v3(ortho1, ortho2, view);
/* compute on screen minification */
- w= co[2]*data->winmat[2][3] + data->winmat[3][3];
- dx= data->winx*ortho2[0]*data->winmat[0][0];
- dy= data->winy*ortho2[1]*data->winmat[1][1];
- w= sqrtf(dx*dx + dy*dy)/w;
+ w = co[2] * data->winmat[2][3] + data->winmat[3][3];
+ dx = data->winx * ortho2[0] * data->winmat[0][0];
+ dy = data->winy * ortho2[1] * data->winmat[1][1];
+ w = sqrtf(dx * dx + dy * dy) / w;
/* w squared because we are working with area */
- area= area*w*w;
+ area = area * w * w;
/* viewport of the screen test */
/* project point on screen */
mul_m4_v4(data->winmat, co);
if (co[3] != 0.0f) {
- co[0]= 0.5f*data->winx*(1.0f + co[0]/co[3]);
- co[1]= 0.5f*data->winy*(1.0f + co[1]/co[3]);
+ co[0] = 0.5f * data->winx * (1.0f + co[0] / co[3]);
+ co[1] = 0.5f * data->winy * (1.0f + co[1] / co[3]);
}
/* screen space radius */
- radius= sqrt(area/(float)M_PI);
+ radius = sqrt(area / (float)M_PI);
/* make smaller using fallof once over screen edge */
- *viewport= 1.0f;
+ *viewport = 1.0f;
- if (co[0]+radius < 0.0f)
- *viewport *= psys_render_viewport_falloff(vprate, -(co[0]+radius), data->winx);
- else if (co[0]-radius > data->winx)
- *viewport *= psys_render_viewport_falloff(vprate, (co[0]-radius) - data->winx, data->winx);
+ if (co[0] + radius < 0.0f)
+ *viewport *= psys_render_viewport_falloff(vprate, -(co[0] + radius), data->winx);
+ else if (co[0] - radius > data->winx)
+ *viewport *= psys_render_viewport_falloff(vprate, (co[0] - radius) - data->winx, data->winx);
- if (co[1]+radius < 0.0f)
- *viewport *= psys_render_viewport_falloff(vprate, -(co[1]+radius), data->winy);
- else if (co[1]-radius > data->winy)
- *viewport *= psys_render_viewport_falloff(vprate, (co[1]-radius) - data->winy, data->winy);
+ if (co[1] + radius < 0.0f)
+ *viewport *= psys_render_viewport_falloff(vprate, -(co[1] + radius), data->winy);
+ else if (co[1] - radius > data->winy)
+ *viewport *= psys_render_viewport_falloff(vprate, (co[1] - radius) - data->winy, data->winy);
return area;
}
void psys_render_set(Object *ob, ParticleSystem *psys, float viewmat[][4], float winmat[][4], int winx, int winy, int timeoffset)
{
- ParticleRenderData*data;
- ParticleSystemModifierData *psmd= psys_get_modifier(ob, psys);
+ ParticleRenderData *data;
+ ParticleSystemModifierData *psmd = psys_get_modifier(ob, psys);
if (!G.rendering)
return;
if (psys->renderdata)
return;
- data= MEM_callocN(sizeof(ParticleRenderData), "ParticleRenderData");
+ data = MEM_callocN(sizeof(ParticleRenderData), "ParticleRenderData");
- data->child= psys->child;
- data->totchild= psys->totchild;
- data->pathcache= psys->pathcache;
+ data->child = psys->child;
+ data->totchild = psys->totchild;
+ data->pathcache = psys->pathcache;
data->pathcachebufs.first = psys->pathcachebufs.first;
data->pathcachebufs.last = psys->pathcachebufs.last;
- data->totcached= psys->totcached;
- data->childcache= psys->childcache;
+ data->totcached = psys->totcached;
+ data->childcache = psys->childcache;
data->childcachebufs.first = psys->childcachebufs.first;
data->childcachebufs.last = psys->childcachebufs.last;
- data->totchildcache= psys->totchildcache;
+ data->totchildcache = psys->totchildcache;
if (psmd->dm)
- data->dm= CDDM_copy(psmd->dm);
- data->totdmvert= psmd->totdmvert;
- data->totdmedge= psmd->totdmedge;
- data->totdmface= psmd->totdmface;
-
- psys->child= NULL;
- psys->pathcache= NULL;
- psys->childcache= NULL;
- psys->totchild= psys->totcached= psys->totchildcache= 0;
+ data->dm = CDDM_copy(psmd->dm);
+ data->totdmvert = psmd->totdmvert;
+ data->totdmedge = psmd->totdmedge;
+ data->totdmface = psmd->totdmface;
+
+ psys->child = NULL;
+ psys->pathcache = NULL;
+ psys->childcache = NULL;
+ psys->totchild = psys->totcached = psys->totchildcache = 0;
psys->pathcachebufs.first = psys->pathcachebufs.last = NULL;
psys->childcachebufs.first = psys->childcachebufs.last = NULL;
copy_m4_m4(data->winmat, winmat);
mult_m4_m4m4(data->viewmat, viewmat, ob->obmat);
mult_m4_m4m4(data->mat, winmat, data->viewmat);
- data->winx= winx;
- data->winy= winy;
+ data->winx = winx;
+ data->winy = winy;
- data->timeoffset= timeoffset;
+ data->timeoffset = timeoffset;
- psys->renderdata= data;
+ psys->renderdata = data;
/* Hair can and has to be recalculated if everything isn't displayed. */
if (psys->part->disp != 100 && psys->part->type == PART_HAIR)
@@ -729,10 +729,10 @@ void psys_render_set(Object *ob, ParticleSystem *psys, float viewmat[][4], float
void psys_render_restore(Object *ob, ParticleSystem *psys)
{
- ParticleRenderData*data;
- ParticleSystemModifierData *psmd= psys_get_modifier(ob, psys);
+ ParticleRenderData *data;
+ ParticleSystemModifierData *psmd = psys_get_modifier(ob, psys);
- data= psys->renderdata;
+ data = psys->renderdata;
if (!data)
return;
@@ -740,7 +740,7 @@ void psys_render_restore(Object *ob, ParticleSystem *psys)
MEM_freeN(data->elems);
if (psmd->dm) {
- psmd->dm->needsFree= 1;
+ psmd->dm->needsFree = 1;
psmd->dm->release(psmd->dm);
}
@@ -748,93 +748,93 @@ void psys_render_restore(Object *ob, ParticleSystem *psys)
if (psys->child) {
MEM_freeN(psys->child);
- psys->child= 0;
- psys->totchild= 0;
+ psys->child = 0;
+ psys->totchild = 0;
}
- psys->child= data->child;
- psys->totchild= data->totchild;
- psys->pathcache= data->pathcache;
+ psys->child = data->child;
+ psys->totchild = data->totchild;
+ psys->pathcache = data->pathcache;
psys->pathcachebufs.first = data->pathcachebufs.first;
psys->pathcachebufs.last = data->pathcachebufs.last;
- psys->totcached= data->totcached;
- psys->childcache= data->childcache;
+ psys->totcached = data->totcached;
+ psys->childcache = data->childcache;
psys->childcachebufs.first = data->childcachebufs.first;
psys->childcachebufs.last = data->childcachebufs.last;
- psys->totchildcache= data->totchildcache;
+ psys->totchildcache = data->totchildcache;
- psmd->dm= data->dm;
- psmd->totdmvert= data->totdmvert;
- psmd->totdmedge= data->totdmedge;
- psmd->totdmface= data->totdmface;
+ psmd->dm = data->dm;
+ psmd->totdmvert = data->totdmvert;
+ psmd->totdmedge = data->totdmedge;
+ psmd->totdmface = data->totdmface;
psmd->flag &= ~eParticleSystemFlag_psys_updated;
if (psmd->dm)
psys_calc_dmcache(ob, psmd->dm, psys);
MEM_freeN(data);
- psys->renderdata= NULL;
+ psys->renderdata = NULL;
}
/* BMESH_TODO, for orig face data, we need to use MPoly */
int psys_render_simplify_distribution(ParticleThreadContext *ctx, int tot)
{
- DerivedMesh *dm= ctx->dm;
- Mesh *me= (Mesh*)(ctx->sim.ob->data);
+ DerivedMesh *dm = ctx->dm;
+ Mesh *me = (Mesh *)(ctx->sim.ob->data);
MFace *mf, *mface;
MVert *mvert;
ParticleRenderData *data;
ParticleRenderElem *elems, *elem;
- ParticleSettings *part= ctx->sim.psys->part;
+ ParticleSettings *part = ctx->sim.psys->part;
float *facearea, (*facecenter)[3], size[3], fac, powrate, scaleclamp;
float co1[3], co2[3], co3[3], co4[3], lambda, arearatio, t, area, viewport;
double vprate;
int *origindex, *facetotvert;
int a, b, totorigface, totface, newtot, skipped;
- if (part->ren_as!=PART_DRAW_PATH || !(part->draw & PART_DRAW_REN_STRAND))
+ if (part->ren_as != PART_DRAW_PATH || !(part->draw & PART_DRAW_REN_STRAND))
return tot;
if (!ctx->sim.psys->renderdata)
return tot;
- data= ctx->sim.psys->renderdata;
+ data = ctx->sim.psys->renderdata;
if (data->timeoffset)
return 0;
if (!(part->simplify_flag & PART_SIMPLIFY_ENABLE))
return tot;
- mvert= dm->getVertArray(dm);
- mface= dm->getTessFaceArray(dm);
- origindex= dm->getTessFaceDataArray(dm, CD_ORIGINDEX);
- totface= dm->getNumTessFaces(dm);
- totorigface= me->totpoly;
+ mvert = dm->getVertArray(dm);
+ mface = dm->getTessFaceArray(dm);
+ origindex = dm->getTessFaceDataArray(dm, CD_ORIGINDEX);
+ totface = dm->getNumTessFaces(dm);
+ totorigface = me->totpoly;
if (totface == 0 || totorigface == 0)
return tot;
- facearea= MEM_callocN(sizeof(float)*totorigface, "SimplifyFaceArea");
- facecenter= MEM_callocN(sizeof(float[3])*totorigface, "SimplifyFaceCenter");
- facetotvert= MEM_callocN(sizeof(int)*totorigface, "SimplifyFaceArea");
- elems= MEM_callocN(sizeof(ParticleRenderElem)*totorigface, "SimplifyFaceElem");
+ facearea = MEM_callocN(sizeof(float) * totorigface, "SimplifyFaceArea");
+ facecenter = MEM_callocN(sizeof(float[3]) * totorigface, "SimplifyFaceCenter");
+ facetotvert = MEM_callocN(sizeof(int) * totorigface, "SimplifyFaceArea");
+ elems = MEM_callocN(sizeof(ParticleRenderElem) * totorigface, "SimplifyFaceElem");
if (data->elems)
MEM_freeN(data->elems);
- data->dosimplify= 1;
- data->elems= elems;
- data->origindex= origindex;
+ data->dosimplify = 1;
+ data->elems = elems;
+ data->origindex = origindex;
/* compute number of children per original face */
- for (a=0; a<tot; a++) {
- b= (origindex)? origindex[ctx->index[a]]: ctx->index[a];
+ for (a = 0; a < tot; a++) {
+ b = (origindex) ? origindex[ctx->index[a]] : ctx->index[a];
if (b != -1)
elems[b].totchild++;
}
/* compute areas and centers of original faces */
- for (mf=mface, a=0; a<totface; a++, mf++) {
- b= (origindex)? origindex[a]: a;
+ for (mf = mface, a = 0; a < totface; a++, mf++) {
+ b = (origindex) ? origindex[a] : a;
if (b != -1) {
copy_v3_v3(co1, mvert[mf->v1].co);
@@ -858,67 +858,67 @@ int psys_render_simplify_distribution(ParticleThreadContext *ctx, int tot)
}
}
- for (a=0; a<totorigface; a++)
+ for (a = 0; a < totorigface; a++)
if (facetotvert[a] > 0)
- mul_v3_fl(facecenter[a], 1.0f/facetotvert[a]);
+ mul_v3_fl(facecenter[a], 1.0f / facetotvert[a]);
/* for conversion from BU area / pixel area to reference screen size */
- mesh_get_texspace(me, 0, 0, size);
- fac= ((size[0] + size[1] + size[2])/3.0f)/part->simplify_refsize;
- fac= fac*fac;
+ BKE_mesh_texspace_get(me, 0, 0, size);
+ fac = ((size[0] + size[1] + size[2]) / 3.0f) / part->simplify_refsize;
+ fac = fac * fac;
- powrate= log(0.5f)/log(part->simplify_rate*0.5f);
+ powrate = log(0.5f) / log(part->simplify_rate * 0.5f);
if (part->simplify_flag & PART_SIMPLIFY_VIEWPORT)
- vprate= pow(1.0f - part->simplify_viewport, 5.0);
+ vprate = pow(1.0f - part->simplify_viewport, 5.0);
else
- vprate= 1.0;
+ vprate = 1.0;
/* set simplification parameters per original face */
- for (a=0, elem=elems; a<totorigface; a++, elem++) {
+ for (a = 0, elem = elems; a < totorigface; a++, elem++) {
area = psys_render_projected_area(ctx->sim.psys, facecenter[a], facearea[a], vprate, &viewport);
- arearatio= fac*area/facearea[a];
+ arearatio = fac * area / facearea[a];
if ((arearatio < 1.0f || viewport < 1.0f) && elem->totchild) {
/* lambda is percentage of elements to keep */
- lambda= (arearatio < 1.0f)? powf(arearatio, powrate): 1.0f;
+ lambda = (arearatio < 1.0f) ? powf(arearatio, powrate) : 1.0f;
lambda *= viewport;
- lambda= MAX2(lambda, 1.0f/elem->totchild);
+ lambda = MAX2(lambda, 1.0f / elem->totchild);
/* compute transition region */
- t= part->simplify_transition;
- elem->t= (lambda-t < 0.0f)? lambda: (lambda+t > 1.0f)? 1.0f-lambda: t;
- elem->reduce= 1;
+ t = part->simplify_transition;
+ elem->t = (lambda - t < 0.0f) ? lambda : (lambda + t > 1.0f) ? 1.0f - lambda : t;
+ elem->reduce = 1;
/* scale at end and beginning of the transition region */
- elem->scalemax= (lambda+t < 1.0f)? 1.0f/lambda: 1.0f/(1.0f - elem->t*elem->t/t);
- elem->scalemin= (lambda+t < 1.0f)? 0.0f: elem->scalemax*(1.0f-elem->t/t);
+ elem->scalemax = (lambda + t < 1.0f) ? 1.0f / lambda : 1.0f / (1.0f - elem->t * elem->t / t);
+ elem->scalemin = (lambda + t < 1.0f) ? 0.0f : elem->scalemax * (1.0f - elem->t / t);
- elem->scalemin= sqrt(elem->scalemin);
- elem->scalemax= sqrt(elem->scalemax);
+ elem->scalemin = sqrt(elem->scalemin);
+ elem->scalemax = sqrt(elem->scalemax);
/* clamp scaling */
- scaleclamp= MIN2(elem->totchild, 10.0f);
- elem->scalemin= MIN2(scaleclamp, elem->scalemin);
- elem->scalemax= MIN2(scaleclamp, elem->scalemax);
+ scaleclamp = MIN2(elem->totchild, 10.0f);
+ elem->scalemin = MIN2(scaleclamp, elem->scalemin);
+ elem->scalemax = MIN2(scaleclamp, elem->scalemax);
/* extend lambda to include transition */
- lambda= lambda + elem->t;
+ lambda = lambda + elem->t;
if (lambda > 1.0f)
- lambda= 1.0f;
+ lambda = 1.0f;
}
else {
- lambda= arearatio;
+ lambda = arearatio;
- elem->scalemax= 1.0f; //sqrt(lambda);
- elem->scalemin= 1.0f; //sqrt(lambda);
- elem->reduce= 0;
+ elem->scalemax = 1.0f; //sqrt(lambda);
+ elem->scalemin = 1.0f; //sqrt(lambda);
+ elem->reduce = 0;
}
- elem->lambda= lambda;
- elem->scalemin= sqrt(elem->scalemin);
- elem->scalemax= sqrt(elem->scalemax);
- elem->curchild= 0;
+ elem->lambda = lambda;
+ elem->scalemin = sqrt(elem->scalemin);
+ elem->scalemax = sqrt(elem->scalemax);
+ elem->curchild = 0;
}
MEM_freeN(facearea);
@@ -926,16 +926,16 @@ int psys_render_simplify_distribution(ParticleThreadContext *ctx, int tot)
MEM_freeN(facetotvert);
/* move indices and set random number skipping */
- ctx->skip= MEM_callocN(sizeof(int)*tot, "SimplificationSkip");
+ ctx->skip = MEM_callocN(sizeof(int) * tot, "SimplificationSkip");
- skipped= 0;
- for (a=0, newtot=0; a<tot; a++) {
- b= (origindex)? origindex[ctx->index[a]]: ctx->index[a];
+ skipped = 0;
+ for (a = 0, newtot = 0; a < tot; a++) {
+ b = (origindex) ? origindex[ctx->index[a]] : ctx->index[a];
if (b != -1) {
- if (elems[b].curchild++ < ceil(elems[b].lambda*elems[b].totchild)) {
- ctx->index[newtot]= ctx->index[a];
- ctx->skip[newtot]= skipped;
- skipped= 0;
+ if (elems[b].curchild++ < ceil(elems[b].lambda * elems[b].totchild)) {
+ ctx->index[newtot] = ctx->index[a];
+ ctx->skip[newtot] = skipped;
+ skipped = 0;
newtot++;
}
else skipped++;
@@ -943,8 +943,8 @@ int psys_render_simplify_distribution(ParticleThreadContext *ctx, int tot)
else skipped++;
}
- for (a=0, elem=elems; a<totorigface; a++, elem++)
- elem->curchild= 0;
+ for (a = 0, elem = elems; a < totorigface; a++, elem++)
+ elem->curchild = 0;
return newtot;
}
@@ -959,44 +959,44 @@ int psys_render_simplify_params(ParticleSystem *psys, ChildParticle *cpa, float
if (!(psys->renderdata && (psys->part->simplify_flag & PART_SIMPLIFY_ENABLE)))
return 0;
- data= psys->renderdata;
+ data = psys->renderdata;
if (!data->dosimplify)
return 0;
- b= (data->origindex)? data->origindex[cpa->num]: cpa->num;
+ b = (data->origindex) ? data->origindex[cpa->num] : cpa->num;
if (b == -1)
return 0;
- elem= &data->elems[b];
+ elem = &data->elems[b];
- lambda= elem->lambda;
- t= elem->t;
- scalemin= elem->scalemin;
- scalemax= elem->scalemax;
+ lambda = elem->lambda;
+ t = elem->t;
+ scalemin = elem->scalemin;
+ scalemax = elem->scalemax;
if (!elem->reduce) {
- scale= scalemin;
- alpha= 1.0f;
+ scale = scalemin;
+ alpha = 1.0f;
}
else {
- x= (elem->curchild+0.5f)/elem->totchild;
- if (x < lambda-t) {
- scale= scalemax;
- alpha= 1.0f;
+ x = (elem->curchild + 0.5f) / elem->totchild;
+ if (x < lambda - t) {
+ scale = scalemax;
+ alpha = 1.0f;
}
- else if (x >= lambda+t) {
- scale= scalemin;
- alpha= 0.0f;
+ else if (x >= lambda + t) {
+ scale = scalemin;
+ alpha = 0.0f;
}
else {
- w= (lambda+t - x)/(2.0f*t);
- scale= scalemin + (scalemax - scalemin)*w;
- alpha= w;
+ w = (lambda + t - x) / (2.0f * t);
+ scale = scalemin + (scalemax - scalemin) * w;
+ alpha = w;
}
}
- params[0]= scale;
- params[1]= alpha;
+ params[0] = scale;
+ params[1] = alpha;
elem->curchild++;
@@ -1010,9 +1010,9 @@ static float interpolate_particle_value(float v1, float v2, float v3, float v4,
{
float value;
- value= w[0]*v1 + w[1]*v2 + w[2]*v3;
+ value = w[0] * v1 + w[1] * v2 + w[2] * v3;
if (four)
- value += w[3]*v4;
+ value += w[3] * v4;
CLAMP(value, 0.f, 1.f);
@@ -1023,8 +1023,8 @@ void psys_interpolate_particle(short type, ParticleKey keys[4], float dt, Partic
{
float t[4];
- if (type<0) {
- interp_cubic_v3( result->co, result->vel,keys[1].co, keys[1].vel, keys[2].co, keys[2].vel, dt);
+ if (type < 0) {
+ interp_cubic_v3(result->co, result->vel, keys[1].co, keys[1].vel, keys[2].co, keys[2].vel, dt);
}
else {
key_curve_position_weights(dt, t, type);
@@ -1034,13 +1034,13 @@ void psys_interpolate_particle(short type, ParticleKey keys[4], float dt, Partic
if (velocity) {
float temp[3];
- if (dt>0.999f) {
- key_curve_position_weights(dt-0.001f, t, type);
+ if (dt > 0.999f) {
+ key_curve_position_weights(dt - 0.001f, t, type);
interp_v3_v3v3v3v3(temp, keys[0].co, keys[1].co, keys[2].co, keys[3].co, t);
sub_v3_v3v3(result->vel, result->co, temp);
}
else {
- key_curve_position_weights(dt+0.001f, t, type);
+ key_curve_position_weights(dt + 0.001f, t, type);
interp_v3_v3v3v3v3(temp, keys[0].co, keys[1].co, keys[2].co, keys[3].co, t);
sub_v3_v3v3(result->vel, temp, result->co);
}
@@ -1110,7 +1110,7 @@ static int get_pointcache_times_for_particle(PointCache *cache, int index, float
PTCacheMem *pm;
int ret = 0;
- for (pm=cache->mem_cache.first; pm; pm=pm->next) {
+ for (pm = cache->mem_cache.first; pm; pm = pm->next) {
if (BKE_ptcache_mem_index_find(pm, index) >= 0) {
*start = pm->frame;
ret++;
@@ -1118,7 +1118,7 @@ static int get_pointcache_times_for_particle(PointCache *cache, int index, float
}
}
- for (pm=cache->mem_cache.last; pm; pm=pm->prev) {
+ for (pm = cache->mem_cache.last; pm; pm = pm->prev) {
if (BKE_ptcache_mem_index_find(pm, index) >= 0) {
*end = pm->frame;
ret++;
@@ -1134,7 +1134,7 @@ float psys_get_dietime_from_cache(PointCache *cache, int index)
PTCacheMem *pm;
int dietime = 10000000; /* some max value so that we can default to pa->time+lifetime */
- for (pm=cache->mem_cache.last; pm; pm=pm->prev) {
+ for (pm = cache->mem_cache.last; pm; pm = pm->prev) {
if (BKE_ptcache_mem_index_find(pm, index) >= 0)
return (float)pm->frame;
}
@@ -1163,7 +1163,7 @@ static void init_particle_interpolation(Object *ob, ParticleSystem *psys, Partic
pind->dietime = (key + pa->totkey - 1)->time;
}
else if (pind->cache) {
- float start=0.0f, end=0.0f;
+ float start = 0.0f, end = 0.0f;
get_pointcache_keys_for_time(ob, pind->cache, &pind->pm, -1, 0.0f, NULL, NULL);
pind->birthtime = pa ? pa->time : pind->cache->startframe;
pind->dietime = pa ? pa->dietime : pind->cache->endframe;
@@ -1222,7 +1222,7 @@ static void do_particle_interpolation(ParticleSystem *psys, int p, ParticleData
if (result->time < 0.0f)
real_t = -result->time;
else
- real_t = *(pind->ekey[0]->time) + t * (*(pind->ekey[0][point->totkey-1].time) - *(pind->ekey[0]->time));
+ real_t = *(pind->ekey[0]->time) + t * (*(pind->ekey[0][point->totkey - 1].time) - *(pind->ekey[0]->time));
while (*(pind->ekey[1]->time) < real_t)
pind->ekey[1]++;
@@ -1231,7 +1231,7 @@ static void do_particle_interpolation(ParticleSystem *psys, int p, ParticleData
}
else if (pind->keyed) {
/* we have only one key, so let's use that */
- if (pind->kkey[1]==NULL) {
+ if (pind->kkey[1] == NULL) {
copy_particle_key(result, pind->kkey[0], 1);
return;
}
@@ -1239,24 +1239,24 @@ static void do_particle_interpolation(ParticleSystem *psys, int p, ParticleData
if (result->time < 0.0f)
real_t = -result->time;
else
- real_t = pind->kkey[0]->time + t * (pind->kkey[0][pa->totkey-1].time - pind->kkey[0]->time);
+ real_t = pind->kkey[0]->time + t * (pind->kkey[0][pa->totkey - 1].time - pind->kkey[0]->time);
- if (psys->part->phystype==PART_PHYS_KEYED && psys->flag & PSYS_KEYED_TIMING) {
+ if (psys->part->phystype == PART_PHYS_KEYED && psys->flag & PSYS_KEYED_TIMING) {
ParticleTarget *pt = psys->targets.first;
- pt=pt->next;
+ pt = pt->next;
while (pt && pa->time + pt->time < real_t)
- pt= pt->next;
+ pt = pt->next;
if (pt) {
- pt=pt->prev;
+ pt = pt->prev;
if (pa->time + pt->time + pt->duration > real_t)
real_t = pa->time + pt->time;
}
else
- real_t = pa->time + ((ParticleTarget*)psys->targets.last)->time;
+ real_t = pa->time + ((ParticleTarget *)psys->targets.last)->time;
}
CLAMP(real_t, pa->time, pa->dietime);
@@ -1276,7 +1276,7 @@ static void do_particle_interpolation(ParticleSystem *psys, int p, ParticleData
if (result->time < 0.0f)
real_t = -result->time;
else
- real_t = pind->hkey[0]->time + t * (pind->hkey[0][pa->totkey-1].time - pind->hkey[0]->time);
+ real_t = pind->hkey[0]->time + t * (pind->hkey[0][pa->totkey - 1].time - pind->hkey[0]->time);
while (pind->hkey[1]->time < real_t) {
pind->hkey[1]++;
@@ -1301,7 +1301,7 @@ static void do_particle_interpolation(ParticleSystem *psys, int p, ParticleData
memcpy(keys + 2, pind->kkey[1], sizeof(ParticleKey));
}
else if (pind->cache) {
- get_pointcache_keys_for_time(NULL, pind->cache, &pind->pm, p, real_t, keys+1, keys+2);
+ get_pointcache_keys_for_time(NULL, pind->cache, &pind->pm, p, real_t, keys + 1, keys + 2);
}
else {
hair_to_particle(keys + 1, pind->hkey[0]);
@@ -1357,42 +1357,42 @@ static void do_particle_interpolation(ParticleSystem *psys, int p, ParticleData
invdt = dfra * 0.04f * (psys ? psys->part->timetweak : 1.f);
mul_v3_fl(keys[1].vel, invdt);
mul_v3_fl(keys[2].vel, invdt);
- interp_qt_qtqt(result->rot,keys[1].rot,keys[2].rot,keytime);
+ interp_qt_qtqt(result->rot, keys[1].rot, keys[2].rot, keytime);
}
- /* now we should have in chronologiacl order k1<=k2<=t<=k3<=k4 with keytime between [0,1]->[k2,k3] (k1 & k4 used for cardinal & bspline interpolation)*/
+ /* now we should have in chronologiacl order k1<=k2<=t<=k3<=k4 with keytime between [0, 1]->[k2, k3] (k1 & k4 used for cardinal & bspline interpolation)*/
psys_interpolate_particle((pind->keyed || pind->cache || point_vel) ? -1 /* signal for cubic interpolation */
- : (pind->bspline ? KEY_BSPLINE : KEY_CARDINAL)
- ,keys, keytime, result, 1);
+ : (pind->bspline ? KEY_BSPLINE : KEY_CARDINAL),
+ keys, keytime, result, 1);
/* the velocity needs to be converted back from cubic interpolation */
if (pind->keyed || pind->cache || point_vel)
- mul_v3_fl(result->vel, 1.f/invdt);
+ mul_v3_fl(result->vel, 1.f / invdt);
}
static void interpolate_pathcache(ParticleCacheKey *first, float t, ParticleCacheKey *result)
{
- int i=0;
+ int i = 0;
ParticleCacheKey *cur = first;
/* scale the requested time to fit the entire path even if the path is cut early */
- t *= (first+first->steps)->time;
+ t *= (first + first->steps)->time;
- while (i<first->steps && cur->time < t)
+ while (i < first->steps && cur->time < t)
cur++;
if (cur->time == t)
*result = *cur;
else {
- float dt = (t-(cur-1)->time)/(cur->time-(cur-1)->time);
- interp_v3_v3v3(result->co, (cur-1)->co, cur->co, dt);
- interp_v3_v3v3(result->vel, (cur-1)->vel, cur->vel, dt);
- interp_qt_qtqt(result->rot, (cur-1)->rot, cur->rot, dt);
+ float dt = (t - (cur - 1)->time) / (cur->time - (cur - 1)->time);
+ interp_v3_v3v3(result->co, (cur - 1)->co, cur->co, dt);
+ interp_v3_v3v3(result->vel, (cur - 1)->vel, cur->vel, dt);
+ interp_qt_qtqt(result->rot, (cur - 1)->rot, cur->rot, dt);
result->time = t;
}
/* first is actual base rotation, others are incremental from first */
- if (cur==first || cur-1==first)
+ if (cur == first || cur - 1 == first)
copy_qt_qt(result->rot, first->rot);
else
mul_qt_qtqt(result->rot, first->rot, result->rot);
@@ -1403,25 +1403,25 @@ static void interpolate_pathcache(ParticleCacheKey *first, float t, ParticleCach
/************************************************/
/* interpolate a location on a face based on face coordinates */
void psys_interpolate_face(MVert *mvert, MFace *mface, MTFace *tface, float (*orcodata)[3],
- float *w, float *vec, float *nor, float *utan, float *vtan, float *orco,float *ornor)
+ float *w, float *vec, float *nor, float *utan, float *vtan, float *orco, float *ornor)
{
- float *v1=0, *v2=0, *v3=0, *v4=0;
- float e1[3],e2[3],s1,s2,t1,t2;
+ float *v1 = 0, *v2 = 0, *v3 = 0, *v4 = 0;
+ float e1[3], e2[3], s1, s2, t1, t2;
float *uv1, *uv2, *uv3, *uv4;
float n1[3], n2[3], n3[3], n4[3];
float tuv[4][2];
float *o1, *o2, *o3, *o4;
- v1= mvert[mface->v1].co;
- v2= mvert[mface->v2].co;
- v3= mvert[mface->v3].co;
+ v1 = mvert[mface->v1].co;
+ v2 = mvert[mface->v2].co;
+ v3 = mvert[mface->v3].co;
normal_short_to_float_v3(n1, mvert[mface->v1].no);
normal_short_to_float_v3(n2, mvert[mface->v2].no);
normal_short_to_float_v3(n3, mvert[mface->v3].no);
if (mface->v4) {
- v4= mvert[mface->v4].co;
+ v4 = mvert[mface->v4].co;
normal_short_to_float_v3(n4, mvert[mface->v4].no);
interp_v3_v3v3v3v3(vec, v1, v2, v3, v4, w);
@@ -1430,7 +1430,7 @@ void psys_interpolate_face(MVert *mvert, MFace *mface, MTFace *tface, float (*or
if (mface->flag & ME_SMOOTH)
interp_v3_v3v3v3v3(nor, n1, n2, n3, n4, w);
else
- normal_quad_v3(nor,v1,v2,v3,v4);
+ normal_quad_v3(nor, v1, v2, v3, v4);
}
}
else {
@@ -1440,76 +1440,76 @@ void psys_interpolate_face(MVert *mvert, MFace *mface, MTFace *tface, float (*or
if (mface->flag & ME_SMOOTH)
interp_v3_v3v3v3(nor, n1, n2, n3, w);
else
- normal_tri_v3(nor,v1,v2,v3);
+ normal_tri_v3(nor, v1, v2, v3);
}
}
/* calculate tangent vectors */
if (utan && vtan) {
if (tface) {
- uv1= tface->uv[0];
- uv2= tface->uv[1];
- uv3= tface->uv[2];
- uv4= tface->uv[3];
+ uv1 = tface->uv[0];
+ uv2 = tface->uv[1];
+ uv3 = tface->uv[2];
+ uv4 = tface->uv[3];
}
else {
- uv1= tuv[0]; uv2= tuv[1]; uv3= tuv[2]; uv4= tuv[3];
- map_to_sphere( uv1, uv1+1,v1[0], v1[1], v1[2]);
- map_to_sphere( uv2, uv2+1,v2[0], v2[1], v2[2]);
- map_to_sphere( uv3, uv3+1,v3[0], v3[1], v3[2]);
+ uv1 = tuv[0]; uv2 = tuv[1]; uv3 = tuv[2]; uv4 = tuv[3];
+ map_to_sphere(uv1, uv1 + 1, v1[0], v1[1], v1[2]);
+ map_to_sphere(uv2, uv2 + 1, v2[0], v2[1], v2[2]);
+ map_to_sphere(uv3, uv3 + 1, v3[0], v3[1], v3[2]);
if (v4)
- map_to_sphere( uv4, uv4+1,v4[0], v4[1], v4[2]);
+ map_to_sphere(uv4, uv4 + 1, v4[0], v4[1], v4[2]);
}
if (v4) {
- s1= uv3[0] - uv1[0];
- s2= uv4[0] - uv1[0];
+ s1 = uv3[0] - uv1[0];
+ s2 = uv4[0] - uv1[0];
- t1= uv3[1] - uv1[1];
- t2= uv4[1] - uv1[1];
+ t1 = uv3[1] - uv1[1];
+ t2 = uv4[1] - uv1[1];
sub_v3_v3v3(e1, v3, v1);
sub_v3_v3v3(e2, v4, v1);
}
else {
- s1= uv2[0] - uv1[0];
- s2= uv3[0] - uv1[0];
+ s1 = uv2[0] - uv1[0];
+ s2 = uv3[0] - uv1[0];
- t1= uv2[1] - uv1[1];
- t2= uv3[1] - uv1[1];
+ t1 = uv2[1] - uv1[1];
+ t2 = uv3[1] - uv1[1];
sub_v3_v3v3(e1, v2, v1);
sub_v3_v3v3(e2, v3, v1);
}
- vtan[0] = (s1*e2[0] - s2*e1[0]);
- vtan[1] = (s1*e2[1] - s2*e1[1]);
- vtan[2] = (s1*e2[2] - s2*e1[2]);
+ vtan[0] = (s1 * e2[0] - s2 * e1[0]);
+ vtan[1] = (s1 * e2[1] - s2 * e1[1]);
+ vtan[2] = (s1 * e2[2] - s2 * e1[2]);
- utan[0] = (t1*e2[0] - t2*e1[0]);
- utan[1] = (t1*e2[1] - t2*e1[1]);
- utan[2] = (t1*e2[2] - t2*e1[2]);
+ utan[0] = (t1 * e2[0] - t2 * e1[0]);
+ utan[1] = (t1 * e2[1] - t2 * e1[1]);
+ utan[2] = (t1 * e2[2] - t2 * e1[2]);
}
if (orco) {
if (orcodata) {
- o1= orcodata[mface->v1];
- o2= orcodata[mface->v2];
- o3= orcodata[mface->v3];
+ o1 = orcodata[mface->v1];
+ o2 = orcodata[mface->v2];
+ o3 = orcodata[mface->v3];
if (mface->v4) {
- o4= orcodata[mface->v4];
+ o4 = orcodata[mface->v4];
interp_v3_v3v3v3v3(orco, o1, o2, o3, o4, w);
if (ornor)
- normal_quad_v3( ornor,o1, o2, o3, o4);
+ normal_quad_v3(ornor, o1, o2, o3, o4);
}
else {
interp_v3_v3v3v3(orco, o1, o2, o3, w);
if (ornor)
- normal_tri_v3( ornor,o1, o2, o3);
+ normal_tri_v3(ornor, o1, o2, o3);
}
}
else {
@@ -1521,24 +1521,24 @@ void psys_interpolate_face(MVert *mvert, MFace *mface, MTFace *tface, float (*or
}
void psys_interpolate_uvs(const MTFace *tface, int quad, const float w[4], float uvco[2])
{
- float v10= tface->uv[0][0];
- float v11= tface->uv[0][1];
- float v20= tface->uv[1][0];
- float v21= tface->uv[1][1];
- float v30= tface->uv[2][0];
- float v31= tface->uv[2][1];
- float v40,v41;
+ float v10 = tface->uv[0][0];
+ float v11 = tface->uv[0][1];
+ float v20 = tface->uv[1][0];
+ float v21 = tface->uv[1][1];
+ float v30 = tface->uv[2][0];
+ float v31 = tface->uv[2][1];
+ float v40, v41;
if (quad) {
- v40= tface->uv[3][0];
- v41= tface->uv[3][1];
+ v40 = tface->uv[3][0];
+ v41 = tface->uv[3][1];
- uvco[0]= w[0]*v10 + w[1]*v20 + w[2]*v30 + w[3]*v40;
- uvco[1]= w[0]*v11 + w[1]*v21 + w[2]*v31 + w[3]*v41;
+ uvco[0] = w[0] * v10 + w[1] * v20 + w[2] * v30 + w[3] * v40;
+ uvco[1] = w[0] * v11 + w[1] * v21 + w[2] * v31 + w[3] * v41;
}
else {
- uvco[0]= w[0]*v10 + w[1]*v20 + w[2]*v30;
- uvco[1]= w[0]*v11 + w[1]*v21 + w[2]*v31;
+ uvco[0] = w[0] * v10 + w[1] * v20 + w[2] * v30;
+ uvco[1] = w[0] * v11 + w[1] * v21 + w[2] * v31;
}
}
@@ -1546,40 +1546,40 @@ void psys_interpolate_mcol(const MCol *mcol, int quad, const float w[4], MCol *m
{
char *cp, *cp1, *cp2, *cp3, *cp4;
- cp= (char *)mc;
- cp1= (char *)&mcol[0];
- cp2= (char *)&mcol[1];
- cp3= (char *)&mcol[2];
+ cp = (char *)mc;
+ cp1 = (char *)&mcol[0];
+ cp2 = (char *)&mcol[1];
+ cp3 = (char *)&mcol[2];
if (quad) {
- cp4= (char *)&mcol[3];
+ cp4 = (char *)&mcol[3];
- cp[0]= (int)(w[0]*cp1[0] + w[1]*cp2[0] + w[2]*cp3[0] + w[3]*cp4[0]);
- cp[1]= (int)(w[0]*cp1[1] + w[1]*cp2[1] + w[2]*cp3[1] + w[3]*cp4[1]);
- cp[2]= (int)(w[0]*cp1[2] + w[1]*cp2[2] + w[2]*cp3[2] + w[3]*cp4[2]);
- cp[3]= (int)(w[0]*cp1[3] + w[1]*cp2[3] + w[2]*cp3[3] + w[3]*cp4[3]);
+ cp[0] = (int)(w[0] * cp1[0] + w[1] * cp2[0] + w[2] * cp3[0] + w[3] * cp4[0]);
+ cp[1] = (int)(w[0] * cp1[1] + w[1] * cp2[1] + w[2] * cp3[1] + w[3] * cp4[1]);
+ cp[2] = (int)(w[0] * cp1[2] + w[1] * cp2[2] + w[2] * cp3[2] + w[3] * cp4[2]);
+ cp[3] = (int)(w[0] * cp1[3] + w[1] * cp2[3] + w[2] * cp3[3] + w[3] * cp4[3]);
}
else {
- cp[0]= (int)(w[0]*cp1[0] + w[1]*cp2[0] + w[2]*cp3[0]);
- cp[1]= (int)(w[0]*cp1[1] + w[1]*cp2[1] + w[2]*cp3[1]);
- cp[2]= (int)(w[0]*cp1[2] + w[1]*cp2[2] + w[2]*cp3[2]);
- cp[3]= (int)(w[0]*cp1[3] + w[1]*cp2[3] + w[2]*cp3[3]);
+ cp[0] = (int)(w[0] * cp1[0] + w[1] * cp2[0] + w[2] * cp3[0]);
+ cp[1] = (int)(w[0] * cp1[1] + w[1] * cp2[1] + w[2] * cp3[1]);
+ cp[2] = (int)(w[0] * cp1[2] + w[1] * cp2[2] + w[2] * cp3[2]);
+ cp[3] = (int)(w[0] * cp1[3] + w[1] * cp2[3] + w[2] * cp3[3]);
}
}
static float psys_interpolate_value_from_verts(DerivedMesh *dm, short from, int index, const float fw[4], const float *values)
{
- if (values==0 || index==-1)
+ if (values == 0 || index == -1)
return 0.0;
- switch(from) {
+ switch (from) {
case PART_FROM_VERT:
return values[index];
case PART_FROM_FACE:
case PART_FROM_VOLUME:
{
- MFace *mf=dm->getTessFaceData(dm,index,CD_MFACE);
- return interpolate_particle_value(values[mf->v1],values[mf->v2],values[mf->v3],values[mf->v4],fw,mf->v4);
+ MFace *mf = dm->getTessFaceData(dm, index, CD_MFACE);
+ return interpolate_particle_value(values[mf->v1], values[mf->v2], values[mf->v3], values[mf->v4], fw, mf->v4);
}
}
@@ -1589,8 +1589,8 @@ static float psys_interpolate_value_from_verts(DerivedMesh *dm, short from, int
/* conversion of pa->fw to origspace layer coordinates */
static void psys_w_to_origspace(const float w[4], float uv[2])
{
- uv[0]= w[1] + w[2];
- uv[1]= w[2] + w[3];
+ uv[0] = w[1] + w[2];
+ uv[1] = w[2] + w[3];
}
/* conversion of pa->fw to weights in face from origspace */
@@ -1598,20 +1598,20 @@ static void psys_origspace_to_w(OrigSpaceFace *osface, int quad, const float w[4
{
float v[4][3], co[3];
- v[0][0]= osface->uv[0][0]; v[0][1]= osface->uv[0][1]; v[0][2]= 0.0f;
- v[1][0]= osface->uv[1][0]; v[1][1]= osface->uv[1][1]; v[1][2]= 0.0f;
- v[2][0]= osface->uv[2][0]; v[2][1]= osface->uv[2][1]; v[2][2]= 0.0f;
+ v[0][0] = osface->uv[0][0]; v[0][1] = osface->uv[0][1]; v[0][2] = 0.0f;
+ v[1][0] = osface->uv[1][0]; v[1][1] = osface->uv[1][1]; v[1][2] = 0.0f;
+ v[2][0] = osface->uv[2][0]; v[2][1] = osface->uv[2][1]; v[2][2] = 0.0f;
psys_w_to_origspace(w, co);
- co[2]= 0.0f;
+ co[2] = 0.0f;
if (quad) {
- v[3][0]= osface->uv[3][0]; v[3][1]= osface->uv[3][1]; v[3][2]= 0.0f;
+ v[3][0] = osface->uv[3][0]; v[3][1] = osface->uv[3][1]; v[3][2] = 0.0f;
interp_weights_poly_v3(neww, v, 4, co);
}
else {
interp_weights_poly_v3(neww, v, 3, co);
- neww[3]= 0.0f;
+ neww[3] = 0.0f;
}
}
@@ -1619,7 +1619,7 @@ static void psys_origspace_to_w(OrigSpaceFace *osface, int quad, const float w[4
* and can be optimized but only for many lookups. returns the face index. */
int psys_particle_dm_face_lookup(Object *ob, DerivedMesh *dm, int index, const float fw[4], struct LinkNode *node)
{
- Mesh *me= (Mesh*)ob->data;
+ Mesh *me = (Mesh *)ob->data;
MPoly *mpoly;
OrigSpaceFace *osface;
int *origindex;
@@ -1632,9 +1632,9 @@ int psys_particle_dm_face_lookup(Object *ob, DerivedMesh *dm, int index, const f
totface = dm->getNumTessFaces(dm);
- if (osface==NULL || origindex==NULL) {
+ if (osface == NULL || origindex == NULL) {
/* Assume we don't need osface data */
- if (index <totface) {
+ if (index < totface) {
//printf("\tNO CD_ORIGSPACE, assuming not needed\n");
return index;
}
@@ -1644,14 +1644,14 @@ int psys_particle_dm_face_lookup(Object *ob, DerivedMesh *dm, int index, const f
}
}
else if (index >= me->totpoly)
- return DMCACHE_NOTFOUND; /* index not in the original mesh */
+ return DMCACHE_NOTFOUND; /* index not in the original mesh */
psys_w_to_origspace(fw, uv);
if (node) { /* we have a linked list of faces that we use, faster! */
- for (;node; node=node->next) {
- findex= GET_INT_FROM_POINTER(node->link);
- faceuv= osface[findex].uv;
+ for (; node; node = node->next) {
+ findex = GET_INT_FROM_POINTER(node->link);
+ faceuv = osface[findex].uv;
quad = (mpoly[findex].totloop == 4);
/* check that this intersects - Its possible this misses :/ -
@@ -1665,9 +1665,9 @@ int psys_particle_dm_face_lookup(Object *ob, DerivedMesh *dm, int index, const f
}
}
else { /* if we have no node, try every face */
- for (findex=0; findex<totface; findex++) {
+ for (findex = 0; findex < totface; findex++) {
if (origindex[findex] == index) {
- faceuv= osface[findex].uv;
+ faceuv = osface[findex].uv;
quad = (mpoly[findex].totloop == 4);
/* check that this intersects - Its possible this misses :/ -
@@ -1718,25 +1718,25 @@ static int psys_map_index_on_dm(DerivedMesh *dm, int from, int index, int index_
*mapindex = index_dmcache;
}
else { /* FROM_FACE/FROM_VOLUME */
- /* find a face on the derived mesh that uses this face */
+ /* find a face on the derived mesh that uses this face */
MFace *mface;
OrigSpaceFace *osface;
int i;
i = index_dmcache;
- if (i== DMCACHE_NOTFOUND || i >= dm->getNumTessFaces(dm))
+ if (i == DMCACHE_NOTFOUND || i >= dm->getNumTessFaces(dm))
return 0;
*mapindex = i;
/* modify the original weights to become
* weights for the derived mesh face */
- osface= dm->getTessFaceDataArray(dm, CD_ORIGSPACE);
- mface= dm->getTessFaceData(dm, i, CD_MFACE);
+ osface = dm->getTessFaceDataArray(dm, CD_ORIGSPACE);
+ mface = dm->getTessFaceData(dm, i, CD_MFACE);
if (osface == NULL)
- mapfw[0]= mapfw[1]= mapfw[2]= mapfw[3]= 0.0f;
+ mapfw[0] = mapfw[1] = mapfw[2] = mapfw[3] = 0.0f;
else
psys_origspace_to_w(&osface[i], mface->v4, fw, mapfw);
}
@@ -1753,23 +1753,23 @@ void psys_particle_on_dm(DerivedMesh *dm, int from, int index, int index_dmcache
int mapindex;
if (!psys_map_index_on_dm(dm, from, index, index_dmcache, fw, foffset, &mapindex, mapfw)) {
- if (vec) { vec[0]=vec[1]=vec[2]=0.0; }
- if (nor) { nor[0]=nor[1]=0.0; nor[2]=1.0; }
- if (orco) { orco[0]=orco[1]=orco[2]=0.0; }
- if (ornor) { ornor[0]=ornor[1]=0.0; ornor[2]=1.0; }
- if (utan) { utan[0]=utan[1]=utan[2]=0.0; }
- if (vtan) { vtan[0]=vtan[1]=vtan[2]=0.0; }
+ if (vec) { vec[0] = vec[1] = vec[2] = 0.0; }
+ if (nor) { nor[0] = nor[1] = 0.0; nor[2] = 1.0; }
+ if (orco) { orco[0] = orco[1] = orco[2] = 0.0; }
+ if (ornor) { ornor[0] = ornor[1] = 0.0; ornor[2] = 1.0; }
+ if (utan) { utan[0] = utan[1] = utan[2] = 0.0; }
+ if (vtan) { vtan[0] = vtan[1] = vtan[2] = 0.0; }
return;
}
- orcodata= dm->getVertDataArray(dm, CD_ORCO);
+ orcodata = dm->getVertDataArray(dm, CD_ORCO);
if (from == PART_FROM_VERT) {
- dm->getVertCo(dm,mapindex,vec);
+ dm->getVertCo(dm, mapindex, vec);
if (nor) {
- dm->getVertNo(dm,mapindex,nor);
+ dm->getVertNo(dm, mapindex, nor);
normalize_v3(nor);
}
@@ -1777,13 +1777,13 @@ void psys_particle_on_dm(DerivedMesh *dm, int from, int index, int index_dmcache
copy_v3_v3(orco, orcodata[mapindex]);
if (ornor) {
- dm->getVertNo(dm,mapindex,nor);
+ dm->getVertNo(dm, mapindex, nor);
normalize_v3(nor);
}
if (utan && vtan) {
- utan[0]= utan[1]= utan[2]= 0.0f;
- vtan[0]= vtan[1]= vtan[2]= 0.0f;
+ utan[0] = utan[1] = utan[2] = 0.0f;
+ vtan[0] = vtan[1] = vtan[2] = 0.0f;
}
}
else { /* PART_FROM_FACE / PART_FROM_VOLUME */
@@ -1791,24 +1791,24 @@ void psys_particle_on_dm(DerivedMesh *dm, int from, int index, int index_dmcache
MTFace *mtface;
MVert *mvert;
- mface=dm->getTessFaceData(dm,mapindex,CD_MFACE);
- mvert=dm->getVertDataArray(dm,CD_MVERT);
- mtface=CustomData_get_layer(&dm->faceData,CD_MTFACE);
+ mface = dm->getTessFaceData(dm, mapindex, CD_MFACE);
+ mvert = dm->getVertDataArray(dm, CD_MVERT);
+ mtface = CustomData_get_layer(&dm->faceData, CD_MTFACE);
if (mtface)
mtface += mapindex;
- if (from==PART_FROM_VOLUME) {
- psys_interpolate_face(mvert,mface,mtface,orcodata,mapfw,vec,tmpnor,utan,vtan,orco,ornor);
+ if (from == PART_FROM_VOLUME) {
+ psys_interpolate_face(mvert, mface, mtface, orcodata, mapfw, vec, tmpnor, utan, vtan, orco, ornor);
if (nor)
- copy_v3_v3(nor,tmpnor);
+ copy_v3_v3(nor, tmpnor);
normalize_v3(tmpnor);
- mul_v3_fl(tmpnor,-foffset);
+ mul_v3_fl(tmpnor, -foffset);
add_v3_v3(vec, tmpnor);
}
else
- psys_interpolate_face(mvert,mface,mtface,orcodata,mapfw,vec,nor,utan,vtan,orco,ornor);
+ psys_interpolate_face(mvert, mface, mtface, orcodata, mapfw, vec, nor, utan, vtan, orco, ornor);
}
}
@@ -1828,10 +1828,10 @@ ParticleSystemModifierData *psys_get_modifier(Object *ob, ParticleSystem *psys)
ModifierData *md;
ParticleSystemModifierData *psmd;
- for (md=ob->modifiers.first; md; md=md->next) {
- if (md->type==eModifierType_ParticleSystem) {
- psmd= (ParticleSystemModifierData*) md;
- if (psmd->psys==psys) {
+ for (md = ob->modifiers.first; md; md = md->next) {
+ if (md->type == eModifierType_ParticleSystem) {
+ psmd = (ParticleSystemModifierData *) md;
+ if (psmd->psys == psys) {
return psmd;
}
}
@@ -1845,24 +1845,24 @@ ParticleSystemModifierData *psys_get_modifier(Object *ob, ParticleSystem *psys)
static void psys_particle_on_shape(int UNUSED(distr), int UNUSED(index), float *UNUSED(fuv), float *vec, float *nor, float *utan, float *vtan, float *orco, float *ornor)
{
/* TODO */
- float zerovec[3]={0.0f,0.0f,0.0f};
+ float zerovec[3] = {0.0f, 0.0f, 0.0f};
if (vec) {
- copy_v3_v3(vec,zerovec);
+ copy_v3_v3(vec, zerovec);
}
if (nor) {
- copy_v3_v3(nor,zerovec);
+ copy_v3_v3(nor, zerovec);
}
if (utan) {
- copy_v3_v3(utan,zerovec);
+ copy_v3_v3(utan, zerovec);
}
if (vtan) {
- copy_v3_v3(vtan,zerovec);
+ copy_v3_v3(vtan, zerovec);
}
if (orco) {
- copy_v3_v3(orco,zerovec);
+ copy_v3_v3(orco, zerovec);
}
if (ornor) {
- copy_v3_v3(ornor,zerovec);
+ copy_v3_v3(ornor, zerovec);
}
}
/************************************************/
@@ -1871,19 +1871,19 @@ static void psys_particle_on_shape(int UNUSED(distr), int UNUSED(index), float *
void psys_particle_on_emitter(ParticleSystemModifierData *psmd, int from, int index, int index_dmcache, float *fuv, float foffset, float *vec, float *nor, float *utan, float *vtan, float *orco, float *ornor)
{
if (psmd) {
- if (psmd->psys->part->distr==PART_DISTR_GRID && psmd->psys->part->from != PART_FROM_VERT) {
+ if (psmd->psys->part->distr == PART_DISTR_GRID && psmd->psys->part->from != PART_FROM_VERT) {
if (vec)
- copy_v3_v3(vec,fuv);
+ copy_v3_v3(vec, fuv);
if (orco)
copy_v3_v3(orco, fuv);
return;
}
/* we cant use the num_dmcache */
- psys_particle_on_dm(psmd->dm,from,index,index_dmcache,fuv,foffset,vec,nor,utan,vtan,orco,ornor);
+ psys_particle_on_dm(psmd->dm, from, index, index_dmcache, fuv, foffset, vec, nor, utan, vtan, orco, ornor);
}
else
- psys_particle_on_shape(from,index,fuv,vec,nor,utan,vtan,orco,ornor);
+ psys_particle_on_shape(from, index, fuv, vec, nor, utan, vtan, orco, ornor);
}
/************************************************/
@@ -1892,34 +1892,34 @@ void psys_particle_on_emitter(ParticleSystemModifierData *psmd, int from, int in
static void do_kink(ParticleKey *state, ParticleKey *par, float *par_rot, float time, float freq, float shape, float amplitude, float flat, short type, short axis, float obmat[][4], int smooth_start)
{
- float kink[3]={1.f,0.f,0.f}, par_vec[3], q1[4]={1.f,0.f,0.f,0.f};
- float t, dt=1.f, result[3];
+ float kink[3] = {1.f, 0.f, 0.f}, par_vec[3], q1[4] = {1.f, 0.f, 0.f, 0.f};
+ float t, dt = 1.f, result[3];
if (par == NULL || type == PART_KINK_NO)
return;
CLAMP(time, 0.f, 1.f);
- if (shape!=0.0f && type!=PART_KINK_BRAID) {
- if (shape<0.0f)
- time= (float)pow(time, 1.f+shape);
+ if (shape != 0.0f && type != PART_KINK_BRAID) {
+ if (shape < 0.0f)
+ time = (float)pow(time, 1.f + shape);
else
- time= (float)pow(time, 1.f/(1.f-shape));
+ time = (float)pow(time, 1.f / (1.f - shape));
}
- t = time * freq *(float)M_PI;
+ t = time * freq * (float)M_PI;
if (smooth_start) {
dt = fabs(t);
/* smooth the beginning of kink */
CLAMP(dt, 0.f, (float)M_PI);
- dt = sin(dt/2.f);
+ dt = sin(dt / 2.f);
}
if (type != PART_KINK_RADIAL) {
float temp[3];
- kink[axis]=1.f;
+ kink[axis] = 1.f;
if (obmat)
mul_mat3_m4_v3(obmat, kink);
@@ -1936,125 +1936,125 @@ static void do_kink(ParticleKey *state, ParticleKey *par, float *par_rot, float
copy_v3_v3(result, state->co);
sub_v3_v3v3(par_vec, par->co, state->co);
- switch(type) {
- case PART_KINK_CURL:
- {
- negate_v3(par_vec);
+ switch (type) {
+ case PART_KINK_CURL:
+ {
+ negate_v3(par_vec);
- if (flat > 0.f) {
- float proj[3];
- project_v3_v3v3(proj, par_vec, par->vel);
- madd_v3_v3fl(par_vec, proj, -flat);
+ if (flat > 0.f) {
+ float proj[3];
+ project_v3_v3v3(proj, par_vec, par->vel);
+ madd_v3_v3fl(par_vec, proj, -flat);
- project_v3_v3v3(proj, par_vec, kink);
- madd_v3_v3fl(par_vec, proj, -flat);
- }
+ project_v3_v3v3(proj, par_vec, kink);
+ madd_v3_v3fl(par_vec, proj, -flat);
+ }
- axis_angle_to_quat(q1, kink, (float)M_PI/2.f);
+ axis_angle_to_quat(q1, kink, (float)M_PI / 2.f);
- mul_qt_v3(q1, par_vec);
+ mul_qt_v3(q1, par_vec);
- madd_v3_v3fl(par_vec, kink, amplitude);
+ madd_v3_v3fl(par_vec, kink, amplitude);
- /* rotate kink vector around strand tangent */
- if (t!=0.f) {
- axis_angle_to_quat(q1, par->vel, t);
- mul_qt_v3(q1, par_vec);
- }
+ /* rotate kink vector around strand tangent */
+ if (t != 0.f) {
+ axis_angle_to_quat(q1, par->vel, t);
+ mul_qt_v3(q1, par_vec);
+ }
- add_v3_v3v3(result, par->co, par_vec);
- break;
- }
- case PART_KINK_RADIAL:
- {
- if (flat > 0.f) {
- float proj[3];
- /* flatten along strand */
- project_v3_v3v3(proj, par_vec, par->vel);
- madd_v3_v3fl(result, proj, flat);
+ add_v3_v3v3(result, par->co, par_vec);
+ break;
}
+ case PART_KINK_RADIAL:
+ {
+ if (flat > 0.f) {
+ float proj[3];
+ /* flatten along strand */
+ project_v3_v3v3(proj, par_vec, par->vel);
+ madd_v3_v3fl(result, proj, flat);
+ }
- madd_v3_v3fl(result, par_vec, -amplitude*(float)sin(t));
- break;
- }
- case PART_KINK_WAVE:
- {
- madd_v3_v3fl(result, kink, amplitude*(float)sin(t));
+ madd_v3_v3fl(result, par_vec, -amplitude * (float)sin(t));
+ break;
+ }
+ case PART_KINK_WAVE:
+ {
+ madd_v3_v3fl(result, kink, amplitude * (float)sin(t));
- if (flat > 0.f) {
- float proj[3];
- /* flatten along wave */
- project_v3_v3v3(proj, par_vec, kink);
- madd_v3_v3fl(result, proj, flat);
+ if (flat > 0.f) {
+ float proj[3];
+ /* flatten along wave */
+ project_v3_v3v3(proj, par_vec, kink);
+ madd_v3_v3fl(result, proj, flat);
- /* flatten along strand */
- project_v3_v3v3(proj, par_vec, par->vel);
- madd_v3_v3fl(result, proj, flat);
- }
- break;
- }
- case PART_KINK_BRAID:
- {
- float y_vec[3]={0.f,1.f,0.f};
- float z_vec[3]={0.f,0.f,1.f};
- float vec_one[3], state_co[3];
- float inp_y, inp_z, length;
-
- if (par_rot) {
- mul_qt_v3(par_rot, y_vec);
- mul_qt_v3(par_rot, z_vec);
+ /* flatten along strand */
+ project_v3_v3v3(proj, par_vec, par->vel);
+ madd_v3_v3fl(result, proj, flat);
+ }
+ break;
}
+ case PART_KINK_BRAID:
+ {
+ float y_vec[3] = {0.f, 1.f, 0.f};
+ float z_vec[3] = {0.f, 0.f, 1.f};
+ float vec_one[3], state_co[3];
+ float inp_y, inp_z, length;
- negate_v3(par_vec);
- normalize_v3_v3(vec_one, par_vec);
+ if (par_rot) {
+ mul_qt_v3(par_rot, y_vec);
+ mul_qt_v3(par_rot, z_vec);
+ }
- inp_y=dot_v3v3(y_vec, vec_one);
- inp_z=dot_v3v3(z_vec, vec_one);
+ negate_v3(par_vec);
+ normalize_v3_v3(vec_one, par_vec);
- if (inp_y > 0.5f) {
- copy_v3_v3(state_co, y_vec);
+ inp_y = dot_v3v3(y_vec, vec_one);
+ inp_z = dot_v3v3(z_vec, vec_one);
- mul_v3_fl(y_vec, amplitude*(float)cos(t));
- mul_v3_fl(z_vec, amplitude/2.f*(float)sin(2.f*t));
- }
- else if (inp_z > 0.0f) {
- mul_v3_v3fl(state_co, z_vec, (float)sin((float)M_PI/3.f));
- madd_v3_v3fl(state_co, y_vec, -0.5f);
+ if (inp_y > 0.5f) {
+ copy_v3_v3(state_co, y_vec);
- mul_v3_fl(y_vec, -amplitude * (float)cos(t + (float)M_PI/3.f));
- mul_v3_fl(z_vec, amplitude/2.f * (float)cos(2.f*t + (float)M_PI/6.f));
- }
- else {
- mul_v3_v3fl(state_co, z_vec, -(float)sin((float)M_PI/3.f));
- madd_v3_v3fl(state_co, y_vec, -0.5f);
+ mul_v3_fl(y_vec, amplitude * (float)cos(t));
+ mul_v3_fl(z_vec, amplitude / 2.f * (float)sin(2.f * t));
+ }
+ else if (inp_z > 0.0f) {
+ mul_v3_v3fl(state_co, z_vec, (float)sin((float)M_PI / 3.f));
+ madd_v3_v3fl(state_co, y_vec, -0.5f);
- mul_v3_fl(y_vec, amplitude * (float)-sin(t + (float)M_PI/6.f));
- mul_v3_fl(z_vec, amplitude/2.f * (float)-sin(2.f*t + (float)M_PI/3.f));
- }
+ mul_v3_fl(y_vec, -amplitude * (float)cos(t + (float)M_PI / 3.f));
+ mul_v3_fl(z_vec, amplitude / 2.f * (float)cos(2.f * t + (float)M_PI / 6.f));
+ }
+ else {
+ mul_v3_v3fl(state_co, z_vec, -(float)sin((float)M_PI / 3.f));
+ madd_v3_v3fl(state_co, y_vec, -0.5f);
+
+ mul_v3_fl(y_vec, amplitude * (float)-sin(t + (float)M_PI / 6.f));
+ mul_v3_fl(z_vec, amplitude / 2.f * (float)-sin(2.f * t + (float)M_PI / 3.f));
+ }
- mul_v3_fl(state_co, amplitude);
- add_v3_v3(state_co, par->co);
- sub_v3_v3v3(par_vec, state->co, state_co);
+ mul_v3_fl(state_co, amplitude);
+ add_v3_v3(state_co, par->co);
+ sub_v3_v3v3(par_vec, state->co, state_co);
- length = normalize_v3(par_vec);
- mul_v3_fl(par_vec, MIN2(length, amplitude/2.f));
+ length = normalize_v3(par_vec);
+ mul_v3_fl(par_vec, MIN2(length, amplitude / 2.f));
- add_v3_v3v3(state_co, par->co, y_vec);
- add_v3_v3(state_co, z_vec);
- add_v3_v3(state_co, par_vec);
+ add_v3_v3v3(state_co, par->co, y_vec);
+ add_v3_v3(state_co, z_vec);
+ add_v3_v3(state_co, par_vec);
- shape = 2.f*(float)M_PI * (1.f+shape);
+ shape = 2.f * (float)M_PI * (1.f + shape);
- if (t<shape) {
- shape = t/shape;
- shape = (float)sqrt((double)shape);
- interp_v3_v3v3(result, result, state_co, shape);
- }
- else {
- copy_v3_v3(result, state_co);
+ if (t < shape) {
+ shape = t / shape;
+ shape = (float)sqrt((double)shape);
+ interp_v3_v3v3(result, result, state_co, shape);
+ }
+ else {
+ copy_v3_v3(result, state_co);
+ }
+ break;
}
- break;
- }
}
/* blend the start of the kink */
@@ -2068,20 +2068,20 @@ static float do_clump(ParticleKey *state, ParticleKey *par, float time, float cl
{
float clump = 0.f;
- if (par && clumpfac!=0.0f) {
+ if (par && clumpfac != 0.0f) {
float cpow;
if (clumppow < 0.0f)
- cpow=1.0f+clumppow;
+ cpow = 1.0f + clumppow;
else
- cpow=1.0f+9.0f*clumppow;
+ cpow = 1.0f + 9.0f * clumppow;
if (clumpfac < 0.0f) /* clump roots instead of tips */
- clump = -clumpfac*pa_clump*(float)pow(1.0-(double)time,(double)cpow);
+ clump = -clumpfac * pa_clump * (float)pow(1.0 - (double)time, (double)cpow);
else
- clump = clumpfac*pa_clump*(float)pow((double)time,(double)cpow);
+ clump = clumpfac * pa_clump * (float)pow((double)time, (double)cpow);
- interp_v3_v3v3(state->co,state->co,par->co,clump);
+ interp_v3_v3v3(state->co, state->co, par->co, clump);
}
return clump;
@@ -2101,19 +2101,19 @@ void precalc_guides(ParticleSimulationData *sim, ListBase *effectors)
return;
LOOP_PARTICLES {
- psys_particle_on_emitter(sim->psmd,sim->psys->part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,state.co,0,0,0,0,0);
+ psys_particle_on_emitter(sim->psmd, sim->psys->part->from, pa->num, pa->num_dmcache, pa->fuv, pa->foffset, state.co, 0, 0, 0, 0, 0);
mul_m4_v3(sim->ob->obmat, state.co);
mul_mat3_m4_v3(sim->ob->obmat, state.vel);
pd_point_from_particle(sim, pa, &state, &point);
- for (eff = effectors->first; eff; eff=eff->next) {
+ for (eff = effectors->first; eff; eff = eff->next) {
if (eff->pd->forcefield != PFIELD_GUIDE)
continue;
if (!eff->guide_data)
- eff->guide_data = MEM_callocN(sizeof(GuideEffectorData)*psys->totpart, "GuideEffectorData");
+ eff->guide_data = MEM_callocN(sizeof(GuideEffectorData) * psys->totpart, "GuideEffectorData");
data = eff->guide_data + p;
@@ -2139,84 +2139,84 @@ int do_guides(ListBase *effectors, ParticleKey *state, int index, float time)
float guidetime, radius, weight, angle, totstrength = 0.0f;
float vec_to_point[3];
- if (effectors) for (eff = effectors->first; eff; eff=eff->next) {
- pd = eff->pd;
+ if (effectors) for (eff = effectors->first; eff; eff = eff->next) {
+ pd = eff->pd;
- if (pd->forcefield != PFIELD_GUIDE)
- continue;
+ if (pd->forcefield != PFIELD_GUIDE)
+ continue;
- data = eff->guide_data + index;
+ data = eff->guide_data + index;
- if (data->strength <= 0.0f)
- continue;
+ if (data->strength <= 0.0f)
+ continue;
- guidetime = time / (1.0f - pd->free_end);
+ guidetime = time / (1.0f - pd->free_end);
- if (guidetime>1.0f)
- continue;
+ if (guidetime > 1.0f)
+ continue;
- cu = (Curve*)eff->ob->data;
+ cu = (Curve *)eff->ob->data;
- if (pd->flag & PFIELD_GUIDE_PATH_ADD) {
- if (where_on_path(eff->ob, data->strength * guidetime, guidevec, guidedir, NULL, &radius, &weight)==0)
- return 0;
- }
- else {
- if (where_on_path(eff->ob, guidetime, guidevec, guidedir, NULL, &radius, &weight)==0)
- return 0;
- }
+ if (pd->flag & PFIELD_GUIDE_PATH_ADD) {
+ if (where_on_path(eff->ob, data->strength * guidetime, guidevec, guidedir, NULL, &radius, &weight) == 0)
+ return 0;
+ }
+ else {
+ if (where_on_path(eff->ob, guidetime, guidevec, guidedir, NULL, &radius, &weight) == 0)
+ return 0;
+ }
- mul_m4_v3(eff->ob->obmat, guidevec);
- mul_mat3_m4_v3(eff->ob->obmat, guidedir);
+ mul_m4_v3(eff->ob->obmat, guidevec);
+ mul_mat3_m4_v3(eff->ob->obmat, guidedir);
- normalize_v3(guidedir);
+ normalize_v3(guidedir);
- copy_v3_v3(vec_to_point, data->vec_to_point);
+ copy_v3_v3(vec_to_point, data->vec_to_point);
- if (guidetime != 0.0f) {
- /* curve direction */
- cross_v3_v3v3(temp, eff->guide_dir, guidedir);
- angle = dot_v3v3(eff->guide_dir, guidedir)/(len_v3(eff->guide_dir));
- angle = saacos(angle);
- axis_angle_to_quat( rot2,temp, angle);
- mul_qt_v3(rot2, vec_to_point);
+ if (guidetime != 0.0f) {
+ /* curve direction */
+ cross_v3_v3v3(temp, eff->guide_dir, guidedir);
+ angle = dot_v3v3(eff->guide_dir, guidedir) / (len_v3(eff->guide_dir));
+ angle = saacos(angle);
+ axis_angle_to_quat(rot2, temp, angle);
+ mul_qt_v3(rot2, vec_to_point);
- /* curve tilt */
- axis_angle_to_quat( rot2,guidedir, guidevec[3] - eff->guide_loc[3]);
- mul_qt_v3(rot2, vec_to_point);
- }
+ /* curve tilt */
+ axis_angle_to_quat(rot2, guidedir, guidevec[3] - eff->guide_loc[3]);
+ mul_qt_v3(rot2, vec_to_point);
+ }
- /* curve taper */
- if (cu->taperobj)
- mul_v3_fl(vec_to_point, calc_taper(eff->scene, cu->taperobj, (int)(data->strength*guidetime*100.0f), 100));
+ /* curve taper */
+ if (cu->taperobj)
+ mul_v3_fl(vec_to_point, BKE_displist_calc_taper(eff->scene, cu->taperobj, (int)(data->strength * guidetime * 100.0f), 100));
- else { /* curve size*/
- if (cu->flag & CU_PATH_RADIUS) {
- mul_v3_fl(vec_to_point, radius);
+ else { /* curve size*/
+ if (cu->flag & CU_PATH_RADIUS) {
+ mul_v3_fl(vec_to_point, radius);
+ }
}
- }
- par.co[0] = par.co[1] = par.co[2] = 0.0f;
- copy_v3_v3(key.co, vec_to_point);
- do_kink(&key, &par, 0, guidetime, pd->kink_freq, pd->kink_shape, pd->kink_amp, 0.f, pd->kink, pd->kink_axis, 0, 0);
- do_clump(&key, &par, guidetime, pd->clump_fac, pd->clump_pow, 1.0f);
- copy_v3_v3(vec_to_point, key.co);
+ par.co[0] = par.co[1] = par.co[2] = 0.0f;
+ copy_v3_v3(key.co, vec_to_point);
+ do_kink(&key, &par, 0, guidetime, pd->kink_freq, pd->kink_shape, pd->kink_amp, 0.f, pd->kink, pd->kink_axis, 0, 0);
+ do_clump(&key, &par, guidetime, pd->clump_fac, pd->clump_pow, 1.0f);
+ copy_v3_v3(vec_to_point, key.co);
- add_v3_v3(vec_to_point, guidevec);
+ add_v3_v3(vec_to_point, guidevec);
- //sub_v3_v3v3(pa_loc,pa_loc,pa_zero);
- madd_v3_v3fl(effect, vec_to_point, data->strength);
- madd_v3_v3fl(veffect, guidedir, data->strength);
- totstrength += data->strength;
+ //sub_v3_v3v3(pa_loc, pa_loc, pa_zero);
+ madd_v3_v3fl(effect, vec_to_point, data->strength);
+ madd_v3_v3fl(veffect, guidedir, data->strength);
+ totstrength += data->strength;
- if (pd->flag & PFIELD_GUIDE_PATH_WEIGHT)
- totstrength *= weight;
- }
+ if (pd->flag & PFIELD_GUIDE_PATH_WEIGHT)
+ totstrength *= weight;
+ }
if (totstrength != 0.0f) {
if (totstrength > 1.0f)
mul_v3_fl(effect, 1.0f / totstrength);
CLAMP(totstrength, 0.0f, 1.0f);
- //add_v3_v3(effect,pa_zero);
+ //add_v3_v3(effect, pa_zero);
interp_v3_v3v3(state->co, state->co, effect, totstrength);
normalize_v3(veffect);
@@ -2232,13 +2232,13 @@ static void do_rough(float *loc, float mat[4][4], float t, float fac, float size
float rco[3];
if (thres != 0.0f)
- if ((float)fabs((float)(-1.5f+loc[0]+loc[1]+loc[2]))<1.5f*thres) return;
+ if ((float)fabs((float)(-1.5f + loc[0] + loc[1] + loc[2])) < 1.5f * thres) return;
- copy_v3_v3(rco,loc);
- mul_v3_fl(rco,t);
- rough[0]=-1.0f+2.0f*BLI_gTurbulence(size, rco[0], rco[1], rco[2], 2,0,2);
- rough[1]=-1.0f+2.0f*BLI_gTurbulence(size, rco[1], rco[2], rco[0], 2,0,2);
- rough[2]=-1.0f+2.0f*BLI_gTurbulence(size, rco[2], rco[0], rco[1], 2,0,2);
+ copy_v3_v3(rco, loc);
+ mul_v3_fl(rco, t);
+ rough[0] = -1.0f + 2.0f * BLI_gTurbulence(size, rco[0], rco[1], rco[2], 2, 0, 2);
+ rough[1] = -1.0f + 2.0f * BLI_gTurbulence(size, rco[1], rco[2], rco[0], 2, 0, 2);
+ rough[2] = -1.0f + 2.0f * BLI_gTurbulence(size, rco[2], rco[0], rco[1], 2, 0, 2);
madd_v3_v3fl(state->co, mat[0], fac * rough[0]);
madd_v3_v3fl(state->co, mat[1], fac * rough[1]);
@@ -2249,18 +2249,18 @@ static void do_rough_end(float *loc, float mat[4][4], float t, float fac, float
float rough[2];
float roughfac;
- roughfac=fac*(float)pow((double)t,shape);
- copy_v2_v2(rough,loc);
- rough[0]=-1.0f+2.0f*rough[0];
- rough[1]=-1.0f+2.0f*rough[1];
- mul_v2_fl(rough,roughfac);
+ roughfac = fac * (float)pow((double)t, shape);
+ copy_v2_v2(rough, loc);
+ rough[0] = -1.0f + 2.0f * rough[0];
+ rough[1] = -1.0f + 2.0f * rough[1];
+ mul_v2_fl(rough, roughfac);
madd_v3_v3fl(state->co, mat[0], rough[0]);
madd_v3_v3fl(state->co, mat[1], rough[1]);
}
static void do_path_effectors(ParticleSimulationData *sim, int i, ParticleCacheKey *ca, int k, int steps, float *UNUSED(rootco), float effector, float UNUSED(dfra), float UNUSED(cfra), float *length, float *vec)
{
- float force[3] = {0.0f,0.0f,0.0f};
+ float force[3] = {0.0f, 0.0f, 0.0f};
ParticleKey eff_key;
EffectedPoint epoint;
@@ -2268,23 +2268,23 @@ static void do_path_effectors(ParticleSimulationData *sim, int i, ParticleCacheK
if (sim->psys->flag & PSYS_HAIR_DYNAMICS)
return;
- copy_v3_v3(eff_key.co,(ca-1)->co);
- copy_v3_v3(eff_key.vel,(ca-1)->vel);
- copy_qt_qt(eff_key.rot,(ca-1)->rot);
+ copy_v3_v3(eff_key.co, (ca - 1)->co);
+ copy_v3_v3(eff_key.vel, (ca - 1)->vel);
+ copy_qt_qt(eff_key.rot, (ca - 1)->rot);
- pd_point_from_particle(sim, sim->psys->particles+i, &eff_key, &epoint);
+ pd_point_from_particle(sim, sim->psys->particles + i, &eff_key, &epoint);
pdDoEffectors(sim->psys->effectors, sim->colliders, sim->psys->part->effector_weights, &epoint, force, NULL);
- mul_v3_fl(force, effector*powf((float)k / (float)steps, 100.0f * sim->psys->part->eff_hair) / (float)steps);
+ mul_v3_fl(force, effector * powf((float)k / (float)steps, 100.0f * sim->psys->part->eff_hair) / (float)steps);
add_v3_v3(force, vec);
normalize_v3(force);
if (k < steps)
- sub_v3_v3v3(vec, (ca+1)->co, ca->co);
+ sub_v3_v3v3(vec, (ca + 1)->co, ca->co);
- madd_v3_v3v3fl(ca->co, (ca-1)->co, force, *length);
+ madd_v3_v3v3fl(ca->co, (ca - 1)->co, force, *length);
if (k < steps)
*length = len_v3(vec);
@@ -2296,10 +2296,10 @@ static int check_path_length(int k, ParticleCacheKey *keys, ParticleCacheKey *st
add_v3_v3v3(state->co, (state - 1)->co, dvec);
keys->steps = k;
/* something over the maximum step value */
- return k=100000;
+ return k = 100000;
}
else {
- *cur_length+=length;
+ *cur_length += length;
return k;
}
}
@@ -2308,7 +2308,7 @@ static void offset_child(ChildParticle *cpa, ParticleKey *par, float *par_rot, P
copy_v3_v3(child->co, cpa->fuv);
mul_v3_fl(child->co, radius);
- child->co[0]*=flat;
+ child->co[0] *= flat;
copy_v3_v3(child->vel, par->vel);
@@ -2323,7 +2323,7 @@ static void offset_child(ChildParticle *cpa, ParticleKey *par, float *par_rot, P
}
float *psys_cache_vgroup(DerivedMesh *dm, ParticleSystem *psys, int vgroup)
{
- float *vg=0;
+ float *vg = 0;
if (vgroup < 0) {
/* hair dynamics pinning vgroup */
@@ -2332,15 +2332,15 @@ float *psys_cache_vgroup(DerivedMesh *dm, ParticleSystem *psys, int vgroup)
else if (psys->vgroup[vgroup]) {
MDeformVert *dvert = dm->getVertDataArray(dm, CD_MDEFORMVERT);
if (dvert) {
- int totvert=dm->getNumVerts(dm), i;
- vg=MEM_callocN(sizeof(float)*totvert, "vg_cache");
- if (psys->vg_neg&(1<<vgroup)) {
- for (i=0; i<totvert; i++)
- vg[i]= 1.0f - defvert_find_weight(&dvert[i], psys->vgroup[vgroup] - 1);
+ int totvert = dm->getNumVerts(dm), i;
+ vg = MEM_callocN(sizeof(float) * totvert, "vg_cache");
+ if (psys->vg_neg & (1 << vgroup)) {
+ for (i = 0; i < totvert; i++)
+ vg[i] = 1.0f - defvert_find_weight(&dvert[i], psys->vgroup[vgroup] - 1);
}
else {
- for (i=0; i<totvert; i++)
- vg[i]= defvert_find_weight(&dvert[i], psys->vgroup[vgroup] - 1);
+ for (i = 0; i < totvert; i++)
+ vg[i] = defvert_find_weight(&dvert[i], psys->vgroup[vgroup] - 1);
}
}
}
@@ -2348,29 +2348,29 @@ float *psys_cache_vgroup(DerivedMesh *dm, ParticleSystem *psys, int vgroup)
}
void psys_find_parents(ParticleSimulationData *sim)
{
- ParticleSettings *part=sim->psys->part;
+ ParticleSettings *part = sim->psys->part;
KDTree *tree;
ChildParticle *cpa;
- int p, totparent,totchild=sim->psys->totchild;
+ int p, totparent, totchild = sim->psys->totchild;
float co[3], orco[3];
- int from=PART_FROM_FACE;
- totparent=(int)(totchild*part->parents*0.3f);
+ int from = PART_FROM_FACE;
+ totparent = (int)(totchild * part->parents * 0.3f);
if (G.rendering && part->child_nbr && part->ren_child_nbr)
- totparent*=(float)part->child_nbr/(float)part->ren_child_nbr;
+ totparent *= (float)part->child_nbr / (float)part->ren_child_nbr;
- tree=BLI_kdtree_new(totparent);
+ tree = BLI_kdtree_new(totparent);
- for (p=0,cpa=sim->psys->child; p<totparent; p++,cpa++) {
- psys_particle_on_emitter(sim->psmd,from,cpa->num,DMCACHE_ISCHILD,cpa->fuv,cpa->foffset,co,0,0,0,orco,0);
+ for (p = 0, cpa = sim->psys->child; p < totparent; p++, cpa++) {
+ psys_particle_on_emitter(sim->psmd, from, cpa->num, DMCACHE_ISCHILD, cpa->fuv, cpa->foffset, co, 0, 0, 0, orco, 0);
BLI_kdtree_insert(tree, p, orco, NULL);
}
BLI_kdtree_balance(tree);
- for (; p<totchild; p++,cpa++) {
- psys_particle_on_emitter(sim->psmd,from,cpa->num,DMCACHE_ISCHILD,cpa->fuv,cpa->foffset,co,0,0,0,orco,0);
- cpa->parent=BLI_kdtree_find_nearest(tree, orco, NULL, NULL);
+ for (; p < totchild; p++, cpa++) {
+ psys_particle_on_emitter(sim->psmd, from, cpa->num, DMCACHE_ISCHILD, cpa->fuv, cpa->foffset, co, 0, 0, 0, orco, 0);
+ cpa->parent = BLI_kdtree_find_nearest(tree, orco, NULL, NULL);
}
BLI_kdtree_free(tree);
@@ -2399,7 +2399,7 @@ static void get_strand_normal(Material *ma, const float surfnor[3], float surfdi
if (ma->strand_surfnor > 0.0f) {
if (ma->strand_surfnor > surfdist) {
- blend= (ma->strand_surfnor - surfdist)/ma->strand_surfnor;
+ blend = (ma->strand_surfnor - surfdist) / ma->strand_surfnor;
interp_v3_v3v3(vnor, vnor, surfnor, blend);
normalize_v3(vnor);
}
@@ -2410,80 +2410,80 @@ static void get_strand_normal(Material *ma, const float surfnor[3], float surfdi
static int psys_threads_init_path(ParticleThread *threads, Scene *scene, float cfra, int editupdate)
{
- ParticleThreadContext *ctx= threads[0].ctx;
+ ParticleThreadContext *ctx = threads[0].ctx;
/* Object *ob= ctx->sim.ob; */
- ParticleSystem *psys= ctx->sim.psys;
+ ParticleSystem *psys = ctx->sim.psys;
ParticleSettings *part = psys->part;
/* ParticleEditSettings *pset = &scene->toolsettings->particle; */
- int totparent=0, between=0;
+ int totparent = 0, between = 0;
int steps = (int)pow(2.0, (double)part->draw_step);
int totchild = psys->totchild;
- int i, seed, totthread= threads[0].tot;
+ int i, seed, totthread = threads[0].tot;
/*---start figuring out what is actually wanted---*/
if (psys_in_edit_mode(scene, psys)) {
ParticleEditSettings *pset = &scene->toolsettings->particle;
- if (psys->renderdata==0 && (psys->edit==NULL || pset->flag & PE_DRAW_PART)==0)
- totchild=0;
+ if (psys->renderdata == 0 && (psys->edit == NULL || pset->flag & PE_DRAW_PART) == 0)
+ totchild = 0;
steps = (int)pow(2.0, (double)pset->draw_step);
}
- if (totchild && part->childtype==PART_CHILD_FACES) {
- totparent=(int)(totchild*part->parents*0.3f);
+ if (totchild && part->childtype == PART_CHILD_FACES) {
+ totparent = (int)(totchild * part->parents * 0.3f);
if (G.rendering && part->child_nbr && part->ren_child_nbr)
- totparent*=(float)part->child_nbr/(float)part->ren_child_nbr;
+ totparent *= (float)part->child_nbr / (float)part->ren_child_nbr;
/* part->parents could still be 0 so we can't test with totparent */
- between=1;
+ between = 1;
}
if (psys->renderdata)
- steps=(int)pow(2.0,(double)part->ren_step);
+ steps = (int)pow(2.0, (double)part->ren_step);
else {
- totchild=(int)((float)totchild*(float)part->disp/100.0f);
- totparent=MIN2(totparent,totchild);
+ totchild = (int)((float)totchild * (float)part->disp / 100.0f);
+ totparent = MIN2(totparent, totchild);
}
- if (totchild==0) return 0;
+ if (totchild == 0) return 0;
/* init random number generator */
- seed= 31415926 + ctx->sim.psys->seed;
+ seed = 31415926 + ctx->sim.psys->seed;
if (ctx->editupdate || totchild < 10000)
- totthread= 1;
+ totthread = 1;
- for (i=0; i<totthread; i++) {
- threads[i].rng_path= rng_new(seed);
- threads[i].tot= totthread;
+ for (i = 0; i < totthread; i++) {
+ threads[i].rng_path = rng_new(seed);
+ threads[i].tot = totthread;
}
/* fill context values */
- ctx->between= between;
- ctx->steps= steps;
- ctx->totchild= totchild;
- ctx->totparent= totparent;
- ctx->parent_pass= 0;
- ctx->cfra= cfra;
- ctx->editupdate= editupdate;
+ ctx->between = between;
+ ctx->steps = steps;
+ ctx->totchild = totchild;
+ ctx->totparent = totparent;
+ ctx->parent_pass = 0;
+ ctx->cfra = cfra;
+ ctx->editupdate = editupdate;
psys->lattice = psys_get_lattice(&ctx->sim);
/* cache all relevant vertex groups if they exist */
- ctx->vg_length = psys_cache_vgroup(ctx->dm,psys,PSYS_VG_LENGTH);
- ctx->vg_clump = psys_cache_vgroup(ctx->dm,psys,PSYS_VG_CLUMP);
- ctx->vg_kink = psys_cache_vgroup(ctx->dm,psys,PSYS_VG_KINK);
- ctx->vg_rough1 = psys_cache_vgroup(ctx->dm,psys,PSYS_VG_ROUGH1);
- ctx->vg_rough2 = psys_cache_vgroup(ctx->dm,psys,PSYS_VG_ROUGH2);
- ctx->vg_roughe = psys_cache_vgroup(ctx->dm,psys,PSYS_VG_ROUGHE);
+ ctx->vg_length = psys_cache_vgroup(ctx->dm, psys, PSYS_VG_LENGTH);
+ ctx->vg_clump = psys_cache_vgroup(ctx->dm, psys, PSYS_VG_CLUMP);
+ ctx->vg_kink = psys_cache_vgroup(ctx->dm, psys, PSYS_VG_KINK);
+ ctx->vg_rough1 = psys_cache_vgroup(ctx->dm, psys, PSYS_VG_ROUGH1);
+ ctx->vg_rough2 = psys_cache_vgroup(ctx->dm, psys, PSYS_VG_ROUGH2);
+ ctx->vg_roughe = psys_cache_vgroup(ctx->dm, psys, PSYS_VG_ROUGHE);
if (psys->part->flag & PART_CHILD_EFFECT)
- ctx->vg_effector = psys_cache_vgroup(ctx->dm,psys,PSYS_VG_EFFECTOR);
+ ctx->vg_effector = psys_cache_vgroup(ctx->dm, psys, PSYS_VG_EFFECTOR);
/* set correct ipo timing */
#if 0 // XXX old animation system
- if (part->flag&PART_ABS_TIME && part->ipo) {
+ if (part->flag & PART_ABS_TIME && part->ipo) {
calc_ipo(part->ipo, cfra);
execute_ipo((ID *)part, part->ipo);
}
@@ -2495,15 +2495,15 @@ static int psys_threads_init_path(ParticleThread *threads, Scene *scene, float c
/* note: this function must be thread safe, except for branching! */
static void psys_thread_create_path(ParticleThread *thread, struct ChildParticle *cpa, ParticleCacheKey *child_keys, int i)
{
- ParticleThreadContext *ctx= thread->ctx;
- Object *ob= ctx->sim.ob;
+ ParticleThreadContext *ctx = thread->ctx;
+ Object *ob = ctx->sim.ob;
ParticleSystem *psys = ctx->sim.psys;
ParticleSettings *part = psys->part;
- ParticleCacheKey **cache= psys->childcache;
- ParticleCacheKey **pcache= psys_in_edit_mode(ctx->sim.scene, psys) ? psys->edit->pathcache : psys->pathcache;
+ ParticleCacheKey **cache = psys->childcache;
+ ParticleCacheKey **pcache = psys_in_edit_mode(ctx->sim.scene, psys) ? psys->edit->pathcache : psys->pathcache;
ParticleCacheKey *child, *par = NULL, *key[4];
ParticleTexture ptex;
- float *cpa_fuv=0, *par_rot=0, rot[4];
+ float *cpa_fuv = 0, *par_rot = 0, rot[4];
float orco[3], ornor[3], hairmat[4][4], t, dvec[3], off1[4][3], off2[4][3];
float length, max_length = 1.0f, cur_length = 0.0f;
float eff_length, eff_vec[3], weight[4];
@@ -2516,7 +2516,7 @@ static void psys_thread_create_path(ParticleThread *thread, struct ChildParticle
if (ctx->between) {
ParticleData *pa = psys->particles + cpa->pa[0];
int w, needupdate;
- float foffset, wsum=0.f;
+ float foffset, wsum = 0.f;
float co[3];
float p_min = part->parting_min;
float p_max = part->parting_max;
@@ -2524,11 +2524,11 @@ static void psys_thread_create_path(ParticleThread *thread, struct ChildParticle
float p_fac = part->parents > 0.f ? 0.f : part->parting_fac;
if (ctx->editupdate) {
- needupdate= 0;
- w= 0;
- while (w<4 && cpa->pa[w]>=0) {
+ needupdate = 0;
+ w = 0;
+ while (w < 4 && cpa->pa[w] >= 0) {
if (psys->edit->points[cpa->pa[w]].flag & PEP_EDIT_RECALC) {
- needupdate= 1;
+ needupdate = 1;
break;
}
w++;
@@ -2537,11 +2537,11 @@ static void psys_thread_create_path(ParticleThread *thread, struct ChildParticle
if (!needupdate)
return;
else
- memset(child_keys, 0, sizeof(*child_keys)*(ctx->steps+1));
+ memset(child_keys, 0, sizeof(*child_keys) * (ctx->steps + 1));
}
/* get parent paths */
- for (w=0; w<4; w++) {
+ for (w = 0; w < 4; w++) {
if (cpa->pa[w] >= 0) {
key[w] = pcache[cpa->pa[w]];
weight[w] = cpa->w[w];
@@ -2554,20 +2554,20 @@ static void psys_thread_create_path(ParticleThread *thread, struct ChildParticle
/* modify weights to create parting */
if (p_fac > 0.f) {
- for (w=0; w<4; w++) {
+ for (w = 0; w < 4; w++) {
if (w && weight[w] > 0.f) {
float d;
if (part->flag & PART_CHILD_LONG_HAIR) {
/* For long hair use tip distance/root distance as parting factor instead of root to tip angle. */
float d1 = len_v3v3(key[0]->co, key[w]->co);
- float d2 = len_v3v3((key[0]+key[0]->steps-1)->co, (key[w]+key[w]->steps-1)->co);
+ float d2 = len_v3v3((key[0] + key[0]->steps - 1)->co, (key[w] + key[w]->steps - 1)->co);
- d = d1 > 0.f ? d2/d1 - 1.f : 10000.f;
+ d = d1 > 0.f ? d2 / d1 - 1.f : 10000.f;
}
else {
float v1[3], v2[3];
- sub_v3_v3v3(v1, (key[0]+key[0]->steps-1)->co, key[0]->co);
- sub_v3_v3v3(v2, (key[w]+key[w]->steps-1)->co, key[w]->co);
+ sub_v3_v3v3(v1, (key[0] + key[0]->steps - 1)->co, key[0]->co);
+ sub_v3_v3v3(v2, (key[w] + key[w]->steps - 1)->co, key[w]->co);
normalize_v3(v1);
normalize_v3(v2);
@@ -2575,7 +2575,7 @@ static void psys_thread_create_path(ParticleThread *thread, struct ChildParticle
}
if (p_max > p_min)
- d = (d - p_min)/(p_max - p_min);
+ d = (d - p_min) / (p_max - p_min);
else
d = (d - p_min) <= 0.f ? 0.f : 1.f;
@@ -2586,7 +2586,7 @@ static void psys_thread_create_path(ParticleThread *thread, struct ChildParticle
}
wsum += weight[w];
}
- for (w=0; w<4; w++)
+ for (w = 0; w < 4; w++)
weight[w] /= wsum;
interp_v4_v4v4(weight, cpa->w, weight, p_fac);
@@ -2599,11 +2599,11 @@ static void psys_thread_create_path(ParticleThread *thread, struct ChildParticle
cpa_fuv = cpa->fuv;
cpa_from = PART_FROM_FACE;
- psys_particle_on_emitter(ctx->sim.psmd,cpa_from,cpa_num,DMCACHE_ISCHILD,cpa->fuv,foffset,co,ornor,0,0,orco,0);
+ psys_particle_on_emitter(ctx->sim.psmd, cpa_from, cpa_num, DMCACHE_ISCHILD, cpa->fuv, foffset, co, ornor, 0, 0, orco, 0);
mul_m4_v3(ob->obmat, co);
- for (w=0; w<4; w++)
+ for (w = 0; w < 4; w++)
sub_v3_v3v3(off1[w], co, key[w]->co);
psys_mat_hair_to_global(ob, ctx->sim.psmd->dm, psys->part->from, pa, hairmat);
@@ -2615,7 +2615,7 @@ static void psys_thread_create_path(ParticleThread *thread, struct ChildParticle
if (!(psys->edit->points[cpa->parent].flag & PEP_EDIT_RECALC))
return;
- memset(child_keys, 0, sizeof(*child_keys)*(ctx->steps+1));
+ memset(child_keys, 0, sizeof(*child_keys) * (ctx->steps + 1));
}
/* get the parent path */
@@ -2626,7 +2626,7 @@ static void psys_thread_create_path(ParticleThread *thread, struct ChildParticle
cpa_num = pa->num;
cpa_fuv = pa->fuv;
- psys_particle_on_emitter(ctx->sim.psmd,cpa_from,cpa_num,DMCACHE_ISCHILD,cpa_fuv,pa->foffset,co,ornor,0,0,orco,0);
+ psys_particle_on_emitter(ctx->sim.psmd, cpa_from, cpa_num, DMCACHE_ISCHILD, cpa_fuv, pa->foffset, co, ornor, 0, 0, orco, 0);
psys_mat_hair_to_global(ob, ctx->sim.psmd->dm, psys->part->from, pa, hairmat);
}
@@ -2642,66 +2642,66 @@ static void psys_thread_create_path(ParticleThread *thread, struct ChildParticle
}
/* create the child path */
- for (k=0,child=child_keys; k<=ctx->steps; k++,child++) {
+ for (k = 0, child = child_keys; k <= ctx->steps; k++, child++) {
if (ctx->between) {
- int w=0;
+ int w = 0;
zero_v3(child->co);
zero_v3(child->vel);
unit_qt(child->rot);
- for (w=0; w<4; w++) {
+ for (w = 0; w < 4; w++) {
copy_v3_v3(off2[w], off1[w]);
if (part->flag & PART_CHILD_LONG_HAIR) {
/* Use parent rotation (in addition to emission location) to determine child offset. */
if (k)
- mul_qt_v3((key[w]+k)->rot, off2[w]);
+ mul_qt_v3((key[w] + k)->rot, off2[w]);
/* Fade the effect of rotation for even lengths in the end */
- project_v3_v3v3(dvec, off2[w], (key[w]+k)->vel);
- madd_v3_v3fl(off2[w], dvec, -(float)k/(float)ctx->steps);
+ project_v3_v3v3(dvec, off2[w], (key[w] + k)->vel);
+ madd_v3_v3fl(off2[w], dvec, -(float)k / (float)ctx->steps);
}
- add_v3_v3(off2[w], (key[w]+k)->co);
+ add_v3_v3(off2[w], (key[w] + k)->co);
}
/* child position is the weighted sum of parent positions */
interp_v3_v3v3v3v3(child->co, off2[0], off2[1], off2[2], off2[3], weight);
- interp_v3_v3v3v3v3(child->vel, (key[0]+k)->vel, (key[1]+k)->vel, (key[2]+k)->vel, (key[3]+k)->vel, weight);
+ interp_v3_v3v3v3v3(child->vel, (key[0] + k)->vel, (key[1] + k)->vel, (key[2] + k)->vel, (key[3] + k)->vel, weight);
- copy_qt_qt(child->rot, (key[0]+k)->rot);
+ copy_qt_qt(child->rot, (key[0] + k)->rot);
}
else {
if (k) {
- mul_qt_qtqt(rot, (key[0]+k)->rot, key[0]->rot);
+ mul_qt_qtqt(rot, (key[0] + k)->rot, key[0]->rot);
par_rot = rot;
}
else {
par_rot = key[0]->rot;
}
/* offset the child from the parent position */
- offset_child(cpa, (ParticleKey*)(key[0]+k), par_rot, (ParticleKey*)child, part->childflat, part->childrad);
+ offset_child(cpa, (ParticleKey *)(key[0] + k), par_rot, (ParticleKey *)child, part->childflat, part->childrad);
}
- child->time = (float)k/(float)ctx->steps;
+ child->time = (float)k / (float)ctx->steps;
}
/* apply effectors */
if (part->flag & PART_CHILD_EFFECT) {
- for (k=0,child=child_keys; k<=ctx->steps; k++,child++) {
+ for (k = 0, child = child_keys; k <= ctx->steps; k++, child++) {
if (k) {
do_path_effectors(&ctx->sim, cpa->pa[0], child, k, ctx->steps, child_keys->co, ptex.effector, 0.0f, ctx->cfra, &eff_length, eff_vec);
}
else {
- sub_v3_v3v3(eff_vec, (child+1)->co, child->co);
+ sub_v3_v3v3(eff_vec, (child + 1)->co, child->co);
eff_length = len_v3(eff_vec);
}
}
}
- for (k=0,child=child_keys; k<=ctx->steps; k++,child++) {
- t = (float)k/(float)ctx->steps;
+ for (k = 0, child = child_keys; k <= ctx->steps; k++, child++) {
+ t = (float)k / (float)ctx->steps;
if (ctx->totparent)
/* this is now threadsafe, virtual parents are calculated before rest of children */
@@ -2711,7 +2711,7 @@ static void psys_thread_create_path(ParticleThread *thread, struct ChildParticle
if (par) {
if (k) {
- mul_qt_qtqt(rot, (par+k)->rot, par->rot);
+ mul_qt_qtqt(rot, (par + k)->rot, par->rot);
par_rot = rot;
}
else {
@@ -2724,21 +2724,21 @@ static void psys_thread_create_path(ParticleThread *thread, struct ChildParticle
do_child_modifiers(&ctx->sim, &ptex, (ParticleKey *)par, par_rot, cpa, orco, hairmat, (ParticleKey *)child, t);
/* we have to correct velocity because of kink & clump */
- if (k>1) {
- sub_v3_v3v3((child-1)->vel, child->co, (child-2)->co);
- mul_v3_fl((child-1)->vel, 0.5);
+ if (k > 1) {
+ sub_v3_v3v3((child - 1)->vel, child->co, (child - 2)->co);
+ mul_v3_fl((child - 1)->vel, 0.5);
if (ctx->ma && (part->draw_col == PART_DRAW_COL_MAT))
- get_strand_normal(ctx->ma, ornor, cur_length, (child-1)->vel);
+ get_strand_normal(ctx->ma, ornor, cur_length, (child - 1)->vel);
}
if (k == ctx->steps)
- sub_v3_v3v3(child->vel, child->co, (child-1)->co);
+ sub_v3_v3v3(child->vel, child->co, (child - 1)->co);
/* check if path needs to be cut before actual end of data points */
if (k) {
- sub_v3_v3v3(dvec, child->co, (child-1)->co);
- length = 1.0f/(float)ctx->steps;
+ sub_v3_v3v3(dvec, child->co, (child - 1)->co);
+ length = 1.0f / (float)ctx->steps;
k = check_path_length(k, child_keys, child, max_length, &cur_length, length, dvec);
}
else {
@@ -2760,20 +2760,20 @@ static void psys_thread_create_path(ParticleThread *thread, struct ChildParticle
static void *exec_child_path_cache(void *data)
{
- ParticleThread *thread= (ParticleThread*)data;
- ParticleThreadContext *ctx= thread->ctx;
- ParticleSystem *psys= ctx->sim.psys;
- ParticleCacheKey **cache= psys->childcache;
+ ParticleThread *thread = (ParticleThread *)data;
+ ParticleThreadContext *ctx = thread->ctx;
+ ParticleSystem *psys = ctx->sim.psys;
+ ParticleCacheKey **cache = psys->childcache;
ChildParticle *cpa;
- int i, totchild= ctx->totchild, first= 0;
+ int i, totchild = ctx->totchild, first = 0;
if (thread->tot > 1) {
- first= ctx->parent_pass? 0 : ctx->totparent;
- totchild= ctx->parent_pass? ctx->totparent : ctx->totchild;
+ first = ctx->parent_pass ? 0 : ctx->totparent;
+ totchild = ctx->parent_pass ? ctx->totparent : ctx->totchild;
}
- cpa= psys->child + first + thread->num;
- for (i=first+thread->num; i<totchild; i+=thread->tot, cpa+=thread->tot)
+ cpa = psys->child + first + thread->num;
+ for (i = first + thread->num; i < totchild; i += thread->tot, cpa += thread->tot)
psys_thread_create_path(thread, cpa, cache[i], i);
return 0;
@@ -2789,16 +2789,16 @@ void psys_cache_child_paths(ParticleSimulationData *sim, float cfra, int editupd
if (sim->psys->flag & PSYS_GLOBAL_HAIR)
return;
- pthreads= psys_threads_create(sim);
+ pthreads = psys_threads_create(sim);
if (!psys_threads_init_path(pthreads, sim->scene, cfra, editupdate)) {
psys_threads_free(pthreads);
return;
}
- ctx= pthreads[0].ctx;
- totchild= ctx->totchild;
- totparent= ctx->totparent;
+ ctx = pthreads[0].ctx;
+ totchild = ctx->totchild;
+ totparent = ctx->totparent;
if (editupdate && sim->psys->childcache && totchild == sim->psys->totchildcache) {
; /* just overwrite the existing cache */
@@ -2806,11 +2806,11 @@ void psys_cache_child_paths(ParticleSimulationData *sim, float cfra, int editupd
else {
/* clear out old and create new empty path cache */
free_child_path_cache(sim->psys);
- sim->psys->childcache= psys_alloc_path_cache_buffers(&sim->psys->childcachebufs, totchild, ctx->steps+1);
+ sim->psys->childcache = psys_alloc_path_cache_buffers(&sim->psys->childcachebufs, totchild, ctx->steps + 1);
sim->psys->totchildcache = totchild;
}
- totthread= pthreads[0].tot;
+ totthread = pthreads[0].tot;
if (totthread > 1) {
@@ -2818,20 +2818,20 @@ void psys_cache_child_paths(ParticleSimulationData *sim, float cfra, int editupd
if (totparent) {
BLI_init_threads(&threads, exec_child_path_cache, totthread);
- for (i=0; i<totthread; i++) {
+ for (i = 0; i < totthread; i++) {
pthreads[i].ctx->parent_pass = 1;
BLI_insert_thread(&threads, &pthreads[i]);
}
BLI_end_threads(&threads);
- for (i=0; i<totthread; i++)
+ for (i = 0; i < totthread; i++)
pthreads[i].ctx->parent_pass = 0;
}
BLI_init_threads(&threads, exec_child_path_cache, totthread);
- for (i=0; i<totthread; i++)
+ for (i = 0; i < totthread; i++)
BLI_insert_thread(&threads, &pthreads[i]);
BLI_end_threads(&threads);
@@ -2846,36 +2846,36 @@ static void cache_key_incremental_rotation(ParticleCacheKey *key0, ParticleCache
{
float cosangle, angle, tangent[3], normal[3], q[4];
- switch(i) {
- case 0:
- /* start from second key */
- break;
- case 1:
- /* calculate initial tangent for incremental rotations */
- sub_v3_v3v3(prev_tangent, key0->co, key1->co);
- normalize_v3(prev_tangent);
- unit_qt(key1->rot);
- break;
- default:
- sub_v3_v3v3(tangent, key0->co, key1->co);
- normalize_v3(tangent);
-
- cosangle= dot_v3v3(tangent, prev_tangent);
-
- /* note we do the comparison on cosangle instead of
- * angle, since floating point accuracy makes it give
- * different results across platforms */
- if (cosangle > 0.999999f) {
- copy_v4_v4(key1->rot, key2->rot);
- }
- else {
- angle= saacos(cosangle);
- cross_v3_v3v3(normal, prev_tangent, tangent);
- axis_angle_to_quat( q,normal, angle);
- mul_qt_qtqt(key1->rot, q, key2->rot);
- }
+ switch (i) {
+ case 0:
+ /* start from second key */
+ break;
+ case 1:
+ /* calculate initial tangent for incremental rotations */
+ sub_v3_v3v3(prev_tangent, key0->co, key1->co);
+ normalize_v3(prev_tangent);
+ unit_qt(key1->rot);
+ break;
+ default:
+ sub_v3_v3v3(tangent, key0->co, key1->co);
+ normalize_v3(tangent);
+
+ cosangle = dot_v3v3(tangent, prev_tangent);
+
+ /* note we do the comparison on cosangle instead of
+ * angle, since floating point accuracy makes it give
+ * different results across platforms */
+ if (cosangle > 0.999999f) {
+ copy_v4_v4(key1->rot, key2->rot);
+ }
+ else {
+ angle = saacos(cosangle);
+ cross_v3_v3v3(normal, prev_tangent, tangent);
+ axis_angle_to_quat(q, normal, angle);
+ mul_qt_qtqt(key1->rot, q, key2->rot);
+ }
- copy_v3_v3(prev_tangent, tangent);
+ copy_v3_v3(prev_tangent, tangent);
}
}
@@ -2892,7 +2892,7 @@ void psys_cache_paths(ParticleSimulationData *sim, float cfra)
ParticleSettings *part = psys->part;
ParticleCacheKey *ca, **cache;
- DerivedMesh *hair_dm = (psys->part->type==PART_HAIR && psys->flag & PSYS_HAIR_DYNAMICS) ? psys->hair_out_dm : NULL;
+ DerivedMesh *hair_dm = (psys->part->type == PART_HAIR && psys->flag & PSYS_HAIR_DYNAMICS) ? psys->hair_out_dm : NULL;
ParticleKey result;
@@ -2911,16 +2911,16 @@ void psys_cache_paths(ParticleSimulationData *sim, float cfra)
int steps = (int)pow(2.0, (double)(psys->renderdata ? part->ren_step : part->draw_step));
int totpart = psys->totpart;
float length, vec[3];
- float *vg_effector= NULL;
- float *vg_length= NULL, pa_length=1.0f;
+ float *vg_effector = NULL;
+ float *vg_length = NULL, pa_length = 1.0f;
int keyed, baked;
/* we don't have anything valid to create paths from so let's quit here */
- if ((psys->flag & PSYS_HAIR_DONE || psys->flag & PSYS_KEYED || psys->pointcache)==0)
+ if ((psys->flag & PSYS_HAIR_DONE || psys->flag & PSYS_KEYED || psys->pointcache) == 0)
return;
if (psys_in_edit_mode(sim->scene, psys))
- if (psys->renderdata==0 && (psys->edit==NULL || pset->flag & PE_DRAW_PART)==0)
+ if (psys->renderdata == 0 && (psys->edit == NULL || pset->flag & PE_DRAW_PART) == 0)
return;
keyed = psys->flag & PSYS_KEYED;
@@ -2928,15 +2928,15 @@ void psys_cache_paths(ParticleSimulationData *sim, float cfra)
/* clear out old and create new empty path cache */
psys_free_path_cache(psys, psys->edit);
- cache= psys->pathcache= psys_alloc_path_cache_buffers(&psys->pathcachebufs, totpart, steps+1);
+ cache = psys->pathcache = psys_alloc_path_cache_buffers(&psys->pathcachebufs, totpart, steps + 1);
psys->lattice = psys_get_lattice(sim);
- ma= give_current_material(sim->ob, psys->part->omat);
+ ma = give_current_material(sim->ob, psys->part->omat);
if (ma && (psys->part->draw_col == PART_DRAW_COL_MAT))
copy_v3_v3(col, &ma->r);
- if ((psys->flag & PSYS_GLOBAL_HAIR)==0) {
- if ((psys->part->flag & PART_CHILD_EFFECT)==0)
+ if ((psys->flag & PSYS_GLOBAL_HAIR) == 0) {
+ if ((psys->part->flag & PART_CHILD_EFFECT) == 0)
vg_effector = psys_cache_vgroup(psmd->dm, psys, PSYS_VG_EFFECTOR);
if (!psys->totchild)
@@ -2954,7 +2954,7 @@ void psys_cache_paths(ParticleSimulationData *sim, float cfra)
psys_get_texture(sim, pa, &ptex, PAMAP_LENGTH, 0.f);
pa_length = ptex.length * (1.0f - part->randlength * PSYS_FRAND(psys->seed + p));
if (vg_length)
- pa_length *= psys_particle_value_from_verts(psmd->dm,part->from,pa,vg_length);
+ pa_length *= psys_particle_value_from_verts(psmd->dm, part->from, pa, vg_length);
}
pind.keyed = keyed;
@@ -2963,7 +2963,7 @@ void psys_cache_paths(ParticleSimulationData *sim, float cfra)
pind.bspline = (psys->part->flag & PART_HAIR_BSPLINE);
pind.dm = hair_dm;
- memset(cache[p], 0, sizeof(*cache[p])*(steps+1));
+ memset(cache[p], 0, sizeof(*cache[p]) * (steps + 1));
cache[p]->steps = steps;
@@ -2994,7 +2994,7 @@ void psys_cache_paths(ParticleSimulationData *sim, float cfra)
dietime = birthtime + pa_length * (dietime - birthtime);
/*--interpolate actual path from data points--*/
- for (k=0, ca=cache[p]; k<=steps; k++, ca++) {
+ for (k = 0, ca = cache[p]; k <= steps; k++, ca++) {
time = (float)k / (float)steps;
t = birthtime + time * (dietime - birthtime);
result.time = -t;
@@ -3016,45 +3016,45 @@ void psys_cache_paths(ParticleSimulationData *sim, float cfra)
if (!(psys->flag & PSYS_GLOBAL_HAIR)) {
/* apply effectors */
if ((psys->part->flag & PART_CHILD_EFFECT) == 0) {
- float effector= 1.0f;
+ float effector = 1.0f;
if (vg_effector)
- effector*= psys_particle_value_from_verts(psmd->dm,psys->part->from,pa,vg_effector);
+ effector *= psys_particle_value_from_verts(psmd->dm, psys->part->from, pa, vg_effector);
- sub_v3_v3v3(vec,(cache[p]+1)->co,cache[p]->co);
+ sub_v3_v3v3(vec, (cache[p] + 1)->co, cache[p]->co);
length = len_v3(vec);
- for (k=1, ca=cache[p]+1; k<=steps; k++, ca++)
+ for (k = 1, ca = cache[p] + 1; k <= steps; k++, ca++)
do_path_effectors(sim, p, ca, k, steps, cache[p]->co, effector, dfra, cfra, &length, vec);
}
/* apply guide curves to path data */
- if (sim->psys->effectors && (psys->part->flag & PART_CHILD_EFFECT)==0) {
- for (k=0, ca=cache[p]; k<=steps; k++, ca++)
+ if (sim->psys->effectors && (psys->part->flag & PART_CHILD_EFFECT) == 0) {
+ for (k = 0, ca = cache[p]; k <= steps; k++, ca++)
/* ca is safe to cast, since only co and vel are used */
- do_guides(sim->psys->effectors, (ParticleKey*)ca, p, (float)k/(float)steps);
+ do_guides(sim->psys->effectors, (ParticleKey *)ca, p, (float)k / (float)steps);
}
/* lattices have to be calculated separately to avoid mixups between effector calculations */
if (psys->lattice) {
- for (k=0, ca=cache[p]; k<=steps; k++, ca++)
+ for (k = 0, ca = cache[p]; k <= steps; k++, ca++)
calc_latt_deform(psys->lattice, ca->co, 1.0f);
}
}
/* finally do rotation & velocity */
- for (k=1, ca=cache[p]+1; k<=steps; k++, ca++) {
+ for (k = 1, ca = cache[p] + 1; k <= steps; k++, ca++) {
cache_key_incremental_rotation(ca, ca - 1, ca - 2, prev_tangent, k);
if (k == steps)
copy_qt_qt(ca->rot, (ca - 1)->rot);
/* set velocity */
- sub_v3_v3v3(ca->vel, ca->co, (ca-1)->co);
+ sub_v3_v3v3(ca->vel, ca->co, (ca - 1)->co);
- if (k==1)
- copy_v3_v3((ca-1)->vel, ca->vel);
+ if (k == 1)
+ copy_v3_v3((ca - 1)->vel, ca->vel);
- ca->time = (float)k/(float)steps;
+ ca->time = (float)k / (float)steps;
}
/* First rotation is based on emitting face orientation.
* This is way better than having flipping rotations resulting
@@ -3070,7 +3070,7 @@ void psys_cache_paths(ParticleSimulationData *sim, float cfra)
if (psys->lattice) {
end_latt_deform(psys->lattice);
- psys->lattice= NULL;
+ psys->lattice = NULL;
}
if (vg_effector)
@@ -3081,7 +3081,7 @@ void psys_cache_paths(ParticleSimulationData *sim, float cfra)
}
void psys_cache_edit_paths(Scene *scene, Object *ob, PTCacheEdit *edit, float cfra)
{
- ParticleCacheKey *ca, **cache= edit->pathcache;
+ ParticleCacheKey *ca, **cache = edit->pathcache;
ParticleEditSettings *pset = &scene->toolsettings->particle;
PTCacheEditPoint *point = NULL;
@@ -3099,7 +3099,7 @@ void psys_cache_edit_paths(Scene *scene, Object *ob, PTCacheEdit *edit, float cf
float hairmat[4][4], rotmat[3][3], prev_tangent[3] = {0.0f, 0.0f, 0.0f};
int k, i;
int steps = (int)pow(2.0, (double)pset->draw_step);
- int totpart = edit->totpoint, recalc_set=0;
+ int totpart = edit->totpoint, recalc_set = 0;
float sel_col[3];
float nosel_col[3];
@@ -3108,10 +3108,10 @@ void psys_cache_edit_paths(Scene *scene, Object *ob, PTCacheEdit *edit, float cf
if (!cache || edit->totpoint != edit->totcached) {
/* clear out old and create new empty path cache */
psys_free_path_cache(edit->psys, edit);
- cache= edit->pathcache= psys_alloc_path_cache_buffers(&edit->pathcachebufs, totpart, steps+1);
+ cache = edit->pathcache = psys_alloc_path_cache_buffers(&edit->pathcachebufs, totpart, steps + 1);
/* set flag for update (child particles check this too) */
- for (i=0, point=edit->points; i<totpart; i++, point++)
+ for (i = 0, point = edit->points; i < totpart; i++, point++)
point->flag |= PEP_EDIT_RECALC;
recalc_set = 1;
}
@@ -3119,7 +3119,7 @@ void psys_cache_edit_paths(Scene *scene, Object *ob, PTCacheEdit *edit, float cf
/* frs_sec = (psys || edit->pid.flag & PTCACHE_VEL_PER_SEC) ? 25.0f : 1.0f; */ /* UNUSED */
if (pset->brushtype == PE_BRUSH_WEIGHT) {
- ;/* use weight painting colors now... */
+ ; /* use weight painting colors now... */
}
else {
sel_col[0] = (float)edit->sel_col[0] / 255.0f;
@@ -3131,7 +3131,7 @@ void psys_cache_edit_paths(Scene *scene, Object *ob, PTCacheEdit *edit, float cf
}
/*---first main loop: create all actual particles' paths---*/
- for (i=0, point=edit->points; i<totpart; i++, pa+=pa?1:0, point++) {
+ for (i = 0, point = edit->points; i < totpart; i++, pa += pa ? 1 : 0, point++) {
if (edit->totcached && !(point->flag & PEP_EDIT_RECALC))
continue;
@@ -3148,14 +3148,14 @@ void psys_cache_edit_paths(Scene *scene, Object *ob, PTCacheEdit *edit, float cf
/* should init_particle_interpolation set this ? */
- if (pset->brushtype==PE_BRUSH_WEIGHT) {
+ if (pset->brushtype == PE_BRUSH_WEIGHT) {
pind.hkey[0] = NULL;
/* pa != NULL since the weight brush is only available for hair */
pind.hkey[1] = pa->hair;
}
- memset(cache[i], 0, sizeof(*cache[i])*(steps+1));
+ memset(cache[i], 0, sizeof(*cache[i]) * (steps + 1));
cache[i]->steps = steps;
@@ -3178,14 +3178,14 @@ void psys_cache_edit_paths(Scene *scene, Object *ob, PTCacheEdit *edit, float cf
}
/*--interpolate actual path from data points--*/
- for (k=0, ca=cache[i]; k<=steps; k++, ca++) {
+ for (k = 0, ca = cache[i]; k <= steps; k++, ca++) {
time = (float)k / (float)steps;
t = birthtime + time * (dietime - birthtime);
result.time = -t;
do_particle_interpolation(psys, i, pa, t, &pind, &result);
copy_v3_v3(ca->co, result.co);
- /* non-hair points are already in global space */
+ /* non-hair points are already in global space */
if (psys && !(psys->flag & PSYS_GLOBAL_HAIR)) {
mul_m4_v3(hairmat, ca->co);
@@ -3198,7 +3198,7 @@ void psys_cache_edit_paths(Scene *scene, Object *ob, PTCacheEdit *edit, float cf
/* set velocity */
sub_v3_v3v3(ca->vel, ca->co, (ca - 1)->co);
- if (k==1)
+ if (k == 1)
copy_v3_v3((ca - 1)->vel, ca->vel);
}
}
@@ -3208,15 +3208,15 @@ void psys_cache_edit_paths(Scene *scene, Object *ob, PTCacheEdit *edit, float cf
}
/* selection coloring in edit mode */
- if (pset->brushtype==PE_BRUSH_WEIGHT) {
+ if (pset->brushtype == PE_BRUSH_WEIGHT) {
float t2;
- if (k==0) {
+ if (k == 0) {
weight_to_rgb(ca->col, pind.hkey[1]->weight);
}
else {
float w1[3], w2[3];
- keytime = (t - (*pind.ekey[0]->time))/((*pind.ekey[1]->time) - (*pind.ekey[0]->time));
+ keytime = (t - (*pind.ekey[0]->time)) / ((*pind.ekey[1]->time) - (*pind.ekey[0]->time));
weight_to_rgb(w1, pind.hkey[0]->weight);
weight_to_rgb(w2, pind.hkey[1]->weight);
@@ -3226,7 +3226,7 @@ void psys_cache_edit_paths(Scene *scene, Object *ob, PTCacheEdit *edit, float cf
/* at the moment this is only used for weight painting.
* will need to move out of this check if its used elsewhere. */
- t2 = birthtime + ((float)k/(float)steps) * (dietime - birthtime);
+ t2 = birthtime + ((float)k / (float)steps) * (dietime - birthtime);
while (pind.hkey[1]->time < t2) pind.hkey[1]++;
pind.hkey[0] = pind.hkey[1] - 1;
@@ -3237,13 +3237,13 @@ void psys_cache_edit_paths(Scene *scene, Object *ob, PTCacheEdit *edit, float cf
copy_v3_v3(ca->col, sel_col);
}
else {
- keytime = (t - (*pind.ekey[0]->time))/((*pind.ekey[1]->time) - (*pind.ekey[0]->time));
+ keytime = (t - (*pind.ekey[0]->time)) / ((*pind.ekey[1]->time) - (*pind.ekey[0]->time));
interp_v3_v3v3(ca->col, sel_col, nosel_col, keytime);
}
}
else {
if ((ekey + (pind.ekey[1] - point->keys))->flag & PEK_SELECT) {
- keytime = (t - (*pind.ekey[0]->time))/((*pind.ekey[1]->time) - (*pind.ekey[0]->time));
+ keytime = (t - (*pind.ekey[0]->time)) / ((*pind.ekey[1]->time) - (*pind.ekey[0]->time));
interp_v3_v3v3(ca->col, nosel_col, sel_col, keytime);
}
else {
@@ -3269,18 +3269,18 @@ void psys_cache_edit_paths(Scene *scene, Object *ob, PTCacheEdit *edit, float cf
edit->totcached = totpart;
if (psys) {
- ParticleSimulationData sim= {0};
- sim.scene= scene;
- sim.ob= ob;
- sim.psys= psys;
- sim.psmd= psys_get_modifier(ob, psys);
+ ParticleSimulationData sim = {0};
+ sim.scene = scene;
+ sim.ob = ob;
+ sim.psys = psys;
+ sim.psmd = psys_get_modifier(ob, psys);
psys_cache_child_paths(&sim, cfra, 1);
}
/* clear recalc flag if set here */
if (recalc_set) {
- for (i=0, point=edit->points; i<totpart; i++, point++)
+ for (i = 0, point = edit->points; i < totpart; i++, point++)
point->flag &= ~PEP_EDIT_RECALC;
}
}
@@ -3290,20 +3290,20 @@ void psys_cache_edit_paths(Scene *scene, Object *ob, PTCacheEdit *edit, float cf
void copy_particle_key(ParticleKey *to, ParticleKey *from, int time)
{
if (time) {
- memcpy(to,from,sizeof(ParticleKey));
+ memcpy(to, from, sizeof(ParticleKey));
}
else {
- float to_time=to->time;
- memcpy(to,from,sizeof(ParticleKey));
- to->time=to_time;
+ float to_time = to->time;
+ memcpy(to, from, sizeof(ParticleKey));
+ to->time = to_time;
}
}
void psys_get_from_key(ParticleKey *key, float *loc, float *vel, float *rot, float *time)
{
- if (loc) copy_v3_v3(loc,key->co);
- if (vel) copy_v3_v3(vel,key->vel);
- if (rot) copy_qt_qt(rot,key->rot);
- if (time) *time=key->time;
+ if (loc) copy_v3_v3(loc, key->co);
+ if (vel) copy_v3_v3(vel, key->vel);
+ if (rot) copy_qt_qt(rot, key->rot);
+ if (time) *time = key->time;
}
/*-------changing particle keys from space to another-------*/
#if 0
@@ -3313,12 +3313,12 @@ static void key_from_object(Object *ob, ParticleKey *key)
add_v3_v3(key->vel, key->co);
- mul_m4_v3(ob->obmat,key->co);
- mul_m4_v3(ob->obmat,key->vel);
- mat4_to_quat(q,ob->obmat);
+ mul_m4_v3(ob->obmat, key->co);
+ mul_m4_v3(ob->obmat, key->vel);
+ mat4_to_quat(q, ob->obmat);
- sub_v3_v3v3(key->vel,key->vel,key->co);
- mul_qt_qtqt(key->rot,q,key->rot);
+ sub_v3_v3v3(key->vel, key->vel, key->co);
+ mul_qt_qtqt(key->rot, q, key->rot);
}
#endif
@@ -3326,33 +3326,33 @@ static void triatomat(float *v1, float *v2, float *v3, float (*uv)[2], float mat
{
float det, w1, w2, d1[2], d2[2];
- memset(mat, 0, sizeof(float)*4*4);
- mat[3][3]= 1.0f;
+ memset(mat, 0, sizeof(float) * 4 * 4);
+ mat[3][3] = 1.0f;
/* first axis is the normal */
- normal_tri_v3( mat[2],v1, v2, v3);
+ normal_tri_v3(mat[2], v1, v2, v3);
/* second axis along (1, 0) in uv space */
if (uv) {
- d1[0]= uv[1][0] - uv[0][0];
- d1[1]= uv[1][1] - uv[0][1];
- d2[0]= uv[2][0] - uv[0][0];
- d2[1]= uv[2][1] - uv[0][1];
+ d1[0] = uv[1][0] - uv[0][0];
+ d1[1] = uv[1][1] - uv[0][1];
+ d2[0] = uv[2][0] - uv[0][0];
+ d2[1] = uv[2][1] - uv[0][1];
- det = d2[0]*d1[1] - d2[1]*d1[0];
+ det = d2[0] * d1[1] - d2[1] * d1[0];
if (det != 0.0f) {
- det= 1.0f/det;
- w1= -d2[1]*det;
- w2= d1[1]*det;
+ det = 1.0f / det;
+ w1 = -d2[1] * det;
+ w2 = d1[1] * det;
- mat[1][0]= w1*(v2[0] - v1[0]) + w2*(v3[0] - v1[0]);
- mat[1][1]= w1*(v2[1] - v1[1]) + w2*(v3[1] - v1[1]);
- mat[1][2]= w1*(v2[2] - v1[2]) + w2*(v3[2] - v1[2]);
+ mat[1][0] = w1 * (v2[0] - v1[0]) + w2 * (v3[0] - v1[0]);
+ mat[1][1] = w1 * (v2[1] - v1[1]) + w2 * (v3[1] - v1[1]);
+ mat[1][2] = w1 * (v2[2] - v1[2]) + w2 * (v3[2] - v1[2]);
normalize_v3(mat[1]);
}
else
- mat[1][0]= mat[1][1]= mat[1][2]= 0.0f;
+ mat[1][0] = mat[1][1] = mat[1][2] = 0.0f;
}
else {
sub_v3_v3v3(mat[1], v2, v1);
@@ -3370,14 +3370,14 @@ static void psys_face_mat(Object *ob, DerivedMesh *dm, ParticleData *pa, float m
OrigSpaceFace *osface;
float (*orcodata)[3];
- int i = pa->num_dmcache==DMCACHE_NOTFOUND ? pa->num : pa->num_dmcache;
+ int i = pa->num_dmcache == DMCACHE_NOTFOUND ? pa->num : pa->num_dmcache;
- if (i==-1 || i >= dm->getNumTessFaces(dm)) { unit_m4(mat); return; }
+ if (i == -1 || i >= dm->getNumTessFaces(dm)) { unit_m4(mat); return; }
- mface=dm->getTessFaceData(dm,i,CD_MFACE);
- osface=dm->getTessFaceData(dm,i,CD_ORIGSPACE);
+ mface = dm->getTessFaceData(dm, i, CD_MFACE);
+ osface = dm->getTessFaceData(dm, i, CD_ORIGSPACE);
- if (orco && (orcodata=dm->getVertDataArray(dm, CD_ORCO))) {
+ if (orco && (orcodata = dm->getVertDataArray(dm, CD_ORCO))) {
copy_v3_v3(v[0], orcodata[mface->v1]);
copy_v3_v3(v[1], orcodata[mface->v2]);
copy_v3_v3(v[2], orcodata[mface->v3]);
@@ -3385,15 +3385,15 @@ static void psys_face_mat(Object *ob, DerivedMesh *dm, ParticleData *pa, float m
/* ugly hack to use non-transformed orcos, since only those
* give symmetric results for mirroring in particle mode */
if (DM_get_vert_data_layer(dm, CD_ORIGINDEX))
- transform_mesh_orco_verts(ob->data, v, 3, 1);
+ BKE_mesh_orco_verts_transform(ob->data, v, 3, 1);
}
else {
- dm->getVertCo(dm,mface->v1,v[0]);
- dm->getVertCo(dm,mface->v2,v[1]);
- dm->getVertCo(dm,mface->v3,v[2]);
+ dm->getVertCo(dm, mface->v1, v[0]);
+ dm->getVertCo(dm, mface->v2, v[1]);
+ dm->getVertCo(dm, mface->v3, v[2]);
}
- triatomat(v[0], v[1], v[2], (osface)? osface->uv: NULL, mat);
+ triatomat(v[0], v[1], v[2], (osface) ? osface->uv : NULL, mat);
}
void psys_mat_hair_to_object(Object *UNUSED(ob), DerivedMesh *dm, short from, ParticleData *pa, float hairmat[][4])
@@ -3402,7 +3402,7 @@ void psys_mat_hair_to_object(Object *UNUSED(ob), DerivedMesh *dm, short from, Pa
psys_face_mat(0, dm, pa, hairmat, 0);
psys_particle_on_dm(dm, from, pa->num, pa->num_dmcache, pa->fuv, pa->foffset, vec, 0, 0, 0, 0, 0);
- copy_v3_v3(hairmat[3],vec);
+ copy_v3_v3(hairmat[3], vec);
}
void psys_mat_hair_to_orco(Object *ob, DerivedMesh *dm, short from, ParticleData *pa, float hairmat[][4])
@@ -3414,8 +3414,8 @@ void psys_mat_hair_to_orco(Object *ob, DerivedMesh *dm, short from, ParticleData
/* see psys_face_mat for why this function is called */
if (DM_get_vert_data_layer(dm, CD_ORIGINDEX))
- transform_mesh_orco_verts(ob->data, &orco, 1, 1);
- copy_v3_v3(hairmat[3],orco);
+ BKE_mesh_orco_verts_transform(ob->data, &orco, 1, 1);
+ copy_v3_v3(hairmat[3], orco);
}
void psys_vec_rot_to_face(DerivedMesh *dm, ParticleData *pa, float vec[3])
@@ -3449,7 +3449,7 @@ ModifierData *object_add_particle_system(Scene *scene, Object *ob, const char *n
return NULL;
psys = ob->particlesystem.first;
- for (; psys; psys=psys->next)
+ for (; psys; psys = psys->next)
psys->flag &= ~PSYS_CURRENT;
psys = MEM_callocN(sizeof(ParticleSystem), "particle_system");
@@ -3458,24 +3458,24 @@ ModifierData *object_add_particle_system(Scene *scene, Object *ob, const char *n
psys->part = psys_new_settings("ParticleSettings", NULL);
- if (BLI_countlist(&ob->particlesystem)>1)
+ if (BLI_countlist(&ob->particlesystem) > 1)
BLI_snprintf(psys->name, sizeof(psys->name), "ParticleSystem %i", BLI_countlist(&ob->particlesystem));
else
strcpy(psys->name, "ParticleSystem");
- md= modifier_new(eModifierType_ParticleSystem);
+ md = modifier_new(eModifierType_ParticleSystem);
- if (name) BLI_strncpy(md->name, name, sizeof(md->name));
- else BLI_snprintf(md->name, sizeof(md->name), "ParticleSystem %i", BLI_countlist(&ob->particlesystem));
+ if (name) BLI_strncpy(md->name, name, sizeof(md->name));
+ else BLI_snprintf(md->name, sizeof(md->name), "ParticleSystem %i", BLI_countlist(&ob->particlesystem));
modifier_unique_name(&ob->modifiers, md);
- psmd= (ParticleSystemModifierData*) md;
- psmd->psys=psys;
+ psmd = (ParticleSystemModifierData *) md;
+ psmd->psys = psys;
BLI_addtail(&ob->modifiers, md);
- psys->totpart=0;
- psys->flag = PSYS_ENABLED|PSYS_CURRENT;
- psys->cfra = BKE_frame_to_ctime(scene, CFRA + 1);
+ psys->totpart = 0;
+ psys->flag = PSYS_ENABLED | PSYS_CURRENT;
+ psys->cfra = BKE_scene_frame_get_from_ctime(scene, CFRA + 1);
DAG_scene_sort(G.main, scene);
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
@@ -3507,13 +3507,13 @@ void object_remove_particle_system(Scene *scene, Object *ob)
}
/* clear modifier */
- psmd= psys_get_modifier(ob, psys);
+ psmd = psys_get_modifier(ob, psys);
BLI_remlink(&ob->modifiers, psmd);
modifier_free((ModifierData *)psmd);
/* clear particle system */
BLI_remlink(&ob->particlesystem, psys);
- psys_free(ob,psys);
+ psys_free(ob, psys);
if (ob->particlesystem.first)
((ParticleSystem *) ob->particlesystem.first)->flag |= PSYS_CURRENT;
@@ -3525,64 +3525,64 @@ void object_remove_particle_system(Scene *scene, Object *ob)
}
static void default_particle_settings(ParticleSettings *part)
{
- part->type= PART_EMITTER;
- part->distr= PART_DISTR_JIT;
+ part->type = PART_EMITTER;
+ part->distr = PART_DISTR_JIT;
part->draw_as = PART_DRAW_REND;
part->ren_as = PART_DRAW_HALO;
- part->bb_uv_split=1;
- part->bb_align=PART_BB_VIEW;
- part->bb_split_offset=PART_BB_OFF_LINEAR;
- part->flag=PART_EDISTR|PART_TRAND|PART_HIDE_ADVANCED_HAIR;
-
- part->sta= 1.0;
- part->end= 200.0;
- part->lifetime= 50.0;
- part->jitfac= 1.0;
- part->totpart= 1000;
- part->grid_res= 10;
- part->timetweak= 1.0;
+ part->bb_uv_split = 1;
+ part->bb_align = PART_BB_VIEW;
+ part->bb_split_offset = PART_BB_OFF_LINEAR;
+ part->flag = PART_EDISTR | PART_TRAND | PART_HIDE_ADVANCED_HAIR;
+
+ part->sta = 1.0;
+ part->end = 200.0;
+ part->lifetime = 50.0;
+ part->jitfac = 1.0;
+ part->totpart = 1000;
+ part->grid_res = 10;
+ part->timetweak = 1.0;
part->courant_target = 0.2;
- part->integrator= PART_INT_MIDPOINT;
- part->phystype= PART_PHYS_NEWTON;
- part->hair_step= 5;
- part->keys_step= 5;
- part->draw_step= 2;
- part->ren_step= 3;
- part->adapt_angle= 5;
- part->adapt_pix= 3;
- part->kink_axis= 2;
- part->kink_amp_clump= 1.f;
- part->reactevent= PART_EVENT_DEATH;
- part->disp=100;
- part->from= PART_FROM_FACE;
-
- part->normfac= 1.0f;
-
- part->mass=1.0;
- part->size=0.05;
- part->childsize=1.0;
+ part->integrator = PART_INT_MIDPOINT;
+ part->phystype = PART_PHYS_NEWTON;
+ part->hair_step = 5;
+ part->keys_step = 5;
+ part->draw_step = 2;
+ part->ren_step = 3;
+ part->adapt_angle = 5;
+ part->adapt_pix = 3;
+ part->kink_axis = 2;
+ part->kink_amp_clump = 1.f;
+ part->reactevent = PART_EVENT_DEATH;
+ part->disp = 100;
+ part->from = PART_FROM_FACE;
+
+ part->normfac = 1.0f;
+
+ part->mass = 1.0;
+ part->size = 0.05;
+ part->childsize = 1.0;
part->rotmode = PART_ROT_VEL;
part->avemode = PART_AVE_VELOCITY;
- part->child_nbr=10;
- part->ren_child_nbr=100;
- part->childrad=0.2f;
- part->childflat=0.0f;
- part->clumppow=0.0f;
- part->kink_amp=0.2f;
- part->kink_freq=2.0;
+ part->child_nbr = 10;
+ part->ren_child_nbr = 100;
+ part->childrad = 0.2f;
+ part->childflat = 0.0f;
+ part->clumppow = 0.0f;
+ part->kink_amp = 0.2f;
+ part->kink_freq = 2.0;
- part->rough1_size=1.0;
- part->rough2_size=1.0;
- part->rough_end_shape=1.0;
+ part->rough1_size = 1.0;
+ part->rough2_size = 1.0;
+ part->rough_end_shape = 1.0;
- part->clength=1.0f;
- part->clength_thres=0.0f;
+ part->clength = 1.0f;
+ part->clength_thres = 0.0f;
- part->draw= PART_DRAW_EMITTER;
- part->draw_line[0]=0.5;
+ part->draw = PART_DRAW_EMITTER;
+ part->draw_line[0] = 0.5;
part->path_start = 0.0f;
part->path_end = 1.0f;
@@ -3593,10 +3593,10 @@ static void default_particle_settings(ParticleSettings *part)
part->color_vec_max = 1.f;
part->draw_col = PART_DRAW_COL_MAT;
- part->simplify_refsize= 1920;
- part->simplify_rate= 1.0f;
- part->simplify_transition= 0.1f;
- part->simplify_viewport= 0.8;
+ part->simplify_refsize = 1920;
+ part->simplify_rate = 1.0f;
+ part->simplify_transition = 0.1f;
+ part->simplify_viewport = 0.8;
if (!part->effector_weights)
part->effector_weights = BKE_add_effector_weights(NULL);
@@ -3607,32 +3607,32 @@ ParticleSettings *psys_new_settings(const char *name, Main *main)
{
ParticleSettings *part;
- if (main==NULL)
+ if (main == NULL)
main = G.main;
- part= alloc_libblock(&main->particle, ID_PA, name);
+ part = BKE_libblock_alloc(&main->particle, ID_PA, name);
default_particle_settings(part);
return part;
}
-ParticleSettings *psys_copy_settings(ParticleSettings *part)
+ParticleSettings *BKE_particlesettings_copy(ParticleSettings *part)
{
ParticleSettings *partn;
int a;
- partn= copy_libblock(&part->id);
- partn->pd= MEM_dupallocN(part->pd);
- partn->pd2= MEM_dupallocN(part->pd2);
- partn->effector_weights= MEM_dupallocN(part->effector_weights);
- partn->fluid= MEM_dupallocN(part->fluid);
+ partn = BKE_libblock_copy(&part->id);
+ partn->pd = MEM_dupallocN(part->pd);
+ partn->pd2 = MEM_dupallocN(part->pd2);
+ partn->effector_weights = MEM_dupallocN(part->effector_weights);
+ partn->fluid = MEM_dupallocN(part->fluid);
partn->boids = boid_copy_settings(part->boids);
- for (a=0; a<MAX_MTEX; a++) {
+ for (a = 0; a < MAX_MTEX; a++) {
if (part->mtex[a]) {
- partn->mtex[a]= MEM_mallocN(sizeof(MTex), "psys_copy_tex");
+ partn->mtex[a] = MEM_mallocN(sizeof(MTex), "psys_copy_tex");
memcpy(partn->mtex[a], part->mtex[a], sizeof(MTex));
id_us_plus((ID *)partn->mtex[a]->tex);
}
@@ -3648,57 +3648,57 @@ static void expand_local_particlesettings(ParticleSettings *part)
int i;
id_lib_extern((ID *)part->dup_group);
- for (i=0; i<MAX_MTEX; i++) {
+ for (i = 0; i < MAX_MTEX; i++) {
if (part->mtex[i]) id_lib_extern((ID *)part->mtex[i]->tex);
}
}
-void make_local_particlesettings(ParticleSettings *part)
+void BKE_particlesettings_make_local(ParticleSettings *part)
{
- Main *bmain= G.main;
+ Main *bmain = G.main;
Object *ob;
- int is_local= FALSE, is_lib= FALSE;
+ int is_local = FALSE, is_lib = FALSE;
/* - only lib users: do nothing
* - only local users: set flag
* - mixed: make copy
*/
- if (part->id.lib==0) return;
- if (part->id.us==1) {
+ if (part->id.lib == 0) return;
+ if (part->id.us == 1) {
id_clear_lib_data(bmain, &part->id);
expand_local_particlesettings(part);
return;
}
/* test objects */
- for (ob= bmain->object.first; ob && ELEM(FALSE, is_lib, is_local); ob= ob->id.next) {
- ParticleSystem *psys=ob->particlesystem.first;
- for (; psys; psys=psys->next) {
- if (psys->part==part) {
- if (ob->id.lib) is_lib= TRUE;
- else is_local= TRUE;
+ for (ob = bmain->object.first; ob && ELEM(FALSE, is_lib, is_local); ob = ob->id.next) {
+ ParticleSystem *psys = ob->particlesystem.first;
+ for (; psys; psys = psys->next) {
+ if (psys->part == part) {
+ if (ob->id.lib) is_lib = TRUE;
+ else is_local = TRUE;
}
}
}
- if (is_local && is_lib==FALSE) {
+ if (is_local && is_lib == FALSE) {
id_clear_lib_data(bmain, &part->id);
expand_local_particlesettings(part);
}
else if (is_local && is_lib) {
- ParticleSettings *part_new= psys_copy_settings(part);
- part_new->id.us= 0;
+ ParticleSettings *part_new = BKE_particlesettings_copy(part);
+ part_new->id.us = 0;
/* Remap paths of new ID using old library as base. */
BKE_id_lib_local_paths(bmain, part->id.lib, &part_new->id);
/* do objects */
- for (ob= bmain->object.first; ob; ob= ob->id.next) {
+ for (ob = bmain->object.first; ob; ob = ob->id.next) {
ParticleSystem *psys;
- for (psys= ob->particlesystem.first; psys; psys=psys->next) {
- if (psys->part==part && ob->id.lib==0) {
- psys->part= part_new;
+ for (psys = ob->particlesystem.first; psys; psys = psys->next) {
+ if (psys->part == part && ob->id.lib == 0) {
+ psys->part = part_new;
part_new->id.us++;
part->id.us--;
}
@@ -3717,42 +3717,42 @@ static int get_particle_uv(DerivedMesh *dm, ParticleData *pa, int face_index, co
MTFace *tf;
int i;
- tf= CustomData_get_layer_named(&dm->faceData, CD_MTFACE, name);
+ tf = CustomData_get_layer_named(&dm->faceData, CD_MTFACE, name);
if (tf == NULL)
- tf= CustomData_get_layer(&dm->faceData, CD_MTFACE);
+ tf = CustomData_get_layer(&dm->faceData, CD_MTFACE);
if (tf == NULL)
return 0;
if (pa) {
- i= (pa->num_dmcache==DMCACHE_NOTFOUND)? pa->num: pa->num_dmcache;
+ i = (pa->num_dmcache == DMCACHE_NOTFOUND) ? pa->num : pa->num_dmcache;
if (i >= dm->getNumTessFaces(dm))
i = -1;
}
else
- i= face_index;
+ i = face_index;
- if (i==-1) {
- texco[0]= 0.0f;
- texco[1]= 0.0f;
- texco[2]= 0.0f;
+ if (i == -1) {
+ texco[0] = 0.0f;
+ texco[1] = 0.0f;
+ texco[2] = 0.0f;
}
else {
- mf= dm->getTessFaceData(dm, i, CD_MFACE);
+ mf = dm->getTessFaceData(dm, i, CD_MFACE);
psys_interpolate_uvs(&tf[i], mf->v4, fuv, texco);
- texco[0]= texco[0]*2.0f - 1.0f;
- texco[1]= texco[1]*2.0f - 1.0f;
- texco[2]= 0.0f;
+ texco[0] = texco[0] * 2.0f - 1.0f;
+ texco[1] = texco[1] * 2.0f - 1.0f;
+ texco[2] = 0.0f;
}
return 1;
}
-#define SET_PARTICLE_TEXTURE(type, pvalue, texfac) if ((event & mtex->mapto) & type) {pvalue = texture_value_blend(def, pvalue, value, texfac, blend);}
-#define CLAMP_PARTICLE_TEXTURE_POS(type, pvalue) if (event & type) { if (pvalue < 0.f) pvalue = 1.f+pvalue; CLAMP(pvalue, 0.0f, 1.0f); }
+#define SET_PARTICLE_TEXTURE(type, pvalue, texfac) if ((event & mtex->mapto) & type) {pvalue = texture_value_blend(def, pvalue, value, texfac, blend); }
+#define CLAMP_PARTICLE_TEXTURE_POS(type, pvalue) if (event & type) { if (pvalue < 0.f) pvalue = 1.f + pvalue; CLAMP(pvalue, 0.0f, 1.0f); }
#define CLAMP_PARTICLE_TEXTURE_POSNEG(type, pvalue) if (event & type) { CLAMP(pvalue, -1.0f, 1.0f); }
static void get_cpa_texture(DerivedMesh *dm, ParticleSystem *psys, ParticleSettings *part, ParticleData *par, int child_index, int face_index, const float fw[4], float *orco, ParticleTexture *ptex, int event, float cfra)
@@ -3762,50 +3762,50 @@ static void get_cpa_texture(DerivedMesh *dm, ParticleSystem *psys, ParticleSetti
float value, rgba[4], texvec[3];
ptex->ivel = ptex->life = ptex->exist = ptex->size = ptex->damp =
- ptex->gravity = ptex->field = ptex->time = ptex->clump = ptex->kink =
- ptex->effector = ptex->rough1 = ptex->rough2 = ptex->roughe = 1.f;
+ ptex->gravity = ptex->field = ptex->time = ptex->clump = ptex->kink =
+ ptex->effector = ptex->rough1 = ptex->rough2 = ptex->roughe = 1.f;
- ptex->length= 1.0f - part->randlength * PSYS_FRAND(child_index + 26);
- ptex->length*= part->clength_thres < PSYS_FRAND(child_index + 27) ? part->clength : 1.0f;
+ ptex->length = 1.0f - part->randlength *PSYS_FRAND(child_index + 26);
+ ptex->length *= part->clength_thres < PSYS_FRAND(child_index + 27) ? part->clength : 1.0f;
- for (m=0; m<MAX_MTEX; m++, mtexp++) {
+ for (m = 0; m < MAX_MTEX; m++, mtexp++) {
mtex = *mtexp;
if (mtex && mtex->mapto) {
- float def=mtex->def_var;
- short blend=mtex->blendtype;
+ float def = mtex->def_var;
+ short blend = mtex->blendtype;
short texco = mtex->texco;
if (ELEM(texco, TEXCO_UV, TEXCO_ORCO) && (ELEM(part->from, PART_FROM_FACE, PART_FROM_VOLUME) == 0 || part->distr == PART_DISTR_GRID))
texco = TEXCO_GLOB;
- switch(texco) {
- case TEXCO_GLOB:
- copy_v3_v3(texvec, par->state.co);
- break;
- case TEXCO_OBJECT:
- copy_v3_v3(texvec, par->state.co);
- if (mtex->object)
- mul_m4_v3(mtex->object->imat, texvec);
- break;
- case TEXCO_UV:
- if (fw && get_particle_uv(dm, NULL, face_index, fw, mtex->uvname, texvec))
+ switch (texco) {
+ case TEXCO_GLOB:
+ copy_v3_v3(texvec, par->state.co);
break;
+ case TEXCO_OBJECT:
+ copy_v3_v3(texvec, par->state.co);
+ if (mtex->object)
+ mul_m4_v3(mtex->object->imat, texvec);
+ break;
+ case TEXCO_UV:
+ if (fw && get_particle_uv(dm, NULL, face_index, fw, mtex->uvname, texvec))
+ break;
/* no break, failed to get uv's, so let's try orco's */
- case TEXCO_ORCO:
- copy_v3_v3(texvec, orco);
- break;
- case TEXCO_PARTICLE:
- /* texture coordinates in range [-1,1] */
- texvec[0] = 2.f * (cfra - par->time)/(par->dietime-par->time) - 1.f;
- texvec[1] = 0.f;
- texvec[2] = 0.f;
- break;
+ case TEXCO_ORCO:
+ copy_v3_v3(texvec, orco);
+ break;
+ case TEXCO_PARTICLE:
+ /* texture coordinates in range [-1, 1] */
+ texvec[0] = 2.f * (cfra - par->time) / (par->dietime - par->time) - 1.f;
+ texvec[1] = 0.f;
+ texvec[2] = 0.f;
+ break;
}
- externtex(mtex, texvec, &value, rgba, rgba+1, rgba+2, rgba+3, 0);
+ externtex(mtex, texvec, &value, rgba, rgba + 1, rgba + 2, rgba + 3, 0);
if ((event & mtex->mapto) & PAMAP_ROUGH)
- ptex->rough1= ptex->rough2= ptex->roughe= texture_value_blend(def,ptex->rough1,value,mtex->roughfac,blend);
+ ptex->rough1 = ptex->rough2 = ptex->roughe = texture_value_blend(def, ptex->rough1, value, mtex->roughfac, blend);
SET_PARTICLE_TEXTURE(PAMAP_LENGTH, ptex->length, mtex->lengthfac);
SET_PARTICLE_TEXTURE(PAMAP_CLUMP, ptex->clump, mtex->clumpfac);
@@ -3827,62 +3827,62 @@ void psys_get_texture(ParticleSimulationData *sim, ParticleData *pa, ParticleTex
MTex *mtex;
int m;
float value, rgba[4], co[3], texvec[3];
- int setvars=0;
+ int setvars = 0;
/* initialize ptex */
ptex->ivel = ptex->life = ptex->exist = ptex->size = ptex->damp =
- ptex->gravity = ptex->field = ptex->length = ptex->clump = ptex->kink =
- ptex->effector = ptex->rough1 = ptex->rough2 = ptex->roughe = 1.f;
+ ptex->gravity = ptex->field = ptex->length = ptex->clump = ptex->kink =
+ ptex->effector = ptex->rough1 = ptex->rough2 = ptex->roughe = 1.0f;
- ptex->time = (float)(pa - sim->psys->particles)/(float)sim->psys->totpart;
+ ptex->time = (float)(pa - sim->psys->particles) / (float)sim->psys->totpart;
- for (m=0; m<MAX_MTEX; m++, mtexp++) {
+ for (m = 0; m < MAX_MTEX; m++, mtexp++) {
mtex = *mtexp;
if (mtex && mtex->mapto) {
- float def=mtex->def_var;
- short blend=mtex->blendtype;
+ float def = mtex->def_var;
+ short blend = mtex->blendtype;
short texco = mtex->texco;
if (texco == TEXCO_UV && (ELEM(part->from, PART_FROM_FACE, PART_FROM_VOLUME) == 0 || part->distr == PART_DISTR_GRID))
texco = TEXCO_GLOB;
- switch(texco) {
- case TEXCO_GLOB:
- copy_v3_v3(texvec, pa->state.co);
- break;
- case TEXCO_OBJECT:
- copy_v3_v3(texvec, pa->state.co);
- if (mtex->object)
- mul_m4_v3(mtex->object->imat, texvec);
- break;
- case TEXCO_UV:
- if (get_particle_uv(sim->psmd->dm, pa, 0, pa->fuv, mtex->uvname, texvec))
+ switch (texco) {
+ case TEXCO_GLOB:
+ copy_v3_v3(texvec, pa->state.co);
break;
+ case TEXCO_OBJECT:
+ copy_v3_v3(texvec, pa->state.co);
+ if (mtex->object)
+ mul_m4_v3(mtex->object->imat, texvec);
+ break;
+ case TEXCO_UV:
+ if (get_particle_uv(sim->psmd->dm, pa, 0, pa->fuv, mtex->uvname, texvec))
+ break;
/* no break, failed to get uv's, so let's try orco's */
- case TEXCO_ORCO:
- psys_particle_on_emitter(sim->psmd,sim->psys->part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,co,0,0,0,texvec, 0);
- break;
- case TEXCO_PARTICLE:
- /* texture coordinates in range [-1,1] */
- texvec[0] = 2.f * (cfra - pa->time)/(pa->dietime-pa->time) - 1.f;
- texvec[1] = 0.f;
- texvec[2] = 0.f;
- break;
+ case TEXCO_ORCO:
+ psys_particle_on_emitter(sim->psmd, sim->psys->part->from, pa->num, pa->num_dmcache, pa->fuv, pa->foffset, co, 0, 0, 0, texvec, 0);
+ break;
+ case TEXCO_PARTICLE:
+ /* texture coordinates in range [-1, 1] */
+ texvec[0] = 2.f * (cfra - pa->time) / (pa->dietime - pa->time) - 1.f;
+ texvec[1] = 0.f;
+ texvec[2] = 0.f;
+ break;
}
- externtex(mtex, texvec, &value, rgba, rgba+1, rgba+2, rgba+3, 0);
+ externtex(mtex, texvec, &value, rgba, rgba + 1, rgba + 2, rgba + 3, 0);
if ((event & mtex->mapto) & PAMAP_TIME) {
/* the first time has to set the base value for time regardless of blend mode */
- if ((setvars&MAP_PA_TIME)==0) {
- int flip= (mtex->timefac < 0.0f);
- float timefac= fabsf(mtex->timefac);
+ if ((setvars & MAP_PA_TIME) == 0) {
+ int flip = (mtex->timefac < 0.0f);
+ float timefac = fabsf(mtex->timefac);
ptex->time *= 1.0f - timefac;
- ptex->time += timefac * ((flip)? 1.0f - value : value);
+ ptex->time += timefac * ((flip) ? 1.0f - value : value);
setvars |= MAP_PA_TIME;
}
else
- ptex->time= texture_value_blend(def,ptex->time,value,mtex->timefac,blend);
+ ptex->time = texture_value_blend(def, ptex->time, value, mtex->timefac, blend);
}
SET_PARTICLE_TEXTURE(PAMAP_LIFE, ptex->life, mtex->lifefac)
SET_PARTICLE_TEXTURE(PAMAP_DENS, ptex->exist, mtex->padensfac)
@@ -3917,11 +3917,11 @@ float psys_get_child_time(ParticleSystem *psys, ChildParticle *cpa, float cfra,
ParticleSettings *part = psys->part;
float time, life;
- if (part->childtype==PART_CHILD_FACES) {
- int w=0;
- time=0.0;
- while (w<4 && cpa->pa[w]>=0) {
- time+=cpa->w[w]*(psys->particles+cpa->pa[w])->time;
+ if (part->childtype == PART_CHILD_FACES) {
+ int w = 0;
+ time = 0.0;
+ while (w < 4 && cpa->pa[w] >= 0) {
+ time += cpa->w[w] * (psys->particles + cpa->pa[w])->time;
w++;
}
@@ -3937,24 +3937,24 @@ float psys_get_child_time(ParticleSystem *psys, ChildParticle *cpa, float cfra,
if (birthtime)
*birthtime = time;
if (dietime)
- *dietime = time+life;
+ *dietime = time + life;
- return (cfra-time)/life;
+ return (cfra - time) / life;
}
float psys_get_child_size(ParticleSystem *psys, ChildParticle *cpa, float UNUSED(cfra), float *UNUSED(pa_time))
{
ParticleSettings *part = psys->part;
float size; // time XXX
- if (part->childtype==PART_CHILD_FACES)
- size=part->size;
+ if (part->childtype == PART_CHILD_FACES)
+ size = part->size;
else
- size=psys->particles[cpa->parent].size;
+ size = psys->particles[cpa->parent].size;
- size*=part->childsize;
+ size *= part->childsize;
if (part->childrandsize != 0.0f)
- size *= 1.0f - part->childrandsize * PSYS_FRAND(cpa - psys->child + 26);
+ size *= 1.0f - part->childrandsize *PSYS_FRAND(cpa - psys->child + 26);
return size;
}
@@ -3963,26 +3963,26 @@ static void get_child_modifier_parameters(ParticleSettings *part, ParticleThread
ParticleSystem *psys = ctx->sim.psys;
int i = cpa - psys->child;
- get_cpa_texture(ctx->dm, psys, part, psys->particles + cpa->pa[0], i, cpa_num, cpa_fuv, orco, ptex, PAMAP_DENS|PAMAP_CHILD, psys->cfra);
+ get_cpa_texture(ctx->dm, psys, part, psys->particles + cpa->pa[0], i, cpa_num, cpa_fuv, orco, ptex, PAMAP_DENS | PAMAP_CHILD, psys->cfra);
if (ptex->exist < PSYS_FRAND(i + 24))
return;
if (ctx->vg_length)
- ptex->length*=psys_interpolate_value_from_verts(ctx->dm,cpa_from,cpa_num,cpa_fuv,ctx->vg_length);
+ ptex->length *= psys_interpolate_value_from_verts(ctx->dm, cpa_from, cpa_num, cpa_fuv, ctx->vg_length);
if (ctx->vg_clump)
- ptex->clump*=psys_interpolate_value_from_verts(ctx->dm,cpa_from,cpa_num,cpa_fuv,ctx->vg_clump);
+ ptex->clump *= psys_interpolate_value_from_verts(ctx->dm, cpa_from, cpa_num, cpa_fuv, ctx->vg_clump);
if (ctx->vg_kink)
- ptex->kink*=psys_interpolate_value_from_verts(ctx->dm,cpa_from,cpa_num,cpa_fuv,ctx->vg_kink);
+ ptex->kink *= psys_interpolate_value_from_verts(ctx->dm, cpa_from, cpa_num, cpa_fuv, ctx->vg_kink);
if (ctx->vg_rough1)
- ptex->rough1*=psys_interpolate_value_from_verts(ctx->dm,cpa_from,cpa_num,cpa_fuv,ctx->vg_rough1);
+ ptex->rough1 *= psys_interpolate_value_from_verts(ctx->dm, cpa_from, cpa_num, cpa_fuv, ctx->vg_rough1);
if (ctx->vg_rough2)
- ptex->rough2*=psys_interpolate_value_from_verts(ctx->dm,cpa_from,cpa_num,cpa_fuv,ctx->vg_rough2);
+ ptex->rough2 *= psys_interpolate_value_from_verts(ctx->dm, cpa_from, cpa_num, cpa_fuv, ctx->vg_rough2);
if (ctx->vg_roughe)
- ptex->roughe*=psys_interpolate_value_from_verts(ctx->dm,cpa_from,cpa_num,cpa_fuv,ctx->vg_roughe);
+ ptex->roughe *= psys_interpolate_value_from_verts(ctx->dm, cpa_from, cpa_num, cpa_fuv, ctx->vg_roughe);
if (ctx->vg_effector)
- ptex->effector*=psys_interpolate_value_from_verts(ctx->dm,cpa_from,cpa_num,cpa_fuv,ctx->vg_effector);
+ ptex->effector *= psys_interpolate_value_from_verts(ctx->dm, cpa_from, cpa_num, cpa_fuv, ctx->vg_effector);
}
static void do_child_modifiers(ParticleSimulationData *sim, ParticleTexture *ptex, ParticleKey *par, float *par_rot, ChildParticle *cpa, float *orco, float mat[4][4], ParticleKey *state, float t)
{
@@ -4004,17 +4004,17 @@ static void do_child_modifiers(ParticleSimulationData *sim, ParticleTexture *pte
if (part->flag & PART_CHILD_EFFECT)
/* state is safe to cast, since only co and vel are used */
- guided = do_guides(sim->psys->effectors, (ParticleKey*)state, cpa->parent, t);
+ guided = do_guides(sim->psys->effectors, (ParticleKey *)state, cpa->parent, t);
- if (guided==0) {
+ if (guided == 0) {
float clump = do_clump(state, par, t, part->clumpfac, part->clumppow, ptex ? ptex->clump : 1.f);
if (kink_freq != 0.f) {
float kink_amp = part->kink_amp * (1.f - part->kink_amp_clump * clump);
do_kink(state, par, par_rot, t, kink_freq, part->kink_shape,
- kink_amp, part->kink_flat, part->kink, part->kink_axis,
- sim->ob->obmat, sim->psys->part->childtype == PART_CHILD_FACES);
+ kink_amp, part->kink_flat, part->kink, part->kink_axis,
+ sim->ob->obmat, sim->psys->part->childtype == PART_CHILD_FACES);
}
}
@@ -4037,7 +4037,7 @@ void psys_get_particle_on_path(ParticleSimulationData *sim, int p, ParticleKey *
ParticleData *pa;
ChildParticle *cpa;
ParticleTexture ptex;
- ParticleKey *par=0, keys[4], tstate;
+ ParticleKey *par = 0, keys[4], tstate;
ParticleThreadContext ctx; /* fake thread context for child modifiers */
ParticleInterpolationData pind;
@@ -4054,12 +4054,12 @@ void psys_get_particle_on_path(ParticleSimulationData *sim, int p, ParticleKey *
float *cpa_fuv; int cpa_num; short cpa_from;
/* initialize keys to zero */
- memset(keys, 0, 4*sizeof(ParticleKey));
+ memset(keys, 0, 4 * sizeof(ParticleKey));
- t=state->time;
+ t = state->time;
CLAMP(t, 0.0f, 1.0f);
- if (p<totpart) {
+ if (p < totpart) {
/* interpolate pathcache directly if it exist */
if (psys->pathcache) {
ParticleCacheKey result;
@@ -4087,67 +4087,67 @@ void psys_get_particle_on_path(ParticleSimulationData *sim, int p, ParticleKey *
mul_mat3_m4_v3(sim->ob->obmat, state->vel);
}
else if (!keyed && !cached && !(psys->flag & PSYS_GLOBAL_HAIR)) {
- if ((pa->flag & PARS_REKEY)==0) {
+ if ((pa->flag & PARS_REKEY) == 0) {
psys_mat_hair_to_global(sim->ob, sim->psmd->dm, part->from, pa, hairmat);
mul_m4_v3(hairmat, state->co);
mul_mat3_m4_v3(hairmat, state->vel);
- if (sim->psys->effectors && (part->flag & PART_CHILD_GUIDE)==0) {
+ if (sim->psys->effectors && (part->flag & PART_CHILD_GUIDE) == 0) {
do_guides(sim->psys->effectors, state, p, state->time);
/* TODO: proper velocity handling */
}
- if (psys->lattice && edit==0)
- calc_latt_deform(psys->lattice, state->co,1.0f);
+ if (psys->lattice && edit == 0)
+ calc_latt_deform(psys->lattice, state->co, 1.0f);
}
}
}
}
else if (totchild) {
- //invert_m4_m4(imat,ob->obmat);
+ //invert_m4_m4(imat, ob->obmat);
/* interpolate childcache directly if it exists */
if (psys->childcache) {
ParticleCacheKey result;
- interpolate_pathcache(psys->childcache[p-totpart], t, &result);
+ interpolate_pathcache(psys->childcache[p - totpart], t, &result);
copy_v3_v3(state->co, result.co);
copy_v3_v3(state->vel, result.vel);
copy_qt_qt(state->rot, result.rot);
}
else {
- cpa=psys->child+p-totpart;
+ cpa = psys->child + p - totpart;
if (state->time < 0.0f)
t = psys_get_child_time(psys, cpa, -state->time, NULL, NULL);
-
- if (totchild && part->childtype==PART_CHILD_FACES) {
+
+ if (totchild && part->childtype == PART_CHILD_FACES) {
/* part->parents could still be 0 so we can't test with totparent */
- between=1;
+ between = 1;
}
if (between) {
int w = 0;
float foffset;
/* get parent states */
- while (w<4 && cpa->pa[w]>=0) {
+ while (w < 4 && cpa->pa[w] >= 0) {
keys[w].time = state->time;
- psys_get_particle_on_path(sim, cpa->pa[w], keys+w, 1);
+ psys_get_particle_on_path(sim, cpa->pa[w], keys + w, 1);
w++;
}
/* get the original coordinates (orco) for texture usage */
- cpa_num=cpa->num;
-
- foffset= cpa->foffset;
+ cpa_num = cpa->num;
+
+ foffset = cpa->foffset;
cpa_fuv = cpa->fuv;
cpa_from = PART_FROM_FACE;
- psys_particle_on_emitter(psmd,cpa_from,cpa_num,DMCACHE_ISCHILD,cpa->fuv,foffset,co,0,0,0,orco,0);
+ psys_particle_on_emitter(psmd, cpa_from, cpa_num, DMCACHE_ISCHILD, cpa->fuv, foffset, co, 0, 0, 0, orco, 0);
/* we need to save the actual root position of the child for positioning it accurately to the surface of the emitter */
- //copy_v3_v3(cpa_1st,co);
+ //copy_v3_v3(cpa_1st, co);
- //mul_m4_v3(ob->obmat,cpa_1st);
+ //mul_m4_v3(ob->obmat, cpa_1st);
pa = psys->particles + cpa->parent;
@@ -4156,40 +4156,40 @@ void psys_get_particle_on_path(ParticleSimulationData *sim, int p, ParticleKey *
else
unit_m4(hairmat);
- pa=0;
+ pa = 0;
}
- else {
- /* get the parent state */
- keys->time = state->time;
- psys_get_particle_on_path(sim, cpa->parent, keys,1);
+ else {
+ /* get the parent state */
+ keys->time = state->time;
+ psys_get_particle_on_path(sim, cpa->parent, keys, 1);
+
+ /* get the original coordinates (orco) for texture usage */
+ pa = psys->particles + cpa->parent;
- /* get the original coordinates (orco) for texture usage */
- pa=psys->particles+cpa->parent;
+ cpa_from = part->from;
+ cpa_num = pa->num;
+ cpa_fuv = pa->fuv;
- cpa_from=part->from;
- cpa_num=pa->num;
- cpa_fuv=pa->fuv;
-
- if (part->type == PART_HAIR) {
- psys_particle_on_emitter(psmd,cpa_from,cpa_num,DMCACHE_ISCHILD,cpa_fuv,pa->foffset,co,0,0,0,orco,0);
- psys_mat_hair_to_global(sim->ob, sim->psmd->dm, psys->part->from, pa, hairmat);
- }
- else {
- copy_v3_v3(orco, cpa->fuv);
- unit_m4(hairmat);
+ if (part->type == PART_HAIR) {
+ psys_particle_on_emitter(psmd, cpa_from, cpa_num, DMCACHE_ISCHILD, cpa_fuv, pa->foffset, co, 0, 0, 0, orco, 0);
+ psys_mat_hair_to_global(sim->ob, sim->psmd->dm, psys->part->from, pa, hairmat);
+ }
+ else {
+ copy_v3_v3(orco, cpa->fuv);
+ unit_m4(hairmat);
+ }
}
- }
/* correct child ipo timing */
- #if 0 // XXX old animation system
- if ((part->flag&PART_ABS_TIME)==0 && part->ipo) {
- calc_ipo(part->ipo, 100.0f*t);
+#if 0 // XXX old animation system
+ if ((part->flag & PART_ABS_TIME) == 0 && part->ipo) {
+ calc_ipo(part->ipo, 100.0f * t);
execute_ipo((ID *)part, part->ipo);
}
- #endif // XXX old animation system
-
+#endif // XXX old animation system
+
/* get different child parameters from textures & vgroups */
memset(&ctx, 0, sizeof(ParticleThreadContext));
ctx.sim = *sim;
@@ -4199,13 +4199,13 @@ void psys_get_particle_on_path(ParticleSimulationData *sim, int p, ParticleKey *
get_child_modifier_parameters(part, &ctx, cpa, cpa_from, cpa_num, cpa_fuv, orco, &ptex);
if (between) {
- int w=0;
+ int w = 0;
state->co[0] = state->co[1] = state->co[2] = 0.0f;
state->vel[0] = state->vel[1] = state->vel[2] = 0.0f;
/* child position is the weighted sum of parent positions */
- while (w<4 && cpa->pa[w]>=0) {
+ while (w < 4 && cpa->pa[w] >= 0) {
state->co[0] += cpa->w[w] * keys[w].co[0];
state->co[1] += cpa->w[w] * keys[w].co[1];
state->co[2] += cpa->w[w] * keys[w].co[2];
@@ -4236,16 +4236,16 @@ void psys_get_particle_on_path(ParticleSimulationData *sim, int p, ParticleKey *
ParticleKey tstate;
float length = len_v3(state->vel);
- if (t>=0.001f) {
- tstate.time=t-0.001f;
- psys_get_particle_on_path(sim,p,&tstate,0);
- sub_v3_v3v3(state->vel,state->co,tstate.co);
+ if (t >= 0.001f) {
+ tstate.time = t - 0.001f;
+ psys_get_particle_on_path(sim, p, &tstate, 0);
+ sub_v3_v3v3(state->vel, state->co, tstate.co);
normalize_v3(state->vel);
}
else {
- tstate.time=t+0.001f;
- psys_get_particle_on_path(sim,p,&tstate,0);
- sub_v3_v3v3(state->vel,tstate.co,state->co);
+ tstate.time = t + 0.001f;
+ psys_get_particle_on_path(sim, p, &tstate, 0);
+ sub_v3_v3v3(state->vel, tstate.co, state->co);
normalize_v3(state->vel);
}
@@ -4266,9 +4266,9 @@ int psys_get_particle_state(ParticleSimulationData *sim, int p, ParticleKey *sta
float timestep = psys_get_timestep(sim);
/* negative time means "use current time" */
- cfra = state->time > 0 ? state->time : BKE_curframe(sim->scene);
+ cfra = state->time > 0 ? state->time : BKE_scene_frame_get(sim->scene);
- if (p>=totpart) {
+ if (p >= totpart) {
if (!psys->totchild)
return 0;
@@ -4288,9 +4288,9 @@ int psys_get_particle_state(ParticleSimulationData *sim, int p, ParticleKey *sta
}
}
- state->time= (cfra - (part->sta + (part->end - part->sta) * PSYS_FRAND(p + 23))) / (part->lifetime * PSYS_FRAND(p + 24));
+ state->time = (cfra - (part->sta + (part->end - part->sta) * PSYS_FRAND(p + 23))) / (part->lifetime * PSYS_FRAND(p + 24));
- psys_get_particle_on_path(sim, p, state,1);
+ psys_get_particle_on_path(sim, p, state, 1);
return 1;
}
else {
@@ -4315,8 +4315,8 @@ int psys_get_particle_state(ParticleSimulationData *sim, int p, ParticleKey *sta
}
if (sim->psys->flag & PSYS_KEYED) {
- state->time= -cfra;
- psys_get_particle_on_path(sim, p, state,1);
+ state->time = -cfra;
+ psys_get_particle_on_path(sim, p, state, 1);
return 1;
}
else {
@@ -4325,7 +4325,7 @@ int psys_get_particle_state(ParticleSimulationData *sim, int p, ParticleKey *sta
ParticleKey *key1;
float t = (cfra - pa->time) / pa->lifetime;
- key1=&pa->state;
+ key1 = &pa->state;
offset_child(cpa, key1, key1->rot, state, part->childflat, part->childrad);
CLAMP(t, 0.0f, 1.0f);
@@ -4334,12 +4334,12 @@ int psys_get_particle_state(ParticleSimulationData *sim, int p, ParticleKey *sta
do_child_modifiers(sim, NULL, key1, key1->rot, cpa, cpa->fuv, mat, state, t);
if (psys->lattice)
- calc_latt_deform(sim->psys->lattice, state->co,1.0f);
+ calc_latt_deform(sim->psys->lattice, state->co, 1.0f);
}
else {
- if (pa->state.time==cfra || ELEM(part->phystype,PART_PHYS_NO,PART_PHYS_KEYED))
+ if (pa->state.time == cfra || ELEM(part->phystype, PART_PHYS_NO, PART_PHYS_KEYED))
copy_particle_key(state, &pa->state, 1);
- else if (pa->prev_state.time==cfra)
+ else if (pa->prev_state.time == cfra)
copy_particle_key(state, &pa->prev_state, 1);
else {
float dfra, frs_sec = sim->scene->r.frs_sec;
@@ -4351,14 +4351,14 @@ int psys_get_particle_state(ParticleSimulationData *sim, int p, ParticleKey *sta
copy_particle_key(state, &pa->state, 1);
- madd_v3_v3v3fl(state->co, state->co, state->vel, dfra/frs_sec);
+ madd_v3_v3v3fl(state->co, state->co, state->vel, dfra / frs_sec);
}
else {
ParticleKey keys[4];
float keytime;
- copy_particle_key(keys+1, &pa->prev_state, 1);
- copy_particle_key(keys+2, &pa->state, 1);
+ copy_particle_key(keys + 1, &pa->prev_state, 1);
+ copy_particle_key(keys + 2, &pa->state, 1);
dfra = keys[2].time - keys[1].time;
@@ -4384,7 +4384,7 @@ int psys_get_particle_state(ParticleSimulationData *sim, int p, ParticleKey *sta
copy_particle_key(state, &pa->state, 1);
- madd_v3_v3v3fl(state->co, state->co, state->vel, dfra/frs_sec);
+ madd_v3_v3v3fl(state->co, state->co, state->vel, dfra / frs_sec);
}
else {
/* extrapolating over big ranges is not accurate so let's just give something close to reasonable back */
@@ -4393,7 +4393,7 @@ int psys_get_particle_state(ParticleSimulationData *sim, int p, ParticleKey *sta
}
if (sim->psys->lattice)
- calc_latt_deform(sim->psys->lattice, state->co,1.0f);
+ calc_latt_deform(sim->psys->lattice, state->co, 1.0f);
}
return 1;
@@ -4411,14 +4411,14 @@ void psys_get_dupli_texture(ParticleSystem *psys, ParticleSettings *part, Partic
if (cpa) {
if (part->childtype == PART_CHILD_FACES) {
- mtface= CustomData_get_layer(&psmd->dm->faceData, CD_MTFACE);
+ mtface = CustomData_get_layer(&psmd->dm->faceData, CD_MTFACE);
if (mtface) {
- mface= psmd->dm->getTessFaceData(psmd->dm, cpa->num, CD_MFACE);
+ mface = psmd->dm->getTessFaceData(psmd->dm, cpa->num, CD_MFACE);
mtface += cpa->num;
psys_interpolate_uvs(mtface, mface->v4, cpa->fuv, uv);
}
- psys_particle_on_emitter(psmd,PART_FROM_FACE,cpa->num,DMCACHE_ISCHILD,cpa->fuv,cpa->foffset,loc,0,0,0,orco,0);
+ psys_particle_on_emitter(psmd, PART_FROM_FACE, cpa->num, DMCACHE_ISCHILD, cpa->fuv, cpa->foffset, loc, 0, 0, 0, orco, 0);
return;
}
else {
@@ -4427,26 +4427,26 @@ void psys_get_dupli_texture(ParticleSystem *psys, ParticleSettings *part, Partic
}
if (part->from == PART_FROM_FACE) {
- mtface= CustomData_get_layer(&psmd->dm->faceData, CD_MTFACE);
- num= pa->num_dmcache;
+ mtface = CustomData_get_layer(&psmd->dm->faceData, CD_MTFACE);
+ num = pa->num_dmcache;
if (num == DMCACHE_NOTFOUND)
- num= pa->num;
+ num = pa->num;
if (num >= psmd->dm->getNumTessFaces(psmd->dm)) {
/* happens when simplify is enabled
* gives invalid coords but would crash otherwise */
- num= DMCACHE_NOTFOUND;
+ num = DMCACHE_NOTFOUND;
}
if (mtface && num != DMCACHE_NOTFOUND) {
- mface= psmd->dm->getTessFaceData(psmd->dm, num, CD_MFACE);
+ mface = psmd->dm->getTessFaceData(psmd->dm, num, CD_MFACE);
mtface += num;
psys_interpolate_uvs(mtface, mface->v4, pa->fuv, uv);
}
}
- psys_particle_on_emitter(psmd,part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,loc,0,0,0,orco,0);
+ psys_particle_on_emitter(psmd, part->from, pa->num, pa->num_dmcache, pa->fuv, pa->foffset, loc, 0, 0, 0, orco, 0);
}
void psys_get_dupli_path_transform(ParticleSimulationData *sim, ParticleData *pa, ChildParticle *cpa, ParticleCacheKey *cache, float mat[][4], float *scale)
@@ -4457,16 +4457,16 @@ void psys_get_dupli_path_transform(ParticleSimulationData *sim, ParticleData *pa
float loc[3], nor[3], vec[3], side[3], len;
float xvec[3] = {-1.0, 0.0, 0.0}, nmat[3][3];
- sub_v3_v3v3(vec, (cache+cache->steps)->co, cache->co);
- len= normalize_v3(vec);
+ sub_v3_v3v3(vec, (cache + cache->steps)->co, cache->co);
+ len = normalize_v3(vec);
if (pa == NULL && psys->part->childflat != PART_CHILD_FACES)
pa = psys->particles + cpa->pa[0];
if (pa)
- psys_particle_on_emitter(psmd,sim->psys->part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,loc,nor,0,0,0,0);
+ psys_particle_on_emitter(psmd, sim->psys->part->from, pa->num, pa->num_dmcache, pa->fuv, pa->foffset, loc, nor, 0, 0, 0, 0);
else
- psys_particle_on_emitter(psmd,PART_FROM_FACE,cpa->num,DMCACHE_ISCHILD,cpa->fuv,cpa->foffset,loc,nor,0,0,0,0);
+ psys_particle_on_emitter(psmd, PART_FROM_FACE, cpa->num, DMCACHE_ISCHILD, cpa->fuv, cpa->foffset, loc, nor, 0, 0, 0, 0);
if (psys->part->rotmode == PART_ROT_VEL) {
copy_m3_m4(nmat, ob->imat);
@@ -4475,8 +4475,8 @@ void psys_get_dupli_path_transform(ParticleSimulationData *sim, ParticleData *pa
normalize_v3(nor);
/* make sure that we get a proper side vector */
- if (fabs(dot_v3v3(nor,vec))>0.999999) {
- if (fabs(dot_v3v3(nor,xvec))>0.999999) {
+ if (fabs(dot_v3v3(nor, vec)) > 0.999999) {
+ if (fabs(dot_v3v3(nor, xvec)) > 0.999999) {
nor[0] = 0.0f;
nor[1] = 1.0f;
nor[2] = 0.0f;
@@ -4495,8 +4495,8 @@ void psys_get_dupli_path_transform(ParticleSimulationData *sim, ParticleData *pa
float q_phase[4];
float phasefac = psys->part->phasefac;
if (psys->part->randphasefac != 0.0f)
- phasefac += psys->part->randphasefac * PSYS_FRAND((pa-psys->particles) + 20);
- axis_angle_to_quat( q_phase, vec, phasefac*(float)M_PI);
+ phasefac += psys->part->randphasefac * PSYS_FRAND((pa - psys->particles) + 20);
+ axis_angle_to_quat(q_phase, vec, phasefac * (float)M_PI);
mul_qt_v3(q_phase, side);
}
@@ -4512,12 +4512,12 @@ void psys_get_dupli_path_transform(ParticleSimulationData *sim, ParticleData *pa
quat_to_mat4(mat, pa->state.rot);
}
- *scale= len;
+ *scale = len;
}
void psys_make_billboard(ParticleBillboardData *bb, float xvec[3], float yvec[3], float zvec[3], float center[3])
{
- float onevec[3] = {0.0f,0.0f,0.0f}, tvec[3], tvec2[3];
+ float onevec[3] = {0.0f, 0.0f, 0.0f}, tvec[3], tvec2[3];
xvec[0] = 1.0f; xvec[1] = 0.0f; xvec[2] = 0.0f;
yvec[0] = 0.0f; yvec[1] = 1.0f; yvec[2] = 0.0f;
@@ -4525,7 +4525,7 @@ void psys_make_billboard(ParticleBillboardData *bb, float xvec[3], float yvec[3]
/* can happen with bad pointcache or physics calculation
* since this becomes geometry, nan's and inf's crash raytrace code.
* better not allow this. */
- if ( !finite(bb->vec[0]) || !finite(bb->vec[1]) || !finite(bb->vec[2]) ||
+ if (!finite(bb->vec[0]) || !finite(bb->vec[1]) || !finite(bb->vec[2]) ||
!finite(bb->vel[0]) || !finite(bb->vel[1]) || !finite(bb->vel[2]) )
{
zero_v3(bb->vec);
@@ -4540,7 +4540,7 @@ void psys_make_billboard(ParticleBillboardData *bb, float xvec[3], float yvec[3]
}
if (bb->align < PART_BB_VIEW)
- onevec[bb->align]=1.0f;
+ onevec[bb->align] = 1.0f;
if (bb->lock && (bb->align == PART_BB_VIEW)) {
normalize_v3_v3(xvec, bb->ob->obmat[0]);
@@ -4561,10 +4561,10 @@ void psys_make_billboard(ParticleBillboardData *bb, float xvec[3], float yvec[3]
}
normalize_v3(zvec);
- cross_v3_v3v3(xvec,temp,zvec);
+ cross_v3_v3v3(xvec, temp, zvec);
normalize_v3(xvec);
- cross_v3_v3v3(yvec,zvec,xvec);
+ cross_v3_v3v3(yvec, zvec, xvec);
}
else {
sub_v3_v3v3(zvec, bb->ob->obmat[3], bb->vec);
@@ -4578,7 +4578,7 @@ void psys_make_billboard(ParticleBillboardData *bb, float xvec[3], float yvec[3]
cross_v3_v3v3(xvec, bb->ob->obmat[1], zvec);
normalize_v3(xvec);
- cross_v3_v3v3(yvec,zvec,xvec);
+ cross_v3_v3v3(yvec, zvec, xvec);
}
copy_v3_v3(tvec, xvec);
@@ -4601,11 +4601,11 @@ void psys_make_billboard(ParticleBillboardData *bb, float xvec[3], float yvec[3]
void psys_apply_hair_lattice(Scene *scene, Object *ob, ParticleSystem *psys)
{
- ParticleSimulationData sim= {0};
- sim.scene= scene;
- sim.ob= ob;
- sim.psys= psys;
- sim.psmd= psys_get_modifier(ob, psys);
+ ParticleSimulationData sim = {0};
+ sim.scene = scene;
+ sim.ob = ob;
+ sim.psys = psys;
+ sim.psmd = psys_get_modifier(ob, psys);
psys->lattice = psys_get_lattice(&sim);
@@ -4615,12 +4615,12 @@ void psys_apply_hair_lattice(Scene *scene, Object *ob, ParticleSystem *psys)
int p, h;
float hairmat[4][4], imat[4][4];
- for (p=0; p<psys->totpart; p++, pa++) {
+ for (p = 0; p < psys->totpart; p++, pa++) {
psys_mat_hair_to_global(sim.ob, sim.psmd->dm, psys->part->from, pa, hairmat);
invert_m4_m4(imat, hairmat);
hkey = pa->hair;
- for (h=0; h<pa->totkey; h++, hkey++) {
+ for (h = 0; h < pa->totkey; h++, hkey++) {
mul_m4_v3(hairmat, hkey->co);
calc_latt_deform(psys->lattice, hkey->co, 1.0f);
mul_m4_v3(imat, hkey->co);
@@ -4628,7 +4628,7 @@ void psys_apply_hair_lattice(Scene *scene, Object *ob, ParticleSystem *psys)
}
end_latt_deform(psys->lattice);
- psys->lattice= NULL;
+ psys->lattice = NULL;
/* protect the applied shape */
psys->flag |= PSYS_EDITED;
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 4ce24953c89..cd1561734cc 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -241,10 +241,10 @@ static void realloc_particles(ParticleSimulationData *sim, int new_totpart)
}
if (psys->particles) {
- totsaved=MIN2(psys->totpart,totpart);
+ totsaved=MIN2(psys->totpart, totpart);
/*save old pars*/
if (totsaved) {
- memcpy(newpars,psys->particles,totsaved*sizeof(ParticleData));
+ memcpy(newpars, psys->particles, totsaved*sizeof(ParticleData));
if (psys->particles->boid)
memcpy(newboids, psys->particles->boid, totsaved*sizeof(BoidParticle));
@@ -418,7 +418,7 @@ static void distribute_simple_children(Scene *scene, Object *ob, DerivedMesh *fi
cpa = psys->child;
for (i=0; i<child_nbr; i++) {
- for (p=0; p<psys->totpart; p++,cpa++) {
+ for (p=0; p<psys->totpart; p++, cpa++) {
float length=2.0;
cpa->parent=p;
@@ -440,7 +440,7 @@ static void distribute_grid(DerivedMesh *dm, ParticleSystem *psys)
{
ParticleData *pa=NULL;
float min[3], max[3], delta[3], d;
- MVert *mv, *mvert = dm->getVertDataArray(dm,0);
+ MVert *mv, *mvert = dm->getVertDataArray(dm, 0);
int totvert=dm->getNumVerts(dm), from=psys->part->from;
int i, j, k, p, res=psys->part->grid_res, size[3], axis;
@@ -452,13 +452,13 @@ static void distribute_grid(DerivedMesh *dm, ParticleSystem *psys)
mv++;
for (i=1; i<totvert; i++, mv++) {
- min[0]=MIN2(min[0],mv->co[0]);
- min[1]=MIN2(min[1],mv->co[1]);
- min[2]=MIN2(min[2],mv->co[2]);
+ min[0]=MIN2(min[0], mv->co[0]);
+ min[1]=MIN2(min[1], mv->co[1]);
+ min[2]=MIN2(min[2], mv->co[2]);
- max[0]=MAX2(max[0],mv->co[0]);
- max[1]=MAX2(max[1],mv->co[1]);
- max[2]=MAX2(max[2],mv->co[2]);
+ max[0]=MAX2(max[0], mv->co[0]);
+ max[1]=MAX2(max[1], mv->co[1]);
+ max[2]=MAX2(max[2], mv->co[2]);
}
sub_v3_v3v3(delta, max, min);
@@ -473,8 +473,8 @@ static void distribute_grid(DerivedMesh *dm, ParticleSystem *psys)
size[(axis+2)%3] = (int)ceil(delta[(axis+2)%3]/d);
/* float errors grrr.. */
- size[(axis+1)%3] = MIN2(size[(axis+1)%3],res);
- size[(axis+2)%3] = MIN2(size[(axis+2)%3],res);
+ size[(axis+1)%3] = MIN2(size[(axis+1)%3], res);
+ size[(axis+2)%3] = MIN2(size[(axis+2)%3], res);
size[0] = MAX2(size[0], 1);
size[1] = MAX2(size[1], 1);
@@ -485,9 +485,9 @@ static void distribute_grid(DerivedMesh *dm, ParticleSystem *psys)
min[1]+= d < delta[1] ? d/2.f : delta[1]/2.f;
min[2]+= d < delta[2] ? d/2.f : delta[2]/2.f;
- for (i=0,p=0,pa=psys->particles; i<res; i++) {
+ for (i=0, p=0, pa=psys->particles; i<res; i++) {
for (j=0; j<res; j++) {
- for (k=0; k<res; k++,p++,pa++) {
+ for (k=0; k<res; k++, p++, pa++) {
pa->fuv[0] = min[0] + (float)i*d;
pa->fuv[1] = min[1] + (float)j*d;
pa->fuv[2] = min[2] + (float)k*d;
@@ -507,17 +507,17 @@ static void distribute_grid(DerivedMesh *dm, ParticleSystem *psys)
min[1] -= d/2.0f;
min[2] -= d/2.0f;
- for (i=0,mv=mvert; i<totvert; i++,mv++) {
- sub_v3_v3v3(vec,mv->co,min);
+ for (i=0, mv=mvert; i<totvert; i++, mv++) {
+ sub_v3_v3v3(vec, mv->co, min);
vec[0]/=delta[0];
vec[1]/=delta[1];
vec[2]/=delta[2];
- (pa +((int)(vec[0]*(size[0]-1))*res
- +(int)(vec[1]*(size[1]-1)))*res
- +(int)(vec[2]*(size[2]-1)))->flag &= ~PARS_UNEXIST;
+ (pa + ((int)(vec[0] * (size[0] - 1)) * res +
+ (int)(vec[1] * (size[1] - 1))) * res +
+ (int)(vec[2] * (size[2] - 1)))->flag &= ~PARS_UNEXIST;
}
}
- else if (ELEM(from,PART_FROM_FACE,PART_FROM_VOLUME)) {
+ else if (ELEM(from, PART_FROM_FACE, PART_FROM_VOLUME)) {
float co1[3], co2[3];
MFace *mface= NULL, *mface_array;
@@ -526,7 +526,7 @@ static void distribute_grid(DerivedMesh *dm, ParticleSystem *psys)
int amax= from==PART_FROM_FACE ? 3 : 1;
totface=dm->getNumTessFaces(dm);
- mface=mface_array=dm->getTessFaceDataArray(dm,CD_MFACE);
+ mface=mface_array=dm->getTessFaceDataArray(dm, CD_MFACE);
for (a=0; a<amax; a++) {
if (a==0) { a0mul=res*res; a1mul=res; a2mul=1; }
@@ -545,7 +545,7 @@ static void distribute_grid(DerivedMesh *dm, ParticleSystem *psys)
co1[a] -= 0.001f*d;
/* lets intersect the faces */
- for (i=0; i<totface; i++,mface++) {
+ for (i=0; i<totface; i++, mface++) {
copy_v3_v3(v1, mvert[mface->v1].co);
copy_v3_v3(v2, mvert[mface->v2].co);
copy_v3_v3(v3, mvert[mface->v3].co);
@@ -586,9 +586,9 @@ static void distribute_grid(DerivedMesh *dm, ParticleSystem *psys)
}
if (psys->part->flag & PART_GRID_HEXAGONAL) {
- for (i=0,p=0,pa=psys->particles; i<res; i++) {
+ for (i=0, p=0, pa=psys->particles; i<res; i++) {
for (j=0; j<res; j++) {
- for (k=0; k<res; k++,p++,pa++) {
+ for (k=0; k<res; k++, p++, pa++) {
if (j%2)
pa->fuv[0] += d/2.f;
@@ -614,7 +614,7 @@ static void distribute_grid(DerivedMesh *dm, ParticleSystem *psys)
if (psys->part->grid_rand > 0.f) {
float rfac = d * psys->part->grid_rand;
- for (p=0,pa=psys->particles; p<psys->totpart; p++,pa++) {
+ for (p=0, pa=psys->particles; p<psys->totpart; p++, pa++) {
if (pa->flag & PARS_UNEXIST)
continue;
@@ -708,10 +708,10 @@ static void psys_uv_to_w(float u, float v, int quad, float *w)
if (quad) {
vert[3][0]= 0.0f; vert[3][1]= 1.0f; vert[3][2]= 0.0f;
- interp_weights_poly_v3( w,vert, 4, co);
+ interp_weights_poly_v3(w, vert, 4, co);
}
else {
- interp_weights_poly_v3( w,vert, 3, co);
+ interp_weights_poly_v3(w, vert, 3, co);
w[3]= 0.0f;
}
}
@@ -771,9 +771,9 @@ static void distribute_threads_exec(ParticleThread *thread, ParticleData *pa, Ch
KDTreeNearest ptn[3];
int w, maxw;
- psys_particle_on_dm(ctx->dm,from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,co1,0,0,0,orco1,0);
- transform_mesh_orco_verts((Mesh*)ob->data, &orco1, 1, 1);
- maxw = BLI_kdtree_find_n_nearest(ctx->tree,3,orco1,NULL,ptn);
+ psys_particle_on_dm(ctx->dm, from, pa->num, pa->num_dmcache, pa->fuv, pa->foffset, co1, 0, 0, 0, orco1, 0);
+ BKE_mesh_orco_verts_transform((Mesh*)ob->data, &orco1, 1, 1);
+ maxw = BLI_kdtree_find_n_nearest(ctx->tree, 3, orco1, NULL, ptn);
for (w=0; w<maxw; w++) {
pa->verts[w]=ptn->num;
@@ -785,9 +785,9 @@ static void distribute_threads_exec(ParticleThread *thread, ParticleData *pa, Ch
MFace *mface;
pa->num = i = ctx->index[p];
- mface = dm->getTessFaceData(dm,i,CD_MFACE);
+ mface = dm->getTessFaceData(dm, i, CD_MFACE);
- switch(distr) {
+ switch (distr) {
case PART_DISTR_JIT:
if (ctx->jitlevel == 1) {
if (mface->v4)
@@ -796,7 +796,7 @@ static void distribute_threads_exec(ParticleThread *thread, ParticleData *pa, Ch
psys_uv_to_w(0.33333f, 0.33333f, mface->v4, pa->fuv);
}
else {
- ctx->jitoff[i] = fmod(ctx->jitoff[i],(float)ctx->jitlevel);
+ ctx->jitoff[i] = fmod(ctx->jitoff[i], (float)ctx->jitlevel);
psys_uv_to_w(ctx->jit[2*(int)ctx->jitoff[i]], ctx->jit[2*(int)ctx->jitoff[i]+1], mface->v4, pa->fuv);
ctx->jitoff[i]++;
}
@@ -813,21 +813,21 @@ static void distribute_threads_exec(ParticleThread *thread, ParticleData *pa, Ch
/* experimental */
if (from==PART_FROM_VOLUME) {
- MVert *mvert=dm->getVertDataArray(dm,CD_MVERT);
+ MVert *mvert=dm->getVertDataArray(dm, CD_MVERT);
tot=dm->getNumTessFaces(dm);
- psys_interpolate_face(mvert,mface,0,0,pa->fuv,co1,nor,0,0,0,0);
+ psys_interpolate_face(mvert, mface, 0, 0, pa->fuv, co1, nor, 0, 0, 0, 0);
normalize_v3(nor);
- mul_v3_fl(nor,-100.0);
+ mul_v3_fl(nor, -100.0);
- add_v3_v3v3(co2,co1,nor);
+ add_v3_v3v3(co2, co1, nor);
min_d=2.0;
intersect=0;
- for (i=0,mface=dm->getTessFaceDataArray(dm,CD_MFACE); i<tot; i++,mface++) {
+ for (i=0, mface=dm->getTessFaceDataArray(dm, CD_MFACE); i<tot; i++, mface++) {
if (i==pa->num) continue;
v1=mvert[mface->v1].co;
@@ -855,13 +855,15 @@ static void distribute_threads_exec(ParticleThread *thread, ParticleData *pa, Ch
}
if (intersect==0)
pa->foffset=0.0;
- else switch(distr) {
- case PART_DISTR_JIT:
- pa->foffset*= ctx->jit[p%(2*ctx->jitlevel)];
- break;
- case PART_DISTR_RAND:
- pa->foffset*=BLI_frand();
- break;
+ else {
+ switch (distr) {
+ case PART_DISTR_JIT:
+ pa->foffset *= ctx->jit[p % (2 * ctx->jitlevel)];
+ break;
+ case PART_DISTR_RAND:
+ pa->foffset *= BLI_frand();
+ break;
+ }
}
}
}
@@ -887,14 +889,14 @@ static void distribute_threads_exec(ParticleThread *thread, ParticleData *pa, Ch
if (ctx->tree) {
KDTreeNearest ptn[10];
- int w,maxw;//, do_seams;
- float maxd /*, mind,dd */, totw= 0.0f;
+ int w, maxw;//, do_seams;
+ float maxd /*, mind, dd */, totw= 0.0f;
int parent[10];
float pweight[10];
- psys_particle_on_dm(dm,cfrom,cpa->num,DMCACHE_ISCHILD,cpa->fuv,cpa->foffset,co1,nor1,NULL,NULL,orco1,NULL);
- transform_mesh_orco_verts((Mesh*)ob->data, &orco1, 1, 1);
- maxw = BLI_kdtree_find_n_nearest(ctx->tree,4,orco1,NULL,ptn);
+ psys_particle_on_dm(dm, cfrom, cpa->num, DMCACHE_ISCHILD, cpa->fuv, cpa->foffset, co1, nor1, NULL, NULL, orco1, NULL);
+ BKE_mesh_orco_verts_transform((Mesh*)ob->data, &orco1, 1, 1);
+ maxw = BLI_kdtree_find_n_nearest(ctx->tree, 4, orco1, NULL, ptn);
maxd=ptn[maxw-1].dist;
/* mind=ptn[0].dist; */ /* UNUSED */
@@ -902,14 +904,14 @@ static void distribute_threads_exec(ParticleThread *thread, ParticleData *pa, Ch
/* the weights here could be done better */
for (w=0; w<maxw; w++) {
parent[w]=ptn[w].index;
- pweight[w]=(float)pow(2.0,(double)(-6.0f*ptn[w].dist/maxd));
+ pweight[w]=(float)pow(2.0, (double)(-6.0f*ptn[w].dist/maxd));
}
for (;w<10; w++) {
parent[w]=-1;
pweight[w]=0.0f;
}
- for (w=0,i=0; w<maxw && i<4; w++) {
+ for (w=0, i=0; w<maxw && i<4; w++) {
if (parent[w]>=0) {
cpa->pa[i]=parent[w];
cpa->w[i]=pweight[w];
@@ -995,7 +997,7 @@ static void distribute_invalid(Scene *scene, ParticleSystem *psys, int from)
int p, totchild = get_psys_tot_child(scene, psys);
if (psys->child && totchild) {
- for (p=0,cpa=psys->child; p<totchild; p++,cpa++) {
+ for (p=0, cpa=psys->child; p<totchild; p++, cpa++) {
cpa->fuv[0]=cpa->fuv[1]=cpa->fuv[2]=cpa->fuv[3]= 0.0;
cpa->foffset= 0.0f;
cpa->parent=0;
@@ -1031,7 +1033,7 @@ static int distribute_threads_init_data(ParticleThread *threads, Scene *scene, D
int cfrom=0;
int totelem=0, totpart, *particle_element=0, children=0, totseam=0;
int jitlevel= 1, distr;
- float *element_weight=NULL,*element_sum=NULL,*jitter_offset=NULL, *vweight=NULL;
+ float *element_weight=NULL, *element_sum=NULL, *jitter_offset=NULL, *vweight=NULL;
float cur, maxweight=0.0, tweight, totweight, inv_totweight, co[3], nor[3], orco[3], ornor[3];
if (ELEM3(NULL, ob, psys, psys->part))
@@ -1062,7 +1064,8 @@ static int distribute_threads_init_data(ParticleThread *threads, Scene *scene, D
if (part->distr==PART_DISTR_GRID && from != PART_FROM_VERT) {
BLI_srandom(31415926 + psys->seed);
dm= CDDM_from_mesh((Mesh*)ob->data, ob);
- distribute_grid(dm,psys);
+ DM_ensure_tessface(dm);
+ distribute_grid(dm, psys);
dm->release(dm);
return 0;
}
@@ -1081,9 +1084,9 @@ static int distribute_threads_init_data(ParticleThread *threads, Scene *scene, D
tree=BLI_kdtree_new(totpart);
- for (p=0,pa=psys->particles; p<totpart; p++,pa++) {
- psys_particle_on_dm(dm,part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,co,nor,0,0,orco,ornor);
- transform_mesh_orco_verts((Mesh*)ob->data, &orco, 1, 1);
+ for (p=0, pa=psys->particles; p<totpart; p++, pa++) {
+ psys_particle_on_dm(dm, part->from, pa->num, pa->num_dmcache, pa->fuv, pa->foffset, co, nor, 0, 0, orco, ornor);
+ BKE_mesh_orco_verts_transform((Mesh*)ob->data, &orco, 1, 1);
BLI_kdtree_insert(tree, p, orco, ornor);
}
@@ -1104,7 +1107,7 @@ static int distribute_threads_init_data(ParticleThread *threads, Scene *scene, D
}
/* we need orco for consistent distributions */
- DM_add_vert_layer(dm, CD_ORCO, CD_ASSIGN, get_mesh_orco_verts(ob));
+ DM_add_vert_layer(dm, CD_ORCO, CD_ASSIGN, BKE_mesh_orco_verts_get(ob));
if (from == PART_FROM_VERT) {
MVert *mv= dm->getVertDataArray(dm, CD_MVERT);
@@ -1115,12 +1118,12 @@ static int distribute_threads_init_data(ParticleThread *threads, Scene *scene, D
for (p=0; p<totvert; p++) {
if (orcodata) {
- copy_v3_v3(co,orcodata[p]);
- transform_mesh_orco_verts((Mesh*)ob->data, &co, 1, 1);
+ copy_v3_v3(co, orcodata[p]);
+ BKE_mesh_orco_verts_transform((Mesh*)ob->data, &co, 1, 1);
}
else
- copy_v3_v3(co,mv[p].co);
- BLI_kdtree_insert(tree,p,co,NULL);
+ copy_v3_v3(co, mv[p].co);
+ BLI_kdtree_insert(tree, p, co, NULL);
}
BLI_kdtree_balance(tree);
@@ -1134,7 +1137,7 @@ static int distribute_threads_init_data(ParticleThread *threads, Scene *scene, D
distribute_invalid(scene, psys, children ? PART_FROM_CHILD : 0);
if (G.debug & G_DEBUG)
- fprintf(stderr,"Particle distribution error: Nothing to emit from!\n");
+ fprintf(stderr, "Particle distribution error: Nothing to emit from!\n");
if (dm != finaldm) dm->release(dm);
@@ -1157,29 +1160,29 @@ static int distribute_threads_init_data(ParticleThread *threads, Scene *scene, D
orcodata= dm->getVertDataArray(dm, CD_ORCO);
for (i=0; i<totelem; i++) {
- MFace *mf=dm->getTessFaceData(dm,i,CD_MFACE);
+ MFace *mf=dm->getTessFaceData(dm, i, CD_MFACE);
if (orcodata) {
copy_v3_v3(co1, orcodata[mf->v1]);
copy_v3_v3(co2, orcodata[mf->v2]);
copy_v3_v3(co3, orcodata[mf->v3]);
- transform_mesh_orco_verts((Mesh*)ob->data, &co1, 1, 1);
- transform_mesh_orco_verts((Mesh*)ob->data, &co2, 1, 1);
- transform_mesh_orco_verts((Mesh*)ob->data, &co3, 1, 1);
+ BKE_mesh_orco_verts_transform((Mesh*)ob->data, &co1, 1, 1);
+ BKE_mesh_orco_verts_transform((Mesh*)ob->data, &co2, 1, 1);
+ BKE_mesh_orco_verts_transform((Mesh*)ob->data, &co3, 1, 1);
if (mf->v4) {
copy_v3_v3(co4, orcodata[mf->v4]);
- transform_mesh_orco_verts((Mesh*)ob->data, &co4, 1, 1);
+ BKE_mesh_orco_verts_transform((Mesh*)ob->data, &co4, 1, 1);
}
}
else {
- v1= (MVert*)dm->getVertData(dm,mf->v1,CD_MVERT);
- v2= (MVert*)dm->getVertData(dm,mf->v2,CD_MVERT);
- v3= (MVert*)dm->getVertData(dm,mf->v3,CD_MVERT);
+ v1= (MVert*)dm->getVertData(dm, mf->v1, CD_MVERT);
+ v2= (MVert*)dm->getVertData(dm, mf->v2, CD_MVERT);
+ v3= (MVert*)dm->getVertData(dm, mf->v3, CD_MVERT);
copy_v3_v3(co1, v1->co);
copy_v3_v3(co2, v2->co);
copy_v3_v3(co3, v3->co);
if (mf->v4) {
- v4= (MVert*)dm->getVertData(dm,mf->v4,CD_MVERT);
+ v4= (MVert*)dm->getVertData(dm, mf->v4, CD_MVERT);
copy_v3_v3(co4, v4->co);
}
}
@@ -1199,14 +1202,14 @@ static int distribute_threads_init_data(ParticleThread *threads, Scene *scene, D
maxweight /= totarea;
}
else {
- float min=1.0f/(float)(MIN2(totelem,totpart));
+ float min=1.0f/(float)(MIN2(totelem, totpart));
for (i=0; i<totelem; i++)
element_weight[i]=min;
maxweight=min;
}
/* Calculate weights from vgroup */
- vweight = psys_cache_vgroup(dm,psys,PSYS_VG_DENSITY);
+ vweight = psys_cache_vgroup(dm, psys, PSYS_VG_DENSITY);
if (vweight) {
if (from==PART_FROM_VERT) {
@@ -1215,7 +1218,7 @@ static int distribute_threads_init_data(ParticleThread *threads, Scene *scene, D
}
else { /* PART_FROM_FACE / PART_FROM_VOLUME */
for (i=0;i<totelem; i++) {
- MFace *mf=dm->getTessFaceData(dm,i,CD_MFACE);
+ MFace *mf=dm->getTessFaceData(dm, i, CD_MFACE);
tweight = vweight[mf->v1] + vweight[mf->v2] + vweight[mf->v3];
if (mf->v4) {
@@ -1300,7 +1303,7 @@ static int distribute_threads_init_data(ParticleThread *threads, Scene *scene, D
}
/* Create jittering if needed */
- if (distr==PART_DISTR_JIT && ELEM(from,PART_FROM_FACE,PART_FROM_VOLUME)) {
+ if (distr==PART_DISTR_JIT && ELEM(from, PART_FROM_FACE, PART_FROM_VOLUME)) {
jitlevel= part->userjit;
if (jitlevel == 0) {
@@ -1396,7 +1399,7 @@ static void distribute_particles_on_shape(ParticleSimulationData *sim, int UNUSE
{
distribute_invalid(sim->scene, sim->psys, 0);
- fprintf(stderr,"Shape emission not yet possible!\n");
+ fprintf(stderr, "Shape emission not yet possible!\n");
}
static void distribute_particles(ParticleSimulationData *sim, int from)
@@ -1416,7 +1419,7 @@ static void distribute_particles(ParticleSimulationData *sim, int from)
if (distr_error) {
distribute_invalid(sim->scene, sim->psys, from);
- fprintf(stderr,"Particle distribution error!\n");
+ fprintf(stderr, "Particle distribution error!\n");
}
}
@@ -1575,7 +1578,7 @@ static void initialize_all_particles(ParticleSimulationData *sim)
static void get_angular_velocity_vector(short avemode, ParticleKey *state, float *vec)
{
- switch(avemode) {
+ switch (avemode) {
case PART_AVE_VELOCITY:
copy_v3_v3(vec, state->vel);
break;
@@ -1617,18 +1620,18 @@ void psys_get_birth_coordinates(ParticleSimulationData *sim, ParticleData *pa, P
ParticleSystem *psys = sim->psys;
ParticleSettings *part;
ParticleTexture ptex;
- float fac, phasefac, nor[3]={0,0,0},loc[3],vel[3]={0.0,0.0,0.0},rot[4],q2[4];
- float r_vel[3],r_ave[3],r_rot[4],vec[3],p_vel[3]={0.0,0.0,0.0};
- float x_vec[3]={1.0,0.0,0.0}, utan[3]={0.0,1.0,0.0}, vtan[3]={0.0,0.0,1.0}, rot_vec[3]={0.0,0.0,0.0};
+ float fac, phasefac, nor[3]={0, 0, 0}, loc[3], vel[3]={0.0, 0.0, 0.0}, rot[4], q2[4];
+ float r_vel[3], r_ave[3], r_rot[4], vec[3], p_vel[3]={0.0, 0.0, 0.0};
+ float x_vec[3]={1.0, 0.0, 0.0}, utan[3]={0.0, 1.0, 0.0}, vtan[3]={0.0, 0.0, 1.0}, rot_vec[3]={0.0, 0.0, 0.0};
float q_phase[4];
int p = pa - psys->particles;
part=psys->part;
/* get birth location from object */
if (part->tanfac != 0.f)
- psys_particle_on_emitter(sim->psmd, part->from,pa->num, pa->num_dmcache, pa->fuv,pa->foffset,loc,nor,utan,vtan,0,0);
+ psys_particle_on_emitter(sim->psmd, part->from, pa->num, pa->num_dmcache, pa->fuv, pa->foffset, loc, nor, utan, vtan, 0, 0);
else
- psys_particle_on_emitter(sim->psmd, part->from,pa->num, pa->num_dmcache, pa->fuv,pa->foffset,loc,nor,0,0,0,0);
+ psys_particle_on_emitter(sim->psmd, part->from, pa->num, pa->num_dmcache, pa->fuv, pa->foffset, loc, nor, 0, 0, 0, 0);
/* get possible textural influence */
psys_get_texture(sim, pa, &ptex, PAMAP_IVEL, cfra);
@@ -1644,16 +1647,16 @@ void psys_get_birth_coordinates(ParticleSimulationData *sim, ParticleData *pa, P
/* -tangent */
if (part->tanfac!=0.0f) {
- //float phase=vg_rot?2.0f*(psys_particle_value_from_verts(sim->psmd->dm,part->from,pa,vg_rot)-0.5f):0.0f;
+ //float phase=vg_rot?2.0f*(psys_particle_value_from_verts(sim->psmd->dm, part->from, pa, vg_rot)-0.5f):0.0f;
float phase=0.0f;
- mul_v3_fl(vtan,-cosf((float)M_PI*(part->tanphase+phase)));
+ mul_v3_fl(vtan, -cosf((float)M_PI*(part->tanphase+phase)));
fac= -sinf((float)M_PI*(part->tanphase+phase));
madd_v3_v3fl(vtan, utan, fac);
- mul_mat3_m4_v3(ob->obmat,vtan);
+ mul_mat3_m4_v3(ob->obmat, vtan);
copy_v3_v3(utan, nor);
- mul_v3_fl(utan,dot_v3v3(vtan,nor));
+ mul_v3_fl(utan, dot_v3v3(vtan, nor));
sub_v3_v3(vtan, utan);
normalize_v3(vtan);
@@ -1676,7 +1679,7 @@ void psys_get_birth_coordinates(ParticleSimulationData *sim, ParticleData *pa, P
r_ave[1] = 2.0f * (PSYS_FRAND(p + 14) - 0.5f);
r_ave[2] = 2.0f * (PSYS_FRAND(p + 15) - 0.5f);
- mul_mat3_m4_v3(ob->obmat,r_ave);
+ mul_mat3_m4_v3(ob->obmat, r_ave);
normalize_v3(r_ave);
}
@@ -1688,14 +1691,14 @@ void psys_get_birth_coordinates(ParticleSimulationData *sim, ParticleData *pa, P
r_rot[3] = 2.0f * (PSYS_FRAND(p + 19) - 0.5f);
normalize_qt(r_rot);
- mat4_to_quat(rot,ob->obmat);
- mul_qt_qtqt(r_rot,r_rot,rot);
+ mat4_to_quat(rot, ob->obmat);
+ mul_qt_qtqt(r_rot, r_rot, rot);
}
if (part->phystype==PART_PHYS_BOIDS && pa->boid) {
float dvec[3], q[4], mat[3][3];
- copy_v3_v3(state->co,loc);
+ copy_v3_v3(state->co, loc);
/* boids don't get any initial velocity */
zero_v3(state->vel);
@@ -1718,7 +1721,7 @@ void psys_get_birth_coordinates(ParticleSimulationData *sim, ParticleData *pa, P
cross_v3_v3v3(mat[1], mat[2], mat[0]);
/* apply rotation */
- mat3_to_quat_is_ok( q,mat);
+ mat3_to_quat_is_ok(q, mat);
copy_qt_qt(state->rot, q);
}
else {
@@ -1772,14 +1775,14 @@ void psys_get_birth_coordinates(ParticleSimulationData *sim, ParticleData *pa, P
mul_v3_v3fl(state->vel, vel, ptex.ivel);
/* -location from emitter */
- copy_v3_v3(state->co,loc);
+ copy_v3_v3(state->co, loc);
/* -rotation */
unit_qt(state->rot);
if (part->rotmode) {
/* create vector into which rotation is aligned */
- switch(part->rotmode) {
+ switch (part->rotmode) {
case PART_ROT_NOR:
copy_v3_v3(rot_vec, nor);
break;
@@ -1800,19 +1803,19 @@ void psys_get_birth_coordinates(ParticleSimulationData *sim, ParticleData *pa, P
/* create rotation quat */
negate_v3(rot_vec);
- vec_to_quat( q2,rot_vec, OB_POSX, OB_POSZ);
+ vec_to_quat(q2, rot_vec, OB_POSX, OB_POSZ);
/* randomize rotation quat */
if (part->randrotfac!=0.0f)
interp_qt_qtqt(rot, q2, r_rot, part->randrotfac);
else
- copy_qt_qt(rot,q2);
+ copy_qt_qt(rot, q2);
/* rotation phase */
phasefac = part->phasefac;
if (part->randphasefac != 0.0f)
phasefac += part->randphasefac * PSYS_FRAND(p + 20);
- axis_angle_to_quat( q_phase,x_vec, phasefac*(float)M_PI);
+ axis_angle_to_quat(q_phase, x_vec, phasefac*(float)M_PI);
/* combine base rotation & phase */
mul_qt_qtqt(state->rot, rot, q_phase);
@@ -1851,7 +1854,7 @@ void reset_particle(ParticleSimulationData *sim, ParticleData *pa, float dtime,
ob = ob->parent;
}
ob = sim->ob;
- where_is_object_time(sim->scene, ob, pa->time);
+ BKE_object_where_is_calc_time(sim->scene, ob, pa->time);
psys->flag |= PSYS_OB_ANIM_RESTORE;
}
@@ -2130,7 +2133,7 @@ static void psys_update_effectors(ParticleSimulationData *sim)
static void integrate_particle(ParticleSettings *part, ParticleData *pa, float dtime, float *external_acceleration, void (*force_func)(void *forcedata, ParticleKey *state, float *force, float *impulse), void *forcedata)
{
ParticleKey states[5];
- float force[3],acceleration[3],impulse[3],dx[4][3],dv[4][3],oldpos[3];
+ float force[3], acceleration[3], impulse[3], dx[4][3], dv[4][3], oldpos[3];
float pa_mass= (part->flag & PART_SIZEMASS ? part->mass * pa->size : part->mass);
int i, steps=1;
int integrator = part->integrator;
@@ -2141,7 +2144,7 @@ static void integrate_particle(ParticleSettings *part, ParticleData *pa, float d
if (pa->prev_state.time < 0.f && integrator == PART_INT_VERLET)
integrator = PART_INT_EULER;
- switch(integrator) {
+ switch (integrator) {
case PART_INT_EULER:
steps=1;
break;
@@ -2175,7 +2178,7 @@ static void integrate_particle(ParticleSettings *part, ParticleData *pa, float d
/* calculate next state */
add_v3_v3(states[i].vel, impulse);
- switch(integrator) {
+ switch (integrator) {
case PART_INT_EULER:
madd_v3_v3v3fl(pa->state.co, states->co, states->vel, dtime);
madd_v3_v3v3fl(pa->state.vel, states->vel, acceleration, dtime);
@@ -2193,7 +2196,7 @@ static void integrate_particle(ParticleSettings *part, ParticleData *pa, float d
}
break;
case PART_INT_RK4:
- switch(i) {
+ switch (i) {
case 0:
copy_v3_v3(dx[0], states->vel);
mul_v3_fl(dx[0], dtime);
@@ -2535,10 +2538,10 @@ static void sph_force_cb(void *sphdata_v, ParticleKey *state, float *force, floa
u = dot_v3v3(vec, dv);
if (u < 0.f && visc > 0.f)
- madd_v3_v3fl(force, vec, 0.5f * q * visc * u );
+ madd_v3_v3fl(force, vec, 0.5f * q * visc * u);
if (u > 0.f && stiff_visc > 0.f)
- madd_v3_v3fl(force, vec, 0.5f * q * stiff_visc * u );
+ madd_v3_v3fl(force, vec, 0.5f * q * stiff_visc * u);
}
if (spring_constant > 0.f) {
@@ -2711,23 +2714,23 @@ static void basic_integrate(ParticleSimulationData *sim, int p, float dfra, floa
time=(cfra-pa->time)/pa->lifetime;
CLAMP(time, 0.0f, 1.0f);
- copy_v3_v3(tkey.co,pa->state.co);
- copy_v3_v3(tkey.vel,pa->state.vel);
+ copy_v3_v3(tkey.co, pa->state.co);
+ copy_v3_v3(tkey.vel, pa->state.vel);
tkey.time=pa->state.time;
if (part->type != PART_HAIR) {
if (do_guides(sim->psys->effectors, &tkey, p, time)) {
- copy_v3_v3(pa->state.co,tkey.co);
+ copy_v3_v3(pa->state.co, tkey.co);
/* guides don't produce valid velocity */
sub_v3_v3v3(pa->state.vel, tkey.co, pa->prev_state.co);
- mul_v3_fl(pa->state.vel,1.0f/dtime);
+ mul_v3_fl(pa->state.vel, 1.0f/dtime);
pa->state.time=tkey.time;
}
}
}
static void basic_rotate(ParticleSettings *part, ParticleData *pa, float dfra, float timestep)
{
- float rotfac, rot1[4], rot2[4]={1.0,0.0,0.0,0.0}, dtime=dfra*timestep;
+ float rotfac, rot1[4], rot2[4]={1.0, 0.0, 0.0, 0.0}, dtime=dfra*timestep;
if ((part->flag & PART_ROTATIONS)==0) {
pa->state.rot[0]=1.0f;
@@ -2755,15 +2758,15 @@ static void basic_rotate(ParticleSettings *part, ParticleData *pa, float dfra, f
}
rotfac = len_v3(pa->state.ave);
- if (rotfac == 0.0f) { /* unit_qt(in VecRotToQuat) doesn't give unit quat [1,0,0,0]?? */
+ if (rotfac == 0.0f) { /* unit_qt(in VecRotToQuat) doesn't give unit quat [1, 0, 0, 0]?? */
rot1[0]=1.0f;
rot1[1]=rot1[2]=rot1[3]=0;
}
else {
- axis_angle_to_quat(rot1,pa->state.ave,rotfac*dtime);
+ axis_angle_to_quat(rot1, pa->state.ave, rotfac*dtime);
}
- mul_qt_qtqt(pa->state.rot,rot1,pa->prev_state.rot);
- mul_qt_qtqt(pa->state.rot,rot2,pa->state.rot);
+ mul_qt_qtqt(pa->state.rot, rot1, pa->prev_state.rot);
+ mul_qt_qtqt(pa->state.rot, rot2, pa->state.rot);
/* keep rotation quat in good health */
normalize_qt(pa->state.rot);
@@ -2859,7 +2862,7 @@ static float collision_point_distance_with_normal(float p[3], ParticleCollisionE
if (fac >= 0.f)
collision_interpolate_element(pce, 0.f, fac, col);
- switch(pce->tot) {
+ switch (pce->tot) {
case 1:
{
sub_v3_v3v3(nor, p, pce->x0);
@@ -2884,7 +2887,7 @@ static void collision_point_on_surface(float p[3], ParticleCollisionElement *pce
{
collision_interpolate_element(pce, 0.f, fac, col);
- switch(pce->tot) {
+ switch (pce->tot) {
case 1:
{
sub_v3_v3v3(co, p, pce->x0);
@@ -3254,8 +3257,8 @@ static int collision_response(ParticleData *pa, ParticleCollision *col, BVHTreeR
float frict = pd->pdef_frict + pd->pdef_rfrict * 2 * (BLI_frand() - 0.5f);
float distance, nor[3], dot;
- CLAMP(damp,0.0f, 1.0f);
- CLAMP(frict,0.0f, 1.0f);
+ CLAMP(damp, 0.0f, 1.0f);
+ CLAMP(frict, 0.0f, 1.0f);
/* get exact velocity right before collision */
madd_v3_v3v3fl(v0, col->ve1, col->acc, dt1);
@@ -3601,7 +3604,7 @@ static void do_hair_dynamics(ParticleSimulationData *sim)
psys_mat_hair_to_object(sim->ob, sim->psmd->dm, psys->part->from, pa, hairmat);
- for (k=0, key=pa->hair; k<pa->totkey; k++,key++) {
+ for (k=0, key=pa->hair; k<pa->totkey; k++, key++) {
/* create fake root before actual root to resist bending */
if (k==0) {
@@ -3833,7 +3836,7 @@ static void dynamics_step(ParticleSimulationData *sim, float cfra)
sim->colliders = get_collider_cache(sim->scene, sim->ob, NULL);
/* initialize physics type specific stuff */
- switch(part->phystype) {
+ switch (part->phystype) {
case PART_PHYS_BOIDS:
{
ParticleTarget *pt = psys->targets.first;
@@ -3867,7 +3870,7 @@ static void dynamics_step(ParticleSimulationData *sim, float cfra)
}
/* initialize all particles for dynamics */
LOOP_SHOWN_PARTICLES {
- copy_particle_key(&pa->prev_state,&pa->state,1);
+ copy_particle_key(&pa->prev_state, &pa->state, 1);
psys_get_texture(sim, pa, &ptex, PAMAP_SIZE, cfra);
@@ -3908,7 +3911,7 @@ static void dynamics_step(ParticleSimulationData *sim, float cfra)
pa->state.time = -1.f;
}
- switch(part->phystype) {
+ switch (part->phystype) {
case PART_PHYS_NEWTON:
{
LOOP_DYNAMIC_PARTICLES {
@@ -3946,7 +3949,7 @@ static void dynamics_step(ParticleSimulationData *sim, float cfra)
SPHData sphdata;
sph_solver_init(sim, &sphdata);
- #pragma omp parallel for firstprivate (sphdata) private (pa) schedule(dynamic,5)
+ #pragma omp parallel for firstprivate (sphdata) private (pa) schedule(dynamic, 5)
LOOP_DYNAMIC_PARTICLES {
/* do global forces & effectors */
basic_integrate(sim, p, pa->state.time, cfra);
@@ -4083,7 +4086,7 @@ static void particles_fluid_step(ParticleSimulationData *sim, int UNUSED(cfra))
gzf = BLI_gzopen(filename, "rb");
if (!gzf) {
- BLI_snprintf(debugStrBuffer, sizeof(debugStrBuffer),"readFsPartData::error - Unable to open file for reading '%s'\n", filename);
+ BLI_snprintf(debugStrBuffer, sizeof(debugStrBuffer), "readFsPartData::error - Unable to open file for reading '%s'\n", filename);
// XXX bad level call elbeemDebugOut(debugStrBuffer);
return;
}
@@ -4104,23 +4107,23 @@ static void particles_fluid_step(ParticleSimulationData *sim, int UNUSED(cfra))
for (p=0, pa=psys->particles; p<totpart; p++, pa++) {
int ptype=0;
- gzread(gzf, &ptype, sizeof( ptype ));
+ gzread(gzf, &ptype, sizeof(ptype));
if (ptype&readMask) {
activeParts++;
- gzread(gzf, &(pa->size), sizeof( float ));
+ gzread(gzf, &(pa->size), sizeof(float));
pa->size /= 10.0f;
for (j=0; j<3; j++) {
float wrf;
- gzread(gzf, &wrf, sizeof( wrf ));
+ gzread(gzf, &wrf, sizeof(wrf));
pa->state.co[j] = wrf;
- //fprintf(stderr,"Rj%d ",j);
+ //fprintf(stderr, "Rj%d ", j);
}
for (j=0; j<3; j++) {
float wrf;
- gzread(gzf, &wrf, sizeof( wrf ));
+ gzread(gzf, &wrf, sizeof(wrf));
pa->state.vel[j] = wrf;
}
@@ -4132,7 +4135,7 @@ static void particles_fluid_step(ParticleSimulationData *sim, int UNUSED(cfra))
pa->dietime = sim->scene->r.efra + 1;
pa->lifetime = sim->scene->r.efra;
pa->alive = PARS_ALIVE;
- //if (a < 25) fprintf(stderr,"FSPARTICLE debug set %s , a%d = %f,%f,%f , life=%f\n", filename, a, pa->co[0],pa->co[1],pa->co[2], pa->lifetime );
+ //if (a < 25) fprintf(stderr, "FSPARTICLE debug set %s, a%d = %f, %f, %f, life=%f\n", filename, a, pa->co[0], pa->co[1], pa->co[2], pa->lifetime );
}
else {
// skip...
@@ -4145,7 +4148,7 @@ static void particles_fluid_step(ParticleSimulationData *sim, int UNUSED(cfra))
gzclose(gzf);
totpart = psys->totpart = activeParts;
- BLI_snprintf(debugStrBuffer,sizeof(debugStrBuffer),"readFsPartData::done - particles:%d, active:%d, file:%d, mask:%d\n", psys->totpart,activeParts,fileParts,readMask);
+ BLI_snprintf(debugStrBuffer, sizeof(debugStrBuffer), "readFsPartData::done - particles:%d, active:%d, file:%d, mask:%d\n", psys->totpart, activeParts, fileParts, readMask);
// bad level call
// XXX elbeemDebugOut(debugStrBuffer);
@@ -4300,7 +4303,7 @@ static void system_step(ParticleSimulationData *sim, float cfra)
dynamics_step(sim, cfra+dframe+t_frac - 1.f);
psys->cfra = cfra+dframe+t_frac - 1.f;
#if 0
- printf("%f,%f,%f,%f\n", cfra+dframe+t_frac - 1.f, t_frac, dt_frac, sim->courant_num);
+ printf("%f, %f, %f, %f\n", cfra+dframe+t_frac - 1.f, t_frac, dt_frac, sim->courant_num);
#endif
if (part->time_flag & PART_TIME_AUTOSF)
dt_frac = update_timestep(psys, sim, t_frac);
@@ -4462,7 +4465,7 @@ void particle_system_update(Scene *scene, Object *ob, ParticleSystem *psys)
if (!psys_check_enabled(ob, psys))
return;
- cfra= BKE_curframe(scene);
+ cfra= BKE_scene_frame_get(scene);
sim.scene= scene;
sim.ob= ob;
@@ -4499,7 +4502,7 @@ void particle_system_update(Scene *scene, Object *ob, ParticleSystem *psys)
/* setup necessary physics type dependent additional data if it doesn't yet exist */
psys_prepare_physics(&sim);
- switch(part->type) {
+ switch (part->type) {
case PART_HAIR:
{
/* nothing to do so bail out early */
@@ -4551,7 +4554,7 @@ void particle_system_update(Scene *scene, Object *ob, ParticleSystem *psys)
}
default:
{
- switch(part->phystype) {
+ switch (part->phystype) {
case PART_PHYS_NO:
case PART_PHYS_KEYED:
{
@@ -4587,7 +4590,7 @@ void particle_system_update(Scene *scene, Object *ob, ParticleSystem *psys)
if (part->phystype == PART_PHYS_KEYED) {
psys_count_keyed_targets(&sim);
set_keyed_keys(&sim);
- psys_update_path_cache(&sim,(int)cfra);
+ psys_update_path_cache(&sim, (int)cfra);
}
break;
}
@@ -4609,7 +4612,7 @@ void particle_system_update(Scene *scene, Object *ob, ParticleSystem *psys)
ob = ob->parent;
}
ob = sim.ob;
- where_is_object_time(scene, ob, cfra);
+ BKE_object_where_is_calc_time(scene, ob, cfra);
psys->flag &= ~PSYS_OB_ANIM_RESTORE;
}
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index dbcef9ad4c8..69808db52b6 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -222,7 +222,7 @@ void BKE_ptcache_make_particle_key(ParticleKey *key, int index, void **data, flo
/* no rotation info, so make something nice up */
if (data[BPHYS_DATA_ROTATION]==NULL) {
- vec_to_quat( key->rot, key->vel, OB_NEGX, OB_POSZ);
+ vec_to_quat(key->rot, key->vel, OB_NEGX, OB_POSZ);
}
else {
PTCACHE_DATA_TO(data, BPHYS_DATA_ROTATION, index, key->rot);
@@ -366,7 +366,7 @@ static void ptcache_particle_interpolate(int index, void *psys_v, void **data, f
/* determine rotation from velocity */
if (data[BPHYS_DATA_LOCATION] && !data[BPHYS_DATA_ROTATION]) {
- vec_to_quat( keys[2].rot,keys[2].vel, OB_NEGX, OB_POSZ);
+ vec_to_quat(keys[2].rot, keys[2].vel, OB_NEGX, OB_POSZ);
}
if (cfra > pa->time)
@@ -400,7 +400,7 @@ static int ptcache_particle_totwrite(void *psys_v, int cfra)
if (cfra == 0)
return psys->totpart;
- for (p=0; p<psys->totpart; p++,pa++)
+ for (p=0; p<psys->totpart; p++, pa++)
totwrite += (cfra >= pa->time - step && cfra <= pa->dietime + step);
return totwrite;
@@ -433,7 +433,7 @@ static void ptcache_particle_extra_read(void *psys_v, PTCacheMem *pm, float UNUS
PTCacheExtra *extra = pm->extradata.first;
for (; extra; extra=extra->next) {
- switch(extra->type) {
+ switch (extra->type) {
case BPHYS_EXTRA_FLUID_SPRINGS:
{
if (psys->fluid_springs)
@@ -690,14 +690,20 @@ static int ptcache_dynamicpaint_write(PTCacheFile *pf, void *dp_v)
/* cache type */
ptcache_file_write(pf, &surface->type, 1, sizeof(int));
- if (surface->type == MOD_DPAINT_SURFACE_T_PAINT)
- in_len = sizeof(PaintPoint)*total_points;
+ if (surface->type == MOD_DPAINT_SURFACE_T_PAINT) {
+ in_len = sizeof(PaintPoint) * total_points;
+ }
else if (surface->type == MOD_DPAINT_SURFACE_T_DISPLACE ||
- surface->type == MOD_DPAINT_SURFACE_T_WEIGHT)
- in_len = sizeof(float)*total_points;
- else if (surface->type == MOD_DPAINT_SURFACE_T_WAVE)
- in_len = sizeof(PaintWavePoint)*total_points;
- else return 0;
+ surface->type == MOD_DPAINT_SURFACE_T_WEIGHT)
+ {
+ in_len = sizeof(float) * total_points;
+ }
+ else if (surface->type == MOD_DPAINT_SURFACE_T_WAVE) {
+ in_len = sizeof(PaintWavePoint) * total_points;
+ }
+ else {
+ return 0;
+ }
out = (unsigned char *)MEM_callocN(LZO_OUT_LEN(in_len), "pointcache_lzo_buffer");
@@ -714,7 +720,7 @@ static int ptcache_dynamicpaint_read(PTCacheFile *pf, void *dp_v)
/* version header */
ptcache_file_read(pf, version, 1, sizeof(char)*4);
- if (strncmp(version, DPAINT_CACHE_VERSION,4)) {printf("Dynamic Paint: Invalid cache version: %s!\n",version); return 0;}
+ if (strncmp(version, DPAINT_CACHE_VERSION, 4)) {printf("Dynamic Paint: Invalid cache version: %s!\n", version); return 0;}
if (surface->format != MOD_DPAINT_SURFACE_F_IMAGESEQ && surface->data) {
unsigned int data_len;
@@ -727,14 +733,20 @@ static int ptcache_dynamicpaint_read(PTCacheFile *pf, void *dp_v)
return 0;
/* read surface data */
- if (surface->type == MOD_DPAINT_SURFACE_T_PAINT)
+ if (surface->type == MOD_DPAINT_SURFACE_T_PAINT) {
data_len = sizeof(PaintPoint);
+ }
else if (surface->type == MOD_DPAINT_SURFACE_T_DISPLACE ||
- surface->type == MOD_DPAINT_SURFACE_T_WEIGHT)
+ surface->type == MOD_DPAINT_SURFACE_T_WEIGHT)
+ {
data_len = sizeof(float);
- else if (surface->type == MOD_DPAINT_SURFACE_T_WAVE)
+ }
+ else if (surface->type == MOD_DPAINT_SURFACE_T_WAVE) {
data_len = sizeof(PaintWavePoint);
- else return 0;
+ }
+ else {
+ return 0;
+ }
ptcache_file_compressed_read(pf, (unsigned char*)surface->data->type_data, data_len*surface->data->total_points);
@@ -989,8 +1001,7 @@ void BKE_ptcache_ids_from_object(ListBase *lb, Object *ob, Scene *scene, int dup
}
else if (md->type == eModifierType_Smoke) {
SmokeModifierData *smd = (SmokeModifierData *)md;
- if (smd->type & MOD_SMOKE_TYPE_DOMAIN)
- {
+ if (smd->type & MOD_SMOKE_TYPE_DOMAIN) {
pid= MEM_callocN(sizeof(PTCacheID), "PTCacheID");
BKE_ptcache_id_from_smoke(pid, ob, (SmokeModifierData*)md);
BLI_addtail(lb, pid);
@@ -998,8 +1009,7 @@ void BKE_ptcache_ids_from_object(ListBase *lb, Object *ob, Scene *scene, int dup
}
else if (md->type == eModifierType_DynamicPaint) {
DynamicPaintModifierData *pmd = (DynamicPaintModifierData *)md;
- if (pmd->canvas)
- {
+ if (pmd->canvas) {
DynamicPaintSurface *surface = pmd->canvas->surfaces.first;
for (; surface; surface=surface->next) {
@@ -1112,7 +1122,7 @@ static int ptcache_filename(PTCacheID *pid, char *filename, int cfra, short do_p
if (do_ext) {
if (pid->cache->index < 0)
- pid->cache->index = pid->stack_index = object_insert_ptcache(pid->ob);
+ pid->cache->index = pid->stack_index = BKE_object_insert_ptcache(pid->ob);
if (pid->cache->flag & PTCACHE_EXTERNAL) {
if (pid->cache->index >= 0)
@@ -1205,8 +1215,7 @@ static int ptcache_file_compressed_read(PTCacheFile *pf, unsigned char *result,
r = lzo1x_decompress_safe(in, (lzo_uint)in_len, result, (lzo_uint *)&out_len, NULL);
#endif
#ifdef WITH_LZMA
- if (compressed == 2)
- {
+ if (compressed == 2) {
size_t sizeOfIt;
size_t leni = in_len, leno = len;
ptcache_file_read(pf, &size, 1, sizeof(unsigned int));
@@ -1251,7 +1260,7 @@ static int ptcache_file_compressed_write(PTCacheFile *pf, unsigned char *in, uns
#ifdef WITH_LZMA
if (mode == 2) {
- r = LzmaCompress(out, &out_len, in, in_len,//assume sizeof(char)==1....
+ r = LzmaCompress(out, &out_len, in, in_len, //assume sizeof(char)==1....
props, &sizeOfIt, 5, 1 << 24, 3, 0, 2, 32, 2);
if (!(r == SZ_OK) || (out_len >= in_len))
@@ -1270,8 +1279,7 @@ static int ptcache_file_compressed_write(PTCacheFile *pf, unsigned char *in, uns
else
ptcache_file_write(pf, in, in_len, sizeof(unsigned char));
- if (compressed == 2)
- {
+ if (compressed == 2) {
unsigned int size = sizeOfIt;
ptcache_file_write(pf, &sizeOfIt, 1, sizeof(unsigned int));
ptcache_file_write(pf, props, size, sizeof(unsigned char));
@@ -2312,8 +2320,8 @@ void BKE_ptcache_id_time(PTCacheID *pid, Scene *scene, float cfra, int *startfra
cache= pid->cache;
if (timescale) {
- time= BKE_curframe(scene);
- nexttime= BKE_frame_to_ctime(scene, CFRA+1);
+ time= BKE_scene_frame_get(scene);
+ nexttime = BKE_scene_frame_get_from_ctime(scene, CFRA + 1.0f);
*timescale= MAX2(nexttime - time, 0.0f);
}
@@ -2505,16 +2513,14 @@ int BKE_ptcache_object_reset(Scene *scene, Object *ob, int mode)
}
if (md->type == eModifierType_Smoke) {
SmokeModifierData *smd = (SmokeModifierData *)md;
- if (smd->type & MOD_SMOKE_TYPE_DOMAIN)
- {
+ if (smd->type & MOD_SMOKE_TYPE_DOMAIN) {
BKE_ptcache_id_from_smoke(&pid, ob, (SmokeModifierData*)md);
reset |= BKE_ptcache_id_reset(scene, &pid, mode);
}
}
if (md->type == eModifierType_DynamicPaint) {
DynamicPaintModifierData *pmd = (DynamicPaintModifierData *)md;
- if (pmd->canvas)
- {
+ if (pmd->canvas) {
DynamicPaintSurface *surface = pmd->canvas->surfaces.first;
for (; surface; surface=surface->next) {
@@ -2737,7 +2743,7 @@ static void *ptcache_bake_thread(void *ptr)
efra = data->endframe;
for (; (*data->cfra_ptr <= data->endframe) && !data->break_operation; *data->cfra_ptr+=data->step) {
- scene_update_for_newframe(data->main, data->scene, data->scene->lay);
+ BKE_scene_update_for_newframe(data->main, data->scene, data->scene->lay);
if (G.background) {
printf("bake: frame %d :: %d\n", (int)*data->cfra_ptr, data->endframe);
}
@@ -2813,8 +2819,7 @@ void BKE_ptcache_bake(PTCacheBaker* baker)
PTCacheID *pid2;
BKE_ptcache_ids_from_object(&pidlist2, pid->ob, scene, MAX_DUPLI_RECUR);
for (pid2=pidlist2.first; pid2; pid2=pid2->next) {
- if (pid2->type == PTCACHE_TYPE_SMOKE_DOMAIN)
- {
+ if (pid2->type == PTCACHE_TYPE_SMOKE_DOMAIN) {
if (pid2->cache && !(pid2->cache->flag & PTCACHE_BAKED)) {
if (bake || pid2->cache->flag & PTCACHE_REDO_NEEDED)
BKE_ptcache_id_clear(pid2, PTCACHE_CLEAR_ALL, 0);
@@ -2969,7 +2974,7 @@ void BKE_ptcache_bake(PTCacheBaker* baker)
CFRA = cfrao;
if (bake) /* already on cfra unless baking */
- scene_update_for_newframe(bmain, scene, scene->lay);
+ BKE_scene_update_for_newframe(bmain, scene, scene->lay);
if (thread_data.break_operation)
WM_cursor_wait(0);
@@ -3246,8 +3251,7 @@ void BKE_ptcache_update_info(PTCacheID *pid)
}
if (cache->flag & PTCACHE_DISK_CACHE) {
- if (pid->type == PTCACHE_TYPE_SMOKE_DOMAIN)
- {
+ if (pid->type == PTCACHE_TYPE_SMOKE_DOMAIN) {
int totpoint = pid->totpoint(pid->calldata, 0);
if (cache->totpoint > totpoint)
diff --git a/source/blender/blenkernel/intern/property.c b/source/blender/blenkernel/intern/property.c
index 066de61575d..b82521504dd 100644
--- a/source/blender/blenkernel/intern/property.c
+++ b/source/blender/blenkernel/intern/property.c
@@ -57,7 +57,7 @@ void free_properties(ListBase *lb)
{
bProperty *prop;
- while ( (prop= lb->first) ) {
+ while ( (prop = lb->first) ) {
BLI_remlink(lb, prop);
free_property(prop);
}
@@ -67,11 +67,11 @@ bProperty *copy_property(bProperty *prop)
{
bProperty *propn;
- propn= MEM_dupallocN(prop);
+ propn = MEM_dupallocN(prop);
if (prop->poin && prop->poin != &prop->data) {
- propn->poin= MEM_dupallocN(prop->poin);
+ propn->poin = MEM_dupallocN(prop->poin);
}
- else propn->poin= &propn->data;
+ else propn->poin = &propn->data;
return propn;
}
@@ -80,11 +80,11 @@ void copy_properties(ListBase *lbn, ListBase *lbo)
{
bProperty *prop, *propn;
free_properties(lbn); /* in case we are copying to an object with props */
- prop= lbo->first;
+ prop = lbo->first;
while (prop) {
- propn= copy_property(prop);
+ propn = copy_property(prop);
BLI_addtail(lbn, propn);
- prop= prop->next;
+ prop = prop->next;
}
@@ -95,20 +95,20 @@ void init_property(bProperty *prop)
/* also use when property changes type */
if (prop->poin && prop->poin != &prop->data) MEM_freeN(prop->poin);
- prop->poin= NULL;
+ prop->poin = NULL;
- prop->data= 0;
+ prop->data = 0;
- switch(prop->type) {
- case GPROP_BOOL:
- case GPROP_INT:
- case GPROP_FLOAT:
- case GPROP_TIME:
- prop->poin= &prop->data;
- break;
- case GPROP_STRING:
- prop->poin= MEM_callocN(MAX_PROPSTRING, "property string");
- break;
+ switch (prop->type) {
+ case GPROP_BOOL:
+ case GPROP_INT:
+ case GPROP_FLOAT:
+ case GPROP_TIME:
+ prop->poin = &prop->data;
+ break;
+ case GPROP_STRING:
+ prop->poin = MEM_callocN(MAX_PROPSTRING, "property string");
+ break;
}
}
@@ -117,8 +117,8 @@ bProperty *new_property(int type)
{
bProperty *prop;
- prop= MEM_callocN(sizeof(bProperty), "property");
- prop->type= type;
+ prop = MEM_callocN(sizeof(bProperty), "property");
+ prop->type = type;
init_property(prop);
@@ -131,8 +131,8 @@ bProperty *new_property(int type)
static bProperty *get_property__internal(bProperty *first, bProperty *self, const char *name)
{
bProperty *p;
- for (p= first; p; p= p->next) {
- if (p!=self && (strcmp(p->name, name)==0))
+ for (p = first; p; p = p->next) {
+ if (p != self && (strcmp(p->name, name) == 0))
return p;
}
return NULL;
@@ -142,10 +142,10 @@ void unique_property(bProperty *first, bProperty *prop, int force)
bProperty *p;
/* set the first if its not set */
- if (first==NULL) {
- first= prop;
+ if (first == NULL) {
+ first = prop;
while (first->prev) {
- first= first->prev;
+ first = first->prev;
}
}
@@ -162,14 +162,14 @@ void unique_property(bProperty *first, bProperty *prop, int force)
char new_name[sizeof(prop->name)];
char base_name[sizeof(prop->name)];
char num[sizeof(prop->name)];
- int i= 0;
+ int i = 0;
/* strip numbers */
BLI_strncpy(base_name, prop->name, sizeof(base_name));
- for (i= strlen(base_name)-1; (i>=0 && isdigit(base_name[i])); i--) {
- base_name[i]= '\0';
+ for (i = strlen(base_name) - 1; (i >= 0 && isdigit(base_name[i])); i--) {
+ base_name[i] = '\0';
}
- i= 0;
+ i = 0;
do { /* ensure we have enough chars for the new number in the name */
BLI_snprintf(num, sizeof(num), "%d", i++);
@@ -190,7 +190,7 @@ bProperty *get_ob_property(Object *ob, const char *name)
void set_ob_property(Object *ob, bProperty *propc)
{
bProperty *prop;
- prop= get_ob_property(ob, propc->name);
+ prop = get_ob_property(ob, propc->name);
if (prop) {
free_property(prop);
BLI_remlink(&ob->prop, prop);
@@ -206,33 +206,33 @@ int compare_property(bProperty *prop, const char *str)
// extern int Gdfra; /* sector.c */
float fvalue, ftest;
- switch(prop->type) {
- case GPROP_BOOL:
- if (BLI_strcasecmp(str, "true")==0) {
- if (prop->data==1) return 0;
- else return 1;
- }
- else if (BLI_strcasecmp(str, "false")==0) {
- if (prop->data==0) return 0;
- else return 1;
- }
+ switch (prop->type) {
+ case GPROP_BOOL:
+ if (BLI_strcasecmp(str, "true") == 0) {
+ if (prop->data == 1) return 0;
+ else return 1;
+ }
+ else if (BLI_strcasecmp(str, "false") == 0) {
+ if (prop->data == 0) return 0;
+ else return 1;
+ }
/* no break, do GPROP_int too! */
- case GPROP_INT:
- return prop->data - atoi(str);
-
- case GPROP_FLOAT:
- case GPROP_TIME:
- // WARNING: untested for GPROP_TIME
- // function isn't used currently
- fvalue= *((float *)&prop->data);
- ftest= (float)atof(str);
- if ( fvalue > ftest) return 1;
- else if ( fvalue < ftest) return -1;
- return 0;
-
- case GPROP_STRING:
- return strcmp(prop->poin, str);
+ case GPROP_INT:
+ return prop->data - atoi(str);
+
+ case GPROP_FLOAT:
+ case GPROP_TIME:
+ // WARNING: untested for GPROP_TIME
+ // function isn't used currently
+ fvalue = *((float *)&prop->data);
+ ftest = (float)atof(str);
+ if (fvalue > ftest) return 1;
+ else if (fvalue < ftest) return -1;
+ return 0;
+
+ case GPROP_STRING:
+ return strcmp(prop->poin, str);
}
return 0;
@@ -242,22 +242,22 @@ void set_property(bProperty *prop, const char *str)
{
// extern int Gdfra; /* sector.c */
- switch(prop->type) {
- case GPROP_BOOL:
- if (BLI_strcasecmp(str, "true")==0) prop->data= 1;
- else if (BLI_strcasecmp(str, "false")==0) prop->data= 0;
- else prop->data= (atoi(str)!=0);
- break;
- case GPROP_INT:
- prop->data= atoi(str);
- break;
- case GPROP_FLOAT:
- case GPROP_TIME:
- *((float *)&prop->data)= (float)atof(str);
- break;
- case GPROP_STRING:
- strcpy(prop->poin, str); /* TODO - check size? */
- break;
+ switch (prop->type) {
+ case GPROP_BOOL:
+ if (BLI_strcasecmp(str, "true") == 0) prop->data = 1;
+ else if (BLI_strcasecmp(str, "false") == 0) prop->data = 0;
+ else prop->data = (atoi(str) != 0);
+ break;
+ case GPROP_INT:
+ prop->data = atoi(str);
+ break;
+ case GPROP_FLOAT:
+ case GPROP_TIME:
+ *((float *)&prop->data) = (float)atof(str);
+ break;
+ case GPROP_STRING:
+ strcpy(prop->poin, str); /* TODO - check size? */
+ break;
}
}
@@ -266,18 +266,18 @@ void add_property(bProperty *prop, const char *str)
{
// extern int Gdfra; /* sector.c */
- switch(prop->type) {
- case GPROP_BOOL:
- case GPROP_INT:
- prop->data+= atoi(str);
- break;
- case GPROP_FLOAT:
- case GPROP_TIME:
- *((float *)&prop->data)+= (float)atof(str);
- break;
- case GPROP_STRING:
- /* strcpy(prop->poin, str); */
- break;
+ switch (prop->type) {
+ case GPROP_BOOL:
+ case GPROP_INT:
+ prop->data += atoi(str);
+ break;
+ case GPROP_FLOAT:
+ case GPROP_TIME:
+ *((float *)&prop->data) += (float)atof(str);
+ break;
+ case GPROP_STRING:
+ /* strcpy(prop->poin, str); */
+ break;
}
}
@@ -288,18 +288,18 @@ void set_property_valstr(bProperty *prop, char *str)
if (str == NULL) return;
- switch(prop->type) {
- case GPROP_BOOL:
- case GPROP_INT:
- sprintf(str, "%d", prop->data);
- break;
- case GPROP_FLOAT:
- case GPROP_TIME:
- sprintf(str, "%f", *((float *)&prop->data));
- break;
- case GPROP_STRING:
- BLI_strncpy(str, prop->poin, MAX_PROPSTRING);
- break;
+ switch (prop->type) {
+ case GPROP_BOOL:
+ case GPROP_INT:
+ sprintf(str, "%d", prop->data);
+ break;
+ case GPROP_FLOAT:
+ case GPROP_TIME:
+ sprintf(str, "%f", *((float *)&prop->data));
+ break;
+ case GPROP_STRING:
+ BLI_strncpy(str, prop->poin, MAX_PROPSTRING);
+ break;
}
}
diff --git a/source/blender/blenkernel/intern/report.c b/source/blender/blenkernel/intern/report.c
index b3e288dfc74..a7df6b10f06 100644
--- a/source/blender/blenkernel/intern/report.c
+++ b/source/blender/blenkernel/intern/report.c
@@ -43,7 +43,7 @@
static const char *report_type_str(int type)
{
- switch(type) {
+ switch (type) {
case RPT_DEBUG: return "Debug";
case RPT_INFO: return "Info";
case RPT_OPERATOR: return "Operator";
diff --git a/source/blender/blenkernel/intern/sca.c b/source/blender/blenkernel/intern/sca.c
index 8123cbf3f0b..b5bb6b76c61 100644
--- a/source/blender/blenkernel/intern/sca.c
+++ b/source/blender/blenkernel/intern/sca.c
@@ -110,7 +110,7 @@ void init_sensor(bSensor *sens)
sens->data= NULL;
sens->pulse = 0;
- switch(sens->type) {
+ switch (sens->type) {
case SENS_ALWAYS:
sens->pulse = 0;
break;
@@ -272,7 +272,7 @@ void init_controller(bController *cont)
if (cont->data) MEM_freeN(cont->data);
cont->data= NULL;
- switch(cont->type) {
+ switch (cont->type) {
case CONT_EXPRESSION:
cont->data= MEM_callocN(sizeof(bExpressionCont), "expcont");
break;
@@ -400,7 +400,7 @@ void init_actuator(bActuator *act)
if (act->data) MEM_freeN(act->data);
act->data= NULL;
- switch(act->type) {
+ switch (act->type) {
case ACT_ACTION:
case ACT_SHAPEACTION:
act->data= MEM_callocN(sizeof(bActionActuator), "actionact");
@@ -647,7 +647,7 @@ void sca_remove_ob_poin(Object *obt, Object *ob)
sens= obt->sensors.first;
while (sens) {
- switch(sens->type) {
+ switch (sens->type) {
case SENS_MESSAGE:
ms= sens->data;
if (ms->fromObject==ob) ms->fromObject= NULL;
@@ -657,7 +657,7 @@ void sca_remove_ob_poin(Object *obt, Object *ob)
act= obt->actuators.first;
while (act) {
- switch(act->type) {
+ switch (act->type) {
case ACT_CAMERA:
ca= act->data;
if (ca->ob==ob) ca->ob= NULL;
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 01ab5745256..968f49357e6 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -110,7 +110,7 @@ void free_qtcodecdata(QuicktimeCodecData *qcd)
}
}
-Scene *copy_scene(Scene *sce, int type)
+Scene *BKE_scene_copy(Scene *sce, int type)
{
Scene *scen;
ToolSettings *ts;
@@ -118,20 +118,20 @@ Scene *copy_scene(Scene *sce, int type)
if (type == SCE_COPY_EMPTY) {
ListBase lb;
- scen= add_scene(sce->id.name+2);
+ scen = BKE_scene_add(sce->id.name + 2);
- lb= scen->r.layers;
- scen->r= sce->r;
- scen->r.layers= lb;
- scen->unit= sce->unit;
- scen->physics_settings= sce->physics_settings;
- scen->gm= sce->gm;
- scen->audio= sce->audio;
+ lb = scen->r.layers;
+ scen->r = sce->r;
+ scen->r.layers = lb;
+ scen->unit = sce->unit;
+ scen->physics_settings = sce->physics_settings;
+ scen->gm = sce->gm;
+ scen->audio = sce->audio;
MEM_freeN(scen->toolsettings);
}
else {
- scen= copy_libblock(&sce->id);
+ scen = BKE_libblock_copy(&sce->id);
BLI_duplicatelist(&(scen->base), &(sce->base));
clear_id_newpoins();
@@ -140,11 +140,11 @@ Scene *copy_scene(Scene *sce, int type)
id_us_plus((ID *)scen->set);
id_us_plus((ID *)scen->gm.dome.warptext);
- scen->ed= NULL;
- scen->theDag= NULL;
- scen->obedit= NULL;
- scen->stats= NULL;
- scen->fps_info= NULL;
+ scen->ed = NULL;
+ scen->theDag = NULL;
+ scen->obedit = NULL;
+ scen->stats = NULL;
+ scen->fps_info = NULL;
BLI_duplicatelist(&(scen->markers), &(sce->markers));
BLI_duplicatelist(&(scen->transform_spaces), &(sce->transform_spaces));
@@ -152,48 +152,48 @@ Scene *copy_scene(Scene *sce, int type)
BKE_keyingsets_copy(&(scen->keyingsets), &(sce->keyingsets));
if (sce->nodetree) {
- scen->nodetree= ntreeCopyTree(sce->nodetree); /* copies actions */
+ scen->nodetree = ntreeCopyTree(sce->nodetree); /* copies actions */
ntreeSwitchID(scen->nodetree, &sce->id, &scen->id);
}
- obase= sce->base.first;
- base= scen->base.first;
+ obase = sce->base.first;
+ base = scen->base.first;
while (base) {
id_us_plus(&base->object->id);
- if (obase==sce->basact) scen->basact= base;
+ if (obase == sce->basact) scen->basact = base;
- obase= obase->next;
- base= base->next;
+ obase = obase->next;
+ base = base->next;
}
}
/* tool settings */
- scen->toolsettings= MEM_dupallocN(sce->toolsettings);
+ scen->toolsettings = MEM_dupallocN(sce->toolsettings);
- ts= scen->toolsettings;
+ ts = scen->toolsettings;
if (ts) {
if (ts->vpaint) {
- ts->vpaint= MEM_dupallocN(ts->vpaint);
- ts->vpaint->paintcursor= NULL;
- ts->vpaint->vpaint_prev= NULL;
- ts->vpaint->wpaint_prev= NULL;
+ ts->vpaint = MEM_dupallocN(ts->vpaint);
+ ts->vpaint->paintcursor = NULL;
+ ts->vpaint->vpaint_prev = NULL;
+ ts->vpaint->wpaint_prev = NULL;
copy_paint(&ts->vpaint->paint, &ts->vpaint->paint);
}
if (ts->wpaint) {
- ts->wpaint= MEM_dupallocN(ts->wpaint);
- ts->wpaint->paintcursor= NULL;
- ts->wpaint->vpaint_prev= NULL;
- ts->wpaint->wpaint_prev= NULL;
+ ts->wpaint = MEM_dupallocN(ts->wpaint);
+ ts->wpaint->paintcursor = NULL;
+ ts->wpaint->vpaint_prev = NULL;
+ ts->wpaint->wpaint_prev = NULL;
copy_paint(&ts->wpaint->paint, &ts->wpaint->paint);
}
if (ts->sculpt) {
- ts->sculpt= MEM_dupallocN(ts->sculpt);
+ ts->sculpt = MEM_dupallocN(ts->sculpt);
copy_paint(&ts->sculpt->paint, &ts->sculpt->paint);
}
copy_paint(&ts->imapaint.paint, &ts->imapaint.paint);
- ts->imapaint.paintcursor= NULL;
- ts->particle.paintcursor= NULL;
+ ts->imapaint.paintcursor = NULL;
+ ts->particle.paintcursor = NULL;
}
/* make a private copy of the avicodecdata */
@@ -210,7 +210,7 @@ Scene *copy_scene(Scene *sce, int type)
}
if (sce->r.ffcodecdata.properties) { /* intentionally check scen not sce. */
- scen->r.ffcodecdata.properties= IDP_CopyProperty(sce->r.ffcodecdata.properties);
+ scen->r.ffcodecdata.properties = IDP_CopyProperty(sce->r.ffcodecdata.properties);
}
/* NOTE: part of SCE_COPY_LINK_DATA and SCE_COPY_FULL operations
@@ -229,13 +229,13 @@ Scene *copy_scene(Scene *sce, int type)
BKE_copy_animdata_id_action((ID *)scen);
if (scen->world) {
id_us_plus((ID *)scen->world);
- scen->world= copy_world(scen->world);
+ scen->world = BKE_world_copy(scen->world);
BKE_copy_animdata_id_action((ID *)scen->world);
}
if (sce->ed) {
- scen->ed= MEM_callocN( sizeof(Editing), "addseq");
- scen->ed->seqbasep= &scen->ed->seqbase;
+ scen->ed = MEM_callocN(sizeof(Editing), "addseq");
+ scen->ed->seqbasep = &scen->ed->seqbase;
seqbase_dupli_recursive(sce, scen, &scen->ed->seqbase, &sce->ed->seqbase, SEQ_DUPE_ALL);
}
}
@@ -244,14 +244,14 @@ Scene *copy_scene(Scene *sce, int type)
}
/* do not free scene itself */
-void free_scene(Scene *sce)
+void BKE_scene_free(Scene *sce)
{
Base *base;
- base= sce->base.first;
+ base = sce->base.first;
while (base) {
base->object->id.us--;
- base= base->next;
+ base = base->next;
}
/* do not free objects! */
@@ -262,7 +262,7 @@ void free_scene(Scene *sce)
// its probably safe not to do this, some save and reload will free this.
sce->gpd->id.us--;
#endif
- sce->gpd= NULL;
+ sce->gpd = NULL;
}
BLI_freelistN(&sce->base);
@@ -332,84 +332,84 @@ void free_scene(Scene *sce)
sound_destroy_scene(sce);
}
-Scene *add_scene(const char *name)
+Scene *BKE_scene_add(const char *name)
{
- Main *bmain= G.main;
+ Main *bmain = G.main;
Scene *sce;
ParticleEditSettings *pset;
int a;
- sce= alloc_libblock(&bmain->scene, ID_SCE, name);
- sce->lay= sce->layact= 1;
+ sce = BKE_libblock_alloc(&bmain->scene, ID_SCE, name);
+ sce->lay = sce->layact = 1;
- sce->r.mode= R_GAMMA|R_OSA|R_SHADOW|R_SSS|R_ENVMAP|R_RAYTRACE;
- sce->r.cfra= 1;
- sce->r.sfra= 1;
- sce->r.efra= 250;
- sce->r.frame_step= 1;
- sce->r.xsch= 1920;
- sce->r.ysch= 1080;
- sce->r.xasp= 1;
- sce->r.yasp= 1;
- sce->r.xparts= 8;
- sce->r.yparts= 8;
- sce->r.mblur_samples= 1;
- sce->r.filtertype= R_FILTER_MITCH;
- sce->r.size= 50;
-
- sce->r.im_format.planes= R_IMF_PLANES_RGB;
- sce->r.im_format.imtype= R_IMF_IMTYPE_PNG;
- sce->r.im_format.quality= 90;
-
- sce->r.displaymode= R_OUTPUT_AREA;
- sce->r.framapto= 100;
- sce->r.images= 100;
- sce->r.framelen= 1.0;
- sce->r.blurfac= 0.5;
- sce->r.frs_sec= 24;
- sce->r.frs_sec_base= 1;
- sce->r.edgeint= 10;
+ sce->r.mode = R_GAMMA | R_OSA | R_SHADOW | R_SSS | R_ENVMAP | R_RAYTRACE;
+ sce->r.cfra = 1;
+ sce->r.sfra = 1;
+ sce->r.efra = 250;
+ sce->r.frame_step = 1;
+ sce->r.xsch = 1920;
+ sce->r.ysch = 1080;
+ sce->r.xasp = 1;
+ sce->r.yasp = 1;
+ sce->r.xparts = 8;
+ sce->r.yparts = 8;
+ sce->r.mblur_samples = 1;
+ sce->r.filtertype = R_FILTER_MITCH;
+ sce->r.size = 50;
+
+ sce->r.im_format.planes = R_IMF_PLANES_RGB;
+ sce->r.im_format.imtype = R_IMF_IMTYPE_PNG;
+ sce->r.im_format.quality = 90;
+
+ sce->r.displaymode = R_OUTPUT_AREA;
+ sce->r.framapto = 100;
+ sce->r.images = 100;
+ sce->r.framelen = 1.0;
+ sce->r.blurfac = 0.5;
+ sce->r.frs_sec = 24;
+ sce->r.frs_sec_base = 1;
+ sce->r.edgeint = 10;
sce->r.ocres = 128;
sce->r.color_mgt_flag |= R_COLOR_MANAGEMENT;
- sce->r.gauss= 1.0;
+ sce->r.gauss = 1.0;
/* deprecated but keep for upwards compat */
- sce->r.postgamma= 1.0;
- sce->r.posthue= 0.0;
- sce->r.postsat= 1.0;
-
- sce->r.bake_mode= 1; /* prevent to include render stuff here */
- sce->r.bake_filter= 2;
- sce->r.bake_osa= 5;
- sce->r.bake_flag= R_BAKE_CLEAR;
- sce->r.bake_normal_space= R_BAKE_SPACE_TANGENT;
- sce->r.scemode= R_DOCOMP|R_DOSEQ|R_EXTENSION;
- sce->r.stamp= R_STAMP_TIME|R_STAMP_FRAME|R_STAMP_DATE|R_STAMP_CAMERA|R_STAMP_SCENE|R_STAMP_FILENAME|R_STAMP_RENDERTIME;
- sce->r.stamp_font_id= 12;
- sce->r.fg_stamp[0]= sce->r.fg_stamp[1]= sce->r.fg_stamp[2]= 0.8f;
- sce->r.fg_stamp[3]= 1.0f;
- sce->r.bg_stamp[0]= sce->r.bg_stamp[1]= sce->r.bg_stamp[2]= 0.0f;
- sce->r.bg_stamp[3]= 0.25f;
+ sce->r.postgamma = 1.0;
+ sce->r.posthue = 0.0;
+ sce->r.postsat = 1.0;
+
+ sce->r.bake_mode = 1; /* prevent to include render stuff here */
+ sce->r.bake_filter = 2;
+ sce->r.bake_osa = 5;
+ sce->r.bake_flag = R_BAKE_CLEAR;
+ sce->r.bake_normal_space = R_BAKE_SPACE_TANGENT;
+ sce->r.scemode = R_DOCOMP | R_DOSEQ | R_EXTENSION;
+ sce->r.stamp = R_STAMP_TIME | R_STAMP_FRAME | R_STAMP_DATE | R_STAMP_CAMERA | R_STAMP_SCENE | R_STAMP_FILENAME | R_STAMP_RENDERTIME;
+ sce->r.stamp_font_id = 12;
+ sce->r.fg_stamp[0] = sce->r.fg_stamp[1] = sce->r.fg_stamp[2] = 0.8f;
+ sce->r.fg_stamp[3] = 1.0f;
+ sce->r.bg_stamp[0] = sce->r.bg_stamp[1] = sce->r.bg_stamp[2] = 0.0f;
+ sce->r.bg_stamp[3] = 0.25f;
sce->r.raytrace_options = R_RAYTRACE_USE_INSTANCES;
- sce->r.seq_prev_type= OB_SOLID;
- sce->r.seq_rend_type= OB_SOLID;
- sce->r.seq_flag= R_SEQ_GL_PREV;
+ sce->r.seq_prev_type = OB_SOLID;
+ sce->r.seq_rend_type = OB_SOLID;
+ sce->r.seq_flag = R_SEQ_GL_PREV;
- sce->r.threads= 1;
+ sce->r.threads = 1;
- sce->r.simplify_subsurf= 6;
- sce->r.simplify_particles= 1.0f;
- sce->r.simplify_shadowsamples= 16;
- sce->r.simplify_aosss= 1.0f;
+ sce->r.simplify_subsurf = 6;
+ sce->r.simplify_particles = 1.0f;
+ sce->r.simplify_shadowsamples = 16;
+ sce->r.simplify_aosss = 1.0f;
sce->r.border.xmin = 0.0f;
sce->r.border.ymin = 0.0f;
sce->r.border.xmax = 1.0f;
sce->r.border.ymax = 1.0f;
- sce->toolsettings = MEM_callocN(sizeof(struct ToolSettings),"Tool Settings Struct");
- sce->toolsettings->cornertype=1;
+ sce->toolsettings = MEM_callocN(sizeof(struct ToolSettings), "Tool Settings Struct");
+ sce->toolsettings->cornertype = 1;
sce->toolsettings->degr = 90;
sce->toolsettings->step = 9;
sce->toolsettings->turn = 1;
@@ -423,25 +423,25 @@ Scene *add_scene(const char *name)
sce->toolsettings->uvcalc_mapdir = 1;
sce->toolsettings->uvcalc_mapalign = 1;
sce->toolsettings->unwrapper = 1;
- sce->toolsettings->select_thresh= 0.01f;
+ sce->toolsettings->select_thresh = 0.01f;
sce->toolsettings->jointrilimit = 0.8f;
- sce->toolsettings->selectmode= SCE_SELECT_VERTEX;
- sce->toolsettings->uv_selectmode= UV_SELECT_VERTEX;
- sce->toolsettings->normalsize= 0.1;
- sce->toolsettings->autokey_mode= U.autokey_mode;
+ sce->toolsettings->selectmode = SCE_SELECT_VERTEX;
+ sce->toolsettings->uv_selectmode = UV_SELECT_VERTEX;
+ sce->toolsettings->normalsize = 0.1;
+ sce->toolsettings->autokey_mode = U.autokey_mode;
sce->toolsettings->skgen_resolution = 100;
- sce->toolsettings->skgen_threshold_internal = 0.01f;
- sce->toolsettings->skgen_threshold_external = 0.01f;
- sce->toolsettings->skgen_angle_limit = 45.0f;
- sce->toolsettings->skgen_length_ratio = 1.3f;
- sce->toolsettings->skgen_length_limit = 1.5f;
- sce->toolsettings->skgen_correlation_limit = 0.98f;
- sce->toolsettings->skgen_symmetry_limit = 0.1f;
+ sce->toolsettings->skgen_threshold_internal = 0.01f;
+ sce->toolsettings->skgen_threshold_external = 0.01f;
+ sce->toolsettings->skgen_angle_limit = 45.0f;
+ sce->toolsettings->skgen_length_ratio = 1.3f;
+ sce->toolsettings->skgen_length_limit = 1.5f;
+ sce->toolsettings->skgen_correlation_limit = 0.98f;
+ sce->toolsettings->skgen_symmetry_limit = 0.1f;
sce->toolsettings->skgen_postpro = SKGEN_SMOOTH;
sce->toolsettings->skgen_postpro_passes = 1;
- sce->toolsettings->skgen_options = SKGEN_FILTER_INTERNAL|SKGEN_FILTER_EXTERNAL|SKGEN_FILTER_SMART|SKGEN_HARMONIC|SKGEN_SUB_CORRELATION|SKGEN_STICK_TO_EMBEDDING;
+ sce->toolsettings->skgen_options = SKGEN_FILTER_INTERNAL | SKGEN_FILTER_EXTERNAL | SKGEN_FILTER_SMART | SKGEN_HARMONIC | SKGEN_SUB_CORRELATION | SKGEN_STICK_TO_EMBEDDING;
sce->toolsettings->skgen_subdivisions[0] = SKGEN_SUB_CORRELATION;
sce->toolsettings->skgen_subdivisions[1] = SKGEN_SUB_LENGTH;
sce->toolsettings->skgen_subdivisions[2] = SKGEN_SUB_ANGLE;
@@ -455,22 +455,22 @@ Scene *add_scene(const char *name)
sce->unit.scale_length = 1.0f;
- pset= &sce->toolsettings->particle;
- pset->flag= PE_KEEP_LENGTHS|PE_LOCK_FIRST|PE_DEFLECT_EMITTER|PE_AUTO_VELOCITY;
- pset->emitterdist= 0.25f;
- pset->totrekey= 5;
- pset->totaddkey= 5;
- pset->brushtype= PE_BRUSH_NONE;
- pset->draw_step= 2;
- pset->fade_frames= 2;
- pset->selectmode= SCE_SELECT_PATH;
- for (a=0; a<PE_TOT_BRUSH; a++) {
- pset->brush[a].strength= 0.5;
- pset->brush[a].size= 50;
- pset->brush[a].step= 10;
- pset->brush[a].count= 10;
+ pset = &sce->toolsettings->particle;
+ pset->flag = PE_KEEP_LENGTHS | PE_LOCK_FIRST | PE_DEFLECT_EMITTER | PE_AUTO_VELOCITY;
+ pset->emitterdist = 0.25f;
+ pset->totrekey = 5;
+ pset->totaddkey = 5;
+ pset->brushtype = PE_BRUSH_NONE;
+ pset->draw_step = 2;
+ pset->fade_frames = 2;
+ pset->selectmode = SCE_SELECT_PATH;
+ for (a = 0; a < PE_TOT_BRUSH; a++) {
+ pset->brush[a].strength = 0.5;
+ pset->brush[a].size = 50;
+ pset->brush[a].step = 10;
+ pset->brush[a].count = 10;
}
- pset->brush[PE_BRUSH_CUT].strength= 100;
+ pset->brush[PE_BRUSH_CUT].strength = 100;
sce->r.ffcodecdata.audio_mixrate = 44100;
sce->r.ffcodecdata.audio_volume = 1.0f;
@@ -487,10 +487,10 @@ Scene *add_scene(const char *name)
BLI_strncpy(sce->r.pic, U.renderdir, sizeof(sce->r.pic));
BLI_init_rctf(&sce->r.safety, 0.1f, 0.9f, 0.1f, 0.9f);
- sce->r.osa= 8;
+ sce->r.osa = 8;
/* note; in header_info.c the scene copy happens..., if you add more to renderdata it has to be checked there */
- scene_add_render_layer(sce, NULL);
+ BKE_scene_add_render_layer(sce, NULL);
/* game data */
sce->gm.stereoflag = STEREO_NOSTEREO;
@@ -503,13 +503,13 @@ Scene *add_scene(const char *name)
sce->gm.dome.resbuf = 1.0f;
sce->gm.dome.tilt = 0;
- sce->gm.xplay= 640;
- sce->gm.yplay= 480;
- sce->gm.freqplay= 60;
- sce->gm.depth= 32;
+ sce->gm.xplay = 640;
+ sce->gm.yplay = 480;
+ sce->gm.freqplay = 60;
+ sce->gm.depth = 32;
- sce->gm.gravity= 9.8f;
- sce->gm.physicsEngine= WOPHY_BULLET;
+ sce->gm.gravity = 9.8f;
+ sce->gm.physicsEngine = WOPHY_BULLET;
sce->gm.mode = 32; //XXX ugly harcoding, still not sure we should drop mode. 32 == 1 << 5 == use_occlusion_culling
sce->gm.occlusionRes = 128;
sce->gm.ticrate = 60;
@@ -520,12 +520,12 @@ Scene *add_scene(const char *name)
sce->gm.flag = GAME_DISPLAY_LISTS;
sce->gm.matmode = GAME_MAT_MULTITEX;
- sce->gm.obstacleSimulation= OBSTSIMULATION_NONE;
+ sce->gm.obstacleSimulation = OBSTSIMULATION_NONE;
sce->gm.levelHeight = 2.f;
sce->gm.recastData.cellsize = 0.3f;
sce->gm.recastData.cellheight = 0.2f;
- sce->gm.recastData.agentmaxslope = M_PI/2;
+ sce->gm.recastData.agentmaxslope = M_PI / 2;
sce->gm.recastData.agentmaxclimb = 0.9f;
sce->gm.recastData.agentheight = 2.0f;
sce->gm.recastData.agentradius = 0.6f;
@@ -544,19 +544,19 @@ Scene *add_scene(const char *name)
return sce;
}
-Base *object_in_scene(Object *ob, Scene *sce)
+Base *BKE_scene_base_find(Scene *scene, Object *ob)
{
Base *base;
- base= sce->base.first;
+ base = scene->base.first;
while (base) {
if (base->object == ob) return base;
- base= base->next;
+ base = base->next;
}
return NULL;
}
-void set_scene_bg(Main *bmain, Scene *scene)
+void BKE_scene_set_background(Main *bmain, Scene *scene)
{
Scene *sce;
Base *base;
@@ -566,22 +566,22 @@ void set_scene_bg(Main *bmain, Scene *scene)
int flag;
/* check for cyclic sets, for reading old files but also for definite security (py?) */
- scene_check_setscene(bmain, scene);
+ BKE_scene_validate_setscene(bmain, scene);
/* can happen when switching modes in other scenes */
if (scene->obedit && !(scene->obedit->mode & OB_MODE_EDIT))
- scene->obedit= NULL;
+ scene->obedit = NULL;
/* deselect objects (for dataselect) */
- for (ob= bmain->object.first; ob; ob= ob->id.next)
- ob->flag &= ~(SELECT|OB_FROMGROUP);
+ for (ob = bmain->object.first; ob; ob = ob->id.next)
+ ob->flag &= ~(SELECT | OB_FROMGROUP);
/* group flags again */
- for (group= bmain->group.first; group; group= group->id.next) {
- go= group->gobject.first;
+ for (group = bmain->group.first; group; group = group->id.next) {
+ go = group->gobject.first;
while (go) {
if (go->ob) go->ob->flag |= OB_FROMGROUP;
- go= go->next;
+ go = go->next;
}
}
@@ -589,35 +589,35 @@ void set_scene_bg(Main *bmain, Scene *scene)
DAG_scene_sort(bmain, scene);
/* ensure dags are built for sets */
- for (sce= scene->set; sce; sce= sce->set)
- if (sce->theDag==NULL)
+ for (sce = scene->set; sce; sce = sce->set)
+ if (sce->theDag == NULL)
DAG_scene_sort(bmain, sce);
/* copy layers and flags from bases to objects */
- for (base= scene->base.first; base; base= base->next) {
- ob= base->object;
- ob->lay= base->lay;
+ for (base = scene->base.first; base; base = base->next) {
+ ob = base->object;
+ ob->lay = base->lay;
/* group patch... */
base->flag &= ~(OB_FROMGROUP);
- flag= ob->flag & (OB_FROMGROUP);
+ flag = ob->flag & (OB_FROMGROUP);
base->flag |= flag;
/* not too nice... for recovering objects with lost data */
//if (ob->pose==NULL) base->flag &= ~OB_POSEMODE;
- ob->flag= base->flag;
+ ob->flag = base->flag;
- ob->ctime= -1234567.0; /* force ipo to be calculated later */
+ ob->ctime = -1234567.0; /* force ipo to be calculated later */
}
/* no full animation update, this to enable render code to work (render code calls own animation updates) */
}
/* called from creator.c */
-Scene *set_scene_name(Main *bmain, const char *name)
+Scene *BKE_scene_set_name(Main *bmain, const char *name)
{
- Scene *sce= (Scene *)find_id("SC", name);
+ Scene *sce = (Scene *)BKE_libblock_find_name(ID_SCE, name);
if (sce) {
- set_scene_bg(bmain, sce);
+ BKE_scene_set_background(bmain, sce);
printf("Scene switch: '%s' in file: '%s'\n", name, G.main->name);
return sce;
}
@@ -626,15 +626,15 @@ Scene *set_scene_name(Main *bmain, const char *name)
return NULL;
}
-void unlink_scene(Main *bmain, Scene *sce, Scene *newsce)
+void BKE_scene_unlink(Main *bmain, Scene *sce, Scene *newsce)
{
Scene *sce1;
bScreen *sc;
/* check all sets */
- for (sce1= bmain->scene.first; sce1; sce1= sce1->id.next)
+ for (sce1 = bmain->scene.first; sce1; sce1 = sce1->id.next)
if (sce1->set == sce)
- sce1->set= NULL;
+ sce1->set = NULL;
/* check all sequences */
clear_scene_in_allseqs(bmain, sce);
@@ -643,27 +643,27 @@ void unlink_scene(Main *bmain, Scene *sce, Scene *newsce)
clear_scene_in_nodes(bmain, sce);
/* al screens */
- for (sc= bmain->screen.first; sc; sc= sc->id.next)
+ for (sc = bmain->screen.first; sc; sc = sc->id.next)
if (sc->scene == sce)
- sc->scene= newsce;
+ sc->scene = newsce;
- free_libblock(&bmain->scene, sce);
+ BKE_libblock_free(&bmain->scene, sce);
}
/* used by metaballs
* doesnt return the original duplicated object, only dupli's
*/
-int next_object(Scene **scene, int val, Base **base, Object **ob)
+int BKE_scene_base_iter_next(Scene **scene, int val, Base **base, Object **ob)
{
- static ListBase *duplilist= NULL;
+ static ListBase *duplilist = NULL;
static DupliObject *dupob;
- static int fase= F_START, in_next_object= 0;
- int run_again=1;
+ static int fase = F_START, in_next_object = 0;
+ int run_again = 1;
/* init */
- if (val==0) {
- fase= F_START;
- dupob= NULL;
+ if (val == 0) {
+ fase = F_START;
+ dupob = NULL;
/* XXX particle systems with metas+dupligroups call this recursively */
/* see bug #18725 */
@@ -674,44 +674,44 @@ int next_object(Scene **scene, int val, Base **base, Object **ob)
}
}
else {
- in_next_object= 1;
+ in_next_object = 1;
/* run_again is set when a duplilist has been ended */
while (run_again) {
- run_again= 0;
+ run_again = 0;
/* the first base */
- if (fase==F_START) {
- *base= (*scene)->base.first;
+ if (fase == F_START) {
+ *base = (*scene)->base.first;
if (*base) {
- *ob= (*base)->object;
- fase= F_SCENE;
+ *ob = (*base)->object;
+ fase = F_SCENE;
}
else {
/* exception: empty scene */
while ((*scene)->set) {
- (*scene)= (*scene)->set;
+ (*scene) = (*scene)->set;
if ((*scene)->base.first) {
- *base= (*scene)->base.first;
- *ob= (*base)->object;
- fase= F_SCENE;
+ *base = (*scene)->base.first;
+ *ob = (*base)->object;
+ fase = F_SCENE;
break;
}
}
}
}
else {
- if (*base && fase!=F_DUPLI) {
- *base= (*base)->next;
- if (*base) *ob= (*base)->object;
+ if (*base && fase != F_DUPLI) {
+ *base = (*base)->next;
+ if (*base) *ob = (*base)->object;
else {
- if (fase==F_SCENE) {
+ if (fase == F_SCENE) {
/* (*scene) is finished, now do the set */
while ((*scene)->set) {
- (*scene)= (*scene)->set;
+ (*scene) = (*scene)->set;
if ((*scene)->base.first) {
- *base= (*scene)->base.first;
- *ob= (*base)->object;
+ *base = (*scene)->base.first;
+ *ob = (*base)->object;
break;
}
}
@@ -720,17 +720,17 @@ int next_object(Scene **scene, int val, Base **base, Object **ob)
}
}
- if (*base == NULL) fase= F_START;
+ if (*base == NULL) fase = F_START;
else {
- if (fase!=F_DUPLI) {
+ if (fase != F_DUPLI) {
if ( (*base)->object->transflag & OB_DUPLI) {
/* groups cannot be duplicated for mballs yet,
* this enters eternal loop because of
* makeDispListMBall getting called inside of group_duplilist */
if ((*base)->object->dup_group == NULL) {
- duplilist= object_duplilist((*scene), (*base)->object);
+ duplilist = object_duplilist((*scene), (*base)->object);
- dupob= duplilist->first;
+ dupob = duplilist->first;
if (!dupob)
free_object_duplilist(duplilist);
@@ -743,22 +743,22 @@ int next_object(Scene **scene, int val, Base **base, Object **ob)
copy_m4_m4(dupob->ob->obmat, dupob->mat);
(*base)->flag |= OB_FROMDUPLI;
- *ob= dupob->ob;
- fase= F_DUPLI;
+ *ob = dupob->ob;
+ fase = F_DUPLI;
- dupob= dupob->next;
+ dupob = dupob->next;
}
- else if (fase==F_DUPLI) {
- fase= F_SCENE;
+ else if (fase == F_DUPLI) {
+ fase = F_SCENE;
(*base)->flag &= ~OB_FROMDUPLI;
- for (dupob= duplilist->first; dupob; dupob= dupob->next) {
+ for (dupob = duplilist->first; dupob; dupob = dupob->next) {
copy_m4_m4(dupob->ob->obmat, dupob->omat);
}
free_object_duplilist(duplilist);
- duplilist= NULL;
- run_again= 1;
+ duplilist = NULL;
+ run_again = 1;
}
}
}
@@ -766,39 +766,39 @@ int next_object(Scene **scene, int val, Base **base, Object **ob)
#if 0
if (ob && *ob) {
- printf("Scene: '%s', '%s'\n", (*scene)->id.name+2, (*ob)->id.name+2);
+ printf("Scene: '%s', '%s'\n", (*scene)->id.name + 2, (*ob)->id.name + 2);
}
#endif
/* reset recursion test */
- in_next_object= 0;
+ in_next_object = 0;
return fase;
}
-Object *scene_find_camera(Scene *sc)
+Object *BKE_scene_camera_find(Scene *sc)
{
Base *base;
- for (base= sc->base.first; base; base= base->next)
- if (base->object->type==OB_CAMERA)
+ for (base = sc->base.first; base; base = base->next)
+ if (base->object->type == OB_CAMERA)
return base->object;
return NULL;
}
#ifdef DURIAN_CAMERA_SWITCH
-Object *scene_camera_switch_find(Scene *scene)
+Object *BKE_scene_camera_switch_find(Scene *scene)
{
TimeMarker *m;
int cfra = scene->r.cfra;
int frame = -(MAXFRAME + 1);
- Object *camera= NULL;
+ Object *camera = NULL;
- for (m= scene->markers.first; m; m= m->next) {
- if (m->camera && (m->camera->restrictflag & OB_RESTRICT_RENDER)==0 && (m->frame <= cfra) && (m->frame > frame)) {
- camera= m->camera;
- frame= m->frame;
+ for (m = scene->markers.first; m; m = m->next) {
+ if (m->camera && (m->camera->restrictflag & OB_RESTRICT_RENDER) == 0 && (m->frame <= cfra) && (m->frame > frame)) {
+ camera = m->camera;
+ frame = m->frame;
if (frame == cfra)
break;
@@ -809,12 +809,12 @@ Object *scene_camera_switch_find(Scene *scene)
}
#endif
-int scene_camera_switch_update(Scene *scene)
+int BKE_scene_camera_switch_update(Scene *scene)
{
#ifdef DURIAN_CAMERA_SWITCH
- Object *camera= scene_camera_switch_find(scene);
+ Object *camera = BKE_scene_camera_switch_find(scene);
if (camera) {
- scene->camera= camera;
+ scene->camera = camera;
return 1;
}
#else
@@ -823,20 +823,20 @@ int scene_camera_switch_update(Scene *scene)
return 0;
}
-char *scene_find_marker_name(Scene *scene, int frame)
+char *BKE_scene_find_marker_name(Scene *scene, int frame)
{
- ListBase *markers= &scene->markers;
+ ListBase *markers = &scene->markers;
TimeMarker *m1, *m2;
/* search through markers for match */
- for (m1=markers->first, m2=markers->last; m1 && m2; m1=m1->next, m2=m2->prev) {
- if (m1->frame==frame)
+ for (m1 = markers->first, m2 = markers->last; m1 && m2; m1 = m1->next, m2 = m2->prev) {
+ if (m1->frame == frame)
return m1->name;
if (m1 == m2)
break;
- if (m2->frame==frame)
+ if (m2->frame == frame)
return m2->name;
}
@@ -845,16 +845,16 @@ char *scene_find_marker_name(Scene *scene, int frame)
/* return the current marker for this frame,
* we can have more then 1 marker per frame, this just returns the first :/ */
-char *scene_find_last_marker_name(Scene *scene, int frame)
+char *BKE_scene_find_last_marker_name(Scene *scene, int frame)
{
TimeMarker *marker, *best_marker = NULL;
- int best_frame = -MAXFRAME*2;
- for (marker= scene->markers.first; marker; marker= marker->next) {
- if (marker->frame==frame) {
+ int best_frame = -MAXFRAME * 2;
+ for (marker = scene->markers.first; marker; marker = marker->next) {
+ if (marker->frame == frame) {
return marker->name;
}
- if ( marker->frame > best_frame && marker->frame < frame) {
+ if (marker->frame > best_frame && marker->frame < frame) {
best_marker = marker;
best_frame = marker->frame;
}
@@ -864,55 +864,53 @@ char *scene_find_last_marker_name(Scene *scene, int frame)
}
-Base *scene_add_base(Scene *sce, Object *ob)
+Base *BKE_scene_base_add(Scene *sce, Object *ob)
{
- Base *b= MEM_callocN(sizeof(*b), "scene_add_base");
+ Base *b = MEM_callocN(sizeof(*b), "BKE_scene_base_add");
BLI_addhead(&sce->base, b);
- b->object= ob;
- b->flag= ob->flag;
- b->lay= ob->lay;
+ b->object = ob;
+ b->flag = ob->flag;
+ b->lay = ob->lay;
return b;
}
-void scene_deselect_all(Scene *sce)
+void BKE_scene_base_deselect_all(Scene *sce)
{
Base *b;
- for (b= sce->base.first; b; b= b->next) {
- b->flag&= ~SELECT;
- b->object->flag= b->flag;
+ for (b = sce->base.first; b; b = b->next) {
+ b->flag &= ~SELECT;
+ b->object->flag = b->flag;
}
}
-void scene_select_base(Scene *sce, Base *selbase)
+void BKE_scene_base_select(Scene *sce, Base *selbase)
{
- scene_deselect_all(sce);
-
selbase->flag |= SELECT;
- selbase->object->flag= selbase->flag;
+ selbase->object->flag = selbase->flag;
- sce->basact= selbase;
+ sce->basact = selbase;
}
/* checks for cycle, returns 1 if it's all OK */
-int scene_check_setscene(Main *bmain, Scene *sce)
+int BKE_scene_validate_setscene(Main *bmain, Scene *sce)
{
Scene *scene;
int a, totscene;
- if (sce->set==NULL) return 1;
+ if (sce->set == NULL) return 1;
- totscene= 0;
- for (scene= bmain->scene.first; scene; scene= scene->id.next)
+ totscene = 0;
+ for (scene = bmain->scene.first; scene; scene = scene->id.next)
totscene++;
- for (a=0, scene=sce; scene->set; scene=scene->set, a++) {
+ for (a = 0, scene = sce; scene->set; scene = scene->set, a++) {
/* more iterations than scenes means we have a cycle */
if (a > totscene) {
/* the tested scene gets zero'ed, that's typically current scene */
- sce->set= NULL;
+ sce->set = NULL;
return 0;
}
}
@@ -923,13 +921,13 @@ int scene_check_setscene(Main *bmain, Scene *sce)
/* This function is needed to cope with fractional frames - including two Blender rendering features
* mblur (motion blur that renders 'subframes' and blurs them together), and fields rendering.
*/
-float BKE_curframe(Scene *scene)
+float BKE_scene_frame_get(Scene *scene)
{
- return BKE_frame_to_ctime(scene, scene->r.cfra);
+ return BKE_scene_frame_get_from_ctime(scene, scene->r.cfra);
}
/* This function is used to obtain arbitrary fractional frames */
-float BKE_frame_to_ctime(Scene *scene, const float frame)
+float BKE_scene_frame_get_from_ctime(Scene *scene, const float frame)
{
float ctime = frame;
ctime += scene->r.subframe;
@@ -939,14 +937,14 @@ float BKE_frame_to_ctime(Scene *scene, const float frame)
}
/* drivers support/hacks
- * - this method is called from scene_update_tagged_recursive(), so gets included in viewport + render
+ * - this method is called from scene_update_tagged_recursive(), so gets included in viewport + render
* - these are always run since the depsgraph can't handle non-object data
* - these happen after objects are all done so that we can read in their final transform values,
* though this means that objects can't refer to scene info for guidance...
*/
static void scene_update_drivers(Main *UNUSED(bmain), Scene *scene)
{
- float ctime = BKE_curframe(scene);
+ float ctime = BKE_scene_frame_get(scene);
/* scene itself */
if (scene->adt && scene->adt->drivers.first) {
@@ -957,7 +955,7 @@ static void scene_update_drivers(Main *UNUSED(bmain), Scene *scene)
// TODO: what about world textures? but then those have nodes too...
if (scene->world) {
ID *wid = (ID *)scene->world;
- AnimData *adt= BKE_animdata_from_id(wid);
+ AnimData *adt = BKE_animdata_from_id(wid);
if (adt && adt->drivers.first)
BKE_animsys_evaluate_animdata(scene, wid, adt, ctime, ADT_RECALC_DRIVERS);
@@ -966,7 +964,7 @@ static void scene_update_drivers(Main *UNUSED(bmain), Scene *scene)
/* nodes */
if (scene->nodetree) {
ID *nid = (ID *)scene->nodetree;
- AnimData *adt= BKE_animdata_from_id(nid);
+ AnimData *adt = BKE_animdata_from_id(nid);
if (adt && adt->drivers.first)
BKE_animsys_evaluate_animdata(scene, nid, adt, ctime, ADT_RECALC_DRIVERS);
@@ -978,7 +976,7 @@ static void scene_update_tagged_recursive(Main *bmain, Scene *scene, Scene *scen
Base *base;
- scene->customdata_mask= scene_parent->customdata_mask;
+ scene->customdata_mask = scene_parent->customdata_mask;
/* sets first, we allow per definition current scene to have
* dependencies on sets, but not the other way around. */
@@ -986,16 +984,16 @@ static void scene_update_tagged_recursive(Main *bmain, Scene *scene, Scene *scen
scene_update_tagged_recursive(bmain, scene->set, scene_parent);
/* scene objects */
- for (base= scene->base.first; base; base= base->next) {
- Object *ob= base->object;
+ for (base = scene->base.first; base; base = base->next) {
+ Object *ob = base->object;
- object_handle_update(scene_parent, ob);
+ BKE_object_handle_update(scene_parent, ob);
if (ob->dup_group && (ob->transflag & OB_DUPLIGROUP))
group_handle_recalc_and_update(scene_parent, ob, ob->dup_group);
/* always update layer, so that animating layers works */
- base->lay= ob->lay;
+ base->lay = ob->lay;
}
/* scene drivers... */
@@ -1006,15 +1004,15 @@ static void scene_update_tagged_recursive(Main *bmain, Scene *scene, Scene *scen
}
/* this is called in main loop, doing tagged updates before redraw */
-void scene_update_tagged(Main *bmain, Scene *scene)
+void BKE_scene_update_tagged(Main *bmain, Scene *scene)
{
/* keep this first */
- BLI_exec_cb(bmain, &scene->id, BLI_CB_EVT_SCENE_UPDATE_PRE);
+ BLI_callback_exec(bmain, &scene->id, BLI_CB_EVT_SCENE_UPDATE_PRE);
/* flush recalc flags to dependencies */
DAG_ids_flush_tagged(bmain);
- scene->physics_settings.quick_cache_step= 0;
+ scene->physics_settings.quick_cache_step = 0;
/* update all objects: drivers, matrices, displists, etc. flags set
* by depgraph or manual, no layer check here, gets correct flushed
@@ -1025,8 +1023,8 @@ void scene_update_tagged(Main *bmain, Scene *scene)
/* extra call here to recalc scene animation (for sequencer) */
{
- AnimData *adt= BKE_animdata_from_id(&scene->id);
- float ctime = BKE_curframe(scene);
+ AnimData *adt = BKE_animdata_from_id(&scene->id);
+ float ctime = BKE_scene_frame_get(scene);
if (adt && (adt->recalc & ADT_RECALC_ANIM))
BKE_animsys_evaluate_animdata(scene, &scene->id, adt, ctime, 0);
@@ -1037,7 +1035,7 @@ void scene_update_tagged(Main *bmain, Scene *scene)
BKE_ptcache_quick_cache_all(bmain, scene);
/* notify editors and python about recalc */
- BLI_exec_cb(bmain, &scene->id, BLI_CB_EVT_SCENE_UPDATE_POST);
+ BLI_callback_exec(bmain, &scene->id, BLI_CB_EVT_SCENE_UPDATE_POST);
DAG_ids_check_recalc(bmain, scene, FALSE);
/* clear recalc flags */
@@ -1045,28 +1043,28 @@ void scene_update_tagged(Main *bmain, Scene *scene)
}
/* applies changes right away, does all sets too */
-void scene_update_for_newframe(Main *bmain, Scene *sce, unsigned int lay)
+void BKE_scene_update_for_newframe(Main *bmain, Scene *sce, unsigned int lay)
{
- float ctime = BKE_curframe(sce);
+ float ctime = BKE_scene_frame_get(sce);
Scene *sce_iter;
/* keep this first */
- BLI_exec_cb(bmain, &sce->id, BLI_CB_EVT_FRAME_CHANGE_PRE);
- BLI_exec_cb(bmain, &sce->id, BLI_CB_EVT_SCENE_UPDATE_PRE);
+ BLI_callback_exec(bmain, &sce->id, BLI_CB_EVT_FRAME_CHANGE_PRE);
+ BLI_callback_exec(bmain, &sce->id, BLI_CB_EVT_SCENE_UPDATE_PRE);
sound_set_cfra(sce->r.cfra);
/* clear animation overrides */
// XXX TODO...
- for (sce_iter= sce; sce_iter; sce_iter= sce_iter->set) {
- if (sce_iter->theDag==NULL)
+ for (sce_iter = sce; sce_iter; sce_iter = sce_iter->set) {
+ if (sce_iter->theDag == NULL)
DAG_scene_sort(bmain, sce_iter);
}
/* flush recalc flags to dependencies, if we were only changing a frame
* this would not be necessary, but if a user or a script has modified
- * some datablock before scene_update_tagged was called, we need the flush */
+ * some datablock before BKE_scene_update_tagged was called, we need the flush */
DAG_ids_flush_tagged(bmain);
/* Following 2 functions are recursive
@@ -1082,12 +1080,12 @@ void scene_update_for_newframe(Main *bmain, Scene *sce, unsigned int lay)
BKE_animsys_evaluate_all_animation(bmain, sce, ctime);
/*...done with recusrive funcs */
- /* object_handle_update() on all objects, groups and sets */
+ /* BKE_object_handle_update() on all objects, groups and sets */
scene_update_tagged_recursive(bmain, sce, sce);
/* notify editors and python about recalc */
- BLI_exec_cb(bmain, &sce->id, BLI_CB_EVT_SCENE_UPDATE_POST);
- BLI_exec_cb(bmain, &sce->id, BLI_CB_EVT_FRAME_CHANGE_POST);
+ BLI_callback_exec(bmain, &sce->id, BLI_CB_EVT_SCENE_UPDATE_POST);
+ BLI_callback_exec(bmain, &sce->id, BLI_CB_EVT_FRAME_CHANGE_POST);
DAG_ids_check_recalc(bmain, sce, TRUE);
@@ -1096,29 +1094,29 @@ void scene_update_for_newframe(Main *bmain, Scene *sce, unsigned int lay)
}
/* return default layer, also used to patch old files */
-SceneRenderLayer *scene_add_render_layer(Scene *sce, const char *name)
+SceneRenderLayer *BKE_scene_add_render_layer(Scene *sce, const char *name)
{
SceneRenderLayer *srl;
if (!name)
- name= "RenderLayer";
+ name = "RenderLayer";
- srl= MEM_callocN(sizeof(SceneRenderLayer), "new render layer");
+ srl = MEM_callocN(sizeof(SceneRenderLayer), "new render layer");
BLI_strncpy(srl->name, name, sizeof(srl->name));
BLI_uniquename(&sce->r.layers, srl, "RenderLayer", '.', offsetof(SceneRenderLayer, name), sizeof(srl->name));
BLI_addtail(&sce->r.layers, srl);
/* note, this is also in render, pipeline.c, to make layer when scenedata doesnt have it */
- srl->lay= (1<<20) -1;
- srl->layflag= 0x7FFF; /* solid ztra halo edge strand */
- srl->passflag= SCE_PASS_COMBINED|SCE_PASS_Z;
+ srl->lay = (1 << 20) - 1;
+ srl->layflag = 0x7FFF; /* solid ztra halo edge strand */
+ srl->passflag = SCE_PASS_COMBINED | SCE_PASS_Z;
return srl;
}
-int scene_remove_render_layer(Main *bmain, Scene *scene, SceneRenderLayer *srl)
+int BKE_scene_remove_render_layer(Main *bmain, Scene *scene, SceneRenderLayer *srl)
{
- const int act= BLI_findindex(&scene->r.layers, srl);
+ const int act = BLI_findindex(&scene->r.layers, srl);
Scene *sce;
if (act == -1) {
@@ -1134,16 +1132,16 @@ int scene_remove_render_layer(Main *bmain, Scene *scene, SceneRenderLayer *srl)
BLI_remlink(&scene->r.layers, srl);
MEM_freeN(srl);
- scene->r.actlay= 0;
+ scene->r.actlay = 0;
for (sce = bmain->scene.first; sce; sce = sce->id.next) {
if (sce->nodetree) {
bNode *node;
for (node = sce->nodetree->nodes.first; node; node = node->next) {
- if (node->type==CMP_NODE_R_LAYERS && (Scene*)node->id==scene) {
- if (node->custom1==act)
- node->custom1= 0;
- else if (node->custom1>act)
+ if (node->type == CMP_NODE_R_LAYERS && (Scene *)node->id == scene) {
+ if (node->custom1 == act)
+ node->custom1 = 0;
+ else if (node->custom1 > act)
node->custom1--;
}
}
@@ -1166,7 +1164,7 @@ int get_render_subsurf_level(RenderData *r, int lvl)
int get_render_child_particle_number(RenderData *r, int num)
{
if (r->mode & R_SIMPLIFY)
- return (int)(r->simplify_particles*num);
+ return (int)(r->simplify_particles * num);
else
return num;
}
@@ -1182,7 +1180,7 @@ int get_render_shadow_samples(RenderData *r, int samples)
float get_render_aosss_error(RenderData *r, float error)
{
if (r->mode & R_SIMPLIFY)
- return ((1.0f-r->simplify_aosss)*10.0f + 1.0f)*error;
+ return ((1.0f - r->simplify_aosss) * 10.0f + 1.0f) * error;
else
return error;
}
@@ -1194,14 +1192,14 @@ Base *_setlooper_base_step(Scene **sce_iter, Base *base)
/* common case, step to the next */
return base->next;
}
- else if (base==NULL && (*sce_iter)->base.first) {
+ else if (base == NULL && (*sce_iter)->base.first) {
/* first time looping, return the scenes first base */
return (Base *)(*sce_iter)->base.first;
}
else {
/* reached the end, get the next base in the set */
- while ((*sce_iter= (*sce_iter)->set)) {
- base= (Base *)(*sce_iter)->base.first;
+ while ((*sce_iter = (*sce_iter)->set)) {
+ base = (Base *)(*sce_iter)->base.first;
if (base) {
return base;
}
@@ -1211,9 +1209,28 @@ Base *_setlooper_base_step(Scene **sce_iter, Base *base)
return NULL;
}
-int scene_use_new_shading_nodes(Scene *scene)
+int BKE_scene_use_new_shading_nodes(Scene *scene)
{
- RenderEngineType *type= RE_engines_find(scene->r.engine);
+ RenderEngineType *type = RE_engines_find(scene->r.engine);
return (type && type->flag & RE_USE_SHADING_NODES);
}
+void BKE_scene_base_flag_to_objects(struct Scene *scene)
+{
+ Base *base = scene->base.first;
+
+ while (base) {
+ base->object->flag = base->flag;
+ base = base->next;
+ }
+}
+
+void BKE_scene_base_flag_from_objects(struct Scene *scene)
+{
+ Base *base = scene->base.first;
+
+ while (base) {
+ base->flag = base->object->flag;
+ base = base->next;
+ }
+}
diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c
index af0c5eae9a8..1f129b1c547 100644
--- a/source/blender/blenkernel/intern/screen.c
+++ b/source/blender/blenkernel/intern/screen.c
@@ -1,5 +1,4 @@
-/*
- *
+/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -52,7 +51,7 @@
/* ************ Spacetype/regiontype handling ************** */
/* keep global; this has to be accessible outside of windowmanager */
-static ListBase spacetypes= {NULL, NULL};
+static ListBase spacetypes = {NULL, NULL};
/* not SpaceType itself */
static void spacetype_free(SpaceType *st)
@@ -61,14 +60,14 @@ static void spacetype_free(SpaceType *st)
PanelType *pt;
HeaderType *ht;
- for (art= st->regiontypes.first; art; art= art->next) {
+ for (art = st->regiontypes.first; art; art = art->next) {
BLI_freelistN(&art->drawcalls);
- for (pt= art->paneltypes.first; pt; pt= pt->next)
+ for (pt = art->paneltypes.first; pt; pt = pt->next)
if (pt->ext.free)
pt->ext.free(pt->ext.data);
- for (ht= art->headertypes.first; ht; ht= ht->next)
+ for (ht = art->headertypes.first; ht; ht = ht->next)
if (ht->ext.free)
ht->ext.free(ht->ext.data);
@@ -85,7 +84,7 @@ void BKE_spacetypes_free(void)
{
SpaceType *st;
- for (st= spacetypes.first; st; st= st->next) {
+ for (st = spacetypes.first; st; st = st->next) {
spacetype_free(st);
}
@@ -96,8 +95,8 @@ SpaceType *BKE_spacetype_from_id(int spaceid)
{
SpaceType *st;
- for (st= spacetypes.first; st; st= st->next) {
- if (st->spaceid==spaceid)
+ for (st = spacetypes.first; st; st = st->next) {
+ if (st->spaceid == spaceid)
return st;
}
return NULL;
@@ -107,8 +106,8 @@ ARegionType *BKE_regiontype_from_id(SpaceType *st, int regionid)
{
ARegionType *art;
- for (art= st->regiontypes.first; art; art= art->next)
- if (art->regionid==regionid)
+ for (art = st->regiontypes.first; art; art = art->next)
+ if (art->regionid == regionid)
return art;
printf("Error, region type missing in - name:\"%s\", id:%d\n", st->name, st->spaceid);
@@ -126,7 +125,7 @@ void BKE_spacetype_register(SpaceType *st)
SpaceType *stype;
/* sanity check */
- stype= BKE_spacetype_from_id(st->spaceid);
+ stype = BKE_spacetype_from_id(st->spaceid);
if (stype) {
printf("error: redefinition of spacetype %s\n", stype->name);
spacetype_free(stype);
@@ -143,11 +142,11 @@ void BKE_spacedata_freelist(ListBase *lb)
SpaceLink *sl;
ARegion *ar;
- for (sl= lb->first; sl; sl= sl->next) {
- SpaceType *st= BKE_spacetype_from_id(sl->spacetype);
+ for (sl = lb->first; sl; sl = sl->next) {
+ SpaceType *st = BKE_spacetype_from_id(sl->spacetype);
/* free regions for pushed spaces */
- for (ar=sl->regionbase.first; ar; ar=ar->next)
+ for (ar = sl->regionbase.first; ar; ar = ar->next)
BKE_area_region_free(st, ar);
BLI_freelistN(&sl->regionbase);
@@ -161,41 +160,41 @@ void BKE_spacedata_freelist(ListBase *lb)
ARegion *BKE_area_region_copy(SpaceType *st, ARegion *ar)
{
- ARegion *newar= MEM_dupallocN(ar);
+ ARegion *newar = MEM_dupallocN(ar);
Panel *pa, *newpa, *patab;
- newar->prev= newar->next= NULL;
- newar->handlers.first= newar->handlers.last= NULL;
- newar->uiblocks.first= newar->uiblocks.last= NULL;
- newar->swinid= 0;
+ newar->prev = newar->next = NULL;
+ newar->handlers.first = newar->handlers.last = NULL;
+ newar->uiblocks.first = newar->uiblocks.last = NULL;
+ newar->swinid = 0;
/* use optional regiondata callback */
if (ar->regiondata) {
- ARegionType *art= BKE_regiontype_from_id(st, ar->regiontype);
+ ARegionType *art = BKE_regiontype_from_id(st, ar->regiontype);
if (art && art->duplicate)
- newar->regiondata= art->duplicate(ar->regiondata);
+ newar->regiondata = art->duplicate(ar->regiondata);
else
- newar->regiondata= MEM_dupallocN(ar->regiondata);
+ newar->regiondata = MEM_dupallocN(ar->regiondata);
}
if (ar->v2d.tab_offset)
- newar->v2d.tab_offset= MEM_dupallocN(ar->v2d.tab_offset);
+ newar->v2d.tab_offset = MEM_dupallocN(ar->v2d.tab_offset);
- newar->panels.first= newar->panels.last= NULL;
+ newar->panels.first = newar->panels.last = NULL;
BLI_duplicatelist(&newar->panels, &ar->panels);
/* copy panel pointers */
- for (newpa= newar->panels.first; newpa; newpa= newpa->next) {
- patab= newar->panels.first;
- pa= ar->panels.first;
+ for (newpa = newar->panels.first; newpa; newpa = newpa->next) {
+ patab = newar->panels.first;
+ pa = ar->panels.first;
while (patab) {
if (newpa->paneltab == pa) {
newpa->paneltab = patab;
break;
}
- patab= patab->next;
- pa= pa->next;
+ patab = patab->next;
+ pa = pa->next;
}
}
@@ -209,10 +208,10 @@ static void region_copylist(SpaceType *st, ListBase *lb1, ListBase *lb2)
ARegion *ar;
/* to be sure */
- lb1->first= lb1->last= NULL;
+ lb1->first = lb1->last = NULL;
- for (ar= lb2->first; ar; ar= ar->next) {
- ARegion *arnew= BKE_area_region_copy(st, ar);
+ for (ar = lb2->first; ar; ar = ar->next) {
+ ARegion *arnew = BKE_area_region_copy(st, ar);
BLI_addtail(lb1, arnew);
}
}
@@ -223,13 +222,13 @@ void BKE_spacedata_copylist(ListBase *lb1, ListBase *lb2)
{
SpaceLink *sl;
- lb1->first= lb1->last= NULL; /* to be sure */
+ lb1->first = lb1->last = NULL; /* to be sure */
- for (sl= lb2->first; sl; sl= sl->next) {
- SpaceType *st= BKE_spacetype_from_id(sl->spacetype);
+ for (sl = lb2->first; sl; sl = sl->next) {
+ SpaceType *st = BKE_spacetype_from_id(sl->spacetype);
if (st && st->duplicate) {
- SpaceLink *slnew= st->duplicate(sl);
+ SpaceLink *slnew = st->duplicate(sl);
BLI_addtail(lb1, slnew);
@@ -245,14 +244,14 @@ void BKE_spacedata_draw_locks(int set)
{
SpaceType *st;
- for (st= spacetypes.first; st; st= st->next) {
+ for (st = spacetypes.first; st; st = st->next) {
ARegionType *art;
- for (art= st->regiontypes.first; art; art= art->next) {
+ for (art = st->regiontypes.first; art; art = art->next) {
if (set)
- art->do_lock= art->lock;
+ art->do_lock = art->lock;
else
- art->do_lock= 0;
+ art->do_lock = 0;
}
}
}
@@ -262,7 +261,7 @@ void BKE_spacedata_draw_locks(int set)
void BKE_area_region_free(SpaceType *st, ARegion *ar)
{
if (st) {
- ARegionType *art= BKE_regiontype_from_id(st, ar->regiontype);
+ ARegionType *art = BKE_regiontype_from_id(st, ar->regiontype);
if (art && art->free)
art->free(ar);
@@ -275,7 +274,7 @@ void BKE_area_region_free(SpaceType *st, ARegion *ar)
if (ar->v2d.tab_offset) {
MEM_freeN(ar->v2d.tab_offset);
- ar->v2d.tab_offset= NULL;
+ ar->v2d.tab_offset = NULL;
}
BLI_freelistN(&ar->panels);
@@ -284,10 +283,10 @@ void BKE_area_region_free(SpaceType *st, ARegion *ar)
/* not area itself */
void BKE_screen_area_free(ScrArea *sa)
{
- SpaceType *st= BKE_spacetype_from_id(sa->spacetype);
+ SpaceType *st = BKE_spacetype_from_id(sa->spacetype);
ARegion *ar;
- for (ar=sa->regionbase.first; ar; ar=ar->next)
+ for (ar = sa->regionbase.first; ar; ar = ar->next)
BKE_area_region_free(st, ar);
BLI_freelistN(&sa->regionbase);
@@ -298,18 +297,18 @@ void BKE_screen_area_free(ScrArea *sa)
}
/* don't free screen itself */
-void free_screen(bScreen *sc)
+void BKE_screen_free(bScreen *sc)
{
ScrArea *sa, *san;
ARegion *ar;
- for (ar=sc->regionbase.first; ar; ar=ar->next)
+ for (ar = sc->regionbase.first; ar; ar = ar->next)
BKE_area_region_free(NULL, ar);
BLI_freelistN(&sc->regionbase);
- for (sa= sc->areabase.first; sa; sa= san) {
- san= sa->next;
+ for (sa = sc->areabase.first; sa; sa = san) {
+ san = sa->next;
BKE_screen_area_free(sa);
}
@@ -322,12 +321,12 @@ void free_screen(bScreen *sc)
unsigned int BKE_screen_visible_layers(bScreen *screen, Scene *scene)
{
ScrArea *sa;
- unsigned int layer= 0;
+ unsigned int layer = 0;
if (screen) {
/* get all used view3d layers */
- for (sa= screen->areabase.first; sa; sa= sa->next)
- if (sa->spacetype==SPACE_VIEW3D)
+ for (sa = screen->areabase.first; sa; sa = sa->next)
+ if (sa->spacetype == SPACE_VIEW3D)
layer |= ((View3D *)sa->spacedata.first)->lay;
}
@@ -345,7 +344,7 @@ ARegion *BKE_area_find_region_type(ScrArea *sa, int type)
if (sa) {
ARegion *ar;
- for (ar=sa->regionbase.first; ar; ar= ar->next) {
+ for (ar = sa->regionbase.first; ar; ar = ar->next) {
if (ar->regiontype == type)
return ar;
}
@@ -358,16 +357,16 @@ ARegion *BKE_area_find_region_type(ScrArea *sa, int type)
* -1 for any type */
struct ScrArea *BKE_screen_find_big_area(struct bScreen *sc, const int spacetype, const short min)
{
- ScrArea *sa, *big= NULL;
- int size, maxsize= 0;
+ ScrArea *sa, *big = NULL;
+ int size, maxsize = 0;
- for (sa= sc->areabase.first; sa; sa= sa->next) {
+ for (sa = sc->areabase.first; sa; sa = sa->next) {
if ((spacetype == -1) || sa->spacetype == spacetype) {
if (min <= sa->winx && min <= sa->winy) {
- size= sa->winx*sa->winy;
+ size = sa->winx * sa->winy;
if (size > maxsize) {
- maxsize= size;
- big= sa;
+ maxsize = size;
+ big = sa;
}
}
}
@@ -380,26 +379,26 @@ void BKE_screen_view3d_sync(struct View3D *v3d, struct Scene *scene)
{
int bit;
- if (v3d->scenelock && v3d->localvd==NULL) {
- v3d->lay= scene->lay;
- v3d->camera= scene->camera;
+ if (v3d->scenelock && v3d->localvd == NULL) {
+ v3d->lay = scene->lay;
+ v3d->camera = scene->camera;
- if (v3d->camera==NULL) {
+ if (v3d->camera == NULL) {
ARegion *ar;
- for (ar=v3d->regionbase.first; ar; ar= ar->next) {
+ for (ar = v3d->regionbase.first; ar; ar = ar->next) {
if (ar->regiontype == RGN_TYPE_WINDOW) {
- RegionView3D *rv3d= ar->regiondata;
- if (rv3d->persp==RV3D_CAMOB)
- rv3d->persp= RV3D_PERSP;
+ RegionView3D *rv3d = ar->regiondata;
+ if (rv3d->persp == RV3D_CAMOB)
+ rv3d->persp = RV3D_PERSP;
}
}
}
if ((v3d->lay & v3d->layact) == 0) {
- for (bit= 0; bit<32; bit++) {
- if (v3d->lay & (1<<bit)) {
- v3d->layact= 1<<bit;
+ for (bit = 0; bit < 32; bit++) {
+ if (v3d->lay & (1 << bit)) {
+ v3d->layact = 1 << bit;
break;
}
}
@@ -411,11 +410,11 @@ void BKE_screen_view3d_scene_sync(bScreen *sc)
{
/* are there cameras in the views that are not in the scene? */
ScrArea *sa;
- for (sa= sc->areabase.first; sa; sa= sa->next) {
+ for (sa = sc->areabase.first; sa; sa = sa->next) {
SpaceLink *sl;
- for (sl= sa->spacedata.first; sl; sl= sl->next) {
- if (sl->spacetype==SPACE_VIEW3D) {
- View3D *v3d= (View3D*) sl;
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_VIEW3D) {
+ View3D *v3d = (View3D *) sl;
BKE_screen_view3d_sync(v3d, sc->scene);
}
}
@@ -429,14 +428,14 @@ void BKE_screen_view3d_main_sync(ListBase *screen_lb, Scene *scene)
SpaceLink *sl;
/* from scene copy to the other views */
- for (sc=screen_lb->first; sc; sc=sc->id.next) {
- if (sc->scene!=scene)
+ for (sc = screen_lb->first; sc; sc = sc->id.next) {
+ if (sc->scene != scene)
continue;
- for (sa=sc->areabase.first; sa; sa=sa->next)
- for (sl=sa->spacedata.first; sl; sl=sl->next)
- if (sl->spacetype==SPACE_VIEW3D)
- BKE_screen_view3d_sync((View3D*)sl, scene);
+ for (sa = sc->areabase.first; sa; sa = sa->next)
+ for (sl = sa->spacedata.first; sl; sl = sl->next)
+ if (sl->spacetype == SPACE_VIEW3D)
+ BKE_screen_view3d_sync((View3D *)sl, scene);
}
}
@@ -450,7 +449,7 @@ void BKE_screen_view3d_main_sync(ListBase *screen_lb, Scene *scene)
*/
float BKE_screen_view3d_zoom_to_fac(float camzoom)
{
- return powf(((float)M_SQRT2 + camzoom/50.0f), 2.0f) / 4.0f;
+ return powf(((float)M_SQRT2 + camzoom / 50.0f), 2.0f) / 4.0f;
}
float BKE_screen_view3d_zoom_from_fac(float zoomfac)
diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c
index 8015e53e4c9..9358b786472 100644
--- a/source/blender/blenkernel/intern/seqeffects.c
+++ b/source/blender/blenkernel/intern/seqeffects.c
@@ -58,27 +58,27 @@
#include "RNA_access.h"
/* **** XXX **** */
-static void error(const char *UNUSED(error), ...) {}
+static void error(const char *UNUSED(error), ...) {
+}
-#define INT 96
-#define FLO 128
+#define INT 96
+#define FLO 128
/* **** XXX **** */
/* Glow effect */
enum {
- GlowR=0,
- GlowG=1,
- GlowB=2,
- GlowA=3
+ GlowR = 0,
+ GlowG = 1,
+ GlowB = 2,
+ GlowA = 3
};
-static struct ImBuf * prepare_effect_imbufs(
- SeqRenderData context,
- struct ImBuf *ibuf1, struct ImBuf *ibuf2,
- struct ImBuf *ibuf3)
-{
- struct ImBuf * out;
+static struct ImBuf *prepare_effect_imbufs(
+ SeqRenderData context,
+ struct ImBuf *ibuf1, struct ImBuf *ibuf2,
+ struct ImBuf *ibuf3){
+ struct ImBuf *out;
int x = context.rectx;
int y = context.recty;
@@ -87,8 +87,9 @@ static struct ImBuf * prepare_effect_imbufs(
out = IMB_allocImBuf((short)x, (short)y, 32, IB_rect);
}
else if ((ibuf1 && ibuf1->rect_float) ||
- (ibuf2 && ibuf2->rect_float) ||
- (ibuf3 && ibuf3->rect_float)) {
+ (ibuf2 && ibuf2->rect_float) ||
+ (ibuf3 && ibuf3->rect_float))
+ {
/* if any inputs are rectfloat, output is float too */
out = IMB_allocImBuf((short)x, (short)y, 32, IB_rectfloat);
@@ -127,15 +128,15 @@ static struct ImBuf * prepare_effect_imbufs(
static void open_plugin_seq(PluginSeq *pis, const char *seqname)
{
int (*version)(void);
- void* (*alloc_private)(void);
+ void * (*alloc_private)(void);
char *cp;
/* to be sure: (is tested for) */
- pis->doit= NULL;
- pis->pname= NULL;
- pis->varstr= NULL;
- pis->cfra= NULL;
- pis->version= 0;
+ pis->doit = NULL;
+ pis->pname = NULL;
+ pis->varstr = NULL;
+ pis->cfra = NULL;
+ pis->version = 0;
pis->instance_private_data = NULL;
/* clear the error list */
@@ -145,55 +146,54 @@ static void open_plugin_seq(PluginSeq *pis, const char *seqname)
/* pis->handle= 0; */
/* open the needed object */
- pis->handle= BLI_dynlib_open(pis->name);
+ pis->handle = BLI_dynlib_open(pis->name);
if (test_dlerr(pis->name, pis->name)) return;
if (pis->handle != NULL) {
/* find the address of the version function */
- version= (int (*)(void))BLI_dynlib_find_symbol(pis->handle, "plugin_seq_getversion");
+ version = (int (*)(void))BLI_dynlib_find_symbol(pis->handle, "plugin_seq_getversion");
if (test_dlerr(pis->name, "plugin_seq_getversion")) return;
if (version != NULL) {
- pis->version= version();
+ pis->version = version();
if (pis->version >= 2 && pis->version <= 6) {
int (*info_func)(PluginInfo *);
- PluginInfo *info= (PluginInfo*) MEM_mallocN(sizeof(PluginInfo), "plugin_info");
+ PluginInfo *info = (PluginInfo *) MEM_mallocN(sizeof(PluginInfo), "plugin_info");
- info_func= (int (*)(PluginInfo *))BLI_dynlib_find_symbol(pis->handle, "plugin_getinfo");
+ info_func = (int (*)(PluginInfo *))BLI_dynlib_find_symbol(pis->handle, "plugin_getinfo");
if (info_func == NULL) error("No info func");
else {
info_func(info);
- pis->pname= info->name;
- pis->vars= info->nvars;
- pis->cfra= info->cfra;
+ pis->pname = info->name;
+ pis->vars = info->nvars;
+ pis->cfra = info->cfra;
- pis->varstr= info->varstr;
+ pis->varstr = info->varstr;
- pis->doit= (void(*)(void))info->seq_doit;
+ pis->doit = (void (*)(void))info->seq_doit;
if (info->init)
info->init();
}
MEM_freeN(info);
- cp= BLI_dynlib_find_symbol(pis->handle, "seqname");
+ cp = BLI_dynlib_find_symbol(pis->handle, "seqname");
if (cp) BLI_strncpy(cp, seqname, SEQ_NAME_MAXSTR);
}
else {
- printf ("Plugin returned unrecognized version number\n");
+ printf("Plugin returned unrecognized version number\n");
return;
}
}
- alloc_private = (void* (*)(void))BLI_dynlib_find_symbol(
- pis->handle, "plugin_seq_alloc_private_data");
+ alloc_private = (void * (*)(void))BLI_dynlib_find_symbol(
+ pis->handle, "plugin_seq_alloc_private_data");
if (alloc_private) {
pis->instance_private_data = alloc_private();
}
- pis->current_private_data = (void**)
- BLI_dynlib_find_symbol(
- pis->handle, "plugin_private_data");
+ pis->current_private_data = (void **)
+ BLI_dynlib_find_symbol(pis->handle, "plugin_private_data");
}
}
@@ -203,25 +203,25 @@ static PluginSeq *add_plugin_seq(const char *str, const char *seqname)
VarStruct *varstr;
int a;
- pis= MEM_callocN(sizeof(PluginSeq), "PluginSeq");
+ pis = MEM_callocN(sizeof(PluginSeq), "PluginSeq");
BLI_strncpy(pis->name, str, FILE_MAX);
open_plugin_seq(pis, seqname);
- if (pis->doit==NULL) {
- if (pis->handle==NULL) error("no plugin: %s", str);
+ if (pis->doit == NULL) {
+ if (pis->handle == NULL) error("no plugin: %s", str);
else error("in plugin: %s", str);
MEM_freeN(pis);
return NULL;
}
/* default values */
- varstr= pis->varstr;
- for (a=0; a<pis->vars; a++, varstr++) {
- if ( (varstr->type & FLO)==FLO)
- pis->data[a]= varstr->def;
- else if ( (varstr->type & INT)==INT)
- *((int *)(pis->data+a))= (int) varstr->def;
+ varstr = pis->varstr;
+ for (a = 0; a < pis->vars; a++, varstr++) {
+ if ( (varstr->type & FLO) == FLO)
+ pis->data[a] = varstr->def;
+ else if ( (varstr->type & INT) == INT)
+ *((int *)(pis->data + a)) = (int) varstr->def;
}
return pis;
@@ -229,7 +229,7 @@ static PluginSeq *add_plugin_seq(const char *str, const char *seqname)
static void free_plugin_seq(PluginSeq *pis)
{
- if (pis==NULL) return;
+ if (pis == NULL) return;
/* no BLI_dynlib_close: same plugin can be opened multiple times with 1 handle */
@@ -237,7 +237,7 @@ static void free_plugin_seq(PluginSeq *pis)
void (*free_private)(void *);
free_private = (void (*)(void *))BLI_dynlib_find_symbol(
- pis->handle, "plugin_seq_free_private_data");
+ pis->handle, "plugin_seq_free_private_data");
if (free_private) {
free_private(pis->instance_private_data);
}
@@ -246,9 +246,9 @@ static void free_plugin_seq(PluginSeq *pis)
MEM_freeN(pis);
}
-static void init_plugin(Sequence * seq, const char * fname)
+static void init_plugin(Sequence *seq, const char *fname)
{
- seq->plugin= (PluginSeq *)add_plugin_seq(fname, seq->name+2);
+ seq->plugin = (PluginSeq *)add_plugin_seq(fname, seq->name + 2);
}
/*
@@ -259,34 +259,34 @@ static int num_inputs_plugin(void)
return 1;
}
-static void load_plugin(Sequence * seq)
+static void load_plugin(Sequence *seq)
{
if (seq) {
- open_plugin_seq(seq->plugin, seq->name+2);
+ open_plugin_seq(seq->plugin, seq->name + 2);
}
}
-static void copy_plugin(Sequence * dst, Sequence * src)
+static void copy_plugin(Sequence *dst, Sequence *src)
{
if (src->plugin) {
- dst->plugin= MEM_dupallocN(src->plugin);
- open_plugin_seq(dst->plugin, dst->name+2);
+ dst->plugin = MEM_dupallocN(src->plugin);
+ open_plugin_seq(dst->plugin, dst->name + 2);
}
}
-static ImBuf * IMB_cast_away_list(ImBuf * i)
+static ImBuf *IMB_cast_away_list(ImBuf *i)
{
if (!i) {
return NULL;
}
- return (ImBuf*) (((void**) i) + 2);
+ return (ImBuf *) (((void **) i) + 2);
}
-static struct ImBuf * do_plugin_effect(
- SeqRenderData context, Sequence *seq, float cfra,
- float facf0, float facf1,
- struct ImBuf *ibuf1, struct ImBuf *ibuf2,
- struct ImBuf *ibuf3)
+static struct ImBuf *do_plugin_effect(
+ SeqRenderData context, Sequence *seq, float cfra,
+ float facf0, float facf1,
+ struct ImBuf *ibuf1, struct ImBuf *ibuf2,
+ struct ImBuf *ibuf3)
{
char *cp;
int float_rendering;
@@ -294,31 +294,30 @@ static struct ImBuf * do_plugin_effect(
* old plugins) do very bad stuff
* with imbuf-internals */
- struct ImBuf * out = prepare_effect_imbufs(context,ibuf1, ibuf2, ibuf3);
+ struct ImBuf *out = prepare_effect_imbufs(context, ibuf1, ibuf2, ibuf3);
int x = context.rectx;
int y = context.recty;
if (seq->plugin && seq->plugin->doit) {
if (seq->plugin->cfra)
- *(seq->plugin->cfra)= cfra;
+ *(seq->plugin->cfra) = cfra;
cp = BLI_dynlib_find_symbol(
- seq->plugin->handle, "seqname");
+ seq->plugin->handle, "seqname");
/* XXX: it's crappy to limit copying buffer by it's lemgth,
* but assuming plugin stuff is using correct buffer size
* it should be fine */
- if (cp) strncpy(cp, seq->name+2, sizeof(seq->name)-2);
+ if (cp) strncpy(cp, seq->name + 2, sizeof(seq->name) - 2);
if (seq->plugin->current_private_data) {
- *seq->plugin->current_private_data
- = seq->plugin->instance_private_data;
+ *seq->plugin->current_private_data = seq->plugin->instance_private_data;
}
float_rendering = (out->rect_float != NULL);
- if (seq->plugin->version<=3 && float_rendering) {
+ if (seq->plugin->version <= 3 && float_rendering) {
use_temp_bufs = 1;
if (ibuf1) {
@@ -344,27 +343,27 @@ static struct ImBuf * do_plugin_effect(
out->flags &= ~IB_rectfloat;
}
- if (seq->plugin->version<=2) {
+ if (seq->plugin->version <= 2) {
if (ibuf1) IMB_convert_rgba_to_abgr(ibuf1);
if (ibuf2) IMB_convert_rgba_to_abgr(ibuf2);
if (ibuf3) IMB_convert_rgba_to_abgr(ibuf3);
}
- if (seq->plugin->version<=4) {
+ if (seq->plugin->version <= 4) {
((SeqDoit)seq->plugin->doit)(
- seq->plugin->data, facf0, facf1, x, y,
- IMB_cast_away_list(ibuf1),
- IMB_cast_away_list(ibuf2),
- IMB_cast_away_list(out),
- IMB_cast_away_list(ibuf3));
+ seq->plugin->data, facf0, facf1, x, y,
+ IMB_cast_away_list(ibuf1),
+ IMB_cast_away_list(ibuf2),
+ IMB_cast_away_list(out),
+ IMB_cast_away_list(ibuf3));
}
else {
((SeqDoit)seq->plugin->doit)(
- seq->plugin->data, facf0, facf1, x, y,
- ibuf1, ibuf2, out, ibuf3);
+ seq->plugin->data, facf0, facf1, x, y,
+ ibuf1, ibuf2, out, ibuf3);
}
- if (seq->plugin->version<=2) {
+ if (seq->plugin->version <= 2) {
if (!use_temp_bufs) {
if (ibuf1) IMB_convert_rgba_to_abgr(ibuf1);
if (ibuf2) IMB_convert_rgba_to_abgr(ibuf2);
@@ -372,7 +371,7 @@ static struct ImBuf * do_plugin_effect(
}
IMB_convert_rgba_to_abgr(out);
}
- if (seq->plugin->version<=3 && float_rendering) {
+ if (seq->plugin->version <= 3 && float_rendering) {
IMB_float_from_rect_simple(out);
}
@@ -386,12 +385,12 @@ static struct ImBuf * do_plugin_effect(
}
static int do_plugin_early_out(struct Sequence *UNUSED(seq),
- float UNUSED(facf0), float UNUSED(facf1))
+ float UNUSED(facf0), float UNUSED(facf1))
{
return 0;
}
-static void free_plugin(struct Sequence * seq)
+static void free_plugin(struct Sequence *seq)
{
free_plugin_seq(seq->plugin);
seq->plugin = NULL;
@@ -401,129 +400,129 @@ static void free_plugin(struct Sequence * seq)
* ALPHA OVER
* ********************************************************************** */
-static void init_alpha_over_or_under(Sequence * seq)
+static void init_alpha_over_or_under(Sequence *seq)
{
- Sequence * seq1 = seq->seq1;
- Sequence * seq2 = seq->seq2;
+ Sequence *seq1 = seq->seq1;
+ Sequence *seq2 = seq->seq2;
- seq->seq2= seq1;
- seq->seq1= seq2;
+ seq->seq2 = seq1;
+ seq->seq1 = seq2;
}
static void do_alphaover_effect_byte(float facf0, float facf1, int x, int y,
- char * rect1, char *rect2, char *out)
+ char *rect1, char *rect2, char *out)
{
int fac2, mfac, fac, fac4;
int xo, tempc;
char *rt1, *rt2, *rt;
- xo= x;
- rt1= (char *)rect1;
- rt2= (char *)rect2;
- rt= (char *)out;
+ xo = x;
+ rt1 = (char *)rect1;
+ rt2 = (char *)rect2;
+ rt = (char *)out;
- fac2= (int)(256.0f*facf0);
- fac4= (int)(256.0f*facf1);
+ fac2 = (int)(256.0f * facf0);
+ fac4 = (int)(256.0f * facf1);
while (y--) {
- x= xo;
+ x = xo;
while (x--) {
/* rt = rt1 over rt2 (alpha from rt1) */
- fac= fac2;
- mfac= 256 - ( (fac2*rt1[3])>>8 );
+ fac = fac2;
+ mfac = 256 - ( (fac2 * rt1[3]) >> 8);
- if (fac==0) *( (unsigned int *)rt) = *( (unsigned int *)rt2);
- else if (mfac==0) *( (unsigned int *)rt) = *( (unsigned int *)rt1);
+ if (fac == 0) *( (unsigned int *)rt) = *( (unsigned int *)rt2);
+ else if (mfac == 0) *( (unsigned int *)rt) = *( (unsigned int *)rt1);
else {
- tempc= ( fac*rt1[0] + mfac*rt2[0])>>8;
- if (tempc>255) rt[0]= 255; else rt[0]= tempc;
- tempc= ( fac*rt1[1] + mfac*rt2[1])>>8;
- if (tempc>255) rt[1]= 255; else rt[1]= tempc;
- tempc= ( fac*rt1[2] + mfac*rt2[2])>>8;
- if (tempc>255) rt[2]= 255; else rt[2]= tempc;
- tempc= ( fac*rt1[3] + mfac*rt2[3])>>8;
- if (tempc>255) rt[3]= 255; else rt[3]= tempc;
+ tempc = (fac * rt1[0] + mfac * rt2[0]) >> 8;
+ if (tempc > 255) rt[0] = 255; else rt[0] = tempc;
+ tempc = (fac * rt1[1] + mfac * rt2[1]) >> 8;
+ if (tempc > 255) rt[1] = 255; else rt[1] = tempc;
+ tempc = (fac * rt1[2] + mfac * rt2[2]) >> 8;
+ if (tempc > 255) rt[2] = 255; else rt[2] = tempc;
+ tempc = (fac * rt1[3] + mfac * rt2[3]) >> 8;
+ if (tempc > 255) rt[3] = 255; else rt[3] = tempc;
}
- rt1+= 4; rt2+= 4; rt+= 4;
+ rt1 += 4; rt2 += 4; rt += 4;
}
- if (y==0) break;
+ if (y == 0) break;
y--;
- x= xo;
+ x = xo;
while (x--) {
- fac= fac4;
- mfac= 256 - ( (fac4*rt1[3])>>8 );
+ fac = fac4;
+ mfac = 256 - ( (fac4 * rt1[3]) >> 8);
- if (fac==0) *( (unsigned int *)rt) = *( (unsigned int *)rt2);
- else if (mfac==0) *( (unsigned int *)rt) = *( (unsigned int *)rt1);
+ if (fac == 0) *( (unsigned int *)rt) = *( (unsigned int *)rt2);
+ else if (mfac == 0) *( (unsigned int *)rt) = *( (unsigned int *)rt1);
else {
- tempc= ( fac*rt1[0] + mfac*rt2[0])>>8;
- if (tempc>255) rt[0]= 255; else rt[0]= tempc;
- tempc= ( fac*rt1[1] + mfac*rt2[1])>>8;
- if (tempc>255) rt[1]= 255; else rt[1]= tempc;
- tempc= ( fac*rt1[2] + mfac*rt2[2])>>8;
- if (tempc>255) rt[2]= 255; else rt[2]= tempc;
- tempc= ( fac*rt1[3] + mfac*rt2[3])>>8;
- if (tempc>255) rt[3]= 255; else rt[3]= tempc;
+ tempc = (fac * rt1[0] + mfac * rt2[0]) >> 8;
+ if (tempc > 255) rt[0] = 255; else rt[0] = tempc;
+ tempc = (fac * rt1[1] + mfac * rt2[1]) >> 8;
+ if (tempc > 255) rt[1] = 255; else rt[1] = tempc;
+ tempc = (fac * rt1[2] + mfac * rt2[2]) >> 8;
+ if (tempc > 255) rt[2] = 255; else rt[2] = tempc;
+ tempc = (fac * rt1[3] + mfac * rt2[3]) >> 8;
+ if (tempc > 255) rt[3] = 255; else rt[3] = tempc;
}
- rt1+= 4; rt2+= 4; rt+= 4;
+ rt1 += 4; rt2 += 4; rt += 4;
}
}
}
static void do_alphaover_effect_float(float facf0, float facf1, int x, int y,
- float * rect1, float *rect2, float *out)
+ float *rect1, float *rect2, float *out)
{
float fac2, mfac, fac, fac4;
int xo;
float *rt1, *rt2, *rt;
- xo= x;
- rt1= rect1;
- rt2= rect2;
- rt= out;
+ xo = x;
+ rt1 = rect1;
+ rt2 = rect2;
+ rt = out;
- fac2= facf0;
- fac4= facf1;
+ fac2 = facf0;
+ fac4 = facf1;
while (y--) {
- x= xo;
+ x = xo;
while (x--) {
/* rt = rt1 over rt2 (alpha from rt1) */
- fac= fac2;
- mfac= 1.0f - (fac2 * rt1[3]);
+ fac = fac2;
+ mfac = 1.0f - (fac2 * rt1[3]);
if (fac <= 0.0f) {
memcpy(rt, rt2, 4 * sizeof(float));
}
- else if (mfac <=0) {
+ else if (mfac <= 0) {
memcpy(rt, rt1, 4 * sizeof(float));
}
else {
- rt[0] = fac*rt1[0] + mfac*rt2[0];
- rt[1] = fac*rt1[1] + mfac*rt2[1];
- rt[2] = fac*rt1[2] + mfac*rt2[2];
- rt[3] = fac*rt1[3] + mfac*rt2[3];
+ rt[0] = fac * rt1[0] + mfac * rt2[0];
+ rt[1] = fac * rt1[1] + mfac * rt2[1];
+ rt[2] = fac * rt1[2] + mfac * rt2[2];
+ rt[3] = fac * rt1[3] + mfac * rt2[3];
}
- rt1+= 4; rt2+= 4; rt+= 4;
+ rt1 += 4; rt2 += 4; rt += 4;
}
- if (y==0) break;
+ if (y == 0) break;
y--;
- x= xo;
+ x = xo;
while (x--) {
- fac= fac4;
- mfac= 1.0f - (fac4*rt1[3]);
+ fac = fac4;
+ mfac = 1.0f - (fac4 * rt1[3]);
if (fac <= 0.0f) {
memcpy(rt, rt2, 4 * sizeof(float));
@@ -532,35 +531,35 @@ static void do_alphaover_effect_float(float facf0, float facf1, int x, int y,
memcpy(rt, rt1, 4 * sizeof(float));
}
else {
- rt[0] = fac*rt1[0] + mfac*rt2[0];
- rt[1] = fac*rt1[1] + mfac*rt2[1];
- rt[2] = fac*rt1[2] + mfac*rt2[2];
- rt[3] = fac*rt1[3] + mfac*rt2[3];
+ rt[0] = fac * rt1[0] + mfac * rt2[0];
+ rt[1] = fac * rt1[1] + mfac * rt2[1];
+ rt[2] = fac * rt1[2] + mfac * rt2[2];
+ rt[3] = fac * rt1[3] + mfac * rt2[3];
}
- rt1+= 4; rt2+= 4; rt+= 4;
+ rt1 += 4; rt2 += 4; rt += 4;
}
}
}
-static struct ImBuf * do_alphaover_effect(
- SeqRenderData context, Sequence *UNUSED(seq), float UNUSED(cfra),
- float facf0, float facf1,
- struct ImBuf *ibuf1, struct ImBuf *ibuf2,
- struct ImBuf *ibuf3)
+static struct ImBuf *do_alphaover_effect(
+ SeqRenderData context, Sequence *UNUSED(seq), float UNUSED(cfra),
+ float facf0, float facf1,
+ struct ImBuf *ibuf1, struct ImBuf *ibuf2,
+ struct ImBuf *ibuf3)
{
- struct ImBuf * out = prepare_effect_imbufs(context,ibuf1, ibuf2, ibuf3);
+ struct ImBuf *out = prepare_effect_imbufs(context, ibuf1, ibuf2, ibuf3);
if (out->rect_float) {
do_alphaover_effect_float(
- facf0, facf1, context.rectx, context.recty,
- ibuf1->rect_float, ibuf2->rect_float,
- out->rect_float);
+ facf0, facf1, context.rectx, context.recty,
+ ibuf1->rect_float, ibuf2->rect_float,
+ out->rect_float);
}
else {
do_alphaover_effect_byte(
- facf0, facf1, context.rectx, context.recty,
- (char*) ibuf1->rect, (char*) ibuf2->rect,
- (char*) out->rect);
+ facf0, facf1, context.rectx, context.recty,
+ (char *) ibuf1->rect, (char *) ibuf2->rect,
+ (char *) out->rect);
}
return out;
}
@@ -571,24 +570,24 @@ static struct ImBuf * do_alphaover_effect(
* ********************************************************************** */
static void do_alphaunder_effect_byte(
- float facf0, float facf1, int x, int y, char *rect1,
- char *rect2, char *out)
+ float facf0, float facf1, int x, int y, char *rect1,
+ char *rect2, char *out)
{
int fac2, mfac, fac, fac4;
int xo;
char *rt1, *rt2, *rt;
- xo= x;
- rt1= rect1;
- rt2= rect2;
- rt= out;
+ xo = x;
+ rt1 = rect1;
+ rt2 = rect2;
+ rt = out;
- fac2= (int)(256.0f*facf0);
- fac4= (int)(256.0f*facf1);
+ fac2 = (int)(256.0f * facf0);
+ fac4 = (int)(256.0f * facf1);
while (y--) {
- x= xo;
+ x = xo;
while (x--) {
/* rt = rt1 under rt2 (alpha from rt2) */
@@ -596,68 +595,68 @@ static void do_alphaunder_effect_byte(
/* this complex optimalisation is because the
* 'skybuf' can be crossed in
*/
- if (rt2[3]==0 && fac2==256) *( (unsigned int *)rt) = *( (unsigned int *)rt1);
- else if (rt2[3]==255) *( (unsigned int *)rt) = *( (unsigned int *)rt2);
+ if (rt2[3] == 0 && fac2 == 256) *( (unsigned int *)rt) = *( (unsigned int *)rt1);
+ else if (rt2[3] == 255) *( (unsigned int *)rt) = *( (unsigned int *)rt2);
else {
- mfac= rt2[3];
- fac= (fac2*(256-mfac))>>8;
+ mfac = rt2[3];
+ fac = (fac2 * (256 - mfac)) >> 8;
- if (fac==0) *( (unsigned int *)rt) = *( (unsigned int *)rt2);
+ if (fac == 0) *( (unsigned int *)rt) = *( (unsigned int *)rt2);
else {
- rt[0]= ( fac*rt1[0] + mfac*rt2[0])>>8;
- rt[1]= ( fac*rt1[1] + mfac*rt2[1])>>8;
- rt[2]= ( fac*rt1[2] + mfac*rt2[2])>>8;
- rt[3]= ( fac*rt1[3] + mfac*rt2[3])>>8;
+ rt[0] = (fac * rt1[0] + mfac * rt2[0]) >> 8;
+ rt[1] = (fac * rt1[1] + mfac * rt2[1]) >> 8;
+ rt[2] = (fac * rt1[2] + mfac * rt2[2]) >> 8;
+ rt[3] = (fac * rt1[3] + mfac * rt2[3]) >> 8;
}
}
- rt1+= 4; rt2+= 4; rt+= 4;
+ rt1 += 4; rt2 += 4; rt += 4;
}
- if (y==0) break;
+ if (y == 0) break;
y--;
- x= xo;
+ x = xo;
while (x--) {
- if (rt2[3]==0 && fac4==256) *( (unsigned int *)rt) = *( (unsigned int *)rt1);
- else if (rt2[3]==255) *( (unsigned int *)rt) = *( (unsigned int *)rt2);
+ if (rt2[3] == 0 && fac4 == 256) *( (unsigned int *)rt) = *( (unsigned int *)rt1);
+ else if (rt2[3] == 255) *( (unsigned int *)rt) = *( (unsigned int *)rt2);
else {
- mfac= rt2[3];
- fac= (fac4*(256-mfac))>>8;
+ mfac = rt2[3];
+ fac = (fac4 * (256 - mfac)) >> 8;
- if (fac==0) *( (unsigned int *)rt) = *( (unsigned int *)rt2);
+ if (fac == 0) *( (unsigned int *)rt) = *( (unsigned int *)rt2);
else {
- rt[0]= ( fac*rt1[0] + mfac*rt2[0])>>8;
- rt[1]= ( fac*rt1[1] + mfac*rt2[1])>>8;
- rt[2]= ( fac*rt1[2] + mfac*rt2[2])>>8;
- rt[3]= ( fac*rt1[3] + mfac*rt2[3])>>8;
+ rt[0] = (fac * rt1[0] + mfac * rt2[0]) >> 8;
+ rt[1] = (fac * rt1[1] + mfac * rt2[1]) >> 8;
+ rt[2] = (fac * rt1[2] + mfac * rt2[2]) >> 8;
+ rt[3] = (fac * rt1[3] + mfac * rt2[3]) >> 8;
}
}
- rt1+= 4; rt2+= 4; rt+= 4;
+ rt1 += 4; rt2 += 4; rt += 4;
}
}
}
static void do_alphaunder_effect_float(float facf0, float facf1, int x, int y,
- float *rect1, float *rect2,
- float *out)
+ float *rect1, float *rect2,
+ float *out)
{
float fac2, mfac, fac, fac4;
int xo;
float *rt1, *rt2, *rt;
- xo= x;
- rt1= rect1;
- rt2= rect2;
- rt= out;
+ xo = x;
+ rt1 = rect1;
+ rt2 = rect2;
+ rt = out;
- fac2= facf0;
- fac4= facf1;
+ fac2 = facf0;
+ fac4 = facf1;
while (y--) {
- x= xo;
+ x = xo;
while (x--) {
/* rt = rt1 under rt2 (alpha from rt2) */
@@ -665,7 +664,7 @@ static void do_alphaunder_effect_float(float facf0, float facf1, int x, int y,
/* this complex optimalisation is because the
* 'skybuf' can be crossed in
*/
- if ( rt2[3]<=0 && fac2 >= 1.0f) {
+ if (rt2[3] <= 0 && fac2 >= 1.0f) {
memcpy(rt, rt1, 4 * sizeof(float));
}
else if (rt2[3] >= 1.0f) {
@@ -679,67 +678,67 @@ static void do_alphaunder_effect_float(float facf0, float facf1, int x, int y,
memcpy(rt, rt2, 4 * sizeof(float));
}
else {
- rt[0]= fac*rt1[0] + mfac*rt2[0];
- rt[1]= fac*rt1[1] + mfac*rt2[1];
- rt[2]= fac*rt1[2] + mfac*rt2[2];
- rt[3]= fac*rt1[3] + mfac*rt2[3];
+ rt[0] = fac * rt1[0] + mfac * rt2[0];
+ rt[1] = fac * rt1[1] + mfac * rt2[1];
+ rt[2] = fac * rt1[2] + mfac * rt2[2];
+ rt[3] = fac * rt1[3] + mfac * rt2[3];
}
}
- rt1+= 4; rt2+= 4; rt+= 4;
+ rt1 += 4; rt2 += 4; rt += 4;
}
- if (y==0) break;
+ if (y == 0) break;
y--;
- x= xo;
+ x = xo;
while (x--) {
- if (rt2[3]<=0 && fac4 >= 1.0f) {
+ if (rt2[3] <= 0 && fac4 >= 1.0f) {
memcpy(rt, rt1, 4 * sizeof(float));
}
- else if (rt2[3]>=1.0f) {
+ else if (rt2[3] >= 1.0f) {
memcpy(rt, rt2, 4 * sizeof(float));
}
else {
- mfac= rt2[3];
- fac= fac4*(1.0f-mfac);
+ mfac = rt2[3];
+ fac = fac4 * (1.0f - mfac);
if (fac == 0) {
memcpy(rt, rt2, 4 * sizeof(float));
}
else {
- rt[0]= fac * rt1[0] + mfac * rt2[0];
- rt[1]= fac * rt1[1] + mfac * rt2[1];
- rt[2]= fac * rt1[2] + mfac * rt2[2];
- rt[3]= fac * rt1[3] + mfac * rt2[3];
+ rt[0] = fac * rt1[0] + mfac * rt2[0];
+ rt[1] = fac * rt1[1] + mfac * rt2[1];
+ rt[2] = fac * rt1[2] + mfac * rt2[2];
+ rt[3] = fac * rt1[3] + mfac * rt2[3];
}
}
- rt1+= 4; rt2+= 4; rt+= 4;
+ rt1 += 4; rt2 += 4; rt += 4;
}
}
}
-static struct ImBuf* do_alphaunder_effect(
- SeqRenderData context, Sequence *UNUSED(seq), float UNUSED(cfra),
- float facf0, float facf1,
- struct ImBuf *ibuf1, struct ImBuf *ibuf2,
- struct ImBuf *ibuf3)
+static struct ImBuf *do_alphaunder_effect(
+ SeqRenderData context, Sequence *UNUSED(seq), float UNUSED(cfra),
+ float facf0, float facf1,
+ struct ImBuf *ibuf1, struct ImBuf *ibuf2,
+ struct ImBuf *ibuf3)
{
- struct ImBuf * out = prepare_effect_imbufs(
- context, ibuf1, ibuf2, ibuf3);
+ struct ImBuf *out = prepare_effect_imbufs(
+ context, ibuf1, ibuf2, ibuf3);
if (out->rect_float) {
do_alphaunder_effect_float(
- facf0, facf1, context.rectx, context.recty,
- ibuf1->rect_float, ibuf2->rect_float,
- out->rect_float);
+ facf0, facf1, context.rectx, context.recty,
+ ibuf1->rect_float, ibuf2->rect_float,
+ out->rect_float);
}
else {
do_alphaunder_effect_byte(
- facf0, facf1, context.rectx, context.recty,
- (char*) ibuf1->rect, (char*) ibuf2->rect,
- (char*) out->rect);
+ facf0, facf1, context.rectx, context.recty,
+ (char *) ibuf1->rect, (char *) ibuf2->rect,
+ (char *) out->rect);
}
return out;
}
@@ -750,95 +749,95 @@ static struct ImBuf* do_alphaunder_effect(
* ********************************************************************** */
static void do_cross_effect_byte(float facf0, float facf1, int x, int y,
- char *rect1, char *rect2,
- char *out)
+ char *rect1, char *rect2,
+ char *out)
{
int fac1, fac2, fac3, fac4;
int xo;
char *rt1, *rt2, *rt;
- xo= x;
- rt1= rect1;
- rt2= rect2;
- rt= out;
+ xo = x;
+ rt1 = rect1;
+ rt2 = rect2;
+ rt = out;
- fac2= (int)(256.0f*facf0);
- fac1= 256-fac2;
- fac4= (int)(256.0f*facf1);
- fac3= 256-fac4;
+ fac2 = (int)(256.0f * facf0);
+ fac1 = 256 - fac2;
+ fac4 = (int)(256.0f * facf1);
+ fac3 = 256 - fac4;
while (y--) {
- x= xo;
+ x = xo;
while (x--) {
- rt[0]= (fac1*rt1[0] + fac2*rt2[0])>>8;
- rt[1]= (fac1*rt1[1] + fac2*rt2[1])>>8;
- rt[2]= (fac1*rt1[2] + fac2*rt2[2])>>8;
- rt[3]= (fac1*rt1[3] + fac2*rt2[3])>>8;
+ rt[0] = (fac1 * rt1[0] + fac2 * rt2[0]) >> 8;
+ rt[1] = (fac1 * rt1[1] + fac2 * rt2[1]) >> 8;
+ rt[2] = (fac1 * rt1[2] + fac2 * rt2[2]) >> 8;
+ rt[3] = (fac1 * rt1[3] + fac2 * rt2[3]) >> 8;
- rt1+= 4; rt2+= 4; rt+= 4;
+ rt1 += 4; rt2 += 4; rt += 4;
}
- if (y==0) break;
+ if (y == 0) break;
y--;
- x= xo;
+ x = xo;
while (x--) {
- rt[0]= (fac3*rt1[0] + fac4*rt2[0])>>8;
- rt[1]= (fac3*rt1[1] + fac4*rt2[1])>>8;
- rt[2]= (fac3*rt1[2] + fac4*rt2[2])>>8;
- rt[3]= (fac3*rt1[3] + fac4*rt2[3])>>8;
+ rt[0] = (fac3 * rt1[0] + fac4 * rt2[0]) >> 8;
+ rt[1] = (fac3 * rt1[1] + fac4 * rt2[1]) >> 8;
+ rt[2] = (fac3 * rt1[2] + fac4 * rt2[2]) >> 8;
+ rt[3] = (fac3 * rt1[3] + fac4 * rt2[3]) >> 8;
- rt1+= 4; rt2+= 4; rt+= 4;
+ rt1 += 4; rt2 += 4; rt += 4;
}
}
}
static void do_cross_effect_float(float facf0, float facf1, int x, int y,
- float *rect1, float *rect2, float *out)
+ float *rect1, float *rect2, float *out)
{
float fac1, fac2, fac3, fac4;
int xo;
float *rt1, *rt2, *rt;
- xo= x;
- rt1= rect1;
- rt2= rect2;
- rt= out;
+ xo = x;
+ rt1 = rect1;
+ rt2 = rect2;
+ rt = out;
- fac2= facf0;
- fac1= 1.0f - fac2;
- fac4= facf1;
- fac3= 1.0f - fac4;
+ fac2 = facf0;
+ fac1 = 1.0f - fac2;
+ fac4 = facf1;
+ fac3 = 1.0f - fac4;
while (y--) {
- x= xo;
+ x = xo;
while (x--) {
- rt[0]= fac1*rt1[0] + fac2*rt2[0];
- rt[1]= fac1*rt1[1] + fac2*rt2[1];
- rt[2]= fac1*rt1[2] + fac2*rt2[2];
- rt[3]= fac1*rt1[3] + fac2*rt2[3];
+ rt[0] = fac1 * rt1[0] + fac2 * rt2[0];
+ rt[1] = fac1 * rt1[1] + fac2 * rt2[1];
+ rt[2] = fac1 * rt1[2] + fac2 * rt2[2];
+ rt[3] = fac1 * rt1[3] + fac2 * rt2[3];
- rt1+= 4; rt2+= 4; rt+= 4;
+ rt1 += 4; rt2 += 4; rt += 4;
}
- if (y==0) break;
+ if (y == 0) break;
y--;
- x= xo;
+ x = xo;
while (x--) {
- rt[0]= fac3*rt1[0] + fac4*rt2[0];
- rt[1]= fac3*rt1[1] + fac4*rt2[1];
- rt[2]= fac3*rt1[2] + fac4*rt2[2];
- rt[3]= fac3*rt1[3] + fac4*rt2[3];
+ rt[0] = fac3 * rt1[0] + fac4 * rt2[0];
+ rt[1] = fac3 * rt1[1] + fac4 * rt2[1];
+ rt[2] = fac3 * rt1[2] + fac4 * rt2[2];
+ rt[3] = fac3 * rt1[3] + fac4 * rt2[3];
- rt1+= 4; rt2+= 4; rt+= 4;
+ rt1 += 4; rt2 += 4; rt += 4;
}
}
@@ -846,26 +845,26 @@ static void do_cross_effect_float(float facf0, float facf1, int x, int y,
/* careful: also used by speed effect! */
-static struct ImBuf* do_cross_effect(
- SeqRenderData context, Sequence *UNUSED(seq), float UNUSED(cfra),
- float facf0, float facf1,
- struct ImBuf *ibuf1, struct ImBuf *ibuf2,
- struct ImBuf *ibuf3)
+static struct ImBuf *do_cross_effect(
+ SeqRenderData context, Sequence *UNUSED(seq), float UNUSED(cfra),
+ float facf0, float facf1,
+ struct ImBuf *ibuf1, struct ImBuf *ibuf2,
+ struct ImBuf *ibuf3)
{
- struct ImBuf * out = prepare_effect_imbufs(
- context, ibuf1, ibuf2, ibuf3);
+ struct ImBuf *out = prepare_effect_imbufs(
+ context, ibuf1, ibuf2, ibuf3);
if (out->rect_float) {
do_cross_effect_float(
- facf0, facf1, context.rectx, context.recty,
- ibuf1->rect_float, ibuf2->rect_float,
- out->rect_float);
+ facf0, facf1, context.rectx, context.recty,
+ ibuf1->rect_float, ibuf2->rect_float,
+ out->rect_float);
}
else {
do_cross_effect_byte(
- facf0, facf1, context.rectx, context.recty,
- (char*) ibuf1->rect, (char*) ibuf2->rect,
- (char*) out->rect);
+ facf0, facf1, context.rectx, context.recty,
+ (char *) ibuf1->rect, (char *) ibuf2->rect,
+ (char *) out->rect);
}
return out;
}
@@ -906,9 +905,9 @@ static void makeGammaTables(float gamma)
for (i = 0; i < RE_GAMMA_TABLE_SIZE; i++) {
color_domain_table[i] = i * color_step;
gamma_range_table[i] = pow(color_domain_table[i],
- valid_gamma);
+ valid_gamma);
inv_gamma_range_table[i] = pow(color_domain_table[i],
- valid_inv_gamma);
+ valid_inv_gamma);
}
/* The end of the table should match 1.0 carefully. In order to avoid */
@@ -921,11 +920,11 @@ static void makeGammaTables(float gamma)
/* To speed up calculations, we make these calc factor tables. They are */
/* multiplication factors used in scaling the interpolation. */
- for (i = 0; i < RE_GAMMA_TABLE_SIZE; i++ ) {
- gamfactor_table[i] = inv_color_step
- * (gamma_range_table[i + 1] - gamma_range_table[i]);
- inv_gamfactor_table[i] = inv_color_step
- * (inv_gamma_range_table[i + 1] - inv_gamma_range_table[i]);
+ for (i = 0; i < RE_GAMMA_TABLE_SIZE; i++) {
+ gamfactor_table[i] = inv_color_step *
+ (gamma_range_table[i + 1] - gamma_range_table[i]);
+ inv_gamfactor_table[i] = inv_color_step *
+ (inv_gamma_range_table[i + 1] - inv_gamma_range_table[i]);
}
} /* end of void makeGammaTables(float gamma) */
@@ -937,14 +936,14 @@ static float gammaCorrect(float c)
float res = 0.0;
i = floor(c * inv_color_step);
- /* Clip to range [0,1]: outside, just do the complete calculation. */
+ /* Clip to range [0, 1]: outside, just do the complete calculation. */
/* We may have some performance problems here. Stretching up the LUT */
/* may help solve that, by exchanging LUT size for the interpolation. */
/* Negative colors are explicitly handled. */
if (i < 0) res = -pow(abs(c), valid_gamma);
- else if (i >= RE_GAMMA_TABLE_SIZE ) res = pow(c, valid_gamma);
+ else if (i >= RE_GAMMA_TABLE_SIZE) res = pow(c, valid_gamma);
else res = gamma_range_table[i] +
- ( (c - color_domain_table[i]) * gamfactor_table[i]);
+ ( (c - color_domain_table[i]) * gamfactor_table[i]);
return res;
} /* end of float gammaCorrect(float col) */
@@ -956,12 +955,12 @@ static float invGammaCorrect(float col)
int i;
float res = 0.0;
- i = floor(col*inv_color_step);
+ i = floor(col * inv_color_step);
/* Negative colors are explicitly handled. */
if (i < 0) res = -pow(abs(col), valid_inv_gamma);
else if (i >= RE_GAMMA_TABLE_SIZE) res = pow(col, valid_inv_gamma);
else res = inv_gamma_range_table[i] +
- ( (col - color_domain_table[i]) * inv_gamfactor_table[i]);
+ ( (col - color_domain_table[i]) * inv_gamfactor_table[i]);
return res;
} /* end of float invGammaCorrect(float col) */
@@ -969,26 +968,26 @@ static float invGammaCorrect(float col)
static void gamtabs(float gamma)
{
- float val, igamma= 1.0f/gamma;
+ float val, igamma = 1.0f / gamma;
int a;
/* gamtab: in short, out short */
- for (a=0; a<65536; a++) {
- val= a;
- val/= 65535.0f;
+ for (a = 0; a < 65536; a++) {
+ val = a;
+ val /= 65535.0f;
- if (gamma==2.0f) val= sqrt(val);
- else if (gamma!=1.0f) val= pow(val, igamma);
+ if (gamma == 2.0f) val = sqrt(val);
+ else if (gamma != 1.0f) val = pow(val, igamma);
- gamtab[a]= (65535.99f*val);
+ gamtab[a] = (65535.99f * val);
}
/* inverse gamtab1 : in byte, out short */
- for (a=1; a<=256; a++) {
- if (gamma==2.0f) igamtab1[a-1]= a*a-1;
- else if (gamma==1.0f) igamtab1[a-1]= 256*a-1;
+ for (a = 1; a <= 256; a++) {
+ if (gamma == 2.0f) igamtab1[a - 1] = a * a - 1;
+ else if (gamma == 1.0f) igamtab1[a - 1] = 256 * a - 1;
else {
- val= a/256.0f;
- igamtab1[a - 1]= (65535.0 * pow(val, gamma)) - 1;
+ val = a / 256.0f;
+ igamtab1[a - 1] = (65535.0 * pow(val, gamma)) - 1;
}
}
@@ -1003,139 +1002,137 @@ static void build_gammatabs(void)
}
}
-static void init_gammacross(Sequence * UNUSED(seq))
+static void init_gammacross(Sequence *UNUSED(seq))
{
}
-static void load_gammacross(Sequence * UNUSED(seq))
+static void load_gammacross(Sequence *UNUSED(seq))
{
}
-static void free_gammacross(Sequence * UNUSED(seq))
+static void free_gammacross(Sequence *UNUSED(seq))
{
}
static void do_gammacross_effect_byte(float facf0, float UNUSED(facf1),
- int x, int y,
- unsigned char *rect1,
- unsigned char *rect2,
- unsigned char *out)
+ int x, int y,
+ unsigned char *rect1,
+ unsigned char *rect2,
+ unsigned char *out)
{
int fac1, fac2, col;
int xo;
unsigned char *rt1, *rt2, *rt;
- xo= x;
- rt1= (unsigned char *)rect1;
- rt2= (unsigned char *)rect2;
- rt= (unsigned char *)out;
+ xo = x;
+ rt1 = (unsigned char *)rect1;
+ rt2 = (unsigned char *)rect2;
+ rt = (unsigned char *)out;
- fac2= (int)(256.0f*facf0);
- fac1= 256-fac2;
+ fac2 = (int)(256.0f * facf0);
+ fac1 = 256 - fac2;
while (y--) {
- x= xo;
+ x = xo;
while (x--) {
- col= (fac1*igamtab1[rt1[0]] + fac2*igamtab1[rt2[0]])>>8;
- if (col>65535) rt[0]= 255; else rt[0]= ( (char *)(gamtab+col))[MOST_SIG_BYTE];
- col=(fac1*igamtab1[rt1[1]] + fac2*igamtab1[rt2[1]])>>8;
- if (col>65535) rt[1]= 255; else rt[1]= ( (char *)(gamtab+col))[MOST_SIG_BYTE];
- col= (fac1*igamtab1[rt1[2]] + fac2*igamtab1[rt2[2]])>>8;
- if (col>65535) rt[2]= 255; else rt[2]= ( (char *)(gamtab+col))[MOST_SIG_BYTE];
- col= (fac1*igamtab1[rt1[3]] + fac2*igamtab1[rt2[3]])>>8;
- if (col>65535) rt[3]= 255; else rt[3]= ( (char *)(gamtab+col))[MOST_SIG_BYTE];
+ col = (fac1 * igamtab1[rt1[0]] + fac2 * igamtab1[rt2[0]]) >> 8;
+ if (col > 65535) rt[0] = 255; else rt[0] = ( (char *)(gamtab + col))[MOST_SIG_BYTE];
+ col = (fac1 * igamtab1[rt1[1]] + fac2 * igamtab1[rt2[1]]) >> 8;
+ if (col > 65535) rt[1] = 255; else rt[1] = ( (char *)(gamtab + col))[MOST_SIG_BYTE];
+ col = (fac1 * igamtab1[rt1[2]] + fac2 * igamtab1[rt2[2]]) >> 8;
+ if (col > 65535) rt[2] = 255; else rt[2] = ( (char *)(gamtab + col))[MOST_SIG_BYTE];
+ col = (fac1 * igamtab1[rt1[3]] + fac2 * igamtab1[rt2[3]]) >> 8;
+ if (col > 65535) rt[3] = 255; else rt[3] = ( (char *)(gamtab + col))[MOST_SIG_BYTE];
- rt1+= 4; rt2+= 4; rt+= 4;
+ rt1 += 4; rt2 += 4; rt += 4;
}
- if (y==0) break;
+ if (y == 0) break;
y--;
- x= xo;
+ x = xo;
while (x--) {
- col= (fac1*igamtab1[rt1[0]] + fac2*igamtab1[rt2[0]])>>8;
- if (col>65535) rt[0]= 255; else rt[0]= ( (char *)(gamtab+col))[MOST_SIG_BYTE];
- col= (fac1*igamtab1[rt1[1]] + fac2*igamtab1[rt2[1]])>>8;
- if (col>65535) rt[1]= 255; else rt[1]= ( (char *)(gamtab+col))[MOST_SIG_BYTE];
- col= (fac1*igamtab1[rt1[2]] + fac2*igamtab1[rt2[2]])>>8;
- if (col>65535) rt[2]= 255; else rt[2]= ( (char *)(gamtab+col))[MOST_SIG_BYTE];
- col= (fac1*igamtab1[rt1[3]] + fac2*igamtab1[rt2[3]])>>8;
- if (col>65535) rt[3]= 255; else rt[3]= ( (char *)(gamtab+col))[MOST_SIG_BYTE];
+ col = (fac1 * igamtab1[rt1[0]] + fac2 * igamtab1[rt2[0]]) >> 8;
+ if (col > 65535) rt[0] = 255; else rt[0] = ( (char *)(gamtab + col))[MOST_SIG_BYTE];
+ col = (fac1 * igamtab1[rt1[1]] + fac2 * igamtab1[rt2[1]]) >> 8;
+ if (col > 65535) rt[1] = 255; else rt[1] = ( (char *)(gamtab + col))[MOST_SIG_BYTE];
+ col = (fac1 * igamtab1[rt1[2]] + fac2 * igamtab1[rt2[2]]) >> 8;
+ if (col > 65535) rt[2] = 255; else rt[2] = ( (char *)(gamtab + col))[MOST_SIG_BYTE];
+ col = (fac1 * igamtab1[rt1[3]] + fac2 * igamtab1[rt2[3]]) >> 8;
+ if (col > 65535) rt[3] = 255; else rt[3] = ( (char *)(gamtab + col))[MOST_SIG_BYTE];
- rt1+= 4; rt2+= 4; rt+= 4;
+ rt1 += 4; rt2 += 4; rt += 4;
}
}
}
static void do_gammacross_effect_float(float facf0, float UNUSED(facf1),
- int x, int y,
- float *rect1, float *rect2,
- float *out)
+ int x, int y,
+ float *rect1, float *rect2,
+ float *out)
{
float fac1, fac2;
int xo;
float *rt1, *rt2, *rt;
- xo= x;
- rt1= rect1;
- rt2= rect2;
- rt= out;
+ xo = x;
+ rt1 = rect1;
+ rt2 = rect2;
+ rt = out;
- fac2= facf0;
- fac1= 1.0f - fac2;
+ fac2 = facf0;
+ fac1 = 1.0f - fac2;
while (y--) {
- x= xo * 4;
+ x = xo * 4;
while (x--) {
- *rt= gammaCorrect(
- fac1 * invGammaCorrect(*rt1)
- + fac2 * invGammaCorrect(*rt2));
+ *rt = gammaCorrect(
+ fac1 * invGammaCorrect(*rt1) + fac2 * invGammaCorrect(*rt2));
rt1++; rt2++; rt++;
}
- if (y==0) break;
+ if (y == 0) break;
y--;
- x= xo * 4;
+ x = xo * 4;
while (x--) {
- *rt= gammaCorrect(
- fac1*invGammaCorrect(*rt1)
- + fac2*invGammaCorrect(*rt2));
+ *rt = gammaCorrect(
+ fac1 * invGammaCorrect(*rt1) + fac2 * invGammaCorrect(*rt2));
rt1++; rt2++; rt++;
}
}
}
-static struct ImBuf * do_gammacross_effect(
- SeqRenderData context,
- Sequence *UNUSED(seq), float UNUSED(cfra),
- float facf0, float facf1,
- struct ImBuf *ibuf1, struct ImBuf *ibuf2,
- struct ImBuf *ibuf3)
+static struct ImBuf *do_gammacross_effect(
+ SeqRenderData context,
+ Sequence *UNUSED(seq), float UNUSED(cfra),
+ float facf0, float facf1,
+ struct ImBuf *ibuf1, struct ImBuf *ibuf2,
+ struct ImBuf *ibuf3)
{
- struct ImBuf * out = prepare_effect_imbufs(context,ibuf1, ibuf2, ibuf3);
+ struct ImBuf *out = prepare_effect_imbufs(context, ibuf1, ibuf2, ibuf3);
build_gammatabs();
if (out->rect_float) {
do_gammacross_effect_float(
- facf0, facf1, context.rectx, context.recty,
- ibuf1->rect_float, ibuf2->rect_float,
- out->rect_float);
+ facf0, facf1, context.rectx, context.recty,
+ ibuf1->rect_float, ibuf2->rect_float,
+ out->rect_float);
}
else {
do_gammacross_effect_byte(
- facf0, facf1, context.rectx, context.recty,
- (unsigned char*) ibuf1->rect, (unsigned char*) ibuf2->rect,
- (unsigned char*) out->rect);
+ facf0, facf1, context.rectx, context.recty,
+ (unsigned char *) ibuf1->rect, (unsigned char *) ibuf2->rect,
+ (unsigned char *) out->rect);
}
return out;
}
@@ -1146,86 +1143,86 @@ static struct ImBuf * do_gammacross_effect(
* ********************************************************************** */
static void do_add_effect_byte(float facf0, float facf1, int x, int y,
- unsigned char *rect1, unsigned char *rect2,
- unsigned char *out)
+ unsigned char *rect1, unsigned char *rect2,
+ unsigned char *out)
{
int col, xo, fac1, fac3;
char *rt1, *rt2, *rt;
- xo= x;
- rt1= (char *)rect1;
- rt2= (char *)rect2;
- rt= (char *)out;
+ xo = x;
+ rt1 = (char *)rect1;
+ rt2 = (char *)rect2;
+ rt = (char *)out;
- fac1= (int)(256.0f*facf0);
- fac3= (int)(256.0f*facf1);
+ fac1 = (int)(256.0f * facf0);
+ fac3 = (int)(256.0f * facf1);
while (y--) {
- x= xo;
+ x = xo;
while (x--) {
- col= rt1[0]+ ((fac1*rt2[0])>>8);
- if (col>255) rt[0]= 255; else rt[0]= col;
- col= rt1[1]+ ((fac1*rt2[1])>>8);
- if (col>255) rt[1]= 255; else rt[1]= col;
- col= rt1[2]+ ((fac1*rt2[2])>>8);
- if (col>255) rt[2]= 255; else rt[2]= col;
- col= rt1[3]+ ((fac1*rt2[3])>>8);
- if (col>255) rt[3]= 255; else rt[3]= col;
+ col = rt1[0] + ((fac1 * rt2[0]) >> 8);
+ if (col > 255) rt[0] = 255; else rt[0] = col;
+ col = rt1[1] + ((fac1 * rt2[1]) >> 8);
+ if (col > 255) rt[1] = 255; else rt[1] = col;
+ col = rt1[2] + ((fac1 * rt2[2]) >> 8);
+ if (col > 255) rt[2] = 255; else rt[2] = col;
+ col = rt1[3] + ((fac1 * rt2[3]) >> 8);
+ if (col > 255) rt[3] = 255; else rt[3] = col;
- rt1+= 4; rt2+= 4; rt+= 4;
+ rt1 += 4; rt2 += 4; rt += 4;
}
- if (y==0) break;
+ if (y == 0) break;
y--;
- x= xo;
+ x = xo;
while (x--) {
- col= rt1[0]+ ((fac3*rt2[0])>>8);
- if (col>255) rt[0]= 255; else rt[0]= col;
- col= rt1[1]+ ((fac3*rt2[1])>>8);
- if (col>255) rt[1]= 255; else rt[1]= col;
- col= rt1[2]+ ((fac3*rt2[2])>>8);
- if (col>255) rt[2]= 255; else rt[2]= col;
- col= rt1[3]+ ((fac3*rt2[3])>>8);
- if (col>255) rt[3]= 255; else rt[3]= col;
+ col = rt1[0] + ((fac3 * rt2[0]) >> 8);
+ if (col > 255) rt[0] = 255; else rt[0] = col;
+ col = rt1[1] + ((fac3 * rt2[1]) >> 8);
+ if (col > 255) rt[1] = 255; else rt[1] = col;
+ col = rt1[2] + ((fac3 * rt2[2]) >> 8);
+ if (col > 255) rt[2] = 255; else rt[2] = col;
+ col = rt1[3] + ((fac3 * rt2[3]) >> 8);
+ if (col > 255) rt[3] = 255; else rt[3] = col;
- rt1+= 4; rt2+= 4; rt+= 4;
+ rt1 += 4; rt2 += 4; rt += 4;
}
}
}
static void do_add_effect_float(float facf0, float facf1, int x, int y,
- float *rect1, float *rect2,
- float *out)
+ float *rect1, float *rect2,
+ float *out)
{
int xo;
float fac1, fac3;
float *rt1, *rt2, *rt;
- xo= x;
- rt1= rect1;
- rt2= rect2;
- rt= out;
+ xo = x;
+ rt1 = rect1;
+ rt2 = rect2;
+ rt = out;
- fac1= facf0;
- fac3= facf1;
+ fac1 = facf0;
+ fac3 = facf1;
while (y--) {
- x= xo * 4;
+ x = xo * 4;
while (x--) {
*rt = *rt1 + fac1 * (*rt2);
rt1++; rt2++; rt++;
}
- if (y==0) break;
+ if (y == 0) break;
y--;
- x= xo * 4;
+ x = xo * 4;
while (x--) {
*rt = *rt1 + fac3 * (*rt2);
@@ -1234,25 +1231,24 @@ static void do_add_effect_float(float facf0, float facf1, int x, int y,
}
}
-static struct ImBuf * do_add_effect(SeqRenderData context,
- Sequence *UNUSED(seq), float UNUSED(cfra),
- float facf0, float facf1,
- struct ImBuf *ibuf1, struct ImBuf *ibuf2,
- struct ImBuf *ibuf3)
-{
- struct ImBuf * out = prepare_effect_imbufs(context,ibuf1, ibuf2, ibuf3);
+static struct ImBuf *do_add_effect(SeqRenderData context,
+ Sequence *UNUSED(seq), float UNUSED(cfra),
+ float facf0, float facf1,
+ struct ImBuf *ibuf1, struct ImBuf *ibuf2,
+ struct ImBuf *ibuf3){
+ struct ImBuf *out = prepare_effect_imbufs(context, ibuf1, ibuf2, ibuf3);
if (out->rect_float) {
do_add_effect_float(
- facf0, facf1, context.rectx, context.recty,
- ibuf1->rect_float, ibuf2->rect_float,
- out->rect_float);
+ facf0, facf1, context.rectx, context.recty,
+ ibuf1->rect_float, ibuf2->rect_float,
+ out->rect_float);
}
else {
do_add_effect_byte(
- facf0, facf1, context.rectx, context.recty,
- (unsigned char*) ibuf1->rect, (unsigned char*) ibuf2->rect,
- (unsigned char*) out->rect);
+ facf0, facf1, context.rectx, context.recty,
+ (unsigned char *) ibuf1->rect, (unsigned char *) ibuf2->rect,
+ (unsigned char *) out->rect);
}
return out;
}
@@ -1263,86 +1259,86 @@ static struct ImBuf * do_add_effect(SeqRenderData context,
* ********************************************************************** */
static void do_sub_effect_byte(float facf0, float facf1,
- int x, int y,
- char *rect1, char *rect2, char *out)
+ int x, int y,
+ char *rect1, char *rect2, char *out)
{
int col, xo, fac1, fac3;
char *rt1, *rt2, *rt;
- xo= x;
- rt1= (char *)rect1;
- rt2= (char *)rect2;
- rt= (char *)out;
+ xo = x;
+ rt1 = (char *)rect1;
+ rt2 = (char *)rect2;
+ rt = (char *)out;
- fac1= (int)(256.0f*facf0);
- fac3= (int)(256.0f*facf1);
+ fac1 = (int)(256.0f * facf0);
+ fac3 = (int)(256.0f * facf1);
while (y--) {
- x= xo;
+ x = xo;
while (x--) {
- col= rt1[0]- ((fac1*rt2[0])>>8);
- if (col<0) rt[0]= 0; else rt[0]= col;
- col= rt1[1]- ((fac1*rt2[1])>>8);
- if (col<0) rt[1]= 0; else rt[1]= col;
- col= rt1[2]- ((fac1*rt2[2])>>8);
- if (col<0) rt[2]= 0; else rt[2]= col;
- col= rt1[3]- ((fac1*rt2[3])>>8);
- if (col<0) rt[3]= 0; else rt[3]= col;
+ col = rt1[0] - ((fac1 * rt2[0]) >> 8);
+ if (col < 0) rt[0] = 0; else rt[0] = col;
+ col = rt1[1] - ((fac1 * rt2[1]) >> 8);
+ if (col < 0) rt[1] = 0; else rt[1] = col;
+ col = rt1[2] - ((fac1 * rt2[2]) >> 8);
+ if (col < 0) rt[2] = 0; else rt[2] = col;
+ col = rt1[3] - ((fac1 * rt2[3]) >> 8);
+ if (col < 0) rt[3] = 0; else rt[3] = col;
- rt1+= 4; rt2+= 4; rt+= 4;
+ rt1 += 4; rt2 += 4; rt += 4;
}
- if (y==0) break;
+ if (y == 0) break;
y--;
- x= xo;
+ x = xo;
while (x--) {
- col= rt1[0]- ((fac3*rt2[0])>>8);
- if (col<0) rt[0]= 0; else rt[0]= col;
- col= rt1[1]- ((fac3*rt2[1])>>8);
- if (col<0) rt[1]= 0; else rt[1]= col;
- col= rt1[2]- ((fac3*rt2[2])>>8);
- if (col<0) rt[2]= 0; else rt[2]= col;
- col= rt1[3]- ((fac3*rt2[3])>>8);
- if (col<0) rt[3]= 0; else rt[3]= col;
+ col = rt1[0] - ((fac3 * rt2[0]) >> 8);
+ if (col < 0) rt[0] = 0; else rt[0] = col;
+ col = rt1[1] - ((fac3 * rt2[1]) >> 8);
+ if (col < 0) rt[1] = 0; else rt[1] = col;
+ col = rt1[2] - ((fac3 * rt2[2]) >> 8);
+ if (col < 0) rt[2] = 0; else rt[2] = col;
+ col = rt1[3] - ((fac3 * rt2[3]) >> 8);
+ if (col < 0) rt[3] = 0; else rt[3] = col;
- rt1+= 4; rt2+= 4; rt+= 4;
+ rt1 += 4; rt2 += 4; rt += 4;
}
}
}
static void do_sub_effect_float(float facf0, float facf1, int x, int y,
- float *rect1, float *rect2,
- float *out)
+ float *rect1, float *rect2,
+ float *out)
{
int xo;
float fac1, fac3;
float *rt1, *rt2, *rt;
- xo= x;
- rt1= rect1;
- rt2= rect2;
- rt= out;
+ xo = x;
+ rt1 = rect1;
+ rt2 = rect2;
+ rt = out;
- fac1= facf0;
- fac3= facf1;
+ fac1 = facf0;
+ fac3 = facf1;
while (y--) {
- x= xo * 4;
+ x = xo * 4;
while (x--) {
*rt = *rt1 - fac1 * (*rt2);
rt1++; rt2++; rt++;
}
- if (y==0) break;
+ if (y == 0) break;
y--;
- x= xo * 4;
+ x = xo * 4;
while (x--) {
*rt = *rt1 - fac3 * (*rt2);
@@ -1351,25 +1347,24 @@ static void do_sub_effect_float(float facf0, float facf1, int x, int y,
}
}
-static struct ImBuf * do_sub_effect(
- SeqRenderData context, Sequence *UNUSED(seq), float UNUSED(cfra),
- float facf0, float facf1,
- struct ImBuf *ibuf1, struct ImBuf *ibuf2,
- struct ImBuf *ibuf3)
-{
- struct ImBuf * out = prepare_effect_imbufs(context,ibuf1, ibuf2, ibuf3);
+static struct ImBuf *do_sub_effect(
+ SeqRenderData context, Sequence *UNUSED(seq), float UNUSED(cfra),
+ float facf0, float facf1,
+ struct ImBuf *ibuf1, struct ImBuf *ibuf2,
+ struct ImBuf *ibuf3){
+ struct ImBuf *out = prepare_effect_imbufs(context, ibuf1, ibuf2, ibuf3);
if (out->rect_float) {
do_sub_effect_float(
- facf0, facf1, context.rectx, context.recty,
- ibuf1->rect_float, ibuf2->rect_float,
- out->rect_float);
+ facf0, facf1, context.rectx, context.recty,
+ ibuf1->rect_float, ibuf2->rect_float,
+ out->rect_float);
}
else {
do_sub_effect_byte(
- facf0, facf1, context.rectx, context.recty,
- (char*) ibuf1->rect, (char*) ibuf2->rect,
- (char*) out->rect);
+ facf0, facf1, context.rectx, context.recty,
+ (char *) ibuf1->rect, (char *) ibuf2->rect,
+ (char *) out->rect);
}
return out;
}
@@ -1379,88 +1374,88 @@ static struct ImBuf * do_sub_effect(
* ********************************************************************** */
/* Must be > 0 or add precopy, etc to the function */
-#define XOFF 8
-#define YOFF 8
+#define XOFF 8
+#define YOFF 8
static void do_drop_effect_byte(float facf0, float facf1, int x, int y,
- char *rect2i, char *rect1i,
- char *outi)
+ char *rect2i, char *rect1i,
+ char *outi)
{
int height, width, temp, fac, fac1, fac2;
char *rt1, *rt2, *out;
- int field= 1;
+ int field = 1;
- width= x;
- height= y;
+ width = x;
+ height = y;
- fac1= (int)(70.0f*facf0);
- fac2= (int)(70.0f*facf1);
+ fac1 = (int)(70.0f * facf0);
+ fac2 = (int)(70.0f * facf1);
- rt2= (char*) (rect2i + YOFF*width);
- rt1= (char*) rect1i;
- out= (char*) outi;
- for (y=0; y<height-YOFF; y++) {
- if (field) fac= fac1;
- else fac= fac2;
- field= !field;
+ rt2 = (char *) (rect2i + YOFF * width);
+ rt1 = (char *) rect1i;
+ out = (char *) outi;
+ for (y = 0; y < height - YOFF; y++) {
+ if (field) fac = fac1;
+ else fac = fac2;
+ field = !field;
- memcpy(out, rt1, sizeof(int)*XOFF);
- rt1+= XOFF*4;
- out+= XOFF*4;
+ memcpy(out, rt1, sizeof(int) * XOFF);
+ rt1 += XOFF * 4;
+ out += XOFF * 4;
- for (x=XOFF; x<width; x++) {
- temp= ((fac*rt2[3])>>8);
+ for (x = XOFF; x < width; x++) {
+ temp = ((fac * rt2[3]) >> 8);
- *(out++)= MAX2(0, *rt1 - temp); rt1++;
- *(out++)= MAX2(0, *rt1 - temp); rt1++;
- *(out++)= MAX2(0, *rt1 - temp); rt1++;
- *(out++)= MAX2(0, *rt1 - temp); rt1++;
- rt2+=4;
+ *(out++) = MAX2(0, *rt1 - temp); rt1++;
+ *(out++) = MAX2(0, *rt1 - temp); rt1++;
+ *(out++) = MAX2(0, *rt1 - temp); rt1++;
+ *(out++) = MAX2(0, *rt1 - temp); rt1++;
+ rt2 += 4;
}
- rt2+=XOFF*4;
+ rt2 += XOFF * 4;
}
- memcpy(out, rt1, sizeof(int)*YOFF*width);
+ memcpy(out, rt1, sizeof(int) * YOFF * width);
}
static void do_drop_effect_float(float facf0, float facf1, int x, int y,
- float *rect2i, float *rect1i,
- float *outi)
+ float *rect2i, float *rect1i,
+ float *outi)
{
int height, width;
float temp, fac, fac1, fac2;
float *rt1, *rt2, *out;
- int field= 1;
+ int field = 1;
- width= x;
- height= y;
+ width = x;
+ height = y;
- fac1= 70.0f*facf0;
- fac2= 70.0f*facf1;
+ fac1 = 70.0f * facf0;
+ fac2 = 70.0f * facf1;
- rt2= (rect2i + YOFF*width);
- rt1= rect1i;
- out= outi;
- for (y=0; y<height-YOFF; y++) {
- if (field) fac= fac1;
- else fac= fac2;
- field= !field;
+ rt2 = (rect2i + YOFF * width);
+ rt1 = rect1i;
+ out = outi;
+ for (y = 0; y < height - YOFF; y++) {
+ if (field) fac = fac1;
+ else fac = fac2;
+ field = !field;
- memcpy(out, rt1, 4 * sizeof(float)*XOFF);
- rt1+= XOFF*4;
- out+= XOFF*4;
+ memcpy(out, rt1, 4 * sizeof(float) * XOFF);
+ rt1 += XOFF * 4;
+ out += XOFF * 4;
- for (x=XOFF; x<width; x++) {
- temp= fac * rt2[3];
+ for (x = XOFF; x < width; x++) {
+ temp = fac * rt2[3];
- *(out++)= MAX2(0.0f, *rt1 - temp); rt1++;
- *(out++)= MAX2(0.0f, *rt1 - temp); rt1++;
- *(out++)= MAX2(0.0f, *rt1 - temp); rt1++;
- *(out++)= MAX2(0.0f, *rt1 - temp); rt1++;
- rt2+=4;
+ *(out++) = MAX2(0.0f, *rt1 - temp); rt1++;
+ *(out++) = MAX2(0.0f, *rt1 - temp); rt1++;
+ *(out++) = MAX2(0.0f, *rt1 - temp); rt1++;
+ *(out++) = MAX2(0.0f, *rt1 - temp); rt1++;
+ rt2 += 4;
}
- rt2+=XOFF*4;
+ rt2 += XOFF * 4;
}
- memcpy(out, rt1, 4 * sizeof(float)*YOFF*width);
+ memcpy(out, rt1, 4 * sizeof(float) * YOFF * width);
}
/* **********************************************************************
@@ -1468,19 +1463,19 @@ static void do_drop_effect_float(float facf0, float facf1, int x, int y,
* ********************************************************************** */
static void do_mul_effect_byte(float facf0, float facf1, int x, int y,
- unsigned char *rect1, unsigned char *rect2,
- unsigned char *out)
+ unsigned char *rect1, unsigned char *rect2,
+ unsigned char *out)
{
int xo, fac1, fac3;
char *rt1, *rt2, *rt;
- xo= x;
- rt1= (char *)rect1;
- rt2= (char *)rect2;
- rt= (char *)out;
+ xo = x;
+ rt1 = (char *)rect1;
+ rt2 = (char *)rect2;
+ rt = (char *)out;
- fac1= (int)(256.0f*facf0);
- fac3= (int)(256.0f*facf1);
+ fac1 = (int)(256.0f * facf0);
+ fac3 = (int)(256.0f * facf1);
/* formula:
* fac*(a*b) + (1-fac)*a => fac*a*(b-1)+axaux= c*px + py*s ;//+centx
@@ -1489,48 +1484,48 @@ static void do_mul_effect_byte(float facf0, float facf1, int x, int y,
while (y--) {
- x= xo;
+ x = xo;
while (x--) {
- rt[0]= rt1[0] + ((fac1*rt1[0]*(rt2[0]-256))>>16);
- rt[1]= rt1[1] + ((fac1*rt1[1]*(rt2[1]-256))>>16);
- rt[2]= rt1[2] + ((fac1*rt1[2]*(rt2[2]-256))>>16);
- rt[3]= rt1[3] + ((fac1*rt1[3]*(rt2[3]-256))>>16);
+ rt[0] = rt1[0] + ((fac1 * rt1[0] * (rt2[0] - 256)) >> 16);
+ rt[1] = rt1[1] + ((fac1 * rt1[1] * (rt2[1] - 256)) >> 16);
+ rt[2] = rt1[2] + ((fac1 * rt1[2] * (rt2[2] - 256)) >> 16);
+ rt[3] = rt1[3] + ((fac1 * rt1[3] * (rt2[3] - 256)) >> 16);
- rt1+= 4; rt2+= 4; rt+= 4;
+ rt1 += 4; rt2 += 4; rt += 4;
}
- if (y==0) break;
+ if (y == 0) break;
y--;
- x= xo;
+ x = xo;
while (x--) {
- rt[0]= rt1[0] + ((fac3*rt1[0]*(rt2[0]-256))>>16);
- rt[1]= rt1[1] + ((fac3*rt1[1]*(rt2[1]-256))>>16);
- rt[2]= rt1[2] + ((fac3*rt1[2]*(rt2[2]-256))>>16);
- rt[3]= rt1[3] + ((fac3*rt1[3]*(rt2[3]-256))>>16);
+ rt[0] = rt1[0] + ((fac3 * rt1[0] * (rt2[0] - 256)) >> 16);
+ rt[1] = rt1[1] + ((fac3 * rt1[1] * (rt2[1] - 256)) >> 16);
+ rt[2] = rt1[2] + ((fac3 * rt1[2] * (rt2[2] - 256)) >> 16);
+ rt[3] = rt1[3] + ((fac3 * rt1[3] * (rt2[3] - 256)) >> 16);
- rt1+= 4; rt2+= 4; rt+= 4;
+ rt1 += 4; rt2 += 4; rt += 4;
}
}
}
static void do_mul_effect_float(float facf0, float facf1, int x, int y,
- float *rect1, float *rect2,
- float *out)
+ float *rect1, float *rect2,
+ float *out)
{
int xo;
float fac1, fac3;
float *rt1, *rt2, *rt;
- xo= x;
- rt1= rect1;
- rt2= rect2;
- rt= out;
+ xo = x;
+ rt1 = rect1;
+ rt2 = rect2;
+ rt = out;
- fac1= facf0;
- fac3= facf1;
+ fac1 = facf0;
+ fac3 = facf1;
/* formula:
* fac*(a*b) + (1-fac)*a => fac*a*(b-1)+a
@@ -1538,52 +1533,52 @@ static void do_mul_effect_float(float facf0, float facf1, int x, int y,
while (y--) {
- x= xo;
+ x = xo;
while (x--) {
- rt[0]= rt1[0] + fac1*rt1[0]*(rt2[0]-1.0f);
- rt[1]= rt1[1] + fac1*rt1[1]*(rt2[1]-1.0f);
- rt[2]= rt1[2] + fac1*rt1[2]*(rt2[2]-1.0f);
- rt[3]= rt1[3] + fac1*rt1[3]*(rt2[3]-1.0f);
+ rt[0] = rt1[0] + fac1 * rt1[0] * (rt2[0] - 1.0f);
+ rt[1] = rt1[1] + fac1 * rt1[1] * (rt2[1] - 1.0f);
+ rt[2] = rt1[2] + fac1 * rt1[2] * (rt2[2] - 1.0f);
+ rt[3] = rt1[3] + fac1 * rt1[3] * (rt2[3] - 1.0f);
- rt1+= 4; rt2+= 4; rt+= 4;
+ rt1 += 4; rt2 += 4; rt += 4;
}
- if (y==0) break;
+ if (y == 0) break;
y--;
- x= xo;
+ x = xo;
while (x--) {
- rt[0]= rt1[0] + fac3*rt1[0]*(rt2[0]-1.0f);
- rt[1]= rt1[1] + fac3*rt1[1]*(rt2[1]-1.0f);
- rt[2]= rt1[2] + fac3*rt1[2]*(rt2[2]-1.0f);
- rt[3]= rt1[3] + fac3*rt1[3]*(rt2[3]-1.0f);
+ rt[0] = rt1[0] + fac3 * rt1[0] * (rt2[0] - 1.0f);
+ rt[1] = rt1[1] + fac3 * rt1[1] * (rt2[1] - 1.0f);
+ rt[2] = rt1[2] + fac3 * rt1[2] * (rt2[2] - 1.0f);
+ rt[3] = rt1[3] + fac3 * rt1[3] * (rt2[3] - 1.0f);
- rt1+= 4; rt2+= 4; rt+= 4;
+ rt1 += 4; rt2 += 4; rt += 4;
}
}
}
-static struct ImBuf * do_mul_effect(
- SeqRenderData context, Sequence *UNUSED(seq), float UNUSED(cfra),
- float facf0, float facf1,
- struct ImBuf *ibuf1, struct ImBuf *ibuf2,
- struct ImBuf *ibuf3)
+static struct ImBuf *do_mul_effect(
+ SeqRenderData context, Sequence *UNUSED(seq), float UNUSED(cfra),
+ float facf0, float facf1,
+ struct ImBuf *ibuf1, struct ImBuf *ibuf2,
+ struct ImBuf *ibuf3)
{
- struct ImBuf * out = prepare_effect_imbufs(context,ibuf1, ibuf2, ibuf3);
+ struct ImBuf *out = prepare_effect_imbufs(context, ibuf1, ibuf2, ibuf3);
if (out->rect_float) {
do_mul_effect_float(
- facf0, facf1, context.rectx, context.recty,
- ibuf1->rect_float, ibuf2->rect_float,
- out->rect_float);
+ facf0, facf1, context.rectx, context.recty,
+ ibuf1->rect_float, ibuf2->rect_float,
+ out->rect_float);
}
else {
do_mul_effect_byte(
- facf0, facf1, context.rectx, context.recty,
- (unsigned char*) ibuf1->rect, (unsigned char*) ibuf2->rect,
- (unsigned char*) out->rect);
+ facf0, facf1, context.rectx, context.recty,
+ (unsigned char *) ibuf1->rect, (unsigned char *) ibuf2->rect,
+ (unsigned char *) out->rect);
}
return out;
@@ -1607,12 +1602,12 @@ static void precalc_wipe_zone(WipeZone *wipezone, WipeVars *wipe, int xo, int yo
wipezone->angle = tanf(DEG2RADF(fabsf(wipe->angle)));
wipezone->xo = xo;
wipezone->yo = yo;
- wipezone->width = (int)(wipe->edgeWidth*((xo+yo)/2.0f));
- wipezone->pythangle = 1.0f/sqrtf(wipezone->angle*wipezone->angle + 1.0f);
+ wipezone->width = (int)(wipe->edgeWidth * ((xo + yo) / 2.0f));
+ wipezone->pythangle = 1.0f / sqrtf(wipezone->angle * wipezone->angle + 1.0f);
}
// This function calculates the blur band for the wipe effects
-static float in_band(float width,float dist,int side,int dir)
+static float in_band(float width, float dist, int side, int dir)
{
float alpha;
@@ -1623,28 +1618,28 @@ static float in_band(float width,float dist,int side,int dir)
return (float)side;
if (side == 1)
- alpha = (dist+0.5f*width) / (width);
+ alpha = (dist + 0.5f * width) / (width);
else
- alpha = (0.5f*width-dist) / (width);
+ alpha = (0.5f * width - dist) / (width);
if (dir == 0)
- alpha = 1-alpha;
+ alpha = 1 - alpha;
return alpha;
}
static float check_zone(WipeZone *wipezone, int x, int y,
- Sequence *seq, float facf0)
+ Sequence *seq, float facf0)
{
- float posx, posy,hyp,hyp2,angle,hwidth,b1,b2,b3,pointdist;
+ float posx, posy, hyp, hyp2, angle, hwidth, b1, b2, b3, pointdist;
/* some future stuff */
- // float hyp3,hyp4,b4,b5
- float temp1,temp2,temp3,temp4; //some placeholder variables
+ // float hyp3, hyp4, b4, b5
+ float temp1, temp2, temp3, temp4; //some placeholder variables
int xo = wipezone->xo;
int yo = wipezone->yo;
- float halfx = xo*0.5f;
- float halfy = yo*0.5f;
- float widthf,output=0;
+ float halfx = xo * 0.5f;
+ float halfy = yo * 0.5f;
+ float widthf, output = 0;
WipeVars *wipe = (WipeVars *)seq->effectdata;
int width;
@@ -1670,9 +1665,9 @@ static float check_zone(WipeZone *wipezone, int x, int y,
hyp = fabs(y - posy);
}
else {
- b1 = posy - (-angle)*posx;
- b2 = y - (-angle)*x;
- hyp = fabsf(angle*x+y+(-posy-angle*posx))*wipezone->pythangle;
+ b1 = posy - (-angle) * posx;
+ b2 = y - (-angle) * x;
+ hyp = fabsf(angle * x + y + (-posy - angle * posx)) * wipezone->pythangle;
}
if (angle < 0) {
@@ -1683,186 +1678,186 @@ static float check_zone(WipeZone *wipezone, int x, int y,
if (wipe->forward) {
if (b1 < b2)
- output = in_band(width,hyp,1,1);
+ output = in_band(width, hyp, 1, 1);
else
- output = in_band(width,hyp,0,1);
+ output = in_band(width, hyp, 0, 1);
}
else {
if (b1 < b2)
- output = in_band(width,hyp,0,1);
+ output = in_band(width, hyp, 0, 1);
else
- output = in_band(width,hyp,1,1);
+ output = in_band(width, hyp, 1, 1);
}
- break;
+ break;
case DO_DOUBLE_WIPE:
if (!wipe->forward)
- facf0 = 1.0f-facf0; // Go the other direction
+ facf0 = 1.0f - facf0; // Go the other direction
width = wipezone->width; // calculate the blur width
- hwidth = width*0.5f;
+ hwidth = width * 0.5f;
if (angle == 0) {
- b1 = posy*0.5f;
- b3 = yo-posy*0.5f;
+ b1 = posy * 0.5f;
+ b3 = yo - posy * 0.5f;
b2 = y;
- hyp = abs(y - posy*0.5f);
- hyp2 = abs(y - (yo-posy*0.5f));
+ hyp = abs(y - posy * 0.5f);
+ hyp2 = abs(y - (yo - posy * 0.5f));
}
else {
- b1 = posy*0.5f - (-angle)*posx*0.5f;
- b3 = (yo-posy*0.5f) - (-angle)*(xo-posx*0.5f);
- b2 = y - (-angle)*x;
+ b1 = posy * 0.5f - (-angle) * posx * 0.5f;
+ b3 = (yo - posy * 0.5f) - (-angle) * (xo - posx * 0.5f);
+ b2 = y - (-angle) * x;
- hyp = fabsf(angle*x+y+(-posy*0.5f-angle*posx*0.5f))*wipezone->pythangle;
- hyp2 = fabsf(angle*x+y+(-(yo-posy*0.5f)-angle*(xo-posx*0.5f)))*wipezone->pythangle;
+ hyp = fabsf(angle * x + y + (-posy * 0.5f - angle * posx * 0.5f)) * wipezone->pythangle;
+ hyp2 = fabsf(angle * x + y + (-(yo - posy * 0.5f) - angle * (xo - posx * 0.5f))) * wipezone->pythangle;
}
- hwidth = minf(hwidth, fabsf(b3-b1)/2.0f);
+ hwidth = minf(hwidth, fabsf(b3 - b1) / 2.0f);
- if (b2 < b1 && b2 < b3 ) {
- output = in_band(hwidth,hyp,0,1);
+ if (b2 < b1 && b2 < b3) {
+ output = in_band(hwidth, hyp, 0, 1);
}
- else if (b2 > b1 && b2 > b3 ) {
- output = in_band(hwidth,hyp2,0,1);
+ else if (b2 > b1 && b2 > b3) {
+ output = in_band(hwidth, hyp2, 0, 1);
}
else {
- if ( hyp < hwidth && hyp2 > hwidth )
- output = in_band(hwidth,hyp,1,1);
- else if ( hyp > hwidth && hyp2 < hwidth )
- output = in_band(hwidth,hyp2,1,1);
+ if (hyp < hwidth && hyp2 > hwidth)
+ output = in_band(hwidth, hyp, 1, 1);
+ else if (hyp > hwidth && hyp2 < hwidth)
+ output = in_band(hwidth, hyp2, 1, 1);
else
- output = in_band(hwidth,hyp2,1,1) * in_band(hwidth,hyp,1,1);
+ output = in_band(hwidth, hyp2, 1, 1) * in_band(hwidth, hyp, 1, 1);
}
- if (!wipe->forward)output = 1-output;
- break;
+ if (!wipe->forward) output = 1 - output;
+ break;
case DO_CLOCK_WIPE:
/*
* temp1: angle of effect center in rads
- * temp2: angle of line through (halfx,halfy) and (x,y) in rads
+ * temp2: angle of line through (halfx, halfy) and (x, y) in rads
* temp3: angle of low side of blur
* temp4: angle of high side of blur
*/
output = 1.0f - facf0;
- widthf = wipe->edgeWidth*2.0f*(float)M_PI;
+ widthf = wipe->edgeWidth * 2.0f * (float)M_PI;
temp1 = 2.0f * (float)M_PI * facf0;
if (wipe->forward) {
- temp1 = 2.0f*(float)M_PI - temp1;
+ temp1 = 2.0f * (float)M_PI - temp1;
}
x = x - halfx;
y = y - halfy;
- temp2 = asin(abs(y)/sqrt(x*x + y*y));
+ temp2 = asin(abs(y) / sqrt(x * x + y * y));
if (x <= 0 && y >= 0) temp2 = (float)M_PI - temp2;
- else if (x<=0 && y <= 0) temp2 += (float)M_PI;
- else if (x >= 0 && y <= 0) temp2 = 2.0f*(float)M_PI - temp2;
+ else if (x <= 0 && y <= 0) temp2 += (float)M_PI;
+ else if (x >= 0 && y <= 0) temp2 = 2.0f * (float)M_PI - temp2;
if (wipe->forward) {
- temp3 = temp1-(widthf*0.5f)*facf0;
- temp4 = temp1+(widthf*0.5f)*(1-facf0);
+ temp3 = temp1 - (widthf * 0.5f) * facf0;
+ temp4 = temp1 + (widthf * 0.5f) * (1 - facf0);
}
else {
- temp3 = temp1-(widthf*0.5f)*(1-facf0);
- temp4 = temp1+(widthf*0.5f)*facf0;
+ temp3 = temp1 - (widthf * 0.5f) * (1 - facf0);
+ temp4 = temp1 + (widthf * 0.5f) * facf0;
}
if (temp3 < 0) temp3 = 0;
- if (temp4 > 2.0f*(float)M_PI) temp4 = 2.0f*(float)M_PI;
+ if (temp4 > 2.0f * (float)M_PI) temp4 = 2.0f * (float)M_PI;
if (temp2 < temp3) output = 0;
else if (temp2 > temp4) output = 1;
- else output = (temp2-temp3)/(temp4-temp3);
+ else output = (temp2 - temp3) / (temp4 - temp3);
if (x == 0 && y == 0) output = 1;
if (output != output) output = 1;
if (wipe->forward) output = 1 - output;
- break;
- /* BOX WIPE IS NOT WORKING YET */
- /* case DO_CROSS_WIPE: */
- /* BOX WIPE IS NOT WORKING YET */
+ break;
+ /* BOX WIPE IS NOT WORKING YET */
+ /* case DO_CROSS_WIPE: */
+ /* BOX WIPE IS NOT WORKING YET */
#if 0
case DO_BOX_WIPE:
- if (invert)facf0 = 1-facf0;
+ if (invert) facf0 = 1 - facf0;
- width = (int)(wipe->edgeWidth*((xo+yo)/2.0));
- hwidth = (float)width/2.0;
- if (angle == 0)angle = 0.000001;
- b1 = posy/2 - (-angle)*posx/2;
- b3 = (yo-posy/2) - (-angle)*(xo-posx/2);
- b2 = y - (-angle)*x;
+ width = (int)(wipe->edgeWidth * ((xo + yo) / 2.0));
+ hwidth = (float)width / 2.0;
+ if (angle == 0) angle = 0.000001;
+ b1 = posy / 2 - (-angle) * posx / 2;
+ b3 = (yo - posy / 2) - (-angle) * (xo - posx / 2);
+ b2 = y - (-angle) * x;
- hyp = abs(angle*x+y+(-posy/2-angle*posx/2))*wipezone->pythangle;
- hyp2 = abs(angle*x+y+(-(yo-posy/2)-angle*(xo-posx/2)))*wipezone->pythangle;
+ hyp = abs(angle * x + y + (-posy / 2 - angle * posx / 2)) * wipezone->pythangle;
+ hyp2 = abs(angle * x + y + (-(yo - posy / 2) - angle * (xo - posx / 2))) * wipezone->pythangle;
- temp1 = xo*(1-facf0/2)-xo*facf0/2;
- temp2 = yo*(1-facf0/2)-yo*facf0/2;
- pointdist = sqrt(temp1*temp1 + temp2*temp2);
+ temp1 = xo * (1 - facf0 / 2) - xo * facf0 / 2;
+ temp2 = yo * (1 - facf0 / 2) - yo * facf0 / 2;
+ pointdist = sqrt(temp1 * temp1 + temp2 * temp2);
- if (b2 < b1 && b2 < b3 ) {
+ if (b2 < b1 && b2 < b3) {
if (hwidth < pointdist)
- output = in_band(wipezone,hwidth,hyp,facf0,0,1);
- }
- else if (b2 > b1 && b2 > b3 ) {
+ output = in_band(wipezone, hwidth, hyp, facf0, 0, 1);
+ }
+ else if (b2 > b1 && b2 > b3) {
if (hwidth < pointdist)
- output = in_band(wipezone,hwidth,hyp2,facf0,0,1);
- }
- else {
- if ( hyp < hwidth && hyp2 > hwidth )
- output = in_band(wipezone,hwidth,hyp,facf0,1,1);
- else if ( hyp > hwidth && hyp2 < hwidth )
- output = in_band(wipezone,hwidth,hyp2,facf0,1,1);
+ output = in_band(wipezone, hwidth, hyp2, facf0, 0, 1);
+ }
+ else {
+ if (hyp < hwidth && hyp2 > hwidth)
+ output = in_band(wipezone, hwidth, hyp, facf0, 1, 1);
+ else if (hyp > hwidth && hyp2 < hwidth)
+ output = in_band(wipezone, hwidth, hyp2, facf0, 1, 1);
else
- output = in_band(wipezone,hwidth,hyp2,facf0,1,1) * in_band(wipezone,hwidth,hyp,facf0,1,1);
+ output = in_band(wipezone, hwidth, hyp2, facf0, 1, 1) * in_band(wipezone, hwidth, hyp, facf0, 1, 1);
}
- if (invert)facf0 = 1-facf0;
- angle = -1/angle;
- b1 = posy/2 - (-angle)*posx/2;
- b3 = (yo-posy/2) - (-angle)*(xo-posx/2);
- b2 = y - (-angle)*x;
+ if (invert) facf0 = 1 - facf0;
+ angle = -1 / angle;
+ b1 = posy / 2 - (-angle) * posx / 2;
+ b3 = (yo - posy / 2) - (-angle) * (xo - posx / 2);
+ b2 = y - (-angle) * x;
- hyp = abs(angle*x+y+(-posy/2-angle*posx/2))*wipezone->pythangle;
- hyp2 = abs(angle*x+y+(-(yo-posy/2)-angle*(xo-posx/2)))*wipezone->pythangle;
+ hyp = abs(angle * x + y + (-posy / 2 - angle * posx / 2)) * wipezone->pythangle;
+ hyp2 = abs(angle * x + y + (-(yo - posy / 2) - angle * (xo - posx / 2))) * wipezone->pythangle;
- if (b2 < b1 && b2 < b3 ) {
+ if (b2 < b1 && b2 < b3) {
if (hwidth < pointdist)
- output *= in_band(wipezone,hwidth,hyp,facf0,0,1);
- }
- else if (b2 > b1 && b2 > b3 ) {
+ output *= in_band(wipezone, hwidth, hyp, facf0, 0, 1);
+ }
+ else if (b2 > b1 && b2 > b3) {
if (hwidth < pointdist)
- output *= in_band(wipezone,hwidth,hyp2,facf0,0,1);
- }
- else {
- if ( hyp < hwidth && hyp2 > hwidth )
- output *= in_band(wipezone,hwidth,hyp,facf0,1,1);
- else if ( hyp > hwidth && hyp2 < hwidth )
- output *= in_band(wipezone,hwidth,hyp2,facf0,1,1);
+ output *= in_band(wipezone, hwidth, hyp2, facf0, 0, 1);
+ }
+ else {
+ if (hyp < hwidth && hyp2 > hwidth)
+ output *= in_band(wipezone, hwidth, hyp, facf0, 1, 1);
+ else if (hyp > hwidth && hyp2 < hwidth)
+ output *= in_band(wipezone, hwidth, hyp2, facf0, 1, 1);
else
- output *= in_band(wipezone,hwidth,hyp2,facf0,1,1) * in_band(wipezone,hwidth,hyp,facf0,1,1);
+ output *= in_band(wipezone, hwidth, hyp2, facf0, 1, 1) * in_band(wipezone, hwidth, hyp, facf0, 1, 1);
}
- break;
+ break;
#endif
case DO_IRIS_WIPE:
if (xo > yo) yo = xo;
else xo = yo;
- if (!wipe->forward) facf0 = 1-facf0;
+ if (!wipe->forward) facf0 = 1 - facf0;
width = wipezone->width;
- hwidth = width*0.5f;
+ hwidth = width * 0.5f;
- temp1 = (halfx-(halfx)*facf0);
- pointdist = sqrt(temp1*temp1 + temp1*temp1);
+ temp1 = (halfx - (halfx) * facf0);
+ pointdist = sqrt(temp1 * temp1 + temp1 * temp1);
- temp2 = sqrt((halfx-x)*(halfx-x) + (halfy-y)*(halfy-y));
- if (temp2 > pointdist) output = in_band(hwidth,fabs(temp2-pointdist),0,1);
- else output = in_band(hwidth,fabs(temp2-pointdist),1,1);
+ temp2 = sqrt((halfx - x) * (halfx - x) + (halfy - y) * (halfy - y));
+ if (temp2 > pointdist) output = in_band(hwidth, fabs(temp2 - pointdist), 0, 1);
+ else output = in_band(hwidth, fabs(temp2 - pointdist), 1, 1);
- if (!wipe->forward) output = 1-output;
+ if (!wipe->forward) output = 1 - output;
- break;
+ break;
}
if (output < 0) output = 0;
else if (output > 1) output = 1;
@@ -1871,7 +1866,7 @@ static float check_zone(WipeZone *wipezone, int x, int y,
static void init_wipe_effect(Sequence *seq)
{
- if (seq->effectdata)MEM_freeN(seq->effectdata);
+ if (seq->effectdata) MEM_freeN(seq->effectdata);
seq->effectdata = MEM_callocN(sizeof(struct WipeVars), "wipevars");
}
@@ -1882,7 +1877,7 @@ static int num_inputs_wipe(void)
static void free_wipe_effect(Sequence *seq)
{
- if (seq->effectdata)MEM_freeN(seq->effectdata);
+ if (seq->effectdata) MEM_freeN(seq->effectdata);
seq->effectdata = NULL;
}
@@ -1892,9 +1887,9 @@ static void copy_wipe_effect(Sequence *dst, Sequence *src)
}
static void do_wipe_effect_byte(Sequence *seq, float facf0, float UNUSED(facf1),
- int x, int y,
- unsigned char *rect1,
- unsigned char *rect2, unsigned char *out)
+ int x, int y,
+ unsigned char *rect1,
+ unsigned char *rect2, unsigned char *out)
{
WipeZone wipezone;
WipeVars *wipe = (WipeVars *)seq->effectdata;
@@ -1909,15 +1904,15 @@ static void do_wipe_effect_byte(Sequence *seq, float facf0, float UNUSED(facf1),
xo = x;
yo = y;
- for (y=0;y<yo;y++) {
- for (x=0;x<xo;x++) {
- float check = check_zone(&wipezone,x,y,seq,facf0);
+ for (y = 0; y < yo; y++) {
+ for (x = 0; x < xo; x++) {
+ float check = check_zone(&wipezone, x, y, seq, facf0);
if (check) {
if (rt1) {
- rt[0] = (int)(rt1[0]*check)+ (int)(rt2[0]*(1-check));
- rt[1] = (int)(rt1[1]*check)+ (int)(rt2[1]*(1-check));
- rt[2] = (int)(rt1[2]*check)+ (int)(rt2[2]*(1-check));
- rt[3] = (int)(rt1[3]*check)+ (int)(rt2[3]*(1-check));
+ rt[0] = (int)(rt1[0] * check) + (int)(rt2[0] * (1 - check));
+ rt[1] = (int)(rt1[1] * check) + (int)(rt2[1] * (1 - check));
+ rt[2] = (int)(rt1[2] * check) + (int)(rt2[2] * (1 - check));
+ rt[3] = (int)(rt1[3] * check) + (int)(rt2[3] * (1 - check));
}
else {
rt[0] = 0;
@@ -1941,21 +1936,21 @@ static void do_wipe_effect_byte(Sequence *seq, float facf0, float UNUSED(facf1),
}
}
- rt+=4;
- if (rt1 !=NULL) {
- rt1+=4;
+ rt += 4;
+ if (rt1 != NULL) {
+ rt1 += 4;
}
- if (rt2 !=NULL) {
- rt2+=4;
+ if (rt2 != NULL) {
+ rt2 += 4;
}
}
}
}
static void do_wipe_effect_float(Sequence *seq, float facf0, float UNUSED(facf1),
- int x, int y,
- float *rect1,
- float *rect2, float *out)
+ int x, int y,
+ float *rect1,
+ float *rect2, float *out)
{
WipeZone wipezone;
WipeVars *wipe = (WipeVars *)seq->effectdata;
@@ -1970,15 +1965,15 @@ static void do_wipe_effect_float(Sequence *seq, float facf0, float UNUSED(facf1)
xo = x;
yo = y;
- for (y=0;y<yo;y++) {
- for (x=0;x<xo;x++) {
- float check = check_zone(&wipezone,x,y,seq,facf0);
+ for (y = 0; y < yo; y++) {
+ for (x = 0; x < xo; x++) {
+ float check = check_zone(&wipezone, x, y, seq, facf0);
if (check) {
if (rt1) {
- rt[0] = rt1[0]*check+ rt2[0]*(1-check);
- rt[1] = rt1[1]*check+ rt2[1]*(1-check);
- rt[2] = rt1[2]*check+ rt2[2]*(1-check);
- rt[3] = rt1[3]*check+ rt2[3]*(1-check);
+ rt[0] = rt1[0] * check + rt2[0] * (1 - check);
+ rt[1] = rt1[1] * check + rt2[1] * (1 - check);
+ rt[2] = rt1[2] * check + rt2[2] * (1 - check);
+ rt[3] = rt1[3] * check + rt2[3] * (1 - check);
}
else {
rt[0] = 0;
@@ -2002,36 +1997,35 @@ static void do_wipe_effect_float(Sequence *seq, float facf0, float UNUSED(facf1)
}
}
- rt+=4;
- if (rt1 !=NULL) {
- rt1+=4;
+ rt += 4;
+ if (rt1 != NULL) {
+ rt1 += 4;
}
- if (rt2 !=NULL) {
- rt2+=4;
+ if (rt2 != NULL) {
+ rt2 += 4;
}
}
}
}
-static struct ImBuf * do_wipe_effect(
- SeqRenderData context, Sequence *seq, float UNUSED(cfra),
- float facf0, float facf1,
- struct ImBuf *ibuf1, struct ImBuf *ibuf2,
- struct ImBuf *ibuf3)
-{
- struct ImBuf * out = prepare_effect_imbufs(context,ibuf1, ibuf2, ibuf3);
+static struct ImBuf *do_wipe_effect(
+ SeqRenderData context, Sequence *seq, float UNUSED(cfra),
+ float facf0, float facf1,
+ struct ImBuf *ibuf1, struct ImBuf *ibuf2,
+ struct ImBuf *ibuf3){
+ struct ImBuf *out = prepare_effect_imbufs(context, ibuf1, ibuf2, ibuf3);
if (out->rect_float) {
do_wipe_effect_float(seq,
- facf0, facf1, context.rectx, context.recty,
- ibuf1->rect_float, ibuf2->rect_float,
- out->rect_float);
+ facf0, facf1, context.rectx, context.recty,
+ ibuf1->rect_float, ibuf2->rect_float,
+ out->rect_float);
}
else {
do_wipe_effect_byte(seq,
- facf0, facf1, context.rectx, context.recty,
- (unsigned char*) ibuf1->rect, (unsigned char*) ibuf2->rect,
- (unsigned char*) out->rect);
+ facf0, facf1, context.rectx, context.recty,
+ (unsigned char *) ibuf1->rect, (unsigned char *) ibuf2->rect,
+ (unsigned char *) out->rect);
}
return out;
@@ -2043,7 +2037,7 @@ static void init_transform_effect(Sequence *seq)
{
TransformVars *transform;
- if (seq->effectdata)MEM_freeN(seq->effectdata);
+ if (seq->effectdata) MEM_freeN(seq->effectdata);
seq->effectdata = MEM_callocN(sizeof(struct TransformVars), "transformvars");
transform = (TransformVars *)seq->effectdata;
@@ -2051,14 +2045,14 @@ static void init_transform_effect(Sequence *seq)
transform->ScalexIni = 1.0f;
transform->ScaleyIni = 1.0f;
- transform->xIni=0.0f;
- transform->yIni=0.0f;
+ transform->xIni = 0.0f;
+ transform->yIni = 0.0f;
- transform->rotIni=0.0f;
+ transform->rotIni = 0.0f;
- transform->interpolation=1;
- transform->percent=1;
- transform->uniform_scale=0;
+ transform->interpolation = 1;
+ transform->percent = 1;
+ transform->uniform_scale = 0;
}
static int num_inputs_transform(void)
@@ -2068,7 +2062,7 @@ static int num_inputs_transform(void)
static void free_transform_effect(Sequence *seq)
{
- if (seq->effectdata)MEM_freeN(seq->effectdata);
+ if (seq->effectdata) MEM_freeN(seq->effectdata);
seq->effectdata = NULL;
}
@@ -2078,30 +2072,30 @@ static void copy_transform_effect(Sequence *dst, Sequence *src)
}
static void transform_image(int x, int y, struct ImBuf *ibuf1, struct ImBuf *out,
- float scale_x, float scale_y, float translate_x, float translate_y,
- float rotate, int interpolation)
+ float scale_x, float scale_y, float translate_x, float translate_y,
+ float rotate, int interpolation)
{
int xo, yo, xi, yi;
float xt, yt, xr, yr;
- float s,c;
+ float s, c;
xo = x;
yo = y;
// Rotate
- s= sin(rotate);
- c= cos(rotate);
+ s = sin(rotate);
+ c = cos(rotate);
for (yi = 0; yi < yo; yi++) {
for (xi = 0; xi < xo; xi++) {
//translate point
- xt = xi-translate_x;
- yt = yi-translate_y;
+ xt = xi - translate_x;
+ yt = yi - translate_y;
//rotate point with center ref
- xr = c*xt + s*yt;
- yr = -s*xt + c*yt;
+ xr = c * xt + s * yt;
+ yr = -s * xt + c * yt;
//scale point with center ref
xt = xr / scale_x;
@@ -2112,23 +2106,23 @@ static void transform_image(int x, int y, struct ImBuf *ibuf1, struct ImBuf *out
yt += (yo / 2.0f);
//interpolate
- switch(interpolation) {
- case 0:
- neareast_interpolation(ibuf1,out, xt,yt,xi,yi);
- break;
- case 1:
- bilinear_interpolation(ibuf1,out, xt,yt,xi,yi);
- break;
- case 2:
- bicubic_interpolation(ibuf1,out, xt,yt,xi,yi);
- break;
+ switch (interpolation) {
+ case 0:
+ neareast_interpolation(ibuf1, out, xt, yt, xi, yi);
+ break;
+ case 1:
+ bilinear_interpolation(ibuf1, out, xt, yt, xi, yi);
+ break;
+ case 2:
+ bicubic_interpolation(ibuf1, out, xt, yt, xi, yi);
+ break;
}
}
}
}
static void do_transform(Scene *scene, Sequence *seq, float UNUSED(facf0), int x, int y,
- struct ImBuf *ibuf1,struct ImBuf *out)
+ struct ImBuf *ibuf1, struct ImBuf *out)
{
TransformVars *transform = (TransformVars *)seq->effectdata;
float scale_x, scale_y, translate_x, translate_y, rotate_radians;
@@ -2144,30 +2138,29 @@ static void do_transform(Scene *scene, Sequence *seq, float UNUSED(facf0), int x
// Translate
if (!transform->percent) {
- float rd_s = (scene->r.size/100.0f);
+ float rd_s = (scene->r.size / 100.0f);
- translate_x = transform->xIni*rd_s+(x/2.0f);
- translate_y = transform->yIni*rd_s+(y/2.0f);
+ translate_x = transform->xIni * rd_s + (x / 2.0f);
+ translate_y = transform->yIni * rd_s + (y / 2.0f);
}
else {
- translate_x = x*(transform->xIni/100.0f)+(x/2.0f);
- translate_y = y*(transform->yIni/100.0f)+(y/2.0f);
+ translate_x = x * (transform->xIni / 100.0f) + (x / 2.0f);
+ translate_y = y * (transform->yIni / 100.0f) + (y / 2.0f);
}
// Rotate
rotate_radians = DEG2RADF(transform->rotIni);
- transform_image(x,y, ibuf1, out, scale_x, scale_y, translate_x, translate_y, rotate_radians, transform->interpolation);
+ transform_image(x, y, ibuf1, out, scale_x, scale_y, translate_x, translate_y, rotate_radians, transform->interpolation);
}
-static struct ImBuf * do_transform_effect(
- SeqRenderData context, Sequence *seq,float UNUSED(cfra),
- float facf0, float UNUSED(facf1),
- struct ImBuf *ibuf1, struct ImBuf *ibuf2,
- struct ImBuf *ibuf3)
-{
- struct ImBuf * out = prepare_effect_imbufs(context,ibuf1, ibuf2, ibuf3);
+static struct ImBuf *do_transform_effect(
+ SeqRenderData context, Sequence *seq, float UNUSED(cfra),
+ float facf0, float UNUSED(facf1),
+ struct ImBuf *ibuf1, struct ImBuf *ibuf2,
+ struct ImBuf *ibuf3){
+ struct ImBuf *out = prepare_effect_imbufs(context, ibuf1, ibuf2, ibuf3);
do_transform(context.scene, seq, facf0,
context.rectx, context.recty, ibuf1, out);
@@ -2180,9 +2173,9 @@ static struct ImBuf * do_transform_effect(
* GLOW
* ********************************************************************** */
-static void RVBlurBitmap2_byte ( unsigned char* map, int width,int height,
- float blur,
- int quality)
+static void RVBlurBitmap2_byte(unsigned char *map, int width, int height,
+ float blur,
+ int quality)
/* MUUUCCH better than the previous blur. */
/* We do the blurring in two passes which is a whole lot faster. */
/* I changed the math arount to implement an actual Gaussian */
@@ -2192,26 +2185,26 @@ static void RVBlurBitmap2_byte ( unsigned char* map, int width,int height,
/* a small bitmap. Avoid avoid avoid. */
/*=============================== */
{
- unsigned char* temp=NULL,*swap;
- float *filter=NULL;
- int x,y,i,fx,fy;
- int index, ix, halfWidth;
- float fval, k, curColor[3], curColor2[3], weight=0;
+ unsigned char *temp = NULL, *swap;
+ float *filter = NULL;
+ int x, y, i, fx, fy;
+ int index, ix, halfWidth;
+ float fval, k, curColor[3], curColor2[3], weight = 0;
/* If we're not really blurring, bail out */
- if (blur<=0)
+ if (blur <= 0)
return;
/* Allocate memory for the tempmap and the blur filter matrix */
- temp= MEM_mallocN( (width*height*4), "blurbitmaptemp");
+ temp = MEM_mallocN((width * height * 4), "blurbitmaptemp");
if (!temp)
return;
/* Allocate memory for the filter elements */
- halfWidth = ((quality+1)*blur);
- filter = (float *)MEM_mallocN(sizeof(float)*halfWidth*2, "blurbitmapfilter");
+ halfWidth = ((quality + 1) * blur);
+ filter = (float *)MEM_mallocN(sizeof(float) * halfWidth * 2, "blurbitmapfilter");
if (!filter) {
- MEM_freeN (temp);
+ MEM_freeN(temp);
return;
}
@@ -2221,137 +2214,137 @@ static void RVBlurBitmap2_byte ( unsigned char* map, int width,int height,
/* posted to comp.graphics.algorithms by */
/* Blancmange (bmange@airdmhor.gen.nz) */
- k = -1.0f/(2.0f*(float)M_PI*blur*blur);
- for (ix = 0;ix< halfWidth;ix++) {
- weight = (float)exp(k*(ix*ix));
+ k = -1.0f / (2.0f * (float)M_PI * blur * blur);
+ for (ix = 0; ix < halfWidth; ix++) {
+ weight = (float)exp(k * (ix * ix));
filter[halfWidth - ix] = weight;
filter[halfWidth + ix] = weight;
}
filter[0] = weight;
/* Normalize the array */
- fval=0;
- for (ix = 0;ix< halfWidth*2;ix++)
- fval+=filter[ix];
+ fval = 0;
+ for (ix = 0; ix < halfWidth * 2; ix++)
+ fval += filter[ix];
- for (ix = 0;ix< halfWidth*2;ix++)
- filter[ix]/=fval;
+ for (ix = 0; ix < halfWidth * 2; ix++)
+ filter[ix] /= fval;
/* Blur the rows */
- for (y=0;y<height;y++) {
+ for (y = 0; y < height; y++) {
/* Do the left & right strips */
- for (x=0;x<halfWidth;x++) {
- index=(x+y*width)*4;
- fx=0;
+ for (x = 0; x < halfWidth; x++) {
+ index = (x + y * width) * 4;
+ fx = 0;
zero_v3(curColor);
zero_v3(curColor2);
- for (i=x-halfWidth;i<x+halfWidth;i++) {
- if ((i>=0)&&(i<width)) {
- curColor[0]+=map[(i+y*width)*4+GlowR]*filter[fx];
- curColor[1]+=map[(i+y*width)*4+GlowG]*filter[fx];
- curColor[2]+=map[(i+y*width)*4+GlowB]*filter[fx];
-
- curColor2[0]+=map[(width-1-i+y*width)*4+GlowR] *
- filter[fx];
- curColor2[1]+=map[(width-1-i+y*width)*4+GlowG] *
- filter[fx];
- curColor2[2]+=map[(width-1-i+y*width)*4+GlowB] *
- filter[fx];
+ for (i = x - halfWidth; i < x + halfWidth; i++) {
+ if ((i >= 0) && (i < width)) {
+ curColor[0] += map[(i + y * width) * 4 + GlowR] * filter[fx];
+ curColor[1] += map[(i + y * width) * 4 + GlowG] * filter[fx];
+ curColor[2] += map[(i + y * width) * 4 + GlowB] * filter[fx];
+
+ curColor2[0] += map[(width - 1 - i + y * width) * 4 + GlowR] *
+ filter[fx];
+ curColor2[1] += map[(width - 1 - i + y * width) * 4 + GlowG] *
+ filter[fx];
+ curColor2[2] += map[(width - 1 - i + y * width) * 4 + GlowB] *
+ filter[fx];
}
fx++;
}
- temp[index+GlowR]=curColor[0];
- temp[index+GlowG]=curColor[1];
- temp[index+GlowB]=curColor[2];
+ temp[index + GlowR] = curColor[0];
+ temp[index + GlowG] = curColor[1];
+ temp[index + GlowB] = curColor[2];
- temp[((width-1-x+y*width)*4)+GlowR]=curColor2[0];
- temp[((width-1-x+y*width)*4)+GlowG]=curColor2[1];
- temp[((width-1-x+y*width)*4)+GlowB]=curColor2[2];
+ temp[((width - 1 - x + y * width) * 4) + GlowR] = curColor2[0];
+ temp[((width - 1 - x + y * width) * 4) + GlowG] = curColor2[1];
+ temp[((width - 1 - x + y * width) * 4) + GlowB] = curColor2[2];
}
/* Do the main body */
- for (x=halfWidth;x<width-halfWidth;x++) {
- index=(x+y*width)*4;
- fx=0;
+ for (x = halfWidth; x < width - halfWidth; x++) {
+ index = (x + y * width) * 4;
+ fx = 0;
zero_v3(curColor);
- for (i=x-halfWidth;i<x+halfWidth;i++) {
- curColor[0]+=map[(i+y*width)*4+GlowR]*filter[fx];
- curColor[1]+=map[(i+y*width)*4+GlowG]*filter[fx];
- curColor[2]+=map[(i+y*width)*4+GlowB]*filter[fx];
+ for (i = x - halfWidth; i < x + halfWidth; i++) {
+ curColor[0] += map[(i + y * width) * 4 + GlowR] * filter[fx];
+ curColor[1] += map[(i + y * width) * 4 + GlowG] * filter[fx];
+ curColor[2] += map[(i + y * width) * 4 + GlowB] * filter[fx];
fx++;
}
- temp[index+GlowR]=curColor[0];
- temp[index+GlowG]=curColor[1];
- temp[index+GlowB]=curColor[2];
+ temp[index + GlowR] = curColor[0];
+ temp[index + GlowG] = curColor[1];
+ temp[index + GlowB] = curColor[2];
}
}
/* Swap buffers */
- swap=temp;temp=map;map=swap;
+ swap = temp; temp = map; map = swap;
/* Blur the columns */
- for (x=0;x<width;x++) {
+ for (x = 0; x < width; x++) {
/* Do the top & bottom strips */
- for (y=0;y<halfWidth;y++) {
- index=(x+y*width)*4;
- fy=0;
+ for (y = 0; y < halfWidth; y++) {
+ index = (x + y * width) * 4;
+ fy = 0;
zero_v3(curColor);
zero_v3(curColor2);
- for (i=y-halfWidth;i<y+halfWidth;i++) {
- if ((i>=0)&&(i<height)) {
+ for (i = y - halfWidth; i < y + halfWidth; i++) {
+ if ((i >= 0) && (i < height)) {
/* Bottom */
- curColor[0]+=map[(x+i*width)*4+GlowR]*filter[fy];
- curColor[1]+=map[(x+i*width)*4+GlowG]*filter[fy];
- curColor[2]+=map[(x+i*width)*4+GlowB]*filter[fy];
+ curColor[0] += map[(x + i * width) * 4 + GlowR] * filter[fy];
+ curColor[1] += map[(x + i * width) * 4 + GlowG] * filter[fy];
+ curColor[2] += map[(x + i * width) * 4 + GlowB] * filter[fy];
/* Top */
- curColor2[0]+=map[(x+(height-1-i)*width) *
- 4+GlowR]*filter[fy];
- curColor2[1]+=map[(x+(height-1-i)*width) *
- 4+GlowG]*filter[fy];
- curColor2[2]+=map[(x+(height-1-i)*width) *
- 4+GlowB]*filter[fy];
+ curColor2[0] += map[(x + (height - 1 - i) * width) *
+ 4 + GlowR] * filter[fy];
+ curColor2[1] += map[(x + (height - 1 - i) * width) *
+ 4 + GlowG] * filter[fy];
+ curColor2[2] += map[(x + (height - 1 - i) * width) *
+ 4 + GlowB] * filter[fy];
}
fy++;
}
- temp[index+GlowR]=curColor[0];
- temp[index+GlowG]=curColor[1];
- temp[index+GlowB]=curColor[2];
- temp[((x+(height-1-y)*width)*4)+GlowR]=curColor2[0];
- temp[((x+(height-1-y)*width)*4)+GlowG]=curColor2[1];
- temp[((x+(height-1-y)*width)*4)+GlowB]=curColor2[2];
+ temp[index + GlowR] = curColor[0];
+ temp[index + GlowG] = curColor[1];
+ temp[index + GlowB] = curColor[2];
+ temp[((x + (height - 1 - y) * width) * 4) + GlowR] = curColor2[0];
+ temp[((x + (height - 1 - y) * width) * 4) + GlowG] = curColor2[1];
+ temp[((x + (height - 1 - y) * width) * 4) + GlowB] = curColor2[2];
}
/* Do the main body */
- for (y=halfWidth;y<height-halfWidth;y++) {
- index=(x+y*width)*4;
- fy=0;
+ for (y = halfWidth; y < height - halfWidth; y++) {
+ index = (x + y * width) * 4;
+ fy = 0;
zero_v3(curColor);
- for (i=y-halfWidth;i<y+halfWidth;i++) {
- curColor[0]+=map[(x+i*width)*4+GlowR]*filter[fy];
- curColor[1]+=map[(x+i*width)*4+GlowG]*filter[fy];
- curColor[2]+=map[(x+i*width)*4+GlowB]*filter[fy];
+ for (i = y - halfWidth; i < y + halfWidth; i++) {
+ curColor[0] += map[(x + i * width) * 4 + GlowR] * filter[fy];
+ curColor[1] += map[(x + i * width) * 4 + GlowG] * filter[fy];
+ curColor[2] += map[(x + i * width) * 4 + GlowB] * filter[fy];
fy++;
}
- temp[index+GlowR]=curColor[0];
- temp[index+GlowG]=curColor[1];
- temp[index+GlowB]=curColor[2];
+ temp[index + GlowR] = curColor[0];
+ temp[index + GlowG] = curColor[1];
+ temp[index + GlowB] = curColor[2];
}
}
/* Swap buffers */
- swap=temp;temp=map; /* map=swap; */ /* UNUSED */
+ swap = temp; temp = map; /* map=swap; */ /* UNUSED */
/* Tidy up */
- MEM_freeN (filter);
- MEM_freeN (temp);
+ MEM_freeN(filter);
+ MEM_freeN(temp);
}
-static void RVBlurBitmap2_float ( float* map, int width,int height,
- float blur,
- int quality)
+static void RVBlurBitmap2_float(float *map, int width, int height,
+ float blur,
+ int quality)
/* MUUUCCH better than the previous blur. */
/* We do the blurring in two passes which is a whole lot faster. */
/* I changed the math arount to implement an actual Gaussian */
@@ -2361,26 +2354,26 @@ static void RVBlurBitmap2_float ( float* map, int width,int height,
/* a small bitmap. Avoid avoid avoid. */
/*=============================== */
{
- float* temp=NULL,*swap;
- float *filter=NULL;
- int x,y,i,fx,fy;
- int index, ix, halfWidth;
- float fval, k, curColor[3], curColor2[3], weight=0;
+ float *temp = NULL, *swap;
+ float *filter = NULL;
+ int x, y, i, fx, fy;
+ int index, ix, halfWidth;
+ float fval, k, curColor[3], curColor2[3], weight = 0;
/* If we're not really blurring, bail out */
- if (blur<=0)
+ if (blur <= 0)
return;
/* Allocate memory for the tempmap and the blur filter matrix */
- temp= MEM_mallocN( (width*height*4*sizeof(float)), "blurbitmaptemp");
+ temp = MEM_mallocN((width * height * 4 * sizeof(float)), "blurbitmaptemp");
if (!temp)
return;
/* Allocate memory for the filter elements */
- halfWidth = ((quality+1)*blur);
- filter = (float *)MEM_mallocN(sizeof(float)*halfWidth*2, "blurbitmapfilter");
+ halfWidth = ((quality + 1) * blur);
+ filter = (float *)MEM_mallocN(sizeof(float) * halfWidth * 2, "blurbitmapfilter");
if (!filter) {
- MEM_freeN (temp);
+ MEM_freeN(temp);
return;
}
@@ -2390,133 +2383,133 @@ static void RVBlurBitmap2_float ( float* map, int width,int height,
/* posted to comp.graphics.algorithms by */
/* Blancmange (bmange@airdmhor.gen.nz) */
- k = -1.0f/(2.0f*(float)M_PI*blur*blur);
+ k = -1.0f / (2.0f * (float)M_PI * blur * blur);
- for (ix = 0;ix< halfWidth;ix++) {
- weight = (float)exp(k*(ix*ix));
+ for (ix = 0; ix < halfWidth; ix++) {
+ weight = (float)exp(k * (ix * ix));
filter[halfWidth - ix] = weight;
filter[halfWidth + ix] = weight;
}
filter[0] = weight;
/* Normalize the array */
- fval=0;
- for (ix = 0;ix< halfWidth*2;ix++)
- fval+=filter[ix];
+ fval = 0;
+ for (ix = 0; ix < halfWidth * 2; ix++)
+ fval += filter[ix];
- for (ix = 0;ix< halfWidth*2;ix++)
- filter[ix]/=fval;
+ for (ix = 0; ix < halfWidth * 2; ix++)
+ filter[ix] /= fval;
/* Blur the rows */
- for (y=0;y<height;y++) {
+ for (y = 0; y < height; y++) {
/* Do the left & right strips */
- for (x=0;x<halfWidth;x++) {
- index=(x+y*width)*4;
- fx=0;
- curColor[0]=curColor[1]=curColor[2]=0.0f;
- curColor2[0]=curColor2[1]=curColor2[2]=0.0f;
-
- for (i=x-halfWidth;i<x+halfWidth;i++) {
- if ((i>=0)&&(i<width)) {
- curColor[0]+=map[(i+y*width)*4+GlowR]*filter[fx];
- curColor[1]+=map[(i+y*width)*4+GlowG]*filter[fx];
- curColor[2]+=map[(i+y*width)*4+GlowB]*filter[fx];
-
- curColor2[0]+=map[(width-1-i+y*width)*4+GlowR] *
- filter[fx];
- curColor2[1]+=map[(width-1-i+y*width)*4+GlowG] *
- filter[fx];
- curColor2[2]+=map[(width-1-i+y*width)*4+GlowB] *
- filter[fx];
+ for (x = 0; x < halfWidth; x++) {
+ index = (x + y * width) * 4;
+ fx = 0;
+ curColor[0] = curColor[1] = curColor[2] = 0.0f;
+ curColor2[0] = curColor2[1] = curColor2[2] = 0.0f;
+
+ for (i = x - halfWidth; i < x + halfWidth; i++) {
+ if ((i >= 0) && (i < width)) {
+ curColor[0] += map[(i + y * width) * 4 + GlowR] * filter[fx];
+ curColor[1] += map[(i + y * width) * 4 + GlowG] * filter[fx];
+ curColor[2] += map[(i + y * width) * 4 + GlowB] * filter[fx];
+
+ curColor2[0] += map[(width - 1 - i + y * width) * 4 + GlowR] *
+ filter[fx];
+ curColor2[1] += map[(width - 1 - i + y * width) * 4 + GlowG] *
+ filter[fx];
+ curColor2[2] += map[(width - 1 - i + y * width) * 4 + GlowB] *
+ filter[fx];
}
fx++;
}
- temp[index+GlowR]=curColor[0];
- temp[index+GlowG]=curColor[1];
- temp[index+GlowB]=curColor[2];
+ temp[index + GlowR] = curColor[0];
+ temp[index + GlowG] = curColor[1];
+ temp[index + GlowB] = curColor[2];
- temp[((width-1-x+y*width)*4)+GlowR]=curColor2[0];
- temp[((width-1-x+y*width)*4)+GlowG]=curColor2[1];
- temp[((width-1-x+y*width)*4)+GlowB]=curColor2[2];
+ temp[((width - 1 - x + y * width) * 4) + GlowR] = curColor2[0];
+ temp[((width - 1 - x + y * width) * 4) + GlowG] = curColor2[1];
+ temp[((width - 1 - x + y * width) * 4) + GlowB] = curColor2[2];
}
/* Do the main body */
- for (x=halfWidth;x<width-halfWidth;x++) {
- index=(x+y*width)*4;
- fx=0;
+ for (x = halfWidth; x < width - halfWidth; x++) {
+ index = (x + y * width) * 4;
+ fx = 0;
zero_v3(curColor);
- for (i=x-halfWidth;i<x+halfWidth;i++) {
- curColor[0]+=map[(i+y*width)*4+GlowR]*filter[fx];
- curColor[1]+=map[(i+y*width)*4+GlowG]*filter[fx];
- curColor[2]+=map[(i+y*width)*4+GlowB]*filter[fx];
+ for (i = x - halfWidth; i < x + halfWidth; i++) {
+ curColor[0] += map[(i + y * width) * 4 + GlowR] * filter[fx];
+ curColor[1] += map[(i + y * width) * 4 + GlowG] * filter[fx];
+ curColor[2] += map[(i + y * width) * 4 + GlowB] * filter[fx];
fx++;
}
- temp[index+GlowR]=curColor[0];
- temp[index+GlowG]=curColor[1];
- temp[index+GlowB]=curColor[2];
+ temp[index + GlowR] = curColor[0];
+ temp[index + GlowG] = curColor[1];
+ temp[index + GlowB] = curColor[2];
}
}
/* Swap buffers */
- swap=temp;temp=map;map=swap;
+ swap = temp; temp = map; map = swap;
/* Blur the columns */
- for (x=0;x<width;x++) {
+ for (x = 0; x < width; x++) {
/* Do the top & bottom strips */
- for (y=0;y<halfWidth;y++) {
- index=(x+y*width)*4;
- fy=0;
+ for (y = 0; y < halfWidth; y++) {
+ index = (x + y * width) * 4;
+ fy = 0;
zero_v3(curColor);
zero_v3(curColor2);
- for (i=y-halfWidth;i<y+halfWidth;i++) {
- if ((i>=0)&&(i<height)) {
+ for (i = y - halfWidth; i < y + halfWidth; i++) {
+ if ((i >= 0) && (i < height)) {
/* Bottom */
- curColor[0]+=map[(x+i*width)*4+GlowR]*filter[fy];
- curColor[1]+=map[(x+i*width)*4+GlowG]*filter[fy];
- curColor[2]+=map[(x+i*width)*4+GlowB]*filter[fy];
+ curColor[0] += map[(x + i * width) * 4 + GlowR] * filter[fy];
+ curColor[1] += map[(x + i * width) * 4 + GlowG] * filter[fy];
+ curColor[2] += map[(x + i * width) * 4 + GlowB] * filter[fy];
/* Top */
- curColor2[0]+=map[(x+(height-1-i)*width) *
- 4+GlowR]*filter[fy];
- curColor2[1]+=map[(x+(height-1-i)*width) *
- 4+GlowG]*filter[fy];
- curColor2[2]+=map[(x+(height-1-i)*width) *
- 4+GlowB]*filter[fy];
+ curColor2[0] += map[(x + (height - 1 - i) * width) *
+ 4 + GlowR] * filter[fy];
+ curColor2[1] += map[(x + (height - 1 - i) * width) *
+ 4 + GlowG] * filter[fy];
+ curColor2[2] += map[(x + (height - 1 - i) * width) *
+ 4 + GlowB] * filter[fy];
}
fy++;
}
- temp[index+GlowR]=curColor[0];
- temp[index+GlowG]=curColor[1];
- temp[index+GlowB]=curColor[2];
- temp[((x+(height-1-y)*width)*4)+GlowR]=curColor2[0];
- temp[((x+(height-1-y)*width)*4)+GlowG]=curColor2[1];
- temp[((x+(height-1-y)*width)*4)+GlowB]=curColor2[2];
+ temp[index + GlowR] = curColor[0];
+ temp[index + GlowG] = curColor[1];
+ temp[index + GlowB] = curColor[2];
+ temp[((x + (height - 1 - y) * width) * 4) + GlowR] = curColor2[0];
+ temp[((x + (height - 1 - y) * width) * 4) + GlowG] = curColor2[1];
+ temp[((x + (height - 1 - y) * width) * 4) + GlowB] = curColor2[2];
}
/* Do the main body */
- for (y=halfWidth;y<height-halfWidth;y++) {
- index=(x+y*width)*4;
- fy=0;
+ for (y = halfWidth; y < height - halfWidth; y++) {
+ index = (x + y * width) * 4;
+ fy = 0;
zero_v3(curColor);
- for (i=y-halfWidth;i<y+halfWidth;i++) {
- curColor[0]+=map[(x+i*width)*4+GlowR]*filter[fy];
- curColor[1]+=map[(x+i*width)*4+GlowG]*filter[fy];
- curColor[2]+=map[(x+i*width)*4+GlowB]*filter[fy];
+ for (i = y - halfWidth; i < y + halfWidth; i++) {
+ curColor[0] += map[(x + i * width) * 4 + GlowR] * filter[fy];
+ curColor[1] += map[(x + i * width) * 4 + GlowG] * filter[fy];
+ curColor[2] += map[(x + i * width) * 4 + GlowB] * filter[fy];
fy++;
}
- temp[index+GlowR]=curColor[0];
- temp[index+GlowG]=curColor[1];
- temp[index+GlowB]=curColor[2];
+ temp[index + GlowR] = curColor[0];
+ temp[index + GlowG] = curColor[1];
+ temp[index + GlowB] = curColor[2];
}
}
/* Swap buffers */
- swap=temp;temp=map; /* map=swap; */ /* UNUSED */
+ swap = temp; temp = map; /* map=swap; */ /* UNUSED */
/* Tidy up */
- MEM_freeN (filter);
- MEM_freeN (temp);
+ MEM_freeN(filter);
+ MEM_freeN(temp);
}
@@ -2524,94 +2517,94 @@ static void RVBlurBitmap2_float ( float* map, int width,int height,
/* C must have been previously allocated but it may be A or B. */
/* We clamp values to 255 to prevent weirdness */
/*=============================== */
-static void RVAddBitmaps_byte (unsigned char* a, unsigned char* b, unsigned char* c, int width, int height)
+static void RVAddBitmaps_byte(unsigned char *a, unsigned char *b, unsigned char *c, int width, int height)
{
- int x,y,index;
+ int x, y, index;
- for (y=0;y<height;y++) {
- for (x=0;x<width;x++) {
- index=(x+y*width)*4;
- c[index+GlowR]=MIN2(255,a[index+GlowR]+b[index+GlowR]);
- c[index+GlowG]=MIN2(255,a[index+GlowG]+b[index+GlowG]);
- c[index+GlowB]=MIN2(255,a[index+GlowB]+b[index+GlowB]);
- c[index+GlowA]=MIN2(255,a[index+GlowA]+b[index+GlowA]);
+ for (y = 0; y < height; y++) {
+ for (x = 0; x < width; x++) {
+ index = (x + y * width) * 4;
+ c[index + GlowR] = MIN2(255, a[index + GlowR] + b[index + GlowR]);
+ c[index + GlowG] = MIN2(255, a[index + GlowG] + b[index + GlowG]);
+ c[index + GlowB] = MIN2(255, a[index + GlowB] + b[index + GlowB]);
+ c[index + GlowA] = MIN2(255, a[index + GlowA] + b[index + GlowA]);
}
}
}
-static void RVAddBitmaps_float (float* a, float* b, float* c,
- int width, int height)
+static void RVAddBitmaps_float(float *a, float *b, float *c,
+ int width, int height)
{
- int x,y,index;
+ int x, y, index;
- for (y=0;y<height;y++) {
- for (x=0;x<width;x++) {
- index=(x+y*width)*4;
- c[index+GlowR]= MIN2(1.0f, a[index+GlowR]+b[index+GlowR]);
- c[index+GlowG]= MIN2(1.0f, a[index+GlowG]+b[index+GlowG]);
- c[index+GlowB]= MIN2(1.0f, a[index+GlowB]+b[index+GlowB]);
- c[index+GlowA]= MIN2(1.0f, a[index+GlowA]+b[index+GlowA]);
+ for (y = 0; y < height; y++) {
+ for (x = 0; x < width; x++) {
+ index = (x + y * width) * 4;
+ c[index + GlowR] = MIN2(1.0f, a[index + GlowR] + b[index + GlowR]);
+ c[index + GlowG] = MIN2(1.0f, a[index + GlowG] + b[index + GlowG]);
+ c[index + GlowB] = MIN2(1.0f, a[index + GlowB] + b[index + GlowB]);
+ c[index + GlowA] = MIN2(1.0f, a[index + GlowA] + b[index + GlowA]);
}
}
}
/* For each pixel whose total luminance exceeds the threshold, */
/* Multiply it's value by BOOST and add it to the output map */
-static void RVIsolateHighlights_byte (unsigned char* in, unsigned char* out,
- int width, int height, int threshold,
- float boost, float clamp)
+static void RVIsolateHighlights_byte(unsigned char *in, unsigned char *out,
+ int width, int height, int threshold,
+ float boost, float clamp)
{
- int x,y,index;
- int intensity;
+ int x, y, index;
+ int intensity;
- for (y=0;y< height;y++) {
- for (x=0;x< width;x++) {
- index= (x+y*width)*4;
+ for (y = 0; y < height; y++) {
+ for (x = 0; x < width; x++) {
+ index = (x + y * width) * 4;
/* Isolate the intensity */
- intensity=(in[index+GlowR]+in[index+GlowG]+in[index+GlowB]-threshold);
- if (intensity>0) {
- out[index+GlowR]=MIN2(255*clamp, (in[index+GlowR]*boost*intensity)/255);
- out[index+GlowG]=MIN2(255*clamp, (in[index+GlowG]*boost*intensity)/255);
- out[index+GlowB]=MIN2(255*clamp, (in[index+GlowB]*boost*intensity)/255);
- out[index+GlowA]=MIN2(255*clamp, (in[index+GlowA]*boost*intensity)/255);
+ intensity = (in[index + GlowR] + in[index + GlowG] + in[index + GlowB] - threshold);
+ if (intensity > 0) {
+ out[index + GlowR] = MIN2(255 * clamp, (in[index + GlowR] * boost * intensity) / 255);
+ out[index + GlowG] = MIN2(255 * clamp, (in[index + GlowG] * boost * intensity) / 255);
+ out[index + GlowB] = MIN2(255 * clamp, (in[index + GlowB] * boost * intensity) / 255);
+ out[index + GlowA] = MIN2(255 * clamp, (in[index + GlowA] * boost * intensity) / 255);
}
else {
- out[index+GlowR]=0;
- out[index+GlowG]=0;
- out[index+GlowB]=0;
- out[index+GlowA]=0;
+ out[index + GlowR] = 0;
+ out[index + GlowG] = 0;
+ out[index + GlowB] = 0;
+ out[index + GlowA] = 0;
}
}
}
}
-static void RVIsolateHighlights_float (float* in, float* out,
- int width, int height, float threshold,
- float boost, float clamp)
+static void RVIsolateHighlights_float(float *in, float *out,
+ int width, int height, float threshold,
+ float boost, float clamp)
{
- int x,y,index;
- float intensity;
+ int x, y, index;
+ float intensity;
- for (y=0;y< height;y++) {
- for (x=0;x< width;x++) {
- index= (x+y*width)*4;
+ for (y = 0; y < height; y++) {
+ for (x = 0; x < width; x++) {
+ index = (x + y * width) * 4;
/* Isolate the intensity */
- intensity=(in[index+GlowR]+in[index+GlowG]+in[index+GlowB]-threshold);
- if (intensity>0) {
- out[index+GlowR]=MIN2(clamp, (in[index+GlowR]*boost*intensity));
- out[index+GlowG]=MIN2(clamp, (in[index+GlowG]*boost*intensity));
- out[index+GlowB]=MIN2(clamp, (in[index+GlowB]*boost*intensity));
- out[index+GlowA]=MIN2(clamp, (in[index+GlowA]*boost*intensity));
+ intensity = (in[index + GlowR] + in[index + GlowG] + in[index + GlowB] - threshold);
+ if (intensity > 0) {
+ out[index + GlowR] = MIN2(clamp, (in[index + GlowR] * boost * intensity));
+ out[index + GlowG] = MIN2(clamp, (in[index + GlowG] * boost * intensity));
+ out[index + GlowB] = MIN2(clamp, (in[index + GlowB] * boost * intensity));
+ out[index + GlowA] = MIN2(clamp, (in[index + GlowA] * boost * intensity));
}
else {
- out[index+GlowR]=0;
- out[index+GlowG]=0;
- out[index+GlowB]=0;
- out[index+GlowA]=0;
+ out[index + GlowR] = 0;
+ out[index + GlowG] = 0;
+ out[index + GlowB] = 0;
+ out[index + GlowA] = 0;
}
}
}
@@ -2621,7 +2614,7 @@ static void init_glow_effect(Sequence *seq)
{
GlowVars *glow;
- if (seq->effectdata)MEM_freeN(seq->effectdata);
+ if (seq->effectdata) MEM_freeN(seq->effectdata);
seq->effectdata = MEM_callocN(sizeof(struct GlowVars), "glowvars");
glow = (GlowVars *)seq->effectdata;
@@ -2640,7 +2633,7 @@ static int num_inputs_glow(void)
static void free_glow_effect(Sequence *seq)
{
- if (seq->effectdata)MEM_freeN(seq->effectdata);
+ if (seq->effectdata) MEM_freeN(seq->effectdata);
seq->effectdata = NULL;
}
@@ -2651,56 +2644,56 @@ static void copy_glow_effect(Sequence *dst, Sequence *src)
//void do_glow_effect(Cast *cast, float facf0, float facf1, int xo, int yo, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *outbuf, ImBuf *use)
static void do_glow_effect_byte(Sequence *seq, int render_size, float facf0, float UNUSED(facf1),
- int x, int y, char *rect1,
- char *UNUSED(rect2), char *out)
+ int x, int y, char *rect1,
+ char *UNUSED(rect2), char *out)
{
- unsigned char *outbuf=(unsigned char *)out;
- unsigned char *inbuf=(unsigned char *)rect1;
+ unsigned char *outbuf = (unsigned char *)out;
+ unsigned char *inbuf = (unsigned char *)rect1;
GlowVars *glow = (GlowVars *)seq->effectdata;
- RVIsolateHighlights_byte(inbuf, outbuf , x, y, glow->fMini*765, glow->fBoost * facf0, glow->fClamp);
- RVBlurBitmap2_byte (outbuf, x, y, glow->dDist * (render_size / 100.0f),glow->dQuality);
+ RVIsolateHighlights_byte(inbuf, outbuf, x, y, glow->fMini * 765, glow->fBoost * facf0, glow->fClamp);
+ RVBlurBitmap2_byte(outbuf, x, y, glow->dDist * (render_size / 100.0f), glow->dQuality);
if (!glow->bNoComp)
- RVAddBitmaps_byte (inbuf , outbuf, outbuf, x, y);
+ RVAddBitmaps_byte(inbuf, outbuf, outbuf, x, y);
}
static void do_glow_effect_float(Sequence *seq, int render_size, float facf0, float UNUSED(facf1),
- int x, int y,
- float *rect1, float *UNUSED(rect2), float *out)
+ int x, int y,
+ float *rect1, float *UNUSED(rect2), float *out)
{
float *outbuf = out;
float *inbuf = rect1;
GlowVars *glow = (GlowVars *)seq->effectdata;
- RVIsolateHighlights_float(inbuf, outbuf , x, y, glow->fMini*3.0f, glow->fBoost * facf0, glow->fClamp);
- RVBlurBitmap2_float (outbuf, x, y, glow->dDist * (render_size / 100.0f),glow->dQuality);
+ RVIsolateHighlights_float(inbuf, outbuf, x, y, glow->fMini * 3.0f, glow->fBoost * facf0, glow->fClamp);
+ RVBlurBitmap2_float(outbuf, x, y, glow->dDist * (render_size / 100.0f), glow->dQuality);
if (!glow->bNoComp)
- RVAddBitmaps_float (inbuf , outbuf, outbuf, x, y);
+ RVAddBitmaps_float(inbuf, outbuf, outbuf, x, y);
}
-static struct ImBuf * do_glow_effect(
- SeqRenderData context, Sequence *seq, float UNUSED(cfra),
- float facf0, float facf1,
- struct ImBuf *ibuf1, struct ImBuf *ibuf2,
- struct ImBuf *ibuf3)
+static struct ImBuf *do_glow_effect(
+ SeqRenderData context, Sequence *seq, float UNUSED(cfra),
+ float facf0, float facf1,
+ struct ImBuf *ibuf1, struct ImBuf *ibuf2,
+ struct ImBuf *ibuf3)
{
- struct ImBuf * out = prepare_effect_imbufs(context,ibuf1, ibuf2, ibuf3);
+ struct ImBuf *out = prepare_effect_imbufs(context, ibuf1, ibuf2, ibuf3);
- int render_size = 100*context.rectx/context.scene->r.xsch;
+ int render_size = 100 * context.rectx / context.scene->r.xsch;
if (out->rect_float) {
do_glow_effect_float(seq, render_size,
- facf0, facf1,
- context.rectx, context.recty,
- ibuf1->rect_float, ibuf2->rect_float,
- out->rect_float);
+ facf0, facf1,
+ context.rectx, context.recty,
+ ibuf1->rect_float, ibuf2->rect_float,
+ out->rect_float);
}
else {
do_glow_effect_byte(seq, render_size,
- facf0, facf1,
- context.rectx, context.recty,
- (char*) ibuf1->rect, (char*) ibuf2->rect,
- (char*) out->rect);
+ facf0, facf1,
+ context.rectx, context.recty,
+ (char *) ibuf1->rect, (char *) ibuf2->rect,
+ (char *) out->rect);
}
return out;
@@ -2714,7 +2707,7 @@ static void init_solid_color(Sequence *seq)
{
SolidColorVars *cv;
- if (seq->effectdata)MEM_freeN(seq->effectdata);
+ if (seq->effectdata) MEM_freeN(seq->effectdata);
seq->effectdata = MEM_callocN(sizeof(struct SolidColorVars), "solidcolor");
cv = (SolidColorVars *)seq->effectdata;
@@ -2728,7 +2721,7 @@ static int num_inputs_color(void)
static void free_solid_color(Sequence *seq)
{
- if (seq->effectdata)MEM_freeN(seq->effectdata);
+ if (seq->effectdata) MEM_freeN(seq->effectdata);
seq->effectdata = NULL;
}
@@ -2738,18 +2731,17 @@ static void copy_solid_color(Sequence *dst, Sequence *src)
}
static int early_out_color(struct Sequence *UNUSED(seq),
- float UNUSED(facf0), float UNUSED(facf1))
+ float UNUSED(facf0), float UNUSED(facf1))
{
return -1;
}
-static struct ImBuf * do_solid_color(
- SeqRenderData context, Sequence *seq, float UNUSED(cfra),
- float facf0, float facf1,
- struct ImBuf *ibuf1, struct ImBuf *ibuf2,
- struct ImBuf *ibuf3)
-{
- struct ImBuf * out = prepare_effect_imbufs(context,ibuf1, ibuf2, ibuf3);
+static struct ImBuf *do_solid_color(
+ SeqRenderData context, Sequence *seq, float UNUSED(cfra),
+ float facf0, float facf1,
+ struct ImBuf *ibuf1, struct ImBuf *ibuf2,
+ struct ImBuf *ibuf3){
+ struct ImBuf *out = prepare_effect_imbufs(context, ibuf1, ibuf2, ibuf3);
SolidColorVars *cv = (SolidColorVars *)seq->effectdata;
@@ -2772,20 +2764,20 @@ static struct ImBuf * do_solid_color(
rect = (unsigned char *)out->rect;
- for (y=0; y<out->y; y++) {
- for (x=0; x<out->x; x++, rect+=4) {
- rect[0]= col0[0];
- rect[1]= col0[1];
- rect[2]= col0[2];
- rect[3]= 255;
+ for (y = 0; y < out->y; y++) {
+ for (x = 0; x < out->x; x++, rect += 4) {
+ rect[0] = col0[0];
+ rect[1] = col0[1];
+ rect[2] = col0[2];
+ rect[3] = 255;
}
y++;
- if (y<out->y) {
- for (x=0; x<out->x; x++, rect+=4) {
- rect[0]= col1[0];
- rect[1]= col1[1];
- rect[2]= col1[2];
- rect[3]= 255;
+ if (y < out->y) {
+ for (x = 0; x < out->x; x++, rect += 4) {
+ rect[0] = col1[0];
+ rect[1] = col1[1];
+ rect[2] = col1[2];
+ rect[3] = 255;
}
}
}
@@ -2805,20 +2797,20 @@ static struct ImBuf * do_solid_color(
rect_float = out->rect_float;
- for (y=0; y<out->y; y++) {
- for (x=0; x<out->x; x++, rect_float+=4) {
- rect_float[0]= col0[0];
- rect_float[1]= col0[1];
- rect_float[2]= col0[2];
- rect_float[3]= 1.0;
+ for (y = 0; y < out->y; y++) {
+ for (x = 0; x < out->x; x++, rect_float += 4) {
+ rect_float[0] = col0[0];
+ rect_float[1] = col0[1];
+ rect_float[2] = col0[2];
+ rect_float[3] = 1.0;
}
y++;
- if (y<out->y) {
- for (x=0; x<out->x; x++, rect_float+=4) {
- rect_float[0]= col1[0];
- rect_float[1]= col1[1];
- rect_float[2]= col1[2];
- rect_float[3]= 1.0;
+ if (y < out->y) {
+ for (x = 0; x < out->x; x++, rect_float += 4) {
+ rect_float[0] = col1[0];
+ rect_float[1] = col1[1];
+ rect_float[2] = col1[2];
+ rect_float[3] = 1.0;
}
}
}
@@ -2841,16 +2833,15 @@ static int early_out_multicam(struct Sequence *UNUSED(seq), float UNUSED(facf0),
return -1;
}
-static struct ImBuf * do_multicam(
- SeqRenderData context, Sequence *seq, float cfra,
- float UNUSED(facf0), float UNUSED(facf1),
- struct ImBuf *UNUSED(ibuf1), struct ImBuf *UNUSED(ibuf2),
- struct ImBuf *UNUSED(ibuf3))
-{
- struct ImBuf * i;
- struct ImBuf * out;
- Editing * ed;
- ListBase * seqbasep;
+static struct ImBuf *do_multicam(
+ SeqRenderData context, Sequence *seq, float cfra,
+ float UNUSED(facf0), float UNUSED(facf1),
+ struct ImBuf *UNUSED(ibuf1), struct ImBuf *UNUSED(ibuf2),
+ struct ImBuf *UNUSED(ibuf3)){
+ struct ImBuf *i;
+ struct ImBuf *out;
+ Editing *ed;
+ ListBase *seqbasep;
if (seq->multicam_source == 0 || seq->multicam_source >= seq->machine) {
return NULL;
@@ -2896,12 +2887,11 @@ static int early_out_adjustment(struct Sequence *UNUSED(seq), float UNUSED(facf0
return -1;
}
-static struct ImBuf * do_adjustment_impl(SeqRenderData context, Sequence * seq,
- float cfra)
-{
- Editing * ed;
- ListBase * seqbasep;
- struct ImBuf * i= NULL;
+static struct ImBuf *do_adjustment_impl(SeqRenderData context, Sequence *seq,
+ float cfra){
+ Editing *ed;
+ ListBase *seqbasep;
+ struct ImBuf *i = NULL;
ed = context.scene->ed;
@@ -2909,7 +2899,7 @@ static struct ImBuf * do_adjustment_impl(SeqRenderData context, Sequence * seq,
if (seq->machine > 0) {
i = give_ibuf_seqbase(context, cfra,
- seq->machine - 1, seqbasep);
+ seq->machine - 1, seqbasep);
}
/* found nothing? so let's work the way up the metastrip stack, so
@@ -2918,7 +2908,7 @@ static struct ImBuf * do_adjustment_impl(SeqRenderData context, Sequence * seq,
*/
if (!i) {
- Sequence * meta;
+ Sequence *meta;
meta = seq_metastrip(&ed->seqbase, NULL, seq);
@@ -2930,15 +2920,14 @@ static struct ImBuf * do_adjustment_impl(SeqRenderData context, Sequence * seq,
return i;
}
-static struct ImBuf * do_adjustment(
- SeqRenderData context, Sequence *seq, float cfra,
- float UNUSED(facf0), float UNUSED(facf1),
- struct ImBuf *UNUSED(ibuf1), struct ImBuf *UNUSED(ibuf2),
- struct ImBuf *UNUSED(ibuf3))
-{
- struct ImBuf * i = NULL;
- struct ImBuf * out;
- Editing * ed;
+static struct ImBuf *do_adjustment(
+ SeqRenderData context, Sequence *seq, float cfra,
+ float UNUSED(facf0), float UNUSED(facf1),
+ struct ImBuf *UNUSED(ibuf1), struct ImBuf *UNUSED(ibuf2),
+ struct ImBuf *UNUSED(ibuf3)){
+ struct ImBuf *i = NULL;
+ struct ImBuf *out;
+ Editing *ed;
ed = context.scene->ed;
@@ -2964,11 +2953,11 @@ static struct ImBuf * do_adjustment(
* ********************************************************************** */
static void init_speed_effect(Sequence *seq)
{
- SpeedControlVars * v;
+ SpeedControlVars *v;
if (seq->effectdata) MEM_freeN(seq->effectdata);
seq->effectdata = MEM_callocN(sizeof(struct SpeedControlVars),
- "speedcontrolvars");
+ "speedcontrolvars");
v = (SpeedControlVars *)seq->effectdata;
v->globalSpeed = 1.0;
@@ -2977,9 +2966,9 @@ static void init_speed_effect(Sequence *seq)
v->length = 0;
}
-static void load_speed_effect(Sequence * seq)
+static void load_speed_effect(Sequence *seq)
{
- SpeedControlVars * v = (SpeedControlVars *)seq->effectdata;
+ SpeedControlVars *v = (SpeedControlVars *)seq->effectdata;
v->frameMap = NULL;
v->length = 0;
@@ -2992,7 +2981,7 @@ static int num_inputs_speed(void)
static void free_speed_effect(Sequence *seq)
{
- SpeedControlVars * v = (SpeedControlVars *)seq->effectdata;
+ SpeedControlVars *v = (SpeedControlVars *)seq->effectdata;
if (v->frameMap) MEM_freeN(v->frameMap);
if (seq->effectdata) MEM_freeN(seq->effectdata);
seq->effectdata = NULL;
@@ -3000,7 +2989,7 @@ static void free_speed_effect(Sequence *seq)
static void copy_speed_effect(Sequence *dst, Sequence *src)
{
- SpeedControlVars * v;
+ SpeedControlVars *v;
dst->effectdata = MEM_dupallocN(src->effectdata);
v = (SpeedControlVars *)dst->effectdata;
v->frameMap = NULL;
@@ -3008,15 +2997,15 @@ static void copy_speed_effect(Sequence *dst, Sequence *src)
}
static int early_out_speed(struct Sequence *UNUSED(seq),
- float UNUSED(facf0), float UNUSED(facf1))
+ float UNUSED(facf0), float UNUSED(facf1))
{
return 1;
}
-static void store_icu_yrange_speed(struct Sequence * seq,
- short UNUSED(adrcode), float * ymin, float * ymax)
+static void store_icu_yrange_speed(struct Sequence *seq,
+ short UNUSED(adrcode), float *ymin, float *ymax)
{
- SpeedControlVars * v = (SpeedControlVars *)seq->effectdata;
+ SpeedControlVars *v = (SpeedControlVars *)seq->effectdata;
/* if not already done, load / initialize data */
get_sequence_effect(seq);
@@ -3036,32 +3025,31 @@ static void store_icu_yrange_speed(struct Sequence * seq,
}
}
}
-void sequence_effect_speed_rebuild_map(Scene *scene, Sequence * seq, int force)
+void sequence_effect_speed_rebuild_map(Scene *scene, Sequence *seq, int force)
{
int cfra;
float fallback_fac = 1.0f;
- SpeedControlVars * v = (SpeedControlVars *)seq->effectdata;
- FCurve *fcu= NULL;
+ SpeedControlVars *v = (SpeedControlVars *)seq->effectdata;
+ FCurve *fcu = NULL;
int flags = v->flags;
/* if not already done, load / initialize data */
get_sequence_effect(seq);
- if ( (force == FALSE) &&
- (seq->len == v->length) &&
- (v->frameMap != NULL)
- ) {
+ if ((force == FALSE) &&
+ (seq->len == v->length) &&
+ (v->frameMap != NULL))
+ {
return;
}
- if ( (seq->seq1 == NULL) ||
- (seq->len < 1)
- ) { /* make coverity happy and check for (CID 598) input strip ... */
+ if ((seq->seq1 == NULL) || (seq->len < 1)) {
+ /* make coverity happy and check for (CID 598) input strip ... */
return;
}
/* XXX - new in 2.5x. should we use the animation system this way?
* The fcurve is needed because many frames need evaluating at once - campbell */
- fcu= id_data_find_fcurve(&scene->id, seq, &RNA_Sequence, "speed_factor", 0, NULL);
+ fcu = id_data_find_fcurve(&scene->id, seq, &RNA_Sequence, "speed_factor", 0, NULL);
if (!v->frameMap || v->length != seq->len) {
@@ -3070,7 +3058,7 @@ void sequence_effect_speed_rebuild_map(Scene *scene, Sequence * seq, int force)
v->length = seq->len;
v->frameMap = MEM_callocN(sizeof(float) * v->length,
- "speedcontrol frameMap");
+ "speedcontrol frameMap");
}
fallback_fac = 1.0;
@@ -3080,7 +3068,7 @@ void sequence_effect_speed_rebuild_map(Scene *scene, Sequence * seq, int force)
(seq->seq1->len != 0))
{
fallback_fac = (float) seq->seq1->len /
- (float) (seq->seq1->enddisp - seq->seq1->start);
+ (float) (seq->seq1->enddisp - seq->seq1->start);
flags = SEQ_SPEED_INTEGRATE;
fcu = NULL;
}
@@ -3179,13 +3167,13 @@ static int num_inputs_default(void)
}
static int early_out_noop(struct Sequence *UNUSED(seq),
- float UNUSED(facf0), float UNUSED(facf1))
+ float UNUSED(facf0), float UNUSED(facf1))
{
return 0;
}
static int early_out_fade(struct Sequence *UNUSED(seq),
- float facf0, float facf1)
+ float facf0, float facf1)
{
if (facf0 == 0.0f && facf1 == 0.0f) {
return 1;
@@ -3197,7 +3185,7 @@ static int early_out_fade(struct Sequence *UNUSED(seq),
}
static int early_out_mul_input2(struct Sequence *UNUSED(seq),
- float facf0, float facf1)
+ float facf0, float facf1)
{
if (facf0 == 0.0f && facf1 == 0.0f) {
return 1;
@@ -3205,20 +3193,20 @@ static int early_out_mul_input2(struct Sequence *UNUSED(seq),
return 0;
}
-static void store_icu_yrange_noop(struct Sequence * UNUSED(seq),
- short UNUSED(adrcode), float *UNUSED(ymin), float *UNUSED(ymax))
+static void store_icu_yrange_noop(struct Sequence *UNUSED(seq),
+ short UNUSED(adrcode), float *UNUSED(ymin), float *UNUSED(ymax))
{
/* defaults are fine */
}
static void get_default_fac_noop(struct Sequence *UNUSED(seq), float UNUSED(cfra),
- float * facf0, float * facf1)
+ float *facf0, float *facf1)
{
*facf0 = *facf1 = 1.0;
}
static void get_default_fac_fade(struct Sequence *seq, float cfra,
- float * facf0, float * facf1)
+ float *facf0, float *facf1)
{
*facf0 = (float)(cfra - seq->startdisp);
*facf1 = (float)(*facf0 + 0.5f);
@@ -3226,45 +3214,43 @@ static void get_default_fac_fade(struct Sequence *seq, float cfra,
*facf1 /= seq->len;
}
-static struct ImBuf * do_overdrop_effect(SeqRenderData context,
- Sequence *UNUSED(seq),
- float UNUSED(cfra),
- float facf0, float facf1,
- struct ImBuf * ibuf1,
- struct ImBuf * ibuf2,
- struct ImBuf * ibuf3)
-{
- struct ImBuf * out = prepare_effect_imbufs(context,ibuf1, ibuf2, ibuf3);
+static struct ImBuf *do_overdrop_effect(SeqRenderData context,
+ Sequence *UNUSED(seq),
+ float UNUSED(cfra),
+ float facf0, float facf1,
+ struct ImBuf *ibuf1,
+ struct ImBuf *ibuf2,
+ struct ImBuf *ibuf3){
+ struct ImBuf *out = prepare_effect_imbufs(context, ibuf1, ibuf2, ibuf3);
int x = context.rectx;
int y = context.recty;
if (out->rect_float) {
do_drop_effect_float(
- facf0, facf1, x, y,
- ibuf1->rect_float, ibuf2->rect_float,
- out->rect_float);
+ facf0, facf1, x, y,
+ ibuf1->rect_float, ibuf2->rect_float,
+ out->rect_float);
do_alphaover_effect_float(
- facf0, facf1, x, y,
- ibuf1->rect_float, ibuf2->rect_float,
- out->rect_float);
+ facf0, facf1, x, y,
+ ibuf1->rect_float, ibuf2->rect_float,
+ out->rect_float);
}
else {
do_drop_effect_byte(
- facf0, facf1, x, y,
- (char*) ibuf1->rect,
- (char*) ibuf2->rect,
- (char*) out->rect);
+ facf0, facf1, x, y,
+ (char *) ibuf1->rect,
+ (char *) ibuf2->rect,
+ (char *) out->rect);
do_alphaover_effect_byte(
- facf0, facf1, x, y,
- (char*) ibuf1->rect, (char*) ibuf2->rect,
- (char*) out->rect);
+ facf0, facf1, x, y,
+ (char *) ibuf1->rect, (char *) ibuf2->rect,
+ (char *) out->rect);
}
return out;
}
-static struct SeqEffectHandle get_sequence_effect_impl(int seq_type)
-{
+static struct SeqEffectHandle get_sequence_effect_impl(int seq_type){
struct SeqEffectHandle rval;
int sequence_type = seq_type;
@@ -3280,112 +3266,112 @@ static struct SeqEffectHandle get_sequence_effect_impl(int seq_type)
rval.copy = NULL;
switch (sequence_type) {
- case SEQ_CROSS:
- rval.execute = do_cross_effect;
- rval.early_out = early_out_fade;
- rval.get_default_fac = get_default_fac_fade;
- break;
- case SEQ_GAMCROSS:
- rval.init = init_gammacross;
- rval.load = load_gammacross;
- rval.free = free_gammacross;
- rval.early_out = early_out_fade;
- rval.get_default_fac = get_default_fac_fade;
- rval.execute = do_gammacross_effect;
- break;
- case SEQ_ADD:
- rval.execute = do_add_effect;
- rval.early_out = early_out_mul_input2;
- break;
- case SEQ_SUB:
- rval.execute = do_sub_effect;
- rval.early_out = early_out_mul_input2;
- break;
- case SEQ_MUL:
- rval.execute = do_mul_effect;
- rval.early_out = early_out_mul_input2;
- break;
- case SEQ_ALPHAOVER:
- rval.init = init_alpha_over_or_under;
- rval.execute = do_alphaover_effect;
- break;
- case SEQ_OVERDROP:
- rval.execute = do_overdrop_effect;
- break;
- case SEQ_ALPHAUNDER:
- rval.init = init_alpha_over_or_under;
- rval.execute = do_alphaunder_effect;
- break;
- case SEQ_WIPE:
- rval.init = init_wipe_effect;
- rval.num_inputs = num_inputs_wipe;
- rval.free = free_wipe_effect;
- rval.copy = copy_wipe_effect;
- rval.early_out = early_out_fade;
- rval.get_default_fac = get_default_fac_fade;
- rval.execute = do_wipe_effect;
- break;
- case SEQ_GLOW:
- rval.init = init_glow_effect;
- rval.num_inputs = num_inputs_glow;
- rval.free = free_glow_effect;
- rval.copy = copy_glow_effect;
- rval.execute = do_glow_effect;
- break;
- case SEQ_TRANSFORM:
- rval.init = init_transform_effect;
- rval.num_inputs = num_inputs_transform;
- rval.free = free_transform_effect;
- rval.copy = copy_transform_effect;
- rval.execute = do_transform_effect;
- break;
- case SEQ_SPEED:
- rval.init = init_speed_effect;
- rval.num_inputs = num_inputs_speed;
- rval.load = load_speed_effect;
- rval.free = free_speed_effect;
- rval.copy = copy_speed_effect;
- rval.execute = do_cross_effect;
- rval.early_out = early_out_speed;
- rval.store_icu_yrange = store_icu_yrange_speed;
- break;
- case SEQ_COLOR:
- rval.init = init_solid_color;
- rval.num_inputs = num_inputs_color;
- rval.early_out = early_out_color;
- rval.free = free_solid_color;
- rval.copy = copy_solid_color;
- rval.execute = do_solid_color;
- break;
- case SEQ_PLUGIN:
- rval.init_plugin = init_plugin;
- rval.num_inputs = num_inputs_plugin;
- rval.load = load_plugin;
- rval.free = free_plugin;
- rval.copy = copy_plugin;
- rval.execute = do_plugin_effect;
- rval.early_out = do_plugin_early_out;
- rval.get_default_fac = get_default_fac_fade;
- break;
- case SEQ_MULTICAM:
- rval.num_inputs = num_inputs_multicam;
- rval.early_out = early_out_multicam;
- rval.execute = do_multicam;
- break;
- case SEQ_ADJUSTMENT:
- rval.num_inputs = num_inputs_adjustment;
- rval.early_out = early_out_adjustment;
- rval.execute = do_adjustment;
- break;
+ case SEQ_CROSS:
+ rval.execute = do_cross_effect;
+ rval.early_out = early_out_fade;
+ rval.get_default_fac = get_default_fac_fade;
+ break;
+ case SEQ_GAMCROSS:
+ rval.init = init_gammacross;
+ rval.load = load_gammacross;
+ rval.free = free_gammacross;
+ rval.early_out = early_out_fade;
+ rval.get_default_fac = get_default_fac_fade;
+ rval.execute = do_gammacross_effect;
+ break;
+ case SEQ_ADD:
+ rval.execute = do_add_effect;
+ rval.early_out = early_out_mul_input2;
+ break;
+ case SEQ_SUB:
+ rval.execute = do_sub_effect;
+ rval.early_out = early_out_mul_input2;
+ break;
+ case SEQ_MUL:
+ rval.execute = do_mul_effect;
+ rval.early_out = early_out_mul_input2;
+ break;
+ case SEQ_ALPHAOVER:
+ rval.init = init_alpha_over_or_under;
+ rval.execute = do_alphaover_effect;
+ break;
+ case SEQ_OVERDROP:
+ rval.execute = do_overdrop_effect;
+ break;
+ case SEQ_ALPHAUNDER:
+ rval.init = init_alpha_over_or_under;
+ rval.execute = do_alphaunder_effect;
+ break;
+ case SEQ_WIPE:
+ rval.init = init_wipe_effect;
+ rval.num_inputs = num_inputs_wipe;
+ rval.free = free_wipe_effect;
+ rval.copy = copy_wipe_effect;
+ rval.early_out = early_out_fade;
+ rval.get_default_fac = get_default_fac_fade;
+ rval.execute = do_wipe_effect;
+ break;
+ case SEQ_GLOW:
+ rval.init = init_glow_effect;
+ rval.num_inputs = num_inputs_glow;
+ rval.free = free_glow_effect;
+ rval.copy = copy_glow_effect;
+ rval.execute = do_glow_effect;
+ break;
+ case SEQ_TRANSFORM:
+ rval.init = init_transform_effect;
+ rval.num_inputs = num_inputs_transform;
+ rval.free = free_transform_effect;
+ rval.copy = copy_transform_effect;
+ rval.execute = do_transform_effect;
+ break;
+ case SEQ_SPEED:
+ rval.init = init_speed_effect;
+ rval.num_inputs = num_inputs_speed;
+ rval.load = load_speed_effect;
+ rval.free = free_speed_effect;
+ rval.copy = copy_speed_effect;
+ rval.execute = do_cross_effect;
+ rval.early_out = early_out_speed;
+ rval.store_icu_yrange = store_icu_yrange_speed;
+ break;
+ case SEQ_COLOR:
+ rval.init = init_solid_color;
+ rval.num_inputs = num_inputs_color;
+ rval.early_out = early_out_color;
+ rval.free = free_solid_color;
+ rval.copy = copy_solid_color;
+ rval.execute = do_solid_color;
+ break;
+ case SEQ_PLUGIN:
+ rval.init_plugin = init_plugin;
+ rval.num_inputs = num_inputs_plugin;
+ rval.load = load_plugin;
+ rval.free = free_plugin;
+ rval.copy = copy_plugin;
+ rval.execute = do_plugin_effect;
+ rval.early_out = do_plugin_early_out;
+ rval.get_default_fac = get_default_fac_fade;
+ break;
+ case SEQ_MULTICAM:
+ rval.num_inputs = num_inputs_multicam;
+ rval.early_out = early_out_multicam;
+ rval.execute = do_multicam;
+ break;
+ case SEQ_ADJUSTMENT:
+ rval.num_inputs = num_inputs_adjustment;
+ rval.early_out = early_out_adjustment;
+ rval.execute = do_adjustment;
+ break;
}
return rval;
}
-struct SeqEffectHandle get_sequence_effect(Sequence * seq)
+struct SeqEffectHandle get_sequence_effect(Sequence *seq)
{
- struct SeqEffectHandle rval= {NULL};
+ struct SeqEffectHandle rval = {NULL};
if (seq->type & SEQ_EFFECT) {
rval = get_sequence_effect_impl(seq->type);
@@ -3398,9 +3384,9 @@ struct SeqEffectHandle get_sequence_effect(Sequence * seq)
return rval;
}
-struct SeqEffectHandle get_sequence_blend(Sequence * seq)
+struct SeqEffectHandle get_sequence_blend(Sequence *seq)
{
- struct SeqEffectHandle rval= {NULL};
+ struct SeqEffectHandle rval = {NULL};
if (seq->blend_mode != 0) {
rval = get_sequence_effect_impl(seq->blend_mode);
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index 2d4397d16cd..f36c123e227 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -259,7 +259,7 @@ void seq_free_editing(Scene *scene)
if (ed == NULL)
return;
- SEQ_BEGIN(ed, seq)
+ SEQ_BEGIN (ed, seq)
{
seq_free_sequence(scene, seq);
}
@@ -363,7 +363,7 @@ unsigned int seq_hash_render_data(const SeqRenderData *a)
/* ************************* iterator ************************** */
/* *************** (replaces old WHILE_SEQ) ********************* */
-/* **************** use now SEQ_BEGIN() SEQ_END ***************** */
+/* **************** use now SEQ_BEGIN () SEQ_END ***************** */
/* sequence strip iterator:
* - builds a full array, recursively into meta strips */
@@ -515,8 +515,17 @@ void build_seqar_cb(ListBase *seqbase, Sequence ***seqar, int *totseq,
*seqar = tseqar;
}
+static int metaseq_start(Sequence *metaseq)
+{
+ return metaseq->start + metaseq->startofs;
+}
-static void seq_update_sound_bounds_recursive(Scene *scene, Sequence *metaseq)
+static int metaseq_end(Sequence *metaseq)
+{
+ return metaseq->start + metaseq->len - metaseq->endofs;
+}
+
+static void seq_update_sound_bounds_recursive_rec(Scene *scene, Sequence *metaseq, int start, int end)
{
Sequence *seq;
@@ -524,23 +533,28 @@ static void seq_update_sound_bounds_recursive(Scene *scene, Sequence *metaseq)
* since sound is played outside of evaluating the imbufs, */
for (seq = metaseq->seqbase.first; seq; seq = seq->next) {
if (seq->type == SEQ_META) {
- seq_update_sound_bounds_recursive(scene, seq);
+ seq_update_sound_bounds_recursive_rec(scene, seq, MAX2(start, metaseq_start(seq)), MIN2(end, metaseq_end(seq)));
}
else if (ELEM(seq->type, SEQ_SOUND, SEQ_SCENE)) {
if (seq->scene_sound) {
int startofs = seq->startofs;
int endofs = seq->endofs;
- if (seq->startofs + seq->start < metaseq->start + metaseq->startofs)
- startofs = metaseq->start + metaseq->startofs - seq->start;
+ if (seq->startofs + seq->start < start)
+ startofs = start - seq->start;
- if (seq->start + seq->len - seq->endofs > metaseq->start + metaseq->len - metaseq->endofs)
- endofs = seq->start + seq->len - metaseq->start - metaseq->len + metaseq->endofs;
+ if (seq->start + seq->len - seq->endofs > end)
+ endofs = seq->start + seq->len - end;
sound_move_scene_sound(scene, seq->scene_sound, seq->start + startofs, seq->start + seq->len - endofs, startofs);
}
}
}
}
+static void seq_update_sound_bounds_recursive(Scene *scene, Sequence *metaseq)
+{
+ seq_update_sound_bounds_recursive_rec(scene, metaseq, metaseq_start(metaseq), metaseq_end(metaseq));
+}
+
void calc_sequence_disp(Scene *scene, Sequence *seq)
{
if (seq->startofs && seq->startstill) seq->startstill = 0;
@@ -2085,7 +2099,7 @@ static ImBuf *seq_render_scene_strip(
if (seq->scene_camera)
camera = seq->scene_camera;
else {
- scene_camera_switch_update(scene);
+ BKE_scene_camera_switch_update(scene);
camera = scene->camera;
}
@@ -2113,7 +2127,7 @@ static ImBuf *seq_render_scene_strip(
context.scene->r.seq_prev_type = 3 /* ==OB_SOLID */;
/* opengl offscreen render */
- scene_update_for_newframe(context.bmain, scene, scene->lay);
+ BKE_scene_update_for_newframe(context.bmain, scene, scene->lay);
ibuf = sequencer_view3d_cb(scene, camera, context.rectx, context.recty,
IB_rect, context.scene->r.seq_prev_type, TRUE, err_out);
if (ibuf == NULL) {
@@ -2168,7 +2182,7 @@ static ImBuf *seq_render_scene_strip(
scene->r.cfra = oldcfra;
if (frame != oldcfra)
- scene_update_for_newframe(context.bmain, scene, scene->lay);
+ BKE_scene_update_for_newframe(context.bmain, scene, scene->lay);
#ifdef DURIAN_CAMERA_SWITCH
/* stooping to new low's in hackyness :( */
@@ -3099,13 +3113,17 @@ int seqbase_isolated_sel_check(ListBase *seqbase)
if ( (seq->seq1 && (seq->seq1->flag & SELECT) == 0) ||
(seq->seq2 && (seq->seq2->flag & SELECT) == 0) ||
(seq->seq3 && (seq->seq3->flag & SELECT) == 0) )
+ {
return FALSE;
+ }
}
else {
if ( (seq->seq1 && (seq->seq1->flag & SELECT)) ||
(seq->seq2 && (seq->seq2->flag & SELECT)) ||
(seq->seq3 && (seq->seq3->flag & SELECT)) )
+ {
return FALSE;
+ }
}
}
@@ -3916,8 +3934,7 @@ static Sequence *seq_dupli(struct Scene *scene, struct Scene *scene_to, Sequence
}
if (seq->strip->color_balance) {
- seqn->strip->color_balance
- = MEM_dupallocN(seq->strip->color_balance);
+ seqn->strip->color_balance = MEM_dupallocN(seq->strip->color_balance);
}
if (seq->type == SEQ_META) {
diff --git a/source/blender/blenkernel/intern/shrinkwrap.c b/source/blender/blenkernel/intern/shrinkwrap.c
index 4006837efd6..fdda1c6ec0a 100644
--- a/source/blender/blenkernel/intern/shrinkwrap.c
+++ b/source/blender/blenkernel/intern/shrinkwrap.c
@@ -121,7 +121,7 @@ void space_transform_invert(const SpaceTransform *data, float *co)
static void space_transform_apply_normal(const SpaceTransform *data, float *no)
{
- mul_mat3_m4_v3( ((SpaceTransform*)data)->local2target, no);
+ mul_mat3_m4_v3(((SpaceTransform *)data)->local2target, no);
normalize_v3(no); // TODO: could we just determine de scale value from the matrix?
}
@@ -146,8 +146,7 @@ static void shrinkwrap_calc_nearest_vertex(ShrinkwrapCalcData *calc)
BENCH(bvhtree_from_mesh_verts(&treeData, calc->target, 0.0, 2, 6));
- if (treeData.tree == NULL)
- {
+ if (treeData.tree == NULL) {
OUT_OF_MEMORY();
return;
}
@@ -158,8 +157,7 @@ static void shrinkwrap_calc_nearest_vertex(ShrinkwrapCalcData *calc)
#ifndef __APPLE__
#pragma omp parallel for default(none) private(i) firstprivate(nearest) shared(treeData,calc) schedule(static)
#endif
- for (i = 0; i<calc->numVerts; ++i)
- {
+ for (i = 0; i<calc->numVerts; ++i) {
float *co = calc->vertexCos[i];
float tmp_co[3];
float weight = defvert_array_find_weight_safe(calc->dvert, i, calc->vgroup);
@@ -189,8 +187,7 @@ static void shrinkwrap_calc_nearest_vertex(ShrinkwrapCalcData *calc)
//Found the nearest vertex
- if (nearest.index != -1)
- {
+ if (nearest.index != -1) {
//Adjusting the vertex weight, so that after interpolating it keeps a certain distance from the nearest position
float dist = sasqrt(nearest.dist);
if (dist > FLT_EPSILON) weight *= (dist - calc->keepDist)/dist;
@@ -221,20 +218,19 @@ int normal_projection_project_vertex(char options, const float *vert, const floa
BVHTreeRayHit hit_tmp;
//Copy from hit (we need to convert hit rays from one space coordinates to the other
- memcpy( &hit_tmp, hit, sizeof(hit_tmp) );
+ memcpy(&hit_tmp, hit, sizeof(hit_tmp));
//Apply space transform (TODO readjust dist)
- if (transf)
- {
- copy_v3_v3( tmp_co, vert );
- space_transform_apply( transf, tmp_co );
+ if (transf) {
+ copy_v3_v3(tmp_co, vert);
+ space_transform_apply(transf, tmp_co);
co = tmp_co;
- copy_v3_v3( tmp_no, dir );
- space_transform_apply_normal( transf, tmp_no );
+ copy_v3_v3(tmp_no, dir);
+ space_transform_apply_normal(transf, tmp_no);
no = tmp_no;
- hit_tmp.dist *= mat4_to_scale( ((SpaceTransform*)transf)->local2target );
+ hit_tmp.dist *= mat4_to_scale(((SpaceTransform*)transf)->local2target);
}
else {
co = vert;
@@ -267,7 +263,7 @@ int normal_projection_project_vertex(char options, const float *vert, const floa
hit_tmp.dist = len_v3v3((float *)vert, hit_tmp.co);
}
- memcpy(hit, &hit_tmp, sizeof(hit_tmp) );
+ memcpy(hit, &hit_tmp, sizeof(hit_tmp));
return TRUE;
}
return FALSE;
@@ -298,8 +294,7 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc)
//Prepare data to retrieve the direction in which we should project each vertex
- if (calc->smd->projAxis == MOD_SHRINKWRAP_PROJECT_OVER_NORMAL)
- {
+ if (calc->smd->projAxis == MOD_SHRINKWRAP_PROJECT_OVER_NORMAL) {
if (calc->vert == NULL) return;
}
else {
@@ -316,12 +311,11 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc)
return;
}
- if (calc->smd->auxTarget)
- {
+ if (calc->smd->auxTarget) {
auxMesh = object_get_derived_final(calc->smd->auxTarget);
if (!auxMesh)
return;
- space_transform_setup( &local2aux, calc->ob, calc->smd->auxTarget);
+ space_transform_setup(&local2aux, calc->ob, calc->smd->auxTarget);
}
//After sucessufuly build the trees, start projection vertexs
@@ -332,16 +326,14 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc)
#ifndef __APPLE__
#pragma omp parallel for private(i,hit) schedule(static)
#endif
- for (i = 0; i<calc->numVerts; ++i)
- {
+ for (i = 0; i<calc->numVerts; ++i) {
float *co = calc->vertexCos[i];
float tmp_co[3], tmp_no[3];
float weight = defvert_array_find_weight_safe(calc->dvert, i, calc->vgroup);
if (weight == 0.0f) continue;
- if (calc->vert)
- {
+ if (calc->vert) {
/* calc->vert contains verts from derivedMesh */
/* this coordinated are deformed by vertexCos only for normal projection (to get correct normals) */
/* for other cases calc->varts contains undeformed coordinates and vertexCos should be used */
@@ -364,8 +356,7 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc)
hit.dist = 10000.0f; //TODO: we should use FLT_MAX here, but sweepsphere code isn't prepared for that
//Project over positive direction of axis
- if (use_normal & MOD_SHRINKWRAP_PROJECT_ALLOW_POS_DIR)
- {
+ if (use_normal & MOD_SHRINKWRAP_PROJECT_ALLOW_POS_DIR) {
if (auxData.tree)
normal_projection_project_vertex(0, tmp_co, tmp_no, &local2aux, auxData.tree, &hit, auxData.raycast_callback, &auxData);
@@ -374,8 +365,7 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc)
}
//Project over negative direction of axis
- if (use_normal & MOD_SHRINKWRAP_PROJECT_ALLOW_NEG_DIR && hit.index == -1)
- {
+ if (use_normal & MOD_SHRINKWRAP_PROJECT_ALLOW_NEG_DIR && hit.index == -1) {
float inv_no[3];
negate_v3_v3(inv_no, tmp_no);
@@ -386,8 +376,7 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc)
}
- if (hit.index != -1)
- {
+ if (hit.index != -1) {
madd_v3_v3v3fl(hit.co, hit.co, tmp_no, calc->keepDist);
interp_v3_v3v3(co, co, hit.co, weight);
}
@@ -414,8 +403,7 @@ static void shrinkwrap_calc_nearest_surface_point(ShrinkwrapCalcData *calc)
//Create a bvh-tree of the given target
BENCH(bvhtree_from_mesh_faces( &treeData, calc->target, 0.0, 2, 6));
- if (treeData.tree == NULL)
- {
+ if (treeData.tree == NULL) {
OUT_OF_MEMORY();
return;
}
@@ -429,8 +417,7 @@ static void shrinkwrap_calc_nearest_surface_point(ShrinkwrapCalcData *calc)
#ifndef __APPLE__
#pragma omp parallel for default(none) private(i) firstprivate(nearest) shared(calc,treeData) schedule(static)
#endif
- for (i = 0; i<calc->numVerts; ++i)
- {
+ for (i = 0; i<calc->numVerts; ++i) {
float *co = calc->vertexCos[i];
float tmp_co[3];
float weight = defvert_array_find_weight_safe(calc->dvert, i, calc->vgroup);
@@ -458,10 +445,8 @@ static void shrinkwrap_calc_nearest_surface_point(ShrinkwrapCalcData *calc)
BLI_bvhtree_find_nearest(treeData.tree, tmp_co, &nearest, treeData.nearest_callback, &treeData);
//Found the nearest vertex
- if (nearest.index != -1)
- {
- if (calc->smd->shrinkOpts & MOD_SHRINKWRAP_KEEP_ABOVE_SURFACE)
- {
+ if (nearest.index != -1) {
+ if (calc->smd->shrinkOpts & MOD_SHRINKWRAP_KEEP_ABOVE_SURFACE) {
//Make the vertex stay on the front side of the face
madd_v3_v3v3fl(tmp_co, nearest.co, nearest.no, calc->keepDist);
}
@@ -471,7 +456,7 @@ static void shrinkwrap_calc_nearest_surface_point(ShrinkwrapCalcData *calc)
if (dist > FLT_EPSILON)
interp_v3_v3v3(tmp_co, tmp_co, nearest.co, (dist - calc->keepDist)/dist); //linear interpolation
else
- copy_v3_v3( tmp_co, nearest.co );
+ copy_v3_v3(tmp_co, nearest.co);
}
//Convert the coordinates back to mesh coordinates
@@ -507,12 +492,11 @@ void shrinkwrapModifier_deform(ShrinkwrapModifierData *smd, Object *ob, DerivedM
calc.dvert = dm->getVertDataArray(dm, CD_MDEFORMVERT);
}
else if (calc.ob->type == OB_LATTICE) {
- calc.dvert = lattice_get_deform_verts(calc.ob);
+ calc.dvert = BKE_lattice_deform_verts_get(calc.ob);
}
- if (smd->target)
- {
+ if (smd->target) {
calc.target = object_get_derived_final(smd->target);
//TODO there might be several "bugs" on non-uniform scales matrixs
@@ -528,28 +512,24 @@ void shrinkwrapModifier_deform(ShrinkwrapModifierData *smd, Object *ob, DerivedM
calc.vgroup = defgroup_name_index(calc.ob, smd->vgroup_name);
- if (dm != NULL && smd->shrinkType == MOD_SHRINKWRAP_PROJECT)
- {
+ if (dm != NULL && smd->shrinkType == MOD_SHRINKWRAP_PROJECT) {
//Setup arrays to get vertexs positions, normals and deform weights
calc.vert = dm->getVertDataArray(dm, CD_MVERT);
calc.dvert = dm->getVertDataArray(dm, CD_MDEFORMVERT);
//Using vertexs positions/normals as if a subsurface was applied
- if (smd->subsurfLevels)
- {
+ if (smd->subsurfLevels) {
SubsurfModifierData ssmd= {{NULL}};
ssmd.subdivType = ME_CC_SUBSURF; //catmull clark
ssmd.levels = smd->subsurfLevels; //levels
ss_mesh = subsurf_make_derived_from_derived(dm, &ssmd, FALSE, NULL, 0, 0, (ob->mode & OB_MODE_EDIT));
- if (ss_mesh)
- {
+ if (ss_mesh) {
calc.vert = ss_mesh->getVertDataArray(ss_mesh, CD_MVERT);
- if (calc.vert)
- {
- //TRICKY: this code assumes subsurface will have the transformed original vertices
- //in their original order at the end of the vert array.
+ if (calc.vert) {
+ /* TRICKY: this code assumes subsurface will have the transformed original vertices
+ * in their original order at the end of the vert array. */
calc.vert = calc.vert + ss_mesh->getNumVerts(ss_mesh) - dm->getNumVerts(dm);
}
}
@@ -562,8 +542,7 @@ void shrinkwrapModifier_deform(ShrinkwrapModifierData *smd, Object *ob, DerivedM
//Projecting target defined - lets work!
if (calc.target) {
- switch(smd->shrinkType)
- {
+ switch (smd->shrinkType) {
case MOD_SHRINKWRAP_NEAREST_SURFACE:
BENCH(shrinkwrap_calc_nearest_surface_point(&calc));
break;
diff --git a/source/blender/blenkernel/intern/sketch.c b/source/blender/blenkernel/intern/sketch.c
index 71ea85de716..32681c3a041 100644
--- a/source/blender/blenkernel/intern/sketch.c
+++ b/source/blender/blenkernel/intern/sketch.c
@@ -44,8 +44,7 @@ void freeSketch(SK_Sketch *sketch)
{
SK_Stroke *stk, *next;
- for (stk = sketch->strokes.first; stk; stk = next)
- {
+ for (stk = sketch->strokes.first; stk; stk = next) {
next = stk->next;
sk_freeStroke(stk);
@@ -119,8 +118,7 @@ SK_Stroke* sk_createStroke(void)
void sk_shrinkStrokeBuffer(SK_Stroke *stk)
{
- if (stk->nb_points < stk->buf_size)
- {
+ if (stk->nb_points < stk->buf_size) {
SK_Point *old_points = stk->points;
stk->buf_size = stk->nb_points;
@@ -135,8 +133,7 @@ void sk_shrinkStrokeBuffer(SK_Stroke *stk)
void sk_growStrokeBuffer(SK_Stroke *stk)
{
- if (stk->nb_points == stk->buf_size)
- {
+ if (stk->nb_points == stk->buf_size) {
SK_Point *old_points = stk->points;
stk->buf_size *= 2;
@@ -151,12 +148,10 @@ void sk_growStrokeBuffer(SK_Stroke *stk)
void sk_growStrokeBufferN(SK_Stroke *stk, int n)
{
- if (stk->nb_points + n > stk->buf_size)
- {
+ if (stk->nb_points + n > stk->buf_size) {
SK_Point *old_points = stk->points;
- while (stk->nb_points + n > stk->buf_size)
- {
+ while (stk->nb_points + n > stk->buf_size) {
stk->buf_size *= 2;
}
@@ -202,8 +197,7 @@ void sk_insertStrokePoints(SK_Stroke *stk, SK_Point *pts, int len, int start, in
sk_growStrokeBufferN(stk, len - size);
- if (len != size)
- {
+ if (len != size) {
int tail_size = stk->nb_points - end + 1;
memmove(stk->points + start + len, stk->points + end + 1, tail_size * sizeof(SK_Point));
@@ -218,8 +212,7 @@ void sk_trimStroke(SK_Stroke *stk, int start, int end)
{
int size = end - start + 1;
- if (start > 0)
- {
+ if (start > 0) {
memmove(stk->points, stk->points + start, size * sizeof(SK_Point));
}
@@ -253,8 +246,7 @@ void sk_straightenStroke(SK_Stroke *stk, int start, int end, float p_start[3], f
sk_insertStrokePoint(stk, &pt1, start + 1); /* insert after start */
sk_insertStrokePoint(stk, &pt2, end + 1); /* insert before end (since end was pushed back already) */
- for (i = 1; i < total; i++)
- {
+ for (i = 1; i < total; i++) {
float delta = (float)i / (float)total;
float *p = stk->points[start + 1 + i].p;
@@ -269,30 +261,23 @@ void sk_polygonizeStroke(SK_Stroke *stk, int start, int end)
int i;
/* find first exact points outside of range */
- for (;start > 0; start--)
- {
- if (stk->points[start].type == PT_EXACT)
- {
+ for (;start > 0; start--) {
+ if (stk->points[start].type == PT_EXACT) {
break;
}
}
- for (;end < stk->nb_points - 1; end++)
- {
- if (stk->points[end].type == PT_EXACT)
- {
+ for (;end < stk->nb_points - 1; end++) {
+ if (stk->points[end].type == PT_EXACT) {
break;
}
}
offset = start + 1;
- for (i = start + 1; i < end; i++)
- {
- if (stk->points[i].type == PT_EXACT)
- {
- if (offset != i)
- {
+ for (i = start + 1; i < end; i++) {
+ if (stk->points[i].type == PT_EXACT) {
+ if (offset != i) {
memcpy(stk->points + offset, stk->points + i, sizeof(SK_Point));
}
@@ -301,8 +286,7 @@ void sk_polygonizeStroke(SK_Stroke *stk, int start, int end)
}
/* some points were removes, move end of array */
- if (offset < end)
- {
+ if (offset < end) {
int size = stk->nb_points - end;
memmove(stk->points + offset, stk->points + end, size * sizeof(SK_Point));
stk->nb_points = offset + size;
@@ -323,8 +307,7 @@ void sk_flattenStroke(SK_Stroke *stk, int start, int end)
project_v3_v3v3(normal, distance, normal);
limit = normalize_v3(normal);
- for (i = 1; i < total - 1; i++)
- {
+ for (i = 1; i < total - 1; i++) {
float d = limit * i / total;
float offset[3];
float *p = stk->points[start + i].p;
@@ -342,8 +325,7 @@ void sk_flattenStroke(SK_Stroke *stk, int start, int end)
void sk_removeStroke(SK_Sketch *sketch, SK_Stroke *stk)
{
- if (sketch->active_stroke == stk)
- {
+ if (sketch->active_stroke == stk) {
sketch->active_stroke = NULL;
}
@@ -358,8 +340,7 @@ void sk_reverseStroke(SK_Stroke *stk)
sk_allocStrokeBuffer(stk);
- for (i = 0; i < stk->nb_points; i++)
- {
+ for (i = 0; i < stk->nb_points; i++) {
sk_copyPoint(stk->points + i, old_points + stk->nb_points - 1 - i);
}
@@ -376,8 +357,7 @@ void sk_filterStroke(SK_Stroke *stk, int start, int end)
char work;
int i;
- if (start == -1)
- {
+ if (start == -1) {
start = 0;
end = stk->nb_points - 1;
}
@@ -386,8 +366,7 @@ void sk_filterStroke(SK_Stroke *stk, int start, int end)
stk->nb_points = 0;
/* adding points before range */
- for (i = 0; i < start; i++)
- {
+ for (i = 0; i < start; i++) {
sk_appendStrokePoint(stk, old_points + i);
}
@@ -398,8 +377,7 @@ void sk_filterStroke(SK_Stroke *stk, int start, int end)
work = 1;
/* while still reducing */
- while (work)
- {
+ while (work) {
int ls, le;
work = 0;
@@ -407,15 +385,13 @@ void sk_filterStroke(SK_Stroke *stk, int start, int end)
le = start+1;
/* while not over interval */
- while (ls < end)
- {
+ while (ls < end) {
int max_i = 0;
short v1[2];
float max_dist = 16; /* more than 4 pixels */
/* find the next marked point */
- while (marked[le] == 0)
- {
+ while (marked[le] == 0) {
le++;
}
@@ -424,8 +400,7 @@ void sk_filterStroke(SK_Stroke *stk, int start, int end)
v1[0] = old_points[ls].p2d[1] - old_points[le].p2d[1];
- for ( i = ls + 1; i < le; i++ )
- {
+ for ( i = ls + 1; i < le; i++ ) {
float mul;
float dist;
short v2[2];
@@ -433,8 +408,7 @@ void sk_filterStroke(SK_Stroke *stk, int start, int end)
v2[0] = old_points[i].p2d[0] - old_points[ls].p2d[0];
v2[1] = old_points[i].p2d[1] - old_points[ls].p2d[1];
- if (v2[0] == 0 && v2[1] == 0)
- {
+ if (v2[0] == 0 && v2[1] == 0) {
continue;
}
@@ -442,15 +416,13 @@ void sk_filterStroke(SK_Stroke *stk, int start, int end)
dist = mul * mul * (v2[0]*v2[0] + v2[1]*v2[1]);
- if (dist > max_dist)
- {
+ if (dist > max_dist) {
max_dist = dist;
max_i = i;
}
}
- if (max_i != 0)
- {
+ if (max_i != 0) {
work = 1;
marked[max_i] = 1;
}
@@ -462,10 +434,8 @@ void sk_filterStroke(SK_Stroke *stk, int start, int end)
/* adding points after range */
- for (i = start; i <= end; i++)
- {
- if (marked[i])
- {
+ for (i = start; i <= end; i++) {
+ if (marked[i]) {
sk_appendStrokePoint(stk, old_points + i);
}
}
@@ -473,8 +443,7 @@ void sk_filterStroke(SK_Stroke *stk, int start, int end)
MEM_freeN(marked);
/* adding points after range */
- for (i = end + 1; i < nb_points; i++)
- {
+ for (i = end + 1; i < nb_points; i++) {
sk_appendStrokePoint(stk, old_points + i);
}
@@ -490,13 +459,11 @@ void sk_filterLastContinuousStroke(SK_Stroke *stk)
end = stk->nb_points -1;
- for (start = end - 1; start > 0 && stk->points[start].type == PT_CONTINUOUS; start--)
- {
+ for (start = end - 1; start > 0 && stk->points[start].type == PT_CONTINUOUS; start--) {
/* nothing to do here*/
}
- if (end - start > 1)
- {
+ if (end - start > 1) {
sk_filterStroke(stk, start, end);
}
}
@@ -505,8 +472,7 @@ SK_Point *sk_lastStrokePoint(SK_Stroke *stk)
{
SK_Point *pt = NULL;
- if (stk->nb_points > 0)
- {
+ if (stk->nb_points > 0) {
pt = stk->points + (stk->nb_points - 1);
}
@@ -520,8 +486,7 @@ void sk_endContinuousStroke(SK_Stroke *stk)
void sk_updateNextPoint(SK_Sketch *sketch, SK_Stroke *stk)
{
- if (stk)
- {
+ if (stk) {
memcpy(&sketch->next_point, stk->points[stk->nb_points - 1].p, sizeof(SK_Point));
}
}
@@ -529,8 +494,7 @@ void sk_updateNextPoint(SK_Sketch *sketch, SK_Stroke *stk)
int sk_stroke_filtermval(SK_DrawData *dd)
{
int retval = 0;
- if (ABS(dd->mval[0] - dd->previous_mval[0]) + ABS(dd->mval[1] - dd->previous_mval[1]) > U.gp_manhattendist)
- {
+ if (ABS(dd->mval[0] - dd->previous_mval[0]) + ABS(dd->mval[1] - dd->previous_mval[1]) > U.gp_manhattendist) {
retval = 1;
}
@@ -551,12 +515,10 @@ void sk_deleteSelectedStrokes(SK_Sketch *sketch)
{
SK_Stroke *stk, *next;
- for (stk = sketch->strokes.first; stk; stk = next)
- {
+ for (stk = sketch->strokes.first; stk; stk = next) {
next = stk->next;
- if (stk->selected == 1)
- {
+ if (stk->selected == 1) {
sk_removeStroke(sketch, stk);
}
}
@@ -566,31 +528,26 @@ void sk_selectAllSketch(SK_Sketch *sketch, int mode)
{
SK_Stroke *stk = NULL;
- if (mode == -1)
- {
- for (stk = sketch->strokes.first; stk; stk = stk->next)
- {
+ if (mode == -1) {
+ for (stk = sketch->strokes.first; stk; stk = stk->next) {
stk->selected = 0;
}
}
else if (mode == 0) {
- for (stk = sketch->strokes.first; stk; stk = stk->next)
- {
+ for (stk = sketch->strokes.first; stk; stk = stk->next) {
stk->selected = 1;
}
}
else if (mode == 1) {
int selected = 1;
- for (stk = sketch->strokes.first; stk; stk = stk->next)
- {
+ for (stk = sketch->strokes.first; stk; stk = stk->next) {
selected &= stk->selected;
}
selected ^= 1;
- for (stk = sketch->strokes.first; stk; stk = stk->next)
- {
+ for (stk = sketch->strokes.first; stk; stk = stk->next) {
stk->selected = selected;
}
}
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index 9d13397859d..4b814a5b22b 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -21,6 +21,7 @@
* The Original Code is: all of this file.
*
* Contributor(s): Daniel Genrich
+ * Blender Foundation
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -53,6 +54,7 @@
#include "BKE_bvhutils.h"
#include "BKE_cdderivedmesh.h"
+#include "BKE_collision.h"
#include "BKE_customdata.h"
#include "BKE_DerivedMesh.h"
#include "BKE_effect.h"
@@ -118,8 +120,7 @@ static void tend ( void )
gettimeofday ( &_tend,&tz );
}
-#if 0 // unused
-static double tval()
+static double tval( void )
{
double t1, t2;
t1 = ( double ) _tstart.tv_sec*1000 + ( double ) _tstart.tv_usec/ ( 1000 );
@@ -127,14 +128,16 @@ static double tval()
return t2-t1;
}
#endif
-#endif
struct Object;
struct Scene;
struct DerivedMesh;
struct SmokeModifierData;
-#define TRI_UVOFFSET (1.0 / 4.0)
+#define TRI_UVOFFSET (1./4.)
+
+// timestep default value for nice appearance 0.1f
+#define DT_DEFAULT 0.1f
/* forward declerations */
static void calcTriangleDivs(Object *ob, MVert *verts, int numverts, MFace *tris, int numfaces, int numtris, int **tridivs, float cell_len);
@@ -159,7 +162,7 @@ void smokeModifier_do(SmokeModifierData *UNUSED(smd), Scene *UNUSED(scene), Obje
static int smokeModifier_init (SmokeModifierData *smd, Object *ob, Scene *scene, DerivedMesh *dm)
{
- if ((smd->type & MOD_SMOKE_TYPE_DOMAIN) && smd->domain && !smd->domain->fluid)
+ if((smd->type & MOD_SMOKE_TYPE_DOMAIN) && smd->domain && !smd->domain->fluid)
{
size_t i;
float min[3] = {FLT_MAX, FLT_MAX, FLT_MAX}, max[3] = {-FLT_MAX, -FLT_MAX, -FLT_MAX};
@@ -171,7 +174,7 @@ static int smokeModifier_init (SmokeModifierData *smd, Object *ob, Scene *scene,
res = smd->domain->maxres;
// get BB of domain
- for (i = 0; i < dm->getNumVerts(dm); i++)
+ for(i = 0; i < dm->getNumVerts(dm); i++)
{
float tmp[3];
@@ -198,32 +201,32 @@ static int smokeModifier_init (SmokeModifierData *smd, Object *ob, Scene *scene,
// printf("size: %f, %f, %f\n", size[0], size[1], size[2]);
// prevent crash when initializing a plane as domain
- if ((size[0] < FLT_EPSILON) || (size[1] < FLT_EPSILON) || (size[2] < FLT_EPSILON))
+ if((size[0] < FLT_EPSILON) || (size[1] < FLT_EPSILON) || (size[2] < FLT_EPSILON))
return 0;
- if (size[0] > size[1])
+ if(size[0] > size[1])
{
- if (size[0] > size[2])
+ if(size[0] > size[2])
{
scale = res / size[0];
- smd->domain->dx = size[0] / res;
+ smd->domain->dx = size[0] / res; // dx is in global coords
smd->domain->res[0] = res;
smd->domain->res[1] = (int)(size[1] * scale + 0.5);
smd->domain->res[2] = (int)(size[2] * scale + 0.5);
}
else {
scale = res / size[2];
- smd->domain->dx = size[2] / res;
+ smd->domain->dx = size[2] / res; // dx is in global coords
smd->domain->res[2] = res;
smd->domain->res[0] = (int)(size[0] * scale + 0.5);
smd->domain->res[1] = (int)(size[1] * scale + 0.5);
}
}
else {
- if (size[1] > size[2])
+ if(size[1] > size[2])
{
scale = res / size[1];
- smd->domain->dx = size[1] / res;
+ smd->domain->dx = size[1] / res; // dx is in global coords
smd->domain->res[1] = res;
smd->domain->res[0] = (int)(size[0] * scale + 0.5);
smd->domain->res[2] = (int)(size[2] * scale + 0.5);
@@ -243,10 +246,10 @@ static int smokeModifier_init (SmokeModifierData *smd, Object *ob, Scene *scene,
// printf("res[0]: %d, res[1]: %d, res[2]: %d\n", smd->domain->res[0], smd->domain->res[1], smd->domain->res[2]);
// dt max is 0.1
- smd->domain->fluid = smoke_init(smd->domain->res, smd->domain->p0);
+ smd->domain->fluid = smoke_init(smd->domain->res, smd->domain->p0, DT_DEFAULT);
smd->time = scene->r.cfra;
- if (smd->domain->flags & MOD_SMOKE_HIGHRES)
+ if(smd->domain->flags & MOD_SMOKE_HIGHRES)
{
smd->domain->wt = smoke_turbulence_init(smd->domain->res, smd->domain->amplify + 1, smd->domain->noise);
smd->domain->res_wt[0] = smd->domain->res[0] * (smd->domain->amplify + 1);
@@ -257,72 +260,54 @@ static int smokeModifier_init (SmokeModifierData *smd, Object *ob, Scene *scene,
// printf("(smd->domain->flags & MOD_SMOKE_HIGHRES)\n");
}
- if (!smd->domain->shadow)
+ if(!smd->domain->shadow)
smd->domain->shadow = MEM_callocN(sizeof(float) * smd->domain->res[0] * smd->domain->res[1] * smd->domain->res[2], "SmokeDomainShadow");
smoke_initBlenderRNA(smd->domain->fluid, &(smd->domain->alpha), &(smd->domain->beta), &(smd->domain->time_scale), &(smd->domain->vorticity), &(smd->domain->border_collisions));
- if (smd->domain->wt)
+ if(smd->domain->wt)
{
smoke_initWaveletBlenderRNA(smd->domain->wt, &(smd->domain->strength));
// printf("smoke_initWaveletBlenderRNA\n");
}
return 1;
}
- else if ((smd->type & MOD_SMOKE_TYPE_FLOW) && smd->flow)
+ else if((smd->type & MOD_SMOKE_TYPE_FLOW) && smd->flow)
{
// handle flow object here
// XXX TODO
smd->time = scene->r.cfra;
- if (smd->flow->psys && smd->flow->psys->part && !(smd->flow->flags & MOD_SMOKE_FLOW_INIT))
- {
- // update particle lifetime to be one frame
- smd->flow->psys->part->lifetime = 1; // scene->r.efra + 1;
-
- // use "unborn" flag as standard setting
- smd->flow->psys->part->flag |= PART_UNBORN;
-
- smd->flow->flags |= MOD_SMOKE_FLOW_INIT;
- }
-
-/*
- if (!smd->flow->bvh)
- {
- // smd->flow->bvh = MEM_callocN(sizeof(BVHTreeFromMesh), "smoke_bvhfromfaces");
- // bvhtree_from_mesh_faces(smd->flow->bvh, dm, 0.0, 2, 6);
-
- // copy obmat
- // copy_m4_m4(smd->flow->mat, ob->obmat);
- // copy_m4_m4(smd->flow->mat_old, ob->obmat);
- }
-*/
-
return 1;
}
- else if ((smd->type & MOD_SMOKE_TYPE_COLL))
+ else if((smd->type & MOD_SMOKE_TYPE_COLL))
{
- smd->time = scene->r.cfra;
-
// todo: delete this when loading colls work -dg
- if (!smd->coll)
+
+ if(!smd->coll)
+ {
smokeModifier_createType(smd);
+ }
- if (!smd->coll->points)
+ if(!smd->coll->points)
{
// init collision points
SmokeCollSettings *scs = smd->coll;
+ smd->time = scene->r.cfra;
+
// copy obmat
copy_m4_m4(scs->mat, ob->obmat);
copy_m4_m4(scs->mat_old, ob->obmat);
DM_ensure_tessface(dm);
fill_scs_points(ob, dm, scs);
+
+ // DEBUG printf("scs->dx: %f\n", scs->dx);
}
- if (!smd->coll->bvhtree)
+ if(!smd->coll->bvhtree)
{
smd->coll->bvhtree = NULL; // bvhtree_build_from_smoke ( ob->obmat, dm->getTessFaceArray(dm), dm->getNumTessFaces(dm), dm->getVertArray(dm), dm->getNumVerts(dm), 0.0 );
}
@@ -337,50 +322,52 @@ static void fill_scs_points(Object *ob, DerivedMesh *dm, SmokeCollSettings *scs)
MVert *mvert = dm->getVertArray(dm);
MFace *mface = dm->getTessFaceArray(dm);
int i = 0, divs = 0;
- int *tridivs = NULL;
- float cell_len = 1.0 / 50.0; // for res = 50
+
+ // DG TODO: need to do this dynamically according to the domain object!
+ float cell_len = scs->dx;
int newdivs = 0;
int quads = 0, facecounter = 0;
// count quads
- for (i = 0; i < dm->getNumTessFaces(dm); i++)
+ for(i = 0; i < dm->getNumTessFaces(dm); i++)
{
- if (mface[i].v4)
+ if(mface[i].v4)
quads++;
}
- calcTriangleDivs(ob, mvert, dm->getNumVerts(dm), mface, dm->getNumTessFaces(dm), dm->getNumTessFaces(dm) + quads, &tridivs, cell_len);
+ scs->numtris = dm->getNumTessFaces(dm) + quads;
+ scs->tridivs = NULL;
+ calcTriangleDivs(ob, mvert, dm->getNumVerts(dm), mface, dm->getNumTessFaces(dm), scs->numtris, &(scs->tridivs), cell_len);
// count triangle divisions
- for (i = 0; i < dm->getNumTessFaces(dm) + quads; i++)
+ for(i = 0; i < dm->getNumTessFaces(dm) + quads; i++)
{
- divs += (tridivs[3 * i] + 1) * (tridivs[3 * i + 1] + 1) * (tridivs[3 * i + 2] + 1);
+ divs += (scs->tridivs[3 * i] + 1) * (scs->tridivs[3 * i + 1] + 1) * (scs->tridivs[3 * i + 2] + 1);
}
- // printf("divs: %d\n", divs);
-
scs->points = MEM_callocN(sizeof(float) * (dm->getNumVerts(dm) + divs) * 3, "SmokeCollPoints");
+ scs->points_old = MEM_callocN(sizeof(float) * (dm->getNumVerts(dm) + divs) * 3, "SmokeCollPointsOld");
- for (i = 0; i < dm->getNumVerts(dm); i++)
+ for(i = 0; i < dm->getNumVerts(dm); i++)
{
float tmpvec[3];
copy_v3_v3(tmpvec, mvert[i].co);
- mul_m4_v3(ob->obmat, tmpvec);
+ // mul_m4_v3(ob->obmat, tmpvec); // DG: use local coordinates, we save MAT anyway
copy_v3_v3(&scs->points[i * 3], tmpvec);
}
- for (i = 0, facecounter = 0; i < dm->getNumTessFaces(dm); i++)
+ for(i = 0, facecounter = 0; i < dm->getNumTessFaces(dm); i++)
{
int again = 0;
do
{
int j, k;
- int divs1 = tridivs[3 * facecounter + 0];
- int divs2 = tridivs[3 * facecounter + 1];
- //int divs3 = tridivs[3 * facecounter + 2];
+ int divs1 = scs->tridivs[3 * facecounter + 0];
+ int divs2 = scs->tridivs[3 * facecounter + 1];
+ //int divs3 = scs->tridivs[3 * facecounter + 2];
float side1[3], side2[3], trinormorg[3], trinorm[3];
- if (again == 1 && mface[i].v4)
+ if(again == 1 && mface[i].v4)
{
sub_v3_v3v3(side1, mvert[ mface[i].v3 ].co, mvert[ mface[i].v1 ].co);
sub_v3_v3v3(side2, mvert[ mface[i].v4 ].co, mvert[ mface[i].v1 ].co);
@@ -395,23 +382,23 @@ static void fill_scs_points(Object *ob, DerivedMesh *dm, SmokeCollSettings *scs)
copy_v3_v3(trinorm, trinormorg);
mul_v3_fl(trinorm, 0.25 * cell_len);
- for (j = 0; j <= divs1; j++)
+ for(j = 0; j <= divs1; j++)
{
- for (k = 0; k <= divs2; k++)
+ for(k = 0; k <= divs2; k++)
{
float p1[3], p2[3], p3[3], p[3]={0,0,0};
const float uf = (float)(j + TRI_UVOFFSET) / (float)(divs1 + 0.0);
const float vf = (float)(k + TRI_UVOFFSET) / (float)(divs2 + 0.0);
float tmpvec[3];
- if (uf+vf > 1.0)
+ if(uf+vf > 1.0)
{
// printf("bigger - divs1: %d, divs2: %d\n", divs1, divs2);
continue;
}
copy_v3_v3(p1, mvert[ mface[i].v1 ].co);
- if (again == 1 && mface[i].v4)
+ if(again == 1 && mface[i].v4)
{
copy_v3_v3(p2, mvert[ mface[i].v3 ].co);
copy_v3_v3(p3, mvert[ mface[i].v4 ].co);
@@ -428,40 +415,211 @@ static void fill_scs_points(Object *ob, DerivedMesh *dm, SmokeCollSettings *scs)
add_v3_v3v3(p, p1, p2);
add_v3_v3(p, p3);
- if (newdivs > divs)
+ if(newdivs > divs)
printf("mem problem\n");
// mMovPoints.push_back(p + trinorm);
add_v3_v3v3(tmpvec, p, trinorm);
- mul_m4_v3(ob->obmat, tmpvec);
+ // mul_m4_v3(ob->obmat, tmpvec); // DG: use local coordinates, we save MAT anyway
copy_v3_v3(&scs->points[3 * (dm->getNumVerts(dm) + newdivs)], tmpvec);
newdivs++;
- if (newdivs > divs)
+ if(newdivs > divs)
printf("mem problem\n");
// mMovPoints.push_back(p - trinorm);
copy_v3_v3(tmpvec, p);
sub_v3_v3(tmpvec, trinorm);
- mul_m4_v3(ob->obmat, tmpvec);
+ // mul_m4_v3(ob->obmat, tmpvec); // DG: use local coordinates, we save MAT anyway
copy_v3_v3(&scs->points[3 * (dm->getNumVerts(dm) + newdivs)], tmpvec);
newdivs++;
}
}
- if (again == 0 && mface[i].v4)
+ if(again == 0 && mface[i].v4)
again++;
else
again = 0;
facecounter++;
- } while (again!=0);
+ } while(again!=0);
}
+ scs->numverts = dm->getNumVerts(dm);
+ // DG TODO: also save triangle count?
+
scs->numpoints = dm->getNumVerts(dm) + newdivs;
- MEM_freeN(tridivs);
+ for(i = 0; i < scs->numpoints * 3; i++)
+ {
+ scs->points_old[i] = scs->points[i];
+ }
+}
+
+
+static void fill_scs_points_anim(Object *UNUSED(ob), DerivedMesh *dm, SmokeCollSettings *scs)
+{
+ MVert *mvert = dm->getVertArray(dm);
+ MFace *mface = dm->getTessFaceArray(dm);
+ int quads = 0, numtris = 0, facecounter = 0;
+ unsigned int i = 0;
+ int divs = 0, newdivs = 0;
+
+ // DG TODO: need to do this dynamically according to the domain object!
+ float cell_len = scs->dx;
+
+ // count quads
+ for(i = 0; i < dm->getNumTessFaces(dm); i++)
+ {
+ if(mface[i].v4)
+ quads++;
+ }
+
+ numtris = dm->getNumTessFaces(dm) + quads;
+
+ // check if mesh changed topology
+ if(scs->numtris != numtris)
+ return;
+ if(scs->numverts != dm->getNumVerts(dm))
+ return;
+
+ // update new positions
+ for(i = 0; i < dm->getNumVerts(dm); i++)
+ {
+ float tmpvec[3];
+ copy_v3_v3(tmpvec, mvert[i].co);
+ copy_v3_v3(&scs->points[i * 3], tmpvec);
+ }
+
+ // for every triangle // update div points
+ for(i = 0, facecounter = 0; i < dm->getNumTessFaces(dm); i++)
+ {
+ int again = 0;
+ do
+ {
+ int j, k;
+ int divs1 = scs->tridivs[3 * facecounter + 0];
+ int divs2 = scs->tridivs[3 * facecounter + 1];
+ float srcside1[3], srcside2[3], destside1[3], destside2[3], src_trinormorg[3], dest_trinormorg[3], src_trinorm[3], dest_trinorm[3];
+
+ if(again == 1 && mface[i].v4)
+ {
+ sub_v3_v3v3(srcside1, &scs->points_old[mface[i].v3 * 3], &scs->points_old[mface[i].v1 * 3]);
+ sub_v3_v3v3(destside1, &scs->points[mface[i].v3 * 3], &scs->points[mface[i].v1 * 3]);
+
+ sub_v3_v3v3(srcside2, &scs->points_old[mface[i].v4 * 3], &scs->points_old[mface[i].v1 * 3]);
+ sub_v3_v3v3(destside2, &scs->points[mface[i].v4 * 3], &scs->points[mface[i].v1 * 3]);
+ }
+ else {
+ sub_v3_v3v3(srcside1, &scs->points_old[mface[i].v2 * 3], &scs->points_old[mface[i].v1 * 3]);
+ sub_v3_v3v3(destside1, &scs->points[mface[i].v2 * 3], &scs->points[mface[i].v1 * 3]);
+
+ sub_v3_v3v3(srcside2, &scs->points_old[mface[i].v3 * 3], &scs->points_old[mface[i].v1 * 3]);
+ sub_v3_v3v3(destside2, &scs->points[mface[i].v3 * 3], &scs->points[mface[i].v1 * 3]);
+ }
+
+ cross_v3_v3v3(src_trinormorg, srcside1, srcside2);
+ cross_v3_v3v3(dest_trinormorg, destside1, destside2);
+
+ normalize_v3(src_trinormorg);
+ normalize_v3(dest_trinormorg);
+
+ copy_v3_v3(src_trinorm, src_trinormorg);
+ copy_v3_v3(dest_trinorm, dest_trinormorg);
+
+ mul_v3_fl(src_trinorm, 0.25 * cell_len);
+ mul_v3_fl(dest_trinorm, 0.25 * cell_len);
+
+ for(j = 0; j <= divs1; j++)
+ {
+ for(k = 0; k <= divs2; k++)
+ {
+ float src_p1[3], src_p2[3], src_p3[3], src_p[3]={0,0,0};
+ float dest_p1[3], dest_p2[3], dest_p3[3], dest_p[3]={0,0,0};
+ const float uf = (float)(j + TRI_UVOFFSET) / (float)(divs1 + 0.0);
+ const float vf = (float)(k + TRI_UVOFFSET) / (float)(divs2 + 0.0);
+ float src_tmpvec[3], dest_tmpvec[3];
+
+ if(uf+vf > 1.0)
+ {
+ // printf("bigger - divs1: %d, divs2: %d\n", divs1, divs2);
+ continue;
+ }
+
+ copy_v3_v3(src_p1, &scs->points_old[mface[i].v1 * 3]);
+ copy_v3_v3(dest_p1, &scs->points[mface[i].v1 * 3]);
+ if(again == 1 && mface[i].v4)
+ {
+ copy_v3_v3(src_p2, &scs->points_old[mface[i].v3 * 3]);
+ copy_v3_v3(dest_p2, &scs->points[mface[i].v3 * 3]);
+
+ copy_v3_v3(src_p3,&scs->points_old[mface[i].v4 * 3]);
+ copy_v3_v3(dest_p3, &scs->points[mface[i].v4 * 3]);
+ }
+ else {
+ copy_v3_v3(src_p2, &scs->points_old[mface[i].v2 * 3]);
+ copy_v3_v3(dest_p2, &scs->points[mface[i].v2 * 3]);
+ copy_v3_v3(src_p3, &scs->points_old[mface[i].v3 * 3]);
+ copy_v3_v3(dest_p3, &scs->points[mface[i].v3 * 3]);
+ }
+
+ mul_v3_fl(src_p1, (1.0-uf-vf));
+ mul_v3_fl(dest_p1, (1.0-uf-vf));
+
+ mul_v3_fl(src_p2, uf);
+ mul_v3_fl(dest_p2, uf);
+
+ mul_v3_fl(src_p3, vf);
+ mul_v3_fl(dest_p3, vf);
+
+ add_v3_v3v3(src_p, src_p1, src_p2);
+ add_v3_v3v3(dest_p, dest_p1, dest_p2);
+
+ add_v3_v3(src_p, src_p3);
+ add_v3_v3(dest_p, dest_p3);
+
+ if(newdivs > divs)
+ printf("mem problem\n");
+
+ // mMovPoints.push_back(p + trinorm);
+ add_v3_v3v3(src_tmpvec, src_p, src_trinorm);
+ add_v3_v3v3(dest_tmpvec, dest_p, dest_trinorm);
+
+ // mul_m4_v3(ob->obmat, tmpvec); // DG: use local coordinates, we save MAT anyway
+ copy_v3_v3(&scs->points_old[3 * (dm->getNumVerts(dm) + newdivs)], src_tmpvec);
+ copy_v3_v3(&scs->points[3 * (dm->getNumVerts(dm) + newdivs)], dest_tmpvec);
+ newdivs++;
+
+ if(newdivs > divs)
+ printf("mem problem\n");
+
+ // mMovPoints.push_back(p - trinorm);
+ copy_v3_v3(src_tmpvec, src_p);
+ copy_v3_v3(dest_tmpvec, dest_p);
+
+ sub_v3_v3(src_tmpvec, src_trinorm);
+ sub_v3_v3(dest_tmpvec, dest_trinorm);
+
+ // mul_m4_v3(ob->obmat, tmpvec); // DG: use local coordinates, we save MAT anyway
+ copy_v3_v3(&scs->points_old[3 * (dm->getNumVerts(dm) + newdivs)], src_tmpvec);
+ copy_v3_v3(&scs->points[3 * (dm->getNumVerts(dm) + newdivs)], dest_tmpvec);
+ newdivs++;
+ }
+ }
+
+ if(again == 0 && mface[i].v4)
+ again++;
+ else
+ again = 0;
+
+ facecounter++;
+
+ } while(again!=0);
+ }
+
+ // scs->numpoints = dm->getNumVerts(dm) + newdivs;
+
}
/*! init triangle divisions */
@@ -472,22 +630,22 @@ static void calcTriangleDivs(Object *ob, MVert *verts, int UNUSED(numverts), MFa
// mTriangleDivs3.resize( faces.size() );
size_t i = 0, facecounter = 0;
- float maxscale[3] = {1,1,1}; // = channelFindMaxVf(mcScale);
+ float maxscale[3] = {1,1,1}; // = channelFindMaxVf(mcScale); get max scale value
float maxpart = ABS(maxscale[0]);
float scaleFac = 0;
float fsTri = 0;
- if (ABS(maxscale[1])>maxpart) maxpart = ABS(maxscale[1]);
- if (ABS(maxscale[2])>maxpart) maxpart = ABS(maxscale[2]);
+ if(ABS(maxscale[1])>maxpart) maxpart = ABS(maxscale[1]);
+ if(ABS(maxscale[2])>maxpart) maxpart = ABS(maxscale[2]);
scaleFac = 1.0 / maxpart;
// featureSize = mLevel[mMaxRefine].nodeSize
- fsTri = cell_len * 0.5 * scaleFac;
+ fsTri = cell_len * 0.75 * scaleFac; // fsTri = cell_len * 0.9;
- if (*tridivs)
+ if(*tridivs)
MEM_freeN(*tridivs);
*tridivs = MEM_callocN(sizeof(int) * numtris * 3, "Smoke_Tridivs");
- for (i = 0, facecounter = 0; i < numfaces; i++)
+ for(i = 0, facecounter = 0; i < numfaces; i++)
{
float p0[3], p1[3], p2[3];
float side1[3];
@@ -506,21 +664,22 @@ static void calcTriangleDivs(Object *ob, MVert *verts, int UNUSED(numverts), MFa
sub_v3_v3v3(side2, p2, p0);
sub_v3_v3v3(side3, p1, p2);
- if (dot_v3v3(side1, side1) > fsTri*fsTri)
+ if(dot_v3v3(side1, side1) > fsTri*fsTri)
{
float tmp = normalize_v3(side1);
divs1 = (int)ceil(tmp/fsTri);
}
- if (dot_v3v3(side2, side2) > fsTri*fsTri)
+ if(dot_v3v3(side2, side2) > fsTri*fsTri)
{
float tmp = normalize_v3(side2);
divs2 = (int)ceil(tmp/fsTri);
- /*
+ /*
// debug
- if (i==0)
+ if(i==0)
printf("b tmp: %f, fsTri: %f, divs2: %d\n", tmp, fsTri, divs2);
*/
+
}
(*tridivs)[3 * facecounter + 0] = divs1;
@@ -528,7 +687,7 @@ static void calcTriangleDivs(Object *ob, MVert *verts, int UNUSED(numverts), MFa
(*tridivs)[3 * facecounter + 2] = divs3;
// TODO quad case
- if (faces[i].v4)
+ if(faces[i].v4)
{
divs1=0, divs2=0, divs3=0;
@@ -545,12 +704,12 @@ static void calcTriangleDivs(Object *ob, MVert *verts, int UNUSED(numverts), MFa
sub_v3_v3v3(side2, p2, p0);
sub_v3_v3v3(side3, p1, p2);
- if (dot_v3v3(side1, side1) > fsTri*fsTri)
+ if(dot_v3v3(side1, side1) > fsTri*fsTri)
{
float tmp = normalize_v3(side1);
divs1 = (int)ceil(tmp/fsTri);
}
- if (dot_v3v3(side2, side2) > fsTri*fsTri)
+ if(dot_v3v3(side2, side2) > fsTri*fsTri)
{
float tmp = normalize_v3(side2);
divs2 = (int)ceil(tmp/fsTri);
@@ -568,19 +727,19 @@ static void calcTriangleDivs(Object *ob, MVert *verts, int UNUSED(numverts), MFa
static void smokeModifier_freeDomain(SmokeModifierData *smd)
{
- if (smd->domain)
+ if(smd->domain)
{
- if (smd->domain->shadow)
+ if(smd->domain->shadow)
MEM_freeN(smd->domain->shadow);
smd->domain->shadow = NULL;
- if (smd->domain->fluid)
+ if(smd->domain->fluid)
smoke_free(smd->domain->fluid);
- if (smd->domain->wt)
+ if(smd->domain->wt)
smoke_turbulence_free(smd->domain->wt);
- if (smd->domain->effector_weights)
+ if(smd->domain->effector_weights)
MEM_freeN(smd->domain->effector_weights);
smd->domain->effector_weights = NULL;
@@ -594,10 +753,10 @@ static void smokeModifier_freeDomain(SmokeModifierData *smd)
static void smokeModifier_freeFlow(SmokeModifierData *smd)
{
- if (smd->flow)
+ if(smd->flow)
{
/*
- if (smd->flow->bvh)
+ if(smd->flow->bvh)
{
free_bvhtree_from_mesh(smd->flow->bvh);
MEM_freeN(smd->flow->bvh);
@@ -611,22 +770,37 @@ static void smokeModifier_freeFlow(SmokeModifierData *smd)
static void smokeModifier_freeCollision(SmokeModifierData *smd)
{
- if (smd->coll)
+ if(smd->coll)
{
- if (smd->coll->points)
+ SmokeCollSettings *scs = smd->coll;
+
+ if(scs->numpoints)
{
- MEM_freeN(smd->coll->points);
- smd->coll->points = NULL;
+ if(scs->points)
+ {
+ MEM_freeN(scs->points);
+ scs->points = NULL;
+ }
+ if(scs->points_old)
+ {
+ MEM_freeN(scs->points_old);
+ scs->points_old = NULL;
+ }
+ if(scs->tridivs)
+ {
+ MEM_freeN(scs->tridivs);
+ scs->tridivs = NULL;
+ }
}
- if (smd->coll->bvhtree)
+ if(scs->bvhtree)
{
- BLI_bvhtree_free(smd->coll->bvhtree);
- smd->coll->bvhtree = NULL;
+ BLI_bvhtree_free(scs->bvhtree);
+ scs->bvhtree = NULL;
}
#ifdef USE_SMOKE_COLLISION_DM
- if (smd->coll->dm)
+ if(smd->coll->dm)
smd->coll->dm->release(smd->coll->dm);
smd->coll->dm = NULL;
#endif
@@ -638,7 +812,7 @@ static void smokeModifier_freeCollision(SmokeModifierData *smd)
void smokeModifier_reset_turbulence(struct SmokeModifierData *smd)
{
- if (smd && smd->domain && smd->domain->wt)
+ if(smd && smd->domain && smd->domain->wt)
{
smoke_turbulence_free(smd->domain->wt);
smd->domain->wt = NULL;
@@ -647,15 +821,15 @@ void smokeModifier_reset_turbulence(struct SmokeModifierData *smd)
void smokeModifier_reset(struct SmokeModifierData *smd)
{
- if (smd)
+ if(smd)
{
- if (smd->domain)
+ if(smd->domain)
{
- if (smd->domain->shadow)
+ if(smd->domain->shadow)
MEM_freeN(smd->domain->shadow);
smd->domain->shadow = NULL;
- if (smd->domain->fluid)
+ if(smd->domain->fluid)
{
smoke_free(smd->domain->fluid);
smd->domain->fluid = NULL;
@@ -667,10 +841,10 @@ void smokeModifier_reset(struct SmokeModifierData *smd)
// printf("reset domain end\n");
}
- else if (smd->flow)
+ else if(smd->flow)
{
/*
- if (smd->flow->bvh)
+ if(smd->flow->bvh)
{
free_bvhtree_from_mesh(smd->flow->bvh);
MEM_freeN(smd->flow->bvh);
@@ -678,33 +852,33 @@ void smokeModifier_reset(struct SmokeModifierData *smd)
smd->flow->bvh = NULL;
*/
}
- else if (smd->coll)
+ else if(smd->coll)
{
- if (smd->coll->points)
- {
- MEM_freeN(smd->coll->points);
- smd->coll->points = NULL;
- }
+ SmokeCollSettings *scs = smd->coll;
- if (smd->coll->bvhtree)
+ if(scs->numpoints && scs->points)
{
- BLI_bvhtree_free(smd->coll->bvhtree);
- smd->coll->bvhtree = NULL;
+ MEM_freeN(scs->points);
+ scs->points = NULL;
+
+ if(scs->points_old)
+ {
+ MEM_freeN(scs->points_old);
+ scs->points_old = NULL;
+ }
+ if(scs->tridivs)
+ {
+ MEM_freeN(scs->tridivs);
+ scs->tridivs = NULL;
+ }
}
-
-#ifdef USE_SMOKE_COLLISION_DM
- if (smd->coll->dm)
- smd->coll->dm->release(smd->coll->dm);
- smd->coll->dm = NULL;
-#endif
-
}
}
}
-void smokeModifier_free (SmokeModifierData *smd)
+void smokeModifier_free(SmokeModifierData *smd)
{
- if (smd)
+ if(smd)
{
smokeModifier_freeDomain(smd);
smokeModifier_freeFlow(smd);
@@ -714,11 +888,11 @@ void smokeModifier_free (SmokeModifierData *smd)
void smokeModifier_createType(struct SmokeModifierData *smd)
{
- if (smd)
+ if(smd)
{
- if (smd->type & MOD_SMOKE_TYPE_DOMAIN)
+ if(smd->type & MOD_SMOKE_TYPE_DOMAIN)
{
- if (smd->domain)
+ if(smd->domain)
smokeModifier_freeDomain(smd);
smd->domain = MEM_callocN(sizeof(SmokeDomainSettings), "SmokeDomain");
@@ -745,7 +919,7 @@ void smokeModifier_createType(struct SmokeModifierData *smd)
smd->domain->beta = 0.1;
smd->domain->time_scale = 1.0;
smd->domain->vorticity = 2.0;
- smd->domain->border_collisions = 1; // vertically non-colliding
+ smd->domain->border_collisions = SM_BORDER_OPEN; // open domain
smd->domain->flags = MOD_SMOKE_DISSOLVE_LOG | MOD_SMOKE_HIGH_SMOOTH;
smd->domain->strength = 2.0;
smd->domain->noise = MOD_SMOKE_NOISEWAVE;
@@ -755,9 +929,9 @@ void smokeModifier_createType(struct SmokeModifierData *smd)
smd->domain->viewsettings = MOD_SMOKE_VIEW_SHOWBIG;
smd->domain->effector_weights = BKE_add_effector_weights(NULL);
}
- else if (smd->type & MOD_SMOKE_TYPE_FLOW)
+ else if(smd->type & MOD_SMOKE_TYPE_FLOW)
{
- if (smd->flow)
+ if(smd->flow)
smokeModifier_freeFlow(smd);
smd->flow = MEM_callocN(sizeof(SmokeFlowSettings), "SmokeFlow");
@@ -773,17 +947,23 @@ void smokeModifier_createType(struct SmokeModifierData *smd)
smd->flow->psys = NULL;
}
- else if (smd->type & MOD_SMOKE_TYPE_COLL)
+ else if(smd->type & MOD_SMOKE_TYPE_COLL)
{
- if (smd->coll)
+ if(smd->coll)
smokeModifier_freeCollision(smd);
smd->coll = MEM_callocN(sizeof(SmokeCollSettings), "SmokeColl");
smd->coll->smd = smd;
smd->coll->points = NULL;
+ smd->coll->points_old = NULL;
+ smd->coll->tridivs = NULL;
+ smd->coll->vel = NULL;
smd->coll->numpoints = 0;
+ smd->coll->numtris = 0;
smd->coll->bvhtree = NULL;
+ smd->coll->type = 0; // static obstacle
+ smd->coll->dx = 1.0f / 50.0f;
#ifdef USE_SMOKE_COLLISION_DM
smd->coll->dm = NULL;
@@ -818,7 +998,7 @@ void smokeModifier_copy(struct SmokeModifierData *smd, struct SmokeModifierData
MEM_freeN(tsmd->domain->effector_weights);
tsmd->domain->effector_weights = MEM_dupallocN(smd->domain->effector_weights);
- }
+ }
else if (tsmd->flow) {
tsmd->flow->density = smd->flow->density;
tsmd->flow->temp = smd->flow->temp;
@@ -845,15 +1025,15 @@ static int get_lamp(Scene *scene, float *light)
int found_lamp = 0;
// try to find a lamp, preferably local
- for (base_tmp = scene->base.first; base_tmp; base_tmp= base_tmp->next) {
- if (base_tmp->object->type == OB_LAMP) {
+ for(base_tmp = scene->base.first; base_tmp; base_tmp= base_tmp->next) {
+ if(base_tmp->object->type == OB_LAMP) {
Lamp *la = base_tmp->object->data;
- if (la->type == LA_LOCAL) {
+ if(la->type == LA_LOCAL) {
copy_v3_v3(light, base_tmp->object->obmat[3]);
return 1;
}
- else if (!found_lamp) {
+ else if(!found_lamp) {
copy_v3_v3(light, base_tmp->object->obmat[3]);
found_lamp = 1;
}
@@ -863,499 +1043,605 @@ static int get_lamp(Scene *scene, float *light)
return found_lamp;
}
-static void smoke_calc_domain(Scene *scene, Object *ob, SmokeModifierData *smd)
+static void smoke_calc_domain(Scene *UNUSED(scene), Object *UNUSED(ob), SmokeModifierData *UNUSED(smd))
{
+#if 0
SmokeDomainSettings *sds = smd->domain;
GroupObject *go = NULL;
- Base *base = NULL;
+ Base *base = NULL;
- // do collisions, needs to be done before emission, so that smoke isn't emitted inside collision cells
- if (1)
+ /* do collisions, needs to be done before emission, so that smoke isn't emitted inside collision cells */
+ if(1)
{
- Object *otherobj = NULL;
- ModifierData *md = NULL;
-
- if (sds->coll_group) // we use groups since we have 2 domains
- go = sds->coll_group->gobject.first;
- else
- base = scene->base.first;
+ unsigned int i;
+ Object **collobjs = NULL;
+ unsigned int numcollobj = 0;
+ collobjs = get_collisionobjects(scene, ob, sds->coll_group, &numcollobj);
- while (base || go)
+ for(i = 0; i < numcollobj; i++)
{
- otherobj = NULL;
- if (sds->coll_group)
- {
- if (go->ob)
- otherobj = go->ob;
- }
- else
- otherobj = base->object;
- if (!otherobj)
- {
- if (sds->coll_group)
- go = go->next;
- else
- base= base->next;
- continue;
- }
- md = modifiers_findByType(otherobj, eModifierType_Smoke);
+ Object *collob= collobjs[i];
+ SmokeModifierData *smd2 = (SmokeModifierData*)modifiers_findByType(collob, eModifierType_Smoke);
// check for active smoke modifier
- if (md && md->mode & (eModifierMode_Realtime | eModifierMode_Render))
+ // if(md && md->mode & (eModifierMode_Realtime | eModifierMode_Render))
+ // SmokeModifierData *smd2 = (SmokeModifierData *)md;
+
+ if((smd2->type & MOD_SMOKE_TYPE_COLL) && smd2->coll && smd2->coll->points && smd2->coll->points_old)
{
- SmokeModifierData *smd2 = (SmokeModifierData *)md;
+ // ??? anything to do here?
+
+ // TODO: only something to do for ANIMATED obstacles: need to update positions
+
+ }
+ }
+
+ if(collobjs)
+ MEM_freeN(collobjs);
+ }
+
+#endif
+}
+
+/* Animated obstacles: dx_step = ((x_new - x_old) / totalsteps) * substep */
+static void update_obstacles(Scene *scene, Object *ob, SmokeDomainSettings *sds, float dt, int substep, int totalsteps)
+{
+ Object **collobjs = NULL;
+ unsigned int numcollobj = 0;
+
+ unsigned int collIndex;
+ unsigned char *obstacles = smoke_get_obstacle(sds->fluid);
+ float *velx = NULL;
+ float *vely = NULL;
+ float *velz = NULL;
+ float *velxOrig = smoke_get_velocity_x(sds->fluid);
+ float *velyOrig = smoke_get_velocity_y(sds->fluid);
+ float *velzOrig = smoke_get_velocity_z(sds->fluid);
+ // float *density = smoke_get_density(sds->fluid);
+ unsigned int z;
+
+ smoke_get_ob_velocity(sds->fluid, &velx, &vely, &velz);
+
+ // TODO: delete old obstacle flags
+ for(z = 0; z < sds->res[0] * sds->res[1] * sds->res[2]; z++)
+ {
+ if(obstacles[z])
+ {
+ // density[z] = 0;
+
+ velxOrig[z] = 0;
+ velyOrig[z] = 0;
+ velzOrig[z] = 0;
+ }
+
+ if(obstacles[z] & 8) // Do not delete static obstacles
+ {
+ obstacles[z] = 0;
+ }
+
+ velx[z] = 0;
+ vely[z] = 0;
+ velz[z] = 0;
+ }
+
+ collobjs = get_collisionobjects(scene, ob, sds->coll_group, &numcollobj, eModifierType_Smoke);
- if ((smd2->type & MOD_SMOKE_TYPE_COLL) && smd2->coll && smd2->coll->points)
+ // update obstacle tags in cells
+ for(collIndex = 0; collIndex < numcollobj; collIndex++)
+ {
+ Object *collob= collobjs[collIndex];
+ SmokeModifierData *smd2 = (SmokeModifierData*)modifiers_findByType(collob, eModifierType_Smoke);
+
+ // DG TODO: check if modifier is active?
+
+ if((smd2->type & MOD_SMOKE_TYPE_COLL) && smd2->coll && smd2->coll->points && smd2->coll->points_old)
+ {
+ SmokeCollSettings *scs = smd2->coll;
+ unsigned int i;
+
+ /*
+ // DG TODO: support static cobstacles, but basicly we could even support static + rigid with one set of code
+ if(scs->type > SM_COLL_STATIC)
+ */
+
+ /* Handle collisions */
+ for(i = 0; i < scs->numpoints; i++)
+ {
+ // 1. get corresponding cell
+ int cell[3];
+ float pos[3], oldpos[3], vel[3];
+ float cPos[3], cOldpos[3]; /* current position in substeps */
+ int badcell = 0;
+ size_t index;
+ int j;
+
+ // translate local points into global positions
+ copy_v3_v3(cPos, &scs->points[3 * i]);
+ mul_m4_v3(scs->mat, cPos);
+ copy_v3_v3(pos, cPos);
+
+ copy_v3_v3(cOldpos, &scs->points_old[3 * i]);
+ mul_m4_v3(scs->mat_old, cOldpos);
+ copy_v3_v3(oldpos, cOldpos);
+
+ /* support for rigid bodies, armatures etc */
{
- // we got nice collision object
- SmokeCollSettings *scs = smd2->coll;
- size_t i, j;
- unsigned char *obstacles = smoke_get_obstacle(smd->domain->fluid);
+ float tmp[3];
- for (i = 0; i < scs->numpoints; i++)
- {
- int badcell = 0;
- size_t index = 0;
- int cell[3];
+ /* x_current = x_old + (x_new - x_old) * step_current / steps_total */
+ float mulStep = (float)(((float)substep) / ((float)totalsteps));
- // 1. get corresponding cell
- get_cell(smd->domain->p0, smd->domain->res, smd->domain->dx, &scs->points[3 * i], cell, 0);
-
- // check if cell is valid (in the domain boundary)
- for (j = 0; j < 3; j++)
- if ((cell[j] > sds->res[j] - 1) || (cell[j] < 0))
- {
- badcell = 1;
- break;
- }
-
- if (badcell)
- continue;
- // 2. set cell values (heat, density and velocity)
- index = smoke_get_index(cell[0], sds->res[0], cell[1], sds->res[1], cell[2]);
-
- // printf("cell[0]: %d, cell[1]: %d, cell[2]: %d\n", cell[0], cell[1], cell[2]);
- // printf("res[0]: %d, res[1]: %d, res[2]: %d, index: %d\n\n", sds->res[0], sds->res[1], sds->res[2], index);
- obstacles[index] = 1;
- // for moving gobstacles
- /*
- const LbmFloat maxVelVal = 0.1666;
- const LbmFloat maxusqr = maxVelVal*maxVelVal*3. *1.5;
-
- LbmVec objvel = vec2L((mMOIVertices[n]-mMOIVerticesOld[n]) /dvec);
- {
- const LbmFloat usqr = (objvel[0]*objvel[0]+objvel[1]*objvel[1]+objvel[2]*objvel[2])*1.5;
- USQRMAXCHECK(usqr, objvel[0],objvel[1],objvel[2], mMaxVlen, mMxvx,mMxvy,mMxvz);
- if (usqr>maxusqr) {
- // cutoff at maxVelVal
- for (int jj=0; jj<3; jj++) {
- if (objvel[jj] > 0.0) objvel[jj] = maxVelVal;
- if (objvel[jj] < 0.0) objvel[jj] = -maxVelVal;
- }
- }
- }
- const LbmFloat dp=dot(objvel, vec2L((*pNormals)[n]) );
- const LbmVec oldov=objvel; // debug
- objvel = vec2L((*pNormals)[n]) *dp;
- */
+ sub_v3_v3v3(tmp, cPos, cOldpos);
+ mul_v3_fl(tmp, mulStep);
+ add_v3_v3(cOldpos, tmp);
+ }
+
+ sub_v3_v3v3(vel, pos, oldpos);
+ /* Scale velocity to incorperate the object movement during this step */
+ mul_v3_fl(vel, 1.0 / (totalsteps * dt));
+ // mul_v3_fl(vel, 1.0 / dt);
+
+ // DG TODO: cap velocity to maxVelMag (or maxvel)
+
+ // oldpos + velocity * dt = newpos
+ get_cell(sds->p0, sds->res, sds->dx, cOldpos /* use current position here instead of "pos" */, cell, 0);
+
+ // check if cell is valid (in the domain boundary)
+ for(j = 0; j < 3; j++)
+ if((cell[j] > sds->res[j] - 1) || (cell[j] < 0))
+ {
+ badcell = 1;
+ break;
}
+
+ if(badcell)
+ continue;
+
+ // 2. set cell values (heat, density and velocity)
+ index = smoke_get_index(cell[0], sds->res[0], cell[1], sds->res[1], cell[2]);
+
+ // Don't overwrite existing obstacles
+ if(obstacles[index])
+ continue;
+
+ // printf("cell[0]: %d, cell[1]: %d, cell[2]: %d\n", cell[0], cell[1], cell[2]);
+ // printf("res[0]: %d, res[1]: %d, res[2]: %d, index: %d\n\n", sds->res[0], sds->res[1], sds->res[2], index);
+ obstacles[index] = 1 | 8 /* ANIMATED */;
+
+ if(len_v3(vel) > FLT_EPSILON)
+ {
+ // Collision object is moving
+
+ velx[index] = vel[0]; // use "+="?
+ vely[index] = vel[1];
+ velz[index] = vel[2];
}
}
-
- if (sds->coll_group)
- go = go->next;
- else
- base= base->next;
}
}
- // do flows and fluids
- if (1)
+ if(collobjs)
+ MEM_freeN(collobjs);
+}
+
+static void update_flowsfluids(Scene *scene, Object *ob, SmokeDomainSettings *sds, float time)
+{
+ Object **flowobjs = NULL;
+ unsigned int numflowobj = 0;
+ unsigned int flowIndex;
+
+ flowobjs = get_collisionobjects(scene, ob, sds->fluid_group, &numflowobj, eModifierType_Smoke);
+
+ // update obstacle tags in cells
+ for(flowIndex = 0; flowIndex < numflowobj; flowIndex++)
{
- Object *otherobj = NULL;
- ModifierData *md = NULL;
- if (sds->fluid_group) // we use groups since we have 2 domains
- go = sds->fluid_group->gobject.first;
- else
- base = scene->base.first;
- while (base || go)
- {
- otherobj = NULL;
- if (sds->fluid_group)
- {
- if (go->ob)
- otherobj = go->ob;
- }
- else
- otherobj = base->object;
- if (!otherobj)
- {
- if (sds->fluid_group)
- go = go->next;
- else
- base= base->next;
+ Object *collob= flowobjs[flowIndex];
+ SmokeModifierData *smd2 = (SmokeModifierData*)modifiers_findByType(collob, eModifierType_Smoke);
- continue;
- }
+ // check for initialized smoke object
+ if((smd2->type & MOD_SMOKE_TYPE_FLOW) && smd2->flow)
+ {
+ // we got nice flow object
+ SmokeFlowSettings *sfs = smd2->flow;
- md = modifiers_findByType(otherobj, eModifierType_Smoke);
-
- // check for active smoke modifier
- if (md && md->mode & (eModifierMode_Realtime | eModifierMode_Render))
+ if(sfs && sfs->psys && sfs->psys->part && sfs->psys->part->type==PART_EMITTER) // is particle system selected
{
- SmokeModifierData *smd2 = (SmokeModifierData *)md;
-
- // check for initialized smoke object
- if ((smd2->type & MOD_SMOKE_TYPE_FLOW) && smd2->flow)
+ ParticleSimulationData sim;
+ ParticleSystem *psys = sfs->psys;
+ int totpart=psys->totpart, totchild;
+ int p = 0;
+ float *density = smoke_get_density(sds->fluid);
+ float *bigdensity = smoke_turbulence_get_density(sds->wt);
+ float *heat = smoke_get_heat(sds->fluid);
+ float *velocity_x = smoke_get_velocity_x(sds->fluid);
+ float *velocity_y = smoke_get_velocity_y(sds->fluid);
+ float *velocity_z = smoke_get_velocity_z(sds->fluid);
+ unsigned char *obstacle = smoke_get_obstacle(sds->fluid);
+ // DG TODO UNUSED unsigned char *obstacleAnim = smoke_get_obstacle_anim(sds->fluid);
+ int bigres[3];
+ short absolute_flow = (sfs->flags & MOD_SMOKE_FLOW_ABSOLUTE);
+ short high_emission_smoothing = bigdensity ? (sds->flags & MOD_SMOKE_HIGH_SMOOTH) : 0;
+
+ /*
+ * A temporary volume map used to store whole emissive
+ * area to be added to smoke density and interpolated
+ * for high resolution smoke.
+ */
+ float *temp_emission_map = NULL;
+
+ sim.scene = scene;
+ sim.ob = collob;
+ sim.psys = psys;
+
+ // initialize temp emission map
+ if(!(sfs->type & MOD_SMOKE_FLOW_TYPE_OUTFLOW))
{
- // we got nice flow object
- SmokeFlowSettings *sfs = smd2->flow;
-
- if (sfs && sfs->psys && sfs->psys->part && sfs->psys->part->type==PART_EMITTER) // is particle system selected
+ int i;
+ temp_emission_map = MEM_callocN(sizeof(float) * sds->res[0]*sds->res[1]*sds->res[2], "SmokeTempEmission");
+ // set whole volume to 0.0f
+ for (i=0; i<sds->res[0]*sds->res[1]*sds->res[2]; i++) {
+ temp_emission_map[i] = 0.0f;
+ }
+ }
+
+ // mostly copied from particle code
+ if(psys->part->type==PART_HAIR)
+ {
+ /*
+ if(psys->childcache)
+ {
+ totchild = psys->totchildcache;
+ }
+ else
+ */
+
+ // TODO: PART_HAIR not supported whatsoever
+ totchild=0;
+ }
+ else
+ totchild=psys->totchild*psys->part->disp/100;
+
+ for(p=0; p<totpart+totchild; p++)
+ {
+ int cell[3];
+ size_t i = 0;
+ size_t index = 0;
+ int badcell = 0;
+ ParticleKey state;
+
+ if(p < totpart)
{
- ParticleSimulationData sim;
- ParticleSystem *psys = sfs->psys;
- int totpart=psys->totpart, totchild;
- int p = 0;
- float *density = smoke_get_density(sds->fluid);
- float *bigdensity = smoke_turbulence_get_density(sds->wt);
- float *heat = smoke_get_heat(sds->fluid);
- float *velocity_x = smoke_get_velocity_x(sds->fluid);
- float *velocity_y = smoke_get_velocity_y(sds->fluid);
- float *velocity_z = smoke_get_velocity_z(sds->fluid);
- unsigned char *obstacle = smoke_get_obstacle(sds->fluid);
- int bigres[3];
- short absolute_flow = (sfs->flags & MOD_SMOKE_FLOW_ABSOLUTE);
- short high_emission_smoothing = bigdensity ? (smd->domain->flags & MOD_SMOKE_HIGH_SMOOTH) : 0;
-
- /*
- * A temporary volume map used to store whole emissive
- * area to be added to smoke density and interpolated
- * for high resolution smoke.
- */
- float *temp_emission_map = NULL;
-
- sim.scene = scene;
- sim.ob = otherobj;
- sim.psys = psys;
-
- // initialize temp emission map
- if (!(sfs->type & MOD_SMOKE_FLOW_TYPE_OUTFLOW))
+ if(psys->particles[p].flag & (PARS_NO_DISP|PARS_UNEXIST))
+ continue;
+ }
+ else {
+ /* handle child particle */
+ ChildParticle *cpa = &psys->child[p - totpart];
+
+ if(psys->particles[cpa->parent].flag & (PARS_NO_DISP|PARS_UNEXIST))
+ continue;
+ }
+
+ state.time = time;
+ if(psys_get_particle_state(&sim, p, &state, 0) == 0)
+ continue;
+
+ // copy_v3_v3(pos, pa->state.co);
+ // mul_m4_v3(ob->imat, pos);
+ // 1. get corresponding cell
+ get_cell(sds->p0, sds->res, sds->dx, state.co, cell, 0);
+ // check if cell is valid (in the domain boundary)
+ for(i = 0; i < 3; i++)
+ {
+ if((cell[i] > sds->res[i] - 1) || (cell[i] < 0))
+ {
+ badcell = 1;
+ break;
+ }
+ }
+ if(badcell)
+ continue;
+ // 2. set cell values (heat, density and velocity)
+ index = smoke_get_index(cell[0], sds->res[0], cell[1], sds->res[1], cell[2]);
+ if(!(sfs->type & MOD_SMOKE_FLOW_TYPE_OUTFLOW) && !(obstacle[index])) // this is inflow
+ {
+ // heat[index] += sfs->temp * 0.1;
+ // density[index] += sfs->density * 0.1;
+ heat[index] = sfs->temp;
+
+ // Add emitter density to temp emission map
+ temp_emission_map[index] = sfs->density;
+
+ // Uses particle velocity as initial velocity for smoke
+ if(sfs->flags & MOD_SMOKE_FLOW_INITVELOCITY && (psys->part->phystype != PART_PHYS_NO))
{
- int i;
- temp_emission_map = MEM_callocN(sizeof(float) * sds->res[0]*sds->res[1]*sds->res[2], "SmokeTempEmission");
- // set whole volume to 0.0f
- for (i=0; i<sds->res[0]*sds->res[1]*sds->res[2]; i++) {
- temp_emission_map[i] = 0.0f;
- }
- }
-
- // mostly copied from particle code
- if (psys->part->type==PART_HAIR)
+ velocity_x[index] = state.vel[0]*sfs->vel_multi;
+ velocity_y[index] = state.vel[1]*sfs->vel_multi;
+ velocity_z[index] = state.vel[2]*sfs->vel_multi;
+ }
+ }
+ else if(sfs->type & MOD_SMOKE_FLOW_TYPE_OUTFLOW) // outflow
+ {
+ heat[index] = 0.f;
+ density[index] = 0.f;
+ velocity_x[index] = 0.f;
+ velocity_y[index] = 0.f;
+ velocity_z[index] = 0.f;
+ // we need different handling for the high-res feature
+ if(bigdensity)
{
- /*
- if (psys->childcache)
- {
- totchild = psys->totchildcache;
- }
- else
- */
-
- // TODO: PART_HAIR not supported whatsoever
- totchild=0;
+ // init all surrounding cells according to amplification, too
+ int i, j, k;
+ smoke_turbulence_get_res(sds->wt, bigres);
+
+ for(i = 0; i < sds->amplify + 1; i++)
+ for(j = 0; j < sds->amplify + 1; j++)
+ for(k = 0; k < sds->amplify + 1; k++)
+ {
+ index = smoke_get_index((sds->amplify + 1)* cell[0] + i, bigres[0], (sds->amplify + 1)* cell[1] + j, bigres[1], (sds->amplify + 1)* cell[2] + k);
+ bigdensity[index] = 0.f;
+ }
}
- else
- totchild=psys->totchild*psys->part->disp/100;
-
- for (p=0; p<totpart+totchild; p++)
- {
- int cell[3];
- size_t i = 0;
- size_t index = 0;
- int badcell = 0;
- ParticleKey state;
+ }
+ } // particles loop
+
+ // apply emission values
+ if(!(sfs->type & MOD_SMOKE_FLOW_TYPE_OUTFLOW))
+ {
+ // initialize variables
+ int ii, jj, kk, x, y, z, block_size;
+ size_t index, index_big;
+
+ smoke_turbulence_get_res(sds->wt, bigres);
+ block_size = sds->amplify + 1; // high res block size
- if (p < totpart)
+ // loop through every low res cell
+ for(x = 0; x < sds->res[0]; x++)
+ for(y = 0; y < sds->res[1]; y++)
+ for(z = 0; z < sds->res[2]; z++)
{
- if (psys->particles[p].flag & (PARS_NO_DISP|PARS_UNEXIST))
- continue;
- }
- else {
- /* handle child particle */
- ChildParticle *cpa = &psys->child[p - totpart];
-
- if (psys->particles[cpa->parent].flag & (PARS_NO_DISP|PARS_UNEXIST))
- continue;
- }
+ // neighbor cell emission densities (for high resolution smoke smooth interpolation)
+ float c000, c001, c010, c011, c100, c101, c110, c111;
- state.time = smd->time;
- if (psys_get_particle_state(&sim, p, &state, 0) == 0)
- continue;
-
- // copy_v3_v3(pos, pa->state.co);
- // mul_m4_v3(ob->imat, pos);
- // 1. get corresponding cell
- get_cell(smd->domain->p0, smd->domain->res, smd->domain->dx, state.co, cell, 0);
- // check if cell is valid (in the domain boundary)
- for (i = 0; i < 3; i++)
- {
- if ((cell[i] > sds->res[i] - 1) || (cell[i] < 0))
- {
- badcell = 1;
- break;
- }
- }
- if (badcell)
- continue;
- // 2. set cell values (heat, density and velocity)
- index = smoke_get_index(cell[0], sds->res[0], cell[1], sds->res[1], cell[2]);
- if (!(sfs->type & MOD_SMOKE_FLOW_TYPE_OUTFLOW) && !(obstacle[index])) // this is inflow
- {
- // heat[index] += sfs->temp * 0.1;
- // density[index] += sfs->density * 0.1;
- heat[index] = sfs->temp;
-
- // Add emitter density to temp emission map
- temp_emission_map[index] = sfs->density;
-
- // Uses particle velocity as initial velocity for smoke
- if (sfs->flags & MOD_SMOKE_FLOW_INITVELOCITY && (psys->part->phystype != PART_PHYS_NO))
- {
- velocity_x[index] = state.vel[0]*sfs->vel_multi;
- velocity_y[index] = state.vel[1]*sfs->vel_multi;
- velocity_z[index] = state.vel[2]*sfs->vel_multi;
- }
- }
- else if (sfs->type & MOD_SMOKE_FLOW_TYPE_OUTFLOW) // outflow
- {
- heat[index] = 0.f;
- density[index] = 0.f;
- velocity_x[index] = 0.f;
- velocity_y[index] = 0.f;
- velocity_z[index] = 0.f;
- // we need different handling for the high-res feature
- if (bigdensity)
+ c000 = (x>0 && y>0 && z>0) ? temp_emission_map[smoke_get_index(x-1, sds->res[0], y-1, sds->res[1], z-1)] : 0;
+ c001 = (x>0 && y>0) ? temp_emission_map[smoke_get_index(x-1, sds->res[0], y-1, sds->res[1], z)] : 0;
+ c010 = (x>0 && z>0) ? temp_emission_map[smoke_get_index(x-1, sds->res[0], y, sds->res[1], z-1)] : 0;
+ c011 = (x>0) ? temp_emission_map[smoke_get_index(x-1, sds->res[0], y, sds->res[1], z)] : 0;
+
+ c100 = (y>0 && z>0) ? temp_emission_map[smoke_get_index(x, sds->res[0], y-1, sds->res[1], z-1)] : 0;
+ c101 = (y>0) ? temp_emission_map[smoke_get_index(x, sds->res[0], y-1, sds->res[1], z)] : 0;
+ c110 = (z>0) ? temp_emission_map[smoke_get_index(x, sds->res[0], y, sds->res[1], z-1)] : 0;
+ c111 = temp_emission_map[smoke_get_index(x, sds->res[0], y, sds->res[1], z)]; // this cell
+
+ // get cell index
+ index = smoke_get_index(x, sds->res[0], y, sds->res[1], z);
+
+ // add emission to low resolution density
+ if (absolute_flow)
{
- // init all surrounding cells according to amplification, too
- int i, j, k;
- smoke_turbulence_get_res(smd->domain->wt, bigres);
-
- for (i = 0; i < smd->domain->amplify + 1; i++)
- for (j = 0; j < smd->domain->amplify + 1; j++)
- for (k = 0; k < smd->domain->amplify + 1; k++)
- {
- index = smoke_get_index((smd->domain->amplify + 1)* cell[0] + i, bigres[0], (smd->domain->amplify + 1)* cell[1] + j, bigres[1], (smd->domain->amplify + 1)* cell[2] + k);
- bigdensity[index] = 0.f;
- }
+ if (temp_emission_map[index]>0)
+ density[index] = temp_emission_map[index];
}
- }
- } // particles loop
+ else
+ {
+ density[index] += temp_emission_map[index];
+ if (density[index]>1)
+ density[index]=1.0f;
+ }
- // apply emission values
- if (!(sfs->type & MOD_SMOKE_FLOW_TYPE_OUTFLOW)) {
+ smoke_turbulence_get_res(sds->wt, bigres);
- // initialize variables
- int ii, jj, kk, x, y, z, block_size;
- size_t index, index_big;
+ /* loop through high res blocks if high res enabled */
+ if (bigdensity)
+ for(ii = 0; ii < block_size; ii++)
+ for(jj = 0; jj < block_size; jj++)
+ for(kk = 0; kk < block_size; kk++)
+ {
- smoke_turbulence_get_res(smd->domain->wt, bigres);
- block_size = smd->domain->amplify + 1; // high res block size
+ float fx,fy,fz, interpolated_value;
+ int shift_x, shift_y, shift_z;
- // loop through every low res cell
- for (x = 0; x < sds->res[0]; x++)
- for (y = 0; y < sds->res[1]; y++)
- for (z = 0; z < sds->res[2]; z++)
- {
+ /*
+ * Do volume interpolation if emitter smoothing
+ * is enabled
+ */
+ if (high_emission_smoothing)
+ {
+ // convert block position to relative
+ // for interpolation smoothing
+ fx = (float)ii/block_size + 0.5f/block_size;
+ fy = (float)jj/block_size + 0.5f/block_size;
+ fz = (float)kk/block_size + 0.5f/block_size;
+
+ // calculate trilinear interpolation
+ interpolated_value = c000 * (1-fx) * (1-fy) * (1-fz) +
+ c100 * fx * (1-fy) * (1-fz) +
+ c010 * (1-fx) * fy * (1-fz) +
+ c001 * (1-fx) * (1-fy) * fz +
+ c101 * fx * (1-fy) * fz +
+ c011 * (1-fx) * fy * fz +
+ c110 * fx * fy * (1-fz) +
+ c111 * fx * fy * fz;
+
+
+ // add some contrast / sharpness
+ // depending on hi-res block size
+
+ interpolated_value = (interpolated_value-0.4f*sfs->density)*(block_size/2) + 0.4f*sfs->density;
+ if (interpolated_value<0.0f) interpolated_value = 0.0f;
+ if (interpolated_value>1.0f) interpolated_value = 1.0f;
+
+ // shift smoke block index
+ // (because pixel center is actually
+ // in halfway of the low res block)
+ shift_x = (x < 1) ? 0 : block_size/2;
+ shift_y = (y < 1) ? 0 : block_size/2;
+ shift_z = (z < 1) ? 0 : block_size/2;
+ }
+ else
+ {
+ // without interpolation use same low resolution
+ // block value for all hi-res blocks
+ interpolated_value = c111;
+ shift_x = 0;
+ shift_y = 0;
+ shift_z = 0;
+ }
- // neighbor cell emission densities (for high resolution smoke smooth interpolation)
- float c000, c001, c010, c011, c100, c101, c110, c111;
+ // get shifted index for current high resolution block
+ index_big = smoke_get_index(block_size * x + ii - shift_x, bigres[0], block_size * y + jj - shift_y, bigres[1], block_size * z + kk - shift_z);
- c000 = (x>0 && y>0 && z>0) ? temp_emission_map[smoke_get_index(x-1, sds->res[0], y-1, sds->res[1], z-1)] : 0;
- c001 = (x>0 && y>0) ? temp_emission_map[smoke_get_index(x-1, sds->res[0], y-1, sds->res[1], z)] : 0;
- c010 = (x>0 && z>0) ? temp_emission_map[smoke_get_index(x-1, sds->res[0], y, sds->res[1], z-1)] : 0;
- c011 = (x>0) ? temp_emission_map[smoke_get_index(x-1, sds->res[0], y, sds->res[1], z)] : 0;
+ // add emission data to high resolution density
+ if (absolute_flow)
+ {
+ if (interpolated_value > 0)
+ bigdensity[index_big] = interpolated_value;
+ }
+ else
+ {
+ bigdensity[index_big] += interpolated_value;
- c100 = (y>0 && z>0) ? temp_emission_map[smoke_get_index(x, sds->res[0], y-1, sds->res[1], z-1)] : 0;
- c101 = (y>0) ? temp_emission_map[smoke_get_index(x, sds->res[0], y-1, sds->res[1], z)] : 0;
- c110 = (z>0) ? temp_emission_map[smoke_get_index(x, sds->res[0], y, sds->res[1], z-1)] : 0;
- c111 = temp_emission_map[smoke_get_index(x, sds->res[0], y, sds->res[1], z)]; // this cell
+ if (bigdensity[index_big]>1)
+ bigdensity[index_big]=1.0f;
+ }
+ } // end of hires loop
+ } // end of low res loop
+ // free temporary emission map
+ if (temp_emission_map)
+ MEM_freeN(temp_emission_map);
- // get cell index
- index = smoke_get_index(x, sds->res[0], y, sds->res[1], z);
+ } // end emission
+ }
+ }
+ }
- // add emission to low resolution density
- if (absolute_flow) {if (temp_emission_map[index]>0) density[index] = temp_emission_map[index];}
- else {
- density[index] += temp_emission_map[index];
- if (density[index]>1) density[index]=1.0f;
- }
+ if(flowobjs)
+ MEM_freeN(flowobjs);
+}
- smoke_turbulence_get_res(smd->domain->wt, bigres);
+static void update_effectors(Scene *scene, Object *ob, SmokeDomainSettings *sds, float UNUSED(dt))
+{
+ ListBase *effectors = pdInitEffectors(scene, ob, NULL, sds->effector_weights);
+ if(effectors)
+ {
+ float *density = smoke_get_density(sds->fluid);
+ float *force_x = smoke_get_force_x(sds->fluid);
+ float *force_y = smoke_get_force_y(sds->fluid);
+ float *force_z = smoke_get_force_z(sds->fluid);
+ float *velocity_x = smoke_get_velocity_x(sds->fluid);
+ float *velocity_y = smoke_get_velocity_y(sds->fluid);
+ float *velocity_z = smoke_get_velocity_z(sds->fluid);
+ unsigned char *obstacle = smoke_get_obstacle(sds->fluid);
+ int x, y, z;
+
+ // precalculate wind forces
+ for(x = 0; x < sds->res[0]; x++)
+ for(y = 0; y < sds->res[1]; y++)
+ for(z = 0; z < sds->res[2]; z++)
+ {
+ EffectedPoint epoint;
+ float voxelCenter[3] = {0,0,0}, vel[3] = {0,0,0}, retvel[3] = {0,0,0};
+ unsigned int index = smoke_get_index(x, sds->res[0], y, sds->res[1], z);
+
+ if((density[index] < FLT_EPSILON) || obstacle[index])
+ continue;
+
+ vel[0] = velocity_x[index];
+ vel[1] = velocity_y[index];
+ vel[2] = velocity_z[index];
+
+ voxelCenter[0] = sds->p0[0] + sds->dx * x + sds->dx * 0.5;
+ voxelCenter[1] = sds->p0[1] + sds->dx * y + sds->dx * 0.5;
+ voxelCenter[2] = sds->p0[2] + sds->dx * z + sds->dx * 0.5;
+
+ pd_point_from_loc(scene, voxelCenter, vel, index, &epoint);
+ pdDoEffectors(effectors, NULL, sds->effector_weights, &epoint, retvel, NULL);
+
+ // TODO dg - do in force!
+ force_x[index] = MIN2(MAX2(-1.0, retvel[0] * 0.2), 1.0);
+ force_y[index] = MIN2(MAX2(-1.0, retvel[1] * 0.2), 1.0);
+ force_z[index] = MIN2(MAX2(-1.0, retvel[2] * 0.2), 1.0);
+ }
+ }
+ pdEndEffectors(&effectors);
+}
- /*
- loop through high res blocks if high res enabled
- */
- if (bigdensity)
- for (ii = 0; ii < block_size; ii++)
- for (jj = 0; jj < block_size; jj++)
- for (kk = 0; kk < block_size; kk++)
- {
-
- float fx,fy,fz, interpolated_value;
- int shift_x, shift_y, shift_z;
-
-
- /*
- * Do volume interpolation if emitter smoothing
- * is enabled
- */
- if (high_emission_smoothing) {
- // convert block position to relative
- // for interpolation smoothing
- fx = (float)ii/block_size + 0.5f/block_size;
- fy = (float)jj/block_size + 0.5f/block_size;
- fz = (float)kk/block_size + 0.5f/block_size;
-
- // calculate trilinear interpolation
- interpolated_value = c000 * (1-fx) * (1-fy) * (1-fz) +
- c100 * fx * (1-fy) * (1-fz) +
- c010 * (1-fx) * fy * (1-fz) +
- c001 * (1-fx) * (1-fy) * fz +
- c101 * fx * (1-fy) * fz +
- c011 * (1-fx) * fy * fz +
- c110 * fx * fy * (1-fz) +
- c111 * fx * fy * fz;
-
-
- // add some contrast / sharpness
- // depending on hi-res block size
-
- interpolated_value = (interpolated_value-0.4f*sfs->density)*(block_size/2) + 0.4f*sfs->density;
- if (interpolated_value<0.0f) interpolated_value = 0.0f;
- if (interpolated_value>1.0f) interpolated_value = 1.0f;
-
- // shift smoke block index
- // (because pixel center is actually
- // in halfway of the low res block)
- shift_x = (x < 1) ? 0 : block_size/2;
- shift_y = (y < 1) ? 0 : block_size/2;
- shift_z = (z < 1) ? 0 : block_size/2;
- }
- else {
- // without interpolation use same low resolution
- // block value for all hi-res blocks
- interpolated_value = c111;
- shift_x = 0;
- shift_y = 0;
- shift_z = 0;
- }
-
- // get shifted index for current high resolution block
- index_big = smoke_get_index(block_size * x + ii - shift_x, bigres[0], block_size * y + jj - shift_y, bigres[1], block_size * z + kk - shift_z);
-
- // add emission data to high resolution density
- if (absolute_flow) {if (interpolated_value > 0) bigdensity[index_big] = interpolated_value;}
- else {
- bigdensity[index_big] += interpolated_value;
- if (bigdensity[index_big]>1) bigdensity[index_big]=1.0f;
- }
+static void step(Scene *scene, Object *ob, SmokeModifierData *smd, float fps)
+{
+ /* stability values copied from wturbulence.cpp */
+ const int maxSubSteps = 25;
+ float maxVel;
+ // maxVel should be 1.5 (1.5 cell max movement) * dx (cell size)
- } // end of hires loop
+ float dt = DT_DEFAULT;
+ float maxVelMag = 0.0f;
+ int totalSubsteps;
+ int substep = 0;
+ float dtSubdiv;
- } // end of low res loop
+ SmokeDomainSettings *sds = smd->domain;
- // free temporary emission map
- if (temp_emission_map) MEM_freeN(temp_emission_map);
+ /* get max velocity and lower the dt value if it is too high */
+ size_t size= sds->res[0] * sds->res[1] * sds->res[2];
- } // end emission
+ float *velX = smoke_get_velocity_x(sds->fluid);
+ float *velY = smoke_get_velocity_y(sds->fluid);
+ float *velZ = smoke_get_velocity_z(sds->fluid);
+ size_t i;
+ /* adapt timestep for different framerates, dt = 0.1 is at 25fps */
+ dt *= (25.0f / fps);
-
- }
- else {
- /*
- for ()
- {
- // no psys
- BVHTreeNearest nearest;
- nearest.index = -1;
- nearest.dist = FLT_MAX;
+ // printf("test maxVel: %f\n", (sds->dx * 1.5) / dt); // gives 0.9
+ maxVel = (sds->dx * 1.5);
- BLI_bvhtree_find_nearest(sfs->bvh->tree, pco, &nearest, sfs->bvh->nearest_callback, sfs->bvh);
- }*/
- }
- }
- }
- if (sds->fluid_group)
- go = go->next;
- else
- base= base->next;
- }
+ for(i = 0; i < size; i++)
+ {
+ float vtemp = (velX[i]*velX[i]+velY[i]*velY[i]+velZ[i]*velZ[i]);
+ if(vtemp > maxVelMag)
+ maxVelMag = vtemp;
}
- // do effectors
+ maxVelMag = sqrt(maxVelMag) * dt * sds->time_scale;
+ totalSubsteps = (int)((maxVelMag / maxVel) + 1.0f); /* always round up */
+ totalSubsteps = (totalSubsteps < 1) ? 1 : totalSubsteps;
+ totalSubsteps = (totalSubsteps > maxSubSteps) ? maxSubSteps : totalSubsteps;
+
+ // totalSubsteps = 2.0f; // DEBUG
+
+ dtSubdiv = (float)dt / (float)totalSubsteps;
+
+ // printf("totalSubsteps: %d, maxVelMag: %f, dt: %f\n", totalSubsteps, maxVelMag, dt);
+
+ for(substep = 0; substep < totalSubsteps; substep++)
{
- ListBase *effectors = pdInitEffectors(scene, ob, NULL, sds->effector_weights);
+ // calc animated obstacle velocities
+ update_obstacles(scene, ob, sds, dtSubdiv, substep, totalSubsteps);
+ update_flowsfluids(scene, ob, sds, smd->time);
+ update_effectors(scene, ob, sds, dtSubdiv); // DG TODO? problem --> uses forces instead of velocity, need to check how they need to be changed with variable dt
- if (effectors)
- {
- float *density = smoke_get_density(sds->fluid);
- float *force_x = smoke_get_force_x(sds->fluid);
- float *force_y = smoke_get_force_y(sds->fluid);
- float *force_z = smoke_get_force_z(sds->fluid);
- float *velocity_x = smoke_get_velocity_x(sds->fluid);
- float *velocity_y = smoke_get_velocity_y(sds->fluid);
- float *velocity_z = smoke_get_velocity_z(sds->fluid);
- int x, y, z;
-
- // precalculate wind forces
- for (x = 0; x < sds->res[0]; x++)
- for (y = 0; y < sds->res[1]; y++)
- for (z = 0; z < sds->res[2]; z++)
- {
- EffectedPoint epoint;
- float voxelCenter[3] = {0,0,0} , vel[3] = {0,0,0} , retvel[3] = {0,0,0};
- unsigned int index = smoke_get_index(x, sds->res[0], y, sds->res[1], z);
-
- if (density[index] < FLT_EPSILON)
- continue;
-
- vel[0] = velocity_x[index];
- vel[1] = velocity_y[index];
- vel[2] = velocity_z[index];
-
- voxelCenter[0] = sds->p0[0] + sds->dx * x + sds->dx * 0.5;
- voxelCenter[1] = sds->p0[1] + sds->dx * y + sds->dx * 0.5;
- voxelCenter[2] = sds->p0[2] + sds->dx * z + sds->dx * 0.5;
-
- pd_point_from_loc(scene, voxelCenter, vel, index, &epoint);
- pdDoEffectors(effectors, NULL, sds->effector_weights, &epoint, retvel, NULL);
-
- // TODO dg - do in force!
- force_x[index] = MIN2(MAX2(-1.0, retvel[0] * 0.2), 1.0);
- force_y[index] = MIN2(MAX2(-1.0, retvel[1] * 0.2), 1.0);
- force_z[index] = MIN2(MAX2(-1.0, retvel[2] * 0.2), 1.0);
- }
- }
+ smoke_step(sds->fluid, dtSubdiv);
- pdEndEffectors(&effectors);
- }
+ // move animated obstacle: Done in update_obstacles() */
+ // where to delete old obstacles from array? Done in update_obstacles() */
+ }
}
+
void smokeModifier_do(SmokeModifierData *smd, Scene *scene, Object *ob, DerivedMesh *dm)
{
- if ((smd->type & MOD_SMOKE_TYPE_FLOW))
+ if((smd->type & MOD_SMOKE_TYPE_FLOW))
{
- if (scene->r.cfra >= smd->time)
+ if(scene->r.cfra >= smd->time)
smokeModifier_init(smd, ob, scene, dm);
- if (scene->r.cfra > smd->time)
+ if(scene->r.cfra > smd->time)
{
// XXX TODO
smd->time = scene->r.cfra;
@@ -1366,40 +1652,102 @@ void smokeModifier_do(SmokeModifierData *smd, Scene *scene, Object *ob, DerivedM
copy_m4_m4(smd->flow->mat, ob->obmat);
*/
}
- else if (scene->r.cfra < smd->time)
+ else if(scene->r.cfra < smd->time)
{
smd->time = scene->r.cfra;
smokeModifier_reset(smd);
}
}
- else if (smd->type & MOD_SMOKE_TYPE_COLL)
+ else if(smd->type & MOD_SMOKE_TYPE_COLL)
{
- if (scene->r.cfra >= smd->time)
+ /* Check if domain resolution changed */
+ /* DG TODO: can this be solved more elegant using dependancy graph? */
+ {
+ SmokeCollSettings *scs = smd->coll;
+ Base *base = scene->base.first;
+ int changed = 0;
+ float dx = FLT_MAX;
+ int haveDomain = 0;
+
+ for ( ; base; base = base->next)
+ {
+ SmokeModifierData *smd2 = (SmokeModifierData *)modifiers_findByType(base->object, eModifierType_Smoke);
+
+ if (smd2 && (smd2->type & MOD_SMOKE_TYPE_DOMAIN) && smd2->domain)
+ {
+ SmokeDomainSettings *sds = smd2->domain;
+
+ if(sds->dx < dx)
+ {
+ dx = sds->dx;
+ changed = 1;
+ }
+
+ haveDomain = 1;
+ }
+ }
+
+ if(!haveDomain)
+ return;
+
+ if(changed)
+ {
+ if(dx != scs->dx)
+ {
+ scs->dx = dx;
+ smokeModifier_reset(smd);
+ }
+ }
+ }
+
+ if(scene->r.cfra >= smd->time)
smokeModifier_init(smd, ob, scene, dm);
- if (scene->r.cfra > smd->time)
+ if(scene->r.cfra > smd->time)
{
- // XXX TODO
+ unsigned int i;
+ SmokeCollSettings *scs = smd->coll;
+ float *points_old = scs->points_old;
+ float *points = scs->points;
+ unsigned int numpoints = scs->numpoints;
+
+ // XXX TODO <-- DG: what is TODO here?
smd->time = scene->r.cfra;
-#ifdef USE_SMOKE_COLLISION_DM
- if (smd->coll->dm)
- smd->coll->dm->release(smd->coll->dm);
+ // rigid movement support
+ copy_m4_m4(scs->mat_old, scs->mat);
+ copy_m4_m4(scs->mat, ob->obmat);
- smd->coll->dm = CDDM_copy_from_tessface(dm);
-#endif
+ if(scs->type != SM_COLL_ANIMATED) // if(not_animated)
+ {
+ // nothing to do, "mat" is already up to date
+ }
+ else
+ {
+ // XXX TODO: need to update positions + divs
- // rigid movement support
- copy_m4_m4(smd->coll->mat_old, smd->coll->mat);
- copy_m4_m4(smd->coll->mat, ob->obmat);
+ if(scs->numverts != dm->getNumVerts(dm))
+ {
+ // DG TODO: reset modifier?
+ return;
+ }
+
+ for(i = 0; i < numpoints * 3; i++)
+ {
+ points_old[i] = points[i];
+ }
+
+ DM_ensure_tessface(dm);
+ fill_scs_points_anim(ob, dm, scs);
+ }
}
- else if (scene->r.cfra < smd->time)
+ else if(scene->r.cfra < smd->time)
{
smd->time = scene->r.cfra;
smokeModifier_reset(smd);
}
}
- else if (smd->type & MOD_SMOKE_TYPE_DOMAIN)
+ else if(smd->type & MOD_SMOKE_TYPE_DOMAIN)
{
SmokeDomainSettings *sds = smd->domain;
float light[3];
@@ -1416,14 +1764,14 @@ void smokeModifier_do(SmokeModifierData *smd, Scene *scene, Object *ob, DerivedM
BKE_ptcache_id_from_smoke(&pid, ob, smd);
BKE_ptcache_id_time(&pid, scene, framenr, &startframe, &endframe, &timescale);
- if (!smd->domain->fluid || framenr == startframe)
+ if(!smd->domain->fluid || framenr == startframe)
{
BKE_ptcache_id_reset(scene, &pid, PTCACHE_RESET_OUTDATED);
BKE_ptcache_validate(cache, framenr);
cache->flag &= ~PTCACHE_REDO_NEEDED;
}
- if (!smd->domain->fluid && (framenr != startframe) && (smd->domain->flags & MOD_SMOKE_FILE_LOAD)==0 && (cache->flag & PTCACHE_BAKED)==0)
+ if(!smd->domain->fluid && (framenr != startframe) && (smd->domain->flags & MOD_SMOKE_FILE_LOAD)==0 && (cache->flag & PTCACHE_BAKED)==0)
return;
smd->domain->flags &= ~MOD_SMOKE_FILE_LOAD;
@@ -1436,21 +1784,21 @@ void smokeModifier_do(SmokeModifierData *smd, Scene *scene, Object *ob, DerivedM
// printf("startframe: %d, framenr: %d\n", startframe, framenr);
- if (smokeModifier_init(smd, ob, scene, dm)==0)
+ if(smokeModifier_init(smd, ob, scene, dm)==0)
{
printf("bad smokeModifier_init\n");
return;
}
/* try to read from cache */
- if (BKE_ptcache_read(&pid, (float)framenr) == PTCACHE_READ_EXACT) {
+ if(BKE_ptcache_read(&pid, (float)framenr) == PTCACHE_READ_EXACT) {
BKE_ptcache_validate(cache, framenr);
smd->time = framenr;
return;
}
/* only calculate something when we advanced a single frame */
- if (framenr != (int)smd->time+1)
+ if(framenr != (int)smd->time+1)
return;
/* don't simulate if viewing start frame, but scene frame is not real start frame */
@@ -1462,14 +1810,14 @@ void smokeModifier_do(SmokeModifierData *smd, Scene *scene, Object *ob, DerivedM
smoke_calc_domain(scene, ob, smd);
/* if on second frame, write cache for first frame */
- if ((int)smd->time == startframe && (cache->flag & PTCACHE_OUTDATED || cache->last_exact==0)) {
+ if((int)smd->time == startframe && (cache->flag & PTCACHE_OUTDATED || cache->last_exact==0)) {
// create shadows straight after domain initialization so we get nice shadows for startframe, too
- if (get_lamp(scene, light))
+ if(get_lamp(scene, light))
smoke_calc_transparency(sds->shadow, smoke_get_density(sds->fluid), sds->p0, sds->p1, sds->res, sds->dx, light, calc_voxel_transp, -7.0*sds->dx);
- if (sds->wt)
+ if(sds->wt)
{
- if (sds->flags & MOD_SMOKE_DISSOLVE)
+ if(sds->flags & MOD_SMOKE_DISSOLVE)
smoke_dissolve_wavelet(sds->wt, sds->diss_speed, sds->flags & MOD_SMOKE_DISSOLVE_LOG);
smoke_turbulence_step(sds->wt, sds->fluid);
}
@@ -1486,30 +1834,31 @@ void smokeModifier_do(SmokeModifierData *smd, Scene *scene, Object *ob, DerivedM
// simulate the actual smoke (c++ code in intern/smoke)
// DG: interesting commenting this line + deactivating loading of noise files
- if (framenr!=startframe)
+ if(framenr!=startframe)
{
- if (sds->flags & MOD_SMOKE_DISSOLVE)
+ if(sds->flags & MOD_SMOKE_DISSOLVE)
smoke_dissolve(sds->fluid, sds->diss_speed, sds->flags & MOD_SMOKE_DISSOLVE_LOG);
- smoke_step(sds->fluid, smd->time, scene->r.frs_sec / scene->r.frs_sec_base);
+
+ step(scene, ob, smd, scene->r.frs_sec / scene->r.frs_sec_base);
}
// create shadows before writing cache so they get stored
- if (get_lamp(scene, light))
+ if(get_lamp(scene, light))
smoke_calc_transparency(sds->shadow, smoke_get_density(sds->fluid), sds->p0, sds->p1, sds->res, sds->dx, light, calc_voxel_transp, -7.0*sds->dx);
- if (sds->wt)
+ if(sds->wt)
{
- if (sds->flags & MOD_SMOKE_DISSOLVE)
+ if(sds->flags & MOD_SMOKE_DISSOLVE)
smoke_dissolve_wavelet(sds->wt, sds->diss_speed, sds->flags & MOD_SMOKE_DISSOLVE_LOG);
smoke_turbulence_step(sds->wt, sds->fluid);
}
BKE_ptcache_validate(cache, framenr);
- if (framenr != startframe)
+ if(framenr != startframe)
BKE_ptcache_write(&pid, framenr);
tend();
- //printf ( "Frame: %d, Time: %f\n", (int)smd->time, ( float ) tval() );
+ // printf ( "Frame: %d, Time: %f\n\n", (int)smd->time, ( float ) tval() );
}
}
@@ -1520,7 +1869,7 @@ static float calc_voxel_transp(float *result, float *input, int res[3], int *pix
// T_ray *= T_vox
*tRay *= exp(input[index]*correct);
- if (result[index] < 0.0f)
+ if(result[index] < 0.0f)
{
#pragma omp critical
result[index] = *tRay;
@@ -1574,7 +1923,7 @@ static void bresenham_linie_3D(int x1, int y1, int z1, int x2, int y2, int z2, f
err_1 = dy2 - l;
err_2 = dz2 - l;
for (i = 0; i < l; i++) {
- if (cb(result, input, res, pixel, tRay, correct) <= FLT_EPSILON)
+ if(cb(result, input, res, pixel, tRay, correct) <= FLT_EPSILON)
break;
if (err_1 > 0) {
pixel[1] += y_inc;
@@ -1588,12 +1937,12 @@ static void bresenham_linie_3D(int x1, int y1, int z1, int x2, int y2, int z2, f
err_2 += dz2;
pixel[0] += x_inc;
}
- }
+ }
else if ((m >= l) && (m >= n)) {
err_1 = dx2 - m;
err_2 = dz2 - m;
for (i = 0; i < m; i++) {
- if (cb(result, input, res, pixel, tRay, correct) <= FLT_EPSILON)
+ if(cb(result, input, res, pixel, tRay, correct) <= FLT_EPSILON)
break;
if (err_1 > 0) {
pixel[0] += x_inc;
@@ -1607,12 +1956,12 @@ static void bresenham_linie_3D(int x1, int y1, int z1, int x2, int y2, int z2, f
err_2 += dz2;
pixel[1] += y_inc;
}
- }
+ }
else {
err_1 = dy2 - n;
err_2 = dx2 - n;
for (i = 0; i < n; i++) {
- if (cb(result, input, res, pixel, tRay, correct) <= FLT_EPSILON)
+ if(cb(result, input, res, pixel, tRay, correct) <= FLT_EPSILON)
break;
if (err_1 > 0) {
pixel[1] += y_inc;
@@ -1654,7 +2003,7 @@ static void smoke_calc_transparency(float *result, float *input, float *p0, floa
float bv[6];
int a, z, slabsize=res[0]*res[1], size= res[0]*res[1]*res[2];
- for (a=0; a<size; a++)
+ for(a=0; a<size; a++)
result[a]= -1.0f;
bv[0] = p0[0];
@@ -1667,27 +2016,27 @@ static void smoke_calc_transparency(float *result, float *input, float *p0, floa
bv[5] = p1[2];
#pragma omp parallel for schedule(static,1)
- for (z = 0; z < res[2]; z++)
+ for(z = 0; z < res[2]; z++)
{
size_t index = z*slabsize;
int x,y;
- for (y = 0; y < res[1]; y++)
- for (x = 0; x < res[0]; x++, index++)
+ for(y = 0; y < res[1]; y++)
+ for(x = 0; x < res[0]; x++, index++)
{
float voxelCenter[3];
float pos[3];
int cell[3];
float tRay = 1.0;
- if (result[index] >= 0.0f)
+ if(result[index] >= 0.0f)
continue;
voxelCenter[0] = p0[0] + dx * x + dx * 0.5;
voxelCenter[1] = p0[1] + dx * y + dx * 0.5;
voxelCenter[2] = p0[2] + dx * z + dx * 0.5;
// get starting position (in voxel coords)
- if (BLI_bvhtree_bb_raycast(bv, light, voxelCenter, pos) > FLT_EPSILON)
+ if(BLI_bvhtree_bb_raycast(bv, light, voxelCenter, pos) > FLT_EPSILON)
{
// we're ouside
get_cell(p0, res, dx, pos, cell, 1);
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c
index 01930cc28da..ee70d4228de 100644
--- a/source/blender/blenkernel/intern/softbody.c
+++ b/source/blender/blenkernel/intern/softbody.c
@@ -78,6 +78,7 @@ variables on the UI for now
#include "BKE_DerivedMesh.h"
#include "BKE_pointcache.h"
#include "BKE_deform.h"
+#include "BKE_mesh.h"
//XXX #include "BIF_editdeform.h"
//XXX #include "BIF_graphics.h"
#include "PIL_time.h"
@@ -89,18 +90,18 @@ static int (*SB_localInterruptCallBack)(void) = NULL;
/* ********** soft body engine ******* */
-typedef enum {SB_EDGE=1,SB_BEND=2,SB_STIFFQUAD=3,SB_HANDLE=4} type_spring;
+typedef enum {SB_EDGE=1, SB_BEND=2, SB_STIFFQUAD=3, SB_HANDLE=4} type_spring;
typedef struct BodySpring {
int v1, v2;
- float len,cf,load;
+ float len, cf, load;
float ext_force[3]; /* edges colliding and sailing */
type_spring springtype;
short flag;
} BodySpring;
typedef struct BodyFace {
- int v1, v2, v3 ,v4;
+ int v1, v2, v3, v4;
float ext_force[3]; /* faces colliding */
short flag;
} BodyFace;
@@ -123,7 +124,7 @@ typedef struct SBScratch {
short flag;
BodyFace *bodyface;
int totface;
- float aabbmin[3],aabbmax[3];
+ float aabbmin[3], aabbmax[3];
ReferenceState Ref;
} SBScratch;
@@ -149,8 +150,8 @@ typedef struct SB_thread_context {
#define SOFTGOALSNAP 0.999f
/* if bp-> goal is above make it a *forced follow original* and skip all ODE stuff for this bp
- removes *unnecessary* stiffnes from ODE system
-*/
+ * removes *unnecessary* stiffnes from ODE system
+ */
#define HEUNWARNLIMIT 1 /* 500 would be fine i think for detecting severe *stiff* stuff */
@@ -178,16 +179,16 @@ static void Vec3PlusStVec(float *v, float s, float *v1);
static float sb_grav_force_scale(Object *UNUSED(ob))
/* since unit of g is [m/sec^2] and F = mass * g we rescale unit mass of node to 1 gramm
- put it to a function here, so we can add user options later without touching simulation code
-*/
+ * put it to a function here, so we can add user options later without touching simulation code
+ */
{
return (0.001f);
}
static float sb_fric_force_scale(Object *UNUSED(ob))
/* rescaling unit of drag [1 / sec] to somehow reasonable
- put it to a function here, so we can add user options later without touching simulation code
-*/
+ * put it to a function here, so we can add user options later without touching simulation code
+ */
{
return (0.01f);
}
@@ -215,15 +216,15 @@ static float sb_time_scale(Object *ob)
/* helper functions for everything is animatable jow_go_for2_5 +++++++*/
/* introducing them here, because i know: steps in properties ( at frame timing )
- will cause unwanted responses of the softbody system (which does inter frame calculations )
- so first 'cure' would be: interpolate linear in time ..
- Q: why do i write this?
- A: because it happend once, that some eger coder 'streamlined' code to fail.
- We DO linear interpolation for goals .. and i think we should do on animated properties as well
-*/
+ * will cause unwanted responses of the softbody system (which does inter frame calculations )
+ * so first 'cure' would be: interpolate linear in time ..
+ * Q: why do i write this?
+ * A: because it happend once, that some eger coder 'streamlined' code to fail.
+ * We DO linear interpolation for goals .. and i think we should do on animated properties as well
+ */
-/* animate sb->maxgoal,sb->mingoal */
-static float _final_goal(Object *ob,BodyPoint *bp)/*jow_go_for2_5 */
+/* animate sb->maxgoal, sb->mingoal */
+static float _final_goal(Object *ob, BodyPoint *bp)/*jow_go_for2_5 */
{
float f = -1999.99f;
if (ob) {
@@ -236,11 +237,11 @@ static float _final_goal(Object *ob,BodyPoint *bp)/*jow_go_for2_5 */
return (f);
}
}
- printf("_final_goal failed! sb or bp ==NULL\n" );
+ printf("_final_goal failed! sb or bp ==NULL\n");
return f; /*using crude but spot able values some times helps debuggin */
}
-static float _final_mass(Object *ob,BodyPoint *bp)
+static float _final_mass(Object *ob, BodyPoint *bp)
{
if (ob) {
SoftBody *sb= ob->soft; /* is supposed to be there */
@@ -248,7 +249,7 @@ static float _final_mass(Object *ob,BodyPoint *bp)
return(bp->mass*sb->nodemass);
}
}
- printf("_final_mass failed! sb or bp ==NULL\n" );
+ printf("_final_mass failed! sb or bp ==NULL\n");
return 1.0f;
}
/* helper functions for everything is animateble jow_go_for2_5 ------*/
@@ -258,7 +259,7 @@ static float _final_mass(Object *ob,BodyPoint *bp)
/********************
for each target object/face the axis aligned bounding box (AABB) is stored
faces parallel to global axes
-so only simple "value" in [min,max] ckecks are used
+so only simple "value" in [min, max] ckecks are used
float operations still
*/
@@ -294,7 +295,7 @@ static ccd_Mesh *ccd_mesh_make(Object *ob)
ccd_Mesh *pccd_M = NULL;
ccdf_minmax *mima = NULL;
MFace *mface=NULL;
- float v[3],hull;
+ float v[3], hull;
int i;
cmd =(CollisionModifierData *)modifiers_findByType(ob, eModifierType_Collision);
@@ -303,7 +304,7 @@ static ccd_Mesh *ccd_mesh_make(Object *ob)
if (!cmd) return NULL;
if (!cmd->numverts || !cmd->numfaces) return NULL;
- pccd_M = MEM_mallocN(sizeof(ccd_Mesh),"ccd_Mesh");
+ pccd_M = MEM_mallocN(sizeof(ccd_Mesh), "ccd_Mesh");
pccd_M->totvert = cmd->numverts;
pccd_M->totface = cmd->numfaces;
pccd_M->savety = CCD_SAVETY;
@@ -313,7 +314,7 @@ static ccd_Mesh *ccd_mesh_make(Object *ob)
/* blow it up with forcefield ranges */
- hull = MAX2(ob->pd->pdef_sbift,ob->pd->pdef_sboft);
+ hull = MAX2(ob->pd->pdef_sbift, ob->pd->pdef_sboft);
/* alloc and copy verts*/
pccd_M->mvert = MEM_dupallocN(cmd->xnew);
@@ -321,21 +322,21 @@ static ccd_Mesh *ccd_mesh_make(Object *ob)
/* determine the ortho BB */
for (i=0; i < pccd_M->totvert; i++) {
/* evaluate limits */
- copy_v3_v3(v,pccd_M->mvert[i].co);
- pccd_M->bbmin[0] = MIN2(pccd_M->bbmin[0],v[0]-hull);
- pccd_M->bbmin[1] = MIN2(pccd_M->bbmin[1],v[1]-hull);
- pccd_M->bbmin[2] = MIN2(pccd_M->bbmin[2],v[2]-hull);
+ copy_v3_v3(v, pccd_M->mvert[i].co);
+ pccd_M->bbmin[0] = MIN2(pccd_M->bbmin[0], v[0]-hull);
+ pccd_M->bbmin[1] = MIN2(pccd_M->bbmin[1], v[1]-hull);
+ pccd_M->bbmin[2] = MIN2(pccd_M->bbmin[2], v[2]-hull);
- pccd_M->bbmax[0] = MAX2(pccd_M->bbmax[0],v[0]+hull);
- pccd_M->bbmax[1] = MAX2(pccd_M->bbmax[1],v[1]+hull);
- pccd_M->bbmax[2] = MAX2(pccd_M->bbmax[2],v[2]+hull);
+ pccd_M->bbmax[0] = MAX2(pccd_M->bbmax[0], v[0]+hull);
+ pccd_M->bbmax[1] = MAX2(pccd_M->bbmax[1], v[1]+hull);
+ pccd_M->bbmax[2] = MAX2(pccd_M->bbmax[2], v[2]+hull);
}
/* alloc and copy faces*/
pccd_M->mface = MEM_dupallocN(cmd->mfaces);
/* OBBs for idea1 */
- pccd_M->mima = MEM_mallocN(sizeof(ccdf_minmax)*pccd_M->totface,"ccd_Mesh_Faces_mima");
+ pccd_M->mima = MEM_mallocN(sizeof(ccdf_minmax)*pccd_M->totface, "ccd_Mesh_Faces_mima");
mima = pccd_M->mima;
mface = pccd_M->mface;
@@ -345,38 +346,38 @@ static ccd_Mesh *ccd_mesh_make(Object *ob)
mima->minx=mima->miny=mima->minz=1e30f;
mima->maxx=mima->maxy=mima->maxz=-1e30f;
- copy_v3_v3(v,pccd_M->mvert[mface->v1].co);
- mima->minx = MIN2(mima->minx,v[0]-hull);
- mima->miny = MIN2(mima->miny,v[1]-hull);
- mima->minz = MIN2(mima->minz,v[2]-hull);
- mima->maxx = MAX2(mima->maxx,v[0]+hull);
- mima->maxy = MAX2(mima->maxy,v[1]+hull);
- mima->maxz = MAX2(mima->maxz,v[2]+hull);
-
- copy_v3_v3(v,pccd_M->mvert[mface->v2].co);
- mima->minx = MIN2(mima->minx,v[0]-hull);
- mima->miny = MIN2(mima->miny,v[1]-hull);
- mima->minz = MIN2(mima->minz,v[2]-hull);
- mima->maxx = MAX2(mima->maxx,v[0]+hull);
- mima->maxy = MAX2(mima->maxy,v[1]+hull);
- mima->maxz = MAX2(mima->maxz,v[2]+hull);
-
- copy_v3_v3(v,pccd_M->mvert[mface->v3].co);
- mima->minx = MIN2(mima->minx,v[0]-hull);
- mima->miny = MIN2(mima->miny,v[1]-hull);
- mima->minz = MIN2(mima->minz,v[2]-hull);
- mima->maxx = MAX2(mima->maxx,v[0]+hull);
- mima->maxy = MAX2(mima->maxy,v[1]+hull);
- mima->maxz = MAX2(mima->maxz,v[2]+hull);
+ copy_v3_v3(v, pccd_M->mvert[mface->v1].co);
+ mima->minx = MIN2(mima->minx, v[0]-hull);
+ mima->miny = MIN2(mima->miny, v[1]-hull);
+ mima->minz = MIN2(mima->minz, v[2]-hull);
+ mima->maxx = MAX2(mima->maxx, v[0]+hull);
+ mima->maxy = MAX2(mima->maxy, v[1]+hull);
+ mima->maxz = MAX2(mima->maxz, v[2]+hull);
+
+ copy_v3_v3(v, pccd_M->mvert[mface->v2].co);
+ mima->minx = MIN2(mima->minx, v[0]-hull);
+ mima->miny = MIN2(mima->miny, v[1]-hull);
+ mima->minz = MIN2(mima->minz, v[2]-hull);
+ mima->maxx = MAX2(mima->maxx, v[0]+hull);
+ mima->maxy = MAX2(mima->maxy, v[1]+hull);
+ mima->maxz = MAX2(mima->maxz, v[2]+hull);
+
+ copy_v3_v3(v, pccd_M->mvert[mface->v3].co);
+ mima->minx = MIN2(mima->minx, v[0]-hull);
+ mima->miny = MIN2(mima->miny, v[1]-hull);
+ mima->minz = MIN2(mima->minz, v[2]-hull);
+ mima->maxx = MAX2(mima->maxx, v[0]+hull);
+ mima->maxy = MAX2(mima->maxy, v[1]+hull);
+ mima->maxz = MAX2(mima->maxz, v[2]+hull);
if (mface->v4) {
- copy_v3_v3(v,pccd_M->mvert[mface->v4].co);
- mima->minx = MIN2(mima->minx,v[0]-hull);
- mima->miny = MIN2(mima->miny,v[1]-hull);
- mima->minz = MIN2(mima->minz,v[2]-hull);
- mima->maxx = MAX2(mima->maxx,v[0]+hull);
- mima->maxy = MAX2(mima->maxy,v[1]+hull);
- mima->maxz = MAX2(mima->maxz,v[2]+hull);
+ copy_v3_v3(v, pccd_M->mvert[mface->v4].co);
+ mima->minx = MIN2(mima->minx, v[0]-hull);
+ mima->miny = MIN2(mima->miny, v[1]-hull);
+ mima->minz = MIN2(mima->minz, v[2]-hull);
+ mima->maxx = MAX2(mima->maxx, v[0]+hull);
+ mima->maxy = MAX2(mima->maxy, v[1]+hull);
+ mima->maxz = MAX2(mima->maxz, v[2]+hull);
}
@@ -386,12 +387,12 @@ static ccd_Mesh *ccd_mesh_make(Object *ob)
}
return pccd_M;
}
-static void ccd_mesh_update(Object *ob,ccd_Mesh *pccd_M)
+static void ccd_mesh_update(Object *ob, ccd_Mesh *pccd_M)
{
CollisionModifierData *cmd;
ccdf_minmax *mima = NULL;
MFace *mface=NULL;
- float v[3],hull;
+ float v[3], hull;
int i;
cmd =(CollisionModifierData *)modifiers_findByType(ob, eModifierType_Collision);
@@ -401,14 +402,17 @@ static void ccd_mesh_update(Object *ob,ccd_Mesh *pccd_M)
if (!cmd->numverts || !cmd->numfaces) return;
if ((pccd_M->totvert != cmd->numverts) ||
- (pccd_M->totface != cmd->numfaces)) return;
+ (pccd_M->totface != cmd->numfaces))
+ {
+ return;
+ }
pccd_M->bbmin[0]=pccd_M->bbmin[1]=pccd_M->bbmin[2]=1e30f;
pccd_M->bbmax[0]=pccd_M->bbmax[1]=pccd_M->bbmax[2]=-1e30f;
/* blow it up with forcefield ranges */
- hull = MAX2(ob->pd->pdef_sbift,ob->pd->pdef_sboft);
+ hull = MAX2(ob->pd->pdef_sbift, ob->pd->pdef_sboft);
/* rotate current to previous */
if (pccd_M->mprevvert) MEM_freeN(pccd_M->mprevvert);
@@ -419,24 +423,24 @@ static void ccd_mesh_update(Object *ob,ccd_Mesh *pccd_M)
/* determine the ortho BB */
for (i=0; i < pccd_M->totvert; i++) {
/* evaluate limits */
- copy_v3_v3(v,pccd_M->mvert[i].co);
- pccd_M->bbmin[0] = MIN2(pccd_M->bbmin[0],v[0]-hull);
- pccd_M->bbmin[1] = MIN2(pccd_M->bbmin[1],v[1]-hull);
- pccd_M->bbmin[2] = MIN2(pccd_M->bbmin[2],v[2]-hull);
+ copy_v3_v3(v, pccd_M->mvert[i].co);
+ pccd_M->bbmin[0] = MIN2(pccd_M->bbmin[0], v[0]-hull);
+ pccd_M->bbmin[1] = MIN2(pccd_M->bbmin[1], v[1]-hull);
+ pccd_M->bbmin[2] = MIN2(pccd_M->bbmin[2], v[2]-hull);
- pccd_M->bbmax[0] = MAX2(pccd_M->bbmax[0],v[0]+hull);
- pccd_M->bbmax[1] = MAX2(pccd_M->bbmax[1],v[1]+hull);
- pccd_M->bbmax[2] = MAX2(pccd_M->bbmax[2],v[2]+hull);
+ pccd_M->bbmax[0] = MAX2(pccd_M->bbmax[0], v[0]+hull);
+ pccd_M->bbmax[1] = MAX2(pccd_M->bbmax[1], v[1]+hull);
+ pccd_M->bbmax[2] = MAX2(pccd_M->bbmax[2], v[2]+hull);
/* evaluate limits */
- copy_v3_v3(v,pccd_M->mprevvert[i].co);
- pccd_M->bbmin[0] = MIN2(pccd_M->bbmin[0],v[0]-hull);
- pccd_M->bbmin[1] = MIN2(pccd_M->bbmin[1],v[1]-hull);
- pccd_M->bbmin[2] = MIN2(pccd_M->bbmin[2],v[2]-hull);
+ copy_v3_v3(v, pccd_M->mprevvert[i].co);
+ pccd_M->bbmin[0] = MIN2(pccd_M->bbmin[0], v[0]-hull);
+ pccd_M->bbmin[1] = MIN2(pccd_M->bbmin[1], v[1]-hull);
+ pccd_M->bbmin[2] = MIN2(pccd_M->bbmin[2], v[2]-hull);
- pccd_M->bbmax[0] = MAX2(pccd_M->bbmax[0],v[0]+hull);
- pccd_M->bbmax[1] = MAX2(pccd_M->bbmax[1],v[1]+hull);
- pccd_M->bbmax[2] = MAX2(pccd_M->bbmax[2],v[2]+hull);
+ pccd_M->bbmax[0] = MAX2(pccd_M->bbmax[0], v[0]+hull);
+ pccd_M->bbmax[1] = MAX2(pccd_M->bbmax[1], v[1]+hull);
+ pccd_M->bbmax[2] = MAX2(pccd_M->bbmax[2], v[2]+hull);
}
@@ -449,73 +453,73 @@ static void ccd_mesh_update(Object *ob,ccd_Mesh *pccd_M)
mima->minx=mima->miny=mima->minz=1e30f;
mima->maxx=mima->maxy=mima->maxz=-1e30f;
- copy_v3_v3(v,pccd_M->mvert[mface->v1].co);
- mima->minx = MIN2(mima->minx,v[0]-hull);
- mima->miny = MIN2(mima->miny,v[1]-hull);
- mima->minz = MIN2(mima->minz,v[2]-hull);
- mima->maxx = MAX2(mima->maxx,v[0]+hull);
- mima->maxy = MAX2(mima->maxy,v[1]+hull);
- mima->maxz = MAX2(mima->maxz,v[2]+hull);
-
- copy_v3_v3(v,pccd_M->mvert[mface->v2].co);
- mima->minx = MIN2(mima->minx,v[0]-hull);
- mima->miny = MIN2(mima->miny,v[1]-hull);
- mima->minz = MIN2(mima->minz,v[2]-hull);
- mima->maxx = MAX2(mima->maxx,v[0]+hull);
- mima->maxy = MAX2(mima->maxy,v[1]+hull);
- mima->maxz = MAX2(mima->maxz,v[2]+hull);
-
- copy_v3_v3(v,pccd_M->mvert[mface->v3].co);
- mima->minx = MIN2(mima->minx,v[0]-hull);
- mima->miny = MIN2(mima->miny,v[1]-hull);
- mima->minz = MIN2(mima->minz,v[2]-hull);
- mima->maxx = MAX2(mima->maxx,v[0]+hull);
- mima->maxy = MAX2(mima->maxy,v[1]+hull);
- mima->maxz = MAX2(mima->maxz,v[2]+hull);
+ copy_v3_v3(v, pccd_M->mvert[mface->v1].co);
+ mima->minx = MIN2(mima->minx, v[0]-hull);
+ mima->miny = MIN2(mima->miny, v[1]-hull);
+ mima->minz = MIN2(mima->minz, v[2]-hull);
+ mima->maxx = MAX2(mima->maxx, v[0]+hull);
+ mima->maxy = MAX2(mima->maxy, v[1]+hull);
+ mima->maxz = MAX2(mima->maxz, v[2]+hull);
+
+ copy_v3_v3(v, pccd_M->mvert[mface->v2].co);
+ mima->minx = MIN2(mima->minx, v[0]-hull);
+ mima->miny = MIN2(mima->miny, v[1]-hull);
+ mima->minz = MIN2(mima->minz, v[2]-hull);
+ mima->maxx = MAX2(mima->maxx, v[0]+hull);
+ mima->maxy = MAX2(mima->maxy, v[1]+hull);
+ mima->maxz = MAX2(mima->maxz, v[2]+hull);
+
+ copy_v3_v3(v, pccd_M->mvert[mface->v3].co);
+ mima->minx = MIN2(mima->minx, v[0]-hull);
+ mima->miny = MIN2(mima->miny, v[1]-hull);
+ mima->minz = MIN2(mima->minz, v[2]-hull);
+ mima->maxx = MAX2(mima->maxx, v[0]+hull);
+ mima->maxy = MAX2(mima->maxy, v[1]+hull);
+ mima->maxz = MAX2(mima->maxz, v[2]+hull);
if (mface->v4) {
- copy_v3_v3(v,pccd_M->mvert[mface->v4].co);
- mima->minx = MIN2(mima->minx,v[0]-hull);
- mima->miny = MIN2(mima->miny,v[1]-hull);
- mima->minz = MIN2(mima->minz,v[2]-hull);
- mima->maxx = MAX2(mima->maxx,v[0]+hull);
- mima->maxy = MAX2(mima->maxy,v[1]+hull);
- mima->maxz = MAX2(mima->maxz,v[2]+hull);
+ copy_v3_v3(v, pccd_M->mvert[mface->v4].co);
+ mima->minx = MIN2(mima->minx, v[0]-hull);
+ mima->miny = MIN2(mima->miny, v[1]-hull);
+ mima->minz = MIN2(mima->minz, v[2]-hull);
+ mima->maxx = MAX2(mima->maxx, v[0]+hull);
+ mima->maxy = MAX2(mima->maxy, v[1]+hull);
+ mima->maxz = MAX2(mima->maxz, v[2]+hull);
}
- copy_v3_v3(v,pccd_M->mprevvert[mface->v1].co);
- mima->minx = MIN2(mima->minx,v[0]-hull);
- mima->miny = MIN2(mima->miny,v[1]-hull);
- mima->minz = MIN2(mima->minz,v[2]-hull);
- mima->maxx = MAX2(mima->maxx,v[0]+hull);
- mima->maxy = MAX2(mima->maxy,v[1]+hull);
- mima->maxz = MAX2(mima->maxz,v[2]+hull);
-
- copy_v3_v3(v,pccd_M->mprevvert[mface->v2].co);
- mima->minx = MIN2(mima->minx,v[0]-hull);
- mima->miny = MIN2(mima->miny,v[1]-hull);
- mima->minz = MIN2(mima->minz,v[2]-hull);
- mima->maxx = MAX2(mima->maxx,v[0]+hull);
- mima->maxy = MAX2(mima->maxy,v[1]+hull);
- mima->maxz = MAX2(mima->maxz,v[2]+hull);
-
- copy_v3_v3(v,pccd_M->mprevvert[mface->v3].co);
- mima->minx = MIN2(mima->minx,v[0]-hull);
- mima->miny = MIN2(mima->miny,v[1]-hull);
- mima->minz = MIN2(mima->minz,v[2]-hull);
- mima->maxx = MAX2(mima->maxx,v[0]+hull);
- mima->maxy = MAX2(mima->maxy,v[1]+hull);
- mima->maxz = MAX2(mima->maxz,v[2]+hull);
+ copy_v3_v3(v, pccd_M->mprevvert[mface->v1].co);
+ mima->minx = MIN2(mima->minx, v[0]-hull);
+ mima->miny = MIN2(mima->miny, v[1]-hull);
+ mima->minz = MIN2(mima->minz, v[2]-hull);
+ mima->maxx = MAX2(mima->maxx, v[0]+hull);
+ mima->maxy = MAX2(mima->maxy, v[1]+hull);
+ mima->maxz = MAX2(mima->maxz, v[2]+hull);
+
+ copy_v3_v3(v, pccd_M->mprevvert[mface->v2].co);
+ mima->minx = MIN2(mima->minx, v[0]-hull);
+ mima->miny = MIN2(mima->miny, v[1]-hull);
+ mima->minz = MIN2(mima->minz, v[2]-hull);
+ mima->maxx = MAX2(mima->maxx, v[0]+hull);
+ mima->maxy = MAX2(mima->maxy, v[1]+hull);
+ mima->maxz = MAX2(mima->maxz, v[2]+hull);
+
+ copy_v3_v3(v, pccd_M->mprevvert[mface->v3].co);
+ mima->minx = MIN2(mima->minx, v[0]-hull);
+ mima->miny = MIN2(mima->miny, v[1]-hull);
+ mima->minz = MIN2(mima->minz, v[2]-hull);
+ mima->maxx = MAX2(mima->maxx, v[0]+hull);
+ mima->maxy = MAX2(mima->maxy, v[1]+hull);
+ mima->maxz = MAX2(mima->maxz, v[2]+hull);
if (mface->v4) {
- copy_v3_v3(v,pccd_M->mprevvert[mface->v4].co);
- mima->minx = MIN2(mima->minx,v[0]-hull);
- mima->miny = MIN2(mima->miny,v[1]-hull);
- mima->minz = MIN2(mima->minz,v[2]-hull);
- mima->maxx = MAX2(mima->maxx,v[0]+hull);
- mima->maxy = MAX2(mima->maxy,v[1]+hull);
- mima->maxz = MAX2(mima->maxz,v[2]+hull);
+ copy_v3_v3(v, pccd_M->mprevvert[mface->v4].co);
+ mima->minx = MIN2(mima->minx, v[0]-hull);
+ mima->miny = MIN2(mima->miny, v[1]-hull);
+ mima->minz = MIN2(mima->minz, v[2]-hull);
+ mima->maxx = MAX2(mima->maxx, v[0]+hull);
+ mima->maxy = MAX2(mima->maxy, v[1]+hull);
+ mima->maxz = MAX2(mima->maxz, v[2]+hull);
}
@@ -583,9 +587,9 @@ static void ccd_update_deflector_hash(Scene *scene, Object *vertexowner, GHash *
/*+++ only with deflecting set */
if (ob->pd && ob->pd->deflect) {
- ccd_Mesh *ccdmesh = BLI_ghash_lookup(hash,ob);
+ ccd_Mesh *ccdmesh = BLI_ghash_lookup(hash, ob);
if (ccdmesh)
- ccd_mesh_update(ob,ccdmesh);
+ ccd_mesh_update(ob, ccdmesh);
}/*--- only with deflecting set */
}/* mesh && layer*/
@@ -601,7 +605,7 @@ static void ccd_update_deflector_hash(Scene *scene, Object *vertexowner, GHash *
static int count_mesh_quads(Mesh *me)
{
- int a,result = 0;
+ int a, result = 0;
MFace *mface= me->mface;
if (mface) {
@@ -627,8 +631,8 @@ static void add_mesh_quad_diag_springs(Object *ob)
nofquads = count_mesh_quads(me);
if (nofquads) {
/* resize spring-array to hold additional quad springs */
- bs_new= MEM_callocN( (ob->soft->totspring + nofquads *2 )*sizeof(BodySpring), "bodyspring");
- memcpy(bs_new,ob->soft->bspring,(ob->soft->totspring )*sizeof(BodySpring));
+ bs_new= MEM_callocN((ob->soft->totspring + nofquads *2 )*sizeof(BodySpring), "bodyspring");
+ memcpy(bs_new, ob->soft->bspring, (ob->soft->totspring )*sizeof(BodySpring));
if (ob->soft->bspring)
MEM_freeN(ob->soft->bspring); /* do this before reassigning the pointer or have a 1st class memory leak */
@@ -660,13 +664,13 @@ static void add_mesh_quad_diag_springs(Object *ob)
}
}
-static void add_2nd_order_roller(Object *ob,float UNUSED(stiffness), int *counter, int addsprings)
+static void add_2nd_order_roller(Object *ob, float UNUSED(stiffness), int *counter, int addsprings)
{
/*assume we have a softbody*/
SoftBody *sb= ob->soft; /* is supposed to be there */
- BodyPoint *bp,*bpo;
- BodySpring *bs,*bs2,*bs3= NULL;
- int a,b,c,notthis= 0,v0;
+ BodyPoint *bp, *bpo;
+ BodySpring *bs, *bs2, *bs3= NULL;
+ int a, b, c, notthis= 0, v0;
if (!sb->bspring) {return;} /* we are 2nd order here so 1rst should have been build :) */
/* first run counting second run adding */
*counter = 0;
@@ -722,40 +726,40 @@ static void add_2nd_order_roller(Object *ob,float UNUSED(stiffness), int *counte
}
-static void add_2nd_order_springs(Object *ob,float stiffness)
+static void add_2nd_order_springs(Object *ob, float stiffness)
{
int counter = 0;
BodySpring *bs_new;
stiffness *=stiffness;
- add_2nd_order_roller(ob,stiffness,&counter,0); /* counting */
+ add_2nd_order_roller(ob, stiffness, &counter, 0); /* counting */
if (counter) {
/* resize spring-array to hold additional springs */
- bs_new= MEM_callocN( (ob->soft->totspring + counter )*sizeof(BodySpring), "bodyspring");
- memcpy(bs_new,ob->soft->bspring,(ob->soft->totspring )*sizeof(BodySpring));
+ bs_new= MEM_callocN((ob->soft->totspring + counter )*sizeof(BodySpring), "bodyspring");
+ memcpy(bs_new, ob->soft->bspring, (ob->soft->totspring )*sizeof(BodySpring));
if (ob->soft->bspring)
MEM_freeN(ob->soft->bspring);
ob->soft->bspring = bs_new;
- add_2nd_order_roller(ob,stiffness,&counter,1); /* adding */
+ add_2nd_order_roller(ob, stiffness, &counter, 1); /* adding */
ob->soft->totspring += counter;
}
}
-static void add_bp_springlist(BodyPoint *bp,int springID)
+static void add_bp_springlist(BodyPoint *bp, int springID)
{
int *newlist;
if (bp->springs == NULL) {
- bp->springs = MEM_callocN( sizeof(int), "bpsprings");
+ bp->springs = MEM_callocN(sizeof(int), "bpsprings");
bp->springs[0] = springID;
bp->nofsprings = 1;
}
else {
bp->nofsprings++;
newlist = MEM_callocN(bp->nofsprings * sizeof(int), "bpsprings");
- memcpy(newlist,bp->springs,(bp->nofsprings-1)* sizeof(int));
+ memcpy(newlist, bp->springs, (bp->nofsprings-1)* sizeof(int));
MEM_freeN(bp->springs);
bp->springs = newlist;
bp->springs[bp->nofsprings-1] = springID;
@@ -770,7 +774,7 @@ static void build_bps_springlist(Object *ob)
SoftBody *sb= ob->soft; /* is supposed to be there */
BodyPoint *bp;
BodySpring *bs;
- int a,b;
+ int a, b;
if (sb==NULL) return; /* paranoya check */
@@ -783,10 +787,10 @@ static void build_bps_springlist(Object *ob)
/* scan for attached inner springs */
for (b=sb->totspring, bs= sb->bspring; b>0; b--, bs++) {
if (( (sb->totpoint-a) == bs->v1) ) {
- add_bp_springlist(bp,sb->totspring -b);
+ add_bp_springlist(bp, sb->totspring -b);
}
if (( (sb->totpoint-a) == bs->v2) ) {
- add_bp_springlist(bp,sb->totspring -b);
+ add_bp_springlist(bp, sb->totspring -b);
}
}/*for springs*/
}/*for bp*/
@@ -797,8 +801,8 @@ static void calculate_collision_balls(Object *ob)
SoftBody *sb= ob->soft; /* is supposed to be there */
BodyPoint *bp;
BodySpring *bs;
- int a,b,akku_count;
- float min,max,akku;
+ int a, b, akku_count;
+ float min, max, akku;
if (sb==NULL) return; /* paranoya check */
@@ -814,8 +818,8 @@ static void calculate_collision_balls(Object *ob)
if (bs->springtype == SB_EDGE) {
akku += bs->len;
akku_count++,
- min = MIN2(bs->len,min);
- max = MAX2(bs->len,max);
+ min = MIN2(bs->len, min);
+ max = MAX2(bs->len, max);
}
}
@@ -856,9 +860,9 @@ static void renew_softbody(Scene *scene, Object *ob, int totpoint, int totspring
sb->totpoint= totpoint;
sb->totspring= totspring;
- sb->bpoint= MEM_mallocN( totpoint*sizeof(BodyPoint), "bodypoint");
+ sb->bpoint= MEM_mallocN(totpoint*sizeof(BodyPoint), "bodypoint");
if (totspring)
- sb->bspring= MEM_mallocN( totspring*sizeof(BodySpring), "bodyspring");
+ sb->bspring= MEM_mallocN(totspring*sizeof(BodySpring), "bodyspring");
/* initialize BodyPoint array */
for (i=0; i<totpoint; i++) {
@@ -1011,21 +1015,21 @@ static int query_external_colliders(Scene *scene, Object *me)
/* +++ the aabb "force" section*/
-static int sb_detect_aabb_collisionCached( float UNUSED(force[3]), unsigned int UNUSED(par_layer),struct Object *vertexowner,float UNUSED(time))
+static int sb_detect_aabb_collisionCached(float UNUSED(force[3]), unsigned int UNUSED(par_layer), struct Object *vertexowner, float UNUSED(time))
{
Object *ob;
SoftBody *sb=vertexowner->soft;
GHash *hash;
GHashIterator *ihash;
- float aabbmin[3],aabbmax[3];
+ float aabbmin[3], aabbmax[3];
int deflected=0;
#if 0
int a;
#endif
if ((sb == NULL) || (sb->scratch ==NULL)) return 0;
- copy_v3_v3(aabbmin,sb->scratch->aabbmin);
- copy_v3_v3(aabbmax,sb->scratch->aabbmax);
+ copy_v3_v3(aabbmin, sb->scratch->aabbmin);
+ copy_v3_v3(aabbmax, sb->scratch->aabbmax);
hash = vertexowner->soft->scratch->colliderhash;
ihash = BLI_ghashIterator_new(hash);
@@ -1081,22 +1085,22 @@ static int sb_detect_aabb_collisionCached( float UNUSED(force[3]), unsigned int
/* +++ the face external section*/
-static int sb_detect_face_pointCached(float face_v1[3],float face_v2[3],float face_v3[3],float *damp,
- float force[3], unsigned int UNUSED(par_layer),struct Object *vertexowner,float time)
- {
+static int sb_detect_face_pointCached(float face_v1[3], float face_v2[3], float face_v3[3], float *damp,
+ float force[3], unsigned int UNUSED(par_layer), struct Object *vertexowner, float time)
+{
Object *ob;
GHash *hash;
GHashIterator *ihash;
- float nv1[3], edge1[3], edge2[3], d_nvect[3], aabbmin[3],aabbmax[3];
- float facedist,outerfacethickness,tune = 10.f;
+ float nv1[3], edge1[3], edge2[3], d_nvect[3], aabbmin[3], aabbmax[3];
+ float facedist, outerfacethickness, tune = 10.f;
int a, deflected=0;
- aabbmin[0] = MIN3(face_v1[0],face_v2[0],face_v3[0]);
- aabbmin[1] = MIN3(face_v1[1],face_v2[1],face_v3[1]);
- aabbmin[2] = MIN3(face_v1[2],face_v2[2],face_v3[2]);
- aabbmax[0] = MAX3(face_v1[0],face_v2[0],face_v3[0]);
- aabbmax[1] = MAX3(face_v1[1],face_v2[1],face_v3[1]);
- aabbmax[2] = MAX3(face_v1[2],face_v2[2],face_v3[2]);
+ aabbmin[0] = MIN3(face_v1[0], face_v2[0], face_v3[0]);
+ aabbmin[1] = MIN3(face_v1[1], face_v2[1], face_v3[1]);
+ aabbmin[2] = MIN3(face_v1[2], face_v2[2], face_v3[2]);
+ aabbmax[0] = MAX3(face_v1[0], face_v2[0], face_v3[0]);
+ aabbmax[1] = MAX3(face_v1[1], face_v2[1], face_v3[1]);
+ aabbmax[2] = MAX3(face_v1[2], face_v2[2], face_v3[2]);
/* calculate face normal once again SIGH */
sub_v3_v3v3(edge1, face_v1, face_v2);
@@ -1143,16 +1147,16 @@ static int sb_detect_face_pointCached(float face_v1[3],float face_v2[3],float fa
/* use mesh*/
if (mvert) {
while (a) {
- copy_v3_v3(nv1,mvert[a-1].co);
+ copy_v3_v3(nv1, mvert[a-1].co);
if (mprevvert) {
- mul_v3_fl(nv1,time);
- Vec3PlusStVec(nv1,(1.0f-time),mprevvert[a-1].co);
+ mul_v3_fl(nv1, time);
+ Vec3PlusStVec(nv1, (1.0f-time), mprevvert[a-1].co);
}
/* origin to face_v2*/
sub_v3_v3(nv1, face_v2);
- facedist = dot_v3v3(nv1,d_nvect);
+ facedist = dot_v3v3(nv1, d_nvect);
if (ABS(facedist)<outerfacethickness) {
- if (isect_point_tri_prism_v3(nv1, face_v1,face_v2,face_v3) ) {
+ if (isect_point_tri_prism_v3(nv1, face_v1, face_v2, face_v3) ) {
float df;
if (facedist > 0) {
df = (outerfacethickness-facedist)/outerfacethickness;
@@ -1164,7 +1168,7 @@ static int sb_detect_face_pointCached(float face_v1[3],float face_v2[3],float fa
*damp=df*tune*ob->pd->pdef_sbdamp;
df = 0.01f*exp(- 100.0f*df);
- Vec3PlusStVec(force,-df,d_nvect);
+ Vec3PlusStVec(force, -df, d_nvect);
deflected = 3;
}
}
@@ -1179,22 +1183,22 @@ static int sb_detect_face_pointCached(float face_v1[3],float face_v2[3],float fa
}
-static int sb_detect_face_collisionCached(float face_v1[3],float face_v2[3],float face_v3[3],float *damp,
- float force[3], unsigned int UNUSED(par_layer),struct Object *vertexowner,float time)
+static int sb_detect_face_collisionCached(float face_v1[3], float face_v2[3], float face_v3[3], float *damp,
+ float force[3], unsigned int UNUSED(par_layer), struct Object *vertexowner, float time)
{
Object *ob;
GHash *hash;
GHashIterator *ihash;
- float nv1[3], nv2[3], nv3[3], nv4[3], edge1[3], edge2[3], d_nvect[3], aabbmin[3],aabbmax[3];
- float t,tune = 10.0f;
+ float nv1[3], nv2[3], nv3[3], nv4[3], edge1[3], edge2[3], d_nvect[3], aabbmin[3], aabbmax[3];
+ float t, tune = 10.0f;
int a, deflected=0;
- aabbmin[0] = MIN3(face_v1[0],face_v2[0],face_v3[0]);
- aabbmin[1] = MIN3(face_v1[1],face_v2[1],face_v3[1]);
- aabbmin[2] = MIN3(face_v1[2],face_v2[2],face_v3[2]);
- aabbmax[0] = MAX3(face_v1[0],face_v2[0],face_v3[0]);
- aabbmax[1] = MAX3(face_v1[1],face_v2[1],face_v3[1]);
- aabbmax[2] = MAX3(face_v1[2],face_v2[2],face_v3[2]);
+ aabbmin[0] = MIN3(face_v1[0], face_v2[0], face_v3[0]);
+ aabbmin[1] = MIN3(face_v1[1], face_v2[1], face_v3[1]);
+ aabbmin[2] = MIN3(face_v1[2], face_v2[2], face_v3[2]);
+ aabbmax[0] = MAX3(face_v1[0], face_v2[0], face_v3[0]);
+ aabbmax[1] = MAX3(face_v1[1], face_v2[1], face_v3[1]);
+ aabbmax[2] = MAX3(face_v1[2], face_v2[2], face_v3[2]);
hash = vertexowner->soft->scratch->colliderhash;
ihash = BLI_ghashIterator_new(hash);
@@ -1253,25 +1257,25 @@ static int sb_detect_face_collisionCached(float face_v1[3],float face_v2[3],floa
if (mvert) {
- copy_v3_v3(nv1,mvert[mface->v1].co);
- copy_v3_v3(nv2,mvert[mface->v2].co);
- copy_v3_v3(nv3,mvert[mface->v3].co);
+ copy_v3_v3(nv1, mvert[mface->v1].co);
+ copy_v3_v3(nv2, mvert[mface->v2].co);
+ copy_v3_v3(nv3, mvert[mface->v3].co);
if (mface->v4) {
- copy_v3_v3(nv4,mvert[mface->v4].co);
+ copy_v3_v3(nv4, mvert[mface->v4].co);
}
if (mprevvert) {
- mul_v3_fl(nv1,time);
- Vec3PlusStVec(nv1,(1.0f-time),mprevvert[mface->v1].co);
+ mul_v3_fl(nv1, time);
+ Vec3PlusStVec(nv1, (1.0f-time), mprevvert[mface->v1].co);
- mul_v3_fl(nv2,time);
- Vec3PlusStVec(nv2,(1.0f-time),mprevvert[mface->v2].co);
+ mul_v3_fl(nv2, time);
+ Vec3PlusStVec(nv2, (1.0f-time), mprevvert[mface->v2].co);
- mul_v3_fl(nv3,time);
- Vec3PlusStVec(nv3,(1.0f-time),mprevvert[mface->v3].co);
+ mul_v3_fl(nv3, time);
+ Vec3PlusStVec(nv3, (1.0f-time), mprevvert[mface->v3].co);
if (mface->v4) {
- mul_v3_fl(nv4,time);
- Vec3PlusStVec(nv4,(1.0f-time),mprevvert[mface->v4].co);
+ mul_v3_fl(nv4, time);
+ Vec3PlusStVec(nv4, (1.0f-time), mprevvert[mface->v4].co);
}
}
}
@@ -1285,7 +1289,7 @@ static int sb_detect_face_collisionCached(float face_v1[3],float face_v2[3],floa
isect_line_tri_v3(nv1, nv2, face_v1, face_v2, face_v3, &t, NULL) ||
isect_line_tri_v3(nv2, nv3, face_v1, face_v2, face_v3, &t, NULL) ||
isect_line_tri_v3(nv3, nv1, face_v1, face_v2, face_v3, &t, NULL) ) {
- Vec3PlusStVec(force,-0.5f,d_nvect);
+ Vec3PlusStVec(force, -0.5f, d_nvect);
*damp=tune*ob->pd->pdef_sbdamp;
deflected = 2;
}
@@ -1300,7 +1304,7 @@ static int sb_detect_face_collisionCached(float face_v1[3],float face_v2[3],floa
we did that edge already */
isect_line_tri_v3(nv3, nv4, face_v1, face_v2, face_v3, &t, NULL) ||
isect_line_tri_v3(nv4, nv1, face_v1, face_v2, face_v3, &t, NULL) ) {
- Vec3PlusStVec(force,-0.5f,d_nvect);
+ Vec3PlusStVec(force, -0.5f, d_nvect);
*damp=tune*ob->pd->pdef_sbdamp;
deflected = 2;
}
@@ -1317,12 +1321,12 @@ static int sb_detect_face_collisionCached(float face_v1[3],float face_v2[3],floa
-static void scan_for_ext_face_forces(Object *ob,float timenow)
+static void scan_for_ext_face_forces(Object *ob, float timenow)
{
SoftBody *sb = ob->soft;
BodyFace *bf;
int a;
- float damp=0.0f,choke=1.0f;
+ float damp=0.0f, choke=1.0f;
float tune = -10.0f;
float feedback[3];
@@ -1335,25 +1339,25 @@ static void scan_for_ext_face_forces(Object *ob,float timenow)
/*+++edges intruding*/
bf->flag &= ~BFF_INTERSECT;
feedback[0]=feedback[1]=feedback[2]=0.0f;
- if (sb_detect_face_collisionCached(sb->bpoint[bf->v1].pos,sb->bpoint[bf->v2].pos, sb->bpoint[bf->v3].pos,
- &damp, feedback, ob->lay ,ob , timenow)) {
- Vec3PlusStVec(sb->bpoint[bf->v1].force,tune,feedback);
- Vec3PlusStVec(sb->bpoint[bf->v2].force,tune,feedback);
- Vec3PlusStVec(sb->bpoint[bf->v3].force,tune,feedback);
-// Vec3PlusStVec(bf->ext_force,tune,feedback);
+ if (sb_detect_face_collisionCached(sb->bpoint[bf->v1].pos, sb->bpoint[bf->v2].pos, sb->bpoint[bf->v3].pos,
+ &damp, feedback, ob->lay, ob, timenow)) {
+ Vec3PlusStVec(sb->bpoint[bf->v1].force, tune, feedback);
+ Vec3PlusStVec(sb->bpoint[bf->v2].force, tune, feedback);
+ Vec3PlusStVec(sb->bpoint[bf->v3].force, tune, feedback);
+// Vec3PlusStVec(bf->ext_force, tune, feedback);
bf->flag |= BFF_INTERSECT;
- choke = MIN2(MAX2(damp,choke),1.0f);
+ choke = MIN2(MAX2(damp, choke), 1.0f);
}
feedback[0]=feedback[1]=feedback[2]=0.0f;
- if ((bf->v4) && (sb_detect_face_collisionCached(sb->bpoint[bf->v1].pos,sb->bpoint[bf->v3].pos, sb->bpoint[bf->v4].pos,
- &damp, feedback, ob->lay ,ob , timenow))) {
- Vec3PlusStVec(sb->bpoint[bf->v1].force,tune,feedback);
- Vec3PlusStVec(sb->bpoint[bf->v3].force,tune,feedback);
- Vec3PlusStVec(sb->bpoint[bf->v4].force,tune,feedback);
-// Vec3PlusStVec(bf->ext_force,tune,feedback);
+ if ((bf->v4) && (sb_detect_face_collisionCached(sb->bpoint[bf->v1].pos, sb->bpoint[bf->v3].pos, sb->bpoint[bf->v4].pos,
+ &damp, feedback, ob->lay, ob, timenow))) {
+ Vec3PlusStVec(sb->bpoint[bf->v1].force, tune, feedback);
+ Vec3PlusStVec(sb->bpoint[bf->v3].force, tune, feedback);
+ Vec3PlusStVec(sb->bpoint[bf->v4].force, tune, feedback);
+// Vec3PlusStVec(bf->ext_force, tune, feedback);
bf->flag |= BFF_INTERSECT;
- choke = MIN2(MAX2(damp,choke),1.0f);
+ choke = MIN2(MAX2(damp, choke), 1.0f);
}
/*---edges intruding*/
@@ -1362,38 +1366,37 @@ static void scan_for_ext_face_forces(Object *ob,float timenow)
bf->flag &= ~BFF_CLOSEVERT;
tune = -1.0f;
feedback[0]=feedback[1]=feedback[2]=0.0f;
- if (sb_detect_face_pointCached(sb->bpoint[bf->v1].pos,sb->bpoint[bf->v2].pos, sb->bpoint[bf->v3].pos,
- &damp, feedback, ob->lay ,ob , timenow)) {
- Vec3PlusStVec(sb->bpoint[bf->v1].force,tune,feedback);
- Vec3PlusStVec(sb->bpoint[bf->v2].force,tune,feedback);
- Vec3PlusStVec(sb->bpoint[bf->v3].force,tune,feedback);
-// Vec3PlusStVec(bf->ext_force,tune,feedback);
+ if (sb_detect_face_pointCached(sb->bpoint[bf->v1].pos, sb->bpoint[bf->v2].pos, sb->bpoint[bf->v3].pos,
+ &damp, feedback, ob->lay, ob, timenow)) {
+ Vec3PlusStVec(sb->bpoint[bf->v1].force, tune, feedback);
+ Vec3PlusStVec(sb->bpoint[bf->v2].force, tune, feedback);
+ Vec3PlusStVec(sb->bpoint[bf->v3].force, tune, feedback);
+// Vec3PlusStVec(bf->ext_force, tune, feedback);
bf->flag |= BFF_CLOSEVERT;
- choke = MIN2(MAX2(damp,choke),1.0f);
+ choke = MIN2(MAX2(damp, choke), 1.0f);
}
feedback[0]=feedback[1]=feedback[2]=0.0f;
- if ((bf->v4) && (sb_detect_face_pointCached(sb->bpoint[bf->v1].pos,sb->bpoint[bf->v3].pos, sb->bpoint[bf->v4].pos,
- &damp, feedback, ob->lay ,ob , timenow))) {
- Vec3PlusStVec(sb->bpoint[bf->v1].force,tune,feedback);
- Vec3PlusStVec(sb->bpoint[bf->v3].force,tune,feedback);
- Vec3PlusStVec(sb->bpoint[bf->v4].force,tune,feedback);
-// Vec3PlusStVec(bf->ext_force,tune,feedback);
+ if ((bf->v4) && (sb_detect_face_pointCached(sb->bpoint[bf->v1].pos, sb->bpoint[bf->v3].pos, sb->bpoint[bf->v4].pos,
+ &damp, feedback, ob->lay, ob, timenow))) {
+ Vec3PlusStVec(sb->bpoint[bf->v1].force, tune, feedback);
+ Vec3PlusStVec(sb->bpoint[bf->v3].force, tune, feedback);
+ Vec3PlusStVec(sb->bpoint[bf->v4].force, tune, feedback);
+// Vec3PlusStVec(bf->ext_force, tune, feedback);
bf->flag |= BFF_CLOSEVERT;
- choke = MIN2(MAX2(damp,choke),1.0f);
+ choke = MIN2(MAX2(damp, choke), 1.0f);
}
}
/*--- close vertices*/
}
bf = sb->scratch->bodyface;
for (a=0; a<sb->scratch->totface; a++, bf++) {
- if (( bf->flag & BFF_INTERSECT) || ( bf->flag & BFF_CLOSEVERT))
- {
- sb->bpoint[bf->v1].choke2=MAX2(sb->bpoint[bf->v1].choke2,choke);
- sb->bpoint[bf->v2].choke2=MAX2(sb->bpoint[bf->v2].choke2,choke);
- sb->bpoint[bf->v3].choke2=MAX2(sb->bpoint[bf->v3].choke2,choke);
+ if (( bf->flag & BFF_INTERSECT) || ( bf->flag & BFF_CLOSEVERT)) {
+ sb->bpoint[bf->v1].choke2=MAX2(sb->bpoint[bf->v1].choke2, choke);
+ sb->bpoint[bf->v2].choke2=MAX2(sb->bpoint[bf->v2].choke2, choke);
+ sb->bpoint[bf->v3].choke2=MAX2(sb->bpoint[bf->v3].choke2, choke);
if (bf->v4) {
- sb->bpoint[bf->v2].choke2=MAX2(sb->bpoint[bf->v2].choke2,choke);
+ sb->bpoint[bf->v2].choke2=MAX2(sb->bpoint[bf->v2].choke2, choke);
}
}
}
@@ -1405,24 +1408,24 @@ static void scan_for_ext_face_forces(Object *ob,float timenow)
/* +++ the spring external section*/
-static int sb_detect_edge_collisionCached(float edge_v1[3],float edge_v2[3],float *damp,
- float force[3], unsigned int UNUSED(par_layer),struct Object *vertexowner,float time)
+static int sb_detect_edge_collisionCached(float edge_v1[3], float edge_v2[3], float *damp,
+ float force[3], unsigned int UNUSED(par_layer), struct Object *vertexowner, float time)
{
Object *ob;
GHash *hash;
GHashIterator *ihash;
- float nv1[3], nv2[3], nv3[3], nv4[3], edge1[3], edge2[3], d_nvect[3], aabbmin[3],aabbmax[3];
- float t,el;
+ float nv1[3], nv2[3], nv3[3], nv4[3], edge1[3], edge2[3], d_nvect[3], aabbmin[3], aabbmax[3];
+ float t, el;
int a, deflected=0;
- aabbmin[0] = MIN2(edge_v1[0],edge_v2[0]);
- aabbmin[1] = MIN2(edge_v1[1],edge_v2[1]);
- aabbmin[2] = MIN2(edge_v1[2],edge_v2[2]);
- aabbmax[0] = MAX2(edge_v1[0],edge_v2[0]);
- aabbmax[1] = MAX2(edge_v1[1],edge_v2[1]);
- aabbmax[2] = MAX2(edge_v1[2],edge_v2[2]);
+ aabbmin[0] = MIN2(edge_v1[0], edge_v2[0]);
+ aabbmin[1] = MIN2(edge_v1[1], edge_v2[1]);
+ aabbmin[2] = MIN2(edge_v1[2], edge_v2[2]);
+ aabbmax[0] = MAX2(edge_v1[0], edge_v2[0]);
+ aabbmax[1] = MAX2(edge_v1[1], edge_v2[1]);
+ aabbmax[2] = MAX2(edge_v1[2], edge_v2[2]);
- el = len_v3v3(edge_v1,edge_v2);
+ el = len_v3v3(edge_v1, edge_v2);
hash = vertexowner->soft->scratch->colliderhash;
ihash = BLI_ghashIterator_new(hash);
@@ -1481,25 +1484,25 @@ static int sb_detect_edge_collisionCached(float edge_v1[3],float edge_v2[3],floa
if (mvert) {
- copy_v3_v3(nv1,mvert[mface->v1].co);
- copy_v3_v3(nv2,mvert[mface->v2].co);
- copy_v3_v3(nv3,mvert[mface->v3].co);
+ copy_v3_v3(nv1, mvert[mface->v1].co);
+ copy_v3_v3(nv2, mvert[mface->v2].co);
+ copy_v3_v3(nv3, mvert[mface->v3].co);
if (mface->v4) {
- copy_v3_v3(nv4,mvert[mface->v4].co);
+ copy_v3_v3(nv4, mvert[mface->v4].co);
}
if (mprevvert) {
- mul_v3_fl(nv1,time);
- Vec3PlusStVec(nv1,(1.0f-time),mprevvert[mface->v1].co);
+ mul_v3_fl(nv1, time);
+ Vec3PlusStVec(nv1, (1.0f-time), mprevvert[mface->v1].co);
- mul_v3_fl(nv2,time);
- Vec3PlusStVec(nv2,(1.0f-time),mprevvert[mface->v2].co);
+ mul_v3_fl(nv2, time);
+ Vec3PlusStVec(nv2, (1.0f-time), mprevvert[mface->v2].co);
- mul_v3_fl(nv3,time);
- Vec3PlusStVec(nv3,(1.0f-time),mprevvert[mface->v3].co);
+ mul_v3_fl(nv3, time);
+ Vec3PlusStVec(nv3, (1.0f-time), mprevvert[mface->v3].co);
if (mface->v4) {
- mul_v3_fl(nv4,time);
- Vec3PlusStVec(nv4,(1.0f-time),mprevvert[mface->v4].co);
+ mul_v3_fl(nv4, time);
+ Vec3PlusStVec(nv4, (1.0f-time), mprevvert[mface->v4].co);
}
}
}
@@ -1511,14 +1514,14 @@ static int sb_detect_edge_collisionCached(float edge_v1[3],float edge_v2[3],floa
cross_v3_v3v3(d_nvect, edge2, edge1);
normalize_v3(d_nvect);
if ( isect_line_tri_v3(edge_v1, edge_v2, nv1, nv2, nv3, &t, NULL)) {
- float v1[3],v2[3];
- float intrusiondepth,i1,i2;
+ float v1[3], v2[3];
+ float intrusiondepth, i1, i2;
sub_v3_v3v3(v1, edge_v1, nv2);
sub_v3_v3v3(v2, edge_v2, nv2);
- i1 = dot_v3v3(v1,d_nvect);
- i2 = dot_v3v3(v2,d_nvect);
- intrusiondepth = -MIN2(i1,i2)/el;
- Vec3PlusStVec(force,intrusiondepth,d_nvect);
+ i1 = dot_v3v3(v1, d_nvect);
+ i2 = dot_v3v3(v2, d_nvect);
+ intrusiondepth = -MIN2(i1, i2)/el;
+ Vec3PlusStVec(force, intrusiondepth, d_nvect);
*damp=ob->pd->pdef_sbdamp;
deflected = 2;
}
@@ -1529,17 +1532,17 @@ static int sb_detect_edge_collisionCached(float edge_v1[3],float edge_v2[3],floa
cross_v3_v3v3(d_nvect, edge2, edge1);
normalize_v3(d_nvect);
- if (isect_line_tri_v3( edge_v1, edge_v2,nv1, nv3, nv4, &t, NULL)) {
- float v1[3],v2[3];
- float intrusiondepth,i1,i2;
+ if (isect_line_tri_v3( edge_v1, edge_v2, nv1, nv3, nv4, &t, NULL)) {
+ float v1[3], v2[3];
+ float intrusiondepth, i1, i2;
sub_v3_v3v3(v1, edge_v1, nv4);
sub_v3_v3v3(v2, edge_v2, nv4);
- i1 = dot_v3v3(v1,d_nvect);
- i2 = dot_v3v3(v2,d_nvect);
- intrusiondepth = -MIN2(i1,i2)/el;
+ i1 = dot_v3v3(v1, d_nvect);
+ i2 = dot_v3v3(v2, d_nvect);
+ intrusiondepth = -MIN2(i1, i2)/el;
- Vec3PlusStVec(force,intrusiondepth,d_nvect);
+ Vec3PlusStVec(force, intrusiondepth, d_nvect);
*damp=ob->pd->pdef_sbdamp;
deflected = 2;
}
@@ -1571,8 +1574,8 @@ static void _scan_for_ext_spring_forces(Scene *scene, Object *ob, float timenow,
if (bs->springtype == SB_EDGE) {
/* +++ springs colliding */
if (ob->softflag & OB_SB_EDGECOLL) {
- if ( sb_detect_edge_collisionCached (sb->bpoint[bs->v1].pos , sb->bpoint[bs->v2].pos,
- &damp,feedback,ob->lay,ob,timenow)) {
+ if ( sb_detect_edge_collisionCached (sb->bpoint[bs->v1].pos, sb->bpoint[bs->v2].pos,
+ &damp, feedback, ob->lay, ob, timenow)) {
add_v3_v3(bs->ext_force, feedback);
bs->flag |= BSF_INTERSECT;
//bs->cf=damp;
@@ -1585,40 +1588,40 @@ static void _scan_for_ext_spring_forces(Scene *scene, Object *ob, float timenow,
/* +++ springs seeing wind ... n stuff depending on their orientation*/
/* note we don't use sb->mediafrict but use sb->aeroedge for magnitude of effect*/
if (sb->aeroedge) {
- float vel[3],sp[3],pr[3],force[3];
- float f,windfactor = 0.25f;
+ float vel[3], sp[3], pr[3], force[3];
+ float f, windfactor = 0.25f;
/*see if we have wind*/
if (do_effector) {
EffectedPoint epoint;
- float speed[3]={0.0f,0.0f,0.0f};
+ float speed[3]={0.0f, 0.0f, 0.0f};
float pos[3];
- mid_v3_v3v3(pos, sb->bpoint[bs->v1].pos , sb->bpoint[bs->v2].pos);
- mid_v3_v3v3(vel, sb->bpoint[bs->v1].vec , sb->bpoint[bs->v2].vec);
+ mid_v3_v3v3(pos, sb->bpoint[bs->v1].pos, sb->bpoint[bs->v2].pos);
+ mid_v3_v3v3(vel, sb->bpoint[bs->v1].vec, sb->bpoint[bs->v2].vec);
pd_point_from_soft(scene, pos, vel, -1, &epoint);
pdDoEffectors(do_effector, NULL, sb->effector_weights, &epoint, force, speed);
- mul_v3_fl(speed,windfactor);
+ mul_v3_fl(speed, windfactor);
add_v3_v3(vel, speed);
}
/* media in rest */
else {
- add_v3_v3v3(vel, sb->bpoint[bs->v1].vec , sb->bpoint[bs->v2].vec);
+ add_v3_v3v3(vel, sb->bpoint[bs->v1].vec, sb->bpoint[bs->v2].vec);
}
f = normalize_v3(vel);
f = -0.0001f*f*f*sb->aeroedge;
/* (todo) add a nice angle dependent function done for now BUT */
/* still there could be some nice drag/lift function, but who needs it */
- sub_v3_v3v3(sp, sb->bpoint[bs->v1].pos , sb->bpoint[bs->v2].pos);
- project_v3_v3v3(pr,vel,sp);
+ sub_v3_v3v3(sp, sb->bpoint[bs->v1].pos, sb->bpoint[bs->v2].pos);
+ project_v3_v3v3(pr, vel, sp);
sub_v3_v3(vel, pr);
normalize_v3(vel);
if (ob->softflag & OB_SB_AERO_ANGLE) {
normalize_v3(sp);
- Vec3PlusStVec(bs->ext_force,f*(1.0f-ABS(dot_v3v3(vel,sp))),vel);
+ Vec3PlusStVec(bs->ext_force, f*(1.0f-ABS(dot_v3v3(vel, sp))), vel);
}
else {
- Vec3PlusStVec(bs->ext_force,f,vel); // to keep compatible with 2.45 release files
+ Vec3PlusStVec(bs->ext_force, f, vel); // to keep compatible with 2.45 release files
}
}
/* --- springs seeing wind */
@@ -1645,12 +1648,12 @@ static void *exec_scan_for_ext_spring_forces(void *data)
return NULL;
}
-static void sb_sfesf_threads_run(Scene *scene, struct Object *ob, float timenow,int totsprings,int *UNUSED(ptr_to_break_func(void)))
+static void sb_sfesf_threads_run(Scene *scene, struct Object *ob, float timenow, int totsprings, int *UNUSED(ptr_to_break_func(void)))
{
ListBase *do_effector = NULL;
ListBase threads;
SB_thread_context *sb_threads;
- int i, totthread,left,dec;
+ int i, totthread, left, dec;
int lowsprings =100; /* wild guess .. may increase with better thread management 'above' or even be UI option sb->spawn_cf_threads_nopts */
do_effector= pdInitEffectors(scene, ob, NULL, ob->soft->effector_weights);
@@ -1707,27 +1710,27 @@ static void sb_sfesf_threads_run(Scene *scene, struct Object *ob, float timenow,
/* --- the spring external section*/
-static int choose_winner(float*w, float* pos,float*a,float*b,float*c,float*ca,float*cb,float*cc)
+static int choose_winner(float*w, float* pos, float*a, float*b, float*c, float*ca, float*cb, float*cc)
{
- float mindist,cp;
+ float mindist, cp;
int winner =1;
- mindist = ABS(dot_v3v3(pos,a));
+ mindist = ABS(dot_v3v3(pos, a));
- cp = ABS(dot_v3v3(pos,b));
+ cp = ABS(dot_v3v3(pos, b));
if ( mindist < cp ) {
mindist = cp;
winner =2;
}
- cp = ABS(dot_v3v3(pos,c));
+ cp = ABS(dot_v3v3(pos, c));
if (mindist < cp ) {
mindist = cp;
winner =3;
}
switch (winner) {
- case 1: copy_v3_v3(w,ca); break;
- case 2: copy_v3_v3(w,cb); break;
- case 3: copy_v3_v3(w,cc);
+ case 1: copy_v3_v3(w, ca); break;
+ case 2: copy_v3_v3(w, cb); break;
+ case 3: copy_v3_v3(w, cc);
}
return(winner);
}
@@ -1736,12 +1739,12 @@ static int choose_winner(float*w, float* pos,float*a,float*b,float*c,float*ca,fl
static int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3], float *damp,
float force[3], unsigned int UNUSED(par_layer), struct Object *vertexowner,
- float time,float vel[3], float *intrusion)
+ float time, float vel[3], float *intrusion)
{
Object *ob= NULL;
GHash *hash;
GHashIterator *ihash;
- float nv1[3], nv2[3], nv3[3], nv4[3], edge1[3], edge2[3],d_nvect[3], dv1[3],ve[3],avel[3]={0.0,0.0,0.0},
+ float nv1[3], nv2[3], nv3[3], nv4[3], edge1[3], edge2[3], d_nvect[3], dv1[3], ve[3], avel[3]={0.0, 0.0, 0.0},
vv1[3], vv2[3], vv3[3], vv4[3], coledge[3]={0.0f, 0.0f, 0.0f}, mindistedge = 1000.0f,
outerforceaccu[3], innerforceaccu[3],
facedist, /* n_mag, */ /* UNUSED */ force_mag_norm, minx, miny, minz, maxx, maxy, maxz,
@@ -1824,11 +1827,11 @@ static int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3],
if (mvert) {
- copy_v3_v3(nv1,mvert[mface->v1].co);
- copy_v3_v3(nv2,mvert[mface->v2].co);
- copy_v3_v3(nv3,mvert[mface->v3].co);
+ copy_v3_v3(nv1, mvert[mface->v1].co);
+ copy_v3_v3(nv2, mvert[mface->v2].co);
+ copy_v3_v3(nv3, mvert[mface->v3].co);
if (mface->v4) {
- copy_v3_v3(nv4,mvert[mface->v4].co);
+ copy_v3_v3(nv4, mvert[mface->v4].co);
}
if (mprevvert) {
@@ -1838,25 +1841,25 @@ static int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3],
since the AABB reduced propabitlty to get here drasticallly
it might be a nice tradeof CPU <--> memory
*/
- sub_v3_v3v3(vv1,nv1,mprevvert[mface->v1].co);
- sub_v3_v3v3(vv2,nv2,mprevvert[mface->v2].co);
- sub_v3_v3v3(vv3,nv3,mprevvert[mface->v3].co);
+ sub_v3_v3v3(vv1, nv1, mprevvert[mface->v1].co);
+ sub_v3_v3v3(vv2, nv2, mprevvert[mface->v2].co);
+ sub_v3_v3v3(vv3, nv3, mprevvert[mface->v3].co);
if (mface->v4) {
- sub_v3_v3v3(vv4,nv4,mprevvert[mface->v4].co);
+ sub_v3_v3v3(vv4, nv4, mprevvert[mface->v4].co);
}
- mul_v3_fl(nv1,time);
- Vec3PlusStVec(nv1,(1.0f-time),mprevvert[mface->v1].co);
+ mul_v3_fl(nv1, time);
+ Vec3PlusStVec(nv1, (1.0f-time), mprevvert[mface->v1].co);
- mul_v3_fl(nv2,time);
- Vec3PlusStVec(nv2,(1.0f-time),mprevvert[mface->v2].co);
+ mul_v3_fl(nv2, time);
+ Vec3PlusStVec(nv2, (1.0f-time), mprevvert[mface->v2].co);
- mul_v3_fl(nv3,time);
- Vec3PlusStVec(nv3,(1.0f-time),mprevvert[mface->v3].co);
+ mul_v3_fl(nv3, time);
+ Vec3PlusStVec(nv3, (1.0f-time), mprevvert[mface->v3].co);
if (mface->v4) {
- mul_v3_fl(nv4,time);
- Vec3PlusStVec(nv4,(1.0f-time),mprevvert[mface->v4].co);
+ mul_v3_fl(nv4, time);
+ Vec3PlusStVec(nv4, (1.0f-time), mprevvert[mface->v4].co);
}
}
}
@@ -1864,11 +1867,11 @@ static int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3],
/* switch origin to be nv2*/
sub_v3_v3v3(edge1, nv1, nv2);
sub_v3_v3v3(edge2, nv3, nv2);
- sub_v3_v3v3(dv1,opco,nv2); /* abuse dv1 to have vertex in question at *origin* of triangle */
+ sub_v3_v3v3(dv1, opco, nv2); /* abuse dv1 to have vertex in question at *origin* of triangle */
cross_v3_v3v3(d_nvect, edge2, edge1);
/* n_mag = */ /* UNUSED */ normalize_v3(d_nvect);
- facedist = dot_v3v3(dv1,d_nvect);
+ facedist = dot_v3v3(dv1, d_nvect);
// so rules are
//
@@ -1880,16 +1883,16 @@ static int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3],
*damp=ob->pd->pdef_sbdamp;
if (facedist > 0.0f) {
*damp *= (1.0f - facedist/outerfacethickness);
- Vec3PlusStVec(outerforceaccu,force_mag_norm,d_nvect);
+ Vec3PlusStVec(outerforceaccu, force_mag_norm, d_nvect);
deflected = 3;
}
else {
- Vec3PlusStVec(innerforceaccu,force_mag_norm,d_nvect);
+ Vec3PlusStVec(innerforceaccu, force_mag_norm, d_nvect);
if (deflected < 2) deflected = 2;
}
if ((mprevvert) && (*damp > 0.0f)) {
- choose_winner(ve,opco,nv1,nv2,nv3,vv1,vv2,vv3);
+ choose_winner(ve, opco, nv1, nv2, nv3, vv1, vv2, vv3);
add_v3_v3(avel, ve);
cavel ++;
}
@@ -1901,11 +1904,11 @@ static int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3],
/* switch origin to be nv4 */
sub_v3_v3v3(edge1, nv3, nv4);
sub_v3_v3v3(edge2, nv1, nv4);
- sub_v3_v3v3(dv1,opco,nv4); /* abuse dv1 to have vertex in question at *origin* of triangle */
+ sub_v3_v3v3(dv1, opco, nv4); /* abuse dv1 to have vertex in question at *origin* of triangle */
cross_v3_v3v3(d_nvect, edge2, edge1);
/* n_mag = */ /* UNUSED */ normalize_v3(d_nvect);
- facedist = dot_v3v3(dv1,d_nvect);
+ facedist = dot_v3v3(dv1, d_nvect);
if ((facedist > innerfacethickness) && (facedist < outerfacethickness)) {
if (isect_point_tri_prism_v3(opco, nv1, nv3, nv4) ) {
@@ -1915,17 +1918,17 @@ static int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3],
*damp=ob->pd->pdef_sbdamp;
if (facedist > 0.0f) {
*damp *= (1.0f - facedist/outerfacethickness);
- Vec3PlusStVec(outerforceaccu,force_mag_norm,d_nvect);
+ Vec3PlusStVec(outerforceaccu, force_mag_norm, d_nvect);
deflected = 3;
}
else {
- Vec3PlusStVec(innerforceaccu,force_mag_norm,d_nvect);
+ Vec3PlusStVec(innerforceaccu, force_mag_norm, d_nvect);
if (deflected < 2) deflected = 2;
}
if ((mprevvert) && (*damp > 0.0f)) {
- choose_winner(ve,opco,nv1,nv3,nv4,vv1,vv3,vv4);
+ choose_winner(ve, opco, nv1, nv3, nv4, vv1, vv3, vv4);
add_v3_v3(avel, ve);
cavel ++;
}
@@ -1934,51 +1937,51 @@ static int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3],
}
}
- if ((deflected < 2)&& (G.rt != 444)) // we did not hit a face until now
- { // see if 'outer' hits an edge
+ if ((deflected < 2)&& (G.rt != 444)) { /* we did not hit a face until now */
+ /* see if 'outer' hits an edge */
float dist;
closest_to_line_segment_v3(ve, opco, nv1, nv2);
- sub_v3_v3v3(ve,opco,ve);
+ sub_v3_v3v3(ve, opco, ve);
dist = normalize_v3(ve);
if ((dist < outerfacethickness)&&(dist < mindistedge )) {
- copy_v3_v3(coledge,ve);
+ copy_v3_v3(coledge, ve);
mindistedge = dist,
deflected=1;
}
closest_to_line_segment_v3(ve, opco, nv2, nv3);
- sub_v3_v3v3(ve,opco,ve);
+ sub_v3_v3v3(ve, opco, ve);
dist = normalize_v3(ve);
if ((dist < outerfacethickness)&&(dist < mindistedge )) {
- copy_v3_v3(coledge,ve);
+ copy_v3_v3(coledge, ve);
mindistedge = dist,
deflected=1;
}
closest_to_line_segment_v3(ve, opco, nv3, nv1);
- sub_v3_v3v3(ve,opco,ve);
+ sub_v3_v3v3(ve, opco, ve);
dist = normalize_v3(ve);
if ((dist < outerfacethickness)&&(dist < mindistedge )) {
- copy_v3_v3(coledge,ve);
+ copy_v3_v3(coledge, ve);
mindistedge = dist,
deflected=1;
}
if (mface->v4) { /* quad */
closest_to_line_segment_v3(ve, opco, nv3, nv4);
- sub_v3_v3v3(ve,opco,ve);
+ sub_v3_v3v3(ve, opco, ve);
dist = normalize_v3(ve);
if ((dist < outerfacethickness)&&(dist < mindistedge )) {
- copy_v3_v3(coledge,ve);
+ copy_v3_v3(coledge, ve);
mindistedge = dist,
deflected=1;
}
closest_to_line_segment_v3(ve, opco, nv1, nv4);
- sub_v3_v3v3(ve,opco,ve);
+ sub_v3_v3v3(ve, opco, ve);
dist = normalize_v3(ve);
if ((dist < outerfacethickness)&&(dist < mindistedge )) {
- copy_v3_v3(coledge,ve);
+ copy_v3_v3(coledge, ve);
mindistedge = dist,
deflected=1;
}
@@ -1999,7 +2002,7 @@ static int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3],
force_mag_norm =(float)exp(-ee*mindistedge);
if (mindistedge > outerfacethickness*ff)
force_mag_norm =(float)force_mag_norm*fa*(mindistedge - outerfacethickness)*(mindistedge - outerfacethickness);
- Vec3PlusStVec(force,force_mag_norm,coledge);
+ Vec3PlusStVec(force, force_mag_norm, coledge);
*damp=ob->pd->pdef_sbdamp;
if (mindistedge > 0.0f) {
*damp *= (1.0f - mindistedge/outerfacethickness);
@@ -2014,8 +2017,8 @@ static int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3],
}
BLI_ghashIterator_free(ihash);
- if (cavel) mul_v3_fl(avel,1.0f/(float)cavel);
- copy_v3_v3(vel,avel);
+ if (cavel) mul_v3_fl(avel, 1.0f/(float)cavel);
+ copy_v3_v3(vel, avel);
if (ci) *intrusion /= ci;
if (deflected) {
normalize_v3_v3(facenormal, force);
@@ -2025,34 +2028,34 @@ static int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3],
/* sandbox to plug in various deflection algos */
-static int sb_deflect_face(Object *ob,float *actpos,float *facenormal,float *force,float *cf,float time,float *vel,float *intrusion)
+static int sb_deflect_face(Object *ob, float *actpos, float *facenormal, float *force, float *cf, float time, float *vel, float *intrusion)
{
float s_actpos[3];
int deflected;
- copy_v3_v3(s_actpos,actpos);
- deflected= sb_detect_vertex_collisionCached(s_actpos, facenormal, cf, force , ob->lay, ob,time,vel,intrusion);
- //deflected= sb_detect_vertex_collisionCachedEx(s_actpos, facenormal, cf, force , ob->lay, ob,time,vel,intrusion);
+ copy_v3_v3(s_actpos, actpos);
+ deflected= sb_detect_vertex_collisionCached(s_actpos, facenormal, cf, force, ob->lay, ob, time, vel, intrusion);
+ //deflected= sb_detect_vertex_collisionCachedEx(s_actpos, facenormal, cf, force, ob->lay, ob, time, vel, intrusion);
return(deflected);
}
/* hiding this for now .. but the jacobian may pop up on other tasks .. so i'd like to keep it
-static void dfdx_spring(int ia, int ic, int op, float dir[3],float L,float len,float factor)
+static void dfdx_spring(int ia, int ic, int op, float dir[3], float L, float len, float factor)
{
- float m,delta_ij;
- int i ,j;
+ float m, delta_ij;
+ int i, j;
if (L < len) {
for (i=0;i<3;i++)
for (j=0;j<3;j++) {
delta_ij = (i==j ? (1.0f): (0.0f));
m=factor*(dir[i]*dir[j] + (1-L/len)*(delta_ij - dir[i]*dir[j]));
- nlMatrixAdd(ia+i,op+ic+j,m);
+ nlMatrixAdd(ia+i, op+ic+j, m);
}
}
else {
for (i=0;i<3;i++)
for (j=0;j<3;j++) {
m=factor*dir[i]*dir[j];
- nlMatrixAdd(ia+i,op+ic+j,m);
+ nlMatrixAdd(ia+i, op+ic+j, m);
}
}
}
@@ -2061,24 +2064,24 @@ static void dfdx_spring(int ia, int ic, int op, float dir[3],float L,float len,f
static void dfdx_goal(int ia, int ic, int op, float factor)
{
int i;
- for (i=0;i<3;i++) nlMatrixAdd(ia+i,op+ic+i,factor);
+ for (i=0;i<3;i++) nlMatrixAdd(ia+i, op+ic+i, factor);
}
-static void dfdv_goal(int ia, int ic,float factor)
+static void dfdv_goal(int ia, int ic, float factor)
{
int i;
- for (i=0;i<3;i++) nlMatrixAdd(ia+i,ic+i,factor);
+ for (i=0;i<3;i++) nlMatrixAdd(ia+i, ic+i, factor);
}
*/
-static void sb_spring_force(Object *ob,int bpi,BodySpring *bs,float iks,float UNUSED(forcetime), int nl_flags)
+static void sb_spring_force(Object *ob, int bpi, BodySpring *bs, float iks, float UNUSED(forcetime), int nl_flags)
{
SoftBody *sb= ob->soft; /* is supposed to be there */
- BodyPoint *bp1,*bp2;
+ BodyPoint *bp1, *bp2;
- float dir[3],dvel[3];
- float distance,forcefactor,kd,absvel,projvel,kw;
+ float dir[3], dvel[3];
+ float distance, forcefactor, kd, absvel, projvel, kw;
#if 0 /* UNUSED */
- int ia,ic;
+ int ia, ic;
#endif
/* prepare depending on which side of the spring we are on */
if (bpi == bs->v1) {
@@ -2105,7 +2108,7 @@ static void sb_spring_force(Object *ob,int bpi,BodySpring *bs,float iks,float UN
}
/* do bp1 <--> bp2 elastic */
- sub_v3_v3v3(dir,bp1->pos,bp2->pos);
+ sub_v3_v3v3(dir, bp1->pos, bp2->pos);
distance = normalize_v3(dir);
if (bs->len < distance)
iks = 1.0f/(1.0f-sb->inspring)-1.0f ;/* inner spring constants function */
@@ -2135,15 +2138,15 @@ static void sb_spring_force(Object *ob,int bpi,BodySpring *bs,float iks,float UN
}
- Vec3PlusStVec(bp1->force,(bs->len - distance)*forcefactor,dir);
+ Vec3PlusStVec(bp1->force, (bs->len - distance)*forcefactor, dir);
/* do bp1 <--> bp2 viscous */
- sub_v3_v3v3(dvel,bp1->vec,bp2->vec);
+ sub_v3_v3v3(dvel, bp1->vec, bp2->vec);
kd = sb->infrict * sb_fric_force_scale(ob);
absvel = normalize_v3(dvel);
- projvel = dot_v3v3(dir,dvel);
+ projvel = dot_v3v3(dir, dvel);
kd *= absvel * projvel;
- Vec3PlusStVec(bp1->force,-kd,dir);
+ Vec3PlusStVec(bp1->force, -kd, dir);
/* do jacobian stuff if needed */
if (nl_flags & NLF_BUILD) {
@@ -2151,14 +2154,14 @@ static void sb_spring_force(Object *ob,int bpi,BodySpring *bs,float iks,float UN
//float mvel = -forcetime*kd;
//float mpos = -forcetime*forcefactor;
/* depending on my pos */
- // dfdx_spring(ia,ia,op,dir,bs->len,distance,-mpos);
+ // dfdx_spring(ia, ia, op, dir, bs->len, distance, -mpos);
/* depending on my vel */
- // dfdv_goal(ia,ia,mvel); // well that ignores geometie
+ // dfdv_goal(ia, ia, mvel); // well that ignores geometie
if (bp2->goal < SOFTGOALSNAP) { /* ommit this bp when it snaps */
/* depending on other pos */
- // dfdx_spring(ia,ic,op,dir,bs->len,distance,mpos);
+ // dfdx_spring(ia, ic, op, dir, bs->len, distance, mpos);
/* depending on other vel */
- // dfdv_goal(ia,ia,-mvel); // well that ignores geometie
+ // dfdv_goal(ia, ia, -mvel); // well that ignores geometie
}
}
}
@@ -2167,10 +2170,10 @@ static void sb_spring_force(Object *ob,int bpi,BodySpring *bs,float iks,float UN
/* since this is definitely the most CPU consuming task here .. try to spread it */
/* core function _softbody_calc_forces_slice_in_a_thread */
/* result is int to be able to flag user break */
-static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, Object *ob, float forcetime, float timenow,int ifirst,int ilast,int *UNUSED(ptr_to_break_func(void)),ListBase *do_effector,int do_deflector,float fieldfactor, float windfactor)
+static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, Object *ob, float forcetime, float timenow, int ifirst, int ilast, int *UNUSED(ptr_to_break_func(void)), ListBase *do_effector, int do_deflector, float fieldfactor, float windfactor)
{
float iks;
- int bb,do_selfcollision,do_springcollision,do_aero;
+ int bb, do_selfcollision, do_springcollision, do_aero;
int number_of_points_here = ilast - ifirst;
SoftBody *sb= ob->soft; /* is supposed to be there */
BodyPoint *bp;
@@ -2207,8 +2210,8 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, Object *ob, flo
int attached;
BodyPoint *obp;
BodySpring *bs;
- int c,b;
- float velcenter[3],dvel[3],def[3];
+ int c, b;
+ float velcenter[3], dvel[3], def[3];
float distance;
float compare;
float bstune = sb->ballstiff;
@@ -2233,42 +2236,42 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, Object *ob, flo
float f = bstune / (distance) + bstune / (compare * compare) * distance - 2.0f * bstune / compare;
mid_v3_v3v3(velcenter, bp->vec, obp->vec);
- sub_v3_v3v3(dvel,velcenter,bp->vec);
- mul_v3_fl(dvel,_final_mass(ob,bp));
+ sub_v3_v3v3(dvel, velcenter, bp->vec);
+ mul_v3_fl(dvel, _final_mass(ob, bp));
- Vec3PlusStVec(bp->force,f*(1.0f-sb->balldamp),def);
- Vec3PlusStVec(bp->force,sb->balldamp,dvel);
+ Vec3PlusStVec(bp->force, f*(1.0f-sb->balldamp), def);
+ Vec3PlusStVec(bp->force, sb->balldamp, dvel);
- /* exploit force(a,b) == -force(b,a) part2/2 */
- sub_v3_v3v3(dvel,velcenter,obp->vec);
- mul_v3_fl(dvel,_final_mass(ob,bp));
+ /* exploit force(a, b) == -force(b, a) part2/2 */
+ sub_v3_v3v3(dvel, velcenter, obp->vec);
+ mul_v3_fl(dvel, _final_mass(ob, bp));
- Vec3PlusStVec(obp->force,sb->balldamp,dvel);
- Vec3PlusStVec(obp->force,-f*(1.0f-sb->balldamp),def);
+ Vec3PlusStVec(obp->force, sb->balldamp, dvel);
+ Vec3PlusStVec(obp->force, -f*(1.0f-sb->balldamp), def);
}
}
}
}
/* naive ball self collision done */
- if (_final_goal(ob,bp) < SOFTGOALSNAP) { /* ommit this bp when it snaps */
+ if (_final_goal(ob, bp) < SOFTGOALSNAP) { /* ommit this bp when it snaps */
float auxvect[3];
float velgoal[3];
/* do goal stuff */
if (ob->softflag & OB_SB_GOAL) {
/* true elastic goal */
- float ks,kd;
- sub_v3_v3v3(auxvect,bp->pos,bp->origT);
+ float ks, kd;
+ sub_v3_v3v3(auxvect, bp->pos, bp->origT);
ks = 1.0f / (1.0f - _final_goal(ob, bp) * sb->goalspring) - 1.0f;
bp->force[0]+= -ks*(auxvect[0]);
bp->force[1]+= -ks*(auxvect[1]);
bp->force[2]+= -ks*(auxvect[2]);
/* calulate damping forces generated by goals*/
- sub_v3_v3v3(velgoal,bp->origS, bp->origE);
+ sub_v3_v3v3(velgoal, bp->origS, bp->origE);
kd = sb->goalfrict * sb_fric_force_scale(ob);
- add_v3_v3v3(auxvect,velgoal,bp->vec);
+ add_v3_v3v3(auxvect, velgoal, bp->vec);
if (forcetime > 0.0f) { /* make sure friction does not become rocket motor on time reversal */
bp->force[0]-= kd * (auxvect[0]);
@@ -2287,7 +2290,7 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, Object *ob, flo
if (sb && scene->physics_settings.flag & PHYS_GLOBAL_GRAVITY) {
float gravity[3];
copy_v3_v3(gravity, scene->physics_settings.gravity);
- mul_v3_fl(gravity, sb_grav_force_scale(ob)*_final_mass(ob,bp)*sb->effector_weights->global_gravity); /* individual mass of node here */
+ mul_v3_fl(gravity, sb_grav_force_scale(ob)*_final_mass(ob, bp)*sb->effector_weights->global_gravity); /* individual mass of node here */
add_v3_v3(bp->force, gravity);
}
@@ -2302,7 +2305,7 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, Object *ob, flo
pdDoEffectors(do_effector, NULL, sb->effector_weights, &epoint, force, speed);
/* apply forcefield*/
- mul_v3_fl(force,fieldfactor* eval_sb_fric_force_scale);
+ mul_v3_fl(force, fieldfactor* eval_sb_fric_force_scale);
add_v3_v3(bp->force, force);
/* BP friction in moving media */
@@ -2327,20 +2330,20 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, Object *ob, flo
bp->choke2 = 0.0f;
bp->loc_flag &= ~SBF_DOFUZZY;
if (do_deflector && !(bp->loc_flag & SBF_OUTOFCOLLISION) ) {
- float cfforce[3],defforce[3] ={0.0f,0.0f,0.0f}, vel[3] = {0.0f,0.0f,0.0f}, facenormal[3], cf = 1.0f,intrusion;
+ float cfforce[3], defforce[3] ={0.0f, 0.0f, 0.0f}, vel[3] = {0.0f, 0.0f, 0.0f}, facenormal[3], cf = 1.0f, intrusion;
float kd = 1.0f;
- if (sb_deflect_face(ob,bp->pos,facenormal,defforce,&cf,timenow,vel,&intrusion)) {
+ if (sb_deflect_face(ob, bp->pos, facenormal, defforce, &cf, timenow, vel, &intrusion)) {
if (intrusion < 0.0f) {
sb->scratch->flag |= SBF_DOFUZZY;
bp->loc_flag |= SBF_DOFUZZY;
bp->choke = sb->choke*0.01f;
}
- sub_v3_v3v3(cfforce,bp->vec,vel);
- Vec3PlusStVec(bp->force,-cf*50.0f,cfforce);
+ sub_v3_v3v3(cfforce, bp->vec, vel);
+ Vec3PlusStVec(bp->force, -cf*50.0f, cfforce);
- Vec3PlusStVec(bp->force,kd,defforce);
+ Vec3PlusStVec(bp->force, kd, defforce);
}
}
@@ -2360,8 +2363,8 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, Object *ob, flo
bp->choke = bs->cf;
}
- // sb_spring_force(Object *ob,int bpi,BodySpring *bs,float iks,float forcetime,int nl_flags)
- sb_spring_force(ob,ilast-bb,bs,iks,forcetime,0);
+ // sb_spring_force(Object *ob, int bpi, BodySpring *bs, float iks, float forcetime, int nl_flags)
+ sb_spring_force(ob, ilast-bb, bs, iks, forcetime, 0);
}/* loop springs */
}/* existing spring list */
}/*any edges*/
@@ -2374,15 +2377,15 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, Object *ob, flo
static void *exec_softbody_calc_forces(void *data)
{
SB_thread_context *pctx = (SB_thread_context*)data;
- _softbody_calc_forces_slice_in_a_thread(pctx->scene, pctx->ob, pctx->forcetime, pctx->timenow, pctx->ifirst, pctx->ilast, NULL, pctx->do_effector,pctx->do_deflector,pctx->fieldfactor,pctx->windfactor);
+ _softbody_calc_forces_slice_in_a_thread(pctx->scene, pctx->ob, pctx->forcetime, pctx->timenow, pctx->ifirst, pctx->ilast, NULL, pctx->do_effector, pctx->do_deflector, pctx->fieldfactor, pctx->windfactor);
return NULL;
}
-static void sb_cf_threads_run(Scene *scene, Object *ob, float forcetime, float timenow,int totpoint,int *UNUSED(ptr_to_break_func(void)),struct ListBase *do_effector,int do_deflector,float fieldfactor, float windfactor)
+static void sb_cf_threads_run(Scene *scene, Object *ob, float forcetime, float timenow, int totpoint, int *UNUSED(ptr_to_break_func(void)), struct ListBase *do_effector, int do_deflector, float fieldfactor, float windfactor)
{
ListBase threads;
SB_thread_context *sb_threads;
- int i, totthread,left,dec;
+ int i, totthread, left, dec;
int lowpoints =100; /* wild guess .. may increase with better thread management 'above' or even be UI option sb->spawn_cf_threads_nopts */
/* figure the number of threads while preventing pretty pointless threading overhead */
@@ -2395,7 +2398,7 @@ static void sb_cf_threads_run(Scene *scene, Object *ob, float forcetime, float t
totthread--;
}
- /* printf("sb_cf_threads_run spawning %d threads\n",totthread); */
+ /* printf("sb_cf_threads_run spawning %d threads\n", totthread); */
sb_threads= MEM_callocN(sizeof(SB_thread_context)*totthread, "SBThread");
memset(sb_threads, 0, sizeof(SB_thread_context)*totthread);
@@ -2447,7 +2450,7 @@ static void softbody_calc_forcesEx(Scene *scene, Object *ob, float forcetime, fl
/* float gravity; */ /* UNUSED */
/* float iks; */
float fieldfactor = -1.0f, windfactor = 0.25;
- int do_deflector /*,do_selfcollision*/ ,do_springcollision,do_aero;
+ int do_deflector /*, do_selfcollision*/, do_springcollision, do_aero;
/* gravity = sb->grav * sb_grav_force_scale(ob); */ /* UNUSED */
@@ -2461,20 +2464,20 @@ static void softbody_calc_forcesEx(Scene *scene, Object *ob, float forcetime, fl
/* bproot= sb->bpoint; */ /* need this for proper spring addressing */ /* UNUSED */
if (do_springcollision || do_aero)
- sb_sfesf_threads_run(scene, ob, timenow,sb->totspring,NULL);
+ sb_sfesf_threads_run(scene, ob, timenow, sb->totspring, NULL);
/* after spring scan because it uses Effoctors too */
do_effector= pdInitEffectors(scene, ob, NULL, sb->effector_weights);
if (do_deflector) {
float defforce[3];
- do_deflector = sb_detect_aabb_collisionCached(defforce,ob->lay,ob,timenow);
+ do_deflector = sb_detect_aabb_collisionCached(defforce, ob->lay, ob, timenow);
}
sb_cf_threads_run(scene, ob, forcetime, timenow, sb->totpoint, NULL, do_effector, do_deflector, fieldfactor, windfactor);
/* finally add forces caused by face collision */
- if (ob->softflag & OB_SB_FACECOLL) scan_for_ext_face_forces(ob,timenow);
+ if (ob->softflag & OB_SB_FACECOLL) scan_for_ext_face_forces(ob, timenow);
/* finish matrix and solve */
pdEndEffectors(&do_effector);
@@ -2507,10 +2510,10 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
/* BodyPoint *bproot; */ /* UNUSED */
BodySpring *bs;
ListBase *do_effector = NULL;
- float iks, ks, kd, gravity[3] = {0.0f,0.0f,0.0f};
+ float iks, ks, kd, gravity[3] = {0.0f, 0.0f, 0.0f};
float fieldfactor = -1.0f, windfactor = 0.25f;
float tune = sb->ballstiff;
- int a, b, do_deflector,do_selfcollision,do_springcollision,do_aero;
+ int a, b, do_deflector, do_selfcollision, do_springcollision, do_aero;
/* jacobian
@@ -2543,7 +2546,7 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
if (do_deflector) {
float defforce[3];
- do_deflector = sb_detect_aabb_collisionCached(defforce,ob->lay,ob,timenow);
+ do_deflector = sb_detect_aabb_collisionCached(defforce, ob->lay, ob, timenow);
}
for (a=sb->totpoint, bp= sb->bpoint; a>0; a--, bp++) {
@@ -2554,17 +2557,17 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
//int op =3*sb->totpoint;
/* dF/dV = v */
/* jacobioan
- nlMatrixAdd(op+ia,ia,-forcetime);
- nlMatrixAdd(op+ia+1,ia+1,-forcetime);
- nlMatrixAdd(op+ia+2,ia+2,-forcetime);
+ nlMatrixAdd(op+ia, ia, -forcetime);
+ nlMatrixAdd(op+ia+1, ia+1, -forcetime);
+ nlMatrixAdd(op+ia+2, ia+2, -forcetime);
- nlMatrixAdd(ia,ia,1);
- nlMatrixAdd(ia+1,ia+1,1);
- nlMatrixAdd(ia+2,ia+2,1);
+ nlMatrixAdd(ia, ia, 1);
+ nlMatrixAdd(ia+1, ia+1, 1);
+ nlMatrixAdd(ia+2, ia+2, 1);
- nlMatrixAdd(op+ia,op+ia,1);
- nlMatrixAdd(op+ia+1,op+ia+1,1);
- nlMatrixAdd(op+ia+2,op+ia+2,1);
+ nlMatrixAdd(op+ia, op+ia, 1);
+ nlMatrixAdd(op+ia+1, op+ia+1, 1);
+ nlMatrixAdd(op+ia+2, op+ia+2, 1);
*/
@@ -2575,8 +2578,8 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
if (do_selfcollision) {
int attached;
BodyPoint *obp;
- int c,b;
- float velcenter[3],dvel[3],def[3];
+ int c, b;
+ float velcenter[3], dvel[3], def[3];
float distance;
float compare;
@@ -2605,11 +2608,11 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
float f = tune / (distance) + tune / (compare * compare) * distance - 2.0f * tune/compare;
mid_v3_v3v3(velcenter, bp->vec, obp->vec);
- sub_v3_v3v3(dvel,velcenter,bp->vec);
- mul_v3_fl(dvel,_final_mass(ob,bp));
+ sub_v3_v3v3(dvel, velcenter, bp->vec);
+ mul_v3_fl(dvel, _final_mass(ob, bp));
- Vec3PlusStVec(bp->force,f*(1.0f-sb->balldamp),def);
- Vec3PlusStVec(bp->force,sb->balldamp,dvel);
+ Vec3PlusStVec(bp->force, f*(1.0f-sb->balldamp), def);
+ Vec3PlusStVec(bp->force, sb->balldamp, dvel);
if (nl_flags & NLF_BUILD) {
//int ia =3*(sb->totpoint-a);
@@ -2618,11 +2621,11 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
//float mvel = forcetime*sb->nodemass*sb->balldamp;
//float mpos = forcetime*tune*(1.0f-sb->balldamp);
/*some quick and dirty entries to the jacobian*/
- //dfdx_goal(ia,ia,op,mpos);
- //dfdv_goal(ia,ia,mvel);
- /* exploit force(a,b) == -force(b,a) part1/2 */
- //dfdx_goal(ic,ic,op,mpos);
- //dfdv_goal(ic,ic,mvel);
+ //dfdx_goal(ia, ia, op, mpos);
+ //dfdv_goal(ia, ia, mvel);
+ /* exploit force(a, b) == -force(b, a) part1/2 */
+ //dfdx_goal(ic, ic, op, mpos);
+ //dfdv_goal(ic, ic, mvel);
/*TODO sit down an X-out the true jacobian entries*/
@@ -2635,12 +2638,12 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
*/
}
- /* exploit force(a,b) == -force(b,a) part2/2 */
- sub_v3_v3v3(dvel,velcenter,obp->vec);
- mul_v3_fl(dvel,(_final_mass(ob,bp)+_final_mass(ob,obp))/2.0f);
+ /* exploit force(a, b) == -force(b, a) part2/2 */
+ sub_v3_v3v3(dvel, velcenter, obp->vec);
+ mul_v3_fl(dvel, (_final_mass(ob, bp)+_final_mass(ob, obp))/2.0f);
- Vec3PlusStVec(obp->force,sb->balldamp,dvel);
- Vec3PlusStVec(obp->force,-f*(1.0f-sb->balldamp),def);
+ Vec3PlusStVec(obp->force, sb->balldamp, dvel);
+ Vec3PlusStVec(obp->force, -f*(1.0f-sb->balldamp), def);
}
@@ -2649,14 +2652,14 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
}
/* naive ball self collision done */
- if (_final_goal(ob,bp) < SOFTGOALSNAP) { /* ommit this bp when it snaps */
+ if (_final_goal(ob, bp) < SOFTGOALSNAP) { /* ommit this bp when it snaps */
float auxvect[3];
float velgoal[3];
/* do goal stuff */
if (ob->softflag & OB_SB_GOAL) {
/* true elastic goal */
- sub_v3_v3v3(auxvect,bp->pos,bp->origT);
+ sub_v3_v3v3(auxvect, bp->pos, bp->origT);
ks = 1.0f / (1.0f- _final_goal(ob, bp) * sb->goalspring) - 1.0f;
bp->force[0]+= -ks*(auxvect[0]);
bp->force[1]+= -ks*(auxvect[1]);
@@ -2666,14 +2669,14 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
//int ia =3*(sb->totpoint-a);
//int op =3*(sb->totpoint);
/* depending on my pos */
- //dfdx_goal(ia,ia,op,ks*forcetime);
+ //dfdx_goal(ia, ia, op, ks*forcetime);
}
/* calulate damping forces generated by goals*/
- sub_v3_v3v3(velgoal,bp->origS, bp->origE);
+ sub_v3_v3v3(velgoal, bp->origS, bp->origE);
kd = sb->goalfrict * sb_fric_force_scale(ob);
- add_v3_v3v3(auxvect,velgoal,bp->vec);
+ add_v3_v3v3(auxvect, velgoal, bp->vec);
if (forcetime > 0.0f) { /* make sure friction does not become rocket motor on time reversal */
bp->force[0]-= kd * (auxvect[0]);
@@ -2683,7 +2686,7 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
//int ia =3*(sb->totpoint-a);
normalize_v3(auxvect);
/* depending on my vel */
- //dfdv_goal(ia,ia,kd*forcetime);
+ //dfdv_goal(ia, ia, kd*forcetime);
}
}
@@ -2697,7 +2700,7 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
/* gravitation */
- madd_v3_v3fl(bp->force, gravity, _final_mass(ob,bp)); /* individual mass of node here */
+ madd_v3_v3fl(bp->force, gravity, _final_mass(ob, bp)); /* individual mass of node here */
/* particle field & vortex */
@@ -2710,7 +2713,7 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
pdDoEffectors(do_effector, NULL, sb->effector_weights, &epoint, force, speed);
/* apply forcefield*/
- mul_v3_fl(force,fieldfactor* eval_sb_fric_force_scale);
+ mul_v3_fl(force, fieldfactor* eval_sb_fric_force_scale);
add_v3_v3(bp->force, force);
/* BP friction in moving media */
@@ -2733,9 +2736,9 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
//int ia =3*(sb->totpoint-a);
/* da/dv = */
- // nlMatrixAdd(ia,ia,forcetime*kd);
- // nlMatrixAdd(ia+1,ia+1,forcetime*kd);
- // nlMatrixAdd(ia+2,ia+2,forcetime*kd);
+ // nlMatrixAdd(ia, ia, forcetime*kd);
+ // nlMatrixAdd(ia+1, ia+1, forcetime*kd);
+ // nlMatrixAdd(ia+2, ia+2, forcetime*kd);
}
}
@@ -2744,10 +2747,10 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
bp->choke2 = 0.0f;
bp->loc_flag &= ~SBF_DOFUZZY;
if (do_deflector) {
- float cfforce[3],defforce[3] ={0.0f,0.0f,0.0f}, vel[3] = {0.0f,0.0f,0.0f}, facenormal[3], cf = 1.0f,intrusion;
+ float cfforce[3], defforce[3] ={0.0f, 0.0f, 0.0f}, vel[3] = {0.0f, 0.0f, 0.0f}, facenormal[3], cf = 1.0f, intrusion;
kd = 1.0f;
- if (sb_deflect_face(ob,bp->pos,facenormal,defforce,&cf,timenow,vel,&intrusion)) {
+ if (sb_deflect_face(ob, bp->pos, facenormal, defforce, &cf, timenow, vel, &intrusion)) {
if ((!nl_flags)&&(intrusion < 0.0f)) {
if (G.rt & 0x01) { // 17 we did check for bit 0x10 before
/*fixing bug [17428] this forces adaptive step size to tiny steps
@@ -2760,12 +2763,12 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
in heun step No1 and leave the heun step No2 adapt to it
so we kind of introduced a implicit solver for this case
*/
- Vec3PlusStVec(bp->pos,-intrusion,facenormal);
+ Vec3PlusStVec(bp->pos, -intrusion, facenormal);
}
else {
- sub_v3_v3v3(cfforce,bp->vec,vel);
- Vec3PlusStVec(bp->force,-cf*50.0f,cfforce);
+ sub_v3_v3v3(cfforce, bp->vec, vel);
+ Vec3PlusStVec(bp->force, -cf*50.0f, cfforce);
}
@@ -2774,15 +2777,15 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
bp->choke = sb->choke*0.01f;
}
else {
- sub_v3_v3v3(cfforce,bp->vec,vel);
- Vec3PlusStVec(bp->force,-cf*50.0f,cfforce);
+ sub_v3_v3v3(cfforce, bp->vec, vel);
+ Vec3PlusStVec(bp->force, -cf*50.0f, cfforce);
}
- Vec3PlusStVec(bp->force,kd,defforce);
+ Vec3PlusStVec(bp->force, kd, defforce);
if (nl_flags & NLF_BUILD) {
// int ia =3*(sb->totpoint-a);
// int op =3*sb->totpoint;
- //dfdx_goal(ia,ia,op,mpos); // don't do unless you know
- //dfdv_goal(ia,ia,-cf);
+ //dfdx_goal(ia, ia, op, mpos); // don't do unless you know
+ //dfdv_goal(ia, ia, -cf);
}
@@ -2802,9 +2805,9 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
bp->choke = bs->cf;
}
- // sb_spring_force(Object *ob,int bpi,BodySpring *bs,float iks,float forcetime,int nl_flags)
+ // sb_spring_force(Object *ob, int bpi, BodySpring *bs, float iks, float forcetime, int nl_flags)
// rather remove nl_falgs from code .. will make things a lot cleaner
- sb_spring_force(ob,sb->totpoint-a,bs,iks,forcetime,0);
+ sb_spring_force(ob, sb->totpoint-a, bs, iks, forcetime, 0);
}/* loop springs */
}/* existing spring list */
}/*any edges*/
@@ -2814,12 +2817,12 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
/* finally add forces caused by face collision */
- if (ob->softflag & OB_SB_FACECOLL) scan_for_ext_face_forces(ob,timenow);
+ if (ob->softflag & OB_SB_FACECOLL) scan_for_ext_face_forces(ob, timenow);
/* finish matrix and solve */
#if (0) // remove onl linking for now .. still i am not sure .. the jacobian can be useful .. so keep that BM
if (nl_flags & NLF_SOLVE) {
- //double sct,sst=PIL_check_seconds_timer();
+ //double sct, sst=PIL_check_seconds_timer();
for (a=sb->totpoint, bp= sb->bpoint; a>0; a--, bp++) {
int iv =3*(sb->totpoint-a);
int ip =3*(2*sb->totpoint-a);
@@ -2830,8 +2833,7 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
nlEnd(NL_MATRIX);
nlEnd(NL_SYSTEM);
- if ((G.rt == 32) && (nl_flags & NLF_BUILD))
- {
+ if ((G.rt == 32) && (nl_flags & NLF_BUILD)) {
printf("####MEE#####\n");
nlPrintMatrix();
}
@@ -2845,30 +2847,30 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
/* for debug purpose .. anyhow cropping B vector looks like working */
if (G.rt ==32)
for (a=2*sb->totpoint, bp= sb->bpoint; a>0; a--, bp++) {
- f=nlGetVariable(0,index);
- printf("(%f ",f);index++;
- f=nlGetVariable(0,index);
- printf("%f ",f);index++;
- f=nlGetVariable(0,index);
- printf("%f)",f);index++;
+ f=nlGetVariable(0, index);
+ printf("(%f ", f);index++;
+ f=nlGetVariable(0, index);
+ printf("%f ", f);index++;
+ f=nlGetVariable(0, index);
+ printf("%f)", f);index++;
}
index =0;
for (a=sb->totpoint, bp= sb->bpoint; a>0; a--, bp++) {
- f=nlGetVariable(0,index);
+ f=nlGetVariable(0, index);
bp->impdv[0] = f; index++;
- f=nlGetVariable(0,index);
+ f=nlGetVariable(0, index);
bp->impdv[1] = f; index++;
- f=nlGetVariable(0,index);
+ f=nlGetVariable(0, index);
bp->impdv[2] = f; index++;
}
/*
for (a=sb->totpoint, bp= sb->bpoint; a>0; a--, bp++) {
- f=nlGetVariable(0,index);
+ f=nlGetVariable(0, index);
bp->impdx[0] = f; index++;
- f=nlGetVariable(0,index);
+ f=nlGetVariable(0, index);
bp->impdx[1] = f; index++;
- f=nlGetVariable(0,index);
+ f=nlGetVariable(0, index);
bp->impdx[2] = f; index++;
}
*/
@@ -2876,13 +2878,13 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
else {
printf("Matrix inversion failed\n");
for (a=sb->totpoint, bp= sb->bpoint; a>0; a--, bp++) {
- copy_v3_v3(bp->impdv,bp->force);
+ copy_v3_v3(bp->impdv, bp->force);
}
}
//sct=PIL_check_seconds_timer();
- //if (sct-sst > 0.01f) printf(" implicit solver time %f %s \r",sct-sst,ob->id.name);
+ //if (sct-sst > 0.01f) printf(" implicit solver time %f %s \r", sct-sst, ob->id.name);
}
/* cleanup */
#endif
@@ -2894,13 +2896,13 @@ static void softbody_apply_forces(Object *ob, float forcetime, int mode, float *
{
/* time evolution */
/* actually does an explicit euler step mode == 0 */
- /* or heun ~ 2nd order runge-kutta steps, mode 1,2 */
+ /* or heun ~ 2nd order runge-kutta steps, mode 1, 2 */
SoftBody *sb= ob->soft; /* is supposed to be there */
BodyPoint *bp;
- float dx[3]={0},dv[3],aabbmin[3],aabbmax[3],cm[3]={0.0f,0.0f,0.0f};
- float timeovermass/*,freezeloc=0.00001f,freezeforce=0.00000000001f*/;
- float maxerrpos= 0.0f,maxerrvel = 0.0f;
- int a,fuzzy=0;
+ float dx[3]={0}, dv[3], aabbmin[3], aabbmax[3], cm[3]={0.0f, 0.0f, 0.0f};
+ float timeovermass/*, freezeloc=0.00001f, freezeforce=0.00000000001f*/;
+ float maxerrpos= 0.0f, maxerrvel = 0.0f;
+ int a, fuzzy=0;
forcetime *= sb_time_scale(ob);
@@ -2917,21 +2919,21 @@ static void softbody_apply_forces(Object *ob, float forcetime, int mode, float *
for (a=sb->totpoint, bp= sb->bpoint; a>0; a--, bp++) {
/* now we have individual masses */
/* claim a minimum mass for vertex */
- if (_final_mass(ob,bp) > 0.009999f) timeovermass = forcetime/_final_mass(ob,bp);
+ if (_final_mass(ob, bp) > 0.009999f) timeovermass = forcetime/_final_mass(ob, bp);
else timeovermass = forcetime/0.009999f;
- if (_final_goal(ob,bp) < SOFTGOALSNAP) {
+ if (_final_goal(ob, bp) < SOFTGOALSNAP) {
/* this makes t~ = t */
- if (mid_flags & MID_PRESERVE) copy_v3_v3(dx,bp->vec);
+ if (mid_flags & MID_PRESERVE) copy_v3_v3(dx, bp->vec);
/* so here is (v)' = a(cceleration) = sum(F_springs)/m + gravitation + some friction forces + more forces*/
/* the ( ... )' operator denotes derivate respective time */
/* the euler step for velocity then becomes */
/* v(t + dt) = v(t) + a(t) * dt */
- mul_v3_fl(bp->force,timeovermass);/* individual mass of node here */
+ mul_v3_fl(bp->force, timeovermass);/* individual mass of node here */
/* some nasty if's to have heun in here too */
- copy_v3_v3(dv,bp->force);
+ copy_v3_v3(dv, bp->force);
if (mode == 1) {
copy_v3_v3(bp->prevvec, bp->vec);
@@ -2944,80 +2946,80 @@ static void softbody_apply_forces(Object *ob, float forcetime, int mode, float *
bp->vec[1] = bp->prevvec[1] + 0.5f * (dv[1] + bp->prevdv[1]);
bp->vec[2] = bp->prevvec[2] + 0.5f * (dv[2] + bp->prevdv[2]);
/* compare euler to heun to estimate error for step sizing */
- maxerrvel = MAX2(maxerrvel,ABS(dv[0] - bp->prevdv[0]));
- maxerrvel = MAX2(maxerrvel,ABS(dv[1] - bp->prevdv[1]));
- maxerrvel = MAX2(maxerrvel,ABS(dv[2] - bp->prevdv[2]));
+ maxerrvel = MAX2(maxerrvel, ABS(dv[0] - bp->prevdv[0]));
+ maxerrvel = MAX2(maxerrvel, ABS(dv[1] - bp->prevdv[1]));
+ maxerrvel = MAX2(maxerrvel, ABS(dv[2] - bp->prevdv[2]));
}
else { add_v3_v3(bp->vec, bp->force); }
/* this makes t~ = t+dt */
- if (!(mid_flags & MID_PRESERVE)) copy_v3_v3(dx,bp->vec);
+ if (!(mid_flags & MID_PRESERVE)) copy_v3_v3(dx, bp->vec);
/* so here is (x)'= v(elocity) */
/* the euler step for location then becomes */
/* x(t + dt) = x(t) + v(t~) * dt */
- mul_v3_fl(dx,forcetime);
+ mul_v3_fl(dx, forcetime);
/* the freezer coming sooner or later */
/*
- if ((dot_v3v3(dx,dx)<freezeloc )&&(dot_v3v3(bp->force,bp->force)<freezeforce )) {
+ if ((dot_v3v3(dx, dx)<freezeloc )&&(dot_v3v3(bp->force, bp->force)<freezeforce )) {
bp->frozen /=2;
}
else {
- bp->frozen = MIN2(bp->frozen*1.05f,1.0f);
+ bp->frozen = MIN2(bp->frozen*1.05f, 1.0f);
}
- mul_v3_fl(dx,bp->frozen);
+ mul_v3_fl(dx, bp->frozen);
*/
/* again some nasty if's to have heun in here too */
if (mode ==1) {
- copy_v3_v3(bp->prevpos,bp->pos);
- copy_v3_v3(bp->prevdx ,dx);
+ copy_v3_v3(bp->prevpos, bp->pos);
+ copy_v3_v3(bp->prevdx, dx);
}
if (mode ==2) {
bp->pos[0] = bp->prevpos[0] + 0.5f * ( dx[0] + bp->prevdx[0]);
bp->pos[1] = bp->prevpos[1] + 0.5f * ( dx[1] + bp->prevdx[1]);
bp->pos[2] = bp->prevpos[2] + 0.5f * ( dx[2] + bp->prevdx[2]);
- maxerrpos = MAX2(maxerrpos,ABS(dx[0] - bp->prevdx[0]));
- maxerrpos = MAX2(maxerrpos,ABS(dx[1] - bp->prevdx[1]));
- maxerrpos = MAX2(maxerrpos,ABS(dx[2] - bp->prevdx[2]));
-
-/* bp->choke is set when we need to pull a vertex or edge out of the collider.
- the collider object signals to get out by pushing hard. on the other hand
- we don't want to end up in deep space so we add some <viscosity>
- to balance that out */
+ maxerrpos = MAX2(maxerrpos, ABS(dx[0] - bp->prevdx[0]));
+ maxerrpos = MAX2(maxerrpos, ABS(dx[1] - bp->prevdx[1]));
+ maxerrpos = MAX2(maxerrpos, ABS(dx[2] - bp->prevdx[2]));
+
+ /* bp->choke is set when we need to pull a vertex or edge out of the collider.
+ * the collider object signals to get out by pushing hard. on the other hand
+ * we don't want to end up in deep space so we add some <viscosity>
+ * to balance that out */
if (bp->choke2 > 0.0f) {
- mul_v3_fl(bp->vec,(1.0f - bp->choke2));
+ mul_v3_fl(bp->vec, (1.0f - bp->choke2));
}
if (bp->choke > 0.0f) {
- mul_v3_fl(bp->vec,(1.0f - bp->choke));
+ mul_v3_fl(bp->vec, (1.0f - bp->choke));
}
}
else { add_v3_v3(bp->pos, dx);}
}/*snap*/
/* so while we are looping BPs anyway do statistics on the fly */
- aabbmin[0] = MIN2(aabbmin[0],bp->pos[0]);
- aabbmin[1] = MIN2(aabbmin[1],bp->pos[1]);
- aabbmin[2] = MIN2(aabbmin[2],bp->pos[2]);
- aabbmax[0] = MAX2(aabbmax[0],bp->pos[0]);
- aabbmax[1] = MAX2(aabbmax[1],bp->pos[1]);
- aabbmax[2] = MAX2(aabbmax[2],bp->pos[2]);
+ aabbmin[0] = MIN2(aabbmin[0], bp->pos[0]);
+ aabbmin[1] = MIN2(aabbmin[1], bp->pos[1]);
+ aabbmin[2] = MIN2(aabbmin[2], bp->pos[2]);
+ aabbmax[0] = MAX2(aabbmax[0], bp->pos[0]);
+ aabbmax[1] = MAX2(aabbmax[1], bp->pos[1]);
+ aabbmax[2] = MAX2(aabbmax[2], bp->pos[2]);
if (bp->loc_flag & SBF_DOFUZZY) fuzzy =1;
} /*for*/
- if (sb->totpoint) mul_v3_fl(cm,1.0f/sb->totpoint);
+ if (sb->totpoint) mul_v3_fl(cm, 1.0f/sb->totpoint);
if (sb->scratch) {
- copy_v3_v3(sb->scratch->aabbmin,aabbmin);
- copy_v3_v3(sb->scratch->aabbmax,aabbmax);
+ copy_v3_v3(sb->scratch->aabbmin, aabbmin);
+ copy_v3_v3(sb->scratch->aabbmax, aabbmax);
}
if (err) { /* so step size will be controlled by biggest difference in slope */
if (sb->solverflags & SBSO_OLDERR)
- *err = MAX2(maxerrpos,maxerrvel);
+ *err = MAX2(maxerrpos, maxerrvel);
else
*err = maxerrpos;
- //printf("EP %f EV %f\n",maxerrpos,maxerrvel);
+ //printf("EP %f EV %f\n", maxerrpos, maxerrvel);
if (fuzzy) {
*err /= sb->fuzzyness;
}
@@ -3045,19 +3047,19 @@ static void softbody_store_step(Object *ob)
int a;
for (a=sb->totpoint, bp= sb->bpoint; a>0; a--, bp++) {
- copy_v3_v3(bp->prevvec,bp->vec);
- copy_v3_v3(bp->prevpos,bp->pos);
+ copy_v3_v3(bp->prevvec, bp->vec);
+ copy_v3_v3(bp->prevpos, bp->pos);
}
}
/* used by predictors and correctors */
-static void softbody_store_state(Object *ob,float *ppos,float *pvel)
+static void softbody_store_state(Object *ob, float *ppos, float *pvel)
{
SoftBody *sb= ob->soft; /* is supposed to be there*/
BodyPoint *bp;
int a;
- float *pp=ppos,*pv=pvel;
+ float *pp=ppos, *pv=pvel;
for (a=sb->totpoint, bp= sb->bpoint; a>0; a--, bp++) {
@@ -3070,42 +3072,42 @@ static void softbody_store_state(Object *ob,float *ppos,float *pvel)
}
/* used by predictors and correctors */
-static void softbody_retrieve_state(Object *ob,float *ppos,float *pvel)
+static void softbody_retrieve_state(Object *ob, float *ppos, float *pvel)
{
SoftBody *sb= ob->soft; /* is supposed to be there*/
BodyPoint *bp;
int a;
- float *pp=ppos,*pv=pvel;
+ float *pp=ppos, *pv=pvel;
for (a=sb->totpoint, bp= sb->bpoint; a>0; a--, bp++) {
- copy_v3_v3(bp->vec,pv);
+ copy_v3_v3(bp->vec, pv);
pv+=3;
- copy_v3_v3(bp->pos,pp);
+ copy_v3_v3(bp->pos, pp);
pp+=3;
}
}
/* used by predictors and correctors */
-static void softbody_swap_state(Object *ob,float *ppos,float *pvel)
+static void softbody_swap_state(Object *ob, float *ppos, float *pvel)
{
SoftBody *sb= ob->soft; /* is supposed to be there*/
BodyPoint *bp;
int a;
- float *pp=ppos,*pv=pvel;
+ float *pp=ppos, *pv=pvel;
float temp[3];
for (a=sb->totpoint, bp= sb->bpoint; a>0; a--, bp++) {
copy_v3_v3(temp, bp->vec);
- copy_v3_v3(bp->vec,pv);
- copy_v3_v3(pv,temp);
+ copy_v3_v3(bp->vec, pv);
+ copy_v3_v3(pv, temp);
pv+=3;
copy_v3_v3(temp, bp->pos);
- copy_v3_v3(bp->pos,pp);
- copy_v3_v3(pp,temp);
+ copy_v3_v3(bp->pos, pp);
+ copy_v3_v3(pp, temp);
pp+=3;
}
}
@@ -3125,9 +3127,9 @@ static void softbody_apply_goalsnap(Object *ob)
int a;
for (a=sb->totpoint, bp= sb->bpoint; a>0; a--, bp++) {
- if (_final_goal(ob,bp) >= SOFTGOALSNAP) {
- copy_v3_v3(bp->prevpos,bp->pos);
- copy_v3_v3(bp->pos,bp->origT);
+ if (_final_goal(ob, bp) >= SOFTGOALSNAP) {
+ copy_v3_v3(bp->prevpos, bp->pos);
+ copy_v3_v3(bp->pos, bp->origT);
}
}
}
@@ -3139,7 +3141,7 @@ static void apply_spring_memory(Object *ob)
BodySpring *bs;
BodyPoint *bp1, *bp2;
int a;
- float b,l,r;
+ float b, l, r;
if (sb && sb->totspring) {
b = sb->plastic;
@@ -3147,7 +3149,7 @@ static void apply_spring_memory(Object *ob)
bs = &sb->bspring[a];
bp1 =&sb->bpoint[bs->v1];
bp2 =&sb->bpoint[bs->v2];
- l = len_v3v3(bp1->pos,bp2->pos);
+ l = len_v3v3(bp1->pos, bp2->pos);
r = bs->len/l;
if (( r > 1.05f) || (r < 0.95f)) {
bs->len = ((100.0f - b) * bs->len + b*l)/100.0f;
@@ -3170,7 +3172,7 @@ static void interpolate_exciter(Object *ob, int timescale, int time)
bp->origT[0] = bp->origS[0] + f*(bp->origE[0] - bp->origS[0]);
bp->origT[1] = bp->origS[1] + f*(bp->origE[1] - bp->origS[1]);
bp->origT[2] = bp->origS[2] + f*(bp->origE[2] - bp->origS[2]);
- if (_final_goal(ob,bp) >= SOFTGOALSNAP) {
+ if (_final_goal(ob, bp) >= SOFTGOALSNAP) {
bp->vec[0] = bp->origE[0] - bp->origS[0];
bp->vec[1] = bp->origE[1] - bp->origS[1];
bp->vec[2] = bp->origE[2] - bp->origS[2];
@@ -3229,8 +3231,7 @@ static void springs_from_mesh(Object *ob)
float scale =1.0f;
sb= ob->soft;
- if (me && sb)
- {
+ if (me && sb) {
/* using bp->origS as a container for spring calcualtions here
** will be overwritten sbObjectStep() to receive
** actual modifier stack positions
@@ -3267,6 +3268,9 @@ static void mesh_to_softbody(Scene *scene, Object *ob)
BodyPoint *bp;
BodySpring *bs;
int a, totedge;
+
+ BKE_mesh_tessface_ensure(me);
+
if (ob->softflag & OB_SB_EDGES) totedge= me->totedge;
else totedge= 0;
@@ -3287,7 +3291,7 @@ static void mesh_to_softbody(Scene *scene, Object *ob)
if ((ob->softflag & OB_SB_GOAL) && sb->vertgroup) { /* even this is a deprecated evil hack */
/* I'd like to have it .. if (sb->namedVG_Goal[0]) */
- get_scalar_from_vertexgroup(ob, a,(short) (sb->vertgroup-1), &bp->goal);
+ get_scalar_from_vertexgroup(ob, a, (short) (sb->vertgroup-1), &bp->goal);
/* do this always, regardless successfull read from vertex group */
/* this is where '2.5 every thing is animatable' goes wrong in the first place jow_go_for2_5 */
/* 1st coding action to take : move this to frame level */
@@ -3305,27 +3309,25 @@ static void mesh_to_softbody(Scene *scene, Object *ob)
this enables per vertex *mass painting*
*/
- if (sb->namedVG_Mass[0])
- {
- int grp= defgroup_name_index (ob,sb->namedVG_Mass);
- /* printf("VGN %s %d\n",sb->namedVG_Mass,grp); */
+ if (sb->namedVG_Mass[0]) {
+ int grp= defgroup_name_index (ob, sb->namedVG_Mass);
+ /* printf("VGN %s %d\n", sb->namedVG_Mass, grp); */
if (grp > -1) {
- get_scalar_from_vertexgroup(ob, a,(short) (grp), &bp->mass);
+ get_scalar_from_vertexgroup(ob, a, (short) (grp), &bp->mass);
/* 2.5 bp->mass = bp->mass * sb->nodemass; */
- /* printf("bp->mass %f\n",bp->mass); */
+ /* printf("bp->mass %f\n", bp->mass); */
}
}
/* first set the default */
bp->springweight = 1.0f;
- if (sb->namedVG_Spring_K[0])
- {
- int grp= defgroup_name_index (ob,sb->namedVG_Spring_K);
- //printf("VGN %s %d\n",sb->namedVG_Spring_K,grp);
+ if (sb->namedVG_Spring_K[0]) {
+ int grp= defgroup_name_index (ob, sb->namedVG_Spring_K);
+ //printf("VGN %s %d\n", sb->namedVG_Spring_K, grp);
if (grp > -1) {
- get_scalar_from_vertexgroup(ob, a,(short) (grp), &bp->springweight);
- //printf("bp->springweight %f\n",bp->springweight);
+ get_scalar_from_vertexgroup(ob, a, (short) (grp), &bp->springweight);
+ //printf("bp->springweight %f\n", bp->springweight);
}
}
@@ -3352,7 +3354,7 @@ static void mesh_to_softbody(Scene *scene, Object *ob)
build_bps_springlist(ob); /* scan for springs attached to bodypoints ONCE */
/* insert *other second order* springs if desired */
if (sb->secondspring > 0.0000001f) {
- add_2nd_order_springs(ob,sb->secondspring); /* exploits the the first run of build_bps_springlist(ob);*/
+ add_2nd_order_springs(ob, sb->secondspring); /* exploits the the first run of build_bps_springlist(ob);*/
build_bps_springlist(ob); /* yes we need to do it again*/
}
springs_from_mesh(ob); /* write the 'rest'-length of the springs */
@@ -3373,8 +3375,8 @@ static void mesh_faces_to_scratch(Object *ob)
int a;
/* alloc and copy faces*/
- bodyface = sb->scratch->bodyface = MEM_mallocN(sizeof(BodyFace)*me->totface,"SB_body_Faces");
- //memcpy(sb->scratch->mface,me->mface,sizeof(MFace)*me->totface);
+ bodyface = sb->scratch->bodyface = MEM_mallocN(sizeof(BodyFace)*me->totface, "SB_body_Faces");
+ //memcpy(sb->scratch->mface, me->mface, sizeof(MFace)*me->totface);
mface = me->mface;
for (a=0; a<me->totface; a++, mface++, bodyface++) {
bodyface->v1 = mface->v1;
@@ -3391,20 +3393,20 @@ static void reference_to_scratch(Object *ob)
SoftBody *sb= ob->soft;
ReferenceVert *rp;
BodyPoint *bp;
- float accu_pos[3] ={0.f,0.f,0.f};
+ float accu_pos[3] ={0.f, 0.f, 0.f};
float accu_mass = 0.f;
int a;
- sb->scratch->Ref.ivert = MEM_mallocN(sizeof(ReferenceVert)*sb->totpoint,"SB_Reference");
+ sb->scratch->Ref.ivert = MEM_mallocN(sizeof(ReferenceVert)*sb->totpoint, "SB_Reference");
bp= ob->soft->bpoint;
rp= sb->scratch->Ref.ivert;
for (a=0; a<sb->totpoint; a++, rp++, bp++) {
- copy_v3_v3(rp->pos,bp->pos);
+ copy_v3_v3(rp->pos, bp->pos);
add_v3_v3(accu_pos, bp->pos);
- accu_mass += _final_mass(ob,bp);
+ accu_mass += _final_mass(ob, bp);
}
- mul_v3_fl(accu_pos,1.0f/accu_mass);
- copy_v3_v3(sb->scratch->Ref.com,accu_pos);
+ mul_v3_fl(accu_pos, 1.0f/accu_mass);
+ copy_v3_v3(sb->scratch->Ref.com, accu_pos);
/* printf("reference_to_scratch\n"); */
}
@@ -3412,17 +3414,17 @@ static void reference_to_scratch(Object *ob)
helper function to get proper spring length
when object is rescaled
*/
-static float globallen(float *v1,float *v2,Object *ob)
+static float globallen(float *v1, float *v2, Object *ob)
{
- float p1[3],p2[3];
- copy_v3_v3(p1,v1);
+ float p1[3], p2[3];
+ copy_v3_v3(p1, v1);
mul_m4_v3(ob->obmat, p1);
- copy_v3_v3(p2,v2);
+ copy_v3_v3(p2, v2);
mul_m4_v3(ob->obmat, p2);
- return len_v3v3(p1,p2);
+ return len_v3v3(p1, p2);
}
-static void makelatticesprings(Lattice *lt, BodySpring *bs, int dostiff,Object *ob)
+static void makelatticesprings(Lattice *lt, BodySpring *bs, int dostiff, Object *ob)
{
BPoint *bp=lt->def, *bpu;
int u, v, w, dv, dw, bpc=0, bpuc;
@@ -3440,21 +3442,21 @@ static void makelatticesprings(Lattice *lt, BodySpring *bs, int dostiff,Object *
bs->v1 = bpc;
bs->v2 = bpc-dw;
bs->springtype=SB_EDGE;
- bs->len= globallen((bp-dw)->vec, bp->vec,ob);
+ bs->len= globallen((bp-dw)->vec, bp->vec, ob);
bs++;
}
if (v) {
bs->v1 = bpc;
bs->v2 = bpc-dv;
bs->springtype=SB_EDGE;
- bs->len= globallen((bp-dv)->vec, bp->vec,ob);
+ bs->len= globallen((bp-dv)->vec, bp->vec, ob);
bs++;
}
if (u) {
bs->v1 = bpuc;
bs->v2 = bpc;
bs->springtype=SB_EDGE;
- bs->len= globallen((bpu)->vec, bp->vec,ob);
+ bs->len= globallen((bpu)->vec, bp->vec, ob);
bs++;
}
@@ -3465,14 +3467,14 @@ static void makelatticesprings(Lattice *lt, BodySpring *bs, int dostiff,Object *
bs->v1 = bpc;
bs->v2 = bpc-dw-dv-1;
bs->springtype=SB_BEND;
- bs->len= globallen((bp-dw-dv-1)->vec, bp->vec,ob);
+ bs->len= globallen((bp-dw-dv-1)->vec, bp->vec, ob);
bs++;
}
if ( (v < lt->pntsv-1) && (u != 0) ) {
bs->v1 = bpc;
bs->v2 = bpc-dw+dv-1;
bs->springtype=SB_BEND;
- bs->len= globallen((bp-dw+dv-1)->vec, bp->vec,ob);
+ bs->len= globallen((bp-dw+dv-1)->vec, bp->vec, ob);
bs++;
}
}
@@ -3482,14 +3484,14 @@ static void makelatticesprings(Lattice *lt, BodySpring *bs, int dostiff,Object *
bs->v1 = bpc;
bs->v2 = bpc+dw-dv-1;
bs->springtype=SB_BEND;
- bs->len= globallen((bp+dw-dv-1)->vec, bp->vec,ob);
+ bs->len= globallen((bp+dw-dv-1)->vec, bp->vec, ob);
bs++;
}
if ( (v < lt->pntsv-1) && (u != 0) ) {
bs->v1 = bpc;
bs->v2 = bpc+dw+dv-1;
bs->springtype=SB_BEND;
- bs->len= globallen((bp+dw+dv-1)->vec, bp->vec,ob);
+ bs->len= globallen((bp+dw+dv-1)->vec, bp->vec, ob);
bs++;
}
}
@@ -3512,11 +3514,11 @@ static void lattice_to_softbody(Scene *scene, Object *ob)
totvert= lt->pntsu*lt->pntsv*lt->pntsw;
if (ob->softflag & OB_SB_EDGES) {
- totspring = ((lt->pntsu -1) * lt->pntsv
- + (lt->pntsv -1) * lt->pntsu) * lt->pntsw
- +lt->pntsu*lt->pntsv*(lt->pntsw -1);
+ totspring = ((lt->pntsu - 1) * lt->pntsv +
+ (lt->pntsv - 1) * lt->pntsu) * lt->pntsw +
+ lt->pntsu*lt->pntsv * (lt->pntsw - 1);
if (ob->softflag & OB_SB_QUADS) {
- totspring += 4*(lt->pntsu -1) * (lt->pntsv -1) * (lt->pntsw-1);
+ totspring += 4 * (lt->pntsu - 1) * (lt->pntsv -1) * (lt->pntsw - 1);
}
}
@@ -3541,7 +3543,7 @@ static void lattice_to_softbody(Scene *scene, Object *ob)
/* create some helper edges to enable SB lattice to be useful at all */
if (ob->softflag & OB_SB_EDGES) {
- makelatticesprings(lt,ob->soft->bspring,ob->softflag & OB_SB_QUADS,ob);
+ makelatticesprings(lt, ob->soft->bspring, ob->softflag & OB_SB_QUADS, ob);
build_bps_springlist(ob); /* link bps to springs */
}
}
@@ -3559,7 +3561,7 @@ static void curve_surf_to_softbody(Scene *scene, Object *ob)
int a, curindex=0;
int totvert, totspring = 0, setgoal=0;
- totvert= count_curveverts(&cu->nurb);
+ totvert= BKE_nurbList_verts_count(&cu->nurb);
if (ob->softflag & OB_SB_EDGES) {
if (ob->type==OB_CURVE) {
@@ -3604,19 +3606,19 @@ static void curve_surf_to_softbody(Scene *scene, Object *ob)
bs->v1= curindex-3;
bs->v2= curindex;
bs->springtype=SB_HANDLE;
- bs->len= globallen( (bezt-1)->vec[0], bezt->vec[0], ob );
+ bs->len = globallen((bezt-1)->vec[0], bezt->vec[0], ob);
bs++;
}
bs->v1= curindex;
bs->v2= curindex+1;
bs->springtype=SB_HANDLE;
- bs->len= globallen(bezt->vec[0], bezt->vec[1], ob);
+ bs->len = globallen(bezt->vec[0], bezt->vec[1], ob);
bs++;
bs->v1= curindex+1;
bs->v2= curindex+2;
bs->springtype=SB_HANDLE;
- bs->len= globallen(bezt->vec[1], bezt->vec[2], ob);
+ bs->len = globallen(bezt->vec[1], bezt->vec[2], ob);
bs++;
}
}
@@ -3630,15 +3632,14 @@ static void curve_surf_to_softbody(Scene *scene, Object *ob)
bs->v1= curindex-1;
bs->v2= curindex;
bs->springtype=SB_EDGE;
- bs->len= globallen( (bpnt-1)->vec, bpnt->vec , ob );
+ bs->len= globallen( (bpnt-1)->vec, bpnt->vec, ob );
bs++;
}
}
}
}
- if (totspring)
- {
+ if (totspring) {
build_bps_springlist(ob); /* link bps to springs */
if (ob->softflag & OB_SB_SELF) {calculate_collision_balls(ob);}
}
@@ -3651,7 +3652,7 @@ static void softbody_to_object(Object *ob, float (*vertexCos)[3], int numVerts,
if (sb) {
BodyPoint *bp= sb->bpoint;
int a;
- if (sb->solverflags & SBSO_ESTIMATEIPO) {SB_estimate_transform(ob,sb->lcom,sb->lrot,sb->lscale);}
+ if (sb->solverflags & SBSO_ESTIMATEIPO) {SB_estimate_transform(ob, sb->lcom, sb->lrot, sb->lscale);}
/* inverse matrix is not uptodate... */
invert_m4_m4(ob->imat, ob->obmat);
@@ -3668,7 +3669,7 @@ static void sb_new_scratch(SoftBody *sb)
{
if (!sb) return;
sb->scratch = MEM_callocN(sizeof(SBScratch), "SBScratch");
- sb->scratch->colliderhash = BLI_ghash_new(BLI_ghashutil_ptrhash,BLI_ghashutil_ptrcmp, "sb_new_scratch gh");
+ sb->scratch->colliderhash = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "sb_new_scratch gh");
sb->scratch->bodyface = NULL;
sb->scratch->totface = 0;
sb->scratch->aabbmax[0]=sb->scratch->aabbmax[1]=sb->scratch->aabbmax[2] = 1.0e30f;
@@ -3784,7 +3785,7 @@ static void softbody_update_positions(Object *ob, SoftBody *sb, float (*vertexCo
if (!sb || !sb->bpoint)
return;
- for (a=0,bp=sb->bpoint; a<numVerts; a++, bp++) {
+ for (a=0, bp=sb->bpoint; a<numVerts; a++, bp++) {
/* store where goals are now */
copy_v3_v3(bp->origS, bp->origE);
/* copy the position of the goals at desired end time */
@@ -3799,47 +3800,47 @@ static void softbody_update_positions(Object *ob, SoftBody *sb, float (*vertexCo
/* void SB_estimate_transform */
-/* input Object *ob out (says any object that can do SB like mesh,lattice,curve )
- * output float lloc[3],float lrot[3][3],float lscale[3][3]
+/* input Object *ob out (says any object that can do SB like mesh, lattice, curve )
+ * output float lloc[3], float lrot[3][3], float lscale[3][3]
* that is:
* a precise position vector denoting the motion of the center of mass
* give a rotation/scale matrix using averaging method, that's why estimate and not calculate
* see: this is kind of reverse engeneering: having to states of a point cloud and recover what happend
* our advantage here we know the identity of the vertex
* there are others methods giving other results.
- * lloc,lrot,lscale are allowed to be NULL, just in case you don't need it.
+ * lloc, lrot, lscale are allowed to be NULL, just in case you don't need it.
* should be pretty useful for pythoneers :)
* not! velocity .. 2nd order stuff
* vcloud_estimate_transform see
*/
-void SB_estimate_transform(Object *ob,float lloc[3],float lrot[3][3],float lscale[3][3])
+void SB_estimate_transform(Object *ob, float lloc[3], float lrot[3][3], float lscale[3][3])
{
BodyPoint *bp;
ReferenceVert *rp;
SoftBody *sb = NULL;
float (*opos)[3];
float (*rpos)[3];
- float com[3],rcom[3];
+ float com[3], rcom[3];
int a;
if (!ob ||!ob->soft) return; /* why did we get here ? */
sb= ob->soft;
if (!sb || !sb->bpoint) return;
- opos= MEM_callocN( (sb->totpoint)*3*sizeof(float), "SB_OPOS");
- rpos= MEM_callocN( (sb->totpoint)*3*sizeof(float), "SB_RPOS");
+ opos= MEM_callocN((sb->totpoint)*3*sizeof(float), "SB_OPOS");
+ rpos= MEM_callocN((sb->totpoint)*3*sizeof(float), "SB_RPOS");
/* might filter vertex selection with a vertex group */
for (a=0, bp=sb->bpoint, rp=sb->scratch->Ref.ivert; a<sb->totpoint; a++, bp++, rp++) {
- copy_v3_v3(rpos[a],rp->pos);
- copy_v3_v3(opos[a],bp->pos);
+ copy_v3_v3(rpos[a], rp->pos);
+ copy_v3_v3(opos[a], bp->pos);
}
- vcloud_estimate_transform(sb->totpoint, opos, NULL, rpos, NULL, com, rcom,lrot,lscale);
- //sub_v3_v3(com,rcom);
- if (lloc) copy_v3_v3(lloc,com);
- copy_v3_v3(sb->lcom,com);
- if (lscale) copy_m3_m3(sb->lscale,lscale);
- if (lrot) copy_m3_m3(sb->lrot,lrot);
+ vcloud_estimate_transform(sb->totpoint, opos, NULL, rpos, NULL, com, rcom, lrot, lscale);
+ //sub_v3_v3(com, rcom);
+ if (lloc) copy_v3_v3(lloc, com);
+ copy_v3_v3(sb->lcom, com);
+ if (lscale) copy_m3_m3(sb->lscale, lscale);
+ if (lrot) copy_m3_m3(sb->lrot, lrot);
MEM_freeN(opos);
@@ -3851,7 +3852,7 @@ static void softbody_reset(Object *ob, SoftBody *sb, float (*vertexCos)[3], int
BodyPoint *bp;
int a;
- for (a=0,bp=sb->bpoint; a<numVerts; a++, bp++) {
+ for (a=0, bp=sb->bpoint; a<numVerts; a++, bp++) {
copy_v3_v3(bp->pos, vertexCos[a]);
mul_m4_v3(ob->obmat, bp->pos); /* yep, sofbody is global coords*/
copy_v3_v3(bp->origS, bp->pos);
@@ -3891,10 +3892,10 @@ static void softbody_reset(Object *ob, SoftBody *sb, float (*vertexCos)[3], int
/* we only need that if we want to reconstruct IPO */
if (1) {
reference_to_scratch(ob);
- SB_estimate_transform(ob,NULL,NULL,NULL);
- SB_estimate_transform(ob,NULL,NULL,NULL);
+ SB_estimate_transform(ob, NULL, NULL, NULL);
+ SB_estimate_transform(ob, NULL, NULL, NULL);
}
- switch(ob->type) {
+ switch (ob->type) {
case OB_MESH:
if (ob->softflag & OB_SB_FACECOLL) mesh_faces_to_scratch(ob);
break;
@@ -3912,7 +3913,7 @@ static void softbody_step(Scene *scene, Object *ob, SoftBody *sb, float dtime)
{
/* the simulator */
float forcetime;
- double sct,sst;
+ double sct, sst;
sst=PIL_check_seconds_timer();
@@ -3950,29 +3951,28 @@ static void softbody_step(Scene *scene, Object *ob, SoftBody *sb, float dtime)
if (sb->solver_ID>0) mid_flags |= MID_PRESERVE;
forcetime = forcetimemax; /* hope for integrating in one step */
- while ( (ABS(timedone) < ABS(dtime)) && (loops < 2000) )
- {
+ while ( (ABS(timedone) < ABS(dtime)) && (loops < 2000) ) {
/* set goals in time */
- interpolate_exciter(ob,200,(int)(200.0f*(timedone/dtime)));
+ interpolate_exciter(ob, 200, (int)(200.0f*(timedone/dtime)));
sb->scratch->flag &= ~SBF_DOFUZZY;
/* do predictive euler step */
- softbody_calc_forces(scene, ob, forcetime,timedone/dtime,0);
+ softbody_calc_forces(scene, ob, forcetime, timedone/dtime, 0);
- softbody_apply_forces(ob, forcetime, 1, NULL,mid_flags);
+ softbody_apply_forces(ob, forcetime, 1, NULL, mid_flags);
/* crop new slope values to do averaged slope step */
- softbody_calc_forces(scene, ob, forcetime,timedone/dtime,0);
+ softbody_calc_forces(scene, ob, forcetime, timedone/dtime, 0);
- softbody_apply_forces(ob, forcetime, 2, &err,mid_flags);
+ softbody_apply_forces(ob, forcetime, 2, &err, mid_flags);
softbody_apply_goalsnap(ob);
if (err > SoftHeunTol) { /* error needs to be scaled to some quantity */
if (forcetime > forcetimemin) {
- forcetime = MAX2(forcetime / 2.0f,forcetimemin);
+ forcetime = MAX2(forcetime / 2.0f, forcetimemin);
softbody_restore_prev_step(ob);
- //printf("down,");
+ //printf("down, ");
}
else {
timedone += forcetime;
@@ -3992,17 +3992,17 @@ static void softbody_step(Scene *scene, Object *ob, SoftBody *sb, float dtime)
}
}
timedone += forcetime;
- newtime=MIN2(forcetimemax,MAX2(newtime,forcetimemin));
- //if (newtime > forcetime) printf("up,");
+ newtime=MIN2(forcetimemax, MAX2(newtime, forcetimemin));
+ //if (newtime > forcetime) printf("up, ");
if (forcetime > 0.0f)
- forcetime = MIN2(dtime - timedone,newtime);
+ forcetime = MIN2(dtime - timedone, newtime);
else
- forcetime = MAX2(dtime - timedone,newtime);
+ forcetime = MAX2(dtime - timedone, newtime);
}
loops++;
if (sb->solverflags & SBSO_MONITOR ) {
sct=PIL_check_seconds_timer();
- if (sct-sst > 0.5f) printf("%3.0f%% \r",100.0f*timedone/dtime);
+ if (sct-sst > 0.5f) printf("%3.0f%% \r", 100.0f*timedone/dtime);
}
/* ask for user break */
if (SB_localInterruptCallBack && SB_localInterruptCallBack()) break;
@@ -4015,16 +4015,15 @@ static void softbody_step(Scene *scene, Object *ob, SoftBody *sb, float dtime)
// if (G.debug & G_DEBUG) {
if (sb->solverflags & SBSO_MONITOR ) {
if (loops > HEUNWARNLIMIT) /* monitor high loop counts */
- printf("\r needed %d steps/frame",loops);
+ printf("\r needed %d steps/frame", loops);
}
}
- else if (sb->solver_ID == 2)
- {/* do semi "fake" implicit euler */
+ else if (sb->solver_ID == 2) {
+ /* do semi "fake" implicit euler */
//removed
}/*SOLVER SELECT*/
- else if (sb->solver_ID == 4)
- {
+ else if (sb->solver_ID == 4) {
/* do semi "fake" implicit euler */
}/*SOLVER SELECT*/
else if (sb->solver_ID == 3) {
@@ -4039,7 +4038,7 @@ static void softbody_step(Scene *scene, Object *ob, SoftBody *sb, float dtime)
if (sb->solverflags & SBSO_MONITOR ) {
sct=PIL_check_seconds_timer();
- if ((sct-sst > 0.5f) || (G.debug & G_DEBUG)) printf(" solver time %f sec %s\n",sct-sst,ob->id.name);
+ if ((sct-sst > 0.5f) || (G.debug & G_DEBUG)) printf(" solver time %f sec %s\n", sct-sst, ob->id.name);
}
}
@@ -4081,7 +4080,7 @@ void sbObjectStep(Scene *scene, Object *ob, float cfra, float (*vertexCos)[3], i
if (sb->bpoint == NULL ||
((ob->softflag & OB_SB_EDGES) && !ob->soft->bspring && object_has_edges(ob))) {
- switch(ob->type) {
+ switch (ob->type) {
case OB_MESH:
mesh_to_softbody(scene, ob);
break;
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c
index c2dbb518837..84d2bf815bc 100644
--- a/source/blender/blenkernel/intern/sound.c
+++ b/source/blender/blenkernel/intern/sound.c
@@ -63,16 +63,16 @@
// evil quiet NaN definition
static const int NAN_INT = 0x7FC00000;
-#define NAN_FLT *((float*)(&NAN_INT))
+#define NAN_FLT *((float *)(&NAN_INT))
#ifdef WITH_AUDASPACE
// evil global ;-)
static int sound_cfra;
#endif
-struct bSound* sound_new_file(struct Main *bmain, const char *filename)
+struct bSound *sound_new_file(struct Main *bmain, const char *filename)
{
- bSound* sound = NULL;
+ bSound *sound = NULL;
char str[FILE_MAX];
char *path;
@@ -86,42 +86,38 @@ struct bSound* sound_new_file(struct Main *bmain, const char *filename)
BLI_path_abs(str, path);
len = strlen(filename);
- while (len > 0 && filename[len-1] != '/' && filename[len-1] != '\\')
+ while (len > 0 && filename[len - 1] != '/' && filename[len - 1] != '\\')
len--;
- sound = alloc_libblock(&bmain->sound, ID_SO, filename+len);
+ sound = BKE_libblock_alloc(&bmain->sound, ID_SO, filename + len);
BLI_strncpy(sound->name, filename, FILE_MAX);
// XXX unused currently sound->type = SOUND_TYPE_FILE;
sound_load(bmain, sound);
- if (!sound->playback_handle)
- {
- free_libblock(&bmain->sound, sound);
+ if (!sound->playback_handle) {
+ BKE_libblock_free(&bmain->sound, sound);
sound = NULL;
}
return sound;
}
-void sound_free(struct bSound* sound)
+void BKE_sound_free(struct bSound *sound)
{
- if (sound->packedfile)
- {
+ if (sound->packedfile) {
freePackedFile(sound->packedfile);
sound->packedfile = NULL;
}
#ifdef WITH_AUDASPACE
- if (sound->handle)
- {
+ if (sound->handle) {
AUD_unload(sound->handle);
sound->handle = NULL;
sound->playback_handle = NULL;
}
- if (sound->cache)
- {
+ if (sound->cache) {
AUD_unload(sound->cache);
sound->cache = NULL;
}
@@ -135,16 +131,14 @@ void sound_free(struct bSound* sound)
static int force_device = -1;
#ifdef WITH_JACK
-static void sound_sync_callback(void* data, int mode, float time)
+static void sound_sync_callback(void *data, int mode, float time)
{
- struct Main* bmain = (struct Main*)data;
- struct Scene* scene;
+ struct Main *bmain = (struct Main *)data;
+ struct Scene *scene;
scene = bmain->scene.first;
- while (scene)
- {
- if (scene->audio.flag & AUDIO_SYNC)
- {
+ while (scene) {
+ if (scene->audio.flag & AUDIO_SYNC) {
if (mode)
sound_play_scene(scene);
else
@@ -229,15 +223,15 @@ void sound_exit(void)
// XXX unused currently
#if 0
-struct bSound* sound_new_buffer(struct Main *bmain, struct bSound *source)
+struct bSound *sound_new_buffer(struct Main *bmain, struct bSound *source)
{
- bSound* sound = NULL;
+ bSound *sound = NULL;
- char name[MAX_ID_NAME+5];
+ char name[MAX_ID_NAME + 5];
strcpy(name, "buf_");
strcpy(name + 4, source->id.name);
- sound = alloc_libblock(&bmain->sound, ID_SO, name);
+ sound = BKE_libblock_alloc(&bmain->sound, ID_SO, name);
sound->child_sound = source;
sound->type = SOUND_TYPE_BUFFER;
@@ -246,22 +240,22 @@ struct bSound* sound_new_buffer(struct Main *bmain, struct bSound *source)
if (!sound->playback_handle)
{
- free_libblock(&bmain->sound, sound);
+ BKE_libblock_free(&bmain->sound, sound);
sound = NULL;
}
return sound;
}
-struct bSound* sound_new_limiter(struct Main *bmain, struct bSound *source, float start, float end)
+struct bSound *sound_new_limiter(struct Main *bmain, struct bSound *source, float start, float end)
{
- bSound* sound = NULL;
+ bSound *sound = NULL;
- char name[MAX_ID_NAME+5];
+ char name[MAX_ID_NAME + 5];
strcpy(name, "lim_");
strcpy(name + 4, source->id.name);
- sound = alloc_libblock(&bmain->sound, ID_SO, name);
+ sound = BKE_libblock_alloc(&bmain->sound, ID_SO, name);
sound->child_sound = source;
sound->start = start;
@@ -272,7 +266,7 @@ struct bSound* sound_new_limiter(struct Main *bmain, struct bSound *source, floa
if (!sound->playback_handle)
{
- free_libblock(&bmain->sound, sound);
+ BKE_libblock_free(&bmain->sound, sound);
sound = NULL;
}
@@ -280,17 +274,16 @@ struct bSound* sound_new_limiter(struct Main *bmain, struct bSound *source, floa
}
#endif
-void sound_delete(struct Main *bmain, struct bSound* sound)
+void sound_delete(struct Main *bmain, struct bSound *sound)
{
- if (sound)
- {
- sound_free(sound);
+ if (sound) {
+ BKE_sound_free(sound);
- free_libblock(&bmain->sound, sound);
+ BKE_libblock_free(&bmain->sound, sound);
}
}
-void sound_cache(struct bSound* sound)
+void sound_cache(struct bSound *sound)
{
sound->flags |= SOUND_FLAGS_CACHING;
if (sound->cache)
@@ -303,35 +296,31 @@ void sound_cache(struct bSound* sound)
sound->playback_handle = sound->handle;
}
-void sound_cache_notifying(struct Main* main, struct bSound* sound)
+void sound_cache_notifying(struct Main *main, struct bSound *sound)
{
sound_cache(sound);
sound_update_sequencer(main, sound);
}
-void sound_delete_cache(struct bSound* sound)
+void sound_delete_cache(struct bSound *sound)
{
sound->flags &= ~SOUND_FLAGS_CACHING;
- if (sound->cache)
- {
+ if (sound->cache) {
AUD_unload(sound->cache);
sound->cache = NULL;
sound->playback_handle = sound->handle;
}
}
-void sound_load(struct Main *bmain, struct bSound* sound)
+void sound_load(struct Main *bmain, struct bSound *sound)
{
- if (sound)
- {
- if (sound->cache)
- {
+ if (sound) {
+ if (sound->cache) {
AUD_unload(sound->cache);
sound->cache = NULL;
}
- if (sound->handle)
- {
+ if (sound->handle) {
AUD_unload(sound->handle);
sound->handle = NULL;
sound->playback_handle = NULL;
@@ -341,15 +330,15 @@ void sound_load(struct Main *bmain, struct bSound* sound)
// XXX unused currently
#if 0
- switch(sound->type)
+ switch (sound->type)
{
- case SOUND_TYPE_FILE:
+ case SOUND_TYPE_FILE:
#endif
{
char fullpath[FILE_MAX];
/* load sound */
- PackedFile* pf = sound->packedfile;
+ PackedFile *pf = sound->packedfile;
/* don't modify soundact->sound->name, only change a copy */
BLI_strncpy(fullpath, sound->name, sizeof(fullpath));
@@ -357,7 +346,7 @@ void sound_load(struct Main *bmain, struct bSound* sound)
/* but we need a packed file then */
if (pf)
- sound->handle = AUD_loadBuffer((unsigned char*) pf->data, pf->size);
+ sound->handle = AUD_loadBuffer((unsigned char *) pf->data, pf->size);
/* or else load it from disk */
else
sound->handle = AUD_load(fullpath);
@@ -376,15 +365,13 @@ void sound_load(struct Main *bmain, struct bSound* sound)
break;
}
#endif
- if (sound->flags & SOUND_FLAGS_MONO)
- {
- void* handle = AUD_monoSound(sound->handle);
+ if (sound->flags & SOUND_FLAGS_MONO) {
+ void *handle = AUD_monoSound(sound->handle);
AUD_unload(sound->handle);
sound->handle = handle;
}
- if (sound->flags & SOUND_FLAGS_CACHING)
- {
+ if (sound->flags & SOUND_FLAGS_CACHING) {
sound->cache = AUD_bufferSound(sound->handle);
}
@@ -397,7 +384,7 @@ void sound_load(struct Main *bmain, struct bSound* sound)
}
}
-AUD_Device* sound_mixdown(struct Scene *scene, AUD_DeviceSpecs specs, int start, float volume)
+AUD_Device *sound_mixdown(struct Scene *scene, AUD_DeviceSpecs specs, int start, float volume)
{
return AUD_openMixdownDevice(specs, scene->sound_scene, volume, start / FPS);
}
@@ -406,7 +393,7 @@ void sound_create_scene(struct Scene *scene)
{
scene->sound_scene = AUD_createSequencer(FPS, scene->audio.flag & AUDIO_MUTE);
AUD_updateSequencerData(scene->sound_scene, scene->audio.speed_of_sound,
- scene->audio.doppler_factor, scene->audio.distance_model);
+ scene->audio.doppler_factor, scene->audio.distance_model);
scene->sound_scene_handle = NULL;
scene->sound_scrub_handle = NULL;
scene->speaker_handles = NULL;
@@ -439,26 +426,26 @@ void sound_update_fps(struct Scene *scene)
void sound_update_scene_listener(struct Scene *scene)
{
AUD_updateSequencerData(scene->sound_scene, scene->audio.speed_of_sound,
- scene->audio.doppler_factor, scene->audio.distance_model);
+ scene->audio.doppler_factor, scene->audio.distance_model);
}
-void* sound_scene_add_scene_sound(struct Scene *scene, struct Sequence* sequence, int startframe, int endframe, int frameskip)
+void *sound_scene_add_scene_sound(struct Scene *scene, struct Sequence *sequence, int startframe, int endframe, int frameskip)
{
if (scene != sequence->scene)
return AUD_addSequence(scene->sound_scene, sequence->scene->sound_scene, startframe / FPS, endframe / FPS, frameskip / FPS);
return NULL;
}
-void* sound_scene_add_scene_sound_defaults(struct Scene *scene, struct Sequence* sequence)
+void *sound_scene_add_scene_sound_defaults(struct Scene *scene, struct Sequence *sequence)
{
return sound_scene_add_scene_sound(scene, sequence,
sequence->startdisp, sequence->enddisp,
sequence->startofs + sequence->anim_startofs);
}
-void* sound_add_scene_sound(struct Scene *scene, struct Sequence* sequence, int startframe, int endframe, int frameskip)
+void *sound_add_scene_sound(struct Scene *scene, struct Sequence *sequence, int startframe, int endframe, int frameskip)
{
- void* handle = AUD_addSequence(scene->sound_scene, sequence->sound->playback_handle, startframe / FPS, endframe / FPS, frameskip / FPS);
+ void *handle = AUD_addSequence(scene->sound_scene, sequence->sound->playback_handle, startframe / FPS, endframe / FPS, frameskip / FPS);
AUD_muteSequence(handle, (sequence->flag & SEQ_MUTE) != 0);
AUD_setSequenceAnimData(handle, AUD_AP_VOLUME, CFRA, &sequence->volume, 0);
AUD_setSequenceAnimData(handle, AUD_AP_PITCH, CFRA, &sequence->pitch, 0);
@@ -466,29 +453,29 @@ void* sound_add_scene_sound(struct Scene *scene, struct Sequence* sequence, int
return handle;
}
-void* sound_add_scene_sound_defaults(struct Scene *scene, struct Sequence* sequence)
+void *sound_add_scene_sound_defaults(struct Scene *scene, struct Sequence *sequence)
{
return sound_add_scene_sound(scene, sequence,
sequence->startdisp, sequence->enddisp,
sequence->startofs + sequence->anim_startofs);
}
-void sound_remove_scene_sound(struct Scene *scene, void* handle)
+void sound_remove_scene_sound(struct Scene *scene, void *handle)
{
AUD_removeSequence(scene->sound_scene, handle);
}
-void sound_mute_scene_sound(void* handle, char mute)
+void sound_mute_scene_sound(void *handle, char mute)
{
AUD_muteSequence(handle, mute);
}
-void sound_move_scene_sound(struct Scene *scene, void* handle, int startframe, int endframe, int frameskip)
+void sound_move_scene_sound(struct Scene *scene, void *handle, int startframe, int endframe, int frameskip)
{
AUD_moveSequence(handle, startframe / FPS, endframe / FPS, frameskip / FPS);
}
-void sound_move_scene_sound_defaults(struct Scene *scene, struct Sequence* sequence)
+void sound_move_scene_sound_defaults(struct Scene *scene, struct Sequence *sequence)
{
if (sequence->scene_sound) {
sound_move_scene_sound(scene, sequence->scene_sound,
@@ -497,7 +484,7 @@ void sound_move_scene_sound_defaults(struct Scene *scene, struct Sequence* seque
}
}
-void sound_update_scene_sound(void* handle, struct bSound* sound)
+void sound_update_scene_sound(void *handle, struct bSound *sound)
{
AUD_updateSequenceSound(handle, sound->playback_handle);
}
@@ -512,24 +499,24 @@ void sound_set_scene_volume(struct Scene *scene, float volume)
AUD_setSequencerAnimData(scene->sound_scene, AUD_AP_VOLUME, CFRA, &volume, (scene->audio.flag & AUDIO_VOLUME_ANIMATED) != 0);
}
-void sound_set_scene_sound_volume(void* handle, float volume, char animated)
+void sound_set_scene_sound_volume(void *handle, float volume, char animated)
{
AUD_setSequenceAnimData(handle, AUD_AP_VOLUME, sound_cfra, &volume, animated);
}
-void sound_set_scene_sound_pitch(void* handle, float pitch, char animated)
+void sound_set_scene_sound_pitch(void *handle, float pitch, char animated)
{
AUD_setSequenceAnimData(handle, AUD_AP_PITCH, sound_cfra, &pitch, animated);
}
-void sound_set_scene_sound_pan(void* handle, float pan, char animated)
+void sound_set_scene_sound_pan(void *handle, float pan, char animated)
{
AUD_setSequenceAnimData(handle, AUD_AP_PANNING, sound_cfra, &pan, animated);
}
-void sound_update_sequencer(struct Main* main, struct bSound* sound)
+void sound_update_sequencer(struct Main *main, struct bSound *sound)
{
- struct Scene* scene;
+ struct Scene *scene;
for (scene = main->scene.first; scene; scene = scene->id.next) {
seq_update_sound(scene, sound);
@@ -557,14 +544,12 @@ void sound_play_scene(struct Scene *scene)
if (status == AUD_STATUS_INVALID)
sound_start_play_scene(scene);
- if (!scene->sound_scene_handle)
- {
+ if (!scene->sound_scene_handle) {
AUD_unlock();
return;
}
- if (status != AUD_STATUS_PLAYING)
- {
+ if (status != AUD_STATUS_PLAYING) {
AUD_seek(scene->sound_scene_handle, CFRA / FPS);
AUD_resume(scene->sound_scene_handle);
}
@@ -577,8 +562,7 @@ void sound_play_scene(struct Scene *scene)
void sound_stop_scene(struct Scene *scene)
{
- if (scene->sound_scene_handle)
- {
+ if (scene->sound_scene_handle) {
AUD_pause(scene->sound_scene_handle);
if (scene->audio.flag & AUDIO_SYNC)
@@ -596,12 +580,10 @@ void sound_seek_scene(struct Main *bmain, struct Scene *scene)
status = scene->sound_scene_handle ? AUD_getStatus(scene->sound_scene_handle) : AUD_STATUS_INVALID;
- if (status == AUD_STATUS_INVALID)
- {
+ if (status == AUD_STATUS_INVALID) {
sound_start_play_scene(scene);
- if (!scene->sound_scene_handle)
- {
+ if (!scene->sound_scene_handle) {
AUD_unlock();
return;
}
@@ -610,16 +592,14 @@ void sound_seek_scene(struct Main *bmain, struct Scene *scene)
}
animation_playing = 0;
- for (screen=bmain->screen.first; screen; screen=screen->id.next) {
+ for (screen = bmain->screen.first; screen; screen = screen->id.next) {
if (screen->animtimer) {
animation_playing = 1;
}
}
- if (scene->audio.flag & AUDIO_SCRUB && !animation_playing)
- {
- if (scene->audio.flag & AUDIO_SYNC)
- {
+ if (scene->audio.flag & AUDIO_SCRUB && !animation_playing) {
+ if (scene->audio.flag & AUDIO_SYNC) {
AUD_seek(scene->sound_scene_handle, CFRA / FPS);
AUD_seekSequencer(scene->sound_scene_handle, CFRA / FPS);
}
@@ -648,8 +628,7 @@ void sound_seek_scene(struct Main *bmain, struct Scene *scene)
float sound_sync_scene(struct Scene *scene)
{
- if (scene->sound_scene_handle)
- {
+ if (scene->sound_scene_handle) {
if (scene->audio.flag & AUDIO_SYNC)
return AUD_getSequencerPosition(scene->sound_scene_handle);
else
@@ -666,26 +645,24 @@ int sound_scene_playing(struct Scene *scene)
return -1;
}
-void sound_free_waveform(struct bSound* sound)
+void sound_free_waveform(struct bSound *sound)
{
- if (sound->waveform)
- {
- MEM_freeN(((SoundWaveform*)sound->waveform)->data);
+ if (sound->waveform) {
+ MEM_freeN(((SoundWaveform *)sound->waveform)->data);
MEM_freeN(sound->waveform);
}
sound->waveform = NULL;
}
-void sound_read_waveform(struct bSound* sound)
+void sound_read_waveform(struct bSound *sound)
{
AUD_SoundInfo info;
info = AUD_getInfo(sound->playback_handle);
- if (info.length > 0)
- {
- SoundWaveform* waveform = MEM_mallocN(sizeof(SoundWaveform), "SoundWaveform");
+ if (info.length > 0) {
+ SoundWaveform *waveform = MEM_mallocN(sizeof(SoundWaveform), "SoundWaveform");
int length = info.length * SOUND_WAVE_SAMPLES_PER_SECOND;
waveform->data = MEM_mallocN(length * sizeof(float) * 3, "SoundWaveform.samples");
@@ -696,36 +673,29 @@ void sound_read_waveform(struct bSound* sound)
}
}
-void sound_update_scene(struct Scene* scene)
+void sound_update_scene(struct Scene *scene)
{
- Object* ob;
- Base* base;
- NlaTrack* track;
- NlaStrip* strip;
- Speaker* speaker;
- Scene* sce_it;
+ Object *ob;
+ Base *base;
+ NlaTrack *track;
+ NlaStrip *strip;
+ Speaker *speaker;
+ Scene *sce_it;
- void* new_set = AUD_createSet();
- void* handle;
+ void *new_set = AUD_createSet();
+ void *handle;
float quat[4];
- for (SETLOOPER(scene, sce_it, base))
- {
+ for (SETLOOPER(scene, sce_it, base)) {
ob = base->object;
- if (ob->type == OB_SPEAKER)
- {
- if (ob->adt)
- {
- for (track = ob->adt->nla_tracks.first; track; track = track->next)
- {
- for (strip = track->strips.first; strip; strip = strip->next)
- {
- if (strip->type == NLASTRIP_TYPE_SOUND)
- {
- speaker = (Speaker*)ob->data;
-
- if (AUD_removeSet(scene->speaker_handles, strip->speaker_handle))
- {
+ if (ob->type == OB_SPEAKER) {
+ if (ob->adt) {
+ for (track = ob->adt->nla_tracks.first; track; track = track->next) {
+ for (strip = track->strips.first; strip; strip = strip->next) {
+ if (strip->type == NLASTRIP_TYPE_SOUND) {
+ speaker = (Speaker *)ob->data;
+
+ if (AUD_removeSet(scene->speaker_handles, strip->speaker_handle)) {
if (speaker->sound)
AUD_moveSequence(strip->speaker_handle, strip->start / FPS, -1, 0);
else {
@@ -734,21 +704,19 @@ void sound_update_scene(struct Scene* scene)
}
}
else {
- if (speaker->sound)
- {
+ if (speaker->sound) {
strip->speaker_handle = AUD_addSequence(scene->sound_scene, speaker->sound->playback_handle, strip->start / FPS, -1, 0);
AUD_setRelativeSequence(strip->speaker_handle, 0);
}
}
- if (strip->speaker_handle)
- {
+ if (strip->speaker_handle) {
AUD_addSet(new_set, strip->speaker_handle);
AUD_updateSequenceData(strip->speaker_handle, speaker->volume_max,
- speaker->volume_min, speaker->distance_max,
- speaker->distance_reference, speaker->attenuation,
- speaker->cone_angle_outer, speaker->cone_angle_inner,
- speaker->cone_volume_outer);
+ speaker->volume_min, speaker->distance_max,
+ speaker->distance_reference, speaker->attenuation,
+ speaker->cone_angle_outer, speaker->cone_angle_inner,
+ speaker->cone_volume_outer);
mat4_to_quat(quat, ob->obmat);
AUD_setSequenceAnimData(strip->speaker_handle, AUD_AP_LOCATION, CFRA, ob->obmat[3], 1);
@@ -765,13 +733,11 @@ void sound_update_scene(struct Scene* scene)
}
}
- while ((handle = AUD_getSet(scene->speaker_handles)))
- {
+ while ((handle = AUD_getSet(scene->speaker_handles))) {
AUD_removeSequence(scene->sound_scene, handle);
}
- if (scene->camera)
- {
+ if (scene->camera) {
mat4_to_quat(quat, scene->camera->obmat);
AUD_setSequencerAnimData(scene->sound_scene, AUD_AP_LOCATION, CFRA, scene->camera->obmat[3], 1);
AUD_setSequencerAnimData(scene->sound_scene, AUD_AP_ORIENTATION, CFRA, quat, 1);
@@ -781,9 +747,9 @@ void sound_update_scene(struct Scene* scene)
scene->speaker_handles = new_set;
}
-void* sound_get_factory(void* sound)
+void *sound_get_factory(void *sound)
{
- return ((struct bSound*) sound)->playback_handle;
+ return ((struct bSound *) sound)->playback_handle;
}
#else // WITH_AUDASPACE
diff --git a/source/blender/blenkernel/intern/speaker.c b/source/blender/blenkernel/intern/speaker.c
index 5466630f621..09440591826 100644
--- a/source/blender/blenkernel/intern/speaker.c
+++ b/source/blender/blenkernel/intern/speaker.c
@@ -43,11 +43,11 @@
#include "BKE_main.h"
#include "BKE_speaker.h"
-void *add_speaker(const char *name)
+void *BKE_speaker_add(const char *name)
{
Speaker *spk;
- spk= alloc_libblock(&G.main->speaker, ID_SPK, name);
+ spk = BKE_libblock_alloc(&G.main->speaker, ID_SPK, name);
spk->attenuation = 1.0f;
spk->cone_angle_inner = 360.0f;
@@ -65,69 +65,69 @@ void *add_speaker(const char *name)
return spk;
}
-Speaker *copy_speaker(Speaker *spk)
+Speaker *BKE_speaker_copy(Speaker *spk)
{
Speaker *spkn;
- spkn= copy_libblock(&spk->id);
+ spkn = BKE_libblock_copy(&spk->id);
if (spkn->sound)
spkn->sound->id.us++;
return spkn;
}
-void make_local_speaker(Speaker *spk)
+void BKE_speaker_make_local(Speaker *spk)
{
- Main *bmain= G.main;
+ Main *bmain = G.main;
Object *ob;
- int is_local= FALSE, is_lib= FALSE;
+ int is_local = FALSE, is_lib = FALSE;
/* - only lib users: do nothing
* - only local users: set flag
* - mixed: make copy
*/
- if (spk->id.lib==NULL) return;
- if (spk->id.us==1) {
+ if (spk->id.lib == NULL) return;
+ if (spk->id.us == 1) {
id_clear_lib_data(bmain, &spk->id);
return;
}
- ob= bmain->object.first;
+ ob = bmain->object.first;
while (ob) {
- if (ob->data==spk) {
- if (ob->id.lib) is_lib= TRUE;
- else is_local= TRUE;
+ if (ob->data == spk) {
+ if (ob->id.lib) is_lib = TRUE;
+ else is_local = TRUE;
}
- ob= ob->id.next;
+ ob = ob->id.next;
}
if (is_local && is_lib == FALSE) {
id_clear_lib_data(bmain, &spk->id);
}
else if (is_local && is_lib) {
- Speaker *spk_new= copy_speaker(spk);
- spk_new->id.us= 0;
+ Speaker *spk_new = BKE_speaker_copy(spk);
+ spk_new->id.us = 0;
/* Remap paths of new ID using old library as base. */
BKE_id_lib_local_paths(bmain, spk->id.lib, &spk_new->id);
- ob= bmain->object.first;
+ ob = bmain->object.first;
while (ob) {
- if (ob->data==spk) {
+ if (ob->data == spk) {
- if (ob->id.lib==NULL) {
- ob->data= spk_new;
+ if (ob->id.lib == NULL) {
+ ob->data = spk_new;
spk_new->id.us++;
spk->id.us--;
}
}
- ob= ob->id.next;
+ ob = ob->id.next;
}
}
}
-void free_speaker(Speaker *spk)
+void BKE_speaker_free(Speaker *spk)
{
if (spk->sound)
spk->sound->id.us--;
diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c
index 83a24f6afdc..e81cab6b912 100644
--- a/source/blender/blenkernel/intern/subsurf_ccg.c
+++ b/source/blender/blenkernel/intern/subsurf_ccg.c
@@ -244,7 +244,7 @@ static void get_face_uv_map_vert(UvVertMap *vmap, struct MPoly *mpoly, struct ML
int j, nverts = mpoly[fi].totloop;
for (j = 0; j < nverts; j++) {
- for (nv = v = get_uv_map_vert(vmap, ml[j].v); v; v = v->next) {
+ for (nv = v = BKE_mesh_uv_vert_map_get_vert(vmap, ml[j].v); v; v = v->next) {
if (v->separate)
nv = v;
if (v->f == fi)
@@ -273,7 +273,7 @@ static int ss_sync_from_uv(CCGSubSurf *ss, CCGSubSurf *origss, DerivedMesh *dm,
float uv[3] = {0.0f, 0.0f, 0.0f}; /* only first 2 values are written into */
limit[0] = limit[1] = STD_UV_CONNECT_LIMIT;
- vmap = make_uv_vert_map(mpoly, mloop, mloopuv, totface, totvert, 0, limit);
+ vmap = BKE_mesh_uv_vert_map_make(mpoly, mloop, mloopuv, totface, totvert, 0, limit);
if (!vmap)
return 0;
@@ -281,16 +281,16 @@ static int ss_sync_from_uv(CCGSubSurf *ss, CCGSubSurf *origss, DerivedMesh *dm,
/* create vertices */
for (i = 0; i < totvert; i++) {
- if (!get_uv_map_vert(vmap, i))
+ if (!BKE_mesh_uv_vert_map_get_vert(vmap, i))
continue;
- for (v = get_uv_map_vert(vmap, i)->next; v; v = v->next)
+ for (v = BKE_mesh_uv_vert_map_get_vert(vmap, i)->next; v; v = v->next)
if (v->separate)
break;
seam = (v != NULL) || ((mvert + i)->flag & ME_VERT_MERGED);
- for (v = get_uv_map_vert(vmap, i); v; v = v->next) {
+ for (v = BKE_mesh_uv_vert_map_get_vert(vmap, i); v; v = v->next) {
if (v->separate) {
CCGVert *ssv;
int loopid = mpoly[v->f].loopstart + v->tfindex;
@@ -314,7 +314,7 @@ static int ss_sync_from_uv(CCGSubSurf *ss, CCGSubSurf *origss, DerivedMesh *dm,
MLoop *ml = mloop + mp->loopstart;
BLI_array_empty(fverts);
- BLI_array_growitems(fverts, nverts);
+ BLI_array_grow_items(fverts, nverts);
get_face_uv_map_vert(vmap, mpoly, ml, i, fverts);
@@ -350,7 +350,7 @@ static int ss_sync_from_uv(CCGSubSurf *ss, CCGSubSurf *origss, DerivedMesh *dm,
CCGFace *f;
BLI_array_empty(fverts);
- BLI_array_growitems(fverts, nverts);
+ BLI_array_grow_items(fverts, nverts);
get_face_uv_map_vert(vmap, mpoly, ml, i, fverts);
ccgSubSurf_syncFace(ss, SET_INT_IN_POINTER(i), nverts, fverts, &f);
@@ -358,7 +358,7 @@ static int ss_sync_from_uv(CCGSubSurf *ss, CCGSubSurf *origss, DerivedMesh *dm,
BLI_array_free(fverts);
- free_uv_vert_map(vmap);
+ BKE_mesh_uv_vert_map_free(vmap);
ccgSubSurf_processSync(ss);
return 1;
@@ -583,7 +583,7 @@ static void ss_sync_from_derivedmesh(CCGSubSurf *ss, DerivedMesh *dm,
CCGFace *f;
BLI_array_empty(fVerts);
- BLI_array_growitems(fVerts, mp->totloop);
+ BLI_array_grow_items(fVerts, mp->totloop);
ml = mloop + mp->loopstart;
for (j = 0; j < mp->totloop; j++, ml++) {
@@ -730,8 +730,9 @@ static void ccgDM_getFinalVert(DerivedMesh *dm, int vertNum, MVert *mv)
int gridInternalEnd;
i = 0;
- while (i < lastface && vertNum >= ccgdm->faceMap[i + 1].startVert)
- ++i;
+ while (i < lastface && vertNum >= ccgdm->faceMap[i + 1].startVert) {
+ i++;
+ }
f = ccgdm->faceMap[i].face;
numVerts = ccgSubSurf_getFaceNumVerts(f);
@@ -774,8 +775,9 @@ static void ccgDM_getFinalVert(DerivedMesh *dm, int vertNum, MVert *mv)
int x;
i = 0;
- while (i < lastedge && vertNum >= ccgdm->edgeMap[i + 1].startVert)
- ++i;
+ while (i < lastedge && vertNum >= ccgdm->edgeMap[i + 1].startVert) {
+ i++;
+ }
e = ccgdm->edgeMap[i].edge;
@@ -869,8 +871,9 @@ static void ccgDM_getFinalEdge(DerivedMesh *dm, int edgeNum, MEdge *med)
#endif
i = 0;
- while (i < lastface && edgeNum >= ccgdm->faceMap[i + 1].startEdge)
- ++i;
+ while (i < lastface && edgeNum >= ccgdm->faceMap[i + 1].startEdge) {
+ i++;
+ }
f = ccgdm->faceMap[i].face;
/* numVerts = ccgSubSurf_getFaceNumVerts(f); */ /*UNUSED*/
@@ -1144,8 +1147,7 @@ static void ccgDM_copyFinalEdgeArray(DerivedMesh *dm, MEdge *medge)
if (edgeFlags) {
if (edgeIdx != -1) {
- flags |= (edgeFlags[index] & (ME_SEAM | ME_SHARP))
- | ME_EDGEDRAW | ME_EDGERENDER;
+ flags |= ((edgeFlags[index] & (ME_SEAM | ME_SHARP)) | ME_EDGEDRAW | ME_EDGERENDER);
}
}
else {
@@ -1718,21 +1720,21 @@ static void ccgDM_drawMappedFacesGLSL(DerivedMesh *dm,
#define PASSATTRIB(dx, dy, vert) { \
if (attribs.totorco) { \
index = getFaceIndex(ss, f, S, x + dx, y + dy, edgeSize, gridSize); \
- glVertexAttrib3fvARB(attribs.orco.glIndex, attribs.orco.array[index]); \
+ glVertexAttrib3fvARB(attribs.orco.gl_index, attribs.orco.array[index]); \
} \
for (b = 0; b < attribs.tottface; b++) { \
MTFace *tf = &attribs.tface[b].array[a]; \
- glVertexAttrib2fvARB(attribs.tface[b].glIndex, tf->uv[vert]); \
+ glVertexAttrib2fvARB(attribs.tface[b].gl_index, tf->uv[vert]); \
} \
for (b = 0; b < attribs.totmcol; b++) { \
MCol *cp = &attribs.mcol[b].array[a * 4 + vert]; \
GLubyte col[4]; \
col[0] = cp->b; col[1] = cp->g; col[2] = cp->r; col[3] = cp->a; \
- glVertexAttrib4ubvARB(attribs.mcol[b].glIndex, col); \
+ glVertexAttrib4ubvARB(attribs.mcol[b].gl_index, col); \
} \
if (attribs.tottang) { \
float *tang = attribs.tang.array[a * 4 + vert]; \
- glVertexAttrib4fvARB(attribs.tang.glIndex, tang); \
+ glVertexAttrib4fvARB(attribs.tang.gl_index, tang); \
} \
}
@@ -1863,27 +1865,27 @@ static void ccgDM_drawMappedFacesMat(DerivedMesh *dm, void (*setMaterial)(void *
#define PASSATTRIB(dx, dy, vert) { \
if (attribs.totorco) { \
index = getFaceIndex(ss, f, S, x + dx, y + dy, edgeSize, gridSize); \
- if (attribs.orco.glTexco) \
+ if (attribs.orco.gl_texco) \
glTexCoord3fv(attribs.orco.array[index]); \
else \
- glVertexAttrib3fvARB(attribs.orco.glIndex, attribs.orco.array[index]); \
+ glVertexAttrib3fvARB(attribs.orco.gl_index, attribs.orco.array[index]); \
} \
for (b = 0; b < attribs.tottface; b++) { \
MTFace *tf = &attribs.tface[b].array[a]; \
- if (attribs.tface[b].glTexco) \
+ if (attribs.tface[b].gl_texco) \
glTexCoord2fv(tf->uv[vert]); \
else \
- glVertexAttrib2fvARB(attribs.tface[b].glIndex, tf->uv[vert]); \
+ glVertexAttrib2fvARB(attribs.tface[b].gl_index, tf->uv[vert]); \
} \
for (b = 0; b < attribs.totmcol; b++) { \
MCol *cp = &attribs.mcol[b].array[a * 4 + vert]; \
GLubyte col[4]; \
col[0] = cp->b; col[1] = cp->g; col[2] = cp->r; col[3] = cp->a; \
- glVertexAttrib4ubvARB(attribs.mcol[b].glIndex, col); \
+ glVertexAttrib4ubvARB(attribs.mcol[b].gl_index, col); \
} \
if (attribs.tottang) { \
float *tang = attribs.tang.array[a * 4 + vert]; \
- glVertexAttrib4fvARB(attribs.tang.glIndex, tang); \
+ glVertexAttrib4fvARB(attribs.tang.gl_index, tang); \
} \
}
@@ -2102,7 +2104,7 @@ static void ccgDM_drawFacesTex_common(DerivedMesh *dm,
}
}
else {
- glShadeModel(GL_FLAT);
+ glShadeModel((cp)? GL_SMOOTH: GL_FLAT);
glBegin(GL_QUADS);
for (y = 0; y < gridFaces; y++) {
for (x = 0; x < gridFaces; x++) {
@@ -2423,7 +2425,9 @@ static void ccgDM_release(DerivedMesh *dm)
/* Check that mmd still exists */
if (!ccgdm->multires.local_mmd &&
BLI_findindex(&ccgdm->multires.ob->modifiers, ccgdm->multires.mmd) < 0)
+ {
ccgdm->multires.mmd = NULL;
+ }
if (ccgdm->multires.mmd) {
if (ccgdm->multires.modified_flags & MULTIRES_COORDS_MODIFIED)
@@ -3132,8 +3136,6 @@ static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss,
float *w2;
int s, x, y;
- origIndex = base_polyOrigIndex ? base_polyOrigIndex[origIndex] : origIndex;
-
w = get_ss_weights(&wtable, gridCuts, numVerts);
ccgdm->faceMap[index].startVert = vertNum;
@@ -3144,17 +3146,19 @@ static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss,
faceFlags->mat_nr = mpoly ? mpoly[origIndex].mat_nr : 0;
faceFlags++;
+ origIndex = base_polyOrigIndex ? base_polyOrigIndex[origIndex] : origIndex;
+
/* set the face base vert */
*((int *)ccgSubSurf_getFaceUserData(ss, f)) = vertNum;
BLI_array_empty(loopidx);
- BLI_array_growitems(loopidx, numVerts);
+ BLI_array_grow_items(loopidx, numVerts);
for (s = 0; s < numVerts; s++) {
loopidx[s] = loopindex++;
}
BLI_array_empty(vertidx);
- BLI_array_growitems(vertidx, numVerts);
+ BLI_array_grow_items(vertidx, numVerts);
for (s = 0; s < numVerts; s++) {
CCGVert *v = ccgSubSurf_getFaceVert(f, s);
vertidx[s] = GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(v));
@@ -3167,10 +3171,10 @@ static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss,
numVerts, vertNum);
if (vertOrigIndex) {
*vertOrigIndex = ORIGINDEX_NONE;
- ++vertOrigIndex;
+ vertOrigIndex++;
}
- ++vertNum;
+ vertNum++;
/*interpolate per-vert data*/
for (s = 0; s < numVerts; s++) {
@@ -3181,10 +3185,10 @@ static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss,
if (vertOrigIndex) {
*vertOrigIndex = ORIGINDEX_NONE;
- ++vertOrigIndex;
+ vertOrigIndex++;
}
- ++vertNum;
+ vertNum++;
}
}
@@ -3198,10 +3202,10 @@ static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss,
if (vertOrigIndex) {
*vertOrigIndex = ORIGINDEX_NONE;
- ++vertOrigIndex;
+ vertOrigIndex++;
}
- ++vertNum;
+ vertNum++;
}
}
}
@@ -3297,9 +3301,9 @@ static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss,
DM_interp_vert_data(dm, &ccgdm->dm, vertIdx, w, 2, vertNum);
if (vertOrigIndex) {
*vertOrigIndex = ORIGINDEX_NONE;
- ++vertOrigIndex;
+ vertOrigIndex++;
}
- ++vertNum;
+ vertNum++;
}
for (i = 0; i < numFinalEdges; ++i) {
@@ -3337,9 +3341,9 @@ static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss,
if (vertOrigIndex) {
*vertOrigIndex = mapIndex;
- ++vertOrigIndex;
+ vertOrigIndex++;
}
- ++vertNum;
+ vertNum++;
}
ccgdm->dm.numVertData = vertNum;
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c
index a7e49dd7fc8..7634528927a 100644
--- a/source/blender/blenkernel/intern/text.c
+++ b/source/blender/blenkernel/intern/text.c
@@ -135,8 +135,8 @@ static void txt_pop_last(Text *text);
static void txt_undo_add_op(Text *text, int op);
static void txt_undo_add_block(Text *text, int op, const char *buf);
static void txt_delete_line(Text *text, TextLine *line);
-static void txt_delete_sel (Text *text);
-static void txt_make_dirty (Text *text);
+static void txt_delete_sel(Text *text);
+static void txt_make_dirty(Text *text);
/***/
@@ -155,19 +155,19 @@ int txt_get_undostate(void)
static void init_undo_text(Text *text)
{
- text->undo_pos= -1;
- text->undo_len= TXT_INIT_UNDO;
- text->undo_buf= MEM_mallocN(text->undo_len, "undo buf");
+ text->undo_pos = -1;
+ text->undo_len = TXT_INIT_UNDO;
+ text->undo_buf = MEM_mallocN(text->undo_len, "undo buf");
}
-void free_text(Text *text)
+void BKE_text_free(Text *text)
{
TextLine *tmp;
- for (tmp= text->lines.first; tmp; tmp= tmp->next) {
+ for (tmp = text->lines.first; tmp; tmp = tmp->next) {
MEM_freeN(tmp->line);
if (tmp->format)
- MEM_freeN(tmp->format);
+ MEM_freeN(tmp->format);
}
BLI_freelistN(&text->lines);
@@ -180,43 +180,43 @@ void free_text(Text *text)
#endif
}
-Text *add_empty_text(const char *name)
+Text *BKE_text_add(const char *name)
{
- Main *bmain= G.main;
+ Main *bmain = G.main;
Text *ta;
TextLine *tmp;
- ta= alloc_libblock(&bmain->text, ID_TXT, name);
- ta->id.us= 1;
+ ta = BKE_libblock_alloc(&bmain->text, ID_TXT, name);
+ ta->id.us = 1;
- ta->name= NULL;
+ ta->name = NULL;
init_undo_text(ta);
- ta->nlines=1;
- ta->flags= TXT_ISDIRTY | TXT_ISMEM;
- if ((U.flag & USER_TXT_TABSTOSPACES_DISABLE)==0)
+ ta->nlines = 1;
+ ta->flags = TXT_ISDIRTY | TXT_ISMEM;
+ if ((U.flag & USER_TXT_TABSTOSPACES_DISABLE) == 0)
ta->flags |= TXT_TABSTOSPACES;
- ta->lines.first= ta->lines.last= NULL;
- ta->markers.first= ta->markers.last= NULL;
+ ta->lines.first = ta->lines.last = NULL;
+ ta->markers.first = ta->markers.last = NULL;
- tmp= (TextLine*) MEM_mallocN(sizeof(TextLine), "textline");
- tmp->line= (char*) MEM_mallocN(1, "textline_string");
- tmp->format= NULL;
+ tmp = (TextLine *) MEM_mallocN(sizeof(TextLine), "textline");
+ tmp->line = (char *) MEM_mallocN(1, "textline_string");
+ tmp->format = NULL;
- tmp->line[0]=0;
- tmp->len= 0;
+ tmp->line[0] = 0;
+ tmp->len = 0;
- tmp->next= NULL;
- tmp->prev= NULL;
+ tmp->next = NULL;
+ tmp->prev = NULL;
BLI_addhead(&ta->lines, tmp);
- ta->curl= ta->lines.first;
- ta->curc= 0;
- ta->sell= ta->lines.first;
- ta->selc= 0;
+ ta->curl = ta->lines.first;
+ ta->curc = 0;
+ ta->sell = ta->lines.first;
+ ta->selc = 0;
return ta;
}
@@ -225,35 +225,35 @@ Text *add_empty_text(const char *name)
/* to a valid utf-8 sequences */
int txt_extended_ascii_as_utf8(char **str)
{
- int bad_char, added= 0, i= 0;
+ int bad_char, added = 0, i = 0;
int length = strlen(*str);
while ((*str)[i]) {
- if ((bad_char= BLI_utf8_invalid_byte(*str+i, length-i)) == -1)
+ if ((bad_char = BLI_utf8_invalid_byte(*str + i, length - i)) == -1)
break;
added++;
- i+= bad_char + 1;
+ i += bad_char + 1;
}
if (added != 0) {
- char *newstr = MEM_mallocN(length+added+1, "text_line");
+ char *newstr = MEM_mallocN(length + added + 1, "text_line");
int mi = 0;
- i= 0;
+ i = 0;
while ((*str)[i]) {
- if ((bad_char= BLI_utf8_invalid_byte((*str)+i, length-i)) == -1) {
- memcpy(newstr+mi, (*str)+i, length - i + 1);
+ if ((bad_char = BLI_utf8_invalid_byte((*str) + i, length - i)) == -1) {
+ memcpy(newstr + mi, (*str) + i, length - i + 1);
break;
}
- memcpy(newstr+mi, (*str)+i, bad_char);
+ memcpy(newstr + mi, (*str) + i, bad_char);
- BLI_str_utf8_from_unicode((*str)[i+bad_char], newstr+mi+bad_char);
- i+= bad_char+1;
- mi+= bad_char+2;
+ BLI_str_utf8_from_unicode((*str)[i + bad_char], newstr + mi + bad_char);
+ i += bad_char + 1;
+ mi += bad_char + 2;
}
- newstr[length+added] = '\0';
+ newstr[length + added] = '\0';
MEM_freeN(*str);
*str = newstr;
}
@@ -264,21 +264,21 @@ int txt_extended_ascii_as_utf8(char **str)
// this function removes any control characters from
// a textline and fixes invalid utf-8 sequences
-static void cleanup_textline(TextLine * tl)
+static void cleanup_textline(TextLine *tl)
{
int i;
- for (i = 0; i < tl->len; i++ ) {
+ for (i = 0; i < tl->len; i++) {
if (tl->line[i] < ' ' && tl->line[i] != '\t') {
memmove(tl->line + i, tl->line + i + 1, tl->len - i);
tl->len--;
i--;
}
}
- tl->len+= txt_extended_ascii_as_utf8(&tl->line);
+ tl->len += txt_extended_ascii_as_utf8(&tl->line);
}
-int reopen_text(Text *text)
+int BKE_text_reload(Text *text)
{
FILE *fp;
int i, llen, len;
@@ -292,32 +292,32 @@ int reopen_text(Text *text)
BLI_strncpy(str, text->name, FILE_MAX);
BLI_path_abs(str, G.main->name);
- fp= BLI_fopen(str, "r");
- if (fp==NULL) return 0;
+ fp = BLI_fopen(str, "r");
+ if (fp == NULL) return 0;
/* free memory: */
- for (tmp= text->lines.first; tmp; tmp= tmp->next) {
+ for (tmp = text->lines.first; tmp; tmp = tmp->next) {
MEM_freeN(tmp->line);
if (tmp->format) MEM_freeN(tmp->format);
}
BLI_freelistN(&text->lines);
- text->lines.first= text->lines.last= NULL;
- text->curl= text->sell= NULL;
+ text->lines.first = text->lines.last = NULL;
+ text->curl = text->sell = NULL;
/* clear undo buffer */
MEM_freeN(text->undo_buf);
init_undo_text(text);
fseek(fp, 0L, SEEK_END);
- len= ftell(fp);
+ len = ftell(fp);
fseek(fp, 0L, SEEK_SET);
- text->undo_pos= -1;
+ text->undo_pos = -1;
- buffer= MEM_mallocN(len, "text_buffer");
+ buffer = MEM_mallocN(len, "text_buffer");
// under windows fread can return less then len bytes because
// of CR stripping
len = fread(buffer, 1, len, fp);
@@ -325,40 +325,40 @@ int reopen_text(Text *text)
fclose(fp);
stat(str, &st);
- text->mtime= st.st_mtime;
-
- text->nlines=0;
- llen=0;
- for (i=0; i<len; i++) {
- if (buffer[i]=='\n') {
- tmp= (TextLine*) MEM_mallocN(sizeof(TextLine), "textline");
- tmp->line= (char*) MEM_mallocN(llen+1, "textline_string");
- tmp->format= NULL;
-
- if (llen) memcpy(tmp->line, &buffer[i-llen], llen);
- tmp->line[llen]=0;
- tmp->len= llen;
+ text->mtime = st.st_mtime;
+
+ text->nlines = 0;
+ llen = 0;
+ for (i = 0; i < len; i++) {
+ if (buffer[i] == '\n') {
+ tmp = (TextLine *) MEM_mallocN(sizeof(TextLine), "textline");
+ tmp->line = (char *) MEM_mallocN(llen + 1, "textline_string");
+ tmp->format = NULL;
+
+ if (llen) memcpy(tmp->line, &buffer[i - llen], llen);
+ tmp->line[llen] = 0;
+ tmp->len = llen;
cleanup_textline(tmp);
BLI_addtail(&text->lines, tmp);
text->nlines++;
- llen=0;
+ llen = 0;
continue;
}
llen++;
}
- if (llen!=0 || text->nlines==0) {
- tmp= (TextLine*) MEM_mallocN(sizeof(TextLine), "textline");
- tmp->line= (char*) MEM_mallocN(llen+1, "textline_string");
- tmp->format= NULL;
+ if (llen != 0 || text->nlines == 0) {
+ tmp = (TextLine *) MEM_mallocN(sizeof(TextLine), "textline");
+ tmp->line = (char *) MEM_mallocN(llen + 1, "textline_string");
+ tmp->format = NULL;
- if (llen) memcpy(tmp->line, &buffer[i-llen], llen);
+ if (llen) memcpy(tmp->line, &buffer[i - llen], llen);
- tmp->line[llen]=0;
- tmp->len= llen;
+ tmp->line[llen] = 0;
+ tmp->len = llen;
cleanup_textline(tmp);
@@ -366,16 +366,16 @@ int reopen_text(Text *text)
text->nlines++;
}
- text->curl= text->sell= text->lines.first;
- text->curc= text->selc= 0;
+ text->curl = text->sell = text->lines.first;
+ text->curc = text->selc = 0;
MEM_freeN(buffer);
return 1;
}
-Text *add_text(const char *file, const char *relpath)
+Text *BKE_text_load(const char *file, const char *relpath)
{
- Main *bmain= G.main;
+ Main *bmain = G.main;
FILE *fp;
int i, llen, len;
unsigned char *buffer;
@@ -388,29 +388,29 @@ Text *add_text(const char *file, const char *relpath)
if (relpath) /* can be NULL (bg mode) */
BLI_path_abs(str, relpath);
- fp= BLI_fopen(str, "r");
- if (fp==NULL) return NULL;
+ fp = BLI_fopen(str, "r");
+ if (fp == NULL) return NULL;
- ta= alloc_libblock(&bmain->text, ID_TXT, BLI_path_basename(str));
- ta->id.us= 1;
+ ta = BKE_libblock_alloc(&bmain->text, ID_TXT, BLI_path_basename(str));
+ ta->id.us = 1;
- ta->lines.first= ta->lines.last= NULL;
- ta->markers.first= ta->markers.last= NULL;
- ta->curl= ta->sell= NULL;
+ ta->lines.first = ta->lines.last = NULL;
+ ta->markers.first = ta->markers.last = NULL;
+ ta->curl = ta->sell = NULL;
- if ((U.flag & USER_TXT_TABSTOSPACES_DISABLE)==0)
- ta->flags= TXT_TABSTOSPACES;
+ if ((U.flag & USER_TXT_TABSTOSPACES_DISABLE) == 0)
+ ta->flags = TXT_TABSTOSPACES;
fseek(fp, 0L, SEEK_END);
- len= ftell(fp);
+ len = ftell(fp);
fseek(fp, 0L, SEEK_SET);
- ta->name= MEM_mallocN(strlen(file)+1, "text_name");
+ ta->name = MEM_mallocN(strlen(file) + 1, "text_name");
strcpy(ta->name, file);
init_undo_text(ta);
- buffer= MEM_mallocN(len, "text_buffer");
+ buffer = MEM_mallocN(len, "text_buffer");
// under windows fread can return less then len bytes because
// of CR stripping
len = fread(buffer, 1, len, fp);
@@ -418,26 +418,26 @@ Text *add_text(const char *file, const char *relpath)
fclose(fp);
stat(str, &st);
- ta->mtime= st.st_mtime;
-
- ta->nlines=0;
- llen=0;
- for (i=0; i<len; i++) {
- if (buffer[i]=='\n') {
- tmp= (TextLine*) MEM_mallocN(sizeof(TextLine), "textline");
- tmp->line= (char*) MEM_mallocN(llen+1, "textline_string");
- tmp->format= NULL;
-
- if (llen) memcpy(tmp->line, &buffer[i-llen], llen);
- tmp->line[llen]=0;
- tmp->len= llen;
+ ta->mtime = st.st_mtime;
+
+ ta->nlines = 0;
+ llen = 0;
+ for (i = 0; i < len; i++) {
+ if (buffer[i] == '\n') {
+ tmp = (TextLine *) MEM_mallocN(sizeof(TextLine), "textline");
+ tmp->line = (char *) MEM_mallocN(llen + 1, "textline_string");
+ tmp->format = NULL;
+
+ if (llen) memcpy(tmp->line, &buffer[i - llen], llen);
+ tmp->line[llen] = 0;
+ tmp->len = llen;
cleanup_textline(tmp);
BLI_addtail(&ta->lines, tmp);
ta->nlines++;
- llen=0;
+ llen = 0;
continue;
}
llen++;
@@ -449,15 +449,15 @@ Text *add_text(const char *file, const char *relpath)
* - file is empty. in this case new line is needed to start editing from.
* - last characted in buffer is \n. in this case new line is needed to
* deal with newline at end of file. (see [#28087]) (sergey) */
- if (llen!=0 || ta->nlines==0 || buffer[len-1]=='\n') {
- tmp= (TextLine*) MEM_mallocN(sizeof(TextLine), "textline");
- tmp->line= (char*) MEM_mallocN(llen+1, "textline_string");
- tmp->format= NULL;
+ if (llen != 0 || ta->nlines == 0 || buffer[len - 1] == '\n') {
+ tmp = (TextLine *) MEM_mallocN(sizeof(TextLine), "textline");
+ tmp->line = (char *) MEM_mallocN(llen + 1, "textline_string");
+ tmp->format = NULL;
- if (llen) memcpy(tmp->line, &buffer[i-llen], llen);
+ if (llen) memcpy(tmp->line, &buffer[i - llen], llen);
- tmp->line[llen]=0;
- tmp->len= llen;
+ tmp->line[llen] = 0;
+ tmp->len = llen;
cleanup_textline(tmp);
@@ -465,63 +465,63 @@ Text *add_text(const char *file, const char *relpath)
ta->nlines++;
}
- ta->curl= ta->sell= ta->lines.first;
- ta->curc= ta->selc= 0;
+ ta->curl = ta->sell = ta->lines.first;
+ ta->curc = ta->selc = 0;
MEM_freeN(buffer);
return ta;
}
-Text *copy_text(Text *ta)
+Text *BKE_text_copy(Text *ta)
{
Text *tan;
TextLine *line, *tmp;
- tan= copy_libblock(&ta->id);
+ tan = BKE_libblock_copy(&ta->id);
/* file name can be NULL */
if (ta->name) {
- tan->name= MEM_mallocN(strlen(ta->name)+1, "text_name");
+ tan->name = MEM_mallocN(strlen(ta->name) + 1, "text_name");
strcpy(tan->name, ta->name);
}
else {
- tan->name= NULL;
+ tan->name = NULL;
}
tan->flags = ta->flags | TXT_ISDIRTY;
- tan->lines.first= tan->lines.last= NULL;
- tan->markers.first= tan->markers.last= NULL;
- tan->curl= tan->sell= NULL;
+ tan->lines.first = tan->lines.last = NULL;
+ tan->markers.first = tan->markers.last = NULL;
+ tan->curl = tan->sell = NULL;
- tan->nlines= ta->nlines;
+ tan->nlines = ta->nlines;
- line= ta->lines.first;
+ line = ta->lines.first;
/* Walk down, reconstructing */
while (line) {
- tmp= (TextLine*) MEM_mallocN(sizeof(TextLine), "textline");
- tmp->line= MEM_mallocN(line->len+1, "textline_string");
- tmp->format= NULL;
+ tmp = (TextLine *) MEM_mallocN(sizeof(TextLine), "textline");
+ tmp->line = MEM_mallocN(line->len + 1, "textline_string");
+ tmp->format = NULL;
strcpy(tmp->line, line->line);
- tmp->len= line->len;
+ tmp->len = line->len;
BLI_addtail(&tan->lines, tmp);
- line= line->next;
+ line = line->next;
}
- tan->curl= tan->sell= tan->lines.first;
- tan->curc= tan->selc= 0;
+ tan->curl = tan->sell = tan->lines.first;
+ tan->curc = tan->selc = 0;
init_undo_text(tan);
return tan;
}
-void unlink_text(Main *bmain, Text *text)
+void BKE_text_unlink(Main *bmain, Text *text)
{
bScreen *scr;
ScrArea *area;
@@ -531,27 +531,27 @@ void unlink_text(Main *bmain, Text *text)
bConstraint *con;
short update;
- for (ob=bmain->object.first; ob; ob=ob->id.next) {
+ for (ob = bmain->object.first; ob; ob = ob->id.next) {
/* game controllers */
- for (cont=ob->controllers.first; cont; cont=cont->next) {
- if (cont->type==CONT_PYTHON) {
+ for (cont = ob->controllers.first; cont; cont = cont->next) {
+ if (cont->type == CONT_PYTHON) {
bPythonCont *pc;
- pc= cont->data;
- if (pc->text==text) pc->text= NULL;
+ pc = cont->data;
+ if (pc->text == text) pc->text = NULL;
}
}
/* pyconstraints */
update = 0;
- if (ob->type==OB_ARMATURE && ob->pose) {
+ if (ob->type == OB_ARMATURE && ob->pose) {
bPoseChannel *pchan;
- for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
- for (con = pchan->constraints.first; con; con=con->next) {
- if (con->type==CONSTRAINT_TYPE_PYTHON) {
+ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
+ for (con = pchan->constraints.first; con; con = con->next) {
+ if (con->type == CONSTRAINT_TYPE_PYTHON) {
bPythonConstraint *data = con->data;
- if (data->text==text) data->text = NULL;
+ if (data->text == text) data->text = NULL;
update = 1;
}
@@ -559,10 +559,10 @@ void unlink_text(Main *bmain, Text *text)
}
}
- for (con = ob->constraints.first; con; con=con->next) {
- if (con->type==CONSTRAINT_TYPE_PYTHON) {
+ for (con = ob->constraints.first; con; con = con->next) {
+ if (con->type == CONSTRAINT_TYPE_PYTHON) {
bPythonConstraint *data = con->data;
- if (data->text==text) data->text = NULL;
+ if (data->text == text) data->text = NULL;
update = 1;
}
}
@@ -575,38 +575,38 @@ void unlink_text(Main *bmain, Text *text)
// XXX nodeDynamicUnlinkText(&text->id);
/* text space */
- for (scr= bmain->screen.first; scr; scr= scr->id.next) {
- for (area= scr->areabase.first; area; area= area->next) {
- for (sl= area->spacedata.first; sl; sl= sl->next) {
- if (sl->spacetype==SPACE_TEXT) {
- SpaceText *st= (SpaceText*) sl;
-
- if (st->text==text) {
- st->text= NULL;
- st->top= 0;
+ for (scr = bmain->screen.first; scr; scr = scr->id.next) {
+ for (area = scr->areabase.first; area; area = area->next) {
+ for (sl = area->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_TEXT) {
+ SpaceText *st = (SpaceText *) sl;
+
+ if (st->text == text) {
+ st->text = NULL;
+ st->top = 0;
}
}
}
}
}
- text->id.us= 0;
+ text->id.us = 0;
}
-void clear_text(Text *text) /* called directly from rna */
+void BKE_text_clear(Text *text) /* called directly from rna */
{
int oldstate;
oldstate = txt_get_undostate( );
- txt_set_undostate( 1 );
- txt_sel_all( text );
+ txt_set_undostate(1);
+ txt_sel_all(text);
txt_delete_sel(text);
txt_set_undostate(oldstate);
txt_make_dirty(text);
}
-void write_text(Text *text, const char *str) /* called directly from rna */
+void BKE_text_write(Text *text, const char *str) /* called directly from rna */
{
int oldstate;
@@ -627,25 +627,25 @@ static void make_new_line(TextLine *line, char *newline)
if (line->line) MEM_freeN(line->line);
if (line->format) MEM_freeN(line->format);
- line->line= newline;
- line->len= strlen(newline);
- line->format= NULL;
+ line->line = newline;
+ line->len = strlen(newline);
+ line->format = NULL;
}
static TextLine *txt_new_line(const char *str)
{
TextLine *tmp;
- if (!str) str= "";
+ if (!str) str = "";
- tmp= (TextLine *) MEM_mallocN(sizeof(TextLine), "textline");
- tmp->line= MEM_mallocN(strlen(str)+1, "textline_string");
- tmp->format= NULL;
+ tmp = (TextLine *) MEM_mallocN(sizeof(TextLine), "textline");
+ tmp->line = MEM_mallocN(strlen(str) + 1, "textline_string");
+ tmp->format = NULL;
strcpy(tmp->line, str);
- tmp->len= strlen(str);
- tmp->next= tmp->prev= NULL;
+ tmp->len = strlen(str);
+ tmp->next = tmp->prev = NULL;
return tmp;
}
@@ -654,80 +654,80 @@ static TextLine *txt_new_linen(const char *str, int n)
{
TextLine *tmp;
- tmp= (TextLine *) MEM_mallocN(sizeof(TextLine), "textline");
- tmp->line= MEM_mallocN(n+1, "textline_string");
- tmp->format= NULL;
+ tmp = (TextLine *) MEM_mallocN(sizeof(TextLine), "textline");
+ tmp->line = MEM_mallocN(n + 1, "textline_string");
+ tmp->format = NULL;
- BLI_strncpy(tmp->line, (str)? str: "", n+1);
+ BLI_strncpy(tmp->line, (str) ? str : "", n + 1);
- tmp->len= strlen(tmp->line);
- tmp->next= tmp->prev= NULL;
+ tmp->len = strlen(tmp->line);
+ tmp->next = tmp->prev = NULL;
return tmp;
}
-void txt_clean_text (Text *text)
+void txt_clean_text(Text *text)
{
TextLine **top, **bot;
if (!text) return;
if (!text->lines.first) {
- if (text->lines.last) text->lines.first= text->lines.last;
- else text->lines.first= text->lines.last= txt_new_line(NULL);
+ if (text->lines.last) text->lines.first = text->lines.last;
+ else text->lines.first = text->lines.last = txt_new_line(NULL);
}
- if (!text->lines.last) text->lines.last= text->lines.first;
+ if (!text->lines.last) text->lines.last = text->lines.first;
- top= (TextLine **) &text->lines.first;
- bot= (TextLine **) &text->lines.last;
+ top = (TextLine **) &text->lines.first;
+ bot = (TextLine **) &text->lines.last;
- while ((*top)->prev) *top= (*top)->prev;
- while ((*bot)->next) *bot= (*bot)->next;
+ while ((*top)->prev) *top = (*top)->prev;
+ while ((*bot)->next) *bot = (*bot)->next;
if (!text->curl) {
- if (text->sell) text->curl= text->sell;
- else text->curl= text->lines.first;
- text->curc= 0;
+ if (text->sell) text->curl = text->sell;
+ else text->curl = text->lines.first;
+ text->curc = 0;
}
if (!text->sell) {
- text->sell= text->curl;
- text->selc= 0;
+ text->sell = text->curl;
+ text->selc = 0;
}
}
-int txt_get_span (TextLine *from, TextLine *to)
+int txt_get_span(TextLine *from, TextLine *to)
{
- int ret=0;
- TextLine *tmp= from;
+ int ret = 0;
+ TextLine *tmp = from;
if (!to || !from) return 0;
- if (from==to) return 0;
+ if (from == to) return 0;
/* Look forwards */
while (tmp) {
if (tmp == to) return ret;
ret++;
- tmp= tmp->next;
+ tmp = tmp->next;
}
/* Look backwards */
if (!tmp) {
- tmp= from;
- ret=0;
+ tmp = from;
+ ret = 0;
while (tmp) {
if (tmp == to) break;
ret--;
- tmp= tmp->prev;
+ tmp = tmp->prev;
}
- if (!tmp) ret=0;
+ if (!tmp) ret = 0;
}
return ret;
}
-static void txt_make_dirty (Text *text)
+static void txt_make_dirty(Text *text)
{
text->flags |= TXT_ISDIRTY;
#ifdef WITH_PYTHON
@@ -739,30 +739,30 @@ static void txt_make_dirty (Text *text)
/* Cursor utility functions */
/****************************/
-static void txt_curs_cur (Text *text, TextLine ***linep, int **charp)
+static void txt_curs_cur(Text *text, TextLine ***linep, int **charp)
{
- *linep= &text->curl; *charp= &text->curc;
+ *linep = &text->curl; *charp = &text->curc;
}
-static void txt_curs_sel (Text *text, TextLine ***linep, int **charp)
+static void txt_curs_sel(Text *text, TextLine ***linep, int **charp)
{
- *linep= &text->sell; *charp= &text->selc;
+ *linep = &text->sell; *charp = &text->selc;
}
-static void txt_curs_first (Text *text, TextLine **linep, int *charp)
+static void txt_curs_first(Text *text, TextLine **linep, int *charp)
{
- if (text->curl==text->sell) {
- *linep= text->curl;
- if (text->curc<text->selc) *charp= text->curc;
- else *charp= text->selc;
+ if (text->curl == text->sell) {
+ *linep = text->curl;
+ if (text->curc < text->selc) *charp = text->curc;
+ else *charp = text->selc;
}
- else if (txt_get_span(text->lines.first, text->curl)<txt_get_span(text->lines.first, text->sell)) {
- *linep= text->curl;
- *charp= text->curc;
+ else if (txt_get_span(text->lines.first, text->curl) < txt_get_span(text->lines.first, text->sell)) {
+ *linep = text->curl;
+ *charp = text->curc;
}
else {
- *linep= text->sell;
- *charp= text->selc;
+ *linep = text->sell;
+ *charp = text->selc;
}
}
@@ -772,7 +772,7 @@ static void txt_curs_first (Text *text, TextLine **linep, int *charp)
int txt_utf8_offset_to_index(const char *str, int offset)
{
- int index= 0, pos= 0;
+ int index = 0, pos = 0;
while (pos != offset) {
pos += BLI_str_utf8_size(str + pos);
index++;
@@ -782,7 +782,7 @@ int txt_utf8_offset_to_index(const char *str, int offset)
int txt_utf8_index_to_offset(const char *str, int index)
{
- int offset= 0, pos= 0;
+ int offset = 0, pos = 0;
while (pos != index) {
offset += BLI_str_utf8_size(str + offset);
pos++;
@@ -796,7 +796,7 @@ static int txt_utf8_len(const char *src)
{
int len;
- for (len=0; *src; len++) {
+ for (len = 0; *src; len++) {
src += BLI_str_utf8_size(src);
}
@@ -817,12 +817,12 @@ void txt_move_up(Text *text, short sel)
if ((*linep)->prev) {
int index = txt_utf8_offset_to_index((*linep)->line, *charp);
- *linep= (*linep)->prev;
- if (index > txt_utf8_len((*linep)->line)) *charp= (*linep)->len;
- else *charp= txt_utf8_index_to_offset((*linep)->line, index);
+ *linep = (*linep)->prev;
+ if (index > txt_utf8_len((*linep)->line)) *charp = (*linep)->len;
+ else *charp = txt_utf8_index_to_offset((*linep)->line, index);
if (!undoing)
- txt_undo_add_op(text, sel?UNDO_SUP:UNDO_CUP);
+ txt_undo_add_op(text, sel ? UNDO_SUP : UNDO_CUP);
}
else {
txt_move_bol(text, sel);
@@ -845,12 +845,12 @@ void txt_move_down(Text *text, short sel)
if ((*linep)->next) {
int index = txt_utf8_offset_to_index((*linep)->line, *charp);
- *linep= (*linep)->next;
- if (index > txt_utf8_len((*linep)->line)) *charp= (*linep)->len;
- else *charp= txt_utf8_index_to_offset((*linep)->line, index);
+ *linep = (*linep)->next;
+ if (index > txt_utf8_len((*linep)->line)) *charp = (*linep)->len;
+ else *charp = txt_utf8_index_to_offset((*linep)->line, index);
if (!undoing)
- txt_undo_add_op(text, sel?UNDO_SDOWN:UNDO_CDOWN);
+ txt_undo_add_op(text, sel ? UNDO_SDOWN : UNDO_CDOWN);
}
else {
txt_move_eol(text, sel);
@@ -862,49 +862,49 @@ void txt_move_down(Text *text, short sel)
void txt_move_left(Text *text, short sel)
{
TextLine **linep;
- int *charp, oundoing= undoing;
- int tabsize= 0, i= 0;
+ int *charp, oundoing = undoing;
+ int tabsize = 0, i = 0;
if (!text) return;
if (sel) txt_curs_sel(text, &linep, &charp);
else { txt_pop_first(text); txt_curs_cur(text, &linep, &charp); }
if (!*linep) return;
- undoing= 1;
+ undoing = 1;
- if (*charp== 0) {
+ if (*charp == 0) {
if ((*linep)->prev) {
txt_move_up(text, sel);
- *charp= (*linep)->len;
+ *charp = (*linep)->len;
}
}
else {
// do nice left only if there are only spaces
// TXT_TABSIZE hardcoded in DNA_text_types.h
if (text->flags & TXT_TABSTOSPACES) {
- tabsize= (*charp < TXT_TABSIZE) ? *charp : TXT_TABSIZE;
+ tabsize = (*charp < TXT_TABSIZE) ? *charp : TXT_TABSIZE;
- for (i=0; i<(*charp); i++)
+ for (i = 0; i < (*charp); i++)
if ((*linep)->line[i] != ' ') {
- tabsize= 0;
+ tabsize = 0;
break;
}
// if in the middle of the space-tab
if (tabsize && (*charp) % TXT_TABSIZE != 0)
- tabsize= ((*charp) % TXT_TABSIZE);
+ tabsize = ((*charp) % TXT_TABSIZE);
}
if (tabsize)
- (*charp)-= tabsize;
+ (*charp) -= tabsize;
else {
- const char *prev= BLI_str_prev_char_utf8((*linep)->line + *charp);
- *charp= prev - (*linep)->line;
+ const char *prev = BLI_str_prev_char_utf8((*linep)->line + *charp);
+ *charp = prev - (*linep)->line;
}
}
- undoing= oundoing;
- if (!undoing) txt_undo_add_op(text, sel?UNDO_SLEFT:UNDO_CLEFT);
+ undoing = oundoing;
+ if (!undoing) txt_undo_add_op(text, sel ? UNDO_SLEFT : UNDO_CLEFT);
if (!sel) txt_pop_sel(text);
}
@@ -912,117 +912,93 @@ void txt_move_left(Text *text, short sel)
void txt_move_right(Text *text, short sel)
{
TextLine **linep;
- int *charp, oundoing= undoing, do_tab= 0, i;
+ int *charp, oundoing = undoing, do_tab = 0, i;
if (!text) return;
if (sel) txt_curs_sel(text, &linep, &charp);
else { txt_pop_last(text); txt_curs_cur(text, &linep, &charp); }
if (!*linep) return;
- undoing= 1;
+ undoing = 1;
- if (*charp== (*linep)->len) {
+ if (*charp == (*linep)->len) {
if ((*linep)->next) {
txt_move_down(text, sel);
- *charp= 0;
+ *charp = 0;
}
}
else {
// do nice right only if there are only spaces
// spaces hardcoded in DNA_text_types.h
- if (text->flags & TXT_TABSTOSPACES && (*linep)->line[*charp]== ' ') {
- do_tab= 1;
- for (i=0; i<*charp; i++)
- if ((*linep)->line[i]!= ' ') {
- do_tab= 0;
+ if (text->flags & TXT_TABSTOSPACES && (*linep)->line[*charp] == ' ') {
+ do_tab = 1;
+ for (i = 0; i < *charp; i++)
+ if ((*linep)->line[i] != ' ') {
+ do_tab = 0;
break;
}
}
if (do_tab) {
- int tabsize= (*charp) % TXT_TABSIZE + 1;
- for (i=*charp+1; (*linep)->line[i]==' ' && tabsize<TXT_TABSIZE; i++)
+ int tabsize = (*charp) % TXT_TABSIZE + 1;
+ for (i = *charp + 1; (*linep)->line[i] == ' ' && tabsize < TXT_TABSIZE; i++)
tabsize++;
- (*charp)= i;
+ (*charp) = i;
}
- else (*charp)+= BLI_str_utf8_size((*linep)->line + *charp);
+ else (*charp) += BLI_str_utf8_size((*linep)->line + *charp);
}
- undoing= oundoing;
- if (!undoing) txt_undo_add_op(text, sel?UNDO_SRIGHT:UNDO_CRIGHT);
+ undoing = oundoing;
+ if (!undoing) txt_undo_add_op(text, sel ? UNDO_SRIGHT : UNDO_CRIGHT);
if (!sel) txt_pop_sel(text);
}
void txt_jump_left(Text *text, short sel)
{
- TextLine **linep, *oldl;
- int *charp, oldc, oldflags, i;
- unsigned char oldu;
- int pos;
-
+ TextLine **linep;
+ int *charp, oldc;
+
if (!text) return;
if (sel) txt_curs_sel(text, &linep, &charp);
else { txt_pop_first(text); txt_curs_cur(text, &linep, &charp); }
if (!*linep) return;
+ oldc = *charp;
- oldflags = text->flags;
- text->flags &= ~TXT_TABSTOSPACES;
-
- oldl= *linep;
- oldc= *charp;
- oldu= undoing;
- undoing= 1; /* Don't push individual moves to undo stack */
-
- pos = *charp;
BLI_str_cursor_step_utf8((*linep)->line, (*linep)->len,
- &pos, STRCUR_DIR_PREV,
+ charp, STRCUR_DIR_PREV,
STRCUR_JUMP_DELIM);
- for (i = *charp; i > pos; i--) {
- txt_move_left(text, sel);
+
+ if (!sel) txt_pop_sel(text);
+ if (!undoing) {
+ int span = txt_get_span(text->lines.first, *linep);
+ txt_undo_add_toop(text, sel ? UNDO_STO : UNDO_CTO, span, oldc, span, (unsigned short)*charp);
}
-
- text->flags = oldflags;
-
- undoing= oldu;
- if (!undoing) txt_undo_add_toop(text, sel?UNDO_STO:UNDO_CTO, txt_get_span(text->lines.first, oldl), oldc, txt_get_span(text->lines.first, *linep), (unsigned short)*charp);
}
void txt_jump_right(Text *text, short sel)
{
- TextLine **linep, *oldl;
- int *charp, oldc, oldflags, i;
- unsigned char oldu;
- int pos;
-
+ TextLine **linep;
+ int *charp, oldc;
+
if (!text) return;
if (sel) txt_curs_sel(text, &linep, &charp);
else { txt_pop_last(text); txt_curs_cur(text, &linep, &charp); }
if (!*linep) return;
-
- oldflags = text->flags;
- text->flags &= ~TXT_TABSTOSPACES;
-
- oldl= *linep;
- oldc= *charp;
- oldu= undoing;
- undoing= 1; /* Don't push individual moves to undo stack */
-
- pos = *charp;
+ oldc = *charp;
+
BLI_str_cursor_step_utf8((*linep)->line, (*linep)->len,
- &pos, STRCUR_DIR_NEXT,
+ charp, STRCUR_DIR_NEXT,
STRCUR_JUMP_DELIM);
- for (i = *charp; i < pos; i++) {
- txt_move_right(text, sel);
+
+ if (!sel) txt_pop_sel(text);
+ if (!undoing) {
+ int span = txt_get_span(text->lines.first, *linep);
+ txt_undo_add_toop(text, sel ? UNDO_STO : UNDO_CTO, span, oldc, span, (unsigned short)*charp);
}
-
- text->flags = oldflags;
-
- undoing= oldu;
- if (!undoing) txt_undo_add_toop(text, sel?UNDO_STO:UNDO_CTO, txt_get_span(text->lines.first, oldl), oldc, txt_get_span(text->lines.first, *linep), (unsigned short)*charp);
}
-void txt_move_bol (Text *text, short sel)
+void txt_move_bol(Text *text, short sel)
{
TextLine **linep;
int *charp, old;
@@ -1031,15 +1007,15 @@ void txt_move_bol (Text *text, short sel)
if (sel) txt_curs_sel(text, &linep, &charp);
else txt_curs_cur(text, &linep, &charp);
if (!*linep) return;
- old= *charp;
+ old = *charp;
- *charp= 0;
+ *charp = 0;
if (!sel) txt_pop_sel(text);
- if (!undoing) txt_undo_add_toop(text, sel?UNDO_STO:UNDO_CTO, txt_get_span(text->lines.first, *linep), old, txt_get_span(text->lines.first, *linep), (unsigned short)*charp);
+ if (!undoing) txt_undo_add_toop(text, sel ? UNDO_STO : UNDO_CTO, txt_get_span(text->lines.first, *linep), old, txt_get_span(text->lines.first, *linep), (unsigned short)*charp);
}
-void txt_move_eol (Text *text, short sel)
+void txt_move_eol(Text *text, short sel)
{
TextLine **linep;
int *charp, old;
@@ -1048,15 +1024,15 @@ void txt_move_eol (Text *text, short sel)
if (sel) txt_curs_sel(text, &linep, &charp);
else txt_curs_cur(text, &linep, &charp);
if (!*linep) return;
- old= *charp;
+ old = *charp;
- *charp= (*linep)->len;
+ *charp = (*linep)->len;
if (!sel) txt_pop_sel(text);
- if (!undoing) txt_undo_add_toop(text, sel?UNDO_STO:UNDO_CTO, txt_get_span(text->lines.first, *linep), old, txt_get_span(text->lines.first, *linep), (unsigned short)*charp);
+ if (!undoing) txt_undo_add_toop(text, sel ? UNDO_STO : UNDO_CTO, txt_get_span(text->lines.first, *linep), old, txt_get_span(text->lines.first, *linep), (unsigned short)*charp);
}
-void txt_move_bof (Text *text, short sel)
+void txt_move_bof(Text *text, short sel)
{
TextLine **linep;
int *charp, old;
@@ -1065,16 +1041,16 @@ void txt_move_bof (Text *text, short sel)
if (sel) txt_curs_sel(text, &linep, &charp);
else txt_curs_cur(text, &linep, &charp);
if (!*linep) return;
- old= *charp;
+ old = *charp;
- *linep= text->lines.first;
- *charp= 0;
+ *linep = text->lines.first;
+ *charp = 0;
if (!sel) txt_pop_sel(text);
- if (!undoing) txt_undo_add_toop(text, sel?UNDO_STO:UNDO_CTO, txt_get_span(text->lines.first, *linep), old, txt_get_span(text->lines.first, *linep), (unsigned short)*charp);
+ if (!undoing) txt_undo_add_toop(text, sel ? UNDO_STO : UNDO_CTO, txt_get_span(text->lines.first, *linep), old, txt_get_span(text->lines.first, *linep), (unsigned short)*charp);
}
-void txt_move_eof (Text *text, short sel)
+void txt_move_eof(Text *text, short sel)
{
TextLine **linep;
int *charp, old;
@@ -1083,22 +1059,22 @@ void txt_move_eof (Text *text, short sel)
if (sel) txt_curs_sel(text, &linep, &charp);
else txt_curs_cur(text, &linep, &charp);
if (!*linep) return;
- old= *charp;
+ old = *charp;
- *linep= text->lines.last;
- *charp= (*linep)->len;
+ *linep = text->lines.last;
+ *charp = (*linep)->len;
if (!sel) txt_pop_sel(text);
- if (!undoing) txt_undo_add_toop(text, sel?UNDO_STO:UNDO_CTO, txt_get_span(text->lines.first, *linep), old, txt_get_span(text->lines.first, *linep), (unsigned short)*charp);
+ if (!undoing) txt_undo_add_toop(text, sel ? UNDO_STO : UNDO_CTO, txt_get_span(text->lines.first, *linep), old, txt_get_span(text->lines.first, *linep), (unsigned short)*charp);
}
-void txt_move_toline (Text *text, unsigned int line, short sel)
+void txt_move_toline(Text *text, unsigned int line, short sel)
{
txt_move_to(text, line, 0, sel);
}
/* Moves to a certain byte in a line, not a certain utf8-character! */
-void txt_move_to (Text *text, unsigned int line, unsigned int ch, short sel)
+void txt_move_to(Text *text, unsigned int line, unsigned int ch, short sel)
{
TextLine **linep, *oldl;
int *charp, oldc;
@@ -1108,71 +1084,71 @@ void txt_move_to (Text *text, unsigned int line, unsigned int ch, short sel)
if (sel) txt_curs_sel(text, &linep, &charp);
else txt_curs_cur(text, &linep, &charp);
if (!*linep) return;
- oldc= *charp;
- oldl= *linep;
+ oldc = *charp;
+ oldl = *linep;
- *linep= text->lines.first;
- for (i=0; i<line; i++) {
- if ((*linep)->next) *linep= (*linep)->next;
+ *linep = text->lines.first;
+ for (i = 0; i < line; i++) {
+ if ((*linep)->next) *linep = (*linep)->next;
else break;
}
- if (ch>(unsigned int)((*linep)->len))
- ch= (unsigned int)((*linep)->len);
- *charp= ch;
+ if (ch > (unsigned int)((*linep)->len))
+ ch = (unsigned int)((*linep)->len);
+ *charp = ch;
if (!sel) txt_pop_sel(text);
- if (!undoing) txt_undo_add_toop(text, sel?UNDO_STO:UNDO_CTO, txt_get_span(text->lines.first, oldl), oldc, txt_get_span(text->lines.first, *linep), (unsigned short)*charp);
+ if (!undoing) txt_undo_add_toop(text, sel ? UNDO_STO : UNDO_CTO, txt_get_span(text->lines.first, oldl), oldc, txt_get_span(text->lines.first, *linep), (unsigned short)*charp);
}
/****************************/
/* Text selection functions */
/****************************/
-static void txt_curs_swap (Text *text)
+static void txt_curs_swap(Text *text)
{
TextLine *tmpl;
int tmpc;
- tmpl= text->curl;
- text->curl= text->sell;
- text->sell= tmpl;
-
- tmpc= text->curc;
- text->curc= text->selc;
- text->selc= tmpc;
+ tmpl = text->curl;
+ text->curl = text->sell;
+ text->sell = tmpl;
+
+ tmpc = text->curc;
+ text->curc = text->selc;
+ text->selc = tmpc;
if (!undoing) txt_undo_add_op(text, UNDO_SWAP);
}
-static void txt_pop_first (Text *text)
+static void txt_pop_first(Text *text)
{
- if (txt_get_span(text->curl, text->sell)<0 ||
- (text->curl==text->sell && text->curc>text->selc)) {
+ if (txt_get_span(text->curl, text->sell) < 0 ||
+ (text->curl == text->sell && text->curc > text->selc)) {
txt_curs_swap(text);
}
if (!undoing) txt_undo_add_toop(text, UNDO_STO,
- txt_get_span(text->lines.first, text->sell),
- text->selc,
- txt_get_span(text->lines.first, text->curl),
- text->curc);
+ txt_get_span(text->lines.first, text->sell),
+ text->selc,
+ txt_get_span(text->lines.first, text->curl),
+ text->curc);
txt_pop_sel(text);
}
-static void txt_pop_last (Text *text)
+static void txt_pop_last(Text *text)
{
- if (txt_get_span(text->curl, text->sell)>0 ||
- (text->curl==text->sell && text->curc<text->selc)) {
+ if (txt_get_span(text->curl, text->sell) > 0 ||
+ (text->curl == text->sell && text->curc < text->selc)) {
txt_curs_swap(text);
}
if (!undoing) txt_undo_add_toop(text, UNDO_STO,
- txt_get_span(text->lines.first, text->sell),
- text->selc,
- txt_get_span(text->lines.first, text->curl),
- text->curc);
+ txt_get_span(text->lines.first, text->sell),
+ text->selc,
+ txt_get_span(text->lines.first, text->curl),
+ text->curc);
txt_pop_sel(text);
}
@@ -1180,10 +1156,10 @@ static void txt_pop_last (Text *text)
/* never used: CVS 1.19 */
/* static void txt_pop_selr (Text *text) */
-void txt_pop_sel (Text *text)
+void txt_pop_sel(Text *text)
{
- text->sell= text->curl;
- text->selc= text->curc;
+ text->sell = text->curl;
+ text->selc = text->curc;
}
void txt_order_cursors(Text *text)
@@ -1192,18 +1168,20 @@ void txt_order_cursors(Text *text)
if (!text->curl) return;
if (!text->sell) return;
- /* Flip so text->curl is before text->sell */
- if (txt_get_span(text->curl, text->sell)<0 ||
- (text->curl==text->sell && text->curc>text->selc))
+ /* Flip so text->curl is before text->sell */
+ if ((txt_get_span(text->curl, text->sell) < 0) ||
+ (text->curl == text->sell && text->curc > text->selc))
+ {
txt_curs_swap(text);
+ }
}
int txt_has_sel(Text *text)
{
- return ((text->curl!=text->sell) || (text->curc!=text->selc));
+ return ((text->curl != text->sell) || (text->curc != text->selc));
}
-static void txt_delete_sel (Text *text)
+static void txt_delete_sel(Text *text)
{
TextLine *tmpl;
TextMarker *mrk;
@@ -1219,79 +1197,79 @@ static void txt_delete_sel (Text *text)
txt_order_cursors(text);
if (!undoing) {
- buf= txt_sel_to_buf(text);
+ buf = txt_sel_to_buf(text);
txt_undo_add_block(text, UNDO_DBLOCK, buf);
MEM_freeN(buf);
}
- buf= MEM_mallocN(text->curc+(text->sell->len - text->selc)+1, "textline_string");
+ buf = MEM_mallocN(text->curc + (text->sell->len - text->selc) + 1, "textline_string");
if (text->curl != text->sell) {
txt_clear_marker_region(text, text->curl, text->curc, text->curl->len, 0, 0);
- move= txt_get_span(text->curl, text->sell);
+ move = txt_get_span(text->curl, text->sell);
}
else {
- mrk= txt_find_marker_region(text, text->curl, text->curc, text->selc, 0, 0);
+ mrk = txt_find_marker_region(text, text->curl, text->curc, text->selc, 0, 0);
if (mrk && (mrk->start > text->curc || mrk->end < text->selc))
txt_clear_marker_region(text, text->curl, text->curc, text->selc, 0, 0);
- move= 0;
+ move = 0;
}
- mrk= txt_find_marker_region(text, text->sell, text->selc-1, text->sell->len, 0, 0);
+ mrk = txt_find_marker_region(text, text->sell, text->selc - 1, text->sell->len, 0, 0);
if (mrk) {
- lineno= mrk->lineno;
+ lineno = mrk->lineno;
do {
mrk->lineno -= move;
if (mrk->start > text->curc) mrk->start -= text->selc - text->curc;
mrk->end -= text->selc - text->curc;
- mrk= mrk->next;
- } while (mrk && mrk->lineno==lineno);
+ mrk = mrk->next;
+ } while (mrk && mrk->lineno == lineno);
}
strncpy(buf, text->curl->line, text->curc);
- strcpy(buf+text->curc, text->sell->line + text->selc);
- buf[text->curc+(text->sell->len - text->selc)]=0;
+ strcpy(buf + text->curc, text->sell->line + text->selc);
+ buf[text->curc + (text->sell->len - text->selc)] = 0;
make_new_line(text->curl, buf);
- tmpl= text->sell;
+ tmpl = text->sell;
while (tmpl != text->curl) {
- tmpl= tmpl->prev;
+ tmpl = tmpl->prev;
if (!tmpl) break;
txt_delete_line(text, tmpl->next);
}
- text->sell= text->curl;
- text->selc= text->curc;
+ text->sell = text->curl;
+ text->selc = text->curc;
}
-void txt_sel_all (Text *text)
+void txt_sel_all(Text *text)
{
if (!text) return;
- text->curl= text->lines.first;
- text->curc= 0;
+ text->curl = text->lines.first;
+ text->curc = 0;
- text->sell= text->lines.last;
- text->selc= text->sell->len;
+ text->sell = text->lines.last;
+ text->selc = text->sell->len;
}
-void txt_sel_line (Text *text)
+void txt_sel_line(Text *text)
{
if (!text) return;
if (!text->curl) return;
- text->curc= 0;
- text->sell= text->curl;
- text->selc= text->sell->len;
+ text->curc = 0;
+ text->sell = text->curl;
+ text->selc = text->sell->len;
}
/***************************/
/* Cut and paste functions */
/***************************/
-char *txt_to_buf (Text *text)
+char *txt_to_buf(Text *text)
{
int length;
TextLine *tmp, *linef, *linel;
@@ -1303,53 +1281,53 @@ char *txt_to_buf (Text *text)
if (!text->sell) return NULL;
if (!text->lines.first) return NULL;
- linef= text->lines.first;
- charf= 0;
+ linef = text->lines.first;
+ charf = 0;
- linel= text->lines.last;
- charl= linel->len;
+ linel = text->lines.last;
+ charl = linel->len;
if (linef == text->lines.last) {
- length= charl-charf;
+ length = charl - charf;
- buf= MEM_mallocN(length+2, "text buffer");
+ buf = MEM_mallocN(length + 2, "text buffer");
- BLI_strncpy(buf, linef->line + charf, length+1);
- buf[length]=0;
+ BLI_strncpy(buf, linef->line + charf, length + 1);
+ buf[length] = 0;
}
else {
- length= linef->len - charf;
- length+= charl;
- length+= 2; /* For the 2 '\n' */
+ length = linef->len - charf;
+ length += charl;
+ length += 2; /* For the 2 '\n' */
- tmp= linef->next;
- while (tmp && tmp!= linel) {
- length+= tmp->len+1;
- tmp= tmp->next;
+ tmp = linef->next;
+ while (tmp && tmp != linel) {
+ length += tmp->len + 1;
+ tmp = tmp->next;
}
- buf= MEM_mallocN(length+1, "cut buffer");
+ buf = MEM_mallocN(length + 1, "cut buffer");
- strncpy(buf, linef->line + charf, linef->len-charf);
- length= linef->len - charf;
+ strncpy(buf, linef->line + charf, linef->len - charf);
+ length = linef->len - charf;
- buf[length++]='\n';
+ buf[length++] = '\n';
- tmp= linef->next;
- while (tmp && tmp!=linel) {
- strncpy(buf+length, tmp->line, tmp->len);
- length+= tmp->len;
+ tmp = linef->next;
+ while (tmp && tmp != linel) {
+ strncpy(buf + length, tmp->line, tmp->len);
+ length += tmp->len;
- buf[length++]='\n';
+ buf[length++] = '\n';
- tmp= tmp->next;
+ tmp = tmp->next;
}
- strncpy(buf+length, linel->line, charl);
- length+= charl;
+ strncpy(buf + length, linel->line, charl);
+ length += charl;
/* python compiler wants an empty end line */
- buf[length++]='\n';
- buf[length]=0;
+ buf[length++] = '\n';
+ buf[length] = 0;
}
return buf;
@@ -1358,34 +1336,34 @@ char *txt_to_buf (Text *text)
int txt_find_string(Text *text, const char *findstr, int wrap, int match_case)
{
TextLine *tl, *startl;
- char *s= NULL;
+ char *s = NULL;
if (!text || !text->curl || !text->sell) return 0;
txt_order_cursors(text);
- tl= startl= text->sell;
+ tl = startl = text->sell;
- if (match_case) s= strstr(&tl->line[text->selc], findstr);
- else s= BLI_strcasestr(&tl->line[text->selc], findstr);
+ if (match_case) s = strstr(&tl->line[text->selc], findstr);
+ else s = BLI_strcasestr(&tl->line[text->selc], findstr);
while (!s) {
- tl= tl->next;
+ tl = tl->next;
if (!tl) {
if (wrap)
- tl= text->lines.first;
+ tl = text->lines.first;
else
break;
}
- if (match_case) s= strstr(tl->line, findstr);
- else s= BLI_strcasestr(tl->line, findstr);
- if (tl==startl)
+ if (match_case) s = strstr(tl->line, findstr);
+ else s = BLI_strcasestr(tl->line, findstr);
+ if (tl == startl)
break;
}
if (s) {
- int newl= txt_get_span(text->lines.first, tl);
- int newc= (int)(s-tl->line);
+ int newl = txt_get_span(text->lines.first, tl);
+ int newc = (int)(s - tl->line);
txt_move_to(text, newl, newc, 0);
txt_move_to(text, newl, newc + strlen(findstr), 1);
return 1;
@@ -1394,10 +1372,10 @@ int txt_find_string(Text *text, const char *findstr, int wrap, int match_case)
return 0;
}
-char *txt_sel_to_buf (Text *text)
+char *txt_sel_to_buf(Text *text)
{
char *buf;
- int length=0;
+ int length = 0;
TextLine *tmp, *linef, *linel;
int charf, charl;
@@ -1405,71 +1383,71 @@ char *txt_sel_to_buf (Text *text)
if (!text->curl) return NULL;
if (!text->sell) return NULL;
- if (text->curl==text->sell) {
- linef= linel= text->curl;
+ if (text->curl == text->sell) {
+ linef = linel = text->curl;
if (text->curc < text->selc) {
- charf= text->curc;
- charl= text->selc;
+ charf = text->curc;
+ charl = text->selc;
}
else {
- charf= text->selc;
- charl= text->curc;
+ charf = text->selc;
+ charl = text->curc;
}
}
- else if (txt_get_span(text->curl, text->sell)<0) {
- linef= text->sell;
- linel= text->curl;
+ else if (txt_get_span(text->curl, text->sell) < 0) {
+ linef = text->sell;
+ linel = text->curl;
- charf= text->selc;
- charl= text->curc;
+ charf = text->selc;
+ charl = text->curc;
}
else {
- linef= text->curl;
- linel= text->sell;
+ linef = text->curl;
+ linel = text->sell;
- charf= text->curc;
- charl= text->selc;
+ charf = text->curc;
+ charl = text->selc;
}
if (linef == linel) {
- length= charl-charf;
+ length = charl - charf;
- buf= MEM_mallocN(length+1, "sel buffer");
+ buf = MEM_mallocN(length + 1, "sel buffer");
- BLI_strncpy(buf, linef->line + charf, length+1);
+ BLI_strncpy(buf, linef->line + charf, length + 1);
}
else {
- length+= linef->len - charf;
- length+= charl;
+ length += linef->len - charf;
+ length += charl;
length++; /* For the '\n' */
- tmp= linef->next;
- while (tmp && tmp!= linel) {
- length+= tmp->len+1;
- tmp= tmp->next;
+ tmp = linef->next;
+ while (tmp && tmp != linel) {
+ length += tmp->len + 1;
+ tmp = tmp->next;
}
- buf= MEM_mallocN(length+1, "sel buffer");
+ buf = MEM_mallocN(length + 1, "sel buffer");
- strncpy(buf, linef->line+ charf, linef->len-charf);
- length= linef->len-charf;
+ strncpy(buf, linef->line + charf, linef->len - charf);
+ length = linef->len - charf;
- buf[length++]='\n';
+ buf[length++] = '\n';
- tmp= linef->next;
- while (tmp && tmp!=linel) {
- strncpy(buf+length, tmp->line, tmp->len);
- length+= tmp->len;
+ tmp = linef->next;
+ while (tmp && tmp != linel) {
+ strncpy(buf + length, tmp->line, tmp->len);
+ length += tmp->len;
- buf[length++]='\n';
+ buf[length++] = '\n';
- tmp= tmp->next;
+ tmp = tmp->next;
}
- strncpy(buf+length, linel->line, charl);
- length+= charl;
+ strncpy(buf + length, linel->line, charl);
+ length += charl;
- buf[length]=0;
+ buf[length] = 0;
}
return buf;
@@ -1479,16 +1457,16 @@ static void txt_shift_markers(Text *text, int lineno, int count)
{
TextMarker *marker;
- for (marker=text->markers.first; marker; marker= marker->next)
- if (marker->lineno>=lineno) {
- marker->lineno+= count;
+ for (marker = text->markers.first; marker; marker = marker->next)
+ if (marker->lineno >= lineno) {
+ marker->lineno += count;
}
}
void txt_insert_buf(Text *text, const char *in_buffer)
{
- int l=0, u, len, lineno= -1, count= 0;
- size_t i=0, j;
+ int l = 0, u, len, lineno = -1, count = 0;
+ size_t i = 0, j;
TextLine *add;
char *buffer;
@@ -1497,35 +1475,35 @@ void txt_insert_buf(Text *text, const char *in_buffer)
txt_delete_sel(text);
- len= strlen(in_buffer);
- buffer= BLI_strdupn(in_buffer, len);
- len+= txt_extended_ascii_as_utf8(&buffer);
+ len = strlen(in_buffer);
+ buffer = BLI_strdupn(in_buffer, len);
+ len += txt_extended_ascii_as_utf8(&buffer);
if (!undoing) txt_undo_add_block(text, UNDO_IBLOCK, buffer);
- u= undoing;
- undoing= 1;
+ u = undoing;
+ undoing = 1;
/* Read the first line (or as close as possible */
- while (buffer[i] && buffer[i]!='\n')
+ while (buffer[i] && buffer[i] != '\n')
txt_add_raw_char(text, BLI_str_utf8_as_unicode_step(buffer, &i));
- if (buffer[i]=='\n') txt_split_curline(text);
+ if (buffer[i] == '\n') txt_split_curline(text);
else { undoing = u; MEM_freeN(buffer); return; }
i++;
/* Read as many full lines as we can */
- lineno= txt_get_span(text->lines.first, text->curl);
+ lineno = txt_get_span(text->lines.first, text->curl);
- while (i<len) {
- l=0;
+ while (i < len) {
+ l = 0;
- while (buffer[i] && buffer[i]!='\n') {
+ while (buffer[i] && buffer[i] != '\n') {
i++; l++;
}
- if (buffer[i]=='\n') {
- add= txt_new_linen(buffer +(i-l), l);
+ if (buffer[i] == '\n') {
+ add = txt_new_linen(buffer + (i - l), l);
BLI_insertlinkbefore(&text->lines, text->curl, add);
i++;
count++;
@@ -1533,10 +1511,10 @@ void txt_insert_buf(Text *text, const char *in_buffer)
else {
if (count) {
txt_shift_markers(text, lineno, count);
- count= 0;
+ count = 0;
}
- for (j= i-l; j<i && j<len; )
+ for (j = i - l; j < i && j < len; )
txt_add_raw_char(text, BLI_str_utf8_as_unicode_step(buffer, &j));
break;
}
@@ -1548,7 +1526,7 @@ void txt_insert_buf(Text *text, const char *in_buffer)
txt_shift_markers(text, lineno, count);
}
- undoing= u;
+ undoing = u;
}
/******************/
@@ -1557,18 +1535,18 @@ void txt_insert_buf(Text *text, const char *in_buffer)
static int max_undo_test(Text *text, int x)
{
- while (text->undo_pos+x >= text->undo_len) {
- if (text->undo_len*2 > TXT_MAX_UNDO) {
+ while (text->undo_pos + x >= text->undo_len) {
+ if (text->undo_len * 2 > TXT_MAX_UNDO) {
/* XXX error("Undo limit reached, buffer cleared\n"); */
MEM_freeN(text->undo_buf);
init_undo_text(text);
return 0;
}
else {
- void *tmp= text->undo_buf;
- text->undo_buf= MEM_callocN(text->undo_len*2, "undo buf");
+ void *tmp = text->undo_buf;
+ text->undo_buf = MEM_callocN(text->undo_len * 2, "undo buf");
memcpy(text->undo_buf, tmp, text->undo_len);
- text->undo_len*=2;
+ text->undo_len *= 2;
MEM_freeN(tmp);
}
}
@@ -1578,218 +1556,218 @@ static int max_undo_test(Text *text, int x)
static void dump_buffer(Text *text)
{
- int i= 0;
+ int i = 0;
- while (i++<text->undo_pos) printf("%d: %d %c\n", i, text->undo_buf[i], text->undo_buf[i]);
+ while (i++ < text->undo_pos) printf("%d: %d %c\n", i, text->undo_buf[i], text->undo_buf[i]);
}
void txt_print_undo(Text *text)
{
- int i= 0;
+ int i = 0;
int op;
const char *ops;
int linep, charp;
dump_buffer(text);
- printf ("---< Undo Buffer >---\n");
+ printf("---< Undo Buffer >---\n");
- printf ("UndoPosition is %d\n", text->undo_pos);
+ printf("UndoPosition is %d\n", text->undo_pos);
- while (i<=text->undo_pos) {
- op= text->undo_buf[i];
+ while (i <= text->undo_pos) {
+ op = text->undo_buf[i];
- if (op==UNDO_CLEFT) {
- ops= "Cursor left";
+ if (op == UNDO_CLEFT) {
+ ops = "Cursor left";
}
- else if (op==UNDO_CRIGHT) {
- ops= "Cursor right";
+ else if (op == UNDO_CRIGHT) {
+ ops = "Cursor right";
}
- else if (op==UNDO_CUP) {
- ops= "Cursor up";
+ else if (op == UNDO_CUP) {
+ ops = "Cursor up";
}
- else if (op==UNDO_CDOWN) {
- ops= "Cursor down";
+ else if (op == UNDO_CDOWN) {
+ ops = "Cursor down";
}
- else if (op==UNDO_SLEFT) {
- ops= "Selection left";
+ else if (op == UNDO_SLEFT) {
+ ops = "Selection left";
}
- else if (op==UNDO_SRIGHT) {
- ops= "Selection right";
+ else if (op == UNDO_SRIGHT) {
+ ops = "Selection right";
}
- else if (op==UNDO_SUP) {
- ops= "Selection up";
+ else if (op == UNDO_SUP) {
+ ops = "Selection up";
}
- else if (op==UNDO_SDOWN) {
- ops= "Selection down";
+ else if (op == UNDO_SDOWN) {
+ ops = "Selection down";
}
- else if (op==UNDO_STO) {
- ops= "Selection ";
+ else if (op == UNDO_STO) {
+ ops = "Selection ";
}
- else if (op==UNDO_CTO) {
- ops= "Cursor ";
+ else if (op == UNDO_CTO) {
+ ops = "Cursor ";
}
- else if (op==UNDO_INSERT_1) {
- ops= "Insert ascii ";
+ else if (op == UNDO_INSERT_1) {
+ ops = "Insert ascii ";
}
- else if (op==UNDO_INSERT_2) {
- ops= "Insert 2 bytes ";
+ else if (op == UNDO_INSERT_2) {
+ ops = "Insert 2 bytes ";
}
- else if (op==UNDO_INSERT_3) {
- ops= "Insert 3 bytes ";
+ else if (op == UNDO_INSERT_3) {
+ ops = "Insert 3 bytes ";
}
- else if (op==UNDO_INSERT_4) {
- ops= "Insert unicode ";
+ else if (op == UNDO_INSERT_4) {
+ ops = "Insert unicode ";
}
- else if (op==UNDO_BS_1) {
- ops= "Backspace for ascii ";
+ else if (op == UNDO_BS_1) {
+ ops = "Backspace for ascii ";
}
- else if (op==UNDO_BS_2) {
- ops= "Backspace for 2 bytes ";
+ else if (op == UNDO_BS_2) {
+ ops = "Backspace for 2 bytes ";
}
- else if (op==UNDO_BS_3) {
- ops= "Backspace for 3 bytes ";
+ else if (op == UNDO_BS_3) {
+ ops = "Backspace for 3 bytes ";
}
- else if (op==UNDO_BS_4) {
- ops= "Backspace for unicode ";
+ else if (op == UNDO_BS_4) {
+ ops = "Backspace for unicode ";
}
- else if (op==UNDO_DEL_1) {
- ops= "Delete ascii ";
+ else if (op == UNDO_DEL_1) {
+ ops = "Delete ascii ";
}
- else if (op==UNDO_DEL_2) {
- ops= "Delete 2 bytes ";
+ else if (op == UNDO_DEL_2) {
+ ops = "Delete 2 bytes ";
}
- else if (op==UNDO_DEL_3) {
- ops= "Delete 3 bytes ";
+ else if (op == UNDO_DEL_3) {
+ ops = "Delete 3 bytes ";
}
- else if (op==UNDO_DEL_4) {
- ops= "Delete unicode ";
+ else if (op == UNDO_DEL_4) {
+ ops = "Delete unicode ";
}
- else if (op==UNDO_SWAP) {
- ops= "Cursor swap";
+ else if (op == UNDO_SWAP) {
+ ops = "Cursor swap";
}
- else if (op==UNDO_DBLOCK) {
- ops= "Delete text block";
+ else if (op == UNDO_DBLOCK) {
+ ops = "Delete text block";
}
- else if (op==UNDO_IBLOCK) {
- ops= "Insert text block";
+ else if (op == UNDO_IBLOCK) {
+ ops = "Insert text block";
}
- else if (op==UNDO_INDENT) {
- ops= "Indent ";
+ else if (op == UNDO_INDENT) {
+ ops = "Indent ";
}
- else if (op==UNDO_UNINDENT) {
- ops= "Unindent ";
+ else if (op == UNDO_UNINDENT) {
+ ops = "Unindent ";
}
- else if (op==UNDO_COMMENT) {
- ops= "Comment ";
+ else if (op == UNDO_COMMENT) {
+ ops = "Comment ";
}
- else if (op==UNDO_UNCOMMENT) {
- ops= "Uncomment ";
+ else if (op == UNDO_UNCOMMENT) {
+ ops = "Uncomment ";
}
else {
- ops= "Unknown";
+ ops = "Unknown";
}
- printf ("Op (%o) at %d = %s", op, i, ops);
+ printf("Op (%o) at %d = %s", op, i, ops);
if (op >= UNDO_INSERT_1 && op <= UNDO_DEL_4) {
i++;
- printf (" - Char is ");
+ printf(" - Char is ");
switch (op) {
case UNDO_INSERT_1: case UNDO_BS_1: case UNDO_DEL_1:
- printf ("%c", text->undo_buf[i]);
+ printf("%c", text->undo_buf[i]);
i++;
break;
case UNDO_INSERT_2: case UNDO_BS_2: case UNDO_DEL_2:
- printf ("%c%c", text->undo_buf[i], text->undo_buf[i+1]);
- i+=2;
+ printf("%c%c", text->undo_buf[i], text->undo_buf[i + 1]);
+ i += 2;
break;
case UNDO_INSERT_3: case UNDO_BS_3: case UNDO_DEL_3:
- printf ("%c%c%c", text->undo_buf[i], text->undo_buf[i+1], text->undo_buf[i+2]);
- i+=3;
+ printf("%c%c%c", text->undo_buf[i], text->undo_buf[i + 1], text->undo_buf[i + 2]);
+ i += 3;
break;
case UNDO_INSERT_4: case UNDO_BS_4: case UNDO_DEL_4: {
unsigned int uc;
- char c[BLI_UTF8_MAX+1];
+ char c[BLI_UTF8_MAX + 1];
size_t c_len;
- uc= text->undo_buf[i]; i++;
- uc= uc+(text->undo_buf[i]<<8); i++;
- uc= uc+(text->undo_buf[i]<<16); i++;
- uc= uc+(text->undo_buf[i]<<24); i++;
- c_len= BLI_str_utf8_from_unicode(uc, c);
- c[c_len]= '\0';
+ uc = text->undo_buf[i]; i++;
+ uc = uc + (text->undo_buf[i] << 8); i++;
+ uc = uc + (text->undo_buf[i] << 16); i++;
+ uc = uc + (text->undo_buf[i] << 24); i++;
+ c_len = BLI_str_utf8_from_unicode(uc, c);
+ c[c_len] = '\0';
puts(c);
}
}
}
- else if (op==UNDO_STO || op==UNDO_CTO) {
+ else if (op == UNDO_STO || op == UNDO_CTO) {
i++;
- charp= text->undo_buf[i]; i++;
- charp= charp+(text->undo_buf[i]<<8); i++;
+ charp = text->undo_buf[i]; i++;
+ charp = charp + (text->undo_buf[i] << 8); i++;
- linep= text->undo_buf[i]; i++;
- linep= linep+(text->undo_buf[i]<<8); i++;
- linep= linep+(text->undo_buf[i]<<16); i++;
- linep= linep+(text->undo_buf[i]<<24); i++;
+ linep = text->undo_buf[i]; i++;
+ linep = linep + (text->undo_buf[i] << 8); i++;
+ linep = linep + (text->undo_buf[i] << 16); i++;
+ linep = linep + (text->undo_buf[i] << 24); i++;
- printf ("to <%d, %d> ", linep, charp);
+ printf("to <%d, %d> ", linep, charp);
- charp= text->undo_buf[i]; i++;
- charp= charp+(text->undo_buf[i]<<8); i++;
+ charp = text->undo_buf[i]; i++;
+ charp = charp + (text->undo_buf[i] << 8); i++;
- linep= text->undo_buf[i]; i++;
- linep= linep+(text->undo_buf[i]<<8); i++;
- linep= linep+(text->undo_buf[i]<<16); i++;
- linep= linep+(text->undo_buf[i]<<24); i++;
+ linep = text->undo_buf[i]; i++;
+ linep = linep + (text->undo_buf[i] << 8); i++;
+ linep = linep + (text->undo_buf[i] << 16); i++;
+ linep = linep + (text->undo_buf[i] << 24); i++;
- printf ("from <%d, %d>", linep, charp);
+ printf("from <%d, %d>", linep, charp);
}
- else if (op==UNDO_DBLOCK || op==UNDO_IBLOCK) {
+ else if (op == UNDO_DBLOCK || op == UNDO_IBLOCK) {
i++;
- linep= text->undo_buf[i]; i++;
- linep= linep+(text->undo_buf[i]<<8); i++;
- linep= linep+(text->undo_buf[i]<<16); i++;
- linep= linep+(text->undo_buf[i]<<24); i++;
+ linep = text->undo_buf[i]; i++;
+ linep = linep + (text->undo_buf[i] << 8); i++;
+ linep = linep + (text->undo_buf[i] << 16); i++;
+ linep = linep + (text->undo_buf[i] << 24); i++;
- printf (" (length %d) <", linep);
+ printf(" (length %d) <", linep);
- while (linep>0) {
+ while (linep > 0) {
putchar(text->undo_buf[i]);
linep--; i++;
}
- linep= text->undo_buf[i]; i++;
- linep= linep+(text->undo_buf[i]<<8); i++;
- linep= linep+(text->undo_buf[i]<<16); i++;
- linep= linep+(text->undo_buf[i]<<24); i++;
- printf ("> (%d)", linep);
+ linep = text->undo_buf[i]; i++;
+ linep = linep + (text->undo_buf[i] << 8); i++;
+ linep = linep + (text->undo_buf[i] << 16); i++;
+ linep = linep + (text->undo_buf[i] << 24); i++;
+ printf("> (%d)", linep);
}
- else if (op==UNDO_INDENT || op==UNDO_UNINDENT) {
+ else if (op == UNDO_INDENT || op == UNDO_UNINDENT) {
i++;
- charp= text->undo_buf[i]; i++;
- charp= charp+(text->undo_buf[i]<<8); i++;
+ charp = text->undo_buf[i]; i++;
+ charp = charp + (text->undo_buf[i] << 8); i++;
- linep= text->undo_buf[i]; i++;
- linep= linep+(text->undo_buf[i]<<8); i++;
- linep= linep+(text->undo_buf[i]<<16); i++;
- linep= linep+(text->undo_buf[i]<<24); i++;
+ linep = text->undo_buf[i]; i++;
+ linep = linep + (text->undo_buf[i] << 8); i++;
+ linep = linep + (text->undo_buf[i] << 16); i++;
+ linep = linep + (text->undo_buf[i] << 24); i++;
- printf ("to <%d, %d> ", linep, charp);
+ printf("to <%d, %d> ", linep, charp);
- charp= text->undo_buf[i]; i++;
- charp= charp+(text->undo_buf[i]<<8); i++;
+ charp = text->undo_buf[i]; i++;
+ charp = charp + (text->undo_buf[i] << 8); i++;
- linep= text->undo_buf[i]; i++;
- linep= linep+(text->undo_buf[i]<<8); i++;
- linep= linep+(text->undo_buf[i]<<16); i++;
- linep= linep+(text->undo_buf[i]<<24); i++;
+ linep = text->undo_buf[i]; i++;
+ linep = linep + (text->undo_buf[i] << 8); i++;
+ linep = linep + (text->undo_buf[i] << 16); i++;
+ linep = linep + (text->undo_buf[i] << 24); i++;
- printf ("from <%d, %d>", linep, charp);
+ printf("from <%d, %d>", linep, charp);
}
- printf (" %d\n", i);
+ printf(" %d\n", i);
i++;
}
}
@@ -1800,50 +1778,50 @@ static void txt_undo_add_op(Text *text, int op)
return;
text->undo_pos++;
- text->undo_buf[text->undo_pos]= op;
- text->undo_buf[text->undo_pos+1]= 0;
+ text->undo_buf[text->undo_pos] = op;
+ text->undo_buf[text->undo_pos + 1] = 0;
}
static void txt_undo_store_uint16(char *undo_buf, int *undo_pos, unsigned short value)
{
- undo_buf[*undo_pos]= (value)&0xff;
+ undo_buf[*undo_pos] = (value) & 0xff;
(*undo_pos)++;
- undo_buf[*undo_pos]= (value>>8)&0xff;
+ undo_buf[*undo_pos] = (value >> 8) & 0xff;
(*undo_pos)++;
}
static void txt_undo_store_uint32(char *undo_buf, int *undo_pos, unsigned int value)
{
- undo_buf[*undo_pos]= (value)&0xff;
+ undo_buf[*undo_pos] = (value) & 0xff;
(*undo_pos)++;
- undo_buf[*undo_pos]= (value>>8)&0xff;
+ undo_buf[*undo_pos] = (value >> 8) & 0xff;
(*undo_pos)++;
- undo_buf[*undo_pos]= (value>>16)&0xff;
+ undo_buf[*undo_pos] = (value >> 16) & 0xff;
(*undo_pos)++;
- undo_buf[*undo_pos]= (value>>24)&0xff;
+ undo_buf[*undo_pos] = (value >> 24) & 0xff;
(*undo_pos)++;
}
static void txt_undo_add_block(Text *text, int op, const char *buf)
{
- unsigned int length= strlen(buf);
+ unsigned int length = strlen(buf);
- if (!max_undo_test(text, length+11))
+ if (!max_undo_test(text, length + 11))
return;
text->undo_pos++;
- text->undo_buf[text->undo_pos]= op;
+ text->undo_buf[text->undo_pos] = op;
text->undo_pos++;
txt_undo_store_uint32(text->undo_buf, &text->undo_pos, length);
- strncpy(text->undo_buf+text->undo_pos, buf, length);
- text->undo_pos+=length;
+ strncpy(text->undo_buf + text->undo_pos, buf, length);
+ text->undo_pos += length;
txt_undo_store_uint32(text->undo_buf, &text->undo_pos, length);
- text->undo_buf[text->undo_pos]= op;
+ text->undo_buf[text->undo_pos] = op;
- text->undo_buf[text->undo_pos+1]= 0;
+ text->undo_buf[text->undo_pos + 1] = 0;
}
void txt_undo_add_toop(Text *text, int op, unsigned int froml, unsigned short fromc, unsigned int tol, unsigned short toc)
@@ -1851,10 +1829,10 @@ void txt_undo_add_toop(Text *text, int op, unsigned int froml, unsigned short fr
if (!max_undo_test(text, 15))
return;
- if (froml==tol && fromc==toc) return;
+ if (froml == tol && fromc == toc) return;
text->undo_pos++;
- text->undo_buf[text->undo_pos]= op;
+ text->undo_buf[text->undo_pos] = op;
text->undo_pos++;
@@ -1863,9 +1841,9 @@ void txt_undo_add_toop(Text *text, int op, unsigned int froml, unsigned short fr
txt_undo_store_uint16(text->undo_buf, &text->undo_pos, toc);
txt_undo_store_uint32(text->undo_buf, &text->undo_pos, tol);
- text->undo_buf[text->undo_pos]= op;
+ text->undo_buf[text->undo_pos] = op;
- text->undo_buf[text->undo_pos+1]= 0;
+ text->undo_buf[text->undo_pos + 1] = 0;
}
static void txt_undo_add_charop(Text *text, int op_start, unsigned int c)
@@ -1879,48 +1857,48 @@ static void txt_undo_add_charop(Text *text, int op_start, unsigned int c)
text->undo_pos++;
if (utf8_size < 4) {
- text->undo_buf[text->undo_pos]= op_start + utf8_size - 1;
+ text->undo_buf[text->undo_pos] = op_start + utf8_size - 1;
text->undo_pos++;
for (i = 0; i < utf8_size; i++) {
- text->undo_buf[text->undo_pos]= utf8[i];
+ text->undo_buf[text->undo_pos] = utf8[i];
text->undo_pos++;
}
- text->undo_buf[text->undo_pos]= op_start + utf8_size - 1;
+ text->undo_buf[text->undo_pos] = op_start + utf8_size - 1;
}
else {
- text->undo_buf[text->undo_pos]= op_start + 3;
+ text->undo_buf[text->undo_pos] = op_start + 3;
text->undo_pos++;
txt_undo_store_uint32(text->undo_buf, &text->undo_pos, c);
- text->undo_buf[text->undo_pos]= op_start + 3;
+ text->undo_buf[text->undo_pos] = op_start + 3;
}
- text->undo_buf[text->undo_pos+1]= 0;
+ text->undo_buf[text->undo_pos + 1] = 0;
}
static unsigned short txt_undo_read_uint16(const char *undo_buf, int *undo_pos)
{
unsigned short val;
- val= undo_buf[*undo_pos]; (*undo_pos)--;
- val= (val<<8)+undo_buf[*undo_pos]; (*undo_pos)--;
+ val = undo_buf[*undo_pos]; (*undo_pos)--;
+ val = (val << 8) + undo_buf[*undo_pos]; (*undo_pos)--;
return val;
}
static unsigned int txt_undo_read_uint32(const char *undo_buf, int *undo_pos)
{
unsigned int val;
- val= undo_buf[*undo_pos]; (*undo_pos)--;
- val= (val<<8)+undo_buf[*undo_pos]; (*undo_pos)--;
- val= (val<<8)+undo_buf[*undo_pos]; (*undo_pos)--;
- val= (val<<8)+undo_buf[*undo_pos]; (*undo_pos)--;
+ val = undo_buf[*undo_pos]; (*undo_pos)--;
+ val = (val << 8) + undo_buf[*undo_pos]; (*undo_pos)--;
+ val = (val << 8) + undo_buf[*undo_pos]; (*undo_pos)--;
+ val = (val << 8) + undo_buf[*undo_pos]; (*undo_pos)--;
return val;
}
static unsigned int txt_undo_read_unicode(const char *undo_buf, int *undo_pos, short bytes)
{
unsigned int unicode;
- char utf8[BLI_UTF8_MAX+1];
+ char utf8[BLI_UTF8_MAX + 1];
switch (bytes) {
case 1: /* ascii */
@@ -1930,21 +1908,21 @@ static unsigned int txt_undo_read_unicode(const char *undo_buf, int *undo_pos, s
utf8[2] = '\0';
utf8[1] = undo_buf[*undo_pos]; (*undo_pos)--;
utf8[0] = undo_buf[*undo_pos]; (*undo_pos)--;
- unicode= BLI_str_utf8_as_unicode(utf8);
+ unicode = BLI_str_utf8_as_unicode(utf8);
break;
case 3: /* 3-byte symbol */
utf8[3] = '\0';
utf8[2] = undo_buf[*undo_pos]; (*undo_pos)--;
utf8[1] = undo_buf[*undo_pos]; (*undo_pos)--;
utf8[0] = undo_buf[*undo_pos]; (*undo_pos)--;
- unicode= BLI_str_utf8_as_unicode(utf8);
+ unicode = BLI_str_utf8_as_unicode(utf8);
break;
case 4: /* 32-bit unicode symbol */
- unicode= txt_undo_read_uint32(undo_buf, undo_pos);
+ unicode = txt_undo_read_uint32(undo_buf, undo_pos);
default:
/* should never happen */
BLI_assert(0);
- unicode= 0;
+ unicode = 0;
}
return unicode;
@@ -1954,24 +1932,24 @@ static unsigned short txt_redo_read_uint16(const char *undo_buf, int *undo_pos)
{
unsigned short val;
val = undo_buf[*undo_pos]; (*undo_pos)++;
- val = val+(undo_buf[*undo_pos]<<8); (*undo_pos)++;
+ val = val + (undo_buf[*undo_pos] << 8); (*undo_pos)++;
return val;
}
static unsigned int txt_redo_read_uint32(const char *undo_buf, int *undo_pos)
{
unsigned int val;
- val= undo_buf[*undo_pos]; (*undo_pos)++;
- val= val+(undo_buf[*undo_pos]<<8); (*undo_pos)++;
- val= val+(undo_buf[*undo_pos]<<16); (*undo_pos)++;
- val= val+(undo_buf[*undo_pos]<<24); (*undo_pos)++;
+ val = undo_buf[*undo_pos]; (*undo_pos)++;
+ val = val + (undo_buf[*undo_pos] << 8); (*undo_pos)++;
+ val = val + (undo_buf[*undo_pos] << 16); (*undo_pos)++;
+ val = val + (undo_buf[*undo_pos] << 24); (*undo_pos)++;
return val;
}
static unsigned int txt_redo_read_unicode(const char *undo_buf, int *undo_pos, short bytes)
{
unsigned int unicode;
- char utf8[BLI_UTF8_MAX+1];
+ char utf8[BLI_UTF8_MAX + 1];
switch (bytes) {
case 1: /* ascii */
@@ -1981,21 +1959,21 @@ static unsigned int txt_redo_read_unicode(const char *undo_buf, int *undo_pos, s
utf8[0] = undo_buf[*undo_pos]; (*undo_pos)++;
utf8[1] = undo_buf[*undo_pos]; (*undo_pos)++;
utf8[2] = '\0';
- unicode= BLI_str_utf8_as_unicode(utf8);
+ unicode = BLI_str_utf8_as_unicode(utf8);
break;
case 3: /* 3-byte symbol */
utf8[0] = undo_buf[*undo_pos]; (*undo_pos)++;
utf8[1] = undo_buf[*undo_pos]; (*undo_pos)++;
utf8[2] = undo_buf[*undo_pos]; (*undo_pos)++;
utf8[3] = '\0';
- unicode= BLI_str_utf8_as_unicode(utf8);
+ unicode = BLI_str_utf8_as_unicode(utf8);
break;
case 4: /* 32-bit unicode symbol */
- unicode= txt_undo_read_uint32(undo_buf, undo_pos);
+ unicode = txt_undo_read_uint32(undo_buf, undo_pos);
default:
/* should never happen */
BLI_assert(0);
- unicode= 0;
+ unicode = 0;
}
return unicode;
@@ -2003,22 +1981,22 @@ static unsigned int txt_redo_read_unicode(const char *undo_buf, int *undo_pos, s
void txt_do_undo(Text *text)
{
- int op= text->undo_buf[text->undo_pos];
+ int op = text->undo_buf[text->undo_pos];
unsigned int linep, i;
unsigned short charp;
TextLine *holdl;
int holdc, holdln;
char *buf;
- if (text->undo_pos<0) {
+ if (text->undo_pos < 0) {
return;
}
text->undo_pos--;
- undoing= 1;
+ undoing = 1;
- switch(op) {
+ switch (op) {
case UNDO_CLEFT:
txt_move_right(text, 0);
break;
@@ -2061,17 +2039,17 @@ void txt_do_undo(Text *text)
text->undo_pos--;
text->undo_pos--;
- linep= txt_undo_read_uint32(text->undo_buf, &text->undo_pos);
- charp= txt_undo_read_uint16(text->undo_buf, &text->undo_pos);
+ linep = txt_undo_read_uint32(text->undo_buf, &text->undo_pos);
+ charp = txt_undo_read_uint16(text->undo_buf, &text->undo_pos);
- if (op==UNDO_CTO) {
+ if (op == UNDO_CTO) {
txt_move_toline(text, linep, 0);
- text->curc= charp;
+ text->curc = charp;
txt_pop_sel(text);
}
else {
txt_move_toline(text, linep, 1);
- text->selc= charp;
+ text->selc = charp;
}
text->undo_pos--;
@@ -2079,7 +2057,7 @@ void txt_do_undo(Text *text)
case UNDO_INSERT_1: case UNDO_INSERT_2: case UNDO_INSERT_3: case UNDO_INSERT_4:
txt_backspace_char(text);
- text->undo_pos-= op - UNDO_INSERT_1 + 1;
+ text->undo_pos -= op - UNDO_INSERT_1 + 1;
text->undo_pos--;
break;
@@ -2101,29 +2079,29 @@ void txt_do_undo(Text *text)
break;
case UNDO_DBLOCK:
- linep= txt_undo_read_uint32(text->undo_buf, &text->undo_pos);
+ linep = txt_undo_read_uint32(text->undo_buf, &text->undo_pos);
- buf= MEM_mallocN(linep+1, "dblock buffer");
- for (i=0; i < linep; i++) {
- buf[(linep-1)-i]= text->undo_buf[text->undo_pos];
+ buf = MEM_mallocN(linep + 1, "dblock buffer");
+ for (i = 0; i < linep; i++) {
+ buf[(linep - 1) - i] = text->undo_buf[text->undo_pos];
text->undo_pos--;
}
- buf[i]= 0;
+ buf[i] = 0;
txt_curs_first(text, &holdl, &holdc);
- holdln= txt_get_span(text->lines.first, holdl);
+ holdln = txt_get_span(text->lines.first, holdl);
txt_insert_buf(text, buf);
MEM_freeN(buf);
- text->curl= text->lines.first;
- while (holdln>0) {
+ text->curl = text->lines.first;
+ while (holdln > 0) {
if (text->curl->next)
- text->curl= text->curl->next;
+ text->curl = text->curl->next;
holdln--;
}
- text->curc= holdc;
+ text->curc = holdc;
text->undo_pos--;
text->undo_pos--;
@@ -2135,37 +2113,37 @@ void txt_do_undo(Text *text)
break;
case UNDO_IBLOCK:
- linep= txt_undo_read_uint32(text->undo_buf, &text->undo_pos);
+ linep = txt_undo_read_uint32(text->undo_buf, &text->undo_pos);
txt_delete_sel(text);
-
+
/* txt_backspace_char removes utf8-characters, not bytes */
- buf= MEM_mallocN(linep+1, "iblock buffer");
- for (i=0; i < linep; i++) {
- buf[(linep-1)-i]= text->undo_buf[text->undo_pos];
+ buf = MEM_mallocN(linep + 1, "iblock buffer");
+ for (i = 0; i < linep; i++) {
+ buf[(linep - 1) - i] = text->undo_buf[text->undo_pos];
text->undo_pos--;
}
- buf[i]= 0;
- linep= txt_utf8_len(buf);
+ buf[i] = 0;
+ linep = txt_utf8_len(buf);
MEM_freeN(buf);
-
- while (linep>0) {
+
+ while (linep > 0) {
txt_backspace_char(text);
linep--;
}
-
+
text->undo_pos--;
text->undo_pos--;
text->undo_pos--;
text->undo_pos--;
text->undo_pos--;
-
+
break;
case UNDO_INDENT:
case UNDO_UNINDENT:
case UNDO_COMMENT:
case UNDO_UNCOMMENT:
- linep= txt_undo_read_uint32(text->undo_buf, &text->undo_pos);
+ linep = txt_undo_read_uint32(text->undo_buf, &text->undo_pos);
//linep is now the end line of the selection
charp = txt_undo_read_uint16(text->undo_buf, &text->undo_pos);
@@ -2174,11 +2152,11 @@ void txt_do_undo(Text *text)
//set the selection for this now
text->selc = charp;
text->sell = text->lines.first;
- for (i= 0; i < linep; i++) {
+ for (i = 0; i < linep; i++) {
text->sell = text->sell->next;
}
-
- linep= txt_undo_read_uint32(text->undo_buf, &text->undo_pos);
+
+ linep = txt_undo_read_uint32(text->undo_buf, &text->undo_pos);
//first line to be selected
charp = txt_undo_read_uint16(text->undo_buf, &text->undo_pos);
@@ -2188,12 +2166,12 @@ void txt_do_undo(Text *text)
for (i = 0; i < linep; i++) {
text->curl = text->curl->next;
}
-
- if (op==UNDO_INDENT) {
+
+ if (op == UNDO_INDENT) {
txt_unindent(text);
}
- else if (op== UNDO_UNINDENT) {
+ else if (op == UNDO_UNINDENT) {
txt_indent(text);
}
else if (op == UNDO_COMMENT) {
@@ -2202,18 +2180,27 @@ void txt_do_undo(Text *text)
else if (op == UNDO_UNCOMMENT) {
txt_comment(text);
}
-
+
text->undo_pos--;
break;
+ case UNDO_DUPLICATE:
+ txt_delete_line(text, text->curl->next);
+ break;
+ case UNDO_MOVE_LINES_UP:
+ txt_move_lines(text, TXT_MOVE_LINE_DOWN);
+ break;
+ case UNDO_MOVE_LINES_DOWN:
+ txt_move_lines(text, TXT_MOVE_LINE_UP);
+ break;
default:
//XXX error("Undo buffer error - resetting");
- text->undo_pos= -1;
+ text->undo_pos = -1;
break;
}
/* next undo step may need evaluating */
- if (text->undo_pos>=0) {
+ if (text->undo_pos >= 0) {
switch (text->undo_buf[text->undo_pos]) {
case UNDO_STO:
txt_do_undo(text);
@@ -2225,7 +2212,7 @@ void txt_do_undo(Text *text)
}
}
- undoing= 0;
+ undoing = 0;
}
void txt_do_redo(Text *text)
@@ -2236,16 +2223,16 @@ void txt_do_redo(Text *text)
char *buf;
text->undo_pos++;
- op= text->undo_buf[text->undo_pos];
+ op = text->undo_buf[text->undo_pos];
if (!op) {
text->undo_pos--;
return;
}
- undoing= 1;
+ undoing = 1;
- switch(op) {
+ switch (op) {
case UNDO_CLEFT:
txt_move_left(text, 0);
break;
@@ -2287,13 +2274,13 @@ void txt_do_redo(Text *text)
case UNDO_BS_1: case UNDO_BS_2: case UNDO_BS_3: case UNDO_BS_4:
text->undo_pos++;
txt_backspace_char(text);
- text->undo_pos+= op - UNDO_BS_1 + 1;
+ text->undo_pos += op - UNDO_BS_1 + 1;
break;
case UNDO_DEL_1: case UNDO_DEL_2: case UNDO_DEL_3: case UNDO_DEL_4:
text->undo_pos++;
txt_delete_char(text);
- text->undo_pos+= op - UNDO_DEL_1 + 1;
+ text->undo_pos += op - UNDO_DEL_1 + 1;
break;
case UNDO_SWAP:
@@ -2313,27 +2300,27 @@ void txt_do_redo(Text *text)
text->undo_pos++;
- charp= txt_redo_read_uint16(text->undo_buf, &text->undo_pos);
- linep= txt_redo_read_uint32(text->undo_buf, &text->undo_pos);
+ charp = txt_redo_read_uint16(text->undo_buf, &text->undo_pos);
+ linep = txt_redo_read_uint32(text->undo_buf, &text->undo_pos);
- if (op==UNDO_CTO) {
+ if (op == UNDO_CTO) {
txt_move_toline(text, linep, 0);
- text->curc= charp;
+ text->curc = charp;
txt_pop_sel(text);
}
else {
txt_move_toline(text, linep, 1);
- text->selc= charp;
+ text->selc = charp;
}
break;
case UNDO_DBLOCK:
text->undo_pos++;
- linep= txt_redo_read_uint32(text->undo_buf, &text->undo_pos);
+ linep = txt_redo_read_uint32(text->undo_buf, &text->undo_pos);
txt_delete_sel(text);
- text->undo_pos+=linep;
+ text->undo_pos += linep;
text->undo_pos++;
text->undo_pos++;
@@ -2344,12 +2331,12 @@ void txt_do_redo(Text *text)
case UNDO_IBLOCK:
text->undo_pos++;
- linep= txt_redo_read_uint32(text->undo_buf, &text->undo_pos);
+ linep = txt_redo_read_uint32(text->undo_buf, &text->undo_pos);
- buf= MEM_mallocN(linep+1, "iblock buffer");
- memcpy (buf, &text->undo_buf[text->undo_pos], linep);
- text->undo_pos+= linep;
- buf[linep]= 0;
+ buf = MEM_mallocN(linep + 1, "iblock buffer");
+ memcpy(buf, &text->undo_buf[text->undo_pos], linep);
+ text->undo_pos += linep;
+ buf[linep] = 0;
txt_insert_buf(text, buf);
MEM_freeN(buf);
@@ -2368,19 +2355,19 @@ void txt_do_redo(Text *text)
charp = txt_redo_read_uint16(text->undo_buf, &text->undo_pos);
//charp is the first char selected or 0
- linep= txt_redo_read_uint32(text->undo_buf, &text->undo_pos);
+ linep = txt_redo_read_uint32(text->undo_buf, &text->undo_pos);
//linep is now the first line of the selection
//set the selcetion for this now
text->curc = charp;
text->curl = text->lines.first;
- for (i= 0; i < linep; i++) {
+ for (i = 0; i < linep; i++) {
text->curl = text->curl->next;
}
charp = txt_redo_read_uint16(text->undo_buf, &text->undo_pos);
//last postion to be selected
- linep= txt_redo_read_uint32(text->undo_buf, &text->undo_pos);
+ linep = txt_redo_read_uint32(text->undo_buf, &text->undo_pos);
//Last line to be selected
text->selc = charp;
@@ -2389,10 +2376,10 @@ void txt_do_redo(Text *text)
text->sell = text->sell->next;
}
- if (op==UNDO_INDENT) {
+ if (op == UNDO_INDENT) {
txt_indent(text);
}
- else if (op== UNDO_UNINDENT) {
+ else if (op == UNDO_UNINDENT) {
txt_unindent(text);
}
else if (op == UNDO_COMMENT) {
@@ -2402,26 +2389,35 @@ void txt_do_redo(Text *text)
txt_uncomment(text);
}
break;
+ case UNDO_DUPLICATE:
+ txt_duplicate_line(text);
+ break;
+ case UNDO_MOVE_LINES_UP:
+ txt_move_lines(text, TXT_MOVE_LINE_UP);
+ break;
+ case UNDO_MOVE_LINES_DOWN:
+ txt_move_lines(text, TXT_MOVE_LINE_DOWN);
+ break;
default:
//XXX error("Undo buffer error - resetting");
- text->undo_pos= -1;
-
+ text->undo_pos = -1;
+
break;
}
- undoing= 0;
+ undoing = 0;
}
/**************************/
/* Line editing functions */
/**************************/
-void txt_split_curline (Text *text)
+void txt_split_curline(Text *text)
{
TextLine *ins;
TextMarker *mrk;
char *left, *right;
- int lineno= -1;
+ int lineno = -1;
if (!text) return;
if (!text->curl) return;
@@ -2430,10 +2426,10 @@ void txt_split_curline (Text *text)
/* Move markers */
- lineno= txt_get_span(text->lines.first, text->curl);
- mrk= text->markers.first;
+ lineno = txt_get_span(text->lines.first, text->curl);
+ mrk = text->markers.first;
while (mrk) {
- if (mrk->lineno==lineno && mrk->start>text->curc) {
+ if (mrk->lineno == lineno && mrk->start > text->curc) {
mrk->lineno++;
mrk->start -= text->curc;
mrk->end -= text->curc;
@@ -2441,35 +2437,35 @@ void txt_split_curline (Text *text)
else if (mrk->lineno > lineno) {
mrk->lineno++;
}
- mrk= mrk->next;
+ mrk = mrk->next;
}
/* Make the two half strings */
- left= MEM_mallocN(text->curc+1, "textline_string");
+ left = MEM_mallocN(text->curc + 1, "textline_string");
if (text->curc) memcpy(left, text->curl->line, text->curc);
- left[text->curc]=0;
+ left[text->curc] = 0;
- right= MEM_mallocN(text->curl->len - text->curc+1, "textline_string");
- memcpy(right, text->curl->line+text->curc, text->curl->len-text->curc+1);
+ right = MEM_mallocN(text->curl->len - text->curc + 1, "textline_string");
+ memcpy(right, text->curl->line + text->curc, text->curl->len - text->curc + 1);
MEM_freeN(text->curl->line);
if (text->curl->format) MEM_freeN(text->curl->format);
/* Make the new TextLine */
- ins= MEM_mallocN(sizeof(TextLine), "textline");
- ins->line= left;
- ins->format= NULL;
- ins->len= text->curc;
-
- text->curl->line= right;
- text->curl->format= NULL;
- text->curl->len= text->curl->len - text->curc;
+ ins = MEM_mallocN(sizeof(TextLine), "textline");
+ ins->line = left;
+ ins->format = NULL;
+ ins->len = text->curc;
+
+ text->curl->line = right;
+ text->curl->format = NULL;
+ text->curl->len = text->curl->len - text->curc;
BLI_insertlinkbefore(&text->lines, text->curl, ins);
- text->curc=0;
+ text->curc = 0;
txt_make_dirty(text);
txt_clean_text(text);
@@ -2478,26 +2474,26 @@ void txt_split_curline (Text *text)
if (!undoing) txt_undo_add_charop(text, UNDO_INSERT_1, '\n');
}
-static void txt_delete_line (Text *text, TextLine *line)
+static void txt_delete_line(Text *text, TextLine *line)
{
- TextMarker *mrk=NULL, *nxt;
- int lineno= -1;
+ TextMarker *mrk = NULL, *nxt;
+ int lineno = -1;
if (!text) return;
if (!text->curl) return;
- lineno= txt_get_span(text->lines.first, line);
- mrk= text->markers.first;
+ lineno = txt_get_span(text->lines.first, line);
+ mrk = text->markers.first;
while (mrk) {
- nxt= mrk->next;
- if (mrk->lineno==lineno)
+ nxt = mrk->next;
+ if (mrk->lineno == lineno)
BLI_freelinkN(&text->markers, mrk);
else if (mrk->lineno > lineno)
mrk->lineno--;
- mrk= nxt;
+ mrk = nxt;
}
- BLI_remlink (&text->lines, line);
+ BLI_remlink(&text->lines, line);
if (line->line) MEM_freeN(line->line);
if (line->format) MEM_freeN(line->format);
@@ -2508,29 +2504,29 @@ static void txt_delete_line (Text *text, TextLine *line)
txt_clean_text(text);
}
-static void txt_combine_lines (Text *text, TextLine *linea, TextLine *lineb)
+static void txt_combine_lines(Text *text, TextLine *linea, TextLine *lineb)
{
char *tmp;
- TextMarker *mrk= NULL;
- int lineno=-1;
+ TextMarker *mrk = NULL;
+ int lineno = -1;
if (!text) return;
if (!linea || !lineb) return;
- mrk= txt_find_marker_region(text, lineb, 0, lineb->len, 0, 0);
+ mrk = txt_find_marker_region(text, lineb, 0, lineb->len, 0, 0);
if (mrk) {
- lineno= mrk->lineno;
+ lineno = mrk->lineno;
do {
mrk->lineno--;
mrk->start += linea->len;
mrk->end += linea->len;
- mrk= mrk->next;
- } while (mrk && mrk->lineno==lineno);
+ mrk = mrk->next;
+ } while (mrk && mrk->lineno == lineno);
}
- if (lineno==-1) lineno= txt_get_span(text->lines.first, lineb);
+ if (lineno == -1) lineno = txt_get_span(text->lines.first, lineb);
- tmp= MEM_mallocN(linea->len+lineb->len+1, "textline_string");
+ tmp = MEM_mallocN(linea->len + lineb->len + 1, "textline_string");
strcpy(tmp, linea->line);
strcat(tmp, lineb->line);
@@ -2543,9 +2539,26 @@ static void txt_combine_lines (Text *text, TextLine *linea, TextLine *lineb)
txt_clean_text(text);
}
+void txt_duplicate_line(Text *text)
+{
+ TextLine *textline;
+
+ if (!text || !text->curl) return;
+
+ if (text->curl == text->sell) {
+ textline = txt_new_line(text->curl->line);
+ BLI_insertlinkafter(&text->lines, text->curl, textline);
+
+ txt_make_dirty(text);
+ txt_clean_text(text);
+
+ if (!undoing) txt_undo_add_op(text, UNDO_DUPLICATE);
+ }
+}
+
void txt_delete_char(Text *text)
{
- unsigned int c='\n';
+ unsigned int c = '\n';
if (!text) return;
if (!text->curl) return;
@@ -2555,7 +2568,7 @@ void txt_delete_char(Text *text)
txt_make_dirty(text);
return;
}
- else if (text->curc== text->curl->len) { /* Appending two lines */
+ else if (text->curc == text->curl->len) { /* Appending two lines */
if (text->curl->next) {
txt_combine_lines(text, text->curl, text->curl->next);
txt_pop_sel(text);
@@ -2566,12 +2579,12 @@ void txt_delete_char(Text *text)
else { /* Just deleting a char */
size_t c_len = 0;
TextMarker *mrk;
- c= BLI_str_utf8_as_unicode_and_size(text->curl->line + text->curc, &c_len);
+ c = BLI_str_utf8_as_unicode_and_size(text->curl->line + text->curc, &c_len);
- mrk= txt_find_marker_region(text, text->curl, text->curc - c_len, text->curl->len, 0, 0);
+ mrk = txt_find_marker_region(text, text->curl, text->curc - c_len, text->curl->len, 0, 0);
if (mrk) {
- int lineno= mrk->lineno;
- if (mrk->end==text->curc) {
+ int lineno = mrk->lineno;
+ if (mrk->end == text->curc) {
if ((mrk->flags & TMARK_TEMP) && !(mrk->flags & TMARK_EDITALL)) {
txt_clear_markers(text, mrk->group, TMARK_TEMP);
}
@@ -2581,15 +2594,15 @@ void txt_delete_char(Text *text)
return;
}
do {
- if (mrk->start>text->curc) mrk->start-= c_len;
- mrk->end-= c_len;
- mrk= mrk->next;
- } while (mrk && mrk->lineno==lineno);
+ if (mrk->start > text->curc) mrk->start -= c_len;
+ mrk->end -= c_len;
+ mrk = mrk->next;
+ } while (mrk && mrk->lineno == lineno);
}
- memmove(text->curl->line+text->curc, text->curl->line+text->curc+c_len, text->curl->len-text->curc-c_len+1);
+ memmove(text->curl->line + text->curc, text->curl->line + text->curc + c_len, text->curl->len - text->curc - c_len + 1);
- text->curl->len-= c_len;
+ text->curl->len -= c_len;
txt_pop_sel(text);
}
@@ -2600,15 +2613,15 @@ void txt_delete_char(Text *text)
if (!undoing) txt_undo_add_charop(text, UNDO_DEL_1, c);
}
-void txt_delete_word (Text *text)
+void txt_delete_word(Text *text)
{
txt_jump_right(text, 1);
txt_delete_sel(text);
}
-void txt_backspace_char (Text *text)
+void txt_backspace_char(Text *text)
{
- unsigned int c='\n';
+ unsigned int c = '\n';
if (!text) return;
if (!text->curl) return;
@@ -2618,11 +2631,11 @@ void txt_backspace_char (Text *text)
txt_make_dirty(text);
return;
}
- else if (text->curc==0) { /* Appending two lines */
+ else if (text->curc == 0) { /* Appending two lines */
if (!text->curl->prev) return;
- text->curl= text->curl->prev;
- text->curc= text->curl->len;
+ text->curl = text->curl->prev;
+ text->curc = text->curl->len;
txt_combine_lines(text, text->curl, text->curl->next);
txt_pop_sel(text);
@@ -2631,12 +2644,12 @@ void txt_backspace_char (Text *text)
size_t c_len = 0;
TextMarker *mrk;
char *prev = BLI_str_prev_char_utf8(text->curl->line + text->curc);
- c= BLI_str_utf8_as_unicode_and_size(prev, &c_len);
+ c = BLI_str_utf8_as_unicode_and_size(prev, &c_len);
- mrk= txt_find_marker_region(text, text->curl, text->curc - c_len, text->curl->len, 0, 0);
+ mrk = txt_find_marker_region(text, text->curl, text->curc - c_len, text->curl->len, 0, 0);
if (mrk) {
- int lineno= mrk->lineno;
- if (mrk->start==text->curc) {
+ int lineno = mrk->lineno;
+ if (mrk->start == text->curc) {
if ((mrk->flags & TMARK_TEMP) && !(mrk->flags & TMARK_EDITALL)) {
txt_clear_markers(text, mrk->group, TMARK_TEMP);
}
@@ -2646,16 +2659,19 @@ void txt_backspace_char (Text *text)
return;
}
do {
- if (mrk->start>text->curc - c_len) mrk->start-= c_len;
- mrk->end-= c_len;
- mrk= mrk->next;
- } while (mrk && mrk->lineno==lineno);
+ if (mrk->start > text->curc - c_len) mrk->start -= c_len;
+ mrk->end -= c_len;
+ mrk = mrk->next;
+ } while (mrk && mrk->lineno == lineno);
}
- memcpy(text->curl->line + text->curc - c_len, text->curl->line + text->curc, text->curl->len-text->curc+1);
+ /* source and destination overlap, don't use memcpy() */
+ memmove(text->curl->line + text->curc - c_len,
+ text->curl->line + text->curc,
+ text->curl->len - text->curc + 1);
- text->curl->len-= c_len;
- text->curc-= c_len;
+ text->curl->len -= c_len;
+ text->curc -= c_len;
txt_pop_sel(text);
}
@@ -2666,7 +2682,7 @@ void txt_backspace_char (Text *text)
if (!undoing) txt_undo_add_charop(text, UNDO_BS_1, c);
}
-void txt_backspace_word (Text *text)
+void txt_backspace_word(Text *text)
{
txt_jump_left(text, 1);
txt_delete_sel(text);
@@ -2677,7 +2693,7 @@ void txt_backspace_word (Text *text)
* Remember to change this string according to max tab size */
static char tab_to_spaces[] = " ";
-static void txt_convert_tab_to_spaces (Text *text)
+static void txt_convert_tab_to_spaces(Text *text)
{
/* sb aims to pad adjust the tab-width needed so that the right number of spaces
* is added so that the indention of the line is the right width (i.e. aligned
@@ -2687,7 +2703,7 @@ static void txt_convert_tab_to_spaces (Text *text)
txt_insert_buf(text, sb);
}
-static int txt_add_char_intern (Text *text, unsigned int add, int replace_tabs)
+static int txt_add_char_intern(Text *text, unsigned int add, int replace_tabs)
{
int lineno;
char *tmp, ch[BLI_UTF8_MAX];
@@ -2697,7 +2713,7 @@ static int txt_add_char_intern (Text *text, unsigned int add, int replace_tabs)
if (!text) return 0;
if (!text->curl) return 0;
- if (add=='\n') {
+ if (add == '\n') {
txt_split_curline(text);
return 1;
}
@@ -2711,25 +2727,25 @@ static int txt_add_char_intern (Text *text, unsigned int add, int replace_tabs)
txt_delete_sel(text);
add_len = BLI_str_utf8_from_unicode(add, ch);
- mrk= txt_find_marker_region(text, text->curl, text->curc-1, text->curl->len, 0, 0);
+ mrk = txt_find_marker_region(text, text->curl, text->curc - 1, text->curl->len, 0, 0);
if (mrk) {
- lineno= mrk->lineno;
+ lineno = mrk->lineno;
do {
- if (mrk->start>text->curc) mrk->start+= add_len;
- mrk->end+= add_len;
- mrk= mrk->next;
- } while (mrk && mrk->lineno==lineno);
+ if (mrk->start > text->curc) mrk->start += add_len;
+ mrk->end += add_len;
+ mrk = mrk->next;
+ } while (mrk && mrk->lineno == lineno);
}
- tmp= MEM_mallocN(text->curl->len+add_len+1, "textline_string");
+ tmp = MEM_mallocN(text->curl->len + add_len + 1, "textline_string");
memcpy(tmp, text->curl->line, text->curc);
- memcpy(tmp+text->curc, ch, add_len);
- memcpy(tmp+text->curc+add_len, text->curl->line+text->curc, text->curl->len-text->curc+1);
+ memcpy(tmp + text->curc, ch, add_len);
+ memcpy(tmp + text->curc + add_len, text->curl->line + text->curc, text->curl->len - text->curc + 1);
make_new_line(text->curl, tmp);
- text->curc+= add_len;
+ text->curc += add_len;
txt_pop_sel(text);
@@ -2740,12 +2756,12 @@ static int txt_add_char_intern (Text *text, unsigned int add, int replace_tabs)
return 1;
}
-int txt_add_char (Text *text, unsigned int add)
+int txt_add_char(Text *text, unsigned int add)
{
return txt_add_char_intern(text, add, text->flags & TXT_TABSTOSPACES);
}
-int txt_add_raw_char (Text *text, unsigned int add)
+int txt_add_raw_char(Text *text, unsigned int add)
{
return txt_add_char_intern(text, add, 0);
}
@@ -2756,7 +2772,7 @@ void txt_delete_selected(Text *text)
txt_make_dirty(text);
}
-int txt_replace_char (Text *text, unsigned int add)
+int txt_replace_char(Text *text, unsigned int add)
{
unsigned int del;
size_t del_size = 0, add_size;
@@ -2766,30 +2782,30 @@ int txt_replace_char (Text *text, unsigned int add)
if (!text->curl) return 0;
/* If text is selected or we're at the end of the line just use txt_add_char */
- if (text->curc==text->curl->len || txt_has_sel(text) || add=='\n') {
- int i= txt_add_char(text, add);
- TextMarker *mrk= txt_find_marker(text, text->curl, text->curc, 0, 0);
+ if (text->curc == text->curl->len || txt_has_sel(text) || add == '\n') {
+ int i = txt_add_char(text, add);
+ TextMarker *mrk = txt_find_marker(text, text->curl, text->curc, 0, 0);
if (mrk) BLI_freelinkN(&text->markers, mrk);
return i;
}
- del= BLI_str_utf8_as_unicode_and_size(text->curl->line + text->curc, &del_size);
- add_size= BLI_str_utf8_from_unicode(add, ch);
+ del = BLI_str_utf8_as_unicode_and_size(text->curl->line + text->curc, &del_size);
+ add_size = BLI_str_utf8_from_unicode(add, ch);
if (add_size > del_size) {
- char *tmp= MEM_mallocN(text->curl->len+add_size-del_size+1, "textline_string");
+ char *tmp = MEM_mallocN(text->curl->len + add_size - del_size + 1, "textline_string");
memcpy(tmp, text->curl->line, text->curc);
- memcpy(tmp+text->curc+add_size, text->curl->line+text->curc+del_size, text->curl->len-text->curc-del_size+1);
+ memcpy(tmp + text->curc + add_size, text->curl->line + text->curc + del_size, text->curl->len - text->curc - del_size + 1);
MEM_freeN(text->curl->line);
text->curl->line = tmp;
}
else if (add_size < del_size) {
- char *tmp= text->curl->line;
- memmove(tmp+text->curc+add_size, tmp+text->curc+del_size, text->curl->len-text->curc-del_size+1);
+ char *tmp = text->curl->line;
+ memmove(tmp + text->curc + add_size, tmp + text->curc + del_size, text->curl->len - text->curc - del_size + 1);
}
memcpy(text->curl->line + text->curc, ch, add_size);
- text->curc+= add_size;
+ text->curc += add_size;
txt_pop_sel(text);
txt_make_dirty(text);
@@ -2829,27 +2845,25 @@ void txt_indent(Text *text)
}
num = 0;
- while (TRUE)
- {
- tmp= MEM_mallocN(text->curl->len+indentlen+1, "textline_string");
+ while (TRUE) {
+ tmp = MEM_mallocN(text->curl->len + indentlen + 1, "textline_string");
text->curc = 0;
- if (text->curc) memcpy(tmp, text->curl->line, text->curc); /* XXX never true, check prev line */
- memcpy(tmp+text->curc, add, indentlen);
+ if (text->curc) memcpy(tmp, text->curl->line, text->curc); /* XXX never true, check prev line */
+ memcpy(tmp + text->curc, add, indentlen);
- len= text->curl->len - text->curc;
- if (len>0) memcpy(tmp+text->curc+indentlen, text->curl->line+text->curc, len);
- tmp[text->curl->len+indentlen]= 0;
+ len = text->curl->len - text->curc;
+ if (len > 0) memcpy(tmp + text->curc + indentlen, text->curl->line + text->curc, len);
+ tmp[text->curl->len + indentlen] = 0;
make_new_line(text->curl, tmp);
- text->curc+= indentlen;
+ text->curc += indentlen;
txt_make_dirty(text);
txt_clean_text(text);
- if (text->curl == text->sell)
- {
+ if (text->curl == text->sell) {
text->selc = text->sell->len;
break;
}
@@ -2859,14 +2873,12 @@ void txt_indent(Text *text)
}
}
text->curc = 0;
- while ( num > 0 )
- {
+ while (num > 0) {
text->curl = text->curl->prev;
num--;
}
- if (!undoing)
- {
+ if (!undoing) {
txt_undo_add_toop(text, UNDO_INDENT, txt_get_span(text->lines.first, text->curl), text->curc, txt_get_span(text->lines.first, text->sell), text->selc);
}
}
@@ -2890,24 +2902,21 @@ void txt_unindent(Text *text)
indent = spaceslen;
}
- while (TRUE)
- {
+ while (TRUE) {
int i = 0;
- if (BLI_strncasecmp(text->curl->line, remove, indent) == 0)
- {
- while (i< text->curl->len) {
- text->curl->line[i]= text->curl->line[i+indent];
+ if (BLI_strncasecmp(text->curl->line, remove, indent) == 0) {
+ while (i < text->curl->len) {
+ text->curl->line[i] = text->curl->line[i + indent];
i++;
}
- text->curl->len-= indent;
+ text->curl->len -= indent;
}
txt_make_dirty(text);
txt_clean_text(text);
- if (text->curl == text->sell)
- {
+ if (text->curl == text->sell) {
text->selc = text->sell->len;
break;
}
@@ -2918,14 +2927,12 @@ void txt_unindent(Text *text)
}
text->curc = 0;
- while ( num > 0 )
- {
+ while (num > 0) {
text->curl = text->curl->prev;
num--;
}
- if (!undoing)
- {
+ if (!undoing) {
txt_undo_add_toop(text, UNDO_UNINDENT, txt_get_span(text->lines.first, text->curl), text->curc, txt_get_span(text->lines.first, text->sell), text->selc);
}
}
@@ -2938,20 +2945,19 @@ void txt_comment(Text *text)
if (!text) return;
if (!text->curl) return;
- if (!text->sell) return;// Need to change this need to check if only one line is selected to more then one
+ if (!text->sell) return; // Need to change this need to check if only one line is selected to more then one
num = 0;
- while (TRUE)
- {
- tmp= MEM_mallocN(text->curl->len+2, "textline_string");
+ while (TRUE) {
+ tmp = MEM_mallocN(text->curl->len + 2, "textline_string");
text->curc = 0;
if (text->curc) memcpy(tmp, text->curl->line, text->curc);
- tmp[text->curc]= add;
+ tmp[text->curc] = add;
- len= text->curl->len - text->curc;
- if (len>0) memcpy(tmp+text->curc+1, text->curl->line+text->curc, len);
- tmp[text->curl->len+1]=0;
+ len = text->curl->len - text->curc;
+ if (len > 0) memcpy(tmp + text->curc + 1, text->curl->line + text->curc, len);
+ tmp[text->curl->len + 1] = 0;
make_new_line(text->curl, tmp);
@@ -2960,8 +2966,7 @@ void txt_comment(Text *text)
txt_make_dirty(text);
txt_clean_text(text);
- if (text->curl == text->sell)
- {
+ if (text->curl == text->sell) {
text->selc = text->sell->len;
break;
}
@@ -2971,14 +2976,12 @@ void txt_comment(Text *text)
}
}
text->curc = 0;
- while ( num > 0 )
- {
+ while (num > 0) {
text->curl = text->curl->prev;
num--;
}
- if (!undoing)
- {
+ if (!undoing) {
txt_undo_add_toop(text, UNDO_COMMENT, txt_get_span(text->lines.first, text->curl), text->curc, txt_get_span(text->lines.first, text->sell), text->selc);
}
}
@@ -2992,14 +2995,12 @@ void txt_uncomment(Text *text)
if (!text->curl) return;
if (!text->sell) return;
- while (TRUE)
- {
+ while (TRUE) {
int i = 0;
- if (text->curl->line[i] == remove)
- {
- while (i< text->curl->len) {
- text->curl->line[i]= text->curl->line[i+1];
+ if (text->curl->line[i] == remove) {
+ while (i < text->curl->len) {
+ text->curl->line[i] = text->curl->line[i + 1];
i++;
}
text->curl->len--;
@@ -3009,8 +3010,7 @@ void txt_uncomment(Text *text)
txt_make_dirty(text);
txt_clean_text(text);
- if (text->curl == text->sell)
- {
+ if (text->curl == text->sell) {
text->selc = text->sell->len;
break;
}
@@ -3021,58 +3021,107 @@ void txt_uncomment(Text *text)
}
text->curc = 0;
- while ( num > 0 )
- {
+ while (num > 0) {
text->curl = text->curl->prev;
num--;
}
- if (!undoing)
- {
+ if (!undoing) {
txt_undo_add_toop(text, UNDO_UNCOMMENT, txt_get_span(text->lines.first, text->curl), text->curc, txt_get_span(text->lines.first, text->sell), text->selc);
}
}
-int setcurr_tab_spaces (Text *text, int space)
+
+void txt_move_lines_up(struct Text *text)
+{
+ TextLine *prev_line;
+
+ if (!text || !text->curl || !text->sell) return;
+
+ txt_order_cursors(text);
+
+ prev_line = text->curl->prev;
+
+ if (!prev_line) return;
+
+ BLI_remlink(&text->lines, prev_line);
+ BLI_insertlinkafter(&text->lines, text->sell, prev_line);
+
+ txt_make_dirty(text);
+ txt_clean_text(text);
+
+ if (!undoing) {
+ txt_undo_add_op(text, UNDO_MOVE_LINES_UP);
+ }
+}
+
+void txt_move_lines(struct Text *text, const int direction)
+{
+ TextLine *line_other;
+
+ BLI_assert(ELEM(direction, TXT_MOVE_LINE_UP, TXT_MOVE_LINE_DOWN));
+
+ if (!text || !text->curl || !text->sell) return;
+
+ txt_order_cursors(text);
+
+ line_other = (direction == TXT_MOVE_LINE_DOWN) ? text->sell->next : text->curl->prev;
+
+ if (!line_other) return;
+
+ BLI_remlink(&text->lines, line_other);
+
+ if (direction == TXT_MOVE_LINE_DOWN) {
+ BLI_insertlinkbefore(&text->lines, text->curl, line_other);
+ }
+ else {
+ BLI_insertlinkafter(&text->lines, text->sell, line_other);
+ }
+
+ txt_make_dirty(text);
+ txt_clean_text(text);
+
+ if (!undoing) {
+ txt_undo_add_op(text, (direction == TXT_MOVE_LINE_DOWN) ? UNDO_MOVE_LINES_DOWN : UNDO_MOVE_LINES_UP);
+ }
+}
+
+int setcurr_tab_spaces(Text *text, int space)
{
int i = 0;
int test = 0;
const char *word = ":";
const char *comm = "#";
- const char indent= (text->flags & TXT_TABSTOSPACES) ? ' ' : '\t';
- static const char *back_words[]= {"return", "break", "continue", "pass", "yield", NULL};
+ const char indent = (text->flags & TXT_TABSTOSPACES) ? ' ' : '\t';
+ static const char *back_words[] = {"return", "break", "continue", "pass", "yield", NULL};
if (!text) return 0;
if (!text->curl) return 0;
- while (text->curl->line[i] == indent)
- {
+ while (text->curl->line[i] == indent) {
//we only count those tabs/spaces that are before any text or before the curs;
- if (i == text->curc)
- {
+ if (i == text->curc) {
return i;
}
else {
i++;
}
}
- if (strstr(text->curl->line, word))
- {
+ if (strstr(text->curl->line, word)) {
/* if we find a ':' on this line, then add a tab but not if it is:
- * 1) in a comment
- * 2) within an identifier
+ * 1) in a comment
+ * 2) within an identifier
* 3) after the cursor (text->curc), i.e. when creating space before a function def [#25414]
*/
int a, is_indent = 0;
- for (a=0; (a < text->curc) && (text->curl->line[a] != '\0'); a++)
- {
- char ch= text->curl->line[a];
- if (ch=='#') {
+ for (a = 0; (a < text->curc) && (text->curl->line[a] != '\0'); a++) {
+ char ch = text->curl->line[a];
+ if (ch == '#') {
break;
}
- else if (ch==':') {
+ else if (ch == ':') {
is_indent = 1;
}
- else if (ch!=' ' && ch!='\t') {
+ else if (ch != ' ' && ch != '\t') {
is_indent = 0;
}
}
@@ -3081,13 +3130,10 @@ int setcurr_tab_spaces (Text *text, int space)
}
}
- for (test=0; back_words[test]; test++)
- {
+ for (test = 0; back_words[test]; test++) {
/* if there are these key words then remove a tab because we are done with the block */
- if (strstr(text->curl->line, back_words[test]) && i > 0)
- {
- if (strcspn(text->curl->line, back_words[test]) < strcspn(text->curl->line, comm))
- {
+ if (strstr(text->curl->line, back_words[test]) && i > 0) {
+ if (strcspn(text->curl->line, back_words[test]) < strcspn(text->curl->line, comm)) {
i -= space;
}
}
@@ -3104,21 +3150,21 @@ void txt_add_marker(Text *text, TextLine *line, int start, int end, const unsign
{
TextMarker *tmp, *marker;
- marker= MEM_mallocN(sizeof(TextMarker), "text_marker");
+ marker = MEM_mallocN(sizeof(TextMarker), "text_marker");
- marker->lineno= txt_get_span(text->lines.first, line);
- marker->start= MIN2(start, end);
- marker->end= MAX2(start, end);
- marker->group= group;
- marker->flags= flags;
+ marker->lineno = txt_get_span(text->lines.first, line);
+ marker->start = MIN2(start, end);
+ marker->end = MAX2(start, end);
+ marker->group = group;
+ marker->flags = flags;
- marker->color[0]= color[0];
- marker->color[1]= color[1];
- marker->color[2]= color[2];
- marker->color[3]= color[3];
+ marker->color[0] = color[0];
+ marker->color[1] = color[1];
+ marker->color[2] = color[2];
+ marker->color[3] = color[3];
- for (tmp=text->markers.last; tmp; tmp=tmp->prev)
- if (tmp->lineno < marker->lineno || (tmp->lineno==marker->lineno && tmp->start < marker->start))
+ for (tmp = text->markers.last; tmp; tmp = tmp->prev)
+ if (tmp->lineno < marker->lineno || (tmp->lineno == marker->lineno && tmp->start < marker->start))
break;
if (tmp) BLI_insertlinkafter(&text->markers, tmp, marker);
@@ -3131,19 +3177,21 @@ void txt_add_marker(Text *text, TextLine *line, int start, int end, const unsign
TextMarker *txt_find_marker_region(Text *text, TextLine *line, int start, int end, int group, int flags)
{
TextMarker *marker, *next;
- int lineno= txt_get_span(text->lines.first, line);
+ int lineno = txt_get_span(text->lines.first, line);
- for (marker=text->markers.first; marker; marker=next) {
- next= marker->next;
+ for (marker = text->markers.first; marker; marker = next) {
+ next = marker->next;
- if (group && marker->group != group) continue;
+ if (group && marker->group != group) continue;
else if ((marker->flags & flags) != flags) continue;
else if (marker->lineno < lineno) continue;
else if (marker->lineno > lineno) break;
- if ((marker->start==marker->end && start<=marker->start && marker->start<=end) ||
- (marker->start<end && marker->end>start))
+ if ((marker->start == marker->end && start <= marker->start && marker->start <= end) ||
+ (marker->start < end && marker->end > start))
+ {
return marker;
+ }
}
return NULL;
}
@@ -3154,21 +3202,21 @@ TextMarker *txt_find_marker_region(Text *text, TextLine *line, int start, int en
short txt_clear_marker_region(Text *text, TextLine *line, int start, int end, int group, int flags)
{
TextMarker *marker, *next;
- int lineno= txt_get_span(text->lines.first, line);
- short cleared= 0;
+ int lineno = txt_get_span(text->lines.first, line);
+ short cleared = 0;
- for (marker=text->markers.first; marker; marker=next) {
- next= marker->next;
+ for (marker = text->markers.first; marker; marker = next) {
+ next = marker->next;
if (group && marker->group != group) continue;
else if ((marker->flags & flags) != flags) continue;
else if (marker->lineno < lineno) continue;
else if (marker->lineno > lineno) break;
- if ((marker->start==marker->end && start<=marker->start && marker->start<=end) ||
- (marker->start<end && marker->end>start)) {
+ if ((marker->start == marker->end && start <= marker->start && marker->start <= end) ||
+ (marker->start < end && marker->end > start)) {
BLI_freelinkN(&text->markers, marker);
- cleared= 1;
+ cleared = 1;
}
}
return cleared;
@@ -3180,15 +3228,15 @@ short txt_clear_marker_region(Text *text, TextLine *line, int start, int end, in
short txt_clear_markers(Text *text, int group, int flags)
{
TextMarker *marker, *next;
- short cleared= 0;
+ short cleared = 0;
- for (marker=text->markers.first; marker; marker=next) {
- next= marker->next;
+ for (marker = text->markers.first; marker; marker = next) {
+ next = marker->next;
- if ((!group || marker->group==group) &&
- (marker->flags & flags) == flags) {
+ if ((!group || marker->group == group) &&
+ (marker->flags & flags) == flags) {
BLI_freelinkN(&text->markers, marker);
- cleared= 1;
+ cleared = 1;
}
}
return cleared;
@@ -3199,9 +3247,9 @@ short txt_clear_markers(Text *text, int group, int flags)
TextMarker *txt_find_marker(Text *text, TextLine *line, int curs, int group, int flags)
{
TextMarker *marker;
- int lineno= txt_get_span(text->lines.first, line);
+ int lineno = txt_get_span(text->lines.first, line);
- for (marker=text->markers.first; marker; marker=marker->next) {
+ for (marker = text->markers.first; marker; marker = marker->next) {
if (group && marker->group != group) continue;
else if ((marker->flags & flags) != flags) continue;
else if (marker->lineno < lineno) continue;
@@ -3217,10 +3265,10 @@ TextMarker *txt_find_marker(Text *text, TextLine *line, int curs, int group, int
* marker will be returned */
TextMarker *txt_prev_marker(Text *text, TextMarker *marker)
{
- TextMarker *tmp= marker;
+ TextMarker *tmp = marker;
while (tmp) {
- if (tmp->prev) tmp= tmp->prev;
- else tmp= text->markers.last;
+ if (tmp->prev) tmp = tmp->prev;
+ else tmp = text->markers.last;
if (tmp->group == marker->group)
return tmp;
}
@@ -3231,10 +3279,10 @@ TextMarker *txt_prev_marker(Text *text, TextMarker *marker)
* marker will be returned */
TextMarker *txt_next_marker(Text *text, TextMarker *marker)
{
- TextMarker *tmp= marker;
+ TextMarker *tmp = marker;
while (tmp) {
- if (tmp->next) tmp= tmp->next;
- else tmp= text->markers.first;
+ if (tmp->next) tmp = tmp->next;
+ else tmp = text->markers.first;
if (tmp->group == marker->group)
return tmp;
}
@@ -3252,11 +3300,11 @@ int text_check_bracket(const char ch)
char opens[] = "([{";
char close[] = ")]}";
- for (a=0; a<(sizeof(opens)-1); a++) {
- if (ch==opens[a])
- return a+1;
- else if (ch==close[a])
- return -(a+1);
+ for (a = 0; a < (sizeof(opens) - 1); a++) {
+ if (ch == opens[a])
+ return a + 1;
+ else if (ch == close[a])
+ return -(a + 1);
}
return 0;
}
@@ -3267,8 +3315,8 @@ int text_check_delim(const char ch)
int a;
char delims[] = "():\"\' ~!%^&*-+=[]{};/<>|.#\t,@";
- for (a=0; a<(sizeof(delims)-1); a++) {
- if (ch==delims[a])
+ for (a = 0; a < (sizeof(delims) - 1); a++) {
+ if (ch == delims[a])
return 1;
}
return 0;
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c
index 23d818369a2..2c868ca2601 100644
--- a/source/blender/blenkernel/intern/texture.c
+++ b/source/blender/blenkernel/intern/texture.c
@@ -80,7 +80,7 @@ int test_dlerr(const char *name, const char *symbol)
{
char *err;
- err= BLI_dynlib_get_error_as_string(NULL);
+ err = BLI_dynlib_get_error_as_string(NULL);
if (err) {
printf("var1: %s, var2: %s, var3: %s\n", name, symbol, err);
return 1;
@@ -96,14 +96,14 @@ void open_plugin_tex(PluginTex *pit)
int (*version)(void);
/* init all the happy variables */
- pit->doit= NULL;
- pit->pname= NULL;
- pit->stnames= NULL;
- pit->varstr= NULL;
- pit->result= NULL;
- pit->cfra= NULL;
- pit->version= 0;
- pit->instance_init= NULL;
+ pit->doit = NULL;
+ pit->pname = NULL;
+ pit->stnames = NULL;
+ pit->varstr = NULL;
+ pit->result = NULL;
+ pit->cfra = NULL;
+ pit->version = 0;
+ pit->instance_init = NULL;
/* clear the error list */
BLI_dynlib_get_error_as_string(NULL);
@@ -113,42 +113,42 @@ void open_plugin_tex(PluginTex *pit)
/* pit->handle= 0; */
/* open the needed object */
- pit->handle= BLI_dynlib_open(pit->name);
+ pit->handle = BLI_dynlib_open(pit->name);
if (test_dlerr(pit->name, pit->name)) return;
if (pit->handle != NULL) {
/* find the address of the version function */
- version= (int (*)(void)) BLI_dynlib_find_symbol(pit->handle, "plugin_tex_getversion");
+ version = (int (*)(void))BLI_dynlib_find_symbol(pit->handle, "plugin_tex_getversion");
if (test_dlerr(pit->name, "plugin_tex_getversion")) return;
if (version != NULL) {
- pit->version= version();
- if ( pit->version >= 2 && pit->version <=6) {
+ pit->version = version();
+ if (pit->version >= 2 && pit->version <= 6) {
int (*info_func)(PluginInfo *);
- PluginInfo *info= (PluginInfo*) MEM_mallocN(sizeof(PluginInfo), "plugin_info");
+ PluginInfo *info = (PluginInfo *) MEM_mallocN(sizeof(PluginInfo), "plugin_info");
- info_func= (int (*)(PluginInfo *))BLI_dynlib_find_symbol(pit->handle, "plugin_getinfo");
+ info_func = (int (*)(PluginInfo *))BLI_dynlib_find_symbol(pit->handle, "plugin_getinfo");
if (!test_dlerr(pit->name, "plugin_getinfo")) {
info->instance_init = NULL;
info_func(info);
- pit->doit= (int(*)(void)) info->tex_doit;
- pit->callback= (void(*)(unsigned short)) info->callback;
- pit->stypes= info->stypes;
- pit->vars= info->nvars;
- pit->pname= info->name;
- pit->stnames= info->snames;
- pit->varstr= info->varstr;
- pit->result= info->result;
- pit->cfra= info->cfra;
+ pit->doit = (int (*)(void))info->tex_doit;
+ pit->callback = (void (*)(unsigned short))info->callback;
+ pit->stypes = info->stypes;
+ pit->vars = info->nvars;
+ pit->pname = info->name;
+ pit->stnames = info->snames;
+ pit->varstr = info->varstr;
+ pit->result = info->result;
+ pit->cfra = info->cfra;
pit->instance_init = info->instance_init;
if (info->init) info->init();
}
MEM_freeN(info);
}
else {
- printf ("Plugin returned unrecognized version number\n");
+ printf("Plugin returned unrecognized version number\n");
return;
}
}
@@ -158,8 +158,8 @@ void open_plugin_tex(PluginTex *pit)
/* ------------------------------------------------------------------------- */
/* very badlevel define to bypass linking with BIF_interface.h */
-#define INT 96
-#define FLO 128
+#define INT 96
+#define FLO 128
PluginTex *add_plugin_tex(char *str)
{
@@ -167,24 +167,24 @@ PluginTex *add_plugin_tex(char *str)
VarStruct *varstr;
int a;
- pit= MEM_callocN(sizeof(PluginTex), "plugintex");
+ pit = MEM_callocN(sizeof(PluginTex), "plugintex");
BLI_strncpy(pit->name, str, sizeof(pit->name));
open_plugin_tex(pit);
- if (pit->doit==NULL) {
- if (pit->handle==NULL) {;} //XXX error("no plugin: %s", str);
- else {;} //XXX error("in plugin: %s", str);
+ if (pit->doit == NULL) {
+ if (pit->handle == NULL) {; } //XXX error("no plugin: %s", str);
+ else {; } //XXX error("in plugin: %s", str);
MEM_freeN(pit);
return NULL;
}
- varstr= pit->varstr;
- for (a=0; a<pit->vars; a++, varstr++) {
- if ( (varstr->type & FLO)==FLO)
- pit->data[a]= varstr->def;
- else if ( (varstr->type & INT)==INT)
- *((int *)(pit->data+a))= (int) varstr->def;
+ varstr = pit->varstr;
+ for (a = 0; a < pit->vars; a++, varstr++) {
+ if ( (varstr->type & FLO) == FLO)
+ pit->data[a] = varstr->def;
+ else if ( (varstr->type & INT) == INT)
+ *((int *)(pit->data + a)) = (int) varstr->def;
}
if (pit->instance_init)
@@ -197,7 +197,7 @@ PluginTex *add_plugin_tex(char *str)
void free_plugin_tex(PluginTex *pit)
{
- if (pit==NULL) return;
+ if (pit == NULL) return;
/* no BLI_dynlib_close: same plugin can be opened multiple times, 1 handle */
MEM_freeN(pit);
@@ -207,7 +207,7 @@ void free_plugin_tex(PluginTex *pit)
TexMapping *add_tex_mapping(void)
{
- TexMapping *texmap= MEM_callocN(sizeof(TexMapping), "TexMapping");
+ TexMapping *texmap = MEM_callocN(sizeof(TexMapping), "TexMapping");
default_tex_mapping(texmap);
@@ -218,14 +218,14 @@ void default_tex_mapping(TexMapping *texmap)
{
memset(texmap, 0, sizeof(TexMapping));
- texmap->size[0]= texmap->size[1]= texmap->size[2]= 1.0f;
- texmap->max[0]= texmap->max[1]= texmap->max[2]= 1.0f;
+ texmap->size[0] = texmap->size[1] = texmap->size[2] = 1.0f;
+ texmap->max[0] = texmap->max[1] = texmap->max[2] = 1.0f;
unit_m4(texmap->mat);
- texmap->projx= PROJ_X;
- texmap->projy= PROJ_Y;
- texmap->projz= PROJ_Z;
- texmap->mapping= MTEX_FLAT;
+ texmap->projx = PROJ_X;
+ texmap->projy = PROJ_Y;
+ texmap->projz = PROJ_Z;
+ texmap->mapping = MTEX_FLAT;
}
void init_tex_mapping(TexMapping *texmap)
@@ -233,7 +233,7 @@ void init_tex_mapping(TexMapping *texmap)
float smat[3][3], rmat[3][3], mat[3][3], proj[3][3];
if (texmap->projx == PROJ_X && texmap->projy == PROJ_Y && texmap->projz == PROJ_Z &&
- is_zero_v3(texmap->loc) && is_zero_v3(texmap->rot) && is_one_v3(texmap->size)) {
+ is_zero_v3(texmap->loc) && is_zero_v3(texmap->rot) && is_one_v3(texmap->size)) {
unit_m4(texmap->mat);
texmap->flag |= TEXMAP_UNIT_MATRIX;
@@ -243,11 +243,11 @@ void init_tex_mapping(TexMapping *texmap)
zero_m3(proj);
if (texmap->projx != PROJ_N)
- proj[texmap->projx-1][0]= 1.0f;
+ proj[texmap->projx - 1][0] = 1.0f;
if (texmap->projy != PROJ_N)
- proj[texmap->projy-1][1]= 1.0f;
+ proj[texmap->projy - 1][1] = 1.0f;
if (texmap->projz != PROJ_N)
- proj[texmap->projz-1][2]= 1.0f;
+ proj[texmap->projz - 1][2] = 1.0f;
/* scale */
size_to_mat3(smat, texmap->size);
@@ -270,7 +270,7 @@ void init_tex_mapping(TexMapping *texmap)
ColorMapping *add_color_mapping(void)
{
- ColorMapping *colormap= MEM_callocN(sizeof(ColorMapping), "ColorMapping");
+ ColorMapping *colormap = MEM_callocN(sizeof(ColorMapping), "ColorMapping");
default_color_mapping(colormap);
@@ -283,15 +283,15 @@ void default_color_mapping(ColorMapping *colormap)
init_colorband(&colormap->coba, 1);
- colormap->bright= 1.0;
- colormap->contrast= 1.0;
- colormap->saturation= 1.0;
+ colormap->bright = 1.0;
+ colormap->contrast = 1.0;
+ colormap->saturation = 1.0;
- colormap->blend_color[0]= 0.8f;
- colormap->blend_color[1]= 0.8f;
- colormap->blend_color[2]= 0.8f;
- colormap->blend_type= MA_RAMP_BLEND;
- colormap->blend_factor= 0.0f;
+ colormap->blend_color[0] = 0.8f;
+ colormap->blend_color[1] = 0.8f;
+ colormap->blend_color[2] = 0.8f;
+ colormap->blend_type = MA_RAMP_BLEND;
+ colormap->blend_factor = 0.0f;
}
/* ****************** COLORBAND ******************* */
@@ -300,41 +300,41 @@ void init_colorband(ColorBand *coba, int rangetype)
{
int a;
- coba->data[0].pos= 0.0;
- coba->data[1].pos= 1.0;
+ coba->data[0].pos = 0.0;
+ coba->data[1].pos = 1.0;
- if (rangetype==0) {
- coba->data[0].r= 0.0;
- coba->data[0].g= 0.0;
- coba->data[0].b= 0.0;
- coba->data[0].a= 0.0;
-
- coba->data[1].r= 1.0;
- coba->data[1].g= 1.0;
- coba->data[1].b= 1.0;
- coba->data[1].a= 1.0;
+ if (rangetype == 0) {
+ coba->data[0].r = 0.0;
+ coba->data[0].g = 0.0;
+ coba->data[0].b = 0.0;
+ coba->data[0].a = 0.0;
+
+ coba->data[1].r = 1.0;
+ coba->data[1].g = 1.0;
+ coba->data[1].b = 1.0;
+ coba->data[1].a = 1.0;
}
else {
- coba->data[0].r= 0.0;
- coba->data[0].g= 0.0;
- coba->data[0].b= 0.0;
- coba->data[0].a= 1.0;
-
- coba->data[1].r= 1.0;
- coba->data[1].g= 1.0;
- coba->data[1].b= 1.0;
- coba->data[1].a= 1.0;
+ coba->data[0].r = 0.0;
+ coba->data[0].g = 0.0;
+ coba->data[0].b = 0.0;
+ coba->data[0].a = 1.0;
+
+ coba->data[1].r = 1.0;
+ coba->data[1].g = 1.0;
+ coba->data[1].b = 1.0;
+ coba->data[1].a = 1.0;
}
-
- for (a=2; a<MAXCOLORBAND; a++) {
- coba->data[a].r= 0.5;
- coba->data[a].g= 0.5;
- coba->data[a].b= 0.5;
- coba->data[a].a= 1.0;
- coba->data[a].pos= 0.5;
+
+ for (a = 2; a < MAXCOLORBAND; a++) {
+ coba->data[a].r = 0.5;
+ coba->data[a].g = 0.5;
+ coba->data[a].b = 0.5;
+ coba->data[a].a = 1.0;
+ coba->data[a].pos = 0.5;
}
- coba->tot= 2;
+ coba->tot = 2;
}
@@ -342,7 +342,7 @@ ColorBand *add_colorband(int rangetype)
{
ColorBand *coba;
- coba= MEM_callocN( sizeof(ColorBand), "colorband");
+ coba = MEM_callocN(sizeof(ColorBand), "colorband");
init_colorband(coba, rangetype);
return coba;
@@ -356,85 +356,85 @@ int do_colorband(const ColorBand *coba, float in, float out[4])
float fac, mfac, t[4];
int a;
- if (coba==NULL || coba->tot==0) return 0;
+ if (coba == NULL || coba->tot == 0) return 0;
- cbd1= coba->data;
- if (coba->tot==1) {
- out[0]= cbd1->r;
- out[1]= cbd1->g;
- out[2]= cbd1->b;
- out[3]= cbd1->a;
+ cbd1 = coba->data;
+ if (coba->tot == 1) {
+ out[0] = cbd1->r;
+ out[1] = cbd1->g;
+ out[2] = cbd1->b;
+ out[3] = cbd1->a;
}
else {
- if (in <= cbd1->pos && coba->ipotype<2) {
- out[0]= cbd1->r;
- out[1]= cbd1->g;
- out[2]= cbd1->b;
- out[3]= cbd1->a;
+ if (in <= cbd1->pos && coba->ipotype < 2) {
+ out[0] = cbd1->r;
+ out[1] = cbd1->g;
+ out[2] = cbd1->b;
+ out[3] = cbd1->a;
}
else {
CBData left, right;
/* we're looking for first pos > in */
- for (a=0; a<coba->tot; a++, cbd1++) if (cbd1->pos > in) break;
+ for (a = 0; a < coba->tot; a++, cbd1++) if (cbd1->pos > in) break;
- if (a==coba->tot) {
- cbd2= cbd1-1;
- right= *cbd2;
- right.pos= 1.0f;
- cbd1= &right;
+ if (a == coba->tot) {
+ cbd2 = cbd1 - 1;
+ right = *cbd2;
+ right.pos = 1.0f;
+ cbd1 = &right;
}
- else if (a==0) {
- left= *cbd1;
- left.pos= 0.0f;
- cbd2= &left;
+ else if (a == 0) {
+ left = *cbd1;
+ left.pos = 0.0f;
+ cbd2 = &left;
}
- else cbd2= cbd1-1;
+ else cbd2 = cbd1 - 1;
- if (in >= cbd1->pos && coba->ipotype<2) {
- out[0]= cbd1->r;
- out[1]= cbd1->g;
- out[2]= cbd1->b;
- out[3]= cbd1->a;
+ if (in >= cbd1->pos && coba->ipotype < 2) {
+ out[0] = cbd1->r;
+ out[1] = cbd1->g;
+ out[2] = cbd1->b;
+ out[3] = cbd1->a;
}
else {
- if (cbd2->pos!=cbd1->pos)
- fac= (in-cbd1->pos)/(cbd2->pos-cbd1->pos);
+ if (cbd2->pos != cbd1->pos)
+ fac = (in - cbd1->pos) / (cbd2->pos - cbd1->pos);
else {
/* was setting to 0.0 in 2.56 & previous, but this
* is incorrect for the last element, see [#26732] */
- fac= (a != coba->tot) ? 0.0f : 1.0f;
+ fac = (a != coba->tot) ? 0.0f : 1.0f;
}
- if (coba->ipotype==4) {
+ if (coba->ipotype == 4) {
/* constant */
- out[0]= cbd2->r;
- out[1]= cbd2->g;
- out[2]= cbd2->b;
- out[3]= cbd2->a;
+ out[0] = cbd2->r;
+ out[1] = cbd2->g;
+ out[2] = cbd2->b;
+ out[3] = cbd2->a;
return 1;
}
- if (coba->ipotype>=2) {
+ if (coba->ipotype >= 2) {
/* ipo from right to left: 3 2 1 0 */
- if (a>=coba->tot-1) cbd0= cbd1;
- else cbd0= cbd1+1;
- if (a<2) cbd3= cbd2;
- else cbd3= cbd2-1;
+ if (a >= coba->tot - 1) cbd0 = cbd1;
+ else cbd0 = cbd1 + 1;
+ if (a < 2) cbd3 = cbd2;
+ else cbd3 = cbd2 - 1;
CLAMP(fac, 0.0f, 1.0f);
- if (coba->ipotype==3)
+ if (coba->ipotype == 3)
key_curve_position_weights(fac, t, KEY_CARDINAL);
else
key_curve_position_weights(fac, t, KEY_BSPLINE);
- out[0]= t[3]*cbd3->r +t[2]*cbd2->r +t[1]*cbd1->r +t[0]*cbd0->r;
- out[1]= t[3]*cbd3->g +t[2]*cbd2->g +t[1]*cbd1->g +t[0]*cbd0->g;
- out[2]= t[3]*cbd3->b +t[2]*cbd2->b +t[1]*cbd1->b +t[0]*cbd0->b;
- out[3]= t[3]*cbd3->a +t[2]*cbd2->a +t[1]*cbd1->a +t[0]*cbd0->a;
+ out[0] = t[3] * cbd3->r + t[2] * cbd2->r + t[1] * cbd1->r + t[0] * cbd0->r;
+ out[1] = t[3] * cbd3->g + t[2] * cbd2->g + t[1] * cbd1->g + t[0] * cbd0->g;
+ out[2] = t[3] * cbd3->b + t[2] * cbd2->b + t[1] * cbd1->b + t[0] * cbd0->b;
+ out[3] = t[3] * cbd3->a + t[2] * cbd2->a + t[1] * cbd1->a + t[0] * cbd0->a;
CLAMP(out[0], 0.0f, 1.0f);
CLAMP(out[1], 0.0f, 1.0f);
CLAMP(out[2], 0.0f, 1.0f);
@@ -442,40 +442,40 @@ int do_colorband(const ColorBand *coba, float in, float out[4])
}
else {
- if (coba->ipotype==1) { /* EASE */
- mfac= fac*fac;
- fac= 3.0f*mfac-2.0f*mfac*fac;
+ if (coba->ipotype == 1) { /* EASE */
+ mfac = fac * fac;
+ fac = 3.0f * mfac - 2.0f * mfac * fac;
}
- mfac= 1.0f-fac;
+ mfac = 1.0f - fac;
- out[0]= mfac*cbd1->r + fac*cbd2->r;
- out[1]= mfac*cbd1->g + fac*cbd2->g;
- out[2]= mfac*cbd1->b + fac*cbd2->b;
- out[3]= mfac*cbd1->a + fac*cbd2->a;
+ out[0] = mfac * cbd1->r + fac * cbd2->r;
+ out[1] = mfac * cbd1->g + fac * cbd2->g;
+ out[2] = mfac * cbd1->b + fac * cbd2->b;
+ out[3] = mfac * cbd1->a + fac * cbd2->a;
}
}
}
}
- return 1; /* OK */
+ return 1; /* OK */
}
void colorband_table_RGBA(ColorBand *coba, float **array, int *size)
{
int a;
- *size = CM_TABLE+1;
- *array = MEM_callocN(sizeof(float)*(*size)*4, "ColorBand");
+ *size = CM_TABLE + 1;
+ *array = MEM_callocN(sizeof(float) * (*size) * 4, "ColorBand");
- for (a=0; a<*size; a++)
- do_colorband(coba, (float)a/(float)CM_TABLE, &(*array)[a*4]);
+ for (a = 0; a < *size; a++)
+ do_colorband(coba, (float)a / (float)CM_TABLE, &(*array)[a * 4]);
}
int vergcband(const void *a1, const void *a2)
{
- const CBData *x1=a1, *x2=a2;
+ const CBData *x1 = a1, *x2 = a2;
- if ( x1->pos > x2->pos ) return 1;
- else if ( x1->pos < x2->pos) return -1;
+ if (x1->pos > x2->pos) return 1;
+ else if (x1->pos < x2->pos) return -1;
return 0;
}
@@ -483,17 +483,17 @@ void colorband_update_sort(ColorBand *coba)
{
int a;
- if (coba->tot<2)
+ if (coba->tot < 2)
return;
- for (a=0; a<coba->tot; a++)
- coba->data[a].cur= a;
+ for (a = 0; a < coba->tot; a++)
+ coba->data[a].cur = a;
qsort(coba->data, coba->tot, sizeof(CBData), vergcband);
- for (a=0; a<coba->tot; a++) {
- if (coba->data[a].cur==coba->cur) {
- coba->cur= a;
+ for (a = 0; a < coba->tot; a++) {
+ if (coba->data[a].cur == coba->cur) {
+ coba->cur = a;
break;
}
}
@@ -501,7 +501,7 @@ void colorband_update_sort(ColorBand *coba)
CBData *colorband_element_add(struct ColorBand *coba, float position)
{
- if (coba->tot==MAXCOLORBAND) {
+ if (coba->tot == MAXCOLORBAND) {
return NULL;
}
else if (coba->tot > 0) {
@@ -520,7 +520,7 @@ CBData *colorband_element_add(struct ColorBand *coba, float position)
}
coba->tot++;
- coba->cur = coba->tot-1;
+ coba->cur = coba->tot - 1;
colorband_update_sort(coba);
@@ -547,7 +547,7 @@ int colorband_element_remove(struct ColorBand *coba, int index)
/* ******************* TEX ************************ */
-void free_texture(Tex *tex)
+void BKE_texture_free(Tex *tex)
{
free_plugin_tex(tex->plugin);
@@ -559,7 +559,7 @@ void free_texture(Tex *tex)
BKE_free_animdata((struct ID *)tex);
BKE_previewimg_free(&tex->preview);
- BKE_icon_delete((struct ID*)tex);
+ BKE_icon_delete((struct ID *)tex);
tex->id.icon_id = 0;
if (tex->nodetree) {
@@ -576,31 +576,31 @@ void default_tex(Tex *tex)
VarStruct *varstr;
int a;
- tex->type= TEX_CLOUDS;
- tex->stype= 0;
- tex->flag= TEX_CHECKER_ODD;
- tex->imaflag= TEX_INTERPOL|TEX_MIPMAP|TEX_USEALPHA;
- tex->extend= TEX_REPEAT;
- tex->cropxmin= tex->cropymin= 0.0;
- tex->cropxmax= tex->cropymax= 1.0;
+ tex->type = TEX_CLOUDS;
+ tex->stype = 0;
+ tex->flag = TEX_CHECKER_ODD;
+ tex->imaflag = TEX_INTERPOL | TEX_MIPMAP | TEX_USEALPHA;
+ tex->extend = TEX_REPEAT;
+ tex->cropxmin = tex->cropymin = 0.0;
+ tex->cropxmax = tex->cropymax = 1.0;
tex->texfilter = TXF_EWA;
tex->afmax = 8;
- tex->xrepeat= tex->yrepeat= 1;
- tex->fie_ima= 2;
- tex->sfra= 1;
- tex->frames= 0;
- tex->offset= 0;
- tex->noisesize= 0.25;
- tex->noisedepth= 2;
- tex->turbul= 5.0;
- tex->nabla= 0.025; // also in do_versions
- tex->bright= 1.0;
- tex->contrast= 1.0;
- tex->saturation= 1.0;
- tex->filtersize= 1.0;
- tex->rfac= 1.0;
- tex->gfac= 1.0;
- tex->bfac= 1.0;
+ tex->xrepeat = tex->yrepeat = 1;
+ tex->fie_ima = 2;
+ tex->sfra = 1;
+ tex->frames = 0;
+ tex->offset = 0;
+ tex->noisesize = 0.25;
+ tex->noisedepth = 2;
+ tex->turbul = 5.0;
+ tex->nabla = 0.025; // also in do_versions
+ tex->bright = 1.0;
+ tex->contrast = 1.0;
+ tex->saturation = 1.0;
+ tex->filtersize = 1.0;
+ tex->rfac = 1.0;
+ tex->gfac = 1.0;
+ tex->bfac = 1.0;
/* newnoise: init. */
tex->noisebasis = 0;
tex->noisebasis2 = 0;
@@ -621,11 +621,11 @@ void default_tex(Tex *tex)
tex->vn_coltype = 0;
if (tex->env) {
- tex->env->stype=ENV_ANIM;
- tex->env->clipsta=0.1;
- tex->env->clipend=100;
- tex->env->cuberes=600;
- tex->env->depth=0;
+ tex->env->stype = ENV_ANIM;
+ tex->env->clipsta = 0.1;
+ tex->env->clipend = 100;
+ tex->env->cuberes = 600;
+ tex->env->depth = 0;
}
if (tex->pd) {
@@ -635,8 +635,8 @@ void default_tex(Tex *tex)
if (tex->vd) {
tex->vd->resol[0] = tex->vd->resol[1] = tex->vd->resol[2] = 0;
- tex->vd->interp_type=TEX_VD_LINEAR;
- tex->vd->file_format=TEX_VD_SMOKE;
+ tex->vd->interp_type = TEX_VD_LINEAR;
+ tex->vd->file_format = TEX_VD_SMOKE;
}
if (tex->ot) {
@@ -645,25 +645,25 @@ void default_tex(Tex *tex)
}
pit = tex->plugin;
if (pit) {
- varstr= pit->varstr;
+ varstr = pit->varstr;
if (varstr) {
- for (a=0; a<pit->vars; a++, varstr++) {
+ for (a = 0; a < pit->vars; a++, varstr++) {
pit->data[a] = varstr->def;
}
}
}
- tex->iuser.fie_ima= 2;
- tex->iuser.ok= 1;
- tex->iuser.frames= 100;
- tex->iuser.sfra= 1;
+ tex->iuser.fie_ima = 2;
+ tex->iuser.ok = 1;
+ tex->iuser.frames = 100;
+ tex->iuser.sfra = 1;
tex->preview = NULL;
}
void tex_set_type(Tex *tex, int type)
{
- switch(type) {
+ switch (type) {
case TEX_VOXELDATA:
if (tex->vd == NULL)
@@ -690,10 +690,10 @@ void tex_set_type(Tex *tex, int type)
Tex *add_texture(const char *name)
{
- Main *bmain= G.main;
+ Main *bmain = G.main;
Tex *tex;
- tex= alloc_libblock(&bmain->tex, ID_TE, name);
+ tex = BKE_libblock_alloc(&bmain->tex, ID_TE, name);
default_tex(tex);
@@ -704,65 +704,65 @@ Tex *add_texture(const char *name)
void default_mtex(MTex *mtex)
{
- mtex->texco= TEXCO_ORCO;
- mtex->mapto= MAP_COL;
- mtex->object= NULL;
- mtex->projx= PROJ_X;
- mtex->projy= PROJ_Y;
- mtex->projz= PROJ_Z;
- mtex->mapping= MTEX_FLAT;
- mtex->ofs[0]= 0.0;
- mtex->ofs[1]= 0.0;
- mtex->ofs[2]= 0.0;
- mtex->size[0]= 1.0;
- mtex->size[1]= 1.0;
- mtex->size[2]= 1.0;
- mtex->tex= NULL;
- mtex->texflag= MTEX_3TAP_BUMP | MTEX_BUMP_OBJECTSPACE;
- mtex->colormodel= 0;
- mtex->r= 1.0;
- mtex->g= 0.0;
- mtex->b= 1.0;
- mtex->k= 1.0;
- mtex->def_var= 1.0;
- mtex->blendtype= MTEX_BLEND;
- mtex->colfac= 1.0;
- mtex->norfac= 1.0;
- mtex->varfac= 1.0;
- mtex->dispfac=0.2;
- mtex->colspecfac= 1.0f;
- mtex->mirrfac= 1.0f;
- mtex->alphafac= 1.0f;
- mtex->difffac= 1.0f;
- mtex->specfac= 1.0f;
- mtex->emitfac= 1.0f;
- mtex->hardfac= 1.0f;
- mtex->raymirrfac= 1.0f;
- mtex->translfac= 1.0f;
- mtex->ambfac= 1.0f;
- mtex->colemitfac= 1.0f;
- mtex->colreflfac= 1.0f;
- mtex->coltransfac= 1.0f;
- mtex->densfac= 1.0f;
- mtex->scatterfac= 1.0f;
- mtex->reflfac= 1.0f;
- mtex->shadowfac= 1.0f;
- mtex->zenupfac= 1.0f;
- mtex->zendownfac= 1.0f;
- mtex->blendfac= 1.0f;
- mtex->timefac= 1.0f;
- mtex->lengthfac= 1.0f;
- mtex->clumpfac= 1.0f;
- mtex->kinkfac= 1.0f;
- mtex->roughfac= 1.0f;
- mtex->padensfac= 1.0f;
- mtex->lifefac= 1.0f;
- mtex->sizefac= 1.0f;
- mtex->ivelfac= 1.0f;
- mtex->dampfac= 1.0f;
- mtex->gravityfac= 1.0f;
- mtex->fieldfac= 1.0f;
- mtex->normapspace= MTEX_NSPACE_TANGENT;
+ mtex->texco = TEXCO_ORCO;
+ mtex->mapto = MAP_COL;
+ mtex->object = NULL;
+ mtex->projx = PROJ_X;
+ mtex->projy = PROJ_Y;
+ mtex->projz = PROJ_Z;
+ mtex->mapping = MTEX_FLAT;
+ mtex->ofs[0] = 0.0;
+ mtex->ofs[1] = 0.0;
+ mtex->ofs[2] = 0.0;
+ mtex->size[0] = 1.0;
+ mtex->size[1] = 1.0;
+ mtex->size[2] = 1.0;
+ mtex->tex = NULL;
+ mtex->texflag = MTEX_3TAP_BUMP | MTEX_BUMP_OBJECTSPACE;
+ mtex->colormodel = 0;
+ mtex->r = 1.0;
+ mtex->g = 0.0;
+ mtex->b = 1.0;
+ mtex->k = 1.0;
+ mtex->def_var = 1.0;
+ mtex->blendtype = MTEX_BLEND;
+ mtex->colfac = 1.0;
+ mtex->norfac = 1.0;
+ mtex->varfac = 1.0;
+ mtex->dispfac = 0.2;
+ mtex->colspecfac = 1.0f;
+ mtex->mirrfac = 1.0f;
+ mtex->alphafac = 1.0f;
+ mtex->difffac = 1.0f;
+ mtex->specfac = 1.0f;
+ mtex->emitfac = 1.0f;
+ mtex->hardfac = 1.0f;
+ mtex->raymirrfac = 1.0f;
+ mtex->translfac = 1.0f;
+ mtex->ambfac = 1.0f;
+ mtex->colemitfac = 1.0f;
+ mtex->colreflfac = 1.0f;
+ mtex->coltransfac = 1.0f;
+ mtex->densfac = 1.0f;
+ mtex->scatterfac = 1.0f;
+ mtex->reflfac = 1.0f;
+ mtex->shadowfac = 1.0f;
+ mtex->zenupfac = 1.0f;
+ mtex->zendownfac = 1.0f;
+ mtex->blendfac = 1.0f;
+ mtex->timefac = 1.0f;
+ mtex->lengthfac = 1.0f;
+ mtex->clumpfac = 1.0f;
+ mtex->kinkfac = 1.0f;
+ mtex->roughfac = 1.0f;
+ mtex->padensfac = 1.0f;
+ mtex->lifefac = 1.0f;
+ mtex->sizefac = 1.0f;
+ mtex->ivelfac = 1.0f;
+ mtex->dampfac = 1.0f;
+ mtex->gravityfac = 1.0f;
+ mtex->fieldfac = 1.0f;
+ mtex->normapspace = MTEX_NSPACE_TANGENT;
}
@@ -772,7 +772,7 @@ MTex *add_mtex(void)
{
MTex *mtex;
- mtex= MEM_callocN(sizeof(MTex), "add_mtex");
+ mtex = MEM_callocN(sizeof(MTex), "add_mtex");
default_mtex(mtex);
@@ -787,16 +787,16 @@ MTex *add_mtex_id(ID *id, int slot)
give_active_mtex(id, &mtex_ar, &act);
- if (mtex_ar==NULL) {
+ if (mtex_ar == NULL) {
return NULL;
}
- if (slot==-1) {
+ if (slot == -1) {
/* find first free */
int i;
- for (i= 0; i < MAX_MTEX; i++) {
+ for (i = 0; i < MAX_MTEX; i++) {
if (!mtex_ar[i]) {
- slot= i;
+ slot = i;
break;
}
}
@@ -814,41 +814,41 @@ MTex *add_mtex_id(ID *id, int slot)
if (mtex_ar[slot]) {
id_us_min((ID *)mtex_ar[slot]->tex);
MEM_freeN(mtex_ar[slot]);
- mtex_ar[slot]= NULL;
+ mtex_ar[slot] = NULL;
}
- mtex_ar[slot]= add_mtex();
+ mtex_ar[slot] = add_mtex();
return mtex_ar[slot];
}
/* ------------------------------------------------------------------------- */
-Tex *copy_texture(Tex *tex)
+Tex *BKE_texture_copy(Tex *tex)
{
Tex *texn;
- texn= copy_libblock(&tex->id);
- if (texn->type==TEX_IMAGE) id_us_plus((ID *)texn->ima);
- else texn->ima= NULL;
+ texn = BKE_libblock_copy(&tex->id);
+ if (texn->type == TEX_IMAGE) id_us_plus((ID *)texn->ima);
+ else texn->ima = NULL;
if (texn->plugin) {
- texn->plugin= MEM_dupallocN(texn->plugin);
+ texn->plugin = MEM_dupallocN(texn->plugin);
open_plugin_tex(texn->plugin);
}
- if (texn->coba) texn->coba= MEM_dupallocN(texn->coba);
- if (texn->env) texn->env= BKE_copy_envmap(texn->env);
- if (texn->pd) texn->pd= BKE_copy_pointdensity(texn->pd);
- if (texn->vd) texn->vd= MEM_dupallocN(texn->vd);
- if (texn->ot) texn->ot= BKE_copy_oceantex(texn->ot);
+ if (texn->coba) texn->coba = MEM_dupallocN(texn->coba);
+ if (texn->env) texn->env = BKE_copy_envmap(texn->env);
+ if (texn->pd) texn->pd = BKE_copy_pointdensity(texn->pd);
+ if (texn->vd) texn->vd = MEM_dupallocN(texn->vd);
+ if (texn->ot) texn->ot = BKE_copy_oceantex(texn->ot);
if (tex->preview) texn->preview = BKE_previewimg_copy(tex->preview);
if (tex->nodetree) {
if (tex->nodetree->execdata) {
ntreeTexEndExecTree(tex->nodetree->execdata, 1);
}
- texn->nodetree= ntreeCopyTree(tex->nodetree);
+ texn->nodetree = ntreeCopyTree(tex->nodetree);
}
return texn;
@@ -859,35 +859,35 @@ Tex *localize_texture(Tex *tex)
{
Tex *texn;
- texn= copy_libblock(&tex->id);
+ texn = BKE_libblock_copy(&tex->id);
BLI_remlink(&G.main->tex, texn);
- /* image texture: free_texture also doesn't decrease */
+ /* image texture: BKE_texture_free also doesn't decrease */
if (texn->plugin) {
- texn->plugin= MEM_dupallocN(texn->plugin);
+ texn->plugin = MEM_dupallocN(texn->plugin);
open_plugin_tex(texn->plugin);
}
- if (texn->coba) texn->coba= MEM_dupallocN(texn->coba);
+ if (texn->coba) texn->coba = MEM_dupallocN(texn->coba);
if (texn->env) {
- texn->env= BKE_copy_envmap(texn->env);
+ texn->env = BKE_copy_envmap(texn->env);
id_us_min(&texn->env->ima->id);
}
- if (texn->pd) texn->pd= BKE_copy_pointdensity(texn->pd);
+ if (texn->pd) texn->pd = BKE_copy_pointdensity(texn->pd);
if (texn->vd) {
- texn->vd= MEM_dupallocN(texn->vd);
+ texn->vd = MEM_dupallocN(texn->vd);
if (texn->vd->dataset)
- texn->vd->dataset= MEM_dupallocN(texn->vd->dataset);
+ texn->vd->dataset = MEM_dupallocN(texn->vd->dataset);
}
if (texn->ot) {
- texn->ot= BKE_copy_oceantex(tex->ot);
+ texn->ot = BKE_copy_oceantex(tex->ot);
}
texn->preview = NULL;
if (tex->nodetree) {
- texn->nodetree= ntreeLocalize(tex->nodetree);
+ texn->nodetree = ntreeLocalize(tex->nodetree);
}
return texn;
@@ -901,76 +901,76 @@ static void extern_local_texture(Tex *tex)
id_lib_extern((ID *)tex->ima);
}
-void make_local_texture(Tex *tex)
+void BKE_texture_make_local(Tex *tex)
{
- Main *bmain= G.main;
+ Main *bmain = G.main;
Material *ma;
World *wrld;
Lamp *la;
Brush *br;
ParticleSettings *pa;
- int a, is_local= FALSE, is_lib= FALSE;
+ int a, is_local = FALSE, is_lib = FALSE;
/* - only lib users: do nothing
* - only local users: set flag
* - mixed: make copy
*/
- if (tex->id.lib==NULL) return;
+ if (tex->id.lib == NULL) return;
- if (tex->id.us==1) {
+ if (tex->id.us == 1) {
id_clear_lib_data(bmain, &tex->id);
extern_local_texture(tex);
return;
}
- ma= bmain->mat.first;
+ ma = bmain->mat.first;
while (ma) {
- for (a=0; a<MAX_MTEX; a++) {
- if (ma->mtex[a] && ma->mtex[a]->tex==tex) {
- if (ma->id.lib) is_lib= TRUE;
- else is_local= TRUE;
+ for (a = 0; a < MAX_MTEX; a++) {
+ if (ma->mtex[a] && ma->mtex[a]->tex == tex) {
+ if (ma->id.lib) is_lib = TRUE;
+ else is_local = TRUE;
}
}
- ma= ma->id.next;
+ ma = ma->id.next;
}
- la= bmain->lamp.first;
+ la = bmain->lamp.first;
while (la) {
- for (a=0; a<MAX_MTEX; a++) {
- if (la->mtex[a] && la->mtex[a]->tex==tex) {
- if (la->id.lib) is_lib= TRUE;
- else is_local= TRUE;
+ for (a = 0; a < MAX_MTEX; a++) {
+ if (la->mtex[a] && la->mtex[a]->tex == tex) {
+ if (la->id.lib) is_lib = TRUE;
+ else is_local = TRUE;
}
}
- la= la->id.next;
+ la = la->id.next;
}
- wrld= bmain->world.first;
+ wrld = bmain->world.first;
while (wrld) {
- for (a=0; a<MAX_MTEX; a++) {
- if (wrld->mtex[a] && wrld->mtex[a]->tex==tex) {
- if (wrld->id.lib) is_lib= TRUE;
- else is_local= TRUE;
+ for (a = 0; a < MAX_MTEX; a++) {
+ if (wrld->mtex[a] && wrld->mtex[a]->tex == tex) {
+ if (wrld->id.lib) is_lib = TRUE;
+ else is_local = TRUE;
}
}
- wrld= wrld->id.next;
+ wrld = wrld->id.next;
}
- br= bmain->brush.first;
+ br = bmain->brush.first;
while (br) {
- if (br->mtex.tex==tex) {
- if (br->id.lib) is_lib= TRUE;
- else is_local= TRUE;
+ if (br->mtex.tex == tex) {
+ if (br->id.lib) is_lib = TRUE;
+ else is_local = TRUE;
}
- br= br->id.next;
+ br = br->id.next;
}
- pa= bmain->particle.first;
+ pa = bmain->particle.first;
while (pa) {
- for (a=0; a<MAX_MTEX; a++) {
- if (pa->mtex[a] && pa->mtex[a]->tex==tex) {
- if (pa->id.lib) is_lib= TRUE;
- else is_local= TRUE;
+ for (a = 0; a < MAX_MTEX; a++) {
+ if (pa->mtex[a] && pa->mtex[a]->tex == tex) {
+ if (pa->id.lib) is_lib = TRUE;
+ else is_local = TRUE;
}
}
- pa= pa->id.next;
+ pa = pa->id.next;
}
if (is_local && is_lib == FALSE) {
@@ -978,75 +978,75 @@ void make_local_texture(Tex *tex)
extern_local_texture(tex);
}
else if (is_local && is_lib) {
- Tex *tex_new= copy_texture(tex);
+ Tex *tex_new = BKE_texture_copy(tex);
- tex_new->id.us= 0;
+ tex_new->id.us = 0;
/* Remap paths of new ID using old library as base. */
BKE_id_lib_local_paths(bmain, tex->id.lib, &tex_new->id);
- ma= bmain->mat.first;
+ ma = bmain->mat.first;
while (ma) {
- for (a=0; a<MAX_MTEX; a++) {
- if (ma->mtex[a] && ma->mtex[a]->tex==tex) {
- if (ma->id.lib==NULL) {
- ma->mtex[a]->tex= tex_new;
+ for (a = 0; a < MAX_MTEX; a++) {
+ if (ma->mtex[a] && ma->mtex[a]->tex == tex) {
+ if (ma->id.lib == NULL) {
+ ma->mtex[a]->tex = tex_new;
tex_new->id.us++;
tex->id.us--;
}
}
}
- ma= ma->id.next;
+ ma = ma->id.next;
}
- la= bmain->lamp.first;
+ la = bmain->lamp.first;
while (la) {
- for (a=0; a<MAX_MTEX; a++) {
- if (la->mtex[a] && la->mtex[a]->tex==tex) {
- if (la->id.lib==NULL) {
- la->mtex[a]->tex= tex_new;
+ for (a = 0; a < MAX_MTEX; a++) {
+ if (la->mtex[a] && la->mtex[a]->tex == tex) {
+ if (la->id.lib == NULL) {
+ la->mtex[a]->tex = tex_new;
tex_new->id.us++;
tex->id.us--;
}
}
}
- la= la->id.next;
+ la = la->id.next;
}
- wrld= bmain->world.first;
+ wrld = bmain->world.first;
while (wrld) {
- for (a=0; a<MAX_MTEX; a++) {
- if (wrld->mtex[a] && wrld->mtex[a]->tex==tex) {
- if (wrld->id.lib==NULL) {
- wrld->mtex[a]->tex= tex_new;
+ for (a = 0; a < MAX_MTEX; a++) {
+ if (wrld->mtex[a] && wrld->mtex[a]->tex == tex) {
+ if (wrld->id.lib == NULL) {
+ wrld->mtex[a]->tex = tex_new;
tex_new->id.us++;
tex->id.us--;
}
}
}
- wrld= wrld->id.next;
+ wrld = wrld->id.next;
}
- br= bmain->brush.first;
+ br = bmain->brush.first;
while (br) {
- if (br->mtex.tex==tex) {
- if (br->id.lib==NULL) {
- br->mtex.tex= tex_new;
+ if (br->mtex.tex == tex) {
+ if (br->id.lib == NULL) {
+ br->mtex.tex = tex_new;
tex_new->id.us++;
tex->id.us--;
}
}
- br= br->id.next;
+ br = br->id.next;
}
- pa= bmain->particle.first;
+ pa = bmain->particle.first;
while (pa) {
- for (a=0; a<MAX_MTEX; a++) {
- if (pa->mtex[a] && pa->mtex[a]->tex==tex) {
- if (pa->id.lib==NULL) {
- pa->mtex[a]->tex= tex_new;
+ for (a = 0; a < MAX_MTEX; a++) {
+ if (pa->mtex[a] && pa->mtex[a]->tex == tex) {
+ if (pa->id.lib == NULL) {
+ pa->mtex[a]->tex = tex_new;
tex_new->id.us++;
tex->id.us--;
}
}
}
- pa= pa->id.next;
+ pa = pa->id.next;
}
}
}
@@ -1055,10 +1055,10 @@ void make_local_texture(Tex *tex)
#if 0 /* UNUSED */
void autotexname(Tex *tex)
{
- Main *bmain= G.main;
- char texstr[20][15]= {"None" , "Clouds" , "Wood", "Marble", "Magic" , "Blend",
- "Stucci", "Noise" , "Image", "Plugin", "EnvMap" , "Musgrave",
- "Voronoi", "DistNoise", "Point Density", "Voxel Data", "Ocean", "", "", ""};
+ Main *bmain = G.main;
+ char texstr[20][15] = {"None", "Clouds", "Wood", "Marble", "Magic", "Blend",
+ "Stucci", "Noise", "Image", "Plugin", "EnvMap", "Musgrave",
+ "Voronoi", "DistNoise", "Point Density", "Voxel Data", "Ocean", "", "", ""};
Image *ima;
char di[FILE_MAXDIR], fi[FILE_MAXFILE];
@@ -1067,8 +1067,8 @@ void autotexname(Tex *tex)
new_id(&bmain->tex, (ID *)tex, "Noddy");
}
else
- if (tex->type==TEX_IMAGE) {
- ima= tex->ima;
+ if (tex->type == TEX_IMAGE) {
+ ima = tex->ima;
if (ima) {
BLI_strncpy(di, ima->name, sizeof(di));
BLI_splitdirstring(di, fi);
@@ -1078,7 +1078,7 @@ void autotexname(Tex *tex)
}
else new_id(&bmain->tex, (ID *)tex, texstr[tex->type]);
}
- else if (tex->type==TEX_PLUGIN && tex->plugin) new_id(&bmain->tex, (ID *)tex, tex->plugin->pname);
+ else if (tex->type == TEX_PLUGIN && tex->plugin) new_id(&bmain->tex, (ID *)tex, tex->plugin->pname);
else new_id(&bmain->tex, (ID *)tex, texstr[tex->type]);
}
}
@@ -1089,21 +1089,21 @@ void autotexname(Tex *tex)
Tex *give_current_object_texture(Object *ob)
{
Material *ma, *node_ma;
- Tex *tex= NULL;
+ Tex *tex = NULL;
- if (ob==NULL) return NULL;
- if (ob->totcol==0 && !(ob->type==OB_LAMP)) return NULL;
+ if (ob == NULL) return NULL;
+ if (ob->totcol == 0 && !(ob->type == OB_LAMP)) return NULL;
- if (ob->type==OB_LAMP) {
- tex= give_current_lamp_texture(ob->data);
+ if (ob->type == OB_LAMP) {
+ tex = give_current_lamp_texture(ob->data);
}
else {
- ma= give_current_material(ob, ob->actcol);
+ ma = give_current_material(ob, ob->actcol);
- if ((node_ma=give_node_material(ma)))
- ma= node_ma;
+ if ((node_ma = give_node_material(ma)))
+ ma = node_ma;
- tex= give_current_material_texture(ma);
+ tex = give_current_material_texture(ma);
}
return tex;
@@ -1111,12 +1111,12 @@ Tex *give_current_object_texture(Object *ob)
Tex *give_current_lamp_texture(Lamp *la)
{
- MTex *mtex= NULL;
- Tex *tex= NULL;
+ MTex *mtex = NULL;
+ Tex *tex = NULL;
if (la) {
- mtex= la->mtex[(int)(la->texact)];
- if (mtex) tex= mtex->tex;
+ mtex = la->mtex[(int)(la->texact)];
+ if (mtex) tex = mtex->tex;
}
return tex;
@@ -1124,23 +1124,23 @@ Tex *give_current_lamp_texture(Lamp *la)
void set_current_lamp_texture(Lamp *la, Tex *newtex)
{
- int act= la->texact;
+ int act = la->texact;
if (la->mtex[act] && la->mtex[act]->tex)
id_us_min(&la->mtex[act]->tex->id);
if (newtex) {
if (!la->mtex[act]) {
- la->mtex[act]= add_mtex();
- la->mtex[act]->texco= TEXCO_GLOB;
+ la->mtex[act] = add_mtex();
+ la->mtex[act]->texco = TEXCO_GLOB;
}
- la->mtex[act]->tex= newtex;
+ la->mtex[act]->tex = newtex;
id_us_plus(&newtex->id);
}
else if (la->mtex[act]) {
MEM_freeN(la->mtex[act]);
- la->mtex[act]= NULL;
+ la->mtex[act] = NULL;
}
}
@@ -1154,25 +1154,25 @@ bNode *give_current_material_texture_node(Material *ma)
Tex *give_current_material_texture(Material *ma)
{
- MTex *mtex= NULL;
- Tex *tex= NULL;
+ MTex *mtex = NULL;
+ Tex *tex = NULL;
bNode *node;
if (ma && ma->use_nodes && ma->nodetree) {
/* first check texture, then material, this works together
* with a hack that clears the active ID flag for textures on
* making a material node active */
- node= nodeGetActiveID(ma->nodetree, ID_TE);
+ node = nodeGetActiveID(ma->nodetree, ID_TE);
if (node) {
- tex= (Tex *)node->id;
- ma= NULL;
+ tex = (Tex *)node->id;
+ ma = NULL;
}
}
if (ma) {
- mtex= ma->mtex[(int)(ma->texact)];
- if (mtex) tex= mtex->tex;
+ mtex = ma->mtex[(int)(ma->texact)];
+ if (mtex) tex = mtex->tex;
}
return tex;
@@ -1180,27 +1180,27 @@ Tex *give_current_material_texture(Material *ma)
int give_active_mtex(ID *id, MTex ***mtex_ar, short *act)
{
- switch(GS(id->name)) {
- case ID_MA:
- *mtex_ar= ((Material *)id)->mtex;
- if (act) *act= (((Material *)id)->texact);
- break;
- case ID_WO:
- *mtex_ar= ((World *)id)->mtex;
- if (act) *act= (((World *)id)->texact);
- break;
- case ID_LA:
- *mtex_ar= ((Lamp *)id)->mtex;
- if (act) *act= (((Lamp *)id)->texact);
- break;
- case ID_PA:
- *mtex_ar= ((ParticleSettings *)id)->mtex;
- if (act) *act= (((ParticleSettings *)id)->texact);
- break;
- default:
- *mtex_ar = NULL;
- if (act) *act= 0;
- return FALSE;
+ switch (GS(id->name)) {
+ case ID_MA:
+ *mtex_ar = ((Material *)id)->mtex;
+ if (act) *act = (((Material *)id)->texact);
+ break;
+ case ID_WO:
+ *mtex_ar = ((World *)id)->mtex;
+ if (act) *act = (((World *)id)->texact);
+ break;
+ case ID_LA:
+ *mtex_ar = ((Lamp *)id)->mtex;
+ if (act) *act = (((Lamp *)id)->texact);
+ break;
+ case ID_PA:
+ *mtex_ar = ((ParticleSettings *)id)->mtex;
+ if (act) *act = (((ParticleSettings *)id)->texact);
+ break;
+ default:
+ *mtex_ar = NULL;
+ if (act) *act = 0;
+ return FALSE;
}
return TRUE;
@@ -1208,57 +1208,57 @@ int give_active_mtex(ID *id, MTex ***mtex_ar, short *act)
void set_active_mtex(ID *id, short act)
{
- if (act<0) act= 0;
- else if (act>=MAX_MTEX) act= MAX_MTEX-1;
-
- switch(GS(id->name)) {
- case ID_MA:
- ((Material *)id)->texact= act;
- break;
- case ID_WO:
- ((World *)id)->texact= act;
- break;
- case ID_LA:
- ((Lamp *)id)->texact= act;
- break;
- case ID_PA:
- ((ParticleSettings *)id)->texact= act;
- break;
+ if (act < 0) act = 0;
+ else if (act >= MAX_MTEX) act = MAX_MTEX - 1;
+
+ switch (GS(id->name)) {
+ case ID_MA:
+ ((Material *)id)->texact = act;
+ break;
+ case ID_WO:
+ ((World *)id)->texact = act;
+ break;
+ case ID_LA:
+ ((Lamp *)id)->texact = act;
+ break;
+ case ID_PA:
+ ((ParticleSettings *)id)->texact = act;
+ break;
}
}
void set_current_material_texture(Material *ma, Tex *newtex)
{
- Tex *tex= NULL;
+ Tex *tex = NULL;
bNode *node;
if (ma && ma->use_nodes && ma->nodetree) {
- node= nodeGetActiveID(ma->nodetree, ID_TE);
+ node = nodeGetActiveID(ma->nodetree, ID_TE);
if (node) {
- tex= (Tex *)node->id;
+ tex = (Tex *)node->id;
id_us_min(&tex->id);
- node->id= &newtex->id;
+ node->id = &newtex->id;
id_us_plus(&newtex->id);
- ma= NULL;
+ ma = NULL;
}
}
if (ma) {
- int act= (int)ma->texact;
+ int act = (int)ma->texact;
- tex= (ma->mtex[act])? ma->mtex[act]->tex: NULL;
+ tex = (ma->mtex[act]) ? ma->mtex[act]->tex : NULL;
id_us_min(&tex->id);
if (newtex) {
if (!ma->mtex[act])
- ma->mtex[act]= add_mtex();
+ ma->mtex[act] = add_mtex();
- ma->mtex[act]->tex= newtex;
+ ma->mtex[act]->tex = newtex;
id_us_plus(&newtex->id);
}
else if (ma->mtex[act]) {
MEM_freeN(ma->mtex[act]);
- ma->mtex[act]= NULL;
+ ma->mtex[act] = NULL;
}
}
}
@@ -1268,7 +1268,7 @@ int has_current_material_texture(Material *ma)
bNode *node;
if (ma && ma->use_nodes && ma->nodetree) {
- node= nodeGetActiveID(ma->nodetree, ID_TE);
+ node = nodeGetActiveID(ma->nodetree, ID_TE);
if (node)
return 1;
@@ -1279,36 +1279,36 @@ int has_current_material_texture(Material *ma)
Tex *give_current_world_texture(World *world)
{
- MTex *mtex= NULL;
- Tex *tex= NULL;
+ MTex *mtex = NULL;
+ Tex *tex = NULL;
if (!world) return NULL;
- mtex= world->mtex[(int)(world->texact)];
- if (mtex) tex= mtex->tex;
+ mtex = world->mtex[(int)(world->texact)];
+ if (mtex) tex = mtex->tex;
return tex;
}
void set_current_world_texture(World *wo, Tex *newtex)
{
- int act= wo->texact;
+ int act = wo->texact;
if (wo->mtex[act] && wo->mtex[act]->tex)
id_us_min(&wo->mtex[act]->tex->id);
if (newtex) {
if (!wo->mtex[act]) {
- wo->mtex[act]= add_mtex();
- wo->mtex[act]->texco= TEXCO_VIEW;
+ wo->mtex[act] = add_mtex();
+ wo->mtex[act]->texco = TEXCO_VIEW;
}
- wo->mtex[act]->tex= newtex;
+ wo->mtex[act]->tex = newtex;
id_us_plus(&newtex->id);
}
else if (wo->mtex[act]) {
MEM_freeN(wo->mtex[act]);
- wo->mtex[act]= NULL;
+ wo->mtex[act] = NULL;
}
}
@@ -1323,44 +1323,44 @@ void set_current_brush_texture(Brush *br, Tex *newtex)
id_us_min(&br->mtex.tex->id);
if (newtex) {
- br->mtex.tex= newtex;
+ br->mtex.tex = newtex;
id_us_plus(&newtex->id);
}
}
Tex *give_current_particle_texture(ParticleSettings *part)
{
- MTex *mtex= NULL;
- Tex *tex= NULL;
+ MTex *mtex = NULL;
+ Tex *tex = NULL;
if (!part) return NULL;
- mtex= part->mtex[(int)(part->texact)];
- if (mtex) tex= mtex->tex;
+ mtex = part->mtex[(int)(part->texact)];
+ if (mtex) tex = mtex->tex;
return tex;
}
void set_current_particle_texture(ParticleSettings *part, Tex *newtex)
{
- int act= part->texact;
+ int act = part->texact;
if (part->mtex[act] && part->mtex[act]->tex)
id_us_min(&part->mtex[act]->tex->id);
if (newtex) {
if (!part->mtex[act]) {
- part->mtex[act]= add_mtex();
- part->mtex[act]->texco= TEXCO_ORCO;
- part->mtex[act]->blendtype= MTEX_MUL;
+ part->mtex[act] = add_mtex();
+ part->mtex[act]->texco = TEXCO_ORCO;
+ part->mtex[act]->blendtype = MTEX_MUL;
}
- part->mtex[act]->tex= newtex;
+ part->mtex[act]->tex = newtex;
id_us_plus(&newtex->id);
}
else if (part->mtex[act]) {
MEM_freeN(part->mtex[act]);
- part->mtex[act]= NULL;
+ part->mtex[act] = NULL;
}
}
@@ -1370,12 +1370,12 @@ EnvMap *BKE_add_envmap(void)
{
EnvMap *env;
- env= MEM_callocN(sizeof(EnvMap), "envmap");
- env->type= ENV_CUBE;
- env->stype= ENV_ANIM;
- env->clipsta= 0.1;
- env->clipend= 100.0;
- env->cuberes= 600;
+ env = MEM_callocN(sizeof(EnvMap), "envmap");
+ env->type = ENV_CUBE;
+ env->stype = ENV_ANIM;
+ env->clipsta = 0.1;
+ env->clipend = 100.0;
+ env->cuberes = 600;
env->viewscale = 0.5;
return env;
@@ -1388,9 +1388,9 @@ EnvMap *BKE_copy_envmap(EnvMap *env)
EnvMap *envn;
int a;
- envn= MEM_dupallocN(env);
- envn->ok= 0;
- for (a=0; a<6; a++) envn->cube[a]= NULL;
+ envn = MEM_dupallocN(env);
+ envn->ok = 0;
+ for (a = 0; a < 6; a++) envn->cube[a] = NULL;
if (envn->ima) id_us_plus((ID *)envn->ima);
return envn;
@@ -1402,12 +1402,12 @@ void BKE_free_envmapdata(EnvMap *env)
{
unsigned int part;
- for (part=0; part<6; part++) {
+ for (part = 0; part < 6; part++) {
if (env->cube[part])
IMB_freeImBuf(env->cube[part]);
- env->cube[part]= NULL;
+ env->cube[part] = NULL;
}
- env->ok= 0;
+ env->ok = 0;
}
/* ------------------------------------------------------------------------- */
@@ -1426,7 +1426,7 @@ PointDensity *BKE_add_pointdensity(void)
{
PointDensity *pd;
- pd= MEM_callocN(sizeof(PointDensity), "pointdensity");
+ pd = MEM_callocN(sizeof(PointDensity), "pointdensity");
pd->flag = 0;
pd->radius = 0.3f;
pd->falloff_type = TEX_PD_FALLOFF_STD;
@@ -1443,7 +1443,7 @@ PointDensity *BKE_add_pointdensity(void)
pd->totpoints = 0;
pd->object = NULL;
pd->psys = 0;
- pd->psys_cache_space= TEX_PD_WORLDSPACE;
+ pd->psys_cache_space = TEX_PD_WORLDSPACE;
pd->falloff_curve = curvemapping_add(1, 0, 0, 1, 1);
pd->falloff_curve->preset = CURVE_PRESET_LINE;
@@ -1458,10 +1458,10 @@ PointDensity *BKE_copy_pointdensity(PointDensity *pd)
{
PointDensity *pdn;
- pdn= MEM_dupallocN(pd);
+ pdn = MEM_dupallocN(pd);
pdn->point_tree = NULL;
pdn->point_data = NULL;
- if (pdn->coba) pdn->coba= MEM_dupallocN(pdn->coba);
+ if (pdn->coba) pdn->coba = MEM_dupallocN(pdn->coba);
pdn->falloff_curve = curvemapping_copy(pdn->falloff_curve); /* can be NULL */
return pdn;
}
@@ -1492,7 +1492,7 @@ void BKE_free_pointdensity(PointDensity *pd)
/* ------------------------------------------------------------------------- */
-void BKE_free_voxeldatadata(struct VoxelData *vd)
+void BKE_free_voxeldatadata(VoxelData *vd)
{
if (vd->dataset) {
MEM_freeN(vd->dataset);
@@ -1501,21 +1501,21 @@ void BKE_free_voxeldatadata(struct VoxelData *vd)
}
-void BKE_free_voxeldata(struct VoxelData *vd)
+void BKE_free_voxeldata(VoxelData *vd)
{
BKE_free_voxeldatadata(vd);
MEM_freeN(vd);
}
-struct VoxelData *BKE_add_voxeldata(void)
+VoxelData *BKE_add_voxeldata(void)
{
VoxelData *vd;
- vd= MEM_callocN(sizeof(struct VoxelData), "voxeldata");
+ vd = MEM_callocN(sizeof(VoxelData), "voxeldata");
vd->dataset = NULL;
vd->resol[0] = vd->resol[1] = vd->resol[2] = 1;
- vd->interp_type= TEX_VD_LINEAR;
- vd->file_format= TEX_VD_SMOKE;
+ vd->interp_type = TEX_VD_LINEAR;
+ vd->file_format = TEX_VD_SMOKE;
vd->int_multiplier = 1.0;
vd->extend = TEX_CLIP;
vd->object = NULL;
@@ -1523,13 +1523,13 @@ struct VoxelData *BKE_add_voxeldata(void)
vd->ok = 0;
return vd;
- }
+}
-struct VoxelData *BKE_copy_voxeldata(struct VoxelData *vd)
+VoxelData *BKE_copy_voxeldata(VoxelData *vd)
{
VoxelData *vdn;
- vdn= MEM_dupallocN(vd);
+ vdn = MEM_dupallocN(vd);
vdn->dataset = NULL;
return vdn;
@@ -1537,20 +1537,20 @@ struct VoxelData *BKE_copy_voxeldata(struct VoxelData *vd)
/* ------------------------------------------------------------------------- */
-struct OceanTex *BKE_add_oceantex(void)
+OceanTex *BKE_add_oceantex(void)
{
OceanTex *ot;
- ot= MEM_callocN(sizeof(struct OceanTex), "ocean texture");
+ ot = MEM_callocN(sizeof(struct OceanTex), "ocean texture");
ot->output = TEX_OCN_DISPLACEMENT;
ot->object = NULL;
return ot;
}
-struct OceanTex *BKE_copy_oceantex(struct OceanTex *ot)
+OceanTex *BKE_copy_oceantex(struct OceanTex *ot)
{
- OceanTex *otn= MEM_dupallocN(ot);
+ OceanTex *otn = MEM_dupallocN(ot);
return otn;
}
@@ -1568,8 +1568,9 @@ int BKE_texture_dependsOnTime(const struct Tex *texture)
// assume all plugins depend on time
return 1;
}
- else if ( texture->ima &&
- ELEM(texture->ima->source, IMA_SRC_SEQUENCE, IMA_SRC_MOVIE)) {
+ else if (texture->ima &&
+ ELEM(texture->ima->source, IMA_SRC_SEQUENCE, IMA_SRC_MOVIE))
+ {
return 1;
}
else if (texture->adt) {
diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c
index 7654c361d14..f1100a1ae08 100644
--- a/source/blender/blenkernel/intern/tracking.c
+++ b/source/blender/blenkernel/intern/tracking.c
@@ -107,7 +107,7 @@ void BKE_tracking_clamp_track(MovieTrackingTrack *track, int event)
float max_pyramid_level_factor = 1.0;
if (track->tracker == TRACKER_KLT) {
- max_pyramid_level_factor= 1 << (track->pyramid_levels - 1);
+ max_pyramid_level_factor = 1 << (track->pyramid_levels - 1);
}
/* sort */
@@ -166,11 +166,11 @@ void BKE_tracking_clamp_track(MovieTrackingTrack *track, int event)
/* search shouldn't be moved inside pattern */
if (track->search_min[a] > pat_min[a]) {
track->search_min[a] = pat_min[a];
- track->search_max[a] = track->search_min[a]+dim[a];
+ track->search_max[a] = track->search_min[a] + dim[a];
}
if (track->search_max[a] < pat_max[a]) {
track->search_max[a] = pat_max[a];
- track->search_min[a] = track->search_max[a]-dim[a];
+ track->search_min[a] = track->search_max[a] - dim[a];
}
}
}
@@ -196,8 +196,8 @@ void BKE_tracking_clamp_track(MovieTrackingTrack *track, int event)
sub_v2_v2v2(dim, track->pat_max, track->pat_min);
for (a = 0; a < 2; a++) {
- track->pat_min[a] = -dim[a]/2.0f;
- track->pat_max[a] = dim[a]/2.0f;
+ track->pat_min[a] = -dim[a] / 2.0f;
+ track->pat_max[a] = dim[a] / 2.0f;
}
}
}
@@ -277,7 +277,7 @@ MovieTrackingTrack *BKE_tracking_add_track(MovieTracking *tracking, ListBase *tr
MovieTrackingMarker *BKE_tracking_insert_marker(MovieTrackingTrack *track, MovieTrackingMarker *marker)
{
- MovieTrackingMarker *old_marker= NULL;
+ MovieTrackingMarker *old_marker = NULL;
if (track->markersnr)
old_marker = BKE_tracking_exact_marker(track, marker->framenr);
@@ -302,8 +302,9 @@ MovieTrackingMarker *BKE_tracking_insert_marker(MovieTrackingTrack *track, Movie
else
track->markers = MEM_callocN(sizeof(MovieTrackingMarker), "MovieTracking markers");
- memmove(track->markers+a+2, track->markers+a+1, (track->markersnr-a-2)*sizeof(MovieTrackingMarker));
- track->markers[a+1] = *marker;
+ memmove(track->markers + a + 2, track->markers + a + 1,
+ (track->markersnr - a - 2) * sizeof(MovieTrackingMarker));
+ track->markers[a + 1] = *marker;
track->last_marker = a + 1;
@@ -313,14 +314,15 @@ MovieTrackingMarker *BKE_tracking_insert_marker(MovieTrackingTrack *track, Movie
void BKE_tracking_delete_marker(MovieTrackingTrack *track, int framenr)
{
- int a= 0;
+ int a = 0;
- while (a<track->markersnr) {
+ while (a < track->markersnr) {
if (track->markers[a].framenr == framenr) {
if (track->markersnr > 1) {
- memmove(track->markers+a, track->markers+a+1, (track->markersnr-a-1)*sizeof(MovieTrackingMarker));
+ memmove(track->markers + a, track->markers + a + 1,
+ (track->markersnr - a - 1) * sizeof(MovieTrackingMarker));
track->markersnr--;
- track->markers = MEM_reallocN(track->markers, sizeof(MovieTrackingMarker)*track->markersnr);
+ track->markers = MEM_reallocN(track->markers, sizeof(MovieTrackingMarker) * track->markersnr);
}
else {
MEM_freeN(track->markers);
@@ -337,7 +339,7 @@ void BKE_tracking_delete_marker(MovieTrackingTrack *track, int framenr)
MovieTrackingMarker *BKE_tracking_get_marker(MovieTrackingTrack *track, int framenr)
{
- int a = track->markersnr-1;
+ int a = track->markersnr - 1;
if (!track->markersnr)
return NULL;
@@ -360,7 +362,7 @@ MovieTrackingMarker *BKE_tracking_get_marker(MovieTrackingTrack *track, int fram
}
/* if there's no marker for exact position, use nearest marker from left side */
- return &track->markers[a-1];
+ return &track->markers[a - 1];
}
else {
while (a >= 0 && track->markers[a].framenr >= framenr) {
@@ -461,16 +463,16 @@ void BKE_tracking_clear_path(MovieTrackingTrack *track, int ref_frame, int actio
}
if (track->markersnr)
- put_disabled_marker(track, &track->markers[track->markersnr-1], 0, 1);
+ put_disabled_marker(track, &track->markers[track->markersnr - 1], 0, 1);
}
else if (action == TRACK_CLEAR_UPTO) {
- a= track->markersnr-1;
+ a = track->markersnr - 1;
while (a >= 0) {
if (track->markers[a].framenr <= ref_frame) {
- memmove(track->markers, track->markers+a, (track->markersnr-a)*sizeof(MovieTrackingMarker));
+ memmove(track->markers, track->markers + a, (track->markersnr - a) * sizeof(MovieTrackingMarker));
- track->markersnr = track->markersnr-a;
+ track->markersnr = track->markersnr - a;
track->markers = MEM_reallocN(track->markers, sizeof(MovieTrackingMarker)*track->markersnr);
break;
@@ -521,8 +523,8 @@ void BKE_tracking_join_tracks(MovieTrackingTrack *dst_track, MovieTrackingTrack
markers[i] = dst_track->markers[b++];
}
else {
- if ((src_track->markers[a].flag & MARKER_DISABLED)==0) {
- if ((dst_track->markers[b].flag & MARKER_DISABLED)==0) {
+ if ((src_track->markers[a].flag & MARKER_DISABLED) == 0) {
+ if ((dst_track->markers[b].flag & MARKER_DISABLED) == 0) {
/* both tracks are enabled on this frame, so find the whole segment
* on which tracks are intersecting and blend tracks using linear
* interpolation to prevent jumps */
@@ -532,8 +534,8 @@ void BKE_tracking_join_tracks(MovieTrackingTrack *dst_track, MovieTrackingTrack
int j, inverse = 0;
inverse = (b == 0) ||
- (dst_track->markers[b-1].flag & MARKER_DISABLED) ||
- (dst_track->markers[b-1].framenr != frame - 1);
+ (dst_track->markers[b - 1].flag & MARKER_DISABLED) ||
+ (dst_track->markers[b - 1].framenr != frame - 1);
/* find length of intersection */
while (a < src_track->markersnr && b < dst_track->markersnr) {
@@ -632,6 +634,25 @@ static void tracking_objects_free(ListBase *objects)
BLI_freelistN(objects);
}
+static void tracking_dopesheet_free(MovieTrackingDopesheet *dopesheet)
+{
+ MovieTrackingDopesheetChannel *channel;
+
+ channel = dopesheet->channels.first;
+ while (channel) {
+ if (channel->segments) {
+ MEM_freeN(channel->segments);
+ }
+
+ channel = channel->next;
+ }
+
+ BLI_freelistN(&dopesheet->channels);
+
+ dopesheet->channels.first = dopesheet->channels.last = NULL;
+ dopesheet->tot_channel = 0;
+}
+
void BKE_tracking_free(MovieTracking *tracking)
{
tracking_tracks_free(&tracking->tracks);
@@ -643,6 +664,8 @@ void BKE_tracking_free(MovieTracking *tracking)
if (tracking->camera.intrinsics)
BKE_tracking_distortion_destroy(tracking->camera.intrinsics);
+
+ tracking_dopesheet_free(&tracking->dopesheet);
}
static MovieTrackingTrack *duplicate_track(MovieTrackingTrack *track)
@@ -680,6 +703,8 @@ void BKE_tracking_clipboard_copy_tracks(MovieTracking *tracking, MovieTrackingOb
ListBase *tracksbase = BKE_tracking_object_tracks(tracking, object);
MovieTrackingTrack *track = tracksbase->first;
+ BKE_tracking_free_clipboard();
+
while (track) {
if (TRACK_SELECTED(track) && (track->flag & TRACK_HIDDEN) == 0) {
MovieTrackingTrack *new_track = duplicate_track(track);
@@ -763,7 +788,7 @@ static void tracks_map_get(TracksMap *map, int index, MovieTrackingTrack **track
static void tracks_map_insert(TracksMap *map, MovieTrackingTrack *track, void *customdata)
{
- MovieTrackingTrack new_track= *track;
+ MovieTrackingTrack new_track = *track;
new_track.markers = MEM_dupallocN(new_track.markers);
@@ -843,10 +868,10 @@ static void tracks_map_merge(TracksMap *map, MovieTracking *tracking)
BLI_ghash_insert(map->hash, track, new_track);
if (replace_sel) /* update current selection in clip */
- tracking->act_track= new_track;
+ tracking->act_track = new_track;
if (replace_rot) /* update track used for rotation stabilization */
- tracking->stabilization.rot_track= new_track;
+ tracking->stabilization.rot_track = new_track;
BLI_addtail(&tracks, new_track);
}
@@ -859,7 +884,7 @@ static void tracks_map_merge(TracksMap *map, MovieTracking *tracking)
track->next = track->prev = NULL;
BLI_addtail(&new_tracks, track);
- track= next;
+ track = next;
}
/* now move all tracks which are currently operating and keep their names unique */
@@ -874,15 +899,15 @@ static void tracks_map_merge(TracksMap *map, MovieTracking *tracking)
BLI_uniquename(&new_tracks, track, "Track", '.', offsetof(MovieTrackingTrack, name), sizeof(track->name));
- track= next;
+ track = next;
}
- *old_tracks= new_tracks;
+ *old_tracks = new_tracks;
}
static void tracks_map_free(TracksMap *map, void (*customdata_free) (void *customdata))
{
- int i= 0;
+ int i = 0;
BLI_ghash_free(map->hash, NULL, NULL);
@@ -946,7 +971,7 @@ MovieTrackingContext *BKE_tracking_context_new(MovieClip *clip, MovieClipUser *u
/* count */
track = tracksbase->first;
while (track) {
- if (TRACK_SELECTED(track) && (track->flag & (TRACK_LOCKED | TRACK_HIDDEN))==0) {
+ if (TRACK_SELECTED(track) && (track->flag & (TRACK_LOCKED | TRACK_HIDDEN)) == 0) {
MovieTrackingMarker *marker = BKE_tracking_get_marker(track, user->framenr);
if ((marker->flag & MARKER_DISABLED) == 0)
@@ -977,13 +1002,13 @@ MovieTrackingContext *BKE_tracking_context_new(MovieClip *clip, MovieClipUser *u
#ifdef WITH_LIBMV
{
- float patx = (int)((track->pat_max[0]-track->pat_min[0])*width),
- paty = (int)((track->pat_max[1]-track->pat_min[1])*height);
+ float patx = (int)((track->pat_max[0] - track->pat_min[0]) * width),
+ paty = (int)((track->pat_max[1] - track->pat_min[1]) * height);
- float search_size_x = (track->search_max[0]-track->search_min[0])*width;
- float search_size_y = (track->search_max[1]-track->search_min[1])*height;
- float pattern_size_x = (track->pat_max[0]-track->pat_min[0])*width;
- float pattern_size_y = (track->pat_max[1]-track->pat_min[1])*height;
+ float search_size_x = (track->search_max[0] - track->search_min[0]) * width;
+ float search_size_y = (track->search_max[1] - track->search_min[1]) * height;
+ float pattern_size_x = (track->pat_max[0] - track->pat_min[0]) * width;
+ float pattern_size_y = (track->pat_max[1] - track->pat_min[1]) * height;
int wndx = (int)patx / 2, wndy = (int)paty / 2;
int half_wnd = MAX2(wndx, wndy);
@@ -998,17 +1023,20 @@ MovieTrackingContext *BKE_tracking_context_new(MovieClip *clip, MovieClipUser *u
* than the search size */
int level = MIN2(track->pyramid_levels, max_pyramid_levels);
- if (track->tracker==TRACKER_KLT) {
- track_context.region_tracker =
- libmv_pyramidRegionTrackerNew(100, level, half_wnd, track->minimum_correlation);
+ struct libmv_RegionTracker *region_tracker;
+
+ if (track->tracker == TRACKER_KLT) {
+ region_tracker = libmv_pyramidRegionTrackerNew(100, level, half_wnd,
+ track->minimum_correlation);
}
else if (track->tracker == TRACKER_HYBRID) {
- track_context.region_tracker =
- libmv_hybridRegionTrackerNew(100, half_wnd, track->minimum_correlation);
+ region_tracker = libmv_hybridRegionTrackerNew(100, half_wnd, track->minimum_correlation);
}
else if (track->tracker == TRACKER_SAD) {
- track_context.region_tracker= libmv_bruteRegionTrackerNew(MAX2(wndx, wndy), track->minimum_correlation);
+ region_tracker = libmv_bruteRegionTrackerNew(MAX2(wndx, wndy), track->minimum_correlation);
}
+
+ track_context.region_tracker = region_tracker;
}
#endif
@@ -1030,7 +1058,7 @@ MovieTrackingContext *BKE_tracking_context_new(MovieClip *clip, MovieClipUser *u
* - MCLIP_USE_PROXY_CUSTOM_DIR is needed because proxy/timecode files might
* be stored in a different location
* ignore all the rest possible flags for now */
- context->clip_flag = clip->flag&MCLIP_TIMECODE_FLAGS;
+ context->clip_flag = clip->flag & MCLIP_TIMECODE_FLAGS;
context->user = *user;
context->user.render_size = MCLIP_PROXY_RENDER_SIZE_FULL;
@@ -1071,7 +1099,8 @@ void BKE_tracking_context_free(MovieTrackingContext *context)
/* zap channels from the imbuf that are disabled by the user. this can lead to
* better tracks sometimes. however, instead of simply zeroing the channels
* out, do a partial grayscale conversion so the display is better. */
-void BKE_tracking_disable_imbuf_channels(ImBuf *ibuf, int disable_red, int disable_green, int disable_blue, int grayscale)
+void BKE_tracking_disable_imbuf_channels(ImBuf *ibuf, int disable_red, int disable_green, int disable_blue,
+ int grayscale)
{
int x, y;
float scale;
@@ -1158,13 +1187,17 @@ static ImBuf *get_area_imbuf(ImBuf *ibuf, MovieTrackingTrack *track, MovieTracki
h = (max[1] - min[1]) * ibuf->y;
/* dimensions should be odd */
- w = w|1;
- h = h|1;
+ w = w | 1;
+ h = h | 1;
- x1 = x-(int)(w * (-min[0] / (max[0] - min[0])));
- y1 = y-(int)(h * (-min[1] / (max[1] - min[1])));
+ x1 = x - (int)(w * (-min[0] / (max[0] - min[0])));
+ y1 = y - (int)(h * (-min[1] / (max[1] - min[1])));
+
+ if (ibuf->rect_float)
+ tmpibuf = IMB_allocImBuf(w + margin * 2, h + margin * 2, 32, IB_rectfloat);
+ else
+ tmpibuf = IMB_allocImBuf(w + margin * 2, h + margin * 2, 32, IB_rect);
- tmpibuf = IMB_allocImBuf(w+margin*2, h+margin*2, 32, IB_rect);
IMB_rectcpy(tmpibuf, ibuf, 0, 0, x1 - margin, y1 - margin, w + margin * 2, h + margin * 2);
if (pos != NULL) {
@@ -1287,18 +1320,18 @@ static ImBuf *get_keyframed_ibuf(MovieTrackingContext *context, MovieTrackingTra
MovieTrackingMarker *marker, MovieTrackingMarker **marker_keyed)
{
int framenr = marker->framenr;
- int a = marker-track->markers;
+ int a = marker - track->markers;
*marker_keyed = marker;
while (a >= 0 && a < track->markersnr) {
- int next = (context->backwards) ? a+1 : a-1;
+ int next = (context->backwards) ? a + 1 : a - 1;
int is_keyframed = FALSE;
MovieTrackingMarker *cur_marker = &track->markers[a];
MovieTrackingMarker *next_marker = NULL;
- if (next>=0 && next<track->markersnr)
- next_marker= &track->markers[next];
+ if (next >= 0 && next < track->markersnr)
+ next_marker = &track->markers[next];
/* if next mrker is disabled, stop searching keyframe and use current frame as keyframe */
if (next_marker && next_marker->flag & MARKER_DISABLED)
@@ -1352,6 +1385,8 @@ void BKE_tracking_sync(MovieTrackingContext *context)
newframe = context->user.framenr - 1;
context->sync_frame = newframe;
+
+ tracking->dopesheet.ok = FALSE;
}
void BKE_tracking_sync_user(MovieClipUser *user, MovieTrackingContext *context)
@@ -1417,8 +1452,8 @@ int BKE_tracking_next(MovieTrackingContext *context)
margin[1] = MAX2(margin[1], (float)track->margin / ibuf_new->y);
/* do not track markers which are too close to boundary */
- if (marker->pos[0]<margin[0] || marker->pos[0]>1.0f-margin[0] ||
- marker->pos[1]<margin[1] || marker->pos[1]>1.0f-margin[1])
+ if (marker->pos[0] < margin[0] || marker->pos[0] > 1.0f - margin[0] ||
+ marker->pos[1] < margin[1] || marker->pos[1] > 1.0f - margin[1])
{
onbound = TRUE;
}
@@ -1473,7 +1508,7 @@ int BKE_tracking_next(MovieTrackingContext *context)
}
marker_new.flag |= MARKER_TRACKED;
- marker_new.framenr= nextfra;
+ marker_new.framenr = nextfra;
#pragma omp critical
{
@@ -1523,6 +1558,7 @@ typedef struct MovieReconstructContext {
#endif
char object_name[MAX_NAME];
int is_camera;
+ short motion_flag;
float focal_length;
float principal_point[2];
@@ -1643,7 +1679,8 @@ static int retrieve_libmv_reconstruct_tracks(MovieReconstructContext *context, M
reconstruction->camnr = 0;
reconstruction->cameras = NULL;
- reconstructed = MEM_callocN((efra-sfra+1)*sizeof(MovieReconstructedCamera), "temp reconstructed camera");
+ reconstructed = MEM_callocN((efra - sfra + 1) * sizeof(MovieReconstructedCamera),
+ "temp reconstructed camera");
for (a = sfra; a <= efra; a++) {
double matd[4][4];
@@ -1678,8 +1715,9 @@ static int retrieve_libmv_reconstruct_tracks(MovieReconstructContext *context, M
}
if (reconstruction->camnr) {
- reconstruction->cameras = MEM_callocN(reconstruction->camnr * sizeof(MovieReconstructedCamera), "reconstructed camera");
- memcpy(reconstruction->cameras, reconstructed, reconstruction->camnr * sizeof(MovieReconstructedCamera));
+ int size = reconstruction->camnr * sizeof(MovieReconstructedCamera);
+ reconstruction->cameras = MEM_callocN(size, "reconstructed camera");
+ memcpy(reconstruction->cameras, reconstructed, size);
}
if (origin_set) {
@@ -1731,7 +1769,7 @@ static int get_refine_intrinsics_flags(MovieTracking *tracking, MovieTrackingObj
static int count_tracks_on_both_keyframes(MovieTracking *tracking, ListBase *tracksbase)
{
int tot = 0;
- int frame1 = tracking->settings.keyframe1, frame2= tracking->settings.keyframe2;
+ int frame1 = tracking->settings.keyframe1, frame2 = tracking->settings.keyframe2;
MovieTrackingTrack *track;
track = tracksbase->first;
@@ -1752,8 +1790,13 @@ int BKE_tracking_can_reconstruct(MovieTracking *tracking, MovieTrackingObject *o
#if WITH_LIBMV
ListBase *tracksbase = BKE_tracking_object_tracks(tracking, object);
- if (count_tracks_on_both_keyframes(tracking, tracksbase)<8) {
- BLI_strncpy(error_msg, "At least 8 common tracks on both of keyframes are needed for reconstruction", error_size);
+ if (tracking->settings.motion_flag & TRACKING_MOTION_MODAL) {
+ /* TODO: check for number of tracks? */
+ return TRUE;
+ }
+ else if (count_tracks_on_both_keyframes(tracking, tracksbase) < 8) {
+ BLI_strncpy(error_msg, "At least 8 common tracks on both of keyframes are needed for reconstruction",
+ error_size);
return FALSE;
}
@@ -1781,13 +1824,14 @@ MovieReconstructContext* BKE_tracking_reconstruction_context_new(MovieTracking *
MovieTrackingTrack *track;
BLI_strncpy(context->object_name, object->name, sizeof(context->object_name));
- context->is_camera = object->flag&TRACKING_OBJECT_CAMERA;
+ context->is_camera = object->flag & TRACKING_OBJECT_CAMERA;
+ context->motion_flag = tracking->settings.motion_flag;
context->tracks_map = tracks_map_new(context->object_name, context->is_camera, num_tracks, 0);
track = tracksbase->first;
while (track) {
- int first = 0, last = track->markersnr-1;
+ int first = 0, last = track->markersnr - 1;
MovieTrackingMarker *first_marker = &track->markers[0];
MovieTrackingMarker *last_marker = &track->markers[track->markersnr - 1];
@@ -1803,7 +1847,7 @@ MovieReconstructContext* BKE_tracking_reconstruction_context_new(MovieTracking *
last_marker--;
}
- if (first<track->markersnr - 1)
+ if (first < track->markersnr - 1)
sfra = MIN2(sfra, first_marker->framenr);
if (last >= 0)
@@ -1857,7 +1901,7 @@ void BKE_tracking_reconstruction_context_free(MovieReconstructContext *context)
#ifdef WITH_LIBMV
static void solve_reconstruction_update_cb(void *customdata, double progress, const char *message)
{
- ReconstructProgressData *progressdata= customdata;
+ ReconstructProgressData *progressdata = customdata;
if (progressdata->progress) {
*progressdata->progress = progress;
@@ -1894,13 +1938,22 @@ void BKE_tracking_solve_reconstruction(MovieReconstructContext *context, short *
progressdata.stats_message = stats_message;
progressdata.message_size = message_size;
- context->reconstruction = libmv_solveReconstruction(context->tracks,
- context->keyframe1, context->keyframe2,
- context->refine_flags,
- context->focal_length,
- context->principal_point[0], context->principal_point[1],
- context->k1, context->k2, context->k3,
- solve_reconstruction_update_cb, &progressdata);
+ if (context->motion_flag & TRACKING_MOTION_MODAL) {
+ context->reconstruction = libmv_solveModal(context->tracks,
+ context->focal_length,
+ context->principal_point[0], context->principal_point[1],
+ context->k1, context->k2, context->k3,
+ solve_reconstruction_update_cb, &progressdata);
+ }
+ else {
+ context->reconstruction = libmv_solveReconstruction(context->tracks,
+ context->keyframe1, context->keyframe2,
+ context->refine_flags,
+ context->focal_length,
+ context->principal_point[0], context->principal_point[1],
+ context->k1, context->k2, context->k3,
+ solve_reconstruction_update_cb, &progressdata);
+ }
error = libmv_reprojectionError(context->reconstruction);
@@ -1964,27 +2017,27 @@ MovieTrackingTrack *BKE_tracking_named_track(MovieTracking *tracking, MovieTrack
static int reconstruction_camera_index(MovieTrackingReconstruction *reconstruction, int framenr, int nearest)
{
- MovieReconstructedCamera *cameras= reconstruction->cameras;
+ MovieReconstructedCamera *cameras = reconstruction->cameras;
int a = 0, d = 1;
if (!reconstruction->camnr)
return -1;
- if (framenr<cameras[0].framenr) {
+ if (framenr < cameras[0].framenr) {
if (nearest)
return 0;
else
return -1;
}
- if (framenr>cameras[reconstruction->camnr - 1].framenr) {
+ if (framenr > cameras[reconstruction->camnr - 1].framenr) {
if (nearest)
return reconstruction->camnr - 1;
else
return -1;
}
- if (reconstruction->last_camera<reconstruction->camnr)
+ if (reconstruction->last_camera < reconstruction->camnr)
a = reconstruction->last_camera;
if (cameras[a].framenr >= framenr)
@@ -2066,9 +2119,9 @@ void BKE_tracking_get_interpolated_camera(MovieTracking *tracking, MovieTracking
}
if (cameras[a].framenr != framenr && a > 0 && a < reconstruction->camnr - 1) {
- float t = ((float)framenr-cameras[a].framenr) / (cameras[a + 1].framenr-cameras[a].framenr);
+ float t = ((float)framenr - cameras[a].framenr) / (cameras[a + 1].framenr - cameras[a].framenr);
- blend_m4_m4m4(mat, cameras[a].mat, cameras[a+1].mat, t);
+ blend_m4_m4m4(mat, cameras[a].mat, cameras[a + 1].mat, t);
}
else {
copy_m4_m4(mat, cameras[a].mat);
@@ -2083,11 +2136,11 @@ void BKE_get_tracking_mat(Scene *scene, Object *ob, float mat[4][4])
if (scene->camera)
ob = scene->camera;
else
- ob = scene_find_camera(scene);
+ ob = BKE_scene_camera_find(scene);
}
if (ob)
- where_is_object_mat(scene, ob, mat);
+ BKE_object_where_is_calc_mat4(scene, ob, mat);
else
unit_m4(mat);
}
@@ -2095,8 +2148,8 @@ void BKE_get_tracking_mat(Scene *scene, Object *ob, float mat[4][4])
void BKE_tracking_camera_shift(MovieTracking *tracking, int winx, int winy, float *shiftx, float *shifty)
{
/* indeed in both of cases it should be winx -- it's just how camera shift works for blender's camera */
- *shiftx = (0.5f * winx-tracking->camera.principal[0]) / winx;
- *shifty = (0.5f * winy-tracking->camera.principal[1]) / winx;
+ *shiftx = (0.5f * winx - tracking->camera.principal[0]) / winx;
+ *shifty = (0.5f * winy - tracking->camera.principal[1]) / winx;
}
void BKE_tracking_camera_to_blender(MovieTracking *tracking, Scene *scene, Camera *camera, int width, int height)
@@ -2105,9 +2158,9 @@ void BKE_tracking_camera_to_blender(MovieTracking *tracking, Scene *scene, Camer
camera->sensor_x = tracking->camera.sensor_width;
camera->sensor_fit = CAMERA_SENSOR_FIT_AUTO;
- camera->lens = focal*camera->sensor_x/width;
+ camera->lens = focal * camera->sensor_x / width;
- scene->r.xsch = width*tracking->camera.pixel_aspect;
+ scene->r.xsch = width * tracking->camera.pixel_aspect;
scene->r.ysch = height;
scene->r.xasp = 1.0f;
@@ -2120,7 +2173,7 @@ void BKE_tracking_projection_matrix(MovieTracking *tracking, MovieTrackingObject
int framenr, int winx, int winy, float mat[4][4])
{
MovieReconstructedCamera *camera;
- float lens = tracking->camera.focal*tracking->camera.sensor_width/(float)winx;
+ float lens = tracking->camera.focal * tracking->camera.sensor_width / (float)winx;
float viewfac, pixsize, left, right, bottom, top, clipsta, clipend;
float winmat[4][4];
float ycor = 1.0f / tracking->camera.pixel_aspect;
@@ -2132,11 +2185,11 @@ void BKE_tracking_projection_matrix(MovieTracking *tracking, MovieTrackingObject
clipend = 1000.0f;
if (winx >= winy)
- viewfac = (lens*winx)/tracking->camera.sensor_width;
+ viewfac = (lens * winx) / tracking->camera.sensor_width;
else
- viewfac = (ycor*lens*winy)/tracking->camera.sensor_width;
+ viewfac = (ycor * lens * winy) / tracking->camera.sensor_width;
- pixsize = clipsta/viewfac;
+ pixsize = clipsta / viewfac;
left = -0.5f * (float)winx + shiftx * winside;
bottom = -0.5f * (ycor) * (float)winy + shifty * winside;
@@ -2201,7 +2254,7 @@ MovieTrackingObject *BKE_tracking_get_camera_object(MovieTracking *tracking)
if (object->flag & TRACKING_OBJECT_CAMERA)
return object;
- object= object->next;
+ object = object->next;
}
return NULL;
@@ -2234,11 +2287,11 @@ MovieTrackingReconstruction *BKE_tracking_get_reconstruction(MovieTracking *trac
void BKE_tracking_apply_intrinsics(MovieTracking *tracking, float co[2], float nco[2])
{
- MovieTrackingCamera *camera= &tracking->camera;
+ MovieTrackingCamera *camera = &tracking->camera;
#ifdef WITH_LIBMV
double x, y;
- float aspy = 1.0f/tracking->camera.pixel_aspect;
+ float aspy = 1.0f / tracking->camera.pixel_aspect;
/* normalize coords */
x = (co[0] - camera->principal[0]) / camera->focal;
@@ -2286,7 +2339,7 @@ static int point_in_stroke(bGPDstroke *stroke, float x, float y)
prev = stroke->totpoints - 1;
- for (i = 0; i<stroke->totpoints; i++) {
+ for (i = 0; i < stroke->totpoints; i++) {
if ((points[i].y < y && points[prev].y >= y) || (points[prev].y < y && points[i].y >= y)) {
float fac = (y - points[i].y) / (points[prev].y - points[i].y);
@@ -2294,7 +2347,7 @@ static int point_in_stroke(bGPDstroke *stroke, float x, float y)
count++;
}
- prev= i;
+ prev = i;
}
return count % 2;
@@ -2403,10 +2456,10 @@ MovieTrackingTrack *BKE_tracking_indexed_track(MovieTracking *tracking, int trac
track = track->next;
}
- object= object->next;
+ object = object->next;
}
- *tracksbase_r= NULL;
+ *tracksbase_r = NULL;
return NULL;
}
@@ -2467,7 +2520,7 @@ static void calculate_stabdata(MovieTracking *tracking, int framenr, float width
b[0] *= width;
b[1] *= height;
- *angle = -atan2(a[0]*b[1]-a[1]*b[0], a[0]*b[0]+a[1]*b[1]);
+ *angle = -atan2(a[0] * b[1] - a[1] * b[0], a[0] * b[0] + a[1] * b[1]);
*angle *= stab->rotinf;
/* convert to rotation around image center */
@@ -2523,10 +2576,10 @@ static float stabilization_auto_scale_factor(MovieTracking *tracking, int width,
for (i = 0; i < 4; i++) {
int j;
- float a[3] = {0.0f, 0.0f, 0.0f}, b[3]= {0.0f, 0.0f, 0.0f};
+ float a[3] = {0.0f, 0.0f, 0.0f}, b[3] = {0.0f, 0.0f, 0.0f};
copy_v3_v3(a, points[i]);
- copy_v3_v3(b, points[(i+1)%4]);
+ copy_v3_v3(b, points[(i + 1) % 4]);
mul_m4_v3(mat, a);
mul_m4_v3(mat, b);
@@ -2582,7 +2635,7 @@ static float stabilization_auto_scale_factor(MovieTracking *tracking, int width,
stab->scale = scale;
- if (stab->maxscale>0.0f)
+ if (stab->maxscale > 0.0f)
stab->scale = MIN2(stab->scale, stab->maxscale);
}
else {
@@ -2623,15 +2676,16 @@ static ImBuf* stabilize_alloc_ibuf(ImBuf *cacheibuf, ImBuf *srcibuf, int fill)
return cacheibuf;
}
-void BKE_tracking_stabilization_data(MovieTracking *tracking, int framenr, int width, int height, float loc[2], float *scale, float *angle)
+void BKE_tracking_stabilization_data(MovieTracking *tracking, int framenr, int width, int height,
+ float loc[2], float *scale, float *angle)
{
float firstmedian[2], median[2];
MovieTrackingStabilization *stab = &tracking->stabilization;
if ((stab->flag & TRACKING_2D_STABILIZATION) == 0) {
zero_v2(loc);
- *scale= 1.0f;
- *angle= 0.0f;
+ *scale = 1.0f;
+ *angle = 0.0f;
return;
}
@@ -2661,7 +2715,8 @@ void BKE_tracking_stabilization_data(MovieTracking *tracking, int framenr, int w
}
}
-ImBuf *BKE_tracking_stabilize(MovieTracking *tracking, int framenr, ImBuf *ibuf, float loc[2], float *scale, float *angle)
+ImBuf *BKE_tracking_stabilize(MovieTracking *tracking, int framenr, ImBuf *ibuf,
+ float loc[2], float *scale, float *angle)
{
float tloc[2], tscale, tangle;
MovieTrackingStabilization *stab = &tracking->stabilization;
@@ -2750,18 +2805,19 @@ ImBuf *BKE_tracking_stabilize(MovieTracking *tracking, int framenr, ImBuf *ibuf,
copy_v2_v2(loc, tloc);
if (scale)
- *scale= tscale;
+ *scale = tscale;
if (angle)
- *angle= tangle;
+ *angle = tangle;
return tmpibuf;
}
-void BKE_tracking_stabdata_to_mat4(int width, int height, float aspect, float loc[2], float scale, float angle, float mat[4][4])
+void BKE_tracking_stabdata_to_mat4(int width, int height, float aspect,
+ float loc[2], float scale, float angle, float mat[4][4])
{
float lmat[4][4], rmat[4][4], smat[4][4], cmat[4][4], icmat[4][4], amat[4][4], iamat[4][4];
- float svec[3]= {scale, scale, scale};
+ float svec[3] = {scale, scale, scale};
unit_m4(rmat);
unit_m4(lmat);
@@ -2973,7 +3029,7 @@ void BKE_tracking_remove_object(MovieTracking *tracking, MovieTrackingObject *ob
MovieTrackingTrack *track;
int index = BLI_findindex(&tracking->objects, object);
- if (index<0)
+ if (index < 0)
return;
if (object->flag & TRACKING_OBJECT_CAMERA) {
@@ -2986,7 +3042,7 @@ void BKE_tracking_remove_object(MovieTracking *tracking, MovieTrackingObject *ob
if (track == tracking->act_track)
tracking->act_track = NULL;
- track= track->next;
+ track = track->next;
}
tracking_object_free(object);
@@ -2994,7 +3050,7 @@ void BKE_tracking_remove_object(MovieTracking *tracking, MovieTrackingObject *ob
tracking->tot_object--;
- if (index>0)
+ if (index > 0)
tracking->objectnr = index - 1;
else
tracking->objectnr = 0;
@@ -3002,7 +3058,8 @@ void BKE_tracking_remove_object(MovieTracking *tracking, MovieTrackingObject *ob
void BKE_tracking_object_unique_name(MovieTracking *tracking, MovieTrackingObject *object)
{
- BLI_uniquename(&tracking->objects, object, "Object", '.', offsetof(MovieTrackingObject, name), sizeof(object->name));
+ BLI_uniquename(&tracking->objects, object, "Object", '.',
+ offsetof(MovieTrackingObject, name), sizeof(object->name));
}
MovieTrackingObject *BKE_tracking_named_object(MovieTracking *tracking, const char *name)
@@ -3018,3 +3075,216 @@ MovieTrackingObject *BKE_tracking_named_object(MovieTracking *tracking, const ch
return NULL;
}
+
+/*********************** dopesheet functions *************************/
+
+static int channels_alpha_sort(void *a, void *b)
+{
+ MovieTrackingDopesheetChannel *channel_a = a;
+ MovieTrackingDopesheetChannel *channel_b = b;
+
+ if (BLI_strcasecmp(channel_a->track->name, channel_b->track->name) > 0)
+ return 1;
+ else
+ return 0;
+}
+
+static int channels_total_track_sort(void *a, void *b)
+{
+ MovieTrackingDopesheetChannel *channel_a = a;
+ MovieTrackingDopesheetChannel *channel_b = b;
+
+ if (channel_a->total_frames > channel_b->total_frames)
+ return 1;
+ else
+ return 0;
+}
+
+static int channels_longest_segment_sort(void *a, void *b)
+{
+ MovieTrackingDopesheetChannel *channel_a = a;
+ MovieTrackingDopesheetChannel *channel_b = b;
+
+ if (channel_a->max_segment > channel_b->max_segment)
+ return 1;
+ else
+ return 0;
+}
+
+static int channels_alpha_inverse_sort(void *a, void *b)
+{
+ if (channels_alpha_sort(a, b))
+ return 0;
+ else
+ return 1;
+}
+
+static int channels_total_track_inverse_sort(void *a, void *b)
+{
+ if (channels_total_track_sort(a, b))
+ return 0;
+ else
+ return 1;
+}
+
+static int channels_longest_segment_inverse_sort(void *a, void *b)
+{
+ if (channels_longest_segment_sort(a, b))
+ return 0;
+ else
+ return 1;
+}
+
+static void channels_segments_calc(MovieTrackingDopesheetChannel *channel)
+{
+ MovieTrackingTrack *track = channel->track;
+ int i, segment;
+
+ channel->tot_segment = 0;
+ channel->max_segment = 0;
+ channel->total_frames = 0;
+
+ /* count */
+ i = 0;
+ while (i < track->markersnr) {
+ MovieTrackingMarker *marker = &track->markers[i];
+
+ if ((marker->flag & MARKER_DISABLED) == 0) {
+ int prev_fra = marker->framenr, len = 0;
+
+ i++;
+ while (i < track->markersnr) {
+ marker = &track->markers[i];
+
+ if (marker->framenr != prev_fra + 1)
+ break;
+ if (marker->flag & MARKER_DISABLED)
+ break;
+
+ prev_fra = marker->framenr;
+ len++;
+ i++;
+ }
+
+ channel->tot_segment++;
+ }
+
+ i++;
+ }
+
+ if (!channel->tot_segment)
+ return;
+
+ channel->segments = MEM_callocN(2 * sizeof(int) * channel->tot_segment, "tracking channel segments");
+
+ /* create segments */
+ i = 0;
+ segment = 0;
+ while (i < track->markersnr) {
+ MovieTrackingMarker *marker = &track->markers[i];
+
+ if ((marker->flag & MARKER_DISABLED) == 0) {
+ MovieTrackingMarker *start_marker = marker;
+ int prev_fra = marker->framenr, len = 0;
+
+ i++;
+ while (i < track->markersnr) {
+ marker = &track->markers[i];
+
+ if (marker->framenr != prev_fra + 1)
+ break;
+ if (marker->flag & MARKER_DISABLED)
+ break;
+
+ prev_fra = marker->framenr;
+ channel->total_frames++;
+ len++;
+ i++;
+ }
+
+ channel->segments[2 * segment] = start_marker->framenr;
+ channel->segments[2 * segment + 1] = start_marker->framenr + len;
+
+ channel->max_segment = MAX2(channel->max_segment, len);
+ segment++;
+ }
+
+ i++;
+ }
+}
+
+static void tracking_dopesheet_sort(MovieTracking *tracking, int sort_method, int inverse)
+{
+ MovieTrackingDopesheet *dopesheet = &tracking->dopesheet;
+
+ if (dopesheet->sort_method == sort_method && dopesheet->sort_inverse == inverse)
+ return;
+
+ if (inverse) {
+ if (sort_method == TRACK_SORT_NAME) {
+ BLI_sortlist(&dopesheet->channels, channels_alpha_inverse_sort);
+ }
+ else if (sort_method == TRACK_SORT_LONGEST) {
+ BLI_sortlist(&dopesheet->channels, channels_longest_segment_inverse_sort);
+ }
+ else if (sort_method == TRACK_SORT_TOTAL) {
+ BLI_sortlist(&dopesheet->channels, channels_total_track_inverse_sort);
+ }
+ }
+ else {
+ if (sort_method == TRACK_SORT_NAME) {
+ BLI_sortlist(&dopesheet->channels, channels_alpha_sort);
+ }
+ else if (sort_method == TRACK_SORT_LONGEST) {
+ BLI_sortlist(&dopesheet->channels, channels_longest_segment_sort);
+ }
+ else if (sort_method == TRACK_SORT_TOTAL) {
+ BLI_sortlist(&dopesheet->channels, channels_total_track_sort);
+ }
+ }
+
+ dopesheet->sort_method = sort_method;
+ dopesheet->sort_inverse = inverse;
+}
+
+void BKE_tracking_dopesheet_tag_update(MovieTracking *tracking)
+{
+ MovieTrackingDopesheet *dopesheet = &tracking->dopesheet;
+
+ dopesheet->ok = FALSE;
+}
+
+void BKE_tracking_dopesheet_update(MovieTracking *tracking, int sort_method, int inverse)
+{
+ MovieTrackingObject *object = BKE_tracking_active_object(tracking);
+ MovieTrackingDopesheet *dopesheet = &tracking->dopesheet;
+ MovieTrackingTrack *track;
+ ListBase *tracksbase = BKE_tracking_object_tracks(tracking, object);
+
+ if (dopesheet->ok) {
+ tracking_dopesheet_sort(tracking, sort_method, inverse);
+ return;
+ }
+
+ tracking_dopesheet_free(dopesheet);
+
+ for (track = tracksbase->first; track; track = track->next) {
+ if (TRACK_SELECTED(track) && (track->flag & TRACK_HIDDEN) == 0) {
+ MovieTrackingDopesheetChannel *channel;
+
+ channel = MEM_callocN(sizeof(MovieTrackingDopesheetChannel), "tracking dopesheet channel");
+ channel->track = track;
+
+ channels_segments_calc(channel);
+
+ BLI_addtail(&dopesheet->channels, channel);
+ dopesheet->tot_channel++;
+ }
+ }
+
+ dopesheet->sort_method = TRACK_SORT_NONE;
+
+ tracking_dopesheet_sort(tracking, sort_method, inverse);
+
+ dopesheet->ok = TRUE;
+}
diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c
index 48e939be7e9..03afc97f324 100644
--- a/source/blender/blenkernel/intern/unit.c
+++ b/source/blender/blenkernel/intern/unit.c
@@ -251,7 +251,7 @@ static struct bUnitDef buNaturalTimeDef[] = {
{"hour", "hours", "hr", "h", "Hours", 3600.0, 0.0, B_UNIT_DEF_NONE},
{"minute", "minutes", "min", "m", "Minutes", 60.0, 0.0, B_UNIT_DEF_NONE},
{"second", "seconds", "sec", "s", "Seconds", 1.0, 0.0, B_UNIT_DEF_NONE}, /* base unit */
- {"millisecond", "milliseconds", "ms", NULL, "Milliseconds", 0.001, 0.0 , B_UNIT_DEF_NONE},
+ {"millisecond", "milliseconds", "ms", NULL, "Milliseconds", 0.001, 0.0, B_UNIT_DEF_NONE},
{"microsecond", "microseconds", "µs", "us", "Microseconds", 0.000001, 0.0, B_UNIT_DEF_NONE},
{NULL, NULL, NULL, NULL, NULL, 0.0, 0.0}
};
diff --git a/source/blender/blenkernel/intern/world.c b/source/blender/blenkernel/intern/world.c
index 07a83da3d8c..303098ea0bd 100644
--- a/source/blender/blenkernel/intern/world.c
+++ b/source/blender/blenkernel/intern/world.c
@@ -51,13 +51,13 @@
#include "BKE_node.h"
#include "BKE_world.h"
-void free_world(World *wrld)
+void BKE_world_free(World *wrld)
{
MTex *mtex;
int a;
- for (a=0; a<MAX_MTEX; a++) {
- mtex= wrld->mtex[a];
+ for (a = 0; a < MAX_MTEX; a++) {
+ mtex = wrld->mtex[a];
if (mtex && mtex->tex) mtex->tex->id.us--;
if (mtex) MEM_freeN(mtex);
}
@@ -71,40 +71,40 @@ void free_world(World *wrld)
MEM_freeN(wrld->nodetree);
}
- BKE_icon_delete((struct ID*)wrld);
+ BKE_icon_delete((struct ID *)wrld);
wrld->id.icon_id = 0;
}
World *add_world(const char *name)
{
- Main *bmain= G.main;
+ Main *bmain = G.main;
World *wrld;
- wrld= alloc_libblock(&bmain->world, ID_WO, name);
+ wrld = BKE_libblock_alloc(&bmain->world, ID_WO, name);
- wrld->horr= 0.05f;
- wrld->horg= 0.05f;
- wrld->horb= 0.05f;
- wrld->zenr= 0.01f;
- wrld->zeng= 0.01f;
- wrld->zenb= 0.01f;
- wrld->skytype= 0;
- wrld->stardist= 15.0f;
- wrld->starsize= 2.0f;
-
- wrld->exp= 0.0f;
- wrld->exposure=wrld->range= 1.0f;
-
- wrld->aodist= 10.0f;
- wrld->aosamp= 5;
- wrld->aoenergy= 1.0f;
- wrld->ao_env_energy= 1.0f;
- wrld->ao_indirect_energy= 1.0f;
- wrld->ao_indirect_bounces= 1;
- wrld->aobias= 0.05f;
+ wrld->horr = 0.05f;
+ wrld->horg = 0.05f;
+ wrld->horb = 0.05f;
+ wrld->zenr = 0.01f;
+ wrld->zeng = 0.01f;
+ wrld->zenb = 0.01f;
+ wrld->skytype = 0;
+ wrld->stardist = 15.0f;
+ wrld->starsize = 2.0f;
+
+ wrld->exp = 0.0f;
+ wrld->exposure = wrld->range = 1.0f;
+
+ wrld->aodist = 10.0f;
+ wrld->aosamp = 5;
+ wrld->aoenergy = 1.0f;
+ wrld->ao_env_energy = 1.0f;
+ wrld->ao_indirect_energy = 1.0f;
+ wrld->ao_indirect_bounces = 1;
+ wrld->aobias = 0.05f;
wrld->ao_samp_method = WO_AOSAMP_HAMMERSLEY;
- wrld->ao_approx_error= 0.25f;
+ wrld->ao_approx_error = 0.25f;
wrld->preview = NULL;
wrld->miststa = 5.0f;
@@ -113,23 +113,23 @@ World *add_world(const char *name)
return wrld;
}
-World *copy_world(World *wrld)
+World *BKE_world_copy(World *wrld)
{
World *wrldn;
int a;
- wrldn= copy_libblock(&wrld->id);
+ wrldn = BKE_libblock_copy(&wrld->id);
- for (a=0; a<MAX_MTEX; a++) {
+ for (a = 0; a < MAX_MTEX; a++) {
if (wrld->mtex[a]) {
- wrldn->mtex[a]= MEM_mallocN(sizeof(MTex), "copy_world");
+ wrldn->mtex[a] = MEM_mallocN(sizeof(MTex), "BKE_world_copy");
memcpy(wrldn->mtex[a], wrld->mtex[a], sizeof(MTex));
id_us_plus((ID *)wrldn->mtex[a]->tex);
}
}
if (wrld->nodetree)
- wrldn->nodetree= ntreeCopyTree(wrld->nodetree);
+ wrldn->nodetree = ntreeCopyTree(wrld->nodetree);
if (wrld->preview)
wrldn->preview = BKE_previewimg_copy(wrld->preview);
@@ -142,12 +142,12 @@ World *localize_world(World *wrld)
World *wrldn;
int a;
- wrldn= copy_libblock(&wrld->id);
+ wrldn = BKE_libblock_copy(&wrld->id);
BLI_remlink(&G.main->world, wrldn);
- for (a=0; a<MAX_MTEX; a++) {
+ for (a = 0; a < MAX_MTEX; a++) {
if (wrld->mtex[a]) {
- wrldn->mtex[a]= MEM_mallocN(sizeof(MTex), "localize_world");
+ wrldn->mtex[a] = MEM_mallocN(sizeof(MTex), "localize_world");
memcpy(wrldn->mtex[a], wrld->mtex[a], sizeof(MTex));
/* free world decrements */
id_us_plus((ID *)wrldn->mtex[a]->tex);
@@ -155,51 +155,51 @@ World *localize_world(World *wrld)
}
if (wrld->nodetree)
- wrldn->nodetree= ntreeLocalize(wrld->nodetree);
+ wrldn->nodetree = ntreeLocalize(wrld->nodetree);
- wrldn->preview= NULL;
+ wrldn->preview = NULL;
return wrldn;
}
-void make_local_world(World *wrld)
+void BKE_world_make_local(World *wrld)
{
- Main *bmain= G.main;
+ Main *bmain = G.main;
Scene *sce;
- int is_local= FALSE, is_lib= FALSE;
+ int is_local = FALSE, is_lib = FALSE;
/* - only lib users: do nothing
* - only local users: set flag
* - mixed: make copy
*/
- if (wrld->id.lib==NULL) return;
- if (wrld->id.us==1) {
+ if (wrld->id.lib == NULL) return;
+ if (wrld->id.us == 1) {
id_clear_lib_data(bmain, &wrld->id);
return;
}
- for (sce= bmain->scene.first; sce && ELEM(FALSE, is_lib, is_local); sce= sce->id.next) {
+ for (sce = bmain->scene.first; sce && ELEM(FALSE, is_lib, is_local); sce = sce->id.next) {
if (sce->world == wrld) {
- if (sce->id.lib) is_lib= TRUE;
- else is_local= TRUE;
+ if (sce->id.lib) is_lib = TRUE;
+ else is_local = TRUE;
}
}
- if (is_local && is_lib==FALSE) {
+ if (is_local && is_lib == FALSE) {
id_clear_lib_data(bmain, &wrld->id);
}
else if (is_local && is_lib) {
- World *wrld_new= copy_world(wrld);
- wrld_new->id.us= 0;
+ World *wrld_new = BKE_world_copy(wrld);
+ wrld_new->id.us = 0;
/* Remap paths of new ID using old library as base. */
BKE_id_lib_local_paths(bmain, wrld->id.lib, &wrld_new->id);
- for (sce= bmain->scene.first; sce; sce= sce->id.next) {
+ for (sce = bmain->scene.first; sce; sce = sce->id.next) {
if (sce->world == wrld) {
- if (sce->id.lib==NULL) {
- sce->world= wrld_new;
+ if (sce->id.lib == NULL) {
+ sce->world = wrld_new;
wrld_new->id.us++;
wrld->id.us--;
}
diff --git a/source/blender/blenkernel/intern/writeavi.c b/source/blender/blenkernel/intern/writeavi.c
index ba8a46256c5..841a0f84fed 100644
--- a/source/blender/blenkernel/intern/writeavi.c
+++ b/source/blender/blenkernel/intern/writeavi.c
@@ -68,7 +68,7 @@ static void filepath_avi(char *string, RenderData *rd);
#include "BKE_writeframeserver.h"
-bMovieHandle *BKE_get_movie_handle(const char imtype)
+bMovieHandle *BKE_movie_handle_get(const char imtype)
{
static bMovieHandle mh;
@@ -97,18 +97,18 @@ bMovieHandle *BKE_get_movie_handle(const char imtype)
#endif
#ifdef WITH_FFMPEG
if (ELEM4(imtype, R_IMF_IMTYPE_FFMPEG, R_IMF_IMTYPE_H264, R_IMF_IMTYPE_XVID, R_IMF_IMTYPE_THEORA)) {
- mh.start_movie = start_ffmpeg;
- mh.append_movie = append_ffmpeg;
- mh.end_movie = end_ffmpeg;
- mh.get_movie_path = filepath_ffmpeg;
+ mh.start_movie = BKE_ffmpeg_start;
+ mh.append_movie = BKE_ffmpeg_append;
+ mh.end_movie = BKE_ffmpeg_end;
+ mh.get_movie_path = BKE_ffmpeg_filepath_get;
}
#endif
#ifdef WITH_FRAMESERVER
if (imtype == R_IMF_IMTYPE_FRAMESERVER) {
- mh.start_movie = start_frameserver;
- mh.append_movie = append_frameserver;
- mh.end_movie = end_frameserver;
- mh.get_next_frame = frameserver_loop;
+ mh.start_movie = BKE_frameserver_start;
+ mh.append_movie = BKE_frameserver_append;
+ mh.end_movie = BKE_frameserver_end;
+ mh.get_next_frame = BKE_frameserver_loop;
}
#endif
@@ -228,9 +228,9 @@ static void end_avi(void)
}
/* similar to BKE_makepicstring() */
-void BKE_makeanimstring(char *string, RenderData *rd)
+void BKE_movie_filepath_get(char *string, RenderData *rd)
{
- bMovieHandle *mh= BKE_get_movie_handle(rd->im_format.imtype);
+ bMovieHandle *mh= BKE_movie_handle_get(rd->im_format.imtype);
if (mh->get_movie_path)
mh->get_movie_path(string, rd);
else
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index 59c38117858..a29de3b0157 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -1,19 +1,25 @@
/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
*
- * ffmpeg-write support
- *
- * Partial Copyright (c) 2006 Peter Schlaile
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor(s):
+ *
+ * Partial Copyright (c) 2006 Peter Schlaile
+ *
+ * ***** END GPL LICENSE BLOCK *****
*/
/** \file blender/blenkernel/intern/writeffmpeg.c
@@ -120,19 +126,17 @@ static int write_audio_frame(void)
audio_time += (double) audio_input_samples / (double) c->sample_rate;
pkt.size = avcodec_encode_audio(c, audio_output_buffer,
- audio_outbuf_size,
- (short*) audio_input_buffer);
+ audio_outbuf_size,
+ (short *)audio_input_buffer);
- if (pkt.size < 0)
- {
+ if (pkt.size < 0) {
// XXX error("Error writing audio packet");
return -1;
}
pkt.data = audio_output_buffer;
- if (c->coded_frame && c->coded_frame->pts != AV_NOPTS_VALUE)
- {
+ if (c->coded_frame && c->coded_frame->pts != AV_NOPTS_VALUE) {
pkt.pts = av_rescale_q(c->coded_frame->pts,
c->time_base, audio_stream->time_base);
fprintf(stderr, "Audio Frame PTS: %d\n", (int)pkt.pts);
@@ -175,7 +179,7 @@ static AVFrame* alloc_picture(int pix_fmt, int width, int height)
* first is always desired guess_format parameter */
static const char** get_file_extensions(int format)
{
- switch(format) {
+ switch (format) {
case FFMPEG_DV: {
static const char * rv[] = { ".dv", NULL };
return rv;
@@ -313,8 +317,7 @@ static AVFrame* generate_video_frame(uint8_t* pixels, ReportList *reports)
if (ENDIAN_ORDER == L_ENDIAN) {
int y;
for (y = 0; y < height; y++) {
- uint8_t* target = rgb_frame->data[0]
- + width * 4 * (height - y - 1);
+ uint8_t* target = rgb_frame->data[0] + width * 4 * (height - y - 1);
uint8_t* src = rendered_frame + width * 4 * y;
uint8_t* end = src + width * 4;
while (src != end) {
@@ -331,8 +334,7 @@ static AVFrame* generate_video_frame(uint8_t* pixels, ReportList *reports)
else {
int y;
for (y = 0; y < height; y++) {
- uint8_t* target = rgb_frame->data[0]
- + width * 4 * (height - y - 1);
+ uint8_t* target = rgb_frame->data[0] + width * 4 * (height - y - 1);
uint8_t* src = rendered_frame + width * 4 * y;
uint8_t* end = src + width * 4;
while (src != end) {
@@ -372,7 +374,7 @@ static void set_ffmpeg_property_option(AVCodecContext* c, IDProperty * prop)
*param++ = 0;
}
- switch(prop->type) {
+ switch (prop->type) {
case IDP_STRING:
fprintf(stderr, "%s.\n", IDP_String(prop));
av_set_string3(c, prop->name, IDP_String(prop), 1, &rv);
@@ -484,8 +486,7 @@ static AVStream* alloc_video_stream(RenderData *rd, int codec_id, AVFormatContex
c->rc_max_rate = rd->ffcodecdata.rc_max_rate*1000;
c->rc_min_rate = rd->ffcodecdata.rc_min_rate*1000;
c->rc_buffer_size = rd->ffcodecdata.rc_buffer_size * 1024;
- c->rc_initial_buffer_occupancy
- = rd->ffcodecdata.rc_buffer_size*3/4;
+ c->rc_initial_buffer_occupancy = rd->ffcodecdata.rc_buffer_size * 3 / 4;
c->rc_buffer_aggressivity = 1.0;
c->me_method = ME_EPZS;
@@ -674,7 +675,7 @@ static int start_ffmpeg_impl(struct RenderData *rd, int rectx, int recty, Report
do_init_ffmpeg();
/* Determine the correct filename */
- filepath_ffmpeg(name, rd);
+ BKE_ffmpeg_filepath_get(name, rd);
fprintf(stderr, "Starting output to %s(ffmpeg)...\n"
" Using type=%d, codec=%d, audio_codec=%d,\n"
" video_bitrate=%d, audio_bitrate=%d,\n"
@@ -717,7 +718,7 @@ static int start_ffmpeg_impl(struct RenderData *rd, int rectx, int recty, Report
BLI_snprintf(of->filename, sizeof(of->filename), "%s", name);
/* set the codec to the user's selection */
- switch(ffmpeg_type) {
+ switch (ffmpeg_type) {
case FFMPEG_AVI:
case FFMPEG_MOV:
case FFMPEG_MKV:
@@ -880,7 +881,7 @@ void flush_ffmpeg(void)
* ********************************************************************** */
/* Get the output filename-- similar to the other output formats */
-void filepath_ffmpeg(char* string, RenderData* rd)
+void BKE_ffmpeg_filepath_get(char* string, RenderData* rd)
{
char autosplit[20];
@@ -921,7 +922,7 @@ void filepath_ffmpeg(char* string, RenderData* rd)
}
}
-int start_ffmpeg(struct Scene *scene, RenderData *rd, int rectx, int recty, ReportList *reports)
+int BKE_ffmpeg_start(struct Scene *scene, RenderData *rd, int rectx, int recty, ReportList *reports)
{
int success;
@@ -929,8 +930,7 @@ int start_ffmpeg(struct Scene *scene, RenderData *rd, int rectx, int recty, Repo
success = start_ffmpeg_impl(rd, rectx, recty, reports);
#ifdef WITH_AUDASPACE
- if (audio_stream)
- {
+ if (audio_stream) {
AVCodecContext* c = audio_stream->codec;
AUD_DeviceSpecs specs;
specs.channels = c->channels;
@@ -946,7 +946,7 @@ int start_ffmpeg(struct Scene *scene, RenderData *rd, int rectx, int recty, Repo
return success;
}
-void end_ffmpeg(void);
+void BKE_ffmpeg_end(void);
#ifdef WITH_AUDASPACE
static void write_audio_frames(double to_pts)
@@ -962,7 +962,7 @@ static void write_audio_frames(double to_pts)
}
#endif
-int append_ffmpeg(RenderData *rd, int start_frame, int frame, int *pixels, int rectx, int recty, ReportList *reports)
+int BKE_ffmpeg_append(RenderData *rd, int start_frame, int frame, int *pixels, int rectx, int recty, ReportList *reports)
{
AVFrame* avframe;
int success = 1;
@@ -974,14 +974,13 @@ int append_ffmpeg(RenderData *rd, int start_frame, int frame, int *pixels, int r
// why is this done before writing the video frame and again at end_ffmpeg?
// write_audio_frames(frame / (((double)rd->frs_sec) / rd->frs_sec_base));
- if (video_stream)
- {
+ if (video_stream) {
avframe= generate_video_frame((unsigned char*) pixels, reports);
success= (avframe && write_video_frame(rd, frame - start_frame, avframe, reports));
if (ffmpeg_autosplit) {
if (avio_tell(outfile->pb) > FFMPEG_AUTOSPLIT_SIZE) {
- end_ffmpeg();
+ BKE_ffmpeg_end();
ffmpeg_autosplit_count++;
success &= start_ffmpeg_impl(rd, rectx, recty, reports);
}
@@ -994,7 +993,7 @@ int append_ffmpeg(RenderData *rd, int start_frame, int frame, int *pixels, int r
return success;
}
-void end_ffmpeg(void)
+void BKE_ffmpeg_end(void)
{
unsigned int i;
@@ -1072,7 +1071,7 @@ void end_ffmpeg(void)
/* properties */
-void ffmpeg_property_del(RenderData *rd, void *type, void *prop_)
+void BKE_ffmpeg_property_del(RenderData *rd, void *type, void *prop_)
{
struct IDProperty *prop = (struct IDProperty *) prop_;
IDProperty * group;
@@ -1089,7 +1088,7 @@ void ffmpeg_property_del(RenderData *rd, void *type, void *prop_)
}
}
-IDProperty *ffmpeg_property_add(RenderData *rd, const char *type, int opt_index, int parent_index)
+IDProperty *BKE_ffmpeg_property_add(RenderData *rd, const char *type, int opt_index, int parent_index)
{
AVCodecContext c;
const AVOption * o;
@@ -1108,8 +1107,7 @@ IDProperty *ffmpeg_property_add(RenderData *rd, const char *type, int opt_index,
parent = c.av_class->option + parent_index;
if (!rd->ffcodecdata.properties) {
- rd->ffcodecdata.properties
- = IDP_New(IDP_GROUP, &val, "ffmpeg");
+ rd->ffcodecdata.properties = IDP_New(IDP_GROUP, &val, "ffmpeg");
}
group = IDP_GetPropertyFromGroup(rd->ffcodecdata.properties, type);
@@ -1172,15 +1170,17 @@ static const AVOption *my_av_find_opt(void *v, const char *name,
const AVOption *o= c->option;
for (;o && o->name; o++) {
- if (!strcmp(o->name, name) &&
- (!unit || (o->unit && !strcmp(o->unit, unit))) &&
- (o->flags & mask) == flags )
+ if (!strcmp(o->name, name) &&
+ (!unit || (o->unit && !strcmp(o->unit, unit))) &&
+ (o->flags & mask) == flags)
+ {
return o;
+ }
}
return NULL;
}
-int ffmpeg_property_add_string(RenderData *rd, const char * type, const char * str)
+int BKE_ffmpeg_property_add_string(RenderData *rd, const char * type, const char * str)
{
AVCodecContext c;
const AVOption * o = 0;
@@ -1216,12 +1216,12 @@ int ffmpeg_property_add_string(RenderData *rd, const char * type, const char * s
}
if (param && o->type != FF_OPT_TYPE_CONST && o->unit) {
p = my_av_find_opt(&c, param, o->unit, 0, 0);
- prop = ffmpeg_property_add(rd,
+ prop = BKE_ffmpeg_property_add(rd,
(char*) type, p - c.av_class->option,
o - c.av_class->option);
}
else {
- prop = ffmpeg_property_add(rd,
+ prop = BKE_ffmpeg_property_add(rd,
(char*) type, o - c.av_class->option, 0);
}
@@ -1264,37 +1264,37 @@ static void ffmpeg_set_expert_options(RenderData *rd)
* Use CABAC coder. Using "coder:1", which should be equivalent,
* crashes Blender for some reason. Either way - this is no big deal.
*/
- ffmpeg_property_add_string(rd, "video", "coder:vlc");
+ BKE_ffmpeg_property_add_string(rd, "video", "coder:vlc");
/*
* The other options were taken from the libx264-default.preset
* included in the ffmpeg distribution.
*/
// ffmpeg_property_add_string(rd, "video", "flags:loop"); // this breaks compatibility for QT
- ffmpeg_property_add_string(rd, "video", "cmp:chroma");
- ffmpeg_property_add_string(rd, "video", "partitions:parti4x4");
- ffmpeg_property_add_string(rd, "video", "partitions:partp8x8");
- ffmpeg_property_add_string(rd, "video", "partitions:partb8x8");
- ffmpeg_property_add_string(rd, "video", "me:hex");
- ffmpeg_property_add_string(rd, "video", "subq:6");
- ffmpeg_property_add_string(rd, "video", "me_range:16");
- ffmpeg_property_add_string(rd, "video", "qdiff:4");
- ffmpeg_property_add_string(rd, "video", "keyint_min:25");
- ffmpeg_property_add_string(rd, "video", "sc_threshold:40");
- ffmpeg_property_add_string(rd, "video", "i_qfactor:0.71");
- ffmpeg_property_add_string(rd, "video", "b_strategy:1");
- ffmpeg_property_add_string(rd, "video", "bf:3");
- ffmpeg_property_add_string(rd, "video", "refs:2");
- ffmpeg_property_add_string(rd, "video", "qcomp:0.6");
- ffmpeg_property_add_string(rd, "video", "directpred:3");
- ffmpeg_property_add_string(rd, "video", "trellis:0");
- ffmpeg_property_add_string(rd, "video", "flags2:wpred");
- ffmpeg_property_add_string(rd, "video", "flags2:dct8x8");
- ffmpeg_property_add_string(rd, "video", "flags2:fastpskip");
- ffmpeg_property_add_string(rd, "video", "wpredp:2");
+ BKE_ffmpeg_property_add_string(rd, "video", "cmp:chroma");
+ BKE_ffmpeg_property_add_string(rd, "video", "partitions:parti4x4");
+ BKE_ffmpeg_property_add_string(rd, "video", "partitions:partp8x8");
+ BKE_ffmpeg_property_add_string(rd, "video", "partitions:partb8x8");
+ 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");
+ BKE_ffmpeg_property_add_string(rd, "video", "qdiff:4");
+ BKE_ffmpeg_property_add_string(rd, "video", "keyint_min:25");
+ BKE_ffmpeg_property_add_string(rd, "video", "sc_threshold:40");
+ BKE_ffmpeg_property_add_string(rd, "video", "i_qfactor:0.71");
+ BKE_ffmpeg_property_add_string(rd, "video", "b_strategy:1");
+ BKE_ffmpeg_property_add_string(rd, "video", "bf:3");
+ BKE_ffmpeg_property_add_string(rd, "video", "refs:2");
+ BKE_ffmpeg_property_add_string(rd, "video", "qcomp:0.6");
+ BKE_ffmpeg_property_add_string(rd, "video", "directpred:3");
+ BKE_ffmpeg_property_add_string(rd, "video", "trellis:0");
+ BKE_ffmpeg_property_add_string(rd, "video", "flags2:wpred");
+ BKE_ffmpeg_property_add_string(rd, "video", "flags2:dct8x8");
+ BKE_ffmpeg_property_add_string(rd, "video", "flags2:fastpskip");
+ BKE_ffmpeg_property_add_string(rd, "video", "wpredp:2");
if (rd->ffcodecdata.flags & FFMPEG_LOSSLESS_OUTPUT)
- ffmpeg_property_add_string(rd, "video", "cqp:0");
+ BKE_ffmpeg_property_add_string(rd, "video", "cqp:0");
}
#if 0 /* disabled for after release */
else if (codec_id == CODEC_ID_DNXHD) {
@@ -1304,7 +1304,7 @@ static void ffmpeg_set_expert_options(RenderData *rd)
#endif
}
-void ffmpeg_set_preset(RenderData *rd, int preset)
+void BKE_ffmpeg_preset_set(RenderData *rd, int preset)
{
int isntsc = (rd->frs_sec != 25);
@@ -1398,7 +1398,7 @@ void ffmpeg_set_preset(RenderData *rd, int preset)
ffmpeg_set_expert_options(rd);
}
-void ffmpeg_verify_image_type(RenderData *rd, ImageFormatData *imf)
+void BKE_ffmpeg_image_type_verify(RenderData *rd, ImageFormatData *imf)
{
int audio= 0;
@@ -1410,7 +1410,7 @@ void ffmpeg_verify_image_type(RenderData *rd, ImageFormatData *imf)
rd->ffcodecdata.codec = CODEC_ID_MPEG2VIDEO;
- ffmpeg_set_preset(rd, FFMPEG_PRESET_DVD);
+ BKE_ffmpeg_preset_set(rd, FFMPEG_PRESET_DVD);
}
if (rd->ffcodecdata.type == FFMPEG_OGG) {
rd->ffcodecdata.type = FFMPEG_MPEG2;
@@ -1420,19 +1420,19 @@ void ffmpeg_verify_image_type(RenderData *rd, ImageFormatData *imf)
}
else if (imf->imtype == R_IMF_IMTYPE_H264) {
if (rd->ffcodecdata.codec != CODEC_ID_H264) {
- ffmpeg_set_preset(rd, FFMPEG_PRESET_H264);
+ BKE_ffmpeg_preset_set(rd, FFMPEG_PRESET_H264);
audio= 1;
}
}
else if (imf->imtype == R_IMF_IMTYPE_XVID) {
if (rd->ffcodecdata.codec != CODEC_ID_MPEG4) {
- ffmpeg_set_preset(rd, FFMPEG_PRESET_XVID);
+ BKE_ffmpeg_preset_set(rd, FFMPEG_PRESET_XVID);
audio= 1;
}
}
else if (imf->imtype == R_IMF_IMTYPE_THEORA) {
if (rd->ffcodecdata.codec != CODEC_ID_THEORA) {
- ffmpeg_set_preset(rd, FFMPEG_PRESET_THEORA);
+ BKE_ffmpeg_preset_set(rd, FFMPEG_PRESET_THEORA);
audio= 1;
}
}
@@ -1443,12 +1443,12 @@ void ffmpeg_verify_image_type(RenderData *rd, ImageFormatData *imf)
}
}
-void ffmpeg_verify_codec_settings(RenderData *rd)
+void BKE_ffmpeg_codec_settings_verify(RenderData *rd)
{
ffmpeg_set_expert_options(rd);
}
-int ffmpeg_alpha_channel_supported(RenderData *rd)
+int BKE_ffmpeg_alpha_channel_is_supported(RenderData *rd)
{
int codec = rd->ffcodecdata.codec;
diff --git a/source/blender/blenkernel/intern/writeframeserver.c b/source/blender/blenkernel/intern/writeframeserver.c
index 62e921f3311..b5965838a30 100644
--- a/source/blender/blenkernel/intern/writeframeserver.c
+++ b/source/blender/blenkernel/intern/writeframeserver.c
@@ -1,25 +1,33 @@
/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
*
- * Frameserver
- * Makes Blender accessible from TMPGenc directly using VFAPI (you can
- * use firefox too ;-)
- *
- * Copyright (c) 2006 Peter Schlaile
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Copyright (c) 2006 Peter Schlaile
+ *
+ * Contributor(s):
+ *
+ * ***** END GPL LICENSE BLOCK *****
*/
/** \file blender/blenkernel/intern/writeframeserver.c
* \ingroup bke
+ *
+ * Frameserver
+ * Makes Blender accessible from TMPGenc directly using VFAPI (you can
+ * use firefox too ;-)
*/
#ifdef WITH_FRAMESERVER
@@ -70,7 +78,7 @@ static int render_height;
static int startup_socket_system(void)
{
WSADATA wsa;
- return (WSAStartup(MAKEWORD(2,0),&wsa) == 0);
+ return (WSAStartup(MAKEWORD(2, 0), &wsa) == 0);
}
static void shutdown_socket_system(void)
@@ -102,7 +110,7 @@ static int closesocket(int fd)
}
#endif
-int start_frameserver(struct Scene *scene, RenderData *UNUSED(rd), int rectx, int recty, ReportList *reports)
+int BKE_frameserver_start(struct Scene *scene, RenderData *UNUSED(rd), int rectx, int recty, ReportList *reports)
{
struct sockaddr_in addr;
int arg = 1;
@@ -250,7 +258,7 @@ static int handle_request(RenderData *rd, char * req)
return -1;
}
-int frameserver_loop(RenderData *rd, ReportList *UNUSED(reports))
+int BKE_frameserver_loop(RenderData *rd, ReportList *UNUSED(reports))
{
fd_set readfds;
struct timeval tv;
@@ -363,7 +371,7 @@ static void serve_ppm(int *pixels, int rectx, int recty)
connsock = -1;
}
-int append_frameserver(RenderData *UNUSED(rd), int UNUSED(start_frame), int frame, int *pixels,
+int BKE_frameserver_append(RenderData *UNUSED(rd), int UNUSED(start_frame), int frame, int *pixels,
int rectx, int recty, ReportList *UNUSED(reports))
{
fprintf(stderr, "Serving frame: %d\n", frame);
@@ -378,7 +386,7 @@ int append_frameserver(RenderData *UNUSED(rd), int UNUSED(start_frame), int fram
return 0;
}
-void end_frameserver(void)
+void BKE_frameserver_end(void)
{
if (connsock != -1) {
closesocket(connsock);
diff --git a/source/blender/blenlib/BLI_array.h b/source/blender/blenlib/BLI_array.h
index d66b8c009d7..7069732eeb6 100644
--- a/source/blender/blenlib/BLI_array.h
+++ b/source/blender/blenlib/BLI_array.h
@@ -44,7 +44,7 @@
* int i;
*
* for (i=0; i<10; i++) {
- * BLI_array_growone(arr);
+ * BLI_array_grow_one(arr);
* arr[i] = something;
* }
* BLI_array_free(arr);
@@ -64,7 +64,7 @@
#define BLI_array_staticdeclare(arr, maxstatic) \
int _##arr##_count = 0; \
void *_##arr##_tmp; \
- char _##arr##_static[maxstatic * sizeof(arr)]
+ char _##arr##_static[maxstatic * sizeof(arr)]
/* this returns the entire size of the array, including any buffering. */
@@ -116,32 +116,32 @@
)
/* grow an array by a specified number of items */
-#define BLI_array_growitems(arr, num) ( \
+#define BLI_array_grow_items(arr, num) ( \
((void *)(arr) == NULL && (void *)(_##arr##_static) != NULL) ? \
((arr = (void*)_##arr##_static), (_##arr##_count += num)) : \
_bli_array_grow_items(arr, num) \
)
/* returns length of array */
-#define BLI_array_growone(arr) BLI_array_growitems(arr, 1)
+#define BLI_array_grow_one(arr) BLI_array_grow_items(arr, 1)
/* appends an item to the array. */
#define BLI_array_append(arr, item) ( \
- (void) BLI_array_growone(arr), \
+ (void) BLI_array_grow_one(arr), \
(void) (arr[_##arr##_count - 1] = item) \
)
/* appends an item to the array and returns a pointer to the item in the array.
* item is not a pointer, but actual data value.*/
#define BLI_array_append_r(arr, item) ( \
- (void) BLI_array_growone(arr), \
+ (void) BLI_array_grow_one(arr), \
(void) (arr[_##arr##_count - 1] = item), \
(&arr[_##arr##_count - 1]) \
)
#define BLI_array_reserve(arr, num) \
- BLI_array_growitems(arr, num), (void)(_##arr##_count -= (num))
+ BLI_array_grow_items(arr, num), (void)(_##arr##_count -= (num))
#define BLI_array_free(arr) \
@@ -163,7 +163,7 @@
/* set the count of the array, doesn't actually increase the allocated array
* size. don't use this unless you know what you're doing. */
-#define BLI_array_set_length(arr, count) \
+#define BLI_array_length_set(arr, count) \
_##arr##_count = (count)
/* only to prevent unused warnings */
diff --git a/source/blender/blenlib/BLI_bitmap.h b/source/blender/blenlib/BLI_bitmap.h
index 2aed71a7d44..f19d6d6f465 100644
--- a/source/blender/blenlib/BLI_bitmap.h
+++ b/source/blender/blenlib/BLI_bitmap.h
@@ -69,7 +69,7 @@ typedef unsigned int* BLI_bitmap;
/* set or clear the value of a single bit at '_index' */
#define BLI_BITMAP_MODIFY(_bitmap, _index, _set) \
do { \
- if(_set) \
+ if (_set) \
BLI_BITMAP_SET(_bitmap, _index); \
else \
BLI_BITMAP_CLEAR(_bitmap, _index); \
diff --git a/source/blender/blenlib/BLI_boxpack2d.h b/source/blender/blenlib/BLI_boxpack2d.h
index 7f92047b312..77e937d7b6f 100644
--- a/source/blender/blenlib/BLI_boxpack2d.h
+++ b/source/blender/blenlib/BLI_boxpack2d.h
@@ -34,7 +34,7 @@
/* Box Packer */
-typedef struct boxPack {
+typedef struct BoxPack {
float x;
float y;
float w;
@@ -44,9 +44,9 @@ typedef struct boxPack {
/* Verts this box uses
* (BL,TR,TL,BR) / 0,1,2,3 */
struct boxVert *v[4];
-} boxPack;
+} BoxPack;
-void boxPack2D(boxPack *boxarray, const int len, float *tot_width, float *tot_height);
+void BLI_box_pack_2D(BoxPack *boxarray, const int len, float *tot_width, float *tot_height);
#endif
diff --git a/source/blender/blenlib/BLI_bpath.h b/source/blender/blenlib/BLI_bpath.h
index 91252d3beb5..27b373e6eb8 100644
--- a/source/blender/blenlib/BLI_bpath.h
+++ b/source/blender/blenlib/BLI_bpath.h
@@ -43,25 +43,25 @@ struct ReportList;
* path has changed, and in that case, should write the result to pathOut. */
typedef int (*BPathVisitor)(void *userdata, char *path_dst, const char *path_src);
/* Executes 'visit' for each path associated with 'id'. */
-void bpath_traverse_id(struct Main *bmain, struct ID *id, BPathVisitor visit_cb, const int flag, void *userdata);
-void bpath_traverse_id_list(struct Main *bmain, struct ListBase *lb, BPathVisitor visit_cb, const int flag, void *userdata);
-void bpath_traverse_main(struct Main *bmain, BPathVisitor visit_cb, const int flag, void *userdata);
-int bpath_relocate_visitor(void *oldbasepath, char *path_dst, const char *path_src);
+void BLI_bpath_traverse_id(struct Main *bmain, struct ID *id, BPathVisitor visit_cb, const int flag, void *userdata);
+void BLI_bpath_traverse_id_list(struct Main *bmain, struct ListBase *lb, BPathVisitor visit_cb, const int flag, void *userdata);
+void BLI_bpath_traverse_main(struct Main *bmain, BPathVisitor visit_cb, const int flag, void *userdata);
+int BLI_bpath_relocate_visitor(void *oldbasepath, char *path_dst, const char *path_src);
-#define BPATH_TRAVERSE_ABS (1<<0) /* convert paths to absolute */
-#define BPATH_TRAVERSE_SKIP_LIBRARY (1<<2) /* skip library paths */
-#define BPATH_TRAVERSE_SKIP_PACKED (1<<3) /* skip packed data */
-#define BPATH_TRAVERSE_SKIP_MULTIFILE (1<<4) /* skip paths where a single dir is used with an array of files, eg.
- * sequence strip images and pointcache. in this case only use the first
- * file, this is needed for directory manipulation functions which might
- * otherwise modify the same directory multiple times */
+#define BLI_BPATH_TRAVERSE_ABS (1<<0) /* convert paths to absolute */
+#define BLI_BPATH_TRAVERSE_SKIP_LIBRARY (1<<2) /* skip library paths */
+#define BLI_BPATH_TRAVERSE_SKIP_PACKED (1<<3) /* skip packed data */
+#define BLI_BPATH_TRAVERSE_SKIP_MULTIFILE (1<<4) /* skip paths where a single dir is used with an array of files, eg.
+ * sequence strip images and pointcache. in this case only use the first
+ * file, this is needed for directory manipulation functions which might
+ * otherwise modify the same directory multiple times */
/* high level funcs */
/* creates a text file with missing files if there are any */
-void checkMissingFiles(struct Main *bmain, struct ReportList *reports);
-void makeFilesRelative(struct Main *bmain, const char *basedir, struct ReportList *reports);
-void makeFilesAbsolute(struct Main *bmain, const char *basedir, struct ReportList *reports);
-void findMissingFiles(struct Main *bmain, const char *searchpath, struct ReportList *reports);
+void BLI_bpath_missing_files_check(struct Main *bmain, struct ReportList *reports);
+void BLI_bpath_missing_files_find(struct Main *bmain, const char *searchpath, struct ReportList *reports);
+void BLI_bpath_relative_convert(struct Main *bmain, const char *basedir, struct ReportList *reports);
+void BLI_bpath_absolute_convert(struct Main *bmain, const char *basedir, struct ReportList *reports);
#endif // __BLI_BPATH_H__
diff --git a/source/blender/blenlib/BLI_callbacks.h b/source/blender/blenlib/BLI_callbacks.h
index b32a1e272c8..bfc336781aa 100644
--- a/source/blender/blenlib/BLI_callbacks.h
+++ b/source/blender/blenlib/BLI_callbacks.h
@@ -62,11 +62,11 @@ typedef struct {
} bCallbackFuncStore;
-void BLI_exec_cb(struct Main *main, struct ID *self, eCbEvent evt);
-void BLI_add_cb(bCallbackFuncStore *funcstore, eCbEvent evt);
+void BLI_callback_exec(struct Main *main, struct ID *self, eCbEvent evt);
+void BLI_callback_add(bCallbackFuncStore *funcstore, eCbEvent evt);
-void BLI_cb_init(void);
-void BLI_cb_finalize(void);
+void BLI_callback_global_init(void);
+void BLI_callback_global_finalize(void);
/* This is blenlib internal only, unrelated to above */
diff --git a/source/blender/blenlib/BLI_editVert.h b/source/blender/blenlib/BLI_editVert.h
deleted file mode 100644
index 0f754d5fc98..00000000000
--- a/source/blender/blenlib/BLI_editVert.h
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#ifndef __BLI_EDITVERT_H__
-#define __BLI_EDITVERT_H__
-
-/** \file BLI_editVert.h
- * \ingroup bli
- * \since March 2001
- * \author nzc
- * \brief Some editing types needed in the lib (unfortunately) for
- * scanfill.c
- */
-
-#include "DNA_customdata_types.h"
-#include "DNA_mesh_types.h"
-
-#include "BLO_sys_types.h" // for intptr_t support
-
-struct DerivedMesh;
-
-/* note; changing this also might affect the undo copy in editmesh.c */
-typedef struct EditVert
-{
- struct EditVert *next, *prev;
- union {
- /* some lean storage for temporary usage
- * in editmesh routines
- */
- struct EditVert *v;
- struct EditEdge *e;
- struct EditFace *f;
- void *p;
- intptr_t l;
- float fp;
- int t;
- } tmp;
- float no[3]; /*vertex normal */
- float co[3]; /*vertex location */
- short xs, ys; /* used to store a screenspace 2d projection of the verts */
-
- /* f stores selection eg. if (eve->f & SELECT) {...
- * h for hidden. if (!eve->h) {...
- * f1 and f2 can be used for temp data, clear them first*/
- unsigned char f, h, f1, f2;
- float bweight;
- short fast; /* only 0 or 1, for editmesh_fastmalloc, do not store temp data here! */
- int hash; /* internal editmesh.c use only, don't touch! */
- int keyindex; /* original index #, for restoring key information */
-
- void *data; /* custom vertex data */
-} EditVert;
-
-struct EditEdge;
-
-typedef struct HashEdge {
- struct EditEdge *eed;
- struct HashEdge *next;
-} HashEdge;
-
-/* note; changing this also might affect the undo copy in editmesh.c */
-typedef struct EditEdge
-{
- struct EditEdge *next, *prev;
- struct EditVert *v1, *v2;
- union {
- /* some lean storage for temporary usage
- * in editmesh routines
- */
- struct EditVert *v;
- struct EditEdge *e;
- struct EditFace *f;
- void *p;
- intptr_t l;
- float fp;
- } tmp;
- short f1, f2; /* short, f1 is (ab)used in subdiv */
- unsigned char f, h, dir, seam, sharp;
- float crease;
- float bweight;
- short fast; /* only 0 or 1, for editmesh_fastmalloc */
- short fgoni; /* index for fgon, for search */
- HashEdge hash;
- void *data; /*custom edge data*/
-} EditEdge;
-
-/* note; changing this also might affect the undo copy in editmesh.c */
-typedef struct EditFace
-{
- struct EditFace *next, *prev;
- struct EditVert *v1, *v2, *v3, *v4;
- struct EditEdge *e1, *e2, *e3, *e4;
- union {
- /* some lean storage for temporary usage
- * in editmesh routines
- */
- struct EditVert *v;
- struct EditEdge *e;
- struct EditFace *f;
- void *p;
- intptr_t l;
- float fp;
- } tmp;
- float n[3], cent[3];
- unsigned char flag;
- unsigned char f, f1, h;
- unsigned char fast; /* only 0 or 1, for editmesh_fastmalloc */
- unsigned char fgonf; /* flag for fgon options */
- short mat_nr;
- void *data; /* custom face data */
-} EditFace;
-
-
-/*selection types*/
-#define EDITVERT 0
-#define EDITEDGE 1
-#define EDITFACE 2
-
-typedef struct EditSelection
-{
- struct EditSelection *next, *prev;
- short type;
- void *data;
-} EditSelection;
-
-
-typedef struct EditMesh
-{
- ListBase verts, edges, faces;
- ListBase selected; /*EditSelections. Used to store the order in which things are selected.*/
- HashEdge *hashedgetab;
-
- /* this is for the editmesh_fastmalloc */
- EditVert *allverts, *curvert;
- EditEdge *alledges, *curedge;
- EditFace *allfaces, *curface;
- /* DerivedMesh caches... note that derived cage can be equivalent
- * to derived final, care should be taken on release.
- */
-
- /* used for keeping track of the last clicked on face - so the space image
- * when using the last selected face - (EditSelection) the space image flickered too much
- *
- * never access this directly, use EM_set_actFace and EM_get_actFace */
- EditFace *act_face;
-
- /* copy from scene */
- short selectmode;
- /* copy from object actcol */
- short mat_nr;
- /* stats */
- int totvert, totedge, totface, totvertsel, totedgesel, totfacesel;
- /* shape key being edited */
- int shapenr;
-
- struct DerivedMesh *derivedCage, *derivedFinal;
- /* the custom data layer mask that was last used to calculate
- * derivedCage and derivedFinal
- */
- int lastDataMask;
-
- CustomData vdata, edata, fdata;
-
-} EditMesh;
-
-#endif
-
diff --git a/source/blender/blenlib/BLI_fileops.h b/source/blender/blenlib/BLI_fileops.h
index 73220cbd739..1bf4efca8a0 100644
--- a/source/blender/blenlib/BLI_fileops.h
+++ b/source/blender/blenlib/BLI_fileops.h
@@ -55,6 +55,7 @@ int BLI_rename(const char *from, const char *to);
int BLI_delete(const char *path, int dir, int recursive);
int BLI_move(const char *path, const char *to);
int BLI_create_symlink(const char *path, const char *to);
+int BLI_stat(const char *path, struct stat *buffer);
/* Directories */
diff --git a/source/blender/blenlib/BLI_fileops_types.h b/source/blender/blenlib/BLI_fileops_types.h
index 8e4b5b3e411..d9f8549e8f5 100644
--- a/source/blender/blenlib/BLI_fileops_types.h
+++ b/source/blender/blenlib/BLI_fileops_types.h
@@ -70,7 +70,7 @@ struct direntry{
struct dirlink
{
- struct dirlink *next,*prev;
+ struct dirlink *next, *prev;
char *name;
};
diff --git a/source/blender/blenlib/BLI_ghash.h b/source/blender/blenlib/BLI_ghash.h
index 457f098bff7..b178538edf2 100644
--- a/source/blender/blenlib/BLI_ghash.h
+++ b/source/blender/blenlib/BLI_ghash.h
@@ -131,6 +131,11 @@ void BLI_ghashIterator_step (GHashIterator *ghi);
*/
int BLI_ghashIterator_isDone (GHashIterator *ghi);
+#define GHASH_ITER(gh_iter_, ghash_) \
+ for (BLI_ghashIterator_init(&gh_iter_, ghash_); \
+ !BLI_ghashIterator_isDone(&gh_iter_); \
+ BLI_ghashIterator_step(&gh_iter_))
+
/* *** */
unsigned int BLI_ghashutil_ptrhash (const void *key);
@@ -144,10 +149,10 @@ int BLI_ghashutil_intcmp (const void *a, const void *b);
typedef struct GHashPair {
const void *first;
- int second;
+ const void *second;
} GHashPair;
-GHashPair* BLI_ghashutil_pairalloc (const void *first, int second);
+GHashPair* BLI_ghashutil_pairalloc (const void *first, const void *second);
unsigned int BLI_ghashutil_pairhash (const void *ptr);
int BLI_ghashutil_paircmp (const void *a, const void *b);
void BLI_ghashutil_pairfree (void *ptr);
diff --git a/source/blender/blenlib/BLI_jitter.h b/source/blender/blenlib/BLI_jitter.h
index 9aa21a89521..c2a6250c154 100644
--- a/source/blender/blenlib/BLI_jitter.h
+++ b/source/blender/blenlib/BLI_jitter.h
@@ -32,7 +32,7 @@
* \ingroup bli
*/
-void BLI_initjit(float *jitarr, int num);
+void BLI_jitter_init(float *jitarr, int num);
void BLI_jitterate1(float *jit1, float *jit2, int num, float rad1);
void BLI_jitterate2(float *jit1, float *jit2, int num, float rad2);
diff --git a/source/blender/blenlib/BLI_lasso.h b/source/blender/blenlib/BLI_lasso.h
new file mode 100644
index 00000000000..2360173c3b8
--- /dev/null
+++ b/source/blender/blenlib/BLI_lasso.h
@@ -0,0 +1,41 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifndef __BLI_LASSO_H__
+#define __BLI_LASSO_H__
+
+/** \file BLI_lasso.h
+ * \ingroup bli
+ */
+
+struct rcti;
+
+void BLI_lasso_boundbox(struct rcti *rect, int mcords[][2], short moves);
+int BLI_lasso_is_point_inside(int mcords[][2], short moves, int sx, int sy, const int error_value);
+int BLI_lasso_is_edge_inside(int mcords[][2], short moves, int x0, int y0, int x1, int y1, const int error_value);
+
+#endif
diff --git a/source/blender/blenlib/BLI_math_geom.h b/source/blender/blenlib/BLI_math_geom.h
index 9b5e3638609..85129d5b68d 100644
--- a/source/blender/blenlib/BLI_math_geom.h
+++ b/source/blender/blenlib/BLI_math_geom.h
@@ -244,14 +244,14 @@ void tangent_from_uv(float uv1[2], float uv2[2], float uv3[2],
void vcloud_estimate_transform(int list_size, float (*pos)[3], float *weight,
float (*rpos)[3], float *rweight,
- float lloc[3],float rloc[3],float lrot[3][3],float lscale[3][3]);
+ float lloc[3], float rloc[3], float lrot[3][3], float lscale[3][3]);
/****************************** Spherical Harmonics *************************/
/* Uses 2nd order SH => 9 coefficients, stored in this order:
- * 0 = (0,0),
- * 1 = (1,-1), 2 = (1,0), 3 = (1,1),
- * 4 = (2,-2), 5 = (2,-1), 6 = (2,0), 7 = (2,1), 8 = (2,2) */
+ * 0 = (0, 0),
+ * 1 = (1, -1), 2 = (1, 0), 3 = (1, 1),
+ * 4 = (2, -2), 5 = (2, -1), 6 = (2, 0), 7 = (2, 1), 8 = (2, 2) */
MINLINE void zero_sh(float r[9]);
MINLINE void copy_sh_sh(float r[9], const float a[9]);
diff --git a/source/blender/blenlib/BLI_math_matrix.h b/source/blender/blenlib/BLI_math_matrix.h
index 00a751f9da3..1d99fd4fa27 100644
--- a/source/blender/blenlib/BLI_math_matrix.h
+++ b/source/blender/blenlib/BLI_math_matrix.h
@@ -126,6 +126,8 @@ int is_orthogonal_m4(float mat[4][4]);
int is_orthonormal_m3(float mat[3][3]);
int is_orthonormal_m4(float mat[4][4]);
+int is_uniform_scaled_m3(float mat[3][3]);
+
void adjoint_m3_m3(float R[3][3], float A[3][3]);
void adjoint_m4_m4(float R[4][4], float A[4][4]);
diff --git a/source/blender/blenlib/BLI_math_vector.h b/source/blender/blenlib/BLI_math_vector.h
index af3df9c9ed2..249f2265440 100644
--- a/source/blender/blenlib/BLI_math_vector.h
+++ b/source/blender/blenlib/BLI_math_vector.h
@@ -126,7 +126,7 @@ MINLINE void cross_v3_v3v3(float r[3], const float a[3], const float b[3]);
MINLINE void add_newell_cross_v3_v3v3(float n[3], const float v_prev[3], const float v_curr[3]);
-MINLINE void star_m3_v3(float rmat[3][3],float a[3]);
+MINLINE void star_m3_v3(float rmat[3][3], float a[3]);
/*********************************** Length **********************************/
@@ -186,6 +186,7 @@ float angle_normalized_v2v2(const float a[2], const float b[2]);
float angle_v3v3(const float a[3], const float b[3]);
float angle_v3v3v3(const float a[3], const float b[3], const float c[3]);
float angle_normalized_v3v3(const float v1[3], const float v2[3]);
+float angle_on_axis_v3v3v3_v3(const float v1[3], const float v2[3], const float v3[3], const float axis[3]);
void angle_tri_v3(float angles[3], const float v1[3], const float v2[3], const float v3[3]);
void angle_quad_v3(float angles[4], const float v1[3], const float v2[3], const float v3[3], const float v4[3]);
void angle_poly_v3(float* angles, const float* verts[3], int len);
diff --git a/source/blender/blenlib/BLI_memarena.h b/source/blender/blenlib/BLI_memarena.h
index 8306a69e567..508cc03d848 100644
--- a/source/blender/blenlib/BLI_memarena.h
+++ b/source/blender/blenlib/BLI_memarena.h
@@ -1,5 +1,4 @@
-/*
- *
+/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/blenlib/BLI_path_util.h b/source/blender/blenlib/BLI_path_util.h
index e02b48feda7..1d085a46a19 100644
--- a/source/blender/blenlib/BLI_path_util.h
+++ b/source/blender/blenlib/BLI_path_util.h
@@ -109,7 +109,7 @@ void BLI_newname(char * name, int add);
int BLI_stringdec(const char *string, char *head, char *start, unsigned short *numlen);
void BLI_stringenc(char *string, const char *head, const char *tail, unsigned short numlen, int pic);
int BLI_split_name_num(char *left, int *nr, const char *name, const char delim);
-void BLI_splitdirstring(char *di,char *fi);
+void BLI_splitdirstring(char *di, char *fi);
/* make sure path separators conform to system one */
void BLI_clean(char *path);
diff --git a/source/blender/blenlib/BLI_scanfill.h b/source/blender/blenlib/BLI_scanfill.h
index 26bcd50ef3e..081d5ccfb66 100644
--- a/source/blender/blenlib/BLI_scanfill.h
+++ b/source/blender/blenlib/BLI_scanfill.h
@@ -91,14 +91,14 @@ typedef struct ScanFillFace
} ScanFillFace;
/* scanfill.c: used in displist only... */
-struct ScanFillVert *BLI_addfillvert(ScanFillContext *sf_ctx, const float vec[3]);
-struct ScanFillEdge *BLI_addfilledge(ScanFillContext *sf_ctx, struct ScanFillVert *v1, struct ScanFillVert *v2);
+struct ScanFillVert *BLI_scanfill_vert_add(ScanFillContext *sf_ctx, const float vec[3]);
+struct ScanFillEdge *BLI_scanfill_edge_add(ScanFillContext *sf_ctx, struct ScanFillVert *v1, struct ScanFillVert *v2);
-int BLI_begin_edgefill(ScanFillContext *sf_ctx);
-int BLI_edgefill(ScanFillContext *sf_ctx, const short do_quad_tri_speedup);
-int BLI_edgefill_ex(ScanFillContext *sf_ctx, const short do_quad_tri_speedup,
+int BLI_scanfill_begin(ScanFillContext *sf_ctx);
+int BLI_scanfill_calc(ScanFillContext *sf_ctx, const short do_quad_tri_speedup);
+int BLI_scanfill_calc_ex(ScanFillContext *sf_ctx, const short do_quad_tri_speedup,
const float nor_proj[3]);
-void BLI_end_edgefill(ScanFillContext *sf_ctx);
+void BLI_scanfill_end(ScanFillContext *sf_ctx);
/* These callbacks are needed to make the lib finction properly */
diff --git a/source/blender/blenlib/BLI_threads.h b/source/blender/blenlib/BLI_threads.h
index 8e75a2db629..a4698ab4dd0 100644
--- a/source/blender/blenlib/BLI_threads.h
+++ b/source/blender/blenlib/BLI_threads.h
@@ -1,6 +1,4 @@
/*
- *
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h
index 3a533f73d9d..18c2aa3313c 100644
--- a/source/blender/blenlib/BLI_utildefines.h
+++ b/source/blender/blenlib/BLI_utildefines.h
@@ -79,36 +79,36 @@
#define MAX4(x,y,z,a) MAX2( MAX2((x),(y)) , MAX2((z),(a)) )
#define INIT_MINMAX(min, max) { \
- (min)[0]= (min)[1]= (min)[2]= 1.0e30f; \
- (max)[0]= (max)[1]= (max)[2]= -1.0e30f; \
+ (min)[0] = (min)[1] = (min)[2] = 1.0e30f; \
+ (max)[0] = (max)[1] = (max)[2] = -1.0e30f; \
}
#define INIT_MINMAX2(min, max) { \
- (min)[0]= (min)[1]= 1.0e30f; \
- (max)[0]= (max)[1]= -1.0e30f; \
+ (min)[0] = (min)[1] = 1.0e30f; \
+ (max)[0] = (max)[1] = -1.0e30f; \
} (void)0
#define DO_MIN(vec, min) { \
- if( (min)[0]>(vec)[0] ) (min)[0]= (vec)[0]; \
- if( (min)[1]>(vec)[1] ) (min)[1]= (vec)[1]; \
- if( (min)[2]>(vec)[2] ) (min)[2]= (vec)[2]; \
+ if ((min)[0] > (vec)[0]) (min)[0] = (vec)[0]; \
+ if ((min)[1] > (vec)[1]) (min)[1] = (vec)[1]; \
+ if ((min)[2] > (vec)[2]) (min)[2] = (vec)[2]; \
} (void)0
#define DO_MAX(vec, max) { \
- if( (max)[0]<(vec)[0] ) (max)[0]= (vec)[0]; \
- if( (max)[1]<(vec)[1] ) (max)[1]= (vec)[1]; \
- if( (max)[2]<(vec)[2] ) (max)[2]= (vec)[2]; \
+ if ((max)[0] < (vec)[0]) (max)[0] = (vec)[0]; \
+ if ((max)[1] < (vec)[1]) (max)[1] = (vec)[1]; \
+ if ((max)[2] < (vec)[2]) (max)[2] = (vec)[2]; \
} (void)0
#define DO_MINMAX(vec, min, max) { \
- if( (min)[0]>(vec)[0] ) (min)[0]= (vec)[0]; \
- if( (min)[1]>(vec)[1] ) (min)[1]= (vec)[1]; \
- if( (min)[2]>(vec)[2] ) (min)[2]= (vec)[2]; \
- if( (max)[0]<(vec)[0] ) (max)[0]= (vec)[0]; \
- if( (max)[1]<(vec)[1] ) (max)[1]= (vec)[1]; \
- if( (max)[2]<(vec)[2] ) (max)[2]= (vec)[2]; \
+ if ((min)[0] > (vec)[0] ) (min)[0] = (vec)[0]; \
+ if ((min)[1] > (vec)[1] ) (min)[1] = (vec)[1]; \
+ if ((min)[2] > (vec)[2] ) (min)[2] = (vec)[2]; \
+ if ((max)[0] < (vec)[0] ) (max)[0] = (vec)[0]; \
+ if ((max)[1] < (vec)[1] ) (max)[1] = (vec)[1]; \
+ if ((max)[2] < (vec)[2] ) (max)[2] = (vec)[2]; \
} (void)0
#define DO_MINMAX2(vec, min, max) { \
- if( (min)[0]>(vec)[0] ) (min)[0]= (vec)[0]; \
- if( (min)[1]>(vec)[1] ) (min)[1]= (vec)[1]; \
- if( (max)[0]<(vec)[0] ) (max)[0]= (vec)[0]; \
- if( (max)[1]<(vec)[1] ) (max)[1]= (vec)[1]; \
+ if ((min)[0] > (vec)[0] ) (min)[0] = (vec)[0]; \
+ if ((min)[1] > (vec)[1] ) (min)[1] = (vec)[1]; \
+ if ((max)[0] < (vec)[0] ) (max)[0] = (vec)[0]; \
+ if ((max)[1] < (vec)[1] ) (max)[1] = (vec)[1]; \
} (void)0
/* some math and copy defines */
diff --git a/source/blender/blenlib/BLI_uvproject.h b/source/blender/blenlib/BLI_uvproject.h
index 5abad87452c..516a9b8b237 100644
--- a/source/blender/blenlib/BLI_uvproject.h
+++ b/source/blender/blenlib/BLI_uvproject.h
@@ -24,22 +24,22 @@
* \ingroup bli
*/
-struct UvCameraInfo;
+struct ProjCameraInfo;
struct Object;
/* create uv info from the camera, needs to be freed */
-struct UvCameraInfo *project_camera_info(struct Object *ob, float rotmat[4][4], float winx, float winy);
+struct ProjCameraInfo *BLI_uvproject_camera_info(struct Object *ob, float rotmat[4][4], float winx, float winy);
/* apply uv from uvinfo (camera) */
-void project_from_camera(float target[2], float source[3], struct UvCameraInfo *uci);
+void BLI_uvproject_from_camera(float target[2], float source[3], struct ProjCameraInfo *uci);
/* apply uv from perspective matrix */
-void project_from_view(float target[2], float source[3], float persmat[4][4], float rotmat[4][4], float winx, float winy);
+void BLI_uvproject_from_view(float target[2], float source[3], float persmat[4][4], float rotmat[4][4], float winx, float winy);
/* apply ortho uv's */
-void project_from_view_ortho(float target[2], float source[3], float rotmat[4][4]);
+void BLI_uvproject_from_view_ortho(float target[2], float source[3], float rotmat[4][4]);
/* so we can adjust scale with keeping the struct private */
-void project_camera_info_scale(struct UvCameraInfo *uci, float scale_x, float scale_y);
+void BLI_uvproject_camera_info_scale(struct ProjCameraInfo *uci, float scale_x, float scale_y);
#endif
diff --git a/source/blender/blenlib/BLI_voxel.h b/source/blender/blenlib/BLI_voxel.h
index 4a13810a705..7b92ac05d29 100644
--- a/source/blender/blenlib/BLI_voxel.h
+++ b/source/blender/blenlib/BLI_voxel.h
@@ -33,12 +33,12 @@
*/
/** find the index number of a voxel, given x/y/z integer coords and resolution vector */
-#define V_I(x, y, z, res) ( (z)*(res)[1]*(res)[0] + (y)*(res)[0] + (x) )
+#define BLI_VOXEL_INDEX(x, y, z, res) ((z) * (res)[1] * (res)[0] + (y) * (res)[0] + (x))
/* all input coordinates must be in bounding box 0.0 - 1.0 */
-float voxel_sample_nearest(float *data, const int res[3], const float co[3]);
-float voxel_sample_trilinear(float *data, const int res[3], const float co[3]);
-float voxel_sample_triquadratic(float *data, const int res[3], const float co[3]);
-float voxel_sample_tricubic(float *data, const int res[3], const float co[3], int bspline);
+float BLI_voxel_sample_nearest(float *data, const int res[3], const float co[3]);
+float BLI_voxel_sample_trilinear(float *data, const int res[3], const float co[3]);
+float BLI_voxel_sample_triquadratic(float *data, const int res[3], const float co[3]);
+float BLI_voxel_sample_tricubic(float *data, const int res[3], const float co[3], int bspline);
#endif /* __BLI_VOXEL_H__ */
diff --git a/source/blender/blenlib/CMakeLists.txt b/source/blender/blenlib/CMakeLists.txt
index c06a1240729..d4b9bc3d2bc 100644
--- a/source/blender/blenlib/CMakeLists.txt
+++ b/source/blender/blenlib/CMakeLists.txt
@@ -61,6 +61,7 @@ set(SRC
intern/graph.c
intern/gsqueue.c
intern/jitter.c
+ intern/lasso.c
intern/listbase.c
intern/math_base.c
intern/math_base_inline.c
@@ -90,10 +91,9 @@ set(SRC
intern/voxel.c
intern/winstuff.c
+ BLI_args.h
BLI_array.h
BLI_bitmap.h
- BLI_smallhash.h
- BLI_args.h
BLI_blenlib.h
BLI_boxpack2d.h
BLI_bpath.h
@@ -103,7 +103,6 @@ set(SRC
BLI_dynlib.h
BLI_dynstr.h
BLI_edgehash.h
- BLI_editVert.h
BLI_fileops.h
BLI_fileops_types.h
BLI_fnmatch.h
@@ -114,6 +113,7 @@ set(SRC
BLI_jitter.h
BLI_kdopbvh.h
BLI_kdtree.h
+ BLI_lasso.h
BLI_linklist.h
BLI_listbase.h
BLI_math.h
@@ -133,6 +133,7 @@ set(SRC
BLI_rand.h
BLI_rect.h
BLI_scanfill.h
+ BLI_smallhash.h
BLI_string.h
BLI_string_cursor_utf8.h
BLI_string_utf8.h
diff --git a/source/blender/blenlib/PIL_time.h b/source/blender/blenlib/PIL_time.h
index 7d34d33d686..c3c10239a8e 100644
--- a/source/blender/blenlib/PIL_time.h
+++ b/source/blender/blenlib/PIL_time.h
@@ -1,6 +1,4 @@
-/*
- * Platform independent time functions.
- *
+/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -29,6 +27,7 @@
/** \file blender/blenlib/PIL_time.h
* \ingroup bli
+ * \brief Platform independent time functions.
*/
diff --git a/source/blender/blenlib/intern/BLI_args.c b/source/blender/blenlib/intern/BLI_args.c
index cd904030bb9..ed3c6fad1a0 100644
--- a/source/blender/blenlib/intern/BLI_args.c
+++ b/source/blender/blenlib/intern/BLI_args.c
@@ -1,7 +1,4 @@
/*
- * A general argument parsing module
- *
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -30,9 +27,9 @@
/** \file blender/blenlib/intern/BLI_args.c
* \ingroup bli
+ * \brief A general argument parsing module
*/
-
#include <ctype.h> /* for tolower */
#include <string.h>
diff --git a/source/blender/blenlib/intern/BLI_ghash.c b/source/blender/blenlib/intern/BLI_ghash.c
index 28b4794ed1b..65461b7258a 100644
--- a/source/blender/blenlib/intern/BLI_ghash.c
+++ b/source/blender/blenlib/intern/BLI_ghash.c
@@ -145,7 +145,7 @@ int BLI_ghash_remove(GHash *gh, void *key, GHashKeyFreeFP keyfreefp, GHashValFre
else
gh->buckets[hash] = n;
- --gh->nentries;
+ gh->nentries--;
return 1;
}
p = e;
@@ -305,7 +305,7 @@ int BLI_ghashutil_strcmp(const void *a, const void *b)
return strcmp(a, b);
}
-GHashPair *BLI_ghashutil_pairalloc(const void *first, int second)
+GHashPair *BLI_ghashutil_pairalloc(const void *first, const void *second)
{
GHashPair *pair = MEM_mallocN(sizeof(GHashPair), "GHashPair");
pair->first = first;
@@ -317,7 +317,7 @@ unsigned int BLI_ghashutil_pairhash(const void *ptr)
{
const GHashPair *pair = ptr;
unsigned int hash = BLI_ghashutil_ptrhash(pair->first);
- return hash ^ BLI_ghashutil_inthash(SET_INT_IN_POINTER(pair->second));
+ return hash ^ BLI_ghashutil_ptrhash(pair->second);
}
int BLI_ghashutil_paircmp(const void *a, const void *b)
@@ -327,7 +327,7 @@ int BLI_ghashutil_paircmp(const void *a, const void *b)
int cmp = BLI_ghashutil_ptrcmp(A->first, B->first);
if (cmp == 0)
- return BLI_ghashutil_intcmp(SET_INT_IN_POINTER(A->second), SET_INT_IN_POINTER(B->second));
+ return BLI_ghashutil_ptrcmp(A->second, B->second);
return cmp;
}
diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c
index 2cc67b3f0aa..8662406b0e9 100644
--- a/source/blender/blenlib/intern/BLI_kdopbvh.c
+++ b/source/blender/blenlib/intern/BLI_kdopbvh.c
@@ -129,7 +129,7 @@ static float KDOP_AXES[13][3] =
/*
* Generic push and pop heap
*/
-#define PUSH_HEAP_BODY(HEAP_TYPE,PRIORITY,heap,heap_size) \
+#define PUSH_HEAP_BODY(HEAP_TYPE, PRIORITY, heap, heap_size) \
{ \
HEAP_TYPE element = heap[heap_size-1]; \
int child = heap_size-1; \
@@ -146,7 +146,7 @@ static float KDOP_AXES[13][3] =
heap[child] = element; \
}
-#define POP_HEAP_BODY(HEAP_TYPE, PRIORITY,heap,heap_size) \
+#define POP_HEAP_BODY(HEAP_TYPE, PRIORITY, heap, heap_size) \
{ \
HEAP_TYPE element = heap[heap_size-1]; \
int parent = 0; \
@@ -177,7 +177,7 @@ static int ADJUST_MEMORY(void *local_memblock, void **memblock, int new_size, in
if (*memblock == local_memblock)
{
new_memblock = malloc( size_per_item * new_max_size );
- memcpy( new_memblock, *memblock, size_per_item * *max_size );
+ memcpy(new_memblock, *memblock, size_per_item * *max_size);
}
else
new_memblock = realloc(*memblock, size_per_item * new_max_size );
@@ -215,14 +215,12 @@ static int floor_lg(int a)
*/
static void bvh_insertionsort(BVHNode **a, int lo, int hi, int axis)
{
- int i,j;
+ int i, j;
BVHNode *t;
- for (i=lo; i < hi; i++)
- {
+ for (i=lo; i < hi; i++) {
j=i;
t = a[i];
- while ((j!=lo) && (t->bv[axis] < (a[j-1])->bv[axis]))
- {
+ while ((j!=lo) && (t->bv[axis] < (a[j-1])->bv[axis])) {
a[j] = a[j-1];
j--;
}
@@ -233,14 +231,13 @@ static void bvh_insertionsort(BVHNode **a, int lo, int hi, int axis)
static int bvh_partition(BVHNode **a, int lo, int hi, BVHNode * x, int axis)
{
int i=lo, j=hi;
- while (1)
- {
+ while (1) {
while ((a[i])->bv[axis] < x->bv[axis]) i++;
j--;
while (x->bv[axis] < (a[j])->bv[axis]) j--;
if (!(i < j))
return i;
- SWAP( BVHNode* , a[i], a[j]);
+ SWAP(BVHNode *, a[i], a[j]);
i++;
}
}
@@ -272,34 +269,30 @@ static void bvh_heapsort(BVHNode **a, int lo, int hi, int axis)
int n = hi-lo, i;
for (i=n/2; i>=1; i=i-1)
{
- bvh_downheap(a, i,n,lo, axis);
+ bvh_downheap(a, i, n, lo, axis);
}
for (i=n; i>1; i=i-1)
{
- SWAP(BVHNode*, a[lo],a[lo+i-1]);
- bvh_downheap(a, 1,i-1,lo, axis);
+ SWAP(BVHNode*, a[lo], a[lo+i-1]);
+ bvh_downheap(a, 1, i-1, lo, axis);
}
}
#endif
static BVHNode *bvh_medianof3(BVHNode **a, int lo, int mid, int hi, int axis) // returns Sortable
{
- if ((a[mid])->bv[axis] < (a[lo])->bv[axis])
- {
+ if ((a[mid])->bv[axis] < (a[lo])->bv[axis]) {
if ((a[hi])->bv[axis] < (a[mid])->bv[axis])
return a[mid];
- else
- {
+ else {
if ((a[hi])->bv[axis] < (a[lo])->bv[axis])
return a[hi];
else
return a[lo];
}
}
- else
- {
- if ((a[hi])->bv[axis] < (a[mid])->bv[axis])
- {
+ else {
+ if ((a[hi])->bv[axis] < (a[mid])->bv[axis]) {
if ((a[hi])->bv[axis] < (a[lo])->bv[axis])
return a[lo];
else
@@ -354,8 +347,7 @@ static void sort_along_axis(BVHTree *tree, int start, int end, int axis)
static int partition_nth_element(BVHNode **a, int _begin, int _end, int n, int axis)
{
int begin = _begin, end = _end, cut;
- while (end-begin > 3)
- {
+ while (end-begin > 3) {
cut = bvh_partition(a, begin, end, bvh_medianof3(a, begin, (begin+end)/2, end-1, axis), axis );
if (cut <= n)
begin = cut;
@@ -375,12 +367,11 @@ static void build_skip_links(BVHTree *tree, BVHNode *node, BVHNode *left, BVHNod
node->skip[0] = left;
node->skip[1] = right;
- for (i = 0; i < node->totnode; i++)
- {
+ for (i = 0; i < node->totnode; i++) {
if (i+1 < node->totnode)
- build_skip_links(tree, node->children[i], left, node->children[i+1] );
+ build_skip_links(tree, node->children[i], left, node->children[i + 1]);
else
- build_skip_links(tree, node->children[i], left, right );
+ build_skip_links(tree, node->children[i], left, right);
left = node->children[i];
}
@@ -396,20 +387,16 @@ static void create_kdop_hull(BVHTree *tree, BVHNode *node, const float *co, int
int i, k;
// don't init boudings for the moving case
- if (!moving)
- {
- for (i = tree->start_axis; i < tree->stop_axis; i++)
- {
- bv[2*i] = FLT_MAX;
- bv[2*i + 1] = -FLT_MAX;
+ if (!moving) {
+ for (i = tree->start_axis; i < tree->stop_axis; i++) {
+ bv[2 * i] = FLT_MAX;
+ bv[2 * i + 1] = -FLT_MAX;
}
}
- for (k = 0; k < numpoints; k++)
- {
- // for all Axes.
- for (i = tree->start_axis; i < tree->stop_axis; i++)
- {
+ for (k = 0; k < numpoints; k++) {
+ /* for all Axes. */
+ for (i = tree->start_axis; i < tree->stop_axis; i++) {
newminmax = dot_v3v3(&co[k * 3], KDOP_AXES[i]);
if (newminmax < bv[2 * i])
bv[2 * i] = newminmax;
@@ -422,22 +409,19 @@ static void create_kdop_hull(BVHTree *tree, BVHNode *node, const float *co, int
// depends on the fact that the BVH's for each face is already build
static void refit_kdop_hull(BVHTree *tree, BVHNode *node, int start, int end)
{
- float newmin,newmax;
+ float newmin, newmax;
int i, j;
float *bv = node->bv;
- for (i = tree->start_axis; i < tree->stop_axis; i++)
- {
+ for (i = tree->start_axis; i < tree->stop_axis; i++) {
bv[2*i] = FLT_MAX;
bv[2*i + 1] = -FLT_MAX;
}
- for (j = start; j < end; j++)
- {
-// for all Axes.
- for (i = tree->start_axis; i < tree->stop_axis; i++)
- {
+ for (j = start; j < end; j++) {
+ /* for all Axes. */
+ for (i = tree->start_axis; i < tree->stop_axis; i++) {
newmin = tree->nodes[j]->bv[(2 * i)];
if ((newmin < bv[(2 * i)]))
bv[(2 * i)] = newmin;
@@ -459,15 +443,13 @@ static char get_largest_axis(float *bv)
middle_point[0] = (bv[1]) - (bv[0]); // x axis
middle_point[1] = (bv[3]) - (bv[2]); // y axis
middle_point[2] = (bv[5]) - (bv[4]); // z axis
- if (middle_point[0] > middle_point[1])
- {
+ if (middle_point[0] > middle_point[1]) {
if (middle_point[0] > middle_point[2])
return 1; // max x axis
else
return 5; // max z axis
}
- else
- {
+ else {
if (middle_point[1] > middle_point[2])
return 3; // max y axis
else
@@ -481,18 +463,14 @@ static void node_join(BVHTree *tree, BVHNode *node)
{
int i, j;
- for (i = tree->start_axis; i < tree->stop_axis; i++)
- {
+ for (i = tree->start_axis; i < tree->stop_axis; i++) {
node->bv[2*i] = FLT_MAX;
node->bv[2*i + 1] = -FLT_MAX;
}
- for (i = 0; i < tree->tree_type; i++)
- {
- if (node->children[i])
- {
- for (j = tree->start_axis; j < tree->stop_axis; j++)
- {
+ for (i = 0; i < tree->tree_type; i++) {
+ if (node->children[i]) {
+ for (j = tree->start_axis; j < tree->stop_axis; j++) {
// update minimum
if (node->children[i]->bv[(2 * j)] < node->bv[(2 * j)])
node->bv[(2 * j)] = node->children[i]->bv[(2 * j)];
@@ -619,17 +597,17 @@ static void build_implicit_tree_helper(BVHTree *tree, BVHBuildHelper *data)
data->tree_type= tree->tree_type;
//Calculate the smallest tree_type^n such that tree_type^n >= num_leafs
- for (
- data->leafs_per_child[0] = 1;
- data->leafs_per_child[0] < data->totleafs;
- data->leafs_per_child[0] *= data->tree_type
- );
+ for (data->leafs_per_child[0] = 1;
+ data->leafs_per_child[0] < data->totleafs;
+ data->leafs_per_child[0] *= data->tree_type)
+ {
+ /* pass */
+ }
data->branches_on_level[0] = 1;
//We could stop the loop first (but I am lazy to find out when)
- for (depth = 1; depth < 32; depth++)
- {
+ for (depth = 1; depth < 32; depth++) {
data->branches_on_level[depth] = data->branches_on_level[depth-1] * data->tree_type;
data->leafs_per_child [depth] = data->leafs_per_child [depth-1] / data->tree_type;
}
@@ -693,15 +671,14 @@ static int implicit_needed_branches(int tree_type, int leafs)
* - if all elements are different all partition will get the same subset of elements
* as if the array was sorted.
*
- * partition P is described as the elements in the range ( nth[P] , nth[P+1] ]
+ * partition P is described as the elements in the range ( nth[P], nth[P+1] ]
*
* TODO: This can be optimized a bit by doing a specialized nth_element instead of K nth_elements
*/
static void split_leafs(BVHNode **leafs_array, int *nth, int partitions, int split_axis)
{
int i;
- for (i=0; i < partitions-1; i++)
- {
+ for (i=0; i < partitions-1; i++) {
if (nth[i] >= nth[partitions])
break;
@@ -742,8 +719,7 @@ static void non_recursive_bvh_div_nodes(BVHTree *tree, BVHNode *branches_array,
//Most of bvhtree code relies on 1-leaf trees having at least one branch
//We handle that special case here
- if (num_leafs == 1)
- {
+ if (num_leafs == 1) {
BVHNode *root = branches_array+0;
refit_kdop_hull(tree, root, 0, num_leafs);
root->main_axis = get_largest_axis(root->bv) / 2;
@@ -758,8 +734,7 @@ static void non_recursive_bvh_div_nodes(BVHTree *tree, BVHNode *branches_array,
build_implicit_tree_helper(tree, &data);
//Loop tree levels (log N) loops
- for (i=1, depth = 1; i <= num_branches; i = i*tree_type + tree_offset, depth++)
- {
+ for (i=1, depth = 1; i <= num_branches; i = i*tree_type + tree_offset, depth++) {
const int first_of_next_level = i*tree_type + tree_offset;
const int end_j = MIN2(first_of_next_level, num_branches + 1); //index of last branch on this level
int j;
@@ -885,22 +860,19 @@ BVHTree *BLI_bvhtree_new(int maxsize, float epsilon, char tree_type, char axis)
tree->nodes = (BVHNode **)MEM_callocN(sizeof(BVHNode *)*numnodes, "BVHNodes");
- if (!tree->nodes)
- {
+ if (!tree->nodes) {
MEM_freeN(tree);
return NULL;
}
tree->nodebv = (float*)MEM_callocN(sizeof(float)* axis * numnodes, "BVHNodeBV");
- if (!tree->nodebv)
- {
+ if (!tree->nodebv) {
MEM_freeN(tree->nodes);
MEM_freeN(tree);
}
tree->nodechild = (BVHNode**)MEM_callocN(sizeof(BVHNode*) * tree_type * numnodes, "BVHNodeBV");
- if (!tree->nodechild)
- {
+ if (!tree->nodechild) {
MEM_freeN(tree->nodebv);
MEM_freeN(tree->nodes);
MEM_freeN(tree);
@@ -908,8 +880,7 @@ BVHTree *BLI_bvhtree_new(int maxsize, float epsilon, char tree_type, char axis)
tree->nodearray = (BVHNode *)MEM_callocN(sizeof(BVHNode)* numnodes, "BVHNodeArray");
- if (!tree->nodearray)
- {
+ if (!tree->nodearray) {
MEM_freeN(tree->nodechild);
MEM_freeN(tree->nodebv);
MEM_freeN(tree->nodes);
@@ -918,8 +889,7 @@ BVHTree *BLI_bvhtree_new(int maxsize, float epsilon, char tree_type, char axis)
}
//link the dynamic bv and child links
- for (i=0; i< numnodes; i++)
- {
+ for (i=0; i< numnodes; i++) {
tree->nodearray[i].bv = tree->nodebv + i * axis;
tree->nodearray[i].children = tree->nodechild + i * tree_type;
}
@@ -931,8 +901,7 @@ BVHTree *BLI_bvhtree_new(int maxsize, float epsilon, char tree_type, char axis)
void BLI_bvhtree_free(BVHTree *tree)
{
- if (tree)
- {
+ if (tree) {
MEM_freeN(tree->nodes);
MEM_freeN(tree->nodearray);
MEM_freeN(tree->nodebv);
@@ -985,8 +954,7 @@ int BLI_bvhtree_insert(BVHTree *tree, int index, const float *co, int numpoints)
node->index= index;
// inflate the bv with some epsilon
- for (i = tree->start_axis; i < tree->stop_axis; i++)
- {
+ for (i = tree->start_axis; i < tree->stop_axis; i++) {
node->bv[(2 * i)] -= tree->epsilon; // minimum
node->bv[(2 * i) + 1] += tree->epsilon; // maximum
}
@@ -1013,8 +981,7 @@ int BLI_bvhtree_update_node(BVHTree *tree, int index, const float *co, const flo
create_kdop_hull(tree, node, co_moving, numpoints, 1);
// inflate the bv with some epsilon
- for (i = tree->start_axis; i < tree->stop_axis; i++)
- {
+ for (i = tree->start_axis; i < tree->stop_axis; i++) {
node->bv[(2 * i)] -= tree->epsilon; // minimum
node->bv[(2 * i) + 1] += tree->epsilon; // maximum
}
@@ -1057,8 +1024,7 @@ static int tree_overlap(BVHNode *node1, BVHNode *node2, int start_axis, int stop
bv2 += start_axis<<1;
// test all axis if min + max overlap
- for (; bv1 != bv1_end; bv1+=2, bv2+=2)
- {
+ for (; bv1 != bv1_end; bv1+=2, bv2+=2) {
if ((*(bv1) > *(bv2 + 1)) || (*(bv2) > *(bv1 + 1)))
return 0;
}
@@ -1070,27 +1036,21 @@ static void traverse(BVHOverlapData *data, BVHNode *node1, BVHNode *node2)
{
int j;
- if (tree_overlap(node1, node2, data->start_axis, data->stop_axis))
- {
+ if (tree_overlap(node1, node2, data->start_axis, data->stop_axis)) {
// check if node1 is a leaf
- if (!node1->totnode)
- {
+ if (!node1->totnode) {
// check if node2 is a leaf
- if (!node2->totnode)
- {
+ if (!node2->totnode) {
- if (node1 == node2)
- {
+ if (node1 == node2) {
return;
}
- if (data->i >= data->max_overlap)
- {
+ if (data->i >= data->max_overlap) {
// try to make alloc'ed memory bigger
data->overlap = realloc(data->overlap, sizeof(BVHTreeOverlap)*data->max_overlap*2);
- if (!data->overlap)
- {
+ if (!data->overlap) {
printf("Out of Memory in traverse\n");
return;
}
@@ -1103,20 +1063,15 @@ static void traverse(BVHOverlapData *data, BVHNode *node1, BVHNode *node2)
data->i++;
}
- else
- {
- for (j = 0; j < data->tree2->tree_type; j++)
- {
+ else {
+ for (j = 0; j < data->tree2->tree_type; j++) {
if (node2->children[j])
traverse(data, node1, node2->children[j]);
}
}
}
- else
- {
-
- for (j = 0; j < data->tree2->tree_type; j++)
- {
+ else {
+ for (j = 0; j < data->tree2->tree_type; j++) {
if (node1->children[j])
traverse(data, node1->children[j], node2);
}
@@ -1142,8 +1097,7 @@ BVHTreeOverlap *BLI_bvhtree_overlap(BVHTree *tree1, BVHTree *tree2, unsigned int
data = MEM_callocN(sizeof(BVHOverlapData *)* tree1->tree_type, "BVHOverlapData_star");
- for (j = 0; j < tree1->tree_type; j++)
- {
+ for (j = 0; j < tree1->tree_type; j++) {
data[j] = (BVHOverlapData *)MEM_callocN(sizeof(BVHOverlapData), "BVHOverlapData");
// init BVHOverlapData
@@ -1157,8 +1111,7 @@ BVHTreeOverlap *BLI_bvhtree_overlap(BVHTree *tree1, BVHTree *tree2, unsigned int
}
#pragma omp parallel for private(j) schedule(static)
- for (j = 0; j < MIN2(tree1->tree_type, tree1->nodes[tree1->totleaf]->totnode); j++)
- {
+ for (j = 0; j < MIN2(tree1->tree_type, tree1->nodes[tree1->totleaf]->totnode); j++) {
traverse(data[j], tree1->nodes[tree1->totleaf]->children[j], tree2->nodes[tree2->totleaf]);
}
@@ -1167,14 +1120,12 @@ BVHTreeOverlap *BLI_bvhtree_overlap(BVHTree *tree1, BVHTree *tree2, unsigned int
to = overlap = (BVHTreeOverlap *)MEM_callocN(sizeof(BVHTreeOverlap)*total, "BVHTreeOverlap");
- for (j = 0; j < tree1->tree_type; j++)
- {
+ for (j = 0; j < tree1->tree_type; j++) {
memcpy(to, data[j]->overlap, data[j]->i*sizeof(BVHTreeOverlap));
to+=data[j]->i;
}
- for (j = 0; j < tree1->tree_type; j++)
- {
+ for (j = 0; j < tree1->tree_type; j++) {
free(data[j]->overlap);
MEM_freeN(data[j]);
}
@@ -1191,8 +1142,7 @@ static float calc_nearest_point(const float proj[3], BVHNode *node, float *neare
const float *bv = node->bv;
//nearest on AABB hull
- for (i=0; i != 3; i++, bv += 2)
- {
+ for (i=0; i != 3; i++, bv += 2) {
if (bv[0] > proj[i])
nearest[i] = bv[0];
else if (bv[1] < proj[i])
@@ -1230,40 +1180,33 @@ typedef struct NodeDistance
} NodeDistance;
-#define NodeDistance_priority(a,b) ( (a).dist < (b).dist )
+#define NodeDistance_priority(a, b) ( (a).dist < (b).dist )
// TODO: use a priority queue to reduce the number of nodes looked on
static void dfs_find_nearest_dfs(BVHNearestData *data, BVHNode *node)
{
- if (node->totnode == 0)
- {
+ if (node->totnode == 0) {
if (data->callback)
- data->callback(data->userdata , node->index, data->co, &data->nearest);
- else
- {
+ data->callback(data->userdata, node->index, data->co, &data->nearest);
+ else {
data->nearest.index = node->index;
data->nearest.dist = calc_nearest_point(data->proj, node, data->nearest.co);
}
}
- else
- {
+ else {
//Better heuristic to pick the closest node to dive on
int i;
float nearest[3];
- if (data->proj[ node->main_axis ] <= node->children[0]->bv[node->main_axis*2+1])
- {
+ if (data->proj[ node->main_axis ] <= node->children[0]->bv[node->main_axis*2+1]) {
- for (i=0; i != node->totnode; i++)
- {
+ for (i=0; i != node->totnode; i++) {
if ( calc_nearest_point(data->proj, node->children[i], nearest) >= data->nearest.dist) continue;
dfs_find_nearest_dfs(data, node->children[i]);
}
}
- else
- {
- for (i=node->totnode-1; i >= 0 ; i--)
- {
+ else {
+ for (i=node->totnode-1; i >= 0 ; i--) {
if ( calc_nearest_point(data->proj, node->children[i], nearest) >= data->nearest.dist) continue;
dfs_find_nearest_dfs(data, node->children[i]);
}
@@ -1381,17 +1324,14 @@ int BLI_bvhtree_find_nearest(BVHTree *tree, const float co[3], BVHTreeNearest *n
data.callback = callback;
data.userdata = userdata;
- for (i = data.tree->start_axis; i != data.tree->stop_axis; i++)
- {
+ for (i = data.tree->start_axis; i != data.tree->stop_axis; i++) {
data.proj[i] = dot_v3v3(data.co, KDOP_AXES[i]);
}
- if (nearest)
- {
- memcpy( &data.nearest , nearest, sizeof(*nearest) );
+ if (nearest) {
+ memcpy(&data.nearest, nearest, sizeof(*nearest));
}
- else
- {
+ else {
data.nearest.index = -1;
data.nearest.dist = FLT_MAX;
}
@@ -1401,8 +1341,7 @@ int BLI_bvhtree_find_nearest(BVHTree *tree, const float co[3], BVHTreeNearest *n
dfs_find_nearest_begin(&data, root);
//copy back results
- if (nearest)
- {
+ if (nearest) {
memcpy(nearest, &data.nearest, sizeof(*nearest));
}
@@ -1424,10 +1363,8 @@ static float ray_nearest_hit(BVHRayCastData *data, float *bv)
float low = 0, upper = data->hit.dist;
- for (i=0; i != 3; i++, bv += 2)
- {
- if (data->ray_dot_axis[i] == 0.0f)
- {
+ for (i=0; i != 3; i++, bv += 2) {
+ if (data->ray_dot_axis[i] == 0.0f) {
//axis aligned ray
if (data->ray.origin[i] < bv[0] - data->ray.radius ||
data->ray.origin[i] > bv[1] + data->ray.radius)
@@ -1435,18 +1372,15 @@ static float ray_nearest_hit(BVHRayCastData *data, float *bv)
return FLT_MAX;
}
}
- else
- {
+ else {
float ll = (bv[0] - data->ray.radius - data->ray.origin[i]) / data->ray_dot_axis[i];
float lu = (bv[1] + data->ray.radius - data->ray.origin[i]) / data->ray_dot_axis[i];
- if (data->ray_dot_axis[i] > 0.0f)
- {
+ if (data->ray_dot_axis[i] > 0.0f) {
if (ll > low) low = ll;
if (lu < upper) upper = lu;
}
- else
- {
+ else {
if (lu > low) low = lu;
if (ll < upper) upper = ll;
}
@@ -1494,31 +1428,25 @@ static void dfs_raycast(BVHRayCastData *data, BVHNode *node)
float dist = (data->ray.radius > 0.0f) ? ray_nearest_hit(data, node->bv) : fast_ray_nearest_hit(data, node);
if (dist >= data->hit.dist) return;
- if (node->totnode == 0)
- {
- if (data->callback)
+ if (node->totnode == 0) {
+ if (data->callback) {
data->callback(data->userdata, node->index, &data->ray, &data->hit);
- else
- {
+ }
+ else {
data->hit.index = node->index;
data->hit.dist = dist;
madd_v3_v3v3fl(data->hit.co, data->ray.origin, data->ray.direction, dist);
}
}
- else
- {
+ else {
//pick loop direction to dive into the tree (based on ray direction and split axis)
- if (data->ray_dot_axis[ (int)node->main_axis ] > 0.0f)
- {
- for (i=0; i != node->totnode; i++)
- {
+ if (data->ray_dot_axis[ (int)node->main_axis ] > 0.0f) {
+ for (i=0; i != node->totnode; i++) {
dfs_raycast(data, node->children[i]);
}
}
- else
- {
- for (i=node->totnode-1; i >= 0; i--)
- {
+ else {
+ for (i=node->totnode-1; i >= 0; i--) {
dfs_raycast(data, node->children[i]);
}
}
@@ -1575,13 +1503,11 @@ int BLI_bvhtree_ray_cast(BVHTree *tree, const float co[3], const float dir[3], f
normalize_v3(data.ray.direction);
- for (i=0; i<3; i++)
- {
+ for (i=0; i<3; i++) {
data.ray_dot_axis[i] = dot_v3v3(data.ray.direction, KDOP_AXES[i]);
data.idot_axis[i] = 1.0f / data.ray_dot_axis[i];
- if (fabsf(data.ray_dot_axis[i]) < FLT_EPSILON)
- {
+ if (fabsf(data.ray_dot_axis[i]) < FLT_EPSILON) {
data.ray_dot_axis[i] = 0.0;
}
data.index[2*i] = data.idot_axis[i] < 0.0f ? 1 : 0;
@@ -1592,22 +1518,20 @@ int BLI_bvhtree_ray_cast(BVHTree *tree, const float co[3], const float dir[3], f
if (hit)
- memcpy( &data.hit, hit, sizeof(*hit) );
- else
- {
+ memcpy(&data.hit, hit, sizeof(*hit));
+ else {
data.hit.index = -1;
data.hit.dist = FLT_MAX;
}
- if (root)
- {
+ if (root) {
dfs_raycast(&data, root);
// iterative_raycast(&data, root);
}
if (hit)
- memcpy( hit, &data.hit, sizeof(*hit) );
+ memcpy(hit, &data.hit, sizeof(*hit));
return data.hit.index;
}
@@ -1635,8 +1559,7 @@ float BLI_bvhtree_bb_raycast(float *bv, const float light_start[3], const float
dist = ray_nearest_hit(&data, bv);
- if (dist > 0.0f)
- {
+ if (dist > 0.0f) {
madd_v3_v3v3fl(pos, light_start, data.ray.direction, dist);
}
return dist;
@@ -1666,8 +1589,7 @@ typedef struct RangeQueryData
static void dfs_range_query(RangeQueryData *data, BVHNode *node)
{
- if (node->totnode == 0)
- {
+ if (node->totnode == 0) {
#if 0 /*UNUSED*/
//Calculate the node min-coords (if the node was a point then this is the point coordinates)
float co[3];
@@ -1676,23 +1598,19 @@ static void dfs_range_query(RangeQueryData *data, BVHNode *node)
co[2] = node->bv[4];
#endif
}
- else
- {
+ else {
int i;
- for (i=0; i != node->totnode; i++)
- {
+ for (i=0; i != node->totnode; i++) {
float nearest[3];
float dist = calc_nearest_point(data->center, node->children[i], nearest);
- if (dist < data->radius)
- {
+ if (dist < data->radius) {
//Its a leaf.. call the callback
- if (node->children[i]->totnode == 0)
- {
+ if (node->children[i]->totnode == 0) {
data->hits++;
data->callback(data->userdata, node->children[i]->index, dist);
}
else
- dfs_range_query( data, node->children[i] );
+ dfs_range_query(data, node->children[i]);
}
}
}
@@ -1711,20 +1629,17 @@ int BLI_bvhtree_range_query(BVHTree *tree, const float co[3], float radius, BVHT
data.callback = callback;
data.userdata = userdata;
- if (root != NULL)
- {
+ if (root != NULL) {
float nearest[3];
float dist = calc_nearest_point(data.center, root, nearest);
- if (dist < data.radius)
- {
- //Its a leaf.. call the callback
- if (root->totnode == 0)
- {
+ if (dist < data.radius) {
+ /* Its a leaf.. call the callback */
+ if (root->totnode == 0) {
data.hits++;
data.callback(data.userdata, root->index, dist);
}
else
- dfs_range_query( &data, root );
+ dfs_range_query(&data, root);
}
}
diff --git a/source/blender/blenlib/intern/BLI_kdtree.c b/source/blender/blenlib/intern/BLI_kdtree.c
index ee06f32a934..a518d1445e3 100644
--- a/source/blender/blenlib/intern/BLI_kdtree.c
+++ b/source/blender/blenlib/intern/BLI_kdtree.c
@@ -167,7 +167,7 @@ int BLI_kdtree_find_nearest(KDTree *tree, float *co, float *nor, KDTreeNearest *
root= tree->root;
min_node= root;
- min_dist= squared_distance(root->co,co,root->nor,nor);
+ min_dist= squared_distance(root->co, co, root->nor, nor);
if (co[root->d] < root->co[root->d]) {
if (root->right)
@@ -191,7 +191,7 @@ int BLI_kdtree_find_nearest(KDTree *tree, float *co, float *nor, KDTreeNearest *
cur_dist= -cur_dist*cur_dist;
if (-cur_dist<min_dist) {
- cur_dist=squared_distance(node->co,co,node->nor,nor);
+ cur_dist=squared_distance(node->co, co, node->nor, nor);
if (cur_dist<min_dist) {
min_dist=cur_dist;
min_node=node;
@@ -206,7 +206,7 @@ int BLI_kdtree_find_nearest(KDTree *tree, float *co, float *nor, KDTreeNearest *
cur_dist= cur_dist*cur_dist;
if (cur_dist<min_dist) {
- cur_dist=squared_distance(node->co,co,node->nor,nor);
+ cur_dist=squared_distance(node->co, co, node->nor, nor);
if (cur_dist<min_dist) {
min_dist=cur_dist;
min_node=node;
@@ -219,7 +219,7 @@ int BLI_kdtree_find_nearest(KDTree *tree, float *co, float *nor, KDTreeNearest *
}
if (cur+3 > totstack) {
KDTreeNode **temp=MEM_callocN((totstack+100)*sizeof(KDTreeNode*), "psys_treestack");
- memcpy(temp,stack,totstack*sizeof(KDTreeNode*));
+ memcpy(temp, stack, totstack*sizeof(KDTreeNode*));
if (stack != defaultstack)
MEM_freeN(stack);
stack=temp;
@@ -273,8 +273,8 @@ int BLI_kdtree_find_n_nearest(KDTree *tree, int n, float *co, float *nor, KDTree
root= tree->root;
- cur_dist= squared_distance(root->co,co,root->nor,nor);
- add_nearest(nearest,&found,n,root->index,cur_dist,root->co);
+ cur_dist= squared_distance(root->co, co, root->nor, nor);
+ add_nearest(nearest, &found, n, root->index, cur_dist, root->co);
if (co[root->d] < root->co[root->d]) {
if (root->right)
@@ -298,10 +298,10 @@ int BLI_kdtree_find_n_nearest(KDTree *tree, int n, float *co, float *nor, KDTree
cur_dist= -cur_dist*cur_dist;
if (found<n || -cur_dist<nearest[found-1].dist) {
- cur_dist=squared_distance(node->co,co,node->nor,nor);
+ cur_dist=squared_distance(node->co, co, node->nor, nor);
if (found<n || cur_dist<nearest[found-1].dist)
- add_nearest(nearest,&found,n,node->index,cur_dist,node->co);
+ add_nearest(nearest, &found, n, node->index, cur_dist, node->co);
if (node->left)
stack[cur++]=node->left;
@@ -313,9 +313,9 @@ int BLI_kdtree_find_n_nearest(KDTree *tree, int n, float *co, float *nor, KDTree
cur_dist= cur_dist*cur_dist;
if (found<n || cur_dist<nearest[found-1].dist) {
- cur_dist=squared_distance(node->co,co,node->nor,nor);
+ cur_dist=squared_distance(node->co, co, node->nor, nor);
if (found<n || cur_dist<nearest[found-1].dist)
- add_nearest(nearest,&found,n,node->index,cur_dist,node->co);
+ add_nearest(nearest, &found, n, node->index, cur_dist, node->co);
if (node->right)
stack[cur++]=node->right;
@@ -325,7 +325,7 @@ int BLI_kdtree_find_n_nearest(KDTree *tree, int n, float *co, float *nor, KDTree
}
if (cur+3 > totstack) {
KDTreeNode **temp=MEM_callocN((totstack+100)*sizeof(KDTreeNode*), "psys_treestack");
- memcpy(temp,stack,totstack*sizeof(KDTreeNode*));
+ memcpy(temp, stack, totstack * sizeof(KDTreeNode*));
if (stack != defaultstack)
MEM_freeN(stack);
stack=temp;
@@ -432,7 +432,7 @@ int BLI_kdtree_range_search(KDTree *tree, float range, float *co, float *nor, KD
if (cur+3 > totstack) {
KDTreeNode **temp=MEM_callocN((totstack+100)*sizeof(KDTreeNode*), "psys_treestack");
- memcpy(temp,stack,totstack*sizeof(KDTreeNode*));
+ memcpy(temp, stack, totstack*sizeof(KDTreeNode*));
if (stack != defaultstack)
MEM_freeN(stack);
stack=temp;
diff --git a/source/blender/blenlib/intern/DLRB_tree.c b/source/blender/blenlib/intern/DLRB_tree.c
index 0e90042a35f..6398bd863db 100644
--- a/source/blender/blenlib/intern/DLRB_tree.c
+++ b/source/blender/blenlib/intern/DLRB_tree.c
@@ -44,7 +44,7 @@ DLRBT_Tree *BLI_dlrbTree_new (void)
}
/* Just zero out the pointers used */
-void BLI_dlrbTree_init (DLRBT_Tree *tree)
+void BLI_dlrbTree_init(DLRBT_Tree *tree)
{
if (tree == NULL)
return;
@@ -68,7 +68,7 @@ static void recursive_tree_free_nodes (DLRBT_Node *node)
}
/* Free the given tree's data but not the tree itself */
-void BLI_dlrbTree_free (DLRBT_Tree *tree)
+void BLI_dlrbTree_free(DLRBT_Tree *tree)
{
if (tree == NULL)
return;
@@ -113,7 +113,7 @@ static void linkedlist_sync_add_node (DLRBT_Tree *tree, DLRBT_Node *node)
}
/* Make sure the tree's Double-Linked list representation is valid */
-void BLI_dlrbTree_linkedlist_sync (DLRBT_Tree *tree)
+void BLI_dlrbTree_linkedlist_sync(DLRBT_Tree *tree)
{
/* sanity checks */
if (tree == NULL)
@@ -141,8 +141,7 @@ DLRBT_Node *BLI_dlrbTree_search (DLRBT_Tree *tree, DLRBT_Comparator_FP cmp_cb, v
return NULL;
/* iteratively perform this search */
- while (node && found==0)
- {
+ while (node && found == 0) {
/* check if traverse further or not
* NOTE: it is assumed that the values will be unit values only
*/
@@ -183,8 +182,7 @@ DLRBT_Node *BLI_dlrbTree_search_exact (DLRBT_Tree *tree, DLRBT_Comparator_FP cmp
return NULL;
/* iteratively perform this search */
- while (node && found==0)
- {
+ while (node && found==0) {
/* check if traverse further or not
* NOTE: it is assumed that the values will be unit values only
*/
@@ -488,7 +486,7 @@ static void insert_check_3 (DLRBT_Tree *tree, DLRBT_Node *node)
/* Balance the tree after the given element has been added to it
* (using custom code, in the Binary Tree way).
*/
-void BLI_dlrbTree_insert (DLRBT_Tree *tree, DLRBT_Node *node)
+void BLI_dlrbTree_insert(DLRBT_Tree *tree, DLRBT_Node *node)
{
/* sanity checks */
if ((tree == NULL) || (node == NULL))
diff --git a/source/blender/blenlib/intern/boxpack2d.c b/source/blender/blenlib/intern/boxpack2d.c
index 6631e36fc72..f1931d35819 100644
--- a/source/blender/blenlib/intern/boxpack2d.c
+++ b/source/blender/blenlib/intern/boxpack2d.c
@@ -38,14 +38,14 @@ typedef struct boxVert {
float y;
short free;
- struct boxPack *trb; /* top right box */
- struct boxPack *blb; /* bottom left box */
- struct boxPack *brb; /* bottom right box */
- struct boxPack *tlb; /* top left box */
+ struct BoxPack *trb; /* top right box */
+ struct BoxPack *blb; /* bottom left box */
+ struct BoxPack *brb; /* bottom right box */
+ struct BoxPack *tlb; /* top left box */
/* Store last intersecting boxes here
* speedup intersection testing */
- struct boxPack *isect_cache[4];
+ struct BoxPack *isect_cache[4];
int index;
} boxVert;
@@ -105,7 +105,7 @@ typedef struct boxVert {
/* qsort function - sort largest to smallest */
static int box_areasort(const void *p1, const void *p2)
{
- const boxPack *b1 = p1, *b2 = p2;
+ const BoxPack *b1 = p1, *b2 = p2;
const float a1 = BOXAREA(b1);
const float a2 = BOXAREA(b2);
@@ -152,12 +152,12 @@ static int vertex_sort(const void *p1, const void *p2)
* len - the number of boxes in the array.
* tot_width and tot_height are set so you can normalize the data.
* */
-void boxPack2D(boxPack *boxarray, const int len, float *tot_width, float *tot_height)
+void BLI_box_pack_2D(BoxPack *boxarray, const int len, float *tot_width, float *tot_height)
{
boxVert *vert; /* the current vert */
int box_index, verts_pack_len, i, j, k, isect;
int quad_flags[4] = {BLF, TRF, TLF, BRF}; /* use for looping */
- boxPack *box, *box_test; /*current box and another for intersection tests*/
+ BoxPack *box, *box_test; /*current box and another for intersection tests*/
int *vertex_pack_indices; /*an array of indices used for sorting verts*/
if (!len) {
@@ -167,11 +167,11 @@ void boxPack2D(boxPack *boxarray, const int len, float *tot_width, float *tot_he
}
/* Sort boxes, biggest first */
- qsort(boxarray, len, sizeof(boxPack), box_areasort);
+ qsort(boxarray, len, sizeof(BoxPack), box_areasort);
/* add verts to the boxes, these are only used internally */
- vert = vertarray = MEM_mallocN(len * 4 * sizeof(boxVert), "boxPack Verts");
- vertex_pack_indices = MEM_mallocN(len * 3 * sizeof(int), "boxPack Indices");
+ vert = vertarray = MEM_mallocN(len * 4 * sizeof(boxVert), "BoxPack Verts");
+ vertex_pack_indices = MEM_mallocN(len * 3 * sizeof(int), "BoxPack Indices");
for (box = boxarray, box_index = 0, i = 0; box_index < len; box_index++, box++) {
diff --git a/source/blender/blenlib/intern/bpath.c b/source/blender/blenlib/intern/bpath.c
index 0504ac5be60..48912eb927a 100644
--- a/source/blender/blenlib/intern/bpath.c
+++ b/source/blender/blenlib/intern/bpath.c
@@ -92,9 +92,9 @@ static int checkMissingFiles_visit_cb(void *userdata, char *UNUSED(path_dst), co
}
/* high level function */
-void checkMissingFiles(Main *bmain, ReportList *reports)
+void BLI_bpath_missing_files_check(Main *bmain, ReportList *reports)
{
- bpath_traverse_main(bmain, checkMissingFiles_visit_cb, BPATH_TRAVERSE_ABS, reports);
+ BLI_bpath_traverse_main(bmain, checkMissingFiles_visit_cb, BLI_BPATH_TRAVERSE_ABS, reports);
}
typedef struct BPathRemap_Data {
@@ -129,7 +129,7 @@ static int makeFilesRelative_visit_cb(void *userdata, char *path_dst, const char
}
}
-void makeFilesRelative(Main *bmain, const char *basedir, ReportList *reports)
+void BLI_bpath_relative_convert(Main *bmain, const char *basedir, ReportList *reports)
{
BPathRemap_Data data = {NULL};
@@ -141,7 +141,7 @@ void makeFilesRelative(Main *bmain, const char *basedir, ReportList *reports)
data.basedir = basedir;
data.reports = reports;
- bpath_traverse_main(bmain, makeFilesRelative_visit_cb, 0, (void *)&data);
+ BLI_bpath_traverse_main(bmain, makeFilesRelative_visit_cb, 0, (void *)&data);
BKE_reportf(reports, data.count_failed ? RPT_WARNING : RPT_INFO,
"Total files %d|Changed %d|Failed %d",
@@ -171,8 +171,8 @@ static int makeFilesAbsolute_visit_cb(void *userdata, char *path_dst, const char
}
}
-/* similar to makeFilesRelative - keep in sync! */
-void makeFilesAbsolute(Main *bmain, const char *basedir, ReportList *reports)
+/* similar to BLI_bpath_relative_convert - keep in sync! */
+void BLI_bpath_absolute_convert(Main *bmain, const char *basedir, ReportList *reports)
{
BPathRemap_Data data = {NULL};
@@ -184,7 +184,7 @@ void makeFilesAbsolute(Main *bmain, const char *basedir, ReportList *reports)
data.basedir = basedir;
data.reports = reports;
- bpath_traverse_main(bmain, makeFilesAbsolute_visit_cb, 0, (void *)&data);
+ BLI_bpath_traverse_main(bmain, makeFilesAbsolute_visit_cb, 0, (void *)&data);
BKE_reportf(reports, data.count_failed ? RPT_WARNING : RPT_INFO,
"Total files %d|Changed %d|Failed %d",
@@ -293,14 +293,14 @@ static int findMissingFiles_visit_cb(void *userdata, char *path_dst, const char
}
}
-void findMissingFiles(Main *bmain, const char *searchpath, ReportList *reports)
+void BLI_bpath_missing_files_find(Main *bmain, const char *searchpath, ReportList *reports)
{
struct BPathFind_Data data = {NULL};
data.reports = reports;
BLI_split_dir_part(searchpath, data.searchdir, sizeof(data.searchdir));
- bpath_traverse_main(bmain, findMissingFiles_visit_cb, 0, (void *)&data);
+ BLI_bpath_traverse_main(bmain, findMissingFiles_visit_cb, 0, (void *)&data);
}
/* Run a visitor on a string, replacing the contents of the string as needed. */
@@ -378,19 +378,19 @@ static int rewrite_path_alloc(char **path, BPathVisitor visit_cb, const char *ab
}
/* Run visitor function 'visit' on all paths contained in 'id'. */
-void bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int flag, void *bpath_user_data)
+void BLI_bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int flag, void *bpath_user_data)
{
Image *ima;
- const char *absbase = (flag & BPATH_TRAVERSE_ABS) ? ID_BLEND_PATH(bmain, id) : NULL;
+ const char *absbase = (flag & BLI_BPATH_TRAVERSE_ABS) ? ID_BLEND_PATH(bmain, id) : NULL;
- if ((flag & BPATH_TRAVERSE_SKIP_LIBRARY) && id->lib) {
+ if ((flag & BLI_BPATH_TRAVERSE_SKIP_LIBRARY) && id->lib) {
return;
}
- switch(GS(id->name)) {
+ switch (GS(id->name)) {
case ID_IM:
ima= (Image *)id;
- if (ima->packedfile == NULL || (flag & BPATH_TRAVERSE_SKIP_PACKED) == 0) {
+ if (ima->packedfile == NULL || (flag & BLI_BPATH_TRAVERSE_SKIP_PACKED) == 0) {
if (ELEM3(ima->source, IMA_SRC_FILE, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) {
rewrite_path_fixed(ima->name, visit_cb, absbase, bpath_user_data);
}
@@ -470,7 +470,7 @@ void bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int fla
case ID_SO:
{
bSound *sound= (bSound *)id;
- if (sound->packedfile == NULL || (flag & BPATH_TRAVERSE_SKIP_PACKED) == 0) {
+ if (sound->packedfile == NULL || (flag & BLI_BPATH_TRAVERSE_SKIP_PACKED) == 0) {
rewrite_path_fixed(sound->name, visit_cb, absbase, bpath_user_data);
}
}
@@ -483,7 +483,7 @@ void bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int fla
case ID_VF:
{
VFont *vf= (VFont *)id;
- if (vf->packedfile == NULL || (flag & BPATH_TRAVERSE_SKIP_PACKED) == 0) {
+ if (vf->packedfile == NULL || (flag & BLI_BPATH_TRAVERSE_SKIP_PACKED) == 0) {
if (strcmp(vf->name, FO_BUILTIN_NAME) != 0) {
rewrite_path_fixed(((VFont *)id)->name, visit_cb, absbase, bpath_user_data);
}
@@ -510,7 +510,8 @@ void bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int fla
if (scene->ed) {
Sequence *seq;
- SEQ_BEGIN(scene->ed, seq) {
+ SEQ_BEGIN (scene->ed, seq)
+ {
if (SEQ_HAS_PATH(seq)) {
if (ELEM(seq->type, SEQ_MOVIE, SEQ_SOUND)) {
rewrite_path_fixed_dirfile(seq->strip->dir, seq->strip->stripdata->name,
@@ -522,7 +523,7 @@ void bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int fla
int len= MEM_allocN_len(se) / sizeof(*se);
int i;
- if (flag & BPATH_TRAVERSE_SKIP_MULTIFILE) {
+ if (flag & BLI_BPATH_TRAVERSE_SKIP_MULTIFILE) {
/* only operate on one path */
len= MIN2(1, len);
}
@@ -574,26 +575,26 @@ void bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int fla
}
}
-void bpath_traverse_id_list(Main *bmain, ListBase *lb, BPathVisitor visit_cb, const int flag, void *bpath_user_data)
+void BLI_bpath_traverse_id_list(Main *bmain, ListBase *lb, BPathVisitor visit_cb, const int flag, void *bpath_user_data)
{
ID *id;
for (id = lb->first; id; id = id->next) {
- bpath_traverse_id(bmain, id, visit_cb, flag, bpath_user_data);
+ BLI_bpath_traverse_id(bmain, id, visit_cb, flag, bpath_user_data);
}
}
-void bpath_traverse_main(Main *bmain, BPathVisitor visit_cb, const int flag, void *bpath_user_data)
+void BLI_bpath_traverse_main(Main *bmain, BPathVisitor visit_cb, const int flag, void *bpath_user_data)
{
ListBase *lbarray[MAX_LIBARRAY];
int a = set_listbasepointers(bmain, lbarray);
while (a--) {
- bpath_traverse_id_list(bmain, lbarray[a], visit_cb, flag, bpath_user_data);
+ BLI_bpath_traverse_id_list(bmain, lbarray[a], visit_cb, flag, bpath_user_data);
}
}
/* Rewrites a relative path to be relative to the main file - unless the path is
* absolute, in which case it is not altered. */
-int bpath_relocate_visitor(void *pathbase_v, char *path_dst, const char *path_src)
+int BLI_bpath_relocate_visitor(void *pathbase_v, char *path_dst, const char *path_src)
{
/* be sure there is low chance of the path being too short */
char filepath[(FILE_MAXDIR * 2) + FILE_MAXFILE];
diff --git a/source/blender/blenlib/intern/callbacks.c b/source/blender/blenlib/intern/callbacks.c
index 0cb986d9090..876599f7480 100644
--- a/source/blender/blenlib/intern/callbacks.c
+++ b/source/blender/blenlib/intern/callbacks.c
@@ -28,7 +28,7 @@
static ListBase callback_slots[BLI_CB_EVT_TOT]= {{NULL}};
-void BLI_exec_cb(struct Main *main, struct ID *self, eCbEvent evt)
+void BLI_callback_exec(struct Main *main, struct ID *self, eCbEvent evt)
{
ListBase *lb= &callback_slots[evt];
bCallbackFuncStore *funcstore;
@@ -38,19 +38,19 @@ void BLI_exec_cb(struct Main *main, struct ID *self, eCbEvent evt)
}
}
-void BLI_add_cb(bCallbackFuncStore *funcstore, eCbEvent evt)
+void BLI_callback_add(bCallbackFuncStore *funcstore, eCbEvent evt)
{
ListBase *lb= &callback_slots[evt];
BLI_addtail(lb, funcstore);
}
-void BLI_cb_init(void)
+void BLI_callback_global_init(void)
{
/* do nothing */
}
/* call on application exit */
-void BLI_cb_finalize(void)
+void BLI_callback_global_finalize(void)
{
eCbEvent evt;
for (evt= 0; evt < BLI_CB_EVT_TOT; evt++) {
diff --git a/source/blender/blenlib/intern/cpu.c b/source/blender/blenlib/intern/cpu.c
index 0a805293a05..4e2003dcbf7 100644
--- a/source/blender/blenlib/intern/cpu.c
+++ b/source/blender/blenlib/intern/cpu.c
@@ -1,6 +1,4 @@
/*
- *
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/blenlib/intern/dynlib.c b/source/blender/blenlib/intern/dynlib.c
index e300d09ffbc..c80f3e08e3b 100644
--- a/source/blender/blenlib/intern/dynlib.c
+++ b/source/blender/blenlib/intern/dynlib.c
@@ -85,7 +85,9 @@ char *BLI_dynlib_get_error_as_string(DynamicLibrary *lib)
if (FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS,
NULL, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
buf, sizeof(buf), NULL))
+ {
return buf;
+ }
}
return NULL;
diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c
index 4b5ea44e97c..0a5e4d9fd48 100644
--- a/source/blender/blenlib/intern/fileops.c
+++ b/source/blender/blenlib/intern/fileops.c
@@ -82,7 +82,7 @@ int BLI_file_gzip(const char *from, const char *to)
gzfile = BLI_gzopen(to, "wb1");
if (gzfile == NULL)
return -1;
- file = BLI_open(from, O_BINARY|O_RDONLY,0);
+ file = BLI_open(from, O_BINARY|O_RDONLY, 0);
if (file < 0)
return -2;
@@ -223,17 +223,17 @@ void *BLI_gzopen(const char *filename, const char *mode)
/* xxx Creates file before transcribing the path */
if (mode[0] == 'w')
- fclose(ufopen(filename,"a"));
+ fclose(ufopen(filename, "a"));
UTF16_ENCODE(filename);
- GetShortPathNameW(filename_16,short_name_16, 256);
+ GetShortPathNameW(filename_16, short_name_16, 256);
for (i = 0; i < 256; i++) {
- short_name[i] = short_name_16[i];
+ short_name[i] = (char)short_name_16[i];
}
- gzfile = gzopen(short_name,mode);
+ gzfile = gzopen(short_name, mode);
UTF16_UN_ENCODE(filename);
}
@@ -367,7 +367,7 @@ void BLI_dir_create_recursive(const char *dirname)
if (dirname[0]) /* patch, this recursive loop tries to create a nameless directory */
if (umkdir(dirname)==-1)
- printf("Unable to create directory %s\n",dirname);
+ printf("Unable to create directory %s\n", dirname);
}
int BLI_rename(const char *from, const char *to)
diff --git a/source/blender/blenlib/intern/freetypefont.c b/source/blender/blenlib/intern/freetypefont.c
index a9a1f2bc57e..d85765d8f56 100644
--- a/source/blender/blenlib/intern/freetypefont.c
+++ b/source/blender/blenlib/intern/freetypefont.c
@@ -82,7 +82,7 @@ static void freetypechar_to_vchar(FT_Face face, FT_ULong charcode, VFontData *vf
FT_Outline ftoutline;
float scale, height;
float dx, dy;
- int j,k,l,m=0;
+ int j, k, l, m=0;
// adjust font size
height= ((double) face->bbox.yMax - (double) face->bbox.yMin);
@@ -116,8 +116,8 @@ static void freetypechar_to_vchar(FT_Face face, FT_ULong charcode, VFontData *vf
che->width= glyph->advance.x * scale;
// Start converting the FT data
- npoints = (int *)MEM_callocN((ftoutline.n_contours) * sizeof(int),"endpoints");
- onpoints = (int *)MEM_callocN((ftoutline.n_contours) * sizeof(int),"onpoints");
+ npoints = (int *)MEM_callocN((ftoutline.n_contours) * sizeof(int), "endpoints");
+ onpoints = (int *)MEM_callocN((ftoutline.n_contours) * sizeof(int), "onpoints");
// calculate total points of each contour
for (j = 0; j < ftoutline.n_contours; j++) {
@@ -127,17 +127,21 @@ static void freetypechar_to_vchar(FT_Face face, FT_ULong charcode, VFontData *vf
npoints[j] = ftoutline.contours[j] - ftoutline.contours[j - 1];
}
- // get number of on-curve points for beziertriples (including conic virtual on-points)
+ // get number of on-curve points for beziertriples (including conic virtual on-points)
for (j = 0; j < ftoutline.n_contours; j++) {
for (k = 0; k < npoints[j]; k++) {
- if (j > 0) l = k + ftoutline.contours[j - 1] + 1; else l = k;
- if (ftoutline.tags[l] == FT_Curve_Tag_On)
- onpoints[j]++;
+ l = (j > 0) ? (k + ftoutline.contours[j - 1] + 1) : k;
+
+ if (ftoutline.tags[l] == FT_Curve_Tag_On)
+ onpoints[j]++;
- if (k < npoints[j] - 1 )
+ if (k < npoints[j] - 1 ) {
if ( ftoutline.tags[l] == FT_Curve_Tag_Conic &&
- ftoutline.tags[l+1] == FT_Curve_Tag_Conic)
+ ftoutline.tags[l+1] == FT_Curve_Tag_Conic)
+ {
onpoints[j]++;
+ }
+ }
}
}
@@ -267,7 +271,7 @@ static void freetypechar_to_vchar(FT_Face face, FT_ULong charcode, VFontData *vf
// len_squared_v2v2, see if there's a distance between the three points
// len_squared_v2v2 again, to check the angle between the handles
// finally, check if one of them is a vector handle
- if ((dist_to_line_v2(bezt->vec[0],bezt->vec[1],bezt->vec[2]) < 0.001f) &&
+ if ((dist_to_line_v2(bezt->vec[0], bezt->vec[1], bezt->vec[2]) < 0.001f) &&
(len_squared_v2v2(bezt->vec[0], bezt->vec[1]) > 0.0001f*0.0001f) &&
(len_squared_v2v2(bezt->vec[1], bezt->vec[2]) > 0.0001f*0.0001f) &&
(len_squared_v2v2(bezt->vec[0], bezt->vec[2]) > 0.0002f*0.0001f) &&
@@ -293,14 +297,14 @@ static int objchr_to_ftvfontdata(VFont *vfont, FT_ULong charcode)
struct TmpFont *tf;
// Find the correct FreeType font
- tf= vfont_find_tmpfont(vfont);
+ tf= BKE_vfont_find_tmpfont(vfont);
// What, no font found. Something strange here
if (!tf) return FALSE;
// Load the font to memory
if (tf->pf) {
- err= FT_New_Memory_Face( library,
+ err= FT_New_Memory_Face(library,
tf->pf->data,
tf->pf->size,
0,
@@ -338,7 +342,7 @@ static VFontData *objfnt_to_ftvfontdata(PackedFile * pf)
#endif
// load the freetype font
- err = FT_New_Memory_Face( library,
+ err = FT_New_Memory_Face(library,
pf->data,
pf->size,
0,
@@ -347,10 +351,10 @@ static VFontData *objfnt_to_ftvfontdata(PackedFile * pf)
if (err) return NULL;
#if 0
- for ( n = 0; n < face->num_charmaps; n++ )
+ for (n = 0; n < face->num_charmaps; n++)
{
charmap = face->charmaps[n];
- if ( charmap->platform_id == my_platform_id &&
+ if (charmap->platform_id == my_platform_id &&
charmap->encoding_id == my_encoding_id )
{
found = charmap;
@@ -358,11 +362,11 @@ static VFontData *objfnt_to_ftvfontdata(PackedFile * pf)
}
}
- if ( !found ) { return NULL; }
+ if (!found ) { return NULL; }
// now, select the charmap for the face object
- err = FT_Set_Charmap( face, found );
- if ( err ) { return NULL; }
+ err = FT_Set_Charmap(face, found);
+ if (err) { return NULL; }
#endif
// allocate blender font
@@ -389,7 +393,7 @@ static VFontData *objfnt_to_ftvfontdata(PackedFile * pf)
}
}
- err = FT_Set_Charmap( face, found );
+ err = FT_Set_Charmap(face, found);
if ( err )
return NULL;
@@ -398,8 +402,7 @@ static VFontData *objfnt_to_ftvfontdata(PackedFile * pf)
}
// Load characters
- while (charcode < 256)
- {
+ while (charcode < 256) {
// Generate the font data
freetypechar_to_vchar(face, charcode, vfd);
@@ -495,7 +498,7 @@ VFontData *BLI_vfontdata_from_freetypefont(PackedFile *pf)
}
//free Freetype
- FT_Done_FreeType( library);
+ FT_Done_FreeType(library);
return vfd;
}
@@ -617,7 +620,7 @@ font driver produces such outlines.
Each glyph's original outline points are located on a grid of indivisible units. The points are stored
-in the font file as 16-bit integer grid coordinates, with the grid origin's being at (0,0); they thus
+in the font file as 16-bit integer grid coordinates, with the grid origin's being at (0, 0); they thus
range from -16384 to 16383.
Convert conic to bezier arcs:
diff --git a/source/blender/blenlib/intern/graph.c b/source/blender/blenlib/intern/graph.c
index 75131f81ade..432a74a5890 100644
--- a/source/blender/blenlib/intern/graph.c
+++ b/source/blender/blenlib/intern/graph.c
@@ -46,13 +46,11 @@ static void flagAxialSymmetry(BNode *root_node, BNode *end_node, BArc *arc, int
void BLI_freeNode(BGraph *graph, BNode *node)
{
- if (node->arcs)
- {
+ if (node->arcs) {
MEM_freeN(node->arcs);
}
- if (graph->free_node)
- {
+ if (graph->free_node) {
graph->free_node(node);
}
}
@@ -70,8 +68,7 @@ BNode *BLI_otherNode(BArc *arc, BNode *node)
void BLI_removeArc(BGraph *graph, BArc *arc)
{
- if (graph->free_arc)
- {
+ if (graph->free_arc) {
graph->free_arc(arc);
}
@@ -82,8 +79,7 @@ void BLI_flagNodes(BGraph *graph, int flag)
{
BNode *node;
- for (node = graph->nodes.first; node; node = node->next)
- {
+ for (node = graph->nodes.first; node; node = node->next) {
node->flag = flag;
}
}
@@ -92,8 +88,7 @@ void BLI_flagArcs(BGraph *graph, int flag)
{
BArc *arc;
- for (arc = graph->arcs.first; arc; arc = arc->next)
- {
+ for (arc = graph->arcs.first; arc; arc = arc->next) {
arc->flag = flag;
}
}
@@ -109,10 +104,8 @@ void BLI_buildAdjacencyList(BGraph *graph)
BNode *node;
BArc *arc;
- for (node = graph->nodes.first; node; node = node->next)
- {
- if (node->arcs != NULL)
- {
+ for (node = graph->nodes.first; node; node = node->next) {
+ if (node->arcs != NULL) {
MEM_freeN(node->arcs);
}
@@ -122,16 +115,13 @@ void BLI_buildAdjacencyList(BGraph *graph)
node->flag = 0;
}
- for (arc = graph->arcs.first; arc; arc= arc->next)
- {
+ for (arc = graph->arcs.first; arc; arc= arc->next) {
addArcToNodeAdjacencyList(arc->head, arc);
addArcToNodeAdjacencyList(arc->tail, arc);
}
- for (node = graph->nodes.first; node; node = node->next)
- {
- if (node->degree != node->flag)
- {
+ for (node = graph->nodes.first; node; node = node->next) {
+ if (node->degree != node->flag) {
printf("error in node [%p]. Added only %i arcs out of %i\n", (void *)node, node->flag, node->degree);
}
}
@@ -141,8 +131,7 @@ void BLI_rebuildAdjacencyListForNode(BGraph* graph, BNode *node)
{
BArc *arc;
- if (node->arcs != NULL)
- {
+ if (node->arcs != NULL) {
MEM_freeN(node->arcs);
}
@@ -151,20 +140,16 @@ void BLI_rebuildAdjacencyListForNode(BGraph* graph, BNode *node)
/* temporary use to indicate the first index available in the lists */
node->flag = 0;
- for (arc = graph->arcs.first; arc; arc= arc->next)
- {
- if (arc->head == node)
- {
+ for (arc = graph->arcs.first; arc; arc= arc->next) {
+ if (arc->head == node) {
addArcToNodeAdjacencyList(arc->head, arc);
}
- else if (arc->tail == node)
- {
+ else if (arc->tail == node) {
addArcToNodeAdjacencyList(arc->tail, arc);
}
}
- if (node->degree != node->flag)
- {
+ if (node->degree != node->flag) {
printf("error in node [%p]. Added only %i arcs out of %i\n", (void *)node, node->flag, node->degree);
}
}
@@ -173,10 +158,8 @@ void BLI_freeAdjacencyList(BGraph *graph)
{
BNode *node;
- for (node = graph->nodes.first; node; node = node->next)
- {
- if (node->arcs != NULL)
- {
+ for (node = graph->nodes.first; node; node = node->next) {
+ if (node->arcs != NULL) {
MEM_freeN(node->arcs);
node->arcs = NULL;
}
@@ -187,10 +170,8 @@ int BLI_hasAdjacencyList(BGraph *graph)
{
BNode *node;
- for (node = graph->nodes.first; node; node = node->next)
- {
- if (node->arcs == NULL)
- {
+ for (node = graph->nodes.first; node; node = node->next) {
+ if (node->arcs == NULL) {
return 0;
}
}
@@ -200,28 +181,24 @@ int BLI_hasAdjacencyList(BGraph *graph)
void BLI_replaceNodeInArc(BGraph *graph, BArc *arc, BNode *node_src, BNode *node_replaced)
{
- if (arc->head == node_replaced)
- {
+ if (arc->head == node_replaced) {
arc->head = node_src;
node_src->degree++;
}
- if (arc->tail == node_replaced)
- {
+ if (arc->tail == node_replaced) {
arc->tail = node_src;
node_src->degree++;
}
- if (arc->head == arc->tail)
- {
+ if (arc->head == arc->tail) {
node_src->degree -= 2;
graph->free_arc(arc);
BLI_freelinkN(&graph->arcs, arc);
}
- if (node_replaced->degree == 0)
- {
+ if (node_replaced->degree == 0) {
BLI_removeNode(graph, node_replaced);
}
}
@@ -230,26 +207,22 @@ void BLI_replaceNode(BGraph *graph, BNode *node_src, BNode *node_replaced)
{
BArc *arc, *next_arc;
- for (arc = graph->arcs.first; arc; arc = next_arc)
- {
+ for (arc = graph->arcs.first; arc; arc = next_arc) {
next_arc = arc->next;
- if (arc->head == node_replaced)
- {
+ if (arc->head == node_replaced) {
arc->head = node_src;
node_replaced->degree--;
node_src->degree++;
}
- if (arc->tail == node_replaced)
- {
+ if (arc->tail == node_replaced) {
arc->tail = node_src;
node_replaced->degree--;
node_src->degree++;
}
- if (arc->head == arc->tail)
- {
+ if (arc->head == arc->tail) {
node_src->degree -= 2;
graph->free_arc(arc);
@@ -257,8 +230,7 @@ void BLI_replaceNode(BGraph *graph, BNode *node_src, BNode *node_replaced)
}
}
- if (node_replaced->degree == 0)
- {
+ if (node_replaced->degree == 0) {
BLI_removeNode(graph, node_replaced);
}
}
@@ -267,12 +239,9 @@ void BLI_removeDoubleNodes(BGraph *graph, float limit)
{
BNode *node_src, *node_replaced;
- for (node_src = graph->nodes.first; node_src; node_src = node_src->next)
- {
- for (node_replaced = graph->nodes.first; node_replaced; node_replaced = node_replaced->next)
- {
- if (node_replaced != node_src && len_v3v3(node_replaced->p, node_src->p) <= limit)
- {
+ for (node_src = graph->nodes.first; node_src; node_src = node_src->next) {
+ for (node_replaced = graph->nodes.first; node_replaced; node_replaced = node_replaced->next) {
+ if (node_replaced != node_src && len_v3v3(node_replaced->p, node_src->p) <= limit) {
BLI_replaceNode(graph, node_src, node_replaced);
}
}
@@ -285,11 +254,9 @@ BNode * BLI_FindNodeByPosition(BGraph *graph, float *p, float limit)
BNode *closest_node = NULL, *node;
float min_distance = 0.0f;
- for (node = graph->nodes.first; node; node = node->next)
- {
+ for (node = graph->nodes.first; node; node = node->next) {
float distance = len_v3v3(p, node->p);
- if (distance <= limit && (closest_node == NULL || distance < min_distance))
- {
+ if (distance <= limit && (closest_node == NULL || distance < min_distance)) {
closest_node = node;
min_distance = distance;
}
@@ -301,15 +268,13 @@ BNode * BLI_FindNodeByPosition(BGraph *graph, float *p, float limit)
static void flagSubgraph(BNode *node, int subgraph)
{
- if (node->subgraph_index == 0)
- {
+ if (node->subgraph_index == 0) {
BArc *arc;
int i;
node->subgraph_index = subgraph;
- for (i = 0; i < node->degree; i++)
- {
+ for (i = 0; i < node->degree; i++) {
arc = node->arcs[i];
flagSubgraph(BLI_otherNode(arc, node), subgraph);
}
@@ -321,20 +286,16 @@ int BLI_FlagSubgraphs(BGraph *graph)
BNode *node;
int subgraph = 0;
- if (BLI_hasAdjacencyList(graph) == 0)
- {
+ if (BLI_hasAdjacencyList(graph) == 0) {
BLI_buildAdjacencyList(graph);
}
- for (node = graph->nodes.first; node; node = node->next)
- {
+ for (node = graph->nodes.first; node; node = node->next) {
node->subgraph_index = 0;
}
- for (node = graph->nodes.first; node; node = node->next)
- {
- if (node->subgraph_index == 0)
- {
+ for (node = graph->nodes.first; node; node = node->next) {
+ if (node->subgraph_index == 0) {
subgraph++;
flagSubgraph(node, subgraph);
}
@@ -347,10 +308,8 @@ void BLI_ReflagSubgraph(BGraph *graph, int old_subgraph, int new_subgraph)
{
BNode *node;
- for (node = graph->nodes.first; node; node = node->next)
- {
- if (node->flag == old_subgraph)
- {
+ for (node = graph->nodes.first; node; node = node->next) {
+ if (node->flag == old_subgraph) {
node->flag = new_subgraph;
}
}
@@ -362,26 +321,22 @@ static int detectCycle(BNode *node, BArc *src_arc)
{
int value = 0;
- if (node->flag == 0)
- {
+ if (node->flag == 0) {
int i;
/* mark node as visited */
node->flag = 1;
- for (i = 0; i < node->degree && value == 0; i++)
- {
+ for (i = 0; i < node->degree && value == 0; i++) {
BArc *arc = node->arcs[i];
/* don't go back on the source arc */
- if (arc != src_arc)
- {
+ if (arc != src_arc) {
value = detectCycle(BLI_otherNode(arc, node), arc);
}
}
}
- else
- {
+ else {
value = 1;
}
@@ -399,11 +354,9 @@ int BLI_isGraphCyclic(BGraph *graph)
BLI_flagNodes(graph, 0);
/* detectCycles in subgraphs */
- for (node = graph->nodes.first; node && value == 0; node = node->next)
- {
+ for (node = graph->nodes.first; node && value == 0; node = node->next) {
/* only for nodes in subgraphs that haven't been visited yet */
- if (node->flag == 0)
- {
+ if (node->flag == 0) {
value = value || detectCycle(node, NULL);
}
}
@@ -415,10 +368,8 @@ BArc * BLI_findConnectedArc(BGraph *graph, BArc *arc, BNode *v)
{
BArc *nextArc;
- for (nextArc = graph->arcs.first; nextArc; nextArc = nextArc->next)
- {
- if (arc != nextArc && (nextArc->head == v || nextArc->tail == v))
- {
+ for (nextArc = graph->arcs.first; nextArc; nextArc = nextArc->next) {
+ if (arc != nextArc && (nextArc->head == v || nextArc->tail == v)) {
break;
}
}
@@ -434,30 +385,24 @@ static int subtreeShape(BNode *node, BArc *rootArc, int include_root)
node->flag = 1;
- if (include_root)
- {
+ if (include_root) {
BNode *newNode = BLI_otherNode(rootArc, node);
return subtreeShape(newNode, rootArc, 0);
}
- else
- {
+ else {
/* Base case, no arcs leading away */
- if (node->arcs == NULL || *(node->arcs) == NULL)
- {
+ if (node->arcs == NULL || *(node->arcs) == NULL) {
return 0;
}
- else
- {
+ else {
int i;
- for (i = 0; i < node->degree; i++)
- {
+ for (i = 0; i < node->degree; i++) {
BArc *arc = node->arcs[i];
BNode *newNode = BLI_otherNode(arc, node);
/* stop immediate and cyclic backtracking */
- if (arc != rootArc && newNode->flag == 0)
- {
+ if (arc != rootArc && newNode->flag == 0) {
depth += subtreeShape(newNode, arc, 0);
}
}
@@ -480,13 +425,11 @@ float BLI_subtreeLength(BNode *node)
node->flag = 0; /* flag node as visited */
- for (i = 0; i < node->degree; i++)
- {
+ for (i = 0; i < node->degree; i++) {
BArc *arc = node->arcs[i];
BNode *other_node = BLI_otherNode(arc, node);
- if (other_node->flag != 0)
- {
+ if (other_node->flag != 0) {
float subgraph_length = arc->length + BLI_subtreeLength(other_node);
length = MAX2(length, subgraph_length);
}
@@ -503,15 +446,12 @@ void BLI_calcGraphLength(BGraph *graph)
nb_subgraphs = BLI_FlagSubgraphs(graph);
- for (i = 1; i <= nb_subgraphs; i++)
- {
+ for (i = 1; i <= nb_subgraphs; i++) {
BNode *node;
- for (node = graph->nodes.first; node; node = node->next)
- {
+ for (node = graph->nodes.first; node; node = node->next) {
/* start on an external node of the subgraph */
- if (node->subgraph_index == i && node->degree == 1)
- {
+ if (node->subgraph_index == i && node->degree == 1) {
float subgraph_length = BLI_subtreeLength(node);
length = MAX2(length, subgraph_length);
break;
@@ -542,32 +482,27 @@ static void testRadialSymmetry(BGraph *graph, BNode* root_node, RadialArc* ring,
int i;
/* sort ring by angle */
- for (i = 0; i < total - 1; i++)
- {
+ for (i = 0; i < total - 1; i++) {
float minAngle = FLT_MAX;
int minIndex = -1;
int j;
- for (j = i + 1; j < total; j++)
- {
+ for (j = i + 1; j < total; j++) {
float angle = dot_v3v3(ring[i].n, ring[j].n);
/* map negative values to 1..2 */
- if (angle < 0)
- {
+ if (angle < 0) {
angle = 1 - angle;
}
- if (angle < minAngle)
- {
+ if (angle < minAngle) {
minIndex = j;
minAngle = angle;
}
}
/* swap if needed */
- if (minIndex != i + 1)
- {
+ if (minIndex != i + 1) {
RadialArc tmp;
tmp = ring[i + 1];
ring[i + 1] = ring[minIndex];
@@ -575,8 +510,7 @@ static void testRadialSymmetry(BGraph *graph, BNode* root_node, RadialArc* ring,
}
}
- for (i = 0; i < total && symmetric; i++)
- {
+ for (i = 0; i < total && symmetric; i++) {
BNode *node1, *node2;
float tangent[3];
float normal[3];
@@ -593,29 +527,25 @@ static void testRadialSymmetry(BGraph *graph, BNode* root_node, RadialArc* ring,
BLI_mirrorAlongAxis(p, root_node->p, normal);
/* check if it's within limit before continuing */
- if (len_v3v3(node1->p, p) > limit)
- {
+ if (len_v3v3(node1->p, p) > limit) {
symmetric = 0;
}
}
- if (symmetric)
- {
+ if (symmetric) {
/* mark node as symmetric physically */
copy_v3_v3(root_node->symmetry_axis, axis);
root_node->symmetry_flag |= SYM_PHYSICAL;
root_node->symmetry_flag |= SYM_RADIAL;
/* FLAG SYMMETRY GROUP */
- for (i = 0; i < total; i++)
- {
+ for (i = 0; i < total; i++) {
ring[i].arc->symmetry_group = group;
ring[i].arc->symmetry_flag = SYM_SIDE_RADIAL + i;
}
- if (graph->radial_symmetry)
- {
+ if (graph->radial_symmetry) {
graph->radial_symmetry(root_node, ring, total);
}
}
@@ -634,13 +564,11 @@ static void handleRadialSymmetry(BGraph *graph, BNode *root_node, int depth, flo
root_node->symmetry_flag |= SYM_TOPOLOGICAL;
/* total the number of arcs in the symmetry ring */
- for (i = 0; i < root_node->degree; i++)
- {
+ for (i = 0; i < root_node->degree; i++) {
BArc *connectedArc = root_node->arcs[i];
/* depth is store as a negative in flag. symmetry level is positive */
- if (connectedArc->symmetry_level == -depth)
- {
+ if (connectedArc->symmetry_level == -depth) {
total++;
}
}
@@ -649,13 +577,11 @@ static void handleRadialSymmetry(BGraph *graph, BNode *root_node, int depth, flo
unit = ring;
/* fill in the ring */
- for (unit = ring, i = 0; i < root_node->degree; i++)
- {
+ for (unit = ring, i = 0; i < root_node->degree; i++) {
BArc *connectedArc = root_node->arcs[i];
/* depth is store as a negative in flag. symmetry level is positive */
- if (connectedArc->symmetry_level == -depth)
- {
+ if (connectedArc->symmetry_level == -depth) {
BNode *otherNode = BLI_otherNode(connectedArc, root_node);
float vec[3];
@@ -676,19 +602,16 @@ static void handleRadialSymmetry(BGraph *graph, BNode *root_node, int depth, flo
* using a rather bogus insertion sort
* butrings will never get too big to matter
* */
- for (i = 0; i < total; i++)
- {
+ for (i = 0; i < total; i++) {
int j;
- for (j = i - 1; j >= 0; j--)
- {
+ for (j = i - 1; j >= 0; j--) {
BArc *arc1, *arc2;
arc1 = ring[j].arc;
arc2 = ring[j + 1].arc;
- if (arc1->length > arc2->length)
- {
+ if (arc1->length > arc2->length) {
/* swap with smaller */
RadialArc tmp;
@@ -696,8 +619,7 @@ static void handleRadialSymmetry(BGraph *graph, BNode *root_node, int depth, flo
ring[j + 1] = ring[j];
ring[j] = tmp;
}
- else
- {
+ else {
break;
}
}
@@ -707,38 +629,32 @@ static void handleRadialSymmetry(BGraph *graph, BNode *root_node, int depth, flo
first = 0;
group = 0;
- for (i = 1; i < total; i++)
- {
+ for (i = 1; i < total; i++) {
int dispatch = 0;
int last = i - 1;
- if (fabsf(ring[first].arc->length - ring[i].arc->length) > limit)
- {
+ if (fabsf(ring[first].arc->length - ring[i].arc->length) > limit) {
dispatch = 1;
}
/* if not dispatching already and on last arc
* Dispatch using current arc as last
* */
- if (dispatch == 0 && i == total - 1)
- {
+ if (dispatch == 0 && i == total - 1) {
last = i;
dispatch = 1;
}
- if (dispatch)
- {
+ if (dispatch) {
int sub_total = last - first + 1;
group += 1;
- if (sub_total == 1)
- {
+ if (sub_total == 1) {
group -= 1; /* not really a group so decrement */
/* NOTHING TO DO */
}
- else if (sub_total == 2)
- {
+ else if (sub_total == 2) {
BArc *arc1, *arc2;
BNode *node1, *node2;
@@ -750,14 +666,12 @@ static void handleRadialSymmetry(BGraph *graph, BNode *root_node, int depth, flo
testAxialSymmetry(graph, root_node, node1, node2, arc1, arc2, axis, limit, group);
}
- else if (sub_total != total) /* allocate a new sub ring if needed */
- {
+ else if (sub_total != total) /* allocate a new sub ring if needed */ {
RadialArc *sub_ring = MEM_callocN(sizeof(RadialArc) * sub_total, "radial symmetry ring");
int sub_i;
/* fill in the sub ring */
- for (sub_i = 0; sub_i < sub_total; sub_i++)
- {
+ for (sub_i = 0; sub_i < sub_total; sub_i++) {
sub_ring[sub_i] = ring[first + sub_i];
}
@@ -765,8 +679,7 @@ static void handleRadialSymmetry(BGraph *graph, BNode *root_node, int depth, flo
MEM_freeN(sub_ring);
}
- else if (sub_total == total)
- {
+ else if (sub_total == total) {
testRadialSymmetry(graph, root_node, ring, total, axis, limit, group);
}
@@ -786,12 +699,10 @@ static void flagAxialSymmetry(BNode *root_node, BNode *end_node, BArc *arc, int
sub_v3_v3v3(vec, end_node->p, root_node->p);
- if (dot_v3v3(vec, root_node->symmetry_axis) < 0)
- {
+ if (dot_v3v3(vec, root_node->symmetry_axis) < 0) {
arc->symmetry_flag |= SYM_SIDE_NEGATIVE;
}
- else
- {
+ else {
arc->symmetry_flag |= SYM_SIDE_POSITIVE;
}
}
@@ -809,16 +720,13 @@ static void testAxialSymmetry(BGraph *graph, BNode* root_node, BNode* node1, BNo
cross_v3_v3v3(nor, vec, axis);
- if (abs(nor[0]) > abs(nor[1]) && abs(nor[0]) > abs(nor[2]) && nor[0] < 0)
- {
+ if (abs(nor[0]) > abs(nor[1]) && abs(nor[0]) > abs(nor[2]) && nor[0] < 0) {
negate_v3(nor);
}
- else if (abs(nor[1]) > abs(nor[0]) && abs(nor[1]) > abs(nor[2]) && nor[1] < 0)
- {
+ else if (abs(nor[1]) > abs(nor[0]) && abs(nor[1]) > abs(nor[2]) && nor[1] < 0) {
negate_v3(nor);
}
- else if (abs(nor[2]) > abs(nor[1]) && abs(nor[2]) > abs(nor[0]) && nor[2] < 0)
- {
+ else if (abs(nor[2]) > abs(nor[1]) && abs(nor[2]) > abs(nor[0]) && nor[2] < 0) {
negate_v3(nor);
}
@@ -827,8 +735,7 @@ static void testAxialSymmetry(BGraph *graph, BNode* root_node, BNode* node1, BNo
BLI_mirrorAlongAxis(p, root_node->p, nor);
/* check if it's within limit before continuing */
- if (len_v3v3(node1->p, p) <= limit)
- {
+ if (len_v3v3(node1->p, p) <= limit) {
/* mark node as symmetric physically */
copy_v3_v3(root_node->symmetry_axis, nor);
root_node->symmetry_flag |= SYM_PHYSICAL;
@@ -838,13 +745,11 @@ static void testAxialSymmetry(BGraph *graph, BNode* root_node, BNode* node1, BNo
flagAxialSymmetry(root_node, node1, arc1, group);
flagAxialSymmetry(root_node, node2, arc2, group);
- if (graph->axial_symmetry)
- {
+ if (graph->axial_symmetry) {
graph->axial_symmetry(root_node, node1, node2, arc1, arc2);
}
}
- else
- {
+ else {
/* NOT SYMMETRIC */
}
}
@@ -858,20 +763,16 @@ static void handleAxialSymmetry(BGraph *graph, BNode *root_node, int depth, floa
/* mark topological symmetry */
root_node->symmetry_flag |= SYM_TOPOLOGICAL;
- for (i = 0; i < root_node->degree; i++)
- {
+ for (i = 0; i < root_node->degree; i++) {
BArc *connectedArc = root_node->arcs[i];
/* depth is store as a negative in flag. symmetry level is positive */
- if (connectedArc->symmetry_level == -depth)
- {
- if (arc1 == NULL)
- {
+ if (connectedArc->symmetry_level == -depth) {
+ if (arc1 == NULL) {
arc1 = connectedArc;
node1 = BLI_otherNode(arc1, root_node);
}
- else
- {
+ else {
arc2 = connectedArc;
node2 = BLI_otherNode(arc2, root_node);
break; /* Can stop now, the two arcs have been found */
@@ -880,8 +781,7 @@ static void handleAxialSymmetry(BGraph *graph, BNode *root_node, int depth, floa
}
/* shouldn't happen, but just to be sure */
- if (node1 == NULL || node2 == NULL)
- {
+ if (node1 == NULL || node2 == NULL) {
return;
}
@@ -897,18 +797,15 @@ static void markdownSecondarySymmetry(BGraph *graph, BNode *node, int depth, int
/* count the number of branches in this symmetry group
* and determinate the axis of symmetry
* */
- for (i = 0; i < node->degree; i++)
- {
+ for (i = 0; i < node->degree; i++) {
BArc *connectedArc = node->arcs[i];
/* depth is store as a negative in flag. symmetry level is positive */
- if (connectedArc->symmetry_level == -depth)
- {
+ if (connectedArc->symmetry_level == -depth) {
count++;
}
/* If arc is on the axis */
- else if (connectedArc->symmetry_level == level)
- {
+ else if (connectedArc->symmetry_level == level) {
add_v3_v3(axis, connectedArc->head->p);
sub_v3_v3v3(axis, axis, connectedArc->tail->p);
}
@@ -917,22 +814,18 @@ static void markdownSecondarySymmetry(BGraph *graph, BNode *node, int depth, int
normalize_v3(axis);
/* Split between axial and radial symmetry */
- if (count == 2)
- {
+ if (count == 2) {
handleAxialSymmetry(graph, node, depth, axis, limit);
}
- else
- {
+ else {
handleRadialSymmetry(graph, node, depth, axis, limit);
}
/* markdown secondary symetries */
- for (i = 0; i < node->degree; i++)
- {
+ for (i = 0; i < node->degree; i++) {
BArc *connectedArc = node->arcs[i];
- if (connectedArc->symmetry_level == -depth)
- {
+ if (connectedArc->symmetry_level == -depth) {
/* markdown symmetry for branches corresponding to the depth */
markdownSymmetryArc(graph, connectedArc, node, level + 1, limit);
}
@@ -944,19 +837,16 @@ static void markdownSymmetryArc(BGraph *graph, BArc *arc, BNode *node, int level
int i;
/* if arc is null, we start straight from a node */
- if (arc)
- {
+ if (arc) {
arc->symmetry_level = level;
node = BLI_otherNode(arc, node);
}
- for (i = 0; i < node->degree; i++)
- {
+ for (i = 0; i < node->degree; i++) {
BArc *connectedArc = node->arcs[i];
- if (connectedArc != arc)
- {
+ if (connectedArc != arc) {
BNode *connectedNode = BLI_otherNode(connectedArc, node);
/* symmetry level is positive value, negative values is subtree depth */
@@ -966,26 +856,22 @@ static void markdownSymmetryArc(BGraph *graph, BArc *arc, BNode *node, int level
arc = NULL;
- for (i = 0; i < node->degree; i++)
- {
+ for (i = 0; i < node->degree; i++) {
int issymmetryAxis = 0;
BArc *connectedArc = node->arcs[i];
/* only arcs not already marked as symetric */
- if (connectedArc->symmetry_level < 0)
- {
+ if (connectedArc->symmetry_level < 0) {
int j;
/* true by default */
issymmetryAxis = 1;
- for (j = 0; j < node->degree; j++)
- {
+ for (j = 0; j < node->degree; j++) {
BArc *otherArc = node->arcs[j];
/* different arc, same depth */
- if (otherArc != connectedArc && otherArc->symmetry_level == connectedArc->symmetry_level)
- {
+ if (otherArc != connectedArc && otherArc->symmetry_level == connectedArc->symmetry_level) {
/* not on the symmetry axis */
issymmetryAxis = 0;
break;
@@ -994,15 +880,12 @@ static void markdownSymmetryArc(BGraph *graph, BArc *arc, BNode *node, int level
}
/* arc could be on the symmetry axis */
- if (issymmetryAxis == 1)
- {
+ if (issymmetryAxis == 1) {
/* no arc as been marked previously, keep this one */
- if (arc == NULL)
- {
+ if (arc == NULL) {
arc = connectedArc;
}
- else if (connectedArc->symmetry_level < arc->symmetry_level)
- {
+ else if (connectedArc->symmetry_level < arc->symmetry_level) {
/* go with more complex subtree as symmetry arc */
arc = connectedArc;
}
@@ -1010,20 +893,17 @@ static void markdownSymmetryArc(BGraph *graph, BArc *arc, BNode *node, int level
}
/* go down the arc continuing the symmetry axis */
- if (arc)
- {
+ if (arc) {
markdownSymmetryArc(graph, arc, node, level, limit);
}
/* secondary symmetry */
- for (i = 0; i < node->degree; i++)
- {
+ for (i = 0; i < node->degree; i++) {
BArc *connectedArc = node->arcs[i];
/* only arcs not already marked as symetric and is not the next arc on the symmetry axis */
- if (connectedArc->symmetry_level < 0)
- {
+ if (connectedArc->symmetry_level < 0) {
/* subtree depth is store as a negative value in the symmetry */
markdownSecondarySymmetry(graph, node, -connectedArc->symmetry_level, level, limit);
}
@@ -1035,13 +915,11 @@ void BLI_markdownSymmetry(BGraph *graph, BNode *root_node, float limit)
BNode *node;
BArc *arc;
- if (root_node == NULL)
- {
+ if (root_node == NULL) {
return;
}
- if (BLI_isGraphCyclic(graph))
- {
+ if (BLI_isGraphCyclic(graph)) {
return;
}
@@ -1054,37 +932,29 @@ void BLI_markdownSymmetry(BGraph *graph, BNode *root_node, float limit)
node = root_node;
/* sanity check REMOVE ME */
- if (node->degree > 0)
- {
+ if (node->degree > 0) {
arc = node->arcs[0];
- if (node->degree == 1)
- {
+ if (node->degree == 1) {
markdownSymmetryArc(graph, arc, node, 1, limit);
}
- else
- {
+ else {
markdownSymmetryArc(graph, NULL, node, 1, limit);
}
/* mark down non-symetric arcs */
- for (arc = graph->arcs.first; arc; arc = arc->next)
- {
- if (arc->symmetry_level < 0)
- {
+ for (arc = graph->arcs.first; arc; arc = arc->next) {
+ if (arc->symmetry_level < 0) {
arc->symmetry_level = 0;
}
- else
- {
+ else {
/* mark down nodes with the lowest level symmetry axis */
- if (arc->head->symmetry_level == 0 || arc->head->symmetry_level > arc->symmetry_level)
- {
+ if (arc->head->symmetry_level == 0 || arc->head->symmetry_level > arc->symmetry_level) {
arc->head->symmetry_level = arc->symmetry_level;
}
- if (arc->tail->symmetry_level == 0 || arc->tail->symmetry_level > arc->symmetry_level)
- {
+ if (arc->tail->symmetry_level == 0 || arc->tail->symmetry_level > arc->symmetry_level) {
arc->tail->symmetry_level = arc->symmetry_level;
}
}
@@ -1108,16 +978,13 @@ void* IT_peek(void* arg, int n)
{
BArcIterator *iter = (BArcIterator*)arg;
- if (iter->index + n < 0)
- {
+ if (iter->index + n < 0) {
return iter->head(iter);
}
- else if (iter->index + n >= iter->length)
- {
+ else if (iter->index + n >= iter->length) {
return iter->tail(iter);
}
- else
- {
+ else {
return iter->peek(iter, n);
}
}
diff --git a/source/blender/blenlib/intern/jitter.c b/source/blender/blenlib/intern/jitter.c
index fbdf698cc87..afe31fb1377 100644
--- a/source/blender/blenlib/intern/jitter.c
+++ b/source/blender/blenlib/intern/jitter.c
@@ -1,7 +1,4 @@
/*
- * Jitter offset table
- *
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -30,9 +27,9 @@
/** \file blender/blenlib/intern/jitter.c
* \ingroup bli
+ * \brief Jitter offset table
*/
-
#include <math.h>
#include <string.h>
#include "MEM_guardedalloc.h"
@@ -43,7 +40,7 @@
void BLI_jitterate1(float *jit1, float *jit2, int num, float rad1)
{
- int i , j , k;
+ int i, j, k;
float vecx, vecy, dvecx, dvecy, x, y, len;
for (i = 2*num-2; i>=0 ; i-=2) {
@@ -96,7 +93,7 @@ void BLI_jitterate1(float *jit1, float *jit2, int num, float rad1)
jit2[i] = x;
jit2[i+1] = y;
}
- memcpy(jit1,jit2,2 * num * sizeof(float));
+ memcpy(jit1, jit2, 2 * num * sizeof(float));
}
void BLI_jitterate2(float *jit1, float *jit2, int num, float rad2)
@@ -135,11 +132,11 @@ void BLI_jitterate2(float *jit1, float *jit2, int num, float rad2)
jit2[i] = x;
jit2[i+1] = y;
}
- memcpy(jit1,jit2,2 * num * sizeof(float));
+ memcpy(jit1, jit2, 2 * num * sizeof(float));
}
-void BLI_initjit(float *jitarr, int num)
+void BLI_jitter_init(float *jitarr, int num)
{
float *jit2, x, rad1, rad2, rad3;
int i;
diff --git a/source/blender/blenlib/intern/lasso.c b/source/blender/blenlib/intern/lasso.c
new file mode 100644
index 00000000000..29b967fcd37
--- /dev/null
+++ b/source/blender/blenlib/intern/lasso.c
@@ -0,0 +1,129 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ *
+ */
+
+/** \file blender/blenlib/intern/lasso.c
+ * \ingroup bli
+ */
+
+#include "DNA_vec_types.h"
+
+#include "BLI_math.h"
+#include "BLI_rect.h"
+
+#include "BLI_lasso.h" /* own include */
+
+void BLI_lasso_boundbox(rcti *rect, int mcords[][2], short moves)
+{
+ short a;
+
+ rect->xmin = rect->xmax = mcords[0][0];
+ rect->ymin = rect->ymax = mcords[0][1];
+
+ for (a = 1; a < moves; a++) {
+ if (mcords[a][0] < rect->xmin) rect->xmin = mcords[a][0];
+ else if (mcords[a][0] > rect->xmax) rect->xmax = mcords[a][0];
+ if (mcords[a][1] < rect->ymin) rect->ymin = mcords[a][1];
+ else if (mcords[a][1] > rect->ymax) rect->ymax = mcords[a][1];
+ }
+}
+
+
+int BLI_lasso_is_point_inside(int mcords[][2], short moves,
+ const int sx, const int sy,
+ const int error_value)
+{
+ /* we do the angle rule, define that all added angles should be about zero or (2 * PI) */
+ float angletot = 0.0, dot, ang, cross, fp1[2], fp2[2];
+ int a;
+ int *p1, *p2;
+
+ if (sx == error_value) {
+ return 0;
+ }
+
+ p1 = mcords[moves - 1];
+ p2 = mcords[0];
+
+ /* first vector */
+ fp1[0] = (float)(p1[0] - sx);
+ fp1[1] = (float)(p1[1] - sy);
+ normalize_v2(fp1);
+
+ for (a = 0; a < moves; a++) {
+ /* second vector */
+ fp2[0] = (float)(p2[0] - sx);
+ fp2[1] = (float)(p2[1] - sy);
+ normalize_v2(fp2);
+
+ /* dot and angle and cross */
+ dot = fp1[0] * fp2[0] + fp1[1] * fp2[1];
+ ang = fabs(saacos(dot));
+
+ cross = (float)((p1[1] - p2[1]) * (p1[0] - sx) + (p2[0] - p1[0]) * (p1[1] - sy));
+
+ if (cross < 0.0f) angletot -= ang;
+ else angletot += ang;
+
+ /* circulate */
+ fp1[0] = fp2[0]; fp1[1] = fp2[1];
+ p1 = p2;
+ p2 = mcords[a + 1];
+ }
+
+ if (fabs(angletot) > 4.0) return 1;
+ return 0;
+}
+
+/* edge version for lasso select. we assume boundbox check was done */
+int BLI_lasso_is_edge_inside(int mcords[][2], short moves,
+ int x0, int y0, int x1, int y1,
+ const int error_value)
+{
+ int v1[2], v2[2];
+ int a;
+
+ if (x0 == error_value || x1 == error_value) {
+ return 0;
+ }
+
+ v1[0] = x0, v1[1] = y0;
+ v2[0] = x1, v2[1] = y1;
+
+ /* check points in lasso */
+ if (BLI_lasso_is_point_inside(mcords, moves, v1[0], v1[1], error_value)) return 1;
+ if (BLI_lasso_is_point_inside(mcords, moves, v2[0], v2[1], error_value)) return 1;
+
+ /* no points in lasso, so we have to intersect with lasso edge */
+
+ if (isect_line_line_v2_int(mcords[0], mcords[moves - 1], v1, v2) > 0) return 1;
+ for (a = 0; a < moves - 1; a++) {
+ if (isect_line_line_v2_int(mcords[a], mcords[a + 1], v1, v2) > 0) return 1;
+ }
+
+ return 0;
+}
diff --git a/source/blender/blenlib/intern/listbase.c b/source/blender/blenlib/intern/listbase.c
index fecaa507b5c..19cae7456c9 100644
--- a/source/blender/blenlib/intern/listbase.c
+++ b/source/blender/blenlib/intern/listbase.c
@@ -1,9 +1,4 @@
-/* util.c
- *
- * various string, file, list operations.
- *
- *
- *
+/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -131,7 +126,7 @@ void BLI_freelinkN(ListBase *listbase, void *vlink)
if (link == NULL) return;
if (listbase == NULL) return;
- BLI_remlink(listbase,link);
+ BLI_remlink(listbase, link);
MEM_freeN(link);
}
@@ -189,8 +184,7 @@ void BLI_sortlist(ListBase *listbase, int (*cmp)(void *, void *))
BLI_remlink(listbase, current);
- while (previous && cmp(previous, current) == 1)
- {
+ while (previous && cmp(previous, current) == 1) {
previous = previous->prev;
}
diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c
index 76b986d7346..b3b58dca1a6 100644
--- a/source/blender/blenlib/intern/math_matrix.c
+++ b/source/blender/blenlib/intern/math_matrix.c
@@ -866,6 +866,35 @@ int is_orthonormal_m4(float m[][4])
return 0;
}
+int is_uniform_scaled_m3(float m[][3])
+{
+ const float eps = 1e-7;
+ float t[3][3];
+ float l1, l2, l3, l4, l5, l6;
+
+ copy_m3_m3(t, m);
+ transpose_m3(t);
+
+ l1 = len_squared_v3(m[0]);
+ l2 = len_squared_v3(m[1]);
+ l3 = len_squared_v3(m[2]);
+
+ l4 = len_squared_v3(t[0]);
+ l5 = len_squared_v3(t[1]);
+ l6 = len_squared_v3(t[2]);
+
+ if (fabsf(l2 - l1) <= eps &&
+ fabsf(l3 - l1) <= eps &&
+ fabsf(l4 - l1) <= eps &&
+ fabsf(l5 - l1) <= eps &&
+ fabsf(l6 - l1) <= eps)
+ {
+ return 1;
+ }
+
+ return 0;
+}
+
void normalize_m3(float mat[][3])
{
normalize_v3(mat[0]);
@@ -1674,8 +1703,8 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4])
// Calculate the shift.
float scale = maxf(maxf(maxf(maxf(
- fabsf(s[p - 1]),fabsf(s[p - 2])),fabsf(e[p - 2])),
- fabsf(s[k])),fabsf(e[k]));
+ fabsf(s[p - 1]), fabsf(s[p - 2])), fabsf(e[p - 2])),
+ fabsf(s[k])), fabsf(e[k]));
float invscale = 1.0f / scale;
float sp = s[p - 1] * invscale;
float spm1 = s[p - 2] * invscale;
diff --git a/source/blender/blenlib/intern/math_rotation.c b/source/blender/blenlib/intern/math_rotation.c
index ec5fd39cd87..37402f9391c 100644
--- a/source/blender/blenlib/intern/math_rotation.c
+++ b/source/blender/blenlib/intern/math_rotation.c
@@ -78,7 +78,23 @@ void mul_qt_qtqt(float q[4], const float q1[4], const float q2[4])
q[2] = t2;
}
-/* Assumes a unit quaternion */
+/**
+ * \note:
+ * Assumes a unit quaternion?
+ *
+ * infact not, but you may wan't to use a unit quat, read on...
+ *
+ * Shortcut for 'q v q*' when \a v is actually a quaternion.
+ * This removes the need for converting a vector to a quaternion,
+ * calculating q's conjugate and converting back to a vector.
+ * It also happens to be faster (17+,24* vs * 24+,32*).
+ * If \a q is not a unit quaternion, then \a v will be both rotated by
+ * the same amount as if q was a unit quaternion, and scaled by the square of
+ * the length of q.
+ *
+ * For people used to python mathutils, its like:
+ * def mul_qt_v3(q, v): (q * Quaternion((0.0, v[0], v[1], v[2])) * q.conjugated())[1:]
+ */
void mul_qt_v3(const float q[4], float v[3])
{
float t0, t1, t2;
@@ -1615,7 +1631,7 @@ void normalize_dq(DualQuat *dq, float totweight)
}
}
-void mul_v3m3_dq(float *co, float mat[][3], DualQuat *dq)
+void mul_v3m3_dq(float co[3], float mat[][3], DualQuat *dq)
{
float M[3][3], t[3], scalemat[3][3], len2;
float w = dq->quat[0], x = dq->quat[1], y = dq->quat[2], z = dq->quat[3];
diff --git a/source/blender/blenlib/intern/math_vector.c b/source/blender/blenlib/intern/math_vector.c
index f734e01943f..90e6a4cb945 100644
--- a/source/blender/blenlib/intern/math_vector.c
+++ b/source/blender/blenlib/intern/math_vector.c
@@ -217,6 +217,25 @@ float angle_normalized_v2v2(const float v1[2], const float v2[2])
return 2.0f * (float)saasin(len_v2v2(v2, v1) / 2.0f);
}
+/**
+ * angle between 2 vectors defined by 3 coords, about an axis. */
+float angle_on_axis_v3v3v3_v3(const float v1[3], const float v2[3], const float v3[3], const float axis[3])
+{
+ float v1_proj[3], v2_proj[3], tproj[3];
+
+ sub_v3_v3v3(v1_proj, v1, v2);
+ sub_v3_v3v3(v2_proj, v3, v2);
+
+ /* project the vectors onto the axis */
+ project_v3_v3v3(tproj, v1_proj, axis);
+ sub_v3_v3(v1_proj, tproj);
+
+ project_v3_v3v3(tproj, v2_proj, axis);
+ sub_v3_v3(v2_proj, tproj);
+
+ return angle_v3v3(v1_proj, v2_proj);
+}
+
void angle_tri_v3(float angles[3], const float v1[3], const float v2[3], const float v3[3])
{
float ed1[3], ed2[3], ed3[3];
diff --git a/source/blender/blenlib/intern/noise.c b/source/blender/blenlib/intern/noise.c
index 5db42c35f5c..d795f9bf332 100644
--- a/source/blender/blenlib/intern/noise.c
+++ b/source/blender/blenlib/intern/noise.c
@@ -1,6 +1,4 @@
/*
- *
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -47,158 +45,225 @@ static float noise3_perlin(float vec[3]);
//static float turbulence_perlin(float *point, float lofreq, float hifreq);
//static float turbulencep(float noisesize, float x, float y, float z, int nr);
-#define HASHVEC(x,y,z) hashvectf+3*hash[ (hash[ (hash[(z) & 255]+(y)) & 255]+(x)) & 255]
+#define HASHVEC(x, y, z) hashvectf + 3 * hash[ (hash[ (hash[(z) & 255] + (y)) & 255] + (x)) & 255]
/* needed for voronoi */
-#define HASHPNT(x,y,z) hashpntf+3*hash[ (hash[ (hash[(z) & 255]+(y)) & 255]+(x)) & 255]
-static float hashpntf[768] = {0.536902, 0.020915, 0.501445, 0.216316, 0.517036, 0.822466, 0.965315,
-0.377313, 0.678764, 0.744545, 0.097731, 0.396357, 0.247202, 0.520897,
-0.613396, 0.542124, 0.146813, 0.255489, 0.810868, 0.638641, 0.980742,
-0.292316, 0.357948, 0.114382, 0.861377, 0.629634, 0.722530, 0.714103,
-0.048549, 0.075668, 0.564920, 0.162026, 0.054466, 0.411738, 0.156897,
-0.887657, 0.599368, 0.074249, 0.170277, 0.225799, 0.393154, 0.301348,
-0.057434, 0.293849, 0.442745, 0.150002, 0.398732, 0.184582, 0.915200,
-0.630984, 0.974040, 0.117228, 0.795520, 0.763238, 0.158982, 0.616211,
-0.250825, 0.906539, 0.316874, 0.676205, 0.234720, 0.667673, 0.792225,
-0.273671, 0.119363, 0.199131, 0.856716, 0.828554, 0.900718, 0.705960,
-0.635923, 0.989433, 0.027261, 0.283507, 0.113426, 0.388115, 0.900176,
-0.637741, 0.438802, 0.715490, 0.043692, 0.202640, 0.378325, 0.450325,
-0.471832, 0.147803, 0.906899, 0.524178, 0.784981, 0.051483, 0.893369,
-0.596895, 0.275635, 0.391483, 0.844673, 0.103061, 0.257322, 0.708390,
-0.504091, 0.199517, 0.660339, 0.376071, 0.038880, 0.531293, 0.216116,
-0.138672, 0.907737, 0.807994, 0.659582, 0.915264, 0.449075, 0.627128,
-0.480173, 0.380942, 0.018843, 0.211808, 0.569701, 0.082294, 0.689488,
-0.573060, 0.593859, 0.216080, 0.373159, 0.108117, 0.595539, 0.021768,
-0.380297, 0.948125, 0.377833, 0.319699, 0.315249, 0.972805, 0.792270,
-0.445396, 0.845323, 0.372186, 0.096147, 0.689405, 0.423958, 0.055675,
-0.117940, 0.328456, 0.605808, 0.631768, 0.372170, 0.213723, 0.032700,
-0.447257, 0.440661, 0.728488, 0.299853, 0.148599, 0.649212, 0.498381,
-0.049921, 0.496112, 0.607142, 0.562595, 0.990246, 0.739659, 0.108633,
-0.978156, 0.209814, 0.258436, 0.876021, 0.309260, 0.600673, 0.713597,
-0.576967, 0.641402, 0.853930, 0.029173, 0.418111, 0.581593, 0.008394,
-0.589904, 0.661574, 0.979326, 0.275724, 0.111109, 0.440472, 0.120839,
-0.521602, 0.648308, 0.284575, 0.204501, 0.153286, 0.822444, 0.300786,
-0.303906, 0.364717, 0.209038, 0.916831, 0.900245, 0.600685, 0.890002,
-0.581660, 0.431154, 0.705569, 0.551250, 0.417075, 0.403749, 0.696652,
-0.292652, 0.911372, 0.690922, 0.323718, 0.036773, 0.258976, 0.274265,
-0.225076, 0.628965, 0.351644, 0.065158, 0.080340, 0.467271, 0.130643,
-0.385914, 0.919315, 0.253821, 0.966163, 0.017439, 0.392610, 0.478792,
-0.978185, 0.072691, 0.982009, 0.097987, 0.731533, 0.401233, 0.107570,
-0.349587, 0.479122, 0.700598, 0.481751, 0.788429, 0.706864, 0.120086,
-0.562691, 0.981797, 0.001223, 0.192120, 0.451543, 0.173092, 0.108960,
-0.549594, 0.587892, 0.657534, 0.396365, 0.125153, 0.666420, 0.385823,
-0.890916, 0.436729, 0.128114, 0.369598, 0.759096, 0.044677, 0.904752,
-0.088052, 0.621148, 0.005047, 0.452331, 0.162032, 0.494238, 0.523349,
-0.741829, 0.698450, 0.452316, 0.563487, 0.819776, 0.492160, 0.004210,
-0.647158, 0.551475, 0.362995, 0.177937, 0.814722, 0.727729, 0.867126,
-0.997157, 0.108149, 0.085726, 0.796024, 0.665075, 0.362462, 0.323124,
-0.043718, 0.042357, 0.315030, 0.328954, 0.870845, 0.683186, 0.467922,
-0.514894, 0.809971, 0.631979, 0.176571, 0.366320, 0.850621, 0.505555,
-0.749551, 0.750830, 0.401714, 0.481216, 0.438393, 0.508832, 0.867971,
-0.654581, 0.058204, 0.566454, 0.084124, 0.548539, 0.902690, 0.779571,
-0.562058, 0.048082, 0.863109, 0.079290, 0.713559, 0.783496, 0.265266,
-0.672089, 0.786939, 0.143048, 0.086196, 0.876129, 0.408708, 0.229312,
-0.629995, 0.206665, 0.207308, 0.710079, 0.341704, 0.264921, 0.028748,
-0.629222, 0.470173, 0.726228, 0.125243, 0.328249, 0.794187, 0.741340,
-0.489895, 0.189396, 0.724654, 0.092841, 0.039809, 0.860126, 0.247701,
-0.655331, 0.964121, 0.672536, 0.044522, 0.690567, 0.837238, 0.631520,
-0.953734, 0.352484, 0.289026, 0.034152, 0.852575, 0.098454, 0.795529,
-0.452181, 0.826159, 0.186993, 0.820725, 0.440328, 0.922137, 0.704592,
-0.915437, 0.738183, 0.733461, 0.193798, 0.929213, 0.161390, 0.318547,
-0.888751, 0.430968, 0.740837, 0.193544, 0.872253, 0.563074, 0.274598,
-0.347805, 0.666176, 0.449831, 0.800991, 0.588727, 0.052296, 0.714761,
-0.420620, 0.570325, 0.057550, 0.210888, 0.407312, 0.662848, 0.924382,
-0.895958, 0.775198, 0.688605, 0.025721, 0.301913, 0.791408, 0.500602,
-0.831984, 0.828509, 0.642093, 0.494174, 0.525880, 0.446365, 0.440063,
-0.763114, 0.630358, 0.223943, 0.333806, 0.906033, 0.498306, 0.241278,
-0.427640, 0.772683, 0.198082, 0.225379, 0.503894, 0.436599, 0.016503,
-0.803725, 0.189878, 0.291095, 0.499114, 0.151573, 0.079031, 0.904618,
-0.708535, 0.273900, 0.067419, 0.317124, 0.936499, 0.716511, 0.543845,
-0.939909, 0.826574, 0.715090, 0.154864, 0.750150, 0.845808, 0.648108,
-0.556564, 0.644757, 0.140873, 0.799167, 0.632989, 0.444245, 0.471978,
-0.435910, 0.359793, 0.216241, 0.007633, 0.337236, 0.857863, 0.380247,
-0.092517, 0.799973, 0.919000, 0.296798, 0.096989, 0.854831, 0.165369,
-0.568475, 0.216855, 0.020457, 0.835511, 0.538039, 0.999742, 0.620226,
-0.244053, 0.060399, 0.323007, 0.294874, 0.988899, 0.384919, 0.735655,
-0.773428, 0.549776, 0.292882, 0.660611, 0.593507, 0.621118, 0.175269,
-0.682119, 0.794493, 0.868197, 0.632150, 0.807823, 0.509656, 0.482035,
-0.001780, 0.259126, 0.358002, 0.280263, 0.192985, 0.290367, 0.208111,
-0.917633, 0.114422, 0.925491, 0.981110, 0.255570, 0.974862, 0.016629,
-0.552599, 0.575741, 0.612978, 0.615965, 0.803615, 0.772334, 0.089745,
-0.838812, 0.634542, 0.113709, 0.755832, 0.577589, 0.667489, 0.529834,
-0.325660, 0.817597, 0.316557, 0.335093, 0.737363, 0.260951, 0.737073,
-0.049540, 0.735541, 0.988891, 0.299116, 0.147695, 0.417271, 0.940811,
-0.524160, 0.857968, 0.176403, 0.244835, 0.485759, 0.033353, 0.280319,
-0.750688, 0.755809, 0.924208, 0.095956, 0.962504, 0.275584, 0.173715,
-0.942716, 0.706721, 0.078464, 0.576716, 0.804667, 0.559249, 0.900611,
-0.646904, 0.432111, 0.927885, 0.383277, 0.269973, 0.114244, 0.574867,
-0.150703, 0.241855, 0.272871, 0.199950, 0.079719, 0.868566, 0.962833,
-0.789122, 0.320025, 0.905554, 0.234876, 0.991356, 0.061913, 0.732911,
-0.785960, 0.874074, 0.069035, 0.658632, 0.309901, 0.023676, 0.791603,
-0.764661, 0.661278, 0.319583, 0.829650, 0.117091, 0.903124, 0.982098,
-0.161631, 0.193576, 0.670428, 0.857390, 0.003760, 0.572578, 0.222162,
-0.114551, 0.420118, 0.530404, 0.470682, 0.525527, 0.764281, 0.040596,
-0.443275, 0.501124, 0.816161, 0.417467, 0.332172, 0.447565, 0.614591,
-0.559246, 0.805295, 0.226342, 0.155065, 0.714630, 0.160925, 0.760001,
-0.453456, 0.093869, 0.406092, 0.264801, 0.720370, 0.743388, 0.373269,
-0.403098, 0.911923, 0.897249, 0.147038, 0.753037, 0.516093, 0.739257,
-0.175018, 0.045768, 0.735857, 0.801330, 0.927708, 0.240977, 0.591870,
-0.921831, 0.540733, 0.149100, 0.423152, 0.806876, 0.397081, 0.061100,
-0.811630, 0.044899, 0.460915, 0.961202, 0.822098, 0.971524, 0.867608,
-0.773604, 0.226616, 0.686286, 0.926972, 0.411613, 0.267873, 0.081937,
-0.226124, 0.295664, 0.374594, 0.533240, 0.237876, 0.669629, 0.599083,
-0.513081, 0.878719, 0.201577, 0.721296, 0.495038, 0.079760, 0.965959,
-0.233090, 0.052496, 0.714748, 0.887844, 0.308724, 0.972885, 0.723337,
-0.453089, 0.914474, 0.704063, 0.823198, 0.834769, 0.906561, 0.919600,
-0.100601, 0.307564, 0.901977, 0.468879, 0.265376, 0.885188, 0.683875,
-0.868623, 0.081032, 0.466835, 0.199087, 0.663437, 0.812241, 0.311337,
-0.821361, 0.356628, 0.898054, 0.160781, 0.222539, 0.714889, 0.490287,
-0.984915, 0.951755, 0.964097, 0.641795, 0.815472, 0.852732, 0.862074,
-0.051108, 0.440139, 0.323207, 0.517171, 0.562984, 0.115295, 0.743103,
-0.977914, 0.337596, 0.440694, 0.535879, 0.959427, 0.351427, 0.704361,
-0.010826, 0.131162, 0.577080, 0.349572, 0.774892, 0.425796, 0.072697,
-0.500001, 0.267322, 0.909654, 0.206176, 0.223987, 0.937698, 0.323423,
-0.117501, 0.490308, 0.474372, 0.689943, 0.168671, 0.719417, 0.188928,
-0.330464, 0.265273, 0.446271, 0.171933, 0.176133, 0.474616, 0.140182,
-0.114246, 0.905043, 0.713870, 0.555261, 0.951333};
+#define HASHPNT(x, y, z) hashpntf + 3 * hash[ (hash[ (hash[(z) & 255] + (y)) & 255] + (x)) & 255]
+static float hashpntf[768] = {
+ 0.536902, 0.020915, 0.501445, 0.216316, 0.517036, 0.822466, 0.965315,
+ 0.377313, 0.678764, 0.744545, 0.097731, 0.396357, 0.247202, 0.520897,
+ 0.613396, 0.542124, 0.146813, 0.255489, 0.810868, 0.638641, 0.980742,
+ 0.292316, 0.357948, 0.114382, 0.861377, 0.629634, 0.722530, 0.714103,
+ 0.048549, 0.075668, 0.564920, 0.162026, 0.054466, 0.411738, 0.156897,
+ 0.887657, 0.599368, 0.074249, 0.170277, 0.225799, 0.393154, 0.301348,
+ 0.057434, 0.293849, 0.442745, 0.150002, 0.398732, 0.184582, 0.915200,
+ 0.630984, 0.974040, 0.117228, 0.795520, 0.763238, 0.158982, 0.616211,
+ 0.250825, 0.906539, 0.316874, 0.676205, 0.234720, 0.667673, 0.792225,
+ 0.273671, 0.119363, 0.199131, 0.856716, 0.828554, 0.900718, 0.705960,
+ 0.635923, 0.989433, 0.027261, 0.283507, 0.113426, 0.388115, 0.900176,
+ 0.637741, 0.438802, 0.715490, 0.043692, 0.202640, 0.378325, 0.450325,
+ 0.471832, 0.147803, 0.906899, 0.524178, 0.784981, 0.051483, 0.893369,
+ 0.596895, 0.275635, 0.391483, 0.844673, 0.103061, 0.257322, 0.708390,
+ 0.504091, 0.199517, 0.660339, 0.376071, 0.038880, 0.531293, 0.216116,
+ 0.138672, 0.907737, 0.807994, 0.659582, 0.915264, 0.449075, 0.627128,
+ 0.480173, 0.380942, 0.018843, 0.211808, 0.569701, 0.082294, 0.689488,
+ 0.573060, 0.593859, 0.216080, 0.373159, 0.108117, 0.595539, 0.021768,
+ 0.380297, 0.948125, 0.377833, 0.319699, 0.315249, 0.972805, 0.792270,
+ 0.445396, 0.845323, 0.372186, 0.096147, 0.689405, 0.423958, 0.055675,
+ 0.117940, 0.328456, 0.605808, 0.631768, 0.372170, 0.213723, 0.032700,
+ 0.447257, 0.440661, 0.728488, 0.299853, 0.148599, 0.649212, 0.498381,
+ 0.049921, 0.496112, 0.607142, 0.562595, 0.990246, 0.739659, 0.108633,
+ 0.978156, 0.209814, 0.258436, 0.876021, 0.309260, 0.600673, 0.713597,
+ 0.576967, 0.641402, 0.853930, 0.029173, 0.418111, 0.581593, 0.008394,
+ 0.589904, 0.661574, 0.979326, 0.275724, 0.111109, 0.440472, 0.120839,
+ 0.521602, 0.648308, 0.284575, 0.204501, 0.153286, 0.822444, 0.300786,
+ 0.303906, 0.364717, 0.209038, 0.916831, 0.900245, 0.600685, 0.890002,
+ 0.581660, 0.431154, 0.705569, 0.551250, 0.417075, 0.403749, 0.696652,
+ 0.292652, 0.911372, 0.690922, 0.323718, 0.036773, 0.258976, 0.274265,
+ 0.225076, 0.628965, 0.351644, 0.065158, 0.080340, 0.467271, 0.130643,
+ 0.385914, 0.919315, 0.253821, 0.966163, 0.017439, 0.392610, 0.478792,
+ 0.978185, 0.072691, 0.982009, 0.097987, 0.731533, 0.401233, 0.107570,
+ 0.349587, 0.479122, 0.700598, 0.481751, 0.788429, 0.706864, 0.120086,
+ 0.562691, 0.981797, 0.001223, 0.192120, 0.451543, 0.173092, 0.108960,
+ 0.549594, 0.587892, 0.657534, 0.396365, 0.125153, 0.666420, 0.385823,
+ 0.890916, 0.436729, 0.128114, 0.369598, 0.759096, 0.044677, 0.904752,
+ 0.088052, 0.621148, 0.005047, 0.452331, 0.162032, 0.494238, 0.523349,
+ 0.741829, 0.698450, 0.452316, 0.563487, 0.819776, 0.492160, 0.004210,
+ 0.647158, 0.551475, 0.362995, 0.177937, 0.814722, 0.727729, 0.867126,
+ 0.997157, 0.108149, 0.085726, 0.796024, 0.665075, 0.362462, 0.323124,
+ 0.043718, 0.042357, 0.315030, 0.328954, 0.870845, 0.683186, 0.467922,
+ 0.514894, 0.809971, 0.631979, 0.176571, 0.366320, 0.850621, 0.505555,
+ 0.749551, 0.750830, 0.401714, 0.481216, 0.438393, 0.508832, 0.867971,
+ 0.654581, 0.058204, 0.566454, 0.084124, 0.548539, 0.902690, 0.779571,
+ 0.562058, 0.048082, 0.863109, 0.079290, 0.713559, 0.783496, 0.265266,
+ 0.672089, 0.786939, 0.143048, 0.086196, 0.876129, 0.408708, 0.229312,
+ 0.629995, 0.206665, 0.207308, 0.710079, 0.341704, 0.264921, 0.028748,
+ 0.629222, 0.470173, 0.726228, 0.125243, 0.328249, 0.794187, 0.741340,
+ 0.489895, 0.189396, 0.724654, 0.092841, 0.039809, 0.860126, 0.247701,
+ 0.655331, 0.964121, 0.672536, 0.044522, 0.690567, 0.837238, 0.631520,
+ 0.953734, 0.352484, 0.289026, 0.034152, 0.852575, 0.098454, 0.795529,
+ 0.452181, 0.826159, 0.186993, 0.820725, 0.440328, 0.922137, 0.704592,
+ 0.915437, 0.738183, 0.733461, 0.193798, 0.929213, 0.161390, 0.318547,
+ 0.888751, 0.430968, 0.740837, 0.193544, 0.872253, 0.563074, 0.274598,
+ 0.347805, 0.666176, 0.449831, 0.800991, 0.588727, 0.052296, 0.714761,
+ 0.420620, 0.570325, 0.057550, 0.210888, 0.407312, 0.662848, 0.924382,
+ 0.895958, 0.775198, 0.688605, 0.025721, 0.301913, 0.791408, 0.500602,
+ 0.831984, 0.828509, 0.642093, 0.494174, 0.525880, 0.446365, 0.440063,
+ 0.763114, 0.630358, 0.223943, 0.333806, 0.906033, 0.498306, 0.241278,
+ 0.427640, 0.772683, 0.198082, 0.225379, 0.503894, 0.436599, 0.016503,
+ 0.803725, 0.189878, 0.291095, 0.499114, 0.151573, 0.079031, 0.904618,
+ 0.708535, 0.273900, 0.067419, 0.317124, 0.936499, 0.716511, 0.543845,
+ 0.939909, 0.826574, 0.715090, 0.154864, 0.750150, 0.845808, 0.648108,
+ 0.556564, 0.644757, 0.140873, 0.799167, 0.632989, 0.444245, 0.471978,
+ 0.435910, 0.359793, 0.216241, 0.007633, 0.337236, 0.857863, 0.380247,
+ 0.092517, 0.799973, 0.919000, 0.296798, 0.096989, 0.854831, 0.165369,
+ 0.568475, 0.216855, 0.020457, 0.835511, 0.538039, 0.999742, 0.620226,
+ 0.244053, 0.060399, 0.323007, 0.294874, 0.988899, 0.384919, 0.735655,
+ 0.773428, 0.549776, 0.292882, 0.660611, 0.593507, 0.621118, 0.175269,
+ 0.682119, 0.794493, 0.868197, 0.632150, 0.807823, 0.509656, 0.482035,
+ 0.001780, 0.259126, 0.358002, 0.280263, 0.192985, 0.290367, 0.208111,
+ 0.917633, 0.114422, 0.925491, 0.981110, 0.255570, 0.974862, 0.016629,
+ 0.552599, 0.575741, 0.612978, 0.615965, 0.803615, 0.772334, 0.089745,
+ 0.838812, 0.634542, 0.113709, 0.755832, 0.577589, 0.667489, 0.529834,
+ 0.325660, 0.817597, 0.316557, 0.335093, 0.737363, 0.260951, 0.737073,
+ 0.049540, 0.735541, 0.988891, 0.299116, 0.147695, 0.417271, 0.940811,
+ 0.524160, 0.857968, 0.176403, 0.244835, 0.485759, 0.033353, 0.280319,
+ 0.750688, 0.755809, 0.924208, 0.095956, 0.962504, 0.275584, 0.173715,
+ 0.942716, 0.706721, 0.078464, 0.576716, 0.804667, 0.559249, 0.900611,
+ 0.646904, 0.432111, 0.927885, 0.383277, 0.269973, 0.114244, 0.574867,
+ 0.150703, 0.241855, 0.272871, 0.199950, 0.079719, 0.868566, 0.962833,
+ 0.789122, 0.320025, 0.905554, 0.234876, 0.991356, 0.061913, 0.732911,
+ 0.785960, 0.874074, 0.069035, 0.658632, 0.309901, 0.023676, 0.791603,
+ 0.764661, 0.661278, 0.319583, 0.829650, 0.117091, 0.903124, 0.982098,
+ 0.161631, 0.193576, 0.670428, 0.857390, 0.003760, 0.572578, 0.222162,
+ 0.114551, 0.420118, 0.530404, 0.470682, 0.525527, 0.764281, 0.040596,
+ 0.443275, 0.501124, 0.816161, 0.417467, 0.332172, 0.447565, 0.614591,
+ 0.559246, 0.805295, 0.226342, 0.155065, 0.714630, 0.160925, 0.760001,
+ 0.453456, 0.093869, 0.406092, 0.264801, 0.720370, 0.743388, 0.373269,
+ 0.403098, 0.911923, 0.897249, 0.147038, 0.753037, 0.516093, 0.739257,
+ 0.175018, 0.045768, 0.735857, 0.801330, 0.927708, 0.240977, 0.591870,
+ 0.921831, 0.540733, 0.149100, 0.423152, 0.806876, 0.397081, 0.061100,
+ 0.811630, 0.044899, 0.460915, 0.961202, 0.822098, 0.971524, 0.867608,
+ 0.773604, 0.226616, 0.686286, 0.926972, 0.411613, 0.267873, 0.081937,
+ 0.226124, 0.295664, 0.374594, 0.533240, 0.237876, 0.669629, 0.599083,
+ 0.513081, 0.878719, 0.201577, 0.721296, 0.495038, 0.079760, 0.965959,
+ 0.233090, 0.052496, 0.714748, 0.887844, 0.308724, 0.972885, 0.723337,
+ 0.453089, 0.914474, 0.704063, 0.823198, 0.834769, 0.906561, 0.919600,
+ 0.100601, 0.307564, 0.901977, 0.468879, 0.265376, 0.885188, 0.683875,
+ 0.868623, 0.081032, 0.466835, 0.199087, 0.663437, 0.812241, 0.311337,
+ 0.821361, 0.356628, 0.898054, 0.160781, 0.222539, 0.714889, 0.490287,
+ 0.984915, 0.951755, 0.964097, 0.641795, 0.815472, 0.852732, 0.862074,
+ 0.051108, 0.440139, 0.323207, 0.517171, 0.562984, 0.115295, 0.743103,
+ 0.977914, 0.337596, 0.440694, 0.535879, 0.959427, 0.351427, 0.704361,
+ 0.010826, 0.131162, 0.577080, 0.349572, 0.774892, 0.425796, 0.072697,
+ 0.500001, 0.267322, 0.909654, 0.206176, 0.223987, 0.937698, 0.323423,
+ 0.117501, 0.490308, 0.474372, 0.689943, 0.168671, 0.719417, 0.188928,
+ 0.330464, 0.265273, 0.446271, 0.171933, 0.176133, 0.474616, 0.140182,
+ 0.114246, 0.905043, 0.713870, 0.555261, 0.951333
+};
unsigned char hash[512]= {
-0xA2,0xA0,0x19,0x3B,0xF8,0xEB,0xAA,0xEE,0xF3,0x1C,0x67,0x28,0x1D,0xED,0x0,0xDE,0x95,0x2E,0xDC,0x3F,0x3A,0x82,0x35,0x4D,0x6C,0xBA,0x36,0xD0,0xF6,0xC,0x79,0x32,0xD1,0x59,0xF4,0x8,0x8B,0x63,0x89,0x2F,0xB8,0xB4,0x97,0x83,0xF2,0x8F,0x18,0xC7,0x51,0x14,0x65,0x87,0x48,0x20,0x42,0xA8,0x80,0xB5,0x40,0x13,0xB2,0x22,0x7E,0x57,
-0xBC,0x7F,0x6B,0x9D,0x86,0x4C,0xC8,0xDB,0x7C,0xD5,0x25,0x4E,0x5A,0x55,0x74,0x50,0xCD,0xB3,0x7A,0xBB,0xC3,0xCB,0xB6,0xE2,0xE4,0xEC,0xFD,0x98,0xB,0x96,0xD3,0x9E,0x5C,0xA1,0x64,0xF1,0x81,0x61,0xE1,0xC4,0x24,0x72,0x49,0x8C,0x90,0x4B,0x84,0x34,0x38,0xAB,0x78,0xCA,0x1F,0x1,0xD7,0x93,0x11,0xC1,0x58,0xA9,0x31,0xF9,0x44,0x6D,
-0xBF,0x33,0x9C,0x5F,0x9,0x94,0xA3,0x85,0x6,0xC6,0x9A,0x1E,0x7B,0x46,0x15,0x30,0x27,0x2B,0x1B,0x71,0x3C,0x5B,0xD6,0x6F,0x62,0xAC,0x4F,0xC2,0xC0,0xE,0xB1,0x23,0xA7,0xDF,0x47,0xB0,0x77,0x69,0x5,0xE9,0xE6,0xE7,0x76,0x73,0xF,0xFE,0x6E,0x9B,0x56,0xEF,0x12,0xA5,0x37,0xFC,0xAE,0xD9,0x3,0x8E,0xDD,0x10,0xB9,0xCE,0xC9,0x8D,
-0xDA,0x2A,0xBD,0x68,0x17,0x9F,0xBE,0xD4,0xA,0xCC,0xD2,0xE8,0x43,0x3D,0x70,0xB7,0x2,0x7D,0x99,0xD8,0xD,0x60,0x8A,0x4,0x2C,0x3E,0x92,0xE5,0xAF,0x53,0x7,0xE0,0x29,0xA6,0xC5,0xE3,0xF5,0xF7,0x4A,0x41,0x26,0x6A,0x16,0x5E,0x52,0x2D,0x21,0xAD,0xF0,0x91,0xFF,0xEA,0x54,0xFA,0x66,0x1A,0x45,0x39,0xCF,0x75,0xA4,0x88,0xFB,0x5D,
-0xA2,0xA0,0x19,0x3B,0xF8,0xEB,0xAA,0xEE,0xF3,0x1C,0x67,0x28,0x1D,0xED,0x0,0xDE,0x95,0x2E,0xDC,0x3F,0x3A,0x82,0x35,0x4D,0x6C,0xBA,0x36,0xD0,0xF6,0xC,0x79,0x32,0xD1,0x59,0xF4,0x8,0x8B,0x63,0x89,0x2F,0xB8,0xB4,0x97,0x83,0xF2,0x8F,0x18,0xC7,0x51,0x14,0x65,0x87,0x48,0x20,0x42,0xA8,0x80,0xB5,0x40,0x13,0xB2,0x22,0x7E,0x57,
-0xBC,0x7F,0x6B,0x9D,0x86,0x4C,0xC8,0xDB,0x7C,0xD5,0x25,0x4E,0x5A,0x55,0x74,0x50,0xCD,0xB3,0x7A,0xBB,0xC3,0xCB,0xB6,0xE2,0xE4,0xEC,0xFD,0x98,0xB,0x96,0xD3,0x9E,0x5C,0xA1,0x64,0xF1,0x81,0x61,0xE1,0xC4,0x24,0x72,0x49,0x8C,0x90,0x4B,0x84,0x34,0x38,0xAB,0x78,0xCA,0x1F,0x1,0xD7,0x93,0x11,0xC1,0x58,0xA9,0x31,0xF9,0x44,0x6D,
-0xBF,0x33,0x9C,0x5F,0x9,0x94,0xA3,0x85,0x6,0xC6,0x9A,0x1E,0x7B,0x46,0x15,0x30,0x27,0x2B,0x1B,0x71,0x3C,0x5B,0xD6,0x6F,0x62,0xAC,0x4F,0xC2,0xC0,0xE,0xB1,0x23,0xA7,0xDF,0x47,0xB0,0x77,0x69,0x5,0xE9,0xE6,0xE7,0x76,0x73,0xF,0xFE,0x6E,0x9B,0x56,0xEF,0x12,0xA5,0x37,0xFC,0xAE,0xD9,0x3,0x8E,0xDD,0x10,0xB9,0xCE,0xC9,0x8D,
-0xDA,0x2A,0xBD,0x68,0x17,0x9F,0xBE,0xD4,0xA,0xCC,0xD2,0xE8,0x43,0x3D,0x70,0xB7,0x2,0x7D,0x99,0xD8,0xD,0x60,0x8A,0x4,0x2C,0x3E,0x92,0xE5,0xAF,0x53,0x7,0xE0,0x29,0xA6,0xC5,0xE3,0xF5,0xF7,0x4A,0x41,0x26,0x6A,0x16,0x5E,0x52,0x2D,0x21,0xAD,0xF0,0x91,0xFF,0xEA,0x54,0xFA,0x66,0x1A,0x45,0x39,0xCF,0x75,0xA4,0x88,0xFB,0x5D,
+ 0xA2, 0xA0, 0x19, 0x3B, 0xF8, 0xEB, 0xAA, 0xEE, 0xF3, 0x1C, 0x67, 0x28, 0x1D, 0xED, 0x0, 0xDE, 0x95, 0x2E, 0xDC,
+ 0x3F, 0x3A, 0x82, 0x35, 0x4D, 0x6C, 0xBA, 0x36, 0xD0, 0xF6, 0xC, 0x79, 0x32, 0xD1, 0x59, 0xF4, 0x8, 0x8B, 0x63,
+ 0x89, 0x2F, 0xB8, 0xB4, 0x97, 0x83, 0xF2, 0x8F, 0x18, 0xC7, 0x51, 0x14, 0x65, 0x87, 0x48, 0x20, 0x42, 0xA8, 0x80,
+ 0xB5, 0x40, 0x13, 0xB2, 0x22, 0x7E, 0x57, 0xBC, 0x7F, 0x6B, 0x9D, 0x86, 0x4C, 0xC8, 0xDB, 0x7C, 0xD5, 0x25, 0x4E,
+ 0x5A, 0x55, 0x74, 0x50, 0xCD, 0xB3, 0x7A, 0xBB, 0xC3, 0xCB, 0xB6, 0xE2, 0xE4, 0xEC, 0xFD, 0x98, 0xB, 0x96, 0xD3,
+ 0x9E, 0x5C, 0xA1, 0x64, 0xF1, 0x81, 0x61, 0xE1, 0xC4, 0x24, 0x72, 0x49, 0x8C, 0x90, 0x4B, 0x84, 0x34, 0x38, 0xAB,
+ 0x78, 0xCA, 0x1F, 0x1, 0xD7, 0x93, 0x11, 0xC1, 0x58, 0xA9, 0x31, 0xF9, 0x44, 0x6D, 0xBF, 0x33, 0x9C, 0x5F, 0x9,
+ 0x94, 0xA3, 0x85, 0x6, 0xC6, 0x9A, 0x1E, 0x7B, 0x46, 0x15, 0x30, 0x27, 0x2B, 0x1B, 0x71, 0x3C, 0x5B, 0xD6, 0x6F,
+ 0x62, 0xAC, 0x4F, 0xC2, 0xC0, 0xE, 0xB1, 0x23, 0xA7, 0xDF, 0x47, 0xB0, 0x77, 0x69, 0x5, 0xE9, 0xE6, 0xE7, 0x76,
+ 0x73, 0xF, 0xFE, 0x6E, 0x9B, 0x56, 0xEF, 0x12, 0xA5, 0x37, 0xFC, 0xAE, 0xD9, 0x3, 0x8E, 0xDD, 0x10, 0xB9, 0xCE,
+ 0xC9, 0x8D, 0xDA, 0x2A, 0xBD, 0x68, 0x17, 0x9F, 0xBE, 0xD4, 0xA, 0xCC, 0xD2, 0xE8, 0x43, 0x3D, 0x70, 0xB7, 0x2,
+ 0x7D, 0x99, 0xD8, 0xD, 0x60, 0x8A, 0x4, 0x2C, 0x3E, 0x92, 0xE5, 0xAF, 0x53, 0x7, 0xE0, 0x29, 0xA6, 0xC5, 0xE3,
+ 0xF5, 0xF7, 0x4A, 0x41, 0x26, 0x6A, 0x16, 0x5E, 0x52, 0x2D, 0x21, 0xAD, 0xF0, 0x91, 0xFF, 0xEA, 0x54, 0xFA, 0x66,
+ 0x1A, 0x45, 0x39, 0xCF, 0x75, 0xA4, 0x88, 0xFB, 0x5D, 0xA2, 0xA0, 0x19, 0x3B, 0xF8, 0xEB, 0xAA, 0xEE, 0xF3, 0x1C,
+ 0x67, 0x28, 0x1D, 0xED, 0x0, 0xDE, 0x95, 0x2E, 0xDC, 0x3F, 0x3A, 0x82, 0x35, 0x4D, 0x6C, 0xBA, 0x36, 0xD0, 0xF6,
+ 0xC, 0x79, 0x32, 0xD1, 0x59, 0xF4, 0x8, 0x8B, 0x63, 0x89, 0x2F, 0xB8, 0xB4, 0x97, 0x83, 0xF2, 0x8F, 0x18, 0xC7,
+ 0x51, 0x14, 0x65, 0x87, 0x48, 0x20, 0x42, 0xA8, 0x80, 0xB5, 0x40, 0x13, 0xB2, 0x22, 0x7E, 0x57, 0xBC, 0x7F, 0x6B,
+ 0x9D, 0x86, 0x4C, 0xC8, 0xDB, 0x7C, 0xD5, 0x25, 0x4E, 0x5A, 0x55, 0x74, 0x50, 0xCD, 0xB3, 0x7A, 0xBB, 0xC3, 0xCB,
+ 0xB6, 0xE2, 0xE4, 0xEC, 0xFD, 0x98, 0xB, 0x96, 0xD3, 0x9E, 0x5C, 0xA1, 0x64, 0xF1, 0x81, 0x61, 0xE1, 0xC4, 0x24,
+ 0x72, 0x49, 0x8C, 0x90, 0x4B, 0x84, 0x34, 0x38, 0xAB, 0x78, 0xCA, 0x1F, 0x1, 0xD7, 0x93, 0x11, 0xC1, 0x58, 0xA9,
+ 0x31, 0xF9, 0x44, 0x6D, 0xBF, 0x33, 0x9C, 0x5F, 0x9, 0x94, 0xA3, 0x85, 0x6, 0xC6, 0x9A, 0x1E, 0x7B, 0x46, 0x15,
+ 0x30, 0x27, 0x2B, 0x1B, 0x71, 0x3C, 0x5B, 0xD6, 0x6F, 0x62, 0xAC, 0x4F, 0xC2, 0xC0, 0xE, 0xB1, 0x23, 0xA7, 0xDF,
+ 0x47, 0xB0, 0x77, 0x69, 0x5, 0xE9, 0xE6, 0xE7, 0x76, 0x73, 0xF, 0xFE, 0x6E, 0x9B, 0x56, 0xEF, 0x12, 0xA5, 0x37,
+ 0xFC, 0xAE, 0xD9, 0x3, 0x8E, 0xDD, 0x10, 0xB9, 0xCE, 0xC9, 0x8D, 0xDA, 0x2A, 0xBD, 0x68, 0x17, 0x9F, 0xBE, 0xD4,
+ 0xA, 0xCC, 0xD2, 0xE8, 0x43, 0x3D, 0x70, 0xB7, 0x2, 0x7D, 0x99, 0xD8, 0xD, 0x60, 0x8A, 0x4, 0x2C, 0x3E, 0x92,
+ 0xE5, 0xAF, 0x53, 0x7, 0xE0, 0x29, 0xA6, 0xC5, 0xE3, 0xF5, 0xF7, 0x4A, 0x41, 0x26, 0x6A, 0x16, 0x5E, 0x52, 0x2D,
+ 0x21, 0xAD, 0xF0, 0x91, 0xFF, 0xEA, 0x54, 0xFA, 0x66, 0x1A, 0x45, 0x39, 0xCF, 0x75, 0xA4, 0x88, 0xFB, 0x5D,
};
float hashvectf[768]= {
-0.33783,0.715698,-0.611206,-0.944031,-0.326599,-0.045624,-0.101074,-0.416443,-0.903503,0.799286,0.49411,-0.341949,-0.854645,0.518036,0.033936,0.42514,-0.437866,-0.792114,-0.358948,0.597046,0.717377,-0.985413,0.144714,0.089294,-0.601776,-0.33728,-0.723907,-0.449921,0.594513,0.666382,0.208313,-0.10791,
-0.972076,0.575317,0.060425,0.815643,0.293365,-0.875702,-0.383453,0.293762,0.465759,0.834686,-0.846008,-0.233398,-0.47934,-0.115814,0.143036,-0.98291,0.204681,-0.949036,-0.239532,0.946716,-0.263947,0.184326,-0.235596,0.573822,0.784332,0.203705,-0.372253,-0.905487,0.756989,-0.651031,0.055298,0.497803,
-0.814697,-0.297363,-0.16214,0.063995,-0.98468,-0.329254,0.834381,0.441925,0.703827,-0.527039,-0.476227,0.956421,0.266113,0.119781,0.480133,0.482849,0.7323,-0.18631,0.961212,-0.203125,-0.748474,-0.656921,-0.090393,-0.085052,-0.165253,0.982544,-0.76947,0.628174,-0.115234,0.383148,0.537659,0.751068,
-0.616486,-0.668488,-0.415924,-0.259979,-0.630005,0.73175,0.570953,-0.087952,0.816223,-0.458008,0.023254,0.888611,-0.196167,0.976563,-0.088287,-0.263885,-0.69812,-0.665527,0.437134,-0.892273,-0.112793,-0.621674,-0.230438,0.748566,0.232422,0.900574,-0.367249,0.22229,-0.796143,0.562744,-0.665497,-0.73764,
-0.11377,0.670135,0.704803,0.232605,0.895599,0.429749,-0.114655,-0.11557,-0.474243,0.872742,0.621826,0.604004,-0.498444,-0.832214,0.012756,0.55426,-0.702484,0.705994,-0.089661,-0.692017,0.649292,0.315399,-0.175995,-0.977997,0.111877,0.096954,-0.04953,0.994019,0.635284,-0.606689,-0.477783,-0.261261,
--0.607422,-0.750153,0.983276,0.165436,0.075958,-0.29837,0.404083,-0.864655,-0.638672,0.507721,0.578156,0.388214,0.412079,0.824249,0.556183,-0.208832,0.804352,0.778442,0.562012,0.27951,-0.616577,0.781921,-0.091522,0.196289,0.051056,0.979187,-0.121216,0.207153,-0.970734,-0.173401,-0.384735,0.906555,
-0.161499,-0.723236,-0.671387,0.178497,-0.006226,-0.983887,-0.126038,0.15799,0.97934,0.830475,-0.024811,0.556458,-0.510132,-0.76944,0.384247,0.81424,0.200104,-0.544891,-0.112549,-0.393311,-0.912445,0.56189,0.152222,-0.813049,0.198914,-0.254517,-0.946381,-0.41217,0.690979,-0.593811,-0.407257,0.324524,
-0.853668,-0.690186,0.366119,-0.624115,-0.428345,0.844147,-0.322296,-0.21228,-0.297546,-0.930756,-0.273071,0.516113,0.811798,0.928314,0.371643,0.007233,0.785828,-0.479218,-0.390778,-0.704895,0.058929,0.706818,0.173248,0.203583,0.963562,0.422211,-0.904297,-0.062469,-0.363312,-0.182465,0.913605,0.254028,
--0.552307,-0.793945,-0.28891,-0.765747,-0.574554,0.058319,0.291382,0.954803,0.946136,-0.303925,0.111267,-0.078156,0.443695,-0.892731,0.182098,0.89389,0.409515,-0.680298,-0.213318,0.701141,0.062469,0.848389,-0.525635,-0.72879,-0.641846,0.238342,-0.88089,0.427673,0.202637,-0.532501,-0.21405,0.818878,
-0.948975,-0.305084,0.07962,0.925446,0.374664,0.055817,0.820923,0.565491,0.079102,0.25882,0.099792,-0.960724,-0.294617,0.910522,0.289978,0.137115,0.320038,-0.937408,-0.908386,0.345276,-0.235718,-0.936218,0.138763,0.322754,0.366577,0.925934,-0.090637,0.309296,-0.686829,-0.657684,0.66983,0.024445,
-0.742065,-0.917999,-0.059113,-0.392059,0.365509,0.462158,-0.807922,0.083374,0.996399,-0.014801,0.593842,0.253143,-0.763672,0.974976,-0.165466,0.148285,0.918976,0.137299,0.369537,0.294952,0.694977,0.655731,0.943085,0.152618,-0.295319,0.58783,-0.598236,0.544495,0.203796,0.678223,0.705994,-0.478821,
--0.661011,0.577667,0.719055,-0.1698,-0.673828,-0.132172,-0.965332,0.225006,-0.981873,-0.14502,0.121979,0.763458,0.579742,0.284546,-0.893188,0.079681,0.442474,-0.795776,-0.523804,0.303802,0.734955,0.67804,-0.007446,0.15506,0.986267,-0.056183,0.258026,0.571503,-0.778931,-0.681549,-0.702087,-0.206116,
--0.96286,-0.177185,0.203613,-0.470978,-0.515106,0.716095,-0.740326,0.57135,0.354095,-0.56012,-0.824982,-0.074982,-0.507874,0.753204,0.417969,-0.503113,0.038147,0.863342,0.594025,0.673553,-0.439758,-0.119873,-0.005524,-0.992737,0.098267,-0.213776,0.971893,-0.615631,0.643951,0.454163,0.896851,-0.441071,
-0.032166,-0.555023,0.750763,-0.358093,0.398773,0.304688,0.864929,-0.722961,0.303589,0.620544,-0.63559,-0.621948,-0.457306,-0.293243,0.072327,0.953278,-0.491638,0.661041,-0.566772,-0.304199,-0.572083,-0.761688,0.908081,-0.398956,0.127014,-0.523621,-0.549683,-0.650848,-0.932922,-0.19986,0.299408,0.099426,
-0.140869,0.984985,-0.020325,-0.999756,-0.002319,0.952667,0.280853,-0.11615,-0.971893,0.082581,0.220337,0.65921,0.705292,-0.260651,0.733063,-0.175537,0.657043,-0.555206,0.429504,-0.712189,0.400421,-0.89859,0.179352,0.750885,-0.19696,0.630341,0.785675,-0.569336,0.241821,-0.058899,-0.464111,0.883789,
-0.129608,-0.94519,0.299622,-0.357819,0.907654,0.219238,-0.842133,-0.439117,-0.312927,-0.313477,0.84433,0.434479,-0.241211,0.053253,0.968994,0.063873,0.823273,0.563965,0.476288,0.862152,-0.172516,0.620941,-0.298126,0.724915,0.25238,-0.749359,-0.612122,-0.577545,0.386566,0.718994,-0.406342,-0.737976,
-0.538696,0.04718,0.556305,0.82959,-0.802856,0.587463,0.101166,-0.707733,-0.705963,0.026428,0.374908,0.68457,0.625092,0.472137,0.208405,-0.856506,-0.703064,-0.581085,-0.409821,-0.417206,-0.736328,0.532623,-0.447876,-0.20285,-0.870728,0.086945,-0.990417,0.107086,0.183685,0.018341,-0.982788,0.560638,
--0.428864,0.708282,0.296722,-0.952576,-0.0672,0.135773,0.990265,0.030243,-0.068787,0.654724,0.752686,0.762604,-0.551758,0.337585,-0.819611,-0.407684,0.402466,-0.727844,-0.55072,-0.408539,-0.855774,-0.480011,0.19281,0.693176,-0.079285,0.716339,0.226013,0.650116,-0.725433,0.246704,0.953369,-0.173553,
--0.970398,-0.239227,-0.03244,0.136383,-0.394318,0.908752,0.813232,0.558167,0.164368,0.40451,0.549042,-0.731323,-0.380249,-0.566711,0.730865,0.022156,0.932739,0.359741,0.00824,0.996552,-0.082306,0.956635,-0.065338,-0.283722,-0.743561,0.008209,0.668579,-0.859589,-0.509674,0.035767,-0.852234,0.363678,
--0.375977,-0.201965,-0.970795,-0.12915,0.313477,0.947327,0.06546,-0.254028,-0.528259,0.81015,0.628052,0.601105,0.49411,-0.494385,0.868378,0.037933,0.275635,-0.086426,0.957336,-0.197937,0.468903,-0.860748,0.895599,0.399384,0.195801,0.560791,0.825012,-0.069214,0.304199,-0.849487,0.43103,0.096375,
-0.93576,0.339111,-0.051422,0.408966,-0.911072,0.330444,0.942841,-0.042389,-0.452362,-0.786407,0.420563,0.134308,-0.933472,-0.332489,0.80191,-0.566711,-0.188934,-0.987946,-0.105988,0.112518,-0.24408,0.892242,-0.379791,-0.920502,0.229095,-0.316376,0.7789,0.325958,0.535706,-0.912872,0.185211,-0.36377,
--0.184784,0.565369,-0.803833,-0.018463,0.119537,0.992615,-0.259247,-0.935608,0.239532,-0.82373,-0.449127,-0.345947,-0.433105,0.659515,0.614349,-0.822754,0.378845,-0.423676,0.687195,-0.674835,-0.26889,-0.246582,-0.800842,0.545715,-0.729187,-0.207794,0.651978,0.653534,-0.610443,-0.447388,0.492584,-0.023346,
-0.869934,0.609039,0.009094,-0.79306,0.962494,-0.271088,-0.00885,0.2659,-0.004913,0.963959,0.651245,0.553619,-0.518951,0.280548,-0.84314,0.458618,-0.175293,-0.983215,0.049805,0.035339,-0.979919,0.196045,-0.982941,0.164307,-0.082245,0.233734,-0.97226,-0.005005,-0.747253,-0.611328,0.260437,0.645599,
-0.592773,0.481384,0.117706,-0.949524,-0.29068,-0.535004,-0.791901,-0.294312,-0.627167,-0.214447,0.748718,-0.047974,-0.813477,-0.57959,-0.175537,0.477264,-0.860992,0.738556,-0.414246,-0.53183,0.562561,-0.704071,0.433289,-0.754944,0.64801,-0.100586,0.114716,0.044525,-0.992371,0.966003,0.244873,-0.082764,
+ 0.33783, 0.715698, -0.611206, -0.944031, -0.326599, -0.045624, -0.101074, -0.416443, -0.903503, 0.799286, 0.49411,
+ -0.341949, -0.854645, 0.518036, 0.033936, 0.42514, -0.437866, -0.792114, -0.358948, 0.597046, 0.717377, -0.985413,
+ 0.144714, 0.089294, -0.601776, -0.33728, -0.723907, -0.449921, 0.594513, 0.666382, 0.208313, -0.10791, 0.972076,
+ 0.575317, 0.060425, 0.815643, 0.293365, -0.875702, -0.383453, 0.293762, 0.465759, 0.834686, -0.846008, -0.233398,
+ -0.47934, -0.115814, 0.143036, -0.98291, 0.204681, -0.949036, -0.239532, 0.946716, -0.263947, 0.184326, -0.235596,
+ 0.573822, 0.784332, 0.203705, -0.372253, -0.905487, 0.756989, -0.651031, 0.055298, 0.497803, 0.814697, -0.297363,
+ -0.16214, 0.063995, -0.98468, -0.329254, 0.834381, 0.441925, 0.703827, -0.527039, -0.476227, 0.956421, 0.266113,
+ 0.119781, 0.480133, 0.482849, 0.7323, -0.18631, 0.961212, -0.203125, -0.748474, -0.656921, -0.090393, -0.085052,
+ -0.165253, 0.982544, -0.76947, 0.628174, -0.115234, 0.383148, 0.537659, 0.751068, 0.616486, -0.668488, -0.415924,
+ -0.259979, -0.630005, 0.73175, 0.570953, -0.087952, 0.816223, -0.458008, 0.023254, 0.888611, -0.196167, 0.976563,
+ -0.088287, -0.263885, -0.69812, -0.665527, 0.437134, -0.892273, -0.112793, -0.621674, -0.230438, 0.748566, 0.232422,
+ 0.900574, -0.367249, 0.22229, -0.796143, 0.562744, -0.665497, -0.73764, 0.11377, 0.670135, 0.704803, 0.232605,
+ 0.895599, 0.429749, -0.114655, -0.11557, -0.474243, 0.872742, 0.621826, 0.604004, -0.498444, -0.832214, 0.012756,
+ 0.55426, -0.702484, 0.705994, -0.089661, -0.692017, 0.649292, 0.315399, -0.175995, -0.977997, 0.111877, 0.096954,
+ -0.04953, 0.994019, 0.635284, -0.606689, -0.477783, -0.261261, -0.607422, -0.750153, 0.983276, 0.165436, 0.075958,
+ -0.29837, 0.404083, -0.864655, -0.638672, 0.507721, 0.578156, 0.388214, 0.412079, 0.824249, 0.556183, -0.208832,
+ 0.804352, 0.778442, 0.562012, 0.27951, -0.616577, 0.781921, -0.091522, 0.196289, 0.051056, 0.979187, -0.121216,
+ 0.207153, -0.970734, -0.173401, -0.384735, 0.906555, 0.161499, -0.723236, -0.671387, 0.178497, -0.006226, -0.983887,
+ -0.126038, 0.15799, 0.97934, 0.830475, -0.024811, 0.556458, -0.510132, -0.76944, 0.384247, 0.81424, 0.200104,
+ -0.544891, -0.112549, -0.393311, -0.912445, 0.56189, 0.152222, -0.813049, 0.198914, -0.254517, -0.946381, -0.41217,
+ 0.690979, -0.593811, -0.407257, 0.324524, 0.853668, -0.690186, 0.366119, -0.624115, -0.428345, 0.844147, -0.322296,
+ -0.21228, -0.297546, -0.930756, -0.273071, 0.516113, 0.811798, 0.928314, 0.371643, 0.007233, 0.785828, -0.479218,
+ -0.390778, -0.704895, 0.058929, 0.706818, 0.173248, 0.203583, 0.963562, 0.422211, -0.904297, -0.062469, -0.363312,
+ -0.182465, 0.913605, 0.254028, -0.552307, -0.793945, -0.28891, -0.765747, -0.574554, 0.058319, 0.291382, 0.954803,
+ 0.946136, -0.303925, 0.111267, -0.078156, 0.443695, -0.892731, 0.182098, 0.89389, 0.409515, -0.680298, -0.213318,
+ 0.701141, 0.062469, 0.848389, -0.525635, -0.72879, -0.641846, 0.238342, -0.88089, 0.427673, 0.202637, -0.532501,
+ -0.21405, 0.818878, 0.948975, -0.305084, 0.07962, 0.925446, 0.374664, 0.055817, 0.820923, 0.565491, 0.079102,
+ 0.25882, 0.099792, -0.960724, -0.294617, 0.910522, 0.289978, 0.137115, 0.320038, -0.937408, -0.908386, 0.345276,
+ -0.235718, -0.936218, 0.138763, 0.322754, 0.366577, 0.925934, -0.090637, 0.309296, -0.686829, -0.657684, 0.66983,
+ 0.024445, 0.742065, -0.917999, -0.059113, -0.392059, 0.365509, 0.462158, -0.807922, 0.083374, 0.996399, -0.014801,
+ 0.593842, 0.253143, -0.763672, 0.974976, -0.165466, 0.148285, 0.918976, 0.137299, 0.369537, 0.294952, 0.694977,
+ 0.655731, 0.943085, 0.152618, -0.295319, 0.58783, -0.598236, 0.544495, 0.203796, 0.678223, 0.705994, -0.478821,
+ -0.661011, 0.577667, 0.719055, -0.1698, -0.673828, -0.132172, -0.965332, 0.225006, -0.981873, -0.14502, 0.121979,
+ 0.763458, 0.579742, 0.284546, -0.893188, 0.079681, 0.442474, -0.795776, -0.523804, 0.303802, 0.734955, 0.67804,
+ -0.007446, 0.15506, 0.986267, -0.056183, 0.258026, 0.571503, -0.778931, -0.681549, -0.702087, -0.206116, -0.96286,
+ -0.177185, 0.203613, -0.470978, -0.515106, 0.716095, -0.740326, 0.57135, 0.354095, -0.56012, -0.824982, -0.074982,
+ -0.507874, 0.753204, 0.417969, -0.503113, 0.038147, 0.863342, 0.594025, 0.673553, -0.439758, -0.119873, -0.005524,
+ -0.992737, 0.098267, -0.213776, 0.971893, -0.615631, 0.643951, 0.454163, 0.896851, -0.441071, 0.032166, -0.555023,
+ 0.750763, -0.358093, 0.398773, 0.304688, 0.864929, -0.722961, 0.303589, 0.620544, -0.63559, -0.621948, -0.457306,
+ -0.293243, 0.072327, 0.953278, -0.491638, 0.661041, -0.566772, -0.304199, -0.572083, -0.761688, 0.908081, -0.398956,
+ 0.127014, -0.523621, -0.549683, -0.650848, -0.932922, -0.19986, 0.299408, 0.099426, 0.140869, 0.984985, -0.020325,
+ -0.999756, -0.002319, 0.952667, 0.280853, -0.11615, -0.971893, 0.082581, 0.220337, 0.65921, 0.705292, -0.260651,
+ 0.733063, -0.175537, 0.657043, -0.555206, 0.429504, -0.712189, 0.400421, -0.89859, 0.179352, 0.750885, -0.19696,
+ 0.630341, 0.785675, -0.569336, 0.241821, -0.058899, -0.464111, 0.883789, 0.129608, -0.94519, 0.299622, -0.357819,
+ 0.907654, 0.219238, -0.842133, -0.439117, -0.312927, -0.313477, 0.84433, 0.434479, -0.241211, 0.053253, 0.968994,
+ 0.063873, 0.823273, 0.563965, 0.476288, 0.862152, -0.172516, 0.620941, -0.298126, 0.724915, 0.25238, -0.749359,
+ -0.612122, -0.577545, 0.386566, 0.718994, -0.406342, -0.737976, 0.538696, 0.04718, 0.556305, 0.82959, -0.802856,
+ 0.587463, 0.101166, -0.707733, -0.705963, 0.026428, 0.374908, 0.68457, 0.625092, 0.472137, 0.208405, -0.856506,
+ -0.703064, -0.581085, -0.409821, -0.417206, -0.736328, 0.532623, -0.447876, -0.20285, -0.870728, 0.086945,
+ -0.990417, 0.107086, 0.183685, 0.018341, -0.982788, 0.560638, -0.428864, 0.708282, 0.296722, -0.952576, -0.0672,
+ 0.135773, 0.990265, 0.030243, -0.068787, 0.654724, 0.752686, 0.762604, -0.551758, 0.337585, -0.819611, -0.407684,
+ 0.402466, -0.727844, -0.55072, -0.408539, -0.855774, -0.480011, 0.19281, 0.693176, -0.079285, 0.716339, 0.226013,
+ 0.650116, -0.725433, 0.246704, 0.953369, -0.173553, -0.970398, -0.239227, -0.03244, 0.136383, -0.394318, 0.908752,
+ 0.813232, 0.558167, 0.164368, 0.40451, 0.549042, -0.731323, -0.380249, -0.566711, 0.730865, 0.022156, 0.932739,
+ 0.359741, 0.00824, 0.996552, -0.082306, 0.956635, -0.065338, -0.283722, -0.743561, 0.008209, 0.668579, -0.859589,
+ -0.509674, 0.035767, -0.852234, 0.363678, -0.375977, -0.201965, -0.970795, -0.12915, 0.313477, 0.947327, 0.06546,
+ -0.254028, -0.528259, 0.81015, 0.628052, 0.601105, 0.49411, -0.494385, 0.868378, 0.037933, 0.275635, -0.086426,
+ 0.957336, -0.197937, 0.468903, -0.860748, 0.895599, 0.399384, 0.195801, 0.560791, 0.825012, -0.069214, 0.304199,
+ -0.849487, 0.43103, 0.096375, 0.93576, 0.339111, -0.051422, 0.408966, -0.911072, 0.330444, 0.942841, -0.042389,
+ -0.452362, -0.786407, 0.420563, 0.134308, -0.933472, -0.332489, 0.80191, -0.566711, -0.188934, -0.987946, -0.105988,
+ 0.112518, -0.24408, 0.892242, -0.379791, -0.920502, 0.229095, -0.316376, 0.7789, 0.325958, 0.535706, -0.912872,
+ 0.185211, -0.36377, -0.184784, 0.565369, -0.803833, -0.018463, 0.119537, 0.992615, -0.259247, -0.935608, 0.239532,
+ -0.82373, -0.449127, -0.345947, -0.433105, 0.659515, 0.614349, -0.822754, 0.378845, -0.423676, 0.687195, -0.674835,
+ -0.26889, -0.246582, -0.800842, 0.545715, -0.729187, -0.207794, 0.651978, 0.653534, -0.610443, -0.447388, 0.492584,
+ -0.023346, 0.869934, 0.609039, 0.009094, -0.79306, 0.962494, -0.271088, -0.00885, 0.2659, -0.004913, 0.963959,
+ 0.651245, 0.553619, -0.518951, 0.280548, -0.84314, 0.458618, -0.175293, -0.983215, 0.049805, 0.035339, -0.979919,
+ 0.196045, -0.982941, 0.164307, -0.082245, 0.233734, -0.97226, -0.005005, -0.747253, -0.611328, 0.260437, 0.645599,
+ 0.592773, 0.481384, 0.117706, -0.949524, -0.29068, -0.535004, -0.791901, -0.294312, -0.627167, -0.214447, 0.748718,
+ -0.047974, -0.813477, -0.57959, -0.175537, 0.477264, -0.860992, 0.738556, -0.414246, -0.53183, 0.562561, -0.704071,
+0.433289, -0.754944, 0.64801, -0.100586, 0.114716, 0.044525, -0.992371, 0.966003, 0.244873, -0.082764,
};
/**************************/
@@ -375,7 +440,7 @@ float BLI_turbulence1(float noisesize, float x, float y, float z, int nr)
{
float s, d= 0.5, div=1.0;
- s= fabsf( (-1.0f+2.0f*BLI_hnoise(noisesize, x, y, z)));
+ s= fabsf((-1.0f + 2.0f * BLI_hnoise(noisesize, x, y, z)));
while (nr>0) {
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index 3c59ca8d52b..a18c297fdae 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -135,7 +135,7 @@ int BLI_stringdec(const char *string, char *head, char *tail, unsigned short *nu
if (found) {
if (tail) strcpy(tail, &string[nume+1]);
if (head) {
- strcpy(head,string);
+ strcpy(head, string);
head[nums]=0;
}
if (numlen) *numlen = nume-nums+1;
@@ -364,12 +364,12 @@ void BLI_cleanup_path(const char *relabase, char *dir)
}
}
- while ( (start = strstr(dir,"\\.\\")) ) {
+ while ( (start = strstr(dir, "\\.\\")) ) {
eind = start + strlen("\\.\\") - 1;
memmove(start, eind, strlen(eind) + 1);
}
- while ( (start = strstr(dir,"\\\\" )) ) {
+ while ( (start = strstr(dir, "\\\\" )) ) {
eind = start + strlen("\\\\") - 1;
memmove(start, eind, strlen(eind) + 1);
}
@@ -402,12 +402,12 @@ void BLI_cleanup_path(const char *relabase, char *dir)
}
}
- while ( (start = strstr(dir,"/./")) ) {
+ while ( (start = strstr(dir, "/./")) ) {
eind = start + (3 - 1) /* strlen("/./") - 1 */;
memmove(start, eind, strlen(eind) + 1);
}
- while ( (start = strstr(dir,"//" )) ) {
+ while ( (start = strstr(dir, "//" )) ) {
eind = start + (2 - 1) /* strlen("//") - 1 */;
memmove(start, eind, strlen(eind) + 1);
}
@@ -485,7 +485,9 @@ void BLI_path_rel(char *file, const char *relfile)
while (*p == *q)
#endif
{
- ++p; ++q;
+ p++;
+ q++;
+
/* don't search beyond the end of the string
* in the rare case they match */
if ((*p=='\0') || (*q=='\0')) {
@@ -513,7 +515,7 @@ void BLI_path_rel(char *file, const char *relfile)
while (p && p < lslash) {
if (*p == '/')
strcat(res, "../");
- ++p;
+ p++;
}
strcat(res, q+1); /* don't copy the slash at the beginning */
@@ -758,7 +760,7 @@ int BLI_path_cwd(char *path)
BLI_current_working_dir(cwd, sizeof(cwd)); /* in case the full path to the blend isn't used */
if (cwd[0] == '\0') {
- printf( "Could not get the current working directory - $PWD for an unknown reason.");
+ printf("Could not get the current working directory - $PWD for an unknown reason.\n");
}
else {
/* uses the blend path relative to cwd important for loading relative linked files.
@@ -835,7 +837,7 @@ const char *BLI_getDefaultDocumentFolder(void)
HRESULT hResult;
/* Check for %HOME% env var */
- if (uput_getenv("HOME",documentfolder,MAXPATHLEN)) {
+ if (uput_getenv("HOME", documentfolder, MAXPATHLEN)) {
if (BLI_is_dir(documentfolder)) return documentfolder;
}
@@ -1156,7 +1158,7 @@ char *BLI_get_folder_version(const int id, const int ver, const int do_check)
{
static char path[FILE_MAX] = "";
int ok;
- switch(id) {
+ switch (id) {
case BLENDER_RESOURCE_PATH_USER:
ok= get_path_user(path, NULL, NULL, NULL, ver);
break;
@@ -1265,7 +1267,7 @@ void BLI_make_exist(char *dir)
#ifdef WIN32
get_default_root(dir);
#else
- strcpy(dir,"/");
+ strcpy(dir, "/");
#endif
break;
}
@@ -1787,7 +1789,7 @@ static void bli_where_am_i(char *fullname, const size_t maxlen, const char *name
#ifdef WITH_BINRELOC
/* linux uses binreloc since argv[0] is not reliable, call br_init( NULL ) first */
- path = br_find_exe( NULL );
+ path = br_find_exe(NULL);
if (path) {
BLI_strncpy(fullname, path, maxlen);
free((void *)path);
@@ -1798,7 +1800,7 @@ static void bli_where_am_i(char *fullname, const size_t maxlen, const char *name
#ifdef _WIN32
wchar_t * fullname_16 = MEM_mallocN(maxlen*sizeof(wchar_t), "ProgramPath");
if (GetModuleFileNameW(0, fullname_16, maxlen)) {
- conv_utf_16_to_8(fullname_16,fullname, maxlen);
+ conv_utf_16_to_8(fullname_16, fullname, maxlen);
if (!BLI_exists(fullname)) {
printf("path can't be found: \"%.*s\"\n", maxlen, fullname);
MessageBox(NULL, "path contains invalid characters or is too long (see console)", "Error", MB_OK);
diff --git a/source/blender/blenlib/intern/pbvh.c b/source/blender/blenlib/intern/pbvh.c
index 7a955cf6ed9..4ad350c7786 100644
--- a/source/blender/blenlib/intern/pbvh.c
+++ b/source/blender/blenlib/intern/pbvh.c
@@ -35,8 +35,8 @@
#include "BLI_pbvh.h"
#include "BKE_DerivedMesh.h"
-#include "BKE_mesh.h" /* for mesh_calc_normals */
-#include "BKE_global.h" /* for mesh_calc_normals */
+#include "BKE_mesh.h" /* for BKE_mesh_calc_normals */
+#include "BKE_global.h" /* for BKE_mesh_calc_normals */
#include "BKE_paint.h"
#include "BKE_subsurf.h"
@@ -1012,15 +1012,15 @@ static void pbvh_update_normals(PBVH *bvh, PBVHNode **nodes,
* we have to store for each vertex which node it is in */
vnor= MEM_callocN(sizeof(float)*3*bvh->totvert, "bvh temp vnors");
- /* subtle assumptions:
- * - We know that for all edited vertices, the nodes with faces
- * adjacent to these vertices have been marked with PBVH_UpdateNormals.
- * This is true because if the vertex is inside the brush radius, the
- * bounding box of it's adjacent faces will be as well.
- * - However this is only true for the vertices that have actually been
- * edited, not for all vertices in the nodes marked for update, so we
- * can only update vertices marked with ME_VERT_PBVH_UPDATE.
- */
+ /* subtle assumptions:
+ * - We know that for all edited vertices, the nodes with faces
+ * adjacent to these vertices have been marked with PBVH_UpdateNormals.
+ * This is true because if the vertex is inside the brush radius, the
+ * bounding box of it's adjacent faces will be as well.
+ * - However this is only true for the vertices that have actually been
+ * edited, not for all vertices in the nodes marked for update, so we
+ * can only update vertices marked with ME_VERT_PBVH_UPDATE.
+ */
#pragma omp parallel for private(n) schedule(static)
for (n = 0; n < totnode; n++) {
@@ -1151,7 +1151,7 @@ static void pbvh_update_draw_buffers(PBVH *bvh, PBVHNode **nodes, int totnode)
}
if (node->flag & PBVH_UpdateDrawBuffers) {
- switch(bvh->type) {
+ switch (bvh->type) {
case PBVH_GRIDS:
GPU_update_grid_buffers(node->draw_buffers,
bvh->grids,
@@ -1290,7 +1290,9 @@ void BLI_pbvh_get_grid_updates(PBVH *bvh, int clear, void ***gridfaces, int *tot
for (hiter = BLI_ghashIterator_new(map), i = 0;
!BLI_ghashIterator_isDone(hiter);
BLI_ghashIterator_step(hiter), ++i)
+ {
faces[i]= BLI_ghashIterator_getKey(hiter);
+ }
BLI_ghashIterator_free(hiter);
@@ -1345,7 +1347,7 @@ void BLI_pbvh_node_num_verts(PBVH *bvh, PBVHNode *node, int *uniquevert, int *to
{
int tot;
- switch(bvh->type) {
+ switch (bvh->type) {
case PBVH_GRIDS:
tot= node->totprim*bvh->gridsize*bvh->gridsize;
if (totvert) *totvert= tot;
@@ -1360,7 +1362,7 @@ void BLI_pbvh_node_num_verts(PBVH *bvh, PBVHNode *node, int *uniquevert, int *to
void BLI_pbvh_node_get_grids(PBVH *bvh, PBVHNode *node, int **grid_indices, int *totgrid, int *maxgrid, int *gridsize, DMGridData ***griddata, DMGridAdjacency **gridadj)
{
- switch(bvh->type) {
+ switch (bvh->type) {
case PBVH_GRIDS:
if (grid_indices) *grid_indices= node->prim_indices;
if (totgrid) *totgrid= node->totprim;
@@ -1504,7 +1506,7 @@ int BLI_pbvh_node_raycast(PBVH *bvh, PBVHNode *node, float (*origco)[3],
if (node->flag & PBVH_FullyHidden)
return 0;
- switch(bvh->type) {
+ switch (bvh->type) {
case PBVH_FACES:
vert = bvh->verts;
faces= node->prim_indices;
@@ -1741,7 +1743,7 @@ void BLI_pbvh_apply_vertCos(PBVH *pbvh, float (*vertCos)[3])
}
/* coordinates are new -- normals should also be updated */
- mesh_calc_normals_tessface(pbvh->verts, pbvh->totvert, pbvh->faces, pbvh->totprim, NULL);
+ BKE_mesh_calc_normals_tessface(pbvh->verts, pbvh->totvert, pbvh->faces, pbvh->totprim, NULL);
for (a= 0; a < pbvh->totnode; ++a)
BLI_pbvh_node_mark_update(&pbvh->nodes[a]);
diff --git a/source/blender/blenlib/intern/scanfill.c b/source/blender/blenlib/intern/scanfill.c
index 25850e14ae7..503de31616a 100644
--- a/source/blender/blenlib/intern/scanfill.c
+++ b/source/blender/blenlib/intern/scanfill.c
@@ -99,7 +99,7 @@ typedef struct ScanFillVertLink {
#define SF_VERT_ZERO_LEN 255
/* Optionally set ScanFillEdge f to this to mark original boundary edges.
- * Only needed if there are internal diagonal edges passed to BLI_edgefill. */
+ * Only needed if there are internal diagonal edges passed to BLI_scanfill_calc. */
#define SF_EDGE_BOUNDARY 1
#define SF_EDGE_UNKNOWN 2 /* TODO, what is this for exactly? - need to document it! */
@@ -191,7 +191,7 @@ static void mem_element_reset(ScanFillContext *sf_ctx, int keep_first)
sf_ctx->melem__offs = 0;
}
-void BLI_end_edgefill(ScanFillContext *sf_ctx)
+void BLI_scanfill_end(ScanFillContext *sf_ctx)
{
mem_element_reset(sf_ctx, FALSE);
@@ -202,7 +202,7 @@ void BLI_end_edgefill(ScanFillContext *sf_ctx)
/* **** FILL ROUTINES *************************** */
-ScanFillVert *BLI_addfillvert(ScanFillContext *sf_ctx, const float vec[3])
+ScanFillVert *BLI_scanfill_vert_add(ScanFillContext *sf_ctx, const float vec[3])
{
ScanFillVert *eve;
@@ -214,7 +214,7 @@ ScanFillVert *BLI_addfillvert(ScanFillContext *sf_ctx, const float vec[3])
return eve;
}
-ScanFillEdge *BLI_addfilledge(ScanFillContext *sf_ctx, ScanFillVert *v1, ScanFillVert *v2)
+ScanFillEdge *BLI_scanfill_edge_add(ScanFillContext *sf_ctx, ScanFillVert *v1, ScanFillVert *v2)
{
ScanFillEdge *newed;
@@ -453,7 +453,7 @@ static void testvertexnearedge(ScanFillContext *sf_ctx)
const float dist = dist_to_line_v2(eed->v1->xy, eed->v2->xy, eve->xy);
if (dist < SF_EPSILON) {
/* new edge */
- ed1 = BLI_addfilledge(sf_ctx, eed->v1, eve);
+ ed1 = BLI_scanfill_edge_add(sf_ctx, eed->v1, eve);
/* printf("fill: vertex near edge %x\n",eve); */
ed1->f = 0;
@@ -681,7 +681,7 @@ static int scanfill(ScanFillContext *sf_ctx, PolyFill *pf)
/* make new edge, and start over */
/* printf("add new edge %x %x and start again\n",v2,sc1->v1); */
- ed3 = BLI_addfilledge(sf_ctx, v2, sc1->v1);
+ ed3 = BLI_scanfill_edge_add(sf_ctx, v2, sc1->v1);
BLI_remlink(&sf_ctx->filledgebase, ed3);
BLI_insertlinkbefore((ListBase *)&(sc->first), ed2, ed3);
ed3->v2->f = SF_VERT_UNKNOWN;
@@ -709,7 +709,7 @@ static int scanfill(ScanFillContext *sf_ctx, PolyFill *pf)
}
/* new edge */
- ed3 = BLI_addfilledge(sf_ctx, v1, v3);
+ ed3 = BLI_scanfill_edge_add(sf_ctx, v1, v3);
BLI_remlink(&sf_ctx->filledgebase, ed3);
ed3->f = SF_EDGE_UNKNOWN;
ed3->v1->h++;
@@ -764,19 +764,19 @@ static int scanfill(ScanFillContext *sf_ctx, PolyFill *pf)
}
-int BLI_begin_edgefill(ScanFillContext *sf_ctx)
+int BLI_scanfill_begin(ScanFillContext *sf_ctx)
{
memset(sf_ctx, 0, sizeof(*sf_ctx));
return 1;
}
-int BLI_edgefill(ScanFillContext *sf_ctx, const short do_quad_tri_speedup)
+int BLI_scanfill_calc(ScanFillContext *sf_ctx, const short do_quad_tri_speedup)
{
- return BLI_edgefill_ex(sf_ctx, do_quad_tri_speedup, NULL);
+ return BLI_scanfill_calc_ex(sf_ctx, do_quad_tri_speedup, NULL);
}
-int BLI_edgefill_ex(ScanFillContext *sf_ctx, const short do_quad_tri_speedup, const float nor_proj[3])
+int BLI_scanfill_calc_ex(ScanFillContext *sf_ctx, const short do_quad_tri_speedup, const float nor_proj[3])
{
/*
* - fill works with its own lists, so create that first (no faces!)
diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c
index 1c55d5b5a39..047463f1e26 100644
--- a/source/blender/blenlib/intern/storage.c
+++ b/source/blender/blenlib/intern/storage.c
@@ -95,7 +95,7 @@
#include "BKE_utildefines.h"
/* vars: */
-static int totnum,actnum;
+static int totnum, actnum;
static struct direntry *files;
static struct ListBase dirbase_={NULL, NULL};
@@ -139,7 +139,7 @@ static int bli_compare(struct direntry *entry1, struct direntry *entry2)
if ( strcmp(entry1->relname, "..")==0 ) return (-1);
if ( strcmp(entry2->relname, "..")==0 ) return (1);
- return (BLI_natstrcmp(entry1->relname,entry2->relname));
+ return (BLI_natstrcmp(entry1->relname, entry2->relname));
}
@@ -161,7 +161,7 @@ double BLI_dir_free_space(const char *dir)
tmp[3]=0;
}
- GetDiskFreeSpace(tmp,&sectorspc, &bytesps, &freec, &clusters);
+ GetDiskFreeSpace(tmp, &sectorspc, &bytesps, &freec, &clusters);
return (double) (freec*bytesps*sectorspc);
#else
@@ -171,19 +171,19 @@ double BLI_dir_free_space(const char *dir)
#else
struct statfs disk;
#endif
- char name[FILE_MAXDIR],*slash;
+ char name[FILE_MAXDIR], *slash;
int len = strlen(dir);
if (len >= FILE_MAXDIR) /* path too long */
return -1;
- strcpy(name,dir);
+ strcpy(name, dir);
if (len) {
- slash = strrchr(name,'/');
+ slash = strrchr(name, '/');
if (slash) slash[1] = 0;
}
- else strcpy(name,"/");
+ else strcpy(name, "/");
#if defined (__FreeBSD__) || defined (linux) || defined (__OpenBSD__) || defined (__APPLE__) || defined(__GNU__) || defined(__GLIBC__)
if (statfs(name, &disk)) return(-1);
@@ -234,9 +234,9 @@ static void bli_builddir(const char *dirname, const char *relname)
while ((fname = (struct dirent*) readdir(dir)) != NULL) {
dlink = (struct dirlink *)malloc(sizeof(struct dirlink));
if (dlink) {
- BLI_strncpy(buf + rellen ,fname->d_name, sizeof(buf) - rellen);
+ BLI_strncpy(buf + rellen, fname->d_name, sizeof(buf) - rellen);
dlink->name = BLI_strdup(buf);
- BLI_addhead(dirbase,dlink);
+ BLI_addhead(dirbase, dlink);
newnum++;
}
}
@@ -260,22 +260,22 @@ static void bli_builddir(const char *dirname, const char *relname)
if (files) {
dlink = (struct dirlink *) dirbase->first;
while (dlink) {
- memset(&files[actnum], 0 , sizeof(struct direntry));
+ memset(&files[actnum], 0, sizeof(struct direntry));
files[actnum].relname = dlink->name;
files[actnum].path = BLI_strdupcat(dirname, dlink->name);
// use 64 bit file size, only needed for WIN32 and WIN64.
// Excluding other than current MSVC compiler until able to test
#ifdef WIN32
- {wchar_t * name_16 = alloc_utf16_from_8(dlink->name,0);
+ {wchar_t * name_16 = alloc_utf16_from_8(dlink->name, 0);
#if (defined(WIN32) || defined(WIN64)) && (_MSC_VER>=1500)
- _wstat64(name_16,&files[actnum].s);
+ _wstat64(name_16, &files[actnum].s);
#elif defined(__MINGW32__)
- _stati64(dlink->name,&files[actnum].s);
+ _stati64(dlink->name, &files[actnum].s);
#endif
free(name_16);};
#else
- stat(dlink->name,&files[actnum].s);
+ stat(dlink->name, &files[actnum].s);
#endif
files[actnum].type=files[actnum].s.st_mode;
files[actnum].flags = 0;
@@ -290,16 +290,16 @@ static void bli_builddir(const char *dirname, const char *relname)
}
BLI_freelist(dirbase);
- if (files) qsort(files, actnum, sizeof(struct direntry), (int (*)(const void *,const void*))bli_compare);
+ if (files) qsort(files, actnum, sizeof(struct direntry), (int (*)(const void *, const void*))bli_compare);
}
else {
- printf("%s empty directory\n",dirname);
+ printf("%s empty directory\n", dirname);
}
closedir(dir);
}
else {
- printf("%s non-existant directory\n",dirname);
+ printf("%s non-existant directory\n", dirname);
}
}
@@ -349,7 +349,7 @@ static void bli_adddirstrings(void)
#endif
#ifdef WIN32
- strcpy(file->owner,"user");
+ strcpy(file->owner, "user");
#else
{
struct passwd *pwuser;
@@ -426,7 +426,7 @@ unsigned int BLI_dir_contents(const char *dirname, struct direntry **filelist)
actnum = totnum = 0;
files = NULL;
- bli_builddir(dirname,"");
+ bli_builddir(dirname, "");
bli_adddirstrings();
if (files) {
@@ -488,11 +488,28 @@ int BLI_exists(const char *name)
if (res == -1) return(0);
#else
struct stat st;
- if (stat(name,&st)) return(0);
+ if (stat(name, &st)) return(0);
#endif
return(st.st_mode);
}
+
+#ifdef WIN32
+int BLI_stat(const char *path, struct stat *buffer)
+{
+ int r;
+ UTF16_ENCODE(path);
+ r=_wstat(path_16,buffer);
+ UTF16_UN_ENCODE(path);
+ return r;
+}
+#else
+int BLI_stat(const char *path, struct stat *buffer)
+{
+ return stat(path, buffer);
+}
+#endif
+
/* would be better in fileops.c except that it needs stat.h so add here */
int BLI_is_dir(const char *file)
{
diff --git a/source/blender/blenlib/intern/string.c b/source/blender/blenlib/intern/string.c
index 4c92a872ed7..d880b895ced 100644
--- a/source/blender/blenlib/intern/string.c
+++ b/source/blender/blenlib/intern/string.c
@@ -125,7 +125,7 @@ size_t BLI_strescape(char *dst, const char *src, const size_t maxlen)
{
size_t len= 0;
while (len < maxlen) {
- switch(*src) {
+ switch (*src) {
case '\0':
goto escape_finish;
case '\\':
@@ -391,10 +391,10 @@ void BLI_timestr(double _time, char *str)
int hun= ( (int) (_time * 100.0)) % 100;
if (hr) {
- sprintf(str, "%.2d:%.2d:%.2d.%.2d",hr,min,sec,hun);
+ sprintf(str, "%.2d:%.2d:%.2d.%.2d", hr, min, sec, hun);
}
else {
- sprintf(str, "%.2d:%.2d.%.2d",min,sec,hun);
+ sprintf(str, "%.2d:%.2d.%.2d", min, sec, hun);
}
str[11]=0;
diff --git a/source/blender/blenlib/intern/string_cursor_utf8.c b/source/blender/blenlib/intern/string_cursor_utf8.c
index 97559d6ba10..422a600e51c 100644
--- a/source/blender/blenlib/intern/string_cursor_utf8.c
+++ b/source/blender/blenlib/intern/string_cursor_utf8.c
@@ -93,6 +93,7 @@ static strCursorDelimType test_special_char(const char *ch_utf8)
return STRCUR_DELIM_QUOTE;
case ' ':
+ case '\t':
return STRCUR_DELIM_WHITESPACE;
case '\\':
diff --git a/source/blender/blenlib/intern/string_utf8.c b/source/blender/blenlib/intern/string_utf8.c
index aede08be7f9..77bebfaf2e8 100644
--- a/source/blender/blenlib/intern/string_utf8.c
+++ b/source/blender/blenlib/intern/string_utf8.c
@@ -46,14 +46,14 @@
* it's hard to know how many characters there are! */
static const char trailingBytesForUTF8[256] = {
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
- 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5
};
int BLI_utf8_invalid_byte(const char *str, int length)
@@ -153,14 +153,14 @@ int BLI_utf8_invalid_strip(char *str, int length)
* note: this looks to be at odd's with 'trailingBytesForUTF8',
* need to find out what gives here! - campbell */
static const size_t utf8_skip_data[256] = {
- 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
- 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
- 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
- 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
- 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
- 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
- 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
- 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,6,6,1,1
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 1, 1
};
#define BLI_STR_UTF8_CPY(dst, src, maxncpy) \
@@ -168,7 +168,7 @@ static const size_t utf8_skip_data[256] = {
size_t utf8_size; \
while (*src != '\0' && (utf8_size= utf8_skip_data[*src]) < maxncpy) { \
maxncpy -= utf8_size; \
- switch(utf8_size) { \
+ switch (utf8_size) { \
case 6: *dst ++ = *src ++; \
case 5: *dst ++ = *src ++; \
case 4: *dst ++ = *src ++; \
diff --git a/source/blender/blenlib/intern/threads.c b/source/blender/blenlib/intern/threads.c
index 05d8ded7764..448f1c1b408 100644
--- a/source/blender/blenlib/intern/threads.c
+++ b/source/blender/blenlib/intern/threads.c
@@ -1,6 +1,4 @@
/*
- *
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -304,7 +302,7 @@ void BLI_end_threads(ListBase *threadbase)
/* System Information */
/* how many threads are native on this system? */
-int BLI_system_thread_count( void )
+int BLI_system_thread_count(void)
{
int t;
#ifdef WIN32
diff --git a/source/blender/blenlib/intern/uvproject.c b/source/blender/blenlib/intern/uvproject.c
index 89621cdf48d..a630084e79d 100644
--- a/source/blender/blenlib/intern/uvproject.c
+++ b/source/blender/blenlib/intern/uvproject.c
@@ -32,7 +32,7 @@
#include "BLI_math.h"
#include "BLI_uvproject.h"
-typedef struct UvCameraInfo {
+typedef struct ProjCameraInfo {
float camangle;
float camsize;
float xasp, yasp;
@@ -40,9 +40,9 @@ typedef struct UvCameraInfo {
float rotmat[4][4];
float caminv[4][4];
short do_persp, do_pano, do_rotmat;
-} UvCameraInfo;
+} ProjCameraInfo;
-void project_from_camera(float target[2], float source[3], UvCameraInfo *uci)
+void BLI_uvproject_from_camera(float target[2], float source[3], ProjCameraInfo *uci)
{
float pv4[4];
@@ -93,7 +93,7 @@ void project_from_camera(float target[2], float source[3], UvCameraInfo *uci)
}
/* could rv3d->persmat */
-void project_from_view(float target[2], float source[3], float persmat[4][4], float rotmat[4][4], float winx, float winy)
+void BLI_uvproject_from_view(float target[2], float source[3], float persmat[4][4], float rotmat[4][4], float winx, float winy)
{
float pv[3], pv4[4], x = 0.0, y = 0.0;
@@ -133,12 +133,12 @@ void project_from_view(float target[2], float source[3], float persmat[4][4], fl
/* 'rotmat' can be obedit->obmat when uv project is used.
* 'winx' and 'winy' can be from scene->r.xsch/ysch */
-UvCameraInfo *project_camera_info(Object *ob, float(*rotmat)[4], float winx, float winy)
+ProjCameraInfo *BLI_uvproject_camera_info(Object *ob, float(*rotmat)[4], float winx, float winy)
{
- UvCameraInfo uci;
+ ProjCameraInfo uci;
Camera *camera = ob->data;
- uci.do_pano = (camera->flag & CAM_PANORAMA);
+ uci.do_pano = (camera->type == CAM_PANO);
uci.do_persp = (camera->type == CAM_PERSP);
uci.camangle = focallength_to_fov(camera->lens, camera->sensor_x) / 2.0f;
@@ -149,7 +149,7 @@ UvCameraInfo *project_camera_info(Object *ob, float(*rotmat)[4], float winx, flo
normalize_m4(uci.caminv);
if (invert_m4(uci.caminv)) {
- UvCameraInfo *uci_pt;
+ ProjCameraInfo *uci_pt;
/* normal projection */
if (rotmat) {
@@ -174,7 +174,7 @@ UvCameraInfo *project_camera_info(Object *ob, float(*rotmat)[4], float winx, flo
uci.shiftx = 0.5f - (camera->shiftx * uci.xasp);
uci.shifty = 0.5f - (camera->shifty * uci.yasp);
- uci_pt = MEM_mallocN(sizeof(UvCameraInfo), "UvCameraInfo");
+ uci_pt = MEM_mallocN(sizeof(ProjCameraInfo), "ProjCameraInfo");
*uci_pt = uci;
return uci_pt;
}
@@ -182,7 +182,7 @@ UvCameraInfo *project_camera_info(Object *ob, float(*rotmat)[4], float winx, flo
return NULL;
}
-void project_from_view_ortho(float target[2], float source[3], float rotmat[4][4])
+void BLI_uvproject_from_view_ortho(float target[2], float source[3], float rotmat[4][4])
{
float pv[3];
@@ -193,7 +193,7 @@ void project_from_view_ortho(float target[2], float source[3], float rotmat[4][4
target[1] = pv[2];
}
-void project_camera_info_scale(UvCameraInfo *uci, float scale_x, float scale_y)
+void BLI_uvproject_camera_info_scale(ProjCameraInfo *uci, float scale_x, float scale_y)
{
uci->xasp *= scale_x;
uci->yasp *= scale_y;
diff --git a/source/blender/blenlib/intern/voxel.c b/source/blender/blenlib/intern/voxel.c
index 34862c724e1..3ad9edd14a3 100644
--- a/source/blender/blenlib/intern/voxel.c
+++ b/source/blender/blenlib/intern/voxel.c
@@ -37,15 +37,15 @@
BLI_INLINE float D(float *data, const int res[3], int x, int y, int z)
{
- CLAMP(x, 0, res[0]-1);
- CLAMP(y, 0, res[1]-1);
- CLAMP(z, 0, res[2]-1);
- return data[ V_I(x, y, z, res) ];
+ CLAMP(x, 0, res[0] - 1);
+ CLAMP(y, 0, res[1] - 1);
+ CLAMP(z, 0, res[2] - 1);
+ return data[ BLI_VOXEL_INDEX(x, y, z, res) ];
}
/* *** nearest neighbor *** */
/* input coordinates must be in bounding box 0.0 - 1.0 */
-float voxel_sample_nearest(float *data, const int res[3], const float co[3])
+float BLI_voxel_sample_nearest(float *data, const int res[3], const float co[3])
{
int xi, yi, zi;
@@ -70,7 +70,7 @@ BLI_INLINE int _clamp(int a, int b, int c)
return (a < b) ? b : ((a > c) ? c : a);
}
-float voxel_sample_trilinear(float *data, const int res[3], const float co[3])
+float BLI_voxel_sample_trilinear(float *data, const int res[3], const float co[3])
{
if (data) {
@@ -102,7 +102,7 @@ float voxel_sample_trilinear(float *data, const int res[3], const float co[3])
}
-float voxel_sample_triquadratic(float *data, const int res[3], const float co[3])
+float BLI_voxel_sample_triquadratic(float *data, const int res[3], const float co[3])
{
if (data) {
@@ -132,7 +132,7 @@ float voxel_sample_triquadratic(float *data, const int res[3], const float co[3]
return 0.f;
}
-float voxel_sample_tricubic(float *data, const int res[3], const float co[3], int bspline)
+float BLI_voxel_sample_tricubic(float *data, const int res[3], const float co[3], int bspline)
{
if (data) {
diff --git a/source/blender/blenlib/intern/winstuff.c b/source/blender/blenlib/intern/winstuff.c
index f3cb0dd6f84..d853e398adc 100644
--- a/source/blender/blenlib/intern/winstuff.c
+++ b/source/blender/blenlib/intern/winstuff.c
@@ -58,12 +58,12 @@ int BLI_getInstallationDir(char * str)
char dir[FILE_MAXDIR];
int a;
/*change to utf support*/
- GetModuleFileName(NULL,str,FILE_MAX);
+ GetModuleFileName(NULL, str, FILE_MAX);
BLI_split_dir_part(str, dir, sizeof(dir)); /* shouldn't be relative */
a = strlen(dir);
if (dir[a-1] == '\\') dir[a-1]=0;
- strcpy(str,dir);
+ strcpy(str, dir);
return 1;
}
@@ -74,8 +74,8 @@ void RegisterBlendExtension_Fail(HKEY root)
if (root)
RegCloseKey(root);
if (!G.background)
- MessageBox(0,"Could not register file extension.","Blender error",MB_OK|MB_ICONERROR);
- TerminateProcess(GetCurrentProcess(),1);
+ MessageBox(0, "Could not register file extension.", "Blender error", MB_OK|MB_ICONERROR);
+ TerminateProcess(GetCurrentProcess(), 1);
}
void RegisterBlendExtension(void)
@@ -90,13 +90,13 @@ void RegisterBlendExtension(void)
char BlPath[MAX_PATH];
char InstallDir[FILE_MAXDIR];
char SysDir[FILE_MAXDIR];
- const char *ThumbHandlerDLL;
+ const char *ThumbHandlerDLL;
char RegCmd[MAX_PATH*2];
char MBox[256];
BOOL IsWOW64;
printf("Registering file extension...");
- GetModuleFileName(0,BlPath,MAX_PATH);
+ GetModuleFileName(0, BlPath, MAX_PATH);
// root is HKLM by default
lresult = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Classes", 0, KEY_ALL_ACCESS, &root);
@@ -111,7 +111,7 @@ void RegisterBlendExtension(void)
lresult = RegCreateKeyEx(root, "blendfile", 0,
NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hkey, &dwd);
if (lresult == ERROR_SUCCESS) {
- strcpy(buffer,"Blender File");
+ strcpy(buffer, "Blender File");
lresult = RegSetValueEx(hkey, NULL, 0, REG_SZ, (BYTE*)buffer, strlen(buffer) + 1);
RegCloseKey(hkey);
}
@@ -131,7 +131,7 @@ void RegisterBlendExtension(void)
lresult = RegCreateKeyEx(root, "blendfile\\DefaultIcon", 0,
NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hkey, &dwd);
if (lresult == ERROR_SUCCESS) {
- sprintf(buffer, "\"%s\",1", BlPath);
+ sprintf(buffer, "\"%s\", 1", BlPath);
lresult = RegSetValueEx(hkey, NULL, 0, REG_SZ, (BYTE*)buffer, strlen(buffer) + 1);
RegCloseKey(hkey);
}
@@ -149,37 +149,37 @@ void RegisterBlendExtension(void)
RegisterBlendExtension_Fail(root);
BLI_getInstallationDir(InstallDir);
- GetSystemDirectory(SysDir,FILE_MAXDIR);
+ GetSystemDirectory(SysDir, FILE_MAXDIR);
#ifdef WIN64
ThumbHandlerDLL = "BlendThumb64.dll";
#else
- IsWow64Process(GetCurrentProcess(),&IsWOW64);
+ IsWow64Process(GetCurrentProcess(), &IsWOW64);
if (IsWOW64 == TRUE)
ThumbHandlerDLL = "BlendThumb64.dll";
else
ThumbHandlerDLL = "BlendThumb.dll";
#endif
- snprintf(RegCmd,MAX_PATH*2,"%s\\regsvr32 /s \"%s\\%s\"",SysDir,InstallDir,ThumbHandlerDLL);
+ snprintf(RegCmd, MAX_PATH*2, "%s\\regsvr32 /s \"%s\\%s\"", SysDir, InstallDir, ThumbHandlerDLL);
system(RegCmd);
RegCloseKey(root);
- printf("success (%s)\n",usr_mode ? "user" : "system");
+ printf("success (%s)\n", usr_mode ? "user" : "system");
if (!G.background) {
- sprintf(MBox,"File extension registered for %s.",usr_mode ? "the current user. To register for all users, run as an administrator" : "all users");
- MessageBox(0,MBox,"Blender",MB_OK|MB_ICONINFORMATION);
+ sprintf(MBox, "File extension registered for %s.", usr_mode ? "the current user. To register for all users, run as an administrator" : "all users");
+ MessageBox(0, MBox, "Blender", MB_OK|MB_ICONINFORMATION);
}
- TerminateProcess(GetCurrentProcess(),0);
+ TerminateProcess(GetCurrentProcess(), 0);
}
DIR *opendir (const char *path)
{
- wchar_t *path_16 = alloc_utf16_from_8(path, 0);
+ wchar_t *path_16 = alloc_utf16_from_8(path, 0);
if (GetFileAttributesW(path_16) & FILE_ATTRIBUTE_DIRECTORY) {
DIR *newd= MEM_mallocN(sizeof(DIR), "opendir");
newd->handle = INVALID_HANDLE_VALUE;
- sprintf(newd->path, "%s\\*",path);
+ sprintf(newd->path, "%s\\*", path);
newd->direntry.d_ino= 0;
newd->direntry.d_off= 0;
@@ -198,20 +198,20 @@ DIR *opendir (const char *path)
static char *BLI_alloc_utf_8_from_16(wchar_t *in16, size_t add)
{
size_t bsize = count_utf_8_from_16(in16);
- char *out8 = NULL;
+ char *out8 = NULL;
if (!bsize) return NULL;
- out8 = (char*)MEM_mallocN(sizeof(char) * (bsize + add),"UTF-8 String");
- conv_utf_16_to_8(in16,out8, bsize);
+ out8 = (char*)MEM_mallocN(sizeof(char) * (bsize + add), "UTF-8 String");
+ conv_utf_16_to_8(in16, out8, bsize);
return out8;
}
static wchar_t *UNUSED_FUNCTION(BLI_alloc_utf16_from_8)(char *in8, size_t add)
{
size_t bsize = count_utf_16_from_8(in8);
- wchar_t *out16 = NULL;
+ wchar_t *out16 = NULL;
if (!bsize) return NULL;
out16 =(wchar_t*) MEM_mallocN(sizeof(wchar_t) * (bsize + add), "UTF-16 String");
- conv_utf_8_to_16(in8,out16, bsize);
+ conv_utf_8_to_16(in8, out16, bsize);
return out16;
}
@@ -236,7 +236,7 @@ struct dirent *readdir(DIR *dp)
return &dp->direntry;
}
else if (FindNextFileW (dp->handle, &(dp->data))) {
- dp->direntry.d_name= BLI_alloc_utf_8_from_16(dp->data.cFileName,0);
+ dp->direntry.d_name= BLI_alloc_utf_8_from_16(dp->data.cFileName, 0);
return &dp->direntry;
}
@@ -245,7 +245,7 @@ struct dirent *readdir(DIR *dp)
}
}
-int closedir (DIR *dp)
+int closedir(DIR *dp)
{
if (dp->direntry.d_name) MEM_freeN(dp->direntry.d_name);
if (dp->handle!=INVALID_HANDLE_VALUE) FindClose(dp->handle);
@@ -262,7 +262,7 @@ void get_default_root(char *root)
/* the default drive to resolve a directory without a specified drive
* should be the Windows installation drive, since this was what the OS
* assumes. */
- if (GetWindowsDirectory(str,MAX_PATH+1)) {
+ if (GetWindowsDirectory(str, MAX_PATH+1)) {
root[0] = str[0];
root[1] = ':';
root[2] = '\\';
@@ -271,7 +271,7 @@ void get_default_root(char *root)
else {
/* if GetWindowsDirectory fails, something has probably gone wrong,
* we are trying the blender install dir though */
- if (GetModuleFileName(NULL,str,MAX_PATH+1)) {
+ if (GetModuleFileName(NULL, str, MAX_PATH+1)) {
printf("Error! Could not get the Windows Directory - Defaulting to Blender installation Dir!");
root[0] = str[0];
root[1] = ':';
diff --git a/source/blender/blenloader/CMakeLists.txt b/source/blender/blenloader/CMakeLists.txt
index 35271f7b873..a0fe042e7fb 100644
--- a/source/blender/blenloader/CMakeLists.txt
+++ b/source/blender/blenloader/CMakeLists.txt
@@ -44,6 +44,8 @@ set(SRC
intern/readfile.c
intern/runtime.c
intern/undofile.c
+ intern/versioning_250.c
+ intern/versioning_legacy.c
intern/writefile.c
BLO_readfile.h
diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c
index 49990a953f6..8f3131c733a 100644
--- a/source/blender/blenloader/intern/readblenentry.c
+++ b/source/blender/blenloader/intern/readblenentry.c
@@ -156,8 +156,7 @@ LinkNode *BLO_blendhandle_get_previews(BlendHandle *bh, int ofblocktype, int *to
for (bhead= blo_firstbhead(fd); bhead; bhead= blo_nextbhead(fd, bhead)) {
if (bhead->code==ofblocktype) {
char *idname= bhead_id_name(fd, bhead);
- switch(GS(idname))
- {
+ switch (GS(idname)) {
case ID_MA: /* fall through */
case ID_TE: /* fall through */
case ID_IM: /* fall through */
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index d2f6100517a..8c8066e9bd0 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -77,6 +77,7 @@
#include "DNA_nla_types.h"
#include "DNA_node_types.h"
#include "DNA_object_fluidsim.h" // NT
+#include "DNA_object_types.h"
#include "DNA_packedFile_types.h"
#include "DNA_particle_types.h"
#include "DNA_property_types.h"
@@ -327,6 +328,11 @@ static void oldnewmap_insert(OldNewMap *onm, void *oldaddr, void *newaddr, int n
entry->nr= nr;
}
+void blo_do_versions_oldnewmap_insert(OldNewMap *onm, void *oldaddr, void *newaddr, int nr)
+{
+ oldnewmap_insert(onm, oldaddr, newaddr, nr);
+}
+
static void *oldnewmap_lookup_and_inc(OldNewMap *onm, void *addr)
{
int i;
@@ -552,7 +558,7 @@ static Main *blo_find_main(FileData *fd, ListBase *mainlist, const char *filepat
m= MEM_callocN(sizeof(Main), "find_main");
BLI_addtail(mainlist, m);
- lib= alloc_libblock(&m->library, ID_LI, "lib");
+ lib= BKE_libblock_alloc(&m->library, ID_LI, "lib");
BLI_strncpy(lib->name, filepath, sizeof(lib->name));
BLI_strncpy(lib->filepath, name1, sizeof(lib->filepath));
@@ -1061,8 +1067,7 @@ void blo_freefiledata(FileData *fd)
close(fd->filedes);
}
- if (fd->gzfiledes != NULL)
- {
+ if (fd->gzfiledes != NULL) {
gzclose(fd->gzfiledes);
}
@@ -1177,6 +1182,11 @@ static void *newlibadr(FileData *fd, void *lib, void *adr) /* only lib data */
return oldnewmap_liblookup(fd->libmap, adr, lib);
}
+void *blo_do_versions_newlibadr(FileData *fd, void *lib, void *adr) /* only lib data */
+{
+ return newlibadr(fd, lib, adr);
+}
+
static void *newlibadr_us(FileData *fd, void *lib, void *adr) /* increases user number */
{
ID *id= newlibadr(fd, lib, adr);
@@ -1187,6 +1197,11 @@ static void *newlibadr_us(FileData *fd, void *lib, void *adr) /* increases user
return id;
}
+void *blo_do_versions_newlibadr_us(FileData *fd, void *lib, void *adr) /* increases user number */
+{
+ return newlibadr_us(fd, lib, adr);
+}
+
static void change_idid_adr_fd(FileData *fd, void *old, void *new)
{
int i;
@@ -1477,7 +1492,7 @@ static void test_pointer_array(FileData *fd, void **mat)
len= MEM_allocN_len(*mat)/fd->filesdna->pointerlen;
if (fd->filesdna->pointerlen==8 && fd->memsdna->pointerlen==4) {
- ipoin=imat= MEM_mallocN( len*4, "newmatar");
+ ipoin=imat= MEM_mallocN(len*4, "newmatar");
lpoin= *mat;
while (len-- > 0) {
@@ -1492,7 +1507,7 @@ static void test_pointer_array(FileData *fd, void **mat)
}
if (fd->filesdna->pointerlen==4 && fd->memsdna->pointerlen==8) {
- lpoin=lmat= MEM_mallocN( len*8, "newmatar");
+ lpoin=lmat= MEM_mallocN(len*8, "newmatar");
ipoin= *mat;
while (len-- > 0) {
@@ -1670,7 +1685,7 @@ static void direct_link_brush(FileData *fd, Brush *brush)
if (brush->curve)
direct_link_curvemapping(fd, brush->curve);
else
- brush_curve_preset(brush, CURVE_PRESET_SHARP);
+ BKE_brush_curve_preset(brush, CURVE_PRESET_SHARP);
brush->preview= NULL;
brush->icon_imbuf= NULL;
@@ -2202,7 +2217,7 @@ static void do_versions_socket_default_value(bNodeSocket *sock)
}
}
-static void do_versions_nodetree_default_value(bNodeTree *ntree)
+void blo_do_versions_nodetree_default_value(bNodeTree *ntree)
{
bNode *node;
bNodeSocket *sock;
@@ -2225,7 +2240,7 @@ static void lib_nodetree_init_types_cb(void *UNUSED(data), ID *UNUSED(id), bNode
ntreeInitTypes(ntree);
/* need to do this here instead of in do_versions, otherwise next function can crash */
- do_versions_nodetree_default_value(ntree);
+ blo_do_versions_nodetree_default_value(ntree);
/* XXX could be replaced by do_versions for new nodes */
for (node=ntree->nodes.first; node; node=node->next)
@@ -2458,10 +2473,19 @@ typedef struct tConstraintLinkData {
ID *id;
} tConstraintLinkData;
/* callback function used to relink constraint ID-links */
-static void lib_link_constraint_cb(bConstraint *UNUSED(con), ID **idpoin, void *userdata)
+static void lib_link_constraint_cb(bConstraint *UNUSED(con), ID **idpoin, short isReference, void *userdata)
{
tConstraintLinkData *cld= (tConstraintLinkData *)userdata;
- *idpoin = newlibadr(cld->fd, cld->id->lib, *idpoin);
+
+ /* for reference types, we need to increment the usercounts on load... */
+ if (isReference) {
+ /* reference type - with usercount */
+ *idpoin = newlibadr_us(cld->fd, cld->id->lib, *idpoin);
+ }
+ else {
+ /* target type - no usercount needed */
+ *idpoin = newlibadr(cld->fd, cld->id->lib, *idpoin);
+ }
}
static void lib_link_constraints(FileData *fd, ID *id, ListBase *conlist)
@@ -2550,7 +2574,7 @@ static void lib_link_pose(FileData *fd, Object *ob, bPose *pose)
/* sync proxy active bone */
if (pose->proxy_act_bone[0]) {
- Bone *bone = get_named_bone(arm, pose->proxy_act_bone);
+ Bone *bone = BKE_armature_find_bone_name(arm, pose->proxy_act_bone);
if (bone)
arm->act_bone = bone;
}
@@ -2560,7 +2584,7 @@ static void lib_link_pose(FileData *fd, Object *ob, bPose *pose)
lib_link_constraints(fd, (ID *)ob, &pchan->constraints);
/* hurms... loop in a loop, but yah... later... (ton) */
- pchan->bone= get_named_bone(arm, pchan->name);
+ pchan->bone= BKE_armature_find_bone_name(arm, pchan->name);
pchan->custom= newlibadr_us(fd, arm->id.lib, pchan->custom);
if (pchan->bone==NULL)
@@ -2756,9 +2780,9 @@ static void switch_endian_keyblock(Key *key, KeyBlock *kb)
cp= key->elemstr;
poin= data;
- while ( cp[0] ) { /* cp[0]==amount */
+ while ( cp[0] ) { /* cp[0] == amount */
- switch(cp[1]) { /* cp[1]= type */
+ switch (cp[1]) { /* cp[1] = type */
case IPO_FLOAT:
case IPO_BPOINT:
case IPO_BEZTRIPLE:
@@ -2940,7 +2964,7 @@ static void direct_link_text(FileData *fd, Text *text)
#if 0
if (text->flags & TXT_ISEXT) {
- reopen_text(text);
+ BKE_text_reload(text);
}
else {
#endif
@@ -3442,7 +3466,7 @@ static void lib_link_particlesettings(FileData *fd, Main *main)
for (; state; state=state->next) {
rule = state->rules.first;
for (; rule; rule=rule->next)
- switch(rule->type) {
+ switch (rule->type) {
case eBoidRuleType_Goal:
case eBoidRuleType_Avoid:
{
@@ -3541,7 +3565,7 @@ static void lib_link_particlesystems(FileData *fd, Object *ob, ID *id, ListBase
}
else {
/* particle modifier must be removed before particle system */
- ParticleSystemModifierData *psmd= psys_get_modifier(ob,psys);
+ ParticleSystemModifierData *psmd= psys_get_modifier(ob, psys);
BLI_remlink(&ob->modifiers, psmd);
modifier_free((ModifierData *)psmd);
@@ -3557,15 +3581,15 @@ static void direct_link_particlesystems(FileData *fd, ListBase *particles)
int a;
for (psys=particles->first; psys; psys=psys->next) {
- psys->particles=newdataadr(fd,psys->particles);
+ psys->particles=newdataadr(fd, psys->particles);
if (psys->particles && psys->particles->hair) {
- for (a=0,pa=psys->particles; a<psys->totpart; a++, pa++)
- pa->hair=newdataadr(fd,pa->hair);
+ for (a=0, pa=psys->particles; a<psys->totpart; a++, pa++)
+ pa->hair=newdataadr(fd, pa->hair);
}
if (psys->particles && psys->particles->keys) {
- for (a=0,pa=psys->particles; a<psys->totpart; a++, pa++) {
+ for (a=0, pa=psys->particles; a<psys->totpart; a++, pa++) {
pa->keys= NULL;
pa->totkey= 0;
}
@@ -3576,17 +3600,17 @@ static void direct_link_particlesystems(FileData *fd, ListBase *particles)
if (psys->particles && psys->particles->boid) {
pa = psys->particles;
pa->boid = newdataadr(fd, pa->boid);
- for (a=1,pa++; a<psys->totpart; a++, pa++)
+ for (a=1, pa++; a<psys->totpart; a++, pa++)
pa->boid = (pa-1)->boid + 1;
}
else if (psys->particles) {
- for (a=0,pa=psys->particles; a<psys->totpart; a++, pa++)
+ for (a=0, pa=psys->particles; a<psys->totpart; a++, pa++)
pa->boid = NULL;
}
psys->fluid_springs = newdataadr(fd, psys->fluid_springs);
- psys->child = newdataadr(fd,psys->child);
+ psys->child = newdataadr(fd, psys->child);
psys->effectors = NULL;
link_list(fd, &psys->targets);
@@ -3785,7 +3809,7 @@ static void direct_link_mdisps(FileData *fd, int count, MDisps *mdisps, int exte
* overwritten with the correct value in
* bm_corners_to_loops() */
float gridsize = sqrtf(mdisps[i].totdisp);
- mdisps[i].level = (int)(logf(gridsize - 1.0f) / M_LN2) + 1;
+ mdisps[i].level = (int)(logf(gridsize - 1.0f) / (float)M_LN2) + 1;
}
if ( (fd->flags & FD_FLAGS_SWITCH_ENDIAN) && (mdisps[i].disps) ) {
@@ -3884,7 +3908,7 @@ static void direct_link_mesh(FileData *fd, Mesh *mesh)
if (mesh->mpoly) {
/* be clever and load polygons as mfaces */
- mesh->totface= mesh_mpoly_to_mface(&mesh->fdata, &mesh->ldata, &mesh->pdata,
+ mesh->totface= BKE_mesh_mpoly_to_mface(&mesh->fdata, &mesh->ldata, &mesh->pdata,
mesh->totface, mesh->totloop, mesh->totpoly);
CustomData_free(&mesh->pdata, mesh->totpoly);
@@ -4072,7 +4096,7 @@ static void lib_link_object(FileData *fd, Main *main)
warn= 1;
if (ob->pose) {
- free_pose(ob->pose);
+ BKE_pose_free(ob->pose);
ob->pose= NULL;
ob->mode &= ~OB_MODE_POSE;
}
@@ -4235,8 +4259,7 @@ static void lib_link_object(FileData *fd, Main *main)
{
SmokeModifierData *smd = (SmokeModifierData *)modifiers_findByType(ob, eModifierType_Smoke);
- if (smd && smd->type == MOD_SMOKE_TYPE_DOMAIN && smd->domain)
- {
+ if (smd && smd->type == MOD_SMOKE_TYPE_DOMAIN && smd->domain) {
smd->domain->flags |= MOD_SMOKE_FILE_LOAD; /* flag for refreshing the simulation after loading */
}
}
@@ -4359,8 +4382,7 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
else if (md->type==eModifierType_Smoke) {
SmokeModifierData *smd = (SmokeModifierData*) md;
- if (smd->type==MOD_SMOKE_TYPE_DOMAIN)
- {
+ if (smd->type==MOD_SMOKE_TYPE_DOMAIN) {
smd->flow = NULL;
smd->coll = NULL;
smd->domain = newdataadr(fd, smd->domain);
@@ -4405,8 +4427,7 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
smd->flow = NULL;
smd->domain = NULL;
smd->coll = newdataadr(fd, smd->coll);
- if (smd->coll)
- {
+ if (smd->coll) {
smd->coll->points = NULL;
smd->coll->numpoints = 0;
}
@@ -4418,8 +4439,7 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
else if (md->type==eModifierType_DynamicPaint) {
DynamicPaintModifierData *pmd = (DynamicPaintModifierData*) md;
- if (pmd->canvas)
- {
+ if (pmd->canvas) {
pmd->canvas = newdataadr(fd, pmd->canvas);
pmd->canvas->pmd = pmd;
pmd->canvas->dm = NULL;
@@ -4439,8 +4459,7 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
}
}
}
- if (pmd->brush)
- {
+ if (pmd->brush) {
pmd->brush = newdataadr(fd, pmd->brush);
pmd->brush->pmd = pmd;
pmd->brush->psys = newdataadr(fd, pmd->brush->psys);
@@ -4459,9 +4478,9 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
collmd->xnew = newdataadr(fd, collmd->xnew);
collmd->mfaces = newdataadr(fd, collmd->mfaces);
- collmd->current_x = MEM_callocN(sizeof(MVert)*collmd->numverts,"current_x");
- collmd->current_xnew = MEM_callocN(sizeof(MVert)*collmd->numverts,"current_xnew");
- collmd->current_v = MEM_callocN(sizeof(MVert)*collmd->numverts,"current_v");
+ collmd->current_x = MEM_callocN(sizeof(MVert)*collmd->numverts, "current_x");
+ collmd->current_xnew = MEM_callocN(sizeof(MVert)*collmd->numverts, "current_xnew");
+ collmd->current_v = MEM_callocN(sizeof(MVert)*collmd->numverts, "current_v");
*/
collmd->x = NULL;
@@ -4687,7 +4706,7 @@ static void direct_link_object(FileData *fd, Object *ob)
ob->fluidsimSettings= newdataadr(fd, ob->fluidsimSettings); /* NT */
link_list(fd, &ob->particlesystem);
- direct_link_particlesystems(fd,&ob->particlesystem);
+ direct_link_particlesystems(fd, &ob->particlesystem);
link_list(fd, &ob->prop);
prop= ob->prop.first;
@@ -4847,7 +4866,8 @@ static void lib_link_scene(FileData *fd, Main *main)
}
}
- SEQ_BEGIN(sce->ed, seq) {
+ SEQ_BEGIN (sce->ed, seq)
+ {
if (seq->ipo) seq->ipo= newlibadr_us(fd, sce->id.lib, seq->ipo);
seq->scene_sound = NULL;
if (seq->scene) {
@@ -4978,7 +4998,8 @@ static void direct_link_scene(FileData *fd, Scene *sce)
/* recursive link sequences, lb will be correctly initialized */
link_recurs_seq(fd, &ed->seqbase);
- SEQ_BEGIN(ed, seq) {
+ SEQ_BEGIN (ed, seq)
+ {
seq->seq1= newdataadr(fd, seq->seq1);
seq->seq2= newdataadr(fd, seq->seq2);
seq->seq3= newdataadr(fd, seq->seq3);
@@ -5395,6 +5416,7 @@ static void lib_link_screen(FileData *fd, Main *main)
sclip->clip= newlibadr_us(fd, sc->id.lib, sclip->clip);
sclip->scopes.track_preview = NULL;
+ sclip->draw_context = NULL;
sclip->scopes.ok = 0;
}
}
@@ -5715,7 +5737,7 @@ static void direct_link_region(FileData *fd, ARegion *ar, int spacetype)
/* for the saved 2.50 files without regiondata */
/* and as patch for 2.48 and older */
-static void view3d_split_250(View3D *v3d, ListBase *regions)
+void blo_do_versions_view3d_split_250(View3D *v3d, ListBase *regions)
{
ARegion *ar;
@@ -5801,7 +5823,7 @@ static void direct_link_screen(FileData *fd, bScreen *sc)
}
/* add local view3d too */
else if (sa->spacetype==SPACE_VIEW3D)
- view3d_split_250(sa->spacedata.first, &sa->regionbase);
+ blo_do_versions_view3d_split_250(sa->spacedata.first, &sa->regionbase);
for (sl= sa->spacedata.first; sl; sl= sl->next) {
link_list(fd, &(sl->regionbase));
@@ -5841,7 +5863,7 @@ static void direct_link_screen(FileData *fd, bScreen *sc)
if (v3d->drawtype == OB_RENDER)
v3d->drawtype = OB_WIRE;
- view3d_split_250(v3d, &sl->regionbase);
+ blo_do_versions_view3d_split_250(v3d, &sl->regionbase);
}
else if (sl->spacetype==SPACE_IPO) {
SpaceIpo *sipo= (SpaceIpo*)sl;
@@ -6089,8 +6111,7 @@ static void direct_link_sound(FileData *fd, bSound *sound)
sound->waveform = NULL;
// versioning stuff, if there was a cache, then we enable caching:
- if (sound->cache)
- {
+ if (sound->cache) {
sound->flags |= SOUND_FLAGS_CACHING;
sound->cache = NULL;
}
@@ -6199,6 +6220,9 @@ static void direct_link_movieclip(FileData *fd, MovieClip *clip)
clip->tracking.stabilization.scaleibuf= NULL;
clip->tracking.stabilization.rot_track= newdataadr(fd, clip->tracking.stabilization.rot_track);
+ clip->tracking.dopesheet.ok = 0;
+ clip->tracking.dopesheet.channels.first = clip->tracking.dopesheet.channels.last = NULL;
+
link_list(fd, &tracking->objects);
object= tracking->objects.first;
@@ -6233,8 +6257,7 @@ static void lib_link_movieclip(FileData *fd, Main *main)
static const char *dataname(short id_code)
{
-
- switch( id_code ) {
+ switch ( id_code ) {
case ID_OB: return "Data from OB";
case ID_ME: return "Data from ME";
case ID_IP: return "Data from IP";
@@ -6344,7 +6367,7 @@ static BHead *read_libblock(FileData *fd, Main *main, BHead *bhead, int flag, ID
bhead= read_data_into_oldnewmap(fd, bhead, allocname);
/* init pointers direct data */
- switch( GS(id->name) ) {
+ switch (GS(id->name)) {
case ID_WM:
direct_link_windowmanager(fd, (wmWindowManager *)id);
break;
@@ -6495,1013 +6518,7 @@ static void link_global(FileData *fd, BlendFileData *bfd)
}
}
-static void vcol_to_fcol(Mesh *me)
-{
- MFace *mface;
- unsigned int *mcol, *mcoln, *mcolmain;
- int a;
-
- if (me->totface==0 || me->mcol==NULL) return;
-
- mcoln= mcolmain= MEM_mallocN(4*sizeof(int)*me->totface, "mcoln");
- mcol = (unsigned int *)me->mcol;
- mface= me->mface;
- for (a=me->totface; a>0; a--, mface++) {
- mcoln[0]= mcol[mface->v1];
- mcoln[1]= mcol[mface->v2];
- mcoln[2]= mcol[mface->v3];
- mcoln[3]= mcol[mface->v4];
- mcoln+= 4;
- }
-
- MEM_freeN(me->mcol);
- me->mcol= (MCol *)mcolmain;
-}
-
-static int map_223_keybd_code_to_224_keybd_code(int code)
-{
- switch (code) {
- case 312: return 311; /* F12KEY */
- case 159: return 161; /* PADSLASHKEY */
- case 161: return 150; /* PAD0 */
- case 154: return 151; /* PAD1 */
- case 150: return 152; /* PAD2 */
- case 155: return 153; /* PAD3 */
- case 151: return 154; /* PAD4 */
- case 156: return 155; /* PAD5 */
- case 152: return 156; /* PAD6 */
- case 157: return 157; /* PAD7 */
- case 153: return 158; /* PAD8 */
- case 158: return 159; /* PAD9 */
- default: return code;
- }
-}
-
-static void do_version_bone_head_tail_237(Bone *bone)
-{
- Bone *child;
- float vec[3];
-
- /* head */
- copy_v3_v3(bone->arm_head, bone->arm_mat[3]);
-
- /* tail is in current local coord system */
- copy_v3_v3(vec, bone->arm_mat[1]);
- mul_v3_fl(vec, bone->length);
- add_v3_v3v3(bone->arm_tail, bone->arm_head, vec);
-
- for (child= bone->childbase.first; child; child= child->next)
- do_version_bone_head_tail_237(child);
-}
-
-static void bone_version_238(ListBase *lb)
-{
- Bone *bone;
-
- for (bone= lb->first; bone; bone= bone->next) {
- if (bone->rad_tail==0.0f && bone->rad_head==0.0f) {
- bone->rad_head= 0.25f*bone->length;
- bone->rad_tail= 0.1f*bone->length;
-
- bone->dist-= bone->rad_head;
- if (bone->dist<=0.0f) bone->dist= 0.0f;
- }
- bone_version_238(&bone->childbase);
- }
-}
-
-static void bone_version_239(ListBase *lb)
-{
- Bone *bone;
-
- for (bone= lb->first; bone; bone= bone->next) {
- if (bone->layer==0)
- bone->layer= 1;
- bone_version_239(&bone->childbase);
- }
-}
-
-static void ntree_version_241(bNodeTree *ntree)
-{
- bNode *node;
-
- if (ntree->type==NTREE_COMPOSIT) {
- for (node= ntree->nodes.first; node; node= node->next) {
- if (node->type==CMP_NODE_BLUR) {
- if (node->storage==NULL) {
- NodeBlurData *nbd= MEM_callocN(sizeof(NodeBlurData), "node blur patch");
- nbd->sizex= node->custom1;
- nbd->sizey= node->custom2;
- nbd->filtertype= R_FILTER_QUAD;
- node->storage= nbd;
- }
- }
- else if (node->type==CMP_NODE_VECBLUR) {
- if (node->storage==NULL) {
- NodeBlurData *nbd= MEM_callocN(sizeof(NodeBlurData), "node blur patch");
- nbd->samples= node->custom1;
- nbd->maxspeed= node->custom2;
- nbd->fac= 1.0f;
- node->storage= nbd;
- }
- }
- }
- }
-}
-
-static void ntree_version_242(bNodeTree *ntree)
-{
- bNode *node;
-
- if (ntree->type==NTREE_COMPOSIT) {
- for (node= ntree->nodes.first; node; node= node->next) {
- if (node->type==CMP_NODE_HUE_SAT) {
- if (node->storage) {
- NodeHueSat *nhs= node->storage;
- if (nhs->val==0.0f) nhs->val= 1.0f;
- }
- }
- }
- }
- else if (ntree->type==NTREE_SHADER) {
- for (node= ntree->nodes.first; node; node= node->next)
- if (node->type == SH_NODE_GEOMETRY && node->storage == NULL)
- node->storage= MEM_callocN(sizeof(NodeGeometry), "NodeGeometry");
- }
-
-}
-
-static void customdata_version_242(Mesh *me)
-{
- CustomDataLayer *layer;
- MTFace *mtf;
- MCol *mcol;
- TFace *tf;
- int a, mtfacen, mcoln;
-
- if (!me->vdata.totlayer) {
- CustomData_add_layer(&me->vdata, CD_MVERT, CD_ASSIGN, me->mvert, me->totvert);
-
- if (me->msticky)
- CustomData_add_layer(&me->vdata, CD_MSTICKY, CD_ASSIGN, me->msticky, me->totvert);
- if (me->dvert)
- CustomData_add_layer(&me->vdata, CD_MDEFORMVERT, CD_ASSIGN, me->dvert, me->totvert);
- }
-
- if (!me->edata.totlayer)
- CustomData_add_layer(&me->edata, CD_MEDGE, CD_ASSIGN, me->medge, me->totedge);
-
- if (!me->fdata.totlayer) {
- CustomData_add_layer(&me->fdata, CD_MFACE, CD_ASSIGN, me->mface, me->totface);
-
- if (me->tface) {
- if (me->mcol)
- MEM_freeN(me->mcol);
-
- me->mcol= CustomData_add_layer(&me->fdata, CD_MCOL, CD_CALLOC, NULL, me->totface);
- me->mtface= CustomData_add_layer(&me->fdata, CD_MTFACE, CD_CALLOC, NULL, me->totface);
-
- mtf= me->mtface;
- mcol= me->mcol;
- tf= me->tface;
-
- for (a=0; a < me->totface; a++, mtf++, tf++, mcol+=4) {
- memcpy(mcol, tf->col, sizeof(tf->col));
- memcpy(mtf->uv, tf->uv, sizeof(tf->uv));
-
- mtf->flag= tf->flag;
- mtf->unwrap= tf->unwrap;
- mtf->mode= tf->mode;
- mtf->tile= tf->tile;
- mtf->tpage= tf->tpage;
- mtf->transp= tf->transp;
- }
-
- MEM_freeN(me->tface);
- me->tface= NULL;
- }
- else if (me->mcol) {
- me->mcol= CustomData_add_layer(&me->fdata, CD_MCOL, CD_ASSIGN, me->mcol, me->totface);
- }
- }
-
- if (me->tface) {
- MEM_freeN(me->tface);
- me->tface= NULL;
- }
-
- for (a=0, mtfacen=0, mcoln=0; a < me->fdata.totlayer; a++) {
- layer= &me->fdata.layers[a];
-
- if (layer->type == CD_MTFACE) {
- if (layer->name[0] == 0) {
- if (mtfacen == 0) strcpy(layer->name, "UVMap");
- else BLI_snprintf(layer->name, sizeof(layer->name), "UVMap.%.3d", mtfacen);
- }
- mtfacen++;
- }
- else if (layer->type == CD_MCOL) {
- if (layer->name[0] == 0) {
- if (mcoln == 0) strcpy(layer->name, "Col");
- else BLI_snprintf(layer->name, sizeof(layer->name), "Col.%.3d", mcoln);
- }
- mcoln++;
- }
- }
-
- mesh_update_customdata_pointers(me, TRUE);
-}
-
-/*only copy render texface layer from active*/
-static void customdata_version_243(Mesh *me)
-{
- CustomDataLayer *layer;
- int a;
-
- for (a=0; a < me->fdata.totlayer; a++) {
- layer= &me->fdata.layers[a];
- layer->active_rnd = layer->active;
- }
-}
-
-/* struct NodeImageAnim moved to ImageUser, and we make it default available */
-static void do_version_ntree_242_2(bNodeTree *ntree)
-{
- bNode *node;
-
- if (ntree->type==NTREE_COMPOSIT) {
- for (node= ntree->nodes.first; node; node= node->next) {
- if (ELEM3(node->type, CMP_NODE_IMAGE, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER)) {
- /* only image had storage */
- if (node->storage) {
- NodeImageAnim *nia= node->storage;
- ImageUser *iuser= MEM_callocN(sizeof(ImageUser), "ima user node");
-
- iuser->frames= nia->frames;
- iuser->sfra= nia->sfra;
- iuser->offset= nia->nr-1;
- iuser->cycl= nia->cyclic;
- iuser->fie_ima= 2;
- iuser->ok= 1;
-
- node->storage= iuser;
- MEM_freeN(nia);
- }
- else {
- ImageUser *iuser= node->storage= MEM_callocN(sizeof(ImageUser), "node image user");
- iuser->sfra= 1;
- iuser->fie_ima= 2;
- iuser->ok= 1;
- }
- }
- }
- }
-}
-
-static void ntree_version_245(FileData *fd, Library *lib, bNodeTree *ntree)
-{
- bNode *node;
- NodeTwoFloats *ntf;
- ID *nodeid;
- Image *image;
- ImageUser *iuser;
-
- if (ntree->type==NTREE_COMPOSIT) {
- for (node= ntree->nodes.first; node; node= node->next) {
- if (node->type == CMP_NODE_ALPHAOVER) {
- if (!node->storage) {
- ntf= MEM_callocN(sizeof(NodeTwoFloats), "NodeTwoFloats");
- node->storage= ntf;
- if (node->custom1)
- ntf->x= 1.0f;
- }
- }
-
- /* fix for temporary flag changes during 245 cycle */
- nodeid= newlibadr(fd, lib, node->id);
- if (node->storage && nodeid && GS(nodeid->name) == ID_IM) {
- image= (Image*)nodeid;
- iuser= node->storage;
- if (iuser->flag & IMA_OLD_PREMUL) {
- iuser->flag &= ~IMA_OLD_PREMUL;
- iuser->flag |= IMA_DO_PREMUL;
- }
- if (iuser->flag & IMA_DO_PREMUL) {
- image->flag &= ~IMA_OLD_PREMUL;
- image->flag |= IMA_DO_PREMUL;
- }
- }
- }
- }
-}
-
-static void idproperties_fix_groups_lengths_recurse(IDProperty *prop)
-{
- IDProperty *loop;
- int i;
-
- for (loop=prop->data.group.first, i=0; loop; loop=loop->next, i++) {
- if (loop->type == IDP_GROUP) idproperties_fix_groups_lengths_recurse(loop);
- }
-
- if (prop->len != i) {
- printf("Found and fixed bad id property group length.\n");
- prop->len = i;
- }
-}
-
-static void idproperties_fix_group_lengths(ListBase idlist)
-{
- ID *id;
-
- for (id=idlist.first; id; id=id->next) {
- if (id->properties) {
- idproperties_fix_groups_lengths_recurse(id->properties);
- }
- }
-}
-
-static void alphasort_version_246(FileData *fd, Library *lib, Mesh *me)
-{
- Material *ma;
- MFace *mf;
- MTFace *tf;
- int a, b, texalpha;
-
- /* verify we have a tface layer */
- for (b=0; b<me->fdata.totlayer; b++)
- if (me->fdata.layers[b].type == CD_MTFACE)
- break;
-
- if (b == me->fdata.totlayer)
- return;
-
- /* if we do, set alpha sort if the game engine did it before */
- for (a=0, mf=me->mface; a<me->totface; a++, mf++) {
- if (mf->mat_nr < me->totcol) {
- ma= newlibadr(fd, lib, me->mat[mf->mat_nr]);
- texalpha = 0;
-
- /* we can't read from this if it comes from a library,
- * because direct_link might not have happened on it,
- * so ma->mtex is not pointing to valid memory yet */
- if (ma && ma->id.lib)
- ma= NULL;
-
- for (b=0; ma && b<MAX_MTEX; b++)
- if (ma->mtex && ma->mtex[b] && ma->mtex[b]->mapto & MAP_ALPHA)
- texalpha = 1;
- }
- else {
- ma= NULL;
- texalpha = 0;
- }
-
- for (b=0; b<me->fdata.totlayer; b++) {
- if (me->fdata.layers[b].type == CD_MTFACE) {
- tf = ((MTFace*)me->fdata.layers[b].data) + a;
-
- tf->mode &= ~TF_ALPHASORT;
- if (ma && (ma->mode & MA_ZTRANSP))
- if (ELEM(tf->transp, TF_ALPHA, TF_ADD) || (texalpha && (tf->transp != TF_CLIP)))
- tf->mode |= TF_ALPHASORT;
- }
- }
- }
-}
-
-/* 2.50 patch */
-static void area_add_header_region(ScrArea *sa, ListBase *lb)
-{
- ARegion *ar= MEM_callocN(sizeof(ARegion), "area region from do_versions");
-
- BLI_addtail(lb, ar);
- ar->regiontype= RGN_TYPE_HEADER;
- if (sa->headertype==HEADERDOWN)
- ar->alignment= RGN_ALIGN_BOTTOM;
- else
- ar->alignment= RGN_ALIGN_TOP;
-
- /* initialize view2d data for header region, to allow panning */
- /* is copy from ui_view2d.c */
- ar->v2d.keepzoom = (V2D_LOCKZOOM_X|V2D_LOCKZOOM_Y|V2D_LIMITZOOM|V2D_KEEPASPECT);
- ar->v2d.keepofs = V2D_LOCKOFS_Y;
- ar->v2d.keeptot = V2D_KEEPTOT_STRICT;
- ar->v2d.align = V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_NEG_Y;
- ar->v2d.flag = (V2D_PIXELOFS_X|V2D_PIXELOFS_Y);
-}
-
-static void sequencer_init_preview_region(ARegion* ar)
-{
- // XXX a bit ugly still, copied from space_sequencer
- /* NOTE: if you change values here, also change them in space_sequencer.c, sequencer_new */
- ar->regiontype= RGN_TYPE_PREVIEW;
- ar->alignment= RGN_ALIGN_TOP;
- ar->flag |= RGN_FLAG_HIDDEN;
- ar->v2d.keepzoom= V2D_KEEPASPECT | V2D_KEEPZOOM;
- ar->v2d.minzoom= 0.00001f;
- ar->v2d.maxzoom= 100000.0f;
- ar->v2d.tot.xmin = -960.0f; /* 1920 width centered */
- ar->v2d.tot.ymin = -540.0f; /* 1080 height centered */
- ar->v2d.tot.xmax = 960.0f;
- ar->v2d.tot.ymax = 540.0f;
- ar->v2d.min[0]= 0.0f;
- ar->v2d.min[1]= 0.0f;
- ar->v2d.max[0]= 12000.0f;
- ar->v2d.max[1]= 12000.0f;
- ar->v2d.cur= ar->v2d.tot;
- ar->v2d.align= V2D_ALIGN_FREE; // (V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_NEG_Y);
- ar->v2d.keeptot= V2D_KEEPTOT_FREE;
-}
-
-/* 2.50 patch */
-static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb)
-{
- ARegion *ar;
- ARegion *ar_main;
-
- if (sl) {
- /* first channels for ipo action nla... */
- switch(sl->spacetype) {
- case SPACE_IPO:
- ar= MEM_callocN(sizeof(ARegion), "area region from do_versions");
- BLI_addtail(lb, ar);
- ar->regiontype= RGN_TYPE_CHANNELS;
- ar->alignment= RGN_ALIGN_LEFT;
- ar->v2d.scroll= (V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM);
-
- // for some reason, this doesn't seem to go auto like for NLA...
- ar= MEM_callocN(sizeof(ARegion), "area region from do_versions");
- BLI_addtail(lb, ar);
- ar->regiontype= RGN_TYPE_UI;
- ar->alignment= RGN_ALIGN_RIGHT;
- ar->v2d.scroll= V2D_SCROLL_RIGHT;
- ar->v2d.flag = RGN_FLAG_HIDDEN;
- break;
-
- case SPACE_ACTION:
- ar= MEM_callocN(sizeof(ARegion), "area region from do_versions");
- BLI_addtail(lb, ar);
- ar->regiontype= RGN_TYPE_CHANNELS;
- ar->alignment= RGN_ALIGN_LEFT;
- ar->v2d.scroll= V2D_SCROLL_BOTTOM;
- ar->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL;
- break;
-
- case SPACE_NLA:
- ar= MEM_callocN(sizeof(ARegion), "area region from do_versions");
- BLI_addtail(lb, ar);
- ar->regiontype= RGN_TYPE_CHANNELS;
- ar->alignment= RGN_ALIGN_LEFT;
- ar->v2d.scroll= V2D_SCROLL_BOTTOM;
- ar->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL;
-
- // for some reason, some files still don't get this auto
- ar= MEM_callocN(sizeof(ARegion), "area region from do_versions");
- BLI_addtail(lb, ar);
- ar->regiontype= RGN_TYPE_UI;
- ar->alignment= RGN_ALIGN_RIGHT;
- ar->v2d.scroll= V2D_SCROLL_RIGHT;
- ar->v2d.flag = RGN_FLAG_HIDDEN;
- break;
-
- case SPACE_NODE:
- ar= MEM_callocN(sizeof(ARegion), "nodetree area for node");
- BLI_addtail(lb, ar);
- ar->regiontype= RGN_TYPE_UI;
- ar->alignment= RGN_ALIGN_LEFT;
- ar->v2d.scroll = (V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM);
- ar->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL;
- /* temporarily hide it */
- ar->flag = RGN_FLAG_HIDDEN;
- break;
- case SPACE_FILE:
- ar= MEM_callocN(sizeof(ARegion), "nodetree area for node");
- BLI_addtail(lb, ar);
- ar->regiontype= RGN_TYPE_CHANNELS;
- ar->alignment= RGN_ALIGN_LEFT;
-
- ar= MEM_callocN(sizeof(ARegion), "ui area for file");
- BLI_addtail(lb, ar);
- ar->regiontype= RGN_TYPE_UI;
- ar->alignment= RGN_ALIGN_TOP;
- break;
- case SPACE_SEQ:
- ar_main = (ARegion*)lb->first;
- for (; ar_main; ar_main = ar_main->next) {
- if (ar_main->regiontype == RGN_TYPE_WINDOW)
- break;
- }
- ar= MEM_callocN(sizeof(ARegion), "preview area for sequencer");
- BLI_insertlinkbefore(lb, ar_main, ar);
- sequencer_init_preview_region(ar);
- break;
- case SPACE_VIEW3D:
- /* toolbar */
- ar= MEM_callocN(sizeof(ARegion), "toolbar for view3d");
-
- BLI_addtail(lb, ar);
- ar->regiontype= RGN_TYPE_TOOLS;
- ar->alignment= RGN_ALIGN_LEFT;
- ar->flag = RGN_FLAG_HIDDEN;
-
- /* tool properties */
- ar= MEM_callocN(sizeof(ARegion), "tool properties for view3d");
-
- BLI_addtail(lb, ar);
- ar->regiontype= RGN_TYPE_TOOL_PROPS;
- ar->alignment= RGN_ALIGN_BOTTOM|RGN_SPLIT_PREV;
- ar->flag = RGN_FLAG_HIDDEN;
-
- /* buttons/list view */
- ar= MEM_callocN(sizeof(ARegion), "buttons for view3d");
-
- BLI_addtail(lb, ar);
- ar->regiontype= RGN_TYPE_UI;
- ar->alignment= RGN_ALIGN_RIGHT;
- ar->flag = RGN_FLAG_HIDDEN;
-#if 0
- case SPACE_BUTS:
- /* context UI region */
- ar= MEM_callocN(sizeof(ARegion), "area region from do_versions");
- BLI_addtail(lb, ar);
- ar->regiontype= RGN_TYPE_UI;
- ar->alignment= RGN_ALIGN_RIGHT;
-
- break;
-#endif
- }
- }
-
- /* main region */
- ar= MEM_callocN(sizeof(ARegion), "area region from do_versions");
-
- BLI_addtail(lb, ar);
- ar->winrct= sa->totrct;
-
- ar->regiontype= RGN_TYPE_WINDOW;
-
- if (sl) {
- /* if active spacetype has view2d data, copy that over to main region */
- /* and we split view3d */
- switch(sl->spacetype) {
- case SPACE_VIEW3D:
- view3d_split_250((View3D *)sl, lb);
- break;
-
- case SPACE_OUTLINER:
- {
- SpaceOops *soops= (SpaceOops *)sl;
-
- memcpy(&ar->v2d, &soops->v2d, sizeof(View2D));
-
- ar->v2d.scroll &= ~V2D_SCROLL_LEFT;
- ar->v2d.scroll |= (V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM_O);
- ar->v2d.align = (V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_POS_Y);
- ar->v2d.keepzoom |= (V2D_LOCKZOOM_X|V2D_LOCKZOOM_Y|V2D_KEEPASPECT);
- ar->v2d.keeptot = V2D_KEEPTOT_STRICT;
- ar->v2d.minzoom= ar->v2d.maxzoom= 1.0f;
- //ar->v2d.flag |= V2D_IS_INITIALISED;
- }
- break;
- case SPACE_TIME:
- {
- SpaceTime *stime= (SpaceTime *)sl;
- memcpy(&ar->v2d, &stime->v2d, sizeof(View2D));
-
- ar->v2d.scroll |= (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL);
- ar->v2d.align |= V2D_ALIGN_NO_NEG_Y;
- ar->v2d.keepofs |= V2D_LOCKOFS_Y;
- ar->v2d.keepzoom |= V2D_LOCKZOOM_Y;
- ar->v2d.tot.ymin = ar->v2d.cur.ymin = -10.0;
- ar->v2d.min[1]= ar->v2d.max[1]= 20.0;
- }
- break;
- case SPACE_IPO:
- {
- SpaceIpo *sipo= (SpaceIpo *)sl;
- memcpy(&ar->v2d, &sipo->v2d, sizeof(View2D));
-
- /* init mainarea view2d */
- ar->v2d.scroll |= (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL);
- ar->v2d.scroll |= (V2D_SCROLL_LEFT|V2D_SCROLL_SCALE_VERTICAL);
-
- ar->v2d.min[0]= FLT_MIN;
- ar->v2d.min[1]= FLT_MIN;
-
- ar->v2d.max[0]= MAXFRAMEF;
- ar->v2d.max[1]= FLT_MAX;
-
- //ar->v2d.flag |= V2D_IS_INITIALISED;
- break;
- }
- case SPACE_NLA:
- {
- SpaceNla *snla= (SpaceNla *)sl;
- memcpy(&ar->v2d, &snla->v2d, sizeof(View2D));
-
- ar->v2d.tot.ymin = (float)(-sa->winy)/3.0f;
- ar->v2d.tot.ymax = 0.0f;
-
- ar->v2d.scroll |= (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL);
- ar->v2d.scroll |= (V2D_SCROLL_RIGHT);
- ar->v2d.align = V2D_ALIGN_NO_POS_Y;
- ar->v2d.flag |= V2D_VIEWSYNC_AREA_VERTICAL;
- break;
- }
- case SPACE_ACTION:
- {
- SpaceAction *saction= (SpaceAction *)sl;
-
- /* we totally reinit the view for the Action Editor, as some old instances had some weird cruft set */
- ar->v2d.tot.xmin = -20.0f;
- ar->v2d.tot.ymin = (float)(-sa->winy)/3.0f;
- ar->v2d.tot.xmax = (float)((sa->winx > 120)? (sa->winx) : 120);
- ar->v2d.tot.ymax = 0.0f;
-
- ar->v2d.cur= ar->v2d.tot;
-
- ar->v2d.min[0]= 0.0f;
- ar->v2d.min[1]= 0.0f;
-
- ar->v2d.max[0]= MAXFRAMEF;
- ar->v2d.max[1]= FLT_MAX;
-
- ar->v2d.minzoom= 0.01f;
- ar->v2d.maxzoom= 50;
- ar->v2d.scroll = (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL);
- ar->v2d.scroll |= (V2D_SCROLL_RIGHT);
- ar->v2d.keepzoom= V2D_LOCKZOOM_Y;
- ar->v2d.align= V2D_ALIGN_NO_POS_Y;
- ar->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL;
-
- /* for old files with ShapeKey editors open + an action set, clear the action as
- * it doesn't make sense in the new system (i.e. violates concept that ShapeKey edit
- * only shows ShapeKey-rooted actions only)
- */
- if (saction->mode == SACTCONT_SHAPEKEY)
- saction->action = NULL;
- break;
- }
- case SPACE_SEQ:
- {
- SpaceSeq *sseq= (SpaceSeq *)sl;
- memcpy(&ar->v2d, &sseq->v2d, sizeof(View2D));
-
- ar->v2d.scroll |= (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL);
- ar->v2d.scroll |= (V2D_SCROLL_LEFT|V2D_SCROLL_SCALE_VERTICAL);
- ar->v2d.align= V2D_ALIGN_NO_NEG_Y;
- ar->v2d.flag |= V2D_IS_INITIALISED;
- break;
- }
- case SPACE_NODE:
- {
- SpaceNode *snode= (SpaceNode *)sl;
- memcpy(&ar->v2d, &snode->v2d, sizeof(View2D));
-
- ar->v2d.scroll= (V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM);
- ar->v2d.keepzoom= V2D_LIMITZOOM|V2D_KEEPASPECT;
- break;
- }
- case SPACE_BUTS:
- {
- SpaceButs *sbuts= (SpaceButs *)sl;
- memcpy(&ar->v2d, &sbuts->v2d, sizeof(View2D));
-
- ar->v2d.scroll |= (V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM);
- break;
- }
- case SPACE_FILE:
- {
- // SpaceFile *sfile= (SpaceFile *)sl;
- ar->v2d.tot.xmin = ar->v2d.tot.ymin = 0;
- ar->v2d.tot.xmax = ar->winx;
- ar->v2d.tot.ymax = ar->winy;
- ar->v2d.cur = ar->v2d.tot;
- ar->regiontype= RGN_TYPE_WINDOW;
- ar->v2d.scroll = (V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM_O);
- ar->v2d.align = (V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_POS_Y);
- ar->v2d.keepzoom = (V2D_LOCKZOOM_X|V2D_LOCKZOOM_Y|V2D_LIMITZOOM|V2D_KEEPASPECT);
- break;
- }
- case SPACE_TEXT:
- {
- SpaceText *st= (SpaceText *)sl;
- st->flags |= ST_FIND_WRAP;
- }
- //case SPACE_XXX: // FIXME... add other ones
- // memcpy(&ar->v2d, &((SpaceXxx *)sl)->v2d, sizeof(View2D));
- // break;
- }
- }
-}
-
-static void do_versions_windowmanager_2_50(bScreen *screen)
-{
- ScrArea *sa;
- SpaceLink *sl;
-
- /* add regions */
- for (sa= screen->areabase.first; sa; sa= sa->next) {
-
- /* we keep headertype variable to convert old files only */
- if (sa->headertype)
- area_add_header_region(sa, &sa->regionbase);
-
- area_add_window_regions(sa, sa->spacedata.first, &sa->regionbase);
-
- /* space imageselect is deprecated */
- for (sl= sa->spacedata.first; sl; sl= sl->next) {
- if (sl->spacetype==SPACE_IMASEL)
- sl->spacetype= SPACE_EMPTY; /* spacedata then matches */
- }
-
- /* space sound is deprecated */
- for (sl= sa->spacedata.first; sl; sl= sl->next) {
- if (sl->spacetype==SPACE_SOUND)
- sl->spacetype= SPACE_EMPTY; /* spacedata then matches */
- }
-
- /* it seems to be possible in 2.5 to have this saved, filewindow probably */
- sa->butspacetype= sa->spacetype;
-
- /* pushed back spaces also need regions! */
- if (sa->spacedata.first) {
- sl= sa->spacedata.first;
- for (sl= sl->next; sl; sl= sl->next) {
- if (sa->headertype)
- area_add_header_region(sa, &sl->regionbase);
- area_add_window_regions(sa, sl, &sl->regionbase);
- }
- }
- }
-}
-
-static void versions_gpencil_add_main(ListBase *lb, ID *id, const char *name)
-{
-
- BLI_addtail(lb, id);
- id->us= 1;
- id->flag= LIB_FAKEUSER;
- *( (short *)id->name )= ID_GD;
-
- new_id(lb, id, name);
- /* alphabetic insterion: is in new_id */
-
- if (G.debug & G_DEBUG)
- printf("Converted GPencil to ID: %s\n", id->name+2);
-}
-
-static void do_versions_gpencil_2_50(Main *main, bScreen *screen)
-{
- ScrArea *sa;
- SpaceLink *sl;
-
- /* add regions */
- for (sa= screen->areabase.first; sa; sa= sa->next) {
- for (sl= sa->spacedata.first; sl; sl= sl->next) {
- if (sl->spacetype==SPACE_VIEW3D) {
- View3D *v3d= (View3D*) sl;
- if (v3d->gpd) {
- versions_gpencil_add_main(&main->gpencil, (ID *)v3d->gpd, "GPencil View3D");
- v3d->gpd= NULL;
- }
- }
- else if (sl->spacetype==SPACE_NODE) {
- SpaceNode *snode= (SpaceNode *)sl;
- if (snode->gpd) {
- versions_gpencil_add_main(&main->gpencil, (ID *)snode->gpd, "GPencil Node");
- snode->gpd= NULL;
- }
- }
- else if (sl->spacetype==SPACE_SEQ) {
- SpaceSeq *sseq= (SpaceSeq *)sl;
- if (sseq->gpd) {
- versions_gpencil_add_main(&main->gpencil, (ID *)sseq->gpd, "GPencil Node");
- sseq->gpd= NULL;
- }
- }
- else if (sl->spacetype==SPACE_IMAGE) {
- SpaceImage *sima= (SpaceImage *)sl;
-#if 0 /* see comment on r28002 */
- if (sima->gpd) {
- versions_gpencil_add_main(&main->gpencil, (ID *)sima->gpd, "GPencil Image");
- sima->gpd= NULL;
- }
-#else
- sima->gpd= NULL;
-#endif
- }
- }
- }
-}
-
/* deprecated, only keep this for readfile.c */
-static PartEff *do_version_give_parteff_245(Object *ob)
-{
- PartEff *paf;
-
- paf= ob->effect.first;
- while (paf) {
- if (paf->type==EFF_PARTICLE) return paf;
- paf= paf->next;
- }
- return NULL;
-}
-static void do_version_free_effect_245(Effect *eff)
-{
- PartEff *paf;
-
- if (eff->type==EFF_PARTICLE) {
- paf= (PartEff *)eff;
- if (paf->keys) MEM_freeN(paf->keys);
- }
- MEM_freeN(eff);
-}
-static void do_version_free_effects_245(ListBase *lb)
-{
- Effect *eff;
-
- eff= lb->first;
- while (eff) {
- BLI_remlink(lb, eff);
- do_version_free_effect_245(eff);
- eff= lb->first;
- }
-}
-
-static void do_version_mtex_factor_2_50(MTex **mtex_array, short idtype)
-{
- MTex *mtex;
- float varfac, colfac;
- int a, neg;
-
- if (!mtex_array)
- return;
-
- for (a=0; a<MAX_MTEX; a++) {
- if (mtex_array[a]) {
- mtex= mtex_array[a];
-
- neg= mtex->maptoneg;
- varfac= mtex->varfac;
- colfac= mtex->colfac;
-
- if (neg & MAP_DISP) mtex->dispfac= -mtex->dispfac;
- if (neg & MAP_NORM) mtex->norfac= -mtex->norfac;
- if (neg & MAP_WARP) mtex->warpfac= -mtex->warpfac;
-
- mtex->colspecfac= (neg & MAP_COLSPEC)? -colfac: colfac;
- mtex->mirrfac= (neg & MAP_COLMIR)? -colfac: colfac;
- mtex->alphafac= (neg & MAP_ALPHA)? -varfac: varfac;
- mtex->difffac= (neg & MAP_REF)? -varfac: varfac;
- mtex->specfac= (neg & MAP_SPEC)? -varfac: varfac;
- mtex->emitfac= (neg & MAP_EMIT)? -varfac: varfac;
- mtex->hardfac= (neg & MAP_HAR)? -varfac: varfac;
- mtex->raymirrfac= (neg & MAP_RAYMIRR)? -varfac: varfac;
- mtex->translfac= (neg & MAP_TRANSLU)? -varfac: varfac;
- mtex->ambfac= (neg & MAP_AMB)? -varfac: varfac;
- mtex->colemitfac= (neg & MAP_EMISSION_COL)? -colfac: colfac;
- mtex->colreflfac= (neg & MAP_REFLECTION_COL)? -colfac: colfac;
- mtex->coltransfac= (neg & MAP_TRANSMISSION_COL)? -colfac: colfac;
- mtex->densfac= (neg & MAP_DENSITY)? -varfac: varfac;
- mtex->scatterfac= (neg & MAP_SCATTERING)? -varfac: varfac;
- mtex->reflfac= (neg & MAP_REFLECTION)? -varfac: varfac;
-
- mtex->timefac= (neg & MAP_PA_TIME)? -varfac: varfac;
- mtex->lengthfac= (neg & MAP_PA_LENGTH)? -varfac: varfac;
- mtex->clumpfac= (neg & MAP_PA_CLUMP)? -varfac: varfac;
- mtex->kinkfac= (neg & MAP_PA_KINK)? -varfac: varfac;
- mtex->roughfac= (neg & MAP_PA_ROUGH)? -varfac: varfac;
- mtex->padensfac= (neg & MAP_PA_DENS)? -varfac: varfac;
- mtex->lifefac= (neg & MAP_PA_LIFE)? -varfac: varfac;
- mtex->sizefac= (neg & MAP_PA_SIZE)? -varfac: varfac;
- mtex->ivelfac= (neg & MAP_PA_IVEL)? -varfac: varfac;
-
- mtex->shadowfac= (neg & LAMAP_SHAD)? -colfac: colfac;
-
- mtex->zenupfac= (neg & WOMAP_ZENUP)? -colfac: colfac;
- mtex->zendownfac= (neg & WOMAP_ZENDOWN)? -colfac: colfac;
- mtex->blendfac= (neg & WOMAP_BLEND)? -varfac: varfac;
-
- if (idtype == ID_MA)
- mtex->colfac= (neg & MAP_COL)? -colfac: colfac;
- else if (idtype == ID_LA)
- mtex->colfac= (neg & LAMAP_COL)? -colfac: colfac;
- else if (idtype == ID_WO)
- mtex->colfac= (neg & WOMAP_HORIZ)? -colfac: colfac;
- }
- }
-}
-
-static void do_version_mdef_250(Main *main)
-{
- Object *ob;
- ModifierData *md;
- MeshDeformModifierData *mmd;
-
- for (ob= main->object.first; ob; ob=ob->id.next) {
- for (md=ob->modifiers.first; md; md=md->next) {
- if (md->type == eModifierType_MeshDeform) {
- mmd= (MeshDeformModifierData*)md;
-
- if (mmd->bindcos) {
- /* make bindcos NULL in order to trick older versions
- * into thinking that the mesh was not bound yet */
- mmd->bindcagecos= mmd->bindcos;
- mmd->bindcos= NULL;
-
- modifier_mdef_compact_influences(md);
- }
- }
- }
- }
-}
-
-static void do_version_constraints_radians_degrees_250(ListBase *lb)
-{
- bConstraint *con;
-
- for (con=lb->first; con; con=con->next) {
- if (con->type==CONSTRAINT_TYPE_RIGIDBODYJOINT) {
- bRigidBodyJointConstraint *data = con->data;
- data->axX *= (float)(M_PI/180.0);
- data->axY *= (float)(M_PI/180.0);
- data->axZ *= (float)(M_PI/180.0);
- }
- else if (con->type==CONSTRAINT_TYPE_KINEMATIC) {
- bKinematicConstraint *data = con->data;
- data->poleangle *= (float)(M_PI/180.0);
- }
- else if (con->type==CONSTRAINT_TYPE_ROTLIMIT) {
- bRotLimitConstraint *data = con->data;
-
- data->xmin *= (float)(M_PI/180.0);
- data->xmax *= (float)(M_PI/180.0);
- data->ymin *= (float)(M_PI/180.0);
- data->ymax *= (float)(M_PI/180.0);
- data->zmin *= (float)(M_PI/180.0);
- data->zmax *= (float)(M_PI/180.0);
- }
- }
-}
-
-/* NOTE: this version patch is intended for versions < 2.52.2, but was initially introduced in 2.27 already */
-static void do_version_old_trackto_to_constraints(Object *ob)
-{
- /* create new trackto constraint from the relationship */
- if (ob->track)
- {
- bConstraint *con= add_ob_constraint(ob, "AutoTrack", CONSTRAINT_TYPE_TRACKTO);
- bTrackToConstraint *data = con->data;
-
- /* copy tracking settings from the object */
- data->tar = ob->track;
- data->reserved1 = ob->trackflag;
- data->reserved2 = ob->upflag;
- }
-
- /* clear old track setting */
- ob->track = NULL;
-}
-
-static void do_versions_seq_unique_name_all_strips(
- Scene * sce, ListBase *seqbasep)
-{
- Sequence * seq = seqbasep->first;
-
- while (seq) {
- seqbase_unique_name_recursive(&sce->ed->seqbase, seq);
- if (seq->seqbase.first) {
- do_versions_seq_unique_name_all_strips(
- sce, &seq->seqbase);
- }
- seq=seq->next;
- }
-}
-
-
-static void do_version_bone_roll_256(Bone *bone)
-{
- Bone *child;
- float submat[3][3];
-
- copy_m3_m4(submat, bone->arm_mat);
- mat3_to_vec_roll(submat, NULL, &bone->arm_roll);
-
- for (child = bone->childbase.first; child; child = child->next)
- do_version_bone_roll_256(child);
-}
-
-static void do_versions_nodetree_dynamic_sockets(bNodeTree *ntree)
-{
- bNodeSocket *sock;
- for (sock=ntree->inputs.first; sock; sock=sock->next)
- sock->flag |= SOCK_DYNAMIC;
- for (sock=ntree->outputs.first; sock; sock=sock->next)
- sock->flag |= SOCK_DYNAMIC;
-}
-
void convert_tface_mt(FileData *fd, Main *main)
{
Main *gmain;
@@ -7697,10 +6714,15 @@ static void do_versions_nodetree_multi_file_output_format_2_62_1(Scene *sce, bNo
bNodeSocket *old_image = BLI_findlink(&node->inputs, 0);
bNodeSocket *old_z = BLI_findlink(&node->inputs, 1);
bNodeSocket *sock;
+ char basepath[FILE_MAXDIR];
+ char filename[FILE_MAXFILE];
node->storage= nimf;
- BLI_strncpy(nimf->base_path, old_data->name, sizeof(nimf->base_path));
+ /* split off filename from the old path, to be used as socket sub-path */
+ BLI_split_dirfile(old_data->name, basepath, filename, sizeof(basepath), sizeof(filename));
+
+ BLI_strncpy(nimf->base_path, basepath, sizeof(nimf->base_path));
nimf->format = old_data->im_format;
/* if z buffer is saved, change the image type to multilayer exr.
@@ -7708,21 +6730,32 @@ static void do_versions_nodetree_multi_file_output_format_2_62_1(Scene *sce, bNo
* i'm just assuming here that IRIZ means IRIS with z buffer ...
*/
if (ELEM(old_data->im_format.imtype, R_IMF_IMTYPE_IRIZ, R_IMF_IMTYPE_OPENEXR)) {
+ char sockpath[FILE_MAX];
+
nimf->format.imtype = R_IMF_IMTYPE_MULTILAYER;
- sock = ntreeCompositOutputFileAddSocket(ntree, node, old_image->name, &nimf->format);
+
+ BLI_snprintf(sockpath, sizeof(sockpath), "%s_Image", filename);
+ sock = ntreeCompositOutputFileAddSocket(ntree, node, sockpath, &nimf->format);
+ /* XXX later do_versions copies path from socket name, need to set this explicitely */
+ BLI_strncpy(sock->name, sockpath, sizeof(sock->name));
if (old_image->link) {
old_image->link->tosock = sock;
sock->link = old_image->link;
}
- sock = ntreeCompositOutputFileAddSocket(ntree, node, old_z->name, &nimf->format);
+
+ BLI_snprintf(sockpath, sizeof(sockpath), "%s_Z", filename);
+ sock = ntreeCompositOutputFileAddSocket(ntree, node, sockpath, &nimf->format);
+ /* XXX later do_versions copies path from socket name, need to set this explicitely */
+ BLI_strncpy(sock->name, sockpath, sizeof(sock->name));
if (old_z->link) {
old_z->link->tosock = sock;
sock->link = old_z->link;
}
}
else {
- /* saves directly to base path, which is the old image output path */
- sock = ntreeCompositOutputFileAddSocket(ntree, node, "", &nimf->format);
+ sock = ntreeCompositOutputFileAddSocket(ntree, node, filename, &nimf->format);
+ /* XXX later do_versions copies path from socket name, need to set this explicitely */
+ BLI_strncpy(sock->name, filename, sizeof(sock->name));
if (old_image->link) {
old_image->link->tosock = sock;
sock->link = old_image->link;
@@ -7775,5014 +6808,32 @@ static void do_versions_mesh_mloopcol_swap_2_62_1(Mesh *me)
}
}
-static void do_versions(FileData *fd, Library *lib, Main *main)
+static void do_versions_nodetree_multi_file_output_path_2_64_0(bNodeTree *ntree)
{
- /* WATCH IT!!!: pointers from libdata have not been converted */
-
- if (G.debug & G_DEBUG)
- printf("read file %s\n Version %d sub %d svn r%d\n", fd->relabase, main->versionfile, main->subversionfile, main->revision);
-
- if (main->versionfile == 100) {
- /* tex->extend and tex->imageflag have changed: */
- Tex *tex = main->tex.first;
- while (tex) {
- if (tex->id.flag & LIB_NEEDLINK) {
-
- if (tex->extend==0) {
- if (tex->xrepeat || tex->yrepeat) tex->extend= TEX_REPEAT;
- else {
- tex->extend= TEX_EXTEND;
- tex->xrepeat= tex->yrepeat= 1;
- }
- }
-
- }
- tex= tex->id.next;
- }
- }
- if (main->versionfile <= 101) {
- /* frame mapping */
- Scene *sce = main->scene.first;
- while (sce) {
- sce->r.framapto= 100;
- sce->r.images= 100;
- sce->r.framelen= 1.0;
- sce= sce->id.next;
- }
- }
- if (main->versionfile <= 102) {
- /* init halo's at 1.0 */
- Material *ma = main->mat.first;
- while (ma) {
- ma->add= 1.0;
- ma= ma->id.next;
- }
- }
- if (main->versionfile <= 103) {
- /* new variable in object: colbits */
- Object *ob = main->object.first;
- int a;
- while (ob) {
- ob->colbits= 0;
- if (ob->totcol) {
- for (a=0; a<ob->totcol; a++) {
- if (ob->mat[a]) ob->colbits |= (1<<a);
- }
- }
- ob= ob->id.next;
- }
- }
- if (main->versionfile <= 104) {
- /* timeoffs moved */
- Object *ob = main->object.first;
- while (ob) {
- if (ob->transflag & 1) {
- ob->transflag -= 1;
- //ob->ipoflag |= OB_OFFS_OB;
- }
- ob= ob->id.next;
- }
- }
- if (main->versionfile <= 105) {
- Object *ob = main->object.first;
- while (ob) {
- ob->dupon= 1; ob->dupoff= 0;
- ob->dupsta= 1; ob->dupend= 100;
- ob= ob->id.next;
- }
- }
- if (main->versionfile <= 106) {
- /* mcol changed */
- Mesh *me = main->mesh.first;
- while (me) {
- if (me->mcol) vcol_to_fcol(me);
- me= me->id.next;
- }
-
- }
- if (main->versionfile <= 107) {
- Object *ob;
- Scene *sce = main->scene.first;
- while (sce) {
- sce->r.mode |= R_GAMMA;
- sce= sce->id.next;
- }
- ob= main->object.first;
- while (ob) {
- //ob->ipoflag |= OB_OFFS_PARENT;
- if (ob->dt==0) ob->dt= OB_SOLID;
- ob= ob->id.next;
- }
-
- }
- if (main->versionfile <= 109) {
- /* new variable: gridlines */
- bScreen *sc = main->screen.first;
- while (sc) {
- ScrArea *sa= sc->areabase.first;
- while (sa) {
- SpaceLink *sl= sa->spacedata.first;
- while (sl) {
- if (sl->spacetype==SPACE_VIEW3D) {
- View3D *v3d= (View3D*) sl;
-
- if (v3d->gridlines==0) v3d->gridlines= 20;
- }
- sl= sl->next;
- }
- sa= sa->next;
- }
- sc= sc->id.next;
- }
- }
- if (main->versionfile <= 113) {
- Material *ma = main->mat.first;
- while (ma) {
- if (ma->flaresize==0.0f) ma->flaresize= 1.0f;
- ma->subsize= 1.0f;
- ma->flareboost= 1.0f;
- ma= ma->id.next;
- }
- }
-
- if (main->versionfile <= 134) {
- Tex *tex = main->tex.first;
- while (tex) {
- if ((tex->rfac == 0.0f) &&
- (tex->gfac == 0.0f) &&
- (tex->bfac == 0.0f)) {
- tex->rfac = 1.0f;
- tex->gfac = 1.0f;
- tex->bfac = 1.0f;
- tex->filtersize = 1.0f;
- }
- tex = tex->id.next;
- }
- }
- if (main->versionfile <= 140) {
- /* r-g-b-fac in texture */
- Tex *tex = main->tex.first;
- while (tex) {
- if ((tex->rfac == 0.0f) &&
- (tex->gfac == 0.0f) &&
- (tex->bfac == 0.0f)) {
- tex->rfac = 1.0f;
- tex->gfac = 1.0f;
- tex->bfac = 1.0f;
- tex->filtersize = 1.0f;
- }
- tex = tex->id.next;
- }
- }
- if (main->versionfile <= 153) {
- Scene *sce = main->scene.first;
- while (sce) {
- if (sce->r.blurfac==0.0f) sce->r.blurfac= 1.0f;
- sce= sce->id.next;
- }
- }
- if (main->versionfile <= 163) {
- Scene *sce = main->scene.first;
- while (sce) {
- if (sce->r.frs_sec==0) sce->r.frs_sec= 25;
- sce= sce->id.next;
- }
- }
- if (main->versionfile <= 164) {
- Mesh *me= main->mesh.first;
- while (me) {
- me->smoothresh= 30;
- me= me->id.next;
- }
- }
- if (main->versionfile <= 165) {
- Mesh *me= main->mesh.first;
- TFace *tface;
- int nr;
- char *cp;
-
- while (me) {
- if (me->tface) {
- nr= me->totface;
- tface= me->tface;
- while (nr--) {
- cp= (char *)&tface->col[0];
- if (cp[1]>126) cp[1]= 255; else cp[1]*=2;
- if (cp[2]>126) cp[2]= 255; else cp[2]*=2;
- if (cp[3]>126) cp[3]= 255; else cp[3]*=2;
- cp= (char *)&tface->col[1];
- if (cp[1]>126) cp[1]= 255; else cp[1]*=2;
- if (cp[2]>126) cp[2]= 255; else cp[2]*=2;
- if (cp[3]>126) cp[3]= 255; else cp[3]*=2;
- cp= (char *)&tface->col[2];
- if (cp[1]>126) cp[1]= 255; else cp[1]*=2;
- if (cp[2]>126) cp[2]= 255; else cp[2]*=2;
- if (cp[3]>126) cp[3]= 255; else cp[3]*=2;
- cp= (char *)&tface->col[3];
- if (cp[1]>126) cp[1]= 255; else cp[1]*=2;
- if (cp[2]>126) cp[2]= 255; else cp[2]*=2;
- if (cp[3]>126) cp[3]= 255; else cp[3]*=2;
-
- tface++;
- }
- }
- me= me->id.next;
- }
- }
-
- if (main->versionfile <= 169) {
- Mesh *me= main->mesh.first;
- while (me) {
- if (me->subdiv==0) me->subdiv= 1;
- me= me->id.next;
- }
- }
-
- if (main->versionfile <= 169) {
- bScreen *sc= main->screen.first;
- while (sc) {
- ScrArea *sa= sc->areabase.first;
- while (sa) {
- SpaceLink *sl= sa->spacedata.first;
- while (sl) {
- if (sl->spacetype==SPACE_IPO) {
- SpaceIpo *sipo= (SpaceIpo*) sl;
- sipo->v2d.max[0]= 15000.0;
- }
- sl= sl->next;
- }
- sa= sa->next;
- }
- sc= sc->id.next;
- }
- }
-
- if (main->versionfile <= 170) {
- Object *ob = main->object.first;
- PartEff *paf;
- while (ob) {
- paf = do_version_give_parteff_245(ob);
- if (paf) {
- if (paf->staticstep == 0) {
- paf->staticstep= 5;
- }
- }
- ob = ob->id.next;
- }
- }
-
- if (main->versionfile <= 171) {
- bScreen *sc= main->screen.first;
- while (sc) {
- ScrArea *sa= sc->areabase.first;
- while (sa) {
- SpaceLink *sl= sa->spacedata.first;
- while (sl) {
- if (sl->spacetype==SPACE_TEXT) {
- SpaceText *st= (SpaceText*) sl;
- st->lheight= 12;
- }
- sl= sl->next;
- }
- sa= sa->next;
- }
- sc= sc->id.next;
- }
- }
-
- if (main->versionfile <= 173) {
- int a, b;
- Mesh *me= main->mesh.first;
- while (me) {
- if (me->tface) {
- TFace *tface= me->tface;
- for (a=0; a<me->totface; a++, tface++) {
- for (b=0; b<4; b++) {
- tface->uv[b][0]/= 32767.0f;
- tface->uv[b][1]/= 32767.0f;
- }
- }
- }
- me= me->id.next;
- }
- }
-
- if (main->versionfile <= 191) {
- Object *ob= main->object.first;
- Material *ma = main->mat.first;
-
- /* let faces have default add factor of 0.0 */
- while (ma) {
- if (!(ma->mode & MA_HALO)) ma->add = 0.0;
- ma = ma->id.next;
- }
-
- while (ob) {
- ob->mass= 1.0f;
- ob->damping= 0.1f;
- /*ob->quat[1]= 1.0f;*/ /* quats arnt used yet */
- ob= ob->id.next;
- }
- }
-
- if (main->versionfile <= 193) {
- Object *ob= main->object.first;
- while (ob) {
- ob->inertia= 1.0f;
- ob->rdamping= 0.1f;
- ob= ob->id.next;
- }
- }
-
- if (main->versionfile <= 196) {
- Mesh *me= main->mesh.first;
- int a, b;
- while (me) {
- if (me->tface) {
- TFace *tface= me->tface;
- for (a=0; a<me->totface; a++, tface++) {
- for (b=0; b<4; b++) {
- tface->mode |= TF_DYNAMIC;
- tface->mode &= ~TF_INVISIBLE;
- }
- }
- }
- me= me->id.next;
- }
- }
-
- if (main->versionfile <= 200) {
- Object *ob= main->object.first;
- while (ob) {
- ob->scaflag = ob->gameflag & (OB_DO_FH|OB_ROT_FH|OB_ANISOTROPIC_FRICTION|OB_GHOST|OB_RIGID_BODY|OB_BOUNDS);
- /* 64 is do_fh */
- ob->gameflag &= ~(OB_ROT_FH|OB_ANISOTROPIC_FRICTION|OB_GHOST|OB_RIGID_BODY|OB_BOUNDS);
- ob = ob->id.next;
- }
- }
-
- if (main->versionfile <= 201) {
- /* add-object + end-object are joined to edit-object actuator */
- Object *ob = main->object.first;
- bProperty *prop;
- bActuator *act;
- bIpoActuator *ia;
- bEditObjectActuator *eoa;
- bAddObjectActuator *aoa;
- while (ob) {
- act = ob->actuators.first;
- while (act) {
- if (act->type==ACT_IPO) {
- ia= act->data;
- prop= get_ob_property(ob, ia->name);
- if (prop) {
- ia->type= ACT_IPO_FROM_PROP;
- }
- }
- else if (act->type==ACT_ADD_OBJECT) {
- aoa= act->data;
- eoa= MEM_callocN(sizeof(bEditObjectActuator), "edit ob act");
- eoa->type= ACT_EDOB_ADD_OBJECT;
- eoa->ob= aoa->ob;
- eoa->time= aoa->time;
- MEM_freeN(aoa);
- act->data= eoa;
- act->type= act->otype= ACT_EDIT_OBJECT;
- }
- else if (act->type==ACT_END_OBJECT) {
- eoa= MEM_callocN(sizeof(bEditObjectActuator), "edit ob act");
- eoa->type= ACT_EDOB_END_OBJECT;
- act->data= eoa;
- act->type= act->otype= ACT_EDIT_OBJECT;
- }
- act= act->next;
- }
- ob = ob->id.next;
- }
- }
-
- if (main->versionfile <= 202) {
- /* add-object and end-object are joined to edit-object
- * actuator */
- Object *ob= main->object.first;
- bActuator *act;
- bObjectActuator *oa;
- while (ob) {
- act= ob->actuators.first;
- while (act) {
- if (act->type==ACT_OBJECT) {
- oa= act->data;
- oa->flag &= ~(ACT_TORQUE_LOCAL|ACT_DROT_LOCAL); /* this actuator didn't do local/glob rot before */
- }
- act= act->next;
- }
- ob= ob->id.next;
- }
- }
-
- if (main->versionfile <= 204) {
- /* patches for new physics */
- Object *ob= main->object.first;
- bActuator *act;
- bObjectActuator *oa;
- bSound *sound;
- while (ob) {
-
- /* please check this for demo20 files like
- * original Egypt levels etc. converted
- * rotation factor of 50 is not workable */
- act= ob->actuators.first;
- while (act) {
- if (act->type==ACT_OBJECT) {
- oa= act->data;
-
- oa->forceloc[0]*= 25.0f;
- oa->forceloc[1]*= 25.0f;
- oa->forceloc[2]*= 25.0f;
-
- oa->forcerot[0]*= 10.0f;
- oa->forcerot[1]*= 10.0f;
- oa->forcerot[2]*= 10.0f;
- }
- act= act->next;
- }
- ob= ob->id.next;
- }
-
- sound = main->sound.first;
- while (sound) {
- if (sound->volume < 0.01f) {
- sound->volume = 1.0f;
- }
- sound = sound->id.next;
- }
- }
-
- if (main->versionfile <= 205) {
- /* patches for new physics */
- Object *ob= main->object.first;
- bActuator *act;
- bSensor *sens;
- bEditObjectActuator *oa;
- bRaySensor *rs;
- bCollisionSensor *cs;
- while (ob) {
- /* Set anisotropic friction off for old objects,
- * values to 1.0. */
- ob->gameflag &= ~OB_ANISOTROPIC_FRICTION;
- ob->anisotropicFriction[0] = 1.0;
- ob->anisotropicFriction[1] = 1.0;
- ob->anisotropicFriction[2] = 1.0;
-
- act= ob->actuators.first;
- while (act) {
- if (act->type==ACT_EDIT_OBJECT) {
- /* Zero initial velocity for newly
- * added objects */
- oa= act->data;
- oa->linVelocity[0] = 0.0;
- oa->linVelocity[1] = 0.0;
- oa->linVelocity[2] = 0.0;
- oa->localflag = 0;
- }
- act= act->next;
- }
-
- sens= ob->sensors.first;
- while (sens) {
- /* Extra fields for radar sensors. */
- if (sens->type == SENS_RADAR) {
- bRadarSensor *s = sens->data;
- s->range = 10000.0;
- }
-
- /* Pulsing: defaults for new sensors. */
- if (sens->type != SENS_ALWAYS) {
- sens->pulse = 0;
- sens->freq = 0;
- }
- else {
- sens->pulse = 1;
- }
-
- /* Invert: off. */
- sens->invert = 0;
-
- /* Collision and ray: default = trigger
- * on property. The material field can
- * remain empty. */
- if (sens->type == SENS_COLLISION) {
- cs = (bCollisionSensor*) sens->data;
- cs->mode = 0;
- }
- if (sens->type == SENS_RAY) {
- rs = (bRaySensor*) sens->data;
- rs->mode = 0;
- }
- sens = sens->next;
- }
- ob= ob->id.next;
- }
- /* have to check the exact multiplier */
- }
-
- if (main->versionfile <= 211) {
- /* Render setting: per scene, the applicable gamma value
- * can be set. Default is 1.0, which means no
- * correction. */
- bActuator *act;
- bObjectActuator *oa;
- Object *ob;
-
- /* added alpha in obcolor */
- ob= main->object.first;
- while (ob) {
- ob->col[3]= 1.0;
- ob= ob->id.next;
- }
-
- /* added alpha in obcolor */
- ob= main->object.first;
- while (ob) {
- act= ob->actuators.first;
- while (act) {
- if (act->type==ACT_OBJECT) {
- /* multiply velocity with 50 in old files */
- oa= act->data;
- if (fabsf(oa->linearvelocity[0]) >= 0.01f)
- oa->linearvelocity[0] *= 50.0f;
- if (fabsf(oa->linearvelocity[1]) >= 0.01f)
- oa->linearvelocity[1] *= 50.0f;
- if (fabsf(oa->linearvelocity[2]) >= 0.01f)
- oa->linearvelocity[2] *= 50.0f;
- if (fabsf(oa->angularvelocity[0])>=0.01f)
- oa->angularvelocity[0] *= 50.0f;
- if (fabsf(oa->angularvelocity[1])>=0.01f)
- oa->angularvelocity[1] *= 50.0f;
- if (fabsf(oa->angularvelocity[2])>=0.01f)
- oa->angularvelocity[2] *= 50.0f;
- }
- act= act->next;
- }
- ob= ob->id.next;
- }
- }
-
- if (main->versionfile <= 212) {
-
- bSound* sound;
- bProperty *prop;
- Object *ob;
- Mesh *me;
-
- sound = main->sound.first;
- while (sound)
- {
- sound->max_gain = 1.0;
- sound->min_gain = 0.0;
- sound->distance = 1.0;
-
- if (sound->attenuation > 0.0f)
- sound->flags |= SOUND_FLAGS_3D;
- else
- sound->flags &= ~SOUND_FLAGS_3D;
-
- sound = sound->id.next;
- }
-
- ob = main->object.first;
-
- while (ob) {
- prop= ob->prop.first;
- while (prop) {
- if (prop->type == GPROP_TIME) {
- // convert old GPROP_TIME values from int to float
- *((float *)&prop->data) = (float) prop->data;
- }
-
- prop= prop->next;
- }
- ob = ob->id.next;
- }
-
- /* me->subdiv changed to reflect the actual reparametization
- * better, and smeshes were removed - if it was a smesh make
- * it a subsurf, and reset the subdiv level because subsurf
- * takes a lot more work to calculate.
- */
- for (me= main->mesh.first; me; me= me->id.next) {
- if (me->flag&ME_SMESH) {
- me->flag&= ~ME_SMESH;
- me->flag|= ME_SUBSURF;
-
- me->subdiv= 1;
- }
- else {
- if (me->subdiv<2)
- me->subdiv= 1;
- else
- me->subdiv--;
- }
- }
- }
-
- if (main->versionfile <= 220) {
- Object *ob;
- Mesh *me;
-
- ob = main->object.first;
-
- /* adapt form factor in order to get the 'old' physics
- * behavior back...*/
-
- while (ob) {
- /* in future, distinguish between different
- * object bounding shapes */
- ob->formfactor = 0.4f;
- /* patch form factor , note that inertia equiv radius
- * of a rotation symmetrical obj */
- if (ob->inertia != 1.0f) {
- ob->formfactor /= ob->inertia * ob->inertia;
- }
- ob = ob->id.next;
- }
-
- /* Began using alpha component of vertex colors, but
- * old file vertex colors are undefined, reset them
- * to be fully opaque. -zr
- */
- for (me= main->mesh.first; me; me= me->id.next) {
- if (me->mcol) {
- int i;
-
- for (i=0; i<me->totface*4; i++) {
- MCol *mcol= &me->mcol[i];
- mcol->a= 255;
- }
- }
- if (me->tface) {
- int i, j;
-
- for (i=0; i<me->totface; i++) {
- TFace *tf= &((TFace*) me->tface)[i];
-
- for (j=0; j<4; j++) {
- char *col= (char*) &tf->col[j];
-
- col[0]= 255;
- }
- }
- }
- }
- }
- if (main->versionfile <= 221) {
- Scene *sce= main->scene.first;
-
- // new variables for std-alone player and runtime
- while (sce) {
-
- sce->r.xplay= 640;
- sce->r.yplay= 480;
- sce->r.freqplay= 60;
-
- sce= sce->id.next;
- }
-
- }
- if (main->versionfile <= 222) {
- Scene *sce= main->scene.first;
-
- // new variables for std-alone player and runtime
- while (sce) {
-
- sce->r.depth= 32;
-
- sce= sce->id.next;
- }
- }
-
-
- if (main->versionfile <= 223) {
- VFont *vf;
- Image *ima;
- Object *ob;
-
- for (vf= main->vfont.first; vf; vf= vf->id.next) {
- if (strcmp(vf->name+strlen(vf->name)-6, ".Bfont")==0) {
- strcpy(vf->name, FO_BUILTIN_NAME);
- }
- }
-
- /* Old textures animate at 25 FPS */
- for (ima = main->image.first; ima; ima=ima->id.next) {
- ima->animspeed = 25;
- }
-
- /* Zr remapped some keyboard codes to be linear (stupid zr) */
- for (ob= main->object.first; ob; ob= ob->id.next) {
- bSensor *sens;
-
- for (sens= ob->sensors.first; sens; sens= sens->next) {
- if (sens->type==SENS_KEYBOARD) {
- bKeyboardSensor *ks= sens->data;
-
- ks->key= map_223_keybd_code_to_224_keybd_code(ks->key);
- ks->qual= map_223_keybd_code_to_224_keybd_code(ks->qual);
- ks->qual2= map_223_keybd_code_to_224_keybd_code(ks->qual2);
- }
- }
- }
- }
- if (main->versionfile <= 224) {
- bSound* sound;
- Scene *sce;
- Mesh *me;
- bScreen *sc;
-
- for (sound=main->sound.first; sound; sound=sound->id.next) {
- if (sound->packedfile) {
- if (sound->newpackedfile == NULL) {
- sound->newpackedfile = sound->packedfile;
- }
- sound->packedfile = NULL;
- }
- }
- /* Make sure that old subsurf meshes don't have zero subdivision level for rendering */
- for (me=main->mesh.first; me; me=me->id.next) {
- if ((me->flag & ME_SUBSURF) && (me->subdivr==0))
- me->subdivr=me->subdiv;
- }
-
- for (sce= main->scene.first; sce; sce= sce->id.next) {
- sce->r.stereomode = 1; // no stereo
- }
-
- /* some oldfile patch, moved from set_func_space */
- for (sc= main->screen.first; sc; sc= sc->id.next) {
- ScrArea *sa;
-
- for (sa= sc->areabase.first; sa; sa= sa->next) {
- SpaceLink *sl;
-
- for (sl= sa->spacedata.first; sl; sl= sl->next) {
- if (sl->spacetype==SPACE_IPO) {
- SpaceSeq *sseq= (SpaceSeq*) sl;
- sseq->v2d.keeptot= 0;
- }
- }
- }
- }
-
- }
-
-
- if (main->versionfile <= 225) {
- World *wo;
- /* Use Sumo for old games */
- for (wo = main->world.first; wo; wo= wo->id.next) {
- wo->physicsEngine = 2;
- }
- }
-
- if (main->versionfile <= 227) {
- Scene *sce;
- Material *ma;
- bScreen *sc;
- Object *ob;
-
- /* As of now, this insures that the transition from the old Track system
- * to the new full constraint Track is painless for everyone. - theeth
- */
- ob = main->object.first;
-
- while (ob) {
- ListBase *list;
- list = &ob->constraints;
-
- /* check for already existing TrackTo constraint
- * set their track and up flag correctly */
-
- if (list) {
- bConstraint *curcon;
- for (curcon = list->first; curcon; curcon=curcon->next) {
- if (curcon->type == CONSTRAINT_TYPE_TRACKTO) {
- bTrackToConstraint *data = curcon->data;
- data->reserved1 = ob->trackflag;
- data->reserved2 = ob->upflag;
- }
- }
- }
-
- if (ob->type == OB_ARMATURE) {
- if (ob->pose) {
- bConstraint *curcon;
- bPoseChannel *pchan;
- for (pchan = ob->pose->chanbase.first;
- pchan; pchan=pchan->next) {
- for (curcon = pchan->constraints.first;
- curcon; curcon=curcon->next) {
- if (curcon->type == CONSTRAINT_TYPE_TRACKTO) {
- bTrackToConstraint *data = curcon->data;
- data->reserved1 = ob->trackflag;
- data->reserved2 = ob->upflag;
- }
- }
- }
- }
- }
-
- /* Change Ob->Track in real TrackTo constraint */
- do_version_old_trackto_to_constraints(ob);
-
- ob = ob->id.next;
- }
-
-
- for (sce= main->scene.first; sce; sce= sce->id.next) {
- sce->audio.mixrate = 44100;
- sce->audio.flag |= AUDIO_SCRUB;
- sce->r.mode |= R_ENVMAP;
- }
- // init new shader vars
- for (ma= main->mat.first; ma; ma= ma->id.next) {
- ma->refrac= 4.0f;
- ma->roughness= 0.5f;
- ma->param[0]= 0.5f;
- ma->param[1]= 0.1f;
- ma->param[2]= 0.1f;
- ma->param[3]= 0.05f;
- }
- // patch for old wrong max view2d settings, allows zooming out more
- for (sc= main->screen.first; sc; sc= sc->id.next) {
- ScrArea *sa;
-
- for (sa= sc->areabase.first; sa; sa= sa->next) {
- SpaceLink *sl;
-
- for (sl= sa->spacedata.first; sl; sl= sl->next) {
- if (sl->spacetype==SPACE_ACTION) {
- SpaceAction *sac= (SpaceAction *) sl;
- sac->v2d.max[0]= 32000;
- }
- else if (sl->spacetype==SPACE_NLA) {
- SpaceNla *sla= (SpaceNla *) sl;
- sla->v2d.max[0]= 32000;
- }
- }
- }
- }
- }
- if (main->versionfile <= 228) {
- Scene *sce;
- bScreen *sc;
- Object *ob;
-
-
- /* As of now, this insures that the transition from the old Track system
- * to the new full constraint Track is painless for everyone.*/
- ob = main->object.first;
-
- while (ob) {
- ListBase *list;
- list = &ob->constraints;
-
- /* check for already existing TrackTo constraint
- * set their track and up flag correctly */
-
- if (list) {
- bConstraint *curcon;
- for (curcon = list->first; curcon; curcon=curcon->next) {
- if (curcon->type == CONSTRAINT_TYPE_TRACKTO) {
- bTrackToConstraint *data = curcon->data;
- data->reserved1 = ob->trackflag;
- data->reserved2 = ob->upflag;
- }
- }
- }
-
- if (ob->type == OB_ARMATURE) {
- if (ob->pose) {
- bConstraint *curcon;
- bPoseChannel *pchan;
- for (pchan = ob->pose->chanbase.first;
- pchan; pchan=pchan->next) {
- for (curcon = pchan->constraints.first;
- curcon; curcon=curcon->next) {
- if (curcon->type == CONSTRAINT_TYPE_TRACKTO) {
- bTrackToConstraint *data = curcon->data;
- data->reserved1 = ob->trackflag;
- data->reserved2 = ob->upflag;
- }
- }
- }
- }
- }
-
- ob = ob->id.next;
- }
-
- for (sce= main->scene.first; sce; sce= sce->id.next) {
- sce->r.mode |= R_ENVMAP;
- }
-
- // convert old mainb values for new button panels
- for (sc= main->screen.first; sc; sc= sc->id.next) {
- ScrArea *sa;
-
- for (sa= sc->areabase.first; sa; sa= sa->next) {
- SpaceLink *sl;
-
- for (sl= sa->spacedata.first; sl; sl= sl->next) {
- if (sl->spacetype==SPACE_BUTS) {
- SpaceButs *sbuts= (SpaceButs *) sl;
-
- sbuts->v2d.maxzoom= 1.2f;
- sbuts->align= 1; /* horizontal default */
-
- if (sbuts->mainb==BUTS_LAMP) {
- sbuts->mainb= CONTEXT_SHADING;
- //sbuts->tab[CONTEXT_SHADING]= TAB_SHADING_LAMP;
- }
- else if (sbuts->mainb==BUTS_MAT) {
- sbuts->mainb= CONTEXT_SHADING;
- //sbuts->tab[CONTEXT_SHADING]= TAB_SHADING_MAT;
- }
- else if (sbuts->mainb==BUTS_TEX) {
- sbuts->mainb= CONTEXT_SHADING;
- //sbuts->tab[CONTEXT_SHADING]= TAB_SHADING_TEX;
- }
- else if (sbuts->mainb==BUTS_ANIM) {
- sbuts->mainb= CONTEXT_OBJECT;
- }
- else if (sbuts->mainb==BUTS_WORLD) {
- sbuts->mainb= CONTEXT_SCENE;
- //sbuts->tab[CONTEXT_SCENE]= TAB_SCENE_WORLD;
- }
- else if (sbuts->mainb==BUTS_RENDER) {
- sbuts->mainb= CONTEXT_SCENE;
- //sbuts->tab[CONTEXT_SCENE]= TAB_SCENE_RENDER;
- }
- else if (sbuts->mainb==BUTS_GAME) {
- sbuts->mainb= CONTEXT_LOGIC;
- }
- else if (sbuts->mainb==BUTS_FPAINT) {
- sbuts->mainb= CONTEXT_EDITING;
- }
- else if (sbuts->mainb==BUTS_RADIO) {
- sbuts->mainb= CONTEXT_SHADING;
- //sbuts->tab[CONTEXT_SHADING]= TAB_SHADING_RAD;
- }
- else if (sbuts->mainb==BUTS_CONSTRAINT) {
- sbuts->mainb= CONTEXT_OBJECT;
- }
- else if (sbuts->mainb==BUTS_SCRIPT) {
- sbuts->mainb= CONTEXT_OBJECT;
- }
- else if (sbuts->mainb==BUTS_EDIT) {
- sbuts->mainb= CONTEXT_EDITING;
- }
- else sbuts->mainb= CONTEXT_SCENE;
- }
- }
- }
- }
- }
- /* ton: made this 230 instead of 229,
- * to be sure (tuho files) and this is a reliable check anyway
- * nevertheless, we might need to think over a fitness (initialize)
- * check apart from the do_versions() */
-
- if (main->versionfile <= 230) {
- bScreen *sc;
-
- // new variable blockscale, for panels in any area
- for (sc= main->screen.first; sc; sc= sc->id.next) {
- ScrArea *sa;
-
- for (sa= sc->areabase.first; sa; sa= sa->next) {
- SpaceLink *sl;
-
- for (sl= sa->spacedata.first; sl; sl= sl->next) {
- if (sl->blockscale==0.0f) sl->blockscale= 0.7f;
- /* added: 5x better zoom in for action */
- if (sl->spacetype==SPACE_ACTION) {
- SpaceAction *sac= (SpaceAction *)sl;
- sac->v2d.maxzoom= 50;
- }
- }
- }
- }
- }
- if (main->versionfile <= 231) {
- /* new bit flags for showing/hiding grid floor and axes */
- bScreen *sc = main->screen.first;
- while (sc) {
- ScrArea *sa= sc->areabase.first;
- while (sa) {
- SpaceLink *sl= sa->spacedata.first;
- while (sl) {
- if (sl->spacetype==SPACE_VIEW3D) {
- View3D *v3d= (View3D*) sl;
-
- if (v3d->gridflag==0) {
- v3d->gridflag |= V3D_SHOW_X;
- v3d->gridflag |= V3D_SHOW_Y;
- v3d->gridflag |= V3D_SHOW_FLOOR;
- v3d->gridflag &= ~V3D_SHOW_Z;
- }
- }
- sl= sl->next;
- }
- sa= sa->next;
- }
- sc= sc->id.next;
- }
- }
- if (main->versionfile <= 231) {
- Material *ma= main->mat.first;
- bScreen *sc = main->screen.first;
- Scene *sce;
- Lamp *la;
- World *wrld;
-
- /* introduction of raytrace */
- while (ma) {
- if (ma->fresnel_tra_i==0.0f) ma->fresnel_tra_i= 1.25f;
- if (ma->fresnel_mir_i==0.0f) ma->fresnel_mir_i= 1.25f;
-
- ma->ang= 1.0;
- ma->ray_depth= 2;
- ma->ray_depth_tra= 2;
- ma->fresnel_tra= 0.0;
- ma->fresnel_mir= 0.0;
-
- ma= ma->id.next;
- }
- sce= main->scene.first;
- while (sce) {
- if (sce->r.gauss==0.0f) sce->r.gauss= 1.0f;
- sce= sce->id.next;
- }
- la= main->lamp.first;
- while (la) {
- if (la->k==0.0f) la->k= 1.0;
- if (la->ray_samp==0) la->ray_samp= 1;
- if (la->ray_sampy==0) la->ray_sampy= 1;
- if (la->ray_sampz==0) la->ray_sampz= 1;
- if (la->area_size==0.0f) la->area_size= 1.0f;
- if (la->area_sizey==0.0f) la->area_sizey= 1.0f;
- if (la->area_sizez==0.0f) la->area_sizez= 1.0f;
- la= la->id.next;
- }
- wrld= main->world.first;
- while (wrld) {
- if (wrld->range==0.0f) {
- wrld->range= 1.0f/wrld->exposure;
- }
- wrld= wrld->id.next;
- }
-
- /* new bit flags for showing/hiding grid floor and axes */
-
- while (sc) {
- ScrArea *sa= sc->areabase.first;
- while (sa) {
- SpaceLink *sl= sa->spacedata.first;
- while (sl) {
- if (sl->spacetype==SPACE_VIEW3D) {
- View3D *v3d= (View3D*) sl;
-
- if (v3d->gridflag==0) {
- v3d->gridflag |= V3D_SHOW_X;
- v3d->gridflag |= V3D_SHOW_Y;
- v3d->gridflag |= V3D_SHOW_FLOOR;
- v3d->gridflag &= ~V3D_SHOW_Z;
- }
- }
- sl= sl->next;
- }
- sa= sa->next;
- }
- sc= sc->id.next;
- }
- }
- if (main->versionfile <= 232) {
- Tex *tex= main->tex.first;
- World *wrld= main->world.first;
- bScreen *sc;
- Scene *sce;
-
- while (tex) {
- if ((tex->flag & (TEX_CHECKER_ODD+TEX_CHECKER_EVEN))==0) {
- tex->flag |= TEX_CHECKER_ODD;
- }
- /* copied from kernel texture.c */
- if (tex->ns_outscale==0.0f) {
- /* musgrave */
- tex->mg_H = 1.0f;
- tex->mg_lacunarity = 2.0f;
- tex->mg_octaves = 2.0f;
- tex->mg_offset = 1.0f;
- tex->mg_gain = 1.0f;
- tex->ns_outscale = 1.0f;
- /* distnoise */
- tex->dist_amount = 1.0f;
- /* voronoi */
- tex->vn_w1 = 1.0f;
- tex->vn_mexp = 2.5f;
- }
- tex= tex->id.next;
- }
-
- while (wrld) {
- if (wrld->aodist==0.0f) {
- wrld->aodist= 10.0f;
- wrld->aobias= 0.05f;
- }
- if (wrld->aosamp==0) wrld->aosamp= 5;
- if (wrld->aoenergy==0.0f) wrld->aoenergy= 1.0f;
- wrld= wrld->id.next;
- }
-
-
- // new variable blockscale, for panels in any area, do again because new
- // areas didnt initialize it to 0.7 yet
- for (sc= main->screen.first; sc; sc= sc->id.next) {
- ScrArea *sa;
- for (sa= sc->areabase.first; sa; sa= sa->next) {
- SpaceLink *sl;
- for (sl= sa->spacedata.first; sl; sl= sl->next) {
- if (sl->blockscale==0.0f) sl->blockscale= 0.7f;
-
- /* added: 5x better zoom in for nla */
- if (sl->spacetype==SPACE_NLA) {
- SpaceNla *snla= (SpaceNla *)sl;
- snla->v2d.maxzoom= 50;
- }
- }
- }
- }
- sce= main->scene.first;
- while (sce) {
- if (sce->r.ocres==0) sce->r.ocres= 64;
- sce= sce->id.next;
- }
-
- }
- if (main->versionfile <= 233) {
- bScreen *sc;
- Material *ma= main->mat.first;
- /* Object *ob= main->object.first; */
-
- while (ma) {
- if (ma->rampfac_col==0.0f) ma->rampfac_col= 1.0;
- if (ma->rampfac_spec==0.0f) ma->rampfac_spec= 1.0;
- if (ma->pr_lamp==0) ma->pr_lamp= 3;
- ma= ma->id.next;
- }
-
- /* this should have been done loooong before! */
-#if 0 /* deprecated in 2.5+ */
- while (ob) {
- if (ob->ipowin==0) ob->ipowin= ID_OB;
- ob= ob->id.next;
- }
-#endif
- for (sc= main->screen.first; sc; sc= sc->id.next) {
- ScrArea *sa;
- for (sa= sc->areabase.first; sa; sa= sa->next) {
- SpaceLink *sl;
- for (sl= sa->spacedata.first; sl; sl= sl->next) {
- if (sl->spacetype==SPACE_VIEW3D) {
- View3D *v3d= (View3D *)sl;
- v3d->flag |= V3D_SELECT_OUTLINE;
- }
- }
- }
- }
- }
-
-
-
-
- if (main->versionfile <= 234) {
- World *wo;
- bScreen *sc;
-
- // force sumo engine to be active
- for (wo = main->world.first; wo; wo= wo->id.next) {
- if (wo->physicsEngine==0) wo->physicsEngine = 2;
- }
-
- for (sc= main->screen.first; sc; sc= sc->id.next) {
- ScrArea *sa;
- for (sa= sc->areabase.first; sa; sa= sa->next) {
- SpaceLink *sl;
- for (sl= sa->spacedata.first; sl; sl= sl->next) {
- if (sl->spacetype==SPACE_VIEW3D) {
- View3D *v3d= (View3D *)sl;
- v3d->flag |= V3D_ZBUF_SELECT;
- }
- else if (sl->spacetype==SPACE_TEXT) {
- SpaceText *st= (SpaceText *)sl;
- if (st->tabnumber==0) st->tabnumber= 2;
- }
- }
- }
- }
- }
- if (main->versionfile <= 235) {
- Tex *tex= main->tex.first;
- Scene *sce= main->scene.first;
- Sequence *seq;
- Editing *ed;
-
- while (tex) {
- if (tex->nabla==0.0f) tex->nabla= 0.025f;
- tex= tex->id.next;
- }
- while (sce) {
- ed= sce->ed;
- if (ed) {
- SEQ_BEGIN(sce->ed, seq) {
- if (seq->type==SEQ_IMAGE || seq->type==SEQ_MOVIE)
- seq->flag |= SEQ_MAKE_PREMUL;
- }
- SEQ_END
- }
-
- sce= sce->id.next;
- }
- }
- if (main->versionfile <= 236) {
- Object *ob;
- Camera *cam= main->camera.first;
- Material *ma;
- bScreen *sc;
-
- while (cam) {
- if (cam->ortho_scale==0.0f) {
- cam->ortho_scale= 256.0f/cam->lens;
- if (cam->type==CAM_ORTHO) printf("NOTE: ortho render has changed, tweak new Camera 'scale' value.\n");
- }
- cam= cam->id.next;
- }
- /* set manipulator type */
- /* force oops draw if depgraph was set*/
- /* set time line var */
- for (sc= main->screen.first; sc; sc= sc->id.next) {
- ScrArea *sa;
- for (sa= sc->areabase.first; sa; sa= sa->next) {
- SpaceLink *sl;
- for (sl= sa->spacedata.first; sl; sl= sl->next) {
- if (sl->spacetype==SPACE_VIEW3D) {
- View3D *v3d= (View3D *)sl;
- if (v3d->twtype==0) v3d->twtype= V3D_MANIP_TRANSLATE;
- }
- }
- }
- }
- // init new shader vars
- for (ma= main->mat.first; ma; ma= ma->id.next) {
- if (ma->darkness==0.0f) {
- ma->rms=0.1f;
- ma->darkness=1.0f;
- }
- }
-
- /* softbody init new vars */
- for (ob= main->object.first; ob; ob= ob->id.next) {
- if (ob->soft) {
- if (ob->soft->defgoal==0.0f) ob->soft->defgoal= 0.7f;
- if (ob->soft->physics_speed==0.0f) ob->soft->physics_speed= 1.0f;
-
- if (ob->soft->interval==0) {
- ob->soft->interval= 2;
- ob->soft->sfra= 1;
- ob->soft->efra= 100;
- }
- }
- if (ob->soft && ob->soft->vertgroup==0) {
- bDeformGroup *locGroup = defgroup_find_name(ob, "SOFTGOAL");
- if (locGroup) {
- /* retrieve index for that group */
- ob->soft->vertgroup = 1 + BLI_findindex(&ob->defbase, locGroup);
- }
- }
- }
- }
- if (main->versionfile <= 237) {
- bArmature *arm;
- bConstraint *con;
- Object *ob;
- Bone *bone;
-
- // armature recode checks
- for (arm= main->armature.first; arm; arm= arm->id.next) {
- where_is_armature(arm);
-
- for (bone= arm->bonebase.first; bone; bone= bone->next)
- do_version_bone_head_tail_237(bone);
- }
- for (ob= main->object.first; ob; ob= ob->id.next) {
- if (ob->parent) {
- Object *parent= newlibadr(fd, lib, ob->parent);
- if (parent && parent->type==OB_LATTICE)
- ob->partype = PARSKEL;
- }
-
- // btw. armature_rebuild_pose is further only called on leave editmode
- if (ob->type==OB_ARMATURE) {
- if (ob->pose)
- ob->pose->flag |= POSE_RECALC;
- ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME; // cannot call stuff now (pointers!), done in setup_app_data
-
- /* new generic xray option */
- arm= newlibadr(fd, lib, ob->data);
- if (arm->flag & ARM_DRAWXRAY) {
- ob->dtx |= OB_DRAWXRAY;
- }
- }
- else if (ob->type==OB_MESH) {
- Mesh *me = newlibadr(fd, lib, ob->data);
-
- if ((me->flag&ME_SUBSURF)) {
- SubsurfModifierData *smd = (SubsurfModifierData*) modifier_new(eModifierType_Subsurf);
-
- smd->levels = MAX2(1, me->subdiv);
- smd->renderLevels = MAX2(1, me->subdivr);
- smd->subdivType = me->subsurftype;
-
- smd->modifier.mode = 0;
- if (me->subdiv!=0)
- smd->modifier.mode |= 1;
- if (me->subdivr!=0)
- smd->modifier.mode |= 2;
- if (me->flag&ME_OPT_EDGES)
- smd->flags |= eSubsurfModifierFlag_ControlEdges;
-
- BLI_addtail(&ob->modifiers, smd);
-
- modifier_unique_name(&ob->modifiers, (ModifierData*)smd);
- }
- }
-
- // follow path constraint needs to set the 'path' option in curves...
- for (con=ob->constraints.first; con; con= con->next) {
- if (con->type==CONSTRAINT_TYPE_FOLLOWPATH) {
- bFollowPathConstraint *data = con->data;
- Object *obc= newlibadr(fd, lib, data->tar);
-
- if (obc && obc->type==OB_CURVE) {
- Curve *cu= newlibadr(fd, lib, obc->data);
- if (cu) cu->flag |= CU_PATH;
- }
- }
- }
- }
- }
- if (main->versionfile <= 238) {
- Lattice *lt;
- Object *ob;
- bArmature *arm;
- Mesh *me;
- Key *key;
- Scene *sce= main->scene.first;
-
- while (sce) {
- if (sce->toolsettings == NULL) {
- sce->toolsettings = MEM_callocN(sizeof(struct ToolSettings),"Tool Settings Struct");
- sce->toolsettings->cornertype=0;
- sce->toolsettings->degr = 90;
- sce->toolsettings->step = 9;
- sce->toolsettings->turn = 1;
- sce->toolsettings->extr_offs = 1;
- sce->toolsettings->doublimit = 0.001f;
- sce->toolsettings->segments = 32;
- sce->toolsettings->rings = 32;
- sce->toolsettings->vertices = 32;
- }
- sce= sce->id.next;
- }
-
- for (lt=main->latt.first; lt; lt=lt->id.next) {
- if (lt->fu==0.0f && lt->fv==0.0f && lt->fw==0.0f) {
- calc_lat_fudu(lt->flag, lt->pntsu, &lt->fu, &lt->du);
- calc_lat_fudu(lt->flag, lt->pntsv, &lt->fv, &lt->dv);
- calc_lat_fudu(lt->flag, lt->pntsw, &lt->fw, &lt->dw);
- }
- }
-
- for (ob=main->object.first; ob; ob= ob->id.next) {
- ModifierData *md;
- PartEff *paf;
-
- for (md=ob->modifiers.first; md; md=md->next) {
- if (md->type==eModifierType_Subsurf) {
- SubsurfModifierData *smd = (SubsurfModifierData*) md;
-
- smd->flags &= ~(eSubsurfModifierFlag_Incremental|eSubsurfModifierFlag_DebugIncr);
- }
- }
-
- if ((ob->softflag&OB_SB_ENABLE) && !modifiers_findByType(ob, eModifierType_Softbody)) {
- if (ob->softflag&OB_SB_POSTDEF) {
- md = ob->modifiers.first;
-
- while (md && modifierType_getInfo(md->type)->type==eModifierTypeType_OnlyDeform) {
- md = md->next;
- }
-
- BLI_insertlinkbefore(&ob->modifiers, md, modifier_new(eModifierType_Softbody));
- }
- else {
- BLI_addhead(&ob->modifiers, modifier_new(eModifierType_Softbody));
- }
-
- ob->softflag &= ~OB_SB_ENABLE;
- }
- if (ob->pose) {
- bPoseChannel *pchan;
- bConstraint *con;
- for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
- // note, pchan->bone is also lib-link stuff
- if (pchan->limitmin[0] == 0.0f && pchan->limitmax[0] == 0.0f) {
- pchan->limitmin[0]= pchan->limitmin[1]= pchan->limitmin[2]= -180.0f;
- pchan->limitmax[0]= pchan->limitmax[1]= pchan->limitmax[2]= 180.0f;
-
- for (con= pchan->constraints.first; con; con= con->next) {
- if (con->type == CONSTRAINT_TYPE_KINEMATIC) {
- bKinematicConstraint *data = (bKinematicConstraint*)con->data;
- data->weight = 1.0f;
- data->orientweight = 1.0f;
- data->flag &= ~CONSTRAINT_IK_ROT;
-
- /* enforce conversion from old IK_TOPARENT to rootbone index */
- data->rootbone= -1;
-
- /* update_pose_etc handles rootbone==-1 */
- ob->pose->flag |= POSE_RECALC;
- }
- }
- }
- }
- }
-
- paf = do_version_give_parteff_245(ob);
- if (paf) {
- if (paf->disp == 0)
- paf->disp = 100;
- if (paf->speedtex == 0)
- paf->speedtex = 8;
- if (paf->omat == 0)
- paf->omat = 1;
- }
- }
-
- for (arm=main->armature.first; arm; arm= arm->id.next) {
- bone_version_238(&arm->bonebase);
- arm->deformflag |= ARM_DEF_VGROUP;
- }
-
- for (me=main->mesh.first; me; me= me->id.next) {
- if (!me->medge) {
- make_edges(me, 1); /* 1 = use mface->edcode */
- }
- else {
- mesh_strip_loose_faces(me);
- }
- }
-
- for (key= main->key.first; key; key= key->id.next) {
- KeyBlock *kb;
- int index = 1;
-
- for (kb= key->block.first; kb; kb= kb->next) {
- if (kb==key->refkey) {
- if (kb->name[0]==0)
- strcpy(kb->name, "Basis");
- }
- else {
- if (kb->name[0]==0) {
- BLI_snprintf(kb->name, sizeof(kb->name), "Key %d", index);
- }
- index++;
- }
- }
- }
- }
- if (main->versionfile <= 239) {
- bArmature *arm;
- Object *ob;
- Scene *sce= main->scene.first;
- Camera *cam= main->camera.first;
- Material *ma= main->mat.first;
- int set_passepartout= 0;
-
- /* deformflag is local in modifier now */
- for (ob=main->object.first; ob; ob= ob->id.next) {
- ModifierData *md;
-
- for (md=ob->modifiers.first; md; md=md->next) {
- if (md->type==eModifierType_Armature) {
- ArmatureModifierData *amd = (ArmatureModifierData*) md;
- if (amd->object && amd->deformflag==0) {
- Object *oba= newlibadr(fd, lib, amd->object);
- arm= newlibadr(fd, lib, oba->data);
- amd->deformflag= arm->deformflag;
- }
- }
- }
- }
-
- /* updating stepsize for ghost drawing */
- for (arm= main->armature.first; arm; arm= arm->id.next) {
- if (arm->ghostsize==0) arm->ghostsize=1;
- bone_version_239(&arm->bonebase);
- if (arm->layer==0) arm->layer= 1;
- }
-
- for (;sce;sce= sce->id.next) {
- /* make 'innervert' the default subdivide type, for backwards compat */
- sce->toolsettings->cornertype=1;
-
- if (sce->r.scemode & R_PASSEPARTOUT) {
- set_passepartout= 1;
- sce->r.scemode &= ~R_PASSEPARTOUT;
- }
- /* gauss is filter variable now */
- if (sce->r.mode & R_GAUSS) {
- sce->r.filtertype= R_FILTER_GAUSS;
- sce->r.mode &= ~R_GAUSS;
- }
- }
-
- for (;cam; cam= cam->id.next) {
- if (set_passepartout)
- cam->flag |= CAM_SHOWPASSEPARTOUT;
-
- /* make sure old cameras have title safe on */
- if (!(cam->flag & CAM_SHOWTITLESAFE))
- cam->flag |= CAM_SHOWTITLESAFE;
-
- /* set an appropriate camera passepartout alpha */
- if (!(cam->passepartalpha)) cam->passepartalpha = 0.2f;
- }
-
- for (; ma; ma= ma->id.next) {
- if (ma->strand_sta==0.0f) {
- ma->strand_sta= ma->strand_end= 1.0f;
- ma->mode |= MA_TANGENT_STR;
- }
- if (ma->mode & MA_TRACEBLE) ma->mode |= MA_SHADBUF;
- }
- }
-
- if (main->versionfile <= 241) {
- Object *ob;
- Tex *tex;
- Scene *sce;
- World *wo;
- Lamp *la;
- Material *ma;
- bArmature *arm;
- bNodeTree *ntree;
-
- for (wo = main->world.first; wo; wo= wo->id.next) {
- /* Migrate to Bullet for games, except for the NaN versions */
- /* People can still explicitly choose for Sumo (after 2.42 is out) */
- if (main->versionfile > 225)
- wo->physicsEngine = WOPHY_BULLET;
- if (WO_AODIST == wo->aomode)
- wo->aocolor= WO_AOPLAIN;
- }
-
- /* updating layers still */
- for (arm= main->armature.first; arm; arm= arm->id.next) {
- bone_version_239(&arm->bonebase);
- if (arm->layer==0) arm->layer= 1;
- }
- for (sce= main->scene.first; sce; sce= sce->id.next) {
- if (sce->audio.mixrate==0) sce->audio.mixrate= 44100;
-
- if (sce->r.xparts<2) sce->r.xparts= 4;
- if (sce->r.yparts<2) sce->r.yparts= 4;
- /* adds default layer */
- if (sce->r.layers.first==NULL)
- scene_add_render_layer(sce, NULL);
- else {
- SceneRenderLayer *srl;
- /* new layer flag for sky, was default for solid */
- for (srl= sce->r.layers.first; srl; srl= srl->next) {
- if (srl->layflag & SCE_LAY_SOLID)
- srl->layflag |= SCE_LAY_SKY;
- srl->passflag &= (SCE_PASS_COMBINED|SCE_PASS_Z|SCE_PASS_NORMAL|SCE_PASS_VECTOR);
- }
- }
-
- /* node version changes */
- if (sce->nodetree)
- ntree_version_241(sce->nodetree);
-
- /* uv calculation options moved to toolsettings */
- if (sce->toolsettings->uvcalc_radius == 0.0f) {
- sce->toolsettings->uvcalc_radius = 1.0f;
- sce->toolsettings->uvcalc_cubesize = 1.0f;
- sce->toolsettings->uvcalc_mapdir = 1;
- sce->toolsettings->uvcalc_mapalign = 1;
- sce->toolsettings->uvcalc_flag = UVCALC_FILLHOLES;
- sce->toolsettings->unwrapper = 1;
- }
-
- if (sce->r.mode & R_PANORAMA) {
- /* all these checks to ensure saved files with svn version keep working... */
- if (sce->r.xsch < sce->r.ysch) {
- Object *obc= newlibadr(fd, lib, sce->camera);
- if (obc && obc->type==OB_CAMERA) {
- Camera *cam= newlibadr(fd, lib, obc->data);
- if (cam->lens>=10.0f) {
- sce->r.xsch*= sce->r.xparts;
- cam->lens*= (float)sce->r.ysch/(float)sce->r.xsch;
- }
- }
- }
- }
- }
-
- for (ntree= main->nodetree.first; ntree; ntree= ntree->id.next)
- ntree_version_241(ntree);
-
- for (la= main->lamp.first; la; la= la->id.next)
- if (la->buffers==0)
- la->buffers= 1;
-
- for (tex= main->tex.first; tex; tex= tex->id.next) {
- if (tex->env && tex->env->viewscale==0.0f)
- tex->env->viewscale= 1.0f;
-// tex->imaflag |= TEX_GAUSS_MIP;
- }
-
- /* for empty drawsize and drawtype */
- for (ob=main->object.first; ob; ob= ob->id.next) {
- if (ob->empty_drawsize==0.0f) {
- ob->empty_drawtype = OB_ARROWS;
- ob->empty_drawsize = 1.0;
- }
- }
-
- for (ma= main->mat.first; ma; ma= ma->id.next) {
- /* stucci returns intensity from now on */
- int a;
- for (a=0; a<MAX_MTEX; a++) {
- if (ma->mtex[a] && ma->mtex[a]->tex) {
- tex= newlibadr(fd, lib, ma->mtex[a]->tex);
- if (tex && tex->type==TEX_STUCCI)
- ma->mtex[a]->mapto &= ~(MAP_COL|MAP_SPEC|MAP_REF);
- }
- }
- /* transmissivity defaults */
- if (ma->tx_falloff==0.0f) ma->tx_falloff= 1.0f;
- }
-
- /* during 2.41 images with this name were used for viewer node output, lets fix that */
- if (main->versionfile == 241) {
- Image *ima;
- for (ima= main->image.first; ima; ima= ima->id.next)
- if (strcmp(ima->name, "Compositor")==0) {
- strcpy(ima->id.name+2, "Viewer Node");
- strcpy(ima->name, "Viewer Node");
- }
- }
- }
-
- if (main->versionfile <= 242) {
- Scene *sce;
- bScreen *sc;
- Object *ob;
- Curve *cu;
- Material *ma;
- Mesh *me;
- Group *group;
- Nurb *nu;
- BezTriple *bezt;
- BPoint *bp;
- bNodeTree *ntree;
- int a;
-
- for (sc= main->screen.first; sc; sc= sc->id.next) {
- ScrArea *sa;
- sa= sc->areabase.first;
- while (sa) {
- SpaceLink *sl;
-
- for (sl= sa->spacedata.first; sl; sl= sl->next) {
- if (sl->spacetype==SPACE_VIEW3D) {
- View3D *v3d= (View3D*) sl;
- if (v3d->gridsubdiv == 0)
- v3d->gridsubdiv = 10;
- }
- }
- sa = sa->next;
- }
- }
-
- for (sce= main->scene.first; sce; sce= sce->id.next) {
- if (sce->toolsettings->select_thresh == 0.0f)
- sce->toolsettings->select_thresh= 0.01f;
- if (sce->toolsettings->clean_thresh == 0.0f)
- sce->toolsettings->clean_thresh = 0.1f;
-
- if (sce->r.threads==0) {
- if (sce->r.mode & R_THREADS)
- sce->r.threads= 2;
- else
- sce->r.threads= 1;
- }
- if (sce->nodetree)
- ntree_version_242(sce->nodetree);
- }
-
- for (ntree= main->nodetree.first; ntree; ntree= ntree->id.next)
- ntree_version_242(ntree);
-
- /* add default radius values to old curve points */
- for (cu= main->curve.first; cu; cu= cu->id.next) {
- for (nu= cu->nurb.first; nu; nu= nu->next) {
- if (nu) {
- if (nu->bezt) {
- for (bezt=nu->bezt, a=0; a<nu->pntsu; a++, bezt++) {
- if (!bezt->radius) bezt->radius= 1.0;
- }
- }
- else if (nu->bp) {
- for (bp=nu->bp, a=0; a<nu->pntsu*nu->pntsv; a++, bp++) {
- if (!bp->radius) bp->radius= 1.0;
- }
- }
- }
- }
- }
-
- for (ob = main->object.first; ob; ob= ob->id.next) {
- ModifierData *md;
- ListBase *list;
- list = &ob->constraints;
-
- /* check for already existing MinMax (floor) constraint
- * and update the sticky flagging */
-
- if (list) {
- bConstraint *curcon;
- for (curcon = list->first; curcon; curcon=curcon->next) {
- switch (curcon->type) {
- case CONSTRAINT_TYPE_MINMAX:
- {
- bMinMaxConstraint *data = curcon->data;
- if (data->sticky==1)
- data->flag |= MINMAX_STICKY;
- else
- data->flag &= ~MINMAX_STICKY;
- }
- break;
- case CONSTRAINT_TYPE_ROTLIKE:
- {
- bRotateLikeConstraint *data = curcon->data;
-
- /* version patch from buttons_object.c */
- if (data->flag==0)
- data->flag = ROTLIKE_X|ROTLIKE_Y|ROTLIKE_Z;
- }
- break;
- }
- }
- }
-
- if (ob->type == OB_ARMATURE) {
- if (ob->pose) {
- bConstraint *curcon;
- bPoseChannel *pchan;
- for (pchan = ob->pose->chanbase.first; pchan; pchan=pchan->next) {
- for (curcon = pchan->constraints.first; curcon; curcon=curcon->next) {
- switch (curcon->type) {
- case CONSTRAINT_TYPE_MINMAX:
- {
- bMinMaxConstraint *data = curcon->data;
- if (data->sticky==1)
- data->flag |= MINMAX_STICKY;
- else
- data->flag &= ~MINMAX_STICKY;
- }
- break;
- case CONSTRAINT_TYPE_KINEMATIC:
- {
- bKinematicConstraint *data = curcon->data;
- if (!(data->flag & CONSTRAINT_IK_POS)) {
- data->flag |= CONSTRAINT_IK_POS;
- data->flag |= CONSTRAINT_IK_STRETCH;
- }
- }
- break;
- case CONSTRAINT_TYPE_ROTLIKE:
- {
- bRotateLikeConstraint *data = curcon->data;
-
- /* version patch from buttons_object.c */
- if (data->flag==0)
- data->flag = ROTLIKE_X|ROTLIKE_Y|ROTLIKE_Z;
- }
- break;
- }
- }
- }
- }
- }
-
- /* copy old object level track settings to curve modifers */
- for (md=ob->modifiers.first; md; md=md->next) {
- if (md->type==eModifierType_Curve) {
- CurveModifierData *cmd = (CurveModifierData*) md;
-
- if (cmd->defaxis == 0) cmd->defaxis = ob->trackflag+1;
- }
- }
-
- }
-
- for (ma = main->mat.first; ma; ma= ma->id.next) {
- if (ma->shad_alpha==0.0f)
- ma->shad_alpha= 1.0f;
- if (ma->nodetree)
- ntree_version_242(ma->nodetree);
- }
-
- for (me=main->mesh.first; me; me=me->id.next)
- customdata_version_242(me);
-
- for (group= main->group.first; group; group= group->id.next)
- if (group->layer==0)
- group->layer= (1<<20)-1;
-
- /* now, subversion control! */
- if (main->subversionfile < 3) {
- Image *ima;
- Tex *tex;
-
- /* Image refactor initialize */
- for (ima= main->image.first; ima; ima= ima->id.next) {
- ima->source= IMA_SRC_FILE;
- ima->type= IMA_TYPE_IMAGE;
-
- ima->gen_x= 256; ima->gen_y= 256;
- ima->gen_type= 1;
-
- if (0==strncmp(ima->id.name+2, "Viewer Node", sizeof(ima->id.name)-2)) {
- ima->source= IMA_SRC_VIEWER;
- ima->type= IMA_TYPE_COMPOSITE;
- }
- if (0==strncmp(ima->id.name+2, "Render Result", sizeof(ima->id.name)-2)) {
- ima->source= IMA_SRC_VIEWER;
- ima->type= IMA_TYPE_R_RESULT;
- }
-
- }
- for (tex= main->tex.first; tex; tex= tex->id.next) {
- if (tex->type==TEX_IMAGE && tex->ima) {
- ima= newlibadr(fd, lib, tex->ima);
- if (tex->imaflag & TEX_ANIM5_)
- ima->source= IMA_SRC_MOVIE;
- if (tex->imaflag & TEX_FIELDS_)
- ima->flag |= IMA_FIELDS;
- if (tex->imaflag & TEX_STD_FIELD_)
- ima->flag |= IMA_STD_FIELD;
- }
- tex->iuser.frames= tex->frames;
- tex->iuser.fie_ima= (char)tex->fie_ima;
- tex->iuser.offset= tex->offset;
- tex->iuser.sfra= tex->sfra;
- tex->iuser.cycl= (tex->imaflag & TEX_ANIMCYCLIC_)!=0;
- }
- for (sce= main->scene.first; sce; sce= sce->id.next) {
- if (sce->nodetree)
- do_version_ntree_242_2(sce->nodetree);
- }
- for (ntree= main->nodetree.first; ntree; ntree= ntree->id.next)
- do_version_ntree_242_2(ntree);
- for (ma = main->mat.first; ma; ma= ma->id.next)
- if (ma->nodetree)
- do_version_ntree_242_2(ma->nodetree);
-
- for (sc= main->screen.first; sc; sc= sc->id.next) {
- ScrArea *sa;
- for (sa= sc->areabase.first; sa; sa= sa->next) {
- SpaceLink *sl;
- for (sl= sa->spacedata.first; sl; sl= sl->next) {
- if (sl->spacetype==SPACE_IMAGE)
- ((SpaceImage *)sl)->iuser.fie_ima= 2;
- else if (sl->spacetype==SPACE_VIEW3D) {
- View3D *v3d= (View3D *)sl;
- BGpic *bgpic;
- for (bgpic= v3d->bgpicbase.first; bgpic; bgpic= bgpic->next)
- bgpic->iuser.fie_ima= 2;
- }
- }
- }
- }
- }
-
- if (main->subversionfile < 4) {
- for (sce= main->scene.first; sce; sce= sce->id.next) {
- sce->r.bake_mode= 1; /* prevent to include render stuff here */
- sce->r.bake_filter= 2;
- sce->r.bake_osa= 5;
- sce->r.bake_flag= R_BAKE_CLEAR;
- }
- }
-
- if (main->subversionfile < 5) {
- for (sce= main->scene.first; sce; sce= sce->id.next) {
- /* improved triangle to quad conversion settings */
- if (sce->toolsettings->jointrilimit==0.0f)
- sce->toolsettings->jointrilimit= 0.8f;
- }
- }
- }
- if (main->versionfile <= 243) {
- Object *ob= main->object.first;
- Material *ma;
-
- for (ma=main->mat.first; ma; ma= ma->id.next) {
- if (ma->sss_scale==0.0f) {
- ma->sss_radius[0]= 1.0f;
- ma->sss_radius[1]= 1.0f;
- ma->sss_radius[2]= 1.0f;
- ma->sss_col[0]= 0.8f;
- ma->sss_col[1]= 0.8f;
- ma->sss_col[2]= 0.8f;
- ma->sss_error= 0.05f;
- ma->sss_scale= 0.1f;
- ma->sss_ior= 1.3f;
- ma->sss_colfac= 1.0f;
- ma->sss_texfac= 0.0f;
- }
- if (ma->sss_front==0 && ma->sss_back==0) {
- ma->sss_front= 1.0f;
- ma->sss_back= 1.0f;
- }
- if (ma->sss_col[0]==0 && ma->sss_col[1]==0 && ma->sss_col[2]==0) {
- ma->sss_col[0]= ma->r;
- ma->sss_col[1]= ma->g;
- ma->sss_col[2]= ma->b;
- }
- }
-
- for (; ob; ob= ob->id.next) {
- bDeformGroup *curdef;
-
- for (curdef= ob->defbase.first; curdef; curdef=curdef->next) {
- /* replace an empty-string name with unique name */
- if (curdef->name[0] == '\0') {
- defgroup_unique_name(curdef, ob);
- }
- }
-
- if (main->versionfile < 243 || main->subversionfile < 1) {
- ModifierData *md;
-
- /* translate old mirror modifier axis values to new flags */
- for (md=ob->modifiers.first; md; md=md->next) {
- if (md->type==eModifierType_Mirror) {
- MirrorModifierData *mmd = (MirrorModifierData*) md;
-
- switch(mmd->axis)
- {
- case 0:
- mmd->flag |= MOD_MIR_AXIS_X;
- break;
- case 1:
- mmd->flag |= MOD_MIR_AXIS_Y;
- break;
- case 2:
- mmd->flag |= MOD_MIR_AXIS_Z;
- break;
- }
-
- mmd->axis = 0;
- }
- }
- }
- }
-
- /* render layer added, this is not the active layer */
- if (main->versionfile <= 243 || main->subversionfile < 2) {
- Mesh *me;
- for (me=main->mesh.first; me; me=me->id.next)
- customdata_version_243(me);
- }
-
- }
-
- if (main->versionfile <= 244) {
- Scene *sce;
- bScreen *sc;
- Lamp *la;
- World *wrld;
-
- if (main->versionfile != 244 || main->subversionfile < 2) {
- for (sce= main->scene.first; sce; sce= sce->id.next)
- sce->r.mode |= R_SSS;
-
- /* correct older action editors - incorrect scrolling */
- for (sc= main->screen.first; sc; sc= sc->id.next) {
- ScrArea *sa;
- sa= sc->areabase.first;
- while (sa) {
- SpaceLink *sl;
-
- for (sl= sa->spacedata.first; sl; sl= sl->next) {
- if (sl->spacetype==SPACE_ACTION) {
- SpaceAction *saction= (SpaceAction*) sl;
-
- saction->v2d.tot.ymin = -1000.0;
- saction->v2d.tot.ymax = 0.0;
-
- saction->v2d.cur.ymin = -75.0;
- saction->v2d.cur.ymax = 5.0;
- }
- }
- sa = sa->next;
- }
- }
- }
- if (main->versionfile != 244 || main->subversionfile < 3) {
- /* constraints recode version patch used to be here. Moved to 245 now... */
-
-
- for (wrld=main->world.first; wrld; wrld= wrld->id.next) {
- if (wrld->mode & WO_AMB_OCC)
- wrld->ao_samp_method = WO_AOSAMP_CONSTANT;
- else
- wrld->ao_samp_method = WO_AOSAMP_HAMMERSLEY;
-
- wrld->ao_adapt_thresh = 0.005f;
- }
-
- for (la=main->lamp.first; la; la= la->id.next) {
- if (la->type == LA_AREA)
- la->ray_samp_method = LA_SAMP_CONSTANT;
- else
- la->ray_samp_method = LA_SAMP_HALTON;
-
- la->adapt_thresh = 0.001f;
- }
- }
- }
- if (main->versionfile <= 245) {
- Scene *sce;
- Object *ob;
- Image *ima;
- Lamp *la;
- Material *ma;
- ParticleSettings *part;
- World *wrld;
- Mesh *me;
- bNodeTree *ntree;
- Tex *tex;
- ModifierData *md;
- ParticleSystem *psys;
-
- /* unless the file was created 2.44.3 but not 2.45, update the constraints */
- if ( !(main->versionfile==244 && main->subversionfile==3) &&
- ((main->versionfile<245) || (main->versionfile==245 && main->subversionfile==0)) )
- {
- for (ob = main->object.first; ob; ob= ob->id.next) {
- ListBase *list;
- list = &ob->constraints;
-
- /* fix up constraints due to constraint recode changes (originally at 2.44.3) */
- if (list) {
- bConstraint *curcon;
- for (curcon = list->first; curcon; curcon=curcon->next) {
- /* old CONSTRAINT_LOCAL check -> convert to CONSTRAINT_SPACE_LOCAL */
- if (curcon->flag & 0x20) {
- curcon->ownspace = CONSTRAINT_SPACE_LOCAL;
- curcon->tarspace = CONSTRAINT_SPACE_LOCAL;
- }
-
- switch (curcon->type) {
- case CONSTRAINT_TYPE_LOCLIMIT:
- {
- bLocLimitConstraint *data= (bLocLimitConstraint *)curcon->data;
-
- /* old limit without parent option for objects */
- if (data->flag2)
- curcon->ownspace = CONSTRAINT_SPACE_LOCAL;
- }
- break;
- }
- }
- }
-
- /* correctly initialize constinv matrix */
- unit_m4(ob->constinv);
-
- if (ob->type == OB_ARMATURE) {
- if (ob->pose) {
- bConstraint *curcon;
- bPoseChannel *pchan;
-
- for (pchan = ob->pose->chanbase.first; pchan; pchan=pchan->next) {
- /* make sure constraints are all up to date */
- for (curcon = pchan->constraints.first; curcon; curcon=curcon->next) {
- /* old CONSTRAINT_LOCAL check -> convert to CONSTRAINT_SPACE_LOCAL */
- if (curcon->flag & 0x20) {
- curcon->ownspace = CONSTRAINT_SPACE_LOCAL;
- curcon->tarspace = CONSTRAINT_SPACE_LOCAL;
- }
-
- switch (curcon->type) {
- case CONSTRAINT_TYPE_ACTION:
- {
- bActionConstraint *data= (bActionConstraint *)curcon->data;
-
- /* 'data->local' used to mean that target was in local-space */
- if (data->local)
- curcon->tarspace = CONSTRAINT_SPACE_LOCAL;
- }
- break;
- }
- }
-
- /* correctly initialize constinv matrix */
- unit_m4(pchan->constinv);
- }
- }
- }
- }
- }
-
- /* fix all versions before 2.45 */
- if (main->versionfile != 245) {
-
- /* repair preview from 242 - 244*/
- for (ima= main->image.first; ima; ima= ima->id.next) {
- ima->preview = NULL;
- }
- }
-
- /* add point caches */
- for (ob=main->object.first; ob; ob=ob->id.next) {
- if (ob->soft && !ob->soft->pointcache)
- ob->soft->pointcache= BKE_ptcache_add(&ob->soft->ptcaches);
-
- for (psys=ob->particlesystem.first; psys; psys=psys->next) {
- if (psys->pointcache) {
- if (psys->pointcache->flag & PTCACHE_BAKED && (psys->pointcache->flag & PTCACHE_DISK_CACHE)==0) {
- printf("Old memory cache isn't supported for particles, so re-bake the simulation!\n");
- psys->pointcache->flag &= ~PTCACHE_BAKED;
- }
- }
- else
- psys->pointcache= BKE_ptcache_add(&psys->ptcaches);
- }
-
- for (md=ob->modifiers.first; md; md=md->next) {
- if (md->type==eModifierType_Cloth) {
- ClothModifierData *clmd = (ClothModifierData*) md;
- if (!clmd->point_cache)
- clmd->point_cache= BKE_ptcache_add(&clmd->ptcaches);
- }
- }
- }
-
- /* Copy over old per-level multires vertex data
- * into a single vertex array in struct Multires */
- for (me = main->mesh.first; me; me=me->id.next) {
- if (me->mr && !me->mr->verts) {
- MultiresLevel *lvl = me->mr->levels.last;
- if (lvl) {
- me->mr->verts = lvl->verts;
- lvl->verts = NULL;
- /* Don't need the other vert arrays */
- for (lvl = lvl->prev; lvl; lvl = lvl->prev) {
- MEM_freeN(lvl->verts);
- lvl->verts = NULL;
- }
- }
- }
- }
-
- if (main->versionfile != 245 || main->subversionfile < 1) {
- for (la=main->lamp.first; la; la= la->id.next) {
- if (la->mode & LA_QUAD) la->falloff_type = LA_FALLOFF_SLIDERS;
- else la->falloff_type = LA_FALLOFF_INVLINEAR;
-
- if (la->curfalloff == NULL) {
- la->curfalloff = curvemapping_add(1, 0.0f, 1.0f, 1.0f, 0.0f);
- curvemapping_initialize(la->curfalloff);
- }
- }
- }
-
- for (ma=main->mat.first; ma; ma= ma->id.next) {
- if (ma->samp_gloss_mir == 0) {
- ma->gloss_mir = ma->gloss_tra= 1.0f;
- ma->aniso_gloss_mir = 1.0f;
- ma->samp_gloss_mir = ma->samp_gloss_tra= 18;
- ma->adapt_thresh_mir = ma->adapt_thresh_tra = 0.005f;
- ma->dist_mir = 0.0f;
- ma->fadeto_mir = MA_RAYMIR_FADETOSKY;
- }
-
- if (ma->strand_min == 0.0f)
- ma->strand_min= 1.0f;
- }
-
- for (part=main->particle.first; part; part=part->id.next) {
- if (part->ren_child_nbr==0)
- part->ren_child_nbr= part->child_nbr;
-
- if (part->simplify_refsize==0) {
- part->simplify_refsize= 1920;
- part->simplify_rate= 1.0f;
- part->simplify_transition= 0.1f;
- part->simplify_viewport= 0.8f;
- }
- }
-
- for (wrld=main->world.first; wrld; wrld= wrld->id.next) {
- if (wrld->ao_approx_error == 0.0f)
- wrld->ao_approx_error= 0.25f;
- }
-
- for (sce= main->scene.first; sce; sce= sce->id.next) {
- if (sce->nodetree)
- ntree_version_245(fd, lib, sce->nodetree);
-
- if (sce->r.simplify_shadowsamples == 0) {
- sce->r.simplify_subsurf= 6;
- sce->r.simplify_particles= 1.0f;
- sce->r.simplify_shadowsamples= 16;
- sce->r.simplify_aosss= 1.0f;
- }
-
- if (sce->r.cineongamma == 0) {
- sce->r.cineonblack= 95;
- sce->r.cineonwhite= 685;
- sce->r.cineongamma= 1.7f;
- }
- }
-
- for (ntree=main->nodetree.first; ntree; ntree= ntree->id.next)
- ntree_version_245(fd, lib, ntree);
-
- /* fix for temporary flag changes during 245 cycle */
- for (ima= main->image.first; ima; ima= ima->id.next) {
- if (ima->flag & IMA_OLD_PREMUL) {
- ima->flag &= ~IMA_OLD_PREMUL;
- ima->flag |= IMA_DO_PREMUL;
- }
- }
-
- for (tex=main->tex.first; tex; tex=tex->id.next) {
- if (tex->iuser.flag & IMA_OLD_PREMUL) {
- tex->iuser.flag &= ~IMA_OLD_PREMUL;
- tex->iuser.flag |= IMA_DO_PREMUL;
-
- }
-
- ima= newlibadr(fd, lib, tex->ima);
- if (ima && (tex->iuser.flag & IMA_DO_PREMUL)) {
- ima->flag &= ~IMA_OLD_PREMUL;
- ima->flag |= IMA_DO_PREMUL;
- }
- }
- }
-
- /* sanity check for skgen
- * */
- {
- Scene *sce;
- for (sce=main->scene.first; sce; sce = sce->id.next)
- {
- if (sce->toolsettings->skgen_subdivisions[0] == sce->toolsettings->skgen_subdivisions[1] ||
- sce->toolsettings->skgen_subdivisions[0] == sce->toolsettings->skgen_subdivisions[2] ||
- sce->toolsettings->skgen_subdivisions[1] == sce->toolsettings->skgen_subdivisions[2])
- {
- sce->toolsettings->skgen_subdivisions[0] = SKGEN_SUB_CORRELATION;
- sce->toolsettings->skgen_subdivisions[1] = SKGEN_SUB_LENGTH;
- sce->toolsettings->skgen_subdivisions[2] = SKGEN_SUB_ANGLE;
- }
- }
- }
-
-
- if ((main->versionfile < 245) || (main->versionfile == 245 && main->subversionfile < 2)) {
- Image *ima;
-
- /* initialize 1:1 Aspect */
- for (ima= main->image.first; ima; ima= ima->id.next) {
- ima->aspx = ima->aspy = 1.0f;
- }
-
- }
-
- if ((main->versionfile < 245) || (main->versionfile == 245 && main->subversionfile < 4)) {
- bArmature *arm;
- ModifierData *md;
- Object *ob;
-
- for (arm= main->armature.first; arm; arm= arm->id.next)
- arm->deformflag |= ARM_DEF_B_BONE_REST;
-
- for (ob = main->object.first; ob; ob= ob->id.next) {
- for (md=ob->modifiers.first; md; md=md->next) {
- if (md->type==eModifierType_Armature)
- ((ArmatureModifierData*)md)->deformflag |= ARM_DEF_B_BONE_REST;
- }
- }
- }
-
- if ((main->versionfile < 245) || (main->versionfile == 245 && main->subversionfile < 5)) {
- /* foreground color needs to be something other then black */
- Scene *sce;
- for (sce= main->scene.first; sce; sce=sce->id.next) {
- sce->r.fg_stamp[0] = sce->r.fg_stamp[1] = sce->r.fg_stamp[2] = 0.8f;
- sce->r.fg_stamp[3] = 1.0f; /* don't use text alpha yet */
- sce->r.bg_stamp[3] = 0.25f; /* make sure the background has full alpha */
- }
- }
-
-
- if ((main->versionfile < 245) || (main->versionfile == 245 && main->subversionfile < 6)) {
- Scene *sce;
- /* fix frs_sec_base */
- for (sce= main->scene.first; sce; sce= sce->id.next) {
- if (sce->r.frs_sec_base == 0) {
- sce->r.frs_sec_base = 1;
- }
- }
- }
-
- if ((main->versionfile < 245) || (main->versionfile == 245 && main->subversionfile < 7)) {
- Object *ob;
- bPoseChannel *pchan;
- bConstraint *con;
- bConstraintTarget *ct;
-
- for (ob = main->object.first; ob; ob= ob->id.next) {
- if (ob->pose) {
- for (pchan=ob->pose->chanbase.first; pchan; pchan=pchan->next) {
- for (con=pchan->constraints.first; con; con=con->next) {
- if (con->type == CONSTRAINT_TYPE_PYTHON) {
- bPythonConstraint *data= (bPythonConstraint *)con->data;
- if (data->tar) {
- /* version patching needs to be done */
- ct= MEM_callocN(sizeof(bConstraintTarget), "PyConTarget");
-
- ct->tar = data->tar;
- BLI_strncpy(ct->subtarget, data->subtarget, sizeof(ct->subtarget));
- ct->space = con->tarspace;
-
- BLI_addtail(&data->targets, ct);
- data->tarnum++;
-
- /* clear old targets to avoid problems */
- data->tar = NULL;
- data->subtarget[0]= '\0';
- }
- }
- else if (con->type == CONSTRAINT_TYPE_LOCLIKE) {
- bLocateLikeConstraint *data= (bLocateLikeConstraint *)con->data;
-
- /* new headtail functionality makes Bone-Tip function obsolete */
- if (data->flag & LOCLIKE_TIP)
- con->headtail = 1.0f;
- }
- }
- }
- }
-
- for (con=ob->constraints.first; con; con=con->next) {
- if (con->type==CONSTRAINT_TYPE_PYTHON) {
- bPythonConstraint *data= (bPythonConstraint *)con->data;
- if (data->tar) {
- /* version patching needs to be done */
- ct= MEM_callocN(sizeof(bConstraintTarget), "PyConTarget");
-
- ct->tar = data->tar;
- BLI_strncpy(ct->subtarget, data->subtarget, sizeof(ct->subtarget));
- ct->space = con->tarspace;
-
- BLI_addtail(&data->targets, ct);
- data->tarnum++;
-
- /* clear old targets to avoid problems */
- data->tar = NULL;
- data->subtarget[0]= '\0';
- }
- }
- else if (con->type == CONSTRAINT_TYPE_LOCLIKE) {
- bLocateLikeConstraint *data= (bLocateLikeConstraint *)con->data;
-
- /* new headtail functionality makes Bone-Tip function obsolete */
- if (data->flag & LOCLIKE_TIP)
- con->headtail = 1.0f;
- }
- }
-
- if (ob->soft && ob->soft->keys) {
- SoftBody *sb = ob->soft;
- int k;
-
- for (k=0; k<sb->totkey; k++) {
- if (sb->keys[k])
- MEM_freeN(sb->keys[k]);
- }
-
- MEM_freeN(sb->keys);
-
- sb->keys = NULL;
- sb->totkey = 0;
- }
- }
- }
-
- if ((main->versionfile < 245) || (main->versionfile == 245 && main->subversionfile < 8)) {
- Scene *sce;
- Object *ob;
- PartEff *paf=NULL;
-
- for (ob = main->object.first; ob; ob= ob->id.next) {
- if (ob->soft && ob->soft->keys) {
- SoftBody *sb = ob->soft;
- int k;
-
- for (k=0; k<sb->totkey; k++) {
- if (sb->keys[k])
- MEM_freeN(sb->keys[k]);
- }
-
- MEM_freeN(sb->keys);
-
- sb->keys = NULL;
- sb->totkey = 0;
- }
-
- /* convert old particles to new system */
- if ((paf = do_version_give_parteff_245(ob))) {
- ParticleSystem *psys;
- ModifierData *md;
- ParticleSystemModifierData *psmd;
- ParticleSettings *part;
-
- /* create new particle system */
- psys = MEM_callocN(sizeof(ParticleSystem), "particle_system");
- psys->pointcache = BKE_ptcache_add(&psys->ptcaches);
-
- part = psys->part = psys_new_settings("ParticleSettings", main);
-
- /* needed for proper libdata lookup */
- oldnewmap_insert(fd->libmap, psys->part, psys->part, 0);
- part->id.lib= ob->id.lib;
-
- part->id.us--;
- part->id.flag |= (ob->id.flag & LIB_NEEDLINK);
-
- psys->totpart=0;
- psys->flag= PSYS_ENABLED|PSYS_CURRENT;
-
- BLI_addtail(&ob->particlesystem, psys);
-
- md= modifier_new(eModifierType_ParticleSystem);
- BLI_snprintf(md->name, sizeof(md->name), "ParticleSystem %i", BLI_countlist(&ob->particlesystem));
- psmd= (ParticleSystemModifierData*) md;
- psmd->psys=psys;
- BLI_addtail(&ob->modifiers, md);
-
- /* convert settings from old particle system */
- /* general settings */
- part->totpart = MIN2(paf->totpart, 100000);
- part->sta = paf->sta;
- part->end = paf->end;
- part->lifetime = paf->lifetime;
- part->randlife = paf->randlife;
- psys->seed = paf->seed;
- part->disp = paf->disp;
- part->omat = paf->mat[0];
- part->hair_step = paf->totkey;
-
- part->eff_group = paf->group;
-
- /* old system didn't interpolate between keypoints at render time */
- part->draw_step = part->ren_step = 0;
-
- /* physics */
- part->normfac = paf->normfac * 25.0f;
- part->obfac = paf->obfac;
- part->randfac = paf->randfac * 25.0f;
- part->dampfac = paf->damp;
- copy_v3_v3(part->acc, paf->force);
-
- /* flags */
- if (paf->stype & PAF_VECT) {
- if (paf->flag & PAF_STATIC) {
- /* new hair lifetime is always 100.0f */
- float fac = paf->lifetime / 100.0f;
-
- part->draw_as = PART_DRAW_PATH;
- part->type = PART_HAIR;
- psys->recalc |= PSYS_RECALC_REDO;
-
- part->normfac *= fac;
- part->randfac *= fac;
- }
- else {
- part->draw_as = PART_DRAW_LINE;
- part->draw |= PART_DRAW_VEL_LENGTH;
- part->draw_line[1] = 0.04f;
- }
- }
-
- part->rotmode = PART_ROT_VEL;
-
- part->flag |= (paf->flag & PAF_BSPLINE) ? PART_HAIR_BSPLINE : 0;
- part->flag |= (paf->flag & PAF_TRAND) ? PART_TRAND : 0;
- part->flag |= (paf->flag & PAF_EDISTR) ? PART_EDISTR : 0;
- part->flag |= (paf->flag & PAF_UNBORN) ? PART_UNBORN : 0;
- part->flag |= (paf->flag & PAF_DIED) ? PART_DIED : 0;
- part->from |= (paf->flag & PAF_FACE) ? PART_FROM_FACE : 0;
- part->draw |= (paf->flag & PAF_SHOWE) ? PART_DRAW_EMITTER : 0;
-
- psys->vgroup[PSYS_VG_DENSITY] = paf->vertgroup;
- psys->vgroup[PSYS_VG_VEL] = paf->vertgroup_v;
- psys->vgroup[PSYS_VG_LENGTH] = paf->vertgroup_v;
-
- /* dupliobjects */
- if (ob->transflag & OB_DUPLIVERTS) {
- Object *dup = main->object.first;
-
- for (; dup; dup= dup->id.next) {
- if (ob == newlibadr(fd, lib, dup->parent)) {
- part->dup_ob = dup;
- ob->transflag |= OB_DUPLIPARTS;
- ob->transflag &= ~OB_DUPLIVERTS;
-
- part->draw_as = PART_DRAW_OB;
-
- /* needed for proper libdata lookup */
- oldnewmap_insert(fd->libmap, dup, dup, 0);
- }
- }
- }
-
-
- {
- FluidsimModifierData *fluidmd = (FluidsimModifierData *)modifiers_findByType(ob, eModifierType_Fluidsim);
- if (fluidmd && fluidmd->fss && fluidmd->fss->type == OB_FLUIDSIM_PARTICLE)
- part->type = PART_FLUID;
- }
-
- do_version_free_effects_245(&ob->effect);
-
- printf("Old particle system converted to new system.\n");
- }
- }
-
- for (sce= main->scene.first; sce; sce=sce->id.next) {
- ParticleEditSettings *pset= &sce->toolsettings->particle;
- int a;
-
- if (pset->brush[0].size == 0) {
- pset->flag= PE_KEEP_LENGTHS|PE_LOCK_FIRST|PE_DEFLECT_EMITTER;
- pset->emitterdist= 0.25f;
- pset->totrekey= 5;
- pset->totaddkey= 5;
- pset->brushtype= PE_BRUSH_NONE;
-
- for (a=0; a<PE_TOT_BRUSH; a++) {
- pset->brush[a].strength= 50;
- pset->brush[a].size= 50;
- pset->brush[a].step= 10;
- }
-
- pset->brush[PE_BRUSH_CUT].strength= 100;
- }
- }
- }
- if ((main->versionfile < 245) || (main->versionfile == 245 && main->subversionfile < 9)) {
- Material *ma;
- int a;
-
- for (ma=main->mat.first; ma; ma= ma->id.next)
- if (ma->mode & MA_NORMAP_TANG)
- for (a=0; a<MAX_MTEX; a++)
- if (ma->mtex[a] && ma->mtex[a]->tex)
- ma->mtex[a]->normapspace = MTEX_NSPACE_TANGENT;
- }
-
- if ((main->versionfile < 245) || (main->versionfile == 245 && main->subversionfile < 10)) {
- Object *ob;
-
- /* dupliface scale */
- for (ob= main->object.first; ob; ob= ob->id.next)
- ob->dupfacesca = 1.0f;
- }
-
- if ((main->versionfile < 245) || (main->versionfile == 245 && main->subversionfile < 11)) {
- Object *ob;
- bActionStrip *strip;
-
- /* nla-strips - scale */
- for (ob= main->object.first; ob; ob= ob->id.next) {
- for (strip= ob->nlastrips.first; strip; strip= strip->next) {
- float length, actlength, repeat;
-
- if (strip->flag & ACTSTRIP_USESTRIDE)
- repeat= 1.0f;
- else
- repeat= strip->repeat;
-
- length = strip->end-strip->start;
- if (length == 0.0f) length= 1.0f;
- actlength = strip->actend-strip->actstart;
-
- strip->scale = length / (repeat * actlength);
- if (strip->scale == 0.0f) strip->scale= 1.0f;
- }
- if (ob->soft) {
- ob->soft->inpush = ob->soft->inspring;
- ob->soft->shearstiff = 1.0f;
- }
- }
- }
-
- if ((main->versionfile < 245) || (main->versionfile == 245 && main->subversionfile < 14)) {
- Scene *sce;
- Sequence *seq;
-
- for (sce=main->scene.first; sce; sce=sce->id.next) {
- SEQ_BEGIN(sce->ed, seq) {
- if (seq->blend_mode == 0)
- seq->blend_opacity = 100.0f;
- }
- SEQ_END
- }
- }
-
- /*fix broken group lengths in id properties*/
- if ((main->versionfile < 245) || (main->versionfile == 245 && main->subversionfile < 15)) {
- idproperties_fix_group_lengths(main->scene);
- idproperties_fix_group_lengths(main->library);
- idproperties_fix_group_lengths(main->object);
- idproperties_fix_group_lengths(main->mesh);
- idproperties_fix_group_lengths(main->curve);
- idproperties_fix_group_lengths(main->mball);
- idproperties_fix_group_lengths(main->mat);
- idproperties_fix_group_lengths(main->tex);
- idproperties_fix_group_lengths(main->image);
- idproperties_fix_group_lengths(main->latt);
- idproperties_fix_group_lengths(main->lamp);
- idproperties_fix_group_lengths(main->camera);
- idproperties_fix_group_lengths(main->ipo);
- idproperties_fix_group_lengths(main->key);
- idproperties_fix_group_lengths(main->world);
- idproperties_fix_group_lengths(main->screen);
- idproperties_fix_group_lengths(main->script);
- idproperties_fix_group_lengths(main->vfont);
- idproperties_fix_group_lengths(main->text);
- idproperties_fix_group_lengths(main->sound);
- idproperties_fix_group_lengths(main->group);
- idproperties_fix_group_lengths(main->armature);
- idproperties_fix_group_lengths(main->action);
- idproperties_fix_group_lengths(main->nodetree);
- idproperties_fix_group_lengths(main->brush);
- idproperties_fix_group_lengths(main->particle);
- }
-
- /* sun/sky */
- if (main->versionfile < 246) {
- Object *ob;
- bActuator *act;
-
- /* dRot actuator change direction in 2.46 */
- for (ob = main->object.first; ob; ob= ob->id.next) {
- for (act= ob->actuators.first; act; act= act->next) {
- if (act->type == ACT_OBJECT) {
- bObjectActuator *ba= act->data;
-
- ba->drot[0] = -ba->drot[0];
- ba->drot[1] = -ba->drot[1];
- ba->drot[2] = -ba->drot[2];
- }
- }
- }
- }
-
- // convert fluids to modifier
- if (main->versionfile < 246 || (main->versionfile == 246 && main->subversionfile < 1))
- {
- Object *ob;
-
- for (ob = main->object.first; ob; ob= ob->id.next) {
- if (ob->fluidsimSettings)
- {
- FluidsimModifierData *fluidmd = (FluidsimModifierData *)modifier_new(eModifierType_Fluidsim);
- BLI_addhead(&ob->modifiers, (ModifierData *)fluidmd);
-
- MEM_freeN(fluidmd->fss);
- fluidmd->fss = MEM_dupallocN(ob->fluidsimSettings);
- fluidmd->fss->ipo = newlibadr_us(fd, ob->id.lib, ob->fluidsimSettings->ipo);
- MEM_freeN(ob->fluidsimSettings);
-
- fluidmd->fss->lastgoodframe = INT_MAX;
- fluidmd->fss->flag = 0;
- fluidmd->fss->meshVelocities = NULL;
- }
- }
- }
-
-
- if (main->versionfile < 246 || (main->versionfile == 246 && main->subversionfile < 1)) {
- Mesh *me;
-
- for (me=main->mesh.first; me; me= me->id.next)
- alphasort_version_246(fd, lib, me);
- }
-
- if (main->versionfile < 246 || (main->versionfile == 246 && main->subversionfile < 1)) {
- Object *ob;
- for (ob = main->object.first; ob; ob= ob->id.next) {
- if (ob->pd && (ob->pd->forcefield == PFIELD_WIND))
- ob->pd->f_noise = 0.0f;
- }
- }
-
- if (main->versionfile < 247 || (main->versionfile == 247 && main->subversionfile < 2)) {
- Object *ob;
- for (ob = main->object.first; ob; ob= ob->id.next) {
- ob->gameflag |= OB_COLLISION;
- ob->margin = 0.06f;
- }
- }
-
- if (main->versionfile < 247 || (main->versionfile == 247 && main->subversionfile < 3)) {
- Object *ob;
- for (ob = main->object.first; ob; ob= ob->id.next) {
- // Starting from subversion 3, ACTOR is a separate feature.
- // Before it was conditioning all the other dynamic flags
- if (!(ob->gameflag & OB_ACTOR))
- ob->gameflag &= ~(OB_GHOST|OB_DYNAMIC|OB_RIGID_BODY|OB_SOFT_BODY|OB_COLLISION_RESPONSE);
- /* suitable default for older files */
- }
- }
-
- if (main->versionfile < 247 || (main->versionfile == 247 && main->subversionfile < 5)) {
- Lamp *la= main->lamp.first;
- for (; la; la= la->id.next) {
- la->skyblendtype= MA_RAMP_ADD;
- la->skyblendfac= 1.0f;
- }
- }
-
- /* set the curve radius interpolation to 2.47 default - easy */
- if (main->versionfile < 247 || (main->versionfile == 247 && main->subversionfile < 6)) {
- Curve *cu;
- Nurb *nu;
-
- for (cu= main->curve.first; cu; cu= cu->id.next) {
- for (nu= cu->nurb.first; nu; nu= nu->next) {
- if (nu) {
- nu->radius_interp = 3;
-
- /* resolu and resolv are now used differently for surfaces
- * rather than using the resolution to define the entire number of divisions,
- * use it for the number of divisions per segment
- */
- if (nu->pntsv > 1) {
- nu->resolu = MAX2( 1, (int)(((float)nu->resolu / (float)nu->pntsu)+0.5f) );
- nu->resolv = MAX2( 1, (int)(((float)nu->resolv / (float)nu->pntsv)+0.5f) );
- }
- }
- }
- }
- }
- /* direction constraint actuators were always local in previous version */
- if (main->versionfile < 247 || (main->versionfile == 247 && main->subversionfile < 7)) {
- bActuator *act;
- Object *ob;
-
- for (ob = main->object.first; ob; ob= ob->id.next) {
- for (act= ob->actuators.first; act; act= act->next) {
- if (act->type == ACT_CONSTRAINT) {
- bConstraintActuator *coa = act->data;
- if (coa->type == ACT_CONST_TYPE_DIST) {
- coa->flag |= ACT_CONST_LOCAL;
- }
- }
- }
- }
- }
-
- if (main->versionfile < 247 || (main->versionfile == 247 && main->subversionfile < 9)) {
- Lamp *la= main->lamp.first;
- for (; la; la= la->id.next) {
- la->sky_exposure= 1.0f;
- }
- }
-
- /* BGE message actuators needed OB prefix, very confusing */
- if (main->versionfile < 247 || (main->versionfile == 247 && main->subversionfile < 10)) {
- bActuator *act;
- Object *ob;
-
- for (ob = main->object.first; ob; ob= ob->id.next) {
- for (act= ob->actuators.first; act; act= act->next) {
- if (act->type == ACT_MESSAGE) {
- bMessageActuator *msgAct = (bMessageActuator *) act->data;
- if (BLI_strnlen(msgAct->toPropName, 3) > 2) {
- /* strip first 2 chars, would have only worked if these were OB anyway */
- memmove(msgAct->toPropName, msgAct->toPropName + 2, sizeof(msgAct->toPropName) - 2);
- }
- else {
- msgAct->toPropName[0] = '\0';
- }
- }
- }
- }
- }
-
- if (main->versionfile < 248) {
- Lamp *la;
-
- for (la=main->lamp.first; la; la= la->id.next) {
- if (la->atm_turbidity == 0.0f) {
- la->sun_effect_type = 0;
- la->horizon_brightness = 1.0f;
- la->spread = 1.0f;
- la->sun_brightness = 1.0f;
- la->sun_size = 1.0f;
- la->backscattered_light = 1.0f;
- la->atm_turbidity = 2.0f;
- la->atm_inscattering_factor = 1.0f;
- la->atm_extinction_factor = 1.0f;
- la->atm_distance_factor = 1.0f;
- la->sun_intensity = 1.0f;
- }
- }
- }
-
- if (main->versionfile < 248 || (main->versionfile == 248 && main->subversionfile < 2)) {
- Scene *sce;
-
- /* Note, these will need to be added for painting */
- for (sce= main->scene.first; sce; sce= sce->id.next) {
- sce->toolsettings->imapaint.seam_bleed = 2;
- sce->toolsettings->imapaint.normal_angle = 80;
-
- /* initialize skeleton generation toolsettings */
- sce->toolsettings->skgen_resolution = 250;
- sce->toolsettings->skgen_threshold_internal = 0.1f;
- sce->toolsettings->skgen_threshold_external = 0.1f;
- sce->toolsettings->skgen_angle_limit = 30.0f;
- sce->toolsettings->skgen_length_ratio = 1.3f;
- sce->toolsettings->skgen_length_limit = 1.5f;
- sce->toolsettings->skgen_correlation_limit = 0.98f;
- sce->toolsettings->skgen_symmetry_limit = 0.1f;
- sce->toolsettings->skgen_postpro = SKGEN_SMOOTH;
- sce->toolsettings->skgen_postpro_passes = 3;
- sce->toolsettings->skgen_options = SKGEN_FILTER_INTERNAL|SKGEN_FILTER_EXTERNAL|SKGEN_FILTER_SMART|SKGEN_SUB_CORRELATION|SKGEN_HARMONIC;
- sce->toolsettings->skgen_subdivisions[0] = SKGEN_SUB_CORRELATION;
- sce->toolsettings->skgen_subdivisions[1] = SKGEN_SUB_LENGTH;
- sce->toolsettings->skgen_subdivisions[2] = SKGEN_SUB_ANGLE;
-
-
- sce->toolsettings->skgen_retarget_angle_weight = 1.0f;
- sce->toolsettings->skgen_retarget_length_weight = 1.0f;
- sce->toolsettings->skgen_retarget_distance_weight = 1.0f;
-
- /* Skeleton Sketching */
- sce->toolsettings->bone_sketching = 0;
- sce->toolsettings->skgen_retarget_roll = SK_RETARGET_ROLL_VIEW;
- }
- }
- if (main->versionfile < 248 || (main->versionfile == 248 && main->subversionfile < 3)) {
- bScreen *sc;
-
- /* adjust default settings for Animation Editors */
- for (sc= main->screen.first; sc; sc= sc->id.next) {
- ScrArea *sa;
-
- for (sa= sc->areabase.first; sa; sa= sa->next) {
- SpaceLink *sl;
-
- for (sl= sa->spacedata.first; sl; sl= sl->next) {
- switch (sl->spacetype) {
- case SPACE_ACTION:
- {
- SpaceAction *sact= (SpaceAction *)sl;
-
- sact->mode= SACTCONT_DOPESHEET;
- sact->autosnap= SACTSNAP_FRAME;
- }
- break;
- case SPACE_IPO:
- {
- SpaceIpo *sipo= (SpaceIpo *)sl;
- sipo->autosnap= SACTSNAP_FRAME;
- }
- break;
- case SPACE_NLA:
- {
- SpaceNla *snla= (SpaceNla *)sl;
- snla->autosnap= SACTSNAP_FRAME;
- }
- break;
- }
- }
- }
- }
- }
-
- if (main->versionfile < 248 || (main->versionfile == 248 && main->subversionfile < 3)) {
- Object *ob;
-
- /* Adjustments needed after Bullets update */
- for (ob = main->object.first; ob; ob= ob->id.next) {
- ob->damping *= 0.635f;
- ob->rdamping = 0.1f + (0.8f * ob->rdamping);
- }
- }
-
- if (main->versionfile < 248 || (main->versionfile == 248 && main->subversionfile < 4)) {
- Scene *sce;
- World *wrld;
-
- /* Dome (Fisheye) default parameters */
- for (sce= main->scene.first; sce; sce= sce->id.next) {
- sce->r.domeangle = 180;
- sce->r.domemode = 1;
- sce->r.domeres = 4;
- sce->r.domeresbuf = 1.0f;
- sce->r.dometilt = 0;
- }
- /* DBVT culling by default */
- for (wrld=main->world.first; wrld; wrld= wrld->id.next) {
- wrld->mode |= WO_DBVT_CULLING;
- wrld->occlusionRes = 128;
- }
- }
-
- if (main->versionfile < 248 || (main->versionfile == 248 && main->subversionfile < 5)) {
- Object *ob;
- World *wrld;
- for (ob = main->object.first; ob; ob= ob->id.next) {
- ob->m_contactProcessingThreshold = 1.0f; //pad3 is used for m_contactProcessingThreshold
- if (ob->parent) {
- /* check if top parent has compound shape set and if yes, set this object
- * to compound shaper as well (was the behavior before, now it's optional) */
- Object *parent= newlibadr(fd, lib, ob->parent);
- while (parent && parent != ob && parent->parent != NULL) {
- parent = newlibadr(fd, lib, parent->parent);
- }
- if (parent) {
- if (parent->gameflag & OB_CHILD)
- ob->gameflag |= OB_CHILD;
- }
- }
- }
- for (wrld=main->world.first; wrld; wrld= wrld->id.next) {
- wrld->ticrate = 60;
- wrld->maxlogicstep = 5;
- wrld->physubstep = 1;
- wrld->maxphystep = 5;
- }
- }
-
- // correct introduce of seed for wind force
- if (main->versionfile < 249 && main->subversionfile < 1) {
- Object *ob;
- for (ob = main->object.first; ob; ob= ob->id.next) {
- if (ob->pd)
- ob->pd->seed = ((unsigned int)(ceil(PIL_check_seconds_timer()))+1) % 128;
- }
-
- }
-
- if (main->versionfile < 249 && main->subversionfile < 2) {
- Scene *sce= main->scene.first;
- Sequence *seq;
- Editing *ed;
-
- while (sce) {
- ed= sce->ed;
- if (ed) {
- SEQP_BEGIN(ed, seq) {
- if (seq->strip && seq->strip->proxy) {
- seq->strip->proxy->quality =90;
- }
- }
- SEQ_END
- }
-
- sce= sce->id.next;
- }
-
- }
-
- if (main->versionfile < 250) {
- bScreen *screen;
- Scene *scene;
- Base *base;
- Material *ma;
- Camera *cam;
- Mesh *me;
- Curve *cu;
- Scene *sce;
- Tex *tx;
- ParticleSettings *part;
- Object *ob;
- //PTCacheID *pid;
- //ListBase pidlist;
-
- bSound *sound;
- Sequence *seq;
- bActuator *act;
- int a;
-
- for (sound = main->sound.first; sound; sound = sound->id.next)
- {
- if (sound->newpackedfile)
- {
- sound->packedfile = sound->newpackedfile;
- sound->newpackedfile = NULL;
- }
- }
-
- for (ob = main->object.first; ob; ob= ob->id.next) {
- for (act= ob->actuators.first; act; act= act->next) {
- if (act->type == ACT_SOUND) {
- bSoundActuator *sAct = (bSoundActuator*) act->data;
- if (sAct->sound)
- {
- sound = newlibadr(fd, lib, sAct->sound);
- sAct->flag = sound->flags & SOUND_FLAGS_3D ? ACT_SND_3D_SOUND : 0;
- sAct->pitch = sound->pitch;
- sAct->volume = sound->volume;
- sAct->sound3D.reference_distance = sound->distance;
- sAct->sound3D.max_gain = sound->max_gain;
- sAct->sound3D.min_gain = sound->min_gain;
- sAct->sound3D.rolloff_factor = sound->attenuation;
- }
- else {
- sAct->sound3D.reference_distance = 1.0f;
- sAct->volume = 1.0f;
- sAct->sound3D.max_gain = 1.0f;
- sAct->sound3D.rolloff_factor = 1.0f;
- }
- sAct->sound3D.cone_inner_angle = 360.0f;
- sAct->sound3D.cone_outer_angle = 360.0f;
- sAct->sound3D.max_distance = FLT_MAX;
- }
- }
- }
-
- for (scene = main->scene.first; scene; scene = scene->id.next)
- {
- if (scene->ed && scene->ed->seqbasep)
- {
- SEQ_BEGIN(scene->ed, seq) {
- if (seq->type == SEQ_HD_SOUND)
- {
- char str[FILE_MAX];
- BLI_join_dirfile(str, sizeof(str), seq->strip->dir, seq->strip->stripdata->name);
- BLI_path_abs(str, main->name);
- seq->sound = sound_new_file(main, str);
- }
- /* don't know, if anybody used that
- * this way, but just in case, upgrade
- * to new way... */
- if ((seq->flag & SEQ_USE_PROXY_CUSTOM_FILE) &&
- !(seq->flag & SEQ_USE_PROXY_CUSTOM_DIR))
- {
-
- BLI_snprintf(seq->strip->proxy->dir,
- FILE_MAXDIR, "%s/BL_proxy",
- seq->strip->dir);
- }
- }
- SEQ_END
- }
- }
-
- for (screen= main->screen.first; screen; screen= screen->id.next) {
- do_versions_windowmanager_2_50(screen);
- do_versions_gpencil_2_50(main, screen);
- }
-
- /* shader, composite and texture node trees have id.name empty, put something in
- * to have them show in RNA viewer and accessible otherwise.
- */
- for (ma= main->mat.first; ma; ma= ma->id.next) {
- if (ma->nodetree && ma->nodetree->id.name[0] == '\0')
- strcpy(ma->nodetree->id.name, "NTShader Nodetree");
-
- /* which_output 0 is now "not specified" */
- for (a=0; a<MAX_MTEX; a++) {
- if (ma->mtex[a]) {
- tx= newlibadr(fd, lib, ma->mtex[a]->tex);
- if (tx && tx->use_nodes)
- ma->mtex[a]->which_output++;
- }
- }
- }
- /* and composite trees */
- for (sce= main->scene.first; sce; sce= sce->id.next) {
- if (sce->nodetree && sce->nodetree->id.name[0] == '\0')
- strcpy(sce->nodetree->id.name, "NTCompositing Nodetree");
-
- /* move to cameras */
- if (sce->r.mode & R_PANORAMA) {
- for (base=sce->base.first; base; base=base->next) {
- ob= newlibadr(fd, lib, base->object);
-
- if (ob->type == OB_CAMERA && !ob->id.lib) {
- cam= newlibadr(fd, lib, ob->data);
- cam->flag |= CAM_PANORAMA;
- }
- }
-
- sce->r.mode &= ~R_PANORAMA;
- }
- }
- /* and texture trees */
- for (tx= main->tex.first; tx; tx= tx->id.next) {
- bNode *node;
-
- if (tx->nodetree) {
- if (tx->nodetree->id.name[0] == '\0')
- strcpy(tx->nodetree->id.name, "NTTexture Nodetree");
-
- /* which_output 0 is now "not specified" */
- for (node=tx->nodetree->nodes.first; node; node=node->next)
- if (node->type == TEX_NODE_OUTPUT)
- node->custom1++;
- }
- }
-
- /* copy standard draw flag to meshes(used to be global, is not available here) */
- for (me= main->mesh.first; me; me= me->id.next) {
- me->drawflag= ME_DRAWEDGES|ME_DRAWFACES|ME_DRAWCREASES;
- }
-
- /* particle draw and render types */
- for (part= main->particle.first; part; part= part->id.next) {
- if (part->draw_as) {
- if (part->draw_as == PART_DRAW_DOT) {
- part->ren_as = PART_DRAW_HALO;
- part->draw_as = PART_DRAW_REND;
- }
- else if (part->draw_as <= PART_DRAW_AXIS) {
- part->ren_as = PART_DRAW_HALO;
- }
- else {
- part->ren_as = part->draw_as;
- part->draw_as = PART_DRAW_REND;
- }
- }
- part->path_end = 1.0f;
- part->clength = 1.0f;
- }
- /* set old pointcaches to have disk cache flag */
- for (ob = main->object.first; ob; ob= ob->id.next) {
-
- //BKE_ptcache_ids_from_object(&pidlist, ob);
-
- //for (pid=pidlist.first; pid; pid=pid->next)
- // pid->cache->flag |= PTCACHE_DISK_CACHE;
-
- //BLI_freelistN(&pidlist);
- }
-
- /* type was a mixed flag & enum. move the 2d flag elsewhere */
- for (cu = main->curve.first; cu; cu= cu->id.next) {
- Nurb *nu;
-
- for (nu= cu->nurb.first; nu; nu= nu->next) {
- nu->flag |= (nu->type & CU_2D);
- nu->type &= CU_TYPE;
- }
- }
- }
-
- if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 1)) {
- Object *ob;
- Material *ma;
- Tex *tex;
- Scene *sce;
- ToolSettings *ts;
- //PTCacheID *pid;
- //ListBase pidlist;
-
- for (ob = main->object.first; ob; ob = ob->id.next) {
- //BKE_ptcache_ids_from_object(&pidlist, ob);
-
- //for (pid=pidlist.first; pid; pid=pid->next) {
- // if (pid->ptcaches->first == NULL)
- // pid->ptcaches->first = pid->ptcaches->last = pid->cache;
- //}
-
- //BLI_freelistN(&pidlist);
-
- if (ob->type == OB_MESH) {
- Mesh *me = newlibadr(fd, lib, ob->data);
- void *olddata = ob->data;
- ob->data = me;
-
- /* XXX - library meshes crash on loading most yoFrankie levels,
- * the multires pointer gets invalid - Campbell */
- if (me && me->id.lib==NULL && me->mr && me->mr->level_count > 1) {
- multires_load_old(ob, me);
- }
-
- ob->data = olddata;
- }
-
- if (ob->totcol && ob->matbits == NULL) {
- int a;
-
- ob->matbits= MEM_callocN(sizeof(char)*ob->totcol, "ob->matbits");
- for (a=0; a<ob->totcol; a++)
- ob->matbits[a]= ob->colbits & (1<<a);
- }
- }
-
- /* texture filter */
- for (tex = main->tex.first; tex; tex = tex->id.next) {
- if (tex->afmax == 0)
- tex->afmax= 8;
- }
-
- for (ma = main->mat.first; ma; ma = ma->id.next) {
- int a;
- if (ma->mode & MA_WIRE) {
- ma->material_type= MA_TYPE_WIRE;
- ma->mode &= ~MA_WIRE;
- }
- if (ma->mode & MA_HALO) {
- ma->material_type= MA_TYPE_HALO;
- ma->mode &= ~MA_HALO;
- }
-
- if (ma->mode & (MA_ZTRANSP|MA_RAYTRANSP)) {
- ma->mode |= MA_TRANSP;
- }
- else {
- /* ma->mode |= MA_ZTRANSP; */ /* leave ztransp as is even if its not used [#28113] */
- ma->mode &= ~MA_TRANSP;
- }
-
- /* set new bump for unused slots */
- for (a=0; a<MAX_MTEX; a++) {
- if (ma->mtex[a]) {
- tex= ma->mtex[a]->tex;
- if (!tex) {
- ma->mtex[a]->texflag |= MTEX_3TAP_BUMP;
- ma->mtex[a]->texflag |= MTEX_BUMP_OBJECTSPACE;
- }
- else {
- tex= (Tex*)newlibadr(fd, ma->id.lib, tex);
- if (tex && tex->type == 0) { /* invalid type */
- ma->mtex[a]->texflag |= MTEX_3TAP_BUMP;
- ma->mtex[a]->texflag |= MTEX_BUMP_OBJECTSPACE;
- }
- }
- }
- }
-
- /* volume rendering settings */
- if (ma->vol.stepsize < 0.0001f) {
- ma->vol.density = 1.0f;
- ma->vol.emission = 0.0f;
- ma->vol.scattering = 1.0f;
- ma->vol.emission_col[0] = ma->vol.emission_col[1] = ma->vol.emission_col[2] = 1.0f;
- ma->vol.density_scale = 1.0f;
- ma->vol.depth_cutoff = 0.01f;
- ma->vol.stepsize_type = MA_VOL_STEP_RANDOMIZED;
- ma->vol.stepsize = 0.2f;
- ma->vol.shade_type = MA_VOL_SHADE_SHADED;
- ma->vol.shadeflag |= MA_VOL_PRECACHESHADING;
- ma->vol.precache_resolution = 50;
- }
- }
-
- for (sce = main->scene.first; sce; sce = sce->id.next) {
- ts= sce->toolsettings;
- if (ts->normalsize == 0.0f || !ts->uv_selectmode || ts->vgroup_weight == 0.0f) {
- ts->normalsize= 0.1f;
- ts->selectmode= SCE_SELECT_VERTEX;
-
- /* autokeying - setting should be taken from the user-prefs
- * but the userprefs version may not have correct flags set
- * (i.e. will result in blank box when enabled)
- */
- ts->autokey_mode= U.autokey_mode;
- if (ts->autokey_mode == 0)
- ts->autokey_mode= 2; /* 'add/replace' but not on */
- ts->uv_selectmode= UV_SELECT_VERTEX;
- ts->vgroup_weight= 1.0f;
- }
-
- /* Game Settings */
- //Dome
- sce->gm.dome.angle = sce->r.domeangle;
- sce->gm.dome.mode = sce->r.domemode;
- sce->gm.dome.res = sce->r.domeres;
- sce->gm.dome.resbuf = sce->r.domeresbuf;
- sce->gm.dome.tilt = sce->r.dometilt;
- sce->gm.dome.warptext = sce->r.dometext;
-
- //Stand Alone
- sce->gm.playerflag |= (sce->r.fullscreen?GAME_PLAYER_FULLSCREEN:0);
- sce->gm.xplay = sce->r.xplay;
- sce->gm.yplay = sce->r.yplay;
- sce->gm.freqplay = sce->r.freqplay;
- sce->gm.depth = sce->r.depth;
- sce->gm.attrib = sce->r.attrib;
-
- //Stereo
- sce->gm.stereomode = sce->r.stereomode;
- /* reassigning stereomode NO_STEREO and DOME to a separeted flag*/
- if (sce->gm.stereomode == 1) { //1 = STEREO_NOSTEREO
- sce->gm.stereoflag = STEREO_NOSTEREO;
- sce->gm.stereomode = STEREO_ANAGLYPH;
- }
- else if (sce->gm.stereomode == 8) { //8 = STEREO_DOME
- sce->gm.stereoflag = STEREO_DOME;
- sce->gm.stereomode = STEREO_ANAGLYPH;
- }
- else
- sce->gm.stereoflag = STEREO_ENABLED;
-
- //Framing
- sce->gm.framing = sce->framing;
- sce->gm.xplay = sce->r.xplay;
- sce->gm.yplay = sce->r.yplay;
- sce->gm.freqplay= sce->r.freqplay;
- sce->gm.depth= sce->r.depth;
-
- //Physic (previously stored in world)
- sce->gm.gravity =9.8f;
- sce->gm.physicsEngine= WOPHY_BULLET;// Bullet by default
- sce->gm.mode = WO_DBVT_CULLING; // DBVT culling by default
- sce->gm.occlusionRes = 128;
- sce->gm.ticrate = 60;
- sce->gm.maxlogicstep = 5;
- sce->gm.physubstep = 1;
- sce->gm.maxphystep = 5;
- }
- }
-
- if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 2)) {
- Scene *sce;
- Object *ob;
-
- for (sce = main->scene.first; sce; sce = sce->id.next) {
- if (fd->fileflags & G_FILE_ENABLE_ALL_FRAMES)
- sce->gm.flag |= GAME_ENABLE_ALL_FRAMES;
- if (fd->fileflags & G_FILE_SHOW_DEBUG_PROPS)
- sce->gm.flag |= GAME_SHOW_DEBUG_PROPS;
- if (fd->fileflags & G_FILE_SHOW_FRAMERATE)
- sce->gm.flag |= GAME_SHOW_FRAMERATE;
- if (fd->fileflags & G_FILE_SHOW_PHYSICS)
- sce->gm.flag |= GAME_SHOW_PHYSICS;
- if (fd->fileflags & G_FILE_GLSL_NO_SHADOWS)
- sce->gm.flag |= GAME_GLSL_NO_SHADOWS;
- if (fd->fileflags & G_FILE_GLSL_NO_SHADERS)
- sce->gm.flag |= GAME_GLSL_NO_SHADERS;
- if (fd->fileflags & G_FILE_GLSL_NO_RAMPS)
- sce->gm.flag |= GAME_GLSL_NO_RAMPS;
- if (fd->fileflags & G_FILE_GLSL_NO_NODES)
- sce->gm.flag |= GAME_GLSL_NO_NODES;
- if (fd->fileflags & G_FILE_GLSL_NO_EXTRA_TEX)
- sce->gm.flag |= GAME_GLSL_NO_EXTRA_TEX;
- if (fd->fileflags & G_FILE_IGNORE_DEPRECATION_WARNINGS)
- sce->gm.flag |= GAME_IGNORE_DEPRECATION_WARNINGS;
-
- if (fd->fileflags & G_FILE_GAME_MAT_GLSL)
- sce->gm.matmode= GAME_MAT_GLSL;
- else if (fd->fileflags & G_FILE_GAME_MAT)
- sce->gm.matmode= GAME_MAT_MULTITEX;
- else
- sce->gm.matmode= GAME_MAT_TEXFACE;
-
- sce->gm.flag |= GAME_DISPLAY_LISTS;
- }
-
- for (ob = main->object.first; ob; ob = ob->id.next) {
- if (ob->flag & 8192) // OB_POSEMODE = 8192
- ob->mode |= OB_MODE_POSE;
- }
- }
-
- if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 4)) {
- Scene *sce;
- Object *ob;
- Material *ma;
- Lamp *la;
- World *wo;
- Tex *tex;
- ParticleSettings *part;
- int do_gravity = 0;
-
- for (sce = main->scene.first; sce; sce = sce->id.next)
- if (sce->unit.scale_length == 0.0f)
- sce->unit.scale_length= 1.0f;
-
- for (ob = main->object.first; ob; ob = ob->id.next) {
- /* fluid-sim stuff */
- FluidsimModifierData *fluidmd = (FluidsimModifierData *)modifiers_findByType(ob, eModifierType_Fluidsim);
- if (fluidmd) fluidmd->fss->fmd = fluidmd;
-
- /* rotation modes were added, but old objects would now default to being 'quaternion based' */
- ob->rotmode= ROT_MODE_EUL;
- }
-
- for (ma = main->mat.first; ma; ma=ma->id.next) {
- if (ma->vol.reflection == 0.f) {
- ma->vol.reflection = 1.f;
- ma->vol.transmission_col[0] = ma->vol.transmission_col[1] = ma->vol.transmission_col[2] = 1.0f;
- ma->vol.reflection_col[0] = ma->vol.reflection_col[1] = ma->vol.reflection_col[2] = 1.0f;
- }
-
- do_version_mtex_factor_2_50(ma->mtex, ID_MA);
- }
-
- for (la = main->lamp.first; la; la=la->id.next)
- do_version_mtex_factor_2_50(la->mtex, ID_LA);
-
- for (wo = main->world.first; wo; wo=wo->id.next)
- do_version_mtex_factor_2_50(wo->mtex, ID_WO);
-
- for (tex = main->tex.first; tex; tex=tex->id.next)
- if (tex->vd)
- if (tex->vd->extend == 0)
- tex->vd->extend = TEX_CLIP;
-
- for (sce= main->scene.first; sce; sce= sce->id.next)
- {
- if (sce->audio.main == 0.0f)
- sce->audio.main = 1.0f;
-
- sce->r.ffcodecdata.audio_mixrate = sce->audio.mixrate;
- sce->r.ffcodecdata.audio_volume = sce->audio.main;
- sce->audio.distance_model = 2;
- sce->audio.doppler_factor = 1.0f;
- sce->audio.speed_of_sound = 343.3f;
- }
-
- /* Add default gravity to scenes */
- for (sce= main->scene.first; sce; sce= sce->id.next) {
- if ((sce->physics_settings.flag & PHYS_GLOBAL_GRAVITY) == 0 &&
- len_v3(sce->physics_settings.gravity) == 0.0f)
- {
- sce->physics_settings.gravity[0] = sce->physics_settings.gravity[1] = 0.0f;
- sce->physics_settings.gravity[2] = -9.81f;
- sce->physics_settings.flag = PHYS_GLOBAL_GRAVITY;
- do_gravity = 1;
- }
- }
-
- /* Assign proper global gravity weights for dynamics (only z-coordinate is taken into account) */
- if (do_gravity) for (part= main->particle.first; part; part= part->id.next)
- part->effector_weights->global_gravity = part->acc[2]/-9.81f;
-
- for (ob = main->object.first; ob; ob = ob->id.next) {
- ModifierData *md;
-
- if (do_gravity) {
- for (md= ob->modifiers.first; md; md= md->next) {
- ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth);
- if (clmd)
- clmd->sim_parms->effector_weights->global_gravity = clmd->sim_parms->gravity[2]/-9.81f;
- }
-
- if (ob->soft)
- ob->soft->effector_weights->global_gravity = ob->soft->grav/9.81f;
- }
-
- /* Normal wind shape is plane */
- if (ob->pd) {
- if (ob->pd->forcefield == PFIELD_WIND)
- ob->pd->shape = PFIELD_SHAPE_PLANE;
-
- if (ob->pd->flag & PFIELD_PLANAR)
- ob->pd->shape = PFIELD_SHAPE_PLANE;
- else if (ob->pd->flag & PFIELD_SURFACE)
- ob->pd->shape = PFIELD_SHAPE_SURFACE;
-
- ob->pd->flag |= PFIELD_DO_LOCATION;
- }
- }
- }
-
- if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 6)) {
- Object *ob;
- Lamp *la;
-
- /* New variables for axis-angle rotations and/or quaternion rotations were added, and need proper initialization */
- for (ob= main->object.first; ob; ob= ob->id.next) {
- /* new variables for all objects */
- ob->quat[0]= 1.0f;
- ob->rotAxis[1]= 1.0f;
-
- /* bones */
- if (ob->pose) {
- bPoseChannel *pchan;
-
- for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
- /* just need to initalise rotation axis properly... */
- pchan->rotAxis[1]= 1.0f;
- }
- }
- }
-
- for (la = main->lamp.first; la; la=la->id.next)
- la->compressthresh= 0.05f;
- }
-
- if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 7)) {
- Mesh *me;
- Nurb *nu;
- Lattice *lt;
- Curve *cu;
- Key *key;
- float *data;
- int a, tot;
-
- /* shape keys are no longer applied to the mesh itself, but rather
- * to the derivedmesh/displist, so here we ensure that the basis
- * shape key is always set in the mesh coordinates. */
-
- for (me= main->mesh.first; me; me= me->id.next) {
- if ((key = newlibadr(fd, lib, me->key)) && key->refkey) {
- data= key->refkey->data;
- tot= MIN2(me->totvert, key->refkey->totelem);
-
- for (a=0; a<tot; a++, data+=3)
- copy_v3_v3(me->mvert[a].co, data);
- }
- }
-
- for (lt= main->latt.first; lt; lt= lt->id.next) {
- if ((key = newlibadr(fd, lib, lt->key)) && key->refkey) {
- data= key->refkey->data;
- tot= MIN2(lt->pntsu*lt->pntsv*lt->pntsw, key->refkey->totelem);
-
- for (a=0; a<tot; a++, data+=3)
- copy_v3_v3(lt->def[a].vec, data);
- }
- }
-
- for (cu= main->curve.first; cu; cu= cu->id.next) {
- if ((key = newlibadr(fd, lib, cu->key)) && key->refkey) {
- data= key->refkey->data;
-
- for (nu=cu->nurb.first; nu; nu=nu->next) {
- if (nu->bezt) {
- BezTriple *bezt = nu->bezt;
-
- for (a=0; a<nu->pntsu; a++, bezt++) {
- copy_v3_v3(bezt->vec[0], data); data+=3;
- copy_v3_v3(bezt->vec[1], data); data+=3;
- copy_v3_v3(bezt->vec[2], data); data+=3;
- bezt->alfa= *data; data++;
- }
- }
- else if (nu->bp) {
- BPoint *bp = nu->bp;
-
- for (a=0; a<nu->pntsu*nu->pntsv; a++, bp++) {
- copy_v3_v3(bp->vec, data); data+=3;
- bp->alfa= *data; data++;
- }
- }
- }
- }
- }
- }
-
- if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 8))
- {
- {
- Scene *sce= main->scene.first;
- while (sce) {
- if (sce->r.frame_step==0)
- sce->r.frame_step= 1;
- if (sce->r.mblur_samples==0)
- sce->r.mblur_samples = sce->r.osa;
-
- if (sce->ed && sce->ed->seqbase.first) {
- do_versions_seq_unique_name_all_strips(
- sce, &sce->ed->seqbase);
- }
-
- sce= sce->id.next;
- }
- }
- {
- /* ensure all nodes have unique names */
- bNodeTree *ntree= main->nodetree.first;
- while (ntree) {
- bNode *node=ntree->nodes.first;
-
- while (node) {
- nodeUniqueName(ntree, node);
- node= node->next;
- }
-
- ntree= ntree->id.next;
- }
- }
- {
- Object *ob=main->object.first;
- while (ob) {
- /* shaded mode disabled for now */
- if (ob->dt == OB_MATERIAL) ob->dt = OB_TEXTURE;
- ob=ob->id.next;
- }
- }
-
- {
- bScreen *screen;
- ScrArea *sa;
- SpaceLink *sl;
-
- for (screen= main->screen.first; screen; screen= screen->id.next) {
- for (sa= screen->areabase.first; sa; sa= sa->next) {
- for (sl= sa->spacedata.first; sl; sl= sl->next) {
- if (sl->spacetype==SPACE_VIEW3D) {
- View3D *v3d = (View3D *)sl;
- if (v3d->drawtype == OB_MATERIAL) v3d->drawtype = OB_SOLID;
- }
- }
- }
- }
- }
-
- /* only convert old 2.50 files with color management */
- if (main->versionfile == 250) {
- Scene *sce=main->scene.first;
- Material *ma=main->mat.first;
- World *wo=main->world.first;
- Tex *tex=main->tex.first;
- int i, convert=0;
-
- /* convert to new color management system:
- * while previously colors were stored as srgb,
- * now they are stored as linear internally,
- * with screen gamma correction in certain places in the UI. */
-
- /* don't know what scene is active, so we'll convert if any scene has it enabled... */
- while (sce) {
- if (sce->r.color_mgt_flag & R_COLOR_MANAGEMENT)
- convert=1;
- sce=sce->id.next;
- }
-
- if (convert) {
- while (ma) {
- if (ma->ramp_col) {
- ColorBand *band = (ColorBand *)ma->ramp_col;
- for (i=0; i<band->tot; i++) {
- CBData *data = band->data + i;
- srgb_to_linearrgb_v3_v3(&data->r, &data->r);
- }
- }
- if (ma->ramp_spec) {
- ColorBand *band = (ColorBand *)ma->ramp_spec;
- for (i=0; i<band->tot; i++) {
- CBData *data = band->data + i;
- srgb_to_linearrgb_v3_v3(&data->r, &data->r);
- }
- }
-
- srgb_to_linearrgb_v3_v3(&ma->r, &ma->r);
- srgb_to_linearrgb_v3_v3(&ma->specr, &ma->specr);
- srgb_to_linearrgb_v3_v3(&ma->mirr, &ma->mirr);
- srgb_to_linearrgb_v3_v3(ma->sss_col, ma->sss_col);
- ma=ma->id.next;
- }
-
- while (tex) {
- if (tex->coba) {
- ColorBand *band = (ColorBand *)tex->coba;
- for (i=0; i<band->tot; i++) {
- CBData *data = band->data + i;
- srgb_to_linearrgb_v3_v3(&data->r, &data->r);
- }
- }
- tex=tex->id.next;
- }
-
- while (wo) {
- srgb_to_linearrgb_v3_v3(&wo->ambr, &wo->ambr);
- srgb_to_linearrgb_v3_v3(&wo->horr, &wo->horr);
- srgb_to_linearrgb_v3_v3(&wo->zenr, &wo->zenr);
- wo=wo->id.next;
- }
- }
- }
- }
-
- if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 9))
- {
- Scene *sce;
- Mesh *me;
- Object *ob;
-
- for (sce=main->scene.first; sce; sce=sce->id.next)
- if (!sce->toolsettings->particle.selectmode)
- sce->toolsettings->particle.selectmode= SCE_SELECT_PATH;
-
- if (main->versionfile == 250 && main->subversionfile > 1) {
- for (me=main->mesh.first; me; me=me->id.next)
- multires_load_old_250(me);
-
- for (ob=main->object.first; ob; ob=ob->id.next) {
- MultiresModifierData *mmd = (MultiresModifierData *)modifiers_findByType(ob, eModifierType_Multires);
-
- if (mmd) {
- mmd->totlvl--;
- mmd->lvl--;
- mmd->sculptlvl= mmd->lvl;
- mmd->renderlvl= mmd->lvl;
- }
- }
- }
- }
-
- if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 10))
- {
- Object *ob;
-
- /* properly initialize hair clothsim data on old files */
- for (ob = main->object.first; ob; ob = ob->id.next) {
- ModifierData *md;
- for (md= ob->modifiers.first; md; md= md->next) {
- if (md->type == eModifierType_Cloth) {
- ClothModifierData *clmd = (ClothModifierData *)md;
- if (clmd->sim_parms->velocity_smooth < 0.01f)
- clmd->sim_parms->velocity_smooth = 0.f;
- }
- }
- }
- }
-
- /* fix bad area setup in subversion 10 */
- if (main->versionfile == 250 && main->subversionfile == 10)
- {
- /* fix for new view type in sequencer */
- bScreen *screen;
- ScrArea *sa;
- SpaceLink *sl;
-
-
- /* remove all preview window in wrong spaces */
- for (screen= main->screen.first; screen; screen= screen->id.next) {
- for (sa= screen->areabase.first; sa; sa= sa->next) {
- for (sl= sa->spacedata.first; sl; sl= sl->next) {
- if (sl->spacetype!=SPACE_SEQ) {
- ARegion *ar;
- ListBase *regionbase;
-
- if (sl == sa->spacedata.first) {
- regionbase = &sa->regionbase;
- }
- else {
- regionbase = &sl->regionbase;
- }
-
-
- for ( ar = regionbase->first; ar; ar = ar->next) {
- if (ar->regiontype == RGN_TYPE_PREVIEW)
- break;
- }
-
- if (ar && (ar->regiontype == RGN_TYPE_PREVIEW)) {
- SpaceType *st= BKE_spacetype_from_id(SPACE_SEQ);
- BKE_area_region_free(st, ar);
- BLI_freelinkN(regionbase, ar);
- }
- }
- }
- }
- }
- }
-
- if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 11))
- {
- {
- /* fix for new view type in sequencer */
- bScreen *screen;
- ScrArea *sa;
- SpaceLink *sl;
-
-
- for (screen= main->screen.first; screen; screen= screen->id.next) {
- for (sa= screen->areabase.first; sa; sa= sa->next) {
- for (sl= sa->spacedata.first; sl; sl= sl->next) {
- if (sl->spacetype==SPACE_SEQ) {
- ARegion *ar;
- ARegion *ar_main;
- ListBase *regionbase;
- SpaceSeq *sseq = (SpaceSeq *)sl;
-
- if (sl == sa->spacedata.first) {
- regionbase = &sa->regionbase;
- }
- else {
- regionbase = &sl->regionbase;
- }
-
- if (sseq->view == 0) sseq->view = SEQ_VIEW_SEQUENCE;
- if (sseq->mainb == 0) sseq->mainb = SEQ_DRAW_IMG_IMBUF;
-
- ar_main = (ARegion*)regionbase->first;
- for (; ar_main; ar_main = ar_main->next) {
- if (ar_main->regiontype == RGN_TYPE_WINDOW)
- break;
- }
- ar= MEM_callocN(sizeof(ARegion), "preview area for sequencer");
- BLI_insertlinkbefore(regionbase, ar_main, ar);
- sequencer_init_preview_region(ar);
- }
- }
- }
- }
- }
- }
-
- if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 12))
- {
- Scene *sce;
- Object *ob;
- Brush *brush;
- Material *ma;
-
- /* game engine changes */
- for (sce = main->scene.first; sce; sce = sce->id.next) {
- sce->gm.eyeseparation = 0.10f;
- }
-
- /* anim viz changes */
- for (ob= main->object.first; ob; ob= ob->id.next) {
- /* initialize object defaults */
- animviz_settings_init(&ob->avs);
-
- /* if armature, copy settings for pose from armature data
- * performing initialization where appropriate
- */
- if (ob->pose && ob->data) {
- bArmature *arm= newlibadr(fd, lib, ob->data);
- if (arm) { /* XXX - why does this fail in some cases? */
- bAnimVizSettings *avs= &ob->pose->avs;
-
- /* ghosting settings ---------------- */
- /* ranges */
- avs->ghost_bc= avs->ghost_ac= arm->ghostep;
-
- avs->ghost_sf= arm->ghostsf;
- avs->ghost_ef= arm->ghostef;
- if ((avs->ghost_sf == avs->ghost_ef) && (avs->ghost_sf == 0)) {
- avs->ghost_sf= 1;
- avs->ghost_ef= 100;
- }
-
- /* type */
- if (arm->ghostep == 0)
- avs->ghost_type= GHOST_TYPE_NONE;
- else
- avs->ghost_type= arm->ghosttype + 1;
-
- /* stepsize */
- avs->ghost_step= arm->ghostsize;
- if (avs->ghost_step == 0)
- avs->ghost_step= 1;
-
- /* path settings --------------------- */
- /* ranges */
- avs->path_bc= arm->pathbc;
- avs->path_ac= arm->pathac;
- if ((avs->path_bc == avs->path_ac) && (avs->path_bc == 0))
- avs->path_bc= avs->path_ac= 10;
-
- avs->path_sf= arm->pathsf;
- avs->path_ef= arm->pathef;
- if ((avs->path_sf == avs->path_ef) && (avs->path_sf == 0)) {
- avs->path_sf= 1;
- avs->path_ef= 250;
- }
-
- /* flags */
- if (arm->pathflag & ARM_PATH_FNUMS)
- avs->path_viewflag |= MOTIONPATH_VIEW_FNUMS;
- if (arm->pathflag & ARM_PATH_KFRAS)
- avs->path_viewflag |= MOTIONPATH_VIEW_KFRAS;
- if (arm->pathflag & ARM_PATH_KFNOS)
- avs->path_viewflag |= MOTIONPATH_VIEW_KFNOS;
-
- /* bake flags */
- if (arm->pathflag & ARM_PATH_HEADS)
- avs->path_bakeflag |= MOTIONPATH_BAKE_HEADS;
-
- /* type */
- if (arm->pathflag & ARM_PATH_ACFRA)
- avs->path_type = MOTIONPATH_TYPE_ACFRA;
-
- /* stepsize */
- avs->path_step= arm->pathsize;
- if (avs->path_step == 0)
- avs->path_step= 1;
- }
- else
- animviz_settings_init(&ob->pose->avs);
- }
- }
-
- /* brush texture changes */
- for (brush= main->brush.first; brush; brush= brush->id.next) {
- default_mtex(&brush->mtex);
- }
-
- for (ma= main->mat.first; ma; ma= ma->id.next) {
- if (ma->vol.ms_spread < 0.0001f) {
- ma->vol.ms_spread = 0.2f;
- ma->vol.ms_diff = 1.f;
- ma->vol.ms_intensity = 1.f;
- }
- }
- }
-
- if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 13)) {
- /* NOTE: if you do more conversion, be sure to do it outside of this and
- * increase subversion again, otherwise it will not be correct */
- Object *ob;
-
- /* convert degrees to radians for internal use */
- for (ob=main->object.first; ob; ob=ob->id.next) {
- bPoseChannel *pchan;
-
- do_version_constraints_radians_degrees_250(&ob->constraints);
-
- if (ob->pose) {
- for (pchan=ob->pose->chanbase.first; pchan; pchan=pchan->next) {
- pchan->limitmin[0] *= (float)(M_PI/180.0);
- pchan->limitmin[1] *= (float)(M_PI/180.0);
- pchan->limitmin[2] *= (float)(M_PI/180.0);
- pchan->limitmax[0] *= (float)(M_PI/180.0);
- pchan->limitmax[1] *= (float)(M_PI/180.0);
- pchan->limitmax[2] *= (float)(M_PI/180.0);
-
- do_version_constraints_radians_degrees_250(&pchan->constraints);
- }
- }
- }
- }
-
- if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 14)) {
- /* fix for bad View2D extents for Animation Editors */
- bScreen *screen;
- ScrArea *sa;
- SpaceLink *sl;
-
- for (screen= main->screen.first; screen; screen= screen->id.next) {
- for (sa= screen->areabase.first; sa; sa= sa->next) {
- for (sl= sa->spacedata.first; sl; sl= sl->next) {
- ListBase *regionbase;
- ARegion *ar;
-
- if (sl == sa->spacedata.first)
- regionbase = &sa->regionbase;
- else
- regionbase = &sl->regionbase;
-
- if (ELEM(sl->spacetype, SPACE_ACTION, SPACE_NLA)) {
- for (ar = (ARegion*)regionbase->first; ar; ar = ar->next) {
- if (ar->regiontype == RGN_TYPE_WINDOW) {
- ar->v2d.cur.ymax = ar->v2d.tot.ymax = 0.0f;
- ar->v2d.cur.ymin = ar->v2d.tot.ymin = (float)(-sa->winy) / 3.0f;
- }
- }
- }
- }
- }
- }
- }
-
- if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 15)) {
- World *wo;
- Material *ma;
-
- /* ambient default from 0.5f to 1.0f */
- for (ma= main->mat.first; ma; ma=ma->id.next)
- ma->amb *= 2.0f;
-
- for (wo= main->world.first; wo; wo=wo->id.next) {
- /* ao splitting into ao/env/indirect */
- wo->ao_env_energy= wo->aoenergy;
- wo->aoenergy= 1.0f;
-
- if (wo->ao_indirect_bounces == 0)
- wo->ao_indirect_bounces= 1;
- else
- wo->mode |= WO_INDIRECT_LIGHT;
-
- if (wo->aomix == WO_AOSUB)
- wo->ao_env_energy= -wo->ao_env_energy;
- else if (wo->aomix == WO_AOADDSUB)
- wo->mode |= WO_AMB_OCC;
-
- wo->aomix= WO_AOMUL;
-
- /* ambient default from 0.5f to 1.0f */
- mul_v3_fl(&wo->ambr, 0.5f);
- wo->ao_env_energy *= 0.5f;
- }
- }
-
- if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 17)) {
- Scene *sce;
- Sequence *seq;
- Material *ma;
-
- /* initialize to sane default so toggling on border shows something */
- for (sce = main->scene.first; sce; sce = sce->id.next) {
- if (sce->r.border.xmin == 0.0f && sce->r.border.ymin == 0.0f &&
- sce->r.border.xmax == 0.0f && sce->r.border.ymax == 0.0f) {
- sce->r.border.xmin = 0.0f;
- sce->r.border.ymin = 0.0f;
- sce->r.border.xmax = 1.0f;
- sce->r.border.ymax = 1.0f;
- }
-
- if ((sce->r.ffcodecdata.flags & FFMPEG_MULTIPLEX_AUDIO) == 0)
- sce->r.ffcodecdata.audio_codec = 0x0; // CODEC_ID_NONE
-
- SEQ_BEGIN(sce->ed, seq) {
- seq->volume = 1.0f;
- }
- SEQ_END
- }
-
- /* particle brush strength factor was changed from int to float */
- for (sce= main->scene.first; sce; sce=sce->id.next) {
- ParticleEditSettings *pset= &sce->toolsettings->particle;
- int a;
-
- for (a=0; a<PE_TOT_BRUSH; a++)
- pset->brush[a].strength /= 100.0f;
- }
-
- for (ma = main->mat.first; ma; ma=ma->id.next)
- if (ma->mode & MA_TRACEBLE)
- ma->shade_flag |= MA_APPROX_OCCLUSION;
-
- /* sequencer changes */
- {
- bScreen *screen;
- ScrArea *sa;
- SpaceLink *sl;
-
- for (screen= main->screen.first; screen; screen= screen->id.next) {
- for (sa= screen->areabase.first; sa; sa= sa->next) {
- for (sl= sa->spacedata.first; sl; sl= sl->next) {
- if (sl->spacetype==SPACE_SEQ) {
- ARegion *ar_preview;
- ListBase *regionbase;
-
- if (sl == sa->spacedata.first) {
- regionbase = &sa->regionbase;
- }
- else {
- regionbase = &sl->regionbase;
- }
-
- ar_preview = (ARegion*)regionbase->first;
- for (; ar_preview; ar_preview = ar_preview->next) {
- if (ar_preview->regiontype == RGN_TYPE_PREVIEW)
- break;
- }
- if (ar_preview && (ar_preview->regiontype == RGN_TYPE_PREVIEW)) {
- sequencer_init_preview_region(ar_preview);
- }
- }
- }
- }
- }
- } /* sequencer changes */
- }
-
- if (main->versionfile <= 251) { /* 2.5.1 had no subversions */
- bScreen *sc;
-
- /* Blender 2.5.2 - subversion 0 introduced a new setting: V3D_RENDER_OVERRIDE.
- * This bit was used in the past for V3D_TRANSFORM_SNAP, which is now deprecated.
- * Here we clear it for old files so they don't come in with V3D_RENDER_OVERRIDE set,
- * which would cause cameras, lamps, etc to become invisible */
- for (sc= main->screen.first; sc; sc= sc->id.next) {
- ScrArea *sa;
- for (sa= sc->areabase.first; sa; sa= sa->next) {
- SpaceLink *sl;
- for (sl= sa->spacedata.first; sl; sl= sl->next) {
- if (sl->spacetype==SPACE_VIEW3D) {
- View3D* v3d = (View3D *)sl;
- v3d->flag2 &= ~V3D_RENDER_OVERRIDE;
- }
- }
- }
- }
- }
-
- if (main->versionfile < 252 || (main->versionfile == 252 && main->subversionfile < 1)) {
- Brush *brush;
- Object *ob;
- Scene *scene;
- bNodeTree *ntree;
-
- for (brush= main->brush.first; brush; brush= brush->id.next) {
- if (brush->curve) brush->curve->preset = CURVE_PRESET_SMOOTH;
- }
-
- /* properly initialize active flag for fluidsim modifiers */
- for (ob = main->object.first; ob; ob = ob->id.next) {
- ModifierData *md;
- for (md= ob->modifiers.first; md; md= md->next) {
- if (md->type == eModifierType_Fluidsim) {
- FluidsimModifierData *fmd = (FluidsimModifierData *)md;
- fmd->fss->flag |= OB_FLUIDSIM_ACTIVE;
- fmd->fss->flag |= OB_FLUIDSIM_OVERRIDE_TIME;
- }
- }
- }
-
- /* adjustment to color balance node values */
- for (scene= main->scene.first; scene; scene= scene->id.next) {
- if (scene->nodetree) {
- bNode *node=scene->nodetree->nodes.first;
-
- while (node) {
- if (node->type == CMP_NODE_COLORBALANCE) {
- NodeColorBalance *n= (NodeColorBalance *)node->storage;
- n->lift[0] += 1.f;
- n->lift[1] += 1.f;
- n->lift[2] += 1.f;
- }
- node= node->next;
- }
- }
- }
- /* check inside node groups too */
- for (ntree= main->nodetree.first; ntree; ntree=ntree->id.next) {
- bNode *node=ntree->nodes.first;
-
- while (node) {
- if (node->type == CMP_NODE_COLORBALANCE) {
- NodeColorBalance *n= (NodeColorBalance *)node->storage;
- n->lift[0] += 1.f;
- n->lift[1] += 1.f;
- n->lift[2] += 1.f;
- }
- node= node->next;
- }
- }
- }
-
- /* old-track -> constraints (this time we're really doing it!) */
- if (main->versionfile < 252 || (main->versionfile == 252 && main->subversionfile < 2)) {
- Object *ob;
-
- for (ob = main->object.first; ob; ob = ob->id.next)
- do_version_old_trackto_to_constraints(ob);
- }
-
- if (main->versionfile < 252 || (main->versionfile == 252 && main->subversionfile < 5)) {
- bScreen *sc;
-
- /* Image editor scopes */
- for (sc= main->screen.first; sc; sc= sc->id.next) {
- ScrArea *sa;
- for (sa= sc->areabase.first; sa; sa= sa->next) {
- SpaceLink *sl;
- for (sl= sa->spacedata.first; sl; sl= sl->next) {
- if (sl->spacetype==SPACE_IMAGE) {
- SpaceImage *sima = (SpaceImage *)sl;
- scopes_new(&sima->scopes);
- }
- }
- }
- }
- }
-
-
- if (main->versionfile < 253)
- {
- Object *ob;
- Scene *scene;
- bScreen *sc;
- Tex *tex;
- Brush *brush;
-
- for (sc= main->screen.first; sc; sc= sc->id.next) {
- ScrArea *sa;
- for (sa= sc->areabase.first; sa; sa= sa->next) {
- SpaceLink *sl;
- for (sl= sa->spacedata.first; sl; sl= sl->next) {
- if (sl->spacetype == SPACE_NODE) {
- SpaceNode *snode= (SpaceNode *)sl;
- ListBase *regionbase;
- ARegion *ar;
-
- if (sl == sa->spacedata.first)
- regionbase = &sa->regionbase;
- else
- regionbase = &sl->regionbase;
-
- if (snode->v2d.minzoom > 0.09f)
- snode->v2d.minzoom= 0.09f;
- if (snode->v2d.maxzoom < 2.31f)
- snode->v2d.maxzoom= 2.31f;
-
- for (ar= regionbase->first; ar; ar= ar->next) {
- if (ar->regiontype == RGN_TYPE_WINDOW) {
- if (ar->v2d.minzoom > 0.09f)
- ar->v2d.minzoom= 0.09f;
- if (ar->v2d.maxzoom < 2.31f)
- ar->v2d.maxzoom= 2.31f;
- }
- }
- }
- else if (sl->spacetype == SPACE_TIME) {
- SpaceTime *stime= (SpaceTime *)sl;
-
- /* enable all cache display */
- stime->cache_display |= TIME_CACHE_DISPLAY;
- stime->cache_display |= (TIME_CACHE_SOFTBODY|TIME_CACHE_PARTICLES);
- stime->cache_display |= (TIME_CACHE_CLOTH|TIME_CACHE_SMOKE|TIME_CACHE_DYNAMICPAINT);
- }
- }
- }
- }
-
- do_version_mdef_250(main);
-
- /* parent type to modifier */
- for (ob = main->object.first; ob; ob = ob->id.next) {
- if (ob->parent) {
- Object *parent= (Object *)newlibadr(fd, lib, ob->parent);
- if (parent) { /* parent may not be in group */
- if (parent->type==OB_ARMATURE && ob->partype==PARSKEL) {
- ArmatureModifierData *amd;
- bArmature *arm= (bArmature *)newlibadr(fd, lib, parent->data);
-
- amd = (ArmatureModifierData*) modifier_new(eModifierType_Armature);
- amd->object = ob->parent;
- BLI_addtail((ListBase*)&ob->modifiers, amd);
- amd->deformflag= arm->deformflag;
- ob->partype = PAROBJECT;
- }
- else if (parent->type==OB_LATTICE && ob->partype==PARSKEL) {
- LatticeModifierData *lmd;
-
- lmd = (LatticeModifierData*) modifier_new(eModifierType_Lattice);
- lmd->object = ob->parent;
- BLI_addtail((ListBase*)&ob->modifiers, lmd);
- ob->partype = PAROBJECT;
- }
- else if (parent->type==OB_CURVE && ob->partype==PARCURVE) {
- CurveModifierData *cmd;
-
- cmd = (CurveModifierData*) modifier_new(eModifierType_Curve);
- cmd->object = ob->parent;
- BLI_addtail((ListBase*)&ob->modifiers, cmd);
- ob->partype = PAROBJECT;
- }
- }
- }
- }
-
- /* initialize scene active layer */
- for (scene= main->scene.first; scene; scene=scene->id.next) {
- int i;
- for (i=0; i<20; i++) {
- if (scene->lay & (1<<i)) {
- scene->layact= 1<<i;
- break;
- }
- }
- }
-
- for (tex= main->tex.first; tex; tex= tex->id.next) {
- /* if youre picky, this isn't correct until we do a version bump
- * since you could set saturation to be 0.0*/
- if (tex->saturation==0.0f)
- tex->saturation= 1.0f;
- }
-
- {
- Curve *cu;
- for (cu= main->curve.first; cu; cu= cu->id.next) {
- cu->smallcaps_scale= 0.75f;
- }
- }
-
- for (scene= main->scene.first; scene; scene=scene->id.next) {
- if (scene) {
- Sequence *seq;
- SEQ_BEGIN(scene->ed, seq) {
- if (seq->sat==0.0f) {
- seq->sat= 1.0f;
- }
- }
- SEQ_END
- }
- }
-
- /* GSOC 2010 Sculpt - New settings for Brush */
-
- for (brush= main->brush.first; brush; brush= brush->id.next) {
- /* Sanity Check */
-
- // infinite number of dabs
- if (brush->spacing == 0)
- brush->spacing = 10;
-
- // will have no effect
- if (brush->alpha == 0)
- brush->alpha = 0.5f;
-
- // bad radius
- if (brush->unprojected_radius == 0)
- brush->unprojected_radius = 0.125f;
-
- // unusable size
- if (brush->size == 0)
- brush->size = 35;
-
- // can't see overlay
- if (brush->texture_overlay_alpha == 0)
- brush->texture_overlay_alpha = 33;
-
- // same as draw brush
- if (brush->crease_pinch_factor == 0)
- brush->crease_pinch_factor = 0.5f;
-
- // will sculpt no vertexes
- if (brush->plane_trim == 0)
- brush->plane_trim = 0.5f;
-
- // same as smooth stroke off
- if (brush->smooth_stroke_radius == 0)
- brush->smooth_stroke_radius= 75;
-
- // will keep cursor in one spot
- if (brush->smooth_stroke_radius == 1)
- brush->smooth_stroke_factor= 0.9f;
-
- // same as dots
- if (brush->rate == 0)
- brush->rate = 0.1f;
-
- /* New Settings */
- if (main->versionfile < 252 || (main->versionfile == 252 && main->subversionfile < 5)) {
- brush->flag |= BRUSH_SPACE_ATTEN; // explicitly enable adaptive space
-
- // spacing was originally in pixels, convert it to percentage for new version
- // size should not be zero due to sanity check above
- brush->spacing = (int)(100*((float)brush->spacing) / ((float)brush->size));
-
- if (brush->add_col[0] == 0 &&
- brush->add_col[1] == 0 &&
- brush->add_col[2] == 0)
- {
- brush->add_col[0] = 1.00f;
- brush->add_col[1] = 0.39f;
- brush->add_col[2] = 0.39f;
- }
-
- if (brush->sub_col[0] == 0 &&
- brush->sub_col[1] == 0 &&
- brush->sub_col[2] == 0)
- {
- brush->sub_col[0] = 0.39f;
- brush->sub_col[1] = 0.39f;
- brush->sub_col[2] = 1.00f;
- }
- }
- }
- }
-
- /* GSOC Sculpt 2010 - Sanity check on Sculpt/Paint settings */
- if (main->versionfile < 253) {
- Scene *sce;
- for (sce= main->scene.first; sce; sce= sce->id.next) {
- if (sce->toolsettings->sculpt_paint_unified_alpha == 0)
- sce->toolsettings->sculpt_paint_unified_alpha = 0.5f;
-
- if (sce->toolsettings->sculpt_paint_unified_unprojected_radius == 0)
- sce->toolsettings->sculpt_paint_unified_unprojected_radius = 0.125f;
-
- if (sce->toolsettings->sculpt_paint_unified_size == 0)
- sce->toolsettings->sculpt_paint_unified_size = 35;
- }
- }
-
- if (main->versionfile < 253 || (main->versionfile == 253 && main->subversionfile < 1))
- {
- Object *ob;
-
- for (ob = main->object.first; ob; ob = ob->id.next) {
- ModifierData *md;
- for (md= ob->modifiers.first; md; md= md->next) {
- if (md->type == eModifierType_Smoke) {
- SmokeModifierData *smd = (SmokeModifierData *)md;
-
- if ((smd->type & MOD_SMOKE_TYPE_DOMAIN) && smd->domain)
- {
- smd->domain->vorticity = 2.0f;
- smd->domain->time_scale = 1.0f;
-
- if (!(smd->domain->flags & (1<<4)))
- continue;
-
- /* delete old MOD_SMOKE_INITVELOCITY flag */
- smd->domain->flags &= ~(1<<4);
-
- /* for now just add it to all flow objects in the scene */
- {
- Object *ob2;
- for (ob2 = main->object.first; ob2; ob2 = ob2->id.next) {
- ModifierData *md2;
- for (md2= ob2->modifiers.first; md2; md2= md2->next) {
- if (md2->type == eModifierType_Smoke) {
- SmokeModifierData *smd2 = (SmokeModifierData *)md2;
-
- if ((smd2->type & MOD_SMOKE_TYPE_FLOW) && smd2->flow)
- {
- smd2->flow->flags |= MOD_SMOKE_FLOW_INITVELOCITY;
- }
- }
- }
- }
- }
-
- }
- else if ((smd->type & MOD_SMOKE_TYPE_FLOW) && smd->flow) {
- smd->flow->vel_multi = 1.0f;
- }
-
- }
- }
- }
- }
-
- if (main->versionfile < 255 || (main->versionfile == 255 && main->subversionfile < 1)) {
- Brush *br;
- ParticleSettings *part;
- bScreen *sc;
- Object *ob;
-
- for (br= main->brush.first; br; br= br->id.next) {
- if (br->ob_mode==0)
- br->ob_mode= OB_MODE_ALL_PAINT;
- }
-
- for (part = main->particle.first; part; part = part->id.next) {
- if (part->boids)
- part->boids->pitch = 1.0f;
-
- part->flag &= ~PART_HAIR_REGROW; /* this was a deprecated flag before */
- part->kink_amp_clump = 1.f; /* keep old files looking similar */
- }
-
- for (sc= main->screen.first; sc; sc= sc->id.next) {
- ScrArea *sa;
- for (sa= sc->areabase.first; sa; sa= sa->next) {
- SpaceLink *sl;
- for (sl= sa->spacedata.first; sl; sl= sl->next) {
- if (sl->spacetype == SPACE_INFO) {
- SpaceInfo *sinfo= (SpaceInfo *)sl;
- ARegion *ar;
-
- sinfo->rpt_mask= INFO_RPT_OP;
-
- for (ar= sa->regionbase.first; ar; ar= ar->next) {
- if (ar->regiontype == RGN_TYPE_WINDOW) {
- ar->v2d.scroll = (V2D_SCROLL_RIGHT);
- ar->v2d.align = V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_NEG_Y; /* align bottom left */
- ar->v2d.keepofs = V2D_LOCKOFS_X;
- ar->v2d.keepzoom = (V2D_LOCKZOOM_X|V2D_LOCKZOOM_Y|V2D_LIMITZOOM|V2D_KEEPASPECT);
- ar->v2d.keeptot= V2D_KEEPTOT_BOUNDS;
- ar->v2d.minzoom= ar->v2d.maxzoom= 1.0f;
- }
- }
- }
- }
- }
- }
-
- /* fix rotation actuators for objects so they use real angles (radians)
- * since before blender went opensource this strange scalar was used: (1 / 0.02) * 2 * math.pi/360 */
- for (ob= main->object.first; ob; ob= ob->id.next) {
- bActuator *act= ob->actuators.first;
- while (act) {
- if (act->type==ACT_OBJECT) {
- /* multiply velocity with 50 in old files */
- bObjectActuator *oa= act->data;
- mul_v3_fl(oa->drot, 0.8726646259971648f);
- }
- act= act->next;
- }
- }
- }
-
- // init facing axis property of steering actuators
- {
- Object *ob;
- for (ob = main->object.first; ob; ob = ob->id.next) {
- bActuator *act;
- for (act= ob->actuators.first; act; act= act->next) {
- if (act->type==ACT_STEERING) {
- bSteeringActuator* stact = act->data;
- if (stact->facingaxis==0)
- {
- stact->facingaxis=1;
- }
- }
- }
- }
- }
-
- if (main->versionfile < 255 || (main->versionfile == 255 && main->subversionfile < 3)) {
- Object *ob;
-
- /* ocean res is now squared, reset old ones - will be massive */
- for (ob = main->object.first; ob; ob = ob->id.next) {
- ModifierData *md;
- for (md= ob->modifiers.first; md; md= md->next) {
- if (md->type == eModifierType_Ocean) {
- OceanModifierData *omd = (OceanModifierData *)md;
- omd->resolution = 7;
- omd->oceancache = NULL;
- }
- }
- }
- }
-
- if (main->versionfile < 256) {
- bScreen *sc;
- ScrArea *sa;
- Key *key;
-
- /* Fix for sample line scope initializing with no height */
- for (sc= main->screen.first; sc; sc= sc->id.next) {
- sa= sc->areabase.first;
- while (sa) {
- SpaceLink *sl;
- for (sl= sa->spacedata.first; sl; sl= sl->next) {
- if (sl->spacetype==SPACE_IMAGE) {
- SpaceImage *sima= (SpaceImage *)sl;
- if (sima->sample_line_hist.height == 0 )
- sima->sample_line_hist.height = 100;
- }
- }
- sa= sa->next;
- }
- }
-
- /* old files could have been saved with slidermin = slidermax = 0.0, but the UI in
- * 2.4x would never reveal this to users as a dummy value always ended up getting used
- * instead
- */
- for (key = main->key.first; key; key = key->id.next) {
- KeyBlock *kb;
-
- for (kb = key->block.first; kb; kb = kb->next) {
- if (IS_EQF(kb->slidermin, kb->slidermax) && IS_EQ(kb->slidermax, 0))
- kb->slidermax = kb->slidermin + 1.0f;
- }
- }
- }
+ bNode *node;
- if (main->versionfile < 256 || (main->versionfile == 256 && main->subversionfile < 1)) {
- /* fix for bones that didn't have arm_roll before */
- bArmature* arm;
- Bone* bone;
- Object *ob;
-
- for (arm = main->armature.first; arm; arm = arm->id.next)
- for (bone = arm->bonebase.first; bone; bone = bone->next)
- do_version_bone_roll_256(bone);
-
- /* fix for objects which have zero dquat's
- * since this is multiplied with the quat rather than added */
- for (ob= main->object.first; ob; ob= ob->id.next) {
- if (is_zero_v4(ob->dquat)) {
- unit_qt(ob->dquat);
- }
- if (is_zero_v3(ob->drotAxis) && ob->drotAngle == 0.0f) {
- unit_axis_angle(ob->drotAxis, &ob->drotAngle);
- }
- }
- }
-
- if (main->versionfile < 256 || (main->versionfile == 256 && main->subversionfile < 2)) {
- bNodeTree *ntree;
-
- /* node sockets are not exposed automatically any more,
- * this mimics the old behavior by adding all unlinked sockets to groups.
- */
- for (ntree=main->nodetree.first; ntree; ntree=ntree->id.next) {
- /* XXX Only setting a flag here. Actual adding of group sockets
- * is done in lib_verify_nodetree, because at this point the internal
- * nodes may not be up-to-date! (missing lib-link)
- */
- ntree->flag |= NTREE_DO_VERSIONS_GROUP_EXPOSE;
- }
- }
-
- if (main->versionfile < 256 || (main->versionfile == 256 && main->subversionfile <3)) {
- bScreen *sc;
- Brush *brush;
- Object *ob;
- ParticleSettings *part;
- Material *mat;
- int tex_nr, transp_tex;
-
- for (mat = main->mat.first; mat; mat = mat->id.next) {
- if (!(mat->mode & MA_TRANSP) && !(mat->material_type & MA_TYPE_VOLUME)) {
-
- transp_tex= 0;
-
- for (tex_nr=0; tex_nr<MAX_MTEX; tex_nr++) {
- if (!mat->mtex[tex_nr]) continue;
- if (mat->mtex[tex_nr]->mapto & MAP_ALPHA) transp_tex= 1;
- }
-
- /* weak! material alpha could be animated */
- if (mat->alpha < 1.0f || mat->fresnel_tra > 0.0f || transp_tex) {
- mat->mode |= MA_TRANSP;
- mat->mode &= ~(MA_ZTRANSP|MA_RAYTRANSP);
- }
- }
- }
-
- /* redraws flag in SpaceTime has been moved to Screen level */
- for (sc = main->screen.first; sc; sc= sc->id.next) {
- if (sc->redraws_flag == 0) {
- /* just initialize to default? */
- // XXX: we could also have iterated through areas, and taken them from the first timeline available...
- sc->redraws_flag = TIME_ALL_3D_WIN|TIME_ALL_ANIM_WIN;
- }
- }
-
- for (brush= main->brush.first; brush; brush= brush->id.next) {
- if (brush->height == 0)
- brush->height= 0.4f;
- }
-
- /* replace 'rim material' option for in offset*/
- for (ob = main->object.first; ob; ob = ob->id.next) {
- ModifierData *md;
- for (md= ob->modifiers.first; md; md= md->next) {
- if (md->type == eModifierType_Solidify) {
- SolidifyModifierData *smd = (SolidifyModifierData *)md;
- if (smd->flag & MOD_SOLIDIFY_RIM_MATERIAL) {
- smd->mat_ofs_rim= 1;
- smd->flag &= ~MOD_SOLIDIFY_RIM_MATERIAL;
- }
- }
- }
- }
-
- /* particle draw color from material */
- for (part = main->particle.first; part; part = part->id.next) {
- if (part->draw & PART_DRAW_MAT_COL)
- part->draw_col = PART_DRAW_COL_MAT;
- }
- }
-
- if (main->versionfile < 256 || (main->versionfile == 256 && main->subversionfile < 6)) {
- Mesh *me;
-
- for (me= main->mesh.first; me; me= me->id.next)
- mesh_calc_normals_tessface(me->mvert, me->totvert, me->mface, me->totface, NULL);
- }
-
- if (main->versionfile < 256 || (main->versionfile == 256 && main->subversionfile < 2)) {
- /* update blur area sizes from 0..1 range to 0..100 percentage */
- Scene *scene;
- bNode *node;
- for (scene=main->scene.first; scene; scene=scene->id.next)
- if (scene->nodetree)
- for (node=scene->nodetree->nodes.first; node; node=node->next)
- if (node->type==CMP_NODE_BLUR) {
- NodeBlurData *nbd= node->storage;
- nbd->percentx *= 100.0f;
- nbd->percenty *= 100.0f;
- }
- }
-
- if (main->versionfile < 258 || (main->versionfile == 258 && main->subversionfile < 1)) {
- /* screen view2d settings were not properly initialized [#27164]
- * v2d->scroll caused the bug but best reset other values too which are in old blend files only.
- * need to make less ugly - possibly an iterator? */
- bScreen *screen;
- for (screen= main->screen.first; screen; screen= screen->id.next) {
- ScrArea *sa;
- /* add regions */
- for (sa= screen->areabase.first; sa; sa= sa->next) {
- SpaceLink *sl= sa->spacedata.first;
- if (sl->spacetype==SPACE_IMAGE) {
- ARegion *ar;
- for (ar=sa->regionbase.first; ar; ar= ar->next) {
- if (ar->regiontype == RGN_TYPE_WINDOW) {
- View2D *v2d= &ar->v2d;
- v2d->minzoom= v2d->maxzoom= v2d->scroll= v2d->keeptot= v2d->keepzoom= v2d->keepofs= v2d->align= 0;
- }
- }
- }
- for (sl= sa->spacedata.first; sl; sl= sl->next) {
- if (sl->spacetype==SPACE_IMAGE) {
- ARegion *ar;
- for (ar=sl->regionbase.first; ar; ar= ar->next) {
- if (ar->regiontype == RGN_TYPE_WINDOW) {
- View2D *v2d= &ar->v2d;
- v2d->minzoom= v2d->maxzoom= v2d->scroll= v2d->keeptot= v2d->keepzoom= v2d->keepofs= v2d->align= 0;
- }
- }
- }
- }
- }
- }
-
- {
- /* Initialize texture point density curve falloff */
- Tex *tex;
- for (tex= main->tex.first; tex; tex= tex->id.next) {
- if (tex->pd) {
- if (tex->pd->falloff_speed_scale == 0.0f)
- tex->pd->falloff_speed_scale = 100.0f;
-
- if (!tex->pd->falloff_curve) {
- tex->pd->falloff_curve = curvemapping_add(1, 0, 0, 1, 1);
-
- tex->pd->falloff_curve->preset = CURVE_PRESET_LINE;
- tex->pd->falloff_curve->cm->flag &= ~CUMA_EXTEND_EXTRAPOLATE;
- curvemap_reset(tex->pd->falloff_curve->cm, &tex->pd->falloff_curve->clipr, tex->pd->falloff_curve->preset, CURVEMAP_SLOPE_POSITIVE);
- curvemapping_changed(tex->pd->falloff_curve, 0);
- }
- }
- }
- }
-
- {
- /* add default value for behind strength of camera actuator */
- Object *ob;
- bActuator *act;
- for (ob = main->object.first; ob; ob= ob->id.next) {
- for (act= ob->actuators.first; act; act= act->next) {
- if (act->type == ACT_CAMERA) {
- bCameraActuator *ba= act->data;
-
- ba->damping = 1.0/32.0;
- }
- }
- }
- }
-
- {
- ParticleSettings *part;
- for (part = main->particle.first; part; part = part->id.next) {
- /* Initialize particle billboard scale */
- part->bb_size[0] = part->bb_size[1] = 1.0f;
- }
- }
- }
-
- if (main->versionfile < 259 || (main->versionfile == 259 && main->subversionfile < 1)) {
- {
- Scene *scene;
- Sequence *seq;
-
- for (scene=main->scene.first; scene; scene=scene->id.next)
- {
- scene->r.ffcodecdata.audio_channels = 2;
- scene->audio.volume = 1.0f;
- SEQ_BEGIN(scene->ed, seq) {
- seq->pitch = 1.0f;
- }
- SEQ_END
- }
- }
- {
- bScreen *screen;
- for (screen= main->screen.first; screen; screen= screen->id.next) {
- ScrArea *sa;
- /* add regions */
- for (sa= screen->areabase.first; sa; sa= sa->next) {
- SpaceLink *sl= sa->spacedata.first;
- if (sl->spacetype==SPACE_SEQ) {
- ARegion *ar;
- for (ar=sa->regionbase.first; ar; ar= ar->next) {
- if (ar->regiontype == RGN_TYPE_WINDOW) {
- if (ar->v2d.min[1] == 4.0f)
- ar->v2d.min[1]= 0.5f;
- }
- }
- }
- for (sl= sa->spacedata.first; sl; sl= sl->next) {
- if (sl->spacetype==SPACE_SEQ) {
- ARegion *ar;
- for (ar=sl->regionbase.first; ar; ar= ar->next) {
- if (ar->regiontype == RGN_TYPE_WINDOW) {
- if (ar->v2d.min[1] == 4.0f)
- ar->v2d.min[1]= 0.5f;
- }
- }
- }
- }
- }
- }
- }
- {
- /* Make "auto-clamped" handles a per-keyframe setting instead of per-FCurve
- *
- * We're only patching F-Curves in Actions here, since it is assumed that most
- * drivers out there won't be using this (and if they are, they're in the minority).
- * While we should aim to fix everything ideally, in practice it's far too hard
- * to get to every animdata block, not to mention the performance hit that'd have
- */
- bAction *act;
- FCurve *fcu;
-
- for (act = main->action.first; act; act = act->id.next) {
- for (fcu = act->curves.first; fcu; fcu = fcu->next) {
- BezTriple *bezt;
- unsigned int i = 0;
-
- /* only need to touch curves that had this flag set */
- if ((fcu->flag & FCURVE_AUTO_HANDLES) == 0)
- continue;
- if ((fcu->totvert == 0) || (fcu->bezt == NULL))
- continue;
-
- /* only change auto-handles to auto-clamped */
- for (bezt=fcu->bezt; i < fcu->totvert; i++, bezt++) {
- if (bezt->h1 == HD_AUTO) bezt->h1 = HD_AUTO_ANIM;
- if (bezt->h2 == HD_AUTO) bezt->h2 = HD_AUTO_ANIM;
- }
-
- fcu->flag &= ~FCURVE_AUTO_HANDLES;
- }
- }
- }
- {
- /* convert fcurve and shape action actuators to action actuators */
- Object *ob;
- bActuator *act;
- bIpoActuator *ia;
- bActionActuator *aa;
-
- for (ob= main->object.first; ob; ob= ob->id.next) {
- for (act= ob->actuators.first; act; act= act->next) {
- if (act->type == ACT_IPO) {
- // Create the new actuator
- ia= act->data;
- aa= MEM_callocN(sizeof(bActionActuator), "fcurve -> action actuator do_version");
-
- // Copy values
- aa->type = ia->type;
- aa->flag = ia->flag;
- aa->sta = ia->sta;
- aa->end = ia->end;
- BLI_strncpy(aa->name, ia->name, sizeof(aa->name));
- BLI_strncpy(aa->frameProp, ia->frameProp, sizeof(aa->frameProp));
- if (ob->adt)
- aa->act = ob->adt->action;
-
- // Get rid of the old actuator
- MEM_freeN(ia);
-
- // Assign the new actuator
- act->data = aa;
- act->type= act->otype= ACT_ACTION;
-
- }
- else if (act->type == ACT_SHAPEACTION) {
- act->type = act->otype = ACT_ACTION;
- }
- }
+ for (node=ntree->nodes.first; node; node=node->next) {
+ if (node->type==CMP_NODE_OUTPUT_FILE) {
+ bNodeSocket *sock;
+ for (sock=node->inputs.first; sock; sock=sock->next) {
+ NodeImageMultiFileSocket *input = sock->storage;
+ /* input file path is stored in dedicated struct now instead socket name */
+ BLI_strncpy(input->path, sock->name, sizeof(input->path));
+ sock->name[0] = '\0'; /* unused */
}
}
}
+}
- if (main->versionfile < 259 || (main->versionfile == 259 && main->subversionfile < 2)) {
- {
- /* Convert default socket values from bNodeStack */
- Scene *sce;
- Material *mat;
- Tex *tex;
- bNodeTree *ntree;
- for (ntree=main->nodetree.first; ntree; ntree=ntree->id.next) {
- do_versions_nodetree_default_value(ntree);
- ntree->update |= NTREE_UPDATE;
- }
- for (sce=main->scene.first; sce; sce=sce->id.next)
- if (sce->nodetree) {
- do_versions_nodetree_default_value(sce->nodetree);
- sce->nodetree->update |= NTREE_UPDATE;
- }
- for (mat=main->mat.first; mat; mat=mat->id.next)
- if (mat->nodetree) {
- do_versions_nodetree_default_value(mat->nodetree);
- mat->nodetree->update |= NTREE_UPDATE;
- }
- for (tex=main->tex.first; tex; tex=tex->id.next)
- if (tex->nodetree) {
- do_versions_nodetree_default_value(tex->nodetree);
- tex->nodetree->update |= NTREE_UPDATE;
- }
- }
-
- /* add SOCK_DYNAMIC flag to existing group sockets */
- {
- bNodeTree *ntree;
- /* only need to do this for trees in main, local trees are not used as groups */
- for (ntree=main->nodetree.first; ntree; ntree=ntree->id.next) {
- do_versions_nodetree_dynamic_sockets(ntree);
- ntree->update |= NTREE_UPDATE;
- }
- }
-
- {
- /* Initialize group tree nodetypes.
- * These are used to distinguish tree types and
- * associate them with specific node types for polling.
- */
- bNodeTree *ntree;
- /* all node trees in main->nodetree are considered groups */
- for (ntree=main->nodetree.first; ntree; ntree=ntree->id.next)
- ntree->nodetype = NODE_GROUP;
- }
- }
+static void do_versions(FileData *fd, Library *lib, Main *main)
+{
+ /* WATCH IT!!!: pointers from libdata have not been converted */
- if (main->versionfile < 259 || (main->versionfile == 259 && main->subversionfile < 4)) {
- {
- /* Adaptive time step for particle systems */
- ParticleSettings *part;
- for (part = main->particle.first; part; part = part->id.next) {
- part->courant_target = 0.2f;
- part->time_flag &= ~PART_TIME_AUTOSF;
- }
- }
+ if (G.debug & G_DEBUG)
+ printf("read file %s\n Version %d sub %d svn r%d\n", fd->relabase, main->versionfile, main->subversionfile, main->revision);
- {
- /* set defaults for obstacle avoidance, recast data */
- Scene *sce;
- for (sce = main->scene.first; sce; sce = sce->id.next)
- {
- if (sce->gm.levelHeight == 0.f)
- sce->gm.levelHeight = 2.f;
-
- if (sce->gm.recastData.cellsize == 0.0f)
- sce->gm.recastData.cellsize = 0.3f;
- if (sce->gm.recastData.cellheight == 0.0f)
- sce->gm.recastData.cellheight = 0.2f;
- if (sce->gm.recastData.agentmaxslope == 0.0f)
- sce->gm.recastData.agentmaxslope = (float)M_PI/4;
- if (sce->gm.recastData.agentmaxclimb == 0.0f)
- sce->gm.recastData.agentmaxclimb = 0.9f;
- if (sce->gm.recastData.agentheight == 0.0f)
- sce->gm.recastData.agentheight = 2.0f;
- if (sce->gm.recastData.agentradius == 0.0f)
- sce->gm.recastData.agentradius = 0.6f;
- if (sce->gm.recastData.edgemaxlen == 0.0f)
- sce->gm.recastData.edgemaxlen = 12.0f;
- if (sce->gm.recastData.edgemaxerror == 0.0f)
- sce->gm.recastData.edgemaxerror = 1.3f;
- if (sce->gm.recastData.regionminsize == 0.0f)
- sce->gm.recastData.regionminsize = 8.f;
- if (sce->gm.recastData.regionmergesize == 0.0f)
- sce->gm.recastData.regionmergesize = 20.f;
- if (sce->gm.recastData.vertsperpoly<3)
- sce->gm.recastData.vertsperpoly = 6;
- if (sce->gm.recastData.detailsampledist == 0.0f)
- sce->gm.recastData.detailsampledist = 6.0f;
- if (sce->gm.recastData.detailsamplemaxerror == 0.0f)
- sce->gm.recastData.detailsamplemaxerror = 1.0f;
- }
- }
- }
+ blo_do_versions_pre250(fd, lib, main);
+ blo_do_versions_250(fd, lib, main);
if (main->versionfile < 260) {
{
@@ -12882,15 +6933,15 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
v3d->bundle_size= 0.2f;
v3d->flag2 |= V3D_SHOW_RECONSTRUCTION;
}
- else if (sl->spacetype==SPACE_CLIP) {
- SpaceClip *sc= (SpaceClip *)sl;
- if (sc->scopes.track_preview_height==0)
- sc->scopes.track_preview_height= 120;
- }
if (v3d->bundle_drawtype==0)
v3d->bundle_drawtype= OB_PLAINAXES;
}
+ else if (sl->spacetype==SPACE_CLIP) {
+ SpaceClip *sc= (SpaceClip *)sl;
+ if (sc->scopes.track_preview_height==0)
+ sc->scopes.track_preview_height= 120;
+ }
}
}
}
@@ -12930,8 +6981,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
- if (main->versionfile < 260 || (main->versionfile == 260 && main->subversionfile < 6))
- {
+ if (main->versionfile < 260 || (main->versionfile == 260 && main->subversionfile < 6)) {
Scene *sce;
MovieClip *clip;
bScreen *sc;
@@ -12995,8 +7045,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
- if (main->versionfile < 260 || (main->versionfile == 260 && main->subversionfile < 8))
- {
+ if (main->versionfile < 260 || (main->versionfile == 260 && main->subversionfile < 8)) {
Brush *brush;
for (brush= main->brush.first; brush; brush= brush->id.next) {
@@ -13005,8 +7054,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
- if (main->versionfile < 261 || (main->versionfile == 261 && main->subversionfile < 1))
- {
+ if (main->versionfile < 261 || (main->versionfile == 261 && main->subversionfile < 1)) {
{
/* update use flags for node sockets (was only temporary before) */
Scene *sce;
@@ -13107,8 +7155,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
- if (main->versionfile < 261 || (main->versionfile == 261 && main->subversionfile < 2))
- {
+ if (main->versionfile < 261 || (main->versionfile == 261 && main->subversionfile < 2)) {
{
/* convert Camera Actuator values to defines */
Object *ob;
@@ -13142,8 +7189,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
- if (main->versionfile < 261 || (main->versionfile == 261 && main->subversionfile < 3))
- {
+ if (main->versionfile < 261 || (main->versionfile == 261 && main->subversionfile < 3)) {
{
/* convert extended ascii to utf-8 for text editor */
Text *text;
@@ -13169,8 +7215,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
for (md= ob->modifiers.first; md; md= md->next) {
if (md->type == eModifierType_DynamicPaint) {
DynamicPaintModifierData *pmd = (DynamicPaintModifierData *)md;
- if (pmd->canvas)
- {
+ if (pmd->canvas) {
DynamicPaintSurface *surface = pmd->canvas->surfaces.first;
for (; surface; surface=surface->next) {
surface->color_dry_threshold = 1.0f;
@@ -13185,8 +7230,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
- if (main->versionfile < 262)
- {
+ if (main->versionfile < 262) {
Object *ob;
for (ob=main->object.first; ob; ob= ob->id.next) {
ModifierData *md;
@@ -13201,8 +7245,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
- if (main->versionfile < 263)
- {
+ if (main->versionfile < 263) {
/* set fluidsim rate. the version patch for this in 2.62 was wrong, so
* try to correct it, if rate is 0.0 that's likely not intentional */
Object *ob;
@@ -13219,8 +7262,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
- if (main->versionfile < 262 || (main->versionfile == 262 && main->subversionfile < 1))
- {
+ if (main->versionfile < 262 || (main->versionfile == 262 && main->subversionfile < 1)) {
/* update use flags for node sockets (was only temporary before) */
Scene *sce;
bNodeTree *ntree;
@@ -13235,8 +7277,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
/* only swap for pre-release bmesh merge which had MLoopCol red/blue swap */
- if (main->versionfile == 262 && main->subversionfile == 1)
- {
+ if (main->versionfile == 262 && main->subversionfile == 1) {
{
Mesh *me;
for (me = main->mesh.first; me; me = me->id.next) {
@@ -13246,8 +7287,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
- if (main->versionfile < 262 || (main->versionfile == 262 && main->subversionfile < 2))
- {
+ if (main->versionfile < 262 || (main->versionfile == 262 && main->subversionfile < 2)) {
{
/* Set new idname of keyingsets from their now "label-only" name. */
Scene *scene;
@@ -13261,8 +7301,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
- if (main->versionfile < 262 || (main->versionfile == 262 && main->subversionfile < 3))
- {
+ if (main->versionfile < 262 || (main->versionfile == 262 && main->subversionfile < 3)) {
Object *ob;
ModifierData *md;
@@ -13276,8 +7315,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
- if (main->versionfile < 262 || (main->versionfile == 262 && main->subversionfile < 4))
- {
+ if (main->versionfile < 262 || (main->versionfile == 262 && main->subversionfile < 4)) {
/* Read Viscosity presets from older files */
Object *ob;
@@ -13301,16 +7339,106 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
- {
- /* Default for old files is to save particle rotations to pointcache */
- ParticleSettings *part;
- for (part = main->particle.first; part; part = part->id.next)
- part->flag |= PART_ROTATIONS;
+ if (main->versionfile < 263) {
+ {
+ /* Default for old files is to save particle rotations to pointcache */
+ ParticleSettings *part;
+ for (part = main->particle.first; part; part = part->id.next)
+ part->flag |= PART_ROTATIONS;
+ }
+ {
+ /* file output node paths are now stored in the file info struct instead socket name */
+ Scene *sce;
+ bNodeTree *ntree;
+
+ for (sce = main->scene.first; sce; sce=sce->id.next)
+ if (sce->nodetree)
+ do_versions_nodetree_multi_file_output_path_2_64_0(sce->nodetree);
+ for (ntree = main->nodetree.first; ntree; ntree=ntree->id.next)
+ do_versions_nodetree_multi_file_output_path_2_64_0(ntree);
+ }
}
- /* put compatibility code here until next subversion bump */
+ if (main->versionfile < 263 || (main->versionfile == 263 && main->subversionfile < 3)) {
+ Scene *scene;
+ Brush *brush;
+
+ /* For weight paint, each brush now gets its own weight;
+ unified paint settings also have weight. Update unified
+ paint settings and brushes with a default weight value. */
+
+ for (scene = main->scene.first; scene; scene = scene->id.next) {
+ ToolSettings *ts = scene->toolsettings;
+ if (ts) {
+ ts->unified_paint_settings.weight = ts->vgroup_weight;
+ ts->unified_paint_settings.flag |= UNIFIED_PAINT_WEIGHT;
+ }
+ }
+
+ for (brush = main->brush.first; brush; brush = brush->id.next) {
+ brush->weight = 0.5;
+ }
+ }
+
+ if (main->versionfile < 263 || (main->versionfile == 263 && main->subversionfile < 2)) {
+ bScreen *sc;
+
+ for (sc = main->screen.first; sc; sc = sc->id.next) {
+ ScrArea *sa;
+ for (sa = sc->areabase.first; sa; sa = sa->next) {
+ SpaceLink *sl;
+
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_CLIP) {
+ SpaceClip *sclip = (SpaceClip *)sl;
+ ARegion *ar;
+ int hide = FALSE;
+
+ for (ar = sa->regionbase.first; ar; ar = ar->next) {
+ if (ar->regiontype == RGN_TYPE_PREVIEW) {
+ if (ar->alignment != RGN_ALIGN_NONE) {
+ ar->flag |= RGN_FLAG_HIDDEN;
+ ar->v2d.flag &= ~V2D_IS_INITIALISED;
+ ar->alignment = RGN_ALIGN_NONE;
+
+ hide = TRUE;
+ }
+ }
+ }
+
+ if (hide) {
+ sclip->view = SC_VIEW_CLIP;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (main->versionfile < 263 || (main->versionfile == 263 && main->subversionfile < 4))
{
+ Lamp *la;
+ Camera *cam;
+ Curve *cu;
+
+ for (la= main->lamp.first; la; la= la->id.next) {
+ if (la->shadow_frustum_size == 0.0f)
+ la->shadow_frustum_size= 10.0f;
+ }
+ for (cam = main->camera.first; cam; cam = cam->id.next) {
+ if (cam->flag & CAM_PANORAMA) {
+ cam->type = CAM_PANO;
+ cam->flag &= ~CAM_PANORAMA;
+ }
+ }
+
+ for(cu= main->curve.first; cu; cu= cu->id.next) {
+ if(cu->bevfac2 == 0.0f) {
+ cu->bevfac1 = 0.0f;
+ cu->bevfac2 = 1.0f;
+ }
+ }
}
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */
@@ -13444,7 +7572,7 @@ BlendFileData *blo_read_file_internal(FileData *fd, const char *filepath)
BLI_strncpy(bfd->main->name, filepath, sizeof(bfd->main->name));
while (bhead) {
- switch(bhead->code) {
+ switch (bhead->code) {
case DATA:
case DNA1:
case TEST: /* used as preview since 2.5x */
@@ -14012,7 +8140,7 @@ typedef struct tConstraintExpandData {
Main *mainvar;
} tConstraintExpandData;
/* callback function used to expand constraint ID-links */
-static void expand_constraint_cb(bConstraint *UNUSED(con), ID **idpoin, void *userdata)
+static void expand_constraint_cb(bConstraint *UNUSED(con), ID **idpoin, short UNUSED(isReference), void *userdata)
{
tConstraintExpandData *ced= (tConstraintExpandData *)userdata;
expand_doit(ced->fd, ced->mainvar, *idpoin);
@@ -14129,7 +8257,7 @@ static void expand_object(FileData *fd, Main *mainvar, Object *ob)
expand_doit(fd, mainvar, ob->mat[a]);
}
- paf = do_version_give_parteff_245(ob);
+ paf = blo_do_version_give_parteff_245(ob);
if (paf && paf->group)
expand_doit(fd, mainvar, paf->group);
@@ -14272,7 +8400,8 @@ static void expand_scene(FileData *fd, Main *mainvar, Scene *sce)
if (sce->ed) {
Sequence *seq;
- SEQ_BEGIN(sce->ed, seq) {
+ SEQ_BEGIN (sce->ed, seq)
+ {
if (seq->scene) expand_doit(fd, mainvar, seq->scene);
if (seq->scene_camera) expand_doit(fd, mainvar, seq->scene_camera);
if (seq->sound) expand_doit(fd, mainvar, seq->sound);
@@ -14340,7 +8469,7 @@ static void expand_main(FileData *fd, Main *mainvar)
while (id) {
if (id->flag & LIB_TEST) {
- switch(GS(id->name)) {
+ switch (GS(id->name)) {
case ID_OB:
expand_object(fd, mainvar, (Object *)id);
@@ -14370,7 +8499,7 @@ static void expand_main(FileData *fd, Main *mainvar)
expand_lattice(fd, mainvar, (Lattice *)id);
break;
case ID_LA:
- expand_lamp(fd, mainvar,(Lamp *)id);
+ expand_lamp(fd, mainvar, (Lamp *)id);
break;
case ID_KE:
expand_key(fd, mainvar, (Key *)id);
@@ -14379,7 +8508,7 @@ static void expand_main(FileData *fd, Main *mainvar)
expand_camera(fd, mainvar, (Camera *)id);
break;
case ID_SPK:
- expand_speaker(fd, mainvar,(Speaker *)id);
+ expand_speaker(fd, mainvar, (Speaker *)id);
break;
case ID_SO:
expand_sound(fd, mainvar, (bSound *)id);
@@ -14425,7 +8554,7 @@ static int object_in_any_scene(Main *mainvar, Object *ob)
Scene *sce;
for (sce= mainvar->scene.first; sce; sce= sce->id.next)
- if (object_in_scene(ob, sce))
+ if (BKE_scene_base_find(sce, ob))
return 1;
return 0;
}
@@ -14477,7 +8606,7 @@ static void give_base_to_objects(Main *mainvar, Scene *sce, Library *lib, const
}
if (do_it) {
- base= MEM_callocN( sizeof(Base), "add_ext_base");
+ base= MEM_callocN(sizeof(Base), "add_ext_base");
BLI_addtail(&(sce->base), base);
base->lay= ob->lay;
base->object= ob;
@@ -14501,13 +8630,13 @@ static void give_base_to_groups(Main *mainvar, Scene *scene)
if (((group->id.flag & LIB_INDIRECT)==0 && (group->id.flag & LIB_PRE_EXISTING)==0)) {
Base *base;
- /* add_object(...) messes with the selection */
- Object *ob= add_only_object(OB_EMPTY, group->id.name+2);
+ /* BKE_object_add(...) messes with the selection */
+ Object *ob= BKE_object_add_only_object(OB_EMPTY, group->id.name+2);
ob->type= OB_EMPTY;
ob->lay= scene->lay;
/* assign the base */
- base= scene_add_base(scene, ob);
+ base= BKE_scene_base_add(scene, ob);
base->flag |= SELECT;
base->object->flag= base->flag;
ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
@@ -14581,7 +8710,7 @@ static ID *append_named_part_ex(const bContext *C, Main *mainl, FileData *fd, co
Base *base;
Object *ob;
- base= MEM_callocN( sizeof(Base), "app_nam_part");
+ base= MEM_callocN(sizeof(Base), "app_nam_part");
BLI_addtail(&scene->base, base);
ob= (Object *)id;
@@ -14726,7 +8855,7 @@ static void library_append_end(const bContext *C, Main *mainl, FileData **fd, in
/* patch to prevent switch_endian happens twice */
if ((*fd)->flags & FD_FLAGS_SWITCH_ENDIAN) {
- blo_freefiledata( *fd );
+ blo_freefiledata(*fd);
*fd = NULL;
}
}
diff --git a/source/blender/blenloader/intern/readfile.h b/source/blender/blenloader/intern/readfile.h
index 511ded0ecdc..9be375977e9 100644
--- a/source/blender/blenloader/intern/readfile.h
+++ b/source/blender/blenloader/intern/readfile.h
@@ -39,6 +39,10 @@ struct OldNewMap;
struct MemFile;
struct bheadsort;
struct ReportList;
+struct Object;
+struct PartEff;
+struct View3D;
+struct bNodeTree;
typedef struct FileData {
// linked list of BHeadN's
@@ -133,5 +137,19 @@ BHead *blo_prevbhead(FileData *fd, BHead *thisblock);
char *bhead_id_name(FileData *fd, BHead *bhead);
+/* do versions stuff */
+
+void blo_do_versions_oldnewmap_insert(struct OldNewMap *onm, void *oldaddr, void *newaddr, int nr);
+void *blo_do_versions_newlibadr(struct FileData *fd, void *lib, void *adr);
+void *blo_do_versions_newlibadr_us(struct FileData *fd, void *lib, void *adr);
+
+struct PartEff *blo_do_version_give_parteff_245(struct Object *ob);
+void blo_do_version_old_trackto_to_constraints(struct Object *ob);
+void blo_do_versions_view3d_split_250(struct View3D *v3d, struct ListBase *regions);
+void blo_do_versions_nodetree_default_value(struct bNodeTree *ntree);
+
+void blo_do_versions_pre250(struct FileData *fd, struct Library *lib, struct Main *main);
+void blo_do_versions_250(struct FileData *fd, struct Library *lib, struct Main *main);
+
#endif
diff --git a/source/blender/blenloader/intern/versioning_250.c b/source/blender/blenloader/intern/versioning_250.c
new file mode 100644
index 00000000000..8a8705532cb
--- /dev/null
+++ b/source/blender/blenloader/intern/versioning_250.c
@@ -0,0 +1,2690 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ *
+ * Contributor(s): Blender Foundation
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ *
+ */
+
+/** \file blender/blenloader/intern/versioning_250.c
+ * \ingroup blenloader
+ */
+
+#include "zlib.h"
+
+#ifndef WIN32
+# include <unistd.h> // for read close
+#else
+# include <io.h> // for open close read
+# include "winsock2.h"
+# include "BLI_winstuff.h"
+#endif
+
+/* allow readfile to use deprecated functionality */
+#define DNA_DEPRECATED_ALLOW
+
+#include "DNA_anim_types.h"
+#include "DNA_armature_types.h"
+#include "DNA_actuator_types.h"
+#include "DNA_brush_types.h"
+#include "DNA_camera_types.h"
+#include "DNA_cloth_types.h"
+#include "DNA_constraint_types.h"
+#include "DNA_ipo_types.h"
+#include "DNA_key_types.h"
+#include "DNA_lattice_types.h"
+#include "DNA_lamp_types.h"
+#include "DNA_material_types.h"
+#include "DNA_mesh_types.h"
+#include "DNA_meshdata_types.h"
+#include "DNA_node_types.h"
+#include "DNA_object_fluidsim.h" // NT
+#include "DNA_object_types.h"
+#include "DNA_view3d_types.h"
+#include "DNA_screen_types.h"
+#include "DNA_sdna_types.h"
+#include "DNA_sequence_types.h"
+#include "DNA_smoke_types.h"
+#include "DNA_sound_types.h"
+#include "DNA_space_types.h"
+#include "DNA_world_types.h"
+
+#include "MEM_guardedalloc.h"
+
+#include "BLI_utildefines.h"
+#include "BLI_blenlib.h"
+#include "BLI_math.h"
+#include "BLI_edgehash.h"
+
+#include "BKE_anim.h"
+#include "BKE_armature.h"
+#include "BKE_colortools.h"
+#include "BKE_global.h" // for G
+#include "BKE_library.h" // for which_libbase
+#include "BKE_main.h" // for Main
+#include "BKE_mesh.h" // for ME_ defines (patching)
+#include "BKE_modifier.h"
+#include "BKE_multires.h"
+#include "BKE_particle.h"
+#include "BKE_pointcache.h"
+#include "BKE_screen.h"
+#include "BKE_sequencer.h"
+#include "BKE_texture.h" // for open_plugin_tex
+#include "BKE_utildefines.h" // SWITCH_INT DATA ENDB DNA1 O_BINARY GLOB USER TEST REND
+#include "BKE_sound.h"
+
+#include "NOD_socket.h"
+
+//XXX #include "BIF_butspace.h" // badlevel, for do_versions, patching event codes
+//XXX #include "BIF_filelist.h" // badlevel too, where to move this? - elubie
+//XXX #include "BIF_previewrender.h" // bedlelvel, for struct RenderInfo
+#include "BLO_readfile.h"
+#include "BLO_undofile.h"
+
+#include "RE_engine.h"
+
+#include "readfile.h"
+
+#include "PIL_time.h"
+
+#include <errno.h>
+
+/* 2.50 patch */
+static void area_add_header_region(ScrArea *sa, ListBase *lb)
+{
+ ARegion *ar = MEM_callocN(sizeof(ARegion), "area region from do_versions");
+
+ BLI_addtail(lb, ar);
+ ar->regiontype = RGN_TYPE_HEADER;
+ if (sa->headertype == HEADERDOWN)
+ ar->alignment = RGN_ALIGN_BOTTOM;
+ else
+ ar->alignment = RGN_ALIGN_TOP;
+
+ /* initialize view2d data for header region, to allow panning */
+ /* is copy from ui_view2d.c */
+ ar->v2d.keepzoom = (V2D_LOCKZOOM_X|V2D_LOCKZOOM_Y|V2D_LIMITZOOM|V2D_KEEPASPECT);
+ ar->v2d.keepofs = V2D_LOCKOFS_Y;
+ ar->v2d.keeptot = V2D_KEEPTOT_STRICT;
+ ar->v2d.align = V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_NEG_Y;
+ ar->v2d.flag = (V2D_PIXELOFS_X|V2D_PIXELOFS_Y);
+}
+
+static void sequencer_init_preview_region(ARegion* ar)
+{
+ // XXX a bit ugly still, copied from space_sequencer
+ /* NOTE: if you change values here, also change them in space_sequencer.c, sequencer_new */
+ ar->regiontype = RGN_TYPE_PREVIEW;
+ ar->alignment = RGN_ALIGN_TOP;
+ ar->flag |= RGN_FLAG_HIDDEN;
+ ar->v2d.keepzoom = V2D_KEEPASPECT | V2D_KEEPZOOM;
+ ar->v2d.minzoom = 0.00001f;
+ ar->v2d.maxzoom = 100000.0f;
+ ar->v2d.tot.xmin = -960.0f; /* 1920 width centered */
+ ar->v2d.tot.ymin = -540.0f; /* 1080 height centered */
+ ar->v2d.tot.xmax = 960.0f;
+ ar->v2d.tot.ymax = 540.0f;
+ ar->v2d.min[0] = 0.0f;
+ ar->v2d.min[1] = 0.0f;
+ ar->v2d.max[0] = 12000.0f;
+ ar->v2d.max[1] = 12000.0f;
+ ar->v2d.cur = ar->v2d.tot;
+ ar->v2d.align = V2D_ALIGN_FREE; // (V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_NEG_Y);
+ ar->v2d.keeptot = V2D_KEEPTOT_FREE;
+}
+
+static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb)
+{
+ ARegion *ar;
+ ARegion *ar_main;
+
+ if (sl) {
+ /* first channels for ipo action nla... */
+ switch (sl->spacetype) {
+ case SPACE_IPO:
+ ar = MEM_callocN(sizeof(ARegion), "area region from do_versions");
+ BLI_addtail(lb, ar);
+ ar->regiontype = RGN_TYPE_CHANNELS;
+ ar->alignment = RGN_ALIGN_LEFT;
+ ar->v2d.scroll = (V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM);
+
+ /* for some reason, this doesn't seem to go auto like for NLA... */
+ ar = MEM_callocN(sizeof(ARegion), "area region from do_versions");
+ BLI_addtail(lb, ar);
+ ar->regiontype = RGN_TYPE_UI;
+ ar->alignment = RGN_ALIGN_RIGHT;
+ ar->v2d.scroll = V2D_SCROLL_RIGHT;
+ ar->v2d.flag = RGN_FLAG_HIDDEN;
+ break;
+
+ case SPACE_ACTION:
+ ar = MEM_callocN(sizeof(ARegion), "area region from do_versions");
+ BLI_addtail(lb, ar);
+ ar->regiontype = RGN_TYPE_CHANNELS;
+ ar->alignment = RGN_ALIGN_LEFT;
+ ar->v2d.scroll = V2D_SCROLL_BOTTOM;
+ ar->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL;
+ break;
+
+ case SPACE_NLA:
+ ar = MEM_callocN(sizeof(ARegion), "area region from do_versions");
+ BLI_addtail(lb, ar);
+ ar->regiontype = RGN_TYPE_CHANNELS;
+ ar->alignment = RGN_ALIGN_LEFT;
+ ar->v2d.scroll = V2D_SCROLL_BOTTOM;
+ ar->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL;
+
+ /* for some reason, some files still don't get this auto */
+ ar = MEM_callocN(sizeof(ARegion), "area region from do_versions");
+ BLI_addtail(lb, ar);
+ ar->regiontype = RGN_TYPE_UI;
+ ar->alignment = RGN_ALIGN_RIGHT;
+ ar->v2d.scroll = V2D_SCROLL_RIGHT;
+ ar->v2d.flag = RGN_FLAG_HIDDEN;
+ break;
+
+ case SPACE_NODE:
+ ar = MEM_callocN(sizeof(ARegion), "nodetree area for node");
+ BLI_addtail(lb, ar);
+ ar->regiontype = RGN_TYPE_UI;
+ ar->alignment = RGN_ALIGN_LEFT;
+ ar->v2d.scroll = (V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM);
+ ar->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL;
+ /* temporarily hide it */
+ ar->flag = RGN_FLAG_HIDDEN;
+ break;
+ case SPACE_FILE:
+ ar = MEM_callocN(sizeof(ARegion), "nodetree area for node");
+ BLI_addtail(lb, ar);
+ ar->regiontype = RGN_TYPE_CHANNELS;
+ ar->alignment = RGN_ALIGN_LEFT;
+
+ ar = MEM_callocN(sizeof(ARegion), "ui area for file");
+ BLI_addtail(lb, ar);
+ ar->regiontype = RGN_TYPE_UI;
+ ar->alignment = RGN_ALIGN_TOP;
+ break;
+ case SPACE_SEQ:
+ ar_main = (ARegion*) lb->first;
+ for (; ar_main; ar_main = ar_main->next) {
+ if (ar_main->regiontype == RGN_TYPE_WINDOW)
+ break;
+ }
+ ar = MEM_callocN(sizeof(ARegion), "preview area for sequencer");
+ BLI_insertlinkbefore(lb, ar_main, ar);
+ sequencer_init_preview_region(ar);
+ break;
+ case SPACE_VIEW3D:
+ /* toolbar */
+ ar = MEM_callocN(sizeof(ARegion), "toolbar for view3d");
+
+ BLI_addtail(lb, ar);
+ ar->regiontype = RGN_TYPE_TOOLS;
+ ar->alignment = RGN_ALIGN_LEFT;
+ ar->flag = RGN_FLAG_HIDDEN;
+
+ /* tool properties */
+ ar = MEM_callocN(sizeof(ARegion), "tool properties for view3d");
+
+ BLI_addtail(lb, ar);
+ ar->regiontype = RGN_TYPE_TOOL_PROPS;
+ ar->alignment = RGN_ALIGN_BOTTOM|RGN_SPLIT_PREV;
+ ar->flag = RGN_FLAG_HIDDEN;
+
+ /* buttons/list view */
+ ar = MEM_callocN(sizeof(ARegion), "buttons for view3d");
+
+ BLI_addtail(lb, ar);
+ ar->regiontype = RGN_TYPE_UI;
+ ar->alignment = RGN_ALIGN_RIGHT;
+ ar->flag = RGN_FLAG_HIDDEN;
+#if 0
+ case SPACE_BUTS:
+ /* context UI region */
+ ar = MEM_callocN(sizeof(ARegion), "area region from do_versions");
+ BLI_addtail(lb, ar);
+ ar->regiontype = RGN_TYPE_UI;
+ ar->alignment = RGN_ALIGN_RIGHT;
+
+ break;
+#endif
+ }
+ }
+
+ /* main region */
+ ar = MEM_callocN(sizeof(ARegion), "area region from do_versions");
+
+ BLI_addtail(lb, ar);
+ ar->winrct = sa->totrct;
+
+ ar->regiontype = RGN_TYPE_WINDOW;
+
+ if (sl) {
+ /* if active spacetype has view2d data, copy that over to main region */
+ /* and we split view3d */
+ switch (sl->spacetype) {
+ case SPACE_VIEW3D:
+ blo_do_versions_view3d_split_250((View3D *)sl, lb);
+ break;
+
+ case SPACE_OUTLINER:
+ {
+ SpaceOops *soops = (SpaceOops *)sl;
+
+ memcpy(&ar->v2d, &soops->v2d, sizeof(View2D));
+
+ ar->v2d.scroll &= ~V2D_SCROLL_LEFT;
+ ar->v2d.scroll |= (V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM_O);
+ ar->v2d.align = (V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_POS_Y);
+ ar->v2d.keepzoom |= (V2D_LOCKZOOM_X|V2D_LOCKZOOM_Y|V2D_KEEPASPECT);
+ ar->v2d.keeptot = V2D_KEEPTOT_STRICT;
+ ar->v2d.minzoom = ar->v2d.maxzoom = 1.0f;
+ //ar->v2d.flag |= V2D_IS_INITIALISED;
+ }
+ break;
+ case SPACE_TIME:
+ {
+ SpaceTime *stime = (SpaceTime *)sl;
+ memcpy(&ar->v2d, &stime->v2d, sizeof(View2D));
+
+ ar->v2d.scroll |= (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL);
+ ar->v2d.align |= V2D_ALIGN_NO_NEG_Y;
+ ar->v2d.keepofs |= V2D_LOCKOFS_Y;
+ ar->v2d.keepzoom |= V2D_LOCKZOOM_Y;
+ ar->v2d.tot.ymin = ar->v2d.cur.ymin = -10.0;
+ ar->v2d.min[1] = ar->v2d.max[1] = 20.0;
+ }
+ break;
+ case SPACE_IPO:
+ {
+ SpaceIpo *sipo = (SpaceIpo *)sl;
+ memcpy(&ar->v2d, &sipo->v2d, sizeof(View2D));
+
+ /* init mainarea view2d */
+ ar->v2d.scroll |= (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL);
+ ar->v2d.scroll |= (V2D_SCROLL_LEFT|V2D_SCROLL_SCALE_VERTICAL);
+
+ ar->v2d.min[0] = FLT_MIN;
+ ar->v2d.min[1] = FLT_MIN;
+
+ ar->v2d.max[0] = MAXFRAMEF;
+ ar->v2d.max[1] = FLT_MAX;
+
+ //ar->v2d.flag |= V2D_IS_INITIALISED;
+ break;
+ }
+ case SPACE_NLA:
+ {
+ SpaceNla *snla = (SpaceNla *)sl;
+ memcpy(&ar->v2d, &snla->v2d, sizeof(View2D));
+
+ ar->v2d.tot.ymin = (float)(-sa->winy)/3.0f;
+ ar->v2d.tot.ymax = 0.0f;
+
+ ar->v2d.scroll |= (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL);
+ ar->v2d.scroll |= (V2D_SCROLL_RIGHT);
+ ar->v2d.align = V2D_ALIGN_NO_POS_Y;
+ ar->v2d.flag |= V2D_VIEWSYNC_AREA_VERTICAL;
+ break;
+ }
+ case SPACE_ACTION:
+ {
+ SpaceAction *saction = (SpaceAction *) sl;
+
+ /* we totally reinit the view for the Action Editor, as some old instances had some weird cruft set */
+ ar->v2d.tot.xmin = -20.0f;
+ ar->v2d.tot.ymin = (float)(-sa->winy)/3.0f;
+ ar->v2d.tot.xmax = (float)((sa->winx > 120)? (sa->winx) : 120);
+ ar->v2d.tot.ymax = 0.0f;
+
+ ar->v2d.cur = ar->v2d.tot;
+
+ ar->v2d.min[0] = 0.0f;
+ ar->v2d.min[1] = 0.0f;
+
+ ar->v2d.max[0] = MAXFRAMEF;
+ ar->v2d.max[1] = FLT_MAX;
+
+ ar->v2d.minzoom = 0.01f;
+ ar->v2d.maxzoom = 50;
+ ar->v2d.scroll = (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL);
+ ar->v2d.scroll |= (V2D_SCROLL_RIGHT);
+ ar->v2d.keepzoom = V2D_LOCKZOOM_Y;
+ ar->v2d.align = V2D_ALIGN_NO_POS_Y;
+ ar->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL;
+
+ /* for old files with ShapeKey editors open + an action set, clear the action as
+ * it doesn't make sense in the new system (i.e. violates concept that ShapeKey edit
+ * only shows ShapeKey-rooted actions only)
+ */
+ if (saction->mode == SACTCONT_SHAPEKEY)
+ saction->action = NULL;
+ break;
+ }
+ case SPACE_SEQ:
+ {
+ SpaceSeq *sseq = (SpaceSeq *)sl;
+ memcpy(&ar->v2d, &sseq->v2d, sizeof(View2D));
+
+ ar->v2d.scroll |= (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL);
+ ar->v2d.scroll |= (V2D_SCROLL_LEFT|V2D_SCROLL_SCALE_VERTICAL);
+ ar->v2d.align = V2D_ALIGN_NO_NEG_Y;
+ ar->v2d.flag |= V2D_IS_INITIALISED;
+ break;
+ }
+ case SPACE_NODE:
+ {
+ SpaceNode *snode = (SpaceNode *)sl;
+ memcpy(&ar->v2d, &snode->v2d, sizeof(View2D));
+
+ ar->v2d.scroll = (V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM);
+ ar->v2d.keepzoom = V2D_LIMITZOOM|V2D_KEEPASPECT;
+ break;
+ }
+ case SPACE_BUTS:
+ {
+ SpaceButs *sbuts = (SpaceButs *)sl;
+ memcpy(&ar->v2d, &sbuts->v2d, sizeof(View2D));
+
+ ar->v2d.scroll |= (V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM);
+ break;
+ }
+ case SPACE_FILE:
+ {
+ // SpaceFile *sfile = (SpaceFile *)sl;
+ ar->v2d.tot.xmin = ar->v2d.tot.ymin = 0;
+ ar->v2d.tot.xmax = ar->winx;
+ ar->v2d.tot.ymax = ar->winy;
+ ar->v2d.cur = ar->v2d.tot;
+ ar->regiontype = RGN_TYPE_WINDOW;
+ ar->v2d.scroll = (V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM_O);
+ ar->v2d.align = (V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_POS_Y);
+ ar->v2d.keepzoom = (V2D_LOCKZOOM_X|V2D_LOCKZOOM_Y|V2D_LIMITZOOM|V2D_KEEPASPECT);
+ break;
+ }
+ case SPACE_TEXT:
+ {
+ SpaceText *st = (SpaceText *)sl;
+ st->flags |= ST_FIND_WRAP;
+ }
+ //case SPACE_XXX: // FIXME... add other ones
+ // memcpy(&ar->v2d, &((SpaceXxx *)sl)->v2d, sizeof(View2D));
+ // break;
+ }
+ }
+}
+
+static void do_versions_windowmanager_2_50(bScreen *screen)
+{
+ ScrArea *sa;
+ SpaceLink *sl;
+
+ /* add regions */
+ for (sa = screen->areabase.first; sa; sa = sa->next) {
+ /* we keep headertype variable to convert old files only */
+ if (sa->headertype)
+ area_add_header_region(sa, &sa->regionbase);
+
+ area_add_window_regions(sa, sa->spacedata.first, &sa->regionbase);
+
+ /* space imageselect is deprecated */
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_IMASEL)
+ sl->spacetype = SPACE_EMPTY; /* spacedata then matches */
+ }
+
+ /* space sound is deprecated */
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_SOUND)
+ sl->spacetype = SPACE_EMPTY; /* spacedata then matches */
+ }
+
+ /* it seems to be possible in 2.5 to have this saved, filewindow probably */
+ sa->butspacetype = sa->spacetype;
+
+ /* pushed back spaces also need regions! */
+ if (sa->spacedata.first) {
+ sl = sa->spacedata.first;
+ for (sl = sl->next; sl; sl = sl->next) {
+ if (sa->headertype)
+ area_add_header_region(sa, &sl->regionbase);
+ area_add_window_regions(sa, sl, &sl->regionbase);
+ }
+ }
+ }
+}
+
+static void versions_gpencil_add_main(ListBase *lb, ID *id, const char *name)
+{
+ BLI_addtail(lb, id);
+ id->us = 1;
+ id->flag = LIB_FAKEUSER;
+ *( (short *)id->name )= ID_GD;
+
+ new_id(lb, id, name);
+ /* alphabetic insterion: is in new_id */
+
+ if (G.debug & G_DEBUG)
+ printf("Converted GPencil to ID: %s\n", id->name + 2);
+}
+
+static void do_versions_gpencil_2_50(Main *main, bScreen *screen)
+{
+ ScrArea *sa;
+ SpaceLink *sl;
+
+ /* add regions */
+ for (sa = screen->areabase.first; sa; sa = sa->next) {
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_VIEW3D) {
+ View3D *v3d = (View3D*) sl;
+ if (v3d->gpd) {
+ versions_gpencil_add_main(&main->gpencil, (ID *)v3d->gpd, "GPencil View3D");
+ v3d->gpd = NULL;
+ }
+ }
+ else if (sl->spacetype == SPACE_NODE) {
+ SpaceNode *snode = (SpaceNode *) sl;
+ if (snode->gpd) {
+ versions_gpencil_add_main(&main->gpencil, (ID *)snode->gpd, "GPencil Node");
+ snode->gpd = NULL;
+ }
+ }
+ else if (sl->spacetype == SPACE_SEQ) {
+ SpaceSeq *sseq = (SpaceSeq *) sl;
+ if (sseq->gpd) {
+ versions_gpencil_add_main(&main->gpencil, (ID *)sseq->gpd, "GPencil Node");
+ sseq->gpd = NULL;
+ }
+ }
+ else if (sl->spacetype == SPACE_IMAGE) {
+ SpaceImage *sima = (SpaceImage *) sl;
+#if 0 /* see comment on r28002 */
+ if (sima->gpd) {
+ versions_gpencil_add_main(&main->gpencil, (ID *)sima->gpd, "GPencil Image");
+ sima->gpd = NULL;
+ }
+#else
+ sima->gpd = NULL;
+#endif
+ }
+ }
+ }
+}
+
+static void do_version_mtex_factor_2_50(MTex **mtex_array, short idtype)
+{
+ MTex *mtex;
+ float varfac, colfac;
+ int a, neg;
+
+ if (!mtex_array)
+ return;
+
+ for (a = 0; a < MAX_MTEX; a++) {
+ if (mtex_array[a]) {
+ mtex = mtex_array[a];
+
+ neg = mtex->maptoneg;
+ varfac = mtex->varfac;
+ colfac = mtex->colfac;
+
+ if (neg & MAP_DISP) mtex->dispfac = -mtex->dispfac;
+ if (neg & MAP_NORM) mtex->norfac = -mtex->norfac;
+ if (neg & MAP_WARP) mtex->warpfac = -mtex->warpfac;
+
+ mtex->colspecfac = (neg & MAP_COLSPEC)? -colfac: colfac;
+ mtex->mirrfac = (neg & MAP_COLMIR)? -colfac: colfac;
+ mtex->alphafac = (neg & MAP_ALPHA)? -varfac: varfac;
+ mtex->difffac = (neg & MAP_REF)? -varfac: varfac;
+ mtex->specfac = (neg & MAP_SPEC)? -varfac: varfac;
+ mtex->emitfac = (neg & MAP_EMIT)? -varfac: varfac;
+ mtex->hardfac = (neg & MAP_HAR)? -varfac: varfac;
+ mtex->raymirrfac = (neg & MAP_RAYMIRR)? -varfac: varfac;
+ mtex->translfac = (neg & MAP_TRANSLU)? -varfac: varfac;
+ mtex->ambfac = (neg & MAP_AMB)? -varfac: varfac;
+ mtex->colemitfac = (neg & MAP_EMISSION_COL)? -colfac: colfac;
+ mtex->colreflfac = (neg & MAP_REFLECTION_COL)? -colfac: colfac;
+ mtex->coltransfac = (neg & MAP_TRANSMISSION_COL)? -colfac: colfac;
+ mtex->densfac = (neg & MAP_DENSITY)? -varfac: varfac;
+ mtex->scatterfac = (neg & MAP_SCATTERING)? -varfac: varfac;
+ mtex->reflfac = (neg & MAP_REFLECTION)? -varfac: varfac;
+
+ mtex->timefac = (neg & MAP_PA_TIME)? -varfac: varfac;
+ mtex->lengthfac = (neg & MAP_PA_LENGTH)? -varfac: varfac;
+ mtex->clumpfac = (neg & MAP_PA_CLUMP)? -varfac: varfac;
+ mtex->kinkfac = (neg & MAP_PA_KINK)? -varfac: varfac;
+ mtex->roughfac = (neg & MAP_PA_ROUGH)? -varfac: varfac;
+ mtex->padensfac = (neg & MAP_PA_DENS)? -varfac: varfac;
+ mtex->lifefac = (neg & MAP_PA_LIFE)? -varfac: varfac;
+ mtex->sizefac = (neg & MAP_PA_SIZE)? -varfac: varfac;
+ mtex->ivelfac = (neg & MAP_PA_IVEL)? -varfac: varfac;
+
+ mtex->shadowfac = (neg & LAMAP_SHAD)? -colfac: colfac;
+
+ mtex->zenupfac = (neg & WOMAP_ZENUP)? -colfac: colfac;
+ mtex->zendownfac = (neg & WOMAP_ZENDOWN)? -colfac: colfac;
+ mtex->blendfac = (neg & WOMAP_BLEND)? -varfac: varfac;
+
+ if (idtype == ID_MA)
+ mtex->colfac = (neg & MAP_COL)? -colfac: colfac;
+ else if (idtype == ID_LA)
+ mtex->colfac = (neg & LAMAP_COL)? -colfac: colfac;
+ else if (idtype == ID_WO)
+ mtex->colfac = (neg & WOMAP_HORIZ)? -colfac: colfac;
+ }
+ }
+}
+
+static void do_version_mdef_250(Main *main)
+{
+ Object *ob;
+ ModifierData *md;
+ MeshDeformModifierData *mmd;
+
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ for (md = ob->modifiers.first; md; md = md->next) {
+ if (md->type == eModifierType_MeshDeform) {
+ mmd = (MeshDeformModifierData*) md;
+
+ if (mmd->bindcos) {
+ /* make bindcos NULL in order to trick older versions
+ * into thinking that the mesh was not bound yet */
+ mmd->bindcagecos = mmd->bindcos;
+ mmd->bindcos = NULL;
+
+ modifier_mdef_compact_influences(md);
+ }
+ }
+ }
+ }
+}
+
+static void do_version_constraints_radians_degrees_250(ListBase *lb)
+{
+ bConstraint *con;
+
+ for (con = lb->first; con; con = con->next) {
+ if (con->type == CONSTRAINT_TYPE_RIGIDBODYJOINT) {
+ bRigidBodyJointConstraint *data = con->data;
+ data->axX *= (float)(M_PI / 180.0);
+ data->axY *= (float)(M_PI / 180.0);
+ data->axZ *= (float)(M_PI / 180.0);
+ }
+ else if (con->type == CONSTRAINT_TYPE_KINEMATIC) {
+ bKinematicConstraint *data = con->data;
+ data->poleangle *= (float)(M_PI / 180.0);
+ }
+ else if (con->type == CONSTRAINT_TYPE_ROTLIMIT) {
+ bRotLimitConstraint *data = con->data;
+
+ data->xmin *= (float)(M_PI / 180.0);
+ data->xmax *= (float)(M_PI / 180.0);
+ data->ymin *= (float)(M_PI / 180.0);
+ data->ymax *= (float)(M_PI / 180.0);
+ data->zmin *= (float)(M_PI / 180.0);
+ data->zmax *= (float)(M_PI / 180.0);
+ }
+ }
+}
+
+/* NOTE: this version patch is intended for versions < 2.52.2, but was initially introduced in 2.27 already */
+static void do_versions_seq_unique_name_all_strips(Scene * sce, ListBase *seqbasep)
+{
+ Sequence * seq = seqbasep->first;
+
+ while (seq) {
+ seqbase_unique_name_recursive(&sce->ed->seqbase, seq);
+ if (seq->seqbase.first) {
+ do_versions_seq_unique_name_all_strips(sce, &seq->seqbase);
+ }
+ seq = seq->next;
+ }
+}
+
+static void do_version_bone_roll_256(Bone *bone)
+{
+ Bone *child;
+ float submat[3][3];
+
+ copy_m3_m4(submat, bone->arm_mat);
+ mat3_to_vec_roll(submat, NULL, &bone->arm_roll);
+
+ for (child = bone->childbase.first; child; child = child->next)
+ do_version_bone_roll_256(child);
+}
+
+static void do_versions_nodetree_dynamic_sockets(bNodeTree *ntree)
+{
+ bNodeSocket *sock;
+ for (sock = ntree->inputs.first; sock; sock = sock->next)
+ sock->flag |= SOCK_DYNAMIC;
+ for (sock = ntree->outputs.first; sock; sock = sock->next)
+ sock->flag |= SOCK_DYNAMIC;
+}
+
+void blo_do_versions_250(FileData *fd, Library *lib, Main *main)
+{
+ /* WATCH IT!!!: pointers from libdata have not been converted */
+
+ if (main->versionfile < 250) {
+ bScreen *screen;
+ Scene *scene;
+ Base *base;
+ Material *ma;
+ Camera *cam;
+ Mesh *me;
+ Curve *cu;
+ Scene *sce;
+ Tex *tx;
+ ParticleSettings *part;
+ Object *ob;
+ //PTCacheID *pid;
+ //ListBase pidlist;
+
+ bSound *sound;
+ Sequence *seq;
+ bActuator *act;
+ int a;
+
+ for (sound = main->sound.first; sound; sound = sound->id.next) {
+ if (sound->newpackedfile) {
+ sound->packedfile = sound->newpackedfile;
+ sound->newpackedfile = NULL;
+ }
+ }
+
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ for (act = ob->actuators.first; act; act = act->next) {
+ if (act->type == ACT_SOUND) {
+ bSoundActuator *sAct = (bSoundActuator*) act->data;
+ if (sAct->sound) {
+ sound = blo_do_versions_newlibadr(fd, lib, sAct->sound);
+ sAct->flag = sound->flags & SOUND_FLAGS_3D ? ACT_SND_3D_SOUND : 0;
+ sAct->pitch = sound->pitch;
+ sAct->volume = sound->volume;
+ sAct->sound3D.reference_distance = sound->distance;
+ sAct->sound3D.max_gain = sound->max_gain;
+ sAct->sound3D.min_gain = sound->min_gain;
+ sAct->sound3D.rolloff_factor = sound->attenuation;
+ }
+ else {
+ sAct->sound3D.reference_distance = 1.0f;
+ sAct->volume = 1.0f;
+ sAct->sound3D.max_gain = 1.0f;
+ sAct->sound3D.rolloff_factor = 1.0f;
+ }
+ sAct->sound3D.cone_inner_angle = 360.0f;
+ sAct->sound3D.cone_outer_angle = 360.0f;
+ sAct->sound3D.max_distance = FLT_MAX;
+ }
+ }
+ }
+
+ for (scene = main->scene.first; scene; scene = scene->id.next) {
+ if (scene->ed && scene->ed->seqbasep) {
+ SEQ_BEGIN (scene->ed, seq)
+ {
+ if (seq->type == SEQ_HD_SOUND) {
+ char str[FILE_MAX];
+ BLI_join_dirfile(str, sizeof(str), seq->strip->dir, seq->strip->stripdata->name);
+ BLI_path_abs(str, main->name);
+ seq->sound = sound_new_file(main, str);
+ }
+ /* don't know, if anybody used that this way, but just in case, upgrade to new way... */
+ if ((seq->flag & SEQ_USE_PROXY_CUSTOM_FILE) &&
+ !(seq->flag & SEQ_USE_PROXY_CUSTOM_DIR))
+ {
+ BLI_snprintf(seq->strip->proxy->dir, FILE_MAXDIR, "%s/BL_proxy", seq->strip->dir);
+ }
+ }
+ SEQ_END
+ }
+ }
+
+ for (screen = main->screen.first; screen; screen = screen->id.next) {
+ do_versions_windowmanager_2_50(screen);
+ do_versions_gpencil_2_50(main, screen);
+ }
+
+ /* shader, composite and texture node trees have id.name empty, put something in
+ * to have them show in RNA viewer and accessible otherwise.
+ */
+ for (ma = main->mat.first; ma; ma = ma->id.next) {
+ if (ma->nodetree && ma->nodetree->id.name[0] == '\0')
+ strcpy(ma->nodetree->id.name, "NTShader Nodetree");
+
+ /* which_output 0 is now "not specified" */
+ for (a = 0; a < MAX_MTEX; a++) {
+ if (ma->mtex[a]) {
+ tx = blo_do_versions_newlibadr(fd, lib, ma->mtex[a]->tex);
+ if (tx && tx->use_nodes)
+ ma->mtex[a]->which_output++;
+ }
+ }
+ }
+
+ /* and composite trees */
+ for (sce = main->scene.first; sce; sce = sce->id.next) {
+ if (sce->nodetree && sce->nodetree->id.name[0] == '\0')
+ strcpy(sce->nodetree->id.name, "NTCompositing Nodetree");
+
+ /* move to cameras */
+ if (sce->r.mode & R_PANORAMA) {
+ for (base = sce->base.first; base; base = base->next) {
+ ob = blo_do_versions_newlibadr(fd, lib, base->object);
+
+ if (ob->type == OB_CAMERA && !ob->id.lib) {
+ cam = blo_do_versions_newlibadr(fd, lib, ob->data);
+ cam->flag |= CAM_PANORAMA;
+ }
+ }
+
+ sce->r.mode &= ~R_PANORAMA;
+ }
+ }
+
+ /* and texture trees */
+ for (tx = main->tex.first; tx; tx = tx->id.next) {
+ bNode *node;
+
+ if (tx->nodetree) {
+ if (tx->nodetree->id.name[0] == '\0')
+ strcpy(tx->nodetree->id.name, "NTTexture Nodetree");
+
+ /* which_output 0 is now "not specified" */
+ for (node = tx->nodetree->nodes.first; node; node = node->next)
+ if (node->type == TEX_NODE_OUTPUT)
+ node->custom1++;
+ }
+ }
+
+ /* copy standard draw flag to meshes(used to be global, is not available here) */
+ for (me = main->mesh.first; me; me = me->id.next) {
+ me->drawflag = ME_DRAWEDGES|ME_DRAWFACES|ME_DRAWCREASES;
+ }
+
+ /* particle draw and render types */
+ for (part = main->particle.first; part; part = part->id.next) {
+ if (part->draw_as) {
+ if (part->draw_as == PART_DRAW_DOT) {
+ part->ren_as = PART_DRAW_HALO;
+ part->draw_as = PART_DRAW_REND;
+ }
+ else if (part->draw_as <= PART_DRAW_AXIS) {
+ part->ren_as = PART_DRAW_HALO;
+ }
+ else {
+ part->ren_as = part->draw_as;
+ part->draw_as = PART_DRAW_REND;
+ }
+ }
+ part->path_end = 1.0f;
+ part->clength = 1.0f;
+ }
+
+ /* set old pointcaches to have disk cache flag */
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+
+ //BKE_ptcache_ids_from_object(&pidlist, ob);
+
+ //for (pid = pidlist.first; pid; pid = pid->next)
+ // pid->cache->flag |= PTCACHE_DISK_CACHE;
+
+ //BLI_freelistN(&pidlist);
+ }
+
+ /* type was a mixed flag & enum. move the 2d flag elsewhere */
+ for (cu = main->curve.first; cu; cu = cu->id.next) {
+ Nurb *nu;
+
+ for (nu = cu->nurb.first; nu; nu = nu->next) {
+ nu->flag |= (nu->type & CU_2D);
+ nu->type &= CU_TYPE;
+ }
+ }
+ }
+
+ if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 1)) {
+ Object *ob;
+ Material *ma;
+ Tex *tex;
+ Scene *sce;
+ ToolSettings *ts;
+ //PTCacheID *pid;
+ //ListBase pidlist;
+
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ //BKE_ptcache_ids_from_object(&pidlist, ob);
+
+ //for (pid = pidlist.first; pid; pid = pid->next) {
+ // if (pid->ptcaches->first == NULL)
+ // pid->ptcaches->first = pid->ptcaches->last = pid->cache;
+ //}
+
+ //BLI_freelistN(&pidlist);
+
+ if (ob->type == OB_MESH) {
+ Mesh *me = blo_do_versions_newlibadr(fd, lib, ob->data);
+ void *olddata = ob->data;
+ ob->data = me;
+
+ /* XXX - library meshes crash on loading most yoFrankie levels,
+ * the multires pointer gets invalid - Campbell */
+ if (me && me->id.lib == NULL && me->mr && me->mr->level_count > 1) {
+ multires_load_old(ob, me);
+ }
+
+ ob->data = olddata;
+ }
+
+ if (ob->totcol && ob->matbits == NULL) {
+ int a;
+
+ ob->matbits = MEM_callocN(sizeof(char)*ob->totcol, "ob->matbits");
+ for (a = 0; a < ob->totcol; a++)
+ ob->matbits[a] = ob->colbits & (1<<a);
+ }
+ }
+
+ /* texture filter */
+ for (tex = main->tex.first; tex; tex = tex->id.next) {
+ if (tex->afmax == 0)
+ tex->afmax = 8;
+ }
+
+ for (ma = main->mat.first; ma; ma = ma->id.next) {
+ int a;
+
+ if (ma->mode & MA_WIRE) {
+ ma->material_type = MA_TYPE_WIRE;
+ ma->mode &= ~MA_WIRE;
+ }
+
+ if (ma->mode & MA_HALO) {
+ ma->material_type = MA_TYPE_HALO;
+ ma->mode &= ~MA_HALO;
+ }
+
+ if (ma->mode & (MA_ZTRANSP|MA_RAYTRANSP)) {
+ ma->mode |= MA_TRANSP;
+ }
+ else {
+ /* ma->mode |= MA_ZTRANSP; */ /* leave ztransp as is even if its not used [#28113] */
+ ma->mode &= ~MA_TRANSP;
+ }
+
+ /* set new bump for unused slots */
+ for (a = 0; a < MAX_MTEX; a++) {
+ if (ma->mtex[a]) {
+ tex = ma->mtex[a]->tex;
+ if (!tex) {
+ ma->mtex[a]->texflag |= MTEX_3TAP_BUMP;
+ ma->mtex[a]->texflag |= MTEX_BUMP_OBJECTSPACE;
+ }
+ else {
+ tex = (Tex*) blo_do_versions_newlibadr(fd, ma->id.lib, tex);
+ if (tex && tex->type == 0) { /* invalid type */
+ ma->mtex[a]->texflag |= MTEX_3TAP_BUMP;
+ ma->mtex[a]->texflag |= MTEX_BUMP_OBJECTSPACE;
+ }
+ }
+ }
+ }
+
+ /* volume rendering settings */
+ if (ma->vol.stepsize < 0.0001f) {
+ ma->vol.density = 1.0f;
+ ma->vol.emission = 0.0f;
+ ma->vol.scattering = 1.0f;
+ ma->vol.emission_col[0] = ma->vol.emission_col[1] = ma->vol.emission_col[2] = 1.0f;
+ ma->vol.density_scale = 1.0f;
+ ma->vol.depth_cutoff = 0.01f;
+ ma->vol.stepsize_type = MA_VOL_STEP_RANDOMIZED;
+ ma->vol.stepsize = 0.2f;
+ ma->vol.shade_type = MA_VOL_SHADE_SHADED;
+ ma->vol.shadeflag |= MA_VOL_PRECACHESHADING;
+ ma->vol.precache_resolution = 50;
+ }
+ }
+
+ for (sce = main->scene.first; sce; sce = sce->id.next) {
+ ts = sce->toolsettings;
+ if (ts->normalsize == 0.0f || !ts->uv_selectmode || ts->vgroup_weight == 0.0f) {
+ ts->normalsize = 0.1f;
+ ts->selectmode = SCE_SELECT_VERTEX;
+
+ /* autokeying - setting should be taken from the user-prefs
+ * but the userprefs version may not have correct flags set
+ * (i.e. will result in blank box when enabled)
+ */
+ ts->autokey_mode = U.autokey_mode;
+ if (ts->autokey_mode == 0)
+ ts->autokey_mode = 2; /* 'add/replace' but not on */
+ ts->uv_selectmode = UV_SELECT_VERTEX;
+ ts->vgroup_weight = 1.0f;
+ }
+
+ /* Game Settings */
+ /* Dome */
+ sce->gm.dome.angle = sce->r.domeangle;
+ sce->gm.dome.mode = sce->r.domemode;
+ sce->gm.dome.res = sce->r.domeres;
+ sce->gm.dome.resbuf = sce->r.domeresbuf;
+ sce->gm.dome.tilt = sce->r.dometilt;
+ sce->gm.dome.warptext = sce->r.dometext;
+
+ /* Stand Alone */
+ sce->gm.playerflag |= (sce->r.fullscreen?GAME_PLAYER_FULLSCREEN:0);
+ sce->gm.xplay = sce->r.xplay;
+ sce->gm.yplay = sce->r.yplay;
+ sce->gm.freqplay = sce->r.freqplay;
+ sce->gm.depth = sce->r.depth;
+ sce->gm.attrib = sce->r.attrib;
+
+ /* Stereo */
+ sce->gm.stereomode = sce->r.stereomode;
+ /* reassigning stereomode NO_STEREO and DOME to a separeted flag*/
+ if (sce->gm.stereomode == 1) { // 1 = STEREO_NOSTEREO
+ sce->gm.stereoflag = STEREO_NOSTEREO;
+ sce->gm.stereomode = STEREO_ANAGLYPH;
+ }
+ else if (sce->gm.stereomode == 8) { // 8 = STEREO_DOME
+ sce->gm.stereoflag = STEREO_DOME;
+ sce->gm.stereomode = STEREO_ANAGLYPH;
+ }
+ else
+ sce->gm.stereoflag = STEREO_ENABLED;
+
+ /* Framing */
+ sce->gm.framing = sce->framing;
+ sce->gm.xplay = sce->r.xplay;
+ sce->gm.yplay = sce->r.yplay;
+ sce->gm.freqplay = sce->r.freqplay;
+ sce->gm.depth = sce->r.depth;
+
+ /* Physic (previously stored in world) */
+ sce->gm.gravity =9.8f;
+ sce->gm.physicsEngine = WOPHY_BULLET; /* Bullet by default */
+ sce->gm.mode = WO_DBVT_CULLING; /* DBVT culling by default */
+ sce->gm.occlusionRes = 128;
+ sce->gm.ticrate = 60;
+ sce->gm.maxlogicstep = 5;
+ sce->gm.physubstep = 1;
+ sce->gm.maxphystep = 5;
+ }
+ }
+
+ if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 2)) {
+ Scene *sce;
+ Object *ob;
+
+ for (sce = main->scene.first; sce; sce = sce->id.next) {
+ if (fd->fileflags & G_FILE_ENABLE_ALL_FRAMES)
+ sce->gm.flag |= GAME_ENABLE_ALL_FRAMES;
+ if (fd->fileflags & G_FILE_SHOW_DEBUG_PROPS)
+ sce->gm.flag |= GAME_SHOW_DEBUG_PROPS;
+ if (fd->fileflags & G_FILE_SHOW_FRAMERATE)
+ sce->gm.flag |= GAME_SHOW_FRAMERATE;
+ if (fd->fileflags & G_FILE_SHOW_PHYSICS)
+ sce->gm.flag |= GAME_SHOW_PHYSICS;
+ if (fd->fileflags & G_FILE_GLSL_NO_SHADOWS)
+ sce->gm.flag |= GAME_GLSL_NO_SHADOWS;
+ if (fd->fileflags & G_FILE_GLSL_NO_SHADERS)
+ sce->gm.flag |= GAME_GLSL_NO_SHADERS;
+ if (fd->fileflags & G_FILE_GLSL_NO_RAMPS)
+ sce->gm.flag |= GAME_GLSL_NO_RAMPS;
+ if (fd->fileflags & G_FILE_GLSL_NO_NODES)
+ sce->gm.flag |= GAME_GLSL_NO_NODES;
+ if (fd->fileflags & G_FILE_GLSL_NO_EXTRA_TEX)
+ sce->gm.flag |= GAME_GLSL_NO_EXTRA_TEX;
+ if (fd->fileflags & G_FILE_IGNORE_DEPRECATION_WARNINGS)
+ sce->gm.flag |= GAME_IGNORE_DEPRECATION_WARNINGS;
+
+ if (fd->fileflags & G_FILE_GAME_MAT_GLSL)
+ sce->gm.matmode = GAME_MAT_GLSL;
+ else if (fd->fileflags & G_FILE_GAME_MAT)
+ sce->gm.matmode = GAME_MAT_MULTITEX;
+ else
+ sce->gm.matmode = GAME_MAT_TEXFACE;
+
+ sce->gm.flag |= GAME_DISPLAY_LISTS;
+ }
+
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ if (ob->flag & 8192) // OB_POSEMODE = 8192
+ ob->mode |= OB_MODE_POSE;
+ }
+ }
+
+ if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 4)) {
+ Scene *sce;
+ Object *ob;
+ Material *ma;
+ Lamp *la;
+ World *wo;
+ Tex *tex;
+ ParticleSettings *part;
+ int do_gravity = 0;
+
+ for (sce = main->scene.first; sce; sce = sce->id.next)
+ if (sce->unit.scale_length == 0.0f)
+ sce->unit.scale_length = 1.0f;
+
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ /* fluid-sim stuff */
+ FluidsimModifierData *fluidmd = (FluidsimModifierData *) modifiers_findByType(ob, eModifierType_Fluidsim);
+ if (fluidmd)
+ fluidmd->fss->fmd = fluidmd;
+
+ /* rotation modes were added, but old objects would now default to being 'quaternion based' */
+ ob->rotmode = ROT_MODE_EUL;
+ }
+
+ for (ma = main->mat.first; ma; ma = ma->id.next) {
+ if (ma->vol.reflection == 0.f) {
+ ma->vol.reflection = 1.f;
+ ma->vol.transmission_col[0] = ma->vol.transmission_col[1] = ma->vol.transmission_col[2] = 1.0f;
+ ma->vol.reflection_col[0] = ma->vol.reflection_col[1] = ma->vol.reflection_col[2] = 1.0f;
+ }
+
+ do_version_mtex_factor_2_50(ma->mtex, ID_MA);
+ }
+
+ for (la = main->lamp.first; la; la = la->id.next)
+ do_version_mtex_factor_2_50(la->mtex, ID_LA);
+
+ for (wo = main->world.first; wo; wo = wo->id.next)
+ do_version_mtex_factor_2_50(wo->mtex, ID_WO);
+
+ for (tex = main->tex.first; tex; tex = tex->id.next)
+ if (tex->vd)
+ if (tex->vd->extend == 0)
+ tex->vd->extend = TEX_CLIP;
+
+ for (sce = main->scene.first; sce; sce = sce->id.next) {
+ if (sce->audio.main == 0.0f)
+ sce->audio.main = 1.0f;
+
+ sce->r.ffcodecdata.audio_mixrate = sce->audio.mixrate;
+ sce->r.ffcodecdata.audio_volume = sce->audio.main;
+ sce->audio.distance_model = 2;
+ sce->audio.doppler_factor = 1.0f;
+ sce->audio.speed_of_sound = 343.3f;
+ }
+
+ /* Add default gravity to scenes */
+ for (sce = main->scene.first; sce; sce = sce->id.next) {
+ if ((sce->physics_settings.flag & PHYS_GLOBAL_GRAVITY) == 0 &&
+ len_v3(sce->physics_settings.gravity) == 0.0f)
+ {
+ sce->physics_settings.gravity[0] = sce->physics_settings.gravity[1] = 0.0f;
+ sce->physics_settings.gravity[2] = -9.81f;
+ sce->physics_settings.flag = PHYS_GLOBAL_GRAVITY;
+ do_gravity = 1;
+ }
+ }
+
+ /* Assign proper global gravity weights for dynamics (only z-coordinate is taken into account) */
+ if (do_gravity) {
+ for (part = main->particle.first; part; part = part->id.next)
+ part->effector_weights->global_gravity = part->acc[2]/-9.81f;
+ }
+
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ ModifierData *md;
+
+ if (do_gravity) {
+ for (md = ob->modifiers.first; md; md = md->next) {
+ ClothModifierData *clmd = (ClothModifierData *) modifiers_findByType(ob, eModifierType_Cloth);
+ if (clmd)
+ clmd->sim_parms->effector_weights->global_gravity = clmd->sim_parms->gravity[2]/-9.81f;
+ }
+
+ if (ob->soft)
+ ob->soft->effector_weights->global_gravity = ob->soft->grav/9.81f;
+ }
+
+ /* Normal wind shape is plane */
+ if (ob->pd) {
+ if (ob->pd->forcefield == PFIELD_WIND)
+ ob->pd->shape = PFIELD_SHAPE_PLANE;
+
+ if (ob->pd->flag & PFIELD_PLANAR)
+ ob->pd->shape = PFIELD_SHAPE_PLANE;
+ else if (ob->pd->flag & PFIELD_SURFACE)
+ ob->pd->shape = PFIELD_SHAPE_SURFACE;
+
+ ob->pd->flag |= PFIELD_DO_LOCATION;
+ }
+ }
+ }
+
+ if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 6)) {
+ Object *ob;
+ Lamp *la;
+
+ /* New variables for axis-angle rotations and/or quaternion rotations were added, and need proper initialization */
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ /* new variables for all objects */
+ ob->quat[0] = 1.0f;
+ ob->rotAxis[1] = 1.0f;
+
+ /* bones */
+ if (ob->pose) {
+ bPoseChannel *pchan;
+
+ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
+ /* just need to initalise rotation axis properly... */
+ pchan->rotAxis[1] = 1.0f;
+ }
+ }
+ }
+
+ for (la = main->lamp.first; la; la = la->id.next)
+ la->compressthresh = 0.05f;
+ }
+
+ if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 7)) {
+ Mesh *me;
+ Nurb *nu;
+ Lattice *lt;
+ Curve *cu;
+ Key *key;
+ float *data;
+ int a, tot;
+
+ /* shape keys are no longer applied to the mesh itself, but rather
+ * to the derivedmesh/displist, so here we ensure that the basis
+ * shape key is always set in the mesh coordinates. */
+ for (me = main->mesh.first; me; me = me->id.next) {
+ if ((key = blo_do_versions_newlibadr(fd, lib, me->key)) && key->refkey) {
+ data = key->refkey->data;
+ tot = MIN2(me->totvert, key->refkey->totelem);
+
+ for (a = 0; a < tot; a++, data += 3)
+ copy_v3_v3(me->mvert[a].co, data);
+ }
+ }
+
+ for (lt = main->latt.first; lt; lt = lt->id.next) {
+ if ((key = blo_do_versions_newlibadr(fd, lib, lt->key)) && key->refkey) {
+ data = key->refkey->data;
+ tot = MIN2(lt->pntsu*lt->pntsv*lt->pntsw, key->refkey->totelem);
+
+ for (a = 0; a < tot; a++, data += 3)
+ copy_v3_v3(lt->def[a].vec, data);
+ }
+ }
+
+ for (cu = main->curve.first; cu; cu = cu->id.next) {
+ if ((key = blo_do_versions_newlibadr(fd, lib, cu->key)) && key->refkey) {
+ data = key->refkey->data;
+
+ for (nu = cu->nurb.first; nu; nu = nu->next) {
+ if (nu->bezt) {
+ BezTriple *bezt = nu->bezt;
+
+ for (a = 0; a < nu->pntsu; a++, bezt++) {
+ copy_v3_v3(bezt->vec[0], data); data+=3;
+ copy_v3_v3(bezt->vec[1], data); data+=3;
+ copy_v3_v3(bezt->vec[2], data); data+=3;
+ bezt->alfa = *data; data++;
+ }
+ }
+ else if (nu->bp) {
+ BPoint *bp = nu->bp;
+
+ for (a = 0; a < nu->pntsu*nu->pntsv; a++, bp++) {
+ copy_v3_v3(bp->vec, data); data += 3;
+ bp->alfa = *data; data++;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 8)) {
+ {
+ Scene *sce = main->scene.first;
+ while (sce) {
+ if (sce->r.frame_step == 0)
+ sce->r.frame_step = 1;
+ if (sce->r.mblur_samples == 0)
+ sce->r.mblur_samples = sce->r.osa;
+
+ if (sce->ed && sce->ed->seqbase.first) {
+ do_versions_seq_unique_name_all_strips(sce, &sce->ed->seqbase);
+ }
+
+ sce = sce->id.next;
+ }
+ }
+
+ {
+ /* ensure all nodes have unique names */
+ bNodeTree *ntree = main->nodetree.first;
+ while (ntree) {
+ bNode *node = ntree->nodes.first;
+
+ while (node) {
+ nodeUniqueName(ntree, node);
+ node = node->next;
+ }
+
+ ntree = ntree->id.next;
+ }
+ }
+
+ {
+ Object *ob = main->object.first;
+ while (ob) {
+ /* shaded mode disabled for now */
+ if (ob->dt == OB_MATERIAL)
+ ob->dt = OB_TEXTURE;
+ ob = ob->id.next;
+ }
+ }
+
+ {
+ bScreen *screen;
+ ScrArea *sa;
+ SpaceLink *sl;
+
+ for (screen = main->screen.first; screen; screen = screen->id.next) {
+ for (sa = screen->areabase.first; sa; sa = sa->next) {
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_VIEW3D) {
+ View3D *v3d = (View3D *) sl;
+ if (v3d->drawtype == OB_MATERIAL)
+ v3d->drawtype = OB_SOLID;
+ }
+ }
+ }
+ }
+ }
+
+ /* only convert old 2.50 files with color management */
+ if (main->versionfile == 250) {
+ Scene *sce = main->scene.first;
+ Material *ma = main->mat.first;
+ World *wo = main->world.first;
+ Tex *tex = main->tex.first;
+ int i, convert = 0;
+
+ /* convert to new color management system:
+ * while previously colors were stored as srgb,
+ * now they are stored as linear internally,
+ * with screen gamma correction in certain places in the UI. */
+
+ /* don't know what scene is active, so we'll convert if any scene has it enabled... */
+ while (sce) {
+ if (sce->r.color_mgt_flag & R_COLOR_MANAGEMENT)
+ convert = 1;
+ sce = sce->id.next;
+ }
+
+ if (convert) {
+ while (ma) {
+ if (ma->ramp_col) {
+ ColorBand *band = (ColorBand *)ma->ramp_col;
+ for (i = 0; i < band->tot; i++) {
+ CBData *data = band->data + i;
+ srgb_to_linearrgb_v3_v3(&data->r, &data->r);
+ }
+ }
+
+ if (ma->ramp_spec) {
+ ColorBand *band = (ColorBand *)ma->ramp_spec;
+ for (i = 0; i < band->tot; i++) {
+ CBData *data = band->data + i;
+ srgb_to_linearrgb_v3_v3(&data->r, &data->r);
+ }
+ }
+
+ srgb_to_linearrgb_v3_v3(&ma->r, &ma->r);
+ srgb_to_linearrgb_v3_v3(&ma->specr, &ma->specr);
+ srgb_to_linearrgb_v3_v3(&ma->mirr, &ma->mirr);
+ srgb_to_linearrgb_v3_v3(ma->sss_col, ma->sss_col);
+ ma = ma->id.next;
+ }
+
+ while (tex) {
+ if (tex->coba) {
+ ColorBand *band = (ColorBand *)tex->coba;
+ for (i = 0; i < band->tot; i++) {
+ CBData *data = band->data + i;
+ srgb_to_linearrgb_v3_v3(&data->r, &data->r);
+ }
+ }
+ tex = tex->id.next;
+ }
+
+ while (wo) {
+ srgb_to_linearrgb_v3_v3(&wo->ambr, &wo->ambr);
+ srgb_to_linearrgb_v3_v3(&wo->horr, &wo->horr);
+ srgb_to_linearrgb_v3_v3(&wo->zenr, &wo->zenr);
+ wo = wo->id.next;
+ }
+ }
+ }
+ }
+
+ if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 9)) {
+ Scene *sce;
+ Mesh *me;
+ Object *ob;
+
+ for (sce = main->scene.first; sce; sce = sce->id.next)
+ if (!sce->toolsettings->particle.selectmode)
+ sce->toolsettings->particle.selectmode = SCE_SELECT_PATH;
+
+ if (main->versionfile == 250 && main->subversionfile > 1) {
+ for (me = main->mesh.first; me; me = me->id.next)
+ multires_load_old_250(me);
+
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ MultiresModifierData *mmd = (MultiresModifierData *) modifiers_findByType(ob, eModifierType_Multires);
+
+ if (mmd) {
+ mmd->totlvl--;
+ mmd->lvl--;
+ mmd->sculptlvl = mmd->lvl;
+ mmd->renderlvl = mmd->lvl;
+ }
+ }
+ }
+ }
+
+ if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 10)) {
+ Object *ob;
+
+ /* properly initialize hair clothsim data on old files */
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ ModifierData *md;
+ for (md = ob->modifiers.first; md; md = md->next) {
+ if (md->type == eModifierType_Cloth) {
+ ClothModifierData *clmd = (ClothModifierData *)md;
+ if (clmd->sim_parms->velocity_smooth < 0.01f)
+ clmd->sim_parms->velocity_smooth = 0.f;
+ }
+ }
+ }
+ }
+
+ /* fix bad area setup in subversion 10 */
+ if (main->versionfile == 250 && main->subversionfile == 10) {
+ /* fix for new view type in sequencer */
+ bScreen *screen;
+ ScrArea *sa;
+ SpaceLink *sl;
+
+ /* remove all preview window in wrong spaces */
+ for (screen = main->screen.first; screen; screen = screen->id.next) {
+ for (sa = screen->areabase.first; sa; sa = sa->next) {
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype != SPACE_SEQ) {
+ ARegion *ar;
+ ListBase *regionbase;
+
+ if (sl == sa->spacedata.first) {
+ regionbase = &sa->regionbase;
+ }
+ else {
+ regionbase = &sl->regionbase;
+ }
+
+ for (ar = regionbase->first; ar; ar = ar->next) {
+ if (ar->regiontype == RGN_TYPE_PREVIEW)
+ break;
+ }
+
+ if (ar && (ar->regiontype == RGN_TYPE_PREVIEW)) {
+ SpaceType *st = BKE_spacetype_from_id(SPACE_SEQ);
+ BKE_area_region_free(st, ar);
+ BLI_freelinkN(regionbase, ar);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 11)) {
+ {
+ /* fix for new view type in sequencer */
+ bScreen *screen;
+ ScrArea *sa;
+ SpaceLink *sl;
+
+ for (screen = main->screen.first; screen; screen = screen->id.next) {
+ for (sa = screen->areabase.first; sa; sa = sa->next) {
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_SEQ) {
+ ARegion *ar;
+ ARegion *ar_main;
+ ListBase *regionbase;
+ SpaceSeq *sseq = (SpaceSeq *)sl;
+
+ if (sl == sa->spacedata.first) {
+ regionbase = &sa->regionbase;
+ }
+ else {
+ regionbase = &sl->regionbase;
+ }
+
+ if (sseq->view == 0)
+ sseq->view = SEQ_VIEW_SEQUENCE;
+ if (sseq->mainb == 0)
+ sseq->mainb = SEQ_DRAW_IMG_IMBUF;
+
+ ar_main = (ARegion*)regionbase->first;
+ for (; ar_main; ar_main = ar_main->next) {
+ if (ar_main->regiontype == RGN_TYPE_WINDOW)
+ break;
+ }
+ ar = MEM_callocN(sizeof(ARegion), "preview area for sequencer");
+ BLI_insertlinkbefore(regionbase, ar_main, ar);
+ sequencer_init_preview_region(ar);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 12)) {
+ Scene *sce;
+ Object *ob;
+ Brush *brush;
+ Material *ma;
+
+ /* game engine changes */
+ for (sce = main->scene.first; sce; sce = sce->id.next) {
+ sce->gm.eyeseparation = 0.10f;
+ }
+
+ /* anim viz changes */
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ /* initialize object defaults */
+ animviz_settings_init(&ob->avs);
+
+ /* if armature, copy settings for pose from armature data
+ * performing initialization where appropriate
+ */
+ if (ob->pose && ob->data) {
+ bArmature *arm = blo_do_versions_newlibadr(fd, lib, ob->data);
+ if (arm) { /* XXX - why does this fail in some cases? */
+ bAnimVizSettings *avs = &ob->pose->avs;
+
+ /* ghosting settings ---------------- */
+ /* ranges */
+ avs->ghost_bc = avs->ghost_ac = arm->ghostep;
+
+ avs->ghost_sf = arm->ghostsf;
+ avs->ghost_ef = arm->ghostef;
+ if ((avs->ghost_sf == avs->ghost_ef) && (avs->ghost_sf == 0)) {
+ avs->ghost_sf = 1;
+ avs->ghost_ef = 100;
+ }
+
+ /* type */
+ if (arm->ghostep == 0)
+ avs->ghost_type = GHOST_TYPE_NONE;
+ else
+ avs->ghost_type = arm->ghosttype + 1;
+
+ /* stepsize */
+ avs->ghost_step = arm->ghostsize;
+ if (avs->ghost_step == 0)
+ avs->ghost_step = 1;
+
+ /* path settings --------------------- */
+ /* ranges */
+ avs->path_bc = arm->pathbc;
+ avs->path_ac = arm->pathac;
+ if ((avs->path_bc == avs->path_ac) && (avs->path_bc == 0))
+ avs->path_bc = avs->path_ac = 10;
+
+ avs->path_sf = arm->pathsf;
+ avs->path_ef = arm->pathef;
+ if ((avs->path_sf == avs->path_ef) && (avs->path_sf == 0)) {
+ avs->path_sf = 1;
+ avs->path_ef = 250;
+ }
+
+ /* flags */
+ if (arm->pathflag & ARM_PATH_FNUMS)
+ avs->path_viewflag |= MOTIONPATH_VIEW_FNUMS;
+ if (arm->pathflag & ARM_PATH_KFRAS)
+ avs->path_viewflag |= MOTIONPATH_VIEW_KFRAS;
+ if (arm->pathflag & ARM_PATH_KFNOS)
+ avs->path_viewflag |= MOTIONPATH_VIEW_KFNOS;
+
+ /* bake flags */
+ if (arm->pathflag & ARM_PATH_HEADS)
+ avs->path_bakeflag |= MOTIONPATH_BAKE_HEADS;
+
+ /* type */
+ if (arm->pathflag & ARM_PATH_ACFRA)
+ avs->path_type = MOTIONPATH_TYPE_ACFRA;
+
+ /* stepsize */
+ avs->path_step = arm->pathsize;
+ if (avs->path_step == 0)
+ avs->path_step = 1;
+ }
+ else
+ animviz_settings_init(&ob->pose->avs);
+ }
+ }
+
+ /* brush texture changes */
+ for (brush = main->brush.first; brush; brush = brush->id.next) {
+ default_mtex(&brush->mtex);
+ }
+
+ for (ma = main->mat.first; ma; ma = ma->id.next) {
+ if (ma->vol.ms_spread < 0.0001f) {
+ ma->vol.ms_spread = 0.2f;
+ ma->vol.ms_diff = 1.f;
+ ma->vol.ms_intensity = 1.f;
+ }
+ }
+ }
+
+ if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 13)) {
+ /* NOTE: if you do more conversion, be sure to do it outside of this and
+ * increase subversion again, otherwise it will not be correct */
+ Object *ob;
+
+ /* convert degrees to radians for internal use */
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ bPoseChannel *pchan;
+
+ do_version_constraints_radians_degrees_250(&ob->constraints);
+
+ if (ob->pose) {
+ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
+ pchan->limitmin[0] *= (float)(M_PI / 180.0);
+ pchan->limitmin[1] *= (float)(M_PI / 180.0);
+ pchan->limitmin[2] *= (float)(M_PI / 180.0);
+ pchan->limitmax[0] *= (float)(M_PI / 180.0);
+ pchan->limitmax[1] *= (float)(M_PI / 180.0);
+ pchan->limitmax[2] *= (float)(M_PI / 180.0);
+
+ do_version_constraints_radians_degrees_250(&pchan->constraints);
+ }
+ }
+ }
+ }
+
+ if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 14)) {
+ /* fix for bad View2D extents for Animation Editors */
+ bScreen *screen;
+ ScrArea *sa;
+ SpaceLink *sl;
+
+ for (screen = main->screen.first; screen; screen = screen->id.next) {
+ for (sa = screen->areabase.first; sa; sa = sa->next) {
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ ListBase *regionbase;
+ ARegion *ar;
+
+ if (sl == sa->spacedata.first)
+ regionbase = &sa->regionbase;
+ else
+ regionbase = &sl->regionbase;
+
+ if (ELEM(sl->spacetype, SPACE_ACTION, SPACE_NLA)) {
+ for (ar = (ARegion*) regionbase->first; ar; ar = ar->next) {
+ if (ar->regiontype == RGN_TYPE_WINDOW) {
+ ar->v2d.cur.ymax = ar->v2d.tot.ymax = 0.0f;
+ ar->v2d.cur.ymin = ar->v2d.tot.ymin = (float)(-sa->winy) / 3.0f;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 15)) {
+ World *wo;
+ Material *ma;
+
+ /* ambient default from 0.5f to 1.0f */
+ for (ma = main->mat.first; ma; ma = ma->id.next)
+ ma->amb *= 2.0f;
+
+ for (wo = main->world.first; wo; wo = wo->id.next) {
+ /* ao splitting into ao/env/indirect */
+ wo->ao_env_energy = wo->aoenergy;
+ wo->aoenergy = 1.0f;
+
+ if (wo->ao_indirect_bounces == 0)
+ wo->ao_indirect_bounces = 1;
+ else
+ wo->mode |= WO_INDIRECT_LIGHT;
+
+ if (wo->aomix == WO_AOSUB)
+ wo->ao_env_energy = -wo->ao_env_energy;
+ else if (wo->aomix == WO_AOADDSUB)
+ wo->mode |= WO_AMB_OCC;
+
+ wo->aomix = WO_AOMUL;
+
+ /* ambient default from 0.5f to 1.0f */
+ mul_v3_fl(&wo->ambr, 0.5f);
+ wo->ao_env_energy *= 0.5f;
+ }
+ }
+
+ if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 17)) {
+ Scene *sce;
+ Sequence *seq;
+ Material *ma;
+
+ /* initialize to sane default so toggling on border shows something */
+ for (sce = main->scene.first; sce; sce = sce->id.next) {
+ if (sce->r.border.xmin == 0.0f && sce->r.border.ymin == 0.0f &&
+ sce->r.border.xmax == 0.0f && sce->r.border.ymax == 0.0f)
+ {
+ sce->r.border.xmin = 0.0f;
+ sce->r.border.ymin = 0.0f;
+ sce->r.border.xmax = 1.0f;
+ sce->r.border.ymax = 1.0f;
+ }
+
+ if ((sce->r.ffcodecdata.flags & FFMPEG_MULTIPLEX_AUDIO) == 0)
+ sce->r.ffcodecdata.audio_codec = 0x0; // CODEC_ID_NONE
+
+ SEQ_BEGIN (sce->ed, seq)
+ {
+ seq->volume = 1.0f;
+ }
+ SEQ_END
+ }
+
+ /* particle brush strength factor was changed from int to float */
+ for (sce = main->scene.first; sce; sce = sce->id.next) {
+ ParticleEditSettings *pset = &sce->toolsettings->particle;
+ int a;
+
+ for (a = 0; a < PE_TOT_BRUSH; a++)
+ pset->brush[a].strength /= 100.0f;
+ }
+
+ for (ma = main->mat.first; ma; ma = ma->id.next)
+ if (ma->mode & MA_TRACEBLE)
+ ma->shade_flag |= MA_APPROX_OCCLUSION;
+
+ /* sequencer changes */
+ {
+ bScreen *screen;
+ ScrArea *sa;
+ SpaceLink *sl;
+
+ for (screen = main->screen.first; screen; screen = screen->id.next) {
+ for (sa = screen->areabase.first; sa; sa = sa->next) {
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_SEQ) {
+ ARegion *ar_preview;
+ ListBase *regionbase;
+
+ if (sl == sa->spacedata.first) {
+ regionbase = &sa->regionbase;
+ }
+ else {
+ regionbase = &sl->regionbase;
+ }
+
+ ar_preview = (ARegion*) regionbase->first;
+ for (; ar_preview; ar_preview = ar_preview->next) {
+ if (ar_preview->regiontype == RGN_TYPE_PREVIEW)
+ break;
+ }
+ if (ar_preview && (ar_preview->regiontype == RGN_TYPE_PREVIEW)) {
+ sequencer_init_preview_region(ar_preview);
+ }
+ }
+ }
+ }
+ }
+ } /* sequencer changes */
+ }
+
+ if (main->versionfile <= 251) { /* 2.5.1 had no subversions */
+ bScreen *sc;
+
+ /* Blender 2.5.2 - subversion 0 introduced a new setting: V3D_RENDER_OVERRIDE.
+ * This bit was used in the past for V3D_TRANSFORM_SNAP, which is now deprecated.
+ * Here we clear it for old files so they don't come in with V3D_RENDER_OVERRIDE set,
+ * which would cause cameras, lamps, etc to become invisible */
+ for (sc = main->screen.first; sc; sc = sc->id.next) {
+ ScrArea *sa;
+ for (sa = sc->areabase.first; sa; sa = sa->next) {
+ SpaceLink *sl;
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_VIEW3D) {
+ View3D* v3d = (View3D *)sl;
+ v3d->flag2 &= ~V3D_RENDER_OVERRIDE;
+ }
+ }
+ }
+ }
+ }
+
+ if (main->versionfile < 252 || (main->versionfile == 252 && main->subversionfile < 1)) {
+ Brush *brush;
+ Object *ob;
+ Scene *scene;
+ bNodeTree *ntree;
+
+ for (brush = main->brush.first; brush; brush = brush->id.next) {
+ if (brush->curve)
+ brush->curve->preset = CURVE_PRESET_SMOOTH;
+ }
+
+ /* properly initialize active flag for fluidsim modifiers */
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ ModifierData *md;
+ for (md = ob->modifiers.first; md; md = md->next) {
+ if (md->type == eModifierType_Fluidsim) {
+ FluidsimModifierData *fmd = (FluidsimModifierData *) md;
+ fmd->fss->flag |= OB_FLUIDSIM_ACTIVE;
+ fmd->fss->flag |= OB_FLUIDSIM_OVERRIDE_TIME;
+ }
+ }
+ }
+
+ /* adjustment to color balance node values */
+ for (scene = main->scene.first; scene; scene = scene->id.next) {
+ if (scene->nodetree) {
+ bNode *node = scene->nodetree->nodes.first;
+
+ while (node) {
+ if (node->type == CMP_NODE_COLORBALANCE) {
+ NodeColorBalance *n = (NodeColorBalance *) node->storage;
+ n->lift[0] += 1.f;
+ n->lift[1] += 1.f;
+ n->lift[2] += 1.f;
+ }
+ node = node->next;
+ }
+ }
+ }
+ /* check inside node groups too */
+ for (ntree = main->nodetree.first; ntree; ntree = ntree->id.next) {
+ bNode *node = ntree->nodes.first;
+
+ while (node) {
+ if (node->type == CMP_NODE_COLORBALANCE) {
+ NodeColorBalance *n = (NodeColorBalance *) node->storage;
+ n->lift[0] += 1.f;
+ n->lift[1] += 1.f;
+ n->lift[2] += 1.f;
+ }
+
+ node = node->next;
+ }
+ }
+ }
+
+ /* old-track -> constraints (this time we're really doing it!) */
+ if (main->versionfile < 252 || (main->versionfile == 252 && main->subversionfile < 2)) {
+ Object *ob;
+
+ for (ob = main->object.first; ob; ob = ob->id.next)
+ blo_do_version_old_trackto_to_constraints(ob);
+ }
+
+ if (main->versionfile < 252 || (main->versionfile == 252 && main->subversionfile < 5)) {
+ bScreen *sc;
+
+ /* Image editor scopes */
+ for (sc = main->screen.first; sc; sc = sc->id.next) {
+ ScrArea *sa;
+
+ for (sa = sc->areabase.first; sa; sa = sa->next) {
+ SpaceLink *sl;
+
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_IMAGE) {
+ SpaceImage *sima = (SpaceImage *) sl;
+ scopes_new(&sima->scopes);
+ }
+ }
+ }
+ }
+ }
+
+ if (main->versionfile < 253) {
+ Object *ob;
+ Scene *scene;
+ bScreen *sc;
+ Tex *tex;
+ Brush *brush;
+
+ for (sc = main->screen.first; sc; sc = sc->id.next) {
+ ScrArea *sa;
+ for (sa = sc->areabase.first; sa; sa = sa->next) {
+ SpaceLink *sl;
+
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_NODE) {
+ SpaceNode *snode = (SpaceNode *) sl;
+ ListBase *regionbase;
+ ARegion *ar;
+
+ if (sl == sa->spacedata.first)
+ regionbase = &sa->regionbase;
+ else
+ regionbase = &sl->regionbase;
+
+ if (snode->v2d.minzoom > 0.09f)
+ snode->v2d.minzoom = 0.09f;
+ if (snode->v2d.maxzoom < 2.31f)
+ snode->v2d.maxzoom = 2.31f;
+
+ for (ar = regionbase->first; ar; ar = ar->next) {
+ if (ar->regiontype == RGN_TYPE_WINDOW) {
+ if (ar->v2d.minzoom > 0.09f)
+ ar->v2d.minzoom = 0.09f;
+ if (ar->v2d.maxzoom < 2.31f)
+ ar->v2d.maxzoom = 2.31f;
+ }
+ }
+ }
+ else if (sl->spacetype == SPACE_TIME) {
+ SpaceTime *stime = (SpaceTime *) sl;
+
+ /* enable all cache display */
+ stime->cache_display |= TIME_CACHE_DISPLAY;
+ stime->cache_display |= (TIME_CACHE_SOFTBODY|TIME_CACHE_PARTICLES);
+ stime->cache_display |= (TIME_CACHE_CLOTH|TIME_CACHE_SMOKE|TIME_CACHE_DYNAMICPAINT);
+ }
+ }
+ }
+ }
+
+ do_version_mdef_250(main);
+
+ /* parent type to modifier */
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ if (ob->parent) {
+ Object *parent = (Object *) blo_do_versions_newlibadr(fd, lib, ob->parent);
+ if (parent) { /* parent may not be in group */
+ if (parent->type == OB_ARMATURE && ob->partype == PARSKEL) {
+ ArmatureModifierData *amd;
+ bArmature *arm = (bArmature *) blo_do_versions_newlibadr(fd, lib, parent->data);
+
+ amd = (ArmatureModifierData*) modifier_new(eModifierType_Armature);
+ amd->object = ob->parent;
+ BLI_addtail((ListBase*)&ob->modifiers, amd);
+ amd->deformflag = arm->deformflag;
+ ob->partype = PAROBJECT;
+ }
+ else if (parent->type == OB_LATTICE && ob->partype == PARSKEL) {
+ LatticeModifierData *lmd;
+
+ lmd = (LatticeModifierData*) modifier_new(eModifierType_Lattice);
+ lmd->object = ob->parent;
+ BLI_addtail((ListBase*)&ob->modifiers, lmd);
+ ob->partype = PAROBJECT;
+ }
+ else if (parent->type == OB_CURVE && ob->partype == PARCURVE) {
+ CurveModifierData *cmd;
+
+ cmd = (CurveModifierData*) modifier_new(eModifierType_Curve);
+ cmd->object = ob->parent;
+ BLI_addtail((ListBase*)&ob->modifiers, cmd);
+ ob->partype = PAROBJECT;
+ }
+ }
+ }
+ }
+
+ /* initialize scene active layer */
+ for (scene = main->scene.first; scene; scene = scene->id.next) {
+ int i;
+ for (i = 0; i < 20; i++) {
+ if (scene->lay & (1<<i)) {
+ scene->layact = 1<<i;
+ break;
+ }
+ }
+ }
+
+ for (tex = main->tex.first; tex; tex = tex->id.next) {
+ /* if youre picky, this isn't correct until we do a version bump
+ * since you could set saturation to be 0.0*/
+ if (tex->saturation == 0.0f)
+ tex->saturation = 1.0f;
+ }
+
+ {
+ Curve *cu;
+ for (cu = main->curve.first; cu; cu = cu->id.next) {
+ cu->smallcaps_scale = 0.75f;
+ }
+ }
+
+ for (scene = main->scene.first; scene; scene = scene->id.next) {
+ if (scene) {
+ Sequence *seq;
+ SEQ_BEGIN (scene->ed, seq)
+ {
+ if (seq->sat == 0.0f) {
+ seq->sat = 1.0f;
+ }
+ }
+ SEQ_END
+ }
+ }
+
+ /* GSOC 2010 Sculpt - New settings for Brush */
+
+ for (brush = main->brush.first; brush; brush = brush->id.next) {
+ /* Sanity Check */
+
+ /* infinite number of dabs */
+ if (brush->spacing == 0)
+ brush->spacing = 10;
+
+ /* will have no effect */
+ if (brush->alpha == 0)
+ brush->alpha = 0.5f;
+
+ /* bad radius */
+ if (brush->unprojected_radius == 0)
+ brush->unprojected_radius = 0.125f;
+
+ /* unusable size */
+ if (brush->size == 0)
+ brush->size = 35;
+
+ /* can't see overlay */
+ if (brush->texture_overlay_alpha == 0)
+ brush->texture_overlay_alpha = 33;
+
+ /* same as draw brush */
+ if (brush->crease_pinch_factor == 0)
+ brush->crease_pinch_factor = 0.5f;
+
+ /* will sculpt no vertexes */
+ if (brush->plane_trim == 0)
+ brush->plane_trim = 0.5f;
+
+ /* same as smooth stroke off */
+ if (brush->smooth_stroke_radius == 0)
+ brush->smooth_stroke_radius = 75;
+
+ /* will keep cursor in one spot */
+ if (brush->smooth_stroke_radius == 1)
+ brush->smooth_stroke_factor = 0.9f;
+
+ /* same as dots */
+ if (brush->rate == 0)
+ brush->rate = 0.1f;
+
+ /* New Settings */
+ if (main->versionfile < 252 || (main->versionfile == 252 && main->subversionfile < 5)) {
+ brush->flag |= BRUSH_SPACE_ATTEN; // explicitly enable adaptive space
+
+ /* spacing was originally in pixels, convert it to percentage for new version
+ * size should not be zero due to sanity check above
+ */
+ brush->spacing = (int)(100 * ((float)brush->spacing) / ((float) brush->size));
+
+ if (brush->add_col[0] == 0 &&
+ brush->add_col[1] == 0 &&
+ brush->add_col[2] == 0)
+ {
+ brush->add_col[0] = 1.00f;
+ brush->add_col[1] = 0.39f;
+ brush->add_col[2] = 0.39f;
+ }
+
+ if (brush->sub_col[0] == 0 &&
+ brush->sub_col[1] == 0 &&
+ brush->sub_col[2] == 0)
+ {
+ brush->sub_col[0] = 0.39f;
+ brush->sub_col[1] = 0.39f;
+ brush->sub_col[2] = 1.00f;
+ }
+ }
+ }
+ }
+
+ /* GSOC Sculpt 2010 - Sanity check on Sculpt/Paint settings */
+ if (main->versionfile < 253) {
+ Scene *sce;
+ for (sce = main->scene.first; sce; sce = sce->id.next) {
+ if (sce->toolsettings->sculpt_paint_unified_alpha == 0)
+ sce->toolsettings->sculpt_paint_unified_alpha = 0.5f;
+
+ if (sce->toolsettings->sculpt_paint_unified_unprojected_radius == 0)
+ sce->toolsettings->sculpt_paint_unified_unprojected_radius = 0.125f;
+
+ if (sce->toolsettings->sculpt_paint_unified_size == 0)
+ sce->toolsettings->sculpt_paint_unified_size = 35;
+ }
+ }
+
+ if (main->versionfile < 253 || (main->versionfile == 253 && main->subversionfile < 1)) {
+ Object *ob;
+
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ ModifierData *md;
+
+ for (md = ob->modifiers.first; md; md = md->next) {
+ if (md->type == eModifierType_Smoke) {
+ SmokeModifierData *smd = (SmokeModifierData *)md;
+
+ if ((smd->type & MOD_SMOKE_TYPE_DOMAIN) && smd->domain) {
+ smd->domain->vorticity = 2.0f;
+ smd->domain->time_scale = 1.0f;
+
+ if (!(smd->domain->flags & (1<<4)))
+ continue;
+
+ /* delete old MOD_SMOKE_INITVELOCITY flag */
+ smd->domain->flags &= ~(1<<4);
+
+ /* for now just add it to all flow objects in the scene */
+ {
+ Object *ob2;
+ for (ob2 = main->object.first; ob2; ob2 = ob2->id.next) {
+ ModifierData *md2;
+ for (md2 = ob2->modifiers.first; md2; md2 = md2->next) {
+ if (md2->type == eModifierType_Smoke) {
+ SmokeModifierData *smd2 = (SmokeModifierData *)md2;
+
+ if ((smd2->type & MOD_SMOKE_TYPE_FLOW) && smd2->flow) {
+ smd2->flow->flags |= MOD_SMOKE_FLOW_INITVELOCITY;
+ }
+ }
+ }
+ }
+ }
+
+ }
+ else if ((smd->type & MOD_SMOKE_TYPE_FLOW) && smd->flow) {
+ smd->flow->vel_multi = 1.0f;
+ }
+ }
+ }
+ }
+ }
+
+ if (main->versionfile < 255 || (main->versionfile == 255 && main->subversionfile < 1)) {
+ Brush *br;
+ ParticleSettings *part;
+ bScreen *sc;
+ Object *ob;
+
+ for (br = main->brush.first; br; br = br->id.next) {
+ if (br->ob_mode == 0)
+ br->ob_mode = OB_MODE_ALL_PAINT;
+ }
+
+ for (part = main->particle.first; part; part = part->id.next) {
+ if (part->boids)
+ part->boids->pitch = 1.0f;
+
+ part->flag &= ~PART_HAIR_REGROW; /* this was a deprecated flag before */
+ part->kink_amp_clump = 1.f; /* keep old files looking similar */
+ }
+
+ for (sc = main->screen.first; sc; sc = sc->id.next) {
+ ScrArea *sa;
+ for (sa = sc->areabase.first; sa; sa = sa->next) {
+ SpaceLink *sl;
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_INFO) {
+ SpaceInfo *sinfo = (SpaceInfo *) sl;
+ ARegion *ar;
+
+ sinfo->rpt_mask = INFO_RPT_OP;
+
+ for (ar = sa->regionbase.first; ar; ar = ar->next) {
+ if (ar->regiontype == RGN_TYPE_WINDOW) {
+ ar->v2d.scroll = (V2D_SCROLL_RIGHT);
+ ar->v2d.align = V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_NEG_Y; /* align bottom left */
+ ar->v2d.keepofs = V2D_LOCKOFS_X;
+ ar->v2d.keepzoom = (V2D_LOCKZOOM_X|V2D_LOCKZOOM_Y|V2D_LIMITZOOM|V2D_KEEPASPECT);
+ ar->v2d.keeptot = V2D_KEEPTOT_BOUNDS;
+ ar->v2d.minzoom = ar->v2d.maxzoom = 1.0f;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /* fix rotation actuators for objects so they use real angles (radians)
+ * since before blender went opensource this strange scalar was used: (1 / 0.02) * 2 * math.pi/360 */
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ bActuator *act = ob->actuators.first;
+ while (act) {
+ if (act->type == ACT_OBJECT) {
+ /* multiply velocity with 50 in old files */
+ bObjectActuator *oa = act->data;
+ mul_v3_fl(oa->drot, 0.8726646259971648f);
+ }
+ act = act->next;
+ }
+ }
+ }
+
+ /* init facing axis property of steering actuators */
+ {
+ Object *ob;
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ bActuator *act;
+ for (act = ob->actuators.first; act; act = act->next) {
+ if (act->type == ACT_STEERING) {
+ bSteeringActuator* stact = act->data;
+ if (stact->facingaxis == 0) {
+ stact->facingaxis = 1;
+ }
+ }
+ }
+ }
+ }
+
+ if (main->versionfile < 255 || (main->versionfile == 255 && main->subversionfile < 3)) {
+ Object *ob;
+
+ /* ocean res is now squared, reset old ones - will be massive */
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ ModifierData *md;
+ for (md = ob->modifiers.first; md; md = md->next) {
+ if (md->type == eModifierType_Ocean) {
+ OceanModifierData *omd = (OceanModifierData *)md;
+ omd->resolution = 7;
+ omd->oceancache = NULL;
+ }
+ }
+ }
+ }
+
+ if (main->versionfile < 256) {
+ bScreen *sc;
+ ScrArea *sa;
+ Key *key;
+
+ /* Fix for sample line scope initializing with no height */
+ for (sc = main->screen.first; sc; sc = sc->id.next) {
+ sa = sc->areabase.first;
+ while (sa) {
+ SpaceLink *sl;
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_IMAGE) {
+ SpaceImage *sima = (SpaceImage *) sl;
+ if (sima->sample_line_hist.height == 0)
+ sima->sample_line_hist.height = 100;
+ }
+ }
+ sa = sa->next;
+ }
+ }
+
+ /* old files could have been saved with slidermin = slidermax = 0.0, but the UI in
+ * 2.4x would never reveal this to users as a dummy value always ended up getting used
+ * instead
+ */
+ for (key = main->key.first; key; key = key->id.next) {
+ KeyBlock *kb;
+
+ for (kb = key->block.first; kb; kb = kb->next) {
+ if (IS_EQF(kb->slidermin, kb->slidermax) && IS_EQ(kb->slidermax, 0))
+ kb->slidermax = kb->slidermin + 1.0f;
+ }
+ }
+ }
+
+ if (main->versionfile < 256 || (main->versionfile == 256 && main->subversionfile < 1)) {
+ /* fix for bones that didn't have arm_roll before */
+ bArmature *arm;
+ Bone *bone;
+ Object *ob;
+
+ for (arm = main->armature.first; arm; arm = arm->id.next)
+ for (bone = arm->bonebase.first; bone; bone = bone->next)
+ do_version_bone_roll_256(bone);
+
+ /* fix for objects which have zero dquat's
+ * since this is multiplied with the quat rather than added */
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ if (is_zero_v4(ob->dquat)) {
+ unit_qt(ob->dquat);
+ }
+ if (is_zero_v3(ob->drotAxis) && ob->drotAngle == 0.0f) {
+ unit_axis_angle(ob->drotAxis, &ob->drotAngle);
+ }
+ }
+ }
+
+ if (main->versionfile < 256 || (main->versionfile == 256 && main->subversionfile < 2)) {
+ bNodeTree *ntree;
+
+ /* node sockets are not exposed automatically any more,
+ * this mimics the old behavior by adding all unlinked sockets to groups.
+ */
+ for (ntree = main->nodetree.first; ntree; ntree = ntree->id.next) {
+ /* XXX Only setting a flag here. Actual adding of group sockets
+ * is done in lib_verify_nodetree, because at this point the internal
+ * nodes may not be up-to-date! (missing lib-link)
+ */
+ ntree->flag |= NTREE_DO_VERSIONS_GROUP_EXPOSE;
+ }
+ }
+
+ if (main->versionfile < 256 || (main->versionfile == 256 && main->subversionfile < 3)) {
+ bScreen *sc;
+ Brush *brush;
+ Object *ob;
+ ParticleSettings *part;
+ Material *mat;
+ int tex_nr, transp_tex;
+
+ for (mat = main->mat.first; mat; mat = mat->id.next) {
+ if (!(mat->mode & MA_TRANSP) && !(mat->material_type & MA_TYPE_VOLUME)) {
+ transp_tex = 0;
+
+ for (tex_nr = 0; tex_nr < MAX_MTEX; tex_nr++) {
+ if (!mat->mtex[tex_nr])
+ continue;
+ if (mat->mtex[tex_nr]->mapto & MAP_ALPHA)
+ transp_tex = 1;
+ }
+
+ /* weak! material alpha could be animated */
+ if (mat->alpha < 1.0f || mat->fresnel_tra > 0.0f || transp_tex) {
+ mat->mode |= MA_TRANSP;
+ mat->mode &= ~(MA_ZTRANSP|MA_RAYTRANSP);
+ }
+ }
+ }
+
+ /* redraws flag in SpaceTime has been moved to Screen level */
+ for (sc = main->screen.first; sc; sc = sc->id.next) {
+ if (sc->redraws_flag == 0) {
+ /* just initialize to default? */
+ // XXX: we could also have iterated through areas, and taken them from the first timeline available...
+ sc->redraws_flag = TIME_ALL_3D_WIN|TIME_ALL_ANIM_WIN;
+ }
+ }
+
+ for (brush = main->brush.first; brush; brush = brush->id.next) {
+ if (brush->height == 0)
+ brush->height = 0.4f;
+ }
+
+ /* replace 'rim material' option for in offset*/
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ ModifierData *md;
+ for (md = ob->modifiers.first; md; md = md->next) {
+ if (md->type == eModifierType_Solidify) {
+ SolidifyModifierData *smd = (SolidifyModifierData *) md;
+ if (smd->flag & MOD_SOLIDIFY_RIM_MATERIAL) {
+ smd->mat_ofs_rim = 1;
+ smd->flag &= ~MOD_SOLIDIFY_RIM_MATERIAL;
+ }
+ }
+ }
+ }
+
+ /* particle draw color from material */
+ for (part = main->particle.first; part; part = part->id.next) {
+ if (part->draw & PART_DRAW_MAT_COL)
+ part->draw_col = PART_DRAW_COL_MAT;
+ }
+ }
+
+ if (main->versionfile < 256 || (main->versionfile == 256 && main->subversionfile < 6)) {
+ Mesh *me;
+
+ for (me = main->mesh.first; me; me = me->id.next)
+ BKE_mesh_calc_normals_tessface(me->mvert, me->totvert, me->mface, me->totface, NULL);
+ }
+
+ if (main->versionfile < 256 || (main->versionfile == 256 && main->subversionfile < 2)) {
+ /* update blur area sizes from 0..1 range to 0..100 percentage */
+ Scene *scene;
+ bNode *node;
+ for (scene = main->scene.first; scene; scene = scene->id.next)
+ if (scene->nodetree)
+ for (node = scene->nodetree->nodes.first; node; node = node->next)
+ if (node->type == CMP_NODE_BLUR) {
+ NodeBlurData *nbd = node->storage;
+ nbd->percentx *= 100.0f;
+ nbd->percenty *= 100.0f;
+ }
+ }
+
+ if (main->versionfile < 258 || (main->versionfile == 258 && main->subversionfile < 1)) {
+ /* screen view2d settings were not properly initialized [#27164]
+ * v2d->scroll caused the bug but best reset other values too which are in old blend files only.
+ * need to make less ugly - possibly an iterator? */
+ bScreen *screen;
+
+ for (screen = main->screen.first; screen; screen = screen->id.next) {
+ ScrArea *sa;
+ /* add regions */
+ for (sa = screen->areabase.first; sa; sa = sa->next) {
+ SpaceLink *sl = sa->spacedata.first;
+ if (sl->spacetype == SPACE_IMAGE) {
+ ARegion *ar;
+ for (ar = sa->regionbase.first; ar; ar = ar->next) {
+ if (ar->regiontype == RGN_TYPE_WINDOW) {
+ View2D *v2d = &ar->v2d;
+ v2d->minzoom = v2d->maxzoom = v2d->scroll = v2d->keeptot = v2d->keepzoom = v2d->keepofs = v2d->align = 0;
+ }
+ }
+ }
+
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_IMAGE) {
+ ARegion *ar;
+ for (ar = sl->regionbase.first; ar; ar = ar->next) {
+ if (ar->regiontype == RGN_TYPE_WINDOW) {
+ View2D *v2d = &ar->v2d;
+ v2d->minzoom = v2d->maxzoom = v2d->scroll = v2d->keeptot = v2d->keepzoom = v2d->keepofs = v2d->align = 0;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ {
+ /* Initialize texture point density curve falloff */
+ Tex *tex;
+ for (tex = main->tex.first; tex; tex = tex->id.next) {
+ if (tex->pd) {
+ if (tex->pd->falloff_speed_scale == 0.0f)
+ tex->pd->falloff_speed_scale = 100.0f;
+
+ if (!tex->pd->falloff_curve) {
+ tex->pd->falloff_curve = curvemapping_add(1, 0, 0, 1, 1);
+
+ tex->pd->falloff_curve->preset = CURVE_PRESET_LINE;
+ tex->pd->falloff_curve->cm->flag &= ~CUMA_EXTEND_EXTRAPOLATE;
+ curvemap_reset(tex->pd->falloff_curve->cm, &tex->pd->falloff_curve->clipr, tex->pd->falloff_curve->preset, CURVEMAP_SLOPE_POSITIVE);
+ curvemapping_changed(tex->pd->falloff_curve, 0);
+ }
+ }
+ }
+ }
+
+ {
+ /* add default value for behind strength of camera actuator */
+ Object *ob;
+ bActuator *act;
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ for (act = ob->actuators.first; act; act = act->next) {
+ if (act->type == ACT_CAMERA) {
+ bCameraActuator *ba = act->data;
+
+ ba->damping = 1.0/32.0;
+ }
+ }
+ }
+ }
+
+ {
+ ParticleSettings *part;
+ for (part = main->particle.first; part; part = part->id.next) {
+ /* Initialize particle billboard scale */
+ part->bb_size[0] = part->bb_size[1] = 1.0f;
+ }
+ }
+ }
+
+ if (main->versionfile < 259 || (main->versionfile == 259 && main->subversionfile < 1)) {
+ {
+ Scene *scene;
+ Sequence *seq;
+
+ for (scene = main->scene.first; scene; scene = scene->id.next) {
+ scene->r.ffcodecdata.audio_channels = 2;
+ scene->audio.volume = 1.0f;
+ SEQ_BEGIN (scene->ed, seq)
+ {
+ seq->pitch = 1.0f;
+ }
+ SEQ_END
+ }
+ }
+
+ {
+ bScreen *screen;
+ for (screen = main->screen.first; screen; screen = screen->id.next) {
+ ScrArea *sa;
+
+ /* add regions */
+ for (sa = screen->areabase.first; sa; sa = sa->next) {
+ SpaceLink *sl = sa->spacedata.first;
+ if (sl->spacetype == SPACE_SEQ) {
+ ARegion *ar;
+ for (ar = sa->regionbase.first; ar; ar = ar->next) {
+ if (ar->regiontype == RGN_TYPE_WINDOW) {
+ if (ar->v2d.min[1] == 4.0f)
+ ar->v2d.min[1] = 0.5f;
+ }
+ }
+ }
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_SEQ) {
+ ARegion *ar;
+ for (ar = sl->regionbase.first; ar; ar = ar->next) {
+ if (ar->regiontype == RGN_TYPE_WINDOW) {
+ if (ar->v2d.min[1] == 4.0f)
+ ar->v2d.min[1] = 0.5f;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ {
+ /* Make "auto-clamped" handles a per-keyframe setting instead of per-FCurve
+ *
+ * We're only patching F-Curves in Actions here, since it is assumed that most
+ * drivers out there won't be using this (and if they are, they're in the minority).
+ * While we should aim to fix everything ideally, in practice it's far too hard
+ * to get to every animdata block, not to mention the performance hit that'd have
+ */
+ bAction *act;
+ FCurve *fcu;
+
+ for (act = main->action.first; act; act = act->id.next) {
+ for (fcu = act->curves.first; fcu; fcu = fcu->next) {
+ BezTriple *bezt;
+ unsigned int i = 0;
+
+ /* only need to touch curves that had this flag set */
+ if ((fcu->flag & FCURVE_AUTO_HANDLES) == 0)
+ continue;
+ if ((fcu->totvert == 0) || (fcu->bezt == NULL))
+ continue;
+
+ /* only change auto-handles to auto-clamped */
+ for (bezt = fcu->bezt; i < fcu->totvert; i++, bezt++) {
+ if (bezt->h1 == HD_AUTO)
+ bezt->h1 = HD_AUTO_ANIM;
+ if (bezt->h2 == HD_AUTO)
+ bezt->h2 = HD_AUTO_ANIM;
+ }
+
+ fcu->flag &= ~FCURVE_AUTO_HANDLES;
+ }
+ }
+ }
+
+ {
+ /* convert fcurve and shape action actuators to action actuators */
+ Object *ob;
+ bActuator *act;
+ bIpoActuator *ia;
+ bActionActuator *aa;
+
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ for (act = ob->actuators.first; act; act = act->next) {
+ if (act->type == ACT_IPO) {
+ // Create the new actuator
+ ia = act->data;
+ aa = MEM_callocN(sizeof(bActionActuator), "fcurve -> action actuator do_version");
+
+ // Copy values
+ aa->type = ia->type;
+ aa->flag = ia->flag;
+ aa->sta = ia->sta;
+ aa->end = ia->end;
+ BLI_strncpy(aa->name, ia->name, sizeof(aa->name));
+ BLI_strncpy(aa->frameProp, ia->frameProp, sizeof(aa->frameProp));
+ if (ob->adt)
+ aa->act = ob->adt->action;
+
+ // Get rid of the old actuator
+ MEM_freeN(ia);
+
+ // Assign the new actuator
+ act->data = aa;
+ act->type = act->otype = ACT_ACTION;
+ }
+ else if (act->type == ACT_SHAPEACTION) {
+ act->type = act->otype = ACT_ACTION;
+ }
+ }
+ }
+ }
+ }
+
+ if (main->versionfile < 259 || (main->versionfile == 259 && main->subversionfile < 2)) {
+ {
+ /* Convert default socket values from bNodeStack */
+ Scene *sce;
+ Material *mat;
+ Tex *tex;
+ bNodeTree *ntree;
+
+ for (ntree = main->nodetree.first; ntree; ntree = ntree->id.next) {
+ blo_do_versions_nodetree_default_value(ntree);
+ ntree->update |= NTREE_UPDATE;
+ }
+
+ for (sce = main->scene.first; sce; sce = sce->id.next)
+ if (sce->nodetree) {
+ blo_do_versions_nodetree_default_value(sce->nodetree);
+ sce->nodetree->update |= NTREE_UPDATE;
+ }
+
+ for (mat = main->mat.first; mat; mat = mat->id.next)
+ if (mat->nodetree) {
+ blo_do_versions_nodetree_default_value(mat->nodetree);
+ mat->nodetree->update |= NTREE_UPDATE;
+ }
+
+ for (tex = main->tex.first; tex; tex = tex->id.next)
+ if (tex->nodetree) {
+ blo_do_versions_nodetree_default_value(tex->nodetree);
+ tex->nodetree->update |= NTREE_UPDATE;
+ }
+ }
+
+ /* add SOCK_DYNAMIC flag to existing group sockets */
+ {
+ bNodeTree *ntree;
+ /* only need to do this for trees in main, local trees are not used as groups */
+ for (ntree = main->nodetree.first; ntree; ntree = ntree->id.next) {
+ do_versions_nodetree_dynamic_sockets(ntree);
+ ntree->update |= NTREE_UPDATE;
+ }
+ }
+
+ {
+ /* Initialize group tree nodetypes.
+ * These are used to distinguish tree types and
+ * associate them with specific node types for polling.
+ */
+ bNodeTree *ntree;
+ /* all node trees in main->nodetree are considered groups */
+ for (ntree = main->nodetree.first; ntree; ntree = ntree->id.next)
+ ntree->nodetype = NODE_GROUP;
+ }
+ }
+
+ if (main->versionfile < 259 || (main->versionfile == 259 && main->subversionfile < 4)) {
+ {
+ /* Adaptive time step for particle systems */
+ ParticleSettings *part;
+ for (part = main->particle.first; part; part = part->id.next) {
+ part->courant_target = 0.2f;
+ part->time_flag &= ~PART_TIME_AUTOSF;
+ }
+ }
+
+ {
+ /* set defaults for obstacle avoidance, recast data */
+ Scene *sce;
+ for (sce = main->scene.first; sce; sce = sce->id.next) {
+ if (sce->gm.levelHeight == 0.f)
+ sce->gm.levelHeight = 2.f;
+
+ if (sce->gm.recastData.cellsize == 0.0f)
+ sce->gm.recastData.cellsize = 0.3f;
+ if (sce->gm.recastData.cellheight == 0.0f)
+ sce->gm.recastData.cellheight = 0.2f;
+ if (sce->gm.recastData.agentmaxslope == 0.0f)
+ sce->gm.recastData.agentmaxslope = (float)M_PI/4;
+ if (sce->gm.recastData.agentmaxclimb == 0.0f)
+ sce->gm.recastData.agentmaxclimb = 0.9f;
+ if (sce->gm.recastData.agentheight == 0.0f)
+ sce->gm.recastData.agentheight = 2.0f;
+ if (sce->gm.recastData.agentradius == 0.0f)
+ sce->gm.recastData.agentradius = 0.6f;
+ if (sce->gm.recastData.edgemaxlen == 0.0f)
+ sce->gm.recastData.edgemaxlen = 12.0f;
+ if (sce->gm.recastData.edgemaxerror == 0.0f)
+ sce->gm.recastData.edgemaxerror = 1.3f;
+ if (sce->gm.recastData.regionminsize == 0.0f)
+ sce->gm.recastData.regionminsize = 8.f;
+ if (sce->gm.recastData.regionmergesize == 0.0f)
+ sce->gm.recastData.regionmergesize = 20.f;
+ if (sce->gm.recastData.vertsperpoly<3)
+ sce->gm.recastData.vertsperpoly = 6;
+ if (sce->gm.recastData.detailsampledist == 0.0f)
+ sce->gm.recastData.detailsampledist = 6.0f;
+ if (sce->gm.recastData.detailsamplemaxerror == 0.0f)
+ sce->gm.recastData.detailsamplemaxerror = 1.0f;
+ }
+ }
+ }
+}
diff --git a/source/blender/blenloader/intern/versioning_legacy.c b/source/blender/blenloader/intern/versioning_legacy.c
new file mode 100644
index 00000000000..2f7ff055b91
--- /dev/null
+++ b/source/blender/blenloader/intern/versioning_legacy.c
@@ -0,0 +1,3656 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ *
+ * Contributor(s): Blender Foundation
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ *
+ */
+
+/** \file blender/blenloader/intern/versioning_legacy.c
+ * \ingroup blenloader
+ */
+
+
+#include "zlib.h"
+
+#include <limits.h>
+
+#ifndef WIN32
+# include <unistd.h> // for read close
+#else
+# include <io.h> // for open close read
+# include "winsock2.h"
+# include "BLI_winstuff.h"
+#endif
+
+/* allow readfile to use deprecated functionality */
+#define DNA_DEPRECATED_ALLOW
+
+#include "DNA_armature_types.h"
+#include "DNA_actuator_types.h"
+#include "DNA_camera_types.h"
+#include "DNA_constraint_types.h"
+#include "DNA_effect_types.h"
+#include "DNA_group_types.h"
+#include "DNA_key_types.h"
+#include "DNA_lattice_types.h"
+#include "DNA_lamp_types.h"
+#include "DNA_material_types.h"
+#include "DNA_mesh_types.h"
+#include "DNA_meshdata_types.h"
+#include "DNA_nla_types.h"
+#include "DNA_node_types.h"
+#include "DNA_object_fluidsim.h" // NT
+#include "DNA_object_types.h"
+#include "DNA_property_types.h"
+#include "DNA_view3d_types.h"
+#include "DNA_screen_types.h"
+#include "DNA_sensor_types.h"
+#include "DNA_sdna_types.h"
+#include "DNA_sequence_types.h"
+#include "DNA_sound_types.h"
+#include "DNA_space_types.h"
+#include "DNA_vfont_types.h"
+#include "DNA_world_types.h"
+
+#include "MEM_guardedalloc.h"
+
+#include "BLI_utildefines.h"
+#include "BLI_blenlib.h"
+#include "BLI_math.h"
+#include "BLI_edgehash.h"
+
+#include "BKE_armature.h"
+#include "BKE_colortools.h"
+#include "BKE_constraint.h"
+#include "BKE_deform.h"
+#include "BKE_fcurve.h"
+#include "BKE_global.h" // for G
+#include "BKE_image.h"
+#include "BKE_lattice.h"
+#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_property.h" // for get_ob_property
+#include "BKE_scene.h"
+#include "BKE_sequencer.h"
+#include "BKE_utildefines.h" // SWITCH_INT DATA ENDB DNA1 O_BINARY GLOB USER TEST REND
+
+#include "IMB_imbuf.h" // for proxy / timecode versioning stuff
+
+#include "NOD_socket.h"
+
+#include "BLO_readfile.h"
+#include "BLO_undofile.h"
+
+#include "RE_engine.h"
+
+#include "readfile.h"
+
+#include "PIL_time.h"
+
+#include <errno.h>
+
+static void vcol_to_fcol(Mesh *me)
+{
+ MFace *mface;
+ unsigned int *mcol, *mcoln, *mcolmain;
+ int a;
+
+ if (me->totface == 0 || me->mcol == NULL)
+ return;
+
+ mcoln = mcolmain = MEM_mallocN(4*sizeof(int)*me->totface, "mcoln");
+ mcol = (unsigned int *)me->mcol;
+ mface = me->mface;
+ for (a = me->totface; a > 0; a--, mface++) {
+ mcoln[0] = mcol[mface->v1];
+ mcoln[1] = mcol[mface->v2];
+ mcoln[2] = mcol[mface->v3];
+ mcoln[3] = mcol[mface->v4];
+ mcoln += 4;
+ }
+
+ MEM_freeN(me->mcol);
+ me->mcol = (MCol *)mcolmain;
+}
+
+static int map_223_keybd_code_to_224_keybd_code(int code)
+{
+ switch (code) {
+ case 312:
+ return 311; /* F12KEY */
+ case 159:
+ return 161; /* PADSLASHKEY */
+ case 161:
+ return 150; /* PAD0 */
+ case 154:
+ return 151; /* PAD1 */
+ case 150:
+ return 152; /* PAD2 */
+ case 155:
+ return 153; /* PAD3 */
+ case 151:
+ return 154; /* PAD4 */
+ case 156:
+ return 155; /* PAD5 */
+ case 152:
+ return 156; /* PAD6 */
+ case 157:
+ return 157; /* PAD7 */
+ case 153:
+ return 158; /* PAD8 */
+ case 158:
+ return 159; /* PAD9 */
+ default:
+ return code;
+ }
+}
+
+static void do_version_bone_head_tail_237(Bone *bone)
+{
+ Bone *child;
+ float vec[3];
+
+ /* head */
+ copy_v3_v3(bone->arm_head, bone->arm_mat[3]);
+
+ /* tail is in current local coord system */
+ copy_v3_v3(vec, bone->arm_mat[1]);
+ mul_v3_fl(vec, bone->length);
+ add_v3_v3v3(bone->arm_tail, bone->arm_head, vec);
+
+ for (child = bone->childbase.first; child; child = child->next)
+ do_version_bone_head_tail_237(child);
+}
+
+static void bone_version_238(ListBase *lb)
+{
+ Bone *bone;
+
+ for (bone = lb->first; bone; bone = bone->next) {
+ if (bone->rad_tail == 0.0f && bone->rad_head == 0.0f) {
+ bone->rad_head = 0.25f*bone->length;
+ bone->rad_tail = 0.1f*bone->length;
+
+ bone->dist-= bone->rad_head;
+ if (bone->dist<=0.0f)
+ bone->dist = 0.0f;
+ }
+ bone_version_238(&bone->childbase);
+ }
+}
+
+static void bone_version_239(ListBase *lb)
+{
+ Bone *bone;
+
+ for (bone = lb->first; bone; bone = bone->next) {
+ if (bone->layer == 0)
+ bone->layer = 1;
+ bone_version_239(&bone->childbase);
+ }
+}
+
+static void ntree_version_241(bNodeTree *ntree)
+{
+ bNode *node;
+
+ if (ntree->type == NTREE_COMPOSIT) {
+ for (node = ntree->nodes.first; node; node = node->next) {
+ if (node->type == CMP_NODE_BLUR) {
+ if (node->storage == NULL) {
+ NodeBlurData *nbd = MEM_callocN(sizeof(NodeBlurData), "node blur patch");
+ nbd->sizex = node->custom1;
+ nbd->sizey = node->custom2;
+ nbd->filtertype = R_FILTER_QUAD;
+ node->storage = nbd;
+ }
+ }
+ else if (node->type == CMP_NODE_VECBLUR) {
+ if (node->storage == NULL) {
+ NodeBlurData *nbd = MEM_callocN(sizeof(NodeBlurData), "node blur patch");
+ nbd->samples = node->custom1;
+ nbd->maxspeed = node->custom2;
+ nbd->fac = 1.0f;
+ node->storage = nbd;
+ }
+ }
+ }
+ }
+}
+
+static void ntree_version_242(bNodeTree *ntree)
+{
+ bNode *node;
+
+ if (ntree->type == NTREE_COMPOSIT) {
+ for (node = ntree->nodes.first; node; node = node->next) {
+ if (node->type == CMP_NODE_HUE_SAT) {
+ if (node->storage) {
+ NodeHueSat *nhs = node->storage;
+ if (nhs->val == 0.0f)
+ nhs->val = 1.0f;
+ }
+ }
+ }
+ }
+ else if (ntree->type == NTREE_SHADER) {
+ for (node = ntree->nodes.first; node; node = node->next)
+ if (node->type == SH_NODE_GEOMETRY && node->storage == NULL)
+ node->storage = MEM_callocN(sizeof(NodeGeometry), "NodeGeometry");
+ }
+
+}
+
+static void ntree_version_245(FileData *fd, Library *lib, bNodeTree *ntree)
+{
+ bNode *node;
+ NodeTwoFloats *ntf;
+ ID *nodeid;
+ Image *image;
+ ImageUser *iuser;
+
+ if (ntree->type == NTREE_COMPOSIT) {
+ for (node = ntree->nodes.first; node; node = node->next) {
+ if (node->type == CMP_NODE_ALPHAOVER) {
+ if (!node->storage) {
+ ntf = MEM_callocN(sizeof(NodeTwoFloats), "NodeTwoFloats");
+ node->storage = ntf;
+ if (node->custom1)
+ ntf->x = 1.0f;
+ }
+ }
+
+ /* fix for temporary flag changes during 245 cycle */
+ nodeid = blo_do_versions_newlibadr(fd, lib, node->id);
+ if (node->storage && nodeid && GS(nodeid->name) == ID_IM) {
+ image = (Image*)nodeid;
+ iuser = node->storage;
+ if (iuser->flag & IMA_OLD_PREMUL) {
+ iuser->flag &= ~IMA_OLD_PREMUL;
+ iuser->flag |= IMA_DO_PREMUL;
+ }
+ if (iuser->flag & IMA_DO_PREMUL) {
+ image->flag &= ~IMA_OLD_PREMUL;
+ image->flag |= IMA_DO_PREMUL;
+ }
+ }
+ }
+ }
+}
+
+static void idproperties_fix_groups_lengths_recurse(IDProperty *prop)
+{
+ IDProperty *loop;
+ int i;
+
+ for (loop = prop->data.group.first, i = 0; loop; loop = loop->next, i++) {
+ if (loop->type == IDP_GROUP)
+ idproperties_fix_groups_lengths_recurse(loop);
+ }
+
+ if (prop->len != i) {
+ printf("Found and fixed bad id property group length.\n");
+ prop->len = i;
+ }
+}
+
+static void idproperties_fix_group_lengths(ListBase idlist)
+{
+ ID *id;
+
+ for (id = idlist.first; id; id = id->next) {
+ if (id->properties) {
+ idproperties_fix_groups_lengths_recurse(id->properties);
+ }
+ }
+}
+
+static void alphasort_version_246(FileData *fd, Library *lib, Mesh *me)
+{
+ Material *ma;
+ MFace *mf;
+ MTFace *tf;
+ int a, b, texalpha;
+
+ /* verify we have a tface layer */
+ for (b = 0; b < me->fdata.totlayer; b++)
+ if (me->fdata.layers[b].type == CD_MTFACE)
+ break;
+
+ if (b == me->fdata.totlayer)
+ return;
+
+ /* if we do, set alpha sort if the game engine did it before */
+ for (a = 0, mf = me->mface; a < me->totface; a++, mf++) {
+ if (mf->mat_nr < me->totcol) {
+ ma = blo_do_versions_newlibadr(fd, lib, me->mat[mf->mat_nr]);
+ texalpha = 0;
+
+ /* we can't read from this if it comes from a library,
+ * because direct_link might not have happened on it,
+ * so ma->mtex is not pointing to valid memory yet */
+ if (ma && ma->id.lib)
+ ma = NULL;
+
+ for (b = 0; ma && b < MAX_MTEX; b++)
+ if (ma->mtex && ma->mtex[b] && ma->mtex[b]->mapto & MAP_ALPHA)
+ texalpha = 1;
+ }
+ else {
+ ma = NULL;
+ texalpha = 0;
+ }
+
+ for (b = 0; b < me->fdata.totlayer; b++) {
+ if (me->fdata.layers[b].type == CD_MTFACE) {
+ tf = ((MTFace*)me->fdata.layers[b].data) + a;
+
+ tf->mode &= ~TF_ALPHASORT;
+ if (ma && (ma->mode & MA_ZTRANSP))
+ if (ELEM(tf->transp, TF_ALPHA, TF_ADD) || (texalpha && (tf->transp != TF_CLIP)))
+ tf->mode |= TF_ALPHASORT;
+ }
+ }
+ }
+}
+
+static void customdata_version_242(Mesh *me)
+{
+ CustomDataLayer *layer;
+ MTFace *mtf;
+ MCol *mcol;
+ TFace *tf;
+ int a, mtfacen, mcoln;
+
+ if (!me->vdata.totlayer) {
+ CustomData_add_layer(&me->vdata, CD_MVERT, CD_ASSIGN, me->mvert, me->totvert);
+
+ if (me->msticky)
+ CustomData_add_layer(&me->vdata, CD_MSTICKY, CD_ASSIGN, me->msticky, me->totvert);
+ if (me->dvert)
+ CustomData_add_layer(&me->vdata, CD_MDEFORMVERT, CD_ASSIGN, me->dvert, me->totvert);
+ }
+
+ if (!me->edata.totlayer)
+ CustomData_add_layer(&me->edata, CD_MEDGE, CD_ASSIGN, me->medge, me->totedge);
+
+ if (!me->fdata.totlayer) {
+ CustomData_add_layer(&me->fdata, CD_MFACE, CD_ASSIGN, me->mface, me->totface);
+
+ if (me->tface) {
+ if (me->mcol)
+ MEM_freeN(me->mcol);
+
+ me->mcol = CustomData_add_layer(&me->fdata, CD_MCOL, CD_CALLOC, NULL, me->totface);
+ me->mtface = CustomData_add_layer(&me->fdata, CD_MTFACE, CD_CALLOC, NULL, me->totface);
+
+ mtf = me->mtface;
+ mcol = me->mcol;
+ tf = me->tface;
+
+ for (a = 0; a < me->totface; a++, mtf++, tf++, mcol += 4) {
+ memcpy(mcol, tf->col, sizeof(tf->col));
+ memcpy(mtf->uv, tf->uv, sizeof(tf->uv));
+
+ mtf->flag = tf->flag;
+ mtf->unwrap = tf->unwrap;
+ mtf->mode = tf->mode;
+ mtf->tile = tf->tile;
+ mtf->tpage = tf->tpage;
+ mtf->transp = tf->transp;
+ }
+
+ MEM_freeN(me->tface);
+ me->tface = NULL;
+ }
+ else if (me->mcol) {
+ me->mcol = CustomData_add_layer(&me->fdata, CD_MCOL, CD_ASSIGN, me->mcol, me->totface);
+ }
+ }
+
+ if (me->tface) {
+ MEM_freeN(me->tface);
+ me->tface = NULL;
+ }
+
+ for (a = 0, mtfacen = 0, mcoln = 0; a < me->fdata.totlayer; a++) {
+ layer = &me->fdata.layers[a];
+
+ if (layer->type == CD_MTFACE) {
+ if (layer->name[0] == 0) {
+ if (mtfacen == 0) strcpy(layer->name, "UVMap");
+ else BLI_snprintf(layer->name, sizeof(layer->name), "UVMap.%.3d", mtfacen);
+ }
+ mtfacen++;
+ }
+ else if (layer->type == CD_MCOL) {
+ if (layer->name[0] == 0) {
+ if (mcoln == 0)
+ strcpy(layer->name, "Col");
+ else
+ BLI_snprintf(layer->name, sizeof(layer->name), "Col.%.3d", mcoln);
+ }
+ mcoln++;
+ }
+ }
+
+ mesh_update_customdata_pointers(me, TRUE);
+}
+
+/*only copy render texface layer from active*/
+static void customdata_version_243(Mesh *me)
+{
+ CustomDataLayer *layer;
+ int a;
+
+ for (a = 0; a < me->fdata.totlayer; a++) {
+ layer = &me->fdata.layers[a];
+ layer->active_rnd = layer->active;
+ }
+}
+
+/* struct NodeImageAnim moved to ImageUser, and we make it default available */
+static void do_version_ntree_242_2(bNodeTree *ntree)
+{
+ bNode *node;
+
+ if (ntree->type == NTREE_COMPOSIT) {
+ for (node = ntree->nodes.first; node; node = node->next) {
+ if (ELEM3(node->type, CMP_NODE_IMAGE, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER)) {
+ /* only image had storage */
+ if (node->storage) {
+ NodeImageAnim *nia = node->storage;
+ ImageUser *iuser = MEM_callocN(sizeof(ImageUser), "ima user node");
+
+ iuser->frames = nia->frames;
+ iuser->sfra = nia->sfra;
+ iuser->offset = nia->nr-1;
+ iuser->cycl = nia->cyclic;
+ iuser->fie_ima = 2;
+ iuser->ok = 1;
+
+ node->storage = iuser;
+ MEM_freeN(nia);
+ }
+ else {
+ ImageUser *iuser = node->storage = MEM_callocN(sizeof(ImageUser), "node image user");
+ iuser->sfra = 1;
+ iuser->fie_ima = 2;
+ iuser->ok = 1;
+ }
+ }
+ }
+ }
+}
+
+static void do_version_free_effect_245(Effect *eff)
+{
+ PartEff *paf;
+
+ if (eff->type == EFF_PARTICLE) {
+ paf = (PartEff *)eff;
+ if (paf->keys)
+ MEM_freeN(paf->keys);
+ }
+ MEM_freeN(eff);
+}
+
+static void do_version_free_effects_245(ListBase *lb)
+{
+ Effect *eff;
+
+ eff = lb->first;
+ while (eff) {
+ BLI_remlink(lb, eff);
+ do_version_free_effect_245(eff);
+ eff = lb->first;
+ }
+}
+
+PartEff *blo_do_version_give_parteff_245(Object *ob)
+{
+ PartEff *paf;
+
+ paf = ob->effect.first;
+ while (paf) {
+ if (paf->type == EFF_PARTICLE)
+ return paf;
+ paf = paf->next;
+ }
+ return NULL;
+}
+
+/* NOTE: this version patch is intended for versions < 2.52.2, but was initially introduced in 2.27 already */
+void blo_do_version_old_trackto_to_constraints(Object *ob)
+{
+ /* create new trackto constraint from the relationship */
+ if (ob->track) {
+ bConstraint *con = add_ob_constraint(ob, "AutoTrack", CONSTRAINT_TYPE_TRACKTO);
+ bTrackToConstraint *data = con->data;
+
+ /* copy tracking settings from the object */
+ data->tar = ob->track;
+ data->reserved1 = ob->trackflag;
+ data->reserved2 = ob->upflag;
+ }
+
+ /* clear old track setting */
+ ob->track = NULL;
+}
+
+void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main)
+{
+ /* WATCH IT!!!: pointers from libdata have not been converted */
+
+ if (main->versionfile == 100) {
+ /* tex->extend and tex->imageflag have changed: */
+ Tex *tex = main->tex.first;
+ while (tex) {
+ if (tex->id.flag & LIB_NEEDLINK) {
+
+ if (tex->extend == 0) {
+ if (tex->xrepeat || tex->yrepeat) {
+ tex->extend = TEX_REPEAT;
+ }
+ else {
+ tex->extend = TEX_EXTEND;
+ tex->xrepeat = tex->yrepeat = 1;
+ }
+ }
+
+ }
+ tex = tex->id.next;
+ }
+ }
+
+ if (main->versionfile <= 101) {
+ /* frame mapping */
+ Scene *sce = main->scene.first;
+ while (sce) {
+ sce->r.framapto = 100;
+ sce->r.images = 100;
+ sce->r.framelen = 1.0;
+ sce = sce->id.next;
+ }
+ }
+
+ if (main->versionfile <= 102) {
+ /* init halo's at 1.0 */
+ Material *ma = main->mat.first;
+ while (ma) {
+ ma->add = 1.0;
+ ma = ma->id.next;
+ }
+ }
+
+ if (main->versionfile <= 103) {
+ /* new variable in object: colbits */
+ Object *ob = main->object.first;
+ int a;
+ while (ob) {
+ ob->colbits = 0;
+ if (ob->totcol) {
+ for (a = 0; a < ob->totcol; a++) {
+ if (ob->mat[a])
+ ob->colbits |= (1<<a);
+ }
+ }
+ ob = ob->id.next;
+ }
+ }
+
+ if (main->versionfile <= 104) {
+ /* timeoffs moved */
+ Object *ob = main->object.first;
+ while (ob) {
+ if (ob->transflag & 1) {
+ ob->transflag -= 1;
+ //ob->ipoflag |= OB_OFFS_OB;
+ }
+ ob = ob->id.next;
+ }
+ }
+
+ if (main->versionfile <= 105) {
+ Object *ob = main->object.first;
+ while (ob) {
+ ob->dupon = 1;
+ ob->dupoff = 0;
+ ob->dupsta = 1;
+ ob->dupend = 100;
+ ob = ob->id.next;
+ }
+ }
+
+ if (main->versionfile <= 106) {
+ /* mcol changed */
+ Mesh *me = main->mesh.first;
+ while (me) {
+ if (me->mcol)
+ vcol_to_fcol(me);
+ me = me->id.next;
+ }
+
+ }
+
+ if (main->versionfile <= 107) {
+ Object *ob;
+ Scene *sce = main->scene.first;
+ while (sce) {
+ sce->r.mode |= R_GAMMA;
+ sce = sce->id.next;
+ }
+ ob = main->object.first;
+ while (ob) {
+ //ob->ipoflag |= OB_OFFS_PARENT;
+ if (ob->dt == 0)
+ ob->dt = OB_SOLID;
+ ob = ob->id.next;
+ }
+
+ }
+
+ if (main->versionfile <= 109) {
+ /* new variable: gridlines */
+ bScreen *sc = main->screen.first;
+ while (sc) {
+ ScrArea *sa = sc->areabase.first;
+ while (sa) {
+ SpaceLink *sl = sa->spacedata.first;
+ while (sl) {
+ if (sl->spacetype == SPACE_VIEW3D) {
+ View3D *v3d = (View3D*) sl;
+
+ if (v3d->gridlines == 0)
+ v3d->gridlines = 20;
+ }
+ sl = sl->next;
+ }
+ sa = sa->next;
+ }
+ sc = sc->id.next;
+ }
+ }
+
+ if (main->versionfile <= 113) {
+ Material *ma = main->mat.first;
+ while (ma) {
+ if (ma->flaresize == 0.0f)
+ ma->flaresize = 1.0f;
+ ma->subsize = 1.0f;
+ ma->flareboost = 1.0f;
+ ma = ma->id.next;
+ }
+ }
+
+ if (main->versionfile <= 134) {
+ Tex *tex = main->tex.first;
+ while (tex) {
+ if ((tex->rfac == 0.0f) &&
+ (tex->gfac == 0.0f) &&
+ (tex->bfac == 0.0f))
+ {
+ tex->rfac = 1.0f;
+ tex->gfac = 1.0f;
+ tex->bfac = 1.0f;
+ tex->filtersize = 1.0f;
+ }
+ tex = tex->id.next;
+ }
+ }
+
+ if (main->versionfile <= 140) {
+ /* r-g-b-fac in texture */
+ Tex *tex = main->tex.first;
+ while (tex) {
+ if ((tex->rfac == 0.0f) &&
+ (tex->gfac == 0.0f) &&
+ (tex->bfac == 0.0f))
+ {
+ tex->rfac = 1.0f;
+ tex->gfac = 1.0f;
+ tex->bfac = 1.0f;
+ tex->filtersize = 1.0f;
+ }
+ tex = tex->id.next;
+ }
+ }
+
+ if (main->versionfile <= 153) {
+ Scene *sce = main->scene.first;
+ while (sce) {
+ if (sce->r.blurfac == 0.0f)
+ sce->r.blurfac = 1.0f;
+ sce = sce->id.next;
+ }
+ }
+
+ if (main->versionfile <= 163) {
+ Scene *sce = main->scene.first;
+ while (sce) {
+ if (sce->r.frs_sec == 0)
+ sce->r.frs_sec = 25;
+ sce = sce->id.next;
+ }
+ }
+
+ if (main->versionfile <= 164) {
+ Mesh *me = main->mesh.first;
+ while (me) {
+ me->smoothresh = 30;
+ me = me->id.next;
+ }
+ }
+
+ if (main->versionfile <= 165) {
+ Mesh *me = main->mesh.first;
+ TFace *tface;
+ int nr;
+ char *cp;
+
+ while (me) {
+ if (me->tface) {
+ nr = me->totface;
+ tface = me->tface;
+ while (nr--) {
+ cp = (char *)&tface->col[0];
+ if (cp[1] > 126) cp[1] = 255; else cp[1] *= 2;
+ if (cp[2] > 126) cp[2] = 255; else cp[2] *= 2;
+ if (cp[3] > 126) cp[3] = 255; else cp[3] *= 2;
+ cp = (char *)&tface->col[1];
+ if (cp[1] > 126) cp[1] = 255; else cp[1] *= 2;
+ if (cp[2] > 126) cp[2] = 255; else cp[2] *= 2;
+ if (cp[3] > 126) cp[3] = 255; else cp[3] *= 2;
+ cp = (char *)&tface->col[2];
+ if (cp[1] > 126) cp[1] = 255; else cp[1] *= 2;
+ if (cp[2] > 126) cp[2] = 255; else cp[2] *= 2;
+ if (cp[3] > 126) cp[3] = 255; else cp[3] *= 2;
+ cp = (char *)&tface->col[3];
+ if (cp[1] > 126) cp[1] = 255; else cp[1] *= 2;
+ if (cp[2] > 126) cp[2] = 255; else cp[2] *= 2;
+ if (cp[3] > 126) cp[3] = 255; else cp[3] *= 2;
+
+ tface++;
+ }
+ }
+ me = me->id.next;
+ }
+ }
+
+ if (main->versionfile <= 169) {
+ Mesh *me = main->mesh.first;
+ while (me) {
+ if (me->subdiv == 0)
+ me->subdiv = 1;
+ me = me->id.next;
+ }
+ }
+
+ if (main->versionfile <= 169) {
+ bScreen *sc = main->screen.first;
+ while (sc) {
+ ScrArea *sa = sc->areabase.first;
+ while (sa) {
+ SpaceLink *sl = sa->spacedata.first;
+ while (sl) {
+ if (sl->spacetype == SPACE_IPO) {
+ SpaceIpo *sipo = (SpaceIpo*) sl;
+ sipo->v2d.max[0] = 15000.0;
+ }
+ sl = sl->next;
+ }
+ sa = sa->next;
+ }
+ sc = sc->id.next;
+ }
+ }
+
+ if (main->versionfile <= 170) {
+ Object *ob = main->object.first;
+ PartEff *paf;
+ while (ob) {
+ paf = blo_do_version_give_parteff_245(ob);
+ if (paf) {
+ if (paf->staticstep == 0) {
+ paf->staticstep = 5;
+ }
+ }
+ ob = ob->id.next;
+ }
+ }
+
+ if (main->versionfile <= 171) {
+ bScreen *sc = main->screen.first;
+ while (sc) {
+ ScrArea *sa = sc->areabase.first;
+ while (sa) {
+ SpaceLink *sl = sa->spacedata.first;
+ while (sl) {
+ if (sl->spacetype == SPACE_TEXT) {
+ SpaceText *st = (SpaceText*) sl;
+ st->lheight = 12;
+ }
+ sl = sl->next;
+ }
+ sa = sa->next;
+ }
+ sc = sc->id.next;
+ }
+ }
+
+ if (main->versionfile <= 173) {
+ int a, b;
+ Mesh *me = main->mesh.first;
+ while (me) {
+ if (me->tface) {
+ TFace *tface = me->tface;
+ for (a = 0; a < me->totface; a++, tface++) {
+ for (b = 0; b < 4; b++) {
+ tface->uv[b][0] /= 32767.0f;
+ tface->uv[b][1] /= 32767.0f;
+ }
+ }
+ }
+ me = me->id.next;
+ }
+ }
+
+ if (main->versionfile <= 191) {
+ Object *ob = main->object.first;
+ Material *ma = main->mat.first;
+
+ /* let faces have default add factor of 0.0 */
+ while (ma) {
+ if (!(ma->mode & MA_HALO))
+ ma->add = 0.0;
+ ma = ma->id.next;
+ }
+
+ while (ob) {
+ ob->mass = 1.0f;
+ ob->damping = 0.1f;
+ /*ob->quat[1] = 1.0f;*/ /* quats arnt used yet */
+ ob = ob->id.next;
+ }
+ }
+
+ if (main->versionfile <= 193) {
+ Object *ob = main->object.first;
+ while (ob) {
+ ob->inertia = 1.0f;
+ ob->rdamping = 0.1f;
+ ob = ob->id.next;
+ }
+ }
+
+ if (main->versionfile <= 196) {
+ Mesh *me = main->mesh.first;
+ int a, b;
+ while (me) {
+ if (me->tface) {
+ TFace *tface = me->tface;
+ for (a = 0; a < me->totface; a++, tface++) {
+ for (b = 0; b < 4; b++) {
+ tface->mode |= TF_DYNAMIC;
+ tface->mode &= ~TF_INVISIBLE;
+ }
+ }
+ }
+ me = me->id.next;
+ }
+ }
+
+ if (main->versionfile <= 200) {
+ Object *ob = main->object.first;
+ while (ob) {
+ ob->scaflag = ob->gameflag & (OB_DO_FH|OB_ROT_FH|OB_ANISOTROPIC_FRICTION|OB_GHOST|OB_RIGID_BODY|OB_BOUNDS);
+ /* 64 is do_fh */
+ ob->gameflag &= ~(OB_ROT_FH|OB_ANISOTROPIC_FRICTION|OB_GHOST|OB_RIGID_BODY|OB_BOUNDS);
+ ob = ob->id.next;
+ }
+ }
+
+ if (main->versionfile <= 201) {
+ /* add-object + end-object are joined to edit-object actuator */
+ Object *ob = main->object.first;
+ bProperty *prop;
+ bActuator *act;
+ bIpoActuator *ia;
+ bEditObjectActuator *eoa;
+ bAddObjectActuator *aoa;
+ while (ob) {
+ act = ob->actuators.first;
+ while (act) {
+ if (act->type == ACT_IPO) {
+ ia = act->data;
+ prop = get_ob_property(ob, ia->name);
+ if (prop) {
+ ia->type = ACT_IPO_FROM_PROP;
+ }
+ }
+ else if (act->type == ACT_ADD_OBJECT) {
+ aoa = act->data;
+ eoa = MEM_callocN(sizeof(bEditObjectActuator), "edit ob act");
+ eoa->type = ACT_EDOB_ADD_OBJECT;
+ eoa->ob = aoa->ob;
+ eoa->time = aoa->time;
+ MEM_freeN(aoa);
+ act->data = eoa;
+ act->type = act->otype = ACT_EDIT_OBJECT;
+ }
+ else if (act->type == ACT_END_OBJECT) {
+ eoa = MEM_callocN(sizeof(bEditObjectActuator), "edit ob act");
+ eoa->type = ACT_EDOB_END_OBJECT;
+ act->data = eoa;
+ act->type = act->otype = ACT_EDIT_OBJECT;
+ }
+ act = act->next;
+ }
+ ob = ob->id.next;
+ }
+ }
+
+ if (main->versionfile <= 202) {
+ /* add-object and end-object are joined to edit-object
+ * actuator */
+ Object *ob = main->object.first;
+ bActuator *act;
+ bObjectActuator *oa;
+ while (ob) {
+ act = ob->actuators.first;
+ while (act) {
+ if (act->type == ACT_OBJECT) {
+ oa = act->data;
+ oa->flag &= ~(ACT_TORQUE_LOCAL|ACT_DROT_LOCAL); /* this actuator didn't do local/glob rot before */
+ }
+ act = act->next;
+ }
+ ob = ob->id.next;
+ }
+ }
+
+ if (main->versionfile <= 204) {
+ /* patches for new physics */
+ Object *ob = main->object.first;
+ bActuator *act;
+ bObjectActuator *oa;
+ bSound *sound;
+ while (ob) {
+
+ /* please check this for demo20 files like
+ * original Egypt levels etc. converted
+ * rotation factor of 50 is not workable */
+ act = ob->actuators.first;
+ while (act) {
+ if (act->type == ACT_OBJECT) {
+ oa = act->data;
+
+ oa->forceloc[0] *= 25.0f;
+ oa->forceloc[1] *= 25.0f;
+ oa->forceloc[2] *= 25.0f;
+
+ oa->forcerot[0] *= 10.0f;
+ oa->forcerot[1] *= 10.0f;
+ oa->forcerot[2] *= 10.0f;
+ }
+ act = act->next;
+ }
+ ob = ob->id.next;
+ }
+
+ sound = main->sound.first;
+ while (sound) {
+ if (sound->volume < 0.01f) {
+ sound->volume = 1.0f;
+ }
+ sound = sound->id.next;
+ }
+ }
+
+ if (main->versionfile <= 205) {
+ /* patches for new physics */
+ Object *ob = main->object.first;
+ bActuator *act;
+ bSensor *sens;
+ bEditObjectActuator *oa;
+ bRaySensor *rs;
+ bCollisionSensor *cs;
+ while (ob) {
+ /* Set anisotropic friction off for old objects,
+ * values to 1.0. */
+ ob->gameflag &= ~OB_ANISOTROPIC_FRICTION;
+ ob->anisotropicFriction[0] = 1.0;
+ ob->anisotropicFriction[1] = 1.0;
+ ob->anisotropicFriction[2] = 1.0;
+
+ act = ob->actuators.first;
+ while (act) {
+ if (act->type == ACT_EDIT_OBJECT) {
+ /* Zero initial velocity for newly
+ * added objects */
+ oa = act->data;
+ oa->linVelocity[0] = 0.0;
+ oa->linVelocity[1] = 0.0;
+ oa->linVelocity[2] = 0.0;
+ oa->localflag = 0;
+ }
+ act = act->next;
+ }
+
+ sens = ob->sensors.first;
+ while (sens) {
+ /* Extra fields for radar sensors. */
+ if (sens->type == SENS_RADAR) {
+ bRadarSensor *s = sens->data;
+ s->range = 10000.0;
+ }
+
+ /* Pulsing: defaults for new sensors. */
+ if (sens->type != SENS_ALWAYS) {
+ sens->pulse = 0;
+ sens->freq = 0;
+ }
+ else {
+ sens->pulse = 1;
+ }
+
+ /* Invert: off. */
+ sens->invert = 0;
+
+ /* Collision and ray: default = trigger
+ * on property. The material field can
+ * remain empty. */
+ if (sens->type == SENS_COLLISION) {
+ cs = (bCollisionSensor*) sens->data;
+ cs->mode = 0;
+ }
+ if (sens->type == SENS_RAY) {
+ rs = (bRaySensor*) sens->data;
+ rs->mode = 0;
+ }
+ sens = sens->next;
+ }
+ ob = ob->id.next;
+ }
+ /* have to check the exact multiplier */
+ }
+
+ if (main->versionfile <= 211) {
+ /* Render setting: per scene, the applicable gamma value
+ * can be set. Default is 1.0, which means no
+ * correction. */
+ bActuator *act;
+ bObjectActuator *oa;
+ Object *ob;
+
+ /* added alpha in obcolor */
+ ob = main->object.first;
+ while (ob) {
+ ob->col[3] = 1.0;
+ ob = ob->id.next;
+ }
+
+ /* added alpha in obcolor */
+ ob = main->object.first;
+ while (ob) {
+ act = ob->actuators.first;
+ while (act) {
+ if (act->type == ACT_OBJECT) {
+ /* multiply velocity with 50 in old files */
+ oa = act->data;
+ if (fabsf(oa->linearvelocity[0]) >= 0.01f)
+ oa->linearvelocity[0] *= 50.0f;
+ if (fabsf(oa->linearvelocity[1]) >= 0.01f)
+ oa->linearvelocity[1] *= 50.0f;
+ if (fabsf(oa->linearvelocity[2]) >= 0.01f)
+ oa->linearvelocity[2] *= 50.0f;
+ if (fabsf(oa->angularvelocity[0]) >= 0.01f)
+ oa->angularvelocity[0] *= 50.0f;
+ if (fabsf(oa->angularvelocity[1]) >= 0.01f)
+ oa->angularvelocity[1] *= 50.0f;
+ if (fabsf(oa->angularvelocity[2]) >= 0.01f)
+ oa->angularvelocity[2] *= 50.0f;
+ }
+ act = act->next;
+ }
+ ob = ob->id.next;
+ }
+ }
+
+ if (main->versionfile <= 212) {
+ bSound* sound;
+ bProperty *prop;
+ Object *ob;
+ Mesh *me;
+
+ sound = main->sound.first;
+ while (sound) {
+ sound->max_gain = 1.0;
+ sound->min_gain = 0.0;
+ sound->distance = 1.0;
+
+ if (sound->attenuation > 0.0f)
+ sound->flags |= SOUND_FLAGS_3D;
+ else
+ sound->flags &= ~SOUND_FLAGS_3D;
+
+ sound = sound->id.next;
+ }
+
+ ob = main->object.first;
+
+ while (ob) {
+ prop = ob->prop.first;
+ while (prop) {
+ if (prop->type == GPROP_TIME) {
+ // convert old GPROP_TIME values from int to float
+ *((float *)&prop->data) = (float) prop->data;
+ }
+
+ prop = prop->next;
+ }
+ ob = ob->id.next;
+ }
+
+ /* me->subdiv changed to reflect the actual reparametization
+ * better, and smeshes were removed - if it was a smesh make
+ * it a subsurf, and reset the subdiv level because subsurf
+ * takes a lot more work to calculate.
+ */
+ for (me = main->mesh.first; me; me = me->id.next) {
+ if (me->flag & ME_SMESH) {
+ me->flag &= ~ME_SMESH;
+ me->flag |= ME_SUBSURF;
+
+ me->subdiv = 1;
+ }
+ else {
+ if (me->subdiv < 2)
+ me->subdiv = 1;
+ else
+ me->subdiv--;
+ }
+ }
+ }
+
+ if (main->versionfile <= 220) {
+ Object *ob;
+ Mesh *me;
+
+ ob = main->object.first;
+
+ /* adapt form factor in order to get the 'old' physics
+ * behavior back...
+ */
+
+ while (ob) {
+ /* in future, distinguish between different
+ * object bounding shapes
+ */
+ ob->formfactor = 0.4f;
+ /* patch form factor, note that inertia equiv radius
+ * of a rotation symmetrical obj
+ */
+ if (ob->inertia != 1.0f) {
+ ob->formfactor /= ob->inertia * ob->inertia;
+ }
+ ob = ob->id.next;
+ }
+
+ /* Began using alpha component of vertex colors, but
+ * old file vertex colors are undefined, reset them
+ * to be fully opaque. -zr
+ */
+ for (me = main->mesh.first; me; me = me->id.next) {
+ if (me->mcol) {
+ int i;
+
+ for (i = 0; i < me->totface * 4; i++) {
+ MCol *mcol = &me->mcol[i];
+ mcol->a = 255;
+ }
+ }
+ if (me->tface) {
+ int i, j;
+
+ for (i = 0; i < me->totface; i++) {
+ TFace *tf = &((TFace*) me->tface)[i];
+
+ for (j = 0; j < 4; j++) {
+ char *col = (char*) &tf->col[j];
+
+ col[0] = 255;
+ }
+ }
+ }
+ }
+ }
+
+ if (main->versionfile <= 221) {
+ Scene *sce = main->scene.first;
+
+ /* new variables for std-alone player and runtime */
+ while (sce) {
+ sce->r.xplay = 640;
+ sce->r.yplay = 480;
+ sce->r.freqplay = 60;
+
+ sce = sce->id.next;
+ }
+
+ }
+
+ if (main->versionfile <= 222) {
+ Scene *sce = main->scene.first;
+
+ /* new variables for std-alone player and runtime */
+ while (sce) {
+ sce->r.depth = 32;
+
+ sce = sce->id.next;
+ }
+ }
+
+ if (main->versionfile <= 223) {
+ VFont *vf;
+ Image *ima;
+ Object *ob;
+
+ for (vf = main->vfont.first; vf; vf = vf->id.next) {
+ if (strcmp(vf->name + strlen(vf->name)-6, ".Bfont") == 0) {
+ strcpy(vf->name, FO_BUILTIN_NAME);
+ }
+ }
+
+ /* Old textures animate at 25 FPS */
+ for (ima = main->image.first; ima; ima = ima->id.next) {
+ ima->animspeed = 25;
+ }
+
+ /* Zr remapped some keyboard codes to be linear (stupid zr) */
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ bSensor *sens;
+
+ for (sens = ob->sensors.first; sens; sens = sens->next) {
+ if (sens->type == SENS_KEYBOARD) {
+ bKeyboardSensor *ks = sens->data;
+
+ ks->key = map_223_keybd_code_to_224_keybd_code(ks->key);
+ ks->qual = map_223_keybd_code_to_224_keybd_code(ks->qual);
+ ks->qual2 = map_223_keybd_code_to_224_keybd_code(ks->qual2);
+ }
+ }
+ }
+ }
+
+ if (main->versionfile <= 224) {
+ bSound* sound;
+ Scene *sce;
+ Mesh *me;
+ bScreen *sc;
+
+ for (sound = main->sound.first; sound; sound = sound->id.next) {
+ if (sound->packedfile) {
+ if (sound->newpackedfile == NULL) {
+ sound->newpackedfile = sound->packedfile;
+ }
+ sound->packedfile = NULL;
+ }
+ }
+ /* Make sure that old subsurf meshes don't have zero subdivision level for rendering */
+ for (me = main->mesh.first; me; me = me->id.next) {
+ if ((me->flag & ME_SUBSURF) && (me->subdivr == 0))
+ me->subdivr = me->subdiv;
+ }
+
+ for (sce = main->scene.first; sce; sce = sce->id.next) {
+ sce->r.stereomode = 1; // no stereo
+ }
+
+ /* some oldfile patch, moved from set_func_space */
+ for (sc = main->screen.first; sc; sc = sc->id.next) {
+ ScrArea *sa;
+
+ for (sa = sc->areabase.first; sa; sa = sa->next) {
+ SpaceLink *sl;
+
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_IPO) {
+ SpaceSeq *sseq = (SpaceSeq*) sl;
+ sseq->v2d.keeptot = 0;
+ }
+ }
+ }
+ }
+ }
+
+ if (main->versionfile <= 225) {
+ World *wo;
+ /* Use Sumo for old games */
+ for (wo = main->world.first; wo; wo = wo->id.next) {
+ wo->physicsEngine = 2;
+ }
+ }
+
+ if (main->versionfile <= 227) {
+ Scene *sce;
+ Material *ma;
+ bScreen *sc;
+ Object *ob;
+
+ /* As of now, this insures that the transition from the old Track system
+ * to the new full constraint Track is painless for everyone. - theeth
+ */
+ ob = main->object.first;
+
+ while (ob) {
+ ListBase *list;
+ list = &ob->constraints;
+
+ /* check for already existing TrackTo constraint
+ * set their track and up flag correctly
+ */
+
+ if (list) {
+ bConstraint *curcon;
+ for (curcon = list->first; curcon; curcon = curcon->next) {
+ if (curcon->type == CONSTRAINT_TYPE_TRACKTO) {
+ bTrackToConstraint *data = curcon->data;
+ data->reserved1 = ob->trackflag;
+ data->reserved2 = ob->upflag;
+ }
+ }
+ }
+
+ if (ob->type == OB_ARMATURE) {
+ if (ob->pose) {
+ bConstraint *curcon;
+ bPoseChannel *pchan;
+ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
+ for (curcon = pchan->constraints.first; curcon; curcon = curcon->next) {
+ if (curcon->type == CONSTRAINT_TYPE_TRACKTO) {
+ bTrackToConstraint *data = curcon->data;
+ data->reserved1 = ob->trackflag;
+ data->reserved2 = ob->upflag;
+ }
+ }
+ }
+ }
+ }
+
+ /* Change Ob->Track in real TrackTo constraint */
+ blo_do_version_old_trackto_to_constraints(ob);
+
+ ob = ob->id.next;
+ }
+
+ for (sce = main->scene.first; sce; sce = sce->id.next) {
+ sce->audio.mixrate = 44100;
+ sce->audio.flag |= AUDIO_SCRUB;
+ sce->r.mode |= R_ENVMAP;
+ }
+
+ /* init new shader vars */
+ for (ma = main->mat.first; ma; ma = ma->id.next) {
+ ma->refrac = 4.0f;
+ ma->roughness = 0.5f;
+ ma->param[0] = 0.5f;
+ ma->param[1] = 0.1f;
+ ma->param[2] = 0.1f;
+ ma->param[3] = 0.05f;
+ }
+
+ /* patch for old wrong max view2d settings, allows zooming out more */
+ for (sc = main->screen.first; sc; sc = sc->id.next) {
+ ScrArea *sa;
+
+ for (sa = sc->areabase.first; sa; sa = sa->next) {
+ SpaceLink *sl;
+
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_ACTION) {
+ SpaceAction *sac = (SpaceAction *) sl;
+ sac->v2d.max[0] = 32000;
+ }
+ else if (sl->spacetype == SPACE_NLA) {
+ SpaceNla *sla = (SpaceNla *) sl;
+ sla->v2d.max[0] = 32000;
+ }
+ }
+ }
+ }
+ }
+
+ if (main->versionfile <= 228) {
+ Scene *sce;
+ bScreen *sc;
+ Object *ob;
+
+ /* As of now, this insures that the transition from the old Track system
+ * to the new full constraint Track is painless for everyone.
+ */
+ ob = main->object.first;
+
+ while (ob) {
+ ListBase *list;
+ list = &ob->constraints;
+
+ /* check for already existing TrackTo constraint
+ * set their track and up flag correctly */
+
+ if (list) {
+ bConstraint *curcon;
+ for (curcon = list->first; curcon; curcon = curcon->next) {
+ if (curcon->type == CONSTRAINT_TYPE_TRACKTO) {
+ bTrackToConstraint *data = curcon->data;
+ data->reserved1 = ob->trackflag;
+ data->reserved2 = ob->upflag;
+ }
+ }
+ }
+
+ if (ob->type == OB_ARMATURE) {
+ if (ob->pose) {
+ bConstraint *curcon;
+ bPoseChannel *pchan;
+ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
+ for (curcon = pchan->constraints.first; curcon; curcon = curcon->next) {
+ if (curcon->type == CONSTRAINT_TYPE_TRACKTO) {
+ bTrackToConstraint *data = curcon->data;
+ data->reserved1 = ob->trackflag;
+ data->reserved2 = ob->upflag;
+ }
+ }
+ }
+ }
+ }
+
+ ob = ob->id.next;
+ }
+
+ for (sce = main->scene.first; sce; sce = sce->id.next) {
+ sce->r.mode |= R_ENVMAP;
+ }
+
+ /* convert old mainb values for new button panels */
+ for (sc = main->screen.first; sc; sc = sc->id.next) {
+ ScrArea *sa;
+
+ for (sa = sc->areabase.first; sa; sa = sa->next) {
+ SpaceLink *sl;
+
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_BUTS) {
+ SpaceButs *sbuts = (SpaceButs *) sl;
+
+ sbuts->v2d.maxzoom = 1.2f;
+ sbuts->align = 1; /* horizontal default */
+
+ if (sbuts->mainb == BUTS_LAMP) {
+ sbuts->mainb = CONTEXT_SHADING;
+ //sbuts->tab[CONTEXT_SHADING] = TAB_SHADING_LAMP;
+ }
+ else if (sbuts->mainb == BUTS_MAT) {
+ sbuts->mainb = CONTEXT_SHADING;
+ //sbuts->tab[CONTEXT_SHADING] = TAB_SHADING_MAT;
+ }
+ else if (sbuts->mainb == BUTS_TEX) {
+ sbuts->mainb = CONTEXT_SHADING;
+ //sbuts->tab[CONTEXT_SHADING] = TAB_SHADING_TEX;
+ }
+ else if (sbuts->mainb == BUTS_ANIM) {
+ sbuts->mainb = CONTEXT_OBJECT;
+ }
+ else if (sbuts->mainb == BUTS_WORLD) {
+ sbuts->mainb = CONTEXT_SCENE;
+ //sbuts->tab[CONTEXT_SCENE] = TAB_SCENE_WORLD;
+ }
+ else if (sbuts->mainb == BUTS_RENDER) {
+ sbuts->mainb = CONTEXT_SCENE;
+ //sbuts->tab[CONTEXT_SCENE] = TAB_SCENE_RENDER;
+ }
+ else if (sbuts->mainb == BUTS_GAME) {
+ sbuts->mainb = CONTEXT_LOGIC;
+ }
+ else if (sbuts->mainb == BUTS_FPAINT) {
+ sbuts->mainb = CONTEXT_EDITING;
+ }
+ else if (sbuts->mainb == BUTS_RADIO) {
+ sbuts->mainb = CONTEXT_SHADING;
+ //sbuts->tab[CONTEXT_SHADING] = TAB_SHADING_RAD;
+ }
+ else if (sbuts->mainb == BUTS_CONSTRAINT) {
+ sbuts->mainb = CONTEXT_OBJECT;
+ }
+ else if (sbuts->mainb == BUTS_SCRIPT) {
+ sbuts->mainb = CONTEXT_OBJECT;
+ }
+ else if (sbuts->mainb == BUTS_EDIT) {
+ sbuts->mainb = CONTEXT_EDITING;
+ }
+ else sbuts->mainb = CONTEXT_SCENE;
+ }
+ }
+ }
+ }
+ }
+
+ /* ton: made this 230 instead of 229,
+ * to be sure (tuho files) and this is a reliable check anyway
+ * nevertheless, we might need to think over a fitness (initialize)
+ * check apart from the do_versions()
+ */
+
+ if (main->versionfile <= 230) {
+ bScreen *sc;
+
+ /* new variable blockscale, for panels in any area */
+ for (sc = main->screen.first; sc; sc = sc->id.next) {
+ ScrArea *sa;
+
+ for (sa = sc->areabase.first; sa; sa = sa->next) {
+ SpaceLink *sl;
+
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->blockscale == 0.0f)
+ sl->blockscale = 0.7f;
+ /* added: 5x better zoom in for action */
+ if (sl->spacetype == SPACE_ACTION) {
+ SpaceAction *sac = (SpaceAction *)sl;
+ sac->v2d.maxzoom = 50;
+ }
+ }
+ }
+ }
+ }
+
+ if (main->versionfile <= 231) {
+ /* new bit flags for showing/hiding grid floor and axes */
+ bScreen *sc = main->screen.first;
+
+ while (sc) {
+ ScrArea *sa = sc->areabase.first;
+ while (sa) {
+ SpaceLink *sl = sa->spacedata.first;
+ while (sl) {
+ if (sl->spacetype == SPACE_VIEW3D) {
+ View3D *v3d = (View3D*) sl;
+
+ if (v3d->gridflag == 0) {
+ v3d->gridflag |= V3D_SHOW_X;
+ v3d->gridflag |= V3D_SHOW_Y;
+ v3d->gridflag |= V3D_SHOW_FLOOR;
+ v3d->gridflag &= ~V3D_SHOW_Z;
+ }
+ }
+ sl = sl->next;
+ }
+ sa = sa->next;
+ }
+ sc = sc->id.next;
+ }
+ }
+
+ if (main->versionfile <= 231) {
+ Material *ma = main->mat.first;
+ bScreen *sc = main->screen.first;
+ Scene *sce;
+ Lamp *la;
+ World *wrld;
+
+ /* introduction of raytrace */
+ while (ma) {
+ if (ma->fresnel_tra_i == 0.0f)
+ ma->fresnel_tra_i = 1.25f;
+ if (ma->fresnel_mir_i == 0.0f)
+ ma->fresnel_mir_i = 1.25f;
+
+ ma->ang = 1.0;
+ ma->ray_depth = 2;
+ ma->ray_depth_tra = 2;
+ ma->fresnel_tra = 0.0;
+ ma->fresnel_mir = 0.0;
+
+ ma = ma->id.next;
+ }
+ sce = main->scene.first;
+ while (sce) {
+ if (sce->r.gauss == 0.0f)
+ sce->r.gauss = 1.0f;
+ sce = sce->id.next;
+ }
+ la = main->lamp.first;
+ while (la) {
+ if (la->k == 0.0f) la->k = 1.0;
+ if (la->ray_samp == 0)
+ la->ray_samp = 1;
+ if (la->ray_sampy == 0)
+ la->ray_sampy = 1;
+ if (la->ray_sampz == 0)
+ la->ray_sampz = 1;
+ if (la->area_size == 0.0f)
+ la->area_size = 1.0f;
+ if (la->area_sizey == 0.0f)
+ la->area_sizey = 1.0f;
+ if (la->area_sizez == 0.0f)
+ la->area_sizez = 1.0f;
+ la = la->id.next;
+ }
+ wrld = main->world.first;
+ while (wrld) {
+ if (wrld->range == 0.0f) {
+ wrld->range = 1.0f / wrld->exposure;
+ }
+ wrld = wrld->id.next;
+ }
+
+ /* new bit flags for showing/hiding grid floor and axes */
+
+ while (sc) {
+ ScrArea *sa = sc->areabase.first;
+ while (sa) {
+ SpaceLink *sl = sa->spacedata.first;
+ while (sl) {
+ if (sl->spacetype == SPACE_VIEW3D) {
+ View3D *v3d = (View3D*) sl;
+
+ if (v3d->gridflag == 0) {
+ v3d->gridflag |= V3D_SHOW_X;
+ v3d->gridflag |= V3D_SHOW_Y;
+ v3d->gridflag |= V3D_SHOW_FLOOR;
+ v3d->gridflag &= ~V3D_SHOW_Z;
+ }
+ }
+ sl = sl->next;
+ }
+ sa = sa->next;
+ }
+ sc = sc->id.next;
+ }
+ }
+
+ if (main->versionfile <= 232) {
+ Tex *tex = main->tex.first;
+ World *wrld = main->world.first;
+ bScreen *sc;
+ Scene *sce;
+
+ while (tex) {
+ if ((tex->flag & (TEX_CHECKER_ODD+TEX_CHECKER_EVEN))==0) {
+ tex->flag |= TEX_CHECKER_ODD;
+ }
+ /* copied from kernel texture.c */
+ if (tex->ns_outscale == 0.0f) {
+ /* musgrave */
+ tex->mg_H = 1.0f;
+ tex->mg_lacunarity = 2.0f;
+ tex->mg_octaves = 2.0f;
+ tex->mg_offset = 1.0f;
+ tex->mg_gain = 1.0f;
+ tex->ns_outscale = 1.0f;
+ /* distnoise */
+ tex->dist_amount = 1.0f;
+ /* voronoi */
+ tex->vn_w1 = 1.0f;
+ tex->vn_mexp = 2.5f;
+ }
+ tex = tex->id.next;
+ }
+
+ while (wrld) {
+ if (wrld->aodist == 0.0f) {
+ wrld->aodist = 10.0f;
+ wrld->aobias = 0.05f;
+ }
+ if (wrld->aosamp == 0)
+ wrld->aosamp = 5;
+ if (wrld->aoenergy == 0.0f)
+ wrld->aoenergy = 1.0f;
+ wrld = wrld->id.next;
+ }
+
+ /* new variable blockscale, for panels in any area, do again because new
+ * areas didnt initialize it to 0.7 yet
+ */
+ for (sc = main->screen.first; sc; sc = sc->id.next) {
+ ScrArea *sa;
+ for (sa = sc->areabase.first; sa; sa = sa->next) {
+ SpaceLink *sl;
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->blockscale == 0.0f)
+ sl->blockscale = 0.7f;
+
+ /* added: 5x better zoom in for nla */
+ if (sl->spacetype == SPACE_NLA) {
+ SpaceNla *snla = (SpaceNla *) sl;
+ snla->v2d.maxzoom = 50;
+ }
+ }
+ }
+ }
+ sce = main->scene.first;
+ while (sce) {
+ if (sce->r.ocres == 0)
+ sce->r.ocres = 64;
+ sce = sce->id.next;
+ }
+
+ }
+
+ if (main->versionfile <= 233) {
+ bScreen *sc;
+ Material *ma = main->mat.first;
+ /* Object *ob = main->object.first; */
+
+ while (ma) {
+ if (ma->rampfac_col == 0.0f)
+ ma->rampfac_col = 1.0;
+ if (ma->rampfac_spec == 0.0f)
+ ma->rampfac_spec = 1.0;
+ if (ma->pr_lamp == 0)
+ ma->pr_lamp = 3;
+ ma = ma->id.next;
+ }
+
+ /* this should have been done loooong before! */
+#if 0 /* deprecated in 2.5+ */
+ while (ob) {
+ if (ob->ipowin == 0)
+ ob->ipowin = ID_OB;
+ ob = ob->id.next;
+ }
+#endif
+ for (sc = main->screen.first; sc; sc = sc->id.next) {
+ ScrArea *sa;
+ for (sa = sc->areabase.first; sa; sa = sa->next) {
+ SpaceLink *sl;
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_VIEW3D) {
+ View3D *v3d = (View3D *) sl;
+ v3d->flag |= V3D_SELECT_OUTLINE;
+ }
+ }
+ }
+ }
+ }
+
+ if (main->versionfile <= 234) {
+ World *wo;
+ bScreen *sc;
+
+ /* force sumo engine to be active */
+ for (wo = main->world.first; wo; wo = wo->id.next) {
+ if (wo->physicsEngine == 0)
+ wo->physicsEngine = 2;
+ }
+
+ for (sc = main->screen.first; sc; sc = sc->id.next) {
+ ScrArea *sa;
+ for (sa = sc->areabase.first; sa; sa = sa->next) {
+ SpaceLink *sl;
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_VIEW3D) {
+ View3D *v3d = (View3D *) sl;
+ v3d->flag |= V3D_ZBUF_SELECT;
+ }
+ else if (sl->spacetype == SPACE_TEXT) {
+ SpaceText *st = (SpaceText *)sl;
+ if (st->tabnumber == 0)
+ st->tabnumber = 2;
+ }
+ }
+ }
+ }
+ }
+
+ if (main->versionfile <= 235) {
+ Tex *tex = main->tex.first;
+ Scene *sce = main->scene.first;
+ Sequence *seq;
+ Editing *ed;
+
+ while (tex) {
+ if (tex->nabla == 0.0f)
+ tex->nabla = 0.025f;
+ tex = tex->id.next;
+ }
+ while (sce) {
+ ed = sce->ed;
+ if (ed) {
+ SEQ_BEGIN (sce->ed, seq)
+ {
+ if (seq->type == SEQ_IMAGE || seq->type == SEQ_MOVIE)
+ seq->flag |= SEQ_MAKE_PREMUL;
+ }
+ SEQ_END
+ }
+
+ sce = sce->id.next;
+ }
+ }
+
+ if (main->versionfile <= 236) {
+ Object *ob;
+ Camera *cam = main->camera.first;
+ Material *ma;
+ bScreen *sc;
+
+ while (cam) {
+ if (cam->ortho_scale == 0.0f) {
+ cam->ortho_scale = 256.0f / cam->lens;
+ if (cam->type == CAM_ORTHO)
+ printf("NOTE: ortho render has changed, tweak new Camera 'scale' value.\n");
+ }
+ cam = cam->id.next;
+ }
+ /* set manipulator type */
+ /* force oops draw if depgraph was set*/
+ /* set time line var */
+ for (sc = main->screen.first; sc; sc = sc->id.next) {
+ ScrArea *sa;
+ for (sa = sc->areabase.first; sa; sa = sa->next) {
+ SpaceLink *sl;
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_VIEW3D) {
+ View3D *v3d = (View3D *) sl;
+ if (v3d->twtype == 0)
+ v3d->twtype = V3D_MANIP_TRANSLATE;
+ }
+ }
+ }
+ }
+ /* init new shader vars */
+ for (ma = main->mat.first; ma; ma = ma->id.next) {
+ if (ma->darkness == 0.0f) {
+ ma->rms = 0.1f;
+ ma->darkness = 1.0f;
+ }
+ }
+
+ /* softbody init new vars */
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ if (ob->soft) {
+ if (ob->soft->defgoal == 0.0f)
+ ob->soft->defgoal = 0.7f;
+ if (ob->soft->physics_speed == 0.0f)
+ ob->soft->physics_speed = 1.0f;
+
+ if (ob->soft->interval == 0) {
+ ob->soft->interval = 2;
+ ob->soft->sfra = 1;
+ ob->soft->efra = 100;
+ }
+ }
+ if (ob->soft && ob->soft->vertgroup == 0) {
+ bDeformGroup *locGroup = defgroup_find_name(ob, "SOFTGOAL");
+ if (locGroup) {
+ /* retrieve index for that group */
+ ob->soft->vertgroup = 1 + BLI_findindex(&ob->defbase, locGroup);
+ }
+ }
+ }
+ }
+
+ if (main->versionfile <= 237) {
+ bArmature *arm;
+ bConstraint *con;
+ Object *ob;
+ Bone *bone;
+
+ /* armature recode checks */
+ for (arm = main->armature.first; arm; arm = arm->id.next) {
+ BKE_armature_where_is(arm);
+
+ for (bone = arm->bonebase.first; bone; bone = bone->next)
+ do_version_bone_head_tail_237(bone);
+ }
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ if (ob->parent) {
+ Object *parent = blo_do_versions_newlibadr(fd, lib, ob->parent);
+ if (parent && parent->type == OB_LATTICE)
+ ob->partype = PARSKEL;
+ }
+
+ /* btw. armature_rebuild_pose is further only called on leave editmode */
+ if (ob->type == OB_ARMATURE) {
+ if (ob->pose)
+ ob->pose->flag |= POSE_RECALC;
+
+ /* cannot call stuff now (pointers!), done in setup_app_data */
+ ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
+
+ /* new generic xray option */
+ arm = blo_do_versions_newlibadr(fd, lib, ob->data);
+ if (arm->flag & ARM_DRAWXRAY) {
+ ob->dtx |= OB_DRAWXRAY;
+ }
+ }
+ else if (ob->type == OB_MESH) {
+ Mesh *me = blo_do_versions_newlibadr(fd, lib, ob->data);
+
+ if ((me->flag&ME_SUBSURF)) {
+ SubsurfModifierData *smd = (SubsurfModifierData*) modifier_new(eModifierType_Subsurf);
+
+ smd->levels = MAX2(1, me->subdiv);
+ smd->renderLevels = MAX2(1, me->subdivr);
+ smd->subdivType = me->subsurftype;
+
+ smd->modifier.mode = 0;
+ if (me->subdiv != 0)
+ smd->modifier.mode |= 1;
+ if (me->subdivr != 0)
+ smd->modifier.mode |= 2;
+ if (me->flag & ME_OPT_EDGES)
+ smd->flags |= eSubsurfModifierFlag_ControlEdges;
+
+ BLI_addtail(&ob->modifiers, smd);
+
+ modifier_unique_name(&ob->modifiers, (ModifierData*)smd);
+ }
+ }
+
+ /* follow path constraint needs to set the 'path' option in curves... */
+ for (con = ob->constraints.first; con; con = con->next) {
+ if (con->type == CONSTRAINT_TYPE_FOLLOWPATH) {
+ bFollowPathConstraint *data = con->data;
+ Object *obc = blo_do_versions_newlibadr(fd, lib, data->tar);
+
+ if (obc && obc->type == OB_CURVE) {
+ Curve *cu = blo_do_versions_newlibadr(fd, lib, obc->data);
+ if (cu)
+ cu->flag |= CU_PATH;
+ }
+ }
+ }
+ }
+ }
+
+ if (main->versionfile <= 238) {
+ Lattice *lt;
+ Object *ob;
+ bArmature *arm;
+ Mesh *me;
+ Key *key;
+ Scene *sce = main->scene.first;
+
+ while (sce) {
+ if (sce->toolsettings == NULL) {
+ sce->toolsettings = MEM_callocN(sizeof(struct ToolSettings), "Tool Settings Struct");
+ sce->toolsettings->cornertype =0;
+ sce->toolsettings->degr = 90;
+ sce->toolsettings->step = 9;
+ sce->toolsettings->turn = 1;
+ sce->toolsettings->extr_offs = 1;
+ sce->toolsettings->doublimit = 0.001f;
+ sce->toolsettings->segments = 32;
+ sce->toolsettings->rings = 32;
+ sce->toolsettings->vertices = 32;
+ }
+ sce = sce->id.next;
+ }
+
+ for (lt = main->latt.first; lt; lt = lt->id.next) {
+ if (lt->fu == 0.0f && lt->fv == 0.0f && lt->fw == 0.0f) {
+ calc_lat_fudu(lt->flag, lt->pntsu, &lt->fu, &lt->du);
+ calc_lat_fudu(lt->flag, lt->pntsv, &lt->fv, &lt->dv);
+ calc_lat_fudu(lt->flag, lt->pntsw, &lt->fw, &lt->dw);
+ }
+ }
+
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ ModifierData *md;
+ PartEff *paf;
+
+ for (md = ob->modifiers.first; md; md = md->next) {
+ if (md->type == eModifierType_Subsurf) {
+ SubsurfModifierData *smd = (SubsurfModifierData*) md;
+
+ smd->flags &= ~(eSubsurfModifierFlag_Incremental|eSubsurfModifierFlag_DebugIncr);
+ }
+ }
+
+ if ((ob->softflag & OB_SB_ENABLE) && !modifiers_findByType(ob, eModifierType_Softbody)) {
+ if (ob->softflag & OB_SB_POSTDEF) {
+ md = ob->modifiers.first;
+
+ while (md && modifierType_getInfo(md->type)->type == eModifierTypeType_OnlyDeform) {
+ md = md->next;
+ }
+
+ BLI_insertlinkbefore(&ob->modifiers, md, modifier_new(eModifierType_Softbody));
+ }
+ else {
+ BLI_addhead(&ob->modifiers, modifier_new(eModifierType_Softbody));
+ }
+
+ ob->softflag &= ~OB_SB_ENABLE;
+ }
+
+ if (ob->pose) {
+ bPoseChannel *pchan;
+ bConstraint *con;
+ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
+ /* note, pchan->bone is also lib-link stuff */
+ if (pchan->limitmin[0] == 0.0f && pchan->limitmax[0] == 0.0f) {
+ pchan->limitmin[0] = pchan->limitmin[1] = pchan->limitmin[2] = -180.0f;
+ pchan->limitmax[0] = pchan->limitmax[1] = pchan->limitmax[2] = 180.0f;
+
+ for (con = pchan->constraints.first; con; con = con->next) {
+ if (con->type == CONSTRAINT_TYPE_KINEMATIC) {
+ bKinematicConstraint *data = (bKinematicConstraint*)con->data;
+ data->weight = 1.0f;
+ data->orientweight = 1.0f;
+ data->flag &= ~CONSTRAINT_IK_ROT;
+
+ /* enforce conversion from old IK_TOPARENT to rootbone index */
+ data->rootbone = -1;
+
+ /* update_pose_etc handles rootbone == -1 */
+ ob->pose->flag |= POSE_RECALC;
+ }
+ }
+ }
+ }
+ }
+
+ paf = blo_do_version_give_parteff_245(ob);
+ if (paf) {
+ if (paf->disp == 0)
+ paf->disp = 100;
+ if (paf->speedtex == 0)
+ paf->speedtex = 8;
+ if (paf->omat == 0)
+ paf->omat = 1;
+ }
+ }
+
+ for (arm = main->armature.first; arm; arm = arm->id.next) {
+ bone_version_238(&arm->bonebase);
+ arm->deformflag |= ARM_DEF_VGROUP;
+ }
+
+ for (me = main->mesh.first; me; me = me->id.next) {
+ if (!me->medge) {
+ BKE_mesh_make_edges(me, 1); /* 1 = use mface->edcode */
+ }
+ else {
+ BKE_mesh_strip_loose_faces(me);
+ }
+ }
+
+ for (key = main->key.first; key; key = key->id.next) {
+ KeyBlock *kb;
+ int index = 1;
+
+ for (kb = key->block.first; kb; kb = kb->next) {
+ if (kb == key->refkey) {
+ if (kb->name[0] == 0)
+ strcpy(kb->name, "Basis");
+ }
+ else {
+ if (kb->name[0] == 0) {
+ BLI_snprintf(kb->name, sizeof(kb->name), "Key %d", index);
+ }
+ index++;
+ }
+ }
+ }
+ }
+
+ if (main->versionfile <= 239) {
+ bArmature *arm;
+ Object *ob;
+ Scene *sce = main->scene.first;
+ Camera *cam = main->camera.first;
+ Material *ma = main->mat.first;
+ int set_passepartout = 0;
+
+ /* deformflag is local in modifier now */
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ ModifierData *md;
+
+ for (md = ob->modifiers.first; md; md = md->next) {
+ if (md->type == eModifierType_Armature) {
+ ArmatureModifierData *amd = (ArmatureModifierData*) md;
+ if (amd->object && amd->deformflag == 0) {
+ Object *oba = blo_do_versions_newlibadr(fd, lib, amd->object);
+ arm = blo_do_versions_newlibadr(fd, lib, oba->data);
+ amd->deformflag = arm->deformflag;
+ }
+ }
+ }
+ }
+
+ /* updating stepsize for ghost drawing */
+ for (arm = main->armature.first; arm; arm = arm->id.next) {
+ if (arm->ghostsize == 0)
+ arm->ghostsize = 1;
+ bone_version_239(&arm->bonebase);
+ if (arm->layer == 0)
+ arm->layer = 1;
+ }
+
+ for (; sce; sce = sce->id.next) {
+ /* make 'innervert' the default subdivide type, for backwards compat */
+ sce->toolsettings->cornertype = 1;
+
+ if (sce->r.scemode & R_PASSEPARTOUT) {
+ set_passepartout = 1;
+ sce->r.scemode &= ~R_PASSEPARTOUT;
+ }
+ /* gauss is filter variable now */
+ if (sce->r.mode & R_GAUSS) {
+ sce->r.filtertype = R_FILTER_GAUSS;
+ sce->r.mode &= ~R_GAUSS;
+ }
+ }
+
+ for (; cam; cam = cam->id.next) {
+ if (set_passepartout)
+ cam->flag |= CAM_SHOWPASSEPARTOUT;
+
+ /* make sure old cameras have title safe on */
+ if (!(cam->flag & CAM_SHOWTITLESAFE))
+ cam->flag |= CAM_SHOWTITLESAFE;
+
+ /* set an appropriate camera passepartout alpha */
+ if (!(cam->passepartalpha))
+ cam->passepartalpha = 0.2f;
+ }
+
+ for (; ma; ma = ma->id.next) {
+ if (ma->strand_sta == 0.0f) {
+ ma->strand_sta = ma->strand_end = 1.0f;
+ ma->mode |= MA_TANGENT_STR;
+ }
+ if (ma->mode & MA_TRACEBLE)
+ ma->mode |= MA_SHADBUF;
+ }
+ }
+
+ if (main->versionfile <= 241) {
+ Object *ob;
+ Tex *tex;
+ Scene *sce;
+ World *wo;
+ Lamp *la;
+ Material *ma;
+ bArmature *arm;
+ bNodeTree *ntree;
+
+ for (wo = main->world.first; wo; wo = wo->id.next) {
+ /* Migrate to Bullet for games, except for the NaN versions */
+ /* People can still explicitly choose for Sumo (after 2.42 is out) */
+ if (main->versionfile > 225)
+ wo->physicsEngine = WOPHY_BULLET;
+ if (WO_AODIST == wo->aomode)
+ wo->aocolor = WO_AOPLAIN;
+ }
+
+ /* updating layers still */
+ for (arm = main->armature.first; arm; arm = arm->id.next) {
+ bone_version_239(&arm->bonebase);
+ if (arm->layer == 0)
+ arm->layer = 1;
+ }
+ for (sce = main->scene.first; sce; sce = sce->id.next) {
+ if (sce->audio.mixrate == 0)
+ sce->audio.mixrate = 44100;
+
+ if (sce->r.xparts <2 )
+ sce->r.xparts = 4;
+ if (sce->r.yparts < 2)
+ sce->r.yparts = 4;
+
+ /* adds default layer */
+ if (sce->r.layers.first == NULL)
+ BKE_scene_add_render_layer(sce, NULL);
+ else {
+ SceneRenderLayer *srl;
+ /* new layer flag for sky, was default for solid */
+ for (srl = sce->r.layers.first; srl; srl = srl->next) {
+ if (srl->layflag & SCE_LAY_SOLID)
+ srl->layflag |= SCE_LAY_SKY;
+ srl->passflag &= (SCE_PASS_COMBINED|SCE_PASS_Z|SCE_PASS_NORMAL|SCE_PASS_VECTOR);
+ }
+ }
+
+ /* node version changes */
+ if (sce->nodetree)
+ ntree_version_241(sce->nodetree);
+
+ /* uv calculation options moved to toolsettings */
+ if (sce->toolsettings->uvcalc_radius == 0.0f) {
+ sce->toolsettings->uvcalc_radius = 1.0f;
+ sce->toolsettings->uvcalc_cubesize = 1.0f;
+ sce->toolsettings->uvcalc_mapdir = 1;
+ sce->toolsettings->uvcalc_mapalign = 1;
+ sce->toolsettings->uvcalc_flag = UVCALC_FILLHOLES;
+ sce->toolsettings->unwrapper = 1;
+ }
+
+ if (sce->r.mode & R_PANORAMA) {
+ /* all these checks to ensure saved files with svn version keep working... */
+ if (sce->r.xsch < sce->r.ysch) {
+ Object *obc = blo_do_versions_newlibadr(fd, lib, sce->camera);
+ if (obc && obc->type == OB_CAMERA) {
+ Camera *cam = blo_do_versions_newlibadr(fd, lib, obc->data);
+ if (cam->lens >= 10.0f) {
+ sce->r.xsch *= sce->r.xparts;
+ cam->lens *= (float)sce->r.ysch / (float)sce->r.xsch;
+ }
+ }
+ }
+ }
+ }
+
+ for (ntree = main->nodetree.first; ntree; ntree = ntree->id.next)
+ ntree_version_241(ntree);
+
+ for (la = main->lamp.first; la; la = la->id.next)
+ if (la->buffers == 0)
+ la->buffers = 1;
+
+ for (tex = main->tex.first; tex; tex = tex->id.next) {
+ if (tex->env && tex->env->viewscale == 0.0f)
+ tex->env->viewscale = 1.0f;
+ //tex->imaflag |= TEX_GAUSS_MIP;
+ }
+
+ /* for empty drawsize and drawtype */
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ if (ob->empty_drawsize == 0.0f) {
+ ob->empty_drawtype = OB_ARROWS;
+ ob->empty_drawsize = 1.0;
+ }
+ }
+
+ for (ma = main->mat.first; ma; ma = ma->id.next) {
+ /* stucci returns intensity from now on */
+ int a;
+ for (a = 0; a < MAX_MTEX; a++) {
+ if (ma->mtex[a] && ma->mtex[a]->tex) {
+ tex = blo_do_versions_newlibadr(fd, lib, ma->mtex[a]->tex);
+ if (tex && tex->type == TEX_STUCCI)
+ ma->mtex[a]->mapto &= ~(MAP_COL|MAP_SPEC|MAP_REF);
+ }
+ }
+ /* transmissivity defaults */
+ if (ma->tx_falloff == 0.0f)
+ ma->tx_falloff = 1.0f;
+ }
+
+ /* during 2.41 images with this name were used for viewer node output, lets fix that */
+ if (main->versionfile == 241) {
+ Image *ima;
+ for (ima = main->image.first; ima; ima = ima->id.next)
+ if (strcmp(ima->name, "Compositor") == 0) {
+ strcpy(ima->id.name+2, "Viewer Node");
+ strcpy(ima->name, "Viewer Node");
+ }
+ }
+ }
+
+ if (main->versionfile <= 242) {
+ Scene *sce;
+ bScreen *sc;
+ Object *ob;
+ Curve *cu;
+ Material *ma;
+ Mesh *me;
+ Group *group;
+ Nurb *nu;
+ BezTriple *bezt;
+ BPoint *bp;
+ bNodeTree *ntree;
+ int a;
+
+ for (sc = main->screen.first; sc; sc = sc->id.next) {
+ ScrArea *sa;
+ sa = sc->areabase.first;
+ while (sa) {
+ SpaceLink *sl;
+
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_VIEW3D) {
+ View3D *v3d = (View3D*) sl;
+ if (v3d->gridsubdiv == 0)
+ v3d->gridsubdiv = 10;
+ }
+ }
+ sa = sa->next;
+ }
+ }
+
+ for (sce = main->scene.first; sce; sce = sce->id.next) {
+ if (sce->toolsettings->select_thresh == 0.0f)
+ sce->toolsettings->select_thresh = 0.01f;
+ if (sce->toolsettings->clean_thresh == 0.0f)
+ sce->toolsettings->clean_thresh = 0.1f;
+
+ if (sce->r.threads == 0) {
+ if (sce->r.mode & R_THREADS)
+ sce->r.threads = 2;
+ else
+ sce->r.threads = 1;
+ }
+ if (sce->nodetree)
+ ntree_version_242(sce->nodetree);
+ }
+
+ for (ntree = main->nodetree.first; ntree; ntree = ntree->id.next)
+ ntree_version_242(ntree);
+
+ /* add default radius values to old curve points */
+ for (cu = main->curve.first; cu; cu = cu->id.next) {
+ for (nu = cu->nurb.first; nu; nu = nu->next) {
+ if (nu) {
+ if (nu->bezt) {
+ for (bezt = nu->bezt, a = 0; a < nu->pntsu; a++, bezt++) {
+ if (!bezt->radius)
+ bezt->radius = 1.0;
+ }
+ }
+ else if (nu->bp) {
+ for (bp = nu->bp, a = 0; a < nu->pntsu * nu->pntsv; a++, bp++) {
+ if (!bp->radius)
+ bp->radius = 1.0;
+ }
+ }
+ }
+ }
+ }
+
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ ModifierData *md;
+ ListBase *list;
+ list = &ob->constraints;
+
+ /* check for already existing MinMax (floor) constraint
+ * and update the sticky flagging */
+
+ if (list) {
+ bConstraint *curcon;
+ for (curcon = list->first; curcon; curcon = curcon->next) {
+ switch (curcon->type) {
+ case CONSTRAINT_TYPE_MINMAX:
+ {
+ bMinMaxConstraint *data = curcon->data;
+ if (data->sticky == 1)
+ data->flag |= MINMAX_STICKY;
+ else
+ data->flag &= ~MINMAX_STICKY;
+ }
+ break;
+ case CONSTRAINT_TYPE_ROTLIKE:
+ {
+ bRotateLikeConstraint *data = curcon->data;
+
+ /* version patch from buttons_object.c */
+ if (data->flag == 0)
+ data->flag = ROTLIKE_X|ROTLIKE_Y|ROTLIKE_Z;
+ }
+ break;
+ }
+ }
+ }
+
+ if (ob->type == OB_ARMATURE) {
+ if (ob->pose) {
+ bConstraint *curcon;
+ bPoseChannel *pchan;
+ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
+ for (curcon = pchan->constraints.first; curcon; curcon = curcon->next) {
+ switch (curcon->type) {
+ case CONSTRAINT_TYPE_MINMAX:
+ {
+ bMinMaxConstraint *data = curcon->data;
+ if (data->sticky == 1)
+ data->flag |= MINMAX_STICKY;
+ else
+ data->flag &= ~MINMAX_STICKY;
+ }
+ break;
+ case CONSTRAINT_TYPE_KINEMATIC:
+ {
+ bKinematicConstraint *data = curcon->data;
+ if (!(data->flag & CONSTRAINT_IK_POS)) {
+ data->flag |= CONSTRAINT_IK_POS;
+ data->flag |= CONSTRAINT_IK_STRETCH;
+ }
+ }
+ break;
+ case CONSTRAINT_TYPE_ROTLIKE:
+ {
+ bRotateLikeConstraint *data = curcon->data;
+
+ /* version patch from buttons_object.c */
+ if (data->flag == 0)
+ data->flag = ROTLIKE_X|ROTLIKE_Y|ROTLIKE_Z;
+ }
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ /* copy old object level track settings to curve modifers */
+ for (md = ob->modifiers.first; md; md = md->next) {
+ if (md->type == eModifierType_Curve) {
+ CurveModifierData *cmd = (CurveModifierData*) md;
+
+ if (cmd->defaxis == 0)
+ cmd->defaxis = ob->trackflag+1;
+ }
+ }
+
+ }
+
+ for (ma = main->mat.first; ma; ma = ma->id.next) {
+ if (ma->shad_alpha == 0.0f)
+ ma->shad_alpha = 1.0f;
+ if (ma->nodetree)
+ ntree_version_242(ma->nodetree);
+ }
+
+ for (me = main->mesh.first; me; me = me->id.next)
+ customdata_version_242(me);
+
+ for (group = main->group.first; group; group = group->id.next)
+ if (group->layer == 0)
+ group->layer = (1<<20)-1;
+
+ /* now, subversion control! */
+ if (main->subversionfile < 3) {
+ Image *ima;
+ Tex *tex;
+
+ /* Image refactor initialize */
+ for (ima = main->image.first; ima; ima = ima->id.next) {
+ ima->source = IMA_SRC_FILE;
+ ima->type = IMA_TYPE_IMAGE;
+
+ ima->gen_x = 256; ima->gen_y = 256;
+ ima->gen_type = 1;
+
+ if (0 == strncmp(ima->id.name+2, "Viewer Node", sizeof(ima->id.name) - 2)) {
+ ima->source = IMA_SRC_VIEWER;
+ ima->type = IMA_TYPE_COMPOSITE;
+ }
+ if (0 == strncmp(ima->id.name+2, "Render Result", sizeof(ima->id.name) - 2)) {
+ ima->source = IMA_SRC_VIEWER;
+ ima->type = IMA_TYPE_R_RESULT;
+ }
+
+ }
+ for (tex = main->tex.first; tex; tex = tex->id.next) {
+ if (tex->type == TEX_IMAGE && tex->ima) {
+ ima = blo_do_versions_newlibadr(fd, lib, tex->ima);
+ if (tex->imaflag & TEX_ANIM5_)
+ ima->source = IMA_SRC_MOVIE;
+ if (tex->imaflag & TEX_FIELDS_)
+ ima->flag |= IMA_FIELDS;
+ if (tex->imaflag & TEX_STD_FIELD_)
+ ima->flag |= IMA_STD_FIELD;
+ }
+ tex->iuser.frames = tex->frames;
+ tex->iuser.fie_ima = (char)tex->fie_ima;
+ tex->iuser.offset = tex->offset;
+ tex->iuser.sfra = tex->sfra;
+ tex->iuser.cycl = (tex->imaflag & TEX_ANIMCYCLIC_)!=0;
+ }
+ for (sce = main->scene.first; sce; sce = sce->id.next) {
+ if (sce->nodetree)
+ do_version_ntree_242_2(sce->nodetree);
+ }
+ for (ntree = main->nodetree.first; ntree; ntree = ntree->id.next)
+ do_version_ntree_242_2(ntree);
+ for (ma = main->mat.first; ma; ma = ma->id.next)
+ if (ma->nodetree)
+ do_version_ntree_242_2(ma->nodetree);
+
+ for (sc = main->screen.first; sc; sc = sc->id.next) {
+ ScrArea *sa;
+ for (sa = sc->areabase.first; sa; sa = sa->next) {
+ SpaceLink *sl;
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_IMAGE)
+ ((SpaceImage *)sl)->iuser.fie_ima = 2;
+ else if (sl->spacetype == SPACE_VIEW3D) {
+ View3D *v3d = (View3D *)sl;
+ BGpic *bgpic;
+ for (bgpic = v3d->bgpicbase.first; bgpic; bgpic = bgpic->next)
+ bgpic->iuser.fie_ima = 2;
+ }
+ }
+ }
+ }
+ }
+
+ if (main->subversionfile < 4) {
+ for (sce = main->scene.first; sce; sce = sce->id.next) {
+ sce->r.bake_mode = 1; /* prevent to include render stuff here */
+ sce->r.bake_filter = 2;
+ sce->r.bake_osa = 5;
+ sce->r.bake_flag = R_BAKE_CLEAR;
+ }
+ }
+
+ if (main->subversionfile < 5) {
+ for (sce = main->scene.first; sce; sce = sce->id.next) {
+ /* improved triangle to quad conversion settings */
+ if (sce->toolsettings->jointrilimit == 0.0f)
+ sce->toolsettings->jointrilimit = 0.8f;
+ }
+ }
+ }
+
+ if (main->versionfile <= 243) {
+ Object *ob = main->object.first;
+ Material *ma;
+
+ for (ma = main->mat.first; ma; ma = ma->id.next) {
+ if (ma->sss_scale == 0.0f) {
+ ma->sss_radius[0] = 1.0f;
+ ma->sss_radius[1] = 1.0f;
+ ma->sss_radius[2] = 1.0f;
+ ma->sss_col[0] = 0.8f;
+ ma->sss_col[1] = 0.8f;
+ ma->sss_col[2] = 0.8f;
+ ma->sss_error = 0.05f;
+ ma->sss_scale = 0.1f;
+ ma->sss_ior = 1.3f;
+ ma->sss_colfac = 1.0f;
+ ma->sss_texfac = 0.0f;
+ }
+ if (ma->sss_front == 0 && ma->sss_back == 0) {
+ ma->sss_front = 1.0f;
+ ma->sss_back = 1.0f;
+ }
+ if (ma->sss_col[0] == 0 && ma->sss_col[1] == 0 && ma->sss_col[2] == 0) {
+ ma->sss_col[0] = ma->r;
+ ma->sss_col[1] = ma->g;
+ ma->sss_col[2] = ma->b;
+ }
+ }
+
+ for (; ob; ob = ob->id.next) {
+ bDeformGroup *curdef;
+
+ for (curdef = ob->defbase.first; curdef; curdef = curdef->next) {
+ /* replace an empty-string name with unique name */
+ if (curdef->name[0] == '\0') {
+ defgroup_unique_name(curdef, ob);
+ }
+ }
+
+ if (main->versionfile < 243 || main->subversionfile < 1) {
+ ModifierData *md;
+
+ /* translate old mirror modifier axis values to new flags */
+ for (md = ob->modifiers.first; md; md = md->next) {
+ if (md->type == eModifierType_Mirror) {
+ MirrorModifierData *mmd = (MirrorModifierData*) md;
+
+ switch (mmd->axis) {
+ case 0:
+ mmd->flag |= MOD_MIR_AXIS_X;
+ break;
+ case 1:
+ mmd->flag |= MOD_MIR_AXIS_Y;
+ break;
+ case 2:
+ mmd->flag |= MOD_MIR_AXIS_Z;
+ break;
+ }
+
+ mmd->axis = 0;
+ }
+ }
+ }
+ }
+
+ /* render layer added, this is not the active layer */
+ if (main->versionfile <= 243 || main->subversionfile < 2) {
+ Mesh *me;
+ for (me = main->mesh.first; me; me = me->id.next)
+ customdata_version_243(me);
+ }
+
+ }
+
+ if (main->versionfile <= 244) {
+ Scene *sce;
+ bScreen *sc;
+ Lamp *la;
+ World *wrld;
+
+ if (main->versionfile != 244 || main->subversionfile < 2) {
+ for (sce = main->scene.first; sce; sce = sce->id.next)
+ sce->r.mode |= R_SSS;
+
+ /* correct older action editors - incorrect scrolling */
+ for (sc = main->screen.first; sc; sc = sc->id.next) {
+ ScrArea *sa;
+ sa = sc->areabase.first;
+ while (sa) {
+ SpaceLink *sl;
+
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_ACTION) {
+ SpaceAction *saction = (SpaceAction*) sl;
+
+ saction->v2d.tot.ymin = -1000.0;
+ saction->v2d.tot.ymax = 0.0;
+
+ saction->v2d.cur.ymin = -75.0;
+ saction->v2d.cur.ymax = 5.0;
+ }
+ }
+ sa = sa->next;
+ }
+ }
+ }
+
+ if (main->versionfile != 244 || main->subversionfile < 3) {
+ /* constraints recode version patch used to be here. Moved to 245 now... */
+
+ for (wrld = main->world.first; wrld; wrld = wrld->id.next) {
+ if (wrld->mode & WO_AMB_OCC)
+ wrld->ao_samp_method = WO_AOSAMP_CONSTANT;
+ else
+ wrld->ao_samp_method = WO_AOSAMP_HAMMERSLEY;
+
+ wrld->ao_adapt_thresh = 0.005f;
+ }
+
+ for (la = main->lamp.first; la; la = la->id.next) {
+ if (la->type == LA_AREA)
+ la->ray_samp_method = LA_SAMP_CONSTANT;
+ else
+ la->ray_samp_method = LA_SAMP_HALTON;
+
+ la->adapt_thresh = 0.001f;
+ }
+ }
+ }
+
+ if (main->versionfile <= 245) {
+ Scene *sce;
+ Object *ob;
+ Image *ima;
+ Lamp *la;
+ Material *ma;
+ ParticleSettings *part;
+ World *wrld;
+ Mesh *me;
+ bNodeTree *ntree;
+ Tex *tex;
+ ModifierData *md;
+ ParticleSystem *psys;
+
+ /* unless the file was created 2.44.3 but not 2.45, update the constraints */
+ if (!(main->versionfile == 244 && main->subversionfile == 3) &&
+ ((main->versionfile < 245) || (main->versionfile == 245 && main->subversionfile == 0)) )
+ {
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ ListBase *list;
+ list = &ob->constraints;
+
+ /* fix up constraints due to constraint recode changes (originally at 2.44.3) */
+ if (list) {
+ bConstraint *curcon;
+ for (curcon = list->first; curcon; curcon = curcon->next) {
+ /* old CONSTRAINT_LOCAL check -> convert to CONSTRAINT_SPACE_LOCAL */
+ if (curcon->flag & 0x20) {
+ curcon->ownspace = CONSTRAINT_SPACE_LOCAL;
+ curcon->tarspace = CONSTRAINT_SPACE_LOCAL;
+ }
+
+ switch (curcon->type) {
+ case CONSTRAINT_TYPE_LOCLIMIT:
+ {
+ bLocLimitConstraint *data = (bLocLimitConstraint *) curcon->data;
+
+ /* old limit without parent option for objects */
+ if (data->flag2)
+ curcon->ownspace = CONSTRAINT_SPACE_LOCAL;
+ }
+ break;
+ }
+ }
+ }
+
+ /* correctly initialize constinv matrix */
+ unit_m4(ob->constinv);
+
+ if (ob->type == OB_ARMATURE) {
+ if (ob->pose) {
+ bConstraint *curcon;
+ bPoseChannel *pchan;
+
+ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
+ /* make sure constraints are all up to date */
+ for (curcon = pchan->constraints.first; curcon; curcon = curcon->next) {
+ /* old CONSTRAINT_LOCAL check -> convert to CONSTRAINT_SPACE_LOCAL */
+ if (curcon->flag & 0x20) {
+ curcon->ownspace = CONSTRAINT_SPACE_LOCAL;
+ curcon->tarspace = CONSTRAINT_SPACE_LOCAL;
+ }
+
+ switch (curcon->type) {
+ case CONSTRAINT_TYPE_ACTION:
+ {
+ bActionConstraint *data = (bActionConstraint *) curcon->data;
+
+ /* 'data->local' used to mean that target was in local-space */
+ if (data->local)
+ curcon->tarspace = CONSTRAINT_SPACE_LOCAL;
+ }
+ break;
+ }
+ }
+
+ /* correctly initialize constinv matrix */
+ unit_m4(pchan->constinv);
+ }
+ }
+ }
+ }
+ }
+
+ /* fix all versions before 2.45 */
+ if (main->versionfile != 245) {
+
+ /* repair preview from 242 - 244*/
+ for (ima = main->image.first; ima; ima = ima->id.next) {
+ ima->preview = NULL;
+ }
+ }
+
+ /* add point caches */
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ if (ob->soft && !ob->soft->pointcache)
+ ob->soft->pointcache = BKE_ptcache_add(&ob->soft->ptcaches);
+
+ for (psys = ob->particlesystem.first; psys; psys = psys->next) {
+ if (psys->pointcache) {
+ if (psys->pointcache->flag & PTCACHE_BAKED && (psys->pointcache->flag & PTCACHE_DISK_CACHE) == 0) {
+ printf("Old memory cache isn't supported for particles, so re-bake the simulation!\n");
+ psys->pointcache->flag &= ~PTCACHE_BAKED;
+ }
+ }
+ else
+ psys->pointcache = BKE_ptcache_add(&psys->ptcaches);
+ }
+
+ for (md = ob->modifiers.first; md; md = md->next) {
+ if (md->type == eModifierType_Cloth) {
+ ClothModifierData *clmd = (ClothModifierData*) md;
+ if (!clmd->point_cache)
+ clmd->point_cache = BKE_ptcache_add(&clmd->ptcaches);
+ }
+ }
+ }
+
+ /* Copy over old per-level multires vertex data
+ * into a single vertex array in struct Multires */
+ for (me = main->mesh.first; me; me = me->id.next) {
+ if (me->mr && !me->mr->verts) {
+ MultiresLevel *lvl = me->mr->levels.last;
+ if (lvl) {
+ me->mr->verts = lvl->verts;
+ lvl->verts = NULL;
+ /* Don't need the other vert arrays */
+ for (lvl = lvl->prev; lvl; lvl = lvl->prev) {
+ MEM_freeN(lvl->verts);
+ lvl->verts = NULL;
+ }
+ }
+ }
+ }
+
+ if (main->versionfile != 245 || main->subversionfile < 1) {
+ for (la = main->lamp.first; la; la = la->id.next) {
+ if (la->mode & LA_QUAD)
+ la->falloff_type = LA_FALLOFF_SLIDERS;
+ else
+ la->falloff_type = LA_FALLOFF_INVLINEAR;
+
+ if (la->curfalloff == NULL) {
+ la->curfalloff = curvemapping_add(1, 0.0f, 1.0f, 1.0f, 0.0f);
+ curvemapping_initialize(la->curfalloff);
+ }
+ }
+ }
+
+ for (ma = main->mat.first; ma; ma = ma->id.next) {
+ if (ma->samp_gloss_mir == 0) {
+ ma->gloss_mir = ma->gloss_tra = 1.0f;
+ ma->aniso_gloss_mir = 1.0f;
+ ma->samp_gloss_mir = ma->samp_gloss_tra = 18;
+ ma->adapt_thresh_mir = ma->adapt_thresh_tra = 0.005f;
+ ma->dist_mir = 0.0f;
+ ma->fadeto_mir = MA_RAYMIR_FADETOSKY;
+ }
+
+ if (ma->strand_min == 0.0f)
+ ma->strand_min = 1.0f;
+ }
+
+ for (part = main->particle.first; part; part = part->id.next) {
+ if (part->ren_child_nbr == 0)
+ part->ren_child_nbr = part->child_nbr;
+
+ if (part->simplify_refsize == 0) {
+ part->simplify_refsize = 1920;
+ part->simplify_rate = 1.0f;
+ part->simplify_transition = 0.1f;
+ part->simplify_viewport = 0.8f;
+ }
+ }
+
+ for (wrld = main->world.first; wrld; wrld = wrld->id.next) {
+ if (wrld->ao_approx_error == 0.0f)
+ wrld->ao_approx_error = 0.25f;
+ }
+
+ for (sce = main->scene.first; sce; sce = sce->id.next) {
+ if (sce->nodetree)
+ ntree_version_245(fd, lib, sce->nodetree);
+
+ if (sce->r.simplify_shadowsamples == 0) {
+ sce->r.simplify_subsurf = 6;
+ sce->r.simplify_particles = 1.0f;
+ sce->r.simplify_shadowsamples = 16;
+ sce->r.simplify_aosss = 1.0f;
+ }
+
+ if (sce->r.cineongamma == 0) {
+ sce->r.cineonblack = 95;
+ sce->r.cineonwhite = 685;
+ sce->r.cineongamma = 1.7f;
+ }
+ }
+
+ for (ntree = main->nodetree.first; ntree; ntree = ntree->id.next)
+ ntree_version_245(fd, lib, ntree);
+
+ /* fix for temporary flag changes during 245 cycle */
+ for (ima = main->image.first; ima; ima = ima->id.next) {
+ if (ima->flag & IMA_OLD_PREMUL) {
+ ima->flag &= ~IMA_OLD_PREMUL;
+ ima->flag |= IMA_DO_PREMUL;
+ }
+ }
+
+ for (tex = main->tex.first; tex; tex = tex->id.next) {
+ if (tex->iuser.flag & IMA_OLD_PREMUL) {
+ tex->iuser.flag &= ~IMA_OLD_PREMUL;
+ tex->iuser.flag |= IMA_DO_PREMUL;
+ }
+
+ ima = blo_do_versions_newlibadr(fd, lib, tex->ima);
+ if (ima && (tex->iuser.flag & IMA_DO_PREMUL)) {
+ ima->flag &= ~IMA_OLD_PREMUL;
+ ima->flag |= IMA_DO_PREMUL;
+ }
+ }
+ }
+
+ /* sanity check for skgen */
+ {
+ Scene *sce;
+ for (sce = main->scene.first; sce; sce = sce->id.next) {
+ if (sce->toolsettings->skgen_subdivisions[0] == sce->toolsettings->skgen_subdivisions[1] ||
+ sce->toolsettings->skgen_subdivisions[0] == sce->toolsettings->skgen_subdivisions[2] ||
+ sce->toolsettings->skgen_subdivisions[1] == sce->toolsettings->skgen_subdivisions[2])
+ {
+ sce->toolsettings->skgen_subdivisions[0] = SKGEN_SUB_CORRELATION;
+ sce->toolsettings->skgen_subdivisions[1] = SKGEN_SUB_LENGTH;
+ sce->toolsettings->skgen_subdivisions[2] = SKGEN_SUB_ANGLE;
+ }
+ }
+ }
+
+
+ if ((main->versionfile < 245) || (main->versionfile == 245 && main->subversionfile < 2)) {
+ Image *ima;
+
+ /* initialize 1:1 Aspect */
+ for (ima = main->image.first; ima; ima = ima->id.next) {
+ ima->aspx = ima->aspy = 1.0f;
+ }
+ }
+
+ if ((main->versionfile < 245) || (main->versionfile == 245 && main->subversionfile < 4)) {
+ bArmature *arm;
+ ModifierData *md;
+ Object *ob;
+
+ for (arm = main->armature.first; arm; arm = arm->id.next)
+ arm->deformflag |= ARM_DEF_B_BONE_REST;
+
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ for (md = ob->modifiers.first; md; md = md->next) {
+ if (md->type == eModifierType_Armature)
+ ((ArmatureModifierData*) md)->deformflag |= ARM_DEF_B_BONE_REST;
+ }
+ }
+ }
+
+ if ((main->versionfile < 245) || (main->versionfile == 245 && main->subversionfile < 5)) {
+ /* foreground color needs to be something other then black */
+ Scene *sce;
+ for (sce = main->scene.first; sce; sce = sce->id.next) {
+ sce->r.fg_stamp[0] = sce->r.fg_stamp[1] = sce->r.fg_stamp[2] = 0.8f;
+ sce->r.fg_stamp[3] = 1.0f; /* don't use text alpha yet */
+ sce->r.bg_stamp[3] = 0.25f; /* make sure the background has full alpha */
+ }
+ }
+
+
+ if ((main->versionfile < 245) || (main->versionfile == 245 && main->subversionfile < 6)) {
+ Scene *sce;
+ /* fix frs_sec_base */
+ for (sce = main->scene.first; sce; sce = sce->id.next) {
+ if (sce->r.frs_sec_base == 0) {
+ sce->r.frs_sec_base = 1;
+ }
+ }
+ }
+
+ if ((main->versionfile < 245) || (main->versionfile == 245 && main->subversionfile < 7)) {
+ Object *ob;
+ bPoseChannel *pchan;
+ bConstraint *con;
+ bConstraintTarget *ct;
+
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ if (ob->pose) {
+ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
+ for (con = pchan->constraints.first; con; con = con->next) {
+ if (con->type == CONSTRAINT_TYPE_PYTHON) {
+ bPythonConstraint *data = (bPythonConstraint *)con->data;
+ if (data->tar) {
+ /* version patching needs to be done */
+ ct = MEM_callocN(sizeof(bConstraintTarget), "PyConTarget");
+
+ ct->tar = data->tar;
+ BLI_strncpy(ct->subtarget, data->subtarget, sizeof(ct->subtarget));
+ ct->space = con->tarspace;
+
+ BLI_addtail(&data->targets, ct);
+ data->tarnum++;
+
+ /* clear old targets to avoid problems */
+ data->tar = NULL;
+ data->subtarget[0] = '\0';
+ }
+ }
+ else if (con->type == CONSTRAINT_TYPE_LOCLIKE) {
+ bLocateLikeConstraint *data = (bLocateLikeConstraint *)con->data;
+
+ /* new headtail functionality makes Bone-Tip function obsolete */
+ if (data->flag & LOCLIKE_TIP)
+ con->headtail = 1.0f;
+ }
+ }
+ }
+ }
+
+ for (con = ob->constraints.first; con; con = con->next) {
+ if (con->type == CONSTRAINT_TYPE_PYTHON) {
+ bPythonConstraint *data = (bPythonConstraint *)con->data;
+ if (data->tar) {
+ /* version patching needs to be done */
+ ct = MEM_callocN(sizeof(bConstraintTarget), "PyConTarget");
+
+ ct->tar = data->tar;
+ BLI_strncpy(ct->subtarget, data->subtarget, sizeof(ct->subtarget));
+ ct->space = con->tarspace;
+
+ BLI_addtail(&data->targets, ct);
+ data->tarnum++;
+
+ /* clear old targets to avoid problems */
+ data->tar = NULL;
+ data->subtarget[0] = '\0';
+ }
+ }
+ else if (con->type == CONSTRAINT_TYPE_LOCLIKE) {
+ bLocateLikeConstraint *data = (bLocateLikeConstraint *)con->data;
+
+ /* new headtail functionality makes Bone-Tip function obsolete */
+ if (data->flag & LOCLIKE_TIP)
+ con->headtail = 1.0f;
+ }
+ }
+
+ if (ob->soft && ob->soft->keys) {
+ SoftBody *sb = ob->soft;
+ int k;
+
+ for (k = 0; k < sb->totkey; k++) {
+ if (sb->keys[k])
+ MEM_freeN(sb->keys[k]);
+ }
+
+ MEM_freeN(sb->keys);
+
+ sb->keys = NULL;
+ sb->totkey = 0;
+ }
+ }
+ }
+
+ if ((main->versionfile < 245) || (main->versionfile == 245 && main->subversionfile < 8)) {
+ Scene *sce;
+ Object *ob;
+ PartEff *paf = NULL;
+
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ if (ob->soft && ob->soft->keys) {
+ SoftBody *sb = ob->soft;
+ int k;
+
+ for (k = 0; k < sb->totkey; k++) {
+ if (sb->keys[k])
+ MEM_freeN(sb->keys[k]);
+ }
+
+ MEM_freeN(sb->keys);
+
+ sb->keys = NULL;
+ sb->totkey = 0;
+ }
+
+ /* convert old particles to new system */
+ if ((paf = blo_do_version_give_parteff_245(ob))) {
+ ParticleSystem *psys;
+ ModifierData *md;
+ ParticleSystemModifierData *psmd;
+ ParticleSettings *part;
+
+ /* create new particle system */
+ psys = MEM_callocN(sizeof(ParticleSystem), "particle_system");
+ psys->pointcache = BKE_ptcache_add(&psys->ptcaches);
+
+ part = psys->part = psys_new_settings("ParticleSettings", main);
+
+ /* needed for proper libdata lookup */
+ blo_do_versions_oldnewmap_insert(fd->libmap, psys->part, psys->part, 0);
+ part->id.lib = ob->id.lib;
+
+ part->id.us--;
+ part->id.flag |= (ob->id.flag & LIB_NEEDLINK);
+
+ psys->totpart = 0;
+ psys->flag = PSYS_ENABLED|PSYS_CURRENT;
+
+ BLI_addtail(&ob->particlesystem, psys);
+
+ md = modifier_new(eModifierType_ParticleSystem);
+ BLI_snprintf(md->name, sizeof(md->name), "ParticleSystem %i", BLI_countlist(&ob->particlesystem));
+ psmd = (ParticleSystemModifierData*) md;
+ psmd->psys = psys;
+ BLI_addtail(&ob->modifiers, md);
+
+ /* convert settings from old particle system */
+ /* general settings */
+ part->totpart = MIN2(paf->totpart, 100000);
+ part->sta = paf->sta;
+ part->end = paf->end;
+ part->lifetime = paf->lifetime;
+ part->randlife = paf->randlife;
+ psys->seed = paf->seed;
+ part->disp = paf->disp;
+ part->omat = paf->mat[0];
+ part->hair_step = paf->totkey;
+
+ part->eff_group = paf->group;
+
+ /* old system didn't interpolate between keypoints at render time */
+ part->draw_step = part->ren_step = 0;
+
+ /* physics */
+ part->normfac = paf->normfac * 25.0f;
+ part->obfac = paf->obfac;
+ part->randfac = paf->randfac * 25.0f;
+ part->dampfac = paf->damp;
+ copy_v3_v3(part->acc, paf->force);
+
+ /* flags */
+ if (paf->stype & PAF_VECT) {
+ if (paf->flag & PAF_STATIC) {
+ /* new hair lifetime is always 100.0f */
+ float fac = paf->lifetime / 100.0f;
+
+ part->draw_as = PART_DRAW_PATH;
+ part->type = PART_HAIR;
+ psys->recalc |= PSYS_RECALC_REDO;
+
+ part->normfac *= fac;
+ part->randfac *= fac;
+ }
+ else {
+ part->draw_as = PART_DRAW_LINE;
+ part->draw |= PART_DRAW_VEL_LENGTH;
+ part->draw_line[1] = 0.04f;
+ }
+ }
+
+ part->rotmode = PART_ROT_VEL;
+
+ part->flag |= (paf->flag & PAF_BSPLINE) ? PART_HAIR_BSPLINE : 0;
+ part->flag |= (paf->flag & PAF_TRAND) ? PART_TRAND : 0;
+ part->flag |= (paf->flag & PAF_EDISTR) ? PART_EDISTR : 0;
+ part->flag |= (paf->flag & PAF_UNBORN) ? PART_UNBORN : 0;
+ part->flag |= (paf->flag & PAF_DIED) ? PART_DIED : 0;
+ part->from |= (paf->flag & PAF_FACE) ? PART_FROM_FACE : 0;
+ part->draw |= (paf->flag & PAF_SHOWE) ? PART_DRAW_EMITTER : 0;
+
+ psys->vgroup[PSYS_VG_DENSITY] = paf->vertgroup;
+ psys->vgroup[PSYS_VG_VEL] = paf->vertgroup_v;
+ psys->vgroup[PSYS_VG_LENGTH] = paf->vertgroup_v;
+
+ /* dupliobjects */
+ if (ob->transflag & OB_DUPLIVERTS) {
+ Object *dup = main->object.first;
+
+ for (; dup; dup = dup->id.next) {
+ if (ob == blo_do_versions_newlibadr(fd, lib, dup->parent)) {
+ part->dup_ob = dup;
+ ob->transflag |= OB_DUPLIPARTS;
+ ob->transflag &= ~OB_DUPLIVERTS;
+
+ part->draw_as = PART_DRAW_OB;
+
+ /* needed for proper libdata lookup */
+ blo_do_versions_oldnewmap_insert(fd->libmap, dup, dup, 0);
+ }
+ }
+ }
+
+ {
+ FluidsimModifierData *fluidmd = (FluidsimModifierData *)modifiers_findByType(ob, eModifierType_Fluidsim);
+ if (fluidmd && fluidmd->fss && fluidmd->fss->type == OB_FLUIDSIM_PARTICLE)
+ part->type = PART_FLUID;
+ }
+
+ do_version_free_effects_245(&ob->effect);
+
+ printf("Old particle system converted to new system.\n");
+ }
+ }
+
+ for (sce = main->scene.first; sce; sce = sce->id.next) {
+ ParticleEditSettings *pset = &sce->toolsettings->particle;
+ int a;
+
+ if (pset->brush[0].size == 0) {
+ pset->flag = PE_KEEP_LENGTHS|PE_LOCK_FIRST|PE_DEFLECT_EMITTER;
+ pset->emitterdist = 0.25f;
+ pset->totrekey = 5;
+ pset->totaddkey = 5;
+ pset->brushtype = PE_BRUSH_NONE;
+
+ for (a = 0; a < PE_TOT_BRUSH; a++) {
+ pset->brush[a].strength = 50;
+ pset->brush[a].size = 50;
+ pset->brush[a].step = 10;
+ }
+
+ pset->brush[PE_BRUSH_CUT].strength = 100;
+ }
+ }
+ }
+ if ((main->versionfile < 245) || (main->versionfile == 245 && main->subversionfile < 9)) {
+ Material *ma;
+ int a;
+
+ for (ma = main->mat.first; ma; ma = ma->id.next)
+ if (ma->mode & MA_NORMAP_TANG)
+ for (a = 0; a < MAX_MTEX; a++)
+ if (ma->mtex[a] && ma->mtex[a]->tex)
+ ma->mtex[a]->normapspace = MTEX_NSPACE_TANGENT;
+ }
+
+ if ((main->versionfile < 245) || (main->versionfile == 245 && main->subversionfile < 10)) {
+ Object *ob;
+
+ /* dupliface scale */
+ for (ob = main->object.first; ob; ob = ob->id.next)
+ ob->dupfacesca = 1.0f;
+ }
+
+ if ((main->versionfile < 245) || (main->versionfile == 245 && main->subversionfile < 11)) {
+ Object *ob;
+ bActionStrip *strip;
+
+ /* nla-strips - scale */
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ for (strip = ob->nlastrips.first; strip; strip = strip->next) {
+ float length, actlength, repeat;
+
+ if (strip->flag & ACTSTRIP_USESTRIDE)
+ repeat = 1.0f;
+ else
+ repeat = strip->repeat;
+
+ length = strip->end-strip->start;
+ if (length == 0.0f)
+ length = 1.0f;
+ actlength = strip->actend-strip->actstart;
+
+ strip->scale = length / (repeat * actlength);
+ if (strip->scale == 0.0f)
+ strip->scale = 1.0f;
+ }
+ if (ob->soft) {
+ ob->soft->inpush = ob->soft->inspring;
+ ob->soft->shearstiff = 1.0f;
+ }
+ }
+ }
+
+ if ((main->versionfile < 245) || (main->versionfile == 245 && main->subversionfile < 14)) {
+ Scene *sce;
+ Sequence *seq;
+
+ for (sce = main->scene.first; sce; sce = sce->id.next) {
+ SEQ_BEGIN (sce->ed, seq)
+ {
+ if (seq->blend_mode == 0)
+ seq->blend_opacity = 100.0f;
+ }
+ SEQ_END
+ }
+ }
+
+ /* fix broken group lengths in id properties */
+ if ((main->versionfile < 245) || (main->versionfile == 245 && main->subversionfile < 15)) {
+ idproperties_fix_group_lengths(main->scene);
+ idproperties_fix_group_lengths(main->library);
+ idproperties_fix_group_lengths(main->object);
+ idproperties_fix_group_lengths(main->mesh);
+ idproperties_fix_group_lengths(main->curve);
+ idproperties_fix_group_lengths(main->mball);
+ idproperties_fix_group_lengths(main->mat);
+ idproperties_fix_group_lengths(main->tex);
+ idproperties_fix_group_lengths(main->image);
+ idproperties_fix_group_lengths(main->latt);
+ idproperties_fix_group_lengths(main->lamp);
+ idproperties_fix_group_lengths(main->camera);
+ idproperties_fix_group_lengths(main->ipo);
+ idproperties_fix_group_lengths(main->key);
+ idproperties_fix_group_lengths(main->world);
+ idproperties_fix_group_lengths(main->screen);
+ idproperties_fix_group_lengths(main->script);
+ idproperties_fix_group_lengths(main->vfont);
+ idproperties_fix_group_lengths(main->text);
+ idproperties_fix_group_lengths(main->sound);
+ idproperties_fix_group_lengths(main->group);
+ idproperties_fix_group_lengths(main->armature);
+ idproperties_fix_group_lengths(main->action);
+ idproperties_fix_group_lengths(main->nodetree);
+ idproperties_fix_group_lengths(main->brush);
+ idproperties_fix_group_lengths(main->particle);
+ }
+
+ /* sun/sky */
+ if (main->versionfile < 246) {
+ Object *ob;
+ bActuator *act;
+
+ /* dRot actuator change direction in 2.46 */
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ for (act = ob->actuators.first; act; act = act->next) {
+ if (act->type == ACT_OBJECT) {
+ bObjectActuator *ba = act->data;
+
+ ba->drot[0] = -ba->drot[0];
+ ba->drot[1] = -ba->drot[1];
+ ba->drot[2] = -ba->drot[2];
+ }
+ }
+ }
+ }
+
+ /* convert fluids to modifier */
+ if (main->versionfile < 246 || (main->versionfile == 246 && main->subversionfile < 1)) {
+ Object *ob;
+
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ if (ob->fluidsimSettings) {
+ FluidsimModifierData *fluidmd = (FluidsimModifierData *)modifier_new(eModifierType_Fluidsim);
+ BLI_addhead(&ob->modifiers, (ModifierData *)fluidmd);
+
+ MEM_freeN(fluidmd->fss);
+ fluidmd->fss = MEM_dupallocN(ob->fluidsimSettings);
+ fluidmd->fss->ipo = blo_do_versions_newlibadr_us(fd, ob->id.lib, ob->fluidsimSettings->ipo);
+ MEM_freeN(ob->fluidsimSettings);
+
+ fluidmd->fss->lastgoodframe = INT_MAX;
+ fluidmd->fss->flag = 0;
+ fluidmd->fss->meshVelocities = NULL;
+ }
+ }
+ }
+
+
+ if (main->versionfile < 246 || (main->versionfile == 246 && main->subversionfile < 1)) {
+ Mesh *me;
+
+ for (me = main->mesh.first; me; me = me->id.next)
+ alphasort_version_246(fd, lib, me);
+ }
+
+ if (main->versionfile < 246 || (main->versionfile == 246 && main->subversionfile < 1)) {
+ Object *ob;
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ if (ob->pd && (ob->pd->forcefield == PFIELD_WIND))
+ ob->pd->f_noise = 0.0f;
+ }
+ }
+
+ if (main->versionfile < 247 || (main->versionfile == 247 && main->subversionfile < 2)) {
+ Object *ob;
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ ob->gameflag |= OB_COLLISION;
+ ob->margin = 0.06f;
+ }
+ }
+
+ if (main->versionfile < 247 || (main->versionfile == 247 && main->subversionfile < 3)) {
+ Object *ob;
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ /* Starting from subversion 3, ACTOR is a separate feature.
+ * Before it was conditioning all the other dynamic flags */
+ if (!(ob->gameflag & OB_ACTOR))
+ ob->gameflag &= ~(OB_GHOST|OB_DYNAMIC|OB_RIGID_BODY|OB_SOFT_BODY|OB_COLLISION_RESPONSE);
+ /* suitable default for older files */
+ }
+ }
+
+ if (main->versionfile < 247 || (main->versionfile == 247 && main->subversionfile < 5)) {
+ Lamp *la = main->lamp.first;
+ for (; la; la = la->id.next) {
+ la->skyblendtype = MA_RAMP_ADD;
+ la->skyblendfac = 1.0f;
+ }
+ }
+
+ /* set the curve radius interpolation to 2.47 default - easy */
+ if (main->versionfile < 247 || (main->versionfile == 247 && main->subversionfile < 6)) {
+ Curve *cu;
+ Nurb *nu;
+
+ for (cu = main->curve.first; cu; cu = cu->id.next) {
+ for (nu = cu->nurb.first; nu; nu = nu->next) {
+ if (nu) {
+ nu->radius_interp = 3;
+
+ /* resolu and resolv are now used differently for surfaces
+ * rather than using the resolution to define the entire number of divisions,
+ * use it for the number of divisions per segment
+ */
+ if (nu->pntsv > 1) {
+ nu->resolu = MAX2( 1, (int)(((float)nu->resolu / (float)nu->pntsu)+0.5f) );
+ nu->resolv = MAX2( 1, (int)(((float)nu->resolv / (float)nu->pntsv)+0.5f) );
+ }
+ }
+ }
+ }
+ }
+
+ /* direction constraint actuators were always local in previous version */
+ if (main->versionfile < 247 || (main->versionfile == 247 && main->subversionfile < 7)) {
+ bActuator *act;
+ Object *ob;
+
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ for (act = ob->actuators.first; act; act = act->next) {
+ if (act->type == ACT_CONSTRAINT) {
+ bConstraintActuator *coa = act->data;
+ if (coa->type == ACT_CONST_TYPE_DIST) {
+ coa->flag |= ACT_CONST_LOCAL;
+ }
+ }
+ }
+ }
+ }
+
+ if (main->versionfile < 247 || (main->versionfile == 247 && main->subversionfile < 9)) {
+ Lamp *la = main->lamp.first;
+ for (; la; la = la->id.next) {
+ la->sky_exposure = 1.0f;
+ }
+ }
+
+ /* BGE message actuators needed OB prefix, very confusing */
+ if (main->versionfile < 247 || (main->versionfile == 247 && main->subversionfile < 10)) {
+ bActuator *act;
+ Object *ob;
+
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ for (act = ob->actuators.first; act; act = act->next) {
+ if (act->type == ACT_MESSAGE) {
+ bMessageActuator *msgAct = (bMessageActuator *) act->data;
+
+ if (BLI_strnlen(msgAct->toPropName, 3) > 2) {
+ /* strip first 2 chars, would have only worked if these were OB anyway */
+ memmove(msgAct->toPropName, msgAct->toPropName + 2, sizeof(msgAct->toPropName) - 2);
+ }
+ else {
+ msgAct->toPropName[0] = '\0';
+ }
+ }
+ }
+ }
+ }
+
+ if (main->versionfile < 248) {
+ Lamp *la;
+
+ for (la = main->lamp.first; la; la = la->id.next) {
+ if (la->atm_turbidity == 0.0f) {
+ la->sun_effect_type = 0;
+ la->horizon_brightness = 1.0f;
+ la->spread = 1.0f;
+ la->sun_brightness = 1.0f;
+ la->sun_size = 1.0f;
+ la->backscattered_light = 1.0f;
+ la->atm_turbidity = 2.0f;
+ la->atm_inscattering_factor = 1.0f;
+ la->atm_extinction_factor = 1.0f;
+ la->atm_distance_factor = 1.0f;
+ la->sun_intensity = 1.0f;
+ }
+ }
+ }
+
+ if (main->versionfile < 248 || (main->versionfile == 248 && main->subversionfile < 2)) {
+ Scene *sce;
+
+ /* Note, these will need to be added for painting */
+ for (sce = main->scene.first; sce; sce = sce->id.next) {
+ sce->toolsettings->imapaint.seam_bleed = 2;
+ sce->toolsettings->imapaint.normal_angle = 80;
+
+ /* initialize skeleton generation toolsettings */
+ sce->toolsettings->skgen_resolution = 250;
+ sce->toolsettings->skgen_threshold_internal = 0.1f;
+ sce->toolsettings->skgen_threshold_external = 0.1f;
+ sce->toolsettings->skgen_angle_limit = 30.0f;
+ sce->toolsettings->skgen_length_ratio = 1.3f;
+ sce->toolsettings->skgen_length_limit = 1.5f;
+ sce->toolsettings->skgen_correlation_limit = 0.98f;
+ sce->toolsettings->skgen_symmetry_limit = 0.1f;
+ sce->toolsettings->skgen_postpro = SKGEN_SMOOTH;
+ sce->toolsettings->skgen_postpro_passes = 3;
+ sce->toolsettings->skgen_options = SKGEN_FILTER_INTERNAL|SKGEN_FILTER_EXTERNAL|SKGEN_FILTER_SMART|SKGEN_SUB_CORRELATION|SKGEN_HARMONIC;
+ sce->toolsettings->skgen_subdivisions[0] = SKGEN_SUB_CORRELATION;
+ sce->toolsettings->skgen_subdivisions[1] = SKGEN_SUB_LENGTH;
+ sce->toolsettings->skgen_subdivisions[2] = SKGEN_SUB_ANGLE;
+
+
+ sce->toolsettings->skgen_retarget_angle_weight = 1.0f;
+ sce->toolsettings->skgen_retarget_length_weight = 1.0f;
+ sce->toolsettings->skgen_retarget_distance_weight = 1.0f;
+
+ /* Skeleton Sketching */
+ sce->toolsettings->bone_sketching = 0;
+ sce->toolsettings->skgen_retarget_roll = SK_RETARGET_ROLL_VIEW;
+ }
+ }
+
+ if (main->versionfile < 248 || (main->versionfile == 248 && main->subversionfile < 3)) {
+ bScreen *sc;
+
+ /* adjust default settings for Animation Editors */
+ for (sc = main->screen.first; sc; sc = sc->id.next) {
+ ScrArea *sa;
+
+ for (sa = sc->areabase.first; sa; sa = sa->next) {
+ SpaceLink *sl;
+
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ switch (sl->spacetype) {
+ case SPACE_ACTION:
+ {
+ SpaceAction *sact = (SpaceAction *)sl;
+
+ sact->mode = SACTCONT_DOPESHEET;
+ sact->autosnap = SACTSNAP_FRAME;
+ }
+ break;
+ case SPACE_IPO:
+ {
+ SpaceIpo *sipo = (SpaceIpo *)sl;
+ sipo->autosnap = SACTSNAP_FRAME;
+ }
+ break;
+ case SPACE_NLA:
+ {
+ SpaceNla *snla = (SpaceNla *)sl;
+ snla->autosnap = SACTSNAP_FRAME;
+ }
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ if (main->versionfile < 248 || (main->versionfile == 248 && main->subversionfile < 3)) {
+ Object *ob;
+
+ /* Adjustments needed after Bullets update */
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ ob->damping *= 0.635f;
+ ob->rdamping = 0.1f + (0.8f * ob->rdamping);
+ }
+ }
+
+ if (main->versionfile < 248 || (main->versionfile == 248 && main->subversionfile < 4)) {
+ Scene *sce;
+ World *wrld;
+
+ /* Dome (Fisheye) default parameters */
+ for (sce = main->scene.first; sce; sce = sce->id.next) {
+ sce->r.domeangle = 180;
+ sce->r.domemode = 1;
+ sce->r.domeres = 4;
+ sce->r.domeresbuf = 1.0f;
+ sce->r.dometilt = 0;
+ }
+ /* DBVT culling by default */
+ for (wrld = main->world.first; wrld; wrld = wrld->id.next) {
+ wrld->mode |= WO_DBVT_CULLING;
+ wrld->occlusionRes = 128;
+ }
+ }
+
+ if (main->versionfile < 248 || (main->versionfile == 248 && main->subversionfile < 5)) {
+ Object *ob;
+ World *wrld;
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ /* pad3 is used for m_contactProcessingThreshold */
+ ob->m_contactProcessingThreshold = 1.0f;
+ if (ob->parent) {
+ /* check if top parent has compound shape set and if yes, set this object
+ * to compound shaper as well (was the behavior before, now it's optional) */
+ Object *parent = blo_do_versions_newlibadr(fd, lib, ob->parent);
+ while (parent && parent != ob && parent->parent != NULL) {
+ parent = blo_do_versions_newlibadr(fd, lib, parent->parent);
+ }
+ if (parent) {
+ if (parent->gameflag & OB_CHILD)
+ ob->gameflag |= OB_CHILD;
+ }
+ }
+ }
+ for (wrld = main->world.first; wrld; wrld = wrld->id.next) {
+ wrld->ticrate = 60;
+ wrld->maxlogicstep = 5;
+ wrld->physubstep = 1;
+ wrld->maxphystep = 5;
+ }
+ }
+
+ /* correct introduce of seed for wind force */
+ if (main->versionfile < 249 && main->subversionfile < 1) {
+ Object *ob;
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ if (ob->pd)
+ ob->pd->seed = ((unsigned int)(ceil(PIL_check_seconds_timer())) + 1) % 128;
+ }
+
+ }
+
+ if (main->versionfile < 249 && main->subversionfile < 2) {
+ Scene *sce = main->scene.first;
+ Sequence *seq;
+ Editing *ed;
+
+ while (sce) {
+ ed = sce->ed;
+ if (ed) {
+ SEQP_BEGIN (ed, seq)
+ {
+ if (seq->strip && seq->strip->proxy) {
+ seq->strip->proxy->quality =90;
+ }
+ }
+ SEQ_END
+ }
+
+ sce = sce->id.next;
+ }
+ }
+}
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 0f2990a9157..91ce94ae6ed 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -239,7 +239,7 @@ static void writedata_free(WriteData *wd)
#define MYWRITE_FLUSH NULL
-static void mywrite( WriteData *wd, const void *adr, int len)
+static void mywrite(WriteData *wd, const void *adr, int len)
{
if (wd->error) return;
@@ -757,24 +757,30 @@ static void current_screen_compat(Main *mainvar, bScreen **screen)
*screen= (window)? window->screen: NULL;
}
+typedef struct RenderInfo {
+ int sfra;
+ int efra;
+ char scene_name[MAX_ID_NAME - 2];
+} RenderInfo;
+
static void write_renderinfo(WriteData *wd, Main *mainvar) /* for renderdeamon */
{
bScreen *curscreen;
Scene *sce;
- int data[8];
+ RenderInfo data;
/* XXX in future, handle multiple windows with multiple screnes? */
current_screen_compat(mainvar, &curscreen);
for (sce= mainvar->scene.first; sce; sce= sce->id.next) {
if (sce->id.lib==NULL && ( sce==curscreen->scene || (sce->r.scemode & R_BG_RENDER)) ) {
- data[0]= sce->r.sfra;
- data[1]= sce->r.efra;
+ data.sfra = sce->r.sfra;
+ data.efra = sce->r.efra;
+ memset(data.scene_name, 0, sizeof(data.scene_name));
- memset(data+2, 0, sizeof(int)*6);
- BLI_strncpy((char *)(data+2), sce->id.name+2, sizeof(sce->id.name)-2);
+ BLI_strncpy(data.scene_name, sce->id.name + 2, sizeof(data.scene_name));
- writedata(wd, REND, 32, data);
+ writedata(wd, REND, sizeof(data), &data);
}
}
}
@@ -831,7 +837,7 @@ static void write_boid_state(WriteData *wd, BoidState *state)
writestruct(wd, DATA, "BoidState", 1, state);
for (; rule; rule=rule->next) {
- switch(rule->type) {
+ switch (rule->type) {
case eBoidRuleType_Goal:
case eBoidRuleType_Avoid:
writestruct(wd, DATA, "BoidRuleGoalAvoid", 1, rule);
@@ -968,7 +974,7 @@ static void write_particlesystems(WriteData *wd, ListBase *particles)
writestruct(wd, DATA, "ParticleSystem", 1, psys);
if (psys->particles) {
- writestruct(wd, DATA, "ParticleData", psys->totpart ,psys->particles);
+ writestruct(wd, DATA, "ParticleData", psys->totpart, psys->particles);
if (psys->particles->hair) {
ParticleData *pa = psys->particles;
@@ -987,7 +993,7 @@ static void write_particlesystems(WriteData *wd, ListBase *particles)
for (; pt; pt=pt->next)
writestruct(wd, DATA, "ParticleTarget", 1, pt);
- if (psys->child) writestruct(wd, DATA, "ChildParticle", psys->totchild ,psys->child);
+ if (psys->child) writestruct(wd, DATA, "ChildParticle", psys->totchild, psys->child);
if (psys->clmd) {
writestruct(wd, DATA, "ClothModifierData", 1, psys->clmd);
@@ -1024,7 +1030,7 @@ static void write_sensors(WriteData *wd, ListBase *lb)
writedata(wd, DATA, sizeof(void *)*sens->totlinks, sens->links);
- switch(sens->type) {
+ switch (sens->type) {
case SENS_NEAR:
writestruct(wd, DATA, "bNearSensor", 1, sens->data);
break;
@@ -1085,7 +1091,7 @@ static void write_controllers(WriteData *wd, ListBase *lb)
writedata(wd, DATA, sizeof(void *)*cont->totlinks, cont->links);
- switch(cont->type) {
+ switch (cont->type) {
case CONT_EXPRESSION:
writestruct(wd, DATA, "bExpressionCont", 1, cont->data);
break;
@@ -1108,7 +1114,7 @@ static void write_actuators(WriteData *wd, ListBase *lb)
while (act) {
writestruct(wd, DATA, "bActuator", 1, act);
- switch(act->type) {
+ switch (act->type) {
case ACT_ACTION:
case ACT_SHAPEACTION:
writestruct(wd, DATA, "bActionActuator", 1, act->data);
@@ -1265,7 +1271,7 @@ static void write_pose(WriteData *wd, bPose *pose)
/* write IK param */
if (pose->ikparam) {
- char *structname = (char *)get_ikparam_name(pose);
+ char *structname = (char *)BKE_pose_ikparam_get_name(pose);
if (structname)
writestruct(wd, DATA, structname, 1, pose->ikparam);
}
@@ -1310,10 +1316,8 @@ static void write_modifiers(WriteData *wd, ListBase *modbase)
else if (md->type==eModifierType_Smoke) {
SmokeModifierData *smd = (SmokeModifierData*) md;
- if (smd->type & MOD_SMOKE_TYPE_DOMAIN)
- {
- if (smd->domain)
- {
+ if (smd->type & MOD_SMOKE_TYPE_DOMAIN) {
+ if (smd->domain) {
write_pointcaches(wd, &(smd->domain->ptcaches[0]));
/* create fake pointcache so that old blender versions can read it */
@@ -1347,8 +1351,7 @@ static void write_modifiers(WriteData *wd, ListBase *modbase)
else if (md->type==eModifierType_DynamicPaint) {
DynamicPaintModifierData *pmd = (DynamicPaintModifierData*) md;
- if (pmd->canvas)
- {
+ if (pmd->canvas) {
DynamicPaintSurface *surface;
writestruct(wd, DATA, "DynamicPaintCanvasSettings", 1, pmd->canvas);
@@ -1362,8 +1365,7 @@ static void write_modifiers(WriteData *wd, ListBase *modbase)
writestruct(wd, DATA, "EffectorWeights", 1, surface->effector_weights);
}
}
- if (pmd->brush)
- {
+ if (pmd->brush) {
writestruct(wd, DATA, "DynamicPaintBrushSettings", 1, pmd->brush);
writestruct(wd, DATA, "ColorBand", 1, pmd->brush->paint_ramp);
writestruct(wd, DATA, "ColorBand", 1, pmd->brush->vel_ramp);
@@ -1782,8 +1784,8 @@ static void write_meshs(WriteData *wd, ListBase *idbase)
/* now fill in polys to mfaces*/
- mesh->totface= mesh_mpoly_to_mface(&mesh->fdata, &backup_mesh.ldata, &backup_mesh.pdata,
- mesh->totface, backup_mesh.totloop, backup_mesh.totpoly);
+ mesh->totface = BKE_mesh_mpoly_to_mface(&mesh->fdata, &backup_mesh.ldata, &backup_mesh.pdata,
+ mesh->totface, backup_mesh.totloop, backup_mesh.totpoly);
mesh_update_customdata_pointers(mesh, FALSE);
@@ -2106,19 +2108,21 @@ static void write_scenes(WriteData *wd, ListBase *scebase)
/* reset write flags too */
- SEQ_BEGIN(ed, seq) {
+ SEQ_BEGIN (ed, seq)
+ {
if (seq->strip) seq->strip->done= 0;
writestruct(wd, DATA, "Sequence", 1, seq);
}
SEQ_END
- SEQ_BEGIN(ed, seq) {
+ SEQ_BEGIN (ed, seq)
+ {
if (seq->strip && seq->strip->done==0) {
/* write strip with 'done' at 0 because readfile */
if (seq->plugin) writestruct(wd, DATA, "PluginSeq", 1, seq->plugin);
if (seq->effectdata) {
- switch(seq->type) {
+ switch (seq->type) {
case SEQ_COLOR:
writestruct(wd, DATA, "SolidColorVars", 1, seq->effectdata);
break;
@@ -2252,7 +2256,7 @@ static void write_region(WriteData *wd, ARegion *ar, int spacetype)
writestruct(wd, DATA, "ARegion", 1, ar);
if (ar->regiondata) {
- switch(spacetype) {
+ switch (spacetype) {
case SPACE_VIEW3D:
if (ar->regiontype==RGN_TYPE_WINDOW) {
RegionView3D *rv3d= ar->regiondata;
@@ -2692,6 +2696,9 @@ static void write_movieclips(WriteData *wd, ListBase *idbase)
MovieTrackingObject *object;
writestruct(wd, ID_MC, "MovieClip", 1, clip);
+ if (clip->id.properties)
+ IDP_WriteProperty(clip->id.properties, wd);
+
if (clip->adt)
write_animdata(wd, clip->adt);
@@ -2889,7 +2896,7 @@ int BLO_write_file(Main *mainvar, const char *filepath, int write_flags, ReportL
/* open temporary file, so we preserve the original in case we crash */
BLI_snprintf(tempname, sizeof(tempname), "%s@", filepath);
- file = BLI_open(tempname,O_BINARY+O_WRONLY+O_CREAT+O_TRUNC, 0666);
+ file = BLI_open(tempname, O_BINARY+O_WRONLY+O_CREAT+O_TRUNC, 0666);
if (file == -1) {
BKE_reportf(reports, RPT_ERROR, "Can't open file %s for writing: %s.", tempname, strerror(errno));
return 0;
@@ -2915,7 +2922,7 @@ int BLO_write_file(Main *mainvar, const char *filepath, int write_flags, ReportL
* we should not have any relative paths, but if there
* is somehow, an invalid or empty G.main->name it will
* print an error, don't try make the absolute in this case. */
- makeFilesAbsolute(mainvar, G.main->name, NULL);
+ BLI_bpath_absolute_convert(mainvar, G.main->name, NULL);
}
}
}
@@ -2924,10 +2931,10 @@ int BLO_write_file(Main *mainvar, const char *filepath, int write_flags, ReportL
write_user_block= (BLI_path_cmp(filepath, userfilename) == 0);
if (write_flags & G_FILE_RELATIVE_REMAP)
- makeFilesRelative(mainvar, filepath, NULL); /* note, making relative to something OTHER then G.main->name */
+ BLI_bpath_relative_convert(mainvar, filepath, NULL); /* note, making relative to something OTHER then G.main->name */
/* actual file writing */
- err= write_file_handle(mainvar, file, NULL,NULL, write_user_block, write_flags, thumb);
+ err= write_file_handle(mainvar, file, NULL, NULL, write_user_block, write_flags, thumb);
close(file);
if (err) {
diff --git a/source/blender/blenpluginapi/documentation.h b/source/blender/blenpluginapi/documentation.h
index 3e4aa3cd2ed..8a15109428f 100644
--- a/source/blender/blenpluginapi/documentation.h
+++ b/source/blender/blenpluginapi/documentation.h
@@ -23,8 +23,13 @@
* Contributor(s): none yet.
*
* ***** END GPL LICENSE BLOCK *****
+ */
+
+/**
+ * \file blender/blenpluginapi/documentation.h
+ * \ingroup blpluginapi
*
- * @mainpage plugin API - the access point for texture and sequence
+ * \mainpage plugin API - the access point for texture and sequence
* plugins
*
* \section about About the plugin API
@@ -63,10 +68,4 @@
*
* The plugins wraps functions from IMB and BLI. In addition, they
* define some useful variables.
- * */
-
-/** \file blender/blenpluginapi/documentation.h
- * \ingroup blpluginapi
*/
-
-
diff --git a/source/blender/blenpluginapi/externdef.h b/source/blender/blenpluginapi/externdef.h
index fbd81a83272..154b276c851 100644
--- a/source/blender/blenpluginapi/externdef.h
+++ b/source/blender/blenpluginapi/externdef.h
@@ -1,6 +1,3 @@
-/** \file blender/blenpluginapi/externdef.h
- * \ingroup blpluginapi
- */
/* Copyright (c) 1999, Not a Number / NeoGeo b.v.
*
* All rights reserved.
@@ -33,6 +30,10 @@
#ifndef __EXTERNDEF_H__
#define __EXTERNDEF_H__
+/** \file blender/blenpluginapi/externdef.h
+ * \ingroup blpluginapi
+ */
+
#ifdef WIN32
#ifdef PLUGIN_INTERN
#define LIBEXPORT __declspec(dllexport)
diff --git a/source/blender/blenpluginapi/floatpatch.h b/source/blender/blenpluginapi/floatpatch.h
index 4c9b98d073d..d1c7edcc307 100644
--- a/source/blender/blenpluginapi/floatpatch.h
+++ b/source/blender/blenpluginapi/floatpatch.h
@@ -1,8 +1,5 @@
-/** \file blender/blenpluginapi/floatpatch.h
- * \ingroup blpluginapi
- */
/* Copyright (c) 1999, Not a Number / NeoGeo b.v.
- *
+ *
* All rights reserved.
*
* Contact: info@blender.org
@@ -33,6 +30,10 @@
#ifndef __FLOATPATCH_H__
#define __FLOATPATCH_H__
+/** \file blender/blenpluginapi/floatpatch.h
+ * \ingroup blpluginapi
+ */
+
/* floating point libs differ at systems... with these defines it comilies at all! */
#ifdef MIPS1
diff --git a/source/blender/blenpluginapi/iff.h b/source/blender/blenpluginapi/iff.h
index 450dfc7f8d1..98382aca889 100644
--- a/source/blender/blenpluginapi/iff.h
+++ b/source/blender/blenpluginapi/iff.h
@@ -1,6 +1,3 @@
-/** \file blender/blenpluginapi/iff.h
- * \ingroup blpluginapi
- */
/* Copyright (c) 1999, Not a Number / NeoGeo b.v.
*
* All rights reserved.
@@ -33,6 +30,10 @@
#ifndef __IFF_H__
#define __IFF_H__
+/** \file blender/blenpluginapi/iff.h
+ * \ingroup blpluginapi
+ */
+
#include <sys/types.h>
#include "util.h"
#include "externdef.h"
@@ -83,15 +84,15 @@ typedef struct ImBuf {
int refcounter; /* reference counter for multiple users */
} ImBuf;
-LIBIMPORT struct ImBuf *allocImBuf(short,short,uchar,uint);
+LIBIMPORT struct ImBuf *allocImBuf(short, short, uchar, uint);
LIBIMPORT struct ImBuf *dupImBuf(struct ImBuf *);
LIBIMPORT void freeImBuf(struct ImBuf*);
-LIBIMPORT short saveiff(struct ImBuf *,char *,int);
+LIBIMPORT short saveiff(struct ImBuf *, char *, int);
-LIBIMPORT struct ImBuf *loadifffile(int,int);
-LIBIMPORT struct ImBuf *loadiffname(char *,int);
-LIBIMPORT struct ImBuf *testiffname(char *,int);
+LIBIMPORT struct ImBuf *loadifffile(int, int);
+LIBIMPORT struct ImBuf *loadiffname(char *, int);
+LIBIMPORT struct ImBuf *testiffname(char *, int);
LIBIMPORT struct ImBuf *onehalf(struct ImBuf *);
LIBIMPORT struct ImBuf *half_x(struct ImBuf *);
diff --git a/source/blender/blenpluginapi/intern/pluginapi.c b/source/blender/blenpluginapi/intern/pluginapi.c
index 02166c466fa..efdd11352c6 100644
--- a/source/blender/blenpluginapi/intern/pluginapi.c
+++ b/source/blender/blenpluginapi/intern/pluginapi.c
@@ -268,38 +268,38 @@ LIBEXPORT float turbulence1(float noisesize,
* Otherwise they will not be imported from the archive
* library on Unix. -zr
*/
-int pluginapi_force_ref(void);
+int pluginapi_force_ref(void);
-int pluginapi_force_ref(void)
+int pluginapi_force_ref(void)
{
return
- GET_INT_FROM_POINTER( mallocN ) +
- GET_INT_FROM_POINTER( callocN ) +
- GET_INT_FROM_POINTER( freeN ) +
- GET_INT_FROM_POINTER( mallocT ) +
- GET_INT_FROM_POINTER( callocT ) +
- GET_INT_FROM_POINTER( freeT ) +
- GET_INT_FROM_POINTER( allocImBuf ) +
- GET_INT_FROM_POINTER( dupImBuf ) +
- GET_INT_FROM_POINTER( freeImBuf ) +
- GET_INT_FROM_POINTER( saveiff ) +
- GET_INT_FROM_POINTER( loadifffile ) +
- GET_INT_FROM_POINTER( loadiffname ) +
- GET_INT_FROM_POINTER( testiffname ) +
- GET_INT_FROM_POINTER( onehalf ) +
- GET_INT_FROM_POINTER( half_x ) +
- GET_INT_FROM_POINTER( half_y ) +
- GET_INT_FROM_POINTER( double_x ) +
- GET_INT_FROM_POINTER( double_y ) +
- GET_INT_FROM_POINTER( double_fast_x ) +
- GET_INT_FROM_POINTER( double_fast_y ) +
- GET_INT_FROM_POINTER( ispic ) +
- GET_INT_FROM_POINTER( scaleImBuf ) +
- GET_INT_FROM_POINTER( scalefastImBuf ) +
- GET_INT_FROM_POINTER( hnoise ) +
- GET_INT_FROM_POINTER( hnoisep ) +
- GET_INT_FROM_POINTER( turbulence ) +
- GET_INT_FROM_POINTER( turbulence1 ) +
- GET_INT_FROM_POINTER( de_interlace ) +
- GET_INT_FROM_POINTER( interlace );
+ GET_INT_FROM_POINTER(mallocN) +
+ GET_INT_FROM_POINTER(callocN) +
+ GET_INT_FROM_POINTER(freeN) +
+ GET_INT_FROM_POINTER(mallocT) +
+ GET_INT_FROM_POINTER(callocT) +
+ GET_INT_FROM_POINTER(freeT) +
+ GET_INT_FROM_POINTER(allocImBuf) +
+ GET_INT_FROM_POINTER(dupImBuf) +
+ GET_INT_FROM_POINTER(freeImBuf) +
+ GET_INT_FROM_POINTER(saveiff) +
+ GET_INT_FROM_POINTER(loadifffile) +
+ GET_INT_FROM_POINTER(loadiffname) +
+ GET_INT_FROM_POINTER(testiffname) +
+ GET_INT_FROM_POINTER(onehalf) +
+ GET_INT_FROM_POINTER(half_x) +
+ GET_INT_FROM_POINTER(half_y) +
+ GET_INT_FROM_POINTER(double_x) +
+ GET_INT_FROM_POINTER(double_y) +
+ GET_INT_FROM_POINTER(double_fast_x) +
+ GET_INT_FROM_POINTER(double_fast_y) +
+ GET_INT_FROM_POINTER(ispic) +
+ GET_INT_FROM_POINTER(scaleImBuf) +
+ GET_INT_FROM_POINTER(scalefastImBuf) +
+ GET_INT_FROM_POINTER(hnoise) +
+ GET_INT_FROM_POINTER(hnoisep) +
+ GET_INT_FROM_POINTER(turbulence) +
+ GET_INT_FROM_POINTER(turbulence1) +
+ GET_INT_FROM_POINTER(de_interlace) +
+ GET_INT_FROM_POINTER(interlace);
}
diff --git a/source/blender/blenpluginapi/plugin.h b/source/blender/blenpluginapi/plugin.h
index eb32fe80fa3..d7acb988ccd 100644
--- a/source/blender/blenpluginapi/plugin.h
+++ b/source/blender/blenpluginapi/plugin.h
@@ -1,6 +1,3 @@
-/** \file blender/blenpluginapi/plugin.h
- * \ingroup blpluginapi
- */
/* Copyright (c) 1999, Not a Number / NeoGeo b.v.
*
* All rights reserved.
@@ -33,6 +30,10 @@
#ifndef __PLUGIN_H__
#define __PLUGIN_H__
+/** \file blender/blenpluginapi/plugin.h
+ * \ingroup blpluginapi
+ */
+
#include "externdef.h"
#include "iff.h"
#include "util.h"
diff --git a/source/blender/blenpluginapi/util.h b/source/blender/blenpluginapi/util.h
index 340201924d7..8a049350bc6 100644
--- a/source/blender/blenpluginapi/util.h
+++ b/source/blender/blenpluginapi/util.h
@@ -1,6 +1,3 @@
-/** \file blender/blenpluginapi/util.h
- * \ingroup blpluginapi
- */
/* Copyright (c) 1999, Not a Number / NeoGeo b.v.
*
* All rights reserved.
@@ -30,6 +27,10 @@
* SUCH DAMAGE.
*/
+/** \file blender/blenpluginapi/util.h
+ * \ingroup blpluginapi
+ */
+
#ifndef __UTIL_H__
#define __UTIL_H__
diff --git a/source/blender/bmesh/CMakeLists.txt b/source/blender/bmesh/CMakeLists.txt
index 1cf2b9113b2..730b741fa38 100644
--- a/source/blender/bmesh/CMakeLists.txt
+++ b/source/blender/bmesh/CMakeLists.txt
@@ -41,6 +41,7 @@ set(SRC
operators/bmo_dupe.c
operators/bmo_edgesplit.c
operators/bmo_extrude.c
+ operators/bmo_hull.c
operators/bmo_inset.c
operators/bmo_join_triangles.c
operators/bmo_mesh_conv.c
@@ -51,6 +52,7 @@ set(SRC
operators/bmo_subdivide.h
operators/bmo_triangulate.c
operators/bmo_utils.c
+ operators/bmo_wireframe.c
intern/bmesh_construct.c
intern/bmesh_construct.h
diff --git a/source/blender/bmesh/bmesh.h b/source/blender/bmesh/bmesh.h
index 6b41babd927..13926c42192 100644
--- a/source/blender/bmesh/bmesh.h
+++ b/source/blender/bmesh/bmesh.h
@@ -192,6 +192,41 @@
* - bmo_xxx() - Low level / internal operator API functions.
* - _bm_xxx() - Functions which are called via macros only.
*
+ * \section bm_todo BMesh TODO's
+ *
+ * There may be a better place for this section, but adding here for now.
+ *
+ *
+ * \subsection bm_todo_tools Tools
+ *
+ * Probably most of these will be bmesh operators.
+ *
+ * - make ngons flat.
+ * - make ngons into tris/quads (ngon poke?), many methods could be used here (triangulate/fan/quad-fan).
+ * - solidify (precise mode), keeps even wall thickness, re-creates outlines of offset faces with plane-plane
+ * intersections.
+ * - split vert (we already have in our API, just no tool)
+ * - bridge (add option to bridge between different edge loop counts, option to remove selected face regions)
+ * - flip selected region (invert all faces about the plane defined by the selected region outline)
+ * - interactive dissolve (like the knife tool but draw over edges to dissolve)
+ *
+ *
+ * \subsection bm_todo_optimize Optimizations
+ *
+ * - skip normal calc when its not needed (when calling chain of operators & for modifiers, flag as dirty)
+ * - skip BMO flag allocation, its not needed in many cases, this is fairly redundant to calc by default.
+ * - ability to call BMO's with option not to create return data (will save some time)
+ * - binary diff UNDO, currently this uses huge amount of ram when all shapes are stored for each undo step for eg.
+ * - use two differnt iterator types for BMO map/buffer types.
+ * - avoid string lookups for BMO slot lookups _especially_ when used in loops, this is very crappy.
+ *
+ *
+ * \subsection bm_todo_tools_enhance Tool Enhancements
+ *
+ * - face inset interpolate loop data from face (currently copies - but this stretches UV's in an ugly way)
+ * - vert slide UV correction (like we have for edge slide)
+ * - fill-face edge net - produce consistant normals, currently it won't, fix should be to fill in edge-net node
+ * connected with previous one - since they already check for normals of adjacent edge-faces before creating.
*/
#ifdef __cplusplus
diff --git a/source/blender/bmesh/intern/bmesh_construct.c b/source/blender/bmesh/intern/bmesh_construct.c
index dee18e62930..684237b79c5 100644
--- a/source/blender/bmesh/intern/bmesh_construct.c
+++ b/source/blender/bmesh/intern/bmesh_construct.c
@@ -214,6 +214,9 @@ BMFace *BM_face_create_ngon(BMesh *bm, BMVert *v1, BMVert *v2, BMEdge **edges, i
BLI_array_append(verts, v);
BLI_array_append(edges2, e);
+ /* we only flag the verts to check if they are in the face more then once */
+ BM_ELEM_API_FLAG_ENABLE(v, _FLAG_MV);
+
do {
e2 = bmesh_disk_edge_next(e2, v);
if (e2 != e && BM_ELEM_API_FLAG_TEST(e2, _FLAG_MF)) {
@@ -269,6 +272,12 @@ BMFace *BM_face_create_ngon(BMesh *bm, BMVert *v1, BMVert *v2, BMEdge **edges, i
if (!edges2[i]) {
goto err;
}
+
+ /* check if vert is in face more then once. if the flag is disabled. we've already visited */
+ if (!BM_ELEM_API_FLAG_TEST(verts[i], _FLAG_MV)) {
+ goto err;
+ }
+ BM_ELEM_API_FLAG_DISABLE(verts[i], _FLAG_MV);
}
f = BM_face_create(bm, verts, edges2, len, nodouble);
@@ -286,6 +295,10 @@ BMFace *BM_face_create_ngon(BMesh *bm, BMVert *v1, BMVert *v2, BMEdge **edges, i
err:
for (i = 0; i < len; i++) {
BM_ELEM_API_FLAG_DISABLE(edges[i], _FLAG_MF);
+ /* vert count may != len */
+ if (i < BLI_array_count(verts)) {
+ BM_ELEM_API_FLAG_DISABLE(verts[i], _FLAG_MV);
+ }
}
BLI_array_free(verts);
@@ -384,7 +397,7 @@ BMFace *BM_face_create_ngon_vcloud(BMesh *bm, BMVert **vert_arr, int totv, int n
/* more of a weight then a distance */
far_cross_dist = (/* first we want to have a value close to zero mapped to 1 */
- 1.0 - fabsf(dot_v3v3(far_vec, far_cross_vec)) *
+ 1.0f - fabsf(dot_v3v3(far_vec, far_cross_vec)) *
/* second we multiply by the distance
* so points close to the center are not preferred */
@@ -803,6 +816,7 @@ BMesh *BM_mesh_copy(BMesh *bm_old)
BMesh *bm_new;
BMVert *v, *v2, **vtable = NULL;
BMEdge *e, *e2, **edges = NULL, **etable = NULL;
+ BMElem **eletable;
BLI_array_declare(edges);
BMLoop *l, /* *l2, */ **loops = NULL;
BLI_array_declare(loops);
@@ -870,8 +884,8 @@ BMesh *BM_mesh_copy(BMesh *bm_old)
BLI_array_empty(loops);
BLI_array_empty(edges);
- BLI_array_growitems(loops, f->len);
- BLI_array_growitems(edges, f->len);
+ BLI_array_grow_items(loops, f->len);
+ BLI_array_grow_items(edges, f->len);
l = BM_iter_new(&liter, bm_old, BM_LOOPS_OF_FACE, f);
for (j = 0; j < f->len; j++, l = BM_iter_step(&liter)) {
@@ -913,21 +927,29 @@ BMesh *BM_mesh_copy(BMesh *bm_old)
/* copy over edit selection history */
for (ese = bm_old->selected.first; ese; ese = ese->next) {
- void *ele = NULL;
+ BMElem *ele = NULL;
- if (ese->htype == BM_VERT)
- ele = vtable[BM_elem_index_get(ese->ele)];
- else if (ese->htype == BM_EDGE)
- ele = etable[BM_elem_index_get(ese->ele)];
- else if (ese->htype == BM_FACE) {
- ele = ftable[BM_elem_index_get(ese->ele)];
+ switch (ese->htype) {
+ case BM_VERT:
+ eletable = (BMElem **)vtable;
+ break;
+ case BM_EDGE:
+ eletable = (BMElem **)etable;
+ break;
+ case BM_FACE:
+ eletable = (BMElem **)ftable;
+ break;
+ default:
+ eletable = NULL;
+ break;
}
- else {
- BLI_assert(0);
+
+ if (eletable) {
+ ele = eletable[BM_elem_index_get(ese->ele)];
+ if (ele) {
+ BM_select_history_store(bm_new, ele);
+ }
}
-
- if (ele)
- BM_select_history_store(bm_new, ele);
}
MEM_freeN(etable);
diff --git a/source/blender/bmesh/intern/bmesh_core.c b/source/blender/bmesh/intern/bmesh_core.c
index 7d4129b1205..e20eb103e1b 100644
--- a/source/blender/bmesh/intern/bmesh_core.c
+++ b/source/blender/bmesh/intern/bmesh_core.c
@@ -50,6 +50,9 @@
#endif
+/**
+ * \brief Main function for creating a new vertex.
+ */
BMVert *BM_vert_create(BMesh *bm, const float co[3], const BMVert *example)
{
BMVert *v = BLI_mempool_calloc(bm->vpool);
@@ -85,6 +88,12 @@ BMVert *BM_vert_create(BMesh *bm, const float co[3], const BMVert *example)
return v;
}
+/**
+ * \brief Main function for creating a new edge.
+ *
+ * \note Duplicate edges are supported by the API however users should _never_ see them.
+ * so unless you need a unique edge or know the edge won't exist, you should call wih \a nodouble=TRUE
+ */
BMEdge *BM_edge_create(BMesh *bm, BMVert *v1, BMVert *v2, const BMEdge *example, int nodouble)
{
BMEdge *e;
@@ -175,32 +184,32 @@ static BMLoop *bm_face_boundary_add(BMesh *bm, BMFace *f, BMVert *startv, BMEdge
BMFace *BM_face_copy(BMesh *bm, BMFace *f, const short copyverts, const short copyedges)
{
- BMEdge **edges = NULL;
BMVert **verts = NULL;
- BLI_array_staticdeclare(edges, BM_NGON_STACK_SIZE);
- BLI_array_staticdeclare(verts, BM_NGON_STACK_SIZE);
+ BMEdge **edges = NULL;
+ BLI_array_fixedstack_declare(verts, BM_NGON_STACK_SIZE, f->len, __func__);
+ BLI_array_fixedstack_declare(edges, BM_NGON_STACK_SIZE, f->len, __func__);
BMLoop *l_iter;
BMLoop *l_first;
- BMLoop *l2;
- BMFace *f2;
+ BMLoop *l_copy;
+ BMFace *f_copy;
int i;
l_iter = l_first = BM_FACE_FIRST_LOOP(f);
+ i = 0;
do {
if (copyverts) {
- BMVert *v = BM_vert_create(bm, l_iter->v->co, l_iter->v);
- BLI_array_append(verts, v);
+ verts[i] = BM_vert_create(bm, l_iter->v->co, l_iter->v);
}
else {
- BLI_array_append(verts, l_iter->v);
+ verts[i] = l_iter->v;
}
+ i++;
} while ((l_iter = l_iter->next) != l_first);
l_iter = l_first = BM_FACE_FIRST_LOOP(f);
i = 0;
do {
if (copyedges) {
- BMEdge *e;
BMVert *v1, *v2;
if (l_iter->e->v1 == verts[i]) {
@@ -212,28 +221,29 @@ BMFace *BM_face_copy(BMesh *bm, BMFace *f, const short copyverts, const short co
v1 = verts[(i + 1) % f->len];
}
- e = BM_edge_create(bm, v1, v2, l_iter->e, FALSE);
- BLI_array_append(edges, e);
+ edges[i] = BM_edge_create(bm, v1, v2, l_iter->e, FALSE);
}
else {
- BLI_array_append(edges, l_iter->e);
+ edges[i] = l_iter->e;
}
-
i++;
} while ((l_iter = l_iter->next) != l_first);
- f2 = BM_face_create(bm, verts, edges, f->len, FALSE);
+ f_copy = BM_face_create(bm, verts, edges, f->len, FALSE);
- BM_elem_attrs_copy(bm, bm, f, f2);
+ BM_elem_attrs_copy(bm, bm, f, f_copy);
l_iter = l_first = BM_FACE_FIRST_LOOP(f);
- l2 = BM_FACE_FIRST_LOOP(f2);
+ l_copy = BM_FACE_FIRST_LOOP(f_copy);
do {
- BM_elem_attrs_copy(bm, bm, l_iter, l2);
- l2 = l2->next;
+ BM_elem_attrs_copy(bm, bm, l_iter, l_copy);
+ l_copy = l_copy->next;
} while ((l_iter = l_iter->next) != l_first);
-
- return f2;
+
+ BLI_array_fixedstack_free(verts);
+ BLI_array_fixedstack_free(edges);
+
+ return f_copy;
}
/**
@@ -270,6 +280,9 @@ BLI_INLINE BMFace *bm_face_create__internal(BMesh *bm)
return f;
}
+/**
+ * \brief Main face creation function
+ */
BMFace *BM_face_create(BMesh *bm, BMVert **verts, BMEdge **edges, const int len, int nodouble)
{
BMFace *f = NULL;
@@ -319,6 +332,12 @@ BMFace *BM_face_create(BMesh *bm, BMVert **verts, BMEdge **edges, const int len,
return f;
}
+/**
+ * Check the element is valid.
+ *
+ * BMESH_TODO, when this raises an error the output is incredible confusing.
+ * need to have some nice way to print/debug what the hecks going on.
+ */
int bmesh_elem_check(void *element, const char htype)
{
BMHeader *head = element;
@@ -446,14 +465,16 @@ int bmesh_elem_check(void *element, const char htype)
}
/**
- * low level function, only free's,
- * does not change adjust surrounding geometry */
+ * low level function, only frees the vert,
+ * doesn't change or adjust surrounding geometry
+ */
static void bm_kill_only_vert(BMesh *bm, BMVert *v)
{
bm->totvert--;
bm->elem_index_dirty |= BM_VERT;
- BM_select_history_remove(bm, (BMElem *)v);
+ BM_select_history_remove(bm, v);
+
if (v->head.data)
CustomData_bmesh_free_block(&bm->vdata, &v->head.data);
@@ -461,6 +482,10 @@ static void bm_kill_only_vert(BMesh *bm, BMVert *v)
BLI_mempool_free(bm->vpool, v);
}
+/**
+ * low level function, only frees the edge,
+ * doesn't change or adjust surrounding geometry
+ */
static void bm_kill_only_edge(BMesh *bm, BMEdge *e)
{
bm->totedge--;
@@ -475,6 +500,10 @@ static void bm_kill_only_edge(BMesh *bm, BMEdge *e)
BLI_mempool_free(bm->epool, e);
}
+/**
+ * low level function, only frees the face,
+ * doesn't change or adjust surrounding geometry
+ */
static void bm_kill_only_face(BMesh *bm, BMFace *f)
{
if (bm->act_face == f)
@@ -492,6 +521,10 @@ static void bm_kill_only_face(BMesh *bm, BMFace *f)
BLI_mempool_free(bm->fpool, f);
}
+/**
+ * low level function, only frees the loop,
+ * doesn't change or adjust surrounding geometry
+ */
static void bm_kill_only_loop(BMesh *bm, BMLoop *l)
{
bm->totloop--;
@@ -502,7 +535,7 @@ static void bm_kill_only_loop(BMesh *bm, BMLoop *l)
}
/**
- * kills all edges associated with f, along with any other faces containing
+ * kills all edges associated with \a f, along with any other faces containing
* those edges
*/
void BM_face_edges_kill(BMesh *bm, BMFace *f)
@@ -526,7 +559,7 @@ void BM_face_edges_kill(BMesh *bm, BMFace *f)
}
/**
- * kills all verts associated with f, along with any other faces containing
+ * kills all verts associated with \a f, along with any other faces containing
* those vertices
*/
void BM_face_verts_kill(BMesh *bm, BMFace *f)
@@ -549,6 +582,9 @@ void BM_face_verts_kill(BMesh *bm, BMFace *f)
BLI_array_free(verts);
}
+/**
+ * Kills \a f and its loops.
+ */
void BM_face_kill(BMesh *bm, BMFace *f)
{
#ifdef USE_BMESH_HOLES
@@ -587,7 +623,9 @@ void BM_face_kill(BMesh *bm, BMFace *f)
bm_kill_only_face(bm, f);
}
-
+/**
+ * kills \a e and all faces that use it.
+ */
void BM_edge_kill(BMesh *bm, BMEdge *e)
{
@@ -615,6 +653,9 @@ void BM_edge_kill(BMesh *bm, BMEdge *e)
bm_kill_only_edge(bm, e);
}
+/**
+ * kills \a v and all edges that use it.
+ */
void BM_vert_kill(BMesh *bm, BMVert *v)
{
if (v->e) {
@@ -633,7 +674,10 @@ void BM_vert_kill(BMesh *bm, BMVert *v)
/********** private disk and radial cycle functions ********** */
-static int bm_loop_length(BMLoop *l)
+/**
+ * return the length of the face, should always equal \a l->f->len
+ */
+static int UNUSED_FUNCTION(bm_loop_length)(BMLoop *l)
{
BMLoop *l_first = l;
int i = 0;
@@ -669,18 +713,15 @@ static int bm_loop_reverse_loop(BMesh *bm, BMFace *f
BMLoop *l_first = f->l_first;
#endif
+ const int len = f->len;
+ const int do_disps = CustomData_has_layer(&bm->ldata, CD_MDISPS);
BMLoop *l_iter, *oldprev, *oldnext;
BMEdge **edar = NULL;
- MDisps *md;
- BLI_array_staticdeclare(edar, BM_NGON_STACK_SIZE);
- int i, j, edok, len = 0, do_disps = CustomData_has_layer(&bm->ldata, CD_MDISPS);
-
- len = bm_loop_length(l_first);
+ BLI_array_fixedstack_declare(edar, BM_NGON_STACK_SIZE, len, __func__);
+ int i, j, edok;
for (i = 0, l_iter = l_first; i < len; i++, l_iter = l_iter->next) {
- BMEdge *curedge = l_iter->e;
- bmesh_radial_loop_remove(l_iter, curedge);
- BLI_array_append(edar, curedge);
+ bmesh_radial_loop_remove(l_iter, (edar[i] = l_iter->e));
}
/* actually reverse the loop */
@@ -694,6 +735,7 @@ static int bm_loop_reverse_loop(BMesh *bm, BMFace *f
if (do_disps) {
float (*co)[3];
int x, y, sides;
+ MDisps *md;
md = CustomData_bmesh_get(&bm->ldata, l_iter->head.data, CD_MDISPS);
if (!md->totdisp || !md->disps)
@@ -739,13 +781,16 @@ static int bm_loop_reverse_loop(BMesh *bm, BMFace *f
BM_CHECK_ELEMENT(l_iter->f);
}
- BLI_array_free(edar);
+ BLI_array_fixedstack_free(edar);
BM_CHECK_ELEMENT(f);
return 1;
}
+/**
+ * \brief Flip the faces direction
+ */
int bmesh_loop_reverse(BMesh *bm, BMFace *f)
{
#ifdef USE_BMESH_HOLES
diff --git a/source/blender/bmesh/intern/bmesh_error.h b/source/blender/bmesh/intern/bmesh_error.h
index 84065fe88f6..606e9eeb23b 100644
--- a/source/blender/bmesh/intern/bmesh_error.h
+++ b/source/blender/bmesh/intern/bmesh_error.h
@@ -69,6 +69,7 @@ void BMO_error_clear(BMesh *bm);
#define BMERR_NONMANIFOLD 8
#define BMERR_INVALID_SELECTION 9
#define BMERR_MESH_ERROR 10
+#define BMERR_CONVEX_HULL_FAILED 11
/* BMESH_ASSERT */
#ifdef WITH_ASSERT_ABORT
diff --git a/source/blender/bmesh/intern/bmesh_interp.c b/source/blender/bmesh/intern/bmesh_interp.c
index 5149a5436a2..f64b55193c5 100644
--- a/source/blender/bmesh/intern/bmesh_interp.c
+++ b/source/blender/bmesh/intern/bmesh_interp.c
@@ -78,7 +78,7 @@ void BM_data_interp_from_verts(BMesh *bm, BMVert *v1, BMVert *v2, BMVert *v, con
src[0] = v1->head.data;
src[1] = v2->head.data;
- w[0] = 1.0f-fac;
+ w[0] = 1.0f - fac;
w[1] = fac;
CustomData_bmesh_interp(&bm->vdata, src, w, NULL, 2, v->head.data);
}
@@ -198,20 +198,11 @@ void BM_face_interp_from_face(BMesh *bm, BMFace *target, BMFace *source)
static int compute_mdisp_quad(BMLoop *l, float v1[3], float v2[3], float v3[3], float v4[3],
float e1[3], float e2[3])
{
- float cent[3] = {0.0f, 0.0f, 0.0f}, n[3], p[3];
- BMLoop *l_first;
- BMLoop *l_iter;
-
+ float cent[3], n[3], p[3];
+
/* computer center */
- l_iter = l_first = BM_FACE_FIRST_LOOP(l->f);
- do {
- cent[0] += (float)l_iter->v->co[0];
- cent[1] += (float)l_iter->v->co[1];
- cent[2] += (float)l_iter->v->co[2];
- } while ((l_iter = l_iter->next) != l_first);
-
- mul_v3_fl(cent, (1.0 / (float)l->f->len));
-
+ BM_face_calc_center_mean(l->f, cent);
+
add_v3_v3v3(p, l->prev->v->co, l->v->co);
mul_v3_fl(p, 0.5);
add_v3_v3v3(n, l->next->v->co, l->v->co);
@@ -240,8 +231,8 @@ static float quad_coord(float aa[3], float bb[3], float cc[3], float dd[3], int
if (fabsf(2.0f * (x - y + z)) > FLT_EPSILON * 10.0f) {
float f2;
- f1 = (sqrt(y * y - 4.0 * x * z) - y + 2.0 * z) / (2.0 * (x - y + z));
- f2 = (-sqrt(y * y - 4.0 * x * z) - y + 2.0 * z) / (2.0 * (x - y + z));
+ f1 = ( sqrtf(y * y - 4.0f * x * z) - y + 2.0f * z) / (2.0f * (x - y + z));
+ f2 = (-sqrtf(y * y - 4.0f * x * z) - y + 2.0f * z) / (2.0f * (x - y + z));
f1 = fabsf(f1);
f2 = fabsf(f2);
@@ -252,7 +243,7 @@ static float quad_coord(float aa[3], float bb[3], float cc[3], float dd[3], int
f1 = -z / (y - 2 * z);
CLAMP(f1, 0.0f, 1.0f + FLT_EPSILON);
- if (isnan(f1) || f1 > 1.0 || f1 < 0.0f) {
+ if (isnan(f1) || f1 > 1.0f || f1 < 0.0f) {
int i;
for (i = 0; i < 2; i++) {
@@ -345,8 +336,8 @@ static int mdisp_in_mdispquad(BMLoop *l, BMLoop *tl, float p[3], float *x, float
sub_v3_v3(v1, c); sub_v3_v3(v2, c);
sub_v3_v3(v3, c); sub_v3_v3(v4, c);
- mul_v3_fl(v1, 1.0 + eps); mul_v3_fl(v2, 1.0 + eps);
- mul_v3_fl(v3, 1.0 + eps); mul_v3_fl(v4, 1.0 + eps);
+ mul_v3_fl(v1, 1.0f + eps); mul_v3_fl(v2, 1.0f + eps);
+ mul_v3_fl(v3, 1.0f + eps); mul_v3_fl(v4, 1.0f + eps);
add_v3_v3(v1, c); add_v3_v3(v2, c);
add_v3_v3(v3, c); add_v3_v3(v4, c);
@@ -392,9 +383,9 @@ static void bm_loop_flip_disp(float source_axis_x[3], float source_axis_y[3],
d = bm_loop_flip_equotion(mat, b, target_axis_x, target_axis_y, coord, 0, 1);
- if (fabsf(d) < 1e-4) {
+ if (fabsf(d) < 1e-4f) {
d = bm_loop_flip_equotion(mat, b, target_axis_x, target_axis_y, coord, 0, 2);
- if (fabsf(d) < 1e-4)
+ if (fabsf(d) < 1e-4f)
d = bm_loop_flip_equotion(mat, b, target_axis_x, target_axis_y, coord, 1, 2);
}
@@ -439,7 +430,7 @@ static void bm_loop_interp_mdisps(BMesh *bm, BMLoop *target, BMFace *source)
mdisp_axis_from_quad(v1, v2, v3, v4, axis_x, axis_y);
res = (int)sqrt(mdisps->totdisp);
- d = 1.0 / (float)(res - 1);
+ d = 1.0f / (float)(res - 1);
for (x = 0.0f, ix = 0; ix < res; x += d, ix++) {
for (y = 0.0f, iy = 0; iy < res; y += d, iy++) {
float co1[3], co2[3], co[3];
@@ -853,6 +844,52 @@ void BM_data_layer_free_n(BMesh *bm, CustomData *data, int type, int n)
if (olddata.layers) MEM_freeN(olddata.layers);
}
+void BM_data_layer_copy(BMesh *bm, CustomData *data, int type, int src_n, int dst_n)
+{
+ BMIter iter;
+
+ if (&bm->vdata == data) {
+ BMVert *eve;
+
+ BM_ITER_MESH (eve, &iter, bm, BM_VERTS_OF_MESH) {
+ void *ptr = CustomData_bmesh_get_n(data, eve->head.data, type, dst_n);
+ CustomData_bmesh_set_n(data, eve->head.data, type, src_n, ptr);
+ }
+ }
+ else if (&bm->edata == data) {
+ BMEdge *eed;
+
+ BM_ITER_MESH (eed, &iter, bm, BM_EDGES_OF_MESH) {
+ void *ptr = CustomData_bmesh_get_n(data, eed->head.data, type, dst_n);
+ CustomData_bmesh_set_n(data, eed->head.data, type, src_n, ptr);
+ }
+ }
+ else if (&bm->pdata == data) {
+ BMFace *efa;
+
+ BM_ITER_MESH (efa, &iter, bm, BM_FACES_OF_MESH) {
+ void *ptr = CustomData_bmesh_get_n(data, efa->head.data, type, dst_n);
+ CustomData_bmesh_set_n(data, efa->head.data, type, src_n, ptr);
+ }
+ }
+ else if (&bm->ldata == data) {
+ BMIter liter;
+ BMFace *efa;
+ BMLoop *l;
+
+ BM_ITER_MESH (efa, &iter, bm, BM_FACES_OF_MESH) {
+ BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
+ void *ptr = CustomData_bmesh_get_n(data, l->head.data, type, dst_n);
+ CustomData_bmesh_set_n(data, l->head.data, type, src_n, ptr);
+ }
+ }
+ }
+ else {
+ /* should never reach this! */
+ BLI_assert(0);
+ }
+}
+
float BM_elem_float_data_get(CustomData *cd, void *element, int type)
{
float *f = CustomData_bmesh_get(cd, ((BMHeader *)element)->data, type);
diff --git a/source/blender/bmesh/intern/bmesh_interp.h b/source/blender/bmesh/intern/bmesh_interp.h
index 0d97fbcc0ec..3380a3e6b1b 100644
--- a/source/blender/bmesh/intern/bmesh_interp.h
+++ b/source/blender/bmesh/intern/bmesh_interp.h
@@ -36,6 +36,8 @@ void BM_data_layer_add(BMesh *em, CustomData *data, int type);
void BM_data_layer_add_named(BMesh *bm, CustomData *data, int type, const char *name);
void BM_data_layer_free(BMesh *em, CustomData *data, int type);
void BM_data_layer_free_n(BMesh *bm, CustomData *data, int type, int n);
+void BM_data_layer_copy(BMesh *bm, CustomData *data, int type, int src_n, int dst_n);
+
float BM_elem_float_data_get(CustomData *cd, void *element, int type);
void BM_elem_float_data_set(CustomData *cd, void *element, int type, const float val);
diff --git a/source/blender/bmesh/intern/bmesh_iterators.c b/source/blender/bmesh/intern/bmesh_iterators.c
index 384715d74f7..8103ae1ee11 100644
--- a/source/blender/bmesh/intern/bmesh_iterators.c
+++ b/source/blender/bmesh/intern/bmesh_iterators.c
@@ -104,6 +104,50 @@ int BM_iter_as_array(BMesh *bm, const char itype, void *data, void **array, cons
return i;
}
+/**
+ * \brief Elem Iter Flag Count
+ *
+ * Counts how many flagged / unflagged items are found in this element.
+ */
+int BM_iter_elem_count_flag(const char itype, void *data, const char hflag, const short value)
+{
+ BMIter iter;
+ BMElem *ele;
+ int count = 0;
+
+ BLI_assert(ELEM(value, TRUE, FALSE));
+
+ for (ele = BM_iter_new(&iter, NULL, itype, data); ele; ele = BM_iter_step(&iter)) {
+ if (BM_elem_flag_test_bool(ele, hflag) == value) {
+ count++;
+ }
+ }
+
+ return count;
+}
+
+/**
+ * \brief Mesh Iter Flag Count
+ *
+ * Counts how many flagged / unflagged items are found in this mesh.
+ */
+int BM_iter_mesh_count_flag(const char itype, BMesh *bm, const char hflag, const short value)
+{
+ BMIter iter;
+ BMElem *ele;
+ int count = 0;
+
+ BLI_assert(ELEM(value, TRUE, FALSE));
+
+ for (ele = BM_iter_new(&iter, bm, itype, NULL); ele; ele = BM_iter_step(&iter)) {
+ if (BM_elem_flag_test_bool(ele, hflag) == value) {
+ count++;
+ }
+ }
+
+ return count;
+}
+
/**
* \brief Init Iterator
diff --git a/source/blender/bmesh/intern/bmesh_iterators.h b/source/blender/bmesh/intern/bmesh_iterators.h
index c687e4b4e7a..1361a91a692 100644
--- a/source/blender/bmesh/intern/bmesh_iterators.h
+++ b/source/blender/bmesh/intern/bmesh_iterators.h
@@ -117,6 +117,8 @@ typedef struct BMIter {
void *BM_iter_at_index(BMesh *bm, const char itype, void *data, int index);
int BM_iter_as_array(BMesh *bm, const char itype, void *data, void **array, const int len);
+int BM_iter_elem_count_flag(const char itype, void *data, const char hflag, const short value);
+int BM_iter_mesh_count_flag(const char itype, BMesh *bm, const char hflag, const short value);
/* private for bmesh_iterators_inline.c */
void bmiter__vert_of_mesh_begin(struct BMIter *iter);
diff --git a/source/blender/bmesh/intern/bmesh_marking.c b/source/blender/bmesh/intern/bmesh_marking.c
index 9200d7d2a98..a69558eeeca 100644
--- a/source/blender/bmesh/intern/bmesh_marking.c
+++ b/source/blender/bmesh/intern/bmesh_marking.c
@@ -496,17 +496,17 @@ int BM_mesh_elem_hflag_count_disabled(BMesh *bm, const char htype, const char hf
* \note use BM_elem_flag_test(ele, BM_ELEM_SELECT) to test selection
* \note by design, this will not touch the editselection history stuff
*/
-void _bm_elem_select_set(BMesh *bm, BMHeader *head, int select)
+void BM_elem_select_set(BMesh *bm, BMElem *ele, int select)
{
- switch (head->htype) {
+ switch (ele->head.htype) {
case BM_VERT:
- BM_vert_select_set(bm, (BMVert *)head, select);
+ BM_vert_select_set(bm, (BMVert *)ele, select);
break;
case BM_EDGE:
- BM_edge_select_set(bm, (BMEdge *)head, select);
+ BM_edge_select_set(bm, (BMEdge *)ele, select);
break;
case BM_FACE:
- BM_face_select_set(bm, (BMFace *)head, select);
+ BM_face_select_set(bm, (BMFace *)ele, select);
break;
default:
BLI_assert(0);
@@ -566,7 +566,7 @@ BMFace *BM_active_face_get(BMesh *bm, int sloppy)
* - #EM_editselection_normal
* - #EM_editselection_plane
*/
-void BM_editselection_center(float r_center[3], BMEditSelection *ese)
+void BM_editselection_center(BMEditSelection *ese, float r_center[3])
{
if (ese->htype == BM_VERT) {
BMVert *eve = (BMVert *)ese->ele;
@@ -583,7 +583,7 @@ void BM_editselection_center(float r_center[3], BMEditSelection *ese)
}
}
-void BM_editselection_normal(float r_normal[3], BMEditSelection *ese)
+void BM_editselection_normal(BMEditSelection *ese, float r_normal[3])
{
if (ese->htype == BM_VERT) {
BMVert *eve = (BMVert *)ese->ele;
@@ -617,14 +617,14 @@ void BM_editselection_normal(float r_normal[3], BMEditSelection *ese)
/* Calculate a plane that is rightangles to the edge/vert/faces normal
* also make the plane run along an axis that is related to the geometry,
* because this is used for the manipulators Y axis. */
-void BM_editselection_plane(BMesh *bm, float r_plane[3], BMEditSelection *ese)
+void BM_editselection_plane(BMEditSelection *ese, float r_plane[3])
{
if (ese->htype == BM_VERT) {
BMVert *eve = (BMVert *)ese->ele;
float vec[3] = {0.0f, 0.0f, 0.0f};
if (ese->prev) { /* use previously selected data to make a useful vertex plane */
- BM_editselection_center(vec, ese->prev);
+ BM_editselection_center(ese->prev, vec);
sub_v3_v3v3(r_plane, vec, eve->co);
}
else {
@@ -674,7 +674,7 @@ void BM_editselection_plane(BMesh *bm, float r_plane[3], BMEditSelection *ese)
else {
BMVert *verts[4] = {NULL};
- BM_iter_as_array(bm, BM_VERTS_OF_FACE, efa, (void **)verts, 4);
+ BM_iter_as_array(NULL, BM_VERTS_OF_FACE, efa, (void **)verts, 4);
if (efa->len == 4) {
float vecA[3], vecB[3];
@@ -713,12 +713,14 @@ void BM_editselection_plane(BMesh *bm, float r_plane[3], BMEditSelection *ese)
normalize_v3(r_plane);
}
-int BM_select_history_check(BMesh *bm, const BMElem *ele)
+
+/* --- macro wrapped funcs --- */
+int _bm_select_history_check(BMesh *bm, const BMHeader *ele)
{
BMEditSelection *ese;
for (ese = bm->selected.first; ese; ese = ese->next) {
- if (ese->ele == ele) {
+ if (ese->ele == (BMElem *)ele) {
return TRUE;
}
}
@@ -726,11 +728,11 @@ int BM_select_history_check(BMesh *bm, const BMElem *ele)
return FALSE;
}
-int BM_select_history_remove(BMesh *bm, BMElem *ele)
+int _bm_select_history_remove(BMesh *bm, BMHeader *ele)
{
BMEditSelection *ese;
for (ese = bm->selected.first; ese; ese = ese->next) {
- if (ese->ele == ele) {
+ if (ese->ele == (BMElem *)ele) {
BLI_freelinkN(&(bm->selected), ese);
return TRUE;
}
@@ -739,26 +741,29 @@ int BM_select_history_remove(BMesh *bm, BMElem *ele)
return FALSE;
}
-void BM_select_history_clear(BMesh *bm)
-{
- BLI_freelistN(&bm->selected);
- bm->selected.first = bm->selected.last = NULL;
-}
-
-void BM_select_history_store_notest(BMesh *bm, BMElem *ele)
+void _bm_select_history_store_notest(BMesh *bm, BMHeader *ele)
{
BMEditSelection *ese = (BMEditSelection *) MEM_callocN(sizeof(BMEditSelection), "BMEdit Selection");
- ese->htype = ((BMHeader *)ele)->htype;
- ese->ele = ele;
+ ese->htype = ele->htype;
+ ese->ele = (BMElem *)ele;
BLI_addtail(&(bm->selected), ese);
}
-void BM_select_history_store(BMesh *bm, BMElem *ele)
+void _bm_select_history_store(BMesh *bm, BMHeader *ele)
{
- if (!BM_select_history_check(bm, ele)) {
- BM_select_history_store_notest(bm, ele);
+ if (!BM_select_history_check(bm, (BMElem *)ele)) {
+ BM_select_history_store_notest(bm, (BMElem *)ele);
}
}
+/* --- end macro wrapped funcs --- */
+
+
+void BM_select_history_clear(BMesh *bm)
+{
+ BLI_freelistN(&bm->selected);
+ bm->selected.first = bm->selected.last = NULL;
+}
+
void BM_select_history_validate(BMesh *bm)
{
@@ -775,6 +780,41 @@ void BM_select_history_validate(BMesh *bm)
}
}
+/* utility function */
+int BM_select_history_active_get(BMesh *bm, BMEditSelection *ese)
+{
+ BMEditSelection *ese_last = bm->selected.last;
+ BMFace *efa = BM_active_face_get(bm, FALSE);
+
+ ese->next = ese->prev = NULL;
+
+ if (ese_last) {
+ if (ese_last->htype == BM_FACE) { /* if there is an active face, use it over the last selected face */
+ if (efa) {
+ ese->ele = (BMElem *)efa;
+ }
+ else {
+ ese->ele = ese_last->ele;
+ }
+ ese->htype = BM_FACE;
+ }
+ else {
+ ese->ele = ese_last->ele;
+ ese->htype = ese_last->htype;
+ }
+ }
+ else if (efa) { /* no */
+ ese->ele = (BMElem *)efa;
+ ese->htype = BM_FACE;
+ }
+ else {
+ ese->ele = NULL;
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
void BM_mesh_elem_hflag_disable_test(BMesh *bm, const char htype, const char hflag,
int respecthide, const char hflag_test)
{
diff --git a/source/blender/bmesh/intern/bmesh_marking.h b/source/blender/bmesh/intern/bmesh_marking.h
index a3e97ea9677..12ebaedac60 100644
--- a/source/blender/bmesh/intern/bmesh_marking.h
+++ b/source/blender/bmesh/intern/bmesh_marking.h
@@ -42,8 +42,7 @@ void BM_edge_hide_set(BMEdge *e, int hide);
void BM_face_hide_set(BMFace *f, int hide);
/* Selection code */
-#define BM_elem_select_set(bm, ele, hide) _bm_elem_select_set(bm, &(ele)->head, hide)
-void _bm_elem_select_set(BMesh *bm, BMHeader *ele, int select);
+void BM_elem_select_set(BMesh *bm, BMElem *ele, int select);
void BM_mesh_elem_hflag_enable_test(BMesh *bm, const char htype, const char hflag,
int respecthide, const char hflag_test);
@@ -73,15 +72,23 @@ int BM_mesh_elem_hflag_count_disabled(BMesh *bm, const char htype, const char hf
/* edit selection stuff */
void BM_active_face_set(BMesh *bm, BMFace *f);
BMFace *BM_active_face_get(BMesh *bm, int sloppy);
-void BM_editselection_center(float r_center[3], BMEditSelection *ese);
-void BM_editselection_normal(float r_normal[3], BMEditSelection *ese);
-void BM_editselection_plane(BMesh *bm, float r_plane[3], BMEditSelection *ese);
-
-int BM_select_history_check(BMesh *bm, const BMElem *ele);
-int BM_select_history_remove(BMesh *bm, BMElem *ele);
-void BM_select_history_store_notest(BMesh *bm, BMElem *ele);
-void BM_select_history_store(BMesh *bm, BMElem *ele);
+
+void BM_editselection_center(BMEditSelection *ese, float r_center[3]);
+void BM_editselection_normal(BMEditSelection *ese, float r_normal[3]);
+void BM_editselection_plane(BMEditSelection *ese, float r_plane[3]);
+
+#define BM_select_history_check(bm, ele) _bm_select_history_check(bm, &(ele)->head)
+#define BM_select_history_remove(bm, ele) _bm_select_history_remove(bm, &(ele)->head)
+#define BM_select_history_store_notest(bm, ele) _bm_select_history_store_notest(bm, &(ele)->head)
+#define BM_select_history_store(bm, ele) _bm_select_history_store(bm, &(ele)->head)
+
+int _bm_select_history_check(BMesh *bm, const BMHeader *ele);
+int _bm_select_history_remove(BMesh *bm, BMHeader *ele);
+void _bm_select_history_store_notest(BMesh *bm, BMHeader *ele);
+void _bm_select_history_store(BMesh *bm, BMHeader *ele);
+
void BM_select_history_validate(BMesh *bm);
void BM_select_history_clear(BMesh *em);
+int BM_select_history_active_get(BMesh *bm, struct BMEditSelection *ese);
#endif /* __BMESH_MARKING_H__ */
diff --git a/source/blender/bmesh/intern/bmesh_mesh.c b/source/blender/bmesh/intern/bmesh_mesh.c
index bd6eb7ae149..fe94983dc88 100644
--- a/source/blender/bmesh/intern/bmesh_mesh.c
+++ b/source/blender/bmesh/intern/bmesh_mesh.c
@@ -47,10 +47,14 @@ BMAllocTemplate bm_mesh_chunksize_default = {512, 1024, 2048, 512};
static void bm_mempool_init(BMesh *bm, const BMAllocTemplate *allocsize)
{
- bm->vpool = BLI_mempool_create(sizeof(BMVert), allocsize->totvert, bm_mesh_chunksize_default.totvert, BLI_MEMPOOL_ALLOW_ITER);
- bm->epool = BLI_mempool_create(sizeof(BMEdge), allocsize->totedge, bm_mesh_chunksize_default.totedge, BLI_MEMPOOL_ALLOW_ITER);
- bm->lpool = BLI_mempool_create(sizeof(BMLoop), allocsize->totloop, bm_mesh_chunksize_default.totloop, 0);
- bm->fpool = BLI_mempool_create(sizeof(BMFace), allocsize->totface, bm_mesh_chunksize_default.totface, BLI_MEMPOOL_ALLOW_ITER);
+ bm->vpool = BLI_mempool_create(sizeof(BMVert), allocsize->totvert,
+ bm_mesh_chunksize_default.totvert, BLI_MEMPOOL_ALLOW_ITER);
+ bm->epool = BLI_mempool_create(sizeof(BMEdge), allocsize->totedge,
+ bm_mesh_chunksize_default.totedge, BLI_MEMPOOL_ALLOW_ITER);
+ bm->lpool = BLI_mempool_create(sizeof(BMLoop), allocsize->totloop,
+ bm_mesh_chunksize_default.totloop, 0);
+ bm->fpool = BLI_mempool_create(sizeof(BMFace), allocsize->totface,
+ bm_mesh_chunksize_default.totface, BLI_MEMPOOL_ALLOW_ITER);
#ifdef USE_BMESH_HOLES
bm->looplistpool = BLI_mempool_create(sizeof(BMLoopList), allocsize[3], allocsize[3], FALSE, FALSE);
@@ -672,8 +676,8 @@ void BM_mesh_remap(BMesh *bm, int *vert_idx, int *edge_idx, int *face_idx)
BMEdge *new_edp = edges_pool[*new_idx];
*new_edp = *ed;
BLI_ghash_insert(eptr_map, (void *)*edp, (void *)new_edp);
+/* printf("mapping edge from %d to %d (%p/%p to %p)\n", i, *new_idx, *edp, edges_pool[i], new_edp);*/
}
-
bm->elem_index_dirty |= BM_EDGE;
MEM_freeN(edges_pool);
@@ -722,13 +726,30 @@ void BM_mesh_remap(BMesh *bm, int *vert_idx, int *edge_idx, int *face_idx)
}
}
- /* Edges' pointers, only vert pointers (as we don't mess with loops!)... */
- if (vptr_map) {
+ /* Edges' pointers, only vert pointers (as we don't mess with loops!), and - ack! - edge pointers,
+ * as we have to handle disklinks... */
+ if (vptr_map || eptr_map) {
BM_ITER_MESH (ed, &iter, bm, BM_EDGES_OF_MESH) {
-/* printf("Edge v1: %p -> %p\n", ed->v1, BLI_ghash_lookup(vptr_map, (const void*)ed->v1));*/
-/* printf("Edge v2: %p -> %p\n", ed->v2, BLI_ghash_lookup(vptr_map, (const void*)ed->v2));*/
- ed->v1 = BLI_ghash_lookup(vptr_map, (const void *)ed->v1);
- ed->v2 = BLI_ghash_lookup(vptr_map, (const void *)ed->v2);
+ if (vptr_map) {
+/* printf("Edge v1: %p -> %p\n", ed->v1, BLI_ghash_lookup(vptr_map, (const void*)ed->v1));*/
+/* printf("Edge v2: %p -> %p\n", ed->v2, BLI_ghash_lookup(vptr_map, (const void*)ed->v2));*/
+ ed->v1 = BLI_ghash_lookup(vptr_map, (const void *)ed->v1);
+ ed->v2 = BLI_ghash_lookup(vptr_map, (const void *)ed->v2);
+ }
+ if (eptr_map) {
+/* printf("Edge v1_disk_link prev: %p -> %p\n", ed->v1_disk_link.prev,*/
+/* BLI_ghash_lookup(eptr_map, (const void*)ed->v1_disk_link.prev));*/
+/* printf("Edge v1_disk_link next: %p -> %p\n", ed->v1_disk_link.next,*/
+/* BLI_ghash_lookup(eptr_map, (const void*)ed->v1_disk_link.next));*/
+/* printf("Edge v2_disk_link prev: %p -> %p\n", ed->v2_disk_link.prev,*/
+/* BLI_ghash_lookup(eptr_map, (const void*)ed->v2_disk_link.prev));*/
+/* printf("Edge v2_disk_link next: %p -> %p\n", ed->v2_disk_link.next,*/
+/* BLI_ghash_lookup(eptr_map, (const void*)ed->v2_disk_link.next));*/
+ ed->v1_disk_link.prev = BLI_ghash_lookup(eptr_map, (const void *)ed->v1_disk_link.prev);
+ ed->v1_disk_link.next = BLI_ghash_lookup(eptr_map, (const void *)ed->v1_disk_link.next);
+ ed->v2_disk_link.prev = BLI_ghash_lookup(eptr_map, (const void *)ed->v2_disk_link.prev);
+ ed->v2_disk_link.next = BLI_ghash_lookup(eptr_map, (const void *)ed->v2_disk_link.next);
+ }
}
}
diff --git a/source/blender/bmesh/intern/bmesh_mesh_conv.c b/source/blender/bmesh/intern/bmesh_mesh_conv.c
index f72efe8ab5f..351fb8e941b 100644
--- a/source/blender/bmesh/intern/bmesh_mesh_conv.c
+++ b/source/blender/bmesh/intern/bmesh_mesh_conv.c
@@ -282,8 +282,8 @@ void BM_mesh_bm_from_me(BMesh *bm, Mesh *me, int set_key, int act_key_nr)
BLI_array_empty(fedges);
BLI_array_empty(verts);
- BLI_array_growitems(fedges, mpoly->totloop);
- BLI_array_growitems(verts, mpoly->totloop);
+ BLI_array_grow_items(fedges, mpoly->totloop);
+ BLI_array_grow_items(verts, mpoly->totloop);
for (j = 0; j < mpoly->totloop; j++) {
ml = &me->mloop[mpoly->loopstart + j];
diff --git a/source/blender/bmesh/intern/bmesh_mesh_validate.c b/source/blender/bmesh/intern/bmesh_mesh_validate.c
index 3ec3b84c120..8ab5f10361f 100644
--- a/source/blender/bmesh/intern/bmesh_mesh_validate.c
+++ b/source/blender/bmesh/intern/bmesh_mesh_validate.c
@@ -107,10 +107,12 @@ int BM_mesh_validate(BMesh *bm)
ERRMSG("edge %d: has invalid loop, loop is of face %d", i, BM_elem_index_get(l_iter->f));
}
else if (BM_vert_in_edge(e, l_iter->v) == FALSE) {
- ERRMSG("edge %d: has invalid loop with vert not in edge, loop is of face %d", i, BM_elem_index_get(l_iter->f));
+ ERRMSG("edge %d: has invalid loop with vert not in edge, loop is of face %d",
+ i, BM_elem_index_get(l_iter->f));
}
else if (BM_vert_in_edge(e, l_iter->next->v) == FALSE) {
- ERRMSG("edge %d: has invalid loop with next vert not in edge, loop is of face %d", i, BM_elem_index_get(l_iter->f));
+ ERRMSG("edge %d: has invalid loop with next vert not in edge, loop is of face %d",
+ i, BM_elem_index_get(l_iter->f));
}
} while ((l_iter = l_iter->radial_next) != l_first);
}
diff --git a/source/blender/bmesh/intern/bmesh_mods.c b/source/blender/bmesh/intern/bmesh_mods.c
index a5e761af783..c4cbb19eef7 100644
--- a/source/blender/bmesh/intern/bmesh_mods.c
+++ b/source/blender/bmesh/intern/bmesh_mods.c
@@ -771,7 +771,7 @@ int BM_face_validate(BMFace *face, FILE *err)
fflush(err);
}
- BLI_array_growitems(verts, face->len);
+ BLI_array_grow_items(verts, face->len);
BM_ITER_ELEM_INDEX (l, &iter, face, BM_LOOPS_OF_FACE, i) {
verts[i] = l->v;
if (l->e->v1 == l->e->v2) {
@@ -1053,7 +1053,7 @@ BMEdge *BM_edge_rotate(BMesh *bm, BMEdge *e, const short ccw, const short check_
/* first create the new edge, this is so we can copy the customdata from the old one
* if splice if disabled, always add in a new edge even if theres one there. */
- e_new = BM_edge_create(bm, v1, v2, e, (check_flag & BM_EDGEROT_CHECK_SPLICE)!=0);
+ e_new = BM_edge_create(bm, v1, v2, e, (check_flag & BM_EDGEROT_CHECK_SPLICE) != 0);
f_hflag_prev_1 = l1->f->head.hflag;
f_hflag_prev_2 = l2->f->head.hflag;
diff --git a/source/blender/bmesh/intern/bmesh_opdefines.c b/source/blender/bmesh/intern/bmesh_opdefines.c
index 4b5c67c8671..b5e6d7e1f68 100644
--- a/source/blender/bmesh/intern/bmesh_opdefines.c
+++ b/source/blender/bmesh/intern/bmesh_opdefines.c
@@ -696,6 +696,7 @@ static BMOpDefine bmo_esubd_def = {
{{BMO_OP_SLOT_ELEMENT_BUF, "edges"},
{BMO_OP_SLOT_FLT, "smooth"},
{BMO_OP_SLOT_FLT, "fractal"},
+ {BMO_OP_SLOT_FLT, "along_normal"},
{BMO_OP_SLOT_INT, "numcuts"},
{BMO_OP_SLOT_INT, "seed"},
{BMO_OP_SLOT_MAPPING, "custompatterns"},
@@ -1109,6 +1110,26 @@ static BMOpDefine bmo_inset_def = {
};
/*
+ * Wire Frame
+ *
+ * Makes a wire copy of faces.
+ */
+static BMOpDefine bmo_wireframe_def = {
+ "wireframe",
+ {{BMO_OP_SLOT_ELEMENT_BUF, "faces"}, /* input faces */
+ {BMO_OP_SLOT_ELEMENT_BUF, "faceout"}, /* output faces */
+ {BMO_OP_SLOT_BOOL, "use_boundary"},
+ {BMO_OP_SLOT_BOOL, "use_even_offset"},
+ {BMO_OP_SLOT_BOOL, "use_crease"},
+ {BMO_OP_SLOT_FLT, "thickness"},
+ {BMO_OP_SLOT_BOOL, "use_relative_offset"},
+ {BMO_OP_SLOT_FLT, "depth"},
+ {0} /* null-terminating sentinel */},
+ bmo_wireframe_exec,
+ 0
+};
+
+/*
* Vertex Slide
*
* Translates vertes along an edge
@@ -1124,6 +1145,35 @@ static BMOpDefine bmo_vertex_slide_def = {
BMO_OP_FLAG_UNTAN_MULTIRES
};
+/*
+ * Convex Hull
+ *
+ * Builds a convex hull from the vertices in 'input'.
+ *
+ * If 'use_existing_faces' is true, the hull will not output triangles
+ * that are covered by a pre-existing face.
+ *
+ * All hull vertices, faces, and edges are added to 'geomout'. Any
+ * input elements that end up inside the hull (i.e. are not used by an
+ * output face) are added to the 'interior_geom' slot. The
+ * 'unused_geom' slot will contain all interior geometry that is
+ * completely unused. Lastly, 'holes_geom' contains edges and faces
+ * that were in the input and are part of the hull.
+*/
+static BMOpDefine bmo_convex_hull_def = {
+ "convex_hull",
+ {{BMO_OP_SLOT_ELEMENT_BUF, "input"},
+ {BMO_OP_SLOT_BOOL, "use_existing_faces"},
+
+ /* Outputs */
+ {BMO_OP_SLOT_ELEMENT_BUF, "geomout"},
+ {BMO_OP_SLOT_ELEMENT_BUF, "interior_geom"},
+ {BMO_OP_SLOT_ELEMENT_BUF, "unused_geom"},
+ {BMO_OP_SLOT_ELEMENT_BUF, "holes_geom"},
+ {0} /* null-terminating sentinel */},
+ bmo_convex_hull_exec,
+ 0
+};
BMOpDefine *opdefines[] = {
&bmo_split_def,
@@ -1192,7 +1242,9 @@ BMOpDefine *opdefines[] = {
&bmo_bridge_loops_def,
&bmo_solidify_def,
&bmo_inset_def,
+ &bmo_wireframe_def,
&bmo_vertex_slide_def,
+ &bmo_convex_hull_def,
};
int bmesh_total_ops = (sizeof(opdefines) / sizeof(void *));
diff --git a/source/blender/bmesh/intern/bmesh_operators.c b/source/blender/bmesh/intern/bmesh_operators.c
index dce491efe72..97347f841c8 100644
--- a/source/blender/bmesh/intern/bmesh_operators.c
+++ b/source/blender/bmesh/intern/bmesh_operators.c
@@ -1054,7 +1054,7 @@ static void bmo_flag_layer_alloc(BMesh *bm)
BM_elem_index_set(ele, i); /* set_inline */
}
- bm->elem_index_dirty &= ~(BM_VERT|BM_EDGE|BM_FACE);
+ bm->elem_index_dirty &= ~(BM_VERT | BM_EDGE | BM_FACE);
BLI_mempool_destroy(oldpool);
}
@@ -1099,7 +1099,7 @@ static void bmo_flag_layer_free(BMesh *bm)
BM_elem_index_set(ele, i); /* set_inline */
}
- bm->elem_index_dirty &= ~(BM_VERT|BM_EDGE|BM_FACE);
+ bm->elem_index_dirty &= ~(BM_VERT | BM_EDGE | BM_FACE);
BLI_mempool_destroy(oldpool);
}
@@ -1128,7 +1128,7 @@ static void bmo_flag_layer_clear(BMesh *bm)
BM_elem_index_set(ele, i); /* set_inline */
}
- bm->elem_index_dirty &= ~(BM_VERT|BM_EDGE|BM_FACE);
+ bm->elem_index_dirty &= ~(BM_VERT | BM_EDGE | BM_FACE);
}
void *BMO_slot_buffer_elem_first(BMOperator *op, const char *slotname)
diff --git a/source/blender/bmesh/intern/bmesh_operators.h b/source/blender/bmesh/intern/bmesh_operators.h
index f4db13e2777..b0a647b7009 100644
--- a/source/blender/bmesh/intern/bmesh_operators.h
+++ b/source/blender/bmesh/intern/bmesh_operators.h
@@ -98,7 +98,7 @@ extern int bmesh_total_ops;
struct Object;
void BM_mesh_esubdivide(BMesh *bm, const char edge_hflag,
- float smooth, float fractal,
+ float smooth, float fractal, float along_normal,
int numcuts,
int seltype, int cornertype,
const short use_singleedge, const short use_gridfill,
diff --git a/source/blender/bmesh/intern/bmesh_operators_private.h b/source/blender/bmesh/intern/bmesh_operators_private.h
index 423b30a503a..df48ec8468f 100644
--- a/source/blender/bmesh/intern/bmesh_operators_private.h
+++ b/source/blender/bmesh/intern/bmesh_operators_private.h
@@ -100,5 +100,7 @@ void bmo_create_circle_exec(BMesh *bm, BMOperator *op);
void bmo_bridge_loops_exec(BMesh *bm, BMOperator *op);
void bmo_solidify_face_region_exec(BMesh *bm, BMOperator *op);
void bmo_inset_exec(BMesh *bm, BMOperator *op);
+void bmo_wireframe_exec(BMesh *bm, BMOperator *op);
+void bmo_convex_hull_exec(BMesh *bm, BMOperator *op);
#endif /* __BMESH_OPERATORS_PRIVATE_H__ */
diff --git a/source/blender/bmesh/intern/bmesh_private.h b/source/blender/bmesh/intern/bmesh_private.h
index 6297e20d9d2..0827901f5c2 100644
--- a/source/blender/bmesh/intern/bmesh_private.h
+++ b/source/blender/bmesh/intern/bmesh_private.h
@@ -40,18 +40,18 @@
int bmesh_elem_check(void *element, const char htype);
#define BM_CHECK_ELEMENT(el) \
- if (bmesh_elem_check(el, ((BMHeader *)el)->htype)) { \
- printf("check_element failure, with code %i on line %i in file\n" \
- " \"%s\"\n\n", \
- bmesh_elem_check(el, ((BMHeader *)el)->htype), \
- __LINE__, __FILE__); \
- }
+ if (bmesh_elem_check(el, ((BMHeader *)el)->htype)) { \
+ printf("check_element failure, with code %i on line %i in file\n" \
+ " \"%s\"\n\n", \
+ bmesh_elem_check(el, ((BMHeader *)el)->htype), \
+ __LINE__, __FILE__); \
+ }
#define BM_DISK_EDGE_LINK_GET(e, v) ( \
((v) == ((BMEdge *)(e))->v1) ? \
&((e)->v1_disk_link) : \
&((e)->v2_disk_link) \
- )
+ )
int bmesh_radial_length(BMLoop *l);
int bmesh_disk_count(BMVert *v);
@@ -60,6 +60,7 @@ int bmesh_disk_count(BMVert *v);
* on using these internal flags!*/
#define _FLAG_JF 1 /* join faces */
#define _FLAG_MF 2 /* make face */
+#define _FLAG_MV 2 /* make face, vertex */
#define BM_ELEM_API_FLAG_ENABLE(element, f) ((element)->oflags[0].pflag |= (f))
#define BM_ELEM_API_FLAG_DISABLE(element, f) ((element)->oflags[0].pflag &= ~(f))
diff --git a/source/blender/bmesh/intern/bmesh_queries.c b/source/blender/bmesh/intern/bmesh_queries.c
index 3543fd952bb..8628ed7f9a1 100644
--- a/source/blender/bmesh/intern/bmesh_queries.c
+++ b/source/blender/bmesh/intern/bmesh_queries.c
@@ -900,7 +900,7 @@ float BM_vert_calc_edge_angle(BMVert *v)
BMVert *v1 = BM_edge_other_vert(e1, v);
BMVert *v2 = BM_edge_other_vert(e2, v);
- return M_PI - angle_v3v3v3(v1->co, v->co, v2->co);
+ return (float)M_PI - angle_v3v3v3(v1->co, v->co, v2->co);
}
else {
return DEG2RADF(90.0f);
@@ -928,6 +928,28 @@ float BM_vert_calc_shell_factor(BMVert *v)
}
/**
+ * \note quite an obscure function.
+ * used in bmesh operators that have a relative scale options,
+ */
+float BM_vert_calc_mean_tagged_edge_length(BMVert *v)
+{
+ BMIter iter;
+ BMEdge *e;
+ int tot;
+ float length = 0.0f;
+
+ BM_ITER_ELEM_INDEX (e, &iter, v, BM_EDGES_OF_VERT, tot) {
+ BMVert *v_other = BM_edge_other_vert(e, v);
+ if (BM_elem_flag_test(v_other, BM_ELEM_TAG)) {
+ length += BM_edge_calc_length(e);
+ }
+ }
+
+ return length / (float)tot;
+}
+
+
+/**
* Returns the edge existing between v1 and v2, or NULL if there isn't one.
*
* \note multiple edges may exist between any two vertices, and therefore
diff --git a/source/blender/bmesh/intern/bmesh_queries.h b/source/blender/bmesh/intern/bmesh_queries.h
index aefeb80c4f3..08e15884b3f 100644
--- a/source/blender/bmesh/intern/bmesh_queries.h
+++ b/source/blender/bmesh/intern/bmesh_queries.h
@@ -65,6 +65,7 @@ void BM_edge_calc_face_tangent(BMEdge *e, BMLoop *e_loop, float r_tangent[3])
float BM_vert_calc_edge_angle(BMVert *v);
float BM_vert_calc_shell_factor(BMVert *v);
+float BM_vert_calc_mean_tagged_edge_length(BMVert *v);
BMEdge *BM_edge_exists(BMVert *v1, BMVert *v2);
diff --git a/source/blender/bmesh/intern/bmesh_walkers.c b/source/blender/bmesh/intern/bmesh_walkers.c
index a3b5d94ba8e..ea29c149c1a 100644
--- a/source/blender/bmesh/intern/bmesh_walkers.c
+++ b/source/blender/bmesh/intern/bmesh_walkers.c
@@ -226,8 +226,7 @@ void *BMW_state_add(BMWalker *walker)
BMwGenericWalker *newstate;
newstate = BLI_mempool_alloc(walker->worklist);
newstate->depth = walker->depth;
- switch (walker->order)
- {
+ switch (walker->order) {
case BMW_DEPTH_FIRST:
BLI_addhead(&walker->states, newstate);
break;
diff --git a/source/blender/bmesh/intern/bmesh_walkers_impl.c b/source/blender/bmesh/intern/bmesh_walkers_impl.c
index 113e1ddc164..01c269657dc 100644
--- a/source/blender/bmesh/intern/bmesh_walkers_impl.c
+++ b/source/blender/bmesh/intern/bmesh_walkers_impl.c
@@ -838,7 +838,7 @@ static void *bmw_EdgeringWalker_step(BMWalker *walker)
{
BMwEdgeringWalker *lwalk = BMW_current_state(walker);
BMEdge *e, *wireedge = lwalk->wireedge;
- BMLoop *l = lwalk->l , *origl = lwalk->l;
+ BMLoop *l = lwalk->l, *origl = lwalk->l;
#ifdef BMW_EDGERING_NGON
int i, len;
#endif
@@ -880,7 +880,7 @@ static void *bmw_EdgeringWalker_step(BMWalker *walker)
}
/* only walk to manifold edge */
if ((l->f->len % 2 == 0) && EDGE_CHECK(l->e) &&
- !BLI_ghash_haskey(walker->visithash, l->e))
+ !BLI_ghash_haskey(walker->visithash, l->e))
#else
diff --git a/source/blender/bmesh/operators/bmo_bevel.c b/source/blender/bmesh/operators/bmo_bevel.c
index 46dd7606940..f02b88c5b05 100644
--- a/source/blender/bmesh/operators/bmo_bevel.c
+++ b/source/blender/bmesh/operators/bmo_bevel.c
@@ -151,10 +151,10 @@ static void calc_corner_co(BMLoop *l, const float fac, float r_co[3],
/* done */
if (do_even) {
- mul_v3_fl(co_ofs, (fac * 0.5) * shell_angle_to_dist(0.5f * angle));
+ mul_v3_fl(co_ofs, (fac * 0.5f) * shell_angle_to_dist(0.5f * angle));
}
else {
- mul_v3_fl(co_ofs, fac * 0.5);
+ mul_v3_fl(co_ofs, fac * 0.5f);
}
}
@@ -208,9 +208,9 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
BLI_smallhash_init(&hash);
BMO_ITER (e, &siter, bm, op, "geom", BM_EDGE) {
- BMO_elem_flag_enable(bm, e, BEVEL_FLAG|BEVEL_DEL);
- BMO_elem_flag_enable(bm, e->v1, BEVEL_FLAG|BEVEL_DEL);
- BMO_elem_flag_enable(bm, e->v2, BEVEL_FLAG|BEVEL_DEL);
+ BMO_elem_flag_enable(bm, e, BEVEL_FLAG | BEVEL_DEL);
+ BMO_elem_flag_enable(bm, e->v1, BEVEL_FLAG | BEVEL_DEL);
+ BMO_elem_flag_enable(bm, e->v2, BEVEL_FLAG | BEVEL_DEL);
if (BM_edge_face_count(e) < 2) {
BMO_elem_flag_disable(bm, e, BEVEL_DEL);
@@ -242,7 +242,7 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
if (!BMO_elem_flag_test(bm, e, EDGE_OLD)) {
BM_elem_index_set(e, BLI_array_count(etags)); /* set_dirty! */
- BLI_array_growone(etags);
+ BLI_array_grow_one(etags);
BMO_elem_flag_enable(bm, e, EDGE_OLD);
}
@@ -256,11 +256,11 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
BM_ITER_ELEM (l2, &liter2, l->f, BM_LOOPS_OF_FACE) {
BM_elem_index_set(l2, BLI_array_count(tags)); /* set_loop */
- BLI_array_growone(tags);
+ BLI_array_grow_one(tags);
if (!BMO_elem_flag_test(bm, l2->e, EDGE_OLD)) {
BM_elem_index_set(l2->e, BLI_array_count(etags)); /* set_dirty! */
- BLI_array_growone(etags);
+ BLI_array_grow_one(etags);
BMO_elem_flag_enable(bm, l2->e, EDGE_OLD);
}
@@ -281,8 +281,8 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
BMLoop *l;
BMIter liter;
- BMO_elem_flag_enable(bm, e->v1, BEVEL_FLAG|BEVEL_DEL);
- BMO_elem_flag_enable(bm, e->v2, BEVEL_FLAG|BEVEL_DEL);
+ BMO_elem_flag_enable(bm, e->v1, BEVEL_FLAG | BEVEL_DEL);
+ BMO_elem_flag_enable(bm, e->v2, BEVEL_FLAG | BEVEL_DEL);
if (BM_edge_face_count(e) < 2) {
BMO_elem_flag_disable(bm, e, BEVEL_DEL);
@@ -291,7 +291,7 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
}
if (!BLI_smallhash_haskey(&hash, (intptr_t)e)) {
- BLI_array_growone(etags);
+ BLI_array_grow_one(etags);
BM_elem_index_set(e, BLI_array_count(etags) - 1); /* set_dirty! */
BLI_smallhash_insert(&hash, (intptr_t)e, NULL);
BMO_elem_flag_enable(bm, e, EDGE_OLD);
@@ -309,11 +309,11 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
/* create tags for all loops in l-> */
BM_ITER_ELEM (l2, &liter2, l->f, BM_LOOPS_OF_FACE) {
- BLI_array_growone(tags);
+ BLI_array_grow_one(tags);
BM_elem_index_set(l2, BLI_array_count(tags) - 1); /* set_loop */
if (!BLI_smallhash_haskey(&hash, (intptr_t)l2->e)) {
- BLI_array_growone(etags);
+ BLI_array_grow_one(etags);
BM_elem_index_set(l2->e, BLI_array_count(etags) - 1); /* set_dirty! */
BLI_smallhash_insert(&hash, (intptr_t)l2->e, NULL);
BMO_elem_flag_enable(bm, l2->e, EDGE_OLD);
@@ -597,7 +597,7 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
continue;
}
- BMO_elem_flag_enable(bm, f, FACE_NEW|FACE_SPAN);
+ BMO_elem_flag_enable(bm, f, FACE_NEW | FACE_SPAN);
/* un-tag edges in f for deletio */
BM_ITER_ELEM (l2, &liter2, f, BM_LOOPS_OF_FACE) {
@@ -775,7 +775,7 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
fprintf(stderr, "%s: in bevel vert fill! (bmesh internal error)\n", __func__);
}
else {
- BMO_elem_flag_enable(bm, f, FACE_NEW|FACE_HOLE);
+ BMO_elem_flag_enable(bm, f, FACE_NEW | FACE_HOLE);
}
}
BLI_smallhash_release(&tmphash);
diff --git a/source/blender/bmesh/operators/bmo_connect.c b/source/blender/bmesh/operators/bmo_connect.c
index 3c1f10be4c4..b8abe112c4d 100644
--- a/source/blender/bmesh/operators/bmo_connect.c
+++ b/source/blender/bmesh/operators/bmo_connect.c
@@ -71,10 +71,10 @@ void bmo_connectverts_exec(BMesh *bm, BMOperator *op)
}
if (lastl != l->prev && lastl != l->next) {
- BLI_array_growone(loops);
+ BLI_array_grow_one(loops);
loops[BLI_array_count(loops) - 1] = lastl;
- BLI_array_growone(loops);
+ BLI_array_grow_one(loops);
loops[BLI_array_count(loops) - 1] = l;
}
@@ -87,10 +87,10 @@ void bmo_connectverts_exec(BMesh *bm, BMOperator *op)
}
if (BLI_array_count(loops) > 2) {
- BLI_array_growone(loops);
+ BLI_array_grow_one(loops);
loops[BLI_array_count(loops) - 1] = loops[BLI_array_count(loops) - 2];
- BLI_array_growone(loops);
+ BLI_array_grow_one(loops);
loops[BLI_array_count(loops) - 1] = loops[0];
}
@@ -101,10 +101,10 @@ void bmo_connectverts_exec(BMesh *bm, BMOperator *op)
continue;
}
- BLI_array_growone(verts);
+ BLI_array_grow_one(verts);
verts[BLI_array_count(verts) - 1] = loops[i * 2]->v;
- BLI_array_growone(verts);
+ BLI_array_grow_one(verts);
verts[BLI_array_count(verts) - 1] = loops[i * 2 + 1]->v;
}
diff --git a/source/blender/bmesh/operators/bmo_create.c b/source/blender/bmesh/operators/bmo_create.c
index f2ba110b43d..85aed6141bb 100644
--- a/source/blender/bmesh/operators/bmo_create.c
+++ b/source/blender/bmesh/operators/bmo_create.c
@@ -766,7 +766,7 @@ static EPath *edge_find_shortest_path(BMesh *bm, BMOperator *op, BMEdge *edge, E
i = 0;
BLI_array_empty(verts);
for (i = 0, node = path->nodes.first; node; node = node->next, i++) {
- BLI_array_growone(verts);
+ BLI_array_grow_one(verts);
verts[i] = node->v;
}
@@ -999,7 +999,7 @@ void bmo_edgenet_fill_exec(BMesh *bm, BMOperator *op)
}
edata[BM_elem_index_get(e)].ftag++;
- BLI_array_growone(edges);
+ BLI_array_grow_one(edges);
edges[i++] = e;
BLI_array_append(verts, node->v);
@@ -1009,7 +1009,7 @@ void bmo_edgenet_fill_exec(BMesh *bm, BMOperator *op)
vote_on_winding(edge, path->nodes.last, winding);
}
- BLI_array_growone(edges);
+ BLI_array_grow_one(edges);
edges[i++] = edge;
edata[BM_elem_index_get(edge)].ftag++;
@@ -1157,7 +1157,7 @@ void bmo_edgenet_prepare(BMesh *bm, BMOperator *op)
i = 0;
while (e) {
BMO_elem_flag_enable(bm, e, EDGE_VIS);
- BLI_array_growone(edges);
+ BLI_array_grow_one(edges);
edges[i] = e;
e = edge_next(bm, e);
@@ -1166,11 +1166,11 @@ void bmo_edgenet_prepare(BMesh *bm, BMOperator *op)
if (!count) {
edges1 = edges;
- BLI_array_set_length(edges1, BLI_array_count(edges));
+ BLI_array_length_set(edges1, BLI_array_count(edges));
}
else {
edges2 = edges;
- BLI_array_set_length(edges2, BLI_array_count(edges));
+ BLI_array_length_set(edges2, BLI_array_count(edges));
}
BLI_array_empty(edges);
@@ -1285,7 +1285,7 @@ void bmo_contextual_create_exec(BMesh *bm, BMOperator *op)
const short use_smooth = BMO_slot_bool_get(op, "use_smooth");
/* count number of each element type we were passe */
- BMO_ITER (h, &oiter, bm, op, "geom", BM_VERT|BM_EDGE|BM_FACE) {
+ BMO_ITER (h, &oiter, bm, op, "geom", BM_VERT | BM_EDGE | BM_FACE) {
switch (h->htype) {
case BM_VERT: totv++; break;
case BM_EDGE: tote++; break;
diff --git a/source/blender/bmesh/operators/bmo_dissolve.c b/source/blender/bmesh/operators/bmo_dissolve.c
index 8e7723fefdd..1451625d3bb 100644
--- a/source/blender/bmesh/operators/bmo_dissolve.c
+++ b/source/blender/bmesh/operators/bmo_dissolve.c
@@ -34,14 +34,14 @@
#include "intern/bmesh_operators_private.h" /* own include */
-#define FACE_MARK 1
-#define FACE_ORIG 2
-#define FACE_NEW 4
-#define EDGE_MARK 1
+#define FACE_MARK 1
+#define FACE_ORIG 2
+#define FACE_NEW 4
+#define EDGE_MARK 1
-#define VERT_MARK 1
+#define VERT_MARK 1
-static int UNUSED_FUNCTION(check_hole_in_region)(BMesh *bm, BMFace *f)
+static int UNUSED_FUNCTION(check_hole_in_region) (BMesh * bm, BMFace * f)
{
BMWalker regwalker;
BMIter liter2;
@@ -60,8 +60,8 @@ static int UNUSED_FUNCTION(check_hole_in_region)(BMesh *bm, BMFace *f)
l2 = BM_iter_new(&liter2, bm, BM_LOOPS_OF_FACE, f2);
for ( ; l2; l2 = BM_iter_step(&liter2)) {
l3 = l2->radial_next;
- if ( BMO_elem_flag_test(bm, l3->f, FACE_MARK) !=
- BMO_elem_flag_test(bm, l2->f, FACE_MARK))
+ if (BMO_elem_flag_test(bm, l3->f, FACE_MARK) !=
+ BMO_elem_flag_test(bm, l2->f, FACE_MARK))
{
if (!BMO_elem_flag_test(bm, l2->e, EDGE_MARK)) {
return FALSE;
@@ -433,8 +433,8 @@ void dummy_exec(BMesh *bm, BMOperator *op)
fe = l->e;
for ( ; l; l = BM_iter_step(&liter)) {
f2 = BM_iter_new(&fiter, bm,
- BM_FACES_OF_EDGE, l->e);
- for ( ; f2; f2 = BM_iter_step(&fiter)) {
+ BM_FACES_OF_EDGE, l->e);
+ for (; f2; f2 = BM_iter_step(&fiter)) {
if (f2 != f) {
BM_faces_join_pair(bm, f, f2, l->e);
found2 = 1;
@@ -478,8 +478,8 @@ void dummy_exec(BMesh *bm, BMOperator *op)
/* Limited Dissolve */
-#define UNIT_TO_ANGLE DEG2RADF(90.0)
-#define ANGLE_TO_UNIT (1.0 / UNIT_TO_ANGLE)
+#define UNIT_TO_ANGLE DEG2RADF(90.0f)
+#define ANGLE_TO_UNIT (1.0f / UNIT_TO_ANGLE)
/* multiply vertex edge angle by face angle
* this means we are not left with sharp corners between _almost_ planer faces
@@ -520,14 +520,28 @@ void bmo_dissolve_limit_exec(BMesh *bm, BMOperator *op)
const float angle_max = (float)M_PI / 2.0f;
const float angle_limit = minf(angle_max, BMO_slot_float_get(op, "angle_limit"));
DissolveElemWeight *weight_elems = MEM_mallocN(MAX2(einput->len, vinput->len) *
- sizeof(DissolveElemWeight), __func__);
+ sizeof(DissolveElemWeight), __func__);
int i, tot_found;
+ BMIter iter;
+ BMEdge *e_iter;
+ BMEdge **earray;
+
+ int *vert_reverse_lookup;
+
+ BMEdge **einput_arr = (BMEdge **)einput->data.p;
+ BMVert **vinput_arr = (BMVert **)vinput->data.p;
+
/* --- first edges --- */
+ /* wire -> tag */
+ BM_ITER_MESH (e_iter, &iter, bm, BM_EDGES_OF_MESH) {
+ BM_elem_flag_set(e_iter, BM_ELEM_TAG, BM_edge_is_wire(e_iter));
+ }
+
/* go through and split edge */
for (i = 0, tot_found = 0; i < einput->len; i++) {
- BMEdge *e = ((BMEdge **)einput->data.p)[i];
+ BMEdge *e = einput_arr[i];
const float angle = BM_edge_calc_face_angle(e);
if (angle < angle_limit) {
@@ -562,24 +576,53 @@ void bmo_dissolve_limit_exec(BMesh *bm, BMOperator *op)
}
}
}
+ }
- /* remove all edges/verts left behind from dissolving */
- for (i = 0; i < einput->len; i++) {
- BMEdge *e = (BMEdge *)weight_elems[i].ele;
- if (BM_edge_is_wire(e)) {
- BMVert *v1 = e->v1;
- BMVert *v2 = e->v2;
- BM_edge_kill(bm, e);
- if (v1->e == NULL) BM_vert_kill(bm, v1);
- if (v2->e == NULL) BM_vert_kill(bm, v2);
+ /* prepare for cleanup */
+ BM_mesh_elem_index_ensure(bm, BM_VERT);
+ vert_reverse_lookup = MEM_mallocN(sizeof(int) * bm->totvert, __func__);
+ fill_vn_i(vert_reverse_lookup, bm->totvert, -1);
+ for (i = 0, tot_found = 0; i < vinput->len; i++) {
+ BMVert *v = vinput_arr[i];
+ vert_reverse_lookup[BM_elem_index_get(v)] = i;
+ }
+
+ /* --- cleanup --- */
+ earray = MEM_mallocN(sizeof(BMEdge *) * bm->totedge, __func__);
+ BM_ITER_MESH_INDEX (e_iter, &iter, bm, BM_EDGES_OF_MESH, i) {
+ earray[i] = e_iter;
+ }
+ /* remove all edges/verts left behind from dissolving, NULL'ing the vertex array so we dont re-use */
+ for (i = bm->totedge - 1; i != -1; i--) {
+ e_iter = earray[i];
+
+ if (BM_edge_is_wire(e_iter) && (BM_elem_flag_test(e_iter, BM_ELEM_TAG) == FALSE)) {
+ /* edge has become wire */
+ int vidx_reverse;
+ BMVert *v1 = e_iter->v1;
+ BMVert *v2 = e_iter->v2;
+ BM_edge_kill(bm, e_iter);
+ if (v1->e == NULL) {
+ vidx_reverse = vert_reverse_lookup[BM_elem_index_get(v1)];
+ if (vidx_reverse != -1) vinput_arr[vidx_reverse] = NULL;
+ BM_vert_kill(bm, v1);
+ }
+ if (v2->e == NULL) {
+ vidx_reverse = vert_reverse_lookup[BM_elem_index_get(v2)];
+ if (vidx_reverse != -1) vinput_arr[vidx_reverse] = NULL;
+ BM_vert_kill(bm, v2);
}
}
}
+ MEM_freeN(vert_reverse_lookup);
+
+ MEM_freeN(earray);
+
/* --- second verts --- */
for (i = 0, tot_found = 0; i < vinput->len; i++) {
- BMVert *v = ((BMVert **)vinput->data.p)[i];
- const float angle = bm_vert_edge_face_angle(v);
+ BMVert *v = vinput_arr[i];
+ const float angle = v ? bm_vert_edge_face_angle(v) : angle_limit;
if (angle < angle_limit) {
weight_elems[i].ele = (BMHeader *)v;
diff --git a/source/blender/bmesh/operators/bmo_dupe.c b/source/blender/bmesh/operators/bmo_dupe.c
index 36d446a0a8c..212ec33e626 100644
--- a/source/blender/bmesh/operators/bmo_dupe.c
+++ b/source/blender/bmesh/operators/bmo_dupe.c
@@ -181,7 +181,7 @@ static BMFace *copy_face(BMOperator *op, BMesh *source_mesh,
* Internal Copy function.
*/
-static void copy_mesh(BMOperator *op, BMesh *source, BMesh *target)
+static void BKE_mesh_copy(BMOperator *op, BMesh *source, BMesh *target)
{
BMVert *v = NULL, *v2;
@@ -277,8 +277,8 @@ static void copy_mesh(BMOperator *op, BMesh *source, BMesh *target)
BLI_array_empty(vtar);
BLI_array_empty(edar);
- BLI_array_growitems(vtar, f->len);
- BLI_array_growitems(edar, f->len);
+ BLI_array_grow_items(vtar, f->len);
+ BLI_array_grow_items(edar, f->len);
copy_face(op, source, f, target, vtar, edar, vhash, ehash);
BMO_elem_flag_enable(source, f, DUPE_DONE);
@@ -326,7 +326,7 @@ void bmo_dupe_exec(BMesh *bm, BMOperator *op)
BMO_slot_buffer_flag_enable(bm, dupeop, "geom", BM_ALL, DUPE_INPUT);
/* use the internal copy function */
- copy_mesh(dupeop, bm, bm2);
+ BKE_mesh_copy(dupeop, bm, bm2);
/* Output */
/* First copy the input buffers to output buffers - original data */
diff --git a/source/blender/bmesh/operators/bmo_extrude.c b/source/blender/bmesh/operators/bmo_extrude.c
index 19e2dd85b0e..4bac54794bf 100644
--- a/source/blender/bmesh/operators/bmo_extrude.c
+++ b/source/blender/bmesh/operators/bmo_extrude.c
@@ -58,7 +58,7 @@ void bmo_extrude_face_indiv_exec(BMesh *bm, BMOperator *op)
BMO_ITER (f, &siter, bm, op, "faces", BM_FACE) {
BLI_array_empty(edges);
- BLI_array_growitems(edges, f->len);
+ BLI_array_grow_items(edges, f->len);
i = 0;
firstv = lastv = NULL;
@@ -251,7 +251,7 @@ void bmo_extrude_face_region_exec(BMesh *bm, BMOperator *op)
/* initialize our sub-operators */
BMO_op_init(bm, &dupeop, "dupe");
- BMO_slot_buffer_flag_enable(bm, op, "edgefacein", BM_EDGE|BM_FACE, EXT_INPUT);
+ BMO_slot_buffer_flag_enable(bm, op, "edgefacein", BM_EDGE | BM_FACE, EXT_INPUT);
/* if one flagged face is bordered by an un-flagged face, then we delete
* original geometry unless caller explicitly asked to keep it. */
@@ -573,12 +573,12 @@ static void solidify_add_thickness(BMesh *bm, const float dist)
continue;
}
- BLI_array_growitems(verts, f->len);
+ BLI_array_grow_items(verts, f->len);
BM_ITER_ELEM_INDEX (l, &loopIter, f, BM_LOOPS_OF_FACE, i) {
verts[i] = l->v->co;
}
- BLI_array_growitems(face_angles, f->len);
+ BLI_array_grow_items(face_angles, f->len);
angle_poly_v3(face_angles, (const float **)verts, f->len);
i = 0;
diff --git a/source/blender/bmesh/operators/bmo_hull.c b/source/blender/bmesh/operators/bmo_hull.c
new file mode 100644
index 00000000000..1cd095f72e4
--- /dev/null
+++ b/source/blender/bmesh/operators/bmo_hull.c
@@ -0,0 +1,758 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor(s): Nicholas Bishop
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/bmesh/operators/bmo_hull.c
+ * \ingroup bmesh
+ */
+
+#include "MEM_guardedalloc.h"
+
+#include "BLI_ghash.h"
+#include "BLI_listbase.h"
+#include "BLI_math.h"
+#include "BLI_utildefines.h"
+
+/* XXX: using 128 for totelem and pchunk of mempool, no idea what good
+ * values would be though */
+#include "BLI_mempool.h"
+
+#include "bmesh.h"
+
+/* Internal operator flags */
+typedef enum {
+ HULL_FLAG_INPUT = (1 << 0),
+ HULL_FLAG_TETRA_VERT = (1 << 1),
+
+ HULL_FLAG_INTERIOR_ELE = (1 << 2),
+ HULL_FLAG_OUTPUT_GEOM = (1 << 3),
+
+ HULL_FLAG_DEL = (1 << 4),
+ HULL_FLAG_HOLE = (1 << 5)
+} HullFlags;
+
+/* Store hull triangles seperate from BMesh faces until the end; this
+ * way we don't have to worry about cleaning up extraneous edges or
+ * incorrectly deleting existing geometry. */
+typedef struct HullTriangle {
+ BMVert *v[3];
+ float no[3];
+ int skip;
+} HullTriangle;
+
+/* These edges define the hole created in the hull by deleting faces
+ * that can "see" a new vertex (the boundary edges then form the edge
+ * of a new triangle fan that has the new vertex as its center) */
+typedef struct HullBoundaryEdge {
+ struct HullBoundaryEdge *next, *prev;
+ BMVert *v[2];
+} HullBoundaryEdge;
+
+
+
+/*************************** Boundary Edges ***************************/
+
+static int edge_match(BMVert *e1_0, BMVert *e1_1, BMVert *e2[2])
+{
+ return (e1_0 == e2[0] && e1_1 == e2[1]) ||
+ (e1_0 == e2[1] && e1_1 == e2[0]);
+}
+
+/* Returns true if the edge (e1, e2) is already in edges; that edge is
+ * deleted here as well. if not found just returns 0 */
+static int check_for_dup(ListBase *edges, BLI_mempool *pool,
+ BMVert *e1, BMVert *e2)
+{
+ HullBoundaryEdge *e, *next;
+
+ for (e = edges->first; e; e = next) {
+ next = e->next;
+
+ if (edge_match(e1, e2, e->v)) {
+ /* remove the interior edge */
+ BLI_remlink(edges, e);
+ BLI_mempool_free(pool, e);
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
+static void expand_boundary_edges(ListBase *edges, BLI_mempool *edge_pool,
+ const HullTriangle *t)
+{
+ HullBoundaryEdge *new;
+ int i;
+
+ /* Insert each triangle edge into the boundary list; if any of
+ * its edges are already in there, remove the edge entirely */
+ for (i = 0; i < 3; i++) {
+ if (!check_for_dup(edges, edge_pool, t->v[i], t->v[(i + 1) % 3])) {
+ new = BLI_mempool_calloc(edge_pool);
+ new->v[0] = t->v[i];
+ new->v[1] = t->v[(i + 1) % 3];
+ BLI_addtail(edges, new);
+ }
+ }
+}
+
+
+
+/*************************** Hull Triangles ***************************/
+
+static void hull_add_triangle(GHash *hull_triangles, BLI_mempool *pool,
+ BMVert *v1, BMVert *v2, BMVert *v3)
+{
+ HullTriangle *t;
+
+ t = BLI_mempool_calloc(pool);
+ t->v[0] = v1;
+ t->v[1] = v2;
+ t->v[2] = v3;
+
+ BLI_ghash_insert(hull_triangles, t, NULL);
+ normal_tri_v3(t->no, v1->co, v2->co, v3->co);
+}
+
+static int hull_point_tri_side(const HullTriangle *t, const float co[3])
+{
+ float p[3], d;
+ sub_v3_v3v3(p, co, t->v[0]->co);
+ d = dot_v3v3(t->no, p);
+ if (d < 0) return -1;
+ else if (d > 0) return 1;
+ else return 0;
+}
+
+/* Get all hull triangles that vertex 'v' is outside of */
+static GHash *hull_triangles_v_outside(GHash *hull_triangles, const BMVert *v)
+{
+ GHash *outside;
+ GHashIterator iter;
+
+ outside = BLI_ghash_new(BLI_ghashutil_ptrhash,
+ BLI_ghashutil_ptrcmp,
+ "outside");
+
+ GHASH_ITER (iter, hull_triangles) {
+ HullTriangle *t = BLI_ghashIterator_getKey(&iter);
+
+ if (hull_point_tri_side(t, v->co) >= 0)
+ BLI_ghash_insert(outside, t, NULL);
+ }
+
+ return outside;
+}
+
+/* Similar to above, but just get true/false rather than triangles */
+static int hull_test_v_outside(GHash *hull_triangles, const BMVert *v)
+{
+ GHashIterator iter;
+
+ GHASH_ITER (iter, hull_triangles) {
+ HullTriangle *t = BLI_ghashIterator_getKey(&iter);
+
+ if (hull_point_tri_side(t, v->co) >= 0)
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+
+/* For vertex 'v', find which triangles must be deleted to extend the
+ * hull; find the boundary edges of that hole so that it can be filled
+ * with connections to the new vertex, and update the hull_triangles
+ * to delete the marked triangles */
+static void add_point(GHash *hull_triangles, BLI_mempool *hull_pool,
+ BLI_mempool *edge_pool, GHash *outside, BMVert *v)
+{
+ ListBase edges = {NULL, NULL};
+ HullBoundaryEdge *e, *next;
+ GHashIterator iter;
+
+ GHASH_ITER (iter, outside) {
+ HullTriangle *t = BLI_ghashIterator_getKey(&iter);
+ expand_boundary_edges(&edges, edge_pool, t);
+
+ /* Delete the triangle */
+ BLI_ghash_remove(hull_triangles, t, NULL, NULL);
+ BLI_mempool_free(hull_pool, t);
+ }
+
+ /* Fill hole boundary with triangles to new point */
+ for (e = edges.first; e; e = next) {
+ next = e->next;
+ hull_add_triangle(hull_triangles, hull_pool, e->v[0], e->v[1], v);
+ BLI_mempool_free(edge_pool, e);
+ }
+}
+
+static BMFace *hull_find_example_face(BMesh *bm, BMEdge *e)
+{
+ BMIter iter;
+ BMFace *f;
+
+ BM_ITER_ELEM (f, &iter, e, BM_FACES_OF_EDGE) {
+ if (BMO_elem_flag_test(bm, f, HULL_FLAG_INPUT) ||
+ !BMO_elem_flag_test(bm, f, HULL_FLAG_OUTPUT_GEOM))
+ {
+ return f;
+ }
+ }
+
+ return NULL;
+}
+
+static void hull_output_triangles(BMesh *bm, GHash *hull_triangles)
+{
+ GHashIterator iter;
+
+ GHASH_ITER (iter, hull_triangles) {
+ HullTriangle *t = BLI_ghashIterator_getKey(&iter);
+
+ if (!t->skip) {
+ BMEdge *edges[3] = {
+ BM_edge_create(bm, t->v[0], t->v[1], NULL, TRUE),
+ BM_edge_create(bm, t->v[1], t->v[2], NULL, TRUE),
+ BM_edge_create(bm, t->v[2], t->v[0], NULL, TRUE)
+ };
+ BMFace *f, *example = NULL;
+ int i;
+
+ /* Look for an adjacent face that existed before the hull */
+ for (i = 0; i < 3; i++) {
+ if (!example)
+ example = hull_find_example_face(bm, edges[i]);
+ }
+
+ f = BM_face_create_quad_tri_v(bm, t->v, 3, example, FALSE);
+ BM_face_copy_shared(bm, f);
+
+ /* Mark face/verts/edges for 'geomout' slot and select */
+ BMO_elem_flag_enable(bm, f, HULL_FLAG_OUTPUT_GEOM);
+ BM_face_select_set(bm, f, TRUE);
+ for (i = 0; i < 3; i++) {
+ BMO_elem_flag_enable(bm, t->v[i], HULL_FLAG_OUTPUT_GEOM);
+ BMO_elem_flag_enable(bm, edges[i], HULL_FLAG_OUTPUT_GEOM);
+ }
+ }
+ }
+}
+
+
+
+/***************************** Final Edges ****************************/
+
+typedef struct {
+ GHash *edges;
+ BLI_mempool *base_pool, *link_pool;
+} HullFinalEdges;
+
+static LinkData *final_edges_find_link(ListBase *adj, BMVert *v)
+{
+ LinkData *link;
+
+ for (link = adj->first; link; link = link->next) {
+ if (link->data == v)
+ return link;
+ }
+
+ return NULL;
+}
+
+static int hull_final_edges_lookup(HullFinalEdges *final_edges,
+ BMVert *v1, BMVert *v2)
+{
+ ListBase *adj;
+
+ /* Use lower vertex pointer for hash key */
+ if (v1 > v2)
+ SWAP(BMVert *, v1, v2);
+
+ adj = BLI_ghash_lookup(final_edges->edges, v1);
+ if (!adj)
+ return FALSE;
+
+ return !!final_edges_find_link(adj, v2);
+}
+
+/* Used for checking whether a pre-existing edge lies on the hull */
+static HullFinalEdges *hull_final_edges(GHash *hull_triangles)
+{
+ HullFinalEdges *final_edges;
+ GHashIterator iter;
+
+ final_edges = MEM_callocN(sizeof(HullFinalEdges), "HullFinalEdges");
+ final_edges->edges = BLI_ghash_new(BLI_ghashutil_ptrhash,
+ BLI_ghashutil_ptrcmp,
+ "final edges ghash");
+ final_edges->base_pool = BLI_mempool_create(sizeof(ListBase), 128, 128, 0);
+ final_edges->link_pool = BLI_mempool_create(sizeof(LinkData), 128, 128, 0);
+
+ GHASH_ITER (iter, hull_triangles) {
+ LinkData *link;
+ int i;
+
+ for (i = 0; i < 3; i++) {
+ HullTriangle *t = BLI_ghashIterator_getKey(&iter);
+ BMVert *v1 = t->v[i];
+ BMVert *v2 = t->v[(i + 1) % 3];
+ ListBase *adj;
+
+ /* Use lower vertex pointer for hash key */
+ if (v1 > v2)
+ SWAP(BMVert *, v1, v2);
+
+ adj = BLI_ghash_lookup(final_edges->edges, v1);
+ if (!adj) {
+ adj = BLI_mempool_calloc(final_edges->base_pool);
+ BLI_ghash_insert(final_edges->edges, v1, adj);
+ }
+
+ if (!final_edges_find_link(adj, v2)) {
+ link = BLI_mempool_calloc(final_edges->link_pool);
+ link->data = v2;
+ BLI_addtail(adj, link);
+ }
+ }
+ }
+
+ return final_edges;
+}
+
+static void hull_final_edges_free(HullFinalEdges *final_edges)
+{
+ BLI_ghash_free(final_edges->edges, NULL, NULL);
+ BLI_mempool_destroy(final_edges->base_pool);
+ BLI_mempool_destroy(final_edges->link_pool);
+ MEM_freeN(final_edges);
+}
+
+
+
+/************************* Initial Tetrahedron ************************/
+
+static void hull_add_tetrahedron(GHash *hull_triangles, BLI_mempool *pool,
+ BMVert *tetra[4])
+{
+ float center[3];
+ int i, indices[4][3] = {
+ {0, 1, 2},
+ {0, 2, 3},
+ {1, 0, 3},
+ {2, 1, 3}};
+
+ /* Calculate center */
+ zero_v3(center);
+ for (i = 0; i < 4; i++)
+ add_v3_v3(center, tetra[i]->co);
+ mul_v3_fl(center, 0.25f);
+
+ for (i = 0; i < 4; i++) {
+ BMVert *v1 = tetra[indices[i][0]];
+ BMVert *v2 = tetra[indices[i][1]];
+ BMVert *v3 = tetra[indices[i][2]];
+ float no[3], d[3];
+
+ normal_tri_v3(no, v1->co, v2->co, v3->co);
+ sub_v3_v3v3(d, center, v1->co);
+ if (dot_v3v3(no, d) > 0)
+ SWAP(BMVert *, v1, v3);
+
+ hull_add_triangle(hull_triangles, pool, v1, v2, v3);
+ }
+}
+
+/* For each axis, get the minimum and maximum input vertices */
+static void hull_get_min_max(BMesh *bm, BMOperator *op,
+ BMVert *min[3], BMVert *max[3])
+{
+ BMOIter oiter;
+ BMVert *v;
+
+ min[0] = min[1] = min[2] = NULL;
+ max[0] = max[1] = max[2] = NULL;
+
+ BMO_ITER (v, &oiter, bm, op, "input", BM_VERT) {
+ int i;
+
+ for (i = 0; i < 3; i++) {
+ if (!min[i] || v->co[i] < min[i]->co[i])
+ min[i] = v;
+ if (!max[i] || v->co[i] > max[i]->co[i])
+ max[i] = v;
+ }
+ }
+}
+
+/* Returns true if input is coplanar */
+static int hull_find_large_tetrahedron(BMesh *bm, BMOperator *op,
+ BMVert *tetra[4])
+{
+ BMVert *min[3], *max[3], *v;
+ BMOIter oiter;
+ float widest_axis_len, largest_dist, plane_normal[3];
+ int i, j, widest_axis;
+
+ tetra[0] = tetra[1] = tetra[2] = tetra[3] = NULL;
+ hull_get_min_max(bm, op, min, max);
+
+ /* Check for flat axis */
+ for (i = 0; i < 3; i++) {
+ if (min[i] == max[i]) {
+ return TRUE;
+ }
+ }
+
+ /* Find widest axis */
+ widest_axis_len = 0.0f;
+ widest_axis = 0; /* set here in the unlikey case this isn't set below */
+ for (i = 0; i < 3; i++) {
+ float len = (max[i]->co[i] - min[i]->co[i]);
+ if (len >= widest_axis_len) {
+ widest_axis_len = len;
+ widest_axis = i;
+ }
+ }
+
+ /* Use widest axis for first two points */
+ tetra[0] = min[widest_axis];
+ tetra[1] = max[widest_axis];
+ BMO_elem_flag_enable(bm, tetra[0], HULL_FLAG_TETRA_VERT);
+ BMO_elem_flag_enable(bm, tetra[1], HULL_FLAG_TETRA_VERT);
+
+ /* Choose third vertex farthest from existing line segment */
+ largest_dist = 0;
+ for (i = 0; i < 3; i++) {
+ BMVert *v;
+ float dist;
+
+ if (i == widest_axis)
+ continue;
+
+ v = min[i];
+ for (j = 0; j < 2; j++) {
+ dist = dist_to_line_segment_v3(v->co, tetra[0]->co, tetra[1]->co);
+ if (dist > largest_dist) {
+ largest_dist = dist;
+ tetra[2] = v;
+ }
+
+ v = max[i];
+ }
+ }
+
+ if (tetra[2]) {
+ BMO_elem_flag_enable(bm, tetra[2], HULL_FLAG_TETRA_VERT);
+ }
+ else {
+ return TRUE;
+ }
+
+ /* Check for colinear vertices */
+ if (largest_dist < 0.0001f)
+ return TRUE;
+
+ /* Choose fourth point farthest from existing plane */
+ largest_dist = 0;
+ normal_tri_v3(plane_normal, tetra[0]->co, tetra[1]->co, tetra[2]->co);
+ BMO_ITER (v, &oiter, bm, op, "input", BM_VERT) {
+ if (!BMO_elem_flag_test(bm, v, HULL_FLAG_TETRA_VERT)) {
+ float dist = fabsf(dist_to_plane_v3(v->co, tetra[0]->co, plane_normal));
+ if (dist > largest_dist) {
+ largest_dist = dist;
+ tetra[3] = v;
+ }
+ }
+ }
+
+ if (tetra[3]) {
+ BMO_elem_flag_enable(bm, tetra[3], HULL_FLAG_TETRA_VERT);
+ }
+ else {
+ return TRUE;
+ }
+
+ if (largest_dist < 0.0001f)
+ return TRUE;
+
+ return FALSE;
+}
+
+
+
+/**************************** Final Output ****************************/
+
+static void hull_remove_overlapping(BMesh *bm, GHash *hull_triangles,
+ HullFinalEdges *final_edges)
+{
+ GHashIterator hull_iter;
+
+ GHASH_ITER (hull_iter, hull_triangles) {
+ HullTriangle *t = BLI_ghashIterator_getKey(&hull_iter);
+ BMIter bm_iter1, bm_iter2;
+ BMFace *f;
+ int f_on_hull;
+
+ BM_ITER_ELEM (f, &bm_iter1, t->v[0], BM_FACES_OF_VERT) {
+ BMEdge *e;
+
+ /* Check that all the face's edges are on the hull,
+ otherwise can't reuse it */
+ f_on_hull = TRUE;
+ BM_ITER_ELEM (e, &bm_iter2, f, BM_EDGES_OF_FACE) {
+ if (!hull_final_edges_lookup(final_edges, e->v1, e->v2)) {
+ f_on_hull = FALSE;
+ break;
+ }
+ }
+
+ /* Note: can't change ghash while iterating, so mark
+ with 'skip' flag rather than deleting triangles */
+ if (BM_vert_in_face(f, t->v[1]) &&
+ BM_vert_in_face(f, t->v[2]) && f_on_hull) {
+ t->skip = TRUE;
+ BMO_elem_flag_disable(bm, f, HULL_FLAG_INTERIOR_ELE);
+ BMO_elem_flag_enable(bm, f, HULL_FLAG_HOLE);
+ }
+ }
+ }
+}
+
+static void hull_mark_interior_elements(BMesh *bm, BMOperator *op,
+ GHash *hull_triangles,
+ HullFinalEdges *final_edges)
+{
+ BMVert *v;
+ BMEdge *e;
+ BMFace *f;
+ BMOIter oiter;
+
+ /* Check all input vertices again to see if they are actually part
+ of the hull */
+ BMO_ITER (v, &oiter, bm, op, "input", BM_VERT) {
+ if (!hull_test_v_outside(hull_triangles, v)) {
+ /* Mark for 'interior_verts' slot */
+ BMO_elem_flag_enable(bm, v, HULL_FLAG_INTERIOR_ELE);
+ }
+ }
+
+ /* Check for interior edges too */
+ BMO_ITER (e, &oiter, bm, op, "input", BM_EDGE) {
+ if (!hull_final_edges_lookup(final_edges, e->v1, e->v2))
+ BMO_elem_flag_enable(bm, e, HULL_FLAG_INTERIOR_ELE);
+ }
+
+ /* Mark all input faces as interior, some may be unmarked in
+ hull_remove_overlapping() */
+ BMO_ITER (f, &oiter, bm, op, "input", BM_FACE) {
+ BMO_elem_flag_enable(bm, f, HULL_FLAG_INTERIOR_ELE);
+ }
+}
+
+static void hull_tag_unused(BMesh *bm, BMOperator *op)
+{
+ BMIter iter;
+ BMOIter oiter;
+ BMVert *v;
+ BMEdge *e;
+ BMFace *f;
+
+ /* Mark vertices, edges, and faces that are already marked
+ interior (i.e. were already part of the input, but not part of
+ the hull), but that aren't also used by elements outside the
+ input set */
+ BMO_ITER (v, &oiter, bm, op, "input", BM_VERT) {
+ if (BMO_elem_flag_test(bm, v, HULL_FLAG_INTERIOR_ELE)) {
+ int del = TRUE;
+
+ BM_ITER_ELEM (e, &iter, v, BM_EDGES_OF_VERT) {
+ if (!BMO_elem_flag_test(bm, e, HULL_FLAG_INPUT)) {
+ del = FALSE;
+ break;
+ }
+ }
+
+ BM_ITER_ELEM (f, &iter, v, BM_FACES_OF_VERT) {
+ if (!BMO_elem_flag_test(bm, f, HULL_FLAG_INPUT)) {
+ del = FALSE;
+ break;
+ }
+ }
+
+ if (del)
+ BMO_elem_flag_enable(bm, v, HULL_FLAG_DEL);
+ }
+ }
+
+ BMO_ITER (e, &oiter, bm, op, "input", BM_EDGE) {
+ if (BMO_elem_flag_test(bm, e, HULL_FLAG_INTERIOR_ELE)) {
+ int del = TRUE;
+
+ BM_ITER_ELEM (f, &iter, e, BM_FACES_OF_EDGE) {
+ if (!BMO_elem_flag_test(bm, f, HULL_FLAG_INPUT)) {
+ del = FALSE;
+ break;
+ }
+ }
+
+ if (del)
+ BMO_elem_flag_enable(bm, e, HULL_FLAG_DEL);
+ }
+ }
+
+ BMO_ITER (f, &oiter, bm, op, "input", BM_FACE) {
+ if (BMO_elem_flag_test(bm, f, HULL_FLAG_INTERIOR_ELE))
+ BMO_elem_flag_enable(bm, f, HULL_FLAG_DEL);
+ }
+}
+
+void hull_tag_holes(BMesh *bm, BMOperator *op)
+{
+ BMIter iter;
+ BMOIter oiter;
+ BMFace *f;
+ BMEdge *e;
+
+ /* Unmark any hole faces if they are isolated or part of a
+ * border */
+ BMO_ITER (f, &oiter, bm, op, "input", BM_FACE) {
+ if (BMO_elem_flag_test(bm, f, HULL_FLAG_HOLE)) {
+ BM_ITER_ELEM (e, &iter, f, BM_EDGES_OF_FACE) {
+ if (BM_edge_face_count(e) == 1) {
+ BMO_elem_flag_disable(bm, f, HULL_FLAG_HOLE);
+ break;
+ }
+ }
+ }
+ }
+
+ /* Mark edges too if all adjacent faces are holes */
+ BMO_ITER (e, &oiter, bm, op, "input", BM_EDGE) {
+ int hole = TRUE;
+
+ BM_ITER_ELEM (f, &iter, e, BM_FACES_OF_EDGE) {
+ if (!BMO_elem_flag_test(bm, f, HULL_FLAG_HOLE)) {
+ hole = FALSE;
+ break;
+ }
+ }
+
+ if (hole)
+ BMO_elem_flag_enable(bm, e, HULL_FLAG_HOLE);
+ }
+}
+
+void bmo_convex_hull_exec(BMesh *bm, BMOperator *op)
+{
+ HullFinalEdges *final_edges;
+ BLI_mempool *hull_pool, *edge_pool;
+ BMVert *v, *tetra[4];
+ BMElemF *ele;
+ BMOIter oiter;
+ GHash *hull_triangles;
+
+ /* Verify that at least four verts in the input */
+ if (BMO_slot_get(op, "input")->len < 4) {
+ BMO_error_raise(bm, op, BMERR_CONVEX_HULL_FAILED,
+ "Requires at least four vertices");
+ return;
+ }
+
+ /* Initialize the convex hull by building a tetrahedron. A
+ * degenerate tetrahedron can cause problems, so report error and
+ * fail if the result is coplanar */
+ if (hull_find_large_tetrahedron(bm, op, tetra)) {
+ BMO_error_raise(bm, op, BMERR_CONVEX_HULL_FAILED,
+ "Input vertices are coplanar");
+ return;
+ }
+
+ /* Tag input elements */
+ BMO_ITER (ele, &oiter, bm, op, "input", BM_ALL)
+ BMO_elem_flag_enable(bm, ele, HULL_FLAG_INPUT);
+
+ edge_pool = BLI_mempool_create(sizeof(HullBoundaryEdge), 128, 128, 0);
+ hull_pool = BLI_mempool_create(sizeof(HullTriangle), 128, 128, 0);
+ hull_triangles = BLI_ghash_new(BLI_ghashutil_ptrhash,
+ BLI_ghashutil_ptrcmp,
+ "hull_triangles");
+
+ /* Add tetrahedron triangles */
+ hull_add_tetrahedron(hull_triangles, hull_pool, tetra);
+
+ /* Expand hull to cover new vertices outside the existing hull */
+ BMO_ITER (v, &oiter, bm, op, "input", BM_VERT) {
+ if (!BMO_elem_flag_test(bm, v, HULL_FLAG_TETRA_VERT)) {
+ GHash *outside = hull_triangles_v_outside(hull_triangles, v);
+ if (BLI_ghash_size(outside)) {
+ /* Expand hull and delete interior triangles */
+ add_point(hull_triangles, hull_pool, edge_pool, outside, v);
+ }
+ BLI_ghash_free(outside, NULL, NULL);
+ }
+ }
+
+ BLI_mempool_destroy(edge_pool);
+ final_edges = hull_final_edges(hull_triangles);
+
+ hull_mark_interior_elements(bm, op, hull_triangles, final_edges);
+
+ /* Remove hull triangles covered by an existing face */
+ if (BMO_slot_bool_get(op, "use_existing_faces")) {
+ hull_remove_overlapping(bm, hull_triangles, final_edges);
+
+ hull_tag_holes(bm, op);
+ }
+
+ /* Done with edges */
+ hull_final_edges_free(final_edges);
+
+ /* Convert hull triangles to BMesh faces */
+ hull_output_triangles(bm, hull_triangles);
+ BLI_mempool_destroy(hull_pool);
+
+ BLI_ghash_free(hull_triangles, NULL, NULL);
+
+ hull_tag_unused(bm, op);
+
+ /* Output slot of input elements that ended up inside the hull
+ * rather than part of it */
+ BMO_slot_buffer_from_enabled_flag(bm, op, "interior_geom", BM_ALL,
+ HULL_FLAG_INTERIOR_ELE);
+
+ /* Output slot of input elements that ended up inside the hull and
+ * are are unused by other geometry. */
+ BMO_slot_buffer_from_enabled_flag(bm, op, "unused_geom", BM_ALL,
+ HULL_FLAG_DEL);
+
+ /* Output slot of faces and edges that were in the input and on
+ * the hull (useful for cases like bridging where you want to
+ * delete some input geometry) */
+ BMO_slot_buffer_from_enabled_flag(bm, op, "holes_geom", BM_ALL,
+ HULL_FLAG_HOLE);
+
+ /* Output slot of all hull vertices, faces, and edges */
+ BMO_slot_buffer_from_enabled_flag(bm, op, "geomout", BM_ALL,
+ HULL_FLAG_OUTPUT_GEOM);
+}
diff --git a/source/blender/bmesh/operators/bmo_inset.c b/source/blender/bmesh/operators/bmo_inset.c
index ee52f8bc0a9..26197c43bd0 100644
--- a/source/blender/bmesh/operators/bmo_inset.c
+++ b/source/blender/bmesh/operators/bmo_inset.c
@@ -80,23 +80,6 @@ static BMLoop *bm_edge_is_mixed_face_tag(BMLoop *l)
}
}
-float bm_vert_avg_tag_dist(BMVert *v)
-{
- BMIter iter;
- BMEdge *e;
- int tot;
- float length = 0.0f;
-
- BM_ITER_ELEM_INDEX (e, &iter, v, BM_EDGES_OF_VERT, tot) {
- BMVert *v_other = BM_edge_other_vert(e, v);
- if (BM_elem_flag_test(v_other, BM_ELEM_TAG)) {
- length += BM_edge_calc_length(e);
- }
- }
-
- return length / (float)tot;
-}
-
/**
* implementation is as follows...
*
@@ -330,7 +313,8 @@ void bmo_inset_exec(BMesh *bm, BMOperator *op)
/* scale by edge angle */
if (use_even_offset) {
- mul_v3_fl(tvec, shell_angle_to_dist(angle_normalized_v3v3(e_info_a->no, e_info_b->no) / 2.0f));
+ mul_v3_fl(tvec, shell_angle_to_dist(angle_normalized_v3v3(e_info_a->no,
+ e_info_b->no) / 2.0f));
}
/* scale relative to edge lengths */
@@ -495,8 +479,6 @@ void bmo_inset_exec(BMesh *bm, BMOperator *op)
BM_face_copy_shared(bm, f);
}
- MEM_freeN(edge_info);
-
/* we could flag new edges/verts too, is it useful? */
BMO_slot_buffer_from_enabled_flag(bm, op, "faceout", BM_FACE, ELE_NEW);
@@ -505,6 +487,28 @@ void bmo_inset_exec(BMesh *bm, BMOperator *op)
float (*varr_co)[3];
BMOIter oiter;
+ /* we need to re-calculate tagged normals, but for this purpose we can copy tagged verts from the
+ * faces they inset from, */
+ for (i = 0, es = edge_info; i < edge_info_len; i++, es++) {
+ zero_v3(es->e_new->v1->no);
+ zero_v3(es->e_new->v2->no);
+ }
+ for (i = 0, es = edge_info; i < edge_info_len; i++, es++) {
+ float *no = es->l->f->no;
+ add_v3_v3(es->e_new->v1->no, no);
+ add_v3_v3(es->e_new->v2->no, no);
+ }
+ for (i = 0, es = edge_info; i < edge_info_len; i++, es++) {
+ /* annoying, avoid normalizing twice */
+ if (len_squared_v3(es->e_new->v1->no) != 1.0f) {
+ normalize_v3(es->e_new->v1->no);
+ }
+ if (len_squared_v3(es->e_new->v2->no) != 1.0f) {
+ normalize_v3(es->e_new->v2->no);
+ }
+ }
+ /* done correcting edge verts normals */
+
/* untag verts */
BM_mesh_elem_hflag_disable_all(bm, BM_VERT, BM_ELEM_TAG, FALSE);
@@ -524,7 +528,7 @@ void bmo_inset_exec(BMesh *bm, BMOperator *op)
BM_ITER_MESH_INDEX (v, &iter, bm, BM_VERTS_OF_MESH, i) {
if (BM_elem_flag_test(v, BM_ELEM_TAG)) {
const float fac = (depth *
- (use_relative_offset ? bm_vert_avg_tag_dist(v) : 1.0f) *
+ (use_relative_offset ? BM_vert_calc_mean_tagged_edge_length(v) : 1.0f) *
(use_even_boundry ? BM_vert_calc_shell_factor(v) : 1.0f));
madd_v3_v3v3fl(varr_co[i], v->co, v->no, fac);
}
@@ -537,4 +541,6 @@ void bmo_inset_exec(BMesh *bm, BMOperator *op)
}
MEM_freeN(varr_co);
}
+
+ MEM_freeN(edge_info);
}
diff --git a/source/blender/bmesh/operators/bmo_join_triangles.c b/source/blender/bmesh/operators/bmo_join_triangles.c
index 582039fc1a2..d780e309118 100644
--- a/source/blender/bmesh/operators/bmo_join_triangles.c
+++ b/source/blender/bmesh/operators/bmo_join_triangles.c
@@ -293,7 +293,7 @@ void bmo_join_triangles_exec(BMesh *bm, BMOperator *op)
measure = measure_facepair(v1, v2, v3, v4, limit);
if (measure < limit) {
- BLI_array_growone(jedges);
+ BLI_array_grow_one(jedges);
jedges[i].e = e;
jedges[i].weight = measure;
diff --git a/source/blender/bmesh/operators/bmo_mirror.c b/source/blender/bmesh/operators/bmo_mirror.c
index cf1669d441e..53c51dfd483 100644
--- a/source/blender/bmesh/operators/bmo_mirror.c
+++ b/source/blender/bmesh/operators/bmo_mirror.c
@@ -71,7 +71,7 @@ void bmo_mirror_exec(BMesh *bm, BMOperator *op)
i = 0;
/* v2 = BM_iter_new(&iter, bm, BM_VERTS_OF_MESH, NULL); */ /* UNUSED */
BMO_ITER (v, &siter, bm, &dupeop, "newout", BM_VERT) {
- BLI_array_growone(vmap);
+ BLI_array_grow_one(vmap);
vmap[i] = v;
/* v2 = BM_iter_step(&iter); */ /* UNUSED */
i++;
diff --git a/source/blender/bmesh/operators/bmo_primitive.c b/source/blender/bmesh/operators/bmo_primitive.c
index 6fd3c8ce99c..08cd3835b2d 100644
--- a/source/blender/bmesh/operators/bmo_primitive.c
+++ b/source/blender/bmesh/operators/bmo_primitive.c
@@ -36,41 +36,41 @@
/* ************************ primitives ******************* */
static float icovert[12][3] = {
- {0.0f,0.0f,-200.0f},
- {144.72f, -105.144f,-89.443f},
- {-55.277f, -170.128,-89.443f},
- {-178.885f,0.0f,-89.443f},
- {-55.277f,170.128f,-89.443f},
- {144.72f,105.144f,-89.443f},
- {55.277f,-170.128f,89.443f},
- {-144.72f,-105.144f,89.443f},
- {-144.72f,105.144f,89.443f},
- {55.277f,170.128f,89.443f},
- {178.885f,0.0f,89.443f},
- {0.0f,0.0f,200.0f}
+ {0.0f, 0.0f, -200.0f},
+ {144.72f, -105.144f, -89.443f},
+ {-55.277f, -170.128, -89.443f},
+ {-178.885f, 0.0f, -89.443f},
+ {-55.277f, 170.128f, -89.443f},
+ {144.72f, 105.144f, -89.443f},
+ {55.277f, -170.128f, 89.443f},
+ {-144.72f, -105.144f, 89.443f},
+ {-144.72f, 105.144f, 89.443f},
+ {55.277f, 170.128f, 89.443f},
+ {178.885f, 0.0f, 89.443f},
+ {0.0f, 0.0f, 200.0f}
};
static short icoface[20][3] = {
- {0,1,2},
- {1,0,5},
- {0,2,3},
- {0,3,4},
- {0,4,5},
- {1,5,10},
- {2,1,6},
- {3,2,7},
- {4,3,8},
- {5,4,9},
- {1,10,6},
- {2,6,7},
- {3,7,8},
- {4,8,9},
- {5,9,10},
- {6,10,11},
- {7,6,11},
- {8,7,11},
- {9,8,11},
- {10,9,11}
+ {0, 1, 2},
+ {1, 0, 5},
+ {0, 2, 3},
+ {0, 3, 4},
+ {0, 4, 5},
+ {1, 5, 10},
+ {2, 1, 6},
+ {3, 2, 7},
+ {4, 3, 8},
+ {5, 4, 9},
+ {1, 10, 6},
+ {2, 6, 7},
+ {3, 7, 8},
+ {4, 8, 9},
+ {5, 9, 10},
+ {6, 10, 11},
+ {7, 6, 11},
+ {8, 7, 11},
+ {9, 8, 11},
+ {10, 9, 11}
};
/* HACK: these can also be found in cmoview.tga.c, but are here so that they can be found by linker
@@ -81,149 +81,149 @@ static int monkeyo = 4;
static int monkeynv = 271;
static int monkeynf = 250;
static signed char monkeyv[271][3] = {
- {-71,21,98},{-63,12,88},{-57,7,74},{-82,-3,79},{-82,4,92},
- {-82,17,100},{-92,21,102},{-101,12,95},{-107,7,83},
- {-117,31,84},{-109,31,95},{-96,31,102},{-92,42,102},
- {-101,50,95},{-107,56,83},{-82,66,79},{-82,58,92},
- {-82,46,100},{-71,42,98},{-63,50,88},{-57,56,74},
- {-47,31,72},{-55,31,86},{-67,31,97},{-66,31,99},
- {-70,43,100},{-82,48,103},{-93,43,105},{-98,31,105},
- {-93,20,105},{-82,31,106},{-82,15,103},{-70,20,100},
- {-127,55,95},{-127,45,105},{-127,-87,94},{-127,-41,100},
- {-127,-24,102},{-127,-99,92},{-127,52,77},{-127,73,73},
- {-127,115,-70},{-127,72,-109},{-127,9,-106},{-127,-49,-45},
- {-101,-24,72},{-87,-56,73},{-82,-89,73},{-80,-114,68},
- {-85,-121,67},{-104,-124,71},{-127,-126,74},{-71,-18,68},
- {-46,-5,69},{-21,19,57},{-17,55,76},{-36,62,80},
- {-64,77,88},{-86,97,94},{-107,92,97},{-119,63,96},
- {-106,53,99},{-111,39,98},{-101,12,95},{-79,2,90},
- {-64,8,86},{-47,24,83},{-45,38,83},{-50,48,85},
- {-72,56,92},{-95,60,97},{-127,-98,94},{-113,-92,94},
- {-112,-107,91},{-119,-113,89},{-127,-114,88},{-127,-25,96},
- {-127,-18,95},{-114,-19,95},{-111,-29,96},{-116,-37,95},
- {-76,-6,86},{-48,7,80},{-34,26,77},{-32,48,84},
- {-39,53,93},{-71,70,102},{-87,82,107},{-101,79,109},
- {-114,55,108},{-111,-13,104},{-100,-57,91},{-95,-90,88},
- {-93,-105,85},{-97,-117,81},{-106,-119,81},{-127,-121,82},
- {-127,6,93},{-127,27,98},{-85,61,95},{-106,18,96},
- {-110,27,97},{-112,-88,94},{-117,-57,96},{-127,-57,96},
- {-127,-42,95},{-115,-35,100},{-110,-29,102},{-113,-17,100},
- {-122,-16,100},{-127,-26,106},{-121,-19,104},{-115,-20,104},
- {-113,-29,106},{-117,-32,103},{-127,-37,103},{-94,-40,71},
- {-106,-31,91},{-104,-40,91},{-97,-32,71},{-127,-112,88},
- {-121,-111,88},{-115,-105,91},{-115,-95,93},{-127,-100,84},
- {-115,-96,85},{-115,-104,82},{-121,-109,81},{-127,-110,81},
- {-105,28,100},{-103,20,99},{-84,55,97},{-92,54,99},
- {-73,51,99},{-55,45,89},{-52,37,88},{-53,25,87},
- {-66,13,92},{-79,8,95},{-98,14,100},{-104,38,100},
- {-100,48,100},{-97,46,97},{-102,38,97},{-96,16,97},
- {-79,11,93},{-68,15,90},{-57,27,86},{-56,36,86},
- {-59,43,87},{-74,50,96},{-91,51,98},{-84,52,96},
- {-101,22,96},{-102,29,96},{-113,59,78},{-102,85,79},
- {-84,88,76},{-65,71,71},{-40,58,63},{-25,52,59},
- {-28,21,48},{-50,0,53},{-71,-12,60},{-127,115,37},
- {-127,126,-10},{-127,-25,-86},{-127,-59,24},{-127,-125,59},
- {-127,-103,44},{-127,-73,41},{-127,-62,36},{-18,30,7},
- {-17,41,-6},{-28,34,-56},{-68,56,-90},{-33,-6,9},
- {-51,-16,-21},{-45,-1,-55},{-84,7,-85},{-97,-45,52},
- {-104,-53,33},{-90,-91,49},{-95,-64,50},{-85,-117,51},
- {-109,-97,47},{-111,-69,46},{-106,-121,56},{-99,-36,55},
- {-100,-29,60},{-101,-22,64},{-100,-50,21},{-89,-40,-34},
- {-83,-19,-69},{-69,111,-49},{-69,119,-9},{-69,109,30},
- {-68,67,55},{-34,52,43},{-46,58,36},{-45,90,7},
- {-25,72,16},{-25,79,-15},{-45,96,-25},{-45,87,-57},
- {-25,69,-46},{-48,42,-75},{-65,3,-70},{-22,42,-26},
- {-75,-22,19},{-72,-25,-27},{-13,52,-30},{-28,-18,-16},
- {6,-13,-42},{37,7,-55},{46,41,-54},{31,65,-54},
- {4,61,-40},{3,53,-37},{25,56,-50},{35,37,-52},
- {28,10,-52},{5,-5,-39},{-21,-9,-17},{-9,46,-28},
- {-6,39,-37},{-14,-3,-27},{6,0,-47},{25,12,-57},
- {31,32,-57},{23,46,-56},{4,44,-46},{-19,37,-27},
- {-20,22,-35},{-30,12,-35},{-22,11,-35},{-19,2,-35},
- {-23,-2,-35},{-34,0,-9},{-35,-3,-22},{-35,5,-24},
- {-25,26,-27},{-13,31,-34},{-13,30,-41},{-23,-2,-41},
- {-18,2,-41},{-21,10,-41},{-29,12,-41},{-19,22,-41},
- {6,42,-53},{25,44,-62},{34,31,-63},{28,11,-62},
- {7,0,-54},{-14,-2,-34},{-5,37,-44},{-13,14,-42},
- {-7,8,-43},{1,16,-47},{-4,22,-45},{3,30,-48},
- {8,24,-49},{15,27,-50},{12,35,-50},{4,56,-62},
- {33,60,-70},{48,38,-64},{41,7,-68},{6,-11,-63},
- {-26,-16,-42},{-17,49,-49},
+ {-71, 21, 98}, {-63, 12, 88}, {-57, 7, 74}, {-82, -3, 79}, {-82, 4, 92},
+ {-82, 17, 100}, {-92, 21, 102}, {-101, 12, 95}, {-107, 7, 83},
+ {-117, 31, 84}, {-109, 31, 95}, {-96, 31, 102}, {-92, 42, 102},
+ {-101, 50, 95}, {-107, 56, 83}, {-82, 66, 79}, {-82, 58, 92},
+ {-82, 46, 100}, {-71, 42, 98}, {-63, 50, 88}, {-57, 56, 74},
+ {-47, 31, 72}, {-55, 31, 86}, {-67, 31, 97}, {-66, 31, 99},
+ {-70, 43, 100}, {-82, 48, 103}, {-93, 43, 105}, {-98, 31, 105},
+ {-93, 20, 105}, {-82, 31, 106}, {-82, 15, 103}, {-70, 20, 100},
+ {-127, 55, 95}, {-127, 45, 105}, {-127, -87, 94}, {-127, -41, 100},
+ {-127, -24, 102}, {-127, -99, 92}, {-127, 52, 77}, {-127, 73, 73},
+ {-127, 115, -70}, {-127, 72, -109}, {-127, 9, -106}, {-127, -49, -45},
+ {-101, -24, 72}, {-87, -56, 73}, {-82, -89, 73}, {-80, -114, 68},
+ {-85, -121, 67}, {-104, -124, 71}, {-127, -126, 74}, {-71, -18, 68},
+ {-46, -5, 69}, {-21, 19, 57}, {-17, 55, 76}, {-36, 62, 80},
+ {-64, 77, 88}, {-86, 97, 94}, {-107, 92, 97}, {-119, 63, 96},
+ {-106, 53, 99}, {-111, 39, 98}, {-101, 12, 95}, {-79, 2, 90},
+ {-64, 8, 86}, {-47, 24, 83}, {-45, 38, 83}, {-50, 48, 85},
+ {-72, 56, 92}, {-95, 60, 97}, {-127, -98, 94}, {-113, -92, 94},
+ {-112, -107, 91}, {-119, -113, 89}, {-127, -114, 88}, {-127, -25, 96},
+ {-127, -18, 95}, {-114, -19, 95}, {-111, -29, 96}, {-116, -37, 95},
+ {-76, -6, 86}, {-48, 7, 80}, {-34, 26, 77}, {-32, 48, 84},
+ {-39, 53, 93}, {-71, 70, 102}, {-87, 82, 107}, {-101, 79, 109},
+ {-114, 55, 108}, {-111, -13, 104}, {-100, -57, 91}, {-95, -90, 88},
+ {-93, -105, 85}, {-97, -117, 81}, {-106, -119, 81}, {-127, -121, 82},
+ {-127, 6, 93}, {-127, 27, 98}, {-85, 61, 95}, {-106, 18, 96},
+ {-110, 27, 97}, {-112, -88, 94}, {-117, -57, 96}, {-127, -57, 96},
+ {-127, -42, 95}, {-115, -35, 100}, {-110, -29, 102}, {-113, -17, 100},
+ {-122, -16, 100}, {-127, -26, 106}, {-121, -19, 104}, {-115, -20, 104},
+ {-113, -29, 106}, {-117, -32, 103}, {-127, -37, 103}, {-94, -40, 71},
+ {-106, -31, 91}, {-104, -40, 91}, {-97, -32, 71}, {-127, -112, 88},
+ {-121, -111, 88}, {-115, -105, 91}, {-115, -95, 93}, {-127, -100, 84},
+ {-115, -96, 85}, {-115, -104, 82}, {-121, -109, 81}, {-127, -110, 81},
+ {-105, 28, 100}, {-103, 20, 99}, {-84, 55, 97}, {-92, 54, 99},
+ {-73, 51, 99}, {-55, 45, 89}, {-52, 37, 88}, {-53, 25, 87},
+ {-66, 13, 92}, {-79, 8, 95}, {-98, 14, 100}, {-104, 38, 100},
+ {-100, 48, 100}, {-97, 46, 97}, {-102, 38, 97}, {-96, 16, 97},
+ {-79, 11, 93}, {-68, 15, 90}, {-57, 27, 86}, {-56, 36, 86},
+ {-59, 43, 87}, {-74, 50, 96}, {-91, 51, 98}, {-84, 52, 96},
+ {-101, 22, 96}, {-102, 29, 96}, {-113, 59, 78}, {-102, 85, 79},
+ {-84, 88, 76}, {-65, 71, 71}, {-40, 58, 63}, {-25, 52, 59},
+ {-28, 21, 48}, {-50, 0, 53}, {-71, -12, 60}, {-127, 115, 37},
+ {-127, 126, -10}, {-127, -25, -86}, {-127, -59, 24}, {-127, -125, 59},
+ {-127, -103, 44}, {-127, -73, 41}, {-127, -62, 36}, {-18, 30, 7},
+ {-17, 41, -6}, {-28, 34, -56}, {-68, 56, -90}, {-33, -6, 9},
+ {-51, -16, -21}, {-45, -1, -55}, {-84, 7, -85}, {-97, -45, 52},
+ {-104, -53, 33}, {-90, -91, 49}, {-95, -64, 50}, {-85, -117, 51},
+ {-109, -97, 47}, {-111, -69, 46}, {-106, -121, 56}, {-99, -36, 55},
+ {-100, -29, 60}, {-101, -22, 64}, {-100, -50, 21}, {-89, -40, -34},
+ {-83, -19, -69}, {-69, 111, -49}, {-69, 119, -9}, {-69, 109, 30},
+ {-68, 67, 55}, {-34, 52, 43}, {-46, 58, 36}, {-45, 90, 7},
+ {-25, 72, 16}, {-25, 79, -15}, {-45, 96, -25}, {-45, 87, -57},
+ {-25, 69, -46}, {-48, 42, -75}, {-65, 3, -70}, {-22, 42, -26},
+ {-75, -22, 19}, {-72, -25, -27}, {-13, 52, -30}, {-28, -18, -16},
+ {6, -13, -42}, {37, 7, -55}, {46, 41, -54}, {31, 65, -54},
+ {4, 61, -40}, {3, 53, -37}, {25, 56, -50}, {35, 37, -52},
+ {28, 10, -52}, {5, -5, -39}, {-21, -9, -17}, {-9, 46, -28},
+ {-6, 39, -37}, {-14, -3, -27}, {6, 0, -47}, {25, 12, -57},
+ {31, 32, -57}, {23, 46, -56}, {4, 44, -46}, {-19, 37, -27},
+ {-20, 22, -35}, {-30, 12, -35}, {-22, 11, -35}, {-19, 2, -35},
+ {-23, -2, -35}, {-34, 0, -9}, {-35, -3, -22}, {-35, 5, -24},
+ {-25, 26, -27}, {-13, 31, -34}, {-13, 30, -41}, {-23, -2, -41},
+ {-18, 2, -41}, {-21, 10, -41}, {-29, 12, -41}, {-19, 22, -41},
+ {6, 42, -53}, {25, 44, -62}, {34, 31, -63}, {28, 11, -62},
+ {7, 0, -54}, {-14, -2, -34}, {-5, 37, -44}, {-13, 14, -42},
+ {-7, 8, -43}, {1, 16, -47}, {-4, 22, -45}, {3, 30, -48},
+ {8, 24, -49}, {15, 27, -50}, {12, 35, -50}, {4, 56, -62},
+ {33, 60, -70}, {48, 38, -64}, {41, 7, -68}, {6, -11, -63},
+ {-26, -16, -42}, {-17, 49, -49},
};
static signed char monkeyf[250][4] = {
- {27,4,5,26}, {25,4,5,24}, {3,6,5,4}, {1,6,5,2}, {5,6,7,4},
- {3,6,7,2}, {5,8,7,6}, {3,8,7,4}, {7,8,9,6},
- {5,8,9,4}, {7,10,9,8}, {5,10,9,6}, {9,10,11,8},
- {7,10,11,6}, {9,12,11,10}, {7,12,11,8}, {11,6,13,12},
- {5,4,13,12}, {3,-2,13,12}, {-3,-4,13,12}, {-5,-10,13,12},
- {-11,-12,14,12}, {-13,-18,14,13}, {-19,4,5,13}, {10,12,4,4},
- {10,11,9,9}, {8,7,9,9}, {7,5,6,6}, {6,3,4,4},
- {5,1,2,2}, {4,-1,0,0}, {3,-3,-2,-2}, {22,67,68,23},
- {20,65,66,21}, {18,63,64,19}, {16,61,62,17}, {14,59,60,15},
- {12,19,48,57}, {18,19,48,47}, {18,19,48,47}, {18,19,48,47},
- {18,19,48,47}, {18,19,48,47}, {18,19,48,47}, {18,19,48,47},
- {18,19,48,47}, {18,-9,-8,47}, {18,27,45,46}, {26,55,43,44},
- {24,41,42,54}, {22,39,40,23}, {20,37,38,21}, {18,35,36,19},
- {16,33,34,17}, {14,31,32,15}, {12,39,30,13}, {11,48,45,38},
- {8,36,-19,9}, {8,-20,44,47}, {42,45,46,43}, {18,19,40,39},
- {16,17,38,37}, {14,15,36,35}, {32,44,43,33}, {12,33,32,42},
- {19,44,43,42}, {40,41,42,-27}, {8,9,39,-28}, {15,43,42,16},
- {13,43,42,14}, {11,43,42,12}, {9,-30,42,10}, {37,12,38,-32},
- {-33,37,45,46}, {-33,40,41,39}, {38,40,41,37}, {36,40,41,35},
- {34,40,41,33}, {36,39,38,37}, {35,40,39,38}, {1,2,14,21},
- {1,2,40,13}, {1,2,40,39}, {1,24,12,39}, {-34,36,38,11},
- {35,38,36,37}, {-37,8,35,37}, {-11,-12,-45,40}, {-11,-12,39,38},
- {-11,-12,37,36}, {-11,-12,35,34}, {33,34,40,41}, {33,34,38,39},
- {33,34,36,37}, {33,-52,34,35}, {33,37,36,34}, {33,35,34,34},
- {8,7,37,36}, {-32,7,35,46}, {-34,-33,45,46}, {4,-33,43,34},
- {-34,-33,41,42}, {-34,-33,39,40}, {-34,-33,37,38}, {-34,-33,35,36},
- {-34,-33,33,34}, {-34,-33,31,32}, {-34,-4,28,30}, {-5,-34,28,27},
- {-35,-44,36,27}, {26,35,36,45}, {24,25,44,45}, {25,23,44,42},
- {25,24,41,40}, {25,24,39,38}, {25,24,37,36}, {25,24,35,34},
- {25,24,33,32}, {25,24,31,30}, {15,24,29,38}, {25,24,27,26},
- {23,12,37,26}, {11,12,35,36}, {-86,-59,36,-80}, {-60,-61,36,35},
- {-62,-63,36,35}, {-64,-65,36,35}, {-66,-67,36,35}, {-68,-69,36,35},
- {-70,-71,36,35}, {-72,-73,36,35}, {-74,-75,36,35}, {42,43,53,58},
- {40,41,57,56}, {38,39,55,57}, {-81,-80,37,56}, {-83,-82,55,52},
- {-85,-84,51,49}, {-87,-86,48,49}, {47,50,51,48}, {46,48,51,49},
- {43,46,49,44}, {-92,-91,45,42}, {-23,49,50,-20}, {-94,40,48,-24},
- {-96,-22,48,49}, {-97,48,21,-90}, {-100,36,50,23}, {22,49,48,-100},
- {-101,47,46,22}, {21,45,35,25}, {33,34,44,41}, {13,14,28,24},
- {-107,26,30,-106}, {14,46,45,15}, {14,44,43,-110}, {-111,42,23,-110},
- {6,7,45,46}, {45,44,47,46}, {45,46,47,48}, {47,46,49,48},
- {17,49,47,48}, {17,36,46,48}, {35,36,44,45}, {35,36,40,43},
- {35,36,38,39}, {-4,-3,37,35}, {-123,34,33,1}, {-9,-8,-7,-6},
- {-10,-7,32,-125}, {-127,-11,-126,-126}, {-7,-6,5,31}, {4,5,33,30},
- {4,39,33,32}, {4,35,32,38}, {20,21,39,38}, {4,37,38,5},
- {-11,-10,36,3}, {-11,15,14,35}, {13,16,34,34}, {-13,14,13,13},
- {-3,1,30,29}, {-3,28,29,1}, {-2,31,28,-1}, {12,13,27,30},
- {-2,26,12,12}, {35,29,42,36}, {34,35,36,33}, {32,35,36,31},
- {30,35,36,29}, {28,35,36,27}, {26,35,36,25}, {34,39,38,35},
- {32,39,38,33}, {30,39,38,31}, {28,39,38,29}, {26,39,38,27},
- {25,31,32,38}, {-18,-17,45,44}, {-18,17,28,44}, {-24,-20,42,-23},
- {11,35,27,14}, {25,28,39,41}, {37,41,40,38}, {34,40,36,35},
- {32,40,39,33}, {30,39,31,40}, {21,29,39,22}, {-31,37,28,4},
- {-32,33,35,36}, {32,33,34,34}, {18,35,36,48}, {34,25,40,35},
- {24,25,38,39}, {24,25,36,37}, {24,25,34,35}, {24,25,32,33},
- {24,13,41,31}, {17,11,41,35}, {15,16,34,35}, {13,14,34,35},
- {11,12,34,35}, {9,10,34,35}, {7,8,34,35}, {26,25,37,36},
- {35,36,37,38}, {37,36,39,38}, {37,38,39,40}, {25,31,36,39},
- {18,34,35,30}, {17,22,30,33}, {19,29,21,20}, {16,26,29,17},
- {24,29,28,25}, {22,31,28,23}, {20,31,30,21}, {18,31,30,19},
- {16,30,17,17}, {-21,-22,35,34}, {-21,-22,33,32}, {-21,-22,31,30},
- {-21,-22,29,28}, {-21,-22,27,26}, {-28,-22,25,31}, {24,28,29,30},
- {23,24,26,27}, {23,24,25,25}, {-69,-35,-32,27}, {-70,26,25,-66},
- {-68,-67,24,-33},
+ {27, 4, 5, 26}, {25, 4, 5, 24}, {3, 6, 5, 4}, {1, 6, 5, 2}, {5, 6, 7, 4},
+ {3, 6, 7, 2}, {5, 8, 7, 6}, {3, 8, 7, 4}, {7, 8, 9, 6},
+ {5, 8, 9, 4}, {7, 10, 9, 8}, {5, 10, 9, 6}, {9, 10, 11, 8},
+ {7, 10, 11, 6}, {9, 12, 11, 10}, {7, 12, 11, 8}, {11, 6, 13, 12},
+ {5, 4, 13, 12}, {3, -2, 13, 12}, {-3, -4, 13, 12}, {-5, -10, 13, 12},
+ {-11, -12, 14, 12}, {-13, -18, 14, 13}, {-19, 4, 5, 13}, {10, 12, 4, 4},
+ {10, 11, 9, 9}, {8, 7, 9, 9}, {7, 5, 6, 6}, {6, 3, 4, 4},
+ {5, 1, 2, 2}, {4, -1, 0, 0}, {3, -3, -2, -2}, {22, 67, 68, 23},
+ {20, 65, 66, 21}, {18, 63, 64, 19}, {16, 61, 62, 17}, {14, 59, 60, 15},
+ {12, 19, 48, 57}, {18, 19, 48, 47}, {18, 19, 48, 47}, {18, 19, 48, 47},
+ {18, 19, 48, 47}, {18, 19, 48, 47}, {18, 19, 48, 47}, {18, 19, 48, 47},
+ {18, 19, 48, 47}, {18, -9, -8, 47}, {18, 27, 45, 46}, {26, 55, 43, 44},
+ {24, 41, 42, 54}, {22, 39, 40, 23}, {20, 37, 38, 21}, {18, 35, 36, 19},
+ {16, 33, 34, 17}, {14, 31, 32, 15}, {12, 39, 30, 13}, {11, 48, 45, 38},
+ {8, 36, -19, 9}, {8, -20, 44, 47}, {42, 45, 46, 43}, {18, 19, 40, 39},
+ {16, 17, 38, 37}, {14, 15, 36, 35}, {32, 44, 43, 33}, {12, 33, 32, 42},
+ {19, 44, 43, 42}, {40, 41, 42, -27}, {8, 9, 39, -28}, {15, 43, 42, 16},
+ {13, 43, 42, 14}, {11, 43, 42, 12}, {9, -30, 42, 10}, {37, 12, 38, -32},
+ {-33, 37, 45, 46}, {-33, 40, 41, 39}, {38, 40, 41, 37}, {36, 40, 41, 35},
+ {34, 40, 41, 33}, {36, 39, 38, 37}, {35, 40, 39, 38}, {1, 2, 14, 21},
+ {1, 2, 40, 13}, {1, 2, 40, 39}, {1, 24, 12, 39}, {-34, 36, 38, 11},
+ {35, 38, 36, 37}, {-37, 8, 35, 37}, {-11, -12, -45, 40}, {-11, -12, 39, 38},
+ {-11, -12, 37, 36}, {-11, -12, 35, 34}, {33, 34, 40, 41}, {33, 34, 38, 39},
+ {33, 34, 36, 37}, {33, -52, 34, 35}, {33, 37, 36, 34}, {33, 35, 34, 34},
+ {8, 7, 37, 36}, {-32, 7, 35, 46}, {-34, -33, 45, 46}, {4, -33, 43, 34},
+ {-34, -33, 41, 42}, {-34, -33, 39, 40}, {-34, -33, 37, 38}, {-34, -33, 35, 36},
+ {-34, -33, 33, 34}, {-34, -33, 31, 32}, {-34, -4, 28, 30}, {-5, -34, 28, 27},
+ {-35, -44, 36, 27}, {26, 35, 36, 45}, {24, 25, 44, 45}, {25, 23, 44, 42},
+ {25, 24, 41, 40}, {25, 24, 39, 38}, {25, 24, 37, 36}, {25, 24, 35, 34},
+ {25, 24, 33, 32}, {25, 24, 31, 30}, {15, 24, 29, 38}, {25, 24, 27, 26},
+ {23, 12, 37, 26}, {11, 12, 35, 36}, {-86, -59, 36, -80}, {-60, -61, 36, 35},
+ {-62, -63, 36, 35}, {-64, -65, 36, 35}, {-66, -67, 36, 35}, {-68, -69, 36, 35},
+ {-70, -71, 36, 35}, {-72, -73, 36, 35}, {-74, -75, 36, 35}, {42, 43, 53, 58},
+ {40, 41, 57, 56}, {38, 39, 55, 57}, {-81, -80, 37, 56}, {-83, -82, 55, 52},
+ {-85, -84, 51, 49}, {-87, -86, 48, 49}, {47, 50, 51, 48}, {46, 48, 51, 49},
+ {43, 46, 49, 44}, {-92, -91, 45, 42}, {-23, 49, 50, -20}, {-94, 40, 48, -24},
+ {-96, -22, 48, 49}, {-97, 48, 21, -90}, {-100, 36, 50, 23}, {22, 49, 48, -100},
+ {-101, 47, 46, 22}, {21, 45, 35, 25}, {33, 34, 44, 41}, {13, 14, 28, 24},
+ {-107, 26, 30, -106}, {14, 46, 45, 15}, {14, 44, 43, -110}, {-111, 42, 23, -110},
+ {6, 7, 45, 46}, {45, 44, 47, 46}, {45, 46, 47, 48}, {47, 46, 49, 48},
+ {17, 49, 47, 48}, {17, 36, 46, 48}, {35, 36, 44, 45}, {35, 36, 40, 43},
+ {35, 36, 38, 39}, {-4, -3, 37, 35}, {-123, 34, 33, 1}, {-9, -8, -7, -6},
+ {-10, -7, 32, -125}, {-127, -11, -126, -126}, {-7, -6, 5, 31}, {4, 5, 33, 30},
+ {4, 39, 33, 32}, {4, 35, 32, 38}, {20, 21, 39, 38}, {4, 37, 38, 5},
+ {-11, -10, 36, 3}, {-11, 15, 14, 35}, {13, 16, 34, 34}, {-13, 14, 13, 13},
+ {-3, 1, 30, 29}, {-3, 28, 29, 1}, {-2, 31, 28, -1}, {12, 13, 27, 30},
+ {-2, 26, 12, 12}, {35, 29, 42, 36}, {34, 35, 36, 33}, {32, 35, 36, 31},
+ {30, 35, 36, 29}, {28, 35, 36, 27}, {26, 35, 36, 25}, {34, 39, 38, 35},
+ {32, 39, 38, 33}, {30, 39, 38, 31}, {28, 39, 38, 29}, {26, 39, 38, 27},
+ {25, 31, 32, 38}, {-18, -17, 45, 44}, {-18, 17, 28, 44}, {-24, -20, 42, -23},
+ {11, 35, 27, 14}, {25, 28, 39, 41}, {37, 41, 40, 38}, {34, 40, 36, 35},
+ {32, 40, 39, 33}, {30, 39, 31, 40}, {21, 29, 39, 22}, {-31, 37, 28, 4},
+ {-32, 33, 35, 36}, {32, 33, 34, 34}, {18, 35, 36, 48}, {34, 25, 40, 35},
+ {24, 25, 38, 39}, {24, 25, 36, 37}, {24, 25, 34, 35}, {24, 25, 32, 33},
+ {24, 13, 41, 31}, {17, 11, 41, 35}, {15, 16, 34, 35}, {13, 14, 34, 35},
+ {11, 12, 34, 35}, {9, 10, 34, 35}, {7, 8, 34, 35}, {26, 25, 37, 36},
+ {35, 36, 37, 38}, {37, 36, 39, 38}, {37, 38, 39, 40}, {25, 31, 36, 39},
+ {18, 34, 35, 30}, {17, 22, 30, 33}, {19, 29, 21, 20}, {16, 26, 29, 17},
+ {24, 29, 28, 25}, {22, 31, 28, 23}, {20, 31, 30, 21}, {18, 31, 30, 19},
+ {16, 30, 17, 17}, {-21, -22, 35, 34}, {-21, -22, 33, 32}, {-21, -22, 31, 30},
+ {-21, -22, 29, 28}, {-21, -22, 27, 26}, {-28, -22, 25, 31}, {24, 28, 29, 30},
+ {23, 24, 26, 27}, {23, 24, 25, 25}, {-69, -35, -32, 27}, {-70, 26, 25, -66},
+ {-68, -67, 24, -33},
};
-#define VERT_MARK 1
+#define VERT_MARK 1
-#define EDGE_ORIG 1
-#define EDGE_MARK 2
+#define EDGE_ORIG 1
+#define EDGE_MARK 2
-#define FACE_MARK 1
-#define FACE_NEW 2
+#define FACE_MARK 1
+#define FACE_NEW 2
void bmo_create_grid_exec(BMesh *bm, BMOperator *op)
{
@@ -260,6 +260,7 @@ void bmo_create_grid_exec(BMesh *bm, BMOperator *op)
}
/* extrude and translate */
+ phid = 2.0f / ((float)seg - 1);
vec[0] = vec[2] = 0.0f;
vec[1] = dia * phid;
mul_mat3_m4_v3(mat, vec);
@@ -308,7 +309,7 @@ void bmo_create_uvsphere_exec(BMesh *bm, BMOperator *op)
phid /= 2;
for (a = 0; a <= tot; a++) {
/* Going in this direction, then edge extruding, makes normals face outward */
- vec[0] = -dia * sinf(phi);
+ vec[0] = -dia *sinf(phi);
vec[1] = 0.0;
vec[2] = dia * cosf(phi);
eve = BM_vert_create(bm, vec, NULL);
@@ -353,7 +354,7 @@ void bmo_create_uvsphere_exec(BMesh *bm, BMOperator *op)
{
float len, len2, vec2[3];
- len = 2 * dia * sinf(phid / 2.0f);
+ len = 2 *dia *sinf(phid / 2.0f);
/* length of one segment in shortest parallen */
vec[0] = dia * sinf(phid);
@@ -430,7 +431,7 @@ void bmo_create_icosphere_exec(BMesh *bm, BMOperator *op)
"smooth=%f "
"numcuts=%i "
"use_gridfill=%b use_sphere=%b",
- EDGE_MARK, dia, (1 << (subdiv-1)) - 1,
+ EDGE_MARK, dia, (1 << (subdiv - 1)) - 1,
TRUE, TRUE);
BMO_op_exec(bm, &bmop);
@@ -467,8 +468,8 @@ void bmo_create_monkey_exec(BMesh *bm, BMOperator *op)
BMO_elem_flag_enable(bm, tv[i], VERT_MARK);
tv[monkeynv + i] = (fabsf(v[0] = -v[0]) < 0.001f) ?
- tv[i] :
- (eve = BM_vert_create(bm, v, NULL), mul_m4_v3(mat, eve->co), eve);
+ tv[i] :
+ (eve = BM_vert_create(bm, v, NULL), mul_m4_v3(mat, eve->co), eve);
BMO_elem_flag_enable(bm, tv[monkeynv + i], VERT_MARK);
@@ -487,7 +488,7 @@ void bmo_create_monkey_exec(BMesh *bm, BMOperator *op)
tv[monkeynv + monkeyf[i][2] + i - monkeyo],
tv[monkeynv + monkeyf[i][1] + i - monkeyo],
tv[monkeynv + monkeyf[i][0] + i - monkeyo],
- (monkeyf[i][3] != monkeyf[i][2]) ? tv[monkeynv + monkeyf[i][3] + i - monkeyo]: NULL,
+ (monkeyf[i][3] != monkeyf[i][2]) ? tv[monkeynv + monkeyf[i][3] + i - monkeyo] : NULL,
NULL, FALSE);
}
@@ -525,7 +526,7 @@ void bmo_create_circle_exec(BMesh *bm, BMOperator *op)
for (a = 0; a < segs; a++, phi += phid) {
/* Going this way ends up with normal(s) upward */
- vec[0] = -dia * sinf(phi);
+ vec[0] = -dia *sinf(phi);
vec[1] = dia * cosf(phi);
vec[2] = 0.0f;
mul_m4_v3(mat, vec);
diff --git a/source/blender/bmesh/operators/bmo_removedoubles.c b/source/blender/bmesh/operators/bmo_removedoubles.c
index 149f2537a12..8060c3b5142 100644
--- a/source/blender/bmesh/operators/bmo_removedoubles.c
+++ b/source/blender/bmesh/operators/bmo_removedoubles.c
@@ -147,7 +147,7 @@ void bmo_weldverts_exec(BMesh *bm, BMOperator *op)
BM_elem_index_set(f, 0); /* set_dirty! */
BM_ITER_ELEM (l, &liter, f, BM_LOOPS_OF_FACE) {
if (BMO_elem_flag_test(bm, l->v, ELE_DEL)) {
- BMO_elem_flag_enable(bm, f, FACE_MARK|ELE_DEL);
+ BMO_elem_flag_enable(bm, f, FACE_MARK | ELE_DEL);
}
if (BMO_elem_flag_test(bm, l->e, EDGE_COL)) {
BM_elem_index_set(f, BM_elem_index_get(f) + 1); /* set_dirty! */
@@ -191,8 +191,8 @@ void bmo_weldverts_exec(BMesh *bm, BMOperator *op)
continue;
}
- BLI_array_growone(edges);
- BLI_array_growone(loops);
+ BLI_array_grow_one(edges);
+ BLI_array_grow_one(loops);
edges[a] = e2;
loops[a] = l;
@@ -393,7 +393,7 @@ void bmo_collapse_exec(BMesh *bm, BMOperator *op)
INIT_MINMAX(min, max);
for (tot = 0; e; tot++, e = BMW_step(&walker)) {
- BLI_array_growone(edges);
+ BLI_array_grow_one(edges);
edges[tot] = e;
DO_MINMAX(e->v1->co, min, max);
@@ -454,7 +454,7 @@ static void bmo_collapsecon_do_layer(BMesh *bm, BMOperator *op, int layer)
CustomData_data_initminmax(type, &min, &max);
for (tot = 0; l2; tot++, l2 = BMW_step(&walker)) {
- BLI_array_growone(blocks);
+ BLI_array_grow_one(blocks);
blocks[tot] = CustomData_bmesh_get_layer_n(&bm->ldata, l2->head.data, layer);
CustomData_data_dominmax(type, blocks[tot], &min, &max);
}
@@ -501,7 +501,7 @@ void bmesh_finddoubles_common(BMesh *bm, BMOperator *op, BMOperator *optarget, c
i = 0;
BMO_ITER (v, &oiter, bm, op, "verts", BM_VERT) {
- BLI_array_growone(verts);
+ BLI_array_grow_one(verts);
verts[i++] = v;
}
diff --git a/source/blender/bmesh/operators/bmo_subdivide.c b/source/blender/bmesh/operators/bmo_subdivide.c
index 7da02a594d5..03a691e3e9c 100644
--- a/source/blender/bmesh/operators/bmo_subdivide.c
+++ b/source/blender/bmesh/operators/bmo_subdivide.c
@@ -132,7 +132,7 @@ static void alter_co(BMesh *bm, BMVert *v, BMEdge *UNUSED(origed), const SubDPar
madd_v3_v3fl(tvec, nor2, fac);
/* falloff for multi subdivide */
- smooth *= sqrtf(fabsf(1.0f - 2.0f * fabsf(0.5f-perc)));
+ smooth *= sqrtf(fabsf(1.0f - 2.0f * fabsf(0.5f - perc)));
mul_v3_fl(tvec, smooth * len);
@@ -141,23 +141,24 @@ static void alter_co(BMesh *bm, BMVert *v, BMEdge *UNUSED(origed), const SubDPar
if (params->use_fractal) {
float len = len_v3v3(vsta->co, vend->co);
- float vec2[3] = {0.0f, 0.0f, 0.0f}, co2[3];
+ float normal[3] = {0.0f, 0.0f, 0.0f}, co2[3], base1[3], base2[3];
fac = params->fractal * len;
- add_v3_v3(vec2, vsta->no);
- add_v3_v3(vec2, vend->no);
- mul_v3_fl(vec2, 0.5f);
+ mid_v3_v3v3(normal, vsta->no, vend->no);
+ ortho_basis_v3v3_v3(base1, base2, normal);
add_v3_v3v3(co2, v->co, params->off);
- tvec[0] = fac * (BLI_gTurbulence(1.0, co2[0], co2[1], co2[2], 15, 0, 1) - 0.5f);
- tvec[1] = fac * (BLI_gTurbulence(1.0, co2[0], co2[1], co2[2], 15, 0, 1) - 0.5f);
- tvec[2] = fac * (BLI_gTurbulence(1.0, co2[0], co2[1], co2[2], 15, 0, 1) - 0.5f);
+ mul_v3_fl(co2, 10.0f);
- mul_v3_v3(vec2, tvec);
+ tvec[0] = fac * (BLI_gTurbulence(1.0, co2[0], co2[1], co2[2], 15, 0, 2) - 0.5f);
+ tvec[1] = fac * (BLI_gTurbulence(1.0, co2[1], co2[0], co2[2], 15, 0, 2) - 0.5f);
+ tvec[2] = fac * (BLI_gTurbulence(1.0, co2[1], co2[2], co2[0], 15, 0, 2) - 0.5f);
/* add displacement */
- add_v3_v3v3(co, co, vec2);
+ madd_v3_v3fl(co, normal, tvec[0]);
+ madd_v3_v3fl(co, base1, tvec[1] * (1.0f - params->along_normal));
+ madd_v3_v3fl(co, base2, tvec[2] * (1.0f - params->along_normal));
}
/* apply the new difference to the rest of the shape keys,
@@ -224,7 +225,7 @@ static BMVert *subdivideedgenum(BMesh *bm, BMEdge *edge, BMEdge *oedge,
if (BMO_elem_flag_test(bm, edge, EDGE_PERCENT) && totpoint == 1)
percent = BMO_slot_map_float_get(bm, params->op, "edgepercents", edge);
else {
- percent = 1.0f / (float)(totpoint + 1-curpoint);
+ percent = 1.0f / (float)(totpoint + 1 - curpoint);
percent2 = (float)(curpoint + 1) / (float)(totpoint + 1);
}
@@ -687,7 +688,7 @@ void bmo_esubd_exec(BMesh *bm, BMOperator *op)
BLI_array_declare(facedata);
BLI_array_declare(edges);
BLI_array_declare(verts);
- float smooth, fractal;
+ float smooth, fractal, along_normal;
int use_sphere, cornertype, use_singleedge, use_gridfill;
int skey, seed, i, j, matched, a, b, numcuts, totesel;
@@ -697,6 +698,7 @@ void bmo_esubd_exec(BMesh *bm, BMOperator *op)
seed = BMO_slot_int_get(op, "seed");
smooth = BMO_slot_float_get(op, "smooth");
fractal = BMO_slot_float_get(op, "fractal");
+ along_normal = BMO_slot_float_get(op, "along_normal");
cornertype = BMO_slot_int_get(op, "quadcornertype");
use_singleedge = BMO_slot_bool_get(op, "use_singleedge");
@@ -754,6 +756,7 @@ void bmo_esubd_exec(BMesh *bm, BMOperator *op)
params.smooth = smooth;
params.seed = seed;
params.fractal = fractal;
+ params.along_normal = along_normal;
params.use_smooth = (smooth != 0.0f);
params.use_fractal = (fractal != 0.0f);
params.use_sphere = use_sphere;
@@ -778,8 +781,8 @@ void bmo_esubd_exec(BMesh *bm, BMOperator *op)
BLI_array_empty(edges);
BLI_array_empty(verts);
- BLI_array_growitems(edges, face->len);
- BLI_array_growitems(verts, face->len);
+ BLI_array_grow_items(edges, face->len);
+ BLI_array_grow_items(verts, face->len);
matched = 0;
@@ -825,7 +828,7 @@ void bmo_esubd_exec(BMesh *bm, BMOperator *op)
}
}
if (matched) {
- BLI_array_growone(facedata);
+ BLI_array_grow_one(facedata);
b = BLI_array_count(facedata) - 1;
facedata[b].pat = pat;
facedata[b].start = verts[i];
@@ -861,7 +864,7 @@ void bmo_esubd_exec(BMesh *bm, BMOperator *op)
}
}
if (matched) {
- BLI_array_growone(facedata);
+ BLI_array_grow_one(facedata);
j = BLI_array_count(facedata) - 1;
BMO_elem_flag_enable(bm, face, SUBD_SPLIT);
@@ -877,7 +880,7 @@ void bmo_esubd_exec(BMesh *bm, BMOperator *op)
}
if (!matched && totesel) {
- BLI_array_growone(facedata);
+ BLI_array_grow_one(facedata);
j = BLI_array_count(facedata) - 1;
BMO_elem_flag_enable(bm, face, SUBD_SPLIT);
@@ -918,7 +921,7 @@ void bmo_esubd_exec(BMesh *bm, BMOperator *op)
/* for case of two edges, connecting them shouldn't be too hard */
BM_ITER_ELEM (l, &liter, face, BM_LOOPS_OF_FACE) {
- BLI_array_growone(loops);
+ BLI_array_grow_one(loops);
loops[BLI_array_count(loops) - 1] = l;
}
@@ -951,10 +954,10 @@ void bmo_esubd_exec(BMesh *bm, BMOperator *op)
b += numcuts - 1;
for (j = 0; j < numcuts; j++) {
- BLI_array_growone(splits);
+ BLI_array_grow_one(splits);
splits[BLI_array_count(splits) - 1] = loops[a];
- BLI_array_growone(splits);
+ BLI_array_grow_one(splits);
splits[BLI_array_count(splits) - 1] = loops[b];
b = (b - 1) % vlen;
@@ -989,7 +992,7 @@ void bmo_esubd_exec(BMesh *bm, BMOperator *op)
}
for (j = 0; j < face->len; j++) {
- BLI_array_growone(verts);
+ BLI_array_grow_one(verts);
}
j = 0;
@@ -1020,12 +1023,12 @@ void bmo_esubd_exec(BMesh *bm, BMOperator *op)
BMO_slot_buffer_from_enabled_flag(bm, op, "outinner", BM_ALL, ELE_INNER);
BMO_slot_buffer_from_enabled_flag(bm, op, "outsplit", BM_ALL, ELE_SPLIT);
- BMO_slot_buffer_from_enabled_flag(bm, op, "geomout", BM_ALL, ELE_INNER|ELE_SPLIT|SUBD_SPLIT);
+ BMO_slot_buffer_from_enabled_flag(bm, op, "geomout", BM_ALL, ELE_INNER | ELE_SPLIT | SUBD_SPLIT);
}
/* editmesh-emulating function */
void BM_mesh_esubdivide(BMesh *bm, const char edge_hflag,
- float smooth, float fractal,
+ float smooth, float fractal, float along_normal,
int numcuts,
int seltype, int cornertype,
const short use_singleedge, const short use_gridfill,
@@ -1036,13 +1039,13 @@ void BM_mesh_esubdivide(BMesh *bm, const char edge_hflag,
/* use_sphere isnt exposed here since its only used for new primitives */
BMO_op_initf(bm, &op,
"esubd edges=%he "
- "smooth=%f fractal=%f "
+ "smooth=%f fractal=%f along_normal=%f "
"numcuts=%i "
"quadcornertype=%i "
"use_singleedge=%b use_gridfill=%b "
"seed=%i",
edge_hflag,
- smooth, fractal,
+ smooth, fractal, along_normal,
numcuts,
cornertype,
use_singleedge, use_gridfill,
diff --git a/source/blender/bmesh/operators/bmo_subdivide.h b/source/blender/bmesh/operators/bmo_subdivide.h
index cc6ced8bfaa..d4b926b9275 100644
--- a/source/blender/bmesh/operators/bmo_subdivide.h
+++ b/source/blender/bmesh/operators/bmo_subdivide.h
@@ -31,6 +31,7 @@ typedef struct SubDParams {
int numcuts;
float smooth;
float fractal;
+ float along_normal;
//int beauty;
short use_smooth;
short use_sphere;
diff --git a/source/blender/bmesh/operators/bmo_triangulate.c b/source/blender/bmesh/operators/bmo_triangulate.c
index 7fd6cf6769c..afc60d844db 100644
--- a/source/blender/bmesh/operators/bmo_triangulate.c
+++ b/source/blender/bmesh/operators/bmo_triangulate.c
@@ -59,8 +59,8 @@ void bmo_triangulate_exec(BMesh *bm, BMOperator *op)
BLI_array_empty(projectverts);
BLI_array_empty(newfaces);
- BLI_array_growitems(projectverts, face->len * 3);
- BLI_array_growitems(newfaces, face->len);
+ BLI_array_grow_items(projectverts, face->len * 3);
+ BLI_array_grow_items(newfaces, face->len);
BM_face_triangulate(bm, face, projectverts, EDGE_NEW, FACE_NEW, newfaces, use_beauty);
@@ -143,8 +143,8 @@ void bmo_beautify_fill_exec(BMesh *bm, BMOperator *op)
if (e) {
BMO_elem_flag_enable(bm, e, ELE_NEW);
- BMO_elem_flag_enable(bm, e->l->f, FACE_MARK|ELE_NEW);
- BMO_elem_flag_enable(bm, e->l->radial_next->f, FACE_MARK|ELE_NEW);
+ BMO_elem_flag_enable(bm, e->l->f, FACE_MARK | ELE_NEW);
+ BMO_elem_flag_enable(bm, e->l->radial_next->f, FACE_MARK | ELE_NEW);
stop = 0;
}
}
@@ -152,7 +152,7 @@ void bmo_beautify_fill_exec(BMesh *bm, BMOperator *op)
}
}
- BMO_slot_buffer_from_enabled_flag(bm, op, "geomout", BM_EDGE|BM_FACE, ELE_NEW);
+ BMO_slot_buffer_from_enabled_flag(bm, op, "geomout", BM_EDGE | BM_FACE, ELE_NEW);
}
void bmo_triangle_fill_exec(BMesh *bm, BMOperator *op)
@@ -168,30 +168,30 @@ void bmo_triangle_fill_exec(BMesh *bm, BMOperator *op)
BLI_smallhash_init(&hash);
- BLI_begin_edgefill(&sf_ctx);
+ BLI_scanfill_begin(&sf_ctx);
BMO_ITER (e, &siter, bm, op, "edges", BM_EDGE) {
BMO_elem_flag_enable(bm, e, EDGE_MARK);
if (!BLI_smallhash_haskey(&hash, (uintptr_t)e->v1)) {
- eve = BLI_addfillvert(&sf_ctx, e->v1->co);
+ eve = BLI_scanfill_vert_add(&sf_ctx, e->v1->co);
eve->tmp.p = e->v1;
BLI_smallhash_insert(&hash, (uintptr_t)e->v1, eve);
}
if (!BLI_smallhash_haskey(&hash, (uintptr_t)e->v2)) {
- eve = BLI_addfillvert(&sf_ctx, e->v2->co);
+ eve = BLI_scanfill_vert_add(&sf_ctx, e->v2->co);
eve->tmp.p = e->v2;
BLI_smallhash_insert(&hash, (uintptr_t)e->v2, eve);
}
v1 = BLI_smallhash_lookup(&hash, (uintptr_t)e->v1);
v2 = BLI_smallhash_lookup(&hash, (uintptr_t)e->v2);
- /* eed = */ BLI_addfilledge(&sf_ctx, v1, v2);
+ /* eed = */ BLI_scanfill_edge_add(&sf_ctx, v1, v2);
/* eed->tmp.p = e; */ /* UNUSED */
}
- BLI_edgefill(&sf_ctx, FALSE);
+ BLI_scanfill_calc(&sf_ctx, FALSE);
for (efa = sf_ctx.fillfacebase.first; efa; efa = efa->next) {
BMFace *f = BM_face_create_quad_tri(bm,
@@ -208,14 +208,14 @@ void bmo_triangle_fill_exec(BMesh *bm, BMOperator *op)
}
}
- BLI_end_edgefill(&sf_ctx);
+ BLI_scanfill_end(&sf_ctx);
BLI_smallhash_release(&hash);
/* clean up fill */
BMO_op_initf(bm, &bmop, "beautify_fill faces=%ff constrain_edges=%fe", ELE_NEW, EDGE_MARK);
BMO_op_exec(bm, &bmop);
- BMO_slot_buffer_flag_enable(bm, &bmop, "geomout", BM_FACE|BM_EDGE, ELE_NEW);
+ BMO_slot_buffer_flag_enable(bm, &bmop, "geomout", BM_FACE | BM_EDGE, ELE_NEW);
BMO_op_finish(bm, &bmop);
- BMO_slot_buffer_from_enabled_flag(bm, op, "geomout", BM_EDGE|BM_FACE, ELE_NEW);
+ BMO_slot_buffer_from_enabled_flag(bm, op, "geomout", BM_EDGE | BM_FACE, ELE_NEW);
}
diff --git a/source/blender/bmesh/operators/bmo_utils.c b/source/blender/bmesh/operators/bmo_utils.c
index 3cfa70f6e6c..8409c5b76b8 100644
--- a/source/blender/bmesh/operators/bmo_utils.c
+++ b/source/blender/bmesh/operators/bmo_utils.c
@@ -348,7 +348,7 @@ void bmo_righthandfaces_exec(BMesh *bm, BMOperator *op)
* stack (if we use simple function recursion, we'd end up overloading
* the stack on large meshes). */
- BLI_array_growone(fstack);
+ BLI_array_grow_one(fstack);
fstack[0] = startf;
BMO_elem_flag_enable(bm, startf, FACE_VIS);
@@ -382,7 +382,7 @@ void bmo_righthandfaces_exec(BMesh *bm, BMOperator *op)
}
if (i == maxi) {
- BLI_array_growone(fstack);
+ BLI_array_grow_one(fstack);
maxi++;
}
@@ -420,7 +420,7 @@ void bmo_vertexsmooth_exec(BMesh *bm, BMOperator *op)
i = 0;
BMO_ITER (v, &siter, bm, op, "verts", BM_VERT) {
- BLI_array_growone(cos);
+ BLI_array_grow_one(cos);
co = cos[i];
j = 0;
@@ -1035,7 +1035,7 @@ void bmo_face_reverseuvs_exec(BMesh *bm, BMOperator *op)
int i;
BLI_array_empty(uvs);
- BLI_array_growitems(uvs, fs->len);
+ BLI_array_grow_items(uvs, fs->len);
BM_ITER_ELEM_INDEX (lf, &l_iter, fs, BM_LOOPS_OF_FACE, i) {
MLoopUV *luv = CustomData_bmesh_get(&bm->ldata, lf->head.data, CD_MLOOPUV);
@@ -1141,7 +1141,7 @@ void bmo_face_reversecolors_exec(BMesh *bm, BMOperator *op)
int i;
BLI_array_empty(cols);
- BLI_array_growitems(cols, fs->len);
+ BLI_array_grow_items(cols, fs->len);
BM_ITER_ELEM_INDEX (lf, &l_iter, fs, BM_LOOPS_OF_FACE, i) {
cols[i] = *((MLoopCol *)CustomData_bmesh_get(&bm->ldata, lf->head.data, CD_MLOOPCOL));
diff --git a/source/blender/bmesh/operators/bmo_wireframe.c b/source/blender/bmesh/operators/bmo_wireframe.c
new file mode 100644
index 00000000000..e0dc5cf48c7
--- /dev/null
+++ b/source/blender/bmesh/operators/bmo_wireframe.c
@@ -0,0 +1,404 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor(s): Campbell Barton
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/bmesh/operators/bmo_wireframe.c
+ * \ingroup bmesh
+ */
+
+#include "MEM_guardedalloc.h"
+
+#include "BLI_math.h"
+
+#include "BKE_customdata.h"
+
+#include "bmesh.h"
+
+#include "intern/bmesh_operators_private.h" /* own include */
+
+BMLoop *bm_edge_tag_faceloop(BMEdge *e)
+{
+ BMLoop *l, *l_first;
+
+ l = l_first = e->l;
+ do {
+ if (BM_elem_flag_test(l->f, BM_ELEM_TAG)) {
+ return l;
+ }
+ } while ((l = l->radial_next) != l_first);
+
+ /* in the case this is used, we know this will never happen */
+ return NULL;
+}
+
+static void bm_vert_boundary_tangent(BMVert *v, float r_no[3], float r_no_face[3],
+ BMVert **r_va_other, BMVert **r_vb_other)
+{
+ BMIter iter;
+ BMEdge *e_iter;
+
+ BMEdge *e_a = NULL, *e_b = NULL;
+ BMVert *v_a, *v_b;
+
+ BMLoop *l_a, *l_b;
+
+ float no_face[3], no_edge[3];
+ float tvec_a[3], tvec_b[3];
+
+ /* get 2 boundary edges, there should only _be_ 2,
+ * in case there are more - results wont be valid of course */
+ BM_ITER_ELEM (e_iter, &iter, v, BM_EDGES_OF_VERT) {
+ if (BM_elem_flag_test(e_iter, BM_ELEM_TAG)) {
+ if (e_a == NULL) {
+ e_a = e_iter;
+ }
+ else {
+ e_b = e_iter;
+ break;
+ }
+ }
+ }
+
+ l_a = bm_edge_tag_faceloop(e_a);
+ l_b = bm_edge_tag_faceloop(e_b);
+
+ /* average edge face normal */
+ add_v3_v3v3(no_face, l_a->f->no, l_b->f->no);
+
+ /* average edge direction */
+ v_a = BM_edge_other_vert(e_a, v);
+ v_b = BM_edge_other_vert(e_b, v);
+
+ sub_v3_v3v3(tvec_a, v->co, v_a->co);
+ sub_v3_v3v3(tvec_b, v_b->co, v->co);
+ normalize_v3(tvec_a);
+ normalize_v3(tvec_b);
+ add_v3_v3v3(no_edge, tvec_a, tvec_b); /* not unit length but this is ok */
+
+
+ /* find the normal */
+ cross_v3_v3v3(r_no, no_edge, no_face);
+ normalize_v3(r_no);
+
+ /* check are we flipped the right way */
+ BM_edge_calc_face_tangent(e_a, l_a, tvec_a);
+ BM_edge_calc_face_tangent(e_b, l_b, tvec_b);
+ add_v3_v3(tvec_a, tvec_b);
+
+ if (dot_v3v3(r_no, tvec_a) > 0.0f) {
+ negate_v3(r_no);
+ }
+
+ copy_v3_v3(r_no_face, no_face);
+ *r_va_other = v_a;
+ *r_vb_other = v_b;
+}
+
+/* check if we are the only tagged loop-face around this edge */
+static int bm_loop_is_radial_boundary(BMLoop *l_first)
+{
+ BMLoop *l = l_first->radial_next;
+
+ if (l == l_first) {
+ return TRUE; /* a real boundary */
+ }
+ else {
+ do {
+ if (BM_elem_flag_test(l->f, BM_ELEM_TAG)) {
+ return FALSE;
+ }
+ } while ((l = l->radial_next) != l_first);
+ }
+ return TRUE;
+}
+
+extern float BM_vert_calc_mean_tagged_edge_length(BMVert *v);
+
+void bmo_wireframe_exec(BMesh *bm, BMOperator *op)
+{
+ const int use_boundary = BMO_slot_bool_get(op, "use_boundary");
+ const int use_even_offset = BMO_slot_bool_get(op, "use_even_offset");
+ const int use_relative_offset = BMO_slot_bool_get(op, "use_relative_offset");
+ const int use_crease = (BMO_slot_bool_get(op, "use_crease") &&
+ CustomData_has_layer(&bm->edata, CD_CREASE));
+ const float depth = BMO_slot_float_get(op, "thickness");
+ const float inset = depth;
+
+ const int totvert_orig = bm->totvert;
+
+ BMOIter oiter;
+ BMIter iter;
+ BMIter itersub;
+
+ /* filled only with boundary verts */
+ BMVert **verts_src = MEM_mallocN(sizeof(BMVert **) * totvert_orig, __func__);
+ BMVert **verts_neg = MEM_mallocN(sizeof(BMVert **) * totvert_orig, __func__);
+ BMVert **verts_pos = MEM_mallocN(sizeof(BMVert **) * totvert_orig, __func__);
+
+ /* will over-alloc, but makes for easy lookups by index to keep aligned */
+ BMVert **verts_boundary = use_boundary ?
+ MEM_mallocN(sizeof(BMVert **) * totvert_orig, __func__) : NULL;
+
+ float *verts_relfac = use_relative_offset ?
+ MEM_mallocN(sizeof(float) * totvert_orig, __func__) : NULL;
+
+ /* may over-alloc if not all faces have wire */
+ BMVert **verts_loop;
+ int verts_loop_tot = 0;
+
+ BMVert *v_src;
+
+ BMFace *f_src;
+ BMLoop *l;
+
+ float tvec[3];
+ float fac;
+
+ int i;
+
+ BM_mesh_elem_index_ensure(bm, BM_VERT);
+
+ BM_ITER_MESH_INDEX (v_src, &iter, bm, BM_VERTS_OF_MESH, i) {
+ BM_elem_flag_disable(v_src, BM_ELEM_TAG);
+ verts_src[i] = v_src;
+ }
+
+ /* setup tags, all faces and verts will be tagged which will be duplicated */
+ BM_mesh_elem_hflag_disable_all(bm, BM_FACE, BM_ELEM_TAG, FALSE);
+
+ BMO_ITER (f_src, &oiter, bm, op, "faces", BM_FACE) {
+ verts_loop_tot += f_src->len;
+ BM_elem_flag_enable(f_src, BM_ELEM_TAG);
+ BM_ITER_ELEM (l, &itersub, f_src, BM_LOOPS_OF_FACE) {
+ BM_elem_flag_enable(l->v, BM_ELEM_TAG);
+
+ /* also tag boundary edges */
+ BM_elem_flag_set(l->e, BM_ELEM_TAG, bm_loop_is_radial_boundary(l));
+ }
+ }
+
+ /* duplicate tagged verts */
+ for (i = 0, v_src = verts_src[i]; i < totvert_orig; i++, v_src = verts_src[i]) {
+ if (BM_elem_flag_test(v_src, BM_ELEM_TAG)) {
+ fac = depth;
+
+ if (use_relative_offset) {
+ verts_relfac[i] = BM_vert_calc_mean_tagged_edge_length(v_src);
+ fac *= verts_relfac[i];
+ }
+
+ madd_v3_v3v3fl(tvec, v_src->co, v_src->no, -fac);
+ verts_neg[i] = BM_vert_create(bm, tvec, v_src);
+ madd_v3_v3v3fl(tvec, v_src->co, v_src->no, fac);
+ verts_pos[i] = BM_vert_create(bm, tvec, v_src);
+ }
+ else {
+ /* could skip this */
+ verts_src[i] = NULL;
+ verts_neg[i] = NULL;
+ verts_pos[i] = NULL;
+ }
+
+ /* conflicts with BM_vert_calc_mean_tagged_edge_length */
+ if (use_relative_offset == FALSE) {
+ BM_elem_flag_disable(v_src, BM_ELEM_TAG);
+ }
+ }
+
+ if (use_relative_offset) {
+ BM_mesh_elem_hflag_disable_all(bm, BM_VERT, BM_ELEM_TAG, FALSE);
+ }
+
+ verts_loop = MEM_mallocN(sizeof(BMVert **) * verts_loop_tot, __func__);
+ verts_loop_tot = 0; /* count up again */
+
+ BMO_ITER (f_src, &oiter, bm, op, "faces", BM_FACE) {
+ BM_ITER_ELEM (l, &itersub, f_src, BM_LOOPS_OF_FACE) {
+ BM_elem_index_set(l, verts_loop_tot); /* set_loop */
+
+ BM_loop_calc_face_tangent(l, tvec);
+
+ /* create offset vert */
+ fac = inset;
+ if (use_even_offset) {
+ fac *= shell_angle_to_dist(((float)M_PI - BM_loop_calc_face_angle(l)) * 0.5f);
+ }
+ if (use_relative_offset) {
+ fac *= verts_relfac[BM_elem_index_get(l->v)];
+ }
+
+ madd_v3_v3v3fl(tvec, l->v->co, tvec, fac);
+ verts_loop[verts_loop_tot] = BM_vert_create(bm, tvec, l->v);
+
+
+ if (use_boundary) {
+ if (BM_elem_flag_test(l->e, BM_ELEM_TAG)) { /* is this a boundary? */
+
+ BMLoop *l_pair[2] = {l, l->next};
+
+ BM_elem_flag_enable(l->e, BM_ELEM_TAG);
+ for (i = 0; i < 2; i++) {
+ if (!BM_elem_flag_test(l_pair[i]->v, BM_ELEM_TAG)) {
+ float no_face[3];
+ BMVert *va_other;
+ BMVert *vb_other;
+
+ BM_elem_flag_enable(l_pair[i]->v, BM_ELEM_TAG);
+
+ bm_vert_boundary_tangent(l_pair[i]->v, tvec, no_face, &va_other, &vb_other);
+
+ /* create offset vert */
+ /* similar to code above but different angle calc */
+ fac = inset;
+ if (use_even_offset) {
+ fac *= shell_angle_to_dist(((float)M_PI - angle_on_axis_v3v3v3_v3(va_other->co,
+ l_pair[i]->v->co,
+ vb_other->co,
+ no_face)) * 0.5f);
+ }
+ if (use_relative_offset) {
+ fac *= verts_relfac[BM_elem_index_get(l_pair[i]->v)];
+ }
+ madd_v3_v3v3fl(tvec, l_pair[i]->v->co, tvec, fac);
+ verts_boundary[BM_elem_index_get(l_pair[i]->v)] = BM_vert_create(bm, tvec, l_pair[i]->v);
+ }
+ }
+ }
+ }
+
+ verts_loop_tot++;
+ }
+ }
+
+ BMO_ITER (f_src, &oiter, bm, op, "faces", BM_FACE) {
+ BM_elem_flag_disable(f_src, BM_ELEM_TAG);
+ BM_ITER_ELEM (l, &itersub, f_src, BM_LOOPS_OF_FACE) {
+ BMFace *f_new;
+ BMLoop *l_new;
+ BMLoop *l_next = l->next;
+ BMVert *v_l1 = verts_loop[BM_elem_index_get(l)];
+ BMVert *v_l2 = verts_loop[BM_elem_index_get(l_next)];
+
+ BMVert *v_src_l1 = l->v;
+ BMVert *v_src_l2 = l_next->v;
+
+ const int i_1 = BM_elem_index_get(v_src_l1);
+ const int i_2 = BM_elem_index_get(v_src_l2);
+
+ BMVert *v_neg1 = verts_neg[i_1];
+ BMVert *v_neg2 = verts_neg[i_2];
+
+ BMVert *v_pos1 = verts_pos[i_1];
+ BMVert *v_pos2 = verts_pos[i_2];
+
+ f_new = BM_face_create_quad_tri(bm, v_l1, v_l2, v_neg2, v_neg1, f_src, FALSE);
+ BM_elem_flag_enable(f_new, BM_ELEM_TAG);
+ l_new = BM_FACE_FIRST_LOOP(f_new);
+
+ BM_elem_attrs_copy(bm, bm, l, l_new);
+ BM_elem_attrs_copy(bm, bm, l, l_new->prev);
+ BM_elem_attrs_copy(bm, bm, l_next, l_new->next);
+ BM_elem_attrs_copy(bm, bm, l_next, l_new->next->next);
+
+ f_new = BM_face_create_quad_tri(bm, v_l2, v_l1, v_pos1, v_pos2, f_src, FALSE);
+ BM_elem_flag_enable(f_new, BM_ELEM_TAG);
+ l_new = BM_FACE_FIRST_LOOP(f_new);
+
+ BM_elem_attrs_copy(bm, bm, l_next, l_new);
+ BM_elem_attrs_copy(bm, bm, l_next, l_new->prev);
+ BM_elem_attrs_copy(bm, bm, l, l_new->next);
+ BM_elem_attrs_copy(bm, bm, l, l_new->next->next);
+
+ if (use_boundary) {
+ if (BM_elem_flag_test(l->e, BM_ELEM_TAG)) {
+ /* we know its a boundary and this is the only face user (which is being wire'd) */
+ /* we know we only touch this edge/face once */
+ BMVert *v_b1 = verts_boundary[i_1];
+ BMVert *v_b2 = verts_boundary[i_2];
+
+ f_new = BM_face_create_quad_tri(bm, v_b2, v_b1, v_neg1, v_neg2, f_src, FALSE);
+ BM_elem_flag_enable(f_new, BM_ELEM_TAG);
+ l_new = BM_FACE_FIRST_LOOP(f_new);
+
+ BM_elem_attrs_copy(bm, bm, l_next, l_new);
+ BM_elem_attrs_copy(bm, bm, l_next, l_new->prev);
+ BM_elem_attrs_copy(bm, bm, l, l_new->next);
+ BM_elem_attrs_copy(bm, bm, l, l_new->next->next);
+
+ f_new = BM_face_create_quad_tri(bm, v_b1, v_b2, v_pos2, v_pos1, f_src, FALSE);
+ BM_elem_flag_enable(f_new, BM_ELEM_TAG);
+ l_new = BM_FACE_FIRST_LOOP(f_new);
+
+ BM_elem_attrs_copy(bm, bm, l, l_new);
+ BM_elem_attrs_copy(bm, bm, l, l_new->prev);
+ BM_elem_attrs_copy(bm, bm, l_next, l_new->next);
+ BM_elem_attrs_copy(bm, bm, l_next, l_new->next->next);
+
+ if (use_crease) {
+ BMEdge *e_new;
+ e_new = BM_edge_exists(v_pos1, v_b1);
+ BM_elem_float_data_set(&bm->edata, e_new, CD_CREASE, 1.0f);
+
+ e_new = BM_edge_exists(v_pos2, v_b2);
+ BM_elem_float_data_set(&bm->edata, e_new, CD_CREASE, 1.0f);
+
+ e_new = BM_edge_exists(v_neg1, v_b1);
+ BM_elem_float_data_set(&bm->edata, e_new, CD_CREASE, 1.0f);
+
+ e_new = BM_edge_exists(v_neg2, v_b2);
+ BM_elem_float_data_set(&bm->edata, e_new, CD_CREASE, 1.0f);
+ }
+ }
+ }
+
+ if (use_crease) {
+ BMEdge *e_new;
+ e_new = BM_edge_exists(v_pos1, v_l1);
+ BM_elem_float_data_set(&bm->edata, e_new, CD_CREASE, 1.0f);
+
+ e_new = BM_edge_exists(v_pos2, v_l2);
+ BM_elem_float_data_set(&bm->edata, e_new, CD_CREASE, 1.0f);
+
+ e_new = BM_edge_exists(v_neg1, v_l1);
+ BM_elem_float_data_set(&bm->edata, e_new, CD_CREASE, 1.0f);
+
+ e_new = BM_edge_exists(v_neg2, v_l2);
+ BM_elem_float_data_set(&bm->edata, e_new, CD_CREASE, 1.0f);
+ }
+
+ }
+ }
+
+ if (use_boundary) {
+ MEM_freeN(verts_boundary);
+ }
+
+ if (use_relative_offset) {
+ MEM_freeN(verts_relfac);
+ }
+
+ MEM_freeN(verts_src);
+ MEM_freeN(verts_neg);
+ MEM_freeN(verts_pos);
+ MEM_freeN(verts_loop);
+
+ BMO_slot_buffer_from_enabled_hflag(bm, op, "faceout", BM_FACE, BM_ELEM_TAG);
+}
diff --git a/source/blender/bmesh/tools/BME_bevel.c b/source/blender/bmesh/tools/BME_bevel.c
index 6a91d6f9d00..e03df77a290 100644
--- a/source/blender/bmesh/tools/BME_bevel.c
+++ b/source/blender/bmesh/tools/BME_bevel.c
@@ -234,7 +234,8 @@ static int BME_bevel_get_vec(float *vec, BMVert *v1, BMVert *v2, BME_TransData_H
* vec2 is the direction of projection (pointing away from vec1)
* up_vec is used for orientation (expected to be normalized)
* returns the length of the projected vector that lies along vec1 */
-static float BME_bevel_project_vec(float *vec1, float *vec2, float *up_vec, int is_forward, BME_TransData_Head *UNUSED(td))
+static float BME_bevel_project_vec(float *vec1, float *vec2, float *up_vec,
+ int is_forward, BME_TransData_Head *UNUSED(td))
{
float factor, vec3[3], tmp[3], c1, c2;
@@ -264,7 +265,8 @@ static float BME_bevel_project_vec(float *vec1, float *vec2, float *up_vec, int
* using the vert and the loop passed, get or make the split vert, set its coordinates
* and transform properties, and set the max limits.
* Finally, return the split vert. */
-static BMVert *BME_bevel_split_edge(BMesh *bm, BMVert *v, BMVert *v1, BMLoop *l, float *up_vec, float value, BME_TransData_Head *td)
+static BMVert *BME_bevel_split_edge(BMesh *bm, BMVert *v, BMVert *v1, BMLoop *l,
+ float *up_vec, float value, BME_TransData_Head *td)
{
BME_TransData *vtd, *vtd1, *vtd2;
BMVert *sv, *v2, *v3, *ov;
@@ -305,7 +307,7 @@ static BMVert *BME_bevel_split_edge(BMesh *bm, BMVert *v, BMVert *v1, BMLoop *l,
e1 = e2;
}
ov = BM_edge_other_vert(e1, v);
- sv = BM_edge_split(bm, e1, v, &ne, 0);
+ sv = BM_edge_split(bm, e1, v, &ne, 0.0f);
//BME_data_interp_from_verts(bm, v, ov, sv, 0.25); /* this is technically wrong.. */
//BME_data_interp_from_faceverts(bm, v, ov, sv, 0.25);
//BME_data_interp_from_faceverts(bm, ov, v, sv, 0.25);
@@ -347,7 +349,7 @@ static BMVert *BME_bevel_split_edge(BMesh *bm, BMVert *v, BMVert *v1, BMLoop *l,
else {
is_split_vert = 0;
ov = BM_edge_other_vert(l->e, v);
- sv = BM_edge_split(bm, l->e, v, &ne, 0);
+ sv = BM_edge_split(bm, l->e, v, &ne, 0.0f);
//BME_data_interp_from_verts(bm, v, ov, sv, 0.25); /* this is technically wrong.. */
//BME_data_interp_from_faceverts(bm, v, ov, sv, 0.25);
//BME_data_interp_from_faceverts(bm, ov, v, sv, 0.25);
@@ -371,8 +373,8 @@ static BMVert *BME_bevel_split_edge(BMesh *bm, BMVert *v, BMVert *v1, BMLoop *l,
if (vtd1->loc == NULL) {
/* this is a vert with data only for calculating initial weights */
- if (vtd1->weight < 0) {
- vtd1->weight = 0;
+ if (vtd1->weight < 0.0f) {
+ vtd1->weight = 0.0f;
}
scale = vtd1->weight / vtd1->factor;
if (!vtd1->max) {
@@ -496,7 +498,8 @@ static BMVert *BME_bevel_wire(BMesh *bm, BMVert *v, float value, int res, int UN
}
#endif
-static BMLoop *BME_bevel_edge(BMesh *bm, BMLoop *l, float value, int UNUSED(options), float *up_vec, BME_TransData_Head *td)
+static BMLoop *BME_bevel_edge(BMesh *bm, BMLoop *l, float value, int UNUSED(options),
+ float *up_vec, BME_TransData_Head *td)
{
BMVert *v1, *v2, *kv;
BMLoop *kl = NULL, *nl;
@@ -537,14 +540,14 @@ static BMLoop *BME_bevel_edge(BMesh *bm, BMLoop *l, float value, int UNUSED(opti
se = l->next->e;
jf = NULL;
if (kl->v == kv) {
- BM_face_split(bm, kl->f, kl->prev->v, kl->next->v, &nl, kl->prev->e, FALSE);
+ BM_face_split(bm, kl->f, kl->prev->v, kl->next->v, &nl, kl->prev->e, TRUE);
ke = kl->e;
/* BMESH-TODO: jfke doesn't handle customdata */
jf = bmesh_jfke(bm, kl->prev->radial_next->f, kl->f, kl->prev->e);
BM_vert_collapse_edge(bm, ke, kv, FALSE);
}
else {
- BM_face_split(bm, kl->f, kl->next->next->v, kl->v, &nl, kl->next->e, FALSE);
+ BM_face_split(bm, kl->f, kl->next->next->v, kl->v, &nl, kl->next->e, TRUE);
ke = kl->e;
/* BMESH-TODO: jfke doesn't handle customdata */
jf = bmesh_jfke(bm, kl->next->radial_next->f, kl->f, kl->next->e);
@@ -583,14 +586,14 @@ static BMLoop *BME_bevel_edge(BMesh *bm, BMLoop *l, float value, int UNUSED(opti
se = l->e;
jf = NULL;
if (kl->v == kv) {
- BM_face_split(bm, kl->f, kl->prev->v, kl->next->v, &nl, kl->prev->e, FALSE);
+ BM_face_split(bm, kl->f, kl->prev->v, kl->next->v, &nl, kl->prev->e, TRUE);
ke = kl->e;
/* BMESH-TODO: jfke doesn't handle customdata */
jf = bmesh_jfke(bm, kl->prev->radial_next->f, kl->f, kl->prev->e);
BM_vert_collapse_edge(bm, ke, kv, FALSE);
}
else {
- BM_face_split(bm, kl->f, kl->next->next->v, kl->v, &nl, kl->next->e, FALSE);
+ BM_face_split(bm, kl->f, kl->next->next->v, kl->v, &nl, kl->next->e, TRUE);
ke = kl->e;
/* BMESH-TODO: jfke doesn't handle customdata */
jf = bmesh_jfke(bm, kl->next->radial_next->f, kl->f, kl->next->e);
@@ -605,7 +608,7 @@ static BMLoop *BME_bevel_edge(BMesh *bm, BMLoop *l, float value, int UNUSED(opti
}
if (!BMO_elem_flag_test(bm, v1, BME_BEVEL_NONMAN) || !BMO_elem_flag_test(bm, v2, BME_BEVEL_NONMAN)) {
- BM_face_split(bm, f, v2, v1, &l, e, FALSE);
+ BM_face_split(bm, f, v2, v1, &l, e, TRUE);
BMO_elem_flag_enable(bm, l->e, BME_BEVEL_BEVEL);
l = l->radial_next;
}
@@ -617,7 +620,8 @@ static BMLoop *BME_bevel_edge(BMesh *bm, BMLoop *l, float value, int UNUSED(opti
return l;
}
-static BMLoop *BME_bevel_vert(BMesh *bm, BMLoop *l, float value, int UNUSED(options), float *up_vec, BME_TransData_Head *td)
+static BMLoop *BME_bevel_vert(BMesh *bm, BMLoop *l, float value, int UNUSED(options),
+ float up_vec[3], BME_TransData_Head *td)
{
BMVert *v1, *v2;
/* BMFace *f; */ /* UNUSED */
@@ -633,7 +637,7 @@ static BMLoop *BME_bevel_vert(BMesh *bm, BMLoop *l, float value, int UNUSED(opti
l = l->next->next;
/* "cut off" this corner */
- /* f = */ BM_face_split(bm, l->f, v2, v1, NULL, l->e, FALSE);
+ /* f = */ BM_face_split(bm, l->f, v2, v1, NULL, l->e, TRUE);
return l;
}
@@ -694,7 +698,7 @@ static BMFace *BME_bevel_poly(BMesh *bm, BMFace *f, float value, int options, BM
f = l->f;
/* max pass */
- if (value > 0.5f && max > 0) {
+ if (value > 0.5f && max > 0.0f) {
max = -1;
BM_ITER_ELEM (l, &iter, f, BM_LOOPS_OF_FACE) {
if (BMO_elem_flag_test(bm, l->e, BME_BEVEL_BEVEL) || BMO_elem_flag_test(bm, l->e, BME_BEVEL_ORIG)) {
@@ -810,7 +814,7 @@ static float BME_bevel_get_angle_vert(BMVert *v)
}
/* return cosf(angle_diff + 0.001f); */ /* compare with dot product */
- return (angle_diff / tot_angle) * (M_PI / 2);
+ return (angle_diff / tot_angle) * (float)(M_PI / 2.0);
}
static void BME_bevel_add_vweight(BME_TransData_Head *td, BMesh *bm, BMVert *v, float weight, float factor, int options)
@@ -835,7 +839,7 @@ static void BME_bevel_add_vweight(BME_TransData_Head *td, BMesh *bm, BMVert *v,
vtd->weight = weight;
}
}
- else if (vtd->weight < 0) {
+ else if (vtd->weight < 0.0f) {
vtd->factor = factor;
vtd->weight = weight;
}
@@ -894,14 +898,14 @@ static void bevel_init_edges(BMesh *bm, int options, float angle, BME_TransData_
int count;
float weight;
BMIter iter;
- const float threshold = (options & BME_BEVEL_ANGLE) ? cosf(angle + 0.001) : 0.0f;
+ const float threshold = (options & BME_BEVEL_ANGLE) ? cosf(angle + 0.001f) : 0.0f;
BM_ITER_MESH (e, &iter, bm, BM_EDGES_OF_MESH) {
- weight = 0.0;
+ weight = 0.0f;
if (!BMO_elem_flag_test(bm, e, BME_BEVEL_NONMAN)) {
if (options & BME_BEVEL_SELECT) {
if (BM_elem_flag_test(e, BM_ELEM_SELECT)) {
- weight = 1.0;
+ weight = 1.0f;
}
}
else if (options & BME_BEVEL_WEIGHT) {
@@ -925,10 +929,10 @@ static void bevel_init_edges(BMesh *bm, int options, float angle, BME_TransData_
}
}
else {
- weight = 1.0;
+ weight = 1.0f;
}
- if (weight > 0.0) {
+ if (weight > 0.0f) {
BMO_elem_flag_enable(bm, e, BME_BEVEL_BEVEL);
BME_bevel_add_vweight(td, bm, e->v1, weight, 1.0, options);
BME_bevel_add_vweight(td, bm, e->v2, weight, 1.0, options);
@@ -945,7 +949,8 @@ static void bevel_init_edges(BMesh *bm, int options, float angle, BME_TransData_
}
}
-static BMesh *BME_bevel_initialize(BMesh *bm, int options, int UNUSED(defgrp_index), float angle, BME_TransData_Head *td)
+static BMesh *BME_bevel_initialize(BMesh *bm, int options,
+ int UNUSED(defgrp_index), float angle, BME_TransData_Head *td)
{
BMVert *v /*, *v2 */;
BMEdge *e /*, *curedg */;
@@ -1037,7 +1042,8 @@ static BMesh *BME_bevel_reinitialize(BMesh *bm)
* A BMesh pointer to the BM passed as a parameter.
*/
-static BMesh *BME_bevel_mesh(BMesh *bm, float value, int UNUSED(res), int options, int UNUSED(defgrp_index), BME_TransData_Head *td)
+static BMesh *BME_bevel_mesh(BMesh *bm, float value, int UNUSED(res), int options,
+ int UNUSED(defgrp_index), BME_TransData_Head *td)
{
BMVert *v;
BMEdge *e, *curedge;
@@ -1071,9 +1077,9 @@ static BMesh *BME_bevel_mesh(BMesh *bm, float value, int UNUSED(res), int option
if (l->v != v) l = l->next;
if (l2->v != v) l2 = l2->next;
if (l->f->len > 3)
- BM_face_split(bm, l->f, l->next->v, l->prev->v, &l, l->e, FALSE); /* clip this corner off */
+ BM_face_split(bm, l->f, l->next->v, l->prev->v, &l, l->e, TRUE); /* clip this corner off */
if (l2->f->len > 3)
- BM_face_split(bm, l2->f, l2->next->v, l2->prev->v, &l, l2->e, FALSE); /* clip this corner off */
+ BM_face_split(bm, l2->f, l2->next->v, l2->prev->v, &l, l2->e, TRUE); /* clip this corner off */
curedge = bmesh_disk_edge_next(curedge, v);
} while (curedge != v->e);
BME_Bevel_Dissolve_Disk(bm, v);
@@ -1102,14 +1108,14 @@ BMesh *BME_bevel(BMEditMesh *em, float value, int res, int options, int defgrp_i
BME_TransData_Head *td;
BME_TransData *vtd;
int i;
- double fac = 1, d;
+ double fac = 1.0, d;
td = BME_init_transdata(BLI_MEMARENA_STD_BUFSIZE);
/* recursion math courtesy of Martin Poirier (theeth) */
for (i = 0; i < res - 1; i++) {
- if (i == 0) fac += 1.0f / 3.0f; else fac += 1.0f / (3 * i * 2.0f);
+ if (i == 0) fac += 1.0 / 3.0; else fac += 1.0 / (3.0 * i * 2.0);
}
- d = 1.0f / fac;
+ d = 1.0 / fac;
for (i = 0; i < res || (res == 0 && i == 0); i++) {
BMO_push(bm, NULL);
@@ -1143,7 +1149,7 @@ BMesh *BME_bevel(BMEditMesh *em, float value, int res, int options, int defgrp_i
else {
d = value;
}
- madd_v3_v3v3fl(v->co, vtd->org, vtd->vec, vtd->factor * d);
+ madd_v3_v3v3fl(v->co, vtd->org, vtd->vec, vtd->factor * (float)d);
}
}
diff --git a/source/blender/collada/AnimationExporter.cpp b/source/blender/collada/AnimationExporter.cpp
index 778e3029266..5898d5da670 100644
--- a/source/blender/collada/AnimationExporter.cpp
+++ b/source/blender/collada/AnimationExporter.cpp
@@ -29,7 +29,7 @@ void forEachObjectInScene(Scene *sce, Functor &f)
{
Base *base= (Base*) sce->base.first;
- while(base) {
+ while (base) {
Object *ob = base->object;
f(ob);
@@ -59,13 +59,11 @@ void AnimationExporter::operator() (Object *ob)
/* bool isMatAnim = false; */ /* UNUSED */
//Export transform animations
- if (ob->adt && ob->adt->action)
- {
+ if (ob->adt && ob->adt->action) {
fcu = (FCurve*)ob->adt->action->curves.first;
//transform matrix export for bones are temporarily disabled here.
- if ( ob->type == OB_ARMATURE )
- {
+ if ( ob->type == OB_ARMATURE ) {
bArmature *arm = (bArmature*)ob->data;
for (Bone *bone = (Bone*)arm->bonebase.first; bone; bone = bone->next)
write_bone_animation_matrix(ob, bone);
@@ -79,59 +77,63 @@ void AnimationExporter::operator() (Object *ob)
transformName = extract_transform_name( fcu->rna_path );
if ((!strcmp(transformName, "location") || !strcmp(transformName, "scale")) ||
- (!strcmp(transformName, "rotation_euler") && ob->rotmode == ROT_MODE_EUL)||
- (!strcmp(transformName, "rotation_quaternion")))
- dae_animation(ob ,fcu, transformName, false);
+ (!strcmp(transformName, "rotation_euler") && ob->rotmode == ROT_MODE_EUL)||
+ (!strcmp(transformName, "rotation_quaternion")))
+ {
+ dae_animation(ob, fcu, transformName, false);
+ }
fcu = fcu->next;
}
}
//Export Lamp parameter animations
- if ( (ob->type == OB_LAMP ) && ((Lamp*)ob ->data)->adt && ((Lamp*)ob ->data)->adt->action )
- {
+ if ( (ob->type == OB_LAMP ) && ((Lamp*)ob ->data)->adt && ((Lamp*)ob ->data)->adt->action ) {
fcu = (FCurve*)(((Lamp*)ob ->data)->adt->action->curves.first);
while (fcu) {
transformName = extract_transform_name( fcu->rna_path );
- if ((!strcmp(transformName, "color")) || (!strcmp(transformName, "spot_size"))|| (!strcmp(transformName, "spot_blend"))||
- (!strcmp(transformName, "distance")) )
- dae_animation(ob , fcu, transformName, true );
+ if ((!strcmp(transformName, "color")) || (!strcmp(transformName, "spot_size"))||
+ (!strcmp(transformName, "spot_blend")) || (!strcmp(transformName, "distance")))
+ {
+ dae_animation(ob, fcu, transformName, true);
+ }
fcu = fcu->next;
}
}
//Export Camera parameter animations
- if ( (ob->type == OB_CAMERA ) && ((Camera*)ob ->data)->adt && ((Camera*)ob ->data)->adt->action )
- {
+ if ( (ob->type == OB_CAMERA ) && ((Camera*)ob ->data)->adt && ((Camera*)ob ->data)->adt->action ) {
fcu = (FCurve*)(((Camera*)ob ->data)->adt->action->curves.first);
while (fcu) {
transformName = extract_transform_name( fcu->rna_path );
if ((!strcmp(transformName, "lens"))||
- (!strcmp(transformName, "ortho_scale"))||
- (!strcmp(transformName, "clip_end"))||(!strcmp(transformName, "clip_start")))
- dae_animation(ob , fcu, transformName, true );
+ (!strcmp(transformName, "ortho_scale"))||
+ (!strcmp(transformName, "clip_end"))||(!strcmp(transformName, "clip_start")))
+ {
+ dae_animation(ob, fcu, transformName, true);
+ }
fcu = fcu->next;
}
}
//Export Material parameter animations.
- for (int a = 0; a < ob->totcol; a++)
- {
+ for (int a = 0; a < ob->totcol; a++) {
Material *ma = give_current_material(ob, a+1);
if (!ma) continue;
- if (ma->adt && ma->adt->action)
- {
+ if (ma->adt && ma->adt->action) {
/* isMatAnim = true; */
fcu = (FCurve*)ma->adt->action->curves.first;
while (fcu) {
transformName = extract_transform_name( fcu->rna_path );
- if ((!strcmp(transformName, "specular_hardness"))||(!strcmp(transformName, "specular_color"))
- ||(!strcmp(transformName, "diffuse_color"))||(!strcmp(transformName, "alpha"))||
- (!strcmp(transformName, "ior")))
- dae_animation(ob ,fcu, transformName, true, ma );
+ if ((!strcmp(transformName, "specular_hardness"))||(!strcmp(transformName, "specular_color")) ||
+ (!strcmp(transformName, "diffuse_color"))||(!strcmp(transformName, "alpha")) ||
+ (!strcmp(transformName, "ior")))
+ {
+ dae_animation(ob, fcu, transformName, true, ma );
+ }
fcu = fcu->next;
}
}
@@ -148,8 +150,7 @@ float * AnimationExporter::get_eul_source_for_quat(Object *ob )
float *eul = (float*)MEM_callocN(sizeof(float) * fcu->totvert * 3, "quat output source values");
float temp_quat[4];
float temp_eul[3];
- while(fcu)
- {
+ while (fcu) {
char * transformName = extract_transform_name( fcu->rna_path );
if ( !strcmp(transformName, "rotation_quaternion") ) {
@@ -164,7 +165,7 @@ float * AnimationExporter::get_eul_source_for_quat(Object *ob )
for ( int j = 0;j<4;j++)
temp_quat[j] = quat[(i*4)+j];
- quat_to_eul(temp_eul,temp_quat);
+ quat_to_eul(temp_eul, temp_quat);
for (int k = 0;k<3;k++)
eul[i*3 + k] = temp_eul[k];
@@ -176,13 +177,13 @@ float * AnimationExporter::get_eul_source_for_quat(Object *ob )
}
//Get proper name for bones
-std::string AnimationExporter::getObjectBoneName( Object* ob,const FCurve* fcu )
+std::string AnimationExporter::getObjectBoneName( Object* ob, const FCurve* fcu )
{
//hard-way to derive the bone name from rna_path. Must find more compact method
std::string rna_path = std::string(fcu->rna_path);
char* boneName = strtok((char *)rna_path.c_str(), "\"");
- boneName = strtok(NULL,"\"");
+ boneName = strtok(NULL, "\"");
if ( boneName != NULL )
return /*id_name(ob) + "_" +*/ std::string(boneName);
@@ -191,7 +192,7 @@ std::string AnimationExporter::getObjectBoneName( Object* ob,const FCurve* fcu )
}
//convert f-curves to animation curves and write
-void AnimationExporter::dae_animation(Object* ob, FCurve *fcu, char* transformName , bool is_param, Material * ma )
+void AnimationExporter::dae_animation(Object* ob, FCurve *fcu, char* transformName, bool is_param, Material * ma )
{
const char *axis_name = NULL;
char anim_id[200];
@@ -199,8 +200,7 @@ void AnimationExporter::dae_animation(Object* ob, FCurve *fcu, char* transformNa
bool has_tangents = false;
bool quatRotation = false;
- if ( !strcmp(transformName, "rotation_quaternion") )
- {
+ if ( !strcmp(transformName, "rotation_quaternion") ) {
fprintf(stderr, "quaternion rotation curves are not supported. rotation curve will not be exported\n");
quatRotation = true;
return;
@@ -223,23 +223,20 @@ void AnimationExporter::dae_animation(Object* ob, FCurve *fcu, char* transformNa
if (fcu->array_index < 3)
axis_name = axis_names[fcu->array_index];
}
-
- //no axis name. single parameter.
- else{
+ else {
+ /* no axis name. single parameter */
axis_name = "";
}
std::string ob_name = std::string("null");
//Create anim Id
- if (ob->type == OB_ARMATURE)
- {
- ob_name = getObjectBoneName( ob , fcu);
+ if (ob->type == OB_ARMATURE) {
+ ob_name = getObjectBoneName(ob, fcu);
BLI_snprintf(anim_id, sizeof(anim_id), "%s_%s.%s", (char*)translate_id(ob_name).c_str(),
transformName, axis_name);
}
- else
- {
+ else {
if (ma)
ob_name = id_name(ob) + "_material";
else
@@ -257,18 +254,17 @@ void AnimationExporter::dae_animation(Object* ob, FCurve *fcu, char* transformNa
std::string output_id;
//quat rotations are skipped for now, because of complications with determining axis.
- if (quatRotation)
- {
- float * eul = get_eul_source_for_quat(ob);
- float * eul_axis = (float*)MEM_callocN(sizeof(float) * fcu->totvert, "quat output source values");
- for ( int i = 0 ; i< fcu->totvert ; i++)
+ if (quatRotation) {
+ float *eul = get_eul_source_for_quat(ob);
+ float *eul_axis = (float*)MEM_callocN(sizeof(float) * fcu->totvert, "quat output source values");
+ for (int i = 0 ; i< fcu->totvert ; i++) {
eul_axis[i] = eul[i*3 + fcu->array_index];
- output_id= create_source_from_array(COLLADASW::InputSemantic::OUTPUT, eul_axis , fcu->totvert, quatRotation, anim_id, axis_name);
+ }
+ output_id= create_source_from_array(COLLADASW::InputSemantic::OUTPUT, eul_axis, fcu->totvert, quatRotation, anim_id, axis_name);
MEM_freeN(eul);
MEM_freeN(eul_axis);
}
- else
- {
+ else {
output_id= create_source_from_fcurve(COLLADASW::InputSemantic::OUTPUT, fcu, anim_id, axis_name);
}
// create interpolations source
@@ -305,21 +301,20 @@ void AnimationExporter::dae_animation(Object* ob, FCurve *fcu, char* transformNa
std::string target;
if ( !is_param )
- target = translate_id(ob_name)
- + "/" + get_transform_sid(fcu->rna_path, -1, axis_name, true);
- else
- {
+ target = translate_id(ob_name) +
+ "/" + get_transform_sid(fcu->rna_path, -1, axis_name, true);
+ else {
if ( ob->type == OB_LAMP )
- target = get_light_id(ob)
- + "/" + get_light_param_sid(fcu->rna_path, -1, axis_name, true);
+ target = get_light_id(ob) +
+ "/" + get_light_param_sid(fcu->rna_path, -1, axis_name, true);
if ( ob->type == OB_CAMERA )
- target = get_camera_id(ob)
- + "/" + get_camera_param_sid(fcu->rna_path, -1, axis_name, true);
+ target = get_camera_id(ob) +
+ "/" + get_camera_param_sid(fcu->rna_path, -1, axis_name, true);
if ( ma )
- target = translate_id(id_name(ma)) + "-effect"
- +"/common/" /*profile common is only supported */ + get_transform_sid(fcu->rna_path, -1, axis_name, true);
+ target = translate_id(id_name(ma)) + "-effect" +
+ "/common/" /*profile common is only supported */ + get_transform_sid(fcu->rna_path, -1, axis_name, true);
}
addChannel(COLLADABU::URI(empty, sampler_id), target);
@@ -349,8 +344,7 @@ bool AnimationExporter::is_bone_deform_group(Bone * bone)
//Check if current bone is deform
if ((bone->flag & BONE_NO_DEFORM) == 0 ) return true;
//Check child bones
- else
- {
+ else {
for (Bone *child = (Bone*)bone->childbase.first; child; child = child->next) {
//loop through all the children until deform bone is found, and then return
is_def = is_bone_deform_group(child);
@@ -369,16 +363,15 @@ void AnimationExporter::sample_and_write_bone_animation_matrix(Object *ob_arm, B
//char prefix[256];
FCurve* fcu = (FCurve*)ob_arm->adt->action->curves.first;
- while(fcu)
- {
- std::string bone_name = getObjectBoneName(ob_arm,fcu);
- int val = BLI_strcasecmp((char*)bone_name.c_str(),bone->name);
+ while (fcu) {
+ std::string bone_name = getObjectBoneName(ob_arm, fcu);
+ int val = BLI_strcasecmp((char*)bone_name.c_str(), bone->name);
if (val==0) break;
fcu = fcu->next;
}
if (!(fcu)) return;
- bPoseChannel *pchan = get_pose_channel(ob_arm->pose, bone->name);
+ bPoseChannel *pchan = BKE_pose_channel_find_name(ob_arm->pose, bone->name);
if (!pchan)
return;
@@ -386,19 +379,19 @@ void AnimationExporter::sample_and_write_bone_animation_matrix(Object *ob_arm, B
if (flag & ARM_RESTPOS) {
arm->flag &= ~ARM_RESTPOS;
- where_is_pose(scene, ob_arm);
+ BKE_pose_where_is(scene, ob_arm);
}
if (fra.size()) {
- dae_baked_animation(fra ,ob_arm, bone );
+ dae_baked_animation(fra, ob_arm, bone );
}
if (flag & ARM_RESTPOS)
arm->flag = flag;
- where_is_pose(scene, ob_arm);
+ BKE_pose_where_is(scene, ob_arm);
}
-void AnimationExporter::dae_baked_animation(std::vector<float> &fra, Object *ob_arm , Bone *bone)
+void AnimationExporter::dae_baked_animation(std::vector<float> &fra, Object *ob_arm, Bone *bone)
{
std::string ob_name = id_name(ob_arm);
std::string bone_name = bone->name;
@@ -417,7 +410,7 @@ void AnimationExporter::dae_baked_animation(std::vector<float> &fra, Object *ob_
// create output source
std::string output_id;
- output_id = create_4x4_source( fra, ob_arm , bone , anim_id);
+ output_id = create_4x4_source( fra, ob_arm, bone, anim_id);
// create interpolations source
std::string interpolation_id = fake_interpolation_source(fra.size(), anim_id, "");
@@ -511,7 +504,7 @@ float AnimationExporter::convert_angle(float angle)
std::string AnimationExporter::get_semantic_suffix(COLLADASW::InputSemantic::Semantics semantic)
{
- switch(semantic) {
+ switch (semantic) {
case COLLADASW::InputSemantic::INPUT:
return INPUT_SOURCE_ID_SUFFIX;
case COLLADASW::InputSemantic::OUTPUT:
@@ -531,7 +524,7 @@ std::string AnimationExporter::get_semantic_suffix(COLLADASW::InputSemantic::Sem
void AnimationExporter::add_source_parameters(COLLADASW::SourceBase::ParameterNameList& param,
COLLADASW::InputSemantic::Semantics semantic, bool is_rot, const char *axis, bool transform)
{
- switch(semantic) {
+ switch (semantic) {
case COLLADASW::InputSemantic::INPUT:
param.push_back("TIME");
break;
@@ -544,8 +537,7 @@ void AnimationExporter::add_source_parameters(COLLADASW::SourceBase::ParameterNa
param.push_back(axis);
}
else
- if ( transform )
- {
+ if ( transform ) {
param.push_back("TRANSFORM");
}
else { //assumes if axis isn't specified all axises are added
@@ -727,7 +719,7 @@ std::string AnimationExporter::create_source_from_vector(COLLADASW::InputSemanti
return source_id;
}
-std::string AnimationExporter::create_4x4_source(std::vector<float> &frames , Object * ob_arm, Bone *bone , const std::string& anim_id)
+std::string AnimationExporter::create_4x4_source(std::vector<float> &frames, Object * ob_arm, Bone *bone, const std::string& anim_id)
{
COLLADASW::InputSemantic::Semantics semantic = COLLADASW::InputSemantic::OUTPUT;
std::string source_id = anim_id + get_semantic_suffix(semantic);
@@ -747,7 +739,7 @@ std::string AnimationExporter::create_4x4_source(std::vector<float> &frames , Ob
bPoseChannel *pchan = NULL;
bPose *pose = ob_arm->pose;
- pchan = get_pose_channel(pose, bone->name);
+ pchan = BKE_pose_channel_find_name(pose, bone->name);
if (!pchan)
return "";
@@ -761,10 +753,10 @@ std::string AnimationExporter::create_4x4_source(std::vector<float> &frames , Ob
for (it = frames.begin(); it != frames.end(); it++) {
float mat[4][4], ipar[4][4];
- float ctime = BKE_frame_to_ctime(scene, *it);
+ float ctime = BKE_scene_frame_get_from_ctime(scene, *it);
- BKE_animsys_evaluate_animdata(scene , &ob_arm->id, ob_arm->adt, ctime, ADT_RECALC_ANIM);
- where_is_pose_bone(scene, ob_arm, pchan, ctime, 1);
+ BKE_animsys_evaluate_animdata(scene, &ob_arm->id, ob_arm->adt, ctime, ADT_RECALC_ANIM);
+ BKE_pose_where_is_bone(scene, ob_arm, pchan, ctime, 1);
// compute bone local mat
if (bone->parent) {
@@ -778,8 +770,7 @@ std::string AnimationExporter::create_4x4_source(std::vector<float> &frames , Ob
// SECOND_LIFE_COMPATIBILITY
// AFAIK animation to second life is via BVH, but no
// reason to not have the collada-animation be correct
- if (export_settings->second_life)
- {
+ if (export_settings->second_life) {
float temp[4][4];
copy_m4_m4(temp, bone->arm_mat);
temp[3][0] = temp[3][1] = temp[3][2] = 0.0f;
@@ -787,8 +778,7 @@ std::string AnimationExporter::create_4x4_source(std::vector<float> &frames , Ob
mult_m4_m4m4(mat, mat, temp);
- if (bone->parent)
- {
+ if (bone->parent) {
copy_m4_m4(temp, bone->parent->arm_mat);
temp[3][0] = temp[3][1] = temp[3][2] = 0.0f;
@@ -797,7 +787,7 @@ std::string AnimationExporter::create_4x4_source(std::vector<float> &frames , Ob
}
float outmat[4][4];
- converter.mat4_to_dae(outmat,mat);
+ converter.mat4_to_dae(outmat, mat);
source.appendValues(outmat);
@@ -1128,7 +1118,7 @@ bool AnimationExporter::hasAnimations(Scene *sce)
{
Base *base= (Base*) sce->base.first;
- while(base) {
+ while (base) {
Object *ob = base->object;
FCurve *fcu = 0;
@@ -1143,12 +1133,10 @@ bool AnimationExporter::hasAnimations(Scene *sce)
fcu = (FCurve*)(((Camera*)ob ->data)->adt->action->curves.first);
//Check Material Effect parameter animations.
- for (int a = 0; a < ob->totcol; a++)
- {
+ for (int a = 0; a < ob->totcol; a++) {
Material *ma = give_current_material(ob, a+1);
if (!ma) continue;
- if (ma->adt && ma->adt->action)
- {
+ if (ma->adt && ma->adt->action) {
fcu = (FCurve*)ma->adt->action->curves.first;
}
}
@@ -1218,7 +1206,7 @@ void AnimationExporter::sample_and_write_bone_animation(Object *ob_arm, Bone *bo
BLI_snprintf(prefix, sizeof(prefix), "pose.bones[\"%s\"]", bone->name);
- bPoseChannel *pchan = get_pose_channel(ob_arm->pose, bone->name);
+ bPoseChannel *pchan = BKE_pose_channel_find_name(ob_arm->pose, bone->name);
if (!pchan)
return;
//Fill frame array with key frame values framed at \param:transform_type
@@ -1239,7 +1227,7 @@ void AnimationExporter::sample_and_write_bone_animation(Object *ob_arm, Bone *bo
// exit rest position
if (flag & ARM_RESTPOS) {
arm->flag &= ~ARM_RESTPOS;
- where_is_pose(scene, ob_arm);
+ BKE_pose_where_is(scene, ob_arm);
}
//v array will hold all values which will be exported.
if (fra.size()) {
@@ -1269,7 +1257,7 @@ void AnimationExporter::sample_and_write_bone_animation(Object *ob_arm, Bone *bo
// restore restpos
if (flag & ARM_RESTPOS)
arm->flag = flag;
- where_is_pose(scene, ob_arm);
+ BKE_pose_where_is(scene, ob_arm);
}
void AnimationExporter::sample_animation(float *v, std::vector<float> &frames, int type, Bone *bone, Object *ob_arm, bPoseChannel *pchan)
@@ -1277,7 +1265,7 @@ void AnimationExporter::sample_animation(float *v, std::vector<float> &frames, i
bPoseChannel *parchan = NULL;
bPose *pose = ob_arm->pose;
- pchan = get_pose_channel(pose, bone->name);
+ pchan = BKE_pose_channel_find_name(pose, bone->name);
if (!pchan)
return;
@@ -1290,11 +1278,11 @@ void AnimationExporter::sample_animation(float *v, std::vector<float> &frames, i
for (it = frames.begin(); it != frames.end(); it++) {
float mat[4][4], ipar[4][4];
- float ctime = BKE_frame_to_ctime(scene, *it);
+ float ctime = BKE_scene_frame_get_from_ctime(scene, *it);
- BKE_animsys_evaluate_animdata(scene , &ob_arm->id, ob_arm->adt, ctime, ADT_RECALC_ANIM);
- where_is_pose_bone(scene, ob_arm, pchan, ctime, 1);
+ BKE_animsys_evaluate_animdata(scene, &ob_arm->id, ob_arm->adt, ctime, ADT_RECALC_ANIM);
+ BKE_pose_where_is_bone(scene, ob_arm, pchan, ctime, 1);
// compute bone local mat
if (bone->parent) {
diff --git a/source/blender/collada/AnimationExporter.h b/source/blender/collada/AnimationExporter.h
index ba7ec6859cc..1313687db28 100644
--- a/source/blender/collada/AnimationExporter.h
+++ b/source/blender/collada/AnimationExporter.h
@@ -96,7 +96,7 @@ public:
protected:
const ExportSettings *export_settings;
- void dae_animation(Object* ob, FCurve *fcu, char* transformName , bool is_param, Material *ma = NULL);
+ void dae_animation(Object* ob, FCurve *fcu, char* transformName, bool is_param, Material *ma = NULL);
void write_bone_animation_matrix(Object *ob_arm, Bone *bone);
@@ -116,7 +116,7 @@ protected:
// (blend this into dae_bone_animation)
void dae_bone_animation(std::vector<float> &fra, float *v, int tm_type, int axis, std::string ob_name, std::string bone_name);
- void dae_baked_animation(std::vector<float> &fra, Object *ob_arm , Bone *bone);
+ void dae_baked_animation(std::vector<float> &fra, Object *ob_arm, Bone *bone);
float convert_time(float frame);
@@ -125,7 +125,7 @@ protected:
std::string get_semantic_suffix(COLLADASW::InputSemantic::Semantics semantic);
void add_source_parameters(COLLADASW::SourceBase::ParameterNameList& param,
- COLLADASW::InputSemantic::Semantics semantic, bool is_rot, const char *axis , bool transform);
+ COLLADASW::InputSemantic::Semantics semantic, bool is_rot, const char *axis, bool transform);
void get_source_values(BezTriple *bezt, COLLADASW::InputSemantic::Semantics semantic, bool rotation, float *values, int *length);
@@ -139,7 +139,7 @@ protected:
std::string create_xyz_source(float *v, int tot, const std::string& anim_id);
- std::string create_4x4_source(std::vector<float> &frames , Object * ob_arm, Bone *bone , const std::string& anim_id);
+ std::string create_4x4_source(std::vector<float> &frames, Object * ob_arm, Bone *bone, const std::string& anim_id);
std::string create_interpolation_source(FCurve *fcu, const std::string& anim_id, const char *axis_name, bool *has_tangents);
@@ -161,5 +161,5 @@ protected:
char* extract_transform_name(char *rna_path);
- std::string getObjectBoneName ( Object *ob,const FCurve * fcu);
+ std::string getObjectBoneName(Object *ob, const FCurve * fcu);
};
diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp
index e0079fbb8a0..195057817dd 100644
--- a/source/blender/collada/AnimationImporter.cpp
+++ b/source/blender/collada/AnimationImporter.cpp
@@ -138,8 +138,7 @@ void AnimationImporter::animation_to_fcurves(COLLADAFW::AnimationCurve *curve)
bez.ipo = BEZT_IPO_CONST;
//bez.h1 = bez.h2 = HD_AUTO;
}
- else
- {
+ else {
bez.h1 = bez.h2 = HD_AUTO;
bez.ipo = BEZT_IPO_LIN;
}
@@ -207,7 +206,7 @@ void AnimationImporter::add_fcurves_to_object(Object *ob, std::vector<FCurve*>&
if (bone_name) {
/* try to find group */
- grp = action_groups_find_named(act, bone_name);
+ grp = BKE_action_group_find_name(act, bone_name);
/* no matching groups, so add one */
if (grp == NULL) {
@@ -325,7 +324,7 @@ void AnimationImporter::read_node_transform(COLLADAFW::Node *node, Object *ob)
TransformReader::get_node_mat(mat, node, &uid_animated_map, ob);
if (ob) {
copy_m4_m4(ob->obmat, mat);
- object_apply_mat4(ob, ob->obmat, 0, 0);
+ BKE_object_apply_mat4(ob, ob->obmat, 0, 0);
}
}
@@ -362,7 +361,7 @@ virtual void AnimationImporter::change_eul_to_quat(Object *ob, bAction *act)
create_fcurve(3, rna_path)
};
- bPoseChannel *chan = get_pose_channel(ob->pose, grp->name);
+ bPoseChannel *chan = BKE_pose_channel_find_name(ob->pose, grp->name);
float m4[4][4], irest[3][3];
invert_m4_m4(m4, chan->bone->arm_mat);
@@ -424,7 +423,7 @@ virtual void AnimationImporter::change_eul_to_quat(Object *ob, bAction *act)
//sets the rna_path and array index to curve
-void AnimationImporter::modify_fcurve(std::vector<FCurve*>* curves , const char* rna_path , int array_index )
+void AnimationImporter::modify_fcurve(std::vector<FCurve*>* curves, const char* rna_path, int array_index )
{
std::vector<FCurve*>::iterator it;
int i;
@@ -439,7 +438,17 @@ void AnimationImporter::modify_fcurve(std::vector<FCurve*>* curves , const char*
}
}
-void AnimationImporter::find_frames( std::vector<float>* frames , std::vector<FCurve*>* curves)
+void AnimationImporter::unused_fcurve(std::vector<FCurve*>* curves)
+{
+ // when an error happens and we can't actually use curve remove it from unused_curves
+ std::vector<FCurve*>::iterator it;
+ for (it = curves->begin(); it != curves->end(); it++) {
+ FCurve *fcu = *it;
+ unused_curves.erase(std::remove(unused_curves.begin(), unused_curves.end(), fcu), unused_curves.end());
+ }
+}
+
+void AnimationImporter::find_frames( std::vector<float>* frames, std::vector<FCurve*>* curves)
{
std::vector<FCurve*>::iterator iter;
for (iter = curves->begin(); iter != curves->end(); iter++) {
@@ -457,7 +466,7 @@ void AnimationImporter::find_frames( std::vector<float>* frames , std::vector<FC
}
//creates the rna_paths and array indices of fcurves from animations using transformation and bound animation class of each animation.
-void AnimationImporter:: Assign_transform_animations(COLLADAFW::Transformation * transform ,
+void AnimationImporter:: Assign_transform_animations(COLLADAFW::Transformation * transform,
const COLLADAFW::AnimationList::AnimationBinding * binding,
std::vector<FCurve*>* curves, bool is_joint, char * joint_path)
{
@@ -500,6 +509,7 @@ void AnimationImporter:: Assign_transform_animations(COLLADAFW::Transformation *
modify_fcurve(curves, rna_path, -1 );
break;
default:
+ unused_fcurve(curves);
fprintf(stderr, "AnimationClass %d is not supported for %s.\n",
binding->animationClass, loc ? "TRANSLATE" : "SCALE");
}
@@ -535,10 +545,13 @@ void AnimationImporter:: Assign_transform_animations(COLLADAFW::Transformation *
else if (COLLADABU::Math::Vector3::UNIT_Z == axis) {
modify_fcurve(curves, rna_path, 2 );
}
+ else
+ unused_fcurve(curves);
break;
case COLLADAFW::AnimationList::AXISANGLE:
// TODO convert axis-angle to quat? or XYZ?
default:
+ unused_fcurve(curves);
fprintf(stderr, "AnimationClass %d is not supported for ROTATE transformation.\n",
binding->animationClass);
}
@@ -554,9 +567,11 @@ void AnimationImporter:: Assign_transform_animations(COLLADAFW::Transformation *
}
}*/
+ unused_fcurve(curves);
break;
case COLLADAFW::Transformation::SKEW:
case COLLADAFW::Transformation::LOOKAT:
+ unused_fcurve(curves);
fprintf(stderr, "Animation of SKEW and LOOKAT transformations is not supported yet.\n");
break;
}
@@ -564,10 +579,10 @@ void AnimationImporter:: Assign_transform_animations(COLLADAFW::Transformation *
}
//creates the rna_paths and array indices of fcurves from animations using color and bound animation class of each animation.
-void AnimationImporter:: Assign_color_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves ,const char * anim_type)
+void AnimationImporter:: Assign_color_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves, const char * anim_type)
{
char rna_path[100];
- BLI_strncpy(rna_path,anim_type, sizeof(rna_path));
+ BLI_strncpy(rna_path, anim_type, sizeof(rna_path));
const COLLADAFW::AnimationList *animlist = animlist_map[listid];
const COLLADAFW::AnimationList::AnimationBindings& bindings = animlist->getAnimationBindings();
@@ -592,6 +607,7 @@ void AnimationImporter:: Assign_color_animations(const COLLADAFW::UniqueId& list
break;
default:
+ unused_fcurve(&animcurves);
fprintf(stderr, "AnimationClass %d is not supported for %s.\n",
bindings[j].animationClass, "COLOR" );
}
@@ -622,7 +638,7 @@ void AnimationImporter:: Assign_float_animations(const COLLADAFW::UniqueId& list
for (unsigned int j = 0; j < bindings.getCount(); j++) {
animcurves = curve_map[bindings[j].animation];
- BLI_strncpy(rna_path, anim_type , sizeof(rna_path));
+ BLI_strncpy(rna_path, anim_type, sizeof(rna_path));
modify_fcurve(&animcurves, rna_path, 0 );
std::vector<FCurve*>::iterator iter;
//Add the curves of the current animation to the object
@@ -635,7 +651,7 @@ void AnimationImporter:: Assign_float_animations(const COLLADAFW::UniqueId& list
}
-void AnimationImporter::apply_matrix_curves( Object * ob, std::vector<FCurve*>& animcurves, COLLADAFW::Node* root ,COLLADAFW::Node* node,
+void AnimationImporter::apply_matrix_curves( Object * ob, std::vector<FCurve*>& animcurves, COLLADAFW::Node* root, COLLADAFW::Node* node,
COLLADAFW::Transformation * tm )
{
bool is_joint = node->getType() == COLLADAFW::Node::JOINT;
@@ -654,7 +670,7 @@ void AnimationImporter::apply_matrix_curves( Object * ob, std::vector<FCurve*>&
get_joint_rest_mat(irest_dae, root, node);
invert_m4(irest_dae);
- Bone *bone = get_named_bone((bArmature*)ob->data, bone_name);
+ Bone *bone = BKE_armature_find_bone_name((bArmature*)ob->data, bone_name);
if (!bone) {
fprintf(stderr, "cannot find bone \"%s\"\n", bone_name);
return;
@@ -726,7 +742,7 @@ void AnimationImporter::apply_matrix_curves( Object * ob, std::vector<FCurve*>&
calc_joint_parent_mat_rest(par, NULL, root, node);
mult_m4_m4m4(temp, par, matfra);
- // evaluate_joint_world_transform_at_frame(temp, NULL, , node, fra);
+ // evaluate_joint_world_transform_at_frame(temp, NULL, node, fra);
// calc special matrix
mul_serie_m4(mat, irest, temp, irest_dae, rest, NULL, NULL, NULL, NULL);
@@ -768,7 +784,7 @@ void AnimationImporter::apply_matrix_curves( Object * ob, std::vector<FCurve*>&
}
if (is_joint) {
- bPoseChannel *chan = get_pose_channel(ob->pose, bone_name);
+ bPoseChannel *chan = BKE_pose_channel_find_name(ob->pose, bone_name);
chan->rotmode = ROT_MODE_QUAT;
}
else {
@@ -779,27 +795,25 @@ void AnimationImporter::apply_matrix_curves( Object * ob, std::vector<FCurve*>&
}
-void AnimationImporter::translate_Animations ( COLLADAFW::Node * node ,
- std::map<COLLADAFW::UniqueId, COLLADAFW::Node*>& root_map,
- std::map<COLLADAFW::UniqueId, Object*>& object_map,
- std::map<COLLADAFW::UniqueId, const COLLADAFW::Object*> FW_object_map)
+void AnimationImporter::translate_Animations ( COLLADAFW::Node * node,
+ std::map<COLLADAFW::UniqueId, COLLADAFW::Node*>& root_map,
+ std::multimap<COLLADAFW::UniqueId, Object*>& object_map,
+ std::map<COLLADAFW::UniqueId, const COLLADAFW::Object*> FW_object_map)
{
AnimationImporter::AnimMix* animType = get_animation_type(node, FW_object_map );
bool is_joint = node->getType() == COLLADAFW::Node::JOINT;
COLLADAFW::Node *root = root_map.find(node->getUniqueId()) == root_map.end() ? node : root_map[node->getUniqueId()];
- Object *ob = is_joint ? armature_importer->get_armature_for_joint(root) : object_map[node->getUniqueId()];
- if (!ob)
- {
+ Object *ob = is_joint ? armature_importer->get_armature_for_joint(root) : object_map.find(node->getUniqueId())->second;
+ if (!ob) {
fprintf(stderr, "cannot find Object for Node with id=\"%s\"\n", node->getOriginalId().c_str());
return;
}
bAction * act;
- if ( (animType->transform) != 0 )
- {
- const char *bone_name = is_joint ? bc_get_joint_name(node) : NULL;
+ if ( (animType->transform) != 0 ) {
+ /* const char *bone_name = is_joint ? bc_get_joint_name(node) : NULL; */ /* UNUSED */
char joint_path[200];
if ( is_joint )
@@ -837,7 +851,7 @@ void AnimationImporter::translate_Animations ( COLLADAFW::Node * node ,
for (unsigned int j = 0; j < bindings.getCount(); j++) {
animcurves = curve_map[bindings[j].animation];
if ( is_matrix ) {
- apply_matrix_curves(ob, animcurves, root , node, transform );
+ apply_matrix_curves(ob, animcurves, root, node, transform );
}
else {
@@ -867,8 +881,7 @@ void AnimationImporter::translate_Animations ( COLLADAFW::Node * node ,
}
}
- if ((animType->light) != 0)
- {
+ if ((animType->light) != 0) {
Lamp * lamp = (Lamp*) ob->data;
if (!lamp->adt || !lamp->adt->action) act = verify_adt_action((ID*)&lamp->id, 1);
@@ -880,33 +893,29 @@ void AnimationImporter::translate_Animations ( COLLADAFW::Node * node ,
for (unsigned int i = 0; i < nodeLights.getCount(); i++) {
const COLLADAFW::Light *light = (COLLADAFW::Light *) FW_object_map[nodeLights[i]->getInstanciatedObjectId()];
- if ((animType->light & LIGHT_COLOR) != 0)
- {
+ if ((animType->light & LIGHT_COLOR) != 0) {
const COLLADAFW::Color *col = &(light->getColor());
const COLLADAFW::UniqueId& listid = col->getAnimationList();
Assign_color_animations(listid, AnimCurves, "color");
}
- if ((animType->light & LIGHT_FOA) != 0 )
- {
+ if ((animType->light & LIGHT_FOA) != 0 ) {
const COLLADAFW::AnimatableFloat *foa = &(light->getFallOffAngle());
const COLLADAFW::UniqueId& listid = foa->getAnimationList();
- Assign_float_animations( listid ,AnimCurves, "spot_size");
+ Assign_float_animations( listid, AnimCurves, "spot_size");
}
- if ( (animType->light & LIGHT_FOE) != 0 )
- {
+ if ( (animType->light & LIGHT_FOE) != 0 ) {
const COLLADAFW::AnimatableFloat *foe = &(light->getFallOffExponent());
const COLLADAFW::UniqueId& listid = foe->getAnimationList();
- Assign_float_animations( listid ,AnimCurves, "spot_blend");
+ Assign_float_animations( listid, AnimCurves, "spot_blend");
}
}
}
- if ( (animType->camera) != 0)
- {
+ if ( (animType->camera) != 0) {
Camera * camera = (Camera*) ob->data;
if (!camera->adt || !camera->adt->action) act = verify_adt_action((ID*)&camera->id, 1);
@@ -918,32 +927,28 @@ void AnimationImporter::translate_Animations ( COLLADAFW::Node * node ,
for (unsigned int i = 0; i < nodeCameras.getCount(); i++) {
const COLLADAFW::Camera *camera = (COLLADAFW::Camera *) FW_object_map[nodeCameras[i]->getInstanciatedObjectId()];
- if ((animType->camera & CAMERA_XFOV) != 0 )
- {
+ if ((animType->camera & CAMERA_XFOV) != 0 ) {
const COLLADAFW::AnimatableFloat *xfov = &(camera->getXFov());
const COLLADAFW::UniqueId& listid = xfov->getAnimationList();
- Assign_float_animations( listid ,AnimCurves, "lens");
+ Assign_float_animations( listid, AnimCurves, "lens");
}
- else if ((animType->camera & CAMERA_XMAG) != 0 )
- {
+ else if ((animType->camera & CAMERA_XMAG) != 0 ) {
const COLLADAFW::AnimatableFloat *xmag = &(camera->getXMag());
const COLLADAFW::UniqueId& listid = xmag->getAnimationList();
- Assign_float_animations( listid ,AnimCurves, "ortho_scale");
+ Assign_float_animations( listid, AnimCurves, "ortho_scale");
}
- if ((animType->camera & CAMERA_ZFAR) != 0 )
- {
+ if ((animType->camera & CAMERA_ZFAR) != 0 ) {
const COLLADAFW::AnimatableFloat *zfar = &(camera->getFarClippingPlane());
const COLLADAFW::UniqueId& listid = zfar->getAnimationList();
- Assign_float_animations( listid ,AnimCurves, "clip_end");
+ Assign_float_animations( listid, AnimCurves, "clip_end");
}
- if ((animType->camera & CAMERA_ZNEAR) != 0 )
- {
+ if ((animType->camera & CAMERA_ZNEAR) != 0 ) {
const COLLADAFW::AnimatableFloat *znear = &(camera->getNearClippingPlane());
const COLLADAFW::UniqueId& listid = znear->getAnimationList();
- Assign_float_animations( listid ,AnimCurves, "clip_start");
+ Assign_float_animations( listid, AnimCurves, "clip_start");
}
}
@@ -967,25 +972,25 @@ void AnimationImporter::translate_Animations ( COLLADAFW::Node * node ,
if ((animType->material & MATERIAL_SHININESS) != 0) {
const COLLADAFW::FloatOrParam *shin = &(efc->getShininess());
const COLLADAFW::UniqueId& listid = shin->getAnimationList();
- Assign_float_animations( listid, AnimCurves , "specular_hardness" );
+ Assign_float_animations( listid, AnimCurves, "specular_hardness" );
}
if ((animType->material & MATERIAL_IOR) != 0) {
const COLLADAFW::FloatOrParam *ior = &(efc->getIndexOfRefraction());
const COLLADAFW::UniqueId& listid = ior->getAnimationList();
- Assign_float_animations( listid, AnimCurves , "raytrace_transparency.ior" );
+ Assign_float_animations( listid, AnimCurves, "raytrace_transparency.ior" );
}
if ((animType->material & MATERIAL_SPEC_COLOR) != 0) {
const COLLADAFW::ColorOrTexture *cot = &(efc->getSpecular());
const COLLADAFW::UniqueId& listid = cot->getColor().getAnimationList();
- Assign_color_animations( listid, AnimCurves , "specular_color" );
+ Assign_color_animations( listid, AnimCurves, "specular_color" );
}
if ((animType->material & MATERIAL_DIFF_COLOR) != 0) {
const COLLADAFW::ColorOrTexture *cot = &(efc->getDiffuse());
const COLLADAFW::UniqueId& listid = cot->getColor().getAnimationList();
- Assign_color_animations( listid, AnimCurves , "diffuse_color" );
+ Assign_color_animations( listid, AnimCurves, "diffuse_color" );
}
}
}
@@ -1020,7 +1025,7 @@ void AnimationImporter::add_bone_animation_sampled(Object * ob, std::vector<FCur
get_joint_rest_mat(irest_dae, root, node);
invert_m4(irest_dae);
- Bone *bone = get_named_bone((bArmature*)ob->data, bone_name);
+ Bone *bone = BKE_armature_find_bone_name((bArmature*)ob->data, bone_name);
if (!bone) {
fprintf(stderr, "cannot find bone \"%s\"\n", bone_name);
return;
@@ -1090,7 +1095,7 @@ void AnimationImporter::add_bone_animation_sampled(Object * ob, std::vector<FCur
calc_joint_parent_mat_rest(par, NULL, root, node);
mult_m4_m4m4(temp, par, matfra);
- // evaluate_joint_world_transform_at_frame(temp, NULL, , node, fra);
+ // evaluate_joint_world_transform_at_frame(temp, NULL,, node, fra);
// calc special matrix
mul_serie_m4(mat, irest, temp, irest_dae, rest, NULL, NULL, NULL, NULL);
@@ -1118,14 +1123,14 @@ void AnimationImporter::add_bone_animation_sampled(Object * ob, std::vector<FCur
add_bone_fcurve(ob, node, newcu[i]);
}
- bPoseChannel *chan = get_pose_channel(ob->pose, bone_name);
+ bPoseChannel *chan = BKE_pose_channel_find_name(ob->pose, bone_name);
chan->rotmode = ROT_MODE_QUAT;
}
//Check if object is animated by checking if animlist_map holds the animlist_id of node transforms
-AnimationImporter::AnimMix* AnimationImporter::get_animation_type ( const COLLADAFW::Node * node ,
+AnimationImporter::AnimMix* AnimationImporter::get_animation_type ( const COLLADAFW::Node * node,
std::map<COLLADAFW::UniqueId, const COLLADAFW::Object*> FW_object_map)
{
AnimMix *types = new AnimMix();
@@ -1150,9 +1155,9 @@ AnimationImporter::AnimMix* AnimationImporter::get_animation_type ( const COLLAD
for (unsigned int i = 0; i < nodeLights.getCount(); i++) {
const COLLADAFW::Light *light = (COLLADAFW::Light *) FW_object_map[nodeLights[i]->getInstanciatedObjectId()];
- types->light = setAnimType(&(light->getColor()),(types->light), LIGHT_COLOR);
- types->light = setAnimType(&(light->getFallOffAngle()),(types->light), LIGHT_FOA);
- types->light = setAnimType(&(light->getFallOffExponent()),(types->light), LIGHT_FOE);
+ types->light = setAnimType(&(light->getColor()), (types->light), LIGHT_COLOR);
+ types->light = setAnimType(&(light->getFallOffAngle()), (types->light), LIGHT_FOA);
+ types->light = setAnimType(&(light->getFallOffExponent()), (types->light), LIGHT_FOE);
if ( types->light != 0) break;
@@ -1162,16 +1167,14 @@ AnimationImporter::AnimMix* AnimationImporter::get_animation_type ( const COLLAD
for (unsigned int i = 0; i < nodeCameras.getCount(); i++) {
const COLLADAFW::Camera *camera = (COLLADAFW::Camera *) FW_object_map[nodeCameras[i]->getInstanciatedObjectId()];
- if ( camera->getCameraType() == COLLADAFW::Camera::PERSPECTIVE )
- {
- types->camera = setAnimType(&(camera->getXMag()),(types->camera), CAMERA_XFOV);
+ if ( camera->getCameraType() == COLLADAFW::Camera::PERSPECTIVE ) {
+ types->camera = setAnimType(&(camera->getXMag()), (types->camera), CAMERA_XFOV);
}
- else
- {
- types->camera = setAnimType(&(camera->getXMag()),(types->camera), CAMERA_XMAG);
+ else {
+ types->camera = setAnimType(&(camera->getXMag()), (types->camera), CAMERA_XMAG);
}
- types->camera = setAnimType(&(camera->getFarClippingPlane()),(types->camera), CAMERA_ZFAR);
- types->camera = setAnimType(&(camera->getNearClippingPlane()),(types->camera), CAMERA_ZNEAR);
+ types->camera = setAnimType(&(camera->getFarClippingPlane()), (types->camera), CAMERA_ZFAR);
+ types->camera = setAnimType(&(camera->getNearClippingPlane()), (types->camera), CAMERA_ZNEAR);
if ( types->camera != 0) break;
@@ -1187,11 +1190,11 @@ AnimationImporter::AnimMix* AnimationImporter::get_animation_type ( const COLLAD
const COLLADAFW::CommonEffectPointerArray& commonEffects = ef->getCommonEffects();
if (!commonEffects.empty()) {
COLLADAFW::EffectCommon *efc = commonEffects[0];
- types->material = setAnimType(&(efc->getShininess()),(types->material), MATERIAL_SHININESS);
- types->material = setAnimType(&(efc->getSpecular().getColor()),(types->material), MATERIAL_SPEC_COLOR);
- types->material = setAnimType(&(efc->getDiffuse().getColor()),(types->material), MATERIAL_DIFF_COLOR);
- // types->material = setAnimType(&(efc->get()),(types->material), MATERIAL_TRANSPARENCY);
- types->material = setAnimType(&(efc->getIndexOfRefraction()),(types->material), MATERIAL_IOR);
+ types->material = setAnimType(&(efc->getShininess()), (types->material), MATERIAL_SHININESS);
+ types->material = setAnimType(&(efc->getSpecular().getColor()), (types->material), MATERIAL_SPEC_COLOR);
+ types->material = setAnimType(&(efc->getDiffuse().getColor()), (types->material), MATERIAL_DIFF_COLOR);
+ // types->material = setAnimType(&(efc->get()), (types->material), MATERIAL_TRANSPARENCY);
+ types->material = setAnimType(&(efc->getIndexOfRefraction()), (types->material), MATERIAL_IOR);
}
}
}
@@ -1199,7 +1202,7 @@ AnimationImporter::AnimMix* AnimationImporter::get_animation_type ( const COLLAD
return types;
}
-int AnimationImporter::setAnimType ( const COLLADAFW::Animatable * prop , int types, int addition)
+int AnimationImporter::setAnimType ( const COLLADAFW::Animatable * prop, int types, int addition)
{
const COLLADAFW::UniqueId& listid = prop->getAnimationList();
if (animlist_map.find(listid) != animlist_map.end())
@@ -1208,7 +1211,7 @@ int AnimationImporter::setAnimType ( const COLLADAFW::Animatable * prop , int ty
}
// Is not used anymore.
-void AnimationImporter::find_frames_old(std::vector<float> * frames, COLLADAFW::Node * node , COLLADAFW::Transformation::TransformationType tm_type)
+void AnimationImporter::find_frames_old(std::vector<float> * frames, COLLADAFW::Node * node, COLLADAFW::Transformation::TransformationType tm_type)
{
bool is_matrix = tm_type == COLLADAFW::Transformation::MATRIX;
bool is_rotation = tm_type == COLLADAFW::Transformation::ROTATE;
@@ -1293,7 +1296,7 @@ Object *AnimationImporter::translate_animation_OLD(COLLADAFW::Node *node,
// frames at which to sample
std::vector<float> frames;
- find_frames_old(&frames, node , tm_type);
+ find_frames_old(&frames, node, tm_type);
unsigned int i;
@@ -1304,7 +1307,7 @@ Object *AnimationImporter::translate_animation_OLD(COLLADAFW::Node *node,
get_joint_rest_mat(irest_dae, root, node);
invert_m4(irest_dae);
- Bone *bone = get_named_bone((bArmature*)ob->data, bone_name);
+ Bone *bone = BKE_armature_find_bone_name((bArmature*)ob->data, bone_name);
if (!bone) {
fprintf(stderr, "cannot find bone \"%s\"\n", bone_name);
return NULL;
@@ -1410,7 +1413,7 @@ Object *AnimationImporter::translate_animation_OLD(COLLADAFW::Node *node,
calc_joint_parent_mat_rest(par, NULL, root, node);
mult_m4_m4m4(temp, par, matfra);
- // evaluate_joint_world_transform_at_frame(temp, NULL, , node, fra);
+ // evaluate_joint_world_transform_at_frame(temp, NULL,, node, fra);
// calc special matrix
mul_serie_m4(mat, irest, temp, irest_dae, rest, NULL, NULL, NULL, NULL);
@@ -1512,7 +1515,7 @@ Object *AnimationImporter::translate_animation_OLD(COLLADAFW::Node *node,
if (is_rotation || is_matrix) {
if (is_joint) {
- bPoseChannel *chan = get_pose_channel(ob->pose, bone_name);
+ bPoseChannel *chan = BKE_pose_channel_find_name(ob->pose, bone_name);
chan->rotmode = ROT_MODE_QUAT;
}
else {
@@ -1641,7 +1644,7 @@ bool AnimationImporter::evaluate_animation(COLLADAFW::Transformation *tm, float
COLLADABU::Math::Vector3& axis = ((COLLADAFW::Rotate*)tm)->getRotationAxis();
- float ax[3] = {axis[0], axis[1], axis[2]};
+ float ax[3] = {(float)axis[0], (float)axis[1], (float)axis[2]};
float angle = evaluate_fcurve(curves[0], fra);
axis_angle_to_mat4(mat, ax, angle);
@@ -1767,11 +1770,9 @@ bool AnimationImporter::calc_joint_parent_mat_rest(float mat[4][4], float par[4]
Object *AnimationImporter::get_joint_object(COLLADAFW::Node *root, COLLADAFW::Node *node, Object *par_job)
{
if (joint_objects.find(node->getUniqueId()) == joint_objects.end()) {
- Object *job = add_object(scene, OB_EMPTY);
-
- rename_id((ID*)&job->id, (char*)get_joint_name(node));
+ Object *job = bc_add_object(scene, OB_EMPTY, (char*)get_joint_name(node));
- job->lay = object_in_scene(job, scene)->lay = 2;
+ job->lay = BKE_scene_base_find(scene, job)->lay = 2;
mul_v3_fl(job->size, 0.5f);
job->recalc |= OB_RECALC_OB;
@@ -1799,7 +1800,7 @@ Object *AnimationImporter::get_joint_object(COLLADAFW::Node *root, COLLADAFW::No
job->parsubstr[0] = 0;
}
- where_is_object(scene, job);
+ BKE_object_where_is_calc(scene, job);
// after parenting and layer change
DAG_scene_sort(CTX_data_main(C), scene);
@@ -1848,7 +1849,7 @@ void AnimationImporter::add_bone_fcurve(Object *ob, COLLADAFW::Node *node, FCurv
bAction *act = ob->adt->action;
/* try to find group */
- bActionGroup *grp = action_groups_find_named(act, bone_name);
+ bActionGroup *grp = BKE_action_group_find_name(act, bone_name);
/* no matching groups, so add one */
if (grp == NULL) {
diff --git a/source/blender/collada/AnimationImporter.h b/source/blender/collada/AnimationImporter.h
index e42a1cc7a55..6324853d91c 100644
--- a/source/blender/collada/AnimationImporter.h
+++ b/source/blender/collada/AnimationImporter.h
@@ -15,7 +15,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * Contributor(s): Chingiz Dyussenov, Arystanbek Dyussenov, Nathan Letwory , Sukhitha Jayathilake.
+ * Contributor(s): Chingiz Dyussenov, Arystanbek Dyussenov, Nathan Letwory, Sukhitha Jayathilake.
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -143,38 +143,39 @@ public:
virtual void change_eul_to_quat(Object *ob, bAction *act);
#endif
- void translate_Animations( COLLADAFW::Node * Node ,
- std::map<COLLADAFW::UniqueId, COLLADAFW::Node*>& root_map,
- std::map<COLLADAFW::UniqueId, Object*>& object_map ,
- std::map<COLLADAFW::UniqueId, const COLLADAFW::Object*> FW_object_map);
+ void translate_Animations(COLLADAFW::Node * Node,
+ std::map<COLLADAFW::UniqueId, COLLADAFW::Node*>& root_map,
+ std::multimap<COLLADAFW::UniqueId, Object*>& object_map,
+ std::map<COLLADAFW::UniqueId, const COLLADAFW::Object*> FW_object_map);
- AnimMix* get_animation_type( const COLLADAFW::Node * node , std::map<COLLADAFW::UniqueId,const COLLADAFW::Object*> FW_object_map );
+ AnimMix* get_animation_type( const COLLADAFW::Node * node, std::map<COLLADAFW::UniqueId, const COLLADAFW::Object*> FW_object_map );
- void apply_matrix_curves( Object * ob, std::vector<FCurve*>& animcurves, COLLADAFW::Node* root ,COLLADAFW::Node* node,
- COLLADAFW::Transformation * tm );
-
- void add_bone_animation_sampled(Object * ob, std::vector<FCurve*>& animcurves, COLLADAFW::Node* root ,COLLADAFW::Node* node, COLLADAFW::Transformation * tm);
+ void apply_matrix_curves(Object * ob, std::vector<FCurve*>& animcurves, COLLADAFW::Node* root, COLLADAFW::Node* node,
+ COLLADAFW::Transformation * tm );
+
+ void add_bone_animation_sampled(Object * ob, std::vector<FCurve*>& animcurves, COLLADAFW::Node* root, COLLADAFW::Node* node, COLLADAFW::Transformation * tm);
- void Assign_transform_animations(COLLADAFW::Transformation* transform ,
- const COLLADAFW::AnimationList::AnimationBinding * binding,
- std::vector<FCurve*>* curves, bool is_joint, char * joint_path);
+ void Assign_transform_animations(COLLADAFW::Transformation* transform,
+ const COLLADAFW::AnimationList::AnimationBinding * binding,
+ std::vector<FCurve*>* curves, bool is_joint, char * joint_path);
void Assign_color_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves, const char * anim_type);
void Assign_float_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves, const char * anim_type);
- int setAnimType ( const COLLADAFW::Animatable * prop , int type, int addition);
+ int setAnimType ( const COLLADAFW::Animatable * prop, int type, int addition);
- void modify_fcurve(std::vector<FCurve*>* curves , const char* rna_path , int array_index );
+ void modify_fcurve(std::vector<FCurve*>* curves, const char* rna_path, int array_index );
+ void unused_fcurve(std::vector<FCurve*>* curves );
// 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,
- COLLADAFW::Transformation::TransformationType tm_type,
- Object *par_job = NULL);
+ std::map<COLLADAFW::UniqueId, Object*>& object_map,
+ std::map<COLLADAFW::UniqueId, COLLADAFW::Node*>& root_map,
+ COLLADAFW::Transformation::TransformationType tm_type,
+ Object *par_job = NULL);
- void find_frames( std::vector<float>* frames , std::vector<FCurve*>* curves );
+ void find_frames( std::vector<float>* frames, std::vector<FCurve*>* curves );
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
diff --git a/source/blender/collada/ArmatureExporter.cpp b/source/blender/collada/ArmatureExporter.cpp
index 743d3c2a158..38a5e9b5df4 100644
--- a/source/blender/collada/ArmatureExporter.cpp
+++ b/source/blender/collada/ArmatureExporter.cpp
@@ -127,7 +127,7 @@ void ArmatureExporter::find_objects_using_armature(Object *ob_arm, std::vector<O
objects.clear();
Base *base= (Base*) sce->base.first;
- while(base) {
+ while (base) {
Object *ob = base->object;
if (ob->type == OB_MESH && get_assigned_armature(ob) == ob_arm) {
@@ -191,10 +191,8 @@ void ArmatureExporter::add_bone_node(Bone *bone, Object *ob_arm, Scene* sce,
// Write nodes of childobjects, remove written objects from list
std::list<Object*>::iterator i = child_objects.begin();
- while( i != child_objects.end() )
- {
- if ((*i)->partype == PARBONE && (0 == strcmp((*i)->parsubstr, bone->name)))
- {
+ while (i != child_objects.end()) {
+ if ((*i)->partype == PARBONE && (0 == strcmp((*i)->parsubstr, bone->name))) {
float backup_parinv[4][4];
copy_m4_m4(backup_parinv, (*i)->parentinv);
@@ -210,8 +208,7 @@ void ArmatureExporter::add_bone_node(Bone *bone, Object *ob_arm, Scene* sce,
// TODO: when such objects are animated as
// single matrix the tweak must be applied
// to the result.
- if (export_settings->second_life)
- {
+ if (export_settings->second_life) {
// tweak objects parentinverse to match compatibility
float temp[4][4];
@@ -254,13 +251,13 @@ void ArmatureExporter::add_bone_node(Bone *bone, Object *ob_arm, Scene* sce,
}*/
void ArmatureExporter::add_bone_transform(Object *ob_arm, Bone *bone, COLLADASW::Node& node)
{
- bPoseChannel *pchan = get_pose_channel(ob_arm->pose, bone->name);
+ bPoseChannel *pchan = BKE_pose_channel_find_name(ob_arm->pose, bone->name);
float mat[4][4];
if (bone->parent) {
// get bone-space matrix from armature-space
- bPoseChannel *parchan = get_pose_channel(ob_arm->pose, bone->parent->name);
+ bPoseChannel *parchan = BKE_pose_channel_find_name(ob_arm->pose, bone->parent->name);
float invpar[4][4];
invert_m4_m4(invpar, parchan->pose_mat);
@@ -274,8 +271,7 @@ void ArmatureExporter::add_bone_transform(Object *ob_arm, Bone *bone, COLLADASW:
}
// SECOND_LIFE_COMPATIBILITY
- if (export_settings->second_life)
- {
+ if (export_settings->second_life) {
// Remove rotations vs armature from transform
// parent_rest_rot * mat * irest_rot
float temp[4][4];
@@ -285,8 +281,7 @@ void ArmatureExporter::add_bone_transform(Object *ob_arm, Bone *bone, COLLADASW:
mult_m4_m4m4(mat, mat, temp);
- if (bone->parent)
- {
+ if (bone->parent) {
copy_m4_m4(temp, bone->parent->arm_mat);
temp[3][0] = temp[3][1] = temp[3][2] = 0.0f;
@@ -294,7 +289,7 @@ void ArmatureExporter::add_bone_transform(Object *ob_arm, Bone *bone, COLLADASW:
}
}
- TransformWriter::add_node_transform(node, mat,NULL );
+ TransformWriter::add_node_transform(node, mat, NULL);
}
std::string ArmatureExporter::get_controller_id(Object *ob_arm, Object *ob)
@@ -370,25 +365,21 @@ void ArmatureExporter::export_controller(Object* ob, Object *ob_arm)
for (j = 0; j < vert->totweight; j++) {
int joint_index = joint_index_by_def_index[vert->dw[j].def_nr];
- if (joint_index != -1 && vert->dw[j].weight > 0.0f)
- {
+ if (joint_index != -1 && vert->dw[j].weight > 0.0f) {
jw[joint_index] += vert->dw[j].weight;
sumw += vert->dw[j].weight;
}
}
- if (sumw > 0.0f)
- {
+ if (sumw > 0.0f) {
float invsumw = 1.0f/sumw;
vcounts.push_back(jw.size());
- for (std::map<int, float>::iterator m = jw.begin(); m != jw.end(); ++m)
- {
+ for (std::map<int, float>::iterator m = jw.begin(); m != jw.end(); ++m) {
joints.push_back((*m).first);
weights.push_back(invsumw*(*m).second);
}
}
- else
- {
+ else {
vcounts.push_back(0);
/*vcounts.push_back(1);
joints.push_back(-1);
@@ -490,28 +481,26 @@ std::string ArmatureExporter::add_inv_bind_mats_source(Object *ob_arm, ListBase
// put armature in rest position
if (!(arm->flag & ARM_RESTPOS)) {
arm->flag |= ARM_RESTPOS;
- where_is_pose(scene, ob_arm);
+ BKE_pose_where_is(scene, ob_arm);
}
for (bDeformGroup *def = (bDeformGroup*)defbase->first; def; def = def->next) {
if (is_bone_defgroup(ob_arm, def)) {
- bPoseChannel *pchan = get_pose_channel(pose, def->name);
+ bPoseChannel *pchan = BKE_pose_channel_find_name(pose, def->name);
float mat[4][4];
float world[4][4];
float inv_bind_mat[4][4];
// SECOND_LIFE_COMPATIBILITY
- if (export_settings->second_life)
- {
+ if (export_settings->second_life) {
// Only translations, no rotation vs armature
float temp[4][4];
unit_m4(temp);
copy_v3_v3(temp[3], pchan->bone->arm_mat[3]);
mult_m4_m4m4(world, ob_arm->obmat, temp);
}
- else
- {
+ else {
// make world-space matrix, arm_mat is armature-space
mult_m4_m4m4(world, ob_arm->obmat, pchan->bone->arm_mat);
}
@@ -526,7 +515,7 @@ std::string ArmatureExporter::add_inv_bind_mats_source(Object *ob_arm, ListBase
// back from rest positon
if (!(flag & ARM_RESTPOS)) {
arm->flag = flag;
- where_is_pose(scene, ob_arm);
+ BKE_pose_where_is(scene, ob_arm);
}
source.finish();
@@ -536,7 +525,7 @@ std::string ArmatureExporter::add_inv_bind_mats_source(Object *ob_arm, ListBase
Bone *ArmatureExporter::get_bone_from_defgroup(Object *ob_arm, bDeformGroup* def)
{
- bPoseChannel *pchan = get_pose_channel(ob_arm->pose, def->name);
+ bPoseChannel *pchan = BKE_pose_channel_find_name(ob_arm->pose, def->name);
return pchan ? pchan->bone : NULL;
}
@@ -597,8 +586,7 @@ void ArmatureExporter::add_vertex_weights_element(const std::string& weights_sou
// write deformer index - weight index pairs
int weight_index = 0;
- for (std::list<int>::const_iterator i = joints.begin(); i != joints.end(); ++i)
- {
+ for (std::list<int>::const_iterator i = joints.begin(); i != joints.end(); ++i) {
weightselem.appendValues(*i, weight_index++);
}
diff --git a/source/blender/collada/ArmatureImporter.cpp b/source/blender/collada/ArmatureImporter.cpp
index a978a4757a7..97de7590d07 100644
--- a/source/blender/collada/ArmatureImporter.cpp
+++ b/source/blender/collada/ArmatureImporter.cpp
@@ -81,7 +81,7 @@ void ArmatureImporter::create_unskinned_bone( COLLADAFW::Node *node, EditBone *p
float parent_mat[][4], Object * ob_arm)
{
std::vector<COLLADAFW::Node*>::iterator it;
- it = std::find(finished_joints.begin(),finished_joints.end(),node);
+ it = std::find(finished_joints.begin(), finished_joints.end(), node);
if ( it != finished_joints.end()) return;
float mat[4][4];
@@ -159,7 +159,7 @@ void ArmatureImporter::create_bone(SkinInfo& skin, COLLADAFW::Node *node, EditBo
{
//Checking if bone is already made.
std::vector<COLLADAFW::Node*>::iterator it;
- it = std::find(finished_joints.begin(),finished_joints.end(),node);
+ it = std::find(finished_joints.begin(), finished_joints.end(), node);
if ( it != finished_joints.end()) return;
float joint_inv_bind_mat[4][4];
@@ -189,7 +189,7 @@ void ArmatureImporter::create_bone(SkinInfo& skin, COLLADAFW::Node *node, EditBo
else
copy_m4_m4(mat, obmat);
- float loc[3], size[3], rot[3][3] , angle;
+ float loc[3], size[3], rot[3][3], angle;
mat4_to_loc_rot_size( loc, rot, size, obmat);
mat3_to_vec_roll(rot, NULL, &angle );
bone->roll=angle;
@@ -261,7 +261,7 @@ void ArmatureImporter::create_bone(SkinInfo& skin, COLLADAFW::Node *node, EditBo
// in second case it's not a leaf bone, but we handle it the same way
if (!children.getCount() || children.getCount() > 1) {
- add_leaf_bone(mat, bone , node);
+ add_leaf_bone(mat, bone, node);
}
finished_joints.push_back(node);
@@ -278,16 +278,15 @@ void ArmatureImporter::add_leaf_bone(float mat[][4], EditBone *bone, COLLADAFW:
TagsMap::iterator etit;
ExtraTags *et = 0;
etit = uid_tags_map.find(node->getUniqueId().toAscii());
- if (etit != uid_tags_map.end())
- {
+ if (etit != uid_tags_map.end()) {
et = etit->second;
//else return;
- float x,y,z;
- et->setData("tip_x",&x);
- et->setData("tip_y",&y);
- et->setData("tip_z",&z);
- float vec[3] = {x,y,z};
+ float x, y, z;
+ et->setData("tip_x", &x);
+ et->setData("tip_y", &y);
+ et->setData("tip_z", &z);
+ float vec[3] = {x, y, z};
copy_v3_v3(leaf.bone->tail, leaf.bone->head);
add_v3_v3v3(leaf.bone->tail, leaf.bone->head, vec);
}else
@@ -322,7 +321,7 @@ void ArmatureImporter::set_leaf_bone_shapes(Object *ob_arm)
for (it = leaf_bones.begin(); it != leaf_bones.end(); it++) {
LeafBone& leaf = *it;
- bPoseChannel *pchan = get_pose_channel(pose, leaf.name);
+ bPoseChannel *pchan = BKE_pose_channel_find_name(pose, leaf.name);
if (pchan) {
pchan->custom = get_empty_for_leaves();
}
@@ -368,7 +367,7 @@ Object *ArmatureImporter::get_empty_for_leaves()
{
if (empty) return empty;
- empty = add_object(scene, OB_EMPTY);
+ empty = bc_add_object(scene, OB_EMPTY, NULL);
empty->empty_drawtype = OB_EMPTY_SPHERE;
return empty;
@@ -413,7 +412,7 @@ void ArmatureImporter::create_armature_bones( )
if ( get_armature_for_joint(*ri) != NULL ) continue;
//add armature object for current joint
- //Object *ob_arm = add_object(scene, OB_ARMATURE);
+ //Object *ob_arm = bc_add_object(scene, OB_ARMATURE, NULL);
Object *ob_arm = joint_parent_map[(*ri)->getUniqueId()];
@@ -441,7 +440,7 @@ void ArmatureImporter::create_armature_bones( )
ED_armature_from_edit(ob_arm);
- set_pose(ob_arm , *ri, NULL, NULL );
+ set_pose(ob_arm, *ri, NULL, NULL );
ED_armature_edit_free(ob_arm);
DAG_id_tag_update(&ob_arm->id, OB_RECALC_OB|OB_RECALC_DATA);
@@ -500,7 +499,7 @@ void ArmatureImporter::create_armature_bones(SkinInfo& skin)
std::map<COLLADAFW::UniqueId, SkinInfo>::iterator it;
for (it = skin_by_data_uid.begin(); it != skin_by_data_uid.end(); it++) {
SkinInfo *b = &it->second;
- if (b == a || b->get_armature() == NULL)
+ if (b == a || b->BKE_armature_from_object() == NULL)
continue;
skin_root_joints.clear();
@@ -510,7 +509,7 @@ void ArmatureImporter::create_armature_bones(SkinInfo& skin)
std::vector<COLLADAFW::Node*>::iterator ri;
for (ri = skin_root_joints.begin(); ri != skin_root_joints.end(); ri++) {
if (a->uses_joint_or_descendant(*ri)) {
- shared = b->get_armature();
+ shared = b->BKE_armature_from_object();
break;
}
}
@@ -570,7 +569,7 @@ void ArmatureImporter::create_armature_bones(SkinInfo& skin)
// is a child of a node (not joint), root should be true since
// this is where we build armature bones from
-void ArmatureImporter::set_pose ( Object * ob_arm , COLLADAFW::Node * root_node , const char *parentname, float parent_mat[][4])
+void ArmatureImporter::set_pose(Object * ob_arm, COLLADAFW::Node * root_node, const char *parentname, float parent_mat[][4])
{
char * bone_name = (char *) bc_get_joint_name ( root_node);
float mat[4][4];
@@ -583,13 +582,13 @@ void ArmatureImporter::set_pose ( Object * ob_arm , COLLADAFW::Node * root_node
get_node_mat(obmat, root_node, NULL, NULL);
//if (*edbone)
- bPoseChannel * pchan = get_pose_channel(ob_arm -> pose , bone_name);
+ bPoseChannel * pchan = BKE_pose_channel_find_name(ob_arm -> pose, bone_name);
//else fprintf ( "",
// get world-space
if (parentname) {
mult_m4_m4m4(mat, parent_mat, obmat);
- bPoseChannel *parchan = get_pose_channel(ob_arm->pose, parentname);
+ bPoseChannel *parchan = BKE_pose_channel_find_name(ob_arm->pose, parentname);
mult_m4_m4m4(pchan->pose_mat, parchan->pose_mat, mat );
@@ -601,7 +600,7 @@ void ArmatureImporter::set_pose ( Object * ob_arm , COLLADAFW::Node * root_node
mult_m4_m4m4(pchan->pose_mat, invObmat, mat);
}
- mat4_to_axis_angle(ax,&angle,mat);
+ mat4_to_axis_angle(ax, &angle, mat);
pchan->bone->roll = angle;
@@ -661,7 +660,7 @@ void ArmatureImporter::make_armatures(bContext *C)
// set armature parent if any
Object *par = skin.get_parent();
if (par)
- bc_set_parent(skin.get_armature(), par, C, false);
+ bc_set_parent(skin.BKE_armature_from_object(), par, C, false);
// free memory stolen from SkinControllerData
skin.free();
@@ -762,7 +761,7 @@ Object *ArmatureImporter::get_armature_for_joint(COLLADAFW::Node *node)
SkinInfo& skin = it->second;
if (skin.uses_joint_or_descendant(node))
- return skin.get_armature();
+ return skin.BKE_armature_from_object();
}
std::map<COLLADAFW::UniqueId, Object*>::iterator arm;
diff --git a/source/blender/collada/ArmatureImporter.h b/source/blender/collada/ArmatureImporter.h
index 0c95ee81272..eead45353af 100644
--- a/source/blender/collada/ArmatureImporter.h
+++ b/source/blender/collada/ArmatureImporter.h
@@ -113,7 +113,7 @@ private:
void fix_leaf_bones();
- void set_pose ( Object * ob_arm , COLLADAFW::Node * root_node , const char *parentname, float parent_mat[][4]);
+ void set_pose ( Object * ob_arm, COLLADAFW::Node * root_node, const char *parentname, float parent_mat[][4]);
#if 0
diff --git a/source/blender/collada/CameraExporter.cpp b/source/blender/collada/CameraExporter.cpp
index fcb98cc7c32..ce46c681c8c 100644
--- a/source/blender/collada/CameraExporter.cpp
+++ b/source/blender/collada/CameraExporter.cpp
@@ -42,15 +42,14 @@ CamerasExporter::CamerasExporter(COLLADASW::StreamWriter *sw, const ExportSettin
template<class Functor>
void forEachCameraObjectInScene(Scene *sce, Functor &f, bool export_selected)
{
- Base *base= (Base*) sce->base.first;
- while(base) {
+ Base *base = (Base*) sce->base.first;
+ while (base) {
Object *ob = base->object;
-
- if (ob->type == OB_CAMERA && ob->data
- && !(export_selected && !(ob->flag & SELECT))) {
+
+ if (ob->type == OB_CAMERA && ob->data && !(export_selected && !(ob->flag & SELECT))) {
f(ob, sce);
}
- base= base->next;
+ base = base->next;
}
}
@@ -68,23 +67,29 @@ void CamerasExporter::operator()(Object *ob, Scene *sce)
Camera *cam = (Camera*)ob->data;
std::string cam_id(get_camera_id(ob));
std::string cam_name(id_name(cam));
-
- if (cam->type == CAM_PERSP) {
+
+ switch (cam->type) {
+ case CAM_PANO:
+ case CAM_PERSP: {
COLLADASW::PerspectiveOptic persp(mSW);
persp.setXFov(RAD2DEGF(focallength_to_fov(cam->lens, cam->sensor_x)), "xfov");
- persp.setAspectRatio((float)(sce->r.xsch)/(float)(sce->r.ysch),false,"aspect_ratio");
- persp.setZFar(cam->clipend, false , "zfar");
- persp.setZNear(cam->clipsta,false , "znear");
+ persp.setAspectRatio((float)(sce->r.xsch)/(float)(sce->r.ysch), false, "aspect_ratio");
+ persp.setZFar(cam->clipend, false, "zfar");
+ persp.setZNear(cam->clipsta, false, "znear");
COLLADASW::Camera ccam(mSW, &persp, cam_id, cam_name);
addCamera(ccam);
+ break;
}
- else {
+ case CAM_ORTHO:
+ default:
+ {
COLLADASW::OrthographicOptic ortho(mSW);
- ortho.setXMag(cam->ortho_scale,"xmag");
- ortho.setAspectRatio((float)(sce->r.xsch)/(float)(sce->r.ysch),false,"aspect_ratio");
- ortho.setZFar(cam->clipend , false , "zfar");
- ortho.setZNear(cam->clipsta, false , "znear");
+ ortho.setXMag(cam->ortho_scale, "xmag");
+ ortho.setAspectRatio((float)(sce->r.xsch)/(float)(sce->r.ysch), false, "aspect_ratio");
+ ortho.setZFar(cam->clipend, false, "zfar");
+ ortho.setZNear(cam->clipsta, false, "znear");
COLLADASW::Camera ccam(mSW, &ortho, cam_id, cam_name);
addCamera(ccam);
- }
-}
+ break;
+ }}
+}
diff --git a/source/blender/collada/DocumentExporter.cpp b/source/blender/collada/DocumentExporter.cpp
index 52261346acb..19fc30a2790 100644
--- a/source/blender/collada/DocumentExporter.cpp
+++ b/source/blender/collada/DocumentExporter.cpp
@@ -175,7 +175,7 @@ void DocumentExporter::exportCurrentScene(Scene *sce)
std::string unitname = "meter";
float linearmeasure = RNA_float_get(&unit_settings, "scale_length");
- switch(RNA_property_enum_get(&unit_settings, system)) {
+ switch (RNA_property_enum_get(&unit_settings, system)) {
case USER_UNIT_NONE:
case USER_UNIT_METRIC:
if (linearmeasure == 0.001f) {
diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp
index bc0606107ab..6dca7828cc2 100644
--- a/source/blender/collada/DocumentImporter.cpp
+++ b/source/blender/collada/DocumentImporter.cpp
@@ -106,7 +106,7 @@ DocumentImporter::~DocumentImporter()
{
TagsMap::iterator etit;
etit = uid_tags_map.begin();
- while(etit!=uid_tags_map.end()) {
+ while (etit!=uid_tags_map.end()) {
delete etit->second;
etit++;
}
@@ -121,6 +121,9 @@ bool DocumentImporter::import()
loader.registerExtraDataCallbackHandler(ehandler);
+ // deselect all to select new objects
+ BKE_scene_base_deselect_all(CTX_data_scene(mContext));
+
if (!root.loadDocument(mFilename)) {
fprintf(stderr, "COLLADAFW::Root::loadDocument() returned false on 1st pass\n");
return false;
@@ -144,6 +147,8 @@ bool DocumentImporter::import()
delete ehandler;
+ mesh_importer.bmeshConversion();
+
return true;
}
@@ -157,7 +162,9 @@ void DocumentImporter::cancel(const COLLADAFW::String& errorMessage)
// The latter sounds better.
}
-void DocumentImporter::start() {}
+void DocumentImporter::start()
+{
+}
void DocumentImporter::finish()
{
@@ -178,7 +185,7 @@ void DocumentImporter::finish()
system = RNA_struct_find_property(&unit_settings, "system");
scale = RNA_struct_find_property(&unit_settings, "scale_length");
- switch(unit_converter.isMetricSystem()) {
+ switch (unit_converter.isMetricSystem()) {
case UnitConverter::Metric:
RNA_property_enum_set(&unit_settings, system, USER_UNIT_METRIC);
break;
@@ -208,7 +215,7 @@ void DocumentImporter::finish()
const COLLADAFW::NodePointerArray& roots = (*it)->getRootNodes();
for (unsigned int i = 0; i < roots.getCount(); i++)
- translate_anim_recursive(roots[i],NULL,NULL);
+ translate_anim_recursive(roots[i], NULL, NULL);
}
if (libnode_ob.size()) {
@@ -220,10 +227,10 @@ void DocumentImporter::finish()
for (it = libnode_ob.begin(); it != libnode_ob.end(); it++) {
Object *ob = *it;
- Base *base = object_in_scene(ob, sce);
+ Base *base = BKE_scene_base_find(sce, ob);
if (base) {
BLI_remlink(&sce->base, base);
- free_libblock_us(&G.main->object, base->object);
+ BKE_libblock_free_us(&G.main->object, base->object);
if (sce->basact==base)
sce->basact= NULL;
MEM_freeN(base);
@@ -298,13 +305,14 @@ Object* DocumentImporter::create_camera_object(COLLADAFW::InstanceCamera *camera
fprintf(stderr, "Couldn't find camera by UID.\n");
return NULL;
}
- Object *ob = add_object(sce, OB_CAMERA);
+
+ Object *ob = bc_add_object(sce, OB_CAMERA, NULL);
Camera *cam = uid_camera_map[cam_uid];
Camera *old_cam = (Camera*)ob->data;
ob->data = cam;
old_cam->id.us--;
if (old_cam->id.us == 0)
- free_libblock(&G.main->camera, old_cam);
+ BKE_libblock_free(&G.main->camera, old_cam);
return ob;
}
@@ -315,13 +323,14 @@ Object* DocumentImporter::create_lamp_object(COLLADAFW::InstanceLight *lamp, Sce
fprintf(stderr, "Couldn't find lamp by UID.\n");
return NULL;
}
- Object *ob = add_object(sce, OB_LAMP);
+
+ Object *ob = bc_add_object(sce, OB_LAMP, NULL);
Lamp *la = uid_lamp_map[lamp_uid];
Lamp *old_lamp = (Lamp*)ob->data;
ob->data = la;
old_lamp->id.us--;
if (old_lamp->id.us == 0)
- free_libblock(&G.main->lamp, old_lamp);
+ BKE_libblock_free(&G.main->lamp, old_lamp);
return ob;
}
@@ -329,9 +338,9 @@ Object* DocumentImporter::create_instance_node(Object *source_ob, COLLADAFW::Nod
{
fprintf(stderr, "create <instance_node> under node id=%s from node id=%s\n", instance_node ? instance_node->getOriginalId().c_str() : NULL, source_node ? source_node->getOriginalId().c_str() : NULL);
- Object *obn = copy_object(source_ob);
+ Object *obn = BKE_object_copy(source_ob);
obn->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
- scene_add_base(sce, obn);
+ BKE_scene_base_add(sce, obn);
if (instance_node) {
anim_importer.read_node_transform(instance_node, obn);
@@ -350,7 +359,7 @@ Object* DocumentImporter::create_instance_node(Object *source_ob, COLLADAFW::Nod
}
// calc new matrix and apply
mult_m4_m4m4(obn->obmat, obn->obmat, mat);
- object_apply_mat4(obn, obn->obmat, 0, 0);
+ BKE_object_apply_mat4(obn, obn->obmat, 0, 0);
}
}
else {
@@ -371,10 +380,11 @@ Object* DocumentImporter::create_instance_node(Object *source_ob, COLLADAFW::Nod
Object *new_child = NULL;
if (inodes.getCount()) { // \todo loop through instance nodes
const COLLADAFW::UniqueId& id = inodes[0]->getInstanciatedObjectId();
- new_child = create_instance_node(object_map[id], node_map[id], child_node, sce, is_library_node);
+ fprintf(stderr, "Doing %d child nodes\n", node_map.count(id));
+ new_child = create_instance_node(object_map.find(id)->second, node_map[id], child_node, sce, is_library_node);
}
else {
- new_child = create_instance_node(object_map[child_id], child_node, NULL, sce, is_library_node);
+ new_child = create_instance_node(object_map.find(child_id)->second, child_node, NULL, sce, is_library_node);
}
bc_set_parent(new_child, obn, mContext, true);
@@ -392,13 +402,15 @@ void DocumentImporter::write_node (COLLADAFW::Node *node, COLLADAFW::Node *paren
bool is_joint = node->getType() == COLLADAFW::Node::JOINT;
bool read_transform = true;
+ std::vector<Object*> * objects_done = new std::vector<Object *>();
+
if (is_joint) {
if ( par ) {
Object * empty = par;
- par = add_object(sce, OB_ARMATURE);
- bc_set_parent(par,empty->parent, mContext);
+ par = bc_add_object(sce, OB_ARMATURE, NULL);
+ bc_set_parent(par, empty->parent, mContext);
//remove empty : todo
- object_map[parent_node->getUniqueId()] = par;
+ object_map.insert(std::make_pair<COLLADAFW::UniqueId, Object *>(parent_node->getUniqueId(), par));
}
armature_importer.add_joint(node, parent_node == NULL || parent_node->getType() != COLLADAFW::Node::JOINT, par, sce);
}
@@ -420,19 +432,23 @@ void DocumentImporter::write_node (COLLADAFW::Node *node, COLLADAFW::Node *paren
while (geom_done < geom.getCount()) {
ob = mesh_importer.create_mesh_object(node, geom[geom_done], false, uid_material_map,
material_texture_mapping_map);
+ objects_done->push_back(ob);
++geom_done;
}
while (camera_done < camera.getCount()) {
ob = create_camera_object(camera[camera_done], sce);
+ objects_done->push_back(ob);
++camera_done;
}
while (lamp_done < lamp.getCount()) {
ob = create_lamp_object(lamp[lamp_done], sce);
+ objects_done->push_back(ob);
++lamp_done;
}
while (controller_done < controller.getCount()) {
COLLADAFW::InstanceGeometry *geom = (COLLADAFW::InstanceGeometry*)controller[controller_done];
ob = mesh_importer.create_mesh_object(node, geom, true, uid_material_map, material_texture_mapping_map);
+ objects_done->push_back(ob);
++controller_done;
}
// XXX instance_node is not supported yet
@@ -443,11 +459,14 @@ void DocumentImporter::write_node (COLLADAFW::Node *node, COLLADAFW::Node *paren
ob = NULL;
}
else {
- Object *source_ob = object_map[node_id];
- COLLADAFW::Node *source_node = node_map[node_id];
-
- ob = create_instance_node(source_ob, source_node, node, sce, is_library_node);
+ std::pair<std::multimap<COLLADAFW::UniqueId, Object *>::iterator, std::multimap<COLLADAFW::UniqueId, Object *>::iterator> pair_iter = object_map.equal_range(node_id);
+ for (std::multimap<COLLADAFW::UniqueId, Object *>::iterator it2 = pair_iter.first; it2 != pair_iter.second; it2++) {
+ Object *source_ob = (Object *)it2->second;
+ COLLADAFW::Node *source_node = node_map[node_id];
+ ob = create_instance_node(source_ob, source_node, node, sce, is_library_node);
+ }
}
+ if (ob != NULL) objects_done->push_back(ob);
++inst_done;
read_transform = false;
@@ -455,32 +474,38 @@ void DocumentImporter::write_node (COLLADAFW::Node *node, COLLADAFW::Node *paren
// if node is empty - create empty object
// XXX empty node may not mean it is empty object, not sure about this
if ( (geom_done + camera_done + lamp_done + controller_done + inst_done) < 1) {
- ob = add_object(sce, OB_EMPTY);
+ ob = bc_add_object(sce, OB_EMPTY, NULL);
+ objects_done->push_back(ob);
}
// XXX: if there're multiple instances, only one is stored
if (!ob) return;
-
- std::string nodename = node->getName().size() ? node->getName() : node->getOriginalId();
- rename_id(&ob->id, (char*)nodename.c_str());
+ for (std::vector<Object *>::iterator it = objects_done->begin(); it != objects_done->end(); ++it) {
+ ob = *it;
+ std::string nodename = node->getName().size() ? node->getName() : node->getOriginalId();
+ rename_id(&ob->id, (char*)nodename.c_str());
+ object_map.insert(std::make_pair<COLLADAFW::UniqueId, Object *>(node->getUniqueId(), ob));
+ node_map[node->getUniqueId()] = node;
- object_map[node->getUniqueId()] = ob;
- node_map[node->getUniqueId()] = node;
+ if (is_library_node)
+ libnode_ob.push_back(ob);
+ }
- if (is_library_node)
- libnode_ob.push_back(ob);
}
- if (read_transform)
- anim_importer.read_node_transform(node, ob); // overwrites location set earlier
+ for (std::vector<Object *>::iterator it = objects_done->begin(); it != objects_done->end(); ++it) {
+ ob =*it;
- if (!is_joint) {
- // if par was given make this object child of the previous
- if (par && ob)
- bc_set_parent(ob, par, mContext);
- }
+ if (read_transform)
+ anim_importer.read_node_transform(node, ob); // overwrites location set earlier
+ if (!is_joint) {
+ // if par was given make this object child of the previous
+ if (par && ob)
+ bc_set_parent(ob, par, mContext);
+ }
+ }
// if node has child nodes write them
COLLADAFW::NodePointerArray &child_nodes = node->getChildNodes();
for (unsigned int i = 0; i < child_nodes.getCount(); i++) {
@@ -547,7 +572,7 @@ bool DocumentImporter::writeMaterial( const COLLADAFW::Material* cmat )
return true;
const std::string& str_mat_id = cmat->getName().size() ? cmat->getName() : cmat->getOriginalId();
- Material *ma = add_material((char*)str_mat_id.c_str());
+ Material *ma = BKE_material_add((char*)str_mat_id.c_str());
this->uid_effect_map[cmat->getInstantiatedEffect()] = ma;
this->uid_material_map[cmat->getUniqueId()] = ma;
@@ -744,8 +769,7 @@ bool DocumentImporter::writeEffect( const COLLADAFW::Effect* effect )
Material *ma = uid_effect_map[uid];
std::map<COLLADAFW::UniqueId, Material*>::iterator iter;
- for (iter = uid_material_map.begin(); iter != uid_material_map.end() ; iter++ )
- {
+ for (iter = uid_material_map.begin(); iter != uid_material_map.end() ; iter++ ) {
if ( iter->second == ma ) {
this->FW_object_map[iter->first] = effect;
break;
@@ -778,8 +802,8 @@ bool DocumentImporter::writeCamera( const COLLADAFW::Camera* camera )
cam_id = camera->getOriginalId();
cam_name = camera->getName();
- if (cam_name.size()) cam = (Camera*)add_camera((char*)cam_name.c_str());
- else cam = (Camera*)add_camera((char*)cam_id.c_str());
+ if (cam_name.size()) cam = (Camera *)BKE_camera_add((char*)cam_name.c_str());
+ else cam = (Camera *)BKE_camera_add((char*)cam_id.c_str());
if (!cam) {
fprintf(stderr, "Cannot create camera.\n");
@@ -789,7 +813,7 @@ bool DocumentImporter::writeCamera( const COLLADAFW::Camera* camera )
cam->clipend = camera->getFarClippingPlane().getValue();
COLLADAFW::Camera::CameraType type = camera->getCameraType();
- switch(type) {
+ switch (type) {
case COLLADAFW::Camera::ORTHOGRAPHIC:
{
cam->type = CAM_ORTHO;
@@ -808,10 +832,10 @@ bool DocumentImporter::writeCamera( const COLLADAFW::Camera* camera )
break;
}
- switch(camera->getDescriptionType()) {
+ switch (camera->getDescriptionType()) {
case COLLADAFW::Camera::ASPECTRATIO_AND_Y:
{
- switch(cam->type) {
+ switch (cam->type) {
case CAM_ORTHO:
{
double ymag = camera->getYMag().getValue();
@@ -839,7 +863,7 @@ bool DocumentImporter::writeCamera( const COLLADAFW::Camera* camera )
case COLLADAFW::Camera::SINGLE_X:
case COLLADAFW::Camera::X_AND_Y:
{
- switch(cam->type) {
+ switch (cam->type) {
case CAM_ORTHO:
cam->ortho_scale = (float)camera->getXMag().getValue();
break;
@@ -856,7 +880,7 @@ bool DocumentImporter::writeCamera( const COLLADAFW::Camera* camera )
break;
case COLLADAFW::Camera::SINGLE_Y:
{
- switch(cam->type) {
+ switch (cam->type) {
case CAM_ORTHO:
cam->ortho_scale = (float)camera->getYMag().getValue();
break;
@@ -897,7 +921,7 @@ bool DocumentImporter::writeImage( const COLLADAFW::Image* image )
BLI_split_dir_part(filename, dir, sizeof(dir));
BLI_join_dirfile(full_path, sizeof(full_path), dir, filepath.c_str());
- Image *ima = BKE_add_image_file(full_path);
+ Image *ima = BKE_image_load_exists(full_path);
if (!ima) {
fprintf(stderr, "Cannot create image.\n");
return true;
@@ -925,8 +949,8 @@ bool DocumentImporter::writeLight( const COLLADAFW::Light* light )
la_id = light->getOriginalId();
la_name = light->getName();
- if (la_name.size()) lamp = (Lamp*)add_lamp((char*)la_name.c_str());
- else lamp = (Lamp*)add_lamp((char*)la_id.c_str());
+ if (la_name.size()) lamp = (Lamp*)BKE_lamp_add((char*)la_name.c_str());
+ else lamp = (Lamp*)BKE_lamp_add((char*)la_id.c_str());
if (!lamp) {
fprintf(stderr, "Cannot create lamp.\n");
@@ -1030,7 +1054,7 @@ bool DocumentImporter::writeLight( const COLLADAFW::Light* light )
lamp->dist = d;
COLLADAFW::Light::LightType type = light->getLightType();
- switch(type) {
+ switch (type) {
case COLLADAFW::Light::AMBIENT_LIGHT:
{
lamp->type = LA_HEMI;
diff --git a/source/blender/collada/DocumentImporter.h b/source/blender/collada/DocumentImporter.h
index 606218b644d..13f23b23388 100644
--- a/source/blender/collada/DocumentImporter.h
+++ b/source/blender/collada/DocumentImporter.h
@@ -151,7 +151,7 @@ private:
std::map<COLLADAFW::UniqueId, Camera*> uid_camera_map;
std::map<COLLADAFW::UniqueId, Lamp*> uid_lamp_map;
std::map<Material*, TexIndexTextureArrayMap> material_texture_mapping_map;
- std::map<COLLADAFW::UniqueId, Object*> object_map;
+ std::multimap<COLLADAFW::UniqueId, Object*> object_map;
std::map<COLLADAFW::UniqueId, COLLADAFW::Node*> node_map;
std::vector<const COLLADAFW::VisualScene*> vscenes;
std::vector<Object*> libnode_ob;
diff --git a/source/blender/collada/EffectExporter.cpp b/source/blender/collada/EffectExporter.cpp
index 9720b92ffae..36ed6867525 100644
--- a/source/blender/collada/EffectExporter.cpp
+++ b/source/blender/collada/EffectExporter.cpp
@@ -60,11 +60,10 @@ bool EffectsExporter::hasEffects(Scene *sce)
{
Base *base = (Base *)sce->base.first;
- while(base) {
+ while (base) {
Object *ob= base->object;
int a;
- for (a = 0; a < ob->totcol; a++)
- {
+ for (a = 0; a < ob->totcol; a++) {
Material *ma = give_current_material(ob, a+1);
// no material, but check all of the slots
@@ -94,10 +93,10 @@ void EffectsExporter::writeBlinn(COLLADASW::EffectProfile &ep, Material *ma)
COLLADASW::ColorOrTexture cot;
ep.setShaderType(COLLADASW::EffectProfile::BLINN);
// shininess
- ep.setShininess(ma->har, false , "shininess");
+ ep.setShininess(ma->har, false, "shininess");
// specular
cot = getcol(ma->specr, ma->specg, ma->specb, 1.0f);
- ep.setSpecular(cot, false , "specular" );
+ ep.setSpecular(cot, false, "specular" );
}
void EffectsExporter::writeLambert(COLLADASW::EffectProfile &ep, Material *ma)
@@ -111,10 +110,10 @@ void EffectsExporter::writePhong(COLLADASW::EffectProfile &ep, Material *ma)
COLLADASW::ColorOrTexture cot;
ep.setShaderType(COLLADASW::EffectProfile::PHONG);
// shininess
- ep.setShininess(ma->har , false , "shininess" );
+ ep.setShininess(ma->har, false, "shininess" );
// specular
cot = getcol(ma->specr, ma->specg, ma->specb, 1.0f);
- ep.setSpecular(cot, false , "specular" );
+ ep.setSpecular(cot, false, "specular" );
}
void EffectsExporter::operator()(Material *ma, Object *ob)
@@ -151,10 +150,10 @@ void EffectsExporter::operator()(Material *ma, Object *ob)
// index of refraction
if (ma->mode & MA_RAYTRANSP) {
- ep.setIndexOfRefraction(ma->ang, false , "index_of_refraction");
+ ep.setIndexOfRefraction(ma->ang, false, "index_of_refraction");
}
else {
- ep.setIndexOfRefraction(1.0f, false , "index_of_refraction");
+ ep.setIndexOfRefraction(1.0f, false, "index_of_refraction");
}
COLLADASW::ColorOrTexture cot;
@@ -162,18 +161,18 @@ void EffectsExporter::operator()(Material *ma, Object *ob)
// transparency
if (ma->mode & MA_TRANSP) {
// Tod: because we are in A_ONE mode transparency is calculated like this:
- ep.setTransparency(ma->alpha, false , "transparency");
+ ep.setTransparency(ma->alpha, false, "transparency");
// cot = getcol(1.0f, 1.0f, 1.0f, 1.0f);
// ep.setTransparent(cot);
}
// emission
cot=getcol(ma->emit, ma->emit, ma->emit, 1.0f);
- ep.setEmission(cot, false , "emission");
+ ep.setEmission(cot, false, "emission");
// diffuse multiplied by diffuse intensity
cot = getcol(ma->r * ma->ref, ma->g * ma->ref, ma->b * ma->ref, 1.0f);
- ep.setDiffuse(cot, false , "diffuse");
+ ep.setDiffuse(cot, false, "diffuse");
// ambient
/* ma->ambX is calculated only on render, so lets do it here manually and not rely on ma->ambX. */
@@ -182,7 +181,7 @@ void EffectsExporter::operator()(Material *ma, Object *ob)
else
cot = getcol(ma->amb, ma->amb, ma->amb, 1.0f);
- ep.setAmbient(cot, false , "ambient");
+ ep.setAmbient(cot, false, "ambient");
// reflective, reflectivity
if (ma->mode & MA_RAYMIRROR) {
@@ -199,7 +198,7 @@ void EffectsExporter::operator()(Material *ma, Object *ob)
// specular
if (ep.getShaderType() != COLLADASW::EffectProfile::LAMBERT) {
cot = getcol(ma->specr * ma->spec, ma->specg * ma->spec, ma->specb * ma->spec, 1.0f);
- ep.setSpecular(cot, false , "specular");
+ ep.setSpecular(cot, false, "specular");
}
// XXX make this more readable if possible
@@ -280,19 +279,19 @@ void EffectsExporter::operator()(Material *ma, Object *ob)
// color
if (t->mapto & (MAP_COL | MAP_COLSPEC)) {
- ep.setDiffuse(createTexture(ima, uvname, sampler), false , "diffuse");
+ ep.setDiffuse(createTexture(ima, uvname, sampler), false, "diffuse");
}
// ambient
if (t->mapto & MAP_AMB) {
- ep.setAmbient(createTexture(ima, uvname, sampler), false , "ambient");
+ ep.setAmbient(createTexture(ima, uvname, sampler), false, "ambient");
}
// specular
if (t->mapto & MAP_SPEC) {
- ep.setSpecular(createTexture(ima, uvname, sampler), false , "specular");
+ ep.setSpecular(createTexture(ima, uvname, sampler), false, "specular");
}
// emission
if (t->mapto & MAP_EMIT) {
- ep.setEmission(createTexture(ima, uvname, sampler), false , "emission");
+ ep.setEmission(createTexture(ima, uvname, sampler), false, "emission");
}
// reflective
if (t->mapto & MAP_REF) {
@@ -351,7 +350,7 @@ COLLADASW::ColorOrTexture EffectsExporter::createTexture(Image *ima,
COLLADASW::ColorOrTexture EffectsExporter::getcol(float r, float g, float b, float a)
{
- COLLADASW::Color color(r,g,b,a);
+ COLLADASW::Color color(r, g, b, a);
COLLADASW::ColorOrTexture cot(color);
return cot;
}
diff --git a/source/blender/collada/ErrorHandler.cpp b/source/blender/collada/ErrorHandler.cpp
index 1c0f40d2185..530158ed418 100644
--- a/source/blender/collada/ErrorHandler.cpp
+++ b/source/blender/collada/ErrorHandler.cpp
@@ -49,37 +49,31 @@ bool ErrorHandler::handleError( const COLLADASaxFWL::IError* error )
{
mError = true;
- if ( error->getErrorClass() == COLLADASaxFWL::IError::ERROR_SAXPARSER )
- {
+ if ( error->getErrorClass() == COLLADASaxFWL::IError::ERROR_SAXPARSER ) {
COLLADASaxFWL::SaxParserError* saxParserError = (COLLADASaxFWL::SaxParserError*) error;
const GeneratedSaxParser::ParserError& parserError = saxParserError->getError();
// Workaround to avoid wrong error
- if ( parserError.getErrorType() == GeneratedSaxParser::ParserError::ERROR_VALIDATION_MIN_OCCURS_UNMATCHED)
- {
- if ( strcmp(parserError.getElement(), "effect") == 0 )
- {
+ if ( parserError.getErrorType() == GeneratedSaxParser::ParserError::ERROR_VALIDATION_MIN_OCCURS_UNMATCHED) {
+ if ( strcmp(parserError.getElement(), "effect") == 0 ) {
mError = false;
}
}
- if ( parserError.getErrorType() == GeneratedSaxParser::ParserError::ERROR_VALIDATION_SEQUENCE_PREVIOUS_SIBLING_NOT_PRESENT)
- {
- if ( !((strcmp(parserError.getElement(), "extra") == 0)
- && (strcmp(parserError.getAdditionalText().c_str(), "sibling: fx_profile_abstract") == 0)))
+ if ( parserError.getErrorType() == GeneratedSaxParser::ParserError::ERROR_VALIDATION_SEQUENCE_PREVIOUS_SIBLING_NOT_PRESENT) {
+ if ( !((strcmp(parserError.getElement(), "extra") == 0) &&
+ (strcmp(parserError.getAdditionalText().c_str(), "sibling: fx_profile_abstract") == 0)))
{
mError = false;
}
}
- if ( parserError.getErrorType() == GeneratedSaxParser::ParserError::ERROR_COULD_NOT_OPEN_FILE)
- {
+ if ( parserError.getErrorType() == GeneratedSaxParser::ParserError::ERROR_COULD_NOT_OPEN_FILE) {
std::cout << "Couldn't open file" << std::endl;
}
std::cout << "Schema validation error: " << parserError.getErrorMessage() << std::endl;
}
- else if ( error->getErrorClass() == COLLADASaxFWL::IError::ERROR_SAXFWL )
- {
+ else if ( error->getErrorClass() == COLLADASaxFWL::IError::ERROR_SAXFWL ) {
COLLADASaxFWL::SaxFWLError* saxFWLError = (COLLADASaxFWL::SaxFWLError*) error;
std::cout << "Sax FWL Error: " << saxFWLError->getErrorMessage() << std::endl;
}
diff --git a/source/blender/collada/ErrorHandler.h b/source/blender/collada/ErrorHandler.h
index 07eccb713e8..3b3797e935a 100644
--- a/source/blender/collada/ErrorHandler.h
+++ b/source/blender/collada/ErrorHandler.h
@@ -47,7 +47,7 @@ public:
bool hasError() { return mError; }
private:
/** Disable default copy ctor. */
- ErrorHandler( const ErrorHandler& pre );
+ ErrorHandler(const ErrorHandler& pre);
/** Disable default assignment operator. */
const ErrorHandler& operator= ( const ErrorHandler& pre );
/** Hold error status. */
diff --git a/source/blender/collada/ExportSettings.h b/source/blender/collada/ExportSettings.h
index 80e20acbe48..41fa7e1ed38 100644
--- a/source/blender/collada/ExportSettings.h
+++ b/source/blender/collada/ExportSettings.h
@@ -31,6 +31,7 @@ struct ExportSettings
{
public:
bool selected;
+ bool apply_modifiers;
bool second_life;
char *filepath;
};
diff --git a/source/blender/collada/ExtraHandler.h b/source/blender/collada/ExtraHandler.h
index 68656dfc690..900e7b70331 100644
--- a/source/blender/collada/ExtraHandler.h
+++ b/source/blender/collada/ExtraHandler.h
@@ -63,7 +63,7 @@ public:
const COLLADAFW::UniqueId& uniqueId );
private:
/** Disable default copy constructor. */
- ExtraHandler( const ExtraHandler& pre );
+ ExtraHandler(const ExtraHandler& pre);
/** Disable default assignment operator. */
const ExtraHandler& operator= ( const ExtraHandler& pre );
diff --git a/source/blender/collada/ExtraTags.h b/source/blender/collada/ExtraTags.h
index f8d12e6288a..03a311a7e86 100644
--- a/source/blender/collada/ExtraTags.h
+++ b/source/blender/collada/ExtraTags.h
@@ -59,7 +59,7 @@ public:
private:
/** Disable default copy constructor. */
- ExtraTags( const ExtraTags& pre );
+ ExtraTags(const ExtraTags& pre);
/** Disable default assignment operator. */
const ExtraTags& operator= ( const ExtraTags& pre );
diff --git a/source/blender/collada/GeometryExporter.cpp b/source/blender/collada/GeometryExporter.cpp
index ca112abc0af..ba41e603a29 100644
--- a/source/blender/collada/GeometryExporter.cpp
+++ b/source/blender/collada/GeometryExporter.cpp
@@ -36,10 +36,18 @@
#include "GeometryExporter.h"
#include "DNA_meshdata_types.h"
+
+extern "C" {
+ #include "BKE_DerivedMesh.h"
+ #include "BKE_main.h"
+ #include "BKE_global.h"
+ #include "BKE_library.h"
+}
+
+
#include "BKE_customdata.h"
#include "BKE_material.h"
#include "BKE_mesh.h"
-
#include "collada_internal.h"
// TODO: optimize UV sets by making indexed list with duplicates removed
@@ -57,6 +65,25 @@ void GeometryExporter::exportGeom(Scene *sce)
closeLibrary();
}
+Mesh * GeometryExporter::get_mesh(Object *ob, int apply_modifiers)
+{
+ Mesh *tmpmesh;
+ if (!apply_modifiers)
+ {
+ tmpmesh = (Mesh*)ob->data;
+ }
+ else
+ {
+ CustomDataMask mask = CD_MASK_MESH;
+ DerivedMesh *dm = mesh_create_derived_view(mScene, ob, mask);
+ tmpmesh = BKE_mesh_add("ColladaMesh"); // name is not important here
+ DM_to_mesh(dm, tmpmesh, ob);
+ dm->release(dm);
+ }
+ BKE_mesh_tessface_ensure(tmpmesh);
+ return tmpmesh;
+}
+
void GeometryExporter::operator()(Object *ob)
{
// XXX don't use DerivedMesh, Mesh instead?
@@ -64,8 +91,8 @@ void GeometryExporter::operator()(Object *ob)
#if 0
DerivedMesh *dm = mesh_get_derived_final(mScene, ob, CD_MASK_BAREMESH);
#endif
- Mesh *me = (Mesh*)ob->data;
- BKE_mesh_tessface_ensure(me);
+
+ Mesh *me = get_mesh(ob, this->export_settings->apply_modifiers);
std::string geom_id = get_geometry_id(ob);
std::string geom_name = id_name(ob->data);
@@ -110,11 +137,11 @@ void GeometryExporter::operator()(Object *ob)
// XXX slow
if (ob->totcol) {
for (int a = 0; a < ob->totcol; a++) {
- createPolylist(a, has_uvs, has_color, ob, geom_id, norind);
+ createPolylist(a, has_uvs, has_color, ob, me, geom_id, norind);
}
}
else {
- createPolylist(0, has_uvs, has_color, ob, geom_id, norind);
+ createPolylist(0, has_uvs, has_color, ob, me, geom_id, norind);
}
closeMesh();
@@ -124,7 +151,12 @@ void GeometryExporter::operator()(Object *ob)
}
closeGeometry();
-
+
+ if (this->export_settings->apply_modifiers)
+ {
+ BKE_libblock_free_us(&(G.main->mesh), me);
+ }
+
#if 0
dm->release(dm);
#endif
@@ -135,10 +167,10 @@ void GeometryExporter::createPolylist(short material_index,
bool has_uvs,
bool has_color,
Object *ob,
+ Mesh *me,
std::string& geom_id,
std::vector<Face>& norind)
{
- Mesh *me = (Mesh*)ob->data;
MFace *mfaces = me->mface;
int totfaces = me->totface;
@@ -177,7 +209,7 @@ void GeometryExporter::createPolylist(short material_index,
// sets material name
if (ma) {
std::ostringstream ostr;
- ostr << translate_id(id_name(ma)) << material_index+1;
+ ostr << translate_id(id_name(ma));
polylist.setMaterial(ostr.str());
}
@@ -440,9 +472,9 @@ void GeometryExporter::create_normals(std::vector<Normal> &nor, std::vector<Face
*nn = nshar[*vv];
else {
Normal n = {
- vert[*vv].no[0]/32767.0,
- vert[*vv].no[1]/32767.0,
- vert[*vv].no[2]/32767.0
+ (float)vert[*vv].no[0] / 32767.0f,
+ (float)vert[*vv].no[1] / 32767.0f,
+ (float)vert[*vv].no[2] / 32767.0f
};
nor.push_back(n);
*nn = (unsigned int)nor.size() - 1;
diff --git a/source/blender/collada/GeometryExporter.h b/source/blender/collada/GeometryExporter.h
index f6dc5a18449..55dc179e5e2 100644
--- a/source/blender/collada/GeometryExporter.h
+++ b/source/blender/collada/GeometryExporter.h
@@ -69,6 +69,7 @@ public:
bool has_uvs,
bool has_color,
Object *ob,
+ Mesh *me,
std::string& geom_id,
std::vector<Face>& norind);
@@ -98,6 +99,8 @@ private:
std::set<std::string> exportedGeometry;
const ExportSettings *export_settings;
+
+ Mesh * get_mesh(Object *ob, int apply_modifiers);
};
struct GeometryFunctor {
@@ -108,12 +111,13 @@ struct GeometryFunctor {
{
Base *base= (Base*) sce->base.first;
- while(base) {
+ while (base) {
Object *ob = base->object;
- if (ob->type == OB_MESH && ob->data
- && !(export_selected && !(ob->flag && SELECT))
- && ((sce->lay & ob->lay)!=0)) {
+ if (ob->type == OB_MESH && ob->data &&
+ !(export_selected && !(ob->flag & SELECT)) &&
+ ((sce->lay & ob->lay)!=0))
+ {
f(ob);
}
base= base->next;
diff --git a/source/blender/collada/ImageExporter.cpp b/source/blender/collada/ImageExporter.cpp
index 946effda832..4d7c56ab419 100644
--- a/source/blender/collada/ImageExporter.cpp
+++ b/source/blender/collada/ImageExporter.cpp
@@ -48,11 +48,10 @@ bool ImagesExporter::hasImages(Scene *sce)
{
Base *base = (Base *)sce->base.first;
- while(base) {
+ while (base) {
Object *ob= base->object;
int a;
- for (a = 0; a < ob->totcol; a++)
- {
+ for (a = 0; a < ob->totcol; a++) {
Material *ma = give_current_material(ob, a+1);
// no material, but check all of the slots
diff --git a/source/blender/collada/InstanceWriter.cpp b/source/blender/collada/InstanceWriter.cpp
index a605bdeefcc..f83289ff5f5 100644
--- a/source/blender/collada/InstanceWriter.cpp
+++ b/source/blender/collada/InstanceWriter.cpp
@@ -52,7 +52,7 @@ void InstanceWriter::add_material_bindings(COLLADASW::BindMaterial& bind_materia
std::string matid(get_material_id(ma));
matid = translate_id(matid);
std::ostringstream ostr;
- ostr << translate_id(id_name(ma)) << a+1;
+ ostr << translate_id(id_name(ma));
COLLADASW::InstanceMaterial im(ostr.str(), COLLADASW::URI(COLLADABU::Utils::EMPTY_STRING, matid));
// create <bind_vertex_input> for each uv map
diff --git a/source/blender/collada/LightExporter.cpp b/source/blender/collada/LightExporter.cpp
index 51242b36b64..6d276cd782f 100644
--- a/source/blender/collada/LightExporter.cpp
+++ b/source/blender/collada/LightExporter.cpp
@@ -39,11 +39,10 @@ template<class Functor>
void forEachLampObjectInScene(Scene *sce, Functor &f, bool export_selected)
{
Base *base= (Base*) sce->base.first;
- while(base) {
+ while (base) {
Object *ob = base->object;
-
- if (ob->type == OB_LAMP && ob->data
- && !(export_selected && !(ob->flag & SELECT))) {
+
+ if (ob->type == OB_LAMP && ob->data && !(export_selected && !(ob->flag & SELECT))) {
f(ob);
}
base= base->next;
@@ -85,7 +84,7 @@ void LightsExporter::operator()(Object *ob)
// sun
if (la->type == LA_SUN) {
COLLADASW::DirectionalLight cla(mSW, la_id, la_name);
- cla.setColor(col,false,"color");
+ cla.setColor(col, false, "color");
cla.setConstantAttenuation(constatt);
exportBlenderProfile(cla, la);
addLight(cla);
@@ -93,7 +92,7 @@ void LightsExporter::operator()(Object *ob)
// hemi
else if (la->type == LA_HEMI) {
COLLADASW::AmbientLight cla(mSW, la_id, la_name);
- cla.setColor(col,false,"color");
+ cla.setColor(col, false, "color");
cla.setConstantAttenuation(constatt);
exportBlenderProfile(cla, la);
addLight(cla);
@@ -101,9 +100,9 @@ void LightsExporter::operator()(Object *ob)
// spot
else if (la->type == LA_SPOT) {
COLLADASW::SpotLight cla(mSW, la_id, la_name);
- cla.setColor(col,false,"color");
- cla.setFallOffAngle(la->spotsize,false,"fall_off_angle");
- cla.setFallOffExponent(la->spotblend,false,"fall_off_exponent");
+ cla.setColor(col, false, "color");
+ cla.setFallOffAngle(la->spotsize, false, "fall_off_angle");
+ cla.setFallOffExponent(la->spotblend, false, "fall_off_exponent");
cla.setConstantAttenuation(constatt);
cla.setLinearAttenuation(linatt);
cla.setQuadraticAttenuation(quadatt);
@@ -113,7 +112,7 @@ void LightsExporter::operator()(Object *ob)
// lamp
else if (la->type == LA_LOCAL) {
COLLADASW::PointLight cla(mSW, la_id, la_name);
- cla.setColor(col,false,"color");
+ cla.setColor(col, false, "color");
cla.setConstantAttenuation(constatt);
cla.setLinearAttenuation(linatt);
cla.setQuadraticAttenuation(quadatt);
@@ -124,7 +123,7 @@ void LightsExporter::operator()(Object *ob)
// it will be exported as a local lamp
else {
COLLADASW::PointLight cla(mSW, la_id, la_name);
- cla.setColor(col,false,"color");
+ cla.setColor(col, false, "color");
cla.setConstantAttenuation(constatt);
cla.setLinearAttenuation(linatt);
cla.setQuadraticAttenuation(quadatt);
diff --git a/source/blender/collada/MaterialExporter.cpp b/source/blender/collada/MaterialExporter.cpp
index 1e3358c9216..ac1a5d32a08 100644
--- a/source/blender/collada/MaterialExporter.cpp
+++ b/source/blender/collada/MaterialExporter.cpp
@@ -50,11 +50,10 @@ bool MaterialsExporter::hasMaterials(Scene *sce)
{
Base *base = (Base *)sce->base.first;
- while(base) {
+ while (base) {
Object *ob= base->object;
int a;
- for (a = 0; a < ob->totcol; a++)
- {
+ for (a = 0; a < ob->totcol; a++) {
Material *ma = give_current_material(ob, a+1);
// no material, but check all of the slots
diff --git a/source/blender/collada/MaterialExporter.h b/source/blender/collada/MaterialExporter.h
index eb7886c23b9..4a5422184d4 100644
--- a/source/blender/collada/MaterialExporter.h
+++ b/source/blender/collada/MaterialExporter.h
@@ -68,7 +68,7 @@ public:
void operator ()(Object *ob)
{
int a;
- for(a = 0; a < ob->totcol; a++) {
+ for (a = 0; a < ob->totcol; a++) {
Material *ma = give_current_material(ob, a+1);
diff --git a/source/blender/collada/MeshImporter.cpp b/source/blender/collada/MeshImporter.cpp
index 5c01c31bd0d..73d1f42b340 100644
--- a/source/blender/collada/MeshImporter.cpp
+++ b/source/blender/collada/MeshImporter.cpp
@@ -116,7 +116,7 @@ UVDataWrapper::UVDataWrapper(COLLADAFW::MeshVertexData& vdata) : mVData(&vdata)
void WVDataWrapper::print()
{
fprintf(stderr, "UVs:\n");
- switch(mVData->getType()) {
+ switch (mVData->getType()) {
case COLLADAFW::MeshVertexData::DATA_TYPE_FLOAT:
{
COLLADAFW::ArrayPrimitiveType<float>* values = mVData->getFloatValues();
@@ -147,7 +147,7 @@ void UVDataWrapper::getUV(int uv_index, float *uv)
int stride = mVData->getStride(0);
if (stride==0) stride = 2;
- switch(mVData->getType()) {
+ switch (mVData->getType()) {
case COLLADAFW::MeshVertexData::DATA_TYPE_FLOAT:
{
COLLADAFW::ArrayPrimitiveType<float>* values = mVData->getFloatValues();
@@ -346,7 +346,7 @@ int MeshImporter::triangulate_poly(unsigned int *indices, int totvert, MVert *ve
vert += 3;
}
- filldisplist(&dispbase, &dispbase, 0);
+ BKE_displist_fill(&dispbase, &dispbase, 0);
int tottri = 0;
dl= (DispList*)dispbase.first;
@@ -368,7 +368,7 @@ int MeshImporter::triangulate_poly(unsigned int *indices, int totvert, MVert *ve
}
}
- freedisplist(&dispbase);
+ BKE_displist_free(&dispbase);
return tottri;
}
@@ -676,7 +676,7 @@ void MeshImporter::get_vector(float v[3], COLLADAFW::MeshVertexData& arr, int i,
{
i *= stride;
- switch(arr.getType()) {
+ switch (arr.getType()) {
case COLLADAFW::MeshVertexData::DATA_TYPE_FLOAT:
{
COLLADAFW::ArrayPrimitiveType<float>* values = arr.getFloatValues();
@@ -727,6 +727,22 @@ bool MeshImporter::flat_face(unsigned int *nind, COLLADAFW::MeshVertexData& nor,
MeshImporter::MeshImporter(UnitConverter *unitconv, ArmatureImporter *arm, Scene *sce) : unitconverter(unitconv), scene(sce), armature_importer(arm) {}
+void MeshImporter::bmeshConversion()
+{
+ for (std::map<COLLADAFW::UniqueId, Mesh*>::iterator m = uid_mesh_map.begin();
+ m != uid_mesh_map.end(); ++m)
+ {
+ if ((*m).second) {
+ Mesh *me = (*m).second;
+ BKE_mesh_convert_mfaces_to_mpolys(me);
+ BKE_mesh_tessface_clear(me);
+
+ BKE_mesh_calc_normals_mapping(me->mvert, me->totvert, me->mloop, me->mpoly, me->totloop, me->totpoly, NULL, NULL, 0, NULL, NULL);
+ }
+ }
+}
+
+
Object *MeshImporter::get_object_by_geom_uid(const COLLADAFW::UniqueId& geom_uid)
{
if (uid_object_map.find(geom_uid) != uid_object_map.end())
@@ -797,7 +813,7 @@ MTFace *MeshImporter::assign_material_to_geom(COLLADAFW::MaterialBinding cmateri
// what we already have handled.
std::multimap<COLLADAFW::UniqueId, COLLADAFW::UniqueId>::iterator it;
it=materials_mapped_to_geom.find(*geom_uid);
- while(it!=materials_mapped_to_geom.end()) {
+ while (it!=materials_mapped_to_geom.end()) {
if (it->second == ma_uid && it->first == *geom_uid) return NULL; // do nothing if already found
it++;
}
@@ -839,13 +855,12 @@ MTFace *MeshImporter::assign_material_to_geom(COLLADAFW::MaterialBinding cmateri
for (it = prims.begin(); it != prims.end(); it++) {
Primitive& prim = *it;
- i = 0;
- while (i++ < prim.totface) {
- prim.mface->mat_nr = mat_index;
- prim.mface++;
+ MFace *mface = prim.mface;
+
+ for (i = 0; i < prim.totface; i++, mface++) {
+ mface->mat_nr = mat_index;
// bind texture images to faces
if (texture_face && (*color_texture)) {
- texture_face->mode = TF_TEX;
texture_face->tpage = (Image*)(*color_texture)->tex->ima;
texture_face++;
}
@@ -856,7 +871,6 @@ MTFace *MeshImporter::assign_material_to_geom(COLLADAFW::MaterialBinding cmateri
return texture_face;
}
-
Object *MeshImporter::create_mesh_object(COLLADAFW::Node *node, COLLADAFW::InstanceGeometry *geom,
bool isController,
std::map<COLLADAFW::UniqueId, Material*>& uid_material_map,
@@ -885,22 +899,22 @@ Object *MeshImporter::create_mesh_object(COLLADAFW::Node *node, COLLADAFW::Insta
}
if (!uid_mesh_map[*geom_uid]) return NULL;
- Object *ob = add_object(scene, OB_MESH);
+ // name Object
+ const std::string& id = node->getName().size() ? node->getName() : node->getOriginalId();
+ const char *name = (id.length())? id.c_str(): NULL;
+
+ // add object
+ Object *ob = bc_add_object(scene, OB_MESH, name);
// store object pointer for ArmatureImporter
uid_object_map[*geom_uid] = ob;
- // name Object
- const std::string& id = node->getName().size() ? node->getName() : node->getOriginalId();
- if (id.length())
- rename_id(&ob->id, (char*)id.c_str());
-
// replace ob->data freeing the old one
Mesh *old_mesh = (Mesh*)ob->data;
set_mesh(ob, uid_mesh_map[*geom_uid]);
- if (old_mesh->id.us == 0) free_libblock(&G.main->mesh, old_mesh);
+ if (old_mesh->id.us == 0) BKE_libblock_free(&G.main->mesh, old_mesh);
char layername[100];
layername[0] = '\0';
@@ -922,7 +936,7 @@ Object *MeshImporter::create_mesh_object(COLLADAFW::Node *node, COLLADAFW::Insta
fprintf(stderr, "invalid referenced material for %s\n", mat_array[i].getName().c_str());
}
}
-
+
return ob;
}
@@ -948,7 +962,8 @@ bool MeshImporter::write_geometry(const COLLADAFW::Geometry* geom)
}
const std::string& str_geom_id = mesh->getName().size() ? mesh->getName() : mesh->getOriginalId();
- Mesh *me = add_mesh((char*)str_geom_id.c_str());
+ Mesh *me = BKE_mesh_add((char*)str_geom_id.c_str());
+ me->id.us--; // is already 1 here, but will be set later in set_mesh
// store the Mesh pointer to link it later with an Object
this->uid_mesh_map[mesh->getUniqueId()] = me;
@@ -961,10 +976,7 @@ bool MeshImporter::write_geometry(const COLLADAFW::Geometry* geom)
read_faces(mesh, me, new_tris);
- make_edges(me, 0);
-
- mesh_calc_normals_mapping(me->mvert, me->totvert, me->mloop, me->mpoly, me->totloop, me->totpoly, NULL, NULL, 0, NULL, NULL);
+ BKE_mesh_make_edges(me, 0);
- BKE_mesh_convert_mfaces_to_mpolys(me);
return true;
}
diff --git a/source/blender/collada/MeshImporter.h b/source/blender/collada/MeshImporter.h
index 0c2e600121f..97ae4d99ad7 100644
--- a/source/blender/collada/MeshImporter.h
+++ b/source/blender/collada/MeshImporter.h
@@ -129,6 +129,8 @@ public:
MeshImporter(UnitConverter *unitconv, ArmatureImporter *arm, Scene *sce);
+ void bmeshConversion();
+
virtual Object *get_object_by_geom_uid(const COLLADAFW::UniqueId& geom_uid);
MTex *assign_textures_to_uvlayer(COLLADAFW::TextureCoordinateBinding &ctexture,
diff --git a/source/blender/collada/SceneExporter.cpp b/source/blender/collada/SceneExporter.cpp
index 9010fd5062a..cd36267fd56 100644
--- a/source/blender/collada/SceneExporter.cpp
+++ b/source/blender/collada/SceneExporter.cpp
@@ -43,12 +43,12 @@ void SceneExporter::exportScene(Scene *sce)
void SceneExporter::exportHierarchy(Scene *sce)
{
Base *base= (Base*) sce->base.first;
- while(base) {
+ while (base) {
Object *ob = base->object;
if (!ob->parent) {
if (sce->lay & ob->lay) {
- switch(ob->type) {
+ switch (ob->type) {
case OB_MESH:
case OB_CAMERA:
case OB_LAMP:
@@ -81,12 +81,12 @@ void SceneExporter::writeNodes(Object *ob, Scene *sce)
// list child objects
Base *b = (Base*) sce->base.first;
- while(b) {
+ while (b) {
// cob - child object
Object *cob = b->object;
if (cob->parent == ob) {
- switch(cob->type) {
+ switch (cob->type) {
case OB_MESH:
case OB_CAMERA:
case OB_LAMP:
@@ -154,8 +154,7 @@ void SceneExporter::writeNodes(Object *ob, Scene *sce)
}
}
- for (std::list<Object*>::iterator i= child_objects.begin(); i != child_objects.end(); ++i)
- {
+ for (std::list<Object*>::iterator i= child_objects.begin(); i != child_objects.end(); ++i) {
writeNodes(*i, sce);
}
diff --git a/source/blender/collada/SkinInfo.cpp b/source/blender/collada/SkinInfo.cpp
index 99a4f024f77..edc8981deab 100644
--- a/source/blender/collada/SkinInfo.cpp
+++ b/source/blender/collada/SkinInfo.cpp
@@ -151,7 +151,7 @@ void SkinInfo::set_controller(const COLLADAFW::SkinController* co)
// called from write_controller
Object *SkinInfo::create_armature(Scene *scene)
{
- ob_arm = add_object(scene, OB_ARMATURE);
+ ob_arm = bc_add_object(scene, OB_ARMATURE, NULL);
return ob_arm;
}
@@ -178,7 +178,7 @@ bool SkinInfo::get_joint_inv_bind_matrix(float inv_bind_mat[][4], COLLADAFW::Nod
return false;
}
-Object *SkinInfo::get_armature()
+Object *SkinInfo::BKE_armature_from_object()
{
return ob_arm;
}
@@ -218,10 +218,11 @@ void SkinInfo::link_armature(bContext *C, Object *ob, std::map<COLLADAFW::Unique
Scene *scene = CTX_data_scene(C);
ModifierData *md = ED_object_modifier_add(NULL, bmain, scene, ob, NULL, eModifierType_Armature);
- ((ArmatureModifierData *)md)->object = ob_arm;
+ ArmatureModifierData *amd = (ArmatureModifierData *)md;
+ amd->object = ob_arm;
copy_m4_m4(ob->obmat, bind_shape_matrix);
- object_apply_mat4(ob, ob->obmat, 0, 0);
+ BKE_object_apply_mat4(ob, ob->obmat, 0, 0);
#if 1
bc_set_parent(ob, ob_arm, C);
#else
@@ -229,7 +230,7 @@ void SkinInfo::link_armature(bContext *C, Object *ob, std::map<COLLADAFW::Unique
ob->parent = ob_arm;
ob->partype = PAROBJECT;
- what_does_parent(scene, ob, &workob);
+ BKE_object_workob_calc_parent(scene, ob, &workob);
invert_m4_m4(ob->parentinv, workob.obmat);
ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA;
@@ -239,7 +240,7 @@ void SkinInfo::link_armature(bContext *C, Object *ob, std::map<COLLADAFW::Unique
WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
#endif
- ((bArmature*)ob_arm->data)->deformflag = ARM_DEF_VGROUP;
+ amd->deformflag = ARM_DEF_VGROUP;
// create all vertex groups
std::vector<JointData>::iterator it;
@@ -288,7 +289,7 @@ void SkinInfo::link_armature(bContext *C, Object *ob, std::map<COLLADAFW::Unique
bPoseChannel *SkinInfo::get_pose_channel_from_node(COLLADAFW::Node *node)
{
- return get_pose_channel(ob_arm->pose, bc_get_joint_name(node));
+ return BKE_pose_channel_find_name(ob_arm->pose, bc_get_joint_name(node));
}
void SkinInfo::set_parent(Object *_parent)
diff --git a/source/blender/collada/SkinInfo.h b/source/blender/collada/SkinInfo.h
index 7befe7168d3..894f53f07c3 100644
--- a/source/blender/collada/SkinInfo.h
+++ b/source/blender/collada/SkinInfo.h
@@ -105,7 +105,7 @@ public:
bool get_joint_inv_bind_matrix(float inv_bind_mat[][4], COLLADAFW::Node *node);
- Object *get_armature();
+ Object *BKE_armature_from_object();
const COLLADAFW::UniqueId& get_controller_uid();
diff --git a/source/blender/collada/TransformReader.cpp b/source/blender/collada/TransformReader.cpp
index a73d5243624..4c7fde8ef17 100644
--- a/source/blender/collada/TransformReader.cpp
+++ b/source/blender/collada/TransformReader.cpp
@@ -43,7 +43,7 @@ void TransformReader::get_node_mat(float mat[][4], COLLADAFW::Node *node, std::m
COLLADAFW::Transformation *tm = node->getTransformations()[i];
COLLADAFW::Transformation::TransformationType type = tm->getTransformationType();
- switch(type) {
+ switch (type) {
case COLLADAFW::Transformation::TRANSLATE:
dae_translate_to_mat4(tm, cur);
break;
diff --git a/source/blender/collada/TransformWriter.cpp b/source/blender/collada/TransformWriter.cpp
index f441833233c..fbd36cd6613 100644
--- a/source/blender/collada/TransformWriter.cpp
+++ b/source/blender/collada/TransformWriter.cpp
@@ -48,11 +48,11 @@ void TransformWriter::add_node_transform(COLLADASW::Node& node, float mat[][4],
double dmat[4][4];
UnitConverter* converter = new UnitConverter();
- converter->mat4_to_dae_double(dmat,local);
+ converter->mat4_to_dae_double(dmat, local);
TransformBase::decompose(local, loc, rot, NULL, scale);
if ( node.getType() == COLLADASW::Node::JOINT)
- node.addMatrix("transform",dmat);
+ node.addMatrix("transform", dmat);
else
add_transform(node, loc, rot, scale);
}
@@ -70,7 +70,7 @@ void TransformWriter::add_node_transform_ob(COLLADASW::Node& node, Object *ob)
copy_v3_v3(scale, ob->size);
ob->size[0] = ob->size[1] = ob->size[2] = 1.0f;
- object_to_mat4(ob, C);
+ BKE_object_to_mat4(ob, C);
copy_v3_v3(ob->size, scale);
mul_serie_m4(tmat, ob->parent->obmat, ob->parentinv, C, NULL, NULL, NULL, NULL, NULL);
@@ -95,19 +95,16 @@ void TransformWriter::add_node_transform_ob(COLLADASW::Node& node, Object *ob)
*/
/* Using parentinv should allow use of existing curves */
- if (ob->parent)
- {
+ if (ob->parent) {
// If parentinv is identity don't add it.
bool add_parinv = false;
- for (int i = 0; i < 16; ++i)
- {
+ for (int i = 0; i < 16; ++i) {
float f = (i % 4 == i / 4) ? 1.0f : 0.0f;
add_parinv |= (ob->parentinv[i % 4][i / 4] != f);
}
- if (add_parinv)
- {
+ if (add_parinv) {
double dmat[4][4];
UnitConverter converter;
converter.mat4_to_dae_double(dmat, ob->parentinv);
diff --git a/source/blender/collada/collada.cpp b/source/blender/collada/collada.cpp
index 70bf0556b5b..ae024ec52a7 100644
--- a/source/blender/collada/collada.cpp
+++ b/source/blender/collada/collada.cpp
@@ -49,13 +49,14 @@ extern "C"
return 0;
}
- int collada_export(Scene *sce, const char *filepath, int selected, int second_life)
+ int collada_export(Scene *sce, const char *filepath, int selected, int apply_modifiers, int second_life)
{
ExportSettings export_settings;
- export_settings.selected = selected != 0;
- export_settings.second_life = second_life != 0;
- export_settings.filepath = (char *)filepath;
+ export_settings.selected = selected != 0;
+ export_settings.apply_modifiers = apply_modifiers != 0;
+ export_settings.second_life = second_life != 0;
+ export_settings.filepath = (char *)filepath;
/* annoying, collada crashes if file cant be created! [#27162] */
if (!BLI_exists(filepath)) {
diff --git a/source/blender/collada/collada.h b/source/blender/collada/collada.h
index f8afc797447..f335796f799 100644
--- a/source/blender/collada/collada.h
+++ b/source/blender/collada/collada.h
@@ -37,7 +37,7 @@ extern "C" {
* both return 1 on success, 0 on error
*/
int collada_import(bContext *C, const char *filepath);
- int collada_export(Scene *sce, const char *filepath, int selected, int second_life);
+ int collada_export(Scene *sce, const char *filepath, int selected, int apply_modifiers, int second_life);
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/collada/collada_internal.cpp b/source/blender/collada/collada_internal.cpp
index fc4093bd795..fa99d460184 100644
--- a/source/blender/collada/collada_internal.cpp
+++ b/source/blender/collada/collada_internal.cpp
@@ -40,7 +40,7 @@ void UnitConverter::read_asset(const COLLADAFW::FileInfo* asset)
UnitConverter::UnitSystem UnitConverter::isMetricSystem()
{
- switch(unit.getLinearUnitUnit()) {
+ switch (unit.getLinearUnitUnit()) {
case COLLADAFW::FileInfo::Unit::MILLIMETER:
case COLLADAFW::FileInfo::Unit::CENTIMETER:
case COLLADAFW::FileInfo::Unit::DECIMETER:
@@ -198,44 +198,39 @@ void clear_global_id_map()
/** Look at documentation of translate_map */
std::string translate_id(const std::string &id)
{
- if (id.size() == 0)
- { return id; }
+ if (id.size() == 0) {
+ return id;
+ }
+
std::string id_translated = id;
id_translated[0] = translate_start_name_map[(unsigned int)id_translated[0]];
- for (unsigned int i=1; i < id_translated.size(); i++)
- {
+ 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.
- if (id_translated != id)
- {
+ if (id_translated != id) {
// Search duplicates
map_string_list::iterator iter = global_id_map.find(id_translated);
- if (iter != global_id_map.end())
- {
+ if (iter != global_id_map.end()) {
unsigned int i = 0;
bool found = false;
- for (i=0; i < iter->second.size(); i++)
- {
- if (id == iter->second[i])
- {
+ for (i=0; i < iter->second.size(); i++) {
+ if (id == iter->second[i]) {
found = true;
break;
}
}
bool convert = false;
- if (found)
- {
- if (i > 0)
- { convert = true; }
+ if (found) {
+ if (i > 0) {
+ convert = true;
+ }
}
- else
- {
+ else {
convert = true;
global_id_map[id_translated].push_back(id);
}
- if (convert)
- {
+ if (convert) {
std::stringstream out;
out << ++i;
id_translated += out.str();
@@ -279,7 +274,7 @@ std::string get_material_id(Material *mat)
bool has_object_type(Scene *sce, short obtype)
{
Base *base= (Base*) sce->base.first;
- while(base) {
+ while (base) {
Object *ob = base->object;
if (ob->type == obtype && ob->data) {
diff --git a/source/blender/collada/collada_utils.cpp b/source/blender/collada/collada_utils.cpp
index 4aed29defbc..8b7a28e5fbe 100644
--- a/source/blender/collada/collada_utils.cpp
+++ b/source/blender/collada/collada_utils.cpp
@@ -34,6 +34,7 @@
#include "DNA_customdata_types.h"
#include "DNA_object_types.h"
+#include "DNA_scene_types.h"
#include "BLI_math.h"
@@ -41,6 +42,7 @@
#include "BKE_customdata.h"
#include "BKE_depsgraph.h"
#include "BKE_object.h"
+#include "BKE_scene.h"
#include "WM_api.h" // XXX hrm, see if we can do without this
#include "WM_types.h"
@@ -86,7 +88,7 @@ int bc_set_parent(Object *ob, Object *par, bContext *C, bool is_parent_space)
if (is_parent_space) {
float mat[4][4];
// calc par->obmat
- where_is_object(sce, par);
+ BKE_object_where_is_calc(sce, par);
// move child obmat into world space
mult_m4_m4m4(mat, par->obmat, ob->obmat);
@@ -94,10 +96,10 @@ int bc_set_parent(Object *ob, Object *par, bContext *C, bool is_parent_space)
}
// apply child obmat (i.e. decompose it into rot/loc/size)
- object_apply_mat4(ob, ob->obmat, 0, 0);
+ BKE_object_apply_mat4(ob, ob->obmat, 0, 0);
// compute parentinv
- what_does_parent(sce, ob, &workob);
+ BKE_object_workob_calc_parent(sce, ob, &workob);
invert_m4_m4(ob->parentinv, workob.obmat);
ob->recalc |= OB_RECALC_OB | OB_RECALC_DATA;
@@ -110,3 +112,16 @@ int bc_set_parent(Object *ob, Object *par, bContext *C, bool is_parent_space)
return true;
}
+Object *bc_add_object(Scene *scene, int type, const char *name)
+{
+ Object *ob = BKE_object_add_only_object(type, name);
+
+ ob->data= BKE_object_obdata_add_from_type(type);
+ ob->lay= scene->lay;
+ ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
+
+ BKE_scene_base_select(scene, BKE_scene_base_add(scene, ob));
+
+ return ob;
+}
+
diff --git a/source/blender/collada/collada_utils.h b/source/blender/collada/collada_utils.h
index b0c24152652..1f5d2b1d8da 100644
--- a/source/blender/collada/collada_utils.h
+++ b/source/blender/collada/collada_utils.h
@@ -39,6 +39,7 @@
#include "DNA_customdata_types.h"
#include "DNA_texture_types.h"
#include "BKE_context.h"
+#include "DNA_scene_types.h"
typedef std::map<COLLADAFW::TextureMapId, std::vector<MTex*> > TexIndexTextureArrayMap;
@@ -48,5 +49,6 @@ extern int bc_test_parent_loop(Object *par, Object *ob);
extern int bc_set_parent(Object *ob, Object *par, bContext *C, bool is_parent_space=true);
extern char *bc_CustomData_get_layer_name(const CustomData *data, int type, int n);
extern char *bc_CustomData_get_active_layer_name(const CustomData *data, int type);
+extern Object *bc_add_object(Scene *scene, int type, const char *name);
#endif
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index 01ab36133fd..2e683d4d57b 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -79,10 +79,10 @@
// XXX constant defines to be moved elsewhere?
/* extra padding for lengths (to go under scrollers) */
-#define EXTRA_SCROLL_PAD 100.0f
+#define EXTRA_SCROLL_PAD 100.0f
/* size of indent steps */
-#define INDENT_STEP_SIZE 7
+#define INDENT_STEP_SIZE 7
#define ANIM_CHAN_NAME_SIZE 256
@@ -98,19 +98,19 @@
/* Draw Backdrop ---------------------------------- */
/* get backdrop color for top-level widgets (Scene and Object only) */
-static void acf_generic_root_color(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale), float *color)
+static void acf_generic_root_color(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale), float r_color[3])
{
/* darker blue for top-level widgets */
- UI_GetThemeColor3fv(TH_DOPESHEET_CHANNELOB, color);
+ UI_GetThemeColor3fv(TH_DOPESHEET_CHANNELOB, r_color);
}
/* backdrop for top-level widgets (Scene and Object only) */
static void acf_generic_root_backdrop(bAnimContext *ac, bAnimListElem *ale, float yminc, float ymaxc)
{
- bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale);
- View2D *v2d= &ac->ar->v2d;
- short expanded= ANIM_channel_setting_get(ac, ale, ACHANNEL_SETTING_EXPAND) != 0;
- short offset= (acf->get_offset) ? acf->get_offset(ac, ale) : 0;
+ bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale);
+ View2D *v2d = &ac->ar->v2d;
+ short expanded = ANIM_channel_setting_get(ac, ale, ACHANNEL_SETTING_EXPAND) != 0;
+ short offset = (acf->get_offset) ? acf->get_offset(ac, ale) : 0;
float color[3];
/* set backdrop drawing color */
@@ -119,23 +119,23 @@ static void acf_generic_root_backdrop(bAnimContext *ac, bAnimListElem *ale, floa
/* rounded corners on LHS only - top only when expanded, but bottom too when collapsed */
uiSetRoundBox(expanded ? UI_CNR_TOP_LEFT : (UI_CNR_TOP_LEFT | UI_CNR_BOTTOM_LEFT));
- uiDrawBox(GL_POLYGON, offset, yminc, v2d->cur.xmax+EXTRA_SCROLL_PAD, ymaxc, 8);
+ uiDrawBox(GL_POLYGON, offset, yminc, v2d->cur.xmax + EXTRA_SCROLL_PAD, ymaxc, 8);
}
/* get backdrop color for data expanders under top-level Scene/Object */
-static void acf_generic_dataexpand_color(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale), float *color)
+static void acf_generic_dataexpand_color(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale), float r_color[3])
{
/* lighter color than top-level widget */
- UI_GetThemeColor3fv(TH_DOPESHEET_CHANNELSUBOB, color);
+ UI_GetThemeColor3fv(TH_DOPESHEET_CHANNELSUBOB, r_color);
}
/* backdrop for data expanders under top-level Scene/Object */
static void acf_generic_dataexpand_backdrop(bAnimContext *ac, bAnimListElem *ale, float yminc, float ymaxc)
{
- bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale);
- View2D *v2d= &ac->ar->v2d;
- short offset= (acf->get_offset) ? acf->get_offset(ac, ale) : 0;
+ bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale);
+ View2D *v2d = &ac->ar->v2d;
+ short offset = (acf->get_offset) ? acf->get_offset(ac, ale) : 0;
float color[3];
/* set backdrop drawing color */
@@ -143,24 +143,24 @@ static void acf_generic_dataexpand_backdrop(bAnimContext *ac, bAnimListElem *ale
glColor3fv(color);
/* no rounded corner - just rectangular box */
- glRectf(offset, yminc, v2d->cur.xmax+EXTRA_SCROLL_PAD, ymaxc);
+ glRectf(offset, yminc, v2d->cur.xmax + EXTRA_SCROLL_PAD, ymaxc);
}
/* get backdrop color for generic channels */
-static void acf_generic_channel_color(bAnimContext *ac, bAnimListElem *ale, float *color)
+static void acf_generic_channel_color(bAnimContext *ac, bAnimListElem *ale, float r_color[3])
{
- bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale);
+ bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale);
SpaceAction *saction = NULL;
bActionGroup *grp = NULL;
- short indent= (acf->get_indent_level) ? acf->get_indent_level(ac, ale) : 0;
+ short indent = (acf->get_indent_level) ? acf->get_indent_level(ac, ale) : 0;
/* get context info needed... */
if ((ac->sl) && (ac->spacetype == SPACE_ACTION))
- saction= (SpaceAction *)ac->sl;
+ saction = (SpaceAction *)ac->sl;
if (ale->type == ANIMTYPE_FCURVE) {
- FCurve *fcu= (FCurve *)ale->data;
- grp= fcu->grp;
+ FCurve *fcu = (FCurve *)ale->data;
+ grp = fcu->grp;
}
/* set color for normal channels
@@ -168,7 +168,7 @@ static void acf_generic_channel_color(bAnimContext *ac, bAnimListElem *ale, floa
* - only use group colors if allowed to, and if actually feasible
*/
if ( (saction && !(saction->flag & SACTION_NODRAWGCOLORS)) &&
- ((grp) && (grp->customCol)) )
+ ((grp) && (grp->customCol)) )
{
unsigned char cp[3];
@@ -183,21 +183,21 @@ static void acf_generic_channel_color(bAnimContext *ac, bAnimListElem *ale, floa
}
/* copy the colors over, transforming from bytes to floats */
- rgb_uchar_to_float(color, cp);
+ rgb_uchar_to_float(r_color, cp);
}
else {
// FIXME: what happens when the indention is 1 greater than what it should be (due to grouping)?
- int colOfs= 20 - 20*indent;
- UI_GetThemeColorShade3fv(TH_HEADER, colOfs, color);
+ int colOfs = 20 - 20 * indent;
+ UI_GetThemeColorShade3fv(TH_HEADER, colOfs, r_color);
}
}
/* backdrop for generic channels */
static void acf_generic_channel_backdrop(bAnimContext *ac, bAnimListElem *ale, float yminc, float ymaxc)
{
- bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale);
- View2D *v2d= &ac->ar->v2d;
- short offset= (acf->get_offset) ? acf->get_offset(ac, ale) : 0;
+ bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale);
+ View2D *v2d = &ac->ar->v2d;
+ short offset = (acf->get_offset) ? acf->get_offset(ac, ale) : 0;
float color[3];
/* set backdrop drawing color */
@@ -205,7 +205,7 @@ static void acf_generic_channel_backdrop(bAnimContext *ac, bAnimListElem *ale, f
glColor3fv(color);
/* no rounded corners - just rectangular box */
- glRectf(offset, yminc, v2d->cur.xmax+EXTRA_SCROLL_PAD, ymaxc);
+ glRectf(offset, yminc, v2d->cur.xmax + EXTRA_SCROLL_PAD, ymaxc);
}
/* Indention + Offset ------------------------------------------- */
@@ -229,11 +229,11 @@ static short acf_generic_indention_2(bAnimContext *ac, bAnimListElem *ale)
/* indention which varies with the grouping status */
static short acf_generic_indention_flexible(bAnimContext *UNUSED(ac), bAnimListElem *ale)
{
- short indent= 0;
+ short indent = 0;
/* grouped F-Curves need extra level of indention */
if (ale->type == ANIMTYPE_FCURVE) {
- FCurve *fcu= (FCurve *)ale->data;
+ FCurve *fcu = (FCurve *)ale->data;
// TODO: we need some way of specifying that the indention color should be one less...
if (fcu->grp)
@@ -247,7 +247,7 @@ static short acf_generic_indention_flexible(bAnimContext *UNUSED(ac), bAnimListE
/* basic offset for channels derived from indention */
static short acf_generic_basic_offset(bAnimContext *ac, bAnimListElem *ale)
{
- bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale);
+ bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale);
if (acf && acf->get_indent_level)
return acf->get_indent_level(ac, ale) * INDENT_STEP_SIZE;
@@ -272,7 +272,7 @@ static short acf_nodetree_rootType_offset(bNodeTree *ntree)
case NTREE_TEXTURE:
/* 2 additional levels */
- return INDENT_STEP_SIZE*2;
+ return INDENT_STEP_SIZE * 2;
}
}
@@ -283,7 +283,7 @@ static short acf_nodetree_rootType_offset(bNodeTree *ntree)
/* offset for groups + grouped entities */
static short acf_generic_group_offset(bAnimContext *ac, bAnimListElem *ale)
{
- short offset= acf_generic_basic_offset(ac, ale);
+ short offset = acf_generic_basic_offset(ac, ale);
if (ale->id) {
/* texture animdata */
@@ -291,7 +291,7 @@ static short acf_generic_group_offset(bAnimContext *ac, bAnimListElem *ale)
offset += 21;
}
/* materials and particles animdata */
- else if (ELEM(GS(ale->id->name),ID_MA,ID_PA))
+ else if (ELEM(GS(ale->id->name), ID_MA, ID_PA))
offset += 14;
/* if not in Action Editor mode, action-groups (and their children) must carry some offset too... */
@@ -300,7 +300,7 @@ static short acf_generic_group_offset(bAnimContext *ac, bAnimListElem *ale)
/* nodetree animdata */
if (GS(ale->id->name) == ID_NT) {
- offset += acf_nodetree_rootType_offset((bNodeTree*)ale->id);
+ offset += acf_nodetree_rootType_offset((bNodeTree *)ale->id);
}
}
@@ -313,11 +313,11 @@ static short acf_generic_group_offset(bAnimContext *ac, bAnimListElem *ale)
/* name for ID block entries */
static void acf_generic_idblock_name(bAnimListElem *ale, char *name)
{
- ID *id= (ID *)ale->data; /* data pointed to should be an ID block */
+ ID *id = (ID *)ale->data; /* data pointed to should be an ID block */
/* just copy the name... */
if (id && name)
- BLI_strncpy(name, id->name+2, ANIM_CHAN_NAME_SIZE);
+ BLI_strncpy(name, id->name + 2, ANIM_CHAN_NAME_SIZE);
}
/* name property for ID block entries */
@@ -374,20 +374,20 @@ static short acf_generic_dataexpand_setting_valid(bAnimContext *ac, bAnimListEle
/* Animation Summary ----------------------------------- */
/* get backdrop color for summary widget */
-static void acf_summary_color(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale), float *color)
+static void acf_summary_color(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale), float r_color[3])
{
// FIXME: hardcoded color - same as the 'action' line in NLA
- // reddish color
- color[0] = 0.8f;
- color[1] = 0.2f;
- color[2] = 0.0f;
+ // reddish color
+ r_color[0] = 0.8f;
+ r_color[1] = 0.2f;
+ r_color[2] = 0.0f;
}
/* backdrop for summary widget */
static void acf_summary_backdrop(bAnimContext *ac, bAnimListElem *ale, float yminc, float ymaxc)
{
- bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale);
- View2D *v2d= &ac->ar->v2d;
+ bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale);
+ View2D *v2d = &ac->ar->v2d;
float color[3];
/* set backdrop drawing color */
@@ -399,7 +399,7 @@ static void acf_summary_backdrop(bAnimContext *ac, bAnimListElem *ale, float ymi
* - special hack: make the top a bit higher, since we are first...
*/
uiSetRoundBox(UI_CNR_TOP_LEFT | UI_CNR_BOTTOM_LEFT);
- uiDrawBox(GL_POLYGON, 0, yminc-2, v2d->cur.xmax+EXTRA_SCROLL_PAD, ymaxc, 8);
+ uiDrawBox(GL_POLYGON, 0, yminc - 2, v2d->cur.xmax + EXTRA_SCROLL_PAD, ymaxc, 8);
}
/* name for summary entries */
@@ -427,12 +427,12 @@ static int acf_summary_setting_flag(bAnimContext *UNUSED(ac), int setting, short
{
if (setting == ACHANNEL_SETTING_EXPAND) {
/* expanded */
- *neg= 1;
+ *neg = 1;
return ADS_FLAG_SUMMARY_COLLAPSED;
}
else {
/* unsupported */
- *neg= 0;
+ *neg = 0;
return 0;
}
}
@@ -440,21 +440,21 @@ static int acf_summary_setting_flag(bAnimContext *UNUSED(ac), int setting, short
/* get pointer to the setting */
static void *acf_summary_setting_ptr(bAnimListElem *ale, int setting, short *type)
{
- bAnimContext *ac= (bAnimContext *)ale->data;
+ bAnimContext *ac = (bAnimContext *)ale->data;
/* if data is valid, return pointer to active dopesheet's relevant flag
* - this is restricted to DopeSheet/Action Editor only
*/
if ((ac->sl) && (ac->spacetype == SPACE_ACTION) && (setting == ACHANNEL_SETTING_EXPAND)) {
- SpaceAction *saction= (SpaceAction *)ac->sl;
- bDopeSheet *ads= &saction->ads;
+ SpaceAction *saction = (SpaceAction *)ac->sl;
+ bDopeSheet *ads = &saction->ads;
/* return pointer to DopeSheet's flag */
return GET_ACF_FLAG_PTR(ads->flag, type);
}
else {
/* can't return anything useful - unsupported */
- *type= 0;
+ *type = 0;
return NULL;
}
}
@@ -462,20 +462,20 @@ static void *acf_summary_setting_ptr(bAnimListElem *ale, int setting, short *typ
/* all animation summary (DopeSheet only) type define */
static bAnimChannelType ACF_SUMMARY =
{
- "Summary", /* type name */
+ "Summary", /* type name */
- acf_summary_color, /* backdrop color */
- acf_summary_backdrop, /* backdrop */
- acf_generic_indention_0, /* indent level */
- NULL, /* offset */
-
- acf_summary_name, /* name */
- NULL, /* name prop */
- acf_summary_icon, /* icon */
-
- acf_summary_setting_valid, /* has setting */
- acf_summary_setting_flag, /* flag for setting */
- acf_summary_setting_ptr /* pointer for setting */
+ acf_summary_color, /* backdrop color */
+ acf_summary_backdrop, /* backdrop */
+ acf_generic_indention_0, /* indent level */
+ NULL, /* offset */
+
+ acf_summary_name, /* name */
+ NULL, /* name prop */
+ acf_summary_icon, /* icon */
+
+ acf_summary_setting_valid, /* has setting */
+ acf_summary_setting_flag, /* flag for setting */
+ acf_summary_setting_ptr /* pointer for setting */
};
/* Scene ------------------------------------------- */
@@ -512,21 +512,21 @@ static short acf_scene_setting_valid(bAnimContext *ac, bAnimListElem *UNUSED(ale
static int acf_scene_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg)
{
/* clear extra return data first */
- *neg= 0;
+ *neg = 0;
switch (setting) {
case ACHANNEL_SETTING_SELECT: /* selected */
return SCE_DS_SELECTED;
case ACHANNEL_SETTING_EXPAND: /* expanded */
- *neg= 1;
+ *neg = 1;
return SCE_DS_COLLAPSED;
case ACHANNEL_SETTING_MUTE: /* mute (only in NLA) */
return ADT_NLA_EVAL_OFF;
case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
- *neg= 1;
+ *neg = 1;
return ADT_CURVES_NOT_VISIBLE;
default: /* unsupported */
@@ -537,10 +537,10 @@ static int acf_scene_setting_flag(bAnimContext *UNUSED(ac), int setting, short *
/* get pointer to the setting */
static void *acf_scene_setting_ptr(bAnimListElem *ale, int setting, short *type)
{
- Scene *scene= (Scene *)ale->data;
+ Scene *scene = (Scene *)ale->data;
/* clear extra return data first */
- *type= 0;
+ *type = 0;
switch (setting) {
case ACHANNEL_SETTING_SELECT: /* selected */
@@ -564,28 +564,28 @@ static void *acf_scene_setting_ptr(bAnimListElem *ale, int setting, short *type)
/* scene type define */
static bAnimChannelType ACF_SCENE =
{
- "Scene", /* type name */
+ "Scene", /* type name */
- acf_generic_root_color, /* backdrop color */
- acf_generic_root_backdrop, /* backdrop */
- acf_generic_indention_0, /* indent level */
- NULL, /* offset */
-
- acf_generic_idblock_name, /* name */
- acf_generic_idblock_nameprop, /* name prop */
- acf_scene_icon, /* icon */
-
- acf_scene_setting_valid, /* has setting */
- acf_scene_setting_flag, /* flag for setting */
- acf_scene_setting_ptr /* pointer for setting */
+ acf_generic_root_color, /* backdrop color */
+ acf_generic_root_backdrop, /* backdrop */
+ acf_generic_indention_0, /* indent level */
+ NULL, /* offset */
+
+ acf_generic_idblock_name, /* name */
+ acf_generic_idblock_nameprop, /* name prop */
+ acf_scene_icon, /* icon */
+
+ acf_scene_setting_valid, /* has setting */
+ acf_scene_setting_flag, /* flag for setting */
+ acf_scene_setting_ptr /* pointer for setting */
};
/* Object ------------------------------------------- */
static int acf_object_icon(bAnimListElem *ale)
{
- Base *base= (Base *)ale->data;
- Object *ob= base->object;
+ Base *base = (Base *)ale->data;
+ Object *ob = base->object;
/* icon depends on object-type */
@@ -621,19 +621,19 @@ static int acf_object_icon(bAnimListElem *ale)
/* name for object */
static void acf_object_name(bAnimListElem *ale, char *name)
{
- Base *base= (Base *)ale->data;
- Object *ob= base->object;
+ Base *base = (Base *)ale->data;
+ Object *ob = base->object;
/* just copy the name... */
if (ob && name)
- BLI_strncpy(name, ob->id.name+2, ANIM_CHAN_NAME_SIZE);
+ BLI_strncpy(name, ob->id.name + 2, ANIM_CHAN_NAME_SIZE);
}
/* check if some setting exists for this channel */
static short acf_object_setting_valid(bAnimContext *ac, bAnimListElem *ale, int setting)
{
- Base *base= (Base *)ale->data;
- Object *ob= base->object;
+ Base *base = (Base *)ale->data;
+ Object *ob = base->object;
switch (setting) {
/* muted only in NLA */
@@ -658,21 +658,21 @@ static short acf_object_setting_valid(bAnimContext *ac, bAnimListElem *ale, int
static int acf_object_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg)
{
/* clear extra return data first */
- *neg= 0;
+ *neg = 0;
switch (setting) {
case ACHANNEL_SETTING_SELECT: /* selected */
return SELECT;
case ACHANNEL_SETTING_EXPAND: /* expanded */
- *neg= 1;
+ *neg = 1;
return OB_ADS_COLLAPSED;
case ACHANNEL_SETTING_MUTE: /* mute (only in NLA) */
return ADT_NLA_EVAL_OFF;
case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
- *neg= 1;
+ *neg = 1;
return ADT_CURVES_NOT_VISIBLE;
default: /* unsupported */
@@ -683,11 +683,11 @@ static int acf_object_setting_flag(bAnimContext *UNUSED(ac), int setting, short
/* get pointer to the setting */
static void *acf_object_setting_ptr(bAnimListElem *ale, int setting, short *type)
{
- Base *base= (Base *)ale->data;
- Object *ob= base->object;
+ Base *base = (Base *)ale->data;
+ Object *ob = base->object;
/* clear extra return data first */
- *type= 0;
+ *type = 0;
switch (setting) {
case ACHANNEL_SETTING_SELECT: /* selected */
@@ -711,41 +711,41 @@ static void *acf_object_setting_ptr(bAnimListElem *ale, int setting, short *type
/* object type define */
static bAnimChannelType ACF_OBJECT =
{
- "Object", /* type name */
+ "Object", /* type name */
- acf_generic_root_color, /* backdrop color */
- acf_generic_root_backdrop, /* backdrop */
- acf_generic_indention_0, /* indent level */
- NULL, /* offset */
-
- acf_object_name, /* name */
- acf_generic_idblock_nameprop, /* name prop */
- acf_object_icon, /* icon */
-
- acf_object_setting_valid, /* has setting */
- acf_object_setting_flag, /* flag for setting */
- acf_object_setting_ptr /* pointer for setting */
+ acf_generic_root_color, /* backdrop color */
+ acf_generic_root_backdrop, /* backdrop */
+ acf_generic_indention_0, /* indent level */
+ NULL, /* offset */
+
+ acf_object_name, /* name */
+ acf_generic_idblock_nameprop, /* name prop */
+ acf_object_icon, /* icon */
+
+ acf_object_setting_valid, /* has setting */
+ acf_object_setting_flag, /* flag for setting */
+ acf_object_setting_ptr /* pointer for setting */
};
/* Group ------------------------------------------- */
/* get backdrop color for group widget */
-static void acf_group_color(bAnimContext *UNUSED(ac), bAnimListElem *ale, float *color)
+static void acf_group_color(bAnimContext *UNUSED(ac), bAnimListElem *ale, float r_color[3])
{
/* highlight only for action group channels */
if (ale->flag & AGRP_ACTIVE)
- UI_GetThemeColorShade3fv(TH_GROUP_ACTIVE, 10, color);
+ UI_GetThemeColorShade3fv(TH_GROUP_ACTIVE, 10, r_color);
else
- UI_GetThemeColorShade3fv(TH_GROUP, 20, color);
+ UI_GetThemeColorShade3fv(TH_GROUP, 20, r_color);
}
/* backdrop for group widget */
static void acf_group_backdrop(bAnimContext *ac, bAnimListElem *ale, float yminc, float ymaxc)
{
- bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale);
- View2D *v2d= &ac->ar->v2d;
- short expanded= ANIM_channel_setting_get(ac, ale, ACHANNEL_SETTING_EXPAND) != 0;
- short offset= (acf->get_offset) ? acf->get_offset(ac, ale) : 0;
+ bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale);
+ View2D *v2d = &ac->ar->v2d;
+ short expanded = ANIM_channel_setting_get(ac, ale, ACHANNEL_SETTING_EXPAND) != 0;
+ short offset = (acf->get_offset) ? acf->get_offset(ac, ale) : 0;
float color[3];
/* set backdrop drawing color */
@@ -754,13 +754,13 @@ static void acf_group_backdrop(bAnimContext *ac, bAnimListElem *ale, float yminc
/* rounded corners on LHS only - top only when expanded, but bottom too when collapsed */
uiSetRoundBox(expanded ? UI_CNR_TOP_LEFT : (UI_CNR_TOP_LEFT | UI_CNR_BOTTOM_LEFT));
- uiDrawBox(GL_POLYGON, offset, yminc, v2d->cur.xmax+EXTRA_SCROLL_PAD, ymaxc, 8);
+ uiDrawBox(GL_POLYGON, offset, yminc, v2d->cur.xmax + EXTRA_SCROLL_PAD, ymaxc, 8);
}
/* name for group entries */
static void acf_group_name(bAnimListElem *ale, char *name)
{
- bActionGroup *agrp= (bActionGroup *)ale->data;
+ bActionGroup *agrp = (bActionGroup *)ale->data;
/* just copy the name... */
if (agrp && name)
@@ -782,7 +782,7 @@ static short acf_group_setting_valid(bAnimContext *ac, bAnimListElem *UNUSED(ale
/* for now, all settings are supported, though some are only conditionally */
switch (setting) {
case ACHANNEL_SETTING_VISIBLE: /* Only available in Graph Editor */
- return (ac->spacetype==SPACE_IPO);
+ return (ac->spacetype == SPACE_IPO);
default: /* always supported */
return 1;
@@ -793,7 +793,7 @@ static short acf_group_setting_valid(bAnimContext *ac, bAnimListElem *UNUSED(ale
static int acf_group_setting_flag(bAnimContext *ac, int setting, short *neg)
{
/* clear extra return data first */
- *neg= 0;
+ *neg = 0;
switch (setting) {
case ACHANNEL_SETTING_SELECT: /* selected */
@@ -806,8 +806,8 @@ static int acf_group_setting_flag(bAnimContext *ac, int setting, short *neg)
* proved to be a hazard for workflows...
*/
return (ac->spacetype == SPACE_IPO) ?
- AGRP_EXPANDED_G : /* Graph Editor case */
- AGRP_EXPANDED; /* DopeSheet and elsewhere */
+ AGRP_EXPANDED_G : /* Graph Editor case */
+ AGRP_EXPANDED; /* DopeSheet and elsewhere */
}
case ACHANNEL_SETTING_MUTE: /* muted */
@@ -818,7 +818,7 @@ static int acf_group_setting_flag(bAnimContext *ac, int setting, short *neg)
return AGRP_PROTECTED;
case ACHANNEL_SETTING_VISIBLE: /* visiblity - graph editor */
- *neg= 1;
+ *neg = 1;
return AGRP_NOTVISIBLE;
}
@@ -829,7 +829,7 @@ static int acf_group_setting_flag(bAnimContext *ac, int setting, short *neg)
/* get pointer to the setting */
static void *acf_group_setting_ptr(bAnimListElem *ale, int UNUSED(setting), short *type)
{
- bActionGroup *agrp= (bActionGroup *)ale->data;
+ bActionGroup *agrp = (bActionGroup *)ale->data;
/* all flags are just in agrp->flag for now... */
return GET_ACF_FLAG_PTR(agrp->flag, type);
@@ -838,20 +838,20 @@ static void *acf_group_setting_ptr(bAnimListElem *ale, int UNUSED(setting), shor
/* group type define */
static bAnimChannelType ACF_GROUP =
{
- "Group", /* type name */
+ "Group", /* type name */
- acf_group_color, /* backdrop color */
- acf_group_backdrop, /* backdrop */
- acf_generic_indention_0, /* indent level */
- acf_generic_group_offset, /* offset */
-
- acf_group_name, /* name */
- acf_group_name_prop, /* name prop */
- NULL, /* icon */
-
- acf_group_setting_valid, /* has setting */
- acf_group_setting_flag, /* flag for setting */
- acf_group_setting_ptr /* pointer for setting */
+ acf_group_color, /* backdrop color */
+ acf_group_backdrop, /* backdrop */
+ acf_generic_indention_0, /* indent level */
+ acf_generic_group_offset, /* offset */
+
+ acf_group_name, /* name */
+ acf_group_name_prop, /* name prop */
+ NULL, /* icon */
+
+ acf_group_setting_valid, /* has setting */
+ acf_group_setting_flag, /* flag for setting */
+ acf_group_setting_ptr /* pointer for setting */
};
/* F-Curve ------------------------------------------- */
@@ -865,7 +865,7 @@ static void acf_fcurve_name(bAnimListElem *ale, char *name)
/* check if some setting exists for this channel */
static short acf_fcurve_setting_valid(bAnimContext *ac, bAnimListElem *ale, int setting)
{
- FCurve *fcu= (FCurve *)ale->data;
+ FCurve *fcu = (FCurve *)ale->data;
switch (setting) {
/* unsupported */
@@ -877,10 +877,10 @@ static short acf_fcurve_setting_valid(bAnimContext *ac, bAnimListElem *ale, int
if (fcu->bezt)
return 1;
else
- return 0; // NOTE: in this special case, we need to draw ICON_ZOOMOUT
+ return 0; // NOTE: in this special case, we need to draw ICON_ZOOMOUT
case ACHANNEL_SETTING_VISIBLE: /* Only available in Graph Editor */
- return (ac->spacetype==SPACE_IPO);
+ return (ac->spacetype == SPACE_IPO);
/* always available */
default:
@@ -892,7 +892,7 @@ static short acf_fcurve_setting_valid(bAnimContext *ac, bAnimListElem *ale, int
static int acf_fcurve_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg)
{
/* clear extra return data first */
- *neg= 0;
+ *neg = 0;
switch (setting) {
case ACHANNEL_SETTING_SELECT: /* selected */
@@ -916,7 +916,7 @@ static int acf_fcurve_setting_flag(bAnimContext *UNUSED(ac), int setting, short
/* get pointer to the setting */
static void *acf_fcurve_setting_ptr(bAnimListElem *ale, int UNUSED(setting), short *type)
{
- FCurve *fcu= (FCurve *)ale->data;
+ FCurve *fcu = (FCurve *)ale->data;
/* all flags are just in agrp->flag for now... */
return GET_ACF_FLAG_PTR(fcu->flag, type);
@@ -925,20 +925,20 @@ static void *acf_fcurve_setting_ptr(bAnimListElem *ale, int UNUSED(setting), sho
/* fcurve type define */
static bAnimChannelType ACF_FCURVE =
{
- "F-Curve", /* type name */
+ "F-Curve", /* type name */
- acf_generic_channel_color, /* backdrop color */
- acf_generic_channel_backdrop, /* backdrop */
- acf_generic_indention_flexible, /* indent level */ // xxx rename this to f-curves only?
- acf_generic_group_offset, /* offset */
-
- acf_fcurve_name, /* name */
- NULL, /* name prop */
- NULL, /* icon */
-
- acf_fcurve_setting_valid, /* has setting */
- acf_fcurve_setting_flag, /* flag for setting */
- acf_fcurve_setting_ptr /* pointer for setting */
+ acf_generic_channel_color, /* backdrop color */
+ acf_generic_channel_backdrop, /* backdrop */
+ acf_generic_indention_flexible, /* indent level */ // xxx rename this to f-curves only?
+ acf_generic_group_offset, /* offset */
+
+ acf_fcurve_name, /* name */
+ NULL, /* name prop */
+ NULL, /* icon */
+
+ acf_fcurve_setting_valid, /* has setting */
+ acf_fcurve_setting_flag, /* flag for setting */
+ acf_fcurve_setting_ptr /* pointer for setting */
};
/* Object Action Expander ------------------------------------------- */
@@ -967,14 +967,14 @@ static short acf_fillactd_setting_valid(bAnimContext *UNUSED(ac), bAnimListElem
static int acf_fillactd_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg)
{
/* clear extra return data first */
- *neg= 0;
+ *neg = 0;
switch (setting) {
case ACHANNEL_SETTING_SELECT: /* selected */
return ADT_UI_SELECTED;
case ACHANNEL_SETTING_EXPAND: /* expanded */
- *neg= 1;
+ *neg = 1;
return ACT_COLLAPSED;
default: /* unsupported */
@@ -985,11 +985,11 @@ static int acf_fillactd_setting_flag(bAnimContext *UNUSED(ac), int setting, shor
/* get pointer to the setting */
static void *acf_fillactd_setting_ptr(bAnimListElem *ale, int setting, short *type)
{
- bAction *act= (bAction *)ale->data;
- AnimData *adt= ale->adt;
+ bAction *act = (bAction *)ale->data;
+ AnimData *adt = ale->adt;
/* clear extra return data first */
- *type= 0;
+ *type = 0;
switch (setting) {
case ACHANNEL_SETTING_SELECT: /* selected */
@@ -1010,20 +1010,20 @@ static void *acf_fillactd_setting_ptr(bAnimListElem *ale, int setting, short *ty
/* object action expander type define */
static bAnimChannelType ACF_FILLACTD =
{
- "Ob-Action Filler", /* type name */
+ "Ob-Action Filler", /* type name */
- acf_generic_dataexpand_color, /* backdrop color */
- acf_generic_dataexpand_backdrop,/* backdrop */
- acf_generic_indention_1, /* indent level */
- acf_generic_basic_offset, /* offset */
-
- acf_generic_idblock_name, /* name */
- acf_generic_idfill_nameprop, /* name prop */
- acf_fillactd_icon, /* icon */
-
- acf_fillactd_setting_valid, /* has setting */
- acf_fillactd_setting_flag, /* flag for setting */
- acf_fillactd_setting_ptr /* pointer for setting */
+ acf_generic_dataexpand_color, /* backdrop color */
+ acf_generic_dataexpand_backdrop, /* backdrop */
+ acf_generic_indention_1, /* indent level */
+ acf_generic_basic_offset, /* offset */
+
+ acf_generic_idblock_name, /* name */
+ acf_generic_idfill_nameprop, /* name prop */
+ acf_fillactd_icon, /* icon */
+
+ acf_fillactd_setting_valid, /* has setting */
+ acf_fillactd_setting_flag, /* flag for setting */
+ acf_fillactd_setting_ptr /* pointer for setting */
};
/* Drivers Expander ------------------------------------------- */
@@ -1057,11 +1057,11 @@ static short acf_filldrivers_setting_valid(bAnimContext *UNUSED(ac), bAnimListEl
static int acf_filldrivers_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg)
{
/* clear extra return data first */
- *neg= 0;
+ *neg = 0;
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
- *neg= 1;
+ *neg = 1;
return ADT_DRIVERS_COLLAPSED;
default: /* unsupported */
@@ -1072,10 +1072,10 @@ static int acf_filldrivers_setting_flag(bAnimContext *UNUSED(ac), int setting, s
/* get pointer to the setting */
static void *acf_filldrivers_setting_ptr(bAnimListElem *ale, int setting, short *type)
{
- AnimData *adt= (AnimData *)ale->data;
+ AnimData *adt = (AnimData *)ale->data;
/* clear extra return data first */
- *type= 0;
+ *type = 0;
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
@@ -1089,20 +1089,20 @@ static void *acf_filldrivers_setting_ptr(bAnimListElem *ale, int setting, short
/* drivers expander type define */
static bAnimChannelType ACF_FILLDRIVERS =
{
- "Drivers Filler", /* type name */
+ "Drivers Filler", /* type name */
- acf_generic_dataexpand_color, /* backdrop color */
- acf_generic_dataexpand_backdrop,/* backdrop */
- acf_generic_indention_1, /* indent level */
- acf_generic_basic_offset, /* offset */
-
- acf_filldrivers_name, /* name */
- NULL, /* name prop */
- acf_filldrivers_icon, /* icon */
-
- acf_filldrivers_setting_valid, /* has setting */
- acf_filldrivers_setting_flag, /* flag for setting */
- acf_filldrivers_setting_ptr /* pointer for setting */
+ acf_generic_dataexpand_color, /* backdrop color */
+ acf_generic_dataexpand_backdrop, /* backdrop */
+ acf_generic_indention_1, /* indent level */
+ acf_generic_basic_offset, /* offset */
+
+ acf_filldrivers_name, /* name */
+ NULL, /* name prop */
+ acf_filldrivers_icon, /* icon */
+
+ acf_filldrivers_setting_valid, /* has setting */
+ acf_filldrivers_setting_flag, /* flag for setting */
+ acf_filldrivers_setting_ptr /* pointer for setting */
};
@@ -1118,7 +1118,7 @@ static int acf_dsmat_icon(bAnimListElem *UNUSED(ale))
static int acf_dsmat_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg)
{
/* clear extra return data first */
- *neg= 0;
+ *neg = 0;
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
@@ -1128,7 +1128,7 @@ static int acf_dsmat_setting_flag(bAnimContext *UNUSED(ac), int setting, short *
return ADT_NLA_EVAL_OFF;
case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
- *neg= 1;
+ *neg = 1;
return ADT_CURVES_NOT_VISIBLE;
case ACHANNEL_SETTING_SELECT: /* selected */
@@ -1142,10 +1142,10 @@ static int acf_dsmat_setting_flag(bAnimContext *UNUSED(ac), int setting, short *
/* get pointer to the setting */
static void *acf_dsmat_setting_ptr(bAnimListElem *ale, int setting, short *type)
{
- Material *ma= (Material *)ale->data;
+ Material *ma = (Material *)ale->data;
/* clear extra return data first */
- *type= 0;
+ *type = 0;
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
@@ -1165,22 +1165,22 @@ static void *acf_dsmat_setting_ptr(bAnimListElem *ale, int setting, short *type)
}
/* material expander type define */
-static bAnimChannelType ACF_DSMAT=
+static bAnimChannelType ACF_DSMAT =
{
- "Material Data Expander", /* type name */
+ "Material Data Expander", /* type name */
- acf_generic_dataexpand_color, /* backdrop color */
- acf_generic_dataexpand_backdrop,/* backdrop */
- acf_generic_indention_1, /* indent level */
- acf_generic_basic_offset, /* offset */
-
- acf_generic_idblock_name, /* name */
- acf_generic_idblock_nameprop, /* name prop */
- acf_dsmat_icon, /* icon */
-
- acf_generic_dataexpand_setting_valid, /* has setting */
- acf_dsmat_setting_flag, /* flag for setting */
- acf_dsmat_setting_ptr /* pointer for setting */
+ acf_generic_dataexpand_color, /* backdrop color */
+ acf_generic_dataexpand_backdrop, /* backdrop */
+ acf_generic_indention_1, /* indent level */
+ acf_generic_basic_offset, /* offset */
+
+ acf_generic_idblock_name, /* name */
+ acf_generic_idblock_nameprop, /* name prop */
+ acf_dsmat_icon, /* icon */
+
+ acf_generic_dataexpand_setting_valid, /* has setting */
+ acf_dsmat_setting_flag, /* flag for setting */
+ acf_dsmat_setting_ptr /* pointer for setting */
};
/* Lamp Expander ------------------------------------------- */
@@ -1195,7 +1195,7 @@ static int acf_dslam_icon(bAnimListElem *UNUSED(ale))
static int acf_dslam_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg)
{
/* clear extra return data first */
- *neg= 0;
+ *neg = 0;
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
@@ -1205,7 +1205,7 @@ static int acf_dslam_setting_flag(bAnimContext *UNUSED(ac), int setting, short *
return ADT_NLA_EVAL_OFF;
case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
- *neg= 1;
+ *neg = 1;
return ADT_CURVES_NOT_VISIBLE;
case ACHANNEL_SETTING_SELECT: /* selected */
@@ -1219,10 +1219,10 @@ static int acf_dslam_setting_flag(bAnimContext *UNUSED(ac), int setting, short *
/* get pointer to the setting */
static void *acf_dslam_setting_ptr(bAnimListElem *ale, int setting, short *type)
{
- Lamp *la= (Lamp *)ale->data;
+ Lamp *la = (Lamp *)ale->data;
/* clear extra return data first */
- *type= 0;
+ *type = 0;
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
@@ -1242,22 +1242,22 @@ static void *acf_dslam_setting_ptr(bAnimListElem *ale, int setting, short *type)
}
/* lamp expander type define */
-static bAnimChannelType ACF_DSLAM=
+static bAnimChannelType ACF_DSLAM =
{
- "Lamp Expander", /* type name */
+ "Lamp Expander", /* type name */
- acf_generic_dataexpand_color, /* backdrop color */
- acf_generic_dataexpand_backdrop,/* backdrop */
- acf_generic_indention_1, /* indent level */
- acf_generic_basic_offset, /* offset */
-
- acf_generic_idblock_name, /* name */
- acf_generic_idblock_nameprop, /* name prop */
- acf_dslam_icon, /* icon */
-
- acf_generic_dataexpand_setting_valid, /* has setting */
- acf_dslam_setting_flag, /* flag for setting */
- acf_dslam_setting_ptr /* pointer for setting */
+ acf_generic_dataexpand_color, /* backdrop color */
+ acf_generic_dataexpand_backdrop, /* backdrop */
+ acf_generic_indention_1, /* indent level */
+ acf_generic_basic_offset, /* offset */
+
+ acf_generic_idblock_name, /* name */
+ acf_generic_idblock_nameprop, /* name prop */
+ acf_dslam_icon, /* icon */
+
+ acf_generic_dataexpand_setting_valid, /* has setting */
+ acf_dslam_setting_flag, /* flag for setting */
+ acf_dslam_setting_ptr /* pointer for setting */
};
/* Texture Expander ------------------------------------------- */
@@ -1279,7 +1279,7 @@ static short acf_dstex_offset(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(al
static int acf_dstex_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg)
{
/* clear extra return data first */
- *neg= 0;
+ *neg = 0;
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
@@ -1289,7 +1289,7 @@ static int acf_dstex_setting_flag(bAnimContext *UNUSED(ac), int setting, short *
return ADT_NLA_EVAL_OFF;
case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
- *neg= 1;
+ *neg = 1;
return ADT_CURVES_NOT_VISIBLE;
case ACHANNEL_SETTING_SELECT: /* selected */
@@ -1303,10 +1303,10 @@ static int acf_dstex_setting_flag(bAnimContext *UNUSED(ac), int setting, short *
/* get pointer to the setting */
static void *acf_dstex_setting_ptr(bAnimListElem *ale, int setting, short *type)
{
- Tex *tex= (Tex *)ale->data;
+ Tex *tex = (Tex *)ale->data;
/* clear extra return data first */
- *type= 0;
+ *type = 0;
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
@@ -1326,22 +1326,22 @@ static void *acf_dstex_setting_ptr(bAnimListElem *ale, int setting, short *type)
}
/* texture expander type define */
-static bAnimChannelType ACF_DSTEX=
+static bAnimChannelType ACF_DSTEX =
{
- "Texture Data Expander", /* type name */
+ "Texture Data Expander", /* type name */
- acf_generic_dataexpand_color, /* backdrop color */
- acf_generic_dataexpand_backdrop,/* backdrop */
- acf_generic_indention_1, /* indent level */
- acf_dstex_offset, /* offset */
-
- acf_generic_idblock_name, /* name */
- acf_generic_idfill_nameprop, /* name prop */
- acf_dstex_icon, /* icon */
-
- acf_generic_dataexpand_setting_valid, /* has setting */
- acf_dstex_setting_flag, /* flag for setting */
- acf_dstex_setting_ptr /* pointer for setting */
+ acf_generic_dataexpand_color, /* backdrop color */
+ acf_generic_dataexpand_backdrop, /* backdrop */
+ acf_generic_indention_1, /* indent level */
+ acf_dstex_offset, /* offset */
+
+ acf_generic_idblock_name, /* name */
+ acf_generic_idfill_nameprop, /* name prop */
+ acf_dstex_icon, /* icon */
+
+ acf_generic_dataexpand_setting_valid, /* has setting */
+ acf_dstex_setting_flag, /* flag for setting */
+ acf_dstex_setting_ptr /* pointer for setting */
};
/* Camera Expander ------------------------------------------- */
@@ -1356,7 +1356,7 @@ static int acf_dscam_icon(bAnimListElem *UNUSED(ale))
static int acf_dscam_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg)
{
/* clear extra return data first */
- *neg= 0;
+ *neg = 0;
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
@@ -1366,7 +1366,7 @@ static int acf_dscam_setting_flag(bAnimContext *UNUSED(ac), int setting, short *
return ADT_NLA_EVAL_OFF;
case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
- *neg= 1;
+ *neg = 1;
return ADT_CURVES_NOT_VISIBLE;
case ACHANNEL_SETTING_SELECT: /* selected */
@@ -1380,10 +1380,10 @@ static int acf_dscam_setting_flag(bAnimContext *UNUSED(ac), int setting, short *
/* get pointer to the setting */
static void *acf_dscam_setting_ptr(bAnimListElem *ale, int setting, short *type)
{
- Camera *ca= (Camera *)ale->data;
+ Camera *ca = (Camera *)ale->data;
/* clear extra return data first */
- *type= 0;
+ *type = 0;
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
@@ -1403,22 +1403,22 @@ static void *acf_dscam_setting_ptr(bAnimListElem *ale, int setting, short *type)
}
/* camera expander type define */
-static bAnimChannelType ACF_DSCAM=
+static bAnimChannelType ACF_DSCAM =
{
- "Camera Expander", /* type name */
+ "Camera Expander", /* type name */
- acf_generic_dataexpand_color, /* backdrop color */
- acf_generic_dataexpand_backdrop,/* backdrop */
- acf_generic_indention_1, /* indent level */
- acf_generic_basic_offset, /* offset */
-
- acf_generic_idblock_name, /* name */
- acf_generic_idfill_nameprop, /* name prop */
- acf_dscam_icon, /* icon */
-
- acf_generic_dataexpand_setting_valid, /* has setting */
- acf_dscam_setting_flag, /* flag for setting */
- acf_dscam_setting_ptr /* pointer for setting */
+ acf_generic_dataexpand_color, /* backdrop color */
+ acf_generic_dataexpand_backdrop, /* backdrop */
+ acf_generic_indention_1, /* indent level */
+ acf_generic_basic_offset, /* offset */
+
+ acf_generic_idblock_name, /* name */
+ acf_generic_idfill_nameprop, /* name prop */
+ acf_dscam_icon, /* icon */
+
+ acf_generic_dataexpand_setting_valid, /* has setting */
+ acf_dscam_setting_flag, /* flag for setting */
+ acf_dscam_setting_ptr /* pointer for setting */
};
/* Curve Expander ------------------------------------------- */
@@ -1426,8 +1426,8 @@ static bAnimChannelType ACF_DSCAM=
// TODO: just get this from RNA?
static int acf_dscur_icon(bAnimListElem *ale)
{
- Curve *cu= (Curve *)ale->data;
- short obtype= curve_type(cu);
+ Curve *cu = (Curve *)ale->data;
+ short obtype = BKE_curve_type_get(cu);
switch (obtype) {
case OB_FONT:
@@ -1443,7 +1443,7 @@ static int acf_dscur_icon(bAnimListElem *ale)
static int acf_dscur_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg)
{
/* clear extra return data first */
- *neg= 0;
+ *neg = 0;
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
@@ -1453,7 +1453,7 @@ static int acf_dscur_setting_flag(bAnimContext *UNUSED(ac), int setting, short *
return ADT_NLA_EVAL_OFF;
case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
- *neg= 1;
+ *neg = 1;
return ADT_CURVES_NOT_VISIBLE;
case ACHANNEL_SETTING_SELECT: /* selected */
@@ -1467,10 +1467,10 @@ static int acf_dscur_setting_flag(bAnimContext *UNUSED(ac), int setting, short *
/* get pointer to the setting */
static void *acf_dscur_setting_ptr(bAnimListElem *ale, int setting, short *type)
{
- Curve *cu= (Curve *)ale->data;
+ Curve *cu = (Curve *)ale->data;
/* clear extra return data first */
- *type= 0;
+ *type = 0;
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
@@ -1490,22 +1490,22 @@ static void *acf_dscur_setting_ptr(bAnimListElem *ale, int setting, short *type)
}
/* curve expander type define */
-static bAnimChannelType ACF_DSCUR=
+static bAnimChannelType ACF_DSCUR =
{
- "Curve Expander", /* type name */
+ "Curve Expander", /* type name */
- acf_generic_dataexpand_color, /* backdrop color */
- acf_generic_dataexpand_backdrop,/* backdrop */
- acf_generic_indention_1, /* indent level */
- acf_generic_basic_offset, /* offset */
-
- acf_generic_idblock_name, /* name */
- acf_generic_idblock_nameprop, /* name prop */
- acf_dscur_icon, /* icon */
-
- acf_generic_dataexpand_setting_valid, /* has setting */
- acf_dscur_setting_flag, /* flag for setting */
- acf_dscur_setting_ptr /* pointer for setting */
+ acf_generic_dataexpand_color, /* backdrop color */
+ acf_generic_dataexpand_backdrop, /* backdrop */
+ acf_generic_indention_1, /* indent level */
+ acf_generic_basic_offset, /* offset */
+
+ acf_generic_idblock_name, /* name */
+ acf_generic_idblock_nameprop, /* name prop */
+ acf_dscur_icon, /* icon */
+
+ acf_generic_dataexpand_setting_valid, /* has setting */
+ acf_dscur_setting_flag, /* flag for setting */
+ acf_dscur_setting_ptr /* pointer for setting */
};
/* Shape Key Expander ------------------------------------------- */
@@ -1520,7 +1520,7 @@ static int acf_dsskey_icon(bAnimListElem *UNUSED(ale))
static int acf_dsskey_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg)
{
/* clear extra return data first */
- *neg= 0;
+ *neg = 0;
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
@@ -1530,7 +1530,7 @@ static int acf_dsskey_setting_flag(bAnimContext *UNUSED(ac), int setting, short
return ADT_NLA_EVAL_OFF;
case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
- *neg= 1;
+ *neg = 1;
return ADT_CURVES_NOT_VISIBLE;
case ACHANNEL_SETTING_SELECT: /* selected */
@@ -1544,10 +1544,10 @@ static int acf_dsskey_setting_flag(bAnimContext *UNUSED(ac), int setting, short
/* get pointer to the setting */
static void *acf_dsskey_setting_ptr(bAnimListElem *ale, int setting, short *type)
{
- Key *key= (Key *)ale->data;
+ Key *key = (Key *)ale->data;
/* clear extra return data first */
- *type= 0;
+ *type = 0;
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
@@ -1567,22 +1567,22 @@ static void *acf_dsskey_setting_ptr(bAnimListElem *ale, int setting, short *type
}
/* shapekey expander type define */
-static bAnimChannelType ACF_DSSKEY=
+static bAnimChannelType ACF_DSSKEY =
{
- "Shape Key Expander", /* type name */
+ "Shape Key Expander", /* type name */
- acf_generic_dataexpand_color, /* backdrop color */
- acf_generic_dataexpand_backdrop,/* backdrop */
- acf_generic_indention_1, /* indent level */
- acf_generic_basic_offset, /* offset */
-
- acf_generic_idblock_name, /* name */
- acf_generic_idblock_nameprop, /* name prop */
- acf_dsskey_icon, /* icon */
-
- acf_generic_dataexpand_setting_valid, /* has setting */
- acf_dsskey_setting_flag, /* flag for setting */
- acf_dsskey_setting_ptr /* pointer for setting */
+ acf_generic_dataexpand_color, /* backdrop color */
+ acf_generic_dataexpand_backdrop, /* backdrop */
+ acf_generic_indention_1, /* indent level */
+ acf_generic_basic_offset, /* offset */
+
+ acf_generic_idblock_name, /* name */
+ acf_generic_idblock_nameprop, /* name prop */
+ acf_dsskey_icon, /* icon */
+
+ acf_generic_dataexpand_setting_valid, /* has setting */
+ acf_dsskey_setting_flag, /* flag for setting */
+ acf_dsskey_setting_ptr /* pointer for setting */
};
/* World Expander ------------------------------------------- */
@@ -1597,7 +1597,7 @@ static int acf_dswor_icon(bAnimListElem *UNUSED(ale))
static int acf_dswor_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg)
{
/* clear extra return data first */
- *neg= 0;
+ *neg = 0;
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
@@ -1607,7 +1607,7 @@ static int acf_dswor_setting_flag(bAnimContext *UNUSED(ac), int setting, short *
return ADT_NLA_EVAL_OFF;
case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
- *neg= 1;
+ *neg = 1;
return ADT_CURVES_NOT_VISIBLE;
case ACHANNEL_SETTING_SELECT: /* selected */
@@ -1621,10 +1621,10 @@ static int acf_dswor_setting_flag(bAnimContext *UNUSED(ac), int setting, short *
/* get pointer to the setting */
static void *acf_dswor_setting_ptr(bAnimListElem *ale, int setting, short *type)
{
- World *wo= (World *)ale->data;
+ World *wo = (World *)ale->data;
/* clear extra return data first */
- *type= 0;
+ *type = 0;
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
@@ -1644,22 +1644,22 @@ static void *acf_dswor_setting_ptr(bAnimListElem *ale, int setting, short *type)
}
/* world expander type define */
-static bAnimChannelType ACF_DSWOR=
+static bAnimChannelType ACF_DSWOR =
{
- "World Expander", /* type name */
+ "World Expander", /* type name */
- acf_generic_dataexpand_color, /* backdrop color */
- acf_generic_dataexpand_backdrop,/* backdrop */
- acf_generic_indention_1, /* indent level */
- acf_generic_basic_offset, /* offset */
-
- acf_generic_idblock_name, /* name */
- acf_generic_idfill_nameprop, /* name prop */
- acf_dswor_icon, /* icon */
-
- acf_generic_dataexpand_setting_valid, /* has setting */
- acf_dswor_setting_flag, /* flag for setting */
- acf_dswor_setting_ptr /* pointer for setting */
+ acf_generic_dataexpand_color, /* backdrop color */
+ acf_generic_dataexpand_backdrop, /* backdrop */
+ acf_generic_indention_1, /* indent level */
+ acf_generic_basic_offset, /* offset */
+
+ acf_generic_idblock_name, /* name */
+ acf_generic_idfill_nameprop, /* name prop */
+ acf_dswor_icon, /* icon */
+
+ acf_generic_dataexpand_setting_valid, /* has setting */
+ acf_dswor_setting_flag, /* flag for setting */
+ acf_dswor_setting_ptr /* pointer for setting */
};
/* Particle Expander ------------------------------------------- */
@@ -1674,7 +1674,7 @@ static int acf_dspart_icon(bAnimListElem *UNUSED(ale))
static int acf_dspart_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg)
{
/* clear extra return data first */
- *neg= 0;
+ *neg = 0;
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
@@ -1684,7 +1684,7 @@ static int acf_dspart_setting_flag(bAnimContext *UNUSED(ac), int setting, short
return ADT_NLA_EVAL_OFF;
case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
- *neg= 1;
+ *neg = 1;
return ADT_CURVES_NOT_VISIBLE;
case ACHANNEL_SETTING_SELECT: /* selected */
@@ -1698,10 +1698,10 @@ static int acf_dspart_setting_flag(bAnimContext *UNUSED(ac), int setting, short
/* get pointer to the setting */
static void *acf_dspart_setting_ptr(bAnimListElem *ale, int setting, short *type)
{
- ParticleSettings *part= (ParticleSettings *)ale->data;
+ ParticleSettings *part = (ParticleSettings *)ale->data;
/* clear extra return data first */
- *type= 0;
+ *type = 0;
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
@@ -1721,22 +1721,22 @@ static void *acf_dspart_setting_ptr(bAnimListElem *ale, int setting, short *type
}
/* particle expander type define */
-static bAnimChannelType ACF_DSPART=
+static bAnimChannelType ACF_DSPART =
{
- "Particle Data Expander", /* type name */
+ "Particle Data Expander", /* type name */
- acf_generic_dataexpand_color, /* backdrop color */
- acf_generic_dataexpand_backdrop,/* backdrop */
- acf_generic_indention_1, /* indent level */
- acf_generic_basic_offset, /* offset */
-
- acf_generic_idblock_name, /* name */
- acf_generic_idblock_nameprop, /* name prop */
- acf_dspart_icon, /* icon */
-
- acf_generic_dataexpand_setting_valid, /* has setting */
- acf_dspart_setting_flag, /* flag for setting */
- acf_dspart_setting_ptr /* pointer for setting */
+ acf_generic_dataexpand_color, /* backdrop color */
+ acf_generic_dataexpand_backdrop, /* backdrop */
+ acf_generic_indention_1, /* indent level */
+ acf_generic_basic_offset, /* offset */
+
+ acf_generic_idblock_name, /* name */
+ acf_generic_idblock_nameprop, /* name prop */
+ acf_dspart_icon, /* icon */
+
+ acf_generic_dataexpand_setting_valid, /* has setting */
+ acf_dspart_setting_flag, /* flag for setting */
+ acf_dspart_setting_ptr /* pointer for setting */
};
/* MetaBall Expander ------------------------------------------- */
@@ -1751,7 +1751,7 @@ static int acf_dsmball_icon(bAnimListElem *UNUSED(ale))
static int acf_dsmball_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg)
{
/* clear extra return data first */
- *neg= 0;
+ *neg = 0;
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
@@ -1761,7 +1761,7 @@ static int acf_dsmball_setting_flag(bAnimContext *UNUSED(ac), int setting, short
return ADT_NLA_EVAL_OFF;
case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
- *neg= 1;
+ *neg = 1;
return ADT_CURVES_NOT_VISIBLE;
case ACHANNEL_SETTING_SELECT: /* selected */
@@ -1775,10 +1775,10 @@ static int acf_dsmball_setting_flag(bAnimContext *UNUSED(ac), int setting, short
/* get pointer to the setting */
static void *acf_dsmball_setting_ptr(bAnimListElem *ale, int setting, short *type)
{
- MetaBall *mb= (MetaBall *)ale->data;
+ MetaBall *mb = (MetaBall *)ale->data;
/* clear extra return data first */
- *type= 0;
+ *type = 0;
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
@@ -1798,22 +1798,22 @@ static void *acf_dsmball_setting_ptr(bAnimListElem *ale, int setting, short *typ
}
/* metaball expander type define */
-static bAnimChannelType ACF_DSMBALL=
+static bAnimChannelType ACF_DSMBALL =
{
- "Metaball Expander", /* type name */
+ "Metaball Expander", /* type name */
- acf_generic_dataexpand_color, /* backdrop color */
- acf_generic_dataexpand_backdrop,/* backdrop */
- acf_generic_indention_1, /* indent level */
- acf_generic_basic_offset, /* offset */
-
- acf_generic_idblock_name, /* name */
- acf_generic_idblock_nameprop, /* name prop */
- acf_dsmball_icon, /* icon */
-
- acf_generic_dataexpand_setting_valid, /* has setting */
- acf_dsmball_setting_flag, /* flag for setting */
- acf_dsmball_setting_ptr /* pointer for setting */
+ acf_generic_dataexpand_color, /* backdrop color */
+ acf_generic_dataexpand_backdrop, /* backdrop */
+ acf_generic_indention_1, /* indent level */
+ acf_generic_basic_offset, /* offset */
+
+ acf_generic_idblock_name, /* name */
+ acf_generic_idblock_nameprop, /* name prop */
+ acf_dsmball_icon, /* icon */
+
+ acf_generic_dataexpand_setting_valid, /* has setting */
+ acf_dsmball_setting_flag, /* flag for setting */
+ acf_dsmball_setting_ptr /* pointer for setting */
};
/* Armature Expander ------------------------------------------- */
@@ -1828,7 +1828,7 @@ static int acf_dsarm_icon(bAnimListElem *UNUSED(ale))
static int acf_dsarm_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg)
{
/* clear extra return data first */
- *neg= 0;
+ *neg = 0;
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
@@ -1838,7 +1838,7 @@ static int acf_dsarm_setting_flag(bAnimContext *UNUSED(ac), int setting, short *
return ADT_NLA_EVAL_OFF;
case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
- *neg= 1;
+ *neg = 1;
return ADT_CURVES_NOT_VISIBLE;
case ACHANNEL_SETTING_SELECT: /* selected */
@@ -1852,10 +1852,10 @@ static int acf_dsarm_setting_flag(bAnimContext *UNUSED(ac), int setting, short *
/* get pointer to the setting */
static void *acf_dsarm_setting_ptr(bAnimListElem *ale, int setting, short *type)
{
- bArmature *arm= (bArmature *)ale->data;
+ bArmature *arm = (bArmature *)ale->data;
/* clear extra return data first */
- *type= 0;
+ *type = 0;
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
@@ -1875,22 +1875,22 @@ static void *acf_dsarm_setting_ptr(bAnimListElem *ale, int setting, short *type)
}
/* metaball expander type define */
-static bAnimChannelType ACF_DSARM=
+static bAnimChannelType ACF_DSARM =
{
- "Armature Expander", /* type name */
-
- acf_generic_dataexpand_color, /* backdrop color */
- acf_generic_dataexpand_backdrop,/* backdrop */
- acf_generic_indention_1, /* indent level */
- acf_generic_basic_offset, /* offset */
+ "Armature Expander", /* type name */
- acf_generic_idblock_name, /* name */
- acf_generic_idblock_nameprop, /* name prop */
- acf_dsarm_icon, /* icon */
-
- acf_generic_dataexpand_setting_valid, /* has setting */
- acf_dsarm_setting_flag, /* flag for setting */
- acf_dsarm_setting_ptr /* pointer for setting */
+ acf_generic_dataexpand_color, /* backdrop color */
+ acf_generic_dataexpand_backdrop, /* backdrop */
+ acf_generic_indention_1, /* indent level */
+ acf_generic_basic_offset, /* offset */
+
+ acf_generic_idblock_name, /* name */
+ acf_generic_idblock_nameprop, /* name prop */
+ acf_dsarm_icon, /* icon */
+
+ acf_generic_dataexpand_setting_valid, /* has setting */
+ acf_dsarm_setting_flag, /* flag for setting */
+ acf_dsarm_setting_ptr /* pointer for setting */
};
/* NodeTree Expander ------------------------------------------- */
@@ -1905,7 +1905,7 @@ static int acf_dsntree_icon(bAnimListElem *UNUSED(ale))
static short acf_dsntree_offset(bAnimContext *ac, bAnimListElem *ale)
{
bNodeTree *ntree = (bNodeTree *)ale->data;
- short offset= acf_generic_basic_offset(ac, ale);
+ short offset = acf_generic_basic_offset(ac, ale);
offset += acf_nodetree_rootType_offset(ntree);
@@ -1916,7 +1916,7 @@ static short acf_dsntree_offset(bAnimContext *ac, bAnimListElem *ale)
static int acf_dsntree_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg)
{
/* clear extra return data first */
- *neg= 0;
+ *neg = 0;
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
@@ -1926,7 +1926,7 @@ static int acf_dsntree_setting_flag(bAnimContext *UNUSED(ac), int setting, short
return ADT_NLA_EVAL_OFF;
case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
- *neg= 1;
+ *neg = 1;
return ADT_CURVES_NOT_VISIBLE;
case ACHANNEL_SETTING_SELECT: /* selected */
@@ -1940,10 +1940,10 @@ static int acf_dsntree_setting_flag(bAnimContext *UNUSED(ac), int setting, short
/* get pointer to the setting */
static void *acf_dsntree_setting_ptr(bAnimListElem *ale, int setting, short *type)
{
- bNodeTree *ntree= (bNodeTree *)ale->data;
+ bNodeTree *ntree = (bNodeTree *)ale->data;
/* clear extra return data first */
- *type= 0;
+ *type = 0;
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
@@ -1954,8 +1954,8 @@ static void *acf_dsntree_setting_ptr(bAnimListElem *ale, int setting, short *typ
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (ntree->adt)
return GET_ACF_FLAG_PTR(ntree->adt->flag, type);
- else
- return NULL;
+ else
+ return NULL;
default: /* unsupported */
return NULL;
@@ -1963,22 +1963,22 @@ static void *acf_dsntree_setting_ptr(bAnimListElem *ale, int setting, short *typ
}
/* node tree expander type define */
-static bAnimChannelType ACF_DSNTREE=
+static bAnimChannelType ACF_DSNTREE =
{
- "Node Tree Expander", /* type name */
+ "Node Tree Expander", /* type name */
- acf_generic_dataexpand_color, /* backdrop color */
- acf_generic_dataexpand_backdrop,/* backdrop */
- acf_generic_indention_1, /* indent level */
- acf_dsntree_offset, /* offset */
-
- acf_generic_idblock_name, /* name */
- acf_generic_idblock_nameprop, /* name prop */
- acf_dsntree_icon, /* icon */
-
- acf_generic_dataexpand_setting_valid, /* has setting */
- acf_dsntree_setting_flag, /* flag for setting */
- acf_dsntree_setting_ptr /* pointer for setting */
+ acf_generic_dataexpand_color, /* backdrop color */
+ acf_generic_dataexpand_backdrop, /* backdrop */
+ acf_generic_indention_1, /* indent level */
+ acf_dsntree_offset, /* offset */
+
+ acf_generic_idblock_name, /* name */
+ acf_generic_idblock_nameprop, /* name prop */
+ acf_dsntree_icon, /* icon */
+
+ acf_generic_dataexpand_setting_valid, /* has setting */
+ acf_dsntree_setting_flag, /* flag for setting */
+ acf_dsntree_setting_ptr /* pointer for setting */
};
/* Mesh Expander ------------------------------------------- */
@@ -1993,7 +1993,7 @@ static int acf_dsmesh_icon(bAnimListElem *UNUSED(ale))
static int acf_dsmesh_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg)
{
/* clear extra return data first */
- *neg= 0;
+ *neg = 0;
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
@@ -2003,7 +2003,7 @@ static int acf_dsmesh_setting_flag(bAnimContext *UNUSED(ac), int setting, short
return ADT_NLA_EVAL_OFF;
case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
- *neg= 1;
+ *neg = 1;
return ADT_CURVES_NOT_VISIBLE;
case ACHANNEL_SETTING_SELECT: /* selected */
@@ -2017,10 +2017,10 @@ static int acf_dsmesh_setting_flag(bAnimContext *UNUSED(ac), int setting, short
/* get pointer to the setting */
static void *acf_dsmesh_setting_ptr(bAnimListElem *ale, int setting, short *type)
{
- Mesh *me= (Mesh *)ale->data;
+ Mesh *me = (Mesh *)ale->data;
/* clear extra return data first */
- *type= 0;
+ *type = 0;
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
@@ -2031,8 +2031,8 @@ static void *acf_dsmesh_setting_ptr(bAnimListElem *ale, int setting, short *type
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (me->adt)
return GET_ACF_FLAG_PTR(me->adt->flag, type);
- else
- return NULL;
+ else
+ return NULL;
default: /* unsupported */
return NULL;
@@ -2040,22 +2040,22 @@ static void *acf_dsmesh_setting_ptr(bAnimListElem *ale, int setting, short *type
}
/* node tree expander type define */
-static bAnimChannelType ACF_DSMESH=
+static bAnimChannelType ACF_DSMESH =
{
- "Mesh Expander", /* type name */
-
- acf_generic_dataexpand_color, /* backdrop color */
- acf_generic_dataexpand_backdrop,/* backdrop */
- acf_generic_indention_1, /* indent level */ // XXX this only works for compositing
- acf_generic_basic_offset, /* offset */
-
- acf_generic_idblock_name, /* name */
- acf_generic_idblock_nameprop, /* name prop */
- acf_dsmesh_icon, /* icon */
+ "Mesh Expander", /* type name */
- acf_generic_dataexpand_setting_valid, /* has setting */
- acf_dsmesh_setting_flag, /* flag for setting */
- acf_dsmesh_setting_ptr /* pointer for setting */
+ acf_generic_dataexpand_color, /* backdrop color */
+ acf_generic_dataexpand_backdrop, /* backdrop */
+ acf_generic_indention_1, /* indent level */ // XXX this only works for compositing
+ acf_generic_basic_offset, /* offset */
+
+ acf_generic_idblock_name, /* name */
+ acf_generic_idblock_nameprop, /* name prop */
+ acf_dsmesh_icon, /* icon */
+
+ acf_generic_dataexpand_setting_valid, /* has setting */
+ acf_dsmesh_setting_flag, /* flag for setting */
+ acf_dsmesh_setting_ptr /* pointer for setting */
};
/* Lattice Expander ------------------------------------------- */
@@ -2070,7 +2070,7 @@ static int acf_dslat_icon(bAnimListElem *UNUSED(ale))
static int acf_dslat_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg)
{
/* clear extra return data first */
- *neg= 0;
+ *neg = 0;
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
@@ -2080,7 +2080,7 @@ static int acf_dslat_setting_flag(bAnimContext *UNUSED(ac), int setting, short *
return ADT_NLA_EVAL_OFF;
case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
- *neg= 1;
+ *neg = 1;
return ADT_CURVES_NOT_VISIBLE;
case ACHANNEL_SETTING_SELECT: /* selected */
@@ -2094,10 +2094,10 @@ static int acf_dslat_setting_flag(bAnimContext *UNUSED(ac), int setting, short *
/* get pointer to the setting */
static void *acf_dslat_setting_ptr(bAnimListElem *ale, int setting, short *type)
{
- Lattice *lt= (Lattice *)ale->data;
+ Lattice *lt = (Lattice *)ale->data;
/* clear extra return data first */
- *type= 0;
+ *type = 0;
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
@@ -2108,8 +2108,8 @@ static void *acf_dslat_setting_ptr(bAnimListElem *ale, int setting, short *type)
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (lt->adt)
return GET_ACF_FLAG_PTR(lt->adt->flag, type);
- else
- return NULL;
+ else
+ return NULL;
default: /* unsupported */
return NULL;
@@ -2117,22 +2117,22 @@ static void *acf_dslat_setting_ptr(bAnimListElem *ale, int setting, short *type)
}
/* node tree expander type define */
-static bAnimChannelType ACF_DSLAT=
+static bAnimChannelType ACF_DSLAT =
{
- "Lattice Expander", /* type name */
+ "Lattice Expander", /* type name */
- acf_generic_dataexpand_color, /* backdrop color */
- acf_generic_dataexpand_backdrop,/* backdrop */
- acf_generic_indention_1, /* indent level */ // XXX this only works for compositing
- acf_generic_basic_offset, /* offset */
-
- acf_generic_idblock_name, /* name */
- acf_generic_idblock_nameprop, /* name prop */
- acf_dslat_icon, /* icon */
-
- acf_generic_dataexpand_setting_valid, /* has setting */
- acf_dslat_setting_flag, /* flag for setting */
- acf_dslat_setting_ptr /* pointer for setting */
+ acf_generic_dataexpand_color, /* backdrop color */
+ acf_generic_dataexpand_backdrop, /* backdrop */
+ acf_generic_indention_1, /* indent level */ // XXX this only works for compositing
+ acf_generic_basic_offset, /* offset */
+
+ acf_generic_idblock_name, /* name */
+ acf_generic_idblock_nameprop, /* name prop */
+ acf_dslat_icon, /* icon */
+
+ acf_generic_dataexpand_setting_valid, /* has setting */
+ acf_dslat_setting_flag, /* flag for setting */
+ acf_dslat_setting_ptr /* pointer for setting */
};
/* Speaker Expander ------------------------------------------- */
@@ -2147,7 +2147,7 @@ static int acf_dsspk_icon(bAnimListElem *UNUSED(ale))
static int acf_dsspk_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg)
{
/* clear extra return data first */
- *neg= 0;
+ *neg = 0;
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
@@ -2157,7 +2157,7 @@ static int acf_dsspk_setting_flag(bAnimContext *UNUSED(ac), int setting, short *
return ADT_NLA_EVAL_OFF;
case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
- *neg= 1;
+ *neg = 1;
return ADT_CURVES_NOT_VISIBLE;
case ACHANNEL_SETTING_SELECT: /* selected */
@@ -2171,10 +2171,10 @@ static int acf_dsspk_setting_flag(bAnimContext *UNUSED(ac), int setting, short *
/* get pointer to the setting */
static void *acf_dsspk_setting_ptr(bAnimListElem *ale, int setting, short *type)
{
- Speaker *spk= (Speaker *)ale->data;
+ Speaker *spk = (Speaker *)ale->data;
/* clear extra return data first */
- *type= 0;
+ *type = 0;
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
@@ -2194,22 +2194,22 @@ static void *acf_dsspk_setting_ptr(bAnimListElem *ale, int setting, short *type)
}
/* speaker expander type define */
-static bAnimChannelType ACF_DSSPK=
+static bAnimChannelType ACF_DSSPK =
{
- "Speaker Expander", /* type name */
+ "Speaker Expander", /* type name */
- acf_generic_dataexpand_color, /* backdrop color */
- acf_generic_dataexpand_backdrop,/* backdrop */
- acf_generic_indention_1, /* indent level */
- acf_generic_basic_offset, /* offset */
-
- acf_generic_idblock_name, /* name */
- acf_generic_idblock_nameprop, /* name prop */
- acf_dsspk_icon, /* icon */
-
- acf_generic_dataexpand_setting_valid, /* has setting */
- acf_dsspk_setting_flag, /* flag for setting */
- acf_dsspk_setting_ptr /* pointer for setting */
+ acf_generic_dataexpand_color, /* backdrop color */
+ acf_generic_dataexpand_backdrop, /* backdrop */
+ acf_generic_indention_1, /* indent level */
+ acf_generic_basic_offset, /* offset */
+
+ acf_generic_idblock_name, /* name */
+ acf_generic_idblock_nameprop, /* name prop */
+ acf_dsspk_icon, /* icon */
+
+ acf_generic_dataexpand_setting_valid, /* has setting */
+ acf_dsspk_setting_flag, /* flag for setting */
+ acf_dsspk_setting_ptr /* pointer for setting */
};
/* ShapeKey Entry ------------------------------------------- */
@@ -2217,7 +2217,7 @@ static bAnimChannelType ACF_DSSPK=
/* name for ShapeKey */
static void acf_shapekey_name(bAnimListElem *ale, char *name)
{
- KeyBlock *kb= (KeyBlock *)ale->data;
+ KeyBlock *kb = (KeyBlock *)ale->data;
/* just copy the name... */
if (kb && name) {
@@ -2232,7 +2232,7 @@ static void acf_shapekey_name(bAnimListElem *ale, char *name)
/* name property for ShapeKey entries */
static short acf_shapekey_nameprop(bAnimListElem *ale, PointerRNA *ptr, PropertyRNA **prop)
{
- KeyBlock *kb= (KeyBlock *)ale->data;
+ KeyBlock *kb = (KeyBlock *)ale->data;
/* if the KeyBlock had a name, use it, otherwise use the index */
if (kb && kb->name[0]) {
@@ -2264,7 +2264,7 @@ static short acf_shapekey_setting_valid(bAnimContext *UNUSED(ac), bAnimListElem
static int acf_shapekey_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg)
{
/* clear extra return data first */
- *neg= 0;
+ *neg = 0;
switch (setting) {
case ACHANNEL_SETTING_MUTE: /* mute */
@@ -2284,10 +2284,10 @@ static int acf_shapekey_setting_flag(bAnimContext *UNUSED(ac), int setting, shor
/* get pointer to the setting */
static void *acf_shapekey_setting_ptr(bAnimListElem *ale, int setting, short *type)
{
- KeyBlock *kb= (KeyBlock *)ale->data;
+ KeyBlock *kb = (KeyBlock *)ale->data;
/* clear extra return data first */
- *type= 0;
+ *type = 0;
switch (setting) {
case ACHANNEL_SETTING_SELECT: /* selected */
@@ -2301,31 +2301,31 @@ static void *acf_shapekey_setting_ptr(bAnimListElem *ale, int setting, short *ty
}
/* shapekey expander type define */
-static bAnimChannelType ACF_SHAPEKEY=
+static bAnimChannelType ACF_SHAPEKEY =
{
- "Shape Key", /* type name */
+ "Shape Key", /* type name */
- acf_generic_channel_color, /* backdrop color */
- acf_generic_channel_backdrop, /* backdrop */
- acf_generic_indention_0, /* indent level */
- acf_generic_basic_offset, /* offset */
-
- acf_shapekey_name, /* name */
- acf_shapekey_nameprop, /* name prop */
- NULL, /* icon */
-
- acf_shapekey_setting_valid, /* has setting */
- acf_shapekey_setting_flag, /* flag for setting */
- acf_shapekey_setting_ptr /* pointer for setting */
+ acf_generic_channel_color, /* backdrop color */
+ acf_generic_channel_backdrop, /* backdrop */
+ acf_generic_indention_0, /* indent level */
+ acf_generic_basic_offset, /* offset */
+
+ acf_shapekey_name, /* name */
+ acf_shapekey_nameprop, /* name prop */
+ NULL, /* icon */
+
+ acf_shapekey_setting_valid, /* has setting */
+ acf_shapekey_setting_flag, /* flag for setting */
+ acf_shapekey_setting_ptr /* pointer for setting */
};
/* GPencil Datablock ------------------------------------------- */
/* get backdrop color for gpencil datablock widget */
-static void acf_gpd_color(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale), float *color)
+static void acf_gpd_color(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale), float r_color[3])
{
/* these are ID-blocks, but not exactly standalone... */
- UI_GetThemeColorShade3fv(TH_DOPESHEET_CHANNELSUBOB, 20, color);
+ UI_GetThemeColorShade3fv(TH_DOPESHEET_CHANNELSUBOB, 20, r_color);
}
// TODO: just get this from RNA?
@@ -2352,7 +2352,7 @@ static short acf_gpd_setting_valid(bAnimContext *UNUSED(ac), bAnimListElem *UNUS
static int acf_gpd_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg)
{
/* clear extra return data first */
- *neg= 0;
+ *neg = 0;
switch (setting) {
case ACHANNEL_SETTING_SELECT: /* selected */
@@ -2369,7 +2369,7 @@ static int acf_gpd_setting_flag(bAnimContext *UNUSED(ac), int setting, short *ne
/* get pointer to the setting */
static void *acf_gpd_setting_ptr(bAnimListElem *ale, int UNUSED(setting), short *type)
{
- bGPdata *gpd= (bGPdata *)ale->data;
+ bGPdata *gpd = (bGPdata *)ale->data;
/* all flags are just in gpd->flag for now... */
return GET_ACF_FLAG_PTR(gpd->flag, type);
@@ -2378,20 +2378,20 @@ static void *acf_gpd_setting_ptr(bAnimListElem *ale, int UNUSED(setting), short
/* gpencil datablock type define */
static bAnimChannelType ACF_GPD =
{
- "GPencil Datablock", /* type name */
-
- acf_gpd_color, /* backdrop color */
- acf_group_backdrop, /* backdrop */
- acf_generic_indention_0, /* indent level */
- acf_generic_group_offset, /* offset */
+ "GPencil Datablock", /* type name */
- acf_generic_idblock_name, /* name */
- acf_generic_idfill_nameprop, /* name prop */
- acf_gpd_icon, /* icon */
-
- acf_gpd_setting_valid, /* has setting */
- acf_gpd_setting_flag, /* flag for setting */
- acf_gpd_setting_ptr /* pointer for setting */
+ acf_gpd_color, /* backdrop color */
+ acf_group_backdrop, /* backdrop */
+ acf_generic_indention_0, /* indent level */
+ acf_generic_group_offset, /* offset */
+
+ acf_generic_idblock_name, /* name */
+ acf_generic_idfill_nameprop, /* name prop */
+ acf_gpd_icon, /* icon */
+
+ acf_gpd_setting_valid, /* has setting */
+ acf_gpd_setting_flag, /* flag for setting */
+ acf_gpd_setting_ptr /* pointer for setting */
};
/* GPencil Layer ------------------------------------------- */
@@ -2437,7 +2437,7 @@ static short acf_gpl_setting_valid(bAnimContext *UNUSED(ac), bAnimListElem *UNUS
static int acf_gpl_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg)
{
/* clear extra return data first */
- *neg= 0;
+ *neg = 0;
switch (setting) {
case ACHANNEL_SETTING_SELECT: /* selected */
@@ -2458,7 +2458,7 @@ static int acf_gpl_setting_flag(bAnimContext *UNUSED(ac), int setting, short *ne
/* get pointer to the setting */
static void *acf_gpl_setting_ptr(bAnimListElem *ale, int UNUSED(setting), short *type)
{
- bGPDlayer *gpl= (bGPDlayer *)ale->data;
+ bGPDlayer *gpl = (bGPDlayer *)ale->data;
/* all flags are just in agrp->flag for now... */
return GET_ACF_FLAG_PTR(gpl->flag, type);
@@ -2467,20 +2467,20 @@ static void *acf_gpl_setting_ptr(bAnimListElem *ale, int UNUSED(setting), short
/* grease pencil layer type define */
static bAnimChannelType ACF_GPL =
{
- "GPencil Layer", /* type name */
-
- acf_generic_channel_color, /* backdrop color */
- acf_generic_channel_backdrop, /* backdrop */
- acf_generic_indention_flexible, /* indent level */
- acf_generic_group_offset, /* offset */
-
- acf_gpl_name, /* name */
- acf_gpl_name_prop, /* name prop */
- NULL, /* icon */
+ "GPencil Layer", /* type name */
- acf_gpl_setting_valid, /* has setting */
- acf_gpl_setting_flag, /* flag for setting */
- acf_gpl_setting_ptr /* pointer for setting */
+ acf_generic_channel_color, /* backdrop color */
+ acf_generic_channel_backdrop, /* backdrop */
+ acf_generic_indention_flexible, /* indent level */
+ acf_generic_group_offset, /* offset */
+
+ acf_gpl_name, /* name */
+ acf_gpl_name_prop, /* name prop */
+ NULL, /* icon */
+
+ acf_gpl_setting_valid, /* has setting */
+ acf_gpl_setting_flag, /* flag for setting */
+ acf_gpl_setting_ptr /* pointer for setting */
};
/* *********************************************** */
@@ -2488,60 +2488,60 @@ static bAnimChannelType ACF_GPL =
/* These globals only ever get directly accessed in this file */
static bAnimChannelType *animchannelTypeInfo[ANIMTYPE_NUM_TYPES];
-static short ACF_INIT= 1; /* when non-zero, the list needs to be updated */
+static short ACF_INIT = 1; /* when non-zero, the list needs to be updated */
/* Initialize type info definitions */
-static void ANIM_init_channel_typeinfo_data (void)
+static void ANIM_init_channel_typeinfo_data(void)
{
- int type= 0;
+ int type = 0;
/* start initializing if necessary... */
if (ACF_INIT) {
- ACF_INIT= 0;
-
- animchannelTypeInfo[type++]= NULL; /* None */
- animchannelTypeInfo[type++]= NULL; /* AnimData */
- animchannelTypeInfo[type++]= NULL; /* Special */
-
- animchannelTypeInfo[type++]= &ACF_SUMMARY; /* Motion Summary */
-
- animchannelTypeInfo[type++]= &ACF_SCENE; /* Scene */
- animchannelTypeInfo[type++]= &ACF_OBJECT; /* Object */
- animchannelTypeInfo[type++]= &ACF_GROUP; /* Group */
- animchannelTypeInfo[type++]= &ACF_FCURVE; /* F-Curve */
-
- animchannelTypeInfo[type++]= &ACF_FILLACTD; /* Object Action Expander */
- animchannelTypeInfo[type++]= &ACF_FILLDRIVERS; /* Drivers Expander */
-
- animchannelTypeInfo[type++]= &ACF_DSMAT; /* Material Channel */
- animchannelTypeInfo[type++]= &ACF_DSLAM; /* Lamp Channel */
- animchannelTypeInfo[type++]= &ACF_DSCAM; /* Camera Channel */
- animchannelTypeInfo[type++]= &ACF_DSCUR; /* Curve Channel */
- animchannelTypeInfo[type++]= &ACF_DSSKEY; /* ShapeKey Channel */
- animchannelTypeInfo[type++]= &ACF_DSWOR; /* World Channel */
- animchannelTypeInfo[type++]= &ACF_DSNTREE; /* NodeTree Channel */
- animchannelTypeInfo[type++]= &ACF_DSPART; /* Particle Channel */
- animchannelTypeInfo[type++]= &ACF_DSMBALL; /* MetaBall Channel */
- animchannelTypeInfo[type++]= &ACF_DSARM; /* Armature Channel */
- animchannelTypeInfo[type++]= &ACF_DSMESH; /* Mesh Channel */
- animchannelTypeInfo[type++]= &ACF_DSTEX; /* Texture Channel */
- animchannelTypeInfo[type++]= &ACF_DSLAT; /* Lattice Channel */
- animchannelTypeInfo[type++]= &ACF_DSSPK; /* Speaker Channel */
-
- animchannelTypeInfo[type++]= &ACF_SHAPEKEY; /* ShapeKey */
-
- animchannelTypeInfo[type++]= &ACF_GPD; /* Grease Pencil Datablock */
- animchannelTypeInfo[type++]= &ACF_GPL; /* Grease Pencil Layer */
-
- // TODO: these types still need to be implemented!!!
- // probably need a few extra flags for these special cases...
- animchannelTypeInfo[type++]= NULL; /* NLA Track */
- animchannelTypeInfo[type++]= NULL; /* NLA Action */
+ ACF_INIT = 0;
+
+ animchannelTypeInfo[type++] = NULL; /* None */
+ animchannelTypeInfo[type++] = NULL; /* AnimData */
+ animchannelTypeInfo[type++] = NULL; /* Special */
+
+ animchannelTypeInfo[type++] = &ACF_SUMMARY; /* Motion Summary */
+
+ animchannelTypeInfo[type++] = &ACF_SCENE; /* Scene */
+ animchannelTypeInfo[type++] = &ACF_OBJECT; /* Object */
+ animchannelTypeInfo[type++] = &ACF_GROUP; /* Group */
+ animchannelTypeInfo[type++] = &ACF_FCURVE; /* F-Curve */
+
+ animchannelTypeInfo[type++] = &ACF_FILLACTD; /* Object Action Expander */
+ animchannelTypeInfo[type++] = &ACF_FILLDRIVERS; /* Drivers Expander */
+
+ animchannelTypeInfo[type++] = &ACF_DSMAT; /* Material Channel */
+ animchannelTypeInfo[type++] = &ACF_DSLAM; /* Lamp Channel */
+ animchannelTypeInfo[type++] = &ACF_DSCAM; /* Camera Channel */
+ animchannelTypeInfo[type++] = &ACF_DSCUR; /* Curve Channel */
+ animchannelTypeInfo[type++] = &ACF_DSSKEY; /* ShapeKey Channel */
+ animchannelTypeInfo[type++] = &ACF_DSWOR; /* World Channel */
+ animchannelTypeInfo[type++] = &ACF_DSNTREE; /* NodeTree Channel */
+ animchannelTypeInfo[type++] = &ACF_DSPART; /* Particle Channel */
+ animchannelTypeInfo[type++] = &ACF_DSMBALL; /* MetaBall Channel */
+ animchannelTypeInfo[type++] = &ACF_DSARM; /* Armature Channel */
+ animchannelTypeInfo[type++] = &ACF_DSMESH; /* Mesh Channel */
+ animchannelTypeInfo[type++] = &ACF_DSTEX; /* Texture Channel */
+ animchannelTypeInfo[type++] = &ACF_DSLAT; /* Lattice Channel */
+ animchannelTypeInfo[type++] = &ACF_DSSPK; /* Speaker Channel */
+
+ animchannelTypeInfo[type++] = &ACF_SHAPEKEY; /* ShapeKey */
+
+ animchannelTypeInfo[type++] = &ACF_GPD; /* Grease Pencil Datablock */
+ animchannelTypeInfo[type++] = &ACF_GPL; /* Grease Pencil Layer */
+
+ // TODO: these types still need to be implemented!!!
+ // probably need a few extra flags for these special cases...
+ animchannelTypeInfo[type++] = NULL; /* NLA Track */
+ animchannelTypeInfo[type++] = NULL; /* NLA Action */
}
}
/* Get type info from given channel type */
-bAnimChannelType *ANIM_channel_get_typeinfo (bAnimListElem *ale)
+bAnimChannelType *ANIM_channel_get_typeinfo(bAnimListElem *ale)
{
/* santiy checks */
if (ale == NULL)
@@ -2560,9 +2560,9 @@ bAnimChannelType *ANIM_channel_get_typeinfo (bAnimListElem *ale)
/* --------------------------- */
/* Print debug info string for the given channel */
-void ANIM_channel_debug_print_info (bAnimListElem *ale, short indent_level)
+void ANIM_channel_debug_print_info(bAnimListElem *ale, short indent_level)
{
- bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale);
+ bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale);
/* print indents */
for (; indent_level > 0; indent_level--)
@@ -2592,9 +2592,9 @@ void ANIM_channel_debug_print_info (bAnimListElem *ale, short indent_level)
/* Check if some setting for a channel is enabled
* Returns: 1 = On, 0 = Off, -1 = Invalid
*/
-short ANIM_channel_setting_get (bAnimContext *ac, bAnimListElem *ale, int setting)
+short ANIM_channel_setting_get(bAnimContext *ac, bAnimListElem *ale, int setting)
{
- bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale);
+ bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale);
/* 1) check that the setting exists for the current context */
if ((acf) && (!acf->has_setting || acf->has_setting(ac, ale, setting))) {
@@ -2603,44 +2603,44 @@ short ANIM_channel_setting_get (bAnimContext *ac, bAnimListElem *ale, int settin
int flag;
void *ptr;
- flag= acf->setting_flag(ac, setting, &negflag);
- ptr= acf->setting_ptr(ale, setting, &ptrsize);
+ flag = acf->setting_flag(ac, setting, &negflag);
+ ptr = acf->setting_ptr(ale, setting, &ptrsize);
/* check if flag is enabled */
if (ptr && flag) {
switch (ptrsize) {
- case sizeof(int): /* integer pointer for setting */
+ case sizeof(int): /* integer pointer for setting */
{
- int *val= (int *)ptr;
+ int *val = (int *)ptr;
if (negflag)
return ((*val) & flag) == 0;
else
return ((*val) & flag) != 0;
}
- break;
+ break;
- case sizeof(short): /* short pointer for setting */
+ case sizeof(short): /* short pointer for setting */
{
- short *val= (short *)ptr;
+ short *val = (short *)ptr;
if (negflag)
return ((*val) & flag) == 0;
else
return ((*val) & flag) != 0;
}
- break;
+ break;
- case sizeof(char): /* char pointer for setting */
+ case sizeof(char): /* char pointer for setting */
{
- char *val= (char *)ptr;
+ char *val = (char *)ptr;
if (negflag)
return ((*val) & flag) == 0;
else
return ((*val) & flag) != 0;
}
- break;
+ break;
}
}
}
@@ -2652,26 +2652,26 @@ short ANIM_channel_setting_get (bAnimContext *ac, bAnimListElem *ale, int settin
/* quick macro for use in ANIM_channel_setting_set - set flag for setting according the mode given */
#define ACF_SETTING_SET(sval, sflag, smode) \
- {\
- if (negflag) {\
- if (smode == ACHANNEL_SETFLAG_INVERT) (sval) ^= (sflag); \
+ { \
+ if (negflag) { \
+ if (smode == ACHANNEL_SETFLAG_INVERT) (sval) ^= (sflag); \
else if (smode == ACHANNEL_SETFLAG_ADD) (sval) &= ~(sflag); \
- else (sval) |= (sflag); \
+ else (sval) |= (sflag); \
} \
- else {\
- if (smode == ACHANNEL_SETFLAG_INVERT) (sval) ^= (sflag); \
+ else { \
+ if (smode == ACHANNEL_SETFLAG_INVERT) (sval) ^= (sflag); \
else if (smode == ACHANNEL_SETFLAG_ADD) (sval) |= (sflag); \
- else (sval) &= ~(sflag); \
- }\
+ else (sval) &= ~(sflag); \
+ } \
}
/* Change value of some setting for a channel
* - setting: eAnimChannel_Settings
* - mode: eAnimChannels_SetFlag
*/
-void ANIM_channel_setting_set (bAnimContext *ac, bAnimListElem *ale, int setting, short mode)
+void ANIM_channel_setting_set(bAnimContext *ac, bAnimListElem *ale, int setting, short mode)
{
- bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale);
+ bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale);
/* 1) check that the setting exists for the current context */
if ((acf) && (!acf->has_setting || acf->has_setting(ac, ale, setting))) {
@@ -2680,32 +2680,32 @@ void ANIM_channel_setting_set (bAnimContext *ac, bAnimListElem *ale, int setting
int flag;
void *ptr;
- flag= acf->setting_flag(ac, setting, &negflag);
- ptr= acf->setting_ptr(ale, setting, &ptrsize);
+ flag = acf->setting_flag(ac, setting, &negflag);
+ ptr = acf->setting_ptr(ale, setting, &ptrsize);
/* check if flag is enabled */
if (ptr && flag) {
switch (ptrsize) {
- case sizeof(int): /* integer pointer for setting */
+ case sizeof(int): /* integer pointer for setting */
{
- int *val= (int *)ptr;
+ int *val = (int *)ptr;
ACF_SETTING_SET(*val, flag, mode);
}
- break;
+ break;
- case sizeof(short): /* short pointer for setting */
+ case sizeof(short): /* short pointer for setting */
{
- short *val= (short *)ptr;
+ short *val = (short *)ptr;
ACF_SETTING_SET(*val, flag, mode);
}
- break;
+ break;
- case sizeof(char): /* char pointer for setting */
+ case sizeof(char): /* char pointer for setting */
{
- char *val= (char *)ptr;
+ char *val = (char *)ptr;
ACF_SETTING_SET(*val, flag, mode);
}
- break;
+ break;
}
}
}
@@ -2714,18 +2714,18 @@ void ANIM_channel_setting_set (bAnimContext *ac, bAnimListElem *ale, int setting
/* --------------------------- */
// XXX hardcoded size of icons
-#define ICON_WIDTH 17
+#define ICON_WIDTH 17
// XXX hardcoded width of sliders
-#define SLIDER_WIDTH 80
+#define SLIDER_WIDTH 80
// XXX hardcoded width of rename textboxes
#define RENAME_TEXT_WIDTH 100
/* Draw the given channel */
// TODO: make this use UI controls for the buttons
-void ANIM_channel_draw (bAnimContext *ac, bAnimListElem *ale, float yminc, float ymaxc)
+void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float ymaxc)
{
- bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale);
- View2D *v2d= &ac->ar->v2d;
+ bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale);
+ View2D *v2d = &ac->ar->v2d;
short selected, offset;
float y, ymid, ytext;
@@ -2735,23 +2735,23 @@ void ANIM_channel_draw (bAnimContext *ac, bAnimListElem *ale, float yminc, float
/* get initial offset */
if (acf->get_offset)
- offset= acf->get_offset(ac, ale);
+ offset = acf->get_offset(ac, ale);
else
- offset= 0;
+ offset = 0;
/* calculate appropriate y-coordinates for icon buttons
* 7 is hardcoded factor for half-height of icons
*/
- y= (ymaxc - yminc)/2 + yminc;
- ymid= y - 7;
+ y = (ymaxc - yminc) / 2 + yminc;
+ ymid = y - 7;
/* y-coordinates for text is only 4 down from middle */
- ytext= y - 4;
+ ytext = y - 4;
/* check if channel is selected */
if (acf->has_setting(ac, ale, ACHANNEL_SETTING_SELECT))
- selected= ANIM_channel_setting_get(ac, ale, ACHANNEL_SETTING_SELECT);
+ selected = ANIM_channel_setting_get(ac, ale, ACHANNEL_SETTING_SELECT);
else
- selected= 0;
+ selected = 0;
/* set blending again, as may not be set in previous step */
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
@@ -2784,7 +2784,7 @@ void ANIM_channel_draw (bAnimContext *ac, bAnimListElem *ale, float yminc, float
if ((ac->spacetype == SPACE_IPO) && acf->has_setting(ac, ale, ACHANNEL_SETTING_VISIBLE)) {
/* for F-Curves, draw color-preview of curve behind checkbox */
if (ale->type == ANIMTYPE_FCURVE) {
- FCurve *fcu= (FCurve *)ale->data;
+ FCurve *fcu = (FCurve *)ale->data;
/* F-Curve channels need to have a special 'color code' box drawn, which is colored with whatever
* color the curve has stored
@@ -2792,10 +2792,10 @@ void ANIM_channel_draw (bAnimContext *ac, bAnimListElem *ale, float yminc, float
glColor3fv(fcu->color);
/* just a solid color rect
- * hardcoded 17 pixels width is slightly wider than icon width, so that
+ * hardcoded 17 pixels width is slightly wider than icon width, so that
* there's a slight border around it
*/
- glRectf(offset, yminc, offset+17, ymaxc);
+ glRectf(offset, yminc, offset + 17, ymaxc);
}
/* icon is drawn as widget now... */
@@ -2830,8 +2830,8 @@ void ANIM_channel_draw (bAnimContext *ac, bAnimListElem *ale, float yminc, float
// FIXME: replace hardcoded color here, and check on extents!
glColor3f(1.0f, 0.0f, 0.0f);
glLineWidth(2.0);
- fdrawline((float)(offset), yminc,
- (float)(v2d->cur.xmax), yminc);
+ fdrawline((float)(offset), yminc,
+ (float)(v2d->cur.xmax), yminc);
glLineWidth(1.0);
}
}
@@ -2855,21 +2855,21 @@ void ANIM_channel_draw (bAnimContext *ac, bAnimListElem *ale, float yminc, float
switch (ac->spacetype) {
case SPACE_ACTION:
{
- SpaceAction *saction= (SpaceAction *)ac->sl;
- draw_sliders= (saction->flag & SACTION_SLIDERS);
+ SpaceAction *saction = (SpaceAction *)ac->sl;
+ draw_sliders = (saction->flag & SACTION_SLIDERS);
}
- break;
+ break;
case SPACE_IPO:
{
- SpaceIpo *sipo= (SpaceIpo *)ac->sl;
- draw_sliders= (sipo->flag & SIPO_SLIDERS);
+ SpaceIpo *sipo = (SpaceIpo *)ac->sl;
+ draw_sliders = (sipo->flag & SIPO_SLIDERS);
}
- break;
+ break;
}
}
/* check if there's enough space for the toggles if the sliders are drawn too */
- if ( !(draw_sliders) || ((v2d->mask.xmax-v2d->mask.xmin) > ACHANNEL_BUTTON_WIDTH/2) ) {
+ if (!(draw_sliders) || ((v2d->mask.xmax - v2d->mask.xmin) > ACHANNEL_BUTTON_WIDTH / 2) ) {
/* protect... */
if (acf->has_setting(ac, ale, ACHANNEL_SETTING_PROTECT))
offset += ICON_WIDTH;
@@ -2893,7 +2893,7 @@ void ANIM_channel_draw (bAnimContext *ac, bAnimListElem *ale, float yminc, float
* - starts from the point where the first toggle/slider starts,
* - ends past the space that might be reserved for a scroller
*/
- glRectf(v2d->cur.xmax-(float)offset, yminc, v2d->cur.xmax+EXTRA_SCROLL_PAD, ymaxc);
+ glRectf(v2d->cur.xmax - (float)offset, yminc, v2d->cur.xmax + EXTRA_SCROLL_PAD, ymaxc);
}
}
@@ -2902,13 +2902,13 @@ void ANIM_channel_draw (bAnimContext *ac, bAnimListElem *ale, float yminc, float
/* callback for (normal) widget settings - send notifiers */
static void achannel_setting_widget_cb(bContext *C, void *UNUSED(arg1), void *UNUSED(arg2))
{
- WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
}
/* callback for widget settings that need flushing */
static void achannel_setting_flush_widget_cb(bContext *C, void *ale_npoin, void *setting_wrap)
{
- bAnimListElem *ale_setting= (bAnimListElem *)ale_npoin;
+ bAnimListElem *ale_setting = (bAnimListElem *)ale_npoin;
bAnimContext ac;
ListBase anim_data = {NULL, NULL};
int filter;
@@ -2916,7 +2916,7 @@ static void achannel_setting_flush_widget_cb(bContext *C, void *ale_npoin, void
short on = 0;
/* send notifiers before doing anything else... */
- WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
/* verify animation context */
if (ANIM_animdata_get_context(C, &ac) == 0)
@@ -2925,7 +2925,7 @@ static void achannel_setting_flush_widget_cb(bContext *C, void *ale_npoin, void
/* verify that we have a channel to operate on, and that it has all we need */
if (ale_setting) {
/* check if the setting is on... */
- on= ANIM_channel_setting_get(&ac, ale_setting, setting);
+ on = ANIM_channel_setting_get(&ac, ale_setting, setting);
/* on == -1 means setting not found... */
if (on == -1)
@@ -2935,7 +2935,7 @@ static void achannel_setting_flush_widget_cb(bContext *C, void *ale_npoin, void
return;
/* get all channels that can possibly be chosen - but ignore hierarchy */
- filter= ANIMFILTER_DATA_VISIBLE|ANIMFILTER_LIST_CHANNELS;
+ filter = ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_CHANNELS;
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* call API method to flush the setting */
@@ -2955,25 +2955,25 @@ static void achannel_setting_rename_done_cb(bContext *C, void *ads_poin, void *U
/* send notifiers */
// XXX: right notifier?
- WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN|NA_RENAME, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_RENAME, NULL);
}
/* callback for widget sliders - insert keyframes */
static void achannel_setting_slider_cb(bContext *C, void *id_poin, void *fcu_poin)
{
- ID *id= (ID *)id_poin;
- FCurve *fcu= (FCurve *)fcu_poin;
+ ID *id = (ID *)id_poin;
+ FCurve *fcu = (FCurve *)fcu_poin;
ReportList *reports = CTX_wm_reports(C);
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
PointerRNA id_ptr, ptr;
PropertyRNA *prop;
- short flag=0, done=0;
+ short flag = 0, done = 0;
float cfra;
/* get current frame */
// NOTE: this will do for now...
- cfra= (float)CFRA;
+ cfra = (float)CFRA;
/* get flags for keyframing */
flag = ANIM_get_keyframing_flags(scene, 1);
@@ -2988,30 +2988,30 @@ static void achannel_setting_slider_cb(bContext *C, void *id_poin, void *fcu_poi
flag |= INSERTKEY_REPLACE;
/* insert a keyframe for this F-Curve */
- done= insert_keyframe_direct(reports, ptr, prop, fcu, cfra, flag);
+ done = insert_keyframe_direct(reports, ptr, prop, fcu, cfra, flag);
if (done)
- WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
}
}
/* callback for shapekey widget sliders - insert keyframes */
static void achannel_setting_slider_shapekey_cb(bContext *C, void *key_poin, void *kb_poin)
{
- Key *key= (Key *)key_poin;
- KeyBlock *kb= (KeyBlock *)kb_poin;
- char *rna_path= key_get_curValue_rnaPath(key, kb);
+ Key *key = (Key *)key_poin;
+ KeyBlock *kb = (KeyBlock *)kb_poin;
+ char *rna_path = key_get_curValue_rnaPath(key, kb);
ReportList *reports = CTX_wm_reports(C);
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
PointerRNA id_ptr, ptr;
PropertyRNA *prop;
- short flag=0, done=0;
+ short flag = 0, done = 0;
float cfra;
/* get current frame */
// NOTE: this will do for now...
- cfra= (float)CFRA;
+ cfra = (float)CFRA;
/* get flags for keyframing */
flag = ANIM_get_keyframing_flags(scene, 1);
@@ -3023,18 +3023,18 @@ static void achannel_setting_slider_shapekey_cb(bContext *C, void *key_poin, voi
if (RNA_path_resolve(&id_ptr, rna_path, &ptr, &prop)) {
/* find or create new F-Curve */
// XXX is the group name for this ok?
- bAction *act= verify_adt_action((ID *)key, 1);
- FCurve *fcu= verify_fcurve(act, NULL, rna_path, 0, 1);
+ bAction *act = verify_adt_action((ID *)key, 1);
+ FCurve *fcu = verify_fcurve(act, NULL, rna_path, 0, 1);
/* set the special 'replace' flag if on a keyframe */
if (fcurve_frame_has_keyframe(fcu, cfra, 0))
flag |= INSERTKEY_REPLACE;
/* insert a keyframe for this F-Curve */
- done= insert_keyframe_direct(reports, ptr, prop, fcu, cfra, flag);
+ done = insert_keyframe_direct(reports, ptr, prop, fcu, cfra, flag);
if (done)
- WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
}
/* free the path */
@@ -3043,7 +3043,8 @@ static void achannel_setting_slider_shapekey_cb(bContext *C, void *key_poin, voi
}
/* Draw a widget for some setting */
-static void draw_setting_widget (bAnimContext *ac, bAnimListElem *ale, bAnimChannelType *acf, uiBlock *block, int xpos, int ypos, int setting)
+static void draw_setting_widget(bAnimContext *ac, bAnimListElem *ale, bAnimChannelType *acf,
+ uiBlock *block, int xpos, int ypos, int setting)
{
short negflag, ptrsize /* , enabled */ /* UNUSED */, butType;
int flag, icon;
@@ -3052,32 +3053,32 @@ static void draw_setting_widget (bAnimContext *ac, bAnimListElem *ale, bAnimChan
uiBut *but = NULL;
/* get the flag and the pointer to that flag */
- flag= acf->setting_flag(ac, setting, &negflag);
- ptr= acf->setting_ptr(ale, setting, &ptrsize);
+ flag = acf->setting_flag(ac, setting, &negflag);
+ ptr = acf->setting_ptr(ale, setting, &ptrsize);
/* enabled= ANIM_channel_setting_get(ac, ale, setting); */ /* UNUSED */
/* get the base icon for the setting */
switch (setting) {
- case ACHANNEL_SETTING_VISIBLE: /* visibility eyes */
+ case ACHANNEL_SETTING_VISIBLE: /* visibility eyes */
//icon= ((enabled)? ICON_VISIBLE_IPO_ON : ICON_VISIBLE_IPO_OFF);
- icon= ICON_VISIBLE_IPO_OFF;
+ icon = ICON_VISIBLE_IPO_OFF;
if (ale->type == ANIMTYPE_FCURVE)
- tooltip= "Channel is visible in Graph Editor for editing";
+ tooltip = "Channel is visible in Graph Editor for editing";
else
- tooltip= "Channel(s) are visible in Graph Editor for editing";
+ tooltip = "Channel(s) are visible in Graph Editor for editing";
break;
case ACHANNEL_SETTING_EXPAND: /* expanded triangle */
//icon= ((enabled)? ICON_TRIA_DOWN : ICON_TRIA_RIGHT);
- icon= ICON_TRIA_RIGHT;
- tooltip= "Make channels grouped under this channel visible";
+ icon = ICON_TRIA_RIGHT;
+ tooltip = "Make channels grouped under this channel visible";
break;
case ACHANNEL_SETTING_SOLO: /* NLA Tracks only */
//icon= ((enabled)? ICON_LAYER_ACTIVE : ICON_LAYER_USED);
- icon= ICON_LAYER_USED;
- tooltip= "NLA Track is the only one evaluated for the AnimData block it belongs to";
+ icon = ICON_LAYER_USED;
+ tooltip = "NLA Track is the only one evaluated for the AnimData block it belongs to";
break;
/* --- */
@@ -3085,48 +3086,48 @@ static void draw_setting_widget (bAnimContext *ac, bAnimListElem *ale, bAnimChan
case ACHANNEL_SETTING_PROTECT: /* protected lock */
// TODO: what about when there's no protect needed?
//icon= ((enabled)? ICON_LOCKED : ICON_UNLOCKED);
- icon= ICON_UNLOCKED;
- tooltip= "Editability of keyframes for this channel";
+ icon = ICON_UNLOCKED;
+ tooltip = "Editability of keyframes for this channel";
break;
case ACHANNEL_SETTING_MUTE: /* muted speaker */
//icon= ((enabled)? ICON_MUTE_IPO_ON : ICON_MUTE_IPO_OFF);
- icon= ICON_MUTE_IPO_OFF;
+ icon = ICON_MUTE_IPO_OFF;
if (ale->type == ALE_FCURVE)
- tooltip= "Does F-Curve contribute to result";
+ tooltip = "Does F-Curve contribute to result";
else
- tooltip= "Do channels contribute to result";
+ tooltip = "Do channels contribute to result";
break;
default:
- tooltip= NULL;
- icon= 0;
+ tooltip = NULL;
+ icon = 0;
break;
}
/* type of button */
if (negflag)
- butType= ICONTOGN;
+ butType = ICONTOGN;
else
- butType= ICONTOG;
+ butType = ICONTOG;
/* draw button for setting */
if (ptr && flag) {
switch (ptrsize) {
- case sizeof(int): /* integer pointer for setting */
+ case sizeof(int): /* integer pointer for setting */
but = uiDefIconButBitI(block, butType, flag, 0, icon,
- xpos, ypos, ICON_WIDTH, ICON_WIDTH, ptr, 0, 0, 0, 0, tooltip);
+ xpos, ypos, ICON_WIDTH, ICON_WIDTH, ptr, 0, 0, 0, 0, tooltip);
break;
- case sizeof(short): /* short pointer for setting */
+ case sizeof(short): /* short pointer for setting */
but = uiDefIconButBitS(block, butType, flag, 0, icon,
- xpos, ypos, ICON_WIDTH, ICON_WIDTH, ptr, 0, 0, 0, 0, tooltip);
+ xpos, ypos, ICON_WIDTH, ICON_WIDTH, ptr, 0, 0, 0, 0, tooltip);
break;
- case sizeof(char): /* char pointer for setting */
+ case sizeof(char): /* char pointer for setting */
but = uiDefIconButBitC(block, butType, flag, 0, icon,
- xpos, ypos, ICON_WIDTH, ICON_WIDTH, ptr, 0, 0, 0, 0, tooltip);
+ xpos, ypos, ICON_WIDTH, ICON_WIDTH, ptr, 0, 0, 0, 0, tooltip);
break;
}
@@ -3150,11 +3151,11 @@ static void draw_setting_widget (bAnimContext *ac, bAnimListElem *ale, bAnimChan
}
/* Draw UI widgets the given channel */
-void ANIM_channel_draw_widgets (bContext *C, bAnimContext *ac, bAnimListElem *ale, uiBlock *block, float yminc, float ymaxc, size_t channel_index)
+void ANIM_channel_draw_widgets(bContext *C, bAnimContext *ac, bAnimListElem *ale, uiBlock *block, float yminc, float ymaxc, size_t channel_index)
{
- bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale);
- View2D *v2d= &ac->ar->v2d;
- float y, ymid/*, ytext*/;
+ bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale);
+ View2D *v2d = &ac->ar->v2d;
+ float y, ymid /*, ytext*/;
short offset;
/* sanity checks - don't draw anything */
@@ -3163,15 +3164,15 @@ void ANIM_channel_draw_widgets (bContext *C, bAnimContext *ac, bAnimListElem *al
/* get initial offset */
if (acf->get_offset)
- offset= acf->get_offset(ac, ale);
+ offset = acf->get_offset(ac, ale);
else
- offset= 0;
+ offset = 0;
/* calculate appropriate y-coordinates for icon buttons
* 7 is hardcoded factor for half-height of icons
*/
- y= (ymaxc - yminc)/2 + yminc;
- ymid= y - 7;
+ y = (ymaxc - yminc) / 2 + yminc;
+ ymid = y - 7;
/* y-coordinates for text is only 4 down from middle */
/* ytext= y - 4; */
@@ -3212,7 +3213,7 @@ void ANIM_channel_draw_widgets (bContext *C, bAnimContext *ac, bAnimListElem *al
float channel_height = ymaxc - yminc;
/* if rename index matches, add widget for this */
- if (ac->ads->renameIndex == channel_index+1) {
+ if (ac->ads->renameIndex == channel_index + 1) {
PointerRNA ptr;
PropertyRNA *prop;
@@ -3222,7 +3223,8 @@ void ANIM_channel_draw_widgets (bContext *C, bAnimContext *ac, bAnimListElem *al
uiBlockSetEmboss(block, UI_EMBOSS);
- but = uiDefButR(block, TEX, 1, "", offset+3, yminc, RENAME_TEXT_WIDTH, channel_height, &ptr, RNA_property_identifier(prop), -1, 0, 0, -1, -1, NULL);
+ but = uiDefButR(block, TEX, 1, "", offset + 3, yminc, RENAME_TEXT_WIDTH, channel_height,
+ &ptr, RNA_property_identifier(prop), -1, 0, 0, -1, -1, NULL);
uiButSetFunc(but, achannel_setting_rename_done_cb, ac->ads, NULL);
uiButActiveOnly(C, block, but);
@@ -3245,30 +3247,30 @@ void ANIM_channel_draw_widgets (bContext *C, bAnimContext *ac, bAnimListElem *al
switch (ac->spacetype) {
case SPACE_ACTION:
{
- SpaceAction *saction= (SpaceAction *)ac->sl;
- draw_sliders= (saction->flag & SACTION_SLIDERS);
+ SpaceAction *saction = (SpaceAction *)ac->sl;
+ draw_sliders = (saction->flag & SACTION_SLIDERS);
}
- break;
+ break;
case SPACE_IPO:
{
- SpaceIpo *sipo= (SpaceIpo *)ac->sl;
- draw_sliders= (sipo->flag & SIPO_SLIDERS);
+ SpaceIpo *sipo = (SpaceIpo *)ac->sl;
+ draw_sliders = (sipo->flag & SIPO_SLIDERS);
}
- break;
+ break;
}
}
/* check if there's enough space for the toggles if the sliders are drawn too */
- if ( !(draw_sliders) || ((v2d->mask.xmax-v2d->mask.xmin) > ACHANNEL_BUTTON_WIDTH/2) ) {
+ if (!(draw_sliders) || ((v2d->mask.xmax - v2d->mask.xmin) > ACHANNEL_BUTTON_WIDTH / 2) ) {
/* protect... */
if (acf->has_setting(ac, ale, ACHANNEL_SETTING_PROTECT)) {
offset += ICON_WIDTH;
- draw_setting_widget(ac, ale, acf, block, (int)v2d->cur.xmax-offset, ymid, ACHANNEL_SETTING_PROTECT);
+ draw_setting_widget(ac, ale, acf, block, (int)v2d->cur.xmax - offset, ymid, ACHANNEL_SETTING_PROTECT);
}
/* mute... */
if (acf->has_setting(ac, ale, ACHANNEL_SETTING_MUTE)) {
offset += ICON_WIDTH;
- draw_setting_widget(ac, ale, acf, block, (int)v2d->cur.xmax-offset, ymid, ACHANNEL_SETTING_MUTE);
+ draw_setting_widget(ac, ale, acf, block, (int)v2d->cur.xmax - offset, ymid, ACHANNEL_SETTING_MUTE);
}
}
@@ -3297,17 +3299,17 @@ void ANIM_channel_draw_widgets (bContext *C, bAnimContext *ac, bAnimListElem *al
/* get destination info */
if (ale->type == ANIMTYPE_FCURVE) {
- FCurve *fcu= (FCurve *)ale->data;
+ FCurve *fcu = (FCurve *)ale->data;
- rna_path= fcu->rna_path;
- array_index= fcu->array_index;
+ rna_path = fcu->rna_path;
+ array_index = fcu->array_index;
}
else if (ale->type == ANIMTYPE_SHAPEKEY) {
- KeyBlock *kb= (KeyBlock *)ale->data;
- Key *key= (Key *)ale->id;
+ KeyBlock *kb = (KeyBlock *)ale->data;
+ Key *key = (Key *)ale->id;
- rna_path= key_get_curValue_rnaPath(key, kb);
- free_path= 1;
+ rna_path = key_get_curValue_rnaPath(key, kb);
+ free_path = 1;
}
/* only if RNA-Path found */
@@ -3320,7 +3322,7 @@ void ANIM_channel_draw_widgets (bContext *C, bAnimContext *ac, bAnimListElem *al
uiBut *but;
/* create the slider button, and assign relevant callback to ensure keyframes are inserted... */
- but = uiDefAutoButR(block, &ptr, prop, array_index, "", ICON_NONE, (int)v2d->cur.xmax-offset, ymid, SLIDER_WIDTH, (int)ymaxc-yminc);
+ but = uiDefAutoButR(block, &ptr, prop, array_index, "", ICON_NONE, (int)v2d->cur.xmax - offset, ymid, SLIDER_WIDTH, (int)ymaxc - yminc);
/* assign keyframing function according to slider type */
if (ale->type == ANIMTYPE_SHAPEKEY)
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index fb6a65a585f..df8c1d29079 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -69,7 +69,7 @@
/* Set the given animation-channel as the active one for the active context */
// TODO: extend for animdata types...
-void ANIM_set_active_channel (bAnimContext *ac, void *data, short datatype, int filter, void *channel_data, short channel_type)
+void ANIM_set_active_channel(bAnimContext *ac, void *data, short datatype, int filter, void *channel_data, short channel_type)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
@@ -80,7 +80,7 @@ void ANIM_set_active_channel (bAnimContext *ac, void *data, short datatype, int
return;
/* only clear the 'active' flag for the channels of the same type */
- for (ale= anim_data.first; ale; ale= ale->next) {
+ for (ale = anim_data.first; ale; ale = ale->next) {
/* skip if types don't match */
if (channel_type != ale->type)
continue;
@@ -89,28 +89,28 @@ void ANIM_set_active_channel (bAnimContext *ac, void *data, short datatype, int
switch (ale->type) {
case ANIMTYPE_GROUP:
{
- bActionGroup *agrp= (bActionGroup *)ale->data;
+ bActionGroup *agrp = (bActionGroup *)ale->data;
ACHANNEL_SET_FLAG(agrp, ACHANNEL_SETFLAG_CLEAR, AGRP_ACTIVE);
}
- break;
+ break;
case ANIMTYPE_FCURVE:
{
- FCurve *fcu= (FCurve *)ale->data;
+ FCurve *fcu = (FCurve *)ale->data;
ACHANNEL_SET_FLAG(fcu, ACHANNEL_SETFLAG_CLEAR, FCURVE_ACTIVE);
}
- break;
+ break;
case ANIMTYPE_NLATRACK:
{
- NlaTrack *nlt= (NlaTrack *)ale->data;
+ NlaTrack *nlt = (NlaTrack *)ale->data;
ACHANNEL_SET_FLAG(nlt, ACHANNEL_SETFLAG_CLEAR, NLATRACK_ACTIVE);
}
- break;
+ break;
case ANIMTYPE_FILLACTD: /* Action Expander */
- case ANIMTYPE_DSMAT: /* Datablock AnimData Expanders */
+ case ANIMTYPE_DSMAT: /* Datablock AnimData Expanders */
case ANIMTYPE_DSLAM:
case ANIMTYPE_DSCAM:
case ANIMTYPE_DSCUR:
@@ -129,7 +129,7 @@ void ANIM_set_active_channel (bAnimContext *ac, void *data, short datatype, int
ACHANNEL_SET_FLAG(ale->adt, ACHANNEL_SETFLAG_CLEAR, ADT_UI_ACTIVE);
}
}
- break;
+ break;
}
}
@@ -138,25 +138,25 @@ void ANIM_set_active_channel (bAnimContext *ac, void *data, short datatype, int
switch (channel_type) {
case ANIMTYPE_GROUP:
{
- bActionGroup *agrp= (bActionGroup *)channel_data;
+ bActionGroup *agrp = (bActionGroup *)channel_data;
agrp->flag |= AGRP_ACTIVE;
}
- break;
+ break;
case ANIMTYPE_FCURVE:
{
- FCurve *fcu= (FCurve *)channel_data;
+ FCurve *fcu = (FCurve *)channel_data;
fcu->flag |= FCURVE_ACTIVE;
}
- break;
+ break;
case ANIMTYPE_NLATRACK:
{
- NlaTrack *nlt= (NlaTrack *)channel_data;
+ NlaTrack *nlt = (NlaTrack *)channel_data;
nlt->flag |= NLATRACK_ACTIVE;
}
- break;
+ break;
case ANIMTYPE_FILLACTD: /* Action Expander */
- case ANIMTYPE_DSMAT: /* Datablock AnimData Expanders */
+ case ANIMTYPE_DSMAT: /* Datablock AnimData Expanders */
case ANIMTYPE_DSLAM:
case ANIMTYPE_DSCAM:
case ANIMTYPE_DSCUR:
@@ -174,7 +174,7 @@ void ANIM_set_active_channel (bAnimContext *ac, void *data, short datatype, int
ale->adt->flag |= ADT_UI_ACTIVE;
}
}
- break;
+ break;
}
}
@@ -188,7 +188,7 @@ void ANIM_set_active_channel (bAnimContext *ac, void *data, short datatype, int
* - test: check if deselecting instead of selecting
* - sel: eAnimChannels_SetFlag;
*/
-void ANIM_deselect_anim_channels (bAnimContext *ac, void *data, short datatype, short test, short sel)
+void ANIM_deselect_anim_channels(bAnimContext *ac, void *data, short datatype, short test, short sel)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
@@ -196,45 +196,45 @@ void ANIM_deselect_anim_channels (bAnimContext *ac, void *data, short datatype,
/* filter data */
/* NOTE: no list visible, otherwise, we get dangling */
- filter= ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_CHANNELS;
+ filter = ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_CHANNELS;
ANIM_animdata_filter(ac, &anim_data, filter, data, datatype);
/* See if we should be selecting or deselecting */
if (test) {
- for (ale= anim_data.first; ale; ale= ale->next) {
+ for (ale = anim_data.first; ale; ale = ale->next) {
if (sel == 0)
break;
switch (ale->type) {
case ANIMTYPE_SCENE:
if (ale->flag & SCE_DS_SELECTED)
- sel= ACHANNEL_SETFLAG_CLEAR;
+ sel = ACHANNEL_SETFLAG_CLEAR;
break;
case ANIMTYPE_OBJECT:
- #if 0 /* for now, do not take object selection into account, since it gets too annoying */
+ #if 0 /* for now, do not take object selection into account, since it gets too annoying */
if (ale->flag & SELECT)
- sel= ACHANNEL_SETFLAG_CLEAR;
+ sel = ACHANNEL_SETFLAG_CLEAR;
#endif
break;
case ANIMTYPE_GROUP:
if (ale->flag & AGRP_SELECTED)
- sel= ACHANNEL_SETFLAG_CLEAR;
+ sel = ACHANNEL_SETFLAG_CLEAR;
break;
case ANIMTYPE_FCURVE:
if (ale->flag & FCURVE_SELECTED)
- sel= ACHANNEL_SETFLAG_CLEAR;
+ sel = ACHANNEL_SETFLAG_CLEAR;
break;
case ANIMTYPE_SHAPEKEY:
if (ale->flag & KEYBLOCK_SEL)
- sel= ACHANNEL_SETFLAG_CLEAR;
+ sel = ACHANNEL_SETFLAG_CLEAR;
break;
case ANIMTYPE_NLATRACK:
if (ale->flag & NLATRACK_SELECTED)
- sel= ACHANNEL_SETFLAG_CLEAR;
+ sel = ACHANNEL_SETFLAG_CLEAR;
break;
case ANIMTYPE_FILLACTD: /* Action Expander */
- case ANIMTYPE_DSMAT: /* Datablock AnimData Expanders */
+ case ANIMTYPE_DSMAT: /* Datablock AnimData Expanders */
case ANIMTYPE_DSLAM:
case ANIMTYPE_DSCAM:
case ANIMTYPE_DSCUR:
@@ -250,24 +250,24 @@ void ANIM_deselect_anim_channels (bAnimContext *ac, void *data, short datatype,
case ANIMTYPE_DSSPK:
{
if ((ale->adt) && (ale->adt->flag & ADT_UI_SELECTED))
- sel= ACHANNEL_SETFLAG_CLEAR;
+ sel = ACHANNEL_SETFLAG_CLEAR;
}
- break;
+ break;
case ANIMTYPE_GPLAYER:
if (ale->flag & GP_LAYER_SELECT)
- sel= ACHANNEL_SETFLAG_CLEAR;
+ sel = ACHANNEL_SETFLAG_CLEAR;
break;
}
}
}
/* Now set the flags */
- for (ale= anim_data.first; ale; ale= ale->next) {
+ for (ale = anim_data.first; ale; ale = ale->next) {
switch (ale->type) {
case ANIMTYPE_SCENE:
{
- Scene *scene= (Scene *)ale->data;
+ Scene *scene = (Scene *)ale->data;
ACHANNEL_SET_FLAG(scene, sel, SCE_DS_SELECTED);
@@ -275,56 +275,56 @@ void ANIM_deselect_anim_channels (bAnimContext *ac, void *data, short datatype,
ACHANNEL_SET_FLAG(scene, sel, ADT_UI_SELECTED);
}
}
- break;
+ break;
case ANIMTYPE_OBJECT:
- #if 0 /* for now, do not take object selection into account, since it gets too annoying */
- {
- Base *base= (Base *)ale->data;
- Object *ob= base->object;
+ #if 0 /* for now, do not take object selection into account, since it gets too annoying */
+ {
+ Base *base = (Base *)ale->data;
+ Object *ob = base->object;
- ACHANNEL_SET_FLAG(base, sel, SELECT);
- ACHANNEL_SET_FLAG(ob, sel, SELECT);
+ ACHANNEL_SET_FLAG(base, sel, SELECT);
+ ACHANNEL_SET_FLAG(ob, sel, SELECT);
- if (ob->adt) {
- ACHANNEL_SET_FLAG(ob, sel, ADT_UI_SELECTED);
+ if (ob->adt) {
+ ACHANNEL_SET_FLAG(ob, sel, ADT_UI_SELECTED);
+ }
}
- }
#endif
break;
case ANIMTYPE_GROUP:
{
- bActionGroup *agrp= (bActionGroup *)ale->data;
+ bActionGroup *agrp = (bActionGroup *)ale->data;
ACHANNEL_SET_FLAG(agrp, sel, AGRP_SELECTED);
agrp->flag &= ~AGRP_ACTIVE;
}
- break;
+ break;
case ANIMTYPE_FCURVE:
{
- FCurve *fcu= (FCurve *)ale->data;
+ FCurve *fcu = (FCurve *)ale->data;
ACHANNEL_SET_FLAG(fcu, sel, FCURVE_SELECTED);
fcu->flag &= ~FCURVE_ACTIVE;
}
- break;
+ break;
case ANIMTYPE_SHAPEKEY:
{
- KeyBlock *kb= (KeyBlock *)ale->data;
+ KeyBlock *kb = (KeyBlock *)ale->data;
ACHANNEL_SET_FLAG(kb, sel, KEYBLOCK_SEL);
}
- break;
+ break;
case ANIMTYPE_NLATRACK:
{
- NlaTrack *nlt= (NlaTrack *)ale->data;
+ NlaTrack *nlt = (NlaTrack *)ale->data;
ACHANNEL_SET_FLAG(nlt, sel, NLATRACK_SELECTED);
nlt->flag &= ~NLATRACK_ACTIVE;
}
- break;
+ break;
case ANIMTYPE_FILLACTD: /* Action Expander */
- case ANIMTYPE_DSMAT: /* Datablock AnimData Expanders */
+ case ANIMTYPE_DSMAT: /* Datablock AnimData Expanders */
case ANIMTYPE_DSLAM:
case ANIMTYPE_DSCAM:
case ANIMTYPE_DSCUR:
@@ -345,7 +345,7 @@ void ANIM_deselect_anim_channels (bAnimContext *ac, void *data, short datatype,
ale->adt->flag &= ~ADT_UI_ACTIVE;
}
}
- break;
+ break;
case ANIMTYPE_GPLAYER:
{
@@ -353,7 +353,7 @@ void ANIM_deselect_anim_channels (bAnimContext *ac, void *data, short datatype,
ACHANNEL_SET_FLAG(gpl, sel, GP_LAYER_SELECT);
}
- break;
+ break;
}
}
@@ -372,23 +372,23 @@ void ANIM_deselect_anim_channels (bAnimContext *ac, void *data, short datatype,
* - setting: type of setting to set
* - on: whether the visibility setting has been enabled or disabled
*/
-void ANIM_flush_setting_anim_channels (bAnimContext *ac, ListBase *anim_data, bAnimListElem *ale_setting, int setting, short on)
+void ANIM_flush_setting_anim_channels(bAnimContext *ac, ListBase *anim_data, bAnimListElem *ale_setting, int setting, short on)
{
- bAnimListElem *ale, *match=NULL;
- int prevLevel=0, matchLevel=0;
+ bAnimListElem *ale, *match = NULL;
+ int prevLevel = 0, matchLevel = 0;
/* sanity check */
if (ELEM(NULL, anim_data, anim_data->first))
return;
/* find the channel that got changed */
- for (ale= anim_data->first; ale; ale= ale->next) {
+ for (ale = anim_data->first; ale; ale = ale->next) {
/* compare data, and type as main way of identifying the channel */
if ((ale->data == ale_setting->data) && (ale->type == ale_setting->type)) {
/* we also have to check the ID, this is assigned to, since a block may have multiple users */
// TODO: is the owner-data more revealing?
if (ale->id == ale_setting->id) {
- match= ale;
+ match = ale;
break;
}
}
@@ -398,7 +398,7 @@ void ANIM_flush_setting_anim_channels (bAnimContext *ac, ListBase *anim_data, bA
return;
}
else {
- bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale_setting);
+ bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale_setting);
if (acf == NULL) {
printf("ERROR: no channel info for the changed channel\n");
@@ -406,10 +406,10 @@ void ANIM_flush_setting_anim_channels (bAnimContext *ac, ListBase *anim_data, bA
}
/* get the level of the channel that was affected
- * - we define the level as simply being the offset for the start of the channel
+ * - we define the level as simply being the offset for the start of the channel
*/
- matchLevel= (acf->get_offset)? acf->get_offset(ac, ale_setting) : 0;
- prevLevel= matchLevel;
+ matchLevel = (acf->get_offset) ? acf->get_offset(ac, ale_setting) : 0;
+ prevLevel = matchLevel;
}
/* flush up?
@@ -423,11 +423,11 @@ void ANIM_flush_setting_anim_channels (bAnimContext *ac, ListBase *anim_data, bA
* (otherwise, it's too much work to force the parents to be active too)
*/
if ( ((setting == ACHANNEL_SETTING_VISIBLE) && on) ||
- ((setting != ACHANNEL_SETTING_VISIBLE) && on==0) )
+ ((setting != ACHANNEL_SETTING_VISIBLE) && on == 0) )
{
/* go backwards in the list, until the highest-ranking element (by indention has been covered) */
- for (ale= match->prev; ale; ale= ale->prev) {
- bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale);
+ for (ale = match->prev; ale; ale = ale->prev) {
+ bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale);
int level;
/* if no channel info was found, skip, since this type might not have any useful info */
@@ -435,9 +435,9 @@ void ANIM_flush_setting_anim_channels (bAnimContext *ac, ListBase *anim_data, bA
continue;
/* get the level of the current channel traversed
- * - we define the level as simply being the offset for the start of the channel
+ * - we define the level as simply being the offset for the start of the channel
*/
- level= (acf->get_offset)? acf->get_offset(ac, ale) : 0;
+ level = (acf->get_offset) ? acf->get_offset(ac, ale) : 0;
/* if the level is 'less than' (i.e. more important) the level we're matching
* but also 'less than' the level just tried (i.e. only the 1st group above grouped F-Curves,
@@ -449,7 +449,7 @@ void ANIM_flush_setting_anim_channels (bAnimContext *ac, ListBase *anim_data, bA
ANIM_channel_setting_set(ac, ale, setting, on);
/* store this level as the 'old' level now */
- prevLevel= level;
+ prevLevel = level;
}
/* if the level is 'greater than' (i.e. less important) than the previous level... */
else if (level > prevLevel) {
@@ -470,8 +470,8 @@ void ANIM_flush_setting_anim_channels (bAnimContext *ac, ListBase *anim_data, bA
/* flush down (always) */
{
/* go forwards in the list, until the lowest-ranking element (by indention has been covered) */
- for (ale= match->next; ale; ale= ale->next) {
- bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale);
+ for (ale = match->next; ale; ale = ale->next) {
+ bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale);
int level;
/* if no channel info was found, skip, since this type might not have any useful info */
@@ -479,9 +479,9 @@ void ANIM_flush_setting_anim_channels (bAnimContext *ac, ListBase *anim_data, bA
continue;
/* get the level of the current channel traversed
- * - we define the level as simply being the offset for the start of the channel
+ * - we define the level as simply being the offset for the start of the channel
*/
- level= (acf->get_offset)? acf->get_offset(ac, ale) : 0;
+ level = (acf->get_offset) ? acf->get_offset(ac, ale) : 0;
/* if the level is 'greater than' (i.e. less important) the channel that was changed,
* flush the new status...
@@ -504,7 +504,7 @@ void ANIM_flush_setting_anim_channels (bAnimContext *ac, ListBase *anim_data, bA
/* -------------------------- F-Curves ------------------------------------- */
/* Delete the given F-Curve from its AnimData block */
-void ANIM_fcurve_delete_from_animdata (bAnimContext *ac, AnimData *adt, FCurve *fcu)
+void ANIM_fcurve_delete_from_animdata(bAnimContext *ac, AnimData *adt, FCurve *fcu)
{
/* - if no AnimData, we've got nowhere to remove the F-Curve from
* (this doesn't guarantee that the F-Curve is in there, but at least we tried
@@ -537,11 +537,11 @@ void ANIM_fcurve_delete_from_animdata (bAnimContext *ac, AnimData *adt, FCurve *
* channel list that are empty, and linger around long after the data they
* are for has disappeared (and probably won't come back).
*/
- // XXX: does everybody always want this?
- /* XXX: there's a problem where many actions could build up in the file if multiple
- * full add/delete cycles are performed on the same objects, but assume that this is rare
- */
- if ((adt->action->curves.first == NULL) && (adt->flag & ADT_NLA_EDIT_ON)==0) {
+ // XXX: does everybody always want this?
+ /* XXX: there's a problem where many actions could build up in the file if multiple
+ * full add/delete cycles are performed on the same objects, but assume that this is rare
+ */
+ if ((adt->action->curves.first == NULL) && (adt->flag & ADT_NLA_EDIT_ON) == 0) {
id_us_min(&adt->action->id);
adt->action = NULL;
}
@@ -557,9 +557,9 @@ void ANIM_fcurve_delete_from_animdata (bAnimContext *ac, AnimData *adt, FCurve *
/* ****************** Operator Utilities ********************************** */
/* poll callback for being in an Animation Editor channels list region */
-static int animedit_poll_channels_active (bContext *C)
+static int animedit_poll_channels_active(bContext *C)
{
- ScrArea *sa= CTX_wm_area(C);
+ ScrArea *sa = CTX_wm_area(C);
/* channels region test */
// TODO: could enhance with actually testing if channels region?
@@ -573,9 +573,9 @@ static int animedit_poll_channels_active (bContext *C)
}
/* poll callback for Animation Editor channels list region + not in NLA-tweakmode for NLA */
-static int animedit_poll_channels_nla_tweakmode_off (bContext *C)
+static int animedit_poll_channels_nla_tweakmode_off(bContext *C)
{
- ScrArea *sa= CTX_wm_area(C);
+ ScrArea *sa = CTX_wm_area(C);
Scene *scene = CTX_data_scene(C);
/* channels region test */
@@ -600,10 +600,10 @@ static int animedit_poll_channels_nla_tweakmode_off (bContext *C)
/* constants for channel rearranging */
/* WARNING: don't change exising ones without modifying rearrange func accordingly */
enum {
- REARRANGE_ANIMCHAN_TOP= -2,
- REARRANGE_ANIMCHAN_UP= -1,
- REARRANGE_ANIMCHAN_DOWN= 1,
- REARRANGE_ANIMCHAN_BOTTOM= 2
+ REARRANGE_ANIMCHAN_TOP = -2,
+ REARRANGE_ANIMCHAN_UP = -1,
+ REARRANGE_ANIMCHAN_DOWN = 1,
+ REARRANGE_ANIMCHAN_BOTTOM = 2
};
/* defines for rearranging channels */
@@ -621,21 +621,21 @@ static EnumPropertyItem prop_animchannel_rearrange_types[] = {
typedef struct tReorderChannelIsland {
struct tReorderChannelIsland *next, *prev;
- ListBase channels; /* channels within this region with the same state */
- int flag; /* eReorderIslandFlag */
+ ListBase channels; /* channels within this region with the same state */
+ int flag; /* eReorderIslandFlag */
} tReorderChannelIsland;
/* flags for channel reordering islands */
typedef enum eReorderIslandFlag {
- REORDER_ISLAND_SELECTED = (1<<0), /* island is selected */
- REORDER_ISLAND_UNTOUCHABLE = (1<<1), /* island should be ignored */
- REORDER_ISLAND_MOVED = (1<<2) /* island has already been moved */
+ REORDER_ISLAND_SELECTED = (1 << 0), /* island is selected */
+ REORDER_ISLAND_UNTOUCHABLE = (1 << 1), /* island should be ignored */
+ REORDER_ISLAND_MOVED = (1 << 2) /* island has already been moved */
} eReorderIslandFlag;
/* Rearrange Methods --------------------------------------------- */
-static short rearrange_island_ok (tReorderChannelIsland *island)
+static short rearrange_island_ok(tReorderChannelIsland *island)
{
/* island must not be untouchable */
if (island->flag & REORDER_ISLAND_UNTOUCHABLE)
@@ -647,7 +647,7 @@ static short rearrange_island_ok (tReorderChannelIsland *island)
/* ............................. */
-static short rearrange_island_top (ListBase *list, tReorderChannelIsland *island)
+static short rearrange_island_top(ListBase *list, tReorderChannelIsland *island)
{
if (rearrange_island_ok(island)) {
/* remove from current position */
@@ -662,11 +662,11 @@ static short rearrange_island_top (ListBase *list, tReorderChannelIsland *island
return 0;
}
-static short rearrange_island_up (ListBase *list, tReorderChannelIsland *island)
+static short rearrange_island_up(ListBase *list, tReorderChannelIsland *island)
{
if (rearrange_island_ok(island)) {
/* moving up = moving before the previous island, otherwise we're in the same place */
- tReorderChannelIsland *prev= island->prev;
+ tReorderChannelIsland *prev = island->prev;
if (prev) {
/* remove from current position */
@@ -682,7 +682,7 @@ static short rearrange_island_up (ListBase *list, tReorderChannelIsland *island)
return 0;
}
-static short rearrange_island_down (ListBase *list, tReorderChannelIsland *island)
+static short rearrange_island_down(ListBase *list, tReorderChannelIsland *island)
{
if (rearrange_island_ok(island)) {
/* moving down = moving after the next island, otherwise we're in the same place */
@@ -690,7 +690,7 @@ static short rearrange_island_down (ListBase *list, tReorderChannelIsland *islan
if (next) {
/* can only move past if next is not untouchable (i.e. nothing can go after it) */
- if ((next->flag & REORDER_ISLAND_UNTOUCHABLE)==0) {
+ if ((next->flag & REORDER_ISLAND_UNTOUCHABLE) == 0) {
/* remove from current position */
BLI_remlink(list, island);
@@ -706,7 +706,7 @@ static short rearrange_island_down (ListBase *list, tReorderChannelIsland *islan
return 0;
}
-static short rearrange_island_bottom (ListBase *list, tReorderChannelIsland *island)
+static short rearrange_island_bottom(ListBase *list, tReorderChannelIsland *island)
{
if (rearrange_island_ok(island)) {
tReorderChannelIsland *last = list->last;
@@ -715,7 +715,7 @@ static short rearrange_island_bottom (ListBase *list, tReorderChannelIsland *isl
BLI_remlink(list, island);
/* add before or after the last channel? */
- if ((last->flag & REORDER_ISLAND_UNTOUCHABLE)==0) {
+ if ((last->flag & REORDER_ISLAND_UNTOUCHABLE) == 0) {
/* can add after it */
BLI_addtail(list, island);
}
@@ -741,7 +741,7 @@ static short rearrange_island_bottom (ListBase *list, tReorderChannelIsland *isl
typedef short (*AnimChanRearrangeFp)(ListBase *list, tReorderChannelIsland *island);
/* get rearranging function, given 'rearrange' mode */
-static AnimChanRearrangeFp rearrange_get_mode_func (short mode)
+static AnimChanRearrangeFp rearrange_get_mode_func(short mode)
{
switch (mode) {
case REARRANGE_ANIMCHAN_TOP:
@@ -760,35 +760,35 @@ static AnimChanRearrangeFp rearrange_get_mode_func (short mode)
/* Rearrange Islands Generics ------------------------------------- */
/* add channel into list of islands */
-static void rearrange_animchannel_add_to_islands (ListBase *islands, ListBase *srcList, Link *channel, short type)
+static void rearrange_animchannel_add_to_islands(ListBase *islands, ListBase *srcList, Link *channel, short type)
{
- tReorderChannelIsland *island = islands->last; /* always try to add to last island if possible */
- short is_sel=0, is_untouchable=0;
+ tReorderChannelIsland *island = islands->last; /* always try to add to last island if possible */
+ short is_sel = 0, is_untouchable = 0;
/* get flags - selected and untouchable from the channel */
switch (type) {
case ANIMTYPE_GROUP:
{
- bActionGroup *agrp= (bActionGroup *)channel;
+ bActionGroup *agrp = (bActionGroup *)channel;
- is_sel= SEL_AGRP(agrp);
- is_untouchable= (agrp->flag & AGRP_TEMP) != 0;
+ is_sel = SEL_AGRP(agrp);
+ is_untouchable = (agrp->flag & AGRP_TEMP) != 0;
}
- break;
+ break;
case ANIMTYPE_FCURVE:
{
- FCurve *fcu= (FCurve *)channel;
+ FCurve *fcu = (FCurve *)channel;
- is_sel= SEL_FCU(fcu);
+ is_sel = SEL_FCU(fcu);
}
- break;
+ break;
case ANIMTYPE_NLATRACK:
{
- NlaTrack *nlt= (NlaTrack *)channel;
+ NlaTrack *nlt = (NlaTrack *)channel;
- is_sel= SEL_NLT(nlt);
+ is_sel = SEL_NLT(nlt);
}
- break;
+ break;
default:
printf("rearrange_animchannel_add_to_islands(): don't know how to handle channels of type %d\n", type);
@@ -797,8 +797,8 @@ static void rearrange_animchannel_add_to_islands (ListBase *islands, ListBase *s
/* do we need to add to a new island? */
if ((island == NULL) || /* 1) no islands yet */
- ((island->flag & REORDER_ISLAND_SELECTED) == 0) || /* 2) unselected islands have single channels only - to allow up/down movement */
- (is_sel == 0)) /* 3) if channel is unselected, stop existing island (it was either wrong sel status, or full already) */
+ ((island->flag & REORDER_ISLAND_SELECTED) == 0) || /* 2) unselected islands have single channels only - to allow up/down movement */
+ (is_sel == 0)) /* 3) if channel is unselected, stop existing island (it was either wrong sel status, or full already) */
{
/* create a new island now */
island = MEM_callocN(sizeof(tReorderChannelIsland), "tReorderChannelIsland");
@@ -816,9 +816,9 @@ static void rearrange_animchannel_add_to_islands (ListBase *islands, ListBase *s
}
/* flatten islands out into a single list again */
-static void rearrange_animchannel_flatten_islands (ListBase *islands, ListBase *srcList)
+static void rearrange_animchannel_flatten_islands(ListBase *islands, ListBase *srcList)
{
- tReorderChannelIsland *island, *isn=NULL;
+ tReorderChannelIsland *island, *isn = NULL;
/* make sure srcList is empty now */
BLI_assert(srcList->first == NULL);
@@ -836,10 +836,10 @@ static void rearrange_animchannel_flatten_islands (ListBase *islands, ListBase *
/* ............................. */
/* performing rearranging of channels using islands */
-static short rearrange_animchannel_islands (ListBase *list, AnimChanRearrangeFp rearrange_func, short mode, short type)
+static short rearrange_animchannel_islands(ListBase *list, AnimChanRearrangeFp rearrange_func, short mode, short type)
{
ListBase islands = {NULL, NULL};
- Link *channel, *chanNext=NULL;
+ Link *channel, *chanNext = NULL;
short done = 0;
/* don't waste effort on an empty list */
@@ -858,7 +858,7 @@ static short rearrange_animchannel_islands (ListBase *list, AnimChanRearrangeFp
*/
if (islands.first != islands.last) {
tReorderChannelIsland *first = (mode > 0) ? islands.last : islands.first;
- tReorderChannelIsland *island, *isn=NULL;
+ tReorderChannelIsland *island, *isn = NULL;
for (island = first; island; island = isn) {
isn = (mode > 0) ? island->prev : island->next;
@@ -884,7 +884,7 @@ static short rearrange_animchannel_islands (ListBase *list, AnimChanRearrangeFp
* ! NLA tracks are displayed in opposite order, so directions need care
* mode: REARRANGE_ANIMCHAN_*
*/
-static void rearrange_nla_channels (bAnimContext *UNUSED(ac), AnimData *adt, short mode)
+static void rearrange_nla_channels(bAnimContext *UNUSED(ac), AnimData *adt, short mode)
{
AnimChanRearrangeFp rearrange_func;
@@ -909,7 +909,7 @@ static void rearrange_nla_channels (bAnimContext *UNUSED(ac), AnimData *adt, sho
/* Change the order drivers within AnimData block
* mode: REARRANGE_ANIMCHAN_*
*/
-static void rearrange_driver_channels (bAnimContext *UNUSED(ac), AnimData *adt, short mode)
+static void rearrange_driver_channels(bAnimContext *UNUSED(ac), AnimData *adt, short mode)
{
/* get rearranging function */
AnimChanRearrangeFp rearrange_func = rearrange_get_mode_func(mode);
@@ -928,7 +928,7 @@ static void rearrange_driver_channels (bAnimContext *UNUSED(ac), AnimData *adt,
/* Action Specific Stuff ------------------------------------------------- */
/* make sure all action-channels belong to a group (and clear action's list) */
-static void split_groups_action_temp (bAction *act, bActionGroup *tgrp)
+static void split_groups_action_temp(bAction *act, bActionGroup *tgrp)
{
bActionGroup *agrp;
FCurve *fcu;
@@ -937,37 +937,37 @@ static void split_groups_action_temp (bAction *act, bActionGroup *tgrp)
return;
/* Separate F-Curves into lists per group */
- for (agrp= act->groups.first; agrp; agrp= agrp->next) {
+ for (agrp = act->groups.first; agrp; agrp = agrp->next) {
if (agrp->channels.first) {
- fcu= agrp->channels.last;
- act->curves.first= fcu->next;
+ fcu = agrp->channels.last;
+ act->curves.first = fcu->next;
- fcu= agrp->channels.first;
- fcu->prev= NULL;
+ fcu = agrp->channels.first;
+ fcu->prev = NULL;
- fcu= agrp->channels.last;
- fcu->next= NULL;
+ fcu = agrp->channels.last;
+ fcu->next = NULL;
}
}
/* Initialize memory for temp-group */
memset(tgrp, 0, sizeof(bActionGroup));
- tgrp->flag |= (AGRP_EXPANDED|AGRP_TEMP);
+ tgrp->flag |= (AGRP_EXPANDED | AGRP_TEMP);
BLI_strncpy(tgrp->name, "#TempGroup", sizeof(tgrp->name));
/* Move any action-channels not already moved, to the temp group */
if (act->curves.first) {
/* start of list */
- fcu= act->curves.first;
- fcu->prev= NULL;
- tgrp->channels.first= fcu;
- act->curves.first= NULL;
+ fcu = act->curves.first;
+ fcu->prev = NULL;
+ tgrp->channels.first = fcu;
+ act->curves.first = NULL;
/* end of list */
- fcu= act->curves.last;
- fcu->next= NULL;
- tgrp->channels.last= fcu;
- act->curves.last= NULL;
+ fcu = act->curves.last;
+ fcu->next = NULL;
+ tgrp->channels.last = fcu;
+ act->curves.last = NULL;
}
/* Add temp-group to list */
@@ -975,17 +975,17 @@ static void split_groups_action_temp (bAction *act, bActionGroup *tgrp)
}
/* link lists of channels that groups have */
-static void join_groups_action_temp (bAction *act)
+static void join_groups_action_temp(bAction *act)
{
bActionGroup *agrp;
- for (agrp= act->groups.first; agrp; agrp= agrp->next) {
+ for (agrp = act->groups.first; agrp; agrp = agrp->next) {
ListBase tempGroup;
/* add list of channels to action's channels */
- tempGroup= agrp->channels;
+ tempGroup = agrp->channels;
BLI_movelisttolist(&act->curves, &agrp->channels);
- agrp->channels= tempGroup;
+ agrp->channels = tempGroup;
/* clear moved flag */
agrp->flag &= ~AGRP_MOVED;
@@ -1001,7 +1001,7 @@ static void join_groups_action_temp (bAction *act)
/* Change the order of anim-channels within action
* mode: REARRANGE_ANIMCHAN_*
*/
-static void rearrange_action_channels (bAnimContext *ac, bAction *act, short mode)
+static void rearrange_action_channels(bAnimContext *ac, bAction *act, short mode)
{
bActionGroup tgrp;
short do_channels;
@@ -1024,7 +1024,7 @@ static void rearrange_action_channels (bAnimContext *ac, bAction *act, short mod
if (do_channels) {
bActionGroup *agrp;
- for (agrp= act->groups.first; agrp; agrp= agrp->next) {
+ for (agrp = act->groups.first; agrp; agrp = agrp->next) {
/* only consider F-Curves if they're visible (group expanded) */
if (EXPANDED_AGRP(ac, agrp)) {
rearrange_animchannel_islands(&agrp->channels, rearrange_func, mode, ANIMTYPE_FCURVE);
@@ -1048,7 +1048,7 @@ static int animchannels_rearrange_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* get mode */
- mode= RNA_enum_get(op->ptr, "direction");
+ mode = RNA_enum_get(op->ptr, "direction");
/* method to move channels depends on the editor */
if (ac.datatype == ANIMCONT_GPENCIL) {
@@ -1065,11 +1065,11 @@ static int animchannels_rearrange_exec(bContext *C, wmOperator *op)
int filter;
/* get animdata blocks */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_ANIMDATA);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_ANIMDATA);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
for (ale = anim_data.first; ale; ale = ale->next) {
- AnimData *adt= ale->data;
+ AnimData *adt = ale->data;
switch (ac.datatype) {
case ANIMCONT_NLA: /* NLA-tracks only */
@@ -1096,12 +1096,12 @@ static int animchannels_rearrange_exec(bContext *C, wmOperator *op)
}
/* send notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
-static void ANIM_OT_channels_move (wmOperatorType *ot)
+static void ANIM_OT_channels_move(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Move Channels";
@@ -1113,7 +1113,7 @@ static void ANIM_OT_channels_move (wmOperatorType *ot)
ot->poll = animedit_poll_channels_nla_tweakmode_off;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* props */
ot->prop = RNA_def_enum(ot->srna, "direction", prop_animchannel_rearrange_types, REARRANGE_ANIMCHAN_DOWN, "Direction", "");
@@ -1140,15 +1140,15 @@ static int animchannels_delete_exec(bContext *C, wmOperator *UNUSED(op))
/* do groups only first (unless in Drivers mode, where there are none) */
if (ac.datatype != ANIMCONT_DRIVERS) {
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_LIST_CHANNELS | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_LIST_CHANNELS | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* delete selected groups and their associated channels */
- for (ale= anim_data.first; ale; ale= ale->next) {
+ for (ale = anim_data.first; ale; ale = ale->next) {
/* only groups - don't check other types yet, since they may no-longer exist */
if (ale->type == ANIMTYPE_GROUP) {
- bActionGroup *agrp= (bActionGroup *)ale->data;
- AnimData *adt= ale->adt;
+ bActionGroup *agrp = (bActionGroup *)ale->data;
+ AnimData *adt = ale->adt;
FCurve *fcu, *fcn;
/* skip this group if no AnimData available, as we can't safely remove the F-Curves */
@@ -1156,8 +1156,8 @@ static int animchannels_delete_exec(bContext *C, wmOperator *UNUSED(op))
continue;
/* delete all of the Group's F-Curves, but no others */
- for (fcu= agrp->channels.first; fcu && fcu->grp==agrp; fcu= fcn) {
- fcn= fcu->next;
+ for (fcu = agrp->channels.first; fcu && fcu->grp == agrp; fcu = fcn) {
+ fcn = fcu->next;
/* remove from group and action, then free */
action_groups_remove_channel(adt->action, fcu);
@@ -1177,34 +1177,34 @@ static int animchannels_delete_exec(bContext *C, wmOperator *UNUSED(op))
}
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* delete selected data channels */
- for (ale= anim_data.first; ale; ale= ale->next) {
+ for (ale = anim_data.first; ale; ale = ale->next) {
switch (ale->type) {
case ANIMTYPE_FCURVE:
{
/* F-Curves if we can identify its parent */
- AnimData *adt= ale->adt;
- FCurve *fcu= (FCurve *)ale->data;
+ AnimData *adt = ale->adt;
+ FCurve *fcu = (FCurve *)ale->data;
/* try to free F-Curve */
ANIM_fcurve_delete_from_animdata(&ac, adt, fcu);
}
- break;
+ break;
case ANIMTYPE_GPLAYER:
{
/* Grease Pencil layer */
- bGPdata *gpd= (bGPdata *)ale->id;
- bGPDlayer *gpl= (bGPDlayer *)ale->data;
+ bGPdata *gpd = (bGPdata *)ale->id;
+ bGPDlayer *gpl = (bGPDlayer *)ale->data;
/* try to delete the layer's data and the layer itself */
free_gpencil_frames(gpl);
BLI_freelinkN(&gpd->layers, gpl);
}
- break;
+ break;
}
}
@@ -1212,12 +1212,12 @@ static int animchannels_delete_exec(bContext *C, wmOperator *UNUSED(op))
BLI_freelistN(&anim_data);
/* send notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
-static void ANIM_OT_channels_delete (wmOperatorType *ot)
+static void ANIM_OT_channels_delete(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Delete Channels";
@@ -1229,7 +1229,7 @@ static void ANIM_OT_channels_delete (wmOperatorType *ot)
ot->poll = animedit_poll_channels_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ******************** Set Channel Visibility Operator *********************** */
@@ -1250,7 +1250,7 @@ static int animchannels_visibility_set_exec(bContext *C, wmOperator *UNUSED(op))
/* get list of all channels that selection may need to be flushed to
* - hierarchy mustn't affect what we have access to here...
*/
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_CHANNELS | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_CHANNELS | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(&ac, &all_data, filter, ac.data, ac.datatype);
/* hide all channels not selected
@@ -1262,15 +1262,15 @@ static int animchannels_visibility_set_exec(bContext *C, wmOperator *UNUSED(op))
*/
if ((ac.spacetype == SPACE_IPO) && (ac.regiontype != RGN_TYPE_CHANNELS)) {
/* graph editor (case 2) */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_UNSEL | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_UNSEL | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS);
}
else {
/* standard case */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_UNSEL | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_UNSEL | ANIMFILTER_NODUPLIS);
}
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
- for (ale= anim_data.first; ale; ale= ale->next) {
+ for (ale = anim_data.first; ale; ale = ale->next) {
/* clear setting first */
ANIM_channel_setting_set(&ac, ale, ACHANNEL_SETTING_VISIBLE, ACHANNEL_SETFLAG_CLEAR);
@@ -1283,10 +1283,10 @@ static int animchannels_visibility_set_exec(bContext *C, wmOperator *UNUSED(op))
BLI_freelistN(&anim_data);
/* make all the selected channels visible */
- filter= (ANIMFILTER_SEL | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_SEL | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
- for (ale= anim_data.first; ale; ale= ale->next) {
+ for (ale = anim_data.first; ale; ale = ale->next) {
/* hack: skip object channels for now, since flushing those will always flush everything, but they are always included */
// TODO: find out why this is the case, and fix that
if (ale->type == ANIMTYPE_OBJECT)
@@ -1304,12 +1304,12 @@ static int animchannels_visibility_set_exec(bContext *C, wmOperator *UNUSED(op))
/* send notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
-static void ANIM_OT_channels_visibility_set (wmOperatorType *ot)
+static void ANIM_OT_channels_visibility_set(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Set Visibility";
@@ -1321,7 +1321,7 @@ static void ANIM_OT_channels_visibility_set (wmOperatorType *ot)
ot->poll = ED_operator_graphedit_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
@@ -1335,7 +1335,7 @@ static int animchannels_visibility_toggle_exec(bContext *C, wmOperator *UNUSED(o
ListBase all_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
- short vis= ACHANNEL_SETFLAG_ADD;
+ short vis = ACHANNEL_SETFLAG_ADD;
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
@@ -1344,26 +1344,26 @@ static int animchannels_visibility_toggle_exec(bContext *C, wmOperator *UNUSED(o
/* get list of all channels that selection may need to be flushed to
* - hierarchy mustn't affect what we have access to here...
*/
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_CHANNELS | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_CHANNELS | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(&ac, &all_data, filter, ac.data, ac.datatype);
/* filter data
* - restrict this to only applying on settings we can get to in the list
*/
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* See if we should be making showing all selected or hiding */
- for (ale= anim_data.first; ale; ale= ale->next) {
+ for (ale = anim_data.first; ale; ale = ale->next) {
/* set the setting in the appropriate way (if available) */
if (ANIM_channel_setting_get(&ac, ale, ACHANNEL_SETTING_VISIBLE)) {
- vis= ACHANNEL_SETFLAG_CLEAR;
+ vis = ACHANNEL_SETFLAG_CLEAR;
break;
}
}
/* Now set the flags */
- for (ale= anim_data.first; ale; ale= ale->next) {
+ for (ale = anim_data.first; ale; ale = ale->next) {
/* hack: skip object channels for now, since flushing those will always flush everything, but they are always included */
// TODO: find out why this is the case, and fix that
if (ale->type == ANIMTYPE_OBJECT)
@@ -1381,12 +1381,12 @@ static int animchannels_visibility_toggle_exec(bContext *C, wmOperator *UNUSED(o
BLI_freelistN(&all_data);
/* send notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
-static void ANIM_OT_channels_visibility_toggle (wmOperatorType *ot)
+static void ANIM_OT_channels_visibility_toggle(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Toggle Visibility";
@@ -1398,7 +1398,7 @@ static void ANIM_OT_channels_visibility_toggle (wmOperatorType *ot)
ot->poll = ED_operator_graphedit_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ********************** Set Flags Operator *********************** */
@@ -1429,7 +1429,7 @@ static EnumPropertyItem prop_animchannel_settings_types[] = {
* onlysel: only selected channels get the flag set
*/
// TODO: enable a setting which turns flushing on/off?
-static void setflag_anim_channels (bAnimContext *ac, short setting, short mode, short onlysel, short flush)
+static void setflag_anim_channels(bAnimContext *ac, short setting, short mode, short onlysel, short flush)
{
ListBase anim_data = {NULL, NULL};
ListBase all_data = {NULL, NULL};
@@ -1442,7 +1442,7 @@ static void setflag_anim_channels (bAnimContext *ac, short setting, short mode,
* - hierarchy visibility needs to be ignored so that settings can get flushed
* "down" inside closed containers
*/
- filter= ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_CHANNELS;
+ filter = ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_CHANNELS;
ANIM_animdata_filter(ac, &all_data, filter, ac->data, ac->datatype);
}
@@ -1455,11 +1455,11 @@ static void setflag_anim_channels (bAnimContext *ac, short setting, short mode,
*/
if ((ac->spacetype == SPACE_IPO) && (ac->regiontype != RGN_TYPE_CHANNELS)) {
/* graph editor (case 2) */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_CHANNELS | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_CHANNELS | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS);
}
else {
/* standard case */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS | ANIMFILTER_NODUPLIS);
}
if (onlysel) filter |= ANIMFILTER_SEL;
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
@@ -1467,20 +1467,20 @@ static void setflag_anim_channels (bAnimContext *ac, short setting, short mode,
/* if toggling, check if disable or enable */
if (mode == ACHANNEL_SETFLAG_TOGGLE) {
/* default to turn all on, unless we encounter one that's on... */
- mode= ACHANNEL_SETFLAG_ADD;
+ mode = ACHANNEL_SETFLAG_ADD;
/* see if we should turn off instead... */
- for (ale= anim_data.first; ale; ale= ale->next) {
+ for (ale = anim_data.first; ale; ale = ale->next) {
/* set the setting in the appropriate way (if available) */
if (ANIM_channel_setting_get(ac, ale, setting) > 0) {
- mode= ACHANNEL_SETFLAG_CLEAR;
+ mode = ACHANNEL_SETFLAG_CLEAR;
break;
}
}
}
/* apply the setting */
- for (ale= anim_data.first; ale; ale= ale->next) {
+ for (ale = anim_data.first; ale; ale = ale->next) {
/* skip channel if setting is not available */
if (ANIM_channel_setting_get(ac, ale, setting) == -1)
continue;
@@ -1503,19 +1503,19 @@ static int animchannels_setflag_exec(bContext *C, wmOperator *op)
{
bAnimContext ac;
short mode, setting;
- short flush=1;
+ short flush = 1;
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
return OPERATOR_CANCELLED;
/* mode (eAnimChannels_SetFlag), setting (eAnimChannel_Settings) */
- mode= RNA_enum_get(op->ptr, "mode");
- setting= RNA_enum_get(op->ptr, "type");
+ mode = RNA_enum_get(op->ptr, "mode");
+ setting = RNA_enum_get(op->ptr, "type");
/* check if setting is flushable */
if (setting == ACHANNEL_SETTING_EXPAND)
- flush= 0;
+ flush = 0;
/* modify setting
* - only selected channels are affected
@@ -1523,13 +1523,13 @@ static int animchannels_setflag_exec(bContext *C, wmOperator *op)
setflag_anim_channels(&ac, setting, mode, 1, flush);
/* send notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
/* duplicate of 'ANIM_OT_channels_setting_toggle' for menu title only, weak! */
-static void ANIM_OT_channels_setting_enable (wmOperatorType *ot)
+static void ANIM_OT_channels_setting_enable(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Enable Channel Setting";
@@ -1542,16 +1542,16 @@ static void ANIM_OT_channels_setting_enable (wmOperatorType *ot)
ot->poll = animedit_poll_channels_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* props */
- /* flag-setting mode */
+ /* flag-setting mode */
RNA_def_enum(ot->srna, "mode", prop_animchannel_setflag_types, ACHANNEL_SETFLAG_ADD, "Mode", "");
- /* setting to set */
+ /* setting to set */
ot->prop = RNA_def_enum(ot->srna, "type", prop_animchannel_settings_types, 0, "Type", "");
}
/* duplicate of 'ANIM_OT_channels_setting_toggle' for menu title only, weak! */
-static void ANIM_OT_channels_setting_disable (wmOperatorType *ot)
+static void ANIM_OT_channels_setting_disable(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Disable Channel Setting";
@@ -1564,16 +1564,16 @@ static void ANIM_OT_channels_setting_disable (wmOperatorType *ot)
ot->poll = animedit_poll_channels_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* props */
- /* flag-setting mode */
+ /* flag-setting mode */
RNA_def_enum(ot->srna, "mode", prop_animchannel_setflag_types, ACHANNEL_SETFLAG_CLEAR, "Mode", "");
- /* setting to set */
+ /* setting to set */
ot->prop = RNA_def_enum(ot->srna, "type", prop_animchannel_settings_types, 0, "Type", "");
}
-static void ANIM_OT_channels_setting_toggle (wmOperatorType *ot)
+static void ANIM_OT_channels_setting_toggle(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Toggle Channel Setting";
@@ -1586,16 +1586,16 @@ static void ANIM_OT_channels_setting_toggle (wmOperatorType *ot)
ot->poll = animedit_poll_channels_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* props */
- /* flag-setting mode */
+ /* flag-setting mode */
RNA_def_enum(ot->srna, "mode", prop_animchannel_setflag_types, ACHANNEL_SETFLAG_TOGGLE, "Mode", "");
- /* setting to set */
+ /* setting to set */
ot->prop = RNA_def_enum(ot->srna, "type", prop_animchannel_settings_types, 0, "Type", "");
}
-static void ANIM_OT_channels_editable_toggle (wmOperatorType *ot)
+static void ANIM_OT_channels_editable_toggle(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Toggle Channel Editability";
@@ -1607,21 +1607,21 @@ static void ANIM_OT_channels_editable_toggle (wmOperatorType *ot)
ot->poll = animedit_poll_channels_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* props */
- /* flag-setting mode */
+ /* flag-setting mode */
RNA_def_enum(ot->srna, "mode", prop_animchannel_setflag_types, ACHANNEL_SETFLAG_TOGGLE, "Mode", "");
- /* setting to set */
+ /* setting to set */
RNA_def_enum(ot->srna, "type", prop_animchannel_settings_types, ACHANNEL_SETTING_PROTECT, "Type", "");
}
/* ********************** Expand Channels Operator *********************** */
-static int animchannels_expand_exec (bContext *C, wmOperator *op)
+static int animchannels_expand_exec(bContext *C, wmOperator *op)
{
bAnimContext ac;
- short onlysel= 1;
+ short onlysel = 1;
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
@@ -1629,18 +1629,18 @@ static int animchannels_expand_exec (bContext *C, wmOperator *op)
/* only affect selected channels? */
if (RNA_boolean_get(op->ptr, "all"))
- onlysel= 0;
+ onlysel = 0;
/* modify setting */
setflag_anim_channels(&ac, ACHANNEL_SETTING_EXPAND, ACHANNEL_SETFLAG_ADD, onlysel, 0);
/* send notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
-static void ANIM_OT_channels_expand (wmOperatorType *ot)
+static void ANIM_OT_channels_expand(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Expand Channels";
@@ -1652,7 +1652,7 @@ static void ANIM_OT_channels_expand (wmOperatorType *ot)
ot->poll = animedit_poll_channels_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* props */
ot->prop = RNA_def_boolean(ot->srna, "all", 1, "All", "Expand all channels (not just selected ones)");
@@ -1660,10 +1660,10 @@ static void ANIM_OT_channels_expand (wmOperatorType *ot)
/* ********************** Collapse Channels Operator *********************** */
-static int animchannels_collapse_exec (bContext *C, wmOperator *op)
+static int animchannels_collapse_exec(bContext *C, wmOperator *op)
{
bAnimContext ac;
- short onlysel= 1;
+ short onlysel = 1;
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
@@ -1671,18 +1671,18 @@ static int animchannels_collapse_exec (bContext *C, wmOperator *op)
/* only affect selected channels? */
if (RNA_boolean_get(op->ptr, "all"))
- onlysel= 0;
+ onlysel = 0;
/* modify setting */
setflag_anim_channels(&ac, ACHANNEL_SETTING_EXPAND, ACHANNEL_SETFLAG_CLEAR, onlysel, 0);
/* send notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
-static void ANIM_OT_channels_collapse (wmOperatorType *ot)
+static void ANIM_OT_channels_collapse(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Collapse Channels";
@@ -1694,7 +1694,7 @@ static void ANIM_OT_channels_collapse (wmOperatorType *ot)
ot->poll = animedit_poll_channels_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* props */
ot->prop = RNA_def_boolean(ot->srna, "all", 1, "All", "Collapse all channels (not just selected ones)");
@@ -1702,9 +1702,9 @@ static void ANIM_OT_channels_collapse (wmOperatorType *ot)
/* ******************* Reenable Disabled Operator ******************* */
-static int animchannels_enable_poll (bContext *C)
+static int animchannels_enable_poll(bContext *C)
{
- ScrArea *sa= CTX_wm_area(C);
+ ScrArea *sa = CTX_wm_area(C);
/* channels region test */
// TODO: could enhance with actually testing if channels region?
@@ -1718,7 +1718,7 @@ static int animchannels_enable_poll (bContext *C)
return 1;
}
-static int animchannels_enable_exec (bContext *C, wmOperator *UNUSED(op))
+static int animchannels_enable_exec(bContext *C, wmOperator *UNUSED(op))
{
bAnimContext ac;
@@ -1731,11 +1731,11 @@ static int animchannels_enable_exec (bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* loop through filtered data and clean curves */
- for (ale= anim_data.first; ale; ale= ale->next) {
+ for (ale = anim_data.first; ale; ale = ale->next) {
FCurve *fcu = (FCurve *)ale->data;
/* remove disabled flags from F-Curves */
@@ -1753,12 +1753,12 @@ static int animchannels_enable_exec (bContext *C, wmOperator *UNUSED(op))
BLI_freelistN(&anim_data);
/* send notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
-static void ANIM_OT_channels_fcurves_enable (wmOperatorType *ot)
+static void ANIM_OT_channels_fcurves_enable(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Revive Disabled F-Curves";
@@ -1770,12 +1770,12 @@ static void ANIM_OT_channels_fcurves_enable (wmOperatorType *ot)
ot->poll = animchannels_enable_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ********************** Select All Operator *********************** */
-static int animchannels_deselectall_exec (bContext *C, wmOperator *op)
+static int animchannels_deselectall_exec(bContext *C, wmOperator *op)
{
bAnimContext ac;
@@ -1790,12 +1790,12 @@ static int animchannels_deselectall_exec (bContext *C, wmOperator *op)
ANIM_deselect_anim_channels(&ac, ac.data, ac.datatype, 1, ACHANNEL_SETFLAG_ADD);
/* send notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN|NA_SELECTED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_SELECTED, NULL);
return OPERATOR_FINISHED;
}
-static void ANIM_OT_channels_select_all_toggle (wmOperatorType *ot)
+static void ANIM_OT_channels_select_all_toggle(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Select All";
@@ -1807,7 +1807,7 @@ static void ANIM_OT_channels_select_all_toggle (wmOperatorType *ot)
ot->poll = animedit_poll_channels_nla_tweakmode_off;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* props */
ot->prop = RNA_def_boolean(ot->srna, "invert", 0, "Invert", "");
@@ -1815,14 +1815,14 @@ static void ANIM_OT_channels_select_all_toggle (wmOperatorType *ot)
/* ******************** Borderselect Operator *********************** */
-static void borderselect_anim_channels (bAnimContext *ac, rcti *rect, short selectmode)
+static void borderselect_anim_channels(bAnimContext *ac, rcti *rect, short selectmode)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
SpaceNla *snla = (SpaceNla *)ac->sl;
- View2D *v2d= &ac->ar->v2d;
+ View2D *v2d = &ac->ar->v2d;
rctf rectf;
float ymin, ymax;
@@ -1837,19 +1837,19 @@ static void borderselect_anim_channels (bAnimContext *ac, rcti *rect, short sele
}
/* convert border-region to view coordinates */
- UI_view2d_region_to_view(v2d, rect->xmin, rect->ymin+2, &rectf.xmin, &rectf.ymin);
- UI_view2d_region_to_view(v2d, rect->xmax, rect->ymax-2, &rectf.xmax, &rectf.ymax);
+ UI_view2d_region_to_view(v2d, rect->xmin, rect->ymin + 2, &rectf.xmin, &rectf.ymin);
+ UI_view2d_region_to_view(v2d, rect->xmax, rect->ymax - 2, &rectf.xmax, &rectf.ymax);
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop over data, doing border select */
- for (ale= anim_data.first; ale; ale= ale->next) {
+ for (ale = anim_data.first; ale; ale = ale->next) {
if (ac->datatype == ANIMCONT_NLA)
- ymin= ymax - NLACHANNEL_STEP(snla);
+ ymin = ymax - NLACHANNEL_STEP(snla);
else
- ymin= ymax - ACHANNEL_STEP;
+ ymin = ymax - ACHANNEL_STEP;
/* if channel is within border-select region, alter it */
if (!((ymax < rectf.ymin) || (ymin > rectf.ymax))) {
@@ -1860,27 +1860,27 @@ static void borderselect_anim_channels (bAnimContext *ac, rcti *rect, short sele
switch (ale->type) {
case ANIMTYPE_GROUP:
{
- bActionGroup *agrp= (bActionGroup *)ale->data;
+ bActionGroup *agrp = (bActionGroup *)ale->data;
/* always clear active flag after doing this */
agrp->flag &= ~AGRP_ACTIVE;
}
- break;
+ break;
case ANIMTYPE_NLATRACK:
{
- NlaTrack *nlt= (NlaTrack *)ale->data;
+ NlaTrack *nlt = (NlaTrack *)ale->data;
/* for now, it's easier just to do this here manually, as defining a new type
* currently adds complications when doing other stuff
*/
ACHANNEL_SET_FLAG(nlt, selectmode, NLATRACK_SELECTED);
}
- break;
+ break;
}
}
/* set minimum extent to be the maximum of the next channel */
- ymax= ymin;
+ ymax = ymin;
}
/* cleanup */
@@ -1893,7 +1893,7 @@ static int animchannels_borderselect_exec(bContext *C, wmOperator *op)
{
bAnimContext ac;
rcti rect;
- short selectmode=0;
+ short selectmode = 0;
int gesture_mode, extend;
/* get editor data */
@@ -1906,8 +1906,8 @@ static int animchannels_borderselect_exec(bContext *C, wmOperator *op)
rect.xmax = RNA_int_get(op->ptr, "xmax");
rect.ymax = RNA_int_get(op->ptr, "ymax");
- gesture_mode= RNA_int_get(op->ptr, "gesture_mode");
- extend= RNA_boolean_get(op->ptr, "extend");
+ gesture_mode = RNA_int_get(op->ptr, "gesture_mode");
+ extend = RNA_boolean_get(op->ptr, "extend");
if (!extend)
ANIM_deselect_anim_channels(&ac, ac.data, ac.datatype, 1, ACHANNEL_SETFLAG_CLEAR);
@@ -1921,7 +1921,7 @@ static int animchannels_borderselect_exec(bContext *C, wmOperator *op)
borderselect_anim_channels(&ac, &rect, selectmode);
/* send notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN|NA_SELECTED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_SELECTED, NULL);
return OPERATOR_FINISHED;
}
@@ -1942,7 +1942,7 @@ static void ANIM_OT_channels_select_border(wmOperatorType *ot)
ot->poll = animedit_poll_channels_nla_tweakmode_off;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* rna */
WM_operator_properties_gesture_border(ot, TRUE);
@@ -1951,7 +1951,7 @@ static void ANIM_OT_channels_select_border(wmOperatorType *ot)
/* ******************* Rename Operator ***************************** */
/* Allow renaming some channels by clicking on them */
-static void rename_anim_channels (bAnimContext *ac, int channel_index)
+static void rename_anim_channels(bAnimContext *ac, int channel_index)
{
ListBase anim_data = {NULL, NULL};
bAnimChannelType *acf;
@@ -1959,12 +1959,12 @@ static void rename_anim_channels (bAnimContext *ac, int channel_index)
int filter;
/* get the channel that was clicked on */
- /* filter channels */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS);
+ /* filter channels */
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
- /* get channel from index */
- ale= BLI_findlink(&anim_data, channel_index);
+ /* get channel from index */
+ ale = BLI_findlink(&anim_data, channel_index);
if (ale == NULL) {
/* channel not found */
if (G.debug & G_DEBUG)
@@ -2000,7 +2000,7 @@ static void rename_anim_channels (bAnimContext *ac, int channel_index)
ED_region_tag_redraw(ac->ar);
}
-static int animchannels_rename_invoke (bContext *C, wmOperator *UNUSED(op), wmEvent *evt)
+static int animchannels_rename_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *evt)
{
bAnimContext ac;
ARegion *ar;
@@ -2013,8 +2013,8 @@ static int animchannels_rename_invoke (bContext *C, wmOperator *UNUSED(op), wmEv
return OPERATOR_CANCELLED;
/* get useful pointers from animation context data */
- ar= ac.ar;
- v2d= &ar->v2d;
+ ar = ac.ar;
+ v2d = &ar->v2d;
/* figure out which channel user clicked in
* Note: although channels technically start at y= ACHANNEL_FIRST, we need to adjust by half a channel's height
@@ -2037,7 +2037,7 @@ static int animchannels_rename_invoke (bContext *C, wmOperator *UNUSED(op), wmEv
return OPERATOR_FINISHED;
}
-static void ANIM_OT_channels_rename (wmOperatorType *ot)
+static void ANIM_OT_channels_rename(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Rename Channels";
@@ -2052,7 +2052,7 @@ static void ANIM_OT_channels_rename (wmOperatorType *ot)
/* ******************** Mouse-Click Operator *********************** */
/* Handle selection changes due to clicking on channels. Settings will get caught by UI code... */
-static int mouse_anim_channels (bAnimContext *ac, float UNUSED(x), int channel_index, short selectmode)
+static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_index, short selectmode)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
@@ -2060,12 +2060,12 @@ static int mouse_anim_channels (bAnimContext *ac, float UNUSED(x), int channel_i
int notifierFlags = 0;
/* get the channel that was clicked on */
- /* filter channels */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS);
+ /* filter channels */
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
- /* get channel from index */
- ale= BLI_findlink(&anim_data, channel_index);
+ /* get channel from index */
+ ale = BLI_findlink(&anim_data, channel_index);
if (ale == NULL) {
/* channel not found */
if (G.debug & G_DEBUG)
@@ -2088,8 +2088,8 @@ static int mouse_anim_channels (bAnimContext *ac, float UNUSED(x), int channel_i
switch (ale->type) {
case ANIMTYPE_SCENE:
{
- Scene *sce= (Scene *)ale->data;
- AnimData *adt= sce->adt;
+ Scene *sce = (Scene *)ale->data;
+ AnimData *adt = sce->adt;
/* set selection status */
if (selectmode == SELECT_INVERT) {
@@ -2102,22 +2102,22 @@ static int mouse_anim_channels (bAnimContext *ac, float UNUSED(x), int channel_i
if (adt) adt->flag |= ADT_UI_SELECTED;
}
- notifierFlags |= (ND_ANIMCHAN|NA_SELECTED);
+ notifierFlags |= (ND_ANIMCHAN | NA_SELECTED);
}
- break;
+ break;
case ANIMTYPE_OBJECT:
{
- bDopeSheet *ads= (bDopeSheet *)ac->data;
- Scene *sce= (Scene *)ads->source;
- Base *base= (Base *)ale->data;
- Object *ob= base->object;
- AnimData *adt= ob->adt;
+ bDopeSheet *ads = (bDopeSheet *)ac->data;
+ Scene *sce = (Scene *)ads->source;
+ Base *base = (Base *)ale->data;
+ Object *ob = base->object;
+ AnimData *adt = ob->adt;
/* set selection status */
if (selectmode == SELECT_INVERT) {
/* swap select */
base->flag ^= SELECT;
- ob->flag= base->flag;
+ ob->flag = base->flag;
if (adt) adt->flag ^= ADT_UI_SELECTED;
}
@@ -2126,10 +2126,10 @@ static int mouse_anim_channels (bAnimContext *ac, float UNUSED(x), int channel_i
/* deselect all */
// TODO: should this deselect all other types of channels too?
- for (b= sce->base.first; b; b= b->next) {
+ for (b = sce->base.first; b; b = b->next) {
b->flag &= ~SELECT;
- b->object->flag= b->flag;
- if (b->object->adt) b->object->adt->flag &= ~(ADT_UI_SELECTED|ADT_UI_ACTIVE);
+ b->object->flag = b->flag;
+ if (b->object->adt) b->object->adt->flag &= ~(ADT_UI_SELECTED | ADT_UI_ACTIVE);
}
/* select object now */
@@ -2141,12 +2141,12 @@ static int mouse_anim_channels (bAnimContext *ac, float UNUSED(x), int channel_i
if ((adt) && (adt->flag & ADT_UI_SELECTED))
adt->flag |= ADT_UI_ACTIVE;
- notifierFlags |= (ND_ANIMCHAN|NA_SELECTED);
+ notifierFlags |= (ND_ANIMCHAN | NA_SELECTED);
}
- break;
+ break;
case ANIMTYPE_FILLACTD: /* Action Expander */
- case ANIMTYPE_DSMAT: /* Datablock AnimData Expanders */
+ case ANIMTYPE_DSMAT: /* Datablock AnimData Expanders */
case ANIMTYPE_DSLAM:
case ANIMTYPE_DSCAM:
case ANIMTYPE_DSCUR:
@@ -2179,13 +2179,13 @@ static int mouse_anim_channels (bAnimContext *ac, float UNUSED(x), int channel_i
ale->adt->flag |= ADT_UI_ACTIVE;
}
- notifierFlags |= (ND_ANIMCHAN|NA_SELECTED);
+ notifierFlags |= (ND_ANIMCHAN | NA_SELECTED);
}
- break;
+ break;
case ANIMTYPE_GROUP:
{
- bActionGroup *agrp= (bActionGroup *)ale->data;
+ bActionGroup *agrp = (bActionGroup *)ale->data;
/* select/deselect group */
if (selectmode == SELECT_INVERT) {
@@ -2200,7 +2200,7 @@ static int mouse_anim_channels (bAnimContext *ac, float UNUSED(x), int channel_i
ANIM_deselect_anim_channels(ac, ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR);
/* only select channels in group and group itself */
- for (fcu= agrp->channels.first; fcu && fcu->grp==agrp; fcu= fcu->next)
+ for (fcu = agrp->channels.first; fcu && fcu->grp == agrp; fcu = fcu->next)
fcu->flag |= FCURVE_SELECTED;
agrp->flag |= AGRP_SELECTED;
}
@@ -2214,12 +2214,12 @@ static int mouse_anim_channels (bAnimContext *ac, float UNUSED(x), int channel_i
if (agrp->flag & AGRP_SELECTED)
ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, agrp, ANIMTYPE_GROUP);
- notifierFlags |= (ND_ANIMCHAN|NA_SELECTED);
+ notifierFlags |= (ND_ANIMCHAN | NA_SELECTED);
}
- break;
+ break;
case ANIMTYPE_FCURVE:
{
- FCurve *fcu= (FCurve *)ale->data;
+ FCurve *fcu = (FCurve *)ale->data;
/* select/deselect */
if (selectmode == SELECT_INVERT) {
@@ -2236,12 +2236,12 @@ static int mouse_anim_channels (bAnimContext *ac, float UNUSED(x), int channel_i
if (fcu->flag & FCURVE_SELECTED)
ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, fcu, ANIMTYPE_FCURVE);
- notifierFlags |= (ND_ANIMCHAN|NA_SELECTED);
+ notifierFlags |= (ND_ANIMCHAN | NA_SELECTED);
}
- break;
+ break;
case ANIMTYPE_SHAPEKEY:
{
- KeyBlock *kb= (KeyBlock *)ale->data;
+ KeyBlock *kb = (KeyBlock *)ale->data;
/* select/deselect */
if (selectmode == SELECT_INVERT) {
@@ -2254,24 +2254,24 @@ static int mouse_anim_channels (bAnimContext *ac, float UNUSED(x), int channel_i
kb->flag |= KEYBLOCK_SEL;
}
- notifierFlags |= (ND_ANIMCHAN|NA_SELECTED);
+ notifierFlags |= (ND_ANIMCHAN | NA_SELECTED);
}
- break;
+ break;
case ANIMTYPE_GPDATABLOCK:
{
- bGPdata *gpd= (bGPdata *)ale->data;
+ bGPdata *gpd = (bGPdata *)ale->data;
/* toggle expand
* - although the triangle widget already allows this, the whole channel can also be used for this purpose
*/
gpd->flag ^= GP_DATA_EXPAND;
- notifierFlags |= (ND_ANIMCHAN|NA_EDITED);
+ notifierFlags |= (ND_ANIMCHAN | NA_EDITED);
}
- break;
+ break;
case ANIMTYPE_GPLAYER:
{
- bGPDlayer *gpl= (bGPDlayer *)ale->data;
+ bGPDlayer *gpl = (bGPDlayer *)ale->data;
/* select/deselect */
if (selectmode == SELECT_INVERT) {
@@ -2284,9 +2284,9 @@ static int mouse_anim_channels (bAnimContext *ac, float UNUSED(x), int channel_i
gpl->flag |= GP_LAYER_SELECT;
}
- notifierFlags |= (ND_ANIMCHAN|NA_EDITED);
+ notifierFlags |= (ND_ANIMCHAN | NA_EDITED);
}
- break;
+ break;
default:
if (G.debug & G_DEBUG)
printf("Error: Invalid channel type in mouse_anim_channels()\n");
@@ -2318,16 +2318,16 @@ static int animchannels_mouseclick_invoke(bContext *C, wmOperator *op, wmEvent *
return OPERATOR_CANCELLED;
/* get useful pointers from animation context data */
- ar= ac.ar;
- v2d= &ar->v2d;
+ ar = ac.ar;
+ v2d = &ar->v2d;
/* select mode is either replace (deselect all, then add) or add/extend */
if (RNA_boolean_get(op->ptr, "extend"))
- selectmode= SELECT_INVERT;
+ selectmode = SELECT_INVERT;
else if (RNA_boolean_get(op->ptr, "children_only"))
- selectmode= -1; /* this is a bit of a special case for ActionGroups only... should it be removed or extended to all instead? */
+ selectmode = -1; /* this is a bit of a special case for ActionGroups only... should it be removed or extended to all instead? */
else
- selectmode= SELECT_REPLACE;
+ selectmode = SELECT_REPLACE;
/* figure out which channel user clicked in
* Note: although channels technically start at y= ACHANNEL_FIRST, we need to adjust by half a channel's height
@@ -2338,15 +2338,15 @@ static int animchannels_mouseclick_invoke(bContext *C, wmOperator *op, wmEvent *
UI_view2d_listview_view_to_cell(v2d, ACHANNEL_NAMEWIDTH, ACHANNEL_STEP, 0, (float)ACHANNEL_HEIGHT_HALF, x, y, NULL, &channel_index);
/* handle mouse-click in the relevant channel then */
- notifierFlags= mouse_anim_channels(&ac, x, channel_index, selectmode);
+ notifierFlags = mouse_anim_channels(&ac, x, channel_index, selectmode);
/* set notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|notifierFlags, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | notifierFlags, NULL);
return OPERATOR_FINISHED;
}
-static void ANIM_OT_channels_click (wmOperatorType *ot)
+static void ANIM_OT_channels_click(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Mouse Click on Channels";
@@ -2358,7 +2358,7 @@ static void ANIM_OT_channels_click (wmOperatorType *ot)
ot->poll = animedit_poll_channels_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* id-props */
RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); // SHIFTKEY
@@ -2382,7 +2382,7 @@ void ED_operatortypes_animchannels(void)
WM_operatortype_append(ANIM_OT_channels_delete);
- // XXX does this need to be a separate operator?
+ // XXX does this need to be a separate operator?
WM_operatortype_append(ANIM_OT_channels_editable_toggle);
WM_operatortype_append(ANIM_OT_channels_move);
@@ -2403,20 +2403,20 @@ void ED_keymap_animchannels(wmKeyConfig *keyconf)
wmKeyMapItem *kmi;
/* selection */
- /* click-select */
- // XXX for now, only leftmouse....
+ /* click-select */
+ // XXX for now, only leftmouse....
WM_keymap_add_item(keymap, "ANIM_OT_channels_click", LEFTMOUSE, KM_PRESS, 0, 0);
RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_click", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", TRUE);
- RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_click", LEFTMOUSE, KM_PRESS, KM_CTRL|KM_SHIFT, 0)->ptr, "children_only", TRUE);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_click", LEFTMOUSE, KM_PRESS, KM_CTRL | KM_SHIFT, 0)->ptr, "children_only", TRUE);
- /* rename */
+ /* rename */
WM_keymap_add_item(keymap, "ANIM_OT_channels_rename", LEFTMOUSE, KM_PRESS, KM_CTRL, 0);
- /* deselect all */
+ /* deselect all */
WM_keymap_add_item(keymap, "ANIM_OT_channels_select_all_toggle", AKEY, KM_PRESS, 0, 0);
RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "invert", TRUE);
- /* borderselect */
+ /* borderselect */
WM_keymap_add_item(keymap, "ANIM_OT_channels_select_border", BKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "ANIM_OT_channels_select_border", EVT_TWEAK_L, KM_ANY, 0, 0);
@@ -2426,7 +2426,7 @@ void ED_keymap_animchannels(wmKeyConfig *keyconf)
/* settings */
WM_keymap_add_item(keymap, "ANIM_OT_channels_setting_toggle", WKEY, KM_PRESS, KM_SHIFT, 0);
- WM_keymap_add_item(keymap, "ANIM_OT_channels_setting_enable", WKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "ANIM_OT_channels_setting_enable", WKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
WM_keymap_add_item(keymap, "ANIM_OT_channels_setting_disable", WKEY, KM_PRESS, KM_ALT, 0);
/* settings - specialized hotkeys */
diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c
index 3f0e1b1be14..1db4e7016eb 100644
--- a/source/blender/editors/animation/anim_deps.c
+++ b/source/blender/editors/animation/anim_deps.c
@@ -67,17 +67,17 @@ void ANIM_list_elem_update(Scene *scene, bAnimListElem *ale)
FCurve *fcu;
AnimData *adt;
- id= ale->id;
+ id = ale->id;
if (!id)
return;
/* tag AnimData for refresh so that other views will update in realtime with these changes */
- adt= BKE_animdata_from_id(id);
+ adt = BKE_animdata_from_id(id);
if (adt)
adt->recalc |= ADT_RECALC_ANIM;
/* update data */
- fcu= (ale->datatype == ALE_FCURVE)? ale->key_data: NULL;
+ fcu = (ale->datatype == ALE_FCURVE) ? ale->key_data : NULL;
if (fcu && fcu->rna_path) {
/* if we have an fcurve, call the update for the property we
@@ -94,7 +94,7 @@ void ANIM_list_elem_update(Scene *scene, bAnimListElem *ale)
else {
/* in other case we do standard depsgaph update, ideally
* we'd be calling property update functions here too ... */
- DAG_id_tag_update(id, OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME); // XXX or do we want something more restrictive?
+ DAG_id_tag_update(id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); // XXX or do we want something more restrictive?
}
}
@@ -103,14 +103,14 @@ void ANIM_list_elem_update(Scene *scene, bAnimListElem *ale)
void ANIM_id_update(Scene *UNUSED(scene), ID *id)
{
if (id) {
- AnimData *adt= BKE_animdata_from_id(id);
+ AnimData *adt = BKE_animdata_from_id(id);
/* tag AnimData for refresh so that other views will update in realtime with these changes */
if (adt)
adt->recalc |= ADT_RECALC_ANIM;
/* set recalc flags */
- DAG_id_tag_update(id, OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME); // XXX or do we want something more restrictive?
+ DAG_id_tag_update(id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); // XXX or do we want something more restrictive?
}
}
@@ -125,10 +125,10 @@ void ANIM_id_update(Scene *UNUSED(scene), ID *id)
*/
/* perform syncing updates for Action Groups */
-static void animchan_sync_group (bAnimContext *UNUSED(ac), bAnimListElem *ale)
+static void animchan_sync_group(bAnimContext *UNUSED(ac), bAnimListElem *ale)
{
- bActionGroup *agrp= (bActionGroup *)ale->data;
- ID *owner_id= ale->id;
+ bActionGroup *agrp = (bActionGroup *)ale->data;
+ ID *owner_id = ale->id;
/* major priority is selection status
* so we need both a group and an owner
@@ -138,13 +138,13 @@ static void animchan_sync_group (bAnimContext *UNUSED(ac), bAnimListElem *ale)
/* for standard Objects, check if group is the name of some bone */
if (GS(owner_id->name) == ID_OB) {
- Object *ob= (Object *)owner_id;
+ Object *ob = (Object *)owner_id;
/* check if there are bones, and whether the name matches any
* NOTE: this feature will only really work if groups by default contain the F-Curves for a single bone
*/
if (ob->pose) {
- bPoseChannel *pchan= get_pose_channel(ob->pose, agrp->name);
+ bPoseChannel *pchan = BKE_pose_channel_find_name(ob->pose, agrp->name);
/* if one matches, sync the selection status */
if (pchan) {
@@ -158,10 +158,10 @@ static void animchan_sync_group (bAnimContext *UNUSED(ac), bAnimListElem *ale)
}
/* perform syncing updates for F-Curves */
-static void animchan_sync_fcurve (bAnimContext *UNUSED(ac), bAnimListElem *ale)
+static void animchan_sync_fcurve(bAnimContext *UNUSED(ac), bAnimListElem *ale)
{
- FCurve *fcu= (FCurve *)ale->data;
- ID *owner_id= ale->id;
+ FCurve *fcu = (FCurve *)ale->data;
+ ID *owner_id = ale->id;
/* major priority is selection status, so refer to the checks done in anim_filter.c
* skip_fcurve_selected_data() for reference about what's going on here...
@@ -170,7 +170,7 @@ static void animchan_sync_fcurve (bAnimContext *UNUSED(ac), bAnimListElem *ale)
return;
if (GS(owner_id->name) == ID_OB) {
- Object *ob= (Object *)owner_id;
+ Object *ob = (Object *)owner_id;
/* only affect if F-Curve involves pose.bones */
if ((fcu->rna_path) && strstr(fcu->rna_path, "pose.bones")) {
@@ -178,8 +178,8 @@ static void animchan_sync_fcurve (bAnimContext *UNUSED(ac), bAnimListElem *ale)
char *bone_name;
/* get bone-name, and check if this bone is selected */
- bone_name= BLI_getQuotedStr(fcu->rna_path, "pose.bones[");
- pchan= get_pose_channel(ob->pose, bone_name);
+ bone_name = BLI_getQuotedStr(fcu->rna_path, "pose.bones[");
+ pchan = BKE_pose_channel_find_name(ob->pose, bone_name);
if (bone_name) MEM_freeN(bone_name);
/* F-Curve selection depends on whether the bone is selected */
@@ -196,12 +196,12 @@ static void animchan_sync_fcurve (bAnimContext *UNUSED(ac), bAnimListElem *ale)
/* only affect if F-Curve involves sequence_editor.sequences */
if ((fcu->rna_path) && strstr(fcu->rna_path, "sequences_all")) {
- Editing *ed= seq_give_editing(scene, FALSE);
+ Editing *ed = seq_give_editing(scene, FALSE);
Sequence *seq;
char *seq_name;
/* get strip name, and check if this strip is selected */
- seq_name= BLI_getQuotedStr(fcu->rna_path, "sequences_all[");
+ seq_name = BLI_getQuotedStr(fcu->rna_path, "sequences_all[");
seq = get_seq_by_name(ed->seqbasep, seq_name, FALSE);
if (seq_name) MEM_freeN(seq_name);
@@ -223,7 +223,7 @@ static void animchan_sync_fcurve (bAnimContext *UNUSED(ac), bAnimListElem *ale)
char *node_name;
/* get strip name, and check if this strip is selected */
- node_name= BLI_getQuotedStr(fcu->rna_path, "nodes[");
+ node_name = BLI_getQuotedStr(fcu->rna_path, "nodes[");
node = nodeFindNodebyName(ntree, node_name);
if (node_name) MEM_freeN(node_name);
@@ -241,7 +241,7 @@ static void animchan_sync_fcurve (bAnimContext *UNUSED(ac), bAnimListElem *ale)
/* ---------------- */
/* Main call to be exported to animation editors */
-void ANIM_sync_animchannels_to_data (const bContext *C)
+void ANIM_sync_animchannels_to_data(const bContext *C)
{
bAnimContext ac;
ListBase anim_data = {NULL, NULL};
@@ -254,12 +254,12 @@ void ANIM_sync_animchannels_to_data (const bContext *C)
return;
/* filter data */
- /* NOTE: we want all channels, since we want to be able to set selection status on some of them even when collapsed */
- filter= ANIMFILTER_DATA_VISIBLE|ANIMFILTER_LIST_CHANNELS;
+ /* NOTE: we want all channels, since we want to be able to set selection status on some of them even when collapsed */
+ filter = ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_CHANNELS;
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* flush settings as appropriate depending on the types of the channels */
- for (ale= anim_data.first; ale; ale= ale->next) {
+ for (ale = anim_data.first; ale; ale = ale->next) {
switch (ale->type) {
case ANIMTYPE_GROUP:
animchan_sync_group(&ac, ale);
diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c
index bab341ae70b..0514700e120 100644
--- a/source/blender/editors/animation/anim_draw.c
+++ b/source/blender/editors/animation/anim_draw.c
@@ -55,7 +55,7 @@
/* TIME CODE FORMATTING */
/* Generate timecode/frame number string and store in the supplied string
- * - buffer: must be at least 13 chars long
+ * - buffer: must be at least 13 chars long
* - power: special setting for View2D grid drawing,
* used to specify how detailed we need to be
* - timecodes: boolean specifying whether timecodes or
@@ -63,44 +63,44 @@
* - cfra: time in frames or seconds, consistent with the values shown by timecodes
*/
// TODO: have this in kernel instead under scene?
-void ANIM_timecode_string_from_frame (char *str, Scene *scene, int power, short timecodes, float cfra)
+void ANIM_timecode_string_from_frame(char *str, Scene *scene, int power, short timecodes, float cfra)
{
if (timecodes) {
- int hours=0, minutes=0, seconds=0, frames=0;
- float raw_seconds= cfra;
- char neg[2]= {'\0'};
+ int hours = 0, minutes = 0, seconds = 0, frames = 0;
+ float raw_seconds = cfra;
+ char neg[2] = {'\0'};
/* get cframes */
if (cfra < 0) {
/* correction for negative cfraues */
- neg[0]= '-';
+ neg[0] = '-';
cfra = -cfra;
}
if (cfra >= 3600) {
/* hours */
/* XXX should we only display a single digit for hours since clips are
- * VERY UNLIKELY to be more than 1-2 hours max? However, that would
+ * VERY UNLIKELY to be more than 1-2 hours max? However, that would
* go against conventions...
*/
- hours= (int)cfra / 3600;
- cfra= (float)fmod(cfra, 3600);
+ hours = (int)cfra / 3600;
+ cfra = (float)fmod(cfra, 3600);
}
if (cfra >= 60) {
/* minutes */
- minutes= (int)cfra / 60;
- cfra= (float)fmod(cfra, 60);
+ minutes = (int)cfra / 60;
+ cfra = (float)fmod(cfra, 60);
}
if (power <= 0) {
/* seconds + frames
* Frames are derived from 'fraction' of second. We need to perform some additional rounding
* to cope with 'half' frames, etc., which should be fine in most cases
*/
- seconds= (int)cfra;
- frames= (int)floor( (((double)cfra - (double)seconds) * FPS) + 0.5 );
+ seconds = (int)cfra;
+ frames = (int)floor( (((double)cfra - (double)seconds) * FPS) + 0.5);
}
else {
/* seconds (with pixel offset rounding) */
- seconds= (int)floor(cfra + 0.375f);
+ seconds = (int)floor(cfra + 0.375f);
}
switch (U.timecode_style) {
@@ -124,7 +124,7 @@ void ANIM_timecode_string_from_frame (char *str, Scene *scene, int power, short
else sprintf(str, "%s%02d:%02d", neg, minutes, seconds);
}
}
- break;
+ break;
case USER_TIMECODE_SMPTE_MSF:
{
@@ -132,27 +132,27 @@ void ANIM_timecode_string_from_frame (char *str, Scene *scene, int power, short
if (hours) sprintf(str, "%s%02d:%02d:%02d:%02d", neg, hours, minutes, seconds, frames);
else sprintf(str, "%s%02d:%02d:%02d", neg, minutes, seconds, frames);
}
- break;
+ break;
case USER_TIMECODE_MILLISECONDS:
{
/* reduced SMPTE. Instead of frames, milliseconds are shown */
- int ms_dp= (power <= 0) ? (1 - power) : 1; /* precision of decimal part */
- int s_pad= ms_dp+3; /* to get 2 digit whole-number part for seconds display (i.e. 3 is for 2 digits + radix, on top of full length) */
+ int ms_dp = (power <= 0) ? (1 - power) : 1; /* precision of decimal part */
+ int s_pad = ms_dp + 3; /* to get 2 digit whole-number part for seconds display (i.e. 3 is for 2 digits + radix, on top of full length) */
if (hours) sprintf(str, "%s%02d:%02d:%0*.*f", neg, hours, minutes, s_pad, ms_dp, cfra);
else sprintf(str, "%s%02d:%0*.*f", neg, minutes, s_pad, ms_dp, cfra);
}
- break;
+ break;
case USER_TIMECODE_SECONDS_ONLY:
{
/* only show the original seconds display */
/* round to whole numbers if power is >= 1 (i.e. scale is coarse) */
- if (power <= 0) sprintf(str, "%.*f", 1-power, raw_seconds);
+ if (power <= 0) sprintf(str, "%.*f", 1 - power, raw_seconds);
else sprintf(str, "%d", (int)floor(raw_seconds + 0.375f));
}
- break;
+ break;
case USER_TIMECODE_SMPTE_FULL:
default:
@@ -160,12 +160,12 @@ void ANIM_timecode_string_from_frame (char *str, Scene *scene, int power, short
/* full SMPTE format */
sprintf(str, "%s%02d:%02d:%02d:%02d", neg, hours, minutes, seconds, frames);
}
- break;
+ break;
}
}
else {
/* round to whole numbers if power is >= 1 (i.e. scale is coarse) */
- if (power <= 0) sprintf(str, "%.*f", 1-power, cfra);
+ if (power <= 0) sprintf(str, "%.*f", 1 - power, cfra);
else sprintf(str, "%d", (int)floor(cfra + 0.375f));
}
}
@@ -174,15 +174,15 @@ void ANIM_timecode_string_from_frame (char *str, Scene *scene, int power, short
/* CURRENT FRAME DRAWING */
/* Draw current frame number in a little green box beside the current frame indicator */
-static void draw_cfra_number (Scene *scene, View2D *v2d, float cfra, short time)
+static void draw_cfra_number(Scene *scene, View2D *v2d, float cfra, short time)
{
float xscale, yscale, x, y;
- char numstr[32] = " t"; /* t is the character to start replacing from */
+ char numstr[32] = " t"; /* t is the character to start replacing from */
short slen;
/* because the frame number text is subject to the same scaling as the contents of the view */
UI_view2d_getscale(v2d, &xscale, &yscale);
- glScalef(1.0f/xscale, 1.0f, 1.0f);
+ glScalef(1.0f / xscale, 1.0f, 1.0f);
/* get timecode string
* - padding on str-buf passed so that it doesn't sit on the frame indicator
@@ -193,32 +193,32 @@ static void draw_cfra_number (Scene *scene, View2D *v2d, float cfra, short time)
ANIM_timecode_string_from_frame(&numstr[4], scene, 0, time, FRA2TIME(cfra));
else
ANIM_timecode_string_from_frame(&numstr[4], scene, 1, time, cfra);
- slen= (short)UI_GetStringWidth(numstr) - 1;
+ slen = (short)UI_GetStringWidth(numstr) - 1;
/* get starting coordinates for drawing */
- x= cfra * xscale;
- y= 18;
+ x = cfra * xscale;
+ y = 18;
/* draw green box around/behind text */
UI_ThemeColorShade(TH_CFRAME, 0);
- glRectf(x, y, x+slen, y+15);
+ glRectf(x, y, x + slen, y + 15);
/* draw current frame number - black text */
UI_ThemeColor(TH_TEXT);
- UI_DrawString(x-5, y+3, numstr);
+ UI_DrawString(x - 5, y + 3, numstr);
/* restore view transform */
glScalef(xscale, 1.0, 1.0);
}
/* General call for drawing current frame indicator in animation editor */
-void ANIM_draw_cfra (const bContext *C, View2D *v2d, short flag)
+void ANIM_draw_cfra(const bContext *C, View2D *v2d, short flag)
{
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
float vec[2];
/* Draw a light green line to indicate current frame */
- vec[0]= (float)(scene->r.cfra * scene->r.framelen);
+ vec[0] = (float)(scene->r.cfra * scene->r.framelen);
UI_ThemeColor(TH_CFRAME);
if (flag & DRAWCFRA_WIDE)
@@ -227,11 +227,11 @@ void ANIM_draw_cfra (const bContext *C, View2D *v2d, short flag)
glLineWidth(2.0);
glBegin(GL_LINE_STRIP);
- vec[1]= v2d->cur.ymin-500.0f; /* XXX arbitrary... want it go to bottom */
- glVertex2fv(vec);
+ vec[1] = v2d->cur.ymin - 500.0f; /* XXX arbitrary... want it go to bottom */
+ glVertex2fv(vec);
- vec[1]= v2d->cur.ymax;
- glVertex2fv(vec);
+ vec[1] = v2d->cur.ymax;
+ glVertex2fv(vec);
glEnd();
glLineWidth(1.0);
@@ -248,9 +248,9 @@ void ANIM_draw_cfra (const bContext *C, View2D *v2d, short flag)
/* Note: 'Preview Range' tools are defined in anim_ops.c */
/* Draw preview range 'curtains' for highlighting where the animation data is */
-void ANIM_draw_previewrange (const bContext *C, View2D *v2d)
+void ANIM_draw_previewrange(const bContext *C, View2D *v2d)
{
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
/* only draw this if preview range is set */
if (PRVRANGEON) {
@@ -298,16 +298,16 @@ AnimData *ANIM_nla_mapping_get(bAnimContext *ac, bAnimListElem *ale)
static short bezt_nlamapping_restore(KeyframeEditData *ked, BezTriple *bezt)
{
/* AnimData block providing scaling is stored in 'data', only_keys option is stored in i1 */
- AnimData *adt= (AnimData *)ked->data;
- short only_keys= (short)ked->i1;
+ AnimData *adt = (AnimData *)ked->data;
+ short only_keys = (short)ked->i1;
/* adjust BezTriple handles only if allowed to */
if (only_keys == 0) {
- bezt->vec[0][0]= BKE_nla_tweakedit_remap(adt, bezt->vec[0][0], NLATIME_CONVERT_UNMAP);
- bezt->vec[2][0]= BKE_nla_tweakedit_remap(adt, bezt->vec[2][0], NLATIME_CONVERT_UNMAP);
+ bezt->vec[0][0] = BKE_nla_tweakedit_remap(adt, bezt->vec[0][0], NLATIME_CONVERT_UNMAP);
+ bezt->vec[2][0] = BKE_nla_tweakedit_remap(adt, bezt->vec[2][0], NLATIME_CONVERT_UNMAP);
}
- bezt->vec[1][0]= BKE_nla_tweakedit_remap(adt, bezt->vec[1][0], NLATIME_CONVERT_UNMAP);
+ bezt->vec[1][0] = BKE_nla_tweakedit_remap(adt, bezt->vec[1][0], NLATIME_CONVERT_UNMAP);
return 0;
}
@@ -316,16 +316,16 @@ static short bezt_nlamapping_restore(KeyframeEditData *ked, BezTriple *bezt)
static short bezt_nlamapping_apply(KeyframeEditData *ked, BezTriple *bezt)
{
/* AnimData block providing scaling is stored in 'data', only_keys option is stored in i1 */
- AnimData *adt= (AnimData*)ked->data;
- short only_keys= (short)ked->i1;
+ AnimData *adt = (AnimData *)ked->data;
+ short only_keys = (short)ked->i1;
/* adjust BezTriple handles only if allowed to */
if (only_keys == 0) {
- bezt->vec[0][0]= BKE_nla_tweakedit_remap(adt, bezt->vec[0][0], NLATIME_CONVERT_MAP);
- bezt->vec[2][0]= BKE_nla_tweakedit_remap(adt, bezt->vec[2][0], NLATIME_CONVERT_MAP);
+ bezt->vec[0][0] = BKE_nla_tweakedit_remap(adt, bezt->vec[0][0], NLATIME_CONVERT_MAP);
+ bezt->vec[2][0] = BKE_nla_tweakedit_remap(adt, bezt->vec[2][0], NLATIME_CONVERT_MAP);
}
- bezt->vec[1][0]= BKE_nla_tweakedit_remap(adt, bezt->vec[1][0], NLATIME_CONVERT_MAP);
+ bezt->vec[1][0] = BKE_nla_tweakedit_remap(adt, bezt->vec[1][0], NLATIME_CONVERT_MAP);
return 0;
}
@@ -333,25 +333,25 @@ static short bezt_nlamapping_apply(KeyframeEditData *ked, BezTriple *bezt)
/* Apply/Unapply NLA mapping to all keyframes in the nominated F-Curve
* - restore = whether to map points back to non-mapped time
- * - only_keys = whether to only adjust the location of the center point of beztriples
+ * - only_keys = whether to only adjust the location of the center point of beztriples
*/
-void ANIM_nla_mapping_apply_fcurve (AnimData *adt, FCurve *fcu, short restore, short only_keys)
+void ANIM_nla_mapping_apply_fcurve(AnimData *adt, FCurve *fcu, short restore, short only_keys)
{
- KeyframeEditData ked= {{NULL}};
+ KeyframeEditData ked = {{NULL}};
KeyframeEditFunc map_cb;
/* init edit data
* - AnimData is stored in 'data'
* - only_keys is stored in 'i1'
*/
- ked.data= (void *)adt;
- ked.i1= (int)only_keys;
+ ked.data = (void *)adt;
+ ked.i1 = (int)only_keys;
/* get editing callback */
if (restore)
- map_cb= bezt_nlamapping_restore;
+ map_cb = bezt_nlamapping_restore;
else
- map_cb= bezt_nlamapping_apply;
+ map_cb = bezt_nlamapping_apply;
/* apply to F-Curve */
ANIM_fcurve_keyframes_loop(&ked, fcu, NULL, map_cb, NULL);
@@ -361,7 +361,7 @@ void ANIM_nla_mapping_apply_fcurve (AnimData *adt, FCurve *fcu, short restore, s
/* UNITS CONVERSION MAPPING (required for drawing and editing keyframes) */
/* Get unit conversion factor for given ID + F-Curve */
-float ANIM_unit_mapping_get_factor (Scene *scene, ID *id, FCurve *fcu, short restore)
+float ANIM_unit_mapping_get_factor(Scene *scene, ID *id, FCurve *fcu, short restore)
{
/* sanity checks */
if (id && fcu && fcu->rna_path) {
@@ -376,9 +376,9 @@ float ANIM_unit_mapping_get_factor (Scene *scene, ID *id, FCurve *fcu, short res
/* if the radians flag is not set, default to using degrees which need conversions */
if ((scene) && (scene->unit.system_rotation == USER_UNIT_ROT_RADIANS) == 0) {
if (restore)
- return DEG2RADF(1.0f); /* degrees to radians */
+ return DEG2RADF(1.0f); /* degrees to radians */
else
- return RAD2DEGF(1.0f); /* radians to degrees */
+ return RAD2DEGF(1.0f); /* radians to degrees */
}
}
@@ -393,18 +393,18 @@ float ANIM_unit_mapping_get_factor (Scene *scene, ID *id, FCurve *fcu, short res
/* ----------------------- */
/* helper function for ANIM_unit_mapping_apply_fcurve -> mapping callback for unit mapping */
-static short bezt_unit_mapping_apply (KeyframeEditData *ked, BezTriple *bezt)
+static short bezt_unit_mapping_apply(KeyframeEditData *ked, BezTriple *bezt)
{
/* mapping factor is stored in f1, flags are stored in i1 */
- short only_keys= (ked->i1 & ANIM_UNITCONV_ONLYKEYS);
- short sel_vs= (ked->i1 & ANIM_UNITCONV_SELVERTS);
- float fac= ked->f1;
+ short only_keys = (ked->i1 & ANIM_UNITCONV_ONLYKEYS);
+ short sel_vs = (ked->i1 & ANIM_UNITCONV_SELVERTS);
+ float fac = ked->f1;
/* adjust BezTriple handles only if allowed to */
if (only_keys == 0) {
- if ((sel_vs==0) || (bezt->f1 & SELECT))
+ if ((sel_vs == 0) || (bezt->f1 & SELECT))
bezt->vec[0][1] *= fac;
- if ((sel_vs==0) || (bezt->f3 & SELECT))
+ if ((sel_vs == 0) || (bezt->f3 & SELECT))
bezt->vec[2][1] *= fac;
}
@@ -415,7 +415,7 @@ static short bezt_unit_mapping_apply (KeyframeEditData *ked, BezTriple *bezt)
}
/* Apply/Unapply units conversions to keyframes */
-void ANIM_unit_mapping_apply_fcurve (Scene *scene, ID *id, FCurve *fcu, short flag)
+void ANIM_unit_mapping_apply_fcurve(Scene *scene, ID *id, FCurve *fcu, short flag)
{
KeyframeEditData ked;
KeyframeEditFunc sel_cb;
@@ -425,7 +425,7 @@ void ANIM_unit_mapping_apply_fcurve (Scene *scene, ID *id, FCurve *fcu, short fl
if (G.rendering) return;
/* calculate mapping factor, and abort if nothing to change */
- fac= ANIM_unit_mapping_get_factor(scene, id, fcu, (flag & ANIM_UNITCONV_RESTORE));
+ fac = ANIM_unit_mapping_get_factor(scene, id, fcu, (flag & ANIM_UNITCONV_RESTORE));
if (fac == 1.0f)
return;
@@ -434,14 +434,14 @@ void ANIM_unit_mapping_apply_fcurve (Scene *scene, ID *id, FCurve *fcu, short fl
* - flags are stored in 'i1'
*/
memset(&ked, 0, sizeof(KeyframeEditData));
- ked.f1= (float)fac;
- ked.i1= (int)flag;
+ ked.f1 = (float)fac;
+ ked.i1 = (int)flag;
/* only selected? */
if (flag & ANIM_UNITCONV_ONLYSEL)
- sel_cb= ANIM_editkeyframes_ok(BEZT_OK_SELECTED);
+ sel_cb = ANIM_editkeyframes_ok(BEZT_OK_SELECTED);
else
- sel_cb= NULL;
+ sel_cb = NULL;
/* apply to F-Curve */
ANIM_fcurve_keyframes_loop(&ked, fcu, sel_cb, bezt_unit_mapping_apply, NULL);
@@ -452,7 +452,7 @@ void ANIM_unit_mapping_apply_fcurve (Scene *scene, ID *id, FCurve *fcu, short fl
FPoint *fpt;
unsigned int i;
- for (i=0, fpt=fcu->fpt; i < fcu->totvert; i++, fpt++) {
+ for (i = 0, fpt = fcu->fpt; i < fcu->totvert; i++, fpt++) {
/* apply unit mapping */
fpt->vec[1] *= fac;
}
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index e5822c76fa1..2392b872031 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -99,9 +99,9 @@
/* Get shapekey data being edited (for Action Editor -> ShapeKey mode) */
/* Note: there's a similar function in key.c (ob_get_key) */
-static Key *actedit_get_shapekeys (bAnimContext *ac)
+static Key *actedit_get_shapekeys(bAnimContext *ac)
{
- Scene *scene= ac->scene;
+ Scene *scene = ac->scene;
Object *ob;
Key *key;
@@ -113,7 +113,7 @@ static Key *actedit_get_shapekeys (bAnimContext *ac)
//if (saction->pin) return NULL;
/* shapekey data is stored with geometry data */
- key= ob_get_key(ob);
+ key = ob_get_key(ob);
if (key) {
if (key->type == KEY_RELATIVE)
@@ -124,7 +124,7 @@ static Key *actedit_get_shapekeys (bAnimContext *ac)
}
/* Get data being edited in Action Editor (depending on current 'mode') */
-static short actedit_get_context (bAnimContext *ac, SpaceAction *saction)
+static short actedit_get_context(bAnimContext *ac, SpaceAction *saction)
{
/* get dopesheet */
ac->ads = &saction->ads;
@@ -133,51 +133,61 @@ static short actedit_get_context (bAnimContext *ac, SpaceAction *saction)
switch (saction->mode) {
case SACTCONT_ACTION: /* 'Action Editor' */
/* if not pinned, sync with active object */
- if (/*saction->pin == 0*/1) {
+ if (/*saction->pin == 0*/ 1) {
if (ac->obact && ac->obact->adt)
saction->action = ac->obact->adt->action;
else
- saction->action= NULL;
+ saction->action = NULL;
}
- ac->datatype= ANIMCONT_ACTION;
- ac->data= saction->action;
+ ac->datatype = ANIMCONT_ACTION;
+ ac->data = saction->action;
- ac->mode= saction->mode;
+ ac->mode = saction->mode;
return 1;
case SACTCONT_SHAPEKEY: /* 'ShapeKey Editor' */
- ac->datatype= ANIMCONT_SHAPEKEY;
- ac->data= actedit_get_shapekeys(ac);
+ ac->datatype = ANIMCONT_SHAPEKEY;
+ ac->data = actedit_get_shapekeys(ac);
- ac->mode= saction->mode;
+ /* if not pinned, sync with active object */
+ if (/*saction->pin == 0*/ 1) {
+ Key *key = (Key *)ac->data;
+
+ if (key && key->adt)
+ saction->action = key->adt->action;
+ else
+ saction->action = NULL;
+ }
+
+ ac->mode = saction->mode;
return 1;
case SACTCONT_GPENCIL: /* Grease Pencil */ // XXX review how this mode is handled...
/* update scene-pointer (no need to check for pinning yet, as not implemented) */
- saction->ads.source= (ID *)ac->scene;
+ saction->ads.source = (ID *)ac->scene;
- ac->datatype= ANIMCONT_GPENCIL;
- ac->data= &saction->ads;
+ ac->datatype = ANIMCONT_GPENCIL;
+ ac->data = &saction->ads;
- ac->mode= saction->mode;
+ ac->mode = saction->mode;
return 1;
case SACTCONT_DOPESHEET: /* DopeSheet */
/* update scene-pointer (no need to check for pinning yet, as not implemented) */
- saction->ads.source= (ID *)ac->scene;
+ saction->ads.source = (ID *)ac->scene;
- ac->datatype= ANIMCONT_DOPESHEET;
- ac->data= &saction->ads;
+ ac->datatype = ANIMCONT_DOPESHEET;
+ ac->data = &saction->ads;
- ac->mode= saction->mode;
+ ac->mode = saction->mode;
return 1;
default: /* unhandled yet */
- ac->datatype= ANIMCONT_NONE;
- ac->data= NULL;
+ ac->datatype = ANIMCONT_NONE;
+ ac->data = NULL;
- ac->mode= -1;
+ ac->mode = -1;
return 0;
}
}
@@ -185,12 +195,12 @@ static short actedit_get_context (bAnimContext *ac, SpaceAction *saction)
/* ----------- Private Stuff - Graph Editor ------------- */
/* Get data being edited in Graph Editor (depending on current 'mode') */
-static short graphedit_get_context (bAnimContext *ac, SpaceIpo *sipo)
+static short graphedit_get_context(bAnimContext *ac, SpaceIpo *sipo)
{
/* init dopesheet data if non-existant (i.e. for old files) */
if (sipo->ads == NULL) {
- sipo->ads= MEM_callocN(sizeof(bDopeSheet), "GraphEdit DopeSheet");
- sipo->ads->source= (ID *)ac->scene;
+ sipo->ads = MEM_callocN(sizeof(bDopeSheet), "GraphEdit DopeSheet");
+ sipo->ads->source = (ID *)ac->scene;
}
ac->ads = sipo->ads;
@@ -202,33 +212,33 @@ static short graphedit_get_context (bAnimContext *ac, SpaceIpo *sipo)
/* sync settings with current view status, then return appropriate data */
switch (sipo->mode) {
- case SIPO_MODE_ANIMATION: /* Animation F-Curve Editor */
+ case SIPO_MODE_ANIMATION: /* Animation F-Curve Editor */
/* update scene-pointer (no need to check for pinning yet, as not implemented) */
- sipo->ads->source= (ID *)ac->scene;
+ sipo->ads->source = (ID *)ac->scene;
sipo->ads->filterflag &= ~ADS_FILTER_ONLYDRIVERS;
- ac->datatype= ANIMCONT_FCURVES;
- ac->data= sipo->ads;
+ ac->datatype = ANIMCONT_FCURVES;
+ ac->data = sipo->ads;
- ac->mode= sipo->mode;
+ ac->mode = sipo->mode;
return 1;
- case SIPO_MODE_DRIVERS: /* Driver F-Curve Editor */
+ case SIPO_MODE_DRIVERS: /* Driver F-Curve Editor */
/* update scene-pointer (no need to check for pinning yet, as not implemented) */
- sipo->ads->source= (ID *)ac->scene;
+ sipo->ads->source = (ID *)ac->scene;
sipo->ads->filterflag |= ADS_FILTER_ONLYDRIVERS;
- ac->datatype= ANIMCONT_DRIVERS;
- ac->data= sipo->ads;
+ ac->datatype = ANIMCONT_DRIVERS;
+ ac->data = sipo->ads;
- ac->mode= sipo->mode;
+ ac->mode = sipo->mode;
return 1;
default: /* unhandled yet */
- ac->datatype= ANIMCONT_NONE;
- ac->data= NULL;
+ ac->datatype = ANIMCONT_NONE;
+ ac->data = NULL;
- ac->mode= -1;
+ ac->mode = -1;
return 0;
}
}
@@ -236,20 +246,20 @@ static short graphedit_get_context (bAnimContext *ac, SpaceIpo *sipo)
/* ----------- Private Stuff - NLA Editor ------------- */
/* Get data being edited in Graph Editor (depending on current 'mode') */
-static short nlaedit_get_context (bAnimContext *ac, SpaceNla *snla)
+static short nlaedit_get_context(bAnimContext *ac, SpaceNla *snla)
{
/* init dopesheet data if non-existant (i.e. for old files) */
if (snla->ads == NULL)
- snla->ads= MEM_callocN(sizeof(bDopeSheet), "NlaEdit DopeSheet");
+ snla->ads = MEM_callocN(sizeof(bDopeSheet), "NlaEdit DopeSheet");
ac->ads = snla->ads;
/* sync settings with current view status, then return appropriate data */
/* update scene-pointer (no need to check for pinning yet, as not implemented) */
- snla->ads->source= (ID *)ac->scene;
+ snla->ads->source = (ID *)ac->scene;
snla->ads->filterflag |= ADS_FILTER_ONLYNLA;
- ac->datatype= ANIMCONT_NLA;
- ac->data= snla->ads;
+ ac->datatype = ANIMCONT_NLA;
+ ac->data = snla->ads;
return 1;
}
@@ -260,34 +270,34 @@ static short nlaedit_get_context (bAnimContext *ac, SpaceNla *snla)
* - AnimContext to write to is provided as pointer to var on stack so that we don't have
* allocation/freeing costs (which are not that avoidable with channels).
*/
-short ANIM_animdata_context_getdata (bAnimContext *ac)
+short ANIM_animdata_context_getdata(bAnimContext *ac)
{
SpaceLink *sl = ac->sl;
- short ok= 0;
+ short ok = 0;
/* context depends on editor we are currently in */
if (sl) {
switch (ac->spacetype) {
case SPACE_ACTION:
{
- SpaceAction *saction= (SpaceAction *)sl;
- ok= actedit_get_context(ac, saction);
+ SpaceAction *saction = (SpaceAction *)sl;
+ ok = actedit_get_context(ac, saction);
}
- break;
+ break;
case SPACE_IPO:
{
- SpaceIpo *sipo= (SpaceIpo *)sl;
- ok= graphedit_get_context(ac, sipo);
+ SpaceIpo *sipo = (SpaceIpo *)sl;
+ ok = graphedit_get_context(ac, sipo);
}
- break;
+ break;
case SPACE_NLA:
{
- SpaceNla *snla= (SpaceNla *)sl;
- ok= nlaedit_get_context(ac, snla);
+ SpaceNla *snla = (SpaceNla *)sl;
+ ok = nlaedit_get_context(ac, snla);
}
- break;
+ break;
}
}
@@ -303,28 +313,28 @@ short ANIM_animdata_context_getdata (bAnimContext *ac)
* allocation/freeing costs (which are not that avoidable with channels).
* - Clears data and sets the information from Blender Context which is useful
*/
-short ANIM_animdata_get_context (const bContext *C, bAnimContext *ac)
+short ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
{
- ScrArea *sa= CTX_wm_area(C);
- ARegion *ar= CTX_wm_region(C);
- SpaceLink *sl= CTX_wm_space_data(C);
- Scene *scene= CTX_data_scene(C);
+ ScrArea *sa = CTX_wm_area(C);
+ ARegion *ar = CTX_wm_region(C);
+ SpaceLink *sl = CTX_wm_space_data(C);
+ Scene *scene = CTX_data_scene(C);
/* clear old context info */
if (ac == NULL) return 0;
memset(ac, 0, sizeof(bAnimContext));
/* get useful default context settings from context */
- ac->scene= scene;
+ ac->scene = scene;
if (scene) {
- ac->markers= ED_context_get_markers(C);
- ac->obact= (scene->basact)? scene->basact->object : NULL;
+ ac->markers = ED_context_get_markers(C);
+ ac->obact = (scene->basact) ? scene->basact->object : NULL;
}
- ac->sa= sa;
- ac->ar= ar;
- ac->sl= sl;
- ac->spacetype= (sa) ? sa->spacetype : 0;
- ac->regiontype= (ar) ? ar->regiontype : 0;
+ ac->sa = sa;
+ ac->ar = ar;
+ ac->sl = sl;
+ ac->spacetype = (sa) ? sa->spacetype : 0;
+ ac->regiontype = (ar) ? ar->regiontype : 0;
/* get data context info */
return ANIM_animdata_context_getdata(ac);
@@ -345,28 +355,28 @@ short ANIM_animdata_get_context (const bContext *C, bAnimContext *ac)
* dealt with by the recursive detection idiom in place.
*
* Implementation Note:
- * YES the _doSubChannels variable is NOT read anywhere. BUT, this is NOT an excuse
- * to go steamrolling the logic into a single-line expression as from experience,
- * those are notoriously difficult to read + debug when extending later on. The code
- * below is purposefully laid out so that each case noted above corresponds clearly to
- * one case below.
+ * YES the _doSubChannels variable is NOT read anywhere. BUT, this is NOT an excuse
+ * to go steamrolling the logic into a single-line expression as from experience,
+ * those are notoriously difficult to read + debug when extending later on. The code
+ * below is purposefully laid out so that each case noted above corresponds clearly to
+ * one case below.
*/
#define BEGIN_ANIMFILTER_SUBCHANNELS(expanded_check) \
{ \
int _filter = filter_mode; \
short _doSubChannels = 0; \
if (!(filter_mode & ANIMFILTER_LIST_VISIBLE) || (expanded_check)) \
- _doSubChannels=1; \
+ _doSubChannels = 1; \
else if (!(filter_mode & ANIMFILTER_LIST_CHANNELS)) \
- _doSubChannels=2; \
- else {\
+ _doSubChannels = 2; \
+ else { \
filter_mode |= ANIMFILTER_TMP_PEEK; \
} \
- \
+ \
{ \
(void) _doSubChannels; \
}
- /* ... standard sub-channel filtering can go on here now ... */
+/* ... standard sub-channel filtering can go on here now ... */
#define END_ANIMFILTER_SUBCHANNELS \
filter_mode = _filter; \
}
@@ -392,9 +402,9 @@ short ANIM_animdata_get_context (const bContext *C, bAnimContext *ac)
* - ListBase anim_data;
* - bDopeSheet *ads;
* - bAnimListElem *ale;
- * - size_t items;
+ * - size_t items;
*
- * - id: ID block which should have an AnimData pointer following it immediately, to use
+ * - id: ID block which should have an AnimData pointer following it immediately, to use
* - adtOk: line or block of code to execute for AnimData-blocks case (usually ANIMDATA_ADD_ANIMDATA)
* - nlaOk: line or block of code to execute for NLA tracks+strips case
* - driversOk: line or block of code to execute for Drivers case
@@ -411,32 +421,32 @@ short ANIM_animdata_get_context (const bContext *C, bAnimContext *ac)
* 4) normal keyframes: only when there is an active action
*/
#define ANIMDATA_FILTER_CASES(id, adtOk, nlaOk, driversOk, keysOk) \
- {\
- if ((id)->adt) {\
- if (!(filter_mode & ANIMFILTER_CURVE_VISIBLE) || !((id)->adt->flag & ADT_CURVES_NOT_VISIBLE)) {\
- if (filter_mode & ANIMFILTER_ANIMDATA) {\
- adtOk\
- }\
- else if (ads->filterflag & ADS_FILTER_ONLYNLA) {\
- if (ANIMDATA_HAS_NLA(id)) {\
- nlaOk\
- }\
- else if (!(ads->filterflag & ADS_FILTER_NLA_NOACT) && ANIMDATA_HAS_KEYS(id)) {\
- nlaOk\
- }\
- }\
- else if (ads->filterflag & ADS_FILTER_ONLYDRIVERS) {\
- if (ANIMDATA_HAS_DRIVERS(id)) {\
- driversOk\
- }\
- }\
- else {\
- if (ANIMDATA_HAS_KEYS(id)) {\
- keysOk\
- }\
- }\
- }\
- }\
+ { \
+ if ((id)->adt) { \
+ if (!(filter_mode & ANIMFILTER_CURVE_VISIBLE) || !((id)->adt->flag & ADT_CURVES_NOT_VISIBLE)) { \
+ if (filter_mode & ANIMFILTER_ANIMDATA) { \
+ adtOk \
+ } \
+ else if (ads->filterflag & ADS_FILTER_ONLYNLA) { \
+ if (ANIMDATA_HAS_NLA(id)) { \
+ nlaOk \
+ } \
+ else if (!(ads->filterflag & ADS_FILTER_NLA_NOACT) && ANIMDATA_HAS_KEYS(id)) { \
+ nlaOk \
+ } \
+ } \
+ else if (ads->filterflag & ADS_FILTER_ONLYDRIVERS) { \
+ if (ANIMDATA_HAS_DRIVERS(id)) { \
+ driversOk \
+ } \
+ } \
+ else { \
+ if (ANIMDATA_HAS_KEYS(id)) { \
+ keysOk \
+ } \
+ } \
+ } \
+ } \
}
/* ............................... */
@@ -451,10 +461,10 @@ short ANIM_animdata_get_context (const bContext *C, bAnimContext *ac)
if (filter_mode & ANIMFILTER_TMP_PEEK) \
return 1; \
else { \
- bAnimListElem *ale= make_new_animlistelem(channel_data, channel_type, (ID *)owner_id); \
- if (ale) {\
+ bAnimListElem *ale = make_new_animlistelem(channel_data, channel_type, (ID *)owner_id); \
+ if (ale) { \
BLI_addtail(anim_data, ale); \
- items++; \
+ items ++; \
ale_statement \
} \
}
@@ -466,13 +476,13 @@ short ANIM_animdata_get_context (const bContext *C, bAnimContext *ac)
/* quick macro to test if an anim-channel representing an AnimData block is suitably active */
#define ANIMCHANNEL_ACTIVEOK(ale) \
- ( !(filter_mode & ANIMFILTER_ACTIVE) || !(ale->adt) || (ale->adt->flag & ADT_UI_ACTIVE) )
+ (!(filter_mode & ANIMFILTER_ACTIVE) || !(ale->adt) || (ale->adt->flag & ADT_UI_ACTIVE) )
/* quick macro to test if an anim-channel (F-Curve, Group, etc.) is selected in an acceptable way */
#define ANIMCHANNEL_SELOK(test_func) \
- ( !(filter_mode & (ANIMFILTER_SEL|ANIMFILTER_UNSEL)) || \
- ((filter_mode & ANIMFILTER_SEL) && test_func) || \
- ((filter_mode & ANIMFILTER_UNSEL) && test_func==0) )
+ (!(filter_mode & (ANIMFILTER_SEL | ANIMFILTER_UNSEL)) || \
+ ((filter_mode & ANIMFILTER_SEL) && test_func) || \
+ ((filter_mode & ANIMFILTER_UNSEL) && test_func == 0) )
/* quick macro to test if an anim-channel (F-Curve) is selected ok for editing purposes
* - _SELEDIT means that only selected curves will have visible+editable keyframes
@@ -483,29 +493,29 @@ short ANIM_animdata_get_context (const bContext *C, bAnimContext *ac)
* 3) test_func (i.e. selection test) - only if selected, this test will pass
*/
#define ANIMCHANNEL_SELEDITOK(test_func) \
- ( !(filter_mode & ANIMFILTER_SELEDIT) || \
- !(filter_mode & ANIMFILTER_FOREDIT) || \
- (test_func) )
+ (!(filter_mode & ANIMFILTER_SELEDIT) || \
+ !(filter_mode & ANIMFILTER_FOREDIT) || \
+ (test_func) )
/* ----------- 'Private' Stuff --------------- */
/* this function allocates memory for a new bAnimListElem struct for the
* provided animation channel-data.
*/
-static bAnimListElem *make_new_animlistelem (void *data, short datatype, ID *owner_id)
+static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owner_id)
{
- bAnimListElem *ale= NULL;
+ bAnimListElem *ale = NULL;
/* only allocate memory if there is data to convert */
if (data) {
/* allocate and set generic data */
- ale= MEM_callocN(sizeof(bAnimListElem), "bAnimListElem");
+ ale = MEM_callocN(sizeof(bAnimListElem), "bAnimListElem");
- ale->data= data;
- ale->type= datatype;
+ ale->data = data;
+ ale->type = datatype;
- ale->id= owner_id;
- ale->adt= BKE_animdata_from_id(owner_id);
+ ale->id = owner_id;
+ ale->adt = BKE_animdata_from_id(owner_id);
/* do specifics */
switch (datatype) {
@@ -514,307 +524,307 @@ static bAnimListElem *make_new_animlistelem (void *data, short datatype, ID *own
/* nothing to include for now... this is just a dummy wrappy around all the other channels
* in the DopeSheet, and gets included at the start of the list
*/
- ale->key_data= NULL;
- ale->datatype= ALE_ALL;
+ ale->key_data = NULL;
+ ale->datatype = ALE_ALL;
}
- break;
+ break;
case ANIMTYPE_SCENE:
{
- Scene *sce= (Scene *)data;
+ Scene *sce = (Scene *)data;
- ale->flag= sce->flag;
+ ale->flag = sce->flag;
- ale->key_data= sce;
- ale->datatype= ALE_SCE;
+ ale->key_data = sce;
+ ale->datatype = ALE_SCE;
- ale->adt= BKE_animdata_from_id(data);
+ ale->adt = BKE_animdata_from_id(data);
}
- break;
+ break;
case ANIMTYPE_OBJECT:
{
- Base *base= (Base *)data;
- Object *ob= base->object;
+ Base *base = (Base *)data;
+ Object *ob = base->object;
- ale->flag= ob->flag;
+ ale->flag = ob->flag;
- ale->key_data= ob;
- ale->datatype= ALE_OB;
+ ale->key_data = ob;
+ ale->datatype = ALE_OB;
- ale->adt= BKE_animdata_from_id(&ob->id);
+ ale->adt = BKE_animdata_from_id(&ob->id);
}
- break;
+ break;
case ANIMTYPE_FILLACTD:
{
- bAction *act= (bAction *)data;
+ bAction *act = (bAction *)data;
- ale->flag= act->flag;
+ ale->flag = act->flag;
- ale->key_data= act;
- ale->datatype= ALE_ACT;
+ ale->key_data = act;
+ ale->datatype = ALE_ACT;
}
- break;
+ break;
case ANIMTYPE_FILLDRIVERS:
{
- AnimData *adt= (AnimData *)data;
+ AnimData *adt = (AnimData *)data;
- ale->flag= adt->flag;
+ ale->flag = adt->flag;
- // XXX... drivers don't show summary for now
- ale->key_data= NULL;
- ale->datatype= ALE_NONE;
+ // XXX... drivers don't show summary for now
+ ale->key_data = NULL;
+ ale->datatype = ALE_NONE;
}
- break;
+ break;
case ANIMTYPE_DSMAT:
{
- Material *ma= (Material *)data;
- AnimData *adt= ma->adt;
+ Material *ma = (Material *)data;
+ AnimData *adt = ma->adt;
- ale->flag= FILTER_MAT_OBJD(ma);
+ ale->flag = FILTER_MAT_OBJD(ma);
- ale->key_data= (adt) ? adt->action : NULL;
- ale->datatype= ALE_ACT;
+ ale->key_data = (adt) ? adt->action : NULL;
+ ale->datatype = ALE_ACT;
- ale->adt= BKE_animdata_from_id(data);
+ ale->adt = BKE_animdata_from_id(data);
}
- break;
+ break;
case ANIMTYPE_DSLAM:
{
- Lamp *la= (Lamp *)data;
- AnimData *adt= la->adt;
+ Lamp *la = (Lamp *)data;
+ AnimData *adt = la->adt;
- ale->flag= FILTER_LAM_OBJD(la);
+ ale->flag = FILTER_LAM_OBJD(la);
- ale->key_data= (adt) ? adt->action : NULL;
- ale->datatype= ALE_ACT;
+ ale->key_data = (adt) ? adt->action : NULL;
+ ale->datatype = ALE_ACT;
- ale->adt= BKE_animdata_from_id(data);
+ ale->adt = BKE_animdata_from_id(data);
}
- break;
+ break;
case ANIMTYPE_DSCAM:
{
- Camera *ca= (Camera *)data;
- AnimData *adt= ca->adt;
+ Camera *ca = (Camera *)data;
+ AnimData *adt = ca->adt;
- ale->flag= FILTER_CAM_OBJD(ca);
+ ale->flag = FILTER_CAM_OBJD(ca);
- ale->key_data= (adt) ? adt->action : NULL;
- ale->datatype= ALE_ACT;
+ ale->key_data = (adt) ? adt->action : NULL;
+ ale->datatype = ALE_ACT;
- ale->adt= BKE_animdata_from_id(data);
+ ale->adt = BKE_animdata_from_id(data);
}
- break;
+ break;
case ANIMTYPE_DSCUR:
{
- Curve *cu= (Curve *)data;
- AnimData *adt= cu->adt;
+ Curve *cu = (Curve *)data;
+ AnimData *adt = cu->adt;
- ale->flag= FILTER_CUR_OBJD(cu);
+ ale->flag = FILTER_CUR_OBJD(cu);
- ale->key_data= (adt) ? adt->action : NULL;
- ale->datatype= ALE_ACT;
+ ale->key_data = (adt) ? adt->action : NULL;
+ ale->datatype = ALE_ACT;
- ale->adt= BKE_animdata_from_id(data);
+ ale->adt = BKE_animdata_from_id(data);
}
- break;
+ break;
case ANIMTYPE_DSARM:
{
- bArmature *arm= (bArmature *)data;
- AnimData *adt= arm->adt;
+ bArmature *arm = (bArmature *)data;
+ AnimData *adt = arm->adt;
- ale->flag= FILTER_ARM_OBJD(arm);
+ ale->flag = FILTER_ARM_OBJD(arm);
- ale->key_data= (adt) ? adt->action : NULL;
- ale->datatype= ALE_ACT;
+ ale->key_data = (adt) ? adt->action : NULL;
+ ale->datatype = ALE_ACT;
- ale->adt= BKE_animdata_from_id(data);
+ ale->adt = BKE_animdata_from_id(data);
}
- break;
+ break;
case ANIMTYPE_DSMESH:
{
- Mesh *me= (Mesh *)data;
- AnimData *adt= me->adt;
+ Mesh *me = (Mesh *)data;
+ AnimData *adt = me->adt;
- ale->flag= FILTER_MESH_OBJD(me);
+ ale->flag = FILTER_MESH_OBJD(me);
- ale->key_data= (adt) ? adt->action : NULL;
- ale->datatype= ALE_ACT;
+ ale->key_data = (adt) ? adt->action : NULL;
+ ale->datatype = ALE_ACT;
- ale->adt= BKE_animdata_from_id(data);
+ ale->adt = BKE_animdata_from_id(data);
}
- break;
+ break;
case ANIMTYPE_DSLAT:
{
- Lattice *lt= (Lattice *)data;
- AnimData *adt= lt->adt;
+ Lattice *lt = (Lattice *)data;
+ AnimData *adt = lt->adt;
- ale->flag= FILTER_LATTICE_OBJD(lt);
+ ale->flag = FILTER_LATTICE_OBJD(lt);
- ale->key_data= (adt) ? adt->action : NULL;
- ale->datatype= ALE_ACT;
+ ale->key_data = (adt) ? adt->action : NULL;
+ ale->datatype = ALE_ACT;
- ale->adt= BKE_animdata_from_id(data);
+ ale->adt = BKE_animdata_from_id(data);
}
- break;
+ break;
case ANIMTYPE_DSSPK:
{
- Speaker *spk= (Speaker *)data;
- AnimData *adt= spk->adt;
+ Speaker *spk = (Speaker *)data;
+ AnimData *adt = spk->adt;
- ale->flag= FILTER_SPK_OBJD(spk);
+ ale->flag = FILTER_SPK_OBJD(spk);
- ale->key_data= (adt) ? adt->action : NULL;
- ale->datatype= ALE_ACT;
+ ale->key_data = (adt) ? adt->action : NULL;
+ ale->datatype = ALE_ACT;
- ale->adt= BKE_animdata_from_id(data);
+ ale->adt = BKE_animdata_from_id(data);
}
- break;
+ break;
case ANIMTYPE_DSSKEY:
{
- Key *key= (Key *)data;
- AnimData *adt= key->adt;
+ Key *key = (Key *)data;
+ AnimData *adt = key->adt;
- ale->flag= FILTER_SKE_OBJD(key);
+ ale->flag = FILTER_SKE_OBJD(key);
- ale->key_data= (adt) ? adt->action : NULL;
- ale->datatype= ALE_ACT;
+ ale->key_data = (adt) ? adt->action : NULL;
+ ale->datatype = ALE_ACT;
- ale->adt= BKE_animdata_from_id(data);
+ ale->adt = BKE_animdata_from_id(data);
}
- break;
+ break;
case ANIMTYPE_DSWOR:
{
- World *wo= (World *)data;
- AnimData *adt= wo->adt;
+ World *wo = (World *)data;
+ AnimData *adt = wo->adt;
- ale->flag= FILTER_WOR_SCED(wo);
+ ale->flag = FILTER_WOR_SCED(wo);
- ale->key_data= (adt) ? adt->action : NULL;
- ale->datatype= ALE_ACT;
+ ale->key_data = (adt) ? adt->action : NULL;
+ ale->datatype = ALE_ACT;
- ale->adt= BKE_animdata_from_id(data);
+ ale->adt = BKE_animdata_from_id(data);
}
- break;
+ break;
case ANIMTYPE_DSNTREE:
{
- bNodeTree *ntree= (bNodeTree *)data;
- AnimData *adt= ntree->adt;
+ bNodeTree *ntree = (bNodeTree *)data;
+ AnimData *adt = ntree->adt;
- ale->flag= FILTER_NTREE_DATA(ntree);
+ ale->flag = FILTER_NTREE_DATA(ntree);
- ale->key_data= (adt) ? adt->action : NULL;
- ale->datatype= ALE_ACT;
+ ale->key_data = (adt) ? adt->action : NULL;
+ ale->datatype = ALE_ACT;
- ale->adt= BKE_animdata_from_id(data);
+ ale->adt = BKE_animdata_from_id(data);
}
- break;
+ break;
case ANIMTYPE_DSPART:
{
- ParticleSettings *part= (ParticleSettings*)ale->data;
- AnimData *adt= part->adt;
+ ParticleSettings *part = (ParticleSettings *)ale->data;
+ AnimData *adt = part->adt;
- ale->flag= FILTER_PART_OBJD(part);
+ ale->flag = FILTER_PART_OBJD(part);
- ale->key_data= (adt) ? adt->action : NULL;
- ale->datatype= ALE_ACT;
+ ale->key_data = (adt) ? adt->action : NULL;
+ ale->datatype = ALE_ACT;
- ale->adt= BKE_animdata_from_id(data);
+ ale->adt = BKE_animdata_from_id(data);
}
- break;
+ break;
case ANIMTYPE_DSTEX:
{
- Tex *tex= (Tex *)data;
- AnimData *adt= tex->adt;
+ Tex *tex = (Tex *)data;
+ AnimData *adt = tex->adt;
- ale->flag= FILTER_TEX_DATA(tex);
+ ale->flag = FILTER_TEX_DATA(tex);
- ale->key_data= (adt) ? adt->action : NULL;
- ale->datatype= ALE_ACT;
+ ale->key_data = (adt) ? adt->action : NULL;
+ ale->datatype = ALE_ACT;
- ale->adt= BKE_animdata_from_id(data);
+ ale->adt = BKE_animdata_from_id(data);
}
- break;
+ break;
case ANIMTYPE_GROUP:
{
- bActionGroup *agrp= (bActionGroup *)data;
+ bActionGroup *agrp = (bActionGroup *)data;
- ale->flag= agrp->flag;
+ ale->flag = agrp->flag;
- ale->key_data= NULL;
- ale->datatype= ALE_GROUP;
+ ale->key_data = NULL;
+ ale->datatype = ALE_GROUP;
}
- break;
+ break;
case ANIMTYPE_FCURVE:
{
- FCurve *fcu= (FCurve *)data;
+ FCurve *fcu = (FCurve *)data;
- ale->flag= fcu->flag;
+ ale->flag = fcu->flag;
- ale->key_data= fcu;
- ale->datatype= ALE_FCURVE;
+ ale->key_data = fcu;
+ ale->datatype = ALE_FCURVE;
}
- break;
+ break;
case ANIMTYPE_SHAPEKEY:
{
- KeyBlock *kb= (KeyBlock *)data;
- Key *key= (Key *)ale->id;
+ KeyBlock *kb = (KeyBlock *)data;
+ Key *key = (Key *)ale->id;
- ale->flag= kb->flag;
+ ale->flag = kb->flag;
/* whether we have keyframes depends on whether there is a Key block to find it from */
if (key) {
/* index of shapekey is defined by place in key's list */
- ale->index= BLI_findindex(&key->block, kb);
+ ale->index = BLI_findindex(&key->block, kb);
/* the corresponding keyframes are from the animdata */
if (ale->adt && ale->adt->action) {
- bAction *act= ale->adt->action;
+ bAction *act = ale->adt->action;
char *rna_path = key_get_curValue_rnaPath(key, kb);
/* try to find the F-Curve which corresponds to this exactly,
* then free the MEM_alloc'd string
*/
if (rna_path) {
- ale->key_data= (void *)list_find_fcurve(&act->curves, rna_path, 0);
+ ale->key_data = (void *)list_find_fcurve(&act->curves, rna_path, 0);
MEM_freeN(rna_path);
}
}
- ale->datatype= (ale->key_data)? ALE_FCURVE : ALE_NONE;
+ ale->datatype = (ale->key_data) ? ALE_FCURVE : ALE_NONE;
}
}
- break;
+ break;
case ANIMTYPE_GPLAYER:
{
- bGPDlayer *gpl= (bGPDlayer *)data;
+ bGPDlayer *gpl = (bGPDlayer *)data;
- ale->flag= gpl->flag;
+ ale->flag = gpl->flag;
- ale->key_data= NULL;
- ale->datatype= ALE_GPFRAME;
+ ale->key_data = NULL;
+ ale->datatype = ALE_GPFRAME;
}
- break;
+ break;
case ANIMTYPE_NLATRACK:
{
- NlaTrack *nlt= (NlaTrack *)data;
+ NlaTrack *nlt = (NlaTrack *)data;
- ale->flag= nlt->flag;
+ ale->flag = nlt->flag;
- ale->key_data= &nlt->strips;
- ale->datatype= ALE_NLASTRIP;
+ ale->key_data = &nlt->strips;
+ ale->datatype = ALE_NLASTRIP;
}
- break;
+ break;
case ANIMTYPE_NLAACTION:
{
/* nothing to include for now... nothing editable from NLA-perspective here */
- ale->key_data= NULL;
- ale->datatype= ALE_NONE;
+ ale->key_data = NULL;
+ ale->datatype = ALE_NONE;
}
- break;
+ break;
}
}
@@ -824,13 +834,16 @@ static bAnimListElem *make_new_animlistelem (void *data, short datatype, ID *own
/* ----------------------------------------- */
-/* 'Only Selected' selected data filtering
+/* 'Only Selected' selected data and/or 'Include Hidden' filtering
* NOTE: when this function returns true, the F-Curve is to be skipped
*/
-static size_t skip_fcurve_selected_data (bDopeSheet *ads, FCurve *fcu, ID *owner_id, int filter_mode)
+static short skip_fcurve_selected_data(bDopeSheet *ads, FCurve *fcu, ID *owner_id, int filter_mode)
{
+ /* hidden items should be skipped if we only care about visible data, but we aren't interested in hidden stuff */
+ short skip_hidden = (filter_mode & ANIMFILTER_DATA_VISIBLE) && !(ads->filterflag & ADS_FILTER_INCL_HIDDEN);
+
if (GS(owner_id->name) == ID_OB) {
- Object *ob= (Object *)owner_id;
+ Object *ob = (Object *)owner_id;
/* only consider if F-Curve involves pose.bones */
if ((fcu->rna_path) && strstr(fcu->rna_path, "pose.bones")) {
@@ -838,24 +851,29 @@ static size_t skip_fcurve_selected_data (bDopeSheet *ads, FCurve *fcu, ID *owner
char *bone_name;
/* get bone-name, and check if this bone is selected */
- bone_name= BLI_getQuotedStr(fcu->rna_path, "pose.bones[");
- pchan= get_pose_channel(ob->pose, bone_name);
+ bone_name = BLI_getQuotedStr(fcu->rna_path, "pose.bones[");
+ pchan = BKE_pose_channel_find_name(ob->pose, bone_name);
if (bone_name) MEM_freeN(bone_name);
/* check whether to continue or skip */
if ((pchan) && (pchan->bone)) {
/* if only visible channels, skip if bone not visible unless user wants channels from hidden data too */
- if ((filter_mode & ANIMFILTER_DATA_VISIBLE) && !(ads->filterflag & ADS_FILTER_INCL_HIDDEN)) {
- bArmature *arm= (bArmature *)ob->data;
+ if (skip_hidden) {
+ bArmature *arm = (bArmature *)ob->data;
+ /* skipping - not visible on currently visible layers */
if ((arm->layer & pchan->bone->layer) == 0)
return 1;
- // TODO: manually hidden using flags
+ /* skipping - is currently hidden */
+ if (pchan->bone->flag & BONE_HIDDEN_P)
+ return 1;
}
/* can only add this F-Curve if it is selected */
- if ((pchan->bone->flag & BONE_SELECTED) == 0)
- return 1;
+ if (ads->filterflag & ADS_FILTER_ONLYSEL) {
+ if ((pchan->bone->flag & BONE_SELECTED) == 0)
+ return 1;
+ }
}
}
}
@@ -864,36 +882,40 @@ static size_t skip_fcurve_selected_data (bDopeSheet *ads, FCurve *fcu, ID *owner
/* only consider if F-Curve involves sequence_editor.sequences */
if ((fcu->rna_path) && strstr(fcu->rna_path, "sequences_all")) {
- Editing *ed= seq_give_editing(scene, FALSE);
+ Editing *ed = seq_give_editing(scene, FALSE);
Sequence *seq;
char *seq_name;
/* get strip name, and check if this strip is selected */
- seq_name= BLI_getQuotedStr(fcu->rna_path, "sequences_all[");
+ seq_name = BLI_getQuotedStr(fcu->rna_path, "sequences_all[");
seq = get_seq_by_name(ed->seqbasep, seq_name, FALSE);
if (seq_name) MEM_freeN(seq_name);
/* can only add this F-Curve if it is selected */
- if (seq==NULL || (seq->flag & SELECT)==0)
- return 1;
+ if (ads->filterflag & ADS_FILTER_ONLYSEL) {
+ if ((seq == NULL) || (seq->flag & SELECT) == 0)
+ return 1;
+ }
}
}
else if (GS(owner_id->name) == ID_NT) {
bNodeTree *ntree = (bNodeTree *)owner_id;
- /* check for selected nodes */
+ /* check for selected nodes */
if ((fcu->rna_path) && strstr(fcu->rna_path, "nodes")) {
bNode *node;
char *node_name;
/* get strip name, and check if this strip is selected */
- node_name= BLI_getQuotedStr(fcu->rna_path, "nodes[");
+ node_name = BLI_getQuotedStr(fcu->rna_path, "nodes[");
node = nodeFindNodebyName(ntree, node_name);
if (node_name) MEM_freeN(node_name);
/* can only add this F-Curve if it is selected */
- if ((node) && (node->flag & NODE_SELECT)==0)
- return 1;
+ if (ads->filterflag & ADS_FILTER_ONLYSEL) {
+ if ((node) && (node->flag & NODE_SELECT) == 0)
+ return 1;
+ }
}
}
return 0;
@@ -902,7 +924,7 @@ static size_t skip_fcurve_selected_data (bDopeSheet *ads, FCurve *fcu, ID *owner
/* (Display-)Name-based F-Curve filtering
* NOTE: when this function returns true, the F-Curve is to be skipped
*/
-static short skip_fcurve_with_name (bDopeSheet *ads, FCurve *fcu, ID *owner_id)
+static short skip_fcurve_with_name(bDopeSheet *ads, FCurve *fcu, ID *owner_id)
{
bAnimListElem ale_dummy = {NULL};
bAnimChannelType *acf;
@@ -931,26 +953,28 @@ static short skip_fcurve_with_name (bDopeSheet *ads, FCurve *fcu, ID *owner_id)
}
/* find the next F-Curve that is usable for inclusion */
-static FCurve *animfilter_fcurve_next (bDopeSheet *ads, FCurve *first, bActionGroup *grp, int filter_mode, ID *owner_id)
+static FCurve *animfilter_fcurve_next(bDopeSheet *ads, FCurve *first, bActionGroup *grp, int filter_mode, ID *owner_id)
{
FCurve *fcu = NULL;
/* loop over F-Curves - assume that the caller of this has already checked that these should be included
* NOTE: we need to check if the F-Curves belong to the same group, as this gets called for groups too...
*/
- for (fcu= first; ((fcu) && (fcu->grp==grp)); fcu= fcu->next) {
+ for (fcu = first; ((fcu) && (fcu->grp == grp)); fcu = fcu->next) {
/* special exception for Pose-Channel/Sequence-Strip/Node Based F-Curves:
- * - the 'Only Selected' data filter should be applied to Pose-Channel data too, but those are
- * represented as F-Curves. The way the filter for objects worked was to be the first check
- * after 'normal' visibility, so this is done first here too...
+ * - the 'Only Selected' and 'Include Hidden' data filters should be applied to sub-ID data which
+ * can be independently selected/hidden, such as Pose-Channels, Sequence Strips, and Nodes.
+ * Since these checks were traditionally done as first check for objects, we do the same here
* - we currently use an 'approximate' method for getting these F-Curves that doesn't require
* carefully checking the entire path
* - this will also affect things like Drivers, and also works for Bone Constraints
*/
- if ( ((ads) && (ads->filterflag & ADS_FILTER_ONLYSEL)) && (owner_id) ) {
- if (skip_fcurve_selected_data(ads, fcu, owner_id, filter_mode))
- continue;
- }
+ if (ads && owner_id) {
+ if ((ads->filterflag & ADS_FILTER_ONLYSEL) || (ads->filterflag & ADS_FILTER_INCL_HIDDEN) == 0) {
+ if (skip_fcurve_selected_data(ads, fcu, owner_id, filter_mode))
+ continue;
+ }
+ }
/* only include if visible (Graph Editor check, not channels check) */
if (!(filter_mode & ANIMFILTER_CURVE_VISIBLE) || (fcu->flag & FCURVE_VISIBLE)) {
@@ -978,7 +1002,7 @@ static FCurve *animfilter_fcurve_next (bDopeSheet *ads, FCurve *first, bActionGr
return NULL;
}
-static size_t animfilter_fcurves (ListBase *anim_data, bDopeSheet *ads, FCurve *first, bActionGroup *grp, int filter_mode, ID *owner_id)
+static size_t animfilter_fcurves(ListBase *anim_data, bDopeSheet *ads, FCurve *first, bActionGroup *grp, int filter_mode, ID *owner_id)
{
FCurve *fcu;
size_t items = 0;
@@ -992,8 +1016,7 @@ static size_t animfilter_fcurves (ListBase *anim_data, bDopeSheet *ads, FCurve *
* 4) the fcu pointer is set to the F-Curve after the one we just added, so that we can keep going through
* the rest of the F-Curve list without an eternal loop. Back to step 2 :)
*/
- for (fcu=first; ( (fcu = animfilter_fcurve_next(ads, fcu, grp, filter_mode, owner_id)) ); fcu=fcu->next)
- {
+ for (fcu = first; ( (fcu = animfilter_fcurve_next(ads, fcu, grp, filter_mode, owner_id)) ); fcu = fcu->next) {
ANIMCHANNEL_NEW_CHANNEL(fcu, ANIMTYPE_FCURVE, owner_id);
}
@@ -1001,7 +1024,7 @@ static size_t animfilter_fcurves (ListBase *anim_data, bDopeSheet *ads, FCurve *
return items;
}
-static size_t animfilter_act_group (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, bAction *UNUSED(act), bActionGroup *agrp, int filter_mode, ID *owner_id)
+static size_t animfilter_act_group(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, bAction *UNUSED(act), bActionGroup *agrp, int filter_mode, ID *owner_id)
{
ListBase tmp_data = {NULL, NULL};
size_t tmp_items = 0;
@@ -1010,12 +1033,12 @@ static size_t animfilter_act_group (bAnimContext *ac, ListBase *anim_data, bDope
/* if we care about the selection status of the channels,
* but the group isn't expanded (1)...
- * (1) this only matters if we actually care about the hierarchy though.
+ * (1) this only matters if we actually care about the hierarchy though.
* - Hierarchy matters: this hack should be applied
* - Hierarchy ignored: cases like [#21276] won't work properly, unless we skip this hack
*/
- if ( ((filter_mode & ANIMFILTER_LIST_VISIBLE) && EXPANDED_AGRP(ac, agrp)==0) && /* care about hierarchy but group isn't expanded */
- (filter_mode & (ANIMFILTER_SEL|ANIMFILTER_UNSEL)) ) /* care about selection status */
+ if ( ((filter_mode & ANIMFILTER_LIST_VISIBLE) && EXPANDED_AGRP(ac, agrp) == 0) && /* care about hierarchy but group isn't expanded */
+ (filter_mode & (ANIMFILTER_SEL | ANIMFILTER_UNSEL)) ) /* care about selection status */
{
/* if the group itself isn't selected appropriately, we shouldn't consider it's children either */
if (ANIMCHANNEL_SELOK(SEL_AGRP(agrp)) == 0)
@@ -1029,7 +1052,7 @@ static size_t animfilter_act_group (bAnimContext *ac, ListBase *anim_data, bDope
* - pasting keyframes
* - creating ghost curves in Graph Editor
*/
- filter_mode &= ~(ANIMFILTER_SEL|ANIMFILTER_UNSEL|ANIMFILTER_LIST_VISIBLE);
+ filter_mode &= ~(ANIMFILTER_SEL | ANIMFILTER_UNSEL | ANIMFILTER_LIST_VISIBLE);
}
/* add grouped F-Curves */
@@ -1063,7 +1086,7 @@ static size_t animfilter_act_group (bAnimContext *ac, ListBase *anim_data, bDope
//filter_mode = ofilter;
/* filter selection of channel specially here again, since may be open and not subject to previous test */
- if ( ANIMCHANNEL_SELOK(SEL_AGRP(agrp)) ) {
+ if (ANIMCHANNEL_SELOK(SEL_AGRP(agrp)) ) {
ANIMCHANNEL_NEW_CHANNEL(agrp, ANIMTYPE_GROUP, owner_id);
}
}
@@ -1078,7 +1101,7 @@ static size_t animfilter_act_group (bAnimContext *ac, ListBase *anim_data, bDope
return items;
}
-static size_t animfilter_action (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, bAction *act, int filter_mode, ID *owner_id)
+static size_t animfilter_action(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, bAction *act, int filter_mode, ID *owner_id)
{
bActionGroup *agrp;
FCurve *lastchan = NULL;
@@ -1096,7 +1119,7 @@ static size_t animfilter_action (bAnimContext *ac, ListBase *anim_data, bDopeShe
for (agrp = act->groups.first; agrp; agrp = agrp->next) {
/* store reference to last channel of group */
if (agrp->channels.last)
- lastchan= agrp->channels.last;
+ lastchan = agrp->channels.last;
/* action group's channels */
items += animfilter_act_group(ac, anim_data, ads, act, agrp, filter_mode, owner_id);
@@ -1104,7 +1127,7 @@ static size_t animfilter_action (bAnimContext *ac, ListBase *anim_data, bDopeShe
/* un-grouped F-Curves (only if we're not only considering those channels in the active group) */
if (!(filter_mode & ANIMFILTER_ACTGROUPED)) {
- FCurve *firstfcu = (lastchan)? (lastchan->next) : (act->curves.first);
+ FCurve *firstfcu = (lastchan) ? (lastchan->next) : (act->curves.first);
items += animfilter_fcurves(anim_data, ads, firstfcu, NULL, filter_mode, owner_id);
}
@@ -1120,10 +1143,10 @@ static size_t animfilter_action (bAnimContext *ac, ListBase *anim_data, bDopeShe
* - for normal filtering (i.e. for editing), we only need the NLA-tracks but they can be in 'normal' evaluation
* order, i.e. first to last. Otherwise, some tools may get screwed up.
*/
-static size_t animfilter_nla (bAnimContext *UNUSED(ac), ListBase *anim_data, bDopeSheet *ads, AnimData *adt, int filter_mode, ID *owner_id)
+static size_t animfilter_nla(bAnimContext *UNUSED(ac), ListBase *anim_data, bDopeSheet *ads, AnimData *adt, int filter_mode, ID *owner_id)
{
NlaTrack *nlt;
- NlaTrack *first=NULL, *next=NULL;
+ NlaTrack *first = NULL, *next = NULL;
size_t items = 0;
/* if showing channels, include active action */
@@ -1140,26 +1163,26 @@ static size_t animfilter_nla (bAnimContext *UNUSED(ac), ListBase *anim_data, bDo
*/
ANIMCHANNEL_NEW_CHANNEL_FULL((void *)(&adt->action), ANIMTYPE_NLAACTION, owner_id,
{
- ale->data= adt->action ? adt->action : NULL;
+ ale->data = adt->action ? adt->action : NULL;
});
}
}
/* first track to include will be the last one if we're filtering by channels */
- first= adt->nla_tracks.last;
+ first = adt->nla_tracks.last;
}
else {
/* first track to include will the the first one (as per normal) */
- first= adt->nla_tracks.first;
+ first = adt->nla_tracks.first;
}
/* loop over NLA Tracks - assume that the caller of this has already checked that these should be included */
- for (nlt= first; nlt; nlt= next) {
+ for (nlt = first; nlt; nlt = next) {
/* 'next' NLA-Track to use depends on whether we're filtering for drawing or not */
if (filter_mode & ANIMFILTER_LIST_CHANNELS)
- next= nlt->prev;
+ next = nlt->prev;
else
- next= nlt->next;
+ next = nlt->next;
/* if we're in NLA-tweakmode, don't show this track if it was disabled (due to tweaking) for now
* - active track should still get shown though (even though it has disabled flag set)
@@ -1185,14 +1208,14 @@ static size_t animfilter_nla (bAnimContext *UNUSED(ac), ListBase *anim_data, bDo
}
/* determine what animation data from AnimData block should get displayed */
-static size_t animfilter_block_data (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, ID *id, int filter_mode)
+static size_t animfilter_block_data(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, ID *id, int filter_mode)
{
AnimData *adt = BKE_animdata_from_id(id);
size_t items = 0;
/* image object datablocks have no anim-data so check for NULL */
if (adt) {
- IdAdtTemplate *iat = (IdAdtTemplate*)id;
+ IdAdtTemplate *iat = (IdAdtTemplate *)id;
/* NOTE: this macro is used instead of inlining the logic here, since this sort of filtering is still needed
* in a few places in he rest of the code still - notably for the few cases where special mode-based
@@ -1221,7 +1244,7 @@ static size_t animfilter_block_data (bAnimContext *ac, ListBase *anim_data, bDop
/* Include ShapeKey Data for ShapeKey Editor */
-static size_t animdata_filter_shapekey (bAnimContext *ac, ListBase *anim_data, Key *key, int filter_mode)
+static size_t animdata_filter_shapekey(bAnimContext *ac, ListBase *anim_data, Key *key, int filter_mode)
{
size_t items = 0;
@@ -1230,7 +1253,7 @@ static size_t animdata_filter_shapekey (bAnimContext *ac, ListBase *anim_data, K
KeyBlock *kb;
/* loop through the channels adding ShapeKeys as appropriate */
- for (kb= key->block.first; kb; kb= kb->next) {
+ for (kb = key->block.first; kb; kb = kb->next) {
/* skip the first one, since that's the non-animatable basis */
// XXX maybe in future this may become handy?
if (kb == key->block.first) continue;
@@ -1238,7 +1261,7 @@ static size_t animdata_filter_shapekey (bAnimContext *ac, ListBase *anim_data, K
/* only work with this channel and its subchannels if it is editable */
if (!(filter_mode & ANIMFILTER_FOREDIT) || EDITABLE_SHAPEKEY(kb)) {
/* only include this track if selected in a way consistent with the filtering requirements */
- if ( ANIMCHANNEL_SELOK(SEL_SHAPEKEY(kb)) ) {
+ if (ANIMCHANNEL_SELOK(SEL_SHAPEKEY(kb)) ) {
// TODO: consider 'active' too?
/* owner-id here must be key so that the F-Curve can be resolved... */
@@ -1255,7 +1278,7 @@ static size_t animdata_filter_shapekey (bAnimContext *ac, ListBase *anim_data, K
ANIMCHANNEL_NEW_CHANNEL(key->adt, ANIMTYPE_ANIMDATA, key);
}
else if (key->adt->action) {
- items= animfilter_action(ac, anim_data, NULL, key->adt->action, filter_mode, (ID *)key);
+ items = animfilter_action(ac, anim_data, NULL, key->adt->action, filter_mode, (ID *)key);
}
}
}
@@ -1264,15 +1287,15 @@ static size_t animdata_filter_shapekey (bAnimContext *ac, ListBase *anim_data, K
return items;
}
-static size_t animdata_filter_gpencil_data (ListBase *anim_data, bGPdata *gpd, int filter_mode)
+static size_t animdata_filter_gpencil_data(ListBase *anim_data, bGPdata *gpd, int filter_mode)
{
bGPDlayer *gpl;
size_t items = 0;
/* loop over layers as the conditions are acceptable */
- for (gpl= gpd->layers.first; gpl; gpl= gpl->next) {
+ for (gpl = gpd->layers.first; gpl; gpl = gpl->next) {
/* only if selected */
- if ( ANIMCHANNEL_SELOK(SEL_GPL(gpl)) ) {
+ if (ANIMCHANNEL_SELOK(SEL_GPL(gpl)) ) {
/* only if editable */
if (!(filter_mode & ANIMFILTER_FOREDIT) || EDITABLE_GPL(gpl)) {
/* active... */
@@ -1289,7 +1312,7 @@ static size_t animdata_filter_gpencil_data (ListBase *anim_data, bGPdata *gpd, i
/* Grab all Grease Pencil datablocks in file */
// TODO: should this be amalgamated with the dopesheet filtering code?
-static size_t animdata_filter_gpencil (ListBase *anim_data, void *UNUSED(data), int filter_mode)
+static size_t animdata_filter_gpencil(ListBase *anim_data, void *UNUSED(data), int filter_mode)
{
bGPdata *gpd;
size_t items = 0;
@@ -1332,7 +1355,7 @@ static size_t animdata_filter_gpencil (ListBase *anim_data, void *UNUSED(data),
/* NOTE: owner_id is scene, material, or texture block, which is the direct owner of the node tree in question */
// TODO: how to handle group nodes is still unclear...
-static size_t animdata_filter_ds_nodetree (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, ID *owner_id, bNodeTree *ntree, int filter_mode)
+static size_t animdata_filter_ds_nodetree(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, ID *owner_id, bNodeTree *ntree, int filter_mode)
{
ListBase tmp_data = {NULL, NULL};
size_t tmp_items = 0;
@@ -1367,11 +1390,11 @@ static size_t animdata_filter_ds_nodetree (bAnimContext *ac, ListBase *anim_data
}
/* NOTE: owner_id is either material, lamp, or world block, which is the direct owner of the texture stack in question */
-static size_t animdata_filter_ds_textures (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, ID *owner_id, int filter_mode)
+static size_t animdata_filter_ds_textures(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, ID *owner_id, int filter_mode)
{
MTex **mtex = NULL;
- size_t items=0;
- int a=0;
+ size_t items = 0;
+ int a = 0;
/* get datatype specific data first */
if (owner_id == NULL)
@@ -1380,22 +1403,22 @@ static size_t animdata_filter_ds_textures (bAnimContext *ac, ListBase *anim_data
switch (GS(owner_id->name)) {
case ID_MA:
{
- Material *ma= (Material *)owner_id;
- mtex= (MTex**)(&ma->mtex);
+ Material *ma = (Material *)owner_id;
+ mtex = (MTex **)(&ma->mtex);
}
- break;
+ break;
case ID_LA:
{
- Lamp *la= (Lamp *)owner_id;
- mtex= (MTex**)(&la->mtex);
+ Lamp *la = (Lamp *)owner_id;
+ mtex = (MTex **)(&la->mtex);
}
- break;
+ break;
case ID_WO:
{
- World *wo= (World *)owner_id;
- mtex= (MTex**)(&wo->mtex);
+ World *wo = (World *)owner_id;
+ mtex = (MTex **)(&wo->mtex);
}
- break;
+ break;
default:
{
/* invalid/unsupported option */
@@ -1406,8 +1429,8 @@ static size_t animdata_filter_ds_textures (bAnimContext *ac, ListBase *anim_data
}
/* firstly check that we actuallly have some textures, by gathering all textures in a temp list */
- for (a=0; a < MAX_MTEX; a++) {
- Tex *tex= (mtex[a]) ? mtex[a]->tex : NULL;
+ for (a = 0; a < MAX_MTEX; a++) {
+ Tex *tex = (mtex[a]) ? mtex[a]->tex : NULL;
ListBase tmp_data = {NULL, NULL};
size_t tmp_items = 0;
@@ -1452,51 +1475,83 @@ static size_t animdata_filter_ds_textures (bAnimContext *ac, ListBase *anim_data
return items;
}
-static size_t animdata_filter_ds_materials (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Object *ob, int filter_mode)
+
+static size_t animdata_filter_ds_material(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Material *ma, int filter_mode)
{
- size_t items=0;
- int a=0;
+ ListBase tmp_data = {NULL, NULL};
+ size_t tmp_items = 0;
+ size_t items = 0;
- /* firstly check that we actuallly have some materials, by gathering all materials in a temp list */
- for (a=1; a <= ob->totcol; a++) {
- Material *ma= give_current_material(ob, a);
- ListBase tmp_data = {NULL, NULL};
- size_t tmp_items = 0;
+ /* add material's animation data to temp collection */
+ BEGIN_ANIMFILTER_SUBCHANNELS(FILTER_MAT_OBJD(ma))
+ {
+ /* material's animation data */
+ tmp_items += animfilter_block_data(ac, &tmp_data, ads, (ID *)ma, filter_mode);
+
+ /* textures */
+ if (!(ads->filterflag & ADS_FILTER_NOTEX))
+ tmp_items += animdata_filter_ds_textures(ac, &tmp_data, ads, (ID *)ma, filter_mode);
+
+ /* nodes */
+ if ((ma->nodetree) && !(ads->filterflag & ADS_FILTER_NONTREE))
+ tmp_items += animdata_filter_ds_nodetree(ac, &tmp_data, ads, (ID *)ma, ma->nodetree, filter_mode);
+ }
+ END_ANIMFILTER_SUBCHANNELS;
+
+ /* did we find anything? */
+ if (tmp_items) {
+ /* include material-expand widget first */
+ // hmm... do we need to store the index of this material in the array anywhere?
+ if (filter_mode & ANIMFILTER_LIST_CHANNELS) {
+ /* check if filtering by active status */
+ if (ANIMCHANNEL_ACTIVEOK(ma)) {
+ ANIMCHANNEL_NEW_CHANNEL(ma, ANIMTYPE_DSMAT, ma);
+ }
+ }
- /* if no material returned, skip - so that we don't get weird blank entries... */
- if (ma == NULL) continue;
+ /* now add the list of collected channels */
+ BLI_movelisttolist(anim_data, &tmp_data);
+ BLI_assert((tmp_data.first == tmp_data.last) && (tmp_data.first == NULL));
+ items += tmp_items;
+ }
+
+ return items;
+}
+
+static size_t animdata_filter_ds_materials(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Object *ob, int filter_mode)
+{
+ short has_nested = 0;
+ size_t items = 0;
+ int a = 0;
+
+ /* first pass: take the materials referenced via the Material slots of the object */
+ for (a = 1; a <= ob->totcol; a++) {
+ Material *ma = give_current_material(ob, a);
- /* add material's animation data to temp collection */
- BEGIN_ANIMFILTER_SUBCHANNELS(FILTER_MAT_OBJD(ma))
- {
- /* material's animation data */
- tmp_items += animfilter_block_data(ac, &tmp_data, ads, (ID *)ma, filter_mode);
-
- /* textures */
- if (!(ads->filterflag & ADS_FILTER_NOTEX))
- tmp_items += animdata_filter_ds_textures(ac, &tmp_data, ads, (ID *)ma, filter_mode);
-
- /* nodes */
- if ((ma->nodetree) && !(ads->filterflag & ADS_FILTER_NONTREE))
- tmp_items += animdata_filter_ds_nodetree(ac, &tmp_data, ads, (ID *)ma, ma->nodetree, filter_mode);
+ /* if material is valid, try to add relevant contents from here */
+ if (ma) {
+ /* add channels */
+ items += animdata_filter_ds_material(ac, anim_data, ads, ma, filter_mode);
+
+ /* for optimising second pass - check if there's a nested material here to come back for */
+ if (has_nested == 0)
+ has_nested = give_node_material(ma) != NULL;
}
- END_ANIMFILTER_SUBCHANNELS;
-
- /* did we find anything? */
- if (tmp_items) {
- /* include material-expand widget first */
- // hmm... do we need to store the index of this material in the array anywhere?
- if (filter_mode & ANIMFILTER_LIST_CHANNELS) {
- /* check if filtering by active status */
- if (ANIMCHANNEL_ACTIVEOK(ma)) {
- ANIMCHANNEL_NEW_CHANNEL(ma, ANIMTYPE_DSMAT, ma);
- }
- }
+ }
+
+ /* second pass: go through a second time looking for "nested" materials (material.material references)
+ *
+ * NOTE: here we ignore the expanded status of the parent, as it could be too confusing as to why these are
+ * disappearing/not available, since the relationships between these is not that clear
+ */
+ if (has_nested) {
+ for (a = 1; a <= ob->totcol; a++) {
+ Material *base = give_current_material(ob, a);
+ Material *ma = give_node_material(base);
- /* now add the list of collected channels */
- BLI_movelisttolist(anim_data, &tmp_data);
- BLI_assert((tmp_data.first == tmp_data.last) && (tmp_data.first == NULL));
- items += tmp_items;
+ /* add channels from the nested material if it exists */
+ if (ma)
+ items += animdata_filter_ds_material(ac, anim_data, ads, ma, filter_mode);
}
}
@@ -1504,12 +1559,12 @@ static size_t animdata_filter_ds_materials (bAnimContext *ac, ListBase *anim_dat
return items;
}
-static size_t animdata_filter_ds_particles (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Object *ob, int filter_mode)
+static size_t animdata_filter_ds_particles(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Object *ob, int filter_mode)
{
ParticleSystem *psys;
- size_t items= 0;
+ size_t items = 0;
- for (psys = ob->particlesystem.first; psys; psys=psys->next) {
+ for (psys = ob->particlesystem.first; psys; psys = psys->next) {
ListBase tmp_data = {NULL, NULL};
size_t tmp_items = 0;
@@ -1546,85 +1601,85 @@ static size_t animdata_filter_ds_particles (bAnimContext *ac, ListBase *anim_dat
return items;
}
-static size_t animdata_filter_ds_obdata (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Object *ob, int filter_mode)
+static size_t animdata_filter_ds_obdata(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Object *ob, int filter_mode)
{
ListBase tmp_data = {NULL, NULL};
size_t tmp_items = 0;
- size_t items= 0;
+ size_t items = 0;
- IdAdtTemplate *iat= ob->data;
- short type=0, expanded=0;
+ IdAdtTemplate *iat = ob->data;
+ short type = 0, expanded = 0;
/* get settings based on data type */
switch (ob->type) {
case OB_CAMERA: /* ------- Camera ------------ */
{
- Camera *ca= (Camera *)ob->data;
+ Camera *ca = (Camera *)ob->data;
if (ads->filterflag & ADS_FILTER_NOCAM)
return 0;
- type= ANIMTYPE_DSCAM;
- expanded= FILTER_CAM_OBJD(ca);
+ type = ANIMTYPE_DSCAM;
+ expanded = FILTER_CAM_OBJD(ca);
}
- break;
+ break;
case OB_LAMP: /* ---------- Lamp ----------- */
{
- Lamp *la= (Lamp *)ob->data;
+ Lamp *la = (Lamp *)ob->data;
if (ads->filterflag & ADS_FILTER_NOLAM)
return 0;
- type= ANIMTYPE_DSLAM;
- expanded= FILTER_LAM_OBJD(la);
+ type = ANIMTYPE_DSLAM;
+ expanded = FILTER_LAM_OBJD(la);
}
- break;
+ break;
case OB_CURVE: /* ------- Curve ---------- */
case OB_SURF: /* ------- Nurbs Surface ---------- */
case OB_FONT: /* ------- Text Curve ---------- */
{
- Curve *cu= (Curve *)ob->data;
+ Curve *cu = (Curve *)ob->data;
if (ads->filterflag & ADS_FILTER_NOCUR)
return 0;
- type= ANIMTYPE_DSCUR;
- expanded= FILTER_CUR_OBJD(cu);
+ type = ANIMTYPE_DSCUR;
+ expanded = FILTER_CUR_OBJD(cu);
}
- break;
+ break;
case OB_MBALL: /* ------- MetaBall ---------- */
{
- MetaBall *mb= (MetaBall *)ob->data;
+ MetaBall *mb = (MetaBall *)ob->data;
if (ads->filterflag & ADS_FILTER_NOMBA)
return 0;
- type= ANIMTYPE_DSMBALL;
- expanded= FILTER_MBALL_OBJD(mb);
+ type = ANIMTYPE_DSMBALL;
+ expanded = FILTER_MBALL_OBJD(mb);
}
- break;
+ break;
case OB_ARMATURE: /* ------- Armature ---------- */
{
- bArmature *arm= (bArmature *)ob->data;
+ bArmature *arm = (bArmature *)ob->data;
if (ads->filterflag & ADS_FILTER_NOARM)
return 0;
- type= ANIMTYPE_DSARM;
- expanded= FILTER_ARM_OBJD(arm);
+ type = ANIMTYPE_DSARM;
+ expanded = FILTER_ARM_OBJD(arm);
}
- break;
+ break;
case OB_MESH: /* ------- Mesh ---------- */
{
- Mesh *me= (Mesh *)ob->data;
+ Mesh *me = (Mesh *)ob->data;
if (ads->filterflag & ADS_FILTER_NOMESH)
return 0;
- type= ANIMTYPE_DSMESH;
- expanded= FILTER_MESH_OBJD(me);
+ type = ANIMTYPE_DSMESH;
+ expanded = FILTER_MESH_OBJD(me);
}
- break;
+ break;
case OB_LATTICE: /* ---- Lattice ---- */
{
Lattice *lt = (Lattice *)ob->data;
@@ -1632,18 +1687,18 @@ static size_t animdata_filter_ds_obdata (bAnimContext *ac, ListBase *anim_data,
if (ads->filterflag & ADS_FILTER_NOLAT)
return 0;
- type= ANIMTYPE_DSLAT;
- expanded= FILTER_LATTICE_OBJD(lt);
+ type = ANIMTYPE_DSLAT;
+ expanded = FILTER_LATTICE_OBJD(lt);
}
- break;
+ break;
case OB_SPEAKER: /* ---------- Speaker ----------- */
{
- Speaker *spk= (Speaker *)ob->data;
+ Speaker *spk = (Speaker *)ob->data;
- type= ANIMTYPE_DSSPK;
- expanded= FILTER_SPK_OBJD(spk);
+ type = ANIMTYPE_DSSPK;
+ expanded = FILTER_SPK_OBJD(spk);
}
- break;
+ break;
}
/* add object data animation channels */
@@ -1654,13 +1709,13 @@ static size_t animdata_filter_ds_obdata (bAnimContext *ac, ListBase *anim_data,
/* sub-data filtering... */
switch (ob->type) {
- case OB_LAMP: /* lamp - textures */
+ case OB_LAMP: /* lamp - textures */
{
/* textures */
if (!(ads->filterflag & ADS_FILTER_NOTEX))
tmp_items += animdata_filter_ds_textures(ac, &tmp_data, ads, ob->data, filter_mode);
}
- break;
+ break;
}
}
END_ANIMFILTER_SUBCHANNELS;
@@ -1686,7 +1741,7 @@ static size_t animdata_filter_ds_obdata (bAnimContext *ac, ListBase *anim_data,
}
/* shapekey-level animation */
-static size_t animdata_filter_ds_keyanim (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Object *ob, Key *key, int filter_mode)
+static size_t animdata_filter_ds_keyanim(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Object *ob, Key *key, int filter_mode)
{
ListBase tmp_data = {NULL, NULL};
size_t tmp_items = 0;
@@ -1720,27 +1775,27 @@ static size_t animdata_filter_ds_keyanim (bAnimContext *ac, ListBase *anim_data,
}
/* object-level animation */
-static size_t animdata_filter_ds_obanim (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Object *ob, int filter_mode)
+static size_t animdata_filter_ds_obanim(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Object *ob, int filter_mode)
{
ListBase tmp_data = {NULL, NULL};
size_t tmp_items = 0;
size_t items = 0;
AnimData *adt = ob->adt;
- short type=0, expanded=1;
+ short type = 0, expanded = 1;
void *cdata = NULL;
/* determine the type of expander channels to use */
// this is the best way to do this for now...
ANIMDATA_FILTER_CASES(ob,
- {/* AnimData - no channel, but consider data */},
- {/* NLA - no channel, but consider data */},
- {/* Drivers */
+ { /* AnimData - no channel, but consider data */ },
+ { /* NLA - no channel, but consider data */ },
+ { /* Drivers */
type = ANIMTYPE_FILLDRIVERS;
cdata = adt;
expanded = EXPANDED_DRVD(adt);
},
- {/* Keyframes */
+ { /* Keyframes */
type = ANIMTYPE_FILLACTD;
cdata = adt->action;
expanded = EXPANDED_ACTC(adt->action);
@@ -1775,17 +1830,17 @@ static size_t animdata_filter_ds_obanim (bAnimContext *ac, ListBase *anim_data,
}
/* get animation channels from object2 */
-static size_t animdata_filter_dopesheet_ob (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Base *base, int filter_mode)
+static size_t animdata_filter_dopesheet_ob(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Base *base, int filter_mode)
{
ListBase tmp_data = {NULL, NULL};
- Object *ob= base->object;
+ Object *ob = base->object;
size_t tmp_items = 0;
size_t items = 0;
/* filter data contained under object first */
BEGIN_ANIMFILTER_SUBCHANNELS(EXPANDED_OBJC(ob))
{
- Key *key= ob_get_key(ob);
+ Key *key = ob_get_key(ob);
/* object-level animation */
if ((ob->adt) && !(ads->filterflag & ADS_FILTER_NOOBJ)) {
@@ -1839,7 +1894,7 @@ static size_t animdata_filter_dopesheet_ob (bAnimContext *ac, ListBase *anim_dat
return items;
}
-static size_t animdata_filter_ds_world (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Scene *sce, World *wo, int filter_mode)
+static size_t animdata_filter_ds_world(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Scene *sce, World *wo, int filter_mode)
{
ListBase tmp_data = {NULL, NULL};
size_t tmp_items = 0;
@@ -1881,27 +1936,27 @@ static size_t animdata_filter_ds_world (bAnimContext *ac, ListBase *anim_data, b
return items;
}
-static size_t animdata_filter_ds_scene (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Scene *sce, int filter_mode)
+static size_t animdata_filter_ds_scene(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Scene *sce, int filter_mode)
{
ListBase tmp_data = {NULL, NULL};
size_t tmp_items = 0;
size_t items = 0;
AnimData *adt = sce->adt;
- short type=0, expanded=1;
+ short type = 0, expanded = 1;
void *cdata = NULL;
/* determine the type of expander channels to use */
// this is the best way to do this for now...
ANIMDATA_FILTER_CASES(sce,
- {/* AnimData - no channel, but consider data */},
- {/* NLA - no channel, but consider data */},
- {/* Drivers */
+ { /* AnimData - no channel, but consider data */},
+ { /* NLA - no channel, but consider data */},
+ { /* Drivers */
type = ANIMTYPE_FILLDRIVERS;
cdata = adt;
expanded = EXPANDED_DRVD(adt);
},
- {/* Keyframes */
+ { /* Keyframes */
type = ANIMTYPE_FILLACTD;
cdata = adt->action;
expanded = EXPANDED_ACTC(adt->action);
@@ -1935,7 +1990,7 @@ static size_t animdata_filter_ds_scene (bAnimContext *ac, ListBase *anim_data, b
return items;
}
-static size_t animdata_filter_dopesheet_scene (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Scene *sce, int filter_mode)
+static size_t animdata_filter_dopesheet_scene(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Scene *sce, int filter_mode)
{
ListBase tmp_data = {NULL, NULL};
size_t tmp_items = 0;
@@ -1944,8 +1999,8 @@ static size_t animdata_filter_dopesheet_scene (bAnimContext *ac, ListBase *anim_
/* filter data contained under object first */
BEGIN_ANIMFILTER_SUBCHANNELS(EXPANDED_SCEC(sce))
{
- bNodeTree *ntree= sce->nodetree;
- World *wo= sce->world;
+ bNodeTree *ntree = sce->nodetree;
+ World *wo = sce->world;
/* Action, Drivers, or NLA for Scene */
if ((ads->filterflag & ADS_FILTER_NOSCE) == 0) {
@@ -1988,17 +2043,17 @@ static size_t animdata_filter_dopesheet_scene (bAnimContext *ac, ListBase *anim_
}
// 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, int filter_mode)
+static size_t animdata_filter_dopesheet(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, int filter_mode)
{
- Scene *sce= (Scene *)ads->source;
+ Scene *sce = (Scene *)ads->source;
Base *base;
size_t items = 0;
/* check that we do indeed have a scene */
- if ((ads->source == NULL) || (GS(ads->source->name)!=ID_SCE)) {
+ if ((ads->source == NULL) || (GS(ads->source->name) != ID_SCE)) {
printf("DopeSheet Error: Not scene!\n");
if (G.debug & G_DEBUG)
- printf("\tPointer = %p, Name = '%s'\n", (void *)ads->source, (ads->source)?ads->source->name:NULL);
+ printf("\tPointer = %p, Name = '%s'\n", (void *)ads->source, (ads->source) ? ads->source->name : NULL);
return 0;
}
@@ -2014,10 +2069,10 @@ static size_t animdata_filter_dopesheet (bAnimContext *ac, ListBase *anim_data,
items += animdata_filter_dopesheet_scene(ac, anim_data, ads, sce, filter_mode);
/* loop over all bases (i.e.objects) in the scene */
- for (base= sce->base.first; base; base= base->next) {
+ for (base = sce->base.first; base; base = base->next) {
/* check if there's an object (all the relevant checks are done in the ob-function) */
if (base->object) {
- Object *ob= base->object;
+ Object *ob = base->object;
/* firstly, check if object can be included, by the following factors:
* - if only visible, must check for layer and also viewport visibility
@@ -2030,7 +2085,7 @@ static size_t animdata_filter_dopesheet (bAnimContext *ac, ListBase *anim_data,
*/
if ((filter_mode & ANIMFILTER_DATA_VISIBLE) && !(ads->filterflag & ADS_FILTER_INCL_HIDDEN)) {
/* layer visibility - we check both object and base, since these may not be in sync yet */
- if ((sce->lay & (ob->lay|base->lay))==0) continue;
+ if ((sce->lay & (ob->lay | base->lay)) == 0) continue;
/* outliner restrict-flag */
if (ob->restrictflag & OB_RESTRICT_VIEW) continue;
@@ -2069,9 +2124,9 @@ static size_t animdata_filter_dopesheet (bAnimContext *ac, ListBase *anim_data,
}
/* Summary track for DopeSheet/Action Editor
- * - return code is whether the summary lets the other channels get drawn
+ * - return code is whether the summary lets the other channels get drawn
*/
-static short animdata_filter_dopesheet_summary (bAnimContext *ac, ListBase *anim_data, int filter_mode, size_t *items)
+static short animdata_filter_dopesheet_summary(bAnimContext *ac, ListBase *anim_data, int filter_mode, size_t *items)
{
bDopeSheet *ads = NULL;
@@ -2081,8 +2136,8 @@ static short animdata_filter_dopesheet_summary (bAnimContext *ac, ListBase *anim
* being applicable.
*/
if ((ac && ac->sl) && (ac->spacetype == SPACE_ACTION)) {
- SpaceAction *saction= (SpaceAction *)ac->sl;
- ads= &saction->ads;
+ SpaceAction *saction = (SpaceAction *)ac->sl;
+ ads = &saction->ads;
}
else {
/* invalid space type - skip this summary channels */
@@ -2094,7 +2149,7 @@ static short animdata_filter_dopesheet_summary (bAnimContext *ac, ListBase *anim
* - only useful for DopeSheet/Action/etc. editors where it is actually useful
*/
if ((filter_mode & ANIMFILTER_LIST_CHANNELS) && (ads->filterflag & ADS_FILTER_SUMMARY)) {
- bAnimListElem *ale= make_new_animlistelem(ac, ANIMTYPE_SUMMARY, NULL);
+ bAnimListElem *ale = make_new_animlistelem(ac, ANIMTYPE_SUMMARY, NULL);
if (ale) {
BLI_addtail(anim_data, ale);
(*items)++;
@@ -2114,7 +2169,7 @@ static short animdata_filter_dopesheet_summary (bAnimContext *ac, ListBase *anim
/* ......................... */
/* filter data associated with a channel - usually for handling summary-channels in DopeSheet */
-static size_t animdata_filter_animchan (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, bAnimListElem *channel, int filter_mode)
+static size_t animdata_filter_animchan(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, bAnimListElem *channel, int filter_mode)
{
size_t items = 0;
@@ -2140,14 +2195,14 @@ static size_t animdata_filter_animchan (bAnimContext *ac, ListBase *anim_data, b
/* ----------- Cleanup API --------------- */
/* Remove entries with invalid types in animation channel list */
-static size_t animdata_filter_remove_invalid (ListBase *anim_data)
+static size_t animdata_filter_remove_invalid(ListBase *anim_data)
{
bAnimListElem *ale, *next;
size_t items = 0;
/* only keep entries with valid types */
- for (ale= anim_data->first; ale; ale= next) {
- next= ale->next;
+ for (ale = anim_data->first; ale; ale = next) {
+ next = ale->next;
if (ale->type == ANIMTYPE_NONE)
BLI_freelinkN(anim_data, ale);
@@ -2159,7 +2214,7 @@ static size_t animdata_filter_remove_invalid (ListBase *anim_data)
}
/* Remove duplicate entries in animation channel list */
-static size_t animdata_filter_remove_duplis (ListBase *anim_data)
+static size_t animdata_filter_remove_duplis(ListBase *anim_data)
{
bAnimListElem *ale, *next;
GHash *gh;
@@ -2168,7 +2223,7 @@ static size_t animdata_filter_remove_duplis (ListBase *anim_data)
/* build new hashtable to efficiently store and retrieve which entries have been
* encountered already while searching
*/
- gh= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "animdata_filter_duplis_remove gh");
+ gh = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "animdata_filter_duplis_remove gh");
/* loop through items, removing them from the list if a similar item occurs already */
for (ale = anim_data->first; ale; ale = next) {
@@ -2201,11 +2256,11 @@ static size_t animdata_filter_remove_duplis (ListBase *anim_data)
/* This function filters the active data source to leave only animation channels suitable for
* usage by the caller. It will return the length of the list
*
- * *anim_data: is a pointer to a ListBase, to which the filtered animation channels
+ * *anim_data: is a pointer to a ListBase, to which the filtered animation channels
* will be placed for use.
* filter_mode: how should the data be filtered - bitmapping accessed flags
*/
-size_t ANIM_animdata_filter (bAnimContext *ac, ListBase *anim_data, int filter_mode, void *data, short datatype)
+size_t ANIM_animdata_filter(bAnimContext *ac, ListBase *anim_data, int filter_mode, void *data, short datatype)
{
size_t items = 0;
@@ -2214,31 +2269,31 @@ size_t ANIM_animdata_filter (bAnimContext *ac, ListBase *anim_data, int filter_m
/* firstly filter the data */
switch (datatype) {
- case ANIMCONT_ACTION: /* 'Action Editor' */
+ case ANIMCONT_ACTION: /* 'Action Editor' */
{
- Object *obact= ac->obact;
+ Object *obact = ac->obact;
SpaceAction *saction = (SpaceAction *)ac->sl;
- bDopeSheet *ads = (saction)? &saction->ads : NULL;
+ bDopeSheet *ads = (saction) ? &saction->ads : NULL;
/* the check for the DopeSheet summary is included here since the summary works here too */
if (animdata_filter_dopesheet_summary(ac, anim_data, filter_mode, &items))
items += animfilter_action(ac, anim_data, ads, data, filter_mode, (ID *)obact);
}
- break;
+ break;
case ANIMCONT_SHAPEKEY: /* 'ShapeKey Editor' */
{
/* the check for the DopeSheet summary is included here since the summary works here too */
if (animdata_filter_dopesheet_summary(ac, anim_data, filter_mode, &items))
- items= animdata_filter_shapekey(ac, anim_data, data, filter_mode);
+ items = animdata_filter_shapekey(ac, anim_data, data, filter_mode);
}
- break;
+ break;
case ANIMCONT_GPENCIL:
{
- items= animdata_filter_gpencil(anim_data, data, filter_mode);
+ items = animdata_filter_gpencil(anim_data, data, filter_mode);
}
- break;
+ break;
case ANIMCONT_DOPESHEET: /* 'DopeSheet Editor' */
{
@@ -2246,7 +2301,7 @@ size_t ANIM_animdata_filter (bAnimContext *ac, ListBase *anim_data, int filter_m
if (animdata_filter_dopesheet_summary(ac, anim_data, filter_mode, &items))
items += animdata_filter_dopesheet(ac, anim_data, data, filter_mode);
}
- break;
+ break;
case ANIMCONT_FCURVES: /* Graph Editor -> FCurves/Animation Editing */
case ANIMCONT_DRIVERS: /* Graph Editor -> Drivers Editing */
@@ -2255,7 +2310,7 @@ size_t ANIM_animdata_filter (bAnimContext *ac, ListBase *anim_data, int filter_m
/* all of these editors use the basic DopeSheet data for filtering options, but don't have all the same features */
items = animdata_filter_dopesheet(ac, anim_data, data, filter_mode);
}
- break;
+ break;
case ANIMCONT_CHANNEL: /* animation channel */
{
@@ -2264,7 +2319,7 @@ size_t ANIM_animdata_filter (bAnimContext *ac, ListBase *anim_data, int filter_m
/* based on the channel type, filter relevant data for this */
items = animdata_filter_animchan(ac, anim_data, ads, data, filter_mode);
}
- break;
+ break;
}
/* remove any 'weedy' entries */
diff --git a/source/blender/editors/animation/anim_intern.h b/source/blender/editors/animation/anim_intern.h
index bfc70c79404..7d1209a3033 100644
--- a/source/blender/editors/animation/anim_intern.h
+++ b/source/blender/editors/animation/anim_intern.h
@@ -40,14 +40,14 @@ extern ListBase builtin_keyingsets;
/* Main Keyframe Management operators:
* These handle keyframes management from various spaces. They only make use of
- * Keying Sets.
+ * Keying Sets.
*/
void ANIM_OT_keyframe_insert(struct wmOperatorType *ot);
void ANIM_OT_keyframe_delete(struct wmOperatorType *ot);
/* Main Keyframe Management operators:
* These handle keyframes management from various spaces. They will handle the menus
- * required for each space.
+ * required for each space.
*/
void ANIM_OT_keyframe_insert_menu(struct wmOperatorType *ot);
void ANIM_OT_keyframe_delete_v3d(struct wmOperatorType *ot);
diff --git a/source/blender/editors/animation/anim_ipo_utils.c b/source/blender/editors/animation/anim_ipo_utils.c
index 6f4d4c4a431..593010fae09 100644
--- a/source/blender/editors/animation/anim_ipo_utils.c
+++ b/source/blender/editors/animation/anim_ipo_utils.c
@@ -78,9 +78,9 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
/* try to resolve the path */
if (RNA_path_resolve(&id_ptr, fcu->rna_path, &ptr, &prop)) {
- const char *structname=NULL, *propname=NULL;
+ const char *structname = NULL, *propname = NULL;
char arrayindbuf[16];
- const char *arrayname=NULL;
+ const char *arrayname = NULL;
short free_structname = 0;
/* For now, name will consist of 3 parts: struct-name, property name, array index
@@ -104,44 +104,44 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
*/
if (strstr(fcu->rna_path, "bones") && strstr(fcu->rna_path, "constraints")) {
/* perform string 'chopping' to get "Bone Name : Constraint Name" */
- char *pchanName= BLI_getQuotedStr(fcu->rna_path, "bones[");
- char *constName= BLI_getQuotedStr(fcu->rna_path, "constraints[");
+ char *pchanName = BLI_getQuotedStr(fcu->rna_path, "bones[");
+ char *constName = BLI_getQuotedStr(fcu->rna_path, "constraints[");
/* assemble the string to display in the UI... */
- structname= BLI_sprintfN("%s : %s", pchanName, constName);
- free_structname= 1;
+ structname = BLI_sprintfN("%s : %s", pchanName, constName);
+ free_structname = 1;
/* free the temp names */
if (pchanName) MEM_freeN(pchanName);
if (constName) MEM_freeN(constName);
}
else if (ptr.data != ptr.id.data) {
- PropertyRNA *nameprop= RNA_struct_name_property(ptr.type);
+ PropertyRNA *nameprop = RNA_struct_name_property(ptr.type);
if (nameprop) {
/* this gets a string which will need to be freed */
- structname= RNA_property_string_get_alloc(&ptr, nameprop, NULL, 0, NULL);
- free_structname= 1;
+ structname = RNA_property_string_get_alloc(&ptr, nameprop, NULL, 0, NULL);
+ free_structname = 1;
}
else
- structname= RNA_struct_ui_name(ptr.type);
+ structname = RNA_struct_ui_name(ptr.type);
}
/* Property Name is straightforward */
- propname= RNA_property_ui_name(prop);
+ propname = RNA_property_ui_name(prop);
/* Array Index - only if applicable */
if (RNA_property_array_length(&ptr, prop)) {
- char c= RNA_property_array_item_char(prop, fcu->array_index);
+ char c = RNA_property_array_item_char(prop, fcu->array_index);
/* we need to write the index to a temp buffer (in py syntax) */
if (c) BLI_snprintf(arrayindbuf, sizeof(arrayindbuf), "%c ", c);
else BLI_snprintf(arrayindbuf, sizeof(arrayindbuf), "[%d]", fcu->array_index);
- arrayname= &arrayindbuf[0];
+ arrayname = &arrayindbuf[0];
}
else {
/* no array index */
- arrayname= "";
+ arrayname = "";
}
/* putting this all together into the buffer */
@@ -160,7 +160,7 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
/* Icon for this property's owner:
* use the struct's icon if it is set
*/
- icon= RNA_struct_ui_icon(ptr.type);
+ icon = RNA_struct_ui_icon(ptr.type);
/* valid path - remove the invalid tag since we now know how to use it saving
* users manual effort to reenable using "Revive Disabled FCurves" [#29629]
@@ -173,7 +173,7 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
/* icon for this should be the icon for the base ID */
// TODO: or should we just use the error icon?
- icon= RNA_struct_ui_icon(id_ptr.type);
+ icon = RNA_struct_ui_icon(id_ptr.type);
/* tag F-Curve as disabled - as not usable path */
fcu->flag |= FCURVE_DISABLED;
@@ -187,11 +187,11 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
/* ------------------------------- Color Codes for F-Curve Channels ---------------------------- */
/* step between the major distinguishable color bands of the primary colors */
-#define HSV_BANDWIDTH 0.3f
+#define HSV_BANDWIDTH 0.3f
/* used to determine the color of F-Curves with FCURVE_COLOR_AUTO_RAINBOW set */
//void fcurve_rainbow (unsigned int cur, unsigned int tot, float *out)
-void getcolor_fcurve_rainbow (int cur, int tot, float *out)
+void getcolor_fcurve_rainbow(int cur, int tot, float *out)
{
float hue, val, sat, fac;
int grouping;
@@ -202,8 +202,8 @@ void getcolor_fcurve_rainbow (int cur, int tot, float *out)
* 4 - for 'even' numbers of curves - there should be a majority of quartets of curves
* so the base color is simply one of the three primary colors
*/
- grouping= (4 - (tot % 2));
- hue= HSV_BANDWIDTH * (float)(cur % grouping);
+ grouping = (4 - (tot % 2));
+ hue = HSV_BANDWIDTH * (float)(cur % grouping);
/* 'Value' (i.e. darkness) needs to vary so that larger sets of three will be
* 'darker' (i.e. smaller value), so that they don't look that similar to previous ones.
@@ -214,15 +214,15 @@ void getcolor_fcurve_rainbow (int cur, int tot, float *out)
/* the base color can get offset a bit so that the colors aren't so identical */
hue += fac * HSV_BANDWIDTH;
- if (hue > 1.0f) hue= fmod(hue, 1.0f);
+ if (hue > 1.0f) hue = fmod(hue, 1.0f);
/* saturation adjustments for more visible range */
- if ((hue > 0.5f) && (hue < 0.8f)) sat= 0.5f;
- else sat= 0.6f;
+ if ((hue > 0.5f) && (hue < 0.8f)) sat = 0.5f;
+ else sat = 0.6f;
/* value is fixed at 1.0f, otherwise we cannot clearly see the curves... */
- val= 1.0f;
+ val = 1.0f;
/* finally, conver this to RGB colors */
- hsv_to_rgb(hue, sat, val, out, out+1, out+2);
+ hsv_to_rgb(hue, sat, val, out, out + 1, out + 2);
}
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index 73dba91207f..ea344e7e332 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -81,7 +81,7 @@ static ListBase *context_get_markers(Scene *scene, ScrArea *sa)
SpaceAction *saction = (SpaceAction *)sa->spacedata.first;
/* local markers can only be shown when there's only a single active action to grab them from
- * - flag only takes effect when there's an action, otherwise it can get too confusing?
+ * - flag only takes effect when there's an action, otherwise it can get too confusing?
*/
if (ELEM(saction->mode, SACTCONT_ACTION, SACTCONT_SHAPEKEY) && (saction->action)) {
if (saction->flag & SACTION_POSEMARKERS_SHOW) {
@@ -121,7 +121,7 @@ ListBase *ED_animcontext_get_markers(const bAnimContext *ac)
* < value: from the transform code, this is t->vec[0] (which is delta transform for grab/extend, and scale factor for scale)
* < side: (B/L/R) for 'extend' functionality, which side of current frame to use
*/
-int ED_markers_post_apply_transform (ListBase *markers, Scene *scene, int mode, float value, char side)
+int ED_markers_post_apply_transform(ListBase *markers, Scene *scene, int mode, float value, char side)
{
TimeMarker *marker;
float cfra = (float)CFRA;
@@ -139,23 +139,23 @@ int ED_markers_post_apply_transform (ListBase *markers, Scene *scene, int mode,
case TFM_TIME_EXTEND:
{
/* apply delta if marker is on the right side of the current frame */
- if ((side=='B') ||
- (side=='L' && marker->frame < cfra) ||
- (side=='R' && marker->frame >= cfra))
+ if ((side == 'B') ||
+ (side == 'L' && marker->frame < cfra) ||
+ (side == 'R' && marker->frame >= cfra))
{
marker->frame += (int)floorf(value + 0.5f);
changed++;
}
}
- break;
+ break;
case TFM_TIME_SCALE:
{
/* rescale the distance between the marker and the current frame */
- marker->frame= cfra + (int)floorf(((float)(marker->frame - cfra) * value) + 0.5f);
+ marker->frame = cfra + (int)floorf(((float)(marker->frame - cfra) * value) + 0.5f);
changed++;
}
- break;
+ break;
}
}
}
@@ -167,18 +167,18 @@ int ED_markers_post_apply_transform (ListBase *markers, Scene *scene, int mode,
/* Get the marker that is closest to this point */
/* XXX for select, the min_dist should be small */
-TimeMarker *ED_markers_find_nearest_marker (ListBase *markers, float x)
+TimeMarker *ED_markers_find_nearest_marker(ListBase *markers, float x)
{
- TimeMarker *marker, *nearest=NULL;
- float dist, min_dist= 1000000;
+ TimeMarker *marker, *nearest = NULL;
+ float dist, min_dist = 1000000;
if (markers) {
- for (marker= markers->first; marker; marker= marker->next) {
+ for (marker = markers->first; marker; marker = marker->next) {
dist = ABS((float)marker->frame - x);
if (dist < min_dist) {
- min_dist= dist;
- nearest= marker;
+ min_dist = dist;
+ nearest = marker;
}
}
}
@@ -187,14 +187,14 @@ TimeMarker *ED_markers_find_nearest_marker (ListBase *markers, float x)
}
/* Return the time of the marker that occurs on a frame closest to the given time */
-int ED_markers_find_nearest_marker_time (ListBase *markers, float x)
+int ED_markers_find_nearest_marker_time(ListBase *markers, float x)
{
- TimeMarker *nearest= ED_markers_find_nearest_marker(markers, x);
+ TimeMarker *nearest = ED_markers_find_nearest_marker(markers, x);
return (nearest) ? (nearest->frame) : (int)floor(x + 0.5f);
}
-void ED_markers_get_minmax (ListBase *markers, short sel, float *first, float *last)
+void ED_markers_get_minmax(ListBase *markers, short sel, float *first, float *last)
{
TimeMarker *marker;
float min, max;
@@ -209,11 +209,11 @@ void ED_markers_get_minmax (ListBase *markers, short sel, float *first, float *l
}
if (markers->first && markers->last) {
- TimeMarker *fm= markers->first;
- TimeMarker *lm= markers->last;
+ TimeMarker *fm = markers->first;
+ TimeMarker *lm = markers->last;
- min= (float)fm->frame;
- max= (float)lm->frame;
+ min = (float)fm->frame;
+ max = (float)lm->frame;
}
else {
*first = 0.0f;
@@ -223,39 +223,39 @@ void ED_markers_get_minmax (ListBase *markers, short sel, float *first, float *l
/* count how many markers are usable - see later */
if (sel) {
- for (marker= markers->first; marker; marker= marker->next) {
+ for (marker = markers->first; marker; marker = marker->next) {
if (marker->flag & SELECT)
selcount++;
}
}
else
- selcount= BLI_countlist(markers);
+ selcount = BLI_countlist(markers);
/* if only selected are to be considered, only consider the selected ones
* (optimization for not searching list)
*/
if (selcount > 1) {
- for (marker= markers->first; marker; marker= marker->next) {
+ for (marker = markers->first; marker; marker = marker->next) {
if (sel) {
if (marker->flag & SELECT) {
if (marker->frame < min)
- min= (float)marker->frame;
+ min = (float)marker->frame;
if (marker->frame > max)
- max= (float)marker->frame;
+ max = (float)marker->frame;
}
}
else {
if (marker->frame < min)
- min= (float)marker->frame;
+ min = (float)marker->frame;
if (marker->frame > max)
- max= (float)marker->frame;
+ max = (float)marker->frame;
}
}
}
/* set the min/max values */
- *first= min;
- *last= max;
+ *first = min;
+ *last = max;
}
/* --------------------------------- */
@@ -266,26 +266,26 @@ static void add_marker_to_cfra_elem(ListBase *lb, TimeMarker *marker, short only
CfraElem *ce, *cen;
/* should this one only be considered if it is selected? */
- if ((only_sel) && ((marker->flag & SELECT)==0))
+ if ((only_sel) && ((marker->flag & SELECT) == 0))
return;
/* insertion sort - try to find a previous cfra elem */
- for (ce= lb->first; ce; ce= ce->next) {
+ for (ce = lb->first; ce; ce = ce->next) {
if (ce->cfra == marker->frame) {
/* do because of double keys */
if (marker->flag & SELECT)
- ce->sel= marker->flag;
+ ce->sel = marker->flag;
return;
}
else if (ce->cfra > marker->frame) break;
}
- cen= MEM_callocN(sizeof(CfraElem), "add_to_cfra_elem");
+ cen = MEM_callocN(sizeof(CfraElem), "add_to_cfra_elem");
if (ce) BLI_insertlinkbefore(lb, ce, cen);
else BLI_addtail(lb, cen);
- cen->cfra= marker->frame;
- cen->sel= marker->flag;
+ cen->cfra = marker->frame;
+ cen->sel = marker->flag;
}
/* This function makes a list of all the markers. The only_sel
@@ -299,7 +299,7 @@ void ED_markers_make_cfra_list(ListBase *markers, ListBase *lb, short only_sel)
if (markers == NULL)
return;
- for (marker= markers->first; marker; marker= marker->next)
+ for (marker = markers->first; marker; marker = marker->next)
add_marker_to_cfra_elem(lb, marker, only_sel);
}
@@ -349,15 +349,15 @@ void debug_markers_print_list(ListBase *markers)
static void draw_marker(View2D *v2d, TimeMarker *marker, int cfra, int flag)
{
float xpos, ypixels, xscale, yscale;
- int icon_id= 0;
+ int icon_id = 0;
xpos = marker->frame;
/* no time correction for framelen! space is drawn with old values */
- ypixels= v2d->mask.ymax-v2d->mask.ymin;
+ ypixels = v2d->mask.ymax - v2d->mask.ymin;
UI_view2d_getscale(v2d, &xscale, &yscale);
- glScalef(1.0f/xscale, 1.0f, 1.0f);
+ glScalef(1.0f / xscale, 1.0f, 1.0f);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
@@ -377,8 +377,8 @@ static void draw_marker(View2D *v2d, TimeMarker *marker, int cfra, int flag)
glColor4ub(0, 0, 0, 96);
glBegin(GL_LINES);
- glVertex2f((xpos*xscale)+0.5f, 12.0f);
- glVertex2f((xpos*xscale)+0.5f, (v2d->cur.ymax+12.0f)*yscale);
+ glVertex2f((xpos * xscale) + 0.5f, 12.0f);
+ glVertex2f((xpos * xscale) + 0.5f, (v2d->cur.ymax + 12.0f) * yscale);
glEnd();
setlinestyle(0);
@@ -386,16 +386,16 @@ static void draw_marker(View2D *v2d, TimeMarker *marker, int cfra, int flag)
/* 5 px to offset icon to align properly, space / pixels corrects for zoom */
if (flag & DRAW_MARKERS_LOCAL) {
- icon_id= (marker->flag & ACTIVE) ? ICON_PMARKER_ACT :
- (marker->flag & SELECT) ? ICON_PMARKER_SEL :
- ICON_PMARKER;
+ icon_id = (marker->flag & ACTIVE) ? ICON_PMARKER_ACT :
+ (marker->flag & SELECT) ? ICON_PMARKER_SEL :
+ ICON_PMARKER;
}
else {
- icon_id= (marker->flag & SELECT) ? ICON_MARKER_HLT :
- ICON_MARKER;
+ icon_id = (marker->flag & SELECT) ? ICON_MARKER_HLT :
+ ICON_MARKER;
}
- UI_icon_draw(xpos*xscale-5.0f, 16.0f, icon_id);
+ UI_icon_draw(xpos * xscale - 5.0f, 16.0f, icon_id);
glDisable(GL_BLEND);
@@ -405,18 +405,18 @@ static void draw_marker(View2D *v2d, TimeMarker *marker, int cfra, int flag)
if (marker->flag & SELECT) {
UI_ThemeColor(TH_TEXT_HI);
- x= xpos*xscale + 4.0f;
- y= (ypixels <= 39.0f)? (ypixels-10.0f) : 29.0f;
+ x = xpos * xscale + 4.0f;
+ y = (ypixels <= 39.0f) ? (ypixels - 10.0f) : 29.0f;
}
else {
UI_ThemeColor(TH_TEXT);
- if ((marker->frame <= cfra) && (marker->frame+5 > cfra)) {
- x= xpos*xscale + 4.0f;
- y= (ypixels <= 39.0f)? (ypixels - 10.0f) : 29.0f;
+ if ((marker->frame <= cfra) && (marker->frame + 5 > cfra)) {
+ x = xpos * xscale + 4.0f;
+ y = (ypixels <= 39.0f) ? (ypixels - 10.0f) : 29.0f;
}
else {
- x= xpos*xscale + 4.0f;
- y= 17.0f;
+ x = xpos * xscale + 4.0f;
+ y = 17.0f;
}
}
@@ -424,7 +424,7 @@ static void draw_marker(View2D *v2d, TimeMarker *marker, int cfra, int flag)
if (marker->camera && (marker->camera->restrictflag & OB_RESTRICT_RENDER)) {
float col[4];
glGetFloatv(GL_CURRENT_COLOR, col);
- col[3]= 0.4;
+ col[3] = 0.4;
glColor4fv(col);
}
#endif
@@ -438,7 +438,7 @@ static void draw_marker(View2D *v2d, TimeMarker *marker, int cfra, int flag)
/* Draw Scene-Markers in time window */
void draw_markers_time(const bContext *C, int flag)
{
- ListBase *markers= ED_context_get_markers(C);
+ ListBase *markers = ED_context_get_markers(C);
View2D *v2d;
TimeMarker *marker;
Scene *scene;
@@ -450,14 +450,14 @@ void draw_markers_time(const bContext *C, int flag)
v2d = UI_view2d_fromcontext(C);
/* unselected markers are drawn at the first time */
- for (marker= markers->first; marker; marker= marker->next) {
+ for (marker = markers->first; marker; marker = marker->next) {
if ((marker->flag & SELECT) == 0) {
draw_marker(v2d, marker, scene->r.cfra, flag);
}
}
/* selected markers are drawn later */
- for (marker= markers->first; marker; marker= marker->next) {
+ for (marker = markers->first; marker; marker = marker->next) {
if (marker->flag & SELECT) {
draw_marker(v2d, marker, scene->r.cfra, flag);
}
@@ -509,7 +509,7 @@ static int ed_markers_poll_markers_exist(bContext *C)
* exec() callback will be called instead in the appropriate places.
*/
static int ed_markers_opwrap_invoke_custom(bContext *C, wmOperator *op, wmEvent *evt,
- int (*invoke_func)(bContext*,wmOperator*,wmEvent*))
+ int (*invoke_func)(bContext *, wmOperator *, wmEvent *))
{
ScrArea *sa = CTX_wm_area(C);
int retval = OPERATOR_PASS_THROUGH;
@@ -549,32 +549,32 @@ static int ed_markers_opwrap_invoke(bContext *C, wmOperator *op, wmEvent *evt)
/* add TimeMarker at curent frame */
static int ed_marker_add(bContext *C, wmOperator *UNUSED(op))
{
- ListBase *markers= ED_context_get_markers(C);
+ ListBase *markers = ED_context_get_markers(C);
TimeMarker *marker;
- int frame= CTX_data_scene(C)->r.cfra;
+ int frame = CTX_data_scene(C)->r.cfra;
if (markers == NULL)
return OPERATOR_CANCELLED;
/* prefer not having 2 markers at the same place,
* though the user can move them to overlap once added */
- for (marker= markers->first; marker; marker= marker->next) {
+ for (marker = markers->first; marker; marker = marker->next) {
if (marker->frame == frame)
return OPERATOR_CANCELLED;
}
/* deselect all */
- for (marker= markers->first; marker; marker= marker->next)
+ for (marker = markers->first; marker; marker = marker->next)
marker->flag &= ~SELECT;
marker = MEM_callocN(sizeof(TimeMarker), "TimeMarker");
- marker->flag= SELECT;
- marker->frame= frame;
+ marker->flag = SELECT;
+ marker->frame = frame;
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);
- WM_event_add_notifier(C, NC_ANIMATION|ND_MARKERS, NULL);
+ WM_event_add_notifier(C, NC_SCENE | ND_MARKERS, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_MARKERS, NULL);
return OPERATOR_FINISHED;
}
@@ -592,7 +592,7 @@ static void MARKER_OT_add(wmOperatorType *ot)
ot->poll = ED_operator_animview_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ************************** transform markers *************************** */
@@ -623,7 +623,7 @@ static void MARKER_OT_add(wmOperatorType *ot)
typedef struct MarkerMove {
SpaceLink *slink;
ListBase *markers;
- int event_type; /* store invoke-event, to verify */
+ int event_type; /* store invoke-event, to verify */
int *oldframe, evtx, firstx;
NumInput num;
} MarkerMove;
@@ -632,32 +632,32 @@ typedef struct MarkerMove {
/* return 0 if not OK */
static int ed_marker_move_init(bContext *C, wmOperator *op)
{
- ListBase *markers= ED_context_get_markers(C);
+ ListBase *markers = ED_context_get_markers(C);
MarkerMove *mm;
TimeMarker *marker;
- int totmark=0;
+ int totmark = 0;
int a;
if (markers == NULL) return 0;
- for (marker= markers->first; marker; marker= marker->next)
+ for (marker = markers->first; marker; marker = marker->next)
if (marker->flag & SELECT) totmark++;
- if (totmark==0) return 0;
+ if (totmark == 0) return 0;
- op->customdata= mm= MEM_callocN(sizeof(MarkerMove), "Markermove");
- mm->slink= CTX_wm_space_data(C);
- mm->markers= markers;
- mm->oldframe= MEM_callocN(totmark*sizeof(int), "MarkerMove oldframe");
+ op->customdata = mm = MEM_callocN(sizeof(MarkerMove), "Markermove");
+ mm->slink = CTX_wm_space_data(C);
+ mm->markers = markers;
+ mm->oldframe = MEM_callocN(totmark * sizeof(int), "MarkerMove oldframe");
initNumInput(&mm->num);
mm->num.idx_max = 0; /* one axis */
mm->num.flag |= NUM_NO_FRACTION;
mm->num.increment = 1.0f;
- for (a=0, marker= markers->first; marker; marker= marker->next) {
+ for (a = 0, marker = markers->first; marker; marker = marker->next) {
if (marker->flag & SELECT) {
- mm->oldframe[a]= marker->frame;
+ mm->oldframe[a] = marker->frame;
a++;
}
}
@@ -668,12 +668,12 @@ static int ed_marker_move_init(bContext *C, wmOperator *op)
/* free stuff */
static void ed_marker_move_exit(bContext *C, wmOperator *op)
{
- MarkerMove *mm= op->customdata;
+ MarkerMove *mm = op->customdata;
/* free data */
MEM_freeN(mm->oldframe);
MEM_freeN(op->customdata);
- op->customdata= NULL;
+ op->customdata = NULL;
/* clear custom header prints */
ED_area_headerprint(CTX_wm_area(C), NULL);
@@ -682,11 +682,11 @@ static void ed_marker_move_exit(bContext *C, wmOperator *op)
static int ed_marker_move_invoke(bContext *C, wmOperator *op, wmEvent *evt)
{
if (ed_marker_move_init(C, op)) {
- MarkerMove *mm= op->customdata;
+ MarkerMove *mm = op->customdata;
- mm->evtx= evt->x;
- mm->firstx= evt->x;
- mm->event_type= evt->type;
+ mm->evtx = evt->x;
+ mm->firstx = evt->x;
+ mm->event_type = evt->type;
/* add temp handler */
WM_event_add_modal_handler(C, op);
@@ -708,14 +708,14 @@ static int ed_marker_move_invoke_wrapper(bContext *C, wmOperator *op, wmEvent *e
/* note, init has to be called succesfully */
static void ed_marker_move_apply(wmOperator *op)
{
- MarkerMove *mm= op->customdata;
+ MarkerMove *mm = op->customdata;
TimeMarker *marker;
int a, offs;
- offs= RNA_int_get(op->ptr, "frames");
- for (a=0, marker= mm->markers->first; marker; marker= marker->next) {
+ offs = RNA_int_get(op->ptr, "frames");
+ for (a = 0, marker = mm->markers->first; marker; marker = marker->next) {
if (marker->flag & SELECT) {
- marker->frame= mm->oldframe[a] + offs;
+ marker->frame = mm->oldframe[a] + offs;
a++;
}
}
@@ -728,8 +728,8 @@ static int ed_marker_move_cancel(bContext *C, wmOperator *op)
ed_marker_move_apply(op);
ed_marker_move_exit(C, op);
- WM_event_add_notifier(C, NC_SCENE|ND_MARKERS, NULL);
- WM_event_add_notifier(C, NC_ANIMATION|ND_MARKERS, NULL);
+ WM_event_add_notifier(C, NC_SCENE | ND_MARKERS, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_MARKERS, NULL);
return OPERATOR_CANCELLED;
}
@@ -738,14 +738,14 @@ static int ed_marker_move_cancel(bContext *C, wmOperator *op)
static int ed_marker_move_modal(bContext *C, wmOperator *op, wmEvent *evt)
{
- Scene *scene= CTX_data_scene(C);
- MarkerMove *mm= op->customdata;
- View2D *v2d= UI_view2d_fromcontext(C);
- TimeMarker *marker, *selmarker=NULL;
+ Scene *scene = CTX_data_scene(C);
+ MarkerMove *mm = op->customdata;
+ View2D *v2d = UI_view2d_fromcontext(C);
+ TimeMarker *marker, *selmarker = NULL;
float dx, fac;
char str[256];
- switch(evt->type) {
+ switch (evt->type) {
case ESCKEY:
ed_marker_move_cancel(C, op);
return OPERATOR_CANCELLED;
@@ -756,7 +756,7 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, wmEvent *evt)
ed_marker_move_cancel(C, op);
return OPERATOR_CANCELLED;
}
- /* else continue; <--- see if release event should be caught for tweak-end */
+ /* else continue; <--- see if release event should be caught for tweak-end */
case RETKEY:
case PADENTER:
@@ -764,8 +764,8 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, wmEvent *evt)
case MIDDLEMOUSE:
if (WM_modal_tweak_exit(evt, mm->event_type)) {
ed_marker_move_exit(C, op);
- WM_event_add_notifier(C, NC_SCENE|ND_MARKERS, NULL);
- WM_event_add_notifier(C, NC_ANIMATION|ND_MARKERS, NULL);
+ WM_event_add_notifier(C, NC_SCENE | ND_MARKERS, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_MARKERS, NULL);
return OPERATOR_FINISHED;
}
break;
@@ -773,44 +773,44 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, wmEvent *evt)
if (hasNumInput(&mm->num))
break;
- dx= v2d->mask.xmax-v2d->mask.xmin;
- dx= (v2d->cur.xmax-v2d->cur.xmin)/dx;
+ dx = v2d->mask.xmax - v2d->mask.xmin;
+ dx = (v2d->cur.xmax - v2d->cur.xmin) / dx;
- if (evt->x != mm->evtx) { /* XXX maybe init for firsttime */
- int a, offs, totmark=0;
+ if (evt->x != mm->evtx) { /* XXX maybe init for first time */
+ int a, offs, totmark = 0;
- mm->evtx= evt->x;
+ mm->evtx = evt->x;
- fac= ((float)(evt->x - mm->firstx)*dx);
+ fac = ((float)(evt->x - mm->firstx) * dx);
if (mm->slink->spacetype == SPACE_TIME)
- apply_keyb_grid(evt->shift, evt->ctrl, &fac, 0.0, FPS, 0.1*FPS, 0);
+ apply_keyb_grid(evt->shift, evt->ctrl, &fac, 0.0, FPS, 0.1 * FPS, 0);
else
apply_keyb_grid(evt->shift, evt->ctrl, &fac, 0.0, 1.0, 0.1, 0 /*was: U.flag & USER_AUTOGRABGRID*/);
- offs= (int)fac;
+ offs = (int)fac;
RNA_int_set(op->ptr, "frames", offs);
ed_marker_move_apply(op);
/* cruft below is for header print */
- for (a=0, marker= mm->markers->first; marker; marker= marker->next) {
+ for (a = 0, marker = mm->markers->first; marker; marker = marker->next) {
if (marker->flag & SELECT) {
- selmarker= marker;
+ selmarker = marker;
a++; totmark++;
}
}
- if (totmark==1) {
+ if (totmark == 1) {
/* we print current marker value */
if (mm->slink->spacetype == SPACE_TIME) {
- SpaceTime *stime= (SpaceTime *)mm->slink;
+ SpaceTime *stime = (SpaceTime *)mm->slink;
if (stime->flag & TIME_DRAWFRAMES)
BLI_snprintf(str, sizeof(str), "Marker %d offset %d", selmarker->frame, offs);
else
BLI_snprintf(str, sizeof(str), "Marker %.2f offset %.2f", FRA2TIME(selmarker->frame), FRA2TIME(offs));
}
else if (mm->slink->spacetype == SPACE_ACTION) {
- SpaceAction *saction= (SpaceAction *)mm->slink;
+ SpaceAction *saction = (SpaceAction *)mm->slink;
if (saction->flag & SACTION_DRAWTIME)
BLI_snprintf(str, sizeof(str), "Marker %.2f offset %.2f", FRA2TIME(selmarker->frame), FRA2TIME(offs));
else
@@ -823,14 +823,14 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, wmEvent *evt)
else {
/* we only print the offset */
if (mm->slink->spacetype == SPACE_TIME) {
- SpaceTime *stime= (SpaceTime *)mm->slink;
+ SpaceTime *stime = (SpaceTime *)mm->slink;
if (stime->flag & TIME_DRAWFRAMES)
BLI_snprintf(str, sizeof(str), "Marker offset %d ", offs);
else
BLI_snprintf(str, sizeof(str), "Marker offset %.2f ", FRA2TIME(offs));
}
else if (mm->slink->spacetype == SPACE_ACTION) {
- SpaceAction *saction= (SpaceAction *)mm->slink;
+ SpaceAction *saction = (SpaceAction *)mm->slink;
if (saction->flag & SACTION_DRAWTIME)
BLI_snprintf(str, sizeof(str), "Marker offset %.2f ", FRA2TIME(offs));
else
@@ -841,13 +841,13 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, wmEvent *evt)
}
}
- WM_event_add_notifier(C, NC_SCENE|ND_MARKERS, NULL);
- WM_event_add_notifier(C, NC_ANIMATION|ND_MARKERS, NULL);
+ WM_event_add_notifier(C, NC_SCENE | ND_MARKERS, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_MARKERS, NULL);
ED_area_headerprint(CTX_wm_area(C), str);
}
}
- if (evt->val==KM_PRESS) {
+ if (evt->val == KM_PRESS) {
float vec[3];
char str_tx[256];
@@ -862,8 +862,8 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, wmEvent *evt)
BLI_snprintf(str, sizeof(str), "Marker offset %s", str_tx);
ED_area_headerprint(CTX_wm_area(C), str);
- WM_event_add_notifier(C, NC_SCENE|ND_MARKERS, NULL);
- WM_event_add_notifier(C, NC_ANIMATION|ND_MARKERS, NULL);
+ WM_event_add_notifier(C, NC_SCENE | ND_MARKERS, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_MARKERS, NULL);
}
}
@@ -895,7 +895,7 @@ static void MARKER_OT_move(wmOperatorType *ot)
ot->cancel = ed_marker_move_cancel;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING | OPTYPE_GRAB_POINTER;
/* rna storage */
RNA_def_int(ot->srna, "frames", 0, INT_MIN, INT_MAX, "Frames", "", INT_MIN, INT_MAX);
@@ -922,7 +922,7 @@ static void MARKER_OT_move(wmOperatorType *ot)
/* duplicate selected TimeMarkers */
static void ed_marker_duplicate_apply(bContext *C)
{
- ListBase *markers= ED_context_get_markers(C);
+ ListBase *markers = ED_context_get_markers(C);
TimeMarker *marker, *newmarker;
if (markers == NULL)
@@ -931,19 +931,19 @@ static void ed_marker_duplicate_apply(bContext *C)
/* go through the list of markers, duplicate selected markers and add duplicated copies
* to the beginning of the list (unselect original markers)
*/
- for (marker= markers->first; marker; marker= marker->next) {
+ for (marker = markers->first; marker; marker = marker->next) {
if (marker->flag & SELECT) {
/* unselect selected marker */
marker->flag &= ~SELECT;
/* create and set up new marker */
newmarker = MEM_callocN(sizeof(TimeMarker), "TimeMarker");
- newmarker->flag= SELECT;
- newmarker->frame= marker->frame;
+ newmarker->flag = SELECT;
+ newmarker->frame = marker->frame;
BLI_strncpy(newmarker->name, marker->name, sizeof(marker->name));
#ifdef DURIAN_CAMERA_SWITCH
- newmarker->camera= marker->camera;
+ newmarker->camera = marker->camera;
#endif
/* new marker is added to the beginning of list */
@@ -956,7 +956,7 @@ static void ed_marker_duplicate_apply(bContext *C)
static int ed_marker_duplicate_exec(bContext *C, wmOperator *op)
{
ed_marker_duplicate_apply(C);
- ed_marker_move_exec(C, op); /* assumes frs delta set */
+ ed_marker_move_exec(C, op); /* assumes frs delta set */
return OPERATOR_FINISHED;
@@ -988,7 +988,7 @@ static void MARKER_OT_duplicate(wmOperatorType *ot)
ot->cancel = ed_marker_move_cancel;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* rna storage */
RNA_def_int(ot->srna, "frames", 0, INT_MIN, INT_MAX, "Frames", "", INT_MIN, INT_MAX);
@@ -1000,9 +1000,9 @@ static void MARKER_OT_duplicate(wmOperatorType *ot)
static void select_timeline_marker_frame(ListBase *markers, int frame, unsigned char shift)
{
TimeMarker *marker;
- int select=0;
+ int select = 0;
- for (marker= markers->first; marker; marker= marker->next) {
+ for (marker = markers->first; marker; marker = marker->next) {
/* if Shift is not set, then deselect Markers */
if (!shift) marker->flag &= ~SELECT;
@@ -1019,20 +1019,20 @@ static void select_timeline_marker_frame(ListBase *markers, int frame, unsigned
static int ed_marker_select(bContext *C, wmEvent *evt, int extend, int camera)
{
- ListBase *markers= ED_context_get_markers(C);
- View2D *v2d= UI_view2d_fromcontext(C);
+ ListBase *markers = ED_context_get_markers(C);
+ View2D *v2d = UI_view2d_fromcontext(C);
float viewx;
int x, y, cfra;
if (markers == NULL)
return OPERATOR_PASS_THROUGH;
- x= evt->x - CTX_wm_region(C)->winrct.xmin;
- y= evt->y - CTX_wm_region(C)->winrct.ymin;
+ x = evt->x - CTX_wm_region(C)->winrct.xmin;
+ y = evt->y - CTX_wm_region(C)->winrct.ymin;
UI_view2d_region_to_view(v2d, x, y, &viewx, NULL);
- cfra= ED_markers_find_nearest_marker_time(markers, viewx);
+ cfra = ED_markers_find_nearest_marker_time(markers, viewx);
if (extend)
select_timeline_marker_frame(markers, cfra, 1);
@@ -1042,25 +1042,25 @@ static int ed_marker_select(bContext *C, wmEvent *evt, int extend, int camera)
#ifdef DURIAN_CAMERA_SWITCH
if (camera) {
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
Base *base;
TimeMarker *marker;
- int sel= 0;
+ int sel = 0;
if (!extend)
- scene_deselect_all(scene);
+ BKE_scene_base_deselect_all(scene);
- for (marker= markers->first; marker; marker= marker->next) {
- if (marker->frame==cfra) {
- sel= (marker->flag & SELECT);
+ for (marker = markers->first; marker; marker = marker->next) {
+ if (marker->frame == cfra) {
+ sel = (marker->flag & SELECT);
break;
}
}
- for (marker= markers->first; marker; marker= marker->next) {
+ for (marker = markers->first; marker; marker = marker->next) {
if (marker->camera) {
- if (marker->frame==cfra) {
- base= object_in_scene(marker->camera, scene);
+ if (marker->frame == cfra) {
+ base = BKE_scene_base_find(scene, marker->camera);
if (base) {
ED_base_object_select(base, sel);
if (sel)
@@ -1070,25 +1070,25 @@ static int ed_marker_select(bContext *C, wmEvent *evt, int extend, int camera)
}
}
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
}
#else
(void)camera;
#endif
- WM_event_add_notifier(C, NC_SCENE|ND_MARKERS, NULL);
- WM_event_add_notifier(C, NC_ANIMATION|ND_MARKERS, NULL);
+ WM_event_add_notifier(C, NC_SCENE | ND_MARKERS, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_MARKERS, NULL);
/* allowing tweaks, but needs OPERATOR_FINISHED, otherwise renaming fails... [#25987] */
- return OPERATOR_FINISHED|OPERATOR_PASS_THROUGH;
+ return OPERATOR_FINISHED | OPERATOR_PASS_THROUGH;
}
static int ed_marker_select_invoke(bContext *C, wmOperator *op, wmEvent *evt)
{
- short extend= RNA_boolean_get(op->ptr, "extend");
- short camera= 0;
+ short extend = RNA_boolean_get(op->ptr, "extend");
+ short camera = 0;
#ifdef DURIAN_CAMERA_SWITCH
- camera= RNA_boolean_get(op->ptr, "camera");
+ camera = RNA_boolean_get(op->ptr, "camera");
#endif
return ed_marker_select(C, evt, extend, camera);
}
@@ -1110,7 +1110,7 @@ static void MARKER_OT_select(wmOperatorType *ot)
ot->poll = ed_markers_poll_markers_exist;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend the selection");
#ifdef DURIAN_CAMERA_SWITCH
@@ -1128,29 +1128,29 @@ static void MARKER_OT_select(wmOperatorType *ot)
*
* callbacks:
*
- * exec() has to be filled in by user
+ * exec() has to be filled in by user
*
- * invoke() default WM function
- * adds modal handler
+ * invoke() default WM function
+ * adds modal handler
*
- * modal() default WM function
- * accept modal events while doing it, calls exec(), handles ESC and border drawing
+ * modal() default WM function
+ * accept modal events while doing it, calls exec(), handles ESC and border drawing
*
- * poll() has to be filled in by user for context
+ * poll() has to be filled in by user for context
*/
static int ed_marker_border_select_exec(bContext *C, wmOperator *op)
{
- View2D *v2d= UI_view2d_fromcontext(C);
- ListBase *markers= ED_context_get_markers(C);
+ View2D *v2d = UI_view2d_fromcontext(C);
+ ListBase *markers = ED_context_get_markers(C);
TimeMarker *marker;
float xminf, xmaxf, yminf, ymaxf;
- int gesture_mode= RNA_int_get(op->ptr, "gesture_mode");
- int xmin= RNA_int_get(op->ptr, "xmin");
- int xmax= RNA_int_get(op->ptr, "xmax");
- int ymin= RNA_int_get(op->ptr, "ymin");
- int ymax= RNA_int_get(op->ptr, "ymax");
- int extend= RNA_boolean_get(op->ptr, "extend");
+ int gesture_mode = RNA_int_get(op->ptr, "gesture_mode");
+ int xmin = RNA_int_get(op->ptr, "xmin");
+ int xmax = RNA_int_get(op->ptr, "xmax");
+ int ymin = RNA_int_get(op->ptr, "ymin");
+ int ymax = RNA_int_get(op->ptr, "ymax");
+ int extend = RNA_boolean_get(op->ptr, "extend");
UI_view2d_region_to_view(v2d, xmin, ymin, &xminf, &yminf);
UI_view2d_region_to_view(v2d, xmax, ymax, &xmaxf, &ymaxf);
@@ -1159,7 +1159,7 @@ static int ed_marker_border_select_exec(bContext *C, wmOperator *op)
return 0;
/* XXX marker context */
- for (marker= markers->first; marker; marker= marker->next) {
+ for (marker = markers->first; marker; marker = marker->next) {
if ((marker->frame > xminf) && (marker->frame <= xmaxf)) {
switch (gesture_mode) {
case GESTURE_MODAL_SELECT:
@@ -1175,8 +1175,8 @@ static int ed_marker_border_select_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_SCENE|ND_MARKERS, NULL);
- WM_event_add_notifier(C, NC_ANIMATION|ND_MARKERS, NULL);
+ WM_event_add_notifier(C, NC_SCENE | ND_MARKERS, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_MARKERS, NULL);
return 1;
}
@@ -1202,7 +1202,7 @@ static void MARKER_OT_select_border(wmOperatorType *ot)
ot->poll = ed_markers_poll_markers_exist;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* rna */
WM_operator_properties_gesture_border(ot, TRUE);
@@ -1212,7 +1212,7 @@ static void MARKER_OT_select_border(wmOperatorType *ot)
static int ed_marker_select_all_exec(bContext *C, wmOperator *op)
{
- ListBase *markers= ED_context_get_markers(C);
+ ListBase *markers = ED_context_get_markers(C);
TimeMarker *marker;
int action = RNA_enum_get(op->ptr, "action");
@@ -1223,22 +1223,22 @@ static int ed_marker_select_all_exec(bContext *C, wmOperator *op)
action = (ED_markers_get_first_selected(markers) != NULL) ? SEL_DESELECT : SEL_SELECT;
}
- for (marker= markers->first; marker; marker= marker->next) {
+ for (marker = markers->first; marker; marker = marker->next) {
switch (action) {
- case SEL_SELECT:
- marker->flag |= SELECT;
- break;
- case SEL_DESELECT:
- marker->flag &= ~SELECT;
- break;
- case SEL_INVERT:
- marker->flag ^= SELECT;
- break;
+ case SEL_SELECT:
+ marker->flag |= SELECT;
+ break;
+ case SEL_DESELECT:
+ marker->flag &= ~SELECT;
+ break;
+ case SEL_INVERT:
+ marker->flag ^= SELECT;
+ break;
}
}
- WM_event_add_notifier(C, NC_SCENE|ND_MARKERS, NULL);
- WM_event_add_notifier(C, NC_ANIMATION|ND_MARKERS, NULL);
+ WM_event_add_notifier(C, NC_SCENE | ND_MARKERS, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_MARKERS, NULL);
return OPERATOR_FINISHED;
}
@@ -1256,7 +1256,7 @@ static void MARKER_OT_select_all(wmOperatorType *ot)
ot->poll = ed_markers_poll_markers_exist;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* rna */
WM_operator_properties_select_all(ot);
@@ -1267,24 +1267,24 @@ static void MARKER_OT_select_all(wmOperatorType *ot)
/* remove selected TimeMarkers */
static int ed_marker_delete_exec(bContext *C, wmOperator *UNUSED(op))
{
- ListBase *markers= ED_context_get_markers(C);
+ ListBase *markers = ED_context_get_markers(C);
TimeMarker *marker, *nmarker;
- short changed= 0;
+ short changed = 0;
if (markers == NULL)
return OPERATOR_CANCELLED;
- for (marker= markers->first; marker; marker= nmarker) {
- nmarker= marker->next;
+ for (marker = markers->first; marker; marker = nmarker) {
+ nmarker = marker->next;
if (marker->flag & SELECT) {
BLI_freelinkN(markers, marker);
- changed= 1;
+ changed = 1;
}
}
if (changed) {
- WM_event_add_notifier(C, NC_SCENE|ND_MARKERS, NULL);
- WM_event_add_notifier(C, NC_ANIMATION|ND_MARKERS, NULL);
+ WM_event_add_notifier(C, NC_SCENE | ND_MARKERS, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_MARKERS, NULL);
}
return OPERATOR_FINISHED;
@@ -1309,7 +1309,7 @@ static void MARKER_OT_delete(wmOperatorType *ot)
ot->poll = ed_markers_poll_selected_markers;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
@@ -1318,13 +1318,13 @@ static void MARKER_OT_delete(wmOperatorType *ot)
/* rename first selected TimeMarker */
static int ed_marker_rename_exec(bContext *C, wmOperator *op)
{
- TimeMarker *marker= ED_markers_get_first_selected(ED_context_get_markers(C));
+ TimeMarker *marker = ED_markers_get_first_selected(ED_context_get_markers(C));
if (marker) {
RNA_string_get(op->ptr, "name", marker->name);
- WM_event_add_notifier(C, NC_SCENE|ND_MARKERS, NULL);
- WM_event_add_notifier(C, NC_ANIMATION|ND_MARKERS, NULL);
+ WM_event_add_notifier(C, NC_SCENE | ND_MARKERS, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_MARKERS, NULL);
return OPERATOR_FINISHED;
}
@@ -1357,7 +1357,7 @@ static void MARKER_OT_rename(wmOperatorType *ot)
ot->poll = ed_markers_poll_selected_markers;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
ot->prop = RNA_def_string(ot->srna, "name", "RenamedMarker", sizeof(((TimeMarker *)NULL)->name), "Name", "New name for marker");
@@ -1368,11 +1368,11 @@ static void MARKER_OT_rename(wmOperatorType *ot)
static int ed_marker_make_links_scene_exec(bContext *C, wmOperator *op)
{
- ListBase *markers= ED_context_get_markers(C);
- Scene *scene_to= BLI_findlink(&CTX_data_main(C)->scene, RNA_enum_get(op->ptr, "scene"));
+ ListBase *markers = ED_context_get_markers(C);
+ Scene *scene_to = BLI_findlink(&CTX_data_main(C)->scene, RNA_enum_get(op->ptr, "scene"));
TimeMarker *marker, *marker_new;
- if (scene_to==NULL) {
+ if (scene_to == NULL) {
BKE_report(op->reports, RPT_ERROR, "Scene not found");
return OPERATOR_CANCELLED;
}
@@ -1383,10 +1383,10 @@ static int ed_marker_make_links_scene_exec(bContext *C, wmOperator *op)
}
/* copy markers */
- for (marker= markers->first; marker; marker= marker->next) {
+ for (marker = markers->first; marker; marker = marker->next) {
if (marker->flag & SELECT) {
- marker_new= MEM_dupallocN(marker);
- marker_new->prev= marker_new->next = NULL;
+ marker_new = MEM_dupallocN(marker);
+ marker_new->prev = marker_new->next = NULL;
BLI_addtail(&scene_to->markers, marker_new);
}
@@ -1410,10 +1410,10 @@ static void MARKER_OT_make_links_scene(wmOperatorType *ot)
ot->poll = ed_markers_poll_selected_markers;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
- prop= RNA_def_enum(ot->srna, "scene", DummyRNA_NULL_items, 0, "Scene", "");
+ prop = RNA_def_enum(ot->srna, "scene", DummyRNA_NULL_items, 0, "Scene", "");
RNA_def_enum_funcs(prop, RNA_scene_itemf);
ot->prop = prop;
@@ -1424,25 +1424,25 @@ static void MARKER_OT_make_links_scene(wmOperatorType *ot)
static int ed_marker_camera_bind_exec(bContext *C, wmOperator *UNUSED(op))
{
- bScreen *sc= CTX_wm_screen(C);
- Scene *scene= CTX_data_scene(C);
+ bScreen *sc = CTX_wm_screen(C);
+ Scene *scene = CTX_data_scene(C);
Object *ob = CTX_data_active_object(C);
- ListBase *markers= ED_context_get_markers(C);
+ ListBase *markers = ED_context_get_markers(C);
TimeMarker *marker;
- marker= ED_markers_get_first_selected(markers);
+ marker = ED_markers_get_first_selected(markers);
if (marker == NULL)
return OPERATOR_CANCELLED;
- marker->camera= ob;
+ marker->camera = ob;
/* camera may have changes */
- scene_camera_switch_update(scene);
+ BKE_scene_camera_switch_update(scene);
BKE_screen_view3d_scene_sync(sc);
- WM_event_add_notifier(C, NC_SCENE|ND_MARKERS, NULL);
- WM_event_add_notifier(C, NC_ANIMATION|ND_MARKERS, NULL);
- WM_event_add_notifier(C, NC_SCENE|NA_EDITED, scene); /* so we get view3d redraws */
+ WM_event_add_notifier(C, NC_SCENE | ND_MARKERS, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_MARKERS, NULL);
+ WM_event_add_notifier(C, NC_SCENE | NA_EDITED, scene); /* so we get view3d redraws */
return OPERATOR_FINISHED;
}
@@ -1460,7 +1460,7 @@ static void MARKER_OT_camera_bind(wmOperatorType *ot)
ot->poll = ed_markers_poll_selected_markers;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
#endif
@@ -1501,7 +1501,7 @@ void ED_marker_keymap(wmKeyConfig *keyconf)
RNA_boolean_set(kmi->ptr, "extend", FALSE);
RNA_boolean_set(kmi->ptr, "camera", TRUE);
- kmi = WM_keymap_add_item(keymap, "MARKER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
+ kmi = WM_keymap_add_item(keymap, "MARKER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_CTRL, 0);
RNA_boolean_set(kmi->ptr, "extend", TRUE);
RNA_boolean_set(kmi->ptr, "camera", TRUE);
#else
diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c
index 8286e81b792..119df33dd91 100644
--- a/source/blender/editors/animation/anim_ops.c
+++ b/source/blender/editors/animation/anim_ops.c
@@ -62,7 +62,7 @@
/* Check if the operator can be run from the current context */
static int change_frame_poll(bContext *C)
{
- ScrArea *curarea= CTX_wm_area(C);
+ ScrArea *curarea = CTX_wm_area(C);
/* XXX temp? prevent changes during render */
if (G.rendering) return 0;
@@ -77,17 +77,17 @@ static int change_frame_poll(bContext *C)
/* Set the new frame number */
static void change_frame_apply(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
/* set the new frame number */
- CFRA= RNA_int_get(op->ptr, "frame");
+ CFRA = RNA_int_get(op->ptr, "frame");
FRAMENUMBER_MIN_CLAMP(CFRA);
SUBFRA = 0.f;
/* do updates */
sound_seek_scene(bmain, scene);
- WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene);
}
/* ---- */
@@ -105,14 +105,14 @@ static int change_frame_exec(bContext *C, wmOperator *op)
/* Get frame from mouse coordinates */
static int frame_from_event(bContext *C, wmEvent *event)
{
- ARegion *region= CTX_wm_region(C);
+ ARegion *region = CTX_wm_region(C);
float viewx;
/* convert from region coordinates to View2D 'tot' space */
UI_view2d_region_to_view(&region->v2d, event->mval[0], event->mval[1], &viewx, NULL);
/* round result to nearest int (frames are ints!) */
- return (int)floor(viewx+0.5f);
+ return (int)floor(viewx + 0.5f);
}
/* Modal Operator init */
@@ -150,7 +150,7 @@ static int change_frame_modal(bContext *C, wmOperator *op, wmEvent *event)
/* we check for either mouse-button to end, as checking for ACTIONMOUSE (which is used to init
* the modal op) doesn't work for some reason
*/
- if (event->val==KM_RELEASE)
+ if (event->val == KM_RELEASE)
return OPERATOR_FINISHED;
break;
}
@@ -172,7 +172,7 @@ static void ANIM_OT_change_frame(wmOperatorType *ot)
ot->poll = change_frame_poll;
/* flags */
- ot->flag = OPTYPE_BLOCKING|OPTYPE_UNDO;
+ ot->flag = OPTYPE_BLOCKING | OPTYPE_UNDO;
/* rna */
RNA_def_int(ot->srna, "frame", 0, MINAFRAME, MAXFRAME, "Frame", "", MINAFRAME, MAXFRAME);
@@ -182,14 +182,14 @@ static void ANIM_OT_change_frame(wmOperatorType *ot)
static int previewrange_define_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
- ARegion *ar= CTX_wm_region(C);
+ Scene *scene = CTX_data_scene(C);
+ ARegion *ar = CTX_wm_region(C);
float sfra, efra;
int xmin, xmax;
/* get min/max values from border select rect (already in region coordinates, not screen) */
- xmin= RNA_int_get(op->ptr, "xmin");
- xmax= RNA_int_get(op->ptr, "xmax");
+ xmin = RNA_int_get(op->ptr, "xmin");
+ xmax = RNA_int_get(op->ptr, "xmax");
/* convert min/max values to frames (i.e. region to 'tot' rect) */
UI_view2d_region_to_view(&ar->v2d, xmin, 0, &sfra, NULL);
@@ -201,14 +201,14 @@ static int previewrange_define_exec(bContext *C, wmOperator *op)
*/
FRAMENUMBER_MIN_CLAMP(sfra);
FRAMENUMBER_MIN_CLAMP(efra);
- if (efra < sfra) efra= sfra;
+ if (efra < sfra) efra = sfra;
scene->r.flag |= SCER_PRV_RANGE;
- scene->r.psfra= (int)floor(sfra + 0.5f);
- scene->r.pefra= (int)floor(efra + 0.5f);
+ scene->r.psfra = (int)floor(sfra + 0.5f);
+ scene->r.pefra = (int)floor(efra + 0.5f);
/* send notifiers */
- WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene);
return OPERATOR_FINISHED;
}
@@ -229,13 +229,13 @@ static void ANIM_OT_previewrange_set(wmOperatorType *ot)
ot->poll = ED_operator_animview_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* rna */
- /* used to define frame range */
+ /* used to define frame range */
RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, "X Min", "", INT_MIN, INT_MAX);
RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, "X Max", "", INT_MIN, INT_MAX);
- /* these are not used, but are needed by borderselect gesture operator stuff */
+ /* these are not used, but are needed by borderselect gesture operator stuff */
RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, "Y Min", "", INT_MIN, INT_MAX);
RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, "Y Max", "", INT_MIN, INT_MAX);
}
@@ -244,8 +244,8 @@ static void ANIM_OT_previewrange_set(wmOperatorType *ot)
static int previewrange_clear_exec(bContext *C, wmOperator *UNUSED(op))
{
- Scene *scene= CTX_data_scene(C);
- ScrArea *curarea= CTX_wm_area(C);
+ Scene *scene = CTX_data_scene(C);
+ ScrArea *curarea = CTX_wm_area(C);
/* sanity checks */
if (ELEM(NULL, scene, curarea))
@@ -253,8 +253,8 @@ static int previewrange_clear_exec(bContext *C, wmOperator *UNUSED(op))
/* simply clear values */
scene->r.flag &= ~SCER_PRV_RANGE;
- scene->r.psfra= 0;
- scene->r.pefra= 0;
+ scene->r.psfra = 0;
+ scene->r.pefra = 0;
ED_area_tag_redraw(curarea);
@@ -274,7 +274,7 @@ static void ANIM_OT_previewrange_clear(wmOperatorType *ot)
ot->poll = ED_operator_animview_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ************************** registration **********************************/
@@ -319,7 +319,7 @@ void ED_keymap_anim(wmKeyConfig *keyconf)
wmKeyMapItem *kmi;
/* frame management */
- /* NOTE: 'ACTIONMOUSE' not 'LEFTMOUSE', as user may have swapped mouse-buttons */
+ /* NOTE: 'ACTIONMOUSE' not 'LEFTMOUSE', as user may have swapped mouse-buttons */
WM_keymap_add_item(keymap, "ANIM_OT_change_frame", ACTIONMOUSE, KM_PRESS, 0, 0);
kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", TKEY, KM_PRESS, KM_CTRL, 0);
diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c
index 9c4f96ebe6d..0cc92394a40 100644
--- a/source/blender/editors/animation/drivers.c
+++ b/source/blender/editors/animation/drivers.c
@@ -66,7 +66,7 @@
#include "anim_intern.h"
/* called by WM */
-void free_anim_drivers_copybuf (void);
+void free_anim_drivers_copybuf(void);
/* ************************************************** */
/* Animation Data Validation */
@@ -78,7 +78,7 @@ void free_anim_drivers_copybuf (void);
* 1 - add new Driver FCurve,
* -1 - add new Driver FCurve without driver stuff (for pasting)
*/
-FCurve *verify_driver_fcurve (ID *id, const char rna_path[], const int array_index, short add)
+FCurve *verify_driver_fcurve(ID *id, const char rna_path[], const int array_index, short add)
{
AnimData *adt;
FCurve *fcu;
@@ -88,9 +88,9 @@ FCurve *verify_driver_fcurve (ID *id, const char rna_path[], const int array_ind
return NULL;
/* init animdata if none available yet */
- adt= BKE_animdata_from_id(id);
+ adt = BKE_animdata_from_id(id);
if ((adt == NULL) && (add))
- adt= BKE_id_add_animdata(id);
+ adt = BKE_id_add_animdata(id);
if (adt == NULL) {
/* if still none (as not allowed to add, or ID doesn't have animdata for some reason) */
return NULL;
@@ -100,22 +100,22 @@ FCurve *verify_driver_fcurve (ID *id, const char rna_path[], const int array_ind
* - add if not found and allowed to add one
* TODO: add auto-grouping support? how this works will need to be resolved
*/
- fcu= list_find_fcurve(&adt->drivers, rna_path, array_index);
+ fcu = list_find_fcurve(&adt->drivers, rna_path, array_index);
if ((fcu == NULL) && (add)) {
/* use default settings to make a F-Curve */
- fcu= MEM_callocN(sizeof(FCurve), "FCurve");
+ fcu = MEM_callocN(sizeof(FCurve), "FCurve");
- fcu->flag = (FCURVE_VISIBLE|FCURVE_SELECTED);
+ fcu->flag = (FCURVE_VISIBLE | FCURVE_SELECTED);
/* store path - make copy, and store that */
- fcu->rna_path= BLI_strdupn(rna_path, strlen(rna_path));
- fcu->array_index= array_index;
+ fcu->rna_path = BLI_strdupn(rna_path, strlen(rna_path));
+ fcu->array_index = array_index;
/* if add is negative, don't init this data yet, since it will be filled in by the pasted driver */
if (add > 0) {
/* add some new driver data */
- fcu->driver= MEM_callocN(sizeof(ChannelDriver), "ChannelDriver");
+ fcu->driver = MEM_callocN(sizeof(ChannelDriver), "ChannelDriver");
/* add simple generator modifier for driver so that there is some visible representation */
add_fmodifier(&fcu->modifiers, FMODIFIER_TYPE_GENERATOR);
@@ -133,9 +133,9 @@ FCurve *verify_driver_fcurve (ID *id, const char rna_path[], const int array_ind
/* Driver Management API */
/* Main Driver Management API calls:
- * Add a new driver for the specified property on the given ID block
+ * Add a new driver for the specified property on the given ID block
*/
-short ANIM_add_driver (ReportList *reports, ID *id, const char rna_path[], int array_index, short flag, int type)
+short ANIM_add_driver(ReportList *reports, ID *id, const char rna_path[], int array_index, short flag, int type)
{
PointerRNA id_ptr, ptr;
PropertyRNA *prop;
@@ -147,18 +147,18 @@ short ANIM_add_driver (ReportList *reports, ID *id, const char rna_path[], int a
RNA_id_pointer_create(id, &id_ptr);
if ((RNA_path_resolve(&id_ptr, rna_path, &ptr, &prop) == 0) || (prop == NULL)) {
BKE_reportf(reports, RPT_ERROR,
- "Could not add Driver, as RNA Path is invalid for the given ID (ID = %s, Path = %s)",
- id->name, rna_path);
+ "Could not add Driver, as RNA Path is invalid for the given ID (ID = %s, Path = %s)",
+ id->name, rna_path);
return 0;
}
/* key entire array convenience method */
if (array_index == -1) {
- array_index_max= RNA_property_array_length(&ptr, prop);
- array_index= 0;
+ array_index_max = RNA_property_array_length(&ptr, prop);
+ array_index = 0;
}
else
- array_index_max= array_index;
+ array_index_max = array_index;
/* maximum index should be greater than the start index */
if (array_index == array_index_max)
@@ -167,40 +167,40 @@ short ANIM_add_driver (ReportList *reports, ID *id, const char rna_path[], int a
/* will only loop once unless the array index was -1 */
for (; array_index < array_index_max; array_index++) {
/* create F-Curve with Driver */
- fcu= verify_driver_fcurve(id, rna_path, array_index, 1);
+ fcu = verify_driver_fcurve(id, rna_path, array_index, 1);
if (fcu && fcu->driver) {
- ChannelDriver *driver= fcu->driver;
+ ChannelDriver *driver = fcu->driver;
/* set the type of the driver */
- driver->type= type;
+ driver->type = type;
/* creating drivers for buttons will create the driver(s) with type
* "scripted expression" so that their values won't be lost immediately,
* so here we copy those values over to the driver's expression
*/
if (type == DRIVER_TYPE_PYTHON) {
- PropertyType proptype= RNA_property_type(prop);
- int array= RNA_property_array_length(&ptr, prop);
- char *expression= driver->expression;
- int val, maxlen= sizeof(driver->expression);
+ PropertyType proptype = RNA_property_type(prop);
+ int array = RNA_property_array_length(&ptr, prop);
+ char *expression = driver->expression;
+ int val, maxlen = sizeof(driver->expression);
float fval;
if (proptype == PROP_BOOLEAN) {
- if (!array) val= RNA_property_boolean_get(&ptr, prop);
- else val= RNA_property_boolean_get_index(&ptr, prop, array_index);
+ if (!array) val = RNA_property_boolean_get(&ptr, prop);
+ else val = RNA_property_boolean_get_index(&ptr, prop, array_index);
- BLI_strncpy(expression, (val)? "True": "False", maxlen);
+ BLI_strncpy(expression, (val) ? "True" : "False", maxlen);
}
else if (proptype == PROP_INT) {
- if (!array) val= RNA_property_int_get(&ptr, prop);
- else val= RNA_property_int_get_index(&ptr, prop, array_index);
+ if (!array) val = RNA_property_int_get(&ptr, prop);
+ else val = RNA_property_int_get_index(&ptr, prop, array_index);
BLI_snprintf(expression, maxlen, "%d", val);
}
else if (proptype == PROP_FLOAT) {
- if (!array) fval= RNA_property_float_get(&ptr, prop);
- else fval= RNA_property_float_get_index(&ptr, prop, array_index);
+ if (!array) fval = RNA_property_float_get(&ptr, prop);
+ else fval = RNA_property_float_get_index(&ptr, prop, array_index);
BLI_snprintf(expression, maxlen, "%.3f", fval);
}
@@ -227,25 +227,25 @@ short ANIM_add_driver (ReportList *reports, ID *id, const char rna_path[], int a
}
/* Main Driver Management API calls:
- * Remove the driver for the specified property on the given ID block (if available)
+ * Remove the driver for the specified property on the given ID block (if available)
*/
-short ANIM_remove_driver (ReportList *UNUSED(reports), ID *id, const char rna_path[], int array_index, short UNUSED(flag))
+short ANIM_remove_driver(ReportList *UNUSED(reports), ID *id, const char rna_path[], int array_index, short UNUSED(flag))
{
AnimData *adt;
FCurve *fcu;
- int success= 0;
+ int success = 0;
/* we don't check the validity of the path here yet, but it should be ok... */
- adt= BKE_animdata_from_id(id);
+ adt = BKE_animdata_from_id(id);
if (adt) {
if (array_index == -1) {
/* step through all drivers, removing all of those with the same base path */
- FCurve *fcu_iter= adt->drivers.first;
+ FCurve *fcu_iter = adt->drivers.first;
while ((fcu = iter_step_fcurve(fcu_iter, rna_path)) != NULL) {
/* store the next fcurve for looping */
- fcu_iter= fcu->next;
+ fcu_iter = fcu->next;
/* remove F-Curve from driver stack, then free it */
BLI_remlink(&adt->drivers, fcu);
@@ -258,9 +258,9 @@ short ANIM_remove_driver (ReportList *UNUSED(reports), ID *id, const char rna_pa
else {
/* find the matching driver and remove it only
* Note: here is one of the places where we don't want new F-Curve + Driver added!
- * so 'add' var must be 0
+ * so 'add' var must be 0
*/
- fcu= verify_driver_fcurve(id, rna_path, array_index, 0);
+ fcu = verify_driver_fcurve(id, rna_path, array_index, 0);
if (fcu) {
BLI_remlink(&adt->drivers, fcu);
free_fcurve(fcu);
@@ -281,16 +281,16 @@ static FCurve *channeldriver_copypaste_buf = NULL;
/* This function frees any MEM_calloc'ed copy/paste buffer data */
// XXX find some header to put this in!
-void free_anim_drivers_copybuf (void)
+void free_anim_drivers_copybuf(void)
{
/* free the buffer F-Curve if it exists, as if it were just another F-Curve */
if (channeldriver_copypaste_buf)
free_fcurve(channeldriver_copypaste_buf);
- channeldriver_copypaste_buf= NULL;
+ channeldriver_copypaste_buf = NULL;
}
/* Checks if there is a driver in the copy/paste buffer */
-short ANIM_driver_can_paste (void)
+short ANIM_driver_can_paste(void)
{
return (channeldriver_copypaste_buf != NULL);
}
@@ -298,9 +298,9 @@ short ANIM_driver_can_paste (void)
/* ------------------- */
/* Main Driver Management API calls:
- * Make a copy of the driver for the specified property on the given ID block
+ * Make a copy of the driver for the specified property on the given ID block
*/
-short ANIM_copy_driver (ReportList *reports, ID *id, const char rna_path[], int array_index, short UNUSED(flag))
+short ANIM_copy_driver(ReportList *reports, ID *id, const char rna_path[], int array_index, short UNUSED(flag))
{
PointerRNA id_ptr, ptr;
PropertyRNA *prop;
@@ -310,13 +310,13 @@ short ANIM_copy_driver (ReportList *reports, ID *id, const char rna_path[], int
RNA_id_pointer_create(id, &id_ptr);
if ((RNA_path_resolve(&id_ptr, rna_path, &ptr, &prop) == 0) || (prop == NULL)) {
BKE_reportf(reports, RPT_ERROR,
- "Could not find Driver to copy, as RNA Path is invalid for the given ID (ID = %s, Path = %s)",
- id->name, rna_path);
+ "Could not find Driver to copy, as RNA Path is invalid for the given ID (ID = %s, Path = %s)",
+ id->name, rna_path);
return 0;
}
/* try to get F-Curve with Driver */
- fcu= verify_driver_fcurve(id, rna_path, array_index, 0);
+ fcu = verify_driver_fcurve(id, rna_path, array_index, 0);
/* clear copy/paste buffer first (for consistency with other copy/paste buffers) */
free_anim_drivers_copybuf();
@@ -327,13 +327,13 @@ short ANIM_copy_driver (ReportList *reports, ID *id, const char rna_path[], int
* so that we don't end up wasting memory storing the path which won't get used ever...
*/
char *tmp_path = fcu->rna_path;
- fcu->rna_path= NULL;
+ fcu->rna_path = NULL;
/* make a copy of the F-Curve with */
- channeldriver_copypaste_buf= copy_fcurve(fcu);
+ channeldriver_copypaste_buf = copy_fcurve(fcu);
/* restore the path */
- fcu->rna_path= tmp_path;
+ fcu->rna_path = tmp_path;
/* copied... */
return 1;
@@ -344,10 +344,10 @@ short ANIM_copy_driver (ReportList *reports, ID *id, const char rna_path[], int
}
/* Main Driver Management API calls:
- * Add a new driver for the specified property on the given ID block or replace an existing one
+ * Add a new driver for the specified property on the given ID block or replace an existing one
* with the driver + driver-curve data from the buffer
*/
-short ANIM_paste_driver (ReportList *reports, ID *id, const char rna_path[], int array_index, short UNUSED(flag))
+short ANIM_paste_driver(ReportList *reports, ID *id, const char rna_path[], int array_index, short UNUSED(flag))
{
PointerRNA id_ptr, ptr;
PropertyRNA *prop;
@@ -357,8 +357,8 @@ short ANIM_paste_driver (ReportList *reports, ID *id, const char rna_path[], int
RNA_id_pointer_create(id, &id_ptr);
if ((RNA_path_resolve(&id_ptr, rna_path, &ptr, &prop) == 0) || (prop == NULL)) {
BKE_reportf(reports, RPT_ERROR,
- "Could not paste Driver, as RNA Path is invalid for the given ID (ID = %s, Path = %s)",
- id->name, rna_path);
+ "Could not paste Driver, as RNA Path is invalid for the given ID (ID = %s, Path = %s)",
+ id->name, rna_path);
return 0;
}
@@ -369,25 +369,25 @@ short ANIM_paste_driver (ReportList *reports, ID *id, const char rna_path[], int
}
/* create Driver F-Curve, but without data which will be copied across... */
- fcu= verify_driver_fcurve(id, rna_path, array_index, -1);
+ fcu = verify_driver_fcurve(id, rna_path, array_index, -1);
if (fcu) {
/* copy across the curve data from the buffer curve
* NOTE: this step needs care to not miss new settings
*/
- /* keyframes/samples */
- fcu->bezt= MEM_dupallocN(channeldriver_copypaste_buf->bezt);
- fcu->fpt= MEM_dupallocN(channeldriver_copypaste_buf->fpt);
- fcu->totvert= channeldriver_copypaste_buf->totvert;
+ /* keyframes/samples */
+ fcu->bezt = MEM_dupallocN(channeldriver_copypaste_buf->bezt);
+ fcu->fpt = MEM_dupallocN(channeldriver_copypaste_buf->fpt);
+ fcu->totvert = channeldriver_copypaste_buf->totvert;
- /* modifiers */
+ /* modifiers */
copy_fmodifiers(&fcu->modifiers, &channeldriver_copypaste_buf->modifiers);
- /* extrapolation mode */
- fcu->extend= channeldriver_copypaste_buf->extend;
+ /* extrapolation mode */
+ fcu->extend = channeldriver_copypaste_buf->extend;
- /* the 'juicy' stuff - the driver */
- fcu->driver= fcurve_copy_driver(channeldriver_copypaste_buf->driver);
+ /* the 'juicy' stuff - the driver */
+ fcu->driver = fcurve_copy_driver(channeldriver_copypaste_buf->driver);
}
/* done */
@@ -407,7 +407,7 @@ short ANIM_paste_driver (ReportList *reports, ID *id, const char rna_path[], int
*
* > returns: MEM_alloc'd string representing the path to the property from the given PointerRNA
*/
-static char *get_driver_path_hack (bContext *C, PointerRNA *ptr, PropertyRNA *prop)
+static char *get_driver_path_hack(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
{
ID *id = (ID *)ptr->id.data;
ScrArea *sa = CTX_wm_area(C);
@@ -431,17 +431,17 @@ static char *get_driver_path_hack (bContext *C, PointerRNA *ptr, PropertyRNA *pr
Material *ma = give_current_material(ob, ob->actcol);
/* assumes: material will only be shown if it is active objects's active material it's ok */
- if ((ID*)ma == id) {
+ if ((ID *)ma == id) {
/* create new path */
// TODO: use RNA path functions to construct instead?
path = BLI_sprintfN("material_slots[\"%s\"].material.%s",
- ma->id.name+2, basepath);
+ ma->id.name + 2, basepath);
/* free old one */
MEM_freeN(basepath);
}
}
- break;
+ break;
case ID_TE: /* textures */
{
@@ -449,17 +449,17 @@ static char *get_driver_path_hack (bContext *C, PointerRNA *ptr, PropertyRNA *pr
Tex *tex = give_current_material_texture(ma);
/* assumes: texture will only be shown if it is active material's active texture it's ok */
- if ((ID*)tex == id) {
+ if ((ID *)tex == id) {
/* create new path */
// TODO: use RNA path functions to construct step by step instead?
path = BLI_sprintfN("material_slots[\"%s\"].material.texture_slots[\"%s\"].texture.%s",
- ma->id.name+2, tex->id.name+2, basepath);
+ ma->id.name + 2, tex->id.name + 2, basepath);
/* free old one */
MEM_freeN(basepath);
}
}
- break;
+ break;
}
/* fix RNA pointer, as we've now changed the ID root by changing the paths */
@@ -476,25 +476,25 @@ static char *get_driver_path_hack (bContext *C, PointerRNA *ptr, PropertyRNA *pr
/* Add Driver Button Operator ------------------------ */
-static int add_driver_button_exec (bContext *C, wmOperator *op)
+static int add_driver_button_exec(bContext *C, wmOperator *op)
{
- PointerRNA ptr= {{NULL}};
- PropertyRNA *prop= NULL;
- short success= 0;
- int index, all= RNA_boolean_get(op->ptr, "all");
+ PointerRNA ptr = {{NULL}};
+ PropertyRNA *prop = NULL;
+ short success = 0;
+ int index, all = RNA_boolean_get(op->ptr, "all");
/* try to create driver using property retrieved from UI */
uiContextActiveProperty(C, &ptr, &prop, &index);
if (all)
- index= -1;
+ index = -1;
if (ptr.id.data && ptr.data && prop && RNA_property_animateable(&ptr, prop)) {
- char *path= get_driver_path_hack(C, &ptr, prop);
+ char *path = get_driver_path_hack(C, &ptr, prop);
short flags = CREATEDRIVER_WITH_DEFAULT_DVAR;
if (path) {
- success+= ANIM_add_driver(op->reports, ptr.id.data, path, index, flags, DRIVER_TYPE_PYTHON);
+ success += ANIM_add_driver(op->reports, ptr.id.data, path, index, flags, DRIVER_TYPE_PYTHON);
MEM_freeN(path);
}
@@ -506,13 +506,13 @@ static int add_driver_button_exec (bContext *C, wmOperator *op)
DAG_ids_flush_update(CTX_data_main(C), 0);
- 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 (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED;
+ return (success) ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
}
-void ANIM_OT_driver_button_add (wmOperatorType *ot)
+void ANIM_OT_driver_button_add(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Add Driver";
@@ -524,7 +524,7 @@ void ANIM_OT_driver_button_add (wmOperatorType *ot)
//op->poll= ??? // TODO: need to have some animatable property to do this
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "all", 1, "All", "Create drivers for all elements of the array");
@@ -532,23 +532,23 @@ void ANIM_OT_driver_button_add (wmOperatorType *ot)
/* Remove Driver Button Operator ------------------------ */
-static int remove_driver_button_exec (bContext *C, wmOperator *op)
+static int remove_driver_button_exec(bContext *C, wmOperator *op)
{
- PointerRNA ptr= {{NULL}};
- PropertyRNA *prop= NULL;
- short success= 0;
- int index, all= RNA_boolean_get(op->ptr, "all");
+ PointerRNA ptr = {{NULL}};
+ PropertyRNA *prop = NULL;
+ short success = 0;
+ int index, all = RNA_boolean_get(op->ptr, "all");
/* try to find driver using property retrieved from UI */
uiContextActiveProperty(C, &ptr, &prop, &index);
if (all)
- index= -1;
+ index = -1;
if (ptr.id.data && ptr.data && prop) {
- char *path= get_driver_path_hack(C, &ptr, prop);
+ char *path = get_driver_path_hack(C, &ptr, prop);
- success= ANIM_remove_driver(op->reports, ptr.id.data, path, index, 0);
+ success = ANIM_remove_driver(op->reports, ptr.id.data, path, index, 0);
MEM_freeN(path);
}
@@ -558,13 +558,13 @@ static int remove_driver_button_exec (bContext *C, wmOperator *op)
DAG_ids_flush_update(CTX_data_main(C), 0);
- 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 (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED;
+ return (success) ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
}
-void ANIM_OT_driver_button_remove (wmOperatorType *ot)
+void ANIM_OT_driver_button_remove(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Remove Driver";
@@ -576,7 +576,7 @@ void ANIM_OT_driver_button_remove (wmOperatorType *ot)
//op->poll= ??? // TODO: need to have some driver to be able to do this...
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "all", 1, "All", "Delete drivers for all elements of the array");
@@ -584,22 +584,22 @@ void ANIM_OT_driver_button_remove (wmOperatorType *ot)
/* Copy Driver Button Operator ------------------------ */
-static int copy_driver_button_exec (bContext *C, wmOperator *op)
+static int copy_driver_button_exec(bContext *C, wmOperator *op)
{
- PointerRNA ptr= {{NULL}};
- PropertyRNA *prop= NULL;
- short success= 0;
+ PointerRNA ptr = {{NULL}};
+ PropertyRNA *prop = NULL;
+ short success = 0;
int index;
/* try to create driver using property retrieved from UI */
uiContextActiveProperty(C, &ptr, &prop, &index);
if (ptr.id.data && ptr.data && prop && RNA_property_animateable(&ptr, prop)) {
- char *path= get_driver_path_hack(C, &ptr, prop);
+ char *path = get_driver_path_hack(C, &ptr, prop);
if (path) {
/* only copy the driver for the button that this was involved for */
- success= ANIM_copy_driver(op->reports, ptr.id.data, path, index, 0);
+ success = ANIM_copy_driver(op->reports, ptr.id.data, path, index, 0);
uiContextAnimUpdate(C);
@@ -608,10 +608,10 @@ static int copy_driver_button_exec (bContext *C, wmOperator *op)
}
/* since we're just copying, we don't really need to do anything else...*/
- return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED;
+ return (success) ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
}
-void ANIM_OT_copy_driver_button (wmOperatorType *ot)
+void ANIM_OT_copy_driver_button(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Copy Driver";
@@ -623,27 +623,27 @@ void ANIM_OT_copy_driver_button (wmOperatorType *ot)
//op->poll= ??? // TODO: need to have some driver to be able to do this...
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* Paste Driver Button Operator ------------------------ */
-static int paste_driver_button_exec (bContext *C, wmOperator *op)
+static int paste_driver_button_exec(bContext *C, wmOperator *op)
{
- PointerRNA ptr= {{NULL}};
- PropertyRNA *prop= NULL;
- short success= 0;
+ PointerRNA ptr = {{NULL}};
+ PropertyRNA *prop = NULL;
+ short success = 0;
int index;
/* try to create driver using property retrieved from UI */
uiContextActiveProperty(C, &ptr, &prop, &index);
if (ptr.id.data && ptr.data && prop && RNA_property_animateable(&ptr, prop)) {
- char *path= get_driver_path_hack(C, &ptr, prop);
+ char *path = get_driver_path_hack(C, &ptr, prop);
if (path) {
/* only copy the driver for the button that this was involved for */
- success= ANIM_paste_driver(op->reports, ptr.id.data, path, index, 0);
+ success = ANIM_paste_driver(op->reports, ptr.id.data, path, index, 0);
uiContextAnimUpdate(C);
@@ -652,10 +652,10 @@ static int paste_driver_button_exec (bContext *C, wmOperator *op)
}
/* since we're just copying, we don't really need to do anything else...*/
- return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED;
+ return (success) ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
}
-void ANIM_OT_paste_driver_button (wmOperatorType *ot)
+void ANIM_OT_paste_driver_button(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Paste Driver";
@@ -667,7 +667,7 @@ void ANIM_OT_paste_driver_button (wmOperatorType *ot)
//op->poll= ??? // TODO: need to have some driver to be able to do this...
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ************************************************** */
diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c
index d5ec98da588..24cae5d8652 100644
--- a/source/blender/editors/animation/fmodifier_ui.c
+++ b/source/blender/editors/animation/fmodifier_ui.c
@@ -69,23 +69,23 @@
// XXX! --------------------------------
/* temporary definition for limits of float number buttons (FLT_MAX tends to infinity with old system) */
-#define UI_FLT_MAX 10000.0f
+#define UI_FLT_MAX 10000.0f
-#define B_REDR 1
-#define B_FMODIFIER_REDRAW 20
+#define B_REDR 1
+#define B_FMODIFIER_REDRAW 20
/* macro for use here to draw background box and set height */
// XXX for now, roundbox has it's callback func set to NULL to not intercept events
#define DRAW_BACKDROP(height) \
{ \
- uiDefBut(block, ROUNDBOX, B_REDR, "", -3, yco-height, width+3, height-1, NULL, 5.0, 0.0, 12.0, (float)rb_col, ""); \
+ uiDefBut(block, ROUNDBOX, B_REDR, "", -3, yco - height, width + 3, height - 1, NULL, 5.0, 0.0, 12.0, (float)rb_col, ""); \
}
/* callback to verify modifier data */
-static void validate_fmodifier_cb (bContext *UNUSED(C), void *fcm_v, void *UNUSED(arg))
+static void validate_fmodifier_cb(bContext *UNUSED(C), void *fcm_v, void *UNUSED(arg))
{
- FModifier *fcm= (FModifier *)fcm_v;
- FModifierTypeInfo *fmi= fmodifier_get_typeinfo(fcm);
+ FModifier *fcm = (FModifier *)fcm_v;
+ FModifierTypeInfo *fmi = fmodifier_get_typeinfo(fcm);
/* call the verify callback on the modifier if applicable */
if (fmi && fmi->verify_data)
@@ -93,10 +93,10 @@ static void validate_fmodifier_cb (bContext *UNUSED(C), void *fcm_v, void *UNUSE
}
/* callback to remove the given modifier */
-static void delete_fmodifier_cb (bContext *C, void *fmods_v, void *fcm_v)
+static void delete_fmodifier_cb(bContext *C, void *fmods_v, void *fcm_v)
{
ListBase *modifiers = (ListBase *)fmods_v;
- FModifier *fcm= (FModifier *)fcm_v;
+ FModifier *fcm = (FModifier *)fcm_v;
/* remove the given F-Modifier from the active modifier-stack */
remove_fmodifier(modifiers, fcm);
@@ -105,7 +105,7 @@ static void delete_fmodifier_cb (bContext *C, void *fmods_v, void *fcm_v)
/* send notifiers */
// XXX for now, this is the only way to get updates in all the right places... but would be nice to have a special one in this case
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
}
/* --------------- */
@@ -113,7 +113,7 @@ static void delete_fmodifier_cb (bContext *C, void *fmods_v, void *fcm_v)
/* draw settings for generator modifier */
static void draw_modifier__generator(uiLayout *layout, ID *id, FModifier *fcm, short width)
{
- FMod_Generator *data= (FMod_Generator *)fcm->data;
+ FMod_Generator *data = (FMod_Generator *)fcm->data;
uiLayout /* *col, */ /* UNUSED */ *row;
uiBlock *block;
uiBut *but;
@@ -124,12 +124,12 @@ static void draw_modifier__generator(uiLayout *layout, ID *id, FModifier *fcm, s
/* basic settings (backdrop + mode selector + some padding) */
/* col= uiLayoutColumn(layout, 1); */ /* UNUSED */
- block= uiLayoutGetBlock(layout);
+ block = uiLayoutGetBlock(layout);
uiBlockBeginAlign(block);
- but = uiDefButR(block, MENU, B_FMODIFIER_REDRAW, NULL, 0, 0, width-30, UI_UNIT_Y, &ptr, "mode", -1, 0, 0, -1, -1, NULL);
- uiButSetFunc(but, validate_fmodifier_cb, fcm, NULL);
+ but = uiDefButR(block, MENU, B_FMODIFIER_REDRAW, NULL, 0, 0, width - 30, UI_UNIT_Y, &ptr, "mode", -1, 0, 0, -1, -1, NULL);
+ uiButSetFunc(but, validate_fmodifier_cb, fcm, NULL);
- uiDefButR(block, TOG, B_FMODIFIER_REDRAW, NULL, 0, 0, width-30, UI_UNIT_Y, &ptr, "use_additive", -1, 0, 0, -1, -1, NULL);
+ uiDefButR(block, TOG, B_FMODIFIER_REDRAW, NULL, 0, 0, width - 30, UI_UNIT_Y, &ptr, "use_additive", -1, 0, 0, -1, -1, NULL);
uiBlockEndAlign(block);
/* now add settings for individual modes */
@@ -141,20 +141,20 @@ static void draw_modifier__generator(uiLayout *layout, ID *id, FModifier *fcm, s
unsigned int i;
/* draw polynomial order selector */
- row= uiLayoutRow(layout, 0);
- block= uiLayoutGetBlock(row);
- but = uiDefButI(block, NUM, B_FMODIFIER_REDRAW, IFACE_("Poly Order:"), 10, 0, width-30, 19,
- &data->poly_order, 1, 100, 0, 0,
- TIP_("'Order' of the Polynomial (for a polynomial with n terms, 'order' is n-1)"));
- uiButSetFunc(but, validate_fmodifier_cb, fcm, NULL);
+ row = uiLayoutRow(layout, 0);
+ block = uiLayoutGetBlock(row);
+ but = uiDefButI(block, NUM, B_FMODIFIER_REDRAW, IFACE_("Poly Order:"), 10, 0, width - 30, 19,
+ &data->poly_order, 1, 100, 0, 0,
+ TIP_("'Order' of the Polynomial (for a polynomial with n terms, 'order' is n-1)"));
+ uiButSetFunc(but, validate_fmodifier_cb, fcm, NULL);
/* draw controls for each coefficient and a + sign at end of row */
- row= uiLayoutRow(layout, 1);
- block= uiLayoutGetBlock(row);
+ row = uiLayoutRow(layout, 1);
+ block = uiLayoutGetBlock(row);
- cp= data->coefficients;
- for (i=0; (i < data->arraysize) && (cp); i++, cp++) {
+ cp = data->coefficients;
+ for (i = 0; (i < data->arraysize) && (cp); i++, cp++) {
/* To align with first line */
if (i)
uiDefBut(block, LABEL, 1, " ", 0, 0, 50, 20, NULL, 0.0, 0.0, 0, 0, "");
@@ -173,12 +173,12 @@ static void draw_modifier__generator(uiLayout *layout, ID *id, FModifier *fcm, s
sprintf(xval, "x^%u", i);
uiDefBut(block, LABEL, 1, xval, 0, 0, 50, 20, NULL, 0.0, 0.0, 0, 0, TIP_("Power of x"));
- if ( (i != (data->arraysize - 1)) || ((i==0) && data->arraysize==2) ) {
+ if ( (i != (data->arraysize - 1)) || ((i == 0) && data->arraysize == 2) ) {
uiDefBut(block, LABEL, 1, "+", 0, 0, 30, 20, NULL, 0.0, 0.0, 0, 0, "");
/* next coefficient on a new row */
- row= uiLayoutRow(layout, 1);
- block= uiLayoutGetBlock(row);
+ row = uiLayoutRow(layout, 1);
+ block = uiLayoutGetBlock(row);
}
else {
/* For alignement in UI! */
@@ -194,20 +194,20 @@ static void draw_modifier__generator(uiLayout *layout, ID *id, FModifier *fcm, s
unsigned int i;
/* draw polynomial order selector */
- row= uiLayoutRow(layout, 0);
- block= uiLayoutGetBlock(row);
- but = uiDefButI(block, NUM, B_FMODIFIER_REDRAW, IFACE_("Poly Order:"), 0, 0, width-30, 19,
- &data->poly_order, 1, 100, 0, 0,
- TIP_("'Order' of the Polynomial (for a polynomial with n terms, 'order' is n-1)"));
- uiButSetFunc(but, validate_fmodifier_cb, fcm, NULL);
+ row = uiLayoutRow(layout, 0);
+ block = uiLayoutGetBlock(row);
+ but = uiDefButI(block, NUM, B_FMODIFIER_REDRAW, IFACE_("Poly Order:"), 0, 0, width - 30, 19,
+ &data->poly_order, 1, 100, 0, 0,
+ TIP_("'Order' of the Polynomial (for a polynomial with n terms, 'order' is n-1)"));
+ uiButSetFunc(but, validate_fmodifier_cb, fcm, NULL);
/* draw controls for each pair of coefficients */
- row= uiLayoutRow(layout, 1);
- block= uiLayoutGetBlock(row);
+ row = uiLayoutRow(layout, 1);
+ block = uiLayoutGetBlock(row);
- cp= data->coefficients;
- for (i=0; (i < data->poly_order) && (cp); i++, cp+=2) {
+ cp = data->coefficients;
+ for (i = 0; (i < data->poly_order) && (cp); i++, cp += 2) {
/* To align with first line */
if (i)
uiDefBut(block, LABEL, 1, " ", 0, 0, 50, 20, NULL, 0.0, 0.0, 0, 0, "");
@@ -222,22 +222,22 @@ static void draw_modifier__generator(uiLayout *layout, ID *id, FModifier *fcm, s
uiDefBut(block, LABEL, 1, "x +", 0, 0, 40, 20, NULL, 0.0, 0.0, 0, 0, "");
- uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 0, 0, 100, 20, cp+1, -UI_FLT_MAX, UI_FLT_MAX,
+ uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 0, 0, 100, 20, cp + 1, -UI_FLT_MAX, UI_FLT_MAX,
10, 3, TIP_("Second coefficient"));
/* closing bracket and '+' sign */
- if ( (i != (data->poly_order - 1)) || ((i==0) && data->poly_order==2) ) {
+ if ( (i != (data->poly_order - 1)) || ((i == 0) && data->poly_order == 2) ) {
uiDefBut(block, LABEL, 1, ") +", 0, 0, 30, 20, NULL, 0.0, 0.0, 0, 0, "");
/* set up new row for the next pair of coefficients*/
- row= uiLayoutRow(layout, 1);
- block= uiLayoutGetBlock(row);
+ row = uiLayoutRow(layout, 1);
+ block = uiLayoutGetBlock(row);
}
else
uiDefBut(block, LABEL, 1, ")", 0, 0, 20, 20, NULL, 0.0, 0.0, 0, 0, "");
}
}
- break;
+ break;
}
}
@@ -253,15 +253,15 @@ static void draw_modifier__fn_generator(uiLayout *layout, ID *id, FModifier *fcm
RNA_pointer_create(id, &RNA_FModifierFunctionGenerator, fcm, &ptr);
/* add the settings */
- col= uiLayoutColumn(layout, 1);
- uiItemR(col, &ptr, "function_type", 0, "", ICON_NONE);
- uiItemR(col, &ptr, "use_additive", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
-
- col= uiLayoutColumn(layout, 0); // 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);
- uiItemR(col, &ptr, "value_offset", 0, NULL, ICON_NONE);
+ col = uiLayoutColumn(layout, 1);
+ uiItemR(col, &ptr, "function_type", 0, "", ICON_NONE);
+ uiItemR(col, &ptr, "use_additive", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
+
+ col = uiLayoutColumn(layout, 0); // 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);
+ uiItemR(col, &ptr, "value_offset", 0, NULL, ICON_NONE);
}
/* --------------- */
@@ -278,19 +278,19 @@ static void draw_modifier__cycles(uiLayout *layout, ID *id, FModifier *fcm, shor
/* split into 2 columns
* NOTE: the mode comboboxes shouldn't get labels, otherwise there isn't enough room
*/
- split= uiLayoutSplit(layout, 0.5f, 0);
+ split = uiLayoutSplit(layout, 0.5f, 0);
/* before range */
- col= uiLayoutColumn(split, 1);
- uiItemL(col, IFACE_("Before:"), ICON_NONE);
- uiItemR(col, &ptr, "mode_before", 0, "", ICON_NONE);
- uiItemR(col, &ptr, "cycles_before", 0, NULL, ICON_NONE);
+ col = uiLayoutColumn(split, 1);
+ uiItemL(col, IFACE_("Before:"), ICON_NONE);
+ uiItemR(col, &ptr, "mode_before", 0, "", ICON_NONE);
+ uiItemR(col, &ptr, "cycles_before", 0, NULL, ICON_NONE);
/* after range */
- col= uiLayoutColumn(split, 1);
- uiItemL(col, IFACE_("After:"), ICON_NONE);
- uiItemR(col, &ptr, "mode_after", 0, "", ICON_NONE);
- uiItemR(col, &ptr, "cycles_after", 0, NULL, ICON_NONE);
+ col = uiLayoutColumn(split, 1);
+ uiItemL(col, IFACE_("After:"), ICON_NONE);
+ uiItemR(col, &ptr, "mode_after", 0, "", ICON_NONE);
+ uiItemR(col, &ptr, "cycles_after", 0, NULL, ICON_NONE);
}
/* --------------- */
@@ -308,33 +308,33 @@ static void draw_modifier__noise(uiLayout *layout, ID *id, FModifier *fcm, short
uiItemR(layout, &ptr, "blend_type", 0, NULL, ICON_NONE);
/* split into 2 columns */
- split= uiLayoutSplit(layout, 0.5f, 0);
+ split = uiLayoutSplit(layout, 0.5f, 0);
/* col 1 */
- col= uiLayoutColumn(split, 0);
- uiItemR(col, &ptr, "scale", 0, NULL, ICON_NONE);
- uiItemR(col, &ptr, "strength", 0, NULL, ICON_NONE);
+ col = uiLayoutColumn(split, 0);
+ uiItemR(col, &ptr, "scale", 0, NULL, ICON_NONE);
+ uiItemR(col, &ptr, "strength", 0, NULL, ICON_NONE);
/* col 2 */
- col= uiLayoutColumn(split, 0);
- uiItemR(col, &ptr, "phase", 0, NULL, ICON_NONE);
- uiItemR(col, &ptr, "depth", 0, NULL, ICON_NONE);
+ col = uiLayoutColumn(split, 0);
+ uiItemR(col, &ptr, "phase", 0, NULL, ICON_NONE);
+ uiItemR(col, &ptr, "depth", 0, NULL, ICON_NONE);
}
/* --------------- */
-#define BINARYSEARCH_FRAMEEQ_THRESH 0.0001f
+#define BINARYSEARCH_FRAMEEQ_THRESH 0.0001f
/* Binary search algorithm for finding where to insert Envelope Data Point.
* Returns the index to insert at (data already at that index will be offset if replace is 0)
*/
-static int binarysearch_fcm_envelopedata_index (FCM_EnvelopeData array[], float frame, int arraylen, short *exists)
+static int binarysearch_fcm_envelopedata_index(FCM_EnvelopeData array[], float frame, int arraylen, short *exists)
{
- int start=0, end=arraylen;
- int loopbreaker= 0, maxloop= arraylen * 2;
+ int start = 0, end = arraylen;
+ int loopbreaker = 0, maxloop = arraylen * 2;
/* initialize exists-flag first */
- *exists= 0;
+ *exists = 0;
/* sneaky optimisations (don't go through searching process if...):
* - keyframe to be added is to be added out of current bounds
@@ -349,7 +349,7 @@ static int binarysearch_fcm_envelopedata_index (FCM_EnvelopeData array[], float
float framenum;
/* 'First' Point (when only one point, this case is used) */
- framenum= array[0].time;
+ framenum = array[0].time;
if (IS_EQT(frame, framenum, BINARYSEARCH_FRAMEEQ_THRESH)) {
*exists = 1;
return 0;
@@ -358,9 +358,9 @@ static int binarysearch_fcm_envelopedata_index (FCM_EnvelopeData array[], float
return 0;
/* 'Last' Point */
- framenum= array[(arraylen-1)].time;
+ framenum = array[(arraylen - 1)].time;
if (IS_EQT(frame, framenum, BINARYSEARCH_FRAMEEQ_THRESH)) {
- *exists= 1;
+ *exists = 1;
return (arraylen - 1);
}
else if (frame > framenum)
@@ -369,12 +369,12 @@ static int binarysearch_fcm_envelopedata_index (FCM_EnvelopeData array[], float
/* most of the time, this loop is just to find where to put it
- * - 'loopbreaker' is just here to prevent infinite loops
+ * - 'loopbreaker' is just here to prevent infinite loops
*/
- for (loopbreaker=0; (start <= end) && (loopbreaker < maxloop); loopbreaker++) {
+ for (loopbreaker = 0; (start <= end) && (loopbreaker < maxloop); loopbreaker++) {
/* compute and get midpoint */
- int mid = start + ((end - start) / 2); /* we calculate the midpoint this way to avoid int overflows... */
- float midfra= array[mid].time;
+ int mid = start + ((end - start) / 2); /* we calculate the midpoint this way to avoid int overflows... */
+ float midfra = array[mid].time;
/* check if exactly equal to midpoint */
if (IS_EQT(frame, midfra, BINARYSEARCH_FRAMEEQ_THRESH)) {
@@ -384,13 +384,13 @@ static int binarysearch_fcm_envelopedata_index (FCM_EnvelopeData array[], float
/* repeat in upper/lower half */
if (frame > midfra)
- start= mid + 1;
+ start = mid + 1;
else if (frame < midfra)
- end= mid - 1;
+ end = mid - 1;
}
/* print error if loop-limit exceeded */
- if (loopbreaker == (maxloop-1)) {
+ if (loopbreaker == (maxloop - 1)) {
printf("Error: binarysearch_fcm_envelopedata_index() was taking too long\n");
// include debug info
@@ -403,91 +403,91 @@ static int binarysearch_fcm_envelopedata_index (FCM_EnvelopeData array[], float
/* callback to add new envelope data point */
// TODO: should we have a separate file for things like this?
-static void fmod_envelope_addpoint_cb (bContext *C, void *fcm_dv, void *UNUSED(arg))
+static void fmod_envelope_addpoint_cb(bContext *C, void *fcm_dv, void *UNUSED(arg))
{
- Scene *scene= CTX_data_scene(C);
- FMod_Envelope *env= (FMod_Envelope *)fcm_dv;
+ Scene *scene = CTX_data_scene(C);
+ FMod_Envelope *env = (FMod_Envelope *)fcm_dv;
FCM_EnvelopeData *fedn;
FCM_EnvelopeData fed;
/* 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.f1= fed.f2= 0;
+ fed.min = -1.0f;
+ fed.max = 1.0f;
+ 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... */
if (env->data) {
short exists = -1;
- int i= binarysearch_fcm_envelopedata_index(env->data, (float)(scene->r.cfra), env->totvert, &exists);
+ int i = binarysearch_fcm_envelopedata_index(env->data, (float)(scene->r.cfra), env->totvert, &exists);
/* binarysearch_...() will set exists by default to 0, so if it is non-zero, that means that the point exists already */
if (exists)
return;
/* add new */
- fedn= MEM_callocN((env->totvert+1)*sizeof(FCM_EnvelopeData), "FCM_EnvelopeData");
+ fedn = MEM_callocN((env->totvert + 1) * sizeof(FCM_EnvelopeData), "FCM_EnvelopeData");
/* add the points that should occur before the point to be pasted */
if (i > 0)
- memcpy(fedn, env->data, i*sizeof(FCM_EnvelopeData));
+ memcpy(fedn, env->data, i * sizeof(FCM_EnvelopeData));
/* add point to paste at index i */
- *(fedn + i)= fed;
+ *(fedn + i) = fed;
/* add the points that occur after the point to be pasted */
if (i < env->totvert)
- memcpy(fedn+i+1, env->data+i, (env->totvert-i)*sizeof(FCM_EnvelopeData));
+ memcpy(fedn + i + 1, env->data + i, (env->totvert - i) * sizeof(FCM_EnvelopeData));
/* replace (+ free) old with new */
MEM_freeN(env->data);
- env->data= fedn;
+ env->data = fedn;
env->totvert++;
}
else {
- env->data= MEM_callocN(sizeof(FCM_EnvelopeData), "FCM_EnvelopeData");
- *(env->data)= fed;
+ env->data = MEM_callocN(sizeof(FCM_EnvelopeData), "FCM_EnvelopeData");
+ *(env->data) = fed;
- env->totvert= 1;
+ env->totvert = 1;
}
}
/* callback to remove envelope data point */
// 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)
+static void fmod_envelope_deletepoint_cb(bContext *UNUSED(C), void *fcm_dv, void *ind_v)
{
- FMod_Envelope *env= (FMod_Envelope *)fcm_dv;
+ FMod_Envelope *env = (FMod_Envelope *)fcm_dv;
FCM_EnvelopeData *fedn;
- int index= GET_INT_FROM_POINTER(ind_v);
+ int index = GET_INT_FROM_POINTER(ind_v);
/* check that no data exists for the current frame... */
if (env->totvert > 1) {
/* allocate a new smaller array */
- fedn= MEM_callocN(sizeof(FCM_EnvelopeData)*(env->totvert-1), "FCM_EnvelopeData");
+ fedn = MEM_callocN(sizeof(FCM_EnvelopeData) * (env->totvert - 1), "FCM_EnvelopeData");
- memcpy(fedn, env->data, sizeof(FCM_EnvelopeData)*(index));
- memcpy(fedn + index, env->data + (index + 1), sizeof(FCM_EnvelopeData)*((env->totvert - index)-1));
+ memcpy(fedn, env->data, sizeof(FCM_EnvelopeData) * (index));
+ memcpy(fedn + index, env->data + (index + 1), sizeof(FCM_EnvelopeData) * ((env->totvert - index) - 1));
/* free old array, and set the new */
MEM_freeN(env->data);
- env->data= fedn;
+ env->data = fedn;
env->totvert--;
}
else {
/* just free array, since the only vert was deleted */
if (env->data) {
MEM_freeN(env->data);
- env->data= NULL;
+ env->data = NULL;
}
- env->totvert= 0;
+ env->totvert = 0;
}
}
/* draw settings for envelope modifier */
static void draw_modifier__envelope(uiLayout *layout, ID *id, FModifier *fcm, short UNUSED(width))
{
- FMod_Envelope *env= (FMod_Envelope *)fcm->data;
+ FMod_Envelope *env = (FMod_Envelope *)fcm->data;
FCM_EnvelopeData *fed;
uiLayout *col, *row;
uiBlock *block;
@@ -499,45 +499,45 @@ static void draw_modifier__envelope(uiLayout *layout, ID *id, FModifier *fcm, sh
RNA_pointer_create(id, &RNA_FModifierEnvelope, fcm, &ptr);
/* general settings */
- col= uiLayoutColumn(layout, 1);
- uiItemL(col, IFACE_("Envelope:"), ICON_NONE);
- uiItemR(col, &ptr, "reference_value", 0, NULL, ICON_NONE);
-
- row= uiLayoutRow(col, 1);
- uiItemR(row, &ptr, "default_min", 0, IFACE_("Min"), ICON_NONE);
- uiItemR(row, &ptr, "default_max", 0, IFACE_("Max"), ICON_NONE);
+ col = uiLayoutColumn(layout, 1);
+ uiItemL(col, IFACE_("Envelope:"), ICON_NONE);
+ uiItemR(col, &ptr, "reference_value", 0, NULL, ICON_NONE);
+
+ row = uiLayoutRow(col, 1);
+ uiItemR(row, &ptr, "default_min", 0, IFACE_("Min"), ICON_NONE);
+ uiItemR(row, &ptr, "default_max", 0, IFACE_("Max"), ICON_NONE);
/* control points header */
// TODO: move this control-point control stuff to using the new special widgets for lists
// the current way is far too cramped
- row= uiLayoutRow(layout, 0);
- block= uiLayoutGetBlock(row);
+ row = uiLayoutRow(layout, 0);
+ block = uiLayoutGetBlock(row);
- uiDefBut(block, LABEL, 1, IFACE_("Control Points:"), 0, 0, 150, 20, NULL, 0.0, 0.0, 0, 0, "");
+ uiDefBut(block, LABEL, 1, IFACE_("Control Points:"), 0, 0, 150, 20, NULL, 0.0, 0.0, 0, 0, "");
- but = uiDefBut(block, BUT, B_FMODIFIER_REDRAW, IFACE_("Add Point"), 0, 0, 150, 19,
- NULL, 0, 0, 0, 0, TIP_("Add a new control-point to the envelope on the current frame"));
- uiButSetFunc(but, fmod_envelope_addpoint_cb, env, NULL);
+ but = uiDefBut(block, BUT, B_FMODIFIER_REDRAW, IFACE_("Add Point"), 0, 0, 150, 19,
+ NULL, 0, 0, 0, 0, TIP_("Add a new control-point to the envelope on the current frame"));
+ uiButSetFunc(but, fmod_envelope_addpoint_cb, env, NULL);
/* control points list */
- for (i=0, fed=env->data; i < env->totvert; i++, fed++) {
+ for (i = 0, fed = env->data; i < env->totvert; i++, fed++) {
/* get a new row to operate on */
- row= uiLayoutRow(layout, 1);
- block= uiLayoutGetBlock(row);
+ row = uiLayoutRow(layout, 1);
+ block = uiLayoutGetBlock(row);
uiBlockBeginAlign(block);
- but=uiDefButF(block, NUM, B_FMODIFIER_REDRAW, IFACE_("Fra:"), 0, 0, 90, 20,
- &fed->time, -MAXFRAMEF, MAXFRAMEF, 10, 1, TIP_("Frame that envelope point occurs"));
- uiButSetFunc(but, validate_fmodifier_cb, fcm, NULL);
-
- uiDefButF(block, NUM, B_FMODIFIER_REDRAW, IFACE_("Min:"), 0, 0, 100, 20,
- &fed->min, -UI_FLT_MAX, UI_FLT_MAX, 10, 2, TIP_("Minimum bound of envelope at this point"));
- uiDefButF(block, NUM, B_FMODIFIER_REDRAW, IFACE_("Max:"), 0, 0, 100, 20,
- &fed->max, -UI_FLT_MAX, UI_FLT_MAX, 10, 2, TIP_("Maximum bound of envelope at this point"));
+ but = uiDefButF(block, NUM, B_FMODIFIER_REDRAW, IFACE_("Fra:"), 0, 0, 90, 20,
+ &fed->time, -MAXFRAMEF, MAXFRAMEF, 10, 1, TIP_("Frame that envelope point occurs"));
+ uiButSetFunc(but, validate_fmodifier_cb, fcm, NULL);
- but = uiDefIconBut(block, BUT, B_FMODIFIER_REDRAW, ICON_X, 0, 0, 18, 20,
- NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Delete envelope control point"));
- uiButSetFunc(but, fmod_envelope_deletepoint_cb, env, SET_INT_IN_POINTER(i));
+ uiDefButF(block, NUM, B_FMODIFIER_REDRAW, IFACE_("Min:"), 0, 0, 100, 20,
+ &fed->min, -UI_FLT_MAX, UI_FLT_MAX, 10, 2, TIP_("Minimum bound of envelope at this point"));
+ uiDefButF(block, NUM, B_FMODIFIER_REDRAW, IFACE_("Max:"), 0, 0, 100, 20,
+ &fed->max, -UI_FLT_MAX, UI_FLT_MAX, 10, 2, TIP_("Maximum bound of envelope at this point"));
+
+ but = uiDefIconBut(block, BUT, B_FMODIFIER_REDRAW, ICON_X, 0, 0, 18, 20,
+ NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Delete envelope control point"));
+ uiButSetFunc(but, fmod_envelope_deletepoint_cb, env, SET_INT_IN_POINTER(i));
uiBlockBeginAlign(block);
}
}
@@ -558,17 +558,17 @@ static void draw_modifier__limits(uiLayout *layout, ID *id, FModifier *fcm, shor
/* row= uiLayoutRow(layout, 0); */ /* UNUSED */
/* split into 2 columns */
- split= uiLayoutSplit(layout, 0.5f, 0);
+ split = uiLayoutSplit(layout, 0.5f, 0);
/* x-minimum */
- col= uiLayoutColumn(split, 1);
- uiItemR(col, &ptr, "use_min_x", 0, NULL, ICON_NONE);
- uiItemR(col, &ptr, "min_x", 0, NULL, ICON_NONE);
+ col = uiLayoutColumn(split, 1);
+ uiItemR(col, &ptr, "use_min_x", 0, NULL, ICON_NONE);
+ uiItemR(col, &ptr, "min_x", 0, NULL, ICON_NONE);
/* y-minimum*/
- col= uiLayoutColumn(split, 1);
- uiItemR(col, &ptr, "use_min_y", 0, NULL, ICON_NONE);
- uiItemR(col, &ptr, "min_y", 0, NULL, ICON_NONE);
+ col = uiLayoutColumn(split, 1);
+ uiItemR(col, &ptr, "use_min_y", 0, NULL, ICON_NONE);
+ uiItemR(col, &ptr, "min_y", 0, NULL, ICON_NONE);
}
/* row 2: maximum */
@@ -576,17 +576,17 @@ static void draw_modifier__limits(uiLayout *layout, ID *id, FModifier *fcm, shor
/* row= uiLayoutRow(layout, 0); */ /* UNUSED */
/* split into 2 columns */
- split= uiLayoutSplit(layout, 0.5f, 0);
+ split = uiLayoutSplit(layout, 0.5f, 0);
/* x-minimum */
- col= uiLayoutColumn(split, 1);
- uiItemR(col, &ptr, "use_max_x", 0, NULL, ICON_NONE);
- uiItemR(col, &ptr, "max_x", 0, NULL, ICON_NONE);
+ col = uiLayoutColumn(split, 1);
+ uiItemR(col, &ptr, "use_max_x", 0, NULL, ICON_NONE);
+ uiItemR(col, &ptr, "max_x", 0, NULL, ICON_NONE);
/* y-minimum*/
- col= uiLayoutColumn(split, 1);
- uiItemR(col, &ptr, "use_max_y", 0, NULL, ICON_NONE);
- uiItemR(col, &ptr, "max_y", 0, NULL, ICON_NONE);
+ col = uiLayoutColumn(split, 1);
+ uiItemR(col, &ptr, "use_max_y", 0, NULL, ICON_NONE);
+ uiItemR(col, &ptr, "max_y", 0, NULL, ICON_NONE);
}
}
@@ -602,36 +602,36 @@ static void draw_modifier__stepped(uiLayout *layout, ID *id, FModifier *fcm, sho
RNA_pointer_create(id, &RNA_FModifierStepped, fcm, &ptr);
/* block 1: "stepping" settings */
- col= uiLayoutColumn(layout, 0);
- uiItemR(col, &ptr, "frame_step", 0, NULL, ICON_NONE);
- uiItemR(col, &ptr, "frame_offset", 0, NULL, ICON_NONE);
+ col = uiLayoutColumn(layout, 0);
+ uiItemR(col, &ptr, "frame_step", 0, NULL, ICON_NONE);
+ uiItemR(col, &ptr, "frame_offset", 0, NULL, ICON_NONE);
/* block 2: start range settings */
- col= uiLayoutColumn(layout, 1);
- uiItemR(col, &ptr, "use_frame_start", 0, NULL, ICON_NONE);
+ col = uiLayoutColumn(layout, 1);
+ uiItemR(col, &ptr, "use_frame_start", 0, NULL, ICON_NONE);
- sub = uiLayoutColumn(col, 1);
- uiLayoutSetActive(sub, RNA_boolean_get(&ptr, "use_frame_start"));
- uiItemR(sub, &ptr, "frame_start", 0, NULL, ICON_NONE);
+ sub = uiLayoutColumn(col, 1);
+ uiLayoutSetActive(sub, RNA_boolean_get(&ptr, "use_frame_start"));
+ uiItemR(sub, &ptr, "frame_start", 0, NULL, ICON_NONE);
/* block 3: end range settings */
- col= uiLayoutColumn(layout, 1);
- uiItemR(col, &ptr, "use_frame_end", 0, NULL, ICON_NONE);
+ col = uiLayoutColumn(layout, 1);
+ uiItemR(col, &ptr, "use_frame_end", 0, NULL, ICON_NONE);
- sub = uiLayoutColumn(col, 1);
- uiLayoutSetActive(sub, RNA_boolean_get(&ptr, "use_frame_end"));
- uiItemR(sub, &ptr, "frame_end", 0, NULL, ICON_NONE);
+ sub = uiLayoutColumn(col, 1);
+ uiLayoutSetActive(sub, RNA_boolean_get(&ptr, "use_frame_end"));
+ uiItemR(sub, &ptr, "frame_end", 0, NULL, ICON_NONE);
}
/* --------------- */
-void ANIM_uiTemplate_fmodifier_draw (uiLayout *layout, ID *id, ListBase *modifiers, FModifier *fcm)
+void ANIM_uiTemplate_fmodifier_draw(uiLayout *layout, ID *id, ListBase *modifiers, FModifier *fcm)
{
- FModifierTypeInfo *fmi= fmodifier_get_typeinfo(fcm);
+ FModifierTypeInfo *fmi = fmodifier_get_typeinfo(fcm);
uiLayout *box, *row, *sub, *col;
uiBlock *block;
uiBut *but;
- short width= 314;
+ short width = 314;
PointerRNA ptr;
/* init the RNA-pointer */
@@ -640,13 +640,13 @@ void ANIM_uiTemplate_fmodifier_draw (uiLayout *layout, ID *id, ListBase *modifie
/* draw header */
{
/* get layout-row + UI-block for this */
- box= uiLayoutBox(layout);
+ box = uiLayoutBox(layout);
- row= uiLayoutRow(box, 0);
- block= uiLayoutGetBlock(row); // err...
+ row = uiLayoutRow(box, 0);
+ block = uiLayoutGetBlock(row); // err...
/* left-align -------------------------------------------- */
- sub= uiLayoutRow(row, 1);
+ sub = uiLayoutRow(row, 1);
uiLayoutSetAlignment(sub, UI_LAYOUT_ALIGN_LEFT);
uiBlockSetEmboss(block, UI_EMBOSSN);
@@ -664,7 +664,7 @@ void ANIM_uiTemplate_fmodifier_draw (uiLayout *layout, ID *id, ListBase *modifie
uiItemL(sub, "<Unknown Modifier>", ICON_NONE);
/* right-align ------------------------------------------- */
- sub= uiLayoutRow(row, 1);
+ sub = uiLayoutRow(row, 1);
uiLayoutSetAlignment(sub, UI_LAYOUT_ALIGN_RIGHT);
@@ -675,7 +675,7 @@ void ANIM_uiTemplate_fmodifier_draw (uiLayout *layout, ID *id, ListBase *modifie
/* delete button */
but = uiDefIconBut(block, BUT, B_REDR, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y,
- NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Delete F-Curve Modifier"));
+ NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Delete F-Curve Modifier"));
uiButSetFunc(but, delete_fmodifier_cb, modifiers, fcm);
uiBlockSetEmboss(block, UI_EMBOSS);
@@ -684,7 +684,7 @@ void ANIM_uiTemplate_fmodifier_draw (uiLayout *layout, ID *id, ListBase *modifie
/* when modifier is expanded, draw settings */
if (fcm->flag & FMODIFIER_FLAG_EXPANDED) {
/* set up the flexible-box layout which acts as the backdrop for the modifier settings */
- box= uiLayoutBox(layout);
+ box = uiLayoutBox(layout);
/* draw settings for individual modifiers */
switch (fcm->type) {
@@ -729,7 +729,7 @@ void ANIM_uiTemplate_fmodifier_draw (uiLayout *layout, ID *id, ListBase *modifie
col = uiLayoutColumn(box, 1);
/* top row: use restricted range */
- row= uiLayoutRow(col, 1);
+ row = uiLayoutRow(col, 1);
uiItemR(row, &ptr, "use_restricted_range", 0, NULL, ICON_NONE);
if (fcm->flag & FMODIFIER_FLAG_RANGERESTRICT) {
@@ -769,7 +769,7 @@ static ListBase fmodifier_copypaste_buf = {NULL, NULL};
/* ---------- */
/* free the copy/paste buffer */
-void free_fmodifiers_copybuf (void)
+void free_fmodifiers_copybuf(void)
{
/* just free the whole buffer */
free_fmodifiers(&fmodifier_copypaste_buf);
@@ -779,7 +779,7 @@ void free_fmodifiers_copybuf (void)
* assuming that the buffer has been cleared already with free_fmodifiers_copybuf()
* - active: only copy the active modifier
*/
-short ANIM_fmodifiers_copy_to_buf (ListBase *modifiers, short active)
+short ANIM_fmodifiers_copy_to_buf(ListBase *modifiers, short active)
{
short ok = 1;
@@ -808,7 +808,7 @@ short ANIM_fmodifiers_copy_to_buf (ListBase *modifiers, short active)
/* 'Paste' the F-Modifier(s) from the buffer to the specified list
* - replace: free all the existing modifiers to leave only the pasted ones
*/
-short ANIM_fmodifiers_paste_from_buf (ListBase *modifiers, short replace)
+short ANIM_fmodifiers_paste_from_buf(ListBase *modifiers, short replace)
{
FModifier *fcm;
short ok = 0;
@@ -822,7 +822,7 @@ short ANIM_fmodifiers_paste_from_buf (ListBase *modifiers, short replace)
free_fmodifiers(modifiers);
/* now copy over all the modifiers in the buffer to the end of the list */
- for (fcm= fmodifier_copypaste_buf.first; fcm; fcm= fcm->next) {
+ for (fcm = fmodifier_copypaste_buf.first; fcm; fcm = fcm->next) {
/* make a copy of it */
FModifier *fcmN = copy_fmodifier(fcm);
diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c
index 0e0ff0defbb..cb7dc7ac206 100644
--- a/source/blender/editors/animation/keyframes_draw.c
+++ b/source/blender/editors/animation/keyframes_draw.c
@@ -63,7 +63,7 @@
#include "BKE_key.h"
#include "BKE_material.h"
-#include "BKE_global.h" // XXX remove me!
+#include "BKE_global.h" // XXX remove me!
#include "BIF_gl.h"
@@ -80,10 +80,10 @@
/* Comparator callback used for ActKeyColumns and cframe float-value pointer */
/* NOTE: this is exported to other modules that use the ActKeyColumns for finding keyframes */
-short compare_ak_cfraPtr (void *node, void *data)
+short compare_ak_cfraPtr(void *node, void *data)
{
- ActKeyColumn *ak= (ActKeyColumn *)node;
- float *cframe= data;
+ ActKeyColumn *ak = (ActKeyColumn *)node;
+ float *cframe = data;
if (*cframe < ak->cfra)
return -1;
@@ -96,10 +96,10 @@ short compare_ak_cfraPtr (void *node, void *data)
/* --------------- */
/* Comparator callback used for ActKeyColumns and BezTriple */
-static short compare_ak_bezt (void *node, void *data)
+static short compare_ak_bezt(void *node, void *data)
{
- ActKeyColumn *ak= (ActKeyColumn *)node;
- BezTriple *bezt= (BezTriple *)data;
+ ActKeyColumn *ak = (ActKeyColumn *)node;
+ BezTriple *bezt = (BezTriple *)data;
if (bezt->vec[1][0] < ak->cfra)
return -1;
@@ -110,15 +110,15 @@ static short compare_ak_bezt (void *node, void *data)
}
/* New node callback used for building ActKeyColumns from BezTriples */
-static DLRBT_Node *nalloc_ak_bezt (void *data)
+static DLRBT_Node *nalloc_ak_bezt(void *data)
{
- ActKeyColumn *ak= MEM_callocN(sizeof(ActKeyColumn), "ActKeyColumn");
- BezTriple *bezt= (BezTriple *)data;
+ ActKeyColumn *ak = MEM_callocN(sizeof(ActKeyColumn), "ActKeyColumn");
+ BezTriple *bezt = (BezTriple *)data;
/* store settings based on state of BezTriple */
- ak->cfra= bezt->vec[1][0];
- ak->sel= BEZSELECTED(bezt) ? SELECT : 0;
- ak->key_type= BEZKEYTYPE(bezt);
+ ak->cfra = bezt->vec[1][0];
+ ak->sel = BEZSELECTED(bezt) ? SELECT : 0;
+ ak->key_type = BEZKEYTYPE(bezt);
/* set 'modified', since this is used to identify long keyframes */
ak->modified = 1;
@@ -127,10 +127,10 @@ static DLRBT_Node *nalloc_ak_bezt (void *data)
}
/* Node updater callback used for building ActKeyColumns from BezTriples */
-static void nupdate_ak_bezt (void *node, void *data)
+static void nupdate_ak_bezt(void *node, void *data)
{
- ActKeyColumn *ak= (ActKeyColumn *)node;
- BezTriple *bezt= (BezTriple *)data;
+ ActKeyColumn *ak = (ActKeyColumn *)node;
+ BezTriple *bezt = (BezTriple *)data;
/* set selection status and 'touched' status */
if (BEZSELECTED(bezt)) ak->sel = SELECT;
@@ -138,16 +138,16 @@ static void nupdate_ak_bezt (void *node, void *data)
/* for keyframe type, 'proper' keyframes have priority over breakdowns (and other types for now) */
if (BEZKEYTYPE(bezt) == BEZT_KEYTYPE_KEYFRAME)
- ak->key_type= BEZT_KEYTYPE_KEYFRAME;
+ ak->key_type = BEZT_KEYTYPE_KEYFRAME;
}
/* ......... */
/* Comparator callback used for ActKeyColumns and GPencil frame */
-static short compare_ak_gpframe (void *node, void *data)
+static short compare_ak_gpframe(void *node, void *data)
{
- ActKeyColumn *ak= (ActKeyColumn *)node;
- bGPDframe *gpf= (bGPDframe *)data;
+ ActKeyColumn *ak = (ActKeyColumn *)node;
+ bGPDframe *gpf = (bGPDframe *)data;
if (gpf->framenum < ak->cfra)
return -1;
@@ -158,14 +158,14 @@ static short compare_ak_gpframe (void *node, void *data)
}
/* New node callback used for building ActKeyColumns from GPencil frames */
-static DLRBT_Node *nalloc_ak_gpframe (void *data)
+static DLRBT_Node *nalloc_ak_gpframe(void *data)
{
- ActKeyColumn *ak= MEM_callocN(sizeof(ActKeyColumn), "ActKeyColumnGPF");
- bGPDframe *gpf= (bGPDframe *)data;
+ ActKeyColumn *ak = MEM_callocN(sizeof(ActKeyColumn), "ActKeyColumnGPF");
+ bGPDframe *gpf = (bGPDframe *)data;
/* store settings based on state of BezTriple */
- ak->cfra= gpf->framenum;
- ak->sel= (gpf->flag & GP_FRAME_SELECT) ? SELECT : 0;
+ ak->cfra = gpf->framenum;
+ ak->sel = (gpf->flag & GP_FRAME_SELECT) ? SELECT : 0;
/* set 'modified', since this is used to identify long keyframes */
ak->modified = 1;
@@ -174,10 +174,10 @@ static DLRBT_Node *nalloc_ak_gpframe (void *data)
}
/* Node updater callback used for building ActKeyColumns from GPencil frames */
-static void nupdate_ak_gpframe (void *node, void *data)
+static void nupdate_ak_gpframe(void *node, void *data)
{
- ActKeyColumn *ak= (ActKeyColumn *)node;
- bGPDframe *gpf= (bGPDframe *)data;
+ ActKeyColumn *ak = (ActKeyColumn *)node;
+ bGPDframe *gpf = (bGPDframe *)data;
/* set selection status and 'touched' status */
if (gpf->flag & GP_FRAME_SELECT) ak->sel = SELECT;
@@ -207,36 +207,36 @@ static void add_gpframe_to_keycolumns_list(DLRBT_Tree *keys, bGPDframe *gpf)
/* ActBeztColumns (Helpers for Long Keyframes) ------------------------------ */
/* maximum size of default buffer for BezTriple columns */
-#define MAX_ABK_BUFSIZE 4
+#define MAX_ABK_BUFSIZE 4
/* BezTriple Container Node */
// NOTE: only used internally while building Long Keyframes for now, but may be useful externally?
typedef struct ActBeztColumn {
/* Tree Node interface ---------------- */
- /* ListBase linkage */
+ /* ListBase linkage */
struct ActBeztColumn *next, *prev;
- /* sorting-tree linkage */
- struct ActBeztColumn *left, *right; /* 'children' of this node, less than and greater than it (respectively) */
- struct ActBeztColumn *parent; /* parent of this node in the tree */
- char tree_col; /* DLRB_BLACK or DLRB_RED */
+ /* sorting-tree linkage */
+ struct ActBeztColumn *left, *right; /* 'children' of this node, less than and greater than it (respectively) */
+ struct ActBeztColumn *parent; /* parent of this node in the tree */
+ char tree_col; /* DLRB_BLACK or DLRB_RED */
char pad;
/* BezTriple Store -------------------- */
- short numBezts; /* number of BezTriples on this frame */
- float cfra; /* frame that the BezTriples occur on */
+ short numBezts; /* number of BezTriples on this frame */
+ float cfra; /* frame that the BezTriples occur on */
- BezTriple *bezts[MAX_ABK_BUFSIZE]; /* buffer of pointers to BezTriples on the same frame */
+ BezTriple *bezts[MAX_ABK_BUFSIZE]; /* buffer of pointers to BezTriples on the same frame */
//BezTriple **bezts_extra; /* secondary buffer of pointers if need be */
} ActBeztColumn;
/* --------------- */
/* Comparator callback used for ActBeztColumns and BezTriple */
-static short compare_abk_bezt (void *node, void *data)
+static short compare_abk_bezt(void *node, void *data)
{
- ActBeztColumn *abk= (ActBeztColumn *)node;
- BezTriple *bezt= (BezTriple *)data;
+ ActBeztColumn *abk = (ActBeztColumn *)node;
+ BezTriple *bezt = (BezTriple *)data;
if (bezt->vec[1][0] < abk->cfra)
return -1;
@@ -247,23 +247,23 @@ static short compare_abk_bezt (void *node, void *data)
}
/* New node callback used for building ActBeztColumns from BezTriples */
-static DLRBT_Node *nalloc_abk_bezt (void *data)
+static DLRBT_Node *nalloc_abk_bezt(void *data)
{
- ActBeztColumn *abk= MEM_callocN(sizeof(ActBeztColumn), "ActKeyColumn");
- BezTriple *bezt= (BezTriple *)data;
+ ActBeztColumn *abk = MEM_callocN(sizeof(ActBeztColumn), "ActKeyColumn");
+ BezTriple *bezt = (BezTriple *)data;
/* store the BeztTriple in the buffer, and keep track of its frame number */
- abk->cfra= bezt->vec[1][0];
- abk->bezts[abk->numBezts++]= bezt;
+ abk->cfra = bezt->vec[1][0];
+ abk->bezts[abk->numBezts++] = bezt;
return (DLRBT_Node *)abk;
}
/* Node updater callback used for building ActBeztColumns from BezTriples */
-static void nupdate_abk_bezt (void *node, void *data)
+static void nupdate_abk_bezt(void *node, void *data)
{
- ActBeztColumn *abk= (ActBeztColumn *)node;
- BezTriple *bezt= (BezTriple *)data;
+ ActBeztColumn *abk = (ActBeztColumn *)node;
+ BezTriple *bezt = (BezTriple *)data;
/* just add the BezTriple to the buffer if there's space, or allocate a new one */
if (abk->numBezts >= MAX_ABK_BUFSIZE) {
@@ -274,14 +274,14 @@ static void nupdate_abk_bezt (void *node, void *data)
}
else {
/* just store an extra one */
- abk->bezts[abk->numBezts++]= bezt;
+ abk->bezts[abk->numBezts++] = bezt;
}
}
/* --------------- */
/* Return the BezTriple in the given ActBeztColumn that matches the requested value */
-static BezTriple *abk_get_bezt_with_value (ActBeztColumn *abk, float value)
+static BezTriple *abk_get_bezt_with_value(ActBeztColumn *abk, float value)
{
BezTriple *bezt;
int i;
@@ -293,12 +293,12 @@ static BezTriple *abk_get_bezt_with_value (ActBeztColumn *abk, float value)
/* look over each BezTriple in this container */
for (i = 0; i < abk->numBezts; i++) {
/* only do exact match for now... */
- if (/*i >= MAX_ABK_BUFSIZE*/0) {
+ if (/*i >= MAX_ABK_BUFSIZE*/ 0) {
// TODO: this case needs special handling
}
else {
/* just use the default buffer */
- bezt= abk->bezts[i];
+ bezt = abk->bezts[i];
if (bezt->vec[1][1] == value)
return bezt;
@@ -312,10 +312,10 @@ static BezTriple *abk_get_bezt_with_value (ActBeztColumn *abk, float value)
/* Comparator callback used for ActKeyBlock and cframe float-value pointer */
/* NOTE: this is exported to other modules that use the ActKeyBlocks for finding long-keyframes */
-short compare_ab_cfraPtr (void *node, void *data)
+short compare_ab_cfraPtr(void *node, void *data)
{
- ActKeyBlock *ab= (ActKeyBlock *)node;
- float *cframe= data;
+ ActKeyBlock *ab = (ActKeyBlock *)node;
+ float *cframe = data;
if (*cframe < ab->start)
return -1;
@@ -330,13 +330,13 @@ short compare_ab_cfraPtr (void *node, void *data)
/* Create a ActKeyColumn for a pair of BezTriples */
static ActKeyBlock *bezts_to_new_actkeyblock(BezTriple *prev, BezTriple *beztn)
{
- ActKeyBlock *ab= MEM_callocN(sizeof(ActKeyBlock), "ActKeyBlock");
+ ActKeyBlock *ab = MEM_callocN(sizeof(ActKeyBlock), "ActKeyBlock");
- ab->start= prev->vec[1][0];
- ab->end= beztn->vec[1][0];
- ab->val= beztn->vec[1][1];
+ ab->start = prev->vec[1][0];
+ ab->end = beztn->vec[1][0];
+ ab->val = beztn->vec[1][1];
- ab->sel= (BEZSELECTED(prev) || BEZSELECTED(beztn)) ? SELECT : 0;
+ ab->sel = (BEZSELECTED(prev) || BEZSELECTED(beztn)) ? SELECT : 0;
ab->modified = 1;
return ab;
@@ -344,44 +344,44 @@ static ActKeyBlock *bezts_to_new_actkeyblock(BezTriple *prev, BezTriple *beztn)
static void add_bezt_to_keyblocks_list(DLRBT_Tree *blocks, DLRBT_Tree *beztTree, BezTriple *beztn)
{
- ActKeyBlock *new_ab= NULL;
+ ActKeyBlock *new_ab = NULL;
ActBeztColumn *abk;
BezTriple *prev;
/* get the BezTriple immediately before the given one which has the same value */
- /* the keyframes immediately before the ones containing the specified keyframe */
- abk= (ActBeztColumn *)BLI_dlrbTree_search_prev(beztTree, compare_abk_bezt, beztn);
- /* if applicable, the BezTriple with the same value */
- prev= (abk) ? abk_get_bezt_with_value(abk, beztn->vec[1][1]) : NULL;
+ /* the keyframes immediately before the ones containing the specified keyframe */
+ abk = (ActBeztColumn *)BLI_dlrbTree_search_prev(beztTree, compare_abk_bezt, beztn);
+ /* if applicable, the BezTriple with the same value */
+ prev = (abk) ? abk_get_bezt_with_value(abk, beztn->vec[1][1]) : NULL;
/* check if block needed - same value(s)?
* -> firstly, handles must have same central value as each other
* -> secondly, handles which control that section of the curve must be constant
*/
if ((!prev) || (!beztn)) return;
- if (IS_EQF(beztn->vec[1][1], prev->vec[1][1])==0) return;
- if (IS_EQF(beztn->vec[1][1], beztn->vec[0][1])==0) return;
- if (IS_EQF(prev->vec[1][1], prev->vec[2][1])==0) return;
+ if (IS_EQF(beztn->vec[1][1], prev->vec[1][1]) == 0) return;
+ if (IS_EQF(beztn->vec[1][1], beztn->vec[0][1]) == 0) return;
+ if (IS_EQF(prev->vec[1][1], prev->vec[2][1]) == 0) return;
/* if there are no blocks already, just add as root */
if (blocks->root == NULL) {
/* just add this as the root, then call the tree-balancing functions to validate */
- new_ab= bezts_to_new_actkeyblock(prev, beztn);
- blocks->root= (DLRBT_Node *)new_ab;
+ new_ab = bezts_to_new_actkeyblock(prev, beztn);
+ blocks->root = (DLRBT_Node *)new_ab;
}
else {
- ActKeyBlock *ab, *abn=NULL;
+ ActKeyBlock *ab, *abn = NULL;
/* try to find a keyblock that starts on the previous beztriple, and add a new one if none start there
* Note: we can't search from end to try to optimize this as it causes errors there's
- * an A ___ B |---| B situation
+ * an A ___ B |---| B situation
*/
// FIXME: here there is a bug where we are trying to get the summary for the following channels
// A|--------------|A ______________ B|--------------|B
// A|------------------------------------------------|A
// A|----|A|---|A|-----------------------------------|A
- for (ab= blocks->root; ab; ab= abn) {
+ for (ab = blocks->root; ab; ab = abn) {
/* check if this is a match, or whether we go left or right */
if (ab->start == prev->vec[1][0]) {
/* set selection status and 'touched' status */
@@ -392,24 +392,24 @@ static void add_bezt_to_keyblocks_list(DLRBT_Tree *blocks, DLRBT_Tree *beztTree,
return;
}
else {
- ActKeyBlock **abnp= NULL;
+ ActKeyBlock **abnp = NULL;
/* check if go left or right, but if not available, add new node */
if (ab->start < prev->vec[1][0])
- abnp= &ab->right;
+ abnp = &ab->right;
else
- abnp= &ab->left;
+ abnp = &ab->left;
/* if this does not exist, add a new node, otherwise continue... */
if (*abnp == NULL) {
/* add a new node representing this, and attach it to the relevant place */
- new_ab= bezts_to_new_actkeyblock(prev, beztn);
- new_ab->parent= ab;
- *abnp= new_ab;
+ new_ab = bezts_to_new_actkeyblock(prev, beztn);
+ new_ab->parent = ab;
+ *abnp = new_ab;
break;
}
else
- abn= *abnp;
+ abn = *abnp;
}
}
}
@@ -421,7 +421,7 @@ static void add_bezt_to_keyblocks_list(DLRBT_Tree *blocks, DLRBT_Tree *beztTree,
/* --------- */
/* Handle the 'touched' status of ActKeyColumn tree nodes */
-static void set_touched_actkeycolumn (ActKeyColumn *ak)
+static void set_touched_actkeycolumn(ActKeyColumn *ak)
{
/* sanity check */
if (ak == NULL)
@@ -429,7 +429,7 @@ static void set_touched_actkeycolumn (ActKeyColumn *ak)
/* deal with self first */
if (ak->modified) {
- ak->modified= 0;
+ ak->modified = 0;
ak->totcurve++;
}
@@ -439,7 +439,7 @@ static void set_touched_actkeycolumn (ActKeyColumn *ak)
}
/* Handle the 'touched' status of ActKeyBlock tree nodes */
-static void set_touched_actkeyblock (ActKeyBlock *ab)
+static void set_touched_actkeyblock(ActKeyBlock *ab)
{
/* sanity check */
if (ab == NULL)
@@ -447,7 +447,7 @@ static void set_touched_actkeyblock (ActKeyBlock *ab)
/* deal with self first */
if (ab->modified) {
- ab->modified= 0;
+ ab->modified = 0;
ab->totcurve++;
}
@@ -459,7 +459,7 @@ static void set_touched_actkeyblock (ActKeyBlock *ab)
/* --------- */
/* Checks if ActKeyBlock should exist... */
-short actkeyblock_is_valid (ActKeyBlock *ab, DLRBT_Tree *keys)
+short actkeyblock_is_valid(ActKeyBlock *ab, DLRBT_Tree *keys)
{
ActKeyColumn *ak;
short startCurves, endCurves, totCurves;
@@ -469,17 +469,17 @@ short actkeyblock_is_valid (ActKeyBlock *ab, DLRBT_Tree *keys)
return 0;
/* find out how many curves occur at each keyframe */
- ak= (ActKeyColumn *)BLI_dlrbTree_search_exact(keys, compare_ak_cfraPtr, &ab->start);
- startCurves = (ak)? ak->totcurve: 0;
+ ak = (ActKeyColumn *)BLI_dlrbTree_search_exact(keys, compare_ak_cfraPtr, &ab->start);
+ startCurves = (ak) ? ak->totcurve : 0;
- ak= (ActKeyColumn *)BLI_dlrbTree_search_exact(keys, compare_ak_cfraPtr, &ab->end);
- endCurves = (ak)? ak->totcurve: 0;
+ ak = (ActKeyColumn *)BLI_dlrbTree_search_exact(keys, compare_ak_cfraPtr, &ab->end);
+ endCurves = (ak) ? ak->totcurve : 0;
/* only draw keyblock if it appears in at all of the keyframes at lowest end */
if (!startCurves && !endCurves)
return 0;
- totCurves = (startCurves>endCurves)? endCurves: startCurves;
+ totCurves = (startCurves > endCurves) ? endCurves : startCurves;
return (ab->totcurve >= totCurves);
}
@@ -487,52 +487,54 @@ short actkeyblock_is_valid (ActKeyBlock *ab, DLRBT_Tree *keys)
/* coordinates for diamond shape */
static const float _unit_diamond_shape[4][2] = {
- {0.0f, 1.0f}, /* top vert */
- {1.0f, 0.0f}, /* mid-right */
- {0.0f, -1.0f}, /* bottom vert */
- {-1.0f, 0.0f} /* mid-left */
+ {0.0f, 1.0f}, /* top vert */
+ {1.0f, 0.0f}, /* mid-right */
+ {0.0f, -1.0f}, /* bottom vert */
+ {-1.0f, 0.0f} /* mid-left */
};
/* draw a simple diamond shape with OpenGL */
-void draw_keyframe_shape (float x, float y, float xscale, float hsize, short sel, short key_type, short mode, float alpha)
+void draw_keyframe_shape(float x, float y, float xscale, float hsize, short sel, short key_type, short mode, float alpha)
{
- static GLuint displist1=0;
- static GLuint displist2=0;
+ static GLuint displist1 = 0;
+ static GLuint displist2 = 0;
/* initialize 2 display lists for diamond shape - one empty, one filled */
if (displist1 == 0) {
- displist1= glGenLists(1);
- glNewList(displist1, GL_COMPILE);
+ displist1 = glGenLists(1);
+ glNewList(displist1, GL_COMPILE);
- glBegin(GL_LINE_LOOP);
- glVertex2fv(_unit_diamond_shape[0]);
- glVertex2fv(_unit_diamond_shape[1]);
- glVertex2fv(_unit_diamond_shape[2]);
- glVertex2fv(_unit_diamond_shape[3]);
- glEnd();
+ glBegin(GL_LINE_LOOP);
+ glVertex2fv(_unit_diamond_shape[0]);
+ glVertex2fv(_unit_diamond_shape[1]);
+ glVertex2fv(_unit_diamond_shape[2]);
+ glVertex2fv(_unit_diamond_shape[3]);
+ glEnd();
+
glEndList();
}
if (displist2 == 0) {
- displist2= glGenLists(1);
- glNewList(displist2, GL_COMPILE);
+ displist2 = glGenLists(1);
+ glNewList(displist2, GL_COMPILE);
- glBegin(GL_QUADS);
- glVertex2fv(_unit_diamond_shape[0]);
- glVertex2fv(_unit_diamond_shape[1]);
- glVertex2fv(_unit_diamond_shape[2]);
- glVertex2fv(_unit_diamond_shape[3]);
- glEnd();
+ glBegin(GL_QUADS);
+ glVertex2fv(_unit_diamond_shape[0]);
+ glVertex2fv(_unit_diamond_shape[1]);
+ glVertex2fv(_unit_diamond_shape[2]);
+ glVertex2fv(_unit_diamond_shape[3]);
+ glEnd();
+
glEndList();
}
/* tweak size of keyframe shape according to type of keyframe
- * - 'proper' keyframes have key_type=0, so get drawn at full size
+ * - 'proper' keyframes have key_type=0, so get drawn at full size
*/
- hsize -= 0.5f*key_type;
+ hsize -= 0.5f * key_type;
/* adjust view transform before starting */
glTranslatef(x, y, 0.0f);
- glScalef(1.0f/xscale*hsize, hsize, 1.0f);
+ glScalef(1.0f / xscale * hsize, hsize, 1.0f);
/* anti-aliased lines for more consistent appearance */
glEnable(GL_LINE_SMOOTH);
@@ -546,29 +548,29 @@ void draw_keyframe_shape (float x, float y, float xscale, float hsize, short sel
if (sel) glColor4f(0.33f, 0.75f, 0.93f, alpha);
else glColor4f(0.70f, 0.86f, 0.91f, alpha);
}
- break;
+ break;
case BEZT_KEYTYPE_EXTREME: /* redish frames for now */
{
if (sel) glColor4f(0.95f, 0.5f, 0.5f, alpha);
else glColor4f(0.91f, 0.70f, 0.80f, alpha);
}
- break;
+ break;
case BEZT_KEYTYPE_JITTER: /* greenish frames for now? */
{
if (sel) glColor4f(0.38f, 0.75f, 0.26f, alpha);
else glColor4f(0.58f, 0.90f, 0.46f, alpha);
}
- break;
+ break;
case BEZT_KEYTYPE_KEYFRAME: /* traditional yellowish frames for now */
default:
{
- if (sel) UI_ThemeColorShadeAlpha(TH_STRIP_SELECT, 50, -255*(1.0f-alpha));
+ if (sel) UI_ThemeColorShadeAlpha(TH_STRIP_SELECT, 50, -255 * (1.0f - alpha));
else glColor4f(0.91f, 0.91f, 0.91f, alpha);
}
- break;
+ break;
}
glCallList(displist2);
@@ -584,7 +586,7 @@ void draw_keyframe_shape (float x, float y, float xscale, float hsize, short sel
glDisable(GL_LINE_SMOOTH);
/* restore view transform */
- glScalef(xscale/hsize, 1.0f/hsize, 1.0);
+ glScalef(xscale / hsize, 1.0f / hsize, 1.0f);
glTranslatef(-x, -y, 0.0f);
}
@@ -601,7 +603,7 @@ static void draw_keylist(View2D *v2d, DLRBT_Tree *keys, DLRBT_Tree *blocks, floa
/* draw keyblocks */
if (blocks) {
- for (ab= blocks->first; ab; ab= ab->next) {
+ for (ab = blocks->first; ab; ab = ab->next) {
if (actkeyblock_is_valid(ab, keys)) {
/* draw block */
if (ab->sel)
@@ -609,7 +611,7 @@ static void draw_keylist(View2D *v2d, DLRBT_Tree *keys, DLRBT_Tree *blocks, floa
else
UI_ThemeColor4(TH_STRIP);
- glRectf(ab->start, ypos-5, ab->end, ypos+5);
+ glRectf(ab->start, ypos - 5, ab->end, ypos + 5);
}
}
}
@@ -618,9 +620,9 @@ static void draw_keylist(View2D *v2d, DLRBT_Tree *keys, DLRBT_Tree *blocks, floa
if (keys) {
/* locked channels are less strongly shown, as feedback for locked channels in DopeSheet */
// TODO: allow this opacity factor to be themed?
- float kalpha = (channelLocked)? 0.35f : 1.0f;
+ float kalpha = (channelLocked) ? 0.35f : 1.0f;
- for (ak= keys->first; ak; ak= ak->next) {
+ for (ak = keys->first; ak; ak = ak->next) {
/* optimization: if keyframe doesn't appear within 5 units (screenspace) in visible area, don't draw
* - this might give some improvements, since we current have to flip between view/region matrices
*/
@@ -646,12 +648,12 @@ void draw_summary_channel(View2D *v2d, bAnimContext *ac, float ypos)
BLI_dlrbTree_init(&keys);
BLI_dlrbTree_init(&blocks);
- summary_to_keylist(ac, &keys, &blocks);
+ summary_to_keylist(ac, &keys, &blocks);
BLI_dlrbTree_linkedlist_sync(&keys);
BLI_dlrbTree_linkedlist_sync(&blocks);
- draw_keylist(v2d, &keys, &blocks, ypos, 0);
+ draw_keylist(v2d, &keys, &blocks, ypos, 0);
BLI_dlrbTree_free(&keys);
BLI_dlrbTree_free(&blocks);
@@ -664,12 +666,12 @@ void draw_scene_channel(View2D *v2d, bDopeSheet *ads, Scene *sce, float ypos)
BLI_dlrbTree_init(&keys);
BLI_dlrbTree_init(&blocks);
- scene_to_keylist(ads, sce, &keys, &blocks);
+ scene_to_keylist(ads, sce, &keys, &blocks);
BLI_dlrbTree_linkedlist_sync(&keys);
BLI_dlrbTree_linkedlist_sync(&blocks);
- draw_keylist(v2d, &keys, &blocks, ypos, 0);
+ draw_keylist(v2d, &keys, &blocks, ypos, 0);
BLI_dlrbTree_free(&keys);
BLI_dlrbTree_free(&blocks);
@@ -682,12 +684,12 @@ void draw_object_channel(View2D *v2d, bDopeSheet *ads, Object *ob, float ypos)
BLI_dlrbTree_init(&keys);
BLI_dlrbTree_init(&blocks);
- ob_to_keylist(ads, ob, &keys, &blocks);
+ ob_to_keylist(ads, ob, &keys, &blocks);
BLI_dlrbTree_linkedlist_sync(&keys);
BLI_dlrbTree_linkedlist_sync(&blocks);
- draw_keylist(v2d, &keys, &blocks, ypos, 0);
+ draw_keylist(v2d, &keys, &blocks, ypos, 0);
BLI_dlrbTree_free(&keys);
BLI_dlrbTree_free(&blocks);
@@ -700,12 +702,12 @@ void draw_fcurve_channel(View2D *v2d, AnimData *adt, FCurve *fcu, float ypos)
BLI_dlrbTree_init(&keys);
BLI_dlrbTree_init(&blocks);
- fcurve_to_keylist(adt, fcu, &keys, &blocks);
+ fcurve_to_keylist(adt, fcu, &keys, &blocks);
BLI_dlrbTree_linkedlist_sync(&keys);
BLI_dlrbTree_linkedlist_sync(&blocks);
- draw_keylist(v2d, &keys, &blocks, ypos, (fcu->flag & FCURVE_PROTECTED));
+ draw_keylist(v2d, &keys, &blocks, ypos, (fcu->flag & FCURVE_PROTECTED));
BLI_dlrbTree_free(&keys);
BLI_dlrbTree_free(&blocks);
@@ -718,12 +720,12 @@ void draw_agroup_channel(View2D *v2d, AnimData *adt, bActionGroup *agrp, float y
BLI_dlrbTree_init(&keys);
BLI_dlrbTree_init(&blocks);
- agroup_to_keylist(adt, agrp, &keys, &blocks);
+ agroup_to_keylist(adt, agrp, &keys, &blocks);
BLI_dlrbTree_linkedlist_sync(&keys);
BLI_dlrbTree_linkedlist_sync(&blocks);
- draw_keylist(v2d, &keys, &blocks, ypos, (agrp->flag & AGRP_PROTECTED));
+ draw_keylist(v2d, &keys, &blocks, ypos, (agrp->flag & AGRP_PROTECTED));
BLI_dlrbTree_free(&keys);
BLI_dlrbTree_free(&blocks);
@@ -736,12 +738,12 @@ void draw_action_channel(View2D *v2d, AnimData *adt, bAction *act, float ypos)
BLI_dlrbTree_init(&keys);
BLI_dlrbTree_init(&blocks);
- action_to_keylist(adt, act, &keys, &blocks);
+ action_to_keylist(adt, act, &keys, &blocks);
BLI_dlrbTree_linkedlist_sync(&keys);
BLI_dlrbTree_linkedlist_sync(&blocks);
- draw_keylist(v2d, &keys, &blocks, ypos, 0);
+ draw_keylist(v2d, &keys, &blocks, ypos, 0);
BLI_dlrbTree_free(&keys);
BLI_dlrbTree_free(&blocks);
@@ -753,11 +755,11 @@ void draw_gpl_channel(View2D *v2d, bDopeSheet *ads, bGPDlayer *gpl, float ypos)
BLI_dlrbTree_init(&keys);
- gpl_to_keylist(ads, gpl, &keys);
+ gpl_to_keylist(ads, gpl, &keys);
BLI_dlrbTree_linkedlist_sync(&keys);
- draw_keylist(v2d, &keys, NULL, ypos, (gpl->flag & GP_LAYER_LOCKED));
+ draw_keylist(v2d, &keys, NULL, ypos, (gpl->flag & GP_LAYER_LOCKED));
BLI_dlrbTree_free(&keys);
}
@@ -772,11 +774,11 @@ void summary_to_keylist(bAnimContext *ac, DLRBT_Tree *keys, DLRBT_Tree *blocks)
int filter;
/* 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 */
- for (ale= anim_data.first; ale; ale= ale->next)
+ for (ale = anim_data.first; ale; ale = ale->next)
fcurve_to_keylist(ale->adt, ale->data, keys, blocks);
BLI_freelistN(&anim_data);
@@ -806,11 +808,11 @@ void scene_to_keylist(bDopeSheet *ads, Scene *sce, DLRBT_Tree *keys, DLRBT_Tree
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 */
- for (ale= anim_data.first; ale; ale= ale->next)
+ for (ale = anim_data.first; ale; ale = ale->next)
fcurve_to_keylist(ale->adt, ale->data, keys, blocks);
BLI_freelistN(&anim_data);
@@ -842,11 +844,11 @@ void ob_to_keylist(bDopeSheet *ads, Object *ob, DLRBT_Tree *keys, DLRBT_Tree *bl
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 */
- for (ale= anim_data.first; ale; ale= ale->next)
+ for (ale = anim_data.first; ale; ale = ale->next)
fcurve_to_keylist(ale->adt, ale->data, keys, blocks);
BLI_freelistN(&anim_data);
@@ -868,10 +870,10 @@ void fcurve_to_keylist(AnimData *adt, FCurve *fcu, DLRBT_Tree *keys, DLRBT_Tree
*/
if (blocks) {
/* init new tree */
- beztTree= BLI_dlrbTree_new();
+ beztTree = BLI_dlrbTree_new();
/* populate tree with the BezTriples */
- for (v=0, bezt=fcu->bezt; v < fcu->totvert; v++, bezt++)
+ for (v = 0, bezt = fcu->bezt; v < fcu->totvert; v++, bezt++)
BLI_dlrbTree_add(beztTree, compare_abk_bezt, nalloc_abk_bezt, nupdate_abk_bezt, bezt);
/* make sure that it is suitable for linked-list searching too */
@@ -879,7 +881,7 @@ void fcurve_to_keylist(AnimData *adt, FCurve *fcu, DLRBT_Tree *keys, DLRBT_Tree
}
/* loop through beztriples, making ActKeysColumns and ActKeyBlocks */
- for (v=0, bezt=fcu->bezt; v < fcu->totvert; v++, bezt++) {
+ for (v = 0, bezt = fcu->bezt; v < fcu->totvert; v++, bezt++) {
add_bezt_to_keycolumns_list(keys, bezt);
if (blocks) add_bezt_to_keyblocks_list(blocks, beztTree, bezt);
}
@@ -908,7 +910,7 @@ void agroup_to_keylist(AnimData *adt, bActionGroup *agrp, DLRBT_Tree *keys, DLRB
if (agrp) {
/* loop through F-Curves */
- for (fcu= agrp->channels.first; fcu && fcu->grp==agrp; fcu= fcu->next) {
+ for (fcu = agrp->channels.first; fcu && fcu->grp == agrp; fcu = fcu->next) {
fcurve_to_keylist(adt, fcu, keys, blocks);
}
}
@@ -920,7 +922,7 @@ void action_to_keylist(AnimData *adt, bAction *act, DLRBT_Tree *keys, DLRBT_Tree
if (act) {
/* loop through F-Curves */
- for (fcu= act->curves.first; fcu; fcu= fcu->next) {
+ for (fcu = act->curves.first; fcu; fcu = fcu->next) {
fcurve_to_keylist(adt, fcu, keys, blocks);
}
}
@@ -933,7 +935,7 @@ void gpl_to_keylist(bDopeSheet *UNUSED(ads), bGPDlayer *gpl, DLRBT_Tree *keys)
if (gpl && keys) {
/* although the frames should already be in an ordered list, they are not suitable for displaying yet */
- for (gpf= gpl->frames.first; gpf; gpf= gpf->next)
+ for (gpf = gpl->frames.first; gpf; gpf = gpf->next)
add_gpframe_to_keycolumns_list(keys, gpf);
}
}
diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c
index 4e59216a39c..b92d0fb345a 100644
--- a/source/blender/editors/animation/keyframes_edit.c
+++ b/source/blender/editors/animation/keyframes_edit.c
@@ -102,9 +102,9 @@ short ANIM_fcurve_keyframes_loop(KeyframeEditData *ked, FCurve *fcu, KeyframeEdi
/* set the F-Curve into the editdata so that it can be accessed */
if (ked) {
- ked->fcu= fcu;
- ked->curIndex= 0;
- ked->curflags= ok;
+ ked->fcu = fcu;
+ ked->curIndex = 0;
+ ked->curflags = ok;
}
/* if function to apply to bezier curves is set, then loop through executing it on beztriples */
@@ -113,16 +113,16 @@ short ANIM_fcurve_keyframes_loop(KeyframeEditData *ked, FCurve *fcu, KeyframeEdi
* (this is should be more efficient than checking for it in every loop)
*/
if (key_ok) {
- for (bezt=fcu->bezt, i=0; i < fcu->totvert; bezt++, i++) {
+ for (bezt = fcu->bezt, i = 0; i < fcu->totvert; bezt++, i++) {
if (ked) {
/* advance the index, and reset the ok flags (to not influence the result) */
- ked->curIndex= i;
- ked->curflags= 0;
+ ked->curIndex = i;
+ ked->curflags = 0;
}
/* Only operate on this BezTriple if it fullfills the criteria of the validation func */
if ( (ok = key_ok(ked, bezt)) ) {
- if (ked) ked->curflags= ok;
+ if (ked) ked->curflags = ok;
/* Exit with return-code '1' if function returns positive
* This is useful if finding if some BezTriple satisfies a condition.
@@ -132,8 +132,8 @@ short ANIM_fcurve_keyframes_loop(KeyframeEditData *ked, FCurve *fcu, KeyframeEdi
}
}
else {
- for (bezt=fcu->bezt, i=0; i < fcu->totvert; bezt++, i++) {
- if (ked) ked->curIndex= i;
+ for (bezt = fcu->bezt, i = 0; i < fcu->totvert; bezt++, i++) {
+ if (ked) ked->curIndex = i;
/* Exit with return-code '1' if function returns positive
* This is useful if finding if some BezTriple satisfies a condition.
@@ -145,9 +145,9 @@ short ANIM_fcurve_keyframes_loop(KeyframeEditData *ked, FCurve *fcu, KeyframeEdi
/* unset the F-Curve from the editdata now that it's done */
if (ked) {
- ked->fcu= NULL;
- ked->curIndex= 0;
- ked->curflags= 0;
+ ked->fcu = NULL;
+ ked->curIndex = 0;
+ ked->curflags = 0;
}
/* if fcu_cb (F-Curve post-editing callback) has been specified then execute it */
@@ -170,7 +170,7 @@ static short agrp_keyframes_loop(KeyframeEditData *ked, bActionGroup *agrp, Keyf
return 0;
/* only iterate over the F-Curves that are in this group */
- for (fcu= agrp->channels.first; fcu && fcu->grp==agrp; fcu= fcu->next) {
+ for (fcu = agrp->channels.first; fcu && fcu->grp == agrp; fcu = fcu->next) {
if (ANIM_fcurve_keyframes_loop(ked, fcu, key_ok, key_cb, fcu_cb))
return 1;
}
@@ -188,7 +188,7 @@ static short act_keyframes_loop(KeyframeEditData *ked, bAction *act, KeyframeEdi
return 0;
/* just loop through all F-Curves */
- for (fcu= act->curves.first; fcu; fcu= fcu->next) {
+ for (fcu = act->curves.first; fcu; fcu = fcu->next) {
if (ANIM_fcurve_keyframes_loop(ked, fcu, key_ok, key_cb, fcu_cb))
return 1;
}
@@ -203,7 +203,7 @@ static short ob_keyframes_loop(KeyframeEditData *ked, bDopeSheet *ads, Object *o
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
- int ret=0;
+ int ret = 0;
bAnimListElem dummychan = {NULL};
Base dummybase = {NULL};
@@ -224,12 +224,12 @@ static short ob_keyframes_loop(KeyframeEditData *ked, bDopeSheet *ads, Object *o
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, but stopping on the first one */
- for (ale= anim_data.first; ale; ale= ale->next) {
- if (ANIM_fcurve_keyframes_loop(ked, (FCurve*)ale->data, key_ok, key_cb, fcu_cb)) {
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ if (ANIM_fcurve_keyframes_loop(ked, (FCurve *)ale->data, key_ok, key_cb, fcu_cb)) {
ret = 1;
break;
}
@@ -248,7 +248,7 @@ static short scene_keyframes_loop(KeyframeEditData *ked, bDopeSheet *ads, Scene
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
- int ret=0;
+ int ret = 0;
bAnimListElem dummychan = {NULL};
@@ -266,12 +266,12 @@ static short scene_keyframes_loop(KeyframeEditData *ked, bDopeSheet *ads, Scene
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, but stopping on the first one */
- for (ale= anim_data.first; ale; ale= ale->next) {
- if (ANIM_fcurve_keyframes_loop(ked, (FCurve*)ale->data, key_ok, key_cb, fcu_cb)) {
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ if (ANIM_fcurve_keyframes_loop(ked, (FCurve *)ale->data, key_ok, key_cb, fcu_cb)) {
ret = 1;
break;
}
@@ -288,19 +288,19 @@ static short summary_keyframes_loop(KeyframeEditData *ked, bAnimContext *ac, Key
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
- int filter, ret_code=0;
+ int filter, ret_code = 0;
/* sanity check */
if (ac == NULL)
return 0;
/* get F-Curves to take keyframes from */
- filter= ANIMFILTER_DATA_VISIBLE;
+ filter = ANIMFILTER_DATA_VISIBLE;
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through each F-Curve, working on the keyframes until the first curve aborts */
- for (ale= anim_data.first; ale; ale= ale->next) {
- ret_code= ANIM_fcurve_keyframes_loop(ked, ale->data, key_ok, key_cb, fcu_cb);
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ ret_code = ANIM_fcurve_keyframes_loop(ked, ale->data, key_ok, key_cb, fcu_cb);
if (ret_code)
break;
@@ -388,16 +388,16 @@ void ANIM_editkeyframes_refresh(bAnimContext *ac)
bAnimListElem *ale;
int filter;
/* when not in graph view, don't use handles */
- SpaceIpo *sipo= (ac->spacetype == SPACE_IPO) ? (SpaceIpo *)ac->sl : NULL;
+ SpaceIpo *sipo = (ac->spacetype == SPACE_IPO) ? (SpaceIpo *)ac->sl : NULL;
const short use_handle = sipo ? !(sipo->flag & SIPO_NOHANDLES) : FALSE;
/* filter animation data */
- filter= ANIMFILTER_DATA_VISIBLE;
+ filter = ANIMFILTER_DATA_VISIBLE;
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop over F-Curves that are likely to have been edited, and check them */
- for (ale= anim_data.first; ale; ale= ale->next) {
- FCurve *fcu= ale->key_data;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ FCurve *fcu = ale->key_data;
/* make sure keyframes in F-Curve are all in order, and handles are in valid positions */
sort_time_fcurve(fcu);
@@ -439,7 +439,7 @@ static short ok_bezier_frame(KeyframeEditData *ked, BezTriple *bezt)
/* frame is stored in f1 property (this float accuracy check may need to be dropped?) */
#define KEY_CHECK_OK(_index) IS_EQF(bezt->vec[_index][0], ked->f1)
- KEYFRAME_OK_CHECKS(KEY_CHECK_OK);
+ KEYFRAME_OK_CHECKS(KEY_CHECK_OK);
#undef KEY_CHECK_OK
/* return ok flags */
@@ -452,7 +452,7 @@ static short ok_bezier_framerange(KeyframeEditData *ked, BezTriple *bezt)
/* frame range is stored in float properties */
#define KEY_CHECK_OK(_index) ((bezt->vec[_index][0] > ked->f1) && (bezt->vec[_index][0] < ked->f2))
- KEYFRAME_OK_CHECKS(KEY_CHECK_OK);
+ KEYFRAME_OK_CHECKS(KEY_CHECK_OK);
#undef KEY_CHECK_OK
/* return ok flags */
@@ -462,7 +462,7 @@ static short ok_bezier_framerange(KeyframeEditData *ked, BezTriple *bezt)
static short ok_bezier_selected(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
/* this macro checks all beztriple handles for selection...
- * only one of the verts has to be selected for this to be ok...
+ * only one of the verts has to be selected for this to be ok...
*/
if (BEZSELECTED(bezt))
return KEYFRAME_OK_ALL;
@@ -479,7 +479,7 @@ static short ok_bezier_value(KeyframeEditData *ked, BezTriple *bezt)
* - should value be stored in f2 instead so that we won't have conflicts when using f1 for frames too?
*/
#define KEY_CHECK_OK(_index) IS_EQF(bezt->vec[_index][1], ked->f1)
- KEYFRAME_OK_CHECKS(KEY_CHECK_OK);
+ KEYFRAME_OK_CHECKS(KEY_CHECK_OK);
#undef KEY_CHECK_OK
/* return ok flags */
@@ -492,7 +492,7 @@ static short ok_bezier_valuerange(KeyframeEditData *ked, BezTriple *bezt)
/* value range is stored in float properties */
#define KEY_CHECK_OK(_index) ((bezt->vec[_index][1] > ked->f1) && (bezt->vec[_index][1] < ked->f2))
- KEYFRAME_OK_CHECKS(KEY_CHECK_OK);
+ KEYFRAME_OK_CHECKS(KEY_CHECK_OK);
#undef KEY_CHECK_OK
/* return ok flags */
@@ -506,7 +506,7 @@ static short ok_bezier_region(KeyframeEditData *ked, BezTriple *bezt)
short ok = 0;
#define KEY_CHECK_OK(_index) BLI_in_rctf(ked->data, bezt->vec[_index][0], bezt->vec[_index][1])
- KEYFRAME_OK_CHECKS(KEY_CHECK_OK);
+ KEYFRAME_OK_CHECKS(KEY_CHECK_OK);
#undef KEY_CHECK_OK
/* return ok flags */
@@ -525,7 +525,7 @@ KeyframeEditFunc ANIM_editkeyframes_ok(short mode)
return ok_bezier_frame;
case BEZT_OK_FRAMERANGE: /* only if bezt falls within the specified frame range (floats) */
return ok_bezier_framerange;
- case BEZT_OK_SELECTED: /* only if bezt is selected (self) */
+ case BEZT_OK_SELECTED: /* only if bezt is selected (self) */
return ok_bezier_selected;
case BEZT_OK_VALUE: /* only if bezt value matches (float) */
return ok_bezier_value;
@@ -566,10 +566,10 @@ short bezt_to_cfraelem(KeyframeEditData *ked, BezTriple *bezt)
{
/* only if selected */
if (bezt->f2 & SELECT) {
- CfraElem *ce= MEM_callocN(sizeof(CfraElem), "cfraElem");
+ CfraElem *ce = MEM_callocN(sizeof(CfraElem), "cfraElem");
BLI_addtail(&ked->list, ce);
- ce->cfra= bezt->vec[1][0];
+ ce->cfra = bezt->vec[1][0];
}
return 0;
@@ -580,15 +580,15 @@ short bezt_to_cfraelem(KeyframeEditData *ked, BezTriple *bezt)
*/
void bezt_remap_times(KeyframeEditData *ked, BezTriple *bezt)
{
- KeyframeEditCD_Remap *rmap= (KeyframeEditCD_Remap*)ked->data;
+ KeyframeEditCD_Remap *rmap = (KeyframeEditCD_Remap *)ked->data;
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
- 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;
- bezt->vec[2][0]= scale*(bezt->vec[2][0] - rmap->oldMin) + rmap->newMin;
+ 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;
+ bezt->vec[2][0] = scale * (bezt->vec[2][0] - rmap->oldMin) + rmap->newMin;
}
/* ******************************************* */
@@ -598,27 +598,27 @@ void bezt_remap_times(KeyframeEditData *ked, BezTriple *bezt)
static short snap_bezier_nearest(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
if (bezt->f2 & SELECT)
- bezt->vec[1][0]= (float)(floorf(bezt->vec[1][0]+0.5f));
+ bezt->vec[1][0] = (float)(floorf(bezt->vec[1][0] + 0.5f));
return 0;
}
/* snaps the keyframe to the neares second */
static short snap_bezier_nearestsec(KeyframeEditData *ked, BezTriple *bezt)
{
- const Scene *scene= ked->scene;
+ const Scene *scene = ked->scene;
const float secf = (float)FPS;
if (bezt->f2 & SELECT)
- bezt->vec[1][0]= ((float)floor(bezt->vec[1][0]/secf + 0.5f) * secf);
+ bezt->vec[1][0] = ((float)floor(bezt->vec[1][0] / secf + 0.5f) * secf);
return 0;
}
/* snaps the keyframe to the current frame */
static short snap_bezier_cframe(KeyframeEditData *ked, BezTriple *bezt)
{
- const Scene *scene= ked->scene;
+ const Scene *scene = ked->scene;
if (bezt->f2 & SELECT)
- bezt->vec[1][0]= (float)CFRA;
+ bezt->vec[1][0] = (float)CFRA;
return 0;
}
@@ -626,7 +626,7 @@ static short snap_bezier_cframe(KeyframeEditData *ked, BezTriple *bezt)
static short snap_bezier_nearmarker(KeyframeEditData *ked, BezTriple *bezt)
{
if (bezt->f2 & SELECT)
- bezt->vec[1][0]= (float)ED_markers_find_nearest_marker_time(&ked->list, bezt->vec[1][0]);
+ bezt->vec[1][0] = (float)ED_markers_find_nearest_marker_time(&ked->list, bezt->vec[1][0]);
return 0;
}
@@ -634,10 +634,10 @@ static short snap_bezier_nearmarker(KeyframeEditData *ked, BezTriple *bezt)
static short snap_bezier_horizontal(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
if (bezt->f2 & SELECT) {
- bezt->vec[0][1]= bezt->vec[2][1]= bezt->vec[1][1];
+ bezt->vec[0][1] = bezt->vec[2][1] = bezt->vec[1][1];
- if (ELEM3(bezt->h1, HD_AUTO, HD_AUTO_ANIM, HD_VECT)) bezt->h1= HD_ALIGN;
- if (ELEM3(bezt->h2, HD_AUTO, HD_AUTO_ANIM, HD_VECT)) bezt->h2= HD_ALIGN;
+ if (ELEM3(bezt->h1, HD_AUTO, HD_AUTO_ANIM, HD_VECT)) bezt->h1 = HD_ALIGN;
+ if (ELEM3(bezt->h2, HD_AUTO, HD_AUTO_ANIM, HD_VECT)) bezt->h2 = HD_ALIGN;
}
return 0;
}
@@ -646,7 +646,7 @@ static short snap_bezier_horizontal(KeyframeEditData *UNUSED(ked), BezTriple *be
static short snap_bezier_value(KeyframeEditData *ked, BezTriple *bezt)
{
if (bezt->f2 & SELECT)
- bezt->vec[1][1]= ked->f1;
+ bezt->vec[1][1] = ked->f1;
return 0;
}
@@ -675,12 +675,12 @@ KeyframeEditFunc ANIM_editkeyframes_snap(short type)
static short mirror_bezier_cframe(KeyframeEditData *ked, BezTriple *bezt)
{
- const Scene *scene= ked->scene;
+ const Scene *scene = ked->scene;
float diff;
if (bezt->f2 & SELECT) {
- diff= ((float)CFRA - bezt->vec[1][0]);
- bezt->vec[1][0]= ((float)CFRA + diff);
+ diff = ((float)CFRA - bezt->vec[1][0]);
+ bezt->vec[1][0] = ((float)CFRA + diff);
}
return 0;
@@ -691,8 +691,8 @@ static short mirror_bezier_yaxis(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
float diff;
if (bezt->f2 & SELECT) {
- diff= (0.0f - bezt->vec[1][0]);
- bezt->vec[1][0]= (0.0f + diff);
+ diff = (0.0f - bezt->vec[1][0]);
+ bezt->vec[1][0] = (0.0f + diff);
}
return 0;
@@ -703,8 +703,8 @@ static short mirror_bezier_xaxis(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
float diff;
if (bezt->f2 & SELECT) {
- diff= (0.0f - bezt->vec[1][1]);
- bezt->vec[1][1]= (0.0f + diff);
+ diff = (0.0f - bezt->vec[1][1]);
+ bezt->vec[1][1] = (0.0f + diff);
}
return 0;
@@ -714,8 +714,8 @@ static short mirror_bezier_marker(KeyframeEditData *ked, BezTriple *bezt)
{
/* mirroring time stored in f1 */
if (bezt->f2 & SELECT) {
- const float diff= (ked->f1 - bezt->vec[1][0]);
- bezt->vec[1][0]= (ked->f1 + diff);
+ const float diff = (ked->f1 - bezt->vec[1][0]);
+ bezt->vec[1][0] = (ked->f1 + diff);
}
return 0;
@@ -727,8 +727,8 @@ static short mirror_bezier_value(KeyframeEditData *ked, BezTriple *bezt)
/* value to mirror over is stored in the custom data -> first float value slot */
if (bezt->f2 & SELECT) {
- diff= (ked->f1 - bezt->vec[1][1]);
- bezt->vec[1][1]= (ked->f1 + diff);
+ diff = (ked->f1 - bezt->vec[1][1]);
+ bezt->vec[1][1] = (ked->f1 + diff);
}
return 0;
@@ -763,17 +763,17 @@ KeyframeEditFunc ANIM_editkeyframes_mirror(short type)
#define ENSURE_HANDLES_MATCH(bezt) \
if (bezt->h1 != bezt->h2) { \
if (ELEM3(bezt->h1, HD_ALIGN, HD_AUTO, HD_AUTO_ANIM)) \
- bezt->h1= HD_FREE; \
+ bezt->h1 = HD_FREE; \
if (ELEM3(bezt->h2, HD_ALIGN, HD_AUTO, HD_AUTO_ANIM)) \
- bezt->h2= HD_FREE; \
+ bezt->h2 = HD_FREE; \
}
/* Sets the selected bezier handles to type 'auto' */
static short set_bezier_auto(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
if ((bezt->f1 & SELECT) || (bezt->f3 & SELECT)) {
- if (bezt->f1 & SELECT) bezt->h1= HD_AUTO;
- if (bezt->f3 & SELECT) bezt->h2= HD_AUTO;
+ if (bezt->f1 & SELECT) bezt->h1 = HD_AUTO;
+ if (bezt->f3 & SELECT) bezt->h2 = HD_AUTO;
ENSURE_HANDLES_MATCH(bezt);
}
@@ -786,8 +786,8 @@ static short set_bezier_auto(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
static short set_bezier_auto_clamped(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
if ((bezt->f1 & SELECT) || (bezt->f3 & SELECT)) {
- if (bezt->f1 & SELECT) bezt->h1= HD_AUTO_ANIM;
- if (bezt->f3 & SELECT) bezt->h2= HD_AUTO_ANIM;
+ if (bezt->f1 & SELECT) bezt->h1 = HD_AUTO_ANIM;
+ if (bezt->f3 & SELECT) bezt->h2 = HD_AUTO_ANIM;
ENSURE_HANDLES_MATCH(bezt);
}
@@ -797,8 +797,8 @@ static short set_bezier_auto_clamped(KeyframeEditData *UNUSED(ked), BezTriple *b
/* Sets the selected bezier handles to type 'vector' */
static short set_bezier_vector(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
- if (bezt->f1 & SELECT) bezt->h1= HD_VECT;
- if (bezt->f3 & SELECT) bezt->h2= HD_VECT;
+ if (bezt->f1 & SELECT) bezt->h1 = HD_VECT;
+ if (bezt->f3 & SELECT) bezt->h2 = HD_VECT;
return 0;
}
@@ -815,16 +815,16 @@ static short bezier_isfree(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
/* Sets selected bezier handles to type 'align' */
static short set_bezier_align(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
- if (bezt->f1 & SELECT) bezt->h1= HD_ALIGN;
- if (bezt->f3 & SELECT) bezt->h2= HD_ALIGN;
+ if (bezt->f1 & SELECT) bezt->h1 = HD_ALIGN;
+ if (bezt->f3 & SELECT) bezt->h2 = HD_ALIGN;
return 0;
}
/* Sets selected bezier handles to type 'free' */
static short set_bezier_free(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
- if (bezt->f1 & SELECT) bezt->h1= HD_FREE;
- if (bezt->f3 & SELECT) bezt->h2= HD_FREE;
+ if (bezt->f1 & SELECT) bezt->h1 = HD_FREE;
+ if (bezt->f3 & SELECT) bezt->h2 = HD_FREE;
return 0;
}
@@ -855,21 +855,21 @@ KeyframeEditFunc ANIM_editkeyframes_handles(short code)
static short set_bezt_constant(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
if (bezt->f2 & SELECT)
- bezt->ipo= BEZT_IPO_CONST;
+ bezt->ipo = BEZT_IPO_CONST;
return 0;
}
static short set_bezt_linear(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
if (bezt->f2 & SELECT)
- bezt->ipo= BEZT_IPO_LIN;
+ bezt->ipo = BEZT_IPO_LIN;
return 0;
}
static short set_bezt_bezier(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
if (bezt->f2 & SELECT)
- bezt->ipo= BEZT_IPO_BEZ;
+ bezt->ipo = BEZT_IPO_BEZ;
return 0;
}
@@ -892,28 +892,28 @@ KeyframeEditFunc ANIM_editkeyframes_ipo(short code)
static short set_keytype_keyframe(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
if (bezt->f2 & SELECT)
- BEZKEYTYPE(bezt)= BEZT_KEYTYPE_KEYFRAME;
+ BEZKEYTYPE(bezt) = BEZT_KEYTYPE_KEYFRAME;
return 0;
}
static short set_keytype_breakdown(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
if (bezt->f2 & SELECT)
- BEZKEYTYPE(bezt)= BEZT_KEYTYPE_BREAKDOWN;
+ BEZKEYTYPE(bezt) = BEZT_KEYTYPE_BREAKDOWN;
return 0;
}
static short set_keytype_extreme(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
if (bezt->f2 & SELECT)
- BEZKEYTYPE(bezt)= BEZT_KEYTYPE_EXTREME;
+ BEZKEYTYPE(bezt) = BEZT_KEYTYPE_EXTREME;
return 0;
}
static short set_keytype_jitter(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
if (bezt->f2 & SELECT)
- BEZKEYTYPE(bezt)= BEZT_KEYTYPE_JITTER;
+ BEZKEYTYPE(bezt) = BEZT_KEYTYPE_JITTER;
return 0;
}
@@ -1017,32 +1017,32 @@ KeyframeEditFunc ANIM_editkeyframes_select(short selectmode)
static short selmap_build_bezier_more(KeyframeEditData *ked, BezTriple *bezt)
{
- FCurve *fcu= ked->fcu;
- char *map= ked->data;
- int i= ked->curIndex;
+ FCurve *fcu = ked->fcu;
+ char *map = ked->data;
+ int i = ked->curIndex;
/* if current is selected, just make sure it stays this way */
if (BEZSELECTED(bezt)) {
- map[i]= 1;
+ map[i] = 1;
return 0;
}
/* if previous is selected, that means that selection should extend across */
if (i > 0) {
- BezTriple *prev= bezt - 1;
+ BezTriple *prev = bezt - 1;
if (BEZSELECTED(prev)) {
- map[i]= 1;
+ map[i] = 1;
return 0;
}
}
/* if next is selected, that means that selection should extend across */
- if (i < (fcu->totvert-1)) {
- BezTriple *next= bezt + 1;
+ if (i < (fcu->totvert - 1)) {
+ BezTriple *next = bezt + 1;
if (BEZSELECTED(next)) {
- map[i]= 1;
+ map[i] = 1;
return 0;
}
}
@@ -1052,9 +1052,9 @@ static short selmap_build_bezier_more(KeyframeEditData *ked, BezTriple *bezt)
static short selmap_build_bezier_less(KeyframeEditData *ked, BezTriple *bezt)
{
- FCurve *fcu= ked->fcu;
- char *map= ked->data;
- int i= ked->curIndex;
+ FCurve *fcu = ked->fcu;
+ char *map = ked->data;
+ int i = ked->curIndex;
/* if current is selected, check the left/right keyframes
* since it might need to be deselected (but otherwise no)
@@ -1062,7 +1062,7 @@ static short selmap_build_bezier_less(KeyframeEditData *ked, BezTriple *bezt)
if (BEZSELECTED(bezt)) {
/* if previous is not selected, we're on the tip of an iceberg */
if (i > 0) {
- BezTriple *prev= bezt - 1;
+ BezTriple *prev = bezt - 1;
if (BEZSELECTED(prev) == 0)
return 0;
@@ -1073,19 +1073,19 @@ static short selmap_build_bezier_less(KeyframeEditData *ked, BezTriple *bezt)
}
/* if next is not selected, we're on the tip of an iceberg */
- if (i < (fcu->totvert-1)) {
- BezTriple *next= bezt + 1;
+ if (i < (fcu->totvert - 1)) {
+ BezTriple *next = bezt + 1;
if (BEZSELECTED(next) == 0)
return 0;
}
- else if (i == (fcu->totvert-1)) {
+ else if (i == (fcu->totvert - 1)) {
/* current keyframe is selected at an endpoint, so should get deselected */
return 0;
}
/* if we're still here, that means that keyframe should remain untouched */
- map[i]= 1;
+ map[i] = 1;
}
return 0;
@@ -1109,8 +1109,8 @@ KeyframeEditFunc ANIM_editkeyframes_buildselmap(short mode)
/* flush selection map values to the given beztriple */
short bezt_selmap_flush(KeyframeEditData *ked, BezTriple *bezt)
{
- char *map= ked->data;
- short on= map[ked->curIndex];
+ char *map = ked->data;
+ short on = map[ked->curIndex];
/* select or deselect based on whether the map allows it or not */
if (on) {
diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c
index 831b8d21b01..05c87e98f9b 100644
--- a/source/blender/editors/animation/keyframes_general.c
+++ b/source/blender/editors/animation/keyframes_general.c
@@ -90,13 +90,13 @@ void delete_fcurve_key(FCurve *fcu, int index, short do_recalc)
index += fcu->totvert;
/* Delete this keyframe */
- memmove(&fcu->bezt[index], &fcu->bezt[index+1], sizeof(BezTriple)*(fcu->totvert-index-1));
+ memmove(&fcu->bezt[index], &fcu->bezt[index + 1], sizeof(BezTriple) * (fcu->totvert - index - 1));
fcu->totvert--;
if (fcu->totvert == 0) {
if (fcu->bezt)
MEM_freeN(fcu->bezt);
- fcu->bezt= NULL;
+ fcu->bezt = NULL;
}
/* recalc handles - only if it won't cause problems */
@@ -109,13 +109,13 @@ void delete_fcurve_keys(FCurve *fcu)
{
int i;
- if (fcu->bezt==NULL) /* ignore baked curves */
+ if (fcu->bezt == NULL) /* ignore baked curves */
return;
/* Delete selected BezTriples */
- for (i=0; i < fcu->totvert; i++) {
+ for (i = 0; i < fcu->totvert; i++) {
if (fcu->bezt[i].f2 & SELECT) {
- memmove(&fcu->bezt[i], &fcu->bezt[i+1], sizeof(BezTriple)*(fcu->totvert-i-1));
+ memmove(&fcu->bezt[i], &fcu->bezt[i + 1], sizeof(BezTriple) * (fcu->totvert - i - 1));
fcu->totvert--;
i--;
}
@@ -131,9 +131,9 @@ void clear_fcurve_keys(FCurve *fcu)
{
if (fcu->bezt)
MEM_freeN(fcu->bezt);
- fcu->bezt= NULL;
+ fcu->bezt = NULL;
- fcu->totvert= 0;
+ fcu->totvert = 0;
}
/* ---------------- */
@@ -148,20 +148,20 @@ void duplicate_fcurve_keys(FCurve *fcu)
if (ELEM(NULL, fcu, fcu->bezt))
return;
- for (i=0; i < fcu->totvert; i++) {
+ for (i = 0; i < fcu->totvert; i++) {
/* If a key is selected */
if (fcu->bezt[i].f2 & SELECT) {
/* Expand the list */
- newbezt = MEM_callocN(sizeof(BezTriple) * (fcu->totvert+1), "beztriple");
+ newbezt = MEM_callocN(sizeof(BezTriple) * (fcu->totvert + 1), "beztriple");
- memcpy(newbezt, fcu->bezt, sizeof(BezTriple) * (i+1));
- memcpy(newbezt+i+1, fcu->bezt+i, sizeof(BezTriple));
- memcpy(newbezt+i+2, fcu->bezt+i+1, sizeof (BezTriple) *(fcu->totvert-(i+1)));
+ memcpy(newbezt, fcu->bezt, sizeof(BezTriple) * (i + 1));
+ memcpy(newbezt + i + 1, fcu->bezt + i, sizeof(BezTriple));
+ memcpy(newbezt + i + 2, fcu->bezt + i + 1, sizeof (BezTriple) * (fcu->totvert - (i + 1)));
fcu->totvert++;
/* reassign pointers... (free old, and add new) */
MEM_freeN(fcu->bezt);
- fcu->bezt=newbezt;
+ fcu->bezt = newbezt;
/* Unselect the current key */
BEZ_DESEL(&fcu->bezt[i]);
@@ -200,20 +200,20 @@ void clean_fcurve(FCurve *fcu, float thresh)
/* Loop through BezTriples, comparing them. Skip any that do
* not fit the criteria for "ok" points.
*/
- for (i=1; i<totCount; i++) {
+ for (i = 1; i < totCount; i++) {
float prev[2], cur[2], next[2];
/* get BezTriples and their values */
if (i < (totCount - 1)) {
- beztn = (old_bezts + (i+1));
- next[0]= beztn->vec[1][0]; next[1]= beztn->vec[1][1];
+ beztn = (old_bezts + (i + 1));
+ next[0] = beztn->vec[1][0]; next[1] = beztn->vec[1][1];
}
else {
beztn = NULL;
next[0] = next[1] = 0.0f;
}
- lastb= (fcu->bezt + (fcu->totvert - 1));
- bezt= (old_bezts + i);
+ lastb = (fcu->bezt + (fcu->totvert - 1));
+ bezt = (old_bezts + i);
/* get references for quicker access */
prev[0] = lastb->vec[1][0]; prev[1] = lastb->vec[1][1];
@@ -226,7 +226,7 @@ void clean_fcurve(FCurve *fcu, float thresh)
* current is further away than the next one is to the previous.
*/
if (beztn && (IS_EQT(cur[0], next[0], thresh)) &&
- (IS_EQT(next[1], prev[1], thresh)==0))
+ (IS_EQT(next[1], prev[1], thresh) == 0))
{
/* only add if current is further away from previous */
if (cur[1] > next[1]) {
@@ -276,20 +276,20 @@ void clean_fcurve(FCurve *fcu, float thresh)
/* temp struct used for smooth_fcurve */
typedef struct tSmooth_Bezt {
- float *h1, *h2, *h3; /* bezt->vec[0,1,2][1] */
- float y1, y2, y3; /* averaged before/new/after y-values */
+ float *h1, *h2, *h3; /* bezt->vec[0,1,2][1] */
+ float y1, y2, y3; /* averaged before/new/after y-values */
} tSmooth_Bezt;
/* Use a weighted moving-means method to reduce intensity of fluctuations */
// TODO: introduce scaling factor for weighting falloff
-void smooth_fcurve (FCurve *fcu)
+void smooth_fcurve(FCurve *fcu)
{
BezTriple *bezt;
int i, x, totSel = 0;
/* first loop through - count how many verts are selected */
- bezt= fcu->bezt;
- for (i=0; i < fcu->totvert; i++, bezt++) {
+ bezt = fcu->bezt;
+ for (i = 0; i < fcu->totvert; i++, bezt++) {
if (BEZSELECTED(bezt))
totSel++;
}
@@ -299,11 +299,11 @@ void smooth_fcurve (FCurve *fcu)
tSmooth_Bezt *tarray, *tsb;
/* allocate memory in one go */
- tsb= tarray= MEM_callocN(totSel*sizeof(tSmooth_Bezt), "tSmooth_Bezt Array");
+ tsb = tarray = MEM_callocN(totSel * sizeof(tSmooth_Bezt), "tSmooth_Bezt Array");
/* populate tarray with data of selected points */
- bezt= fcu->bezt;
- for (i=0, x=0; (i < fcu->totvert) && (x < totSel); i++, bezt++) {
+ bezt = fcu->bezt;
+ for (i = 0, x = 0; (i < fcu->totvert) && (x < totSel); i++, bezt++) {
if (BEZSELECTED(bezt)) {
/* tsb simply needs pointer to vec, and index */
tsb->h1 = &bezt->vec[0][1];
@@ -311,7 +311,7 @@ void smooth_fcurve (FCurve *fcu)
tsb->h3 = &bezt->vec[2][1];
/* advance to the next tsb to populate */
- if (x < totSel-1)
+ if (x < totSel - 1)
tsb++;
else
break;
@@ -321,19 +321,19 @@ void smooth_fcurve (FCurve *fcu)
/* calculate the new smoothed F-Curve's with weighted averages:
* - this is done with two passes to avoid progressive corruption errors
* - uses 5 points for each operation (which stores in the relevant handles)
- * - previous: w/a ratio = 3:5:2:1:1
- * - next: w/a ratio = 1:1:2:5:3
+ * - previous: w/a ratio = 3:5:2:1:1
+ * - next: w/a ratio = 1:1:2:5:3
*/
/* round 1: calculate smoothing deltas and new values */
- tsb= tarray;
- for (i=0; i < totSel; i++, tsb++) {
+ tsb = tarray;
+ for (i = 0; i < totSel; i++, tsb++) {
/* don't touch end points (otherwise, curves slowly explode, as we don't have enough data there) */
- if (ELEM(i, 0, (totSel-1)) == 0) {
+ if (ELEM(i, 0, (totSel - 1)) == 0) {
const tSmooth_Bezt *tP1 = tsb - 1;
- const tSmooth_Bezt *tP2 = (i-2 > 0) ? (tsb - 2) : (NULL);
+ const tSmooth_Bezt *tP2 = (i - 2 > 0) ? (tsb - 2) : (NULL);
const tSmooth_Bezt *tN1 = tsb + 1;
- const tSmooth_Bezt *tN2 = (i+2 < totSel) ? (tsb + 2) : (NULL);
+ const tSmooth_Bezt *tN2 = (i + 2 < totSel) ? (tsb + 2) : (NULL);
const float p1 = *tP1->h2;
const float p2 = (tP2) ? (*tP2->h2) : (*tP1->h2);
@@ -342,18 +342,18 @@ void smooth_fcurve (FCurve *fcu)
const float n2 = (tN2) ? (*tN2->h2) : (*tN1->h2);
/* calculate previous and next, then new position by averaging these */
- tsb->y1= (3*p2 + 5*p1 + 2*c1 + n1 + n2) / 12;
- tsb->y3= (p2 + p1 + 2*c1 + 5*n1 + 3*n2) / 12;
+ tsb->y1 = (3 * p2 + 5 * p1 + 2 * c1 + n1 + n2) / 12;
+ tsb->y3 = (p2 + p1 + 2 * c1 + 5 * n1 + 3 * n2) / 12;
tsb->y2 = (tsb->y1 + tsb->y3) / 2;
}
}
/* round 2: apply new values */
- tsb= tarray;
- for (i=0; i < totSel; i++, tsb++) {
+ tsb = tarray;
+ for (i = 0; i < totSel; i++, tsb++) {
/* don't touch end points, as their values were't touched above */
- if (ELEM(i, 0, (totSel-1)) == 0) {
+ if (ELEM(i, 0, (totSel - 1)) == 0) {
/* y2 takes the average of the 2 points */
*tsb->h2 = tsb->y2;
@@ -380,44 +380,44 @@ typedef struct tempFrameValCache {
/* Evaluates the curves between each selected keyframe on each frame, and keys the value */
-void sample_fcurve (FCurve *fcu)
+void sample_fcurve(FCurve *fcu)
{
- BezTriple *bezt, *start=NULL, *end=NULL;
+ BezTriple *bezt, *start = NULL, *end = NULL;
tempFrameValCache *value_cache, *fp;
int sfra, range;
int i, n, nIndex;
- if (fcu->bezt==NULL) /* ignore baked */
+ if (fcu->bezt == NULL) /* ignore baked */
return;
/* find selected keyframes... once pair has been found, add keyframes */
- for (i=0, bezt=fcu->bezt; i < fcu->totvert; i++, bezt++) {
+ for (i = 0, bezt = fcu->bezt; i < fcu->totvert; i++, bezt++) {
/* check if selected, and which end this is */
if (BEZSELECTED(bezt)) {
if (start) {
/* set end */
- end= bezt;
+ end = bezt;
/* cache values then add keyframes using these values, as adding
* keyframes while sampling will affect the outcome...
* - only start sampling+adding from index=1, so that we don't overwrite original keyframe
*/
- range= (int)( ceil(end->vec[1][0] - start->vec[1][0]) );
- sfra= (int)( floor(start->vec[1][0]) );
+ range = (int)(ceil(end->vec[1][0] - start->vec[1][0]) );
+ sfra = (int)(floor(start->vec[1][0]) );
if (range) {
- value_cache= MEM_callocN(sizeof(tempFrameValCache)*range, "IcuFrameValCache");
+ value_cache = MEM_callocN(sizeof(tempFrameValCache) * range, "IcuFrameValCache");
- /* sample values */
- for (n=1, fp=value_cache; n<range && fp; n++, fp++) {
- fp->frame= (float)(sfra + n);
- fp->val= evaluate_fcurve(fcu, fp->frame);
+ /* sample values */
+ for (n = 1, fp = value_cache; n < range && fp; n++, fp++) {
+ fp->frame = (float)(sfra + n);
+ fp->val = evaluate_fcurve(fcu, fp->frame);
}
- /* add keyframes with these, tagging as 'breakdowns' */
- for (n=1, fp=value_cache; n<range && fp; n++, fp++) {
- nIndex= insert_vert_fcurve(fcu, fp->frame, fp->val, 1);
- BEZKEYTYPE(fcu->bezt + nIndex)= BEZT_KEYTYPE_BREAKDOWN;
+ /* add keyframes with these, tagging as 'breakdowns' */
+ for (n = 1, fp = value_cache; n < range && fp; n++, fp++) {
+ nIndex = insert_vert_fcurve(fcu, fp->frame, fp->val, 1);
+ BEZKEYTYPE(fcu->bezt + nIndex) = BEZT_KEYTYPE_BREAKDOWN;
}
/* free temp cache */
@@ -429,13 +429,13 @@ void sample_fcurve (FCurve *fcu)
}
/* bezt was selected, so it now marks the start of a whole new chain to search */
- start= bezt;
- end= NULL;
+ start = bezt;
+ end = NULL;
}
else {
/* just set start keyframe */
- start= bezt;
- end= NULL;
+ start = bezt;
+ end = NULL;
}
}
}
@@ -455,35 +455,35 @@ void sample_fcurve (FCurve *fcu)
/* globals for copy/paste data (like for other copy/paste buffers) */
static ListBase animcopybuf = {NULL, NULL};
-static float animcopy_firstframe= 999999999.0f;
-static float animcopy_lastframe= -999999999.0f;
-static float animcopy_cfra= 0.0;
+static float animcopy_firstframe = 999999999.0f;
+static float animcopy_lastframe = -999999999.0f;
+static float animcopy_cfra = 0.0;
/* datatype for use in copy/paste buffer */
typedef struct tAnimCopybufItem {
struct tAnimCopybufItem *next, *prev;
- ID *id; /* ID which owns the curve */
- bActionGroup *grp; /* Action Group */
- char *rna_path; /* RNA-Path */
- int array_index; /* array index */
+ ID *id; /* ID which owns the curve */
+ bActionGroup *grp; /* Action Group */
+ char *rna_path; /* RNA-Path */
+ int array_index; /* array index */
- int totvert; /* number of keyframes stored for this channel */
- BezTriple *bezt; /* keyframes in buffer */
+ int totvert; /* number of keyframes stored for this channel */
+ BezTriple *bezt; /* keyframes in buffer */
- short id_type; /* Result of GS(id->name)*/
+ short id_type; /* Result of GS(id->name)*/
} tAnimCopybufItem;
/* This function frees any MEM_calloc'ed copy/paste buffer data */
// XXX find some header to put this in!
-void free_anim_copybuf (void)
+void free_anim_copybuf(void)
{
tAnimCopybufItem *aci, *acn;
/* free each buffer element */
- for (aci= animcopybuf.first; aci; aci= acn) {
- acn= aci->next;
+ for (aci = animcopybuf.first; aci; aci = acn) {
+ acn = aci->next;
/* free keyframes */
if (aci->bezt)
@@ -498,25 +498,25 @@ void free_anim_copybuf (void)
}
/* restore initial state */
- animcopybuf.first= animcopybuf.last= NULL;
- animcopy_firstframe= 999999999.0f;
- animcopy_lastframe= -999999999.0f;
+ animcopybuf.first = animcopybuf.last = NULL;
+ animcopy_firstframe = 999999999.0f;
+ animcopy_lastframe = -999999999.0f;
}
/* ------------------- */
/* This function adds data to the keyframes copy/paste buffer, freeing existing data first */
-short copy_animedit_keys (bAnimContext *ac, ListBase *anim_data)
+short copy_animedit_keys(bAnimContext *ac, ListBase *anim_data)
{
bAnimListElem *ale;
- Scene *scene= ac->scene;
+ Scene *scene = ac->scene;
/* clear buffer first */
free_anim_copybuf();
/* assume that each of these is an F-Curve */
- for (ale= anim_data->first; ale; ale= ale->next) {
- FCurve *fcu= (FCurve *)ale->key_data;
+ for (ale = anim_data->first; ale; ale = ale->next) {
+ FCurve *fcu = (FCurve *)ale->key_data;
tAnimCopybufItem *aci;
BezTriple *bezt, *nbezt, *newbuf;
int i;
@@ -529,42 +529,42 @@ short copy_animedit_keys (bAnimContext *ac, ListBase *anim_data)
continue;
/* init copybuf item info */
- aci= MEM_callocN(sizeof(tAnimCopybufItem), "AnimCopybufItem");
- aci->id= ale->id;
- aci->id_type= GS(ale->id->name);
- aci->grp= fcu->grp;
- aci->rna_path= MEM_dupallocN(fcu->rna_path);
- aci->array_index= fcu->array_index;
+ aci = MEM_callocN(sizeof(tAnimCopybufItem), "AnimCopybufItem");
+ aci->id = ale->id;
+ aci->id_type = GS(ale->id->name);
+ aci->grp = fcu->grp;
+ aci->rna_path = MEM_dupallocN(fcu->rna_path);
+ aci->array_index = fcu->array_index;
BLI_addtail(&animcopybuf, aci);
/* add selected keyframes to buffer */
// TODO: currently, we resize array everytime we add a new vert - this works ok as long as it is assumed only a few keys are copied
- for (i=0, bezt=fcu->bezt; i < fcu->totvert; i++, bezt++) {
+ for (i = 0, bezt = fcu->bezt; i < fcu->totvert; i++, bezt++) {
if (BEZSELECTED(bezt)) {
/* add to buffer */
- newbuf= MEM_callocN(sizeof(BezTriple)*(aci->totvert+1), "copybuf beztriple");
+ newbuf = MEM_callocN(sizeof(BezTriple) * (aci->totvert + 1), "copybuf beztriple");
/* assume that since we are just re-sizing the array, just copy all existing data across */
if (aci->bezt)
- memcpy(newbuf, aci->bezt, sizeof(BezTriple)*(aci->totvert));
+ memcpy(newbuf, aci->bezt, sizeof(BezTriple) * (aci->totvert));
/* copy current beztriple across too */
- nbezt= &newbuf[aci->totvert];
- *nbezt= *bezt;
+ nbezt = &newbuf[aci->totvert];
+ *nbezt = *bezt;
/* ensure copy buffer is selected so pasted keys are selected */
BEZ_SEL(nbezt);
/* free old array and set the new */
if (aci->bezt) MEM_freeN(aci->bezt);
- aci->bezt= newbuf;
+ aci->bezt = newbuf;
aci->totvert++;
/* check if this is the earliest frame encountered so far */
if (bezt->vec[1][0] < animcopy_firstframe)
- animcopy_firstframe= bezt->vec[1][0];
+ animcopy_firstframe = bezt->vec[1][0];
if (bezt->vec[1][0] > animcopy_lastframe)
- animcopy_lastframe= bezt->vec[1][0];
+ animcopy_lastframe = bezt->vec[1][0];
}
}
@@ -575,7 +575,7 @@ short copy_animedit_keys (bAnimContext *ac, ListBase *anim_data)
return -1;
/* in case 'relative' paste method is used */
- animcopy_cfra= CFRA;
+ animcopy_cfra = CFRA;
/* everything went fine */
return 0;
@@ -588,7 +588,7 @@ static tAnimCopybufItem *pastebuf_match_path_full(FCurve *fcu, const short from_
{
tAnimCopybufItem *aci;
- for (aci= animcopybuf.first; aci; aci= aci->next) {
+ for (aci = animcopybuf.first; aci; aci = aci->next) {
/* check that paths exist */
if (to_simple || (aci->rna_path && fcu->rna_path)) {
if (to_simple || (strcmp(aci->rna_path, fcu->rna_path) == 0)) {
@@ -606,7 +606,7 @@ static tAnimCopybufItem *pastebuf_match_path_property(FCurve *fcu, const short f
{
tAnimCopybufItem *aci;
- for (aci= animcopybuf.first; aci; aci= aci->next) {
+ for (aci = animcopybuf.first; aci; aci = aci->next) {
/* check that paths exist */
if (aci->rna_path && fcu->rna_path) {
/* find the property of the fcurve and compare against the end of the tAnimCopybufItem
@@ -627,12 +627,12 @@ static tAnimCopybufItem *pastebuf_match_path_property(FCurve *fcu, const short f
RNA_path_resolve(&id_ptr, aci->rna_path, &rptr, &prop);
if (prop) {
- const char *identifier= RNA_property_identifier(prop);
+ const char *identifier = RNA_property_identifier(prop);
int len_id = strlen(identifier);
int len_path = strlen(fcu->rna_path);
if (len_id <= len_path) {
/* note, paths which end with "] will fail with this test - Animated ID Props */
- if (strcmp(identifier, fcu->rna_path + (len_path-len_id))==0) {
+ if (strcmp(identifier, fcu->rna_path + (len_path - len_id)) == 0) {
if ((from_single) || (aci->array_index == fcu->array_index))
break;
}
@@ -653,7 +653,7 @@ static tAnimCopybufItem *pastebuf_match_index_only(FCurve *fcu, const short from
{
tAnimCopybufItem *aci;
- for (aci= animcopybuf.first; aci; aci= aci->next) {
+ for (aci = animcopybuf.first; aci; aci = aci->next) {
/* check that paths exist */
if ((from_single) || (aci->array_index == fcu->array_index)) {
break;
@@ -672,7 +672,7 @@ static void paste_animedit_keys_fcurve(FCurve *fcu, tAnimCopybufItem *aci, float
int i;
/* First de-select existing FCuvre */
- for (i=0, bezt=fcu->bezt; i < fcu->totvert; i++, bezt++) {
+ for (i = 0, bezt = fcu->bezt; i < fcu->totvert; i++, bezt++) {
bezt->f2 &= ~SELECT;
}
@@ -693,19 +693,19 @@ static void paste_animedit_keys_fcurve(FCurve *fcu, tAnimCopybufItem *aci, float
float f_min;
float f_max;
- if (merge_mode==KEYFRAME_PASTE_MERGE_OVER_RANGE) {
- f_min= aci->bezt[0].vec[1][0] + offset;
- f_max= aci->bezt[aci->totvert-1].vec[1][0] + offset;
+ if (merge_mode == KEYFRAME_PASTE_MERGE_OVER_RANGE) {
+ f_min = aci->bezt[0].vec[1][0] + offset;
+ f_max = aci->bezt[aci->totvert - 1].vec[1][0] + offset;
}
else { /* Entire Range */
- f_min= animcopy_firstframe + offset;
- f_max= animcopy_lastframe + offset;
+ f_min = animcopy_firstframe + offset;
+ f_max = animcopy_lastframe + offset;
}
/* remove keys in range */
if (f_min < f_max) {
/* select verts in range for removal */
- for (i=0, bezt=fcu->bezt; i < fcu->totvert; i++, bezt++) {
+ for (i = 0, bezt = fcu->bezt; i < fcu->totvert; i++, bezt++) {
if ((f_min < bezt[0].vec[1][0]) && (bezt[0].vec[1][0] < f_max)) {
bezt->f2 |= SELECT;
}
@@ -719,7 +719,7 @@ static void paste_animedit_keys_fcurve(FCurve *fcu, tAnimCopybufItem *aci, float
}
/* just start pasting, with the the first keyframe on the current frame, and so on */
- for (i=0, bezt=aci->bezt; i < aci->totvert; i++, bezt++) {
+ for (i = 0, bezt = aci->bezt; i < aci->totvert; i++, bezt++) {
/* temporarily apply offset to src beztriple while copying */
bezt->vec[0][0] += offset;
bezt->vec[1][0] += offset;
@@ -760,15 +760,15 @@ EnumPropertyItem keyframe_paste_merge_items[] = {
/* This function pastes data from the keyframes copy/paste buffer
* > return status code is whether the method FAILED to do anything
*/
-short paste_animedit_keys (bAnimContext *ac, ListBase *anim_data,
- const eKeyPasteOffset offset_mode, const eKeyMergeMode merge_mode)
+short paste_animedit_keys(bAnimContext *ac, ListBase *anim_data,
+ const eKeyPasteOffset offset_mode, const eKeyMergeMode merge_mode)
{
bAnimListElem *ale;
- const Scene *scene= (ac->scene);
+ const Scene *scene = (ac->scene);
- const short from_single= (animcopybuf.first == animcopybuf.last);
- const short to_simple= (anim_data->first == anim_data->last);
+ const short from_single = (animcopybuf.first == animcopybuf.last);
+ const short to_simple = (anim_data->first == anim_data->last);
float offset = 0.0f;
int pass;
@@ -787,16 +787,16 @@ short paste_animedit_keys (bAnimContext *ac, ListBase *anim_data,
/* mathods of offset */
switch (offset_mode) {
case KEYFRAME_PASTE_OFFSET_CFRA_START:
- offset= (float)(CFRA - animcopy_firstframe);
+ offset = (float)(CFRA - animcopy_firstframe);
break;
case KEYFRAME_PASTE_OFFSET_CFRA_END:
- offset= (float)(CFRA - animcopy_lastframe);
+ offset = (float)(CFRA - animcopy_lastframe);
break;
case KEYFRAME_PASTE_OFFSET_CFRA_RELATIVE:
- offset= (float)(CFRA - animcopy_cfra);
+ offset = (float)(CFRA - animcopy_cfra);
break;
case KEYFRAME_PASTE_OFFSET_NONE:
- offset= 0.0f;
+ offset = 0.0f;
break;
}
@@ -805,44 +805,44 @@ short paste_animedit_keys (bAnimContext *ac, ListBase *anim_data,
FCurve *fcu;
tAnimCopybufItem *aci;
- ale= anim_data->first;
- fcu= (FCurve *)ale->data; /* destination F-Curve */
- aci= animcopybuf.first;
+ ale = anim_data->first;
+ fcu = (FCurve *)ale->data; /* destination F-Curve */
+ aci = animcopybuf.first;
paste_animedit_keys_fcurve(fcu, aci, offset, merge_mode);
}
else {
/* from selected channels
- * This "passes" system aims to try to find "matching" channels to paste keyframes
- * into with increasingly loose matching heuristics. The process finishes when at least
- * one F-Curve has been pasted into.
+ * This "passes" system aims to try to find "matching" channels to paste keyframes
+ * into with increasingly loose matching heuristics. The process finishes when at least
+ * one F-Curve has been pasted into.
*/
- for (pass= 0; pass < 3; pass++) {
- unsigned int totmatch= 0;
+ for (pass = 0; pass < 3; pass++) {
+ unsigned int totmatch = 0;
- for (ale= anim_data->first; ale; ale= ale->next) {
+ for (ale = anim_data->first; ale; ale = ale->next) {
/* find buffer item to paste from
* - if names don't matter (i.e. only 1 channel in buffer), don't check id/group
* - if names do matter, only check if id-type is ok for now (group check is not that important)
* - most importantly, rna-paths should match (array indices are unimportant for now)
*/
- FCurve *fcu = (FCurve *)ale->data; /* destination F-Curve */
- tAnimCopybufItem *aci= NULL;
+ FCurve *fcu = (FCurve *)ale->data; /* destination F-Curve */
+ tAnimCopybufItem *aci = NULL;
switch (pass) {
case 0:
/* most strict, must be exact path match data_path & index */
- aci= pastebuf_match_path_full(fcu, from_single, to_simple);
+ aci = pastebuf_match_path_full(fcu, from_single, to_simple);
break;
case 1:
/* less strict, just compare property names */
- aci= pastebuf_match_path_property(fcu, from_single, to_simple);
+ aci = pastebuf_match_path_property(fcu, from_single, to_simple);
break;
case 2:
/* Comparing properties gave no results, so just do index comparisons */
- aci= pastebuf_match_index_only(fcu, from_single, to_simple);
+ aci = pastebuf_match_index_only(fcu, from_single, to_simple);
break;
}
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index 47972ca2c6f..2a68d32557a 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -86,7 +86,7 @@
/* Keyframing Setting Wrangling */
/* Get the active settings for keyframing settings from context (specifically the given scene) */
-short ANIM_get_keyframing_flags (Scene *scene, short incl_mode)
+short ANIM_get_keyframing_flags(Scene *scene, short incl_mode)
{
short flag = 0;
@@ -121,14 +121,14 @@ short ANIM_get_keyframing_flags (Scene *scene, short incl_mode)
/* Get (or add relevant data to be able to do so) the Active Action for the given
* Animation Data block, given an ID block where the Animation Data should reside.
*/
-bAction *verify_adt_action (ID *id, short add)
+bAction *verify_adt_action(ID *id, short add)
{
AnimData *adt;
/* init animdata if none available yet */
- adt= BKE_animdata_from_id(id);
+ adt = BKE_animdata_from_id(id);
if ((adt == NULL) && (add))
- adt= BKE_id_add_animdata(id);
+ adt = BKE_id_add_animdata(id);
if (adt == NULL) {
/* if still none (as not allowed to add, or ID doesn't have animdata for some reason) */
printf("ERROR: Couldn't add AnimData (ID = %s)\n", (id) ? (id->name) : "<None>");
@@ -138,9 +138,9 @@ bAction *verify_adt_action (ID *id, short add)
/* init action if none available yet */
// TODO: need some wizardry to handle NLA stuff correct
if ((adt->action == NULL) && (add)) {
- char actname[sizeof(id->name)-2];
- BLI_snprintf(actname, sizeof(actname), "%sAction", id->name+2);
- adt->action= add_empty_action(actname);
+ char actname[sizeof(id->name) - 2];
+ BLI_snprintf(actname, sizeof(actname), "%sAction", id->name + 2);
+ adt->action = add_empty_action(actname);
}
/* return the action */
@@ -150,7 +150,7 @@ bAction *verify_adt_action (ID *id, short add)
/* Get (or add relevant data to be able to do so) F-Curve from the Active Action,
* for the given Animation Data block. This assumes that all the destinations are valid.
*/
-FCurve *verify_fcurve (bAction *act, const char group[], const char rna_path[], const int array_index, short add)
+FCurve *verify_fcurve(bAction *act, const char group[], const char rna_path[], const int array_index, short add)
{
bActionGroup *grp;
FCurve *fcu;
@@ -164,30 +164,30 @@ FCurve *verify_fcurve (bAction *act, const char group[], const char rna_path[],
* TODO: add auto-grouping support? how this works will need to be resolved
*/
if (act)
- fcu= list_find_fcurve(&act->curves, rna_path, array_index);
+ fcu = list_find_fcurve(&act->curves, rna_path, array_index);
else
- fcu= NULL;
+ fcu = NULL;
if ((fcu == NULL) && (add)) {
/* use default settings to make a F-Curve */
- fcu= MEM_callocN(sizeof(FCurve), "FCurve");
+ fcu = MEM_callocN(sizeof(FCurve), "FCurve");
- fcu->flag = (FCURVE_VISIBLE|FCURVE_SELECTED);
- if (act->curves.first==NULL)
- fcu->flag |= FCURVE_ACTIVE; /* first one added active */
+ fcu->flag = (FCURVE_VISIBLE | FCURVE_SELECTED);
+ if (act->curves.first == NULL)
+ fcu->flag |= FCURVE_ACTIVE; /* first one added active */
/* store path - make copy, and store that */
- fcu->rna_path= BLI_strdupn(rna_path, strlen(rna_path));
- fcu->array_index= array_index;
+ fcu->rna_path = BLI_strdupn(rna_path, strlen(rna_path));
+ fcu->array_index = array_index;
/* if a group name has been provided, try to add or find a group, then add F-Curve to it */
if (group) {
/* try to find group */
- grp= action_groups_find_named(act, group);
+ grp = BKE_action_group_find_name(act, group);
/* no matching groups, so add one */
if (grp == NULL)
- grp= action_groups_add_new(act, group);
+ grp = action_groups_add_new(act, group);
/* add F-Curve to group */
action_groups_add_channel(act, grp, fcu);
@@ -212,11 +212,11 @@ FCurve *verify_fcurve (bAction *act, const char group[], const char rna_path[],
* suitable place in chronological order.
*
* NOTE: any recalculate of the F-Curve that needs to be done will need to
- * be done by the caller.
+ * be done by the caller.
*/
-int insert_bezt_fcurve (FCurve *fcu, BezTriple *bezt, short flag)
+int insert_bezt_fcurve(FCurve *fcu, BezTriple *bezt, short flag)
{
- int i= 0;
+ int i = 0;
/* are there already keyframes? */
if (fcu->bezt) {
@@ -228,17 +228,17 @@ int insert_bezt_fcurve (FCurve *fcu, BezTriple *bezt, short flag)
/* sanity check: 'i' may in rare cases exceed arraylen */
if ((i >= 0) && (i < fcu->totvert)) {
/* just change the values when replacing, so as to not overwrite handles */
- BezTriple *dst= (fcu->bezt + i);
- float dy= bezt->vec[1][1] - dst->vec[1][1];
+ BezTriple *dst = (fcu->bezt + i);
+ float dy = bezt->vec[1][1] - dst->vec[1][1];
/* just apply delta value change to the handle values */
dst->vec[0][1] += dy;
dst->vec[1][1] += dy;
dst->vec[2][1] += dy;
- dst->f1= bezt->f1;
- dst->f2= bezt->f2;
- dst->f3= bezt->f3;
+ dst->f1 = bezt->f1;
+ dst->f2 = bezt->f2;
+ dst->f3 = bezt->f3;
// TODO: perform some other operations?
}
@@ -246,22 +246,22 @@ int insert_bezt_fcurve (FCurve *fcu, BezTriple *bezt, short flag)
/* keyframing modes allow to not replace keyframe */
else if ((flag & INSERTKEY_REPLACE) == 0) {
/* insert new - if we're not restricted to replacing keyframes only */
- BezTriple *newb= MEM_callocN((fcu->totvert+1)*sizeof(BezTriple), "beztriple");
+ BezTriple *newb = MEM_callocN((fcu->totvert + 1) * sizeof(BezTriple), "beztriple");
/* add the beztriples that should occur before the beztriple to be pasted (originally in fcu) */
if (i > 0)
- memcpy(newb, fcu->bezt, i*sizeof(BezTriple));
+ memcpy(newb, fcu->bezt, i * sizeof(BezTriple));
/* add beztriple to paste at index i */
- *(newb + i)= *bezt;
+ *(newb + i) = *bezt;
/* add the beztriples that occur after the beztriple to be pasted (originally in fcu) */
if (i < fcu->totvert)
- memcpy(newb+i+1, fcu->bezt+i, (fcu->totvert-i)*sizeof(BezTriple));
+ memcpy(newb + i + 1, fcu->bezt + i, (fcu->totvert - i) * sizeof(BezTriple));
/* replace (+ free) old with new, only if necessary to do so */
MEM_freeN(fcu->bezt);
- fcu->bezt= newb;
+ fcu->bezt = newb;
fcu->totvert++;
}
@@ -272,11 +272,11 @@ int insert_bezt_fcurve (FCurve *fcu, BezTriple *bezt, short flag)
* // 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)) {
+ else if ((flag & INSERTKEY_REPLACE) == 0 && (fcu->fpt == NULL)) {
/* create new keyframes array */
- fcu->bezt= MEM_callocN(sizeof(BezTriple), "beztriple");
- *(fcu->bezt)= *bezt;
- fcu->totvert= 1;
+ fcu->bezt = MEM_callocN(sizeof(BezTriple), "beztriple");
+ *(fcu->bezt) = *bezt;
+ fcu->totvert = 1;
}
/* cannot add anything */
else {
@@ -295,27 +295,27 @@ int insert_bezt_fcurve (FCurve *fcu, BezTriple *bezt, short flag)
* adding a new keyframe to a curve, when the keyframe doesn't exist anywhere else yet.
* It returns the index at which the keyframe was added.
*/
-int insert_vert_fcurve (FCurve *fcu, float x, float y, short flag)
+int insert_vert_fcurve(FCurve *fcu, float x, float y, short flag)
{
- BezTriple beztr= {{{0}}};
+ BezTriple beztr = {{{0}}};
unsigned int oldTot = fcu->totvert;
int a;
/* set all three points, for nicer start position
* NOTE: +/- 1 on vec.x for left and right handles is so that 'free' handles work ok...
*/
- beztr.vec[0][0]= x-1.0f;
- beztr.vec[0][1]= y;
- beztr.vec[1][0]= x;
- beztr.vec[1][1]= y;
- beztr.vec[2][0]= x+1.0f;
- beztr.vec[2][1]= y;
- beztr.f1= beztr.f2= beztr.f3= SELECT;
- beztr.h1= beztr.h2= U.keyhandles_new; /* use default handle type here */
+ beztr.vec[0][0] = x - 1.0f;
+ beztr.vec[0][1] = y;
+ beztr.vec[1][0] = x;
+ beztr.vec[1][1] = y;
+ beztr.vec[2][0] = x + 1.0f;
+ beztr.vec[2][1] = y;
+ beztr.f1 = beztr.f2 = beztr.f3 = SELECT;
+ beztr.h1 = beztr.h2 = U.keyhandles_new; /* use default handle type here */
//BEZKEYTYPE(&beztr)= scene->keytype; /* default keyframe type */
/* use default interpolation mode, with exceptions for int/discrete values */
- beztr.ipo= U.ipo_new;
+ beztr.ipo = U.ipo_new;
if (fcu->flag & FCURVE_DISCRETE_VALUES)
beztr.ipo = BEZT_IPO_CONST;
@@ -323,7 +323,7 @@ int insert_vert_fcurve (FCurve *fcu, float x, float y, short flag)
beztr.ipo = BEZT_IPO_LIN;
/* add temp beztriple to keyframes */
- a= insert_bezt_fcurve(fcu, &beztr, flag);
+ a = insert_bezt_fcurve(fcu, &beztr, flag);
/* what if 'a' is a negative index?
* for now, just exit to prevent any segfaults
@@ -338,18 +338,18 @@ int insert_vert_fcurve (FCurve *fcu, float x, float y, short flag)
calchandles_fcurve(fcu);
/* set handletype and interpolation */
- if ((fcu->totvert > 2) && (flag & INSERTKEY_REPLACE)==0) {
- BezTriple *bezt= (fcu->bezt + a);
+ if ((fcu->totvert > 2) && (flag & INSERTKEY_REPLACE) == 0) {
+ BezTriple *bezt = (fcu->bezt + a);
/* set interpolation from previous (if available), but only if we didn't just replace some keyframe
- * - replacement is indicated by no-change in number of verts
+ * - replacement is indicated by no-change in number of verts
* - when replacing, the user may have specified some interpolation that should be kept
*/
if (fcu->totvert > oldTot) {
if (a > 0)
- bezt->ipo= (bezt-1)->ipo;
- else if (a < fcu->totvert-1)
- bezt->ipo= (bezt+1)->ipo;
+ bezt->ipo = (bezt - 1)->ipo;
+ else if (a < fcu->totvert - 1)
+ bezt->ipo = (bezt + 1)->ipo;
}
/* don't recalculate handles if fast is set
@@ -379,33 +379,33 @@ enum {
* 2. Keyframe to be added on frame where two keyframes are already situated
* 3. Keyframe lies at point that intersects the linear line between two keyframes
*/
-static short new_key_needed (FCurve *fcu, float cFrame, float nValue)
+static short new_key_needed(FCurve *fcu, float cFrame, float nValue)
{
- BezTriple *bezt=NULL, *prev=NULL;
+ BezTriple *bezt = NULL, *prev = NULL;
int totCount, i;
float valA = 0.0f, valB = 0.0f;
/* safety checking */
if (fcu == NULL) return KEYNEEDED_JUSTADD;
- totCount= fcu->totvert;
+ totCount = fcu->totvert;
if (totCount == 0) return KEYNEEDED_JUSTADD;
/* loop through checking if any are the same */
- bezt= fcu->bezt;
- for (i=0; i<totCount; i++) {
- float prevPosi=0.0f, prevVal=0.0f;
- float beztPosi=0.0f, beztVal=0.0f;
+ bezt = fcu->bezt;
+ for (i = 0; i < totCount; i++) {
+ float prevPosi = 0.0f, prevVal = 0.0f;
+ float beztPosi = 0.0f, beztVal = 0.0f;
/* get current time+value */
- beztPosi= bezt->vec[1][0];
- beztVal= bezt->vec[1][1];
+ beztPosi = bezt->vec[1][0];
+ beztVal = bezt->vec[1][1];
if (prev) {
/* there is a keyframe before the one currently being examined */
/* get previous time+value */
- prevPosi= prev->vec[1][0];
- prevVal= prev->vec[1][1];
+ prevPosi = prev->vec[1][0];
+ prevVal = prev->vec[1][1];
/* keyframe to be added at point where there are already two similar points? */
if (IS_EQF(prevPosi, cFrame) && IS_EQF(beztPosi, cFrame) && IS_EQF(beztPosi, prevPosi)) {
@@ -422,7 +422,7 @@ static short new_key_needed (FCurve *fcu, float cFrame, float nValue)
float realVal;
/* get real value of curve at that point */
- realVal= evaluate_fcurve(fcu, cFrame);
+ realVal = evaluate_fcurve(fcu, cFrame);
/* compare whether it's the same as proposed */
if (IS_EQF(realVal, nValue))
@@ -448,13 +448,13 @@ static short new_key_needed (FCurve *fcu, float cFrame, float nValue)
/* just add a keyframe if there's only one keyframe
* and the new one occurs before the existing one does.
*/
- if ((cFrame < beztPosi) && (totCount==1))
+ if ((cFrame < beztPosi) && (totCount == 1))
return KEYNEEDED_JUSTADD;
}
/* continue. frame to do not yet passed (or other conditions not met) */
- if (i < (totCount-1)) {
- prev= bezt;
+ if (i < (totCount - 1)) {
+ prev = bezt;
bezt++;
}
else
@@ -468,13 +468,13 @@ static short new_key_needed (FCurve *fcu, float cFrame, float nValue)
* -> Otherwise, a keyframe is just added. 1.0 is added so that fake-2nd-to-last
* keyframe is not equal to last keyframe.
*/
- bezt= (fcu->bezt + (fcu->totvert - 1));
- valA= bezt->vec[1][1];
+ bezt = (fcu->bezt + (fcu->totvert - 1));
+ valA = bezt->vec[1][1];
if (prev)
- valB= prev->vec[1][1];
+ valB = prev->vec[1][1];
else
- valB= bezt->vec[1][1] + 1.0f;
+ valB = bezt->vec[1][1] + 1.0f;
if (IS_EQF(valA, nValue) && IS_EQF(valA, valB))
return KEYNEEDED_DELPREV;
@@ -485,31 +485,31 @@ static short new_key_needed (FCurve *fcu, float cFrame, float nValue)
/* ------------------ RNA Data-Access Functions ------------------ */
/* Try to read value using RNA-properties obtained already */
-static float setting_get_rna_value (PointerRNA *ptr, PropertyRNA *prop, int index)
+static float setting_get_rna_value(PointerRNA *ptr, PropertyRNA *prop, int index)
{
- float value= 0.0f;
+ float value = 0.0f;
switch (RNA_property_type(prop)) {
case PROP_BOOLEAN:
if (RNA_property_array_length(ptr, prop))
- value= (float)RNA_property_boolean_get_index(ptr, prop, index);
+ value = (float)RNA_property_boolean_get_index(ptr, prop, index);
else
- value= (float)RNA_property_boolean_get(ptr, prop);
+ value = (float)RNA_property_boolean_get(ptr, prop);
break;
case PROP_INT:
if (RNA_property_array_length(ptr, prop))
- value= (float)RNA_property_int_get_index(ptr, prop, index);
+ value = (float)RNA_property_int_get_index(ptr, prop, index);
else
- value= (float)RNA_property_int_get(ptr, prop);
+ value = (float)RNA_property_int_get(ptr, prop);
break;
case PROP_FLOAT:
if (RNA_property_array_length(ptr, prop))
- value= RNA_property_float_get_index(ptr, prop, index);
+ value = RNA_property_float_get_index(ptr, prop, index);
else
- value= RNA_property_float_get(ptr, prop);
+ value = RNA_property_float_get(ptr, prop);
break;
case PROP_ENUM:
- value= (float)RNA_property_enum_get(ptr, prop);
+ value = (float)RNA_property_enum_get(ptr, prop);
break;
default:
break;
@@ -534,12 +534,12 @@ enum {
* blocktypes, when using "standard" keying but 'Visual Keying' option in Auto-Keying
* settings is on.
*/
-static short visualkey_can_use (PointerRNA *ptr, PropertyRNA *prop)
+static short visualkey_can_use(PointerRNA *ptr, PropertyRNA *prop)
{
- bConstraint *con= NULL;
- short searchtype= VISUALKEY_NONE;
+ bConstraint *con = NULL;
+ short searchtype = VISUALKEY_NONE;
short has_parent = FALSE;
- const char *identifier= NULL;
+ const char *identifier = NULL;
/* validate data */
// TODO: this check is probably not needed, but it won't hurt
@@ -547,25 +547,25 @@ static short visualkey_can_use (PointerRNA *ptr, PropertyRNA *prop)
return 0;
/* get first constraint and determine type of keyframe constraints to check for
- * - constraints can be on either Objects or PoseChannels, so we only check if the
+ * - constraints can be on either Objects or PoseChannels, so we only check if the
* ptr->type is RNA_Object or RNA_PoseBone, which are the RNA wrapping-info for
* those structs, allowing us to identify the owner of the data
*/
if (ptr->type == &RNA_Object) {
/* Object */
- Object *ob= (Object *)ptr->data;
+ Object *ob = (Object *)ptr->data;
- con= ob->constraints.first;
- identifier= RNA_property_identifier(prop);
- has_parent= (ob->parent != NULL);
+ con = ob->constraints.first;
+ identifier = RNA_property_identifier(prop);
+ has_parent = (ob->parent != NULL);
}
else if (ptr->type == &RNA_PoseBone) {
/* Pose Channel */
- bPoseChannel *pchan= (bPoseChannel *)ptr->data;
+ bPoseChannel *pchan = (bPoseChannel *)ptr->data;
- con= pchan->constraints.first;
- identifier= RNA_property_identifier(prop);
- has_parent= (pchan->parent != NULL);
+ con = pchan->constraints.first;
+ identifier = RNA_property_identifier(prop);
+ has_parent = (pchan->parent != NULL);
}
/* check if any data to search using */
@@ -578,10 +578,10 @@ static short visualkey_can_use (PointerRNA *ptr, PropertyRNA *prop)
return 0;
}
else if (strstr(identifier, "location")) {
- searchtype= VISUALKEY_LOC;
+ searchtype = VISUALKEY_LOC;
}
else if (strstr(identifier, "rotation")) {
- searchtype= VISUALKEY_ROT;
+ searchtype = VISUALKEY_ROT;
}
else {
printf("%s failed: identifier - '%s'\n", __func__, identifier);
@@ -596,7 +596,7 @@ static short visualkey_can_use (PointerRNA *ptr, PropertyRNA *prop)
return 1;
/* constraints */
- for (; con; con= con->next) {
+ for (; con; con = con->next) {
/* only consider constraint if it is not disabled, and has influence */
if (con->flag & CONSTRAINT_DISABLE) continue;
if (con->enforce == 0.0f) continue;
@@ -616,28 +616,28 @@ static short visualkey_can_use (PointerRNA *ptr, PropertyRNA *prop)
/* single-transform constraits */
case CONSTRAINT_TYPE_TRACKTO:
- if (searchtype==VISUALKEY_ROT) return 1;
+ if (searchtype == VISUALKEY_ROT) return 1;
break;
case CONSTRAINT_TYPE_ROTLIMIT:
- if (searchtype==VISUALKEY_ROT) return 1;
+ if (searchtype == VISUALKEY_ROT) return 1;
break;
case CONSTRAINT_TYPE_LOCLIMIT:
- if (searchtype==VISUALKEY_LOC) return 1;
+ if (searchtype == VISUALKEY_LOC) return 1;
break;
case CONSTRAINT_TYPE_ROTLIKE:
- if (searchtype==VISUALKEY_ROT) return 1;
+ if (searchtype == VISUALKEY_ROT) return 1;
break;
case CONSTRAINT_TYPE_DISTLIMIT:
- if (searchtype==VISUALKEY_LOC) return 1;
+ if (searchtype == VISUALKEY_LOC) return 1;
break;
case CONSTRAINT_TYPE_LOCLIKE:
- if (searchtype==VISUALKEY_LOC) return 1;
+ if (searchtype == VISUALKEY_LOC) return 1;
break;
case CONSTRAINT_TYPE_LOCKTRACK:
- if (searchtype==VISUALKEY_ROT) return 1;
+ if (searchtype == VISUALKEY_ROT) return 1;
break;
case CONSTRAINT_TYPE_MINMAX:
- if (searchtype==VISUALKEY_LOC) return 1;
+ if (searchtype == VISUALKEY_LOC) return 1;
break;
default:
@@ -654,18 +654,18 @@ static short visualkey_can_use (PointerRNA *ptr, PropertyRNA *prop)
* In the event that it is not possible to perform visual keying, try to fall-back
* to using the default method. Assumes that all data it has been passed is valid.
*/
-static float visualkey_get_value (PointerRNA *ptr, PropertyRNA *prop, int array_index)
+static float visualkey_get_value(PointerRNA *ptr, PropertyRNA *prop, int array_index)
{
- const char *identifier= RNA_property_identifier(prop);
+ const char *identifier = RNA_property_identifier(prop);
/* handle for Objects or PoseChannels only
- * - constraints can be on either Objects or PoseChannels, so we only check if the
+ * - constraints can be on either Objects or PoseChannels, so we only check if the
* ptr->type is RNA_Object or RNA_PoseBone, which are the RNA wrapping-info for
- * those structs, allowing us to identify the owner of the data
+ * those structs, allowing us to identify the owner of the data
* - assume that array_index will be sane
*/
if (ptr->type == &RNA_Object) {
- Object *ob= (Object *)ptr->data;
+ Object *ob = (Object *)ptr->data;
/* only Location or Rotation keyframes are supported now */
if (strstr(identifier, "location")) {
@@ -699,7 +699,7 @@ static float visualkey_get_value (PointerRNA *ptr, PropertyRNA *prop, int array_
}
else if (ptr->type == &RNA_PoseBone) {
Object *ob = (Object *)ptr->id.data; /* we assume that this is always set, and is an object */
- bPoseChannel *pchan= (bPoseChannel *)ptr->data;
+ bPoseChannel *pchan = (bPoseChannel *)ptr->data;
float tmat[4][4];
/* Although it is not strictly required for this particular space conversion,
@@ -752,16 +752,16 @@ static float visualkey_get_value (PointerRNA *ptr, PropertyRNA *prop, int array_
/* ------------------------- Insert Key API ------------------------- */
/* Secondary Keyframing API call:
- * Use this when validation of necessary animation data is not necessary, since an RNA-pointer to the necessary
+ * Use this when validation of necessary animation data is not necessary, since an RNA-pointer to the necessary
* data being keyframed, and a pointer to the F-Curve to use have both been provided.
*
* The flag argument is used for special settings that alter the behavior of
* the keyframe insertion. These include the 'visual' keyframing modes, quick refresh,
* and extra keyframe filtering.
*/
-short insert_keyframe_direct (ReportList *reports, PointerRNA ptr, PropertyRNA *prop, FCurve *fcu, float cfra, short flag)
+short insert_keyframe_direct(ReportList *reports, PointerRNA ptr, PropertyRNA *prop, FCurve *fcu, float cfra, short flag)
{
- float curval= 0.0f;
+ float curval = 0.0f;
/* no F-Curve to add keyframe to? */
if (fcu == NULL) {
@@ -771,13 +771,13 @@ short insert_keyframe_direct (ReportList *reports, PointerRNA ptr, PropertyRNA *
/* F-Curve not editable? */
if (fcurve_is_keyframable(fcu) == 0) {
BKE_reportf(reports, RPT_ERROR,
- "F-Curve with path = '%s' [%d] cannot be keyframed. Ensure that it is not locked or sampled. Also, try removing F-Modifiers",
- fcu->rna_path, fcu->array_index);
+ "F-Curve with path = '%s' [%d] cannot be keyframed. Ensure that it is not locked or sampled. Also, try removing F-Modifiers",
+ fcu->rna_path, fcu->array_index);
return 0;
}
/* if no property given yet, try to validate from F-Curve info */
- if ((ptr.id.data == NULL) && (ptr.data==NULL)) {
+ if ((ptr.id.data == NULL) && (ptr.data == NULL)) {
BKE_report(reports, RPT_ERROR, "No RNA-pointer available to retrieve values for keyframing from");
return 0;
}
@@ -787,21 +787,21 @@ short insert_keyframe_direct (ReportList *reports, PointerRNA ptr, PropertyRNA *
/* try to get property we should be affecting */
if ((RNA_path_resolve(&ptr, fcu->rna_path, &tmp_ptr, &prop) == 0) || (prop == NULL)) {
/* property not found... */
- const char *idname= (ptr.id.data) ? ((ID *)ptr.id.data)->name : "<No ID-Pointer>";
+ const char *idname = (ptr.id.data) ? ((ID *)ptr.id.data)->name : "<No ID-Pointer>";
BKE_reportf(reports, RPT_ERROR,
- "Could not insert keyframe, as RNA Path is invalid for the given ID (ID = %s, Path = %s)",
- idname, fcu->rna_path);
+ "Could not insert keyframe, as RNA Path is invalid for the given ID (ID = %s, Path = %s)",
+ idname, fcu->rna_path);
return 0;
}
else {
/* property found, so overwrite 'ptr' to make later code easier */
- ptr= tmp_ptr;
+ ptr = tmp_ptr;
}
}
/* set additional flags for the F-Curve (i.e. only integer values) */
- fcu->flag &= ~(FCURVE_INT_VALUES|FCURVE_DISCRETE_VALUES);
+ fcu->flag &= ~(FCURVE_INT_VALUES | FCURVE_DISCRETE_VALUES);
switch (RNA_property_type(prop)) {
case PROP_FLOAT:
/* do nothing */
@@ -815,23 +815,23 @@ short insert_keyframe_direct (ReportList *reports, PointerRNA ptr, PropertyRNA *
* values at all) interpolation between all points
* - however, we must also ensure that evaluated values are only integers still
*/
- fcu->flag |= (FCURVE_DISCRETE_VALUES|FCURVE_INT_VALUES);
+ fcu->flag |= (FCURVE_DISCRETE_VALUES | FCURVE_INT_VALUES);
break;
}
/* obtain value to give keyframe */
if ( (flag & INSERTKEY_MATRIX) &&
- (visualkey_can_use(&ptr, prop)) )
+ (visualkey_can_use(&ptr, prop)) )
{
/* visual-keying is only available for object and pchan datablocks, as
* it works by keyframing using a value extracted from the final matrix
* instead of using the kt system to extract a value.
*/
- curval= visualkey_get_value(&ptr, prop, fcu->array_index);
+ curval = visualkey_get_value(&ptr, prop, fcu->array_index);
}
else {
/* read value from system */
- curval= setting_get_rna_value(&ptr, prop, fcu->array_index);
+ curval = setting_get_rna_value(&ptr, prop, fcu->array_index);
}
/* only insert keyframes where they are needed */
@@ -839,7 +839,7 @@ short insert_keyframe_direct (ReportList *reports, PointerRNA ptr, PropertyRNA *
short insert_mode;
/* check whether this curve really needs a new keyframe */
- insert_mode= new_key_needed(fcu, cfra, curval);
+ insert_mode = new_key_needed(fcu, cfra, curval);
/* insert new keyframe at current frame */
if (insert_mode)
@@ -848,7 +848,7 @@ short insert_keyframe_direct (ReportList *reports, PointerRNA ptr, PropertyRNA *
/* delete keyframe immediately before/after newly added */
switch (insert_mode) {
case KEYNEEDED_DELPREV:
- delete_fcurve_key(fcu, fcu->totvert-2, 1);
+ delete_fcurve_key(fcu, fcu->totvert - 2, 1);
break;
case KEYNEEDED_DELNEXT:
delete_fcurve_key(fcu, 1, 1);
@@ -880,13 +880,13 @@ short insert_keyframe_direct (ReportList *reports, PointerRNA ptr, PropertyRNA *
*
* index of -1 keys all array indices
*/
-short insert_keyframe (ReportList *reports, ID *id, bAction *act, const char group[], const char rna_path[], int array_index, float cfra, short flag)
+short insert_keyframe(ReportList *reports, ID *id, bAction *act, const char group[], const char rna_path[], int array_index, float cfra, short flag)
{
PointerRNA id_ptr, ptr;
PropertyRNA *prop = NULL;
FCurve *fcu;
- int array_index_max= array_index+1;
- int ret= 0;
+ int array_index_max = array_index + 1;
+ int ret = 0;
/* validate pointer first - exit if failure */
if (id == NULL) {
@@ -897,33 +897,33 @@ short insert_keyframe (ReportList *reports, ID *id, bAction *act, const char gro
RNA_id_pointer_create(id, &id_ptr);
if ((RNA_path_resolve(&id_ptr, rna_path, &ptr, &prop) == 0) || (prop == NULL)) {
BKE_reportf(reports, RPT_ERROR,
- "Could not insert keyframe, as RNA Path is invalid for the given ID (ID = %s, Path = %s)",
- (id)? id->name : "<Missing ID-Block>", rna_path);
+ "Could not insert keyframe, as RNA Path is invalid for the given ID (ID = %s, Path = %s)",
+ (id) ? id->name : "<Missing ID-Block>", rna_path);
return 0;
}
/* if no action is provided, keyframe to the default one attached to this ID-block */
if (act == NULL) {
- AnimData *adt= BKE_animdata_from_id(id);
+ AnimData *adt = BKE_animdata_from_id(id);
/* get action to add F-Curve+keyframe to */
- act= verify_adt_action(id, 1);
+ act = verify_adt_action(id, 1);
if (act == NULL) {
BKE_reportf(reports, RPT_ERROR,
- "Could not insert keyframe, as this type does not support animation data (ID = %s, Path = %s)",
- id->name, rna_path);
+ "Could not insert keyframe, as this type does not support animation data (ID = %s, Path = %s)",
+ id->name, rna_path);
return 0;
}
/* apply NLA-mapping to frame to use (if applicable) */
- cfra= BKE_nla_tweakedit_remap(adt, cfra, NLATIME_CONVERT_UNMAP);
+ cfra = BKE_nla_tweakedit_remap(adt, cfra, NLATIME_CONVERT_UNMAP);
}
/* key entire array convenience method */
if (array_index == -1) {
- array_index= 0;
- array_index_max= RNA_property_array_length(&ptr, prop);
+ array_index = 0;
+ array_index_max = RNA_property_array_length(&ptr, prop);
/* for single properties, increase max_index so that the property itself gets included,
* but don't do this for standard arrays since that can cause corruption issues
@@ -939,7 +939,7 @@ short insert_keyframe (ReportList *reports, ID *id, bAction *act, const char gro
* - if we're replacing keyframes only, DO NOT create new F-Curves if they do not exist yet
* but still try to get the F-Curve if it exists...
*/
- fcu= verify_fcurve(act, group, rna_path, array_index, (flag & INSERTKEY_REPLACE)==0);
+ fcu = verify_fcurve(act, group, rna_path, array_index, (flag & INSERTKEY_REPLACE) == 0);
/* we may not have a F-Curve when we're replacing only... */
if (fcu) {
@@ -949,7 +949,7 @@ short insert_keyframe (ReportList *reports, ID *id, bAction *act, const char gro
* is determined by the array index for the F-Curve
*/
if (ELEM5(RNA_property_subtype(prop), PROP_TRANSLATION, PROP_XYZ, PROP_EULER, PROP_COLOR, PROP_COORDS)) {
- fcu->color_mode= FCURVE_COLOR_AUTO_RGB;
+ fcu->color_mode = FCURVE_COLOR_AUTO_RGB;
}
}
@@ -971,13 +971,13 @@ short insert_keyframe (ReportList *reports, ID *id, bAction *act, const char gro
* The flag argument is used for special settings that alter the behavior of
* the keyframe deletion. These include the quick refresh options.
*/
-short delete_keyframe (ReportList *reports, ID *id, bAction *act, const char group[], const char rna_path[], int array_index, float cfra, short UNUSED(flag))
+short delete_keyframe(ReportList *reports, ID *id, bAction *act, const char group[], const char rna_path[], int array_index, float cfra, short UNUSED(flag))
{
- AnimData *adt= BKE_animdata_from_id(id);
+ AnimData *adt = BKE_animdata_from_id(id);
PointerRNA id_ptr, ptr;
PropertyRNA *prop;
- int array_index_max= array_index+1;
- int ret= 0;
+ int array_index_max = array_index + 1;
+ int ret = 0;
/* sanity checks */
if (ELEM(NULL, id, adt)) {
@@ -994,17 +994,17 @@ short delete_keyframe (ReportList *reports, ID *id, bAction *act, const char gro
/* get F-Curve
* Note: here is one of the places where we don't want new Action + F-Curve added!
- * so 'add' var must be 0
+ * so 'add' var must be 0
*/
if (act == NULL) {
/* if no action is provided, use the default one attached to this ID-block
- * - if it doesn't exist, then we're out of options...
+ * - if it doesn't exist, then we're out of options...
*/
if (adt->action) {
- act= adt->action;
+ act = adt->action;
/* apply NLA-mapping to frame to use (if applicable) */
- cfra= BKE_nla_tweakedit_remap(adt, cfra, NLATIME_CONVERT_UNMAP);
+ cfra = BKE_nla_tweakedit_remap(adt, cfra, NLATIME_CONVERT_UNMAP);
}
else {
BKE_reportf(reports, RPT_ERROR, "No Action to delete keyframes from for ID = %s\n", id->name);
@@ -1014,8 +1014,8 @@ short delete_keyframe (ReportList *reports, ID *id, bAction *act, const char gro
/* key entire array convenience method */
if (array_index == -1) {
- array_index= 0;
- array_index_max= RNA_property_array_length(&ptr, prop);
+ array_index = 0;
+ array_index_max = RNA_property_array_length(&ptr, prop);
/* for single properties, increase max_index so that the property itself gets included,
* but don't do this for standard arrays since that can cause corruption issues
@@ -1027,7 +1027,7 @@ short delete_keyframe (ReportList *reports, ID *id, bAction *act, const char gro
/* will only loop once unless the array index was -1 */
for (; array_index < array_index_max; array_index++) {
- FCurve *fcu= verify_fcurve(act, group, rna_path, array_index, 0);
+ FCurve *fcu = verify_fcurve(act, group, rna_path, array_index, 0);
short found = -1;
int i;
@@ -1075,9 +1075,9 @@ enum {
*/
static int modify_key_op_poll(bContext *C)
{
- ScrArea *sa= CTX_wm_area(C);
- Scene *scene= CTX_data_scene(C);
- SpaceOops *so= CTX_wm_space_outliner(C);
+ ScrArea *sa = CTX_wm_area(C);
+ Scene *scene = CTX_data_scene(C);
+ SpaceOops *so = CTX_wm_space_outliner(C);
/* if no area or active scene */
if (ELEM(NULL, sa, scene))
@@ -1099,13 +1099,13 @@ static int modify_key_op_poll(bContext *C)
/* Insert Key Operator ------------------------ */
-static int insert_key_exec (bContext *C, wmOperator *op)
+static int insert_key_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- KeyingSet *ks= NULL;
- int type= RNA_enum_get(op->ptr, "type");
- float cfra= (float)CFRA; // XXX for now, don't bother about all the yucky offset crap
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ KeyingSet *ks = NULL;
+ int type = RNA_enum_get(op->ptr, "type");
+ float cfra = (float)CFRA; // XXX for now, don't bother about all the yucky offset crap
short success;
/* type is the Keying Set the user specified to use when calling the operator:
@@ -1114,11 +1114,11 @@ static int insert_key_exec (bContext *C, wmOperator *op)
* - type < 0: use a builtin Keying Set
*/
if (type == 0)
- type= scene->active_keyingset;
+ type = scene->active_keyingset;
if (type > 0)
- ks= BLI_findlink(&scene->keyingsets, type-1);
+ ks = BLI_findlink(&scene->keyingsets, type - 1);
else
- ks= BLI_findlink(&builtin_keyingsets, -type-1);
+ ks = BLI_findlink(&builtin_keyingsets, -type - 1);
/* report failures */
if (ks == NULL) {
@@ -1127,7 +1127,7 @@ static int insert_key_exec (bContext *C, wmOperator *op)
}
/* try to insert keyframes for the channels specified by KeyingSet */
- success= ANIM_apply_keyingset(C, NULL, NULL, ks, MODIFYKEY_MODE_INSERT, cfra);
+ success = ANIM_apply_keyingset(C, NULL, NULL, ks, MODIFYKEY_MODE_INSERT, cfra);
if (G.debug & G_DEBUG)
BKE_reportf(op->reports, RPT_INFO, "KeyingSet '%s' - Successfully added %d Keyframes\n", ks->name, success);
@@ -1142,7 +1142,7 @@ static int insert_key_exec (bContext *C, wmOperator *op)
BKE_reportf(op->reports, RPT_INFO, "Successfully added %d Keyframes for KeyingSet '%s'", success, ks->name);
/* send notifiers that keyframes have been changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
}
else
BKE_report(op->reports, RPT_WARNING, "Keying Set failed to insert any keyframes");
@@ -1153,7 +1153,7 @@ static int insert_key_exec (bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void ANIM_OT_keyframe_insert (wmOperatorType *ot)
+void ANIM_OT_keyframe_insert(wmOperatorType *ot)
{
PropertyRNA *prop;
@@ -1167,10 +1167,10 @@ void ANIM_OT_keyframe_insert (wmOperatorType *ot)
ot->poll = modify_key_op_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* keyingset to use (dynamic enum) */
- prop= RNA_def_enum(ot->srna, "type", DummyRNA_DEFAULT_items, 0, "Keying Set", "The Keying Set to use");
+ prop = RNA_def_enum(ot->srna, "type", DummyRNA_DEFAULT_items, 0, "Keying Set", "The Keying Set to use");
RNA_def_enum_funcs(prop, ANIM_keying_sets_enum_itemf);
RNA_def_property_flag(prop, PROP_HIDDEN);
ot->prop = prop;
@@ -1178,8 +1178,8 @@ void ANIM_OT_keyframe_insert (wmOperatorType *ot)
/* confirm whether a keyframe was added by showing a popup
* - by default, this is enabled, since this operator is assumed to be called independently
*/
- prop= RNA_def_boolean(ot->srna, "confirm_success", 1, "Confirm Successful Insert",
- "Show a popup when the keyframes get successfully added");
+ prop = RNA_def_boolean(ot->srna, "confirm_success", 1, "Confirm Successful Insert",
+ "Show a popup when the keyframes get successfully added");
RNA_def_property_flag(prop, PROP_HIDDEN);
}
@@ -1188,9 +1188,9 @@ void ANIM_OT_keyframe_insert (wmOperatorType *ot)
* then calls the menu if necessary before
*/
-static int insert_key_menu_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(event))
+static int insert_key_menu_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
/* if prompting or no active Keying Set, show the menu */
if ((scene->active_keyingset == 0) || RNA_boolean_get(op->ptr, "always_prompt")) {
@@ -1214,7 +1214,7 @@ static int insert_key_menu_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(
}
}
-void ANIM_OT_keyframe_insert_menu (wmOperatorType *ot)
+void ANIM_OT_keyframe_insert_menu(wmOperatorType *ot)
{
PropertyRNA *prop;
@@ -1229,10 +1229,10 @@ void ANIM_OT_keyframe_insert_menu (wmOperatorType *ot)
ot->poll = ED_operator_areaactive;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* keyingset to use (dynamic enum) */
- prop= RNA_def_enum(ot->srna, "type", DummyRNA_DEFAULT_items, 0, "Keying Set", "The Keying Set to use");
+ prop = RNA_def_enum(ot->srna, "type", DummyRNA_DEFAULT_items, 0, "Keying Set", "The Keying Set to use");
RNA_def_enum_funcs(prop, ANIM_keying_sets_enum_itemf);
RNA_def_property_flag(prop, PROP_HIDDEN);
ot->prop = prop;
@@ -1241,27 +1241,27 @@ void ANIM_OT_keyframe_insert_menu (wmOperatorType *ot)
* - 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?
- prop= RNA_def_boolean(ot->srna, "confirm_success", 0, "Confirm Successful Insert",
- "Show a popup when the keyframes get successfully added");
+ prop = RNA_def_boolean(ot->srna, "confirm_success", 0, "Confirm Successful Insert",
+ "Show a popup when the keyframes get successfully added");
RNA_def_property_flag(prop, PROP_HIDDEN);
/* whether the menu should always be shown
* - by default, the menu should only be shown when there is no active Keying Set (2.5 behavior),
* although in some cases it might be useful to always shown (pre 2.5 behavior)
*/
- prop= RNA_def_boolean(ot->srna, "always_prompt", 0, "Always Show Menu", "");
+ prop = RNA_def_boolean(ot->srna, "always_prompt", 0, "Always Show Menu", "");
RNA_def_property_flag(prop, PROP_HIDDEN);
}
/* Delete Key Operator ------------------------ */
-static int delete_key_exec (bContext *C, wmOperator *op)
+static int delete_key_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- KeyingSet *ks= NULL;
- int type= RNA_enum_get(op->ptr, "type");
- float cfra= (float)CFRA; // XXX for now, don't bother about all the yucky offset crap
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ KeyingSet *ks = NULL;
+ int type = RNA_enum_get(op->ptr, "type");
+ float cfra = (float)CFRA; // XXX for now, don't bother about all the yucky offset crap
short success;
/* type is the Keying Set the user specified to use when calling the operator:
@@ -1270,11 +1270,11 @@ static int delete_key_exec (bContext *C, wmOperator *op)
* - type < 0: use a builtin Keying Set
*/
if (type == 0)
- type= scene->active_keyingset;
+ type = scene->active_keyingset;
if (type > 0)
- ks= BLI_findlink(&scene->keyingsets, type-1);
+ ks = BLI_findlink(&scene->keyingsets, type - 1);
else
- ks= BLI_findlink(&builtin_keyingsets, -type-1);
+ ks = BLI_findlink(&builtin_keyingsets, -type - 1);
/* report failure */
if (ks == NULL) {
@@ -1283,7 +1283,7 @@ static int delete_key_exec (bContext *C, wmOperator *op)
}
/* try to delete keyframes for the channels specified by KeyingSet */
- success= ANIM_apply_keyingset(C, NULL, NULL, ks, MODIFYKEY_MODE_DELETE, cfra);
+ success = ANIM_apply_keyingset(C, NULL, NULL, ks, MODIFYKEY_MODE_DELETE, cfra);
if (G.debug & G_DEBUG)
printf("KeyingSet '%s' - Successfully removed %d Keyframes\n", ks->name, success);
@@ -1298,7 +1298,7 @@ static int delete_key_exec (bContext *C, wmOperator *op)
BKE_reportf(op->reports, RPT_INFO, "Successfully removed %d Keyframes for KeyingSet '%s'", success, ks->name);
/* send notifiers that keyframes have been changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
}
else
BKE_report(op->reports, RPT_WARNING, "Keying Set failed to remove any keyframes");
@@ -1309,7 +1309,7 @@ static int delete_key_exec (bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void ANIM_OT_keyframe_delete (wmOperatorType *ot)
+void ANIM_OT_keyframe_delete(wmOperatorType *ot)
{
PropertyRNA *prop;
@@ -1323,10 +1323,10 @@ void ANIM_OT_keyframe_delete (wmOperatorType *ot)
ot->poll = modify_key_op_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* keyingset to use (dynamic enum) */
- prop= RNA_def_enum(ot->srna, "type", DummyRNA_DEFAULT_items, 0, "Keying Set", "The Keying Set to use");
+ prop = RNA_def_enum(ot->srna, "type", DummyRNA_DEFAULT_items, 0, "Keying Set", "The Keying Set to use");
RNA_def_enum_funcs(prop, ANIM_keying_sets_enum_itemf);
RNA_def_property_flag(prop, PROP_HIDDEN);
ot->prop = prop;
@@ -1346,31 +1346,31 @@ void ANIM_OT_keyframe_delete (wmOperatorType *ot)
* -- Joshua Leung, Jan 2009
*/
-static int delete_key_v3d_exec (bContext *C, wmOperator *op)
+static int delete_key_v3d_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- float cfra= (float)CFRA; // XXX for now, don't bother about all the yucky offset crap
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ float cfra = (float)CFRA; // XXX for now, don't bother about all the yucky offset crap
// XXX more comprehensive tests will be needed
- CTX_DATA_BEGIN(C, Object*, ob, selected_objects)
+ CTX_DATA_BEGIN (C, Object *, ob, selected_objects)
{
- ID *id= (ID *)ob;
+ ID *id = (ID *)ob;
FCurve *fcu, *fcn;
- short success= 0;
+ short success = 0;
/* loop through all curves in animdata and delete keys on this frame */
if ((ob->adt) && (ob->adt->action)) {
- AnimData *adt= ob->adt;
- bAction *act= adt->action;
+ AnimData *adt = ob->adt;
+ bAction *act = adt->action;
- for (fcu= act->curves.first; fcu; fcu= fcn) {
- fcn= fcu->next;
- success+= delete_keyframe(op->reports, id, NULL, NULL, fcu->rna_path, fcu->array_index, cfra, 0);
+ for (fcu = act->curves.first; fcu; fcu = fcn) {
+ fcn = fcu->next;
+ success += delete_keyframe(op->reports, id, NULL, NULL, fcu->rna_path, fcu->array_index, cfra, 0);
}
}
- BKE_reportf(op->reports, RPT_INFO, "Ob '%s' - Successfully had %d keyframes removed", id->name+2, success);
+ BKE_reportf(op->reports, RPT_INFO, "Ob '%s' - Successfully had %d keyframes removed", id->name + 2, success);
ob->recalc |= OB_RECALC_OB;
}
@@ -1379,12 +1379,12 @@ static int delete_key_v3d_exec (bContext *C, wmOperator *op)
/* send updates */
DAG_ids_flush_update(bmain, 0);
- WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_KEYS, NULL);
return OPERATOR_FINISHED;
}
-void ANIM_OT_keyframe_delete_v3d (wmOperatorType *ot)
+void ANIM_OT_keyframe_delete_v3d(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Delete Keyframe";
@@ -1398,22 +1398,22 @@ void ANIM_OT_keyframe_delete_v3d (wmOperatorType *ot)
ot->poll = ED_operator_areaactive;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* Insert Key Button Operator ------------------------ */
-static int insert_key_button_exec (bContext *C, wmOperator *op)
+static int insert_key_button_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- PointerRNA ptr= {{NULL}};
- PropertyRNA *prop= NULL;
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ PointerRNA ptr = {{NULL}};
+ PropertyRNA *prop = NULL;
char *path;
- float cfra= (float)CFRA; // XXX for now, don't bother about all the yucky offset crap
- short success= 0;
- int a, index, length, all= RNA_boolean_get(op->ptr, "all");
+ float cfra = (float)CFRA; // XXX for now, don't bother about all the yucky offset crap
+ short success = 0;
+ int a, index, length, all = RNA_boolean_get(op->ptr, "all");
short flag = 0;
/* flags for inserting keyframes */
@@ -1423,29 +1423,29 @@ static int insert_key_button_exec (bContext *C, wmOperator *op)
uiContextActiveProperty(C, &ptr, &prop, &index);
if ((ptr.id.data && ptr.data && prop) && RNA_property_animateable(&ptr, prop)) {
- path= RNA_path_from_ID_to_property(&ptr, prop);
+ path = RNA_path_from_ID_to_property(&ptr, prop);
if (path) {
if (all) {
- length= RNA_property_array_length(&ptr, prop);
+ length = RNA_property_array_length(&ptr, prop);
- if (length) index= 0;
- else length= 1;
+ if (length) index = 0;
+ else length = 1;
}
else
- length= 1;
+ length = 1;
- for (a=0; a<length; a++)
- success+= insert_keyframe(op->reports, ptr.id.data, NULL, NULL, path, index+a, cfra, flag);
+ for (a = 0; a < length; a++)
+ success += insert_keyframe(op->reports, ptr.id.data, NULL, NULL, path, index + a, cfra, flag);
MEM_freeN(path);
}
else if (ptr.type == &RNA_NlaStrip) {
/* handle special vars for NLA-strips */
- NlaStrip *strip= (NlaStrip *)ptr.data;
- FCurve *fcu= list_find_fcurve(&strip->fcurves, RNA_property_identifier(prop), flag);
+ NlaStrip *strip = (NlaStrip *)ptr.data;
+ FCurve *fcu = list_find_fcurve(&strip->fcurves, RNA_property_identifier(prop), flag);
- success+= insert_keyframe_direct(op->reports, ptr, prop, fcu, cfra, 0);
+ success += insert_keyframe_direct(op->reports, ptr, prop, fcu, cfra, 0);
}
else {
if (G.debug & G_DEBUG)
@@ -1468,17 +1468,18 @@ static int insert_key_button_exec (bContext *C, wmOperator *op)
DAG_ids_flush_update(bmain, 0);
/* send notifiers that keyframes have been changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
}
- return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED;
+ return (success) ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
}
-void ANIM_OT_keyframe_insert_button (wmOperatorType *ot)
+void ANIM_OT_keyframe_insert_button(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Insert Keyframe (Buttons)";
ot->idname = "ANIM_OT_keyframe_insert_button";
+ ot->description = "Insert a keyframe for current UI-active property";
/* callbacks */
ot->exec = insert_key_button_exec;
@@ -1493,35 +1494,35 @@ void ANIM_OT_keyframe_insert_button (wmOperatorType *ot)
/* Delete Key Button Operator ------------------------ */
-static int delete_key_button_exec (bContext *C, wmOperator *op)
+static int delete_key_button_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- PointerRNA ptr= {{NULL}};
- PropertyRNA *prop= NULL;
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ PointerRNA ptr = {{NULL}};
+ PropertyRNA *prop = NULL;
char *path;
- float cfra= (float)CFRA; // XXX for now, don't bother about all the yucky offset crap
- short success= 0;
- int a, index, length, all= RNA_boolean_get(op->ptr, "all");
+ float cfra = (float)CFRA; // XXX for now, don't bother about all the yucky offset crap
+ short success = 0;
+ int a, index, length, all = RNA_boolean_get(op->ptr, "all");
/* try to insert keyframe using property retrieved from UI */
uiContextActiveProperty(C, &ptr, &prop, &index);
if (ptr.id.data && ptr.data && prop) {
- path= RNA_path_from_ID_to_property(&ptr, prop);
+ path = RNA_path_from_ID_to_property(&ptr, prop);
if (path) {
if (all) {
- length= RNA_property_array_length(&ptr, prop);
+ length = RNA_property_array_length(&ptr, prop);
- if (length) index= 0;
- else length= 1;
+ if (length) index = 0;
+ else length = 1;
}
else
- length= 1;
+ length = 1;
- for (a=0; a<length; a++)
- success+= delete_keyframe(op->reports, ptr.id.data, NULL, NULL, path, index+a, cfra, 0);
+ for (a = 0; a < length; a++)
+ success += delete_keyframe(op->reports, ptr.id.data, NULL, NULL, path, index + a, cfra, 0);
MEM_freeN(path);
}
@@ -1540,17 +1541,18 @@ static int delete_key_button_exec (bContext *C, wmOperator *op)
DAG_ids_flush_update(bmain, 0);
/* send notifiers that keyframes have been changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
}
- return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED;
+ return (success) ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
}
-void ANIM_OT_keyframe_delete_button (wmOperatorType *ot)
+void ANIM_OT_keyframe_delete_button(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Delete Keyframe (Buttons)";
ot->idname = "ANIM_OT_keyframe_delete_button";
+ ot->description = "Delete current keyframe of current UI-active property";
/* callbacks */
ot->exec = delete_key_button_exec;
@@ -1568,7 +1570,7 @@ void ANIM_OT_keyframe_delete_button (wmOperatorType *ot)
int autokeyframe_cfra_can_key(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)
@@ -1578,7 +1580,7 @@ int autokeyframe_cfra_can_key(Scene *scene, ID *id)
/* can insert anytime we like... */
return 1;
}
- else /* REPLACE */ {
+ else { /* REPLACE */
/* for whole block - only key if there's a keyframe on that frame already
* this is a valid assumption when we're blocking + tweaking
*/
@@ -1592,19 +1594,19 @@ int autokeyframe_cfra_can_key(Scene *scene, ID *id)
/* --------------- API/Per-Datablock Handling ------------------- */
/* Checks if some F-Curve has a keyframe for a given frame */
-short fcurve_frame_has_keyframe (FCurve *fcu, float frame, short filter)
+short fcurve_frame_has_keyframe(FCurve *fcu, float frame, short filter)
{
/* quick sanity check */
if (ELEM(NULL, fcu, fcu->bezt))
return 0;
/* we either include all regardless of muting, or only non-muted */
- if ((filter & ANIMFILTER_KEYS_MUTED) || (fcu->flag & FCURVE_MUTED)==0) {
+ if ((filter & ANIMFILTER_KEYS_MUTED) || (fcu->flag & FCURVE_MUTED) == 0) {
short replace = -1;
int i = binarysearch_bezt_index(fcu->bezt, frame, fcu->totvert, &replace);
/* binarysearch_bezt_index will set replace to be 0 or 1
- * - obviously, 1 represents a match
+ * - obviously, 1 represents a match
*/
if (replace) {
/* sanity check: 'i' may in rare cases exceed arraylen */
@@ -1619,7 +1621,7 @@ short fcurve_frame_has_keyframe (FCurve *fcu, float frame, short filter)
/* Checks whether an Action has a keyframe for a given frame
* Since we're only concerned whether a keyframe exists, we can simply loop until a match is found...
*/
-static short action_frame_has_keyframe (bAction *act, float frame, short filter)
+static short action_frame_has_keyframe(bAction *act, float frame, short filter)
{
FCurve *fcu;
@@ -1634,7 +1636,7 @@ static short action_frame_has_keyframe (bAction *act, float frame, short filter)
/* loop over F-Curves, using binary-search to try to find matches
* - this assumes that keyframes are only beztriples
*/
- for (fcu= act->curves.first; fcu; fcu= fcu->next) {
+ for (fcu = act->curves.first; fcu; fcu = fcu->next) {
/* only check if there are keyframes (currently only of type BezTriple) */
if (fcu->bezt && fcu->totvert) {
if (fcurve_frame_has_keyframe(fcu, frame, filter))
@@ -1647,7 +1649,7 @@ static short action_frame_has_keyframe (bAction *act, float frame, short filter)
}
/* Checks whether an Object has a keyframe for a given frame */
-static short object_frame_has_keyframe (Object *ob, float frame, short filter)
+static short object_frame_has_keyframe(Object *ob, float frame, short filter)
{
/* error checking */
if (ob == NULL)
@@ -1660,26 +1662,26 @@ static short object_frame_has_keyframe (Object *ob, float frame, short filter)
}
/* try shapekey keyframes (if available, and allowed by filter) */
- if ( !(filter & ANIMFILTER_KEYS_LOCAL) && !(filter & ANIMFILTER_KEYS_NOSKEY) ) {
- Key *key= ob_get_key(ob);
+ if (!(filter & ANIMFILTER_KEYS_LOCAL) && !(filter & ANIMFILTER_KEYS_NOSKEY) ) {
+ Key *key = ob_get_key(ob);
/* shapekeys can have keyframes ('Relative Shape Keys')
* or depend on time (old 'Absolute Shape Keys')
*/
- /* 1. test for relative (with keyframes) */
+ /* 1. test for relative (with keyframes) */
if (id_frame_has_keyframe((ID *)key, frame, filter))
return 1;
- /* 2. test for time */
+ /* 2. test for time */
// TODO... yet to be implemented (this feature may evolve before then anyway)
}
/* try materials */
- if ( !(filter & ANIMFILTER_KEYS_LOCAL) && !(filter & ANIMFILTER_KEYS_NOMAT) ) {
+ if (!(filter & ANIMFILTER_KEYS_LOCAL) && !(filter & ANIMFILTER_KEYS_NOMAT) ) {
/* if only active, then we can skip a lot of looping */
if (filter & ANIMFILTER_KEYS_ACTIVE) {
- Material *ma= give_current_material(ob, (ob->actcol + 1));
+ Material *ma = give_current_material(ob, (ob->actcol + 1));
/* we only retrieve the active material... */
if (id_frame_has_keyframe((ID *)ma, frame, filter))
@@ -1689,8 +1691,8 @@ static short object_frame_has_keyframe (Object *ob, float frame, short filter)
int a;
/* loop over materials */
- for (a=0; a<ob->totcol; a++) {
- Material *ma= give_current_material(ob, a+1);
+ for (a = 0; a < ob->totcol; a++) {
+ Material *ma = give_current_material(ob, a + 1);
if (id_frame_has_keyframe((ID *)ma, frame, filter))
return 1;
@@ -1705,7 +1707,7 @@ static short object_frame_has_keyframe (Object *ob, float frame, short filter)
/* --------------- API ------------------- */
/* Checks whether a keyframe exists for the given ID-block one the given frame */
-short id_frame_has_keyframe (ID *id, float frame, short filter)
+short id_frame_has_keyframe(ID *id, float frame, short filter)
{
/* sanity checks */
if (id == NULL)
@@ -1721,15 +1723,15 @@ short id_frame_has_keyframe (ID *id, float frame, short filter)
// XXX TODO... for now, just use 'normal' behavior
// break;
- default: /* 'normal type' */
+ default: /* 'normal type' */
{
- AnimData *adt= BKE_animdata_from_id(id);
+ AnimData *adt = BKE_animdata_from_id(id);
/* only check keyframes in active action */
if (adt)
return action_frame_has_keyframe(adt->action, frame, filter);
}
- break;
+ break;
}
diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c
index f66aa31f3f4..cd914f9ff9a 100644
--- a/source/blender/editors/animation/keyingsets.c
+++ b/source/blender/editors/animation/keyingsets.c
@@ -75,16 +75,16 @@
*/
/* poll callback for adding default KeyingSet */
-static int keyingset_poll_default_add (bContext *C)
+static int keyingset_poll_default_add(bContext *C)
{
/* as long as there's an active Scene, it's fine */
return (CTX_data_scene(C) != NULL);
}
/* poll callback for editing active KeyingSet */
-static int keyingset_poll_active_edit (bContext *C)
+static int keyingset_poll_active_edit(bContext *C)
{
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
if (scene == NULL)
return 0;
@@ -94,9 +94,9 @@ static int keyingset_poll_active_edit (bContext *C)
}
/* poll callback for editing active KeyingSet Path */
-static int keyingset_poll_activePath_edit (bContext *C)
+static int keyingset_poll_activePath_edit(bContext *C)
{
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
KeyingSet *ks;
if (scene == NULL)
@@ -104,7 +104,7 @@ static int keyingset_poll_activePath_edit (bContext *C)
if (scene->active_keyingset <= 0)
return 0;
else
- ks= BLI_findlink(&scene->keyingsets, scene->active_keyingset-1);
+ ks = BLI_findlink(&scene->keyingsets, scene->active_keyingset - 1);
/* there must be an active KeyingSet and an active path */
return ((ks) && (ks->paths.first) && (ks->active_path > 0));
@@ -113,10 +113,10 @@ static int keyingset_poll_activePath_edit (bContext *C)
/* Add a Default (Empty) Keying Set ------------------------- */
-static int add_default_keyingset_exec (bContext *C, wmOperator *UNUSED(op))
+static int add_default_keyingset_exec(bContext *C, wmOperator *UNUSED(op))
{
- Scene *scene= CTX_data_scene(C);
- short flag=0, keyingflag=0;
+ Scene *scene = CTX_data_scene(C);
+ short flag = 0, keyingflag = 0;
/* validate flags
* - absolute KeyingSets should be created by default
@@ -129,15 +129,15 @@ static int add_default_keyingset_exec (bContext *C, wmOperator *UNUSED(op))
/* call the API func, and set the active keyingset index */
BKE_keyingset_add(&scene->keyingsets, NULL, NULL, flag, keyingflag);
- scene->active_keyingset= BLI_countlist(&scene->keyingsets);
+ scene->active_keyingset = BLI_countlist(&scene->keyingsets);
/* send notifiers */
- WM_event_add_notifier(C, NC_SCENE|ND_KEYINGSET, NULL);
+ WM_event_add_notifier(C, NC_SCENE | ND_KEYINGSET, NULL);
return OPERATOR_FINISHED;
}
-void ANIM_OT_keying_set_add (wmOperatorType *ot)
+void ANIM_OT_keying_set_add(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Add Empty Keying Set";
@@ -151,9 +151,9 @@ void ANIM_OT_keying_set_add (wmOperatorType *ot)
/* Remove 'Active' Keying Set ------------------------- */
-static int remove_active_keyingset_exec (bContext *C, wmOperator *op)
+static int remove_active_keyingset_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
KeyingSet *ks;
/* verify the Keying Set to use:
@@ -169,7 +169,7 @@ static int remove_active_keyingset_exec (bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
else
- ks= BLI_findlink(&scene->keyingsets, scene->active_keyingset-1);
+ ks = BLI_findlink(&scene->keyingsets, scene->active_keyingset - 1);
/* free KeyingSet's data, then remove it from the scene */
BKE_keyingset_free(ks);
@@ -179,12 +179,12 @@ static int remove_active_keyingset_exec (bContext *C, wmOperator *op)
scene->active_keyingset--;
/* send notifiers */
- WM_event_add_notifier(C, NC_SCENE|ND_KEYINGSET, NULL);
+ WM_event_add_notifier(C, NC_SCENE | ND_KEYINGSET, NULL);
return OPERATOR_FINISHED;
}
-void ANIM_OT_keying_set_remove (wmOperatorType *ot)
+void ANIM_OT_keying_set_remove(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Remove Active Keying Set";
@@ -198,9 +198,9 @@ void ANIM_OT_keying_set_remove (wmOperatorType *ot)
/* Add Empty Keying Set Path ------------------------- */
-static int add_empty_ks_path_exec (bContext *C, wmOperator *op)
+static int add_empty_ks_path_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
KeyingSet *ks;
KS_Path *ksp;
@@ -213,21 +213,21 @@ static int add_empty_ks_path_exec (bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
else
- ks= BLI_findlink(&scene->keyingsets, scene->active_keyingset-1);
+ ks = BLI_findlink(&scene->keyingsets, scene->active_keyingset - 1);
/* don't use the API method for this, since that checks on values... */
- ksp= MEM_callocN(sizeof(KS_Path), "KeyingSetPath Empty");
+ ksp = MEM_callocN(sizeof(KS_Path), "KeyingSetPath Empty");
BLI_addtail(&ks->paths, ksp);
- ks->active_path= BLI_countlist(&ks->paths);
+ ks->active_path = BLI_countlist(&ks->paths);
- ksp->groupmode= KSP_GROUP_KSNAME; // XXX?
- ksp->idtype= ID_OB;
- ksp->flag= KSP_FLAG_WHOLE_ARRAY;
+ ksp->groupmode = KSP_GROUP_KSNAME; // XXX?
+ ksp->idtype = ID_OB;
+ ksp->flag = KSP_FLAG_WHOLE_ARRAY;
return OPERATOR_FINISHED;
}
-void ANIM_OT_keying_set_path_add (wmOperatorType *ot)
+void ANIM_OT_keying_set_path_add(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Add Empty Keying Set Path";
@@ -241,14 +241,14 @@ void ANIM_OT_keying_set_path_add (wmOperatorType *ot)
/* Remove Active Keying Set Path ------------------------- */
-static int remove_active_ks_path_exec (bContext *C, wmOperator *op)
+static int remove_active_ks_path_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
- KeyingSet *ks= BLI_findlink(&scene->keyingsets, scene->active_keyingset-1);
+ Scene *scene = CTX_data_scene(C);
+ KeyingSet *ks = BLI_findlink(&scene->keyingsets, scene->active_keyingset - 1);
/* if there is a KeyingSet, find the nominated path to remove */
if (ks) {
- KS_Path *ksp= BLI_findlink(&ks->paths, ks->active_path-1);
+ KS_Path *ksp = BLI_findlink(&ks->paths, ks->active_path - 1);
if (ksp) {
/* remove the active path from the KeyingSet */
@@ -270,7 +270,7 @@ static int remove_active_ks_path_exec (bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void ANIM_OT_keying_set_path_remove (wmOperatorType *ot)
+void ANIM_OT_keying_set_path_remove(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Remove Active Keying Set Path";
@@ -287,24 +287,24 @@ void ANIM_OT_keying_set_path_remove (wmOperatorType *ot)
/* Add to KeyingSet Button Operator ------------------------ */
-static int add_keyingset_button_exec (bContext *C, wmOperator *op)
+static int add_keyingset_button_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
KeyingSet *ks = NULL;
- PropertyRNA *prop= NULL;
- PointerRNA ptr= {{NULL}};
+ PropertyRNA *prop = NULL;
+ PointerRNA ptr = {{NULL}};
char *path = NULL;
- short success= 0;
- int index=0, pflag=0;
- int all= RNA_boolean_get(op->ptr, "all");
+ short success = 0;
+ int index = 0, pflag = 0;
+ int all = RNA_boolean_get(op->ptr, "all");
/* verify the Keying Set to use:
* - use the active one for now (more control over this can be added later)
* - add a new one if it doesn't exist
*/
if (scene->active_keyingset == 0) {
- short flag=0, keyingflag=0;
+ short flag = 0, keyingflag = 0;
/* validate flags
* - absolute KeyingSets should be created by default
@@ -317,23 +317,23 @@ static int add_keyingset_button_exec (bContext *C, wmOperator *op)
keyingflag |= INSERTKEY_XYZ2RGB;
/* call the API func, and set the active keyingset index */
- ks= BKE_keyingset_add(&scene->keyingsets, "ButtonKeyingSet", "Button Keying Set", flag, keyingflag);
+ ks = BKE_keyingset_add(&scene->keyingsets, "ButtonKeyingSet", "Button Keying Set", flag, keyingflag);
- scene->active_keyingset= BLI_countlist(&scene->keyingsets);
+ scene->active_keyingset = BLI_countlist(&scene->keyingsets);
}
else if (scene->active_keyingset < 0) {
BKE_report(op->reports, RPT_ERROR, "Cannot add property to built in Keying Set");
return OPERATOR_CANCELLED;
}
else
- ks= BLI_findlink(&scene->keyingsets, scene->active_keyingset-1);
+ ks = BLI_findlink(&scene->keyingsets, scene->active_keyingset - 1);
/* try to add to keyingset using property retrieved from UI */
uiContextActiveProperty(C, &ptr, &prop, &index);
/* check if property is able to be added */
if (ptr.id.data && ptr.data && prop && RNA_property_animateable(&ptr, prop)) {
- path= RNA_path_from_ID_to_property(&ptr, prop);
+ path = RNA_path_from_ID_to_property(&ptr, prop);
if (path) {
/* set flags */
@@ -344,13 +344,13 @@ static int add_keyingset_button_exec (bContext *C, wmOperator *op)
* necessary if we want the entire array for most cases to get included without the user
* having to worry about where they clicked
*/
- index= 0;
+ index = 0;
}
/* add path to this setting */
BKE_keyingset_add_path(ks, ptr.id.data, NULL, path, index, pflag, KSP_GROUP_KSNAME);
- ks->active_path= BLI_countlist(&ks->paths);
- success= 1;
+ ks->active_path = BLI_countlist(&ks->paths);
+ success = 1;
/* free the temp path created */
MEM_freeN(path);
@@ -362,24 +362,25 @@ static int add_keyingset_button_exec (bContext *C, wmOperator *op)
DAG_ids_flush_update(bmain, 0);
/* for now, only send ND_KEYS for KeyingSets */
- WM_event_add_notifier(C, NC_SCENE|ND_KEYINGSET, NULL);
+ WM_event_add_notifier(C, NC_SCENE | ND_KEYINGSET, NULL);
}
- return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED;
+ return (success) ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
}
-void ANIM_OT_keyingset_button_add (wmOperatorType *ot)
+void ANIM_OT_keyingset_button_add(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Add to Keying Set";
ot->idname = "ANIM_OT_keyingset_button_add";
+ ot->description = "Add current UI-active property to current keying set";
/* callbacks */
ot->exec = add_keyingset_button_exec;
//op->poll= ???
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "all", 1, "All", "Add all elements of the array to a Keying Set");
@@ -387,16 +388,16 @@ void ANIM_OT_keyingset_button_add (wmOperatorType *ot)
/* Remove from KeyingSet Button Operator ------------------------ */
-static int remove_keyingset_button_exec (bContext *C, wmOperator *op)
+static int remove_keyingset_button_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
KeyingSet *ks = NULL;
- PropertyRNA *prop= NULL;
- PointerRNA ptr= {{NULL}};
+ PropertyRNA *prop = NULL;
+ PointerRNA ptr = {{NULL}};
char *path = NULL;
- short success= 0;
- int index=0;
+ short success = 0;
+ int index = 0;
/* verify the Keying Set to use:
* - use the active one for now (more control over this can be added later)
@@ -411,23 +412,23 @@ static int remove_keyingset_button_exec (bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
else
- ks= BLI_findlink(&scene->keyingsets, scene->active_keyingset-1);
+ ks = BLI_findlink(&scene->keyingsets, scene->active_keyingset - 1);
/* try to add to keyingset using property retrieved from UI */
uiContextActiveProperty(C, &ptr, &prop, &index);
if (ptr.id.data && ptr.data && prop) {
- path= RNA_path_from_ID_to_property(&ptr, prop);
+ path = RNA_path_from_ID_to_property(&ptr, prop);
if (path) {
KS_Path *ksp;
/* try to find a path matching this description */
- ksp= BKE_keyingset_find_path(ks, ptr.id.data, ks->name, path, index, KSP_GROUP_KSNAME);
+ ksp = BKE_keyingset_find_path(ks, ptr.id.data, ks->name, path, index, KSP_GROUP_KSNAME);
if (ksp) {
BKE_keyingset_free_path(ks, ksp);
- success= 1;
+ success = 1;
}
/* free temp path used */
@@ -441,24 +442,25 @@ static int remove_keyingset_button_exec (bContext *C, wmOperator *op)
DAG_ids_flush_update(bmain, 0);
/* for now, only send ND_KEYS for KeyingSets */
- WM_event_add_notifier(C, NC_SCENE|ND_KEYINGSET, NULL);
+ WM_event_add_notifier(C, NC_SCENE | ND_KEYINGSET, NULL);
}
- return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED;
+ return (success) ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
}
-void ANIM_OT_keyingset_button_remove (wmOperatorType *ot)
+void ANIM_OT_keyingset_button_remove(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Remove from Keying Set";
ot->idname = "ANIM_OT_keyingset_button_remove";
+ ot->description = "Remove current UI-active property from current keying set";
/* callbacks */
ot->exec = remove_keyingset_button_exec;
//op->poll= ???
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ******************************************* */
@@ -466,7 +468,7 @@ void ANIM_OT_keyingset_button_remove (wmOperatorType *ot)
/* Change Active KeyingSet Operator ------------------------ */
/* This operator checks if a menu should be shown for choosing the KeyingSet to make the active one */
-static int keyingset_active_menu_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(event))
+static int keyingset_active_menu_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
uiPopupMenu *pup;
uiLayout *layout;
@@ -480,7 +482,7 @@ static int keyingset_active_menu_invoke (bContext *C, wmOperator *op, wmEvent *U
return OPERATOR_CANCELLED;
}
-static int keyingset_active_menu_exec (bContext *C, wmOperator *op)
+static int keyingset_active_menu_exec(bContext *C, wmOperator *op)
{
Scene *scene = CTX_data_scene(C);
int type = RNA_enum_get(op->ptr, "type");
@@ -489,18 +491,19 @@ static int keyingset_active_menu_exec (bContext *C, wmOperator *op)
scene->active_keyingset = type;
/* send notifiers */
- WM_event_add_notifier(C, NC_SCENE|ND_KEYINGSET, NULL);
+ WM_event_add_notifier(C, NC_SCENE | ND_KEYINGSET, NULL);
return OPERATOR_FINISHED;
}
-void ANIM_OT_keying_set_active_set (wmOperatorType *ot)
+void ANIM_OT_keying_set_active_set(wmOperatorType *ot)
{
PropertyRNA *prop;
/* identifiers */
ot->name = "Set Active Keying Set";
ot->idname = "ANIM_OT_keying_set_active_set";
+ ot->description = "Select a new keying set as the active one";
/* callbacks */
ot->invoke = keyingset_active_menu_invoke;
@@ -508,10 +511,10 @@ void ANIM_OT_keying_set_active_set (wmOperatorType *ot)
ot->poll = ED_operator_areaactive;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* keyingset to use (dynamic enum) */
- prop= RNA_def_enum(ot->srna, "type", DummyRNA_DEFAULT_items, 0, "Keying Set", "The Keying Set to use");
+ prop = RNA_def_enum(ot->srna, "type", DummyRNA_DEFAULT_items, 0, "Keying Set", "The Keying Set to use");
RNA_def_enum_funcs(prop, ANIM_keying_sets_enum_itemf);
/* RNA_def_property_flag(prop, PROP_HIDDEN);*/
}
@@ -528,7 +531,7 @@ ListBase builtin_keyingsets = {NULL, NULL};
/* --------------- */
/* Find KeyingSet type info given a name */
-KeyingSetInfo *ANIM_keyingset_info_find_named (const char name[])
+KeyingSetInfo *ANIM_keyingset_info_find_name(const char name[])
{
/* sanity checks */
if ((name == NULL) || (name[0] == 0))
@@ -539,9 +542,9 @@ KeyingSetInfo *ANIM_keyingset_info_find_named (const char name[])
}
/* Find builtin KeyingSet by name */
-KeyingSet *ANIM_builtin_keyingset_get_named (KeyingSet *prevKS, const char name[])
+KeyingSet *ANIM_builtin_keyingset_get_named(KeyingSet *prevKS, const char name[])
{
- KeyingSet *ks, *first=NULL;
+ KeyingSet *ks, *first = NULL;
/* sanity checks any name to check? */
if (name[0] == 0)
@@ -549,12 +552,12 @@ KeyingSet *ANIM_builtin_keyingset_get_named (KeyingSet *prevKS, const char name[
/* get first KeyingSet to use */
if (prevKS && prevKS->next)
- first= prevKS->next;
+ first = prevKS->next;
else
- first= builtin_keyingsets.first;
+ first = builtin_keyingsets.first;
/* loop over KeyingSets checking names */
- for (ks= first; ks; ks= ks->next) {
+ for (ks = first; ks; ks = ks->next) {
if (strcmp(name, ks->idname) == 0)
return ks;
}
@@ -571,7 +574,7 @@ KeyingSet *ANIM_builtin_keyingset_get_named (KeyingSet *prevKS, const char name[
/* --------------- */
/* Add the given KeyingSetInfo to the list of type infos, and create an appropriate builtin set too */
-void ANIM_keyingset_info_register (KeyingSetInfo *ksi)
+void ANIM_keyingset_info_register(KeyingSetInfo *ksi)
{
KeyingSet *ks;
@@ -591,14 +594,14 @@ void ANIM_keyingset_info_register (KeyingSetInfo *ksi)
}
/* Remove the given KeyingSetInfo from the list of type infos, and also remove the builtin set if appropriate */
-void ANIM_keyingset_info_unregister (Main *bmain, KeyingSetInfo *ksi)
+void ANIM_keyingset_info_unregister(Main *bmain, KeyingSetInfo *ksi)
{
KeyingSet *ks, *ksn;
/* find relevant builtin KeyingSets which use this, and remove them */
// TODO: this isn't done now, since unregister is really only used atm when we
// reload the scripts, which kindof defeats the purpose of "builtin"?
- for (ks= builtin_keyingsets.first; ks; ks= ksn) {
+ for (ks = builtin_keyingsets.first; ks; ks = ksn) {
ksn = ks->next;
/* remove if matching typeinfo name */
@@ -607,7 +610,7 @@ void ANIM_keyingset_info_unregister (Main *bmain, KeyingSetInfo *ksi)
BKE_keyingset_free(ks);
BLI_remlink(&builtin_keyingsets, ks);
- for (scene= bmain->scene.first; scene; scene= scene->id.next)
+ for (scene = bmain->scene.first; scene; scene = scene->id.next)
BLI_remlink_safe(&scene->keyingsets, ks);
MEM_freeN(ks);
@@ -620,13 +623,13 @@ void ANIM_keyingset_info_unregister (Main *bmain, KeyingSetInfo *ksi)
/* --------------- */
-void ANIM_keyingset_infos_exit (void)
+void ANIM_keyingset_infos_exit(void)
{
KeyingSetInfo *ksi, *next;
/* free type infos */
- for (ksi=keyingset_type_infos.first; ksi; ksi=next) {
- next= ksi->next;
+ for (ksi = keyingset_type_infos.first; ksi; ksi = next) {
+ next = ksi->next;
/* free extra RNA data, and remove from list */
if (ksi->ext.free)
@@ -644,7 +647,7 @@ void ANIM_keyingset_infos_exit (void)
/* Getters for Active/Indices ----------------------------- */
/* Get the active Keying Set for the Scene provided */
-KeyingSet *ANIM_scene_get_active_keyingset (Scene *scene)
+KeyingSet *ANIM_scene_get_active_keyingset(Scene *scene)
{
/* if no scene, we've got no hope of finding the Keying Set */
if (scene == NULL)
@@ -656,13 +659,13 @@ KeyingSet *ANIM_scene_get_active_keyingset (Scene *scene)
* - < 0: a builtin keying set
*/
if (scene->active_keyingset > 0)
- return BLI_findlink(&scene->keyingsets, scene->active_keyingset-1);
+ return BLI_findlink(&scene->keyingsets, scene->active_keyingset - 1);
else
- return BLI_findlink(&builtin_keyingsets, (-scene->active_keyingset)-1);
+ return BLI_findlink(&builtin_keyingsets, (-scene->active_keyingset) - 1);
}
/* Get the index of the Keying Set provided, for the given Scene */
-int ANIM_scene_get_keyingset_index (Scene *scene, KeyingSet *ks)
+int ANIM_scene_get_keyingset_index(Scene *scene, KeyingSet *ks)
{
int index;
@@ -696,7 +699,7 @@ KeyingSet *ANIM_get_keyingset_for_autokeying(Scene *scene, const char *tranformK
{
/* get KeyingSet to use
* - use the active KeyingSet if defined (and user wants to use it for all autokeying),
- * or otherwise key transforms only
+ * or otherwise key transforms only
*/
if (IS_AUTOKEY_FLAG(scene, ONLYKEYINGSET) && (scene->active_keyingset))
return ANIM_scene_get_active_keyingset(scene);
@@ -709,13 +712,13 @@ KeyingSet *ANIM_get_keyingset_for_autokeying(Scene *scene, const char *tranformK
/* Menu of All Keying Sets ----------------------------- */
/* Dynamically populate an enum of Keying Sets */
-EnumPropertyItem *ANIM_keying_sets_enum_itemf (bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
+EnumPropertyItem *ANIM_keying_sets_enum_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
{
Scene *scene = CTX_data_scene(C);
KeyingSet *ks;
- EnumPropertyItem *item= NULL, item_tmp= {0};
- int totitem= 0;
- int i= 0;
+ EnumPropertyItem *item = NULL, item_tmp = {0};
+ int totitem = 0;
+ int i = 0;
if (C == NULL) {
return DummyRNA_DEFAULT_items;
@@ -726,9 +729,9 @@ EnumPropertyItem *ANIM_keying_sets_enum_itemf (bContext *C, PointerRNA *UNUSED(p
*/
if (scene->active_keyingset) {
/* active Keying Set */
- item_tmp.identifier= "__ACTIVE__";
- item_tmp.name= "Active Keying Set";
- item_tmp.value= i;
+ item_tmp.identifier = "__ACTIVE__";
+ item_tmp.name = "Active Keying Set";
+ item_tmp.value = i;
RNA_enum_item_add(&item, &totitem, &item_tmp);
/* separator */
@@ -741,12 +744,12 @@ EnumPropertyItem *ANIM_keying_sets_enum_itemf (bContext *C, PointerRNA *UNUSED(p
* - these are listed in the order in which they were defined for the active scene
*/
if (scene->keyingsets.first) {
- for (ks= scene->keyingsets.first; ks; ks= ks->next, i++) {
+ for (ks = scene->keyingsets.first; ks; ks = ks->next, i++) {
if (ANIM_keyingset_context_ok_poll(C, ks)) {
item_tmp.identifier = ks->idname;
item_tmp.name = ks->name;
item_tmp.description = ks->description;
- item_tmp.value= i;
+ item_tmp.value = i;
RNA_enum_item_add(&item, &totitem, &item_tmp);
}
}
@@ -756,20 +759,20 @@ EnumPropertyItem *ANIM_keying_sets_enum_itemf (bContext *C, PointerRNA *UNUSED(p
}
/* builtin Keying Sets */
- i= -1;
- for (ks= builtin_keyingsets.first; ks; ks= ks->next, i--) {
+ i = -1;
+ for (ks = builtin_keyingsets.first; ks; ks = ks->next, i--) {
/* only show KeyingSet if context is suitable */
if (ANIM_keyingset_context_ok_poll(C, ks)) {
item_tmp.identifier = ks->idname;
item_tmp.name = ks->name;
item_tmp.description = ks->description;
- item_tmp.value= i;
+ item_tmp.value = i;
RNA_enum_item_add(&item, &totitem, &item_tmp);
}
}
RNA_enum_item_end(&item, &totitem);
- *free= 1;
+ *free = 1;
return item;
}
@@ -780,10 +783,10 @@ EnumPropertyItem *ANIM_keying_sets_enum_itemf (bContext *C, PointerRNA *UNUSED(p
/* Polling API ----------------------------------------------- */
/* Check if KeyingSet can be used in the current context */
-short ANIM_keyingset_context_ok_poll (bContext *C, KeyingSet *ks)
+short ANIM_keyingset_context_ok_poll(bContext *C, KeyingSet *ks)
{
if ((ks->flag & KEYINGSET_ABSOLUTE) == 0) {
- KeyingSetInfo *ksi = ANIM_keyingset_info_find_named(ks->typeinfo);
+ KeyingSetInfo *ksi = ANIM_keyingset_info_find_name(ks->typeinfo);
/* get the associated 'type info' for this KeyingSet */
if (ksi == NULL)
@@ -800,12 +803,12 @@ short ANIM_keyingset_context_ok_poll (bContext *C, KeyingSet *ks)
/* Special 'Overrides' Iterator for Relative KeyingSets ------ */
/* 'Data Sources' for relative Keying Set 'overrides'
- * - this is basically a wrapper for PointerRNA's in a linked list
+ * - this is basically a wrapper for PointerRNA's in a linked list
* - do not allow this to be accessed from outside for now
*/
typedef struct tRKS_DSource {
struct tRKS_DSource *next, *prev;
- PointerRNA ptr; /* the whole point of this exercise! */
+ PointerRNA ptr; /* the whole point of this exercise! */
} tRKS_DSource;
@@ -813,7 +816,7 @@ typedef struct tRKS_DSource {
* relative Keying Sets, with the main usage of this being operators
* requiring Auto Keyframing. Internal Use Only!
*/
-static void RKS_ITER_overrides_list (KeyingSetInfo *ksi, bContext *C, KeyingSet *ks, ListBase *dsources)
+static void RKS_ITER_overrides_list(KeyingSetInfo *ksi, bContext *C, KeyingSet *ks, ListBase *dsources)
{
tRKS_DSource *ds;
@@ -824,7 +827,7 @@ static void RKS_ITER_overrides_list (KeyingSetInfo *ksi, bContext *C, KeyingSet
}
/* Add new data source for relative Keying Sets */
-void ANIM_relative_keyingset_add_source (ListBase *dsources, ID *id, StructRNA *srna, void *data)
+void ANIM_relative_keyingset_add_source(ListBase *dsources, ID *id, StructRNA *srna, void *data)
{
tRKS_DSource *ds;
@@ -857,7 +860,7 @@ void ANIM_relative_keyingset_add_source (ListBase *dsources, ID *id, StructRNA *
*
* Returns 0 if succeeded, otherwise an error code: eModifyKey_Returns
*/
-short ANIM_validate_keyingset (bContext *C, ListBase *dsources, KeyingSet *ks)
+short ANIM_validate_keyingset(bContext *C, ListBase *dsources, KeyingSet *ks)
{
/* sanity check */
if (ks == NULL)
@@ -865,7 +868,7 @@ short ANIM_validate_keyingset (bContext *C, ListBase *dsources, KeyingSet *ks)
/* if relative Keying Sets, poll and build up the paths */
if ((ks->flag & KEYINGSET_ABSOLUTE) == 0) {
- KeyingSetInfo *ksi = ANIM_keyingset_info_find_named(ks->typeinfo);
+ KeyingSetInfo *ksi = ANIM_keyingset_info_find_name(ks->typeinfo);
/* clear all existing paths
* NOTE: BKE_keyingset_free() frees all of the paths for the KeyingSet, but not the set itself
@@ -905,13 +908,13 @@ short ANIM_validate_keyingset (bContext *C, ListBase *dsources, KeyingSet *ks)
* by the KeyingSet. This takes into account many of the different combinations of using KeyingSets.
* Returns the number of channels that keyframes were added to
*/
-int ANIM_apply_keyingset (bContext *C, ListBase *dsources, bAction *act, KeyingSet *ks, short mode, float cfra)
+int ANIM_apply_keyingset(bContext *C, ListBase *dsources, bAction *act, KeyingSet *ks, short mode, float cfra)
{
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
ReportList *reports = CTX_wm_reports(C);
KS_Path *ksp;
- int kflag=0, success= 0;
- char *groupname= NULL;
+ int kflag = 0, success = 0;
+ char *groupname = NULL;
/* sanity checks */
if (ks == NULL)
@@ -920,13 +923,13 @@ int ANIM_apply_keyingset (bContext *C, ListBase *dsources, bAction *act, KeyingS
/* get flags to use */
if (mode == MODIFYKEY_MODE_INSERT) {
/* use KeyingSet's flags as base */
- kflag= ks->keyingflag;
+ kflag = ks->keyingflag;
/* suppliment with info from the context */
kflag |= ANIM_get_keyframing_flags(scene, 1);
}
else if (mode == MODIFYKEY_MODE_DELETE)
- kflag= 0;
+ kflag = 0;
/* if relative Keying Sets, poll and build up the paths */
success = ANIM_validate_keyingset(C, dsources, ks);
@@ -937,15 +940,15 @@ int ANIM_apply_keyingset (bContext *C, ListBase *dsources, bAction *act, KeyingS
}
/* apply the paths as specified in the KeyingSet now */
- for (ksp= ks->paths.first; ksp; ksp= ksp->next) {
+ for (ksp = ks->paths.first; ksp; ksp = ksp->next) {
int arraylen, i;
short kflag2;
/* skip path if no ID pointer is specified */
if (ksp->id == NULL) {
BKE_reportf(reports, RPT_WARNING,
- "Skipping path in Keying Set, as it has no ID (KS = '%s', Path = '%s'[%d])",
- ks->name, ksp->rna_path, ksp->array_index);
+ "Skipping path in Keying Set, as it has no ID (KS = '%s', Path = '%s'[%d])",
+ ks->name, ksp->rna_path, ksp->array_index);
continue;
}
@@ -954,17 +957,17 @@ int ANIM_apply_keyingset (bContext *C, ListBase *dsources, bAction *act, KeyingS
/* get pointer to name of group to add channels to */
if (ksp->groupmode == KSP_GROUP_NONE)
- groupname= NULL;
+ groupname = NULL;
else if (ksp->groupmode == KSP_GROUP_KSNAME)
- groupname= ks->name;
+ groupname = ks->name;
else
- groupname= ksp->group;
+ groupname = ksp->group;
/* init arraylen and i - arraylen should be greater than i so that
* normal non-array entries get keyframed correctly
*/
- i= ksp->array_index;
- arraylen= i;
+ i = ksp->array_index;
+ arraylen = i;
/* get length of array if whole array option is enabled */
if (ksp->flag & KSP_FLAG_WHOLE_ARRAY) {
@@ -973,7 +976,7 @@ int ANIM_apply_keyingset (bContext *C, ListBase *dsources, bAction *act, KeyingS
RNA_id_pointer_create(ksp->id, &id_ptr);
if (RNA_path_resolve(&id_ptr, ksp->rna_path, &ptr, &prop) && prop)
- arraylen= RNA_property_array_length(&ptr, prop);
+ arraylen = RNA_property_array_length(&ptr, prop);
}
/* we should do at least one step */
@@ -995,15 +998,15 @@ int ANIM_apply_keyingset (bContext *C, ListBase *dsources, bAction *act, KeyingS
switch (GS(ksp->id->name)) {
case ID_OB: /* Object (or Object-Related) Keyframes */
{
- Object *ob= (Object *)ksp->id;
+ Object *ob = (Object *)ksp->id;
- ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME; // XXX: only object transforms only?
+ ob->recalc |= OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME; // XXX: only object transforms only?
}
- break;
+ break;
}
/* send notifiers for updates (this doesn't require context to work!) */
- WM_main_add_notifier(NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
+ WM_main_add_notifier(NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
}
/* return the number of channels successfully affected */
diff --git a/source/blender/editors/armature/BIF_generate.h b/source/blender/editors/armature/BIF_generate.h
index 1d8ee8e2c62..583178dd2b7 100644
--- a/source/blender/editors/armature/BIF_generate.h
+++ b/source/blender/editors/armature/BIF_generate.h
@@ -32,7 +32,7 @@ struct BArcIterator;
struct bArmature;
struct ListBase;
-typedef int(NextSubdivisionFunc)(struct ToolSettings*, struct BArcIterator*, int, int, float[3], float[3]);
+typedef int (NextSubdivisionFunc)(struct ToolSettings *, struct BArcIterator *, int, int, float[3], float[3]);
float calcArcCorrelation(struct BArcIterator *iter, int start, int end, float v0[3], float n[3]);
@@ -40,7 +40,7 @@ int nextFixedSubdivision(struct ToolSettings *toolsettings, struct BArcIterator
int nextLengthSubdivision(struct ToolSettings *toolsettings, struct BArcIterator *iter, int start, int end, float head[3], float p[3]);
int nextAdaptativeSubdivision(struct ToolSettings *toolsettings, struct BArcIterator *iter, int start, int end, float head[3], float p[3]);
-struct EditBone * subdivideArcBy(struct ToolSettings *toolsettings, struct bArmature *arm, ListBase *editbones, struct BArcIterator *iter, float invmat[][4], float tmat[][3], NextSubdivisionFunc next_subdividion);
+struct EditBone *subdivideArcBy(struct ToolSettings *toolsettings, struct bArmature *arm, ListBase *editbones, struct BArcIterator *iter, float invmat[][4], float tmat[][3], NextSubdivisionFunc next_subdividion);
void setBoneRollFromNormal(struct EditBone *bone, float *no, float invmat[][4], float tmat[][3]);
diff --git a/source/blender/editors/armature/BIF_retarget.h b/source/blender/editors/armature/BIF_retarget.h
index c878b0c36df..2ea0e0ab0d7 100644
--- a/source/blender/editors/armature/BIF_retarget.h
+++ b/source/blender/editors/armature/BIF_retarget.h
@@ -22,7 +22,6 @@
* \ingroup edarmature
*/
-
#ifndef __BIF_RETARGET_H__
#define __BIF_RETARGET_H__
@@ -49,21 +48,21 @@ struct RigEdge;
#define USE_THREADS
typedef struct RigGraph {
- ListBase arcs;
- ListBase nodes;
+ ListBase arcs;
+ ListBase nodes;
float length;
- FreeArc free_arc;
- FreeNode free_node;
- RadialSymmetry radial_symmetry;
- AxialSymmetry axial_symmetry;
+ FreeArc free_arc;
+ FreeNode free_node;
+ RadialSymmetry radial_symmetry;
+ AxialSymmetry axial_symmetry;
/*********************************/
- int flag;
+ int flag;
- ListBase controls;
- ListBase* editbones;
+ ListBase controls;
+ ListBase *editbones;
struct RigNode *head;
ReebGraph *link_mesh;
@@ -71,8 +70,8 @@ typedef struct RigGraph {
struct ThreadedWorker *worker;
- GHash *bones_map; /* map of editbones by name */
- GHash *controls_map; /* map of rigcontrols by bone pointer */
+ GHash *bones_map; /* map of editbones by name */
+ GHash *controls_map; /* map of rigcontrols by bone pointer */
struct Object *ob;
} RigGraph;
@@ -123,16 +122,16 @@ typedef struct RigEdge {
} RigEdge;
/* Graph flags */
-#define RIG_FREE_BONELIST 1
+#define RIG_FREE_BONELIST 1
/* Control flags */
-#define RIG_CTRL_HEAD_DONE 1
-#define RIG_CTRL_TAIL_DONE 2
-#define RIG_CTRL_PARENT_DEFORM 4
-#define RIG_CTRL_FIT_ROOT 8
-#define RIG_CTRL_FIT_BONE 16
+#define RIG_CTRL_HEAD_DONE 1
+#define RIG_CTRL_TAIL_DONE 2
+#define RIG_CTRL_PARENT_DEFORM 4
+#define RIG_CTRL_FIT_ROOT 8
+#define RIG_CTRL_FIT_BONE 16
-#define RIG_CTRL_DONE (RIG_CTRL_HEAD_DONE|RIG_CTRL_TAIL_DONE)
+#define RIG_CTRL_DONE (RIG_CTRL_HEAD_DONE | RIG_CTRL_TAIL_DONE)
/* Control tail flags */
typedef enum {
@@ -147,10 +146,10 @@ typedef struct RigControl {
struct EditBone *bone;
struct EditBone *link;
struct EditBone *link_tail;
- float up_axis[3];
- float offset[3];
- float qrot[4]; /* for dual linked bones, store the rotation of the linked bone for the finalization */
- int flag;
+ float up_axis[3];
+ float offset[3];
+ float qrot[4]; /* for dual linked bones, store the rotation of the linked bone for the finalization */
+ int flag;
LinkTailMode tail_mode;
} RigControl;
diff --git a/source/blender/editors/armature/armature_intern.h b/source/blender/editors/armature/armature_intern.h
index 13239f87e65..0760b384ecd 100644
--- a/source/blender/editors/armature/armature_intern.h
+++ b/source/blender/editors/armature/armature_intern.h
@@ -63,6 +63,7 @@ void ARMATURE_OT_select_all(struct wmOperatorType *ot);
void ARMATURE_OT_select_inverse(struct wmOperatorType *ot);
void ARMATURE_OT_select_hierarchy(struct wmOperatorType *ot);
void ARMATURE_OT_select_linked(struct wmOperatorType *ot);
+void ARMATURE_OT_select_similar(struct wmOperatorType *ot);
void ARMATURE_OT_delete(struct wmOperatorType *ot);
void ARMATURE_OT_duplicate(struct wmOperatorType *ot);
@@ -116,6 +117,7 @@ void POSE_OT_group_select(struct wmOperatorType *ot);
void POSE_OT_group_deselect(struct wmOperatorType *ot);
void POSE_OT_paths_calculate(struct wmOperatorType *ot);
+void POSE_OT_paths_update(struct wmOperatorType *ot);
void POSE_OT_paths_clear(struct wmOperatorType *ot);
void POSE_OT_autoside_names(struct wmOperatorType *ot);
@@ -148,19 +150,19 @@ void SKETCH_OT_select(struct wmOperatorType *ot);
typedef struct tPChanFCurveLink {
struct tPChanFCurveLink *next, *prev;
- ListBase fcurves; /* F-Curves for this PoseChannel (wrapped with LinkData) */
- struct bPoseChannel *pchan; /* Pose Channel which data is attached to */
+ ListBase fcurves; /* F-Curves for this PoseChannel (wrapped with LinkData) */
+ struct bPoseChannel *pchan; /* Pose Channel which data is attached to */
- char *pchan_path; /* RNA Path to this Pose Channel (needs to be freed when we're done) */
+ char *pchan_path; /* RNA Path to this Pose Channel (needs to be freed when we're done) */
- float oldloc[3]; /* transform values at start of operator (to be restored before each modal step) */
+ float oldloc[3]; /* transform values at start of operator (to be restored before each modal step) */
float oldrot[3];
float oldscale[3];
float oldquat[4];
float oldangle;
float oldaxis[3];
- struct IDProperty *oldprops; /* copy of custom properties at start of operator (to be restored before each modal step) */
+ struct IDProperty *oldprops; /* copy of custom properties at start of operator (to be restored before each modal step) */
} tPChanFCurveLink;
/* ----------- */
diff --git a/source/blender/editors/armature/armature_ops.c b/source/blender/editors/armature/armature_ops.c
index 21b97188522..f3461f71391 100644
--- a/source/blender/editors/armature/armature_ops.c
+++ b/source/blender/editors/armature/armature_ops.c
@@ -69,6 +69,7 @@ void ED_operatortypes_armature(void)
WM_operatortype_append(ARMATURE_OT_select_inverse);
WM_operatortype_append(ARMATURE_OT_select_hierarchy);
WM_operatortype_append(ARMATURE_OT_select_linked);
+ WM_operatortype_append(ARMATURE_OT_select_similar);
WM_operatortype_append(ARMATURE_OT_delete);
WM_operatortype_append(ARMATURE_OT_duplicate);
@@ -132,6 +133,7 @@ void ED_operatortypes_armature(void)
WM_operatortype_append(POSE_OT_group_deselect);
WM_operatortype_append(POSE_OT_paths_calculate);
+ WM_operatortype_append(POSE_OT_paths_update);
WM_operatortype_append(POSE_OT_paths_clear);
WM_operatortype_append(POSE_OT_autoside_names);
@@ -170,18 +172,20 @@ void ED_operatormacros_armature(void)
wmOperatorType *ot;
wmOperatorTypeMacro *otmacro;
- ot = WM_operatortype_append_macro("ARMATURE_OT_duplicate_move", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
+ ot = WM_operatortype_append_macro("ARMATURE_OT_duplicate_move", "Duplicate",
+ "Make copies of the selected bones within the same armature and move them",
+ OPTYPE_UNDO | OPTYPE_REGISTER);
if (ot) {
- ot->description = "Make copies of the selected bones within the same armature and move them";
WM_operatortype_macro_define(ot, "ARMATURE_OT_duplicate");
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_enum_set(otmacro->ptr, "proportional", 0);
}
- ot = WM_operatortype_append_macro("ARMATURE_OT_extrude_move", "Extrude", OPTYPE_UNDO|OPTYPE_REGISTER);
+ ot = WM_operatortype_append_macro("ARMATURE_OT_extrude_move", "Extrude",
+ "Create new bones from the selected joints and move them",
+ OPTYPE_UNDO | OPTYPE_REGISTER);
if (ot) {
- ot->description = "Create new bones from the selected joints and move them";
- otmacro=WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude");
+ otmacro = WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude");
RNA_boolean_set(otmacro->ptr, "forked", FALSE);
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_enum_set(otmacro->ptr, "proportional", 0);
@@ -189,10 +193,11 @@ void ED_operatormacros_armature(void)
// XXX would it be nicer to just be able to have standard extrude_move, but set the forked property separate?
// that would require fixing a properties bug 19733
- ot = WM_operatortype_append_macro("ARMATURE_OT_extrude_forked", "Extrude Forked", OPTYPE_UNDO|OPTYPE_REGISTER);
+ ot = WM_operatortype_append_macro("ARMATURE_OT_extrude_forked", "Extrude Forked",
+ "Create new bones from the selected joints and move them",
+ OPTYPE_UNDO | OPTYPE_REGISTER);
if (ot) {
- ot->description = "Create new bones from the selected joints and move them";
- otmacro=WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude");
+ otmacro = WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude");
RNA_boolean_set(otmacro->ptr, "forked", TRUE);
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_enum_set(otmacro->ptr, "proportional", 0);
@@ -232,7 +237,7 @@ void ED_keymap_armature(wmKeyConfig *keyconf)
RNA_boolean_set(kmi->ptr, "unselected", TRUE);
WM_keymap_add_item(keymap, "ARMATURE_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0);
- WM_keymap_add_item(keymap, "ARMATURE_OT_align", AKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
+ WM_keymap_add_item(keymap, "ARMATURE_OT_align", AKEY, KM_PRESS, KM_CTRL | KM_ALT, 0);
WM_keymap_add_item(keymap, "ARMATURE_OT_calculate_roll", NKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "ARMATURE_OT_switch_direction", FKEY, KM_PRESS, KM_ALT, 0);
@@ -243,23 +248,25 @@ void ED_keymap_armature(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "ARMATURE_OT_parent_clear", PKEY, KM_PRESS, KM_ALT, 0);
kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_select_all", AKEY, KM_PRESS, 0, 0);
- RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE);
+ RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE);
kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_select_all", IKEY, KM_PRESS, KM_CTRL, 0);
- RNA_enum_set(kmi->ptr, "action", SEL_INVERT);
+ RNA_enum_set(kmi->ptr, "action", SEL_INVERT);
kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, 0, 0);
- RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT);
+ RNA_boolean_set(kmi->ptr, "extend", FALSE);
kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
- RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT);
+ RNA_boolean_set(kmi->ptr, "extend", TRUE);
kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, 0, 0);
- RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD);
+ RNA_boolean_set(kmi->ptr, "extend", FALSE);
kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
- RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD);
+ RNA_boolean_set(kmi->ptr, "extend", TRUE);
+
+ WM_keymap_add_item(keymap, "ARMATURE_OT_select_similar", GKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "ARMATURE_OT_select_linked", LKEY, KM_PRESS, 0, 0);
@@ -272,27 +279,27 @@ void ED_keymap_armature(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "ARMATURE_OT_fill", FKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "ARMATURE_OT_merge", MKEY, KM_PRESS, KM_ALT, 0);
- WM_keymap_add_item(keymap, "ARMATURE_OT_separate", PKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
+ WM_keymap_add_item(keymap, "ARMATURE_OT_separate", PKEY, KM_PRESS, KM_CTRL | KM_ALT, 0);
- /* set flags */
+ /* set flags */
WM_keymap_add_menu(keymap, "VIEW3D_MT_bone_options_toggle", WKEY, KM_PRESS, KM_SHIFT, 0);
- WM_keymap_add_menu(keymap, "VIEW3D_MT_bone_options_enable", WKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
+ WM_keymap_add_menu(keymap, "VIEW3D_MT_bone_options_enable", WKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
WM_keymap_add_menu(keymap, "VIEW3D_MT_bone_options_disable", WKEY, KM_PRESS, KM_ALT, 0);
- /* armature/bone layers */
+ /* armature/bone layers */
WM_keymap_add_item(keymap, "ARMATURE_OT_layers_show_all", ACCENTGRAVEKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "ARMATURE_OT_armature_layers", MKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "ARMATURE_OT_bone_layers", MKEY, KM_PRESS, 0, 0);
- /* special transforms: */
- /* 1) envelope/b-bone size */
- kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", SKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
- RNA_enum_set(kmi->ptr, "mode", TFM_BONESIZE);
- /* 2) set roll */
+ /* special transforms: */
+ /* 1) envelope/b-bone size */
+ kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", SKEY, KM_PRESS, KM_CTRL | KM_ALT, 0);
+ RNA_enum_set(kmi->ptr, "mode", TFM_BONESIZE);
+ /* 2) set roll */
kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", RKEY, KM_PRESS, KM_CTRL, 0);
- RNA_enum_set(kmi->ptr, "mode", TFM_BONE_ROLL);
+ RNA_enum_set(kmi->ptr, "mode", TFM_BONE_ROLL);
- /* menus */
+ /* menus */
WM_keymap_add_menu(keymap, "VIEW3D_MT_armature_specials", WKEY, KM_PRESS, 0, 0);
/* Pose ------------------------ */
@@ -327,60 +334,60 @@ void ED_keymap_armature(wmKeyConfig *keyconf)
kmi = WM_keymap_add_item(keymap, "POSE_OT_paste", VKEY, KM_PRESS, KM_CTRL, 0);
RNA_boolean_set(kmi->ptr, "flipped", FALSE);
- kmi = WM_keymap_add_item(keymap, "POSE_OT_paste", VKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
+ kmi = WM_keymap_add_item(keymap, "POSE_OT_paste", VKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
RNA_boolean_set(kmi->ptr, "flipped", TRUE);
kmi = WM_keymap_add_item(keymap, "POSE_OT_select_all", AKEY, KM_PRESS, 0, 0);
- RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE);
+ RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE);
kmi = WM_keymap_add_item(keymap, "POSE_OT_select_all", IKEY, KM_PRESS, KM_CTRL, 0);
- RNA_enum_set(kmi->ptr, "action", SEL_INVERT);
+ RNA_enum_set(kmi->ptr, "action", SEL_INVERT);
WM_keymap_add_item(keymap, "POSE_OT_select_parent", PKEY, KM_PRESS, KM_SHIFT, 0);
kmi = WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, 0, 0);
- RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT);
+ RNA_boolean_set(kmi->ptr, "extend", FALSE);
kmi = WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
- RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT);
+ RNA_boolean_set(kmi->ptr, "extend", TRUE);
kmi = WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, 0, 0);
- RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD);
+ RNA_boolean_set(kmi->ptr, "extend", FALSE);
kmi = WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
- RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD);
+ RNA_boolean_set(kmi->ptr, "extend", TRUE);
WM_keymap_add_item(keymap, "POSE_OT_select_linked", LKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "POSE_OT_select_grouped", GKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "POSE_OT_select_flip_active", FKEY, KM_PRESS, KM_SHIFT, 0);
- WM_keymap_add_item(keymap, "POSE_OT_constraint_add_with_targets", CKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
- WM_keymap_add_item(keymap, "POSE_OT_constraints_clear", CKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
- WM_keymap_add_item(keymap, "POSE_OT_ik_add", IKEY, KM_PRESS, /*KM_CTRL|*/KM_SHIFT, 0);
- WM_keymap_add_item(keymap, "POSE_OT_ik_clear", IKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
+ WM_keymap_add_item(keymap, "POSE_OT_constraint_add_with_targets", CKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "POSE_OT_constraints_clear", CKEY, KM_PRESS, KM_CTRL | KM_ALT, 0);
+ WM_keymap_add_item(keymap, "POSE_OT_ik_add", IKEY, KM_PRESS, /*KM_CTRL|*/ KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "POSE_OT_ik_clear", IKEY, KM_PRESS, KM_CTRL | KM_ALT, 0);
WM_keymap_add_menu(keymap, "VIEW3D_MT_pose_group", GKEY, KM_PRESS, KM_CTRL, 0);
- /* set flags */
+ /* set flags */
WM_keymap_add_menu(keymap, "VIEW3D_MT_bone_options_toggle", WKEY, KM_PRESS, KM_SHIFT, 0);
- WM_keymap_add_menu(keymap, "VIEW3D_MT_bone_options_enable", WKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
+ WM_keymap_add_menu(keymap, "VIEW3D_MT_bone_options_enable", WKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
WM_keymap_add_menu(keymap, "VIEW3D_MT_bone_options_disable", WKEY, KM_PRESS, KM_ALT, 0);
- /* armature/bone layers */
+ /* armature/bone layers */
WM_keymap_add_item(keymap, "ARMATURE_OT_layers_show_all", ACCENTGRAVEKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "POSE_OT_armature_layers", MKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "POSE_OT_bone_layers", MKEY, KM_PRESS, 0, 0);
- /* special transforms: */
- /* 1) envelope/b-bone size */
- kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", SKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
- RNA_enum_set(kmi->ptr, "mode", TFM_BONESIZE);
+ /* special transforms: */
+ /* 1) envelope/b-bone size */
+ kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", SKEY, KM_PRESS, KM_CTRL | KM_ALT, 0);
+ RNA_enum_set(kmi->ptr, "mode", TFM_BONESIZE);
- /* keyframes management */
+ /* keyframes management */
WM_keymap_verify_item(keymap, "ANIM_OT_keyframe_insert_menu", IKEY, KM_PRESS, 0, 0);
WM_keymap_verify_item(keymap, "ANIM_OT_keyframe_delete_v3d", IKEY, KM_PRESS, KM_ALT, 0);
- WM_keymap_verify_item(keymap, "ANIM_OT_keying_set_active_set", IKEY, KM_PRESS, KM_CTRL|KM_SHIFT|KM_ALT, 0);
+ WM_keymap_verify_item(keymap, "ANIM_OT_keying_set_active_set", IKEY, KM_PRESS, KM_CTRL | KM_SHIFT | KM_ALT, 0);
/* Pose -> PoseLib ------------- */
/* only set in posemode, by space_view3d listener */
@@ -388,12 +395,15 @@ void ED_keymap_armature(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "POSELIB_OT_pose_add", LKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "POSELIB_OT_pose_remove", LKEY, KM_PRESS, KM_ALT, 0);
- WM_keymap_add_item(keymap, "POSELIB_OT_pose_rename", LKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "POSELIB_OT_pose_rename", LKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
/* Pose -> Pose Sliding ------------- */
/* only set in posemode, by space_view3d listener */
WM_keymap_add_item(keymap, "POSE_OT_push", EKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "POSE_OT_relax", EKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "POSE_OT_breakdown", EKEY, KM_PRESS, KM_SHIFT, 0);
+
+ /* menus */
+ WM_keymap_add_menu(keymap, "VIEW3D_MT_pose_specials", WKEY, KM_PRESS, 0, 0);
}
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index cc3d0c6e184..f698153eb7f 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -42,6 +42,7 @@
#include "DNA_armature_types.h"
#include "DNA_constraint_types.h"
#include "DNA_meshdata_types.h"
+#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "MEM_guardedalloc.h"
@@ -101,7 +102,7 @@ void ED_armature_sync_selection(ListBase *edbo)
{
EditBone *ebo;
- for (ebo=edbo->first; ebo; ebo= ebo->next) {
+ for (ebo = edbo->first; ebo; ebo = ebo->next) {
/* if bone is not selectable, we shouldn't alter this setting... */
if ((ebo->flag & BONE_UNSELECTABLE) == 0) {
if ((ebo->flag & BONE_CONNECTED) && (ebo->parent)) {
@@ -121,18 +122,18 @@ void ED_armature_sync_selection(ListBase *edbo)
void ED_armature_validate_active(struct bArmature *arm)
{
- EditBone *ebone= arm->act_edbone;
+ EditBone *ebone = arm->act_edbone;
if (ebone) {
if (ebone->flag & BONE_HIDDEN_A)
- arm->act_edbone= NULL;
+ arm->act_edbone = NULL;
}
}
static void bone_free(bArmature *arm, EditBone *bone)
{
- if (arm->act_edbone==bone)
- arm->act_edbone= NULL;
+ if (arm->act_edbone == bone)
+ arm->act_edbone = NULL;
if (bone->prop) {
IDP_FreeProperty(bone->prop);
@@ -147,9 +148,9 @@ void ED_armature_edit_bone_remove(bArmature *arm, EditBone *exBone)
EditBone *curBone;
/* Find any bones that refer to this bone */
- for (curBone=arm->edbo->first; curBone; curBone=curBone->next) {
- if (curBone->parent==exBone) {
- curBone->parent=exBone->parent;
+ for (curBone = arm->edbo->first; curBone; curBone = curBone->next) {
+ if (curBone->parent == exBone) {
+ curBone->parent = exBone->parent;
curBone->flag &= ~BONE_CONNECTED;
}
}
@@ -160,7 +161,7 @@ void ED_armature_edit_bone_remove(bArmature *arm, EditBone *exBone)
/* context: editmode armature */
EditBone *ED_armature_bone_get_mirrored(ListBase *edbo, EditBone *ebo)
{
- EditBone *eboflip= NULL;
+ EditBone *eboflip = NULL;
char name[MAXBONENAME];
if (ebo == NULL)
@@ -168,9 +169,9 @@ EditBone *ED_armature_bone_get_mirrored(ListBase *edbo, EditBone *ebo)
flip_side_name(name, ebo->name, FALSE);
- for (eboflip= edbo->first; eboflip; eboflip=eboflip->next) {
+ for (eboflip = edbo->first; eboflip; eboflip = eboflip->next) {
if (ebo != eboflip) {
- if (!strcmp (name, eboflip->name))
+ if (!strcmp(name, eboflip->name))
break;
}
}
@@ -186,10 +187,10 @@ static void armature_select_mirrored(bArmature *arm)
if (arm->flag & ARM_MIRROR_EDIT) {
EditBone *curBone, *ebone_mirr;
- for (curBone=arm->edbo->first; curBone; curBone=curBone->next) {
+ for (curBone = arm->edbo->first; curBone; curBone = curBone->next) {
if (arm->layer & curBone->layer) {
if (curBone->flag & BONE_SELECTED) {
- ebone_mirr= ED_armature_bone_get_mirrored(arm->edbo, curBone);
+ ebone_mirr = ED_armature_bone_get_mirrored(arm->edbo, curBone);
if (ebone_mirr)
ebone_mirr->flag |= BONE_SELECTED;
}
@@ -204,16 +205,16 @@ static void armature_tag_select_mirrored(bArmature *arm)
EditBone *curBone;
/* always untag */
- for (curBone=arm->edbo->first; curBone; curBone=curBone->next) {
+ for (curBone = arm->edbo->first; curBone; curBone = curBone->next) {
curBone->flag &= ~BONE_DONE;
}
/* Select mirrored bones */
if (arm->flag & ARM_MIRROR_EDIT) {
- for (curBone=arm->edbo->first; curBone; curBone=curBone->next) {
+ for (curBone = arm->edbo->first; curBone; curBone = curBone->next) {
if (arm->layer & curBone->layer) {
- if (curBone->flag & (BONE_SELECTED|BONE_ROOTSEL|BONE_TIPSEL)) {
- EditBone *ebone_mirr= ED_armature_bone_get_mirrored(arm->edbo, curBone);
+ if (curBone->flag & (BONE_SELECTED | BONE_ROOTSEL | BONE_TIPSEL)) {
+ EditBone *ebone_mirr = ED_armature_bone_get_mirrored(arm->edbo, curBone);
if (ebone_mirr && (ebone_mirr->flag & BONE_SELECTED) == 0) {
ebone_mirr->flag |= BONE_DONE;
}
@@ -221,10 +222,10 @@ static void armature_tag_select_mirrored(bArmature *arm)
}
}
- for (curBone=arm->edbo->first; curBone; curBone=curBone->next) {
+ for (curBone = arm->edbo->first; curBone; curBone = curBone->next) {
if (curBone->flag & BONE_DONE) {
- EditBone *ebone_mirr= ED_armature_bone_get_mirrored(arm->edbo, curBone);
- curBone->flag |= ebone_mirr->flag & (BONE_SELECTED|BONE_ROOTSEL|BONE_TIPSEL);
+ EditBone *ebone_mirr = ED_armature_bone_get_mirrored(arm->edbo, curBone);
+ curBone->flag |= ebone_mirr->flag & (BONE_SELECTED | BONE_ROOTSEL | BONE_TIPSEL);
}
}
}
@@ -236,9 +237,9 @@ static void armature_tag_unselect(bArmature *arm)
{
EditBone *curBone;
- for (curBone=arm->edbo->first; curBone; curBone=curBone->next) {
+ for (curBone = arm->edbo->first; curBone; curBone = curBone->next) {
if (curBone->flag & BONE_DONE) {
- curBone->flag &= ~(BONE_SELECTED|BONE_ROOTSEL|BONE_TIPSEL|BONE_DONE);
+ curBone->flag &= ~(BONE_SELECTED | BONE_ROOTSEL | BONE_TIPSEL | BONE_DONE);
}
}
}
@@ -246,16 +247,16 @@ static void armature_tag_unselect(bArmature *arm)
/* converts Bones to EditBone list, used for tools as well */
EditBone *make_boneList(ListBase *edbo, ListBase *bones, EditBone *parent, Bone *actBone)
{
- EditBone *eBone;
- EditBone *eBoneAct= NULL;
- EditBone *eBoneTest= NULL;
- Bone *curBone;
+ EditBone *eBone;
+ EditBone *eBoneAct = NULL;
+ EditBone *eBoneTest = NULL;
+ Bone *curBone;
- for (curBone=bones->first; curBone; curBone=curBone->next) {
- eBone= MEM_callocN(sizeof(EditBone), "make_editbone");
+ for (curBone = bones->first; curBone; curBone = curBone->next) {
+ eBone = MEM_callocN(sizeof(EditBone), "make_editbone");
/* Copy relevant data from bone to eBone */
- eBone->parent= parent;
+ eBone->parent = parent;
BLI_strncpy(eBone->name, curBone->name, sizeof(eBone->name));
eBone->flag = curBone->flag;
@@ -294,32 +295,32 @@ EditBone *make_boneList(ListBase *edbo, ListBase *bones, EditBone *parent, Bone
eBone->roll = curBone->arm_roll;
/* rest of stuff copy */
- eBone->length= curBone->length;
- eBone->dist= curBone->dist;
- eBone->weight= curBone->weight;
- eBone->xwidth= curBone->xwidth;
- eBone->zwidth= curBone->zwidth;
- eBone->ease1= curBone->ease1;
- eBone->ease2= curBone->ease2;
- eBone->rad_head= curBone->rad_head;
- eBone->rad_tail= curBone->rad_tail;
+ eBone->length = curBone->length;
+ eBone->dist = curBone->dist;
+ eBone->weight = curBone->weight;
+ eBone->xwidth = curBone->xwidth;
+ eBone->zwidth = curBone->zwidth;
+ eBone->ease1 = curBone->ease1;
+ eBone->ease2 = curBone->ease2;
+ eBone->rad_head = curBone->rad_head;
+ eBone->rad_tail = curBone->rad_tail;
eBone->segments = curBone->segments;
eBone->layer = curBone->layer;
if (curBone->prop)
- eBone->prop= IDP_CopyProperty(curBone->prop);
+ eBone->prop = IDP_CopyProperty(curBone->prop);
BLI_addtail(edbo, eBone);
/* Add children if necessary */
if (curBone->childbase.first) {
- eBoneTest= make_boneList(edbo, &curBone->childbase, eBone, actBone);
+ eBoneTest = make_boneList(edbo, &curBone->childbase, eBone, actBone);
if (eBoneTest)
- eBoneAct= eBoneTest;
+ eBoneAct = eBoneTest;
}
- if (curBone==actBone)
- eBoneAct= eBone;
+ if (curBone == actBone)
+ eBoneAct = eBone;
}
return eBoneAct;
@@ -327,7 +328,7 @@ EditBone *make_boneList(ListBase *edbo, ListBase *bones, EditBone *parent, Bone
/* nasty stuff for converting roll in editbones into bones */
/* also sets restposition in armature (arm_mat) */
-static void fix_bonelist_roll (ListBase *bonelist, ListBase *editbonelist)
+static void fix_bonelist_roll(ListBase *bonelist, ListBase *editbonelist)
{
Bone *curBone;
EditBone *ebone;
@@ -337,13 +338,13 @@ static void fix_bonelist_roll (ListBase *bonelist, ListBase *editbonelist)
float imat[3][3];
float delta[3];
- for (curBone=bonelist->first; curBone; curBone=curBone->next) {
+ for (curBone = bonelist->first; curBone; curBone = curBone->next) {
/* sets local matrix and arm_mat (restpos) */
- where_is_armature_bone(curBone, curBone->parent);
+ BKE_armature_where_is_bone(curBone, curBone->parent);
/* Find the associated editbone */
- for (ebone = editbonelist->first; ebone; ebone=ebone->next)
- if ((Bone*)ebone->temp == curBone)
+ for (ebone = editbonelist->first; ebone; ebone = ebone->next)
+ if ((Bone *)ebone->temp == curBone)
break;
if (ebone) {
@@ -357,16 +358,16 @@ static void fix_bonelist_roll (ListBase *bonelist, ListBase *editbonelist)
invert_m3_m3(imat, premat);
mul_m3_m3m3(difmat, imat, postmat);
#if 0
- printf ("Bone %s\n", curBone->name);
+ printf("Bone %s\n", curBone->name);
print_m4("premat", premat);
print_m4("postmat", postmat);
print_m4("difmat", difmat);
- printf ("Roll = %f\n", RAD2DEGF(-atan2(difmat[2][0], difmat[2][2])));
+ printf("Roll = %f\n", RAD2DEGF(-atan2(difmat[2][0], difmat[2][2])));
#endif
curBone->roll = (float)-atan2(difmat[2][0], difmat[2][2]);
/* and set restposition again */
- where_is_armature_bone(curBone, curBone->parent);
+ BKE_armature_where_is_bone(curBone, curBone->parent);
}
fix_bonelist_roll(&curBone->childbase, editbonelist);
}
@@ -375,25 +376,25 @@ static void fix_bonelist_roll (ListBase *bonelist, ListBase *editbonelist)
/* put EditMode back in Object */
void ED_armature_from_edit(Object *obedit)
{
- bArmature *arm= obedit->data;
+ bArmature *arm = obedit->data;
EditBone *eBone, *neBone;
- Bone *newBone;
+ Bone *newBone;
Object *obt;
/* armature bones */
- free_bonelist(&arm->bonebase);
+ BKE_armature_bonelist_free(&arm->bonebase);
/* remove zero sized bones, this gives instable restposes */
- for (eBone=arm->edbo->first; eBone; eBone= neBone) {
- float len= len_v3v3(eBone->head, eBone->tail);
- neBone= eBone->next;
- if (len <= 0.000001f) { /* FLT_EPSILON is too large? */
+ for (eBone = arm->edbo->first; eBone; eBone = neBone) {
+ float len = len_v3v3(eBone->head, eBone->tail);
+ neBone = eBone->next;
+ if (len <= 0.000001f) { /* FLT_EPSILON is too large? */
EditBone *fBone;
/* Find any bones that refer to this bone */
- for (fBone=arm->edbo->first; fBone; fBone= fBone->next) {
- if (fBone->parent==eBone)
- fBone->parent= eBone->parent;
+ for (fBone = arm->edbo->first; fBone; fBone = fBone->next) {
+ if (fBone->parent == eBone)
+ fBone->parent = eBone->parent;
}
if (G.debug & G_DEBUG)
printf("Warning: removed zero sized bone: %s\n", eBone->name);
@@ -402,23 +403,23 @@ void ED_armature_from_edit(Object *obedit)
}
/* Copy the bones from the editData into the armature */
- for (eBone=arm->edbo->first; eBone; eBone=eBone->next) {
- newBone= MEM_callocN(sizeof(Bone), "bone");
- eBone->temp= newBone; /* Associate the real Bones with the EditBones */
+ for (eBone = arm->edbo->first; eBone; eBone = eBone->next) {
+ newBone = MEM_callocN(sizeof(Bone), "bone");
+ eBone->temp = newBone; /* Associate the real Bones with the EditBones */
BLI_strncpy(newBone->name, eBone->name, sizeof(newBone->name));
copy_v3_v3(newBone->arm_head, eBone->head);
copy_v3_v3(newBone->arm_tail, eBone->tail);
newBone->arm_roll = eBone->roll;
- newBone->flag= eBone->flag;
+ newBone->flag = eBone->flag;
if (eBone == arm->act_edbone) {
/* don't change active selection, this messes up separate which uses
* editmode toggle and can separate active bone which is de-selected originally */
/* newBone->flag |= BONE_SELECTED; */ /* important, editbones can be active with only 1 point selected */
- arm->act_edbone= NULL;
- arm->act_bone= newBone;
+ arm->act_edbone = NULL;
+ arm->act_bone = newBone;
}
newBone->roll = 0.0f;
@@ -427,29 +428,29 @@ void ED_armature_from_edit(Object *obedit)
newBone->xwidth = eBone->xwidth;
newBone->zwidth = eBone->zwidth;
- newBone->ease1= eBone->ease1;
- newBone->ease2= eBone->ease2;
- newBone->rad_head= eBone->rad_head;
- newBone->rad_tail= eBone->rad_tail;
- newBone->segments= eBone->segments;
+ newBone->ease1 = eBone->ease1;
+ newBone->ease2 = eBone->ease2;
+ newBone->rad_head = eBone->rad_head;
+ newBone->rad_tail = eBone->rad_tail;
+ newBone->segments = eBone->segments;
newBone->layer = eBone->layer;
if (eBone->prop)
- newBone->prop= IDP_CopyProperty(eBone->prop);
+ newBone->prop = IDP_CopyProperty(eBone->prop);
}
/* Fix parenting in a separate pass to ensure ebone->bone connections
* are valid at this point */
- for (eBone=arm->edbo->first;eBone;eBone=eBone->next) {
- newBone= (Bone *)eBone->temp;
+ for (eBone = arm->edbo->first; eBone; eBone = eBone->next) {
+ newBone = (Bone *)eBone->temp;
if (eBone->parent) {
- newBone->parent= (Bone *)eBone->parent->temp;
+ newBone->parent = (Bone *)eBone->parent->temp;
BLI_addtail(&newBone->parent->childbase, newBone);
{
float M_parentRest[3][3];
float iM_parentRest[3][3];
- float delta[3];
+ float delta[3];
/* Get the parent's matrix (rotation only) */
sub_v3_v3v3(delta, eBone->parent->tail, eBone->parent->head);
@@ -475,13 +476,13 @@ void ED_armature_from_edit(Object *obedit)
}
/* Make a pass through the new armature to fix rolling */
- /* also builds restposition again (like where_is_armature) */
+ /* also builds restposition again (like BKE_armature_where_is) */
fix_bonelist_roll(&arm->bonebase, arm->edbo);
/* so all users of this armature should get rebuilt */
- for (obt= G.main->object.first; obt; obt= obt->id.next) {
- if (obt->data==arm)
- armature_rebuild_pose(obt, arm);
+ for (obt = G.main->object.first; obt; obt = obt->id.next) {
+ if (obt->data == arm)
+ BKE_pose_rebuild(obt, arm);
}
DAG_id_tag_update(&obedit->id, OB_RECALC_DATA);
@@ -490,8 +491,8 @@ void ED_armature_from_edit(Object *obedit)
void ED_armature_apply_transform(Object *ob, float mat[4][4])
{
EditBone *ebone;
- bArmature *arm= ob->data;
- float scale = mat4_to_scale(mat); /* store the scale of the matrix here to use on envelopes */
+ bArmature *arm = ob->data;
+ float scale = mat4_to_scale(mat); /* store the scale of the matrix here to use on envelopes */
float mat3[3][3];
copy_m3_m4(mat3, mat);
@@ -501,8 +502,8 @@ void ED_armature_apply_transform(Object *ob, float mat[4][4])
ED_armature_to_edit(ob);
/* Do the rotations */
- for (ebone = arm->edbo->first; ebone; ebone=ebone->next) {
- float delta[3], tmat[3][3];
+ for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
+ float delta[3], tmat[3][3];
/* find the current bone's roll matrix */
sub_v3_v3v3(delta, ebone->tail, ebone->head);
@@ -518,13 +519,13 @@ void ED_armature_apply_transform(Object *ob, float mat[4][4])
/* apply the transfiormed roll back */
mat3_to_vec_roll(tmat, NULL, &ebone->roll);
- ebone->rad_head *= scale;
- ebone->rad_tail *= scale;
- ebone->dist *= scale;
+ ebone->rad_head *= scale;
+ ebone->rad_tail *= scale;
+ ebone->dist *= scale;
/* we could be smarter and scale by the matrix along the x & z axis */
- ebone->xwidth *= scale;
- ebone->zwidth *= scale;
+ ebone->xwidth *= scale;
+ ebone->zwidth *= scale;
}
/* Turn the list into an armature */
@@ -534,17 +535,17 @@ void ED_armature_apply_transform(Object *ob, float mat[4][4])
/* exported for use in editors/object/ */
/* 0 == do center, 1 == center new, 2 == center cursor */
-void docenter_armature (Scene *scene, Object *ob, float cursor[3], int centermode, int around)
+void docenter_armature(Scene *scene, Object *ob, float cursor[3], int centermode, int around)
{
- Object *obedit= scene->obedit; // XXX get from context
+ Object *obedit = scene->obedit; // XXX get from context
EditBone *ebone;
- bArmature *arm= ob->data;
+ bArmature *arm = ob->data;
float cent[3];
/* Put the armature into editmode */
if (ob != obedit) {
ED_armature_to_edit(ob);
- obedit= NULL; /* we cant use this so behave as if there is no obedit */
+ obedit = NULL; /* we cant use this so behave as if there is no obedit */
}
/* Find the centerpoint */
@@ -554,20 +555,20 @@ void docenter_armature (Scene *scene, Object *ob, float cursor[3], int centermod
mul_m4_v3(ob->imat, cent);
}
else {
- if (around==V3D_CENTROID) {
- int total= 0;
+ if (around == V3D_CENTROID) {
+ int total = 0;
zero_v3(cent);
- for (ebone= arm->edbo->first; ebone; ebone=ebone->next) {
- total+=2;
+ for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
+ total += 2;
add_v3_v3(cent, ebone->head);
add_v3_v3(cent, ebone->tail);
}
- mul_v3_fl(cent, 1.0f/(float)total);
+ mul_v3_fl(cent, 1.0f / (float)total);
}
else {
float min[3], max[3];
INIT_MINMAX(min, max);
- for (ebone= arm->edbo->first; ebone; ebone=ebone->next) {
+ for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
DO_MINMAX(ebone->head, min, max);
DO_MINMAX(ebone->tail, min, max);
}
@@ -576,19 +577,19 @@ void docenter_armature (Scene *scene, Object *ob, float cursor[3], int centermod
}
/* Do the adjustments */
- for (ebone= arm->edbo->first; ebone; ebone=ebone->next) {
+ for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
sub_v3_v3(ebone->head, cent);
sub_v3_v3(ebone->tail, cent);
}
/* Turn the list into an armature */
- if (obedit==NULL) {
+ if (obedit == NULL) {
ED_armature_from_edit(ob);
ED_armature_edit_free(ob);
}
/* Adjust object location for new centerpoint */
- if (centermode && obedit==NULL) {
+ if (centermode && obedit == NULL) {
mul_mat3_m4_v3(ob->obmat, cent); /* ommit translation part */
add_v3_v3(ob->loc, cent);
}
@@ -597,7 +598,7 @@ void docenter_armature (Scene *scene, Object *ob, float cursor[3], int centermod
/* ---------------------- */
/* checks if an EditBone with a matching name already, returning the matching bone if it exists */
-static EditBone *editbone_name_exists (ListBase *edbo, const char *name)
+static EditBone *editbone_name_exists(ListBase *edbo, const char *name)
{
return BLI_findstring(edbo, name, offsetof(EditBone, name));
}
@@ -605,54 +606,54 @@ static EditBone *editbone_name_exists (ListBase *edbo, const char *name)
/* note: there's a unique_bone_name() too! */
static int editbone_unique_check(void *arg, const char *name)
{
- struct {ListBase *lb;void *bone;} *data= arg;
- EditBone *dupli= editbone_name_exists(data->lb, name);
+ struct {ListBase *lb; void *bone; } *data = arg;
+ EditBone *dupli = editbone_name_exists(data->lb, name);
return dupli && dupli != data->bone;
}
-void unique_editbone_name (ListBase *edbo, char *name, EditBone *bone)
+void unique_editbone_name(ListBase *edbo, char *name, EditBone *bone)
{
- struct {ListBase *lb; void *bone;} data;
- data.lb= edbo;
- data.bone= bone;
+ struct {ListBase *lb; void *bone; } data;
+ data.lb = edbo;
+ data.bone = bone;
BLI_uniquename_cb(editbone_unique_check, &data, "Bone", '.', name, sizeof(bone->name));
}
/* helper for apply_armature_pose2bones - fixes parenting of objects that are bone-parented to armature */
-static void applyarmature_fix_boneparents (Scene *scene, Object *armob)
+static void applyarmature_fix_boneparents(Scene *scene, Object *armob)
{
Object workob, *ob;
/* go through all objects in database */
- for (ob= G.main->object.first; ob; ob= ob->id.next) {
+ for (ob = G.main->object.first; ob; ob = ob->id.next) {
/* if parent is bone in this armature, apply corrections */
if ((ob->parent == armob) && (ob->partype == PARBONE)) {
/* apply current transform from parent (not yet destroyed),
* then calculate new parent inverse matrix
*/
- object_apply_mat4(ob, ob->obmat, FALSE, FALSE);
+ BKE_object_apply_mat4(ob, ob->obmat, FALSE, FALSE);
- what_does_parent(scene, ob, &workob);
+ BKE_object_workob_calc_parent(scene, ob, &workob);
invert_m4_m4(ob->parentinv, workob.obmat);
}
}
}
/* set the current pose as the restpose */
-static int apply_armature_pose2bones_exec (bContext *C, wmOperator *op)
+static int apply_armature_pose2bones_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
- Object *ob= object_pose_armature_get(CTX_data_active_object(C)); // must be active object, not edit-object
- bArmature *arm= get_armature(ob);
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C)); // must be active object, not edit-object
+ bArmature *arm = BKE_armature_from_object(ob);
bPose *pose;
bPoseChannel *pchan;
EditBone *curbone;
/* don't check if editmode (should be done by caller) */
- if (ob->type!=OB_ARMATURE)
+ if (ob->type != OB_ARMATURE)
return OPERATOR_CANCELLED;
- if (object_data_is_libdata(ob)) {
+ if (BKE_object_obdata_is_libdata(ob)) {
BKE_report(op->reports, RPT_ERROR, "Cannot apply pose to lib-linked armature"); //error_libdata();
return OPERATOR_CANCELLED;
}
@@ -666,10 +667,10 @@ static int apply_armature_pose2bones_exec (bContext *C, wmOperator *op)
ED_armature_to_edit(ob);
/* get pose of active object and move it out of posemode */
- pose= ob->pose;
+ pose = ob->pose;
- for (pchan=pose->chanbase.first; pchan; pchan=pchan->next) {
- curbone= editbone_name_exists(arm->edbo, pchan->name);
+ for (pchan = pose->chanbase.first; pchan; pchan = pchan->next) {
+ curbone = editbone_name_exists(arm->edbo, pchan->name);
/* simply copy the head/tail values from pchan over to curbone */
copy_v3_v3(curbone->head, pchan->pose_head);
@@ -680,7 +681,7 @@ static int apply_armature_pose2bones_exec (bContext *C, wmOperator *op)
* 2. remove this from the 'visual' y-rotation
*/
{
- float premat[3][3], imat[3][3],pmat[3][3], tmat[3][3];
+ float premat[3][3], imat[3][3], pmat[3][3], tmat[3][3];
float delta[3], eul[3];
/* obtain new auto y-rotation */
@@ -693,10 +694,10 @@ static int apply_armature_pose2bones_exec (bContext *C, wmOperator *op)
/* remove auto from visual and get euler rotation */
mul_m3_m3m3(tmat, imat, pmat);
- mat3_to_eul( eul,tmat);
+ mat3_to_eul(eul, tmat);
/* just use this euler-y as new roll value */
- curbone->roll= eul[1];
+ curbone->roll = eul[1];
}
/* clear transform values for pchan */
@@ -704,7 +705,7 @@ static int apply_armature_pose2bones_exec (bContext *C, wmOperator *op)
zero_v3(pchan->eul);
unit_qt(pchan->quat);
unit_axis_angle(pchan->rotAxis, &pchan->rotAngle);
- pchan->size[0]= pchan->size[1]= pchan->size[2]= 1.0f;
+ pchan->size[0] = pchan->size[1] = pchan->size[2] = 1.0f;
/* set anim lock */
curbone->flag |= BONE_UNKEYED;
@@ -715,18 +716,18 @@ static int apply_armature_pose2bones_exec (bContext *C, wmOperator *op)
ED_armature_edit_free(ob);
/* flush positions of posebones */
- where_is_pose(scene, ob);
+ BKE_pose_where_is(scene, ob);
/* fix parenting of objects which are bone-parented */
applyarmature_fix_boneparents(scene, ob);
/* note, notifier might evolve */
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
return OPERATOR_FINISHED;
}
-void POSE_OT_armature_apply (wmOperatorType *ot)
+void POSE_OT_armature_apply(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Apply Pose as Rest Pose";
@@ -738,24 +739,24 @@ void POSE_OT_armature_apply (wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* set the current pose as the restpose */
-static int pose_visual_transform_apply_exec (bContext *C, wmOperator *UNUSED(op))
+static int pose_visual_transform_apply_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *ob= object_pose_armature_get(CTX_data_active_object(C)); // must be active object, not edit-object
+ Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C)); // must be active object, not edit-object
/* don't check if editmode (should be done by caller) */
- if (ob->type!=OB_ARMATURE)
+ if (ob->type != OB_ARMATURE)
return OPERATOR_CANCELLED;
/* loop over all selected pchans
*
* TODO, loop over children before parents if multiple bones
* at once are to be predictable*/
- CTX_DATA_BEGIN(C, bPoseChannel *, pchan, selected_pose_bones)
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones)
{
float delta_mat[4][4];
@@ -765,19 +766,19 @@ static int pose_visual_transform_apply_exec (bContext *C, wmOperator *UNUSED(op)
* change, thus changing the result we may be trying to record.
*/
copy_m4_m4(delta_mat, pchan->chan_mat);
- pchan_apply_mat4(pchan, delta_mat, TRUE);
+ BKE_pchan_apply_mat4(pchan, delta_mat, TRUE);
}
CTX_DATA_END;
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
/* note, notifier might evolve */
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
return OPERATOR_FINISHED;
}
-void POSE_OT_visual_transform_apply (wmOperatorType *ot)
+void POSE_OT_visual_transform_apply(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Apply Visual Transform to Pose";
@@ -789,7 +790,7 @@ void POSE_OT_visual_transform_apply (wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ---------------------- */
@@ -803,13 +804,13 @@ static void joined_armature_fix_links(Object *tarArm, Object *srcArm, bPoseChann
bConstraint *con;
/* let's go through all objects in database */
- for (ob= G.main->object.first; ob; ob= ob->id.next) {
+ for (ob = G.main->object.first; ob; ob = ob->id.next) {
/* do some object-type specific things */
if (ob->type == OB_ARMATURE) {
- pose= ob->pose;
- for (pchant= pose->chanbase.first; pchant; pchant= pchant->next) {
- for (con= pchant->constraints.first; con; con= con->next) {
- bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
+ pose = ob->pose;
+ for (pchant = pose->chanbase.first; pchant; pchant = pchant->next) {
+ for (con = pchant->constraints.first; con; con = con->next) {
+ bConstraintTypeInfo *cti = constraint_get_typeinfo(con);
ListBase targets = {NULL, NULL};
bConstraintTarget *ct;
@@ -817,12 +818,12 @@ static void joined_armature_fix_links(Object *tarArm, Object *srcArm, bPoseChann
if (cti && cti->get_constraint_targets) {
cti->get_constraint_targets(con, &targets);
- for (ct= targets.first; ct; ct= ct->next) {
+ for (ct = targets.first; ct; ct = ct->next) {
if (ct->tar == srcArm) {
if (ct->subtarget[0] == '\0') {
ct->tar = tarArm;
}
- else if (strcmp(ct->subtarget, pchan->name)==0) {
+ else if (strcmp(ct->subtarget, pchan->name) == 0) {
ct->tar = tarArm;
BLI_strncpy(ct->subtarget, curbone->name, sizeof(ct->subtarget));
}
@@ -835,15 +836,15 @@ static void joined_armature_fix_links(Object *tarArm, Object *srcArm, bPoseChann
/* action constraint? */
if (con->type == CONSTRAINT_TYPE_ACTION) {
- bActionConstraint *data= con->data; // XXX old animation system
+ bActionConstraint *data = con->data; // XXX old animation system
bAction *act;
bActionChannel *achan;
if (data->act) {
- act= data->act;
+ act = data->act;
- for (achan= act->chanbase.first; achan; achan= achan->next) {
- if (strcmp(achan->name, pchan->name)==0)
+ for (achan = act->chanbase.first; achan; achan = achan->next) {
+ if (strcmp(achan->name, pchan->name) == 0)
BLI_strncpy(achan->name, curbone->name, sizeof(achan->name));
}
}
@@ -855,8 +856,8 @@ static void joined_armature_fix_links(Object *tarArm, Object *srcArm, bPoseChann
/* fix object-level constraints */
if (ob != srcArm) {
- for (con= ob->constraints.first; con; con= con->next) {
- bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
+ for (con = ob->constraints.first; con; con = con->next) {
+ bConstraintTypeInfo *cti = constraint_get_typeinfo(con);
ListBase targets = {NULL, NULL};
bConstraintTarget *ct;
@@ -864,12 +865,12 @@ static void joined_armature_fix_links(Object *tarArm, Object *srcArm, bPoseChann
if (cti && cti->get_constraint_targets) {
cti->get_constraint_targets(con, &targets);
- for (ct= targets.first; ct; ct= ct->next) {
+ for (ct = targets.first; ct; ct = ct->next) {
if (ct->tar == srcArm) {
if (ct->subtarget[0] == '\0') {
ct->tar = tarArm;
}
- else if (strcmp(ct->subtarget, pchan->name)==0) {
+ else if (strcmp(ct->subtarget, pchan->name) == 0) {
ct->tar = tarArm;
BLI_strncpy(ct->subtarget, curbone->name, sizeof(ct->subtarget));
}
@@ -885,7 +886,7 @@ static void joined_armature_fix_links(Object *tarArm, Object *srcArm, bPoseChann
/* See if an object is parented to this armature */
if (ob->parent && (ob->parent == srcArm)) {
/* Is object parented to a bone of this src armature? */
- if (ob->partype==PARBONE) {
+ if (ob->partype == PARBONE) {
/* bone name in object */
if (!strcmp(ob->parsubstr, pchan->name))
BLI_strncpy(ob->parsubstr, curbone->name, sizeof(ob->parsubstr));
@@ -900,17 +901,17 @@ static void joined_armature_fix_links(Object *tarArm, Object *srcArm, bPoseChann
/* join armature exec is exported for use in object->join objects operator... */
int join_armature_exec(bContext *C, wmOperator *UNUSED(op))
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- Object *ob= CTX_data_active_object(C);
- bArmature *arm= (ob)? ob->data: NULL;
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = CTX_data_active_object(C);
+ bArmature *arm = (ob) ? ob->data : NULL;
bPose *pose, *opose;
bPoseChannel *pchan, *pchann;
EditBone *curbone;
- float mat[4][4], oimat[4][4];
+ float mat[4][4], oimat[4][4];
/* Ensure we're not in editmode and that the active object is an armature*/
- if (!ob || ob->type!=OB_ARMATURE)
+ if (!ob || ob->type != OB_ARMATURE)
return OPERATOR_CANCELLED;
if (!arm || arm->edbo)
return OPERATOR_CANCELLED;
@@ -919,18 +920,19 @@ int join_armature_exec(bContext *C, wmOperator *UNUSED(op))
ED_armature_to_edit(ob);
/* get pose of active object and move it out of posemode */
- pose= ob->pose;
+ pose = ob->pose;
ob->mode &= ~OB_MODE_POSE;
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
- if ((base->object->type==OB_ARMATURE) && (base->object!=ob)) {
- bArmature *curarm= base->object->data;
+ CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases)
+ {
+ if ((base->object->type == OB_ARMATURE) && (base->object != ob)) {
+ bArmature *curarm = base->object->data;
/* Make a list of editbones in current armature */
ED_armature_to_edit(base->object);
/* Get Pose of current armature */
- opose= base->object->pose;
+ opose = base->object->pose;
base->object->mode &= ~OB_MODE_POSE;
//BASACT->flag &= ~OB_MODE_POSE;
@@ -939,9 +941,9 @@ int join_armature_exec(bContext *C, wmOperator *UNUSED(op))
mult_m4_m4m4(mat, oimat, base->object->obmat);
/* Copy bones and posechannels from the object to the edit armature */
- for (pchan=opose->chanbase.first; pchan; pchan=pchann) {
- pchann= pchan->next;
- curbone= editbone_name_exists(curarm->edbo, pchan->name);
+ for (pchan = opose->chanbase.first; pchan; pchan = pchann) {
+ pchann = pchan->next;
+ curbone = editbone_name_exists(curarm->edbo, pchan->name);
/* Get new name */
unique_editbone_name(arm->edbo, curbone->name, NULL);
@@ -989,8 +991,8 @@ int join_armature_exec(bContext *C, wmOperator *UNUSED(op))
BLI_remlink(&opose->chanbase, pchan);
BLI_addtail(&pose->chanbase, pchan);
- free_pose_channels_hash(opose);
- free_pose_channels_hash(pose);
+ BKE_pose_channels_hash_free(opose);
+ BKE_pose_channels_hash_free(pose);
}
ED_base_object_free_and_unlink(bmain, scene, base);
@@ -998,12 +1000,12 @@ int join_armature_exec(bContext *C, wmOperator *UNUSED(op))
}
CTX_DATA_END;
- DAG_scene_sort(bmain, scene); // because we removed object(s)
+ DAG_scene_sort(bmain, scene); /* because we removed object(s) */
ED_armature_from_edit(ob);
ED_armature_edit_free(ob);
- WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene);
return OPERATOR_FINISHED;
}
@@ -1019,16 +1021,16 @@ static void separated_armature_fix_links(Object *origArm, Object *newArm)
ListBase *opchans, *npchans;
/* get reference to list of bones in original and new armatures */
- opchans= &origArm->pose->chanbase;
- npchans= &newArm->pose->chanbase;
+ opchans = &origArm->pose->chanbase;
+ npchans = &newArm->pose->chanbase;
/* let's go through all objects in database */
- for (ob= G.main->object.first; ob; ob= ob->id.next) {
+ for (ob = G.main->object.first; ob; ob = ob->id.next) {
/* do some object-type specific things */
if (ob->type == OB_ARMATURE) {
- for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
- for (con= pchan->constraints.first; con; con= con->next) {
- bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
+ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
+ for (con = pchan->constraints.first; con; con = con->next) {
+ bConstraintTypeInfo *cti = constraint_get_typeinfo(con);
ListBase targets = {NULL, NULL};
bConstraintTarget *ct;
@@ -1036,7 +1038,7 @@ static void separated_armature_fix_links(Object *origArm, Object *newArm)
if (cti && cti->get_constraint_targets) {
cti->get_constraint_targets(con, &targets);
- for (ct= targets.first; ct; ct= ct->next) {
+ for (ct = targets.first; ct; ct = ct->next) {
/* any targets which point to original armature are redirected to the new one only if:
* - the target isn't origArm/newArm itself
* - the target is one that can be found in newArm/origArm
@@ -1044,12 +1046,12 @@ static void separated_armature_fix_links(Object *origArm, Object *newArm)
if (ct->subtarget[0] != 0) {
if (ct->tar == origArm) {
if (BLI_findstring(npchans, ct->subtarget, offsetof(bPoseChannel, name))) {
- ct->tar= newArm;
+ ct->tar = newArm;
}
}
else if (ct->tar == newArm) {
if (BLI_findstring(opchans, ct->subtarget, offsetof(bPoseChannel, name))) {
- ct->tar= origArm;
+ ct->tar = origArm;
}
}
}
@@ -1065,8 +1067,8 @@ static void separated_armature_fix_links(Object *origArm, Object *newArm)
/* fix object-level constraints */
if (ob != origArm) {
- for (con= ob->constraints.first; con; con= con->next) {
- bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
+ for (con = ob->constraints.first; con; con = con->next) {
+ bConstraintTypeInfo *cti = constraint_get_typeinfo(con);
ListBase targets = {NULL, NULL};
bConstraintTarget *ct;
@@ -1074,7 +1076,7 @@ static void separated_armature_fix_links(Object *origArm, Object *newArm)
if (cti && cti->get_constraint_targets) {
cti->get_constraint_targets(con, &targets);
- for (ct= targets.first; ct; ct= ct->next) {
+ for (ct = targets.first; ct; ct = ct->next) {
/* any targets which point to original armature are redirected to the new one only if:
* - the target isn't origArm/newArm itself
* - the target is one that can be found in newArm/origArm
@@ -1082,12 +1084,12 @@ static void separated_armature_fix_links(Object *origArm, Object *newArm)
if (ct->subtarget[0] != '\0') {
if (ct->tar == origArm) {
if (BLI_findstring(npchans, ct->subtarget, offsetof(bPoseChannel, name))) {
- ct->tar= newArm;
+ ct->tar = newArm;
}
}
else if (ct->tar == newArm) {
if (BLI_findstring(opchans, ct->subtarget, offsetof(bPoseChannel, name))) {
- ct->tar= origArm;
+ ct->tar = origArm;
}
}
}
@@ -1105,7 +1107,7 @@ static void separated_armature_fix_links(Object *origArm, Object *newArm)
/* Is object parented to a bone of this src armature? */
if ((ob->partype == PARBONE) && (ob->parsubstr[0] != '\0')) {
if (BLI_findstring(npchans, ob->parsubstr, offsetof(bPoseChannel, name))) {
- ob->parent= newArm;
+ ob->parent = newArm;
}
}
}
@@ -1118,7 +1120,7 @@ static void separated_armature_fix_links(Object *origArm, Object *newArm)
*/
static void separate_armature_bones(Object *ob, short sel)
{
- bArmature *arm= (bArmature *)ob->data;
+ bArmature *arm = (bArmature *)ob->data;
bPoseChannel *pchan, *pchann;
EditBone *curbone;
@@ -1126,35 +1128,35 @@ static void separate_armature_bones(Object *ob, short sel)
ED_armature_to_edit(ob);
/* go through pose-channels, checking if a bone should be removed */
- for (pchan=ob->pose->chanbase.first; pchan; pchan=pchann) {
- pchann= pchan->next;
- curbone= editbone_name_exists(arm->edbo, pchan->name);
+ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchann) {
+ pchann = pchan->next;
+ curbone = editbone_name_exists(arm->edbo, pchan->name);
/* check if bone needs to be removed */
if ( (sel && (curbone->flag & BONE_SELECTED)) ||
- (!sel && !(curbone->flag & BONE_SELECTED)) )
+ (!sel && !(curbone->flag & BONE_SELECTED)) )
{
EditBone *ebo;
bPoseChannel *pchn;
/* clear the bone->parent var of any bone that had this as its parent */
- for (ebo= arm->edbo->first; ebo; ebo= ebo->next) {
+ for (ebo = arm->edbo->first; ebo; ebo = ebo->next) {
if (ebo->parent == curbone) {
- ebo->parent= NULL;
- ebo->temp= NULL; /* this is needed to prevent random crashes with in ED_armature_from_edit */
+ ebo->parent = NULL;
+ ebo->temp = NULL; /* this is needed to prevent random crashes with in ED_armature_from_edit */
ebo->flag &= ~BONE_CONNECTED;
}
}
/* clear the pchan->parent var of any pchan that had this as its parent */
- for (pchn= ob->pose->chanbase.first; pchn; pchn=pchn->next) {
+ for (pchn = ob->pose->chanbase.first; pchn; pchn = pchn->next) {
if (pchn->parent == pchan)
- pchn->parent= NULL;
+ pchn->parent = NULL;
}
/* free any of the extra-data this pchan might have */
- free_pose_channel(pchan);
- free_pose_channels_hash(ob->pose);
+ BKE_pose_channel_free(pchan);
+ BKE_pose_channels_hash_free(ob->pose);
/* get rid of unneeded bone */
bone_free(arm, curbone);
@@ -1168,11 +1170,11 @@ static void separate_armature_bones(Object *ob, short sel)
}
/* separate selected bones into their armature */
-static int separate_armature_exec (bContext *C, wmOperator *UNUSED(op))
+static int separate_armature_exec(bContext *C, wmOperator *UNUSED(op))
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- Object *obedit= CTX_data_edit_object(C);
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ Object *obedit = CTX_data_edit_object(C);
Object *oldob, *newob;
Base *oldbase, *newbase;
@@ -1193,15 +1195,16 @@ static int separate_armature_exec (bContext *C, wmOperator *UNUSED(op))
/* 1) only edit-base selected */
// TODO: use context iterators for this?
- CTX_DATA_BEGIN(C, Base *, base, visible_bases) {
- if (base->object==obedit) base->flag |= 1;
+ CTX_DATA_BEGIN (C, Base *, base, visible_bases)
+ {
+ if (base->object == obedit) base->flag |= 1;
else base->flag &= ~1;
}
CTX_DATA_END;
/* 1) store starting settings and exit editmode */
- oldob= obedit;
- oldbase= BASACT;
+ oldob = obedit;
+ oldbase = BASACT;
oldob->mode &= ~OB_MODE_POSE;
//oldbase->flag &= ~OB_POSEMODE;
@@ -1209,8 +1212,8 @@ static int separate_armature_exec (bContext *C, wmOperator *UNUSED(op))
ED_armature_edit_free(obedit);
/* 2) duplicate base */
- newbase= ED_object_add_duplicate(bmain, scene, oldbase, USER_DUP_ARM); /* only duplicate linked armature */
- newob= newbase->object;
+ newbase = ED_object_add_duplicate(bmain, scene, oldbase, USER_DUP_ARM); /* only duplicate linked armature */
+ newob = newbase->object;
newbase->flag &= ~SELECT;
@@ -1222,17 +1225,17 @@ static int separate_armature_exec (bContext *C, wmOperator *UNUSED(op))
/* 4) fix links before depsgraph flushes */ // err... or after?
separated_armature_fix_links(oldob, newob);
- DAG_id_tag_update(&oldob->id, OB_RECALC_DATA); /* this is the original one */
- DAG_id_tag_update(&newob->id, OB_RECALC_DATA); /* this is the separated one */
+ DAG_id_tag_update(&oldob->id, OB_RECALC_DATA); /* this is the original one */
+ DAG_id_tag_update(&newob->id, OB_RECALC_DATA); /* this is the separated one */
/* 5) restore original conditions */
- obedit= oldob;
+ obedit = oldob;
ED_armature_to_edit(obedit);
/* note, notifier might evolve */
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, obedit);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, obedit);
/* recalc/redraw + cleanup */
WM_cursor_wait(0);
@@ -1240,7 +1243,7 @@ static int separate_armature_exec (bContext *C, wmOperator *UNUSED(op))
return OPERATOR_FINISHED;
}
-void ARMATURE_OT_separate (wmOperatorType *ot)
+void ARMATURE_OT_separate(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Separate Bones";
@@ -1253,20 +1256,20 @@ void ARMATURE_OT_separate (wmOperatorType *ot)
ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* **************** END tools on Editmode Armature **************** */
/* **************** PoseMode & EditMode *************************** */
/* only for opengl selection indices */
-Bone *get_indexed_bone (Object *ob, int index)
+Bone *get_indexed_bone(Object *ob, int index)
{
bPoseChannel *pchan;
- if (ob->pose==NULL) return NULL;
- index>>=16; // bone selection codes use left 2 bytes
+ if (ob->pose == NULL) return NULL;
+ index >>= 16; // bone selection codes use left 2 bytes
- pchan= BLI_findlink(&ob->pose->chanbase, index);
+ pchan = BLI_findlink(&ob->pose->chanbase, index);
return pchan ? pchan->bone : NULL;
}
@@ -1274,22 +1277,22 @@ Bone *get_indexed_bone (Object *ob, int index)
/* only bones from base are checked on */
static void *get_bone_from_selectbuffer(Scene *scene, Base *base, unsigned int *buffer, short hits, short findunsel)
{
- Object *obedit= scene->obedit; // XXX get from context
+ Object *obedit = scene->obedit; // XXX get from context
Bone *bone;
EditBone *ebone;
- void *firstunSel=NULL, *firstSel=NULL, *data;
+ void *firstunSel = NULL, *firstSel = NULL, *data;
unsigned int hitresult;
- short i, takeNext=0, sel;
+ short i, takeNext = 0, sel;
- for (i=0; i< hits; i++) {
- hitresult = buffer[3+(i*4)];
+ for (i = 0; i < hits; i++) {
+ hitresult = buffer[3 + (i * 4)];
- if (!(hitresult & BONESEL_NOSEL)) { // -1
- if (hitresult & BONESEL_ANY) { // to avoid including objects in selection
+ if (!(hitresult & BONESEL_NOSEL)) { // -1
+ if (hitresult & BONESEL_ANY) { // to avoid including objects in selection
hitresult &= ~(BONESEL_ANY);
/* Determine what the current bone is */
- if (obedit==NULL || base->object!=obedit) {
+ if (obedit == NULL || base->object != obedit) {
/* no singular posemode, so check for correct object */
if (base->selcol == (hitresult & 0xFFFF)) {
bone = get_indexed_bone(base->object, hitresult);
@@ -1302,12 +1305,12 @@ static void *get_bone_from_selectbuffer(Scene *scene, Base *base, unsigned int *
data = bone;
}
else {
- data= NULL;
- sel= 0;
+ data = NULL;
+ sel = 0;
}
}
else {
- bArmature *arm= obedit->data;
+ bArmature *arm = obedit->data;
ebone = BLI_findlink(arm->edbo, hitresult);
if (findunsel)
@@ -1320,12 +1323,12 @@ static void *get_bone_from_selectbuffer(Scene *scene, Base *base, unsigned int *
if (data) {
if (sel) {
- if (!firstSel) firstSel= data;
- takeNext=1;
+ if (!firstSel) firstSel = data;
+ takeNext = 1;
}
else {
if (!firstunSel)
- firstunSel=data;
+ firstunSel = data;
if (takeNext)
return data;
}
@@ -1345,7 +1348,7 @@ static void *get_bone_from_selectbuffer(Scene *scene, Base *base, unsigned int *
/* used by posemode as well editmode */
/* only checks scene->basact! */
/* x and y are mouse coords (area space) */
-static void *get_nearest_bone (bContext *C, short findunsel, int x, int y)
+static void *get_nearest_bone(bContext *C, short findunsel, int x, int y)
{
ViewContext vc;
rcti rect;
@@ -1359,9 +1362,9 @@ static void *get_nearest_bone (bContext *C, short findunsel, int x, int y)
rect.ymin = rect.ymax = y;
glInitNames();
- hits= view3d_opengl_select(&vc, buffer, MAXPICKBUF, &rect);
+ hits = view3d_opengl_select(&vc, buffer, MAXPICKBUF, &rect);
- if (hits>0)
+ if (hits > 0)
return get_bone_from_selectbuffer(vc.scene, vc.scene->basact, buffer, hits, findunsel);
return NULL;
@@ -1370,9 +1373,9 @@ static void *get_nearest_bone (bContext *C, short findunsel, int x, int y)
/* Get the first available child of an editbone */
static EditBone *editbone_get_child(bArmature *arm, EditBone *pabone, short use_visibility)
{
- EditBone *curbone, *chbone=NULL;
+ EditBone *curbone, *chbone = NULL;
- for (curbone= arm->edbo->first; curbone; curbone= curbone->next) {
+ for (curbone = arm->edbo->first; curbone; curbone = curbone->next) {
if (curbone->parent == pabone) {
if (use_visibility) {
if ((arm->layer & curbone->layer) && !(pabone->flag & BONE_HIDDEN_A)) {
@@ -1391,7 +1394,7 @@ static EditBone *editbone_get_child(bArmature *arm, EditBone *pabone, short use_
/* **************** Posemode stuff ********************** */
-static void selectconnected_posebonechildren (Object *ob, Bone *bone, int extend)
+static void selectconnected_posebonechildren(Object *ob, Bone *bone, int extend)
{
Bone *curBone;
@@ -1399,7 +1402,7 @@ static void selectconnected_posebonechildren (Object *ob, Bone *bone, int extend
if (!(bone->flag & BONE_CONNECTED) || (bone->flag & BONE_UNSELECTABLE))
return;
- // XXX old cruft! use notifiers instead
+ // XXX old cruft! use notifiers instead
//select_actionchannel_by_name (ob->action, bone->name, !(shift));
if (extend)
@@ -1407,7 +1410,7 @@ static void selectconnected_posebonechildren (Object *ob, Bone *bone, int extend
else
bone->flag |= BONE_SELECTED;
- for (curBone=bone->childbase.first; curBone; curBone=curBone->next)
+ for (curBone = bone->childbase.first; curBone; curBone = curBone->next)
selectconnected_posebonechildren(ob, curBone, extend);
}
@@ -1415,25 +1418,25 @@ static void selectconnected_posebonechildren (Object *ob, Bone *bone, int extend
/* previously known as "selectconnected_posearmature" */
static int pose_select_connected_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- Object *ob= CTX_data_edit_object(C);
- Bone *bone, *curBone, *next= NULL;
- int extend= RNA_boolean_get(op->ptr, "extend");
+ Object *ob = CTX_data_edit_object(C);
+ Bone *bone, *curBone, *next = NULL;
+ int extend = RNA_boolean_get(op->ptr, "extend");
view3d_operator_needs_opengl(C);
if (extend)
- bone= get_nearest_bone(C, 0, event->mval[0], event->mval[1]);
+ bone = get_nearest_bone(C, 0, event->mval[0], event->mval[1]);
else
- bone= get_nearest_bone(C, 1, event->mval[0], event->mval[1]);
+ bone = get_nearest_bone(C, 1, event->mval[0], event->mval[1]);
if (!bone)
return OPERATOR_CANCELLED;
/* Select parents */
- for (curBone=bone; curBone; curBone=next) {
+ for (curBone = bone; curBone; curBone = next) {
/* ignore bone if cannot be selected */
if ((curBone->flag & BONE_UNSELECTABLE) == 0) {
- // XXX old cruft! use notifiers instead
+ // XXX old cruft! use notifiers instead
//select_actionchannel_by_name (ob->action, curBone->name, !(shift));
if (extend)
@@ -1442,26 +1445,26 @@ static int pose_select_connected_invoke(bContext *C, wmOperator *op, wmEvent *ev
curBone->flag |= BONE_SELECTED;
if (curBone->flag & BONE_CONNECTED)
- next=curBone->parent;
+ next = curBone->parent;
else
- next=NULL;
+ next = NULL;
}
else
- next= NULL;
+ next = NULL;
}
/* Select children */
- for (curBone=bone->childbase.first; curBone; curBone=next)
+ for (curBone = bone->childbase.first; curBone; curBone = next)
selectconnected_posebonechildren(ob, curBone, extend);
- WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, ob);
return OPERATOR_FINISHED;
}
static int pose_select_linked_poll(bContext *C)
{
- return ( ED_operator_view3d_active(C) && ED_operator_posemode(C) );
+ return (ED_operator_view3d_active(C) && ED_operator_posemode(C) );
}
void POSE_OT_select_linked(wmOperatorType *ot)
@@ -1477,7 +1480,7 @@ void POSE_OT_select_linked(wmOperatorType *ot)
ot->poll = pose_select_linked_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* props */
RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first");
@@ -1492,70 +1495,70 @@ static int armature_select_linked_invoke(bContext *C, wmOperator *op, wmEvent *e
{
bArmature *arm;
EditBone *bone, *curBone, *next;
- int extend= RNA_boolean_get(op->ptr, "extend");
- Object *obedit= CTX_data_edit_object(C);
- arm= obedit->data;
+ int extend = RNA_boolean_get(op->ptr, "extend");
+ Object *obedit = CTX_data_edit_object(C);
+ arm = obedit->data;
view3d_operator_needs_opengl(C);
if (extend)
- bone= get_nearest_bone(C, 0, event->mval[0], event->mval[1]);
+ bone = get_nearest_bone(C, 0, event->mval[0], event->mval[1]);
else
- bone= get_nearest_bone(C, 1, event->mval[0], event->mval[1]);
+ bone = get_nearest_bone(C, 1, event->mval[0], event->mval[1]);
if (!bone)
return OPERATOR_CANCELLED;
/* Select parents */
- for (curBone=bone; curBone; curBone=next) {
+ for (curBone = bone; curBone; curBone = next) {
if ((curBone->flag & BONE_UNSELECTABLE) == 0) {
if (extend) {
- curBone->flag &= ~(BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
+ curBone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
}
else {
- curBone->flag |= (BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
+ curBone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
}
}
if (curBone->flag & BONE_CONNECTED)
- next=curBone->parent;
+ next = curBone->parent;
else
- next=NULL;
+ next = NULL;
}
/* Select children */
while (bone) {
- for (curBone=arm->edbo->first; curBone; curBone=next) {
+ for (curBone = arm->edbo->first; curBone; curBone = next) {
next = curBone->next;
- if ((curBone->parent == bone) && (curBone->flag & BONE_UNSELECTABLE)==0) {
+ if ((curBone->parent == bone) && (curBone->flag & BONE_UNSELECTABLE) == 0) {
if (curBone->flag & BONE_CONNECTED) {
if (extend)
- curBone->flag &= ~(BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
+ curBone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
else
- curBone->flag |= (BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
- bone=curBone;
+ curBone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
+ bone = curBone;
break;
}
else {
- bone=NULL;
+ bone = NULL;
break;
}
}
}
if (!curBone)
- bone=NULL;
+ bone = NULL;
}
ED_armature_sync_selection(arm->edbo);
- WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, obedit);
+ WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, obedit);
return OPERATOR_FINISHED;
}
static int armature_select_linked_poll(bContext *C)
{
- return ( ED_operator_view3d_active(C) && ED_operator_editarmature(C) );
+ return (ED_operator_view3d_active(C) && ED_operator_editarmature(C) );
}
void ARMATURE_OT_select_linked(wmOperatorType *ot)
@@ -1571,7 +1574,7 @@ void ARMATURE_OT_select_linked(wmOperatorType *ot)
ot->poll = armature_select_linked_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties s*/
RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first");
@@ -1579,71 +1582,71 @@ void ARMATURE_OT_select_linked(wmOperatorType *ot)
/* does bones and points */
/* note that BONE ROOT only gets drawn for root bones (or without IK) */
-static EditBone *get_nearest_editbonepoint (ViewContext *vc, const int mval[2], ListBase *edbo, int findunsel, int *selmask)
+static EditBone *get_nearest_editbonepoint(ViewContext *vc, const int mval[2], ListBase *edbo, int findunsel, int *selmask)
{
EditBone *ebone;
rcti rect;
unsigned int buffer[MAXPICKBUF];
- unsigned int hitresult, besthitresult=BONESEL_NOSEL;
- int i, mindep= 4;
+ unsigned int hitresult, besthitresult = BONESEL_NOSEL;
+ int i, mindep = 4;
short hits;
glInitNames();
- rect.xmin = mval[0]-5;
- rect.xmax = mval[0]+5;
- rect.ymin = mval[1]-5;
- rect.ymax = mval[1]+5;
-
- hits= view3d_opengl_select(vc, buffer, MAXPICKBUF, &rect);
- if (hits==0) {
- rect.xmin = mval[0]-12;
- rect.xmax = mval[0]+12;
- rect.ymin = mval[1]-12;
- rect.ymax = mval[1]+12;
- hits= view3d_opengl_select(vc, buffer, MAXPICKBUF, &rect);
+ rect.xmin = mval[0] - 5;
+ rect.xmax = mval[0] + 5;
+ rect.ymin = mval[1] - 5;
+ rect.ymax = mval[1] + 5;
+
+ hits = view3d_opengl_select(vc, buffer, MAXPICKBUF, &rect);
+ if (hits == 0) {
+ rect.xmin = mval[0] - 12;
+ rect.xmax = mval[0] + 12;
+ rect.ymin = mval[1] - 12;
+ rect.ymax = mval[1] + 12;
+ hits = view3d_opengl_select(vc, buffer, MAXPICKBUF, &rect);
}
/* See if there are any selected bones in this group */
- if (hits>0) {
+ if (hits > 0) {
- if (hits==1) {
+ if (hits == 1) {
if (!(buffer[3] & BONESEL_NOSEL))
- besthitresult= buffer[3];
+ besthitresult = buffer[3];
}
else {
- for (i=0; i< hits; i++) {
- hitresult= buffer[3+(i*4)];
+ for (i = 0; i < hits; i++) {
+ hitresult = buffer[3 + (i * 4)];
if (!(hitresult & BONESEL_NOSEL)) {
int dep;
ebone = BLI_findlink(edbo, hitresult & ~BONESEL_ANY);
/* clicks on bone points get advantage */
- if ( hitresult & (BONESEL_ROOT|BONESEL_TIP)) {
+ if (hitresult & (BONESEL_ROOT | BONESEL_TIP)) {
/* but also the unselected one */
if (findunsel) {
- if ( (hitresult & BONESEL_ROOT) && (ebone->flag & BONE_ROOTSEL)==0)
- dep= 1;
- else if ( (hitresult & BONESEL_TIP) && (ebone->flag & BONE_TIPSEL)==0)
- dep= 1;
+ if ( (hitresult & BONESEL_ROOT) && (ebone->flag & BONE_ROOTSEL) == 0)
+ dep = 1;
+ else if ( (hitresult & BONESEL_TIP) && (ebone->flag & BONE_TIPSEL) == 0)
+ dep = 1;
else
- dep= 2;
+ dep = 2;
}
- else dep= 2;
+ else dep = 2;
}
else {
/* bone found */
if (findunsel) {
- if ((ebone->flag & BONE_SELECTED)==0)
- dep= 2;
+ if ((ebone->flag & BONE_SELECTED) == 0)
+ dep = 2;
else
- dep= 3;
+ dep = 3;
}
- else dep= 3;
+ else dep = 3;
}
if (dep < mindep) {
- mindep= dep;
- besthitresult= hitresult;
+ mindep = dep;
+ besthitresult = hitresult;
}
}
}
@@ -1651,7 +1654,7 @@ static EditBone *get_nearest_editbonepoint (ViewContext *vc, const int mval[2],
if (!(besthitresult & BONESEL_NOSEL)) {
- ebone= BLI_findlink(edbo, besthitresult & ~BONESEL_ANY);
+ ebone = BLI_findlink(edbo, besthitresult & ~BONESEL_ANY);
*selmask = 0;
if (besthitresult & BONESEL_ROOT)
@@ -1672,9 +1675,9 @@ static EditBone *get_nearest_editbonepoint (ViewContext *vc, const int mval[2],
static int armature_delete_selected_exec(bContext *C, wmOperator *UNUSED(op))
{
bArmature *arm;
- EditBone *curBone, *ebone_next;
+ EditBone *curBone, *ebone_next;
bConstraint *con;
- Object *obedit= CTX_data_edit_object(C); // XXX get from context
+ Object *obedit = CTX_data_edit_object(C); // XXX get from context
arm = obedit->data;
/* cancel if nothing selected */
@@ -1686,31 +1689,31 @@ static int armature_delete_selected_exec(bContext *C, wmOperator *UNUSED(op))
/* First erase any associated pose channel */
if (obedit->pose) {
bPoseChannel *pchan, *pchan_next;
- for (pchan=obedit->pose->chanbase.first; pchan; pchan= pchan_next) {
- pchan_next= pchan->next;
+ for (pchan = obedit->pose->chanbase.first; pchan; pchan = pchan_next) {
+ pchan_next = pchan->next;
curBone = editbone_name_exists(arm->edbo, pchan->name);
if (curBone && (curBone->flag & BONE_SELECTED) && (arm->layer & curBone->layer)) {
- free_pose_channel(pchan);
- free_pose_channels_hash(obedit->pose);
- BLI_freelinkN (&obedit->pose->chanbase, pchan);
+ BKE_pose_channel_free(pchan);
+ BKE_pose_channels_hash_free(obedit->pose);
+ BLI_freelinkN(&obedit->pose->chanbase, pchan);
}
else {
- for (con= pchan->constraints.first; con; con= con->next) {
- bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
+ for (con = pchan->constraints.first; con; con = con->next) {
+ bConstraintTypeInfo *cti = constraint_get_typeinfo(con);
ListBase targets = {NULL, NULL};
bConstraintTarget *ct;
if (cti && cti->get_constraint_targets) {
cti->get_constraint_targets(con, &targets);
- for (ct= targets.first; ct; ct= ct->next) {
+ for (ct = targets.first; ct; ct = ct->next) {
if (ct->tar == obedit) {
if (ct->subtarget[0]) {
curBone = editbone_name_exists(arm->edbo, ct->subtarget);
if (curBone && (curBone->flag & BONE_SELECTED) && (arm->layer & curBone->layer)) {
con->flag |= CONSTRAINT_DISABLE;
- ct->subtarget[0]= 0;
+ ct->subtarget[0] = 0;
}
}
}
@@ -1725,11 +1728,11 @@ static int armature_delete_selected_exec(bContext *C, wmOperator *UNUSED(op))
}
- for (curBone=arm->edbo->first; curBone; curBone= ebone_next) {
- ebone_next= curBone->next;
+ for (curBone = arm->edbo->first; curBone; curBone = ebone_next) {
+ ebone_next = curBone->next;
if (arm->layer & curBone->layer) {
if (curBone->flag & BONE_SELECTED) {
- if (curBone==arm->act_edbone) arm->act_edbone= NULL;
+ if (curBone == arm->act_edbone) arm->act_edbone = NULL;
ED_armature_edit_bone_remove(arm, curBone);
}
}
@@ -1738,7 +1741,7 @@ static int armature_delete_selected_exec(bContext *C, wmOperator *UNUSED(op))
ED_armature_sync_selection(arm->edbo);
- WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, obedit);
+ WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -1756,7 +1759,7 @@ void ARMATURE_OT_delete(wmOperatorType *ot)
ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* toggle==0: deselect
@@ -1765,35 +1768,35 @@ void ARMATURE_OT_delete(wmOperatorType *ot)
*/
void ED_armature_deselect_all(Object *obedit, int toggle)
{
- bArmature *arm= obedit->data;
- EditBone *eBone;
- int sel=1;
+ bArmature *arm = obedit->data;
+ EditBone *eBone;
+ int sel = 1;
- if (toggle==1) {
+ if (toggle == 1) {
/* Determine if there are any selected bones
* and therefore whether we are selecting or deselecting */
- for (eBone=arm->edbo->first;eBone;eBone=eBone->next) {
+ for (eBone = arm->edbo->first; eBone; eBone = eBone->next) {
// if (arm->layer & eBone->layer) {
if (eBone->flag & (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL)) {
- sel=0;
+ sel = 0;
break;
}
// }
}
}
- else sel= toggle;
+ else sel = toggle;
/* Set the flags */
- for (eBone=arm->edbo->first;eBone;eBone=eBone->next) {
- if (sel==2) {
+ for (eBone = arm->edbo->first; eBone; eBone = eBone->next) {
+ if (sel == 2) {
/* invert selection of bone */
if (EBONE_VISIBLE(arm, eBone)) {
eBone->flag ^= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
- if (arm->act_edbone==eBone)
- arm->act_edbone= NULL;
+ if (arm->act_edbone == eBone)
+ arm->act_edbone = NULL;
}
}
- else if (sel==1) {
+ else if (sel == 1) {
/* select bone */
if (EBONE_VISIBLE(arm, eBone)) {
eBone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
@@ -1804,8 +1807,8 @@ void ED_armature_deselect_all(Object *obedit, int toggle)
else {
/* deselect bone */
eBone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
- if (arm->act_edbone==eBone)
- arm->act_edbone= NULL;
+ if (arm->act_edbone == eBone)
+ arm->act_edbone = NULL;
}
}
@@ -1814,12 +1817,12 @@ void ED_armature_deselect_all(Object *obedit, int toggle)
void ED_armature_deselect_all_visible(Object *obedit)
{
- bArmature *arm= obedit->data;
- EditBone *ebone;
+ bArmature *arm = obedit->data;
+ EditBone *ebone;
- for (ebone= arm->edbo->first; ebone; ebone= ebone->next) {
+ for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
/* first and foremost, bone must be visible and selected */
- if (EBONE_VISIBLE(arm, ebone) && (ebone->flag & BONE_UNSELECTABLE)==0) {
+ if (EBONE_VISIBLE(arm, ebone) && (ebone->flag & BONE_UNSELECTABLE) == 0) {
ebone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
}
}
@@ -1831,27 +1834,27 @@ void ED_armature_deselect_all_visible(Object *obedit)
static int ebone_select_flag(EditBone *ebone)
{
if (ebone->parent && (ebone->flag & BONE_CONNECTED)) {
- return ((ebone->parent->flag & BONE_TIPSEL) ? BONE_ROOTSEL : 0) | (ebone->flag & (BONE_SELECTED|BONE_TIPSEL));
+ return ((ebone->parent->flag & BONE_TIPSEL) ? BONE_ROOTSEL : 0) | (ebone->flag & (BONE_SELECTED | BONE_TIPSEL));
}
else {
- return ebone->flag & (BONE_SELECTED|BONE_ROOTSEL|BONE_TIPSEL);
+ return ebone->flag & (BONE_SELECTED | BONE_ROOTSEL | BONE_TIPSEL);
}
}
/* context: editmode armature in view3d */
int mouse_armature(bContext *C, const int mval[2], int extend)
{
- Object *obedit= CTX_data_edit_object(C);
- bArmature *arm= obedit->data;
+ Object *obedit = CTX_data_edit_object(C);
+ bArmature *arm = obedit->data;
ViewContext vc;
EditBone *nearBone = NULL;
- int selmask;
+ int selmask;
view3d_set_viewcontext(C, &vc);
BIF_sk_selectStroke(C, mval, extend);
- nearBone= get_nearest_editbonepoint(&vc, mval, arm->edbo, 1, &selmask);
+ nearBone = get_nearest_editbonepoint(&vc, mval, arm->edbo, 1, &selmask);
if (nearBone) {
if (!extend)
@@ -1867,7 +1870,7 @@ int mouse_armature(bContext *C, const int mval[2], int extend)
/* hold shift inverts this bone's selection */
if (nearBone->flag & BONE_SELECTED) {
/* deselect this bone */
- nearBone->flag &= ~(BONE_TIPSEL|BONE_SELECTED);
+ nearBone->flag &= ~(BONE_TIPSEL | BONE_SELECTED);
/* only deselect parent tip if it is not selected */
if (!(nearBone->parent->flag & BONE_SELECTED))
nearBone->parent->flag &= ~BONE_TIPSEL;
@@ -1888,11 +1891,11 @@ int mouse_armature(bContext *C, const int mval[2], int extend)
if (extend) {
/* hold shift inverts this bone's selection */
if (nearBone->flag & BONE_SELECTED)
- nearBone->flag &= ~(BONE_TIPSEL|BONE_ROOTSEL);
+ nearBone->flag &= ~(BONE_TIPSEL | BONE_ROOTSEL);
else
- nearBone->flag |= (BONE_TIPSEL|BONE_ROOTSEL);
+ nearBone->flag |= (BONE_TIPSEL | BONE_ROOTSEL);
}
- else nearBone->flag |= (BONE_TIPSEL|BONE_ROOTSEL);
+ else nearBone->flag |= (BONE_TIPSEL | BONE_ROOTSEL);
}
}
else {
@@ -1907,11 +1910,11 @@ int mouse_armature(bContext *C, const int mval[2], int extend)
if (nearBone) {
/* then now check for active status */
if (ebone_select_flag(nearBone)) {
- arm->act_edbone= nearBone;
+ arm->act_edbone = nearBone;
}
}
- WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, vc.obedit);
+ WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, vc.obedit);
return 1;
}
@@ -1920,13 +1923,13 @@ int mouse_armature(bContext *C, const int mval[2], int extend)
void ED_armature_edit_free(struct Object *ob)
{
- bArmature *arm= ob->data;
+ bArmature *arm = ob->data;
EditBone *eBone;
/* Clear the editbones list */
if (arm->edbo) {
if (arm->edbo->first) {
- for (eBone=arm->edbo->first; eBone; eBone=eBone->next) {
+ for (eBone = arm->edbo->first; eBone; eBone = eBone->next) {
if (eBone->prop) {
IDP_FreeProperty(eBone->prop);
MEM_freeN(eBone->prop);
@@ -1936,19 +1939,19 @@ void ED_armature_edit_free(struct Object *ob)
BLI_freelistN(arm->edbo);
}
MEM_freeN(arm->edbo);
- arm->edbo= NULL;
+ arm->edbo = NULL;
}
}
/* Put armature in EditMode */
void ED_armature_to_edit(Object *ob)
{
- bArmature *arm= ob->data;
+ bArmature *arm = ob->data;
ED_armature_edit_free(ob);
- arm->edbo= MEM_callocN(sizeof(ListBase), "edbo armature");
- arm->act_edbone= make_boneList(arm->edbo, &arm->bonebase, NULL, arm->act_bone);
- arm->act_bone= NULL;
+ arm->edbo = MEM_callocN(sizeof(ListBase), "edbo armature");
+ arm->act_edbone = make_boneList(arm->edbo, &arm->bonebase, NULL, arm->act_bone);
+ arm->act_bone = NULL;
// BIF_freeTemplates(); /* force template update when entering editmode */
}
@@ -1974,7 +1977,7 @@ float ED_rollBoneToVector(EditBone *bone, const float align_axis[3], const short
sub_v3_v3v3(align_axis_proj, align_axis, vec);
if (axis_only) {
- if (angle_v3v3(align_axis_proj, mat[2]) > (float)(M_PI/2.0)) {
+ if (angle_v3v3(align_axis_proj, mat[2]) > (float)(M_PI / 2.0)) {
negate_v3(align_axis_proj);
}
}
@@ -2007,44 +2010,44 @@ static EnumPropertyItem prop_calc_roll_types[] = {
static int armature_calc_roll_exec(bContext *C, wmOperator *op)
{
- Object *ob= CTX_data_edit_object(C);
- const short type= RNA_enum_get(op->ptr, "type");
- const short axis_only= RNA_boolean_get(op->ptr, "axis_only");
- const short axis_flip= RNA_boolean_get(op->ptr, "axis_flip");
+ Object *ob = CTX_data_edit_object(C);
+ const short type = RNA_enum_get(op->ptr, "type");
+ const short axis_only = RNA_boolean_get(op->ptr, "axis_only");
+ const short axis_flip = RNA_boolean_get(op->ptr, "axis_flip");
float imat[3][3];
- bArmature *arm= ob->data;
+ bArmature *arm = ob->data;
EditBone *ebone;
copy_m3_m4(imat, ob->obmat);
invert_m3(imat);
- if (type==7) { /* Cursor */
- Scene *scene= CTX_data_scene(C);
- View3D *v3d= CTX_wm_view3d(C); /* can be NULL */
+ if (type == 7) { /* Cursor */
+ Scene *scene = CTX_data_scene(C);
+ View3D *v3d = CTX_wm_view3d(C); /* can be NULL */
float cursor_local[3];
- float *cursor= give_cursor(scene, v3d);
+ float *cursor = give_cursor(scene, v3d);
copy_v3_v3(cursor_local, cursor);
mul_m3_v3(imat, cursor_local);
/* cursor */
- for (ebone= arm->edbo->first; ebone; ebone= ebone->next) {
+ for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
if (EBONE_VISIBLE(arm, ebone) && EBONE_EDITABLE(ebone)) {
float cursor_rel[3];
sub_v3_v3v3(cursor_rel, cursor_local, ebone->head);
if (axis_flip) negate_v3(cursor_rel);
- ebone->roll= ED_rollBoneToVector(ebone, cursor_rel, axis_only);
+ ebone->roll = ED_rollBoneToVector(ebone, cursor_rel, axis_only);
}
}
}
else {
- float vec[3]= {0.0f, 0.0f, 0.0f};
- if (type==6) { /* View */
- RegionView3D *rv3d= CTX_wm_region_view3d(C);
- if (rv3d==NULL) {
+ float vec[3] = {0.0f, 0.0f, 0.0f};
+ if (type == 6) { /* View */
+ RegionView3D *rv3d = CTX_wm_region_view3d(C);
+ if (rv3d == NULL) {
BKE_report(op->reports, RPT_ERROR, "No region view3d available");
return OPERATOR_CANCELLED;
}
@@ -2052,10 +2055,10 @@ static int armature_calc_roll_exec(bContext *C, wmOperator *op)
copy_v3_v3(vec, rv3d->viewinv[2]);
mul_m3_v3(imat, vec);
}
- else if (type==5) {
+ else if (type == 5) {
float mat[3][3], nor[3];
- ebone= (EditBone *)arm->act_edbone;
- if (ebone==NULL) {
+ ebone = (EditBone *)arm->act_edbone;
+ if (ebone == NULL) {
BKE_report(op->reports, RPT_ERROR, "No active bone set");
return OPERATOR_CANCELLED;
}
@@ -2066,34 +2069,34 @@ static int armature_calc_roll_exec(bContext *C, wmOperator *op)
}
else { /* Axis */
assert(type >= 0 && type <= 5);
- if (type<3) vec[type]= 1.0f;
- else vec[type-2]= -1.0f;
+ if (type < 3) vec[type] = 1.0f;
+ else vec[type - 2] = -1.0f;
mul_m3_v3(imat, vec);
}
if (axis_flip) negate_v3(vec);
- for (ebone= arm->edbo->first; ebone; ebone= ebone->next) {
+ for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
if (EBONE_VISIBLE(arm, ebone) && EBONE_EDITABLE(ebone)) {
/* roll func is a callback which assumes that all is well */
- ebone->roll= ED_rollBoneToVector(ebone, vec, axis_only);
+ ebone->roll = ED_rollBoneToVector(ebone, vec, axis_only);
}
}
}
if (arm->flag & ARM_MIRROR_EDIT) {
- for (ebone= arm->edbo->first; ebone; ebone= ebone->next) {
+ for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
if ((EBONE_VISIBLE(arm, ebone) && EBONE_EDITABLE(ebone)) == 0) {
- EditBone *ebone_mirr= ED_armature_bone_get_mirrored(arm->edbo, ebone);
+ EditBone *ebone_mirr = ED_armature_bone_get_mirrored(arm->edbo, ebone);
if (ebone_mirr && (EBONE_VISIBLE(arm, ebone_mirr) && EBONE_EDITABLE(ebone_mirr))) {
- ebone->roll= -ebone_mirr->roll;
+ ebone->roll = -ebone_mirr->roll;
}
}
}
}
/* note, notifier might evolve */
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
return OPERATOR_FINISHED;
}
@@ -2111,7 +2114,7 @@ void ARMATURE_OT_calculate_roll(wmOperatorType *ot)
ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
ot->prop = RNA_def_enum(ot->srna, "type", prop_calc_roll_types, 0, "Type", "");
@@ -2128,61 +2131,61 @@ typedef struct UndoArmature {
static void undoBones_to_editBones(void *uarmv, void *armv, void *UNUSED(data))
{
- UndoArmature *uarm= uarmv;
- bArmature *arm= armv;
+ UndoArmature *uarm = uarmv;
+ bArmature *arm = armv;
EditBone *ebo, *newebo;
BLI_freelistN(arm->edbo);
/* copy */
- for (ebo= uarm->lb.first; ebo; ebo= ebo->next) {
- newebo= MEM_dupallocN(ebo);
- ebo->temp= newebo;
+ for (ebo = uarm->lb.first; ebo; ebo = ebo->next) {
+ newebo = MEM_dupallocN(ebo);
+ ebo->temp = newebo;
BLI_addtail(arm->edbo, newebo);
}
/* active bone */
if (uarm->act_edbone) {
- ebo= uarm->act_edbone;
- arm->act_edbone= ebo->temp;
+ ebo = uarm->act_edbone;
+ arm->act_edbone = ebo->temp;
}
else
- arm->act_edbone= NULL;
+ arm->act_edbone = NULL;
/* set pointers */
- for (newebo= arm->edbo->first; newebo; newebo= newebo->next) {
- if (newebo->parent) newebo->parent= newebo->parent->temp;
+ for (newebo = arm->edbo->first; newebo; newebo = newebo->next) {
+ if (newebo->parent) newebo->parent = newebo->parent->temp;
}
/* be sure they don't hang ever */
- for (newebo= arm->edbo->first; newebo; newebo= newebo->next) {
- newebo->temp= NULL;
+ for (newebo = arm->edbo->first; newebo; newebo = newebo->next) {
+ newebo->temp = NULL;
}
}
static void *editBones_to_undoBones(void *armv, void *UNUSED(obdata))
{
- bArmature *arm= armv;
+ bArmature *arm = armv;
UndoArmature *uarm;
EditBone *ebo, *newebo;
- uarm= MEM_callocN(sizeof(UndoArmature), "listbase undo");
+ uarm = MEM_callocN(sizeof(UndoArmature), "listbase undo");
/* copy */
- for (ebo= arm->edbo->first; ebo; ebo= ebo->next) {
- newebo= MEM_dupallocN(ebo);
- ebo->temp= newebo;
+ for (ebo = arm->edbo->first; ebo; ebo = ebo->next) {
+ newebo = MEM_dupallocN(ebo);
+ ebo->temp = newebo;
BLI_addtail(&uarm->lb, newebo);
}
/* active bone */
if (arm->act_edbone) {
- ebo= arm->act_edbone;
- uarm->act_edbone= ebo->temp;
+ ebo = arm->act_edbone;
+ uarm->act_edbone = ebo->temp;
}
/* set pointers */
- for (newebo= uarm->lb.first; newebo; newebo= newebo->next) {
- if (newebo->parent) newebo->parent= newebo->parent->temp;
+ for (newebo = uarm->lb.first; newebo; newebo = newebo->next) {
+ if (newebo->parent) newebo->parent = newebo->parent->temp;
}
return uarm;
@@ -2190,7 +2193,7 @@ static void *editBones_to_undoBones(void *armv, void *UNUSED(obdata))
static void free_undoBones(void *uarmv)
{
- UndoArmature *uarm= uarmv;
+ UndoArmature *uarm = uarmv;
BLI_freelistN(&uarm->lb);
MEM_freeN(uarm);
@@ -2198,8 +2201,8 @@ static void free_undoBones(void *uarmv)
static void *get_armature_edit(bContext *C)
{
- Object *obedit= CTX_data_edit_object(C);
- if (obedit && obedit->type==OB_ARMATURE) {
+ Object *obedit = CTX_data_edit_object(C);
+ if (obedit && obedit->type == OB_ARMATURE) {
return obedit->data;
}
return NULL;
@@ -2220,7 +2223,7 @@ void undo_push_armature(bContext *C, const char *name)
/* default bone add, returns it selected, but without tail set */
EditBone *ED_armature_edit_bone_add(bArmature *arm, const char *name)
{
- EditBone *bone= MEM_callocN(sizeof(EditBone), "eBone");
+ EditBone *bone = MEM_callocN(sizeof(EditBone), "eBone");
BLI_strncpy(bone->name, name, sizeof(bone->name));
unique_editbone_name(arm->edbo, bone->name, NULL);
@@ -2228,16 +2231,16 @@ EditBone *ED_armature_edit_bone_add(bArmature *arm, const char *name)
BLI_addtail(arm->edbo, bone);
bone->flag |= BONE_TIPSEL;
- bone->weight= 1.0f;
- bone->dist= 0.25f;
- bone->xwidth= 0.1f;
- bone->zwidth= 0.1f;
- bone->ease1= 1.0f;
- bone->ease2= 1.0f;
- bone->rad_head= 0.10f;
- bone->rad_tail= 0.05f;
- bone->segments= 1;
- bone->layer= arm->layer;
+ bone->weight = 1.0f;
+ bone->dist = 0.25f;
+ bone->xwidth = 0.1f;
+ bone->zwidth = 0.1f;
+ bone->ease1 = 1.0f;
+ bone->ease2 = 1.0f;
+ bone->rad_head = 0.10f;
+ bone->rad_tail = 0.05f;
+ bone->segments = 1;
+ bone->layer = arm->layer;
return bone;
}
@@ -2245,10 +2248,10 @@ EditBone *ED_armature_edit_bone_add(bArmature *arm, const char *name)
/* v3d and rv3d are allowed to be NULL */
void add_primitive_bone(Scene *scene, View3D *v3d, RegionView3D *rv3d)
{
- Object *obedit= scene->obedit; // XXX get from context
- bArmature *arm= obedit->data;
- float obmat[3][3], curs[3], viewmat[3][3], totmat[3][3], imat[3][3];
- EditBone *bone;
+ Object *obedit = scene->obedit; // XXX get from context
+ bArmature *arm = obedit->data;
+ float obmat[3][3], curs[3], viewmat[3][3], totmat[3][3], imat[3][3];
+ EditBone *bone;
/* Get inverse point for head and orientation for tail */
invert_m4_m4(obedit->imat, obedit->obmat);
@@ -2265,16 +2268,16 @@ void add_primitive_bone(Scene *scene, View3D *v3d, RegionView3D *rv3d)
ED_armature_deselect_all(obedit, 0);
/* Create a bone */
- bone= ED_armature_edit_bone_add(arm, "Bone");
+ bone = ED_armature_edit_bone_add(arm, "Bone");
- arm->act_edbone= bone;
+ arm->act_edbone = bone;
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
}
@@ -2286,26 +2289,26 @@ static int armature_click_extrude_exec(bContext *C, wmOperator *UNUSED(op))
View3D *v3d;
bArmature *arm;
EditBone *ebone, *newbone, *flipbone;
- float *curs, mat[3][3],imat[3][3];
- int a, to_root= 0;
+ float *curs, mat[3][3], imat[3][3];
+ int a, to_root = 0;
Object *obedit;
Scene *scene;
scene = CTX_data_scene(C);
- v3d= CTX_wm_view3d(C);
- obedit= CTX_data_edit_object(C);
- arm= obedit->data;
+ v3d = CTX_wm_view3d(C);
+ obedit = CTX_data_edit_object(C);
+ arm = obedit->data;
/* find the active or selected bone */
- for (ebone = arm->edbo->first; ebone; ebone=ebone->next) {
+ for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
if (EBONE_VISIBLE(arm, ebone)) {
if (ebone->flag & BONE_TIPSEL || arm->act_edbone == ebone)
break;
}
}
- if (ebone==NULL) {
- for (ebone = arm->edbo->first; ebone; ebone=ebone->next) {
+ if (ebone == NULL) {
+ for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
if (EBONE_VISIBLE(arm, ebone)) {
if (ebone->flag & BONE_ROOTSEL || arm->act_edbone == ebone)
break;
@@ -2314,60 +2317,60 @@ static int armature_click_extrude_exec(bContext *C, wmOperator *UNUSED(op))
if (ebone == NULL)
return OPERATOR_CANCELLED;
- to_root= 1;
+ to_root = 1;
}
ED_armature_deselect_all(obedit, 0);
/* we re-use code for mirror editing... */
- flipbone= NULL;
+ flipbone = NULL;
if (arm->flag & ARM_MIRROR_EDIT)
- flipbone= ED_armature_bone_get_mirrored(arm->edbo, ebone);
+ flipbone = ED_armature_bone_get_mirrored(arm->edbo, ebone);
- for (a=0; a<2; a++) {
- if (a==1) {
- if (flipbone==NULL)
+ for (a = 0; a < 2; a++) {
+ if (a == 1) {
+ if (flipbone == NULL)
break;
else {
SWAP(EditBone *, flipbone, ebone);
}
}
- newbone= ED_armature_edit_bone_add(arm, ebone->name);
- arm->act_edbone= newbone;
+ newbone = ED_armature_edit_bone_add(arm, ebone->name);
+ arm->act_edbone = newbone;
if (to_root) {
copy_v3_v3(newbone->head, ebone->head);
- newbone->rad_head= ebone->rad_tail;
- newbone->parent= ebone->parent;
+ newbone->rad_head = ebone->rad_tail;
+ newbone->parent = ebone->parent;
}
else {
copy_v3_v3(newbone->head, ebone->tail);
- newbone->rad_head= ebone->rad_tail;
- newbone->parent= ebone;
+ newbone->rad_head = ebone->rad_tail;
+ newbone->parent = ebone;
newbone->flag |= BONE_CONNECTED;
}
- curs= give_cursor(scene, v3d);
+ curs = give_cursor(scene, v3d);
copy_v3_v3(newbone->tail, curs);
sub_v3_v3v3(newbone->tail, newbone->tail, obedit->obmat[3]);
- if (a==1)
- newbone->tail[0]= -newbone->tail[0];
+ if (a == 1)
+ newbone->tail[0] = -newbone->tail[0];
copy_m3_m4(mat, obedit->obmat);
invert_m3_m3(imat, mat);
mul_m3_v3(imat, newbone->tail);
- newbone->length= len_v3v3(newbone->head, newbone->tail);
- newbone->rad_tail= newbone->length*0.05f;
- newbone->dist= newbone->length*0.25f;
+ newbone->length = len_v3v3(newbone->head, newbone->tail);
+ newbone->rad_tail = newbone->length * 0.05f;
+ newbone->dist = newbone->length * 0.25f;
}
ED_armature_sync_selection(arm->edbo);
- WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, obedit);
+ WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -2384,11 +2387,11 @@ static int armature_click_extrude_invoke(bContext *C, wmOperator *op, wmEvent *e
float *fp = NULL, tvec[3], oldcurs[3], mval_f[2];
int retv;
- scene= CTX_data_scene(C);
- ar= CTX_wm_region(C);
+ scene = CTX_data_scene(C);
+ ar = CTX_wm_region(C);
v3d = CTX_wm_view3d(C);
- fp= give_cursor(scene, v3d);
+ fp = give_cursor(scene, v3d);
copy_v3_v3(oldcurs, fp);
@@ -2397,7 +2400,7 @@ static int armature_click_extrude_invoke(bContext *C, wmOperator *op, wmEvent *e
copy_v3_v3(fp, tvec);
/* extrude to the where new cursor is and store the operation result */
- retv= armature_click_extrude_exec(C, op);
+ retv = armature_click_extrude_exec(C, op);
/* restore previous 3d cursor position */
copy_v3_v3(fp, oldcurs);
@@ -2418,17 +2421,17 @@ void ARMATURE_OT_click_extrude(wmOperatorType *ot)
ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* props */
}
/* adds an EditBone between the nominated locations (should be in the right space) */
-static EditBone *add_points_bone (Object *obedit, float head[], float tail[])
+static EditBone *add_points_bone(Object *obedit, float head[], float tail[])
{
EditBone *ebo;
- ebo= ED_armature_edit_bone_add(obedit->data, "Bone");
+ ebo = ED_armature_edit_bone_add(obedit->data, "Bone");
copy_v3_v3(ebo->head, head);
copy_v3_v3(ebo->tail, tail);
@@ -2442,7 +2445,7 @@ static EditBone *get_named_editbone(ListBase *edbo, char *name)
EditBone *eBone;
if (name) {
- for (eBone=edbo->first; eBone; eBone=eBone->next) {
+ for (eBone = edbo->first; eBone; eBone = eBone->next) {
if (!strcmp(name, eBone->name))
return eBone;
}
@@ -2458,8 +2461,7 @@ void preEditBoneDuplicate(ListBase *editbones)
EditBone *eBone;
/* clear temp */
- for (eBone = editbones->first; eBone; eBone = eBone->next)
- {
+ for (eBone = editbones->first; eBone; eBone = eBone->next) {
eBone->temp = NULL;
}
}
@@ -2479,20 +2481,20 @@ void updateDuplicateSubtargetObjects(EditBone *dupBone, ListBase *editbones, Obj
bConstraint *curcon;
ListBase *conlist;
- if ( (pchan = verify_pose_channel(dst_ob->pose, dupBone->name)) ) {
+ if ( (pchan = BKE_pose_channel_verify(dst_ob->pose, dupBone->name)) ) {
if ( (conlist = &pchan->constraints) ) {
- for (curcon = conlist->first; curcon; curcon=curcon->next) {
+ for (curcon = conlist->first; curcon; curcon = curcon->next) {
/* does this constraint have a subtarget in
* this armature?
*/
- bConstraintTypeInfo *cti= constraint_get_typeinfo(curcon);
+ bConstraintTypeInfo *cti = constraint_get_typeinfo(curcon);
ListBase targets = {NULL, NULL};
bConstraintTarget *ct;
if (cti && cti->get_constraint_targets) {
cti->get_constraint_targets(curcon, &targets);
- for (ct= targets.first; ct; ct= ct->next) {
+ for (ct = targets.first; ct; ct = ct->next) {
if ((ct->tar == src_ob) && (ct->subtarget[0])) {
ct->tar = dst_ob; /* update target */
oldtarget = get_named_editbone(editbones, ct->subtarget);
@@ -2542,7 +2544,7 @@ EditBone *duplicateEditBoneObjects(EditBone *curBone, const char *name, ListBase
/* copy the ID property */
if (curBone->prop)
- eBone->prop= IDP_CopyProperty(curBone->prop);
+ eBone->prop = IDP_CopyProperty(curBone->prop);
/* Lets duplicate the list of constraints that the
* current bone has.
@@ -2550,15 +2552,15 @@ EditBone *duplicateEditBoneObjects(EditBone *curBone, const char *name, ListBase
if (src_ob->pose) {
bPoseChannel *chanold, *channew;
- chanold = verify_pose_channel(src_ob->pose, curBone->name);
+ chanold = BKE_pose_channel_verify(src_ob->pose, curBone->name);
if (chanold) {
/* WARNING: this creates a new posechannel, but there will not be an attached bone
* yet as the new bones created here are still 'EditBones' not 'Bones'.
*/
- channew= verify_pose_channel(dst_ob->pose, eBone->name);
+ channew = BKE_pose_channel_verify(dst_ob->pose, eBone->name);
if (channew) {
- duplicate_pose_channel_data(channew, chanold);
+ BKE_pose_channel_copy_data(channew, chanold);
}
}
}
@@ -2575,12 +2577,12 @@ EditBone *duplicateEditBone(EditBone *curBone, const char *name, ListBase *editb
static int armature_duplicate_selected_exec(bContext *C, wmOperator *UNUSED(op))
{
bArmature *arm;
- EditBone *eBone = NULL;
- EditBone *curBone;
- EditBone *firstDup=NULL; /* The beginning of the duplicated bones in the edbo list */
+ EditBone *eBone = NULL;
+ EditBone *curBone;
+ EditBone *firstDup = NULL; /* The beginning of the duplicated bones in the edbo list */
- Object *obedit= CTX_data_edit_object(C);
- arm= obedit->data;
+ Object *obedit = CTX_data_edit_object(C);
+ arm = obedit->data;
/* cancel if nothing selected */
if (CTX_DATA_COUNT(C, selected_bones) == 0)
@@ -2592,7 +2594,7 @@ static int armature_duplicate_selected_exec(bContext *C, wmOperator *UNUSED(op))
/* Select mirrored bones */
if (arm->flag & ARM_MIRROR_EDIT) {
- for (curBone=arm->edbo->first; curBone; curBone=curBone->next) {
+ for (curBone = arm->edbo->first; curBone; curBone = curBone->next) {
if (EBONE_VISIBLE(arm, curBone)) {
if (curBone->flag & BONE_SELECTED) {
eBone = ED_armature_bone_get_mirrored(arm->edbo, curBone);
@@ -2605,24 +2607,24 @@ static int armature_duplicate_selected_exec(bContext *C, wmOperator *UNUSED(op))
/* Find the selected bones and duplicate them as needed */
- for (curBone=arm->edbo->first; curBone && curBone!=firstDup; curBone=curBone->next) {
+ for (curBone = arm->edbo->first; curBone && curBone != firstDup; curBone = curBone->next) {
if (EBONE_VISIBLE(arm, curBone)) {
if (curBone->flag & BONE_SELECTED) {
- eBone= duplicateEditBone(curBone, curBone->name, arm->edbo, obedit);
+ eBone = duplicateEditBone(curBone, curBone->name, arm->edbo, obedit);
if (!firstDup)
- firstDup=eBone;
+ firstDup = eBone;
}
}
}
/* Run though the list and fix the pointers */
- for (curBone=arm->edbo->first; curBone && curBone!=firstDup; curBone=curBone->next) {
+ for (curBone = arm->edbo->first; curBone && curBone != firstDup; curBone = curBone->next) {
if (EBONE_VISIBLE(arm, curBone)) {
if (curBone->flag & BONE_SELECTED) {
- eBone=(EditBone*) curBone->temp;
+ eBone = (EditBone *) curBone->temp;
if (!curBone->parent) {
/* If this bone has no parent,
@@ -2634,13 +2636,13 @@ static int armature_duplicate_selected_exec(bContext *C, wmOperator *UNUSED(op))
/* If this bone has a parent that was duplicated,
* Set the duplicate->parent to the curBone->parent->temp
*/
- eBone->parent= (EditBone *)curBone->parent->temp;
+ eBone->parent = (EditBone *)curBone->parent->temp;
}
else {
/* If this bone has a parent that IS not selected,
* Set the duplicate->parent to the curBone->parent
*/
- eBone->parent=(EditBone*) curBone->parent;
+ eBone->parent = (EditBone *) curBone->parent;
eBone->flag &= ~BONE_CONNECTED;
}
@@ -2654,20 +2656,20 @@ static int armature_duplicate_selected_exec(bContext *C, wmOperator *UNUSED(op))
/* correct the active bone */
if (arm->act_edbone) {
- eBone= arm->act_edbone;
+ eBone = arm->act_edbone;
if (eBone->temp)
- arm->act_edbone= eBone->temp;
+ arm->act_edbone = eBone->temp;
}
/* Deselect the old bones and select the new ones */
- for (curBone=arm->edbo->first; curBone && curBone!=firstDup; curBone=curBone->next) {
+ for (curBone = arm->edbo->first; curBone && curBone != firstDup; curBone = curBone->next) {
if (EBONE_VISIBLE(arm, curBone))
curBone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
}
ED_armature_validate_active(arm);
- WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, obedit);
+ WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -2685,7 +2687,7 @@ void ARMATURE_OT_duplicate(wmOperatorType *ot)
ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
@@ -2696,27 +2698,27 @@ void ARMATURE_OT_duplicate(wmOperatorType *ot)
typedef struct EditBonePoint {
struct EditBonePoint *next, *prev;
- EditBone *head_owner; /* EditBone which uses this point as a 'head' point */
- EditBone *tail_owner; /* EditBone which uses this point as a 'tail' point */
+ EditBone *head_owner; /* EditBone which uses this point as a 'head' point */
+ EditBone *tail_owner; /* EditBone which uses this point as a 'tail' point */
- float vec[3]; /* the actual location of the point in local/EditMode space */
+ float vec[3]; /* the actual location of the point in local/EditMode space */
} EditBonePoint;
/* find chain-tips (i.e. bones without children) */
-static void chains_find_tips (ListBase *edbo, ListBase *list)
+static void chains_find_tips(ListBase *edbo, ListBase *list)
{
EditBone *curBone, *ebo;
LinkData *ld;
/* note: this is potentially very slow ... there's got to be a better way */
- for (curBone= edbo->first; curBone; curBone= curBone->next) {
- short stop= 0;
+ for (curBone = edbo->first; curBone; curBone = curBone->next) {
+ short stop = 0;
/* is this bone contained within any existing chain? (skip if so) */
- for (ld= list->first; ld; ld= ld->next) {
- for (ebo= ld->data; ebo; ebo= ebo->parent) {
+ for (ld = list->first; ld; ld = ld->next) {
+ for (ebo = ld->data; ebo; ebo = ebo->parent) {
if (ebo == curBone) {
- stop= 1;
+ stop = 1;
break;
}
}
@@ -2727,12 +2729,12 @@ static void chains_find_tips (ListBase *edbo, ListBase *list)
if (stop) continue;
/* is any existing chain part of the chain formed by this bone? */
- stop= 0;
- for (ebo= curBone->parent; ebo; ebo= ebo->parent) {
- for (ld= list->first; ld; ld= ld->next) {
+ stop = 0;
+ for (ebo = curBone->parent; ebo; ebo = ebo->parent) {
+ for (ld = list->first; ld; ld = ld->next) {
if (ld->data == ebo) {
- ld->data= curBone;
- stop= 1;
+ ld->data = curBone;
+ stop = 1;
break;
}
}
@@ -2743,19 +2745,19 @@ static void chains_find_tips (ListBase *edbo, ListBase *list)
if (stop) continue;
/* add current bone to a new chain */
- ld= MEM_callocN(sizeof(LinkData), "BoneChain");
- ld->data= curBone;
+ ld = MEM_callocN(sizeof(LinkData), "BoneChain");
+ ld->data = curBone;
BLI_addtail(list, ld);
}
}
/* --------------------- */
-static void fill_add_joint (EditBone *ebo, short eb_tail, ListBase *points)
+static void fill_add_joint(EditBone *ebo, short eb_tail, ListBase *points)
{
EditBonePoint *ebp;
float vec[3];
- short found= 0;
+ short found = 0;
if (eb_tail) {
copy_v3_v3(vec, ebo->tail);
@@ -2764,20 +2766,20 @@ static void fill_add_joint (EditBone *ebo, short eb_tail, ListBase *points)
copy_v3_v3(vec, ebo->head);
}
- for (ebp= points->first; ebp; ebp= ebp->next) {
+ for (ebp = points->first; ebp; ebp = ebp->next) {
if (equals_v3v3(ebp->vec, vec)) {
if (eb_tail) {
if ((ebp->head_owner) && (ebp->head_owner->parent == ebo)) {
/* so this bone's tail owner is this bone */
- ebp->tail_owner= ebo;
- found= 1;
+ ebp->tail_owner = ebo;
+ found = 1;
break;
}
}
else {
if ((ebp->tail_owner) && (ebo->parent == ebp->tail_owner)) {
/* so this bone's head owner is this bone */
- ebp->head_owner= ebo;
+ ebp->head_owner = ebo;
found = 1;
break;
}
@@ -2787,15 +2789,15 @@ static void fill_add_joint (EditBone *ebo, short eb_tail, ListBase *points)
/* allocate a new point if no existing point was related */
if (found == 0) {
- ebp= MEM_callocN(sizeof(EditBonePoint), "EditBonePoint");
+ ebp = MEM_callocN(sizeof(EditBonePoint), "EditBonePoint");
if (eb_tail) {
copy_v3_v3(ebp->vec, ebo->tail);
- ebp->tail_owner= ebo;
+ ebp->tail_owner = ebo;
}
else {
copy_v3_v3(ebp->vec, ebo->head);
- ebp->head_owner= ebo;
+ ebp->head_owner = ebo;
}
BLI_addtail(points, ebp);
@@ -2803,12 +2805,12 @@ static void fill_add_joint (EditBone *ebo, short eb_tail, ListBase *points)
}
/* bone adding between selected joints */
-static int armature_fill_bones_exec (bContext *C, wmOperator *op)
+static int armature_fill_bones_exec(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_edit_object(C);
- bArmature *arm= (obedit) ? obedit->data : NULL;
- Scene *scene= CTX_data_scene(C);
- View3D *v3d= CTX_wm_view3d(C);
+ Object *obedit = CTX_data_edit_object(C);
+ bArmature *arm = (obedit) ? obedit->data : NULL;
+ Scene *scene = CTX_data_scene(C);
+ View3D *v3d = CTX_wm_view3d(C);
ListBase points = {NULL, NULL};
int count;
@@ -2817,7 +2819,7 @@ static int armature_fill_bones_exec (bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* loop over all bones, and only consider if visible */
- CTX_DATA_BEGIN(C, EditBone *, ebone, visible_bones)
+ CTX_DATA_BEGIN (C, EditBone *, ebone, visible_bones)
{
if (!(ebone->flag & BONE_CONNECTED) && (ebone->flag & BONE_ROOTSEL))
fill_add_joint(ebone, 0, &points);
@@ -2827,11 +2829,11 @@ static int armature_fill_bones_exec (bContext *C, wmOperator *op)
CTX_DATA_END;
/* the number of joints determines how we fill:
- * 1) between joint and cursor (joint=head, cursor=tail)
- * 2) between the two joints (order is dependent on active-bone/hierachy)
- * 3+) error (a smarter method involving finding chains needs to be worked out
+ * 1) between joint and cursor (joint=head, cursor=tail)
+ * 2) between the two joints (order is dependent on active-bone/hierachy)
+ * 3+) error (a smarter method involving finding chains needs to be worked out
*/
- count= BLI_countlist(&points);
+ count = BLI_countlist(&points);
if (count == 0) {
BKE_report(op->reports, RPT_ERROR, "No joints selected");
@@ -2842,7 +2844,7 @@ static int armature_fill_bones_exec (bContext *C, wmOperator *op)
float curs[3];
/* Get Points - selected joint */
- ebp= (EditBonePoint *)points.first;
+ ebp = (EditBonePoint *)points.first;
/* Get points - cursor (tail) */
invert_m4_m4(obedit->imat, obedit->obmat);
@@ -2857,15 +2859,15 @@ static int armature_fill_bones_exec (bContext *C, wmOperator *op)
short headtail = 0;
/* check that the points don't belong to the same bone */
- ebp= (EditBonePoint *)points.first;
- ebp2= ebp->next;
+ ebp = (EditBonePoint *)points.first;
+ ebp2 = ebp->next;
- if ((ebp->head_owner==ebp2->tail_owner) && (ebp->head_owner!=NULL)) {
+ if ((ebp->head_owner == ebp2->tail_owner) && (ebp->head_owner != NULL)) {
BKE_report(op->reports, RPT_ERROR, "Same bone selected...");
BLI_freelistN(&points);
return OPERATOR_CANCELLED;
}
- if ((ebp->tail_owner==ebp2->head_owner) && (ebp->tail_owner!=NULL)) {
+ if ((ebp->tail_owner == ebp2->head_owner) && (ebp->tail_owner != NULL)) {
BKE_report(op->reports, RPT_ERROR, "Same bone selected...");
BLI_freelistN(&points);
return OPERATOR_CANCELLED;
@@ -2885,11 +2887,11 @@ static int armature_fill_bones_exec (bContext *C, wmOperator *op)
/* get distances */
sub_v3_v3v3(vecA, ebp->vec, curs);
sub_v3_v3v3(vecB, ebp2->vec, curs);
- distA= len_v3(vecA);
- distB= len_v3(vecB);
+ distA = len_v3(vecA);
+ distB = len_v3(vecB);
/* compare distances - closer one therefore acts as direction for bone to go */
- headtail= (distA < distB) ? 2 : 1;
+ headtail = (distA < distB) ? 2 : 1;
}
else if (ebp->head_owner) {
headtail = 1;
@@ -2910,22 +2912,22 @@ static int armature_fill_bones_exec (bContext *C, wmOperator *op)
/* add new bone and parent it to the appropriate end */
if (headtail) {
- EditBone *newbone= add_points_bone(obedit, head, tail);
+ EditBone *newbone = add_points_bone(obedit, head, tail);
/* do parenting (will need to set connected flag too) */
if (headtail == 2) {
/* ebp tail or head - tail gets priority */
if (ebp->tail_owner)
- newbone->parent= ebp->tail_owner;
+ newbone->parent = ebp->tail_owner;
else
- newbone->parent= ebp->head_owner;
+ newbone->parent = ebp->head_owner;
}
else {
/* ebp2 tail or head - tail gets priority */
if (ebp2->tail_owner)
- newbone->parent= ebp2->tail_owner;
+ newbone->parent = ebp2->tail_owner;
else
- newbone->parent= ebp2->head_owner;
+ newbone->parent = ebp2->head_owner;
}
newbone->flag |= BONE_CONNECTED;
@@ -2939,7 +2941,7 @@ static int armature_fill_bones_exec (bContext *C, wmOperator *op)
}
/* updates */
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, obedit);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, obedit);
/* free points */
BLI_freelistN(&points);
@@ -2947,7 +2949,7 @@ static int armature_fill_bones_exec (bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void ARMATURE_OT_fill (wmOperatorType *ot)
+void ARMATURE_OT_fill(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Fill Between Joints";
@@ -2959,7 +2961,7 @@ void ARMATURE_OT_fill (wmOperatorType *ot)
ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* --------------------- */
@@ -2969,7 +2971,7 @@ void ARMATURE_OT_fill (wmOperatorType *ot)
*/
static void bones_merge(Object *obedit, EditBone *start, EditBone *end, EditBone *endchild, ListBase *chains)
{
- bArmature *arm= obedit->data;
+ bArmature *arm = obedit->data;
EditBone *ebo, *ebone, *newbone;
LinkData *chain;
float head[3], tail[3];
@@ -2987,23 +2989,23 @@ static void bones_merge(Object *obedit, EditBone *start, EditBone *end, EditBone
* - tail = head/tail of end (default tail)
* - parent = parent of start
*/
- if ((start->flag & BONE_TIPSEL) && (start->flag & BONE_SELECTED)==0) {
+ if ((start->flag & BONE_TIPSEL) && (start->flag & BONE_SELECTED) == 0) {
copy_v3_v3(head, start->tail);
}
else {
copy_v3_v3(head, start->head);
}
- if ((end->flag & BONE_ROOTSEL) && (end->flag & BONE_SELECTED)==0) {
+ if ((end->flag & BONE_ROOTSEL) && (end->flag & BONE_SELECTED) == 0) {
copy_v3_v3(tail, end->head);
}
else {
copy_v3_v3(tail, end->tail);
}
- newbone= add_points_bone(obedit, head, tail);
+ newbone = add_points_bone(obedit, head, tail);
newbone->parent = start->parent;
/* TODO, copy more things to the new bone */
- newbone->flag= start->flag & (BONE_HINGE|BONE_NO_DEFORM|BONE_NO_SCALE|BONE_NO_CYCLICOFFSET|BONE_NO_LOCAL_LOCATION|BONE_DONE);
+ newbone->flag = start->flag & (BONE_HINGE | BONE_NO_DEFORM | BONE_NO_SCALE | BONE_NO_CYCLICOFFSET | BONE_NO_LOCAL_LOCATION | BONE_DONE);
/* step 2a: reparent any side chains which may be parented to any bone in the chain of bones to merge
* - potentially several tips for side chains leading to some tree exist...
@@ -3035,24 +3037,24 @@ static void bones_merge(Object *obedit, EditBone *start, EditBone *end, EditBone
/* step 2b: parent child of end to newbone (child from this chain) */
if (endchild)
- endchild->parent= newbone;
+ endchild->parent = newbone;
/* step 3: delete all bones between and including start and end */
- for (ebo= end; ebo; ebo= ebone) {
- ebone= (ebo == start) ? (NULL) : (ebo->parent);
+ for (ebo = end; ebo; ebo = ebone) {
+ ebone = (ebo == start) ? (NULL) : (ebo->parent);
bone_free(arm, ebo);
}
- newbone->flag |= (BONE_ROOTSEL|BONE_TIPSEL|BONE_SELECTED);
+ newbone->flag |= (BONE_ROOTSEL | BONE_TIPSEL | BONE_SELECTED);
ED_armature_sync_selection(arm->edbo);
}
-static int armature_merge_exec (bContext *C, wmOperator *op)
+static int armature_merge_exec(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_edit_object(C);
- bArmature *arm= (obedit) ? obedit->data : NULL;
- short type= RNA_enum_get(op->ptr, "type");
+ Object *obedit = CTX_data_edit_object(C);
+ bArmature *arm = (obedit) ? obedit->data : NULL;
+ short type = RNA_enum_get(op->ptr, "type");
/* sanity checks */
if (ELEM(NULL, obedit, arm))
@@ -3072,28 +3074,28 @@ static int armature_merge_exec (bContext *C, wmOperator *op)
if (chains.first == NULL) return OPERATOR_CANCELLED;
/* each 'chain' is the last bone in the chain (with no children) */
- for (chain= chains.first; chain; chain= nchain) {
- EditBone *bstart= NULL, *bend= NULL;
- EditBone *bchild= NULL, *child=NULL;
+ for (chain = chains.first; chain; chain = nchain) {
+ EditBone *bstart = NULL, *bend = NULL;
+ EditBone *bchild = NULL, *child = NULL;
/* temporarily remove chain from list of chains */
- nchain= chain->next;
+ nchain = chain->next;
BLI_remlink(&chains, chain);
/* only consider bones that are visible and selected */
- for (ebo=chain->data; ebo; child=ebo, ebo=ebo->parent) {
+ for (ebo = chain->data; ebo; child = ebo, ebo = ebo->parent) {
/* check if visible + selected */
- if ( EBONE_VISIBLE(arm, ebo) &&
- ((ebo->flag & BONE_CONNECTED) || (ebo->parent==NULL)) &&
- (ebo->flag & BONE_SELECTED) )
+ if (EBONE_VISIBLE(arm, ebo) &&
+ ((ebo->flag & BONE_CONNECTED) || (ebo->parent == NULL)) &&
+ (ebo->flag & BONE_SELECTED) )
{
/* set either end or start (end gets priority, unless it is already set) */
if (bend == NULL) {
- bend= ebo;
- bchild= child;
+ bend = ebo;
+ bchild = child;
}
else
- bstart= ebo;
+ bstart = ebo;
}
else {
/* chain is broken... merge any continous segments then clear */
@@ -3121,12 +3123,12 @@ static int armature_merge_exec (bContext *C, wmOperator *op)
/* updates */
ED_armature_sync_selection(arm->edbo);
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, obedit);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, obedit);
return OPERATOR_FINISHED;
}
-void ARMATURE_OT_merge (wmOperatorType *ot)
+void ARMATURE_OT_merge(wmOperatorType *ot)
{
static EnumPropertyItem merge_types[] = {
{1, "WITHIN_CHAIN", 0, "Within Chains", ""},
@@ -3144,7 +3146,7 @@ void ARMATURE_OT_merge (wmOperatorType *ot)
ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
ot->prop = RNA_def_enum(ot->srna, "type", merge_types, 0, "Type", "");
@@ -3155,19 +3157,19 @@ void ARMATURE_OT_merge (wmOperatorType *ot)
static int armature_hide_exec(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_edit_object(C);
- bArmature *arm= obedit->data;
+ Object *obedit = CTX_data_edit_object(C);
+ bArmature *arm = obedit->data;
EditBone *ebone;
- const int invert= RNA_boolean_get(op->ptr, "unselected") ? BONE_SELECTED : 0;
+ const int invert = RNA_boolean_get(op->ptr, "unselected") ? BONE_SELECTED : 0;
/* cancel if nothing selected */
if (CTX_DATA_COUNT(C, selected_bones) == 0)
return OPERATOR_CANCELLED;
- for (ebone = arm->edbo->first; ebone; ebone=ebone->next) {
+ for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
if (EBONE_VISIBLE(arm, ebone)) {
if ((ebone->flag & BONE_SELECTED) != invert) {
- ebone->flag &= ~(BONE_TIPSEL|BONE_SELECTED|BONE_ROOTSEL);
+ ebone->flag &= ~(BONE_TIPSEL | BONE_SELECTED | BONE_ROOTSEL);
ebone->flag |= BONE_HIDDEN_A;
}
}
@@ -3175,7 +3177,7 @@ static int armature_hide_exec(bContext *C, wmOperator *op)
ED_armature_validate_active(arm);
ED_armature_sync_selection(arm->edbo);
- WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, obedit);
+ WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -3192,7 +3194,7 @@ void ARMATURE_OT_hide(wmOperatorType *ot)
ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* props */
RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected");
@@ -3200,14 +3202,14 @@ void ARMATURE_OT_hide(wmOperatorType *ot)
static int armature_reveal_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *obedit= CTX_data_edit_object(C);
- bArmature *arm= obedit->data;
+ Object *obedit = CTX_data_edit_object(C);
+ bArmature *arm = obedit->data;
EditBone *ebone;
- for (ebone = arm->edbo->first; ebone; ebone=ebone->next) {
+ for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
if (arm->layer & ebone->layer) {
if (ebone->flag & BONE_HIDDEN_A) {
- ebone->flag |= (BONE_TIPSEL|BONE_SELECTED|BONE_ROOTSEL);
+ ebone->flag |= (BONE_TIPSEL | BONE_SELECTED | BONE_ROOTSEL);
ebone->flag &= ~BONE_HIDDEN_A;
}
}
@@ -3215,7 +3217,7 @@ static int armature_reveal_exec(bContext *C, wmOperator *UNUSED(op))
ED_armature_validate_active(arm);
ED_armature_sync_selection(arm->edbo);
- WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, obedit);
+ WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -3232,20 +3234,20 @@ void ARMATURE_OT_reveal(wmOperatorType *ot)
ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
#if 0 // remove this?
static void hide_selected_armature_bones(Scene *scene)
{
- Object *obedit= scene->obedit; // XXX get from context
- bArmature *arm= obedit->data;
+ Object *obedit = scene->obedit; // XXX get from context
+ bArmature *arm = obedit->data;
EditBone *ebone;
- for (ebone = arm->edbo->first; ebone; ebone=ebone->next) {
+ for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
if (EBONE_VISIBLE(arm, ebone)) {
if (ebone->flag & BONE_SELECTED) {
- ebone->flag &= ~(BONE_TIPSEL|BONE_SELECTED|BONE_ROOTSEL);
+ ebone->flag &= ~(BONE_TIPSEL | BONE_SELECTED | BONE_ROOTSEL);
ebone->flag |= BONE_HIDDEN_A;
}
}
@@ -3256,14 +3258,14 @@ static void hide_selected_armature_bones(Scene *scene)
static void hide_unselected_armature_bones(Scene *scene)
{
- Object *obedit= scene->obedit; // XXX get from context
- bArmature *arm= obedit->data;
+ Object *obedit = scene->obedit; // XXX get from context
+ bArmature *arm = obedit->data;
EditBone *ebone;
- for (ebone = arm->edbo->first; ebone; ebone=ebone->next) {
- bArmature *arm= obedit->data;
+ for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
+ bArmature *arm = obedit->data;
if (EBONE_VISIBLE(arm, ebone)) {
- if (ebone->flag & (BONE_TIPSEL|BONE_SELECTED|BONE_ROOTSEL));
+ if (ebone->flag & (BONE_TIPSEL | BONE_SELECTED | BONE_ROOTSEL)) ;
else {
ebone->flag |= BONE_HIDDEN_A;
}
@@ -3276,14 +3278,14 @@ static void hide_unselected_armature_bones(Scene *scene)
void show_all_armature_bones(Scene *scene)
{
- Object *obedit= scene->obedit; // XXX get from context
- bArmature *arm= obedit->data;
+ Object *obedit = scene->obedit; // XXX get from context
+ bArmature *arm = obedit->data;
EditBone *ebone;
- for (ebone = arm->edbo->first; ebone; ebone=ebone->next) {
+ for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
if (arm->layer & ebone->layer) {
if (ebone->flag & BONE_HIDDEN_A) {
- ebone->flag |= (BONE_TIPSEL|BONE_SELECTED|BONE_ROOTSEL);
+ ebone->flag |= (BONE_TIPSEL | BONE_SELECTED | BONE_ROOTSEL);
ebone->flag &= ~BONE_HIDDEN_A;
}
}
@@ -3300,15 +3302,15 @@ static int armature_extrude_exec(bContext *C, wmOperator *op)
{
Object *obedit;
bArmature *arm;
- EditBone *newbone, *ebone, *flipbone, *first=NULL;
- int a, totbone= 0, do_extrude;
+ EditBone *newbone, *ebone, *flipbone, *first = NULL;
+ int a, totbone = 0, do_extrude;
int forked = RNA_boolean_get(op->ptr, "forked");
- obedit= CTX_data_edit_object(C);
- arm= obedit->data;
+ obedit = CTX_data_edit_object(C);
+ arm = obedit->data;
/* since we allow root extrude too, we have to make sure selection is OK */
- for (ebone = arm->edbo->first; ebone; ebone=ebone->next) {
+ for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
if (EBONE_VISIBLE(arm, ebone)) {
if (ebone->flag & BONE_ROOTSEL) {
if (ebone->parent && (ebone->flag & BONE_CONNECTED)) {
@@ -3320,36 +3322,36 @@ static int armature_extrude_exec(bContext *C, wmOperator *op)
}
/* Duplicate the necessary bones */
- for (ebone = arm->edbo->first; ((ebone) && (ebone!=first)); ebone=ebone->next) {
+ for (ebone = arm->edbo->first; ((ebone) && (ebone != first)); ebone = ebone->next) {
if (EBONE_VISIBLE(arm, ebone)) {
/* we extrude per definition the tip */
- do_extrude= 0;
- if (ebone->flag & (BONE_TIPSEL|BONE_SELECTED))
- do_extrude= 1;
+ do_extrude = 0;
+ if (ebone->flag & (BONE_TIPSEL | BONE_SELECTED))
+ do_extrude = 1;
else if (ebone->flag & BONE_ROOTSEL) {
/* but, a bone with parent deselected we do the root... */
- if (ebone->parent && (ebone->parent->flag & BONE_TIPSEL));
- else do_extrude= 2;
+ if (ebone->parent && (ebone->parent->flag & BONE_TIPSEL)) ;
+ else do_extrude = 2;
}
if (do_extrude) {
/* we re-use code for mirror editing... */
- flipbone= NULL;
+ flipbone = NULL;
if (arm->flag & ARM_MIRROR_EDIT) {
- flipbone= ED_armature_bone_get_mirrored(arm->edbo, ebone);
+ flipbone = ED_armature_bone_get_mirrored(arm->edbo, ebone);
if (flipbone) {
- forked= 0; // we extrude 2 different bones
- if (flipbone->flag & (BONE_TIPSEL|BONE_ROOTSEL|BONE_SELECTED))
+ forked = 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);
+ flipbone->flag &= ~(BONE_TIPSEL | BONE_SELECTED | BONE_ROOTSEL);
}
- if ((flipbone==NULL) && (forked))
- flipbone= ebone;
+ if ((flipbone == NULL) && (forked))
+ flipbone = ebone;
}
- for (a=0; a<2; a++) {
- if (a==1) {
- if (flipbone==NULL)
+ for (a = 0; a < 2; a++) {
+ if (a == 1) {
+ if (flipbone == NULL)
break;
else {
SWAP(EditBone *, flipbone, ebone);
@@ -3359,43 +3361,43 @@ static int armature_extrude_exec(bContext *C, wmOperator *op)
totbone++;
newbone = MEM_callocN(sizeof(EditBone), "extrudebone");
- if (do_extrude==1) {
+ if (do_extrude == 1) {
copy_v3_v3(newbone->head, ebone->tail);
copy_v3_v3(newbone->tail, newbone->head);
newbone->parent = ebone;
- newbone->flag = ebone->flag & BONE_TIPSEL; // copies it, in case mirrored bone
+ newbone->flag = ebone->flag & BONE_TIPSEL; // copies it, in case mirrored bone
if (newbone->parent) newbone->flag |= BONE_CONNECTED;
}
else {
copy_v3_v3(newbone->head, ebone->head);
copy_v3_v3(newbone->tail, ebone->head);
- newbone->parent= ebone->parent;
+ newbone->parent = ebone->parent;
- newbone->flag= BONE_TIPSEL;
+ newbone->flag = BONE_TIPSEL;
if (newbone->parent && (ebone->flag & BONE_CONNECTED)) {
newbone->flag |= BONE_CONNECTED;
}
}
- newbone->weight= ebone->weight;
- newbone->dist= ebone->dist;
- newbone->xwidth= ebone->xwidth;
- newbone->zwidth= ebone->zwidth;
- newbone->ease1= ebone->ease1;
- newbone->ease2= ebone->ease2;
- newbone->rad_head= ebone->rad_tail; // don't copy entire bone...
- newbone->rad_tail= ebone->rad_tail;
- newbone->segments= 1;
- newbone->layer= ebone->layer;
-
- BLI_strncpy (newbone->name, ebone->name, sizeof(newbone->name));
-
- if (flipbone && forked) { // only set if mirror edit
- if (strlen(newbone->name)<30) {
- if (a==0) strcat(newbone->name, "_L");
+ newbone->weight = ebone->weight;
+ newbone->dist = ebone->dist;
+ newbone->xwidth = ebone->xwidth;
+ newbone->zwidth = ebone->zwidth;
+ newbone->ease1 = ebone->ease1;
+ newbone->ease2 = ebone->ease2;
+ newbone->rad_head = ebone->rad_tail; // don't copy entire bone...
+ newbone->rad_tail = ebone->rad_tail;
+ newbone->segments = 1;
+ newbone->layer = ebone->layer;
+
+ BLI_strncpy(newbone->name, ebone->name, sizeof(newbone->name));
+
+ if (flipbone && forked) { // only set if mirror edit
+ if (strlen(newbone->name) < 30) {
+ if (a == 0) strcat(newbone->name, "_L");
else strcat(newbone->name, "_R");
}
}
@@ -3407,24 +3409,24 @@ static int armature_extrude_exec(bContext *C, wmOperator *op)
first = newbone;
/* restore ebone if we were flipping */
- if (a==1 && flipbone)
+ if (a == 1 && flipbone)
SWAP(EditBone *, flipbone, ebone);
}
}
/* Deselect the old bone */
- ebone->flag &= ~(BONE_TIPSEL|BONE_SELECTED|BONE_ROOTSEL);
+ ebone->flag &= ~(BONE_TIPSEL | BONE_SELECTED | BONE_ROOTSEL);
}
}
/* if only one bone, make this one active */
- if (totbone==1 && first) arm->act_edbone= first;
+ if (totbone == 1 && first) arm->act_edbone = first;
- if (totbone==0) return OPERATOR_CANCELLED;
+ if (totbone == 0) return OPERATOR_CANCELLED;
/* Transform the endpoints */
ED_armature_sync_selection(arm->edbo);
- WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, obedit);
+ WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -3441,7 +3443,7 @@ void ARMATURE_OT_extrude(wmOperatorType *ot)
ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* props */
RNA_def_boolean(ot->srna, "forked", 0, "Forked", "");
@@ -3452,7 +3454,7 @@ void ARMATURE_OT_extrude(wmOperatorType *ot)
static int armature_bone_primitive_add_exec(bContext *C, wmOperator *op)
{
- RegionView3D *rv3d= CTX_wm_region_view3d(C);
+ RegionView3D *rv3d = CTX_wm_region_view3d(C);
Object *obedit = CTX_data_edit_object(C);
EditBone *bone;
float obmat[3][3], curs[3], viewmat[3][3], totmat[3][3], imat[3][3];
@@ -3460,7 +3462,7 @@ static int armature_bone_primitive_add_exec(bContext *C, wmOperator *op)
RNA_string_get(op->ptr, "name", name);
- copy_v3_v3(curs, give_cursor(CTX_data_scene(C),CTX_wm_view3d(C)));
+ copy_v3_v3(curs, give_cursor(CTX_data_scene(C), CTX_wm_view3d(C)));
/* Get inverse point for head and orientation for tail */
invert_m4_m4(obedit->imat, obedit->obmat);
@@ -3477,17 +3479,17 @@ static int armature_bone_primitive_add_exec(bContext *C, wmOperator *op)
ED_armature_deselect_all(obedit, 0);
/* Create a bone */
- bone= ED_armature_edit_bone_add(obedit->data, name);
+ bone = ED_armature_edit_bone_add(obedit->data, name);
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
/* note, notifier might evolve */
- WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, obedit);
+ WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -3504,7 +3506,7 @@ void ARMATURE_OT_bone_primitive_add(wmOperatorType *ot)
ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_string(ot->srna, "name", "Bone", MAXBONENAME, "Name", "Name of the newly created bone");
@@ -3521,28 +3523,28 @@ void ARMATURE_OT_bone_primitive_add(wmOperatorType *ot)
static int armature_subdivide_exec(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_edit_object(C);
- bArmature *arm= obedit->data;
+ Object *obedit = CTX_data_edit_object(C);
+ bArmature *arm = obedit->data;
EditBone *newbone, *tbone;
int numcuts, i;
/* there may not be a number_cuts property defined (for 'simple' subdivide) */
- numcuts= RNA_int_get(op->ptr, "number_cuts");
+ numcuts = RNA_int_get(op->ptr, "number_cuts");
/* loop over all editable bones */
// XXX the old code did this in reverse order though!
- CTX_DATA_BEGIN(C, EditBone *, ebone, selected_editable_bones)
+ CTX_DATA_BEGIN (C, EditBone *, ebone, selected_editable_bones)
{
- for (i=numcuts+1; i>1; i--) {
+ for (i = numcuts + 1; i > 1; i--) {
/* compute cut ratio first */
- float cutratio= 1.0f / (float)i;
- float cutratioI= 1.0f - cutratio;
+ float cutratio = 1.0f / (float)i;
+ float cutratioI = 1.0f - cutratio;
float val1[3];
float val2[3];
float val3[3];
- newbone= MEM_mallocN(sizeof(EditBone), "ebone subdiv");
+ newbone = MEM_mallocN(sizeof(EditBone), "ebone subdiv");
*newbone = *ebone;
BLI_addtail(arm->edbo, newbone);
@@ -3551,33 +3553,33 @@ static int armature_subdivide_exec(bContext *C, wmOperator *op)
copy_v3_v3(val2, ebone->tail);
copy_v3_v3(val3, newbone->head);
- val3[0]= val1[0]*cutratio + val2[0]*cutratioI;
- val3[1]= val1[1]*cutratio + val2[1]*cutratioI;
- val3[2]= val1[2]*cutratio + val2[2]*cutratioI;
+ val3[0] = val1[0] * cutratio + val2[0] * cutratioI;
+ val3[1] = val1[1] * cutratio + val2[1] * cutratioI;
+ val3[2] = val1[2] * cutratio + val2[2] * cutratioI;
copy_v3_v3(newbone->head, val3);
copy_v3_v3(newbone->tail, ebone->tail);
copy_v3_v3(ebone->tail, newbone->head);
- newbone->rad_head= 0.5f * (ebone->rad_head + ebone->rad_tail);
- ebone->rad_tail= newbone->rad_head;
+ newbone->rad_head = 0.5f * (ebone->rad_head + ebone->rad_tail);
+ ebone->rad_tail = newbone->rad_head;
newbone->flag |= BONE_CONNECTED;
unique_editbone_name(arm->edbo, newbone->name, NULL);
/* correct parent bones */
- for (tbone = arm->edbo->first; tbone; tbone=tbone->next) {
- if (tbone->parent==ebone)
- tbone->parent= newbone;
+ for (tbone = arm->edbo->first; tbone; tbone = tbone->next) {
+ if (tbone->parent == ebone)
+ tbone->parent = newbone;
}
- newbone->parent= ebone;
+ newbone->parent = ebone;
}
}
CTX_DATA_END;
/* note, notifier might evolve */
- WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, obedit);
+ WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -3596,7 +3598,7 @@ void ARMATURE_OT_subdivide(wmOperatorType *ot)
ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* Properties */
prop = RNA_def_int(ot->srna, "number_cuts", 1, 1, INT_MAX, "Number of Cuts", "", 1, 10);
@@ -3614,8 +3616,8 @@ void ARMATURE_OT_subdivide(wmOperatorType *ot)
static int armature_switch_direction_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *ob= CTX_data_edit_object(C);
- bArmature *arm= (bArmature *)ob->data;
+ Object *ob = CTX_data_edit_object(C);
+ bArmature *arm = (bArmature *)ob->data;
ListBase chains = {NULL, NULL};
LinkData *chain;
@@ -3626,16 +3628,16 @@ static int armature_switch_direction_exec(bContext *C, wmOperator *UNUSED(op))
armature_tag_select_mirrored(arm);
/* loop over chains, only considering selected and visible bones */
- for (chain= chains.first; chain; chain= chain->next) {
- EditBone *ebo, *child=NULL, *parent=NULL;
+ for (chain = chains.first; chain; chain = chain->next) {
+ EditBone *ebo, *child = NULL, *parent = NULL;
/* loop over bones in chain */
- for (ebo= chain->data; ebo; ebo= parent) {
+ for (ebo = chain->data; ebo; ebo = parent) {
/* parent is this bone's original parent
* - we store this, as the next bone that is checked is this one
* but the value of ebo->parent may change here...
*/
- parent= ebo->parent;
+ parent = ebo->parent;
/* only if selected and editable */
if (EBONE_VISIBLE(arm, ebo) && EBONE_EDITABLE(ebo)) {
@@ -3648,7 +3650,7 @@ static int armature_switch_direction_exec(bContext *C, wmOperator *UNUSED(op))
* - use 'child' as new parent
* - connected flag is only set if points are coincidental
*/
- ebo->parent= child;
+ ebo->parent = child;
if ((child) && equals_v3v3(ebo->head, child->tail))
ebo->flag |= BONE_CONNECTED;
else
@@ -3657,14 +3659,14 @@ static int armature_switch_direction_exec(bContext *C, wmOperator *UNUSED(op))
/* get next bones
* - child will become the new parent of next bone
*/
- child= ebo;
+ child = ebo;
}
else {
/* not swapping this bone, however, if its 'parent' got swapped, unparent us from it
* as it will be facing in opposite direction
*/
if ((parent) && (EBONE_VISIBLE(arm, parent) && EBONE_EDITABLE(parent))) {
- ebo->parent= NULL;
+ ebo->parent = NULL;
ebo->flag &= ~BONE_CONNECTED;
}
@@ -3672,7 +3674,7 @@ static int armature_switch_direction_exec(bContext *C, wmOperator *UNUSED(op))
* - child will become new parent of next bone (not swapping occurred,
* so set to NULL to prevent infinite-loop)
*/
- child= NULL;
+ child = NULL;
}
}
}
@@ -3683,7 +3685,7 @@ static int armature_switch_direction_exec(bContext *C, wmOperator *UNUSED(op))
armature_tag_unselect(arm);
/* note, notifier might evolve */
- WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, ob);
return OPERATOR_FINISHED;
}
@@ -3700,13 +3702,13 @@ void ARMATURE_OT_switch_direction(wmOperatorType *ot)
ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ***************** Parenting *********************** */
/* armature parenting options */
#define ARM_PAR_CONNECT 1
-#define ARM_PAR_OFFSET 2
+#define ARM_PAR_OFFSET 2
/* check for null, before calling! */
static void bone_connect_to_existing_parent(EditBone *bone)
@@ -3725,12 +3727,12 @@ static void bone_connect_to_new_parent(ListBase *edbo, EditBone *selbone, EditBo
selbone->parent->flag &= ~(BONE_TIPSEL);
/* make actbone the parent of selbone */
- selbone->parent= actbone;
+ selbone->parent = actbone;
/* in actbone tree we cannot have a loop */
- for (ebone= actbone->parent; ebone; ebone= ebone->parent) {
- if (ebone->parent==selbone) {
- ebone->parent= NULL;
+ for (ebone = actbone->parent; ebone; ebone = ebone->parent) {
+ if (ebone->parent == selbone) {
+ ebone->parent = NULL;
ebone->flag &= ~BONE_CONNECTED;
}
}
@@ -3741,16 +3743,16 @@ static void bone_connect_to_new_parent(ListBase *edbo, EditBone *selbone, EditBo
sub_v3_v3v3(offset, actbone->tail, selbone->head);
copy_v3_v3(selbone->head, actbone->tail);
- selbone->rad_head= actbone->rad_tail;
+ selbone->rad_head = actbone->rad_tail;
add_v3_v3(selbone->tail, offset);
/* offset for all its children */
- for (ebone = edbo->first; ebone; ebone=ebone->next) {
+ for (ebone = edbo->first; ebone; ebone = ebone->next) {
EditBone *par;
- for (par= ebone->parent; par; par= par->parent) {
- if (par==selbone) {
+ for (par = ebone->parent; par; par = par->parent) {
+ if (par == selbone) {
add_v3_v3(ebone->head, offset);
add_v3_v3(ebone->tail, offset);
break;
@@ -3772,8 +3774,8 @@ static EnumPropertyItem prop_editarm_make_parent_types[] = {
static int armature_parent_set_exec(bContext *C, wmOperator *op)
{
- Object *ob= CTX_data_edit_object(C);
- bArmature *arm= (bArmature *)ob->data;
+ Object *ob = CTX_data_edit_object(C);
+ bArmature *arm = (bArmature *)ob->data;
EditBone *actbone = CTX_data_active_bone(C);
EditBone *actmirb = NULL;
short val = RNA_enum_get(op->ptr, "type");
@@ -3791,9 +3793,9 @@ static int armature_parent_set_exec(bContext *C, wmOperator *op)
* - if there's no mirrored copy of actbone (i.e. actbone = "parent.C" or "parent")
* then just use actbone. Useful when doing upper arm to spine.
*/
- actmirb= ED_armature_bone_get_mirrored(arm->edbo, actbone);
+ actmirb = ED_armature_bone_get_mirrored(arm->edbo, actbone);
if (actmirb == NULL)
- actmirb= actbone;
+ actmirb = actbone;
}
/* if there is only 1 selected bone, we assume that that is the active bone,
@@ -3815,12 +3817,13 @@ static int armature_parent_set_exec(bContext *C, wmOperator *op)
* - the context iterator contains both selected bones and their mirrored copies,
* so we assume that unselected bones are mirrored copies of some selected bone
* - since the active one (and/or its mirror) will also be selected, we also need
- * to check that we are not trying to operate on them, since such an operation
+ * to check that we are not trying to operate on them, since such an operation
* would cause errors
*/
/* parent selected bones to the active one */
- CTX_DATA_BEGIN(C, EditBone *, ebone, selected_editable_bones) {
+ CTX_DATA_BEGIN (C, EditBone *, ebone, selected_editable_bones)
+ {
if (ELEM(ebone, actbone, actmirb) == 0) {
if (ebone->flag & BONE_SELECTED)
bone_connect_to_new_parent(arm->edbo, ebone, actbone, val);
@@ -3833,7 +3836,7 @@ static int armature_parent_set_exec(bContext *C, wmOperator *op)
/* note, notifier might evolve */
- WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, ob);
return OPERATOR_FINISHED;
}
@@ -3841,13 +3844,14 @@ static int armature_parent_set_exec(bContext *C, wmOperator *op)
static int armature_parent_set_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(event))
{
EditBone *actbone = CTX_data_active_bone(C);
- uiPopupMenu *pup= uiPupMenuBegin(C, "Make Parent ", ICON_NONE);
- uiLayout *layout= uiPupMenuLayout(pup);
+ uiPopupMenu *pup = uiPupMenuBegin(C, "Make Parent ", ICON_NONE);
+ uiLayout *layout = uiPupMenuLayout(pup);
int allchildbones = 0;
- CTX_DATA_BEGIN(C, EditBone *, ebone, selected_editable_bones) {
+ CTX_DATA_BEGIN (C, EditBone *, ebone, selected_editable_bones)
+ {
if (ebone != actbone) {
- if (ebone->parent != actbone) allchildbones= 1;
+ if (ebone->parent != actbone) allchildbones = 1;
}
}
CTX_DATA_END;
@@ -3876,7 +3880,7 @@ void ARMATURE_OT_parent_set(wmOperatorType *ot)
ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_enum(ot->srna, "type", prop_editarm_make_parent_types, 0, "ParentType", "Type of parenting");
}
@@ -3894,17 +3898,18 @@ static void editbone_clear_parent(EditBone *ebone, int mode)
ebone->parent->flag &= ~(BONE_TIPSEL);
}
- if (mode==1) ebone->parent= NULL;
+ if (mode == 1) ebone->parent = NULL;
ebone->flag &= ~BONE_CONNECTED;
}
static int armature_parent_clear_exec(bContext *C, wmOperator *op)
{
- Object *ob= CTX_data_edit_object(C);
- bArmature *arm= (bArmature *)ob->data;
+ Object *ob = CTX_data_edit_object(C);
+ bArmature *arm = (bArmature *)ob->data;
int val = RNA_enum_get(op->ptr, "type");
- CTX_DATA_BEGIN(C, EditBone *, ebone, selected_editable_bones) {
+ CTX_DATA_BEGIN (C, EditBone *, ebone, selected_editable_bones)
+ {
editbone_clear_parent(ebone, val);
}
CTX_DATA_END;
@@ -3912,7 +3917,7 @@ static int armature_parent_clear_exec(bContext *C, wmOperator *op)
ED_armature_sync_selection(arm->edbo);
/* note, notifier might evolve */
- WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, ob);
return OPERATOR_FINISHED;
}
@@ -3930,7 +3935,7 @@ void ARMATURE_OT_parent_clear(wmOperatorType *ot)
ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
ot->prop = RNA_def_enum(ot->srna, "type", prop_editarm_clear_parent_types, 0, "ClearType", "What way to clear parenting");
}
@@ -3940,7 +3945,8 @@ void ARMATURE_OT_parent_clear(wmOperatorType *ot)
static int armature_select_inverse_exec(bContext *C, wmOperator *UNUSED(op))
{
/* Set the flags */
- CTX_DATA_BEGIN(C, EditBone *, ebone, visible_bones) {
+ CTX_DATA_BEGIN (C, EditBone *, ebone, visible_bones)
+ {
/* ignore bone if selection can't change */
if ((ebone->flag & BONE_UNSELECTABLE) == 0) {
/* select bone */
@@ -3949,7 +3955,7 @@ static int armature_select_inverse_exec(bContext *C, wmOperator *UNUSED(op))
}
CTX_DATA_END;
- WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, NULL);
return OPERATOR_FINISHED;
}
@@ -3966,7 +3972,7 @@ void ARMATURE_OT_select_inverse(wmOperatorType *ot)
ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int armature_de_select_all_exec(bContext *C, wmOperator *op)
@@ -3982,34 +3988,35 @@ static int armature_de_select_all_exec(bContext *C, wmOperator *op)
}
/* Set the flags */
- CTX_DATA_BEGIN(C, EditBone *, ebone, visible_bones) {
+ CTX_DATA_BEGIN (C, EditBone *, ebone, visible_bones)
+ {
/* ignore bone if selection can't change */
if ((ebone->flag & BONE_UNSELECTABLE) == 0) {
switch (action) {
- case SEL_SELECT:
- ebone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
- if (ebone->parent)
- ebone->parent->flag |= (BONE_TIPSEL);
- break;
- case SEL_DESELECT:
- ebone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
- break;
- case SEL_INVERT:
- if (ebone->flag & BONE_SELECTED) {
- ebone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
- }
- else {
+ case SEL_SELECT:
ebone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
if (ebone->parent)
ebone->parent->flag |= (BONE_TIPSEL);
- }
- break;
+ break;
+ case SEL_DESELECT:
+ ebone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
+ break;
+ case SEL_INVERT:
+ if (ebone->flag & BONE_SELECTED) {
+ ebone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
+ }
+ else {
+ ebone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
+ if (ebone->parent)
+ ebone->parent->flag |= (BONE_TIPSEL);
+ }
+ break;
}
}
}
CTX_DATA_END;
- WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, NULL);
return OPERATOR_FINISHED;
}
@@ -4026,39 +4033,224 @@ void ARMATURE_OT_select_all(wmOperatorType *ot)
ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
WM_operator_properties_select_all(ot);
}
+enum {
+ SIMEDBONE_LENGTH = 1,
+ SIMEDBONE_DIRECTION,
+ SIMEDBONE_PREFIX,
+ SIMEDBONE_SUFFIX,
+ SIMEDBONE_LAYER
+};
+
+static EnumPropertyItem prop_similar_types[] = {
+ {SIMEDBONE_LENGTH, "LENGTH", 0, "Length", ""},
+ {SIMEDBONE_DIRECTION, "DIRECTION", 0, "Direction (Y axis)", ""},
+ {SIMEDBONE_PREFIX, "PREFIX", 0, "Prefix", ""},
+ {SIMEDBONE_SUFFIX, "SUFFIX", 0, "Suffix", ""},
+ {SIMEDBONE_LAYER, "LAYER", 0, "Layer", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
+/* could be used in more places */
+static void ED_armature_edit_bone_select(EditBone *ebone)
+{
+ BLI_assert((ebone->flag & BONE_UNSELECTABLE) == 0);
+ ebone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
+
+ if ((ebone->flag & BONE_CONNECTED) && (ebone->parent != NULL)) {
+ ebone->parent->flag |= BONE_TIPSEL;
+ }
+}
+
+static void select_similar_length(bArmature *arm, EditBone *ebone_act, const float thresh)
+{
+ EditBone *ebone;
+
+ /* thresh is always relative to current length */
+ const float len_min = ebone_act->length / (1.0f + thresh);
+ const float len_max = ebone_act->length * (1.0f + thresh);
+
+ for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
+ if (EBONE_VISIBLE(arm, ebone) && (ebone->flag & BONE_UNSELECTABLE) == 0) {
+ if ((ebone->length >= len_min) &&
+ (ebone->length <= len_max))
+ {
+ ED_armature_edit_bone_select(ebone);
+ }
+ }
+ }
+}
+
+static void select_similar_direction(bArmature *arm, EditBone *ebone_act, const float thresh)
+{
+ EditBone *ebone;
+ float dir_act[3];
+ sub_v3_v3v3(dir_act, ebone_act->head, ebone_act->tail);
+
+ for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
+ if (EBONE_VISIBLE(arm, ebone) && (ebone->flag & BONE_UNSELECTABLE) == 0) {
+ float dir[3];
+ sub_v3_v3v3(dir, ebone->head, ebone->tail);
+
+ if (angle_v3v3(dir_act, dir) / (float)M_PI < thresh) {
+ ED_armature_edit_bone_select(ebone);
+ }
+ }
+ }
+}
+
+static void select_similar_layer(bArmature *arm, EditBone *ebone_act)
+{
+ EditBone *ebone;
+
+ for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
+ if (EBONE_VISIBLE(arm, ebone) && (ebone->flag & BONE_UNSELECTABLE) == 0) {
+ if (ebone->layer & ebone_act->layer) {
+ ED_armature_edit_bone_select(ebone);
+ }
+ }
+ }
+}
+
+static void select_similar_prefix(bArmature *arm, EditBone *ebone_act)
+{
+ EditBone *ebone;
+
+ char body_tmp[MAX_VGROUP_NAME];
+ char prefix_act[MAX_VGROUP_NAME];
+
+ BKE_deform_split_prefix(ebone_act->name, prefix_act, body_tmp);
+
+ if (prefix_act[0] == '\0')
+ return;
+
+ /* Find matches */
+ for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
+ if (EBONE_VISIBLE(arm, ebone) && (ebone->flag & BONE_UNSELECTABLE) == 0) {
+ char prefix_other[MAX_VGROUP_NAME];
+ BKE_deform_split_prefix(ebone->name, prefix_other, body_tmp);
+ if (!strcmp(prefix_act, prefix_other)) {
+ ED_armature_edit_bone_select(ebone);
+ }
+ }
+ }
+}
+
+static void select_similar_suffix(bArmature *arm, EditBone *ebone_act)
+{
+ EditBone *ebone;
+
+ char body_tmp[MAX_VGROUP_NAME];
+ char suffix_act[MAX_VGROUP_NAME];
+
+ BKE_deform_split_suffix(ebone_act->name, body_tmp, suffix_act);
+
+ if (suffix_act[0] == '\0')
+ return;
+
+ /* Find matches */
+ for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
+ if (EBONE_VISIBLE(arm, ebone) && (ebone->flag & BONE_UNSELECTABLE) == 0) {
+ char suffix_other[MAX_VGROUP_NAME];
+ BKE_deform_split_suffix(ebone->name, body_tmp, suffix_other);
+ if (!strcmp(suffix_act, suffix_other)) {
+ ED_armature_edit_bone_select(ebone);
+ }
+ }
+ }
+}
+
+static int armature_select_similar_exec(bContext *C, wmOperator *op)
+{
+ Object *obedit = CTX_data_edit_object(C);
+ bArmature *arm = obedit->data;
+ EditBone *ebone_act = CTX_data_active_bone(C);
+
+ /* Get props */
+ int type = RNA_enum_get(op->ptr, "type");
+ float thresh = RNA_float_get(op->ptr, "threshold");
+
+ /* Check for active bone */
+ if (ebone_act == NULL) {
+ BKE_report(op->reports, RPT_ERROR, "Operation requires an Active Bone");
+ return OPERATOR_CANCELLED;
+ }
+
+ switch (type) {
+ case SIMEDBONE_LENGTH:
+ select_similar_length(arm, ebone_act, thresh);
+ break;
+ case SIMEDBONE_DIRECTION:
+ select_similar_direction(arm, ebone_act, thresh);
+ break;
+ case SIMEDBONE_PREFIX:
+ select_similar_prefix(arm, ebone_act);
+ break;
+ case SIMEDBONE_SUFFIX:
+ select_similar_suffix(arm, ebone_act);
+ break;
+ case SIMEDBONE_LAYER:
+ select_similar_layer(arm, ebone_act);
+ break;
+ }
+
+ WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, obedit);
+
+ return OPERATOR_FINISHED;
+}
+
+void ARMATURE_OT_select_similar(wmOperatorType *ot) {
+
+ /* identifiers */
+ ot->name = "Select Similar";
+ ot->idname = "ARMATURE_OT_select_similar";
+
+ /* callback functions */
+ ot->invoke = WM_menu_invoke;
+ ot->exec = armature_select_similar_exec;
+ ot->poll = ED_operator_editarmature;
+ ot->description = "Select similar bones by property types";
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+
+ /* properties */
+ ot->prop = RNA_def_enum(ot->srna, "type", prop_similar_types, 0, "Type", "");
+ RNA_def_float(ot->srna, "threshold", 0.1f, 0.0f, 1.0f, "Threshold", "", 0.0f, 1.0f);
+}
+
/* ********************* select hierarchy operator ************** */
static int armature_select_hierarchy_exec(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_edit_object(C);
+ Object *obedit = CTX_data_edit_object(C);
Object *ob;
bArmature *arm;
EditBone *curbone, *pabone, *chbone;
int direction = RNA_enum_get(op->ptr, "direction");
int add_to_sel = RNA_boolean_get(op->ptr, "extend");
- ob= obedit;
- arm= (bArmature *)ob->data;
+ ob = obedit;
+ arm = (bArmature *)ob->data;
- for (curbone= arm->edbo->first; curbone; curbone= curbone->next) {
+ for (curbone = arm->edbo->first; curbone; curbone = curbone->next) {
/* only work on bone if it is visible and its selection can change */
- if (EBONE_VISIBLE(arm, curbone) && (curbone->flag & BONE_UNSELECTABLE)==0) {
+ if (EBONE_VISIBLE(arm, curbone) && (curbone->flag & BONE_UNSELECTABLE) == 0) {
if (curbone == arm->act_edbone) {
if (direction == BONE_SELECT_PARENT) {
if (curbone->parent == NULL) continue;
else pabone = curbone->parent;
if (EBONE_VISIBLE(arm, pabone)) {
- pabone->flag |= (BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
- arm->act_edbone= pabone;
- if (pabone->parent) pabone->parent->flag |= BONE_TIPSEL;
+ pabone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
+ arm->act_edbone = pabone;
+ if (pabone->parent) pabone->parent->flag |= BONE_TIPSEL;
- if (!add_to_sel) curbone->flag &= ~(BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
+ if (!add_to_sel) curbone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
break;
}
@@ -4067,12 +4259,12 @@ static int armature_select_hierarchy_exec(bContext *C, wmOperator *op)
chbone = editbone_get_child(arm, curbone, 1);
if (chbone == NULL) continue;
- if (EBONE_VISIBLE(arm, chbone) && (chbone->flag & BONE_UNSELECTABLE)==0) {
- chbone->flag |= (BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
- arm->act_edbone= chbone;
+ if (EBONE_VISIBLE(arm, chbone) && (chbone->flag & BONE_UNSELECTABLE) == 0) {
+ chbone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
+ arm->act_edbone = chbone;
if (!add_to_sel) {
- curbone->flag &= ~(BONE_SELECTED|BONE_ROOTSEL);
+ curbone->flag &= ~(BONE_SELECTED | BONE_ROOTSEL);
if (curbone->parent) curbone->parent->flag &= ~BONE_TIPSEL;
}
break;
@@ -4084,17 +4276,17 @@ static int armature_select_hierarchy_exec(bContext *C, wmOperator *op)
ED_armature_sync_selection(arm->edbo);
- WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, ob);
return OPERATOR_FINISHED;
}
void ARMATURE_OT_select_hierarchy(wmOperatorType *ot)
{
- static EnumPropertyItem direction_items[]= {
- {BONE_SELECT_PARENT, "PARENT", 0, "Select Parent", ""},
- {BONE_SELECT_CHILD, "CHILD", 0, "Select Child", ""},
- {0, NULL, 0, NULL, NULL}
+ static EnumPropertyItem direction_items[] = {
+ {BONE_SELECT_PARENT, "PARENT", 0, "Select Parent", ""},
+ {BONE_SELECT_CHILD, "CHILD", 0, "Select Child", ""},
+ {0, NULL, 0, NULL, NULL}
};
/* identifiers */
@@ -4107,7 +4299,7 @@ void ARMATURE_OT_select_hierarchy(wmOperatorType *ot)
ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* props */
RNA_def_enum(ot->srna, "direction", direction_items,
@@ -4137,7 +4329,7 @@ static void fix_editbone_connected_children(ListBase *edbo, EditBone *ebone)
{
EditBone *selbone;
- for (selbone = edbo->first; selbone; selbone=selbone->next) {
+ for (selbone = edbo->first; selbone; selbone = selbone->next) {
if ((selbone->parent) && (selbone->parent == ebone) && (selbone->flag & BONE_CONNECTED)) {
fix_connected_bone(selbone);
fix_editbone_connected_children(edbo, selbone);
@@ -4169,10 +4361,10 @@ static void bone_align_to_bone(ListBase *edbo, EditBone *selbone, EditBone *actb
static int armature_align_bones_exec(bContext *C, wmOperator *op)
{
- Object *ob= CTX_data_edit_object(C);
- bArmature *arm= (bArmature *)ob->data;
- EditBone *actbone= CTX_data_active_bone(C);
- EditBone *actmirb= NULL;
+ Object *ob = CTX_data_edit_object(C);
+ bArmature *arm = (bArmature *)ob->data;
+ EditBone *actbone = CTX_data_active_bone(C);
+ EditBone *actmirb = NULL;
/* there must be an active bone */
if (actbone == NULL) {
@@ -4187,9 +4379,9 @@ static int armature_align_bones_exec(bContext *C, wmOperator *op)
* - if there's no mirrored copy of actbone (i.e. actbone = "parent.C" or "parent")
* then just use actbone. Useful when doing upper arm to spine.
*/
- actmirb= ED_armature_bone_get_mirrored(arm->edbo, actbone);
+ actmirb = ED_armature_bone_get_mirrored(arm->edbo, actbone);
if (actmirb == NULL)
- actmirb= actbone;
+ actmirb = actbone;
}
/* if there is only 1 selected bone, we assume that that is the active bone,
@@ -4216,7 +4408,8 @@ static int armature_align_bones_exec(bContext *C, wmOperator *op)
*/
/* align selected bones to the active one */
- CTX_DATA_BEGIN(C, EditBone *, ebone, selected_editable_bones) {
+ CTX_DATA_BEGIN (C, EditBone *, ebone, selected_editable_bones)
+ {
if (ELEM(ebone, actbone, actmirb) == 0) {
if (ebone->flag & BONE_SELECTED)
bone_align_to_bone(arm->edbo, ebone, actbone);
@@ -4229,7 +4422,7 @@ static int armature_align_bones_exec(bContext *C, wmOperator *op)
/* note, notifier might evolve */
- WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, ob);
return OPERATOR_FINISHED;
}
@@ -4247,14 +4440,14 @@ void ARMATURE_OT_align(wmOperatorType *ot)
ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ***************** Pose tools ********************* */
// XXX bone_looper is only to be used when we want to access settings (i.e. editability/visibility/selected) that context doesn't offer
static int bone_looper(Object *ob, Bone *bone, void *data,
- int (*bone_func)(Object *, Bone *, void *))
+ int (*bone_func)(Object *, Bone *, void *))
{
/* We want to apply the function bone_func to every bone
* in an armature -- feed bone_looper the first bone and
@@ -4284,49 +4477,49 @@ static int bone_looper(Object *ob, Bone *bone, void *data,
/* assumes scene obact and basact is still on old situation */
int ED_do_pose_selectbuffer(Scene *scene, Base *base, unsigned int *buffer, short hits, short extend)
{
- Object *ob= base->object;
+ Object *ob = base->object;
Bone *nearBone;
if (!ob || !ob->pose) return 0;
- nearBone= get_bone_from_selectbuffer(scene, base, buffer, hits, 1);
+ nearBone = get_bone_from_selectbuffer(scene, base, buffer, hits, 1);
/* if the bone cannot be affected, don't do anything */
if ((nearBone) && !(nearBone->flag & BONE_UNSELECTABLE)) {
- Object *ob_act= OBACT;
- bArmature *arm= ob->data;
+ Object *ob_act = OBACT;
+ bArmature *arm = ob->data;
/* since we do unified select, we don't shift+select a bone if the
* armature object was not active yet.
* note, special exception for armature mode so we can do multi-select
* we could check for multi-select explicitly but think its fine to
* always give predictable behavior in weight paint mode - campbell */
- if (!extend || ((ob_act && (ob_act != ob) && (ob_act->mode & OB_MODE_WEIGHT_PAINT)==0))) {
+ if (!extend || ((ob_act && (ob_act != ob) && (ob_act->mode & OB_MODE_WEIGHT_PAINT) == 0))) {
ED_pose_deselectall(ob, 0);
- nearBone->flag |= (BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
- arm->act_bone= nearBone;
+ nearBone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
+ arm->act_bone = nearBone;
- // XXX old cruft! use notifiers instead
+ // XXX old cruft! use notifiers instead
//select_actionchannel_by_name(ob->action, nearBone->name, 1);
}
else {
if (nearBone->flag & BONE_SELECTED) {
/* if not active, we make it active */
if (nearBone != arm->act_bone) {
- arm->act_bone= nearBone;
+ arm->act_bone = nearBone;
}
else {
- nearBone->flag &= ~(BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
+ nearBone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
- // XXX old cruft! use notifiers instead
+ // XXX old cruft! use notifiers instead
//select_actionchannel_by_name(ob->action, nearBone->name, 0);
}
}
else {
- nearBone->flag |= (BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
- arm->act_bone= nearBone;
+ nearBone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
+ arm->act_bone = nearBone;
- // XXX old cruft! use notifiers instead
+ // XXX old cruft! use notifiers instead
//select_actionchannel_by_name(ob->action, nearBone->name, 1);
}
}
@@ -4341,7 +4534,7 @@ int ED_do_pose_selectbuffer(Scene *scene, Base *base, unsigned int *buffer, shor
}
- return nearBone!=NULL;
+ return nearBone != NULL;
}
/* test==0: deselect all
@@ -4349,18 +4542,18 @@ int ED_do_pose_selectbuffer(Scene *scene, Base *base, unsigned int *buffer, shor
* test==2: only clear active tag
* test==3: swap select (no test / inverse selection status of all independently)
*/
-void ED_pose_deselectall (Object *ob, int test)
+void ED_pose_deselectall(Object *ob, int test)
{
- bArmature *arm= ob->data;
+ bArmature *arm = ob->data;
bPoseChannel *pchan;
- int selectmode= 0;
+ int selectmode = 0;
/* we call this from outliner too */
if (ELEM(NULL, ob, ob->pose)) return;
/* Determine if we're selecting or deselecting */
- if (test==1) {
- for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
+ if (test == 1) {
+ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
if (PBONE_VISIBLE(arm, pchan->bone)) {
if (pchan->bone->flag & BONE_SELECTED)
break;
@@ -4368,21 +4561,21 @@ void ED_pose_deselectall (Object *ob, int test)
}
if (pchan == NULL)
- selectmode= 1;
+ selectmode = 1;
}
else if (test == 2)
- selectmode= 2;
+ selectmode = 2;
/* Set the flags accordingly */
- for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
+ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
/* ignore the pchan if it isn't visible or if its selection cannot be changed */
- if ((pchan->bone->layer & arm->layer) && !(pchan->bone->flag & (BONE_HIDDEN_P|BONE_UNSELECTABLE))) {
- if (test==3) {
- pchan->bone->flag ^= (BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
+ if ((pchan->bone->layer & arm->layer) && !(pchan->bone->flag & (BONE_HIDDEN_P | BONE_UNSELECTABLE))) {
+ if (test == 3) {
+ pchan->bone->flag ^= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
}
else {
- if (selectmode==0) pchan->bone->flag &= ~(BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
- else if (selectmode==1) pchan->bone->flag |= BONE_SELECTED;
+ if (selectmode == 0) pchan->bone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
+ else if (selectmode == 1) pchan->bone->flag |= BONE_SELECTED;
}
}
}
@@ -4418,7 +4611,7 @@ static int bone_skinnable_cb(Object *ob, Bone *bone, void *datap)
if (!(ob->mode & OB_MODE_WEIGHT_PAINT) || !(bone->flag & BONE_HIDDEN_P)) {
if (!(bone->flag & BONE_NO_DEFORM)) {
- if (data->heat && data->armob->pose && get_pose_channel(data->armob->pose, bone->name))
+ if (data->heat && data->armob->pose && BKE_pose_channel_find_name(data->armob->pose, bone->name))
segments = bone->segments;
else
segments = 1;
@@ -4426,7 +4619,7 @@ static int bone_skinnable_cb(Object *ob, Bone *bone, void *datap)
if (data->list != NULL) {
hbone = (Bone ***) &data->list;
- for (a=0; a<segments; a++) {
+ for (a = 0; a < segments; a++) {
**hbone = bone;
++*hbone;
}
@@ -4444,7 +4637,7 @@ static int vgroup_add_unique_bone_cb(Object *ob, Bone *bone, void *UNUSED(ptr))
* If such a vertex group aleady exist the routine exits.
*/
if (!(bone->flag & BONE_NO_DEFORM)) {
- if (!defgroup_find_name(ob,bone->name)) {
+ if (!defgroup_find_name(ob, bone->name)) {
ED_vgroup_add_name(ob, bone->name);
return 1;
}
@@ -4477,15 +4670,15 @@ static int dgroup_skinnable_cb(Object *ob, Bone *bone, void *datap)
* pointers to bDeformGroups, all with names
* of skinnable bones.
*/
- bDeformGroup ***hgroup, *defgroup= NULL;
+ bDeformGroup ***hgroup, *defgroup = NULL;
int a, segments;
- struct { Object *armob; void *list; int heat; } *data= datap;
+ struct { Object *armob; void *list; int heat; } *data = datap;
int wpmode = (ob->mode & OB_MODE_WEIGHT_PAINT);
- bArmature *arm= data->armob->data;
+ bArmature *arm = data->armob->data;
if (!wpmode || !(bone->flag & BONE_HIDDEN_P)) {
- if (!(bone->flag & BONE_NO_DEFORM)) {
- if (data->heat && data->armob->pose && get_pose_channel(data->armob->pose, bone->name))
+ if (!(bone->flag & BONE_NO_DEFORM)) {
+ if (data->heat && data->armob->pose && BKE_pose_channel_find_name(data->armob->pose, bone->name))
segments = bone->segments;
else
segments = 1;
@@ -4497,7 +4690,7 @@ static int dgroup_skinnable_cb(Object *ob, Bone *bone, void *datap)
if (data->list != NULL) {
hgroup = (bDeformGroup ***) &data->list;
- for (a=0; a<segments; a++) {
+ for (a = 0; a < segments; a++) {
**hgroup = defgroup;
++*hgroup;
}
@@ -4527,11 +4720,11 @@ static void envelope_bone_weighting(Object *ob, Mesh *mesh, float (*verts)[3], i
int i, iflip, j;
/* for each vertex in the mesh */
- for (i=0; i < mesh->totvert; i++) {
- iflip = (dgroupflip)? mesh_get_x_mirror_vert(ob, i): 0;
+ for (i = 0; i < mesh->totvert; i++) {
+ iflip = (dgroupflip) ? mesh_get_x_mirror_vert(ob, i) : 0;
/* for each skinnable bone */
- for (j=0; j < numbones; ++j) {
+ for (j = 0; j < numbones; ++j) {
if (!selected[j])
continue;
@@ -4539,22 +4732,22 @@ static void envelope_bone_weighting(Object *ob, Mesh *mesh, float (*verts)[3], i
dgroup = dgrouplist[j];
/* store the distance-factor from the vertex to the bone */
- distance = distfactor_to_bone (verts[i], root[j], tip[j],
- bone->rad_head * scale, bone->rad_tail * scale, bone->dist * scale);
+ distance = distfactor_to_bone(verts[i], root[j], tip[j],
+ bone->rad_head * scale, bone->rad_tail * scale, bone->dist * scale);
/* add the vert to the deform group if weight!=0.0 */
if (distance != 0.0f)
- ED_vgroup_vert_add (ob, dgroup, i, distance, WEIGHT_REPLACE);
+ ED_vgroup_vert_add(ob, dgroup, i, distance, WEIGHT_REPLACE);
else
- ED_vgroup_vert_remove (ob, dgroup, i);
+ ED_vgroup_vert_remove(ob, dgroup, i);
/* do same for mirror */
if (dgroupflip && dgroupflip[j] && iflip >= 0) {
if (distance != 0.0f)
- ED_vgroup_vert_add (ob, dgroupflip[j], iflip, distance,
- WEIGHT_REPLACE);
+ ED_vgroup_vert_add(ob, dgroupflip[j], iflip, distance,
+ WEIGHT_REPLACE);
else
- ED_vgroup_vert_remove (ob, dgroupflip[j], iflip);
+ ED_vgroup_vert_remove(ob, dgroupflip[j], iflip);
}
}
}
@@ -4574,7 +4767,7 @@ static void add_verts_to_dgroups(ReportList *reports, Scene *scene, Object *ob,
* when parenting, or simply the original mesh coords.
*/
- bArmature *arm= par->data;
+ bArmature *arm = par->data;
Bone **bonelist, *bone;
bDeformGroup **dgrouplist, **dgroupflip;
bDeformGroup *dgroup;
@@ -4588,8 +4781,8 @@ static void add_verts_to_dgroups(ReportList *reports, Scene *scene, Object *ob,
struct { Object *armob; void *list; int heat; } looper_data;
looper_data.armob = par;
- looper_data.heat= heat;
- looper_data.list= NULL;
+ looper_data.heat = heat;
+ looper_data.list = NULL;
/* count the number of skinnable bones */
numbones = bone_looper(ob, arm->bonebase.first, &looper_data, bone_skinnable_cb);
@@ -4599,26 +4792,26 @@ static void add_verts_to_dgroups(ReportList *reports, Scene *scene, Object *ob,
/* create an array of pointer to bones that are skinnable
* and fill it with all of the skinnable bones */
- bonelist = MEM_callocN(numbones*sizeof(Bone *), "bonelist");
- looper_data.list= bonelist;
+ bonelist = MEM_callocN(numbones * sizeof(Bone *), "bonelist");
+ looper_data.list = bonelist;
bone_looper(ob, arm->bonebase.first, &looper_data, bone_skinnable_cb);
/* create an array of pointers to the deform groups that
* coorespond to the skinnable bones (creating them
* as necessary. */
- dgrouplist = MEM_callocN(numbones*sizeof(bDeformGroup *), "dgrouplist");
- dgroupflip = MEM_callocN(numbones*sizeof(bDeformGroup *), "dgroupflip");
+ dgrouplist = MEM_callocN(numbones * sizeof(bDeformGroup *), "dgrouplist");
+ dgroupflip = MEM_callocN(numbones * sizeof(bDeformGroup *), "dgroupflip");
- looper_data.list= dgrouplist;
+ looper_data.list = dgrouplist;
bone_looper(ob, arm->bonebase.first, &looper_data, dgroup_skinnable_cb);
/* create an array of root and tip positions transformed into
* global coords */
- root = MEM_callocN(numbones*sizeof(float)*3, "root");
- tip = MEM_callocN(numbones*sizeof(float)*3, "tip");
- selected = MEM_callocN(numbones*sizeof(int), "selected");
+ root = MEM_callocN(numbones * sizeof(float) * 3, "root");
+ tip = MEM_callocN(numbones * sizeof(float) * 3, "tip");
+ selected = MEM_callocN(numbones * sizeof(int), "selected");
- for (j=0; j < numbones; ++j) {
+ for (j = 0; j < numbones; ++j) {
bone = bonelist[j];
dgroup = dgrouplist[j];
@@ -4628,7 +4821,7 @@ static void add_verts_to_dgroups(ReportList *reports, Scene *scene, Object *ob,
segments = 1;
bbone = NULL;
- if ((par->pose) && (pchan=get_pose_channel(par->pose, bone->name))) {
+ if ((par->pose) && (pchan = BKE_pose_channel_find_name(par->pose, bone->name))) {
if (bone->segments > 1) {
segments = bone->segments;
bbone = b_bone_spline_setup(pchan, 1);
@@ -4642,8 +4835,8 @@ static void add_verts_to_dgroups(ReportList *reports, Scene *scene, Object *ob,
/* compute root and tip */
if (bbone) {
mul_v3_m4v3(root[j], bone->arm_mat, bbone[segments].mat[3]);
- if ((segments+1) < bone->segments) {
- mul_v3_m4v3(tip[j], bone->arm_mat, bbone[segments+1].mat[3]);
+ if ((segments + 1) < bone->segments) {
+ mul_v3_m4v3(tip[j], bone->arm_mat, bbone[segments + 1].mat[3]);
}
else {
copy_v3_v3(tip[j], bone->arm_tail);
@@ -4676,15 +4869,15 @@ static void add_verts_to_dgroups(ReportList *reports, Scene *scene, Object *ob,
}
/* create verts */
- mesh = (Mesh*)ob->data;
- verts = MEM_callocN(mesh->totvert*sizeof(*verts), "closestboneverts");
+ mesh = (Mesh *)ob->data;
+ verts = MEM_callocN(mesh->totvert * sizeof(*verts), "closestboneverts");
if (wpmode) {
/* if in weight paint mode, use final verts from derivedmesh */
DerivedMesh *dm = mesh_get_derived_final(scene, ob, CD_MASK_BAREMESH);
if (dm->foreachMappedVert) {
- dm->foreachMappedVert(dm, add_vgroups__mapFunc, (void*)verts);
+ dm->foreachMappedVert(dm, add_vgroups__mapFunc, (void *)verts);
vertsfilled = 1;
}
@@ -4699,7 +4892,7 @@ static void add_verts_to_dgroups(ReportList *reports, Scene *scene, Object *ob,
}
/* transform verts to global space */
- for (i=0; i < mesh->totvert; i++) {
+ for (i = 0; i < mesh->totvert; i++) {
if (!vertsfilled)
copy_v3_v3(verts[i], mesh->mvert[i].co);
mul_m4_v3(ob->obmat, verts[i]);
@@ -4707,9 +4900,9 @@ static void add_verts_to_dgroups(ReportList *reports, Scene *scene, Object *ob,
/* compute the weights based on gathered vertices and bones */
if (heat) {
- const char *error= NULL;
+ const char *error = NULL;
heat_bone_weighting(ob, mesh, verts, numbones, dgrouplist, dgroupflip,
- root, tip, selected, &error);
+ root, tip, selected, &error);
if (error) {
BKE_report(reports, RPT_WARNING, error);
@@ -4717,7 +4910,7 @@ static void add_verts_to_dgroups(ReportList *reports, Scene *scene, Object *ob,
}
else {
envelope_bone_weighting(ob, mesh, verts, numbones, bonelist, dgrouplist,
- dgroupflip, root, tip, selected, mat4_to_scale(par->obmat));
+ dgroupflip, root, tip, selected, mat4_to_scale(par->obmat));
}
/* only generated in some cases but can call anyway */
@@ -4738,7 +4931,7 @@ void create_vgroups_from_armature(ReportList *reports, Scene *scene, Object *ob,
/* Lets try to create some vertex groups
* based on the bones of the parent armature.
*/
- bArmature *arm= par->data;
+ bArmature *arm = par->data;
if (mode == ARM_GROUPS_NAME) {
/* Traverse the bone list, trying to create empty vertex
@@ -4762,41 +4955,41 @@ void create_vgroups_from_armature(ReportList *reports, Scene *scene, Object *ob,
/* clear scale of pose-channel */
static void pchan_clear_scale(bPoseChannel *pchan)
{
- if ((pchan->protectflag & OB_LOCK_SCALEX)==0)
- pchan->size[0]= 1.0f;
- if ((pchan->protectflag & OB_LOCK_SCALEY)==0)
- pchan->size[1]= 1.0f;
- if ((pchan->protectflag & OB_LOCK_SCALEZ)==0)
- pchan->size[2]= 1.0f;
+ if ((pchan->protectflag & OB_LOCK_SCALEX) == 0)
+ pchan->size[0] = 1.0f;
+ if ((pchan->protectflag & OB_LOCK_SCALEY) == 0)
+ pchan->size[1] = 1.0f;
+ if ((pchan->protectflag & OB_LOCK_SCALEZ) == 0)
+ pchan->size[2] = 1.0f;
}
/* clear location of pose-channel */
static void pchan_clear_loc(bPoseChannel *pchan)
{
- if ((pchan->protectflag & OB_LOCK_LOCX)==0)
- pchan->loc[0]= 0.0f;
- if ((pchan->protectflag & OB_LOCK_LOCY)==0)
- pchan->loc[1]= 0.0f;
- if ((pchan->protectflag & OB_LOCK_LOCZ)==0)
- pchan->loc[2]= 0.0f;
+ if ((pchan->protectflag & OB_LOCK_LOCX) == 0)
+ pchan->loc[0] = 0.0f;
+ if ((pchan->protectflag & OB_LOCK_LOCY) == 0)
+ pchan->loc[1] = 0.0f;
+ if ((pchan->protectflag & OB_LOCK_LOCZ) == 0)
+ pchan->loc[2] = 0.0f;
}
/* clear rotation of pose-channel */
static void pchan_clear_rot(bPoseChannel *pchan)
{
- if (pchan->protectflag & (OB_LOCK_ROTX|OB_LOCK_ROTY|OB_LOCK_ROTZ|OB_LOCK_ROTW)) {
+ if (pchan->protectflag & (OB_LOCK_ROTX | OB_LOCK_ROTY | OB_LOCK_ROTZ | OB_LOCK_ROTW)) {
/* check if convert to eulers for locking... */
if (pchan->protectflag & OB_LOCK_ROT4D) {
/* perform clamping on a component by component basis */
if (pchan->rotmode == ROT_MODE_AXISANGLE) {
if ((pchan->protectflag & OB_LOCK_ROTW) == 0)
- pchan->rotAngle= 0.0f;
+ pchan->rotAngle = 0.0f;
if ((pchan->protectflag & OB_LOCK_ROTX) == 0)
- pchan->rotAxis[0]= 0.0f;
+ pchan->rotAxis[0] = 0.0f;
if ((pchan->protectflag & OB_LOCK_ROTY) == 0)
- pchan->rotAxis[1]= 0.0f;
+ pchan->rotAxis[1] = 0.0f;
if ((pchan->protectflag & OB_LOCK_ROTZ) == 0)
- pchan->rotAxis[2]= 0.0f;
+ pchan->rotAxis[2] = 0.0f;
/* check validity of axis - axis should never be 0,0,0 (if so, then we make it rotate about y) */
if (IS_EQF(pchan->rotAxis[0], pchan->rotAxis[1]) && IS_EQF(pchan->rotAxis[1], pchan->rotAxis[2]))
@@ -4804,22 +4997,22 @@ static void pchan_clear_rot(bPoseChannel *pchan)
}
else if (pchan->rotmode == ROT_MODE_QUAT) {
if ((pchan->protectflag & OB_LOCK_ROTW) == 0)
- pchan->quat[0]= 1.0f;
+ pchan->quat[0] = 1.0f;
if ((pchan->protectflag & OB_LOCK_ROTX) == 0)
- pchan->quat[1]= 0.0f;
+ pchan->quat[1] = 0.0f;
if ((pchan->protectflag & OB_LOCK_ROTY) == 0)
- pchan->quat[2]= 0.0f;
+ pchan->quat[2] = 0.0f;
if ((pchan->protectflag & OB_LOCK_ROTZ) == 0)
- pchan->quat[3]= 0.0f;
+ pchan->quat[3] = 0.0f;
}
else {
/* the flag may have been set for the other modes, so just ignore the extra flag... */
if ((pchan->protectflag & OB_LOCK_ROTX) == 0)
- pchan->eul[0]= 0.0f;
+ pchan->eul[0] = 0.0f;
if ((pchan->protectflag & OB_LOCK_ROTY) == 0)
- pchan->eul[1]= 0.0f;
+ pchan->eul[1] = 0.0f;
if ((pchan->protectflag & OB_LOCK_ROTZ) == 0)
- pchan->eul[2]= 0.0f;
+ pchan->eul[2] = 0.0f;
}
}
else {
@@ -4828,24 +5021,24 @@ static void pchan_clear_rot(bPoseChannel *pchan)
float qlen = 0.0f;
if (pchan->rotmode == ROT_MODE_QUAT) {
- qlen= normalize_qt_qt(quat1, pchan->quat);
+ qlen = normalize_qt_qt(quat1, pchan->quat);
quat_to_eul(oldeul, quat1);
}
else if (pchan->rotmode == ROT_MODE_AXISANGLE) {
- axis_angle_to_eulO( oldeul, EULER_ORDER_DEFAULT,pchan->rotAxis, pchan->rotAngle);
+ axis_angle_to_eulO(oldeul, EULER_ORDER_DEFAULT, pchan->rotAxis, pchan->rotAngle);
}
else {
copy_v3_v3(oldeul, pchan->eul);
}
- eul[0]= eul[1]= eul[2]= 0.0f;
+ eul[0] = eul[1] = eul[2] = 0.0f;
if (pchan->protectflag & OB_LOCK_ROTX)
- eul[0]= oldeul[0];
+ eul[0] = oldeul[0];
if (pchan->protectflag & OB_LOCK_ROTY)
- eul[1]= oldeul[1];
+ eul[1] = oldeul[1];
if (pchan->protectflag & OB_LOCK_ROTZ)
- eul[2]= oldeul[2];
+ eul[2] = oldeul[2];
if (pchan->rotmode == ROT_MODE_QUAT) {
eul_to_quat(pchan->quat, eul);
@@ -4854,18 +5047,18 @@ static void pchan_clear_rot(bPoseChannel *pchan)
mul_qt_fl(pchan->quat, qlen);
/* quaternions flip w sign to accumulate rotations correctly */
- if ((quat1[0]<0.0f && pchan->quat[0]>0.0f) || (quat1[0]>0.0f && pchan->quat[0]<0.0f)) {
+ if ((quat1[0] < 0.0f && pchan->quat[0] > 0.0f) || (quat1[0] > 0.0f && pchan->quat[0] < 0.0f)) {
mul_qt_fl(pchan->quat, -1.0f);
}
}
else if (pchan->rotmode == ROT_MODE_AXISANGLE) {
- eulO_to_axis_angle( pchan->rotAxis, &pchan->rotAngle,eul, EULER_ORDER_DEFAULT);
+ eulO_to_axis_angle(pchan->rotAxis, &pchan->rotAngle, eul, EULER_ORDER_DEFAULT);
}
else {
copy_v3_v3(pchan->eul, eul);
}
}
- } // Duplicated in source/blender/editors/object/object_transform.c
+ } /* Duplicated in source/blender/editors/object/object_transform.c */
else {
if (pchan->rotmode == ROT_MODE_QUAT) {
unit_qt(pchan->quat);
@@ -4892,10 +5085,10 @@ static void pchan_clear_transforms(bPoseChannel *pchan)
/* generic exec for clear-pose operators */
static int pose_clear_transform_generic_exec(bContext *C, wmOperator *op,
- void (*clear_func)(bPoseChannel*), const char default_ksName[])
+ void (*clear_func)(bPoseChannel *), const char default_ksName[])
{
- Scene *scene= CTX_data_scene(C);
- Object *ob= object_pose_armature_get(CTX_data_active_object(C));
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
short autokey = 0;
/* sanity checks */
@@ -4905,7 +5098,7 @@ static int pose_clear_transform_generic_exec(bContext *C, wmOperator *op,
}
/* only clear relevant transforms for selected bones */
- CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones)
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones)
{
/* run provided clearing function */
clear_func(pchan);
@@ -4943,7 +5136,7 @@ static int pose_clear_transform_generic_exec(bContext *C, wmOperator *op,
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
/* note, notifier might evolve */
- WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, ob);
return OPERATOR_FINISHED;
}
@@ -4967,7 +5160,7 @@ void POSE_OT_scale_clear(wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
@@ -4988,7 +5181,7 @@ void POSE_OT_rot_clear(wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
@@ -5009,7 +5202,7 @@ void POSE_OT_loc_clear(wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
@@ -5030,7 +5223,7 @@ void POSE_OT_transforms_clear(wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ***************** selections ********************** */
@@ -5039,37 +5232,38 @@ static int pose_de_select_all_exec(bContext *C, wmOperator *op)
{
int action = RNA_enum_get(op->ptr, "action");
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
int multipaint = scene->toolsettings->multipaint;
if (action == SEL_TOGGLE) {
- action= CTX_DATA_COUNT(C, selected_pose_bones) ? SEL_DESELECT : SEL_SELECT;
+ action = CTX_DATA_COUNT(C, selected_pose_bones) ? SEL_DESELECT : SEL_SELECT;
}
/* Set the flags */
- CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pose_bones) {
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, visible_pose_bones)
+ {
/* select pchan only if selectable, but deselect works always */
switch (action) {
- case SEL_SELECT:
- if ((pchan->bone->flag & BONE_UNSELECTABLE)==0)
- pchan->bone->flag |= BONE_SELECTED;
- break;
- case SEL_DESELECT:
- pchan->bone->flag &= ~(BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
- break;
- case SEL_INVERT:
- if (pchan->bone->flag & BONE_SELECTED) {
- pchan->bone->flag &= ~(BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
- }
- else if ((pchan->bone->flag & BONE_UNSELECTABLE)==0) {
+ case SEL_SELECT:
+ if ((pchan->bone->flag & BONE_UNSELECTABLE) == 0)
pchan->bone->flag |= BONE_SELECTED;
- }
- break;
+ break;
+ case SEL_DESELECT:
+ pchan->bone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
+ break;
+ case SEL_INVERT:
+ if (pchan->bone->flag & BONE_SELECTED) {
+ pchan->bone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
+ }
+ else if ((pchan->bone->flag & BONE_UNSELECTABLE) == 0) {
+ pchan->bone->flag |= BONE_SELECTED;
+ }
+ break;
}
}
CTX_DATA_END;
- WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, NULL);
if (multipaint) {
Object *ob = ED_object_context(C);
@@ -5091,24 +5285,24 @@ void POSE_OT_select_all(wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
WM_operator_properties_select_all(ot);
}
static int pose_select_parent_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *ob= object_pose_armature_get(CTX_data_active_object(C));
- bPoseChannel *pchan,*parent;
+ Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
+ bPoseChannel *pchan, *parent;
/* Determine if there is an active bone */
- pchan=CTX_data_active_pose_bone(C);
+ pchan = CTX_data_active_pose_bone(C);
if (pchan) {
- bArmature *arm= ob->data;
- parent=pchan->parent;
- if ((parent) && !(parent->bone->flag & (BONE_HIDDEN_P|BONE_UNSELECTABLE))) {
+ bArmature *arm = ob->data;
+ parent = pchan->parent;
+ if ((parent) && !(parent->bone->flag & (BONE_HIDDEN_P | BONE_UNSELECTABLE))) {
parent->bone->flag |= BONE_SELECTED;
- arm->act_bone= parent->bone;
+ arm->act_bone = parent->bone;
}
else {
return OPERATOR_CANCELLED;
@@ -5118,7 +5312,7 @@ static int pose_select_parent_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
}
- WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, ob);
return OPERATOR_FINISHED;
}
@@ -5135,7 +5329,7 @@ void POSE_OT_select_parent(wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
@@ -5143,14 +5337,14 @@ void POSE_OT_select_parent(wmOperatorType *ot)
static int hide_selected_pose_bone_cb(Object *ob, Bone *bone, void *UNUSED(ptr))
{
- bArmature *arm= ob->data;
+ bArmature *arm = ob->data;
if (arm->layer & bone->layer) {
if (bone->flag & BONE_SELECTED) {
bone->flag |= BONE_HIDDEN_P;
bone->flag &= ~BONE_SELECTED;
- if (arm->act_bone==bone)
- arm->act_bone= NULL;
+ if (arm->act_bone == bone)
+ arm->act_bone = NULL;
}
}
return 0;
@@ -5158,14 +5352,14 @@ static int hide_selected_pose_bone_cb(Object *ob, Bone *bone, void *UNUSED(ptr))
static int hide_unselected_pose_bone_cb(Object *ob, Bone *bone, void *UNUSED(ptr))
{
- bArmature *arm= ob->data;
+ bArmature *arm = ob->data;
if (arm->layer & bone->layer) {
// hrm... typo here?
- if ((bone->flag & BONE_SELECTED)==0) {
+ if ((bone->flag & BONE_SELECTED) == 0) {
bone->flag |= BONE_HIDDEN_P;
- if (arm->act_bone==bone)
- arm->act_bone= NULL;
+ if (arm->act_bone == bone)
+ arm->act_bone = NULL;
}
}
return 0;
@@ -5174,8 +5368,8 @@ static int hide_unselected_pose_bone_cb(Object *ob, Bone *bone, void *UNUSED(ptr
/* active object is armature in posemode, poll checked */
static int pose_hide_exec(bContext *C, wmOperator *op)
{
- Object *ob= object_pose_armature_get(CTX_data_active_object(C));
- bArmature *arm= ob->data;
+ Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
+ bArmature *arm = ob->data;
if (RNA_boolean_get(op->ptr, "unselected"))
bone_looper(ob, arm->bonebase.first, NULL, hide_unselected_pose_bone_cb);
@@ -5183,7 +5377,7 @@ static int pose_hide_exec(bContext *C, wmOperator *op)
bone_looper(ob, arm->bonebase.first, NULL, hide_selected_pose_bone_cb);
/* note, notifier might evolve */
- WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, ob);
return OPERATOR_FINISHED;
}
@@ -5200,7 +5394,7 @@ void POSE_OT_hide(wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* props */
RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "");
@@ -5208,7 +5402,7 @@ void POSE_OT_hide(wmOperatorType *ot)
static int show_pose_bone_cb(Object *ob, Bone *bone, void *UNUSED(ptr))
{
- bArmature *arm= ob->data;
+ bArmature *arm = ob->data;
if (arm->layer & bone->layer) {
if (bone->flag & BONE_HIDDEN_P) {
@@ -5223,13 +5417,13 @@ static int show_pose_bone_cb(Object *ob, Bone *bone, void *UNUSED(ptr))
/* active object is armature in posemode, poll checked */
static int pose_reveal_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *ob= object_pose_armature_get(CTX_data_active_object(C));
- bArmature *arm= ob->data;
+ Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
+ bArmature *arm = ob->data;
bone_looper(ob, arm->bonebase.first, NULL, show_pose_bone_cb);
/* note, notifier might evolve */
- WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, ob);
return OPERATOR_FINISHED;
}
@@ -5246,14 +5440,14 @@ void POSE_OT_reveal(wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ************* RENAMING DISASTERS ************ */
static int bone_unique_check(void *arg, const char *name)
{
- return get_named_bone((bArmature *)arg, name) != NULL;
+ return BKE_armature_find_bone_name((bArmature *)arg, name) != NULL;
}
static void unique_bone_name(bArmature *arm, char *name)
@@ -5267,14 +5461,14 @@ static void constraint_bone_name_fix(Object *ob, ListBase *conlist, char *oldnam
bConstraint *curcon;
bConstraintTarget *ct;
- for (curcon = conlist->first; curcon; curcon=curcon->next) {
- bConstraintTypeInfo *cti= constraint_get_typeinfo(curcon);
+ for (curcon = conlist->first; curcon; curcon = curcon->next) {
+ bConstraintTypeInfo *cti = constraint_get_typeinfo(curcon);
ListBase targets = {NULL, NULL};
if (cti && cti->get_constraint_targets) {
cti->get_constraint_targets(curcon, &targets);
- for (ct= targets.first; ct; ct= ct->next) {
+ for (ct = targets.first; ct; ct = ct->next) {
if (ct->tar == ob) {
if (!strcmp(ct->subtarget, oldname) )
BLI_strncpy(ct->subtarget, newname, MAXBONENAME);
@@ -5306,7 +5500,7 @@ void ED_armature_bone_rename(bArmature *arm, const char *oldnamep, const char *n
/* now check if we're in editmode, we need to find the unique name */
if (arm->edbo) {
- EditBone *eBone= editbone_name_exists(arm->edbo, oldname);
+ EditBone *eBone = editbone_name_exists(arm->edbo, oldname);
if (eBone) {
unique_editbone_name(arm->edbo, newname, NULL);
@@ -5315,7 +5509,7 @@ void ED_armature_bone_rename(bArmature *arm, const char *oldnamep, const char *n
else return;
}
else {
- Bone *bone= get_named_bone(arm, oldname);
+ Bone *bone = BKE_armature_find_bone_name(arm, oldname);
if (bone) {
unique_bone_name(arm, newname);
@@ -5325,16 +5519,16 @@ void ED_armature_bone_rename(bArmature *arm, const char *oldnamep, const char *n
}
/* do entire dbase - objects */
- for (ob= G.main->object.first; ob; ob= ob->id.next) {
+ for (ob = G.main->object.first; ob; ob = ob->id.next) {
ModifierData *md;
/* we have the object using the armature */
- if (arm==ob->data) {
+ if (arm == ob->data) {
Object *cob;
/* Rename the pose channel, if it exists */
if (ob->pose) {
- bPoseChannel *pchan = get_pose_channel(ob->pose, oldname);
+ bPoseChannel *pchan = BKE_pose_channel_find_name(ob->pose, oldname);
if (pchan) {
BLI_strncpy(pchan->name, newname, MAXBONENAME);
@@ -5349,12 +5543,12 @@ void ED_armature_bone_rename(bArmature *arm, const char *oldnamep, const char *n
}
/* Update any object constraints to use the new bone name */
- for (cob= G.main->object.first; cob; cob= cob->id.next) {
+ for (cob = G.main->object.first; cob; cob = cob->id.next) {
if (cob->constraints.first)
constraint_bone_name_fix(ob, &cob->constraints, oldname, newname);
if (cob->pose) {
bPoseChannel *pchan;
- for (pchan = cob->pose->chanbase.first; pchan; pchan=pchan->next) {
+ for (pchan = cob->pose->chanbase.first; pchan; pchan = pchan->next) {
constraint_bone_name_fix(ob, &pchan->constraints, oldname, newname);
}
}
@@ -5363,7 +5557,7 @@ void ED_armature_bone_rename(bArmature *arm, const char *oldnamep, const char *n
/* See if an object is parented to this armature */
if (ob->parent && (ob->parent->data == arm)) {
- if (ob->partype==PARBONE) {
+ if (ob->partype == PARBONE) {
/* bone name in object */
if (!strcmp(ob->parsubstr, oldname))
BLI_strncpy(ob->parsubstr, newname, MAXBONENAME);
@@ -5371,14 +5565,14 @@ void ED_armature_bone_rename(bArmature *arm, const char *oldnamep, const char *n
}
if (modifiers_usesArmature(ob, arm)) {
- bDeformGroup *dg= defgroup_find_name(ob, oldname);
+ bDeformGroup *dg = defgroup_find_name(ob, oldname);
if (dg) {
BLI_strncpy(dg->name, newname, MAXBONENAME);
}
}
/* fix modifiers that might be using this name */
- for (md= ob->modifiers.first; md; md= md->next) {
+ for (md = ob->modifiers.first; md; md = md->next) {
if (md->type == eModifierType_Hook) {
HookModifierData *hmd = (HookModifierData *)md;
@@ -5402,14 +5596,14 @@ void ED_armature_bone_rename(bArmature *arm, const char *oldnamep, const char *n
/* correct view locking */
{
bScreen *screen;
- for (screen= G.main->screen.first; screen; screen= screen->id.next) {
+ for (screen = G.main->screen.first; screen; screen = screen->id.next) {
ScrArea *sa;
/* add regions */
- for (sa= screen->areabase.first; sa; sa= sa->next) {
+ for (sa = screen->areabase.first; sa; sa = sa->next) {
SpaceLink *sl;
- for (sl= sa->spacedata.first; sl; sl= sl->next) {
- if (sl->spacetype==SPACE_VIEW3D) {
- View3D *v3d= (View3D *)sl;
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_VIEW3D) {
+ View3D *v3d = (View3D *)sl;
if (v3d->ob_centre && v3d->ob_centre->data == arm) {
if (!strcmp(v3d->ob_centre_bone, oldname)) {
BLI_strncpy(v3d->ob_centre_bone, newname, MAXBONENAME);
@@ -5424,19 +5618,19 @@ void ED_armature_bone_rename(bArmature *arm, const char *oldnamep, const char *n
}
-static int armature_flip_names_exec (bContext *C, wmOperator *UNUSED(op))
+static int armature_flip_names_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *ob= CTX_data_edit_object(C);
+ Object *ob = CTX_data_edit_object(C);
bArmature *arm;
char newname[MAXBONENAME];
/* paranoia checks */
if (ELEM(NULL, ob, ob->pose))
return OPERATOR_CANCELLED;
- arm= ob->data;
+ arm = ob->data;
/* loop through selected bones, auto-naming them */
- CTX_DATA_BEGIN(C, EditBone *, ebone, selected_editable_bones)
+ CTX_DATA_BEGIN (C, EditBone *, ebone, selected_editable_bones)
{
flip_side_name(newname, ebone->name, TRUE); // 1 = do strip off number extensions
ED_armature_bone_rename(arm, ebone->name, newname);
@@ -5447,12 +5641,12 @@ static int armature_flip_names_exec (bContext *C, wmOperator *UNUSED(op))
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
/* note, notifier might evolve */
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
return OPERATOR_FINISHED;
}
-void ARMATURE_OT_flip_names (wmOperatorType *ot)
+void ARMATURE_OT_flip_names(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Flip Names";
@@ -5464,24 +5658,24 @@ void ARMATURE_OT_flip_names (wmOperatorType *ot)
ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
-static int armature_autoside_names_exec (bContext *C, wmOperator *op)
+static int armature_autoside_names_exec(bContext *C, wmOperator *op)
{
- Object *ob= CTX_data_edit_object(C);
+ Object *ob = CTX_data_edit_object(C);
bArmature *arm;
char newname[MAXBONENAME];
- short axis= RNA_enum_get(op->ptr, "type");
+ short axis = RNA_enum_get(op->ptr, "type");
/* paranoia checks */
if (ELEM(NULL, ob, ob->pose))
return OPERATOR_CANCELLED;
- arm= ob->data;
+ arm = ob->data;
/* loop through selected bones, auto-naming them */
- CTX_DATA_BEGIN(C, EditBone *, ebone, selected_editable_bones)
+ CTX_DATA_BEGIN (C, EditBone *, ebone, selected_editable_bones)
{
BLI_strncpy(newname, ebone->name, sizeof(newname));
if (bone_autoside_name(newname, 1, axis, ebone->head[axis], ebone->tail[axis]))
@@ -5493,15 +5687,15 @@ static int armature_autoside_names_exec (bContext *C, wmOperator *op)
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
/* note, notifier might evolve */
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
return OPERATOR_FINISHED;
}
-void ARMATURE_OT_autoside_names (wmOperatorType *ot)
+void ARMATURE_OT_autoside_names(wmOperatorType *ot)
{
- static EnumPropertyItem axis_items[]= {
- {0, "XAXIS", 0, "X-Axis", "Left/Right"},
+ static EnumPropertyItem axis_items[] = {
+ {0, "XAXIS", 0, "X-Axis", "Left/Right"},
{1, "YAXIS", 0, "Y-Axis", "Front/Back"},
{2, "ZAXIS", 0, "Z-Axis", "Top/Bottom"},
{0, NULL, 0, NULL, NULL}};
@@ -5517,7 +5711,7 @@ void ARMATURE_OT_autoside_names (wmOperatorType *ot)
ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* settings */
ot->prop = RNA_def_enum(ot->srna, "type", axis_items, 0, "Axis", "Axis tag names with");
@@ -5529,27 +5723,27 @@ void ARMATURE_OT_autoside_names (wmOperatorType *ot)
/* context; editmode armature, with mirror editing enabled */
void transform_armature_mirror_update(Object *obedit)
{
- bArmature *arm= obedit->data;
+ bArmature *arm = obedit->data;
EditBone *ebo, *eboflip;
- for (ebo= arm->edbo->first; ebo; ebo=ebo->next) {
+ for (ebo = arm->edbo->first; ebo; ebo = ebo->next) {
/* no layer check, correct mirror is more important */
- if (ebo->flag & (BONE_TIPSEL|BONE_ROOTSEL)) {
- eboflip= ED_armature_bone_get_mirrored(arm->edbo, ebo);
+ if (ebo->flag & (BONE_TIPSEL | BONE_ROOTSEL)) {
+ eboflip = ED_armature_bone_get_mirrored(arm->edbo, ebo);
if (eboflip) {
/* we assume X-axis flipping for now */
if (ebo->flag & BONE_TIPSEL) {
EditBone *children;
- eboflip->tail[0]= -ebo->tail[0];
- eboflip->tail[1]= ebo->tail[1];
- eboflip->tail[2]= ebo->tail[2];
- eboflip->rad_tail= ebo->rad_tail;
- eboflip->roll= -ebo->roll;
+ eboflip->tail[0] = -ebo->tail[0];
+ eboflip->tail[1] = ebo->tail[1];
+ eboflip->tail[2] = ebo->tail[2];
+ eboflip->rad_tail = ebo->rad_tail;
+ eboflip->roll = -ebo->roll;
/* Also move connected children, in case children's name aren't mirrored properly */
- for (children=arm->edbo->first; children; children=children->next) {
+ for (children = arm->edbo->first; children; children = children->next) {
if (children->parent == eboflip && children->flag & BONE_CONNECTED) {
copy_v3_v3(children->head, eboflip->tail);
children->rad_head = ebo->rad_tail;
@@ -5557,11 +5751,11 @@ void transform_armature_mirror_update(Object *obedit)
}
}
if (ebo->flag & BONE_ROOTSEL) {
- eboflip->head[0]= -ebo->head[0];
- eboflip->head[1]= ebo->head[1];
- eboflip->head[2]= ebo->head[2];
- eboflip->rad_head= ebo->rad_head;
- eboflip->roll= -ebo->roll;
+ eboflip->head[0] = -ebo->head[0];
+ eboflip->head[1] = ebo->head[1];
+ eboflip->head[2] = ebo->head[2];
+ eboflip->rad_head = ebo->rad_head;
+ eboflip->roll = -ebo->roll;
/* Also move connected parent, in case parent's name isn't mirrored properly */
if (eboflip->parent && eboflip->flag & BONE_CONNECTED) {
@@ -5571,10 +5765,10 @@ void transform_armature_mirror_update(Object *obedit)
}
}
if (ebo->flag & BONE_SELECTED) {
- eboflip->dist= ebo->dist;
- eboflip->roll= -ebo->roll;
- eboflip->xwidth= ebo->xwidth;
- eboflip->zwidth= ebo->zwidth;
+ eboflip->dist = ebo->dist;
+ eboflip->roll = -ebo->roll;
+ eboflip->xwidth = ebo->xwidth;
+ eboflip->zwidth = ebo->zwidth;
}
}
}
@@ -5590,14 +5784,14 @@ void transform_armature_mirror_update(Object *obedit)
/**************************************** SUBDIVISION ALGOS ******************************************/
-EditBone * subdivideByAngle(Scene *scene, Object *obedit, ReebArc *arc, ReebNode *head, ReebNode *tail)
+EditBone *subdivideByAngle(Scene *scene, Object *obedit, ReebArc *arc, ReebNode *head, ReebNode *tail)
{
- bArmature *arm= obedit->data;
+ bArmature *arm = obedit->data;
EditBone *lastBone = NULL;
if (scene->toolsettings->skgen_options & SKGEN_CUT_ANGLE) {
ReebArcIterator arc_iter;
- BArcIterator *iter = (BArcIterator*)&arc_iter;
+ BArcIterator *iter = (BArcIterator *)&arc_iter;
float *previous = NULL, *current = NULL;
EditBone *child = NULL;
EditBone *parent = NULL;
@@ -5605,7 +5799,7 @@ EditBone * subdivideByAngle(Scene *scene, Object *obedit, ReebArc *arc, ReebNode
float angleLimit = (float)cos(scene->toolsettings->skgen_angle_limit * M_PI / 180.0f);
parent = ED_armature_edit_bone_add(arm, "Bone");
- parent->flag |= BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL;
+ parent->flag |= BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL;
copy_v3_v3(parent->head, head->p);
root = parent;
@@ -5615,8 +5809,8 @@ EditBone * subdivideByAngle(Scene *scene, Object *obedit, ReebArc *arc, ReebNode
previous = iter->p;
for (IT_next(iter);
- IT_stopped(iter) == 0;
- previous = iter->p, IT_next(iter))
+ IT_stopped(iter) == 0;
+ previous = iter->p, IT_next(iter))
{
float vec1[3], vec2[3];
float len1, len2;
@@ -5635,7 +5829,7 @@ EditBone * subdivideByAngle(Scene *scene, Object *obedit, ReebArc *arc, ReebNode
child = ED_armature_edit_bone_add(arm, "Bone");
copy_v3_v3(child->head, parent->tail);
child->parent = parent;
- child->flag |= BONE_CONNECTED|BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL;
+ child->flag |= BONE_CONNECTED | BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL;
parent = child; /* new child is next parent */
}
@@ -5646,7 +5840,7 @@ EditBone * subdivideByAngle(Scene *scene, Object *obedit, ReebArc *arc, ReebNode
* to let subsequent subdivision methods do their thing.
* */
if (parent == root) {
- if (parent==arm->act_edbone) arm->act_edbone= NULL;
+ if (parent == arm->act_edbone) arm->act_edbone = NULL;
ED_armature_edit_bone_remove(arm, parent);
parent = NULL;
}
@@ -5657,16 +5851,16 @@ EditBone * subdivideByAngle(Scene *scene, Object *obedit, ReebArc *arc, ReebNode
return lastBone;
}
-EditBone * test_subdivideByCorrelation(Scene *scene, Object *obedit, ReebArc *arc, ReebNode *head, ReebNode *tail)
+EditBone *test_subdivideByCorrelation(Scene *scene, Object *obedit, ReebArc *arc, ReebNode *head, ReebNode *tail)
{
EditBone *lastBone = NULL;
if (scene->toolsettings->skgen_options & SKGEN_CUT_CORRELATION) {
- float invmat[4][4]= MAT4_UNITY;
- float tmat[3][3]= MAT3_UNITY;
+ float invmat[4][4] = MAT4_UNITY;
+ float tmat[3][3] = MAT3_UNITY;
ReebArcIterator arc_iter;
- BArcIterator *iter = (BArcIterator*)&arc_iter;
- bArmature *arm= obedit->data;
+ BArcIterator *iter = (BArcIterator *)&arc_iter;
+ bArmature *arm = obedit->data;
initArcIterator(iter, arc, head);
@@ -5686,7 +5880,7 @@ float arcLengthRatio(ReebArc *arc)
if (arc->bcount > 0) {
/* Add the embedding */
- for ( i = 1; i < arc->bcount; i++) {
+ for (i = 1; i < arc->bcount; i++) {
embedLength += len_v3v3(arc->buckets[i - 1].p, arc->buckets[i].p);
}
/* Add head and tail -> embedding vectors */
@@ -5700,17 +5894,17 @@ float arcLengthRatio(ReebArc *arc)
return embedLength / arcLength;
}
-EditBone * test_subdivideByLength(Scene *scene, Object *obedit, ReebArc *arc, ReebNode *head, ReebNode *tail)
+EditBone *test_subdivideByLength(Scene *scene, Object *obedit, ReebArc *arc, ReebNode *head, ReebNode *tail)
{
EditBone *lastBone = NULL;
if ((scene->toolsettings->skgen_options & SKGEN_CUT_LENGTH) &&
- arcLengthRatio(arc) >= G.scene->toolsettings->skgen_length_ratio)
+ arcLengthRatio(arc) >= G.scene->toolsettings->skgen_length_ratio)
{
- float invmat[4][4]= MAT4_UNITY;
- float tmat[3][3]= MAT3_UNITY;
+ float invmat[4][4] = MAT4_UNITY;
+ float tmat[3][3] = MAT3_UNITY;
ReebArcIterator arc_iter;
- BArcIterator *iter = (BArcIterator*)&arc_iter;
- bArmature *arm= obedit->data;
+ BArcIterator *iter = (BArcIterator *)&arc_iter;
+ bArmature *arm = obedit->data;
initArcIterator(iter, arc, head);
@@ -5724,7 +5918,7 @@ EditBone * test_subdivideByLength(Scene *scene, Object *obedit, ReebArc *arc, Re
void generateSkeletonFromReebGraph(Scene *scene, ReebGraph *rg)
{
- Object *obedit= scene->obedit; // XXX get from context
+ Object *obedit = scene->obedit; // XXX get from context
GHash *arcBoneMap = NULL;
ReebArc *arc = NULL;
ReebNode *node = NULL;
@@ -5738,22 +5932,22 @@ void generateSkeletonFromReebGraph(Scene *scene, ReebGraph *rg)
ED_armature_edit_free(obedit);
}
- dst = add_object(scene, OB_ARMATURE);
- ED_object_base_init_transform(NULL, scene->basact, NULL, NULL); // XXX NULL is C, loc, rot
- obedit= scene->basact->object;
+ dst = BKE_object_add(scene, OB_ARMATURE);
+ ED_object_base_init_transform(NULL, scene->basact, NULL, NULL); // XXX NULL is C, loc, rot
+ obedit = scene->basact->object;
/* Copy orientation from source */
copy_v3_v3(dst->loc, src->obmat[3]);
- mat4_to_eul( dst->rot,src->obmat);
- mat4_to_size( dst->size,src->obmat);
+ mat4_to_eul(dst->rot, src->obmat);
+ mat4_to_size(dst->size, src->obmat);
- where_is_object(scene, obedit);
+ BKE_object_where_is_calc(scene, obedit);
ED_armature_to_edit(obedit);
arcBoneMap = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "SkeletonFromReebGraph gh");
- BLI_markdownSymmetry((BGraph*)rg, rg->nodes.first, scene->toolsettings->skgen_symmetry_limit);
+ BLI_markdownSymmetry((BGraph *)rg, rg->nodes.first, scene->toolsettings->skgen_symmetry_limit);
for (arc = rg->arcs.first; arc; arc = arc->next)
{
@@ -5800,7 +5994,7 @@ void generateSkeletonFromReebGraph(Scene *scene, ReebGraph *rg)
/* Loop over subdivision methods */
for (i = 0; lastBone == NULL && i < SKGEN_SUB_TOTAL; i++) {
- switch(scene->toolsettings->skgen_subdivisions[i]) {
+ switch (scene->toolsettings->skgen_subdivisions[i]) {
case SKGEN_SUB_LENGTH:
lastBone = test_subdivideByLength(scene, obedit, arc, head, tail);
break;
@@ -5814,9 +6008,9 @@ void generateSkeletonFromReebGraph(Scene *scene, ReebGraph *rg)
}
if (lastBone == NULL) {
- EditBone *bone;
+ EditBone *bone;
bone = ED_armature_edit_bone_add(obedit->data, "Bone");
- bone->flag |= BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL;
+ bone->flag |= BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL;
copy_v3_v3(bone->head, head->p);
copy_v3_v3(bone->tail, tail->p);
@@ -5835,7 +6029,7 @@ void generateSkeletonFromReebGraph(Scene *scene, ReebGraph *rg)
int i;
for (i = 0; i < node->degree; i++) {
- arc = (ReebArc*)node->arcs[i];
+ arc = (ReebArc *)node->arcs[i];
/* if arc is incoming into the node */
if ((arc->head == node && arc->flag == -1) ||
diff --git a/source/blender/editors/armature/editarmature_generate.c b/source/blender/editors/armature/editarmature_generate.c
index 37d095221c9..7f966dbc884 100644
--- a/source/blender/editors/armature/editarmature_generate.c
+++ b/source/blender/editors/armature/editarmature_generate.c
@@ -52,8 +52,7 @@
void setBoneRollFromNormal(EditBone *bone, float *no, float UNUSED(invmat[][4]), float tmat[][3])
{
- if (no != NULL && !is_zero_v3(no))
- {
+ if (no != NULL && !is_zero_v3(no)) {
float normal[3];
copy_v3_v3(normal, no);
@@ -67,16 +66,14 @@ float calcArcCorrelation(BArcIterator *iter, int start, int end, float v0[3], fl
{
int len = 2 + abs(end - start);
- if (len > 2)
- {
+ if (len > 2) {
float avg_t = 0.0f;
float s_t = 0.0f;
float s_xyz = 0.0f;
int i;
/* First pass, calculate average */
- for (i = start; i <= end; i++)
- {
+ for (i = start; i <= end; i++) {
float v[3];
IT_peek(iter, i);
@@ -89,8 +86,7 @@ float calcArcCorrelation(BArcIterator *iter, int start, int end, float v0[3], fl
avg_t /= len;
/* Second pass, calculate s_xyz and s_t */
- for (i = start; i <= end; i++)
- {
+ for (i = start; i <= end; i++) {
float v[3], d[3];
float dt;
@@ -110,8 +106,7 @@ float calcArcCorrelation(BArcIterator *iter, int start, int end, float v0[3], fl
return 1.0f - s_xyz / s_t;
}
- else
- {
+ else {
return 1.0f;
}
}
@@ -125,15 +120,13 @@ int nextFixedSubdivision(ToolSettings *toolsettings, BArcIterator *iter, int sta
float length_threshold;
int i;
- if (stroke_length == 0)
- {
+ if (stroke_length == 0) {
current_length = 0;
IT_peek(iter, start);
v1 = iter->p;
- for (i = start + 1; i <= end; i++)
- {
+ for (i = start + 1; i <= end; i++) {
IT_peek(iter, i);
v2 = iter->p;
@@ -154,8 +147,7 @@ int nextFixedSubdivision(ToolSettings *toolsettings, BArcIterator *iter, int sta
v1 = iter->p;
/* < and not <= because we don't care about end, it is P_EXACT anyway */
- for (i = start + 1; i < end; i++)
- {
+ for (i = start + 1; i < end; i++) {
IT_peek(iter, i);
v2 = iter->p;
@@ -183,8 +175,7 @@ int nextAdaptativeSubdivision(ToolSettings *toolsettings, BArcIterator *iter, in
IT_peek(iter, start);
start_p = iter->p;
- for (i = start + 2; i <= end; i++)
- {
+ for (i = start + 2; i <= end; i++) {
/* Calculate normal */
IT_peek(iter, i);
sub_v3_v3v3(n, iter->p, head);
@@ -206,8 +197,7 @@ int nextLengthSubdivision(ToolSettings *toolsettings, BArcIterator *iter, int st
int i;
i = start + 1;
- while (i <= end)
- {
+ while (i <= end) {
float *vec0;
float *vec1;
@@ -218,10 +208,8 @@ int nextLengthSubdivision(ToolSettings *toolsettings, BArcIterator *iter, int st
vec1 = iter->p;
/* If lengthLimit hits the current segment */
- if (len_v3v3(vec1, head) > lengthLimit)
- {
- if (same == 0)
- {
+ if (len_v3v3(vec1, head) > lengthLimit) {
+ if (same == 0) {
float dv[3], off[3];
float a, b, c, f;
@@ -260,8 +248,7 @@ int nextLengthSubdivision(ToolSettings *toolsettings, BArcIterator *iter, int st
return i - 1; /* restart at lower bound */
}
- else
- {
+ else {
i++;
same = 0; // Reset same
}
@@ -270,7 +257,7 @@ int nextLengthSubdivision(ToolSettings *toolsettings, BArcIterator *iter, int st
return -1;
}
-EditBone * subdivideArcBy(ToolSettings *toolsettings, bArmature *arm, ListBase *UNUSED(editbones), BArcIterator *iter, float invmat[][4], float tmat[][3], NextSubdivisionFunc next_subdividion)
+EditBone *subdivideArcBy(ToolSettings *toolsettings, bArmature *arm, ListBase *UNUSED(editbones), BArcIterator *iter, float invmat[][4], float tmat[][3], NextSubdivisionFunc next_subdividion)
{
EditBone *lastBone = NULL;
EditBone *child = NULL;
@@ -286,16 +273,14 @@ EditBone * subdivideArcBy(ToolSettings *toolsettings, bArmature *arm, ListBase *
parent = ED_armature_edit_bone_add(arm, "Bone");
copy_v3_v3(parent->head, iter->p);
- if (iter->size > 0)
- {
+ if (iter->size > 0) {
parent->rad_head = iter->size * size_buffer;
}
normal = iter->no;
index = next_subdividion(toolsettings, iter, bone_start, end, parent->head, parent->tail);
- while (index != -1)
- {
+ while (index != -1) {
IT_peek(iter, index);
child = ED_armature_edit_bone_add(arm, "Bone");
@@ -303,8 +288,7 @@ EditBone * subdivideArcBy(ToolSettings *toolsettings, bArmature *arm, ListBase *
child->parent = parent;
child->flag |= BONE_CONNECTED;
- if (iter->size > 0)
- {
+ if (iter->size > 0) {
child->rad_head = iter->size * size_buffer;
parent->rad_tail = iter->size * size_buffer;
}
diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c
index f554b7b1c50..566dbc901b8 100644
--- a/source/blender/editors/armature/editarmature_retarget.c
+++ b/source/blender/editors/armature/editarmature_retarget.c
@@ -70,15 +70,15 @@
/************ RIG RETARGET DATA STRUCTURES ***************/
typedef struct MemoNode {
- float weight;
- int next;
+ float weight;
+ int next;
} MemoNode;
typedef struct RetargetParam {
- RigGraph *rigg;
- RigArc *iarc;
- RigNode *inode_start;
- bContext *context;
+ RigGraph *rigg;
+ RigArc *iarc;
+ RigNode *inode_start;
+ bContext *context;
} RetargetParam;
typedef enum
@@ -119,10 +119,8 @@ static int countEditBoneChildren(ListBase *list, EditBone *parent)
EditBone *ebone;
int count = 0;
- for (ebone = list->first; ebone; ebone = ebone->next)
- {
- if (ebone->parent == parent)
- {
+ for (ebone = list->first; ebone; ebone = ebone->next) {
+ if (ebone->parent == parent) {
count++;
}
}
@@ -130,16 +128,13 @@ static int countEditBoneChildren(ListBase *list, EditBone *parent)
return count;
}
-static EditBone* nextEditBoneChild(ListBase *list, EditBone *parent, int n)
+static EditBone *nextEditBoneChild(ListBase *list, EditBone *parent, int n)
{
EditBone *ebone;
- for (ebone = list->first; ebone; ebone = ebone->next)
- {
- if (ebone->parent == parent)
- {
- if (n == 0)
- {
+ for (ebone = list->first; ebone; ebone = ebone->next) {
+ if (ebone->parent == parent) {
+ if (n == 0) {
return ebone;
}
n--;
@@ -175,23 +170,19 @@ static float rollBoneByQuatAligned(EditBone *bone, float old_up_axis[3], float q
normalize_v3(x_axis);
normalize_v3(z_axis);
- if (dot_v3v3(new_up_axis, x_axis) < 0)
- {
+ if (dot_v3v3(new_up_axis, x_axis) < 0) {
negate_v3(x_axis);
}
- if (dot_v3v3(new_up_axis, z_axis) < 0)
- {
+ if (dot_v3v3(new_up_axis, z_axis) < 0) {
negate_v3(z_axis);
}
- if (angle_normalized_v3v3(x_axis, new_up_axis) < angle_normalized_v3v3(z_axis, new_up_axis))
- {
+ if (angle_normalized_v3v3(x_axis, new_up_axis) < angle_normalized_v3v3(z_axis, new_up_axis)) {
rotation_between_vecs_to_quat(qroll, new_up_axis, x_axis); /* set roll rotation quat */
return ED_rollBoneToVector(bone, x_axis, FALSE);
}
- else
- {
+ else {
rotation_between_vecs_to_quat(qroll, new_up_axis, z_axis); /* set roll rotation quat */
return ED_rollBoneToVector(bone, z_axis, FALSE);
}
@@ -199,26 +190,21 @@ static float rollBoneByQuatAligned(EditBone *bone, float old_up_axis[3], float q
static float rollBoneByQuatJoint(RigEdge *edge, RigEdge *previous, float qrot[4], float qroll[4], float up_axis[3])
{
- if (previous == NULL)
- {
+ if (previous == NULL) {
/* default to up_axis if no previous */
return rollBoneByQuatAligned(edge->bone, edge->up_axis, qrot, qroll, up_axis);
}
- else
- {
+ else {
float new_up_axis[3];
float vec_first[3], vec_second[3], normal[3];
- if (previous->bone)
- {
+ if (previous->bone) {
sub_v3_v3v3(vec_first, previous->bone->tail, previous->bone->head);
}
- else if (previous->prev->bone)
- {
+ else if (previous->prev->bone) {
sub_v3_v3v3(vec_first, edge->bone->head, previous->prev->bone->tail);
}
- else
- {
+ else {
/* default to up_axis if first bone in the chain is an offset */
return rollBoneByQuatAligned(edge->bone, edge->up_axis, qrot, qroll, up_axis);
}
@@ -261,12 +247,12 @@ float rollBoneByQuat(EditBone *bone, float old_up_axis[3], float qrot[4])
static void RIG_freeRigArc(BArc *arc)
{
- BLI_freelistN(&((RigArc*)arc)->edges);
+ BLI_freelistN(&((RigArc *)arc)->edges);
}
void RIG_freeRigGraph(BGraph *rg)
{
- RigGraph *rigg = (RigGraph*)rg;
+ RigGraph *rigg = (RigGraph *)rg;
BNode *node;
BArc *arc;
@@ -274,20 +260,17 @@ void RIG_freeRigGraph(BGraph *rg)
BLI_destroy_worker(rigg->worker);
#endif
- if (rigg->link_mesh)
- {
+ if (rigg->link_mesh) {
REEB_freeGraph(rigg->link_mesh);
}
- for (arc = rg->arcs.first; arc; arc = arc->next)
- {
+ for (arc = rg->arcs.first; arc; arc = arc->next) {
RIG_freeRigArc(arc);
}
BLI_freelistN(&rg->arcs);
- for (node = rg->nodes.first; node; node = node->next)
- {
- BLI_freeNode(rg, (BNode*)node);
+ for (node = rg->nodes.first; node; node = node->next) {
+ BLI_freeNode(rg, (BNode *)node);
}
BLI_freelistN(&rg->nodes);
@@ -296,8 +279,7 @@ void RIG_freeRigGraph(BGraph *rg)
BLI_ghash_free(rigg->bones_map, NULL, NULL);
BLI_ghash_free(rigg->controls_map, NULL, NULL);
- if (rigg->flag & RIG_FREE_BONELIST)
- {
+ if (rigg->flag & RIG_FREE_BONELIST) {
BLI_freelistN(rigg->editbones);
MEM_freeN(rigg->editbones);
}
@@ -329,7 +311,7 @@ static RigGraph *newRigGraph(void)
// }
// else
// {
- totthread = BLI_system_thread_count();
+ totthread = BLI_system_thread_count();
// }
rg->worker = BLI_create_worker(exec_retargetArctoArc, totthread, 20); /* fix number of threads */
@@ -409,12 +391,10 @@ static void RIG_appendEdgeToArc(RigArc *arc, RigEdge *edge)
{
BLI_addtail(&arc->edges, edge);
- if (edge->prev == NULL)
- {
+ if (edge->prev == NULL) {
copy_v3_v3(edge->head, arc->head->p);
}
- else
- {
+ else {
RigEdge *last_edge = edge->prev;
copy_v3_v3(edge->head, last_edge->tail);
RIG_calculateEdgeAngles(last_edge, edge);
@@ -436,8 +416,7 @@ static void RIG_addEdgeToArc(RigArc *arc, float tail[3], EditBone *bone)
copy_v3_v3(edge->tail, tail);
edge->bone = bone;
- if (bone)
- {
+ if (bone) {
getEditBoneRollUpAxis(bone, bone->roll, edge->up_axis);
}
@@ -449,28 +428,22 @@ static void renameTemplateBone(char *name, char *template_name, ListBase *editbo
{
int i, j;
- for (i = 0, j = 0; i < (MAXBONENAME-1) && j < (MAXBONENAME-1) && template_name[i] != '\0'; i++)
- {
- if (template_name[i] == '&')
- {
- if (template_name[i+1] == 'S' || template_name[i+1] == 's')
- {
+ for (i = 0, j = 0; i < (MAXBONENAME - 1) && j < (MAXBONENAME - 1) && template_name[i] != '\0'; i++) {
+ if (template_name[i] == '&') {
+ if (template_name[i + 1] == 'S' || template_name[i + 1] == 's') {
j += sprintf(name + j, "%s", side_string);
i++;
}
- else if (template_name[i+1] == 'N' || template_name[i+1] == 'n')
- {
+ else if (template_name[i + 1] == 'N' || template_name[i + 1] == 'n') {
j += sprintf(name + j, "%s", num_string);
i++;
}
- else
- {
+ else {
name[j] = template_name[i];
j++;
}
}
- else
- {
+ else {
name[j] = template_name[i];
j++;
}
@@ -498,7 +471,7 @@ static RigControl *cloneControl(RigGraph *rg, RigGraph *src_rg, RigControl *src_
renameTemplateBone(name, src_ctrl->bone->name, rg->editbones, side_string, num_string);
ctrl->bone = duplicateEditBoneObjects(src_ctrl->bone, name, rg->editbones, src_rg->ob, rg->ob);
- ctrl->bone->flag &= ~(BONE_TIPSEL|BONE_SELECTED|BONE_ROOTSEL);
+ ctrl->bone->flag &= ~(BONE_TIPSEL | BONE_SELECTED | BONE_ROOTSEL);
BLI_ghash_insert(ptr_hash, src_ctrl->bone, ctrl->bone);
ctrl->link = src_ctrl->link;
@@ -524,8 +497,7 @@ static RigArc *cloneArc(RigGraph *rg, RigGraph *src_rg, RigArc *src_arc, GHash *
arc->count = src_arc->count;
- for (src_edge = src_arc->edges.first; src_edge; src_edge = src_edge->next)
- {
+ for (src_edge = src_arc->edges.first; src_edge; src_edge = src_edge->next) {
RigEdge *edge;
edge = MEM_callocN(sizeof(RigEdge), "rig edge");
@@ -538,12 +510,11 @@ static RigArc *cloneArc(RigGraph *rg, RigGraph *src_rg, RigArc *src_arc, GHash *
edge->angle = src_edge->angle;
edge->up_angle = src_edge->up_angle;
- if (src_edge->bone != NULL)
- {
+ if (src_edge->bone != NULL) {
char name[MAXBONENAME];
renameTemplateBone(name, src_edge->bone->name, rg->editbones, side_string, num_string);
edge->bone = duplicateEditBoneObjects(src_edge->bone, name, rg->editbones, src_rg->ob, rg->ob);
- edge->bone->flag &= ~(BONE_TIPSEL|BONE_SELECTED|BONE_ROOTSEL);
+ edge->bone->flag &= ~(BONE_TIPSEL | BONE_SELECTED | BONE_ROOTSEL);
BLI_ghash_insert(ptr_hash, src_edge->bone, edge->bone);
}
@@ -555,7 +526,7 @@ static RigArc *cloneArc(RigGraph *rg, RigGraph *src_rg, RigArc *src_arc, GHash *
static RigGraph *cloneRigGraph(RigGraph *src, ListBase *editbones, Object *ob, char *side_string, char *num_string)
{
- GHash *ptr_hash;
+ GHash *ptr_hash;
RigNode *node;
RigArc *arc;
RigControl *ctrl;
@@ -572,8 +543,7 @@ static RigGraph *cloneRigGraph(RigGraph *src, ListBase *editbones, Object *ob, c
preEditBoneDuplicate(src->editbones); /* prime bones for duplication */
/* Clone nodes */
- for (node = src->nodes.first; node; node = node->next)
- {
+ for (node = src->nodes.first; node; node = node->next) {
RigNode *cloned_node = newRigNode(rg, node->p);
BLI_ghash_insert(ptr_hash, node, cloned_node);
}
@@ -581,40 +551,32 @@ static RigGraph *cloneRigGraph(RigGraph *src, ListBase *editbones, Object *ob, c
rg->head = BLI_ghash_lookup(ptr_hash, src->head);
/* Clone arcs */
- for (arc = src->arcs.first; arc; arc = arc->next)
- {
+ for (arc = src->arcs.first; arc; arc = arc->next) {
cloneArc(rg, src, arc, ptr_hash, side_string, num_string);
}
/* Clone controls */
- for (ctrl = src->controls.first; ctrl; ctrl = ctrl->next)
- {
+ for (ctrl = src->controls.first; ctrl; ctrl = ctrl->next) {
cloneControl(rg, src, ctrl, ptr_hash, side_string, num_string);
}
/* Relink bones properly */
- for (arc = rg->arcs.first; arc; arc = arc->next)
- {
+ for (arc = rg->arcs.first; arc; arc = arc->next) {
RigEdge *edge;
- for (edge = arc->edges.first; edge; edge = edge->next)
- {
- if (edge->bone != NULL)
- {
+ for (edge = arc->edges.first; edge; edge = edge->next) {
+ if (edge->bone != NULL) {
EditBone *bone;
updateDuplicateSubtargetObjects(edge->bone, src->editbones, src->ob, rg->ob);
- if (edge->bone->parent)
- {
+ if (edge->bone->parent) {
bone = BLI_ghash_lookup(ptr_hash, edge->bone->parent);
- if (bone != NULL)
- {
+ if (bone != NULL) {
edge->bone->parent = bone;
}
- else
- {
+ else {
/* disconnect since parent isn't cloned
* this will only happen when cloning from selected bones
* */
@@ -625,22 +587,18 @@ static RigGraph *cloneRigGraph(RigGraph *src, ListBase *editbones, Object *ob, c
}
}
- for (ctrl = rg->controls.first; ctrl; ctrl = ctrl->next)
- {
+ for (ctrl = rg->controls.first; ctrl; ctrl = ctrl->next) {
EditBone *bone;
updateDuplicateSubtargetObjects(ctrl->bone, src->editbones, src->ob, rg->ob);
- if (ctrl->bone->parent)
- {
+ if (ctrl->bone->parent) {
bone = BLI_ghash_lookup(ptr_hash, ctrl->bone->parent);
- if (bone != NULL)
- {
+ if (bone != NULL) {
ctrl->bone->parent = bone;
}
- else
- {
+ else {
/* disconnect since parent isn't cloned
* this will only happen when cloning from selected bones
* */
@@ -672,8 +630,7 @@ static void RIG_calculateEdgeAngles(RigEdge *edge_first, RigEdge *edge_second)
edge_first->angle = angle_normalized_v3v3(vec_first, vec_second);
- if (edge_second->bone != NULL)
- {
+ if (edge_second->bone != NULL) {
float normal[3];
cross_v3_v3v3(normal, vec_first, vec_second);
@@ -699,16 +656,14 @@ static void RIG_addControlBone(RigGraph *rg, EditBone *bone)
static int RIG_parentControl(RigControl *ctrl, EditBone *link)
{
- if (link)
- {
+ if (link) {
float offset[3];
int flag = 0;
sub_v3_v3v3(offset, ctrl->bone->head, link->head);
/* if root matches, check for direction too */
- if (dot_v3v3(offset, offset) < 0.0001f)
- {
+ if (dot_v3v3(offset, offset) < 0.0001f) {
float vbone[3], vparent[3];
flag |= RIG_CTRL_FIT_ROOT;
@@ -717,45 +672,38 @@ static int RIG_parentControl(RigControl *ctrl, EditBone *link)
sub_v3_v3v3(vparent, link->tail, link->head);
/* test for opposite direction */
- if (dot_v3v3(vbone, vparent) > 0)
- {
+ if (dot_v3v3(vbone, vparent) > 0) {
float nor[3];
float len;
cross_v3_v3v3(nor, vbone, vparent);
len = dot_v3v3(nor, nor);
- if (len < 0.0001f)
- {
+ if (len < 0.0001f) {
flag |= RIG_CTRL_FIT_BONE;
}
}
}
/* Bail out if old one is automatically better */
- if (flag < ctrl->flag)
- {
+ if (flag < ctrl->flag) {
return 0;
}
/* if there's already a link
- * overwrite only if new link is higher in the chain */
- if (ctrl->link && flag == ctrl->flag)
- {
+ * overwrite only if new link is higher in the chain */
+ if (ctrl->link && flag == ctrl->flag) {
EditBone *bone = NULL;
- for (bone = ctrl->link; bone; bone = bone->parent)
- {
+ for (bone = ctrl->link; bone; bone = bone->parent) {
/* if link is in the chain, break and use that one */
- if (bone == link)
- {
+ if (bone == link) {
break;
}
}
/* not in chain, don't update link */
- if (bone == NULL)
- {
+ if (bone == NULL) {
return 0;
}
}
@@ -778,43 +726,34 @@ static void RIG_reconnectControlBones(RigGraph *rg)
int change = 1;
/* first pass, link to deform bones */
- for (ctrl = rg->controls.first; ctrl; ctrl = ctrl->next)
- {
+ for (ctrl = rg->controls.first; ctrl; ctrl = ctrl->next) {
bPoseChannel *pchan;
bConstraint *con;
int found = 0;
/* DO SOME MAGIC HERE */
- for (pchan= rg->ob->pose->chanbase.first; pchan; pchan= pchan->next)
- {
- for (con= pchan->constraints.first; con; con= con->next)
- {
- bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
+ for (pchan = rg->ob->pose->chanbase.first; pchan; pchan = pchan->next) {
+ for (con = pchan->constraints.first; con; con = con->next) {
+ bConstraintTypeInfo *cti = constraint_get_typeinfo(con);
ListBase targets = {NULL, NULL};
bConstraintTarget *ct;
/* constraint targets */
- if (cti && cti->get_constraint_targets)
- {
+ if (cti && cti->get_constraint_targets) {
int target_index;
cti->get_constraint_targets(con, &targets);
- for (target_index = 0, ct= targets.first; ct; target_index++, ct= ct->next)
- {
- if ((ct->tar == rg->ob) && strcmp(ct->subtarget, ctrl->bone->name) == 0)
- {
+ for (target_index = 0, ct = targets.first; ct; target_index++, ct = ct->next) {
+ if ((ct->tar == rg->ob) && strcmp(ct->subtarget, ctrl->bone->name) == 0) {
/* SET bone link to bone corresponding to pchan */
EditBone *link = BLI_ghash_lookup(rg->bones_map, pchan->name);
/* Making sure bone is in this armature */
- if (link != NULL)
- {
+ if (link != NULL) {
/* for pole targets, link to parent bone instead, if possible */
- if (con->type == CONSTRAINT_TYPE_KINEMATIC && target_index == 1)
- {
- if (link->parent && BLI_ghash_haskey(rg->bones_map, link->parent->name))
- {
+ if (con->type == CONSTRAINT_TYPE_KINEMATIC && target_index == 1) {
+ if (link->parent && BLI_ghash_haskey(rg->bones_map, link->parent->name)) {
link = link->parent;
}
}
@@ -831,10 +770,8 @@ static void RIG_reconnectControlBones(RigGraph *rg)
}
/* if not found yet, check parent */
- if (found == 0)
- {
- if (ctrl->bone->parent)
- {
+ if (found == 0) {
+ if (ctrl->bone->parent) {
/* make sure parent is a deforming bone
* NULL if not
* */
@@ -849,24 +786,19 @@ static void RIG_reconnectControlBones(RigGraph *rg)
RigArc *best_arc = NULL;
EditBone *link = NULL;
- for (arc = rg->arcs.first; arc; arc = arc->next)
- {
+ for (arc = rg->arcs.first; arc; arc = arc->next) {
RigEdge *edge;
- for (edge = arc->edges.first; edge; edge = edge->next)
- {
- if (edge->bone)
- {
+ for (edge = arc->edges.first; edge; edge = edge->next) {
+ if (edge->bone) {
int fit = 0;
fit = len_v3v3(ctrl->bone->head, edge->bone->head) < 0.0001f;
fit = fit || len_v3v3(ctrl->bone->tail, edge->bone->tail) < 0.0001f;
- if (fit)
- {
+ if (fit) {
/* pick the bone on the arc with the lowest symmetry level
* means you connect control to the trunk of the skeleton */
- if (best_arc == NULL || arc->symmetry_level < best_arc->symmetry_level)
- {
+ if (best_arc == NULL || arc->symmetry_level < best_arc->symmetry_level) {
best_arc = arc;
link = edge->bone;
}
@@ -880,23 +812,18 @@ static void RIG_reconnectControlBones(RigGraph *rg)
}
/* if not found yet, check child */
- if (found == 0)
- {
+ if (found == 0) {
RigArc *arc;
RigArc *best_arc = NULL;
EditBone *link = NULL;
- for (arc = rg->arcs.first; arc; arc = arc->next)
- {
+ for (arc = rg->arcs.first; arc; arc = arc->next) {
RigEdge *edge;
- for (edge = arc->edges.first; edge; edge = edge->next)
- {
- if (edge->bone && edge->bone->parent == ctrl->bone)
- {
+ for (edge = arc->edges.first; edge; edge = edge->next) {
+ if (edge->bone && edge->bone->parent == ctrl->bone) {
/* pick the bone on the arc with the lowest symmetry level
* means you connect control to the trunk of the skeleton */
- if (best_arc == NULL || arc->symmetry_level < best_arc->symmetry_level)
- {
+ if (best_arc == NULL || arc->symmetry_level < best_arc->symmetry_level) {
best_arc = arc;
link = edge->bone;
}
@@ -911,52 +838,42 @@ static void RIG_reconnectControlBones(RigGraph *rg)
/* second pass, make chains in control bones */
- while (change)
- {
+ while (change) {
change = 0;
- for (ctrl = rg->controls.first; ctrl; ctrl = ctrl->next)
- {
+ for (ctrl = rg->controls.first; ctrl; ctrl = ctrl->next) {
/* if control is not linked yet */
- if (ctrl->link == NULL)
- {
+ if (ctrl->link == NULL) {
bPoseChannel *pchan;
bConstraint *con;
RigControl *ctrl_parent = NULL;
RigControl *ctrl_child;
int found = 0;
- if (ctrl->bone->parent)
- {
+ if (ctrl->bone->parent) {
ctrl_parent = BLI_ghash_lookup(rg->controls_map, ctrl->bone->parent->name);
}
/* check constraints first */
/* DO SOME MAGIC HERE */
- for (pchan= rg->ob->pose->chanbase.first; pchan; pchan= pchan->next)
- {
- for (con= pchan->constraints.first; con; con= con->next)
- {
- bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
+ for (pchan = rg->ob->pose->chanbase.first; pchan; pchan = pchan->next) {
+ for (con = pchan->constraints.first; con; con = con->next) {
+ bConstraintTypeInfo *cti = constraint_get_typeinfo(con);
ListBase targets = {NULL, NULL};
bConstraintTarget *ct;
/* constraint targets */
- if (cti && cti->get_constraint_targets)
- {
+ if (cti && cti->get_constraint_targets) {
cti->get_constraint_targets(con, &targets);
- for (ct= targets.first; ct; ct= ct->next)
- {
- if ((ct->tar == rg->ob) && strcmp(ct->subtarget, ctrl->bone->name) == 0)
- {
+ for (ct = targets.first; ct; ct = ct->next) {
+ if ((ct->tar == rg->ob) && strcmp(ct->subtarget, ctrl->bone->name) == 0) {
/* SET bone link to ctrl corresponding to pchan */
RigControl *link = BLI_ghash_lookup(rg->controls_map, pchan->name);
/* if owner is a control bone, link with it */
- if (link && link->link)
- {
+ if (link && link->link) {
RIG_parentControl(ctrl, link->bone);
found = 1;
break;
@@ -970,22 +887,17 @@ static void RIG_reconnectControlBones(RigGraph *rg)
}
}
- if (found == 0)
- {
+ if (found == 0) {
/* check if parent is already linked */
- if (ctrl_parent && ctrl_parent->link)
- {
+ if (ctrl_parent && ctrl_parent->link) {
RIG_parentControl(ctrl, ctrl_parent->bone);
change = 1;
}
- else
- {
+ else {
/* check childs */
- for (ctrl_child = rg->controls.first; ctrl_child; ctrl_child = ctrl_child->next)
- {
+ for (ctrl_child = rg->controls.first; ctrl_child; ctrl_child = ctrl_child->next) {
/* if a child is linked, link to that one */
- if (ctrl_child->link && ctrl_child->bone->parent == ctrl->bone)
- {
+ if (ctrl_child->link && ctrl_child->bone->parent == ctrl->bone) {
RIG_parentControl(ctrl, ctrl_child->bone);
change = 1;
break;
@@ -998,31 +910,25 @@ static void RIG_reconnectControlBones(RigGraph *rg)
}
/* third pass, link control tails */
- for (ctrl = rg->controls.first; ctrl; ctrl = ctrl->next)
- {
+ for (ctrl = rg->controls.first; ctrl; ctrl = ctrl->next) {
/* fit bone already means full match, so skip those */
- if ((ctrl->flag & RIG_CTRL_FIT_BONE) == 0)
- {
+ if ((ctrl->flag & RIG_CTRL_FIT_BONE) == 0) {
GHashIterator ghi;
/* look on deform bones first */
BLI_ghashIterator_init(&ghi, rg->bones_map);
- for ( ; !BLI_ghashIterator_isDone(&ghi); BLI_ghashIterator_step(&ghi))
- {
- EditBone *bone = (EditBone*)BLI_ghashIterator_getValue(&ghi);
+ for (; !BLI_ghashIterator_isDone(&ghi); BLI_ghashIterator_step(&ghi)) {
+ EditBone *bone = (EditBone *)BLI_ghashIterator_getValue(&ghi);
/* don't link with parent */
- if (bone->parent != ctrl->bone)
- {
- if (len_v3v3(ctrl->bone->tail, bone->head) < 0.01f)
- {
+ if (bone->parent != ctrl->bone) {
+ if (len_v3v3(ctrl->bone->tail, bone->head) < 0.01f) {
ctrl->tail_mode = TL_HEAD;
ctrl->link_tail = bone;
break;
}
- else if (len_v3v3(ctrl->bone->tail, bone->tail) < 0.01f)
- {
+ else if (len_v3v3(ctrl->bone->tail, bone->tail) < 0.01f) {
ctrl->tail_mode = TL_TAIL;
ctrl->link_tail = bone;
break;
@@ -1031,8 +937,7 @@ static void RIG_reconnectControlBones(RigGraph *rg)
}
/* if we haven't found one yet, look in control bones */
- if (ctrl->tail_mode == TL_NONE)
- {
+ if (ctrl->tail_mode == TL_NONE) {
}
}
}
@@ -1046,21 +951,18 @@ static void RIG_joinArcs(RigGraph *rg, RigNode *node, RigArc *joined_arc1, RigAr
RigEdge *edge, *next_edge;
/* ignore cases where joint is at start or end */
- if (joined_arc1->head == joined_arc2->head || joined_arc1->tail == joined_arc2->tail)
- {
+ if (joined_arc1->head == joined_arc2->head || joined_arc1->tail == joined_arc2->tail) {
return;
}
/* swap arcs to make sure arc1 is before arc2 */
- if (joined_arc1->head == joined_arc2->tail)
- {
+ if (joined_arc1->head == joined_arc2->tail) {
RigArc *tmp = joined_arc1;
joined_arc1 = joined_arc2;
joined_arc2 = tmp;
}
- for (edge = joined_arc2->edges.first; edge; edge = next_edge)
- {
+ for (edge = joined_arc2->edges.first; edge; edge = next_edge) {
next_edge = edge->next;
RIG_appendEdgeToArc(joined_arc1, edge);
@@ -1070,33 +972,27 @@ static void RIG_joinArcs(RigGraph *rg, RigNode *node, RigArc *joined_arc1, RigAr
joined_arc2->edges.first = joined_arc2->edges.last = NULL;
- BLI_removeArc((BGraph*)rg, (BArc*)joined_arc2);
+ BLI_removeArc((BGraph *)rg, (BArc *)joined_arc2);
- BLI_removeNode((BGraph*)rg, (BNode*)node);
+ BLI_removeNode((BGraph *)rg, (BNode *)node);
}
static void RIG_removeNormalNodes(RigGraph *rg)
{
RigNode *node, *next_node;
- for (node = rg->nodes.first; node; node = next_node)
- {
+ for (node = rg->nodes.first; node; node = next_node) {
next_node = node->next;
- if (node->degree == 2)
- {
+ if (node->degree == 2) {
RigArc *arc, *joined_arc1 = NULL, *joined_arc2 = NULL;
- for (arc = rg->arcs.first; arc; arc = arc->next)
- {
- if (arc->head == node || arc->tail == node)
- {
- if (joined_arc1 == NULL)
- {
+ for (arc = rg->arcs.first; arc; arc = arc->next) {
+ if (arc->head == node || arc->tail == node) {
+ if (joined_arc1 == NULL) {
joined_arc1 = arc;
}
- else
- {
+ else {
joined_arc2 = arc;
break;
}
@@ -1112,36 +1008,29 @@ static void RIG_removeUneededOffsets(RigGraph *rg)
{
RigArc *arc;
- for (arc = rg->arcs.first; arc; arc = arc->next)
- {
+ for (arc = rg->arcs.first; arc; arc = arc->next) {
RigEdge *first_edge, *last_edge;
first_edge = arc->edges.first;
last_edge = arc->edges.last;
- if (first_edge->bone == NULL)
- {
- if (first_edge->bone == NULL && len_v3v3(first_edge->tail, arc->head->p) <= 0.001f)
- {
+ if (first_edge->bone == NULL) {
+ if (first_edge->bone == NULL && len_v3v3(first_edge->tail, arc->head->p) <= 0.001f) {
BLI_remlink(&arc->edges, first_edge);
MEM_freeN(first_edge);
}
- else if (arc->head->degree == 1)
- {
- RigNode *new_node = (RigNode*)BLI_FindNodeByPosition((BGraph*)rg, first_edge->tail, 0.001f);
+ else if (arc->head->degree == 1) {
+ RigNode *new_node = (RigNode *)BLI_FindNodeByPosition((BGraph *)rg, first_edge->tail, 0.001f);
- if (new_node)
- {
+ if (new_node) {
BLI_remlink(&arc->edges, first_edge);
MEM_freeN(first_edge);
- BLI_replaceNodeInArc((BGraph*)rg, (BArc*)arc, (BNode*)new_node, (BNode*)arc->head);
+ BLI_replaceNodeInArc((BGraph *)rg, (BArc *)arc, (BNode *)new_node, (BNode *)arc->head);
}
- else
- {
+ else {
RigEdge *next_edge = first_edge->next;
- if (next_edge)
- {
+ if (next_edge) {
BLI_remlink(&arc->edges, first_edge);
MEM_freeN(first_edge);
@@ -1149,58 +1038,45 @@ static void RIG_removeUneededOffsets(RigGraph *rg)
}
}
}
- else
- {
+ else {
/* check if all arc connected start with a null edge */
RigArc *other_arc;
- for (other_arc = rg->arcs.first; other_arc; other_arc = other_arc->next)
- {
- if (other_arc != arc)
- {
+ for (other_arc = rg->arcs.first; other_arc; other_arc = other_arc->next) {
+ if (other_arc != arc) {
RigEdge *test_edge;
- if (other_arc->head == arc->head)
- {
+ if (other_arc->head == arc->head) {
test_edge = other_arc->edges.first;
- if (test_edge->bone != NULL)
- {
+ if (test_edge->bone != NULL) {
break;
}
}
- else if (other_arc->tail == arc->head)
- {
+ else if (other_arc->tail == arc->head) {
test_edge = other_arc->edges.last;
- if (test_edge->bone != NULL)
- {
+ if (test_edge->bone != NULL) {
break;
}
}
}
}
- if (other_arc == NULL)
- {
- RigNode *new_node = (RigNode*)BLI_FindNodeByPosition((BGraph*)rg, first_edge->tail, 0.001);
+ if (other_arc == NULL) {
+ RigNode *new_node = (RigNode *)BLI_FindNodeByPosition((BGraph *)rg, first_edge->tail, 0.001);
- if (new_node)
- {
+ if (new_node) {
/* remove null edge in other arcs too */
- for (other_arc = rg->arcs.first; other_arc; other_arc = other_arc->next)
- {
- if (other_arc != arc)
- {
+ for (other_arc = rg->arcs.first; other_arc; other_arc = other_arc->next) {
+ if (other_arc != arc) {
RigEdge *test_edge;
- if (other_arc->head == arc->head)
- {
- BLI_replaceNodeInArc((BGraph*)rg, (BArc*)other_arc, (BNode*)new_node, (BNode*)other_arc->head);
+ if (other_arc->head == arc->head) {
+ BLI_replaceNodeInArc((BGraph *)rg, (BArc *)other_arc, (BNode *)new_node, (BNode *)other_arc->head);
test_edge = other_arc->edges.first;
BLI_remlink(&other_arc->edges, test_edge);
MEM_freeN(test_edge);
}
- else if (other_arc->tail == arc->head)
- {
- BLI_replaceNodeInArc((BGraph*)rg, (BArc*)other_arc, (BNode*)new_node, (BNode*)other_arc->tail);
+ else if (other_arc->tail == arc->head) {
+ BLI_replaceNodeInArc((BGraph *)rg, (BArc *)other_arc, (BNode *)new_node, (BNode *)other_arc->tail);
test_edge = other_arc->edges.last;
BLI_remlink(&other_arc->edges, test_edge);
MEM_freeN(test_edge);
@@ -1210,33 +1086,27 @@ static void RIG_removeUneededOffsets(RigGraph *rg)
BLI_remlink(&arc->edges, first_edge);
MEM_freeN(first_edge);
- BLI_replaceNodeInArc((BGraph*)rg, (BArc*)arc, (BNode*)new_node, (BNode*)arc->head);
+ BLI_replaceNodeInArc((BGraph *)rg, (BArc *)arc, (BNode *)new_node, (BNode *)arc->head);
}
- else
- {
+ else {
RigEdge *next_edge = first_edge->next;
- if (next_edge)
- {
+ if (next_edge) {
BLI_remlink(&arc->edges, first_edge);
MEM_freeN(first_edge);
copy_v3_v3(arc->head->p, next_edge->head);
/* remove null edge in other arcs too */
- for (other_arc = rg->arcs.first; other_arc; other_arc = other_arc->next)
- {
- if (other_arc != arc)
- {
+ for (other_arc = rg->arcs.first; other_arc; other_arc = other_arc->next) {
+ if (other_arc != arc) {
RigEdge *test_edge;
- if (other_arc->head == arc->head)
- {
+ if (other_arc->head == arc->head) {
test_edge = other_arc->edges.first;
BLI_remlink(&other_arc->edges, test_edge);
MEM_freeN(test_edge);
}
- else if (other_arc->tail == arc->head)
- {
+ else if (other_arc->tail == arc->head) {
test_edge = other_arc->edges.last;
BLI_remlink(&other_arc->edges, test_edge);
MEM_freeN(test_edge);
@@ -1249,37 +1119,30 @@ static void RIG_removeUneededOffsets(RigGraph *rg)
}
}
- if (last_edge->bone == NULL)
- {
- if (len_v3v3(last_edge->head, arc->tail->p) <= 0.001f)
- {
+ if (last_edge->bone == NULL) {
+ if (len_v3v3(last_edge->head, arc->tail->p) <= 0.001f) {
BLI_remlink(&arc->edges, last_edge);
MEM_freeN(last_edge);
}
- else if (arc->tail->degree == 1)
- {
- RigNode *new_node = (RigNode*)BLI_FindNodeByPosition((BGraph*)rg, last_edge->head, 0.001f);
+ else if (arc->tail->degree == 1) {
+ RigNode *new_node = (RigNode *)BLI_FindNodeByPosition((BGraph *)rg, last_edge->head, 0.001f);
- if (new_node)
- {
+ if (new_node) {
RigEdge *previous_edge = last_edge->prev;
BLI_remlink(&arc->edges, last_edge);
MEM_freeN(last_edge);
- BLI_replaceNodeInArc((BGraph*)rg, (BArc*)arc, (BNode*)new_node, (BNode*)arc->tail);
+ BLI_replaceNodeInArc((BGraph *)rg, (BArc *)arc, (BNode *)new_node, (BNode *)arc->tail);
/* set previous angle to 0, since there's no following edges */
- if (previous_edge)
- {
+ if (previous_edge) {
previous_edge->angle = 0;
}
}
- else
- {
+ else {
RigEdge *previous_edge = last_edge->prev;
- if (previous_edge)
- {
+ if (previous_edge) {
BLI_remlink(&arc->edges, last_edge);
MEM_freeN(last_edge);
@@ -1298,32 +1161,25 @@ static void RIG_arcFromBoneChain(RigGraph *rg, ListBase *list, EditBone *root_bo
RigArc *arc = NULL;
int contain_head = 0;
- for (bone = root_bone; bone; bone = nextEditBoneChild(list, bone, 0))
- {
+ for (bone = root_bone; bone; bone = nextEditBoneChild(list, bone, 0)) {
int nb_children;
- if (selected == 0 || (bone->flag & BONE_SELECTED))
- {
- if ((bone->flag & BONE_NO_DEFORM) == 0)
- {
+ if (selected == 0 || (bone->flag & BONE_SELECTED)) {
+ if ((bone->flag & BONE_NO_DEFORM) == 0) {
BLI_ghash_insert(rg->bones_map, bone->name, bone);
- if (arc == NULL)
- {
+ if (arc == NULL) {
arc = newRigArc(rg);
- if (starting_node == NULL)
- {
+ if (starting_node == NULL) {
starting_node = newRigNodeHead(rg, arc, root_bone->head);
}
- else
- {
+ else {
addRigNodeHead(rg, arc, starting_node);
}
}
- if (bone->parent && (bone->flag & BONE_CONNECTED) == 0)
- {
+ if (bone->parent && (bone->flag & BONE_CONNECTED) == 0) {
RIG_addEdgeToArc(arc, bone->head, NULL);
}
@@ -1331,34 +1187,28 @@ static void RIG_arcFromBoneChain(RigGraph *rg, ListBase *list, EditBone *root_bo
last_bone = bone;
- if (strcmp(bone->name, "head") == 0)
- {
+ if (strcmp(bone->name, "head") == 0) {
contain_head = 1;
}
}
- else if ((bone->flag & BONE_EDITMODE_LOCKED) == 0) /* ignore locked bones */
- {
+ else if ((bone->flag & BONE_EDITMODE_LOCKED) == 0) { /* ignore locked bones */
RIG_addControlBone(rg, bone);
}
}
nb_children = countEditBoneChildren(list, bone);
- if (nb_children > 1)
- {
+ if (nb_children > 1) {
RigNode *end_node = NULL;
int i;
- if (arc != NULL)
- {
+ if (arc != NULL) {
end_node = newRigNodeTail(rg, arc, bone->tail);
}
- else
- {
+ else {
end_node = newRigNode(rg, bone->tail);
}
- for (i = 0; i < nb_children; i++)
- {
+ for (i = 0; i < nb_children; i++) {
root_bone = nextEditBoneChild(list, bone, i);
RIG_arcFromBoneChain(rg, list, root_bone, end_node, selected);
}
@@ -1369,13 +1219,11 @@ static void RIG_arcFromBoneChain(RigGraph *rg, ListBase *list, EditBone *root_bo
}
/* If the loop exited without forking */
- if (arc != NULL && bone == NULL)
- {
+ if (arc != NULL && bone == NULL) {
newRigNodeTail(rg, arc, last_bone->tail);
}
- if (contain_head)
- {
+ if (contain_head) {
rg->head = arc->tail;
}
}
@@ -1383,32 +1231,26 @@ static void RIG_arcFromBoneChain(RigGraph *rg, ListBase *list, EditBone *root_bo
/*******************************************************************************************************/
static void RIG_findHead(RigGraph *rg)
{
- if (rg->head == NULL)
- {
- if (BLI_countlist(&rg->arcs) == 1)
- {
+ if (rg->head == NULL) {
+ if (BLI_countlist(&rg->arcs) == 1) {
RigArc *arc = rg->arcs.first;
- rg->head = (RigNode*)arc->head;
+ rg->head = (RigNode *)arc->head;
}
- else
- {
+ else {
RigArc *arc;
- for (arc = rg->arcs.first; arc; arc = arc->next)
- {
+ for (arc = rg->arcs.first; arc; arc = arc->next) {
RigEdge *edge = arc->edges.last;
- if (edge->bone->flag & (BONE_TIPSEL|BONE_SELECTED))
- {
+ if (edge->bone->flag & (BONE_TIPSEL | BONE_SELECTED)) {
rg->head = arc->tail;
break;
}
}
}
- if (rg->head == NULL)
- {
+ if (rg->head == NULL) {
rg->head = rg->nodes.first;
}
}
@@ -1420,8 +1262,7 @@ static void RIG_printNode(RigNode *node, const char name[])
{
printf("%s %p %i <%0.3f, %0.3f, %0.3f>\n", name, (void *)node, node->degree, node->p[0], node->p[1], node->p[2]);
- if (node->symmetry_flag & SYM_TOPOLOGICAL)
- {
+ if (node->symmetry_flag & SYM_TOPOLOGICAL) {
if (node->symmetry_flag & SYM_AXIAL)
printf("Symmetry AXIAL\n");
else if (node->symmetry_flag & SYM_RADIAL)
@@ -1435,8 +1276,7 @@ void RIG_printArcBones(RigArc *arc)
{
RigEdge *edge;
- for (edge = arc->edges.first; edge; edge = edge->next)
- {
+ for (edge = arc->edges.first; edge; edge = edge->next) {
if (edge->bone)
printf("%s ", edge->bone->name);
else
@@ -1465,17 +1305,14 @@ static void RIG_printLinkedCtrl(RigGraph *rg, EditBone *bone, int tabs)
char *s = indent;
int i;
- for (i = 0; i < tabs; i++)
- {
+ for (i = 0; i < tabs; i++) {
s[0] = '\t';
s++;
}
s[0] = 0;
- for (ctrl = rg->controls.first; ctrl; ctrl = ctrl->next)
- {
- if (ctrl->link == bone)
- {
+ for (ctrl = rg->controls.first; ctrl; ctrl = ctrl->next) {
+ if (ctrl->link == bone) {
RIG_printCtrl(ctrl, indent);
RIG_printLinkedCtrl(rg, ctrl->bone, tabs + 1);
}
@@ -1486,22 +1323,20 @@ void RIG_printArc(RigGraph *rg, RigArc *arc)
{
RigEdge *edge;
- RIG_printNode((RigNode*)arc->head, "head");
+ RIG_printNode((RigNode *)arc->head, "head");
- for (edge = arc->edges.first; edge; edge = edge->next)
- {
+ for (edge = arc->edges.first; edge; edge = edge->next) {
printf("\tinner joints %0.3f %0.3f %0.3f\n", edge->tail[0], edge->tail[1], edge->tail[2]);
printf("\t\tlength %f\n", edge->length);
printf("\t\tangle %f\n", edge->angle * 180 / M_PI);
- if (edge->bone)
- {
+ if (edge->bone) {
printf("\t\t%s\n", edge->bone->name);
RIG_printLinkedCtrl(rg, edge->bone, 3);
}
}
printf("symmetry level: %i flag: %i group %i\n", arc->symmetry_level, arc->symmetry_flag, arc->symmetry_group);
- RIG_printNode((RigNode*)arc->tail, "tail");
+ RIG_printNode((RigNode *)arc->tail, "tail");
}
void RIG_printGraph(RigGraph *rg)
@@ -1509,18 +1344,15 @@ void RIG_printGraph(RigGraph *rg)
RigArc *arc;
printf("---- ARCS ----\n");
- for (arc = rg->arcs.first; arc; arc = arc->next)
- {
+ for (arc = rg->arcs.first; arc; arc = arc->next) {
RIG_printArc(rg, arc);
printf("\n");
}
- if (rg->head)
- {
+ if (rg->head) {
RIG_printNode(rg->head, "HEAD NODE:");
}
- else
- {
+ else {
printf("HEAD NODE: NONE\n");
}
}
@@ -1536,12 +1368,10 @@ RigGraph *RIG_graphFromArmature(const bContext *C, Object *ob, bArmature *arm)
rg = newRigGraph();
- if (obedit == ob)
- {
+ if (obedit == ob) {
rg->editbones = ((bArmature *)obedit->data)->edbo;
}
- else
- {
+ else {
rg->editbones = MEM_callocN(sizeof(ListBase), "EditBones");
make_boneList(rg->editbones, &arm->bonebase, NULL, NULL);
rg->flag |= RIG_FREE_BONELIST;
@@ -1550,29 +1380,27 @@ RigGraph *RIG_graphFromArmature(const bContext *C, Object *ob, bArmature *arm)
rg->ob = ob;
/* Do the rotations */
- for (ebone = rg->editbones->first; ebone; ebone=ebone->next) {
- if (ebone->parent == NULL)
- {
+ for (ebone = rg->editbones->first; ebone; ebone = ebone->next) {
+ if (ebone->parent == NULL) {
RIG_arcFromBoneChain(rg, rg->editbones, ebone, NULL, 0);
}
}
- BLI_removeDoubleNodes((BGraph*)rg, 0.001);
+ BLI_removeDoubleNodes((BGraph *)rg, 0.001);
RIG_removeNormalNodes(rg);
RIG_removeUneededOffsets(rg);
- BLI_buildAdjacencyList((BGraph*)rg);
+ BLI_buildAdjacencyList((BGraph *)rg);
RIG_findHead(rg);
- BLI_markdownSymmetry((BGraph*)rg, (BNode*)rg->head, scene->toolsettings->skgen_symmetry_limit);
+ BLI_markdownSymmetry((BGraph *)rg, (BNode *)rg->head, scene->toolsettings->skgen_symmetry_limit);
RIG_reconnectControlBones(rg); /* after symmetry, because we use levels to find best match */
- if (BLI_isGraphCyclic((BGraph*)rg))
- {
+ if (BLI_isGraphCyclic((BGraph *)rg)) {
printf("armature cyclic\n");
}
@@ -1588,12 +1416,10 @@ static RigGraph *armatureSelectedToGraph(bContext *C, Object *ob, bArmature *arm
rg = newRigGraph();
- if (obedit == ob)
- {
+ if (obedit == ob) {
rg->editbones = arm->edbo;
}
- else
- {
+ else {
rg->editbones = MEM_callocN(sizeof(ListBase), "EditBones");
make_boneList(rg->editbones, &arm->bonebase, NULL, NULL);
rg->flag |= RIG_FREE_BONELIST;
@@ -1602,29 +1428,27 @@ static RigGraph *armatureSelectedToGraph(bContext *C, Object *ob, bArmature *arm
rg->ob = ob;
/* Do the rotations */
- for (ebone = rg->editbones->first; ebone; ebone=ebone->next) {
- if (ebone->parent == NULL)
- {
+ for (ebone = rg->editbones->first; ebone; ebone = ebone->next) {
+ if (ebone->parent == NULL) {
RIG_arcFromBoneChain(rg, rg->editbones, ebone, NULL, 1);
}
}
- BLI_removeDoubleNodes((BGraph*)rg, 0.001);
+ BLI_removeDoubleNodes((BGraph *)rg, 0.001);
RIG_removeNormalNodes(rg);
RIG_removeUneededOffsets(rg);
- BLI_buildAdjacencyList((BGraph*)rg);
+ BLI_buildAdjacencyList((BGraph *)rg);
RIG_findHead(rg);
- BLI_markdownSymmetry((BGraph*)rg, (BNode*)rg->head, scene->toolsettings->skgen_symmetry_limit);
+ BLI_markdownSymmetry((BGraph *)rg, (BNode *)rg->head, scene->toolsettings->skgen_symmetry_limit);
RIG_reconnectControlBones(rg); /* after symmetry, because we use levels to find best match */
- if (BLI_isGraphCyclic((BGraph*)rg))
- {
+ if (BLI_isGraphCyclic((BGraph *)rg)) {
printf("armature cyclic\n");
}
@@ -1635,7 +1459,7 @@ static RigGraph *armatureSelectedToGraph(bContext *C, Object *ob, bArmature *arm
#if 0
static EditBone *add_editbonetolist(char *name, ListBase *list)
{
- EditBone *bone= MEM_callocN(sizeof(EditBone), "eBone");
+ EditBone *bone = MEM_callocN(sizeof(EditBone), "eBone");
BLI_strncpy(bone->name, name, sizeof(bone->name));
unique_editbone_name(list, bone->name, NULL);
@@ -1643,16 +1467,16 @@ static EditBone *add_editbonetolist(char *name, ListBase *list)
BLI_addtail(list, bone);
bone->flag |= BONE_TIPSEL;
- bone->weight= 1.0F;
- bone->dist= 0.25F;
- bone->xwidth= 0.1;
- bone->zwidth= 0.1;
- bone->ease1= 1.0;
- bone->ease2= 1.0;
- bone->rad_head= 0.10;
- bone->rad_tail= 0.05;
- bone->segments= 1;
- bone->layer= 1;//arm->layer;
+ bone->weight = 1.0F;
+ bone->dist = 0.25F;
+ bone->xwidth = 0.1;
+ bone->zwidth = 0.1;
+ bone->ease1 = 1.0;
+ bone->ease2 = 1.0;
+ bone->rad_head = 0.10;
+ bone->rad_tail = 0.05;
+ bone->segments = 1;
+ bone->layer = 1; //arm->layer;
return bone;
}
@@ -1721,8 +1545,7 @@ static void repositionTailControl(RigGraph *rigg, RigControl *ctrl);
static void finalizeControl(RigGraph *rigg, RigControl *ctrl, float resize)
{
- if ((ctrl->flag & RIG_CTRL_DONE) == RIG_CTRL_DONE)
- {
+ if ((ctrl->flag & RIG_CTRL_DONE) == RIG_CTRL_DONE) {
RigControl *ctrl_child;
#if 0
@@ -1737,17 +1560,14 @@ static void finalizeControl(RigGraph *rigg, RigControl *ctrl, float resize)
#endif
/* if there was a tail link: apply link, recalc resize factor and qrot */
- if (ctrl->tail_mode != TL_NONE)
- {
+ if (ctrl->tail_mode != TL_NONE) {
float *tail_vec = NULL;
float v1[3], v2[3], qtail[4];
- if (ctrl->tail_mode == TL_TAIL)
- {
+ if (ctrl->tail_mode == TL_TAIL) {
tail_vec = ctrl->link_tail->tail;
}
- else if (ctrl->tail_mode == TL_HEAD)
- {
+ else if (ctrl->tail_mode == TL_HEAD) {
tail_vec = ctrl->link_tail->head;
}
@@ -1765,14 +1585,11 @@ static void finalizeControl(RigGraph *rigg, RigControl *ctrl, float resize)
ctrl->bone->roll = rollBoneByQuat(ctrl->bone, ctrl->up_axis, ctrl->qrot);
/* Cascade to connected control bones */
- for (ctrl_child = rigg->controls.first; ctrl_child; ctrl_child = ctrl_child->next)
- {
- if (ctrl_child->link == ctrl->bone)
- {
+ for (ctrl_child = rigg->controls.first; ctrl_child; ctrl_child = ctrl_child->next) {
+ if (ctrl_child->link == ctrl->bone) {
repositionControl(rigg, ctrl_child, ctrl->bone->head, ctrl->bone->tail, ctrl->qrot, resize);
}
- if (ctrl_child->link_tail == ctrl->bone)
- {
+ if (ctrl_child->link_tail == ctrl->bone) {
repositionTailControl(rigg, ctrl_child);
}
}
@@ -1800,8 +1617,7 @@ static void repositionControl(RigGraph *rigg, RigControl *ctrl, float head[3], f
copy_qt_qt(ctrl->qrot, qrot);
- if (ctrl->tail_mode == TL_NONE)
- {
+ if (ctrl->tail_mode == TL_NONE) {
sub_v3_v3v3(tail_offset, ctrl->tail, ctrl->head);
mul_v3_fl(tail_offset, resize);
mul_qt_v3(qrot, tail_offset);
@@ -1838,38 +1654,30 @@ static void repositionBone(bContext *C, RigGraph *rigg, RigEdge *edge, float vec
copy_v3_v3(bone->head, vec0);
copy_v3_v3(bone->tail, vec1);
- if (!is_zero_v3(up_axis))
- {
+ if (!is_zero_v3(up_axis)) {
float qroll[4];
- if (scene->toolsettings->skgen_retarget_roll == SK_RETARGET_ROLL_VIEW)
- {
+ if (scene->toolsettings->skgen_retarget_roll == SK_RETARGET_ROLL_VIEW) {
bone->roll = rollBoneByQuatAligned(bone, edge->up_axis, qrot, qroll, up_axis);
}
- else if (scene->toolsettings->skgen_retarget_roll == SK_RETARGET_ROLL_JOINT)
- {
+ else if (scene->toolsettings->skgen_retarget_roll == SK_RETARGET_ROLL_JOINT) {
bone->roll = rollBoneByQuatJoint(edge, edge->prev, qrot, qroll, up_axis);
}
- else
- {
+ else {
unit_qt(qroll);
}
mul_qt_qtqt(qrot, qroll, qrot);
}
- else
- {
+ else {
bone->roll = rollBoneByQuat(bone, edge->up_axis, qrot);
}
- for (ctrl = rigg->controls.first; ctrl; ctrl = ctrl->next)
- {
- if (ctrl->link == bone)
- {
+ for (ctrl = rigg->controls.first; ctrl; ctrl = ctrl->next) {
+ if (ctrl->link == bone) {
repositionControl(rigg, ctrl, vec0, vec1, qrot, resize);
}
- if (ctrl->link_tail == bone)
- {
+ if (ctrl->link_tail == bone) {
repositionTailControl(rigg, ctrl);
}
}
@@ -1890,8 +1698,7 @@ static RetargetMode detectArcRetargetMode(RigArc *iarc)
int nb_edges = 0;
- for (edge = iarc->edges.first; edge; edge = edge->next)
- {
+ for (edge = iarc->edges.first; edge; edge = edge->next) {
avg_angle += edge->angle;
nb_edges++;
}
@@ -1901,29 +1708,23 @@ static RetargetMode detectArcRetargetMode(RigArc *iarc)
/* avg_length = iarc->length / nb_edges; */ /* UNUSED */
- if (nb_edges > 2)
- {
- for (edge = iarc->edges.first; edge; edge = edge->next)
- {
- if (fabs(edge->angle - avg_angle) > M_PI / 6)
- {
+ if (nb_edges > 2) {
+ for (edge = iarc->edges.first; edge; edge = edge->next) {
+ if (fabs(edge->angle - avg_angle) > M_PI / 6) {
large_angle = 1;
}
}
}
- else if (nb_edges == 2 && avg_angle > 0)
- {
+ else if (nb_edges == 2 && avg_angle > 0) {
large_angle = 1;
}
- if (large_angle == 0)
- {
+ if (large_angle == 0) {
mode = RETARGET_LENGTH;
}
- if (earc->bcount <= (iarc->count - 1))
- {
+ if (earc->bcount <= (iarc->count - 1)) {
mode = RETARGET_LENGTH;
}
@@ -1936,8 +1737,7 @@ static void printMovesNeeded(int *positions, int nb_positions)
int moves = 0;
int i;
- for (i = 0; i < nb_positions; i++)
- {
+ for (i = 0; i < nb_positions; i++) {
moves += positions[i] - (i + 1);
}
@@ -1948,8 +1748,7 @@ static void printPositions(int *positions, int nb_positions)
{
int i;
- for (i = 0; i < nb_positions; i++)
- {
+ for (i = 0; i < nb_positions; i++) {
printf("%i ", positions[i]);
}
printf("\n");
@@ -1965,17 +1764,14 @@ static float costDistance(BArcIterator *iter, float *vec0, float *vec1, int i0,
float v1[3], v2[3], c[3];
float v1_inpf;
- if (distance_weight > 0)
- {
+ if (distance_weight > 0) {
sub_v3_v3v3(v1, vec0, vec1);
v1_inpf = dot_v3v3(v1, v1);
- if (v1_inpf > 0)
- {
+ if (v1_inpf > 0) {
int j;
- for (j = i0 + 1; j < i1 - 1; j++)
- {
+ for (j = i0 + 1; j < i1 - 1; j++) {
float dist;
bucket = IT_peek(iter, j);
@@ -1991,48 +1787,40 @@ static float costDistance(BArcIterator *iter, float *vec0, float *vec1, int i0,
return distance_weight * max_dist;
}
- else
- {
+ else {
return MAX_COST;
}
}
- else
- {
+ else {
return 0;
}
}
static float costAngle(float original_angle, float vec_first[3], float vec_second[3], float angle_weight)
{
- if (angle_weight > 0)
- {
+ if (angle_weight > 0) {
float current_angle;
- if (!is_zero_v3(vec_first) && !is_zero_v3(vec_second))
- {
+ if (!is_zero_v3(vec_first) && !is_zero_v3(vec_second)) {
current_angle = saacos(dot_v3v3(vec_first, vec_second));
return angle_weight * fabsf(current_angle - original_angle);
}
- else
- {
+ else {
return angle_weight * (float)M_PI;
}
}
- else
- {
+ else {
return 0;
}
}
static float costLength(float original_length, float current_length, float length_weight)
{
- if (current_length == 0)
- {
+ if (current_length == 0) {
return MAX_COST;
}
- else
- {
+ else {
float length_ratio = fabs((current_length - original_length) / original_length);
return length_weight * length_ratio * length_ratio;
}
@@ -2062,8 +1850,7 @@ static float calcCostAngleLengthDistance(BArcIterator *iter, float **UNUSED(vec_
/* Angle cost */
- if (edge->prev)
- {
+ if (edge->prev) {
sub_v3_v3v3(vec_first, vec1, vec0);
normalize_v3(vec_first);
@@ -2089,8 +1876,7 @@ static void copyMemoPositions(int *positions, MemoNode *table, int nb_positions,
int previous = 0, current = 0;
int i = 0;
- for (i = 0; joints_left > 0; joints_left--, i++)
- {
+ for (i = 0; joints_left > 0; joints_left--, i++) {
MemoNode *node;
node = table + indexMemoNode(nb_positions, previous, current, joints_left);
@@ -2101,19 +1887,17 @@ static void copyMemoPositions(int *positions, MemoNode *table, int nb_positions,
}
}
-static MemoNode * solveJoints(MemoNode *table, BArcIterator *iter, float **vec_cache, int nb_joints, int nb_positions, int previous, int current, RigEdge *edge, int joints_left, float angle_weight, float length_weight, float distance_weight)
+static MemoNode *solveJoints(MemoNode *table, BArcIterator *iter, float **vec_cache, int nb_joints, int nb_positions, int previous, int current, RigEdge *edge, int joints_left, float angle_weight, float length_weight, float distance_weight)
{
MemoNode *node;
int index = indexMemoNode(nb_positions, previous, current, joints_left);
node = table + index;
- if (node->weight != 0)
- {
+ if (node->weight != 0) {
return node;
}
- else if (joints_left == 0)
- {
+ else if (joints_left == 0) {
float *vec0 = vec_cache[previous];
float *vec1 = vec_cache[current];
float *vec2 = vec_cache[nb_positions + 1];
@@ -2122,17 +1906,15 @@ static MemoNode * solveJoints(MemoNode *table, BArcIterator *iter, float **vec_c
return node;
}
- else
- {
+ else {
MemoNode *min_node = NULL;
float *vec0 = vec_cache[previous];
float *vec1 = vec_cache[current];
- float min_weight= 0.0f;
- int min_next= 0;
+ float min_weight = 0.0f;
+ int min_next = 0;
int next;
- for (next = current + 1; next <= nb_positions - (joints_left - 1); next++)
- {
+ for (next = current + 1; next <= nb_positions - (joints_left - 1); next++) {
MemoNode *next_node;
float *vec2 = vec_cache[next];
float weight = 0.0f;
@@ -2140,8 +1922,7 @@ static MemoNode * solveJoints(MemoNode *table, BArcIterator *iter, float **vec_c
/* ADD WEIGHT OF PREVIOUS - CURRENT - NEXT triple */
weight = calcCostAngleLengthDistance(iter, vec_cache, edge, vec0, vec1, vec2, current, next, angle_weight, length_weight, distance_weight);
- if (weight >= MAX_COST)
- {
+ if (weight >= MAX_COST) {
continue;
}
@@ -2149,22 +1930,19 @@ static MemoNode * solveJoints(MemoNode *table, BArcIterator *iter, float **vec_c
next_node = solveJoints(table, iter, vec_cache, nb_joints, nb_positions, current, next, edge->next, joints_left - 1, angle_weight, length_weight, distance_weight);
weight += next_node->weight;
- if (min_node == NULL || weight < min_weight)
- {
+ if (min_node == NULL || weight < min_weight) {
min_weight = weight;
min_node = next_node;
min_next = next;
}
}
- if (min_node)
- {
+ if (min_node) {
node->weight = min_weight;
node->next = min_next;
return node;
}
- else
- {
+ else {
node->weight = MAX_COST;
return node;
}
@@ -2178,12 +1956,12 @@ static int testFlipArc(RigArc *iarc, RigNode *inode_start)
ReebNode *enode_start = BIF_NodeFromIndex(earc, inode_start->link_mesh);
/* no flip needed if both nodes are the same */
- if ((enode_start == earc->head && inode_start == iarc->head) || (enode_start == earc->tail && inode_start == iarc->tail))
+ if ((enode_start == earc->head && inode_start == iarc->head) ||
+ (enode_start == earc->tail && inode_start == iarc->tail))
{
return 0;
}
- else
- {
+ else {
return 1;
}
}
@@ -2191,7 +1969,7 @@ static int testFlipArc(RigArc *iarc, RigNode *inode_start)
static void retargetArctoArcAggresive(bContext *C, RigGraph *rigg, RigArc *iarc, RigNode *inode_start)
{
ReebArcIterator arc_iter;
- BArcIterator *iter = (BArcIterator*)&arc_iter;
+ BArcIterator *iter = (BArcIterator *)&arc_iter;
RigEdge *edge;
EmbedBucket *bucket = NULL;
ReebNode *node_start, *node_end;
@@ -2209,45 +1987,39 @@ static void retargetArctoArcAggresive(bContext *C, RigGraph *rigg, RigArc *iarc,
RetargetMethod method = METHOD_MEMOIZE;
int i;
- if (nb_joints > earc->bcount)
- {
+ if (nb_joints > earc->bcount) {
printf("NOT ENOUGH BUCKETS!\n");
return;
}
best_positions = MEM_callocN(sizeof(int) * nb_joints, "Best positions");
- if (testFlipArc(iarc, inode_start))
- {
+ if (testFlipArc(iarc, inode_start)) {
node_start = earc->tail;
node_end = earc->head;
}
- else
- {
+ else {
node_start = earc->head;
node_end = earc->tail;
}
/* equal number of joints and potential position, just fill them in */
- if (nb_joints == earc->bcount)
- {
+ if (nb_joints == earc->bcount) {
int i;
/* init with first values */
- for (i = 0; i < nb_joints; i++)
- {
+ for (i = 0; i < nb_joints; i++) {
best_positions[i] = i + 1;
}
}
- if (method == METHOD_MEMOIZE)
- {
+ if (method == METHOD_MEMOIZE) {
int nb_positions = earc->bcount;
int nb_memo_nodes = nb_positions * nb_positions * (nb_joints + 1);
MemoNode *table = MEM_callocN(nb_memo_nodes * sizeof(MemoNode), "memoization table");
#ifndef USE_THREADS
MemoNode *result;
#endif
- float **positions_cache = MEM_callocN(sizeof(float*) * (nb_positions + 2), "positions cache");
+ float **positions_cache = MEM_callocN(sizeof(float *) * (nb_positions + 2), "positions cache");
int i;
positions_cache[0] = node_start->p;
@@ -2255,8 +2027,7 @@ static void retargetArctoArcAggresive(bContext *C, RigGraph *rigg, RigArc *iarc,
initArcIterator(iter, earc, node_start);
- for (i = 1; i <= nb_positions; i++)
- {
+ for (i = 1; i <= nb_positions; i++) {
EmbedBucket *bucket = IT_peek(iter, i);
positions_cache[i] = bucket->p;
}
@@ -2290,20 +2061,17 @@ static void retargetArctoArcAggresive(bContext *C, RigGraph *rigg, RigArc *iarc,
edge = edge->next, i++)
{
float *no = NULL;
- if (i < nb_joints)
- {
+ if (i < nb_joints) {
bucket = IT_peek(iter, best_positions[i]);
vec1 = bucket->p;
no = bucket->no;
}
- else
- {
+ else {
vec1 = node_end->p;
no = node_end->no;
}
- if (edge->bone)
- {
+ if (edge->bone) {
repositionBone(C, rigg, edge, vec0, vec1, no);
}
@@ -2316,7 +2084,7 @@ static void retargetArctoArcAggresive(bContext *C, RigGraph *rigg, RigArc *iarc,
static void retargetArctoArcLength(bContext *C, RigGraph *rigg, RigArc *iarc, RigNode *inode_start)
{
ReebArcIterator arc_iter;
- BArcIterator *iter = (BArcIterator*)&arc_iter;
+ BArcIterator *iter = (BArcIterator *)&arc_iter;
ReebArc *earc = iarc->link_mesh;
ReebNode *node_start, *node_end;
RigEdge *edge;
@@ -2327,15 +2095,13 @@ static void retargetArctoArcLength(bContext *C, RigGraph *rigg, RigArc *iarc, Ri
float *previous_vec = NULL;
- if (testFlipArc(iarc, inode_start))
- {
- node_start = (ReebNode*)earc->tail;
- node_end = (ReebNode*)earc->head;
+ if (testFlipArc(iarc, inode_start)) {
+ node_start = (ReebNode *)earc->tail;
+ node_end = (ReebNode *)earc->head;
}
- else
- {
- node_start = (ReebNode*)earc->head;
- node_end = (ReebNode*)earc->tail;
+ else {
+ node_start = (ReebNode *)earc->head;
+ node_end = (ReebNode *)earc->tail;
}
initArcIterator(iter, earc, node_start);
@@ -2344,8 +2110,7 @@ static void retargetArctoArcLength(bContext *C, RigGraph *rigg, RigArc *iarc, Ri
vec0 = node_start->p;
- while (bucket != NULL)
- {
+ while (bucket != NULL) {
vec1 = bucket->p;
embedding_length += len_v3v3(vec0, vec1);
@@ -2365,14 +2130,12 @@ static void retargetArctoArcLength(bContext *C, RigGraph *rigg, RigArc *iarc, Ri
previous_vec = vec0;
vec1 = bucket->p;
- for (edge = iarc->edges.first; edge; edge = edge->next)
- {
+ for (edge = iarc->edges.first; edge; edge = edge->next) {
float new_bone_length = edge->length / iarc->length * embedding_length;
float *no = NULL;
float length = 0;
- while (bucket && new_bone_length > length)
- {
+ while (bucket && new_bone_length > length) {
length += len_v3v3(previous_vec, vec1);
bucket = IT_next(iter);
previous_vec = vec1;
@@ -2380,15 +2143,13 @@ static void retargetArctoArcLength(bContext *C, RigGraph *rigg, RigArc *iarc, Ri
no = bucket->no;
}
- if (bucket == NULL)
- {
+ if (bucket == NULL) {
vec1 = node_end->p;
no = node_end->no;
}
/* no need to move virtual edges (space between unconnected bones) */
- if (edge->bone)
- {
+ if (edge->bone) {
repositionBone(C, rigg, edge, vec0, vec1, no);
}
@@ -2422,36 +2183,30 @@ static void retargetArctoArc(bContext *C, RigGraph *rigg, RigArc *iarc, RigNode
void *exec_retargetArctoArc(void *param)
{
- RetargetParam *p = (RetargetParam*)param;
+ RetargetParam *p = (RetargetParam *)param;
RigGraph *rigg = p->rigg;
RigArc *iarc = p->iarc;
bContext *C = p->context;
RigNode *inode_start = p->inode_start;
ReebArc *earc = iarc->link_mesh;
- if (BLI_countlist(&iarc->edges) == 1)
- {
+ if (BLI_countlist(&iarc->edges) == 1) {
RigEdge *edge = iarc->edges.first;
- if (testFlipArc(iarc, inode_start))
- {
+ if (testFlipArc(iarc, inode_start)) {
repositionBone(C, rigg, edge, earc->tail->p, earc->head->p, earc->head->no);
}
- else
- {
+ else {
repositionBone(C, rigg, edge, earc->head->p, earc->tail->p, earc->tail->no);
}
}
- else
- {
+ else {
RetargetMode mode = detectArcRetargetMode(iarc);
- if (mode == RETARGET_AGGRESSIVE)
- {
+ if (mode == RETARGET_AGGRESSIVE) {
retargetArctoArcAggresive(C, rigg, iarc, inode_start);
}
- else
- {
+ else {
retargetArctoArcLength(C, rigg, iarc, inode_start);
}
}
@@ -2469,18 +2224,17 @@ static void matchMultiResolutionNode(RigGraph *rigg, RigNode *inode, ReebNode *t
ReebGraph *reebg = BIF_graphForMultiNode(rigg->link_mesh, enode);
int ishape, eshape;
- ishape = BLI_subtreeShape((BGraph*)rigg, (BNode*)inode, NULL, 0) % SHAPE_LEVELS;
- eshape = BLI_subtreeShape((BGraph*)reebg, (BNode*)enode, NULL, 0) % SHAPE_LEVELS;
+ ishape = BLI_subtreeShape((BGraph *)rigg, (BNode *)inode, NULL, 0) % SHAPE_LEVELS;
+ eshape = BLI_subtreeShape((BGraph *)reebg, (BNode *)enode, NULL, 0) % SHAPE_LEVELS;
inode->link_mesh = enode;
- while (ishape == eshape && enode->link_down)
- {
+ while (ishape == eshape && enode->link_down) {
inode->link_mesh = enode;
enode = enode->link_down;
reebg = BIF_graphForMultiNode(rigg->link_mesh, enode); /* replace with call to link_down once that exists */
- eshape = BLI_subtreeShape((BGraph*)reebg, (BNode*)enode, NULL, 0) % SHAPE_LEVELS;
+ eshape = BLI_subtreeShape((BGraph *)reebg, (BNode *)enode, NULL, 0) % SHAPE_LEVELS;
}
}
@@ -2488,16 +2242,13 @@ static void markMultiResolutionChildArc(ReebNode *end_enode, ReebNode *enode)
{
int i;
- for (i = 0; i < enode->degree; i++)
- {
- ReebArc *earc = (ReebArc*)enode->arcs[i];
+ for (i = 0; i < enode->degree; i++) {
+ ReebArc *earc = (ReebArc *)enode->arcs[i];
- if (earc->flag == ARC_FREE)
- {
+ if (earc->flag == ARC_FREE) {
earc->flag = ARC_TAKEN;
- if (earc->tail->degree > 1 && earc->tail != end_enode)
- {
+ if (earc->tail->degree > 1 && earc->tail != end_enode) {
markMultiResolutionChildArc(end_enode, earc->tail);
}
break;
@@ -2507,15 +2258,12 @@ static void markMultiResolutionChildArc(ReebNode *end_enode, ReebNode *enode)
static void markMultiResolutionArc(ReebArc *start_earc)
{
- if (start_earc->link_up)
- {
+ if (start_earc->link_up) {
ReebArc *earc;
- for (earc = start_earc->link_up ; earc; earc = earc->link_up)
- {
+ for (earc = start_earc->link_up; earc; earc = earc->link_up) {
earc->flag = ARC_TAKEN;
- if (earc->tail->index != start_earc->tail->index)
- {
+ if (earc->tail->index != start_earc->tail->index) {
markMultiResolutionChildArc(earc->tail, earc->tail);
}
}
@@ -2528,17 +2276,16 @@ static void matchMultiResolutionArc(RigGraph *rigg, RigNode *start_node, RigArc
ReebGraph *reebg = BIF_graphForMultiNode(rigg->link_mesh, enode);
int ishape, eshape;
- ishape = BLI_subtreeShape((BGraph*)rigg, (BNode*)start_node, (BArc*)next_iarc, 1) % SHAPE_LEVELS;
- eshape = BLI_subtreeShape((BGraph*)reebg, (BNode*)enode, (BArc*)next_earc, 1) % SHAPE_LEVELS;
+ ishape = BLI_subtreeShape((BGraph *)rigg, (BNode *)start_node, (BArc *)next_iarc, 1) % SHAPE_LEVELS;
+ eshape = BLI_subtreeShape((BGraph *)reebg, (BNode *)enode, (BArc *)next_earc, 1) % SHAPE_LEVELS;
- while (ishape != eshape && next_earc->link_up)
- {
+ while (ishape != eshape && next_earc->link_up) {
next_earc->flag = ARC_TAKEN; // mark previous as taken, to prevent backtrack on lower levels
next_earc = next_earc->link_up;
reebg = reebg->link_up;
enode = next_earc->head;
- eshape = BLI_subtreeShape((BGraph*)reebg, (BNode*)enode, (BArc*)next_earc, 1) % SHAPE_LEVELS;
+ eshape = BLI_subtreeShape((BGraph *)reebg, (BNode *)enode, (BArc *)next_earc, 1) % SHAPE_LEVELS;
}
next_earc->flag = ARC_USED;
@@ -2560,16 +2307,15 @@ static void matchMultiResolutionStartingNode(RigGraph *rigg, ReebGraph *reebg, R
enode = reebg->nodes.first;
- ishape = BLI_subtreeShape((BGraph*)rigg, (BNode*)inode, NULL, 0) % SHAPE_LEVELS;
- eshape = BLI_subtreeShape((BGraph*)rigg->link_mesh, (BNode*)enode, NULL, 0) % SHAPE_LEVELS;
+ ishape = BLI_subtreeShape((BGraph *)rigg, (BNode *)inode, NULL, 0) % SHAPE_LEVELS;
+ eshape = BLI_subtreeShape((BGraph *)rigg->link_mesh, (BNode *)enode, NULL, 0) % SHAPE_LEVELS;
- while (ishape != eshape && reebg->link_up)
- {
+ while (ishape != eshape && reebg->link_up) {
reebg = reebg->link_up;
enode = reebg->nodes.first;
- eshape = BLI_subtreeShape((BGraph*)reebg, (BNode*)enode, NULL, 0) % SHAPE_LEVELS;
+ eshape = BLI_subtreeShape((BGraph *)reebg, (BNode *)enode, NULL, 0) % SHAPE_LEVELS;
}
inode->link_mesh = enode;
@@ -2593,9 +2339,8 @@ static void findCorrespondingArc(RigGraph *rigg, RigArc *start_arc, RigNode *sta
// RIG_printArcBones(next_iarc);
// }
- for (i = 0; i < enode->degree; i++)
- {
- next_earc = (ReebArc*)enode->arcs[i];
+ for (i = 0; i < enode->degree; i++) {
+ next_earc = (ReebArc *)enode->arcs[i];
// if (next_earc->flag == ARC_FREE)
// {
@@ -2606,9 +2351,9 @@ static void findCorrespondingArc(RigGraph *rigg, RigArc *start_arc, RigNode *sta
// }
if (next_earc->flag == ARC_FREE &&
- next_earc->symmetry_flag == symmetry_flag &&
- next_earc->symmetry_group == symmetry_group &&
- next_earc->symmetry_level == symmetry_level)
+ next_earc->symmetry_flag == symmetry_flag &&
+ next_earc->symmetry_group == symmetry_group &&
+ next_earc->symmetry_level == symmetry_level)
{
// printf("CORRESPONDING ARC FOUND\n");
// printf("flag %i -- level %i -- flag %i -- group %i\n", next_earc->flag, next_earc->symmetry_level, next_earc->symmetry_flag, next_earc->symmetry_group);
@@ -2619,20 +2364,17 @@ static void findCorrespondingArc(RigGraph *rigg, RigArc *start_arc, RigNode *sta
}
/* not found, try at higher nodes (lower node might have filtered internal arcs, messing shape of tree */
- if (next_iarc->link_mesh == NULL)
- {
+ if (next_iarc->link_mesh == NULL) {
// printf("NO CORRESPONDING ARC FOUND - GOING TO HIGHER LEVELS\n");
- if (enode->link_up)
- {
+ if (enode->link_up) {
start_node->link_mesh = enode->link_up;
findCorrespondingArc(rigg, start_arc, start_node, next_iarc, 0);
}
}
/* still not found, print debug info */
- if (root && next_iarc->link_mesh == NULL)
- {
+ if (root && next_iarc->link_mesh == NULL) {
start_node->link_mesh = enode; /* linking back with root node */
// printf("NO CORRESPONDING ARC FOUND\n");
@@ -2651,12 +2393,10 @@ static void findCorrespondingArc(RigGraph *rigg, RigArc *start_arc, RigNode *sta
// }
/* Emergency matching */
- for (i = 0; i < enode->degree; i++)
- {
- next_earc = (ReebArc*)enode->arcs[i];
+ for (i = 0; i < enode->degree; i++) {
+ next_earc = (ReebArc *)enode->arcs[i];
- if (next_earc->flag == ARC_FREE && next_earc->symmetry_level == symmetry_level)
- {
+ if (next_earc->flag == ARC_FREE && next_earc->symmetry_level == symmetry_level) {
// printf("USING:\n");
// printf("flag %i -- level %i -- flag %i -- group %i\n", next_earc->flag, next_earc->symmetry_level, next_earc->symmetry_flag, next_earc->symmetry_group);
matchMultiResolutionArc(rigg, start_node, next_iarc, next_earc);
@@ -2673,30 +2413,26 @@ static void retargetSubgraph(bContext *C, RigGraph *rigg, RigArc *start_arc, Rig
int i;
/* no start arc on first node */
- if (start_arc)
- {
+ if (start_arc) {
ReebNode *enode = start_node->link_mesh;
ReebArc *earc = start_arc->link_mesh;
retargetArctoArc(C, rigg, start_arc, start_node);
enode = BIF_otherNodeFromIndex(earc, enode);
- inode = (RigNode*)BLI_otherNode((BArc*)start_arc, (BNode*)inode);
+ inode = (RigNode *)BLI_otherNode((BArc *)start_arc, (BNode *)inode);
/* match with lowest node with correct shape */
matchMultiResolutionNode(rigg, inode, enode);
}
- for (i = 0; i < inode->degree; i++)
- {
- RigArc *next_iarc = (RigArc*)inode->arcs[i];
+ for (i = 0; i < inode->degree; i++) {
+ RigArc *next_iarc = (RigArc *)inode->arcs[i];
/* no back tracking */
- if (next_iarc != start_arc)
- {
+ if (next_iarc != start_arc) {
findCorrespondingArc(rigg, start_arc, inode, next_iarc, 1);
- if (next_iarc->link_mesh)
- {
+ if (next_iarc->link_mesh) {
retargetSubgraph(C, rigg, next_iarc, inode);
}
}
@@ -2712,13 +2448,11 @@ static void finishRetarget(RigGraph *rigg)
static void adjustGraphs(bContext *C, RigGraph *rigg)
{
- bArmature *arm= rigg->ob->data;
+ bArmature *arm = rigg->ob->data;
RigArc *arc;
- for (arc = rigg->arcs.first; arc; arc = arc->next)
- {
- if (arc->link_mesh)
- {
+ for (arc = rigg->arcs.first; arc; arc = arc->next) {
+ if (arc->link_mesh) {
retargetArctoArc(C, rigg, arc, arc->head);
}
}
@@ -2734,7 +2468,7 @@ static void adjustGraphs(bContext *C, RigGraph *rigg)
static void retargetGraphs(bContext *C, RigGraph *rigg)
{
- bArmature *arm= rigg->ob->data;
+ bArmature *arm = rigg->ob->data;
ReebGraph *reebg = rigg->link_mesh;
RigNode *inode;
@@ -2762,25 +2496,21 @@ const char *RIG_nameBone(RigGraph *rg, int arc_index, int bone_index)
RigArc *arc = BLI_findlink(&rg->arcs, arc_index);
RigEdge *iedge;
- if (arc == NULL)
- {
+ if (arc == NULL) {
return "None";
}
- if (bone_index == BLI_countlist(&arc->edges))
- {
+ if (bone_index == BLI_countlist(&arc->edges)) {
return "Last joint";
}
iedge = BLI_findlink(&arc->edges, bone_index);
- if (iedge == NULL)
- {
+ if (iedge == NULL) {
return "Done";
}
- if (iedge->bone == NULL)
- {
+ if (iedge->bone == NULL) {
return "Bone offset";
}
@@ -2794,8 +2524,7 @@ int RIG_nbJoints(RigGraph *rg)
total += BLI_countlist(&rg->nodes);
- for (arc = rg->arcs.first; arc; arc = arc->next)
- {
+ for (arc = rg->arcs.first; arc; arc = arc->next) {
total += BLI_countlist(&arc->edges) - 1; /* -1 because end nodes are already counted */
}
@@ -2804,9 +2533,8 @@ int RIG_nbJoints(RigGraph *rg)
static void BIF_freeRetarget(void)
{
- if (GLOBAL_RIGG)
- {
- RIG_freeRigGraph((BGraph*)GLOBAL_RIGG);
+ if (GLOBAL_RIGG) {
+ RIG_freeRigGraph((BGraph *)GLOBAL_RIGG);
GLOBAL_RIGG = NULL;
}
}
@@ -2816,7 +2544,7 @@ void BIF_retargetArmature(bContext *C)
ReebGraph *reebg;
double start_time, end_time;
double gstart_time, gend_time;
- double reeb_time, rig_time=0.0, retarget_time=0.0, total_time;
+ double reeb_time, rig_time = 0.0, retarget_time = 0.0, total_time;
gstart_time = start_time = PIL_check_seconds_timer();
@@ -2827,11 +2555,11 @@ void BIF_retargetArmature(bContext *C)
printf("Reeb Graph created\n");
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases)
+ {
Object *ob = base->object;
- if (ob->type==OB_ARMATURE)
- {
+ if (ob->type == OB_ARMATURE) {
RigGraph *rigg;
bArmature *arm;
@@ -2910,8 +2638,7 @@ void BIF_retargetArc(bContext *C, ReebArc *earc, RigGraph *template_rigg)
template_rigg = armatureSelectedToGraph(C, ob, ob->data);
}
- if (template_rigg->arcs.first == NULL)
- {
+ if (template_rigg->arcs.first == NULL) {
// XXX
// error("No Template and no deforming bones selected");
return;
@@ -2930,11 +2657,10 @@ void BIF_retargetArc(bContext *C, ReebArc *earc, RigGraph *template_rigg)
finishRetarget(rigg);
/* free template if it comes from the edit armature */
- if (free_template)
- {
- RIG_freeRigGraph((BGraph*)template_rigg);
+ if (free_template) {
+ RIG_freeRigGraph((BGraph *)template_rigg);
}
- RIG_freeRigGraph((BGraph*)rigg);
+ RIG_freeRigGraph((BGraph *)rigg);
ED_armature_validate_active(armedit);
@@ -2944,8 +2670,7 @@ void BIF_retargetArc(bContext *C, ReebArc *earc, RigGraph *template_rigg)
void BIF_adjustRetarget(bContext *C)
{
- if (GLOBAL_RIGG)
- {
+ if (GLOBAL_RIGG) {
adjustGraphs(C, GLOBAL_RIGG);
}
}
diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c
index 81b020a4cf9..2201bcf7224 100644
--- a/source/blender/editors/armature/editarmature_sketch.c
+++ b/source/blender/editors/armature/editarmature_sketch.c
@@ -70,31 +70,31 @@
-typedef int (*GestureDetectFct)(bContext*, SK_Gesture*, SK_Sketch *);
-typedef void (*GestureApplyFct)(bContext*, SK_Gesture*, SK_Sketch *);
+typedef int (*GestureDetectFct)(bContext *, SK_Gesture *, SK_Sketch *);
+typedef void (*GestureApplyFct)(bContext *, SK_Gesture *, SK_Sketch *);
typedef struct SK_GestureAction {
char name[64];
- GestureDetectFct detect;
- GestureApplyFct apply;
+ GestureDetectFct detect;
+ GestureApplyFct apply;
} SK_GestureAction;
#if 0 /* UNUSED 2.5 */
static SK_Point boneSnap;
#endif
-static int LAST_SNAP_POINT_VALID = 0;
-static float LAST_SNAP_POINT[3];
+static int LAST_SNAP_POINT_VALID = 0;
+static float LAST_SNAP_POINT[3];
typedef struct SK_StrokeIterator {
- HeadFct head;
- TailFct tail;
- PeekFct peek;
- NextFct next;
- NextNFct nextN;
- PreviousFct previous;
- StoppedFct stopped;
+ HeadFct head;
+ TailFct tail;
+ PeekFct peek;
+ NextFct next;
+ NextNFct nextN;
+ PreviousFct previous;
+ StoppedFct stopped;
float *p, *no;
float size;
@@ -127,30 +127,29 @@ void sk_applyReverseGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch);
int sk_detectConvertGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch);
void sk_applyConvertGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch);
-SK_Sketch* contextSketch(const bContext *c, int create);
-SK_Sketch* viewcontextSketch(ViewContext *vc, int create);
+SK_Sketch *contextSketch(const bContext *c, int create);
+SK_Sketch *viewcontextSketch(ViewContext *vc, int create);
void sk_resetOverdraw(SK_Sketch *sketch);
int sk_hasOverdraw(SK_Sketch *sketch, SK_Stroke *stk);
/******************** GESTURE ACTIONS ******************************/
-static SK_GestureAction GESTURE_ACTIONS[] =
- {
- {"Cut", sk_detectCutGesture, sk_applyCutGesture},
- {"Trim", sk_detectTrimGesture, sk_applyTrimGesture},
- {"Command", sk_detectCommandGesture, sk_applyCommandGesture},
- {"Delete", sk_detectDeleteGesture, sk_applyDeleteGesture},
- {"Merge", sk_detectMergeGesture, sk_applyMergeGesture},
- {"Reverse", sk_detectReverseGesture, sk_applyReverseGesture},
- {"Convert", sk_detectConvertGesture, sk_applyConvertGesture},
- {"", NULL, NULL}
- };
+static SK_GestureAction GESTURE_ACTIONS[] = {
+ {"Cut", sk_detectCutGesture, sk_applyCutGesture},
+ {"Trim", sk_detectTrimGesture, sk_applyTrimGesture},
+ {"Command", sk_detectCommandGesture, sk_applyCommandGesture},
+ {"Delete", sk_detectDeleteGesture, sk_applyDeleteGesture},
+ {"Merge", sk_detectMergeGesture, sk_applyMergeGesture},
+ {"Reverse", sk_detectReverseGesture, sk_applyReverseGesture},
+ {"Convert", sk_detectConvertGesture, sk_applyConvertGesture},
+ {"", NULL, NULL}
+};
/******************** TEMPLATES UTILS *************************/
static char *TEMPLATES_MENU = NULL;
-static int TEMPLATES_CURRENT = 0;
+static int TEMPLATES_CURRENT = 0;
static GHash *TEMPLATES_HASH = NULL;
static RigGraph *TEMPLATE_RIGG = NULL;
@@ -162,25 +161,21 @@ void BIF_makeListTemplates(const bContext *C)
Base *base;
int index = 0;
- if (TEMPLATES_HASH != NULL)
- {
+ if (TEMPLATES_HASH != NULL) {
BLI_ghash_free(TEMPLATES_HASH, NULL, NULL);
}
TEMPLATES_HASH = BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp, "makeListTemplates gh");
TEMPLATES_CURRENT = 0;
- for ( base = FIRSTBASE; base; base = base->next )
- {
+ for (base = FIRSTBASE; base; base = base->next) {
Object *ob = base->object;
- if (ob != obedit && ob->type == OB_ARMATURE)
- {
+ if (ob != obedit && ob->type == OB_ARMATURE) {
index++;
BLI_ghash_insert(TEMPLATES_HASH, SET_INT_IN_POINTER(index), ob);
- if (ob == ts->skgen_template)
- {
+ if (ob == ts->skgen_template) {
TEMPLATES_CURRENT = index;
}
}
@@ -193,8 +188,7 @@ const char *BIF_listTemplates(const bContext *UNUSED(C))
char menu_header[] = "Template%t|None%x0|";
char *p;
- if (TEMPLATES_MENU != NULL)
- {
+ if (TEMPLATES_MENU != NULL) {
MEM_freeN(TEMPLATES_MENU);
}
@@ -206,12 +200,11 @@ const char *BIF_listTemplates(const bContext *UNUSED(C))
BLI_ghashIterator_init(&ghi, TEMPLATES_HASH);
- while (!BLI_ghashIterator_isDone(&ghi))
- {
+ while (!BLI_ghashIterator_isDone(&ghi)) {
Object *ob = BLI_ghashIterator_getValue(&ghi);
int key = GET_INT_FROM_POINTER(BLI_ghashIterator_getKey(&ghi));
- p += sprintf(p, "|%s%%x%i", ob->id.name+2, key);
+ p += sprintf(p, "|%s%%x%i", ob->id.name + 2, key);
BLI_ghashIterator_step(&ghi);
}
@@ -223,18 +216,15 @@ int BIF_currentTemplate(const bContext *C)
{
ToolSettings *ts = CTX_data_tool_settings(C);
- if (TEMPLATES_CURRENT == 0 && ts->skgen_template != NULL)
- {
+ if (TEMPLATES_CURRENT == 0 && ts->skgen_template != NULL) {
GHashIterator ghi;
BLI_ghashIterator_init(&ghi, TEMPLATES_HASH);
- while (!BLI_ghashIterator_isDone(&ghi))
- {
+ while (!BLI_ghashIterator_isDone(&ghi)) {
Object *ob = BLI_ghashIterator_getValue(&ghi);
int key = GET_INT_FROM_POINTER(BLI_ghashIterator_getKey(&ghi));
- if (ob == ts->skgen_template)
- {
+ if (ob == ts->skgen_template) {
TEMPLATES_CURRENT = key;
break;
}
@@ -246,24 +236,20 @@ int BIF_currentTemplate(const bContext *C)
return TEMPLATES_CURRENT;
}
-static RigGraph* sk_makeTemplateGraph(const bContext *C, Object *ob)
+static RigGraph *sk_makeTemplateGraph(const bContext *C, Object *ob)
{
Object *obedit = CTX_data_edit_object(C);
- if (ob == obedit)
- {
+ if (ob == obedit) {
return NULL;
}
- if (ob != NULL)
- {
- if (TEMPLATE_RIGG && TEMPLATE_RIGG->ob != ob)
- {
- RIG_freeRigGraph((BGraph*)TEMPLATE_RIGG);
+ if (ob != NULL) {
+ if (TEMPLATE_RIGG && TEMPLATE_RIGG->ob != ob) {
+ RIG_freeRigGraph((BGraph *)TEMPLATE_RIGG);
TEMPLATE_RIGG = NULL;
}
- if (TEMPLATE_RIGG == NULL)
- {
+ if (TEMPLATE_RIGG == NULL) {
bArmature *arm;
arm = ob->data;
@@ -280,32 +266,28 @@ int BIF_nbJointsTemplate(const bContext *C)
ToolSettings *ts = CTX_data_tool_settings(C);
RigGraph *rg = sk_makeTemplateGraph(C, ts->skgen_template);
- if (rg)
- {
+ if (rg) {
return RIG_nbJoints(rg);
}
- else
- {
+ else {
return -1;
}
}
-const char * BIF_nameBoneTemplate(const bContext *C)
+const char *BIF_nameBoneTemplate(const bContext *C)
{
ToolSettings *ts = CTX_data_tool_settings(C);
SK_Sketch *stk = contextSketch(C, 1);
RigGraph *rg;
int index = 0;
- if (stk && stk->active_stroke != NULL)
- {
+ if (stk && stk->active_stroke != NULL) {
index = stk->active_stroke->nb_points;
}
rg = sk_makeTemplateGraph(C, ts->skgen_template);
- if (rg == NULL)
- {
+ if (rg == NULL) {
return "";
}
@@ -314,21 +296,18 @@ const char * BIF_nameBoneTemplate(const bContext *C)
void BIF_freeTemplates(bContext *UNUSED(C))
{
- if (TEMPLATES_MENU != NULL)
- {
+ if (TEMPLATES_MENU != NULL) {
MEM_freeN(TEMPLATES_MENU);
TEMPLATES_MENU = NULL;
}
- if (TEMPLATES_HASH != NULL)
- {
+ if (TEMPLATES_HASH != NULL) {
BLI_ghash_free(TEMPLATES_HASH, NULL, NULL);
TEMPLATES_HASH = NULL;
}
- if (TEMPLATE_RIGG != NULL)
- {
- RIG_freeRigGraph((BGraph*)TEMPLATE_RIGG);
+ if (TEMPLATE_RIGG != NULL) {
+ RIG_freeRigGraph((BGraph *)TEMPLATE_RIGG);
TEMPLATE_RIGG = NULL;
}
}
@@ -336,17 +315,14 @@ void BIF_freeTemplates(bContext *UNUSED(C))
void BIF_setTemplate(bContext *C, int index)
{
ToolSettings *ts = CTX_data_tool_settings(C);
- if (index > 0)
- {
+ if (index > 0) {
ts->skgen_template = BLI_ghash_lookup(TEMPLATES_HASH, SET_INT_IN_POINTER(index));
}
- else
- {
+ else {
ts->skgen_template = NULL;
- if (TEMPLATE_RIGG != NULL)
- {
- RIG_freeRigGraph((BGraph*)TEMPLATE_RIGG);
+ if (TEMPLATE_RIGG != NULL) {
+ RIG_freeRigGraph((BGraph *)TEMPLATE_RIGG);
}
TEMPLATE_RIGG = NULL;
}
@@ -357,45 +333,36 @@ void BIF_setTemplate(bContext *C, int index)
static void sk_autoname(bContext *C, ReebArc *arc)
{
ToolSettings *ts = CTX_data_tool_settings(C);
- if (ts->skgen_retarget_options & SK_RETARGET_AUTONAME)
- {
- if (arc == NULL)
- {
+ if (ts->skgen_retarget_options & SK_RETARGET_AUTONAME) {
+ if (arc == NULL) {
char *num = ts->skgen_num_string;
int i = atoi(num);
i++;
BLI_snprintf(num, 8, "%i", i);
}
- else
- {
+ else {
char *side = ts->skgen_side_string;
int valid = 0;
int caps = 0;
- if (side[0] == '\0')
- {
+ if (side[0] == '\0') {
valid = 1;
}
- else if (strcmp(side, "R")==0 || strcmp(side, "L")==0)
- {
+ else if (strcmp(side, "R") == 0 || strcmp(side, "L") == 0) {
valid = 1;
caps = 1;
}
- else if (strcmp(side, "r")==0 || strcmp(side, "l")==0)
- {
+ else if (strcmp(side, "r") == 0 || strcmp(side, "l") == 0) {
valid = 1;
caps = 0;
}
- if (valid)
- {
- if (arc->head->p[0] < 0)
- {
- BLI_snprintf(side, 8, caps?"R":"r");
+ if (valid) {
+ if (arc->head->p[0] < 0) {
+ BLI_snprintf(side, 8, caps ? "R" : "r");
}
- else
- {
- BLI_snprintf(side, 8, caps?"L":"l");
+ else {
+ BLI_snprintf(side, 8, caps ? "L" : "l");
}
}
}
@@ -428,8 +395,7 @@ static ReebArc *sk_strokeToArc(SK_Stroke *stk, float imat[][4], float tmat[][3])
arc->bcount = stk->nb_points - 2; /* first and last are nodes, don't count */
arc->buckets = MEM_callocN(sizeof(EmbedBucket) * arc->bcount, "Buckets");
- for (i = 0; i < arc->bcount; i++)
- {
+ for (i = 0; i < arc->bcount; i++) {
copy_v3_v3(arc->buckets[i].p, stk->points[i + 1].p);
mul_m4_v3(imat, arc->buckets[i].p);
@@ -466,15 +432,14 @@ static void sk_retargetStroke(bContext *C, SK_Stroke *stk)
MEM_freeN(arc->head);
MEM_freeN(arc->tail);
- REEB_freeArc((BArc*)arc);
+ REEB_freeArc((BArc *)arc);
}
/**************************************************************/
static void sk_cancelStroke(SK_Sketch *sketch)
{
- if (sketch->active_stroke != NULL)
- {
+ if (sketch->active_stroke != NULL) {
sk_resetOverdraw(sketch);
sk_removeStroke(sketch, sketch->active_stroke);
}
@@ -501,14 +466,13 @@ static void sk_drawEdge(GLUquadric *quad, SK_Point *pt0, SK_Point *pt1, float si
length = normalize_v3(vec1);
cross_v3_v3v3(axis, vec2, vec1);
- if (is_zero_v3(axis))
- {
+ if (is_zero_v3(axis)) {
axis[1] = 1;
}
angle = angle_normalized_v3v3(vec2, vec1);
- glRotatef(angle * (float)(180.0/M_PI) + 180.0f, axis[0], axis[1], axis[2]);
+ glRotatef(angle * (float)(180.0 / M_PI) + 180.0f, axis[0], axis[1], axis[2]);
gluCylinder(quad, sk_clampPointSize(pt1, size), sk_clampPointSize(pt0, size), length, 8, 8);
}
@@ -522,14 +486,13 @@ static void sk_drawNormal(GLUquadric *quad, SK_Point *pt, float size, float heig
cross_v3_v3v3(axis, vec2, pt->no);
- if (is_zero_v3(axis))
- {
+ if (is_zero_v3(axis)) {
axis[1] = 1;
}
angle = angle_normalized_v3v3(vec2, pt->no);
- glRotatef(angle * (float)(180.0/M_PI), axis[0], axis[1], axis[2]);
+ glRotatef(angle * (float)(180.0 / M_PI), axis[0], axis[1], axis[2]);
glColor3f(0, 1, 1);
gluCylinder(quad, sk_clampPointSize(pt, size), 0, sk_clampPointSize(pt, height), 10, 2);
@@ -544,18 +507,15 @@ static void sk_drawStroke(SK_Stroke *stk, int id, float color[3], int start, int
GLUquadric *quad = gluNewQuadric();
gluQuadricNormals(quad, GLU_SMOOTH);
- if (id != -1)
- {
+ if (id != -1) {
glLoadName(id);
- for (i = 0; i < stk->nb_points; i++)
- {
+ for (i = 0; i < stk->nb_points; i++) {
glPushMatrix();
sk_drawPoint(quad, stk->points + i, 0.1);
- if (i > 0)
- {
+ if (i > 0) {
sk_drawEdge(quad, stk->points + i - 1, stk->points + i, 0.1);
}
@@ -563,44 +523,37 @@ static void sk_drawStroke(SK_Stroke *stk, int id, float color[3], int start, int
}
}
- else
- {
+ else {
float d_rgb[3] = {1, 1, 1};
copy_v3_v3(rgb, color);
sub_v3_v3(d_rgb, rgb);
mul_v3_fl(d_rgb, 1.0f / (float)stk->nb_points);
- for (i = 0; i < stk->nb_points; i++)
- {
+ for (i = 0; i < stk->nb_points; i++) {
SK_Point *pt = stk->points + i;
glPushMatrix();
- if (pt->type == PT_EXACT)
- {
+ if (pt->type == PT_EXACT) {
glColor3f(0, 0, 0);
sk_drawPoint(quad, pt, 0.15);
sk_drawNormal(quad, pt, 0.05, 0.9);
}
- if (i >= start && i <= end)
- {
+ if (i >= start && i <= end) {
glColor3f(0.3, 0.3, 0.3);
}
- else
- {
+ else {
glColor3fv(rgb);
}
- if (pt->type != PT_EXACT)
- {
+ if (pt->type != PT_EXACT) {
sk_drawPoint(quad, pt, 0.1);
}
- if (i > 0)
- {
+ if (i > 0) {
sk_drawEdge(quad, pt - 1, pt, 0.1);
}
@@ -615,7 +568,7 @@ static void sk_drawStroke(SK_Stroke *stk, int id, float color[3], int start, int
static void drawSubdividedStrokeBy(ToolSettings *toolsettings, BArcIterator *iter, NextSubdivisionFunc next_subdividion)
{
- SK_Stroke *stk = ((SK_StrokeIterator*)iter)->stroke;
+ SK_Stroke *stk = ((SK_StrokeIterator *)iter)->stroke;
float head[3], tail[3];
int bone_start = 0;
int end = iter->length;
@@ -627,8 +580,7 @@ static void drawSubdividedStrokeBy(ToolSettings *toolsettings, BArcIterator *ite
copy_v3_v3(head, iter->p);
index = next_subdividion(toolsettings, iter, bone_start, end, head, tail);
- while (index != -1)
- {
+ while (index != -1) {
SK_Point *pt = stk->points + index;
glPushMatrix();
@@ -654,41 +606,32 @@ static void sk_drawStrokeSubdivision(ToolSettings *toolsettings, SK_Stroke *stk)
int head_index = -1;
int i;
- if (toolsettings->bone_sketching_convert == SK_CONVERT_RETARGET)
- {
+ if (toolsettings->bone_sketching_convert == SK_CONVERT_RETARGET) {
return;
}
- for (i = 0; i < stk->nb_points; i++)
- {
+ for (i = 0; i < stk->nb_points; i++) {
SK_Point *pt = stk->points + i;
- if (pt->type == PT_EXACT || i == stk->nb_points - 1) /* stop on exact or on last point */
- {
- if (head_index == -1)
- {
+ if (pt->type == PT_EXACT || i == stk->nb_points - 1) /* stop on exact or on last point */ {
+ if (head_index == -1) {
head_index = i;
}
- else
- {
- if (i - head_index > 1)
- {
+ else {
+ if (i - head_index > 1) {
SK_StrokeIterator sk_iter;
- BArcIterator *iter = (BArcIterator*)&sk_iter;
+ BArcIterator *iter = (BArcIterator *)&sk_iter;
initStrokeIterator(iter, stk, head_index, i);
- if (toolsettings->bone_sketching_convert == SK_CONVERT_CUT_ADAPTATIVE)
- {
+ if (toolsettings->bone_sketching_convert == SK_CONVERT_CUT_ADAPTATIVE) {
drawSubdividedStrokeBy(toolsettings, iter, nextAdaptativeSubdivision);
}
- else if (toolsettings->bone_sketching_convert == SK_CONVERT_CUT_LENGTH)
- {
+ else if (toolsettings->bone_sketching_convert == SK_CONVERT_CUT_LENGTH) {
drawSubdividedStrokeBy(toolsettings, iter, nextLengthSubdivision);
}
- else if (toolsettings->bone_sketching_convert == SK_CONVERT_CUT_FIXED)
- {
+ else if (toolsettings->bone_sketching_convert == SK_CONVERT_CUT_FIXED) {
drawSubdividedStrokeBy(toolsettings, iter, nextFixedSubdivision);
}
@@ -706,10 +649,8 @@ static SK_Point *sk_snapPointStroke(bContext *C, SK_Stroke *stk, int mval[2], in
SK_Point *pt = NULL;
int i;
- for (i = 0; i < stk->nb_points; i++)
- {
- if (all_pts || stk->points[i].type == PT_EXACT)
- {
+ for (i = 0; i < stk->nb_points; i++) {
+ if (all_pts || stk->points[i].type == PT_EXACT) {
short pval[2];
int pdist;
@@ -717,13 +658,11 @@ static SK_Point *sk_snapPointStroke(bContext *C, SK_Stroke *stk, int mval[2], in
pdist = ABS(pval[0] - mval[0]) + ABS(pval[1] - mval[1]);
- if (pdist < *dist)
- {
+ if (pdist < *dist) {
*dist = pdist;
pt = stk->points + i;
- if (index != NULL)
- {
+ if (index != NULL) {
*index = i;
}
}
@@ -793,83 +732,68 @@ void sk_resetOverdraw(SK_Sketch *sketch)
int sk_hasOverdraw(SK_Sketch *sketch, SK_Stroke *stk)
{
- return sketch->over.target &&
- sketch->over.count >= SK_OVERDRAW_LIMIT &&
- (sketch->over.target == stk || stk == NULL) &&
- (sketch->over.start != -1 || sketch->over.end != -1);
+ return sketch->over.target &&
+ sketch->over.count >= SK_OVERDRAW_LIMIT &&
+ (sketch->over.target == stk || stk == NULL) &&
+ (sketch->over.start != -1 || sketch->over.end != -1);
}
static void sk_updateOverdraw(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *dd)
{
- if (sketch->over.target == NULL)
- {
+ if (sketch->over.target == NULL) {
SK_Stroke *target;
int closest_index = -1;
int dist = SNAP_MIN_DISTANCE * 2;
- for (target = sketch->strokes.first; target; target = target->next)
- {
- if (target != stk)
- {
+ for (target = sketch->strokes.first; target; target = target->next) {
+ if (target != stk) {
int index;
SK_Point *spt = sk_snapPointStroke(C, target, dd->mval, &dist, &index, 1);
- if (spt != NULL)
- {
+ if (spt != NULL) {
sketch->over.target = target;
closest_index = index;
}
}
}
- if (sketch->over.target != NULL)
- {
- if (closest_index > -1)
- {
- if (sk_lastStrokePoint(stk)->type == PT_EXACT)
- {
+ if (sketch->over.target != NULL) {
+ if (closest_index > -1) {
+ if (sk_lastStrokePoint(stk)->type == PT_EXACT) {
sketch->over.count = SK_OVERDRAW_LIMIT;
}
- else
- {
+ else {
sketch->over.count++;
}
}
- if (stk->nb_points == 1)
- {
+ if (stk->nb_points == 1) {
sketch->over.start = closest_index;
}
- else
- {
+ else {
sketch->over.end = closest_index;
}
}
}
- else if (sketch->over.target != NULL)
- {
+ else if (sketch->over.target != NULL) {
SK_Point *closest_pt = NULL;
int dist = SNAP_MIN_DISTANCE * 2;
int index;
closest_pt = sk_snapPointStroke(C, sketch->over.target, dd->mval, &dist, &index, 1);
- if (closest_pt != NULL)
- {
- if (sk_lastStrokePoint(stk)->type == PT_EXACT)
- {
+ if (closest_pt != NULL) {
+ if (sk_lastStrokePoint(stk)->type == PT_EXACT) {
sketch->over.count = SK_OVERDRAW_LIMIT;
}
- else
- {
+ else {
sketch->over.count++;
}
sketch->over.end = index;
}
- else
- {
+ else {
sketch->over.end = -1;
}
}
@@ -883,18 +807,15 @@ static int sk_adjustIndexes(SK_Sketch *sketch, int *start, int *end)
*start = sketch->over.start;
*end = sketch->over.end;
- if (*start == -1)
- {
+ if (*start == -1) {
*start = 0;
}
- if (*end == -1)
- {
+ if (*end == -1) {
*end = sketch->over.target->nb_points - 1;
}
- if (*end < *start)
- {
+ if (*end < *start) {
int tmp = *start;
*start = *end;
*end = tmp;
@@ -908,18 +829,15 @@ static void sk_endOverdraw(SK_Sketch *sketch)
{
SK_Stroke *stk = sketch->active_stroke;
- if (sk_hasOverdraw(sketch, NULL))
- {
+ if (sk_hasOverdraw(sketch, NULL)) {
int start;
int end;
- if (sk_adjustIndexes(sketch, &start, &end))
- {
+ if (sk_adjustIndexes(sketch, &start, &end)) {
sk_reverseStroke(stk);
}
- if (stk->nb_points > 1)
- {
+ if (stk->nb_points > 1) {
stk->points->type = sketch->over.target->points[start].type;
sk_lastStrokePoint(stk)->type = sketch->over.target->points[end].type;
}
@@ -948,8 +866,7 @@ static void sk_endStroke(bContext *C, SK_Sketch *sketch)
ToolSettings *ts = CTX_data_tool_settings(C);
sk_shrinkStrokeBuffer(sketch->active_stroke);
- if (ts->bone_sketching & BONE_SKETCHING_ADJUST)
- {
+ if (ts->bone_sketching & BONE_SKETCHING_ADJUST) {
sk_endOverdraw(sketch);
}
@@ -977,8 +894,7 @@ static float sk_distanceDepth(bContext *C, float p1[3], float p2[3])
distance = len_v3(vec);
- if (dot_v3v3(rv3d->viewinv[2], vec) > 0)
- {
+ if (dot_v3v3(rv3d->viewinv[2], vec) > 0) {
distance *= -1;
}
@@ -996,8 +912,7 @@ static void sk_interpolateDepth(bContext *C, SK_Stroke *stk, int start, int end,
progress = len_v3v3(stk->points[start].p, stk->points[start - 1].p);
- for (i = start; i <= end; i++)
- {
+ for (i = start; i <= end; i++) {
float ray_start[3], ray_normal[3];
float delta = len_v3v3(stk->points[i].p, stk->points[i + 1].p);
float pval[2];
@@ -1022,8 +937,7 @@ static void sk_projectDrawPoint(bContext *C, float vec[3], SK_Stroke *stk, SK_Dr
float dvec[3];
float mval_f[2];
- if (last != NULL)
- {
+ if (last != NULL) {
copy_v3_v3(fp, last->p);
}
@@ -1065,8 +979,7 @@ static int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, S
ToolSettings *ts = CTX_data_tool_settings(C);
int point_added = 0;
- if (ts->snap_mode == SCE_SNAP_MODE_VOLUME)
- {
+ if (ts->snap_mode == SCE_SNAP_MODE_VOLUME) {
DepthPeel *p1, *p2;
float *last_p = NULL;
float dist = FLT_MAX;
@@ -1077,24 +990,20 @@ static int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, S
BLI_freelistN(&sketch->depth_peels);
sketch->depth_peels.first = sketch->depth_peels.last = NULL;
- mvalf[0]= dd->mval[0];
- mvalf[1]= dd->mval[1];
+ mvalf[0] = dd->mval[0];
+ mvalf[1] = dd->mval[1];
peelObjectsContext(C, &sketch->depth_peels, mvalf, SNAP_ALL);
- if (stk->nb_points > 0 && stk->points[stk->nb_points - 1].type == PT_CONTINUOUS)
- {
+ if (stk->nb_points > 0 && stk->points[stk->nb_points - 1].type == PT_CONTINUOUS) {
last_p = stk->points[stk->nb_points - 1].p;
}
- else if (LAST_SNAP_POINT_VALID)
- {
+ else if (LAST_SNAP_POINT_VALID) {
last_p = LAST_SNAP_POINT;
}
- for (p1 = sketch->depth_peels.first; p1; p1 = p1->next)
- {
- if (p1->flag == 0)
- {
+ for (p1 = sketch->depth_peels.first; p1; p1 = p1->next) {
+ if (p1->flag == 0) {
float vec[3];
float new_dist;
float new_size = 0;
@@ -1103,42 +1012,34 @@ static int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, S
p1->flag = 1;
/* if peeling objects, take the first and last from each object */
- if (ts->snap_flag & SCE_SNAP_PEEL_OBJECT)
- {
+ if (ts->snap_flag & SCE_SNAP_PEEL_OBJECT) {
DepthPeel *peel;
- for (peel = p1->next; peel; peel = peel->next)
- {
- if (peel->ob == p1->ob)
- {
+ for (peel = p1->next; peel; peel = peel->next) {
+ if (peel->ob == p1->ob) {
peel->flag = 1;
p2 = peel;
}
}
}
/* otherwise, pair first with second and so on */
- else
- {
- for (p2 = p1->next; p2 && p2->ob != p1->ob; p2 = p2->next)
- {
+ else {
+ for (p2 = p1->next; p2 && p2->ob != p1->ob; p2 = p2->next) {
/* nothing to do here */
}
}
- if (p2)
- {
+ if (p2) {
p2->flag = 1;
add_v3_v3v3(vec, p1->p, p2->p);
mul_v3_fl(vec, 0.5f);
new_size = len_v3v3(p1->p, p2->p);
}
- else
- {
+ else {
copy_v3_v3(vec, p1->p);
}
- if (last_p == NULL)
- {
+ if (last_p == NULL) {
copy_v3_v3(p, vec);
size = new_size;
dist = 0;
@@ -1147,8 +1048,7 @@ static int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, S
new_dist = len_v3v3(last_p, vec);
- if (new_dist < dist)
- {
+ if (new_dist < dist) {
copy_v3_v3(p, vec);
dist = new_dist;
size = new_size;
@@ -1156,8 +1056,7 @@ static int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, S
}
}
- if (dist != FLT_MAX)
- {
+ if (dist != FLT_MAX) {
pt->type = dd->type;
pt->mode = PT_SNAP;
pt->size = size / 2;
@@ -1168,8 +1067,7 @@ static int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, S
//BLI_freelistN(&depth_peels);
}
- else
- {
+ else {
SK_Stroke *snap_stk;
float vec[3];
float no[3];
@@ -1179,20 +1077,16 @@ static int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, S
/* snap to strokes */
// if (ts->snap_mode == SCE_SNAP_MODE_VERTEX) /* snap all the time to strokes */
- for (snap_stk = sketch->strokes.first; snap_stk; snap_stk = snap_stk->next)
- {
+ for (snap_stk = sketch->strokes.first; snap_stk; snap_stk = snap_stk->next) {
SK_Point *spt = NULL;
- if (snap_stk == stk)
- {
+ if (snap_stk == stk) {
spt = sk_snapPointStroke(C, snap_stk, dd->mval, &dist, NULL, 0);
}
- else
- {
+ else {
spt = sk_snapPointStroke(C, snap_stk, dd->mval, &dist, NULL, 1);
}
- if (spt != NULL)
- {
+ if (spt != NULL) {
copy_v3_v3(pt->p, spt->p);
point_added = 1;
}
@@ -1203,8 +1097,7 @@ static int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, S
/* try to snap to closer object */
found = snapObjectsContext(C, mval, &dist, vec, no, SNAP_NOT_SELECTED);
- if (found == 1)
- {
+ if (found == 1) {
pt->type = dd->type;
pt->mode = PT_SNAP;
copy_v3_v3(pt->p, vec);
@@ -1227,8 +1120,7 @@ static int sk_addStrokeSnapPoint(bContext *C, SK_Sketch *sketch, SK_Stroke *stk,
point_added = sk_getStrokeSnapPoint(C, &pt, sketch, stk, dd);
- if (point_added)
- {
+ if (point_added) {
float final_p[3];
float length, distance;
int total;
@@ -1242,18 +1134,15 @@ static int sk_addStrokeSnapPoint(bContext *C, SK_Sketch *sketch, SK_Stroke *stk,
/* update all previous point to give smooth Z progresion */
total = 0;
length = 0;
- for (i = stk->nb_points - 2; i > 0; i--)
- {
+ for (i = stk->nb_points - 2; i > 0; i--) {
length += len_v3v3(stk->points[i].p, stk->points[i + 1].p);
total++;
- if (stk->points[i].mode == PT_SNAP || stk->points[i].type == PT_EXACT)
- {
+ if (stk->points[i].mode == PT_SNAP || stk->points[i].type == PT_EXACT) {
break;
}
}
- if (total > 1)
- {
+ if (total > 1) {
distance = sk_distanceDepth(C, final_p, stk->points[i].p);
sk_interpolateDepth(C, stk, i + 1, stk->nb_points - 2, length, distance);
@@ -1272,18 +1161,15 @@ static void sk_addStrokePoint(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK
ToolSettings *ts = CTX_data_tool_settings(C);
int point_added = 0;
- if (snap)
- {
+ if (snap) {
point_added = sk_addStrokeSnapPoint(C, sketch, stk, dd);
}
- if (point_added == 0)
- {
+ if (point_added == 0) {
point_added = sk_addStrokeDrawPoint(C, sketch, stk, dd);
}
- if (stk == sketch->active_stroke && ts->bone_sketching & BONE_SKETCHING_ADJUST)
- {
+ if (stk == sketch->active_stroke && ts->bone_sketching & BONE_SKETCHING_ADJUST) {
sk_updateOverdraw(C, sketch, stk, dd);
}
}
@@ -1292,31 +1178,28 @@ static void sk_getStrokePoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, SK_S
{
int point_added = 0;
- if (snap)
- {
+ if (snap) {
point_added = sk_getStrokeSnapPoint(C, pt, sketch, stk, dd);
LAST_SNAP_POINT_VALID = 1;
copy_v3_v3(LAST_SNAP_POINT, pt->p);
}
- else
- {
+ else {
LAST_SNAP_POINT_VALID = 0;
}
- if (point_added == 0)
- {
+ if (point_added == 0) {
point_added = sk_getStrokeDrawPoint(C, pt, sketch, stk, dd);
}
}
/********************************************/
-static void* headPoint(void *arg);
-static void* tailPoint(void *arg);
-static void* nextPoint(void *arg);
-static void* nextNPoint(void *arg, int n);
-static void* peekPoint(void *arg, int n);
-static void* previousPoint(void *arg);
+static void *headPoint(void *arg);
+static void *tailPoint(void *arg);
+static void *nextPoint(void *arg);
+static void *nextNPoint(void *arg, int n);
+static void *peekPoint(void *arg, int n);
+static void *previousPoint(void *arg);
static int iteratorStopped(void *arg);
static void initIteratorFct(SK_StrokeIterator *iter)
@@ -1330,19 +1213,17 @@ static void initIteratorFct(SK_StrokeIterator *iter)
iter->stopped = iteratorStopped;
}
-static SK_Point* setIteratorValues(SK_StrokeIterator *iter, int index)
+static SK_Point *setIteratorValues(SK_StrokeIterator *iter, int index)
{
SK_Point *pt = NULL;
- if (index >= 0 && index < iter->length)
- {
+ if (index >= 0 && index < iter->length) {
pt = &(iter->stroke->points[iter->start + (iter->stride * index)]);
iter->p = pt->p;
iter->no = pt->no;
iter->size = pt->size;
}
- else
- {
+ else {
iter->p = NULL;
iter->no = NULL;
iter->size = 0;
@@ -1353,19 +1234,17 @@ static SK_Point* setIteratorValues(SK_StrokeIterator *iter, int index)
void initStrokeIterator(BArcIterator *arg, SK_Stroke *stk, int start, int end)
{
- SK_StrokeIterator *iter = (SK_StrokeIterator*)arg;
+ SK_StrokeIterator *iter = (SK_StrokeIterator *)arg;
initIteratorFct(iter);
iter->stroke = stk;
- if (start < end)
- {
+ if (start < end) {
iter->start = start + 1;
iter->end = end - 1;
iter->stride = 1;
}
- else
- {
+ else {
iter->start = start - 1;
iter->end = end + 1;
iter->stride = -1;
@@ -1377,9 +1256,9 @@ void initStrokeIterator(BArcIterator *arg, SK_Stroke *stk, int start, int end)
}
-static void* headPoint(void *arg)
+static void *headPoint(void *arg)
{
- SK_StrokeIterator *iter = (SK_StrokeIterator*)arg;
+ SK_StrokeIterator *iter = (SK_StrokeIterator *)arg;
SK_Point *result = NULL;
result = &(iter->stroke->points[iter->start - iter->stride]);
@@ -1390,9 +1269,9 @@ static void* headPoint(void *arg)
return result;
}
-static void* tailPoint(void *arg)
+static void *tailPoint(void *arg)
{
- SK_StrokeIterator *iter = (SK_StrokeIterator*)arg;
+ SK_StrokeIterator *iter = (SK_StrokeIterator *)arg;
SK_Point *result = NULL;
result = &(iter->stroke->points[iter->end + iter->stride]);
@@ -1403,58 +1282,54 @@ static void* tailPoint(void *arg)
return result;
}
-static void* nextPoint(void *arg)
+static void *nextPoint(void *arg)
{
- SK_StrokeIterator *iter = (SK_StrokeIterator*)arg;
+ SK_StrokeIterator *iter = (SK_StrokeIterator *)arg;
SK_Point *result = NULL;
iter->index++;
- if (iter->index < iter->length)
- {
+ if (iter->index < iter->length) {
result = setIteratorValues(iter, iter->index);
}
return result;
}
-static void* nextNPoint(void *arg, int n)
+static void *nextNPoint(void *arg, int n)
{
- SK_StrokeIterator *iter = (SK_StrokeIterator*)arg;
+ SK_StrokeIterator *iter = (SK_StrokeIterator *)arg;
SK_Point *result = NULL;
iter->index += n;
/* check if passed end */
- if (iter->index < iter->length)
- {
+ if (iter->index < iter->length) {
result = setIteratorValues(iter, iter->index);
}
return result;
}
-static void* peekPoint(void *arg, int n)
+static void *peekPoint(void *arg, int n)
{
- SK_StrokeIterator *iter = (SK_StrokeIterator*)arg;
+ SK_StrokeIterator *iter = (SK_StrokeIterator *)arg;
SK_Point *result = NULL;
int index = iter->index + n;
/* check if passed end */
- if (index < iter->length)
- {
+ if (index < iter->length) {
result = setIteratorValues(iter, index);
}
return result;
}
-static void* previousPoint(void *arg)
+static void *previousPoint(void *arg)
{
- SK_StrokeIterator *iter = (SK_StrokeIterator*)arg;
+ SK_StrokeIterator *iter = (SK_StrokeIterator *)arg;
SK_Point *result = NULL;
- if (iter->index > 0)
- {
+ if (iter->index > 0) {
iter->index--;
result = setIteratorValues(iter, iter->index);
}
@@ -1464,14 +1339,12 @@ static void* previousPoint(void *arg)
static int iteratorStopped(void *arg)
{
- SK_StrokeIterator *iter = (SK_StrokeIterator*)arg;
+ SK_StrokeIterator *iter = (SK_StrokeIterator *)arg;
- if (iter->index >= iter->length)
- {
+ if (iter->index >= iter->length) {
return 1;
}
- else
- {
+ else {
return 0;
}
}
@@ -1495,45 +1368,36 @@ static void sk_convertStroke(bContext *C, SK_Stroke *stk)
copy_m3_m4(tmat, obedit->obmat);
transpose_m3(tmat);
- for (i = 0; i < stk->nb_points; i++)
- {
+ for (i = 0; i < stk->nb_points; i++) {
SK_Point *pt = stk->points + i;
- if (pt->type == PT_EXACT)
- {
- if (head == NULL)
- {
+ if (pt->type == PT_EXACT) {
+ if (head == NULL) {
head_index = i;
head = pt;
}
- else
- {
+ else {
EditBone *bone = NULL;
EditBone *new_parent;
- if (i - head_index > 1)
- {
+ if (i - head_index > 1) {
SK_StrokeIterator sk_iter;
- BArcIterator *iter = (BArcIterator*)&sk_iter;
+ BArcIterator *iter = (BArcIterator *)&sk_iter;
initStrokeIterator(iter, stk, head_index, i);
- if (ts->bone_sketching_convert == SK_CONVERT_CUT_ADAPTATIVE)
- {
+ if (ts->bone_sketching_convert == SK_CONVERT_CUT_ADAPTATIVE) {
bone = subdivideArcBy(ts, arm, arm->edbo, iter, invmat, tmat, nextAdaptativeSubdivision);
}
- else if (ts->bone_sketching_convert == SK_CONVERT_CUT_LENGTH)
- {
+ else if (ts->bone_sketching_convert == SK_CONVERT_CUT_LENGTH) {
bone = subdivideArcBy(ts, arm, arm->edbo, iter, invmat, tmat, nextLengthSubdivision);
}
- else if (ts->bone_sketching_convert == SK_CONVERT_CUT_FIXED)
- {
+ else if (ts->bone_sketching_convert == SK_CONVERT_CUT_FIXED) {
bone = subdivideArcBy(ts, arm, arm->edbo, iter, invmat, tmat, nextFixedSubdivision);
}
}
- if (bone == NULL)
- {
+ if (bone == NULL) {
bone = ED_armature_edit_bone_add(arm, "Bone");
copy_v3_v3(bone->head, head->p);
@@ -1545,17 +1409,15 @@ static void sk_convertStroke(bContext *C, SK_Stroke *stk)
}
new_parent = bone;
- bone->flag |= BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL;
+ bone->flag |= BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL;
/* move to end of chain */
- while (bone->parent != NULL)
- {
+ while (bone->parent != NULL) {
bone = bone->parent;
- bone->flag |= BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL;
+ bone->flag |= BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL;
}
- if (parent != NULL)
- {
+ if (parent != NULL) {
bone->parent = parent;
bone->flag |= BONE_CONNECTED;
}
@@ -1573,16 +1435,12 @@ static void sk_convert(bContext *C, SK_Sketch *sketch)
ToolSettings *ts = CTX_data_tool_settings(C);
SK_Stroke *stk;
- for (stk = sketch->strokes.first; stk; stk = stk->next)
- {
- if (stk->selected == 1)
- {
- if (ts->bone_sketching_convert == SK_CONVERT_RETARGET)
- {
+ for (stk = sketch->strokes.first; stk; stk = stk->next) {
+ if (stk->selected == 1) {
+ if (ts->bone_sketching_convert == SK_CONVERT_RETARGET) {
sk_retargetStroke(C, stk);
}
- else
- {
+ else {
sk_convertStroke(C, stk);
}
// XXX
@@ -1600,8 +1458,7 @@ static int sk_getSelfIntersections(bContext *C, ListBase *list, SK_Stroke *gestu
int added = 0;
int s_i;
- for (s_i = 0; s_i < gesture->nb_points - 1; s_i++)
- {
+ for (s_i = 0; s_i < gesture->nb_points - 1; s_i++) {
float s_p1[3] = {0, 0, 0};
float s_p2[3] = {0, 0, 0};
int g_i;
@@ -1610,8 +1467,7 @@ static int sk_getSelfIntersections(bContext *C, ListBase *list, SK_Stroke *gestu
project_float(ar, gesture->points[s_i + 1].p, s_p2);
/* start checking from second next, because two consecutive cannot intersect */
- for (g_i = s_i + 2; g_i < gesture->nb_points - 1; g_i++)
- {
+ for (g_i = s_i + 2; g_i < gesture->nb_points - 1; g_i++) {
float g_p1[3] = {0, 0, 0};
float g_p2[3] = {0, 0, 0};
float vi[3];
@@ -1620,8 +1476,7 @@ static int sk_getSelfIntersections(bContext *C, ListBase *list, SK_Stroke *gestu
project_float(ar, gesture->points[g_i].p, g_p1);
project_float(ar, gesture->points[g_i + 1].p, g_p2);
- if (isect_line_line_strict_v3(s_p1, s_p2, g_p1, g_p2, vi, &lambda))
- {
+ if (isect_line_line_strict_v3(s_p1, s_p2, g_p1, g_p2, vi, &lambda)) {
SK_Intersection *isect = MEM_callocN(sizeof(SK_Intersection), "Intersection");
isect->gesture_index = g_i;
@@ -1647,24 +1502,18 @@ static int cmpIntersections(void *i1, void *i2)
{
SK_Intersection *isect1 = i1, *isect2 = i2;
- if (isect1->stroke == isect2->stroke)
- {
- if (isect1->before < isect2->before)
- {
+ if (isect1->stroke == isect2->stroke) {
+ if (isect1->before < isect2->before) {
return -1;
}
- else if (isect1->before > isect2->before)
- {
+ else if (isect1->before > isect2->before) {
return 1;
}
- else
- {
- if (isect1->lambda < isect2->lambda)
- {
+ else {
+ if (isect1->lambda < isect2->lambda) {
return -1;
}
- else if (isect1->lambda > isect2->lambda)
- {
+ else if (isect1->lambda > isect2->lambda) {
return 1;
}
}
@@ -1683,13 +1532,11 @@ static int sk_getIntersections(bContext *C, ListBase *list, SK_Sketch *sketch, S
SK_Stroke *stk;
int added = 0;
- for (stk = sketch->strokes.first; stk; stk = stk->next)
- {
+ for (stk = sketch->strokes.first; stk; stk = stk->next) {
int s_added = 0;
int s_i;
- for (s_i = 0; s_i < stk->nb_points - 1; s_i++)
- {
+ for (s_i = 0; s_i < stk->nb_points - 1; s_i++) {
float s_p1[3] = {0, 0, 0};
float s_p2[3] = {0, 0, 0};
int g_i;
@@ -1697,8 +1544,7 @@ static int sk_getIntersections(bContext *C, ListBase *list, SK_Sketch *sketch, S
project_float(ar, stk->points[s_i].p, s_p1);
project_float(ar, stk->points[s_i + 1].p, s_p2);
- for (g_i = 0; g_i < gesture->nb_points - 1; g_i++)
- {
+ for (g_i = 0; g_i < gesture->nb_points - 1; g_i++) {
float g_p1[3] = {0, 0, 0};
float g_p2[3] = {0, 0, 0};
float vi[3];
@@ -1707,8 +1553,7 @@ static int sk_getIntersections(bContext *C, ListBase *list, SK_Sketch *sketch, S
project_float(ar, gesture->points[g_i].p, g_p1);
project_float(ar, gesture->points[g_i + 1].p, g_p2);
- if (isect_line_line_strict_v3(s_p1, s_p2, g_p1, g_p2, vi, &lambda))
- {
+ if (isect_line_line_strict_v3(s_p1, s_p2, g_p1, g_p2, vi, &lambda)) {
SK_Intersection *isect = MEM_callocN(sizeof(SK_Intersection), "Intersection");
float ray_start[3], ray_end[3];
float mval[2];
@@ -1723,12 +1568,12 @@ static int sk_getIntersections(bContext *C, ListBase *list, SK_Sketch *sketch, S
mval[1] = vi[1];
ED_view3d_win_to_segment_clip(ar, v3d, mval, ray_start, ray_end);
- isect_line_line_v3( stk->points[s_i].p,
- stk->points[s_i + 1].p,
- ray_start,
- ray_end,
- isect->p,
- vi);
+ isect_line_line_v3(stk->points[s_i].p,
+ stk->points[s_i + 1].p,
+ ray_start,
+ ray_end,
+ isect->p,
+ vi);
BLI_addtail(list, isect);
@@ -1748,7 +1593,7 @@ static int sk_getIntersections(bContext *C, ListBase *list, SK_Sketch *sketch, S
static int sk_getSegments(SK_Stroke *segments, SK_Stroke *gesture)
{
SK_StrokeIterator sk_iter;
- BArcIterator *iter = (BArcIterator*)&sk_iter;
+ BArcIterator *iter = (BArcIterator *)&sk_iter;
float CORRELATION_THRESHOLD = 0.99f;
float *vec;
@@ -1759,15 +1604,13 @@ static int sk_getSegments(SK_Stroke *segments, SK_Stroke *gesture)
initStrokeIterator(iter, gesture, 0, gesture->nb_points - 1);
- for (i = 1, j = 0; i < gesture->nb_points; i++)
- {
+ for (i = 1, j = 0; i < gesture->nb_points; i++) {
float n[3];
/* Calculate normal */
sub_v3_v3v3(n, gesture->points[i].p, vec);
- if (calcArcCorrelation(iter, j, i, vec, n) < CORRELATION_THRESHOLD)
- {
+ if (calcArcCorrelation(iter, j, i, vec, n) < CORRELATION_THRESHOLD) {
j = i - 1;
sk_appendStrokePoint(segments, &gesture->points[j]);
vec = segments->points[segments->nb_points - 1].p;
@@ -1782,8 +1625,7 @@ static int sk_getSegments(SK_Stroke *segments, SK_Stroke *gesture)
int sk_detectCutGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UNUSED(sketch))
{
- if (gest->nb_segments == 1 && gest->nb_intersections == 1)
- {
+ if (gest->nb_segments == 1 && gest->nb_intersections == 1) {
return 1;
}
@@ -1794,8 +1636,7 @@ void sk_applyCutGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UNUSED
{
SK_Intersection *isect;
- for (isect = gest->intersections.first; isect; isect = isect->next)
- {
+ for (isect = gest->intersections.first; isect; isect = isect->next) {
SK_Point pt;
pt.type = PT_EXACT;
@@ -1809,8 +1650,7 @@ void sk_applyCutGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UNUSED
int sk_detectTrimGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UNUSED(sketch))
{
- if (gest->nb_segments == 2 && gest->nb_intersections == 1 && gest->nb_self_intersections == 0)
- {
+ if (gest->nb_segments == 2 && gest->nb_intersections == 1 && gest->nb_self_intersections == 0) {
float s1[3], s2[3];
float angle;
@@ -1819,8 +1659,7 @@ int sk_detectTrimGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UNUSE
angle = RAD2DEGF(angle_v2v2(s1, s2));
- if (angle > 60 && angle < 120)
- {
+ if (angle > 60 && angle < 120) {
return 1;
}
}
@@ -1835,8 +1674,7 @@ void sk_applyTrimGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UNUSE
sub_v3_v3v3(trim_dir, gest->segments->points[2].p, gest->segments->points[1].p);
- for (isect = gest->intersections.first; isect; isect = isect->next)
- {
+ for (isect = gest->intersections.first; isect; isect = isect->next) {
SK_Point pt;
float stroke_dir[3];
@@ -1848,14 +1686,12 @@ void sk_applyTrimGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UNUSE
sub_v3_v3v3(stroke_dir, isect->stroke->points[isect->after].p, isect->stroke->points[isect->before].p);
/* same direction, trim end */
- if (dot_v3v3(stroke_dir, trim_dir) > 0)
- {
+ if (dot_v3v3(stroke_dir, trim_dir) > 0) {
sk_replaceStrokePoint(isect->stroke, &pt, isect->after);
sk_trimStroke(isect->stroke, 0, isect->after);
}
/* else, trim start */
- else
- {
+ else {
sk_replaceStrokePoint(isect->stroke, &pt, isect->before);
sk_trimStroke(isect->stroke, isect->before, isect->stroke->nb_points - 1);
}
@@ -1865,15 +1701,12 @@ void sk_applyTrimGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UNUSE
int sk_detectCommandGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UNUSED(sketch))
{
- if (gest->nb_segments > 2 && gest->nb_intersections == 2 && gest->nb_self_intersections == 1)
- {
+ if (gest->nb_segments > 2 && gest->nb_intersections == 2 && gest->nb_self_intersections == 1) {
SK_Intersection *isect, *self_isect;
/* get the the last intersection of the first pair */
- for ( isect = gest->intersections.first; isect; isect = isect->next )
- {
- if (isect->stroke == isect->next->stroke)
- {
+ for (isect = gest->intersections.first; isect; isect = isect->next) {
+ if (isect->stroke == isect->next->stroke) {
isect = isect->next;
break;
}
@@ -1881,8 +1714,7 @@ int sk_detectCommandGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UN
self_isect = gest->self_intersections.first;
- if (isect && isect->gesture_index < self_isect->gesture_index)
- {
+ if (isect && isect->gesture_index < self_isect->gesture_index) {
return 1;
}
}
@@ -1899,16 +1731,13 @@ void sk_applyCommandGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UN
// command = pupmenu("Action %t|Flatten %x1|Straighten %x2|Polygonize %x3");
if (command < 1) return;
- for (isect = gest->intersections.first; isect; isect = isect->next)
- {
+ for (isect = gest->intersections.first; isect; isect = isect->next) {
SK_Intersection *i2;
i2 = isect->next;
- if (i2 && i2->stroke == isect->stroke)
- {
- switch (command)
- {
+ if (i2 && i2->stroke == isect->stroke) {
+ switch (command) {
case 1:
sk_flattenStroke(isect->stroke, isect->before, i2->after);
break;
@@ -1927,8 +1756,7 @@ void sk_applyCommandGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UN
int sk_detectDeleteGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UNUSED(sketch))
{
- if (gest->nb_segments == 2 && gest->nb_intersections == 2)
- {
+ if (gest->nb_segments == 2 && gest->nb_intersections == 2) {
float s1[3], s2[3];
float angle;
@@ -1937,8 +1765,7 @@ int sk_detectDeleteGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UNU
angle = RAD2DEGF(angle_v2v2(s1, s2));
- if (angle > 120)
- {
+ if (angle > 120) {
return 1;
}
}
@@ -1950,11 +1777,9 @@ void sk_applyDeleteGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *ske
{
SK_Intersection *isect;
- for (isect = gest->intersections.first; isect; isect = isect->next)
- {
+ for (isect = gest->intersections.first; isect; isect = isect->next) {
/* only delete strokes that are crossed twice */
- if (isect->next && isect->next->stroke == isect->stroke)
- {
+ if (isect->next && isect->next->stroke == isect->stroke) {
isect = isect->next;
sk_removeStroke(sketch, isect->stroke);
@@ -1965,8 +1790,7 @@ void sk_applyDeleteGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *ske
int sk_detectMergeGesture(bContext *C, SK_Gesture *gest, SK_Sketch *UNUSED(sketch))
{
ARegion *ar = CTX_wm_region(C);
- if (gest->nb_segments > 2 && gest->nb_intersections == 2)
- {
+ if (gest->nb_segments > 2 && gest->nb_intersections == 2) {
short start_val[2], end_val[2];
short dist;
@@ -1976,26 +1800,21 @@ int sk_detectMergeGesture(bContext *C, SK_Gesture *gest, SK_Sketch *UNUSED(sketc
dist = MAX2(ABS(start_val[0] - end_val[0]), ABS(start_val[1] - end_val[1]));
/* if gesture is a circle */
- if ( dist <= 20 )
- {
+ if (dist <= 20) {
SK_Intersection *isect;
/* check if it circled around an exact point */
- for (isect = gest->intersections.first; isect; isect = isect->next)
- {
+ for (isect = gest->intersections.first; isect; isect = isect->next) {
/* only delete strokes that are crossed twice */
- if (isect->next && isect->next->stroke == isect->stroke)
- {
+ if (isect->next && isect->next->stroke == isect->stroke) {
int start_index, end_index;
int i;
start_index = MIN2(isect->after, isect->next->after);
end_index = MAX2(isect->before, isect->next->before);
- for (i = start_index; i <= end_index; i++)
- {
- if (isect->stroke->points[i].type == PT_EXACT)
- {
+ for (i = start_index; i <= end_index; i++) {
+ if (isect->stroke->points[i].type == PT_EXACT) {
return 1; /* at least one exact point found, stop detect here */
}
}
@@ -2015,22 +1834,18 @@ void sk_applyMergeGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UNUS
SK_Intersection *isect;
/* check if it circled around an exact point */
- for (isect = gest->intersections.first; isect; isect = isect->next)
- {
+ for (isect = gest->intersections.first; isect; isect = isect->next) {
/* only merge strokes that are crossed twice */
- if (isect->next && isect->next->stroke == isect->stroke)
- {
+ if (isect->next && isect->next->stroke == isect->stroke) {
int start_index, end_index;
int i;
start_index = MIN2(isect->after, isect->next->after);
end_index = MAX2(isect->before, isect->next->before);
- for (i = start_index; i <= end_index; i++)
- {
+ for (i = start_index; i <= end_index; i++) {
/* if exact, switch to continuous */
- if (isect->stroke->points[i].type == PT_EXACT)
- {
+ if (isect->stroke->points[i].type == PT_EXACT) {
isect->stroke->points[i].type = PT_CONTINUOUS;
}
}
@@ -2043,34 +1858,28 @@ void sk_applyMergeGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UNUS
int sk_detectReverseGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UNUSED(sketch))
{
- if (gest->nb_segments > 2 && gest->nb_intersections == 2 && gest->nb_self_intersections == 0)
- {
+ if (gest->nb_segments > 2 && gest->nb_intersections == 2 && gest->nb_self_intersections == 0) {
SK_Intersection *isect;
/* check if it circled around an exact point */
- for (isect = gest->intersections.first; isect; isect = isect->next)
- {
+ for (isect = gest->intersections.first; isect; isect = isect->next) {
/* only delete strokes that are crossed twice */
- if (isect->next && isect->next->stroke == isect->stroke)
- {
+ if (isect->next && isect->next->stroke == isect->stroke) {
float start_v[3], end_v[3];
float angle;
- if (isect->gesture_index < isect->next->gesture_index)
- {
+ if (isect->gesture_index < isect->next->gesture_index) {
sub_v3_v3v3(start_v, isect->p, gest->stk->points[0].p);
sub_v3_v3v3(end_v, sk_lastStrokePoint(gest->stk)->p, isect->next->p);
}
- else
- {
+ else {
sub_v3_v3v3(start_v, isect->next->p, gest->stk->points[0].p);
sub_v3_v3v3(end_v, sk_lastStrokePoint(gest->stk)->p, isect->p);
}
angle = RAD2DEGF(angle_v2v2(start_v, end_v));
- if (angle > 120)
- {
+ if (angle > 120) {
return 1;
}
@@ -2087,11 +1896,9 @@ void sk_applyReverseGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UN
{
SK_Intersection *isect;
- for (isect = gest->intersections.first; isect; isect = isect->next)
- {
+ for (isect = gest->intersections.first; isect; isect = isect->next) {
/* only reverse strokes that are crossed twice */
- if (isect->next && isect->next->stroke == isect->stroke)
- {
+ if (isect->next && isect->next->stroke == isect->stroke) {
sk_reverseStroke(isect->stroke);
/* skip next */
@@ -2102,8 +1909,7 @@ void sk_applyReverseGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UN
int sk_detectConvertGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UNUSED(sketch))
{
- if (gest->nb_segments == 3 && gest->nb_self_intersections == 1)
- {
+ if (gest->nb_segments == 3 && gest->nb_self_intersections == 1) {
return 1;
}
return 0;
@@ -2142,10 +1948,8 @@ static void sk_applyGesture(bContext *C, SK_Sketch *sketch)
sk_initGesture(C, &gest, sketch);
/* detect and apply */
- for (act = GESTURE_ACTIONS; act->apply != NULL; act++)
- {
- if (act->detect(C, &gest, sketch))
- {
+ for (act = GESTURE_ACTIONS; act->apply != NULL; act++) {
+ if (act->detect(C, &gest, sketch)) {
act->apply(C, &gest, sketch);
break;
}
@@ -2166,15 +1970,14 @@ static int sk_selectStroke(bContext *C, SK_Sketch *sketch, const int mval[2], in
view3d_set_viewcontext(C, &vc);
- rect.xmin = mval[0]-5;
- rect.xmax = mval[0]+5;
- rect.ymin = mval[1]-5;
- rect.ymax = mval[1]+5;
+ rect.xmin = mval[0] - 5;
+ rect.xmax = mval[0] + 5;
+ rect.ymin = mval[1] - 5;
+ rect.ymax = mval[1] + 5;
hits = view3d_opengl_select(&vc, buffer, MAXPICKBUF, &rect);
- if (hits>0)
- {
+ if (hits > 0) {
int besthitresult = -1;
if (hits == 1) {
@@ -2185,18 +1988,15 @@ static int sk_selectStroke(bContext *C, SK_Sketch *sketch, const int mval[2], in
/* loop and get best hit */
}
- if (besthitresult > 0)
- {
+ if (besthitresult > 0) {
SK_Stroke *selected_stk = BLI_findlink(&sketch->strokes, besthitresult - 1);
- if (extend == 0)
- {
+ if (extend == 0) {
sk_selectAllSketch(sketch, -1);
selected_stk->selected = 1;
}
- else
- {
+ else {
selected_stk->selected ^= 1;
}
@@ -2226,56 +2026,47 @@ static void sk_queueRedrawSketch(SK_Sketch *sketch)
static void sk_drawSketch(Scene *scene, View3D *UNUSED(v3d), SK_Sketch *sketch, int with_names)
{
- ToolSettings *ts= scene->toolsettings;
+ ToolSettings *ts = scene->toolsettings;
SK_Stroke *stk;
glClear(GL_DEPTH_BUFFER_BIT);
glEnable(GL_DEPTH_TEST);
- if (with_names)
- {
+ if (with_names) {
int id;
- for (id = 1, stk = sketch->strokes.first; stk; id++, stk = stk->next)
- {
+ for (id = 1, stk = sketch->strokes.first; stk; id++, stk = stk->next) {
sk_drawStroke(stk, id, NULL, -1, -1);
}
glLoadName(-1);
}
- else
- {
+ else {
float selected_rgb[3] = {1, 0, 0};
float unselected_rgb[3] = {1, 0.5, 0};
- for (stk = sketch->strokes.first; stk; stk = stk->next)
- {
+ for (stk = sketch->strokes.first; stk; stk = stk->next) {
int start = -1;
int end = -1;
- if (sk_hasOverdraw(sketch, stk))
- {
+ if (sk_hasOverdraw(sketch, stk)) {
sk_adjustIndexes(sketch, &start, &end);
}
- sk_drawStroke(stk, -1, (stk->selected==1?selected_rgb:unselected_rgb), start, end);
+ sk_drawStroke(stk, -1, (stk->selected == 1 ? selected_rgb : unselected_rgb), start, end);
- if (stk->selected == 1)
- {
+ if (stk->selected == 1) {
sk_drawStrokeSubdivision(ts, stk);
}
}
- if (sketch->active_stroke != NULL)
- {
+ if (sketch->active_stroke != NULL) {
SK_Point *last = sk_lastStrokePoint(sketch->active_stroke);
- if (ts->bone_sketching & BONE_SKETCHING_QUICK)
- {
+ if (ts->bone_sketching & BONE_SKETCHING_QUICK) {
sk_drawStrokeSubdivision(ts, sketch->active_stroke);
}
- if (last != NULL)
- {
+ if (last != NULL) {
GLUquadric *quad = gluNewQuadric();
gluQuadricNormals(quad, GLU_SMOOTH);
@@ -2284,8 +2075,7 @@ static void sk_drawSketch(Scene *scene, View3D *UNUSED(v3d), SK_Sketch *sketch,
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- switch (sketch->next_point.mode)
- {
+ switch (sketch->next_point.mode) {
case PT_SNAP:
glColor3f(0, 1, 0);
break;
@@ -2345,8 +2135,7 @@ static void sk_drawSketch(Scene *scene, View3D *UNUSED(v3d), SK_Sketch *sketch,
glDisable(GL_DEPTH_TEST);
/* only draw gesture in active area */
- if (sketch->gesture != NULL /*&& area_is_active_area(G.vd->area)*/)
- {
+ if (sketch->gesture != NULL /* && area_is_active_area(G.vd->area) */) {
float gesture_rgb[3] = {0, 0.5, 1};
sk_drawStroke(sketch->gesture, -1, gesture_rgb, -1, -1);
}
@@ -2356,20 +2145,16 @@ static int sk_finish_stroke(bContext *C, SK_Sketch *sketch)
{
ToolSettings *ts = CTX_data_tool_settings(C);
- if (sketch->active_stroke != NULL)
- {
+ if (sketch->active_stroke != NULL) {
SK_Stroke *stk = sketch->active_stroke;
sk_endStroke(C, sketch);
- if (ts->bone_sketching & BONE_SKETCHING_QUICK)
- {
- if (ts->bone_sketching_convert == SK_CONVERT_RETARGET)
- {
+ if (ts->bone_sketching & BONE_SKETCHING_QUICK) {
+ if (ts->bone_sketching_convert == SK_CONVERT_RETARGET) {
sk_retargetStroke(C, stk);
}
- else
- {
+ else {
sk_convertStroke(C, stk);
}
// XXX
@@ -2389,8 +2174,7 @@ static int sk_finish_stroke(bContext *C, SK_Sketch *sketch)
static void sk_start_draw_stroke(SK_Sketch *sketch)
{
- if (sketch->active_stroke == NULL)
- {
+ if (sketch->active_stroke == NULL) {
sk_startStroke(sketch);
sk_selectAllSketch(sketch, -1);
@@ -2405,8 +2189,7 @@ static void sk_start_draw_gesture(SK_Sketch *sketch)
static int sk_draw_stroke(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *dd, short snap)
{
- if (sk_stroke_filtermval(dd))
- {
+ if (sk_stroke_filtermval(dd)) {
sk_addStrokePoint(C, sketch, stk, dd, snap);
sk_updateDrawData(dd);
sk_updateNextPoint(sketch, stk);
@@ -2420,27 +2203,24 @@ static int sk_draw_stroke(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_Dra
static int ValidSketchViewContext(ViewContext *vc)
{
Object *obedit = vc->obedit;
- Scene *scene= vc->scene;
+ Scene *scene = vc->scene;
if (obedit &&
- obedit->type == OB_ARMATURE &&
- scene->toolsettings->bone_sketching & BONE_SKETCHING)
+ obedit->type == OB_ARMATURE &&
+ scene->toolsettings->bone_sketching & BONE_SKETCHING)
{
return 1;
}
- else
- {
+ else {
return 0;
}
}
int BDR_drawSketchNames(ViewContext *vc)
{
- if (ValidSketchViewContext(vc))
- {
+ if (ValidSketchViewContext(vc)) {
SK_Sketch *sketch = viewcontextSketch(vc, 0);
- if (sketch)
- {
+ if (sketch) {
sk_drawSketch(vc->scene, vc->v3d, sketch, 1);
return 1;
}
@@ -2451,11 +2231,9 @@ int BDR_drawSketchNames(ViewContext *vc)
void BDR_drawSketch(const bContext *C)
{
- if (ED_operator_sketch_mode(C))
- {
+ if (ED_operator_sketch_mode(C)) {
SK_Sketch *sketch = contextSketch(C, 0);
- if (sketch)
- {
+ if (sketch) {
sk_drawSketch(CTX_data_scene(C), CTX_wm_view3d(C), sketch, 0);
}
}
@@ -2464,12 +2242,11 @@ void BDR_drawSketch(const bContext *C)
static int sketch_delete(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(event))
{
SK_Sketch *sketch = contextSketch(C, 0);
- if (sketch)
- {
+ if (sketch) {
sk_deleteSelectedStrokes(sketch);
// allqueue(REDRAWVIEW3D, 0);
}
- WM_event_add_notifier(C, NC_SCREEN|ND_SKETCH|NA_REMOVED, NULL);
+ WM_event_add_notifier(C, NC_SCREEN | ND_SKETCH | NA_REMOVED, NULL);
return OPERATOR_FINISHED;
}
@@ -2478,8 +2255,7 @@ void BIF_sk_selectStroke(bContext *C, const int mval[2], short extend)
ToolSettings *ts = CTX_data_tool_settings(C);
SK_Sketch *sketch = contextSketch(C, 0);
- if (sketch != NULL && ts->bone_sketching & BONE_SKETCHING)
- {
+ if (sketch != NULL && ts->bone_sketching & BONE_SKETCHING) {
if (sk_selectStroke(C, sketch, mval, extend))
ED_area_tag_redraw(CTX_wm_area(C));
}
@@ -2487,11 +2263,9 @@ void BIF_sk_selectStroke(bContext *C, const int mval[2], short extend)
void BIF_convertSketch(bContext *C)
{
- if (ED_operator_sketch_full_mode(C))
- {
+ if (ED_operator_sketch_full_mode(C)) {
SK_Sketch *sketch = contextSketch(C, 0);
- if (sketch)
- {
+ if (sketch) {
sk_convert(C, sketch);
// BIF_undo_push("Convert Sketch");
// allqueue(REDRAWVIEW3D, 0);
@@ -2502,11 +2276,9 @@ void BIF_convertSketch(bContext *C)
void BIF_deleteSketch(bContext *C)
{
- if (ED_operator_sketch_full_mode(C))
- {
+ if (ED_operator_sketch_full_mode(C)) {
SK_Sketch *sketch = contextSketch(C, 0);
- if (sketch)
- {
+ if (sketch) {
sk_deleteSelectedStrokes(sketch);
// BIF_undo_push("Convert Sketch");
// allqueue(REDRAWVIEW3D, 0);
@@ -2530,17 +2302,15 @@ void BIF_selectAllSketch(bContext *C, int mode)
}
#endif
-SK_Sketch* contextSketch(const bContext *C, int create)
+SK_Sketch *contextSketch(const bContext *C, int create)
{
Object *obedit = CTX_data_edit_object(C);
SK_Sketch *sketch = NULL;
- if (obedit && obedit->type == OB_ARMATURE)
- {
+ if (obedit && obedit->type == OB_ARMATURE) {
bArmature *arm = obedit->data;
- if (arm->sketch == NULL && create)
- {
+ if (arm->sketch == NULL && create) {
arm->sketch = createSketch();
}
sketch = arm->sketch;
@@ -2549,17 +2319,15 @@ SK_Sketch* contextSketch(const bContext *C, int create)
return sketch;
}
-SK_Sketch* viewcontextSketch(ViewContext *vc, int create)
+SK_Sketch *viewcontextSketch(ViewContext *vc, int create)
{
Object *obedit = vc->obedit;
SK_Sketch *sketch = NULL;
- if (obedit && obedit->type == OB_ARMATURE)
- {
+ if (obedit && obedit->type == OB_ARMATURE) {
bArmature *arm = obedit->data;
- if (arm->sketch == NULL && create)
- {
+ if (arm->sketch == NULL && create) {
arm->sketch = createSketch();
}
sketch = arm->sketch;
@@ -2571,8 +2339,7 @@ SK_Sketch* viewcontextSketch(ViewContext *vc, int create)
static int sketch_convert(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(event))
{
SK_Sketch *sketch = contextSketch(C, 0);
- if (sketch != NULL)
- {
+ if (sketch != NULL) {
sk_convert(C, sketch);
ED_area_tag_redraw(CTX_wm_area(C));
}
@@ -2582,8 +2349,7 @@ static int sketch_convert(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(e
static int sketch_cancel(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(event))
{
SK_Sketch *sketch = contextSketch(C, 0);
- if (sketch != NULL)
- {
+ if (sketch != NULL) {
sk_cancelStroke(sketch);
ED_area_tag_redraw(CTX_wm_area(C));
return OPERATOR_FINISHED;
@@ -2594,10 +2360,8 @@ static int sketch_cancel(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(ev
static int sketch_finish(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(event))
{
SK_Sketch *sketch = contextSketch(C, 0);
- if (sketch != NULL)
- {
- if (sk_finish_stroke(C, sketch))
- {
+ if (sketch != NULL) {
+ if (sk_finish_stroke(C, sketch)) {
ED_area_tag_redraw(CTX_wm_area(C));
return OPERATOR_FINISHED;
}
@@ -2608,8 +2372,7 @@ static int sketch_finish(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(ev
static int sketch_select(bContext *C, wmOperator *UNUSED(op), wmEvent *event)
{
SK_Sketch *sketch = contextSketch(C, 0);
- if (sketch)
- {
+ if (sketch) {
short extend = 0;
if (sk_selectStroke(C, sketch, event->mval, extend))
ED_area_tag_redraw(CTX_wm_area(C));
@@ -2677,57 +2440,52 @@ static int sketch_draw_modal(bContext *C, wmOperator *op, wmEvent *event, short
SK_Sketch *sketch = contextSketch(C, 1); /* create just to be sure */
int retval = OPERATOR_RUNNING_MODAL;
- switch (event->type)
- {
- case LEFTCTRLKEY:
- case RIGHTCTRLKEY:
- snap = event->ctrl;
- RNA_boolean_set(op->ptr, "snap", snap);
- break;
- case MOUSEMOVE:
- case INBETWEEN_MOUSEMOVE:
- dd->mval[0] = event->mval[0];
- dd->mval[1] = event->mval[1];
- sk_draw_stroke(C, sketch, stk, dd, snap);
- ED_area_tag_redraw(CTX_wm_area(C));
- break;
- case ESCKEY:
- op->type->cancel(C, op);
- ED_area_tag_redraw(CTX_wm_area(C));
- retval = OPERATOR_CANCELLED;
- break;
- case LEFTMOUSE:
- if (event->val == KM_RELEASE)
- {
- if (gesture == 0)
- {
- sk_endContinuousStroke(stk);
- sk_filterLastContinuousStroke(stk);
- sk_updateNextPoint(sketch, stk);
- ED_area_tag_redraw(CTX_wm_area(C));
- MEM_freeN(op->customdata);
- retval = OPERATOR_FINISHED;
- }
- else
- {
- sk_endContinuousStroke(stk);
- sk_filterLastContinuousStroke(stk);
-
- if (stk->nb_points > 1)
- {
- /* apply gesture here */
- sk_applyGesture(C, sketch);
+ switch (event->type) {
+ case LEFTCTRLKEY:
+ case RIGHTCTRLKEY:
+ snap = event->ctrl;
+ RNA_boolean_set(op->ptr, "snap", snap);
+ break;
+ case MOUSEMOVE:
+ case INBETWEEN_MOUSEMOVE:
+ dd->mval[0] = event->mval[0];
+ dd->mval[1] = event->mval[1];
+ sk_draw_stroke(C, sketch, stk, dd, snap);
+ ED_area_tag_redraw(CTX_wm_area(C));
+ break;
+ case ESCKEY:
+ op->type->cancel(C, op);
+ ED_area_tag_redraw(CTX_wm_area(C));
+ retval = OPERATOR_CANCELLED;
+ break;
+ case LEFTMOUSE:
+ if (event->val == KM_RELEASE) {
+ if (gesture == 0) {
+ sk_endContinuousStroke(stk);
+ sk_filterLastContinuousStroke(stk);
+ sk_updateNextPoint(sketch, stk);
+ ED_area_tag_redraw(CTX_wm_area(C));
+ MEM_freeN(op->customdata);
+ retval = OPERATOR_FINISHED;
}
+ else {
+ sk_endContinuousStroke(stk);
+ sk_filterLastContinuousStroke(stk);
- sk_freeStroke(stk);
- sketch->gesture = NULL;
+ if (stk->nb_points > 1) {
+ /* apply gesture here */
+ sk_applyGesture(C, sketch);
+ }
+
+ sk_freeStroke(stk);
+ sketch->gesture = NULL;
- ED_area_tag_redraw(CTX_wm_area(C));
- MEM_freeN(op->customdata);
- retval = OPERATOR_FINISHED;
+ ED_area_tag_redraw(CTX_wm_area(C));
+ MEM_freeN(op->customdata);
+ retval = OPERATOR_FINISHED;
+ }
}
- }
- break;
+ break;
}
return retval;
@@ -2750,8 +2508,7 @@ static int sketch_draw_preview(bContext *C, wmOperator *op, wmEvent *event)
short snap = RNA_boolean_get(op->ptr, "snap");
SK_Sketch *sketch = contextSketch(C, 0);
- if (sketch)
- {
+ if (sketch) {
SK_DrawData dd;
sk_initDrawData(&dd, event->mval);
@@ -2759,7 +2516,7 @@ static int sketch_draw_preview(bContext *C, wmOperator *op, wmEvent *event)
ED_area_tag_redraw(CTX_wm_area(C));
}
- return OPERATOR_FINISHED|OPERATOR_PASS_THROUGH;
+ return OPERATOR_FINISHED | OPERATOR_PASS_THROUGH;
}
/* ============================================== Poll Functions ============================================= */
@@ -2770,13 +2527,12 @@ int ED_operator_sketch_mode_active_stroke(bContext *C)
SK_Sketch *sketch = contextSketch(C, 0);
if (ts->bone_sketching & BONE_SKETCHING &&
- sketch != NULL &&
- sketch->active_stroke != NULL)
+ sketch != NULL &&
+ sketch->active_stroke != NULL)
{
return 1;
}
- else
- {
+ else {
return 0;
}
}
@@ -2787,14 +2543,13 @@ static int ED_operator_sketch_mode_gesture(bContext *C)
SK_Sketch *sketch = contextSketch(C, 0);
if (ts->bone_sketching & BONE_SKETCHING &&
- (ts->bone_sketching & BONE_SKETCHING_QUICK) == 0 &&
- sketch != NULL &&
- sketch->active_stroke == NULL)
+ (ts->bone_sketching & BONE_SKETCHING_QUICK) == 0 &&
+ sketch != NULL &&
+ sketch->active_stroke == NULL)
{
return 1;
}
- else
- {
+ else {
return 0;
}
}
@@ -2805,14 +2560,13 @@ int ED_operator_sketch_full_mode(bContext *C)
ToolSettings *ts = CTX_data_tool_settings(C);
if (obedit &&
- obedit->type == OB_ARMATURE &&
- ts->bone_sketching & BONE_SKETCHING &&
- (ts->bone_sketching & BONE_SKETCHING_QUICK) == 0)
+ obedit->type == OB_ARMATURE &&
+ ts->bone_sketching & BONE_SKETCHING &&
+ (ts->bone_sketching & BONE_SKETCHING_QUICK) == 0)
{
return 1;
}
- else
- {
+ else {
return 0;
}
}
@@ -2823,13 +2577,12 @@ int ED_operator_sketch_mode(const bContext *C)
ToolSettings *ts = CTX_data_tool_settings(C);
if (obedit &&
- obedit->type == OB_ARMATURE &&
- ts->bone_sketching & BONE_SKETCHING)
+ obedit->type == OB_ARMATURE &&
+ ts->bone_sketching & BONE_SKETCHING)
{
return 1;
}
- else
- {
+ else {
return 0;
}
}
@@ -2841,6 +2594,7 @@ void SKETCH_OT_delete(wmOperatorType *ot)
/* identifiers */
ot->name = "Delete";
ot->idname = "SKETCH_OT_delete";
+ ot->description = "Delete a sketch stroke";
/* api callbacks */
ot->invoke = sketch_delete;
@@ -2856,6 +2610,7 @@ void SKETCH_OT_select(wmOperatorType *ot)
/* identifiers */
ot->name = "Select";
ot->idname = "SKETCH_OT_select";
+ ot->description = "Select a sketch stroke";
/* api callbacks */
ot->invoke = sketch_select;
@@ -2871,6 +2626,7 @@ void SKETCH_OT_cancel_stroke(wmOperatorType *ot)
/* identifiers */
ot->name = "Cancel Stroke";
ot->idname = "SKETCH_OT_cancel_stroke";
+ ot->description = "Cancel the current sketch stroke";
/* api callbacks */
ot->invoke = sketch_cancel;
@@ -2886,6 +2642,7 @@ void SKETCH_OT_convert(wmOperatorType *ot)
/* identifiers */
ot->name = "Convert";
ot->idname = "SKETCH_OT_convert";
+ ot->description = "Convert the selected sketch strokes to bone chains";
/* api callbacks */
ot->invoke = sketch_convert;
@@ -2901,6 +2658,7 @@ void SKETCH_OT_finish_stroke(wmOperatorType *ot)
/* identifiers */
ot->name = "End Stroke";
ot->idname = "SKETCH_OT_finish_stroke";
+ ot->description = "End and keep the current sketch stroke";
/* api callbacks */
ot->invoke = sketch_finish;
@@ -2916,6 +2674,7 @@ void SKETCH_OT_draw_preview(wmOperatorType *ot)
/* identifiers */
ot->name = "Draw Preview";
ot->idname = "SKETCH_OT_draw_preview";
+ ot->description = "Draw preview of current sketch stroke (internal use)";
/* api callbacks */
ot->invoke = sketch_draw_preview;
@@ -2933,6 +2692,7 @@ void SKETCH_OT_draw_stroke(wmOperatorType *ot)
/* identifiers */
ot->name = "Draw Stroke";
ot->idname = "SKETCH_OT_draw_stroke";
+ ot->description = "Start to draw a sketch stroke";
/* api callbacks */
ot->invoke = sketch_draw_stroke;
@@ -2952,6 +2712,7 @@ void SKETCH_OT_gesture(wmOperatorType *ot)
/* identifiers */
ot->name = "Gesture";
ot->idname = "SKETCH_OT_gesture";
+ ot->description = "Start to draw a gesture stroke";
/* api callbacks */
ot->invoke = sketch_draw_gesture;
diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c
index 59a7437e753..ccba3599318 100644
--- a/source/blender/editors/armature/meshlaplacian.c
+++ b/source/blender/editors/armature/meshlaplacian.c
@@ -80,40 +80,40 @@ static void error(const char *str) { printf("error: %s\n", str); }
/************************** Laplacian System *****************************/
struct LaplacianSystem {
- NLContext context; /* opennl context */
+ NLContext context; /* opennl context */
int totvert, totface;
- float **verts; /* vertex coordinates */
- float *varea; /* vertex weights for laplacian computation */
- char *vpinned; /* vertex pinning */
- int (*faces)[3]; /* face vertex indices */
- float (*fweights)[3]; /* cotangent weights per face */
+ float **verts; /* vertex coordinates */
+ float *varea; /* vertex weights for laplacian computation */
+ char *vpinned; /* vertex pinning */
+ int (*faces)[3]; /* face vertex indices */
+ float (*fweights)[3]; /* cotangent weights per face */
- int areaweights; /* use area in cotangent weights? */
- int storeweights; /* store cotangent weights in fweights */
- int nlbegun; /* nlBegin(NL_SYSTEM/NL_MATRIX) done */
+ int areaweights; /* use area in cotangent weights? */
+ int storeweights; /* store cotangent weights in fweights */
+ int nlbegun; /* nlBegin(NL_SYSTEM/NL_MATRIX) done */
- EdgeHash *edgehash; /* edge hash for construction */
+ EdgeHash *edgehash; /* edge hash for construction */
struct HeatWeighting {
MFace *mface;
int totvert;
int totface;
- float (*verts)[3]; /* vertex coordinates */
- float (*vnors)[3]; /* vertex normals */
+ float (*verts)[3]; /* vertex coordinates */
+ float (*vnors)[3]; /* vertex normals */
- float (*root)[3]; /* bone root */
- float (*tip)[3]; /* bone tip */
+ float (*root)[3]; /* bone root */
+ float (*tip)[3]; /* bone tip */
float (*source)[3]; /* vertex source */
int numsource;
- float *H; /* diagonal H matrix */
- float *p; /* values from all p vectors */
- float *mindist; /* minimum distance to a bone for all vertices */
+ float *H; /* diagonal H matrix */
+ float *p; /* values from all p vectors */
+ float *mindist; /* minimum distance to a bone for all vertices */
- BVHTree *bvhtree; /* ray tracing acceleration structure */
- MFace **vface; /* a face that the vertex belongs to */
+ BVHTree *bvhtree; /* ray tracing acceleration structure */
+ MFace **vface; /* a face that the vertex belongs to */
} heat;
#ifdef RIGID_DEFORM
@@ -143,9 +143,9 @@ static void laplacian_increase_edge_count(EdgeHash *edgehash, int v1, int v2)
void **p = BLI_edgehash_lookup_p(edgehash, v1, v2);
if (p)
- *p = (void*)((intptr_t)*p + (intptr_t)1);
+ *p = (void *)((intptr_t)*p + (intptr_t)1);
else
- BLI_edgehash_insert(edgehash, v1, v2, (void*)(intptr_t)1);
+ BLI_edgehash_insert(edgehash, v1, v2, (void *)(intptr_t)1);
}
static int laplacian_edge_count(EdgeHash *edgehash, int v1, int v2)
@@ -166,81 +166,81 @@ static float cotan_weight(float *v1, float *v2, float *v3)
if (clen == 0.0f)
return 0.0f;
- return dot_v3v3(a, b)/clen;
+ return dot_v3v3(a, b) / clen;
}
static void laplacian_triangle_area(LaplacianSystem *sys, int i1, int i2, int i3)
{
float t1, t2, t3, len1, len2, len3, area;
- float *varea= sys->varea, *v1, *v2, *v3;
+ float *varea = sys->varea, *v1, *v2, *v3;
int obtuse = 0;
- v1= sys->verts[i1];
- v2= sys->verts[i2];
- v3= sys->verts[i3];
+ v1 = sys->verts[i1];
+ v2 = sys->verts[i2];
+ v3 = sys->verts[i3];
- t1= cotan_weight(v1, v2, v3);
- t2= cotan_weight(v2, v3, v1);
- t3= cotan_weight(v3, v1, v2);
+ t1 = cotan_weight(v1, v2, v3);
+ t2 = cotan_weight(v2, v3, v1);
+ t3 = cotan_weight(v3, v1, v2);
- if (angle_v3v3v3(v2, v1, v3) > DEG2RADF(90.0f)) obtuse= 1;
- else if (angle_v3v3v3(v1, v2, v3) > DEG2RADF(90.0f)) obtuse= 2;
- else if (angle_v3v3v3(v1, v3, v2) > DEG2RADF(90.0f)) obtuse= 3;
+ if (angle_v3v3v3(v2, v1, v3) > DEG2RADF(90.0f)) obtuse = 1;
+ else if (angle_v3v3v3(v1, v2, v3) > DEG2RADF(90.0f)) obtuse = 2;
+ else if (angle_v3v3v3(v1, v3, v2) > DEG2RADF(90.0f)) obtuse = 3;
if (obtuse > 0) {
- area= area_tri_v3(v1, v2, v3);
+ area = area_tri_v3(v1, v2, v3);
- varea[i1] += (obtuse == 1)? area: area*0.5f;
- varea[i2] += (obtuse == 2)? area: area*0.5f;
- varea[i3] += (obtuse == 3)? area: area*0.5f;
+ varea[i1] += (obtuse == 1) ? area : area * 0.5f;
+ varea[i2] += (obtuse == 2) ? area : area * 0.5f;
+ varea[i3] += (obtuse == 3) ? area : area * 0.5f;
}
else {
- len1= len_v3v3(v2, v3);
- len2= len_v3v3(v1, v3);
- len3= len_v3v3(v1, v2);
+ len1 = len_v3v3(v2, v3);
+ len2 = len_v3v3(v1, v3);
+ len3 = len_v3v3(v1, v2);
- t1 *= len1*len1;
- t2 *= len2*len2;
- t3 *= len3*len3;
+ t1 *= len1 * len1;
+ t2 *= len2 * len2;
+ t3 *= len3 * len3;
- varea[i1] += (t2 + t3)*0.25f;
- varea[i2] += (t1 + t3)*0.25f;
- varea[i3] += (t1 + t2)*0.25f;
+ varea[i1] += (t2 + t3) * 0.25f;
+ varea[i2] += (t1 + t3) * 0.25f;
+ varea[i3] += (t1 + t2) * 0.25f;
}
}
static void laplacian_triangle_weights(LaplacianSystem *sys, int f, int i1, int i2, int i3)
{
float t1, t2, t3;
- float *varea= sys->varea, *v1, *v2, *v3;
+ float *varea = sys->varea, *v1, *v2, *v3;
- v1= sys->verts[i1];
- v2= sys->verts[i2];
- v3= sys->verts[i3];
+ v1 = sys->verts[i1];
+ v2 = sys->verts[i2];
+ v3 = sys->verts[i3];
/* instead of *0.5 we divided by the number of faces of the edge, it still
* needs to be verified that this is indeed the correct thing to do! */
- t1= cotan_weight(v1, v2, v3)/laplacian_edge_count(sys->edgehash, i2, i3);
- t2= cotan_weight(v2, v3, v1)/laplacian_edge_count(sys->edgehash, i3, i1);
- t3= cotan_weight(v3, v1, v2)/laplacian_edge_count(sys->edgehash, i1, i2);
+ t1 = cotan_weight(v1, v2, v3) / laplacian_edge_count(sys->edgehash, i2, i3);
+ t2 = cotan_weight(v2, v3, v1) / laplacian_edge_count(sys->edgehash, i3, i1);
+ t3 = cotan_weight(v3, v1, v2) / laplacian_edge_count(sys->edgehash, i1, i2);
- nlMatrixAdd(i1, i1, (t2+t3)*varea[i1]);
- nlMatrixAdd(i2, i2, (t1+t3)*varea[i2]);
- nlMatrixAdd(i3, i3, (t1+t2)*varea[i3]);
+ nlMatrixAdd(i1, i1, (t2 + t3) * varea[i1]);
+ nlMatrixAdd(i2, i2, (t1 + t3) * varea[i2]);
+ nlMatrixAdd(i3, i3, (t1 + t2) * varea[i3]);
- nlMatrixAdd(i1, i2, -t3*varea[i1]);
- nlMatrixAdd(i2, i1, -t3*varea[i2]);
+ nlMatrixAdd(i1, i2, -t3 * varea[i1]);
+ nlMatrixAdd(i2, i1, -t3 * varea[i2]);
- nlMatrixAdd(i2, i3, -t1*varea[i2]);
- nlMatrixAdd(i3, i2, -t1*varea[i3]);
+ nlMatrixAdd(i2, i3, -t1 * varea[i2]);
+ nlMatrixAdd(i3, i2, -t1 * varea[i3]);
- nlMatrixAdd(i3, i1, -t2*varea[i3]);
- nlMatrixAdd(i1, i3, -t2*varea[i1]);
+ nlMatrixAdd(i3, i1, -t2 * varea[i3]);
+ nlMatrixAdd(i1, i3, -t2 * varea[i1]);
if (sys->storeweights) {
- sys->fweights[f][0]= t1*varea[i1];
- sys->fweights[f][1]= t2*varea[i2];
- sys->fweights[f][2]= t3*varea[i3];
+ sys->fweights[f][0] = t1 * varea[i1];
+ sys->fweights[f][1] = t2 * varea[i2];
+ sys->fweights[f][2] = t3 * varea[i3];
}
}
@@ -248,17 +248,17 @@ static LaplacianSystem *laplacian_system_construct_begin(int totvert, int totfac
{
LaplacianSystem *sys;
- sys= MEM_callocN(sizeof(LaplacianSystem), "LaplacianSystem");
+ sys = MEM_callocN(sizeof(LaplacianSystem), "LaplacianSystem");
- sys->verts= MEM_callocN(sizeof(float*)*totvert, "LaplacianSystemVerts");
- sys->vpinned= MEM_callocN(sizeof(char)*totvert, "LaplacianSystemVpinned");
- sys->faces= MEM_callocN(sizeof(int)*3*totface, "LaplacianSystemFaces");
+ sys->verts = MEM_callocN(sizeof(float *) * totvert, "LaplacianSystemVerts");
+ sys->vpinned = MEM_callocN(sizeof(char) * totvert, "LaplacianSystemVpinned");
+ sys->faces = MEM_callocN(sizeof(int) * 3 * totface, "LaplacianSystemFaces");
- sys->totvert= 0;
- sys->totface= 0;
+ sys->totvert = 0;
+ sys->totface = 0;
- sys->areaweights= 1;
- sys->storeweights= 0;
+ sys->areaweights = 1;
+ sys->storeweights = 0;
/* create opennl context */
nlNewContext();
@@ -266,53 +266,53 @@ static LaplacianSystem *laplacian_system_construct_begin(int totvert, int totfac
if (lsq)
nlSolverParameteri(NL_LEAST_SQUARES, NL_TRUE);
- sys->context= nlGetCurrent();
+ sys->context = nlGetCurrent();
return sys;
}
void laplacian_add_vertex(LaplacianSystem *sys, float *co, int pinned)
{
- sys->verts[sys->totvert]= co;
- sys->vpinned[sys->totvert]= pinned;
+ sys->verts[sys->totvert] = co;
+ sys->vpinned[sys->totvert] = pinned;
sys->totvert++;
}
void laplacian_add_triangle(LaplacianSystem *sys, int v1, int v2, int v3)
{
- sys->faces[sys->totface][0]= v1;
- sys->faces[sys->totface][1]= v2;
- sys->faces[sys->totface][2]= v3;
+ sys->faces[sys->totface][0] = v1;
+ sys->faces[sys->totface][1] = v2;
+ sys->faces[sys->totface][2] = v3;
sys->totface++;
}
static void laplacian_system_construct_end(LaplacianSystem *sys)
{
int (*face)[3];
- int a, totvert=sys->totvert, totface=sys->totface;
+ int a, totvert = sys->totvert, totface = sys->totface;
laplacian_begin_solve(sys, 0);
- sys->varea= MEM_callocN(sizeof(float)*totvert, "LaplacianSystemVarea");
+ sys->varea = MEM_callocN(sizeof(float) * totvert, "LaplacianSystemVarea");
- sys->edgehash= BLI_edgehash_new();
- for (a=0, face=sys->faces; a<sys->totface; a++, face++) {
+ sys->edgehash = BLI_edgehash_new();
+ for (a = 0, face = sys->faces; a < sys->totface; a++, face++) {
laplacian_increase_edge_count(sys->edgehash, (*face)[0], (*face)[1]);
laplacian_increase_edge_count(sys->edgehash, (*face)[1], (*face)[2]);
laplacian_increase_edge_count(sys->edgehash, (*face)[2], (*face)[0]);
}
if (sys->areaweights)
- for (a=0, face=sys->faces; a<sys->totface; a++, face++)
+ for (a = 0, face = sys->faces; a < sys->totface; a++, face++)
laplacian_triangle_area(sys, (*face)[0], (*face)[1], (*face)[2]);
- for (a=0; a<totvert; a++) {
+ for (a = 0; a < totvert; a++) {
if (sys->areaweights) {
if (sys->varea[a] != 0.0f)
- sys->varea[a]= 0.5f/sys->varea[a];
+ sys->varea[a] = 0.5f / sys->varea[a];
}
else
- sys->varea[a]= 1.0f;
+ sys->varea[a] = 1.0f;
/* for heat weighting */
if (sys->heat.H)
@@ -320,21 +320,21 @@ static void laplacian_system_construct_end(LaplacianSystem *sys)
}
if (sys->storeweights)
- sys->fweights= MEM_callocN(sizeof(float)*3*totface, "LaplacianFWeight");
+ sys->fweights = MEM_callocN(sizeof(float) * 3 * totface, "LaplacianFWeight");
- for (a=0, face=sys->faces; a<totface; a++, face++)
+ for (a = 0, face = sys->faces; a < totface; a++, face++)
laplacian_triangle_weights(sys, a, (*face)[0], (*face)[1], (*face)[2]);
MEM_freeN(sys->faces);
- sys->faces= NULL;
+ sys->faces = NULL;
if (sys->varea) {
MEM_freeN(sys->varea);
- sys->varea= NULL;
+ sys->varea = NULL;
}
BLI_edgehash_free(sys->edgehash, NULL);
- sys->edgehash= NULL;
+ sys->edgehash = NULL;
}
static void laplacian_system_delete(LaplacianSystem *sys)
@@ -357,7 +357,7 @@ void laplacian_begin_solve(LaplacianSystem *sys, int index)
nlBegin(NL_SYSTEM);
if (index >= 0) {
- for (a=0; a<sys->totvert; a++) {
+ for (a = 0; a < sys->totvert; a++) {
if (sys->vpinned[a]) {
nlSetVariable(0, a, sys->verts[a][index]);
nlLockVariable(a);
@@ -395,10 +395,10 @@ float laplacian_system_get_solution(int v)
/* From "Automatic Rigging and Animation of 3D Characters"
* Ilya Baran and Jovan Popovic, SIGGRAPH 2007 */
-#define C_WEIGHT 1.0f
-#define WEIGHT_LIMIT_START 0.05f
-#define WEIGHT_LIMIT_END 0.025f
-#define DISTANCE_EPSILON 1e-4f
+#define C_WEIGHT 1.0f
+#define WEIGHT_LIMIT_START 0.05f
+#define WEIGHT_LIMIT_END 0.025f
+#define DISTANCE_EPSILON 1e-4f
typedef struct BVHCallbackUserData {
float start[3];
@@ -408,7 +408,7 @@ typedef struct BVHCallbackUserData {
static void bvh_callback(void *userdata, int index, const BVHTreeRay *UNUSED(ray), BVHTreeRayHit *hit)
{
- BVHCallbackUserData *data = (struct BVHCallbackUserData*)userdata;
+ BVHCallbackUserData *data = (struct BVHCallbackUserData *)userdata;
MFace *mf = data->sys->heat.mface + index;
float (*verts)[3] = data->sys->heat.verts;
float lambda, uv[2], n[3], dir[3];
@@ -444,27 +444,27 @@ static void heat_ray_tree_create(LaplacianSystem *sys)
int a;
sys->heat.bvhtree = BLI_bvhtree_new(totface, 0.0f, 4, 6);
- sys->heat.vface = MEM_callocN(sizeof(MFace*)*totvert, "HeatVFaces");
+ sys->heat.vface = MEM_callocN(sizeof(MFace *) * totvert, "HeatVFaces");
- for (a=0; a<totface; a++) {
- MFace *mf = mface+a;
+ for (a = 0; a < totface; a++) {
+ MFace *mf = mface + a;
float bb[6];
- INIT_MINMAX(bb, bb+3);
- DO_MINMAX(verts[mf->v1], bb, bb+3);
- DO_MINMAX(verts[mf->v2], bb, bb+3);
- DO_MINMAX(verts[mf->v3], bb, bb+3);
+ INIT_MINMAX(bb, bb + 3);
+ DO_MINMAX(verts[mf->v1], bb, bb + 3);
+ DO_MINMAX(verts[mf->v2], bb, bb + 3);
+ DO_MINMAX(verts[mf->v3], bb, bb + 3);
if (mf->v4) {
- DO_MINMAX(verts[mf->v4], bb, bb+3);
+ DO_MINMAX(verts[mf->v4], bb, bb + 3);
}
BLI_bvhtree_insert(sys->heat.bvhtree, a, bb, 2);
//Setup inverse pointers to use on isect.orig
- sys->heat.vface[mf->v1]= mf;
- sys->heat.vface[mf->v2]= mf;
- sys->heat.vface[mf->v3]= mf;
- if (mf->v4) sys->heat.vface[mf->v4]= mf;
+ sys->heat.vface[mf->v1] = mf;
+ sys->heat.vface[mf->v2] = mf;
+ sys->heat.vface[mf->v3] = mf;
+ if (mf->v4) sys->heat.vface[mf->v4] = mf;
}
BLI_bvhtree_balance(sys->heat.bvhtree);
@@ -478,16 +478,16 @@ static int heat_ray_source_visible(LaplacianSystem *sys, int vertex, int source)
float end[3];
int visible;
- mface= sys->heat.vface[vertex];
+ mface = sys->heat.vface[vertex];
if (!mface)
return 1;
- data.sys= sys;
+ data.sys = sys;
copy_v3_v3(data.start, sys->heat.verts[vertex]);
if (sys->heat.root) /* bone */
closest_to_line_segment_v3(end, data.start,
- sys->heat.root[source], sys->heat.tip[source]);
+ sys->heat.root[source], sys->heat.tip[source]);
else /* vertex */
copy_v3_v3(end, sys->heat.source[source]);
@@ -499,7 +499,7 @@ static int heat_ray_source_visible(LaplacianSystem *sys, int vertex, int source)
hit.index = -1;
hit.dist = normalize_v3(data.vec);
- visible= BLI_bvhtree_ray_cast(sys->heat.bvhtree, data.start, data.vec, 0.0f, &hit, bvh_callback, (void*)&data) == -1;
+ visible = BLI_bvhtree_ray_cast(sys->heat.bvhtree, data.start, data.vec, 0.0f, &hit, bvh_callback, (void *)&data) == -1;
return visible;
}
@@ -511,26 +511,26 @@ static float heat_source_distance(LaplacianSystem *sys, int vertex, int source)
/* compute euclidian distance */
if (sys->heat.root) /* bone */
closest_to_line_segment_v3(closest, sys->heat.verts[vertex],
- sys->heat.root[source], sys->heat.tip[source]);
+ sys->heat.root[source], sys->heat.tip[source]);
else /* vertex */
copy_v3_v3(closest, sys->heat.source[source]);
sub_v3_v3v3(d, sys->heat.verts[vertex], closest);
- dist= normalize_v3(d);
+ dist = normalize_v3(d);
/* if the vertex normal does not point along the bone, increase distance */
- cosine= dot_v3v3(d, sys->heat.vnors[vertex]);
+ cosine = dot_v3v3(d, sys->heat.vnors[vertex]);
- return dist/(0.5f*(cosine + 1.001f));
+ return dist / (0.5f * (cosine + 1.001f));
}
static int heat_source_closest(LaplacianSystem *sys, int vertex, int source)
{
float dist;
- dist= heat_source_distance(sys, vertex, source);
+ dist = heat_source_distance(sys, vertex, source);
- if (dist <= sys->heat.mindist[vertex]*(1.0f + DISTANCE_EPSILON))
+ if (dist <= sys->heat.mindist[vertex] * (1.0f + DISTANCE_EPSILON))
if (heat_ray_source_visible(sys, vertex, source))
return 1;
@@ -542,34 +542,34 @@ static void heat_set_H(LaplacianSystem *sys, int vertex)
float dist, mindist, h;
int j, numclosest = 0;
- mindist= 1e10;
+ mindist = 1e10;
/* compute minimum distance */
- for (j=0; j<sys->heat.numsource; j++) {
- dist= heat_source_distance(sys, vertex, j);
+ for (j = 0; j < sys->heat.numsource; j++) {
+ dist = heat_source_distance(sys, vertex, j);
if (dist < mindist)
- mindist= dist;
+ mindist = dist;
}
- sys->heat.mindist[vertex]= mindist;
+ sys->heat.mindist[vertex] = mindist;
/* count number of sources with approximately this minimum distance */
- for (j=0; j<sys->heat.numsource; j++)
+ for (j = 0; j < sys->heat.numsource; j++)
if (heat_source_closest(sys, vertex, j))
numclosest++;
- sys->heat.p[vertex]= (numclosest > 0)? 1.0f/numclosest: 0.0f;
+ sys->heat.p[vertex] = (numclosest > 0) ? 1.0f / numclosest : 0.0f;
/* compute H entry */
if (numclosest > 0) {
- mindist= maxf(mindist, 1e-4f);
- h= numclosest*C_WEIGHT/(mindist*mindist);
+ mindist = maxf(mindist, 1e-4f);
+ h = numclosest * C_WEIGHT / (mindist * mindist);
}
else
- h= 0.0f;
+ h = 0.0f;
- sys->heat.H[vertex]= h;
+ sys->heat.H[vertex] = h;
}
static void heat_calc_vnormals(LaplacianSystem *sys)
@@ -577,41 +577,41 @@ static void heat_calc_vnormals(LaplacianSystem *sys)
float fnor[3];
int a, v1, v2, v3, (*face)[3];
- sys->heat.vnors= MEM_callocN(sizeof(float)*3*sys->totvert, "HeatVNors");
+ sys->heat.vnors = MEM_callocN(sizeof(float) * 3 * sys->totvert, "HeatVNors");
- for (a=0, face=sys->faces; a<sys->totface; a++, face++) {
- v1= (*face)[0];
- v2= (*face)[1];
- v3= (*face)[2];
+ for (a = 0, face = sys->faces; a < sys->totface; a++, face++) {
+ v1 = (*face)[0];
+ v2 = (*face)[1];
+ v3 = (*face)[2];
- normal_tri_v3( fnor,sys->verts[v1], sys->verts[v2], sys->verts[v3]);
+ normal_tri_v3(fnor, sys->verts[v1], sys->verts[v2], sys->verts[v3]);
add_v3_v3(sys->heat.vnors[v1], fnor);
add_v3_v3(sys->heat.vnors[v2], fnor);
add_v3_v3(sys->heat.vnors[v3], fnor);
}
- for (a=0; a<sys->totvert; a++)
+ for (a = 0; a < sys->totvert; a++)
normalize_v3(sys->heat.vnors[a]);
}
static void heat_laplacian_create(LaplacianSystem *sys)
{
MFace *mface = sys->heat.mface, *mf;
- int totface= sys->heat.totface;
- int totvert= sys->heat.totvert;
+ int totface = sys->heat.totface;
+ int totvert = sys->heat.totvert;
int a;
/* heat specific definitions */
- sys->heat.mindist= MEM_callocN(sizeof(float)*totvert, "HeatMinDist");
- sys->heat.H= MEM_callocN(sizeof(float)*totvert, "HeatH");
- sys->heat.p= MEM_callocN(sizeof(float)*totvert, "HeatP");
+ sys->heat.mindist = MEM_callocN(sizeof(float) * totvert, "HeatMinDist");
+ sys->heat.H = MEM_callocN(sizeof(float) * totvert, "HeatH");
+ sys->heat.p = MEM_callocN(sizeof(float) * totvert, "HeatP");
/* add verts and faces to laplacian */
- for (a=0; a<totvert; a++)
+ for (a = 0; a < totvert; a++)
laplacian_add_vertex(sys, sys->heat.verts[a], 0);
- for (a=0, mf=mface; a<totface; a++, mf++) {
+ for (a = 0, mf = mface; a < totface; a++, mf++) {
laplacian_add_triangle(sys, mf->v1, mf->v2, mf->v3);
if (mf->v4)
laplacian_add_triangle(sys, mf->v1, mf->v3, mf->v4);
@@ -620,7 +620,7 @@ static void heat_laplacian_create(LaplacianSystem *sys)
/* for distance computation in set_H */
heat_calc_vnormals(sys);
- for (a=0; a<totvert; a++)
+ for (a = 0; a < totvert; a++)
heat_set_H(sys, a);
}
@@ -643,8 +643,8 @@ static float heat_limit_weight(float weight)
return 0.0f;
}
else if (weight < WEIGHT_LIMIT_START) {
- t= (weight - WEIGHT_LIMIT_END)/(WEIGHT_LIMIT_START - WEIGHT_LIMIT_END);
- return t*WEIGHT_LIMIT_START;
+ t = (weight - WEIGHT_LIMIT_END) / (WEIGHT_LIMIT_START - WEIGHT_LIMIT_END);
+ return t * WEIGHT_LIMIT_START;
}
else
return weight;
@@ -657,23 +657,23 @@ void heat_bone_weighting(Object *ob, Mesh *me, float (*verts)[3], int numsource,
MLoop *ml;
MFace *mf;
float solution, weight;
- int *vertsflipped = NULL, *mask= NULL;
+ int *vertsflipped = NULL, *mask = NULL;
int a, tottri, j, bbone, firstsegment, lastsegment;
MVert *mvert = me->mvert;
- int use_vert_sel= FALSE;
- int use_face_sel= FALSE;
+ int use_vert_sel = FALSE;
+ int use_face_sel = FALSE;
- *err_str= NULL;
+ *err_str = NULL;
/* count triangles and create mask */
- if ( (use_face_sel= (me->editflag & ME_EDIT_PAINT_MASK) != 0) ||
- (use_vert_sel= ((me->editflag & ME_EDIT_VERT_SEL) != 0)))
+ if ( (use_face_sel = (me->editflag & ME_EDIT_PAINT_MASK) != 0) ||
+ (use_vert_sel = ((me->editflag & ME_EDIT_VERT_SEL) != 0)))
{
- mask= MEM_callocN(sizeof(int)*me->totvert, "heat_bone_weighting mask");
+ mask = MEM_callocN(sizeof(int) * me->totvert, "heat_bone_weighting mask");
}
- for (a = 0, mp=me->mpoly; a < me->totpoly; mp++, a++) {
+ for (a = 0, mp = me->mpoly; a < me->totpoly; mp++, a++) {
/* (added selectedVerts content for vertex mask, they used to just equal 1) */
if (use_vert_sel) {
for (j = 0, ml = me->mloop + mp->loopstart; j < mp->totloop; j++, ml++) {
@@ -702,13 +702,13 @@ void heat_bone_weighting(Object *ob, Mesh *me, float (*verts)[3], int numsource,
/* create laplacian */
sys = laplacian_system_construct_begin(me->totvert, tottri, 1);
- sys->heat.mface= me->mface;
- sys->heat.totface= me->totface;
- sys->heat.totvert= me->totvert;
- sys->heat.verts= verts;
- sys->heat.root= root;
- sys->heat.tip= tip;
- sys->heat.numsource= numsource;
+ sys->heat.mface = me->mface;
+ sys->heat.totface = me->totface;
+ sys->heat.totvert = me->totvert;
+ sys->heat.verts = verts;
+ sys->heat.root = root;
+ sys->heat.tip = tip;
+ sys->heat.numsource = numsource;
heat_ray_tree_create(sys);
heat_laplacian_create(sys);
@@ -716,23 +716,23 @@ void heat_bone_weighting(Object *ob, Mesh *me, float (*verts)[3], int numsource,
laplacian_system_construct_end(sys);
if (dgroupflip) {
- vertsflipped = MEM_callocN(sizeof(int)*me->totvert, "vertsflipped");
- for (a=0; a<me->totvert; a++)
+ vertsflipped = MEM_callocN(sizeof(int) * me->totvert, "vertsflipped");
+ for (a = 0; a < me->totvert; a++)
vertsflipped[a] = mesh_get_x_mirror_vert(ob, a);
}
/* compute weights per bone */
- for (j=0; j<numsource; j++) {
+ for (j = 0; j < numsource; j++) {
if (!selected[j])
continue;
- firstsegment= (j == 0 || dgrouplist[j-1] != dgrouplist[j]);
- lastsegment= (j == numsource-1 || dgrouplist[j] != dgrouplist[j+1]);
- bbone= !(firstsegment && lastsegment);
+ firstsegment = (j == 0 || dgrouplist[j - 1] != dgrouplist[j]);
+ lastsegment = (j == numsource - 1 || dgrouplist[j] != dgrouplist[j + 1]);
+ bbone = !(firstsegment && lastsegment);
/* clear weights */
if (bbone && firstsegment) {
- for (a=0; a<me->totvert; a++) {
+ for (a = 0; a < me->totvert; a++) {
if (mask && !mask[a])
continue;
@@ -745,30 +745,30 @@ void heat_bone_weighting(Object *ob, Mesh *me, float (*verts)[3], int numsource,
/* fill right hand side */
laplacian_begin_solve(sys, -1);
- for (a=0; a<me->totvert; a++)
+ for (a = 0; a < me->totvert; a++)
if (heat_source_closest(sys, a, j))
laplacian_add_right_hand_side(sys, a,
- sys->heat.H[a]*sys->heat.p[a]);
+ sys->heat.H[a] * sys->heat.p[a]);
/* solve */
if (laplacian_system_solve(sys)) {
/* load solution into vertex groups */
- for (a=0; a<me->totvert; a++) {
+ for (a = 0; a < me->totvert; a++) {
if (mask && !mask[a])
continue;
- solution= laplacian_system_get_solution(a);
+ solution = laplacian_system_get_solution(a);
if (bbone) {
if (solution > 0.0f)
ED_vgroup_vert_add(ob, dgrouplist[j], a, solution,
- WEIGHT_ADD);
+ WEIGHT_ADD);
}
else {
- weight= heat_limit_weight(solution);
+ weight = heat_limit_weight(solution);
if (weight > 0.0f)
ED_vgroup_vert_add(ob, dgrouplist[j], a, weight,
- WEIGHT_REPLACE);
+ WEIGHT_REPLACE);
else
ED_vgroup_vert_remove(ob, dgrouplist[j], a);
}
@@ -778,13 +778,13 @@ void heat_bone_weighting(Object *ob, Mesh *me, float (*verts)[3], int numsource,
if (bbone) {
if (solution > 0.0f)
ED_vgroup_vert_add(ob, dgroupflip[j], vertsflipped[a],
- solution, WEIGHT_ADD);
+ solution, WEIGHT_ADD);
}
else {
- weight= heat_limit_weight(solution);
+ weight = heat_limit_weight(solution);
if (weight > 0.0f)
ED_vgroup_vert_add(ob, dgroupflip[j], vertsflipped[a],
- weight, WEIGHT_REPLACE);
+ weight, WEIGHT_REPLACE);
else
ED_vgroup_vert_remove(ob, dgroupflip[j], vertsflipped[a]);
}
@@ -792,24 +792,24 @@ void heat_bone_weighting(Object *ob, Mesh *me, float (*verts)[3], int numsource,
}
}
else if (*err_str == NULL) {
- *err_str= "Bone Heat Weighting: failed to find solution for one or more bones";
+ *err_str = "Bone Heat Weighting: failed to find solution for one or more bones";
break;
}
/* remove too small vertex weights */
if (bbone && lastsegment) {
- for (a=0; a<me->totvert; a++) {
+ for (a = 0; a < me->totvert; a++) {
if (mask && !mask[a])
continue;
- weight= ED_vgroup_vert_weight(ob, dgrouplist[j], a);
- weight= heat_limit_weight(weight);
+ weight = ED_vgroup_vert_weight(ob, dgrouplist[j], a);
+ weight = heat_limit_weight(weight);
if (weight <= 0.0f)
ED_vgroup_vert_remove(ob, dgrouplist[j], a);
if (vertsflipped && dgroupflip[j] && vertsflipped[a] >= 0) {
- weight= ED_vgroup_vert_weight(ob, dgroupflip[j], vertsflipped[a]);
- weight= heat_limit_weight(weight);
+ weight = ED_vgroup_vert_weight(ob, dgroupflip[j], vertsflipped[a]);
+ weight = heat_limit_weight(weight);
if (weight <= 0.0f)
ED_vgroup_vert_remove(ob, dgroupflip[j], vertsflipped[a]);
}
@@ -848,10 +848,10 @@ static void rigid_add_half_edge_to_R(LaplacianSystem *sys, EditVert *v1, EditVer
sub_v3_v3v3(e_, v1->co, v2->co);
/* formula (5) */
- for (i=0; i<3; i++) {
- sys->rigid.R[v1->tmp.l][i][0] += w*e[0]*e_[i];
- sys->rigid.R[v1->tmp.l][i][1] += w*e[1]*e_[i];
- sys->rigid.R[v1->tmp.l][i][2] += w*e[2]*e_[i];
+ for (i = 0; i < 3; i++) {
+ sys->rigid.R[v1->tmp.l][i][0] += w * e[0] * e_[i];
+ sys->rigid.R[v1->tmp.l][i][1] += w * e[1] * e_[i];
+ sys->rigid.R[v1->tmp.l][i][2] += w * e[2] * e_[i];
}
}
@@ -897,7 +897,7 @@ static void rigid_add_edge_to_rhs(LaplacianSystem *sys, EditVert *v1, EditVert *
void rigid_deform_iteration()
{
- LaplacianSystem *sys= RigidDeformSystem;
+ LaplacianSystem *sys = RigidDeformSystem;
EditMesh *em;
EditVert *eve;
EditFace *efa;
@@ -907,13 +907,13 @@ void rigid_deform_iteration()
return;
nlMakeCurrent(sys->context);
- em= sys->rigid.mesh;
+ em = sys->rigid.mesh;
/* compute R */
- memset(sys->rigid.R, 0, sizeof(float)*3*3*sys->totvert);
- memset(sys->rigid.rhs, 0, sizeof(float)*3*sys->totvert);
+ memset(sys->rigid.R, 0, sizeof(float) * 3 * 3 * sys->totvert);
+ memset(sys->rigid.rhs, 0, sizeof(float) * 3 * sys->totvert);
- for (a=0, efa=em->faces.first; efa; efa=efa->next, a++) {
+ for (a = 0, efa = em->faces.first; efa; efa = efa->next, a++) {
rigid_add_edge_to_R(sys, efa->v1, efa->v2, sys->fweights[a][2]);
rigid_add_edge_to_R(sys, efa->v2, efa->v3, sys->fweights[a][0]);
rigid_add_edge_to_R(sys, efa->v3, efa->v1, sys->fweights[a][1]);
@@ -926,13 +926,13 @@ void rigid_deform_iteration()
}
}
- for (a=0, eve=em->verts.first; eve; eve=eve->next, a++) {
+ for (a = 0, eve = em->verts.first; eve; eve = eve->next, a++) {
rigid_orthogonalize_R(sys->rigid.R[a]);
- eve->tmp.l= a;
+ eve->tmp.l = a;
}
/* compute right hand sides for solving */
- for (a=0, efa=em->faces.first; efa; efa=efa->next, a++) {
+ for (a = 0, efa = em->faces.first; efa; efa = efa->next, a++) {
rigid_add_edge_to_rhs(sys, efa->v1, efa->v2, sys->fweights[a][2]);
rigid_add_edge_to_rhs(sys, efa->v2, efa->v3, sys->fweights[a][0]);
rigid_add_edge_to_rhs(sys, efa->v3, efa->v1, sys->fweights[a][1]);
@@ -945,22 +945,22 @@ void rigid_deform_iteration()
}
}
- /* solve for positions, for X,Y and Z separately */
- for (i=0; i<3; i++) {
+ /* solve for positions, for X, Y and Z separately */
+ for (i = 0; i < 3; i++) {
laplacian_begin_solve(sys, i);
- for (a=0; a<sys->totvert; a++)
+ for (a = 0; a < sys->totvert; a++)
if (!sys->vpinned[a])
laplacian_add_right_hand_side(sys, a, sys->rigid.rhs[a][i]);
if (laplacian_system_solve(sys)) {
- for (a=0, eve=em->verts.first; eve; eve=eve->next, a++)
- eve->co[i]= laplacian_system_get_solution(a);
+ for (a = 0, eve = em->verts.first; eve; eve = eve->next, a++)
+ eve->co[i] = laplacian_system_get_solution(a);
}
else {
if (!sys->rigid.thrownerror) {
error("RigidDeform: failed to find solution");
- sys->rigid.thrownerror= 1;
+ sys->rigid.thrownerror = 1;
}
break;
}
@@ -975,17 +975,17 @@ static void rigid_laplacian_create(LaplacianSystem *sys)
int a;
/* add verts and faces to laplacian */
- for (a=0, eve=em->verts.first; eve; eve=eve->next, a++) {
+ for (a = 0, eve = em->verts.first; eve; eve = eve->next, a++) {
laplacian_add_vertex(sys, eve->co, eve->pinned);
- eve->tmp.l= a;
+ eve->tmp.l = a;
}
- for (efa=em->faces.first; efa; efa=efa->next) {
+ for (efa = em->faces.first; efa; efa = efa->next) {
laplacian_add_triangle(sys,
- efa->v1->tmp.l, efa->v2->tmp.l, efa->v3->tmp.l);
+ efa->v1->tmp.l, efa->v2->tmp.l, efa->v3->tmp.l);
if (efa->v4)
laplacian_add_triangle(sys,
- efa->v1->tmp.l, efa->v3->tmp.l, efa->v4->tmp.l);
+ efa->v1->tmp.l, efa->v3->tmp.l, efa->v4->tmp.l);
}
}
@@ -997,10 +997,10 @@ void rigid_deform_begin(EditMesh *em)
int a, totvert, totface;
/* count vertices, triangles */
- for (totvert=0, eve=em->verts.first; eve; eve=eve->next)
+ for (totvert = 0, eve = em->verts.first; eve; eve = eve->next)
totvert++;
- for (totface=0, efa=em->faces.first; efa; efa=efa->next) {
+ for (totface = 0, efa = em->faces.first; efa; efa = efa->next) {
totface++;
if (efa->v4) totface++;
}
@@ -1008,16 +1008,16 @@ void rigid_deform_begin(EditMesh *em)
/* create laplacian */
sys = laplacian_system_construct_begin(totvert, totface, 0);
- sys->rigid.mesh= em;
- sys->rigid.R = MEM_callocN(sizeof(float)*3*3*totvert, "RigidDeformR");
- sys->rigid.rhs = MEM_callocN(sizeof(float)*3*totvert, "RigidDeformRHS");
- sys->rigid.origco = MEM_callocN(sizeof(float)*3*totvert, "RigidDeformCo");
+ sys->rigid.mesh = em;
+ sys->rigid.R = MEM_callocN(sizeof(float) * 3 * 3 * totvert, "RigidDeformR");
+ sys->rigid.rhs = MEM_callocN(sizeof(float) * 3 * totvert, "RigidDeformRHS");
+ sys->rigid.origco = MEM_callocN(sizeof(float) * 3 * totvert, "RigidDeformCo");
- for (a=0, eve=em->verts.first; eve; eve=eve->next, a++)
+ for (a = 0, eve = em->verts.first; eve; eve = eve->next, a++)
copy_v3_v3(sys->rigid.origco[a], eve->co);
- sys->areaweights= 0;
- sys->storeweights= 1;
+ sys->areaweights = 0;
+ sys->storeweights = 1;
rigid_laplacian_create(sys);
@@ -1036,7 +1036,7 @@ void rigid_deform_end(int cancel)
int a;
if (cancel)
- for (a=0, eve=em->verts.first; eve; eve=eve->next, a++)
+ for (a = 0, eve = em->verts.first; eve; eve = eve->next, a++)
if (!eve->pinned)
copy_v3_v3(eve->co, sys->rigid.origco[a]);
@@ -1068,8 +1068,9 @@ void rigid_deform_end(int cancel)
#define MESHDEFORM_MIN_INFLUENCE 0.0005f
-static int MESHDEFORM_OFFSET[7][3] =
- {{0,0,0}, {1,0,0}, {-1,0,0}, {0,1,0}, {0,-1,0}, {0,0,1}, {0,0,-1}};
+static int MESHDEFORM_OFFSET[7][3] = {
+ {0, 0, 0}, {1, 0, 0}, {-1, 0, 0}, {0, 1, 0}, {0, -1, 0}, {0, 0, 1}, {0, 0, -1}
+};
typedef struct MDefBoundIsect {
float co[3], uvw[4];
@@ -1128,10 +1129,10 @@ typedef struct MeshDeformIsect {
/* our own triangle intersection, so we can fully control the epsilons and
* prevent corner case from going wrong*/
static int meshdeform_tri_intersect(float orig[3], float end[3], float vert0[3],
- float vert1[3], float vert2[3], float *isectco, float *uvw)
+ float vert1[3], float vert2[3], float *isectco, float *uvw)
{
float edge1[3], edge2[3], tvec[3], pvec[3], qvec[3];
- float det,inv_det, u, v, dir[3], isectdir[3];
+ float det, inv_det, u, v, dir[3], isectdir[3];
sub_v3_v3v3(dir, end, orig);
@@ -1154,7 +1155,7 @@ static int meshdeform_tri_intersect(float orig[3], float end[3], float vert0[3],
/* calculate U parameter and test bounds */
u = dot_v3v3(tvec, pvec) * inv_det;
- if (u < -EPSILON || u > 1.0f+EPSILON)
+ if (u < -EPSILON || u > 1.0f + EPSILON)
return 0;
/* prepare to test V parameter */
@@ -1162,16 +1163,16 @@ static int meshdeform_tri_intersect(float orig[3], float end[3], float vert0[3],
/* calculate V parameter and test bounds */
v = dot_v3v3(dir, qvec) * inv_det;
- if (v < -EPSILON || u + v > 1.0f+EPSILON)
+ if (v < -EPSILON || u + v > 1.0f + EPSILON)
return 0;
- isectco[0]= (1.0f - u - v)*vert0[0] + u*vert1[0] + v*vert2[0];
- isectco[1]= (1.0f - u - v)*vert0[1] + u*vert1[1] + v*vert2[1];
- isectco[2]= (1.0f - u - v)*vert0[2] + u*vert1[2] + v*vert2[2];
+ isectco[0] = (1.0f - u - v) * vert0[0] + u * vert1[0] + v * vert2[0];
+ isectco[1] = (1.0f - u - v) * vert0[1] + u * vert1[1] + v * vert2[1];
+ isectco[2] = (1.0f - u - v) * vert0[2] + u * vert1[2] + v * vert2[2];
- uvw[0]= 1.0f - u - v;
- uvw[1]= u;
- uvw[2]= v;
+ uvw[0] = 1.0f - u - v;
+ uvw[1] = u;
+ uvw[2] = v;
/* check if it is within the length of the line segment */
sub_v3_v3v3(isectdir, isectco, orig);
@@ -1189,16 +1190,16 @@ static int meshdeform_intersect(MeshDeformBind *mdb, MeshDeformIsect *isec)
{
MFace *mface;
float face[4][3], co[3], uvw[3], len, nor[3], end[3];
- int f, hit, is= 0, totface;
+ int f, hit, is = 0, totface;
- isec->labda= 1e10;
+ isec->labda = 1e10;
- mface= mdb->cagedm->getTessFaceArray(mdb->cagedm);
- totface= mdb->cagedm->getNumTessFaces(mdb->cagedm);
+ mface = mdb->cagedm->getTessFaceArray(mdb->cagedm);
+ totface = mdb->cagedm->getNumTessFaces(mdb->cagedm);
add_v3_v3v3(end, isec->start, isec->vec);
- for (f=0; f<totface; f++, mface++) {
+ for (f = 0; f < totface; f++, mface++) {
copy_v3_v3(face[0], mdb->cagecos[mface->v1]);
copy_v3_v3(face[1], mdb->cagecos[mface->v2]);
copy_v3_v3(face[2], mdb->cagecos[mface->v3]);
@@ -1208,25 +1209,25 @@ static int meshdeform_intersect(MeshDeformBind *mdb, MeshDeformIsect *isec)
hit = meshdeform_tri_intersect(isec->start, end, face[0], face[1], face[2], co, uvw);
if (hit) {
- normal_tri_v3( nor,face[0], face[1], face[2]);
+ normal_tri_v3(nor, face[0], face[1], face[2]);
}
else {
- hit= meshdeform_tri_intersect(isec->start, end, face[0], face[2], face[3], co, uvw);
- normal_tri_v3( nor,face[0], face[2], face[3]);
+ hit = meshdeform_tri_intersect(isec->start, end, face[0], face[2], face[3], co, uvw);
+ normal_tri_v3(nor, face[0], face[2], face[3]);
}
}
else {
- hit= meshdeform_tri_intersect(isec->start, end, face[0], face[1], face[2], co, uvw);
- normal_tri_v3( nor,face[0], face[1], face[2]);
+ hit = meshdeform_tri_intersect(isec->start, end, face[0], face[1], face[2], co, uvw);
+ normal_tri_v3(nor, face[0], face[1], face[2]);
}
if (hit) {
- len= len_v3v3(isec->start, co)/len_v3v3(isec->start, end);
+ len = len_v3v3(isec->start, co) / len_v3v3(isec->start, end);
if (len < isec->labda) {
- isec->labda= len;
+ isec->labda = len;
isec->face = mface;
- isec->isect= (dot_v3v3(isec->vec, nor) <= 0.0f);
- is= 1;
+ isec->isect = (dot_v3v3(isec->vec, nor) <= 0.0f);
+ is = 1;
}
}
}
@@ -1241,47 +1242,47 @@ static MDefBoundIsect *meshdeform_ray_tree_intersect(MeshDeformBind *mdb, float
float (*cagecos)[3];
MFace *mface;
float vert[4][3], len, end[3];
- static float epsilon[3]= {0, 0, 0}; //1e-4, 1e-4, 1e-4};
+ static float epsilon[3] = {0, 0, 0}; //1e-4, 1e-4, 1e-4};
/* setup isec */
memset(&isec, 0, sizeof(isec));
- isec.labda= 1e10f;
+ isec.labda = 1e10f;
add_v3_v3v3(isec.start, co1, epsilon);
add_v3_v3v3(end, co2, epsilon);
sub_v3_v3v3(isec.vec, end, isec.start);
if (meshdeform_intersect(mdb, &isec)) {
- len= isec.labda;
- mface=(MFace*)isec.face;
+ len = isec.labda;
+ mface = (MFace *)isec.face;
/* create MDefBoundIsect */
- isect= BLI_memarena_alloc(mdb->memarena, sizeof(*isect));
+ isect = BLI_memarena_alloc(mdb->memarena, sizeof(*isect));
/* compute intersection coordinate */
- isect->co[0]= co1[0] + isec.vec[0]*len;
- isect->co[1]= co1[1] + isec.vec[1]*len;
- isect->co[2]= co1[2] + isec.vec[2]*len;
+ isect->co[0] = co1[0] + isec.vec[0] * len;
+ isect->co[1] = co1[1] + isec.vec[1] * len;
+ isect->co[2] = co1[2] + isec.vec[2] * len;
- isect->len= len_v3v3(co1, isect->co);
+ isect->len = len_v3v3(co1, isect->co);
if (isect->len < MESHDEFORM_LEN_THRESHOLD)
- isect->len= MESHDEFORM_LEN_THRESHOLD;
+ isect->len = MESHDEFORM_LEN_THRESHOLD;
- isect->v[0]= mface->v1;
- isect->v[1]= mface->v2;
- isect->v[2]= mface->v3;
- isect->v[3]= mface->v4;
- isect->nvert= (mface->v4)? 4: 3;
+ isect->v[0] = mface->v1;
+ isect->v[1] = mface->v2;
+ isect->v[2] = mface->v3;
+ isect->v[3] = mface->v4;
+ isect->nvert = (mface->v4) ? 4 : 3;
- isect->facing= isec.isect;
+ isect->facing = isec.isect;
/* compute mean value coordinates for interpolation */
- cagecos= mdb->cagecos;
+ cagecos = mdb->cagecos;
copy_v3_v3(vert[0], cagecos[mface->v1]);
copy_v3_v3(vert[1], cagecos[mface->v2]);
copy_v3_v3(vert[2], cagecos[mface->v3]);
if (mface->v4) copy_v3_v3(vert[3], cagecos[mface->v4]);
- interp_weights_poly_v3( isect->uvw,vert, isect->nvert, isect->co);
+ interp_weights_poly_v3(isect->uvw, vert, isect->nvert, isect->co);
return isect;
}
@@ -1295,10 +1296,10 @@ static int meshdeform_inside_cage(MeshDeformBind *mdb, float *co)
float outside[3], start[3], dir[3];
int i;
- for (i=1; i<=6; i++) {
- outside[0] = co[0] + (mdb->max[0] - mdb->min[0] + 1.0f)*MESHDEFORM_OFFSET[i][0];
- outside[1] = co[1] + (mdb->max[1] - mdb->min[1] + 1.0f)*MESHDEFORM_OFFSET[i][1];
- outside[2] = co[2] + (mdb->max[2] - mdb->min[2] + 1.0f)*MESHDEFORM_OFFSET[i][2];
+ for (i = 1; i <= 6; i++) {
+ outside[0] = co[0] + (mdb->max[0] - mdb->min[0] + 1.0f) * MESHDEFORM_OFFSET[i][0];
+ outside[1] = co[1] + (mdb->max[1] - mdb->min[1] + 1.0f) * MESHDEFORM_OFFSET[i][1];
+ outside[2] = co[2] + (mdb->max[2] - mdb->min[2] + 1.0f) * MESHDEFORM_OFFSET[i][2];
copy_v3_v3(start, co);
sub_v3_v3v3(dir, outside, start);
@@ -1316,7 +1317,7 @@ static int meshdeform_inside_cage(MeshDeformBind *mdb, float *co)
static int meshdeform_index(MeshDeformBind *mdb, int x, int y, int z, int n)
{
- int size= mdb->size;
+ int size = mdb->size;
x += MESHDEFORM_OFFSET[n][0];
y += MESHDEFORM_OFFSET[n][1];
@@ -1329,7 +1330,7 @@ static int meshdeform_index(MeshDeformBind *mdb, int x, int y, int z, int n)
if (z < 0 || z >= mdb->size)
return -1;
- return x + y*size + z*size*size;
+ return x + y * size + z * size * size;
}
static void meshdeform_cell_center(MeshDeformBind *mdb, int x, int y, int z, int n, float *center)
@@ -1338,9 +1339,9 @@ static void meshdeform_cell_center(MeshDeformBind *mdb, int x, int y, int z, int
y += MESHDEFORM_OFFSET[n][1];
z += MESHDEFORM_OFFSET[n][2];
- center[0]= mdb->min[0] + x*mdb->width[0] + mdb->halfwidth[0];
- center[1]= mdb->min[1] + y*mdb->width[1] + mdb->halfwidth[1];
- center[2]= mdb->min[2] + z*mdb->width[2] + mdb->halfwidth[2];
+ center[0] = mdb->min[0] + x * mdb->width[0] + mdb->halfwidth[0];
+ center[1] = mdb->min[1] + y * mdb->width[1] + mdb->halfwidth[1];
+ center[2] = mdb->min[2] + z * mdb->width[2] + mdb->halfwidth[2];
}
static void meshdeform_add_intersections(MeshDeformBind *mdb, int x, int y, int z)
@@ -1349,72 +1350,72 @@ static void meshdeform_add_intersections(MeshDeformBind *mdb, int x, int y, int
float center[3], ncenter[3];
int i, a;
- a= meshdeform_index(mdb, x, y, z, 0);
+ a = meshdeform_index(mdb, x, y, z, 0);
meshdeform_cell_center(mdb, x, y, z, 0, center);
/* check each outgoing edge for intersection */
- for (i=1; i<=6; i++) {
+ for (i = 1; i <= 6; i++) {
if (meshdeform_index(mdb, x, y, z, i) == -1)
continue;
meshdeform_cell_center(mdb, x, y, z, i, ncenter);
- isect= meshdeform_ray_tree_intersect(mdb, center, ncenter);
+ isect = meshdeform_ray_tree_intersect(mdb, center, ncenter);
if (isect) {
- mdb->boundisect[a][i-1]= isect;
- mdb->tag[a]= MESHDEFORM_TAG_BOUNDARY;
+ mdb->boundisect[a][i - 1] = isect;
+ mdb->tag[a] = MESHDEFORM_TAG_BOUNDARY;
}
}
}
static void meshdeform_bind_floodfill(MeshDeformBind *mdb)
{
- int *stack, *tag= mdb->tag;
- int a, b, i, xyz[3], stacksize, size= mdb->size;
+ int *stack, *tag = mdb->tag;
+ int a, b, i, xyz[3], stacksize, size = mdb->size;
- stack= MEM_callocN(sizeof(int)*mdb->size3, "MeshDeformBindStack");
+ stack = MEM_callocN(sizeof(int) * mdb->size3, "MeshDeformBindStack");
/* we know lower left corner is EXTERIOR because of padding */
- tag[0]= MESHDEFORM_TAG_EXTERIOR;
- stack[0]= 0;
- stacksize= 1;
+ tag[0] = MESHDEFORM_TAG_EXTERIOR;
+ stack[0] = 0;
+ stacksize = 1;
/* floodfill exterior tag */
while (stacksize > 0) {
- a= stack[--stacksize];
+ a = stack[--stacksize];
- xyz[2]= a/(size*size);
- xyz[1]= (a - xyz[2]*size*size)/size;
- xyz[0]= a - xyz[1]*size - xyz[2]*size*size;
+ xyz[2] = a / (size * size);
+ xyz[1] = (a - xyz[2] * size * size) / size;
+ xyz[0] = a - xyz[1] * size - xyz[2] * size * size;
- for (i=1; i<=6; i++) {
- b= meshdeform_index(mdb, xyz[0], xyz[1], xyz[2], i);
+ for (i = 1; i <= 6; i++) {
+ b = meshdeform_index(mdb, xyz[0], xyz[1], xyz[2], i);
if (b != -1) {
if (tag[b] == MESHDEFORM_TAG_UNTYPED ||
- (tag[b] == MESHDEFORM_TAG_BOUNDARY && !mdb->boundisect[a][i-1])) {
- tag[b]= MESHDEFORM_TAG_EXTERIOR;
- stack[stacksize++]= b;
+ (tag[b] == MESHDEFORM_TAG_BOUNDARY && !mdb->boundisect[a][i - 1])) {
+ tag[b] = MESHDEFORM_TAG_EXTERIOR;
+ stack[stacksize++] = b;
}
}
}
}
/* other cells are interior */
- for (a=0; a<size*size*size; a++)
- if (tag[a]==MESHDEFORM_TAG_UNTYPED)
- tag[a]= MESHDEFORM_TAG_INTERIOR;
+ for (a = 0; a < size * size * size; a++)
+ if (tag[a] == MESHDEFORM_TAG_UNTYPED)
+ tag[a] = MESHDEFORM_TAG_INTERIOR;
#if 0
{
int tb, ti, te, ts;
- tb= ti= te= ts= 0;
- for (a=0; a<size*size*size; a++)
- if (tag[a]==MESHDEFORM_TAG_BOUNDARY)
+ tb = ti = te = ts = 0;
+ for (a = 0; a < size * size * size; a++)
+ if (tag[a] == MESHDEFORM_TAG_BOUNDARY)
tb++;
- else if (tag[a]==MESHDEFORM_TAG_INTERIOR)
+ else if (tag[a] == MESHDEFORM_TAG_INTERIOR)
ti++;
- else if (tag[a]==MESHDEFORM_TAG_EXTERIOR) {
+ else if (tag[a] == MESHDEFORM_TAG_EXTERIOR) {
te++;
if (mdb->semibound[a])
@@ -1432,7 +1433,7 @@ static float meshdeform_boundary_phi(MeshDeformBind *UNUSED(mdb), MDefBoundIsect
{
int a;
- for (a=0; a<isect->nvert; a++)
+ for (a = 0; a < isect->nvert; a++)
if (isect->v[a] == cagevert)
return isect->uvw[a];
@@ -1441,32 +1442,32 @@ static float meshdeform_boundary_phi(MeshDeformBind *UNUSED(mdb), MDefBoundIsect
static float meshdeform_interp_w(MeshDeformBind *mdb, float *gridvec, float *UNUSED(vec), int UNUSED(cagevert))
{
- float dvec[3], ivec[3], wx, wy, wz, result=0.0f;
- float weight, totweight= 0.0f;
+ float dvec[3], ivec[3], wx, wy, wz, result = 0.0f;
+ float weight, totweight = 0.0f;
int i, a, x, y, z;
- for (i=0; i<3; i++) {
- ivec[i]= (int)gridvec[i];
- dvec[i]= gridvec[i] - ivec[i];
+ for (i = 0; i < 3; i++) {
+ ivec[i] = (int)gridvec[i];
+ dvec[i] = gridvec[i] - ivec[i];
}
- for (i=0; i<8; i++) {
- if (i & 1) { x= ivec[0]+1; wx= dvec[0]; }
- else { x= ivec[0]; wx= 1.0f-dvec[0]; }
+ for (i = 0; i < 8; i++) {
+ if (i & 1) { x = ivec[0] + 1; wx = dvec[0]; }
+ else { x = ivec[0]; wx = 1.0f - dvec[0]; }
- if (i & 2) { y= ivec[1]+1; wy= dvec[1]; }
- else { y= ivec[1]; wy= 1.0f-dvec[1]; }
+ if (i & 2) { y = ivec[1] + 1; wy = dvec[1]; }
+ else { y = ivec[1]; wy = 1.0f - dvec[1]; }
- if (i & 4) { z= ivec[2]+1; wz= dvec[2]; }
- else { z= ivec[2]; wz= 1.0f-dvec[2]; }
+ if (i & 4) { z = ivec[2] + 1; wz = dvec[2]; }
+ else { z = ivec[2]; wz = 1.0f - dvec[2]; }
- CLAMP(x, 0, mdb->size-1);
- CLAMP(y, 0, mdb->size-1);
- CLAMP(z, 0, mdb->size-1);
+ CLAMP(x, 0, mdb->size - 1);
+ CLAMP(y, 0, mdb->size - 1);
+ CLAMP(z, 0, mdb->size - 1);
- a= meshdeform_index(mdb, x, y, z, 0);
- weight= wx*wy*wz;
- result += weight*mdb->phi[a];
+ a = meshdeform_index(mdb, x, y, z, 0);
+ weight = wx * wy * wz;
+ result += weight * mdb->phi[a];
totweight += weight;
}
@@ -1480,33 +1481,33 @@ static void meshdeform_check_semibound(MeshDeformBind *mdb, int x, int y, int z)
{
int i, a;
- a= meshdeform_index(mdb, x, y, z, 0);
+ a = meshdeform_index(mdb, x, y, z, 0);
if (mdb->tag[a] != MESHDEFORM_TAG_EXTERIOR)
return;
- for (i=1; i<=6; i++)
- if (mdb->boundisect[a][i-1])
- mdb->semibound[a]= 1;
+ for (i = 1; i <= 6; i++)
+ if (mdb->boundisect[a][i - 1])
+ mdb->semibound[a] = 1;
}
static float meshdeform_boundary_total_weight(MeshDeformBind *mdb, int x, int y, int z)
{
- float weight, totweight= 0.0f;
+ float weight, totweight = 0.0f;
int i, a;
- a= meshdeform_index(mdb, x, y, z, 0);
+ a = meshdeform_index(mdb, x, y, z, 0);
/* count weight for neighbor cells */
- for (i=1; i<=6; i++) {
+ for (i = 1; i <= 6; i++) {
if (meshdeform_index(mdb, x, y, z, i) == -1)
continue;
- if (mdb->boundisect[a][i-1])
- weight= 1.0f/mdb->boundisect[a][i-1]->len;
+ if (mdb->boundisect[a][i - 1])
+ weight = 1.0f / mdb->boundisect[a][i - 1]->len;
else if (!mdb->semibound[a])
- weight= 1.0f/mdb->width[0];
+ weight = 1.0f / mdb->width[0];
else
- weight= 0.0f;
+ weight = 0.0f;
totweight += weight;
}
@@ -1520,21 +1521,21 @@ static void meshdeform_matrix_add_cell(MeshDeformBind *mdb, int x, int y, int z)
float weight, totweight;
int i, a, acenter;
- acenter= meshdeform_index(mdb, x, y, z, 0);
+ acenter = meshdeform_index(mdb, x, y, z, 0);
if (mdb->tag[acenter] == MESHDEFORM_TAG_EXTERIOR)
return;
nlMatrixAdd(mdb->varidx[acenter], mdb->varidx[acenter], 1.0f);
- totweight= meshdeform_boundary_total_weight(mdb, x, y, z);
- for (i=1; i<=6; i++) {
- a= meshdeform_index(mdb, x, y, z, i);
+ totweight = meshdeform_boundary_total_weight(mdb, x, y, z);
+ for (i = 1; i <= 6; i++) {
+ a = meshdeform_index(mdb, x, y, z, i);
if (a == -1 || mdb->tag[a] == MESHDEFORM_TAG_EXTERIOR)
continue;
- isect= mdb->boundisect[acenter][i-1];
+ isect = mdb->boundisect[acenter][i - 1];
if (!isect) {
- weight= (1.0f/mdb->width[0])/totweight;
+ weight = (1.0f / mdb->width[0]) / totweight;
nlMatrixAdd(mdb->varidx[acenter], mdb->varidx[a], -weight);
}
}
@@ -1546,21 +1547,21 @@ static void meshdeform_matrix_add_rhs(MeshDeformBind *mdb, int x, int y, int z,
float rhs, weight, totweight;
int i, a, acenter;
- acenter= meshdeform_index(mdb, x, y, z, 0);
+ acenter = meshdeform_index(mdb, x, y, z, 0);
if (mdb->tag[acenter] == MESHDEFORM_TAG_EXTERIOR)
return;
- totweight= meshdeform_boundary_total_weight(mdb, x, y, z);
- for (i=1; i<=6; i++) {
- a= meshdeform_index(mdb, x, y, z, i);
+ totweight = meshdeform_boundary_total_weight(mdb, x, y, z);
+ for (i = 1; i <= 6; i++) {
+ a = meshdeform_index(mdb, x, y, z, i);
if (a == -1)
continue;
- isect= mdb->boundisect[acenter][i-1];
+ isect = mdb->boundisect[acenter][i - 1];
if (isect) {
- weight= (1.0f/isect->len)/totweight;
- rhs= weight*meshdeform_boundary_phi(mdb, isect, cagevert);
+ weight = (1.0f / isect->len) / totweight;
+ rhs = weight * meshdeform_boundary_phi(mdb, isect, cagevert);
nlRightHandSideAdd(0, mdb->varidx[acenter], rhs);
}
}
@@ -1572,19 +1573,19 @@ static void meshdeform_matrix_add_semibound_phi(MeshDeformBind *mdb, int x, int
float rhs, weight, totweight;
int i, a;
- a= meshdeform_index(mdb, x, y, z, 0);
+ a = meshdeform_index(mdb, x, y, z, 0);
if (!mdb->semibound[a])
return;
- mdb->phi[a]= 0.0f;
+ mdb->phi[a] = 0.0f;
- totweight= meshdeform_boundary_total_weight(mdb, x, y, z);
- for (i=1; i<=6; i++) {
- isect= mdb->boundisect[a][i-1];
+ totweight = meshdeform_boundary_total_weight(mdb, x, y, z);
+ for (i = 1; i <= 6; i++) {
+ isect = mdb->boundisect[a][i - 1];
if (isect) {
- weight= (1.0f/isect->len)/totweight;
- rhs= weight*meshdeform_boundary_phi(mdb, isect, cagevert);
+ weight = (1.0f / isect->len) / totweight;
+ rhs = weight * meshdeform_boundary_phi(mdb, isect, cagevert);
mdb->phi[a] += rhs;
}
}
@@ -1595,14 +1596,14 @@ static void meshdeform_matrix_add_exterior_phi(MeshDeformBind *mdb, int x, int y
float phi, totweight;
int i, a, acenter;
- acenter= meshdeform_index(mdb, x, y, z, 0);
+ acenter = meshdeform_index(mdb, x, y, z, 0);
if (mdb->tag[acenter] != MESHDEFORM_TAG_EXTERIOR || mdb->semibound[acenter])
return;
- phi= 0.0f;
- totweight= 0.0f;
- for (i=1; i<=6; i++) {
- a= meshdeform_index(mdb, x, y, z, i);
+ phi = 0.0f;
+ totweight = 0.0f;
+ for (i = 1; i <= 6; i++) {
+ a = meshdeform_index(mdb, x, y, z, i);
if (a != -1 && mdb->semibound[a]) {
phi += mdb->phi[a];
@@ -1611,7 +1612,7 @@ static void meshdeform_matrix_add_exterior_phi(MeshDeformBind *mdb, int x, int y
}
if (totweight != 0.0f)
- mdb->phi[acenter]= phi/totweight;
+ mdb->phi[acenter] = phi / totweight;
}
static void meshdeform_matrix_solve(MeshDeformModifierData *mmd, MeshDeformBind *mdb)
@@ -1622,9 +1623,9 @@ static void meshdeform_matrix_solve(MeshDeformModifierData *mmd, MeshDeformBind
char message[256];
/* setup variable indices */
- mdb->varidx= MEM_callocN(sizeof(int)*mdb->size3, "MeshDeformDSvaridx");
- for (a=0, totvar=0; a<mdb->size3; a++)
- mdb->varidx[a]= (mdb->tag[a] == MESHDEFORM_TAG_EXTERIOR)? -1: totvar++;
+ mdb->varidx = MEM_callocN(sizeof(int) * mdb->size3, "MeshDeformDSvaridx");
+ for (a = 0, totvar = 0; a < mdb->size3; a++)
+ mdb->varidx[a] = (mdb->tag[a] == MESHDEFORM_TAG_EXTERIOR) ? -1 : totvar++;
if (totvar == 0) {
MEM_freeN(mdb->varidx);
@@ -1635,7 +1636,7 @@ static void meshdeform_matrix_solve(MeshDeformModifierData *mmd, MeshDeformBind
/* setup opennl solver */
nlNewContext();
- context= nlGetCurrent();
+ context = nlGetCurrent();
nlSolverParameteri(NL_NB_VARIABLES, totvar);
nlSolverParameteri(NL_NB_ROWS, totvar);
@@ -1645,22 +1646,22 @@ static void meshdeform_matrix_solve(MeshDeformModifierData *mmd, MeshDeformBind
nlBegin(NL_MATRIX);
/* build matrix */
- for (z=0; z<mdb->size; z++)
- for (y=0; y<mdb->size; y++)
- for (x=0; x<mdb->size; x++)
+ for (z = 0; z < mdb->size; z++)
+ for (y = 0; y < mdb->size; y++)
+ for (x = 0; x < mdb->size; x++)
meshdeform_matrix_add_cell(mdb, x, y, z);
/* solve for each cage vert */
- for (a=0; a<mdb->totcagevert; a++) {
+ for (a = 0; a < mdb->totcagevert; a++) {
if (a != 0) {
nlBegin(NL_SYSTEM);
nlBegin(NL_MATRIX);
}
/* fill in right hand side and solve */
- for (z=0; z<mdb->size; z++)
- for (y=0; y<mdb->size; y++)
- for (x=0; x<mdb->size; x++)
+ for (z = 0; z < mdb->size; z++)
+ for (y = 0; y < mdb->size; y++)
+ for (x = 0; x < mdb->size; x++)
meshdeform_matrix_add_rhs(mdb, x, y, z, a);
nlEnd(NL_MATRIX);
@@ -1671,32 +1672,32 @@ static void meshdeform_matrix_solve(MeshDeformModifierData *mmd, MeshDeformBind
#endif
if (nlSolveAdvanced(NULL, NL_TRUE)) {
- for (z=0; z<mdb->size; z++)
- for (y=0; y<mdb->size; y++)
- for (x=0; x<mdb->size; x++)
+ for (z = 0; z < mdb->size; z++)
+ for (y = 0; y < mdb->size; y++)
+ for (x = 0; x < mdb->size; x++)
meshdeform_matrix_add_semibound_phi(mdb, x, y, z, a);
- for (z=0; z<mdb->size; z++)
- for (y=0; y<mdb->size; y++)
- for (x=0; x<mdb->size; x++)
+ for (z = 0; z < mdb->size; z++)
+ for (y = 0; y < mdb->size; y++)
+ for (x = 0; x < mdb->size; x++)
meshdeform_matrix_add_exterior_phi(mdb, x, y, z, a);
- for (b=0; b<mdb->size3; b++) {
+ for (b = 0; b < mdb->size3; b++) {
if (mdb->tag[b] != MESHDEFORM_TAG_EXTERIOR)
- mdb->phi[b]= nlGetVariable(0, mdb->varidx[b]);
+ mdb->phi[b] = nlGetVariable(0, mdb->varidx[b]);
mdb->totalphi[b] += mdb->phi[b];
}
if (mdb->weights) {
/* static bind : compute weights for each vertex */
- for (b=0; b<mdb->totvert; b++) {
+ for (b = 0; b < mdb->totvert; b++) {
if (mdb->inside[b]) {
copy_v3_v3(vec, mdb->vertexcos[b]);
- gridvec[0]= (vec[0] - mdb->min[0] - mdb->halfwidth[0])/mdb->width[0];
- gridvec[1]= (vec[1] - mdb->min[1] - mdb->halfwidth[1])/mdb->width[1];
- gridvec[2]= (vec[2] - mdb->min[2] - mdb->halfwidth[2])/mdb->width[2];
+ gridvec[0] = (vec[0] - mdb->min[0] - mdb->halfwidth[0]) / mdb->width[0];
+ gridvec[1] = (vec[1] - mdb->min[1] - mdb->halfwidth[1]) / mdb->width[1];
+ gridvec[2] = (vec[2] - mdb->min[2] - mdb->halfwidth[2]) / mdb->width[2];
- mdb->weights[b*mdb->totcagevert + a]= meshdeform_interp_w(mdb, gridvec, vec, a);
+ mdb->weights[b * mdb->totcagevert + a] = meshdeform_interp_w(mdb, gridvec, vec, a);
}
}
}
@@ -1704,13 +1705,13 @@ static void meshdeform_matrix_solve(MeshDeformModifierData *mmd, MeshDeformBind
MDefBindInfluence *inf;
/* dynamic bind */
- for (b=0; b<mdb->size3; b++) {
+ for (b = 0; b < mdb->size3; b++) {
if (mdb->phi[b] >= MESHDEFORM_MIN_INFLUENCE) {
- inf= BLI_memarena_alloc(mdb->memarena, sizeof(*inf));
- inf->vertex= a;
- inf->weight= mdb->phi[b];
- inf->next= mdb->dyngrid[b];
- mdb->dyngrid[b]= inf;
+ inf = BLI_memarena_alloc(mdb->memarena, sizeof(*inf));
+ inf->vertex = a;
+ inf->weight = mdb->phi[b];
+ inf->next = mdb->dyngrid[b];
+ mdb->dyngrid[b] = inf;
}
}
}
@@ -1721,17 +1722,17 @@ static void meshdeform_matrix_solve(MeshDeformModifierData *mmd, MeshDeformBind
break;
}
- BLI_snprintf(message, sizeof(message), "Mesh deform solve %d / %d |||", a+1, mdb->totcagevert);
- progress_bar((float)(a+1)/(float)(mdb->totcagevert), message);
+ BLI_snprintf(message, sizeof(message), "Mesh deform solve %d / %d |||", a + 1, mdb->totcagevert);
+ progress_bar((float)(a + 1) / (float)(mdb->totcagevert), message);
}
#if 0
/* sanity check */
- for (b=0; b<mdb->size3; b++)
+ for (b = 0; b < mdb->size3; b++)
if (mdb->tag[b] != MESHDEFORM_TAG_EXTERIOR)
if (fabs(mdb->totalphi[b] - 1.0f) > 1e-4)
printf("totalphi deficiency [%s|%d] %d: %.10f\n",
- (mdb->tag[b] == MESHDEFORM_TAG_INTERIOR)? "interior": "boundary", mdb->semibound[b], mdb->varidx[b], mdb->totalphi[b]);
+ (mdb->tag[b] == MESHDEFORM_TAG_INTERIOR) ? "interior" : "boundary", mdb->semibound[b], mdb->varidx[b], mdb->totalphi[b]);
#endif
/* free */
@@ -1751,78 +1752,78 @@ static void harmonic_coordinates_bind(Scene *UNUSED(scene), MeshDeformModifierDa
/* compute bounding box of the cage mesh */
INIT_MINMAX(mdb->min, mdb->max);
- for (a=0; a<mdb->totcagevert; a++)
+ for (a = 0; a < mdb->totcagevert; a++)
DO_MINMAX(mdb->cagecos[a], mdb->min, mdb->max);
/* allocate memory */
- mdb->size= (2<<(mmd->gridsize-1)) + 2;
- mdb->size3= mdb->size*mdb->size*mdb->size;
- mdb->tag= MEM_callocN(sizeof(int)*mdb->size3, "MeshDeformBindTag");
- mdb->phi= MEM_callocN(sizeof(float)*mdb->size3, "MeshDeformBindPhi");
- mdb->totalphi= MEM_callocN(sizeof(float)*mdb->size3, "MeshDeformBindTotalPhi");
- mdb->boundisect= MEM_callocN(sizeof(*mdb->boundisect)*mdb->size3, "MDefBoundIsect");
- mdb->semibound= MEM_callocN(sizeof(int)*mdb->size3, "MDefSemiBound");
+ mdb->size = (2 << (mmd->gridsize - 1)) + 2;
+ mdb->size3 = mdb->size * mdb->size * mdb->size;
+ mdb->tag = MEM_callocN(sizeof(int) * mdb->size3, "MeshDeformBindTag");
+ mdb->phi = MEM_callocN(sizeof(float) * mdb->size3, "MeshDeformBindPhi");
+ mdb->totalphi = MEM_callocN(sizeof(float) * mdb->size3, "MeshDeformBindTotalPhi");
+ mdb->boundisect = MEM_callocN(sizeof(*mdb->boundisect) * mdb->size3, "MDefBoundIsect");
+ mdb->semibound = MEM_callocN(sizeof(int) * mdb->size3, "MDefSemiBound");
- mdb->inside= MEM_callocN(sizeof(int)*mdb->totvert, "MDefInside");
+ mdb->inside = MEM_callocN(sizeof(int) * mdb->totvert, "MDefInside");
if (mmd->flag & MOD_MDEF_DYNAMIC_BIND)
- mdb->dyngrid= MEM_callocN(sizeof(MDefBindInfluence*)*mdb->size3, "MDefDynGrid");
+ mdb->dyngrid = MEM_callocN(sizeof(MDefBindInfluence *) * mdb->size3, "MDefDynGrid");
else
- mdb->weights= MEM_callocN(sizeof(float)*mdb->totvert*mdb->totcagevert, "MDefWeights");
+ mdb->weights = MEM_callocN(sizeof(float) * mdb->totvert * mdb->totcagevert, "MDefWeights");
- mdb->memarena= BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, "harmonic coords arena");
+ mdb->memarena = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, "harmonic coords arena");
BLI_memarena_use_calloc(mdb->memarena);
/* make bounding box equal size in all directions, add padding, and compute
* width of the cells */
maxwidth = -1.0f;
- for (a=0; a<3; a++)
- if (mdb->max[a]-mdb->min[a] > maxwidth)
- maxwidth= mdb->max[a]-mdb->min[a];
+ for (a = 0; a < 3; a++)
+ if (mdb->max[a] - mdb->min[a] > maxwidth)
+ maxwidth = mdb->max[a] - mdb->min[a];
- for (a=0; a<3; a++) {
- center[a]= (mdb->min[a]+mdb->max[a])*0.5f;
- mdb->min[a]= center[a] - maxwidth*0.5f;
- mdb->max[a]= center[a] + maxwidth*0.5f;
+ for (a = 0; a < 3; a++) {
+ center[a] = (mdb->min[a] + mdb->max[a]) * 0.5f;
+ mdb->min[a] = center[a] - maxwidth * 0.5f;
+ mdb->max[a] = center[a] + maxwidth * 0.5f;
- mdb->width[a]= (mdb->max[a]-mdb->min[a])/(mdb->size-4);
- mdb->min[a] -= 2.1f*mdb->width[a];
- mdb->max[a] += 2.1f*mdb->width[a];
+ mdb->width[a] = (mdb->max[a] - mdb->min[a]) / (mdb->size - 4);
+ mdb->min[a] -= 2.1f * mdb->width[a];
+ mdb->max[a] += 2.1f * mdb->width[a];
- mdb->width[a]= (mdb->max[a]-mdb->min[a])/mdb->size;
- mdb->halfwidth[a]= mdb->width[a]*0.5f;
+ mdb->width[a] = (mdb->max[a] - mdb->min[a]) / mdb->size;
+ mdb->halfwidth[a] = mdb->width[a] * 0.5f;
}
progress_bar(0, "Setting up mesh deform system");
- totinside= 0;
- for (a=0; a<mdb->totvert; a++) {
+ totinside = 0;
+ for (a = 0; a < mdb->totvert; a++) {
copy_v3_v3(vec, mdb->vertexcos[a]);
- mdb->inside[a]= meshdeform_inside_cage(mdb, vec);
+ mdb->inside[a] = meshdeform_inside_cage(mdb, vec);
if (mdb->inside[a])
totinside++;
}
/* free temporary MDefBoundIsects */
BLI_memarena_free(mdb->memarena);
- mdb->memarena= BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, "harmonic coords arena");
+ mdb->memarena = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, "harmonic coords arena");
/* start with all cells untyped */
- for (a=0; a<mdb->size3; a++)
- mdb->tag[a]= MESHDEFORM_TAG_UNTYPED;
+ for (a = 0; a < mdb->size3; a++)
+ mdb->tag[a] = MESHDEFORM_TAG_UNTYPED;
/* detect intersections and tag boundary cells */
- for (z=0; z<mdb->size; z++)
- for (y=0; y<mdb->size; y++)
- for (x=0; x<mdb->size; x++)
+ for (z = 0; z < mdb->size; z++)
+ for (y = 0; y < mdb->size; y++)
+ for (x = 0; x < mdb->size; x++)
meshdeform_add_intersections(mdb, x, y, z);
/* compute exterior and interior tags */
meshdeform_bind_floodfill(mdb);
- for (z=0; z<mdb->size; z++)
- for (y=0; y<mdb->size; y++)
- for (x=0; x<mdb->size; x++)
+ for (z = 0; z < mdb->size; z++)
+ for (y = 0; y < mdb->size; y++)
+ for (x = 0; x < mdb->size; x++)
meshdeform_check_semibound(mdb, x, y, z);
/* solve */
@@ -1830,45 +1831,45 @@ static void harmonic_coordinates_bind(Scene *UNUSED(scene), MeshDeformModifierDa
/* assign results */
if (mmd->flag & MOD_MDEF_DYNAMIC_BIND) {
- mmd->totinfluence= 0;
- for (a=0; a<mdb->size3; a++)
- for (inf=mdb->dyngrid[a]; inf; inf=inf->next)
+ mmd->totinfluence = 0;
+ for (a = 0; a < mdb->size3; a++)
+ for (inf = mdb->dyngrid[a]; inf; inf = inf->next)
mmd->totinfluence++;
/* convert MDefBindInfluences to smaller MDefInfluences */
- mmd->dyngrid= MEM_callocN(sizeof(MDefCell)*mdb->size3, "MDefDynGrid");
- mmd->dyninfluences= MEM_callocN(sizeof(MDefInfluence)*mmd->totinfluence, "MDefInfluence");
- offset= 0;
- for (a=0; a<mdb->size3; a++) {
- cell= &mmd->dyngrid[a];
- cell->offset= offset;
-
- totweight= 0.0f;
- mdinf= mmd->dyninfluences + cell->offset;
- for (inf=mdb->dyngrid[a]; inf; inf=inf->next, mdinf++) {
- mdinf->weight= inf->weight;
- mdinf->vertex= inf->vertex;
+ mmd->dyngrid = MEM_callocN(sizeof(MDefCell) * mdb->size3, "MDefDynGrid");
+ mmd->dyninfluences = MEM_callocN(sizeof(MDefInfluence) * mmd->totinfluence, "MDefInfluence");
+ offset = 0;
+ for (a = 0; a < mdb->size3; a++) {
+ cell = &mmd->dyngrid[a];
+ cell->offset = offset;
+
+ totweight = 0.0f;
+ mdinf = mmd->dyninfluences + cell->offset;
+ for (inf = mdb->dyngrid[a]; inf; inf = inf->next, mdinf++) {
+ mdinf->weight = inf->weight;
+ mdinf->vertex = inf->vertex;
totweight += mdinf->weight;
cell->totinfluence++;
}
if (totweight > 0.0f) {
- mdinf= mmd->dyninfluences + cell->offset;
- for (b=0; b<cell->totinfluence; b++, mdinf++)
+ mdinf = mmd->dyninfluences + cell->offset;
+ for (b = 0; b < cell->totinfluence; b++, mdinf++)
mdinf->weight /= totweight;
}
offset += cell->totinfluence;
}
- mmd->dynverts= mdb->inside;
- mmd->dyngridsize= mdb->size;
+ mmd->dynverts = mdb->inside;
+ mmd->dyngridsize = mdb->size;
copy_v3_v3(mmd->dyncellmin, mdb->min);
- mmd->dyncellwidth= mdb->width[0];
+ mmd->dyncellwidth = mdb->width[0];
MEM_freeN(mdb->dyngrid);
}
else {
- mmd->bindweights= mdb->weights;
+ mmd->bindweights = mdb->weights;
MEM_freeN(mdb->inside);
}
@@ -1884,16 +1885,16 @@ static void harmonic_coordinates_bind(Scene *UNUSED(scene), MeshDeformModifierDa
static void heat_weighting_bind(Scene *scene, DerivedMesh *dm, MeshDeformModifierData *mmd, MeshDeformBind *mdb)
{
LaplacianSystem *sys;
- MFace *mface= dm->getTessFaceArray(dm), *mf;
- int totvert= dm->getNumVerts(dm);
- int totface= dm->getNumTessFaces(dm);
+ MFace *mface = dm->getTessFaceArray(dm), *mf;
+ int totvert = dm->getNumVerts(dm);
+ int totface = dm->getNumTessFaces(dm);
float solution, weight;
int a, tottri, j, thrownerror = 0;
- mdb->weights= MEM_callocN(sizeof(float)*mdb->totvert*mdb->totcagevert, "MDefWeights");
+ mdb->weights = MEM_callocN(sizeof(float) * mdb->totvert * mdb->totcagevert, "MDefWeights");
/* count triangles */
- for (tottri=0, a=0, mf=mface; a<totface; a++, mf++) {
+ for (tottri = 0, a = 0, mf = mface; a < totface; a++, mf++) {
tottri++;
if (mf->v4) tottri++;
}
@@ -1901,12 +1902,12 @@ static void heat_weighting_bind(Scene *scene, DerivedMesh *dm, MeshDeformModifie
/* create laplacian */
sys = laplacian_system_construct_begin(totvert, tottri, 1);
- sys->heat.mface= mface;
- sys->heat.totface= totface;
- sys->heat.totvert= totvert;
- sys->heat.verts= mdb->vertexcos;
+ sys->heat.mface = mface;
+ sys->heat.totface = totface;
+ sys->heat.totvert = totvert;
+ sys->heat.verts = mdb->vertexcos;
sys->heat.source = mdb->cagecos;
- sys->heat.numsource= mdb->totcagevert;
+ sys->heat.numsource = mdb->totcagevert;
heat_ray_tree_create(sys);
heat_laplacian_create(sys);
@@ -1914,30 +1915,30 @@ static void heat_weighting_bind(Scene *scene, DerivedMesh *dm, MeshDeformModifie
laplacian_system_construct_end(sys);
/* compute weights per bone */
- for (j=0; j<mdb->totcagevert; j++) {
+ for (j = 0; j < mdb->totcagevert; j++) {
/* fill right hand side */
laplacian_begin_solve(sys, -1);
- for (a=0; a<totvert; a++)
+ for (a = 0; a < totvert; a++)
if (heat_source_closest(sys, a, j))
laplacian_add_right_hand_side(sys, a,
- sys->heat.H[a]*sys->heat.p[a]);
+ sys->heat.H[a] * sys->heat.p[a]);
/* solve */
if (laplacian_system_solve(sys)) {
/* load solution into vertex groups */
- for (a=0; a<totvert; a++) {
- solution= laplacian_system_get_solution(a);
+ for (a = 0; a < totvert; a++) {
+ solution = laplacian_system_get_solution(a);
- weight= heat_limit_weight(solution);
+ weight = heat_limit_weight(solution);
if (weight > 0.0f)
- mdb->weights[a*mdb->totcagevert + j] = weight;
+ mdb->weights[a * mdb->totcagevert + j] = weight;
}
}
else if (!thrownerror) {
error("Mesh Deform Heat Weighting:"
- " failed to find solution for one or more vertices");
- thrownerror= 1;
+ " failed to find solution for one or more vertices");
+ thrownerror = 1;
break;
}
}
@@ -1946,7 +1947,7 @@ static void heat_weighting_bind(Scene *scene, DerivedMesh *dm, MeshDeformModifie
heat_system_free(sys);
laplacian_system_delete(sys);
- mmd->bindweights= mdb->weights;
+ mmd->bindweights = mdb->weights;
}
#endif
@@ -1962,19 +1963,19 @@ void mesh_deform_bind(Scene *scene, MeshDeformModifierData *mmd, float *vertexco
memset(&mdb, 0, sizeof(MeshDeformBind));
/* get mesh and cage mesh */
- mdb.vertexcos= MEM_callocN(sizeof(float)*3*totvert, "MeshDeformCos");
- mdb.totvert= totvert;
+ mdb.vertexcos = MEM_callocN(sizeof(float) * 3 * totvert, "MeshDeformCos");
+ mdb.totvert = totvert;
- mdb.cagedm= mesh_create_derived_no_deform(scene, mmd->object, NULL, CD_MASK_BAREMESH);
- mdb.totcagevert= mdb.cagedm->getNumVerts(mdb.cagedm);
- mdb.cagecos= MEM_callocN(sizeof(*mdb.cagecos)*mdb.totcagevert, "MeshDeformBindCos");
+ mdb.cagedm = mesh_create_derived_no_deform(scene, mmd->object, NULL, CD_MASK_BAREMESH);
+ mdb.totcagevert = mdb.cagedm->getNumVerts(mdb.cagedm);
+ mdb.cagecos = MEM_callocN(sizeof(*mdb.cagecos) * mdb.totcagevert, "MeshDeformBindCos");
copy_m4_m4(mdb.cagemat, cagemat);
- mvert= mdb.cagedm->getVertArray(mdb.cagedm);
- for (a=0; a<mdb.totcagevert; a++)
+ mvert = mdb.cagedm->getVertArray(mdb.cagedm);
+ for (a = 0; a < mdb.totcagevert; a++)
copy_v3_v3(mdb.cagecos[a], mvert[a].co);
- for (a=0; a<mdb.totvert; a++)
- mul_v3_m4v3(mdb.vertexcos[a], mdb.cagemat, vertexcos + a*3);
+ for (a = 0; a < mdb.totvert; a++)
+ mul_v3_m4v3(mdb.vertexcos[a], mdb.cagemat, vertexcos + a * 3);
/* solve */
#if 0
@@ -1987,21 +1988,21 @@ void mesh_deform_bind(Scene *scene, MeshDeformModifierData *mmd, float *vertexco
#endif
/* assign bind variables */
- mmd->bindcagecos= (float*)mdb.cagecos;
- mmd->totvert= mdb.totvert;
- mmd->totcagevert= mdb.totcagevert;
+ mmd->bindcagecos = (float *)mdb.cagecos;
+ mmd->totvert = mdb.totvert;
+ mmd->totcagevert = mdb.totcagevert;
copy_m4_m4(mmd->bindmat, mmd->object->obmat);
/* transform bindcagecos to world space */
- for (a=0; a<mdb.totcagevert; a++)
- mul_m4_v3(mmd->object->obmat, mmd->bindcagecos+a*3);
+ for (a = 0; a < mdb.totcagevert; a++)
+ mul_m4_v3(mmd->object->obmat, mmd->bindcagecos + a * 3);
/* free */
mdb.cagedm->release(mdb.cagedm);
MEM_freeN(mdb.vertexcos);
/* compact weights */
- modifier_mdef_compact_influences((ModifierData*)mmd);
+ modifier_mdef_compact_influences((ModifierData *)mmd);
end_progress_bar();
waitcursor(0);
diff --git a/source/blender/editors/armature/meshlaplacian.h b/source/blender/editors/armature/meshlaplacian.h
index 095de4ac9a9..da512f2df12 100644
--- a/source/blender/editors/armature/meshlaplacian.h
+++ b/source/blender/editors/armature/meshlaplacian.h
@@ -62,9 +62,9 @@ float laplacian_system_get_solution(int v);
/* Heat Weighting */
void heat_bone_weighting(struct Object *ob, struct Mesh *me, float (*verts)[3],
- int numbones, struct bDeformGroup **dgrouplist,
- struct bDeformGroup **dgroupflip, float (*root)[3], float (*tip)[3],
- int *selected, const char **error);
+ int numbones, struct bDeformGroup **dgrouplist,
+ struct bDeformGroup **dgroupflip, float (*root)[3], float (*tip)[3],
+ int *selected, const char **error);
#ifdef RIGID_DEFORM
/* As-Rigid-As-Possible Deformation */
diff --git a/source/blender/editors/armature/poseSlide.c b/source/blender/editors/armature/poseSlide.c
index be520d1e8a0..824a39374fd 100644
--- a/source/blender/editors/armature/poseSlide.c
+++ b/source/blender/editors/armature/poseSlide.c
@@ -91,63 +91,63 @@
/* Temporary data shared between these operators */
typedef struct tPoseSlideOp {
- Scene *scene; /* current scene */
- ScrArea *sa; /* area that we're operating in (needed for modal()) */
- ARegion *ar; /* region that we're operating in (needed for modal()) */
- Object *ob; /* active object that Pose Info comes from */
- bArmature *arm; /* armature for pose */
-
- ListBase pfLinks; /* links between posechannels and f-curves */
- DLRBT_Tree keys; /* binary tree for quicker searching for keyframes (when applicable) */
-
- int cframe; /* current frame number */
- int prevFrame; /* frame before current frame (blend-from) */
- int nextFrame; /* frame after current frame (blend-to) */
+ Scene *scene; /* current scene */
+ ScrArea *sa; /* area that we're operating in (needed for modal()) */
+ ARegion *ar; /* region that we're operating in (needed for modal()) */
+ Object *ob; /* active object that Pose Info comes from */
+ bArmature *arm; /* armature for pose */
+
+ ListBase pfLinks; /* links between posechannels and f-curves */
+ DLRBT_Tree keys; /* binary tree for quicker searching for keyframes (when applicable) */
+
+ int cframe; /* current frame number */
+ int prevFrame; /* frame before current frame (blend-from) */
+ int nextFrame; /* frame after current frame (blend-to) */
- int mode; /* sliding mode (ePoseSlide_Modes) */
- int flag; // unused for now, but can later get used for storing runtime settings....
+ int mode; /* sliding mode (ePoseSlide_Modes) */
+ int flag; // unused for now, but can later get used for storing runtime settings....
- float percentage; /* 0-1 value for determining the influence of whatever is relevant */
+ float percentage; /* 0-1 value for determining the influence of whatever is relevant */
} tPoseSlideOp;
/* Pose Sliding Modes */
typedef enum ePoseSlide_Modes {
- POSESLIDE_PUSH = 0, /* exaggerate the pose... */
- POSESLIDE_RELAX, /* soften the pose... */
- POSESLIDE_BREAKDOWN, /* slide between the endpoint poses, finding a 'soft' spot */
+ POSESLIDE_PUSH = 0, /* exaggerate the pose... */
+ POSESLIDE_RELAX, /* soften the pose... */
+ POSESLIDE_BREAKDOWN, /* slide between the endpoint poses, finding a 'soft' spot */
} ePoseSlide_Modes;
/* ------------------------------------ */
/* operator init */
-static int pose_slide_init (bContext *C, wmOperator *op, short mode)
+static int pose_slide_init(bContext *C, wmOperator *op, short mode)
{
tPoseSlideOp *pso;
- bAction *act= NULL;
+ bAction *act = NULL;
/* init slide-op data */
- pso= op->customdata= MEM_callocN(sizeof(tPoseSlideOp), "tPoseSlideOp");
+ pso = op->customdata = MEM_callocN(sizeof(tPoseSlideOp), "tPoseSlideOp");
/* get info from context */
- pso->scene= CTX_data_scene(C);
- pso->ob= object_pose_armature_get(CTX_data_active_object(C));
- pso->arm= (pso->ob)? pso->ob->data : NULL;
- pso->sa= CTX_wm_area(C); /* only really needed when doing modal() */
- pso->ar= CTX_wm_region(C); /* only really needed when doing modal() */
+ pso->scene = CTX_data_scene(C);
+ pso->ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
+ pso->arm = (pso->ob) ? pso->ob->data : NULL;
+ pso->sa = CTX_wm_area(C); /* only really needed when doing modal() */
+ pso->ar = CTX_wm_region(C); /* only really needed when doing modal() */
- pso->cframe= pso->scene->r.cfra;
- pso->mode= mode;
+ pso->cframe = pso->scene->r.cfra;
+ pso->mode = mode;
/* set range info from property values - these may get overridden for the invoke() */
- pso->percentage= RNA_float_get(op->ptr, "percentage");
- pso->prevFrame= RNA_int_get(op->ptr, "prev_frame");
- pso->nextFrame= RNA_int_get(op->ptr, "next_frame");
+ pso->percentage = RNA_float_get(op->ptr, "percentage");
+ pso->prevFrame = RNA_int_get(op->ptr, "prev_frame");
+ pso->nextFrame = RNA_int_get(op->ptr, "next_frame");
/* check the settings from the context */
if (ELEM4(NULL, pso->ob, pso->arm, pso->ob->adt, pso->ob->adt->action))
return 0;
else
- act= pso->ob->adt->action;
+ act = pso->ob->adt->action;
/* for each Pose-Channel which gets affected, get the F-Curves for that channel
* and set the relevant transform flags...
@@ -155,7 +155,7 @@ static int pose_slide_init (bContext *C, wmOperator *op, short mode)
poseAnim_mapping_get(C, &pso->pfLinks, pso->ob, act);
/* set depsgraph flags */
- /* make sure the lock is set OK, unlock can be accidentally saved? */
+ /* make sure the lock is set OK, unlock can be accidentally saved? */
pso->ob->pose->flag |= POSE_LOCKED;
pso->ob->pose->flag &= ~POSE_DO_UNLOCK;
@@ -171,7 +171,7 @@ static int pose_slide_init (bContext *C, wmOperator *op, short mode)
/* exiting the operator - free data */
static void pose_slide_exit(wmOperator *op)
{
- tPoseSlideOp *pso= op->customdata;
+ tPoseSlideOp *pso = op->customdata;
/* if data exists, clear its data and exit */
if (pso) {
@@ -186,36 +186,36 @@ static void pose_slide_exit(wmOperator *op)
}
/* cleanup */
- op->customdata= NULL;
+ op->customdata = NULL;
}
/* ------------------------------------ */
/* helper for apply() / reset() - refresh the data */
-static void pose_slide_refresh (bContext *C, tPoseSlideOp *pso)
+static void pose_slide_refresh(bContext *C, tPoseSlideOp *pso)
{
/* wrapper around the generic version, allowing us to add some custom stuff later still */
poseAnim_mapping_refresh(C, pso->scene, pso->ob);
}
/* helper for apply() - perform sliding for some value */
-static void pose_slide_apply_val (tPoseSlideOp *pso, FCurve *fcu, float *val)
+static void pose_slide_apply_val(tPoseSlideOp *pso, FCurve *fcu, float *val)
{
float cframe = (float)pso->cframe;
float sVal, eVal;
float w1, w2;
/* get keyframe values for endpoint poses to blend with */
- /* previous/start */
- sVal= evaluate_fcurve(fcu, (float)pso->prevFrame);
- /* next/end */
- eVal= evaluate_fcurve(fcu, (float)pso->nextFrame);
+ /* previous/start */
+ sVal = evaluate_fcurve(fcu, (float)pso->prevFrame);
+ /* next/end */
+ eVal = evaluate_fcurve(fcu, (float)pso->nextFrame);
/* calculate the relative weights of the endpoints */
if (pso->mode == POSESLIDE_BREAKDOWN) {
/* get weights from the percentage control */
- w1= pso->percentage; /* this must come second */
- w2= 1.0f - w1; /* this must come first */
+ w1 = pso->percentage; /* this must come second */
+ w2 = 1.0f - w1; /* this must come first */
}
else {
/* - these weights are derived from the relative distance of these
@@ -228,8 +228,8 @@ static void pose_slide_apply_val (tPoseSlideOp *pso, FCurve *fcu, float *val)
w2 = (float)pso->nextFrame - cframe;
wtot = w1 + w2;
- w1 = (w1/wtot);
- w2 = (w2/wtot);
+ w1 = (w1 / wtot);
+ w2 = (w2 / wtot);
}
/* depending on the mode, calculate the new value
@@ -243,13 +243,13 @@ static void pose_slide_apply_val (tPoseSlideOp *pso, FCurve *fcu, float *val)
* - numerator should be larger than denominator to 'expand' the result
* - perform this weighting a number of times given by the percentage...
*/
- int iters= (int)ceil(10.0f*pso->percentage); // TODO: maybe a sensitivity ctrl on top of this is needed
+ int iters = (int)ceil(10.0f * pso->percentage); // TODO: maybe a sensitivity ctrl on top of this is needed
while (iters-- > 0) {
- (*val)= ( -((sVal * w2) + (eVal * w1)) + ((*val) * 6.0f) ) / 5.0f;
+ (*val) = (-((sVal * w2) + (eVal * w1)) + ((*val) * 6.0f) ) / 5.0f;
}
}
- break;
+ break;
case POSESLIDE_RELAX: /* make the current pose more like its surrounding ones */
{
@@ -257,36 +257,36 @@ static void pose_slide_apply_val (tPoseSlideOp *pso, FCurve *fcu, float *val)
* - numerator should be smaller than denominator to 'relax' the result
* - perform this weighting a number of times given by the percentage...
*/
- int iters= (int)ceil(10.0f*pso->percentage); // TODO: maybe a sensitivity ctrl on top of this is needed
+ int iters = (int)ceil(10.0f * pso->percentage); // TODO: maybe a sensitivity ctrl on top of this is needed
while (iters-- > 0) {
- (*val)= ( ((sVal * w2) + (eVal * w1)) + ((*val) * 5.0f) ) / 6.0f;
+ (*val) = ( ((sVal * w2) + (eVal * w1)) + ((*val) * 5.0f) ) / 6.0f;
}
}
- break;
+ break;
case POSESLIDE_BREAKDOWN: /* make the current pose slide around between the endpoints */
{
/* perform simple linear interpolation - coefficient for start must come from pso->percentage... */
// TODO: make this use some kind of spline interpolation instead?
- (*val)= ((sVal * w2) + (eVal * w1));
+ (*val) = ((sVal * w2) + (eVal * w1));
}
- break;
+ break;
}
}
/* helper for apply() - perform sliding for some 3-element vector */
-static void pose_slide_apply_vec3 (tPoseSlideOp *pso, tPChanFCurveLink *pfl, float vec[3], const char propName[])
+static void pose_slide_apply_vec3(tPoseSlideOp *pso, tPChanFCurveLink *pfl, float vec[3], const char propName[])
{
- LinkData *ld=NULL;
- char *path=NULL;
+ LinkData *ld = NULL;
+ char *path = NULL;
/* get the path to use... */
- path= BLI_sprintfN("%s.%s", pfl->pchan_path, propName);
+ path = BLI_sprintfN("%s.%s", pfl->pchan_path, propName);
/* using this path, find each matching F-Curve for the variables we're interested in */
- while ( (ld= poseAnim_mapping_getNextFCurve(&pfl->fcurves, ld, path)) ) {
- FCurve *fcu= (FCurve *)ld->data;
+ while ( (ld = poseAnim_mapping_getNextFCurve(&pfl->fcurves, ld, path)) ) {
+ FCurve *fcu = (FCurve *)ld->data;
/* just work on these channels one by one... there's no interaction between values */
pose_slide_apply_val(pso, fcu, &vec[fcu->array_index]);
@@ -297,7 +297,7 @@ static void pose_slide_apply_vec3 (tPoseSlideOp *pso, tPChanFCurveLink *pfl, flo
}
/* helper for apply() - perform sliding for custom properties */
-static void pose_slide_apply_props (tPoseSlideOp *pso, tPChanFCurveLink *pfl)
+static void pose_slide_apply_props(tPoseSlideOp *pso, tPChanFCurveLink *pfl)
{
PointerRNA ptr = {{NULL}};
LinkData *ld;
@@ -337,7 +337,7 @@ static void pose_slide_apply_props (tPoseSlideOp *pso, tPChanFCurveLink *pfl)
pose_slide_apply_val(pso, fcu, &tval);
RNA_property_float_set(&ptr, prop, tval);
}
- break;
+ break;
case PROP_BOOLEAN:
case PROP_ENUM:
case PROP_INT:
@@ -346,7 +346,7 @@ static void pose_slide_apply_props (tPoseSlideOp *pso, tPChanFCurveLink *pfl)
pose_slide_apply_val(pso, fcu, &tval);
RNA_property_int_set(&ptr, prop, (int)tval);
}
- break;
+ break;
default:
/* cannot handle */
//printf("Cannot Pose Slide non-numerical property\n");
@@ -358,37 +358,37 @@ static void pose_slide_apply_props (tPoseSlideOp *pso, tPChanFCurveLink *pfl)
}
/* helper for apply() - perform sliding for quaternion rotations (using quat blending) */
-static void pose_slide_apply_quat (tPoseSlideOp *pso, tPChanFCurveLink *pfl)
+static void pose_slide_apply_quat(tPoseSlideOp *pso, tPChanFCurveLink *pfl)
{
- FCurve *fcu_w=NULL, *fcu_x=NULL, *fcu_y=NULL, *fcu_z=NULL;
- bPoseChannel *pchan= pfl->pchan;
- LinkData *ld=NULL;
- char *path=NULL;
+ FCurve *fcu_w = NULL, *fcu_x = NULL, *fcu_y = NULL, *fcu_z = NULL;
+ bPoseChannel *pchan = pfl->pchan;
+ LinkData *ld = NULL;
+ char *path = NULL;
float cframe;
/* get the path to use - this should be quaternion rotations only (needs care) */
- path= BLI_sprintfN("%s.%s", pfl->pchan_path, "rotation_quaternion");
+ path = BLI_sprintfN("%s.%s", pfl->pchan_path, "rotation_quaternion");
/* get the current frame number */
- cframe= (float)pso->cframe;
+ cframe = (float)pso->cframe;
/* using this path, find each matching F-Curve for the variables we're interested in */
- while ( (ld= poseAnim_mapping_getNextFCurve(&pfl->fcurves, ld, path)) ) {
- FCurve *fcu= (FCurve *)ld->data;
+ while ( (ld = poseAnim_mapping_getNextFCurve(&pfl->fcurves, ld, path)) ) {
+ FCurve *fcu = (FCurve *)ld->data;
/* assign this F-Curve to one of the relevant pointers... */
switch (fcu->array_index) {
case 3: /* z */
- fcu_z= fcu;
+ fcu_z = fcu;
break;
case 2: /* y */
- fcu_y= fcu;
+ fcu_y = fcu;
break;
case 1: /* x */
- fcu_x= fcu;
+ fcu_x = fcu;
break;
case 0: /* w */
- fcu_w= fcu;
+ fcu_w = fcu;
break;
}
}
@@ -428,18 +428,18 @@ static void pose_slide_apply_quat (tPoseSlideOp *pso, tPChanFCurveLink *pfl)
}
else {
float quat_interp[4], quat_orig[4];
- int iters= (int)ceil(10.0f*pso->percentage); // TODO: maybe a sensitivity ctrl on top of this is needed
+ int iters = (int)ceil(10.0f * pso->percentage); // TODO: maybe a sensitivity ctrl on top of this is needed
/* perform this blending several times until a satisfactory result is reached */
while (iters-- > 0) {
/* calculate the interpolation between the endpoints */
- interp_qt_qtqt(quat_interp, quat_prev, quat_next, (cframe-pso->prevFrame) / (pso->nextFrame-pso->prevFrame) );
+ interp_qt_qtqt(quat_interp, quat_prev, quat_next, (cframe - pso->prevFrame) / (pso->nextFrame - pso->prevFrame));
/* make a copy of the original rotation */
copy_qt_qt(quat_orig, pchan->quat);
/* tricky interpolations - blending between original and new */
- interp_qt_qtqt(pchan->quat, quat_orig, quat_interp, 1.0f/6.0f);
+ interp_qt_qtqt(pchan->quat, quat_orig, quat_interp, 1.0f / 6.0f);
}
}
}
@@ -461,13 +461,13 @@ static void pose_slide_apply(bContext *C, tPoseSlideOp *pso)
}
/* for each link, handle each set of transforms */
- for (pfl= pso->pfLinks.first; pfl; pfl= pfl->next) {
+ for (pfl = pso->pfLinks.first; pfl; pfl = pfl->next) {
/* valid transforms for each PoseChannel should have been noted already
* - sliding the pose should be a straightforward exercise for location+rotation,
* but rotations get more complicated since we may want to use quaternion blending
* for quaternions instead...
*/
- bPoseChannel *pchan= pfl->pchan;
+ bPoseChannel *pchan = pfl->pchan;
if (pchan->flag & POSE_LOC) {
/* calculate these for the 'location' vector, and use location curves */
@@ -505,14 +505,14 @@ static void pose_slide_apply(bContext *C, tPoseSlideOp *pso)
}
/* perform autokeyframing after changes were made + confirmed */
-static void pose_slide_autoKeyframe (bContext *C, tPoseSlideOp *pso)
+static void pose_slide_autoKeyframe(bContext *C, tPoseSlideOp *pso)
{
/* wrapper around the generic call */
poseAnim_mapping_autoKeyframe(C, pso->scene, pso->ob, &pso->pfLinks, (float)pso->cframe);
}
/* reset changes made to current pose */
-static void pose_slide_reset (tPoseSlideOp *pso)
+static void pose_slide_reset(tPoseSlideOp *pso)
{
/* wrapper around the generic call, so that custom stuff can be added later */
poseAnim_mapping_reset(&pso->pfLinks);
@@ -521,7 +521,7 @@ static void pose_slide_reset (tPoseSlideOp *pso)
/* ------------------------------------ */
/* draw percentage indicator in header */
-static void pose_slide_draw_status (tPoseSlideOp *pso)
+static void pose_slide_draw_status(tPoseSlideOp *pso)
{
char status_str[32];
char mode_str[32];
@@ -543,24 +543,24 @@ static void pose_slide_draw_status (tPoseSlideOp *pso)
break;
}
- BLI_snprintf(status_str, sizeof(status_str), "%s: %d %%", mode_str, (int)(pso->percentage*100.0f));
+ BLI_snprintf(status_str, sizeof(status_str), "%s: %d %%", mode_str, (int)(pso->percentage * 100.0f));
ED_area_headerprint(pso->sa, status_str);
}
/* common code for invoke() methods */
-static int pose_slide_invoke_common (bContext *C, wmOperator *op, tPoseSlideOp *pso)
+static int pose_slide_invoke_common(bContext *C, wmOperator *op, tPoseSlideOp *pso)
{
tPChanFCurveLink *pfl;
- AnimData *adt= pso->ob->adt;
- wmWindow *win= CTX_wm_window(C);
+ AnimData *adt = pso->ob->adt;
+ wmWindow *win = CTX_wm_window(C);
/* for each link, add all its keyframes to the search tree */
- for (pfl= pso->pfLinks.first; pfl; pfl= pfl->next) {
+ for (pfl = pso->pfLinks.first; pfl; pfl = pfl->next) {
LinkData *ld;
/* do this for each F-Curve */
- for (ld= pfl->fcurves.first; ld; ld= ld->next) {
- FCurve *fcu= (FCurve *)ld->data;
+ for (ld = pfl->fcurves.first; ld; ld = ld->next) {
+ FCurve *fcu = (FCurve *)ld->data;
fcurve_to_keylist(adt, fcu, &pso->keys, NULL);
}
}
@@ -568,34 +568,34 @@ static int pose_slide_invoke_common (bContext *C, wmOperator *op, tPoseSlideOp *
/* consolidate these keyframes, and figure out the nearest ones */
BLI_dlrbTree_linkedlist_sync(&pso->keys);
- /* cancel if no keyframes found... */
+ /* cancel if no keyframes found... */
if (pso->keys.root) {
ActKeyColumn *ak;
- float cframe= (float)pso->cframe;
+ float cframe = (float)pso->cframe;
/* firstly, check if the current frame is a keyframe... */
- ak= (ActKeyColumn *)BLI_dlrbTree_search_exact(&pso->keys, compare_ak_cfraPtr, &cframe);
+ ak = (ActKeyColumn *)BLI_dlrbTree_search_exact(&pso->keys, compare_ak_cfraPtr, &cframe);
if (ak == NULL) {
/* current frame is not a keyframe, so search */
- ActKeyColumn *pk= (ActKeyColumn *)BLI_dlrbTree_search_prev(&pso->keys, compare_ak_cfraPtr, &cframe);
- ActKeyColumn *nk= (ActKeyColumn *)BLI_dlrbTree_search_next(&pso->keys, compare_ak_cfraPtr, &cframe);
+ ActKeyColumn *pk = (ActKeyColumn *)BLI_dlrbTree_search_prev(&pso->keys, compare_ak_cfraPtr, &cframe);
+ ActKeyColumn *nk = (ActKeyColumn *)BLI_dlrbTree_search_next(&pso->keys, compare_ak_cfraPtr, &cframe);
/* new set the frames */
- /* prev frame */
- pso->prevFrame= (pk)? (pk->cfra) : (pso->cframe - 1);
+ /* prev frame */
+ pso->prevFrame = (pk) ? (pk->cfra) : (pso->cframe - 1);
RNA_int_set(op->ptr, "prev_frame", pso->prevFrame);
- /* next frame */
- pso->nextFrame= (nk)? (nk->cfra) : (pso->cframe + 1);
+ /* next frame */
+ pso->nextFrame = (nk) ? (nk->cfra) : (pso->cframe + 1);
RNA_int_set(op->ptr, "next_frame", pso->nextFrame);
}
else {
/* current frame itself is a keyframe, so just take keyframes on either side */
- /* prev frame */
- pso->prevFrame= (ak->prev)? (ak->prev->cfra) : (pso->cframe - 1);
+ /* prev frame */
+ pso->prevFrame = (ak->prev) ? (ak->prev->cfra) : (pso->cframe - 1);
RNA_int_set(op->ptr, "prev_frame", pso->prevFrame);
- /* next frame */
- pso->nextFrame= (ak->next)? (ak->next->cfra) : (pso->cframe + 1);
+ /* next frame */
+ pso->nextFrame = (ak->next) ? (ak->next->cfra) : (pso->cframe + 1);
RNA_int_set(op->ptr, "next_frame", pso->nextFrame);
}
}
@@ -624,13 +624,13 @@ static int pose_slide_invoke_common (bContext *C, wmOperator *op, tPoseSlideOp *
}
/* common code for modal() */
-static int pose_slide_modal (bContext *C, wmOperator *op, wmEvent *evt)
+static int pose_slide_modal(bContext *C, wmOperator *op, wmEvent *evt)
{
- tPoseSlideOp *pso= op->customdata;
- wmWindow *win= CTX_wm_window(C);
+ tPoseSlideOp *pso = op->customdata;
+ wmWindow *win = CTX_wm_window(C);
switch (evt->type) {
- case LEFTMOUSE: /* confirm */
+ case LEFTMOUSE: /* confirm */
{
/* return to normal cursor and header status */
ED_area_headerprint(pso->sa, NULL);
@@ -644,7 +644,7 @@ static int pose_slide_modal (bContext *C, wmOperator *op, wmEvent *evt)
return OPERATOR_FINISHED;
}
- case ESCKEY: /* cancel */
+ case ESCKEY: /* cancel */
case RIGHTMOUSE:
{
/* return to normal cursor and header status */
@@ -669,7 +669,7 @@ static int pose_slide_modal (bContext *C, wmOperator *op, wmEvent *evt)
/* calculate percentage based on position of mouse (we only use x-axis for now.
* since this is more convenient for users to do), and store new percentage value
*/
- pso->percentage= (evt->x - pso->ar->winrct.xmin) / ((float)pso->ar->winx);
+ pso->percentage = (evt->x - pso->ar->winrct.xmin) / ((float)pso->ar->winx);
RNA_float_set(op->ptr, "percentage", pso->percentage);
/* update percentage indicator in header */
@@ -681,11 +681,11 @@ static int pose_slide_modal (bContext *C, wmOperator *op, wmEvent *evt)
/* apply... */
pose_slide_apply(C, pso);
}
- break;
+ break;
default: /* unhandled event (maybe it was some view manip? */
/* allow to pass through */
- return OPERATOR_RUNNING_MODAL|OPERATOR_PASS_THROUGH;
+ return OPERATOR_RUNNING_MODAL | OPERATOR_PASS_THROUGH;
}
/* still running... */
@@ -693,7 +693,7 @@ static int pose_slide_modal (bContext *C, wmOperator *op, wmEvent *evt)
}
/* common code for cancel() */
-static int pose_slide_cancel (bContext *UNUSED(C), wmOperator *op)
+static int pose_slide_cancel(bContext *UNUSED(C), wmOperator *op)
{
/* cleanup and done */
pose_slide_exit(op);
@@ -701,7 +701,7 @@ static int pose_slide_cancel (bContext *UNUSED(C), wmOperator *op)
}
/* common code for exec() methods */
-static int pose_slide_exec_common (bContext *C, wmOperator *op, tPoseSlideOp *pso)
+static int pose_slide_exec_common(bContext *C, wmOperator *op, tPoseSlideOp *pso)
{
/* settings should have been set up ok for applying, so just apply! */
pose_slide_apply(C, pso);
@@ -716,7 +716,7 @@ static int pose_slide_exec_common (bContext *C, wmOperator *op, tPoseSlideOp *ps
}
/* common code for defining RNA properties */
-static void pose_slide_opdef_properties (wmOperatorType *ot)
+static void pose_slide_opdef_properties(wmOperatorType *ot)
{
RNA_def_int(ot->srna, "prev_frame", 0, MINAFRAME, MAXFRAME, "Previous Keyframe", "Frame number of keyframe immediately before the current frame", 0, 50);
RNA_def_int(ot->srna, "next_frame", 0, MINAFRAME, MAXFRAME, "Next Keyframe", "Frame number of keyframe immediately after the current frame", 0, 50);
@@ -726,7 +726,7 @@ static void pose_slide_opdef_properties (wmOperatorType *ot)
/* ------------------------------------ */
/* invoke() - for 'push' mode */
-static int pose_slide_push_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(evt))
+static int pose_slide_push_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(evt))
{
tPoseSlideOp *pso;
@@ -736,14 +736,14 @@ static int pose_slide_push_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(
return OPERATOR_CANCELLED;
}
else
- pso= op->customdata;
+ pso = op->customdata;
/* do common setup work */
return pose_slide_invoke_common(C, op, pso);
}
/* exec() - for push */
-static int pose_slide_push_exec (bContext *C, wmOperator *op)
+static int pose_slide_push_exec(bContext *C, wmOperator *op)
{
tPoseSlideOp *pso;
@@ -753,13 +753,13 @@ static int pose_slide_push_exec (bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
else
- pso= op->customdata;
+ pso = op->customdata;
/* do common exec work */
return pose_slide_exec_common(C, op, pso);
}
-void POSE_OT_push (wmOperatorType *ot)
+void POSE_OT_push(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Push Pose";
@@ -774,7 +774,7 @@ void POSE_OT_push (wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING;
/* Properties */
pose_slide_opdef_properties(ot);
@@ -783,7 +783,7 @@ void POSE_OT_push (wmOperatorType *ot)
/* ........................ */
/* invoke() - for 'relax' mode */
-static int pose_slide_relax_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(evt))
+static int pose_slide_relax_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(evt))
{
tPoseSlideOp *pso;
@@ -793,14 +793,14 @@ static int pose_slide_relax_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED
return OPERATOR_CANCELLED;
}
else
- pso= op->customdata;
+ pso = op->customdata;
/* do common setup work */
return pose_slide_invoke_common(C, op, pso);
}
/* exec() - for relax */
-static int pose_slide_relax_exec (bContext *C, wmOperator *op)
+static int pose_slide_relax_exec(bContext *C, wmOperator *op)
{
tPoseSlideOp *pso;
@@ -810,13 +810,13 @@ static int pose_slide_relax_exec (bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
else
- pso= op->customdata;
+ pso = op->customdata;
/* do common exec work */
return pose_slide_exec_common(C, op, pso);
}
-void POSE_OT_relax (wmOperatorType *ot)
+void POSE_OT_relax(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Relax Pose";
@@ -831,7 +831,7 @@ void POSE_OT_relax (wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING;
/* Properties */
pose_slide_opdef_properties(ot);
@@ -840,7 +840,7 @@ void POSE_OT_relax (wmOperatorType *ot)
/* ........................ */
/* invoke() - for 'breakdown' mode */
-static int pose_slide_breakdown_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(evt))
+static int pose_slide_breakdown_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(evt))
{
tPoseSlideOp *pso;
@@ -850,14 +850,14 @@ static int pose_slide_breakdown_invoke (bContext *C, wmOperator *op, wmEvent *UN
return OPERATOR_CANCELLED;
}
else
- pso= op->customdata;
+ pso = op->customdata;
/* do common setup work */
return pose_slide_invoke_common(C, op, pso);
}
/* exec() - for breakdown */
-static int pose_slide_breakdown_exec (bContext *C, wmOperator *op)
+static int pose_slide_breakdown_exec(bContext *C, wmOperator *op)
{
tPoseSlideOp *pso;
@@ -867,13 +867,13 @@ static int pose_slide_breakdown_exec (bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
else
- pso= op->customdata;
+ pso = op->customdata;
/* do common exec work */
return pose_slide_exec_common(C, op, pso);
}
-void POSE_OT_breakdown (wmOperatorType *ot)
+void POSE_OT_breakdown(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Pose Breakdowner";
@@ -888,7 +888,7 @@ void POSE_OT_breakdown (wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING;
/* Properties */
pose_slide_opdef_properties(ot);
@@ -899,18 +899,18 @@ void POSE_OT_breakdown (wmOperatorType *ot)
/* "termination conditions" - i.e. when we stop */
typedef enum ePosePropagate_Termination {
- /* stop after the current hold ends */
+ /* stop after the current hold ends */
POSE_PROPAGATE_SMART_HOLDS = 0,
- /* only do on the last keyframe */
+ /* only do on the last keyframe */
POSE_PROPAGATE_LAST_KEY,
- /* stop after the next keyframe */
+ /* stop after the next keyframe */
POSE_PROPAGATE_NEXT_KEY,
- /* stop after the specified frame */
+ /* stop after the specified frame */
POSE_PROPAGATE_BEFORE_FRAME,
- /* stop when we run out of keyframes */
+ /* stop when we run out of keyframes */
POSE_PROPAGATE_BEFORE_END,
- /* only do on the frames where markers are selected */
+ /* only do on the frames where markers are selected */
POSE_PROPAGATE_SELECTED_MARKERS
} ePosePropagate_Termination;
@@ -927,15 +927,15 @@ typedef union tPosePropagate_ModeData {
/* get frame on which the "hold" for the bone ends
* XXX: this may not really work that well if a bone moves on some channels and not others
- * if this happens to be a major issue, scrap this, and just make this happen
+ * if this happens to be a major issue, scrap this, and just make this happen
* independently per F-Curve
*/
-static float pose_propagate_get_boneHoldEndFrame (Object *ob, tPChanFCurveLink *pfl, float startFrame)
+static float pose_propagate_get_boneHoldEndFrame(Object *ob, tPChanFCurveLink *pfl, float startFrame)
{
DLRBT_Tree keys, blocks;
ActKeyBlock *ab;
- AnimData *adt= ob->adt;
+ AnimData *adt = ob->adt;
LinkData *ld;
float endFrame = startFrame;
@@ -958,8 +958,8 @@ static float pose_propagate_get_boneHoldEndFrame (Object *ob, tPChanFCurveLink *
if (actkeyblock_is_valid(ab, &keys) == 0) {
/* There are only two cases for no-exact match:
- * 1) the current frame is just before another key but not on a key itself
- * 2) the current frame is on a key, but that key doesn't link to the next
+ * 1) the current frame is just before another key but not on a key itself
+ * 2) the current frame is on a key, but that key doesn't link to the next
*
* If we've got the first case, then we can search for another block,
* otherwise forget it, as we'd be overwriting some valid data.
@@ -1025,11 +1025,11 @@ static float pose_propagate_get_boneHoldEndFrame (Object *ob, tPChanFCurveLink *
}
/* get reference value from F-Curve using RNA */
-static short pose_propagate_get_refVal (Object *ob, FCurve *fcu, float *value)
+static short pose_propagate_get_refVal(Object *ob, FCurve *fcu, float *value)
{
PointerRNA id_ptr, ptr;
PropertyRNA *prop;
- short found= FALSE;
+ short found = FALSE;
/* base pointer is always the object -> id_ptr */
RNA_id_pointer_create(&ob->id, &id_ptr);
@@ -1039,41 +1039,41 @@ static short pose_propagate_get_refVal (Object *ob, FCurve *fcu, float *value)
if (RNA_property_array_check(prop)) {
/* array */
if (fcu->array_index < RNA_property_array_length(&ptr, prop)) {
- found= TRUE;
+ found = TRUE;
switch (RNA_property_type(prop)) {
case PROP_BOOLEAN:
- *value= (float)RNA_property_boolean_get_index(&ptr, prop, fcu->array_index);
+ *value = (float)RNA_property_boolean_get_index(&ptr, prop, fcu->array_index);
break;
case PROP_INT:
- *value= (float)RNA_property_int_get_index(&ptr, prop, fcu->array_index);
+ *value = (float)RNA_property_int_get_index(&ptr, prop, fcu->array_index);
break;
case PROP_FLOAT:
- *value= RNA_property_float_get_index(&ptr, prop, fcu->array_index);
+ *value = RNA_property_float_get_index(&ptr, prop, fcu->array_index);
break;
default:
- found= FALSE;
+ found = FALSE;
break;
}
}
}
else {
/* not an array */
- found= TRUE;
+ found = TRUE;
switch (RNA_property_type(prop)) {
case PROP_BOOLEAN:
- *value= (float)RNA_property_boolean_get(&ptr, prop);
+ *value = (float)RNA_property_boolean_get(&ptr, prop);
break;
case PROP_INT:
- *value= (float)RNA_property_int_get(&ptr, prop);
+ *value = (float)RNA_property_int_get(&ptr, prop);
break;
case PROP_ENUM:
- *value= (float)RNA_property_enum_get(&ptr, prop);
+ *value = (float)RNA_property_enum_get(&ptr, prop);
break;
case PROP_FLOAT:
- *value= RNA_property_float_get(&ptr, prop);
+ *value = RNA_property_float_get(&ptr, prop);
break;
default:
- found= FALSE;
+ found = FALSE;
break;
}
}
@@ -1083,8 +1083,8 @@ static short pose_propagate_get_refVal (Object *ob, FCurve *fcu, float *value)
}
/* propagate just works along each F-Curve in turn */
-static void pose_propagate_fcurve (wmOperator *op, Object *ob, FCurve *fcu,
- float startFrame, tPosePropagate_ModeData modeData)
+static void pose_propagate_fcurve(wmOperator *op, Object *ob, FCurve *fcu,
+ float startFrame, tPosePropagate_ModeData modeData)
{
const int mode = RNA_enum_get(op->ptr, "mode");
@@ -1092,7 +1092,7 @@ static void pose_propagate_fcurve (wmOperator *op, Object *ob, FCurve *fcu,
float refVal = 0.0f;
short keyExists;
int i, match;
- short first=1;
+ short first = 1;
/* skip if no keyframes to edit */
if ((fcu->bezt == NULL) || (fcu->totvert < 2))
@@ -1102,13 +1102,13 @@ static void pose_propagate_fcurve (wmOperator *op, Object *ob, FCurve *fcu,
* doesn't need to firstly keyframe the pose (though this doesn't mean that
* they can't either)
*/
- if ( !pose_propagate_get_refVal(ob, fcu, &refVal))
+ if (!pose_propagate_get_refVal(ob, fcu, &refVal))
return;
/* find the first keyframe to start propagating from
* - if there's a keyframe on the current frame, we probably want to save this value there too
* since it may be as of yet unkeyed
- * - if starting before the starting frame, don't touch the key, as it may have had some valid
+ * - if starting before the starting frame, don't touch the key, as it may have had some valid
* values
*/
match = binarysearch_bezt_index(fcu->bezt, startFrame, fcu->totvert, &keyExists);
@@ -1132,7 +1132,7 @@ static void pose_propagate_fcurve (wmOperator *op, Object *ob, FCurve *fcu,
}
else if (mode == POSE_PROPAGATE_LAST_KEY) {
/* only affect this frame if it will be the last one */
- if (i != (fcu->totvert-1))
+ if (i != (fcu->totvert - 1))
continue;
}
else if (mode == POSE_PROPAGATE_SELECTED_MARKERS) {
@@ -1162,11 +1162,11 @@ static void pose_propagate_fcurve (wmOperator *op, Object *ob, FCurve *fcu,
/* --------------------------------- */
-static int pose_propagate_exec (bContext *C, wmOperator *op)
+static int pose_propagate_exec(bContext *C, wmOperator *op)
{
Scene *scene = CTX_data_scene(C);
- Object *ob= object_pose_armature_get(CTX_data_active_object(C));
- bAction *act= (ob && ob->adt)? ob->adt->action : NULL;
+ Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
+ bAction *act = (ob && ob->adt) ? ob->adt->action : NULL;
ListBase pflinks = {NULL, NULL};
tPChanFCurveLink *pfl;
@@ -1210,7 +1210,7 @@ static int pose_propagate_exec (bContext *C, wmOperator *op)
}
/* go through propagating pose to keyframes, curve by curve */
- for (ld = pfl->fcurves.first; ld; ld= ld->next)
+ for (ld = pfl->fcurves.first; ld; ld = ld->next)
pose_propagate_fcurve(op, ob, (FCurve *)ld->data, (float)CFRA, modeData);
}
@@ -1228,9 +1228,9 @@ static int pose_propagate_exec (bContext *C, wmOperator *op)
/* --------------------------------- */
-void POSE_OT_propagate (wmOperatorType *ot)
+void POSE_OT_propagate(wmOperatorType *ot)
{
- static EnumPropertyItem terminate_items[]= {
+ static EnumPropertyItem terminate_items[] = {
{POSE_PROPAGATE_SMART_HOLDS, "WHILE_HELD", 0, "While Held", "Propagate pose to all keyframes after current frame that don't change (Default behavior)"},
{POSE_PROPAGATE_NEXT_KEY, "NEXT_KEY", 0, "To Next Keyframe", "Propagate pose to first keyframe following the current frame only"},
{POSE_PROPAGATE_LAST_KEY, "LAST_KEY", 0, "To Last Keyframe", "Propagate pose to the last keyframe only (i.e. making action cyclic)"},
@@ -1249,7 +1249,7 @@ void POSE_OT_propagate (wmOperatorType *ot)
ot->poll = ED_operator_posemode; // XXX: needs selected bones!
/* flag */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
// TODO: add "fade out" control for tapering off amount of propagation as time goes by?
diff --git a/source/blender/editors/armature/poseUtils.c b/source/blender/editors/armature/poseUtils.c
index 1a9ff73e5dc..4e0398168d3 100644
--- a/source/blender/editors/armature/poseUtils.c
+++ b/source/blender/editors/armature/poseUtils.c
@@ -79,25 +79,25 @@
/* FCurves <-> PoseChannels Links */
/* helper for poseAnim_mapping_get() -> get the relevant F-Curves per PoseChannel */
-static void fcurves_to_pchan_links_get (ListBase *pfLinks, Object *ob, bAction *act, bPoseChannel *pchan)
+static void fcurves_to_pchan_links_get(ListBase *pfLinks, Object *ob, bAction *act, bPoseChannel *pchan)
{
ListBase curves = {NULL, NULL};
int transFlags = action_get_item_transforms(act, ob, pchan, &curves);
- pchan->flag &= ~(POSE_LOC|POSE_ROT|POSE_SIZE);
+ pchan->flag &= ~(POSE_LOC | POSE_ROT | POSE_SIZE);
/* check if any transforms found... */
if (transFlags) {
/* make new linkage data */
- tPChanFCurveLink *pfl= MEM_callocN(sizeof(tPChanFCurveLink), "tPChanFCurveLink");
+ tPChanFCurveLink *pfl = MEM_callocN(sizeof(tPChanFCurveLink), "tPChanFCurveLink");
PointerRNA ptr;
- pfl->fcurves= curves;
- pfl->pchan= pchan;
+ pfl->fcurves = curves;
+ pfl->pchan = pchan;
/* get the RNA path to this pchan - this needs to be freed! */
RNA_pointer_create((ID *)ob, &RNA_PoseBone, pchan, &ptr);
- pfl->pchan_path= RNA_path_from_ID_to_struct(&ptr);
+ pfl->pchan_path = RNA_path_from_ID_to_struct(&ptr);
/* add linkage data to operator data */
BLI_addtail(pfLinks, pfl);
@@ -126,12 +126,12 @@ static void fcurves_to_pchan_links_get (ListBase *pfLinks, Object *ob, bAction *
/* get sets of F-Curves providing transforms for the bones in the Pose */
-void poseAnim_mapping_get (bContext *C, ListBase *pfLinks, Object *ob, bAction *act)
+void poseAnim_mapping_get(bContext *C, ListBase *pfLinks, Object *ob, bAction *act)
{
/* for each Pose-Channel which gets affected, get the F-Curves for that channel
* and set the relevant transform flags...
*/
- CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones)
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones)
{
fcurves_to_pchan_links_get(pfLinks, ob, act, pchan);
}
@@ -141,7 +141,7 @@ void poseAnim_mapping_get (bContext *C, ListBase *pfLinks, Object *ob, bAction *
* i.e. if nothing selected, do whole pose
*/
if (pfLinks->first == NULL) {
- CTX_DATA_BEGIN(C, bPoseChannel*, pchan, visible_pose_bones)
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, visible_pose_bones)
{
fcurves_to_pchan_links_get(pfLinks, ob, act, pchan);
}
@@ -150,13 +150,13 @@ void poseAnim_mapping_get (bContext *C, ListBase *pfLinks, Object *ob, bAction *
}
/* free F-Curve <-> PoseChannel links */
-void poseAnim_mapping_free (ListBase *pfLinks)
+void poseAnim_mapping_free(ListBase *pfLinks)
{
- tPChanFCurveLink *pfl, *pfln=NULL;
+ tPChanFCurveLink *pfl, *pfln = NULL;
/* free the temp pchan links and their data */
- for (pfl= pfLinks->first; pfl; pfl= pfln) {
- pfln= pfl->next;
+ for (pfl = pfLinks->first; pfl; pfl = pfln) {
+ pfln = pfl->next;
/* free custom properties */
if (pfl->oldprops) {
@@ -178,31 +178,31 @@ void poseAnim_mapping_free (ListBase *pfLinks)
/* ------------------------- */
/* helper for apply() / reset() - refresh the data */
-void poseAnim_mapping_refresh (bContext *C, Scene *scene, Object *ob)
+void poseAnim_mapping_refresh(bContext *C, Scene *scene, Object *ob)
{
- bArmature *arm= (bArmature *)ob->data;
+ bArmature *arm = (bArmature *)ob->data;
/* old optimize trick... this enforces to bypass the depgraph
* - note: code copied from transform_generics.c -> recalcData()
*/
// FIXME: shouldn't this use the builtin stuff?
- if ((arm->flag & ARM_DELAYDEFORM)==0)
+ if ((arm->flag & ARM_DELAYDEFORM) == 0)
DAG_id_tag_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */
else
- where_is_pose(scene, ob);
+ BKE_pose_where_is(scene, ob);
/* note, notifier might evolve */
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
}
/* reset changes made to current pose */
-void poseAnim_mapping_reset (ListBase *pfLinks)
+void poseAnim_mapping_reset(ListBase *pfLinks)
{
tPChanFCurveLink *pfl;
/* iterate over each pose-channel affected, restoring all channels to their original values */
- for (pfl= pfLinks->first; pfl; pfl= pfl->next) {
- bPoseChannel *pchan= pfl->pchan;
+ for (pfl = pfLinks->first; pfl; pfl = pfl->next) {
+ bPoseChannel *pchan = pfl->pchan;
/* just copy all the values over regardless of whether they changed or not */
copy_v3_v3(pchan->loc, pfl->oldloc);
@@ -219,7 +219,7 @@ void poseAnim_mapping_reset (ListBase *pfLinks)
}
/* perform autokeyframing after changes were made + confirmed */
-void poseAnim_mapping_autoKeyframe (bContext *C, Scene *scene, Object *ob, ListBase *pfLinks, float cframe)
+void poseAnim_mapping_autoKeyframe(bContext *C, Scene *scene, Object *ob, ListBase *pfLinks, float cframe)
{
/* insert keyframes as necessary if autokeyframing */
if (autokeyframe_cfra_can_key(scene, &ob->id)) {
@@ -231,8 +231,8 @@ void poseAnim_mapping_autoKeyframe (bContext *C, Scene *scene, Object *ob, ListB
/* XXX: here we already have the information about what transforms exist, though
* it might be easier to just overwrite all using normal mechanisms
*/
- for (pfl= pfLinks->first; pfl; pfl= pfl->next) {
- bPoseChannel *pchan= pfl->pchan;
+ for (pfl = pfLinks->first; pfl; pfl = pfl->next) {
+ bPoseChannel *pchan = pfl->pchan;
/* add datasource override for the PoseChannel, to be used later */
ANIM_relative_keyingset_add_source(&dsources, &ob->id, &RNA_PoseBone, pchan);
@@ -262,14 +262,14 @@ void poseAnim_mapping_autoKeyframe (bContext *C, Scene *scene, Object *ob, ListB
/* find the next F-Curve for a PoseChannel with matching path...
* - path is not just the pfl rna_path, since that path doesn't have property info yet
*/
-LinkData *poseAnim_mapping_getNextFCurve (ListBase *fcuLinks, LinkData *prev, const char *path)
+LinkData *poseAnim_mapping_getNextFCurve(ListBase *fcuLinks, LinkData *prev, const char *path)
{
- LinkData *first= (prev)? prev->next : (fcuLinks)? fcuLinks->first : NULL;
+ LinkData *first = (prev) ? prev->next : (fcuLinks) ? fcuLinks->first : NULL;
LinkData *ld;
/* check each link to see if the linked F-Curve has a matching path */
- for (ld= first; ld; ld= ld->next) {
- FCurve *fcu= (FCurve *)ld->data;
+ for (ld = first; ld; ld = ld->next) {
+ FCurve *fcu = (FCurve *)ld->data;
/* check if paths match */
if (strcmp(path, fcu->rna_path) == 0)
diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c
index 381423182f9..36c15c50809 100644
--- a/source/blender/editors/armature/poselib.c
+++ b/source/blender/editors/armature/poselib.c
@@ -89,9 +89,9 @@ static void action_set_activemarker(void *UNUSED(a), void *UNUSED(b), void *UNUS
/* == POSE-LIBRARY TOOL FOR BLENDER ==
*
* Overview:
- * This tool allows animators to store a set of frequently used poses to dump into
- * the active action to help in "budget" productions to quickly block out new actions.
- * It acts as a kind of "glorified clipboard for poses", allowing for naming of poses.
+ * This tool allows animators to store a set of frequently used poses to dump into
+ * the active action to help in "budget" productions to quickly block out new actions.
+ * It acts as a kind of "glorified clipboard for poses", allowing for naming of poses.
*
* Features:
* - PoseLibs are simply normal Actions
@@ -108,10 +108,10 @@ static void action_set_activemarker(void *UNUSED(a), void *UNUSED(b), void *UNUS
/* gets the first available frame in poselib to store a pose on
* - frames start from 1, and a pose should occur on every frame... 0 is error!
*/
-static int poselib_get_free_index (bAction *act)
+static int poselib_get_free_index(bAction *act)
{
TimeMarker *marker;
- int low=0, high=0;
+ int low = 0, high = 0;
short changed = 0;
/* sanity checks */
@@ -124,7 +124,7 @@ static int poselib_get_free_index (bAction *act)
do {
changed = 0;
- for (marker= act->markers.first; marker; marker= marker->next) {
+ for (marker = act->markers.first; marker; marker = marker->next) {
/* only increase low if value is 1 greater than low, to find "gaps" where
* poses were removed from the poselib
*/
@@ -135,7 +135,7 @@ static int poselib_get_free_index (bAction *act)
/* value replaces high if it is the highest value encountered yet */
if (marker->frame > high) {
- high= marker->frame;
+ high = marker->frame;
changed = 1;
}
}
@@ -151,17 +151,17 @@ static int poselib_get_free_index (bAction *act)
}
/* returns the active pose for a poselib */
-static TimeMarker *poselib_get_active_pose (bAction *act)
+static TimeMarker *poselib_get_active_pose(bAction *act)
{
if ((act) && (act->active_marker))
- return BLI_findlink(&act->markers, act->active_marker-1);
+ return BLI_findlink(&act->markers, act->active_marker - 1);
else
return NULL;
}
/* Get object that Pose Lib should be found on */
- /* XXX C can be zero */
-static Object *get_poselib_object (bContext *C)
+/* XXX C can be zero */
+static Object *get_poselib_object(bContext *C)
{
ScrArea *sa;
@@ -174,11 +174,11 @@ static Object *get_poselib_object (bContext *C)
if (sa && (sa->spacetype == SPACE_BUTS))
return ED_object_context(C);
else
- return object_pose_armature_get(CTX_data_active_object(C));
+ return BKE_object_pose_armature_get(CTX_data_active_object(C));
}
/* Poll callback for operators that require existing PoseLib data (with poses) to work */
-static int has_poselib_pose_data_poll (bContext *C)
+static int has_poselib_pose_data_poll(bContext *C)
{
Object *ob = get_poselib_object(C);
return (ob && ob->poselib);
@@ -187,7 +187,7 @@ static int has_poselib_pose_data_poll (bContext *C)
/* ----------------------------------- */
/* Initialize a new poselib (whether it is needed or not) */
-static bAction *poselib_init_new (Object *ob)
+static bAction *poselib_init_new(Object *ob)
{
/* sanity checks - only for armatures */
if (ELEM(NULL, ob, ob->pose))
@@ -196,13 +196,13 @@ static bAction *poselib_init_new (Object *ob)
/* init object's poselib action (unlink old one if there) */
if (ob->poselib)
id_us_min(&ob->poselib->id);
- ob->poselib= add_empty_action("PoseLib");
+ ob->poselib = add_empty_action("PoseLib");
return ob->poselib;
}
/* Initialize a new poselib (checks if that needs to happen) */
-static bAction *poselib_validate (Object *ob)
+static bAction *poselib_validate(Object *ob)
{
if (ELEM(NULL, ob, ob->pose))
return NULL;
@@ -215,7 +215,7 @@ static bAction *poselib_validate (Object *ob)
/* ************************************************************* */
/* Pose Lib UI Operators */
-static int poselib_new_exec (bContext *C, wmOperator *UNUSED(op))
+static int poselib_new_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *ob = get_poselib_object(C);
@@ -227,12 +227,12 @@ static int poselib_new_exec (bContext *C, wmOperator *UNUSED(op))
poselib_init_new(ob);
/* notifier here might evolve? */
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, NULL);
return OPERATOR_FINISHED;
}
-void POSELIB_OT_new (wmOperatorType *ot)
+void POSELIB_OT_new(wmOperatorType *ot)
{
/* identifiers */
ot->name = "New Pose Library";
@@ -244,12 +244,12 @@ void POSELIB_OT_new (wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ------------------------------------------------ */
-static int poselib_unlink_exec (bContext *C, wmOperator *UNUSED(op))
+static int poselib_unlink_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *ob = get_poselib_object(C);
@@ -262,12 +262,12 @@ static int poselib_unlink_exec (bContext *C, wmOperator *UNUSED(op))
ob->poselib = NULL;
/* notifier here might evolve? */
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, NULL);
return OPERATOR_FINISHED;
}
-void POSELIB_OT_unlink (wmOperatorType *ot)
+void POSELIB_OT_unlink(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Unlink Pose Library";
@@ -279,7 +279,7 @@ void POSELIB_OT_unlink (wmOperatorType *ot)
ot->poll = has_poselib_pose_data_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ************************************************************* */
@@ -288,10 +288,10 @@ void POSELIB_OT_unlink (wmOperatorType *ot)
/* This tool automagically generates/validates poselib data so that it corresponds to the data
* in the action. This is for use in making existing actions usable as poselibs.
*/
-static int poselib_sanitise_exec (bContext *C, wmOperator *op)
+static int poselib_sanitise_exec(bContext *C, wmOperator *op)
{
Object *ob = get_poselib_object(C);
- bAction *act = (ob)? ob->poselib : NULL;
+ bAction *act = (ob) ? ob->poselib : NULL;
DLRBT_Tree keys;
ActKeyColumn *ak;
TimeMarker *marker, *markern;
@@ -304,14 +304,14 @@ static int poselib_sanitise_exec (bContext *C, wmOperator *op)
/* determine which frames have keys */
BLI_dlrbTree_init(&keys);
- action_to_keylist(NULL, act, &keys, NULL);
+ action_to_keylist(NULL, act, &keys, NULL);
BLI_dlrbTree_linkedlist_sync(&keys);
/* for each key, make sure there is a corresponding pose */
- for (ak= keys.first; ak; ak= ak->next) {
+ for (ak = keys.first; ak; ak = ak->next) {
/* check if any pose matches this */
// TODO: don't go looking through the list like this every time...
- for (marker= act->markers.first; marker; marker= marker->next) {
+ for (marker = act->markers.first; marker; marker = marker->next) {
if (IS_EQ(marker->frame, (double)ak->cfra)) {
marker->flag = -1;
break;
@@ -321,20 +321,20 @@ static int poselib_sanitise_exec (bContext *C, wmOperator *op)
/* add new if none found */
if (marker == NULL) {
/* add pose to poselib */
- marker= MEM_callocN(sizeof(TimeMarker), "ActionMarker");
+ marker = MEM_callocN(sizeof(TimeMarker), "ActionMarker");
BLI_strncpy(marker->name, "Pose", sizeof(marker->name));
- marker->frame= (int)ak->cfra;
- marker->flag= -1;
+ marker->frame = (int)ak->cfra;
+ marker->flag = -1;
BLI_addtail(&act->markers, marker);
}
}
/* remove all untagged poses (unused), and remove all tags */
- for (marker= act->markers.first; marker; marker= markern) {
- markern= marker->next;
+ for (marker = act->markers.first; marker; marker = markern) {
+ markern = marker->next;
if (marker->flag != -1)
BLI_freelinkN(&act->markers, marker);
@@ -348,12 +348,12 @@ static int poselib_sanitise_exec (bContext *C, wmOperator *op)
/* send notifiers for this - using keyframe editing notifiers, since action
* may be being shown in anim editors as active action
*/
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
-void POSELIB_OT_action_sanitise (wmOperatorType *ot)
+void POSELIB_OT_action_sanitise(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Sanitise Pose Library Action";
@@ -365,15 +365,15 @@ void POSELIB_OT_action_sanitise (wmOperatorType *ot)
ot->poll = has_poselib_pose_data_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ------------------------------------------ */
-static void poselib_add_menu_invoke__replacemenu (bContext *C, uiLayout *layout, void *UNUSED(arg))
+static void poselib_add_menu_invoke__replacemenu(bContext *C, uiLayout *layout, void *UNUSED(arg))
{
- Object *ob= get_poselib_object(C);
- bAction *act= ob->poselib; /* never NULL */
+ Object *ob = get_poselib_object(C);
+ bAction *act = ob->poselib; /* never NULL */
TimeMarker *marker;
wmOperatorType *ot = WM_operatortype_find("POSELIB_OT_pose_add", 1);
@@ -384,7 +384,7 @@ static void poselib_add_menu_invoke__replacemenu (bContext *C, uiLayout *layout,
uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT);
/* add each marker to this menu */
- for (marker= act->markers.first; marker; marker= marker->next) {
+ for (marker = act->markers.first; marker; marker = marker->next) {
PointerRNA props_ptr;
props_ptr = uiItemFullO_ptr(layout, ot,
@@ -396,11 +396,11 @@ static void poselib_add_menu_invoke__replacemenu (bContext *C, uiLayout *layout,
}
}
-static int poselib_add_menu_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(evt))
+static int poselib_add_menu_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(evt))
{
- Scene *scene= CTX_data_scene(C);
- Object *ob= get_poselib_object(C);
- bPose *pose= (ob) ? ob->pose : NULL;
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = get_poselib_object(C);
+ bPose *pose = (ob) ? ob->pose : NULL;
uiPopupMenu *pup;
uiLayout *layout;
@@ -409,8 +409,8 @@ static int poselib_add_menu_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED
return OPERATOR_CANCELLED;
/* start building */
- pup= uiPupMenuBegin(C, op->type->name, ICON_NONE);
- layout= uiPupMenuLayout(pup);
+ pup = uiPupMenuBegin(C, op->type->name, ICON_NONE);
+ layout = uiPupMenuLayout(pup);
uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT);
/* add new (adds to the first unoccupied frame) */
@@ -432,14 +432,14 @@ static int poselib_add_menu_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED
}
-static int poselib_add_exec (bContext *C, wmOperator *op)
+static int poselib_add_exec(bContext *C, wmOperator *op)
{
- Object *ob= get_poselib_object(C);
+ Object *ob = get_poselib_object(C);
bAction *act = poselib_validate(ob);
- bPose *pose= (ob) ? ob->pose : NULL;
+ bPose *pose = (ob) ? ob->pose : NULL;
TimeMarker *marker;
- KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_WHOLE_CHARACTER_ID); /* this includes custom props :)*/
- int frame= RNA_int_get(op->ptr, "frame");
+ KeyingSet *ks = ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_WHOLE_CHARACTER_ID); /* this includes custom props :)*/
+ int frame = RNA_int_get(op->ptr, "frame");
char name[64];
/* sanity check (invoke should have checked this anyway) */
@@ -453,17 +453,17 @@ static int poselib_add_exec (bContext *C, wmOperator *op)
* - for the 'replace' option, this should end up finding the appropriate marker,
* so no new one will be added
*/
- for (marker= act->markers.first; marker; marker= marker->next) {
+ for (marker = act->markers.first; marker; marker = marker->next) {
if (marker->frame == frame) {
BLI_strncpy(marker->name, name, sizeof(marker->name));
break;
}
}
if (marker == NULL) {
- marker= MEM_callocN(sizeof(TimeMarker), "ActionMarker");
+ marker = MEM_callocN(sizeof(TimeMarker), "ActionMarker");
BLI_strncpy(marker->name, name, sizeof(marker->name));
- marker->frame= frame;
+ marker->frame = frame;
BLI_addtail(&act->markers, marker);
}
@@ -472,18 +472,18 @@ static int poselib_add_exec (bContext *C, wmOperator *op)
BLI_uniquename(&act->markers, marker, "Pose", '.', offsetof(TimeMarker, name), sizeof(marker->name));
/* use Keying Set to determine what to store for the pose */
- // FIXME: in the past, the Keying Set respected selections (LocRotScale), but the current one doesn't (Whole Character)
+ // FIXME: in the past, the Keying Set respected selections (LocRotScale), but the current one doesn't (WholeCharacter)
// so perhaps we need either a new Keying Set, or just to add overrides here...
ANIM_apply_keyingset(C, NULL, act, ks, MODIFYKEY_MODE_INSERT, (float)frame);
/* store new 'active' pose number */
- act->active_marker= BLI_countlist(&act->markers);
+ act->active_marker = BLI_countlist(&act->markers);
/* done */
return OPERATOR_FINISHED;
}
-void POSELIB_OT_pose_add (wmOperatorType *ot)
+void POSELIB_OT_pose_add(wmOperatorType *ot)
{
/* identifiers */
ot->name = "PoseLib Add Pose";
@@ -496,7 +496,7 @@ void POSELIB_OT_pose_add (wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_int(ot->srna, "frame", 1, 0, INT_MAX, "Frame", "Frame to store pose on", 0, INT_MAX);
@@ -511,9 +511,9 @@ static EnumPropertyItem *poselib_stored_pose_itemf(bContext *C, PointerRNA *UNUS
Object *ob = get_poselib_object(C);
bAction *act = (ob) ? ob->poselib : NULL;
TimeMarker *marker;
- EnumPropertyItem *item= NULL, item_tmp= {0};
- int totitem= 0;
- int i= 0;
+ EnumPropertyItem *item = NULL, item_tmp = {0};
+ int totitem = 0;
+ int i = 0;
if (C == NULL) {
return DummyRNA_NULL_items;
@@ -522,24 +522,24 @@ static EnumPropertyItem *poselib_stored_pose_itemf(bContext *C, PointerRNA *UNUS
/* check that the action exists */
if (act) {
/* add each marker to the list */
- for (marker=act->markers.first, i=0; marker; marker= marker->next, i++) {
- item_tmp.identifier= item_tmp.name= marker->name;
- item_tmp.icon= ICON_ARMATURE_DATA;
- item_tmp.value= i;
+ for (marker = act->markers.first, i = 0; marker; marker = marker->next, i++) {
+ item_tmp.identifier = item_tmp.name = marker->name;
+ item_tmp.icon = ICON_ARMATURE_DATA;
+ item_tmp.value = i;
RNA_enum_item_add(&item, &totitem, &item_tmp);
}
}
RNA_enum_item_end(&item, &totitem);
- *free= 1;
+ *free = 1;
return item;
}
-static int poselib_remove_exec (bContext *C, wmOperator *op)
+static int poselib_remove_exec(bContext *C, wmOperator *op)
{
- Object *ob= get_poselib_object(C);
- bAction *act= (ob) ? ob->poselib : NULL;
+ Object *ob = get_poselib_object(C);
+ bAction *act = (ob) ? ob->poselib : NULL;
TimeMarker *marker;
int marker_index;
FCurve *fcu;
@@ -567,12 +567,12 @@ static int poselib_remove_exec (bContext *C, wmOperator *op)
}
/* remove relevant keyframes */
- for (fcu= act->curves.first; fcu; fcu= fcu->next) {
+ for (fcu = act->curves.first; fcu; fcu = fcu->next) {
BezTriple *bezt;
unsigned int i;
if (fcu->bezt) {
- for (i=0, bezt=fcu->bezt; i < fcu->totvert; i++, bezt++) {
+ for (i = 0, bezt = fcu->bezt; i < fcu->totvert; i++, bezt++) {
/* check if remove */
if (IS_EQ(bezt->vec[1][0], marker->frame)) {
delete_fcurve_key(fcu, i, 1);
@@ -586,18 +586,18 @@ static int poselib_remove_exec (bContext *C, wmOperator *op)
BLI_freelinkN(&act->markers, marker);
/* fix active pose number */
- act->active_marker= 0;
+ act->active_marker = 0;
/* send notifiers for this - using keyframe editing notifiers, since action
* may be being shown in anim editors as active action
*/
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
/* done */
return OPERATOR_FINISHED;
}
-void POSELIB_OT_pose_remove (wmOperatorType *ot)
+void POSELIB_OT_pose_remove(wmOperatorType *ot)
{
PropertyRNA *prop;
@@ -612,7 +612,7 @@ void POSELIB_OT_pose_remove (wmOperatorType *ot)
ot->poll = has_poselib_pose_data_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
prop = RNA_def_enum(ot->srna, "pose", DummyRNA_NULL_items, 0, "Pose", "The pose to remove");
@@ -620,10 +620,10 @@ void POSELIB_OT_pose_remove (wmOperatorType *ot)
ot->prop = prop;
}
-static int poselib_rename_invoke (bContext *C, wmOperator *op, wmEvent *evt)
+static int poselib_rename_invoke(bContext *C, wmOperator *op, wmEvent *evt)
{
- Object *ob= get_poselib_object(C);
- bAction *act= (ob) ? ob->poselib : NULL;
+ Object *ob = get_poselib_object(C);
+ bAction *act = (ob) ? ob->poselib : NULL;
TimeMarker *marker;
/* check if valid poselib */
@@ -633,14 +633,14 @@ static int poselib_rename_invoke (bContext *C, wmOperator *op, wmEvent *evt)
}
/* get index (and pointer) of pose to remove */
- marker= BLI_findlink(&act->markers, act->active_marker-1);
+ marker = BLI_findlink(&act->markers, act->active_marker - 1);
if (marker == NULL) {
BKE_report(op->reports, RPT_ERROR, "Invalid index for Pose");
return OPERATOR_CANCELLED;
}
else {
/* use the existing name of the marker as the name, and use the active marker as the one to rename */
- RNA_enum_set(op->ptr, "pose", act->active_marker-1);
+ RNA_enum_set(op->ptr, "pose", act->active_marker - 1);
RNA_string_set(op->ptr, "name", marker->name);
}
@@ -648,10 +648,10 @@ static int poselib_rename_invoke (bContext *C, wmOperator *op, wmEvent *evt)
return WM_operator_props_popup(C, op, evt);
}
-static int poselib_rename_exec (bContext *C, wmOperator *op)
+static int poselib_rename_exec(bContext *C, wmOperator *op)
{
- Object *ob= object_pose_armature_get(CTX_data_active_object(C));
- bAction *act= (ob) ? ob->poselib : NULL;
+ Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
+ bAction *act = (ob) ? ob->poselib : NULL;
TimeMarker *marker;
char newname[64];
@@ -662,7 +662,7 @@ static int poselib_rename_exec (bContext *C, wmOperator *op)
}
/* get index (and pointer) of pose to remove */
- marker= BLI_findlink(&act->markers, RNA_int_get(op->ptr, "pose"));
+ marker = BLI_findlink(&act->markers, RNA_int_get(op->ptr, "pose"));
if (marker == NULL) {
BKE_report(op->reports, RPT_ERROR, "Invalid index for Pose");
return OPERATOR_CANCELLED;
@@ -678,13 +678,13 @@ static int poselib_rename_exec (bContext *C, wmOperator *op)
/* send notifiers for this - using keyframe editing notifiers, since action
* may be being shown in anim editors as active action
*/
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
/* done */
return OPERATOR_FINISHED;
}
-void POSELIB_OT_pose_rename (wmOperatorType *ot)
+void POSELIB_OT_pose_rename(wmOperatorType *ot)
{
PropertyRNA *prop;
static EnumPropertyItem prop_poses_dummy_types[] = {
@@ -702,13 +702,13 @@ void POSELIB_OT_pose_rename (wmOperatorType *ot)
ot->poll = has_poselib_pose_data_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
- /* NOTE: name not pose is the operator's "main" property, so that it will get activated in the popup for easy renaming */
+ /* NOTE: name not pose is the operator's "main" property, so that it will get activated in the popup for easy renaming */
ot->prop = RNA_def_string(ot->srna, "name", "RenamedPose", 64, "New Pose Name", "New name for pose");
- prop= RNA_def_enum(ot->srna, "pose", prop_poses_dummy_types, 0, "Pose", "The pose to rename");
- RNA_def_enum_funcs(prop, poselib_stored_pose_itemf);
+ prop = RNA_def_enum(ot->srna, "pose", prop_poses_dummy_types, 0, "Pose", "The pose to rename");
+ RNA_def_enum_funcs(prop, poselib_stored_pose_itemf);
}
/* ************************************************************* */
@@ -716,31 +716,31 @@ void POSELIB_OT_pose_rename (wmOperatorType *ot)
/* Simple struct for storing settings/data for use during PoseLib preview */
typedef struct tPoseLib_PreviewData {
- ListBase backups; /* tPoseLib_Backup structs for restoring poses */
- ListBase searchp; /* LinkData structs storing list of poses which match the current search-string */
-
- Scene *scene; /* active scene */
- ScrArea *sa; /* active area */
+ ListBase backups; /* tPoseLib_Backup structs for restoring poses */
+ ListBase searchp; /* LinkData structs storing list of poses which match the current search-string */
- PointerRNA rna_ptr; /* RNA-Pointer to Object 'ob' */
- Object *ob; /* object to work on */
- bArmature *arm; /* object's armature data */
- bPose *pose; /* object's pose */
- bAction *act; /* poselib to use */
- TimeMarker *marker; /* 'active' pose */
+ Scene *scene; /* active scene */
+ ScrArea *sa; /* active area */
- int selcount; /* number of selected elements to work on */
- int totcount; /* total number of elements to work on */
-
- short state; /* state of main loop */
- short redraw; /* redraw/update settings during main loop */
- short flag; /* flags for various settings */
-
- short search_cursor; /* position of cursor in searchstr (cursor occurs before the item at the nominated index) */
- char searchstr[64]; /* (Part of) Name to search for to filter poses that get shown */
- char searchold[64]; /* Previously set searchstr (from last loop run), so that we can detected when to rebuild searchp */
+ PointerRNA rna_ptr; /* RNA-Pointer to Object 'ob' */
+ Object *ob; /* object to work on */
+ bArmature *arm; /* object's armature data */
+ bPose *pose; /* object's pose */
+ bAction *act; /* poselib to use */
+ TimeMarker *marker; /* 'active' pose */
+
+ int selcount; /* number of selected elements to work on */
+ int totcount; /* total number of elements to work on */
+
+ short state; /* state of main loop */
+ short redraw; /* redraw/update settings during main loop */
+ short flag; /* flags for various settings */
+
+ short search_cursor; /* position of cursor in searchstr (cursor occurs before the item at the nominated index) */
+ char searchstr[64]; /* (Part of) Name to search for to filter poses that get shown */
+ char searchold[64]; /* Previously set searchstr (from last loop run), so that we can detected when to rebuild searchp */
- char headerstr[200]; /* Info-text to print in header */
+ char headerstr[200]; /* Info-text to print in header */
} tPoseLib_PreviewData;
/* defines for tPoseLib_PreviewData->state values */
@@ -761,8 +761,8 @@ enum {
/* defines for tPoseLib_PreviewData->flag values */
enum {
- PL_PREVIEW_FIRSTTIME = (1<<0),
- PL_PREVIEW_SHOWORIGINAL = (1<<1)
+ PL_PREVIEW_FIRSTTIME = (1 << 0),
+ PL_PREVIEW_SHOWORIGINAL = (1 << 1)
};
/* ---------------------------- */
@@ -771,35 +771,35 @@ enum {
typedef struct tPoseLib_Backup {
struct tPoseLib_Backup *next, *prev;
- bPoseChannel *pchan; /* pose channel backups are for */
+ bPoseChannel *pchan; /* pose channel backups are for */
- bPoseChannel olddata; /* copy of pose channel's old data (at start) */
- IDProperty *oldprops; /* copy (needs freeing) of pose channel's properties (at start) */
+ bPoseChannel olddata; /* copy of pose channel's old data (at start) */
+ IDProperty *oldprops; /* copy (needs freeing) of pose channel's properties (at start) */
} tPoseLib_Backup;
/* Makes a copy of the current pose for restoration purposes - doesn't do constraints currently */
-static void poselib_backup_posecopy (tPoseLib_PreviewData *pld)
+static void poselib_backup_posecopy(tPoseLib_PreviewData *pld)
{
bActionGroup *agrp;
bPoseChannel *pchan;
/* for each posechannel that has an actionchannel in */
- for (agrp= pld->act->groups.first; agrp; agrp= agrp->next) {
+ for (agrp = pld->act->groups.first; agrp; agrp = agrp->next) {
/* try to find posechannel */
- pchan= get_pose_channel(pld->pose, agrp->name);
+ pchan = BKE_pose_channel_find_name(pld->pose, agrp->name);
/* backup data if available */
if (pchan) {
tPoseLib_Backup *plb;
/* store backup */
- plb= MEM_callocN(sizeof(tPoseLib_Backup), "tPoseLib_Backup");
+ plb = MEM_callocN(sizeof(tPoseLib_Backup), "tPoseLib_Backup");
- plb->pchan= pchan;
+ plb->pchan = pchan;
memcpy(&plb->olddata, plb->pchan, sizeof(bPoseChannel));
if (pchan->prop)
- plb->oldprops= IDP_CopyProperty(pchan->prop);
+ plb->oldprops = IDP_CopyProperty(pchan->prop);
BLI_addtail(&pld->backups, plb);
@@ -812,11 +812,11 @@ static void poselib_backup_posecopy (tPoseLib_PreviewData *pld)
}
/* Restores original pose */
-static void poselib_backup_restore (tPoseLib_PreviewData *pld)
+static void poselib_backup_restore(tPoseLib_PreviewData *pld)
{
tPoseLib_Backup *plb;
- for (plb= pld->backups.first; plb; plb= plb->next) {
+ for (plb = pld->backups.first; plb; plb = plb->next) {
/* copy most of data straight back */
memcpy(plb->pchan, &plb->olddata, sizeof(bPoseChannel));
@@ -829,12 +829,12 @@ static void poselib_backup_restore (tPoseLib_PreviewData *pld)
}
/* Free list of backups, including any side data it may use */
-static void poselib_backup_free_data (tPoseLib_PreviewData *pld)
+static void poselib_backup_free_data(tPoseLib_PreviewData *pld)
{
tPoseLib_Backup *plb, *plbn;
- for (plb= pld->backups.first; plb; plb= plbn) {
- plbn= plb->next;
+ for (plb = pld->backups.first; plb; plb = plbn) {
+ plbn = plb->next;
/* free custom data */
if (plb->oldprops) {
@@ -852,55 +852,57 @@ static void poselib_backup_free_data (tPoseLib_PreviewData *pld)
/* Applies the appropriate stored pose from the pose-library to the current pose
* - assumes that a valid object, with a poselib has been supplied
* - gets the string to print in the header
- * - this code is based on the code for extract_pose_from_action in blenkernel/action.c
+ * - this code is based on the code for extract_pose_from_action in blenkernel/action.c
*/
-static void poselib_apply_pose (tPoseLib_PreviewData *pld)
+static void poselib_apply_pose(tPoseLib_PreviewData *pld)
{
- PointerRNA *ptr= &pld->rna_ptr;
- bArmature *arm= pld->arm;
- bPose *pose= pld->pose;
+ PointerRNA *ptr = &pld->rna_ptr;
+ bArmature *arm = pld->arm;
+ bPose *pose = pld->pose;
bPoseChannel *pchan;
- bAction *act= pld->act;
+ bAction *act = pld->act;
bActionGroup *agrp;
- KeyframeEditData ked= {{NULL}};
+ KeyframeEditData ked = {{NULL}};
KeyframeEditFunc group_ok_cb;
- int frame= 1;
+ int frame = 1;
/* get the frame */
if (pld->marker)
- frame= pld->marker->frame;
+ frame = pld->marker->frame;
else
return;
/* init settings for testing groups for keyframes */
- group_ok_cb= ANIM_editkeyframes_ok(BEZT_OK_FRAMERANGE);
- ked.f1= ((float)frame) - 0.5f;
- ked.f2= ((float)frame) + 0.5f;
+ group_ok_cb = ANIM_editkeyframes_ok(BEZT_OK_FRAMERANGE);
+ ked.f1 = ((float)frame) - 0.5f;
+ ked.f2 = ((float)frame) + 0.5f;
/* start applying - only those channels which have a key at this point in time! */
- for (agrp= act->groups.first; agrp; agrp= agrp->next) {
+ for (agrp = act->groups.first; agrp; agrp = agrp->next) {
/* check if group has any keyframes */
if (ANIM_animchanneldata_keyframes_loop(&ked, NULL, agrp, ALE_GROUP, NULL, group_ok_cb, NULL)) {
/* has keyframe on this frame, so try to get a PoseChannel with this name */
- pchan= get_pose_channel(pose, agrp->name);
+ pchan = BKE_pose_channel_find_name(pose, agrp->name);
if (pchan) {
- short ok= 0;
+ short ok = 0;
/* check if this bone should get any animation applied */
if (pld->selcount == 0) {
/* if no bones are selected, then any bone is ok */
- ok= 1;
+ ok = 1;
}
else if (pchan->bone) {
/* only ok if bone is visible and selected */
- if ( (pchan->bone->flag & BONE_SELECTED) &&
- (pchan->bone->flag & BONE_HIDDEN_P)==0 &&
- (pchan->bone->layer & arm->layer) )
+ if ((pchan->bone->flag & BONE_SELECTED) &&
+ (pchan->bone->flag & BONE_HIDDEN_P) == 0 &&
+ (pchan->bone->layer & arm->layer))
+ {
ok = 1;
+ }
}
if (ok)
@@ -911,11 +913,11 @@ static void poselib_apply_pose (tPoseLib_PreviewData *pld)
}
/* Auto-keys/tags bones affected by the pose used from the poselib */
-static void poselib_keytag_pose (bContext *C, Scene *scene, tPoseLib_PreviewData *pld)
+static void poselib_keytag_pose(bContext *C, Scene *scene, tPoseLib_PreviewData *pld)
{
- bPose *pose= pld->pose;
+ bPose *pose = pld->pose;
bPoseChannel *pchan;
- bAction *act= pld->act;
+ bAction *act = pld->act;
bActionGroup *agrp;
KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_WHOLE_CHARACTER_ID);
@@ -923,9 +925,9 @@ static void poselib_keytag_pose (bContext *C, Scene *scene, tPoseLib_PreviewData
short autokey = autokeyframe_cfra_can_key(scene, &pld->ob->id);
/* start tagging/keying */
- for (agrp= act->groups.first; agrp; agrp= agrp->next) {
+ for (agrp = act->groups.first; agrp; agrp = agrp->next) {
/* only for selected bones unless there aren't any selected, in which case all are included */
- pchan= get_pose_channel(pose, agrp->name);
+ pchan = BKE_pose_channel_find_name(pose, agrp->name);
if (pchan) {
if ( (pld->selcount == 0) || ((pchan->bone) && (pchan->bone->flag & BONE_SELECTED)) ) {
@@ -954,38 +956,38 @@ static void poselib_keytag_pose (bContext *C, Scene *scene, tPoseLib_PreviewData
}
/* send notifiers for this */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
}
/* Apply the relevant changes to the pose */
-static void poselib_preview_apply (bContext *C, wmOperator *op)
+static void poselib_preview_apply(bContext *C, wmOperator *op)
{
- tPoseLib_PreviewData *pld= (tPoseLib_PreviewData *)op->customdata;
+ tPoseLib_PreviewData *pld = (tPoseLib_PreviewData *)op->customdata;
/* only recalc pose (and its dependencies) if pose has changed */
if (pld->redraw == PL_PREVIEW_REDRAWALL) {
/* don't clear pose if firsttime */
- if ((pld->flag & PL_PREVIEW_FIRSTTIME)==0)
+ if ((pld->flag & PL_PREVIEW_FIRSTTIME) == 0)
poselib_backup_restore(pld);
else
pld->flag &= ~PL_PREVIEW_FIRSTTIME;
/* pose should be the right one to draw (unless we're temporarily not showing it) */
- if ((pld->flag & PL_PREVIEW_SHOWORIGINAL)==0) {
+ if ((pld->flag & PL_PREVIEW_SHOWORIGINAL) == 0) {
RNA_int_set(op->ptr, "pose_index", BLI_findindex(&pld->act->markers, pld->marker));
poselib_apply_pose(pld);
}
else
- RNA_int_set(op->ptr, "pose_index", -2); /* -2 means don't apply any pose */
+ RNA_int_set(op->ptr, "pose_index", -2); /* -2 means don't apply any pose */
/* old optimize trick... this enforces to bypass the depgraph
* - note: code copied from transform_generics.c -> recalcData()
*/
// FIXME: shouldn't this use the builtin stuff?
- if ((pld->arm->flag & ARM_DELAYDEFORM)==0)
+ if ((pld->arm->flag & ARM_DELAYDEFORM) == 0)
DAG_id_tag_update(&pld->ob->id, OB_RECALC_DATA); /* sets recalc flags */
else
- where_is_pose(pld->scene, pld->ob);
+ BKE_pose_where_is(pld->scene, pld->ob);
}
/* do header print - if interactively previewing */
@@ -1002,12 +1004,12 @@ static void poselib_preview_apply (bContext *C, wmOperator *op)
short index;
/* get search-string */
- index= pld->search_cursor;
+ index = pld->search_cursor;
if (index >= 0 && index <= sizeof(tempstr) - 1) {
memcpy(&tempstr[0], &pld->searchstr[0], index);
- tempstr[index]= '|';
- memcpy(&tempstr[index+1], &pld->searchstr[index], (sizeof(tempstr) - 1) - index);
+ tempstr[index] = '|';
+ memcpy(&tempstr[index + 1], &pld->searchstr[index], (sizeof(tempstr) - 1) - index);
}
else {
BLI_strncpy(tempstr, pld->searchstr, sizeof(tempstr));
@@ -1033,8 +1035,8 @@ static void poselib_preview_apply (bContext *C, wmOperator *op)
}
/* request drawing of view + clear redraw flag */
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, pld->ob);
- pld->redraw= PL_PREVIEW_NOREDRAW;
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, pld->ob);
+ pld->redraw = PL_PREVIEW_NOREDRAW;
}
/* ---------------------------- */
@@ -1042,7 +1044,7 @@ static void poselib_preview_apply (bContext *C, wmOperator *op)
/* This helper function is called during poselib_preview_poses to find the
* pose to preview next (after a change event)
*/
-static void poselib_preview_get_next (tPoseLib_PreviewData *pld, int step)
+static void poselib_preview_get_next(tPoseLib_PreviewData *pld, int step)
{
/* stop if not going anywhere, as we assume that there is a direction to move in */
if (step == 0)
@@ -1059,91 +1061,91 @@ static void poselib_preview_get_next (tPoseLib_PreviewData *pld, int step)
BLI_freelistN(&pld->searchp);
/* generate a new list of search matches */
- for (marker= pld->act->markers.first; marker; marker= marker->next) {
+ for (marker = pld->act->markers.first; marker; marker = marker->next) {
/* does the name partially match?
- * - don't worry about case, to make it easier for users to quickly input a name (or
+ * - don't worry about case, to make it easier for users to quickly input a name (or
* part of one), which is the whole point of this feature
*/
if (BLI_strcasestr(marker->name, pld->searchstr)) {
/* make link-data to store reference to it */
- ld= MEM_callocN(sizeof(LinkData), "PoseMatch");
- ld->data= marker;
+ ld = MEM_callocN(sizeof(LinkData), "PoseMatch");
+ ld->data = marker;
BLI_addtail(&pld->searchp, ld);
}
}
/* set current marker to NULL (so that we start from first) */
- pld->marker= NULL;
+ pld->marker = NULL;
}
/* check if any matches */
if (pld->searchp.first == NULL) {
- pld->marker= NULL;
+ pld->marker = NULL;
return;
}
/* find first match */
- for (ldc= pld->searchp.first; ldc; ldc= ldc->next) {
+ for (ldc = pld->searchp.first; ldc; ldc = ldc->next) {
if (ldc->data == pld->marker)
break;
}
if (ldc == NULL)
- ldc= pld->searchp.first;
+ ldc = pld->searchp.first;
/* Loop through the matches in a cyclic fashion, incrementing/decrementing step as appropriate
* until step == 0. At this point, marker should be the correct marker.
*/
if (step > 0) {
- for (ld=ldc; ld && step; ld=ldn, step--)
- ldn= (ld->next) ? ld->next : pld->searchp.first;
+ for (ld = ldc; ld && step; ld = ldn, step--)
+ ldn = (ld->next) ? ld->next : pld->searchp.first;
}
else {
- for (ld=ldc; ld && step; ld=ldn, step++)
- ldn= (ld->prev) ? ld->prev : pld->searchp.last;
+ for (ld = ldc; ld && step; ld = ldn, step++)
+ ldn = (ld->prev) ? ld->prev : pld->searchp.last;
}
/* set marker */
if (ld)
- pld->marker= ld->data;
+ pld->marker = ld->data;
}
else {
TimeMarker *marker, *next;
/* if no marker, because we just ended searching, then set that to the start of the list */
if (pld->marker == NULL)
- pld->marker= pld->act->markers.first;
+ pld->marker = pld->act->markers.first;
/* Loop through the markers in a cyclic fashion, incrementing/decrementing step as appropriate
* until step == 0. At this point, marker should be the correct marker.
*/
if (step > 0) {
- for (marker=pld->marker; marker && step; marker=next, step--)
- next= (marker->next) ? marker->next : pld->act->markers.first;
+ for (marker = pld->marker; marker && step; marker = next, step--)
+ next = (marker->next) ? marker->next : pld->act->markers.first;
}
else {
- for (marker=pld->marker; marker && step; marker=next, step++)
- next= (marker->prev) ? marker->prev : pld->act->markers.last;
+ for (marker = pld->marker; marker && step; marker = next, step++)
+ next = (marker->prev) ? marker->prev : pld->act->markers.last;
}
/* it should be fairly impossible for marker to be NULL */
if (marker)
- pld->marker= marker;
+ pld->marker = marker;
}
}
/* specially handle events for searching */
-static void poselib_preview_handle_search (tPoseLib_PreviewData *pld, unsigned short event, char ascii)
+static void poselib_preview_handle_search(tPoseLib_PreviewData *pld, unsigned short event, char ascii)
{
/* try doing some form of string manipulation first */
switch (event) {
case BACKSPACEKEY:
if (pld->searchstr[0] && pld->search_cursor) {
- short len= strlen(pld->searchstr);
- short index= pld->search_cursor;
+ short len = strlen(pld->searchstr);
+ short index = pld->search_cursor;
short i;
for (i = index; i <= len; i++)
- pld->searchstr[i-1] = pld->searchstr[i];
+ pld->searchstr[i - 1] = pld->searchstr[i];
pld->search_cursor--;
@@ -1155,13 +1157,13 @@ static void poselib_preview_handle_search (tPoseLib_PreviewData *pld, unsigned s
case DELKEY:
if (pld->searchstr[0] && pld->searchstr[1]) {
- short len= strlen(pld->searchstr);
- short index= pld->search_cursor;
+ short len = strlen(pld->searchstr);
+ short index = pld->search_cursor;
int i;
if (index < len) {
for (i = index; i < len; i++)
- pld->searchstr[i] = pld->searchstr[i+1];
+ pld->searchstr[i] = pld->searchstr[i + 1];
poselib_preview_get_next(pld, 1);
pld->redraw = PL_PREVIEW_REDRAWALL;
@@ -1173,18 +1175,18 @@ static void poselib_preview_handle_search (tPoseLib_PreviewData *pld, unsigned s
if (ascii) {
/* character to add to the string */
- short index= pld->search_cursor;
- short len= (pld->searchstr[0]) ? strlen(pld->searchstr) : 0;
+ short index = pld->search_cursor;
+ short len = (pld->searchstr[0]) ? strlen(pld->searchstr) : 0;
short i;
if (len) {
for (i = len; i > index; i--)
- pld->searchstr[i]= pld->searchstr[i-1];
+ pld->searchstr[i] = pld->searchstr[i - 1];
}
else
- pld->searchstr[1]= 0;
+ pld->searchstr[1] = 0;
- pld->searchstr[index]= ascii;
+ pld->searchstr[index] = ascii;
pld->search_cursor++;
poselib_preview_get_next(pld, 1);
@@ -1193,9 +1195,9 @@ static void poselib_preview_handle_search (tPoseLib_PreviewData *pld, unsigned s
}
/* handle events for poselib_preview_poses */
-static int poselib_preview_handle_event (bContext *UNUSED(C), wmOperator *op, wmEvent *event)
+static int poselib_preview_handle_event(bContext *UNUSED(C), wmOperator *op, wmEvent *event)
{
- tPoseLib_PreviewData *pld= op->customdata;
+ tPoseLib_PreviewData *pld = op->customdata;
int ret = OPERATOR_RUNNING_MODAL;
/* only accept 'press' event, and ignore 'release', so that we don't get double actions */
@@ -1215,7 +1217,7 @@ static int poselib_preview_handle_event (bContext *UNUSED(C), wmOperator *op, wm
/* exit - cancel */
case ESCKEY:
case RIGHTMOUSE:
- pld->state= PL_PREVIEW_CANCEL;
+ pld->state = PL_PREVIEW_CANCEL;
break;
/* exit - confirm */
@@ -1223,7 +1225,7 @@ static int poselib_preview_handle_event (bContext *UNUSED(C), wmOperator *op, wm
case RETKEY:
case PADENTER:
case SPACEKEY:
- pld->state= PL_PREVIEW_CONFIRM;
+ pld->state = PL_PREVIEW_CONFIRM;
break;
/* view manipulation */
@@ -1241,7 +1243,7 @@ static int poselib_preview_handle_event (bContext *UNUSED(C), wmOperator *op, wm
/* quicky compare to original */
case TABKEY:
pld->flag &= ~PL_PREVIEW_SHOWORIGINAL;
- pld->redraw= PL_PREVIEW_REDRAWALL;
+ pld->redraw = PL_PREVIEW_REDRAWALL;
break;
}
@@ -1255,7 +1257,7 @@ static int poselib_preview_handle_event (bContext *UNUSED(C), wmOperator *op, wm
/* exit - cancel */
case ESCKEY:
case RIGHTMOUSE:
- pld->state= PL_PREVIEW_CANCEL;
+ pld->state = PL_PREVIEW_CANCEL;
break;
/* exit - confirm */
@@ -1263,39 +1265,39 @@ static int poselib_preview_handle_event (bContext *UNUSED(C), wmOperator *op, wm
case RETKEY:
case PADENTER:
case SPACEKEY:
- pld->state= PL_PREVIEW_CONFIRM;
+ pld->state = PL_PREVIEW_CONFIRM;
break;
/* toggle between original pose and poselib pose*/
case TABKEY:
pld->flag |= PL_PREVIEW_SHOWORIGINAL;
- pld->redraw= PL_PREVIEW_REDRAWALL;
+ pld->redraw = PL_PREVIEW_REDRAWALL;
break;
/* change to previous pose (cyclic) */
case PAGEUPKEY:
case WHEELUPMOUSE:
poselib_preview_get_next(pld, -1);
- pld->redraw= PL_PREVIEW_REDRAWALL;
+ pld->redraw = PL_PREVIEW_REDRAWALL;
break;
/* change to next pose (cyclic) */
case PAGEDOWNKEY:
case WHEELDOWNMOUSE:
poselib_preview_get_next(pld, 1);
- pld->redraw= PL_PREVIEW_REDRAWALL;
+ pld->redraw = PL_PREVIEW_REDRAWALL;
break;
/* jump 5 poses (cyclic, back) */
case DOWNARROWKEY:
poselib_preview_get_next(pld, -5);
- pld->redraw= PL_PREVIEW_REDRAWALL;
+ pld->redraw = PL_PREVIEW_REDRAWALL;
break;
/* jump 5 poses (cyclic, forward) */
case UPARROWKEY:
poselib_preview_get_next(pld, 5);
- pld->redraw= PL_PREVIEW_REDRAWALL;
+ pld->redraw = PL_PREVIEW_REDRAWALL;
break;
/* change to next pose or searching cursor control */
@@ -1304,12 +1306,12 @@ static int poselib_preview_handle_event (bContext *UNUSED(C), wmOperator *op, wm
/* move text-cursor to the right */
if (pld->search_cursor < strlen(pld->searchstr))
pld->search_cursor++;
- pld->redraw= PL_PREVIEW_REDRAWHEADER;
+ pld->redraw = PL_PREVIEW_REDRAWHEADER;
}
else {
/* change to next pose (cyclic) */
poselib_preview_get_next(pld, 1);
- pld->redraw= PL_PREVIEW_REDRAWALL;
+ pld->redraw = PL_PREVIEW_REDRAWALL;
}
break;
@@ -1319,42 +1321,42 @@ static int poselib_preview_handle_event (bContext *UNUSED(C), wmOperator *op, wm
/* move text-cursor to the left */
if (pld->search_cursor)
pld->search_cursor--;
- pld->redraw= PL_PREVIEW_REDRAWHEADER;
+ pld->redraw = PL_PREVIEW_REDRAWHEADER;
}
else {
/* change to previous pose (cyclic) */
poselib_preview_get_next(pld, -1);
- pld->redraw= PL_PREVIEW_REDRAWALL;
+ pld->redraw = PL_PREVIEW_REDRAWALL;
}
break;
/* change to first pose or start of searching string */
case HOMEKEY:
if (pld->searchstr[0]) {
- pld->search_cursor= 0;
- pld->redraw= PL_PREVIEW_REDRAWHEADER;
+ pld->search_cursor = 0;
+ pld->redraw = PL_PREVIEW_REDRAWHEADER;
}
else {
/* change to first pose */
- pld->marker= pld->act->markers.first;
- pld->act->active_marker= 1;
+ pld->marker = pld->act->markers.first;
+ pld->act->active_marker = 1;
- pld->redraw= PL_PREVIEW_REDRAWALL;
+ pld->redraw = PL_PREVIEW_REDRAWALL;
}
break;
/* change to last pose or start of searching string */
case ENDKEY:
if (pld->searchstr[0]) {
- pld->search_cursor= strlen(pld->searchstr);
- pld->redraw= PL_PREVIEW_REDRAWHEADER;
+ pld->search_cursor = strlen(pld->searchstr);
+ pld->redraw = PL_PREVIEW_REDRAWHEADER;
}
else {
/* change to last pose */
- pld->marker= pld->act->markers.last;
- pld->act->active_marker= BLI_countlist(&pld->act->markers);
+ pld->marker = pld->act->markers.last;
+ pld->act->active_marker = BLI_countlist(&pld->act->markers);
- pld->redraw= PL_PREVIEW_REDRAWALL;
+ pld->redraw = PL_PREVIEW_REDRAWALL;
}
break;
@@ -1394,53 +1396,53 @@ static int poselib_preview_handle_event (bContext *UNUSED(C), wmOperator *op, wm
/* ---------------------------- */
/* Init PoseLib Previewing data */
-static void poselib_preview_init_data (bContext *C, wmOperator *op)
+static void poselib_preview_init_data(bContext *C, wmOperator *op)
{
tPoseLib_PreviewData *pld;
- Object *ob= get_poselib_object(C);
+ Object *ob = get_poselib_object(C);
int pose_index = RNA_int_get(op->ptr, "pose_index");
/* set up preview state info */
- op->customdata= pld= MEM_callocN(sizeof(tPoseLib_PreviewData), "PoseLib Preview Data");
+ op->customdata = pld = MEM_callocN(sizeof(tPoseLib_PreviewData), "PoseLib Preview Data");
/* get basic data */
- pld->ob= ob;
- pld->arm= (ob) ? (ob->data) : NULL;
- pld->pose= (ob) ? (ob->pose) : NULL;
- pld->act= (ob) ? (ob->poselib) : NULL;
+ pld->ob = ob;
+ pld->arm = (ob) ? (ob->data) : NULL;
+ pld->pose = (ob) ? (ob->pose) : NULL;
+ pld->act = (ob) ? (ob->poselib) : NULL;
- pld->scene= CTX_data_scene(C);
- pld->sa= CTX_wm_area(C);
+ pld->scene = CTX_data_scene(C);
+ pld->sa = CTX_wm_area(C);
/* get starting pose based on RNA-props for this operator */
if (pose_index == -1)
- pld->marker= poselib_get_active_pose(pld->act);
+ pld->marker = poselib_get_active_pose(pld->act);
else if (pose_index == -2)
pld->flag |= PL_PREVIEW_SHOWORIGINAL;
else
- pld->marker= (pld->act) ? BLI_findlink(&pld->act->markers, pose_index) : NULL;
+ pld->marker = (pld->act) ? BLI_findlink(&pld->act->markers, pose_index) : NULL;
/* check if valid poselib */
if (ELEM3(NULL, pld->ob, pld->pose, pld->arm)) {
BKE_report(op->reports, RPT_ERROR, "PoseLib is only for Armatures in PoseMode");
- pld->state= PL_PREVIEW_ERROR;
+ pld->state = PL_PREVIEW_ERROR;
return;
}
if (pld->act == NULL) {
BKE_report(op->reports, RPT_ERROR, "Object doesn't have a valid PoseLib");
- pld->state= PL_PREVIEW_ERROR;
+ pld->state = PL_PREVIEW_ERROR;
return;
}
if (pld->marker == NULL) {
if (pld->act->markers.first) {
/* just use first one then... */
- pld->marker= pld->act->markers.first;
+ pld->marker = pld->act->markers.first;
if (pose_index > -2)
BKE_report(op->reports, RPT_WARNING, "PoseLib had no active pose");
}
else {
BKE_report(op->reports, RPT_ERROR, "PoseLib has no poses to preview/apply");
- pld->state= PL_PREVIEW_ERROR;
+ pld->state = PL_PREVIEW_ERROR;
return;
}
}
@@ -1452,30 +1454,30 @@ static void poselib_preview_init_data (bContext *C, wmOperator *op)
poselib_backup_posecopy(pld);
/* set flags for running */
- pld->state= PL_PREVIEW_RUNNING;
- pld->redraw= PL_PREVIEW_REDRAWALL;
+ pld->state = PL_PREVIEW_RUNNING;
+ pld->redraw = PL_PREVIEW_REDRAWALL;
pld->flag |= PL_PREVIEW_FIRSTTIME;
/* set depsgraph flags */
- /* make sure the lock is set OK, unlock can be accidentally saved? */
+ /* make sure the lock is set OK, unlock can be accidentally saved? */
pld->pose->flag |= POSE_LOCKED;
pld->pose->flag &= ~POSE_DO_UNLOCK;
/* clear strings + search */
- pld->headerstr[0]= pld->searchstr[0]= pld->searchold[0]= '\0';
- pld->search_cursor= 0;
+ pld->headerstr[0] = pld->searchstr[0] = pld->searchold[0] = '\0';
+ pld->search_cursor = 0;
}
/* After previewing poses */
-static void poselib_preview_cleanup (bContext *C, wmOperator *op)
+static void poselib_preview_cleanup(bContext *C, wmOperator *op)
{
- tPoseLib_PreviewData *pld= (tPoseLib_PreviewData *)op->customdata;
- Scene *scene= pld->scene;
- Object *ob= pld->ob;
- bPose *pose= pld->pose;
- bArmature *arm= pld->arm;
- bAction *act= pld->act;
- TimeMarker *marker= pld->marker;
+ tPoseLib_PreviewData *pld = (tPoseLib_PreviewData *)op->customdata;
+ Scene *scene = pld->scene;
+ Object *ob = pld->ob;
+ bPose *pose = pld->pose;
+ bArmature *arm = pld->arm;
+ bAction *act = pld->act;
+ TimeMarker *marker = pld->marker;
/* redraw the header so that it doesn't show any of our stuff anymore */
ED_area_headerprint(pld->sa, NULL);
@@ -1490,10 +1492,10 @@ static void poselib_preview_cleanup (bContext *C, wmOperator *op)
/* old optimize trick... this enforces to bypass the depgraph
* - note: code copied from transform_generics.c -> recalcData()
*/
- if ((arm->flag & ARM_DELAYDEFORM)==0)
+ if ((arm->flag & ARM_DELAYDEFORM) == 0)
DAG_id_tag_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */
else
- where_is_pose(scene, ob);
+ BKE_pose_where_is(scene, ob);
}
else if (pld->state == PL_PREVIEW_CONFIRM) {
@@ -1501,7 +1503,7 @@ static void poselib_preview_cleanup (bContext *C, wmOperator *op)
poselib_keytag_pose(C, scene, pld);
/* change active pose setting */
- act->active_marker= BLI_findindex(&act->markers, marker) + 1;
+ act->active_marker = BLI_findindex(&act->markers, marker) + 1;
action_set_activemarker(act, marker, NULL);
/* Update event for pose and deformation children */
@@ -1512,7 +1514,7 @@ static void poselib_preview_cleanup (bContext *C, wmOperator *op)
//remake_action_ipos(ob->action);
}
else
- where_is_pose(scene, ob);
+ BKE_pose_where_is(scene, ob);
}
/* free memory used for backups and searching */
@@ -1521,13 +1523,13 @@ static void poselib_preview_cleanup (bContext *C, wmOperator *op)
/* free temp data for operator */
MEM_freeN(pld);
- op->customdata= NULL;
+ op->customdata = NULL;
}
/* End previewing operation */
-static int poselib_preview_exit (bContext *C, wmOperator *op)
+static int poselib_preview_exit(bContext *C, wmOperator *op)
{
- tPoseLib_PreviewData *pld= op->customdata;
+ tPoseLib_PreviewData *pld = op->customdata;
int exit_state = pld->state;
/* finish up */
@@ -1540,16 +1542,16 @@ static int poselib_preview_exit (bContext *C, wmOperator *op)
}
/* Cancel previewing operation (called when exiting Blender) */
-static int poselib_preview_cancel (bContext *C, wmOperator *op)
+static int poselib_preview_cancel(bContext *C, wmOperator *op)
{
poselib_preview_exit(C, op);
return OPERATOR_CANCELLED;
}
/* main modal status check */
-static int poselib_preview_modal (bContext *C, wmOperator *op, wmEvent *event)
+static int poselib_preview_modal(bContext *C, wmOperator *op, wmEvent *event)
{
- tPoseLib_PreviewData *pld= op->customdata;
+ tPoseLib_PreviewData *pld = op->customdata;
int ret;
/* 1) check state to see if we're still running */
@@ -1557,7 +1559,7 @@ static int poselib_preview_modal (bContext *C, wmOperator *op, wmEvent *event)
return poselib_preview_exit(C, op);
/* 2) handle events */
- ret= poselib_preview_handle_event(C, op, event);
+ ret = poselib_preview_handle_event(C, op, event);
/* 3) apply changes and redraw, otherwise, confirming goes wrong */
if (pld->redraw)
@@ -1573,7 +1575,7 @@ static int poselib_preview_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(e
/* check if everything is ok, and init settings for modal operator */
poselib_preview_init_data(C, op);
- pld= (tPoseLib_PreviewData *)op->customdata;
+ pld = (tPoseLib_PreviewData *)op->customdata;
if (pld->state == PL_PREVIEW_ERROR) {
/* an error occurred, so free temp mem used */
@@ -1591,13 +1593,13 @@ static int poselib_preview_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(e
}
/* Repeat operator */
-static int poselib_preview_exec (bContext *C, wmOperator *op)
+static int poselib_preview_exec(bContext *C, wmOperator *op)
{
tPoseLib_PreviewData *pld;
/* check if everything is ok, and init settings for modal operator */
poselib_preview_init_data(C, op);
- pld= (tPoseLib_PreviewData *)op->customdata;
+ pld = (tPoseLib_PreviewData *)op->customdata;
if (pld->state == PL_PREVIEW_ERROR) {
/* an error occurred, so free temp mem used */
@@ -1620,7 +1622,7 @@ static int poselib_preview_exec (bContext *C, wmOperator *op)
return poselib_preview_exit(C, op);
}
-void POSELIB_OT_browse_interactive (wmOperatorType *ot)
+void POSELIB_OT_browse_interactive(wmOperatorType *ot)
{
/* identifiers */
ot->name = "PoseLib Browse Poses";
@@ -1635,10 +1637,10 @@ void POSELIB_OT_browse_interactive (wmOperatorType *ot)
ot->poll = has_poselib_pose_data_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
+ 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", -1, -2, INT_MAX, "Pose", "Index of the pose to apply (-2 for no change to pose, -1 for poselib active pose)", 0, INT_MAX);
// XXX: percentage vs factor?
@@ -1646,7 +1648,7 @@ void POSELIB_OT_browse_interactive (wmOperatorType *ot)
/* RNA_def_float_factor(ot->srna, "blend_factor", 1.0f, 0.0f, 1.0f, "Blend Factor", "Amount that the pose is applied on top of the existing poses", 0.0f, 1.0f); */
}
-void POSELIB_OT_apply_pose (wmOperatorType *ot)
+void POSELIB_OT_apply_pose(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Apply Pose Library Pose";
@@ -1658,9 +1660,9 @@ void POSELIB_OT_apply_pose (wmOperatorType *ot)
ot->poll = has_poselib_pose_data_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* 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", -1, -2, INT_MAX, "Pose", "Index of the pose to apply (-2 for no change to pose, -1 for poselib active pose)", 0, INT_MAX);
}
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c
index 043383d79a3..e9c960c4080 100644
--- a/source/blender/editors/armature/poseobject.c
+++ b/source/blender/editors/armature/poseobject.c
@@ -83,8 +83,8 @@
/* This function is used to process the necessary updates for */
void ED_armature_enter_posemode(bContext *C, Base *base)
{
- ReportList *reports= CTX_wm_reports(C);
- Object *ob= base->object;
+ ReportList *reports = CTX_wm_reports(C);
+ Object *ob = base->object;
if (ob->id.lib) {
BKE_report(reports, RPT_WARNING, "Can't pose libdata");
@@ -96,7 +96,7 @@ void ED_armature_enter_posemode(bContext *C, Base *base)
ob->restore_mode = ob->mode;
ob->mode |= OB_MODE_POSE;
- WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_POSE, NULL);
+ WM_event_add_notifier(C, NC_SCENE | ND_MODE | NS_MODE_POSE, NULL);
break;
default:
@@ -110,12 +110,12 @@ void ED_armature_enter_posemode(bContext *C, Base *base)
void ED_armature_exit_posemode(bContext *C, Base *base)
{
if (base) {
- Object *ob= base->object;
+ Object *ob = base->object;
ob->restore_mode = ob->mode;
ob->mode &= ~OB_MODE_POSE;
- WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_OBJECT, NULL);
+ WM_event_add_notifier(C, NC_SCENE | ND_MODE | NS_MODE_OBJECT, NULL);
}
}
@@ -127,13 +127,13 @@ static short pose_has_protected_selected(Object *ob, short warn)
/* check protection */
if (ob->proxy) {
bPoseChannel *pchan;
- bArmature *arm= ob->data;
+ bArmature *arm = ob->data;
- for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
+ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
if (pchan->bone && (pchan->bone->layer & arm->layer)) {
if (pchan->bone->layer & arm->layer_protected) {
if (pchan->bone->flag & BONE_SELECTED)
- break;
+ break;
}
}
}
@@ -154,17 +154,17 @@ static int pose_channel_in_IK_chain(Object *ob, bPoseChannel *pchan, int level)
/* No need to check if constraint is active (has influence),
* since all constraints with CONSTRAINT_IK_AUTO are active */
- for (con= pchan->constraints.first; con; con= con->next) {
- if (con->type==CONSTRAINT_TYPE_KINEMATIC) {
- bKinematicConstraint *data= con->data;
+ for (con = pchan->constraints.first; con; con = con->next) {
+ if (con->type == CONSTRAINT_TYPE_KINEMATIC) {
+ bKinematicConstraint *data = con->data;
if (data->rootbone == 0 || data->rootbone > level) {
- if ((data->flag & CONSTRAINT_IK_AUTO)==0)
+ if ((data->flag & CONSTRAINT_IK_AUTO) == 0)
return 1;
}
}
}
- for (bone= pchan->bone->childbase.first; bone; bone= bone->next) {
- pchan= get_pose_channel(ob->pose, bone->name);
+ for (bone = pchan->bone->childbase.first; bone; bone = bone->next) {
+ pchan = BKE_pose_channel_find_name(ob->pose, bone->name);
if (pchan && pose_channel_in_IK_chain(ob, pchan, level + 1))
return 1;
}
@@ -197,26 +197,57 @@ void ED_pose_recalculate_paths(Scene *scene, Object *ob)
BLI_freelistN(&targets);
}
+
+/* show popup to determine settings */
+static int pose_calculate_paths_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
+{
+ Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
+
+ if (ELEM(NULL, ob, ob->pose))
+ return OPERATOR_CANCELLED;
+
+ /* set default settings from existing/stored settings */
+ {
+ bAnimVizSettings *avs = &ob->pose->avs;
+ PointerRNA avs_ptr;
+
+ RNA_int_set(op->ptr, "start_frame", avs->path_sf);
+ RNA_int_set(op->ptr, "end_frame", avs->path_ef);
+
+ RNA_pointer_create(NULL, &RNA_AnimVizMotionPaths, avs, &avs_ptr);
+ RNA_enum_set(op->ptr, "bake_location", RNA_enum_get(&avs_ptr, "bake_location"));
+ }
+
+ /* show popup dialog to allow editing of range... */
+ // FIXME: hardcoded dimensions here are just arbitrary
+ return WM_operator_props_dialog_popup(C, op, 200, 200);
+}
+
/* For the object with pose/action: create path curves for selected bones
* This recalculates the WHOLE path within the pchan->pathsf and pchan->pathef range
*/
-static int pose_calculate_paths_exec (bContext *C, wmOperator *op)
+static int pose_calculate_paths_exec(bContext *C, wmOperator *op)
{
- ScrArea *sa= CTX_wm_area(C);
- Scene *scene= CTX_data_scene(C);
- Object *ob;
+ Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
+ Scene *scene = CTX_data_scene(C);
- /* since this call may also be used from the buttons window, we need to check for where to get the object */
- if (sa->spacetype == SPACE_BUTS)
- ob= ED_object_context(C);
- else
- ob= object_pose_armature_get(CTX_data_active_object(C));
-
if (ELEM(NULL, ob, ob->pose))
return OPERATOR_CANCELLED;
+ /* grab baking settings from operator settings */
+ {
+ bAnimVizSettings *avs = &ob->pose->avs;
+ PointerRNA avs_ptr;
+
+ avs->path_sf = RNA_int_get(op->ptr, "start_frame");
+ avs->path_ef = RNA_int_get(op->ptr, "end_frame");
+
+ RNA_pointer_create(NULL, &RNA_AnimVizMotionPaths, avs, &avs_ptr);
+ RNA_enum_set(&avs_ptr, "bake_location", RNA_enum_get(op->ptr, "bake_location"));
+ }
+
/* set up path data for bones being calculated */
- CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones)
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones)
{
/* verify makes sure that the selected bone has a bone with the appropriate settings */
animviz_verify_motionpaths(op->reports, scene, ob, pchan);
@@ -228,12 +259,12 @@ static int pose_calculate_paths_exec (bContext *C, wmOperator *op)
ED_pose_recalculate_paths(scene, ob);
/* notifiers for updates */
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
return OPERATOR_FINISHED;
}
-void POSE_OT_paths_calculate (wmOperatorType *ot)
+void POSE_OT_paths_calculate(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Calculate Bone Paths";
@@ -241,11 +272,57 @@ void POSE_OT_paths_calculate (wmOperatorType *ot)
ot->description = "Calculate paths for the selected bones";
/* api callbacks */
+ ot->invoke = pose_calculate_paths_invoke;
ot->exec = pose_calculate_paths_exec;
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+
+ /* properties */
+ RNA_def_int(ot->srna, "start_frame", 1, MINAFRAME, MAXFRAME, "Start",
+ "First frame to calculate bone paths on", MINFRAME, MAXFRAME / 2.0);
+ RNA_def_int(ot->srna, "end_frame", 250, MINAFRAME, MAXFRAME, "End",
+ "Last frame to calculate bone paths on", MINFRAME, MAXFRAME / 2.0);
+
+ RNA_def_enum(ot->srna, "bake_location", motionpath_bake_location_items, 0,
+ "Bake Location",
+ "Which point on the bones is used when calculating paths");
+}
+
+/* --------- */
+
+static int pose_update_paths_exec(bContext *C, wmOperator *UNUSED(op))
+{
+ Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
+ Scene *scene = CTX_data_scene(C);
+
+ if (ELEM(NULL, ob, scene))
+ return OPERATOR_CANCELLED;
+
+ /* calculate the bones that now have motionpaths... */
+ // TODO: only make for the selected bones?
+ ED_pose_recalculate_paths(scene, ob);
+
+ /* notifiers for updates */
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
+
+ return OPERATOR_FINISHED;
+}
+
+void POSE_OT_paths_update(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Update Bone Paths";
+ ot->idname = "POSE_OT_paths_update";
+ ot->description = "Recalculate paths for bones that already have them";
+
+ /* api callbakcs */
+ ot->exec = pose_update_paths_exec;
+ ot->poll = ED_operator_posemode; /* TODO: this should probably check for active bone and/or existing paths */
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* --------- */
@@ -260,11 +337,11 @@ static void ED_pose_clear_paths(Object *ob)
return;
/* free the motionpath blocks, but also take note of whether we skipped some... */
- for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
+ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
if (pchan->mpath) {
if ((pchan->bone) && (pchan->bone->flag & BONE_SELECTED)) {
animviz_free_motionpath(pchan->mpath);
- pchan->mpath= NULL;
+ pchan->mpath = NULL;
}
else
skipped = 1;
@@ -277,16 +354,9 @@ static void ED_pose_clear_paths(Object *ob)
}
/* operator callback for this */
-static int pose_clear_paths_exec (bContext *C, wmOperator *UNUSED(op))
+static int pose_clear_paths_exec(bContext *C, wmOperator *UNUSED(op))
{
- ScrArea *sa= CTX_wm_area(C);
- Object *ob;
-
- /* since this call may also be used from the buttons window, we need to check for where to get the object */
- if (sa->spacetype == SPACE_BUTS)
- ob= ED_object_context(C);
- else
- ob= object_pose_armature_get(CTX_data_active_object(C));
+ Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
/* only continue if there's an object */
if (ELEM(NULL, ob, ob->pose))
@@ -296,12 +366,12 @@ static int pose_clear_paths_exec (bContext *C, wmOperator *UNUSED(op))
ED_pose_clear_paths(ob);
/* notifiers for updates */
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
return OPERATOR_FINISHED;
}
-void POSE_OT_paths_clear (wmOperatorType *ot)
+void POSE_OT_paths_clear(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Clear Bone Paths";
@@ -313,34 +383,34 @@ void POSE_OT_paths_clear (wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ******************* Select Constraint Target Operator ************* */
static int pose_select_constraint_target_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *ob= object_pose_armature_get(CTX_data_active_object(C));
+ Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
bConstraint *con;
- int found= 0;
+ int found = 0;
- CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pose_bones)
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, visible_pose_bones)
{
if (pchan->bone->flag & BONE_SELECTED) {
- for (con= pchan->constraints.first; con; con= con->next) {
- bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
+ for (con = pchan->constraints.first; con; con = con->next) {
+ bConstraintTypeInfo *cti = constraint_get_typeinfo(con);
ListBase targets = {NULL, NULL};
bConstraintTarget *ct;
if (cti && cti->get_constraint_targets) {
cti->get_constraint_targets(con, &targets);
- for (ct= targets.first; ct; ct= ct->next) {
+ for (ct = targets.first; ct; ct = ct->next) {
if ((ct->tar == ob) && (ct->subtarget[0])) {
- bPoseChannel *pchanc= get_pose_channel(ob->pose, ct->subtarget);
+ bPoseChannel *pchanc = BKE_pose_channel_find_name(ob->pose, ct->subtarget);
if ((pchanc) && !(pchanc->bone->flag & BONE_UNSELECTABLE)) {
- pchanc->bone->flag |= BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL;
- found= 1;
+ pchanc->bone->flag |= BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL;
+ found = 1;
}
}
}
@@ -356,7 +426,7 @@ static int pose_select_constraint_target_exec(bContext *C, wmOperator *UNUSED(op
if (!found)
return OPERATOR_CANCELLED;
- WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, ob);
return OPERATOR_FINISHED;
}
@@ -373,36 +443,36 @@ void POSE_OT_select_constraint_target(wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ******************* select hierarchy operator ************* */
static int pose_select_hierarchy_exec(bContext *C, wmOperator *op)
{
- Object *ob= object_pose_armature_get(CTX_data_active_object(C));
- bArmature *arm= ob->data;
+ Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
+ bArmature *arm = ob->data;
Bone *curbone, *pabone, *chbone;
int direction = RNA_enum_get(op->ptr, "direction");
int add_to_sel = RNA_boolean_get(op->ptr, "extend");
- int found= 0;
+ int found = 0;
- CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pose_bones)
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, visible_pose_bones)
{
- curbone= pchan->bone;
+ curbone = pchan->bone;
- if ((curbone->flag & BONE_UNSELECTABLE)==0) {
+ if ((curbone->flag & BONE_UNSELECTABLE) == 0) {
if (curbone == arm->act_bone) {
if (direction == BONE_SELECT_PARENT) {
if (pchan->parent == NULL) continue;
- else pabone= pchan->parent->bone;
+ else pabone = pchan->parent->bone;
if (PBONE_VISIBLE(arm, pabone)) {
if (!add_to_sel) curbone->flag &= ~BONE_SELECTED;
pabone->flag |= BONE_SELECTED;
- arm->act_bone= pabone;
+ arm->act_bone = pabone;
- found= 1;
+ found = 1;
break;
}
}
@@ -435,9 +505,9 @@ static int pose_select_hierarchy_exec(bContext *C, wmOperator *op)
if (PBONE_VISIBLE(arm, chbone)) {
if (!add_to_sel) curbone->flag &= ~BONE_SELECTED;
chbone->flag |= BONE_SELECTED;
- arm->act_bone= chbone;
+ arm->act_bone = chbone;
- found= 1;
+ found = 1;
break;
}
}
@@ -449,14 +519,14 @@ static int pose_select_hierarchy_exec(bContext *C, wmOperator *op)
if (found == 0)
return OPERATOR_CANCELLED;
- WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, ob);
return OPERATOR_FINISHED;
}
void POSE_OT_select_hierarchy(wmOperatorType *ot)
{
- static EnumPropertyItem direction_items[]= {
+ static EnumPropertyItem direction_items[] = {
{BONE_SELECT_PARENT, "PARENT", 0, "Select Parent", ""},
{BONE_SELECT_CHILD, "CHILD", 0, "Select Child", ""},
{0, NULL, 0, NULL, NULL}
@@ -472,7 +542,7 @@ void POSE_OT_select_hierarchy(wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* props */
ot->prop = RNA_def_enum(ot->srna, "direction", direction_items, BONE_SELECT_PARENT, "Direction", "");
@@ -482,39 +552,39 @@ void POSE_OT_select_hierarchy(wmOperatorType *ot)
/* ******************* select grouped operator ************* */
-static short pose_select_same_group (bContext *C, Object *ob, short extend)
+static short pose_select_same_group(bContext *C, Object *ob, short extend)
{
- bArmature *arm= (ob)? ob->data : NULL;
- bPose *pose= (ob)? ob->pose : NULL;
+ bArmature *arm = (ob) ? ob->data : NULL;
+ bPose *pose = (ob) ? ob->pose : NULL;
char *group_flags;
int numGroups = 0;
- short changed=0, tagged=0;
+ short changed = 0, tagged = 0;
/* sanity checks */
if (ELEM3(NULL, ob, pose, arm))
return 0;
/* count the number of groups */
- numGroups= BLI_countlist(&pose->agroups);
+ numGroups = BLI_countlist(&pose->agroups);
if (numGroups == 0)
return 0;
/* alloc a small array to keep track of the groups to use
- * - each cell stores on/off state for whether group should be used
+ * - each cell stores on/off state for whether group should be used
* - size is numGroups + 1, since index=0 is used for no-group
*/
- group_flags= MEM_callocN(numGroups+1, "pose_select_same_group");
+ group_flags = MEM_callocN(numGroups + 1, "pose_select_same_group");
- CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pose_bones)
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, visible_pose_bones)
{
/* keep track of group as group to use later? */
if (pchan->bone->flag & BONE_SELECTED) {
group_flags[pchan->agrp_index] = 1;
- tagged= 1;
+ tagged = 1;
}
/* deselect all bones before selecting new ones? */
- if ((extend == 0) && (pchan->bone->flag & BONE_UNSELECTABLE)==0)
+ if ((extend == 0) && (pchan->bone->flag & BONE_UNSELECTABLE) == 0)
pchan->bone->flag &= ~BONE_SELECTED;
}
CTX_DATA_END;
@@ -522,13 +592,13 @@ static short pose_select_same_group (bContext *C, Object *ob, short extend)
/* small optimization: only loop through bones a second time if there are any groups tagged */
if (tagged) {
/* only if group matches (and is not selected or current bone) */
- CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pose_bones)
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, visible_pose_bones)
{
- if ((pchan->bone->flag & BONE_UNSELECTABLE)==0) {
+ if ((pchan->bone->flag & BONE_UNSELECTABLE) == 0) {
/* check if the group used by this bone is counted */
if (group_flags[pchan->agrp_index]) {
pchan->bone->flag |= BONE_SELECTED;
- changed= 1;
+ changed = 1;
}
}
}
@@ -541,25 +611,25 @@ static short pose_select_same_group (bContext *C, Object *ob, short extend)
return changed;
}
-static short pose_select_same_layer (bContext *C, Object *ob, short extend)
+static short pose_select_same_layer(bContext *C, Object *ob, short extend)
{
- bPose *pose= (ob)? ob->pose : NULL;
- bArmature *arm= (ob)? ob->data : NULL;
- short changed= 0;
- int layers= 0;
+ bPose *pose = (ob) ? ob->pose : NULL;
+ bArmature *arm = (ob) ? ob->data : NULL;
+ short changed = 0;
+ int layers = 0;
if (ELEM3(NULL, ob, pose, arm))
return 0;
/* figure out what bones are selected */
- CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pose_bones)
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, visible_pose_bones)
{
/* keep track of layers to use later? */
if (pchan->bone->flag & BONE_SELECTED)
layers |= pchan->bone->layer;
/* deselect all bones before selecting new ones? */
- if ((extend == 0) && (pchan->bone->flag & BONE_UNSELECTABLE)==0)
+ if ((extend == 0) && (pchan->bone->flag & BONE_UNSELECTABLE) == 0)
pchan->bone->flag &= ~BONE_SELECTED;
}
CTX_DATA_END;
@@ -567,12 +637,12 @@ static short pose_select_same_layer (bContext *C, Object *ob, short extend)
return 0;
/* select bones that are on same layers as layers flag */
- CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pose_bones)
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, visible_pose_bones)
{
/* if bone is on a suitable layer, and the bone can have its selection changed, select it */
- if ((layers & pchan->bone->layer) && (pchan->bone->flag & BONE_UNSELECTABLE)==0) {
+ if ((layers & pchan->bone->layer) && (pchan->bone->flag & BONE_UNSELECTABLE) == 0) {
pchan->bone->flag |= BONE_SELECTED;
- changed= 1;
+ changed = 1;
}
}
CTX_DATA_END;
@@ -585,9 +655,9 @@ static int pose_select_same_keyingset(bContext *C, Object *ob, short extend)
KeyingSet *ks = ANIM_scene_get_active_keyingset(CTX_data_scene(C));
KS_Path *ksp;
- bArmature *arm = (ob)? ob->data : NULL;
- bPose *pose= (ob)? ob->pose : NULL;
- short changed= 0;
+ bArmature *arm = (ob) ? ob->data : NULL;
+ bPose *pose = (ob) ? ob->pose : NULL;
+ short changed = 0;
/* sanity checks: validate Keying Set and object */
if ((ks == NULL) || (ANIM_validate_keyingset(C, NULL, ks) != 0))
@@ -598,9 +668,9 @@ static int pose_select_same_keyingset(bContext *C, Object *ob, short extend)
/* if not extending selection, deselect all selected first */
if (extend == 0) {
- CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pose_bones)
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, visible_pose_bones)
{
- if ((pchan->bone->flag & BONE_UNSELECTABLE)==0)
+ if ((pchan->bone->flag & BONE_UNSELECTABLE) == 0)
pchan->bone->flag &= ~BONE_SELECTED;
}
CTX_DATA_END;
@@ -616,12 +686,12 @@ static int pose_select_same_keyingset(bContext *C, Object *ob, short extend)
char *boneName = BLI_getQuotedStr(ksp->rna_path, "bones[");
if (boneName) {
- bPoseChannel *pchan = get_pose_channel(pose, boneName);
+ bPoseChannel *pchan = BKE_pose_channel_find_name(pose, boneName);
if (pchan) {
/* select if bone is visible and can be affected */
if ((PBONE_VISIBLE(arm, pchan->bone)) &&
- (pchan->bone->flag & BONE_UNSELECTABLE)==0)
+ (pchan->bone->flag & BONE_UNSELECTABLE) == 0)
{
pchan->bone->flag |= BONE_SELECTED;
changed = 1;
@@ -638,10 +708,10 @@ static int pose_select_same_keyingset(bContext *C, Object *ob, short extend)
return changed;
}
-static int pose_select_grouped_exec (bContext *C, wmOperator *op)
+static int pose_select_grouped_exec(bContext *C, wmOperator *op)
{
- Object *ob= object_pose_armature_get(CTX_data_active_object(C));
- short extend= RNA_boolean_get(op->ptr, "extend");
+ Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
+ short extend = RNA_boolean_get(op->ptr, "extend");
short changed = 0;
/* sanity check */
@@ -653,18 +723,18 @@ static int pose_select_grouped_exec (bContext *C, wmOperator *op)
*/
switch (RNA_enum_get(op->ptr, "type")) {
case 1: /* group */
- changed= pose_select_same_group(C, ob, extend);
+ changed = pose_select_same_group(C, ob, extend);
break;
case 2: /* Keying Set */
- changed= pose_select_same_keyingset(C, ob, extend);
+ changed = pose_select_same_keyingset(C, ob, extend);
break;
default: /* layer */
- changed= pose_select_same_layer(C, ob, extend);
+ changed = pose_select_same_layer(C, ob, extend);
break;
}
/* notifiers for updates */
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
/* report done status */
if (changed)
@@ -673,7 +743,7 @@ static int pose_select_grouped_exec (bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
-void POSE_OT_select_grouped (wmOperatorType *ot)
+void POSE_OT_select_grouped(wmOperatorType *ot)
{
static EnumPropertyItem prop_select_grouped_types[] = {
{0, "LAYER", 0, "Layer", "Shared layers"},
@@ -693,7 +763,7 @@ void POSE_OT_select_grouped (wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first");
@@ -704,25 +774,25 @@ void POSE_OT_select_grouped (wmOperatorType *ot)
/* ********************************************** */
/* context active object, or weightpainted object with armature in posemode */
-static int pose_bone_flip_active_exec (bContext *C, wmOperator *UNUSED(op))
+static int pose_bone_flip_active_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *ob_act= CTX_data_active_object(C);
- Object *ob= object_pose_armature_get(ob_act);
+ Object *ob_act = CTX_data_active_object(C);
+ Object *ob = BKE_object_pose_armature_get(ob_act);
if (ob && (ob->mode & OB_MODE_POSE)) {
- bArmature *arm= ob->data;
+ bArmature *arm = ob->data;
if (arm->act_bone) {
bPoseChannel *pchanf;
char name[MAXBONENAME];
flip_side_name(name, arm->act_bone->name, TRUE);
- pchanf= get_pose_channel(ob->pose, name);
+ pchanf = BKE_pose_channel_find_name(ob->pose, name);
if (pchanf && pchanf->bone != arm->act_bone) {
arm->act_bone->flag &= ~BONE_SELECTED;
pchanf->bone->flag |= BONE_SELECTED;
- arm->act_bone= pchanf->bone;
+ arm->act_bone = pchanf->bone;
/* in weightpaint we select the associated vertex group too */
if (ob_act->mode & OB_MODE_WEIGHT_PAINT) {
@@ -730,7 +800,7 @@ static int pose_bone_flip_active_exec (bContext *C, wmOperator *UNUSED(op))
DAG_id_tag_update(&ob_act->id, OB_RECALC_DATA);
}
- WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, ob);
return OPERATOR_FINISHED;
}
@@ -752,7 +822,7 @@ void POSE_OT_select_flip_active(wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
@@ -760,49 +830,49 @@ void POSE_OT_select_flip_active(wmOperatorType *ot)
#if 0 /* UNUSED 2.5 */
static void pose_copy_menu(Scene *scene)
{
- Object *obedit= scene->obedit; // XXX context
- Object *ob= OBACT;
+ Object *obedit = scene->obedit; // XXX context
+ Object *ob = OBACT;
bArmature *arm;
bPoseChannel *pchan, *pchanact;
- short nr=0;
- int i=0;
+ short nr = 0;
+ int i = 0;
/* paranoia checks */
if (ELEM(NULL, ob, ob->pose)) return;
- if ((ob==obedit) || (ob->mode & OB_MODE_POSE)==0) return;
+ if ((ob == obedit) || (ob->mode & OB_MODE_POSE) == 0) return;
- pchan= get_active_posechannel(ob);
+ pchan = BKE_pose_channel_active(ob);
- if (pchan==NULL) return;
- pchanact= pchan;
- arm= ob->data;
+ if (pchan == NULL) return;
+ pchanact = pchan;
+ arm = ob->data;
/* if proxy-protected bones selected, some things (such as locks + displays) shouldn't be changeable,
* but for constraints (just add local constraints)
*/
if (pose_has_protected_selected(ob, 0)) {
- i= BLI_countlist(&(pchanact->constraints)); /* if there are 24 or less, allow for the user to select constraints */
+ i = BLI_countlist(&(pchanact->constraints)); /* if there are 24 or less, allow for the user to select constraints */
if (i < 25)
- nr= pupmenu("Copy Pose Attributes %t|Local Location%x1|Local Rotation%x2|Local Size%x3|%l|Visual Location %x9|Visual Rotation%x10|Visual Size%x11|%l|Constraints (All)%x4|Constraints...%x5");
+ nr = pupmenu("Copy Pose Attributes %t|Local Location%x1|Local Rotation%x2|Local Size%x3|%l|Visual Location %x9|Visual Rotation%x10|Visual Size%x11|%l|Constraints (All)%x4|Constraints...%x5");
else
- nr= pupmenu("Copy Pose Attributes %t|Local Location%x1|Local Rotation%x2|Local Size%x3|%l|Visual Location %x9|Visual Rotation%x10|Visual Size%x11|%l|Constraints (All)%x4");
+ nr = pupmenu("Copy Pose Attributes %t|Local Location%x1|Local Rotation%x2|Local Size%x3|%l|Visual Location %x9|Visual Rotation%x10|Visual Size%x11|%l|Constraints (All)%x4");
}
else {
- i= BLI_countlist(&(pchanact->constraints)); /* if there are 24 or less, allow for the user to select constraints */
+ i = BLI_countlist(&(pchanact->constraints)); /* if there are 24 or less, allow for the user to select constraints */
if (i < 25)
- nr= pupmenu("Copy Pose Attributes %t|Local Location%x1|Local Rotation%x2|Local Size%x3|%l|Visual Location %x9|Visual Rotation%x10|Visual Size%x11|%l|Constraints (All)%x4|Constraints...%x5|%l|Transform Locks%x6|IK Limits%x7|Bone Shape%x8");
+ nr = pupmenu("Copy Pose Attributes %t|Local Location%x1|Local Rotation%x2|Local Size%x3|%l|Visual Location %x9|Visual Rotation%x10|Visual Size%x11|%l|Constraints (All)%x4|Constraints...%x5|%l|Transform Locks%x6|IK Limits%x7|Bone Shape%x8");
else
- nr= pupmenu("Copy Pose Attributes %t|Local Location%x1|Local Rotation%x2|Local Size%x3|%l|Visual Location %x9|Visual Rotation%x10|Visual Size%x11|%l|Constraints (All)%x4|%l|Transform Locks%x6|IK Limits%x7|Bone Shape%x8");
+ nr = pupmenu("Copy Pose Attributes %t|Local Location%x1|Local Rotation%x2|Local Size%x3|%l|Visual Location %x9|Visual Rotation%x10|Visual Size%x11|%l|Constraints (All)%x4|%l|Transform Locks%x6|IK Limits%x7|Bone Shape%x8");
}
if (nr <= 0)
return;
if (nr != 5) {
- for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
- if ( (arm->layer & pchan->bone->layer) &&
- (pchan->bone->flag & BONE_SELECTED) &&
- (pchan != pchanact) )
+ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
+ if ((arm->layer & pchan->bone->layer) &&
+ (pchan->bone->flag & BONE_SELECTED) &&
+ (pchan != pchanact) )
{
switch (nr) {
case 1: /* Local Location */
@@ -827,7 +897,7 @@ static void pose_copy_menu(Scene *scene)
bConstraint *con;
/* add proxy-local tags */
- for (con= tmp_constraints.first; con; con= con->next)
+ for (con = tmp_constraints.first; con; con = con->next)
con->flag |= CONSTRAINT_PROXY_LOCAL;
}
BLI_movelisttolist(&pchan->constraints, &tmp_constraints);
@@ -838,7 +908,7 @@ static void pose_copy_menu(Scene *scene)
if (ob->pose)
ob->pose->flag |= POSE_RECALC;
}
- break;
+ break;
case 6: /* Transform Locks */
pchan->protectflag = pchanact->protectflag;
break;
@@ -848,42 +918,42 @@ static void pose_copy_menu(Scene *scene)
copy_v3_v3(pchan->limitmin, pchanact->limitmin);
copy_v3_v3(pchan->limitmax, pchanact->limitmax);
copy_v3_v3(pchan->stiffness, pchanact->stiffness);
- pchan->ikstretch= pchanact->ikstretch;
- pchan->ikrotweight= pchanact->ikrotweight;
- pchan->iklinweight= pchanact->iklinweight;
+ pchan->ikstretch = pchanact->ikstretch;
+ pchan->ikrotweight = pchanact->ikrotweight;
+ pchan->iklinweight = pchanact->iklinweight;
}
- break;
+ break;
case 8: /* Custom Bone Shape */
pchan->custom = pchanact->custom;
break;
case 9: /* Visual Location */
- armature_loc_pose_to_bone(pchan, pchanact->pose_mat[3], pchan->loc);
+ BKE_armature_loc_pose_to_bone(pchan, pchanact->pose_mat[3], pchan->loc);
break;
case 10: /* Visual Rotation */
{
float delta_mat[4][4];
- armature_mat_pose_to_bone(pchan, pchanact->pose_mat, delta_mat);
+ BKE_armature_mat_pose_to_bone(pchan, pchanact->pose_mat, delta_mat);
if (pchan->rotmode == ROT_MODE_AXISANGLE) {
float tmp_quat[4];
/* need to convert to quat first (in temp var)... */
- mat4_to_quat( tmp_quat,delta_mat);
- quat_to_axis_angle( pchan->rotAxis, &pchan->rotAngle,tmp_quat);
+ mat4_to_quat(tmp_quat, delta_mat);
+ quat_to_axis_angle(pchan->rotAxis, &pchan->rotAngle, tmp_quat);
}
else if (pchan->rotmode == ROT_MODE_QUAT)
- mat4_to_quat( pchan->quat,delta_mat);
+ mat4_to_quat(pchan->quat, delta_mat);
else
- mat4_to_eulO( pchan->eul, pchan->rotmode,delta_mat);
+ mat4_to_eulO(pchan->eul, pchan->rotmode, delta_mat);
}
- break;
+ break;
case 11: /* Visual Size */
{
float delta_mat[4][4], size[4];
- armature_mat_pose_to_bone(pchan, pchanact->pose_mat, delta_mat);
- mat4_to_size( size,delta_mat);
+ BKE_armature_mat_pose_to_bone(pchan, pchanact->pose_mat, delta_mat);
+ mat4_to_size(size, delta_mat);
copy_v3_v3(pchan->size, size);
}
}
@@ -892,14 +962,14 @@ static void pose_copy_menu(Scene *scene)
}
else { /* constraints, optional (note: max we can have is 24 constraints) */
bConstraint *con, *con_back;
- int const_toggle[24]= {0}; /* XXX, initialize as 0 to quiet errors */
+ int const_toggle[24] = {0}; /* XXX, initialize as 0 to quiet errors */
ListBase const_copy = {NULL, NULL};
BLI_duplicatelist(&const_copy, &(pchanact->constraints));
/* build the puplist of constraints */
- for (con = pchanact->constraints.first, i=0; con; con=con->next, i++) {
- const_toggle[i]= 1;
+ for (con = pchanact->constraints.first, i = 0; con; con = con->next, i++) {
+ const_toggle[i] = 1;
// add_numbut(i, TOG|INT, con->name, 0, 0, &(const_toggle[i]), "");
}
@@ -909,22 +979,22 @@ static void pose_copy_menu(Scene *scene)
// }
/* now build a new listbase from the options selected */
- for (i=0, con=const_copy.first; con; i++) {
+ for (i = 0, con = const_copy.first; con; i++) {
/* if not selected, free/remove it from the list */
if (!const_toggle[i]) {
- con_back= con->next;
+ con_back = con->next;
BLI_freelinkN(&const_copy, con);
- con= con_back;
+ con = con_back;
}
else
- con= con->next;
+ con = con->next;
}
/* Copy the temo listbase to the selected posebones */
- for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
- if ( (arm->layer & pchan->bone->layer) &&
- (pchan->bone->flag & BONE_SELECTED) &&
- (pchan!=pchanact) )
+ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
+ if ((arm->layer & pchan->bone->layer) &&
+ (pchan->bone->flag & BONE_SELECTED) &&
+ (pchan != pchanact) )
{
ListBase tmp_constraints = {NULL, NULL};
@@ -934,7 +1004,7 @@ static void pose_copy_menu(Scene *scene)
copy_constraints(&tmp_constraints, &const_copy, TRUE);
if ((ob->proxy) && (pchan->bone->layer & arm->layer_protected)) {
/* add proxy-local tags */
- for (con= tmp_constraints.first; con; con= con->next)
+ for (con = tmp_constraints.first; con; con = con->next)
con->flag |= CONSTRAINT_PROXY_LOCAL;
}
BLI_movelisttolist(&pchan->constraints, &tmp_constraints);
@@ -944,13 +1014,13 @@ static void pose_copy_menu(Scene *scene)
}
}
BLI_freelistN(&const_copy);
- update_pose_constraint_flags(ob->pose); /* we could work out the flags but its simpler to do this */
+ BKE_pose_update_constraint_flags(ob->pose); /* we could work out the flags but its simpler to do this */
if (ob->pose)
ob->pose->flag |= POSE_RECALC;
}
- DAG_id_tag_update(&ob->id, OB_RECALC_DATA); // and all its relations
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA); // and all its relations
BIF_undo_push("Copy Pose Attributes");
@@ -967,7 +1037,7 @@ void free_posebuf(void)
if (g_posebuf) {
bPoseChannel *pchan;
- for (pchan= g_posebuf->chanbase.first; pchan; pchan= pchan->next) {
+ for (pchan = g_posebuf->chanbase.first; pchan; pchan = pchan->next) {
if (pchan->prop) {
IDP_FreeProperty(pchan->prop);
MEM_freeN(pchan->prop);
@@ -979,20 +1049,20 @@ void free_posebuf(void)
MEM_freeN(g_posebuf);
}
- g_posebuf=NULL;
+ g_posebuf = NULL;
}
/* This function is used to indicate that a bone is selected
* and needs to be included in copy buffer (used to be for inserting keys)
*/
-static void set_pose_keys (Object *ob)
+static void set_pose_keys(Object *ob)
{
- bArmature *arm= ob->data;
+ bArmature *arm = ob->data;
bPoseChannel *chan;
if (ob->pose) {
- for (chan=ob->pose->chanbase.first; chan; chan=chan->next) {
- Bone *bone= chan->bone;
+ for (chan = ob->pose->chanbase.first; chan; chan = chan->next) {
+ Bone *bone = chan->bone;
if ((bone) && (bone->flag & BONE_SELECTED) && (arm->layer & bone->layer))
chan->flag |= POSE_KEY;
else
@@ -1009,7 +1079,7 @@ static void set_pose_keys (Object *ob)
*
* > returns: whether the bone that we pasted to if we succeeded
*/
-static bPoseChannel *pose_bone_do_paste (Object *ob, bPoseChannel *chan, short selOnly, short flip)
+static bPoseChannel *pose_bone_do_paste(Object *ob, bPoseChannel *chan, short selOnly, short flip)
{
bPoseChannel *pchan;
char name[MAXBONENAME];
@@ -1017,20 +1087,20 @@ static bPoseChannel *pose_bone_do_paste (Object *ob, bPoseChannel *chan, short s
/* get the name - if flipping, we must flip this first */
if (flip)
- flip_side_name(name, chan->name, 0); /* 0 = don't strip off number extensions */
+ flip_side_name(name, chan->name, 0); /* 0 = don't strip off number extensions */
else
BLI_strncpy(name, chan->name, sizeof(name));
/* only copy when:
- * 1) channel exists - poses are not meant to add random channels to anymore
- * 2) if selection-masking is on, channel is selected - only selected bones get pasted on, allowing making both sides symmetrical
+ * 1) channel exists - poses are not meant to add random channels to anymore
+ * 2) if selection-masking is on, channel is selected - only selected bones get pasted on, allowing making both sides symmetrical
*/
- pchan= get_pose_channel(ob->pose, name);
+ pchan = BKE_pose_channel_find_name(ob->pose, name);
if (selOnly)
- paste_ok= ((pchan) && (pchan->bone->flag & BONE_SELECTED));
+ paste_ok = ((pchan) && (pchan->bone->flag & BONE_SELECTED));
else
- paste_ok= ((pchan != NULL));
+ paste_ok = ((pchan != NULL));
/* continue? */
if (paste_ok) {
@@ -1039,7 +1109,7 @@ static bPoseChannel *pose_bone_do_paste (Object *ob, bPoseChannel *chan, short s
*/
copy_v3_v3(pchan->loc, chan->loc);
copy_v3_v3(pchan->size, chan->size);
- pchan->flag= chan->flag;
+ pchan->flag = chan->flag;
/* check if rotation modes are compatible (i.e. do they need any conversions) */
if (pchan->rotmode == chan->rotmode) {
@@ -1058,9 +1128,9 @@ static bPoseChannel *pose_bone_do_paste (Object *ob, bPoseChannel *chan, short s
else if (pchan->rotmode > 0) {
/* quat/axis-angle to euler */
if (chan->rotmode == ROT_MODE_AXISANGLE)
- axis_angle_to_eulO( pchan->eul, pchan->rotmode,chan->rotAxis, chan->rotAngle);
+ axis_angle_to_eulO(pchan->eul, pchan->rotmode, chan->rotAxis, chan->rotAngle);
else
- quat_to_eulO( pchan->eul, pchan->rotmode,chan->quat);
+ quat_to_eulO(pchan->eul, pchan->rotmode, chan->quat);
}
else if (pchan->rotmode == ROT_MODE_AXISANGLE) {
/* quat/euler to axis angle */
@@ -1079,7 +1149,7 @@ static bPoseChannel *pose_bone_do_paste (Object *ob, bPoseChannel *chan, short s
/* paste flipped pose? */
if (flip) {
- pchan->loc[0]*= -1;
+ pchan->loc[0] *= -1;
/* has to be done as eulers... */
if (pchan->rotmode > 0) {
@@ -1090,8 +1160,8 @@ static bPoseChannel *pose_bone_do_paste (Object *ob, bPoseChannel *chan, short s
float eul[3];
axis_angle_to_eulO(eul, EULER_ORDER_DEFAULT, pchan->rotAxis, pchan->rotAngle);
- eul[1]*= -1;
- eul[2]*= -1;
+ eul[1] *= -1;
+ eul[2] *= -1;
eulO_to_axis_angle(pchan->rotAxis, &pchan->rotAngle, eul, EULER_ORDER_DEFAULT);
}
else {
@@ -1099,8 +1169,8 @@ static bPoseChannel *pose_bone_do_paste (Object *ob, bPoseChannel *chan, short s
normalize_qt(pchan->quat);
quat_to_eul(eul, pchan->quat);
- eul[1]*= -1;
- eul[2]*= -1;
+ eul[1] *= -1;
+ eul[2] *= -1;
eul_to_quat(pchan->quat, eul);
}
}
@@ -1116,7 +1186,7 @@ static bPoseChannel *pose_bone_do_paste (Object *ob, bPoseChannel *chan, short s
}
else {
/* no existing properties, so assume that we want copies too? */
- pchan->prop= IDP_CopyProperty(chan->prop);
+ pchan->prop = IDP_CopyProperty(chan->prop);
}
}
}
@@ -1127,9 +1197,9 @@ static bPoseChannel *pose_bone_do_paste (Object *ob, bPoseChannel *chan, short s
/* ---- */
-static int pose_copy_exec (bContext *C, wmOperator *op)
+static int pose_copy_exec(bContext *C, wmOperator *op)
{
- Object *ob= object_pose_armature_get(CTX_data_active_object(C));
+ Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
/* sanity checking */
if (ELEM(NULL, ob, ob->pose)) {
@@ -1142,13 +1212,13 @@ static int pose_copy_exec (bContext *C, wmOperator *op)
/* sets chan->flag to POSE_KEY if bone selected, then copy those bones to the buffer */
set_pose_keys(ob);
- copy_pose(&g_posebuf, ob->pose, 0);
+ BKE_pose_copy_data(&g_posebuf, ob->pose, 0);
return OPERATOR_FINISHED;
}
-void POSE_OT_copy (wmOperatorType *ot)
+void POSE_OT_copy(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Copy Pose";
@@ -1165,13 +1235,13 @@ void POSE_OT_copy (wmOperatorType *ot)
/* ---- */
-static int pose_paste_exec (bContext *C, wmOperator *op)
+static int pose_paste_exec(bContext *C, wmOperator *op)
{
- Object *ob= object_pose_armature_get(CTX_data_active_object(C));
- Scene *scene= CTX_data_scene(C);
+ Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
+ Scene *scene = CTX_data_scene(C);
bPoseChannel *chan;
- int flip= RNA_boolean_get(op->ptr, "flipped");
- int selOnly= RNA_boolean_get(op->ptr, "selected_mask");
+ int flip = RNA_boolean_get(op->ptr, "flipped");
+ int selOnly = RNA_boolean_get(op->ptr, "selected_mask");
/* get KeyingSet to use */
KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_LOC_ROT_SCALE_ID);
@@ -1194,7 +1264,7 @@ static int pose_paste_exec (bContext *C, wmOperator *op)
}
/* Safely merge all of the channels in the buffer pose into any existing pose */
- for (chan= g_posebuf->chanbase.first; chan; chan=chan->next) {
+ for (chan = g_posebuf->chanbase.first; chan; chan = chan->next) {
if (chan->flag & POSE_KEY) {
/* try to perform paste on this bone */
bPoseChannel *pchan = pose_bone_do_paste(ob, chan, selOnly, flip);
@@ -1210,12 +1280,12 @@ static int pose_paste_exec (bContext *C, wmOperator *op)
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
/* notifiers for updates */
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
return OPERATOR_FINISHED;
}
-void POSE_OT_paste (wmOperatorType *ot)
+void POSE_OT_paste(wmOperatorType *ot)
{
PropertyRNA *prop;
@@ -1229,7 +1299,7 @@ void POSE_OT_paste (wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flag */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
prop = RNA_def_boolean(ot->srna, "flipped", FALSE, "Flipped on X-Axis", "Paste the stored pose flipped on to current pose");
@@ -1241,31 +1311,31 @@ void POSE_OT_paste (wmOperatorType *ot)
/* ********************************************** */
/* Bone Groups */
-static int pose_group_add_exec (bContext *C, wmOperator *UNUSED(op))
+static int pose_group_add_exec(bContext *C, wmOperator *UNUSED(op))
{
- ScrArea *sa= CTX_wm_area(C);
+ ScrArea *sa = CTX_wm_area(C);
Object *ob;
/* since this call may also be used from the buttons window, we need to check for where to get the object */
if (sa->spacetype == SPACE_BUTS)
- ob= ED_object_context(C);
+ ob = ED_object_context(C);
else
- ob= object_pose_armature_get(CTX_data_active_object(C));
+ ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
/* only continue if there's an object */
if (ob == NULL)
return OPERATOR_CANCELLED;
/* for now, just call the API function for this */
- pose_add_group(ob);
+ BKE_pose_add_group(ob);
/* notifiers for updates */
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
return OPERATOR_FINISHED;
}
-void POSE_OT_group_add (wmOperatorType *ot)
+void POSE_OT_group_add(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Add Bone Group";
@@ -1277,35 +1347,35 @@ void POSE_OT_group_add (wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
-static int pose_group_remove_exec (bContext *C, wmOperator *UNUSED(op))
+static int pose_group_remove_exec(bContext *C, wmOperator *UNUSED(op))
{
- ScrArea *sa= CTX_wm_area(C);
+ ScrArea *sa = CTX_wm_area(C);
Object *ob;
/* since this call may also be used from the buttons window, we need to check for where to get the object */
if (sa->spacetype == SPACE_BUTS)
- ob= ED_object_context(C);
+ ob = ED_object_context(C);
else
- ob= object_pose_armature_get(CTX_data_active_object(C));
+ ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
/* only continue if there's an object */
if (ob == NULL)
return OPERATOR_CANCELLED;
/* for now, just call the API function for this */
- pose_remove_group(ob);
+ BKE_pose_remove_group(ob);
/* notifiers for updates */
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
return OPERATOR_FINISHED;
}
-void POSE_OT_group_remove (wmOperatorType *ot)
+void POSE_OT_group_remove(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Remove Bone Group";
@@ -1317,15 +1387,15 @@ void POSE_OT_group_remove (wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ------------ */
/* invoke callback which presents a list of bone-groups for the user to choose from */
-static int pose_groups_menu_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(evt))
+static int pose_groups_menu_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(evt))
{
- ScrArea *sa= CTX_wm_area(C);
+ ScrArea *sa = CTX_wm_area(C);
Object *ob;
bPose *pose;
@@ -1336,20 +1406,20 @@ static int pose_groups_menu_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED
/* since this call may also be used from the buttons window, we need to check for where to get the object */
if (sa->spacetype == SPACE_BUTS)
- ob= ED_object_context(C);
+ ob = ED_object_context(C);
else
- ob= object_pose_armature_get(CTX_data_active_object(C));
+ ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
/* only continue if there's an object, and a pose there too */
if (ELEM(NULL, ob, ob->pose))
return OPERATOR_CANCELLED;
- pose= ob->pose;
+ pose = ob->pose;
/* if there's no active group (or active is invalid), create a new menu to find it */
if (pose->active_group <= 0) {
/* create a new menu, and start populating it with group names */
- pup= uiPupMenuBegin(C, op->type->name, ICON_NONE);
- layout= uiPupMenuLayout(pup);
+ pup = uiPupMenuBegin(C, op->type->name, ICON_NONE);
+ layout = uiPupMenuLayout(pup);
/* special entry - allow to create new group, then use that
* (not to be used for removing though)
@@ -1360,7 +1430,7 @@ static int pose_groups_menu_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED
}
/* add entries for each group */
- for (grp= pose->agroups.first, i=1; grp; grp=grp->next, i++)
+ for (grp = pose->agroups.first, i = 1; grp; grp = grp->next, i++)
uiItemIntO(layout, grp->name, ICON_NONE, op->idname, "type", i);
/* finish building the menu, and process it (should result in calling self again) */
@@ -1376,42 +1446,42 @@ static int pose_groups_menu_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED
}
/* Assign selected pchans to the bone group that the user selects */
-static int pose_group_assign_exec (bContext *C, wmOperator *op)
+static int pose_group_assign_exec(bContext *C, wmOperator *op)
{
- ScrArea *sa= CTX_wm_area(C);
+ ScrArea *sa = CTX_wm_area(C);
Object *ob;
bPose *pose;
- short done= 0;
+ short done = 0;
/* since this call may also be used from the buttons window, we need to check for where to get the object */
if (sa->spacetype == SPACE_BUTS)
- ob= ED_object_context(C);
+ ob = ED_object_context(C);
else
- ob= object_pose_armature_get(CTX_data_active_object(C));
+ ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
/* only continue if there's an object, and a pose there too */
if (ELEM(NULL, ob, ob->pose))
return OPERATOR_CANCELLED;
- pose= ob->pose;
+ pose = ob->pose;
/* set the active group number to the one from operator props
- * - if 0 after this, make a new group...
+ * - if 0 after this, make a new group...
*/
- pose->active_group= RNA_int_get(op->ptr, "type");
+ pose->active_group = RNA_int_get(op->ptr, "type");
if (pose->active_group == 0)
- pose_add_group(ob);
+ BKE_pose_add_group(ob);
/* add selected bones to group then */
- CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones)
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones)
{
- pchan->agrp_index= pose->active_group;
- done= 1;
+ pchan->agrp_index = pose->active_group;
+ done = 1;
}
CTX_DATA_END;
/* notifiers for updates */
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
/* report done status */
if (done)
@@ -1420,7 +1490,7 @@ static int pose_group_assign_exec (bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
-void POSE_OT_group_assign (wmOperatorType *ot)
+void POSE_OT_group_assign(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Add Selected to Bone Group";
@@ -1433,41 +1503,41 @@ void POSE_OT_group_assign (wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_int(ot->srna, "type", 0, 0, 10, "Bone Group Index", "", 0, INT_MAX);
}
-static int pose_group_unassign_exec (bContext *C, wmOperator *UNUSED(op))
+static int pose_group_unassign_exec(bContext *C, wmOperator *UNUSED(op))
{
- ScrArea *sa= CTX_wm_area(C);
+ ScrArea *sa = CTX_wm_area(C);
Object *ob;
- short done= 0;
+ short done = 0;
/* since this call may also be used from the buttons window, we need to check for where to get the object */
if (sa->spacetype == SPACE_BUTS)
- ob= ED_object_context(C);
+ ob = ED_object_context(C);
else
- ob= object_pose_armature_get(CTX_data_active_object(C));
+ ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
/* only continue if there's an object, and a pose there too */
if (ELEM(NULL, ob, ob->pose))
return OPERATOR_CANCELLED;
/* find selected bones to remove from all bone groups */
- CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones)
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones)
{
if (pchan->agrp_index) {
- pchan->agrp_index= 0;
- done= 1;
+ pchan->agrp_index = 0;
+ done = 1;
}
}
CTX_DATA_END;
/* notifiers for updates */
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
/* report done status */
if (done)
@@ -1476,7 +1546,7 @@ static int pose_group_unassign_exec (bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
}
-void POSE_OT_group_unassign (wmOperatorType *ot)
+void POSE_OT_group_unassign(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Remove Selected from Bone Groups";
@@ -1488,16 +1558,16 @@ void POSE_OT_group_unassign (wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int group_move_exec(bContext *C, wmOperator *op)
{
Object *ob = ED_object_context(C);
- bPose *pose= (ob) ? ob->pose : NULL;
+ bPose *pose = (ob) ? ob->pose : NULL;
bPoseChannel *pchan;
bActionGroup *grp;
- int dir= RNA_enum_get(op->ptr, "direction");
+ int dir = RNA_enum_get(op->ptr, "direction");
int grpIndexA, grpIndexB;
if (ELEM(NULL, ob, pose))
@@ -1506,7 +1576,7 @@ static int group_move_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* get group to move */
- grp= BLI_findlink(&pose->agroups, pose->active_group-1);
+ grp = BLI_findlink(&pose->agroups, pose->active_group - 1);
if (grp == NULL)
return OPERATOR_CANCELLED;
@@ -1538,15 +1608,15 @@ static int group_move_exec(bContext *C, wmOperator *op)
}
/* fix changed bone group indices in bones (swap grpIndexA with grpIndexB) */
- for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
+ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
if (pchan->agrp_index == grpIndexB)
- pchan->agrp_index= grpIndexA;
+ pchan->agrp_index = grpIndexA;
else if (pchan->agrp_index == grpIndexA)
- pchan->agrp_index= grpIndexB;
+ pchan->agrp_index = grpIndexB;
}
/* notifiers for updates */
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
return OPERATOR_FINISHED;
}
@@ -1569,7 +1639,7 @@ void POSE_OT_group_move(wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_enum(ot->srna, "direction", group_slot_move, 0, "Direction", "Direction to move, UP or DOWN");
}
@@ -1577,14 +1647,14 @@ void POSE_OT_group_move(wmOperatorType *ot)
/* bone group sort element */
typedef struct tSortActionGroup {
bActionGroup *agrp;
- int index;
+ int index;
} tSortActionGroup;
/* compare bone groups by name */
static int compare_agroup(const void *sgrp_a_ptr, const void *sgrp_b_ptr)
{
- tSortActionGroup *sgrp_a= (tSortActionGroup *)sgrp_a_ptr;
- tSortActionGroup *sgrp_b= (tSortActionGroup *)sgrp_b_ptr;
+ tSortActionGroup *sgrp_a = (tSortActionGroup *)sgrp_a_ptr;
+ tSortActionGroup *sgrp_b = (tSortActionGroup *)sgrp_b_ptr;
return strcmp(sgrp_a->agrp->name, sgrp_b->agrp->name);
}
@@ -1592,7 +1662,7 @@ static int compare_agroup(const void *sgrp_a_ptr, const void *sgrp_b_ptr)
static int group_sort_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *ob = ED_object_context(C);
- bPose *pose= (ob) ? ob->pose : NULL;
+ bPose *pose = (ob) ? ob->pose : NULL;
bPoseChannel *pchan;
tSortActionGroup *agrp_array;
bActionGroup *agrp;
@@ -1607,26 +1677,26 @@ static int group_sort_exec(bContext *C, wmOperator *UNUSED(op))
/* create temporary array with bone groups and indices */
agrp_count = BLI_countlist(&pose->agroups);
agrp_array = MEM_mallocN(sizeof(tSortActionGroup) * agrp_count, "sort bone groups");
- for (agrp= pose->agroups.first, i= 0; agrp; agrp= agrp->next, i++) {
+ for (agrp = pose->agroups.first, i = 0; agrp; agrp = agrp->next, i++) {
BLI_assert(i < agrp_count);
agrp_array[i].agrp = agrp;
- agrp_array[i].index = i+1;
+ agrp_array[i].index = i + 1;
}
/* sort bone groups by name */
qsort(agrp_array, agrp_count, sizeof(tSortActionGroup), compare_agroup);
/* create sorted bone group list from sorted array */
- pose->agroups.first= pose->agroups.last= NULL;
- for (i= 0; i < agrp_count; i++) {
+ pose->agroups.first = pose->agroups.last = NULL;
+ for (i = 0; i < agrp_count; i++) {
BLI_addtail(&pose->agroups, agrp_array[i].agrp);
}
/* fix changed bone group indizes in bones */
- for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
- for (i= 0; i < agrp_count; i++) {
+ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
+ for (i = 0; i < agrp_count; i++) {
if (pchan->agrp_index == agrp_array[i].index) {
- pchan->agrp_index= i+1;
+ pchan->agrp_index = i + 1;
break;
}
}
@@ -1636,7 +1706,7 @@ static int group_sort_exec(bContext *C, wmOperator *UNUSED(op))
MEM_freeN(agrp_array);
/* notifiers for updates */
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
return OPERATOR_FINISHED;
}
@@ -1653,16 +1723,16 @@ void POSE_OT_group_sort(wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static void pose_group_select(bContext *C, Object *ob, int select)
{
- bPose *pose= ob->pose;
+ bPose *pose = ob->pose;
- CTX_DATA_BEGIN(C, bPoseChannel*, pchan, visible_pose_bones)
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, visible_pose_bones)
{
- if ((pchan->bone->flag & BONE_UNSELECTABLE)==0) {
+ if ((pchan->bone->flag & BONE_UNSELECTABLE) == 0) {
if (select) {
if (pchan->agrp_index == pose->active_group)
pchan->bone->flag |= BONE_SELECTED;
@@ -1676,16 +1746,16 @@ static void pose_group_select(bContext *C, Object *ob, int select)
CTX_DATA_END;
}
-static int pose_group_select_exec (bContext *C, wmOperator *UNUSED(op))
+static int pose_group_select_exec(bContext *C, wmOperator *UNUSED(op))
{
- ScrArea *sa= CTX_wm_area(C);
+ ScrArea *sa = CTX_wm_area(C);
Object *ob;
/* since this call may also be used from the buttons window, we need to check for where to get the object */
if (sa->spacetype == SPACE_BUTS)
- ob= ED_object_context(C);
+ ob = ED_object_context(C);
else
- ob= object_pose_armature_get(CTX_data_active_object(C));
+ ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
/* only continue if there's an object, and a pose there too */
if (ELEM(NULL, ob, ob->pose))
@@ -1694,12 +1764,12 @@ static int pose_group_select_exec (bContext *C, wmOperator *UNUSED(op))
pose_group_select(C, ob, 1);
/* notifiers for updates */
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
return OPERATOR_FINISHED;
}
-void POSE_OT_group_select (wmOperatorType *ot)
+void POSE_OT_group_select(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Select Bones of Bone Group";
@@ -1711,19 +1781,19 @@ void POSE_OT_group_select (wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
-static int pose_group_deselect_exec (bContext *C, wmOperator *UNUSED(op))
+static int pose_group_deselect_exec(bContext *C, wmOperator *UNUSED(op))
{
- ScrArea *sa= CTX_wm_area(C);
+ ScrArea *sa = CTX_wm_area(C);
Object *ob;
/* since this call may also be used from the buttons window, we need to check for where to get the object */
if (sa->spacetype == SPACE_BUTS)
- ob= ED_object_context(C);
+ ob = ED_object_context(C);
else
- ob= object_pose_armature_get(CTX_data_active_object(C));
+ ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
/* only continue if there's an object, and a pose there too */
if (ELEM(NULL, ob, ob->pose))
@@ -1732,12 +1802,12 @@ static int pose_group_deselect_exec (bContext *C, wmOperator *UNUSED(op))
pose_group_select(C, ob, 0);
/* notifiers for updates */
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
return OPERATOR_FINISHED;
}
-void POSE_OT_group_deselect (wmOperatorType *ot)
+void POSE_OT_group_deselect(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Deselect Bone Group";
@@ -1749,23 +1819,23 @@ void POSE_OT_group_deselect (wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ********************************************** */
-static int pose_flip_names_exec (bContext *C, wmOperator *UNUSED(op))
+static int pose_flip_names_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *ob= object_pose_armature_get(CTX_data_active_object(C));
+ Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
bArmature *arm;
/* paranoia checks */
if (ELEM(NULL, ob, ob->pose))
return OPERATOR_CANCELLED;
- arm= ob->data;
+ arm = ob->data;
/* loop through selected bones, auto-naming them */
- CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones)
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones)
{
char newname[MAXBONENAME];
flip_side_name(newname, pchan->name, TRUE);
@@ -1777,12 +1847,12 @@ static int pose_flip_names_exec (bContext *C, wmOperator *UNUSED(op))
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
/* note, notifier might evolve */
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
return OPERATOR_FINISHED;
}
-void POSE_OT_flip_names (wmOperatorType *ot)
+void POSE_OT_flip_names(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Flip Names";
@@ -1794,25 +1864,25 @@ void POSE_OT_flip_names (wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ------------------ */
-static int pose_autoside_names_exec (bContext *C, wmOperator *op)
+static int pose_autoside_names_exec(bContext *C, wmOperator *op)
{
- Object *ob= object_pose_armature_get(CTX_data_active_object(C));
+ Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
bArmature *arm;
char newname[MAXBONENAME];
- short axis= RNA_enum_get(op->ptr, "axis");
+ short axis = RNA_enum_get(op->ptr, "axis");
/* paranoia checks */
if (ELEM(NULL, ob, ob->pose))
return OPERATOR_CANCELLED;
- arm= ob->data;
+ arm = ob->data;
/* loop through selected bones, auto-naming them */
- CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones)
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones)
{
BLI_strncpy(newname, pchan->name, sizeof(newname));
if (bone_autoside_name(newname, 1, axis, pchan->bone->head[axis], pchan->bone->tail[axis]))
@@ -1824,18 +1894,19 @@ static int pose_autoside_names_exec (bContext *C, wmOperator *op)
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
/* note, notifier might evolve */
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
return OPERATOR_FINISHED;
}
-void POSE_OT_autoside_names (wmOperatorType *ot)
+void POSE_OT_autoside_names(wmOperatorType *ot)
{
- static EnumPropertyItem axis_items[]= {
+ static EnumPropertyItem axis_items[] = {
{0, "XAXIS", 0, "X-Axis", "Left/Right"},
{1, "YAXIS", 0, "Y-Axis", "Front/Back"},
{2, "ZAXIS", 0, "Z-Axis", "Top/Bottom"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
/* identifiers */
ot->name = "AutoName by Axis";
@@ -1848,7 +1919,7 @@ void POSE_OT_autoside_names (wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* settings */
ot->prop = RNA_def_enum(ot->srna, "axis", axis_items, 0, "Axis", "Axis tag names with");
@@ -1856,13 +1927,13 @@ void POSE_OT_autoside_names (wmOperatorType *ot)
/* ********************************************** */
-static int pose_bone_rotmode_exec (bContext *C, wmOperator *op)
+static int pose_bone_rotmode_exec(bContext *C, wmOperator *op)
{
Object *ob = CTX_data_active_object(C);
int mode = RNA_enum_get(op->ptr, "type");
/* set rotation mode of selected bones */
- CTX_DATA_BEGIN(C, bPoseChannel *, pchan, selected_pose_bones)
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones)
{
pchan->rotmode = mode;
}
@@ -1870,12 +1941,12 @@ static int pose_bone_rotmode_exec (bContext *C, wmOperator *op)
/* notifiers and updates */
DAG_id_tag_update((ID *)ob, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, ob);
return OPERATOR_FINISHED;
}
-void POSE_OT_rotation_mode_set (wmOperatorType *ot)
+void POSE_OT_rotation_mode_set(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Set Rotation Mode";
@@ -1888,7 +1959,7 @@ void POSE_OT_rotation_mode_set (wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
ot->prop = RNA_def_enum(ot->srna, "type", posebone_rotmode_items, 0, "Rotation Mode", "");
@@ -1897,18 +1968,18 @@ void POSE_OT_rotation_mode_set (wmOperatorType *ot)
/* ********************************************** */
/* Show all armature layers */
-static int pose_armature_layers_showall_poll (bContext *C)
+static int pose_armature_layers_showall_poll(bContext *C)
{
/* this single operator can be used in posemode OR editmode for armatures */
return ED_operator_posemode(C) || ED_operator_editarmature(C);
}
-static int pose_armature_layers_showall_exec (bContext *C, wmOperator *op)
+static int pose_armature_layers_showall_exec(bContext *C, wmOperator *op)
{
- Object *ob= object_pose_armature_get(CTX_data_active_object(C));
- bArmature *arm = (ob)? ob->data : NULL;
+ Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
+ bArmature *arm = (ob) ? ob->data : NULL;
PointerRNA ptr;
- int maxLayers = (RNA_boolean_get(op->ptr, "all"))? 32 : 16;
+ int maxLayers = (RNA_boolean_get(op->ptr, "all")) ? 32 : 16;
int layers[32] = {0}; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */
int i;
@@ -1917,7 +1988,7 @@ static int pose_armature_layers_showall_exec (bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* use RNA to set the layers
- * although it would be faster to just set directly using bitflags, we still
+ * although it would be faster to just set directly using bitflags, we still
* need to setup a RNA pointer so that we get the "update" callbacks for free...
*/
RNA_id_pointer_create(&arm->id, &ptr);
@@ -1928,13 +1999,13 @@ static int pose_armature_layers_showall_exec (bContext *C, wmOperator *op)
RNA_boolean_set_array(&ptr, "layers", layers);
/* note, notifier might evolve */
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
/* done */
return OPERATOR_FINISHED;
}
-void ARMATURE_OT_layers_show_all (wmOperatorType *ot)
+void ARMATURE_OT_layers_show_all(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Show All Layers";
@@ -1946,7 +2017,7 @@ void ARMATURE_OT_layers_show_all (wmOperatorType *ot)
ot->poll = pose_armature_layers_showall_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
ot->prop = RNA_def_boolean(ot->srna, "all", 1, "All Layers", "Enable all layers or just the first 16 (top row)");
@@ -1955,10 +2026,10 @@ void ARMATURE_OT_layers_show_all (wmOperatorType *ot)
/* ------------------- */
/* Present a popup to get the layers that should be used */
-static int pose_armature_layers_invoke (bContext *C, wmOperator *op, wmEvent *evt)
+static int pose_armature_layers_invoke(bContext *C, wmOperator *op, wmEvent *evt)
{
- Object *ob= object_pose_armature_get(CTX_data_active_object(C));
- bArmature *arm= (ob)? ob->data : NULL;
+ Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
+ bArmature *arm = (ob) ? ob->data : NULL;
PointerRNA ptr;
int layers[32]; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */
@@ -1976,9 +2047,9 @@ static int pose_armature_layers_invoke (bContext *C, wmOperator *op, wmEvent *ev
}
/* Set the visible layers for the active armature (edit and pose modes) */
-static int pose_armature_layers_exec (bContext *C, wmOperator *op)
+static int pose_armature_layers_exec(bContext *C, wmOperator *op)
{
- Object *ob= object_pose_armature_get(CTX_data_active_object(C));
+ Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
PointerRNA ptr;
int layers[32]; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */
@@ -1994,13 +2065,13 @@ static int pose_armature_layers_exec (bContext *C, wmOperator *op)
RNA_boolean_set_array(&ptr, "layers", layers);
/* note, notifier might evolve */
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
return OPERATOR_FINISHED;
}
-void POSE_OT_armature_layers (wmOperatorType *ot)
+void POSE_OT_armature_layers(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Change Armature Layers";
@@ -2013,13 +2084,13 @@ void POSE_OT_armature_layers (wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_boolean_layer_member(ot->srna, "layers", 32, NULL, "Layer", "Armature layers to make visible");
}
-void ARMATURE_OT_armature_layers (wmOperatorType *ot)
+void ARMATURE_OT_armature_layers(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Change Armature Layers";
@@ -2032,7 +2103,7 @@ void ARMATURE_OT_armature_layers (wmOperatorType *ot)
ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_boolean_layer_member(ot->srna, "layers", 32, NULL, "Layer", "Armature layers to make visible");
@@ -2041,19 +2112,19 @@ void ARMATURE_OT_armature_layers (wmOperatorType *ot)
/* ------------------- */
/* Present a popup to get the layers that should be used */
-static int pose_bone_layers_invoke (bContext *C, wmOperator *op, wmEvent *evt)
+static int pose_bone_layers_invoke(bContext *C, wmOperator *op, wmEvent *evt)
{
- int layers[32]= {0}; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */
+ int layers[32] = {0}; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */
/* get layers that are active already */
- CTX_DATA_BEGIN(C, bPoseChannel *, pchan, selected_pose_bones)
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones)
{
short bit;
/* loop over the bits for this pchan's layers, adding layers where they're needed */
- for (bit= 0; bit < 32; bit++) {
- if (pchan->bone->layer & (1<<bit))
- layers[bit]= 1;
+ for (bit = 0; bit < 32; bit++) {
+ if (pchan->bone->layer & (1 << bit))
+ layers[bit] = 1;
}
}
CTX_DATA_END;
@@ -2061,18 +2132,18 @@ static int pose_bone_layers_invoke (bContext *C, wmOperator *op, wmEvent *evt)
/* copy layers to operator */
RNA_boolean_set_array(op->ptr, "layers", layers);
- /* part to sync with other similar operators... */
+ /* part to sync with other similar operators... */
return WM_operator_props_popup(C, op, evt);
}
/* Set the visible layers for the active armature (edit and pose modes) */
-static int pose_bone_layers_exec (bContext *C, wmOperator *op)
+static int pose_bone_layers_exec(bContext *C, wmOperator *op)
{
- Object *ob= object_pose_armature_get(CTX_data_active_object(C));
+ Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
PointerRNA ptr;
int layers[32]; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */
- if (ob==NULL || ob->data==NULL) {
+ if (ob == NULL || ob->data == NULL) {
return OPERATOR_CANCELLED;
}
@@ -2080,7 +2151,7 @@ static int pose_bone_layers_exec (bContext *C, wmOperator *op)
RNA_boolean_get_array(op->ptr, "layers", layers);
/* set layers of pchans based on the values set in the operator props */
- CTX_DATA_BEGIN(C, bPoseChannel *, pchan, selected_pose_bones)
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones)
{
/* get pointer for pchan, and write flags this way */
RNA_pointer_create((ID *)ob->data, &RNA_Bone, pchan->bone, &ptr);
@@ -2089,12 +2160,12 @@ static int pose_bone_layers_exec (bContext *C, wmOperator *op)
CTX_DATA_END;
/* note, notifier might evolve */
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
return OPERATOR_FINISHED;
}
-void POSE_OT_bone_layers (wmOperatorType *ot)
+void POSE_OT_bone_layers(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Change Bone Layers";
@@ -2107,7 +2178,7 @@ void POSE_OT_bone_layers (wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_boolean_layer_member(ot->srna, "layers", 32, NULL, "Layer", "Armature layers that bone belongs to");
@@ -2116,19 +2187,19 @@ void POSE_OT_bone_layers (wmOperatorType *ot)
/* ------------------- */
/* Present a popup to get the layers that should be used */
-static int armature_bone_layers_invoke (bContext *C, wmOperator *op, wmEvent *evt)
+static int armature_bone_layers_invoke(bContext *C, wmOperator *op, wmEvent *evt)
{
- int layers[32]= {0}; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */
+ int layers[32] = {0}; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */
/* get layers that are active already */
- CTX_DATA_BEGIN(C, EditBone *, ebone, selected_editable_bones)
+ CTX_DATA_BEGIN (C, EditBone *, ebone, selected_editable_bones)
{
short bit;
/* loop over the bits for this pchan's layers, adding layers where they're needed */
- for (bit= 0; bit < 32; bit++) {
- if (ebone->layer & (1<<bit))
- layers[bit]= 1;
+ for (bit = 0; bit < 32; bit++) {
+ if (ebone->layer & (1 << bit))
+ layers[bit] = 1;
}
}
CTX_DATA_END;
@@ -2136,15 +2207,15 @@ static int armature_bone_layers_invoke (bContext *C, wmOperator *op, wmEvent *ev
/* copy layers to operator */
RNA_boolean_set_array(op->ptr, "layers", layers);
- /* part to sync with other similar operators... */
+ /* part to sync with other similar operators... */
return WM_operator_props_popup(C, op, evt);
}
/* Set the visible layers for the active armature (edit and pose modes) */
-static int armature_bone_layers_exec (bContext *C, wmOperator *op)
+static int armature_bone_layers_exec(bContext *C, wmOperator *op)
{
- Object *ob= CTX_data_edit_object(C);
- bArmature *arm= (ob)? ob->data : NULL;
+ Object *ob = CTX_data_edit_object(C);
+ bArmature *arm = (ob) ? ob->data : NULL;
PointerRNA ptr;
int layers[32]; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */
@@ -2152,7 +2223,7 @@ static int armature_bone_layers_exec (bContext *C, wmOperator *op)
RNA_boolean_get_array(op->ptr, "layers", layers);
/* set layers of pchans based on the values set in the operator props */
- CTX_DATA_BEGIN(C, EditBone *, ebone, selected_editable_bones)
+ CTX_DATA_BEGIN (C, EditBone *, ebone, selected_editable_bones)
{
/* get pointer for pchan, and write flags this way */
RNA_pointer_create((ID *)arm, &RNA_EditBone, ebone, &ptr);
@@ -2161,12 +2232,12 @@ static int armature_bone_layers_exec (bContext *C, wmOperator *op)
CTX_DATA_END;
/* note, notifier might evolve */
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
return OPERATOR_FINISHED;
}
-void ARMATURE_OT_bone_layers (wmOperatorType *ot)
+void ARMATURE_OT_bone_layers(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Change Bone Layers";
@@ -2179,7 +2250,7 @@ void ARMATURE_OT_bone_layers (wmOperatorType *ot)
ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_boolean_layer_member(ot->srna, "layers", 32, NULL, "Layer", "Armature layers that bone belongs to");
@@ -2188,14 +2259,14 @@ void ARMATURE_OT_bone_layers (wmOperatorType *ot)
/* ********************************************** */
/* Flip Quats */
-static int pose_flip_quats_exec (bContext *C, wmOperator *UNUSED(op))
+static int pose_flip_quats_exec(bContext *C, wmOperator *UNUSED(op))
{
- Scene *scene= CTX_data_scene(C);
- Object *ob= object_pose_armature_get(CTX_data_active_object(C));
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
KeyingSet *ks = ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_LOC_ROT_SCALE_ID);
/* loop through all selected pchans, flipping and keying (as needed) */
- CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones)
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones)
{
/* only if bone is using quaternion rotation */
if (pchan->rotmode == ROT_MODE_QUAT) {
@@ -2209,12 +2280,12 @@ static int pose_flip_quats_exec (bContext *C, wmOperator *UNUSED(op))
/* notifiers and updates */
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, ob);
return OPERATOR_FINISHED;
}
-void POSE_OT_quaternions_flip (wmOperatorType *ot)
+void POSE_OT_quaternions_flip(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Flip Quats";
@@ -2226,17 +2297,18 @@ void POSE_OT_quaternions_flip (wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ********************************************** */
/* Clear User Transforms */
-static int pose_clear_user_transforms_exec (bContext *C, wmOperator *UNUSED(op))
+static int pose_clear_user_transforms_exec(bContext *C, wmOperator *op)
{
Scene *scene = CTX_data_scene(C);
Object *ob = CTX_data_active_object(C);
float cframe = (float)CFRA;
+ const short only_select = RNA_boolean_get(op->ptr, "only_selected");
if ((ob->adt) && (ob->adt->action)) {
/* XXX: this is just like this to avoid contaminating anything else;
@@ -2247,7 +2319,7 @@ static int pose_clear_user_transforms_exec (bContext *C, wmOperator *UNUSED(op))
bPoseChannel *pchan;
/* execute animation step for current frame using a dummy copy of the pose */
- copy_pose(&dummyPose, ob->pose, 0);
+ BKE_pose_copy_data(&dummyPose, ob->pose, 0);
BLI_strncpy(workob.id.name, "OB<ClearTfmWorkOb>", sizeof(workob.id.name));
workob.type = OB_ARMATURE;
@@ -2259,12 +2331,12 @@ static int pose_clear_user_transforms_exec (bContext *C, wmOperator *UNUSED(op))
/* copy back values, but on selected bones only */
for (pchan = dummyPose->chanbase.first; pchan; pchan = pchan->next) {
- pose_bone_do_paste(ob, pchan, 1, 0);
+ pose_bone_do_paste(ob, pchan, only_select, 0);
}
/* free temp data - free manually as was copied without constraints */
if (dummyPose) {
- for (pchan= dummyPose->chanbase.first; pchan; pchan= pchan->next) {
+ for (pchan = dummyPose->chanbase.first; pchan; pchan = pchan->next) {
if (pchan->prop) {
IDP_FreeProperty(pchan->prop);
MEM_freeN(pchan->prop);
@@ -2280,17 +2352,17 @@ static int pose_clear_user_transforms_exec (bContext *C, wmOperator *UNUSED(op))
/* no animation, so just reset whole pose to rest pose
* (cannot just restore for selected though)
*/
- rest_pose(ob->pose);
+ BKE_pose_rest(ob->pose);
}
/* notifiers and updates */
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, ob);
return OPERATOR_FINISHED;
}
-void POSE_OT_user_transforms_clear (wmOperatorType *ot)
+void POSE_OT_user_transforms_clear(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Clear User Transforms";
@@ -2302,6 +2374,9 @@ void POSE_OT_user_transforms_clear (wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+
+ /* properties */
+ RNA_def_boolean(ot->srna, "only_selected", TRUE, "Only Selected", "Only visible/selected bones");
}
diff --git a/source/blender/editors/armature/reeb.c b/source/blender/editors/armature/reeb.c
index 546bcb1f40f..2564683ddd2 100644
--- a/source/blender/editors/armature/reeb.c
+++ b/source/blender/editors/armature/reeb.c
@@ -41,7 +41,6 @@
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
-#include "BLI_editVert.h"
#include "BLI_edgehash.h"
#include "BLI_ghash.h"
#include "BLI_heap.h"
@@ -81,17 +80,25 @@ static ReebGraph *FILTERED_RG = NULL;
#define DEBUG_REEB
#define DEBUG_REEB_NODE
-typedef struct VertexData
-{
+/* place-holders! */
+typedef struct EditEdge {
+ void *fake;
+} EditEdge;
+
+typedef struct EditFace {
+ void *fake;
+} EditFace;
+/* end place-holders! */
+
+typedef struct VertexData {
float w; /* weight */
int i; /* index */
ReebNode *n;
} VertexData;
-typedef struct EdgeIndex
-{
+typedef struct EdgeIndex {
EditEdge **edges;
- int *offset;
+ int *offset;
} EdgeIndex;
typedef enum {
@@ -103,12 +110,12 @@ typedef enum {
int mergeArcs(ReebGraph *rg, ReebArc *a0, ReebArc *a1);
void mergeArcEdges(ReebGraph *rg, ReebArc *aDst, ReebArc *aSrc, MergeDirection direction);
int mergeConnectedArcs(ReebGraph *rg, ReebArc *a0, ReebArc *a1);
-EditEdge * NextEdgeForVert(EdgeIndex *indexed_edges, int index);
+EditEdge *NextEdgeForVert(EdgeIndex *indexed_edges, int index);
void mergeArcFaces(ReebGraph *rg, ReebArc *aDst, ReebArc *aSrc);
void addFacetoArc(ReebArc *arc, EditFace *efa);
-void REEB_RadialSymmetry(BNode* root_node, RadialArc* ring, int count);
-void REEB_AxialSymmetry(BNode* root_node, BNode* node1, BNode* node2, struct BArc* barc1, BArc* barc2);
+void REEB_RadialSymmetry(BNode *root_node, RadialArc *ring, int count);
+void REEB_AxialSymmetry(BNode *root_node, BNode *node1, BNode *node2, struct BArc *barc1, BArc *barc2);
void flipArcBuckets(ReebArc *arc);
@@ -138,34 +145,34 @@ static VertexData *allocVertexData(EditMesh *em)
static int indexData(EditVert *eve)
{
- return ((VertexData*)eve->tmp.p)->i;
+ return ((VertexData *)eve->tmp.p)->i;
}
static float weightData(EditVert *eve)
{
- return ((VertexData*)eve->tmp.p)->w;
+ return ((VertexData *)eve->tmp.p)->w;
}
static void weightSetData(EditVert *eve, float w)
{
- ((VertexData*)eve->tmp.p)->w = w;
+ ((VertexData *)eve->tmp.p)->w = w;
}
-static ReebNode* nodeData(EditVert *eve)
+static ReebNode *nodeData(EditVert *eve)
{
- return ((VertexData*)eve->tmp.p)->n;
+ return ((VertexData *)eve->tmp.p)->n;
}
static void nodeSetData(EditVert *eve, ReebNode *n)
{
- ((VertexData*)eve->tmp.p)->n = n;
+ ((VertexData *)eve->tmp.p)->n = n;
}
#endif
void REEB_freeArc(BArc *barc)
{
- ReebArc *arc = (ReebArc*)barc;
+ ReebArc *arc = (ReebArc *)barc;
BLI_freelistN(&arc->edges);
if (arc->buckets)
@@ -183,18 +190,16 @@ void REEB_freeGraph(ReebGraph *rg)
ReebNode *node;
// free nodes
- for ( node = rg->nodes.first; node; node = node->next )
- {
- BLI_freeNode((BGraph*)rg, (BNode*)node);
+ for (node = rg->nodes.first; node; node = node->next) {
+ BLI_freeNode((BGraph *)rg, (BNode *)node);
}
BLI_freelistN(&rg->nodes);
// free arcs
arc = rg->arcs.first;
- while ( arc )
- {
+ while (arc) {
ReebArc *next = arc->next;
- REEB_freeArc((BArc*)arc);
+ REEB_freeArc((BArc *)arc);
arc = next;
}
@@ -202,15 +207,14 @@ void REEB_freeGraph(ReebGraph *rg)
BLI_edgehash_free(rg->emap, NULL);
/* free linked graph */
- if (rg->link_up)
- {
+ if (rg->link_up) {
REEB_freeGraph(rg->link_up);
}
MEM_freeN(rg);
}
-ReebGraph * newReebGraph(void)
+ReebGraph *newReebGraph(void)
{
ReebGraph *rg;
rg = MEM_callocN(sizeof(ReebGraph), "reeb graph");
@@ -229,14 +233,13 @@ ReebGraph * newReebGraph(void)
void BIF_flagMultiArcs(ReebGraph *rg, int flag)
{
- for ( ; rg; rg = rg->link_up)
- {
- BLI_flagArcs((BGraph*)rg, flag);
+ for (; rg; rg = rg->link_up) {
+ BLI_flagArcs((BGraph *)rg, flag);
}
}
#if 0 /* UNUSED */
-static ReebNode * addNode(ReebGraph *rg, EditVert *eve)
+static ReebNode *addNode(ReebGraph *rg, EditVert *eve)
{
float weight;
ReebNode *node = NULL;
@@ -261,7 +264,7 @@ static ReebNode * addNode(ReebGraph *rg, EditVert *eve)
return node;
}
-static ReebNode * copyNode(ReebGraph *rg, ReebNode *node)
+static ReebNode *copyNode(ReebGraph *rg, ReebNode *node)
{
ReebNode *cp_node = NULL;
@@ -318,8 +321,7 @@ ReebNode *BIF_NodeFromIndex(ReebArc *arc, ReebNode *node)
ReebNode *BIF_lowestLevelNode(ReebNode *node)
{
- while (node->link_down)
- {
+ while (node->link_down) {
node = node->link_down;
}
@@ -327,7 +329,7 @@ ReebNode *BIF_lowestLevelNode(ReebNode *node)
}
#if 0 /* UNUSED */
-static ReebArc * copyArc(ReebGraph *rg, ReebArc *arc)
+static ReebArc *copyArc(ReebGraph *rg, ReebArc *arc)
{
ReebArc *cp_arc;
ReebNode *node;
@@ -373,7 +375,7 @@ static ReebArc * copyArc(ReebGraph *rg, ReebArc *arc)
return cp_arc;
}
-static ReebGraph * copyReebGraph(ReebGraph *rg, int level)
+static ReebGraph *copyReebGraph(ReebGraph *rg, int level)
{
ReebNode *node;
ReebArc *arc;
@@ -397,7 +399,7 @@ static ReebGraph * copyReebGraph(ReebGraph *rg, int level)
copyArc(cp_rg, arc);
}
- BLI_buildAdjacencyList((BGraph*)cp_rg);
+ BLI_buildAdjacencyList((BGraph *)cp_rg);
return cp_rg;
}
@@ -407,8 +409,7 @@ ReebGraph *BIF_graphForMultiNode(ReebGraph *rg, ReebNode *node)
{
ReebGraph *multi_rg = rg;
- while (multi_rg && multi_rg->multi_level != node->multi_level)
- {
+ while (multi_rg && multi_rg->multi_level != node->multi_level) {
multi_rg = multi_rg->link_up;
}
@@ -416,7 +417,7 @@ ReebGraph *BIF_graphForMultiNode(ReebGraph *rg, ReebNode *node)
}
#if 0 /* UNUSED */
-static ReebEdge * copyEdge(ReebEdge *edge)
+static ReebEdge *copyEdge(ReebEdge *edge)
{
ReebEdge *newEdge = NULL;
@@ -432,11 +433,11 @@ static ReebEdge * copyEdge(ReebEdge *edge)
static void printArc(ReebArc *arc)
{
ReebEdge *edge;
- ReebNode *head = (ReebNode*)arc->head;
- ReebNode *tail = (ReebNode*)arc->tail;
+ ReebNode *head = (ReebNode *)arc->head;
+ ReebNode *tail = (ReebNode *)arc->tail;
printf("arc: (%i) %f -> (%i) %f\n", head->index, head->weight, tail->index, tail->weight);
- for (edge = arc->edges.first; edge ; edge = edge->next)
+ for (edge = arc->edges.first; edge; edge = edge->next)
{
printf("\tedge (%i, %i)\n", edge->v1->index, edge->v2->index);
}
@@ -474,8 +475,8 @@ static void NodeDegreeIncrement(ReebGraph *UNUSED(rg), ReebNode *node)
}
#else
-#define NodeDegreeDecrement(rg, node) {node->degree--;}
-#define NodeDegreeIncrement(rg, node) {node->degree++;}
+#define NodeDegreeDecrement(rg, node) {node->degree--; }
+#define NodeDegreeIncrement(rg, node) {node->degree++; }
#endif
void repositionNodes(ReebGraph *rg)
@@ -484,22 +485,19 @@ void repositionNodes(ReebGraph *rg)
BNode *node = NULL;
// Reset node positions
- for (node = rg->nodes.first; node; node = node->next)
- {
+ for (node = rg->nodes.first; node; node = node->next) {
node->p[0] = node->p[1] = node->p[2] = 0;
}
- for (arc = rg->arcs.first; arc; arc = arc->next)
- {
- if (((ReebArc*)arc)->bcount > 0)
- {
+ for (arc = rg->arcs.first; arc; arc = arc->next) {
+ if (((ReebArc *)arc)->bcount > 0) {
float p[3];
- copy_v3_v3(p, ((ReebArc*)arc)->buckets[0].p);
+ copy_v3_v3(p, ((ReebArc *)arc)->buckets[0].p);
mul_v3_fl(p, 1.0f / arc->head->degree);
add_v3_v3(arc->head->p, p);
- copy_v3_v3(p, ((ReebArc*)arc)->buckets[((ReebArc*)arc)->bcount - 1].p);
+ copy_v3_v3(p, ((ReebArc *)arc)->buckets[((ReebArc *)arc)->bcount - 1].p);
mul_v3_fl(p, 1.0f / arc->tail->degree);
add_v3_v3(arc->tail->p, p);
}
@@ -512,22 +510,17 @@ void verifyNodeDegree(ReebGraph *rg)
ReebNode *node = NULL;
ReebArc *arc = NULL;
- for (node = rg->nodes.first; node; node = node->next)
- {
+ for (node = rg->nodes.first; node; node = node->next) {
int count = 0;
- for (arc = rg->arcs.first; arc; arc = arc->next)
- {
- if (arc->head == node || arc->tail == node)
- {
+ for (arc = rg->arcs.first; arc; arc = arc->next) {
+ if (arc->head == node || arc->tail == node) {
count++;
}
}
- if (count != node->degree)
- {
+ if (count != node->degree) {
printf("degree error in node %i: expected %i got %i\n", node->index, count, node->degree);
}
- if (node->degree == 0)
- {
+ if (node->degree == 0) {
printf("zero degree node %i with weight %f\n", node->index, node->weight);
}
}
@@ -536,28 +529,23 @@ void verifyNodeDegree(ReebGraph *rg)
static void verifyBucketsArc(ReebGraph *UNUSED(rg), ReebArc *arc)
{
- ReebNode *head = (ReebNode*)arc->head;
- ReebNode *tail = (ReebNode*)arc->tail;
+ ReebNode *head = (ReebNode *)arc->head;
+ ReebNode *tail = (ReebNode *)arc->tail;
- if (arc->bcount > 0)
- {
+ if (arc->bcount > 0) {
int i;
- for (i = 0; i < arc->bcount; i++)
- {
- if (arc->buckets[i].nv == 0)
- {
+ for (i = 0; i < arc->bcount; i++) {
+ if (arc->buckets[i].nv == 0) {
printArc(arc);
- printf("count error in bucket %i/%i\n", i+1, arc->bcount);
+ printf("count error in bucket %i/%i\n", i + 1, arc->bcount);
}
}
- if (ceilf(head->weight) != arc->buckets[0].val)
- {
+ if (ceilf(head->weight) != arc->buckets[0].val) {
printArc(arc);
printf("alloc error in first bucket: %f should be %f\n", arc->buckets[0].val, ceil(head->weight));
}
- if (floorf(tail->weight) != arc->buckets[arc->bcount - 1].val)
- {
+ if (floorf(tail->weight) != arc->buckets[arc->bcount - 1].val) {
printArc(arc);
printf("alloc error in last bucket: %f should be %f\n", arc->buckets[arc->bcount - 1].val, floor(tail->weight));
}
@@ -568,8 +556,7 @@ void verifyBuckets(ReebGraph *rg)
{
#ifdef DEBUG_REEB
ReebArc *arc = NULL;
- for (arc = rg->arcs.first; arc; arc = arc->next)
- {
+ for (arc = rg->arcs.first; arc; arc = arc->next) {
verifyBucketsArc(rg, arc);
}
#endif
@@ -580,8 +567,7 @@ void verifyFaces(ReebGraph *rg)
#ifdef DEBUG_REEB
int total = 0;
ReebArc *arc = NULL;
- for (arc = rg->arcs.first; arc; arc = arc->next)
- {
+ for (arc = rg->arcs.first; arc; arc = arc->next) {
total += BLI_ghash_size(arc->faces);
}
@@ -592,10 +578,8 @@ void verifyArcs(ReebGraph *rg)
{
ReebArc *arc;
- for (arc = rg->arcs.first; arc; arc = arc->next)
- {
- if (arc->head->weight > arc->tail->weight)
- {
+ for (arc = rg->arcs.first; arc; arc = arc->next) {
+ if (arc->head->weight > arc->tail->weight) {
printf("FLIPPED ARC!\n");
}
}
@@ -606,14 +590,11 @@ static void verifyMultiResolutionLinks(ReebGraph *rg, int level)
#ifdef DEBUG_REEB
ReebGraph *lower_rg = rg->link_up;
- if (lower_rg)
- {
+ if (lower_rg) {
ReebArc *arc;
- for (arc = rg->arcs.first; arc; arc = arc->next)
- {
- if (BLI_findindex(&lower_rg->arcs, arc->link_up) == -1)
- {
+ for (arc = rg->arcs.first; arc; arc = arc->next) {
+ if (BLI_findindex(&lower_rg->arcs, arc->link_up) == -1) {
printf("missing arc %p for level %i\n", (void *)arc->link_up, level);
printf("Source arc was ---\n");
printArc(arc);
@@ -647,13 +628,11 @@ static void removeVertFromBucket(EmbedBucket *b, float co[3])
static void mergeBuckets(EmbedBucket *bDst, EmbedBucket *bSrc)
{
- if (bDst->nv > 0 && bSrc->nv > 0)
- {
+ if (bDst->nv > 0 && bSrc->nv > 0) {
bDst->nv += bSrc->nv;
interp_v3_v3v3(bDst->p, bDst->p, bSrc->p, (float)bSrc->nv / (float)(bDst->nv));
}
- else if (bSrc->nv > 0)
- {
+ else if (bSrc->nv > 0) {
bDst->nv = bSrc->nv;
copy_v3_v3(bDst->p, bSrc->p);
}
@@ -661,28 +640,25 @@ static void mergeBuckets(EmbedBucket *bDst, EmbedBucket *bSrc)
static void mergeArcBuckets(ReebArc *aDst, ReebArc *aSrc, float start, float end)
{
- if (aDst->bcount > 0 && aSrc->bcount > 0)
- {
+ if (aDst->bcount > 0 && aSrc->bcount > 0) {
int indexDst = 0, indexSrc = 0;
start = MAX3(start, aDst->buckets[0].val, aSrc->buckets[0].val);
- while (indexDst < aDst->bcount && aDst->buckets[indexDst].val < start)
- {
+ while (indexDst < aDst->bcount && aDst->buckets[indexDst].val < start) {
indexDst++;
}
- while (indexSrc < aSrc->bcount && aSrc->buckets[indexSrc].val < start)
- {
+ while (indexSrc < aSrc->bcount && aSrc->buckets[indexSrc].val < start) {
indexSrc++;
}
- for ( ; indexDst < aDst->bcount &&
- indexSrc < aSrc->bcount &&
- aDst->buckets[indexDst].val <= end &&
- aSrc->buckets[indexSrc].val <= end
+ for (; indexDst < aDst->bcount &&
+ indexSrc < aSrc->bcount &&
+ aDst->buckets[indexDst].val <= end &&
+ aSrc->buckets[indexSrc].val <= end
- ; indexDst++, indexSrc++)
+ ; indexDst++, indexSrc++)
{
mergeBuckets(aDst->buckets + indexDst, aSrc->buckets + indexSrc);
}
@@ -693,8 +669,7 @@ void flipArcBuckets(ReebArc *arc)
{
int i, j;
- for (i = 0, j = arc->bcount - 1; i < j; i++, j--)
- {
+ for (i = 0, j = arc->bcount - 1; i < j; i++, j--) {
EmbedBucket tmp;
tmp = arc->buckets[i];
@@ -714,20 +689,16 @@ static void allocArcBuckets(ReebArc *arc)
float start = ceil(arc->head->weight);
arc->bcount = countArcBuckets(arc);
- if (arc->bcount > 0)
- {
+ if (arc->bcount > 0) {
arc->buckets = MEM_callocN(sizeof(EmbedBucket) * arc->bcount, "embed bucket");
- for (i = 0; i < arc->bcount; i++)
- {
+ for (i = 0; i < arc->bcount; i++) {
arc->buckets[i].val = start + i;
}
}
- else
- {
+ else {
arc->buckets = NULL;
}
-
}
static void resizeArcBuckets(ReebArc *arc)
@@ -735,15 +706,13 @@ static void resizeArcBuckets(ReebArc *arc)
EmbedBucket *oldBuckets = arc->buckets;
int oldBCount = arc->bcount;
- if (countArcBuckets(arc) == oldBCount)
- {
+ if (countArcBuckets(arc) == oldBCount) {
return;
}
allocArcBuckets(arc);
- if (oldBCount != 0 && arc->bcount != 0)
- {
+ if (oldBCount != 0 && arc->bcount != 0) {
int oldStart = (int)oldBuckets[0].val;
int oldEnd = (int)oldBuckets[oldBCount - 1].val;
int newStart = (int)arc->buckets[0].val;
@@ -752,12 +721,10 @@ static void resizeArcBuckets(ReebArc *arc)
int newOffset = 0;
int len;
- if (oldStart < newStart)
- {
+ if (oldStart < newStart) {
oldOffset = newStart - oldStart;
}
- else
- {
+ else {
newOffset = oldStart - newStart;
}
@@ -766,8 +733,7 @@ static void resizeArcBuckets(ReebArc *arc)
memcpy(arc->buckets + newOffset, oldBuckets + oldOffset, len * sizeof(EmbedBucket));
}
- if (oldBuckets != NULL)
- {
+ if (oldBuckets != NULL) {
MEM_freeN(oldBuckets);
}
}
@@ -777,10 +743,8 @@ static void reweightBuckets(ReebArc *arc)
int i;
float start = ceil((arc->head)->weight);
- if (arc->bcount > 0)
- {
- for (i = 0; i < arc->bcount; i++)
- {
+ if (arc->bcount > 0) {
+ for (i = 0; i < arc->bcount; i++) {
arc->buckets[i].val = start + i;
}
}
@@ -793,8 +757,7 @@ static void interpolateBuckets(ReebArc *arc, float *start_p, float *end_p, int s
total = end_index - start_index + 2;
- for (j = start_index; j <= end_index; j++)
- {
+ for (j = start_index; j <= end_index; j++) {
EmbedBucket *empty = arc->buckets + j;
empty->nv = 1;
interp_v3_v3v3(empty->p, start_p, end_p, (float)(j - start_index + 1) / total);
@@ -810,14 +773,11 @@ static void fillArcEmptyBuckets(ReebArc *arc)
start_p = arc->head->p;
- for (i = 0; i < arc->bcount; i++)
- {
+ for (i = 0; i < arc->bcount; i++) {
EmbedBucket *bucket = arc->buckets + i;
- if (missing)
- {
- if (bucket->nv > 0)
- {
+ if (missing) {
+ if (bucket->nv > 0) {
missing = 0;
end_p = bucket->p;
@@ -826,14 +786,11 @@ static void fillArcEmptyBuckets(ReebArc *arc)
interpolateBuckets(arc, start_p, end_p, start_index, end_index);
}
}
- else
- {
- if (bucket->nv == 0)
- {
+ else {
+ if (bucket->nv == 0) {
missing = 1;
- if (i > 0)
- {
+ if (i > 0) {
start_p = arc->buckets[i - 1].p;
}
start_index = i;
@@ -841,8 +798,7 @@ static void fillArcEmptyBuckets(ReebArc *arc)
}
}
- if (missing)
- {
+ if (missing) {
end_p = arc->tail->p;
end_index = arc->bcount - 1;
@@ -853,14 +809,13 @@ static void fillArcEmptyBuckets(ReebArc *arc)
static void ExtendArcBuckets(ReebArc *arc)
{
ReebArcIterator arc_iter;
- BArcIterator *iter = (BArcIterator*)&arc_iter;
+ BArcIterator *iter = (BArcIterator *)&arc_iter;
EmbedBucket *last_bucket, *first_bucket;
float *previous = NULL;
float average_length = 0, length;
int padding_head = 0, padding_tail = 0;
- if (arc->bcount == 0)
- {
+ if (arc->bcount == 0) {
return; /* failsafe, shouldn't happen */
}
@@ -868,10 +823,10 @@ static void ExtendArcBuckets(ReebArc *arc)
IT_next(iter);
previous = iter->p;
- for ( IT_next(iter);
- IT_stopped(iter) == 0;
- previous = iter->p, IT_next(iter)
- )
+ for (IT_next(iter);
+ IT_stopped(iter) == 0;
+ previous = iter->p, IT_next(iter)
+ )
{
average_length += len_v3v3(previous, iter->p);
}
@@ -881,19 +836,16 @@ static void ExtendArcBuckets(ReebArc *arc)
last_bucket = arc->buckets + (arc->bcount - 1);
length = len_v3v3(first_bucket->p, arc->head->p);
- if (length > 2 * average_length)
- {
+ if (length > 2 * average_length) {
padding_head = (int)floor(length / average_length);
}
length = len_v3v3(last_bucket->p, arc->tail->p);
- if (length > 2 * average_length)
- {
+ if (length > 2 * average_length) {
padding_tail = (int)floor(length / average_length);
}
- if (padding_head + padding_tail > 0)
- {
+ if (padding_head + padding_tail > 0) {
EmbedBucket *old_buckets = arc->buckets;
arc->buckets = MEM_callocN(sizeof(EmbedBucket) * (padding_head + arc->bcount + padding_tail), "embed bucket");
@@ -904,13 +856,11 @@ static void ExtendArcBuckets(ReebArc *arc)
MEM_freeN(old_buckets);
}
- if (padding_head > 0)
- {
+ if (padding_head > 0) {
interpolateBuckets(arc, arc->head->p, first_bucket->p, 0, padding_head);
}
- if (padding_tail > 0)
- {
+ if (padding_tail > 0) {
interpolateBuckets(arc, last_bucket->p, arc->tail->p, arc->bcount - padding_tail, arc->bcount - 1);
}
}
@@ -920,8 +870,7 @@ static void extendGraphBuckets(ReebGraph *rg)
{
ReebArc *arc;
- for (arc = rg->arcs.first; arc; arc = arc->next)
- {
+ for (arc = rg->arcs.first; arc; arc = arc->next) {
ExtendArcBuckets(arc);
}
}
@@ -931,7 +880,7 @@ static void extendGraphBuckets(ReebGraph *rg)
static void calculateArcLength(ReebArc *arc)
{
ReebArcIterator arc_iter;
- BArcIterator *iter = (BArcIterator*)&arc_iter;
+ BArcIterator *iter = (BArcIterator *)&arc_iter;
float *vec0, *vec1;
arc->length = 0;
@@ -941,8 +890,7 @@ static void calculateArcLength(ReebArc *arc)
vec0 = arc->head->p;
vec1 = arc->head->p; /* in case there's no embedding */
- while (IT_next(iter))
- {
+ while (IT_next(iter)) {
vec1 = iter->p;
arc->length += len_v3v3(vec0, vec1);
@@ -957,8 +905,7 @@ static void calculateGraphLength(ReebGraph *rg)
{
ReebArc *arc;
- for (arc = rg->arcs.first; arc; arc = arc->next)
- {
+ for (arc = rg->arcs.first; arc; arc = arc->next) {
calculateArcLength(arc);
}
}
@@ -966,17 +913,16 @@ static void calculateGraphLength(ReebGraph *rg)
/**************************************** SYMMETRY HANDLING ******************************************/
-void REEB_RadialSymmetry(BNode* root_node, RadialArc* ring, int count)
+void REEB_RadialSymmetry(BNode *root_node, RadialArc *ring, int count)
{
- ReebNode *node = (ReebNode*)root_node;
+ ReebNode *node = (ReebNode *)root_node;
float axis[3];
int i;
copy_v3_v3(axis, root_node->symmetry_axis);
/* first pass, merge incrementally */
- for (i = 0; i < count - 1; i++)
- {
+ for (i = 0; i < count - 1; i++) {
ReebNode *node1, *node2;
ReebArc *arc1, *arc2;
float tangent[3];
@@ -986,11 +932,11 @@ void REEB_RadialSymmetry(BNode* root_node, RadialArc* ring, int count)
add_v3_v3v3(tangent, ring[i].n, ring[j].n);
cross_v3_v3v3(normal, tangent, axis);
- node1 = (ReebNode*)BLI_otherNode(ring[i].arc, root_node);
- node2 = (ReebNode*)BLI_otherNode(ring[j].arc, root_node);
+ node1 = (ReebNode *)BLI_otherNode(ring[i].arc, root_node);
+ node2 = (ReebNode *)BLI_otherNode(ring[j].arc, root_node);
- arc1 = (ReebArc*)ring[i].arc;
- arc2 = (ReebArc*)ring[j].arc;
+ arc1 = (ReebArc *)ring[i].arc;
+ arc2 = (ReebArc *)ring[j].arc;
/* mirror first node and mix with the second */
BLI_mirrorAlongAxis(node1->p, root_node->p, normal);
@@ -999,33 +945,29 @@ void REEB_RadialSymmetry(BNode* root_node, RadialArc* ring, int count)
/* Merge buckets
* there shouldn't be any null arcs here, but just to be safe
* */
- if (arc1->bcount > 0 && arc2->bcount > 0)
- {
+ if (arc1->bcount > 0 && arc2->bcount > 0) {
ReebArcIterator arc_iter1, arc_iter2;
- BArcIterator *iter1 = (BArcIterator*)&arc_iter1;
- BArcIterator *iter2 = (BArcIterator*)&arc_iter2;
+ BArcIterator *iter1 = (BArcIterator *)&arc_iter1;
+ BArcIterator *iter2 = (BArcIterator *)&arc_iter2;
EmbedBucket *bucket1 = NULL, *bucket2 = NULL;
- initArcIterator(iter1, arc1, (ReebNode*)root_node);
- initArcIterator(iter2, arc2, (ReebNode*)root_node);
+ initArcIterator(iter1, arc1, (ReebNode *)root_node);
+ initArcIterator(iter2, arc2, (ReebNode *)root_node);
bucket1 = IT_next(iter1);
bucket2 = IT_next(iter2);
/* Make sure they both start at the same value */
- while (bucket1 && bucket2 && bucket1->val < bucket2->val)
- {
+ while (bucket1 && bucket2 && bucket1->val < bucket2->val) {
bucket1 = IT_next(iter1);
}
- while (bucket1 && bucket2 && bucket2->val < bucket1->val)
- {
+ while (bucket1 && bucket2 && bucket2->val < bucket1->val) {
bucket2 = IT_next(iter2);
}
- for ( ;bucket1 && bucket2; bucket1 = IT_next(iter1), bucket2 = IT_next(iter2))
- {
+ for (; bucket1 && bucket2; bucket1 = IT_next(iter1), bucket2 = IT_next(iter2)) {
bucket2->nv += bucket1->nv; /* add counts */
/* mirror on axis */
@@ -1037,8 +979,7 @@ void REEB_RadialSymmetry(BNode* root_node, RadialArc* ring, int count)
}
/* second pass, mirror back on previous arcs */
- for (i = count - 1; i > 0; i--)
- {
+ for (i = count - 1; i > 0; i--) {
ReebNode *node1, *node2;
ReebArc *arc1, *arc2;
float tangent[3];
@@ -1048,11 +989,11 @@ void REEB_RadialSymmetry(BNode* root_node, RadialArc* ring, int count)
add_v3_v3v3(tangent, ring[i].n, ring[j].n);
cross_v3_v3v3(normal, tangent, axis);
- node1 = (ReebNode*)BLI_otherNode(ring[i].arc, root_node);
- node2 = (ReebNode*)BLI_otherNode(ring[j].arc, root_node);
+ node1 = (ReebNode *)BLI_otherNode(ring[i].arc, root_node);
+ node2 = (ReebNode *)BLI_otherNode(ring[j].arc, root_node);
- arc1 = (ReebArc*)ring[i].arc;
- arc2 = (ReebArc*)ring[j].arc;
+ arc1 = (ReebArc *)ring[i].arc;
+ arc2 = (ReebArc *)ring[j].arc;
/* copy first node than mirror */
copy_v3_v3(node2->p, node1->p);
@@ -1061,11 +1002,10 @@ void REEB_RadialSymmetry(BNode* root_node, RadialArc* ring, int count)
/* Copy buckets
* there shouldn't be any null arcs here, but just to be safe
* */
- if (arc1->bcount > 0 && arc2->bcount > 0)
- {
+ if (arc1->bcount > 0 && arc2->bcount > 0) {
ReebArcIterator arc_iter1, arc_iter2;
- BArcIterator *iter1 = (BArcIterator*)&arc_iter1;
- BArcIterator *iter2 = (BArcIterator*)&arc_iter2;
+ BArcIterator *iter1 = (BArcIterator *)&arc_iter1;
+ BArcIterator *iter2 = (BArcIterator *)&arc_iter2;
EmbedBucket *bucket1 = NULL, *bucket2 = NULL;
initArcIterator(iter1, arc1, node);
@@ -1075,19 +1015,16 @@ void REEB_RadialSymmetry(BNode* root_node, RadialArc* ring, int count)
bucket2 = IT_next(iter2);
/* Make sure they both start at the same value */
- while (bucket1 && bucket1->val < bucket2->val)
- {
+ while (bucket1 && bucket1->val < bucket2->val) {
bucket1 = IT_next(iter1);
}
- while (bucket2 && bucket2->val < bucket1->val)
- {
+ while (bucket2 && bucket2->val < bucket1->val) {
bucket2 = IT_next(iter2);
}
- for ( ;bucket1 && bucket2; bucket1 = IT_next(iter1), bucket2 = IT_next(iter2))
- {
+ for (; bucket1 && bucket2; bucket1 = IT_next(iter1), bucket2 = IT_next(iter2)) {
/* copy and mirror back to bucket2 */
bucket2->nv = bucket1->nv;
copy_v3_v3(bucket2->p, bucket1->p);
@@ -1097,13 +1034,13 @@ void REEB_RadialSymmetry(BNode* root_node, RadialArc* ring, int count)
}
}
-void REEB_AxialSymmetry(BNode* root_node, BNode* node1, BNode* node2, struct BArc* barc1, BArc* barc2)
+void REEB_AxialSymmetry(BNode *root_node, BNode *node1, BNode *node2, struct BArc *barc1, BArc *barc2)
{
ReebArc *arc1, *arc2;
float nor[3], p[3];
- arc1 = (ReebArc*)barc1;
- arc2 = (ReebArc*)barc2;
+ arc1 = (ReebArc *)barc1;
+ arc2 = (ReebArc *)barc2;
copy_v3_v3(nor, root_node->symmetry_axis);
@@ -1122,33 +1059,29 @@ void REEB_AxialSymmetry(BNode* root_node, BNode* node1, BNode* node2, struct BAr
/* Merge buckets
* there shouldn't be any null arcs here, but just to be safe
* */
- if (arc1->bcount > 0 && arc2->bcount > 0)
- {
+ if (arc1->bcount > 0 && arc2->bcount > 0) {
ReebArcIterator arc_iter1, arc_iter2;
- BArcIterator *iter1 = (BArcIterator*)&arc_iter1;
- BArcIterator *iter2 = (BArcIterator*)&arc_iter2;
+ BArcIterator *iter1 = (BArcIterator *)&arc_iter1;
+ BArcIterator *iter2 = (BArcIterator *)&arc_iter2;
EmbedBucket *bucket1 = NULL, *bucket2 = NULL;
- initArcIterator(iter1, arc1, (ReebNode*)root_node);
- initArcIterator(iter2, arc2, (ReebNode*)root_node);
+ initArcIterator(iter1, arc1, (ReebNode *)root_node);
+ initArcIterator(iter2, arc2, (ReebNode *)root_node);
bucket1 = IT_next(iter1);
bucket2 = IT_next(iter2);
/* Make sure they both start at the same value */
- while (bucket1 && bucket1->val < bucket2->val)
- {
+ while (bucket1 && bucket1->val < bucket2->val) {
bucket1 = IT_next(iter1);
}
- while (bucket2 && bucket2->val < bucket1->val)
- {
+ while (bucket2 && bucket2->val < bucket1->val) {
bucket2 = IT_next(iter2);
}
- for ( ;bucket1 && bucket2; bucket1 = IT_next(iter1), bucket2 = IT_next(iter2))
- {
+ for (; bucket1 && bucket2; bucket1 = IT_next(iter1), bucket2 = IT_next(iter2)) {
bucket1->nv += bucket2->nv; /* add counts */
/* mirror on axis */
@@ -1175,23 +1108,23 @@ void postprocessGraph(ReebGraph *rg, char mode)
ReebArc *arc;
float fac1 = 0, fac2 = 1, fac3 = 0;
- switch(mode)
+ switch (mode)
{
- case SKGEN_AVERAGE:
- fac1 = fac2 = fac3 = 1.0f / 3.0f;
- break;
- case SKGEN_SMOOTH:
- fac1 = fac3 = 0.25f;
- fac2 = 0.5f;
- break;
- case SKGEN_SHARPEN:
- fac1 = fac3 = -0.25f;
- fac2 = 1.5f;
- break;
- default:
+ case SKGEN_AVERAGE:
+ fac1 = fac2 = fac3 = 1.0f / 3.0f;
+ break;
+ case SKGEN_SMOOTH:
+ fac1 = fac3 = 0.25f;
+ fac2 = 0.5f;
+ break;
+ case SKGEN_SHARPEN:
+ fac1 = fac3 = -0.25f;
+ fac2 = 1.5f;
+ break;
+ default:
// XXX
// error("Unknown post processing mode");
- return;
+ return;
}
for (arc = rg->arcs.first; arc; arc = arc->next)
@@ -1212,8 +1145,8 @@ void postprocessGraph(ReebGraph *rg, char mode)
static int compareNodesWeight(void *vnode1, void *vnode2)
{
- ReebNode *node1 = (ReebNode*)vnode1;
- ReebNode *node2 = (ReebNode*)vnode2;
+ ReebNode *node1 = (ReebNode *)vnode1;
+ ReebNode *node2 = (ReebNode *)vnode2;
if (node1->weight < node2->weight)
{
@@ -1223,8 +1156,7 @@ static int compareNodesWeight(void *vnode1, void *vnode2)
{
return 1;
}
- else
- {
+ else {
return 0;
}
}
@@ -1236,10 +1168,10 @@ void sortNodes(ReebGraph *rg)
static int compareArcsWeight(void *varc1, void *varc2)
{
- ReebArc *arc1 = (ReebArc*)varc1;
- ReebArc *arc2 = (ReebArc*)varc2;
- ReebNode *node1 = (ReebNode*)arc1->head;
- ReebNode *node2 = (ReebNode*)arc2->head;
+ ReebArc *arc1 = (ReebArc *)varc1;
+ ReebArc *arc2 = (ReebArc *)varc2;
+ ReebNode *node1 = (ReebNode *)arc1->head;
+ ReebNode *node2 = (ReebNode *)arc2->head;
if (node1->weight < node2->weight)
{
@@ -1249,8 +1181,7 @@ static int compareArcsWeight(void *varc1, void *varc2)
{
return 1;
}
- else
- {
+ else {
return 0;
}
}
@@ -1268,7 +1199,7 @@ static void reweightArc(ReebGraph *rg, ReebArc *arc, ReebNode *start_node, float
float end_weight = start_weight + ABS(arc->tail->weight - arc->head->weight);
int i;
- node = (ReebNode*)BLI_otherNode((BArc*)arc, (BNode*)start_node);
+ node = (ReebNode *)BLI_otherNode((BArc *)arc, (BNode *)start_node);
/* prevent backtracking */
if (node->flag == 1)
@@ -1310,7 +1241,7 @@ static void reweightSubgraph(ReebGraph *rg, ReebNode *start_node, float start_we
{
int i;
- BLI_flagNodes((BGraph*)rg, 0);
+ BLI_flagNodes((BGraph *)rg, 0);
for (i = 0; i < start_node->degree; i++)
{
@@ -1384,15 +1315,15 @@ static int joinSubgraphsEnds(ReebGraph *rg, float threshold, int nb_subgraphs)
if (merging)
{
- BLI_ReflagSubgraph((BGraph*)rg, end_node->flag, subgraph);
+ BLI_ReflagSubgraph((BGraph *)rg, end_node->flag, subgraph);
resizeArcBuckets(start_arc);
fillArcEmptyBuckets(start_arc);
NodeDegreeIncrement(rg, end_node);
- BLI_rebuildAdjacencyListForNode((BGraph*)rg, (BNode*)end_node);
+ BLI_rebuildAdjacencyListForNode((BGraph *)rg, (BNode *)end_node);
- BLI_removeNode((BGraph*)rg, (BNode*)start_node);
+ BLI_removeNode((BGraph *)rg, (BNode *)start_node);
}
joined = 1;
@@ -1435,10 +1366,9 @@ static int joinSubgraphs(ReebGraph *rg, float threshold)
int nb_subgraphs;
int joined = 0;
- BLI_buildAdjacencyList((BGraph*)rg);
+ BLI_buildAdjacencyList((BGraph *)rg);
- if (BLI_isGraphCyclic((BGraph*)rg))
- {
+ if (BLI_isGraphCyclic((BGraph *)rg)) {
/* don't deal with cyclic graphs YET */
return 0;
}
@@ -1446,13 +1376,13 @@ static int joinSubgraphs(ReebGraph *rg, float threshold)
/* sort nodes before flagging subgraphs to make sure root node is subgraph 0 */
sortNodes(rg);
- nb_subgraphs = BLI_FlagSubgraphs((BGraph*)rg);
+ nb_subgraphs = BLI_FlagSubgraphs((BGraph *)rg);
/* Harmonic function can create flipped arcs, take the occasion to fix them */
// XXX
// if (G.scene->toolsettings->skgen_options & SKGEN_HARMONIC)
// {
- fixSubgraphsOrientation(rg, nb_subgraphs);
+ fixSubgraphsOrientation(rg, nb_subgraphs);
// }
if (nb_subgraphs > 1)
@@ -1462,7 +1392,7 @@ static int joinSubgraphs(ReebGraph *rg, float threshold)
if (joined)
{
removeNormalNodes(rg);
- BLI_buildAdjacencyList((BGraph*)rg);
+ BLI_buildAdjacencyList((BGraph *)rg);
}
}
@@ -1474,8 +1404,8 @@ static int joinSubgraphs(ReebGraph *rg, float threshold)
static float lengthArc(ReebArc *arc)
{
#if 0
- ReebNode *head = (ReebNode*)arc->head;
- ReebNode *tail = (ReebNode*)arc->tail;
+ ReebNode *head = (ReebNode *)arc->head;
+ ReebNode *tail = (ReebNode *)arc->tail;
return tail->weight - head->weight;
#else
@@ -1485,36 +1415,30 @@ static float lengthArc(ReebArc *arc)
static int compareArcs(void *varc1, void *varc2)
{
- ReebArc *arc1 = (ReebArc*)varc1;
- ReebArc *arc2 = (ReebArc*)varc2;
+ ReebArc *arc1 = (ReebArc *)varc1;
+ ReebArc *arc2 = (ReebArc *)varc2;
float len1 = lengthArc(arc1);
float len2 = lengthArc(arc2);
- if (len1 < len2)
- {
+ if (len1 < len2) {
return -1;
}
- if (len1 > len2)
- {
+ if (len1 > len2) {
return 1;
}
- else
- {
+ else {
return 0;
}
}
-static void filterArc(ReebGraph *rg, ReebNode *newNode, ReebNode *removedNode, ReebArc * srcArc, int merging)
+static void filterArc(ReebGraph *rg, ReebNode *newNode, ReebNode *removedNode, ReebArc *srcArc, int merging)
{
ReebArc *arc = NULL, *nextArc = NULL;
- if (merging)
- {
+ if (merging) {
/* first pass, merge buckets for arcs that spawned the two nodes into the source arc*/
- for (arc = rg->arcs.first; arc; arc = arc->next)
- {
- if (arc->head == srcArc->head && arc->tail == srcArc->tail && arc != srcArc)
- {
+ for (arc = rg->arcs.first; arc; arc = arc->next) {
+ if (arc->head == srcArc->head && arc->tail == srcArc->tail && arc != srcArc) {
ReebNode *head = srcArc->head;
ReebNode *tail = srcArc->tail;
mergeArcBuckets(srcArc, arc, head->weight, tail->weight);
@@ -1524,47 +1448,38 @@ static void filterArc(ReebGraph *rg, ReebNode *newNode, ReebNode *removedNode, R
/* second pass, replace removedNode by newNode, remove arcs that are collapsed in a loop */
arc = rg->arcs.first;
- while (arc)
- {
+ while (arc) {
nextArc = arc->next;
- if (arc->head == removedNode || arc->tail == removedNode)
- {
- if (arc->head == removedNode)
- {
+ if (arc->head == removedNode || arc->tail == removedNode) {
+ if (arc->head == removedNode) {
arc->head = newNode;
}
- else
- {
+ else {
arc->tail = newNode;
}
// Remove looped arcs
- if (arc->head == arc->tail)
- {
+ if (arc->head == arc->tail) {
// v1 or v2 was already newNode, since we're removing an arc, decrement degree
NodeDegreeDecrement(rg, newNode);
// If it's srcArc, it'll be removed later, so keep it for now
- if (arc != srcArc)
- {
+ if (arc != srcArc) {
BLI_remlink(&rg->arcs, arc);
- REEB_freeArc((BArc*)arc);
+ REEB_freeArc((BArc *)arc);
}
}
- else
- {
+ else {
/* flip arcs that flipped, can happen on diamond shapes, mostly on null arcs */
- if (arc->head->weight > arc->tail->weight)
- {
+ if (arc->head->weight > arc->tail->weight) {
flipArc(arc);
}
//newNode->degree++; // incrementing degree since we're adding an arc
NodeDegreeIncrement(rg, newNode);
mergeArcFaces(rg, arc, srcArc);
- if (merging)
- {
+ if (merging) {
ReebNode *head = arc->head;
ReebNode *tail = arc->tail;
@@ -1587,14 +1502,12 @@ void filterNullReebGraph(ReebGraph *rg)
ReebArc *arc = NULL, *nextArc = NULL;
arc = rg->arcs.first;
- while (arc)
- {
+ while (arc) {
nextArc = arc->next;
// Only collapse arcs too short to have any embed bucket
- if (arc->bcount == 0)
- {
- ReebNode *newNode = (ReebNode*)arc->head;
- ReebNode *removedNode = (ReebNode*)arc->tail;
+ if (arc->bcount == 0) {
+ ReebNode *newNode = (ReebNode *)arc->head;
+ ReebNode *removedNode = (ReebNode *)arc->tail;
float blend;
blend = (float)newNode->degree / (float)(newNode->degree + removedNode->degree); // blending factors
@@ -1607,9 +1520,9 @@ void filterNullReebGraph(ReebGraph *rg)
nextArc = arc->next;
BLI_remlink(&rg->arcs, arc);
- REEB_freeArc((BArc*)arc);
+ REEB_freeArc((BArc *)arc);
- BLI_removeNode((BGraph*)rg, (BNode*)removedNode);
+ BLI_removeNode((BGraph *)rg, (BNode *)removedNode);
}
arc = nextArc;
@@ -1623,12 +1536,14 @@ static int filterInternalExternalReebGraph(ReebGraph *rg, float threshold_intern
BLI_sortlist(&rg->arcs, compareArcs);
- for (arc = rg->arcs.first; arc; arc = nextArc)
- {
+ for (arc = rg->arcs.first; arc; arc = nextArc) {
nextArc = arc->next;
- // Only collapse non-terminal arcs that are shorter than threshold
- if (threshold_internal > 0 && arc->head->degree > 1 && arc->tail->degree > 1 && (lengthArc(arc) < threshold_internal))
+ /* Only collapse non-terminal arcs that are shorter than threshold */
+ if ((threshold_internal > 0) &&
+ (arc->head->degree > 1) &&
+ (arc->tail->degree > 1) &&
+ (lengthArc(arc) < threshold_internal))
{
ReebNode *newNode = NULL;
ReebNode *removedNode = NULL;
@@ -1643,33 +1558,32 @@ static int filterInternalExternalReebGraph(ReebGraph *rg, float threshold_intern
nextArc = arc->next;
BLI_remlink(&rg->arcs, arc);
- REEB_freeArc((BArc*)arc);
+ REEB_freeArc((BArc *)arc);
- BLI_removeNode((BGraph*)rg, (BNode*)removedNode);
+ BLI_removeNode((BGraph *)rg, (BNode *)removedNode);
value = 1;
}
// Only collapse terminal arcs that are shorter than threshold
- else if (threshold_external > 0 && (arc->head->degree == 1 || arc->tail->degree == 1) && (lengthArc(arc) < threshold_external))
+ else if ((threshold_external > 0) &&
+ (arc->head->degree == 1 || arc->tail->degree == 1) &&
+ (lengthArc(arc) < threshold_external))
{
ReebNode *terminalNode = NULL;
ReebNode *middleNode = NULL;
ReebNode *removedNode = NULL;
// Assign terminal and middle nodes
- if (arc->head->degree == 1)
- {
+ if (arc->head->degree == 1) {
terminalNode = arc->head;
middleNode = arc->tail;
}
- else
- {
+ else {
terminalNode = arc->tail;
middleNode = arc->head;
}
- if (middleNode->degree == 2 && middleNode != rg->nodes.first)
- {
+ if (middleNode->degree == 2 && middleNode != rg->nodes.first) {
#if 1
// If middle node is a normal node, it will be removed later
// Only if middle node is not the root node
@@ -1685,8 +1599,7 @@ static int filterInternalExternalReebGraph(ReebGraph *rg, float threshold_intern
#endif
}
// Otherwise, just plain remove of the arc
- else
- {
+ else {
removedNode = terminalNode;
// removing arc, so we need to decrease the degree of the remaining node
@@ -1697,9 +1610,9 @@ static int filterInternalExternalReebGraph(ReebGraph *rg, float threshold_intern
nextArc = arc->next;
BLI_remlink(&rg->arcs, arc);
- REEB_freeArc((BArc*)arc);
+ REEB_freeArc((BArc *)arc);
- BLI_removeNode((BGraph*)rg, (BNode*)removedNode);
+ BLI_removeNode((BGraph *)rg, (BNode *)removedNode);
value = 1;
}
}
@@ -1713,13 +1626,10 @@ static int filterCyclesReebGraph(ReebGraph *rg, float UNUSED(distance_threshold)
ReebArc *next2;
int filtered = 0;
- for (arc1 = rg->arcs.first; arc1; arc1 = arc1->next)
- {
- for (arc2 = arc1->next; arc2; arc2 = next2)
- {
+ for (arc1 = rg->arcs.first; arc1; arc1 = arc1->next) {
+ for (arc2 = arc1->next; arc2; arc2 = next2) {
next2 = arc2->next;
- if (arc1 != arc2 && arc1->head == arc2->head && arc1->tail == arc2->tail)
- {
+ if (arc1 != arc2 && arc1->head == arc2->head && arc1->tail == arc2->tail) {
mergeArcEdges(rg, arc1, arc2, MERGE_APPEND);
mergeArcFaces(rg, arc1, arc2);
mergeArcBuckets(arc1, arc2, arc1->head->weight, arc1->tail->weight);
@@ -1728,7 +1638,7 @@ static int filterCyclesReebGraph(ReebGraph *rg, float UNUSED(distance_threshold)
NodeDegreeDecrement(rg, arc1->tail);
BLI_remlink(&rg->arcs, arc2);
- REEB_freeArc((BArc*)arc2);
+ REEB_freeArc((BArc *)arc2);
filtered = 1;
}
@@ -1749,7 +1659,7 @@ int filterSmartReebGraph(ReebGraph *UNUSED(rg), float UNUSED(threshold))
#ifdef DEBUG_REEB
{
EditFace *efa;
- for (efa=G.editMesh->faces.first; efa; efa=efa->next) {
+ for (efa = G.editMesh->faces.first; efa; efa = efa->next) {
efa->tmp.fp = -1;
}
}
@@ -1770,17 +1680,17 @@ int filterSmartReebGraph(ReebGraph *UNUSED(rg), float UNUSED(threshold))
int merging = 0;
int total = BLI_ghash_size(arc->faces);
float avg_angle = 0;
- float avg_vec[3] = {0,0,0};
+ float avg_vec[3] = {0, 0, 0};
for (BLI_ghashIterator_init(&ghi, arc->faces);
- !BLI_ghashIterator_isDone(&ghi);
- BLI_ghashIterator_step(&ghi))
+ !BLI_ghashIterator_isDone(&ghi);
+ BLI_ghashIterator_step(&ghi))
{
EditFace *efa = BLI_ghashIterator_getValue(&ghi);
#if 0
ReebArcIterator arc_iter;
- BArcIterator *iter = (BArcIterator*)&arc_iter;
+ BArcIterator *iter = (BArcIterator *)&arc_iter;
EmbedBucket *bucket = NULL;
EmbedBucket *previous = NULL;
float min_distance = -1;
@@ -1803,8 +1713,7 @@ int filterSmartReebGraph(ReebGraph *UNUSED(rg), float UNUSED(threshold))
vec0 = arc->head->p;
}
/* Previous is a valid bucket */
- else
- {
+ else {
vec0 = previous->p;
}
@@ -1848,8 +1757,7 @@ int filterSmartReebGraph(ReebGraph *UNUSED(rg), float UNUSED(threshold))
if (avg_angle > threshold)
merging = 1;
- if (merging)
- {
+ if (merging) {
ReebNode *terminalNode = NULL;
ReebNode *middleNode = NULL;
ReebNode *newNode = NULL;
@@ -1857,39 +1765,33 @@ int filterSmartReebGraph(ReebGraph *UNUSED(rg), float UNUSED(threshold))
int merging = 0;
// Assign terminal and middle nodes
- if (arc->head->degree == 1)
- {
+ if (arc->head->degree == 1) {
terminalNode = arc->head;
middleNode = arc->tail;
}
- else
- {
+ else {
terminalNode = arc->tail;
middleNode = arc->head;
}
// If middle node is a normal node, merge to terminal node
- if (middleNode->degree == 2)
- {
+ if (middleNode->degree == 2) {
merging = 1;
newNode = terminalNode;
removedNode = middleNode;
}
// Otherwise, just plain remove of the arc
- else
- {
+ else {
merging = 0;
newNode = middleNode;
removedNode = terminalNode;
}
// Merging arc
- if (merging)
- {
+ if (merging) {
filterArc(rg, newNode, removedNode, arc, 1);
}
- else
- {
+ else {
// removing arc, so we need to decrease the degree of the remaining node
//newNode->degree--;
NodeDegreeDecrement(rg, newNode);
@@ -1899,7 +1801,7 @@ int filterSmartReebGraph(ReebGraph *UNUSED(rg), float UNUSED(threshold))
nextArc = arc->next;
BLI_remlink(&rg->arcs, arc);
- REEB_freeArc((BArc*)arc);
+ REEB_freeArc((BArc *)arc);
BLI_freelinkN(&rg->nodes, removedNode);
value = 1;
@@ -1920,29 +1822,24 @@ static void filterGraph(ReebGraph *rg, short options, float threshold_internal,
calculateGraphLength(rg);
- if ((options & SKGEN_FILTER_EXTERNAL) == 0)
- {
+ if ((options & SKGEN_FILTER_EXTERNAL) == 0) {
threshold_external = 0;
}
- if ((options & SKGEN_FILTER_INTERNAL) == 0)
- {
+ if ((options & SKGEN_FILTER_INTERNAL) == 0) {
threshold_internal = 0;
}
- if (threshold_internal > 0 || threshold_external > 0)
- {
+ if (threshold_internal > 0 || threshold_external > 0) {
/* filter until there's nothing more to do */
- while (done == 1)
- {
+ while (done == 1) {
done = 0; /* no work done yet */
done = filterInternalExternalReebGraph(rg, threshold_internal, threshold_external);
}
}
- if (options & SKGEN_FILTER_SMART)
- {
+ if (options & SKGEN_FILTER_SMART) {
filterSmartReebGraph(rg, 0.5);
filterCyclesReebGraph(rg, 0.5);
}
@@ -1957,14 +1854,13 @@ static void finalizeGraph(ReebGraph *rg, char passes, char method)
{
int i;
- BLI_buildAdjacencyList((BGraph*)rg);
+ BLI_buildAdjacencyList((BGraph *)rg);
sortNodes(rg);
sortArcs(rg);
- for (i = 0; i < passes; i++)
- {
+ for (i = 0; i < passes; i++) {
postprocessGraph(rg, method);
}
@@ -1973,18 +1869,16 @@ static void finalizeGraph(ReebGraph *rg, char passes, char method)
/************************************** WEIGHT SPREADING ***********************************************/
-static int compareVerts( const void* a, const void* b )
+static int compareVerts(const void *a, const void *b)
{
- EditVert *va = *(EditVert**)a;
- EditVert *vb = *(EditVert**)b;
+ EditVert *va = *(EditVert **)a;
+ EditVert *vb = *(EditVert **)b;
int value = 0;
- if (weightData(va) < weightData(vb))
- {
+ if (weightData(va) < weightData(vb)) {
value = -1;
}
- else if (weightData(va) > weightData(vb))
- {
+ else if (weightData(va) > weightData(vb)) {
value = 1;
}
@@ -1999,28 +1893,23 @@ static void spreadWeight(EditMesh *em)
int i;
int work_needed = 1;
- verts = MEM_callocN(sizeof(EditVert*) * totvert, "verts array");
+ verts = MEM_callocN(sizeof(EditVert *) * totvert, "verts array");
- for (eve = em->verts.first, i = 0; eve; eve = eve->next, i++)
- {
+ for (eve = em->verts.first, i = 0; eve; eve = eve->next, i++) {
verts[i] = eve;
}
- while (work_needed == 1)
- {
+ while (work_needed == 1) {
work_needed = 0;
- qsort(verts, totvert, sizeof(EditVert*), compareVerts);
+ qsort(verts, totvert, sizeof(EditVert *), compareVerts);
- for (i = 0; i < totvert; i++)
- {
+ for (i = 0; i < totvert; i++) {
eve = verts[i];
- if (i == 0 || (weightData(eve) - lastWeight) > FLT_EPSILON)
- {
+ if (i == 0 || (weightData(eve) - lastWeight) > FLT_EPSILON) {
lastWeight = weightData(eve);
}
- else
- {
+ else {
work_needed = 1;
weightSetData(eve, lastWeight + FLT_EPSILON * 2);
lastWeight = weightData(eve);
@@ -2044,8 +1933,7 @@ void REEB_exportGraph(ReebGraph *rg, int count)
char filename[128];
FILE *f;
- if (count == -1)
- {
+ if (count == -1) {
strcpy(filename, "test.txt");
}
else {
@@ -2053,15 +1941,13 @@ void REEB_exportGraph(ReebGraph *rg, int count)
}
f = BLI_fopen(filename, "w");
- for (arc = rg->arcs.first; arc; arc = arc->next)
- {
+ for (arc = rg->arcs.first; arc; arc = arc->next) {
int i;
float p[3];
exportNode(f, "v1", arc->head);
- for (i = 0; i < arc->bcount; i++)
- {
+ for (i = 0; i < arc->bcount; i++) {
fprintf(f, "b nv:%i %f %f %f\n", arc->buckets[i].nv, arc->buckets[i].p[0], arc->buckets[i].p[1], arc->buckets[i].p[2]);
}
@@ -2082,13 +1968,11 @@ static void removeZeroNodes(ReebGraph *rg)
{
ReebNode *node, *next_node;
- for (node = rg->nodes.first; node; node = next_node)
- {
+ for (node = rg->nodes.first; node; node = next_node) {
next_node = node->next;
- if (node->degree == 0)
- {
- BLI_removeNode((BGraph*)rg, (BNode*)node);
+ if (node->degree == 0) {
+ BLI_removeNode((BGraph *)rg, (BNode *)node);
}
}
}
@@ -2098,63 +1982,51 @@ void removeNormalNodes(ReebGraph *rg)
ReebArc *arc, *nextArc;
// Merge degree 2 nodes
- for (arc = rg->arcs.first; arc; arc = nextArc)
- {
+ for (arc = rg->arcs.first; arc; arc = nextArc) {
nextArc = arc->next;
- while (arc->head->degree == 2 || arc->tail->degree == 2)
- {
+ while (arc->head->degree == 2 || arc->tail->degree == 2) {
// merge at v1
- if (arc->head->degree == 2)
- {
- ReebArc *connectedArc = (ReebArc*)BLI_findConnectedArc((BGraph*)rg, (BArc*)arc, (BNode*)arc->head);
+ if (arc->head->degree == 2) {
+ ReebArc *connectedArc = (ReebArc *)BLI_findConnectedArc((BGraph *)rg, (BArc *)arc, (BNode *)arc->head);
/* If arcs are one after the other */
- if (arc->head == connectedArc->tail)
- {
+ if (arc->head == connectedArc->tail) {
/* remove furthest arc */
- if (arc->tail->weight < connectedArc->head->weight)
- {
+ if (arc->tail->weight < connectedArc->head->weight) {
mergeConnectedArcs(rg, arc, connectedArc);
nextArc = arc->next;
}
- else
- {
+ else {
mergeConnectedArcs(rg, connectedArc, arc);
break; /* arc was removed, move to next */
}
}
/* Otherwise, arcs are side by side */
- else
- {
+ else {
/* Don't do anything, we need to keep the lowest node, even if degree 2 */
break;
}
}
- // merge at v2
- if (arc->tail->degree == 2)
- {
- ReebArc *connectedArc = (ReebArc*)BLI_findConnectedArc((BGraph*)rg, (BArc*)arc, (BNode*)arc->tail);
+ /* merge at v2 */
+ if (arc->tail->degree == 2) {
+ ReebArc *connectedArc = (ReebArc *)BLI_findConnectedArc((BGraph *)rg, (BArc *)arc, (BNode *)arc->tail);
/* If arcs are one after the other */
- if (arc->tail == connectedArc->head)
- {
+ if (arc->tail == connectedArc->head) {
/* remove furthest arc */
- if (arc->head->weight < connectedArc->tail->weight)
- {
+ if (arc->head->weight < connectedArc->tail->weight) {
mergeConnectedArcs(rg, arc, connectedArc);
nextArc = arc->next;
}
- else
- {
+ else {
mergeConnectedArcs(rg, connectedArc, arc);
break; /* arc was removed, move to next */
}
}
/* Otherwise, arcs are side by side */
- else
- {
+ else {
/* Don't do anything, we need to keep the lowest node, even if degree 2 */
break;
}
@@ -2176,13 +2048,11 @@ static ReebArc *nextArcMappedToEdge(ReebArc *arc, ReebEdge *e)
ReebArc *result = NULL;
/* Find the ReebEdge in the edge list */
- for (edge = arc->edges.first; edge && !edgeEquals(edge, e); edge = edge->next)
- { }
+ for (edge = arc->edges.first; edge && !edgeEquals(edge, e); edge = edge->next) { }
nextEdge = edge->nextEdge;
- if (nextEdge != NULL)
- {
+ if (nextEdge != NULL) {
result = nextEdge->arc;
}
@@ -2199,8 +2069,8 @@ void mergeArcFaces(ReebGraph *UNUSED(rg), ReebArc *aDst, ReebArc *aSrc)
GHashIterator ghi;
for (BLI_ghashIterator_init(&ghi, aSrc->faces);
- !BLI_ghashIterator_isDone(&ghi);
- BLI_ghashIterator_step(&ghi))
+ !BLI_ghashIterator_isDone(&ghi);
+ BLI_ghashIterator_step(&ghi))
{
EditFace *efa = BLI_ghashIterator_getValue(&ghi);
BLI_ghash_insert(aDst->faces, efa, efa);
@@ -2211,51 +2081,42 @@ void mergeArcEdges(ReebGraph *rg, ReebArc *aDst, ReebArc *aSrc, MergeDirection d
{
ReebEdge *e = NULL;
- if (direction == MERGE_APPEND)
- {
- for (e = aSrc->edges.first; e; e = e->next)
- {
+ if (direction == MERGE_APPEND) {
+ for (e = aSrc->edges.first; e; e = e->next) {
e->arc = aDst; // Edge is stolen by new arc
}
- BLI_movelisttolist(&aDst->edges , &aSrc->edges);
+ BLI_movelisttolist(&aDst->edges, &aSrc->edges);
}
- else
- {
- for (e = aSrc->edges.first; e; e = e->next)
- {
+ else {
+ for (e = aSrc->edges.first; e; e = e->next) {
ReebEdge *newEdge = copyEdge(e);
newEdge->arc = aDst;
BLI_addtail(&aDst->edges, newEdge);
- if (direction == MERGE_LOWER)
- {
+ if (direction == MERGE_LOWER) {
void **p = BLI_edgehash_lookup_p(rg->emap, e->v1->index, e->v2->index);
newEdge->nextEdge = e;
// if edge was the first in the list, point the edit edge to the new reeb edge instead.
- if (*p == e)
- {
- *p = (void*)newEdge;
+ if (*p == e) {
+ *p = (void *)newEdge;
}
// otherwise, advance in the list until the predecessor is found then insert it there
- else
- {
- ReebEdge *previous = (ReebEdge*)*p;
+ else {
+ ReebEdge *previous = (ReebEdge *)*p;
- while (previous->nextEdge != e)
- {
+ while (previous->nextEdge != e) {
previous = previous->nextEdge;
}
previous->nextEdge = newEdge;
}
}
- else
- {
+ else {
newEdge->nextEdge = e->nextEdge;
e->nextEdge = newEdge;
}
@@ -2275,13 +2136,11 @@ int mergeConnectedArcs(ReebGraph *rg, ReebArc *a0, ReebArc *a1)
mergeArcFaces(rg, a0, a1);
// Bring a0 to the combine length of both arcs
- if (a0->tail == a1->head)
- {
+ if (a0->tail == a1->head) {
removedNode = a0->tail;
a0->tail = a1->tail;
}
- else if (a0->head == a1->tail)
- {
+ else if (a0->head == a1->tail) {
removedNode = a0->head;
a0->head = a1->head;
}
@@ -2292,9 +2151,9 @@ int mergeConnectedArcs(ReebGraph *rg, ReebArc *a0, ReebArc *a1)
// remove a1 from graph
BLI_remlink(&rg->arcs, a1);
- REEB_freeArc((BArc*)a1);
+ REEB_freeArc((BArc *)a1);
- BLI_removeNode((BGraph*)rg, (BNode*)removedNode);
+ BLI_removeNode((BGraph *)rg, (BNode *)removedNode);
result = 1;
return result;
@@ -2303,11 +2162,9 @@ int mergeConnectedArcs(ReebGraph *rg, ReebArc *a0, ReebArc *a1)
int mergeArcs(ReebGraph *rg, ReebArc *a0, ReebArc *a1)
{
int result = 0;
- // TRIANGLE POINTS DOWN
- if (a0->head->weight == a1->head->weight) // heads are the same
- {
- if (a0->tail->weight == a1->tail->weight) // tails also the same, arcs can be totally merge together
- {
+ /* TRIANGLE POINTS DOWN */
+ if (a0->head->weight == a1->head->weight) { /* heads are the same */
+ if (a0->tail->weight == a1->tail->weight) { /* tails also the same, arcs can be totally merge together */
mergeArcEdges(rg, a0, a1, MERGE_APPEND);
mergeArcFaces(rg, a0, a1);
@@ -2322,11 +2179,10 @@ int mergeArcs(ReebGraph *rg, ReebArc *a0, ReebArc *a1)
// remove a1 from graph
BLI_remlink(&rg->arcs, a1);
- REEB_freeArc((BArc*)a1);
+ REEB_freeArc((BArc *)a1);
result = 1;
}
- else if (a0->tail->weight > a1->tail->weight) // a1->tail->weight is in the middle
- {
+ else if (a0->tail->weight > a1->tail->weight) { /* a1->tail->weight is in the middle */
mergeArcEdges(rg, a1, a0, MERGE_LOWER);
mergeArcFaces(rg, a1, a0);
@@ -2340,8 +2196,7 @@ int mergeArcs(ReebGraph *rg, ReebArc *a0, ReebArc *a1)
a0->head = a1->tail;
resizeArcBuckets(a0);
}
- else // a0>n2 is in the middle
- {
+ else { /* a0>n2 is in the middle */
mergeArcEdges(rg, a0, a1, MERGE_LOWER);
mergeArcFaces(rg, a0, a1);
@@ -2356,11 +2211,9 @@ int mergeArcs(ReebGraph *rg, ReebArc *a0, ReebArc *a1)
resizeArcBuckets(a1);
}
}
- // TRIANGLE POINTS UP
- else if (a0->tail->weight == a1->tail->weight) // tails are the same
- {
- if (a0->head->weight > a1->head->weight) // a0->head->weight is in the middle
- {
+ /* TRIANGLE POINTS UP */
+ else if (a0->tail->weight == a1->tail->weight) { /* tails are the same */
+ if (a0->head->weight > a1->head->weight) { /* a0->head->weight is in the middle */
mergeArcEdges(rg, a0, a1, MERGE_HIGHER);
mergeArcFaces(rg, a0, a1);
@@ -2374,8 +2227,7 @@ int mergeArcs(ReebGraph *rg, ReebArc *a0, ReebArc *a1)
a1->tail = a0->head;
resizeArcBuckets(a1);
}
- else // a1->head->weight is in the middle
- {
+ else { /* a1->head->weight is in the middle */
mergeArcEdges(rg, a1, a0, MERGE_HIGHER);
mergeArcFaces(rg, a1, a0);
@@ -2390,9 +2242,8 @@ int mergeArcs(ReebGraph *rg, ReebArc *a0, ReebArc *a1)
resizeArcBuckets(a0);
}
}
- else
- {
- // Need something here (OR NOT)
+ else {
+ /* Need something here (OR NOT) */
}
return result;
@@ -2401,23 +2252,19 @@ int mergeArcs(ReebGraph *rg, ReebArc *a0, ReebArc *a1)
static void glueByMergeSort(ReebGraph *rg, ReebArc *a0, ReebArc *a1, ReebEdge *e0, ReebEdge *e1)
{
int total = 0;
- while (total == 0 && a0 != a1 && a0 != NULL && a1 != NULL)
- {
+ while (total == 0 && a0 != a1 && a0 != NULL && a1 != NULL) {
total = mergeArcs(rg, a0, a1);
- if (total == 0) // if it wasn't a total merge, go forward
- {
- if (a0->tail->weight < a1->tail->weight)
- {
+ if (total == 0) // if it wasn't a total merge, go forward {
+ if (a0->tail->weight < a1->tail->weight) {
a0 = nextArcMappedToEdge(a0, e0);
}
- else
- {
+ else {
a1 = nextArcMappedToEdge(a1, e1);
}
- }
}
}
+}
static void mergePaths(ReebGraph *rg, ReebEdge *e0, ReebEdge *e1, ReebEdge *e2)
{
@@ -2430,15 +2277,14 @@ static void mergePaths(ReebGraph *rg, ReebEdge *e0, ReebEdge *e1, ReebEdge *e2)
glueByMergeSort(rg, a0, a2, e0, e2);
}
-static ReebEdge * createArc(ReebGraph *rg, ReebNode *node1, ReebNode *node2)
+static ReebEdge *createArc(ReebGraph *rg, ReebNode *node1, ReebNode *node2)
{
ReebEdge *edge;
edge = BLI_edgehash_lookup(rg->emap, node1->index, node2->index);
// Only add existing edges that haven't been added yet
- if (edge == NULL)
- {
+ if (edge == NULL) {
ReebArc *arc;
ReebNode *v1, *v2;
float len, offset;
@@ -2451,13 +2297,11 @@ static ReebEdge * createArc(ReebGraph *rg, ReebNode *node1, ReebNode *node2)
arc->symmetry_level = 0;
arc->faces = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "createArc gh");
- if (node1->weight <= node2->weight)
- {
+ if (node1->weight <= node2->weight) {
v1 = node1;
v2 = node2;
}
- else
- {
+ else {
v1 = node2;
v2 = node1;
}
@@ -2497,8 +2341,7 @@ static ReebEdge * createArc(ReebGraph *rg, ReebNode *node1, ReebNode *node2)
addVertToBucket(&(arc->buckets[arc->bcount - 1]), arc->tail->co);
}
#else
- for (i = 0; i < arc->bcount; i++)
- {
+ for (i = 0; i < arc->bcount; i++) {
float co[3];
float f = (arc->buckets[i].val - offset) / len;
@@ -2512,7 +2355,7 @@ static ReebEdge * createArc(ReebGraph *rg, ReebNode *node1, ReebNode *node2)
return edge;
}
-static void addTriangleToGraph(ReebGraph *rg, ReebNode * n1, ReebNode * n2, ReebNode * n3, EditFace *efa)
+static void addTriangleToGraph(ReebGraph *rg, ReebNode *n1, ReebNode *n2, ReebNode *n3, EditFace *efa)
{
ReebEdge *re1, *re2, *re3;
ReebEdge *e1, *e2, *e3;
@@ -2532,20 +2375,17 @@ static void addTriangleToGraph(ReebGraph *rg, ReebNode * n1, ReebNode * n2, Reeb
/* The rest of the algorithm assumes that e1 is the longest edge */
- if (len1 >= len2 && len1 >= len3)
- {
+ if (len1 >= len2 && len1 >= len3) {
e1 = re1;
e2 = re2;
e3 = re3;
}
- else if (len2 >= len1 && len2 >= len3)
- {
+ else if (len2 >= len1 && len2 >= len3) {
e1 = re2;
e2 = re1;
e3 = re3;
}
- else
- {
+ else {
e1 = re3;
e2 = re2;
e3 = re1;
@@ -2554,8 +2394,7 @@ static void addTriangleToGraph(ReebGraph *rg, ReebNode * n1, ReebNode * n2, Reeb
/* And e2 is the lowest edge
* If e3 is lower than e2, swap them
*/
- if (e3->v1->weight < e2->v1->weight)
- {
+ if (e3->v1->weight < e2->v1->weight) {
ReebEdge *etmp = e2;
e2 = e3;
e3 = etmp;
@@ -2565,7 +2404,7 @@ static void addTriangleToGraph(ReebGraph *rg, ReebNode * n1, ReebNode * n2, Reeb
mergePaths(rg, e1, e2, e3);
}
-ReebGraph * generateReebGraph(EditMesh *em, int subdivisions)
+ReebGraph *generateReebGraph(EditMesh *em, int subdivisions)
{
ReebGraph *rg;
EditVert *eve;
@@ -2595,10 +2434,8 @@ ReebGraph * generateReebGraph(EditMesh *em, int subdivisions)
renormalizeWeight(em, (float)rg->resolution);
/* Adding vertice */
- for (index = 0, eve = em->verts.first; eve; eve = eve->next)
- {
- if (eve->h == 0)
- {
+ for (index = 0, eve = em->verts.first; eve; eve = eve->next) {
+ if (eve->h == 0) {
addNode(rg, eve);
eve->f2 = 0;
index++;
@@ -2606,10 +2443,8 @@ ReebGraph * generateReebGraph(EditMesh *em, int subdivisions)
}
/* Adding face, edge per edge */
- for (efa = em->faces.first; efa; efa = efa->next)
- {
- if (efa->h == 0)
- {
+ for (efa = em->faces.first; efa; efa = efa->next) {
+ if (efa->h == 0) {
ReebNode *n1, *n2, *n3;
n1 = nodeData(efa->v1);
@@ -2618,15 +2453,13 @@ ReebGraph * generateReebGraph(EditMesh *em, int subdivisions)
addTriangleToGraph(rg, n1, n2, n3, efa);
- if (efa->v4)
- {
+ if (efa->v4) {
ReebNode *n4 = nodeData(efa->v4);
addTriangleToGraph(rg, n1, n3, n4, efa);
}
#ifdef DEBUG_REEB
countfaces++;
- if (countfaces % 100 == 0)
- {
+ if (countfaces % 100 == 0) {
printf("\rface %i of %i", countfaces, totfaces);
}
#endif
@@ -2656,8 +2489,7 @@ void renormalizeWeight(EditMesh *em, float newmax)
eve = em->verts.first;
minimum = weightData(eve);
maximum = minimum;
- for (; eve; eve = eve->next)
- {
+ for (; eve; eve = eve->next) {
maximum = MAX2(maximum, weightData(eve));
minimum = MIN2(minimum, weightData(eve));
}
@@ -2665,8 +2497,7 @@ void renormalizeWeight(EditMesh *em, float newmax)
range = maximum - minimum;
/* Normalize weights */
- for (eve = em->verts.first; eve; eve = eve->next)
- {
+ for (eve = em->verts.first; eve; eve = eve->next) {
float weight = (weightData(eve) - minimum) / range * newmax;
weightSetData(eve, weight);
}
@@ -2681,8 +2512,7 @@ int weightFromLoc(EditMesh *em, int axis)
return 0;
/* Copy coordinate in weight */
- for (eve = em->verts.first; eve; eve = eve->next)
- {
+ for (eve = em->verts.first; eve; eve = eve->next) {
weightSetData(eve, eve->co[axis]);
}
@@ -2702,13 +2532,13 @@ static float cotan_weight(float *v1, float *v2, float *v3)
if (clen == 0.0f)
return 0.0f;
- return dot_v3v3(a, b)/clen;
+ return dot_v3v3(a, b) / clen;
}
static void addTriangle(EditVert *v1, EditVert *v2, EditVert *v3, int e1, int e2, int e3)
{
/* Angle opposite e1 */
- float t1= cotan_weight(v1->co, v2->co, v3->co) / e2;
+ float t1 = cotan_weight(v1->co, v2->co, v3->co) / e2;
/* Angle opposite e2 */
float t2 = cotan_weight(v2->co, v3->co, v1->co) / e3;
@@ -2720,9 +2550,9 @@ static void addTriangle(EditVert *v1, EditVert *v2, EditVert *v3, int e1, int e2
int i2 = indexData(v2);
int i3 = indexData(v3);
- nlMatrixAdd(i1, i1, t2+t3);
- nlMatrixAdd(i2, i2, t1+t3);
- nlMatrixAdd(i3, i3, t1+t2);
+ nlMatrixAdd(i1, i1, t2 + t3);
+ nlMatrixAdd(i2, i2, t1 + t3);
+ nlMatrixAdd(i3, i3, t1 + t2);
nlMatrixAdd(i1, i2, -t3);
nlMatrixAdd(i2, i1, -t3);
@@ -2745,8 +2575,7 @@ int weightToHarmonic(EditMesh *em, EdgeIndex *indexed_edges)
int rval;
/* Find local extrema */
- for (eve = em->verts.first; eve; eve = eve->next)
- {
+ for (eve = em->verts.first; eve; eve = eve->next) {
totvert++;
}
@@ -2759,52 +2588,42 @@ int weightToHarmonic(EditMesh *em, EdgeIndex *indexed_edges)
nlBegin(NL_SYSTEM);
/* Find local extrema */
- for (index = 0, eve = em->verts.first; eve; index++, eve = eve->next)
- {
- if (eve->h == 0)
- {
+ for (index = 0, eve = em->verts.first; eve; index++, eve = eve->next) {
+ if (eve->h == 0) {
EditEdge *eed;
int maximum = 1;
int minimum = 1;
NextEdgeForVert(indexed_edges, -1); /* Reset next edge */
- for (eed = NextEdgeForVert(indexed_edges, index); eed && (maximum || minimum); eed = NextEdgeForVert(indexed_edges, index))
- {
+ for (eed = NextEdgeForVert(indexed_edges, index); eed && (maximum || minimum); eed = NextEdgeForVert(indexed_edges, index)) {
EditVert *eve2;
- if (eed->v1 == eve)
- {
+ if (eed->v1 == eve) {
eve2 = eed->v2;
}
- else
- {
+ else {
eve2 = eed->v1;
}
- if (eve2->h == 0)
- {
+ if (eve2->h == 0) {
/* Adjacent vertex is bigger, not a local maximum */
- if (weightData(eve2) > weightData(eve))
- {
+ if (weightData(eve2) > weightData(eve)) {
maximum = 0;
}
/* Adjacent vertex is smaller, not a local minimum */
- else if (weightData(eve2) < weightData(eve))
- {
+ else if (weightData(eve2) < weightData(eve)) {
minimum = 0;
}
}
}
- if (maximum || minimum)
- {
+ if (maximum || minimum) {
float w = weightData(eve);
eve->f1 = 0;
nlSetVariable(0, index, w);
nlLockVariable(index);
}
- else
- {
+ else {
eve->f1 = 1;
}
}
@@ -2813,38 +2632,30 @@ int weightToHarmonic(EditMesh *em, EdgeIndex *indexed_edges)
nlBegin(NL_MATRIX);
/* Zero edge weight */
- for (eed = em->edges.first; eed; eed = eed->next)
- {
+ for (eed = em->edges.first; eed; eed = eed->next) {
eed->tmp.l = 0;
}
/* Add faces count to the edge weight */
- for (efa = em->faces.first; efa; efa = efa->next)
- {
- if (efa->h == 0)
- {
+ for (efa = em->faces.first; efa; efa = efa->next) {
+ if (efa->h == 0) {
efa->e1->tmp.l++;
efa->e2->tmp.l++;
efa->e3->tmp.l++;
- if (efa->e4)
- {
+ if (efa->e4) {
efa->e4->tmp.l++;
}
}
}
/* Add faces angle to the edge weight */
- for (efa = em->faces.first; efa; efa = efa->next)
- {
- if (efa->h == 0)
- {
- if (efa->v4 == NULL)
- {
+ for (efa = em->faces.first; efa; efa = efa->next) {
+ if (efa->h == 0) {
+ if (efa->v4 == NULL) {
addTriangle(efa->v1, efa->v2, efa->v3, efa->e1->tmp.l, efa->e2->tmp.l, efa->e3->tmp.l);
}
- else
- {
+ else {
addTriangle(efa->v1, efa->v2, efa->v3, efa->e1->tmp.l, efa->e2->tmp.l, 2);
addTriangle(efa->v3, efa->v4, efa->v1, efa->e3->tmp.l, efa->e4->tmp.l, 2);
}
@@ -2857,16 +2668,13 @@ int weightToHarmonic(EditMesh *em, EdgeIndex *indexed_edges)
success = nlSolveAdvanced(NULL, NL_TRUE);
- if (success)
- {
+ if (success) {
rval = 1;
- for (index = 0, eve = em->verts.first; eve; index++, eve = eve->next)
- {
+ for (index = 0, eve = em->verts.first; eve; index++, eve = eve->next) {
weightSetData(eve, nlGetVariable(0, index));
}
}
- else
- {
+ else {
rval = 0;
}
@@ -2876,25 +2684,22 @@ int weightToHarmonic(EditMesh *em, EdgeIndex *indexed_edges)
}
-EditEdge * NextEdgeForVert(EdgeIndex *indexed_edges, int index)
+EditEdge *NextEdgeForVert(EdgeIndex *indexed_edges, int index)
{
static int offset = -1;
/* Reset method, call with NULL mesh pointer */
- if (index == -1)
- {
+ if (index == -1) {
offset = -1;
return NULL;
}
/* first pass, start at the head of the list */
- if (offset == -1)
- {
+ if (offset == -1) {
offset = indexed_edges->offset[index];
}
/* subsequent passes, start on the next edge */
- else
- {
+ else {
offset++;
}
@@ -2903,7 +2708,7 @@ EditEdge * NextEdgeForVert(EdgeIndex *indexed_edges, int index)
static void shortestPathsFromVert(EditMesh *em, EditVert *starting_vert, EdgeIndex *indexed_edges)
{
- Heap *edge_heap;
+ Heap *edge_heap;
EditVert *current_eve = NULL;
EditEdge *eed = NULL;
EditEdge *select_eed = NULL;
@@ -2916,45 +2721,37 @@ static void shortestPathsFromVert(EditMesh *em, EditVert *starting_vert, EdgeInd
BLI_heap_insert(edge_heap, FLT_MAX, NULL);
/* Initialize edge flag */
- for (eed= em->edges.first; eed; eed= eed->next)
- {
+ for (eed = em->edges.first; eed; eed = eed->next) {
eed->f1 = 0;
}
- while (BLI_heap_size(edge_heap) > 0)
- {
+ while (BLI_heap_size(edge_heap) > 0) {
float current_weight;
current_eve->f1 = 1; /* mark vertex as selected */
/* Add all new edges connected to current_eve to the list */
NextEdgeForVert(indexed_edges, -1); // Reset next edge
- for (eed = NextEdgeForVert(indexed_edges, indexData(current_eve)); eed; eed = NextEdgeForVert(indexed_edges, indexData(current_eve)))
- {
- if (eed->f1 == 0)
- {
+ for (eed = NextEdgeForVert(indexed_edges, indexData(current_eve)); eed; eed = NextEdgeForVert(indexed_edges, indexData(current_eve))) {
+ if (eed->f1 == 0) {
BLI_heap_insert(edge_heap, weightData(current_eve) + eed->tmp.fp, eed);
eed->f1 = 1;
}
}
/* Find next shortest edge with unselected verts */
- do
- {
+ do {
current_weight = BLI_heap_node_value(BLI_heap_top(edge_heap));
select_eed = BLI_heap_popmin(edge_heap);
} while (select_eed != NULL && select_eed->v1->f1 != 0 && select_eed->v2->f1);
- if (select_eed != NULL)
- {
+ if (select_eed != NULL) {
select_eed->f1 = 2;
- if (select_eed->v1->f1 == 0) /* v1 is the new vertex */
- {
+ if (select_eed->v1->f1 == 0) /* v1 is the new vertex */ {
current_eve = select_eed->v1;
}
- else /* otherwise, it's v2 */
- {
+ else { /* otherwise, it's v2 */
current_eve = select_eed->v2;
}
@@ -2983,10 +2780,8 @@ static void buildIndexedEdges(EditMesh *em, EdgeIndex *indexed_edges)
indexed_edges->offset = MEM_callocN(totvert * sizeof(int), "EdgeIndex offset");
- for (eed = em->edges.first; eed; eed = eed->next)
- {
- if (eed->v1->h == 0 && eed->v2->h == 0)
- {
+ for (eed = em->edges.first; eed; eed = eed->next) {
+ if (eed->v1->h == 0 && eed->v2->h == 0) {
tot_indexed += 2;
indexed_edges->offset[indexData(eed->v1)]++;
indexed_edges->offset[indexData(eed->v2)]++;
@@ -2995,13 +2790,11 @@ static void buildIndexedEdges(EditMesh *em, EdgeIndex *indexed_edges)
tot_indexed += totvert;
- indexed_edges->edges = MEM_callocN(tot_indexed * sizeof(EditEdge*), "EdgeIndex edges");
+ indexed_edges->edges = MEM_callocN(tot_indexed * sizeof(EditEdge *), "EdgeIndex edges");
/* setting vert offsets */
- for (eve = em->verts.first; eve; eve = eve->next)
- {
- if (eve->h == 0)
- {
+ for (eve = em->verts.first; eve; eve = eve->next) {
+ if (eve->h == 0) {
int d = indexed_edges->offset[indexData(eve)];
indexed_edges->offset[indexData(eve)] = offset;
offset += d + 1;
@@ -3009,24 +2802,18 @@ static void buildIndexedEdges(EditMesh *em, EdgeIndex *indexed_edges)
}
/* adding edges in array */
- for (eed = em->edges.first; eed; eed= eed->next)
- {
- if (eed->v1->h == 0 && eed->v2->h == 0)
- {
+ for (eed = em->edges.first; eed; eed = eed->next) {
+ if (eed->v1->h == 0 && eed->v2->h == 0) {
int i;
- for (i = indexed_edges->offset[indexData(eed->v1)]; i < tot_indexed; i++)
- {
- if (indexed_edges->edges[i] == NULL)
- {
+ for (i = indexed_edges->offset[indexData(eed->v1)]; i < tot_indexed; i++) {
+ if (indexed_edges->edges[i] == NULL) {
indexed_edges->edges[i] = eed;
break;
}
}
- for (i = indexed_edges->offset[indexData(eed->v2)]; i < tot_indexed; i++)
- {
- if (indexed_edges->edges[i] == NULL)
- {
+ for (i = indexed_edges->offset[indexData(eed->v2)]; i < tot_indexed; i++) {
+ if (indexed_edges->edges[i] == NULL) {
indexed_edges->edges[i] = eed;
break;
}
@@ -3044,80 +2831,64 @@ int weightFromDistance(EditMesh *em, EdgeIndex *indexed_edges)
totvert = BLI_countlist(&em->verts);
- if (em == NULL || totvert == 0)
- {
+ if (em == NULL || totvert == 0) {
return 0;
}
totedge = BLI_countlist(&em->edges);
- if (totedge == 0)
- {
+ if (totedge == 0) {
return 0;
}
/* Initialize vertice flag and find at least one selected vertex */
- for (eve = em->verts.first; eve; eve = eve->next)
- {
+ for (eve = em->verts.first; eve; eve = eve->next) {
eve->f1 = 0;
- if (eve->f & SELECT)
- {
+ if (eve->f & SELECT) {
vCount = 1;
}
}
- if (vCount == 0)
- {
+ if (vCount == 0) {
return 0; /* no selected vert, failure */
}
- else
- {
+ else {
EditEdge *eed;
int allDone = 0;
/* Calculate edge weight */
- for (eed = em->edges.first; eed; eed= eed->next)
- {
- if (eed->v1->h == 0 && eed->v2->h == 0)
- {
+ for (eed = em->edges.first; eed; eed = eed->next) {
+ if (eed->v1->h == 0 && eed->v2->h == 0) {
eed->tmp.fp = len_v3v3(eed->v1->co, eed->v2->co);
}
}
/* Apply dijkstra spf for each selected vert */
- for (eve = em->verts.first; eve; eve = eve->next)
- {
- if (eve->f & SELECT)
- {
+ for (eve = em->verts.first; eve; eve = eve->next) {
+ if (eve->f & SELECT) {
shortestPathsFromVert(em, eve, indexed_edges);
}
}
/* connect unselected islands */
- while (allDone == 0)
- {
+ while (allDone == 0) {
EditVert *selected_eve = NULL;
float selected_weight = 0;
float min_distance = FLT_MAX;
allDone = 1;
- for (eve = em->verts.first; eve; eve = eve->next)
- {
+ for (eve = em->verts.first; eve; eve = eve->next) {
/* for every vertex visible that hasn't been processed yet */
- if (eve->h == 0 && eve->f1 != 1)
- {
+ if (eve->h == 0 && eve->f1 != 1) {
EditVert *closest_eve;
/* find the closest processed vertex */
- for (closest_eve = em->verts.first; closest_eve; closest_eve = closest_eve->next)
- {
+ for (closest_eve = em->verts.first; closest_eve; closest_eve = closest_eve->next) {
/* vertex is already processed and distance is smaller than current minimum */
- if (closest_eve->f1 == 1)
- {
+ if (closest_eve->f1 == 1) {
float distance = len_v3v3(closest_eve->co, eve->co);
- if (distance < min_distance)
- {
+ if (distance < min_distance) {
min_distance = distance;
selected_eve = eve;
selected_weight = weightData(closest_eve);
@@ -3127,8 +2898,7 @@ int weightFromDistance(EditMesh *em, EdgeIndex *indexed_edges)
}
}
- if (selected_eve)
- {
+ if (selected_eve) {
allDone = 0;
weightSetData(selected_eve, selected_weight + min_distance);
@@ -3137,10 +2907,8 @@ int weightFromDistance(EditMesh *em, EdgeIndex *indexed_edges)
}
}
- for (eve = em->verts.first; eve && vCount == 0; eve = eve->next)
- {
- if (eve->f1 == 0)
- {
+ for (eve = em->verts.first; eve && vCount == 0; eve = eve->next) {
+ if (eve->f1 == 0) {
printf("vertex not reached\n");
break;
}
@@ -3152,12 +2920,12 @@ int weightFromDistance(EditMesh *em, EdgeIndex *indexed_edges)
/****************************************** BUCKET ITERATOR **************************************************/
-static void* headNode(void *arg);
-static void* tailNode(void *arg);
-static void* nextBucket(void *arg);
-static void* nextNBucket(void *arg, int n);
-static void* peekBucket(void *arg, int n);
-static void* previousBucket(void *arg);
+static void *headNode(void *arg);
+static void *tailNode(void *arg);
+static void *nextBucket(void *arg);
+static void *nextNBucket(void *arg, int n);
+static void *peekBucket(void *arg, int n);
+static void *previousBucket(void *arg);
static int iteratorStopped(void *arg);
static void initIteratorFct(ReebArcIterator *iter)
@@ -3173,13 +2941,11 @@ static void initIteratorFct(ReebArcIterator *iter)
static void setIteratorValues(ReebArcIterator *iter, EmbedBucket *bucket)
{
- if (bucket)
- {
+ if (bucket) {
iter->p = bucket->p;
iter->no = bucket->no;
}
- else
- {
+ else {
iter->p = NULL;
iter->no = NULL;
}
@@ -3188,19 +2954,17 @@ static void setIteratorValues(ReebArcIterator *iter, EmbedBucket *bucket)
void initArcIterator(BArcIterator *arg, ReebArc *arc, ReebNode *head)
{
- ReebArcIterator *iter = (ReebArcIterator*)arg;
+ ReebArcIterator *iter = (ReebArcIterator *)arg;
initIteratorFct(iter);
iter->arc = arc;
- if (head == arc->head)
- {
+ if (head == arc->head) {
iter->start = 0;
iter->end = arc->bcount - 1;
iter->stride = 1;
}
- else
- {
+ else {
iter->start = arc->bcount - 1;
iter->end = 0;
iter->stride = -1;
@@ -3213,19 +2977,17 @@ void initArcIterator(BArcIterator *arg, ReebArc *arc, ReebNode *head)
void initArcIteratorStart(BArcIterator *arg, struct ReebArc *arc, struct ReebNode *head, int start)
{
- ReebArcIterator *iter = (ReebArcIterator*)arg;
+ ReebArcIterator *iter = (ReebArcIterator *)arg;
initIteratorFct(iter);
iter->arc = arc;
- if (head == arc->head)
- {
+ if (head == arc->head) {
iter->start = start;
iter->end = arc->bcount - 1;
iter->stride = 1;
}
- else
- {
+ else {
iter->start = arc->bcount - 1 - start;
iter->end = 0;
iter->stride = -1;
@@ -3235,15 +2997,14 @@ void initArcIteratorStart(BArcIterator *arg, struct ReebArc *arc, struct ReebNod
iter->length = arc->bcount - start;
- if (start >= arc->bcount)
- {
+ if (start >= arc->bcount) {
iter->start = iter->end; /* stop iterator since it's past its end */
}
}
void initArcIterator2(BArcIterator *arg, ReebArc *arc, int start, int end)
{
- ReebArcIterator *iter = (ReebArcIterator*)arg;
+ ReebArcIterator *iter = (ReebArcIterator *)arg;
initIteratorFct(iter);
iter->arc = arc;
@@ -3251,12 +3012,10 @@ void initArcIterator2(BArcIterator *arg, ReebArc *arc, int start, int end)
iter->start = start;
iter->end = end;
- if (end > start)
- {
+ if (end > start) {
iter->stride = 1;
}
- else
- {
+ else {
iter->stride = -1;
}
@@ -3265,17 +3024,15 @@ void initArcIterator2(BArcIterator *arg, ReebArc *arc, int start, int end)
iter->length = abs(iter->end - iter->start) + 1;
}
-static void* headNode(void *arg)
+static void *headNode(void *arg)
{
- ReebArcIterator *iter = (ReebArcIterator*)arg;
+ ReebArcIterator *iter = (ReebArcIterator *)arg;
ReebNode *node;
- if (iter->start < iter->end)
- {
+ if (iter->start < iter->end) {
node = iter->arc->head;
}
- else
- {
+ else {
node = iter->arc->tail;
}
@@ -3286,17 +3043,15 @@ static void* headNode(void *arg)
return node;
}
-static void* tailNode(void *arg)
+static void *tailNode(void *arg)
{
- ReebArcIterator *iter = (ReebArcIterator*)arg;
+ ReebArcIterator *iter = (ReebArcIterator *)arg;
ReebNode *node;
- if (iter->start < iter->end)
- {
+ if (iter->start < iter->end) {
node = iter->arc->tail;
}
- else
- {
+ else {
node = iter->arc->head;
}
@@ -3307,15 +3062,14 @@ static void* tailNode(void *arg)
return node;
}
-static void* nextBucket(void *arg)
+static void *nextBucket(void *arg)
{
- ReebArcIterator *iter = (ReebArcIterator*)arg;
+ ReebArcIterator *iter = (ReebArcIterator *)arg;
EmbedBucket *result = NULL;
iter->index++;
- if (iter->index < iter->length)
- {
+ if (iter->index < iter->length) {
result = &(iter->arc->buckets[iter->start + (iter->stride * iter->index)]);
}
@@ -3323,16 +3077,15 @@ static void* nextBucket(void *arg)
return result;
}
-static void* nextNBucket(void *arg, int n)
+static void *nextNBucket(void *arg, int n)
{
- ReebArcIterator *iter = (ReebArcIterator*)arg;
+ ReebArcIterator *iter = (ReebArcIterator *)arg;
EmbedBucket *result = NULL;
iter->index += n;
/* check if passed end */
- if (iter->index < iter->length)
- {
+ if (iter->index < iter->length) {
result = &(iter->arc->buckets[iter->start + (iter->stride * iter->index)]);
}
@@ -3340,15 +3093,14 @@ static void* nextNBucket(void *arg, int n)
return result;
}
-static void* peekBucket(void *arg, int n)
+static void *peekBucket(void *arg, int n)
{
- ReebArcIterator *iter = (ReebArcIterator*)arg;
+ ReebArcIterator *iter = (ReebArcIterator *)arg;
EmbedBucket *result = NULL;
int index = iter->index + n;
/* check if passed end */
- if (index < iter->length)
- {
+ if (index < iter->length) {
result = &(iter->arc->buckets[iter->start + (iter->stride * index)]);
}
@@ -3356,13 +3108,12 @@ static void* peekBucket(void *arg, int n)
return result;
}
-static void* previousBucket(void *arg)
+static void *previousBucket(void *arg)
{
- ReebArcIterator *iter = (ReebArcIterator*)arg;
+ ReebArcIterator *iter = (ReebArcIterator *)arg;
EmbedBucket *result = NULL;
- if (iter->index > 0)
- {
+ if (iter->index > 0) {
iter->index--;
result = &(iter->arc->buckets[iter->start + (iter->stride * iter->index)]);
}
@@ -3373,14 +3124,12 @@ static void* previousBucket(void *arg)
static int iteratorStopped(void *arg)
{
- ReebArcIterator *iter = (ReebArcIterator*)arg;
+ ReebArcIterator *iter = (ReebArcIterator *)arg;
- if (iter->index >= iter->length)
- {
+ if (iter->index >= iter->length) {
return 1;
}
- else
- {
+ else {
return 0;
}
}
@@ -3394,7 +3143,7 @@ ReebGraph *BIF_ReebGraphMultiFromEditMesh(bContext *C)
#if 0
Scene *scene = CTX_data_scene(C);
Object *obedit = CTX_data_edit_object(C);
- EditMesh *em = BKE_mesh_get_editmesh(((Mesh*)obedit->data));
+ EditMesh *em = BKE_mesh_get_editmesh(((Mesh *)obedit->data));
EdgeIndex indexed_edges;
VertexData *data;
ReebGraph *rg = NULL;
@@ -3439,10 +3188,10 @@ ReebGraph *BIF_ReebGraphMultiFromEditMesh(bContext *C)
joinSubgraphs(rg, 1.0);
- BLI_buildAdjacencyList((BGraph*)rg);
+ BLI_buildAdjacencyList((BGraph *)rg);
/* calc length before copy, so we have same length on all levels */
- BLI_calcGraphLength((BGraph*)rg);
+ BLI_calcGraphLength((BGraph *)rg);
previous = NULL;
for (i = 0; i <= nb_levels; i++)
@@ -3460,8 +3209,7 @@ ReebGraph *BIF_ReebGraphMultiFromEditMesh(bContext *C)
{
internal_threshold = rg->length * scene->toolsettings->skgen_threshold_internal;
}
- else
- {
+ else {
internal_threshold = rg->length * scene->toolsettings->skgen_threshold_internal * (2 * i / (float)nb_levels);
}
@@ -3477,7 +3225,7 @@ ReebGraph *BIF_ReebGraphMultiFromEditMesh(bContext *C)
finalizeGraph(rgi, scene->toolsettings->skgen_postpro_passes, scene->toolsettings->skgen_postpro);
- BLI_markdownSymmetry((BGraph*)rgi, rgi->nodes.first, scene->toolsettings->skgen_symmetry_limit);
+ BLI_markdownSymmetry((BGraph *)rgi, rgi->nodes.first, scene->toolsettings->skgen_symmetry_limit);
if (previous != NULL)
{
@@ -3552,10 +3300,10 @@ ReebGraph *BIF_ReebGraphFromEditMesh(void)
joinSubgraphs(rg, 1.0);
- BLI_buildAdjacencyList((BGraph*)rg);
+ BLI_buildAdjacencyList((BGraph *)rg);
/* calc length before copy, so we have same length on all levels */
- BLI_calcGraphLength((BGraph*)rg);
+ BLI_calcGraphLength((BGraph *)rg);
filterGraph(rg, G.scene->toolsettings->skgen_options, G.scene->toolsettings->skgen_threshold_internal, G.scene->toolsettings->skgen_threshold_external);
@@ -3569,7 +3317,7 @@ ReebGraph *BIF_ReebGraphFromEditMesh(void)
#endif
printf("DONE\n");
- printf("%i subgraphs\n", BLI_FlagSubgraphs((BGraph*)rg));
+ printf("%i subgraphs\n", BLI_FlagSubgraphs((BGraph *)rg));
MEM_freeN(data);
@@ -3609,13 +3357,12 @@ void REEB_draw()
if (GLOBAL_RG->link_up && G.scene->toolsettings->skgen_options & SKGEN_DISP_ORIG)
{
- for (rg = GLOBAL_RG; rg->link_up; rg = rg->link_up);
+ for (rg = GLOBAL_RG; rg->link_up; rg = rg->link_up) ;
}
- else
- {
+ else {
i = G.scene->toolsettings->skgen_multi_level;
- for (rg = GLOBAL_RG; rg->multi_level != i && rg->link_up; rg = rg->link_up);
+ for (rg = GLOBAL_RG; rg->multi_level != i && rg->link_up; rg = rg->link_up) ;
}
glPointSize(BIF_GetThemeValuef(TH_VERTEX_SIZE));
@@ -3624,7 +3371,7 @@ void REEB_draw()
for (arc = rg->arcs.first; arc; arc = arc->next, i++)
{
ReebArcIterator arc_iter;
- BArcIterator *iter = (BArcIterator*)&arc_iter;
+ BArcIterator *iter = (BArcIterator *)&arc_iter;
float vec[3];
char text[128];
char *s = text;
@@ -3632,18 +3379,18 @@ void REEB_draw()
glLineWidth(BIF_GetThemeValuef(TH_VERTEX_SIZE) + 2);
glColor3f(0, 0, 0);
glBegin(GL_LINE_STRIP);
- glVertex3fv(arc->head->p);
+ glVertex3fv(arc->head->p);
- if (arc->bcount)
+ if (arc->bcount)
+ {
+ initArcIterator(iter, arc, arc->head);
+ for (IT_next(iter); IT_stopped(iter) == 0; IT_next(iter))
{
- initArcIterator(iter, arc, arc->head);
- for (IT_next(iter); IT_stopped(iter) == 0; IT_next(iter))
- {
- glVertex3fv(iter->p);
- }
+ glVertex3fv(iter->p);
}
+ }
- glVertex3fv(arc->tail->p);
+ glVertex3fv(arc->tail->p);
glEnd();
glLineWidth(BIF_GetThemeValuef(TH_VERTEX_SIZE));
@@ -3660,23 +3407,22 @@ void REEB_draw()
{
glColor3f(0.5f, 1, 0);
}
- else
- {
+ else {
glColor3f(1, 1, 0);
}
glBegin(GL_LINE_STRIP);
- glVertex3fv(arc->head->p);
+ glVertex3fv(arc->head->p);
- if (arc->bcount)
+ if (arc->bcount)
+ {
+ initArcIterator(iter, arc, arc->head);
+ for (iter->next(iter); IT_stopped(iter) == 0; iter->next(iter))
{
- initArcIterator(iter, arc, arc->head);
- for (iter->next(iter); IT_stopped(iter) == 0; iter->next(iter))
- {
- glVertex3fv(iter->p);
- }
+ glVertex3fv(iter->p);
}
+ }
- glVertex3fv(arc->tail->p);
+ glVertex3fv(arc->tail->p);
glEnd();
@@ -3684,18 +3430,18 @@ void REEB_draw()
{
glColor3f(1, 1, 1);
glBegin(GL_POINTS);
- glVertex3fv(arc->head->p);
- glVertex3fv(arc->tail->p);
+ glVertex3fv(arc->head->p);
+ glVertex3fv(arc->tail->p);
- glColor3f(0.5f, 0.5f, 1);
- if (arc->bcount)
+ glColor3f(0.5f, 0.5f, 1);
+ if (arc->bcount)
+ {
+ initArcIterator(iter, arc, arc->head);
+ for (iter->next(iter); IT_stopped(iter) == 0; iter->next(iter))
{
- initArcIterator(iter, arc, arc->head);
- for (iter->next(iter); IT_stopped(iter) == 0; iter->next(iter))
- {
- glVertex3fv(iter->p);
- }
+ glVertex3fv(iter->p);
}
+ }
glEnd();
}
@@ -3716,18 +3462,18 @@ void REEB_draw()
glColor3f(0, 1, 0);
glRasterPos3fv(vec);
- BMF_DrawString( G.fonts, text);
+ BMF_DrawString(G.fonts, text);
}
if (G.scene->toolsettings->skgen_options & SKGEN_DISP_INDEX)
{
sprintf(text, " %i", arc->head->index);
glRasterPos3fv(arc->head->p);
- BMF_DrawString( G.fonts, text);
+ BMF_DrawString(G.fonts, text);
sprintf(text, " %i", arc->tail->index);
glRasterPos3fv(arc->tail->p);
- BMF_DrawString( G.fonts, text);
+ BMF_DrawString(G.fonts, text);
}
}
glEnable(GL_DEPTH_TEST);
diff --git a/source/blender/editors/armature/reeb.h b/source/blender/editors/armature/reeb.h
index a9b32da4e5b..d71e80ca0ca 100644
--- a/source/blender/editors/armature/reeb.h
+++ b/source/blender/editors/armature/reeb.h
@@ -41,15 +41,15 @@ struct ReebEdge;
struct ReebNode;
typedef struct ReebGraph {
- ListBase arcs;
- ListBase nodes;
+ ListBase arcs;
+ ListBase nodes;
float length;
- FreeArc free_arc;
- FreeNode free_node;
- RadialSymmetry radial_symmetry;
- AxialSymmetry axial_symmetry;
+ FreeArc free_arc;
+ FreeNode free_node;
+ RadialSymmetry radial_symmetry;
+ AxialSymmetry axial_symmetry;
/*********************************/
int resolution;
@@ -61,7 +61,7 @@ typedef struct ReebGraph {
typedef struct EmbedBucket {
float val;
- int nv;
+ int nv;
float p[3];
float no[3]; /* if non-null, normal of the bucket */
} EmbedBucket;
@@ -85,7 +85,7 @@ typedef struct ReebNode {
int index;
float weight;
- int multi_level;
+ int multi_level;
struct ReebNode *link_down; /* for multi resolution filtering, points to lower levels, if present */
struct ReebNode *link_up;
} ReebNode;
@@ -120,13 +120,13 @@ typedef struct ReebArc {
} ReebArc;
typedef struct ReebArcIterator {
- HeadFct head;
- TailFct tail;
- PeekFct peek;
- NextFct next;
- NextNFct nextN;
- PreviousFct previous;
- StoppedFct stopped;
+ HeadFct head;
+ TailFct tail;
+ PeekFct peek;
+ NextFct next;
+ NextNFct nextN;
+ PreviousFct previous;
+ StoppedFct stopped;
float *p, *no;
float size;
@@ -134,7 +134,7 @@ typedef struct ReebArcIterator {
int length;
int index;
/*********************************/
- struct ReebArc *arc;
+ struct ReebArc *arc;
int start;
int end;
int stride;
@@ -151,8 +151,8 @@ void arcToVCol(struct ReebGraph *rg, struct EditMesh *em, int index);
void angleToVCol(struct EditMesh *em, int index);
void renormalizeWeight(struct EditMesh *em, float newmax);
-ReebGraph * generateReebGraph(struct EditMesh *me, int subdivisions);
-ReebGraph * newReebGraph(void);
+ReebGraph *generateReebGraph(struct EditMesh *me, int subdivisions);
+ReebGraph *newReebGraph(void);
void initArcIterator(BArcIterator *iter, struct ReebArc *arc, struct ReebNode *head);
void initArcIterator2(BArcIterator *iter, struct ReebArc *arc, int start, int end);
@@ -178,7 +178,7 @@ void verifyNodeDegree(ReebGraph *rg);
/*********************** PUBLIC *********************************/
-#define REEB_MAX_MULTI_LEVEL 10
+#define REEB_MAX_MULTI_LEVEL 10
struct bContext;
diff --git a/source/blender/editors/curve/curve_ops.c b/source/blender/editors/curve/curve_ops.c
index 94ec7c7ce93..dea7ccb161d 100644
--- a/source/blender/editors/curve/curve_ops.c
+++ b/source/blender/editors/curve/curve_ops.c
@@ -140,15 +140,15 @@ void ED_operatormacros_curve(void)
wmOperatorType *ot;
wmOperatorTypeMacro *otmacro;
- ot = WM_operatortype_append_macro("CURVE_OT_duplicate_move", "Add Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
- ot->description = "Duplicate curve and move";
+ ot = WM_operatortype_append_macro("CURVE_OT_duplicate_move", "Add Duplicate", "Duplicate curve and move",
+ OPTYPE_UNDO|OPTYPE_REGISTER);
WM_operatortype_macro_define(ot, "CURVE_OT_duplicate");
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_enum_set(otmacro->ptr, "proportional", 0);
RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
- ot = WM_operatortype_append_macro("CURVE_OT_extrude_move", "Extrude Curve and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
- ot->description = "Extrude curve and move result";
+ ot = WM_operatortype_append_macro("CURVE_OT_extrude_move", "Extrude Curve and Move",
+ "Extrude curve and move result", OPTYPE_UNDO|OPTYPE_REGISTER);
WM_operatortype_macro_define(ot, "CURVE_OT_extrude");
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_enum_set(otmacro->ptr, "proportional", 0);
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index c19041b817e..be10e3c4c3f 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -29,7 +29,6 @@
* \ingroup edcurve
*/
-
#include <math.h>
#include <string.h>
@@ -108,9 +107,9 @@ void selectend_nurb(Object *obedit, short selfirst, short doswap, short selstatu
static void select_adjacent_cp(ListBase *editnurb, short next, short cont, short selstatus);
/* still need to eradicate a few :( */
-#define callocstructN(x,y,name) (x*)MEM_callocN((y)* sizeof(x),name)
+#define callocstructN(x, y, name) (x *)MEM_callocN((y) * sizeof(x), name)
-static float nurbcircle[8][2]= {
+static float nurbcircle[8][2] = {
{0.0, -1.0}, {-1.0, -1.0}, {-1.0, 0.0}, {-1.0, 1.0},
{0.0, 1.0}, { 1.0, 1.0}, { 1.0, 0.0}, { 1.0, -1.0}
};
@@ -118,7 +117,7 @@ static float nurbcircle[8][2]= {
ListBase *object_editcurve_get(Object *ob)
{
if (ob && ELEM(ob->type, OB_CURVE, OB_SURF)) {
- Curve *cu= ob->data;
+ Curve *cu = ob->data;
return &cu->editnurb->nurbs;
}
return NULL;
@@ -127,39 +126,39 @@ ListBase *object_editcurve_get(Object *ob)
/* this replaces the active flag used in uv/face mode */
static void set_actNurb(Object *obedit, Nurb *nu)
{
- Curve *cu= obedit->data;
+ Curve *cu = obedit->data;
- if (nu==NULL)
+ if (nu == NULL)
cu->actnu = -1;
else {
- ListBase *nurbs= curve_editnurbs(cu);
+ ListBase *nurbs = BKE_curve_editNurbs_get(cu);
cu->actnu = BLI_findindex(nurbs, nu);
}
}
static Nurb *get_actNurb(Object *obedit)
{
- Curve *cu= obedit->data;
- ListBase *nurbs= curve_editnurbs(cu);
+ Curve *cu = obedit->data;
+ ListBase *nurbs = BKE_curve_editNurbs_get(cu);
return BLI_findlink(nurbs, cu->actnu);
}
/* ******************* SELECTION FUNCTIONS ********************* */
-#define HIDDEN 1
-#define VISIBLE 0
+#define HIDDEN 1
+#define VISIBLE 0
-#define FIRST 1
-#define LAST 0
+#define FIRST 1
+#define LAST 0
/* returns 1 in case (de)selection was successful */
static short select_beztriple(BezTriple *bezt, short selstatus, short flag, short hidden)
{
if (bezt) {
- if ((bezt->hide==0) || (hidden==1)) {
- if (selstatus==1) { /* selects */
+ if ((bezt->hide == 0) || (hidden == 1)) {
+ if (selstatus == 1) { /* selects */
bezt->f1 |= flag;
bezt->f2 |= flag;
bezt->f3 |= flag;
@@ -181,8 +180,8 @@ static short select_beztriple(BezTriple *bezt, short selstatus, short flag, shor
static short select_bpoint(BPoint *bp, short selstatus, short flag, short hidden)
{
if (bp) {
- if ((bp->hide==0) || (hidden==1)) {
- if (selstatus==1) {
+ if ((bp->hide == 0) || (hidden == 1)) {
+ if (selstatus == 1) {
bp->f1 |= flag;
return 1;
}
@@ -219,18 +218,18 @@ int isNurbsel(Nurb *nu)
int a;
if (nu->type == CU_BEZIER) {
- bezt= nu->bezt;
- a= nu->pntsu;
+ bezt = nu->bezt;
+ a = nu->pntsu;
while (a--) {
if ( (bezt->f1 & SELECT) || (bezt->f2 & SELECT) || (bezt->f3 & SELECT) ) return 1;
bezt++;
}
}
else {
- bp= nu->bp;
- a= nu->pntsu*nu->pntsv;
+ bp = nu->bp;
+ a = nu->pntsu * nu->pntsv;
while (a--) {
- if ( (bp->f1 & SELECT) ) return 1;
+ if (bp->f1 & SELECT) return 1;
bp++;
}
}
@@ -241,19 +240,19 @@ static int isNurbsel_count(Curve *cu, Nurb *nu)
{
BezTriple *bezt;
BPoint *bp;
- int a, sel=0;
+ int a, sel = 0;
if (nu->type == CU_BEZIER) {
- bezt= nu->bezt;
- a= nu->pntsu;
+ bezt = nu->bezt;
+ a = nu->pntsu;
while (a--) {
if (BEZSELECTED_HIDDENHANDLES(cu, bezt)) sel++;
bezt++;
}
}
else {
- bp= nu->bp;
- a= nu->pntsu*nu->pntsv;
+ bp = nu->bp;
+ a = nu->pntsu * nu->pntsv;
while (a--) {
if ( (bp->f1 & SELECT) ) sel++;
bp++;
@@ -266,19 +265,19 @@ static int isNurbsel_count(Curve *cu, Nurb *nu)
void printknots(Object *obedit)
{
- ListBase *editnurb= object_editcurve_get(obedit);
+ ListBase *editnurb = object_editcurve_get(obedit);
Nurb *nu;
int a, num;
- for (nu= editnurb->first; nu; nu= nu->next) {
+ for (nu = editnurb->first; nu; nu = nu->next) {
if (isNurbsel(nu) && nu->type == CU_NURBS) {
if (nu->knotsu) {
- num= KNOTSU(nu);
- for (a=0;a<num;a++) printf("knotu %d: %f\n", a, nu->knotsu[a]);
+ num = KNOTSU(nu);
+ for (a = 0; a < num; a++) printf("knotu %d: %f\n", a, nu->knotsu[a]);
}
if (nu->knotsv) {
- num= KNOTSV(nu);
- for (a=0;a<num;a++) printf("knotv %d: %f\n", a, nu->knotsv[a]);
+ num = KNOTSV(nu);
+ for (a = 0; a < num; a++) printf("knotv %d: %f\n", a, nu->knotsv[a]);
}
}
}
@@ -290,66 +289,66 @@ static CVKeyIndex *init_cvKeyIndex(void *cv, int key_index, int nu_index, int pt
{
CVKeyIndex *cvIndex = MEM_callocN(sizeof(CVKeyIndex), "init_cvKeyIndex");
- cvIndex->orig_cv= cv;
- cvIndex->key_index= key_index;
- cvIndex->nu_index= nu_index;
- cvIndex->pt_index= pt_index;
- cvIndex->switched= 0;
- cvIndex->orig_nu= orig_nu;
+ cvIndex->orig_cv = cv;
+ cvIndex->key_index = key_index;
+ cvIndex->nu_index = nu_index;
+ cvIndex->pt_index = pt_index;
+ cvIndex->switched = 0;
+ cvIndex->orig_nu = orig_nu;
return cvIndex;
}
static void init_editNurb_keyIndex(EditNurb *editnurb, ListBase *origBase)
{
- Nurb *nu= editnurb->nurbs.first;
- Nurb *orignu= origBase->first;
+ Nurb *nu = editnurb->nurbs.first;
+ Nurb *orignu = origBase->first;
GHash *gh;
BezTriple *bezt, *origbezt;
BPoint *bp, *origbp;
CVKeyIndex *keyIndex;
- int a, key_index= 0, nu_index= 0, pt_index= 0;
+ int a, key_index = 0, nu_index = 0, pt_index = 0;
if (editnurb->keyindex) return;
- gh= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "editNurb keyIndex");
+ gh = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "editNurb keyIndex");
while (orignu) {
if (orignu->bezt) {
- a= orignu->pntsu;
- bezt= nu->bezt;
- origbezt= orignu->bezt;
- pt_index= 0;
+ a = orignu->pntsu;
+ bezt = nu->bezt;
+ origbezt = orignu->bezt;
+ pt_index = 0;
while (a--) {
- keyIndex= init_cvKeyIndex(origbezt, key_index, nu_index, pt_index, orignu);
+ keyIndex = init_cvKeyIndex(origbezt, key_index, nu_index, pt_index, orignu);
BLI_ghash_insert(gh, bezt, keyIndex);
- key_index+= 12;
+ key_index += 12;
bezt++;
origbezt++;
pt_index++;
}
}
else {
- a= orignu->pntsu * orignu->pntsv;
- bp= nu->bp;
- origbp= orignu->bp;
- pt_index= 0;
+ a = orignu->pntsu * orignu->pntsv;
+ bp = nu->bp;
+ origbp = orignu->bp;
+ pt_index = 0;
while (a--) {
- keyIndex= init_cvKeyIndex(origbp, key_index, nu_index, pt_index, orignu);
+ keyIndex = init_cvKeyIndex(origbp, key_index, nu_index, pt_index, orignu);
BLI_ghash_insert(gh, bp, keyIndex);
- key_index+= 4;
+ key_index += 4;
bp++;
origbp++;
pt_index++;
}
}
- nu= nu->next;
- orignu= orignu->next;
+ nu = nu->next;
+ orignu = orignu->next;
nu_index++;
}
- editnurb->keyindex= gh;
+ editnurb->keyindex = gh;
}
static CVKeyIndex *getCVKeyIndex(EditNurb *editnurb, void *cv)
@@ -359,29 +358,29 @@ static CVKeyIndex *getCVKeyIndex(EditNurb *editnurb, void *cv)
static BezTriple *getKeyIndexOrig_bezt(EditNurb *editnurb, BezTriple *bezt)
{
- CVKeyIndex *index= getCVKeyIndex(editnurb, bezt);
+ CVKeyIndex *index = getCVKeyIndex(editnurb, bezt);
if (!index) {
return NULL;
}
- return (BezTriple*)index->orig_cv;
+ return (BezTriple *)index->orig_cv;
}
static BPoint *getKeyIndexOrig_bp(EditNurb *editnurb, BPoint *bp)
{
- CVKeyIndex *index= getCVKeyIndex(editnurb, bp);
+ CVKeyIndex *index = getCVKeyIndex(editnurb, bp);
if (!index) {
return NULL;
}
- return (BPoint*)index->orig_cv;
+ return (BPoint *)index->orig_cv;
}
static int getKeyIndexOrig_keyIndex(EditNurb *editnurb, void *cv)
{
- CVKeyIndex *index= getCVKeyIndex(editnurb, cv);
+ CVKeyIndex *index = getCVKeyIndex(editnurb, cv);
if (!index) {
return -1;
@@ -418,38 +417,38 @@ static void keyIndex_delNurb(EditNurb *editnurb, Nurb *nu)
}
if (nu->bezt) {
- BezTriple *bezt= nu->bezt;
- a= nu->pntsu;
+ BezTriple *bezt = nu->bezt;
+ a = nu->pntsu;
while (a--) {
BLI_ghash_remove(editnurb->keyindex, bezt, NULL, (GHashValFreeFP)MEM_freeN);
- ++bezt;
+ bezt++;
}
}
else {
- BPoint *bp= nu->bp;
- a= nu->pntsu * nu->pntsv;
+ BPoint *bp = nu->bp;
+ a = nu->pntsu * nu->pntsv;
while (a--) {
BLI_ghash_remove(editnurb->keyindex, bp, NULL, (GHashValFreeFP)MEM_freeN);
- ++bp;
+ bp++;
}
}
}
static void keyIndex_delNurbList(EditNurb *editnurb, ListBase *nubase)
{
- Nurb *nu= nubase->first;
+ Nurb *nu = nubase->first;
while (nu) {
keyIndex_delNurb(editnurb, nu);
- nu= nu->next;
+ nu = nu->next;
}
}
static void keyIndex_updateCV(EditNurb *editnurb, char *cv,
- char *newcv, int count, int size)
+ char *newcv, int count, int size)
{
int i;
CVKeyIndex *index;
@@ -460,7 +459,7 @@ static void keyIndex_updateCV(EditNurb *editnurb, char *cv,
}
for (i = 0; i < count; i++) {
- index= getCVKeyIndex(editnurb, cv);
+ index = getCVKeyIndex(editnurb, cv);
BLI_ghash_remove(editnurb->keyindex, cv, NULL, NULL);
@@ -474,15 +473,15 @@ static void keyIndex_updateCV(EditNurb *editnurb, char *cv,
}
static void keyIndex_updateBezt(EditNurb *editnurb, BezTriple *bezt,
- BezTriple *newbezt, int count)
+ BezTriple *newbezt, int count)
{
- keyIndex_updateCV(editnurb, (char*)bezt, (char*)newbezt, count, sizeof(BezTriple));
+ keyIndex_updateCV(editnurb, (char *)bezt, (char *)newbezt, count, sizeof(BezTriple));
}
static void keyIndex_updateBP(EditNurb *editnurb, BPoint *bp,
- BPoint *newbp, int count)
+ BPoint *newbp, int count)
{
- keyIndex_updateCV(editnurb, (char*)bp, (char*)newbp, count, sizeof(BPoint));
+ keyIndex_updateCV(editnurb, (char *)bp, (char *)newbp, count, sizeof(BPoint));
}
static void keyIndex_updateNurb(EditNurb *editnurb, Nurb *nu, Nurb *newnu)
@@ -497,8 +496,8 @@ static void keyIndex_updateNurb(EditNurb *editnurb, Nurb *nu, Nurb *newnu)
static void keyIndex_swap(EditNurb *editnurb, void *a, void *b)
{
- CVKeyIndex *index1= getCVKeyIndex(editnurb, a);
- CVKeyIndex *index2= getCVKeyIndex(editnurb, b);
+ CVKeyIndex *index1 = getCVKeyIndex(editnurb, a);
+ CVKeyIndex *index2 = getCVKeyIndex(editnurb, b);
BLI_ghash_remove(editnurb->keyindex, a, NULL, NULL);
BLI_ghash_remove(editnurb->keyindex, b, NULL, NULL);
@@ -515,25 +514,25 @@ static void keyIndex_switchDirection(EditNurb *editnurb, Nurb *nu)
if (nu->bezt) {
BezTriple *bezt1, *bezt2;
- a= nu->pntsu;
+ a = nu->pntsu;
- bezt1= nu->bezt;
- bezt2= bezt1+(a-1);
+ bezt1 = nu->bezt;
+ bezt2 = bezt1 + (a - 1);
if (a & 1) ++a;
- a/=2;
+ a /= 2;
while (a--) {
- index1= getCVKeyIndex(editnurb, bezt1);
- index2= getCVKeyIndex(editnurb, bezt2);
+ index1 = getCVKeyIndex(editnurb, bezt1);
+ index2 = getCVKeyIndex(editnurb, bezt2);
- if (index1) index1->switched= !index1->switched;
+ if (index1) index1->switched = !index1->switched;
if (bezt1 != bezt2) {
keyIndex_swap(editnurb, bezt1, bezt2);
- if (index2) index2->switched= !index2->switched;
+ if (index2) index2->switched = !index2->switched;
}
bezt1++;
@@ -544,18 +543,18 @@ static void keyIndex_switchDirection(EditNurb *editnurb, Nurb *nu)
BPoint *bp1, *bp2;
if (nu->pntsv == 1) {
- a= nu->pntsu;
- bp1= nu->bp;
- bp2= bp1+(a-1);
- a/= 2;
- while (bp1!=bp2 && a>0) {
- index1= getCVKeyIndex(editnurb, bp1);
- index2= getCVKeyIndex(editnurb, bp2);
+ a = nu->pntsu;
+ bp1 = nu->bp;
+ bp2 = bp1 + (a - 1);
+ a /= 2;
+ while (bp1 != bp2 && a > 0) {
+ index1 = getCVKeyIndex(editnurb, bp1);
+ index2 = getCVKeyIndex(editnurb, bp2);
- if (index1) index1->switched= !index1->switched;
+ if (index1) index1->switched = !index1->switched;
if (bp1 != bp2) {
- if (index2) index2->switched= !index2->switched;
+ if (index2) index2->switched = !index2->switched;
keyIndex_swap(editnurb, bp1, bp2);
}
@@ -568,21 +567,21 @@ static void keyIndex_switchDirection(EditNurb *editnurb, Nurb *nu)
else {
int b;
- for (b=0; b<nu->pntsv; b++) {
+ for (b = 0; b < nu->pntsv; b++) {
- bp1= nu->bp+b*nu->pntsu;
- a= nu->pntsu;
- bp2= bp1+(a-1);
- a/= 2;
+ bp1 = &nu->bp[b * nu->pntsu];
+ a = nu->pntsu;
+ bp2 = bp1 + (a - 1);
+ a /= 2;
- while (bp1!=bp2 && a>0) {
- index1= getCVKeyIndex(editnurb, bp1);
- index2= getCVKeyIndex(editnurb, bp2);
+ while (bp1 != bp2 && a > 0) {
+ index1 = getCVKeyIndex(editnurb, bp1);
+ index2 = getCVKeyIndex(editnurb, bp2);
- if (index1) index1->switched= !index1->switched;
+ if (index1) index1->switched = !index1->switched;
if (bp1 != bp2) {
- if (index2) index2->switched= !index2->switched;
+ if (index2) index2->switched = !index2->switched;
keyIndex_swap(editnurb, bp1, bp2);
}
@@ -600,26 +599,26 @@ static void keyIndex_switchDirection(EditNurb *editnurb, Nurb *nu)
static void switch_keys_direction(Curve *cu, Nurb *actnu)
{
KeyBlock *currkey;
- EditNurb *editnurb= cu->editnurb;
- ListBase *nubase= &editnurb->nurbs;
+ EditNurb *editnurb = cu->editnurb;
+ ListBase *nubase = &editnurb->nurbs;
Nurb *nu;
float *fp;
int a;
currkey = cu->key->block.first;
while (currkey) {
- fp= currkey->data;
+ fp = currkey->data;
- nu= nubase->first;
+ nu = nubase->first;
while (nu) {
if (nu->bezt) {
- BezTriple *bezt= nu->bezt;
- a= nu->pntsu;
+ BezTriple *bezt = nu->bezt;
+ a = nu->pntsu;
if (nu == actnu) {
while (a--) {
if (getKeyIndexOrig_bezt(editnurb, bezt)) {
swap_v3_v3(fp, fp + 6);
- *(fp+9) = -*(fp+9);
+ *(fp + 9) = -*(fp + 9);
fp += 12;
}
bezt++;
@@ -628,12 +627,12 @@ static void switch_keys_direction(Curve *cu, Nurb *actnu)
else fp += a * 12;
}
else {
- BPoint *bp= nu->bp;
- a= nu->pntsu * nu->pntsv;
+ BPoint *bp = nu->bp;
+ a = nu->pntsu * nu->pntsv;
if (nu == actnu) {
while (a--) {
if (getKeyIndexOrig_bp(editnurb, bp)) {
- *(fp+3) = -*(fp+3);
+ *(fp + 3) = -*(fp + 3);
fp += 4;
}
bp++;
@@ -642,16 +641,16 @@ static void switch_keys_direction(Curve *cu, Nurb *actnu)
else fp += a * 4;
}
- nu= nu->next;
+ nu = nu->next;
}
- currkey= currkey->next;
+ currkey = currkey->next;
}
}
static void keyData_switchDirectionNurb(Curve *cu, Nurb *nu)
{
- EditNurb *editnurb= cu->editnurb;
+ EditNurb *editnurb = cu->editnurb;
if (!editnurb->keyindex) {
/* no shape keys - nothing to do */
@@ -668,11 +667,12 @@ static GHash *dupli_keyIndexHash(GHash *keyindex)
GHash *gh;
GHashIterator *hashIter;
- gh= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "dupli_keyIndex gh");
+ gh = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "dupli_keyIndex gh");
for (hashIter = BLI_ghashIterator_new(keyindex);
- !BLI_ghashIterator_isDone(hashIter);
- BLI_ghashIterator_step(hashIter)) {
+ !BLI_ghashIterator_isDone(hashIter);
+ BLI_ghashIterator_step(hashIter))
+ {
void *cv = BLI_ghashIterator_getKey(hashIter);
CVKeyIndex *index = BLI_ghashIterator_getValue(hashIter);
CVKeyIndex *newIndex = MEM_callocN(sizeof(CVKeyIndex), "dupli_keyIndexHash index");
@@ -691,7 +691,7 @@ static void key_to_bezt(float *key, BezTriple *basebezt, BezTriple *bezt)
{
memcpy(bezt, basebezt, sizeof(BezTriple));
memcpy(bezt->vec, key, sizeof(float) * 9);
- bezt->alfa= key[9];
+ bezt->alfa = key[9];
}
static void bezt_to_key(BezTriple *bezt, float *key)
@@ -704,31 +704,31 @@ static void calc_keyHandles(ListBase *nurb, float *key)
{
Nurb *nu;
int a;
- float *fp= key;
+ float *fp = key;
BezTriple *bezt;
- nu= nurb->first;
+ nu = nurb->first;
while (nu) {
if (nu->bezt) {
BezTriple *prevp, *nextp;
BezTriple cur, prev, next;
float *startfp, *prevfp, *nextfp;
- bezt= nu->bezt;
- a= nu->pntsu;
- startfp= fp;
+ bezt = nu->bezt;
+ a = nu->pntsu;
+ startfp = fp;
if (nu->flagu & CU_NURB_CYCLIC) {
- prevp= bezt+(a-1);
- prevfp= fp+(12 * (a-1));
+ prevp = bezt + (a - 1);
+ prevfp = fp + (12 * (a - 1));
}
else {
- prevp= NULL;
- prevfp= NULL;
+ prevp = NULL;
+ prevfp = NULL;
}
- nextp= bezt + 1;
- nextfp= fp + 12;
+ nextp = bezt + 1;
+ nextfp = fp + 12;
while (a--) {
key_to_bezt(fp, bezt, &cur);
@@ -736,102 +736,102 @@ static void calc_keyHandles(ListBase *nurb, float *key)
if (nextp) key_to_bezt(nextfp, nextp, &next);
if (prevp) key_to_bezt(prevfp, prevp, &prev);
- calchandleNurb(&cur, prevp ? &prev : NULL, nextp ? &next : NULL, 0);
+ BKE_nurb_handle_calc(&cur, prevp ? &prev : NULL, nextp ? &next : NULL, 0);
bezt_to_key(&cur, fp);
- prevp= bezt;
- prevfp= fp;
- if (a==1) {
+ prevp = bezt;
+ prevfp = fp;
+ if (a == 1) {
if (nu->flagu & CU_NURB_CYCLIC) {
- nextp= nu->bezt;
- nextfp= startfp;
+ nextp = nu->bezt;
+ nextfp = startfp;
}
else {
- nextp= NULL;
- nextfp= NULL;
+ nextp = NULL;
+ nextfp = NULL;
}
}
else {
- ++nextp;
+ nextp++;
nextfp += 12;
}
- ++bezt;
+ bezt++;
fp += 12;
}
}
else {
- a= nu->pntsu * nu->pntsv;
+ a = nu->pntsu * nu->pntsv;
fp += a * 4;
}
- nu= nu->next;
+ nu = nu->next;
}
}
static void calc_shapeKeys(Object *obedit)
{
- Curve *cu= (Curve*)obedit->data;
+ Curve *cu = (Curve *)obedit->data;
/* are there keys? */
if (cu->key) {
int a, i;
- EditNurb *editnurb= cu->editnurb;
+ EditNurb *editnurb = cu->editnurb;
KeyBlock *currkey;
- KeyBlock *actkey= BLI_findlink(&cu->key->block, editnurb->shapenr-1);
+ KeyBlock *actkey = BLI_findlink(&cu->key->block, editnurb->shapenr - 1);
BezTriple *bezt, *oldbezt;
BPoint *bp, *oldbp;
Nurb *nu;
- int totvert= count_curveverts(&editnurb->nurbs);
+ int totvert = BKE_nurbList_verts_count(&editnurb->nurbs);
float (*ofs)[3] = NULL;
float *oldkey, *newkey, *ofp;
/* editing the base key should update others */
- if (cu->key->type==KEY_RELATIVE) {
+ if (cu->key->type == KEY_RELATIVE) {
int act_is_basis = 0;
/* find if this key is a basis for any others */
- for (currkey = cu->key->block.first; currkey; currkey= currkey->next) {
- if (editnurb->shapenr-1 == currkey->relative) {
+ for (currkey = cu->key->block.first; currkey; currkey = currkey->next) {
+ if (editnurb->shapenr - 1 == currkey->relative) {
act_is_basis = 1;
break;
}
}
if (act_is_basis) { /* active key is a base */
- int totvec= 0;
+ int totvec = 0;
/* Calculate needed memory to store offset */
- nu= editnurb->nurbs.first;
+ nu = editnurb->nurbs.first;
while (nu) {
if (nu->bezt) {
/* Three vects to store handles and one for alfa */
- totvec+= nu->pntsu * 4;
+ totvec += nu->pntsu * 4;
}
else {
- totvec+= 2 * nu->pntsu * nu->pntsv;
+ totvec += 2 * nu->pntsu * nu->pntsv;
}
- nu= nu->next;
+ nu = nu->next;
}
- ofs= MEM_callocN(sizeof(float) * 3 * totvec, "currkey->data");
- nu= editnurb->nurbs.first;
- i= 0;
+ ofs = MEM_callocN(sizeof(float) * 3 * totvec, "currkey->data");
+ nu = editnurb->nurbs.first;
+ i = 0;
while (nu) {
if (nu->bezt) {
- bezt= nu->bezt;
- a= nu->pntsu;
+ bezt = nu->bezt;
+ a = nu->pntsu;
while (a--) {
- oldbezt= getKeyIndexOrig_bezt(editnurb, bezt);
+ oldbezt = getKeyIndexOrig_bezt(editnurb, bezt);
if (oldbezt) {
int j;
- for (j= 0; j < 3; ++j) {
+ for (j = 0; j < 3; ++j) {
sub_v3_v3v3(ofs[i], bezt->vec[j], oldbezt->vec[j]);
i++;
}
- ofs[i++][0]= bezt->alfa - oldbezt->alfa;
+ ofs[i++][0] = bezt->alfa - oldbezt->alfa;
}
else {
i += 4;
@@ -840,81 +840,81 @@ static void calc_shapeKeys(Object *obedit)
}
}
else {
- bp= nu->bp;
- a= nu->pntsu*nu->pntsv;
+ bp = nu->bp;
+ a = nu->pntsu * nu->pntsv;
while (a--) {
- oldbp= getKeyIndexOrig_bp(editnurb, bp);
+ oldbp = getKeyIndexOrig_bp(editnurb, bp);
if (oldbp) {
sub_v3_v3v3(ofs[i], bp->vec, oldbp->vec);
- ofs[i+1][0]= bp->alfa - oldbp->alfa;
+ ofs[i + 1][0] = bp->alfa - oldbp->alfa;
}
i += 2;
- ++bp;
+ bp++;
}
}
- nu= nu->next;
+ nu = nu->next;
}
}
}
currkey = cu->key->block.first;
while (currkey) {
- int apply_offset = (ofs && (currkey != actkey) && (editnurb->shapenr-1 == currkey->relative));
+ int apply_offset = (ofs && (currkey != actkey) && (editnurb->shapenr - 1 == currkey->relative));
- float *fp= newkey= MEM_callocN(cu->key->elemsize * totvert, "currkey->data");
- ofp= oldkey = currkey->data;
+ float *fp = newkey = MEM_callocN(cu->key->elemsize * totvert, "currkey->data");
+ ofp = oldkey = currkey->data;
- nu= editnurb->nurbs.first;
+ nu = editnurb->nurbs.first;
i = 0;
while (nu) {
if (currkey == actkey) {
- int restore= actkey != cu->key->refkey;
+ int restore = actkey != cu->key->refkey;
if (nu->bezt) {
- bezt= nu->bezt;
- a= nu->pntsu;
+ bezt = nu->bezt;
+ a = nu->pntsu;
while (a--) {
int j;
- oldbezt= getKeyIndexOrig_bezt(editnurb, bezt);
+ oldbezt = getKeyIndexOrig_bezt(editnurb, bezt);
- for (j= 0; j < 3; ++j, ++i) {
+ for (j = 0; j < 3; ++j, ++i) {
copy_v3_v3(fp, bezt->vec[j]);
if (restore && oldbezt) {
copy_v3_v3(bezt->vec[j], oldbezt->vec[j]);
}
- fp+= 3;
+ fp += 3;
}
- fp[0]= bezt->alfa;
+ fp[0] = bezt->alfa;
if (restore && oldbezt) {
- bezt->alfa= oldbezt->alfa;
+ bezt->alfa = oldbezt->alfa;
}
- fp+= 3; ++i;/* alphas */
- ++bezt;
+ fp += 3; ++i; /* alphas */
+ bezt++;
}
}
else {
- bp= nu->bp;
- a= nu->pntsu*nu->pntsv;
+ bp = nu->bp;
+ a = nu->pntsu * nu->pntsv;
while (a--) {
- oldbp= getKeyIndexOrig_bp(editnurb, bp);
+ oldbp = getKeyIndexOrig_bp(editnurb, bp);
copy_v3_v3(fp, bp->vec);
- fp[3]= bp->alfa;
+ fp[3] = bp->alfa;
if (restore && oldbp) {
copy_v3_v3(bp->vec, oldbp->vec);
- bp->alfa= oldbp->alfa;
+ bp->alfa = oldbp->alfa;
}
- fp+= 4;
- ++bp;
- i+=2;
+ fp += 4;
+ bp++;
+ i += 2;
}
}
}
@@ -924,77 +924,77 @@ static void calc_shapeKeys(Object *obedit)
if (oldkey) {
if (nu->bezt) {
- bezt= nu->bezt;
- a= nu->pntsu;
+ bezt = nu->bezt;
+ a = nu->pntsu;
while (a--) {
- index= getKeyIndexOrig_keyIndex(editnurb, bezt);
+ index = getKeyIndexOrig_keyIndex(editnurb, bezt);
if (index >= 0) {
int j;
- curofp= ofp + index;
+ curofp = ofp + index;
- for (j= 0; j < 3; ++j, ++i) {
+ for (j = 0; j < 3; ++j, ++i) {
copy_v3_v3(fp, curofp);
if (apply_offset) {
add_v3_v3(fp, ofs[i]);
}
- fp+= 3; curofp+= 3;
+ fp += 3; curofp += 3;
}
- fp[0]= curofp[0];
+ fp[0] = curofp[0];
if (apply_offset) {
/* apply alfa offsets */
add_v3_v3(fp, ofs[i]);
- ++i;
+ i++;
}
- fp+= 3; /* alphas */
+ fp += 3; /* alphas */
}
else {
int j;
- for (j= 0; j < 3; ++j, ++i) {
+ for (j = 0; j < 3; ++j, ++i) {
copy_v3_v3(fp, bezt->vec[j]);
- fp+= 3;
+ fp += 3;
}
- fp[0]= bezt->alfa;
+ fp[0] = bezt->alfa;
- fp+= 3; /* alphas */
+ fp += 3; /* alphas */
}
- ++bezt;
+ bezt++;
}
}
else {
- bp= nu->bp;
- a= nu->pntsu*nu->pntsv;
+ bp = nu->bp;
+ a = nu->pntsu * nu->pntsv;
while (a--) {
- index= getKeyIndexOrig_keyIndex(editnurb, bp);
+ index = getKeyIndexOrig_keyIndex(editnurb, bp);
if (index >= 0) {
- curofp= ofp + index;
+ curofp = ofp + index;
copy_v3_v3(fp, curofp);
- fp[3]= curofp[3];
+ fp[3] = curofp[3];
if (apply_offset) {
add_v3_v3(fp, ofs[i]);
- fp[3]+=ofs[i+1][0];
+ fp[3] += ofs[i + 1][0];
}
}
else {
copy_v3_v3(fp, bp->vec);
- fp[3]= bp->alfa;
+ fp[3] = bp->alfa;
}
- fp+= 4;
- ++bp;
- i+=2;
+ fp += 4;
+ bp++;
+ i += 2;
}
}
}
}
- nu= nu->next;
+ nu = nu->next;
}
if (apply_offset) {
@@ -1002,11 +1002,11 @@ static void calc_shapeKeys(Object *obedit)
calc_keyHandles(&editnurb->nurbs, newkey);
}
- currkey->totelem= totvert;
+ currkey->totelem = totvert;
if (currkey->data) MEM_freeN(currkey->data);
currkey->data = newkey;
- currkey= currkey->next;
+ currkey = currkey->next;
}
if (ofs) MEM_freeN(ofs);
@@ -1017,7 +1017,7 @@ static void calc_shapeKeys(Object *obedit)
static int curve_is_animated(Curve *cu)
{
- AnimData *ad= BKE_animdata_from_id(&cu->id);
+ AnimData *ad = BKE_animdata_from_id(&cu->id);
return ad && (ad->action || ad->drivers.first);
}
@@ -1025,16 +1025,16 @@ static int curve_is_animated(Curve *cu)
static void fcurve_path_rename(AnimData *ad, char *orig_rna_path, char *rna_path, ListBase *orig_curves, ListBase *curves)
{
FCurve *fcu, *nfcu, *nextfcu;
- int len= strlen(orig_rna_path);
+ int len = strlen(orig_rna_path);
- fcu= orig_curves->first;
+ fcu = orig_curves->first;
while (fcu) {
- nextfcu= fcu->next;
+ nextfcu = fcu->next;
if (!strncmp(fcu->rna_path, orig_rna_path, len)) {
- char *spath, *suffix= fcu->rna_path + len;
- nfcu= copy_fcurve(fcu);
- spath= nfcu->rna_path;
- nfcu->rna_path= BLI_sprintfN("%s%s", rna_path, suffix);
+ char *spath, *suffix = fcu->rna_path + len;
+ nfcu = copy_fcurve(fcu);
+ spath = nfcu->rna_path;
+ nfcu->rna_path = BLI_sprintfN("%s%s", rna_path, suffix);
BLI_addtail(curves, nfcu);
if (fcu->grp) {
@@ -1050,13 +1050,13 @@ static void fcurve_path_rename(AnimData *ad, char *orig_rna_path, char *rna_path
MEM_freeN(spath);
}
- fcu= nextfcu;
+ fcu = nextfcu;
}
}
static void fcurve_remove(AnimData *ad, ListBase *orig_curves, FCurve *fcu)
{
- if (orig_curves==&ad->drivers) BLI_remlink(&ad->drivers, fcu);
+ if (orig_curves == &ad->drivers) BLI_remlink(&ad->drivers, fcu);
else action_groups_remove_channel(ad->action, fcu);
free_fcurve(fcu);
@@ -1064,23 +1064,23 @@ static void fcurve_remove(AnimData *ad, ListBase *orig_curves, FCurve *fcu)
static void curve_rename_fcurves(Curve *cu, ListBase *orig_curves)
{
- int nu_index= 0, a, pt_index;
- EditNurb *editnurb= cu->editnurb;
- Nurb *nu= editnurb->nurbs.first;
+ int nu_index = 0, a, pt_index;
+ EditNurb *editnurb = cu->editnurb;
+ Nurb *nu = editnurb->nurbs.first;
CVKeyIndex *keyIndex;
char rna_path[64], orig_rna_path[64];
- AnimData *ad= BKE_animdata_from_id(&cu->id);
- ListBase curves= {NULL, NULL};
+ AnimData *ad = BKE_animdata_from_id(&cu->id);
+ ListBase curves = {NULL, NULL};
FCurve *fcu, *next;
while (nu) {
if (nu->bezt) {
- BezTriple *bezt= nu->bezt;
- a= nu->pntsu;
- pt_index= 0;
+ BezTriple *bezt = nu->bezt;
+ a = nu->pntsu;
+ pt_index = 0;
while (a--) {
- keyIndex= getCVKeyIndex(editnurb, bezt);
+ keyIndex = getCVKeyIndex(editnurb, bezt);
if (keyIndex) {
BLI_snprintf(rna_path, sizeof(rna_path), "splines[%d].bezier_points[%d]", nu_index, pt_index);
BLI_snprintf(orig_rna_path, sizeof(orig_rna_path), "splines[%d].bezier_points[%d]", keyIndex->nu_index, keyIndex->pt_index);
@@ -1098,8 +1098,8 @@ static void curve_rename_fcurves(Curve *cu, ListBase *orig_curves)
fcurve_path_rename(ad, orig_rna_path, rna_path, orig_curves, &curves);
- keyIndex->nu_index= nu_index;
- keyIndex->pt_index= pt_index;
+ keyIndex->nu_index = nu_index;
+ keyIndex->pt_index = pt_index;
}
bezt++;
@@ -1107,50 +1107,50 @@ static void curve_rename_fcurves(Curve *cu, ListBase *orig_curves)
}
}
else {
- BPoint *bp= nu->bp;
- a= nu->pntsu * nu->pntsv;
- pt_index= 0;
+ BPoint *bp = nu->bp;
+ a = nu->pntsu * nu->pntsv;
+ pt_index = 0;
while (a--) {
- keyIndex= getCVKeyIndex(editnurb, bp);
+ keyIndex = getCVKeyIndex(editnurb, bp);
if (keyIndex) {
BLI_snprintf(rna_path, sizeof(rna_path), "splines[%d].points[%d]", nu_index, pt_index);
BLI_snprintf(orig_rna_path, sizeof(orig_rna_path), "splines[%d].points[%d]", keyIndex->nu_index, keyIndex->pt_index);
fcurve_path_rename(ad, orig_rna_path, rna_path, orig_curves, &curves);
- keyIndex->nu_index= nu_index;
- keyIndex->pt_index= pt_index;
+ keyIndex->nu_index = nu_index;
+ keyIndex->pt_index = pt_index;
}
bp++;
pt_index++;
}
}
- nu= nu->next;
+ nu = nu->next;
nu_index++;
}
/* remove paths for removed control points
* need this to make further step with copying non-cv related curves copying
* not touching cv's f-curves */
- for (fcu= orig_curves->first; fcu; fcu= next) {
- next= fcu->next;
+ for (fcu = orig_curves->first; fcu; fcu = next) {
+ next = fcu->next;
if (!strncmp(fcu->rna_path, "splines", 7)) {
- char *ch= strchr(fcu->rna_path, '.');
+ char *ch = strchr(fcu->rna_path, '.');
if (ch && (!strncmp(ch, ".bezier_points", 14) || !strncmp(ch, ".points", 7)))
fcurve_remove(ad, orig_curves, fcu);
}
}
- nu_index= 0;
- nu= editnurb->nurbs.first;
+ nu_index = 0;
+ nu = editnurb->nurbs.first;
while (nu) {
- keyIndex= NULL;
+ keyIndex = NULL;
if (nu->pntsu) {
- if (nu->bezt) keyIndex= getCVKeyIndex(editnurb, &nu->bezt[0]);
- else keyIndex= getCVKeyIndex(editnurb, &nu->bp[0]);
+ if (nu->bezt) keyIndex = getCVKeyIndex(editnurb, &nu->bezt[0]);
+ else keyIndex = getCVKeyIndex(editnurb, &nu->bp[0]);
}
if (keyIndex) {
@@ -1160,25 +1160,25 @@ static void curve_rename_fcurves(Curve *cu, ListBase *orig_curves)
}
nu_index++;
- nu= nu->next;
+ nu = nu->next;
}
/* the remainders in orig_curves can be copied back (like follow path) */
/* (if it's not path to spline) */
- for (fcu= orig_curves->first; fcu; fcu= next) {
- next= fcu->next;
+ for (fcu = orig_curves->first; fcu; fcu = next) {
+ next = fcu->next;
if (!strncmp(fcu->rna_path, "splines", 7)) fcurve_remove(ad, orig_curves, fcu);
else BLI_addtail(&curves, fcu);
}
- *orig_curves= curves;
+ *orig_curves = curves;
}
/* return 0 if animation data wasn't changed, 1 otherwise */
int ED_curve_updateAnimPaths(Curve *cu)
{
- AnimData *ad= BKE_animdata_from_id(&cu->id);
+ AnimData *ad = BKE_animdata_from_id(&cu->id);
if (!curve_is_animated(cu)) return 0;
@@ -1195,32 +1195,32 @@ int ED_curve_updateAnimPaths(Curve *cu)
/* load editNurb in object */
void load_editNurb(Object *obedit)
{
- ListBase *editnurb= object_editcurve_get(obedit);
+ ListBase *editnurb = object_editcurve_get(obedit);
- if (obedit==NULL) return;
+ if (obedit == NULL) return;
set_actNurb(obedit, NULL);
if (ELEM(obedit->type, OB_CURVE, OB_SURF)) {
- Curve *cu= obedit->data;
+ Curve *cu = obedit->data;
Nurb *nu, *newnu;
- ListBase newnurb= {NULL, NULL}, oldnurb= cu->nurb;
+ ListBase newnurb = {NULL, NULL}, oldnurb = cu->nurb;
- for (nu= editnurb->first; nu; nu= nu->next) {
- newnu= duplicateNurb(nu);
+ for (nu = editnurb->first; nu; nu = nu->next) {
+ newnu = BKE_nurb_duplicate(nu);
BLI_addtail(&newnurb, newnu);
if (nu->type == CU_NURBS) {
- clamp_nurb_order_u(nu);
+ BKE_nurb_order_clamp_u(nu);
}
}
- cu->nurb= newnurb;
+ cu->nurb = newnurb;
calc_shapeKeys(obedit);
ED_curve_updateAnimPaths(obedit->data);
- freeNurblist(&oldnurb);
+ BKE_nurbList_free(&oldnurb);
}
set_actNurb(obedit, NULL);
@@ -1229,16 +1229,16 @@ void load_editNurb(Object *obedit)
/* make copy in cu->editnurb */
void make_editNurb(Object *obedit)
{
- Curve *cu= (Curve*)obedit->data;
- EditNurb *editnurb= cu->editnurb;
- Nurb *nu, *newnu, *nu_act= NULL;
+ Curve *cu = (Curve *)obedit->data;
+ EditNurb *editnurb = cu->editnurb;
+ Nurb *nu, *newnu, *nu_act = NULL;
KeyBlock *actkey;
set_actNurb(obedit, NULL);
if (ELEM(obedit->type, OB_CURVE, OB_SURF)) {
- actkey= ob_get_keyblock(obedit);
+ actkey = ob_get_keyblock(obedit);
if (actkey) {
// XXX strcpy(G.editModeTitleExtra, "(Key) ");
@@ -1247,33 +1247,33 @@ void make_editNurb(Object *obedit)
}
if (editnurb) {
- freeNurblist(&editnurb->nurbs);
- free_curve_editNurb_keyIndex(editnurb);
- editnurb->keyindex= NULL;
+ BKE_nurbList_free(&editnurb->nurbs);
+ BKE_curve_editNurb_keyIndex_free(editnurb);
+ editnurb->keyindex = NULL;
}
else {
- editnurb= MEM_callocN(sizeof(EditNurb), "editnurb");
- cu->editnurb= editnurb;
+ editnurb = MEM_callocN(sizeof(EditNurb), "editnurb");
+ cu->editnurb = editnurb;
}
- nu= cu->nurb.first;
- cu->lastsel= NULL; /* for select row */
+ nu = cu->nurb.first;
+ cu->lastsel = NULL; /* for select row */
while (nu) {
- newnu= duplicateNurb(nu);
- test2DNurb(newnu); // after join, or any other creation of curve
+ newnu = BKE_nurb_duplicate(nu);
+ BKE_nurb_test2D(newnu); // after join, or any other creation of curve
BLI_addtail(&editnurb->nurbs, newnu);
if (nu_act == NULL && isNurbsel(nu)) {
- nu_act= newnu;
+ nu_act = newnu;
set_actNurb(obedit, newnu);
}
- nu= nu->next;
+ nu = nu->next;
}
if (actkey)
- editnurb->shapenr= obedit->shapenr;
+ editnurb->shapenr = obedit->shapenr;
/* animation could be added in editmode even if there was no animdata i
* object mode hence we always need CVs index be created */
@@ -1283,14 +1283,14 @@ void make_editNurb(Object *obedit)
void free_editNurb(Object *obedit)
{
- Curve *cu= obedit->data;
+ Curve *cu = obedit->data;
- free_curve_editNurb(cu);
+ BKE_curve_editNurb_free(cu);
}
void CU_deselect_all(Object *obedit)
{
- ListBase *editnurb= object_editcurve_get(obedit);
+ ListBase *editnurb = object_editcurve_get(obedit);
if (editnurb) {
selectend_nurb(obedit, FIRST, 0, DESELECT); /* set first control points as unselected */
@@ -1300,7 +1300,7 @@ void CU_deselect_all(Object *obedit)
void CU_select_all(Object *obedit)
{
- ListBase *editnurb= object_editcurve_get(obedit);
+ ListBase *editnurb = object_editcurve_get(obedit);
if (editnurb) {
selectend_nurb(obedit, FIRST, 0, SELECT); /* set first control points as unselected */
@@ -1310,25 +1310,25 @@ void CU_select_all(Object *obedit)
void CU_select_swap(Object *obedit)
{
- ListBase *editnurb= object_editcurve_get(obedit);
+ ListBase *editnurb = object_editcurve_get(obedit);
if (editnurb) {
- Curve *cu= obedit->data;
+ Curve *cu = obedit->data;
Nurb *nu;
BPoint *bp;
BezTriple *bezt;
int a;
- cu->lastsel= NULL;
+ cu->lastsel = NULL;
- for (nu= editnurb->first; nu; nu= nu->next) {
+ for (nu = editnurb->first; nu; nu = nu->next) {
if (nu->type == CU_BEZIER) {
- bezt= nu->bezt;
- a= nu->pntsu;
+ bezt = nu->bezt;
+ a = nu->pntsu;
while (a--) {
- if (bezt->hide==0) {
+ if (bezt->hide == 0) {
bezt->f2 ^= SELECT; /* always do the center point */
- if ((cu->drawflag & CU_HIDE_HANDLES)==0) {
+ if ((cu->drawflag & CU_HIDE_HANDLES) == 0) {
bezt->f1 ^= SELECT;
bezt->f3 ^= SELECT;
}
@@ -1337,8 +1337,8 @@ void CU_select_swap(Object *obedit)
}
}
else {
- bp= nu->bp;
- a= nu->pntsu*nu->pntsv;
+ bp = nu->bp;
+ a = nu->pntsu * nu->pntsv;
while (a--) {
swap_selection_bpoint(bp);
bp++;
@@ -1352,18 +1352,18 @@ void CU_select_swap(Object *obedit)
static int separate_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
Nurb *nu, *nu1;
Object *oldob, *newob;
Base *oldbase, *newbase;
Curve *oldcu, *newcu;
EditNurb *oldedit, *newedit;
- oldbase= CTX_data_active_base(C);
- oldob= oldbase->object;
- oldcu= oldob->data;
- oldedit= oldcu->editnurb;
+ oldbase = CTX_data_active_base(C);
+ oldob = oldbase->object;
+ oldcu = oldob->data;
+ oldedit = oldcu->editnurb;
if (oldcu->key) {
BKE_report(op->reports, RPT_ERROR, "Can't separate a curve with vertex keys");
@@ -1373,23 +1373,23 @@ static int separate_exec(bContext *C, wmOperator *op)
WM_cursor_wait(1);
/* 1. duplicate the object and data */
- newbase= ED_object_add_duplicate(bmain, scene, oldbase, 0); /* 0 = fully linked */
+ newbase = ED_object_add_duplicate(bmain, scene, oldbase, 0); /* 0 = fully linked */
ED_base_object_select(newbase, BA_DESELECT);
- newob= newbase->object;
+ newob = newbase->object;
- newcu= newob->data= copy_curve(oldcu);
- newcu->editnurb= NULL;
+ newcu = newob->data = BKE_curve_copy(oldcu);
+ newcu->editnurb = NULL;
oldcu->id.us--; /* because new curve is a copy: reduce user count */
/* 2. put new object in editmode and clear it */
make_editNurb(newob);
- newedit= newcu->editnurb;
- freeNurblist(&newedit->nurbs);
- free_curve_editNurb_keyIndex(newedit);
+ newedit = newcu->editnurb;
+ BKE_nurbList_free(&newedit->nurbs);
+ BKE_curve_editNurb_keyIndex_free(newedit);
/* 3. move over parts from old object */
- for (nu= oldedit->nurbs.first; nu; nu=nu1) {
- nu1= nu->next;
+ for (nu = oldedit->nurbs.first; nu; nu = nu1) {
+ nu1 = nu->next;
if (isNurbsel(nu)) {
BLI_remlink(&oldedit->nurbs, nu);
@@ -1401,10 +1401,10 @@ static int separate_exec(bContext *C, wmOperator *op)
load_editNurb(newob);
free_editNurb(newob);
- DAG_id_tag_update(&oldob->id, OB_RECALC_DATA); /* this is the original one */
- DAG_id_tag_update(&newob->id, OB_RECALC_DATA); /* this is the separated one */
+ DAG_id_tag_update(&oldob->id, OB_RECALC_DATA); /* this is the original one */
+ DAG_id_tag_update(&newob->id, OB_RECALC_DATA); /* this is the separated one */
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, oldob->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, oldob->data);
WM_cursor_wait(0);
@@ -1416,13 +1416,14 @@ void CURVE_OT_separate(wmOperatorType *ot)
/* identifiers */
ot->name = "Separate";
ot->idname = "CURVE_OT_separate";
+ ot->description = "Separate (partly) selected curves or surfaces into a new object";
/* api callbacks */
ot->exec = separate_exec;
ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ******************* FLAGS ********************* */
@@ -1435,36 +1436,36 @@ static short isNurbselUV(Nurb *nu, int *u, int *v, int flag)
BPoint *bp;
int a, b, sel;
- *u= *v= -1;
+ *u = *v = -1;
- bp= nu->bp;
- for (b=0; b<nu->pntsv; b++) {
- sel= 0;
- for (a=0; a<nu->pntsu; a++, bp++) {
+ bp = nu->bp;
+ for (b = 0; b < nu->pntsv; b++) {
+ sel = 0;
+ for (a = 0; a < nu->pntsu; a++, bp++) {
if (bp->f1 & flag) sel++;
}
- if (sel==nu->pntsu) {
- if (*u== -1) *u= b;
+ if (sel == nu->pntsu) {
+ if (*u == -1) *u = b;
else return 0;
}
- else if (sel>1) return 0; /* because sel==1 is still ok */
+ else if (sel > 1) return 0; /* because sel==1 is still ok */
}
- for (a=0; a<nu->pntsu; a++) {
- sel= 0;
- bp= nu->bp+a;
- for (b=0; b<nu->pntsv; b++, bp+=nu->pntsu) {
+ for (a = 0; a < nu->pntsu; a++) {
+ sel = 0;
+ bp = &nu->bp[a];
+ for (b = 0; b < nu->pntsv; b++, bp += nu->pntsu) {
if (bp->f1 & flag) sel++;
}
- if (sel==nu->pntsv) {
- if (*v== -1) *v= a;
+ if (sel == nu->pntsv) {
+ if (*v == -1) *v = a;
else return 0;
}
- else if (sel>1) return 0;
+ else if (sel > 1) return 0;
}
- if (*u==-1 && *v>-1) return 1;
- if (*v==-1 && *u>-1) return 1;
+ if (*u == -1 && *v > -1) return 1;
+ if (*v == -1 && *u > -1) return 1;
return 0;
}
@@ -1475,20 +1476,20 @@ static void setflagsNurb(ListBase *editnurb, short flag)
BPoint *bp;
int a;
- for (nu= editnurb->first; nu; nu= nu->next) {
+ for (nu = editnurb->first; nu; nu = nu->next) {
if (nu->type == CU_BEZIER) {
- a= nu->pntsu;
- bezt= nu->bezt;
+ a = nu->pntsu;
+ bezt = nu->bezt;
while (a--) {
- bezt->f1= bezt->f2= bezt->f3= flag;
+ bezt->f1 = bezt->f2 = bezt->f3 = flag;
bezt++;
}
}
else {
- a= nu->pntsu*nu->pntsv;
- bp= nu->bp;
+ a = nu->pntsu * nu->pntsv;
+ bp = nu->bp;
while (a--) {
- bp->f1= flag;
+ bp->f1 = flag;
bp++;
}
}
@@ -1502,10 +1503,10 @@ static void rotateflagNurb(ListBase *editnurb, short flag, float *cent, float ro
BPoint *bp;
int a;
- for (nu= editnurb->first; nu; nu= nu->next) {
+ for (nu = editnurb->first; nu; nu = nu->next) {
if (nu->type == CU_NURBS) {
- bp= nu->bp;
- a= nu->pntsu*nu->pntsv;
+ bp = nu->bp;
+ a = nu->pntsu * nu->pntsv;
while (a--) {
if (bp->f1 & flag) {
@@ -1527,10 +1528,10 @@ static void translateflagNurb(ListBase *editnurb, short flag, const float vec[3]
BPoint *bp;
int a;
- for (nu= editnurb->first; nu; nu= nu->next) {
+ for (nu = editnurb->first; nu; nu = nu->next) {
if (nu->type == CU_BEZIER) {
- a= nu->pntsu;
- bezt= nu->bezt;
+ a = nu->pntsu;
+ bezt = nu->bezt;
while (a--) {
if (bezt->f1 & flag) add_v3_v3(bezt->vec[0], vec);
if (bezt->f2 & flag) add_v3_v3(bezt->vec[1], vec);
@@ -1539,15 +1540,15 @@ static void translateflagNurb(ListBase *editnurb, short flag, const float vec[3]
}
}
else {
- a= nu->pntsu*nu->pntsv;
- bp= nu->bp;
+ a = nu->pntsu * nu->pntsv;
+ bp = nu->bp;
while (a--) {
if (bp->f1 & flag) add_v3_v3(bp->vec, vec);
bp++;
}
}
- test2DNurb(nu);
+ BKE_nurb_test2D(nu);
}
}
@@ -1557,14 +1558,14 @@ static void weightflagNurb(ListBase *editnurb, short flag, float w)
BPoint *bp;
int a;
- for (nu= editnurb->first; nu; nu= nu->next) {
+ for (nu = editnurb->first; nu; nu = nu->next) {
if (nu->type == CU_NURBS) {
- a= nu->pntsu*nu->pntsv;
- bp= nu->bp;
+ a = nu->pntsu * nu->pntsv;
+ bp = nu->bp;
while (a--) {
if (bp->f1 & flag) {
/* a mode used to exist for replace/multiple but is was unused */
- bp->vec[3]*= w;
+ bp->vec[3] *= w;
}
bp++;
}
@@ -1574,102 +1575,100 @@ static void weightflagNurb(ListBase *editnurb, short flag, float w)
static int deleteflagNurb(bContext *C, wmOperator *UNUSED(op), int flag)
{
- Object *obedit= CTX_data_edit_object(C);
- Curve *cu= obedit->data;
- ListBase *editnurb= object_editcurve_get(obedit);
+ Object *obedit = CTX_data_edit_object(C);
+ Curve *cu = obedit->data;
+ ListBase *editnurb = object_editcurve_get(obedit);
Nurb *nu, *next;
BPoint *bp, *bpn, *newbp;
int a, b, newu, newv, sel;
- if (obedit->type==OB_SURF);
+ if (obedit->type == OB_SURF) ;
else return OPERATOR_CANCELLED;
- cu->lastsel= NULL;
+ cu->lastsel = NULL;
- nu= editnurb->first;
+ nu = editnurb->first;
while (nu) {
- next= nu->next;
+ next = nu->next;
/* is entire nurb selected */
- bp= nu->bp;
- a= nu->pntsu*nu->pntsv;
+ bp = nu->bp;
+ a = nu->pntsu * nu->pntsv;
while (a) {
a--;
- if (bp->f1 & flag);
+ if (bp->f1 & flag) ;
else break;
bp++;
}
- if (a==0) {
+ if (a == 0) {
BLI_remlink(editnurb, nu);
keyIndex_delNurb(cu->editnurb, nu);
- freeNurb(nu); nu=NULL;
+ BKE_nurb_free(nu); nu = NULL;
}
else {
/* is nurb in U direction selected */
- newv= nu->pntsv;
- bp= nu->bp;
- for (b=0; b<nu->pntsv; b++) {
- sel= 0;
- for (a=0; a<nu->pntsu; a++, bp++) {
+ newv = nu->pntsv;
+ bp = nu->bp;
+ for (b = 0; b < nu->pntsv; b++) {
+ sel = 0;
+ for (a = 0; a < nu->pntsu; a++, bp++) {
if (bp->f1 & flag) sel++;
}
- if (sel==nu->pntsu) {
+ if (sel == nu->pntsu) {
newv--;
}
- else if (sel>=1) {
+ else if (sel >= 1) {
/* don't delete */
break;
}
}
- if (newv!=nu->pntsv && b==nu->pntsv) {
+ if (newv != nu->pntsv && b == nu->pntsv) {
/* delete */
- bp= nu->bp;
- bpn = newbp =
- (BPoint*) MEM_mallocN(newv * nu->pntsu * sizeof(BPoint), "deleteNurb");
- for (b=0; b<nu->pntsv; b++) {
- if ((bp->f1 & flag)==0) {
- memcpy(bpn, bp, nu->pntsu*sizeof(BPoint));
+ bp = nu->bp;
+ bpn = newbp = (BPoint *)MEM_mallocN(newv * nu->pntsu * sizeof(BPoint), "deleteNurb");
+ for (b = 0; b < nu->pntsv; b++) {
+ if ((bp->f1 & flag) == 0) {
+ memcpy(bpn, bp, nu->pntsu * sizeof(BPoint));
keyIndex_updateBP(cu->editnurb, bp, bpn, nu->pntsu);
- bpn+= nu->pntsu;
+ bpn += nu->pntsu;
}
else {
keyIndex_delBP(cu->editnurb, bp);
}
- bp+= nu->pntsu;
+ bp += nu->pntsu;
}
- nu->pntsv= newv;
+ nu->pntsv = newv;
MEM_freeN(nu->bp);
- nu->bp= newbp;
- clamp_nurb_order_v(nu);
+ nu->bp = newbp;
+ BKE_nurb_order_clamp_v(nu);
- nurbs_knot_calc_v(nu);
+ BKE_nurb_knot_calc_v(nu);
}
else {
/* is the nurb in V direction selected */
- newu= nu->pntsu;
- for (a=0; a<nu->pntsu; a++) {
- bp= nu->bp+a;
- sel= 0;
- for (b=0; b<nu->pntsv; b++, bp+=nu->pntsu) {
+ newu = nu->pntsu;
+ for (a = 0; a < nu->pntsu; a++) {
+ bp = &nu->bp[a];
+ sel = 0;
+ for (b = 0; b < nu->pntsv; b++, bp += nu->pntsu) {
if (bp->f1 & flag) sel++;
}
- if (sel==nu->pntsv) {
+ if (sel == nu->pntsv) {
newu--;
}
- else if (sel>=1) {
+ else if (sel >= 1) {
/* don't delete */
break;
}
}
- if (newu!=nu->pntsu && a==nu->pntsu) {
+ if (newu != nu->pntsu && a == nu->pntsu) {
/* delete */
- bp= nu->bp;
- bpn = newbp =
- (BPoint*) MEM_mallocN(newu * nu->pntsv * sizeof(BPoint), "deleteNurb");
- for (b=0; b<nu->pntsv; b++) {
- for (a=0; a<nu->pntsu; a++, bp++) {
- if ((bp->f1 & flag)==0) {
- *bpn= *bp;
+ bp = nu->bp;
+ bpn = newbp = (BPoint *)MEM_mallocN(newu * nu->pntsv * sizeof(BPoint), "deleteNurb");
+ for (b = 0; b < nu->pntsv; b++) {
+ for (a = 0; a < nu->pntsu; a++, bp++) {
+ if ((bp->f1 & flag) == 0) {
+ *bpn = *bp;
keyIndex_updateBP(cu->editnurb, bp, bpn, 1);
bpn++;
}
@@ -1679,28 +1678,28 @@ static int deleteflagNurb(bContext *C, wmOperator *UNUSED(op), int flag)
}
}
MEM_freeN(nu->bp);
- nu->bp= newbp;
- if (newu==1 && nu->pntsv>1) { /* make a U spline */
- nu->pntsu= nu->pntsv;
- nu->pntsv= 1;
+ nu->bp = newbp;
+ if (newu == 1 && nu->pntsv > 1) { /* make a U spline */
+ nu->pntsu = nu->pntsv;
+ nu->pntsv = 1;
SWAP(short, nu->orderu, nu->orderv);
- clamp_nurb_order_u(nu);
+ BKE_nurb_order_clamp_u(nu);
if (nu->knotsv) MEM_freeN(nu->knotsv);
- nu->knotsv= NULL;
+ nu->knotsv = NULL;
}
else {
- nu->pntsu= newu;
- clamp_nurb_order_u(nu);
+ nu->pntsu = newu;
+ BKE_nurb_order_clamp_u(nu);
}
- nurbs_knot_calc_u(nu);
+ BKE_nurb_knot_calc_u(nu);
}
}
}
- nu= next;
+ nu = next;
}
if (ED_curve_updateAnimPaths(obedit->data))
- WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, obedit);
+ WM_event_add_notifier(C, NC_OBJECT | ND_KEYS, obedit);
return OPERATOR_FINISHED;
}
@@ -1710,30 +1709,29 @@ static short extrudeflagNurb(EditNurb *editnurb, int flag)
{
Nurb *nu;
BPoint *bp, *bpn, *newbp;
- int ok= 0, a, u, v, len;
+ int ok = 0, a, u, v, len;
- nu= editnurb->nurbs.first;
+ nu = editnurb->nurbs.first;
while (nu) {
- if (nu->pntsv==1) {
- bp= nu->bp;
- a= nu->pntsu;
+ if (nu->pntsv == 1) {
+ bp = nu->bp;
+ a = nu->pntsu;
while (a) {
- if (bp->f1 & flag);
+ if (bp->f1 & flag) ;
else break;
bp++;
a--;
}
- if (a==0) {
- ok= 1;
- newbp =
- (BPoint*)MEM_mallocN(2 * nu->pntsu * sizeof(BPoint), "extrudeNurb1");
+ if (a == 0) {
+ ok = 1;
+ newbp = (BPoint *)MEM_mallocN(2 * nu->pntsu * sizeof(BPoint), "extrudeNurb1");
ED_curve_bpcpy(editnurb, newbp, nu->bp, nu->pntsu);
- bp= newbp+ nu->pntsu;
+ bp = newbp + nu->pntsu;
ED_curve_bpcpy(editnurb, bp, nu->bp, nu->pntsu);
MEM_freeN(nu->bp);
- nu->bp= newbp;
- a= nu->pntsu;
+ nu->bp = newbp;
+ a = nu->pntsu;
while (a--) {
select_bpoint(bp, SELECT, flag, HIDDEN);
select_bpoint(newbp, DESELECT, flag, HIDDEN);
@@ -1741,83 +1739,81 @@ static short extrudeflagNurb(EditNurb *editnurb, int flag)
newbp++;
}
- nu->pntsv= 2;
- nu->orderv= 2;
- nurbs_knot_calc_v(nu);
+ nu->pntsv = 2;
+ nu->orderv = 2;
+ BKE_nurb_knot_calc_v(nu);
}
}
else {
/* which row or column is selected */
- if ( isNurbselUV(nu, &u, &v, flag) ) {
+ if (isNurbselUV(nu, &u, &v, flag) ) {
/* deselect all */
- bp= nu->bp;
- a= nu->pntsu*nu->pntsv;
+ bp = nu->bp;
+ a = nu->pntsu * nu->pntsv;
while (a--) {
select_bpoint(bp, DESELECT, flag, HIDDEN);
bp++;
}
- if (u==0 || u== nu->pntsv-1) { /* row in u-direction selected */
- ok= 1;
- newbp =
- (BPoint*) MEM_mallocN(nu->pntsu*(nu->pntsv + 1)
- * sizeof(BPoint), "extrudeNurb1");
- if (u==0) {
- len= nu->pntsv*nu->pntsu;
- ED_curve_bpcpy(editnurb, newbp+nu->pntsu, nu->bp, len);
+ if (u == 0 || u == nu->pntsv - 1) { /* row in u-direction selected */
+ ok = 1;
+ newbp = (BPoint *)MEM_mallocN(nu->pntsu * (nu->pntsv + 1) *
+ sizeof(BPoint), "extrudeNurb1");
+ if (u == 0) {
+ len = nu->pntsv * nu->pntsu;
+ ED_curve_bpcpy(editnurb, newbp + nu->pntsu, nu->bp, len);
ED_curve_bpcpy(editnurb, newbp, nu->bp, nu->pntsu);
- bp= newbp;
+ bp = newbp;
}
else {
- len= nu->pntsv*nu->pntsu;
+ len = nu->pntsv * nu->pntsu;
ED_curve_bpcpy(editnurb, newbp, nu->bp, len);
- ED_curve_bpcpy(editnurb, newbp+len, nu->bp+len-nu->pntsu, nu->pntsu);
- bp= newbp+len;
+ ED_curve_bpcpy(editnurb, newbp + len, &nu->bp[len - nu->pntsu], nu->pntsu);
+ bp = newbp + len;
}
- a= nu->pntsu;
+ a = nu->pntsu;
while (a--) {
select_bpoint(bp, SELECT, flag, HIDDEN);
bp++;
}
MEM_freeN(nu->bp);
- nu->bp= newbp;
+ nu->bp = newbp;
nu->pntsv++;
- nurbs_knot_calc_v(nu);
+ BKE_nurb_knot_calc_v(nu);
}
- else if (v==0 || v== nu->pntsu-1) { /* column in v-direction selected */
- ok= 1;
- bpn = newbp =
- (BPoint*) MEM_mallocN((nu->pntsu + 1) * nu->pntsv * sizeof(BPoint), "extrudeNurb1");
- bp= nu->bp;
-
- for (a=0; a<nu->pntsv; a++) {
- if (v==0) {
- *bpn= *bp;
+ else if (v == 0 || v == nu->pntsu - 1) { /* column in v-direction selected */
+ ok = 1;
+ bpn = newbp = (BPoint *)MEM_mallocN((nu->pntsu + 1) * nu->pntsv * sizeof(BPoint), "extrudeNurb1");
+ bp = nu->bp;
+
+ for (a = 0; a < nu->pntsv; a++) {
+ if (v == 0) {
+ *bpn = *bp;
bpn->f1 |= flag;
bpn++;
}
ED_curve_bpcpy(editnurb, bpn, bp, nu->pntsu);
- bp+= nu->pntsu;
- bpn+= nu->pntsu;
- if (v== nu->pntsu-1) {
- *bpn= *(bp-1);
+ bp += nu->pntsu;
+ bpn += nu->pntsu;
+ if (v == nu->pntsu - 1) {
+ *bpn = *(bp - 1);
bpn->f1 |= flag;
bpn++;
}
}
MEM_freeN(nu->bp);
- nu->bp= newbp;
+ nu->bp = newbp;
nu->pntsu++;
- nurbs_knot_calc_u(nu);
+ BKE_nurb_knot_calc_u(nu);
}
}
}
- nu= nu->next;
+ nu = nu->next;
}
return ok;
@@ -1825,49 +1821,48 @@ static short extrudeflagNurb(EditNurb *editnurb, int flag)
static void adduplicateflagNurb(Object *obedit, short flag)
{
- ListBase *editnurb= object_editcurve_get(obedit);
+ ListBase *editnurb = object_editcurve_get(obedit);
Nurb *nu, *newnu;
BezTriple *bezt, *bezt1;
BPoint *bp, *bp1;
- Curve *cu= (Curve*)obedit->data;
+ Curve *cu = (Curve *)obedit->data;
int a, b, starta, enda, newu, newv;
char *usel;
- cu->lastsel= NULL;
+ cu->lastsel = NULL;
- nu= editnurb->last;
+ nu = editnurb->last;
while (nu) {
if (nu->type == CU_BEZIER) {
- bezt= nu->bezt;
- for (a=0; a<nu->pntsu; a++) {
- enda= -1;
- starta= a;
+ bezt = nu->bezt;
+ for (a = 0; a < nu->pntsu; a++) {
+ enda = -1;
+ starta = a;
while ( (bezt->f1 & flag) || (bezt->f2 & flag) || (bezt->f3 & flag) ) {
select_beztriple(bezt, DESELECT, flag, HIDDEN);
- enda=a;
- if (a>=nu->pntsu-1) break;
+ enda = a;
+ if (a >= nu->pntsu - 1) break;
a++;
bezt++;
}
- if (enda>=starta) {
- newnu = (Nurb*)MEM_mallocN(sizeof(Nurb), "adduplicateN");
+ if (enda >= starta) {
+ newnu = (Nurb *)MEM_mallocN(sizeof(Nurb), "adduplicateN");
memcpy(newnu, nu, sizeof(Nurb));
BLI_addtail(editnurb, newnu);
set_actNurb(obedit, newnu);
- newnu->pntsu= enda-starta+1;
- newnu->bezt=
- (BezTriple*)MEM_mallocN((enda - starta + 1) * sizeof(BezTriple), "adduplicateN");
- memcpy(newnu->bezt, nu->bezt+starta, newnu->pntsu*sizeof(BezTriple));
+ newnu->pntsu = enda - starta + 1;
+ newnu->bezt = (BezTriple *)MEM_mallocN((enda - starta + 1) * sizeof(BezTriple), "adduplicateN");
+ memcpy(newnu->bezt, &nu->bezt[starta], newnu->pntsu * sizeof(BezTriple));
- b= newnu->pntsu;
- bezt1= newnu->bezt;
+ b = newnu->pntsu;
+ bezt1 = newnu->bezt;
while (b--) {
select_beztriple(bezt1, SELECT, flag, HIDDEN);
bezt1++;
}
if (nu->flagu & CU_NURB_CYCLIC) {
- if (starta!=0 || enda!=nu->pntsu-1) {
+ if (starta != 0 || enda != nu->pntsu - 1) {
newnu->flagu &= ~CU_NURB_CYCLIC;
}
}
@@ -1875,43 +1870,43 @@ static void adduplicateflagNurb(Object *obedit, short flag)
bezt++;
}
}
- else if (nu->pntsv==1) { /* because UV Nurb has a different method for dupli */
- bp= nu->bp;
- for (a=0; a<nu->pntsu; a++) {
- enda= -1;
- starta= a;
+ else if (nu->pntsv == 1) { /* because UV Nurb has a different method for dupli */
+ bp = nu->bp;
+ for (a = 0; a < nu->pntsu; a++) {
+ enda = -1;
+ starta = a;
while (bp->f1 & flag) {
select_bpoint(bp, DESELECT, flag, HIDDEN);
- enda= a;
- if (a>=nu->pntsu-1) break;
+ enda = a;
+ if (a >= nu->pntsu - 1) break;
a++;
bp++;
}
- if (enda>=starta) {
- newnu = (Nurb*)MEM_mallocN(sizeof(Nurb), "adduplicateN3");
+ if (enda >= starta) {
+ newnu = (Nurb *)MEM_mallocN(sizeof(Nurb), "adduplicateN3");
memcpy(newnu, nu, sizeof(Nurb));
set_actNurb(obedit, newnu);
BLI_addtail(editnurb, newnu);
- newnu->pntsu= enda-starta+1;
- newnu->bp = (BPoint*)MEM_mallocN((enda-starta+1) * sizeof(BPoint), "adduplicateN4");
- memcpy(newnu->bp, nu->bp+starta, newnu->pntsu*sizeof(BPoint));
+ newnu->pntsu = enda - starta + 1;
+ newnu->bp = (BPoint *)MEM_mallocN((enda - starta + 1) * sizeof(BPoint), "adduplicateN4");
+ memcpy(newnu->bp, &nu->bp[starta], newnu->pntsu * sizeof(BPoint));
- b= newnu->pntsu;
- bp1= newnu->bp;
+ b = newnu->pntsu;
+ bp1 = newnu->bp;
while (b--) {
select_bpoint(bp1, SELECT, flag, HIDDEN);
bp1++;
}
if (nu->flagu & CU_NURB_CYCLIC) {
- if (starta!=0 || enda!=nu->pntsu-1) {
+ if (starta != 0 || enda != nu->pntsu - 1) {
newnu->flagu &= ~CU_NURB_CYCLIC;
}
}
/* knots */
- newnu->knotsu= NULL;
- nurbs_knot_calc_u(newnu);
+ newnu->knotsu = NULL;
+ BKE_nurb_knot_calc_u(newnu);
}
bp++;
}
@@ -1919,52 +1914,51 @@ static void adduplicateflagNurb(Object *obedit, short flag)
else {
/* a rectangular area in nurb has to be selected */
if (isNurbsel(nu)) {
- usel= MEM_callocN(nu->pntsu, "adduplicateN4");
- bp= nu->bp;
- for (a=0; a<nu->pntsv; a++) {
- for (b=0; b<nu->pntsu; b++, bp++) {
+ usel = MEM_callocN(nu->pntsu, "adduplicateN4");
+ bp = nu->bp;
+ for (a = 0; a < nu->pntsv; a++) {
+ for (b = 0; b < nu->pntsu; b++, bp++) {
if (bp->f1 & flag) usel[b]++;
}
}
- newu= 0;
- newv= 0;
- for (a=0; a<nu->pntsu; a++) {
+ newu = 0;
+ newv = 0;
+ for (a = 0; a < nu->pntsu; a++) {
if (usel[a]) {
- if (newv==0 || usel[a]==newv) {
- newv= usel[a];
+ if (newv == 0 || usel[a] == newv) {
+ newv = usel[a];
newu++;
}
else {
- newv= 0;
+ newv = 0;
break;
}
}
}
- if (newu==0 || newv==0) {
+ if (newu == 0 || newv == 0) {
if (G.debug & G_DEBUG)
printf("Can't duplicate Nurb\n");
}
else {
- if (newu==1) SWAP(short, newu, newv);
+ if (newu == 1) SWAP(short, newu, newv);
- newnu = (Nurb*)MEM_mallocN(sizeof(Nurb), "adduplicateN5");
+ newnu = (Nurb *)MEM_mallocN(sizeof(Nurb), "adduplicateN5");
memcpy(newnu, nu, sizeof(Nurb));
BLI_addtail(editnurb, newnu);
set_actNurb(obedit, newnu);
- newnu->pntsu= newu;
- newnu->pntsv= newv;
- newnu->bp =
- (BPoint*)MEM_mallocN(newu * newv * sizeof(BPoint), "adduplicateN6");
- clamp_nurb_order_u(newnu);
- clamp_nurb_order_v(newnu);
+ newnu->pntsu = newu;
+ newnu->pntsv = newv;
+ newnu->bp = (BPoint *)MEM_mallocN(newu * newv * sizeof(BPoint), "adduplicateN6");
+ BKE_nurb_order_clamp_u(newnu);
+ BKE_nurb_order_clamp_v(newnu);
- newnu->knotsu= newnu->knotsv= NULL;
+ newnu->knotsu = newnu->knotsv = NULL;
- bp= newnu->bp;
- bp1= nu->bp;
- for (a=0; a<nu->pntsv; a++) {
- for (b=0; b<nu->pntsu; b++, bp1++) {
+ bp = newnu->bp;
+ bp1 = nu->bp;
+ for (a = 0; a < nu->pntsv; a++) {
+ for (b = 0; b < nu->pntsu; b++, bp1++) {
if (bp1->f1 & flag) {
memcpy(bp, bp1, sizeof(BPoint));
select_bpoint(bp1, DESELECT, flag, HIDDEN);
@@ -1972,20 +1966,20 @@ static void adduplicateflagNurb(Object *obedit, short flag)
}
}
}
- if (check_valid_nurb_u(newnu)) {
- if (nu->pntsu==newnu->pntsu && nu->knotsu) {
- newnu->knotsu= MEM_dupallocN( nu->knotsu );
+ if (BKE_nurb_check_valid_u(newnu)) {
+ if (nu->pntsu == newnu->pntsu && nu->knotsu) {
+ newnu->knotsu = MEM_dupallocN(nu->knotsu);
}
else {
- nurbs_knot_calc_u(newnu);
+ BKE_nurb_knot_calc_u(newnu);
}
}
- if (check_valid_nurb_v(newnu)) {
- if (nu->pntsv==newnu->pntsv && nu->knotsv) {
- newnu->knotsv= MEM_dupallocN( nu->knotsv );
+ if (BKE_nurb_check_valid_v(newnu)) {
+ if (nu->pntsv == newnu->pntsv && nu->knotsv) {
+ newnu->knotsv = MEM_dupallocN(nu->knotsv);
}
else {
- nurbs_knot_calc_v(newnu);
+ BKE_nurb_knot_calc_v(newnu);
}
}
}
@@ -1993,7 +1987,7 @@ static void adduplicateflagNurb(Object *obedit, short flag)
}
}
- nu= nu->prev;
+ nu = nu->prev;
}
/* actnu changed */
@@ -2003,22 +1997,22 @@ static void adduplicateflagNurb(Object *obedit, short flag)
static int switch_direction_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *obedit= CTX_data_edit_object(C);
- Curve *cu= (Curve*)obedit->data;
- EditNurb *editnurb= cu->editnurb;
+ Object *obedit = CTX_data_edit_object(C);
+ Curve *cu = (Curve *)obedit->data;
+ EditNurb *editnurb = cu->editnurb;
Nurb *nu;
- for (nu= editnurb->nurbs.first; nu; nu= nu->next)
+ for (nu = editnurb->nurbs.first; nu; nu = nu->next)
if (isNurbsel(nu)) {
- switchdirectionNurb(nu);
+ BKE_nurb_direction_switch(nu);
keyData_switchDirectionNurb(cu, nu);
}
if (ED_curve_updateAnimPaths(obedit->data))
- WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, obedit);
+ WM_event_add_notifier(C, NC_OBJECT | ND_KEYS, obedit);
DAG_id_tag_update(obedit->data, 0);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
@@ -2035,38 +2029,38 @@ void CURVE_OT_switch_direction(wmOperatorType *ot)
ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/****************** set weight operator *******************/
static int set_goal_weight_exec(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_edit_object(C);
- ListBase *editnurb= object_editcurve_get(obedit);
+ Object *obedit = CTX_data_edit_object(C);
+ ListBase *editnurb = object_editcurve_get(obedit);
Nurb *nu;
BezTriple *bezt;
BPoint *bp;
- float weight= RNA_float_get(op->ptr, "weight");
+ float weight = RNA_float_get(op->ptr, "weight");
int a;
- for (nu= editnurb->first; nu; nu= nu->next) {
+ for (nu = editnurb->first; nu; nu = nu->next) {
if (nu->bezt) {
- for (bezt=nu->bezt, a=0; a<nu->pntsu; a++, bezt++) {
+ for (bezt = nu->bezt, a = 0; a < nu->pntsu; a++, bezt++) {
if (bezt->f2 & SELECT)
- bezt->weight= weight;
+ bezt->weight = weight;
}
}
else if (nu->bp) {
- for (bp=nu->bp, a=0; a<nu->pntsu*nu->pntsv; a++, bp++) {
+ for (bp = nu->bp, a = 0; a < nu->pntsu * nu->pntsv; a++, bp++) {
if (bp->f1 & SELECT)
- bp->weight= weight;
+ bp->weight = weight;
}
}
}
DAG_id_tag_update(obedit->data, 0);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
@@ -2084,7 +2078,7 @@ void CURVE_OT_spline_weight_set(wmOperatorType *ot)
ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_float_factor(ot->srna, "weight", 1.0f, 0.0f, 1.0f, "Weight", "", 0.0f, 1.0f);
@@ -2094,30 +2088,30 @@ void CURVE_OT_spline_weight_set(wmOperatorType *ot)
static int set_radius_exec(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_edit_object(C);
- ListBase *editnurb= object_editcurve_get(obedit);
+ Object *obedit = CTX_data_edit_object(C);
+ ListBase *editnurb = object_editcurve_get(obedit);
Nurb *nu;
BezTriple *bezt;
BPoint *bp;
- float radius= RNA_float_get(op->ptr, "radius");
+ float radius = RNA_float_get(op->ptr, "radius");
int a;
- for (nu= editnurb->first; nu; nu= nu->next) {
+ for (nu = editnurb->first; nu; nu = nu->next) {
if (nu->bezt) {
- for (bezt=nu->bezt, a=0; a<nu->pntsu; a++, bezt++) {
+ for (bezt = nu->bezt, a = 0; a < nu->pntsu; a++, bezt++) {
if (bezt->f2 & SELECT)
- bezt->radius= radius;
+ bezt->radius = radius;
}
}
else if (nu->bp) {
- for (bp=nu->bp, a=0; a<nu->pntsu*nu->pntsv; a++, bp++) {
+ for (bp = nu->bp, a = 0; a < nu->pntsu * nu->pntsv; a++, bp++) {
if (bp->f1 & SELECT)
- bp->radius= radius;
+ bp->radius = radius;
}
}
}
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
DAG_id_tag_update(obedit->data, 0);
return OPERATOR_FINISHED;
@@ -2136,7 +2130,7 @@ void CURVE_OT_radius_set(wmOperatorType *ot)
ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_float(ot->srna, "radius", 1.0f, 0.0f, FLT_MAX, "Radius", "", 0.0001f, 10.0f);
@@ -2146,24 +2140,24 @@ void CURVE_OT_radius_set(wmOperatorType *ot)
static int smooth_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *obedit= CTX_data_edit_object(C);
- ListBase *editnurb= object_editcurve_get(obedit);
+ Object *obedit = CTX_data_edit_object(C);
+ ListBase *editnurb = object_editcurve_get(obedit);
Nurb *nu;
BezTriple *bezt, *beztOrig;
BPoint *bp, *bpOrig;
float val, newval, offset;
int a, i, change = 0;
- for (nu= editnurb->first; nu; nu= nu->next) {
+ for (nu = editnurb->first; nu; nu = nu->next) {
if (nu->bezt) {
change = 0;
- beztOrig = MEM_dupallocN( nu->bezt );
- for (bezt=nu->bezt+1, a=1; a<nu->pntsu-1; a++, bezt++) {
+ beztOrig = MEM_dupallocN(nu->bezt);
+ for (bezt = &nu->bezt[1], a = 1; a < nu->pntsu - 1; a++, bezt++) {
if (bezt->f2 & SELECT) {
- for (i=0; i<3; i++) {
+ for (i = 0; i < 3; i++) {
val = bezt->vec[1][i];
- newval = ((beztOrig+(a-1))->vec[1][i] * 0.5f) + ((beztOrig+(a+1))->vec[1][i] * 0.5f);
- offset = (val*((1.0f/6.0f)*5.0f)) + (newval*(1.0f/6.0f)) - val;
+ newval = ((beztOrig + (a - 1))->vec[1][i] * 0.5f) + ((beztOrig + (a + 1))->vec[1][i] * 0.5f);
+ offset = (val * ((1.0f / 6.0f) * 5.0f)) + (newval * (1.0f / 6.0f)) - val;
/* offset handles */
bezt->vec[1][i] += offset;
bezt->vec[0][i] += offset;
@@ -2174,17 +2168,17 @@ static int smooth_exec(bContext *C, wmOperator *UNUSED(op))
}
MEM_freeN(beztOrig);
if (change)
- calchandlesNurb(nu);
+ BKE_nurb_handles_calc(nu);
}
else if (nu->bp) {
- bpOrig = MEM_dupallocN( nu->bp );
+ bpOrig = MEM_dupallocN(nu->bp);
/* Same as above, keep these the same! */
- for (bp=nu->bp+1, a=1; a<nu->pntsu-1; a++, bp++) {
+ for (bp = &nu->bp[1], a = 1; a < nu->pntsu - 1; a++, bp++) {
if (bp->f1 & SELECT) {
- for (i=0; i<3; i++) {
+ for (i = 0; i < 3; i++) {
val = bp->vec[i];
- newval = ((bpOrig+(a-1))->vec[i] * 0.5f) + ((bpOrig+(a+1))->vec[i] * 0.5f);
- offset = (val*((1.0f/6.0f)*5.0f)) + (newval*(1.0f/6.0f)) - val;
+ newval = ((bpOrig + (a - 1))->vec[i] * 0.5f) + ((bpOrig + (a + 1))->vec[i] * 0.5f);
+ offset = (val * ((1.0f / 6.0f) * 5.0f)) + (newval * (1.0f / 6.0f)) - val;
bp->vec[i] += offset;
}
@@ -2194,7 +2188,7 @@ static int smooth_exec(bContext *C, wmOperator *UNUSED(op))
}
}
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
DAG_id_tag_update(obedit->data, 0);
return OPERATOR_FINISHED;
@@ -2212,7 +2206,7 @@ void CURVE_OT_smooth(wmOperatorType *ot)
ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/**************** smooth curve radius operator *************/
@@ -2220,8 +2214,8 @@ void CURVE_OT_smooth(wmOperatorType *ot)
/* TODO, make smoothing distance based */
static int smooth_radius_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *obedit= CTX_data_edit_object(C);
- ListBase *editnurb= object_editcurve_get(obedit);
+ Object *obedit = CTX_data_edit_object(C);
+ ListBase *editnurb = object_editcurve_get(obedit);
Nurb *nu;
BezTriple *bezt;
BPoint *bp;
@@ -2232,15 +2226,15 @@ static int smooth_radius_exec(bContext *C, wmOperator *UNUSED(op))
int start_sel, end_sel; /* selection indices, inclusive */
float start_rad, end_rad, fac, range;
- for (nu= editnurb->first; nu; nu= nu->next) {
+ for (nu = editnurb->first; nu; nu = nu->next) {
if (nu->bezt) {
- for (last_sel=0; last_sel < nu->pntsu; last_sel++) {
+ for (last_sel = 0; last_sel < nu->pntsu; last_sel++) {
/* loop over selection segments of a curve, smooth each */
/* Start BezTriple code, this is duplicated below for points, make sure these functions stay in sync */
start_sel = -1;
- for (bezt=nu->bezt+last_sel, a=last_sel; a<nu->pntsu; a++, bezt++) {
+ for (bezt = &nu->bezt[last_sel], a = last_sel; a < nu->pntsu; a++, bezt++) {
if (bezt->f2 & SELECT) {
start_sel = a;
break;
@@ -2248,8 +2242,8 @@ static int smooth_radius_exec(bContext *C, wmOperator *UNUSED(op))
}
/* in case there are no other selected verts */
end_sel = start_sel;
- for (bezt=nu->bezt+(start_sel+1), a=start_sel+1; a<nu->pntsu; a++, bezt++) {
- if ((bezt->f2 & SELECT)==0) {
+ for (bezt = &nu->bezt[start_sel + 1], a = start_sel + 1; a < nu->pntsu; a++, bezt++) {
+ if ((bezt->f2 & SELECT) == 0) {
break;
}
end_sel = a;
@@ -2266,35 +2260,35 @@ static int smooth_radius_exec(bContext *C, wmOperator *UNUSED(op))
if (start_sel == end_sel) {
/* simple, only 1 point selected */
- if (start_sel>0) start_rad = (nu->bezt+start_sel-1)->radius;
- if (end_sel!=-1 && end_sel < nu->pntsu) end_rad = (nu->bezt+start_sel+1)->radius;
+ if (start_sel > 0) start_rad = nu->bezt[start_sel - 1].radius;
+ if (end_sel != -1 && end_sel < nu->pntsu) end_rad = nu->bezt[start_sel + 1].radius;
- if (start_rad >= 0.0f && end_rad >= 0.0f) (nu->bezt+start_sel)->radius = (start_rad + end_rad)/2;
- else if (start_rad >= 0.0f) (nu->bezt+start_sel)->radius = start_rad;
- else if (end_rad >= 0.0f) (nu->bezt+start_sel)->radius = end_rad;
+ if (start_rad >= 0.0f && end_rad >= 0.0f) nu->bezt[start_sel].radius = (start_rad + end_rad) / 2.0f;
+ else if (start_rad >= 0.0f) nu->bezt[start_sel].radius = start_rad;
+ else if (end_rad >= 0.0f) nu->bezt[start_sel].radius = end_rad;
}
else {
/* if endpoints selected, then use them */
- if (start_sel==0) {
- start_rad = (nu->bezt+start_sel)->radius;
+ if (start_sel == 0) {
+ start_rad = nu->bezt[start_sel].radius;
start_sel++; /* we don't want to edit the selected endpoint */
}
else {
- start_rad = (nu->bezt+start_sel-1)->radius;
+ start_rad = nu->bezt[start_sel - 1].radius;
}
- if (end_sel==nu->pntsu-1) {
- end_rad = (nu->bezt+end_sel)->radius;
+ if (end_sel == nu->pntsu - 1) {
+ end_rad = nu->bezt[end_sel].radius;
end_sel--; /* we don't want to edit the selected endpoint */
}
else {
- end_rad = (nu->bezt+end_sel+1)->radius;
+ end_rad = nu->bezt[end_sel + 1].radius;
}
/* Now Blend between the points */
range = (float)(end_sel - start_sel) + 2.0f;
- for (bezt=nu->bezt+start_sel, a=start_sel; a<=end_sel; a++, bezt++) {
- fac = (float)(1+a-start_sel) / range;
- bezt->radius = start_rad*(1.0f-fac) + end_rad*fac;
+ for (bezt = &nu->bezt[start_sel], a = start_sel; a <= end_sel; a++, bezt++) {
+ fac = (float)(1 + a - start_sel) / range;
+ bezt->radius = start_rad * (1.0f - fac) + end_rad * fac;
}
}
}
@@ -2302,12 +2296,12 @@ static int smooth_radius_exec(bContext *C, wmOperator *UNUSED(op))
}
else if (nu->bp) {
/* Same as above, keep these the same! */
- for (last_sel=0; last_sel < nu->pntsu; last_sel++) {
+ for (last_sel = 0; last_sel < nu->pntsu; last_sel++) {
/* loop over selection segments of a curve, smooth each */
/* Start BezTriple code, this is duplicated below for points, make sure these functions stay in sync */
start_sel = -1;
- for (bp=nu->bp+last_sel, a=last_sel; a<nu->pntsu; a++, bp++) {
+ for (bp = &nu->bp[last_sel], a = last_sel; a < nu->pntsu; a++, bp++) {
if (bp->f1 & SELECT) {
start_sel = a;
break;
@@ -2315,8 +2309,8 @@ static int smooth_radius_exec(bContext *C, wmOperator *UNUSED(op))
}
/* in case there are no other selected verts */
end_sel = start_sel;
- for (bp=nu->bp+(start_sel+1), a=start_sel+1; a<nu->pntsu; a++, bp++) {
- if ((bp->f1 & SELECT)==0) {
+ for (bp = &nu->bp[start_sel + 1], a = start_sel + 1; a < nu->pntsu; a++, bp++) {
+ if ((bp->f1 & SELECT) == 0) {
break;
}
end_sel = a;
@@ -2333,35 +2327,35 @@ static int smooth_radius_exec(bContext *C, wmOperator *UNUSED(op))
if (start_sel == end_sel) {
/* simple, only 1 point selected */
- if (start_sel>0) start_rad = (nu->bp+start_sel-1)->radius;
- if (end_sel!=-1 && end_sel < nu->pntsu) end_rad = (nu->bp+start_sel+1)->radius;
+ if (start_sel > 0) start_rad = nu->bp[start_sel - 1].radius;
+ if (end_sel != -1 && end_sel < nu->pntsu) end_rad = nu->bp[start_sel + 1].radius;
- if (start_rad >= 0.0f && end_rad >= 0.0f) (nu->bp+start_sel)->radius = (start_rad + end_rad)/2;
- else if (start_rad >= 0.0f) (nu->bp+start_sel)->radius = start_rad;
- else if (end_rad >= 0.0f) (nu->bp+start_sel)->radius = end_rad;
+ if (start_rad >= 0.0f && end_rad >= 0.0f) nu->bp[start_sel].radius = (start_rad + end_rad) / 2;
+ else if (start_rad >= 0.0f) nu->bp[start_sel].radius = start_rad;
+ else if (end_rad >= 0.0f) nu->bp[start_sel].radius = end_rad;
}
else {
/* if endpoints selected, then use them */
- if (start_sel==0) {
- start_rad = (nu->bp+start_sel)->radius;
+ if (start_sel == 0) {
+ start_rad = nu->bp[start_sel].radius;
start_sel++; /* we don't want to edit the selected endpoint */
}
else {
- start_rad = (nu->bp+start_sel-1)->radius;
+ start_rad = nu->bp[start_sel - 1].radius;
}
- if (end_sel==nu->pntsu-1) {
- end_rad = (nu->bp+end_sel)->radius;
+ if (end_sel == nu->pntsu - 1) {
+ end_rad = nu->bp[end_sel].radius;
end_sel--; /* we don't want to edit the selected endpoint */
}
else {
- end_rad = (nu->bp+end_sel+1)->radius;
+ end_rad = nu->bp[end_sel + 1].radius;
}
/* Now Blend between the points */
range = (float)(end_sel - start_sel) + 2.0f;
- for (bp=nu->bp+start_sel, a=start_sel; a<=end_sel; a++, bp++) {
- fac = (float)(1+a-start_sel) / range;
- bp->radius = start_rad*(1.0f-fac) + end_rad*fac;
+ for (bp = &nu->bp[start_sel], a = start_sel; a <= end_sel; a++, bp++) {
+ fac = (float)(1 + a - start_sel) / range;
+ bp->radius = start_rad * (1.0f - fac) + end_rad * fac;
}
}
}
@@ -2369,7 +2363,7 @@ static int smooth_radius_exec(bContext *C, wmOperator *UNUSED(op))
}
}
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
DAG_id_tag_update(obedit->data, 0);
return OPERATOR_FINISHED;
@@ -2387,14 +2381,14 @@ void CURVE_OT_smooth_radius(wmOperatorType *ot)
ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/***************** selection utility *************************/
-/* next == 1 -> select next */
-/* next == -1 -> select previous */
-/* cont == 1 -> select continuously */
+/* next == 1 -> select next */
+/* next == -1 -> select previous */
+/* cont == 1 -> select continuously */
/* selstatus, inverts behavior */
static void select_adjacent_cp(ListBase *editnurb, short next, short cont, short selstatus)
{
@@ -2402,52 +2396,52 @@ static void select_adjacent_cp(ListBase *editnurb, short next, short cont, short
BezTriple *bezt;
BPoint *bp;
int a;
- short lastsel= 0;
+ short lastsel = 0;
- if (next==0) return;
+ if (next == 0) return;
- for (nu= editnurb->first; nu; nu= nu->next) {
- lastsel=0;
+ for (nu = editnurb->first; nu; nu = nu->next) {
+ lastsel = 0;
if (nu->type == CU_BEZIER) {
- a= nu->pntsu;
- bezt= nu->bezt;
- if (next < 0) bezt= (nu->bezt + (a-1));
+ a = nu->pntsu;
+ bezt = nu->bezt;
+ if (next < 0) bezt = &nu->bezt[a - 1];
while (a--) {
- if (a-abs(next) < 0) break;
- if ((lastsel==0) && (bezt->hide==0) && ((bezt->f2 & SELECT) || (selstatus==0))) {
- bezt+=next;
- if (!(bezt->f2 & SELECT) || (selstatus==0)) {
- short sel= select_beztriple(bezt, selstatus, 1, VISIBLE);
- if ((sel==1) && (cont==0)) lastsel= 1;
+ if (a - abs(next) < 0) break;
+ if ((lastsel == 0) && (bezt->hide == 0) && ((bezt->f2 & SELECT) || (selstatus == 0))) {
+ bezt += next;
+ if (!(bezt->f2 & SELECT) || (selstatus == 0)) {
+ short sel = select_beztriple(bezt, selstatus, 1, VISIBLE);
+ if ((sel == 1) && (cont == 0)) lastsel = 1;
}
}
else {
- bezt+=next;
- lastsel= 0;
+ bezt += next;
+ lastsel = 0;
}
/* move around in zigzag way so that we go through each */
- bezt-=(next-next/abs(next));
+ bezt -= (next - next / abs(next));
}
}
else {
- a= nu->pntsu*nu->pntsv;
- bp= nu->bp;
- if (next < 0) bp= (nu->bp + (a-1));
+ a = nu->pntsu * nu->pntsv;
+ bp = nu->bp;
+ if (next < 0) bp = &nu->bp[a - 1];
while (a--) {
- if (a-abs(next) < 0) break;
- if ((lastsel==0) && (bp->hide==0) && ((bp->f1 & SELECT) || (selstatus==0))) {
- bp+=next;
- if (!(bp->f1 & SELECT) || (selstatus==0)) {
- short sel= select_bpoint(bp, selstatus, 1, VISIBLE);
- if ((sel==1) && (cont==0)) lastsel= 1;
+ if (a - abs(next) < 0) break;
+ if ((lastsel == 0) && (bp->hide == 0) && ((bp->f1 & SELECT) || (selstatus == 0))) {
+ bp += next;
+ if (!(bp->f1 & SELECT) || (selstatus == 0)) {
+ short sel = select_bpoint(bp, selstatus, 1, VISIBLE);
+ if ((sel == 1) && (cont == 0)) lastsel = 1;
}
}
else {
- bp+=next;
- lastsel= 0;
+ bp += next;
+ lastsel = 0;
}
/* move around in zigzag way so that we go through each */
- bp-=(next-next/abs(next));
+ bp -= (next - next / abs(next));
}
}
}
@@ -2461,56 +2455,56 @@ static void select_adjacent_cp(ListBase *editnurb, short next, short cont, short
/* selstatus: selection status in case doswap is false */
void selectend_nurb(Object *obedit, short selfirst, short doswap, short selstatus)
{
- ListBase *editnurb= object_editcurve_get(obedit);
+ ListBase *editnurb = object_editcurve_get(obedit);
Nurb *nu;
BPoint *bp;
BezTriple *bezt;
Curve *cu;
int a;
- if (obedit==NULL) return;
+ if (obedit == NULL) return;
- cu= (Curve*)obedit->data;
- cu->lastsel= NULL;
+ cu = (Curve *)obedit->data;
+ cu->lastsel = NULL;
- for (nu= editnurb->first; nu; nu= nu->next) {
+ for (nu = editnurb->first; nu; nu = nu->next) {
if (nu->type == CU_BEZIER) {
- a= nu->pntsu;
+ a = nu->pntsu;
/* which point? */
- if (selfirst==0) { /* select last */
- bezt= (nu->bezt + (a-1));
+ if (selfirst == 0) { /* select last */
+ bezt = &nu->bezt[a - 1];
}
else { /* select first */
- bezt= nu->bezt;
+ bezt = nu->bezt;
}
while (a--) {
short sel;
- if (doswap) sel= swap_selection_beztriple(bezt);
- else sel= select_beztriple(bezt, selstatus, 1, VISIBLE);
+ if (doswap) sel = swap_selection_beztriple(bezt);
+ else sel = select_beztriple(bezt, selstatus, 1, VISIBLE);
- if (sel==1) break;
+ if (sel == 1) break;
}
}
else {
- a= nu->pntsu*nu->pntsv;
+ a = nu->pntsu * nu->pntsv;
/* which point? */
- if (selfirst==0) { /* select last */
- bp= (nu->bp + (a-1));
+ if (selfirst == 0) { /* select last */
+ bp = &nu->bp[a - 1];
}
else { /* select first */
- bp= nu->bp;
+ bp = nu->bp;
}
while (a--) {
if (bp->hide == 0) {
short sel;
- if (doswap) sel= swap_selection_bpoint(bp);
- else sel= select_bpoint(bp, selstatus, 1, VISIBLE);
+ if (doswap) sel = swap_selection_bpoint(bp);
+ else sel = select_bpoint(bp, selstatus, 1, VISIBLE);
- if (sel==1) break;
+ if (sel == 1) break;
}
}
}
@@ -2519,10 +2513,10 @@ void selectend_nurb(Object *obedit, short selfirst, short doswap, short selstatu
static int de_select_first_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *obedit= CTX_data_edit_object(C);
+ Object *obedit = CTX_data_edit_object(C);
selectend_nurb(obedit, FIRST, 1, DESELECT);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -2532,21 +2526,22 @@ void CURVE_OT_de_select_first(wmOperatorType *ot)
/* identifiers */
ot->name = "(De)select First";
ot->idname = "CURVE_OT_de_select_first";
+ ot->description = "(De)select first of visible part of each Nurb";
/* api cfirstbacks */
ot->exec = de_select_first_exec;
ot->poll = ED_operator_editcurve;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int de_select_last_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *obedit= CTX_data_edit_object(C);
+ Object *obedit = CTX_data_edit_object(C);
selectend_nurb(obedit, LAST, 1, DESELECT);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -2556,13 +2551,14 @@ void CURVE_OT_de_select_last(wmOperatorType *ot)
/* identifiers */
ot->name = "(De)select Last";
ot->idname = "CURVE_OT_de_select_last";
+ ot->description = "(De)select last of visible part of each Nurb";
/* api clastbacks */
ot->exec = de_select_last_exec;
ot->poll = ED_operator_editcurve;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/******************* de select all operator ***************/
@@ -2574,12 +2570,12 @@ static short nurb_has_selected_cps(ListBase *editnurb)
BPoint *bp;
int a;
- for (nu= editnurb->first; nu; nu= nu->next) {
+ for (nu = editnurb->first; nu; nu = nu->next) {
if (nu->type == CU_BEZIER) {
- a= nu->pntsu;
- bezt= nu->bezt;
+ a = nu->pntsu;
+ bezt = nu->bezt;
while (a--) {
- if (bezt->hide==0) {
+ if (bezt->hide == 0) {
if ((bezt->f1 & SELECT) ||
(bezt->f2 & SELECT) ||
(bezt->f3 & SELECT))
@@ -2591,10 +2587,10 @@ static short nurb_has_selected_cps(ListBase *editnurb)
}
}
else {
- a= nu->pntsu*nu->pntsv;
- bp= nu->bp;
+ a = nu->pntsu * nu->pntsv;
+ bp = nu->bp;
while (a--) {
- if ((bp->hide==0) && (bp->f1 & SELECT)) return 1;
+ if ((bp->hide == 0) && (bp->f1 & SELECT)) return 1;
bp++;
}
}
@@ -2605,8 +2601,8 @@ static short nurb_has_selected_cps(ListBase *editnurb)
static int de_select_all_exec(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_edit_object(C);
- ListBase *editnurb= object_editcurve_get(obedit);
+ Object *obedit = CTX_data_edit_object(C);
+ ListBase *editnurb = object_editcurve_get(obedit);
int action = RNA_enum_get(op->ptr, "action");
if (action == SEL_TOGGLE) {
@@ -2627,7 +2623,7 @@ static int de_select_all_exec(bContext *C, wmOperator *op)
break;
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -2637,13 +2633,14 @@ void CURVE_OT_select_all(wmOperatorType *ot)
/* identifiers */
ot->name = "(De)select All";
ot->idname = "CURVE_OT_select_all";
+ ot->description = "(De)select all control points";
/* api callbacks */
ot->exec = de_select_all_exec;
ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
WM_operator_properties_select_all(ot);
@@ -2653,55 +2650,55 @@ void CURVE_OT_select_all(wmOperatorType *ot)
static int hide_exec(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_edit_object(C);
- Curve *cu= obedit->data;
- ListBase *editnurb= object_editcurve_get(obedit);
+ Object *obedit = CTX_data_edit_object(C);
+ Curve *cu = obedit->data;
+ ListBase *editnurb = object_editcurve_get(obedit);
Nurb *nu;
BPoint *bp;
BezTriple *bezt;
- int a, sel, invert= RNA_boolean_get(op->ptr, "unselected");
+ int a, sel, invert = RNA_boolean_get(op->ptr, "unselected");
- for (nu= editnurb->first; nu; nu= nu->next) {
+ for (nu = editnurb->first; nu; nu = nu->next) {
if (nu->type == CU_BEZIER) {
- bezt= nu->bezt;
- a= nu->pntsu;
- sel= 0;
+ bezt = nu->bezt;
+ a = nu->pntsu;
+ sel = 0;
while (a--) {
if (invert == 0 && BEZSELECTED_HIDDENHANDLES(cu, bezt)) {
select_beztriple(bezt, DESELECT, 1, HIDDEN);
- bezt->hide= 1;
+ bezt->hide = 1;
}
else if (invert && !BEZSELECTED_HIDDENHANDLES(cu, bezt)) {
select_beztriple(bezt, DESELECT, 1, HIDDEN);
- bezt->hide= 1;
+ bezt->hide = 1;
}
if (bezt->hide) sel++;
bezt++;
}
- if (sel==nu->pntsu) nu->hide= 1;
+ if (sel == nu->pntsu) nu->hide = 1;
}
else {
- bp= nu->bp;
- a= nu->pntsu*nu->pntsv;
- sel= 0;
+ bp = nu->bp;
+ a = nu->pntsu * nu->pntsv;
+ sel = 0;
while (a--) {
- if (invert==0 && (bp->f1 & SELECT)) {
+ if (invert == 0 && (bp->f1 & SELECT)) {
select_bpoint(bp, DESELECT, 1, HIDDEN);
- bp->hide= 1;
+ bp->hide = 1;
}
- else if (invert && (bp->f1 & SELECT)==0) {
+ else if (invert && (bp->f1 & SELECT) == 0) {
select_bpoint(bp, DESELECT, 1, HIDDEN);
- bp->hide= 1;
+ bp->hide = 1;
}
if (bp->hide) sel++;
bp++;
}
- if (sel==nu->pntsu*nu->pntsv) nu->hide= 1;
+ if (sel == nu->pntsu * nu->pntsv) nu->hide = 1;
}
}
DAG_id_tag_update(obedit->data, 0);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -2711,13 +2708,14 @@ void CURVE_OT_hide(wmOperatorType *ot)
/* identifiers */
ot->name = "Hide Selected";
ot->idname = "CURVE_OT_hide";
+ ot->description = "Hide (un)selected control points";
/* api callbacks */
ot->exec = hide_exec;
ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* props */
RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected");
@@ -2727,33 +2725,33 @@ void CURVE_OT_hide(wmOperatorType *ot)
static int reveal_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *obedit= CTX_data_edit_object(C);
- ListBase *editnurb= object_editcurve_get(obedit);
+ Object *obedit = CTX_data_edit_object(C);
+ ListBase *editnurb = object_editcurve_get(obedit);
Nurb *nu;
BPoint *bp;
BezTriple *bezt;
int a;
- for (nu= editnurb->first; nu; nu= nu->next) {
- nu->hide= 0;
+ for (nu = editnurb->first; nu; nu = nu->next) {
+ nu->hide = 0;
if (nu->type == CU_BEZIER) {
- bezt= nu->bezt;
- a= nu->pntsu;
+ bezt = nu->bezt;
+ a = nu->pntsu;
while (a--) {
if (bezt->hide) {
select_beztriple(bezt, SELECT, 1, HIDDEN);
- bezt->hide= 0;
+ bezt->hide = 0;
}
bezt++;
}
}
else {
- bp= nu->bp;
- a= nu->pntsu*nu->pntsv;
+ bp = nu->bp;
+ a = nu->pntsu * nu->pntsv;
while (a--) {
if (bp->hide) {
select_bpoint(bp, SELECT, 1, HIDDEN);
- bp->hide= 0;
+ bp->hide = 0;
}
bp++;
}
@@ -2761,7 +2759,7 @@ static int reveal_exec(bContext *C, wmOperator *UNUSED(op))
}
DAG_id_tag_update(obedit->data, 0);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -2771,13 +2769,14 @@ void CURVE_OT_reveal(wmOperatorType *ot)
/* identifiers */
ot->name = "Reveal Hidden";
ot->idname = "CURVE_OT_reveal";
+ ot->description = "Show again hidden control points";
/* api callbacks */
ot->exec = reveal_exec;
ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/********************** subdivide operator *********************/
@@ -2788,8 +2787,8 @@ void CURVE_OT_reveal(wmOperatorType *ot)
*/
static void subdividenurb(Object *obedit, int number_cuts)
{
- Curve *cu= obedit->data;
- EditNurb *editnurb= cu->editnurb;
+ Curve *cu = obedit->data;
+ EditNurb *editnurb = cu->editnurb;
Nurb *nu;
BezTriple *prevbezt, *bezt, *beztnew, *beztn;
BPoint *bp, *prevbp, *bpnew, *bpn;
@@ -2799,52 +2798,51 @@ static void subdividenurb(Object *obedit, int number_cuts)
// printf("*** subdivideNurb: entering subdivide\n");
- for (nu= editnurb->nurbs.first; nu; nu= nu->next) {
- amount= 0;
+ for (nu = editnurb->nurbs.first; nu; nu = nu->next) {
+ amount = 0;
if (nu->type == CU_BEZIER) {
- /*
- * Insert a point into a 2D Bezier curve.
- * Endpoints are preserved. Otherwise, all selected and inserted points are
- * newly created. Old points are discarded.
- */
+ /*
+ * Insert a point into a 2D Bezier curve.
+ * Endpoints are preserved. Otherwise, all selected and inserted points are
+ * newly created. Old points are discarded.
+ */
/* count */
if (nu->flagu & CU_NURB_CYCLIC) {
- a= nu->pntsu;
- bezt= nu->bezt;
- prevbezt= bezt+(a-1);
+ a = nu->pntsu;
+ bezt = nu->bezt;
+ prevbezt = bezt + (a - 1);
}
else {
- a= nu->pntsu-1;
- prevbezt= nu->bezt;
- bezt= prevbezt+1;
+ a = nu->pntsu - 1;
+ prevbezt = nu->bezt;
+ bezt = prevbezt + 1;
}
while (a--) {
- if ( BEZSELECTED_HIDDENHANDLES(cu, prevbezt) && BEZSELECTED_HIDDENHANDLES(cu, bezt) ) amount+=number_cuts;
- prevbezt= bezt;
+ if (BEZSELECTED_HIDDENHANDLES(cu, prevbezt) && BEZSELECTED_HIDDENHANDLES(cu, bezt) ) amount += number_cuts;
+ prevbezt = bezt;
bezt++;
}
if (amount) {
/* insert */
- beztnew =
- (BezTriple*)MEM_mallocN((amount + nu->pntsu) * sizeof(BezTriple), "subdivNurb");
- beztn= beztnew;
+ beztnew = (BezTriple *)MEM_mallocN((amount + nu->pntsu) * sizeof(BezTriple), "subdivNurb");
+ beztn = beztnew;
if (nu->flagu & CU_NURB_CYCLIC) {
- a= nu->pntsu;
- bezt= nu->bezt;
- prevbezt= bezt+(a-1);
+ a = nu->pntsu;
+ bezt = nu->bezt;
+ prevbezt = bezt + (a - 1);
}
else {
- a= nu->pntsu-1;
- prevbezt= nu->bezt;
- bezt= prevbezt+1;
+ a = nu->pntsu - 1;
+ prevbezt = nu->bezt;
+ bezt = prevbezt + 1;
}
while (a--) {
memcpy(beztn, prevbezt, sizeof(BezTriple));
keyIndex_updateBezt(editnurb, prevbezt, beztn, 1);
beztn++;
- if ( BEZSELECTED_HIDDENHANDLES(cu, prevbezt) && BEZSELECTED_HIDDENHANDLES(cu, bezt) ) {
+ if (BEZSELECTED_HIDDENHANDLES(cu, prevbezt) && BEZSELECTED_HIDDENHANDLES(cu, bezt) ) {
float prevvec[3][3];
memcpy(prevvec, prevbezt->vec, sizeof(float) * 9);
@@ -2856,93 +2854,92 @@ static void subdividenurb(Object *obedit, int number_cuts)
/* midpoint subdividing */
interp_v3_v3v3(vec, prevvec[1], prevvec[2], factor);
- interp_v3_v3v3(vec+3, prevvec[2], bezt->vec[0], factor);
- interp_v3_v3v3(vec+6, bezt->vec[0], bezt->vec[1], factor);
+ interp_v3_v3v3(vec + 3, prevvec[2], bezt->vec[0], factor);
+ interp_v3_v3v3(vec + 6, bezt->vec[0], bezt->vec[1], factor);
- interp_v3_v3v3(vec+9, vec, vec+3, factor);
- interp_v3_v3v3(vec+12, vec+3, vec+6, factor);
+ interp_v3_v3v3(vec + 9, vec, vec + 3, factor);
+ interp_v3_v3v3(vec + 12, vec + 3, vec + 6, factor);
/* change handle of prev beztn */
- copy_v3_v3((beztn-1)->vec[2], vec);
+ copy_v3_v3((beztn - 1)->vec[2], vec);
/* new point */
- copy_v3_v3(beztn->vec[0], vec+9);
- interp_v3_v3v3(beztn->vec[1], vec+9, vec+12, factor);
- copy_v3_v3(beztn->vec[2], vec+12);
+ copy_v3_v3(beztn->vec[0], vec + 9);
+ interp_v3_v3v3(beztn->vec[1], vec + 9, vec + 12, factor);
+ copy_v3_v3(beztn->vec[2], vec + 12);
/* handle of next bezt */
- if (a==0 && i == number_cuts - 1 && (nu->flagu & CU_NURB_CYCLIC)) {copy_v3_v3(beztnew->vec[0], vec+6);}
- else {copy_v3_v3(bezt->vec[0], vec+6);}
+ if (a == 0 && i == number_cuts - 1 && (nu->flagu & CU_NURB_CYCLIC)) { copy_v3_v3(beztnew->vec[0], vec + 6); }
+ else { copy_v3_v3(bezt->vec[0], vec + 6); }
- beztn->radius = (prevbezt->radius + bezt->radius)/2;
- beztn->weight = (prevbezt->weight + bezt->weight)/2;
+ beztn->radius = (prevbezt->radius + bezt->radius) / 2;
+ beztn->weight = (prevbezt->weight + bezt->weight) / 2;
memcpy(prevvec, beztn->vec, sizeof(float) * 9);
beztn++;
}
}
- prevbezt= bezt;
+ prevbezt = bezt;
bezt++;
}
/* last point */
- if ((nu->flagu & CU_NURB_CYCLIC)==0) {
+ if ((nu->flagu & CU_NURB_CYCLIC) == 0) {
memcpy(beztn, prevbezt, sizeof(BezTriple));
keyIndex_updateBezt(editnurb, prevbezt, beztn, 1);
}
MEM_freeN(nu->bezt);
- nu->bezt= beztnew;
- nu->pntsu+= amount;
+ nu->bezt = beztnew;
+ nu->pntsu += amount;
- calchandlesNurb(nu);
+ BKE_nurb_handles_calc(nu);
}
} /* End of 'if (nu->type == CU_BEZIER)' */
- else if (nu->pntsv==1) {
- /*
- * All flat lines (ie. co-planar), except flat Nurbs. Flat NURB curves
- * are handled together with the regular NURB plane division, as it
- * should be. I split it off just now, let's see if it is
- * stable... nzc 30-5-'00
- */
+ else if (nu->pntsv == 1) {
+ /*
+ * All flat lines (ie. co-planar), except flat Nurbs. Flat NURB curves
+ * are handled together with the regular NURB plane division, as it
+ * should be. I split it off just now, let's see if it is
+ * stable... nzc 30-5-'00
+ */
/* count */
if (nu->flagu & CU_NURB_CYCLIC) {
- a= nu->pntsu;
- bp= nu->bp;
- prevbp= bp+(a-1);
+ a = nu->pntsu;
+ bp = nu->bp;
+ prevbp = bp + (a - 1);
}
else {
- a= nu->pntsu-1;
- prevbp= nu->bp;
- bp= prevbp+1;
+ a = nu->pntsu - 1;
+ prevbp = nu->bp;
+ bp = prevbp + 1;
}
while (a--) {
- if ( (bp->f1 & SELECT) && (prevbp->f1 & SELECT) ) amount+=number_cuts;
- prevbp= bp;
+ if ( (bp->f1 & SELECT) && (prevbp->f1 & SELECT) ) amount += number_cuts;
+ prevbp = bp;
bp++;
}
if (amount) {
/* insert */
- bpnew =
- (BPoint*)MEM_mallocN((amount + nu->pntsu) * sizeof(BPoint), "subdivNurb2");
- bpn= bpnew;
+ bpnew = (BPoint *)MEM_mallocN((amount + nu->pntsu) * sizeof(BPoint), "subdivNurb2");
+ bpn = bpnew;
if (nu->flagu & CU_NURB_CYCLIC) {
- a= nu->pntsu;
- bp= nu->bp;
- prevbp= bp+(a-1);
+ a = nu->pntsu;
+ bp = nu->bp;
+ prevbp = bp + (a - 1);
}
else {
- a= nu->pntsu-1;
- prevbp= nu->bp;
- bp= prevbp+1;
+ a = nu->pntsu - 1;
+ prevbp = nu->bp;
+ bp = prevbp + 1;
}
while (a--) {
memcpy(bpn, prevbp, sizeof(BPoint));
keyIndex_updateBP(editnurb, prevbp, bpn, 1);
bpn++;
- if ( (bp->f1 & SELECT) && (prevbp->f1 & SELECT) ) {
- // printf("*** subdivideNurb: insert 'linear' point\n");
+ if ((bp->f1 & SELECT) && (prevbp->f1 & SELECT)) {
+ // printf("*** subdivideNurb: insert 'linear' point\n");
for (i = 0; i < number_cuts; i++) {
factor = (float)(i + 1) / (number_cuts + 1);
@@ -2952,75 +2949,75 @@ static void subdividenurb(Object *obedit, int number_cuts)
}
}
- prevbp= bp;
+ prevbp = bp;
bp++;
}
- if ((nu->flagu & CU_NURB_CYCLIC)==0) { /* last point */
+ if ((nu->flagu & CU_NURB_CYCLIC) == 0) { /* last point */
memcpy(bpn, prevbp, sizeof(BPoint));
keyIndex_updateBP(editnurb, prevbp, bpn, 1);
}
MEM_freeN(nu->bp);
- nu->bp= bpnew;
- nu->pntsu+= amount;
+ nu->bp = bpnew;
+ nu->pntsu += amount;
if (nu->type & CU_NURBS) {
- nurbs_knot_calc_u(nu);
+ BKE_nurb_knot_calc_u(nu);
}
}
} /* End of 'else if (nu->pntsv==1)' */
else if (nu->type == CU_NURBS) {
- /* This is a very strange test ... */
- /**
- * Subdivide NURB surfaces - nzc 30-5-'00 -
- *
- * Subdivision of a NURB curve can be effected by adding a
- * control point (insertion of a knot), or by raising the
- * degree of the functions used to build the NURB. The
- * expression
- *
- * degree = #knots - #controlpoints + 1 (J Walter piece)
- * degree = #knots - #controlpoints (Blender
- * implementation)
- * ( this is confusing.... what is true? Another concern
- * is that the JW piece allows the curve to become
- * explicitly 1st order derivative discontinuous, while
- * this is not what we want here... )
- *
- * is an invariant for a single NURB curve. Raising the degree
- * of the NURB is done elsewhere; the degree is assumed
- * constant during this operation. Degree is a property shared
- * by all controlpoints in a curve (even though it is stored
- * per control point - this can be misleading).
- * Adding a knot is done by searching for the place in the
- * knot vector where a certain knot value must be inserted, or
- * by picking an appropriate knot value between two existing
- * ones. The number of controlpoints that is influenced by the
- * insertion depends on the order of the curve. A certain
- * minimum number of knots is needed to form high-order
- * curves, as can be seen from the equation above. In Blender,
- * currently NURBs may be up to 6th order, so we modify at
- * most 6 points. One point is added. For an n-degree curve,
- * n points are discarded, and n+1 points inserted
- * (so effectively, n points are modified). (that holds for
- * the JW piece, but it seems not for our NURBs)
- * In practice, the knot spacing is copied, but the tail
- * (the points following the insertion point) need to be
- * offset to keep the knot series ascending. The knot series
- * is always a series of monotonically ascending integers in
- * Blender. When not enough control points are available to
- * fit the order, duplicates of the endpoints are added as
- * needed.
- */
+ /* This is a very strange test ... */
+ /**
+ * Subdivide NURB surfaces - nzc 30-5-'00 -
+ *
+ * Subdivision of a NURB curve can be effected by adding a
+ * control point (insertion of a knot), or by raising the
+ * degree of the functions used to build the NURB. The
+ * expression
+ *
+ * degree = #knots - #controlpoints + 1 (J Walter piece)
+ * degree = #knots - #controlpoints (Blender
+ * implementation)
+ * ( this is confusing.... what is true? Another concern
+ * is that the JW piece allows the curve to become
+ * explicitly 1st order derivative discontinuous, while
+ * this is not what we want here... )
+ *
+ * is an invariant for a single NURB curve. Raising the degree
+ * of the NURB is done elsewhere; the degree is assumed
+ * constant during this operation. Degree is a property shared
+ * by all controlpoints in a curve (even though it is stored
+ * per control point - this can be misleading).
+ * Adding a knot is done by searching for the place in the
+ * knot vector where a certain knot value must be inserted, or
+ * by picking an appropriate knot value between two existing
+ * ones. The number of controlpoints that is influenced by the
+ * insertion depends on the order of the curve. A certain
+ * minimum number of knots is needed to form high-order
+ * curves, as can be seen from the equation above. In Blender,
+ * currently NURBs may be up to 6th order, so we modify at
+ * most 6 points. One point is added. For an n-degree curve,
+ * n points are discarded, and n+1 points inserted
+ * (so effectively, n points are modified). (that holds for
+ * the JW piece, but it seems not for our NURBs)
+ * In practice, the knot spacing is copied, but the tail
+ * (the points following the insertion point) need to be
+ * offset to keep the knot series ascending. The knot series
+ * is always a series of monotonically ascending integers in
+ * Blender. When not enough control points are available to
+ * fit the order, duplicates of the endpoints are added as
+ * needed.
+ */
/* selection-arrays */
- usel= MEM_callocN(sizeof(int)*nu->pntsu, "subivideNurb3");
- vsel= MEM_callocN(sizeof(int)*nu->pntsv, "subivideNurb3");
- sel= 0;
-
- /* Count the number of selected points. */
- bp= nu->bp;
- for (a=0; a<nu->pntsv; a++) {
- for (b=0; b<nu->pntsu; b++) {
+ usel = MEM_callocN(sizeof(int) * nu->pntsu, "subivideNurb3");
+ vsel = MEM_callocN(sizeof(int) * nu->pntsv, "subivideNurb3");
+ sel = 0;
+
+ /* Count the number of selected points. */
+ bp = nu->bp;
+ for (a = 0; a < nu->pntsv; a++) {
+ for (b = 0; b < nu->pntsu; b++) {
if (bp->f1 & SELECT) {
usel[b]++;
vsel[a]++;
@@ -3029,48 +3026,48 @@ static void subdividenurb(Object *obedit, int number_cuts)
bp++;
}
}
- if ( sel == (nu->pntsu*nu->pntsv) ) { /* subdivide entire nurb */
+ if (sel == (nu->pntsu * nu->pntsv) ) { /* subdivide entire nurb */
/* Global subdivision is a special case of partial
* subdivision. Strange it is considered separately... */
/* count of nodes (after subdivision) along U axis */
- int countu= nu->pntsu + (nu->pntsu - 1) * number_cuts;
+ int countu = nu->pntsu + (nu->pntsu - 1) * number_cuts;
/* total count of nodes after subdivision */
- int tot= ((number_cuts+1)*nu->pntsu-number_cuts)*((number_cuts+1)*nu->pntsv-number_cuts);
+ int tot = ((number_cuts + 1) * nu->pntsu - number_cuts) * ((number_cuts + 1) * nu->pntsv - number_cuts);
- bpn=bpnew= MEM_mallocN( tot*sizeof(BPoint), "subdivideNurb4");
- bp= nu->bp;
+ bpn = bpnew = MEM_mallocN(tot * sizeof(BPoint), "subdivideNurb4");
+ bp = nu->bp;
/* first subdivide rows */
- for (a=0; a<nu->pntsv; a++) {
- for (b=0; b<nu->pntsu; b++) {
- *bpn= *bp;
+ for (a = 0; a < nu->pntsv; a++) {
+ for (b = 0; b < nu->pntsu; b++) {
+ *bpn = *bp;
keyIndex_updateBP(editnurb, bp, bpn, 1);
bpn++;
bp++;
- if (b<nu->pntsu-1) {
- prevbp= bp-1;
+ if (b < nu->pntsu - 1) {
+ prevbp = bp - 1;
for (i = 0; i < number_cuts; i++) {
factor = (float)(i + 1) / (number_cuts + 1);
- *bpn= *bp;
+ *bpn = *bp;
interp_v4_v4v4(bpn->vec, prevbp->vec, bp->vec, factor);
bpn++;
}
}
}
- bpn+= number_cuts * countu;
+ bpn += number_cuts * countu;
}
/* now insert new */
- bpn= bpnew+((number_cuts+1)*nu->pntsu - number_cuts);
- bp= bpnew+(number_cuts+1)*((number_cuts+1)*nu->pntsu-number_cuts);
- prevbp= bpnew;
- for (a=1; a<nu->pntsv; a++) {
+ bpn = bpnew + ((number_cuts + 1) * nu->pntsu - number_cuts);
+ bp = bpnew + (number_cuts + 1) * ((number_cuts + 1) * nu->pntsu - number_cuts);
+ prevbp = bpnew;
+ for (a = 1; a < nu->pntsv; a++) {
- for (b=0; b<(number_cuts+1)*nu->pntsu-number_cuts; b++) {
- BPoint *tmp= bpn;
+ for (b = 0; b < (number_cuts + 1) * nu->pntsu - number_cuts; b++) {
+ BPoint *tmp = bpn;
for (i = 0; i < number_cuts; i++) {
factor = (float)(i + 1) / (number_cuts + 1);
- *tmp= *bp;
+ *tmp = *bp;
interp_v4_v4v4(tmp->vec, prevbp->vec, bp->vec, factor);
tmp += countu;
}
@@ -3078,81 +3075,81 @@ static void subdividenurb(Object *obedit, int number_cuts)
prevbp++;
bpn++;
}
- bp+= number_cuts * countu;
- bpn+= number_cuts * countu;
- prevbp+= number_cuts * countu;
+ bp += number_cuts * countu;
+ bpn += number_cuts * countu;
+ prevbp += number_cuts * countu;
}
MEM_freeN(nu->bp);
- nu->bp= bpnew;
- nu->pntsu= (number_cuts+1)*nu->pntsu-number_cuts;
- nu->pntsv= (number_cuts+1)*nu->pntsv-number_cuts;
- nurbs_knot_calc_u(nu);
- nurbs_knot_calc_v(nu);
+ nu->bp = bpnew;
+ nu->pntsu = (number_cuts + 1) * nu->pntsu - number_cuts;
+ nu->pntsv = (number_cuts + 1) * nu->pntsv - number_cuts;
+ BKE_nurb_knot_calc_u(nu);
+ BKE_nurb_knot_calc_v(nu);
} /* End of 'if (sel== nu->pntsu*nu->pntsv)' (subdivide entire NURB) */
else {
/* subdivide in v direction? */
- sel= 0;
- for (a=0; a<nu->pntsv-1; a++) {
- if (vsel[a]==nu->pntsu && vsel[a+1]==nu->pntsu) sel+=number_cuts;
+ sel = 0;
+ for (a = 0; a < nu->pntsv - 1; a++) {
+ if (vsel[a] == nu->pntsu && vsel[a + 1] == nu->pntsu) sel += number_cuts;
}
if (sel) { /* V ! */
- bpn=bpnew= MEM_mallocN( (sel+nu->pntsv)*nu->pntsu*sizeof(BPoint), "subdivideNurb4");
- bp= nu->bp;
- for (a=0; a<nu->pntsv; a++) {
- for (b=0; b<nu->pntsu; b++) {
- *bpn= *bp;
+ bpn = bpnew = MEM_mallocN((sel + nu->pntsv) * nu->pntsu * sizeof(BPoint), "subdivideNurb4");
+ bp = nu->bp;
+ for (a = 0; a < nu->pntsv; a++) {
+ for (b = 0; b < nu->pntsu; b++) {
+ *bpn = *bp;
keyIndex_updateBP(editnurb, bp, bpn, 1);
bpn++;
bp++;
}
- if ( (a<nu->pntsv-1) && vsel[a]==nu->pntsu && vsel[a+1]==nu->pntsu ) {
+ if ( (a < nu->pntsv - 1) && vsel[a] == nu->pntsu && vsel[a + 1] == nu->pntsu) {
for (i = 0; i < number_cuts; i++) {
factor = (float)(i + 1) / (number_cuts + 1);
- prevbp= bp- nu->pntsu;
- for (b=0; b<nu->pntsu; b++) {
- /*
- * This simple bisection must be replaces by a
- * subtle resampling of a number of points. Our
- * task is made slightly easier because each
- * point in our curve is a separate data
- * node. (is it?)
- */
- *bpn= *prevbp;
- interp_v4_v4v4(bpn->vec, prevbp->vec, bp->vec, factor);
- bpn++;
+ prevbp = bp - nu->pntsu;
+ for (b = 0; b < nu->pntsu; b++) {
+ /*
+ * This simple bisection must be replaces by a
+ * subtle resampling of a number of points. Our
+ * task is made slightly easier because each
+ * point in our curve is a separate data
+ * node. (is it?)
+ */
+ *bpn = *prevbp;
+ interp_v4_v4v4(bpn->vec, prevbp->vec, bp->vec, factor);
+ bpn++;
prevbp++;
bp++;
}
- bp-= nu->pntsu;
+ bp -= nu->pntsu;
}
}
}
MEM_freeN(nu->bp);
- nu->bp= bpnew;
- nu->pntsv+= sel;
- nurbs_knot_calc_v(nu);
+ nu->bp = bpnew;
+ nu->pntsv += sel;
+ BKE_nurb_knot_calc_v(nu);
}
else {
/* or in u direction? */
- sel= 0;
- for (a=0; a<nu->pntsu-1; a++) {
- if (usel[a]==nu->pntsv && usel[a+1]==nu->pntsv) sel+=number_cuts;
+ sel = 0;
+ for (a = 0; a < nu->pntsu - 1; a++) {
+ if (usel[a] == nu->pntsv && usel[a + 1] == nu->pntsv) sel += number_cuts;
}
- if (sel) { /* U ! */
- /* Inserting U points is sort of 'default' Flat curves only get */
- /* U points inserted in them. */
- bpn=bpnew= MEM_mallocN( (sel+nu->pntsu)*nu->pntsv*sizeof(BPoint), "subdivideNurb4");
- bp= nu->bp;
- for (a=0; a<nu->pntsv; a++) {
- for (b=0; b<nu->pntsu; b++) {
- *bpn= *bp;
+ if (sel) { /* U ! */
+ /* Inserting U points is sort of 'default' Flat curves only get */
+ /* U points inserted in them. */
+ bpn = bpnew = MEM_mallocN((sel + nu->pntsu) * nu->pntsv * sizeof(BPoint), "subdivideNurb4");
+ bp = nu->bp;
+ for (a = 0; a < nu->pntsv; a++) {
+ for (b = 0; b < nu->pntsu; b++) {
+ *bpn = *bp;
keyIndex_updateBP(editnurb, bp, bpn, 1);
bpn++;
bp++;
- if ( (b<nu->pntsu-1) && usel[b]==nu->pntsv && usel[b+1]==nu->pntsv ) {
+ if ( (b < nu->pntsu - 1) && usel[b] == nu->pntsv && usel[b + 1] == nu->pntsv) {
/*
* One thing that bugs me here is that the
* orders of things are not the same as in
@@ -3162,18 +3159,18 @@ static void subdividenurb(Object *obedit, int number_cuts)
*/
for (i = 0; i < number_cuts; i++) {
factor = (float)(i + 1) / (number_cuts + 1);
- prevbp= bp- 1;
- *bpn= *prevbp;
- interp_v4_v4v4(bpn->vec, prevbp->vec, bp->vec, factor);
- bpn++;
+ prevbp = bp - 1;
+ *bpn = *prevbp;
+ interp_v4_v4v4(bpn->vec, prevbp->vec, bp->vec, factor);
+ bpn++;
}
}
}
}
MEM_freeN(nu->bp);
- nu->bp= bpnew;
- nu->pntsu+= sel;
- nurbs_knot_calc_u(nu); /* shift knots forward */
+ nu->bp = bpnew;
+ nu->pntsu += sel;
+ BKE_nurb_knot_calc_u(nu); /* shift knots forward */
}
}
}
@@ -3186,15 +3183,15 @@ static void subdividenurb(Object *obedit, int number_cuts)
static int subdivide_exec(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_edit_object(C);
- int number_cuts= RNA_int_get(op->ptr, "number_cuts");
+ Object *obedit = CTX_data_edit_object(C);
+ int number_cuts = RNA_int_get(op->ptr, "number_cuts");
subdividenurb(obedit, number_cuts);
if (ED_curve_updateAnimPaths(obedit->data))
- WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, obedit);
+ WM_event_add_notifier(C, NC_OBJECT | ND_KEYS, obedit);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
DAG_id_tag_update(obedit->data, 0);
return OPERATOR_FINISHED;
@@ -3214,7 +3211,7 @@ void CURVE_OT_subdivide(wmOperatorType *ot)
ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
prop = RNA_def_int(ot->srna, "number_cuts", 1, 1, INT_MAX, "Number of cuts", "", 1, 10);
/* avoid re-using last var because it can cause _very_ high poly meshes and annoy users (or worse crash) */
@@ -3234,10 +3231,10 @@ static void findnearestNurbvert__doClosest(void *userData, Nurb *nu, BPoint *bp,
flag = bp->f1;
}
else {
- if (beztindex==0) {
+ if (beztindex == 0) {
flag = bezt->f1;
}
- else if (beztindex==1) {
+ else if (beztindex == 1) {
flag = bezt->f2;
}
else {
@@ -3245,25 +3242,25 @@ static void findnearestNurbvert__doClosest(void *userData, Nurb *nu, BPoint *bp,
}
}
- temp = abs(data->mval[0]-x) + abs(data->mval[1]-y);
- if ((flag&1)==data->select) temp += 5;
- if (bezt && beztindex==1) temp += 3; /* middle points get a small disadvantage */
+ temp = abs(data->mval[0] - x) + abs(data->mval[1] - y);
+ if ((flag & 1) == data->select) temp += 5;
+ if (bezt && beztindex == 1) temp += 3; /* middle points get a small disadvantage */
- if (temp<data->dist) {
+ if (temp < data->dist) {
data->dist = temp;
data->bp = bp;
data->bezt = bezt;
data->nurb = nu;
- data->hpoint = bezt?beztindex:0;
+ data->hpoint = bezt ? beztindex : 0;
}
}
static short findnearestNurbvert(ViewContext *vc, short sel, const int mval[2], Nurb **nurb, BezTriple **bezt, BPoint **bp)
{
- /* sel==1: selected gets a disadvantage */
- /* in nurb and bezt or bp the nearest is written */
- /* return 0 1 2: handlepunt */
+ /* sel==1: selected gets a disadvantage */
+ /* in nurb and bezt or bp the nearest is written */
+ /* return 0 1 2: handlepunt */
struct { BPoint *bp; BezTriple *bezt; Nurb *nurb; int dist, hpoint, select, mval[2]; } data = {NULL};
data.dist = 100;
@@ -3291,51 +3288,51 @@ static void findselectedNurbvert(ListBase *editnurb, Nurb **nu, BezTriple **bezt
BPoint *bp1;
int a;
- *nu= NULL;
- *bezt= NULL;
- *bp= NULL;
- for (nu1= editnurb->first; nu1; nu1= nu1->next) {
+ *nu = NULL;
+ *bezt = NULL;
+ *bp = NULL;
+ for (nu1 = editnurb->first; nu1; nu1 = nu1->next) {
if (nu1->type == CU_BEZIER) {
- bezt1= nu1->bezt;
- a= nu1->pntsu;
+ bezt1 = nu1->bezt;
+ a = nu1->pntsu;
while (a--) {
if ( (bezt1->f1 & SELECT) || (bezt1->f2 & SELECT) || (bezt1->f3 & SELECT) ) {
if (*nu != NULL && *nu != nu1) {
- *nu= NULL;
- *bp= NULL;
- *bezt= NULL;
+ *nu = NULL;
+ *bp = NULL;
+ *bezt = NULL;
return;
}
else if (*bezt || *bp) {
- *bp= NULL;
- *bezt= NULL;
+ *bp = NULL;
+ *bezt = NULL;
}
else {
- *bezt= bezt1;
- *nu= nu1;
+ *bezt = bezt1;
+ *nu = nu1;
}
}
bezt1++;
}
}
else {
- bp1= nu1->bp;
- a= nu1->pntsu*nu1->pntsv;
+ bp1 = nu1->bp;
+ a = nu1->pntsu * nu1->pntsv;
while (a--) {
- if ( bp1->f1 & 1 ) {
+ if (bp1->f1 & SELECT) {
if (*nu != NULL && *nu != nu1) {
- *bp= NULL;
- *bezt= NULL;
- *nu= NULL;
+ *bp = NULL;
+ *bezt = NULL;
+ *nu = NULL;
return;
}
else if (*bezt || *bp) {
- *bp= NULL;
- *bezt= NULL;
+ *bp = NULL;
+ *bezt = NULL;
}
else {
- *bp= bp1;
- *nu= nu1;
+ *bp = bp1;
+ *nu = nu1;
}
}
bp1++;
@@ -3353,130 +3350,130 @@ static int convertspline(short type, Nurb *nu)
int a, c, nr;
if (nu->type == CU_POLY) {
- if (type==CU_BEZIER) { /* to Bezier with vecthandles */
- nr= nu->pntsu;
- bezt =
- (BezTriple*)MEM_callocN(nr * sizeof(BezTriple), "setsplinetype2");
- nu->bezt= bezt;
- a= nr;
- bp= nu->bp;
+ if (type == CU_BEZIER) { /* to Bezier with vecthandles */
+ nr = nu->pntsu;
+ bezt = (BezTriple *)MEM_callocN(nr * sizeof(BezTriple), "setsplinetype2");
+ nu->bezt = bezt;
+ a = nr;
+ bp = nu->bp;
while (a--) {
copy_v3_v3(bezt->vec[1], bp->vec);
- bezt->f1=bezt->f2=bezt->f3= bp->f1;
- bezt->h1= bezt->h2= HD_VECT;
- bezt->weight= bp->weight;
- bezt->radius= bp->radius;
+ bezt->f1 = bezt->f2 = bezt->f3 = bp->f1;
+ bezt->h1 = bezt->h2 = HD_VECT;
+ bezt->weight = bp->weight;
+ bezt->radius = bp->radius;
bp++;
bezt++;
}
MEM_freeN(nu->bp);
- nu->bp= NULL;
- nu->pntsu= nr;
+ nu->bp = NULL;
+ nu->pntsu = nr;
nu->type = CU_BEZIER;
- calchandlesNurb(nu);
+ BKE_nurb_handles_calc(nu);
}
- else if (type==CU_NURBS) {
+ else if (type == CU_NURBS) {
nu->type = CU_NURBS;
- nu->orderu= 4;
+ nu->orderu = 4;
nu->flagu &= CU_NURB_CYCLIC; /* disable all flags except for cyclic */
- nurbs_knot_calc_u(nu);
- a= nu->pntsu*nu->pntsv;
- bp= nu->bp;
+ BKE_nurb_knot_calc_u(nu);
+ a = nu->pntsu * nu->pntsv;
+ bp = nu->bp;
while (a--) {
- bp->vec[3]= 1.0;
+ bp->vec[3] = 1.0;
bp++;
}
}
}
- else if (nu->type == CU_BEZIER) { /* Bezier */
- if (type==CU_POLY || type==CU_NURBS) {
- nr= 3*nu->pntsu;
+ else if (nu->type == CU_BEZIER) { /* Bezier */
+ if (type == CU_POLY || type == CU_NURBS) {
+ nr = 3 * nu->pntsu;
nu->bp = MEM_callocN(nr * sizeof(BPoint), "setsplinetype");
- a= nu->pntsu;
- bezt= nu->bezt;
- bp= nu->bp;
+ a = nu->pntsu;
+ bezt = nu->bezt;
+ bp = nu->bp;
while (a--) {
- if (type==CU_POLY && bezt->h1==HD_VECT && bezt->h2==HD_VECT) {
+ if (type == CU_POLY && bezt->h1 == HD_VECT && bezt->h2 == HD_VECT) {
/* vector handle becomes 1 poly vertice */
copy_v3_v3(bp->vec, bezt->vec[1]);
- bp->vec[3]= 1.0;
- bp->f1= bezt->f2;
- nr-= 2;
- bp->radius= bezt->radius;
- bp->weight= bezt->weight;
+ bp->vec[3] = 1.0;
+ bp->f1 = bezt->f2;
+ nr -= 2;
+ bp->radius = bezt->radius;
+ bp->weight = bezt->weight;
bp++;
}
else {
- for (c=0;c<3;c++) {
+ for (c = 0; c < 3; c++) {
copy_v3_v3(bp->vec, bezt->vec[c]);
- bp->vec[3]= 1.0;
- if (c==0) bp->f1= bezt->f1;
- else if (c==1) bp->f1= bezt->f2;
- else bp->f1= bezt->f3;
- bp->radius= bezt->radius;
- bp->weight= bezt->weight;
+ bp->vec[3] = 1.0;
+ if (c == 0) bp->f1 = bezt->f1;
+ else if (c == 1) bp->f1 = bezt->f2;
+ else bp->f1 = bezt->f3;
+ bp->radius = bezt->radius;
+ bp->weight = bezt->weight;
bp++;
}
}
bezt++;
}
MEM_freeN(nu->bezt);
- nu->bezt= NULL;
- nu->pntsu= nr;
- nu->pntsv= 1;
- nu->orderu= 4;
- nu->orderv= 1;
+ nu->bezt = NULL;
+ nu->pntsu = nr;
+ nu->pntsv = 1;
+ nu->orderu = 4;
+ nu->orderv = 1;
nu->type = type;
-#if 0 /* UNUSED */
- if (nu->flagu & CU_NURB_CYCLIC) c= nu->orderu-1;
- else c= 0;
+#if 0 /* UNUSED */
+ if (nu->flagu & CU_NURB_CYCLIC) c = nu->orderu - 1;
+ else c = 0;
#endif
- if (type== CU_NURBS) {
+ if (type == CU_NURBS) {
nu->flagu &= CU_NURB_CYCLIC; /* disable all flags except for cyclic */
nu->flagu |= CU_NURB_BEZIER;
- nurbs_knot_calc_u(nu);
+ BKE_nurb_knot_calc_u(nu);
}
}
}
else if (nu->type == CU_NURBS) {
- if (type==CU_POLY) {
+ if (type == CU_POLY) {
nu->type = CU_POLY;
- if (nu->knotsu) MEM_freeN(nu->knotsu); /* python created nurbs have a knotsu of zero */
- nu->knotsu= NULL;
+ if (nu->knotsu) MEM_freeN(nu->knotsu); /* python created nurbs have a knotsu of zero */
+ nu->knotsu = NULL;
if (nu->knotsv) MEM_freeN(nu->knotsv);
- nu->knotsv= NULL;
+ nu->knotsv = NULL;
}
- else if (type==CU_BEZIER) { /* to Bezier */
- nr= nu->pntsu/3;
+ else if (type == CU_BEZIER) { /* to Bezier */
+ nr = nu->pntsu / 3;
- if (nr<2)
- return 1; /* conversion impossible */
+ if (nr < 2) {
+ return 1; /* conversion impossible */
+ }
else {
bezt = MEM_callocN(nr * sizeof(BezTriple), "setsplinetype2");
- nu->bezt= bezt;
- a= nr;
- bp= nu->bp;
+ nu->bezt = bezt;
+ a = nr;
+ bp = nu->bp;
while (a--) {
copy_v3_v3(bezt->vec[0], bp->vec);
- bezt->f1= bp->f1;
+ bezt->f1 = bp->f1;
bp++;
copy_v3_v3(bezt->vec[1], bp->vec);
- bezt->f2= bp->f1;
+ bezt->f2 = bp->f1;
bp++;
copy_v3_v3(bezt->vec[2], bp->vec);
- bezt->f3= bp->f1;
- bezt->radius= bp->radius;
- bezt->weight= bp->weight;
+ bezt->f3 = bp->f1;
+ bezt->radius = bp->radius;
+ bezt->weight = bp->weight;
bp++;
bezt++;
}
MEM_freeN(nu->bp);
- nu->bp= NULL;
+ nu->bp = NULL;
MEM_freeN(nu->knotsu);
- nu->knotsu= NULL;
- nu->pntsu= nr;
+ nu->knotsu = NULL;
+ nu->pntsu = nr;
nu->type = CU_BEZIER;
}
}
@@ -3492,31 +3489,31 @@ void ED_nurb_set_spline_type(Nurb *nu, int type)
static int set_spline_type_exec(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_edit_object(C);
- ListBase *editnurb= object_editcurve_get(obedit);
+ Object *obedit = CTX_data_edit_object(C);
+ ListBase *editnurb = object_editcurve_get(obedit);
Nurb *nu;
- int changed=0, type= RNA_enum_get(op->ptr, "type");
+ int changed = 0, type = RNA_enum_get(op->ptr, "type");
- if (type==CU_CARDINAL || type==CU_BSPLINE) {
+ if (type == CU_CARDINAL || type == CU_BSPLINE) {
BKE_report(op->reports, RPT_ERROR, "Not implemented yet");
return OPERATOR_CANCELLED;
}
- for (nu= editnurb->first; nu; nu= nu->next) {
+ for (nu = editnurb->first; nu; nu = nu->next) {
if (isNurbsel(nu)) {
if (convertspline(type, nu))
BKE_report(op->reports, RPT_ERROR, "No conversion possible");
else
- changed= 1;
+ changed = 1;
}
}
if (changed) {
if (ED_curve_updateAnimPaths(obedit->data))
- WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, obedit);
+ WM_event_add_notifier(C, NC_OBJECT | ND_KEYS, obedit);
DAG_id_tag_update(obedit->data, 0);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
@@ -3527,7 +3524,7 @@ static int set_spline_type_exec(bContext *C, wmOperator *op)
void CURVE_OT_spline_type_set(wmOperatorType *ot)
{
- static EnumPropertyItem type_items[]= {
+ static EnumPropertyItem type_items[] = {
{CU_POLY, "POLY", 0, "Poly", ""},
{CU_BEZIER, "BEZIER", 0, "Bezier", ""},
// {CU_CARDINAL, "CARDINAL", 0, "Cardinal", ""},
@@ -3546,7 +3543,7 @@ void CURVE_OT_spline_type_set(wmOperatorType *ot)
ot->poll = ED_operator_editcurve;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
ot->prop = RNA_def_enum(ot->srna, "type", type_items, CU_POLY, "Type", "Spline type");
@@ -3556,12 +3553,12 @@ void CURVE_OT_spline_type_set(wmOperatorType *ot)
static int set_handle_type_exec(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_edit_object(C);
- ListBase *editnurb= object_editcurve_get(obedit);
+ Object *obedit = CTX_data_edit_object(C);
+ ListBase *editnurb = object_editcurve_get(obedit);
- sethandlesNurb(editnurb, RNA_enum_get(op->ptr, "type"));
+ BKE_nurbList_handles_set(editnurb, RNA_enum_get(op->ptr, "type"));
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
DAG_id_tag_update(obedit->data, 0);
return OPERATOR_FINISHED;
@@ -3570,7 +3567,7 @@ static int set_handle_type_exec(bContext *C, wmOperator *op)
void CURVE_OT_handle_type_set(wmOperatorType *ot)
{
/* keep in sync with graphkeys_handle_type_items */
- static EnumPropertyItem editcurve_handle_type_items[]= {
+ static EnumPropertyItem editcurve_handle_type_items[] = {
{HD_AUTO, "AUTOMATIC", 0, "Automatic", ""},
{HD_VECT, "VECTOR", 0, "Vector", ""},
{5, "ALIGNED", 0, "Aligned", ""},
@@ -3589,7 +3586,7 @@ void CURVE_OT_handle_type_set(wmOperatorType *ot)
ot->poll = ED_operator_editcurve;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
ot->prop = RNA_def_enum(ot->srna, "type", editcurve_handle_type_items, 1, "Type", "Spline type");
@@ -3604,36 +3601,36 @@ static void switchdirection_knots(float *base, int tot)
float *fp1, *fp2, *tempf;
int a;
- if (base==NULL || tot==0) return;
+ if (base == NULL || tot == 0) return;
/* reverse knots */
- a= tot;
- fp1= base;
- fp2= fp1+(a-1);
- a/= 2;
- while (fp1!=fp2 && a>0) {
+ a = tot;
+ fp1 = base;
+ fp2 = fp1 + (a - 1);
+ a /= 2;
+ while (fp1 != fp2 && a > 0) {
SWAP(float, *fp1, *fp2);
a--;
fp1++;
fp2--;
}
/* and make in increasing order again */
- a= tot;
- fp1= base;
- fp2=tempf= MEM_mallocN(sizeof(float)*a, "switchdirect");
+ a = tot;
+ fp1 = base;
+ fp2 = tempf = MEM_mallocN(sizeof(float) * a, "switchdirect");
while (a--) {
- fp2[0]= fabs(fp1[1]-fp1[0]);
+ fp2[0] = fabs(fp1[1] - fp1[0]);
fp1++;
fp2++;
}
- a= tot-1;
- fp1= base;
- fp2= tempf;
- fp1[0]= 0.0;
+ a = tot - 1;
+ fp1 = base;
+ fp2 = tempf;
+ fp1[0] = 0.0;
fp1++;
while (a--) {
- fp1[0]= fp1[-1]+fp2[0];
+ fp1[0] = fp1[-1] + fp2[0];
fp1++;
fp2++;
}
@@ -3651,14 +3648,14 @@ static void rotate_direction_nurb(Nurb *nu)
SWAP(short, nu->flagu, nu->flagv);
SWAP(float *, nu->knotsu, nu->knotsv);
- switchdirection_knots(nu->knotsv, KNOTSV(nu) );
+ switchdirection_knots(nu->knotsv, KNOTSV(nu));
- temp= MEM_dupallocN(nu->bp);
- bp1= nu->bp;
- for (v=0; v<nu->pntsv; v++) {
- for (u=0; u<nu->pntsu; u++, bp1++) {
- bp2= temp + (nu->pntsu-u-1)*(nu->pntsv) + v;
- *bp1= *bp2;
+ temp = MEM_dupallocN(nu->bp);
+ bp1 = nu->bp;
+ for (v = 0; v < nu->pntsv; v++) {
+ for (u = 0; u < nu->pntsu; u++, bp1++) {
+ bp2 = temp + (nu->pntsu - u - 1) * (nu->pntsv) + v;
+ *bp1 = *bp2;
}
}
@@ -3671,8 +3668,8 @@ static int is_u_selected(Nurb *nu, int u)
int v;
/* what about resolu == 2? */
- bp= nu->bp+u;
- for (v=0; v<nu->pntsv-1; v++, bp+=nu->pntsu) {
+ bp = &nu->bp[u];
+ for (v = 0; v < nu->pntsv - 1; v++, bp += nu->pntsu) {
if (v) if (bp->f1 & SELECT) return 1;
}
@@ -3685,66 +3682,66 @@ typedef struct NurbSort {
float vec[3];
} NurbSort;
-static ListBase nsortbase= {NULL, NULL};
+static ListBase nsortbase = {NULL, NULL};
/* static NurbSort *nusmain; */ /* this var seems to go unused... at least in this file */
static void make_selection_list_nurb(ListBase *editnurb)
{
- ListBase nbase= {NULL, NULL};
+ ListBase nbase = {NULL, NULL};
NurbSort *nus, *nustest, *headdo, *taildo;
Nurb *nu;
BPoint *bp;
float dist, headdist, taildist;
int a;
- for (nu= editnurb->first; nu; nu= nu->next) {
- if ( isNurbsel(nu) ) {
+ for (nu = editnurb->first; nu; nu = nu->next) {
+ if (isNurbsel(nu)) {
- nus = (NurbSort*)MEM_callocN(sizeof(NurbSort), "sort");
+ nus = (NurbSort *)MEM_callocN(sizeof(NurbSort), "sort");
BLI_addhead(&nbase, nus);
- nus->nu= nu;
+ nus->nu = nu;
- bp= nu->bp;
- a= nu->pntsu;
+ bp = nu->bp;
+ a = nu->pntsu;
while (a--) {
add_v3_v3(nus->vec, bp->vec);
bp++;
}
- mul_v3_fl(nus->vec, 1.0f/(float)nu->pntsu);
+ mul_v3_fl(nus->vec, 1.0f / (float)nu->pntsu);
}
}
/* just add the first one */
- nus= nbase.first;
+ nus = nbase.first;
BLI_remlink(&nbase, nus);
- BLI_addtail( &nsortbase, nus);
+ BLI_addtail(&nsortbase, nus);
/* now add, either at head or tail, the closest one */
while (nbase.first) {
- headdist= taildist= 1.0e30;
- headdo= taildo= NULL;
+ headdist = taildist = 1.0e30;
+ headdo = taildo = NULL;
- nustest= nbase.first;
+ nustest = nbase.first;
while (nustest) {
- dist= len_v3v3(nustest->vec, ((NurbSort *)nsortbase.first)->vec);
+ dist = len_v3v3(nustest->vec, ((NurbSort *)nsortbase.first)->vec);
- if (dist<headdist) {
- headdist= dist;
- headdo= nustest;
+ if (dist < headdist) {
+ headdist = dist;
+ headdo = nustest;
}
- dist= len_v3v3(nustest->vec, ((NurbSort *)nsortbase.last)->vec);
+ dist = len_v3v3(nustest->vec, ((NurbSort *)nsortbase.last)->vec);
- if (dist<taildist) {
- taildist= dist;
- taildo= nustest;
+ if (dist < taildist) {
+ taildist = dist;
+ taildo = nustest;
}
- nustest= nustest->next;
+ nustest = nustest->next;
}
- if (headdist<taildist) {
+ if (headdist < taildist) {
BLI_remlink(&nbase, headdo);
BLI_addhead(&nsortbase, headdo);
}
@@ -3758,31 +3755,31 @@ static void make_selection_list_nurb(ListBase *editnurb)
static void merge_2_nurb(wmOperator *op, ListBase *editnurb, Nurb *nu1, Nurb *nu2)
{
BPoint *bp, *bp1, *bp2, *temp;
- float len1, len2;
- int origu, u, v;
+ float len1, len2;
+ int origu, u, v;
/* first nurbs will be changed to make u = resolu-1 selected */
/* 2nd nurbs will be changed to make u = 0 selected */
/* first nurbs: u = resolu-1 selected */
- if ( is_u_selected(nu1, nu1->pntsu-1) );
+ if (is_u_selected(nu1, nu1->pntsu - 1) ) ;
else {
/* For 2D curves blender uses orderv=0. It doesn't make any sense mathematically. */
/* but after rotating orderu=0 will be confusing. */
- if (nu1->orderv == 0) nu1->orderv= 1;
+ if (nu1->orderv == 0) nu1->orderv = 1;
rotate_direction_nurb(nu1);
- if ( is_u_selected(nu1, nu1->pntsu-1) );
+ if (is_u_selected(nu1, nu1->pntsu - 1)) ;
else {
rotate_direction_nurb(nu1);
- if ( is_u_selected(nu1, nu1->pntsu-1) );
+ if (is_u_selected(nu1, nu1->pntsu - 1)) ;
else {
rotate_direction_nurb(nu1);
- if ( is_u_selected(nu1, nu1->pntsu-1) );
+ if (is_u_selected(nu1, nu1->pntsu - 1)) ;
else {
/* rotate again, now its OK! */
- if (nu1->pntsv!=1) rotate_direction_nurb(nu1);
+ if (nu1->pntsv != 1) rotate_direction_nurb(nu1);
return;
}
}
@@ -3790,28 +3787,28 @@ static void merge_2_nurb(wmOperator *op, ListBase *editnurb, Nurb *nu1, Nurb *nu
}
/* 2nd nurbs: u = 0 selected */
- if ( is_u_selected(nu2, 0) );
+ if (is_u_selected(nu2, 0) ) ;
else {
- if (nu2->orderv == 0) nu2->orderv= 1;
+ if (nu2->orderv == 0) nu2->orderv = 1;
rotate_direction_nurb(nu2);
- if ( is_u_selected(nu2, 0) );
+ if (is_u_selected(nu2, 0)) ;
else {
rotate_direction_nurb(nu2);
- if ( is_u_selected(nu2, 0) );
+ if (is_u_selected(nu2, 0)) ;
else {
rotate_direction_nurb(nu2);
- if ( is_u_selected(nu2, 0) );
+ if (is_u_selected(nu2, 0)) ;
else {
/* rotate again, now its OK! */
- if (nu1->pntsu==1) rotate_direction_nurb(nu1);
- if (nu2->pntsv!=1) rotate_direction_nurb(nu2);
+ if (nu1->pntsu == 1) rotate_direction_nurb(nu1);
+ if (nu2->pntsv != 1) rotate_direction_nurb(nu2);
return;
}
}
}
}
- if ( nu1->pntsv != nu2->pntsv ) {
+ if (nu1->pntsv != nu2->pntsv) {
BKE_report(op->reports, RPT_ERROR, "Resolution doesn't match");
return;
}
@@ -3819,69 +3816,69 @@ static void merge_2_nurb(wmOperator *op, ListBase *editnurb, Nurb *nu1, Nurb *nu
/* ok, now nu1 has the rightmost column and nu2 the leftmost column selected */
/* maybe we need a 'v' flip of nu2? */
- bp1= nu1->bp+nu1->pntsu-1;
- bp2= nu2->bp;
- len1= 0.0;
+ bp1 = &nu1->bp[nu1->pntsu - 1];
+ bp2 = nu2->bp;
+ len1 = 0.0;
- for (v=0; v<nu1->pntsv; v++, bp1+=nu1->pntsu, bp2+=nu2->pntsu) {
- len1+= len_v3v3(bp1->vec, bp2->vec);
+ for (v = 0; v < nu1->pntsv; v++, bp1 += nu1->pntsu, bp2 += nu2->pntsu) {
+ len1 += len_v3v3(bp1->vec, bp2->vec);
}
- bp1= nu1->bp + nu1->pntsu-1;
- bp2= nu2->bp + nu2->pntsu*(nu2->pntsv-1);
- len2= 0.0;
+ bp1 = &nu1->bp[nu1->pntsu - 1];
+ bp2 = &nu2->bp[nu2->pntsu * (nu2->pntsv - 1)];
+ len2 = 0.0;
- for (v=0; v<nu1->pntsv; v++, bp1+=nu1->pntsu, bp2-=nu2->pntsu) {
- len2+= len_v3v3(bp1->vec, bp2->vec);
+ for (v = 0; v < nu1->pntsv; v++, bp1 += nu1->pntsu, bp2 -= nu2->pntsu) {
+ len2 += len_v3v3(bp1->vec, bp2->vec);
}
/* merge */
- origu= nu1->pntsu;
- nu1->pntsu+= nu2->pntsu;
- if (nu1->orderu<3 && nu1->orderu<nu1->pntsu) nu1->orderu++;
- if (nu1->orderv<3 && nu1->orderv<nu1->pntsv) nu1->orderv++;
- temp= nu1->bp;
- nu1->bp= MEM_mallocN(nu1->pntsu*nu1->pntsv*sizeof(BPoint), "mergeBP");
+ origu = nu1->pntsu;
+ nu1->pntsu += nu2->pntsu;
+ if (nu1->orderu < 3 && nu1->orderu < nu1->pntsu) nu1->orderu++;
+ if (nu1->orderv < 3 && nu1->orderv < nu1->pntsv) nu1->orderv++;
+ temp = nu1->bp;
+ nu1->bp = MEM_mallocN(nu1->pntsu * nu1->pntsv * sizeof(BPoint), "mergeBP");
- bp= nu1->bp;
- bp1= temp;
+ bp = nu1->bp;
+ bp1 = temp;
- for (v=0; v<nu1->pntsv; v++) {
+ for (v = 0; v < nu1->pntsv; v++) {
/* switch direction? */
- if (len1<len2) bp2= nu2->bp + v*nu2->pntsu;
- else bp2= nu2->bp + (nu1->pntsv-v-1)*nu2->pntsu;
+ if (len1 < len2) bp2 = &nu2->bp[v * nu2->pntsu];
+ else bp2 = &nu2->bp[(nu1->pntsv - v - 1) * nu2->pntsu];
- for (u=0; u<nu1->pntsu; u++, bp++) {
- if (u<origu) {
- *bp= *bp1; bp1++;
+ for (u = 0; u < nu1->pntsu; u++, bp++) {
+ if (u < origu) {
+ *bp = *bp1; bp1++;
select_bpoint(bp, SELECT, 1, HIDDEN);
}
else {
- *bp= *bp2; bp2++;
+ *bp = *bp2; bp2++;
}
}
}
if (nu1->type == CU_NURBS) {
/* merge knots */
- nurbs_knot_calc_u(nu1);
+ BKE_nurb_knot_calc_u(nu1);
/* make knots, for merged curved for example */
- nurbs_knot_calc_v(nu1);
+ BKE_nurb_knot_calc_v(nu1);
}
MEM_freeN(temp);
BLI_remlink(editnurb, nu2);
- freeNurb(nu2);
+ BKE_nurb_free(nu2);
}
static int merge_nurb(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_edit_object(C);
- ListBase *editnurb= object_editcurve_get(obedit);
+ Object *obedit = CTX_data_edit_object(C);
+ ListBase *editnurb = object_editcurve_get(obedit);
NurbSort *nus1, *nus2;
- int ok= 1;
+ int ok = 1;
make_selection_list_nurb(editnurb);
@@ -3891,25 +3888,25 @@ static int merge_nurb(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- nus1= nsortbase.first;
- nus2= nus1->next;
+ nus1 = nsortbase.first;
+ nus2 = nus1->next;
/* resolution match, to avoid uv rotations */
- if (nus1->nu->pntsv==1) {
- if (nus1->nu->pntsu==nus2->nu->pntsu || nus1->nu->pntsu==nus2->nu->pntsv);
- else ok= 0;
+ if (nus1->nu->pntsv == 1) {
+ if (nus1->nu->pntsu == nus2->nu->pntsu || nus1->nu->pntsu == nus2->nu->pntsv) ;
+ else ok = 0;
}
- else if (nus2->nu->pntsv==1) {
- if (nus2->nu->pntsu==nus1->nu->pntsu || nus2->nu->pntsu==nus1->nu->pntsv);
- else ok= 0;
+ else if (nus2->nu->pntsv == 1) {
+ if (nus2->nu->pntsu == nus1->nu->pntsu || nus2->nu->pntsu == nus1->nu->pntsv) ;
+ else ok = 0;
}
- else if ( nus1->nu->pntsu==nus2->nu->pntsu || nus1->nu->pntsv==nus2->nu->pntsv);
- else if ( nus1->nu->pntsu==nus2->nu->pntsv || nus1->nu->pntsv==nus2->nu->pntsu);
+ else if (nus1->nu->pntsu == nus2->nu->pntsu || nus1->nu->pntsv == nus2->nu->pntsv) ;
+ else if (nus1->nu->pntsu == nus2->nu->pntsv || nus1->nu->pntsv == nus2->nu->pntsu) ;
else {
- ok= 0;
+ ok = 0;
}
- if (ok==0) {
+ if (ok == 0) {
BKE_report(op->reports, RPT_ERROR, "Resolution doesn't match");
BLI_freelistN(&nsortbase);
return OPERATOR_CANCELLED;
@@ -3917,14 +3914,14 @@ static int merge_nurb(bContext *C, wmOperator *op)
while (nus2) {
merge_2_nurb(op, editnurb, nus1->nu, nus2->nu);
- nus2= nus2->next;
+ nus2 = nus2->next;
}
BLI_freelistN(&nsortbase);
set_actNurb(obedit, NULL);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
DAG_id_tag_update(obedit->data, 0);
return OPERATOR_FINISHED;
@@ -3933,91 +3930,91 @@ static int merge_nurb(bContext *C, wmOperator *op)
static int make_segment_exec(bContext *C, wmOperator *op)
{
/* joins 2 curves */
- Object *obedit= CTX_data_edit_object(C);
- Curve *cu= obedit->data;
- ListBase *nubase= object_editcurve_get(obedit);
- Nurb *nu, *nu1=NULL, *nu2=NULL;
+ Object *obedit = CTX_data_edit_object(C);
+ Curve *cu = obedit->data;
+ ListBase *nubase = object_editcurve_get(obedit);
+ Nurb *nu, *nu1 = NULL, *nu2 = NULL;
BPoint *bp;
float *fp, offset;
- int a, ok= 0;
+ int a, ok = 0;
/* first decide if this is a surface merge! */
- if (obedit->type==OB_SURF) nu= nubase->first;
- else nu= NULL;
+ if (obedit->type == OB_SURF) nu = nubase->first;
+ else nu = NULL;
while (nu) {
- if ( isNurbsel(nu) ) {
+ if (isNurbsel(nu)) {
- if (nu->pntsu>1 && nu->pntsv>1) break;
- if (isNurbsel_count(cu, nu)>1) break;
- if (isNurbsel_count(cu, nu)==1) {
+ if (nu->pntsu > 1 && nu->pntsv > 1) break;
+ if (isNurbsel_count(cu, nu) > 1) break;
+ if (isNurbsel_count(cu, nu) == 1) {
/* only 1 selected, not first or last, a little complex, but intuitive */
- if (nu->pntsv==1) {
- if ( (nu->bp->f1 & SELECT) || ((nu->bp+nu->pntsu-1)->f1 & SELECT));
+ if (nu->pntsv == 1) {
+ if ( (nu->bp->f1 & SELECT) || (nu->bp[nu->pntsu - 1].f1 & SELECT)) ;
else break;
}
}
}
- nu= nu->next;
+ nu = nu->next;
}
if (nu)
return merge_nurb(C, op);
/* find both nurbs and points, nu1 will be put behind nu2 */
- for (nu= nubase->first; nu; nu= nu->next) {
+ for (nu = nubase->first; nu; nu = nu->next) {
if (nu->pntsu == 1)
- nu->flagu&= ~CU_NURB_CYCLIC;
+ nu->flagu &= ~CU_NURB_CYCLIC;
- if ((nu->flagu & CU_NURB_CYCLIC)==0) { /* not cyclic */
+ if ((nu->flagu & CU_NURB_CYCLIC) == 0) { /* not cyclic */
if (nu->type == CU_BEZIER) {
- if (nu1==NULL) {
- if ( BEZSELECTED_HIDDENHANDLES(cu, nu->bezt) ) nu1= nu;
+ if (nu1 == NULL) {
+ if (BEZSELECTED_HIDDENHANDLES(cu, nu->bezt) ) nu1 = nu;
else {
- if ( BEZSELECTED_HIDDENHANDLES(cu, &(nu->bezt[nu->pntsu-1])) ) {
- nu1= nu;
- switchdirectionNurb(nu);
+ if (BEZSELECTED_HIDDENHANDLES(cu, &(nu->bezt[nu->pntsu - 1])) ) {
+ nu1 = nu;
+ BKE_nurb_direction_switch(nu);
keyData_switchDirectionNurb(cu, nu);
}
}
}
- else if (nu2==NULL) {
- if ( BEZSELECTED_HIDDENHANDLES(cu, nu->bezt) ) {
- nu2= nu;
- switchdirectionNurb(nu);
+ else if (nu2 == NULL) {
+ if (BEZSELECTED_HIDDENHANDLES(cu, nu->bezt) ) {
+ nu2 = nu;
+ BKE_nurb_direction_switch(nu);
keyData_switchDirectionNurb(cu, nu);
}
else {
- if ( BEZSELECTED_HIDDENHANDLES(cu, &(nu->bezt[nu->pntsu-1])) ) {
- nu2= nu;
+ if (BEZSELECTED_HIDDENHANDLES(cu, &(nu->bezt[nu->pntsu - 1])) ) {
+ nu2 = nu;
}
}
}
else break;
}
- else if (nu->pntsv==1) {
- bp= nu->bp;
- if (nu1==NULL) {
- if ( bp->f1 & SELECT) nu1= nu;
+ else if (nu->pntsv == 1) {
+ bp = nu->bp;
+ if (nu1 == NULL) {
+ if (bp->f1 & SELECT) nu1 = nu;
else {
- bp= bp+(nu->pntsu-1);
- if ( bp->f1 & SELECT ) {
- nu1= nu;
- switchdirectionNurb(nu);
+ bp = bp + (nu->pntsu - 1);
+ if (bp->f1 & SELECT) {
+ nu1 = nu;
+ BKE_nurb_direction_switch(nu);
keyData_switchDirectionNurb(cu, nu);
}
}
}
- else if (nu2==NULL) {
- if ( bp->f1 & SELECT ) {
- nu2= nu;
- switchdirectionNurb(nu);
+ else if (nu2 == NULL) {
+ if (bp->f1 & SELECT) {
+ nu2 = nu;
+ BKE_nurb_direction_switch(nu);
keyData_switchDirectionNurb(cu, nu);
}
else {
- bp= bp+(nu->pntsu-1);
- if ( bp->f1 & SELECT ) {
- nu2= nu;
+ bp = bp + (nu->pntsu - 1);
+ if (bp->f1 & SELECT) {
+ nu2 = nu;
}
}
}
@@ -4026,75 +4023,74 @@ static int make_segment_exec(bContext *C, wmOperator *op)
}
}
- if ((nu1 && nu2) && (nu1!=nu2)) {
- if ( nu1->type==nu2->type) {
+ if ((nu1 && nu2) && (nu1 != nu2)) {
+ if (nu1->type == nu2->type) {
if (nu1->type == CU_BEZIER) {
- BezTriple *bezt =
- (BezTriple*)MEM_mallocN((nu1->pntsu+nu2->pntsu) * sizeof(BezTriple), "addsegmentN");
+ BezTriple *bezt = (BezTriple *)MEM_mallocN((nu1->pntsu + nu2->pntsu) * sizeof(BezTriple), "addsegmentN");
ED_curve_beztcpy(cu->editnurb, bezt, nu2->bezt, nu2->pntsu);
- ED_curve_beztcpy(cu->editnurb, bezt+nu2->pntsu, nu1->bezt, nu1->pntsu);
+ ED_curve_beztcpy(cu->editnurb, bezt + nu2->pntsu, nu1->bezt, nu1->pntsu);
MEM_freeN(nu1->bezt);
- nu1->bezt= bezt;
- nu1->pntsu+= nu2->pntsu;
+ nu1->bezt = bezt;
+ nu1->pntsu += nu2->pntsu;
BLI_remlink(nubase, nu2);
- freeNurb(nu2); nu2= NULL;
- calchandlesNurb(nu1);
+ BKE_nurb_free(nu2); nu2 = NULL;
+ BKE_nurb_handles_calc(nu1);
}
else {
- bp =
- (BPoint*)MEM_mallocN((nu1->pntsu+nu2->pntsu) * sizeof(BPoint), "addsegmentN2");
+ bp = (BPoint *)MEM_mallocN((nu1->pntsu + nu2->pntsu) * sizeof(BPoint), "addsegmentN2");
ED_curve_bpcpy(cu->editnurb, bp, nu2->bp, nu2->pntsu);
- ED_curve_bpcpy(cu->editnurb, bp+nu2->pntsu, nu1->bp, nu1->pntsu);
+ ED_curve_bpcpy(cu->editnurb, bp + nu2->pntsu, nu1->bp, nu1->pntsu);
MEM_freeN(nu1->bp);
- nu1->bp= bp;
+ nu1->bp = bp;
- a= nu1->pntsu+nu1->orderu;
+ a = nu1->pntsu + nu1->orderu;
- nu1->pntsu+= nu2->pntsu;
+ nu1->pntsu += nu2->pntsu;
BLI_remlink(nubase, nu2);
/* now join the knots */
if (nu1->type == CU_NURBS) {
- if (nu1->knotsu==NULL) {
- nurbs_knot_calc_u(nu1);
+ if (nu1->knotsu == NULL) {
+ BKE_nurb_knot_calc_u(nu1);
}
else {
- fp= MEM_mallocN(sizeof(float)*KNOTSU(nu1), "addsegment3");
- memcpy(fp, nu1->knotsu, sizeof(float)*a);
+ fp = MEM_mallocN(sizeof(float) * KNOTSU(nu1), "addsegment3");
+ memcpy(fp, nu1->knotsu, sizeof(float) * a);
MEM_freeN(nu1->knotsu);
- nu1->knotsu= fp;
+ nu1->knotsu = fp;
- offset= nu1->knotsu[a-1] + 1.0f;
- fp= nu1->knotsu+a;
- for (a=0; a<nu2->pntsu; a++, fp++) {
+ offset = nu1->knotsu[a - 1] + 1.0f;
+ fp = nu1->knotsu + a;
+ for (a = 0; a < nu2->pntsu; a++, fp++) {
if (nu2->knotsu)
- *fp= offset+nu2->knotsu[a+1];
+ *fp = offset + nu2->knotsu[a + 1];
else
*fp = offset;
}
}
}
- freeNurb(nu2); nu2= NULL;
+ BKE_nurb_free(nu2); nu2 = NULL;
}
- set_actNurb(obedit, nu1); /* for selected */
- ok= 1;
+ set_actNurb(obedit, nu1); /* for selected */
+ ok = 1;
}
}
else if (nu1 && !nu2) {
- if (!(nu1->flagu & CU_NURB_CYCLIC) && nu1->pntsu>1) {
+ if (!(nu1->flagu & CU_NURB_CYCLIC) && nu1->pntsu > 1) {
if (nu1->type == CU_BEZIER && BEZSELECTED_HIDDENHANDLES(cu, nu1->bezt) &&
- BEZSELECTED_HIDDENHANDLES(cu, nu1->bezt+(nu1->pntsu-1))) {
- nu1->flagu|= CU_NURB_CYCLIC;
- calchandlesNurb(nu1);
- ok= 1;
+ BEZSELECTED_HIDDENHANDLES(cu, &nu1->bezt[nu1->pntsu - 1]))
+ {
+ nu1->flagu |= CU_NURB_CYCLIC;
+ BKE_nurb_handles_calc(nu1);
+ ok = 1;
}
- else if (nu1->type == CU_NURBS && nu1->bp->f1&SELECT && (nu1->bp+(nu1->pntsu-1))->f1&SELECT) {
- nu1->flagu|= CU_NURB_CYCLIC;
- nurbs_knot_calc_u(nu1);
- ok= 1;
+ else if (nu1->type == CU_NURBS && nu1->bp->f1 & SELECT && (nu1->bp[nu1->pntsu - 1].f1 & SELECT)) {
+ nu1->flagu |= CU_NURB_CYCLIC;
+ BKE_nurb_knot_calc_u(nu1);
+ ok = 1;
}
}
}
@@ -4105,9 +4101,9 @@ static int make_segment_exec(bContext *C, wmOperator *op)
}
if (ED_curve_updateAnimPaths(obedit->data))
- WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, obedit);
+ WM_event_add_notifier(C, NC_OBJECT | ND_KEYS, obedit);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
DAG_id_tag_update(obedit->data, 0);
return OPERATOR_FINISHED;
@@ -4118,73 +4114,74 @@ void CURVE_OT_make_segment(wmOperatorType *ot)
/* identifiers */
ot->name = "Make Segment";
ot->idname = "CURVE_OT_make_segment";
+ ot->description = "Join two curves by their selected ends";
/* api callbacks */
ot->exec = make_segment_exec;
ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/***************** pick select from 3d view **********************/
int mouse_nurb(bContext *C, const int mval[2], int extend)
{
- Object *obedit= CTX_data_edit_object(C);
- Curve *cu= obedit->data;
- ListBase *editnurb= object_editcurve_get(obedit);
+ Object *obedit = CTX_data_edit_object(C);
+ Curve *cu = obedit->data;
+ ListBase *editnurb = object_editcurve_get(obedit);
ViewContext vc;
Nurb *nu;
- BezTriple *bezt=NULL;
- BPoint *bp=NULL;
+ BezTriple *bezt = NULL;
+ BPoint *bp = NULL;
int location[2];
short hand;
view3d_operator_needs_opengl(C);
view3d_set_viewcontext(C, &vc);
- location[0]= mval[0];
- location[1]= mval[1];
- hand= findnearestNurbvert(&vc, 1, location, &nu, &bezt, &bp);
+ location[0] = mval[0];
+ location[1] = mval[1];
+ hand = findnearestNurbvert(&vc, 1, location, &nu, &bezt, &bp);
if (bezt || bp) {
- if (extend==0) {
+ if (extend == 0) {
setflagsNurb(editnurb, 0);
if (bezt) {
- if (hand==1) {
+ if (hand == 1) {
select_beztriple(bezt, SELECT, 1, HIDDEN);
- cu->lastsel= bezt;
+ cu->lastsel = bezt;
}
else {
- if (hand==0) bezt->f1|= SELECT;
- else bezt->f3|= SELECT;
+ if (hand == 0) bezt->f1 |= SELECT;
+ else bezt->f3 |= SELECT;
- cu->lastsel= NULL;
+ cu->lastsel = NULL;
}
}
else {
- cu->lastsel= bp;
+ cu->lastsel = bp;
select_bpoint(bp, SELECT, 1, HIDDEN);
}
}
else {
if (bezt) {
- if (hand==1) {
+ if (hand == 1) {
if (bezt->f2 & SELECT) {
select_beztriple(bezt, DESELECT, 1, HIDDEN);
if (bezt == cu->lastsel) cu->lastsel = NULL;
}
else {
select_beztriple(bezt, SELECT, 1, HIDDEN);
- cu->lastsel= bezt;
+ cu->lastsel = bezt;
}
}
- else if (hand==0) {
+ else if (hand == 0) {
bezt->f1 ^= SELECT;
}
else {
@@ -4198,16 +4195,16 @@ int mouse_nurb(bContext *C, const int mval[2], int extend)
}
else {
select_bpoint(bp, SELECT, 1, HIDDEN);
- cu->lastsel= bp;
+ cu->lastsel = bp;
}
}
}
- if (nu!=get_actNurb(obedit))
+ if (nu != get_actNurb(obedit))
set_actNurb(obedit, nu);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
return 1;
}
@@ -4221,13 +4218,13 @@ int mouse_nurb(bContext *C, const int mval[2], int extend)
*/
static int spin_nurb(float viewmat[][4], Object *obedit, float *axis, float *cent)
{
- Curve *cu= (Curve*)obedit->data;
- ListBase *editnurb= object_editcurve_get(obedit);
+ Curve *cu = (Curve *)obedit->data;
+ ListBase *editnurb = object_editcurve_get(obedit);
Nurb *nu;
- float si,phi,n[3],q[4],cmat[3][3],tmat[3][3],imat[3][3];
+ float si, phi, n[3], q[4], cmat[3][3], tmat[3][3], imat[3][3];
float bmat[3][3], rotmat[3][3], scalemat1[3][3], scalemat2[3][3];
float persmat[3][3], persinv[3][3];
- short a,ok, changed= 0;
+ short a, ok, changed = 0;
copy_m3_m4(persmat, viewmat);
invert_m3_m3(persinv, persmat);
@@ -4237,63 +4234,63 @@ static int spin_nurb(float viewmat[][4], Object *obedit, float *axis, float *cen
invert_m3_m3(imat, bmat);
normalize_v3_v3(n, axis);
-
- phi= M_PI/8.0;
- q[0]= cos(phi);
- si= sin(phi);
- q[1]= n[0]*si;
- q[2]= n[1]*si;
- q[3]= n[2]*si;
- quat_to_mat3( cmat,q);
+ /* TODO - use math func */
+ phi = M_PI / 8.0;
+ q[0] = cos(phi);
+ si = sin(phi);
+ q[1] = n[0] * si;
+ q[2] = n[1] * si;
+ q[3] = n[2] * si;
+ quat_to_mat3(cmat, q);
mul_m3_m3m3(tmat, cmat, bmat);
mul_m3_m3m3(rotmat, imat, tmat);
unit_m3(scalemat1);
- scalemat1[0][0]= M_SQRT2;
- scalemat1[1][1]= M_SQRT2;
+ scalemat1[0][0] = M_SQRT2;
+ scalemat1[1][1] = M_SQRT2;
- mul_m3_m3m3(tmat,persmat,bmat);
- mul_m3_m3m3(cmat,scalemat1,tmat);
- mul_m3_m3m3(tmat,persinv,cmat);
- mul_m3_m3m3(scalemat1,imat,tmat);
+ mul_m3_m3m3(tmat, persmat, bmat);
+ mul_m3_m3m3(cmat, scalemat1, tmat);
+ mul_m3_m3m3(tmat, persinv, cmat);
+ mul_m3_m3m3(scalemat1, imat, tmat);
unit_m3(scalemat2);
- scalemat2[0][0]/= (float)M_SQRT2;
- scalemat2[1][1]/= (float)M_SQRT2;
+ scalemat2[0][0] /= (float)M_SQRT2;
+ scalemat2[1][1] /= (float)M_SQRT2;
- mul_m3_m3m3(tmat,persmat,bmat);
- mul_m3_m3m3(cmat,scalemat2,tmat);
- mul_m3_m3m3(tmat,persinv,cmat);
- mul_m3_m3m3(scalemat2,imat,tmat);
+ mul_m3_m3m3(tmat, persmat, bmat);
+ mul_m3_m3m3(cmat, scalemat2, tmat);
+ mul_m3_m3m3(tmat, persinv, cmat);
+ mul_m3_m3m3(scalemat2, imat, tmat);
- ok= 1;
+ ok = 1;
- for (a=0;a<7;a++) {
- ok= extrudeflagNurb(cu->editnurb, 1);
+ for (a = 0; a < 7; a++) {
+ ok = extrudeflagNurb(cu->editnurb, 1);
- if (ok==0)
+ if (ok == 0)
return changed;
- changed= 1;
+ changed = 1;
rotateflagNurb(editnurb, SELECT, cent, rotmat);
- if ( (a & SELECT)==0 ) {
+ if ((a & SELECT) == 0) {
rotateflagNurb(editnurb, SELECT, cent, scalemat1);
- weightflagNurb(editnurb, SELECT, 0.25*M_SQRT2);
+ weightflagNurb(editnurb, SELECT, 0.25 * M_SQRT2);
}
else {
rotateflagNurb(editnurb, SELECT, cent, scalemat2);
- weightflagNurb(editnurb, SELECT, 4.0/M_SQRT2);
+ weightflagNurb(editnurb, SELECT, 4.0 / M_SQRT2);
}
}
if (ok) {
- for (nu= editnurb->first; nu; nu= nu->next) {
+ for (nu = editnurb->first; nu; nu = nu->next) {
if (isNurbsel(nu)) {
- nu->orderv= 4;
+ nu->orderv = 4;
nu->flagv |= CU_NURB_CYCLIC;
- nurbs_knot_calc_v(nu);
+ BKE_nurb_knot_calc_v(nu);
}
}
}
@@ -4303,8 +4300,8 @@ static int spin_nurb(float viewmat[][4], Object *obedit, float *axis, float *cen
static int spin_exec(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_edit_object(C);
- RegionView3D *rv3d= ED_view3d_context_rv3d(C);
+ Object *obedit = CTX_data_edit_object(C);
+ RegionView3D *rv3d = ED_view3d_context_rv3d(C);
float cent[3], axis[3], viewmat[4][4];
RNA_float_get_array(op->ptr, "center", cent);
@@ -4324,9 +4321,9 @@ static int spin_exec(bContext *C, wmOperator *op)
}
if (ED_curve_updateAnimPaths(obedit->data))
- WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, obedit);
+ WM_event_add_notifier(C, NC_OBJECT | ND_KEYS, obedit);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
DAG_id_tag_update(obedit->data, 0);
return OPERATOR_FINISHED;
@@ -4336,8 +4333,8 @@ static int spin_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
Scene *scene = CTX_data_scene(C);
View3D *v3d = CTX_wm_view3d(C);
- RegionView3D *rv3d= ED_view3d_context_rv3d(C);
- float axis[3]= {0.0f, 0.0f, 1.0f};
+ RegionView3D *rv3d = ED_view3d_context_rv3d(C);
+ float axis[3] = {0.0f, 0.0f, 1.0f};
if (rv3d)
copy_v3_v3(axis, rv3d->viewinv[2]);
@@ -4353,6 +4350,7 @@ void CURVE_OT_spin(wmOperatorType *ot)
/* identifiers */
ot->name = "Spin";
ot->idname = "CURVE_OT_spin";
+ ot->description = "Extrude selected boundary row around pivot point and current view axis";
/* api callbacks */
ot->exec = spin_exec;
@@ -4360,7 +4358,7 @@ void CURVE_OT_spin(wmOperatorType *ot)
ot->poll = ED_operator_editsurf;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_float_vector_xyz(ot->srna, "center", 3, NULL, -FLT_MAX, FLT_MAX, "Center", "Center in global view space", -FLT_MAX, FLT_MAX);
RNA_def_float_vector(ot->srna, "axis", 3, NULL, -1.0f, 1.0f, "Axis", "Axis in global view space", -FLT_MAX, FLT_MAX);
@@ -4370,47 +4368,47 @@ void CURVE_OT_spin(wmOperatorType *ot)
static int addvert_Nurb(bContext *C, short mode, float location[3])
{
- Object *obedit= CTX_data_edit_object(C);
- Curve *cu= (Curve*)obedit->data;
- EditNurb *editnurb= cu->editnurb;
- Nurb *nu, *newnu= NULL;
+ Object *obedit = CTX_data_edit_object(C);
+ Curve *cu = (Curve *)obedit->data;
+ EditNurb *editnurb = cu->editnurb;
+ Nurb *nu, *newnu = NULL;
BezTriple *bezt, *newbezt = NULL;
BPoint *bp, *newbp = NULL;
float imat[4][4], temp[3];
- int ok= 0;
+ int ok = 0;
BezTriple *bezt_recalc[3] = {NULL};
invert_m4_m4(imat, obedit->obmat);
findselectedNurbvert(&editnurb->nurbs, &nu, &bezt, &bp);
- if ((nu == NULL) || (nu->type==CU_BEZIER && bezt==NULL) || (nu->type!=CU_BEZIER && bp==NULL)) {
- if (mode!='e') {
+ if ((nu == NULL) || (nu->type == CU_BEZIER && bezt == NULL) || (nu->type != CU_BEZIER && bp == NULL)) {
+ if (mode != 'e') {
if (cu->actnu >= 0)
- nu= BLI_findlink(&editnurb->nurbs, cu->actnu);
+ nu = BLI_findlink(&editnurb->nurbs, cu->actnu);
- if (!nu || nu->type==CU_BEZIER) {
- newbezt= (BezTriple*)MEM_callocN(sizeof(BezTriple), "addvert_Nurb");
- newbezt->radius= 1;
- newbezt->alfa= 0;
+ if (!nu || nu->type == CU_BEZIER) {
+ newbezt = (BezTriple *)MEM_callocN(sizeof(BezTriple), "addvert_Nurb");
+ newbezt->radius = 1;
+ newbezt->alfa = 0;
BEZ_SEL(newbezt);
- newbezt->h2= newbezt->h1= HD_AUTO;
+ newbezt->h2 = newbezt->h1 = HD_AUTO;
- newnu= (Nurb*)MEM_callocN(sizeof(Nurb), "addvert_Nurb newnu");
+ newnu = (Nurb *)MEM_callocN(sizeof(Nurb), "addvert_Nurb newnu");
if (!nu) {
/* no selected segment -- create new one which is BEZIER type
* type couldn't be determined from Curve bt could be changed
* in the future, so shouldn't make much headache */
- newnu->type= CU_BEZIER;
- newnu->resolu= cu->resolu;
+ newnu->type = CU_BEZIER;
+ newnu->resolu = cu->resolu;
newnu->flag |= CU_SMOOTH;
}
else memcpy(newnu, nu, sizeof(Nurb));
BLI_addtail(&editnurb->nurbs, newnu);
set_actNurb(obedit, newnu);
- newnu->bezt= newbezt;
- newnu->pntsu= 1;
+ newnu->bezt = newbezt;
+ newnu->pntsu = 1;
temp[0] = 1;
temp[1] = 0;
@@ -4424,32 +4422,32 @@ static int addvert_Nurb(bContext *C, short mode, float location[3])
mul_m4_v3(imat, newbezt->vec[1]);
mul_m4_v3(imat, newbezt->vec[2]);
- ok= 1;
- nu= newnu;
+ ok = 1;
+ nu = newnu;
}
else if (nu->pntsv == 1) {
- newbp= (BPoint*)MEM_callocN(sizeof(BPoint), "addvert_Nurb5");
- newbp->radius= 1;
- newbp->alfa= 0;
- newbp->f1|= SELECT;
- cu->lastsel= newbp;
+ newbp = (BPoint *)MEM_callocN(sizeof(BPoint), "addvert_Nurb5");
+ newbp->radius = 1;
+ newbp->alfa = 0;
+ newbp->f1 |= SELECT;
+ cu->lastsel = newbp;
- newnu= (Nurb*)MEM_mallocN(sizeof(Nurb), "addvert_Nurb newnu");
+ newnu = (Nurb *)MEM_mallocN(sizeof(Nurb), "addvert_Nurb newnu");
memcpy(newnu, nu, sizeof(Nurb));
BLI_addtail(&editnurb->nurbs, newnu);
set_actNurb(obedit, newnu);
- newnu->bp= newbp;
- newnu->orderu= 2;
- newnu->pntsu= 1;
+ newnu->bp = newbp;
+ newnu->orderu = 2;
+ newnu->pntsu = 1;
mul_v3_m4v3(newbp->vec, imat, location);
- newbp->vec[3]= 1.0;
+ newbp->vec[3] = 1.0;
- newnu->knotsu= newnu->knotsv= NULL;
- nurbs_knot_calc_u(newnu);
+ newnu->knotsu = newnu->knotsv = NULL;
+ BKE_nurb_knot_calc_u(newnu);
- ok= 1;
- nu= newnu;
+ ok = 1;
+ nu = newnu;
}
}
@@ -4460,176 +4458,172 @@ static int addvert_Nurb(bContext *C, short mode, float location[3])
if (!ok && nu->type == CU_BEZIER) {
/* which bezpoint? */
- if (bezt== (nu->bezt+nu->pntsu-1)) { /* last */
+ if (bezt == &nu->bezt[nu->pntsu - 1]) { /* last */
BEZ_DESEL(bezt);
- newbezt =
- (BezTriple*)MEM_callocN((nu->pntsu+1) * sizeof(BezTriple), "addvert_Nurb");
+ newbezt = (BezTriple *)MEM_callocN((nu->pntsu + 1) * sizeof(BezTriple), "addvert_Nurb");
ED_curve_beztcpy(editnurb, newbezt, nu->bezt, nu->pntsu);
- *(newbezt+nu->pntsu)= *bezt;
+ newbezt[nu->pntsu] = *bezt;
copy_v3_v3(temp, bezt->vec[1]);
MEM_freeN(nu->bezt);
- nu->bezt= newbezt;
- newbezt+= nu->pntsu;
+ nu->bezt = newbezt;
+ newbezt += nu->pntsu;
BEZ_SEL(newbezt);
- cu->lastsel= newbezt;
+ cu->lastsel = newbezt;
newbezt->h1 = newbezt->h2;
- bezt= nu->bezt+nu->pntsu-1;
- ok= 1;
+ bezt = &nu->bezt[nu->pntsu - 1];
+ ok = 1;
if (nu->pntsu > 1) {
bezt_recalc[1] = newbezt;
bezt_recalc[0] = newbezt - 1;
}
}
- else if (bezt== nu->bezt) { /* first */
+ else if (bezt == nu->bezt) { /* first */
BEZ_DESEL(bezt);
- newbezt =
- (BezTriple*)MEM_callocN((nu->pntsu+1) * sizeof(BezTriple), "addvert_Nurb");
- ED_curve_beztcpy(editnurb, newbezt+1, bezt, nu->pntsu);
- *newbezt= *bezt;
+ newbezt = (BezTriple *)MEM_callocN((nu->pntsu + 1) * sizeof(BezTriple), "addvert_Nurb");
+ ED_curve_beztcpy(editnurb, newbezt + 1, bezt, nu->pntsu);
+ *newbezt = *bezt;
BEZ_SEL(newbezt);
- cu->lastsel= newbezt;
- newbezt->h2= newbezt->h1;
+ cu->lastsel = newbezt;
+ newbezt->h2 = newbezt->h1;
copy_v3_v3(temp, bezt->vec[1]);
MEM_freeN(nu->bezt);
- nu->bezt= newbezt;
- bezt= newbezt+1;
- ok= 1;
+ nu->bezt = newbezt;
+ bezt = newbezt + 1;
+ ok = 1;
if (nu->pntsu > 1) {
bezt_recalc[1] = newbezt;
bezt_recalc[2] = newbezt + 1;
}
}
- else if (mode!='e') {
+ else if (mode != 'e') {
BEZ_DESEL(bezt);
- newbezt= (BezTriple*)MEM_callocN(sizeof(BezTriple), "addvert_Nurb");
- *newbezt= *bezt;
+ newbezt = (BezTriple *)MEM_callocN(sizeof(BezTriple), "addvert_Nurb");
+ *newbezt = *bezt;
BEZ_SEL(newbezt);
- newbezt->h2= newbezt->h1;
+ newbezt->h2 = newbezt->h1;
copy_v3_v3(temp, bezt->vec[1]);
- newnu= (Nurb*)MEM_mallocN(sizeof(Nurb), "addvert_Nurb newnu");
+ newnu = (Nurb *)MEM_mallocN(sizeof(Nurb), "addvert_Nurb newnu");
memcpy(newnu, nu, sizeof(Nurb));
BLI_addtail(&editnurb->nurbs, newnu);
set_actNurb(obedit, newnu);
- newnu->bezt= newbezt;
- newnu->pntsu= 1;
+ newnu->bezt = newbezt;
+ newnu->pntsu = 1;
- cu->lastsel= newbezt;
+ cu->lastsel = newbezt;
- bezt= newbezt;
- ok= 1;
+ bezt = newbezt;
+ ok = 1;
}
- else bezt= NULL;
+ else bezt = NULL;
if (bezt) {
if (!newnu) nu->pntsu++;
- if (mode=='e') {
+ if (mode == 'e') {
copy_v3_v3(newbezt->vec[0], bezt->vec[0]);
copy_v3_v3(newbezt->vec[1], bezt->vec[1]);
copy_v3_v3(newbezt->vec[2], bezt->vec[2]);
}
else {
mul_v3_m4v3(newbezt->vec[1], imat, location);
- sub_v3_v3v3(temp, newbezt->vec[1],temp);
+ sub_v3_v3v3(temp, newbezt->vec[1], temp);
if (bezt_recalc[1]) {
const char h1 = bezt_recalc[1]->h1, h2 = bezt_recalc[1]->h2;
bezt_recalc[1]->h1 = bezt_recalc[1]->h2 = HD_AUTO;
- calchandleNurb(bezt_recalc[1], bezt_recalc[0], bezt_recalc[2], 0);
+ BKE_nurb_handle_calc(bezt_recalc[1], bezt_recalc[0], bezt_recalc[2], 0);
bezt_recalc[1]->h1 = h1;
bezt_recalc[1]->h2 = h2;
}
else {
- add_v3_v3v3(newbezt->vec[0], bezt->vec[0],temp);
- add_v3_v3v3(newbezt->vec[2], bezt->vec[2],temp);
+ add_v3_v3v3(newbezt->vec[0], bezt->vec[0], temp);
+ add_v3_v3v3(newbezt->vec[2], bezt->vec[2], temp);
}
- if (newnu) calchandlesNurb(newnu);
- else calchandlesNurb(nu);
+ if (newnu) BKE_nurb_handles_calc(newnu);
+ else BKE_nurb_handles_calc(nu);
}
}
}
- else if (!ok && nu->pntsv==1) {
+ else if (!ok && nu->pntsv == 1) {
/* which b-point? */
- if (bp== (nu->bp+nu->pntsu-1)) { /* last */
- bp->f1= 0;
- newbp =
- (BPoint*)MEM_callocN((nu->pntsu+1) * sizeof(BPoint), "addvert_Nurb4");
+ if (bp == &nu->bp[nu->pntsu - 1]) { /* last */
+ bp->f1 = 0;
+ newbp = (BPoint *)MEM_callocN((nu->pntsu + 1) * sizeof(BPoint), "addvert_Nurb4");
ED_curve_bpcpy(editnurb, newbp, nu->bp, nu->pntsu);
- *(newbp+nu->pntsu)= *bp;
+ newbp[nu->pntsu] = *bp;
MEM_freeN(nu->bp);
- nu->bp= newbp;
- newbp+= nu->pntsu;
- newbp->f1|= SELECT;
- cu->lastsel= newbp;
- bp= newbp - 1;
- ok= 1;
- }
- else if (bp== nu->bp) { /* first */
- bp->f1= 0;
- newbp =
- (BPoint*)MEM_callocN((nu->pntsu+1) * sizeof(BPoint), "addvert_Nurb3");
- ED_curve_bpcpy(editnurb, newbp+1, bp, nu->pntsu);
- *newbp= *bp;
- newbp->f1|= SELECT;
- cu->lastsel= newbp;
+ nu->bp = newbp;
+ newbp += nu->pntsu;
+ newbp->f1 |= SELECT;
+ cu->lastsel = newbp;
+ bp = newbp - 1;
+ ok = 1;
+ }
+ else if (bp == nu->bp) { /* first */
+ bp->f1 = 0;
+ newbp = (BPoint *)MEM_callocN((nu->pntsu + 1) * sizeof(BPoint), "addvert_Nurb3");
+ ED_curve_bpcpy(editnurb, newbp + 1, bp, nu->pntsu);
+ *newbp = *bp;
+ newbp->f1 |= SELECT;
+ cu->lastsel = newbp;
MEM_freeN(nu->bp);
- nu->bp= newbp;
- bp= newbp + 1;
- ok= 1;
- }
- else if (mode!='e') {
- bp->f1= 0;
- newbp= (BPoint*)MEM_callocN(sizeof(BPoint), "addvert_Nurb5");
- *newbp= *bp;
- newbp->f1|= SELECT;
- cu->lastsel= newbp;
-
- newnu= (Nurb*)MEM_mallocN(sizeof(Nurb), "addvert_Nurb newnu");
+ nu->bp = newbp;
+ bp = newbp + 1;
+ ok = 1;
+ }
+ else if (mode != 'e') {
+ bp->f1 = 0;
+ newbp = (BPoint *)MEM_callocN(sizeof(BPoint), "addvert_Nurb5");
+ *newbp = *bp;
+ newbp->f1 |= SELECT;
+ cu->lastsel = newbp;
+
+ newnu = (Nurb *)MEM_mallocN(sizeof(Nurb), "addvert_Nurb newnu");
memcpy(newnu, nu, sizeof(Nurb));
BLI_addtail(&editnurb->nurbs, newnu);
set_actNurb(obedit, newnu);
- newnu->bp= newbp;
- newnu->orderu= 2;
- newnu->pntsu= 1;
- newnu->knotsu= newnu->knotsv= NULL;
+ newnu->bp = newbp;
+ newnu->orderu = 2;
+ newnu->pntsu = 1;
+ newnu->knotsu = newnu->knotsv = NULL;
- bp= newbp;
- ok= 1;
+ bp = newbp;
+ ok = 1;
}
- else bp= NULL;
+ else bp = NULL;
if (bp) {
- if (mode=='e') {
+ if (mode == 'e') {
copy_v3_v3(newbp->vec, bp->vec);
}
else {
mul_v3_m4v3(newbp->vec, imat, location);
- newbp->vec[3]= 1.0;
+ newbp->vec[3] = 1.0;
- if (!newnu && nu->orderu<4 && nu->orderu<=nu->pntsu)
+ if (!newnu && nu->orderu < 4 && nu->orderu <= nu->pntsu)
nu->orderu++;
}
if (!newnu) {
nu->pntsu++;
- nurbs_knot_calc_u(nu);
+ BKE_nurb_knot_calc_u(nu);
}
- else nurbs_knot_calc_u(newnu);
+ else BKE_nurb_knot_calc_u(newnu);
}
}
if (ok) {
- test2DNurb(nu);
+ BKE_nurb_test2D(nu);
if (ED_curve_updateAnimPaths(obedit->data))
- WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, obedit);
+ WM_event_add_notifier(C, NC_OBJECT | ND_KEYS, obedit);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
DAG_id_tag_update(obedit->data, 0);
return OPERATOR_FINISHED;
@@ -4648,7 +4642,7 @@ static int add_vertex_exec(bContext *C, wmOperator *op)
static int add_vertex_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- RegionView3D *rv3d= CTX_wm_region_view3d(C);
+ RegionView3D *rv3d = CTX_wm_region_view3d(C);
if (rv3d && !RNA_struct_property_is_set(op->ptr, "location")) {
Curve *cu;
@@ -4661,7 +4655,7 @@ static int add_vertex_invoke(bContext *C, wmOperator *op, wmEvent *event)
view3d_set_viewcontext(C, &vc);
- cu= vc.obedit->data;
+ cu = vc.obedit->data;
findselectedNurbvert(&cu->editnurb->nurbs, &nu, &bezt, &bp);
@@ -4687,6 +4681,7 @@ void CURVE_OT_vertex_add(wmOperatorType *ot)
/* identifiers */
ot->name = "Add Vertex";
ot->idname = "CURVE_OT_vertex_add";
+ ot->description = "Add a new control point (linked to only selected end-curve one, if any)";
/* api callbacks */
ot->exec = add_vertex_exec;
@@ -4694,7 +4689,7 @@ void CURVE_OT_vertex_add(wmOperatorType *ot)
ot->poll = ED_operator_editcurve;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_float_vector_xyz(ot->srna, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", "Location to add new vertex at", -1e4, 1e4);
@@ -4704,25 +4699,25 @@ void CURVE_OT_vertex_add(wmOperatorType *ot)
static int extrude_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *obedit= CTX_data_edit_object(C);
- Curve *cu= obedit->data;
- EditNurb *editnurb= cu->editnurb;
+ Object *obedit = CTX_data_edit_object(C);
+ Curve *cu = obedit->data;
+ EditNurb *editnurb = cu->editnurb;
Nurb *nu;
/* first test: curve? */
- for (nu= editnurb->nurbs.first; nu; nu= nu->next)
- if (nu->pntsv==1 && isNurbsel_count(cu, nu)==1)
+ for (nu = editnurb->nurbs.first; nu; nu = nu->next)
+ if (nu->pntsv == 1 && isNurbsel_count(cu, nu) == 1)
break;
- if (obedit->type==OB_CURVE || nu) {
+ if (obedit->type == OB_CURVE || nu) {
addvert_Nurb(C, 'e', NULL);
}
else {
if (extrudeflagNurb(editnurb, 1)) { /* '1'= flag */
if (ED_curve_updateAnimPaths(obedit->data))
- WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, obedit);
+ WM_event_add_notifier(C, NC_OBJECT | ND_KEYS, obedit);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
DAG_id_tag_update(obedit->data, 0);
}
}
@@ -4742,7 +4737,7 @@ void CURVE_OT_extrude(wmOperatorType *ot)
ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* to give to transform */
RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, "Mode", "");
@@ -4752,21 +4747,21 @@ void CURVE_OT_extrude(wmOperatorType *ot)
static int toggle_cyclic_exec(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_edit_object(C);
- Curve *cu= obedit->data;
- ListBase *editnurb= object_editcurve_get(obedit);
+ Object *obedit = CTX_data_edit_object(C);
+ Curve *cu = obedit->data;
+ ListBase *editnurb = object_editcurve_get(obedit);
Nurb *nu;
BezTriple *bezt;
BPoint *bp;
- int a, direction= RNA_enum_get(op->ptr, "direction");
+ int a, direction = RNA_enum_get(op->ptr, "direction");
- for (nu= editnurb->first; nu; nu= nu->next) {
- if ( nu->pntsu>1 || nu->pntsv>1) {
+ for (nu = editnurb->first; nu; nu = nu->next) {
+ if (nu->pntsu > 1 || nu->pntsv > 1) {
if (nu->type == CU_POLY) {
- a= nu->pntsu;
- bp= nu->bp;
+ a = nu->pntsu;
+ bp = nu->bp;
while (a--) {
- if ( bp->f1 & SELECT ) {
+ if (bp->f1 & SELECT) {
nu->flagu ^= CU_NURB_CYCLIC;
break;
}
@@ -4774,44 +4769,44 @@ static int toggle_cyclic_exec(bContext *C, wmOperator *op)
}
}
else if (nu->type == CU_BEZIER) {
- a= nu->pntsu;
- bezt= nu->bezt;
+ a = nu->pntsu;
+ bezt = nu->bezt;
while (a--) {
- if ( BEZSELECTED_HIDDENHANDLES(cu, bezt) ) {
+ if (BEZSELECTED_HIDDENHANDLES(cu, bezt) ) {
nu->flagu ^= CU_NURB_CYCLIC;
break;
}
bezt++;
}
- calchandlesNurb(nu);
+ BKE_nurb_handles_calc(nu);
}
- else if (nu->pntsv==1 && nu->type == CU_NURBS) {
+ else if (nu->pntsv == 1 && nu->type == CU_NURBS) {
if (nu->knotsu) { /* if check_valid_nurb_u fails the knotsu can be NULL */
- a= nu->pntsu;
- bp= nu->bp;
+ a = nu->pntsu;
+ bp = nu->bp;
while (a--) {
- if ( bp->f1 & SELECT ) {
+ if (bp->f1 & SELECT) {
nu->flagu ^= CU_NURB_CYCLIC;
- nurbs_knot_calc_u(nu); /* 1==u type is ignored for cyclic curves */
+ BKE_nurb_knot_calc_u(nu); /* 1==u type is ignored for cyclic curves */
break;
}
bp++;
}
}
}
- else if (nu->type==CU_NURBS) {
- a= nu->pntsu*nu->pntsv;
- bp= nu->bp;
+ else if (nu->type == CU_NURBS) {
+ a = nu->pntsu * nu->pntsv;
+ bp = nu->bp;
while (a--) {
- if ( bp->f1 & SELECT) {
- if (direction==0 && nu->pntsu>1) {
+ if (bp->f1 & SELECT) {
+ if (direction == 0 && nu->pntsu > 1) {
nu->flagu ^= CU_NURB_CYCLIC;
- nurbs_knot_calc_u(nu); /* 1==u type is ignored for cyclic curves */
+ BKE_nurb_knot_calc_u(nu); /* 1==u type is ignored for cyclic curves */
}
- if (direction==1 && nu->pntsv>1) {
+ if (direction == 1 && nu->pntsv > 1) {
nu->flagv ^= CU_NURB_CYCLIC;
- nurbs_knot_calc_v(nu); /* 2==v type is ignored for cyclic curves */
+ BKE_nurb_knot_calc_v(nu); /* 2==v type is ignored for cyclic curves */
}
break;
}
@@ -4822,7 +4817,7 @@ static int toggle_cyclic_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
DAG_id_tag_update(obedit->data, 0);
return OPERATOR_FINISHED;
@@ -4830,18 +4825,18 @@ static int toggle_cyclic_exec(bContext *C, wmOperator *op)
static int toggle_cyclic_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
- Object *obedit= CTX_data_edit_object(C);
- ListBase *editnurb= object_editcurve_get(obedit);
+ Object *obedit = CTX_data_edit_object(C);
+ ListBase *editnurb = object_editcurve_get(obedit);
uiPopupMenu *pup;
uiLayout *layout;
Nurb *nu;
if (obedit->type == OB_SURF) {
- for (nu= editnurb->first; nu; nu= nu->next) {
- if (nu->pntsu>1 || nu->pntsv>1) {
- if (nu->type==CU_NURBS) {
- pup= uiPupMenuBegin(C, "Direction", ICON_NONE);
- layout= uiPupMenuLayout(pup);
+ for (nu = editnurb->first; nu; nu = nu->next) {
+ if (nu->pntsu > 1 || nu->pntsv > 1) {
+ if (nu->type == CU_NURBS) {
+ pup = uiPupMenuBegin(C, "Direction", ICON_NONE);
+ layout = uiPupMenuLayout(pup);
uiItemsEnumO(layout, op->type->idname, "direction");
uiPupMenuEnd(C, pup);
return OPERATOR_CANCELLED;
@@ -4855,7 +4850,7 @@ static int toggle_cyclic_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve
void CURVE_OT_cyclic_toggle(wmOperatorType *ot)
{
- static EnumPropertyItem direction_items[]= {
+ static EnumPropertyItem direction_items[] = {
{0, "CYCLIC_U", 0, "Cyclic U", ""},
{1, "CYCLIC_V", 0, "Cyclic V", ""},
{0, NULL, 0, NULL, NULL}};
@@ -4871,7 +4866,7 @@ void CURVE_OT_cyclic_toggle(wmOperatorType *ot)
ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "direction", direction_items, 0, "Direction", "Direction to make surface cyclic in");
@@ -4881,23 +4876,23 @@ void CURVE_OT_cyclic_toggle(wmOperatorType *ot)
static int select_linked_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *obedit= CTX_data_edit_object(C);
- Curve *cu= (Curve*)obedit->data;
- EditNurb *editnurb= cu->editnurb;
- ListBase *nurbs= &editnurb->nurbs;
+ Object *obedit = CTX_data_edit_object(C);
+ Curve *cu = (Curve *)obedit->data;
+ EditNurb *editnurb = cu->editnurb;
+ ListBase *nurbs = &editnurb->nurbs;
Nurb *nu;
BezTriple *bezt;
BPoint *bp;
int a;
- for (nu= nurbs->first; nu; nu= nu->next) {
+ for (nu = nurbs->first; nu; nu = nu->next) {
if (nu->type == CU_BEZIER) {
- bezt= nu->bezt;
- a= nu->pntsu;
+ bezt = nu->bezt;
+ a = nu->pntsu;
while (a--) {
if ( (bezt->f1 & SELECT) || (bezt->f2 & SELECT) || (bezt->f3 & SELECT) ) {
- a= nu->pntsu;
- bezt= nu->bezt;
+ a = nu->pntsu;
+ bezt = nu->bezt;
while (a--) {
select_beztriple(bezt, SELECT, 1, VISIBLE);
bezt++;
@@ -4908,12 +4903,12 @@ static int select_linked_exec(bContext *C, wmOperator *UNUSED(op))
}
}
else {
- bp= nu->bp;
- a= nu->pntsu*nu->pntsv;
+ bp = nu->bp;
+ a = nu->pntsu * nu->pntsv;
while (a--) {
- if ( bp->f1 & 1 ) {
- a= nu->pntsu*nu->pntsv;
- bp= nu->bp;
+ if (bp->f1 & SELECT) {
+ a = nu->pntsu * nu->pntsv;
+ bp = nu->bp;
while (a--) {
select_bpoint(bp, SELECT, 1, VISIBLE);
bp++;
@@ -4925,7 +4920,7 @@ static int select_linked_exec(bContext *C, wmOperator *UNUSED(op))
}
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -4940,6 +4935,7 @@ void CURVE_OT_select_linked(wmOperatorType *ot)
/* identifiers */
ot->name = "Select Linked All";
ot->idname = "CURVE_OT_select_linked";
+ ot->description = "Select all control points linked to active one";
/* api callbacks */
ot->exec = select_linked_exec;
@@ -4947,7 +4943,7 @@ void CURVE_OT_select_linked(wmOperatorType *ot)
ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
}
@@ -4957,14 +4953,14 @@ void CURVE_OT_select_linked(wmOperatorType *ot)
static int select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- Object *obedit= CTX_data_edit_object(C);
+ Object *obedit = CTX_data_edit_object(C);
ViewContext vc;
Nurb *nu;
BezTriple *bezt;
BPoint *bp;
int a, deselect;
- deselect= RNA_boolean_get(op->ptr, "deselect");
+ deselect = RNA_boolean_get(op->ptr, "deselect");
view3d_operator_needs_opengl(C);
view3d_set_viewcontext(C, &vc);
@@ -4972,8 +4968,8 @@ static int select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent *event
findnearestNurbvert(&vc, 1, event->mval, &nu, &bezt, &bp);
if (bezt) {
- a= nu->pntsu;
- bezt= nu->bezt;
+ a = nu->pntsu;
+ bezt = nu->bezt;
while (a--) {
if (deselect) select_beztriple(bezt, DESELECT, 1, VISIBLE);
else select_beztriple(bezt, SELECT, 1, VISIBLE);
@@ -4981,8 +4977,8 @@ static int select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent *event
}
}
else if (bp) {
- a= nu->pntsu*nu->pntsv;
- bp= nu->bp;
+ a = nu->pntsu * nu->pntsv;
+ bp = nu->bp;
while (a--) {
if (deselect) select_bpoint(bp, DESELECT, 1, VISIBLE);
else select_bpoint(bp, SELECT, 1, VISIBLE);
@@ -4990,7 +4986,7 @@ static int select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent *event
}
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -5000,13 +4996,14 @@ void CURVE_OT_select_linked_pick(wmOperatorType *ot)
/* identifiers */
ot->name = "Select Linked";
ot->idname = "CURVE_OT_select_linked_pick";
+ ot->description = "Select all control points linked to already selected ones";
/* api callbacks */
ot->invoke = select_linked_pick_invoke;
ot->poll = ED_operator_editsurfcurve_region_view3d;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "deselect", 0, "Deselect", "Deselect linked control points rather than selecting them");
@@ -5016,28 +5013,28 @@ void CURVE_OT_select_linked_pick(wmOperatorType *ot)
static int select_row_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *obedit= CTX_data_edit_object(C);
- Curve *cu= obedit->data;
- ListBase *editnurb= object_editcurve_get(obedit);
- static BPoint *last= NULL;
- static int direction=0;
+ Object *obedit = CTX_data_edit_object(C);
+ Curve *cu = obedit->data;
+ ListBase *editnurb = object_editcurve_get(obedit);
+ static BPoint *last = NULL;
+ static int direction = 0;
Nurb *nu;
BPoint *bp;
- int u = 0, v = 0, a, b, ok=0;
+ int u = 0, v = 0, a, b, ok = 0;
if (editnurb->first == NULL)
return OPERATOR_CANCELLED;
- if (cu->lastsel==NULL)
+ if (cu->lastsel == NULL)
return OPERATOR_CANCELLED;
/* find the correct nurb and toggle with u of v */
- for (nu= editnurb->first; nu; nu= nu->next) {
- bp= nu->bp;
- for (v=0; v<nu->pntsv; v++) {
- for (u=0; u<nu->pntsu; u++, bp++) {
- if (bp==cu->lastsel) {
+ for (nu = editnurb->first; nu; nu = nu->next) {
+ bp = nu->bp;
+ for (v = 0; v < nu->pntsv; v++) {
+ for (u = 0; u < nu->pntsu; u++, bp++) {
+ if (bp == cu->lastsel) {
if (bp->f1 & SELECT) {
- ok= 1;
+ ok = 1;
break;
}
}
@@ -5046,20 +5043,20 @@ static int select_row_exec(bContext *C, wmOperator *UNUSED(op))
}
if (ok) {
- if (last==cu->lastsel) {
- direction= 1-direction;
+ if (last == cu->lastsel) {
+ direction = 1 - direction;
setflagsNurb(editnurb, 0);
}
- last= cu->lastsel;
+ last = cu->lastsel;
- bp= nu->bp;
- for (a=0; a<nu->pntsv; a++) {
- for (b=0; b<nu->pntsu; b++, bp++) {
+ bp = nu->bp;
+ for (a = 0; a < nu->pntsv; a++) {
+ for (b = 0; b < nu->pntsu; b++, bp++) {
if (direction) {
- if (a==v) select_bpoint(bp, SELECT, 1, VISIBLE);
+ if (a == v) select_bpoint(bp, SELECT, 1, VISIBLE);
}
else {
- if (b==u) select_bpoint(bp, SELECT, 1, VISIBLE);
+ if (b == u) select_bpoint(bp, SELECT, 1, VISIBLE);
}
}
}
@@ -5068,7 +5065,7 @@ static int select_row_exec(bContext *C, wmOperator *UNUSED(op))
}
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -5078,24 +5075,25 @@ void CURVE_OT_select_row(wmOperatorType *ot)
/* identifiers */
ot->name = "Select Control Point Row";
ot->idname = "CURVE_OT_select_row";
+ ot->description = "Select a row of control points including active one";
/* api callbacks */
ot->exec = select_row_exec;
ot->poll = ED_operator_editsurf;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/***************** select next operator **********************/
static int select_next_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *obedit= CTX_data_edit_object(C);
- ListBase *editnurb= object_editcurve_get(obedit);
+ Object *obedit = CTX_data_edit_object(C);
+ ListBase *editnurb = object_editcurve_get(obedit);
select_adjacent_cp(editnurb, 1, 0, SELECT);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -5105,24 +5103,25 @@ void CURVE_OT_select_next(wmOperatorType *ot)
/* identifiers */
ot->name = "Select Next";
ot->idname = "CURVE_OT_select_next";
+ ot->description = "Select control points following already selected ones along the curves";
/* api callbacks */
ot->exec = select_next_exec;
ot->poll = ED_operator_editcurve;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/***************** select previous operator **********************/
static int select_previous_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *obedit= CTX_data_edit_object(C);
- ListBase *editnurb= object_editcurve_get(obedit);
+ Object *obedit = CTX_data_edit_object(C);
+ ListBase *editnurb = object_editcurve_get(obedit);
select_adjacent_cp(editnurb, -1, 0, SELECT);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -5132,64 +5131,65 @@ void CURVE_OT_select_previous(wmOperatorType *ot)
/* identifiers */
ot->name = "Select Previous";
ot->idname = "CURVE_OT_select_previous";
+ ot->description = "Select control points preceding already selected ones along the curves";
/* api callbacks */
ot->exec = select_previous_exec;
ot->poll = ED_operator_editcurve;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/***************** select more operator **********************/
static int select_more_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *obedit= CTX_data_edit_object(C);
- ListBase *editnurb= object_editcurve_get(obedit);
+ Object *obedit = CTX_data_edit_object(C);
+ ListBase *editnurb = object_editcurve_get(obedit);
Nurb *nu;
BPoint *bp, *tempbp;
int a;
- short sel= 0;
+ short sel = 0;
short *selbpoints;
/* note that NURBS surface is a special case because we mimic */
/* the behavior of "select more" of mesh tools. */
/* The algorithm is designed to work in planar cases so it */
/* may not be optimal always (example: end of NURBS sphere) */
- if (obedit->type==OB_SURF) {
- for (nu= editnurb->first; nu; nu= nu->next) {
- a= nu->pntsu*nu->pntsv;
- bp= nu->bp;
- selbpoints= MEM_callocN(sizeof(short)*a-nu->pntsu, "selectlist");
+ if (obedit->type == OB_SURF) {
+ for (nu = editnurb->first; nu; nu = nu->next) {
+ a = nu->pntsu * nu->pntsv;
+ bp = nu->bp;
+ selbpoints = MEM_callocN(sizeof(short) * a - nu->pntsu, "selectlist");
while (a > 0) {
- if ((selbpoints[a]!=1) && (bp->hide==0) && (bp->f1 & SELECT)) {
+ if ((selbpoints[a] != 1) && (bp->hide == 0) && (bp->f1 & SELECT)) {
/* upper control point */
- if (a%nu->pntsu != 0) {
- tempbp= bp-1;
+ if (a % nu->pntsu != 0) {
+ tempbp = bp - 1;
if (!(tempbp->f1 & SELECT)) select_bpoint(tempbp, SELECT, 1, VISIBLE);
}
/* left control point. select only if it is not selected already */
- if (a-nu->pntsu > 0) {
- sel= 0;
- tempbp= bp+nu->pntsu;
- if (!(tempbp->f1 & SELECT)) sel= select_bpoint(tempbp, SELECT, 1, VISIBLE);
+ if (a - nu->pntsu > 0) {
+ sel = 0;
+ tempbp = bp + nu->pntsu;
+ if (!(tempbp->f1 & SELECT)) sel = select_bpoint(tempbp, SELECT, 1, VISIBLE);
/* make sure selected bpoint is discarded */
- if (sel == 1) selbpoints[a-nu->pntsu]= 1;
+ if (sel == 1) selbpoints[a - nu->pntsu] = 1;
}
/* right control point */
- if (a+nu->pntsu < nu->pntsu*nu->pntsv) {
- tempbp= bp-nu->pntsu;
+ if (a + nu->pntsu < nu->pntsu * nu->pntsv) {
+ tempbp = bp - nu->pntsu;
if (!(tempbp->f1 & SELECT)) select_bpoint(tempbp, SELECT, 1, VISIBLE);
}
/* lower control point. skip next bp in case selection was made */
- if (a%nu->pntsu != 1) {
- sel= 0;
- tempbp= bp+1;
- if (!(tempbp->f1 & 1)) sel= select_bpoint(tempbp, SELECT, 1, VISIBLE);
+ if (a % nu->pntsu != 1) {
+ sel = 0;
+ tempbp = bp + 1;
+ if (!(tempbp->f1 & SELECT)) sel = select_bpoint(tempbp, SELECT, 1, VISIBLE);
if (sel) {
bp++;
a--;
@@ -5209,7 +5209,7 @@ static int select_more_exec(bContext *C, wmOperator *UNUSED(op))
select_adjacent_cp(editnurb, -1, 0, SELECT);
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -5219,13 +5219,14 @@ void CURVE_OT_select_more(wmOperatorType *ot)
/* identifiers */
ot->name = "Select More";
ot->idname = "CURVE_OT_select_more";
+ ot->description = "Select control points directly linked to already selected ones";
/* api callbacks */
ot->exec = select_more_exec;
ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/******************** select less operator *****************/
@@ -5233,60 +5234,60 @@ void CURVE_OT_select_more(wmOperatorType *ot)
/* basic method: deselect if control point doesn't have all neighbors selected */
static int select_less_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *obedit= CTX_data_edit_object(C);
- ListBase *editnurb= object_editcurve_get(obedit);
+ Object *obedit = CTX_data_edit_object(C);
+ ListBase *editnurb = object_editcurve_get(obedit);
Nurb *nu;
BPoint *bp;
BezTriple *bezt;
int a;
- short sel= 0, lastsel= 0;
+ short sel = 0, lastsel = 0;
short *selbpoints;
- if (obedit->type==OB_SURF) {
- for (nu= editnurb->first; nu; nu= nu->next) {
- a= nu->pntsu*nu->pntsv;
- bp= nu->bp;
- selbpoints= MEM_callocN(sizeof(short)*a, "selectlist");
+ if (obedit->type == OB_SURF) {
+ for (nu = editnurb->first; nu; nu = nu->next) {
+ a = nu->pntsu * nu->pntsv;
+ bp = nu->bp;
+ selbpoints = MEM_callocN(sizeof(short) * a, "selectlist");
while (a--) {
- if ((bp->hide==0) && (bp->f1 & SELECT)) {
- sel= 0;
+ if ((bp->hide == 0) && (bp->f1 & SELECT)) {
+ sel = 0;
/* check if neighbors have been selected */
/* edges of surface are an exception */
- if ((a+1)%nu->pntsu==0) sel++;
+ if ((a + 1) % nu->pntsu == 0) sel++;
else {
bp--;
- if ((selbpoints[a+1]==1) || ((bp->hide==0) && (bp->f1 & SELECT))) sel++;
+ if ((selbpoints[a + 1] == 1) || ((bp->hide == 0) && (bp->f1 & SELECT))) sel++;
bp++;
}
- if ((a+1)%nu->pntsu==1) sel++;
+ if ((a + 1) % nu->pntsu == 1) sel++;
else {
bp++;
- if ((bp->hide==0) && (bp->f1 & SELECT)) sel++;
+ if ((bp->hide == 0) && (bp->f1 & SELECT)) sel++;
bp--;
}
- if (a+1 > nu->pntsu*nu->pntsv-nu->pntsu) sel++;
+ if (a + 1 > nu->pntsu * nu->pntsv - nu->pntsu) sel++;
else {
- bp-=nu->pntsu;
- if ((selbpoints[a+nu->pntsu]==1) || ((bp->hide==0) && (bp->f1 & SELECT))) sel++;
- bp+=nu->pntsu;
+ bp -= nu->pntsu;
+ if ((selbpoints[a + nu->pntsu] == 1) || ((bp->hide == 0) && (bp->f1 & SELECT))) sel++;
+ bp += nu->pntsu;
}
if (a < nu->pntsu) sel++;
else {
- bp+=nu->pntsu;
- if ((bp->hide==0) && (bp->f1 & SELECT)) sel++;
- bp-=nu->pntsu;
+ bp += nu->pntsu;
+ if ((bp->hide == 0) && (bp->f1 & SELECT)) sel++;
+ bp -= nu->pntsu;
}
- if (sel!=4) {
+ if (sel != 4) {
select_bpoint(bp, DESELECT, 1, VISIBLE);
- selbpoints[a]= 1;
+ selbpoints[a] = 1;
}
}
- else lastsel= 0;
+ else lastsel = 0;
bp++;
}
@@ -5295,74 +5296,74 @@ static int select_less_exec(bContext *C, wmOperator *UNUSED(op))
}
}
else {
- for (nu= editnurb->first; nu; nu= nu->next) {
- lastsel=0;
+ for (nu = editnurb->first; nu; nu = nu->next) {
+ lastsel = 0;
/* check what type of curve/nurb it is */
if (nu->type == CU_BEZIER) {
- a= nu->pntsu;
- bezt= nu->bezt;
+ a = nu->pntsu;
+ bezt = nu->bezt;
while (a--) {
- if ((bezt->hide==0) && (bezt->f2 & SELECT)) {
- if (lastsel==1) sel= 1;
- else sel= 0;
+ if ((bezt->hide == 0) && (bezt->f2 & SELECT)) {
+ if (lastsel == 1) sel = 1;
+ else sel = 0;
/* check if neighbors have been selected */
/* first and last are exceptions */
- if (a==nu->pntsu-1) sel++;
+ if (a == nu->pntsu - 1) sel++;
else {
bezt--;
- if ((bezt->hide==0) && (bezt->f2 & SELECT)) sel++;
+ if ((bezt->hide == 0) && (bezt->f2 & SELECT)) sel++;
bezt++;
}
- if (a==0) sel++;
+ if (a == 0) sel++;
else {
bezt++;
- if ((bezt->hide==0) && (bezt->f2 & SELECT)) sel++;
+ if ((bezt->hide == 0) && (bezt->f2 & SELECT)) sel++;
bezt--;
}
- if (sel!=2) {
+ if (sel != 2) {
select_beztriple(bezt, DESELECT, 1, VISIBLE);
- lastsel= 1;
+ lastsel = 1;
}
- else lastsel= 0;
+ else lastsel = 0;
}
- else lastsel= 0;
+ else lastsel = 0;
bezt++;
}
}
else {
- a= nu->pntsu*nu->pntsv;
- bp= nu->bp;
+ a = nu->pntsu * nu->pntsv;
+ bp = nu->bp;
while (a--) {
- if ((lastsel==0) && (bp->hide==0) && (bp->f1 & SELECT)) {
- if (lastsel!=0) sel= 1;
- else sel= 0;
+ if ((lastsel == 0) && (bp->hide == 0) && (bp->f1 & SELECT)) {
+ if (lastsel != 0) sel = 1;
+ else sel = 0;
/* first and last are exceptions */
- if (a==nu->pntsu*nu->pntsv-1) sel++;
+ if (a == nu->pntsu * nu->pntsv - 1) sel++;
else {
bp--;
- if ((bp->hide==0) && (bp->f1 & SELECT)) sel++;
+ if ((bp->hide == 0) && (bp->f1 & SELECT)) sel++;
bp++;
}
- if (a==0) sel++;
+ if (a == 0) sel++;
else {
bp++;
- if ((bp->hide==0) && (bp->f1 & SELECT)) sel++;
+ if ((bp->hide == 0) && (bp->f1 & SELECT)) sel++;
bp--;
}
- if (sel!=2) {
+ if (sel != 2) {
select_bpoint(bp, DESELECT, 1, VISIBLE);
- lastsel= 1;
+ lastsel = 1;
}
- else lastsel= 0;
+ else lastsel = 0;
}
- else lastsel= 0;
+ else lastsel = 0;
bp++;
}
@@ -5370,7 +5371,7 @@ static int select_less_exec(bContext *C, wmOperator *UNUSED(op))
}
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -5380,13 +5381,14 @@ void CURVE_OT_select_less(wmOperatorType *ot)
/* identifiers */
ot->name = "Select Less";
ot->idname = "CURVE_OT_select_less";
+ ot->description = "Reduce current selection by deselecting boundary elements";
/* api callbacks */
ot->exec = select_less_exec;
ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/********************** select random *********************/
@@ -5398,12 +5400,12 @@ static void selectrandom_curve(ListBase *editnurb, float randfac)
BPoint *bp;
int a;
- BLI_srand( BLI_rand() ); /* random seed */
+ BLI_srand(BLI_rand()); /* random seed */
- for (nu= editnurb->first; nu; nu= nu->next) {
+ for (nu = editnurb->first; nu; nu = nu->next) {
if (nu->type == CU_BEZIER) {
- bezt= nu->bezt;
- a= nu->pntsu;
+ bezt = nu->bezt;
+ a = nu->pntsu;
while (a--) {
if (BLI_frand() < randfac)
select_beztriple(bezt, SELECT, 1, VISIBLE);
@@ -5411,8 +5413,8 @@ static void selectrandom_curve(ListBase *editnurb, float randfac)
}
}
else {
- bp= nu->bp;
- a= nu->pntsu*nu->pntsv;
+ bp = nu->bp;
+ a = nu->pntsu * nu->pntsv;
while (a--) {
if (BLI_frand() < randfac)
@@ -5425,15 +5427,15 @@ static void selectrandom_curve(ListBase *editnurb, float randfac)
static int select_random_exec(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_edit_object(C);
- ListBase *editnurb= object_editcurve_get(obedit);
+ Object *obedit = CTX_data_edit_object(C);
+ ListBase *editnurb = object_editcurve_get(obedit);
if (!RNA_boolean_get(op->ptr, "extend"))
CU_deselect_all(obedit);
- selectrandom_curve(editnurb, RNA_float_get(op->ptr, "percent")/100.0f);
+ selectrandom_curve(editnurb, RNA_float_get(op->ptr, "percent") / 100.0f);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -5443,13 +5445,14 @@ void CURVE_OT_select_random(wmOperatorType *ot)
/* identifiers */
ot->name = "Select Random";
ot->idname = "CURVE_OT_select_random";
+ ot->description = "Randomly select some control points";
/* api callbacks */
ot->exec = select_random_exec;
ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_float_percentage(ot->srna, "percent", 50.f, 0.0f, 100.0f, "Percent", "Percentage of elements to select randomly", 0.f, 100.0f);
@@ -5461,19 +5464,19 @@ void CURVE_OT_select_random(wmOperatorType *ot)
static int point_on_nurb(Nurb *nu, void *point)
{
if (nu->bezt) {
- BezTriple *bezt= (BezTriple*)point;
- return bezt >= nu->bezt && bezt < nu->bezt + nu->pntsu;
+ BezTriple *bezt = (BezTriple *)point;
+ return bezt >= nu->bezt && bezt < &nu->bezt[nu->pntsu];
}
else {
- BPoint *bp= (BPoint*)point;
- return bp >= nu->bp && bp < nu->bp + nu->pntsu * nu->pntsv;
+ BPoint *bp = (BPoint *)point;
+ return bp >= nu->bp && bp < &nu->bp[nu->pntsu * nu->pntsv];
}
}
static Nurb *get_lastsel_nurb(Curve *cu)
{
- ListBase *nubase= curve_editnurbs(cu);
- Nurb *nu= nubase->first;
+ ListBase *nubase = BKE_curve_editNurbs_get(cu);
+ Nurb *nu = nubase->first;
if (!cu->lastsel)
return NULL;
@@ -5482,7 +5485,7 @@ static Nurb *get_lastsel_nurb(Curve *cu)
if (point_on_nurb(nu, cu->lastsel))
return nu;
- nu= nu->next;
+ nu = nu->next;
}
return NULL;
@@ -5492,9 +5495,9 @@ static void select_nth_bezt(Nurb *nu, BezTriple *bezt, int nth)
{
int a, start;
- start= bezt - nu->bezt;
- a= nu->pntsu;
- bezt= nu->bezt + a - 1;
+ start = bezt - nu->bezt;
+ a = nu->pntsu;
+ bezt = &nu->bezt[a - 1];
while (a--) {
if (abs(start - a) % nth) {
@@ -5510,23 +5513,23 @@ static void select_nth_bp(Nurb *nu, BPoint *bp, int nth)
int a, startrow, startpnt;
int dist, row, pnt;
- startrow= (bp - nu->bp) / nu->pntsu;
- startpnt= (bp - nu->bp) % nu->pntsu;
+ startrow = (bp - nu->bp) / nu->pntsu;
+ startpnt = (bp - nu->bp) % nu->pntsu;
- a= nu->pntsu * nu->pntsv;
- bp= nu->bp + a - 1;
+ a = nu->pntsu * nu->pntsv;
+ bp = &nu->bp[a - 1];
row = nu->pntsv - 1;
pnt = nu->pntsu - 1;
while (a--) {
- dist= abs(pnt - startpnt) + abs(row - startrow);
+ dist = abs(pnt - startpnt) + abs(row - startrow);
if (dist % nth) {
select_bpoint(bp, DESELECT, 1, HIDDEN);
}
pnt--;
if (pnt < 0) {
- pnt= nu->pntsu - 1;
+ pnt = nu->pntsu - 1;
row--;
}
@@ -5536,10 +5539,10 @@ static void select_nth_bp(Nurb *nu, BPoint *bp, int nth)
int CU_select_nth(Object *obedit, int nth)
{
- Curve *cu= (Curve*)obedit->data;
+ Curve *cu = (Curve *)obedit->data;
Nurb *nu;
- nu= get_lastsel_nurb(cu);
+ nu = get_lastsel_nurb(cu);
if (!nu)
return 0;
@@ -5555,8 +5558,8 @@ int CU_select_nth(Object *obedit, int nth)
static int select_nth_exec(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_edit_object(C);
- int nth= RNA_int_get(op->ptr, "nth");
+ Object *obedit = CTX_data_edit_object(C);
+ int nth = RNA_int_get(op->ptr, "nth");
if (!CU_select_nth(obedit, nth)) {
if (obedit->type == OB_SURF) {
@@ -5569,7 +5572,7 @@ static int select_nth_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -5586,7 +5589,7 @@ void CURVE_OT_select_nth(wmOperatorType *ot)
ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_int(ot->srna, "nth", 2, 2, 100, "Nth Selection", "", 1, INT_MAX);
}
@@ -5595,10 +5598,10 @@ void CURVE_OT_select_nth(wmOperatorType *ot)
static int duplicate_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *obedit= CTX_data_edit_object(C);
+ Object *obedit = CTX_data_edit_object(C);
adduplicateflagNurb(obedit, 1);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -5615,84 +5618,84 @@ void CURVE_OT_duplicate(wmOperatorType *ot)
ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/********************** delete operator *********************/
static int delete_exec(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_edit_object(C);
- Curve *cu= obedit->data;
- EditNurb *editnurb= cu->editnurb;
- ListBase *nubase= &editnurb->nurbs;
+ Object *obedit = CTX_data_edit_object(C);
+ Curve *cu = obedit->data;
+ EditNurb *editnurb = cu->editnurb;
+ ListBase *nubase = &editnurb->nurbs;
Nurb *nu, *nu1;
BezTriple *bezt, *bezt1, *bezt2;
BPoint *bp, *bp1, *bp2;
- int a, cut= 0, type= RNA_enum_get(op->ptr, "type");
- int nuindex= 0;
+ int a, cut = 0, type = RNA_enum_get(op->ptr, "type");
+ int nuindex = 0;
- if (obedit->type==OB_SURF) {
- if (type==0) {
+ if (obedit->type == OB_SURF) {
+ if (type == 0) {
deleteflagNurb(C, op, 1);
}
else {
keyIndex_delNurbList(editnurb, nubase);
- freeNurblist(nubase);
+ BKE_nurbList_free(nubase);
if (ED_curve_updateAnimPaths(obedit->data))
- WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, obedit);
+ WM_event_add_notifier(C, NC_OBJECT | ND_KEYS, obedit);
}
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
DAG_id_tag_update(obedit->data, 0);
return OPERATOR_FINISHED;
}
- if (type==0) {
+ if (type == 0) {
/* first loop, can we remove entire pieces? */
Nurb *next;
- nu= nubase->first;
+ nu = nubase->first;
while (nu) {
- next= nu->next;
+ next = nu->next;
if (nu->type == CU_BEZIER) {
- bezt= nu->bezt;
- a= nu->pntsu;
+ bezt = nu->bezt;
+ a = nu->pntsu;
if (a) {
while (a) {
- if ( BEZSELECTED_HIDDENHANDLES(cu, bezt) );
+ if (BEZSELECTED_HIDDENHANDLES(cu, bezt) ) ;
else break;
a--;
bezt++;
}
- if (a==0) {
+ if (a == 0) {
if (cu->actnu == nuindex)
- cu->actnu= -1;
+ cu->actnu = -1;
BLI_remlink(nubase, nu);
keyIndex_delNurb(editnurb, nu);
- freeNurb(nu); nu= NULL;
+ BKE_nurb_free(nu); nu = NULL;
}
}
}
else {
- bp= nu->bp;
- a= nu->pntsu*nu->pntsv;
+ bp = nu->bp;
+ a = nu->pntsu * nu->pntsv;
if (a) {
while (a) {
- if (bp->f1 & SELECT);
+ if (bp->f1 & SELECT) ;
else break;
a--;
bp++;
}
- if (a==0) {
+ if (a == 0) {
if (cu->actnu == nuindex)
- cu->actnu= -1;
+ cu->actnu = -1;
BLI_remlink(nubase, nu);
keyIndex_delNurb(editnurb, nu);
- freeNurb(nu); nu= NULL;
+ BKE_nurb_free(nu); nu = NULL;
}
}
}
@@ -5700,55 +5703,54 @@ static int delete_exec(bContext *C, wmOperator *op)
/* Never allow the order to exceed the number of points
* - note, this is ok but changes unselected nurbs, disable for now */
#if 0
- if ((nu!= NULL) && (nu->type == CU_NURBS)) {
+ if ((nu != NULL) && (nu->type == CU_NURBS)) {
clamp_nurb_order_u(nu);
}
#endif
- nu= next;
+ nu = next;
nuindex++;
}
/* 2nd loop, delete small pieces: just for curves */
- nu= nubase->first;
+ nu = nubase->first;
while (nu) {
- next= nu->next;
- type= 0;
+ next = nu->next;
+ type = 0;
if (nu->type == CU_BEZIER) {
- int delta= 0;
- bezt= nu->bezt;
- for (a=0;a<nu->pntsu;a++) {
- if ( BEZSELECTED_HIDDENHANDLES(cu, bezt) ) {
- memmove(bezt, bezt+1, (nu->pntsu-a-1)*sizeof(BezTriple));
+ int delta = 0;
+ bezt = nu->bezt;
+ for (a = 0; a < nu->pntsu; a++) {
+ if (BEZSELECTED_HIDDENHANDLES(cu, bezt) ) {
+ memmove(bezt, bezt + 1, (nu->pntsu - a - 1) * sizeof(BezTriple));
keyIndex_delBezt(editnurb, bezt + delta);
- keyIndex_updateBezt(editnurb, bezt + 1, bezt, nu->pntsu-a-1);
+ keyIndex_updateBezt(editnurb, bezt + 1, bezt, nu->pntsu - a - 1);
nu->pntsu--;
a--;
- type= 1;
+ type = 1;
delta++;
}
else bezt++;
}
if (type) {
- bezt1 =
- (BezTriple*)MEM_mallocN((nu->pntsu) * sizeof(BezTriple), "delNurb");
- memcpy(bezt1, nu->bezt, (nu->pntsu)*sizeof(BezTriple) );
+ bezt1 = (BezTriple *)MEM_mallocN((nu->pntsu) * sizeof(BezTriple), "delNurb");
+ memcpy(bezt1, nu->bezt, (nu->pntsu) * sizeof(BezTriple));
keyIndex_updateBezt(editnurb, nu->bezt, bezt1, nu->pntsu);
MEM_freeN(nu->bezt);
- nu->bezt= bezt1;
- calchandlesNurb(nu);
+ nu->bezt = bezt1;
+ BKE_nurb_handles_calc(nu);
}
}
- else if (nu->pntsv==1) {
- int delta= 0;
- bp= nu->bp;
-
- for (a=0;a<nu->pntsu;a++) {
- if ( bp->f1 & SELECT ) {
- memmove(bp, bp+1, (nu->pntsu-a-1)*sizeof(BPoint));
+ else if (nu->pntsv == 1) {
+ int delta = 0;
+ bp = nu->bp;
+
+ for (a = 0; a < nu->pntsu; a++) {
+ if (bp->f1 & SELECT) {
+ memmove(bp, bp + 1, (nu->pntsu - a - 1) * sizeof(BPoint));
keyIndex_delBP(editnurb, bp + delta);
- keyIndex_updateBP(editnurb, bp+1, bp, nu->pntsu-a-1);
+ keyIndex_updateBP(editnurb, bp + 1, bp, nu->pntsu - a - 1);
nu->pntsu--;
a--;
- type= 1;
+ type = 1;
delta++;
}
else {
@@ -5756,11 +5758,11 @@ static int delete_exec(bContext *C, wmOperator *op)
}
}
if (type) {
- bp1 = (BPoint*)MEM_mallocN(nu->pntsu * sizeof(BPoint), "delNurb2");
- memcpy(bp1, nu->bp, (nu->pntsu)*sizeof(BPoint) );
+ bp1 = (BPoint *)MEM_mallocN(nu->pntsu * sizeof(BPoint), "delNurb2");
+ memcpy(bp1, nu->bp, (nu->pntsu) * sizeof(BPoint));
keyIndex_updateBP(editnurb, nu->bp, bp1, nu->pntsu);
MEM_freeN(nu->bp);
- nu->bp= bp1;
+ nu->bp = bp1;
/* Never allow the order to exceed the number of points
* - note, this is ok but changes unselected nurbs, disable for now */
@@ -5770,71 +5772,71 @@ static int delete_exec(bContext *C, wmOperator *op)
}
#endif
}
- clamp_nurb_order_u(nu);
- nurbs_knot_calc_u(nu);
+ BKE_nurb_order_clamp_u(nu);
+ BKE_nurb_knot_calc_u(nu);
}
- nu= next;
+ nu = next;
}
}
- else if (type==1) { /* erase segment */
+ else if (type == 1) { /* erase segment */
/* find the 2 selected points */
- bezt1= bezt2= NULL;
- bp1= bp2= NULL;
- nu1= NULL;
- nuindex= 0;
- for (nu= nubase->first; nu; nu= nu->next) {
+ bezt1 = bezt2 = NULL;
+ bp1 = bp2 = NULL;
+ nu1 = NULL;
+ nuindex = 0;
+ for (nu = nubase->first; nu; nu = nu->next) {
if (nu->type == CU_BEZIER) {
- bezt= nu->bezt;
- for (a=0; a<nu->pntsu-1; a++) {
- if ( BEZSELECTED_HIDDENHANDLES(cu, bezt) ) {
- bezt1= bezt;
- bezt2= bezt+1;
+ bezt = nu->bezt;
+ for (a = 0; a < nu->pntsu - 1; a++) {
+ if (BEZSELECTED_HIDDENHANDLES(cu, bezt) ) {
+ bezt1 = bezt;
+ bezt2 = bezt + 1;
if ((bezt2->f1 & SELECT) || (bezt2->f2 & SELECT) || (bezt2->f3 & SELECT)) {
/* pass */
}
- else { /* maybe do not make cyclic */
- if (a==0 && (nu->flagu & CU_NURB_CYCLIC) ) {
- bezt2= bezt+(nu->pntsu-1);
+ else { /* maybe do not make cyclic */
+ if (a == 0 && (nu->flagu & CU_NURB_CYCLIC) ) {
+ bezt2 = bezt + (nu->pntsu - 1);
if ( (bezt2->f1 & SELECT) || (bezt2->f2 & SELECT) || (bezt2->f3 & SELECT) ) {
nu->flagu &= ~CU_NURB_CYCLIC;
- calchandlesNurb(nu);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ BKE_nurb_handles_calc(nu);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
DAG_id_tag_update(obedit->data, 0);
}
}
return OPERATOR_FINISHED;
}
- cut= a;
- nu1= nu;
+ cut = a;
+ nu1 = nu;
break;
}
bezt++;
}
}
- else if (nu->pntsv==1) {
- bp= nu->bp;
- for (a=0; a<nu->pntsu-1; a++) {
- if ( bp->f1 & SELECT ) {
- bp1= bp;
- bp2= bp+1;
- if (bp2->f1 & 1) {
+ else if (nu->pntsv == 1) {
+ bp = nu->bp;
+ for (a = 0; a < nu->pntsu - 1; a++) {
+ if (bp->f1 & SELECT) {
+ bp1 = bp;
+ bp2 = bp + 1;
+ if (bp2->f1 & SELECT) {
/* pass */
}
- else { /* maybe do not make cyclic */
- if (a==0 && (nu->flagu & CU_NURB_CYCLIC) ) {
- bp2= bp+(nu->pntsu-1);
- if ( bp2->f1 & SELECT ) {
+ else { /* maybe do not make cyclic */
+ if (a == 0 && (nu->flagu & CU_NURB_CYCLIC) ) {
+ bp2 = bp + (nu->pntsu - 1);
+ if (bp2->f1 & SELECT) {
nu->flagu &= ~CU_NURB_CYCLIC;
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
DAG_id_tag_update(obedit->data, 0);
}
}
return OPERATOR_FINISHED;
}
- cut= a;
- nu1= nu;
+ cut = a;
+ nu1 = nu;
break;
}
bp++;
@@ -5845,106 +5847,99 @@ static int delete_exec(bContext *C, wmOperator *op)
}
if (nu1) {
if (bezt1) {
- if (nu1->pntsu==2) { /* remove completely */
+ if (nu1->pntsu == 2) { /* remove completely */
if (cu->actnu == nuindex)
- cu->actnu= -1;
+ cu->actnu = -1;
BLI_remlink(nubase, nu);
- freeNurb(nu); nu = NULL;
+ BKE_nurb_free(nu); nu = NULL;
}
- else if (nu1->flagu & CU_NURB_CYCLIC) { /* cyclic */
- bezt =
- (BezTriple*)MEM_mallocN((cut+1) * sizeof(BezTriple), "delNurb1");
- ED_curve_beztcpy(editnurb, bezt, nu1->bezt, cut+1);
- a= nu1->pntsu-cut-1;
+ else if (nu1->flagu & CU_NURB_CYCLIC) { /* cyclic */
+ bezt = (BezTriple *)MEM_mallocN((cut + 1) * sizeof(BezTriple), "delNurb1");
+ ED_curve_beztcpy(editnurb, bezt, nu1->bezt, cut + 1);
+ a = nu1->pntsu - cut - 1;
ED_curve_beztcpy(editnurb, nu1->bezt, bezt2, a);
- ED_curve_beztcpy(editnurb, nu1->bezt+a, bezt, cut+1);
+ ED_curve_beztcpy(editnurb, &nu1->bezt[a], bezt, cut + 1);
nu1->flagu &= ~CU_NURB_CYCLIC;
MEM_freeN(bezt);
- calchandlesNurb(nu);
+ BKE_nurb_handles_calc(nu);
}
- else { /* add new curve */
+ else { /* add new curve */
/* seems to be an error here... but where? (a can become zero) */
- nu =
- (Nurb*)MEM_mallocN(sizeof(Nurb), "delNurb2");
+ nu = (Nurb *)MEM_mallocN(sizeof(Nurb), "delNurb2");
memcpy(nu, nu1, sizeof(Nurb));
BLI_addtail(nubase, nu);
- nu->bezt =
- (BezTriple*)MEM_mallocN((cut+1) * sizeof(BezTriple), "delNurb3");
- ED_curve_beztcpy(editnurb, nu->bezt, nu1->bezt, cut+1);
- a= nu1->pntsu-cut-1;
-
- bezt =
- (BezTriple*)MEM_mallocN(a * sizeof(BezTriple), "delNurb4");
- ED_curve_beztcpy(editnurb, bezt, nu1->bezt+cut+1, a);
+ nu->bezt = (BezTriple *)MEM_mallocN((cut + 1) * sizeof(BezTriple), "delNurb3");
+ ED_curve_beztcpy(editnurb, nu->bezt, nu1->bezt, cut + 1);
+ a = nu1->pntsu - cut - 1;
+
+ bezt = (BezTriple *)MEM_mallocN(a * sizeof(BezTriple), "delNurb4");
+ ED_curve_beztcpy(editnurb, bezt, &nu1->bezt[cut + 1], a);
MEM_freeN(nu1->bezt);
- nu1->bezt= bezt;
- nu1->pntsu= a;
- nu->pntsu= cut+1;
+ nu1->bezt = bezt;
+ nu1->pntsu = a;
+ nu->pntsu = cut + 1;
- calchandlesNurb(nu);
- calchandlesNurb(nu1);
+ BKE_nurb_handles_calc(nu);
+ BKE_nurb_handles_calc(nu1);
}
}
else if (bp1) {
- if (nu1->pntsu==2) { /* remove completely */
+ if (nu1->pntsu == 2) { /* remove completely */
if (cu->actnu == nuindex)
- cu->actnu= -1;
+ cu->actnu = -1;
BLI_remlink(nubase, nu);
- freeNurb(nu); nu= NULL;
+ BKE_nurb_free(nu); nu = NULL;
}
- else if (nu1->flagu & CU_NURB_CYCLIC) { /* cyclic */
- bp =
- (BPoint*)MEM_mallocN((cut+1) * sizeof(BPoint), "delNurb5");
- ED_curve_bpcpy(editnurb, bp, nu1->bp, cut+1);
- a= nu1->pntsu-cut-1;
+ else if (nu1->flagu & CU_NURB_CYCLIC) { /* cyclic */
+ bp = (BPoint *)MEM_mallocN((cut + 1) * sizeof(BPoint), "delNurb5");
+ ED_curve_bpcpy(editnurb, bp, nu1->bp, cut + 1);
+ a = nu1->pntsu - cut - 1;
ED_curve_bpcpy(editnurb, nu1->bp, bp2, a);
- ED_curve_bpcpy(editnurb, nu1->bp+a, bp, cut+1);
+ ED_curve_bpcpy(editnurb, &nu1->bp[a], bp, cut + 1);
nu1->flagu &= ~CU_NURB_CYCLIC;
MEM_freeN(bp);
}
- else { /* add new curve */
- nu = (Nurb*)MEM_mallocN(sizeof(Nurb), "delNurb6");
+ else { /* add new curve */
+ nu = (Nurb *)MEM_mallocN(sizeof(Nurb), "delNurb6");
memcpy(nu, nu1, sizeof(Nurb));
BLI_addtail(nubase, nu);
- nu->bp =
- (BPoint*)MEM_mallocN((cut+1) * sizeof(BPoint), "delNurb7");
- ED_curve_bpcpy(editnurb, nu->bp, nu1->bp, cut+1);
- a= nu1->pntsu-cut-1;
- bp =
- (BPoint*)MEM_mallocN(a * sizeof(BPoint), "delNurb8");
- ED_curve_bpcpy(editnurb, bp, nu1->bp+cut+1, a);
+ nu->bp = (BPoint *)MEM_mallocN((cut + 1) * sizeof(BPoint), "delNurb7");
+ ED_curve_bpcpy(editnurb, nu->bp, nu1->bp, cut + 1);
+ a = nu1->pntsu - cut - 1;
+ bp = (BPoint *)MEM_mallocN(a * sizeof(BPoint), "delNurb8");
+ ED_curve_bpcpy(editnurb, bp, &nu1->bp[cut + 1], a);
MEM_freeN(nu1->bp);
- nu1->bp= bp;
- nu1->pntsu= a;
- nu1->knotsu= NULL;
- nu->pntsu= cut+1;
+ nu1->bp = bp;
+ nu1->pntsu = a;
+ nu1->knotsu = NULL;
+ nu->pntsu = cut + 1;
- clamp_nurb_order_u(nu);
- nurbs_knot_calc_u(nu);
+ BKE_nurb_order_clamp_u(nu);
+ BKE_nurb_knot_calc_u(nu);
- clamp_nurb_order_u(nu1);
- nurbs_knot_calc_u(nu1);
+ BKE_nurb_order_clamp_u(nu1);
+ BKE_nurb_knot_calc_u(nu1);
}
}
}
}
- else if (type==2) {
- cu->actnu= -1;
+ else if (type == 2) {
+ cu->actnu = -1;
keyIndex_delNurbList(editnurb, nubase);
- freeNurblist(nubase);
+ BKE_nurbList_free(nubase);
}
if (ED_curve_updateAnimPaths(obedit->data))
- WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, obedit);
+ WM_event_add_notifier(C, NC_OBJECT | ND_KEYS, obedit);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
DAG_id_tag_update(obedit->data, 0);
return OPERATOR_FINISHED;
@@ -5952,20 +5947,20 @@ static int delete_exec(bContext *C, wmOperator *op)
static int delete_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
- Object *obedit= CTX_data_edit_object(C);
+ Object *obedit = CTX_data_edit_object(C);
uiPopupMenu *pup;
uiLayout *layout;
- if (obedit->type==OB_SURF) {
- pup= uiPupMenuBegin(C, "Delete", ICON_NONE);
- layout= uiPupMenuLayout(pup);
+ if (obedit->type == OB_SURF) {
+ pup = uiPupMenuBegin(C, "Delete", ICON_NONE);
+ layout = uiPupMenuLayout(pup);
uiItemEnumO_ptr(layout, op->type, NULL, 0, "type", 0);
uiItemEnumO_ptr(layout, op->type, NULL, 0, "type", 2);
uiPupMenuEnd(C, pup);
}
else {
- pup= uiPupMenuBegin(C, "Delete", ICON_NONE);
- layout= uiPupMenuLayout(pup);
+ pup = uiPupMenuBegin(C, "Delete", ICON_NONE);
+ layout = uiPupMenuLayout(pup);
uiItemsEnumO(layout, op->type->idname, "type");
uiPupMenuEnd(C, pup);
}
@@ -5992,7 +5987,7 @@ void CURVE_OT_delete(wmOperatorType *ot)
ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "type", type_items, 0, "Type", "Which elements to delete");
@@ -6002,22 +5997,22 @@ void CURVE_OT_delete(wmOperatorType *ot)
static int shade_smooth_exec(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_edit_object(C);
- ListBase *editnurb= object_editcurve_get(obedit);
+ Object *obedit = CTX_data_edit_object(C);
+ ListBase *editnurb = object_editcurve_get(obedit);
Nurb *nu;
- int clear= (strcmp(op->idname, "CURVE_OT_shade_flat") == 0);
+ int clear = (strcmp(op->idname, "CURVE_OT_shade_flat") == 0);
if (obedit->type != OB_CURVE)
return OPERATOR_CANCELLED;
- for (nu= editnurb->first; nu; nu= nu->next) {
+ for (nu = editnurb->first; nu; nu = nu->next) {
if (isNurbsel(nu)) {
if (!clear) nu->flag |= CU_SMOOTH;
else nu->flag &= ~CU_SMOOTH;
}
}
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
DAG_id_tag_update(obedit->data, 0);
return OPERATOR_FINISHED;
@@ -6028,13 +6023,14 @@ void CURVE_OT_shade_smooth(wmOperatorType *ot)
/* identifiers */
ot->name = "Shade Smooth";
ot->idname = "CURVE_OT_shade_smooth";
+ ot->description = "Set shading to smooth";
/* api callbacks */
ot->exec = shade_smooth_exec;
ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
void CURVE_OT_shade_flat(wmOperatorType *ot)
@@ -6042,22 +6038,23 @@ void CURVE_OT_shade_flat(wmOperatorType *ot)
/* identifiers */
ot->name = "Shade Flat";
ot->idname = "CURVE_OT_shade_flat";
+ ot->description = "Set shading to flat";
/* api callbacks */
ot->exec = shade_smooth_exec;
ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/************** join operator, to be used externally? ****************/
int join_curve_exec(bContext *C, wmOperator *UNUSED(op))
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- Object *ob= CTX_data_active_object(C);
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = CTX_data_active_object(C);
Curve *cu;
Nurb *nu, *newnu;
BezTriple *bezt;
@@ -6066,48 +6063,49 @@ int join_curve_exec(bContext *C, wmOperator *UNUSED(op))
float imat[4][4], cmat[4][4];
int a;
- tempbase.first= tempbase.last= NULL;
+ tempbase.first = tempbase.last = NULL;
/* trasnform all selected curves inverse in obact */
invert_m4_m4(imat, ob->obmat);
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
- if (base->object->type==ob->type) {
+ CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases)
+ {
+ if (base->object->type == ob->type) {
if (base->object != ob) {
- cu= base->object->data;
+ cu = base->object->data;
if (cu->nurb.first) {
/* watch it: switch order here really goes wrong */
mult_m4_m4m4(cmat, imat, base->object->obmat);
- nu= cu->nurb.first;
+ nu = cu->nurb.first;
while (nu) {
- newnu= duplicateNurb(nu);
+ newnu = BKE_nurb_duplicate(nu);
if (ob->totcol) { /* TODO, merge material lists */
- CLAMP(newnu->mat_nr, 0, ob->totcol-1);
+ CLAMP(newnu->mat_nr, 0, ob->totcol - 1);
}
- else newnu->mat_nr= 0;
+ else newnu->mat_nr = 0;
BLI_addtail(&tempbase, newnu);
- if ( (bezt= newnu->bezt) ) {
- a= newnu->pntsu;
+ if ( (bezt = newnu->bezt) ) {
+ a = newnu->pntsu;
while (a--) {
mul_m4_v3(cmat, bezt->vec[0]);
mul_m4_v3(cmat, bezt->vec[1]);
mul_m4_v3(cmat, bezt->vec[2]);
bezt++;
}
- calchandlesNurb(newnu);
+ BKE_nurb_handles_calc(newnu);
}
- if ( (bp= newnu->bp) ) {
- a= newnu->pntsu*nu->pntsv;
+ if ( (bp = newnu->bp) ) {
+ a = newnu->pntsu * nu->pntsv;
while (a--) {
mul_m4_v3(cmat, bp->vec);
bp++;
}
}
- nu= nu->next;
+ nu = nu->next;
}
}
@@ -6117,15 +6115,15 @@ int join_curve_exec(bContext *C, wmOperator *UNUSED(op))
}
CTX_DATA_END;
- cu= ob->data;
+ cu = ob->data;
BLI_movelisttolist(&cu->nurb, &tempbase);
- DAG_scene_sort(bmain, scene); // because we removed object(s), call before editmode!
+ DAG_scene_sort(bmain, scene); // because we removed object(s), call before editmode!
ED_object_enter_editmode(C, EM_WAITCURSOR);
- ED_object_exit_editmode(C, EM_FREEDATA|EM_WAITCURSOR|EM_DO_UNDO);
+ ED_object_exit_editmode(C, EM_FREEDATA | EM_WAITCURSOR | EM_DO_UNDO);
- WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene);
return OPERATOR_FINISHED;
}
@@ -6134,9 +6132,9 @@ int join_curve_exec(bContext *C, wmOperator *UNUSED(op))
static const char *get_curve_defname(int type)
{
- int stype= type & CU_PRIMITIVE;
+ int stype = type & CU_PRIMITIVE;
- if ((type & CU_TYPE)==CU_BEZIER) {
+ if ((type & CU_TYPE) == CU_BEZIER) {
switch (stype) {
case CU_PRIM_CURVE: return "BezierCurve";
case CU_PRIM_CIRCLE: return "BezierCircle";
@@ -6158,7 +6156,7 @@ static const char *get_curve_defname(int type)
static const char *get_surf_defname(int type)
{
- int stype= type & CU_PRIMITIVE;
+ int stype = type & CU_PRIMITIVE;
switch (stype) {
case CU_PRIM_CURVE: return "SurfCurve";
@@ -6174,22 +6172,22 @@ static const char *get_surf_defname(int type)
Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
{
- static int xzproj= 0; /* this function calls itself... */
- Object *obedit= CTX_data_edit_object(C);
- ListBase *editnurb= object_editcurve_get(obedit);
- View3D *v3d= CTX_wm_view3d(C);
- RegionView3D *rv3d= ED_view3d_context_rv3d(C);
+ static int xzproj = 0; /* this function calls itself... */
+ Object *obedit = CTX_data_edit_object(C);
+ ListBase *editnurb = object_editcurve_get(obedit);
+ View3D *v3d = CTX_wm_view3d(C);
+ RegionView3D *rv3d = ED_view3d_context_rv3d(C);
Nurb *nu = NULL;
BezTriple *bezt;
BPoint *bp;
- Curve *cu= (Curve*)obedit->data;
- float vec[3], zvec[3]= {0.0f, 0.0f, 1.0f};
- float umat[4][4]= MAT4_UNITY, viewmat[4][4]= MAT4_UNITY;
+ Curve *cu = (Curve *)obedit->data;
+ float vec[3], zvec[3] = {0.0f, 0.0f, 1.0f};
+ float umat[4][4] = MAT4_UNITY, viewmat[4][4] = MAT4_UNITY;
float fac;
int a, b;
- const float grid= v3d ? v3d->grid : 1.0f;
- const int cutype= (type & CU_TYPE); // poly, bezier, nurbs, etc
- const int stype= (type & CU_PRIMITIVE);
+ const float grid = v3d ? v3d->grid : 1.0f;
+ const int cutype = (type & CU_TYPE); // poly, bezier, nurbs, etc
+ const int stype = (type & CU_PRIMITIVE);
const int force_3d = ((Curve *)obedit->data)->flag & CU_3D; /* could be adding to an existing 3D curve */
if (rv3d) {
@@ -6200,328 +6198,325 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
setflagsNurb(editnurb, 0);
/* these types call this function to return a Nurb */
- if (stype!=CU_PRIM_TUBE && stype!=CU_PRIM_DONUT) {
- nu = (Nurb*)MEM_callocN(sizeof(Nurb), "addNurbprim");
- nu->type= cutype;
- nu->resolu= cu->resolu;
- nu->resolv= cu->resolv;
- }
-
- switch(stype) {
- case CU_PRIM_CURVE: /* curve */
- nu->resolu= cu->resolu;
- if (cutype==CU_BEZIER) {
- if (!force_3d) nu->flag |= CU_2D;
- nu->pntsu= 2;
- nu->bezt =
- (BezTriple*)MEM_callocN(2 * sizeof(BezTriple), "addNurbprim1");
- bezt= nu->bezt;
- bezt->h1= bezt->h2= HD_ALIGN;
- bezt->f1= bezt->f2= bezt->f3= SELECT;
- bezt->radius = 1.0;
-
- bezt->vec[1][0]+= -grid;
- bezt->vec[0][0]+= -1.5f*grid;
- bezt->vec[0][1]+= -0.5f*grid;
- bezt->vec[2][0]+= -0.5f*grid;
- bezt->vec[2][1]+= 0.5f*grid;
- for (a=0;a<3;a++) mul_m4_v3(mat, bezt->vec[a]);
+ if (stype != CU_PRIM_TUBE && stype != CU_PRIM_DONUT) {
+ nu = (Nurb *)MEM_callocN(sizeof(Nurb), "addNurbprim");
+ nu->type = cutype;
+ nu->resolu = cu->resolu;
+ nu->resolv = cu->resolv;
+ }
- bezt++;
- bezt->h1= bezt->h2= HD_ALIGN;
- bezt->f1= bezt->f2= bezt->f3= SELECT;
- bezt->radius = bezt->weight = 1.0;
+ switch (stype) {
+ case CU_PRIM_CURVE: /* curve */
+ nu->resolu = cu->resolu;
+ if (cutype == CU_BEZIER) {
+ if (!force_3d) nu->flag |= CU_2D;
+ nu->pntsu = 2;
+ nu->bezt = (BezTriple *)MEM_callocN(2 * sizeof(BezTriple), "addNurbprim1");
+ bezt = nu->bezt;
+ bezt->h1 = bezt->h2 = HD_ALIGN;
+ bezt->f1 = bezt->f2 = bezt->f3 = SELECT;
+ bezt->radius = 1.0;
+
+ bezt->vec[1][0] += -grid;
+ bezt->vec[0][0] += -1.5f * grid;
+ bezt->vec[0][1] += -0.5f * grid;
+ bezt->vec[2][0] += -0.5f * grid;
+ bezt->vec[2][1] += 0.5f * grid;
+ for (a = 0; a < 3; a++) mul_m4_v3(mat, bezt->vec[a]);
- bezt->vec[0][0] = 0;
- bezt->vec[0][1] = 0;
- bezt->vec[1][0] = grid;
- bezt->vec[1][1] = 0;
- bezt->vec[2][0] = grid*2;
- bezt->vec[2][1] = 0;
- for (a=0;a<3;a++) mul_m4_v3(mat, bezt->vec[a]);
+ bezt++;
+ bezt->h1 = bezt->h2 = HD_ALIGN;
+ bezt->f1 = bezt->f2 = bezt->f3 = SELECT;
+ bezt->radius = bezt->weight = 1.0;
- calchandlesNurb(nu);
- }
- else {
-
- nu->pntsu= 4;
- nu->pntsv= 1;
- nu->orderu= 4;
- nu->bp= callocstructN(BPoint, 4, "addNurbprim3");
-
- bp= nu->bp;
- for (a=0;a<4;a++, bp++) {
- bp->vec[3]= 1.0;
- bp->f1= SELECT;
- bp->radius = bp->weight = 1.0;
- }
+ bezt->vec[0][0] = 0;
+ bezt->vec[0][1] = 0;
+ bezt->vec[1][0] = grid;
+ bezt->vec[1][1] = 0;
+ bezt->vec[2][0] = grid * 2;
+ bezt->vec[2][1] = 0;
+ for (a = 0; a < 3; a++) mul_m4_v3(mat, bezt->vec[a]);
- bp= nu->bp;
- bp->vec[0]+= -1.5f*grid;
- bp++;
- bp->vec[0]+= -grid;
- bp->vec[1]+= grid;
- bp++;
- bp->vec[0]+= grid;
- bp->vec[1]+= grid;
- bp++;
- bp->vec[0]+= 1.5f*grid;
-
- bp= nu->bp;
- for (a=0;a<4;a++, bp++) mul_m4_v3(mat,bp->vec);
-
- if (cutype==CU_NURBS) {
- nu->knotsu= NULL; /* nurbs_knot_calc_u allocates */
- nurbs_knot_calc_u(nu);
- }
-
- }
- break;
- case CU_PRIM_PATH: /* 5 point path */
- nu->pntsu= 5;
- nu->pntsv= 1;
- nu->orderu= 5;
- nu->flagu= CU_NURB_ENDPOINT; /* endpoint */
- nu->resolu= cu->resolu;
- nu->bp= callocstructN(BPoint, 5, "addNurbprim3");
-
- bp= nu->bp;
- for (a=0;a<5;a++, bp++) {
- bp->vec[3]= 1.0;
- bp->f1= SELECT;
- bp->radius = bp->weight = 1.0;
- }
-
- bp= nu->bp;
- bp->vec[0]+= -2.0f*grid;
- bp++;
- bp->vec[0]+= -grid;
- bp++; bp++;
- bp->vec[0]+= grid;
- bp++;
- bp->vec[0]+= 2.0f*grid;
-
- bp= nu->bp;
- for (a=0;a<5;a++, bp++) mul_m4_v3(mat,bp->vec);
-
- if (cutype==CU_NURBS) {
- nu->knotsu= NULL; /* nurbs_knot_calc_u allocates */
- nurbs_knot_calc_u(nu);
- }
-
- break;
- case CU_PRIM_CIRCLE: /* circle */
- nu->resolu= cu->resolu;
-
- if (cutype==CU_BEZIER) {
- if (!force_3d) nu->flag |= CU_2D;
- nu->pntsu= 4;
- nu->bezt= callocstructN(BezTriple, 4, "addNurbprim1");
- nu->flagu= CU_NURB_CYCLIC;
- bezt= nu->bezt;
-
- bezt->h1= bezt->h2= HD_AUTO;
- bezt->f1= bezt->f2= bezt->f3= SELECT;
- bezt->vec[1][0]+= -grid;
- for (a=0;a<3;a++) mul_m4_v3(mat,bezt->vec[a]);
- bezt->radius = bezt->weight = 1.0;
-
- bezt++;
- bezt->h1= bezt->h2= HD_AUTO;
- bezt->f1= bezt->f2= bezt->f3= SELECT;
- bezt->vec[1][1]+= grid;
- for (a=0;a<3;a++) mul_m4_v3(mat,bezt->vec[a]);
- bezt->radius = bezt->weight = 1.0;
+ BKE_nurb_handles_calc(nu);
+ }
+ else {
- bezt++;
- bezt->h1= bezt->h2= HD_AUTO;
- bezt->f1= bezt->f2= bezt->f3= SELECT;
- bezt->vec[1][0]+= grid;
- for (a=0;a<3;a++) mul_m4_v3(mat,bezt->vec[a]);
- bezt->radius = bezt->weight = 1.0;
+ nu->pntsu = 4;
+ nu->pntsv = 1;
+ nu->orderu = 4;
+ nu->bp = callocstructN(BPoint, 4, "addNurbprim3");
- bezt++;
- bezt->h1= bezt->h2= HD_AUTO;
- bezt->f1= bezt->f2= bezt->f3= SELECT;
- bezt->vec[1][1]+= -grid;
- for (a=0;a<3;a++) mul_m4_v3(mat,bezt->vec[a]);
- bezt->radius = bezt->weight = 1.0;
-
- calchandlesNurb(nu);
- }
- else if ( cutype==CU_NURBS ) { /* nurb */
- nu->pntsu= 8;
- nu->pntsv= 1;
- nu->orderu= 4;
- nu->bp= callocstructN(BPoint, 8, "addNurbprim6");
- nu->flagu= CU_NURB_CYCLIC;
- bp= nu->bp;
-
- for (a=0; a<8; a++) {
- bp->f1= SELECT;
- if (xzproj==0) {
- bp->vec[0]+= nurbcircle[a][0]*grid;
- bp->vec[1]+= nurbcircle[a][1]*grid;
+ bp = nu->bp;
+ for (a = 0; a < 4; a++, bp++) {
+ bp->vec[3] = 1.0;
+ bp->f1 = SELECT;
+ bp->radius = bp->weight = 1.0;
}
- else {
- bp->vec[0]+= 0.25f*nurbcircle[a][0]*grid-0.75f*grid;
- bp->vec[2]+= 0.25f*nurbcircle[a][1]*grid;
- }
- if (a & 1) bp->vec[3]= 0.25*M_SQRT2;
- else bp->vec[3]= 1.0;
- mul_m4_v3(mat,bp->vec);
- bp->radius = bp->weight = 1.0;
-
+
+ bp = nu->bp;
+ bp->vec[0] += -1.5f * grid;
bp++;
- }
+ bp->vec[0] += -grid;
+ bp->vec[1] += grid;
+ bp++;
+ bp->vec[0] += grid;
+ bp->vec[1] += grid;
+ bp++;
+ bp->vec[0] += 1.5f * grid;
- nurbs_knot_calc_u(nu);
- }
- break;
- case CU_PRIM_PATCH: /* 4x4 patch */
- if ( cutype==CU_NURBS ) { /* nurb */
-
- nu->pntsu= 4;
- nu->pntsv= 4;
- nu->orderu= 4;
- nu->orderv= 4;
- nu->flag= CU_SMOOTH;
- nu->bp= callocstructN(BPoint, 4*4, "addNurbprim6");
- nu->flagu= 0;
- nu->flagv= 0;
- bp= nu->bp;
-
- for (a=0; a<4; a++) {
- for (b=0; b<4; b++) {
- bp->f1= SELECT;
- fac= (float)a -1.5f;
- bp->vec[0]+= fac*grid;
- fac= (float)b -1.5f;
- bp->vec[1]+= fac*grid;
- if (a==1 || a==2) if (b==1 || b==2) {
- bp->vec[2]+= grid;
- }
- mul_m4_v3(mat,bp->vec);
- bp->vec[3]= 1.0;
- bp++;
- }
- }
+ bp = nu->bp;
+ for (a = 0; a < 4; a++, bp++) mul_m4_v3(mat, bp->vec);
- nurbs_knot_calc_u(nu);
- nurbs_knot_calc_v(nu);
- }
- break;
- case CU_PRIM_TUBE: /* Cylinder */
- if ( cutype==CU_NURBS ) {
- nu= add_nurbs_primitive(C, mat, CU_NURBS|CU_PRIM_CIRCLE, 0); /* circle */
- nu->resolu= cu->resolu;
- nu->flag= CU_SMOOTH;
- BLI_addtail(editnurb, nu); /* temporal for extrude and translate */
- vec[0]=vec[1]= 0.0;
- vec[2]= -grid;
+ if (cutype == CU_NURBS) {
+ nu->knotsu = NULL; /* nurbs_knot_calc_u allocates */
+ BKE_nurb_knot_calc_u(nu);
+ }
- if (newob && (U.flag & USER_ADD_VIEWALIGNED) == 0) {
- /* pass */
}
- else {
- mul_mat3_m4_v3(mat, vec);
+ break;
+ case CU_PRIM_PATH: /* 5 point path */
+ nu->pntsu = 5;
+ nu->pntsv = 1;
+ nu->orderu = 5;
+ nu->flagu = CU_NURB_ENDPOINT; /* endpoint */
+ nu->resolu = cu->resolu;
+ nu->bp = callocstructN(BPoint, 5, "addNurbprim3");
+
+ bp = nu->bp;
+ for (a = 0; a < 5; a++, bp++) {
+ bp->vec[3] = 1.0;
+ bp->f1 = SELECT;
+ bp->radius = bp->weight = 1.0;
}
- translateflagNurb(editnurb, 1, vec);
- extrudeflagNurb(cu->editnurb, 1);
- vec[0]= -2*vec[0];
- vec[1]= -2*vec[1];
- vec[2]= -2*vec[2];
- translateflagNurb(editnurb, 1, vec);
+ bp = nu->bp;
+ bp->vec[0] += -2.0f * grid;
+ bp++;
+ bp->vec[0] += -grid;
+ bp++; bp++;
+ bp->vec[0] += grid;
+ bp++;
+ bp->vec[0] += 2.0f * grid;
- BLI_remlink(editnurb, nu);
+ bp = nu->bp;
+ for (a = 0; a < 5; a++, bp++) mul_m4_v3(mat, bp->vec);
- a= nu->pntsu*nu->pntsv;
- bp= nu->bp;
- while (a-- >0) {
- bp->f1 |= SELECT;
- bp++;
+ if (cutype == CU_NURBS) {
+ nu->knotsu = NULL; /* nurbs_knot_calc_u allocates */
+ BKE_nurb_knot_calc_u(nu);
}
- }
- break;
- case CU_PRIM_SPHERE: /* sphere */
- if ( cutype==CU_NURBS ) {
- float tmp_cent[3] = {0.f, 0.f, 0.f};
- float tmp_vec[3] = {0.f, 0.f, 1.f};
+
+ break;
+ case CU_PRIM_CIRCLE: /* circle */
+ nu->resolu = cu->resolu;
- nu->pntsu= 5;
- nu->pntsv= 1;
- nu->orderu= 3;
- nu->resolu= cu->resolu;
- nu->resolv= cu->resolv;
- nu->flag= CU_SMOOTH;
- nu->bp= callocstructN(BPoint, 5, "addNurbprim6");
- nu->flagu= 0;
- bp= nu->bp;
-
- for (a=0; a<5; a++) {
- bp->f1= SELECT;
- bp->vec[0]+= nurbcircle[a][0]*grid;
- bp->vec[2]+= nurbcircle[a][1]*grid;
- if (a & 1) bp->vec[3]= 0.5*M_SQRT2;
- else bp->vec[3]= 1.0;
- mul_m4_v3(mat,bp->vec);
- bp++;
+ if (cutype == CU_BEZIER) {
+ if (!force_3d) nu->flag |= CU_2D;
+ nu->pntsu = 4;
+ nu->bezt = callocstructN(BezTriple, 4, "addNurbprim1");
+ nu->flagu = CU_NURB_CYCLIC;
+ bezt = nu->bezt;
+
+ bezt->h1 = bezt->h2 = HD_AUTO;
+ bezt->f1 = bezt->f2 = bezt->f3 = SELECT;
+ bezt->vec[1][0] += -grid;
+ for (a = 0; a < 3; a++) mul_m4_v3(mat, bezt->vec[a]);
+ bezt->radius = bezt->weight = 1.0;
+
+ bezt++;
+ bezt->h1 = bezt->h2 = HD_AUTO;
+ bezt->f1 = bezt->f2 = bezt->f3 = SELECT;
+ bezt->vec[1][1] += grid;
+ for (a = 0; a < 3; a++) mul_m4_v3(mat, bezt->vec[a]);
+ bezt->radius = bezt->weight = 1.0;
+
+ bezt++;
+ bezt->h1 = bezt->h2 = HD_AUTO;
+ bezt->f1 = bezt->f2 = bezt->f3 = SELECT;
+ bezt->vec[1][0] += grid;
+ for (a = 0; a < 3; a++) mul_m4_v3(mat, bezt->vec[a]);
+ bezt->radius = bezt->weight = 1.0;
+
+ bezt++;
+ bezt->h1 = bezt->h2 = HD_AUTO;
+ bezt->f1 = bezt->f2 = bezt->f3 = SELECT;
+ bezt->vec[1][1] += -grid;
+ for (a = 0; a < 3; a++) mul_m4_v3(mat, bezt->vec[a]);
+ bezt->radius = bezt->weight = 1.0;
+
+ BKE_nurb_handles_calc(nu);
+ }
+ else if (cutype == CU_NURBS) { /* nurb */
+ nu->pntsu = 8;
+ nu->pntsv = 1;
+ nu->orderu = 4;
+ nu->bp = callocstructN(BPoint, 8, "addNurbprim6");
+ nu->flagu = CU_NURB_CYCLIC;
+ bp = nu->bp;
+
+ for (a = 0; a < 8; a++) {
+ bp->f1 = SELECT;
+ if (xzproj == 0) {
+ bp->vec[0] += nurbcircle[a][0] * grid;
+ bp->vec[1] += nurbcircle[a][1] * grid;
+ }
+ else {
+ bp->vec[0] += 0.25f * nurbcircle[a][0] * grid - 0.75f * grid;
+ bp->vec[2] += 0.25f * nurbcircle[a][1] * grid;
+ }
+ if (a & 1) bp->vec[3] = 0.25 * M_SQRT2;
+ else bp->vec[3] = 1.0;
+ mul_m4_v3(mat, bp->vec);
+ bp->radius = bp->weight = 1.0;
+
+ bp++;
+ }
+
+ BKE_nurb_knot_calc_u(nu);
}
- nu->flagu= CU_NURB_BEZIER;
- nurbs_knot_calc_u(nu);
+ break;
+ case CU_PRIM_PATCH: /* 4x4 patch */
+ if (cutype == CU_NURBS) { /* nurb */
+
+ nu->pntsu = 4;
+ nu->pntsv = 4;
+ nu->orderu = 4;
+ nu->orderv = 4;
+ nu->flag = CU_SMOOTH;
+ nu->bp = callocstructN(BPoint, 4 * 4, "addNurbprim6");
+ nu->flagu = 0;
+ nu->flagv = 0;
+ bp = nu->bp;
+
+ for (a = 0; a < 4; a++) {
+ for (b = 0; b < 4; b++) {
+ bp->f1 = SELECT;
+ fac = (float)a - 1.5f;
+ bp->vec[0] += fac * grid;
+ fac = (float)b - 1.5f;
+ bp->vec[1] += fac * grid;
+ if (a == 1 || a == 2) if (b == 1 || b == 2) {
+ bp->vec[2] += grid;
+ }
+ mul_m4_v3(mat, bp->vec);
+ bp->vec[3] = 1.0;
+ bp++;
+ }
+ }
- BLI_addtail(editnurb, nu); /* temporal for spin */
+ BKE_nurb_knot_calc_u(nu);
+ BKE_nurb_knot_calc_v(nu);
+ }
+ break;
+ case CU_PRIM_TUBE: /* Cylinder */
+ if (cutype == CU_NURBS) {
+ nu = add_nurbs_primitive(C, mat, CU_NURBS | CU_PRIM_CIRCLE, 0); /* circle */
+ nu->resolu = cu->resolu;
+ nu->flag = CU_SMOOTH;
+ BLI_addtail(editnurb, nu); /* temporal for extrude and translate */
+ vec[0] = vec[1] = 0.0;
+ vec[2] = -grid;
+
+ if (newob && (U.flag & USER_ADD_VIEWALIGNED) == 0) {
+ /* pass */
+ }
+ else {
+ mul_mat3_m4_v3(mat, vec);
+ }
- if (newob && (U.flag & USER_ADD_VIEWALIGNED) == 0) spin_nurb(umat, obedit, tmp_vec, tmp_cent);
- else if ((U.flag & USER_ADD_VIEWALIGNED)) spin_nurb(viewmat, obedit, zvec, mat[3]);
- else spin_nurb(umat, obedit, tmp_vec, mat[3]);
+ translateflagNurb(editnurb, 1, vec);
+ extrudeflagNurb(cu->editnurb, 1);
+ mul_v3_fl(vec, -2.0f);
+ translateflagNurb(editnurb, 1, vec);
- nurbs_knot_calc_v(nu);
+ BLI_remlink(editnurb, nu);
- a= nu->pntsu*nu->pntsv;
- bp= nu->bp;
- while (a-- >0) {
- bp->f1 |= SELECT;
- bp++;
+ a = nu->pntsu * nu->pntsv;
+ bp = nu->bp;
+ while (a-- > 0) {
+ bp->f1 |= SELECT;
+ bp++;
+ }
}
- BLI_remlink(editnurb, nu);
- }
- break;
- case CU_PRIM_DONUT: /* torus */
- if ( cutype==CU_NURBS ) {
- float tmp_cent[3] = {0.f, 0.f, 0.f};
- float tmp_vec[3] = {0.f, 0.f, 1.f};
-
- xzproj= 1;
- nu= add_nurbs_primitive(C, mat, CU_NURBS|CU_PRIM_CIRCLE, 0); /* circle */
- xzproj= 0;
- nu->resolu= cu->resolu;
- nu->resolv= cu->resolv;
- nu->flag= CU_SMOOTH;
- BLI_addtail(editnurb, nu); /* temporal for spin */
+ break;
+ case CU_PRIM_SPHERE: /* sphere */
+ if (cutype == CU_NURBS) {
+ float tmp_cent[3] = {0.f, 0.f, 0.f};
+ float tmp_vec[3] = {0.f, 0.f, 1.f};
+
+ nu->pntsu = 5;
+ nu->pntsv = 1;
+ nu->orderu = 3;
+ nu->resolu = cu->resolu;
+ nu->resolv = cu->resolv;
+ nu->flag = CU_SMOOTH;
+ nu->bp = callocstructN(BPoint, 5, "addNurbprim6");
+ nu->flagu = 0;
+ bp = nu->bp;
+
+ for (a = 0; a < 5; a++) {
+ bp->f1 = SELECT;
+ bp->vec[0] += nurbcircle[a][0] * grid;
+ bp->vec[2] += nurbcircle[a][1] * grid;
+ if (a & 1) bp->vec[3] = 0.5 * M_SQRT2;
+ else bp->vec[3] = 1.0;
+ mul_m4_v3(mat, bp->vec);
+ bp++;
+ }
+ nu->flagu = CU_NURB_BEZIER;
+ BKE_nurb_knot_calc_u(nu);
- /* same as above */
- if (newob && (U.flag & USER_ADD_VIEWALIGNED) == 0) spin_nurb(umat, obedit, tmp_vec, tmp_cent);
- else if ((U.flag & USER_ADD_VIEWALIGNED)) spin_nurb(viewmat, obedit, zvec, mat[3]);
- else spin_nurb(umat, obedit, tmp_vec, mat[3]);
+ BLI_addtail(editnurb, nu); /* temporal for spin */
+ if (newob && (U.flag & USER_ADD_VIEWALIGNED) == 0) spin_nurb(umat, obedit, tmp_vec, tmp_cent);
+ else if ((U.flag & USER_ADD_VIEWALIGNED)) spin_nurb(viewmat, obedit, zvec, mat[3]);
+ else spin_nurb(umat, obedit, tmp_vec, mat[3]);
- BLI_remlink(editnurb, nu);
+ BKE_nurb_knot_calc_v(nu);
- a= nu->pntsu*nu->pntsv;
- bp= nu->bp;
- while (a-- >0) {
- bp->f1 |= SELECT;
- bp++;
+ a = nu->pntsu * nu->pntsv;
+ bp = nu->bp;
+ while (a-- > 0) {
+ bp->f1 |= SELECT;
+ bp++;
+ }
+ BLI_remlink(editnurb, nu);
}
+ break;
+ case CU_PRIM_DONUT: /* torus */
+ if (cutype == CU_NURBS) {
+ float tmp_cent[3] = {0.f, 0.f, 0.f};
+ float tmp_vec[3] = {0.f, 0.f, 1.f};
+
+ xzproj = 1;
+ nu = add_nurbs_primitive(C, mat, CU_NURBS | CU_PRIM_CIRCLE, 0); /* circle */
+ xzproj = 0;
+ nu->resolu = cu->resolu;
+ nu->resolv = cu->resolv;
+ nu->flag = CU_SMOOTH;
+ BLI_addtail(editnurb, nu); /* temporal for spin */
+
+ /* same as above */
+ if (newob && (U.flag & USER_ADD_VIEWALIGNED) == 0) spin_nurb(umat, obedit, tmp_vec, tmp_cent);
+ else if ((U.flag & USER_ADD_VIEWALIGNED)) spin_nurb(viewmat, obedit, zvec, mat[3]);
+ else spin_nurb(umat, obedit, tmp_vec, mat[3]);
+
+
+ BLI_remlink(editnurb, nu);
+
+ a = nu->pntsu * nu->pntsv;
+ bp = nu->bp;
+ while (a-- > 0) {
+ bp->f1 |= SELECT;
+ bp++;
+ }
- }
- break;
+ }
+ break;
- default: /* should never happen */
- BLI_assert(!"invalid nurbs type");
- return NULL;
+ default: /* should never happen */
+ BLI_assert(!"invalid nurbs type");
+ return NULL;
}
BLI_assert(nu != NULL);
@@ -6529,7 +6524,7 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
if (nu) { /* should always be set */
nu->flag |= CU_SMOOTH;
- test2DNurb(nu);
+ BKE_nurb_test2D(nu);
}
return nu;
@@ -6537,10 +6532,10 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf)
{
- Object *obedit= CTX_data_edit_object(C);
+ Object *obedit = CTX_data_edit_object(C);
ListBase *editnurb;
Nurb *nu;
- int newob= 0;
+ int newob = 0;
int enter_editmode, is_aligned;
unsigned int layer;
float loc[3], rot[3];
@@ -6550,23 +6545,23 @@ static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf)
return OPERATOR_CANCELLED;
if (!isSurf) { /* adding curve */
- if (obedit==NULL || obedit->type!=OB_CURVE) {
+ if (obedit == NULL || obedit->type != OB_CURVE) {
Curve *cu;
- obedit= ED_object_add_type(C, OB_CURVE, loc, rot, TRUE, layer);
+ obedit = ED_object_add_type(C, OB_CURVE, loc, rot, TRUE, layer);
newob = 1;
- cu= (Curve*)obedit->data;
+ cu = (Curve *)obedit->data;
cu->flag |= CU_DEFORM_FILL;
if (type & CU_PRIM_PATH)
- cu->flag |= CU_PATH|CU_3D;
+ cu->flag |= CU_PATH | CU_3D;
}
else DAG_id_tag_update(&obedit->id, OB_RECALC_DATA);
}
else { /* adding surface */
- if (obedit==NULL || obedit->type!=OB_SURF) {
- obedit= ED_object_add_type(C, OB_SURF, loc, rot, TRUE, layer);
+ if (obedit == NULL || obedit->type != OB_SURF) {
+ obedit = ED_object_add_type(C, OB_SURF, loc, rot, TRUE, layer);
newob = 1;
}
else DAG_id_tag_update(&obedit->id, OB_RECALC_DATA);
@@ -6575,7 +6570,7 @@ static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf)
/* rename here, the undo stack checks name for valid undo pushes */
if (newob) {
- if (obedit->type==OB_CURVE) {
+ if (obedit->type == OB_CURVE) {
rename_id((ID *)obedit, get_curve_defname(type));
rename_id((ID *)obedit->data, get_curve_defname(type));
}
@@ -6591,8 +6586,8 @@ static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf)
ED_object_new_primitive_matrix(C, obedit, loc, rot, mat);
- nu= add_nurbs_primitive(C, mat, type, newob);
- editnurb= object_editcurve_get(obedit);
+ nu = add_nurbs_primitive(C, mat, type, newob);
+ editnurb = object_editcurve_get(obedit);
BLI_addtail(editnurb, nu);
/* userdef */
@@ -6600,7 +6595,7 @@ static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf)
ED_object_exit_editmode(C, EM_FREEDATA);
}
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, obedit);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, obedit);
return OPERATOR_FINISHED;
}
@@ -6619,7 +6614,7 @@ static int surf_prim_add(bContext *C, wmOperator *op, int type)
static int add_primitive_bezier_exec(bContext *C, wmOperator *op)
{
- return curve_prim_add(C, op, CU_BEZIER|CU_PRIM_CURVE);
+ return curve_prim_add(C, op, CU_BEZIER | CU_PRIM_CURVE);
}
void CURVE_OT_primitive_bezier_curve_add(wmOperatorType *ot)
@@ -6635,14 +6630,14 @@ void CURVE_OT_primitive_bezier_curve_add(wmOperatorType *ot)
ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
ED_object_add_generic_props(ot, TRUE);
}
static int add_primitive_bezier_circle_exec(bContext *C, wmOperator *op)
{
- return curve_prim_add(C, op, CU_BEZIER|CU_PRIM_CIRCLE);
+ return curve_prim_add(C, op, CU_BEZIER | CU_PRIM_CIRCLE);
}
void CURVE_OT_primitive_bezier_circle_add(wmOperatorType *ot)
@@ -6658,14 +6653,14 @@ void CURVE_OT_primitive_bezier_circle_add(wmOperatorType *ot)
ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
ED_object_add_generic_props(ot, TRUE);
}
static int add_primitive_nurbs_curve_exec(bContext *C, wmOperator *op)
{
- return curve_prim_add(C, op, CU_NURBS|CU_PRIM_CURVE);
+ return curve_prim_add(C, op, CU_NURBS | CU_PRIM_CURVE);
}
void CURVE_OT_primitive_nurbs_curve_add(wmOperatorType *ot)
@@ -6681,14 +6676,14 @@ void CURVE_OT_primitive_nurbs_curve_add(wmOperatorType *ot)
ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
ED_object_add_generic_props(ot, TRUE);
}
static int add_primitive_nurbs_circle_exec(bContext *C, wmOperator *op)
{
- return curve_prim_add(C, op, CU_NURBS|CU_PRIM_CIRCLE);
+ return curve_prim_add(C, op, CU_NURBS | CU_PRIM_CIRCLE);
}
void CURVE_OT_primitive_nurbs_circle_add(wmOperatorType *ot)
@@ -6704,14 +6699,14 @@ void CURVE_OT_primitive_nurbs_circle_add(wmOperatorType *ot)
ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
ED_object_add_generic_props(ot, TRUE);
}
static int add_primitive_curve_path_exec(bContext *C, wmOperator *op)
{
- return curve_prim_add(C, op, CU_NURBS|CU_PRIM_PATH);
+ return curve_prim_add(C, op, CU_NURBS | CU_PRIM_PATH);
}
void CURVE_OT_primitive_nurbs_path_add(wmOperatorType *ot)
@@ -6727,7 +6722,7 @@ void CURVE_OT_primitive_nurbs_path_add(wmOperatorType *ot)
ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
ED_object_add_generic_props(ot, TRUE);
}
@@ -6735,7 +6730,7 @@ void CURVE_OT_primitive_nurbs_path_add(wmOperatorType *ot)
/* **************** NURBS surfaces ********************** */
static int add_primitive_nurbs_surface_curve_exec(bContext *C, wmOperator *op)
{
- return surf_prim_add(C, op, CU_PRIM_CURVE|CU_NURBS);
+ return surf_prim_add(C, op, CU_PRIM_CURVE | CU_NURBS);
}
void SURFACE_OT_primitive_nurbs_surface_curve_add(wmOperatorType *ot)
@@ -6751,14 +6746,14 @@ void SURFACE_OT_primitive_nurbs_surface_curve_add(wmOperatorType *ot)
ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
ED_object_add_generic_props(ot, TRUE);
}
static int add_primitive_nurbs_surface_circle_exec(bContext *C, wmOperator *op)
{
- return surf_prim_add(C, op, CU_PRIM_CIRCLE|CU_NURBS);
+ return surf_prim_add(C, op, CU_PRIM_CIRCLE | CU_NURBS);
}
void SURFACE_OT_primitive_nurbs_surface_circle_add(wmOperatorType *ot)
@@ -6774,14 +6769,14 @@ void SURFACE_OT_primitive_nurbs_surface_circle_add(wmOperatorType *ot)
ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
ED_object_add_generic_props(ot, TRUE);
}
static int add_primitive_nurbs_surface_surface_exec(bContext *C, wmOperator *op)
{
- return surf_prim_add(C, op, CU_PRIM_PATCH|CU_NURBS);
+ return surf_prim_add(C, op, CU_PRIM_PATCH | CU_NURBS);
}
void SURFACE_OT_primitive_nurbs_surface_surface_add(wmOperatorType *ot)
@@ -6797,14 +6792,14 @@ void SURFACE_OT_primitive_nurbs_surface_surface_add(wmOperatorType *ot)
ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
ED_object_add_generic_props(ot, TRUE);
}
static int add_primitive_nurbs_surface_cylinder_exec(bContext *C, wmOperator *op)
{
- return surf_prim_add(C, op, CU_PRIM_TUBE|CU_NURBS);
+ return surf_prim_add(C, op, CU_PRIM_TUBE | CU_NURBS);
}
void SURFACE_OT_primitive_nurbs_surface_cylinder_add(wmOperatorType *ot)
@@ -6820,14 +6815,14 @@ void SURFACE_OT_primitive_nurbs_surface_cylinder_add(wmOperatorType *ot)
ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
ED_object_add_generic_props(ot, TRUE);
}
static int add_primitive_nurbs_surface_sphere_exec(bContext *C, wmOperator *op)
{
- return surf_prim_add(C, op, CU_PRIM_SPHERE|CU_NURBS);
+ return surf_prim_add(C, op, CU_PRIM_SPHERE | CU_NURBS);
}
void SURFACE_OT_primitive_nurbs_surface_sphere_add(wmOperatorType *ot)
@@ -6843,14 +6838,14 @@ void SURFACE_OT_primitive_nurbs_surface_sphere_add(wmOperatorType *ot)
ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
ED_object_add_generic_props(ot, TRUE);
}
static int add_primitive_nurbs_surface_torus_exec(bContext *C, wmOperator *op)
{
- return surf_prim_add(C, op, CU_PRIM_DONUT|CU_NURBS);
+ return surf_prim_add(C, op, CU_PRIM_DONUT | CU_NURBS);
}
void SURFACE_OT_primitive_nurbs_surface_torus_add(wmOperatorType *ot)
@@ -6866,7 +6861,7 @@ void SURFACE_OT_primitive_nurbs_surface_torus_add(wmOperatorType *ot)
ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
ED_object_add_generic_props(ot, TRUE);
}
@@ -6875,34 +6870,34 @@ void SURFACE_OT_primitive_nurbs_surface_torus_add(wmOperatorType *ot)
static int clear_tilt_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *obedit= CTX_data_edit_object(C);
- Curve *cu= obedit->data;
- ListBase *editnurb= object_editcurve_get(obedit);
+ Object *obedit = CTX_data_edit_object(C);
+ Curve *cu = obedit->data;
+ ListBase *editnurb = object_editcurve_get(obedit);
Nurb *nu;
BezTriple *bezt;
BPoint *bp;
int a;
- for (nu= editnurb->first; nu; nu= nu->next) {
- if ( nu->bezt ) {
- bezt= nu->bezt;
- a= nu->pntsu;
+ for (nu = editnurb->first; nu; nu = nu->next) {
+ if (nu->bezt) {
+ bezt = nu->bezt;
+ a = nu->pntsu;
while (a--) {
- if (BEZSELECTED_HIDDENHANDLES(cu, bezt)) bezt->alfa= 0.0;
+ if (BEZSELECTED_HIDDENHANDLES(cu, bezt)) bezt->alfa = 0.0;
bezt++;
}
}
else if (nu->bp) {
- bp= nu->bp;
- a= nu->pntsu*nu->pntsv;
+ bp = nu->bp;
+ a = nu->pntsu * nu->pntsv;
while (a--) {
- if (bp->f1 & SELECT) bp->alfa= 0.0;
+ if (bp->f1 & SELECT) bp->alfa = 0.0f;
bp++;
}
}
}
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
DAG_id_tag_update(obedit->data, 0);
return OPERATOR_FINISHED;
@@ -6913,13 +6908,14 @@ void CURVE_OT_tilt_clear(wmOperatorType *ot)
/* identifiers */
ot->name = "Clear Tilt";
ot->idname = "CURVE_OT_tilt_clear";
+ ot->description = "Clear the tilt of selected control points";
/* api callbacks */
ot->exec = clear_tilt_exec;
ot->poll = ED_operator_editcurve;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/****************** undo for curves ****************/
@@ -6927,15 +6923,15 @@ void CURVE_OT_tilt_clear(wmOperatorType *ot)
static void *undo_check_lastsel(void *lastsel, Nurb *nu, Nurb *newnu)
{
if (nu->bezt) {
- BezTriple *lastbezt= (BezTriple*)lastsel;
- if (lastbezt >= nu->bezt && lastbezt < nu->bezt + nu->pntsu) {
- return newnu->bezt + (lastbezt - nu->bezt);
+ BezTriple *lastbezt = (BezTriple *)lastsel;
+ if (lastbezt >= nu->bezt && lastbezt < &nu->bezt[nu->pntsu]) {
+ return &newnu->bezt[lastbezt - nu->bezt];
}
}
else {
- BPoint *lastbp= (BPoint*)lastsel;
- if (lastbp >= nu->bp && lastbp < nu->bp + nu->pntsu*nu->pntsv) {
- return newnu->bp + (lastbp - nu->bp);
+ BPoint *lastbp = (BPoint *)lastsel;
+ if (lastbp >= nu->bp && lastbp < &nu->bp[nu->pntsu * nu->pntsv]) {
+ return &newnu->bp[lastbp - nu->bp];
}
}
@@ -6944,20 +6940,20 @@ static void *undo_check_lastsel(void *lastsel, Nurb *nu, Nurb *newnu)
static void undoCurve_to_editCurve(void *ucu, void *UNUSED(edata), void *cu_v)
{
- Curve *cu= cu_v;
- UndoCurve *undoCurve= ucu;
- ListBase *undobase= &undoCurve->nubase;
- ListBase *editbase= curve_editnurbs(cu);
+ Curve *cu = cu_v;
+ UndoCurve *undoCurve = ucu;
+ ListBase *undobase = &undoCurve->nubase;
+ ListBase *editbase = BKE_curve_editNurbs_get(cu);
Nurb *nu, *newnu;
- EditNurb *editnurb= cu->editnurb;
- void *lastsel= NULL;
- AnimData *ad= BKE_animdata_from_id(&cu->id);
+ EditNurb *editnurb = cu->editnurb;
+ void *lastsel = NULL;
+ AnimData *ad = BKE_animdata_from_id(&cu->id);
- freeNurblist(editbase);
+ BKE_nurbList_free(editbase);
if (undoCurve->undoIndex) {
BLI_ghash_free(editnurb->keyindex, NULL, (GHashValFreeFP)MEM_freeN);
- editnurb->keyindex= dupli_keyIndexHash(undoCurve->undoIndex);
+ editnurb->keyindex = dupli_keyIndexHash(undoCurve->undoIndex);
}
if (ad) {
@@ -6971,11 +6967,11 @@ static void undoCurve_to_editCurve(void *ucu, void *UNUSED(edata), void *cu_v)
}
/* copy */
- for (nu= undobase->first; nu; nu= nu->next) {
- newnu= duplicateNurb(nu);
+ for (nu = undobase->first; nu; nu = nu->next) {
+ newnu = BKE_nurb_duplicate(nu);
if (lastsel == NULL) {
- lastsel= undo_check_lastsel(undoCurve->lastsel, nu, newnu);
+ lastsel = undo_check_lastsel(undoCurve->lastsel, nu, newnu);
}
if (editnurb->keyindex) {
@@ -6985,26 +6981,26 @@ static void undoCurve_to_editCurve(void *ucu, void *UNUSED(edata), void *cu_v)
BLI_addtail(editbase, newnu);
}
- cu->lastsel= lastsel;
- cu->actnu= undoCurve->actnu;
+ cu->lastsel = lastsel;
+ cu->actnu = undoCurve->actnu;
ED_curve_updateAnimPaths(cu);
}
static void *editCurve_to_undoCurve(void *UNUSED(edata), void *cu_v)
{
- Curve *cu= cu_v;
- ListBase *nubase= curve_editnurbs(cu);
+ Curve *cu = cu_v;
+ ListBase *nubase = BKE_curve_editNurbs_get(cu);
UndoCurve *undoCurve;
- EditNurb *editnurb= cu->editnurb, tmpEditnurb;
+ EditNurb *editnurb = cu->editnurb, tmpEditnurb;
Nurb *nu, *newnu;
- void *lastsel= NULL;
- AnimData *ad= BKE_animdata_from_id(&cu->id);
+ void *lastsel = NULL;
+ AnimData *ad = BKE_animdata_from_id(&cu->id);
- undoCurve= MEM_callocN(sizeof(UndoCurve), "undoCurve");
+ undoCurve = MEM_callocN(sizeof(UndoCurve), "undoCurve");
if (editnurb->keyindex) {
- undoCurve->undoIndex= dupli_keyIndexHash(editnurb->keyindex);
- tmpEditnurb.keyindex= undoCurve->undoIndex;
+ undoCurve->undoIndex = dupli_keyIndexHash(editnurb->keyindex);
+ tmpEditnurb.keyindex = undoCurve->undoIndex;
}
if (ad) {
@@ -7015,11 +7011,11 @@ static void *editCurve_to_undoCurve(void *UNUSED(edata), void *cu_v)
}
/* copy */
- for (nu= nubase->first; nu; nu= nu->next) {
- newnu= duplicateNurb(nu);
+ for (nu = nubase->first; nu; nu = nu->next) {
+ newnu = BKE_nurb_duplicate(nu);
if (lastsel == NULL) {
- lastsel= undo_check_lastsel(cu->lastsel, nu, newnu);
+ lastsel = undo_check_lastsel(cu->lastsel, nu, newnu);
}
if (undoCurve->undoIndex) {
@@ -7029,17 +7025,17 @@ static void *editCurve_to_undoCurve(void *UNUSED(edata), void *cu_v)
BLI_addtail(&undoCurve->nubase, newnu);
}
- undoCurve->lastsel= lastsel;
- undoCurve->actnu= cu->actnu;
+ undoCurve->lastsel = lastsel;
+ undoCurve->actnu = cu->actnu;
return undoCurve;
}
static void free_undoCurve(void *ucv)
{
- UndoCurve *undoCurve= ucv;
+ UndoCurve *undoCurve = ucv;
- freeNurblist(&undoCurve->nubase);
+ BKE_nurbList_free(&undoCurve->nubase);
if (undoCurve->undoIndex)
BLI_ghash_free(undoCurve->undoIndex, NULL, (GHashValFreeFP)MEM_freeN);
@@ -7052,7 +7048,7 @@ static void free_undoCurve(void *ucv)
static void *get_data(bContext *C)
{
- Object *obedit= CTX_data_edit_object(C);
+ Object *obedit = CTX_data_edit_object(C);
return obedit;
}
@@ -7064,30 +7060,30 @@ void undo_push_curve(bContext *C, const char *name)
void ED_curve_beztcpy(EditNurb *editnurb, BezTriple *dst, BezTriple *src, int count)
{
- memcpy(dst, src, count*sizeof(BezTriple));
+ memcpy(dst, src, count * sizeof(BezTriple));
keyIndex_updateBezt(editnurb, src, dst, count);
}
void ED_curve_bpcpy(EditNurb *editnurb, BPoint *dst, BPoint *src, int count)
{
- memcpy(dst, src, count*sizeof(BPoint));
+ memcpy(dst, src, count * sizeof(BPoint));
keyIndex_updateBP(editnurb, src, dst, count);
}
int ED_curve_actSelection(Curve *cu, float center[3])
{
- Nurb *nu= get_lastsel_nurb(cu);
+ Nurb *nu = get_lastsel_nurb(cu);
if (!nu)
return 0;
if (nu->bezt) {
- BezTriple *bezt= cu->lastsel;
+ BezTriple *bezt = cu->lastsel;
copy_v3_v3(center, bezt->vec[1]);
}
else {
- BPoint *bp= cu->lastsel;
+ BPoint *bp = cu->lastsel;
copy_v3_v3(center, bp->vec);
}
diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c
index 1f1d1495276..83f6b1d1824 100644
--- a/source/blender/editors/curve/editfont.c
+++ b/source/blender/editors/curve/editfont.c
@@ -74,135 +74,135 @@
#include "curve_intern.h"
-#define MAXTEXT 32766
+#define MAXTEXT 32766
/************************* utilities ******************************/
static char findaccent(char char1, unsigned int code)
{
- char new= 0;
-
- if (char1=='a') {
- if (code=='`') new= 224;
- else if (code==39) new= 225;
- else if (code=='^') new= 226;
- else if (code=='~') new= 227;
- else if (code=='"') new= 228;
- else if (code=='o') new= 229;
- else if (code=='e') new= 230;
- else if (code=='-') new= 170;
+ char new = 0;
+
+ if (char1 == 'a') {
+ if (code == '`') new = 224;
+ else if (code == 39) new = 225;
+ else if (code == '^') new = 226;
+ else if (code == '~') new = 227;
+ else if (code == '"') new = 228;
+ else if (code == 'o') new = 229;
+ else if (code == 'e') new = 230;
+ else if (code == '-') new = 170;
}
- else if (char1=='c') {
- if (code==',') new= 231;
- if (code=='|') new= 162;
+ else if (char1 == 'c') {
+ if (code == ',') new = 231;
+ if (code == '|') new = 162;
}
- else if (char1=='e') {
- if (code=='`') new= 232;
- else if (code==39) new= 233;
- else if (code=='^') new= 234;
- else if (code=='"') new= 235;
+ else if (char1 == 'e') {
+ if (code == '`') new = 232;
+ else if (code == 39) new = 233;
+ else if (code == '^') new = 234;
+ else if (code == '"') new = 235;
}
- else if (char1=='i') {
- if (code=='`') new= 236;
- else if (code==39) new= 237;
- else if (code=='^') new= 238;
- else if (code=='"') new= 239;
+ else if (char1 == 'i') {
+ if (code == '`') new = 236;
+ else if (code == 39) new = 237;
+ else if (code == '^') new = 238;
+ else if (code == '"') new = 239;
}
- else if (char1=='n') {
- if (code=='~') new= 241;
+ else if (char1 == 'n') {
+ if (code == '~') new = 241;
}
- else if (char1=='o') {
- if (code=='`') new= 242;
- else if (code==39) new= 243;
- else if (code=='^') new= 244;
- else if (code=='~') new= 245;
- else if (code=='"') new= 246;
- else if (code=='/') new= 248;
- else if (code=='-') new= 186;
- else if (code=='e') new= 143;
+ else if (char1 == 'o') {
+ if (code == '`') new = 242;
+ else if (code == 39) new = 243;
+ else if (code == '^') new = 244;
+ else if (code == '~') new = 245;
+ else if (code == '"') new = 246;
+ else if (code == '/') new = 248;
+ else if (code == '-') new = 186;
+ else if (code == 'e') new = 143;
}
- else if (char1=='s') {
- if (code=='s') new= 167;
+ else if (char1 == 's') {
+ if (code == 's') new = 167;
}
- else if (char1=='u') {
- if (code=='`') new= 249;
- else if (code==39) new= 250;
- else if (code=='^') new= 251;
- else if (code=='"') new= 252;
+ else if (char1 == 'u') {
+ if (code == '`') new = 249;
+ else if (code == 39) new = 250;
+ else if (code == '^') new = 251;
+ else if (code == '"') new = 252;
}
- else if (char1=='y') {
- if (code==39) new= 253;
- else if (code=='"') new= 255;
+ else if (char1 == 'y') {
+ if (code == 39) new = 253;
+ else if (code == '"') new = 255;
}
- else if (char1=='A') {
- if (code=='`') new= 192;
- else if (code==39) new= 193;
- else if (code=='^') new= 194;
- else if (code=='~') new= 195;
- else if (code=='"') new= 196;
- else if (code=='o') new= 197;
- else if (code=='e') new= 198;
+ else if (char1 == 'A') {
+ if (code == '`') new = 192;
+ else if (code == 39) new = 193;
+ else if (code == '^') new = 194;
+ else if (code == '~') new = 195;
+ else if (code == '"') new = 196;
+ else if (code == 'o') new = 197;
+ else if (code == 'e') new = 198;
}
- else if (char1=='C') {
- if (code==',') new= 199;
+ else if (char1 == 'C') {
+ if (code == ',') new = 199;
}
- else if (char1=='E') {
- if (code=='`') new= 200;
- else if (code==39) new= 201;
- else if (code=='^') new= 202;
- else if (code=='"') new= 203;
+ else if (char1 == 'E') {
+ if (code == '`') new = 200;
+ else if (code == 39) new = 201;
+ else if (code == '^') new = 202;
+ else if (code == '"') new = 203;
}
- else if (char1=='I') {
- if (code=='`') new= 204;
- else if (code==39) new= 205;
- else if (code=='^') new= 206;
- else if (code=='"') new= 207;
+ else if (char1 == 'I') {
+ if (code == '`') new = 204;
+ else if (code == 39) new = 205;
+ else if (code == '^') new = 206;
+ else if (code == '"') new = 207;
}
- else if (char1=='N') {
- if (code=='~') new= 209;
+ else if (char1 == 'N') {
+ if (code == '~') new = 209;
}
- else if (char1=='O') {
- if (code=='`') new= 210;
- else if (code==39) new= 211;
- else if (code=='^') new= 212;
- else if (code=='~') new= 213;
- else if (code=='"') new= 214;
- else if (code=='/') new= 216;
- else if (code=='e') new= 141;
+ else if (char1 == 'O') {
+ if (code == '`') new = 210;
+ else if (code == 39) new = 211;
+ else if (code == '^') new = 212;
+ else if (code == '~') new = 213;
+ else if (code == '"') new = 214;
+ else if (code == '/') new = 216;
+ else if (code == 'e') new = 141;
}
- else if (char1=='U') {
- if (code=='`') new= 217;
- else if (code==39) new= 218;
- else if (code=='^') new= 219;
- else if (code=='"') new= 220;
+ else if (char1 == 'U') {
+ if (code == '`') new = 217;
+ else if (code == 39) new = 218;
+ else if (code == '^') new = 219;
+ else if (code == '"') new = 220;
}
- else if (char1=='Y') {
- if (code==39) new= 221;
+ else if (char1 == 'Y') {
+ if (code == 39) new = 221;
}
- else if (char1=='1') {
- if (code=='4') new= 188;
- if (code=='2') new= 189;
+ else if (char1 == '1') {
+ if (code == '4') new = 188;
+ if (code == '2') new = 189;
}
- else if (char1=='3') {
- if (code=='4') new= 190;
+ else if (char1 == '3') {
+ if (code == '4') new = 190;
}
- else if (char1==':') {
- if (code=='-') new= 247;
+ else if (char1 == ':') {
+ if (code == '-') new = 247;
}
- else if (char1=='-') {
- if (code==':') new= 247;
- if (code=='|') new= 135;
- if (code=='+') new= 177;
+ else if (char1 == '-') {
+ if (code == ':') new = 247;
+ if (code == '|') new = 135;
+ if (code == '+') new = 177;
}
- else if (char1=='|') {
- if (code=='-') new= 135;
- if (code=='=') new= 136;
+ else if (char1 == '|') {
+ if (code == '-') new = 135;
+ if (code == '=') new = 136;
}
- else if (char1=='=') {
- if (code=='|') new= 136;
+ else if (char1 == '=') {
+ if (code == '|') new = 136;
}
- else if (char1=='+') {
- if (code=='-') new= 177;
+ else if (char1 == '+') {
+ if (code == '-') new = 177;
}
if (new) return new;
@@ -212,7 +212,7 @@ static char findaccent(char char1, unsigned int code)
static void update_string(Curve *cu)
{
- EditFont *ef= cu->editfont;
+ EditFont *ef = cu->editfont;
int len;
// Free the old curve string
@@ -230,22 +230,22 @@ static void update_string(Curve *cu)
static int insert_into_textbuf(Object *obedit, uintptr_t c)
{
- Curve *cu= obedit->data;
+ Curve *cu = obedit->data;
- if (cu->len<MAXTEXT-1) {
- EditFont *ef= cu->editfont;
+ if (cu->len < MAXTEXT - 1) {
+ EditFont *ef = cu->editfont;
int x;
- for (x= cu->len; x>cu->pos; x--) ef->textbuf[x]= ef->textbuf[x-1];
- for (x= cu->len; x>cu->pos; x--) ef->textbufinfo[x]= ef->textbufinfo[x-1];
- ef->textbuf[cu->pos]= c;
+ for (x = cu->len; x > cu->pos; x--) ef->textbuf[x] = ef->textbuf[x - 1];
+ for (x = cu->len; x > cu->pos; x--) ef->textbufinfo[x] = ef->textbufinfo[x - 1];
+ ef->textbuf[cu->pos] = c;
ef->textbufinfo[cu->pos] = cu->curinfo;
ef->textbufinfo[cu->pos].kern = 0;
ef->textbufinfo[cu->pos].mat_nr = obedit->actcol;
cu->pos++;
cu->len++;
- ef->textbuf[cu->len]='\0';
+ ef->textbuf[cu->len] = '\0';
update_string(cu);
@@ -257,63 +257,63 @@ static int insert_into_textbuf(Object *obedit, uintptr_t c)
static void text_update_edited(bContext *C, Scene *scene, Object *obedit, int recalc, int mode)
{
- struct Main *bmain= CTX_data_main(C);
- Curve *cu= obedit->data;
- EditFont *ef= cu->editfont;
- cu->curinfo = ef->textbufinfo[cu->pos?cu->pos-1:0];
+ struct Main *bmain = CTX_data_main(C);
+ Curve *cu = obedit->data;
+ EditFont *ef = cu->editfont;
+ cu->curinfo = ef->textbufinfo[cu->pos ? cu->pos - 1 : 0];
if (obedit->totcol > 0) {
- obedit->actcol= ef->textbufinfo[cu->pos?cu->pos-1:0].mat_nr;
+ obedit->actcol = ef->textbufinfo[cu->pos ? cu->pos - 1 : 0].mat_nr;
/* since this array is calloc'd, it can be 0 even though we try ensure
* (mat_nr > 0) almost everywhere */
if (obedit->actcol < 1) {
- obedit->actcol= 1;
+ obedit->actcol = 1;
}
}
if (mode == FO_EDIT)
update_string(cu);
- BKE_text_to_curve(bmain, scene, obedit, mode);
+ BKE_vfont_to_curve(bmain, scene, obedit, mode);
if (recalc)
DAG_id_tag_update(obedit->data, 0);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
}
/********************** insert lorem operator *********************/
static int insert_lorem_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *obedit= CTX_data_edit_object(C);
+ Object *obedit = CTX_data_edit_object(C);
const char *p, *p2;
int i;
static const char *lastlorem;
if (lastlorem)
- p= lastlorem;
+ p = lastlorem;
else
- p= ED_lorem;
+ p = ED_lorem;
- i= rand()/(RAND_MAX/6)+4;
+ i = rand() / (RAND_MAX / 6) + 4;
- for (p2=p; *p2 && i; p2++) {
+ for (p2 = p; *p2 && i; p2++) {
insert_into_textbuf(obedit, *p2);
- if (*p2=='.')
+ if (*p2 == '.')
i--;
}
- lastlorem = p2+1;
- if (strlen(lastlorem)<5)
+ lastlorem = p2 + 1;
+ if (strlen(lastlorem) < 5)
lastlorem = ED_lorem;
insert_into_textbuf(obedit, '\n');
insert_into_textbuf(obedit, '\n');
DAG_id_tag_update(obedit->data, 0);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
@@ -330,7 +330,7 @@ void FONT_OT_insert_lorem(wmOperatorType *ot)
ot->poll = ED_operator_editfont;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/******************* paste file operator ********************/
@@ -340,15 +340,15 @@ void FONT_OT_insert_lorem(wmOperatorType *ot)
static int paste_file(bContext *C, ReportList *reports, const char *filename)
{
- Scene *scene= CTX_data_scene(C);
- Object *obedit= CTX_data_edit_object(C);
- Curve *cu= obedit->data;
- EditFont *ef= cu->editfont;
+ Scene *scene = CTX_data_scene(C);
+ Object *obedit = CTX_data_edit_object(C);
+ Curve *cu = obedit->data;
+ EditFont *ef = cu->editfont;
FILE *fp;
int filelen;
char *strp;
- fp= BLI_fopen(filename, "r");
+ fp = BLI_fopen(filename, "r");
if (!fp) {
if (reports)
@@ -360,22 +360,22 @@ static int paste_file(bContext *C, ReportList *reports, const char *filename)
filelen = ftell(fp);
fseek(fp, 0L, SEEK_SET);
- strp= MEM_callocN(filelen+4, "tempstr");
+ strp = MEM_callocN(filelen + 4, "tempstr");
// fread() instead of read(), because windows read() converts text
// to DOS \r\n linebreaks, causing double linebreaks in the 3d text
filelen = fread(strp, 1, filelen, fp);
fclose(fp);
- strp[filelen]= 0;
+ strp[filelen] = 0;
- if (cu->len+filelen<MAXTEXT) {
+ if (cu->len + filelen < MAXTEXT) {
int tmplen;
- wchar_t *mem = MEM_callocN((sizeof(wchar_t)*filelen)+(4*sizeof(wchar_t)), "temporary");
+ wchar_t *mem = MEM_callocN((sizeof(wchar_t) * filelen) + (4 * sizeof(wchar_t)), "temporary");
tmplen = BLI_strncpy_wchar_from_utf8(mem, strp, filelen + 1);
wcscat(ef->textbuf, mem);
MEM_freeN(mem);
cu->len += tmplen;
- cu->pos= cu->len;
+ cu->pos = cu->len;
}
MEM_freeN(strp);
@@ -389,8 +389,8 @@ static int paste_file_exec(bContext *C, wmOperator *op)
char *path;
int retval;
- path= RNA_string_get_alloc(op->ptr, "filepath", NULL, 0);
- retval= paste_file(C, op->reports, path);
+ path = RNA_string_get_alloc(op->ptr, "filepath", NULL, 0);
+ retval = paste_file(C, op->reports, path);
MEM_freeN(path);
return retval;
@@ -419,17 +419,17 @@ void FONT_OT_file_paste(wmOperatorType *ot)
ot->poll = ED_operator_editfont;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
- WM_operator_properties_filesel(ot, FOLDERFILE|TEXTFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
+ WM_operator_properties_filesel(ot, FOLDERFILE | TEXTFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
}
/******************* text to object operator ********************/
static void txt_add_object(bContext *C, TextLine *firstline, int totline, float offset[3])
{
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
Curve *cu;
Object *obedit;
Base *base;
@@ -437,60 +437,60 @@ static void txt_add_object(bContext *C, TextLine *firstline, int totline, float
int nchars = 0, a;
float rot[3] = {0.f, 0.f, 0.f};
- obedit= add_object(scene, OB_FONT);
- base= scene->basact;
+ obedit = BKE_object_add(scene, OB_FONT);
+ base = scene->basact;
ED_object_base_init_transform(C, base, NULL, rot); /* seems to assume view align ? TODO - look into this, could be an operator option */
- where_is_object(scene, obedit);
+ BKE_object_where_is_calc(scene, obedit);
obedit->loc[0] += offset[0];
obedit->loc[1] += offset[1];
obedit->loc[2] += offset[2];
- cu= obedit->data;
- cu->vfont= get_builtin_font();
+ cu = obedit->data;
+ cu->vfont = BKE_vfont_builtin_get();
cu->vfont->id.us++;
- for (tmp=firstline, a=0; cu->len<MAXTEXT && a<totline; tmp=tmp->next, a++)
+ for (tmp = firstline, a = 0; cu->len < MAXTEXT && a < totline; tmp = tmp->next, a++)
nchars += strlen(tmp->line) + 1;
if (cu->str) MEM_freeN(cu->str);
if (cu->strinfo) MEM_freeN(cu->strinfo);
- cu->str= MEM_callocN(nchars+4, "str");
- cu->strinfo= MEM_callocN((nchars+4)*sizeof(CharInfo), "strinfo");
+ cu->str = MEM_callocN(nchars + 4, "str");
+ cu->strinfo = MEM_callocN((nchars + 4) * sizeof(CharInfo), "strinfo");
- cu->str[0]= '\0';
- cu->len= 0;
- cu->pos= 0;
+ cu->str[0] = '\0';
+ cu->len = 0;
+ cu->pos = 0;
- for (tmp=firstline, a=0; cu->len<MAXTEXT && a<totline; tmp=tmp->next, a++) {
+ for (tmp = firstline, a = 0; cu->len < MAXTEXT && a < totline; tmp = tmp->next, a++) {
strcat(cu->str, tmp->line);
- cu->len+= strlen(tmp->line);
+ cu->len += strlen(tmp->line);
if (tmp->next) {
strcat(cu->str, "\n");
cu->len++;
}
- cu->pos= cu->len;
+ cu->pos = cu->len;
}
- WM_event_add_notifier(C, NC_OBJECT|NA_ADDED, obedit);
+ WM_event_add_notifier(C, NC_OBJECT | NA_ADDED, obedit);
}
void ED_text_to_object(bContext *C, Text *text, int split_lines)
{
- RegionView3D *rv3d= CTX_wm_region_view3d(C);
+ RegionView3D *rv3d = CTX_wm_region_view3d(C);
TextLine *line;
float offset[3];
- int linenum= 0;
+ int linenum = 0;
if (!text || !text->lines.first) return;
if (split_lines) {
- for (line=text->lines.first; line; line=line->next) {
+ for (line = text->lines.first; line; line = line->next) {
/* skip lines with no text, but still make space for them */
if (line->line[0] == '\0') {
linenum++;
@@ -511,57 +511,66 @@ void ED_text_to_object(bContext *C, Text *text, int split_lines)
}
}
else {
- offset[0]= 0.0f;
- offset[1]= 0.0f;
- offset[2]= 0.0f;
+ offset[0] = 0.0f;
+ offset[1] = 0.0f;
+ offset[2] = 0.0f;
txt_add_object(C, text->lines.first, BLI_countlist(&text->lines), offset);
}
}
/********************** utilities ***************************/
-
static short next_word(Curve *cu)
{
short s;
- for (s=cu->pos; (cu->str[s]) && (cu->str[s]!=' ') && (cu->str[s]!='\n') &&
- (cu->str[s]!=1) && (cu->str[s]!='\r'); s++);
- if (cu->str[s]) return(s+1); else return(s);
+ for (s = cu->pos; ((cu->str[s]) && (cu->str[s] != ' ') && (cu->str[s] != '\n') &&
+ (cu->str[s] != 1) && (cu->str[s] != '\r'));
+ s++)
+ {
+ /* pass */
+ }
+
+ return cu->str[s] ? (s + 1) : s;
}
static short prev_word(Curve *cu)
{
short s;
- if (cu->pos==0) return(0);
- for (s=cu->pos-2; (cu->str[s]) && (cu->str[s]!=' ') && (cu->str[s]!='\n') &&
- (cu->str[s]!=1) && (cu->str[s]!='\r'); s--);
- if (cu->str[s]) return(s+1); else return(s);
+ if (cu->pos == 0) return(0);
+ for (s = cu->pos - 2; ((cu->str[s]) && (cu->str[s] != ' ') && (cu->str[s] != '\n') &&
+ (cu->str[s] != 1) && (cu->str[s] != '\r'));
+ s--)
+ {
+ /* pass */
+ }
+
+ return cu->str[s] ? (s + 1) : s;
}
-static int kill_selection(Object *obedit, int ins) /* 1 == new character */
+static int kill_selection(Object *obedit, int ins) /* 1 == new character */
{
- Curve *cu= obedit->data;
- EditFont *ef= cu->editfont;
+ Curve *cu = obedit->data;
+ EditFont *ef = cu->editfont;
int selend, selstart, direction;
int offset = 0;
int getfrom;
- direction = BKE_font_getselection(obedit, &selstart, &selend);
+ direction = BKE_vfont_select_get(obedit, &selstart, &selend);
if (direction) {
int size;
if (ins) offset = 1;
- if (cu->pos >= selstart) cu->pos = selstart+offset;
+ if (cu->pos >= selstart) cu->pos = selstart + offset;
if ((direction == -1) && ins) {
selstart++;
selend++;
}
- getfrom = selend+offset;
- if (ins==0) getfrom++;
- size = (cu->len * sizeof(wchar_t)) - (selstart * sizeof(wchar_t)) + (offset*sizeof(wchar_t));
- memmove(ef->textbuf+selstart, ef->textbuf+getfrom, size);
- memmove(ef->textbufinfo+selstart, ef->textbufinfo+getfrom, ((cu->len-selstart)+offset)*sizeof(CharInfo));
- cu->len -= (selend-selstart)+offset;
+ getfrom = selend + offset;
+ if (ins == 0) getfrom++;
+ size = (cu->len * sizeof(wchar_t)) - (selstart * sizeof(wchar_t)) + (offset * sizeof(wchar_t));
+ memmove(ef->textbuf + selstart, ef->textbuf + getfrom, size);
+ memmove(ef->textbufinfo + selstart, ef->textbufinfo + getfrom, ((cu->len - selstart) + offset) * sizeof(CharInfo));
+ cu->len -= (selend - selstart) + offset;
cu->selstart = cu->selend = 0;
}
@@ -570,24 +579,25 @@ static int kill_selection(Object *obedit, int ins) /* 1 == new character */
/******************* set style operator ********************/
-static EnumPropertyItem style_items[]= {
+static EnumPropertyItem style_items[] = {
{CU_CHINFO_BOLD, "BOLD", 0, "Bold", ""},
{CU_CHINFO_ITALIC, "ITALIC", 0, "Italic", ""},
{CU_CHINFO_UNDERLINE, "UNDERLINE", 0, "Underline", ""},
{CU_CHINFO_SMALLCAPS, "SMALL_CAPS", 0, "Small Caps", ""},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+};
static int set_style(bContext *C, const int style, const int clear)
{
- Object *obedit= CTX_data_edit_object(C);
- Curve *cu= obedit->data;
- EditFont *ef= cu->editfont;
+ Object *obedit = CTX_data_edit_object(C);
+ Curve *cu = obedit->data;
+ EditFont *ef = cu->editfont;
int i, selstart, selend;
- if (!BKE_font_getselection(obedit, &selstart, &selend))
+ if (!BKE_vfont_select_get(obedit, &selstart, &selend))
return OPERATOR_CANCELLED;
- for (i=selstart; i<=selend; i++) {
+ for (i = selstart; i <= selend; i++) {
if (clear)
ef->textbufinfo[i].flag &= ~style;
else
@@ -595,15 +605,15 @@ static int set_style(bContext *C, const int style, const int clear)
}
DAG_id_tag_update(obedit->data, 0);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
static int set_style_exec(bContext *C, wmOperator *op)
{
- const int style= RNA_enum_get(op->ptr, "style");
- const int clear= RNA_boolean_get(op->ptr, "clear");
+ const int style = RNA_enum_get(op->ptr, "style");
+ const int clear = RNA_boolean_get(op->ptr, "clear");
return set_style(C, style, clear);
}
@@ -620,7 +630,7 @@ void FONT_OT_style_set(wmOperatorType *ot)
ot->poll = ED_operator_editfont;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "style", style_items, CU_CHINFO_BOLD, "Style", "Style to set selection to");
@@ -631,17 +641,17 @@ void FONT_OT_style_set(wmOperatorType *ot)
static int toggle_style_exec(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_edit_object(C);
- Curve *cu= obedit->data;
+ Object *obedit = CTX_data_edit_object(C);
+ Curve *cu = obedit->data;
int style, clear, selstart, selend;
- if (!BKE_font_getselection(obedit, &selstart, &selend))
+ if (!BKE_vfont_select_get(obedit, &selstart, &selend))
return OPERATOR_CANCELLED;
- style= RNA_enum_get(op->ptr, "style");
+ style = RNA_enum_get(op->ptr, "style");
cu->curinfo.flag ^= style;
- clear= (cu->curinfo.flag & style) == 0;
+ clear = (cu->curinfo.flag & style) == 0;
return set_style(C, style, clear);
}
@@ -658,7 +668,7 @@ void FONT_OT_style_toggle(wmOperatorType *ot)
ot->poll = ED_operator_editfont;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "style", style_items, CU_CHINFO_BOLD, "Style", "Style to set selection to");
@@ -670,19 +680,19 @@ static void copy_selection(Object *obedit)
{
int selstart, selend;
- if (BKE_font_getselection(obedit, &selstart, &selend)) {
- Curve *cu= obedit->data;
- EditFont *ef= cu->editfont;
+ if (BKE_vfont_select_get(obedit, &selstart, &selend)) {
+ Curve *cu = obedit->data;
+ EditFont *ef = cu->editfont;
- memcpy(ef->copybuf, ef->textbuf+selstart, ((selend-selstart)+1)*sizeof(wchar_t));
- ef->copybuf[(selend-selstart)+1]=0;
- memcpy(ef->copybufinfo, ef->textbufinfo+selstart, ((selend-selstart)+1)*sizeof(CharInfo));
+ memcpy(ef->copybuf, ef->textbuf + selstart, ((selend - selstart) + 1) * sizeof(wchar_t));
+ ef->copybuf[(selend - selstart) + 1] = 0;
+ memcpy(ef->copybufinfo, ef->textbufinfo + selstart, ((selend - selstart) + 1) * sizeof(CharInfo));
}
}
static int copy_text_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *obedit= CTX_data_edit_object(C);
+ Object *obedit = CTX_data_edit_object(C);
copy_selection(obedit);
@@ -705,11 +715,11 @@ void FONT_OT_text_copy(wmOperatorType *ot)
static int cut_text_exec(bContext *C, wmOperator *UNUSED(op))
{
- Scene *scene= CTX_data_scene(C);
- Object *obedit= CTX_data_edit_object(C);
+ Scene *scene = CTX_data_scene(C);
+ Object *obedit = CTX_data_edit_object(C);
int selstart, selend;
- if (!BKE_font_getselection(obedit, &selstart, &selend))
+ if (!BKE_vfont_select_get(obedit, &selstart, &selend))
return OPERATOR_CANCELLED;
copy_selection(obedit);
@@ -732,26 +742,26 @@ void FONT_OT_text_cut(wmOperatorType *ot)
ot->poll = ED_operator_editfont;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/******************* paste text operator ********************/
static int paste_selection(Object *obedit, ReportList *reports)
{
- Curve *cu= obedit->data;
- EditFont *ef= cu->editfont;
- int len= wcslen(ef->copybuf);
+ Curve *cu = obedit->data;
+ EditFont *ef = cu->editfont;
+ int len = wcslen(ef->copybuf);
// Verify that the copy buffer => [copy buffer len] + cu->len < MAXTEXT
if (cu->len + len <= MAXTEXT) {
if (len) {
- int size = (cu->len * sizeof(wchar_t)) - (cu->pos*sizeof(wchar_t)) + sizeof(wchar_t);
- memmove(ef->textbuf+cu->pos+len, ef->textbuf+cu->pos, size);
- memcpy(ef->textbuf+cu->pos, ef->copybuf, len * sizeof(wchar_t));
+ int size = (cu->len * sizeof(wchar_t)) - (cu->pos * sizeof(wchar_t)) + sizeof(wchar_t);
+ memmove(ef->textbuf + cu->pos + len, ef->textbuf + cu->pos, size);
+ memcpy(ef->textbuf + cu->pos, ef->copybuf, len * sizeof(wchar_t));
- memmove(ef->textbufinfo+cu->pos+len, ef->textbufinfo+cu->pos, (cu->len-cu->pos+1)*sizeof(CharInfo));
- memcpy(ef->textbufinfo+cu->pos, ef->copybufinfo, len*sizeof(CharInfo));
+ memmove(ef->textbufinfo + cu->pos + len, ef->textbufinfo + cu->pos, (cu->len - cu->pos + 1) * sizeof(CharInfo));
+ memcpy(ef->textbufinfo + cu->pos, ef->copybufinfo, len * sizeof(CharInfo));
cu->len += len;
cu->pos += len;
@@ -767,8 +777,8 @@ static int paste_selection(Object *obedit, ReportList *reports)
static int paste_text_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
- Object *obedit= CTX_data_edit_object(C);
+ Scene *scene = CTX_data_scene(C);
+ Object *obedit = CTX_data_edit_object(C);
if (!paste_selection(obedit, op->reports))
return OPERATOR_CANCELLED;
@@ -790,12 +800,12 @@ void FONT_OT_text_paste(wmOperatorType *ot)
ot->poll = ED_operator_editfont;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/************************ move operator ************************/
-static EnumPropertyItem move_type_items[]= {
+static EnumPropertyItem move_type_items[] = {
{LINE_BEGIN, "LINE_BEGIN", 0, "Line Begin", ""},
{LINE_END, "LINE_END", 0, "Line End", ""},
{PREV_CHAR, "PREVIOUS_CHARACTER", 0, "Previous Character", ""},
@@ -810,77 +820,77 @@ static EnumPropertyItem move_type_items[]= {
static int move_cursor(bContext *C, int type, int select)
{
- Scene *scene= CTX_data_scene(C);
- Object *obedit= CTX_data_edit_object(C);
- Curve *cu= obedit->data;
- EditFont *ef= cu->editfont;
- int cursmove= -1;
+ Scene *scene = CTX_data_scene(C);
+ Object *obedit = CTX_data_edit_object(C);
+ Curve *cu = obedit->data;
+ EditFont *ef = cu->editfont;
+ int cursmove = -1;
- switch(type) {
+ switch (type) {
case LINE_BEGIN:
- if ((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1;
- while (cu->pos>0) {
- if (ef->textbuf[cu->pos-1]=='\n') break;
- if (ef->textbufinfo[cu->pos-1].flag & CU_CHINFO_WRAP) break;
+ if ((select) && (cu->selstart == 0)) cu->selstart = cu->selend = cu->pos + 1;
+ while (cu->pos > 0) {
+ if (ef->textbuf[cu->pos - 1] == '\n') break;
+ if (ef->textbufinfo[cu->pos - 1].flag & CU_CHINFO_WRAP) break;
cu->pos--;
}
- cursmove=FO_CURS;
+ cursmove = FO_CURS;
break;
case LINE_END:
- if ((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1;
- while (cu->pos<cu->len) {
- if (ef->textbuf[cu->pos]==0) break;
- if (ef->textbuf[cu->pos]=='\n') break;
- if (ef->textbufinfo[cu->pos].flag & CU_CHINFO_WRAP ) break;
+ if ((select) && (cu->selstart == 0)) cu->selstart = cu->selend = cu->pos + 1;
+ while (cu->pos < cu->len) {
+ if (ef->textbuf[cu->pos] == 0) break;
+ if (ef->textbuf[cu->pos] == '\n') break;
+ if (ef->textbufinfo[cu->pos].flag & CU_CHINFO_WRAP) break;
cu->pos++;
}
- cursmove=FO_CURS;
+ cursmove = FO_CURS;
break;
case PREV_WORD:
- if ((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1;
- cu->pos= prev_word(cu);
- cursmove= FO_CURS;
+ if ((select) && (cu->selstart == 0)) cu->selstart = cu->selend = cu->pos + 1;
+ cu->pos = prev_word(cu);
+ cursmove = FO_CURS;
break;
case NEXT_WORD:
- if ((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1;
- cu->pos= next_word(cu);
- cursmove= FO_CURS;
+ if ((select) && (cu->selstart == 0)) cu->selstart = cu->selend = cu->pos + 1;
+ cu->pos = next_word(cu);
+ cursmove = FO_CURS;
break;
case PREV_CHAR:
- if ((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1;
+ if ((select) && (cu->selstart == 0)) cu->selstart = cu->selend = cu->pos + 1;
cu->pos--;
- cursmove=FO_CURS;
+ cursmove = FO_CURS;
break;
case NEXT_CHAR:
- if ((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1;
+ if ((select) && (cu->selstart == 0)) cu->selstart = cu->selend = cu->pos + 1;
cu->pos++;
- cursmove= FO_CURS;
+ cursmove = FO_CURS;
break;
case PREV_LINE:
- if ((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1;
- cursmove=FO_CURSUP;
+ if ((select) && (cu->selstart == 0)) cu->selstart = cu->selend = cu->pos + 1;
+ cursmove = FO_CURSUP;
break;
case NEXT_LINE:
- if ((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1;
- cursmove= FO_CURSDOWN;
+ if ((select) && (cu->selstart == 0)) cu->selstart = cu->selend = cu->pos + 1;
+ cursmove = FO_CURSDOWN;
break;
case PREV_PAGE:
- if ((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1;
- cursmove=FO_PAGEUP;
+ if ((select) && (cu->selstart == 0)) cu->selstart = cu->selend = cu->pos + 1;
+ cursmove = FO_PAGEUP;
break;
case NEXT_PAGE:
- if ((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1;
- cursmove=FO_PAGEDOWN;
+ if ((select) && (cu->selstart == 0)) cu->selstart = cu->selend = cu->pos + 1;
+ cursmove = FO_PAGEDOWN;
break;
}
@@ -889,16 +899,16 @@ static int move_cursor(bContext *C, int type, int select)
if (select == 0) {
if (cu->selstart) {
- struct Main *bmain= CTX_data_main(C);
+ struct Main *bmain = CTX_data_main(C);
cu->selstart = cu->selend = 0;
update_string(cu);
- BKE_text_to_curve(bmain, scene, obedit, FO_SELCHANGE);
+ BKE_vfont_to_curve(bmain, scene, obedit, FO_SELCHANGE);
}
}
- if (cu->pos>cu->len) cu->pos= cu->len;
- else if (cu->pos>=MAXTEXT) cu->pos= MAXTEXT;
- else if (cu->pos<0) cu->pos= 0;
+ if (cu->pos > cu->len) cu->pos = cu->len;
+ else if (cu->pos >= MAXTEXT) cu->pos = MAXTEXT;
+ else if (cu->pos < 0) cu->pos = 0;
text_update_edited(C, scene, obedit, select, cursmove);
@@ -910,7 +920,7 @@ static int move_cursor(bContext *C, int type, int select)
static int move_exec(bContext *C, wmOperator *op)
{
- int type= RNA_enum_get(op->ptr, "type");
+ int type = RNA_enum_get(op->ptr, "type");
return move_cursor(C, type, 0);
}
@@ -927,7 +937,7 @@ void FONT_OT_move(wmOperatorType *ot)
ot->poll = ED_operator_editfont;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "type", move_type_items, LINE_BEGIN, "Type", "Where to move cursor to");
@@ -937,7 +947,7 @@ void FONT_OT_move(wmOperatorType *ot)
static int move_select_exec(bContext *C, wmOperator *op)
{
- int type= RNA_enum_get(op->ptr, "type");
+ int type = RNA_enum_get(op->ptr, "type");
return move_cursor(C, type, 1);
}
@@ -954,7 +964,7 @@ void FONT_OT_move_select(wmOperatorType *ot)
ot->poll = ED_operator_editfont;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "type", move_type_items, LINE_BEGIN, "Type", "Where to move cursor to, to make a selection");
@@ -964,20 +974,20 @@ void FONT_OT_move_select(wmOperatorType *ot)
static int change_spacing_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
- Object *obedit= CTX_data_edit_object(C);
- Curve *cu= obedit->data;
- EditFont *ef= cu->editfont;
- int kern, delta= RNA_int_get(op->ptr, "delta");
+ Scene *scene = CTX_data_scene(C);
+ Object *obedit = CTX_data_edit_object(C);
+ Curve *cu = obedit->data;
+ EditFont *ef = cu->editfont;
+ int kern, delta = RNA_int_get(op->ptr, "delta");
- kern = ef->textbufinfo[cu->pos-1].kern;
+ kern = ef->textbufinfo[cu->pos - 1].kern;
kern += delta;
CLAMP(kern, -20, 20);
- if (ef->textbufinfo[cu->pos-1].kern == kern)
+ if (ef->textbufinfo[cu->pos - 1].kern == kern)
return OPERATOR_CANCELLED;
- ef->textbufinfo[cu->pos-1].kern = kern;
+ ef->textbufinfo[cu->pos - 1].kern = kern;
text_update_edited(C, scene, obedit, 1, FO_EDIT);
@@ -996,7 +1006,7 @@ void FONT_OT_change_spacing(wmOperatorType *ot)
ot->poll = ED_operator_editfont;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_int(ot->srna, "delta", 1, -20, 20, "Delta", "Amount to decrease or increase character spacing with", -20, 20);
@@ -1006,23 +1016,23 @@ void FONT_OT_change_spacing(wmOperatorType *ot)
static int change_character_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
- Object *obedit= CTX_data_edit_object(C);
- Curve *cu= obedit->data;
- EditFont *ef= cu->editfont;
- int character, delta= RNA_int_get(op->ptr, "delta");
+ Scene *scene = CTX_data_scene(C);
+ Object *obedit = CTX_data_edit_object(C);
+ Curve *cu = obedit->data;
+ EditFont *ef = cu->editfont;
+ int character, delta = RNA_int_get(op->ptr, "delta");
if (cu->pos <= 0)
return OPERATOR_CANCELLED;
- character= ef->textbuf[cu->pos - 1];
+ character = ef->textbuf[cu->pos - 1];
character += delta;
CLAMP(character, 0, 255);
if (character == ef->textbuf[cu->pos - 1])
return OPERATOR_CANCELLED;
- ef->textbuf[cu->pos - 1]= character;
+ ef->textbuf[cu->pos - 1] = character;
text_update_edited(C, scene, obedit, 1, FO_EDIT);
@@ -1041,7 +1051,7 @@ void FONT_OT_change_character(wmOperatorType *ot)
ot->poll = ED_operator_editfont;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_int(ot->srna, "delta", 1, -255, 255, "Delta", "Number to increase or decrease character code with", -255, 255);
@@ -1051,15 +1061,15 @@ void FONT_OT_change_character(wmOperatorType *ot)
static int line_break_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
- Object *obedit= CTX_data_edit_object(C);
- Curve *cu= obedit->data;
- EditFont *ef= cu->editfont;
- const int ctrl= RNA_boolean_get(op->ptr, "ctrl");
+ Scene *scene = CTX_data_scene(C);
+ Object *obedit = CTX_data_edit_object(C);
+ Curve *cu = obedit->data;
+ EditFont *ef = cu->editfont;
+ const int ctrl = RNA_boolean_get(op->ptr, "ctrl");
if (ctrl) {
insert_into_textbuf(obedit, 1);
- if (ef->textbuf[cu->pos]!='\n')
+ if (ef->textbuf[cu->pos] != '\n')
insert_into_textbuf(obedit, '\n');
}
else
@@ -1084,7 +1094,7 @@ void FONT_OT_line_break(wmOperatorType *ot)
ot->poll = ED_operator_editfont;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "ctrl", 0, "Ctrl", ""); // XXX what is this?
@@ -1092,7 +1102,7 @@ void FONT_OT_line_break(wmOperatorType *ot)
/******************* delete operator **********************/
-static EnumPropertyItem delete_type_items[]= {
+static EnumPropertyItem delete_type_items[] = {
{DEL_ALL, "ALL", 0, "All", ""},
{DEL_NEXT_CHAR, "NEXT_CHARACTER", 0, "Next Character", ""},
{DEL_PREV_CHAR, "PREVIOUS_CHARACTER", 0, "Previous Character", ""},
@@ -1103,55 +1113,55 @@ static EnumPropertyItem delete_type_items[]= {
static int delete_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
- Object *obedit= CTX_data_edit_object(C);
- Curve *cu= obedit->data;
- EditFont *ef= cu->editfont;
- int x, selstart, selend, type= RNA_enum_get(op->ptr, "type");
+ Scene *scene = CTX_data_scene(C);
+ Object *obedit = CTX_data_edit_object(C);
+ Curve *cu = obedit->data;
+ EditFont *ef = cu->editfont;
+ int x, selstart, selend, type = RNA_enum_get(op->ptr, "type");
if (cu->len == 0)
return OPERATOR_CANCELLED;
- if (BKE_font_getselection(obedit, &selstart, &selend)) {
- if (type == DEL_NEXT_SEL) type= DEL_SELECTION;
- else if (type == DEL_PREV_SEL) type= DEL_SELECTION;
+ if (BKE_vfont_select_get(obedit, &selstart, &selend)) {
+ if (type == DEL_NEXT_SEL) type = DEL_SELECTION;
+ else if (type == DEL_PREV_SEL) type = DEL_SELECTION;
}
else {
- if (type == DEL_NEXT_SEL) type= DEL_NEXT_CHAR;
- else if (type == DEL_PREV_SEL) type= DEL_PREV_CHAR;
+ if (type == DEL_NEXT_SEL) type = DEL_NEXT_CHAR;
+ else if (type == DEL_PREV_SEL) type = DEL_PREV_CHAR;
}
- switch(type) {
+ switch (type) {
case DEL_ALL:
cu->len = cu->pos = 0;
- ef->textbuf[0]= 0;
+ ef->textbuf[0] = 0;
break;
case DEL_SELECTION:
if (!kill_selection(obedit, 0))
return OPERATOR_CANCELLED;
break;
case DEL_PREV_CHAR:
- if (cu->pos<=0)
+ if (cu->pos <= 0)
return OPERATOR_CANCELLED;
- for (x=cu->pos;x<=cu->len;x++)
- ef->textbuf[x-1]= ef->textbuf[x];
- for (x=cu->pos;x<=cu->len;x++)
- ef->textbufinfo[x-1]= ef->textbufinfo[x];
+ for (x = cu->pos; x <= cu->len; x++)
+ ef->textbuf[x - 1] = ef->textbuf[x];
+ for (x = cu->pos; x <= cu->len; x++)
+ ef->textbufinfo[x - 1] = ef->textbufinfo[x];
cu->pos--;
- ef->textbuf[--cu->len]='\0';
+ ef->textbuf[--cu->len] = '\0';
break;
case DEL_NEXT_CHAR:
- if (cu->pos>=cu->len)
+ if (cu->pos >= cu->len)
return OPERATOR_CANCELLED;
- for (x=cu->pos;x<cu->len;x++)
- ef->textbuf[x]= ef->textbuf[x+1];
- for (x=cu->pos;x<cu->len;x++)
- ef->textbufinfo[x]= ef->textbufinfo[x+1];
+ for (x = cu->pos; x < cu->len; x++)
+ ef->textbuf[x] = ef->textbuf[x + 1];
+ for (x = cu->pos; x < cu->len; x++)
+ ef->textbufinfo[x] = ef->textbufinfo[x + 1];
- ef->textbuf[--cu->len]='\0';
+ ef->textbuf[--cu->len] = '\0';
break;
default:
return OPERATOR_CANCELLED;
@@ -1174,7 +1184,7 @@ void FONT_OT_delete(wmOperatorType *ot)
ot->poll = ED_operator_editfont;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "type", delete_type_items, DEL_ALL, "Type", "Which part of the text to delete");
@@ -1184,8 +1194,8 @@ void FONT_OT_delete(wmOperatorType *ot)
static int insert_text_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
- Object *obedit= CTX_data_edit_object(C);
+ Scene *scene = CTX_data_scene(C);
+ Object *obedit = CTX_data_edit_object(C);
char *inserted_utf8;
wchar_t *inserted_text;
int a, len;
@@ -1193,13 +1203,13 @@ static int insert_text_exec(bContext *C, wmOperator *op)
if (!RNA_struct_property_is_set(op->ptr, "text"))
return OPERATOR_CANCELLED;
- inserted_utf8= RNA_string_get_alloc(op->ptr, "text", NULL, 0);
- len= BLI_strlen_utf8(inserted_utf8);
+ inserted_utf8 = RNA_string_get_alloc(op->ptr, "text", NULL, 0);
+ len = BLI_strlen_utf8(inserted_utf8);
- inserted_text= MEM_callocN(sizeof(wchar_t)*(len+1), "FONT_insert_text");
- BLI_strncpy_wchar_from_utf8(inserted_text, inserted_utf8, len+1);
+ inserted_text = MEM_callocN(sizeof(wchar_t) * (len + 1), "FONT_insert_text");
+ BLI_strncpy_wchar_from_utf8(inserted_text, inserted_utf8, len + 1);
- for (a=0; a<len; a++)
+ for (a = 0; a < len; a++)
insert_into_textbuf(obedit, inserted_text[a]);
MEM_freeN(inserted_text);
@@ -1213,81 +1223,81 @@ static int insert_text_exec(bContext *C, wmOperator *op)
static int insert_text_invoke(bContext *C, wmOperator *op, wmEvent *evt)
{
- Scene *scene= CTX_data_scene(C);
- Object *obedit= CTX_data_edit_object(C);
- Curve *cu= obedit->data;
- EditFont *ef= cu->editfont;
- static int accentcode= 0;
+ Scene *scene = CTX_data_scene(C);
+ Object *obedit = CTX_data_edit_object(C);
+ Curve *cu = obedit->data;
+ EditFont *ef = cu->editfont;
+ static int accentcode = 0;
uintptr_t ascii = evt->ascii;
- int alt= evt->alt, shift= evt->shift, ctrl= evt->ctrl;
- int event= evt->type, val= evt->val;
- wchar_t inserted_text[2]= {0};
+ int alt = evt->alt, shift = evt->shift, ctrl = evt->ctrl;
+ int event = evt->type, val = evt->val;
+ wchar_t inserted_text[2] = {0};
if (RNA_struct_property_is_set(op->ptr, "text"))
return insert_text_exec(C, op);
if (RNA_struct_property_is_set(op->ptr, "accent")) {
- if (cu->len!=0 && cu->pos>0)
- accentcode= 1;
+ if (cu->len != 0 && cu->pos > 0)
+ accentcode = 1;
return OPERATOR_FINISHED;
}
/* tab should exit editmode, but we allow it to be typed using modifier keys */
- if (event==TABKEY) {
- if ((alt||ctrl||shift) == 0)
+ if (event == TABKEY) {
+ if ((alt || ctrl || shift) == 0)
return OPERATOR_PASS_THROUGH;
else
- ascii= 9;
+ ascii = 9;
}
- else if (event==BACKSPACEKEY)
- ascii= 0;
+ else if (event == BACKSPACEKEY)
+ ascii = 0;
if (val && (ascii || evt->utf8_buf[0])) {
/* handle case like TAB (== 9) */
if ( (ascii > 31 && ascii < 254 && ascii != 127) ||
- (ascii==13) ||
- (ascii==10) ||
- (ascii==8) ||
- (evt->utf8_buf[0]))
+ (ascii == 13) ||
+ (ascii == 10) ||
+ (ascii == 8) ||
+ (evt->utf8_buf[0]))
{
if (evt->utf8_buf[0]) {
BLI_strncpy_wchar_from_utf8(inserted_text, evt->utf8_buf, 1);
- ascii= inserted_text[0];
+ ascii = inserted_text[0];
insert_into_textbuf(obedit, ascii);
- accentcode= 0;
+ accentcode = 0;
}
else if (accentcode) {
- if (cu->pos>0) {
- inserted_text[0]= findaccent(ef->textbuf[cu->pos-1], ascii);
- ef->textbuf[cu->pos-1]= inserted_text[0];
+ if (cu->pos > 0) {
+ inserted_text[0] = findaccent(ef->textbuf[cu->pos - 1], ascii);
+ ef->textbuf[cu->pos - 1] = inserted_text[0];
}
- accentcode= 0;
+ accentcode = 0;
}
- else if (cu->len<MAXTEXT-1) {
+ else if (cu->len < MAXTEXT - 1) {
if (alt) {
/* might become obsolete, apple has default values for this, other OS's too? */
- if (ascii=='t') ascii= 137;
- else if (ascii=='c') ascii= 169;
- else if (ascii=='f') ascii= 164;
- else if (ascii=='g') ascii= 176;
- else if (ascii=='l') ascii= 163;
- else if (ascii=='r') ascii= 174;
- else if (ascii=='s') ascii= 223;
- else if (ascii=='y') ascii= 165;
- else if (ascii=='.') ascii= 138;
- else if (ascii=='1') ascii= 185;
- else if (ascii=='2') ascii= 178;
- else if (ascii=='3') ascii= 179;
- else if (ascii=='%') ascii= 139;
- else if (ascii=='?') ascii= 191;
- else if (ascii=='!') ascii= 161;
- else if (ascii=='x') ascii= 215;
- else if (ascii=='>') ascii= 187;
- else if (ascii=='<') ascii= 171;
+ if (ascii == 't') ascii = 137;
+ else if (ascii == 'c') ascii = 169;
+ else if (ascii == 'f') ascii = 164;
+ else if (ascii == 'g') ascii = 176;
+ else if (ascii == 'l') ascii = 163;
+ else if (ascii == 'r') ascii = 174;
+ else if (ascii == 's') ascii = 223;
+ else if (ascii == 'y') ascii = 165;
+ else if (ascii == '.') ascii = 138;
+ else if (ascii == '1') ascii = 185;
+ else if (ascii == '2') ascii = 178;
+ else if (ascii == '3') ascii = 179;
+ else if (ascii == '%') ascii = 139;
+ else if (ascii == '?') ascii = 191;
+ else if (ascii == '!') ascii = 161;
+ else if (ascii == 'x') ascii = 215;
+ else if (ascii == '>') ascii = 187;
+ else if (ascii == '<') ascii = 171;
}
- inserted_text[0]= ascii;
+ inserted_text[0] = ascii;
insert_into_textbuf(obedit, ascii);
}
@@ -1295,14 +1305,14 @@ static int insert_text_invoke(bContext *C, wmOperator *op, wmEvent *evt)
text_update_edited(C, scene, obedit, 1, FO_EDIT);
}
else {
- inserted_text[0]= ascii;
+ inserted_text[0] = ascii;
insert_into_textbuf(obedit, ascii);
text_update_edited(C, scene, obedit, 1, FO_EDIT);
}
}
else if (val && event == BACKSPACEKEY) {
- if (alt && cu->len!=0 && cu->pos>0)
- accentcode= 1;
+ if (alt && cu->len != 0 && cu->pos > 0)
+ accentcode = 1;
return OPERATOR_PASS_THROUGH;
}
@@ -1318,7 +1328,7 @@ static int insert_text_invoke(bContext *C, wmOperator *op, wmEvent *evt)
}
/* reset property? */
- accentcode= 0;
+ accentcode = 0;
return OPERATOR_FINISHED;
}
@@ -1336,7 +1346,7 @@ void FONT_OT_text_insert(wmOperatorType *ot)
ot->poll = ED_operator_editfont;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position");
@@ -1347,18 +1357,18 @@ void FONT_OT_text_insert(wmOperatorType *ot)
/*********************** textbox add operator *************************/
static int textbox_add_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *obedit= CTX_data_active_object(C);
- Curve *cu= obedit->data;
+ Object *obedit = CTX_data_active_object(C);
+ Curve *cu = obedit->data;
int i;
if (cu->totbox < 256) {
- for (i = cu->totbox; i>cu->actbox; i--) cu->tb[i]= cu->tb[i-1];
- cu->tb[cu->actbox]= cu->tb[cu->actbox-1];
+ for (i = cu->totbox; i > cu->actbox; i--) cu->tb[i] = cu->tb[i - 1];
+ cu->tb[cu->actbox] = cu->tb[cu->actbox - 1];
cu->actbox++;
cu->totbox++;
}
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
@@ -1374,7 +1384,7 @@ void FONT_OT_textbox_add(wmOperatorType *ot)
ot->poll = ED_operator_object_active_editable_font;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
@@ -1387,20 +1397,20 @@ void FONT_OT_textbox_add(wmOperatorType *ot)
static int textbox_remove_exec(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_active_object(C);
- Curve *cu= obedit->data;
+ Object *obedit = CTX_data_active_object(C);
+ Curve *cu = obedit->data;
int i;
int index = RNA_int_get(op->ptr, "index");
if (cu->totbox > 1) {
- for (i = index; i < cu->totbox; i++) cu->tb[i]= cu->tb[i+1];
+ for (i = index; i < cu->totbox; i++) cu->tb[i] = cu->tb[i + 1];
cu->totbox--;
if (cu->actbox >= index)
cu->actbox--;
}
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
@@ -1417,7 +1427,7 @@ void FONT_OT_textbox_remove(wmOperatorType *ot)
ot->poll = ED_operator_object_active_editable_font;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Index", "The current text box", 0, INT_MAX);
}
@@ -1428,33 +1438,33 @@ void FONT_OT_textbox_remove(wmOperatorType *ot)
void make_editText(Object *obedit)
{
- Curve *cu= obedit->data;
- EditFont *ef= cu->editfont;
+ Curve *cu = obedit->data;
+ EditFont *ef = cu->editfont;
- if (ef==NULL) {
- ef= cu->editfont= MEM_callocN(sizeof(EditFont), "editfont");
+ if (ef == NULL) {
+ ef = cu->editfont = MEM_callocN(sizeof(EditFont), "editfont");
- ef->textbuf= MEM_callocN((MAXTEXT+4)*sizeof(wchar_t), "texteditbuf");
- ef->textbufinfo= MEM_callocN((MAXTEXT+4)*sizeof(CharInfo), "texteditbufinfo");
- ef->copybuf= MEM_callocN((MAXTEXT+4)*sizeof(wchar_t), "texteditcopybuf");
- ef->copybufinfo= MEM_callocN((MAXTEXT+4)*sizeof(CharInfo), "texteditcopybufinfo");
- ef->oldstr= MEM_callocN((MAXTEXT+4)*sizeof(wchar_t), "oldstrbuf");
- ef->oldstrinfo= MEM_callocN((MAXTEXT+4)*sizeof(CharInfo), "oldstrbuf");
+ ef->textbuf = MEM_callocN((MAXTEXT + 4) * sizeof(wchar_t), "texteditbuf");
+ ef->textbufinfo = MEM_callocN((MAXTEXT + 4) * sizeof(CharInfo), "texteditbufinfo");
+ ef->copybuf = MEM_callocN((MAXTEXT + 4) * sizeof(wchar_t), "texteditcopybuf");
+ ef->copybufinfo = MEM_callocN((MAXTEXT + 4) * sizeof(CharInfo), "texteditcopybufinfo");
+ ef->oldstr = MEM_callocN((MAXTEXT + 4) * sizeof(wchar_t), "oldstrbuf");
+ ef->oldstrinfo = MEM_callocN((MAXTEXT + 4) * sizeof(CharInfo), "oldstrbuf");
}
// Convert the original text to wchar_t
- BLI_strncpy_wchar_from_utf8(ef->textbuf, cu->str, MAXTEXT+4); /* length is bogus */
+ BLI_strncpy_wchar_from_utf8(ef->textbuf, cu->str, MAXTEXT + 4); /* length is bogus */
wcscpy(ef->oldstr, ef->textbuf);
- cu->len= wcslen(ef->textbuf);
+ cu->len = wcslen(ef->textbuf);
- memcpy(ef->textbufinfo, cu->strinfo, (cu->len)*sizeof(CharInfo));
- memcpy(ef->oldstrinfo, cu->strinfo, (cu->len)*sizeof(CharInfo));
+ memcpy(ef->textbufinfo, cu->strinfo, (cu->len) * sizeof(CharInfo));
+ memcpy(ef->oldstrinfo, cu->strinfo, (cu->len) * sizeof(CharInfo));
- if (cu->pos>cu->len) cu->pos= cu->len;
+ if (cu->pos > cu->len) cu->pos = cu->len;
if (cu->pos)
- cu->curinfo = ef->textbufinfo[cu->pos-1];
+ cu->curinfo = ef->textbufinfo[cu->pos - 1];
else
cu->curinfo = ef->textbufinfo[0];
@@ -1464,67 +1474,67 @@ void make_editText(Object *obedit)
void load_editText(Object *obedit)
{
- Curve *cu= obedit->data;
- EditFont *ef= cu->editfont;
+ Curve *cu = obedit->data;
+ EditFont *ef = cu->editfont;
MEM_freeN(ef->oldstr);
- ef->oldstr= NULL;
+ ef->oldstr = NULL;
MEM_freeN(ef->oldstrinfo);
- ef->oldstrinfo= NULL;
+ ef->oldstrinfo = NULL;
update_string(cu);
if (cu->strinfo)
MEM_freeN(cu->strinfo);
- cu->strinfo= MEM_callocN((cu->len+4)*sizeof(CharInfo), "texteditinfo");
- memcpy(cu->strinfo, ef->textbufinfo, (cu->len)*sizeof(CharInfo));
+ cu->strinfo = MEM_callocN((cu->len + 4) * sizeof(CharInfo), "texteditinfo");
+ memcpy(cu->strinfo, ef->textbufinfo, (cu->len) * sizeof(CharInfo));
- cu->len= strlen(cu->str);
+ cu->len = strlen(cu->str);
/* this memory system is weak... */
if (cu->selboxes) {
MEM_freeN(cu->selboxes);
- cu->selboxes= NULL;
+ cu->selboxes = NULL;
}
}
void free_editText(Object *obedit)
{
- BKE_free_editfont((Curve *)obedit->data);
+ BKE_curve_editfont_free((Curve *)obedit->data);
}
/********************** set case operator *********************/
-static EnumPropertyItem case_items[]= {
+static EnumPropertyItem case_items[] = {
{CASE_LOWER, "LOWER", 0, "Lower", ""},
{CASE_UPPER, "UPPER", 0, "Upper", ""},
{0, NULL, 0, NULL, NULL}};
static int set_case(bContext *C, int ccase)
{
- Scene *scene= CTX_data_scene(C);
- Object *obedit= CTX_data_edit_object(C);
- Curve *cu= obedit->data;
- EditFont *ef= cu->editfont;
+ Scene *scene = CTX_data_scene(C);
+ Object *obedit = CTX_data_edit_object(C);
+ Curve *cu = obedit->data;
+ EditFont *ef = cu->editfont;
wchar_t *str;
int len;
- len= wcslen(ef->textbuf);
- str= ef->textbuf;
+ len = wcslen(ef->textbuf);
+ str = ef->textbuf;
while (len) {
- if (*str>='a' && *str<='z')
- *str-= 32;
+ if (*str >= 'a' && *str <= 'z')
+ *str -= 32;
len--;
str++;
}
if (ccase == CASE_LOWER) {
- len= wcslen(ef->textbuf);
- str= ef->textbuf;
+ len = wcslen(ef->textbuf);
+ str = ef->textbuf;
while (len) {
- if (*str>='A' && *str<='Z') {
- *str+= 32;
+ if (*str >= 'A' && *str <= 'Z') {
+ *str += 32;
}
len--;
str++;
@@ -1553,7 +1563,7 @@ void FONT_OT_case_set(wmOperatorType *ot)
ot->poll = ED_operator_editfont;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "case", case_items, CASE_LOWER, "Case", "Lower or upper case");
@@ -1563,17 +1573,17 @@ void FONT_OT_case_set(wmOperatorType *ot)
static int toggle_case_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *obedit= CTX_data_edit_object(C);
- Curve *cu= obedit->data;
- EditFont *ef= cu->editfont;
+ Object *obedit = CTX_data_edit_object(C);
+ Curve *cu = obedit->data;
+ EditFont *ef = cu->editfont;
wchar_t *str;
- int len, ccase= CASE_UPPER;
+ int len, ccase = CASE_UPPER;
- len= wcslen(ef->textbuf);
- str= ef->textbuf;
+ len = wcslen(ef->textbuf);
+ str = ef->textbuf;
while (len) {
- if (*str>='a' && *str<='z') {
- ccase= CASE_LOWER;
+ if (*str >= 'a' && *str <= 'z') {
+ ccase = CASE_LOWER;
break;
}
@@ -1596,7 +1606,7 @@ void FONT_OT_case_toggle(wmOperatorType *ot)
ot->poll = ED_operator_editfont;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* **************** Open Font ************** */
@@ -1605,27 +1615,27 @@ static void font_ui_template_init(bContext *C, wmOperator *op)
{
PropertyPointerRNA *pprop;
- op->customdata= pprop= MEM_callocN(sizeof(PropertyPointerRNA), "OpenPropertyPointerRNA");
+ op->customdata = pprop = MEM_callocN(sizeof(PropertyPointerRNA), "OpenPropertyPointerRNA");
uiIDContextProperty(C, &pprop->ptr, &pprop->prop);
}
static int font_open_cancel(bContext *UNUSED(C), wmOperator *op)
{
MEM_freeN(op->customdata);
- op->customdata= NULL;
+ op->customdata = NULL;
return OPERATOR_CANCELLED;
}
static int font_open_exec(bContext *C, wmOperator *op)
{
- struct Main *bmain= CTX_data_main(C);
+ struct Main *bmain = CTX_data_main(C);
VFont *font;
PropertyPointerRNA *pprop;
PointerRNA idptr;
char filepath[FILE_MAX];
RNA_string_get(op->ptr, "filepath", filepath);
- font= load_vfont(bmain, filepath);
+ font = BKE_vfont_load(bmain, filepath);
if (!font) {
if (op->customdata) MEM_freeN(op->customdata);
@@ -1636,7 +1646,7 @@ static int font_open_exec(bContext *C, wmOperator *op)
font_ui_template_init(C, op);
/* hook into UI */
- pprop= op->customdata;
+ pprop = op->customdata;
if (pprop->prop) {
/* when creating new ID blocks, use is already 1, but RNA
@@ -1655,7 +1665,7 @@ static int font_open_exec(bContext *C, wmOperator *op)
static int open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
- VFont *font=NULL;
+ VFont *font = NULL;
char *path;
PointerRNA idptr;
@@ -1664,14 +1674,14 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
font_ui_template_init(C, op);
/* hook into UI */
- pprop= op->customdata;
+ pprop = op->customdata;
if (pprop->prop) {
- idptr= RNA_property_pointer_get((PointerRNA *)pprop, pprop->prop);
- font= idptr.id.data;
+ idptr = RNA_property_pointer_get((PointerRNA *)pprop, pprop->prop);
+ font = idptr.id.data;
}
- path = (font && strcmp(font->name, FO_BUILTIN_NAME) != 0)? font->name: U.fontdir;
+ path = (font && strcmp(font->name, FO_BUILTIN_NAME) != 0) ? font->name : U.fontdir;
if (RNA_struct_property_is_set(op->ptr, "filepath"))
return font_open_exec(C, op);
@@ -1687,6 +1697,7 @@ void FONT_OT_open(wmOperatorType *ot)
/* identifiers */
ot->name = "Open Font";
ot->idname = "FONT_OT_open";
+ ot->description = "Load a new font from a file";
/* api callbacks */
ot->exec = font_open_exec;
@@ -1694,10 +1705,10 @@ void FONT_OT_open(wmOperatorType *ot)
ot->cancel = font_open_cancel;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
- WM_operator_properties_filesel(ot, FOLDERFILE|FTFONTFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH|WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
+ WM_operator_properties_filesel(ot, FOLDERFILE | FTFONTFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
}
/******************* delete operator *********************/
@@ -1711,12 +1722,12 @@ static int font_unlink_exec(bContext *C, wmOperator *op)
uiIDContextProperty(C, &pprop.ptr, &pprop.prop);
- if (pprop.prop==NULL) {
+ if (pprop.prop == NULL) {
BKE_report(op->reports, RPT_ERROR, "Incorrect context for running font unlink");
return OPERATOR_CANCELLED;
}
- builtin_font = get_builtin_font();
+ builtin_font = BKE_vfont_builtin_get();
RNA_id_pointer_create(&builtin_font->id, &idptr);
RNA_property_pointer_set(&pprop.ptr, pprop.prop, idptr);
@@ -1741,15 +1752,15 @@ void FONT_OT_unlink(wmOperatorType *ot)
static void undoFont_to_editFont(void *strv, void *ecu, void *UNUSED(obdata))
{
- Curve *cu= (Curve *)ecu;
- EditFont *ef= cu->editfont;
- char *str= strv;
+ Curve *cu = (Curve *)ecu;
+ EditFont *ef = cu->editfont;
+ char *str = strv;
- cu->pos= *((short *)str);
- cu->len= *((short *)(str+2));
+ cu->pos = *((short *)str);
+ cu->len = *((short *)(str + 2));
- memcpy(ef->textbuf, str+4, (cu->len+1)*sizeof(wchar_t));
- memcpy(ef->textbufinfo, str+4 + (cu->len+1)*sizeof(wchar_t), cu->len*sizeof(CharInfo));
+ memcpy(ef->textbuf, str + 4, (cu->len + 1) * sizeof(wchar_t));
+ memcpy(ef->textbufinfo, str + 4 + (cu->len + 1) * sizeof(wchar_t), cu->len * sizeof(CharInfo));
cu->selstart = cu->selend = 0;
@@ -1758,19 +1769,19 @@ static void undoFont_to_editFont(void *strv, void *ecu, void *UNUSED(obdata))
static void *editFont_to_undoFont(void *ecu, void *UNUSED(obdata))
{
- Curve *cu= (Curve *)ecu;
- EditFont *ef= cu->editfont;
+ Curve *cu = (Curve *)ecu;
+ EditFont *ef = cu->editfont;
char *str;
// The undo buffer includes [MAXTEXT+6]=actual string and [MAXTEXT+4]*sizeof(CharInfo)=charinfo
- str= MEM_callocN((MAXTEXT+6)*sizeof(wchar_t) + (MAXTEXT+4)*sizeof(CharInfo), "string undo");
+ str = MEM_callocN((MAXTEXT + 6) * sizeof(wchar_t) + (MAXTEXT + 4) * sizeof(CharInfo), "string undo");
// Copy the string and string information
- memcpy(str+4, ef->textbuf, (cu->len+1)*sizeof(wchar_t));
- memcpy(str+4 + (cu->len+1)*sizeof(wchar_t), ef->textbufinfo, cu->len*sizeof(CharInfo));
+ memcpy(str + 4, ef->textbuf, (cu->len + 1) * sizeof(wchar_t));
+ memcpy(str + 4 + (cu->len + 1) * sizeof(wchar_t), ef->textbufinfo, cu->len * sizeof(CharInfo));
- *((short *)str)= cu->pos;
- *((short *)(str+2))= cu->len;
+ *((short *)str) = cu->pos;
+ *((short *)(str + 2)) = cu->len;
return str;
}
@@ -1782,8 +1793,8 @@ static void free_undoFont(void *strv)
static void *get_undoFont(bContext *C)
{
- Object *obedit= CTX_data_edit_object(C);
- if (obedit && obedit->type==OB_FONT) {
+ Object *obedit = CTX_data_edit_object(C);
+ if (obedit && obedit->type == OB_FONT) {
return obedit->data;
}
return NULL;
diff --git a/source/blender/editors/datafiles/Bfont.c b/source/blender/editors/datafiles/Bfont.c
index 7f40f579ff9..969bc5a844d 100644
--- a/source/blender/editors/datafiles/Bfont.c
+++ b/source/blender/editors/datafiles/Bfont.c
@@ -1,6 +1,4 @@
-/* DataToC output of file <Bfont> */
/*
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -29,10 +27,9 @@
/** \file blender/editors/datafiles/Bfont.c
* \ingroup eddatafiles
+ * \brief DataToC output of file <Bfont>
*/
-
-
int datatoc_Bfont_size= 25181;
char datatoc_Bfont[25181]= {
128, 1, 228, 1, 0, 0, 37, 33, 80, 83, 45, 65, 100, 111, 98, 101,
diff --git a/source/blender/editors/datafiles/splash.png.c b/source/blender/editors/datafiles/splash.png.c
index 0b313dcb143..2c4d6b0c834 100644
--- a/source/blender/editors/datafiles/splash.png.c
+++ b/source/blender/editors/datafiles/splash.png.c
@@ -1,5898 +1,7181 @@
/* DataToC output of file <splash_png> */
-int datatoc_splash_png_size= 188517;
-char datatoc_splash_png[]= {
-137, 80, 78, 71, 13,
- 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 1,245, 0, 0, 1, 26, 8, 6, 0, 0, 0, 8, 90,206, 70, 0, 0, 10, 79,
-105, 67, 67, 80, 80,104,111,116,111,115,104,111,112, 32, 73, 67, 67, 32,112,114,111,102,105,108,101, 0, 0,120,218,157, 83,103,
- 84, 83,233, 22, 61,247,222,244, 66, 75,136,128,148, 75,111, 82, 21, 8, 32, 82, 66,139,128, 20,145, 38, 42, 33, 9, 16, 74,136,
- 33,161,217, 21, 81,193, 17, 69, 69, 4, 27,200,160,136, 3,142,142,128,140, 21, 81, 44, 12,138, 10,216, 7,228, 33,162,142,131,
-163,136,138,202,251,225,123,163,107,214,188,247,230,205,254,181,215, 62,231,172,243,157,179,207, 7,192, 8, 12,150, 72, 51, 81,
- 53,128, 12,169, 66, 30, 17,224,131,199,196,198,225,228, 46, 64,129, 10, 36,112, 0, 16, 8,179,100, 33,115,253, 35, 1, 0,248,
-126, 60, 60, 43, 34,192, 7,190, 0, 1,120,211, 11, 8, 0,192, 77,155,192, 48, 28,135,255, 15,234, 66,153, 92, 1,128,132, 1,
-192,116,145, 56, 75, 8,128, 20, 0, 64,122,142, 66,166, 0, 64, 70, 1,128,157,152, 38, 83, 0,160, 4, 0, 96,203, 99, 98,227,
- 0, 80, 45, 0, 96, 39,127,230,211, 0,128,157,248,153,123, 1, 0, 91,148, 33, 21, 1,160,145, 0, 32, 19,101,136, 68, 0,104,
- 59, 0,172,207, 86,138, 69, 0, 88, 48, 0, 20,102, 75,196, 57, 0,216, 45, 0, 48, 73, 87,102, 72, 0,176,183, 0,192,206, 16,
- 11,178, 0, 8, 12, 0, 48, 81,136,133, 41, 0, 4,123, 0, 96,200, 35, 35,120, 0,132,153, 0, 20, 70,242, 87, 60,241, 43,174,
- 16,231, 42, 0, 0,120,153,178, 60,185, 36, 57, 69,129, 91, 8, 45,113, 7, 87, 87, 46, 30, 40,206, 73, 23, 43, 20, 54, 97, 2,
- 97,154, 64, 46,194,121,153, 25, 50,129, 52, 15,224,243,204, 0, 0,160,145, 21, 17,224,131,243,253,120,206, 14,174,206,206, 54,
-142,182, 14, 95, 45,234,191, 6,255, 34, 98, 98,227,254,229,207,171,112, 64, 0, 0,225,116,126,209,254, 44, 47,179, 26,128, 59,
- 6,128,109,254,162, 37,238, 4,104, 94, 11,160,117,247,139,102,178, 15, 64,181, 0,160,233,218, 87,243,112,248,126, 60, 60, 69,
-161,144,185,217,217,229,228,228,216, 74,196, 66, 91, 97,202, 87,125,254,103,194, 95,192, 87,253,108,249,126, 60,252,247,245,224,
-190,226, 36,129, 50, 93,129, 71, 4,248,224,194,204,244, 76,165, 28,207,146, 9,132, 98,220,230,143, 71,252,183, 11,255,252, 29,
-211, 34,196, 73, 98,185, 88, 42, 20,227, 81, 18,113,142, 68,154,140,243, 50,165, 34,137, 66,146, 41,197, 37,210,255,100,226,223,
- 44,251, 3, 62,223, 53, 0,176,106, 62, 1,123,145, 45,168, 93, 99, 3,246, 75, 39, 16, 88,116,192,226,247, 0, 0,242,187,111,
-193,212, 40, 8, 3,128,104,131,225,207,119,255,239, 63,253, 71,160, 37, 0,128,102, 73,146,113, 0, 0, 94, 68, 36, 46, 84,202,
-179, 63,199, 8, 0, 0, 68,160,129, 42,176, 65, 27,244,193, 24, 44,192, 6, 28,193, 5,220,193, 11,252, 96, 54,132, 66, 36,196,
-194, 66, 16, 66, 10,100,128, 28,114, 96, 41,172,130, 66, 40,134,205,176, 29, 42, 96, 47,212, 64, 29, 52,192, 81,104,134,147,112,
- 14, 46,194, 85,184, 14, 61,112, 15,250, 97, 8,158,193, 40,188,129, 9, 4, 65,200, 8, 19, 97, 33,218,136, 1, 98,138, 88, 35,
-142, 8, 23,153,133,248, 33,193, 72, 4, 18,139, 36, 32,201,136, 20, 81, 34, 75,145, 53, 72, 49, 82,138, 84, 32, 85, 72, 29,242,
- 61,114, 2, 57,135, 92, 70,186,145, 59,200, 0, 50,130,252,134,188, 71, 49,148,129,178, 81, 61,212, 12,181, 67,185,168, 55, 26,
-132, 70,162, 11,208,100,116, 49,154,143, 22,160,155,208,114,180, 26, 61,140, 54,161,231,208,171,104, 15,218,143, 62, 67,199, 48,
-192,232, 24, 7, 51,196,108, 48, 46,198,195, 66,177, 56, 44, 9,147, 99,203,177, 34,172, 12,171,198, 26,176, 86,172, 3,187,137,
-245, 99,207,177,119, 4, 18,129, 69,192, 9, 54, 4,119, 66, 32, 97, 30, 65, 72, 88, 76, 88, 78,216, 72,168, 32, 28, 36, 52, 17,
-218, 9, 55, 9, 3,132, 81,194, 39, 34,147,168, 75,180, 38,186, 17,249,196, 24, 98, 50, 49,135, 88, 72, 44, 35,214, 18,143, 19,
- 47, 16,123,136, 67,196, 55, 36, 18,137, 67, 50, 39,185,144, 2, 73,177,164, 84,210, 18,210, 70,210,110, 82, 35,233, 44,169,155,
- 52, 72, 26, 35,147,201,218,100,107,178, 7, 57,148, 44, 32, 43,200,133,228,157,228,195,228, 51,228, 27,228, 33,242, 91, 10,157,
- 98, 64,113,164,248, 83,226, 40, 82,202,106, 74, 25,229, 16,229, 52,229, 6,101,152, 50, 65, 85,163,154, 82,221,168,161, 84, 17,
- 53,143, 90, 66,173,161,182, 82,175, 81,135,168, 19, 52,117,154, 57,205,131, 22, 73, 75,165,173,162,149,211, 26,104, 23,104,247,
-105,175,232,116,186, 17,221,149, 30, 78,151,208, 87,210,203,233, 71,232,151,232, 3,244,119, 12, 13,134, 21,131,199,136,103, 40,
- 25,155, 24, 7, 24,103, 25,119, 24,175,152, 76,166, 25,211,139, 25,199, 84, 48, 55, 49,235,152,231,153, 15,153,111, 85, 88, 42,
-182, 42,124, 21,145,202, 10,149, 74,149, 38,149, 27, 42, 47, 84,169,170,166,170,222,170, 11, 85,243, 85,203, 84,143,169, 94, 83,
-125,174, 70, 85, 51, 83,227,169, 9,212,150,171, 85,170,157, 80,235, 83, 27, 83,103,169, 59,168,135,170,103,168,111, 84, 63,164,
-126, 89,253,137, 6, 89,195, 76,195, 79, 67,164, 81,160,177, 95,227,188,198, 32, 11, 99, 25,179,120, 44, 33,107, 13,171,134,117,
-129, 53,196, 38,177,205,217,124,118, 42,187,152,253, 29,187,139, 61,170,169,161, 57, 67, 51, 74, 51, 87,179, 82,243,148,102, 63,
- 7,227,152,113,248,156,116, 78, 9,231, 40,167,151,243,126,138,222, 20,239, 41,226, 41, 27,166, 52, 76,185, 49,101, 92,107,170,
-150,151,150, 88,171, 72,171, 81,171, 71,235,189, 54,174,237,167,157,166,189, 69,187, 89,251,129, 14, 65,199, 74, 39, 92, 39, 71,
-103,143,206, 5,157,231, 83,217, 83,221,167, 10,167, 22, 77, 61, 58,245,174, 46,170,107,165, 27,161,187, 68,119,191,110,167,238,
-152,158,190, 94,128,158, 76,111,167,222,121,189,231,250, 28,125, 47,253, 84,253,109,250,167,245, 71, 12, 88, 6,179, 12, 36, 6,
-219, 12,206, 24, 60,197, 53,113,111, 60, 29, 47,199,219,241, 81, 67, 93,195, 64, 67,165, 97,149, 97,151,225,132,145,185,209, 60,
-163,213, 70,141, 70, 15,140,105,198, 92,227, 36,227,109,198,109,198,163, 38, 6, 38, 33, 38, 75, 77,234, 77,238,154, 82, 77,185,
-166, 41,166, 59, 76, 59, 76,199,205,204,205,162,205,214,153, 53,155, 61, 49,215, 50,231,155,231,155,215,155,223,183, 96, 90,120,
- 90, 44,182,168,182,184,101, 73,178,228, 90,166, 89,238,182,188,110,133, 90, 57, 89,165, 88, 85, 90, 93,179, 70,173,157,173, 37,
-214,187,173,187,167, 17,167,185, 78,147, 78,171,158,214,103,195,176,241,182,201,182,169,183, 25,176,229,216, 6,219,174,182,109,
-182,125, 97,103, 98, 23,103,183,197,174,195,238,147,189,147,125,186,125,141,253, 61, 7, 13,135,217, 14,171, 29, 90, 29,126,115,
-180,114, 20, 58, 86, 58,222,154,206,156,238, 63,125,197,244,150,233, 47,103, 88,207, 16,207,216, 51,227,182, 19,203, 41,196,105,
-157, 83,155,211, 71,103, 23,103,185,115,131,243,136,139,137, 75,130,203, 46,151, 62, 46,155, 27,198,221,200,189,228, 74,116,245,
-113, 93,225,122,210,245,157,155,179,155,194,237,168,219,175,238, 54,238,105,238,135,220,159,204, 52,159, 41,158, 89, 51,115,208,
-195,200, 67,224, 81,229,209, 63, 11,159,149, 48,107,223,172,126, 79, 67, 79,129,103,181,231, 35, 47, 99, 47,145, 87,173,215,176,
-183,165,119,170,247, 97,239, 23, 62,246, 62,114,159,227, 62,227, 60, 55,222, 50,222, 89, 95,204, 55,192,183,200,183,203, 79,195,
-111,158, 95,133,223, 67,127, 35,255,100,255,122,255,209, 0,167,128, 37, 1,103, 3,137,129, 65,129, 91, 2,251,248,122,124, 33,
-191,142, 63, 58,219,101,246,178,217,237, 65,140,160,185, 65, 21, 65,143,130,173,130,229,193,173, 33,104,200,236,144,173, 33,247,
-231,152,206,145,206,105, 14,133, 80,126,232,214,208, 7, 97,230, 97,139,195,126, 12, 39,133,135,133, 87,134, 63,142,112,136, 88,
- 26,209, 49,151, 53,119,209,220, 67,115,223, 68,250, 68,150, 68,222,155,103, 49, 79, 57,175, 45, 74, 53, 42, 62,170, 46,106, 60,
-218, 55,186, 52,186, 63,198, 46,102, 89,204,213, 88,157, 88, 73,108, 75, 28, 57, 46, 42,174, 54,110,108,190,223,252,237,243,135,
-226,157,226, 11,227,123, 23,152, 47,200, 93,112,121,161,206,194,244,133,167, 22,169, 46, 18, 44, 58,150, 64, 76,136, 78, 56,148,
-240, 65, 16, 42,168, 22,140, 37,242, 19,119, 37,142, 10,121,194, 29,194,103, 34, 47,209, 54,209,136,216, 67, 92, 42, 30, 78,242,
- 72, 42, 77,122,146,236,145,188, 53,121, 36,197, 51,165, 44,229,185,132, 39,169,144,188, 76, 13, 76,221,155, 58,158, 22,154,118,
- 32,109, 50, 61, 58,189, 49,131,146,145,144,113, 66,170, 33, 77,147,182,103,234,103,230,102,118,203,172,101,133,178,254,197,110,
-139,183, 47, 30,149, 7,201,107,179,144,172, 5, 89, 45, 10,182, 66,166,232, 84, 90, 40,215, 42, 7,178,103,101, 87,102,191,205,
-137,202, 57,150,171,158, 43,205,237,204,179,202,219,144, 55,156,239,159,255,237, 18,194, 18,225,146,182,165,134, 75, 87, 45, 29,
- 88,230,189,172,106, 57,178, 60,113,121,219, 10,227, 21, 5, 43,134, 86, 6,172, 60,184,138,182, 42,109,213, 79,171,237, 87,151,
-174,126,189, 38,122, 77,107,129, 94,193,202,130,193,181, 1,107,235, 11, 85, 10,229,133,125,235,220,215,237, 93, 79, 88, 47, 89,
-223,181, 97,250,134,157, 27, 62, 21,137,138,174, 20,219, 23,151, 21,127,216, 40,220,120,229, 27,135,111,202,191,153,220,148,180,
-169,171,196,185,100,207,102,210,102,233,230,222, 45,158, 91, 14,150,170,151,230,151, 14,110, 13,217,218,180, 13,223, 86,180,237,
-245,246, 69,219, 47,151,205, 40,219,187,131,182, 67,185,163,191, 60,184,188,101,167,201,206,205, 59, 63, 84,164, 84,244, 84,250,
- 84, 54,238,210,221,181, 97,215,248,110,209,238, 27,123,188,246, 52,236,213,219, 91,188,247,253, 62,201,190,219, 85, 1, 85, 77,
-213,102,213,101,251, 73,251,179,247, 63,174,137,170,233,248,150,251,109, 93,173, 78,109,113,237,199, 3,210, 3,253, 7, 35, 14,
-182,215,185,212,213, 29,210, 61, 84, 82,143,214, 43,235, 71, 14,199, 31,190,254,157,239,119, 45, 13, 54, 13, 85,141,156,198,226,
- 35,112, 68,121,228,233,247, 9,223,247, 30, 13, 58,218,118,140,123,172,225, 7,211, 31,118, 29,103, 29, 47,106, 66,154,242,154,
- 70,155, 83,154,251, 91, 98, 91,186, 79,204, 62,209,214,234,222,122,252, 71,219, 31, 15,156, 52, 60, 89,121, 74,243, 84,201,105,
-218,233,130,211,147,103,242,207,140,157,149,157,125,126, 46,249,220, 96,219,162,182,123,231, 99,206,223,106, 15,111,239,186, 16,
-116,225,210, 69,255,139,231, 59,188, 59,206, 92,242,184,116,242,178,219,229, 19, 87,184, 87,154,175, 58, 95,109,234,116,234, 60,
-254,147,211, 79,199,187,156,187,154,174,185, 92,107,185,238,122,189,181,123,102,247,233, 27,158, 55,206,221,244,189,121,241, 22,
-255,214,213,158, 57, 61,221,189,243,122,111,247,197,247,245,223, 22,221,126,114, 39,253,206,203,187,217,119, 39,238,173,188, 79,
-188, 95,244, 64,237, 65,217, 67,221,135,213, 63, 91,254,220,216,239,220,127,106,192,119,160,243,209,220, 71,247, 6,133,131,207,
-254,145,245,143, 15, 67, 5,143,153,143,203,134, 13,134,235,158, 56, 62, 57, 57,226, 63,114,253,233,252,167, 67,207,100,207, 38,
-158, 23,254,162,254,203,174, 23, 22, 47,126,248,213,235,215,206,209,152,209,161,151,242,151,147,191,109,124,165,253,234,192,235,
- 25,175,219,198,194,198, 30,190,201,120, 51, 49, 94,244, 86,251,237,193,119,220,119, 29,239,163,223, 15, 79,228,124, 32,127, 40,
-255,104,249,177,245, 83,208,167,251,147, 25,147,147,255, 4, 3,152,243,252, 99, 51, 45,219, 0, 0, 0, 6, 98, 75, 71, 68, 0,
- 0, 0, 0, 0, 0,249, 67,187,127, 0, 0, 0, 9,112, 72, 89,115, 0, 0, 11, 19, 0, 0, 11, 19, 1, 0,154,156, 24, 0, 0,
- 0, 7,116, 73, 77, 69, 7,220, 2, 15, 16, 38, 41, 22,193,141,250, 0, 0, 32, 0, 73, 68, 65, 84,120,218,236,189,121,220,101,
- 87, 85,231,253, 93,123,159, 59, 60,207, 83,115, 85,170, 50,146,137,132,132, 81, 8,208, 54, 40, 70, 9, 32, 40, 42, 72,130,208,
-138, 10, 10,221, 14,221,106, 55,130,173,253,170,175,162, 4, 7,212, 87,232, 38,109,191,190,106,171, 40,210, 14,216, 56, 16, 20,
- 25, 84,196,200, 76,152, 50, 48,101,170,212,252, 12,247,222,115,246, 94,239, 31,123,237,115,246,189,169, 74, 42, 69,134,170,244,
- 89,245,121, 62,245, 12,247,158,123,134,189,247,111,173,223,250,173,181,161,183,222,122,235,173,183,222,122,235,173,183,222,122,
-235,173,183,222,122,235,173,183,222,122,235,173,183,222,122,235,173,183,222,122,235,173,183,222,122,235,173,183,222,122,235,173,
-183,222,122,235,173,183,222,122,235,173,183,222,122,235,173,183,222,122,235,173,183,222, 30, 16,243, 15,240,231,137,125,141,129,
- 11,156,227, 52, 85,214,129,218,126,223, 91,111,189,245,214, 91,111,189,157, 2, 38,128,115, 78, 30,254,227, 87, 62,238,205, 31,
-250,197,111,185,227, 99,191,242,188,125, 63,247,237, 79,248,211, 97,229, 46, 43, 94,211, 91,111,189,245,214, 91,111,189,157,228,
-145,186, 0,195,239,123,246, 35, 94,243,139, 47,184,228, 37,123,234,141,149,211,182,172, 44,125,245,191,186,232, 17, 95,117,201,
-105, 87,188,247,250,219,110, 59,176, 58,251, 52,160, 61,184,247,214, 91,111,189,245,214,219,201, 13,234, 14, 88,254,154,243,150,
-190,245,153,187,155, 71,111,236,221, 79,125, 96, 31,205,198,148,139, 47, 62,119,251, 11,190,234,194,231,126,234, 75, 7,252,103,
-110, 57,252, 97, 96,163, 7,246,222,122,235,173,183,222,122, 59,185, 35,245,209,251,111, 62,124,219,206,173,195,199, 62,245,194,
- 45,167,107,163,132, 35,135,105,142, 28, 97,251,238,221,213,139,158,254,200,175, 9,177,185,232,189,159,184,237,131,192,190, 30,
-216,123,235,173,183,222,122,235,237,228, 4,117, 0, 81,229,200,219, 63,113,232, 67,183,111,132,157,207,184,116,219,197, 99, 95,
- 81,111,108, 16, 14,238,135,209, 50,207,120,234, 35, 47,125,236,185, 91, 47,255,187,143,221,114,243,234,164,185,177,127, 68,189,
-245,214, 91,111,189,245,118,252,209,243, 3,253,121, 99, 96, 43,112,246, 87, 61,124,243,119,254,207, 23, 93,240, 61,231, 46, 85,
-227,245,245, 26,188,199,157,121, 30,227,115,206,225,134, 91,246, 29,126,197,175,191,235,231,223,249,161, 47,189, 17, 56, 98,239,
-215,147,249,102,170,234,101,192,118,251,241, 70, 17,121, 72, 59, 37,255,167, 93,111,111,189,245,214, 91, 15,234, 71, 55, 7,108,
- 1,246,156,190,165,250,166, 63,248,206, 11,127,228,171, 78, 95, 57,125,178, 17,128,136,236, 57,155,165,135,157,207, 76, 35,255,
-233, 55,223,247,219,255,207,159,126,244, 39,128, 47,216,249,126,217,192,174,170, 23, 0, 23, 28,231,203, 15,136,200,117,199,121,
-220,119, 0, 87,216,143,175, 22,145,171, 31,226,160,254,127,212,245,246,214, 91,111,189,157,236, 86,125, 25,160, 28,129,205, 59,
- 55, 13, 30,179,115,165,218, 25, 85,100,206, 83, 16, 16, 17,209,252, 27,201,191,111,255, 90, 1,203,117,208,141, 31,126,251, 29,
-127,249, 43,223,114,206,183, 60,101,247,202,182, 89,173,112, 96, 31,147,229, 77, 12,118,238,225,215, 94,113,249, 75, 46,123,248,
-158, 71,252,208,155,222,253,202,131,171,179,247,222, 71,192,126, 37,240,218,123, 1, 94, 0,111, 1,174, 21,145,107,250, 97,243,
-144,117, 82, 60,240,175,128,175, 3,158, 4, 60, 10,216, 3,140,128,131,192,231,128,127, 4,126, 79, 68,254,225,126, 58,135, 39,
- 3, 87, 1, 95, 11,156, 5,236, 4,214,237,179, 63, 2,188, 7,120,187,136,124,225,100,189,134,222,122,235,237,212,138,212, 5,
-112, 43, 35,255, 21, 63,251,236,115,127,238, 69,143,219,125,249,214,165,193, 48,138, 75,128,237, 92,250, 18, 65, 42, 63,247, 51,
-206, 33,222,119, 63, 75,250, 91, 68,180, 86,137,227,170,242,148,199,241, 30,135, 48, 88, 25,243,145,155,110,223,251,178,215, 95,
-251,147,255,252,233,189,191, 9, 76,191, 28, 96, 87,213, 87,221, 27, 80, 95,176,107,129,171, 68,228, 64, 31,169, 63,116,174, 87,
- 85,255, 43,240,124, 96,247,113,190,229, 93,192, 75, 69,228,166,251,232,243,207, 2,222, 0,124,243,113,188,252,157, 34,114,197,
-201,118, 13,189,245,214,219,169, 27,169,159,246,186,231,158,255,250,239,123,202, 89, 95, 61, 91,143,104, 20,188,147, 20,192,171,
-164, 47, 28, 18, 37, 65,175, 2, 78, 82,108, 31, 21, 60,136, 72,138,247, 21,188,136, 84, 78,188, 69,196, 9,212, 21, 80, 37,138,
- 48, 93,159,241,216,115,119,159,246,142,159,123,254,175,127,223, 27,255,246,162,223,255,155, 79,255, 60,176,247, 62,138,218, 51,
- 80, 31,203,174, 56,202,207,239, 80,213,103, 28, 13,216,123, 59,101,237,223, 30,229,119,251, 44,178, 61,104, 17,243,163,233,196,
-165,151, 3,255,172,170, 95, 35, 34, 31,251, 50, 1,253, 81, 6,176,187,138, 95, 31, 2,110, 4, 14, 0,155,129,139, 73, 90,148,
-147,242, 26,122,235,173,183, 83, 23,212,101, 52,112, 23,124,227,165,219,159,164,107, 53,245,100, 10, 49, 38,144,110,153,117,131,
- 91,145, 14,119,189,195,237,220,109,224, 30, 17, 7, 68, 99,241, 5, 90,132,119, 49, 1,191,115, 16,108,249, 17,152, 77,107,182,
- 14,135,238,247,126,244, 57, 63,252,164, 71,156,254,152, 31,251,141,247,253,232,180, 14, 31,186, 47,128, 93, 68,158,113, 15,139,
-110,166,235,115, 30,254, 50,224,229, 64,159, 67,126,232,217, 39,129,223, 4,254, 92, 68, 62,177, 48, 14,118, 0,255, 17,120,149,
-141,204, 29,192,219, 84,245, 82, 17,153,156, 32,160,159, 15,188,179, 0,244, 15, 2, 63,102,209,120,179,240,218, 71, 3,207, 3,
-206, 63,153,174,161,183,222,122, 59,121,204,157,192,123,252,172,142,251,222,252,145,189,239, 23, 55,101,101, 24, 88, 89,130,229,
-177,218, 87,236,190, 31, 69,198,110, 6,161, 70, 70,203, 9,228, 99,132, 24,105,163,114, 0,102, 16, 39, 16, 55, 64, 39,192, 52,
-253,172, 51,123,189,162, 26,169, 67,164,153, 6,126,248, 91,159,116,197, 59, 94,247,173,127,114,222,158, 45,207,183,133,201,221,
-159, 55, 73, 68,222, 2, 60,195,162,166,108, 87,246,195,231, 33,101,239, 7,158, 35, 34,151,138,200,235, 22,193,208,198,193,126,
- 17,249,113,224, 37,197,175,207, 59, 70,132,124,188,246,223, 73, 57,111,128, 63, 0,158, 36, 34,127,181, 8,232,246,249, 31, 19,
-145,159, 17,145,151,158,100,215,208, 91,111,189,157, 36,118, 34, 57,245, 1,137, 6,124,212,215, 92,184,233,249,151,158,190,116,
-174,128,139,170, 49, 31, 50,106,130,236,245, 89,116,143,127,216,230, 71,126,239,211, 30,126,193,184, 26,187, 8,144,115,234, 8,
- 52,235,136, 23,220, 57,143,195,157,246,112,100,203,233,200,120, 11, 52, 83,226,218, 94,244,200,173,196,189,159,134,102, 2,126,
-201,114,237, 30,193, 49, 92, 25,241,233, 91,246, 29,250,250, 87,255,175,151,223,116,235,161,183, 90,180, 30,143, 51, 58,154,203,
-169,139,136, 28,231,251,222,100, 17,250, 81,223,119, 34, 57,102, 85,221,110,145,127,182,235,238, 11, 90,127, 65,225,127, 66,229,
-102,247,116,140,147,229,122, 23,206,243,186, 7, 34, 45,162,170,127, 9, 60,203,126,124,143,136, 60,237, 4,142,241, 34,224,247,
-236,199,143, 3,143, 23,145,250,129,154,252,247,197, 53,244,214, 91,111, 39,151,157, 8,253, 30,128, 53,224,250,191,187, 97,245,
-245,127,119,195,234, 18, 71,111, 98,179,243,217,143,221,253,178,231, 63,241,252, 51,150,221,208, 53, 81, 19,245, 62,153,160,211,
- 53, 8,107,248,139,191,154,234,137, 47,198,159,255,149,199,164, 16,116,255,205, 52, 55,188,147,240,185,247, 33,126, 8,170,168,
-192,108,125,198,197,103,238,220,250, 39, 63,253,205,111,120,250, 43,255,112,255,157,135, 38,127,195,125,151, 99, 63,150,221, 39,
-117,216, 6,108, 47,183,104,255,178,163,252,253, 70,224, 26,224,154, 99, 1,148,170,190,182,120,239, 91, 68,228,154,226,184, 47,
-103,161,100,207,142,121,245,241,168,247, 85,245,229, 36,122,246,130,123,123, 94,247,199,245,222,205,181,190,202,142,187,189,120,
-249,181,198,170,220,223,246,103, 5, 32, 94,122,130,199,248,247,197,247,175,122, 32, 1,253, 62,188,134,222,122,235,237, 20, 7,
-245, 8, 76,128,134,212, 20,198,178,222,109,212,175, 34, 60,242,234, 23, 92,252, 83,175,188,252,188,203,195, 12,102, 33,160,245,
- 20,157,172, 67, 51,133, 74, 25, 61,231,199,168,158,248,162,123,166, 18,118,156,199, 96,199,203,112,167, 63,150,230, 3,191, 1,
- 46, 36,200, 23, 97,182, 94,243,216,139,206,216,245,250,127,119,249,235,190,227,181,127,249,124,224,243,247, 51,168,151,224,113,
- 66,209,160,170, 94, 1,252,225,194,177, 22,237, 2, 99, 18, 94,174,170, 87, 29,163, 78,254,178, 34, 74,190,214, 26,193,188,233,
-104,160, 89, 28,243, 77,170,122,153,136,188,226,110,192,247, 77, 28, 59,181,144,207,235, 74, 85,125,198, 3,120,189, 71,187,214,
-119,220,195, 49,239,111,219, 87,124,191,229, 4,198,193, 35,129,236,205,222, 1,252,229,169,118, 13,189,245,214,219, 67, 3,212,
- 49,224,172,237,139, 2,208,253,185,187,198,207,125,211,139, 46,185,250, 89, 23,239,186,104,186, 17, 9,161,134,233, 6, 52, 53,
-136, 34, 3, 24, 61,239,231,241,143,254,134,246, 96,135, 55,166,252,213,135,110,230,175, 62,124, 51,251, 87, 55, 24,120,225,210,
- 51,119,240, 77, 79,124, 56, 79,184,240,140,116,224,115,158,132, 12, 55, 83,191,247,151, 96, 88,165, 83,112, 66,179, 58,229,219,
-159,254,232,199,255,207,119,126,242,101,127,245,129,155, 95,195,151, 89,238,118, 15,209,230,149, 11, 17,225,189, 61,198,149, 6,
-112,165, 93,103,199,202, 78, 66, 25,205, 94, 64,167,180,191,238, 30,156,141, 63, 44, 34,235,183,216,113, 51, 32,150,231,253,114,
- 85,189,241, 24, 84,249,107,143, 2,232,229,177,242,185, 93,118,148,235,120,160,174,119,251, 2,160, 31, 40,206,239,130, 7,112,
-238,156, 87,124,191,247, 4,222, 95, 58, 69,239, 22,145,240, 32,204,255, 47,247, 26,122,235,173,183,135, 8,168,207, 5,211, 6,
-162, 91,159,253,232, 29, 63,124,205, 85,143,248,209,179, 55, 45, 45,109,172, 5, 52, 76,161,158,218, 39,121,164, 89, 99,240,212,
-239,153, 3,244,127,252,204,173,188,242,119,223,195,141,119, 30, 97, 60, 26, 48,168, 28, 78,225,195, 95,216,207, 31,253,195, 39,
-121,238, 19, 47,228,191, 92,249,213, 44,143, 6,184, 61,151, 80, 61,250, 42,154, 15,254, 38,108,222, 3,104, 74,162,171,240,211,
- 47,121,202,247,252,245, 63,223,252, 71,170,124,140,148, 34,184,175, 1,253, 77, 11,160,113,205,189, 60,198, 5,118,140,108, 55,
- 2,175, 16,145, 69,231,224,234,133,232, 54,127,246, 19,239,230,240,175, 42, 0,248, 21,139, 20,182,125,246, 31, 22,224,249, 42,
- 85,157,163,186,141,114,127,249, 2,248, 94,181,144, 71, 47,207,237,138, 7,233,122, 95, 85, 28,239,213, 38, 98, 92,124, 86, 15,
-132,189,160,248,254,253, 39,240,254, 39, 21,223,127,196,206,125, 39,240, 50, 59,246,133,192,178,129,237,191,144,168,242,223,185,
-143, 41,250, 47,247, 26,122,235,173,183,135, 24,168,103, 64, 63,255,135,190,238,172,159,121,237,179,207,251, 55, 85,172, 88,159,
-214, 16,102, 16,154,148, 71, 23, 64, 3,178,235, 28,170, 39,119,162,219,207,220,118,128,151,188,225,175,184, 99,163, 97,121,101,
-137,218,123, 6, 3,207,208, 11, 94,135, 72,104,120,235,251, 63,139,119,142,159,125,241,229, 41, 98,127,248,215, 18, 62,245,151,
- 16, 86,161, 90, 74,122,187, 89,205,227, 47,220,125,250,147, 47, 61,253, 89,239,255,196,109,215,147, 82, 4,199, 29,173,155,112,
-238, 88,118,197, 81, 0,236,104,224,116, 79,246,166,133,232,242,137,199,202, 75,139,200,181, 70,111,231,136,244, 50, 85,125,249,
- 61,228,195,175, 21,145,171,142,113,188, 27, 85,245,213,118,188, 28,237, 94, 97, 78,192, 34, 88,102,192, 60,106, 29,126,113,110,
-255,252, 32, 94,239,141,199, 58,222, 3, 36,146,123,198,130,211,241,251, 39,112,152,199, 22,223,223,170,170,207, 4,126, 11, 56,
-125,225,117,231,216,215, 55, 3, 63,174,170, 47, 20,145,127, 62, 73,174,161,183,222,122, 59,201,236,203, 41, 5, 19, 64,118,172,
- 84, 87,188,249,187, 30,241,199,175,255,198,243,254, 13, 53, 76, 99,157,202,209, 36,192,192, 65, 37, 80, 9,202, 12,127,241,211,
-144, 77, 93,127,141, 87,255,238,251,248,204, 23, 15,113,168, 17,110, 93,109,248,194,161, 25,159,189,115,131, 27,239,220,224,192,
- 36,160, 85,197,214,173,155,248,147,127,250, 12,215,126,216,154, 94,249, 10,127,193,211,208,195,123,193, 59, 16, 37, 10, 12,151,
-134,188,240,242, 71, 92, 65,202, 13,222, 91, 85,255,107,239,230,235,138,133,232,252, 25,247,182, 85,172,229,128,203,227,188,250,
-158,192,199,232,231,107, 22,156,139,187,179, 87,220,195,241,174,165,163,169, 41, 89, 7,163,201, 75, 22,226,234,187, 59,191,163,
-156,219, 3,125,189, 87, 63, 88,141,127, 84,117,235, 2, 3,241, 65,224,173, 39,112,168,157,197,247,143,179, 72, 60, 3,250, 29,
-164,118,176,255, 0, 28, 94,120,102,127,167,170, 79, 57, 73,174,161,183,222,122,123, 8,128,122, 22,197,109,250,234, 11, 55,255,
-200,251,190,255, 81,127,244,194, 75,119, 60,110,125, 61, 16, 8, 16,235,116, 84, 47,136, 23,164, 18,196, 59,164, 18,220,153,143,
-110, 15,114,211,237, 7,249,139, 15,125, 30,150,151,186, 50, 55,239, 9, 56,142, 76, 3, 55,237, 93,231,198, 59,214,169, 85,136,
-222,243,206,143,126,174, 59,129, 93, 15, 71, 55, 14, 3,141,157,141, 66, 19,185,228,236, 29, 23, 2,103,112,255,109, 84,115,165,
- 69,145,247,150,226, 45, 1,234,192,189,112, 10,174, 93,248,236, 99,217,117,199, 89,178,118,221, 49,206,233,138, 5,128, 61,158,
-243,123,203,131,116,189, 55, 62, 88,253,247, 85,213, 89, 52,157,155,191,204,128,151,181, 91, 28,220, 59, 43,187,195,253, 0,169,
- 55,251,237,164,230, 50,167,139,200,211, 68,228, 41,192,105,192,247,147,196,169,144, 40,249, 55,171,234,150,147,224, 26,122,235,
-173,183,147,204,238, 45,253,158,233,246, 51, 95,250,149,167,253,212, 27,159,123,238,247, 14,162,103,125, 22,193, 43,104, 68, 20,
- 36, 10,234,197,168,247,244, 22,169,134,184,237, 15,107, 15,116,243,222,195,108,172,215,176,101,212,249, 9,121, 89,113, 14, 84,
- 57,184, 90, 83,207, 26,206,222, 90,113,100,210,165, 18,101,243, 30,192,195,116, 29, 89,218,140,162,208, 52,156,191,103,243,238,
-209,208,159, 62,157,133,235,239,229,117,189,250,110,254,118,129,129,212, 5, 36,106,184, 85,127,223,139,104,241,138, 99, 0, 43,
-247, 20, 93,151, 77,122, 76,185,126,221, 61,128,225,221,217,141,119,115,141,247,234, 88,139,231,246, 0, 94,239,117, 15,226,124,
-249, 37,230,123,179,191, 82, 68, 62,120,130,199, 26, 47,252,188, 6,124,173,136, 92,191,112, 79,102,192, 27, 85,245,115,192,159,
-219,175,207, 1,254, 29, 39,214,209,240,190,188,134,222,122,235,237, 20, 6,117, 1,216, 60,246, 79,249,133,111, 56,251,117,175,
-184,236,180,167,206,102, 48, 25,164,150,175, 26, 20,169, 35,195,161,227, 80, 8,113, 9,231,168,124, 91,193, 46, 0,218, 53,201,
-218,189,117, 25, 63, 28, 16, 34,214, 47, 94, 13,212,237,127, 21,240,142,181,245,154,207, 77, 38,140, 30, 87,156,170, 6,208, 58,
- 53,165,113, 91, 16,141,104,140,236, 88, 25, 44,111, 93, 30,110,191, 99,182,113,175, 24,136,227,108,154,242, 42, 82,222, 57, 55,
- 79,121, 7,119, 47, 94, 43,173, 44, 51,187,192,154,182,156,136, 29,139, 33,248,114,169,232, 19, 2, 97,123,237,101, 15,240,245,
- 62, 40,160,174,170,255, 23,240, 67,197,175,222, 32, 34,191,246,101, 28,114,157,212,211, 61,219,213,139,128,190, 48, 70,255,183,
-170,190,165, 96, 48,190,251,222,130,250,253,112, 13,189,245,214,219, 41, 8,234,153,202, 30, 92,178,103,252,226,223,125,225,249,
- 87, 63, 97,247,242,238,141, 89,132, 81,149, 0,189,142, 84,117,100,184,228,249,241,119,126,233,195,231,110, 27,110,251,222,203,
- 78, 59,119,162, 32, 57, 90,175,107,226,157,159,197,157,147, 68,191,151,158,181,147,127,117,209,110,254,254,250,189, 80, 85, 9,
-196,157,206,247,133,139,233,189,147,253,107, 92,116,122,183,190,235,225, 91, 96,122, 24,157,110, 67,108,199, 24,141,217, 41,192,
-113, 63,208,239, 34,114,181, 69,145,185, 19,221,241,136,215,142, 6, 78,247,102, 47,247, 7,195, 14,220, 7,175, 61,149,174,247,
-120,192,240, 63, 1, 63, 93,252,234,119,129, 31,252, 50, 15,187,186, 0,234,191,125, 28,239,249,173, 2,212, 31,161,170,187, 69,
-228,142, 7,241, 26,122,235,173,183, 83, 12,212, 51,221,190,251,170,175,216,241,202, 95,125,206,217,255,254,244,241, 96,184, 30,
- 5, 89, 78, 33,184,206, 34,227,168, 76,134,240,131,111,251,220,219,174,121,223, 29,127,252, 63,174, 58,239, 71, 69,141,121,247,
-166,126,175, 28,122,123,183, 17,148,115,194, 79, 60,239,137, 60,231, 19,127, 14,147, 26, 70, 67,219,221,205, 64, 61, 2, 26, 97,
-117,157,199, 63,242, 44,190,227,107, 30,213,190, 55,222,113, 61,170, 53, 18,102,233,133,170, 56, 81,246,175, 78, 54, 14,175,207,
-142,220, 95, 55,203,128,189,220,178,245, 74,238,101,105, 27,137, 2, 63,209,206,116,167,226,174,112,167,244,245,170,234, 15, 0,
-191, 80,252,234,143,129,239,186, 15,114,208,119,146,244, 31, 0,251, 68,228,115,199,201,140,176,224, 48,221,241, 32, 94, 67,111,
-189,245,118, 10,129,186, 0, 82,121,185,248, 53, 95,127,230,175,190,242, 95,159,254,172,166,129,245,202, 33, 35,135, 70, 69, 55,
- 2, 43,149,112,243,180,153,124,247,255,188,233, 55,222,245,233,195,191, 11,196,207, 31,170,111, 71,244, 18,109, 35,117, 96,188,
- 76,184,249,189, 84, 7,110, 70,182,159, 7,192,179, 31,127, 30,215,252,187,175,229,135,254,199,123, 88, 63, 56,133,241, 40, 41,
-218, 85, 97, 86,195,250, 6, 79,184,100, 15,127,244,202,111, 96,101, 60, 72,103, 85,111, 16, 62,241, 86,100, 56, 74, 10,123,141,
-104, 12,224, 28, 55,220,118,112,239,100, 22,246,114,255, 9,229, 32,229,156, 51, 93,125,197, 9,188,255,154,135,250, 62,235, 15,
-149,235,181,218,253,146,158,254,107,224,219,142,182,217,202, 9,216, 39,129,199,100, 80, 63,206,247,236,187, 27, 70,228,193,184,
-134,222,122,235,237, 36, 51,119, 15,160,190,251,181,207, 57,235, 13, 63,250,212,211,159, 53,105,160, 94,174,144, 37,143, 70, 96,
- 61,176, 50,246,252,237, 45,107,183, 95,254,198, 79,254,228,187, 62,125,248,191, 2, 55, 3, 95,250,212,157,147, 79,225, 4,130,
- 5, 2,222, 37,138,189, 89,165,126,239,235,231, 62,228,123,159,254, 40,254,225,231, 95,192, 15,125,227, 99, 56,127,199,136,177,
-214,108,114,129,167, 92,180,139, 95,255,190,175,227,221,175,185,146,243,247,116, 66,225,230, 3,191,129, 30,188, 25, 6, 35,212,
- 68,120, 52, 1,156,240,169, 47, 30,248, 28,169, 89, 71, 60,201,238,243,177, 84,231,167,250,249, 93,113,138, 94,239,241, 0,250,
-119, 3,255,173,112, 16,223, 13,124,139, 9,215,238, 11,251,120,241,253,232, 56,223,179, 40,174,155, 60,200,215,208, 91,111,189,
-157, 66,145, 58,231,108, 31, 94,254,221,143,217,241,244,217, 36,194,166, 1, 50, 20,116,166,248, 73,195,104,197,243, 59, 31,222,
-247,201, 31,248,163,155,127,225,240, 70,120,143, 69, 17,107,192,248,221, 55, 28,249,167, 91,143,212, 47,221,181, 60,168,130,106,
- 87, 4,183,180, 76,252,252,187,105,222,247, 43, 84, 79,237,244, 58,143, 61,119, 23,175,127,233,211,248,249,239,104,184,109,255,
- 26,195, 65,197,153, 59, 86,238,114, 62,225, 19,127, 74,243,145,223,129,241,114,242, 58,156, 71, 67, 68, 66,164,158, 76,121,235,
-123,110,120, 31,169, 31,253,253, 9,234, 39,146, 31, 46, 5,101, 87,168,234,246, 7,171,206,250, 24,118, 99,113,126,151, 29, 39,
-232, 93,118, 10, 95,239, 61, 93,219,139,129,223, 40,192,240,253,192, 55,138,200,198,125,248, 49,239, 46,190, 63, 83, 85,199,199,
-177,159,249,226, 62,234,183, 63,200,215,208, 91,111,189,157, 66,145,122,117,222,142,209, 69,219, 71,158, 38, 38,117,187,174, 7,
-134,179,128,140,132, 87,254,213, 23,174,125,201,239,220,240, 31, 15,111,132,119,218,226,114,136, 84,243, 90,223,114,112,246, 79,
-111,189,254,192,135, 6, 21,232, 36, 0,138, 56, 82,189,250,242,102,194, 71,126,155,250,218,159, 64,215,239,156, 15, 67, 6, 21,
-231,237,217,122, 87, 64,175, 55, 8,239,127, 35,205,123, 94,131,140,134,136,247, 41, 95, 63, 24, 65,221, 48,112,240,143,159,186,
-245,182,191,255,196,237,215,146,122,191,223, 47,160,190,176,197,231, 98, 68,122,119,182, 88, 38,246,242,147,108, 28,148,231,183,
-221,218,182,158,104,148,126, 42, 92,239,221, 61,227,111, 37,137,214,242,220,248, 32,240,245, 34,114, 95,107, 53,222, 77, 71,167,
- 15,128,203,143,227, 61,207, 42,190, 63, 72,162,240, 31,204,107,232,173,183,222, 78, 33, 80,247,159,184,125,227,211, 95,156,133,
-102,121,217,179, 92, 7,150, 61,172,250,168,223,254,135, 55,254,254, 47,190,227,214,159, 2, 62, 76, 18,252,172,145,250,173,231,
-141, 94,110,255,213,191,187,253, 45,135,234, 64, 85, 7,168,163,237,133, 78, 18,206,173,108, 38,222,240, 23,204,222,250, 18,194,
-199,223,138, 30,254,210,209, 23,216,181,189,196, 27,174,101,246,199, 47,165,249,224,127,135,241, 24,124,149,154,205,136, 32,110,
-128, 76,106,240,202,207,190,249,131,127, 12,124,214, 62,255, 62, 7,117,107, 56,179,184, 57,201, 91,142,231,189,214,159,188, 20,
-139,189,234, 30, 34,221, 7,218,222,194,188, 40,237, 85,199,113, 47, 94,117, 10, 95,239,177,174,235,185,164,118,169,121, 43,225,
-143, 3,207, 20,145,131,247,245,103,217, 6, 46,165,226,253,199, 84, 85,238,230,220, 54, 51,175, 86,127,187,136,196, 7,243, 26,
-122,235,173,183,147,207,238,150,126,223,183,218,124,224,133,191,127,211,213, 63,244,180, 61, 87,238, 92,174,182, 94,127,231,228,
-139,255,237,189,119,188,237,227,183,172,255, 25,112,171, 69, 11,179, 5, 16, 13,192,198,103,247, 78,254,226, 53,127,115,219, 21,
-175,251,134,115,158,209,172, 54, 80, 57,100,228, 59, 50,112,121, 11, 52,135,168,223,251,115,200,112, 19,178,243, 18,220,142, 11,
-161, 26, 67,172,137, 7, 63,143,238,253, 56, 76, 14,194, 96, 0, 43, 69, 3, 46, 5,162, 67,167,194,112,147,227,183,174,253,212,
- 39,254,250, 95,190,244,251, 36,234,253, 62,221,147,218,162,243, 43,184,235,254,226, 7,184,119,202,247, 87, 48,223,123,253, 29,
-182,205,232,181,199,241,249, 87, 26, 16,220, 47,130, 51, 17, 57,160,170, 87,211,149,235, 93,161,170,111, 58,218, 22,173, 6,232,
-199,179,237,233, 73,123,189,199,248,220,103,154,115, 99,138, 76, 62, 13, 92, 33, 34,119,126, 25,199, 44,213,229,207, 19,145, 63,
- 89,120,201,207, 3,223, 67, 42,109,123, 26,240,122, 85,253,145, 69,176, 86,213,101,224,205,164,166, 51,216,124,187,250,129,184,
-134,222,122,235,237,161, 3,234, 53,176,255, 31,110, 60,242,255,254,195,141, 71,222, 97, 11,207, 62,224, 54, 18,213,190,106,175,
- 89, 44,139,201,251,173,223,246, 75,239,188,245,245,143, 63,103,249,252, 23, 61,110,231,195, 55, 14,207,144, 45, 67, 24,185,212,
-105, 14,133,193, 0, 25, 12,146,130,125,223,135,105,238,184,174, 61,156,184, 10,170, 33,172,108, 90, 88,185,128, 89, 64,227, 18,
-227,209,144,235, 62,115,251,129,255,240,223,223,255, 58,139,210, 55, 56,129, 29,218,244,110, 90,163,221, 29,104,221,155, 60,177,
-117, 75,123, 5, 93,207,237, 12,116,215,146,232,234,197,190,236,217,153,200, 17,238,171,239,231,177,112, 13,243,219,160,190,220,
-104,248,107,138,115,187,130, 68,165,111,183, 72,252, 0,199,200,193,159, 2,215,187,104,127,194,188, 96,109, 29,248,255,142,119,
-104,136,200,215,159,128, 51,181,215,202,205,126,203,126,245, 31,128,167,169,234,111, 0,215,219,252,124, 2,169,123,220,185,197,
- 91,255,111, 17,249,200,201,112, 13,189,245,214,219,169, 3,234,193,128,187, 49, 16,119,246,187,169,125, 5,142,189, 19, 90, 3,
-172, 70,213,143,254,219, 55,223,244,179, 59, 87,170,215, 60,243,225, 91,207,154, 28,154,193,230, 1, 50,246, 93,253,122, 66,112,
- 24,142,239,190, 14, 77,129,168, 48, 13,196,195, 51,150,206,216,195,245,183, 30, 88,189,234,234,191,187,250,208, 90,253,158,194,
-201,184,191,237, 58, 3,244,123,221,217, 76, 68,174, 41, 26,216,108, 47,128,242, 65, 87,136, 91,180,126,149, 69,215, 23, 20, 96,
-251,218,163,188,252, 0,112,213, 49,254,118, 74, 92,239, 81,108,105,225,231,175,120,128,238,251,111,171,234, 25,192,207,217, 28,
-123, 60,240,134,187,121,203,175, 0, 63,115, 50, 93, 67,111,189,245,118,242,152,187, 7, 24,109, 72,249,242, 3,192,126, 18,221,
-190,110,191,215,123,120,239, 20, 56,116,120, 35,188,235,121,215,124,250, 63,255,206, 7,247,125,114, 60,116, 12, 14,215,196, 67,
- 53, 76, 98,123, 20, 65, 16, 57,202,151,253, 35, 0,179,136, 30,110,144, 3, 83,150,182,111,227, 93, 55, 30,186,237, 89, 63,121,
-237, 79,222,120,251,234,255,178,115, 91,231,254, 83,189, 95,107, 17,235, 85, 34,242,196, 19, 1,244, 18,232, 72,237,101,175,225,
-248,154,171,188,133, 68,101,223,239,155,152,216,166, 48, 79,188,135,207,186,150,180,237,233,117,167,250,245,158, 44,102,105,134,
-203,129,127,186,155,151,125, 4,248, 38, 17,249,225,163,229,210,123,235,173,183,222,224,254,109,210, 2, 73,172,179,108, 81,218,
-163,190,251, 41,187,191,231,103,158,125,214, 55,157,181,117, 88, 53, 83,165,169, 4,198, 30,169, 92,138,220, 93,113, 58,170, 16,
- 64,155, 8,147,128,175, 35,131,129,112, 56,192,207,189,103,255,223,254,242,219,110,120, 83, 29,226, 7,232, 74,233, 78,201,102,
- 26, 70,113, 47, 82,216, 55,146,118, 55,187,246, 65, 60,175, 76,135,151,123,162, 95,123,156,187,193,157,114,215,123, 18,141,135,
-139,128, 39, 1,103,218,252,188, 13,248, 71, 17,249, 76,191, 92,245,214, 91,111, 15, 54,168,103, 96, 31,147,182,154, 60,253, 97,
- 59, 70, 95,247,242,175,222,253, 45,223,121,217,174, 39,159,189,121, 48, 64, 5, 85, 37,138, 16,139,179,113, 10, 78, 53,149,174,
- 9,236,155,132,248, 7, 31,222,255,209, 55,189,239,142,183,125,228, 11,107,111, 7,190,104,204,193,198,169, 10,232,189,245,214,
- 91,111,189,245,118,170,129,122,254,156, 33,176, 2,108, 1, 78,223,177,169,250,138, 39,159,183,233,201, 47,120,220,142, 39, 61,
-238,172,229, 51,182,143,252,202, 74, 37,195,202,137,107, 34,186, 30,226,236,208, 44,174,127,230,142,141,189,111,249,208,254,127,
-249,251, 27, 87,255,233,150,131,179,235,128, 47, 1,135, 73, 57,244,251,173, 38,189,183,222,122,235,173,183,222,122, 80,191,251,
-207,114, 36,117,238,178,125,109, 6,118, 0,123,150, 71,110,231,184,114, 91, 6, 94,134, 77,212,102,210,232,145,245,105,216,167,
-202, 29, 36,138,253, 48, 41,111,190,198, 61, 11,245,122,235,173,183,222,122,235,173, 7,245, 7, 16,220, 7, 22,189,231,175,138,
-174, 97, 6, 22,129,215,246, 53, 51, 32,111,122, 48,239,173,183,222,122,235,173,183,147, 7,212, 23, 63, 63,131,124,254,191, 4,
-117, 45,254,239,129,188,183,222,122,235,173,183,222, 78, 98, 80,191,187,243,233, 65,188,183,222,122,235,173,183,222,122,235,173,
-183,222,122,235,173,183,222,122,235,173,183,222,122,235,173,183,222,122,235,173,183,222,122,235,173,183,222,122,235,173,183,222,
-122,235,173,183,222,122,235,173,183,222,122,235,173,183,222,122,235,173,183,222,122,235,173,183,222,122,235,173,183,222,122,235,
-173,183,222,122,235,173,183,222,122,235,237,126, 50,185,236,180, 93,170,128, 56, 16, 60, 14,240,206, 33, 78, 82, 39, 24,201,173,
-222, 28, 34,224, 36,245,135,241,222,225,108, 31,116,239, 82, 35, 56, 5,188, 19,196, 9,131,252,122, 0, 17,236,109,120, 71,251,
- 62, 39,224, 17,162,166, 93, 87,157, 19,124,126, 33,138, 23,193,171, 18, 81,156,203,251,174, 87,136, 6, 28,130, 31, 8, 62, 4,
- 70, 78,240, 40, 30, 80,167, 16, 97,136, 50, 85, 37,160,108, 21, 88,169, 28,195, 42,245,163,165,242, 92, 60,155,240,132, 11, 4,
-249,198, 11,224, 43,214,144, 29,207,131,241, 51, 96,184, 2,178, 9,100, 37, 93,188,206, 64, 87,161,190, 29,142,188, 14,253,244,
- 77,240,143, 99,226, 71,239, 96,114,243, 97, 14, 15,132,102,101,204,157,107,240,169, 53,144, 8, 91, 6,176,105,224,112, 46, 82,
- 71, 88,171,133,105,128,129,128,162, 4, 32, 58, 65, 67, 32, 70,104, 52,221, 59, 81,235,190,163,160, 2, 66,218,165, 78, 28,169,
- 57,110,126,104,154,254,182,216, 83,183,253,187,245,237,145,246,169,104,123,255,219,215,216,126,245,115,191, 3, 84, 28, 98, 71,
- 83,181, 70,126, 66,219, 10, 72, 36,245,242,245,214, 11, 80, 4, 42, 15, 81, 29, 81, 99,215, 49, 72, 23,143,156,118,211,109,255,
-164,224,237, 69, 51,210, 56,113, 2, 3, 7,227, 42, 29,171,137, 16, 3, 72, 37, 12, 61,108, 95,169,216,188,175,230,172, 93, 75,
- 84,223,117, 22, 60, 50,192,142,139, 96,211, 85, 48,126,108,250,128,250, 19,176,246,103, 48,109, 64, 46,128,112,115, 58,250, 48,
-192,182, 43, 97,240,104, 82, 71,226, 85, 88,127, 39,124,238,191,193, 39, 60,251,174,190,137, 27, 42,229,208,192, 81, 7, 88,118,
-214,203, 88, 32,186,244, 92,163,192, 76, 29,177, 14,204, 80, 98,128,105,132,160, 16, 4, 66, 80,102, 81, 17, 32,106,250,125,190,
-110, 5,156, 83,198,164,107,209,152,126, 31, 21, 26,148,202,158,231, 84, 96, 26,210, 51, 70,211,120, 73,131, 99,126,140, 84, 54,
-142, 28,218,182, 98,172, 28, 12, 68, 24, 58,216,228, 97,164,202, 29,181,114,103,147, 78, 98,164, 80, 9,172, 6,216, 80,109,231,
-221, 88, 96, 87, 5, 35,129, 89,132,101,129,109, 14,238, 12,202,135,167,112, 48, 40,162,202, 52, 20,231,148,199, 93,241,115,110,
-255, 88, 14,153,114, 24,196,252,224, 17, 68,180, 29,125,206,190,198,164,243,139,105, 10, 19,237,218,134,164,251,155,199,123, 69,
-234, 49,173, 54,130, 29,202,200,254, 94,147,238,187, 22,195, 48,146,174,119, 18,187,115,245,246,229,138,249,147,223,211,144,239,
-143,180, 45, 47, 21,165, 18, 88,178,175,129, 77, 73, 87,206, 51, 73,107,219, 80, 96, 69,210, 39,205, 20,234,252,252,237, 61,209,
-198,132,147,180, 17,198, 72, 28, 94,210,239, 39,170, 76,219,215,203,220,156,174,128,136, 16,236,247,145,124,108,101,136,176,221,
- 41, 75,192,134,194,106, 76,115,113, 93,149,219,163,114, 32,166,223, 47,139,112,182, 75,235,239, 94, 85, 86, 53,125,102, 19,243,
-241,148, 90,161, 70,105,138, 49,156,103,177,179,103,148,231,171,144,215,175,180, 80, 69,164,125, 6, 51,148,105, 84,136, 17,161,
-235,239, 93,142,137, 60, 36,212,174, 81,224, 46,227, 34,127,137, 20,231,144, 23,163, 98,237,155, 91, 95, 22,142,131,192,192,121,
-156,147, 22,195, 70, 26,113,162,108, 68,152,218,170,231,129, 74,187, 57,165,118,222, 1,233,182, 2, 21,193, 11, 12, 92,197,168,
-170, 24,120, 79,227, 61,235,245,140,122, 54, 67, 99, 64, 5,230, 27,164,118,239,165, 56,175,104, 63,167,239,243,249,187,118, 13,
-135,132,185,222, 87, 68,160, 81,197,197,200,226,162,172,237,189, 77,227, 20, 85, 69, 52, 29, 72,109, 11, 84, 81,219,226, 92,139,
-187, 99,223, 56, 17, 68,237,160, 78,218, 1,235,178, 23,160, 66,144,180, 72, 57,215,157,158, 72,247,254,116,234,206, 62, 43,218,
-244,180,133, 6, 1,231,210, 77,117,180,206,133, 83, 69,109, 53, 20,177,197, 33,223, 16,192,185,118,229, 64,129, 74, 4,111, 94,
-137,243, 48,208, 4,144, 3, 34, 1, 73,103, 16, 3, 90, 76,205,110,186,147, 30,167, 12, 64, 54, 67,165, 48,126, 1,114,246, 47,
-161,151, 68,220,193,237,140,238,156,178,114,100,131,189,190,225,112, 28,224,156, 50,240,201,121, 24,136,226,241, 68,133,202,219,
- 57, 69, 5, 17, 6,164,133, 60, 22,231,174, 24,144,219,205,116,206,208,132,136,196, 60,197, 99, 58, 51,129,136, 75,131,217, 97,
-175, 41, 39, 95, 66,128,202, 29,107, 11, 59,215, 78,160,114, 2, 36,160, 79,231, 40,136, 57, 22,121,193,138,243,147,206, 0, 61,
-109,141,235, 24, 58,101,214,164,201,157, 23,210, 60,233,165,123, 44, 54, 86,180, 3,128,242,243, 21,115,222, 34,106,231,226,134,
-130, 87, 24, 58,112,123, 39,236,172, 61,213,183,236,129,199, 4,216,122, 38, 44, 93, 1,163, 75,210, 50, 31,111,129,141, 15,193,
-250, 45, 32,231,147,118,230, 5,164, 2,105,138,229, 33,164,101,193,237,132,241, 18,108,153, 49, 64, 88, 82, 69, 42, 24, 84,224,
-196, 17, 52, 18, 98, 2, 58,196,158, 31,218, 62,180,236,103,229,169, 32, 2, 35, 73,139, 67, 99, 99,185,156, 62, 18,211,177,199,
- 62, 57, 50,117, 76,227,219,197,244,158, 1,105, 81,198,165,191, 57,233, 6,197,220,115,178,181, 97,104,192,224, 13, 76, 42,215,
- 57,132,211, 38,237,124,180, 63,164, 5, 54,131,144, 23, 24,219,235,130,129,231,192,198,221,192, 9, 42,105, 54,228,215, 45, 11,
- 28,178, 25, 49, 20, 3, 37,251,140,202,156,153,238,153, 43,206,238, 67, 67, 90, 59,202, 5,220,139,206,129, 67, 40,158,200,178,
- 36, 80,143, 6,110, 83, 45,150, 29, 77,159,237,153,239, 29,157,207, 91,165,115,192, 26,187,166,198, 0,222,171, 50, 64,216,148,
-150, 20, 54, 52,189, 70, 10, 80,145,226,222, 6, 32,168,166,177,216,190, 70,147, 19, 75,218,128, 2, 77,199, 31, 73,186,255,106,
- 7, 25,230,115,162, 3,241, 65, 1, 42,106,159, 91,231,207, 85, 69,196, 17, 36,129,115,176,187,181,100, 19, 76,237, 94, 52, 10,
-162, 9,136, 43, 3,180, 96,231, 80, 9, 8,142,101,129, 37, 17, 20,101,162,145,198,230, 83, 0,106, 21, 14, 3, 51, 85, 60,202,
- 70, 84, 84,160, 65,136, 54,162,156,164,135, 53, 18, 97, 44, 74,208,132, 3,141, 57,143,216,243,172,138,235,105,180,187,150,228,
-128, 69, 60, 14, 17,161, 22, 80, 21,162,179,207,137, 58,119,159, 99, 17,160,116,200,210, 61,149,242,181,249,222, 75,225,212, 57,
-145,185, 77, 64, 90, 80, 84,230, 28, 3,230, 86,245,136,199, 83, 1,155,156, 48,148,138,195, 54, 94,199,121, 12,199,128, 67, 65,
-149,218,214,232, 88, 2,122,123,254, 66,144, 52,143, 91,108,243, 3,130, 11,136,166, 59,226,142,178,198,249, 34, 62,139,249,170,
-139, 49,172,133, 91,226,128,177,243, 44, 47, 47,227, 70, 99,234,160,204, 66, 77,168,107, 66,140, 52, 33,164,232,160,112,145, 68,
-161,138,237, 66, 33,173, 71, 40,154,135,178,164, 69, 7,105,189, 36,177, 40, 27,115, 0,164, 13,187,156, 69,245, 98,139,185,189,
- 63,135, 23,237, 49, 12,204,180, 59,249,204, 10,136,218,205, 17,177,133, 95,108, 48,119,222,178, 35,180,171,154,152,135,216,104,
-158,116, 58, 7, 16,222,188, 37,181,133,111,232, 34, 34, 46,121, 50, 2,113, 45,224,107,187, 41, 98,199,197,131,248, 98,184,196,
- 52,140,252,102, 24, 61, 1, 54,127, 29,114,209,219,209,195,219,112,251,182, 48,254,212, 12, 38, 13,181,171, 24, 8,108,114,145,
- 37,192,139,208,152, 71,229, 21,212, 67, 84, 37,218,125,112, 34, 56,169,168,189,226, 66, 36,154,119,136, 43, 34,118, 27,220, 62,
- 33, 10,209,158, 79,200,215,234,238, 58,136,219,255,157,177, 31,230, 32,229,209, 21, 53,226,237, 25, 32,221,164,202, 32,221, 29,
- 36, 13, 74,113,198, 20,196, 4, 74,190, 93,196, 28, 34, 49,129,138, 70,212,238,119,142,212, 18, 56, 59,134, 30, 26, 34, 46, 64,
-140,218,122,230,184, 52,144, 99, 72, 3, 93,204, 9,112,146,198,128,139, 9, 48, 6,164,232,125,115,173,156,113, 40,176,233,249,
-103,194, 83,129,173,123, 96,252, 20, 88,186, 12,220,102,208,195, 48,253, 16,172,127, 18,166,147,132, 16, 58, 3,183, 12,126, 25,
- 6,203, 32,203, 54,173,166,246, 76,183,193,210, 54,216,117, 59,195,229, 1,123,102,235,204,150, 29,179, 0,235,117,100, 18, 32,
- 24,120,103, 70, 37,196, 4,244, 33, 58, 52, 51, 19, 58,207,152, 68,187,137, 78,230,129, 61, 47,232, 85,147,174,221,107,154, 7,
-193,165,215, 52, 81, 24, 59,101, 57,194,204,117,142, 80,158,163,217,113,136, 54,126, 70,249,158, 21,127,247, 46,157,235,106,132,
-181, 90,187, 69,199, 94, 27,237, 57,143,108,236,212,161, 3,193, 28,169, 4,151, 22,171, 1, 9,216,110, 13, 65, 13, 0, 0, 32,
- 0, 73, 68, 65, 84, 43, 1,167,233,122,102,115, 32, 93, 70,235,105,177,109,138,107,141,210,177, 20, 57,174,174,200, 44, 83,199,
-174, 5,123,223,212, 0, 44, 59, 0,211,194,241,240,154, 64,116, 84, 56,149,100,167, 66,161,145, 14,112, 92,187, 6, 40, 51,133,
- 41,202, 8, 88, 17, 88, 66, 88,151, 20,141,182,247, 83,187, 8, 50, 44, 68,148, 33, 3,140,118,247,186,124,206,121,157, 89, 18,
-216, 36,146,152, 16,133,117, 77, 78,151, 20, 14, 94,158,203, 30,152,153, 51, 84, 91, 52, 95, 58, 59, 67, 18, 83, 20,237,158,172,
- 27,224,136, 8, 67,187,155,181,157, 55,118, 95,182,122, 71,133,178, 30,148, 96, 75,195, 58,112, 40, 10, 19,251,124,204, 89,186,
-131,116,110,209,220,177,236,148,169, 64, 84,105, 29, 85, 81,101,217,214,250,166, 24,135,195, 5, 86, 35,154,147,225, 84,113,162,
-157,147,105, 78,206,196, 57, 26, 18, 43, 25, 11, 71, 42,127,102, 11,108, 5, 22, 57, 41,162,236,133,144, 75,237,115, 97,158, 17,
-114,204,163,185,204,133, 49,105, 77,246, 34, 44, 9,140, 69, 88, 5, 38,230, 60,165, 64, 85, 17, 39,104, 84, 84, 59, 64,159,139,
-139,165,163, 12,242,216,142, 22, 68, 69,186,193, 41,234,138,160,136,121,224, 45, 93, 74,157,103, 50,165,192, 78, 15, 12,125,133,
- 27,140,136, 49, 82, 57, 7,126, 68, 13, 56,141, 72,240, 52,245, 12,140,149,201, 8, 94, 73, 62, 82, 11, 6, 29,233, 35, 70, 23,
- 43, 98, 19, 37, 17, 3,233, 14, 10, 34, 41,226, 75,236,123,114, 55,196, 37,170,206, 25, 37,159,192, 74, 18,230,171, 38,208, 54,
-207, 36,104, 76,224,134,107,207, 33, 15,108,143,162, 6,246, 94, 44,142,183,155, 46,133,135,227,236,116, 84,211, 93, 21, 39,184,
-168,105, 80, 8,204, 52, 34,234,104, 66, 36, 0,163, 33, 12,124,132,224,136,107,147,196,159,102, 36,109,151,181, 50,162,163,139,
-236, 6, 59, 96,211,139, 33,126, 14,185,248,227,112,235, 38,170,189,107,108,254,194, 42,131, 81,205,166,225,144, 97, 52,170,187,
-136, 82, 43,187, 61,181, 72,235,237, 2,212, 26, 91,146, 77,132, 20,198,133,136,132, 8, 81,169,156, 35,198,216, 69,228, 2, 33,
- 96, 76, 5,109,116,158, 28,161,244, 88, 93,177,224,198,121,222,179, 29,233,145, 69, 0,119, 93, 40,217, 78, 2,181,129, 14, 18,
-204, 55, 21,240,226, 16,151,134,123, 57,216, 69, 36, 57, 18,193,174,221, 39, 6,166,202, 3, 95,192,121, 65, 85,237,245,142, 58,
- 68, 99,110,186,153, 87,217, 98,130, 64,133, 48, 18,216,236,148, 93,119,204,216,122,217, 14,120,233, 16,182,157, 13,163,231,192,
-248, 9,224, 79, 79, 80, 57,187, 17, 86,255, 9, 38,251,147,167, 16,107,155, 33,219,192, 85, 9,220,197,205, 47, 1,126, 59,140,
-118,192,150,219,169,182, 13,217,186, 62, 97,125,160, 76,106, 97,221,168,245,236, 96, 69,163,171,243, 68,110,136,115, 52, 71,122,
-157,125, 19,211,152, 47, 41,188, 28,107,199,152, 22,100,209, 14, 0, 7,230,236, 4,187, 23,227, 10,124, 20,154,168,212,230,236,
-249, 60,225,205,225,117,146, 35,186,110,133,205,167, 51, 85,152,198,152,156, 34,205, 35, 90,168, 68, 25,155,227,148, 1,211,134,
- 19, 83,133, 42,106, 98, 69,128,245,144,206,125, 11,176,226,146,147,144,253,200,188, 64,184, 12, 90, 54, 7, 51,112,197,133, 5,
-183,164, 90, 27, 59,151, 96,224,144, 23,249, 90,231, 29,130,146,201,201, 79,172, 46,162,223, 80,240,235, 82,208,175,195,246, 51,
- 58,208, 9,230, 44, 52,154,128,125, 51, 48,201, 81,150,205,211, 90,139,221,163,180, 59,215, 88,210,176,246,252,189, 43,159,107,
- 74,245,173, 24,224,175,197, 68,121,207,232, 28, 35,236,220, 59, 96,207,169, 53,153, 75,163, 5, 59,199, 13, 99,133,198, 22, 36,
-169,118, 84,120, 14,128, 26, 77,115, 52, 81,253, 48,176, 52,101,142,246, 55, 20, 14, 42,236,183,239, 7, 70,245,214, 10,107,182,
-126,108,146,148,198,153,229, 96, 3,193,139,182,142, 57, 34, 4,115,192, 42,160, 54,103,104,163, 24, 59,161, 24,123,129, 60,231,
- 93,139, 25, 67,115,110,107,113,212, 46, 57,255, 65, 59,167,168,100,245, 88, 96,163, 50,205, 94,178, 41, 81,230,157,228, 98,105,
- 76, 1, 71, 1,254, 37, 53, 95, 89,170,119, 44, 48,114, 9,208, 55, 16,162,116,243,116, 36,137,101,216, 0, 38,182,238,106,166,
-183,219,220, 87,183,112,230,111, 27,148, 24, 26, 52,198,196, 78,101, 86, 70,239,194,184,183,209, 57, 28, 13,240,101, 46, 56, 19,
- 28,181, 0,205,140,161,171, 24, 12, 61,222,251,196, 88,169, 50,211,136,162,196,186, 78, 44,182, 57,103, 85,233,253,228,153,145,
-105,114,140,134,202, 51,121,145,118,117, 54,163,180,205,121,100, 34, 91,230, 40, 93,231,186,139,203, 78, 68, 75,247,138,180,224,
-157,239,153,119,201, 99,116, 46,141,154,104, 81,130, 20,185,123,215,185, 53,237,194,155, 40,119,135,151,148, 43, 25,186, 20,128,
- 55,196,228,113,169, 34,150,219,198, 59,130, 42,172,213, 72,227, 33,206,204, 61, 21,208,169, 1, 92,181,176,180, 12, 97,112, 38,
-172,252, 32,156,253,147,112,217, 94,228,200, 78,182,220,182,193,174,245, 25,119,110,246, 12,156,183, 72, 56, 45,236,138, 18, 37,
-233, 6, 90,180, 39, 22,212, 81,108,239, 81,212,128,134,142,122,137, 26,237, 94,217, 42, 18, 99,231, 44,104,231,222, 75,155, 51,
-207, 83, 41,182,209,226, 92, 4,142,182,212,144, 55,250, 62, 77,144,208, 29,215,242, 51, 30, 73,192, 28, 19, 29,158, 39,140, 72,
-196, 57, 71,140, 57,221,145,216, 15,103, 90, 6,181, 8,195, 41, 12,109, 96,121,213, 54,234,143, 33, 13,184, 38,216, 34, 39, 93,
-228, 53,176,232,222,161,233, 25, 57,216,132,178,235, 64,205,182, 51,151,113, 63,189, 27,118,157, 15,195, 23,193,232, 49, 41, 45,
-130, 66,216, 11,147, 15,192,198, 29, 48, 91, 55, 26, 32,130,140,192,173, 44,196, 95, 5, 76,184, 61,176,244, 66,216,118, 13,114,
-254, 1,248,176,167,158, 42,235, 33, 69,176,190,160,100, 23,193,169, 90,136, 68,195, 28,252, 24,195, 17, 22, 83, 95, 50, 15,126,
-246,127, 48, 71, 43, 42, 52, 17,182, 84, 48, 26,192,122, 16,134,209,232,109, 3,247, 68,177, 11, 99, 20,231,211, 34,225, 84,209,
-144,162, 58, 53,154,115, 32, 66, 20,157, 75,129, 12, 93,202,247, 86,162,212, 77, 90,156,113, 41,189,160, 49, 13,175, 97,118,134,
- 73, 57,244, 32,176, 25,161,118,202,186,118,115,173,140,144,114,110, 94,138, 84,196,188, 80,131, 57,178, 59,211,146,181,148, 26,
-129,238, 94,138,116,121,241, 18,220,109,136, 49, 43, 86,195,234, 40,121,241,146, 61, 41,211, 63, 27, 36,176, 93, 49, 29,193,192,
- 34,225,104,128,144, 29,156,166,252,204, 5,112, 8, 22, 89,139,165, 31, 42, 27,188,171, 6,200, 13, 41, 82,206,251, 69, 7,186,
-207,106, 36, 81,251,217,185, 79,243, 34, 57,174, 10, 76,236,164,167,118, 44,117,194,192, 64,191,182,200,186,142,210,134, 27, 3,
- 18,115, 81, 17, 9,154,158,207, 17, 21, 99, 39, 36,233, 8, 52,209,223, 57, 39,159, 89,145,153,129, 50, 45,251,145,214,172,136,
-165, 61,165, 99, 22, 70,118, 94,119,198,196, 66, 76, 99, 58, 31, 41,243,225,118, 13, 30, 24, 69,165,114, 90,168,123, 82, 36, 60,
-192, 37,214,110, 65,103,145,103,167, 44, 12,155, 57, 64, 47,242,233,177,136,106, 89, 0,118, 41,194,178, 88,230,211, 69, 88,118,
-233,107, 34,194, 70, 76,201,196,161,116,250,162, 37,129, 70, 18,243,219,136,107,169,109, 45,128,217, 21,224,235, 77, 67, 22,112,
-104,108,210, 4,106,255,106, 17,249,162,150,233, 40,233,245,204, 76,148,227, 87,236,238,141,157,103,105, 52,102, 88, 13,113,206,
-211, 8,224, 60,206, 57, 54,204,201,156,134,136,196,208, 6, 79,149,138, 16,164,136,136, 45, 47, 35, 5,240, 58,243,192,112,174,
-163, 8, 52, 3,124,167,224,113, 20, 33,170, 57, 7,206,120, 9,231,100, 30,132, 72,130, 58, 41,126, 70,210,255,193, 0, 67,131,
-154,152, 78, 11,106, 66, 58, 82, 68, 93,235,116,180,185, 70,141,168, 1, 86,144, 72, 37,201, 49,169, 13, 4,189, 40, 3, 39,184,
- 10,154,153,192,145, 26,234,204, 47, 23,183, 93, 39, 73, 48, 55, 71,172,218, 84, 26, 61, 2,182,252,103,228,226,255,130, 78,214,
- 24,125,118, 43,103,127,124, 31,113, 58,101, 99,105, 41,129,156, 68, 26, 81, 84,197,162,180,124,220, 72,204, 98, 52, 11,107, 6,
-106,116, 46,193,174,209,181,217,174,214,191,139, 54, 69, 92,151, 51,239, 22, 54, 37,250,124, 9,177, 29,125, 34,106,193,183,107,
- 35,237,110,216,107, 55,185,164,244, 16, 93, 98, 63, 92,196,101, 70, 64, 58,141, 67, 90,121, 35, 85,166,225, 93, 90,234,188,166,
- 72, 61,143,139, 44, 2, 10,222,232,197,144,120,225, 0,196, 6,154, 16, 91, 33,101, 6,246,161,131,177,139,109,158,184, 18,216,
- 58, 13,137,214,124,213, 30, 56,237,124,168, 94, 12,227,199,219,114,166,105,233,156,124, 0, 86, 63, 6,211, 35, 48,155, 66,181,
-100, 87, 51, 52, 90, 34, 64, 92, 77,116,124, 27, 15, 54,105,217, 24,158, 13,205, 89,200,198,117,212, 7,103,172, 15, 6,132,152,
- 62,187,141,220,196, 0,154,121,103,182,133,241, 76,101,186,196,106,136,104,151,234, 42, 28, 23, 41,132, 69,229,236,110,138, 8,
-119,102,145,213, 54,159,206, 97,170, 66,200, 14,144, 9,246, 6, 62, 69, 64, 98, 81,149,152,246, 4, 77,116,162, 15, 74,229, 82,
-158, 48, 90,142, 56, 83,178,170,202,134,194, 68,133,169, 42, 49,182,119,177, 91,128, 67, 58,215,195, 49,229,246, 71, 22,173, 55,
- 81,152,233,130,192,205,156,198, 16, 19,179,163,134,168,177, 88,104, 23,183, 91, 12,133,170,169,196,251,170, 20,145, 37,101, 69,
- 33, 0,234,156,167, 65, 17, 61, 75, 41,220, 42,192,193, 27, 75,161,210, 1, 88,206, 79,175,106,146,171,140,109, 20, 53,210, 69,
-202, 72,231,172, 21,153,162,185, 8,176,164,142, 21,101, 2,166, 49,154, 95,180, 35, 73,112, 54, 44, 34,199, 60,135,242,241,134,
-162,140, 16,214,201, 57,110, 12, 92,211,154, 53,176,235,173,109,213,115, 6,242, 21,176,100, 26, 12, 85,101, 29,216, 31,147,232,
- 77, 16,166,118,157, 65,231, 29,160,148, 11, 23,102, 40,107, 70,195, 15,115,158,190,125,114,243,201, 60, 65, 88, 35,165, 20,102,
-106, 84,188, 46,228,139,181,123,182, 65,149,129, 42, 3, 7, 42,182,186, 27, 62, 8,142, 72,180,244,107, 10,176, 6, 44, 56,112,
- 69,144,182, 64, 70,205,253,174, 20,144,198, 34,186,239,158, 77, 55,174,150, 36,105, 70,214, 17,166,154, 65, 89, 25, 26,230, 69,
- 96,146,157,157, 28,181,170,131, 66, 87,228, 76, 48, 30,165,116, 36,164,197, 52, 39,166,131,144,133,188,254, 81, 88, 8, 22,116,
- 2,165, 19,169, 54, 70, 86, 6, 21,219, 55,111,193, 47, 45, 35, 49,226, 92, 69,101,236, 73,211,164,232,220, 13, 42,240,130,134,
-180, 78,251,148,134,210,206,187, 40, 78,166, 20, 76,181,143,184, 64,116,165, 3, 89,147,156,117, 17,164,204,107,175,165, 77, 24,
-228, 92,141, 44,136, 36,180,163,126,213,117,209,162, 40, 78, 92, 7,250,154, 40,226,246,115,181,115, 62,202, 69,214,145,162, 71,
-212, 49,112,129, 42,118,169,139, 74, 28,222, 69,124, 37, 52,235, 2,119,212,232,116,104, 82, 8,223,221,122, 61,156, 68,114,140,
-138, 24,192,150, 6, 25,166, 72,113,235,171,145, 71,252, 56,250,244, 49,155, 14,110,229, 97,183, 31,226,118, 55, 97,178, 52, 78,
- 2,194,168,166, 81,144,118,145,104, 31, 97, 76, 30,151,198,144, 68, 37,196,116, 63,188, 51, 47, 85,146,226,186,205,155,107,118,
-121, 83,116,163, 14, 79, 82, 83,133, 16,230,133,114,153,154,207,207,211,199,130, 54, 77, 30,168, 6,185, 75, 46, 93, 76,116,135,
-229,122, 93,142,214, 53, 61, 87, 87, 16,201,106,142,155, 51, 47,179, 18,197,187, 52, 57,242, 34,171,249,177, 42, 68, 23, 83,148,
-158,159,131,239, 34,222,156, 87,243,146, 34,197,170, 74, 81,208,146,135,205,107,202,224, 41,219,224,162,211, 65,254, 53, 12, 31,
-105,207,164, 78,255, 55,119,192,250,251, 97, 99, 63, 76,102, 80, 15, 83,200,175, 83,144,237, 73, 32, 23, 39, 48,219, 7,203,107,
-197, 50,221,101,191,241, 91, 96,155, 75,169, 3,215,229, 79, 75,138,215, 89, 14,188,157,176, 85,138,230, 93,236,198,241, 44, 22,
- 30, 77,232,132,161,170,138,120,215, 58,102, 90,140,253,210, 6,133,194, 91, 20,150, 28, 84, 33,249,156,117,166, 95, 37,127, 22,
- 45,128,102, 2,168,105,186, 8,119,104, 90,136, 38, 38,149,190,179, 8,112, 18,104, 41,208, 28, 81, 54,154, 41, 96,139, 2, 21,
-106, 99,182,166,116,170,251, 37,201, 57,108,155,243,210, 69, 69, 51,151,216, 4, 47,194,212,216, 3, 89, 88,104, 83,174,177,212,
-138,148,162,161,206,221,170,142, 34,237,212, 66, 88,151,165,158,194,188,142, 70, 23, 22,198,202,126, 25,237,134, 74,235, 96,195,
-196,158,229,184,112,172,114,164,185,178, 16,197,151,145, 96, 22, 17,102, 5,254,192,128, 54, 85,218, 36, 17,172, 20,224,239, 74,
-138,121,225,153,143, 12,108, 2,202, 84,165,213,204, 84,139, 14, 80, 91, 21,160,140,115,228,111, 58,162, 0,172,199, 68,181, 79,
- 45,114, 11, 40, 7, 45,106, 63,150, 34,124,102,207,119, 36,137,245, 41,215,106,135, 82,107,202,197,231,156,255,196, 28,133, 70,
-165,173,120,136, 11,122,146,188,198,100,209, 95,140, 80, 57, 65,165, 67, 88, 21, 65, 53, 69,236,165,115, 88, 21,168,151, 83,135,
-193,158, 81,208,121, 0, 47,211, 51,190, 76, 9,105,231,100,182,207,173, 8,150,167, 69,165,205,208, 38, 77,134,180,172,112,143,
- 8,149, 19,164, 74,235,106,204,194,108, 5,231, 92,155,214,117, 6,252,222,156,150, 38,139, 13, 77,128, 20,109,157,206, 58,140,
-120, 23, 2, 75,138,212,169, 51,109,135, 90,197, 81, 98, 72, 42, 95,225,171, 4,228,226, 43,188, 23,106, 28,135,102, 83, 38,235,
-135, 25,185, 1,163,225,144,102, 56,166,137, 19,203,173,155,250,221, 75,151,211,142, 54, 49, 59, 79, 35,166, 73,236, 76,177,190,
- 16,165,119, 96,161,173,158,186, 19,188,217, 68,201, 37,109, 11,131,218,201,252,136,203,185, 97, 17,109,193,189,144, 64, 24,173,
-221, 81, 31,106,220,157, 47,156, 3,113, 9,236,209,208,130, 68,109, 74, 77, 39, 32, 46,178,105,217,177,115,139, 32,107, 2,235,
- 1,153, 68,139,204, 93,151, 1,211,181,132,168,238,140,163, 80,183,211, 68,237,142,191, 18,118,255, 40,124,205, 47,226,116, 51,
-155,255,188, 98,240,197,253, 28,116, 19,142, 44, 47,209,136,152, 74,191,243,247,197, 70,153, 11,130,196,216, 10,117,208,164, 30,
- 21,205, 17,109,102, 72,192,123, 73,164, 85, 8, 45,161, 32, 57,215,174,225,174,138,244, 54,162, 52,117,181, 82, 76,192,142, 33,
-192,165,170, 0, 23,211,100,203,185,119,103, 30, 31,150, 46,145,214,205, 11,243,229, 45, 98,142,151, 79, 66,170,236, 97, 71, 59,
-126,180,114, 30,138,212,138,179,103, 23,165, 91,252,242,128,247, 70,193,143, 92, 2,184,165, 38, 48, 82,143,123,248, 10, 34, 35,
-240, 59,192,143, 76, 85,227,147,111, 61,253, 24, 76, 14, 66,152, 66,157, 22, 12,209, 8,113,154,158, 97, 16, 83,190, 71, 8, 7,
- 97,176, 1, 44,207,187,250,238, 52,228, 49,203,200,255, 62,140,175,187,136, 56,171,183,157, 81, 18,222, 60,167,218,137,229, 55,
-211,133, 36,226,178,211,118,168,206,235,121, 37, 59, 98,133, 18, 82,140, 5,169,116,158,118,171,108, 5,170, 99,114,124, 6, 46,
-221, 23, 9,105,241,214,152,233, 83,109, 35,120,236, 51, 51,107, 48, 52,237,133,138, 50, 11,105,177,143, 64, 29,147, 58,125, 96,
- 11,119,166, 63,115,148, 91, 23,165,113, 85, 76, 63, 79,141,229, 26, 91,117,201,160, 85,253, 91,212,104, 74,247,129, 69, 56, 81,
-211,179,115, 72, 82,145, 23,202,111, 45,227,192, 5,102,178,140,182,178, 35,225,139,212, 96,118,104,114,154, 34, 22,116,108,233,
- 60,100,189, 72, 25, 9, 38,109, 77, 87,106,213, 42,221, 77,104, 55, 44,114,246, 13,221,245, 45,205,187,126, 45,152,123, 3,253,
-145,192,216, 68,100,171, 6,100, 94, 74,250, 87,231,104,228, 88,204,155,202, 4,110, 41, 45, 96, 37,135,210,229, 99, 7,197,121,
-137,221, 95, 44, 50, 95,178, 99, 76, 45, 58,207, 57,238,124,239, 14,107,202,237, 75, 1,214,186,144, 50,105, 10, 13, 65, 64, 24,
- 74,186,142,105, 78, 63, 88, 30,191, 54, 6,161, 49,182, 39, 75,235, 18, 80,207, 59, 3,177,248, 33,144,242,239,121,253,136,115,
-225,170,182, 65, 89,171, 89, 40,216,150, 12,196, 57,229, 23,115,153, 99,145,146, 41,211,174,229,161,245,104, 37,109, 54, 70, 99,
- 72,250,175,202, 74,250,130,233, 12, 2, 88,181, 77, 2,105,135, 80, 59, 95,212,235,165, 40,124, 32,157, 38,196,105, 2,127,111,
-215,227, 92,170,150,193,214, 2, 87,232, 4, 92,113,127,180, 43, 16,179, 74, 17,135, 56,151,212,252,170,169, 44, 56, 42, 65,148,
- 67,117,205,198,129,253, 44,143,134,108, 26, 47,195,112,196,106,211,176,177,177,198,146, 10, 75,227, 33, 50, 28,227,196,179, 46,
- 66, 51,155,161, 49, 82, 85,222,163, 69, 60, 46, 5,229, 85, 10,230, 22,201, 37, 89, 16, 73, 81, 68,233,106, 94, 96,101, 81,156,
-162,230,141, 40,206,120, 66, 39,157,194,175, 84,213,231,168,222,187,124,209,230, 40,152, 71,227,219, 76,180,182,245,134,185,224,
-171,242, 41,194,117, 46, 57, 0, 34, 48,240, 14,135,209,197, 70,157, 74,136,172, 29, 22,198, 81,208, 89,128,141,136,232,106, 17,
-238, 55,160, 53,232, 45, 32, 59, 44, 98,159, 46,144, 65,211, 20,177,143,159,137,236,110,208,203,127, 25, 25,140, 25,191,125, 7,
-167,125,254, 32,195,141, 9,245,112,204,186, 13, 72, 23, 35,161, 74,209,183,134, 60, 1,186,154, 31,135,164, 18,184,185, 28,190,
- 24,239,160, 29, 93,239, 58, 30, 80, 26,157,207,207,148,160, 89,148,200,205,179,189, 46,157,128,221,120,137, 93,153, 89,118, 10,
-156, 83,163, 64,179,126, 34, 73,191,115,121,161,216,162, 22,189,121,186, 81,231, 40, 39,141,185,254,218,142,151,129, 74,141,190,
- 82, 24,104,164,170,186,219,237, 36, 45,114,198,244, 51, 20,101,105, 18,169, 70, 35,228,172,101, 88, 94,129,225,206,228,133,228,
- 24,175,249, 34,108,252, 11, 52, 19,168, 29,218,116,206, 41,177, 78, 58, 9, 89, 7,153, 89, 8,179, 6,113, 13,220,210,188,204,
- 70,119, 32,103, 47,227, 70, 73,100,169, 46, 57, 53, 90, 0,135,203,207, 37,231,117, 53, 69,198,141,198,148, 59, 21,136, 49,141,
-251,236,228,102, 70,170,117, 56, 77,172, 22,138,249, 83,121, 73,202,122,186, 82, 50, 33,249,147,177, 0,118, 33,229, 50,215,173,
-196,174,142, 41,194,174, 45, 15,239, 10,138,117, 10, 12, 93,226,156,115,137, 87, 44,114,255,121,190, 13, 11, 49, 74,206,141,175,
- 91, 73, 76, 6,142,153,192,154,166,235,205,181,213,162,243,226,166, 17, 93,165,194, 44, 11,232,114,132,146,197,120, 34,212,170,
-237,226, 13, 66, 83, 36,166,100, 65,219, 35, 71,139,190,115,228, 70,238,113, 32,115, 85, 1,101,224,144, 34, 94,105,131,129, 12,
-182,205, 66, 89,149, 73, 96,169, 92,138,222, 91, 7, 40,215, 44, 27,184, 74,177, 80,187, 34,159, 61, 22, 97,127, 84,142, 20,218,
-128, 97,113,237,163,226,190,180, 14,183, 22, 12,135, 57, 3,149, 69,253, 81, 18,101, 47, 69,105,168, 24, 77,159,105,228, 92,143,
-191, 17,211,251,243,156,159,216,243,219, 80,230,202,101, 41, 34,225,122, 65,160,134,166,103,156,203,170,178,168, 48, 26,160,215,
-154, 0, 62,208,105, 59, 40,198, 80,180,126, 3,178,208,131, 34,139,172,155, 24,147,246,166, 88,171,219,212, 76, 33, 20,244,139,
- 37,176,116, 41,188,172, 59,169,181, 19, 28,230,178,202, 50,192, 88,172,101,207,247,174,177,241, 59,144,200, 88,133,202, 22,203,
-152,233,242,150, 11, 79,192, 29,140, 89, 16,231, 58,221,150,253,189, 50,119, 56, 87, 93,164,190, 46, 21, 65, 26,211,165, 68,123,
-182,137,101, 78,142,174,118, 2,225, 18, 71, 11, 38, 47, 90, 9,118, 16, 79,144,136,134, 72,136,129,213,201, 6,235,211, 13, 14,
-173,173, 83, 13,135,248,170, 98, 92, 85,248,106, 64,140,145, 81,140,140, 70, 35, 54,166, 27,192, 52, 57,140,177,200,145,137,116,
- 37,102,217,207, 19, 91,233,133, 46, 47,158, 20,160, 9,173,212,114,188, 71,243,142,200,234,110,171, 85, 79,107, 72,202,153,106,
- 22,157,123, 3,106, 21, 84,211,136,205, 84, 71, 37, 86,156,159, 75,157,180,149,186, 91, 46, 63,226,189,239,234, 26, 69, 76, 77,
- 31, 77,237,152, 38,229,104, 40,104,132,145, 75,147,123, 54,205, 34, 35,208,105, 68,214, 3,196, 3, 54,229, 77,247,170, 13,196,
-125,224,110, 5, 57,183,144, 76,149,196,225, 20,100, 12, 75, 95,143,236,174,225,105,111,132,173, 99,170,183,239, 97,219,245,119,
-194,234, 6,245,120, 76,172,160, 9, 66,136, 41,199,158,242,134, 93,238, 42,149,237, 5,139,186,164,168, 95, 82,188, 26,109,237,
-181, 40, 65, 75,130, 56,113, 57,158,215,246, 9,120,107,108, 50, 95,255,201,188,236,199,128, 39, 77,134, 46,223,158, 91, 30,100,
- 92,234, 74,131,140, 47,111,153, 1, 37,122,103,244,123, 90,176,221,130,184,165, 89,200, 33, 55,161,203,253,182, 3,191,144, 59,
-139,229,144, 43,159, 0,105,105, 26, 25,132, 10,247, 85, 59,145, 39,109,135,173,103,193,224, 92,139, 83, 2,196, 47,193,218,251,
- 97,122, 16,226, 12,157, 6,152,249,212,100, 38, 24,113,169, 13,200,106, 2,120, 87, 37, 10,126,180, 31,220, 22,107,117,146,117,
- 20, 35, 56,109, 51, 50,116,248, 89, 96,176,228, 83, 62,215, 82, 12,106,233,181, 12,146, 77,209, 92,166,182,200, 53,196,110,193,
-235,228,175, 11, 10, 93, 19,146,182,213, 2,246,152, 71,149, 48,200,148,182,129,123, 29,140, 30,142,176,201,209,214,160, 79,162,
- 50,177, 8,125,166, 41,151,157,129,211, 39, 85, 70, 74, 76,196,142, 2,246,101,196,233,210,177, 71,185, 54,220,193, 52,216,115,
-119,169,241,205, 84,161,246,233,239, 75, 10, 27, 34, 73,183,145,243,255,190,203, 57,123,132,113, 33, 10, 27, 26,128,110,100,149,
-127, 33,136, 26,216, 98,233,173, 84, 44,150, 81, 56, 29, 56,233, 49,213,193,243,130, 56,183,176,160,231,232, 19,101,142,154,207,
-141,109,198, 93,102,132, 13,237, 42, 0,102, 2, 99, 77,209,112, 44,152,199,137, 69,188, 67,129,205, 38,174,243, 69, 9,225,200,
- 30,245, 17, 3,155, 97,209, 92,102, 0, 44, 91, 83,172, 18, 72,157, 57, 70,195, 5,128,115, 6, 4,193,214,184,144,157, 63, 77,
-140,193, 38,103,206,135,116, 32, 21,115, 74, 72,231, 25, 5,218,230, 68,157,227,228,143,114, 55,131,233, 22, 66,225, 4,228,231,
-218, 20, 77,124, 90,165,186,106, 91, 65,222,222,247, 5,133,247, 93,250, 41,228,242, 43,113, 45,111,224, 45,135,237, 76,111, 80,
- 54,152,169,164,211, 86,148,140, 99,118, 20, 43, 19, 88,230,117,170,233, 42,123,231,203, 59,237,222, 52,116,172,115, 80,101, 18,
- 3, 85, 72,248,149, 75,248, 52,139,229, 12,208,165,168, 0,234,202,109, 19,197, 46, 22,140,138,233,163, 68, 18,147,234,226, 0,
- 37,208,208, 20,138, 4, 77,213, 66,222, 19, 98, 76,245,177,229, 56,176, 26,222, 84, 85, 19, 83,245,152, 56,188, 56,130, 79,245,
-190,222,198, 88,211,212, 12, 52,178,105,105, 39,245,210,152, 3, 7, 15,224,166, 19, 54,111,218,140, 46,175, 16, 66,131,134, 72,
- 52,231,175, 16, 30,104, 91, 50,225,164,204, 99,148,253,109,116, 94,244, 38,119,109,225,224,140,194, 72,199, 43, 84,239, 86, 19,
-168,153,198,207, 3, 65,170, 68,225, 34,214, 85,174,163,113,165,168,111, 79,145,173, 22,170,193, 20,245,121,103, 74,197, 8, 90,
-229,154, 90, 97,224,146,168,104,105, 32,196, 58, 82,185, 20, 41,229,142,104, 51, 95, 17, 39, 83,170,181,149, 36,176,210,198, 70,
-245,204,142,183,150, 58,148, 13,119, 89,141,243, 17,136,251,193,237,182, 41, 92, 39, 10, 88, 70, 48,126, 46,236,220,130, 92,246,
-107,232,150, 35,248,183,157,198,142,143, 30,196, 31,152,242,249, 65,197,161,145, 16,131,213,199,230,188,118,214, 35,228,112,218,
-123,187, 79,161,229,145,162, 81, 85, 41,125,222,117,123, 75, 13,156,124,155,131,213,216, 32,174, 3,100, 22,196, 26,221, 19, 10,
-214,225, 47, 87, 42,116, 93,224,212,101,181,123, 26,196,149,151,142,177, 23,235,134, 18,115,159,129,104,147, 80,230, 22, 88,236,
- 28,106, 27,195,209,190,111, 98,202,145, 59, 19,200,229, 6, 37,222, 74,132, 6,214, 32,104, 73, 96,101, 18, 25,174, 58,252, 37,
-219,144, 23,238,130, 51,207,129,193,183, 1, 15,179,176,242,150,212, 53,110,245, 75,208,172,195,108, 2,117,101,209,184,107,117,
- 1,105,182,248,244, 60,101, 9,102, 95,132,233,118,112,219,193, 13, 58, 24,145, 1,108, 94,198,109,245, 12,246, 5,134,155, 96,
-214, 24,253,151,187,139, 24,120,139, 69,208,161, 33, 9,205,172, 40, 65, 85,231,230, 72,219,123, 33,211,167, 5,245,230,139,116,
- 68,101,236,209,216,244, 8,141, 74, 91, 23, 95,219, 61,170,130, 81,234,182,152, 55,157, 94, 49, 57,192, 69, 90,171,113, 73, 28,
- 57, 49, 10,119,224,210,189,111, 29,116, 59,207,154, 84,218, 83,209, 41,228,107, 59,159,117, 77,140,192, 88,146, 96,175,209,212,
-200, 38,218,245, 7, 59,118,165, 93, 62, 52, 47,196, 19,186,198, 44, 25, 28,114,115,150,236, 96,148,206,160,106,234,187, 16,138,
-104, 47, 71,196,113, 81,201, 94,140,233,160, 41,245,147,197,159,161,204,173, 23,236,131,155,203,195,167,241, 42,170,173,211, 95,
-219,178, 50,147, 78, 92,229,205, 1,153, 88,249,215, 33,133, 85, 96,139,192, 78,103, 0,107,192,220, 81,212,243,181, 50, 43, 46,
-141,229,181,216,229,126, 75, 86, 34, 20, 76,129,180, 37, 87, 41,173,226,138,206,129,222,114,164, 89, 33, 94,118,167, 91,182,244,
-194, 42, 73,249,238,109, 85, 26,219,177, 6, 40,107,154,158,137, 90, 57,242,144,178, 97, 76,210, 71,228, 58,116,191, 72, 19, 23,
-234,246,174, 10,161, 77,178,182,209,182, 71,231,196,132, 37, 21,238, 77,203, 80,229,124, 58,169, 75,168,183, 52,105, 62, 78,217,
- 25, 81,100,222, 17,213,194, 17, 10,208,150,201, 6,201, 93, 58, 11,177,158, 20,142,146, 72, 18, 75, 22,247, 58, 68,101,166,129,
-202, 41,195,170, 66,156, 7, 39, 22, 51, 73,219,212, 6,115,152,213, 20,237,218,130,189,173,193,177,171,123,247, 86,105,146,115,
-236,177, 76,109,169, 50, 16,135,120, 71,144,144,142, 87, 8,172,114,119,208, 44,182, 77,125, 88, 92,170, 48,178,106,165, 28,235,
-213, 49,114, 96,245, 48,205,250, 42, 97, 58, 65, 84,169, 15, 31, 66, 87,143, 88,218,156, 36,166,115,237, 35,234,162, 7,209, 46,
- 78,111, 35,110,233, 34,119, 41,101,189, 38,150,202,171, 84,110, 32,130, 22,224,159,219,238,229, 34,127,203, 33, 56, 39, 56,151,
- 98,147,172, 42,118,210, 29, 63, 55, 52, 17,237,142,167, 42,109, 45, 96, 9, 86,137, 42, 49, 1,142, 79, 20, 75,101,229,113, 46,
- 42,226,133,145, 79,142,192, 76, 3,218, 40, 99, 7, 58,137,169, 48,180,153, 38,186,150,104,229,109, 27,105,101,157,125, 22,220,
-185, 48,184, 40,249,230, 58,129,230, 35,224, 47, 73,234,120, 53,137,143, 27,193,210,229, 32,155,144, 71,190, 1,182,125, 30, 62,
-184,157,109,239,158, 48,248,232, 17,110,154,212,236,223, 50,192,161,204, 98,164,206, 15,213, 91, 94,166,209,244, 96,136,105, 80,
- 72, 87, 11,233,178, 42,221,165,156,177,203,250,216,162, 69,231,124,221,250, 66,196,147,251, 0, 19,239,162,118,159, 43,173, 48,
-167,206,137,195, 59, 77, 30,182,189,181, 66,105, 52,206, 45,206,226,230, 83,244,181,130,183,104, 54,104,162,137,163,137,179, 70,
- 30, 42,151, 38,132, 51,111, 61,216,108, 21, 15, 3,167, 44, 57, 88,170, 35,163,137,163,122,204, 22,220,203,182,193,249,103,194,
-224, 74,224, 18,251,212, 47,194,198, 91,224,240,199, 82,135,150,112,208,138,142,165, 11,151,188,128, 27, 90,211,157,218, 34,246,
- 38,157,216,228,147, 48, 56, 3,134,155,128, 21, 3,245, 37, 24,109, 66,206, 24, 81,237,157,225, 53, 38, 1,140, 38,218, 51, 88,
-198,162,141,204, 67,162,190,179,239, 80,138, 32,157,148,229,156, 93,169,150, 95,232, 15,224,114,231, 54, 39,140,124,215, 95,128,
-144, 88,141,118, 33, 13,169, 70,124, 40,194, 52,198,182,181,108,249,153,101, 30, 49,218,138,156, 85,200, 49, 88, 78,223,106,231,
-115, 75,134, 72,114,186,188, 1,112,180, 38, 63, 81, 82,117,194, 6,137,118,223,229, 96, 91,149,110,225,204,198, 82,147,117, 44,
- 22,113,229,226,165,202, 58,146,121,133,169, 40, 78,211,130,159,137,139, 78,180, 54,175,105,118,243, 18,213,246, 94,229,181, 73,
- 23,114,147, 20, 45, 53,187,158,111,243, 29,185,114,133, 78, 85,170,232,164, 43, 95, 27, 22, 93,209,196,238, 65,101, 17,252,154,
- 74, 91,235, 62, 48,103,106,221,190, 14, 42,108, 86,216, 33,176,213,132,131,185, 21,108, 46,115, 92,145,228, 0, 76, 76, 41, 94,
-149,138,108,187, 15,117,241,204, 42,211,254,168,206, 63, 75, 45, 20,251, 19, 77, 99, 43,106,138,110, 51,115,176,106,192,236,138,
-161,239,117, 94, 96,231,108, 61, 31,146,244, 42,179,104,105, 6, 45, 1, 60,165, 71,186,246,185,185, 99,219,188, 32, 78,138,231,
-157,157, 36,103,141,132, 68,230,149,240,173,248, 83, 82,137,170,138,164,158, 6, 42,109,251,240,204,110, 13,138,138,131,178,215,
- 65, 60, 74,207,129,129,165,234, 26,233, 28,214,185, 54,171,218,117,155, 83,233, 82, 64,177,240, 84,166, 49, 18,155,134,202,167,
-117, 79,173,189, 50,209,225,188, 3, 26, 66, 12, 38, 60, 75, 35,207, 75,234, 34, 39, 86, 98, 93, 57, 97,224, 28,149, 56,106, 9,
- 56, 13,105,188,183,159,157,114,228, 18, 2,131,193, 0,231, 61, 33, 4, 66, 12, 72, 91,254,166,115, 42,249,220,208, 45, 5,123,
- 62, 21, 63,155,224, 58, 0,245,108,210, 9,197,157,233, 27, 66,176, 57,145,220,197, 74,117, 62,151,145, 85,230, 74, 7,206,210,
-130,168,116, 53,236, 57, 19,111,139,159, 20, 57, 17,213, 12,206,157,104,206,185,228,125, 56,111,255,163,133, 48, 43, 90,111,249,
-121, 69,171,107,203,234,204,163, 12,214,169,204, 46,220, 57,105,197,113, 73, 20,230, 82, 71, 35, 7,203,190, 19,214,205, 80,134,
-214,120,164, 65,169, 53,189, 14, 95,161,177, 78, 97, 73, 51,161,109,250,167,117, 2,239, 16, 97,118, 8,252, 7,192,239, 78, 17,
-158,236,129,240, 73,208, 59,193,127, 37,200,206, 20,159,104, 99, 17,251,147,193,239,130,193,239, 35,187,222, 15,143, 13,108,122,
-215, 54, 46,252,189,131,184,253, 51,142,236, 28,160, 78,152, 54,166,230,205,194, 35,187, 95,161,200,191,122,159, 35,239, 68,203,
- 26,166,162, 69,223,108,114,207,251, 28,229,120, 91, 51, 11,245,181,148,110,236, 92,121,219,124,219, 81, 17,143,115,145, 74, 99,
-187, 56,100,189,123,202,163, 75,145,234, 0,141, 89,108,162,233,123, 91,220,156, 75,183, 78,213,165, 22,150, 46, 80, 85,150,231,
- 5,124,236, 90, 2, 84, 30,198, 78,216,228,149, 77, 77, 96,188,230,168, 46,221,140,123,217,102,184,224, 76, 88,190, 10,120,172,
-141,137, 59, 96,253,191,194,129, 15,145,187,123,232,172, 73,180,187, 77,146,212,109,101, 4,110,156,150, 83,157,153, 91, 31,146,
-218,108,114, 0,170,191, 79,207,200, 95,144,116, 17, 84, 73,206,190,107, 96,148, 89, 74, 99,228, 14, 88, 3, 81, 26, 99, 45, 98,
- 80, 26,235, 52, 55, 47,202,145, 98,220,206, 51, 36,217,183, 29, 59, 65,188,166,146, 57,151,169,201,121, 26, 86, 13, 68,172, 2,
- 48, 49, 29, 62, 69,235, 51, 21,243,230,173,165,232, 81,196,167,149,149,104, 57,237,212,195,169,185,205,124, 62, 52,152, 40, 42,
-183, 53,117, 22,125, 46,217,128, 8, 22,225,109,196, 4, 4,155,156,112, 36,106,218,179,160, 21, 3,130,119,106, 98,193, 68, 93,
- 86, 5,149,155,243,164, 90, 54,118, 41, 96,184, 76, 17,137,204, 83,182,190, 80, 83,119,244,176,180,139, 96,197, 93, 36, 38,201,
- 25,208, 78,153, 55,199, 88, 45, 28, 63, 11,241,196, 0,126, 40, 93, 84,216,180,101,134,106, 45,157,187,250,238,117,133,181, 0,
-123,173,223, 60,153, 77,177, 24,103,139,192, 14,235, 16,152,115,219,173,232,107, 17, 24,237, 57,141,236, 58,214,179,118,161,232,
-212,151, 89,158, 65,161,151, 25,200, 93,234, 55,230, 58,174,229, 28,126, 83, 8,232,218, 64, 41,166,116,201, 90, 25,189,218,184,
-194,156,176, 28,253,134,130,162,143,119,109,128,214, 82,212, 3,235,139,144, 53, 26, 25, 60,171,133,250,108,103, 79,177,145,252,
-124,114, 9,150,182,109,169, 85,117,174,221,107,181, 80,178, 86, 21,101,148,190,232,192,153, 91,166,213,185, 74, 66,187,231, 25,
-203,118,197, 69, 61, 92,136,145, 72,211,122, 3, 42, 14,231, 60, 33, 8, 33, 6, 92,140,109, 13,187, 43, 74,213, 48,103,102,224,
- 28, 3,163,237, 69, 60, 34, 77, 81, 64,175, 93,173, 80,108,112,141, 48, 24, 14,113,131, 1,174,113,168, 75, 81,187,138, 9,123,
-115,185,118,218,132, 5,109, 27,168, 57,162,116,209,125, 46,155,155, 99, 96,139,214,196, 49, 70, 42,181, 22,130,222,149,141, 64,
-202,198,142, 50, 7,248,206,205, 55, 28,144,210,219,208, 34, 10,148,148,124,243,222,225,157,199,121,105, 85,192, 20,253,114, 83,
- 84,216,149,212, 37, 47, 78,186,182,175, 69,157, 99,110,125,154,107,227,197, 34, 29,103,185, 43,113,169,148,102,224,187,235, 73,
- 93,235, 60,149,213, 63, 27,105,159,110, 14,145, 32, 30, 93,141, 72,109,138,119,197,208, 98,218,209,183,179,155, 97,116, 59,184,
-173,169,225,137,127, 52,132,143, 66,248, 48,248, 71,128,236,162,221,252,133, 33, 12, 31, 14,254, 7, 97,244, 44,216,242,110, 56,
-235, 93, 44,159,215,112,225,107,215,248,194,254,154,176, 99,192,164,130, 80,203, 92, 61,111,119, 95, 6,133, 7, 23, 91, 97,160,
- 20,202,209,114,186, 68,163, 19, 51,117,216, 57, 97, 58, 39, 51,158,107, 66, 99,157,162, 84,138,188,149,164,218,244,202, 38, 93,
- 44, 22,124,172,169,143,134, 46,130,204, 10, 4,181,222,229, 41,130, 76,139,124,229, 18,159,238, 61, 12, 27,207, 82,149,192, 31,
- 13,169,217,144,165, 77,150, 92,100, 84, 69, 54,133,200,120, 29,170,115, 87,112,255,118, 59,114,225,165,176,252,221,224, 31, 99,
- 25,209,195,176,241, 39,112,231,223,167, 29, 73,214, 6,104, 93, 37, 69, 89, 19, 90, 23, 94,134, 77, 42, 81,195,106,213,115, 83,
- 33,167,198,196, 8,108,220, 4,163,207,129, 63,183,203,226,250, 49,178,213, 83,225,169,172,254, 59,228,197, 45, 74,167,232,151,
-174,251,153, 22,250,145,156,109,148,130,135,204,185, 64,135,105, 5,124,242,242,107,235, 37,148,231, 66, 44, 74,233,234,144,212,
-230,161,145,156,109, 74,254,136,104,171, 84, 15,139,125,168, 10, 65,100,152,235, 51, 45,212,134, 12, 3, 73, 77,144, 92,212, 86,
-164, 89, 42,171, 53, 66, 99,105,144,145,135, 81,147, 64,127,205,186,176, 45,249,178,139,152, 24,157,155,158,125,219,109,173,165,
- 97,165,141,132,103, 22,149,249, 66, 79, 80,219, 25,122,233, 68, 66,101,254,191,141,168, 23,218,237,150,101,116, 25,196, 93,217,
- 11,159,252,124,148, 70, 58, 70,195, 47,168,237,197, 40,248, 80,232, 63,102, 22,137,175,197, 34,197,145,169, 97, 43,225,245, 11,
-145,244,204,126,183, 34,176,197,193, 86, 7,187,114,103, 57,157,103, 15, 22,235,172,115,254,119,104,121,250,213, 96, 81,119,209,
- 1,186, 44,161,203,116,250,208,198,228, 97,163,146,181, 0,180,220,122,216,119, 29, 28,218,220,117,119,207,148,173, 8, 19, 7,
- 7, 98,231,184,102, 96,159,153,224,174, 44, 27, 91,100,134, 68,231,203,197,114, 95, 9,111,218,139,156, 78,105, 59, 22,182, 84,
-116, 94, 75,186,115,173,172,204, 88,172, 13,246, 64, 82, 47,132, 88, 56, 7,200,252,198, 47,142, 5, 81,158, 93,127, 85, 86, 48,
- 20,226, 79, 93, 16,124,199,133, 40, 62,177,173,202, 58,129, 97,140,224, 93,219,236, 9,107,252,165, 20, 37,106,222,155,248,210,
-208, 81, 5,245, 66, 12,190, 91, 3,231, 74,239,148, 89,104, 24,212, 80, 25,176,107,244,196, 24, 76, 68,151, 78,180,109,198, 38,
-146, 54, 38,107,215, 20,103,167, 24,139,206,149,101, 40,161, 93,185,168,152, 16,112, 49,239,218,121,192,106, 98, 56,215,129,119,
-209, 2, 76,139,182,164, 45,237,104,162, 8,113, 21,174,242,214,109, 44,183, 19,143,150,103,113,115,191,111,213,247,185,182, 90,
-156, 85,151, 41,206,249,162, 17, 14,182,139,155,229, 6,179,154,214,169,149, 97,165,186,111,103,194,166, 76, 47, 13,173,215,117,
-162,144, 21, 85,215,230,243, 98,180, 36, 98, 19, 19,168,103,129, 85,140, 86,235,188, 53, 21, 78,179,110, 15, 95,192, 89,110, 55,
-126, 30,194, 13,224,215, 65,206,164,173,110,213,202,202,175,158, 12,225,177, 48,124, 38, 60,253,151, 25,251,235,121,216,207,110,
- 16, 14,215, 76, 54,109,164, 86, 87, 0, 0, 32, 0, 73, 68, 65, 84, 13,208, 40,204,172,172, 13,117, 86, 74, 21, 16,141,120,201,
-145,121,209, 47, 64,244,232,125,222,181, 83,190,107,177,106,204,111,242,146,115,222,182,249,139,116,212,190, 3,196,107,218,240,
- 38, 59, 14,174, 75,173,136,183, 62,251,182, 0,135, 8,117, 78,158, 23,249,202, 88,212, 58, 59, 67,180, 61, 59, 6,156,254,228,
-205,204,110,217,224,246,235, 55,208,232, 80,137,120,107,240, 50,116,202, 74,163,140, 86,149,106,251, 50,238,223,239, 68, 46,126,
- 6,172,124, 27,248,179,211, 61,141, 7, 97,227, 47, 96,223, 31,194,190, 25, 28, 89, 70, 39,210,133, 63,217, 59, 30, 89,171, 93,
- 89, 74, 83,187,217, 72,165,109,177, 6,181,120, 72,150, 32, 12,160, 57,104,101,140,227,244,188,137,200,138,107, 55,239,112, 8,
- 98,247,170,178, 46, 6, 98,224,215,138,154,178, 76, 81,230,119, 8,201,142,144,196, 98,247, 52,159,247, 52,176,232, 35, 42,234,
-147,130, 94, 85,137, 77,162, 1,235,188,235, 91, 73,227,105, 18, 80, 13, 13,212,146,198, 65, 90,125, 73, 17, 28,204,139, 85,233,
- 20,204, 57, 63,235, 45,146,207,115, 35, 88, 4, 95, 73, 98, 80,106,159, 82, 40,174, 16,126,173, 6, 83, 93, 91,241,126, 46, 11,
-171,173,244,105,174, 65,140,129,187, 47, 34, 77,151,233, 92,203,217,143,236, 30, 4, 43,221, 35, 90, 35, 36, 55,191,209, 71,217,
- 11, 60,231,156,231,183, 93,234, 26, 40,185, 98, 83,140,170,136,238,181,248,123, 25,132,100,186,119,106,117,222, 89, 0,217,230,
-174,139, 50,182,177,149,190,197,185, 8, 53,117,130,219, 36,202, 22,139,208,243, 6, 51,235,154, 90,149, 12,164,235,170, 22, 84,
-219,136, 87,205,145,202,180,251,145,152, 54,205, 81, 91, 65,202, 46,121,180,245,240,176,100, 13, 92, 98, 1,218, 27,218, 53,228,
-177,154,156, 54, 90,141,197,255,174,232,172, 55, 20,216, 41, 41,107,181,186, 64,251,151, 84,123,174, 47, 47,219, 28,151,243, 61,
-235, 41,188, 9,243,252, 28, 91,107,247,172,108, 74, 99,205,110, 6,237, 30, 33,202,216, 54,169,137,226,152,105, 74, 75,206, 49,
- 42, 11, 93, 39,243,248, 9,116,142,151, 22,165,144,181,118, 44, 90, 60, 74,137, 91,236,218, 82,165, 29, 66,173,169, 79,118,202,
-157, 53, 43, 11, 70, 73,136,235,182,151,105, 53, 25, 62, 9,175,243, 53,121, 47,109,247,208,178,226,168,235,157,146, 38,103,221,
- 52,104, 84,134,131, 1, 50, 24,128,247, 52, 26,105,130,109,239, 37, 69,251,115, 75, 53,231, 52,135, 58, 33, 70,215,130,186, 22,
-122, 55, 10,167, 46,179, 27,173,242,175,108,229,160,133,104,161,108,174,172,161, 19,191,209,182, 88, 44, 55, 40, 20, 42,239,169,
- 6, 3,219,116, 69,219, 19,240, 57,143, 46,105, 55,143,174,239,124, 74,196, 59, 21,156, 79, 91,185,138,184,164, 42, 52,241, 66,
-234, 45, 46,157,112, 46,154,208, 76, 18, 5,152, 23,142,129,171,210,131,144,180,229, 95,202,245, 40,131, 65,100, 36,145,213, 25,
-168,183, 93,192,170,172,116, 17, 43,129,154, 90,136,107, 84, 45, 13,140,182,194,240, 76,235, 46, 55,235,166,143, 59,195, 92,199,
-195, 73, 57, 47, 51,112,103, 89,158, 54,231,113, 43,240, 43,224,159, 0,254,106,248,218, 31, 99,116,240,163,156,251, 11,107,108,
- 12,132,125,227, 1, 97,102, 37,110, 14, 42,141, 86,163,191,176,125,170, 83, 19,164, 56,212,182, 49,108,159,141,115,136, 79,187,
-215,137,179,146,108,149, 86,240,182,216,162, 80,212, 33, 46, 9, 50, 68,230,235,102, 41,104, 45, 53,192,240, 89,160,232,160, 14,
-210, 46,226,174,227, 14,238,210, 21, 52, 90,165,196,146, 8, 59,207, 24,176,233,235,246,176,241,215, 95,164,250, 72,164,118,169,
-191,184,143,138,175, 34, 35, 7,163, 41, 84,155,150,144, 23,111, 69, 46,185, 28,150,191, 29,252, 25,166,186,219,128,213,191,133,
- 35,127, 4, 7,215,208, 91,151,173,152, 54,116, 53,112, 89,181, 84,169,209,238, 46, 37,134,227,134,129,183,218,243,200, 59,223,
- 53, 16, 15,147, 50,199,131,228,132,229,221, 51,170, 28, 81, 88,149,134,164,252,185, 20,125,165,130, 21,193,184,146, 82,141,166,
-148, 53, 79, 41,198, 46,130, 25,121,211, 78,132,142,122,174, 85,209,186, 83,209,151,189,229,203,157,208,162,213, 38,138,149,222,
-168,237, 45,208, 53, 54, 41, 34, 89,235, 6,169, 11, 27,193,248,162, 31,122,110, 88,130, 36, 86,139,130,117,136,164,241,147,155,
-224,212, 69,243,150,105, 76,206,243,192,162,200,188, 11, 90,166, 77,115,143,139, 44,228,202, 98,215,156, 14,240, 2,155, 69,152,
-137, 48,139, 16,102, 41, 91,181,236,148,218,218,156, 46,164,191,231, 42,105,124,177, 80, 58,165,213,207, 80, 68,236,177,232,242,
- 85, 89,202,168,235,248,215, 1, 90,217,113,174,234,146,110, 93,202,160, 43, 54,201, 11,100, 91,149, 80, 2,217, 72,186,146,181,
- 97,225, 80,143,172,246, 56, 59,103,153,101,136,196,174, 63,129,209,232, 19,203,211, 79,138, 8, 59, 2, 35, 73,187,203, 73,219,
- 66, 54, 57, 93, 91, 92,102,210, 18,104, 30,116,112,208,154, 30,141,173,252,176, 46,168,247,134, 46,135, 31,179, 0,205,156,184,
- 45,214,195, 35, 26, 72,104, 17,249,181, 75,254,209, 90, 2, 46, 52,173,202, 14,195,176, 45,111,236,214,137,220,242, 55,167, 66,
- 93, 78, 45,154,192,174,220, 68, 39,231,216,115, 91, 91, 45,158,213,162,163,154,230,136,180,192,159, 5,154,117,209,130,185,116,
- 54,145,249, 84, 69,238,117,223, 54,190,210,174, 26, 37,111, 98, 86, 70,195,101,202, 39, 20, 27,190,232,194,118,177,185,147,100,
- 87,226,215, 61, 67, 80,154,216,160,179, 72, 21, 35,126, 52,196,251, 10,156, 35, 74,147, 34,124, 85,156,119,120, 95, 17, 68,168,
- 67, 64,235,218, 82,216,243,169,175, 50, 13, 94, 74,213, 43, 76, 81, 45, 90,182,113,237,132,106,226, 92,231, 33, 47,108,186,146,
- 85,172,105,115,151, 20, 85,123,231, 16, 95,181,106,245,188, 53,167, 56,151, 64, 61,119, 5,114, 98,226,175, 20,174, 59,231, 24,
- 84,149, 9,232, 82,225,191,119,130,183, 99, 58, 17,196,167,200, 31,180,109,220, 34,206,227, 84,241, 18,210,228,210,152, 60, 41,
- 81, 70,218, 88,119,180, 6, 95, 69, 42,175, 12, 53,166, 14, 90, 62,166,156,143, 75,139,107,218, 68,229,136,221, 22, 43,210, 25,
-140,210, 78, 94,126, 79, 2,104, 61,146,186,148,101,223, 88,150, 82, 52, 79,128,184, 14,220, 4,178, 59,213,182, 35, 41, 55, 47,
- 86,224,226,207,129,229,159,130,231,124, 63, 75,255,252, 37, 46,120,199, 42,205,110, 33, 12, 43,166,117,154,236, 81, 99, 90,140,
-124,161, 98,199,132,126,178, 56,217,180,235,113,158,127, 31, 45,154, 95,216, 3, 89,138,189,207, 93,238,223, 94, 76,150,178,113,
- 77, 37,243, 11,107, 91,106, 29,157,245,162,183,221,152,108,177,206,173, 98, 67,148,118,235, 94,205,251, 21, 19,217,248,226, 12,
-255,219,159, 99,237, 11, 83,178, 94,207, 71,197,123,101,105, 0,203,179,200, 64, 60,238,210, 49,242,148, 11, 97,229,155,147,126,
- 33,235, 95,103,159,129,181,191,134,201, 26,122,104, 9, 14,154,148, 62,187,255, 3, 91,106, 7,214, 66, 77, 12, 25,227, 97, 8,
- 71, 18,113, 2,200,104,106, 66,199, 17,232, 56,109,240,162, 70,216,233, 65,104,214,208, 91,103,201,121,114,138,107,253,248,172,
-120,215,162,191,123,177, 64,200,194,150,138, 11, 17,115,219, 89, 47, 40,193, 9, 33,104, 42, 67, 11,133,128, 39,206,111,112,145,
-201,135, 58, 80,180,230,237,162,199,178, 43,149, 22, 98,179,118,175,112,233, 22,115,219, 80,217,132,109, 93,139, 90,231, 32, 6,
-105,119, 33, 11,182,169, 71, 6, 22,111, 73,201,124, 94, 83, 75, 19,148, 61,217, 61,221,126,208, 89, 37, 92, 21,170,245, 96,224,
- 53, 44, 6,227,118,149,255,159,175, 55, 15,182,109,187,202,251,190, 49,230, 92,123,239,115,238,185,247,190, 70, 79,122, 79, 72,
-168, 65, 2, 44, 4, 18,141, 19, 11,132, 93,136, 96,226, 34,193, 21, 87,108,210,144, 30, 87, 58, 10, 59,142,157, 96,167, 41, 39,
- 16, 92,130, 74,140, 93,216, 36, 85,164, 82, 41, 39,184,202,105, 42, 78,170, 82,128,177, 33,216, 70,142,145, 82, 70, 52, 22,168,
- 1,233, 73, 79,175,185,253,105,246,222,107,173, 57, 70,254, 24, 99,204, 57,215, 58,231,137,170,139,164,251,238,187,231,156,189,
-247,154,115, 52,223,247,251,240, 13,207,111,240,238,127,250, 20,191,250, 51,151,248,229,151, 71, 12, 94,140,172,179,187,155, 37,
-170, 5, 55, 37,180, 11,125,109,125, 91,252,158, 23, 45,117,204,234, 7,173,233, 12, 26, 79, 32, 32, 48, 65, 16,228, 21, 14,150,
- 59,202,220, 83,108, 69, 65,176,217,137,150,239,130, 58, 9,114,195,214,128, 76,106,159,155, 8, 66, 98, 5,178, 79, 18, 35, 10,
-247, 92,180, 75,108,232,138, 37,165, 26, 55,139,238,243,181, 87,224, 68, 91, 88,244, 9, 89,105,122,207,185,240, 99,160, 95,125,
- 0, 41,107, 59, 29, 90, 44, 46,193,196,126, 76,134,140,141, 11, 73,137,174, 91, 8, 87,177,166,180,230, 99,116, 36,183, 89, 67,
-121,174, 85,192,166, 93,163, 18,120, 86,168,125,254,250, 53, 72,192,109,242,130,218,215, 19,225,168,119,229,214, 9,203, 81,151,
- 19, 30,244,144,154, 27, 26,143,122,182,117, 5, 72, 16, 46, 89, 21,224,212,245,178,237,153, 39,177,210,132, 58,142, 5, 0,204,
- 46,188,235,197,200, 88,217, 4,209,225,136,117,158,236,188,223,108,145,242, 0, 30, 54,182, 99, 71,100,105,152,181, 45,229, 1,
- 99, 74, 40,211,100,192, 49,135,128,232,226, 51,175,221, 24, 30,200,188,130,185, 48,150, 59, 91,234,212, 62,177, 51,172,249,230,
- 61,182,134, 19, 56,101, 83,155,147, 81,232, 82, 74, 32, 50,188, 93,100,168,163,238, 85,172, 99,207, 41, 25, 2, 47, 15, 24,134,
- 12, 38,118,242, 27,213,164, 26,114,149,124, 70, 67,242,162,248,241, 19, 2, 41, 78, 38,192, 98,182, 52, 54,178, 23, 95,164,216,
-238, 35,145,217, 40,252, 82, 25,152, 76,229,152, 25,213,195,160,126,108,146,195, 30,105,107,177,158,228,131, 72,189,112,107,219,
- 73,231,247,187,242, 93,237, 96,255,153, 30,248,205,249, 92,231, 16,118, 86, 23,191, 3,184,251,131,192,159,252,115,184,243,153,
- 25,239,248,212, 5,248,141,183,112,127, 59, 96, 62, 26, 69,206, 94, 23, 93, 10,125,180,239,140,109,174,107,111,100, 89,172, 75,
- 40,185, 11,192,137, 35,245,208,241,247,132,185, 57, 27,210,106,150,198, 43,128,141,118,188,205, 4,211, 38, 12, 84,236, 98,170,
- 23, 6, 67,252,240, 39, 7,240,219, 56, 90, 92,129,201,184, 60, 31,113,249, 91, 19,116, 86, 80, 86,100,143,103,220, 50,176,157,
- 20,121, 2,248,214, 6,244,221, 79,129,222,240, 33, 32,191,195,156, 4,162,192,241, 55,128,199, 63, 6, 92,190, 6,125,204,192,
- 61, 0,151,179,181,141, 89,141,159, 26,105,170,224,118,178,232, 19, 96, 26,161,135,226,179,208,160,125, 28,172, 56,147, 51,212,
- 17, 9,200, 71, 37, 19,176, 87,240,134, 45,104,131,151,193, 19,157,147,176, 98,124,165,178,178, 13,196,211,175, 59,120, 85, 80,
- 9, 89,232,138,136,182, 56,215,174,139,212,110,119,169,175,211, 28,173,125,192,137, 26, 47, 92, 59, 44,171,118, 95, 91,169, 57,
-252, 42,191,220, 21,236,228, 73,120,232,226, 81,197,219, 51,233,144,170,179,171,254,143, 26,194, 62,237,186, 74,237,180, 52,203,
-232, 99,234,118,207, 91, 50, 94,253, 11, 74,120,255, 31, 60,197,233,191,121, 7,219,159,189,170,214, 53,238, 18,227,184,187, 48,
-146, 94, 79,227,162,142,140,113, 83, 42, 87, 15,138,209,213,161, 26,123,216,210, 21, 38, 49, 54, 47, 21,108,211,237,163,187,253,
-118,118, 91,219, 72,192, 99,233,149,217,129,252,180, 17,230,232,113,203,226,191, 71,110, 55, 82,191,240, 7, 87,197,239,213, 46,
-208,193,223,176, 9,237,163, 26, 52,181,216,229, 39,143, 52,141,124,128,212,105, 41,118,190, 34, 56,135,141,242,147,183, 37,167,
-158,135, 62,106,103,159,243,226,176,207, 40, 63,243, 21,229, 57,155, 48, 82,174, 73, 63,175, 99, 78,251,157,255,224, 95,239,110,
-108, 50,189, 43, 15,145,221, 50, 19, 93, 61,164,198,181, 30,221,180,111,215, 67,179, 16,104,106, 15,209,137, 85, 81,247,204, 4,
-211,127,238,192, 72,181, 19,167, 37, 65, 79, 87, 52,123, 44,120, 42,161,159,208, 58,238, 78,126,206,217,100, 84,155,211,136,130,
- 43, 98, 55,231, 92, 10,142,211,132,195, 60,161, 76, 99,181,160, 1,203,253,127,191,223,142,226, 71,165,128,230,201,154,221,148,
- 81,105, 92,206, 49, 97, 21,156,230, 13,238,156,222,194, 40,130,253,120,196,241,112,133, 50, 78, 62,169,190, 62,137, 85, 27, 88,
- 54, 59,219, 98,180,162, 77,125, 30, 98,170,200, 48,143, 87,141,252, 93, 53,101,123,170, 34, 8,179,172, 49, 56,101,100, 78,181,
-155,108,188, 94,139, 98,205, 57, 33,109,118,200,195, 96,127,142,185,238, 10,153, 21, 36, 77, 46,166,101,114,236,100,100,114,183,
- 15, 93, 82, 49,161, 15,181, 29,196,204,130,193,173, 20, 3,169,119,187,193,231, 85, 83, 54, 66,124, 47,191,241,169,122, 36,146,
-240,162,118,180, 83, 81,157, 35, 30, 62,117,106,219,175,249, 69, 64,146, 21, 1,229, 4,200,123,159,213, 60,239,221,224,108,227,
-121,218,218,158,253,203,254,109,208,135,127, 2,207,254, 25,194,240,233, 43,108,158,222,226,254,201, 22,147, 88,138,121, 17, 65,
-138,220,120,132,117, 40,222,167,226,247,122,248,139,169,225, 52,125, 44,100,183,120, 0,101,196, 20,241, 10,176,219,225, 8,166,
-255,163,149,107,129,186, 93, 89, 28,126,169,250,147,217, 94, 67, 16,144, 61,148,193, 25,176,197, 17,183, 85,105, 81, 59, 24, 65,
-113,101,188,178, 93,150, 67, 17, 12,131,133, 61, 12,163, 32, 99, 0,127,231, 25,240,190,247, 2,187,239, 48,135,129, 42,112,249,
-191, 1, 79,126, 10,120,248, 4,122,121,215,230,140,231, 19, 48,205, 14, 62,247, 10, 98,172,251, 2,159,245,205,192, 60, 67,247,
- 98, 39,220,193,143,164, 13, 3,233,224,116,158, 51,160, 92,180,121,169,138,193,105, 78, 18,176,201,224, 50,129,187, 21,211,130,
-234,129, 46,165, 80,219, 62, 14,162,203, 0,130,190,227,171,216, 92,109,160,144,213, 5,190, 16,244,116,118, 42,155, 37,120,103,
-121,195,154, 35, 50,204, 37, 89,107, 28,104, 12,174,208,145, 54, 81,209,110, 12,207, 97,241,210,118,145, 9,154,165, 38, 58,138,
-112, 52, 76,142, 13,141, 75, 44, 84,248,245, 66,247, 14, 56,124,232,115, 80, 7, 97,105,100,145, 66,246,185,164,248,153,255,245,
- 28,227, 79,159,227, 69, 8,118,201,192, 76, 2,198,134,212,138, 31, 93,122,164, 99,146,128, 46,103, 59,105,135, 17,213,102,117,
-138,215, 54, 16,212,140,101,154,215, 90,115, 48,160,157,117,234,175,217,220,145,200,212,161, 65,147, 11,200,230, 78,123, 42, 29,
- 72, 72, 17,161, 71, 46,248,165, 38, 51, 30,200, 45, 73,218, 0, 50,123,255,187,178, 11, 86,135, 14,113,155, 86,106,247,173,167,
-140,165, 46,177,237,177,127,223, 33,180,123,150, 45, 29,237, 1, 3, 79, 92,184,122,219,133,199,231,164,139, 80,155, 30,248, 19,
-175,195, 22,150, 53,176,247,130,101,132,122,182,122,179, 7,246,250,171, 30, 78,149, 3,236,211,239,186,125,242, 19, 58,129,109,
-247,239, 14,174,152,135, 11,155, 79, 42,165,143,112, 80,197,168, 38,150,139,145,249,184,198, 46,175,172,110, 3, 53,138,223, 76,
-141, 58, 55,119,197,219,210, 47,212, 79, 40,173,233, 65,209,133,126,131,137,171,223, 92, 59, 38,187,177, 86,212,166, 64,100, 90,
-155, 89,108, 68, 30,233, 72,175, 59, 25,168, 5,166,103,147,184, 90,157,138,149, 64,137, 25, 41,155, 23,160, 68,234,155,152,120,
-249,108,179, 67,202, 3, 84, 21,135,162, 80,153, 22,200,183,102, 51,180,239,223, 47,111, 90, 82,243,251, 31,154, 86,187,245,168,
-112,220,119,206,204,200,236,187,111,207, 89,207,105,112,197,238, 12,242, 2, 32,172,103,214, 88, 15,200,219, 19,228, 97, 99, 94,
-117, 17,171, 62, 2, 74,224, 47,114,242, 7, 69,157,186, 67,162,213,187,170,126,177, 23, 53,166,245, 76, 82,247, 53, 2, 69, 73,
-126,121,176,237,233, 21,230, 63, 54, 86,175, 29, 16,137,213,194, 77,152,124, 20,171,109, 96,232,227,123, 83,172,133,173,224,137,
-237,107,233,204, 21,242, 5, 24, 95, 3,142,143, 77,117, 77, 3,144, 79,129,225, 37, 96,243,110, 19,123,213,180, 55,191, 60,242,
- 63, 3,188,227, 17,232, 47,254, 52,238,254, 88,198, 87,254,202, 37,238,239,103,124,241,108,131,139, 77,178,145,148,174, 19,162,
- 18,136,220, 55, 46,182,163,141,189,121,140, 58,219,174,181,184,163,192,239, 62,170,102,132,166,204,142, 29, 30, 45, 85,182,253,
-199,159,107,209,228,108,113,127,255, 6, 17, 28, 99,100,235,133, 87, 32,130, 99, 95,184,113, 31,103, 17,134,170,243,195, 60, 24,
- 60, 51,176,133, 98, 56, 0,252,230, 45,248, 59,159, 5,206,254, 89,128,223, 98,213,198,254,231,129,123, 31, 6, 30,110,161, 47,
-223, 54,176,246,254,104, 34,185, 67,177, 83,109,195,141,249,121,226, 55,176, 8,116,242, 69,225, 69, 1,206,221,112,157, 0, 61,
-177,211,148,240,196, 94,136,233, 41, 19,224,165,231,171, 12,150,178,128, 88,145,242, 42,124,163,187,175, 67,112, 54,251,115,195,
-222,209, 74, 71, 73,161, 46, 59, 65,168, 89,213, 84,174,119,225,235, 78,162, 14,209,220,221, 82, 96,242,142, 5,134,243,134, 61,
- 39, 9,181,177, 52, 53, 25,188, 80,243,169, 43,150,118,163, 45, 90,166,120, 14,237,138,103,106,143,254,158,151,174,224,224, 27,
-138, 0,234,244, 24,236, 68,174, 89, 9, 39,158,247, 61,193, 41,138,218,152,245,191,182,159, 77,254,192, 54,234, 20, 81,100,106,
-251,253, 25,203,144,142,254,181, 41,171, 66, 40,198,253,209, 54,164,232,230,176, 76, 87,171,129, 31, 61,228,100,161,134,239,132,
- 79,104,169,101,232,196,169,163, 51,222,115, 55, 42,159, 53,244, 39,132,141,104,197, 11,247, 69, 90,114,187, 84, 38,251,185,199,
- 96, 58,132, 86,128,218,196,115,232,206, 86,233,128, 50,240,139,153,187,215,124,116,145, 95, 15, 56,186,235,108,142, 43, 69,229,
-196,159,184, 90,254, 42, 58, 94, 93, 70,218,198, 69, 60,120, 98,219, 93,182,221,252,209, 19,221, 84,151,112,153,133,245,208, 95,
-196, 43,255,126,230,110, 85, 64, 93,191,223, 79, 78,102, 88,138, 91,134, 37,132, 62,113, 61, 74,248,248,237,245,233,199,226,180,
-184,136,123,234,101, 20,159,135,206, 9,145, 58,152, 79,193,114,101,164,253,247, 83,159, 81,178,152, 15,245, 32, 21, 78,224,100,
-234,244, 41, 10,148, 88,121,116,141, 45,251,152, 28, 85,241,174,139, 78,125,237,179, 39,220,140, 91, 87,111, 74, 33,132,132, 12,
-164,228,162, 59,182,130,250,176, 7,246, 87, 72, 57, 99, 59,108, 32,219,217, 52, 57,101, 94, 17, 20,151,249, 17,139,228,152, 20,
- 80,128, 62,193,171,114,225, 27,175,157,153,145, 82, 66, 78,102, 93, 35,230,186, 67, 87, 82,187,128, 69, 64,201,246,157,236,248,
-215,180, 25,144,182, 39,200,121,176, 10, 89,102,219, 19,248,195, 81,105,176,158,116, 86,197, 10,209,129, 42,217, 11, 17,112,148,
-216, 93,177,248,152, 73, 43, 31, 24,126, 72, 19,139,189,185,190,231,103, 5,242, 64,224, 29, 65, 95, 30,129,105,219, 41, 50,182,
-166,138,198, 19,127, 12,142, 62,154, 15,193,149, 63, 30,202,192,124,110, 59,222,241,137,185, 63,105,231, 23,251,203,192,240, 89,
- 96,120, 43,176,121, 59, 48, 60,239, 99,124, 15, 10,200,255, 18,240,229,111,133,254,240,127,139,237, 71, 30,226,133,191,126,196,
- 83,159, 58,224,181,243, 9,247,239,102, 92,109,178,117,238,218,209, 76,209, 68, 54, 73, 58,251, 18,213,230,220,170,181, 14,161,
-197,196,190, 79,181, 27,197, 68,216,126,136, 72, 53, 67, 88,145,227,153,188,218,169, 54, 99,247,234,120,187,107,176, 21,237,233,
- 72, 93, 32,200, 54,163,138, 36,139,171,182, 51, 3,155,172, 56, 17, 96,251, 64,144,110,157,128,255,253, 59,192,243, 31, 0,248,
-247,218,235,115,252, 40,240,218, 15, 66,191,144,128,151,110, 1,175, 78, 54,114, 31,103,232,249, 84,151,163,116, 39,219,141, 53,
-251,109, 73,126, 85,205, 98,180,150,203,217, 10,128,139, 14,202,141,193,103,172,175, 0,121, 0, 78, 63, 1,156,190,217,199,253,
-163,189,206,131,171,253, 75, 7,192,232,162, 87,209,141,109,227,105,234, 93, 32,125, 55,223, 79, 61,194, 47, 43,235,157,223,181,
-225, 89, 7, 93,238,196, 97,182, 54,234,108,132,221, 94,176,103,124,235, 13,136,218,190,227, 85, 90, 18,218, 34,164, 36, 98,149,
-231, 98,147,129,156,196,189,238, 77,181,189,130, 13, 47,190, 15, 38, 67, 62,159, 49,225, 93, 91, 35, 61,126,238,114,198,232,239,
-151,168,249,251,137,237, 48,159, 96,228,187,212, 89, 98, 3,122,146,169,187,188,169,167, 36, 82,229, 96,160, 83,119,215,239, 75,
-163,203,210,133, 40, 74,209,209,145,125, 13,216, 3,159,137, 60,167, 66,155, 16,107,232,132,192,221,219,129, 43,116,240, 30,109,
- 44,117, 82,235,222, 12, 8,146,172, 8,246, 96, 36,203,194, 16,100,111, 72,198,107,121, 12, 81, 88,153,204,118,203,158,168, 23,
- 95,211, 39, 60, 83,199,220,231, 94, 0,136,118, 25,238,221,134,120,161,209,225, 42, 6, 34,156,145,105,115,174,168,249,231,165,
-251, 28,104,199,133, 39,239,188,181, 75,129, 41, 55,116,185, 11,203,157, 95,138,167,141,179,233,226, 64, 90,132,200,132,248,110,
- 82,193, 78,200,160, 74,176,201,192,149, 90,240, 75,113,186,154,212,166,237,250,180, 37,246,231,165,251,140,207,139,123,170, 75,
-246,139,238,153,172, 96,141, 2, 42, 43, 28, 40,195,152,181, 88,195,226,205,105,143,157, 21, 98, 71,221,182, 37,125,242, 63,171,
- 76,208, 34,142,121,189,174,245,160,245,115,210, 63,131, 53, 54,220,102, 68, 42, 2, 41,214,177,111, 56, 65, 61, 56,106,158,103,
- 20,153, 49, 31, 38,228,205, 22,219, 97,107, 63,239, 4,232, 44, 46,193,108, 95,120, 49,126, 15,255,166, 89,201,120, 17,124,223,
-103,199,134,162,143,185,243,160, 83,219,129, 51, 86, 51, 47, 38, 91,250, 19,192,121, 64,222,238,144, 55,131,125, 40, 75, 1,100,
-246, 7,183,137,223, 64,228,227,100,187,220,137, 77, 49,207,108, 30, 66, 22,174, 84,181,218,223,104, 40,241,125, 20, 77,246,145,
-202, 68, 6, 26, 16,123,240, 6, 88,103,192, 16, 28, 68, 48,188,116, 64,126,114, 2, 26,238,248, 13, 58, 0,252,148,177,223,213,
-163, 59,245,178, 13,126,244,202, 46,124,221, 1,227,203,246,234,150, 2, 76,159,243,131,126, 0,242, 22, 56, 14, 64,254, 28,144,
- 62,106,185,221,249,141, 54,186,207, 79, 1,252, 12,144,190, 21,244,244, 87, 0,223,241,215, 64,223,244, 81,156,254,163,115,188,
-245,127, 24,241,244,111, 30,112,255, 86,193,195,167, 7, 92, 73,131, 49,196, 97, 22,196,164,152,160, 80, 93,151,232, 34, 24,131,
- 28,239, 26, 7, 63,177, 19,235, 4,117,124, 26, 81,139, 89,165,217, 49,252, 2, 33,191,200,227,214, 96, 47, 42, 70, 89,101, 18,
-248,200, 95, 33, 72,108,100,166, 20,104, 95,182,247,104,195,138, 13, 91,215,176,125, 44,200, 60, 32,253, 71,119, 65,239,251, 61,
-192,246, 95, 4,210,179,192,252, 24,120,244, 95, 65,239, 29,129,151,223, 4,188, 54, 2,247,142,208,227,108,254,118, 47,254,128,
- 4, 28, 5,148, 5,216,165, 38, 4, 40,197, 78,178,189, 71,154, 61,118,144,121, 2,112, 96, 96, 18,232,209,210,241,112,122, 31,
- 24,239, 1,167,129, 4, 46,192,156,128,109, 2,205, 51,136,172,235, 27,177,236,106,226, 69,147,213, 94,177, 79,161,142,124,229,
-196, 22,214,194,115,120,103,253,105,211, 37,136,164,183,101,205,235,253,111,252, 79,159, 96,241,170,203,234,133, 97,189, 24,105,
- 13,111, 70,103,219,193,106, 47, 31,207,238, 9, 24,111,123, 46, 99, 36,197,103,238,205, 40, 52,215,142,149,186,125,183,220, 84,
-192, 16,225, 14, 17,190,249,185, 13,222,242,238, 1, 31,255,196,136,223,186,156, 23,135, 92,216,220,142,176,231, 48,173,232,135,
-189,176,176,247,227, 19, 53,171,228, 90,145,189,176, 63,145, 39,131, 81,103, 81,234, 68, 98, 21,221, 73,109, 7,171, 93,144, 85,
-172, 29,135,174,235, 27,125,215, 30,218,128,177,155,116, 72, 71,216,204, 68, 70,211, 99,219, 37, 83,213, 24,152, 48, 18, 82, 64,
- 40, 85,161,173, 94, 8,164,238, 82, 61,141,203, 52,112,168, 20,175,151,141,163,117,229, 99,239,187,231,210, 93,202, 2,197, 1,
-132,135,254,209,223, 46, 86, 43,218, 32, 61,125, 52,173, 23, 84,115,215,197,110, 98, 50, 67,203,247,191,191,147,194,182,120,226,
-187,253, 30,235, 90,250,245,201,162, 51,181,239,245, 74, 4, 59,102,100, 88, 10,224, 93, 40, 46, 65,120, 66,192,209,223,100,233,
- 86, 65,252, 58, 83,174, 88, 77,245, 89, 0,189,182, 34, 92, 83,235,209,219, 64,192, 9, 39,204,153,113, 80,215,103, 69, 8,139,
- 20, 72, 41,134, 20, 6, 32,204,139,203,152,217,246,224, 51, 39,232,100,202,245, 30,115, 44,175, 35,226,148,192,110, 71,222,168,
-168,107,161,172, 16, 44, 34, 32, 21,155, 2, 56, 53,142, 55, 3,198,194,152,143, 71,148,113, 66,222,110,176,217,108,189, 56,157,
-236,140, 81, 99,170,132,179,161,238, 35,123,242, 82,148,247,139, 93,187,118,123,105, 31, 81,112, 78, 45,137,173,194, 26,218, 40,
- 79, 89,145,192,246,103, 19, 35,101,147,241,179, 20,148,105,118, 48,130,250, 37,220, 14,175, 70, 10,234, 87, 0,236,255, 92,220,
-180, 47,104, 39,164,141,236, 75,114,159, 33, 21,187,252, 85, 65, 69,161, 78,242,178, 58, 90, 48, 36,197,113, 82, 60, 24,129,187,
- 7,193,201,253, 2,228, 59,221, 41,117,199, 61,204,238, 87, 47,143, 93, 16,183,113, 97,213, 3,239,212, 15,246,159,170,192,241,
- 2,120,164, 80,246,233,196, 86, 45,171,114, 24,128,225, 55,129,124, 2,164, 51, 32,191,201,114,193,183,239,183, 78,126,251,131,
-192,155, 62, 11,124,251,223, 4,127,211, 47,226,206,207, 61,193,233, 95, 61,226,238, 23,143,184,247,108,194,227, 13, 99, 82, 66,
-145, 22, 40,172,218,239, 5, 61, 88, 71,189, 93,151,149,240, 45,172,105,210, 82,189, 50,195, 17,137, 45,134, 51,117, 99,124,237,
-132, 58,209, 8,167,254, 50, 17,223, 67,106,105, 65, 47,108,169, 99,153, 26,108,132,201, 84,188, 57, 1,187, 34, 56,217, 3, 89,
- 50,210,127,124, 23,244, 45, 31, 0, 54,127, 28,200,239,178,111,244,248, 17,224,252, 37,224,252, 25,224,188, 0,143, 39,232,126,
-130,202,232,227, 41, 95,242,110,124, 32, 71,158, 69, 26,163,163, 25,192,113,178, 86,229, 48,155,124,124, 95,108,143,126,167, 24,
-166,173, 36,168, 38,208,120,116, 15,251,209,233,129, 78,218,219,154,234,149,198,229, 72, 43,186,162, 88,121,228, 58, 10, 39,204,
- 22,140,187,184, 64, 99, 76, 23,175,225,228,251,119,238,133,112,157,112, 38,119,187, 92,237, 68,106,253, 57, 36,180, 68,243,162,
-131,111, 68, 68, 37, 24,160, 98, 5,150, 82,191,139, 84, 27,165,118, 23,251, 12, 96,235, 87,226, 83,204,248,125, 31, 60,195, 27,
-254,194, 11,120,245,207,126, 1,159,250, 59,179,243,174, 27,226,185, 87, 29,235, 74,152,182, 35,224,133,129,145, 7,224, 31,127,
-102,194,199, 30,140, 53,250, 56,246,185, 17,229,155, 86,153, 4,165,195,124,246, 73,112, 88, 81,211,214, 34, 65,209,101,244, 42,
-212, 25,220,157, 35, 64,186, 17,113, 19,124,209, 34,231,156,176, 20, 90,201,234,130,232, 33, 42, 49,209, 52, 75,150,239,248,201,
- 58,206, 1,166,235, 17, 87, 29,176, 42,164,216, 33,157,124, 58, 80,193, 40,145,201,237,123,242, 1,141,230, 55,118, 98,193,209,
- 87, 22,235,238,111,125,185,150,134, 21, 89,188, 94, 83, 23, 85, 29, 84,190,129, 90, 19, 36,212,118,178,218,141,203,201,245, 17,
- 73,151,118,193,254,125, 15, 1,219,222,139,166,125,199,250, 23,234, 47,179, 54,133, 58, 70,178, 96, 8, 51,197, 46,161,157, 11,
-229, 50,247,206,141,246,179, 73, 87, 12,233, 74,216,169, 93,166, 58,187,250, 63,185, 45, 45, 7,228,104, 85, 8, 36, 0, 39, 76,
-216,229,132, 43, 78, 96, 50, 31, 72,124,174, 98,242, 34,218,214,204,228, 5, 68,114, 33, 93, 78, 70, 7, 5,180,114, 18,250,162,
-171, 47,172,117,241,153,215, 14, 17,219,141,245,189, 24,157,139,233,189,192,132, 76,140, 97,216, 32,109, 7, 28, 64,152,199, 3,
-100,182,142, 93, 55,155, 54,110,137,194, 70,125,149,101, 85,101,199,238,236,128, 38, 1,156,169,149,180,170, 5,137,228,140, 60,
- 12,246,207,164,212,200,204, 32,190,241,144,253,211, 27, 73, 54, 9,156, 51, 56, 49,168, 20,136,204, 80, 41, 80, 7,232,179, 42,
-152,115,165,197,177,123,131, 99,164,111, 19, 4,139,164,171, 47,150, 10,164,204,181,116, 47, 69, 48,137, 88, 55, 79,254,248,178,
-121,134, 38, 81, 20,255,129, 51,219,155,240,104, 86,156, 23,197, 41, 19,228,179,151, 72, 28, 53,237,224,244, 56, 87,189,203, 4,
-140,143,128,233,220, 99, 59,189,143,144,217, 41, 55,197, 61,209, 9,250,144,128,203,226, 86, 47, 1,210, 0,108, 4,184,117, 4,
- 54, 87,160, 91,175, 1, 39,191, 3,156,126, 12, 56,249, 8,112,250, 71,129,221,215, 2,249,107,140, 39,255,220,191, 0,252,177,
-255, 14,249, 3,191,140,167,127,232, 10,183, 62,122,196,131,167, 20,175,158, 38, 92,177,145,205,180,248, 69,236,243,161,226, 43,
-127,144,127,201, 24,203,166,198,191, 14,241,202,228,116,179,129, 66,217,171,222,173, 53,219,143, 22, 44, 4, 24, 97,245,176,192,
- 24, 66,164, 32,155, 99, 91,235, 1,149, 56, 33,195, 94, 95, 26, 8, 36,100,126, 76, 98, 12, 40,216, 22, 32, 29, 18,210,119,237,
- 64, 31,250, 32,176,253, 1, 32,189,221,118,220,227, 39,129,199,127, 21,250, 88,129,171, 1,184, 56, 64,175, 70,232, 60,154, 80,
- 37,164,215,147,135,203,108, 59,226, 78, 96, 14,103, 7,148, 31,102, 99,121,206,165,209, 40,164, 3,214, 87, 14,190, 99, 44, 40,
- 25, 41,240,105, 6, 31, 7, 80, 73, 72,251,185, 93, 2,106, 21, 60,121, 81,107, 35, 59,191,156,184, 49,224,129,101,152,206,181,
-145,181, 46, 53, 41,178,218,189,133,240,148, 58,185, 49,173, 56,225,241, 32, 14,238,102,156,252,247,178,239,249, 69,218, 51,203,
-170,182,250,208, 22,214, 3,237, 44, 88,158, 6,118,139, 8,207,159, 18, 18, 4, 95,248, 51, 95,196, 71,255,193, 30,133, 21,236,
-227,126,137, 14,182,142, 78,237,178, 72, 30, 25, 26, 0,143, 7,170,248,200, 43, 19, 62, 63,154, 62,102,227, 99,213,190,211,207,
-206, 20,239, 23,129,125,209,180,238,114,210, 74,115, 16, 59,113,193, 82,231, 16,228,183,212,133,187, 20,119, 41,172,199,160, 10,
- 93, 30,178, 29, 42, 91,169, 53, 19,145, 11,111, 54, 48,138, 0,100, 36,143,232,132, 11,179,226, 16,159,213, 71,168,106,196,244,
-172, 97,205,210, 90,115, 22,109,182, 81, 90, 41,200,185, 35,233,237, 60,253,237,194,247, 47,195,202,170, 90, 47,225,213, 37,222,
- 10,126, 59, 63,139, 39,191,197,180, 35, 57,211, 32,146,210,160,171, 41, 19,150,176,149,158, 37,191,166,226, 21,135,247,204, 30,
-120, 67, 14,224, 25,130, 82,184,176, 72,155,197, 47,166, 29,213, 89, 64,138,137, 25,163, 2,231, 80, 15,227, 2,230,110, 79, 21,
-133,100,233, 26,144, 21,173,182, 70,232, 82,151, 46,154,233,186,206, 85, 59, 24, 82,160,203,137,184,174,155,227,253,158, 92, 38,
- 71,157,118,172,196, 63, 39,152,176,155,236,206,113, 38,118, 43, 98,110, 0, 65,233, 13, 66, 77,237, 94,237,228, 43,106, 35, 88,
-218,132, 32, 30, 90, 34, 32,243, 14, 39,187, 45,142, 4,200, 52, 65, 75,193,144, 7,232,206,182,195, 82,196,159,123,110,121, 7,
-113, 96,145,106,173,240, 35, 48,190, 39,186, 41, 28,147, 55,100,195,215, 21, 35,104,176,251,208,137, 25,196, 9, 57, 15, 64, 82,
- 87,109,251,229,222,147,234,136, 77,225, 94, 49,131, 92,177,177,213, 35, 79,214, 1,234,108,150, 32,134,123,160, 41, 24,244,228,
-251,245,134, 80,181,221,165, 56,145,139,192, 62,119, 19,241,205,131, 10,114,178,136,201,215, 14, 86, 60,104, 82,232,111, 78,192,
-120,101,101, 30, 50,192,103, 64,122, 26, 40, 7,187,212,203, 30,152, 30, 57,100,102,107, 74,118,157, 60,233,131, 91,194, 91,114,
-162,196, 49,146, 77, 74, 4, 34, 3, 57, 65,135,236, 92,201, 9,244,220, 63, 2,158,251, 12, 80,254, 40,112,251,187,205, 19,143,
-175, 4,248,135,128,119,254, 50,232, 39,254, 10, 54,255,211,103,241,220, 79, 29,112, 50, 77,120,229,169, 1, 23,196,152,185,133,
-185, 80, 63, 10, 15,166,187,239,175,147,154,248,222, 4, 90,140, 82, 74, 99, 53, 39, 31,189,138,221,105, 34,203, 11, 41, 18,245,
-170, 8, 63,217,133, 62, 73, 49, 37,178, 74, 23,180, 97, 43,152,224, 70,167, 68,160,217, 71,172,172,200, 52, 99, 43, 64, 86, 70,
-122, 62,129,191,231,221,192,233,127, 0,208, 91, 92,180,246, 10,240,248, 47, 0,247, 94, 4, 30, 63,227,212,140, 2, 29, 71,211,
- 78, 68,168,135,167,149,144,114,123, 42,134, 8,188, 38,139, 86,219, 23,127,237, 11,112,144,142, 21,170, 30, 31,235,129,225,105,
-103,235, 16, 20, 63,213, 19,240,116, 2, 61, 86,240,101, 6,243, 92,245, 28,236,187, 81,113, 5,114,176,159,227,196, 9, 60,230,
-216,133, 93, 4,226,180,160,209,225,174,169,175,169, 89,152,250,188,106,213,165,102, 53,210,192,164,235,145,139,119, 35, 73,218,
-133, 24,137,108,203,195, 89,187, 3,180,253,190, 84,184,135, 66, 50,240,138, 42,190,248,145, 61,238,237, 5, 83, 82,108, 32,158,
- 40,104,170,100, 66, 88,149, 26, 47, 94, 59,223,242,164,138, 7, 99,241,245, 65, 88,225,186,159, 69, 91,161, 67,157, 82,189,199,
-127,234,170,147, 90,239,204,141, 11,222,132, 78, 11,237,174, 71, 78,198,229, 92,148, 42,199, 29,221,142,188, 6,165,116,214,205,
- 38,226,178,247,121, 88,121,182, 75, 8,183,186, 78,171,238,125,197,138,166, 66,234, 10,125,109,130, 55, 52,164,109,255,222,231,
-110,108, 28,246, 53, 80,243, 90,199, 24,251, 82, 2,220,210, 8,108,201,223,199, 64,217, 82,119,233, 6, 24,103, 19,100, 58, 23,
-215, 77,213, 57,160,173, 83,247,115,190,172, 71,195,218,108,204,158,132,189,152,156, 96, 53,161,137,220,245,192, 30, 23,103, 36,
-204,126,193,111,220,140, 51,122,212,237,232,231,117,116,224,234, 32,170, 72, 65, 99,109,226, 54,234, 71,146, 55,234, 67, 91,193,
- 86,145,181,126,233, 6,207,127,234, 86, 4,189,120,143, 18, 67,136, 49,139, 66,146,175,146,161,102,211, 37,245,213,101,139, 30,
- 55, 0,145, 9, 7,136,109, 28, 95, 68,204,159, 46,101,241,157,209, 77,147,165,149, 45,176, 29, 31, 38,174,219,228, 1, 24, 6,
-204,211, 12,153,103,168,171,222,145, 18,138, 40,104, 30,145,242,128,147,237, 14, 37, 15, 40,101,178, 36,205,221, 45, 28, 41,161,
-140, 71,228,196,160,156, 77,184, 10,255, 97,250, 47,198, 62, 99,165,152,237,251, 1,192, 41, 33, 15, 22, 89, 39, 50, 87,191, 28,
-197,222,155,204,255,205,137, 45,205,102, 16, 96,158, 33,197, 54, 62, 84,188, 91,135,237, 54,197,103,137,196,201,253,228,210, 20,
-125,222,101, 19,168,146,212, 64, 4, 77,230,103, 7, 19, 56,251, 94,190,113,243,236, 34,240,138, 84,139,225, 56,171,193,221,187,
-254, 39,147,226, 98, 84,220, 25, 20,178, 97,148,207, 95, 33,239,127,221, 70,226,128, 73, 86,248, 13,128,190, 2, 76,143,237,114,
-150,131,117,228,124,102, 23,112,192, 75, 72,218,163,234, 19, 5,236,103,191,156, 86,165,116, 34, 83,110,111, 19,244,139,103,192,
- 91, 47, 64,111,255,239, 1,122, 8,220,250, 94, 32, 63, 7,240, 45,128,190, 29, 56,251, 58,208,247,253,215, 72, 95,243,243,184,
-243,159,141,216, 62,152,241,224,142,224,225,134,112, 84,170,137, 92, 49, 46,227, 16, 84,105, 39,162,153,151,202,146,193, 71, 92,
- 21, 70,227, 39, 91,136, 66,226, 19, 41, 62,128,168,158,209, 4,140,163,160,136, 89,155, 2,153, 26,127,145,138, 5,233, 36, 38,
- 36,175, 16,152, 20, 3, 41, 54, 89,145,103,182, 66,240,219,111, 3,207,255,187,230, 10,208, 1, 56,252, 58,240,232,135,160,175,
-252, 14,240,210,109,123, 29, 47,246,144,151, 14,144,199, 19, 52,140,202,170,203,116, 20,245,211,119,203,253,242,209,118,233, 87,
- 5,216,139,165, 23, 41, 64,194,109, 30,216, 51, 64,137,219,220, 62, 13,192,150, 64, 91, 6,157, 16,240,200, 34, 35,169,227,235,
- 71, 81, 73, 36, 94, 44, 82, 45, 62,133, 0, 46,253,104, 48,240,174,173,133,162,200, 84,184, 97, 31,220,119,165,133,250,188,114,
- 63,176, 57,108,113,221,191, 35,254,169,163,118, 64, 14, 68, 40,172, 77, 83,161, 84,187, 83,238,118,156,169, 59, 4,199, 89, 48,
-122, 81,183,205,246,231,132,218,216,151,161,181, 91,231,149, 15, 62,193,106, 90,246,213, 78,212, 79,226, 57,226,169, 59,196,122,
-191,248,188,210, 35,160,219, 7, 43,150,151, 77,191, 46, 96,213,133, 91,148,234,240, 0, 0, 32, 0, 73, 68, 65, 84, 31,153,171,
-160,137, 22,250,132,232,152,230, 8, 25,234, 68,129, 61, 9, 49, 44,128,201,171,217,158, 63,111,151,191,165,207,165, 46,128, 90,
-220,222, 55,118, 94,106,214,182, 99, 15,250, 92,162,165,127,126, 61,186, 14, 24, 80,234, 70,203, 59,255,217,206,213, 4,109,141,
-139,160,109,229,163,215, 3, 61,178,182, 92, 2,114, 90, 94,228,220,119, 91,187,133, 58,188,116,195, 46,233, 68,108,125, 71, 43,
-120,253,255, 91, 43,210,129, 38,230,155,123, 39,129, 54,215,132, 86, 44,107, 87, 32,213,167,172,217, 10,171,127,124, 45,144, 83,
-186,214,165,175, 59,223,254,178, 79,139, 41,143,143,228,217,194, 65, 4, 97,131, 22,156, 16, 35,167,140,189, 42,138, 76, 94,116,
-115,253,160, 55,122,139, 57,169,192,108, 22,213, 18,197,255,117,225,227, 53,135,202,235, 88, 43,225, 1, 90,156,135,246,249,242,
-149, 52, 68,193,217, 34, 85, 45,161, 84,176,201, 25,154,179,253, 60,121,192,201,102, 3, 85,193,164,132,253,113,223,212,239,210,
-129,100,184,243,123,163,235,226, 65, 14,148, 73, 9, 36,197,147, 40,154,104,160,134,191,248,172,196,160, 49, 25,154, 0,153, 39,
-232, 52,161,232, 17,154,146, 81,227,180, 89,112, 36, 9, 56, 9, 4,201,210,215,220,234, 66, 29,175,176,248,131, 69,170, 16,110,
- 94, 63,234,248,124, 97, 47, 10,111,225,236,220,236,224,117, 15,217, 42,239,131, 0,156,252,128,216, 50,244,162, 0,247,190, 8,
- 60, 51,187,101,109,107,160, 25, 69,227,135,207, 7, 79,109, 59,119,198,228,109,179, 96,233, 33,228,191,230,101,175,234, 21,241,
-244,143,150,203, 11, 2,232,130,129, 29, 3,151, 9,120,116, 2,125,124, 0,126,207,223, 0,189,241, 51,192,217,159, 0,134,119,
- 24, 36,133,223, 4, 12,127, 30,244, 45, 95, 5,252,228, 79, 97,247,103, 47,240,198,151,102,236,238, 20,220,219, 38, 28, 8, 40,
-243,210,165, 96, 9,104,188,176,255,176, 15,226,114, 28,230,188, 76, 7, 51,235,224,242, 1, 10,208, 16, 59, 83, 64, 38, 64,102,
-241, 0,132,110, 84,111,177, 56,182, 99,100, 32,177,212,170, 62,145, 98, 96, 27,191, 51, 18,240,108, 6,222,247, 14, 96,251, 94,
-123,220,198,223, 1,126,231, 95,129,126,122, 2,246,207, 1,219, 45,128, 9,250,185, 3,228,254,222,166, 64, 91,110, 65,237,125,
-203, 23,144,239, 80,229,205,197,160, 52,163,119,233,197, 59,245, 32,251, 30,139,143,239,197,166, 43,228,156, 52,190,101,171,150,
-156,157,194,145,129,204,245, 66,239,205, 52, 33, 46,148, 30, 16,210,227,231,147,125, 89,237, 60,193,232,186,247,222,242,214,187,
- 8, 4, 43,223,115,167,158,143,253, 98, 86, 11, 92, 49, 7,130, 46, 4, 78,150, 87, 99,250,149,112, 95,134,178, 93,253,210, 45,
-165,161, 55,163,181, 81, 81, 92,138, 59, 65, 68, 43,100, 67, 96,227, 79,118, 62,118,189,216,123,114, 94,191,203, 21,173, 65, 26,
-220,113,201, 55, 88,166, 0, 78,139,198,139, 58,116, 15, 86,199,177, 94, 83, 12, 23,159,142,104, 71,244, 91,231,104,211,194, 66,
-214, 52, 62, 49, 82, 7,173, 70,237,126,193,136,175, 46,106,209,210,141, 82,161,186,140,129,173,107,132,182,142,208,149,152,146,
- 87,204,135, 78,146,116,237, 64, 79, 93,238,124,164,177, 21, 31, 81, 71,120,205, 41, 20,183,253,243, 48, 5, 32,199,183, 81,243,
- 10,180, 19, 93,238,142, 34,169,205, 68,115, 12, 43, 82, 65, 13,169,189, 24,101,251, 65, 44, 43,161,165,126,137, 75,125,125,161,
-235,106, 45, 16, 59,119, 46,173,158, 94, 90, 20,151,214,217,254,127,151,174,164, 75,189,149, 51,180, 94,175,243,189,197,251, 51,
-117,133, 78, 95,128, 36, 88,211, 41, 68, 85, 60, 73,106,211, 69, 73, 12, 45,115, 13, 70,169,207,106,112,209, 35, 66,220, 87,194,
-179,216,106,111,137,214,165,165, 72,149,174,179, 37,214,203, 3, 17, 69,153, 38,228,141,218, 72,221,197, 20, 5, 5,165, 20,164,
-153, 64,121, 3,100,155,182,202, 60,130, 83, 54, 16,216, 52, 34,113,130,228,140,195,126,143,195,229,185,133,105,181, 13, 76,111,
- 89,105,221,121,123,184,200,127, 32,179, 17,113,189,208, 19,200, 43,151, 33, 0, 12, 82, 32, 58,131, 99,172,206, 12, 42, 30, 16,
-163, 5,202,106, 98,178, 24,135,184, 15, 75,165, 88,133,162,178,176,183, 85, 43,128, 16,180, 20, 15,183, 79,190,119, 12,232,138,
-214, 75, 93,138, 66,216, 20,199,179, 42, 54,170,102,103, 80,224, 40, 6, 56, 32, 47, 7,101, 3,232,213, 0,253,236,167, 65,239,
-126, 4,224,118, 67, 50,200,149,209,199,202, 8,204,151,192,116,207,163, 62, 47, 0,253,114, 71,197,138,225, 71, 7,110,237, 64,
-148,223,179, 64,167,210, 78,126, 88,178, 21, 10, 3,251, 25,196, 19,240, 56, 3,143, 79,161, 95,243, 43,160, 47,255, 83,192,237,
-239, 3,182,127, 0, 72,119,157, 96,247,189,160,175,122, 30,250, 87,126, 4,233,135,174,112,231,227, 71, 12, 34,120,176, 83,156,
- 15,102, 69, 34, 37, 83,251, 43, 32, 65, 74,243, 90,155,179, 64,103, 79,184,242,198,214, 25, 60,237,225,236,198,248,204, 12,113,
-144, 2,147, 32,185, 85, 70,168, 29,118, 34,189,216,203, 58,242,228,226, 26, 37, 32,179, 98, 67,138,129,216,130,125, 52,129,222,
-117, 10,126,203, 31,180,176,155,178, 7, 30,254,151,208,127,188, 7,238,125, 25,240, 6, 31, 80,221, 63, 64, 62,123, 5,221,143,
- 16,182, 27,135, 6,251,188, 17,183,153, 45, 81, 76, 60,178,203,148,139,253, 58, 22, 96, 20,232, 36, 70,148, 3, 64, 51,217,133,
- 63,139,181,193, 19,128,105, 50,159, 58,109,129,244,156,121,214, 6, 1, 78, 0, 26, 60, 57, 80,101,161, 95, 13,209, 79,100, 84,
-179,243, 14,138, 24,135,154, 85, 65,137, 48,206,122,227, 1,174,235,173,165,243,224, 75, 47,156,235,109,138, 93, 80, 75, 20, 81,
-212,117,204, 49,112, 24,188,165,154,117, 53,218,235,148,223, 68,215, 3, 78,230, 58,248,112,133,118,236, 12,125, 44,220, 46, 68,
- 47,109,146,231,179,119, 93,207, 28,157,181,182, 80,145, 96,181,247,227,234,170, 58,167,235, 63, 43, 58,210,157,160, 21,169,113,
-121,246,226, 53,185, 14,249, 91,136,146,184,147,101,149, 21, 88,169, 31,157,231, 85, 97,162,171,108,119,238,222,177,132,150, 43,
- 94,180,233, 31, 56,236,177,253,165,175, 75,121, 24,173,144,194, 33,234, 26,186, 21, 66, 4, 3,109,124,248, 52,249, 5,127,230,
- 29,250, 25,128, 51,127,255,142,218,166, 16, 19, 34, 60,198,143, 27,180,176,156,106, 81,163,102, 11, 3, 53,253, 3,117, 94,252,
-121, 81, 72,182, 43, 42,246,204,210,165,178, 21, 93, 94,196,114,205,131,221,245, 52,218, 38,125,210, 77, 51,214,228,114,245,196,
-179, 62,222,149, 52, 46,116,189,214,168,243,202,167,142, 85, 40,153,116,108,133, 76,141,237, 15, 23,184,153,147,202,126, 70,113,
-120,135,166,140,189, 10,202, 60,219,116, 33, 37,204,254,190, 16,147,173,146, 0, 48, 25,182,124, 38,134,200,100,174, 6,106,226,
-214,158,170,184,198,237,106,231,115,215, 14,205, 13, 85, 31,185, 23, 80, 26,144,136, 33, 57,153, 99, 75, 11,166, 2,224,120,192,
- 70, 5,105,216, 96, 82,193, 56, 30,204, 77, 35, 70,232,204,195, 6,137, 19,182,155, 77,219,169,115, 61,176,233,154,215,214, 64,
-243, 62, 86, 55,181, 84,181,193, 69,224,138, 93,242,212,160, 39, 62, 27, 86, 42,149, 4, 69,185, 11,170, 86,181, 68, 55, 78, 72,
-193,138,247,203, 92, 59,245,138,129, 15,108,103, 47,253,195,162, 82,231,158,245,107,121,153,166,110, 3,155, 3, 19,206, 97,225,
- 50, 16,198, 56, 43,166, 2,191,136, 60, 77, 40, 15,208,223,126, 13,244,173, 47, 1,155,231,125,215,234, 53,180,122,223, 37,151,
-192,213, 4, 61, 20,208,217, 43,192, 89, 1,134, 55,199,163,100,221,245,137, 95, 14,137,237, 73, 59,250,210,243, 40, 45,210,182,
-192,236, 88,179, 53,250, 64, 1,253, 86, 2, 30,156, 65,223,115, 31,120,215,143,130,158,253, 57,224,244,251,129,225,157, 0, 15,
- 0,190, 3,244,194, 51,160, 31,249, 79,129,255,230, 33, 78, 63, 34, 24,142,123,236,146,224,113,102,204, 81, 99, 83,120, 54, 61,
-180, 69, 21, 50,181,195, 45,187,126,143,104, 57, 26, 69, 87,188,133,255,159,147,137,165, 36, 89, 7, 88, 5,116,140,133,119, 37,
-113,140, 64,141, 33,192, 76, 78,242, 19,208,176, 1,113, 2,109, 19,248,253, 47, 0,111,248, 22, 59,178, 14,191, 12,124,241,227,
-192,195,103, 13,125, 37, 51,240,242, 12,249,212, 99,200,147,189,173,101, 60,198, 75,149,237,179, 67,190, 23, 96, 79,210, 56, 73,
-174,129,240,214,102, 47,214,137, 79, 98, 30,117, 87,198,171, 8,104, 44, 13, 17,118, 36,155,186,200,185,105, 33,120,103,199,226,
-142,129,147, 12, 26,134,101,228,176,118, 93, 54, 80, 81,190, 91,183,145, 49,181,112, 19, 89, 41,100,200,145,161,177, 87,207,104,
-151,120,221,219,173,227, 33,125, 15,162, 98,175,191,114,235,126, 8,141, 98,151, 82,187,160,145, 76,143,169,190, 79,174,239,103,
-231,243,142, 9, 65,137,238,147, 90,215,143,106,103,212, 26,158, 18,161, 39, 53, 6, 51, 34,108,163,211, 45,214,249, 0, 90, 71,
-126, 85,157, 28,196, 61,106, 7,119,191,179,213,238, 20,174,217,224,157,231, 62,190,247,121, 61,205,236, 33, 60,157,238, 64,226,
-251,236, 70,174,172,205,224,220,239,238,235,184, 95,219,115, 64, 43, 53,124,234, 58,109,234,126,134, 56,172, 99,243,148,180, 93,
-134,212,173, 88,218,110, 88, 23,197, 84,124,173,141,255,125, 83,247,251,161,130,151,149,223,122, 14,154, 29,217,134,105, 77, 30,
-148,142,234, 22, 16,107, 14, 34, 32,181, 96, 23,238,160,213, 82,109,144,122,173, 99,174, 13, 30,209, 66, 23,113,205, 91,127, 77,
- 96,119,253,159, 75,245,137,199,179,177, 44,120,150,221, 62, 45,154,200,155,106,191,254, 25,187,169, 19,110,133, 27, 97, 36,197,
- 73,133, 41, 89,134, 9, 59, 30,156,138,235,192,216,216,139,133, 25,101, 26, 49,139, 32,147,171,206,115,134, 50, 99, 42, 5, 92,
-138,221,119,137, 64,100,165, 70, 93,239,213,103, 9, 43, 13,128,118, 63, 87, 23, 53,215,137, 30,201,167,228,115,153, 49, 29, 15,
-200,158, 76,202,238,141, 87, 78, 80,102,140,243,140, 34, 5,105,158, 77,112, 78,108, 22,230,204, 21, 19, 13, 15, 57,203,232, 16,
-177, 11, 95, 39,173,153,203,218,240,152,104, 18,255, 42,178, 67, 75, 92, 35,239,152,217, 59,104,142,191,197,133, 7, 20, 10,121,
- 47, 18, 44,230,211,195,125, 85,186, 8,184,174,234,241,175, 17,226, 5, 18, 1, 58,175,122,248,220, 65, 14,203, 80, 27,143,216,
-197,110,254,105,187,248, 5,123,117,248,129, 51,214, 11, 51,202,150,161,191, 53, 2,231,191, 4, 60,251,181,150,141, 78,228,227,
-117, 31,189,207, 7,232, 21, 1,143, 1,189,100, 80,185, 15,220,153,157, 74,150,205,155,126,114,176,203,102, 59, 55,115,236,209,
-245,190,165,235,214, 67,133, 50, 2,152, 14,192,158,129,203, 25,116,127, 11,124, 94,172,107,127,219, 15, 0,119,255, 29, 96,247,
- 33,179,216,165,127, 2,120,234, 47,129,255,212,159, 6,253,181,251,224, 95, 24,240,236,241, 2, 67, 41,120,156,146, 5, 56, 84,
-212,185, 86,145,119,168, 49, 19,181,216,208,165,224, 69,151,229,156,127,143, 73, 60,204,164,120, 33, 18, 15,153,120, 32, 8, 89,
- 4,161,104, 27, 80, 68,225,144,161,224,221, 0, 30, 50,104, 47,224,175,221, 2,239,255, 16,176,123,155, 37,167, 61,248, 9,232,
- 23, 21,216,238,236,111,125, 52, 67, 62,123,137,242,202, 17, 50,205,174,139, 48, 5,189,169,182,115,149,225, 83,180,167, 91,246,
- 16,237,226,221,183,120,151, 94,172, 83,159,172,112, 34,153,129,139,193, 63, 95,108,100,140,177, 0,122,191, 49,176,248,204,200,
-116,187,198,188, 12, 17,210, 84,109,126,228,105,108,126,128,179,177,236,139, 18,148,237,175,172,130, 67,255,156,195,167, 77,220,
-173, 45,146,179,191,225, 34,186,250,103,227,223,139,132, 43,183,117,198,229,115, 45,192,164,235,154, 74,168,116,213,234,158, 96,
- 89, 67,201,133, 92,209, 37,234, 34,196, 98,173,214, 13,187, 28, 51, 48,148, 62,110, 52, 80,181, 13,168, 94,237, 63,180,170,245,
-176,204,171, 22,186, 14,221,161, 53,237,173,126,121,186, 6,241,192, 74, 60,183, 24,109,118,182, 64, 90, 29,165,225,222, 17,159,
- 52,244,157,182,116,171, 69,172, 88,235,164,109, 28,222, 2,123, 26,245,172,248,235, 90, 22,133,136,253,128, 57, 66,171,220,125,
- 64,221,197,222,143,220, 77,100, 70,181,120,161, 14, 41, 60,250,190, 94, 61,242,183, 0, 56,248,229, 58,118,212,189,202, 84,138,
- 49,183,195, 95,158,234, 84,232,201,153, 20,199,176, 1,162,165,145,149, 27, 58,109,237,214, 69,253,235, 5,186, 33, 44,101,245,
- 62,210, 13,124,245, 5, 9,113,133,122,229, 53,195, 0,221,103,120,169,145, 91,237,166, 91,236,240, 77,133, 69,241, 38,117, 14,
- 42, 29, 25,172, 44, 19, 99,224,108,239, 13,145, 37,164,145,193,101,138,223, 5, 33, 12, 79, 76,216, 12,131,199,199,218,250, 52,
- 56, 17, 66,134,119,133,136, 7, 38,117,174, 10, 98,183, 90, 99, 5,166, 69,213,173, 45,220, 6,241,108,139, 69,179,218,186, 88,
- 77,124, 39,218, 77, 21,128, 82, 20,162, 35,118, 68,216,158,156, 66,136, 48,205, 35,166,105,198, 60, 30,237,240, 73,169,237,212,
-171,200,164, 83,186, 47, 72, 97, 17,207, 74, 93,200, 11, 5,217, 45,132, 33,161,108, 12,133,178,120,242,140,214, 72, 81, 21,139,
- 8,101, 54, 54,124, 74,185, 70,141,154,202,158,171,240,139,216,170,149,102,174, 66,151, 59,174,208,185,248,126, 4, 32, 45,158,
-177,142,234, 39,156, 84,205,202, 38, 90, 5, 56,179,239, 66,138, 63,229,156,128, 9,138,137, 1,253, 93, 64, 63,253,113,208,221,
-207,187,119, 58, 74,123, 87, 87,149,163, 33,165,174, 12,219,164, 2,144, 94, 0,119, 94, 4,248, 57,128, 78, 64,187, 43,232,110,
-242, 16,237,220,186,246,163,137,247, 80,252, 45,157,165, 43,181, 21, 50,205,160,195, 12, 58,206,160,243, 1,244,210, 41,244, 61,
- 87,160,175,251, 81,224, 77,127, 31, 56,249,126, 32,125, 25,192, 95, 13,220,249, 49,208,247,254,135,192, 83, 79,192, 63,115, 23,
-119,206,207,177,153, 38, 60, 32,198,101,183,227, 21,105,220,113, 67,235, 19, 56,149,133,127,154,208,129, 25,116,185,231,171,226,
- 37,233, 56, 6,221,135, 49,188,153, 22,213, 73,200,201, 14,250,172,130,156, 9,124, 58,128,246, 9,124, 10,208, 31,126, 55,232,
-249,239,177, 77,235,254,231,128,151, 62, 5, 92,221,178, 47,118,255, 8,125,188,135,220, 59, 66,198, 9, 74,226, 43,152, 80, 75,
-118, 27, 87, 98,208,134,173,112, 58,165,166,206,185,154,235,232, 29,147,216, 26,103,246,196,187, 89,129,139, 2,154,197,190,222,
-158,160, 71, 6, 77,151,174, 36,212,198,211,221, 36,208,192,181,253,150,212, 29,198,206, 52, 39,136,211,225,200, 87, 75,142, 46,
-136,206, 36,244, 39,126, 99, 30, 21, 72,217, 45,102, 98,240,159, 24,115,135, 95, 55, 87,145, 92,179, 19, 13, 93,240,138,250,215,
-168,209, 11,245,242, 51, 22,117,236,140,197,117, 16,209,246, 43,135, 51,166,165,174,113,103, 73,234,121,214,138,118,112,215, 98,
- 70,187,213, 87,127, 72,135, 31,219, 9, 93, 27,168,213, 87,126, 64,204, 46, 38,139,144,148,210,217,167,180, 3,183, 96,213,153,
-221, 52,150,167,107,102,171, 78,248,212,109,187,214,141,200, 66,105,172, 13,101, 32, 55,136,188,168,175, 87, 86,170,251,212, 77,
- 50,218,101,164,238,185,167,174, 30,210, 10, 24,210,110,146, 25,241,197, 65,204, 76,126, 97, 30,187, 75, 46, 20,249, 19,150,185,
-238,203, 85,131, 46, 0, 56,232, 46,247, 40, 66, 70,191, 20, 7, 50,100,172,120, 12,240,163,206,243, 31, 49,189,220, 1,129,168,
- 31, 25,251,231,202,178,217,245,154, 56,239,245,132,106,215,183,219,184, 1,140,186,116,101, 80, 21, 42,182,152,214,235,255,166,
- 94, 95, 99,241,106,194,213,125, 51, 92, 11,102,194, 94, 20, 3,171,195,207, 12,206,161, 72,208,164,216,176, 81, 80, 15,176, 56,
- 85,168, 34,229,100,246,235,148,170,195, 59, 51,163, 48,219,120,156,201,154,153, 50,251,122, 46,132,116,104, 73,167, 55,124,207,
-235, 19, 55,190,249, 90,172,171, 57,147,200,145,233, 38, 8,247,180, 54,166, 10,100, 19,215, 73,148,253, 21, 52, 37, 76,211,132,
-121,158,236,123,131, 77,246, 50, 86, 99,166,122,185, 6,201,205, 71, 88, 28,163,118, 52, 1, 81, 29,108, 57,169, 45, 81, 83, 48,
- 88, 68, 67, 83,164,104,153,187,248, 86, 63, 12,105, 65, 40,240, 44,106,235,134, 56, 25,129,142, 52, 50,164,217, 47,150,138,218,
-240,139,124,185, 80, 9,197,170,192,192, 15,147, 43, 76, 69, 4, 5,130, 50,199, 14, 52, 4, 48, 30, 54,145,129, 91, 23, 10,254,
-123,175,128,190,234, 23,129, 59,111,111, 57,220,234,137,198,243, 4,140,108,179, 48,135, 89,107, 33,227,142,157,221, 7,210,214,
- 46,243, 91, 4,220, 98,235,190,175,162,210,114,112,138,175, 7,234, 55,155,162,108, 86, 40,102,232, 56,131,198, 17,180,223,128,
- 95,219, 64, 63,191, 5,190,233,239,130,222,253,219,174,142,255, 0,128,119, 2,183,127, 28,244, 93,127, 26,188,125, 0,250,249,
-187, 56,185,119,137,231,174,246,216, 64,113,158,147, 77, 40,188,155,216,100, 96, 67,197,222, 15,181, 29,209,226, 41,147,118,240,
-193,243,119,152, 29,237,233,127, 79, 79,125,168,200,222,142, 60, 53,184, 61, 49,147, 32, 11,192,155, 12, 26, 18,120, 18,208,191,
-250,229,160,175,254, 97,179,144, 29, 62, 15,156,255,117,232, 33,219,160,176,204,208,139, 35,228,229, 3,100, 63, 26,114,177, 75,
- 61, 81, 85,208,224,175, 27, 17,184,144,237,216, 79, 96, 52, 57,130,141,218,227, 50, 63, 20,232, 97,130, 30,213,254, 46,144, 5,
-209,236, 39, 27,207,159,101, 63,193,213,198,239, 50,218, 62, 93, 11,144,196, 2,250, 78,179,127,210,123,241,168,223,251,174,125,
- 84, 53,145, 98,248,127,165,227,164,167, 80, 90, 51,131,148,113,247,132,112, 85, 4,227,108,233,133,161, 70,150,213, 97,217,139,
-104, 66,237,108, 69,167,213,149, 57, 89, 45, 24,187,194,226,234,123,235,238,219,206, 81,113,125,241, 76,137,160, 73, 77, 3,170,
-173, 59, 87, 63,144, 42, 57,204,219,163,121,117, 57,114, 47, 10,211, 54,221, 73,222, 25, 7,232,131, 60,115, 29, 76,166, 83,244,
-203,125, 34, 50,146, 92,119, 41,177, 46,155,132,178,154, 34, 93, 3,193,248, 68,162,223,165,167,149,117,172, 23,168,201,234, 53,
-150,149,152,171,223, 11, 75, 55,254,214,206,134,168,238, 43,143,113,122,179,240,217,235,223,127,189, 16,244,197, 20, 4, 98,201,
-151, 27,102, 20, 85, 76, 46,170,154,171,213,177, 37,218, 77,190, 21,106,161, 59, 84,139, 12,215,194, 86, 52,113,207,240,143,215,
- 40,182, 83,123,109,252,117,192,142,162,128, 27, 61,118,236,111, 10,109, 72,216, 27,227,118, 36,174,166, 18,134,122,232, 76, 11,
- 51,145, 27,212,105,175, 55,146,215, 27, 13,104,215,231,234,109,205, 69, 43, 80, 11,181,159,150,218,223, 88, 73,131, 66,184, 41,
-167,162, 95,207, 20,143,152,102,181,228,207,156, 24,153, 50,100, 48, 43,219,196, 70, 1, 36, 40, 68, 76,129, 62,164,140, 33,103,
- 36,206, 85,171, 52,112, 2, 13, 4, 21,103,194, 3, 75,155, 75,157, 30, 52,188,172,122,209,173,215, 94,147,206,218, 73,237,103,
- 21, 81,232, 60, 99,216,236,176,221,109,160,100,186,166,226,150,185, 82,138,163,150, 11, 74,153,129, 34, 86,124,108, 54,200, 57,
-163, 20,179,151, 75, 41, 72,239, 56,187,245,231,205,137, 70,117, 55,196,157,242,175,250,255,124,255,192,201, 43,153,110,251, 18,
- 72, 77, 78,185,118,116,129, 20,141,249,161,237,204, 75,133,202,176, 87, 73, 86,253,219,238,151,201,202,134, 72,208, 76,253,104,
- 40,152,229,180, 34, 45,244, 10, 20,127, 10, 9, 10,214, 82, 59,166, 45, 19, 78, 72,107,215, 31,154,169,129, 20, 39, 25,216, 56,
- 54,118, 11, 65,126, 66,224,247, 93, 1,207,124,192,112,175,243,203,192,116, 1, 76,175, 2,151,247, 45, 45,108,111,150, 41,131,
- 56,251, 9,153, 21,196,197,151,203,206, 82, 29, 21, 56, 40,104, 22,131,167,140,106,221,122,168,148,180,193,156,181,204,174,204,
- 86,232, 52, 3,165, 64,231, 25,116,159, 64,159,219, 1,251, 75, 96,243, 17, 80,250, 37, 35, 80,211,123,129,221,119,129,222,254,
- 27,160, 23, 94, 3, 94, 59, 65,158, 18,118,165, 96,152,102, 72, 34,136, 71,160, 14,201,134, 6,213,254,163, 30,134,163,205,191,
- 92, 71,128,172,245, 53, 44, 74,152,103,187,220, 69,220, 85,224, 0, 14,142,145, 36, 41,134,164,216,102,181,120,205,164, 24, 50,
-131, 79, 18,210, 4,240, 63,117, 6,250, 67,127, 17,216,125, 53,112,252, 93,224,201,143, 2,247, 63, 9,220, 59,181,225,225,213,
- 12,125,233, 10,229,222, 1,114, 28,109,100, 94,167, 61, 54,102,167,236,191, 6,251,197,183, 55,192,243, 27,224,118,182, 19,239,
- 73, 49, 11,225,161, 0, 87, 5, 58, 10,244, 24, 68, 30,107, 73,185, 48,232, 77, 3,112, 39,219,172,242,153, 2,186,157,129,211,
-111,177,144,157,195,111,128, 30,126, 6, 56,156, 24,205,238, 11,151,152, 15, 5, 83,166,214,193,114, 23, 18,231,194,180, 18, 20,
- 47, 87,165, 39,127,110,114, 98,156,164,140,247,126,215, 29,188,245,159,187,141, 71, 31, 59,226,226, 74,124,240,160,215,198,152,
- 90, 47, 56, 90,248,216,193,109,175, 13,191, 96,226,114, 37,130,237,248,194,230, 67,171, 95,171, 86,138, 92,244, 19,115,206,220,
- 92,158,246, 76, 58,148, 36,209,138,128,213,119,233,188,162,153,117, 24, 85, 1, 33,251, 25,188,241,205, 72, 36,142,197,207,153,
-253, 87, 20, 62,220,229, 77, 36, 90, 94,146,253,127,207,221, 21, 64,171,253,116,164,128, 13,180, 92, 3,193, 71,220,189,141,236,
- 38, 97, 23,110,224,117, 99,177, 79,191,190, 39,174,105,100, 43,213,117, 47,220,170,222,119,120,129,151,216, 38, 24, 43, 27, 95,
-241,127, 65,170, 45,140,170,238,162,116,151,156,184,240,173, 39,182, 97,133,211,149,181,109, 14,246, 94,156,144,109,157,142, 17,
-216, 76,109, 69,100,188,125,187,224,238,144, 21, 2, 7, 0,247, 69, 13, 9,221,105, 28,150,190, 44,194,186, 63, 88,119,229,181,
- 9,164,213, 31, 12,234,168, 79,249, 18, 59,220,103, 61,115,167,133, 35,183,141,220,233,102,123, 27,174,173, 57,184,114, 10,110,
- 13, 3,118,219, 29,178,231,161, 19, 51,132,185,146, 9, 55,156,144, 83, 70, 98, 83,199,199, 36, 33,249,142,125,195, 12,164,100,
- 97, 42,243,220, 61,164,180,200,230, 96,231,173, 16,249,167,187, 54,164, 55,121, 7,154,126,161, 20,197, 56, 30, 49,143, 71, 72,
- 49, 30,200, 52, 77,152,198, 17,243, 52,162,204,118, 47, 4,149, 42, 86, 2,182,202, 78,190,102,208,198,208,168, 25,200, 76,139,
- 14,133,152,151,239, 69, 39, 26,130, 54,219,155,104, 71,213,169,135,178,172,126,152,104, 15,156,181, 93,216,159, 86,109, 56, 74,
-182, 17, 60, 57,149,137,164, 83,222, 71,118,181,167,190,233,194, 95,133,154,233,220,122,121, 96, 46,138, 35, 3,147,135, 54, 20,
-175, 60,149,236,111, 27,103,197, 46,153,176,174,108, 8,250, 8,208, 79,188, 4,122,251,167,129,147,247,251, 9, 58,219,142,189,
-192, 78,244,131, 24,130,116, 22,160,116, 25,184,207, 2,116, 58, 88,168,195, 45,182, 29,237, 9, 3, 83, 2,237,109,239,171,179,
-223, 2,220,117,234,226,221, 41,164,234,242,136, 10,104, 44,208, 97, 6,149, 1,252,247, 78, 64,159, 28,160, 95,113, 15,248,138,
-255, 17,244,182,159, 1,206,254, 36,176,251, 17,224, 27,255,103,208,151,253, 95,192,255, 1,228, 79,220,198,217,189, 43, 12,151,
-123,156, 51, 99,220,248,107,210, 89,121,224, 9,111,186, 48, 96,248, 1, 86, 20,196,166,114, 62,198,154, 34,198,129,254,239, 15,
-138, 38, 8,226,214,201,108, 54,192, 80, 8,148, 19, 72, 18,232,180,128, 62,244,109,192,201,123,128,249, 8, 28, 63, 6, 92,124,
- 2,122,145,129,121, 0, 46,103,232, 75, 23,144,151,246,144,171, 9, 58, 22,155,178,132,128, 41, 62, 92,153,107, 41, 78,204,192,
-169,191,174,228,114,224, 41,110, 88, 65,173, 84, 42,145, 67,161, 76, 86,137,239, 61,206,144,220, 31,118,188, 0,202, 19, 96,120,
-155,177,231,115,178, 44,159,129,145,134, 45,118,105,194, 33,219, 65, 83, 68, 33,174,193,235,247,195,125, 22,121, 53,173,251, 66,
-121,115, 66, 72, 73,113,239, 23, 14,184, 58,159, 49, 36, 3,129, 68, 23,167, 43, 79, 53, 86, 66, 58,248,164,172,248,197, 85,168,
- 29,148,138,198,145,175,103, 52, 55,132,175, 58,175,160, 72,159, 85,238,145,172, 3, 97,154, 27,148,166, 66,132, 40, 58,205,134,
- 18, 61,160,137,193,208,133, 0,245,240,150, 16,166,205,106,129, 33, 59, 47,200, 51, 3, 91,167,222,157, 1,216,129,112,128,173,
- 48,194,167,109, 96, 36,127,250,107,254,128,217, 87,117,181, 84, 79, 93,253, 94, 86, 52,182,109,175,114,167,101, 23,216,194, 75,
-150,105, 99, 61, 18,168,116, 23, 97,174,240,160,213,168,191,147, 18,111, 29,226,164, 95,162, 48, 96,191,136, 73, 45, 91, 97,195,
- 9,156, 50,174,202,140, 89,154, 8, 78,160, 53, 38, 52,190,207,138, 71,213,165, 34, 29, 30,142,148,180, 17, 97,162,209, 46,184,
-206, 89, 23,175,202, 6,178,245, 8,135, 54, 64, 35,205,203,206,210,141,203,125, 39, 0, 47, 43,225,190, 40, 14,210, 94,163,202,
-171,232,214, 37,129, 52, 94,160,249,190,132,237,109,209,105,247,184, 91,186,121, 71,175,164, 43,239, 55,117, 97, 74, 54,145,125,
- 61, 39, 69,109,166,201,137,134,100,225, 99,179,154, 67,104,203, 38,232, 53, 43, 42,129, 57,161,116,154, 39,230, 54, 78,175,250,
- 22,226, 54,117, 86, 1, 51, 53,189,139,116, 19, 51,234, 19, 24,216, 38,202,224,197, 74, 65, 8, 85, 59,130,138,234, 21,136,144,
-113, 87,166,169, 85,231, 85, 41,207,157,254,198,218,106, 17, 1,198, 17,188,129,117,236,228, 36,189,107,204,247,106,103,235, 62,
-160,126,217,135,106, 29, 30, 59, 9, 87,149, 67,109,127,206, 76,203,203,187,251,230,217, 31,216, 22,186, 82, 64,147, 56,185, 51,
- 85, 85,113, 10,200,135,219,212, 82,133, 94, 80,141, 7,213,240, 84,137,161, 58,137,185, 82,137, 52, 14, 30, 17, 76, 80, 92, 78,
-132,219,108,161, 34, 86,123,152,114,103,138, 29, 22,187,200, 65,197, 42,225, 79, 78,160, 15,254, 42,176,123,175,117,235,228, 60,
-173, 34,246,135,131, 65, 94,212, 58, 68,214,170, 10, 86, 37,208,105,178,147,237,118,182,142,126, 78,160, 67,134, 78,198,129, 86,
- 4, 90,212,231,110, 3, 87,181,125, 20, 42, 26,154, 65, 85,208, 36,208,113, 2,141, 3,248,181, 29,232,227, 59,232,215,221, 3,
-125,243,127, 1, 60,251, 3, 64,250,215, 65,111,253, 86,224, 95,251, 73,224,111,255, 42,210, 47,158, 98,247,128, 49, 60,217, 99,
- 47,130,227, 96,241, 1,145, 36, 43,165, 75, 3, 35,172, 6, 95, 2, 8, 97,238, 18,197, 18,128, 13,123,230,179, 46,211,157, 2,
-131, 57, 40,144,102, 5,239, 50,104,147,192, 71, 1,255,145, 51,224,249,127,163,121,249,203, 99, 15,189,219,218,229,250,240,128,
-242,187, 7,148, 39, 35,100,154,141, 88,150, 90,129,201, 66, 70,234,181,120, 63,251,223, 39,108,221,246, 46, 53,236,214,104,163,
- 23, 45,190, 27, 46, 46,146,235, 25, 51, 83, 49, 61, 68,118, 61,195,165,152,176, 49, 61, 5,240, 41,144, 78,129, 84,128,179, 4,
-204, 9,124,220,225,116, 16,204,116,196,145,197,196,159,165,143,254,164,154, 66,215,123, 90, 99,215, 39, 16, 92,237, 11,126,245,
-111,158,227,106, 82, 36,167, 43,182,245, 75,187,196,231,213,164, 50,252,228,197, 1, 34, 83,183, 39,148,186,255,165,202, 23, 40,
- 62, 63, 86, 23, 6, 17,181,162,109,147,154,254, 84, 73,235, 46, 62,101, 23, 64,106,195, 63,151, 88,187, 69, 86, 0, 19, 82,209,
-186,118, 72, 29,161,171,142,174,185, 6, 0,250,190,207,138,210,201,121,222, 17,141,218, 51, 18,102,105, 52, 62,138, 61,161,147,
- 49,138,218, 52, 43,185,202, 57, 46,169,238, 14,115,183,141,214, 11,253,196, 11,203,212, 37,187, 69, 36,170,174,224, 35, 88,129,
-109,176,126, 93, 97,231,130,118, 66, 52,238,148,219,235,221,109, 15,188,145,222,254,213, 93, 82,197,207,164, 13, 10, 78, 57, 65,
-152,113,161, 82, 51,234, 75,183, 31,159,110,240,136, 23,175, 28, 7, 86,231, 4,144,231,149, 47, 39, 16,218,209,221,114, 39,112,
-102, 31,181, 55,127,122,179, 25, 26,144,209, 78,128,199, 0, 30,137, 73,134,142,226, 93,179, 94,119, 31,132, 72,186,237,218, 59,
-181, 34,186,203,170,187,140, 9, 55, 49,208,123,141, 2, 93,179,197,209,235,208,227,168, 83,239,115,111,181, 93,173,115, 66,188,
-150,136,161, 41,225,137, 40,112, 56, 32, 19,176, 29, 54, 22, 38,227,223,179, 20, 19, 33, 13, 62, 81, 41,228,235, 55,215,205,100,
-183,191, 77, 90,204, 82,189,246,138,177,137,122,149,100,241,154,217,100,165, 37,192, 47,168,157,220,135, 20,217, 8, 46,132,172,
-125, 97,208,239,229, 21, 46, 28,134, 39, 2,186, 78, 71,199,209,176,205,105,176,159,169,230,109,243,242,133, 11,197, 85,140, 17,
-226,247,168, 42,184,165,137,234, 20,144, 50, 27,255,189,203,152,165, 34,141,103,221,115,121,136, 22, 35, 66,173,227,122,123,242,
-205, 58, 71, 32,157,125,239, 45,245,210,163, 0,237,163,117,161, 65,116,214,142,191, 12, 21,211, 59,169,226, 48, 3,187,141,117,
-251, 90, 45, 63,161, 52,140,142,206,171,172, 47, 42,240,228, 69,224,153,209,201,113,212, 44,110,117, 58,160,214,177, 7,237,172,
-104, 69,117,105,180, 41,183, 1, 28,179,141,235,111, 3, 60, 22,136, 8,116, 95, 34, 53,160,181, 86, 9,158,181,168,245,235,232,
-172, 85, 78,194, 51,108,255, 60, 23,240, 52,129, 63,178,129, 30, 11,232,219,254, 18,240,134, 13, 64,127, 0,120,230,199, 65,223,
-253,211,192,237,159, 66,250,153, 29,240,244,128,147,151, 47,145, 14,214,113,206,153,106, 81, 67, 43,236, 71, 5,173, 36, 50,120,
- 30, 90, 46,111, 13,236, 33,243,216, 75,119, 88,102,242,241, 62, 41, 82,102,208,105, 6, 31, 51,248, 61, 71,224, 67,223, 15,228,
-175, 52,111,255,229,255, 9,156,255, 44,244, 0,211, 37,220, 63, 66, 62,117, 9,121,184, 71, 57,142,152,146, 39,207, 45,173,225,
-118, 33, 39,139, 67, 5, 49,104,151,128, 51,239,220,143,197,230,225,174,114,199, 44, 38, 72, 60,106,139,117, 10, 68, 64, 81,224,
- 56,251,114, 26,192, 3, 1,142, 71,160, 60, 2,232,237, 22,178,147, 29, 74,243, 85, 39,192,191,245,118,240,167,239, 99,251,159,
-124,194,243,227,169,142, 78, 85,177, 82, 88, 59, 50, 65,188,147,245,207,156,206,197,222,189,100,212,172, 34, 29, 54,181,239,164,
- 56,232,111,232,236, 58, 85, 14,103,124,117,242,194, 90,116,201, 49,247,131,185, 56, 76, 38,147,197,154,194,191,159, 57, 14,186,
-108, 53,203,132,182,122, 73, 41, 46, 62,203,147,214, 16, 68,170,237, 27, 55,162,216,184, 82,126,138,105, 12,145,241,220,181,165,
-198,193, 57,244,113,209,141, 93, 52,105,246, 17,173,248,165,155,188,179,179,177, 61,213, 75, 43,220,134,228, 65, 41,113,225,103,
-159, 2,206,157, 24, 45, 70,171,201,187,205, 74,110,163,200,124,167, 69, 31, 94,133,190,218, 18, 15,165,187,170,116,161,252,182,
-175, 61,119,226, 58,116,196,186,155,118,201,165,147, 69, 69, 63, 45,218,164,205,177,203, 47,162,216,161, 96, 67,140, 45, 19,198,
-210,237,238,129,197,174,188,215, 13,100, 10, 20,113, 23,204, 66,228,193, 40,246,153, 60,174,246,236, 92, 73, 27,214,165, 87, 21,
-187,251,244,137, 76,220,184,245,253,254, 61, 0,143,197,222,215,176, 72,233, 10,125,218,226,111,123,156,146, 94,123, 69,214, 94,
-236,165, 5,143, 32, 43, 69, 36,117, 83,162, 40, 24,230,110, 31,157,110,208, 65,244, 19,174, 30, 97,219,131,106, 42, 85,142, 13,
- 9, 59, 22,243,229, 18, 49,212,183,112, 19,137,157,119, 78, 44, 45, 12,104, 17, 91, 31,167,132, 6,149, 51,252,185,138, 63,211,
- 74, 38,248,166,150, 92,170, 20,205,218,242, 98, 7, 39,168,175,152,209, 9, 97,117, 33,216, 20, 40,241,170,168,161,102,253,236,
- 65,107, 61,140, 34,138, 18,181,142, 93,147, 70,167, 78,139,252,103, 68,230,108,163,228,181,157, 29, 4,162, 2, 71,204, 88,231,
-169, 49, 14, 47,208,194, 43,197,163, 46,146,226,137,227,239,215,142,182,228, 46, 79,223,183,131,217,133,121, 12, 85, 6,102, 15,
-159, 23, 75, 94, 35, 54,123, 0, 81,251,112,136, 95,142, 42, 98,112,155,216, 59,168, 98, 6,225,232, 19,243, 74,165,242,177,102,
-137, 20, 41, 34, 80,178, 75, 77,207, 1,189,184, 15,210, 3,144,159,182,116,181,254, 21,157,252, 66,159, 66, 53, 86,154,148, 56,
- 24,156,119,178,117,235, 79, 39, 83,225,137, 2, 99, 6, 29, 4,196,147, 21, 16,197, 31,138,136,101,202,214,150, 69, 54,175,138,
-212,215,173, 76, 0,207,130,114, 44,208, 91, 5,186,153,145, 62,126, 6,189, 53, 1,191,255, 39, 65,249,205,192,240, 53,192,233,
-247,129,190,253,105, 40,127, 24,233,111,109,129,183,222,193,246, 11, 15,129,125,193,145, 24, 19, 45, 33, 9,220, 89,127,168,243,
- 9,101,138,247,169,117, 17,234, 36,147,250, 96,137, 54, 81, 24, 0,222, 37, 32, 37,240,197, 30,244, 47,191, 7,184,251,199,128,
-249, 33,112,254, 55,128,139, 95, 2,174, 30, 0,151, 59,224,209, 12,125,105,143,114,239, 10,229,106,196, 68,132,105,110,121, 66,
-236, 12,159, 96,233, 19,179, 49,232,111, 39,224, 78, 2,110,123, 59, 95,196, 39, 33, 98, 58,132,105,134, 28,102,219,119, 85, 75,
- 12,129,166,226,197,140, 27,122, 54, 0, 94, 81,232,227,115,208,151,125, 30,192, 55,154,123, 33,121, 5,240,252,206,190,137, 95,
- 59,183,207, 91,118, 4,172,239,252,168,223, 49,118,227,207,208,153,132, 91,192, 14, 92, 66,210, 54, 38,212,174,139,169,123,113,
-189,174, 38,170, 99, 58, 24,208,134, 92,187, 17,164,184, 56,164,181,223, 62,101,199,245,106,119,169,244,107,130,232,102,195,137,
-226, 58,129, 8,129, 89, 36,177, 69,225, 70,118, 49,195, 47, 68,113,200, 76, 47,156,210,213,161, 10, 63,160,143, 65,112, 80, 11,
-195,200,220, 44, 86,210,237,140,103,255,251,185,139, 17,206,104,148,154, 68,140,172, 10, 33,131, 70, 73,116,159,164,139,196,178,
-133,137,163,107,197,121,117, 25,243, 77, 10,124, 93, 93, 77,206,218, 31,195, 3,238,132,188,224, 75,197,198, 71, 23, 69, 30, 85,
-164,104,115, 1,117,150, 69,119,227, 36, 54,158,254, 38,153, 13, 50,148,241,218,169,182, 5,205,126,154,213,116, 63, 3,181,131,
- 62,121, 69, 56,249,170, 98,175, 77, 80,135,174, 91, 23,255,172,156,116,175, 83,234,126, 29, 84,241,138, 90,150,249,236,159,239,
-242, 37, 72,114,180,250,255, 92, 87, 64, 90,145,187, 75, 32, 12, 93,227, 42,210, 13, 4, 57,138, 41,172, 51, 25, 88, 90, 48,205,
-154, 98,136,133,112,146,170, 51, 69,187, 9, 75,205, 68,247,206,160,248,116,119, 67, 6,160,217, 36,127,117, 37,238, 2, 53,108,
-249,236, 78,174,148,157, 24,105,234,243,136,150,102,192, 8,110,241, 13,106,203,136, 18,110, 31, 62,237,155, 94,152, 98,158, 97,
-147, 96,136,214,134, 86,107, 84, 48, 45, 8, 5,181,163,119, 97,185,174, 38, 16,132,229, 33, 84, 73,170,101, 70, 14,127, 57,199,
- 24,165,219,129,215, 15, 72,120,196,131,105,236,151, 57, 85,108,171,137,229,200, 2,210,155,194, 39,150,248, 98,241,167, 97,205,
- 73,220,213,189,106, 2,182,228,251, 67, 21, 63,196,216, 92,125,154,146,231,167,219, 97,164, 14,174, 97,136,135,191, 16,138, 6,
- 73,141, 42,234,140,176, 4, 83, 76,210,236, 18, 61,157, 74,252,110,158,196,246,200, 56,245,147,236,225,104, 52,185,205,155,129,
-237,155,129,139, 19, 16, 43,180, 26, 90, 75,179,168, 93,145, 43,180, 99,166,234, 18,210, 51, 54, 21,252, 27,146,123,168, 7,208,
- 85, 1,149, 12, 61,204, 45, 98,169,151, 41,160, 59, 41, 82,167,255, 35, 7,232,140, 5,170, 71,232,169, 2,233, 18,252,177, 83,
-208, 83,247,129,175,255, 49,128,254,156,193,106,182,127, 24,244,251,175,160,227,143, 35,253,194, 14,120,219, 83,216,188,120, 1,
-156,143,192,174,225,211,235, 67,230,151, 53,137, 85,172,236, 7,188,118,163, 51,168,235, 17,164, 13, 23,200,249, 58, 25, 64, 26,
- 8, 56, 77,224,251, 10,250, 32, 3, 95,254,239, 89,197,180,255,187,192,254, 87,128,195, 5,244, 49,123,164,234, 8,185,191,135,
- 92,142,214,104,231,214,237,176, 15, 48, 34,104,134,114,140, 90, 13, 96,131, 59,185, 37, 98, 60,113,182,193,100, 23,187,204,102,
- 99, 67, 20,110,226,104, 7,245,145,213,222, 85, 93, 91, 0,123, 2, 46,142,246, 30, 3, 54,126,247, 21, 16,254,223,199,192, 95,
-254, 60,228,165, 39, 24,183,179,219,219,155, 88, 16,171,195,113,132,253,189,235,240,145, 69,103,161,122,109,229,184,228, 23, 70,
-255, 0, 0, 32, 0, 73, 68, 65, 84,210, 28, 53,188,174, 31,198,228, 2,178,226,133,142,189,230, 14,165,209,230,129, 71,231,135,
-166, 4, 80,105, 94,247,232, 32,147,182, 61,229, 28,180,176, 32, 14,122, 92,113,158, 61, 63,158, 9,217,255,174, 65, 98,251, 65,
-152,252, 48, 18,215, 85,136,175, 14, 68,151,235,129,120,125, 6,247, 69, 31, 0,100, 31, 53,199,222,177,231,160,199, 81, 48,107,
- 20, 29,230,168, 40,220,104,135,117,127,219, 11,166,186,101,108,251,175,122,163,176,109,209,119,174,186, 59,186,246,158,208, 2,
- 64,147,212,125,251, 78,118, 75, 4,236,153,141,119,209, 29,208,241, 51,196,212,177, 21,129, 90, 31,117, 19, 85,218,243,181,117,
-197,251, 33, 50, 4, 86,176, 81,238,148,253, 67, 39, 28,142, 93,252, 12,155,202,140,221,239, 45, 94,255,174, 74,233,245, 15, 17,
-166,243, 68,129,123,170,216,135, 26,223, 63,163,250, 58, 54, 53, 90,119,228, 43, 47,217,235,241,216, 35,224, 72, 87,234,131,182,
-250, 37, 95,195,104,189,180,248, 6,193,223,250,217,161,170, 47,137,142, 61,168,111, 29,220,217,255,160, 72, 8,112, 25, 74,102,
- 81, 99,255, 84,132, 29, 59, 98, 45,227,162, 79,196, 78, 61,181,215,121,158,205,118,150,114,118,203,108,105,239,189,195, 96,140,
-131, 86, 58, 27,101,148, 58,220, 10, 29,234,167, 26, 95,130, 60, 25, 84,108,238, 45, 98, 90,227,150, 65,214,120,139,118, 43, 48,
-181, 34,176, 62,240,203, 49, 75, 83, 55, 50, 47, 9, 75,236, 8,215, 16, 77, 84,146, 88,236,193, 61,110,149, 72, 91,167, 47,221,
-222,163, 26,168,169,250, 37,169,250,209,109, 52,204,148,192,100,161,239,148, 76, 17, 15, 9,207,180,174, 34,248, 26, 25,169,207,
-170, 69,103,221,241,115, 31, 91,238, 42,156, 48,245,147,217,220,230, 42,178, 74,192,227,189,237,129,177, 3, 54, 47, 0,155,167,
-236,132, 67, 19, 66, 97,114,218, 72,113, 83,143,120,185, 28, 49,105, 57, 3,167, 25,184,179,113, 44, 20,128,125, 2, 29,179, 41,
-226,103,105,158, 27, 88,187,107,232,248,118, 4, 41,122, 97,150,161,111,249, 80,204, 51,239,115,242,244,247, 79,161,233,211,160,
-175,253,207,129,179, 31, 0,182,239, 3, 78,190, 7,244, 29,167, 80,124, 24,233, 23, 6,224, 45,183,176,249, 60,192, 87, 35,166,
-220,235, 8,204,134, 36, 21,233,168, 93, 74, 19, 53,208, 3,199,235,140,154,154, 22, 67,137, 4, 69,218, 24, 14,152,166, 25,244,
-237,111, 5,242, 55, 2,227,139,192,213,175, 3,101, 52,100,235, 67, 6, 30, 78,208,251, 7,200,131, 3,230,253,140, 9,240,238,
-171,225, 76,107, 81,182,105,196, 54,218, 50,232,204, 69,114, 57, 59,231,125,110,239, 65,180, 78,208, 74, 44,212,248,240,219,220,
- 23,122, 33,160,113, 2,182, 27,203, 38, 56,122,229, 16,175,127, 41, 64,154, 1, 18,232,217,140,233,214,132,227,209, 68,114,234,
-124,115,197, 82,253, 61,105,111,172,209,107,192,137,133,249,121, 65,205, 90, 30,157,212, 61,124,210,205, 24,109,108,109,159,175,
-112, 46,148,234, 71,215,182,183,243,216,202, 48, 29, 7,121,203, 3,139, 45, 97,206,215, 86, 97,227,108, 59,118,170,149,212,160,
-190,223,238,242,190,217,119,212,129, 9, 21, 34, 47,114,122,149,247, 50,168,102,205,110, 23,109,160,163,222, 11,158,252,210, 22,
-183,232,137,175, 32,102,255,253,224,207,199, 8,223,128, 86,228,151,152,214,157,125, 43,212, 59,122, 93,255,234,170, 46,198,227,
- 1,128, 41,175,115,129,101,183,106,134, 90,127,232,214, 81,170,234, 4, 55, 67, 77, 79, 98,235,149,126, 28,221, 94,143,126, 88,
-221, 10, 60,248, 56,253,212,191,255,201, 73, 81,125,144, 79,138, 98, 32,240,172, 85,248,101,133,210, 92, 37,198,126, 33,119,219,
- 59, 10,173, 6, 26,195, 96,246, 63,187, 7,240, 80,129, 71,218,255,189,215, 89,239,132,215,191,224, 95,239,207,172,135,241,180,
- 50,183,105,231,247,167,170,181,160,234,143, 15,189, 17,223,112,153,247,205,102,234,247,240,125,113,135, 6,250,169,236, 20,159,
- 42, 82, 88,118, 65, 22, 96,196, 98, 16, 26, 0, 27, 7,208,204,197,226,189,133,138,219,160,129, 73, 4,179,122,196,170, 79,145,
-173, 91,215, 58,245,181,123, 55, 1,172, 16,245,130,129,185,174,107,105,245,106, 69,209,135,222,214, 74, 84,109,214, 93,181,224,
- 32,169, 30, 55,188, 68,254, 80,247,185, 38, 32,216,239, 90, 35, 79,227, 33,173,118, 3,114, 74, 82, 8,229, 86,102,156,228, 25,
-174,232,222, 68, 20, 11,207,224,148,186, 93, 45,183,144, 16,138, 78,159, 91, 64,188,143, 22, 73, 45, 93, 75,217, 98,228, 56,101,
- 59,164,217,105, 63,153,189,244, 22, 55,233,115, 87,241,105,203, 94,215,235, 21,228,236, 42,217, 56,100, 40,246,122,234, 90,171,
-248, 36,109, 9,250,234, 37, 80,206,253, 82,120, 14,216,189, 27,216,254,127,192,110,182, 11, 59,212, 92, 97,107, 67,129,102,155,
- 72,224,145,119,252,187, 64, 59,145,249,163,239, 20,224, 50,217, 5,181, 79,166,138,244,184, 88, 83,110,251, 46,254, 40, 77,197,
- 92, 71, 46,237, 48,228,108, 16,159,116, 57, 3,229, 18,152,128,244,183, 78,160,227, 75,160,247,127, 24,184,243, 39,128,221, 7,
-129,147,127, 30,244, 29, 27,104,249, 97,164,255,103, 11,188,229, 20,244, 26,128,199,118, 61,149,193,119,205,125, 37, 77, 77,196,
- 13,182,175,197,196, 38,126,202, 90,197, 85, 82, 98,114,227, 93,227,134, 65,143, 1,122,129,128,183,189,207,110,187,253,111, 2,
-211,139,208,195, 99,224, 66,172,179,190,152,161, 15, 14, 40,231, 35, 38, 17, 28, 19, 87,142,188, 82,168, 76,131, 80,152,252,251,
-240,185,236, 54,128, 51, 98,251,241,209,198, 44,122,112,214,251,140,234,115, 15, 33,165,198, 84,104,240, 41,206,229, 12,236, 12,
-198,105,159,177, 55,250,233, 62,185,248,209,170, 92,161, 25,101,158,172,242,166,138,241,175,106,221,224, 88,151,197, 1,214,230,
-241, 13,230, 97, 2,190, 27,189, 81, 55,128, 51, 8,180,216,199,153, 24,145,205,123, 76, 75, 13,109,196,103, 82,143, 94,101,191,
- 68, 74, 99,100,115, 87, 38,146,155,189, 19, 90, 87,102,202,117, 66, 97, 31, 13,250,205, 82,164,185, 34,184,227,120, 7,195, 98,
- 16,131,147,192, 71,211,165,235, 24,215, 7,126,245,197, 67, 59,150,120,235,178,226,128, 86,106, 69,122, 4,174,204,157,143, 89,
-253, 57,239, 3,137, 34,140,101,115, 67,142,125, 37,238,173, 73,115,218, 46,236,254,222,231, 78,212, 23, 93,114,252, 57,162,150,
- 95,111,235, 10, 83, 26, 23,166, 26,121,203, 93,199, 40, 55, 20, 55,138,158, 30, 71,216,185, 82,241,138,129, 25,140,209, 95,127,
-170,226, 65,155,112,136,119,246, 45, 85,147,106,145, 39,157,215,190, 63,161,171,162, 62, 34, 80,253,159, 93,194,114,218,195,142,
-217, 7, 8, 9,214,162,205,155,193, 50,116,173,111,199,151,180,151,181,255,161, 11, 61, 73,205,102, 15, 61,148, 59,107, 4,215,
-227, 94,105,229, 56, 33, 90,105, 33,186,162, 58,194, 91, 90,120,146,214, 0,170, 40, 52, 98,180, 45,201, 62, 37,165,204,254, 76,
- 16,198, 34,152,167, 17, 74, 84, 1, 63, 80,159, 56,167,100,141,166,154,151, 92, 35,124,140, 93,127, 70,221, 78,202, 71,108, 53,
-208,139,121,241, 26,104, 47,213, 15, 26, 97, 21, 19,117,233,134,212, 86, 69, 11,240,167, 58, 88,170,211,166,229,240, 46,199, 87,
- 73,213,103,167,254,159,173, 51,177,228,170,230, 79,175, 94,244,240,165,219,156, 3,234,163, 13, 94,236, 8,219,135, 85,212,246,
- 39, 49,214,215, 58,191,243, 31, 68, 92, 62, 11,216,168, 35,101, 19,220,185,255, 79,184,249,187,235,115,170,237, 0, 66,135, 17,
-228, 10,152, 33,204,162, 30, 17, 75,208, 98, 30,107,174, 74, 99, 69,137, 52,181, 93, 6, 94, 62,130,246,159, 5,110,253,147,150,
-159,190,251, 10,224,244, 14,112,242,170,207,133,219,108, 95, 75, 76, 33,164,138, 37,232, 53,106,151,250,157,108,145, 65,183,217,
-124,238,167, 9, 56, 20, 80, 33,232,145,150, 80,106,114,245,207,212,118,117, 90,137,101,214,165, 20,239,188, 84, 10,112,225,162,
-187,164, 72,191,116, 10,197, 67,208,215,255,101,227,153, 15,223, 0,108,190, 19,244,161,223,134,158,255,239,224, 95,219, 0, 47,
- 40,114, 1,112, 57, 90, 44, 45, 58,225,106, 66, 85,200, 27,205, 34, 16,190,246,189,133,186,184, 72, 4, 62,152,243, 32,101,247,
- 15,159, 43,232,143,156, 0,219,119, 1,135, 87,129,253, 47, 2,135,207, 0, 15, 20,184,175,192,197, 4,125,124, 68,121,120, 68,
-185,156,113,100,178,176,130,154, 2,232, 81,150,108, 54,147,214, 78,145, 81,222,110, 51, 48, 12,118,195,158,187, 64, 78, 44,200,
- 69,103,255, 85,252, 1,146,149, 1,124,240, 35,100, 15,187,216, 15,197, 57,160,113,242, 91,149,173, 83,105, 34, 59, 47,182, 52,
- 19,102, 49,247,128,176, 29,144,202,192, 60, 95,199, 37,172,113,169,212,237,176, 67,173, 91,104,181,119,212,235,104,179,122, 96,
-121,117,144, 83, 51, 89,244, 24,214,216, 59, 6, 52, 8,157, 64,201,146,216, 90,119, 25,206, 5, 74,181, 46, 94,170,144,137,161,
- 89,236,115,233, 44, 5,245,228,185, 74,189,227,118,123,115, 38,112, 49, 81,224, 20, 24, 82, 93,130, 88, 24,138,169,187,176, 43,
- 69, 43,114, 26,170, 56,110, 89, 32,233, 13,157, 31,176,236,202,121,213,189, 17,154, 7, 92,213,133, 75,234,144, 36,146,250, 81,
-136,203, 55,225, 6,198,187, 23, 65, 76, 75,202, 98,241,169, 76,234,136,126,161,141,141,215,165, 72, 28,200, 13,163,219,176,180,
-198, 32, 79,186, 84,183, 39, 38,220,242, 29,242, 35,109,221,218,164,150,133,174, 62, 37, 8, 81, 96,181,175, 81,123,189,162,219,
-157,189, 64, 80, 16, 70, 63, 91, 83,119, 21,132, 93,242,216,197,160,214, 60,249,174,104, 91, 20,138,175,211,161,235, 13, 94,127,
-220,208,233,211,181, 97,187, 94,143, 26, 14,212,184,234,245,231,103, 69,252,187,105,100, 93,187,122, 63,147,215, 95, 87,187, 48,
- 45, 84,189,137, 88,130,104,232, 82, 72,234,180, 3,228,224, 53,191, 92,179,163, 98,197,157, 95, 44,230,111, 87,103, 6,216,103,
- 89, 22, 47, 70,124,190,169,118,156,188,180,223,233, 53,174,174,255,252, 22,235,170,244,250,133, 82,235,202,169, 90,161, 67,107,
- 65,213,170,232, 24,215,228,151,120,186,198,120,215,106,172,143,202, 32,229,228, 99,135, 14, 66,227,112,139,154,214, 85,230,110,
- 71,175,149,248, 73, 53,161,200,235, 53,181, 3,147,108, 25,224, 86,161, 25, 50,155, 23, 39,229,236,140,173,226,233, 98,102,123,
- 9, 4,106,132, 99, 48,181, 55,172,127,225,194,234,102,135,154, 98, 96,211, 0,212, 45,128,218, 3, 95,216,158, 92, 58, 77,192,
-200,208,251,191, 9,122,174, 0,186, 1,134, 23,140, 91,126,251,229, 70,114,153,220, 62, 87,164, 58,248, 56,249, 71,236,156,128,
-151,124,129,149,217,189, 35,100,161, 33, 91, 6,109,200,172,110,147, 88,106, 27,100,233,163,153, 1, 34,113,162, 30,170,152, 39,
-224, 12,147, 43, 90,139, 0,155,253,209,194, 86,102, 65,250,133, 91,208,227, 35,208, 55,252, 48,112,247,219, 0,254, 67, 64,254,
- 46,208,135,126, 21,184,255, 34,248,213, 13,228,169, 17,188, 7,134,163,162,108, 60,132, 34,160, 38,131, 5,210,105,169,128,106,
-228, 29, 97,251,149, 59, 28,239, 77, 56,124, 97, 90,104, 2,205,172, 64,254,186,101,224,221,103, 64,121, 14,152, 62, 9, 28, 62,
- 1,125,181, 0, 15, 8,120, 92,160,143, 39,200,171, 87, 40, 15,143,166, 51,164,198,170,103,136, 11,198,188, 0, 36, 11,113,161,
- 68,224, 76,118,161,223,102, 32,139,181, 26, 71,231,188,239,197, 46,115, 9,230,123,105, 40, 94,238,144,199,148,236,247,231, 98,
- 28,121, 36,128,199, 46, 89, 36,162,115, 93, 13,229,102,107,114, 70,168,248,231, 99,227,197,246, 88, 86,251,207, 21, 91, 35, 45,
- 84,209,173,189,144,110,151, 86, 15,172,132,101,128,117, 20,210, 97, 91,235, 97, 76,113, 33,178,143,154, 67, 13,223,157,128, 86,
- 7,233,226, 84, 84,223,191, 65,154, 46,130,250,175,231,207,143,106,194, 20, 11,224, 4,179,180,117,231, 0,119, 17,166,129, 27,
- 29,224,184,104, 44,233,120,212, 93,192,189, 99, 32, 14,244, 41, 70,240,145, 59, 79,215, 47,134,168,245,103, 89,238, 80,231,238,
-114, 56,106,203, 7,143, 93,115,133,163,116, 59,199,212,177, 0, 66,246,146,180,159,128,180, 81,119,175,157,239, 83,191,234,100,
- 35,132,166,161, 27,242, 3,211,234, 73,170,230,101,238, 24,230,179, 3,127,224,227,114,192,206, 74, 86,197,142,128, 19, 53,113,
-225, 72,228,197,128,113,235, 51, 20,165,203,160, 47,129, 10, 69,248,182, 9, 59,163,122,184,189, 45,240,195, 84,115, 51,162,144,
-236,127,159,171, 96,177,195,151,214,158,183,157,249,170, 95,202,106,246,165,187,116, 93,119,248,215, 19, 90, 42, 91, 93,181,125,
-237,228, 94,110, 93,105, 38,234, 46, 61, 46,103,194,194,129,181, 96, 5, 4,218, 92,122, 24, 81,151,200, 39,237, 25, 13,103, 74,
-157, 70,145,193,209,214, 69,138,101,142, 21, 16, 89, 50, 41,177,180,221,183, 83, 47,137,150,133,235,178,217,108,254,121,186, 9,
-162,235,119, 48, 92, 92, 87, 95,199,170,121,107,163,122,187,234,186, 72,111,255, 90, 57,178,203,147, 87,167,138,181,120,199,241,
-156,107,178, 91,221,230,184, 80,142, 9,156,125,156, 94,189,184,113, 97,248, 91, 85, 12,255, 74,145, 58,133,142,235, 30, 94,246,
-154,194, 6,191, 44, 45, 83,136,216, 70, 30, 80,177,177, 7, 90,162, 91, 36,224,196, 36, 96,157,207, 87,247,138, 94,161, 14,209,
- 53,177,118,234, 68,135, 98,136, 34,179,128,230, 12,124,246,147,192,187, 30, 0,252,188,197,160,238,190, 26,116,251,163,208, 77,
-105, 39,175,103,202,235,104,136, 81,241,253,138,238,253,199,126,149, 13,233,116, 55,217,105,114,151,129,243, 12,202, 51,148, 11,
-104,199,160,131, 93,236,117, 27, 68,189,242, 81, 59,179,107,219,213, 73,176,198, 61, 88,101,115, 60, 2, 15, 11,100,156,145,127,
-254, 22,240,202, 30,120,255,255, 13,122,203, 63,180, 81,252,237,111, 6, 62,248,179,160,255,229, 33,210,110, 7,188, 65,128,135,
- 19,184, 20,168,159, 60, 82,108, 2, 80, 52, 68, 87,118,136, 83, 1,240, 96,194,197,171, 51,246,179,214, 92,241, 29,155, 6,128,
- 78, 9,116,197,160,223,123, 10,122,211,115, 64,153,129,227,223,129,190,118, 1,124, 97, 11, 60, 60, 2,143, 39,219,163,191,188,
-199,248,100,196, 33, 51,142,165,211,123, 6,175, 94,235, 56,192,192,235,202,160, 77, 2,221,202,198,123, 87, 24,231,125,223,161,
- 97, 39,133, 30, 20,178,159,161, 71,159, 92, 12,238,107, 47, 0,111, 24,180,181,255,110,144,108,182, 89, 38,147,125,190,212,175,
-153,228, 33,204, 27, 24,193,142, 24, 12, 27,201, 77,197, 95, 11,183,252,181,209, 52,215, 49,109, 85,179,251,134,136, 74, 11, 71,
-146, 14,206, 17, 54,152,224,110,107, 99, 57,213,200,207,184,208,213,112,244,214, 33,122, 93, 34,253,254,218, 5, 70, 77, 60,230,
-138,245,210, 35, 99,125,231, 22, 30,250,200,206, 22, 93,100,141,199, 62, 47,226, 63,213,191, 86, 78,230, 79, 19,135, 66,145,235,
- 40,138,134,168, 79,107,177, 82,191,218, 42,121,142,125, 42, 35,157, 91,101, 88,236,223,181,139,221, 92,238, 96, 85,232, 90,135,
- 24,245,200,216,133,213,100,162,150, 72,215,253, 26,252, 57, 65,135,130,221,186,143, 62, 0, 71,225, 34,152, 98,255,172, 75,197,
-117, 79,145,107, 99,234,200, 97,111,183, 75, 80,242,138, 87, 77,228,137,145,165, 27, 19,251,233, 85, 35,107, 99,228,127,215,139,
-151,135, 98,255,174,185, 4, 4, 7,109,154,218, 40,238,234, 20,175,131,199, 8,140, 96, 93,188, 5,210, 5, 8,199,125,237, 74,
-216,185, 56,175, 26,129,253, 80, 9, 20,114,209,155,179,210,251,223,227, 27, 58,243,215,219,127,119,181,227,226, 47,109, 84, 66,
- 93, 68,223, 74,115,100,131,169, 81,230,250, 32, 35,189, 1,108,163,171,194,154,233,186, 48,175, 77,103,216,255,191, 96,170,249,
- 36, 49,225,113,142,191, 68, 81,214,126, 26,209, 2, 42, 38,236,206, 41,119,107,170, 46,106, 55,180, 72,221,228, 64, 87,118,221,
-197, 40,189,183,151,241, 42,238,208,149,114,150,235, 66, 45, 33, 49,214, 73,125, 94,124,104, 53,226,133,163,107,240,186, 62,102,
- 18, 21, 71,151, 22,194, 54, 50,100, 44,115,243, 47,182,214,203,109,106, 84, 95, 48,174, 23,184,184,247,189, 75,237,241,194, 2,
-157,168,164,150, 86, 53,196, 55,217,158,149, 77, 20,164,197,222,148, 89, 5,204,169,218,178,156, 33,212, 69,225,105,221,141,204,
- 98, 37,123,124,128,171, 29, 95, 60,221, 74, 92,128,117,107, 7,252,206, 19,224,240, 41,224,244,121,251, 40,108,222, 9,108,111,
- 1,219,243,142,105, 79,208,217,119,227, 14,233, 22,144,169,182, 47,103,208,189, 88,160, 13,192,217,198,160, 41,103, 0,206, 25,
-116, 72,141, 55,234,185,145, 90, 74,135,124,212, 5, 70, 84,187,241, 81,104,162, 10,128, 34,100, 98,191,177, 96, 83,174, 0,153,
-145,254,193, 41,232,119,183,192,251, 30, 2,239,249, 89,208,155,222, 14,122,231,155,161,223, 86,192,127,251, 2,120, 14,192,238,
- 0,121, 56, 65,142,179, 63,165,234,182,111,155, 98,176, 40,230, 4, 28,175, 20,227,163,201,124,181,126,184,108, 7,155, 36,164,
-228,134,196,153, 65,239,223, 0,195, 91,140,210,118,249,162, 9,227,206,103,224,201,136,242,218, 30,229,229, 61,166,251, 19,206,
-137,219,223,165, 38,118,138,181,115,188,221,217,127, 88, 74, 0,221, 74,192, 29,159,118,204, 98, 43,135,163,216,216,125,180,238,
- 92,199,201,225, 64,102, 95, 35, 1, 56,101,228,103,119,224,119,238, 32,159, 57,122, 96,183,199,178,130, 12, 64, 51,189,232,175,
-240, 96,183,102, 78, 86,245,109,168,222,212,226, 39, 68,114,175, 88, 47,142, 99,191,128,235, 33,195, 90,179,234,235, 46,122, 33,
- 62,181, 98, 41,245, 9, 93,171,118,128,169,169,176, 77, 32,166,216,116, 11,217,234, 20,224,128,129,116,118, 50,191,108,213, 11,
- 66,113, 74, 96, 5,135,112,219,163, 22,174,102,145,197,197,198, 93, 33, 18, 10,238, 56, 3,184,179, 10, 38,210, 5,155, 93, 52,
- 18, 26,215, 97,154,141, 2,201,193,148, 32,120, 16, 20, 85,186, 28,186, 61, 42,117,211,128,198,255,198, 53, 31,111,188, 30, 7,
- 7, 32, 69,178, 30,119, 99,107,243,122,219,139,181,131,226,148, 2,186,226,151,152, 56,173,175, 19,106,114, 71,123,211,174, 91,
- 95,159,143,189,129, 37,206,179,236,197, 86,129, 11, 10,125, 18,161,218, 60,239,189, 55, 41,200,113, 3, 1,119,200, 20,241, 79,
-212, 10, 70, 37,198, 36,197, 24,224,110,173,227, 53, 14, 53,192, 92,176,142, 63,107,155, 90,246,249,242,179,127,135,183, 59,245,
- 59,200,215,121,205, 86,191, 24,171, 7,140,136, 86, 30,248,215, 27,201,223,212,177,215,224, 22,255,220, 44, 46,249, 40, 45, 92,
- 83, 37,184,249,235,172,217,238,139,187,131,156,113,177, 2, 56,209, 10, 14,132, 78,115, 33, 90, 0, 98,204,165,120,231,205, 85,
- 67, 22, 5,170,168,184, 12,220,222, 67,213, 98, 54, 53,181,116,198, 33, 39, 28, 60,128, 69,231,210,105,211,204,115, 30,214,237,
- 94, 23,181, 12,198,105, 33,105,186,250,112,171,234, 2, 8, 23, 86,239, 5, 67,160,183,215,118,226,136,220, 95,222, 11, 43, 69,
-215,181,171,239,108,134,196, 93,229,205, 72,217, 46,116, 18,133, 56,101,103, 65,161,163,190, 3,247, 23,183,120, 71, 47, 22, 29,
- 70, 29,216,161, 97, 8,189, 43,170,163,127,243,252,177,179, 41,153, 18,204,212,102, 3,168,172,108, 59, 67, 54,145, 2,117,187,
-196,120,136,106,101, 44,132,145, 21, 3, 45, 71, 65, 10, 96, 2, 97, 26, 5,219, 39, 51,244, 41, 0, 47, 23,208,131,127, 8,156,
-125,192, 46,221,252, 20,112,114, 23, 56,125,140,106,226, 71,228,216,250,104,100, 38, 43, 42, 84,173, 8,185,240,241,244,206, 23,
-163, 27, 0,119, 1, 92,100,208,149, 9,188,120, 16, 72, 41, 54,242,214,235,130,105,149,182, 63,237, 33, 21,161,143, 40,158,168,
- 53,123, 58,214,246,201, 1,121, 63, 33, 29,182,200, 15, 79, 64, 47, 19,244,247,125, 1,244,182,167, 65,223,240, 12,244,188,128,
-127, 67, 65, 59,167,123,157, 43,228,114, 70, 81, 96,156, 20,199, 66, 11,143,173, 56,228, 98,164, 38,100,225,122, 88, 2,184, 2,
-248, 93,183,128,183,109, 1,121, 6,192,185,155,104,147,229,207,191, 58,162,124,113,143,233,254, 1, 79, 70, 96,239,194,162,210,
-209, 85, 19, 55,114,176,166, 21,248,154,201, 4,114,196,192,147, 17, 56,159, 0,177,203, 92,198,217, 58,245, 89,128, 99,177,131,
- 83,140,194,151,158,201,224, 63,254, 38,224,168,160, 79,222, 51,237,195, 35, 1,222,154,128,111,217, 1,211, 30,184,250,152,249,
-233,161,150,124,115,178, 74,238,112,227,108,124,126, 39, 68,148,102, 75,150,170, 33, 72, 21,226,228, 69,133,218,207, 34,101,181,
-251,149,128,213,248,123,156,154,102, 65,168,159,136, 53, 23, 71, 4,118,204,107,100, 42, 26, 99, 54,249, 8, 54,190, 7, 13, 27,
- 39,119,151, 15,147,137, 28,181, 41,164,251, 28,241,224,138,135,144,172,196,254,152, 21, 92,150, 59, 76,210,166, 56, 7,217, 0,
-100, 46, 77,137, 22, 48, 29,234, 24,227,234, 99,228, 44,237,178,184,150,138,230,226, 51,146, 54,129, 8, 82, 94,205, 15,143, 38,
- 65,123, 14,185,214, 21,197, 16,138,245,216,128, 57,249,112, 19,170,246, 14, 66, 51,119, 84,182, 62, 87,189, 58, 79,168,105, 40,
-215, 23,133, 84, 94,128,221,164, 19, 8, 91,106, 66, 56, 37,211, 25, 69,220,110,184, 8, 82, 45,128,216,255, 14,155,184,100, 54,
-254,250,222, 33, 81,129,150,157,203,140, 89,230, 58,246, 79,157,238,172,208,178, 43,182,129,147,107, 10, 58,249, 88,238,126,182,
-187,254,135,207,197,146,221,116,101,125,147,158, 97,161,171,120, 94,220,156,163,190,206, 26,232,221, 16,116,237,146,239,189,236,
- 88,169,185,151,127, 22,171, 34,224,154,181, 78,227,190,106,109, 49,215,176,161,229, 61, 0, 38, 23,126, 39,204,170,152, 74, 65,
- 82,173,233, 66,169, 91, 55, 36, 15,226,153,165, 56,103,189,205, 23, 44,122, 85,145, 83, 66, 73, 25,101, 46,109,246, 17, 14,176,
-133, 37,184, 41, 41,235,190,189,254,115,170,218,153,126, 53, 87,109,145, 62,247, 87, 18, 44,205,200,254,222, 74,139, 62, 87,102,
-243,169, 83,181,174, 81, 21,140,244,187,194,196,140,156,216,187, 8, 70,206, 25,156,147,121,104,231,217, 41, 87, 33, 46,241, 81,
-187, 56,218,115, 81,165,249, 7, 93,164,230,206,114,141,175,236, 55, 12, 90,191, 31,138, 25, 98,177,165, 95, 8,221,108, 20,202,
- 0,101, 16, 44,197,134, 96, 33, 46, 66, 12,114, 97, 76,237, 44, 84,160,106,160,254, 18,177,137,157, 30,138,184,137, 72,110, 93,
- 58,121,108,206,208, 23,127, 13,244,214,189,213,200,124, 98,214,182,211,207,181, 36, 20, 54,130,144, 42, 42,250,149,130,245,152,
- 93, 29,127, 14,208,203, 62,235,123,118,107,229,246,211,217,196,114,158, 1,142, 98, 99, 29,157,157, 15,223,193, 9,122,152, 70,
-139,150,109, 67,145,232,231,139,211,190, 70, 34,108, 39,193,246,201, 30,122,156,145, 14,179,135,116,100,208,219,206, 64, 31,184,
- 11, 61, 8,232, 11, 64,122,214, 22,142,186, 47, 40,123,207,114, 22, 64,192, 21, 0,163, 2,140,213,163,109, 16, 12, 48, 76,104,
-152, 0, 62, 2,252,245, 59,208, 16,201,107, 23,118, 67,157, 37, 96,231, 76,247,243, 25,135,163,224, 64, 9,135, 82, 3,235,236,
-107,144,219,154,130,192, 43,106, 23,123, 60,184, 91,216,132, 67, 11,112, 25,204,125,177, 14,116, 20, 72,237,216,255,127,198,222,
- 45,214,186, 44,187,239,250,141, 49,231, 90,123,159,115,190,239,171, 75,119,117,117,181,187,221,118,219,177, 29,108, 18, 59,177,
-157,155, 29,146, 16, 64, 40, 79, 33, 68, 81,128,135, 4,164, 16, 9,129,120, 8,239, 65, 32, 16,215, 7,224, 33, 40,188,192, 19,
- 10, 2, 9, 41, 70, 74, 32,196, 36, 16,133, 64, 18, 39,142,113,220,238,118,187,219, 93,221,213,117,253,110,231,156,189,215,154,
-115, 14, 30,198,152,107,205,125,170, 58,144,168,228,170,254, 46,103, 95,214, 90, 99,142, 49,254,255,223,191,109,118, 48, 81,113,
- 83,241, 87,239,176,191,125, 71,187, 45,126, 45, 93, 37,248,210,236,175,237, 27, 2,245,180, 47,182,147,238,214,136,117,168,176,
- 38, 81,119,119,160,133, 12,234,104, 19,208,100,100,243, 3, 16,205, 46, 70,110,250, 32, 80, 37,169,132,170,222,208, 7, 39, 97,
-189,160, 45,246,233,152,109,154,193,126,198,209, 7, 15,212, 20, 98, 45,237,215,160,250, 24, 86, 59, 76,100, 56, 8, 20,113,112,
-203, 50, 82,204,228,210, 55,222,163,100, 83,116,212,246,160, 93,147,173,127,240, 14,217, 2,232, 39,189, 57, 48,127,166,148,113,
- 4, 31, 98,188, 50, 48,222,215, 22, 98,213, 33, 93,172,201,206,208,238,191, 38,131, 24,118, 76, 69,235, 5,186, 79,249,242, 48,
- 57,232,221,120,119,188,108,170,246,193,130,215,226,160, 86, 54, 62,254, 94,236,107, 28,244,237, 98,159,126,105, 53, 45,131, 54,
- 64, 90, 80,136, 17,159, 6,244,160, 22, 81,154,212,109,220,190,154,119, 83,115,208, 51,251, 99,115, 59, 88, 8, 28,195,215,239,
- 78,164,180, 1, 76, 74, 93,247,156,140, 88,125, 20,219, 73,110, 53,254,220, 14,247,186, 68,180, 90,199,246,138,175, 89,102,133,
-167,230,124,130, 58,236,228,245, 1, 32,233,130, 14,103,151, 99,239, 81, 32,122, 81,184,135,206, 83,185,204,101, 31,133,114, 31,
-215,212,127,130,189,250, 19,211,225, 46,251,125, 29,212,152,194,190,126,234,255,187,108, 33, 50, 26,250, 7, 15, 24,219,109,134,
-157, 70,232,127, 71,109, 70,109,213,181, 97,145, 23, 66, 36,128,214, 90,161, 86, 14, 57, 83,115,166, 46,203,160, 84,237,141,222,
- 30,191,219, 68, 55,163,229, 37, 88,134, 45, 36,201, 66,173, 63,102, 65,192,238, 65,255,216,126, 62,180, 44,194,110, 87,218, 26,
-173,126, 52, 72,114,121, 10,245,184,186, 68,206,126,230,201, 41,145,167,217,111,242, 90,247, 93,222,166,164,216,227, 88, 85,186,
-221,109, 15,214, 27, 71, 86, 4,172,166, 35, 94,251,254,184,159,198, 71,101,171, 10,113,106,175, 36, 75, 30,105, 24,163,246,166,
-234,224,148,174,174,143,211, 47, 10,137, 11, 79,216, 32,104,150, 93, 0, 56, 4,157,136,193, 57, 65,185,171,232,243, 21,121,116,
-128,175,188, 11, 63,249, 54, 76, 63, 4,233, 10,242,247,192,205, 47,186,133, 11, 13,143,164,186, 95, 90,109,112, 74,198, 72, 41,
- 27,122,231,186, 3, 14,103,127, 10, 61, 14,255,250,107, 13, 57, 53,184,173,232, 57,209,104, 97,135,169, 99,102,142,255,109, 50,
-140,220,251,248,125,195, 58,198,124,163,249, 94,113, 85, 71, 32, 22,140,235,187, 51, 83, 49,248, 7, 74, 58, 42,150, 64,190,231,
- 6,126,215, 19,248, 95, 27,170,110, 33,108, 31,158,177,231,141,146,166,136,165,245,207,116, 83, 76,203, 62, 82, 22,133,137, 40,
- 52, 77, 32,207,240,197, 43, 44,221, 32,245, 29, 40,223,118,208, 75, 82, 47,172, 55,254,225, 23, 81,135, 56, 52,134, 14,172,143,
-133,119,247,182, 89,196,156, 87, 65,102, 69, 30, 37,111, 3,215,230,187,244, 90,177,197,104,119, 43,237,222,211,236,108,173,251,
- 67, 49,108,113,235,251,247,216,127,191, 4, 60, 61,161,175, 95,195,143,100,228,149, 43,176,199,208,190, 1,211,167, 65,174, 92,
- 52, 39, 2,231, 21, 78,234, 35,253,184,198, 71, 79,121,227,242,115,232,187,241,238,215,215,161,155,126,136,193,244,149,153,109,
-194,183, 54,140,194, 68, 46, 28, 63, 91,244,166,138,175, 39,242, 32,255, 61, 74,247, 32, 59,161,173,231, 37,148, 16,122,109,106,
-225,100,212,234, 93, 91, 11,141, 73, 7,185,172,178,147,238, 76,119,110,120,181, 93, 65, 91, 6,156,170, 60,200, 50,207,178,191,
-207,113,199,175,195,238,216,134,226,144,128, 41, 41,214, 4, 93,140, 22, 81,176, 23, 29,157,141,107,132,253, 64,128,108,209, 10,
-241,235,126, 40,185, 22,119,142,106,240,203,117, 40,238,189,240,204,161, 79,245,113,188, 31,232,235,112, 95,149, 65, 81, 95,135,
-169, 65, 31,183,143, 92,117,196,134, 60,123,255,188, 78,241,185,245,201,100,137,239,193, 26, 28,213, 2,147,171, 17,107,219,182,
-238,235, 62, 14, 12,115,136,138, 25, 28, 8, 34,112,101,198, 25,227, 44, 29,203,236,182,133,148,140,220,124, 12,156, 98, 28,255,
-188, 99, 98, 7,240,237, 39, 97, 85, 71, 69,249, 20,248,216, 3,240,170,248,159,127,106,254,119,209,184, 16,104,217, 39,116,216,
-246, 96, 74,242, 73, 49,171,227,218,169, 31, 42,251,225, 32,125,146, 16,220, 46, 27,202, 11,246,195,240, 35, 26,123,124, 44,193,
-126,239,153,236,109, 16,152,118, 91,143, 88,136,102,187,112, 78, 28,217, 44, 67,168, 82, 11,187,154,201,110, 23,221,142,114, 54,
-116,202,219,228,162, 81, 91, 37,155,215,200, 53,197, 51,163, 61,220,255, 71,231,190, 5,178,216,158, 99, 60, 28, 93, 68,190,139,
-129,208, 62,225,127, 29,214,107, 61, 81,179,119, 4,210,105,160,200,104,235,136, 81,158,122,234, 75,202, 19, 42, 48,165,228,169,
- 52,165, 96,181,184,234, 54,167, 61,166,117, 16,248,104,223,187, 15, 86,158,189, 11,217, 25,243,180,134, 73, 10,200,130,207,227,
-198,174,158,190,235,232,179,159,152, 8,152,164, 77, 49, 44,177, 92, 76,129, 13,109,214, 80,177,205,111,232,210,199, 97,227,101,
-182,185,118, 91,220,173,146,252,102, 95, 13,150, 38,172,107, 99,250,112,197, 94, 57,194, 55,238,145, 15,255, 38,188,245, 35, 80,
-103, 56,252, 38,228,201, 95,193,166, 53,210,195, 4, 73, 13, 59,143, 75, 40,245,180, 51, 51,172,130,205, 70,187, 19,244,125,129,
-195,226, 10,179, 43,133, 87,147,251,214, 75, 70,175, 93,189, 45,197,144, 82, 47, 18,212, 90, 40,224,123,129,237,227,223,106,178,
- 41,117,187,181,105,141, 12,224,170,208, 84, 48, 21,110,150,130,124,248, 18,249, 37, 65,143,134, 77,138,188, 57, 99, 63,253, 4,
-254, 90, 69,175, 27,114,179, 48,127,180,146,172,208,204, 85,195,155,176,164,139,103,162,203,153,155,243,222,147,250,232, 61,253,
-200, 12,175,205, 72,170,176,126, 21,158, 47,216,123, 13,238, 23, 56,175,113, 98,110,152,122,145,217, 60,170,109, 31, 51,183, 7,
-196, 53,233,208,161, 89,124,159,158, 92, 65,207,157,139,227,218,253, 74,187, 43, 78,118, 90, 43,245,108,145,179,220,173, 66, 70,
- 43,149, 85,141,212, 38,242,205, 1,126,230, 0, 63, 32,112,252, 45,206,231,124,244,127,186, 93,177,171,219,106,241,133,230,210,
-176,151,149,182,238,126,217, 58, 88, 62, 91,218,187,207, 52,176,199,183,180, 51,251,132, 16,146, 17, 12,209,117, 4, 35,254, 49,
-108,139, 93, 68,170, 98,155,105, 98,138,207, 93,163,221,153,227,254,220,167,113, 29,149,233,226, 79,171, 67, 16, 96, 12, 56,212,
- 70,110,183, 95,186,107, 40,171,187,205,205,234,142,141,221,114,161,183, 7,169,108, 29,222,106,195,238,115, 0, 97, 72, 29,112,
-208,114, 25, 69, 74, 20,222, 47,228,196, 15,253,233,215, 56,253,218,202,207,255, 79, 47, 88,180,110,185,240, 34,187, 55,125,204,
-207,110, 31, 43, 25,141, 73,125, 35,115,140, 29,250, 33, 58,246,195,224, 61, 47,195, 33, 97, 14,183, 76,141,233,192,194,254, 93,
-241, 9,133, 47,109, 5,209,182,247, 62,160,187,221, 34,187,117,233, 62,182,173,155, 23,168,139,224,124, 20,223,209,164, 30, 88,
-211, 11,155,110, 19,130,110,255,237,105,135, 26,118, 56, 84, 67, 87,208,168,230, 35,252,132,112,147,179,143,119, 91,221, 2,160,
- 22,115,241,219,102, 53, 30, 62,187,244, 64, 96,120,148,125,125,145,250,103, 38,240,174, 25, 95,110,178,225,127,215,161, 32,247,
-107,185,125, 12,129, 40,223, 85,241,254,208, 87,126, 97,249,250, 46, 52,191,209,197,253,208,223,223,203,192,212,143, 46, 50,122,
-210,173, 27,187, 46,184,240, 12, 53,173, 79,138, 26,144, 74,101, 74, 74,155, 18,101,141, 48,175,176,172, 89,232,197, 58,201,109,
-139, 56,189, 96, 68, 64,173,149, 82, 11,146, 60,103,189,172,235, 62,102,231, 50,215,100,131,196,116,191,185,236,159,128,141, 29,
-248, 54, 95,177,253,122,219,141, 72,241,190,122,188, 97,219,185, 21,131, 48, 47, 51, 60,152, 70,116, 93, 74,137,249,112,140,204,
-102,239,212,235,178,108,180,174,113, 28,214,187,100, 21,245,135,141,237,227, 57, 29,200,114,189,208,111,167, 50,147,176,132,196,
-120, 36, 58,119,207,136,238,127,191, 99, 62, 83,192,107, 90, 51, 68, 42,154, 52,190,196,120, 88,137,239,213,173, 4,127,217,243,
- 75,221, 46, 23,199,202,142, 63, 85,118, 85,124,231,199,247, 81,218, 25,225,100,141,171,219, 51,172, 87, 32, 87,216,215,254, 26,
-242,214, 31,243, 39,223,244, 37,120,244, 58, 60,249, 22,124, 71,246,150, 77,234,222,210,230,234, 92,247,136,254,172, 40, 58, 23,
-228, 37,200,119, 98, 4,252,153,131,255,223, 79,185,239, 90,106, 67,215,176,117, 88,130,243,128,100,221, 66,225,194,198, 22, 94,
-245, 58,140, 10,155,237,161,136,219,174, 51, 32, 33, 96,112, 90,224, 91,183,228,100,232,141, 96,250, 8, 62,115,132, 31,187, 70,
-254,247,149,244,202,204,244,209,137, 71,207, 43, 77,109,139,214,236, 87, 69,177,184,217,197,200, 41, 56,222,193,193,151,159,188,
-114,170,222,169,120,200,202,211, 21, 62, 90,225,105,161,125,176,210,158,158,169,167,194, 34,187,224, 40,244,128, 27,112, 38,201,
-131,174, 44, 43, 50,137,115,222,175,162,226,220, 45,112, 46,212, 82,105,167, 74, 91,156,202,103,167,230, 73, 69,253,230,173,248,
-159,157, 4,121,169,164,215, 15,200,207, 94, 33,191, 45,193,107,223, 15,135,159, 5,251,187,240,248, 10, 30,253, 33, 79, 59, 97,
-129,245, 12,207,103, 56,249,123,105,193,106,110,131,235, 35,133,229,176,213, 88, 89,109,247,207, 78,112,179,225,193,218,134, 29,
-120,191,207, 90,252, 55,131,208,173,197,110,116,251, 59,163,160, 31,196, 41,136,185, 19,228, 34, 67,189,239,254,182, 60,244,200,
- 56, 0,241, 49,188,121,241,213,176,207,140, 99,250,115,172,138,114, 40,249,123, 71,166, 49,146,181, 40,248,173,249,195,114,137,
-247,144,135,177,234, 22,192,216,125,230,106, 14,111,106, 59,161,178, 92, 76,232, 4, 45,198,231,127,112,230, 83,127,234,179,124,
-231,223,125, 59, 44,100,186, 17, 40,221,158,231,175,127,244,208, 39,118,133,123,127,228,215, 10,171, 6,139, 61, 62,199, 28,121,
-240,121,155, 20, 94, 10,255,186,176, 49,197,251, 28,133,124,187,132,218, 6,145,217,131, 76,249, 49,161, 79, 60,181,176,170,231,
- 74,180,177,131,141, 66,127, 6,212,132,169, 55, 58,106, 78,245,139,233, 94,137,213,200, 58, 0,121,196,218,246,185, 46, 64,221,
-158,183,190,210,172,145, 24, 54,171, 70,132,109,227,208,140,123,115,189, 64,137, 9, 0,230,107,178,113, 85,209, 15, 61,115, 92,
- 87, 19,194, 1,227,213, 16,170,126, 20,135,236,105,216,239, 86,219,225, 64, 29, 73,108, 3,195,236, 99,180,188, 79,240,168, 63,
-220,185,203, 39, 2,107,228,193,129, 96,224, 52, 6,169, 84,135, 73,212, 40,251, 22,121,200, 55,176, 75,229,189,236, 1, 65, 18,
-153,227,158,175,145, 72, 8, 53,188,109,210,247,225,253, 61,181, 29,242, 42,195,200,193,164,139, 63, 43,173, 22, 44,133, 83, 70,
-118,135,217,199,135, 23, 97, 27, 31,222,153,116,177,182,141,244,184, 75,101,193,197,103,170, 67,117, 31, 79,204,162,177,234, 22,
-154, 53,239,212,181, 83,225,162, 70, 77, 41, 49, 29, 15,190, 55, 87,197, 90,161, 45,107,100, 53,142,175,115,143,147, 75,227,130,
-127,179, 39,200, 38,102,209, 62,254,136, 27,184,191, 72, 29, 80, 12,210,153,238, 12, 62, 19, 11, 96,140, 73, 88,218,162,179,219,
-104,114,187,186, 64, 52,147,181,120,102,238,134, 55, 77,180,230, 9, 57,157,102,183,239, 88, 90,252,247,136,118,244,132,170,114,
-106,200,179, 21,125,243, 6,254,254,219,200, 79,124, 21, 14, 63, 10,211,235,112,253,121,120,229,155,142, 43,213,206,236, 12,238,
-120, 53,247,160, 7, 75,222,215, 48, 70, 43, 6,147,145,146, 56,152,230, 74,225,149, 12,175,206,126, 92,191,173,200,148,144, 67,
- 69,170, 98, 75, 95,137,184, 0,168,218, 3,161, 92,221,213,193, 45,212,146, 59,220,223,127, 61,137,231, 97, 91, 92, 12,122,119,
-130,183,141,233, 23, 50,146,179, 43,137,126,248, 10,222, 61,145,254,110,193,222,186,230, 81,121, 9,247,198,253, 72,136,136,182,
-167, 4, 24, 38,107, 24, 17, 42,104,155,224,211, 71,191,251,159, 23,231,203,191, 40,240,188, 97, 79,207,180,119,238,168,239,156,
- 57,173, 94, 76, 74,187, 84, 92,111,240, 37,219, 39, 47,106,230,142,138,163, 34, 61, 24,103,109,240, 34,138,248, 82,177,123,215,
- 61, 88,169,212,210,252, 80, 19,123,232, 52, 59,121, 80, 94, 10,249,250,128,254,204, 53,242, 59, 21, 94,255, 18, 28,127, 7, 60,
-250, 97,104,191,232, 18,254,252,134,115, 72, 85, 93, 0, 0, 32, 0, 73, 68, 65, 84,223,250,245, 4,167, 2, 47, 38,184, 95,105,
-247,171,103,168,199, 94,183, 67,153, 44, 68,130, 45, 78,220, 73,205, 31,218,195,216,118,203,188,139, 40,223, 60, 20, 17,141, 81,
- 92, 69, 46,246,145, 41,212,236,155,142, 37, 30,188,199,188, 25, 19,252, 48, 5,148,102, 14, 58,209,216, 1,246,131,127,219,145,
-171, 23, 65, 50,253,220,105,126,224,233,211,191,201,220,221,176, 70, 92,234, 20, 42,226,142, 65, 61,197,132, 70,101,232,214, 69,
- 54, 55, 74,221,198,235,182, 17, 26, 77, 46, 19,198,198, 17,235, 57, 11,191,248,246,153,175,252,142, 47,243,206,169, 81,242,160,
-180,111,123, 23,165, 54,132,214,236,228,219,173, 67, 86,204,187,210,104, 2, 90,136, 46,171,250,123,201, 15, 8,115, 41,246,215,
-141,198, 57, 26,146,212,181, 41, 24, 41,104,149,107, 32,114,203, 16, 94,147,135, 17,189, 61, 40, 64, 61,188,165, 13, 10,103, 17,
- 15, 70,233,175, 97, 17, 35, 53, 97,214, 93, 44,136, 53,154,213, 77, 85,191,142, 97, 44, 18,223,175,217,214,165, 75,240,188,187,
-206, 66, 27,220,168,176,138,146,178,178,214,198,201,154, 31,228, 6,157, 71,126,160,148,159, 6, 58,222, 97,136,170,189, 53,191,
- 55,207,248, 65, 69,255, 81,133,119,176,120,201,102,177,147, 61,206,214,246,231,127, 26, 86, 40,233, 19,236,111, 23, 42,240,255,
-207,162,127,169,253,224, 31,137,175, 29,138,228, 32,156, 67,253,117,106,107,241,217, 23,212, 52, 82, 22, 53, 38,101,117, 72, 82,
-220,201,115, 26,240, 24,179, 65,148,230, 32,127,102, 81, 74,210,143, 71,250,142, 25, 5, 49,126, 55,227, 1, 65,199,235, 27, 49,
-173,186, 32, 1, 92,188, 87,217, 18, 4,205, 46,231, 28, 35,243,130, 62, 13, 84,118,110,123, 18, 97, 58, 30,200,121,114,243,253,
-186,210,150,101, 51,196,143,126,112,137,211,189,198,194, 80, 6, 99,188,196,155, 87,235,102,122,219, 82,216,186,165, 67,182,227,
-190,108,226, 56,137, 83,148, 14,129, 48, 18, 66, 55,105,145,187,206, 78, 31,186,200,207, 85,104,154,209,182,110, 97, 36,116,113,
- 68, 43,174,218, 86,139, 8,203,222, 17,201, 54, 89,232,236,229, 5, 88,170,146,111,213, 49, 8,223, 17,236,237,255, 14,249,193,
-223, 28, 32,154,239, 67, 30,255,173,128, 85, 93,178, 41, 77,125,207,220,106, 48,225,107,116, 32,217,104,201,124, 92,253, 29, 65,
-166,228,119,217,227, 12,175, 39,120, 49, 35,165,185,111,124,109,200, 65,161, 42,170,141,244, 80,144,189,183, 12, 91, 81,111, 35,
- 55,112,120, 0,166,234,163,185,151, 49, 98,189,185, 59,163, 95,123, 65, 62, 38, 56, 26,252,224, 53,252,212,171,240,110, 33,189,
-231, 21,247,250,237, 91,210,226,147,232,206,121,111,125, 12,220, 15, 70,102,112,111,232,167, 50,242,102,134,251,213, 69,108,239,
-173,240,108,197, 94, 20,234,123,247,180,119,110, 57, 61,175,188,192,155,248, 90,247,211,127,239, 96, 71, 94,245, 22, 5, 60, 43,
-122,157,145, 39, 49,143,190,109,112, 50,218,185, 98,119,149,182, 84, 90,105,180,210,188,139,139,167,134, 22, 33, 29, 18,106, 9,
-101, 34,253,236, 19,228,167,129, 79,125, 1,110,254, 41,184,250, 41, 79,222, 75, 97, 97,179,219,120, 1,247,216,121,133,187, 35,
-237,174,210,238, 43, 69,246,232,210,222,221,173,163, 88, 77, 26, 71, 21,166,201, 11,156, 68, 18,108, 22,219,114,177, 51,123,199,
- 36,195,200,119, 79,180,178,205,186,214, 39,104, 89,118,254,205,228,146, 17,166, 8, 20,233,157,185,198,153,186, 14,237,144,137,
-109,215,159, 14,254,172,120,246, 92,104, 1,164,237,153,240, 50, 20,209,222,149,118,139,149,170,176,110,129, 49,251, 3,210,226,
-243,104,195, 92, 52, 17,168,229, 46, 26, 77, 46,220,235, 35,102, 17,227,221, 72,204, 35,251,103, 35,173,131, 82,246, 70,160,155,
-226,114,116,251, 15, 65, 58,189,251,190,183, 61,142,225, 44,126,125,245,177,249, 33, 10,215,213, 54, 94,222,119,179, 59,244,134,
- 77, 23,116,148,189,211, 61, 5, 22, 56, 43,204,205, 29, 37, 13, 15,214,185,136, 92, 21,219,184, 1,237,129, 13,171, 14, 44,250,
-210,237,117,157, 5,208, 44, 4, 90,126, 72,234,180,178, 46,158,244, 8,137, 78, 48,219,249, 29, 19,178,137,239, 92,160,232,211,
-200, 87, 85,169,147,240,172, 26,169,213, 13,125,173, 92, 38, 2,110,126,123, 51,238,205, 11, 92,143,201,205,230,177, 10,175,170,
-112,107, 54,232, 34, 46, 15,102, 15,197,108,124, 2,150,119,196,192,238,184,100,249,255, 5,173,185, 40,238,221, 49,241, 96,124,
-255,241, 0,158,125,226, 85,135,189,143,134,199,123,211, 3,217,160, 12,176,248,118,154, 55,180,118, 33,110,145,139,156,248,174,
-117, 32,116, 76, 94,136,117, 83,181, 39,129,156, 50, 69, 19,180,117,143,151, 29, 87,205, 92, 38, 59, 94, 88, 56,101,176,183,198,
-184,199, 62, 86,172, 71, 55,201, 78, 46, 20,233, 41,111,251,100, 55,239,187,239,230,113,134,135,153,124,188, 34,231, 68, 59,159,
-105,181, 92,188, 16,177, 75,190,110, 47,212,105,195, 70,201,198,235,238,170,248,144, 21,122, 40,252,118,234,105, 23, 56, 6, 98,
-143,216, 57,242,253, 82, 81,188,107,115, 50, 80,195, 84, 54, 46, 61,244, 3,133, 51,120, 83,200,117, 37,130, 96,104, 1,212, 81,
- 37,137, 71,178,118, 84,167,199,123,122,130,156, 13,240,189, 42,194,170,202,189,192,225,233, 9,125,166,112,117,196,254,254,223,
- 65,190,248, 27, 32,111,130,188, 10, 87, 25,142,134,204,186,181, 82, 22,119,178,117,175, 82, 11, 90, 92,143,131, 43,134, 93, 11,
-237,110, 33,189,167,112, 35,158,226,118,152, 28, 6,115,154,144,165,160,167,134, 29,156, 97, 46, 39,127, 95,170,251,133,121, 73,
- 80,218, 31, 10,151,227,155,253, 33,223,173,240, 32, 72, 49,210,135,247,240,171, 66,190,137,133,223,247, 63,130,223,243, 24,249,
-249, 70,154, 3, 10,242,173, 91,244, 92, 57,171, 68,142, 65, 15,249,136,194, 30, 64, 54,253,109, 87, 48, 37,120,247, 4,239, 23,
-248,176, 98, 79, 23,234, 71, 39,202, 59,119,156,158, 87,158, 54,120, 81, 61, 63,186,180, 61,193,204,199, 97,187, 74,215,245,141,
-222,137,104, 86,228, 70, 93,165, 46, 2,119,133,118,183, 14, 54,182,234,187,245, 98,155, 42, 61, 37,225,240,138, 34,166,232, 71,
-202,244,123,158,192,239, 86,120,227, 51,112,243, 71,225,250,183, 67,122,205,203,133,253, 26, 76,143,156, 31, 64,117, 8,205,189,
- 23, 40, 91, 10,182,182, 13,194, 65,108, 87, 84,108, 27,231,117,240,220, 85,246,215,188,244, 2, 43,206,197,239,132, 51, 77,254,
- 17,155, 93,210,209,210, 0,183,238,153, 5,157, 1, 49,169,187,235,166, 96,170,107,222, 59, 44, 27, 70,244, 77,217,196, 62, 22,
-124,239,162,157, 26,108,172,131, 72, 85,185,132,126,116,216, 76, 71, 63,183,225,129, 57,169,123,115,171,117, 47,249, 46,166,235,
- 22,170,132, 68,199,214,194,110, 25,159, 73,243,137,142, 4, 70, 53,133,210,184, 63, 88,167,176, 71,166, 16, 76,246, 14, 63,133,
-114, 59,162,145, 28,207,178,141, 93,119, 17, 37,114, 41,202,187,141, 67,120,239, 58,167,240,105, 47,195,196, 96, 18, 23,118,246,
-248,212,145,145,158,250,225, 50, 10,246, 42, 67, 42,156,176,129, 99,232,124,252, 14,113,161, 99, 97, 47, 11,155, 92,252,251, 62,
- 34,214,136, 92,213,176, 95,245,103, 99,194,152,172, 81,194, 93,178, 91,233,236, 99,214,174,106, 70,193, 56, 53, 97, 73,209, 85,
- 55, 99,166,241, 24,223,217, 44, 42, 44, 45,128, 42, 67,183,105,155,109,215, 63, 47, 98, 10,213, 15, 79,136,235, 14, 94, 65,120,
- 79,132,151,151,219,243,139,240,145,203, 49,187,241,113, 42,249, 88, 47, 2, 64,246, 9, 44,130, 11, 42,229, 39, 40,222,101,236,
- 94, 47,244, 12,131,148, 99,176,226, 61, 44,244, 91,126,187,236,113,214,163,134,204, 34,196,203,137, 2,186,231, 55,116,146, 92,
- 36, 22, 73,136, 29, 77,221,181,142,133, 91,203,246,231,109,202, 57, 26,206,117,211, 76,140,209,213,221,171, 79, 28, 6,250, 74,
-120, 44,174, 54, 40,227, 62, 17,191, 59,172,102, 68, 46,167, 39,163,184, 47,239, 66, 55, 15, 96,153,175,174, 56,222, 60, 66, 13,
-214, 82, 49, 89, 54, 30, 50, 54,224, 96,199,209,206,112, 44,219, 22,251,125,116, 46, 50,124,113, 93, 16, 23, 31,148, 10,153,206,
-185, 13,220,234,166,126,207,155,100, 6,243,215,230, 22,161, 72,136,139, 14,187, 43,130, 84,117, 51,247,183,148,227, 20, 94, 7,
- 64,155,143,239, 69,133, 89,125, 84,149, 69, 93,104, 21,187, 61, 83,165,102,199,100,158,109, 97, 61, 11,249, 37,216,103, 30,193,
- 55,159, 97, 31,252, 37,228,181, 63, 14,114,240,167,114,210,253,248, 61, 68, 36,153,183, 75,126,114,138,163,188, 53,193,146,250,
-136,183, 1,207,238, 73,239,167, 24,193, 11, 60,158,224,117, 67,238,162,168,227,105, 65, 84, 69,215,186,141, 41,229, 99, 8, 82,
-219, 18,201,218, 5,220,146, 13,133,216,247,160,247,236,170,183,199,239,222, 33,191,148, 72,143,131,212,246,249, 43,248,241,138,
-252,125,200,159,143, 86,229,131, 59,218,125,243,142, 43,126,198, 5, 73,234, 4,242,165,217, 91,164,119, 87,120,231, 76,187, 47,
-212, 15, 78,212,247,238,185,127, 86,121, 86,133,167,213,184, 47,134, 85,185, 16,196,169,218,118, 0,236, 74,105,237,236,247, 89,
-209, 87, 39,127, 10,159, 10, 60,107,216, 18, 97, 63,231,138,157, 42,165, 52,106,140,196,105, 62, 10,151, 44,200,251,144, 62,117,
-133,252,222, 25,222,184,134,171, 63, 0, 55, 63, 13, 50,131, 62,130,122, 15,167, 95,129,116, 19,173,223, 45,172, 95,246, 15,232,
- 84,225, 84,169,181, 5, 19,168,167,145,237,174,140,254,136,243, 61,185,109, 58,146, 37, 62,235,154,246,128,162, 67,238,122,221,
- 93, 24,168, 92, 38,177,233,224, 62,201, 2,179, 26, 7,132, 89, 93,144,168,182,187, 53, 82,188, 38,213,157, 61,190, 67, 90,188,
-160, 53, 31,161,237,116,190, 40,138, 73,135, 84,174, 7, 10,101, 29,198, 94,169,249,123,104,197,167, 52,105,219, 37,126,188,235,
-235,157, 84, 27, 12, 59,221, 51,124,165, 78,194,234,118,157, 37, 14, 9,217,130,129,207,158,220,216,215, 14,125,228, 93, 59,107,
-162, 55, 78,245,242, 64,178, 29, 12,163,219,236, 31,231,201,188, 51, 31, 5, 98, 41, 62,156, 49,109,210, 6,165,180, 70,150, 68,
-199,176,118,238,144,176, 49,161,252,121, 40,193,178, 24,124,245, 50, 88, 12,235,224, 20,105, 3,176,166,110, 10,106,247, 72,247,
-200,212,214, 53, 68,253, 61,119,101,181,217, 37,183,195,220,239,222,197,188, 69,140,181,117, 26,158, 95, 23,199,232,252, 23, 81,
-214,156, 57,181,198, 82, 43, 45,136,151,122,129,184,253, 56, 91,125, 9,173, 78, 18,225,177, 24,207,251, 65,244, 1, 31,227,227,
-133,134,125,138,123,241,252,145,193,138, 43,219,161,201, 46,214,225,114, 33,132,227, 19,121,242,118, 17,169, 59,162,130, 31,172,
-214, 47,166,182,163, 83, 52,199,180,100,200,117,219,242,206,205,122,236,170,215,170,108,221, 85,149,176, 0,203,140, 2,242,237,
-136, 35,234, 17,225, 49, 73,158, 82, 34,205, 19,165, 44,113, 61, 63,160, 42,110,127, 71, 28,114,205,134,116,188,161,155, 55,185,
-108,205,226, 90,223,119, 15,163,221, 80,246, 67, 65,219,185, 34, 89, 6, 27,219,124, 60,114,245,248, 21,242,225,192,249,131,247,
- 40,167,123, 31, 51,200,195, 14,209, 30,124,248, 59, 61,106,159, 96,200, 0,222, 31,113,173,251,254, 93,163, 43,239,161, 43,158,
-165,221, 16,139,164,155, 36, 23, 9, 52, 26, 65, 49, 27, 86,182, 43, 50,107,137,240,145, 20, 10, 97,143,198,147,240,195,170,169,
-147,207,180,109,235,130, 89, 93,156, 86, 55, 98,195,228, 96,142,174,140,159,175, 89, 21,230, 23, 2,247,130,220, 63,193,126,225,
-231,145,159,253,253,160,175, 70,250, 78, 60, 77,102,245,153,221, 54, 19,143, 95, 43,182, 17,177,164, 25, 90, 26,173,234,230,151,
-209, 15,207,200,147,104,229,110, 50,188, 38,240,114, 66, 78, 21,213, 70,171,174,136,215,185,146,150, 30, 77,250,144,216, 53,192,
-106,236, 65, 0,134,109, 3,146,109,223,182,169, 66,139,241,248, 91, 47,145,127,144,208, 39, 17,105,250,155,174,225,100,200,215,
- 32,127,111,131, 12,243,219,183,222, 13,203,112, 93,137, 63, 61,229,160,232, 15, 93,193,211, 5,222, 59, 83,223, 61, 83,159,157,
-168, 79, 23,238,111, 43,207, 26, 60, 43,198,237,234, 15,229, 58,100,124,107,116, 68,132, 31,125,180, 81,106, 22,228, 38, 33,143,
-226,105,185, 86,236, 28, 59,244,147,239,212,203,218, 28, 26, 18,226,161, 41,246, 38,246,162,162,118, 36,253,190,107,248,172,192,
-213,143,195,227, 63, 18,237,193, 11,224,173, 40,224,207,224,250, 71,233,137,232,180,251,120,106,155,179,228, 67, 36,103, 38, 23,
- 29, 79,191,137, 59, 73,174,131, 80, 38,221, 69,244,214,132,163, 42,143, 94,203,220,222, 22,238, 79, 49, 94,237,154,152, 1, 82,
-211, 49,159, 83,116,234, 7,109, 28,146,112,200,198,193,134, 34,221, 25,240, 93,203,208,115,160, 85, 28,112, 19,123,129,181,237,
-248,224,169,238, 59,238, 62,157,234, 32,156,180,209,235,252,201, 82, 91, 15,156, 9, 10, 93, 27,138, 94, 20, 12,135,203,216, 86,
-252, 54, 46,184,236,140,241,237, 59, 84,245, 12,136,197, 56,100,119, 49,220, 53, 99,109,126, 8,107,181,243,187, 45, 16,175,187,
- 53,172, 61,120,176, 79,230, 22,188, 49,253, 76,147,131,110,182,247, 38,123,102,121, 25,196,109, 26,157,105,223,163,223,196,247,
-181, 12,200,229,126, 48, 40, 15, 15,196,241,123,231, 88, 33,230,152,108, 60, 84,201,111,106,247, 11, 38,254, 30,122,196,246,222,
-124,196,111, 3, 6,116,140,123,232,222,248, 62, 66,110, 23,196,181, 29,155,112, 68,220,166, 55, 92,151, 77, 60,179,126,109,198,
- 65,132, 43, 77, 44, 41,113, 42,133, 86,203,118,253,245,255,215, 39, 25, 45, 80, 26,121,179, 5, 10,111, 8,220,137,240, 65,172,
- 61,234,128,223,181, 7, 48,154,109,170,208,131,187,100,111,252, 54,193,219, 39,140,222,117, 80,183,203, 3,240,144, 12,204,253,
-139, 38,197,134, 12, 4,216, 84,250, 99,226,218,229, 78,122,239,126, 45,116, 27,253,154, 32, 56, 39, 93,159,165, 61,153, 16,113,
-155, 90,132,176,116,228,107, 74,137, 98, 30,250,226, 35,123,191,198,179, 42, 73,149,148,148, 60,205,212,116,218,109,108,181,125,
-204,137,223,177,234,150, 98, 12,212,227,202,217,195,159, 44,104,130, 66,231,226,219,197,228, 99,163,181,246,207,224, 1,109, 47,
-111, 31,164, 8, 87,175, 60,225,240,232, 17,119,239,190,203,249,233, 71,126,114, 57,206,190,119,174,109, 43,232, 23,123,141, 22,
- 30,242,180,199,220,165, 17, 26, 32,125,252,210, 87,253,178,117,253,180,126,243, 15, 75,255, 48,238, 75,210,125,236, 30,106,211,
- 36,138, 78, 93, 26,235, 93,188,106,192,108,226, 68,154,114, 70,146, 4, 75,221, 89,213, 41, 37,180, 70,152, 97, 50, 82,242, 81,
- 19,154,144, 57, 83, 83, 70, 34,124, 70, 85,209, 57, 33,182, 82,234, 74, 57, 41,250, 66,145,207,222, 96, 95,121, 15,251,241,191,
-130, 92,255, 65,152, 31,131,125,228,130,172, 28,147,131,214, 47,246,186,157,194,182,116,159,184, 33, 82, 11,161, 87, 18,218, 82,
-208,119,206,254, 69,125, 17,143, 22,253, 28,176, 22,228,157,134,166,134,205, 9, 43,149, 92, 42,107,227, 19,191, 3,121,168, 54,
- 29,191,225,158,191, 45,193,139, 55,243, 60, 19,133,116, 46,200,215,111,153, 63, 61, 35,175,101, 47,236, 63,114, 5,181, 32, 7,
- 23,231,180,251,194,244,238,125, 32, 47,135,179,243,169, 34,143,102,239,242,191,118, 79,123,127,165,190,127,166, 60, 63,113,186,
-107, 60, 67,120,182, 56,166,125, 41, 59, 79,154, 65,255,240, 48,141, 84, 35,220, 67,115, 70, 31,101, 15,112, 49,188, 75,127,233,
-222, 92,107,141,118,170,148, 98,172, 58, 28,109, 36,114, 5,238,148,252,133,107,248, 97,156,254,119,243, 47,248, 33,108,253, 57,
-200, 63, 1,182,192,179, 63, 31,145, 91,223, 27,109, 85,129,250,190,119,233,173, 97,165,243,176, 47, 52,184,254, 80,172, 46,108,
-209,208, 27,180,120,210,206,201, 5, 81,147,249,195,241,205, 63,242, 58,135,127,252,154,119,254,163,111,177,158,171,119, 97,109,
- 87,185,247,142, 61,199, 67,112, 22, 99, 82,227,144, 60, 25,246,208,131, 94,218, 37, 58, 53,137, 96, 57,206,147, 53,214, 46, 45,
-196,144,177,166, 41, 65,146, 43, 33,172,147, 0,140, 39, 49, 86,241,137, 86, 23,191,101,213, 96,102,216,214, 33, 62, 20, 55,141,
- 15,194, 44,123,183, 39,109,119,143,244, 7,177,178,231,185,191,218, 18, 63,250,251,175,121,252, 86,230,151,255,226, 75,168,149,
-151,129,140,197, 42, 41,251, 52,128, 56,108,168,143, 5,250,237,189,117, 44, 45,124,233,133,125,167,223, 6,192, 79, 29, 56, 20,
- 58,168,221,115,220, 11,157,228,150,187,147,128,125, 35,216,133,141, 43,182,137,213,212, 46, 9,115, 58, 48, 5,186,127,127,212,
-243,104,216,172,250,129, 98,215,136,236,133,162, 35,114,243, 54, 29,240, 61,137,217, 64,223, 28,145,189,177,107, 87,118, 16,209,
-136, 14, 85,196, 85,234,236,233,207,253,190, 55, 51,180, 25, 7, 77, 72, 78,156, 85,184,175,149, 18, 66,231,142,165,173, 49,144,
-219, 33, 74,254, 30,102,224,179, 98,220,197,116,207, 98,218, 32, 23,134, 43, 63,108, 62,124,175,250, 93, 68,108,198,101, 70,250,
- 5,156,230,193,234, 34,141, 43, 12,217,247,206,227,248, 93, 47,208,203,253, 51,116,155, 47,210,182, 67,131,154, 11, 89,221,158,
- 45,204,121, 98, 78,153,148, 53,108,133,198,221,186,114, 94,150, 40,236,141, 82, 93,232,168, 41,109, 7, 8,149,152, 42,167,180,
-117,206,190, 89,210,168, 97,137, 41,103,214, 52, 97, 1,181, 25, 11,178,116,135, 86, 63,204, 4,241,172,239,195,183,137, 68,172,
-140,233,124,130,152, 76,143,228,169, 77,159,208, 63,144, 90,183,160,165,102, 70,206,170,136, 53,166,121,230,250,149,215,169,203,
-202,249,217, 71,187, 24,160,214, 77, 36, 48, 18, 9, 58, 36,134,192,178,118,159,142, 14,251, 14,137,238, 96, 19, 27,168, 70,135,
- 32, 91, 40,132, 14,251,133,125,180,153, 3, 54,177,211,230,146,166, 0, 51, 40,170, 57, 10,167,111, 83,147,122,102,168, 89,133,
-214, 85,240,182,229, 75,251,168, 36, 88, 96,234, 10,244, 60, 37,208,188,133,209, 88,155,252,131,233,106,131,249,136,233, 53,205,
- 42,237, 30,100,173,112,186,194,222,254, 91,200, 15,253, 62,120,242, 57,184,249, 0,158, 38,223,171,231,184,251,171,245,133,233,
- 86, 0, 91, 0, 16, 90,216, 82,178, 85, 90, 21,184, 95,247,143,245, 70,225,179,147,231,174,191,113, 64,150,134,182,138,181,236,
- 40,217, 83, 35, 75,243,157,223, 56, 14, 26, 10, 4, 23, 65, 15,195,141,110,123,158,112, 75, 65,194, 74,110,105,202, 47, 78,164,
- 47,191, 32,191, 49,195,147, 9,222,186,130, 31,186,129, 89,144, 73,200,167, 66,123, 94, 40, 47, 22,202,188,255, 32, 59, 27,250,
-195, 19,162, 9,251,176,210, 94,172,212,211,194,122,106,188,140,100,212,251, 2,167, 98, 30, 91,218, 46, 79,243, 26, 0, 5,123,
- 16,252,160, 13, 15,185,121, 53,121,146,201,185,193,139,117,207, 73, 95, 10,237,220, 92,224, 19, 95,149,171,151, 45,212,248, 25,
-249,169, 4,159, 1,174,255, 0, 28,126, 4,150,255, 27,110,255, 2,188,242,187,225,252, 53,248,234,207,193,147,207,134,210,172,
-184, 56, 96,253, 0,206, 96,119,254,148,148, 42,164,201, 79,237,162, 66, 43,254,218,214,236,135,157,164, 61,242,120,239,192, 83,
-246,209,242, 49, 11,105, 53,206,127,249, 41,229,220,200, 17,105,219,185,235,157,212, 54, 73,223, 97,155,239,209,213,199,245,199,
-208, 44,108,216,220, 58, 78,191,100, 19,150,238, 88,207,248,255, 25, 82,141,123,173,117, 27, 82,240,243,155, 23,211,221,222, 37,
-177, 87,180,109, 55, 44,234, 66,198,109, 79,152,118,235, 97,211, 30, 80, 35,219,100,173,127,111,235,192,138, 63, 35, 28,129,207,
-136,240,227, 63,113,228,213, 63,251, 22,207,255,139, 15,184, 93,140, 41, 11, 95,122, 34, 92, 63, 86,190,252,109,227,229,185, 49,
-137,120,134,184,244,195,254,195, 88, 89,118,201, 86,127, 13, 3,167,189, 63,204,100, 24,185, 78, 33,142,139,212, 94,150,232, 94,
-206,192,157,193,213,131, 29,120,177, 29,130,212,199,237,149, 49, 54,245, 1, 36, 37,186,197,142,142,237, 57, 64,109, 3,246,216,
-133, 90,191,178,107,141, 82,128, 95, 68, 19,102,141,181,219,218,108,199,213,122,190,189,109,175,227, 48,192,136, 42,198,179,102,
-172,102,220,136,112, 80,223,245,223,197,251,235,175,249,100, 70,181, 66,149,152,233,164,140,137, 58,106,182,218, 86,208,235, 48,
- 46,239,253,244,106, 14,181,121, 75,224,237, 33,108,187, 12,123,155,135,246,181,110,137,188,212,180, 95, 98, 95,237, 1,135,221,
- 30,144, 9,101,224,216,203,240,186,218,131, 70,230,227, 94,120, 25,208,170,241, 89,199,207,154, 68,152,231, 25, 81,229,160,202,
- 33,254,189,198, 84, 35, 11, 60, 57, 30,184, 21,225,188, 44, 1,156,106,172,197,208, 86,201,154, 72, 57, 83,171, 11, 60, 53,128,
-103, 42,194, 60, 77,204,121,242,102, 34,108,224,170,234,161, 47,146,144,109, 39, 31,112, 53,213,203,168,191, 56,208,111, 66,185,
-168,185,200, 16, 23, 59, 0,115,250, 73, 92, 58,251,165,167, 46, 90,187,248,172,115, 47, 16,211,213, 53, 34,202,249,195,247,177,
- 86, 73, 49,234,182,230, 1, 20,219,152,183,141,187, 45,187,136,147,235,129, 15, 50,228,225, 89,219,173, 58, 59, 80,120,143, 94,
- 53,177, 75, 11, 69,196,112,138,166, 16, 4,197, 62, 49,101, 68,213,243,129,251, 95,106,178,143,101, 84,125, 92, 29,159,152,166,
-228, 16, 22,171,219,233,162,219, 45,242,148, 73,243,140,106, 34,139,255,156, 86,154,103,229,138,208,242, 68, 17,104,234, 65,142,
-182, 86,236,121, 65, 30, 77,216, 47, 60,133, 47,254, 26, 60,250, 61,240,195,255, 0,222, 87,164, 30,144,171,130,220, 23,135,208,
-212,225, 65,180,141,193,219, 32,234, 48,244, 84,177,164,148, 21,210,210, 72, 61,180,228, 83,192, 27, 9,214,140,190,172,216,109,
-197, 84,105, 42,228,192, 80,246, 24,198,214, 62, 94,212,251, 15,113, 79,187,109,206,195,174,158, 95,171, 63,128,170,193, 11,132,
- 9, 99,122,247, 30,253,198, 75,244,205, 9, 30, 39,228,213, 35,246, 5, 71,215,166,231, 71,242,119,206, 76,183, 11,231, 26, 98,
- 30,241, 39, 72,250,173, 71, 79, 73, 59, 87,108, 41,212,219,194, 73,125,197,126,110, 91, 58, 42,181,250,131, 43,119,110,252,176,
- 23,221, 31,226, 94,236,179,129, 94, 37,164,199,172, 62, 55,236, 46,118,233,203, 74,123, 89, 57,135, 29, 30,237, 15, 84,191, 57,
-245,165,146,127,246, 10,249, 25,131,199, 95,132,155,127, 30,218,115,120,250,231,160, 28,225,230,125,248,234,191,135,253,124, 67,
-254,153, 21,202,119,160,188,112,107,226,122,139,156, 58,223,160,145,102,229, 40,153,169, 56,194, 94,196, 56,215,202, 20,136,226,
-121,240,214,247,110, 37,197,237, 80, 90,229,163,255,229, 67,172, 64,206,198, 77, 51,206,145, 69,211, 98,164, 62, 77,151,178,140,
- 94,208,181,119,101,113, 16,242,137,211, 80,180, 58,119,160,236, 11, 68, 17,217, 3,157,194,251,170,125,160, 21,254,121,146,175,
- 42,188,232,105,164,159, 93,238,253,146,169,131,117,194,179,219, 6, 38,168, 12, 55,104, 31,101,143, 93,171, 13,251,232,163, 40,
-143,111, 18,203, 2,191,242, 47,125,131, 95,255,230, 25,142, 62,193,120,114,149, 88,171,112,223,217,255,227,142, 48,152,237,231,
- 17,244,210, 71,188,136, 71,101,110, 9,145,251,186,198, 6,176, 84, 30,186,245, 14,140, 89,227, 78, 60, 15,196,191,137, 97,234,
-240, 32,103,162,171,215, 11,151,118,186,135, 10,237, 49,100, 68,113, 29,196,210, 99, 79,195,106,184, 69,208,198,250, 43,111,207,
- 71,161,104,102,105,133, 37,210, 38,235, 64,181,235, 5, 61,110,181,120, 95, 18, 44, 13, 47,250, 39, 51,142,182, 79, 78, 12,184,
- 55,225,212,191,187, 77,136, 90,157,133, 46, 66,211, 41,172, 9,118, 49,254, 39, 2,175,122,242, 92,197,157, 3,111, 0,223, 30,
-150,214, 77,118, 17, 95,226,227, 80, 25,249, 46,126,245,241, 23,210, 72,103,124, 16,190,178,233,133,162,144,183,225,226,146,143,
-129,110,236,162,248,251, 33,207,127, 80,238,135,224,128, 24,204,170, 78,126,179,176,154, 86,219,234, 11, 8,215,243,140,136,176,
-156,207, 62,245,141,212,202,181, 57,248, 71,123, 81,166, 23,244,204, 52,249, 1, 33,135,114, 85,194,182,184, 29, 56,181,139, 73,
-251,159, 29, 35, 89, 7,173,205, 40, 69, 84, 15,241,233,246,241,109, 58, 34, 26,153, 12,109,111,134,154,131,202,198,252,217,200,
-108,240, 14,238,112, 56, 96,101,101,185,125,177,239, 55, 25, 58,146,202,150,235,189, 73, 13, 98,124,176,157, 73,173,133, 77,104,
- 80,207,137, 12, 40,200, 22, 2,162,174, 53,220, 97, 15,253, 43, 75,236,130, 58,149,180,219,232,196, 51,220,181,245, 55, 57, 90,
- 23, 64,152,104,211,238,239, 52, 81, 87,104, 71,106,154,166,196,156,148, 89, 3, 76,146,149,164, 25,116,242,177,208,212, 3, 89,
- 10,181, 54, 86,171, 84,170,127,192,171, 97, 47,110,189,139,126, 87,176,111,253, 60,242,165,127, 21,249,210,247, 97, 31,126, 29,
-249,135, 9, 93,103,236, 84,145,114,142,194,240,192,110, 55,140,157, 22,224, 80, 27,237, 92,208,212,124,207,249,222, 9,189, 81,
- 56, 28,225, 58,160, 52, 47,162,248, 83,177, 50,161, 47, 27, 89, 93, 36, 19, 43,159, 13, 50,163,253, 59,130,216,199,199, 13,210,
- 6, 97, 83,183,204,244,221, 82,133,231,147,112,188,175,164,175,220, 50,127,238, 8,111,100, 56, 36,228,181, 71,190,199,126, 94,
- 73,111, 29,152,158,159,152, 63, 44,156,230,254,176, 85,228, 11, 51,118, 42,216,203, 70,123, 89,176,106, 59, 71,187, 26,107,101,
- 75, 99, 75,195, 67,106, 76,127,178,237, 70, 15, 22,127, 18,244, 73,114,232, 12,158,116,215,238, 35,137,237,222, 71,239,139, 25,
- 75,235,211,159,184,129,138,248, 65,244, 79,190, 1,159,250,157, 48,255, 49,152,222,128,167,127, 30,158,253, 58,188,242,187,224,
-254, 47,194,127,242, 11,112,243, 4,251,104, 69,222,248, 8,202, 45,200, 17,150,123, 88, 61,156, 72, 87, 33,201,196,141, 78,164,
-183,142, 44,182,242,193,251,103, 82,114, 30,180, 6,216,163,167, 74, 69,102, 7, 53, 84,214,102,198,169,143,188, 67, 89,125,115,
-244,110,189, 87, 9,213,125,188,154,197,187,216,237,144,208, 15, 79,246,128,110,221,175,169, 18,197,221,100,115,121,244, 15, 56,
-137,119,236,210,161, 50, 33, 0,235, 93,134,163,228,216,216,195, 45,130, 43,208,228, 15,175, 22,105,137,114,233,155,149,102,212,
-136,218,181,145,229, 30, 34,186,202, 14, 46,153, 50,124, 88,225,221, 95, 57,113, 90, 43,105,246,142,250, 84,141,191,247,237,133,
-115,219,229, 40,213, 46,109, 98,163,112,175, 7,232,200,199,210,186,100,139, 18,221,195,235,108, 75,173,235,136,217, 50,226,119,
-101,136,106, 53, 47, 88,155, 56, 45,174,191,177, 19,111,118,121, 96,233,130,177, 54, 92,191, 57, 38, 22,123, 96,138,127,118,182,
- 89, 80,213, 15, 14, 97, 31,107, 6,247,213,173,173, 41, 92, 57,146, 18, 82,108, 83,213,111, 49,209, 92, 54,117,155,252,164,147,
-253,226,247, 85,235,148, 63,225,206,224, 30,219,112,191,102, 59, 68, 42,137, 33, 45,214,152,120,150, 71,193, 40,165,239,219,133,
- 81,164,222, 51,233, 39,241, 80,201,219,176, 65, 54, 60, 59,160,223,184,163,120,242,187,121,204,211,102, 69,148, 77,227, 49,254,
-190,244, 64,180, 55,198,139,242, 0, 79, 60,166, 26,118,123,180,245, 70, 9,221, 82, 14,251, 10,163,103, 53,168,250,180,130,208,
- 55,229, 16, 91,247,224, 50, 21, 31,205,183, 90,169,107, 27, 54,224, 30,222,226,186, 1, 69,163, 27, 79,154,226, 30,236,209,227,
-138, 53,219,130,135,182, 87,168,186,217,207,122, 82,219,229,218,177,141,121,115,113, 16,145,224, 54,196,113, 53,103,255,253,181,
-110,212, 57, 19,243, 70,180,121,103, 48,240,107, 28, 41, 45, 2,109, 93, 56, 61,251, 0, 43, 5, 85,137,209, 96, 87,221,202,102,
-146,183,118,233,127, 28, 61,130,221,226,214,195, 26,122,164,107, 31,207,247, 81,225, 22,231, 55, 96,253, 44,126,221, 85,237,213,
-197,114,216, 46,204,107, 30,120,226,187,246,200,217,238,118,163, 96, 90, 39,149, 45,173,216, 68,156, 20,166, 57, 0, 19, 19,135,
- 57,197, 14,113, 9, 42, 93,242, 49,137, 37,207,124, 43, 11, 22,178,228,138,112,110,194, 25, 35,151,123,148, 10,247, 7,228,201,
- 12, 95,254, 50,124,113,133, 87,254, 36,252,214,255, 24,202, 61,250, 75, 51,118, 88,177,121,193,206, 50,140, 78,108,195,229,142,
-118,156,130,145,207,197,217,245, 87,130,188, 80,228,189, 16,206, 29, 20, 30, 77,240, 61, 13, 89,103,244, 93,207,162,183, 86,153,
-111, 87,150,136,195,237,157,146,251, 51,219, 38,212,234, 57,222,163,136,194,194, 74,214,113,175, 29, 17,128,192, 85, 54, 14, 31,
-156,200,255,240, 5,250,169, 25,187, 81,100,158,145,215,174,177, 79,175,232,103,102,210,251, 71, 14,207,111, 61, 59,120, 49,166,
- 89,145,207, 29,225, 89,241, 36,182,115,219,198,145, 37, 52, 34,173,123,148, 35,183,219, 70,229,170, 93,166, 56,117,149,178, 94,
- 41,242, 56,195, 44,216,125,133,151, 5, 91,188,123,110,119,133,117, 53, 78,230, 83,128, 20, 15, 29, 5,228, 30,210,111,203,240,
-250, 15,193,213,159,130,252, 38, 44, 95,133,167,255, 35, 76,103,120,235, 26,254,231,191, 12,255,143, 32,127, 80,177, 91,243, 42,
- 91, 79,174, 40, 91, 94,192,115, 65,238,253, 53,206,249,136,254,137,183,224,247,126, 31,249,231,126,149, 23,255,237,219, 76, 89,
-209,115,221, 73,120, 3,247,157, 1,188,210,177,174,125,132,234,144, 65,225,224, 27,159, 56, 4,244,220, 1,127,192, 75, 44,239,
-172,140,236,244, 93, 81,188,249,247,211, 94,137,100, 82,180,122,213,238,124,233,150,118,149,188, 5, 27,190,197, 31,105,170,123,
-209,139,184, 97,205,137,154,179,119, 46,141,141,165,173, 13,215,125,152, 7, 47,245,112, 26,217, 73,200,126, 24,141, 80,154, 20,
- 29, 82, 1,150,210, 40,197,255, 93,147,113,182,240,171,211, 3, 51,188,163, 95, 30,200,169, 55, 88,201,246, 44,113, 62,121, 25,
- 14,197, 91, 7, 46,186,177, 48, 54, 1,227,144, 52, 82, 7,245, 80,142,239,105,142, 29,193, 26,180,189,218, 97, 44,225,135,110,
- 1, 25, 42,109, 31, 77,143, 68,180, 78,163, 76,182, 91,236, 26, 66,141,168, 77, 53,227, 96,141,151,205,239,111,217, 52, 69,193,
-127,143,235, 33, 85, 95, 1,170,184,128,215, 90, 76,162,182,130,238, 33, 45, 54,132,109,141, 14,174, 26,123,250, 37, 38, 14,218,
-140, 59,220,123,190, 6,222,181, 4,227,126,233, 62,104,219,227,173,175, 5, 30,137, 32, 41,145,179,178,182, 18, 78,137,221, 27,
-159, 7,183,213,163,248,236,239,245,242,128,110,195, 52,164,141,106,182, 40,224, 50,136, 73, 63,201,186,246, 73, 88,217, 49,126,
-102, 51,100, 14,146,246,190,251,135, 75,102, 65,138,233, 71, 26,232,124,125,159, 62,231,204,164,153,166,123,250,103,214, 20,159,
-181,120, 97,196,255,183,148, 18,117, 29,243, 24, 36, 4,143, 14, 12,114, 30,195, 52,172, 29,188,232,175,165,112, 62,159,246,125,
- 85, 47,214,162, 81,216, 99, 50, 50,178,225,187, 63,222,218,112,205,219,230,145, 23, 77,144,252,184,105, 53,186,234,176,202, 89,
- 4,202,108,235,240, 97, 39,149,189,219, 19,150, 23,207, 99,148,199, 94,140, 67, 41,222, 51, 75,164,237, 84,254,109, 7,208,125,
-176,155, 2, 54,132,115,106, 23, 35,117, 25,114,217,181, 95, 5, 18,103,238,142,146,181,253,103,123,235,211,144, 41,145,196,247,
-254, 82,107,188,158,136,124, 29,148, 22,162,126,186,202,105,194, 52,251,216, 35, 79,126, 58,107,141, 84, 11,185,174,126, 27,204,
-215, 30,202, 37, 13,105, 37, 50,217,129,150,168, 65,189,195,217, 42,104,105,204,210, 72, 77,105,119,134,188, 34,200,251, 43,220,
-253, 29,120,245,159, 67, 62,253, 39,176, 31,251,243,240, 62,200,203, 9, 57, 77,200,121, 55,151,105,218, 71,167,125,159,170, 3,
-232, 99, 90, 26,118,172,212, 86,144,143, 22,210, 87,194, 59,254,217, 25, 94,157,224,243,134,174,206, 59, 55,105,112, 94,209,123,
-219, 44, 80,163,250,180,200,101,190, 51,219,110,210, 46, 58,157,190, 59, 92,155,239,161,159,171,112, 93,141,249,155,247,204, 95,
-191,131, 79, 37,184,190,135,199,215,200,167, 39,236,245,153,252,217, 35,237, 69,225,234,195,123,202,210,200, 79, 38,228,149, 9,
-222,190,195,110, 27,173,122, 44,100,107,194,186, 70, 65, 11,121,109,103,138,247, 19,170, 93,156, 84,101,219,181, 37,112,224,204,
-167, 34,211,252,133, 97,119, 94,208,157, 34, 87,125,180, 95,221,186, 52, 53,227,216,161, 51,162,200, 19,131,114, 15,122,140, 27,
-224, 8,239,124, 7,126,236, 7,224,244, 62,252,185,167,158,208,118, 29, 0,236, 52,197, 7,120, 11,235,135, 91, 59,167,139,194,
-143, 92,195,111,255, 52,188,253, 33,203, 95,253,144, 90, 27, 89,140, 26, 64,149,238, 21, 31,133, 89, 58,236, 10,219, 39,196, 83,
- 54,131, 41,137,199,174, 86,187, 12,158,216, 86, 41, 35, 53, 97,223, 25,106,216,245, 46,158,136, 37,148,180,178,175,195, 52, 78,
-114, 54, 27,156,186,141, 75, 40, 37, 30,180,213, 88, 66,237, 62,205,217,173, 59,165,110,215, 77,149,232,127,196,187,153,146,161,
-157,135,196, 52, 25, 14, 24, 23, 22, 57,219,216,244, 75, 8, 58, 20, 99,137,174,186,198,137, 39,165,192,108,118, 69,222,158, 31,
-187,117,163,235,134,247,188, 28,195,187,168,183, 3,129,188,251,221, 35, 72,109, 19,234,245,168,212, 78,238,115,112,203, 30,109,
-171,120,150,248,135, 13, 14,209,181, 31, 4,110, 68,184, 18,227,118, 16,198,173,157,138, 57,116,229,105, 56,110,173,131, 23,165,
-231,157, 79,248, 65, 70,104, 84,243,226, 57,245,149, 99,196,177,182, 45, 53,206,187, 63,107,142,136,110, 56,236,167,109,233,116,
-131, 15,124, 83,209,239,249,225,125,219,183,154, 31, 86,150, 88, 1,172,155, 32,206,226, 85,235, 6, 46,170, 13, 42, 53, 98,105,
-133, 67,154,168,102, 44,173,114, 54,219,120,248, 50, 28,108,110,100,136, 30, 30, 58,244, 98,151,161, 56,123,167, 61,136, 0, 31,
-104, 24, 46, 16,174, 99, 71,223,181, 41, 67, 34,226, 30,246,181, 23,253, 61,238,119,228,188, 15, 52,205,254,247,105, 98,202, 19,
- 57, 79,126,152,214, 60,208,233,108, 43,252,253, 26, 81,140,115, 74,225,168,104, 33,232,213,193,162,183,199,170,246,105,192,106,
-141,211,233,158,245,174, 81, 75,217,236, 20, 93, 8, 71, 76, 4, 58, 79,196,185, 18, 3,191,101,176, 1, 42,130,230, 20,161, 84,
-234,148, 76,139, 3,159, 57,120,173, 9,180, 18,201,113, 99,131, 20,112, 39, 33,117,248,204,238,237, 16,217,115,162, 53, 4, 1,
-163, 54, 81, 31, 36,202,136,250, 30, 67, 30,230, 59, 52, 11,172,171, 93, 38,191,117, 53,109,236, 6,205,218, 54, 42,212,129,190,
-211, 3, 11,114,139,145, 7,169,115,122,182, 81,155,198, 29,111,146, 34,130, 53, 78, 63, 41,185, 48,196,124,207, 46, 20,178, 52,
- 38, 51,180,174, 8,179,183, 76,156,125,239, 81, 28,142,223, 90,115,111,123, 92,158, 42,226, 44,248,166, 28,214,226, 9, 97,103,
- 64, 50,246,141,191,130,124,250, 15,195,213, 63,129,188,249,247,176,239,255,235,232, 59, 19,237,148,144, 91,193,206, 27,135,242,
-130,122,100,131,250,187,198,193, 43,175, 21,206, 66,109, 62,122,209,183,197,213, 60,175, 31,225,205,217, 47,162,197,125,198,118,
- 87,152, 94,156, 72, 27,242,112, 87,188, 39,221,253,188, 29, 70, 48, 2, 50, 30,142,178, 44,150,135,103,133,231, 9,142,207, 22,
-244,107,119,228,207,206,216,107, 25,153, 19,188,126, 3,159, 62, 33,119, 7,242, 93,113, 63,231,243, 19,250, 36,111,214, 54, 43,
- 45, 28,124,110, 89, 90,205, 40,205, 73,118,173,231,139,219,254, 96,218, 78,171,186,143,231, 82,115,224, 74,122, 37, 33,143, 34,
- 7,247,105,120,211,173,209,150, 70, 57, 25,103,224, 92,124, 63, 76, 26, 85,245, 2,223, 94,160, 78,238, 71,151, 5, 94,252, 60,
- 60, 21, 56, 37,236,143,255,111,176, 20,228, 39,175,176,215, 20, 94, 83,208, 79, 7, 45,232,153,179,241,107,168,211, 14, 10,185,
-210,254,203,175,176,252,157, 91,158, 47,103,150,107,176, 83, 40,214,181,143,184, 98, 74, 16, 32,163, 1, 70,181,237, 43, 85,118,
- 97,153,246,144, 8,193,221, 34,179,250,205, 95,119, 22,170,204,138,148,134, 84,223,233,181, 16, 22,166,126, 3,173, 33,122, 20,
-193,170, 57,164,103,245, 20, 22, 75, 46,197, 54,240,140,121,226,231,212,128,230,152,177, 6,149,108,186,154, 96, 62, 80,207,197,
-247,129,214,227,131,157, 31, 42,109,191, 88, 53,117, 49,142,108,157,122,178, 93, 4, 11,161, 79,159, 0, 0, 32, 0, 73, 68, 65,
- 84,218,119,254,181,107, 86,226, 33,185,118,190, 69,127, 24, 70, 65,219,125,207,187, 53,213,198,209,178,237, 22, 88, 27,188,185,
-186,141,194,101, 19, 65,141,224,151,141,182, 21,146, 3, 29, 20,213,182, 29,190,132, 89,225,101,137, 0,167, 16,207,245,115,222,
- 85,124, 4, 79,217,227, 90,123,166,250,238,248,191, 92, 7, 48,216,166, 68,140, 99,168,198,155,249, 88,157,234,197, 65, 3,195,
-186, 39, 91,249,148,102, 78,217, 57,240,107,217, 26,164, 17, 62, 83,227,103,106, 76, 74,138,236,170,253, 14,254,177, 56, 20, 45,
-113,160, 40,246, 48,153,173, 33,161,207, 40,192, 18, 14,130, 85, 96,150,198,181, 42,105,154, 41,235,194,210,124,234,214,115,225,
-123,209, 62,196,189, 90, 6,145, 96,150, 62,129, 12, 48,143, 13,140,128,161,208,202, 39,224, 93,199,181,203,244,224,247, 43,151,
-180, 68,100,183,113, 93, 10,233,252, 59, 77, 26,246,179,152, 20, 95,105,230,230,120,224,120, 56,122,224,138,106,236,184, 97, 41,
- 37,226,191,247,134, 32,247,196,197,136, 22,111,117,136, 81, 29,174,196,205, 18, 88, 27,118, 62,179,134,101,176,139, 88, 69,117,
- 56,148,135, 35, 76, 6, 72,140, 74, 88,221,118,207,177, 4, 66, 86, 83,222,190,251, 62, 29,176, 90,220,205,160,201,233,131,181,
- 68, 65,127,160,242, 80, 54, 91,119,102,243,141,239,234,204, 78,153, 75,125,116,228,179, 27, 87,192,142,128,123,145,109, 44,181,
-205,228, 6, 70, 49, 22, 96, 14, 46,253,133, 58,140,215, 82, 20,231, 62,218,218,176,136,219,127,183, 24,153,168,143,222,123,146,
- 81,107, 27,222, 79,106,245, 17,191,102,127,120,148,213, 95,163, 18, 7, 17,223,129, 38,205, 62,156, 47, 11,102, 5,180, 4,121,
-203, 93, 77, 37,212,138,104,194,154, 80,214, 91, 88,207,220, 82,184, 90, 23,174,164, 96, 79, 10,246,228, 6,249,229,223,128, 31,
-250, 27,240,232,159,134,249,119,192,155,127, 19, 30,173,200, 71, 17, 95,214, 60,158,207, 58,115, 59,152,220,125, 18,223, 6,238,
-171, 86, 67,239, 42,109,242,116, 53,126, 67,209,171,236,187,245, 39,179, 7,175,220, 6, 94,242,118, 98,154,207, 28,151,253, 20,
- 45,131, 95,115,156, 83,118, 38, 54, 17, 6,115, 97, 3,209,126, 34,246,145,252,189,192, 93, 53,230,111,223,145,190,126,240, 14,
-253, 42, 35, 79,110,144,239,123,140,157, 26,169,197,204,251,215, 43,233, 7,143, 94,205, 22,159,168,180,210, 35, 45, 29,186, 83,
-154,251,136,229, 34, 69, 40, 30, 46, 50, 90, 81,188, 64, 77,106,228,172,232, 43,147,199,111, 85,131,219, 16, 41, 90,195,238,220,
-210,231,255, 56,178,115,238,118,156,102,200,169, 32,127,248, 77,120,245,223,244, 61,121,249,171,240,115,255, 1,188,249, 58,245,
-223,254, 85,202,219,207,209,159,188, 33, 29, 28, 8, 40,175, 92,185,165, 77,143,192,215,225,105,241, 39,188, 25, 77, 10,235, 87,
-110, 41,119, 43,119, 90,185,191, 17, 87,175, 75,115, 48, 73,132,218,244,107, 61, 39,182,160,142,141, 3, 80,217,114, 5,246, 52,
- 55,223,107, 70, 14,104,252,225,120, 82,174, 97,231, 82, 55, 17,123, 86,129,197,131, 60,190,176,138,199,243, 70,197,115, 55, 73,
- 66, 14, 19,124, 54,211, 62, 58, 83,111, 87, 90,169,206,173,239, 37,167,249,131, 34,153,184, 82,247,234,138, 38, 19,117,219,209,
-249,225, 33, 73,218, 50,163,201, 96,107, 37,181,134,170, 58, 9,144, 22,211,180, 80, 1, 87,217,166, 19,157,110,231, 69, 32, 94,
-165, 92,174, 89,250, 8,191,239,172,107,140,150,183,220, 2, 51, 46,229, 80,182, 69,212, 78, 61,111, 60, 40, 94, 83,172, 57,122,
-209, 47, 12, 76,242, 56,155,117, 2,224,180, 41,184,109,235, 78, 83, 20,164,147,121, 33,186, 13, 10, 93,223,177,107, 0,100,166,
- 0,218,116,159,255,204, 62,222,183,129,251, 96, 3, 24,234,198,195, 11,185,239,244,185, 64, 92, 39,205, 91, 16, 72,128, 55, 16,
-224, 32, 66, 77,153, 22, 99,248,174,110,182,209,150, 58, 20,232, 98, 22, 62,123,219,194, 98,170, 8,103,219,229, 18,123, 65,183,
-139, 67, 61, 3,111,190,191,238, 53,124,218, 51,120, 80, 76, 82,106,109, 44, 49,225, 24,133,129, 83,232, 15,214, 97,218,168,155,
- 94, 38, 14,182,182,163,143,219,131, 88, 54,249, 46,136,216,198,152, 6,103,152,126,188,128, 63, 60, 8,140,133,212,226,161,146,
- 36,113,147, 18, 55,243,236, 58,177, 16, 84,211, 26, 21,165,212, 74, 45,101,215, 44, 52,115, 59,170, 78, 20,145,184, 79,213, 65,
- 97,181,238, 19, 79,219,167,103, 77, 60,104,167, 69, 4,249, 38,250, 86, 63,104,123,131,154, 6, 75,119, 76, 83,205,127, 79,132,
- 54, 68,234,232,222,209,183,230,225,101,173,131,216, 58, 5,175,119, 63,165, 68,248,145,108,107,157,126,212,208, 24,243,107,206,
-100, 25,136,114,253,100, 65,236,201, 68,245,162, 16,168, 61, 32,247,200, 62,154,178,139,184, 68,217,184,184,210,197, 11,129,141,
-237, 85, 77,104, 36,113,139,155, 36,221, 72,113,238, 49, 84, 87, 18,183, 26,233,109,186,193, 62, 82,206,254, 6, 54, 75, 79,247,
-181, 68,146,145,102,191,149, 90, 69,242, 76,158, 31,147,165,160,231, 91,223,127,154, 33,231,151, 52, 10, 54, 79, 88,154,105,154,
-105,214,147,223,192,202,194,114,186, 71,207,119, 52, 86,212, 10,119,245,196,177,173,216,115,131, 55,142, 80,143,240,171,255, 53,
-252,150,159, 6,249, 28,204, 71, 56, 84,247,172,207,193, 9, 94,161,101, 48,181,205, 91,216,253,205, 99, 84,111,105,144, 82, 35,
-173, 43,245, 62, 30,108,223, 16,228, 21,245, 68,143, 27,133, 47, 28,144, 83, 67,239, 87,242,107, 7,174, 62, 56, 81,240, 98,211,
-207, 34,205,188,112,248,158,168,143,180,109, 27,249,111,135,165,100, 27,139, 58, 69,210, 21, 17,184,177,222,173,228,111,158,200,
-223,211, 69,115, 10,143, 30,193,231,207,174, 10,111,192,113, 69,191, 24, 33, 46,107,236,251,235,206, 34,239,225, 51,136,219,109,
- 50,184,165,176, 93, 10,127,186,208, 45,137,113, 48, 35, 29, 5,121, 45,121,149,252,168,210,206, 22,251, 70, 79, 98, 91, 49, 22,
- 83,106, 28, 72,114, 18, 14,147,161,103, 67,222,173,200, 23,127, 4,236, 10,218,207,195, 95,255, 79,177,191, 1,235,250, 17,167,
-255,235, 41,233,173, 76,174, 43,201, 14,158,241,158,143,120,127,150,252, 17,252,124,141,236,119,197,158,195,242,116,225, 20, 94,
-221,186,218,150,158,149,115,212,188,208,221,244,207, 89, 99,175, 33, 9, 74, 17, 90,218,235,182,141,163,249,108, 72,100,197,155,
- 52, 44,123,113, 14, 89, 52, 29, 26,191,241,218,133, 11,120,135, 54,221, 1, 47,147, 32, 83,134,127,229, 83,240,217, 3,250, 31,
-126,155, 90,206,209, 33,250,248,142, 16, 75, 9, 74,158, 50,109, 58,210, 52, 99,203,234,121, 8,230, 10,221,174, 34,119, 34, 76,
-220, 95, 73, 60,199, 64,149,140, 4, 86,179,186,194, 56, 64, 25, 93, 9,223,237,163, 27,246,181,119,120, 50,186,216,227, 97,148,
-148,220,252,190,232, 59, 92,186, 14,166, 23,180,232,224,147, 5,146,182,107, 24,108, 23, 85,150,232, 30,189,122, 72,164,209,185,
-224,203,109,142,251,216, 60, 61, 56, 0,116,133,119,138,193,106,142,115,213, 93,180,111,147,200,214,141,246,131,207,129,221, 5,
-176,196,159,207,221,246, 54, 8,149,166,112,100,200, 24,211, 73, 35, 91,219, 58,185, 53,158,119, 41,190, 91, 47,166, 57, 24,240,
- 53, 58, 94,217,180, 18,140, 89,239, 3,225,173, 4, 95,160,138,196,107,186,156, 37, 92,166,125,217, 22, 37,219,189,215,206, 45,
- 40,220, 33,156,106, 29, 92, 58,145, 11, 63, 56, 10,122,241, 61,117,221,204, 96,161,179, 49,196, 75,228, 65,158,123, 80, 31,237,
-227, 43, 41, 99,156,184, 94,234,108, 24,179, 46,198,157,251,198, 60,215,141,141, 34,102, 28, 82,226, 38,103, 14,243,129,150,148,
-165,181, 93, 81, 30, 7, 38, 66, 24,106,102,155,202,125, 19, 99,143, 8, 86,213, 13, 45,251,177,180,181,139,148,180, 33,252,165,
-219, 78,194,107, 43,131, 13, 45,245,218,106,230,254,254,222,221,105,119,174,236,194,195, 86,155,119,153,189,224, 3,181,182, 13,
- 3,155, 84,145,148, 99, 50,177,187,170, 36, 80,222, 89, 31,208,124,210, 86, 0,132,172,222, 49,212, 56,161,203,192,187, 87,185,
- 68,245,245,140, 88,221, 0, 51,177, 87,136,108,224, 52, 18,132,122,129, 27, 99, 25, 69, 34, 69, 77,162,115,151, 29, 43, 27, 69,
- 90,215,197,127,125,158, 64, 83,172, 2,116,179, 26, 32, 62, 98, 17, 19,106,109,176,158,152,144, 24,173, 24,106,133,105, 58,160,
-201,123,212,146, 19, 77, 60,197,205, 90,117, 98,217,249,142,118,127,199,178, 44,110,255,201,141,180, 20,238,109,101,181,194,225,
-217,138,125,180, 32,159,187,194,126,225, 61,228, 11,255, 3, 60,250,189,254,180,111,241,137,206, 62, 70,103,245, 44,116,170, 92,
- 38,235,244,200,189,182,231,138, 87,115,134,115, 58, 25, 53, 36,193,249,107, 33, 26,251,236, 1, 94,205,240,189, 7,210,237,138,
-189, 92,201,167,202,241,197,202, 26,184,208, 62,230,222, 34,108, 59,113,108,244,135,198,200,184, 19,208,146,185, 23,121,246,151,
-140,102,163, 90,163,189, 56, 99,223, 57, 33,159,155,176, 71,138,228,140,124,230, 53,236,124,134, 50,163,175, 77,200,103, 15,108,
- 56, 53, 1,157,140, 52,240, 51, 83,191,184, 2,166,160,241,179,219, 40, 78,138,127, 38, 60, 69, 75, 94,155,224,117,215, 64,240,
-188, 97, 47,156,245,110, 75,165, 46,141,181,121,130,149,138,211,205, 14,201,121,222,233,235,149,233, 95,255, 34,124,223,207,192,
-242,239,211,254,143, 95,164,252,217,247, 40,175, 43, 79,223, 95,169,175, 43,143,154,145,238,171,183, 40, 93,236,208,112, 47, 66,
-249, 22,156, 86,120,114,128,183, 23,206,207, 10,167,218, 56,103,161, 54,227, 92,155, 31, 62,205,109,102, 26,216,210, 22,130,208,
-139, 67, 83, 88,201, 44,198,148, 26, 63,202, 74, 8, 23, 75,207, 65,119, 37,189,220, 25,121, 54,183, 52,166,228, 54,190,178, 35,
- 35, 21,115, 71, 64,168, 98,233, 43, 42, 9,107,202,181,194,219, 39,248,171,183,180,231, 43, 45, 9,182, 70,215, 26,160,120, 83,
- 33, 77, 9,201, 19,150, 39,214,197, 71,143, 85, 50, 83,134,156,101,179,175,105, 41, 20,109,216,234, 7,195, 22, 49,200, 22,113,
-198, 34, 50,196,146,238,225, 43,227,126,148, 36,180,234, 83, 9, 85, 33, 37,161, 52,143,133,244, 7, 72,194,164,109, 90,147, 26,
-220,130,145,142,168,177,219,223, 16,210, 67,129,157,162, 8,183,182,139,167, 82,138,243, 80,181, 11, 17,203,212,113,190, 67,151,
- 55,133,108,133,225,191,143, 93, 91,100,123,179, 98,145, 83, 94,204,187,123, 17, 23, 16, 55,177,109, 95,205,192,228,144,200,152,
- 72, 50, 52, 72,157,157, 47,194, 74,115, 61, 70, 74,174,254, 15,118, 68,127, 50, 76,154,104,201,182,233, 99,217,112,179,118,177,
-179,174,131,118,102, 51, 50, 68,113,242,169,171,186,216,113,179,208,170,251,210, 99,111,223, 45,164, 85, 52,182, 62,254,190, 59,
-224,166,181,182,163,110, 5, 22,179, 77,148, 86,135, 3,145,217,199,107, 94, 79, 48,235,135,137, 29, 56, 35,151,108,118,123,160,
-104,223,101,113,251,245,100,151,201,124,219, 36, 64,252,154,106, 65, 42,154,128, 67,158,152,210,228,147, 7,129,108,131,191,123,
-195, 17,251,169, 80,209, 13,180, 84, 99,105,211,237,191,147, 40, 45,103, 50,194, 89,148, 90, 86,135,161,141, 19,199, 49,224, 53,
- 10,184,201, 16, 39,168,186,143,222,187, 58, 90, 34,123, 52,224, 53,214, 6,213, 77, 76,114,144, 20, 43,176, 26, 71, 47,191,203,
- 90, 43,219,129, 88, 73,190, 70, 32, 72,170, 61, 41, 53,154,113,171,149,156,162,235,117, 1,155,108, 2,183,142,235,179, 45,224,
-192,250,148, 0, 21,121,128, 83,220,232,234, 67,231,190, 71, 62,105,156,110,250, 27,149, 7,194,162,174,114,223, 79,226,123, 70,
-187, 52, 23,179,137, 26, 82, 26,180, 21, 59,199,206,124,158,144, 52,185,135, 93, 4,210, 76,210, 41,252,183, 11,186, 44,100,169,
-232,225, 49,114,120, 66,182,194,148, 82, 88,105, 86,150,218, 72,117, 37, 89,193,202,153,118,190,141,194, 85,200, 42,152, 40, 38,
-141,214, 10, 43,141,251,214,152, 94,156,225,163,123,228,205, 25,185, 61, 98,191,246,151,145, 31,123, 29, 14,175,192,244,220, 47,
-199,236,237,175, 46,126,145, 86,147, 45,219,220,189,199,131,191,179,251,143,155,209, 84,152,107, 35,175,171,239,226,191,149,200,
-175, 6,233,237,149,201,211,220,190,112,133,190, 88, 73,231,194,241,180,178,172, 70,233, 93,200,168, 6,102,207,229,182,234, 15,
-206, 45, 80,174, 7,188,196,119,187, 11,215,124,236,213,206, 70,123,111, 37,125,112,118,209,220,225, 57,204, 95,128, 79, 63,135,
-151,207,145, 31,156,225,115,115, 60, 69,187, 23,180,187, 16,100,251,185, 7,219, 89,233,157,105,172,145,230,149, 98,122,147,122,
-146,214, 81, 72,159,202, 14,225, 41,134,189,112, 52,172,105, 11,101,189,133,136,203,233,109,135,100, 92, 41,228,175, 22, 14,191,
-249, 9,250,167,255, 48,180,175,194, 55,127,149,243,191,241,117,238,175, 26,207,158, 43,167, 43, 33, 39, 56, 84, 56,158,138,175,
- 11,172, 47,250, 15, 96, 79,225,244, 45,120, 23,248,112,165,252,234,137,178, 86,202, 12, 53, 11,247, 47,161,172, 46,193,184,146,
- 80, 82,235, 5,253, 56,210,155, 66, 56,180, 4,186,118, 0, 65, 72,140,226, 39,221,169,114,152, 79, 49, 76, 64, 86, 67,151,230,
- 26, 6,113,211,186,158,131,152,152, 18,122, 76,129, 72,139,252, 85, 9,156,237,210,176,251, 5,249,159, 10,237,206,168,186,250,
-212, 36, 46, 46,205,208, 44,199, 62, 46,147,166, 76, 42,161, 27, 17, 65, 38, 31, 77, 90,144,180,106, 35,198,142,141,166, 33, 30,
- 13, 30,128,180,182,175, 55,119,251,202,238,100,217,144, 21, 97,141,154,148,137, 68,163, 97,166,148, 13,228, 62,144,187,123, 48,
- 14, 26,116, 50,127,148,229,224,117, 71, 3, 78, 9, 22,108, 70, 73, 52, 50, 70,177,230,163,112,177, 16, 28,183, 45, 54,180,196,
-129, 9, 60, 91,125,142,103,203, 93,140,241,175, 4,158,168,112,109,112, 10,246,195, 49, 58,236,243, 70,161,243,251,170,167,152,
-117,113,218, 36, 66, 22,183,175,217,208, 53,215,216,199, 79, 2, 47,251,245,109,187,245, 20,122, 42,154, 59,117,178, 8,107,140,
- 53,250,190,217,175, 17,165, 90,114,107,110,107,219,238,124, 3,226,244, 2,223,187, 97,187, 84,232, 35,158,223,110, 81,176,251,
-110,126, 22,193,242, 52,240,224,123,112,137,108,164,185,190, 43,209,141,208,231, 95,106, 21, 7,207,108, 93,185, 13, 69,157,143,
- 91,218,122, 83,214,223,243, 88, 4,229, 65, 72,184, 92, 68,109,126, 18,152,102,215,163,116,252,240,134, 46,111, 45,154, 79,223,
-131,123,168,147, 50, 69,195,215, 84, 88, 90,193,106,219,159,137,150,182, 58, 54,133,102,204, 6,209,165, 69,125, 75, 57, 51, 29,
-103,238,238,149,243,253,125,104, 67,100, 23, 46,198, 33,175,141, 17,225, 67, 78,137, 6,156,101,231, 39,117, 55,148,110, 78, 13,
-209, 20,182,187, 18,127, 69, 36, 24, 70,184, 26,170,174,155,137, 21, 67, 39,212,149, 97, 45,208,231, 39,170, 1, 2,243, 64,151,
-125, 95, 34, 3, 31, 62,233, 30, 63,183, 77,238,101,207, 72,239,191,177,251, 4,183, 40, 86,141,168,209, 17, 27,185, 65, 38, 98,
-200, 31, 97,241, 27,242, 48, 50,211,117, 80,179, 74, 23,119,152, 43,180, 37,132, 14,130,159, 54,165, 84,172, 45, 52,156,248, 35,
- 57, 35,185, 32, 92,193,116,100,150, 35,201, 26,233,248, 10,114, 56,162,173,162,166,225,217,172, 44,171,113, 62,159, 56,148,133,
-163,174,200,122, 66,150, 83, 60,235, 51, 18, 74, 19,169,133,110,250, 94, 69, 56,175,149,227,187,103,236,205, 5,121,114, 5,191,
-112, 7, 95,252, 75,200,117,198,222,152,145, 95, 59, 35, 77,221,110, 52,123, 24, 75,137, 56,197, 14,251, 96, 80,128, 91,140,207,
- 20,217, 92, 1,102,198,116,191, 80, 95, 42,242, 53, 37, 61,202,222, 78, 31, 21, 62, 51,161, 31, 30, 73,207, 86,218,205,196,213,
-243, 53,132, 49, 62,102, 29, 17,164, 91,162, 26,251, 73,187, 71,157,174,198, 22,182,209, 85,164,214,101, 17,147, 97,119,158,184,
-198,109,133, 87, 23,247, 72, 62,250, 65,236, 83,191, 8,223,223, 60,136,166,196,245,177,198,202, 37,137, 39,202,201,174,221,216,
-188,215,116,254,121,140, 89,213,152,213, 56, 38,113, 33,250,213,132,126,102,242, 23,248,180,209, 94, 44,180, 82,105, 75,195,238,
- 43,181,238,190,227, 99, 96,126, 15,239, 84,142, 73,200,255,213, 63,235, 67,193,242,235,172,127,230, 55,184, 79,133,219, 55, 39,
- 78,109,128,135,116,195,248,105,204,172, 45, 94,212, 95,188, 3,239, 24,237,246, 76, 89, 79, 44,217,184, 59, 9,119, 75,163, 86,
-139,117,133, 79,124, 14,129, 25,222, 66, 94, 82, 0, 98,100,127,208,117,156,175,196,238,178,117,184, 76, 40,198,123, 75,219, 25,
-205,210, 97, 32,173,185, 54, 36,118, 34, 58, 41,114, 29,106,192,106,187, 90, 60, 78,206,118,223,168, 90,209,121,162,229, 74, 91,
-188,123,151, 52,163,150,162, 7,201, 17, 97,170, 78,148,107,177, 3, 76,130,213,234,133, 42, 9,199,199,137,229,108,220,190,104,
-126,244,146, 26,221,183,161,213, 15,244,190,207, 86,215,165, 12,166, 98, 25, 14, 43, 18,213, 93,213, 61,191,107,243, 81,163, 63,
-227,211, 54,195,109, 67,186, 84,138,110,178,137,143,122, 19,251,222,162,197,206,210,129, 63,141,220, 26,171, 53, 23,211,185, 88,
- 36, 28, 29,230, 59,116, 97,219,251, 75,168,209,231, 7, 42,109, 17, 56,102,225, 81,172, 0,102, 92,245, 62,197,234,232,212, 59,
-217, 22,118,181, 65, 92, 54, 13,141, 72,143,144,238,135,180, 24,210,109,187,126,217,226, 86,117, 43,106, 5,139,231, 73,242,236,
-117,107, 36, 75,219,110,187,196,206,197,215,136, 21,107, 45,120,240,145,106,215,131, 98, 46,118,230,114, 49,206,150,176,114,105,
-206,172, 49, 86,151, 86,185, 81, 37, 77,137,186,174,100, 85,102, 77,241,153, 8,117, 72, 49, 83, 27,211,230,108,171, 0, 93,127,
- 83,237, 19, 40,123,246,176,235,230, 19, 98, 91, 47,169,114,194, 3, 58,230,229,241,100, 3, 5,117, 91,181, 38,231,172,247, 6,
- 70,163, 19, 46,214,208, 90,120, 52, 31,152,231,153, 36,194, 9, 56, 45, 43,247,235,226,171,220,172,204, 6,115,118,194,129, 70,
-231,155, 85, 31,184,112,196,153, 13,165,144, 74,229, 56,207,212, 90,105,203,178,249, 86,229, 65, 83,187,129,198,182,131, 81, 26,
- 98, 87, 29, 99, 46,195,193,165,131,108,188,187,175,219, 24, 94,100,248,189,234,135,119, 77, 62,234,107,197, 17,217,182, 37,214,
-201,230,164,144, 97,125, 64, 10,161, 92, 22,241, 34,187,169,145,247,124,116, 6,128, 67, 15,161,232,153,204, 61,178,112,200,146,
-243,223,151,186, 96,192, 6,245,124,139,241,248, 14, 15,216, 24,190, 49,122, 79, 15,144,143,186, 61,191, 26,201, 90,144,233, 52,
- 14, 13, 1,178, 49, 67,214,157, 5, 47,226,172,247,252,248, 13,180, 9,106, 5,106,217, 78,143,102,149, 82, 87,218,114,166,214,
-133,181,173,174,138,111, 5, 53, 39,217,137, 42, 45,180,164, 82, 87, 18,174, 64, 92, 12,238, 17,242,237,138, 62, 93,177,199, 19,
-242,109,195,126,249, 41,242, 91, 95,133, 47, 92, 33,255,240,228, 7,132, 99, 66,107, 65,138, 56, 75,124,176, 58, 49,142,150, 58,
- 6, 63,188,193, 77,216,176,136,114,187, 80,179, 32, 95,141, 76,250,239, 61, 56, 31,254,123,103,244,249, 76,186, 47,228,251,202,
- 85,171,180, 96,126, 91,172,116, 82,236,238, 37,254,219,162,136,212,193,118,210, 71, 79,253, 6,110,221,184, 43, 6, 7,195, 78,
- 5,121,214,176,215, 22,100,126, 10,250,143, 33,175,127, 14,251,220,215,144,227, 17,206, 11, 76, 9,185, 6, 61, 10,243, 29,187,
- 48,178,231,144, 91,143,163, 29,252,232,106, 27, 69,237, 42,195, 85,138, 46,253,181,236, 79,148, 23, 94,200,237,212,176, 82, 89,
-207,141,115,236,146,115,130,131, 26,215,207,141,235,247, 27,135,191,240, 59,225,181,239,131,250,183,105,255,205,175,115,255,203,
-207,185,251,129,196,125,136,245, 54, 81, 38, 3, 46,183,198,206,163,189, 15,229,171,216,183,111,225,214,168,207, 23,214, 83,229,
- 14,225,188, 6,253, 45,118,179, 73, 96,158,247,245,212,164, 67, 38,250,228,154,130,108,226, 33, 35,137, 13,130, 68, 4, 68, 28,
-212,161, 44, 86,119, 52,103,210, 56,133, 75,132,252, 20,131, 99,114,172,235,117,232, 25, 68,161,149,184,103,186, 90,222,224, 62,
-188,197,139, 33,147, 97,211,236, 31,206,148,193, 20, 61,133,143,176, 21,106, 43, 36,102,144,138,152,211,197, 74, 13,161, 79, 60,
-137,143,215, 74, 89, 45,242,220, 91, 20,141, 22, 22, 59, 11, 62,133, 23, 46,107, 59,155,194,146,132,227, 98, 39, 40, 90, 18,106,
-171,155,109,104, 23,110,218, 6,157,234,249,237,210, 31, 32,205, 59,118,149,202, 18,226, 50, 34,184,166, 90,115,239,127, 51,154,
-181,173,251,222,233,109,238, 65,151,104, 40, 52,200, 90, 41, 50,213, 43, 66, 49, 99,138,208,154, 42,158,147,254, 40, 68, 66, 55,
- 24,143, 66, 76,123, 14,245,253,125,147,109, 59, 93,163, 43, 94,204,191, 99,141,226,118, 97,233,165,179,225, 29, 38,212,243,229,
-109,244, 85,119,220,170, 25, 90, 11,154,178, 71,211, 70, 87,219, 66,112, 88, 91,159,138,250, 29, 91, 91,163,152, 79, 14, 90, 95,
- 67, 12,225, 54,109, 40,132, 98, 70, 13, 79,188,150,178,117,181,103,132, 84, 11,211, 52,123, 23, 26, 64, 22,217,152,239, 35, 25,
-225,178, 88,239, 98,187,189, 32,136,109, 81, 50,151,177,170, 23,249,114, 50, 28, 57,118, 70,133, 13,107,215, 20, 35,242, 50,116,
-187, 35, 17, 80,251,103,170,238,169,239, 19,177,141,170, 22,211,201, 89,132, 73,149,220, 29, 75,235, 66, 41, 43,143, 83,246, 64,
- 33, 77,155, 48, 17,221,179, 70, 69, 98,234, 17,171,146, 20,130,183,165, 53, 78,203, 25, 13,203, 97, 75,142, 76,255, 88,186,172,
-202,142,243,147,135, 0, 30,217, 14, 9, 61, 21,110, 43,200, 41,111, 68, 77,215,175, 57, 79, 69,165, 33, 41, 15,127,198,175,121,
- 11,143,188,196,122,101, 19, 30,251,206,218,127, 95, 88,190,115,146, 94,196, 7,191, 92, 87, 21,142, 24,190, 30,152, 16, 70,122,
-177,221,155,238,169, 52,122,153,166,163,151,244, 48,185,176, 53, 92,142, 91,236, 65, 84, 94, 15,150,215,126,160, 48,115,163,125,
- 50, 52, 77,152,212,232,110,186,186,216, 80,107,104, 91,209,150, 72,229, 68, 62,223,146,174, 95,113, 59, 79, 4,206, 52,204, 85,
-218,205, 48, 10,218,140,165, 24, 42, 43, 55, 52,116,242,113, 72, 46,133, 66,245, 29,162, 85, 68,252,193,178,152,144, 84, 40, 84,
-166,151, 11,118,154,125,156,248, 43, 11,246,249, 59,248,204, 4, 95, 58, 34,207, 3, 66,160,201, 17,141,186,147,179,236,129,208,
-133, 14,153, 8,167, 67,233,227,204,228, 76,215,249,197, 61,124, 27,242, 98,232, 1,223,175,223,100,228,139, 87,164,143, 86,210,
-237,202,213,234,194,154, 83, 20,102,139,170, 58, 69,231, 94,213, 17,231,171,236, 69,174,119, 24,107, 53,230, 0,162,228,201,255,
- 33,187, 77,141,219,234, 2,178,115,134,250, 2,202,123, 48,127, 30,121,243, 27, 48,205,158,212,114,173,164,155,153, 41, 47,208,
-224,145, 54, 78, 83,140, 10,207, 70, 75, 59,225,169,169,167,169,165,216, 97,206, 73,184, 50, 72,179,122,151,126, 61,249,232,253,
-174, 96, 75, 88, 6,106,165,174,230,123, 61, 17,142,201,184,169,112,245, 27, 43,215,255,214,247, 34, 63,245,135,160,254, 93,248,
-165,239,176,252,103,223,102,249,158,196,162,176,174,238,147, 79, 41, 20,173,253, 3, 63,168,135,208,144, 97,253,154,255,243, 94,
-197, 14,126, 83,148,210, 40,230, 55,125,138,148, 45, 11,237,129,180, 16, 29, 70,173,213, 14, 0,103,183,118,164, 9,210,226,221,
-122, 45,126, 17, 79, 73,252, 51,142,162, 30,231, 91,159,148, 76, 61, 20, 41,238,185,158, 66,146, 35,189,239,190, 33,209, 36,200,
- 33, 78,104,247,133,214,247,230,243, 68,187,186, 70,152,253,128,107, 32,101,161, 74,133, 86, 60, 92, 34,207, 80,205,173, 55,161,
- 83,217,227, 33,149,151,167,198,139,175,159, 41,171,145,115,127, 16,245,123,175,109,185, 1,169, 99, 69,101, 55,151, 98,227,248,
- 56, 96, 53,109,223, 53,118, 85,187, 53,118,165,182,238, 34,192,109,108,169,196,129, 59,236,164,205, 11,167, 2, 55, 98,204, 41,
-108,178, 81, 80,196, 60,141,108,238,252,252,120,170, 46,209,121, 37, 13, 81,108, 56, 64,102,220, 50,121, 37,198,141, 65,214, 70,
- 50, 15, 28,138,109, 89, 60, 23,124,152,115, 14, 54,184, 19,121, 53,148,213,221,183,174, 91, 23, 75,216,169, 82,232,130,146, 40,
-215,129, 45,182, 45,122, 90, 6, 94,157, 11,165, 22, 51,164,214, 16, 11,123, 33,209, 13,124,101,219,107,233, 98,186, 66,172,238,
- 34,205,178, 62,200,133, 87,131, 41, 5, 25, 48,246,253,165,249,207,152,187,176,170, 85,178,121, 76,117, 63, 20, 16,116, 53,213,
-208, 22, 89,123,144,189,185, 79, 5,182, 67,224, 69,124,237,174, 81,223,145,166, 18, 62,243,113, 29, 40,157,155, 18, 94,255,189,
- 32, 84,187,204, 87,235, 5, 49,117,141, 85,242,155,171, 95, 82,125,197,210, 35,193, 15, 41,115, 61, 31,152,166,137, 69,132,181,
- 84, 82, 51,174,231,153, 73,117, 32,245,133,117, 46,234,193,214,188,118, 33, 95,252,251,100, 80, 83, 98,137,157,186,104, 66,163,
- 8,167,160,196,245, 28,143,113,207,190, 43,229,189,187, 74,219, 97, 45,242,220,219, 30,236,226, 3,183, 70,211,208,141,116,209,
-185, 78,238,226,194,168, 45,212,199,107, 25,178,212,195,198,217,239, 75, 42, 86,195, 21, 54,101,242,116,240,162, 46,221, 99, 25,
- 93,250, 88, 84,115,156, 3,251,169, 96,227,229,110,233, 51, 67,118,174, 61, 0,250,199,131,163,143,242,253,130,244, 11,127, 31,
- 89,200,198,148, 47, 33,154,146,160,206, 73, 31,247, 7,227, 84,106, 65,114, 70,167,201, 71,167, 33, 96,240,177,125, 35,203,180,
- 37, 89,229,186,144,150, 19, 58, 77, 33,250,240,130,190,134,247, 55, 77, 71, 82,169,148,213, 56, 47,149, 99,134,156, 39,214,101,
-197, 20,180, 86, 39,204,217, 46, 5,170,166, 20,171,126, 48,123,185, 96,167,234, 47,248,195,130,188, 91,224,179, 71,248,129, 43,
-244,155, 39,236,219,133,118,181,146,238, 61,220, 99, 29, 68, 37,109, 96, 70,111,105,193, 67,144, 70, 1,172, 68, 26,215,189,113,
-144,123,184,111,228,217,208,171, 87,225, 21,133,215, 51,250,197, 35,233,101,161, 45,149,235,211, 26,116,171, 62,234,222, 39, 41,
- 83,160, 93, 79, 65,249,202,189,195,244,160, 58,146,121, 50,216,156,118, 50,154,157, 27,246,172, 33,183, 6,207, 43, 60,186, 7,
-249, 22,200, 91,240,228,245, 8, 66, 89,163,147, 20,178,206,232, 79, 28,121,242,141, 59,206, 31, 22, 22, 51, 7,158,196,107,104,
-178,239,232,102, 53, 30,101,229, 38,195,181, 24,249,241,132,190, 53,123,165,127, 81,220,227, 31, 48,161, 13, 35, 43,238,150, 56,
- 34,220,124, 99,229,234,159,252, 20,250,167,254, 69,168, 95,129,167,191,193,250,175,125,149,245,181,198,250, 88, 40, 75,140, 89,
-213, 34,159, 28,242, 44,232, 49, 35,175, 39,143,185, 77, 25,234,219,216,203, 2,183,130, 61, 50,135,251,100,183,202,117,228,173,
-245,135, 11, 46, 96,156,122,104, 81,236, 24, 58,201,184,143,157, 36, 41, 51, 70,142,208,140,102, 30,216,162,215, 26,137,107, 70,
-214,240,143, 7,171, 65, 82,140,190, 38,233,150,129, 56,208,164, 93,169, 98, 65,144, 58,227, 91,229, 99,114, 61,246, 60,251, 53,
- 88, 22,228,182,248,228,100, 58, 96,156,225,254, 76, 59, 36, 40, 46, 18,213,161, 19, 18,141, 71,238, 82,188,152,171,112,152, 92,
-136,216, 12,114,147,144,234, 4, 9, 43, 86, 60,151, 15, 95,183,224,136, 64,233,194, 67,149,205,122,227,173,243, 8, 81,209, 45,
-106,150, 80,206,203, 64, 50,171,190,163,218, 82,186,174, 98, 61,116, 29, 98,189,206,166, 80,243, 85,207, 78,147,219,131, 89, 52,
-108,115, 41, 32, 87,130,241, 72,140,163,134,157, 13,120, 36,198, 85,242,209,252, 83,217, 61,237,247, 1,156,186, 53, 47,236,247,
-225, 99,239,212,198, 98, 18, 49,165, 18, 65, 41,225,194,136,231, 91,147, 68, 82,229, 17,112, 85,205, 25,236,209,173,237,132,224,
- 40,120, 98, 44,120,104,136, 84, 65,226, 73,219, 6,149,187,197,201,167, 99,181,183, 92,141, 78, 66, 27, 60,222,143, 82,226,234,
-112,160, 73,226,108,141,218, 92,135, 82,204,208,214,200,234,150,224, 28, 66,197,132,175, 19,155,213,173, 67, 77,193, 23,175,173,
-109,220,117, 25,236,102, 15, 49,176,250,192,189,173, 97,173,234,148, 61, 25,208,182, 91,212,234, 32,163,223,119,242,151, 60,127,
- 17,225,144,156,213,222, 15, 7,205,204, 41,125,182,103, 6,136,193,181, 40,143,230, 3,215,199,153, 98,110, 11, 43,117,197,172,
-113, 94,171,167,204,137, 79,129,114, 82, 74,206,254, 51,154, 81,117,159, 73,244,235,184,198,122, 55,139,135,191,156,154, 91,203,
-146, 42,150,220,121, 69, 78, 46,196,142, 52,209,206, 16,222,210,215,182, 32, 50,221, 14,161, 61,144,193,194,217,225,159, 19, 33,
-248,219,237,141, 93, 4, 87,171,255, 76,119, 65, 52,184, 8,180, 29,184, 39,157,114,152,103,242, 97,118, 74,160, 88, 88, 87,122,
-250,146, 74,248, 95,141, 36,251,120, 96,191,184, 2,201, 23, 71, 53, 13,244,100,139,236,114,122,135, 30,194,168,141,248,164, 67,
- 18,141,236,169, 64,187, 27,113, 23,120, 73, 87,253,234,238, 99, 86, 12, 41, 11, 36, 69, 15, 71, 36,103, 39,206,181,182,137,175,
- 84,253, 20, 53,165,196,148, 5,105,103,100,173, 52,157, 41,129,237,236, 76,102, 13, 63, 87,170, 43,181, 44,156, 16,174,167, 22,
-239,185,251, 4,125,132,216,237, 62,221, 67, 89, 68,169,119, 13,121, 94, 92,149,254,116, 69,190,181,192, 77, 48,203,191,255, 26,
-121,122,130, 37, 35,199, 66, 90, 27, 97,123,220,160, 16, 18,113,134,102,251,158,189,217, 16, 9, 41,134, 85,113,255,239,217,200,
- 47, 78,208, 26,249, 58,161, 63,250,200,237, 87,111, 29,200, 31,172,216,217, 35, 67,231,165, 58, 73,106,208, 70, 72, 4,136, 28,
- 38, 31, 91,175,129,146, 76,120,129,186, 74,177, 3,236, 93,123, 63,168, 95,137, 63,245,238, 11,188,200,216,203,132, 76,207,189,
- 21,205,175,130,156, 65,110,247,157,204,191,252, 26,250,227,143, 56,252, 59,223, 68,191,245,130, 44, 70,202,205, 87, 32, 98, 17,
-239, 27,254,226, 4,215,185,241, 24, 99, 62, 78,164,207,207,240,218,236, 77,221, 51,224,189,234,106,163,190, 14,154,225,170,130,
-170, 49,127,171, 49,191,117,133,254,231,127, 20,236, 67, 40, 95,165,254,153, 95,163,220,159, 56,125,175,112, 90, 59, 10,221, 59,
-144,131,250,168, 54, 29, 18,250, 74, 70,222,200, 94,212,173,193,253, 61, 60, 51,120,182,208,158, 47,212,151,197, 21,237,177,255,
-206,225, 97,238,158,230,156,136,247,165,200, 33,102,165,159,196,186,188,241, 56,225,180, 24,118, 10,171,207,148,134,104,225,160,
-100,217,126, 51,115,136, 49,252, 41,204,248,115, 66, 87,131,165, 33, 57,193,245,140,149,105,131,247, 52,245, 17, 29,107,129,219,
- 6,215,205, 11,181,202,255, 75,215,187,198,218,150,101,247, 93,191, 49,230, 92,107,239,125,206,185,239,186,245,174,174,174,114,
- 87,187, 95,238,216,198,118, 28, 36, 68, 94, 8, 41, 33, 65, 68, 40, 49, 8,137, 15, 17,144, 8,129,136,248, 18, 66, 4,124, 32,
- 10,124,228, 67,132, 0, 5, 41, 34, 18,137, 18, 18, 57, 74, 8, 81,162, 32,199,177, 99, 76,251, 17,219,221,233,118, 63,171,186,
-222,117,235,190,206, 99,239,189,214,154,115,240, 97,140,185,214, 58,213,198, 82,169,219,213,247,158,199,222,123,205, 57, 30,255,
-255,239,143,217,132, 92, 29, 66,104,174,238,161, 47, 70, 74,134, 78, 26,100,171,224, 11, 4,154,204, 45,116,186, 36,194,133,237,
-180,145,227, 28,227,108, 51, 19, 93,215, 99,223, 48, 36,123, 70, 68, 93, 44, 98, 81, 16,215, 54, 41,105,207,127,112,251,179,250,
-207,165,113, 96,167,168,228, 45, 70,224,187, 16,176, 53, 36,114, 31, 45,253, 28,247,218, 20,228,213, 24,196,187,251,109, 53, 54,
- 24,155,152,225,102, 51,127, 47,155, 67,193, 55, 28,108,146,143,201,235,136,175,106, 90,202, 92,187,200, 87,148,179, 41, 38, 19,
- 37,136,110, 53,110, 39, 93,197,225, 74,179,147, 69,150,249,221, 84,216, 35, 12,243, 9,167,179,127,123, 46, 98, 48,174,106, 97,
- 50,119,113,136, 38,191,116,155,128,173,117,210,234, 40,235, 36, 53, 16,178,161,188,143,247,225, 68,133, 27,253, 22, 82,102, 31,
- 10,247,100, 70,175, 9, 83,165,212, 8,171,210, 37, 58,203,163, 3, 92, 40,214, 4,120, 77,185,174,162,113, 54,213, 89, 39,114,
-141, 24,247,137,139,220, 86, 24,216, 18,107, 27,189, 6,230, 89,121,188,171,204,208, 33, 93,197,250,182,198,177, 71, 56, 73,137,
- 77,191,225, 40,194, 52, 77,115,119, 95,205,102, 17,117, 1, 78, 68,184,185,221,176,219,245, 20,131,171, 50,113,113, 56, 80,198,
- 66,210,134, 28,110, 59,231, 74, 53,245, 53, 13,194,104, 21, 43, 50,147, 78, 97,137, 52,157, 67, 90, 36, 99,253,134, 50,142, 62,
- 49,233, 58, 76,149,161, 20,108, 58,206,238,134,182, 14,152, 87,198, 49,189,105, 59,255,164,134,106,142,149,156,107,138,106,153,
-144, 41,244, 69,184,189,206,112,215, 86,109,191,115, 78,212,113,188,238,156, 90, 79,211, 53,185, 29,188,235,125,239,110,134, 78,
- 35,185,209,110,146, 88,252, 48, 13,251,186,188, 41,105, 22,207,173, 2, 88,108, 81,175, 54,118,132, 10,171,172,216, 54,198, 95,
-109, 90,196,171,108, 23, 4,233,108, 99, 19,107,187,188, 37, 36, 97,238, 98,194,139,167, 81,226,217,112,240,175,189, 57,129,148,
- 17, 70,143,112, 77, 41,236, 41, 70,103, 5,173, 6, 82,220,246, 33, 27,175, 74,169,241,245, 12,246, 7,216, 95,160, 86, 48, 77,
- 28, 20,100,156, 56,209, 26,118, 17, 39, 48,165,198,171,196,211,142, 42, 49,206, 54, 72, 79,134, 24,147, 42,245, 27, 71,244,165,
-141, 43,213, 63,181, 65,223,222, 98, 99,161,142, 19,249, 48,146, 71, 99,140,162,168,169,207,215,226,145, 89,197, 26, 7, 76,198,
-119,144,213,252, 98,207, 90,217, 61, 60,194,215, 47,232,118,130,124,118, 7, 39, 9,121,109, 67, 26, 38,236, 56,209, 31, 11, 35,
- 49,102, 15, 98,157,197,195,211,169,199, 52, 86, 60, 16,166,226,108,155, 77,110, 41,110,174, 36,146,236,163,127,233,241,194, 33,
-197, 50,113, 12,227,116,154, 32,221,129,238, 4,248,216, 47,127,128, 95, 61,192, 47, 92,113,124,115,160,244,126, 66,246,147,143,
-242,187,184,212, 53,116, 19,189,192, 89,129, 93,175,164,155, 29,122,167, 71, 78, 51,100,144, 27, 9,249,209, 45,250, 0,236,109,
-239, 76, 21, 79, 53,211,143, 42,221,101,162,251,235, 63, 1,105, 15,229,155,212,255,249,251, 28,126,233, 49, 23,175, 43, 23, 71,
- 31,167,150, 54,161,104,187,251, 4,218,169, 83,240,158,237,252, 84,183, 61,118, 81,224,195, 3,245,205, 3,211, 59,123,142, 79,
- 39,246,189, 95, 66,225, 6, 35,169,197, 78, 47,190,102,167,232,205,206, 33, 49,182, 36,136, 72, 9, 91,209,228,221,187, 24, 88,
-175,115, 39, 47,185,241,130, 99, 15,110,235,232, 92, 9, 79,120,109,202, 32,215,139,140,130,222,190, 9, 63,114, 11, 6,165,126,
-235, 10, 27, 14, 78, 80,196,224,120, 5,135, 1,203,201,139,220,228, 11,111,187, 26, 40, 67,133,109,239,232,200, 18, 62, 58,131,
-100, 19,211,116,221,127,155,128,105,138, 52,198,134,100,166, 6, 79,123, 57,112,167,249, 32, 95,248,218, 9, 15,238,105,235, 54,
- 31, 41,250,225, 45, 17, 67,170,248, 33,183, 22,221,106,251,194,169, 93,226,204, 77, 67, 75, 60,219, 38,143,178, 77, 10,155,176,
-137,165, 86, 8,151, 74,103,117,158, 62, 72,117,161,220,214, 99, 3,226,185,181,217,249,215,244, 13, 38, 53,104,150,139,157,237,
- 18,175,165, 26,188,133, 85, 62, 56,234,249, 16,230,179, 15,199,235,134,160,175, 29,178, 85,220,254,155, 76, 24,129, 93, 82,238,
- 3, 15, 98,234,209, 37, 15,185, 26,163,123,254,100,146,217,100,149, 99,153,232, 85, 81, 73,116, 98,177,178, 75, 76,181,206,235,
-201,169,250,153, 80, 26,247, 82,124, 34,209, 73, 98, 82,229,106, 26, 25,166,137,222,224,164,235,208,156, 29, 37,145, 36,194,184,
-116,241,130,199, 51,178,209, 68, 73,142, 10, 46,120, 1,208, 70,176,134,206,226,214,235, 29, 98,109, 50,102,111,220, 86,184,227,
- 58, 47,102,214,177,202,205, 41, 16,103,122,156, 73,149,235,107,215,132,115,218,181,239,184, 52,152,166, 17,177, 58,143,248, 83,
- 43,136,128, 83, 21,238,108, 54,156,156,156,112,196,216, 15, 19,231,227,145, 50,142, 97,135, 91,241, 87, 26, 15,164,184,214, 67,
- 83,132,126,155,145, 34, 12, 5, 19,114, 78, 46,198,171,222,201,214,184,179,186,156,200, 57,163, 57,177,159, 38,234,126,152,195,
-142, 70, 98, 12, 82, 0, 0, 32, 0, 73, 68, 65, 84,100, 61,177,142,238, 60,229, 20,223, 35, 68,109,154,130, 0, 89,252, 66, 87,
-161,142, 81,148,118,201, 87, 33, 17, 6,227, 90, 52,241,206, 39,172,214, 51,223, 97, 94,109, 11,218,117,104,234,144,228, 36, 61,
-139, 17,143,249, 61, 26,129, 12,113,161,187,197,173,141, 82,108,222,165,251, 47,111,115, 50,206,236,213, 8,218, 92, 90,177,198,
-175,133, 74,173,197,117,171,218,205,137, 89, 30,163,144, 84,220,163, 45,159, 64,206,174,162, 25,197, 19, 38,252,191,143, 7,191,
-156,251, 29, 41,119,179,192, 45,165, 52, 71,238,121, 84, 93, 98, 40, 19,133, 35,208, 35,177,208,116, 64,254, 68, 46,197, 83,209,
-106, 97,154, 38, 46,199,209,173, 75, 86,232,196, 40,105,237,173,176, 25, 5, 89, 13,166, 82,232,175, 10,182, 29,253, 34,255,184,
- 98,223, 72,200, 23,207,252, 20,121,227, 12,189, 24,168,135, 14,221, 78, 1, 62,241,241,102,147, 20,213,232,210,235, 10, 29,219,
-130, 23,166,128, 79,148,160, 17, 13,225,191,188,245,209, 21,124, 85,232, 78, 4,249,212, 9, 60,211,161,251, 13,250,100,162,187,
- 42,236,246, 19, 99,136,230,202,234, 61, 81,241,105, 65, 19,109,137,192, 73,246,142,170,101,147,159,116,208, 63,151, 73,187, 4,
-123,195,158, 76, 88, 82,100,175,112, 72, 80, 50,108,134, 88,153,220, 3,253, 62,236, 70,143,140,253,213,115,234,229,196,208, 85,
-232, 96,115,244, 2, 33,137,103,133,111,213, 65, 33, 93,251,172,117, 74,186,223,147, 94,219, 33, 63,116,226,254,244,139, 10,187,
-138,222,239, 96, 55, 81,190,191, 28,190,250,212,208,183, 10,253, 95,124, 13, 94,126, 17,134,223,134,175,124,204,241, 47,189,199,
-229, 11,194, 83,131, 97, 50,134, 41, 54,124,137,217,146,101,120,112,137,220,202,112,214, 33,155,228,183,255,177,194,199, 3,245,
-225,192,244,112,100,175,206, 21, 47,171, 24,211, 28,192,152, 90,133,205, 70, 72, 55,178,239,223, 6,107, 33,210,126,116,180,185,
-105,245, 86,207,250,152, 67,237,146, 87,104,166,158,112,150, 13,180, 32, 99,228,131,155, 3,101,100, 20,164, 38,140, 66,213, 4,
-121,139,228, 45,242,133,219,240,233, 29,124,237, 17,114, 12,242,119, 49, 24,143,179, 87, 78,108, 5, 81,221, 79,110,253,236, 58,
-167, 87,237, 27,133,202,144,105,154, 45,140,204,211, 52,127,230, 58, 13, 57,148, 22,116,114,177, 85,242,164, 24,223, 97,202, 90,
-229, 28,227,230, 16,177, 57,110, 88, 22, 16, 77,219,237,199, 65,221, 5,230, 54,205,200,100,175,152, 70,241,237,180, 0, 82,204,
- 99,109, 81,122, 42,167,169,210,155,119, 57, 89,133,190,198,184, 51,198,201,106,190, 71,239,108, 97, 34, 52,199, 9, 26,137,120,
-106, 43, 86,108, 3, 37, 41, 83,177, 25,161, 60, 69,177, 50,196, 20,111,190,104, 37,113, 72,137,130,172,228,164, 50, 59,128,150,
-151,161,169,194, 23, 38,185,161,220,204,194,157, 82,157,172, 40,145,135,209, 32, 56,226,239,117,155,110,182,250,106, 50,159, 86,
-172, 87,154, 35, 30,229,123, 52,207, 80, 47, 33, 22,172, 43,127,122, 1,134, 90,217, 79, 19,157, 21, 54,185, 39,165,124,221, 78,
- 53,131,197, 90,231, 93, 99, 21, 36,228,148,221,243, 95, 67, 46, 87, 22,176, 87, 35,141, 54, 16,139,217,114, 46,175, 19,211,248,
- 4,179,192, 86, 75,121,227, 19, 57,186,171,228,187,101,223,238,121,231,169,203,238,131, 95,173, 87, 45,206,221,214,160,108, 85,
-185,209,247,244,253,142,139,105,226,106,154,152,202,228,116,183,150,146,214,242,215, 87,191,179,198, 24,159, 82,189,240, 22, 13,
-202,160,206,113,164, 54, 67,149,108,229, 76,114, 96,205, 4,179,230, 67, 86, 48, 47,211,180,248,243,163,186, 45,181,132, 30, 34,
- 45,235,138, 0,218,248, 42, 73,208,212,161, 93,231,133,218, 52,185, 69, 47,231,248,125,149, 58,121, 46, 59,215, 0, 84,113,161,
-119,157,107, 13, 34,166,181, 80,103,222, 74,150,192, 87, 58,136, 36,199, 51, 16,192,144,160, 57,181,156, 88, 89, 91, 22,164,117,
-210,139,162,213,154, 78, 82,100,137,212, 91,147,122,140, 25,153,233, 85,185, 95,228,206, 24,110,227,169, 37,115,220, 43,240, 69,
-149,223, 10, 16, 49, 96, 60,186,122,180,219, 32,217,129, 50, 93, 74, 33,126, 80, 38,212,195, 7, 74,129,114, 9,226, 57,185,146,
-178,123,177, 49, 87,130, 6,129,173,214,137, 90, 43,135,201, 15,146, 19,117,161, 84,153,194, 75, 58,115,152,226,124, 16,168,211,
-132,158, 39,108,116, 89,182,253, 11, 69, 62,123,234,106,181,187, 9,121,225, 4,189, 26,169,251,145,124, 53,145,165, 48,182,137,
- 67,120,114,219,254,219,194,233,178,142, 34,156, 9, 82, 85,226,242, 53,108,130, 59,239, 94,162, 95, 85,242, 89,130,231, 54,200,
-243, 27,210,147,138, 93, 76,228,177,176, 25, 11, 99, 8, 52, 90, 70,114,139,222,148,128,151,109, 49,118, 59, 65,122, 33, 63,246,
-110,160, 59, 83,244, 70, 66, 78, 19, 92,196,110,247,178,192, 69,129,167, 19,118, 43, 33,155, 61,228,167,192, 13,255, 66,201, 96,
-107,112, 35,118, 67,131,119, 76, 57,138,177, 28,126,245, 19, 96,115,166,200,221,140,156, 40, 88, 38,223,233,209, 31, 62,129,231,
- 59,159,109, 94, 84,236,219, 71,234,135, 71,170, 76, 62,134,142, 0, 21,222, 44,244,191,247, 30,250,199,222,128,195,155,240,232,
-192,240,103,222, 97,184, 47,140,119, 18,245,202, 69,143,174, 19,104,192,155, 80,218, 91, 66,183, 29,242, 92, 7, 55, 60, 97,201,
- 46, 39, 24, 10,118, 94,195, 15,236,227, 17, 53, 15,186,105, 62,254, 17, 97,168,222, 1,230,248, 25, 37,132, 17, 94,176, 46,237,
-174,133,220, 94,178, 46, 97, 14,130,143, 67,170, 11, 39, 92,121,175, 81,164, 86, 82,205,232,233, 22,254,216, 11,254, 26,252,181,
- 39, 72, 45,216,118, 3,247, 51,182,221,195,215,174,176, 55, 71,108,179, 65,108, 32, 93, 14, 62,109, 32,251,154,104,147,225, 94,
-239, 54, 68, 5,170,162, 71, 79, 94,180,134,163,148, 58, 91, 28,115,245, 75,168,117, 76, 62,154,140, 67,170,113,133, 67,189,222,
-114,213,211, 42, 6, 85, 34,202, 19,107, 44, 31,187,198,165,104,149,112,167,174,153,192, 92,132, 54,177, 32,217,124, 12, 95, 60,
- 57,204,140, 94,161,163,178,203,198,137, 25,189, 88,232,100, 42,105,178, 57, 18,182,171,204,154, 4, 77,126,137,203,182,141,249,
-252, 61, 52,109, 56,218,216, 21, 92, 78,112, 48,198,193, 24,173, 54, 66, 39, 67,248,212, 75, 60,103, 87, 6, 7, 83,174, 52, 81,
- 77,200,237, 54, 88, 97, 79,155,248,169,185,127,170,197, 68, 35,132,114,168,114,196,232, 49,238,102,227,114,132, 75, 81,178, 86,
-166,178,116, 90,110,255,108, 81,164,110, 87,115, 81, 86, 9,237,146,206,112,152,169,165,167,205,177,157, 45,242,211, 47,222, 81,
-148, 82, 38,183,239,229,206, 99, 65,215,128, 48, 91, 58,234, 34, 11,156,162, 70,115,213,139, 96, 17,100, 66, 89,244, 85,173, 67,
- 87,105,132,137, 5, 94, 51,195,195, 68, 87,138,246,197,143,110, 43,118,189,179, 11,236,218,212,246,147,220,246,134, 85,157,170,
-133,240,122,217,119,183,180,201, 12,108, 83,162,203,153,162,153,115, 43,236,199, 1,105,226,202,217, 42,108,139, 18,223, 22, 4,
-250,218,251,222, 52, 26,196, 5, 43,171,253,125,219,217,183, 66,189,121,196,169, 49,117,233,250, 85,120,139,251,230,153, 3, 86,
-154,138, 95,230,132, 57, 23,171,118, 94, 96,148,202, 38, 37, 58,221,206,130,200,105, 28, 40,165,248,179, 92, 11,168,250,125, 84,
-166,216,213,199, 94, 62,185, 18,223,125,227,205, 38, 61, 49,141, 35,101,114, 81,172,133,181,114,166, 33,229, 80, 69,206, 56,213,
-230,121, 14,165,110, 83,232,206,113,111, 49, 64,153,247, 42, 81,249,172, 7, 76,178,234,216,219,161,226, 74,209, 22,137, 56,167,
-179,207,204,248,197,202,182, 88, 30, 48,255, 59,218, 2,235,235,228,221,138,129,110,149,156, 55,164,228, 7,246, 84, 43,227, 56,
- 96,157, 7,223,215,241,136,217, 49,126,164, 62, 58, 27,255, 32,187, 98,126, 36, 89, 13, 5,100, 88, 96,170,209,213, 66,166, 50,
-181,204,160,216,145,212, 16,205,236,199,194,166,236, 73, 99,134, 83,168,211, 17,249,246, 21,242,229, 19,120,111,132,151, 54,232,
-199, 61,118,121, 68,247,137,124,152, 72,161,130,100, 78,253, 89,108, 42,165, 46,108,225,107, 49, 58,141,126, 36,158, 46,149, 71,
- 35,189,123,133,124, 51,147, 78, 4, 78, 59,244, 83, 27,242,121,161,150,194,201, 71,133,146,124, 95,105,173, 0, 97, 41,168, 54,
-163,113,114, 91, 73, 47,119,176,201,232,217, 72,125, 80,208, 93,242, 67, 82, 4,185, 25,149,107, 50,120, 92,145,179, 2,119,138,
- 19, 54, 78, 30, 67,221,185,120,107, 10,185,240,165,161, 7, 71, 24, 38,169,140, 42, 36, 42, 39, 25, 78,179,120,177,112,183, 39,
- 61,223, 33,197,105, 7,114,175,131, 27, 25,134,248, 4, 13, 30,179,106, 67,161,166,226,118,207, 78,168,111, 87,186,215,110,208,
-253,165,207,195,241, 28, 46, 6,234,127,248, 38,165, 76,112,187, 35, 87, 69, 58, 63,168,164, 84,180,214,153,148,183,153,140,116,
- 75,209, 23, 58,120,182,119, 66, 95,173,126,154, 31, 10,236,253,123, 73, 31, 58, 53,112,236,108, 13,113,147,152,211,208,162, 72,
-234, 70,159, 44,117, 40,253,105,162, 30, 42,146,234,117, 74, 86,246,238, 55, 50, 61,253, 54,220,184,216, 65,102,242, 12, 72,238,
-161,219,193,139,183,224,245, 23,224,159, 63, 66,166,228, 10,248,103, 43,246,170, 97, 39,138,188,237,251, 53, 59, 76,144,139,175,
- 60,162,210, 21, 83,172, 83, 56, 53,184,161,112,186,243, 61,252,211, 3,105, 16,236, 32, 14,223, 48,168,154, 72,181,132, 47,220,
-174, 81, 31,101,197, 19,104, 71,159,202,146,106,214,148,224, 22,241,157,115, 50,151, 44, 97, 46,237, 83,157,212, 45, 99,205,250,
-213,148,218,199,226, 57, 7, 41, 45, 7,110,159, 96, 23,174,134,173,193,137, 86,250, 90,232,173,178,105,221,109, 76, 20,146,170,
- 11, 14,183,201,157, 0,219, 16, 27,206, 4, 35,159, 81,203,177, 98, 79, 39,120, 50, 49, 94, 85,142, 67,229, 88,224, 74, 96,180,
- 37,139,189, 21,211,163,193, 30,229, 42,176,169, 73,213, 83, 45,219,142,117,150,123, 89,136,192,154, 45,207, 60,101, 77,117, 53,
-176, 55,143, 16, 16,225,166, 8,119,181, 50, 33, 84, 81, 58,113,212,113,138,253,249, 36, 30, 34,229,144,150,130, 21,167,185,169,
- 36, 84,109, 41, 78, 85,209, 90,231,233,145,138,239,132,107, 49,122, 21,186,228, 23,107,142,152, 81, 85,117,133,124,248,224,137,
- 51, 83, 26,146,148, 21,136,170, 17,228,204, 47,253,172,194, 72,195, 34, 54, 94,191,175, 63, 77,212,145,215, 86,127, 64, 74,194,
-117,211,219,181, 0,151,181,224,100, 33,136, 6,124, 74,163, 96,152, 39,150,203,184,191,157,133,105, 30,205, 43,170,221,236,245,
- 31,135, 8, 55,177, 69,127,211,172,105,242,131,230,179,101,119,222,194,127, 44,144,171, 45,241,115,149,133, 94,106,101, 42,197,
- 31,225, 6,146,105, 59,253,190, 99, 76,202,116, 28,194,206,162, 75, 60, 50, 66,210, 24,191,207,150,209, 64,218,154, 83, 30,114,
-151, 57,212,202,120,181,103, 26, 71,191, 7,106,197,198, 33,166,193, 29,101, 26, 34, 90, 85, 80,241,221,185, 38,127,111,253, 18,
- 77,212, 50, 57,199,190, 70,151, 94,252,147,153, 9,155, 73, 10,149,184,136, 43,127,173,145,191, 84, 2,189, 26,151,130,206,193,
-216,177,167,105,241,172,109, 76, 35,243, 88,121,237, 57, 71,150, 74,183,141,161,116,133, 14,154,185,207, 51,140, 98,153,240,203,
-106,151,183,142, 90,148, 50,130, 36,180, 78,174,168,239,182, 76,213,152, 38,183, 2,204,222,222, 90, 60, 98, 85, 20,155, 92,241,
- 36,145,189,158, 39,131, 50, 33, 86, 73, 41,194, 1,202,196, 97,172, 94,120, 40,228, 18,225,133, 77, 19,148, 18,135, 82, 41,166,
-212,108,236, 14,131,167, 21,221, 76,212,175, 94,145,222,216,121,107,122, 41,200, 43, 59,228, 98, 64, 46, 71,186, 99,242, 7, 91,
-130,240, 22,192,142,186, 60, 67,115, 23, 33, 1, 25,145,186,160, 37, 90, 19,116,149,133,221,213,132,126,231, 10, 57, 83,244,135,
- 21,110,103,228,141, 45,121, 63, 98,151,133,211,203, 17,203, 45,213, 43,124,234,201, 19,164, 54, 9,244,153, 14,189,215,185,215,
-103,183, 65,243,136, 13,206,112,145,157, 34,219,132, 29, 98,199,123,172,240,164,132,167,100, 3,117,128,242,158,127,160,115,246,
-101,228,105, 70,255,232, 13,182,191,126,201,254, 55, 39, 14, 81,180,157,221, 16,210,203, 61,122,163, 35,221,238,144,187, 91,111,
-137, 30, 84,164,207, 1,106,136,209,223,227, 56,140,183,113,201,236, 5,222,129, 60,109,232,255,242,103,137,136, 37,234,127,249,
- 38,211,119,174,232, 62,123, 66,255,217,158,124, 20,158,126,247, 10,100,244, 11, 55,246,158, 59,131,126,147, 72,119, 55,232,203,
- 61,220,237, 97, 11,118, 89,124, 63,241,120,164, 62, 25,176, 99,133,228,233, 98, 0,150,161,143,145,171, 69, 17, 46, 57,176,161,
- 8,118, 5,247,222,232,217,124, 97,199,254,231,159, 80,167, 64,228,138, 63, 43,154, 19,100,245,142, 61,133,176,235,170,169,177,
-212,211,224,250,140,229, 30,235, 51,246,209,132,252,247,223,130,243, 17,187,161,216,231,123,184,215,193,243, 59,120,167, 82, 47,
- 46,224,252,232,109,180,134,242,177,165,170, 5, 85,197,206,179,155,254,115,245, 64,163,222,176,152, 6,200, 20,203, 98,117,165,
-151,172, 58, 45,141,164, 53,109, 34,190, 40,100,218,122, 72, 89, 58,217, 18, 49,158, 35,194,168,161,208,229,122, 28,172, 70,151,
-172,226, 23,250,184, 2, 91,101, 93,254, 96, 39,198, 38, 9,155,208, 62,156, 88,229, 84, 10, 39,165,210, 71, 66,216, 76,224,234,
- 19,178, 75, 62,225,185,145,144, 27,177,210,216, 5,252,189, 55,108, 50,120,107,194,222, 29,168, 79, 38,134, 67,225,105, 49, 46,
-204, 47,243,171,234,255, 84, 96, 23,215,180,138,112, 18, 15,245, 52, 45,250,161,106, 50,243, 52, 52,110, 11,155, 67,170, 36,138,
-238,184,238,213,173, 81,173, 64,119, 21,188,139,207,182, 34,220, 87,184, 50, 99,164,250,235, 28, 13,129, 91,148,108,190,100, 85,
-132, 73,112, 76,179,249,233,155,227,210, 81, 81,191,228,235,146,227,222,137, 3,107, 54, 97, 71,107,194, 38, 51,119, 36, 76,248,
-160,107, 95, 10,105, 26,233,187, 46, 84,248,118, 77,212,217, 4,104,196,165,110,113,224, 78, 97,205,146,153,201, 31,246, 61,145,
-134,110,153,187,241,202, 15, 78, 99,249,129,156,116,215, 95, 88,216,185, 18,171,188, 1, 91,220, 24, 51, 78,103, 21, 22,211,183,
-194, 73, 96,180,137,132, 50, 74,165,150, 50,143,217,181,202,170, 63,151,235, 13,101,184,186,108, 21,243, 75, 8,149, 83,245, 34,
-162,125, 30,108,165,254,207, 81, 80,185,112,145, 69,204, 29,147,156, 34, 19, 86,167, 57,132,172,169,215, 83,140,197, 91,164,146,
-198,228, 36,171,159, 7, 19,194,112, 28, 92,128,215, 30,154,176,155,146,242,226,227,207,157,127,254,115, 10,248, 90, 66,179,199,
-131, 79,199, 1,155, 70,127,207, 91, 80, 68,220,179,158,114, 24,135,145, 69, 58,140, 71, 58, 58,105, 74, 98, 12,175, 43,171,219,
- 92,193, 53, 81, 93,243,237,198, 11, 53, 67,246, 35, 86,206,116, 5,176, 97,149, 4,183, 6,246,155,255, 12, 57,118,100,109, 60,
-178,192, 8,108,222,193,164, 32, 90,165,248,185, 5,163,150, 49, 2, 69, 90, 32,125, 69,166,227, 76, 88,210, 90,150,111,222, 76,
-217, 5, 7,203,120, 2, 68, 76,218,108,222,221,141, 82,103, 21, 62, 1, 32, 27,195, 83, 97,146,232,204,144, 58,209,245,160, 99,
- 65,143, 19,232,145,250,115, 79,208, 63,116, 23,158, 94,193, 89,135, 62,183,193,158,140,164, 99,161,191, 58, 50,168,112,108,187,
-205,182,227,250,132,143,125,102, 82,196,135,176,173, 8,179,186,170,248, 28,208, 15,247,240, 53,200, 55, 21,253,244, 9,114,191,
- 35,253,240, 14,187, 42,216, 59,149,147,171, 9, 73,194, 73, 32,162,114,245, 67, 32,223, 75,190,183, 22,133,167,174,182,150,109,
-116,136, 17,106, 36, 2,210,139,251,122,106,129,190,243,150,166, 4, 98,178, 14,222,161,159, 36,152, 20,126, 87, 15, 63,117, 74,
-250,202,185, 71,135, 70,151, 55, 94, 26,185,130, 62,147,145,179,141,163, 73,159, 3, 78, 59, 55,127,111,212, 47,219,247, 15,158,
- 15,222,131,157,155, 7, 56, 95, 26,242, 64,216,252,229,215,224,246, 22,142, 21,251,251,239, 51,252,210, 83,242,167,119,228,127,
-231, 89,248, 55, 63,207,238,255,250, 22,219,111,126,207, 39, 18, 82,233, 58,255,157,183, 34,116, 55, 18,233,165, 13,188,184, 69,
-110, 6,159,255,220,253,239, 60, 41,216,197,132,237,189,186, 50, 53,196,148, 62, 53, 97,186, 95,244,150,108, 86,246, 14,230, 25,
-227,251,247, 6,134,119,221,144,222,249, 0, 8,233,196, 81,175,125,246,223, 83, 98, 60, 60, 40,212, 30, 54,209, 41,245, 57,212,
-226,142,166,179,113,240, 23,252,133,140,125,241, 20, 94,238,225,214, 41, 60, 29,224,205, 71,240,120,239, 0,154,182,147, 55,139,
-156,231,234,221,251,113,114,150,192,137,139, 41,204, 12,142,145,112, 87, 66, 45, 63, 57, 39,160, 61,116,205,102,152,231, 85, 87,
-179,246, 48, 91,217, 36, 69,112, 73,105, 25,218, 50, 71,107,106,203,176, 15,241,171,204,193, 28, 1, 80, 10, 65,237,166,105,112,
- 48,138, 46, 0,155, 77,130,157, 85,122, 42, 39,165,112,130,171,221, 19,226, 36,189,118,153,223,202,200,115, 25,158, 81,228, 86,
-176, 88,123,223,254, 48, 26,246,208,224,205, 1,190, 53, 80, 62, 24,184, 58, 20, 30, 2, 79,170, 3, 87, 46,205, 56,196, 20,126,
-108,207, 89, 82,182, 34, 76,193,165, 79,209, 29, 78,215,206,167,166, 16,111,231,154,204, 59,230, 54, 50, 47, 1, 58, 73, 22,218,
- 11,149, 25, 12, 83,112,209,220,137,192, 93, 17,246, 38,179,232,109,161, 44, 74,232,150,150,166,129,152, 18,106,173,212, 44, 36,
-171,228,232,146, 81, 91, 49,213,101,209, 14,181, 38,167, 77, 18, 67,200, 38,225, 24,200, 41,209,137, 50, 97,241,191,217,181, 0,
- 46, 2, 62, 67,235, 68,213,139,207,162,182,226,187, 47, 9,154,105,165, 22,175,181, 46, 17, 50,171, 81,177,201,239, 20,204,210,
-104,106,139,162,254, 90,216, 78,243,115,179,172, 33,179, 38, 36,137,163,130,131,148, 39, 34,140,165, 46, 23,250, 39,114,217,215,
-223, 91, 90,134,192,234,207, 53, 71,189, 6,136, 72,107,197,212,139,154,186, 74,224,211,176,158,205,162,184,249,103, 12, 17,109,
-151,168, 99, 13,101,241,114,169,207,150,182, 6,163,176,133, 89,128,122, 46,130, 85,135,164,213,185,120, 82,180,235,145,174,167,
-212, 66,210, 76, 74, 46,128,149,118, 17,168,227,131,203,225,128, 77, 83, 36,254, 69,113,223,118,238, 34,100,139,209, 80,169, 1,
-123, 41, 94, 37,117,234, 30,186,214,105,119, 73,219, 86,197,243,150,227,135,112, 16,240,212,244,114, 94, 17,181,238, 91, 29, 9,
-219,120,186,106, 62,146,101,221,109,135,247,212,253,196,238,159,108,255,158, 21, 85, 46,107, 27,217,217, 50,234,176, 16, 64, 37,
-165, 76, 19,101,216, 35,221, 54,118,105,163,239,213, 52,207, 98, 0,207,151, 14, 73,159,116, 80, 70,176,137, 46, 57, 40,191,148,
- 33, 0, 12, 54,231, 82, 79,213,149,174,197,188, 97, 45, 53,188,221,201, 75,210, 99,245, 81, 99, 46, 21, 61,140,176,203,216,135,
-123,248,104,128,151,119,240,141, 61,114,239, 4,125,118, 4, 70,186,177,208, 29, 10,189, 44, 34,157, 57,189, 96,101, 29, 97,242,
-110,103,253,137,173, 97,169, 27, 90, 65, 96,194,157,119,246,200,111,248, 30, 92,158,221, 32,207,246,228,207,237, 96, 52,228,163,
- 61, 93,173,206, 11, 6,236, 10,100, 43,164,103, 59,127,253,223, 45,243, 2, 95,182,138,188,164,158, 66,119,238,193, 0,114, 51,
- 33,183,179, 99,182, 0,246, 96,147,249,133,165,119, 96,247,216, 97,231,207,103,248,205, 11,120,255, 67,202, 55,247, 88, 54,202,
- 16, 98,164, 17,234,247, 39, 84, 38,236,108, 64,110,119,200,235, 59,248,236,206, 47,160,168,224,108,244,184, 79, 94,234,144,239,
- 87,228,201, 4, 95, 55,242,127,246, 2,124,241, 25, 56, 31,176,255,247,125, 14,127,225, 29,236,126, 70,191,176,133, 63,248, 18,
- 92, 12,140,255,231, 3,135,148,244, 48,142,142,144, 61, 21,232, 79, 18,122,127,135,126,106, 7,119, 59, 56,203,161, 10,244,177,
-187, 61, 29,177,125, 13, 48,132, 5,170,209, 72, 49, 47, 86,133,148,205, 21,170,157, 98,147,177,153,194,223,186,119, 21,117,218,
- 40,218,139, 23, 69,189,248,244,161,207, 72,151, 80, 50,169,116,158,180,119, 67, 60,119, 62,197,129, 90, 28, 17, 41,150,144,103,
-182,240,194, 6,123,101, 11,247, 54,200, 78,252,178,254,214, 83,120,116,128,174, 66,111,212, 41,194,129,178, 32, 83,197,246,174,
-106, 55, 4,174, 6,159,202, 84,111,209,172, 84, 10,149,105,117,101, 91,169,254, 92,233,178, 63,151, 25,146,210, 84,110, 97, 95,
-139,145,186, 7,100,248,243,137,185,247,190, 68,102, 58,218,226, 87,151,231,181, 29,120,173,123,203,210,164,169, 65,229, 83, 99,
-107,213, 49,191,165,114,106,198, 46, 59, 96, 68, 52,185,149,111,151,144,251, 29,242, 74,134, 79,101,184,105,193,123,141, 31,234,
- 80,225,253,130,253,214,128,125,123,160, 60, 30,185,220, 23, 30,152,241,200,101, 15,222,149,135, 61,173, 90,195, 89,235,162, 82,
- 14,193,207, 80,195, 42, 23,254, 97, 11,220,177,152,143,176,107, 16,189, 90, 22,252,250,154, 26,173,101,168, 11, 59,243, 61,186,
- 69,248, 77,193,139,111, 5, 54, 42,156, 90, 98, 84, 95, 3, 24, 45,252, 69, 81,173,140,101, 90, 40,154, 40, 69,234,188,211,157,
- 68,230,102,166, 9,227, 82, 28,140,170, 50,251,157,139,234,188,251,183, 88,137,102,220, 14,151, 2, 57, 58, 89,120,223,109,105,
-167, 91,138, 96, 13, 40, 75,155, 26,116,113,177,215,182,150,156,247,226,178,140,185,227, 18,171,149,165,163,255, 68, 94,186,173,
- 98, 91, 85,210, 2, 35, 90, 69, 66,219,130,123,156, 47,233, 36,206,112,183,184,192, 75,208, 1, 69, 18,147,249, 51,107,115,144,
-205,226,180, 90, 3, 90,180, 17,215,104,201,127,139,219,164, 89,183, 85, 21,117, 91, 87, 56, 11,162,128,137,104,111,230,100,205,
- 40,120, 99,223,239,171,204, 20, 32, 52,115,125,215,204,221,158,131, 16,102, 65,120,139,220, 85, 73,241,247,253, 65,209,200,155,
-149,216,151, 23,195,207, 94, 85, 82,246,188, 6, 11,253, 67,173,149, 50,140,254, 53,115,166, 78, 83, 76, 75,234, 42, 44,206,200,
- 37, 46,117, 68, 80,243,110, 54,169, 99, 23,243, 60, 54,243, 11,221,218, 14,124,101, 79,149, 85,133,104, 44, 17,138, 18, 35,245,
-198,166,109,221,118, 35, 25,249, 7,210, 47,174,142,240,255, 6,251, 90,114,176,125,103, 40,194, 53,164, 77, 64,108, 28, 2,144,
-146, 98,184,117,195,198,176,187,229,157,255, 18,101,136, 49,142,181,156, 69,183,190,168, 91, 21,132, 9, 43,230,223, 59, 65,169,
- 66, 77,254,230, 54,226,218,241, 8, 23, 19,212, 28,168, 73,129, 13, 5,180,167,152,143,210, 71,107, 49,140, 2,163,239, 60,235,
-207, 63, 70,255,232,125,120, 33,195,247, 38,228,217, 13, 92,140,232,105, 97, 51, 78,140,147, 19,182,138,254, 78,214, 54, 79, 13,
- 74,182,140, 68,155, 99, 96,148,101, 28,106, 49,210,186,245,214, 21,178, 17,210, 79, 10,114,179,131,151,183,228,131,191,150, 42,
- 19,245, 48,145,206,139,191,127,247, 50,122, 47,183, 40, 35,183,145,245,130,220, 76,110, 97,219, 23,175,254, 46,194,163,156,197,
-133, 88, 27, 89, 90, 54, 49,176, 27, 94,249,109,222,133, 47,108,225,231,207,169,239,236, 49,171,116,251,194,174, 86,183,180,103,
-153, 81, 78,114, 55, 68, 37, 99,208,134,212,145,168, 54, 24, 92, 21,167,167,221, 21,120,166, 67,126,126, 32,253,225, 59,232,191,
-253, 18,156, 31,224,131,115,246,127,238,109,134,155, 5,238,119,116,119, 13,249,197,119, 25,254,214, 19, 46, 63,184, 32,109, 11,
-194, 68,234,220,171,156, 59, 37,221,234, 72, 47,237,224,197, 30,185,157, 32,157,225, 6,166, 10, 15, 39,236,131,129,122,238,241,
-105, 18, 99,123,201,130,156,168,163,151, 53, 98,116,147,179,252, 91,214,164,181, 92, 0,109,234,246, 60, 79,128,164, 79, 72,159,
-145, 41,163,251, 30, 94, 61,133, 63,246, 34,188,187, 71,254,206,199,112, 3, 76,139,219, 92,110,119,200,167,122,120,105, 3,253,
- 14,145,201,129, 67, 71,224,235, 23,240,230, 1, 58, 67,212, 99,104,209, 58,167,251, 89, 68,131, 89, 54, 56, 19,108, 76, 48, 77,
-126, 48, 23, 11, 91,153,215, 47, 85,108, 6, 19, 73, 89, 2,132,214, 86, 47, 13, 17,150, 7, 82, 44,161, 29, 50, 45, 98,170,150,
-161, 93,139,135,228,156,152,115,251,109,171, 60, 25, 61, 0,166,206, 17,155, 66, 63,119, 97,174, 84,223,137,145,205,232,171,179,
- 3, 54, 93,116,227, 57, 33, 93, 70,111, 37,127, 61,190,160,240, 98,242,105,205,104,208, 69,139,189, 7,222,169,216,175, 12,216,
- 55, 14,148, 71, 3, 87, 67,225, 67,131,119,128, 39,109, 63, 85,151,226,184,160, 51, 57,172,161,146, 83, 76, 26,146,194,161,250,
-101,222,197, 78,250, 72,140, 22,211, 10,230, 47,173,107,111,140,109,157,247,182, 38,194, 33, 10, 6,204,216, 97,215,252,236, 41,
-254,220, 86, 92, 59,128,250, 62,127,170, 54,251,151, 83, 8,122, 45, 4,113,109,171,146,107, 33, 39, 79,252,234,197,129, 53, 14,
-147,177,136,183, 14,122,158,180,203,221,226,156, 93, 64, 21,235,168,227, 74, 93,159,210, 43, 38, 72,200,186, 66, 48, 89, 98,202,
-210,194, 78,174, 57,155,214,209,168,179,170,126,161,211,124,210,174,167, 43, 40, 77,155,114,204, 65, 72,107,117,252,108,199, 18,
-122, 77,104, 86,166,226, 42,114,157,131,116, 52,222,146, 37, 76, 71, 87,169,159,203, 42,168,217,209,100,165,196, 95, 46,255,164,
- 66, 78, 77,156, 39, 51, 32,166,173,152,234, 42, 31, 65, 85,231,157,185, 89, 89,105,171,124,215,158,115,246, 53, 76, 78, 46,112,
- 4,186,156, 33,103,198,105,140, 70,215, 39, 45,174, 78,111,154, 4,185,246, 90,182, 76,248, 50, 28, 61,199, 93,148,113,156, 24,
-142,199, 57, 82,188,148,137, 58, 77,115,218,165, 77,211, 53, 4,241,172,141,227, 90, 12,170, 63,208, 27,117, 95,179,243,129,151,
-168, 71, 89,237, 97, 18,130, 78,227, 42,169, 42,198, 42, 43,187, 86, 90,193,253,155,114,147,153,145, 28,197,195, 60,138, 55, 71,
-178, 18, 59,164,248,160,165,213,135, 69,172, 85,212, 45,102, 85, 65,210, 66, 60, 42, 5,134, 3,104, 70,180,199,202, 56,239,210,
-125,102,228,227,114,145,142,206, 38,170,133,130, 49, 9, 41, 11,221, 84, 93, 4,167, 78, 64, 61, 31,220, 34,117, 12, 28,212,105,
- 32, 79, 83,112,187,173,122, 14,251,100,133, 50, 85, 63,172, 81,172,102,100, 28,177,175, 60, 65,126,223, 61,120, 90,145,143, 38,
-244,185, 45, 28, 70,186,195, 64,127, 89, 24, 5, 6,177,136,226, 92,176,139,141,192, 85,108,141,218,181,107,174, 16,137,240,140,
-243, 44,164,253,196,205,111, 95,193,153,146,126,228,204,197, 96,111,156,144,206, 18,242,222,145,250, 80,169, 54, 33,157,160,207,
-119,232, 46,218,243,187,218,192, 0,200, 29,193,158, 26, 54, 86,232,139,199,119, 62, 42,216, 78,209, 19,129, 59,217,125,105,147,
- 57,243,125,243, 49,112, 6, 39, 27,248,148,193,239, 59,129, 95,157,144, 42,236,222,133, 77, 41, 62,182,238,133,244,122, 66,118,
-134,108, 99, 15,170, 5, 30, 76, 46,238,186,211,195,126,116, 37,250, 69,241, 66,227, 59, 35,250,165, 83,244,207,188, 22,240,155,
-129,225, 79,125,151, 3, 19,251,103, 51,106,198,241, 55, 47,201,191,116, 69, 46, 35,249,212, 11,210, 82,220, 55,218,137,144,182,
-153,244,236, 6,121,165,135,103,179, 11,200,234, 9,240,216,223,243,125,133, 98,200, 86,208,211,212,160,176, 62,177, 72, 26, 59,
-113,153,217,186,218, 39,183,250,152,239,220, 37,105,116,253,241,217, 74,206,120,214,146,225,216, 35,187,130,188, 54,194,143,157,
-195,115,223,133,116,132,159, 25,131,207, 16,211,142,231,182,112,231, 5,247,122, 93, 61,134,203, 91,238, 52,248,245,167,240,207,
-158, 98,251, 35,232,136, 93, 14,212, 67,137, 46,186,186, 54, 39, 69,199, 99,134,102, 79, 17,145,179,228, 35,105, 41,200,224,221,
-118,138,176,115,139, 92,251,166, 82, 78,234, 97, 38,109, 45,169,107,113, 83, 84,151, 57, 78,101, 7, 24, 5, 80, 38,102,239, 61,
-194,253, 62,113,251,191,120, 1,123,103,224,251,255,227,135, 92,198,100,201, 98,237,223,114,197,251,208, 55,228,166,137,233,179,
- 79, 55,250, 30,217,101,244, 94, 15, 95,204,240,133, 4,207, 69,202,161,212,224,135, 86,159, 20,125,187, 96,255,244,136,125,109,
-207,244,240,200,213, 88,120, 32,240,145, 9, 31, 1, 23, 53, 34,139,195,173,179, 19,137, 61,180,255, 74, 35, 11, 11, 62,205,222,
-123, 97, 34,197,142,186,178, 9, 5,124, 11,159,146, 85, 67,226,137,141,203, 69,213,180, 72,109,236,123,136, 21,229, 54, 0, 75,
- 67,216, 82,197,218, 42,194,245, 3,110, 91, 21,246, 8, 99,117, 27, 83, 82,165, 79, 57, 40,130, 53,136,143,144,172, 9,223,210,
-194, 59,111,209,169,159, 24, 57,167,182,155,101,161,119,206, 58, 8, 51,142,102, 28,235,132, 20,167,203,169,164,121,181,103,171,
-150, 76,126, 32,198,117,233,112,203, 44,238,189,238, 53,215, 8,173, 17,179,107, 87,122, 3,149,201, 44, 36,180, 31,184,208, 63,
-121, 39,100, 81,247,113, 87,155,119,246,142, 1,150,101,154, 18,255, 62,175,130,115,218,123, 97, 13, 5,187, 66,220,182,213, 68,
- 19, 29,118,177,159,174,226,154,153,180,122, 77,231, 46, 93, 3,115, 19,159,247,246,171,173,247,245,170, 74,146,206, 99,189, 53,
-251,164, 47,116, 38, 41,231,160, 37, 70,212,238, 10,197, 46,230, 63,199, 84, 74, 4,184,120, 16,203, 20, 83, 20, 19,160, 76,140,
-227, 24, 25,240,190,139,182,208,180,216, 60,145, 89,154, 62,105,200, 91, 21,178, 56, 46, 42,118, 72,254,224,122, 85, 36,116,129,
- 1,107,223, 56,233,122, 81,226,187, 52,139, 93, 55,186, 84, 91,179, 9, 49,142,202, 82, 87,190, 62,245,175, 19,134,156, 85,252,
-234,178,151,107,187,140,217, 98,186, 66, 8,154, 53,177, 74,162,180, 89, 98,163,182, 80,145,209,117,185,218,157, 69,252, 96,137,
-241, 96, 19,165, 20,146, 9, 88, 70, 74,241, 3, 81,179, 79, 9,178, 3,186, 46, 38,184, 60,194, 16,120, 87, 34, 55,187,148, 74,
-205, 62,166, 76,211,132,100, 65, 45,251, 79,168, 17,124, 79,124, 8, 78, 18,242,120,132,183, 14,240,198, 41,236, 7,228,208, 35,
-183, 55,164,171,194,118,184,100, 28, 35,121, 41, 86, 12,195, 39,196,162,182,210,117, 92, 11,193, 41, 94,120,136,194,161, 24, 23,
- 42,116,151, 19,187,111, 92,162,183, 19,242,185, 27,112, 43, 47, 36,190,206, 17,169,220, 84,116,167,126, 2, 25,126, 73, 39,247,
-255,114, 20,236,162, 80,175,138,135,169,236,131,154,181, 55,120, 65,225,182,194,141,222,253,235,143, 65,110, 63,129,211,201,119,
- 17, 93,129,159, 56, 67,198,129,244,124,239,135,224,113,164,252,220, 30,123,234, 35,254,250,107, 3,233,142,192,191,183,131, 91,
- 27,151,241,183, 10,169,138, 91,231, 30, 86,248,229, 9,121,189, 71,255,252, 15,121,145,182, 63, 50,253,119,223,167,158, 15,232,
-179, 14, 34, 58, 28, 11,114, 89, 56, 21, 33,159,248,129, 89,139,239,238,169,130, 72, 66,251,140,222,222,192,253, 62,148,252,119,
-160, 30,177, 97,242, 11, 29, 67,238, 37,100,215,147,164, 58,154,182, 4,152, 72,213,209,173, 57, 4, 90,157,193, 86,231,100, 36,
-114,236, 78, 34,115,211, 16,100, 76,112,165,240, 76, 65,126,252, 17,188,190,131,103,159,135,221,179,144, 94,131, 87,110,194, 75,
-226, 43, 31, 20,210,109,232,182,192,235,192, 57,116,191, 0,242,219,240,181, 75,236, 23, 31, 98, 79, 15, 14,154,153, 70, 31,167,
- 31, 29, 79, 60, 8, 30, 26, 83,150,241, 56, 21, 78,122,216,245,161,141,184,153,224, 10,244, 98,241, 13,231,100,243, 7,202,204,
-199,240,141, 30,183,160, 58, 27,167,223,230, 56,213, 28,155,130,174, 50,143,170, 37, 40,182,218, 65,253,198,145,253, 47, 94, 32,
- 98,108,179, 69, 30,144, 79,153, 54,209,145,247,169,229, 96,119,190,150, 56,235,144, 91, 61, 60, 47,240,147, 25, 94, 79,240,140,
- 11,131,168,145, 59, 80,213, 89, 2,239, 21,248,133, 9,251,197, 11,166,247,143, 92,150,145,135, 10, 31, 36,225,178,192, 57,112,
- 48,135, 52,109,114, 98,241,228, 64,103, 70,149, 58,139,180, 90,163,160,225, 5, 79, 49,145,155, 16,182, 73,185, 97,198,121,129,
- 99,156,109,218, 46,238,192,128, 74,220, 96, 75, 40,211, 50, 46, 54, 17,174,226, 24,220, 90,116,221, 24,135,213,110, 55,137,178,
-177, 58,167,107, 77, 85, 40,181,210, 25,244,169, 35,145, 16,117,239,191, 52, 43,214, 60, 74,110,103,175,206,158,118, 93, 34,133,
- 98, 77,233, 14, 13,247,205,123, 87,111,230,103,216,222, 42,135,113,164,175,149,148, 59,191,104,155, 66,190,214,200,247, 94,243,
- 69,150,139,176,196,101,154,227, 83, 82,100,249,243,218, 32, 52,178,104, 50,218,103, 41, 53,129,218, 15,156,225, 92,211,112,180,
- 75, 57,171, 99,145,215,145,174, 26, 49,188,104,186,126,161,207,220,249, 69,155,213, 46,245,209,150, 48,157, 6, 65, 75,226, 2,
-214,164,201, 95, 75,241,187,166,214,128, 77, 69,154,226,188,158,136,117, 64,109,130,230, 90,103, 98, 65,109, 43, 4, 3, 77, 77,
-189, 31, 64,169,107, 97, 43, 14, 60, 86,105,160, 30,157,253,242, 57,103, 95,103, 69,242, 98,181,234, 15,118,131, 36,197,207, 48,
-103,167,183,132,182, 85,174,187,243,175,116,145, 7, 70, 68,107,214,121,100, 83,231, 11,189, 23,101,163,158,122, 83,130,152, 51,
- 43,220,237, 19,113,115, 49, 70,159, 13,242,178,140, 71, 90,153,223,242,179,197,156,147,156, 98,245,208,198, 5, 18, 33, 5,109,
- 7, 65, 41,136, 26, 41,118, 42,106,139, 26,114, 78,251, 74, 14,151,241,113,186,147,165, 44,128,194, 58, 1, 92, 65,248,214,117,
- 93,177,213, 58, 51, 35, 85,253, 82,150, 90, 24, 74, 97, 42,198, 85, 17, 46,139, 50,212, 26,249,238, 54,103, 24, 23,188,130,172,
- 5, 76, 43,185, 22, 82,246,194,101, 38,200,180, 56,205,155,201,105, 89,191,113,142, 60,211,193,231,110, 34,191,252, 8, 57,235,
-144,155, 29,221,126,195,174, 28, 40, 89, 60,252,195, 66,184,220,198, 99,178, 90, 51,217, 50,106, 42,109,236,212, 64, 16, 49,149,
-212, 4,250,232,136,254,198, 37,249, 76,209, 23, 78,188,114,188,179,245,255,236,131, 83,127, 47,185, 56, 78,162,109,153, 12,158,
-184, 40,205,198,138,125, 20,194,177, 27, 17, 32,241,116,130,115,139,181, 66,124,240,158, 52,139,230,165,171, 53, 15, 6, 83,165,
-190, 85,177,243, 2,159,205, 78,178,217, 28,224,188, 96,239, 87,100,111,212,103, 50,105,112,224, 11,131,192,125,239,130,165, 86,
-172, 40,156, 11,242, 76,143,254,231,175,248, 7,230, 98,162,254,215,239, 97, 95,185, 32,255, 27,167,200, 55,143,216,187, 3,185,
- 51,250, 36,244,183, 28, 96, 99,183, 4,125, 28, 32,150, 62,161,154, 72, 93,143,188,188,113, 81,222,230, 6,200, 45,168,223,241,
-125,236,211, 40, 92, 38,127, 16,109, 12,133,122, 23, 98, 80,151, 21, 35,103,217,167, 11,237, 56,186, 12, 43,154,198, 85,217, 59,
- 71, 94, 70,129, 50,192,231, 31,192, 31,184, 13, 47,252,105,232,254, 45,224,121,207,108,151, 46, 88,232, 65,228,171, 71,144, 3,
-212,115,159,111,151,103,225,240,119,177,175,125,140,253,147,131,179,211,111,185, 19,129,171, 52, 23,118, 58, 86,210, 80, 29,130,
- 17,248,210,166, 93,188,186, 18, 54,135,202,217,101,229,244, 78,135,158,184, 66, 87,198,176,128,154,204,147, 6, 49,135, 96, 88,
-117,139, 25,230,132, 71,196,150,223,127, 21,201, 75,195, 22, 71,167, 94, 42,140,201,184,184, 26,185,250, 43, 31,120, 80,207,198,
-216, 82,201,117,233,210,211, 54, 35, 39, 49, 5, 49, 69, 78, 50,242,106, 7, 95, 20,248,172,192,203,138,156,158, 65,218,250, 37,
- 94, 47,161,142,238, 14,120, 48,193, 47,143,216, 63,186,160,188,189,231,184, 31,120,164,240,113, 39, 60,173,254, 18,141,209,193,
-245, 41, 99,125,239,170,226,232, 70, 59,170, 79, 26,155,247, 56,246,235, 45,206,115, 11,140,234,191,191,171, 93,156, 5,113, 43,
- 25,143, 45,128, 49, 22,135,102,195,123,198,218, 79, 67, 16,103,230, 22, 91, 68,231,177,243,227,226, 86,216, 83,140, 46, 41,163,
-233, 34,100,138,127,250, 56,124,173, 10,135,201, 41,233, 83,224, 98, 27,125,111, 18, 97, 50,119,156, 44,216,209,153,160, 30,124,
-124,185, 70,101,211,101,250, 76, 49,153,181, 34,237, 76,174, 86,153,226,159, 84,151,203,166, 52,113,240, 58, 88,132,101,154,193,
- 58,109, 79,150,181,131,205,222,121,167,233, 89,114,166, 6, 53, 76,127,162,215,246,236,242,131, 46,179,153,125,146,219,159,181,
- 31,156,225,155,224,175,197,234,252,159, 0,147, 70,213,134,169,213, 0, 0, 32, 0, 73, 68, 65, 84,219,243,216, 94,230,232,156,
-229,117, 81, 34,189, 45, 37, 71,169,182,163,186,169,145, 87, 29, 58,161,189,160,121,193,215,197,155,217,181, 21,115,173,205, 29,
-226,186,136, 38,244,158,181, 91,179, 15, 62,220, 9,145,116,216, 88, 46, 42,194, 38,103,106,238, 56, 76, 19,101,127, 21, 94,247,
-186,160, 17, 26, 44,103, 70,168,235, 98, 9,211,104, 64, 98, 37, 33,171,220,149,156,212, 33, 48,126, 57,250,222,162,235, 28,126,
-239, 31, 88, 91,184,239,114,253, 47, 55,193, 1,107, 5,109,187,212, 91,118,114, 68,166,170,168,219,227,176, 89, 37, 43,241, 48,
-172,195,219,136,110, 61,215,226,187, 48,117,170,211,252, 1, 66,230,136,171, 42,110, 87,107,244,187,166,184,165, 86,106, 25, 16,
-237,253,227,159, 82, 68,109, 78, 48, 77,232,102,231,220,209, 38,224,195, 56, 86,115, 6,116,129, 94, 42, 53,169, 11, 22, 98,196,
-227, 85,177,131, 98,199,234,232, 83,195,133, 15,218,210,214,170,127,218,228, 52,193,105,194,246,193,227,254,229,167,200,191,122,
- 7, 62,127,130,124,101, 66,238, 22,228, 80,216, 49, 81, 47, 29,242, 81,164, 37,131,213,107, 84, 62, 20,234,180, 8, 75, 52, 38,
-224, 98,254,193, 98, 21, 0, 1,130,188,179,103,251,255, 64,254,145,138,222,223, 64,206,200,105, 12,244, 6,115, 92,233,189, 4,
- 27, 23, 78,241,113,136,128,202,228, 2,200, 27,234,218,131, 59,138, 22,151,194,219,183, 71,228, 94,204,181,178,250,133,124,225,
-151, 34,125,137,156,242, 9,180, 80,127,241, 10,121,148,144,151, 51,114, 38,212,201, 24, 62,172,164,141, 32, 54,192,207, 61, 65,
-106,135,220,223,248,248, 59, 11,156, 40,242,108,143,252,161, 14,249,201, 59,112,214,123, 58,220,111, 60, 69,191, 62,160,255,238,
- 61,236,203, 25,185,115,197,201,223, 59,199,198,130,126,170, 67, 94,223,192,171, 9,123,175, 80, 59,245, 58,110,147,157, 82,119,
-127, 7, 47,103,184,221, 65,126, 45,218,218,163,119,233, 79,221,162,103,143,152,215, 47,162, 32, 39,177,227,109,227,244, 11,131,
-239, 71, 20,236, 16, 64,147,123, 61,220,203,112,191,131,103, 50, 60,179,129,179, 11,184, 11,188,242, 71,224,230,159, 3,121, 41,
- 14, 35, 69, 2, 40,106,172, 96,216,186,195,108,239,119,230,240, 45,184,250,111,224, 43,223,130,191,123, 3,121,207,224, 86, 20,
-158,210,193,198, 47, 92,219, 86,247,224, 95, 78,116, 67,101, 26, 3, 90, 34,194,216, 30, 53, 19,198,201,168, 79, 99,196,218,132,
-129,173, 74, 28,205, 63,224, 18, 2, 86,107,201, 26,159, 56, 72, 87, 49,202,243,129, 30, 0,163,126,170,148, 99,245,120,119, 51,
-172,103,129, 13,149,184,244,118, 29,122,218, 33,157, 11, 6,229,134,194, 27, 10, 63, 90,225,211,138,220, 62,133,254, 14,216, 45,
- 40, 91,183, 23,118, 31,131,156, 99, 15, 43,252,194,128,253,131, 75,234,119,174, 24, 14, 3,231, 98,124,156,133, 39,184,244,162,
- 70, 55,147, 82, 34,145, 24,147,131,166,106,241,255, 49, 5,204, 42,169, 81,138, 70, 81, 94, 87, 23,137,132,146, 60,176,201, 6,
- 99, 21, 87,234,139,113, 10, 92,218,178, 59,157,130,209,191,140,225,101,161,101, 70,130,155, 2, 67,169, 12,101,138,125,185,175,
- 47, 83,114, 16, 22, 34,228, 16, 3,154,248,104,189, 72,165,168,139,245, 26, 60,101,136, 8,205,150,206,134, 46, 23,185,172,246,
-199,204, 96,153, 6,178, 90,198,204,178, 18,167, 21, 26, 94,215, 71,225, 89,252,220,172,113,190, 90,112,171,173, 69, 89,207,231,
- 78,203,244, 88,160, 50, 33, 77, 91,130, 71, 90,228,174, 45,194, 48,239, 30,211, 53,122,220,245,224, 89, 89,208,200, 43,104,143,
-173, 26,198,182,178,224,154, 59,106, 65,202,216, 74,104, 87,131, 23, 48,179, 81,218, 20, 64,150, 11, 93,147,219,192, 26,114,213,
- 77, 3, 41,138,159,152,254, 94, 83,175,199,253,210, 22,247,171, 95,100,206, 82,151,181,189,122,121,110, 26,174, 28,187, 94,185,
- 52, 16,205,172,197,104,147, 24, 77,216, 56, 56,132,172,148,120, 31, 63, 25,128,187, 48,219,219,152,189, 70, 6,132,181, 98, 39,
-214, 1,104, 34,167, 80, 26, 54, 79,122,206,201, 89,183, 86,188,203,142, 28,227, 6,167,111, 54, 54,154,146,180, 77,156,117, 5,
- 21,142, 56, 57,135, 22, 52,128,194,194,149, 95,239,240,172,182,177,150,205, 74,195, 20, 44,232,218, 80,123, 44, 94,238, 22,205,
-218,144,126,181, 86, 23,195,232,226,221, 53, 83,204, 70,175,108,251, 46,194,232,189,197, 80,138, 31,218,147, 43, 35,154, 69, 35,
-169,144, 10, 76, 84,127,248,114,199,200, 68,157,196,163, 91,101, 17, 15,149,234, 85,254,134,234, 36,188, 36,238, 5,158,189, 24,
-201, 91, 26,137, 95,228,195, 43,236, 31, 22,228, 95,123, 6,249,124, 69,127,163,192,179,133, 42,198, 73,189, 66,174,202,156,226,
-116, 40, 62, 13,152,234,242,192,174,247, 67, 83, 89,141,252,108, 53,162, 7,158, 4, 30,243,254,247, 92, 48,216,253, 46,224,150,
-231,243,202,253,236, 63,188, 6, 5,110,140, 11,253,227,137,250,212,187, 72,233, 4,189,149, 32, 11,178, 83,244, 52, 56,233,147,
-186,244,255,129,193,157,120, 17, 46,195, 51,125,244,139,222,142, 21,158, 23,236,215, 39,236,235, 35,122,123,139, 60,231,201, 40,
-195,165, 79, 59, 78,223, 26,217, 94, 8,246,156, 33, 87, 6,255,124, 66,222, 29,208, 55, 78,144,207,236,224,133,157,139,239,206,
- 71,120,114,240,116,184, 63,255, 60,156, 10, 98,133,252,147, 91,244,133, 51,236,241,136,156, 41,220, 21,236,124, 96,250,222, 17,
-206,139,207,137,239,246, 72,233,225,197, 14, 94, 76, 72,247, 50,112, 31,236, 55,176,195,209,131, 98,246,147, 95,108, 55, 64,246,
- 41,172, 13,130,140,234,209, 96, 59,117,144,203, 11, 9, 94, 2,121,190, 67,238,168, 71,217,157, 37,231, 50,119, 29,108, 59, 36,
-159,123, 64,204,201,223,132,252, 67, 96, 7,252,155,156,198,144,112,189, 59, 92,119, 60, 27,255,185,116, 15,246, 25,236, 70, 15,
-191,255, 33,236,207,145,247, 11,242,254, 1,222, 29,176,144,114,219, 20,123,201, 65,177, 81,200, 17,220,225, 68, 59,239,226, 40,
-201, 57, 12, 71,247,111,201,109,215, 66, 72, 17, 56,138,171,199,219, 65, 81, 2, 19, 55,185,223,203,142,129, 2,157,220,179, 63,
- 35, 86,187,198,202,117,103, 12, 83, 37,111, 42,233,106,162, 55, 9, 33,159,139, 8,165,203,200, 89,143,222,200,200,221, 14, 94,
-168,240, 70, 69, 62, 83, 93, 63,176,187, 7,250, 50,216, 11,174,199,168,151,160, 79, 97,251,109,216,127,136,253,218, 8,255,251,
-129,250, 91, 79, 25, 46,143, 60, 81,120,148,224, 41,202,165,197,206, 92,124,245,102,125,162,144, 24,131, 6, 88,235, 98, 11,173,
-225,199,238, 90,160, 71,235,192,102, 11,149,119,229, 86, 23, 36, 74,141,189,120,138, 67, 63, 71,215,213,198,224,211, 42,199,187,
- 1,119, 8,251,108,173,149,169, 86, 74, 83,177,171, 50,168,114,133, 43,220,219, 4, 51,209,130, 95,252, 60, 57, 11, 86,198, 85,
-236,171, 75,228, 82, 28,195,177,210,226, 74, 91, 90,187,239, 83,151,152,207, 54,181,107,151, 89, 35,200,217, 28, 44,162,115,126,
-117, 70,217,197,200,119,140,179,217, 21,252, 49,250,173, 17,101,208,162,117, 87,163,110,107,251,234, 21, 77,206, 47, 70,153,109,
-192,173,246,107, 54, 64, 51, 89,165,170,203,130, 9,151,117,244,248, 66,140, 55, 18, 41,186,254,250,137, 26, 83, 35,164,234, 90,
-108,227,156, 75, 34,171, 8, 95,153, 47,230, 44, 74,151,148, 28,107,218, 98,117,190,115,154,160,173,113,248, 87,154,181,184,124,
-101,101, 17,188, 62, 89,208, 54, 94,215, 8,253,194,174, 79,176,195,182,214,146,229,148,235,174, 16,107,247,104,236,162,199, 82,
-152,198, 1,155,202,220,184, 54,123,159, 3,215, 22,225,223,124,130,212, 58,175,162,175,197,165,167, 72,226,203,186,228, 9,103,
-241,127,145,196, 51,151,211,156, 90, 35,159, 24,191,200,146,161, 28,168, 88,105,114,248,168, 74, 93,108,192,188,155,202, 45,155,
-121,189, 7,170,126,216,183,230,123, 86,165, 54,250, 25,209, 93, 7, 66,176,174, 94, 12, 52, 33,165, 98, 26,138,219, 98, 75,254,
- 37, 62,147, 76, 12,152, 36, 76,195,122, 87,195, 2,100, 78,164,107,193, 49,105,138,208,135, 24,111, 53, 59, 72,171, 82,221,169,
-224,113,130,181,217,122, 66, 76,100, 54,162, 83,136,240, 84,252, 66,200,213, 41,105, 10,182,137, 41,193,175, 63,129,187, 32, 63,
-253, 44,114, 57, 34,223, 50,228,190,223,255, 39, 15,174,176,125,153,157, 1,173,198,169, 43, 38,192,114,193, 7, 56, 33, 14,150,
-186,202,103,239, 12,158, 36, 72, 86,185,247,206, 21,114, 75,201,159,109, 28,222,236,106,226,171,234, 62,237,161,192, 59, 19,246,
-177,143,248,228, 52,222,183,187, 29,114, 43,102, 92,247,123, 7,125, 28, 35, 21,227,213,173, 47, 86, 63,246, 17, 54, 59,247,228,
-217,195, 1,182, 21,238,184, 80,171,124, 52,192,183, 5,253,169, 45,233, 86,162,255,120,226, 88, 52,154,229,130,156,184, 69, 73,
- 48,236,171, 71,234, 87, 38,244,207,158,249, 7,241,209,232, 85,214, 51, 27,248,153, 31, 3,158,194,111,127,215,147,200, 78, 39,
-244,139, 91,224, 20,123,162,240,193, 17,251,213, 3,188,239, 2, 59,189,211,145,158,239,224,229,206,119,180,155,231,192,222,136,
-177,238, 3, 56,132,223,233, 2,120,108,200,211, 16,152, 61,215,195,171,217,157, 10,207,116,176,235,130, 5, 29, 50,234,193,124,
- 18, 49, 21,255,221,199, 2,169, 64,189,194,110,191,139,124,225,207, 2,207,192,248,115,241,193,253,162, 91, 41, 63,153,147,136,
- 93,199,206, 49,184,114,176,255, 79,144, 47, 30,224, 71, 0,221,196, 31, 63,135,242, 17, 82,222,134,171,127, 1, 79, 63,134,143,
-223,135, 15, 62,194,158, 94,194,135, 35,246,142, 33, 79, 42,156,251,186,138,223, 43,240,211, 55,224,191,189,192,222, 44, 88,144,
-241,216,182,168,173,234,130,140, 62,140,219,146,252,193, 63, 77, 46, 97,235,182,110, 49,212,248, 20,214,240,113,182,104, 54, 19,
-191,244,179, 91, 30, 73,113,161,107, 8, 11, 95,234,144, 47, 41,188,106,240, 66, 65,110, 3, 55,110, 67,255, 58,232,143, 1, 47,
-248,243, 57,137,175,199, 54,191, 9,245,171,240,214,199,216, 95, 27,176,255,251,130,233,225,129, 39, 76, 60,232,132,199, 8,251,
-234,186,145, 42,226,199,126,206, 78,167,171, 44,155,218, 18,211,123, 91, 68,165,251,144,217,108, 88,118,211, 54, 71,207,198,152,
- 27,239,134, 55,205,162, 21,193, 39, 21,241, 12,114, 81,247, 19,199,122,171,145,228,166,150, 32, 97, 48,213, 41, 18, 29,189, 88,
-232, 82,162,170, 35, 71, 47,195, 37,152,163,113,232,162, 70, 42, 65,121, 20,132,211,152, 0, 28, 35,209,205,226, 28, 25,165,197,
- 39,219, 34,101, 51, 16,169,215, 46, 29, 89,141,143,107,236,227,230,169,158, 56,146,184,134,251, 32,167,224,170,151, 50, 55, 86,
-172,144,172,149, 5, 22,182, 14,209, 54,187,174,110, 23,214,105, 44,114,237,251,137, 74, 32,135,109,190, 64,215, 95,207,184, 62,
-150,149,185, 75,142, 56,217, 38, 20, 91, 53,140,245,255,199, 40, 39,235, 78, 89,184,246,253,100,134, 38,249,138, 36,205,190,126,
-153,199,243,105,245,107,148, 64,233, 74, 48, 22, 26, 66,215,102, 77,153,223, 45,147,212, 89,135, 50, 77, 5, 49,111, 2,105, 4,
-185, 90,175,249,247, 85, 82,120,221,203, 60, 97,105,130,231,169, 26,195,112,164, 14, 67,228, 51,172,108,119,117, 73, 73,186,206,
-240, 95, 23, 25, 50,223, 25, 77,151,160,170,228, 20, 21,109, 78,121,190,208, 83,140,143,242,250,235,124, 2, 93,170, 18,152,201,
-150,139,220,162,234, 0,173, 83,112,221,151, 61,131, 4,100,161, 37, 55, 49, 91,178,196,141,255, 45,123,221,150,168,214,212, 0,
-251,177,255,209, 24,125,153,102,175,174,109,106,132, 93,175, 44,219,104,205,138,243,179, 11,212, 58, 33, 37,249,215, 8,238,165,
-213, 35, 73,179, 71, 75,214, 37, 80, 48,135,221, 36, 69,151,162,171,143, 81, 99,209,143,204, 25, 54,222,236,104,117,130, 86, 96,
-114, 57,137, 8,183, 41, 72, 49, 49,190,177, 51,193,126,238, 9,250,220, 22,249,242, 61,116, 4,190,103,216, 29,255,218,167, 31,
- 95, 81,169,243, 95,173, 6, 71, 91, 72, 8,117,165, 26, 45,174,247,155, 43,225,118,230,246,234,213,231,195, 14,242,193,184,243,
-157, 75,228, 76, 73,175,135,134, 55,103,207, 90,109, 85,193, 14, 23,139, 73,134,251,234, 93,232,211, 58, 47,231,164,198,222,248,
-134,122, 65,240,194,214,255,238,253,226,127,110, 35, 62, 38,255,230,232,251,241, 91, 61,250,233, 13,245, 43, 3,246,173, 9, 94,
- 49,228,249,158,221,135,149,109,137, 4,184, 27, 14,102, 17,245, 5,173,124,191, 32, 63,115, 11,238,237,224,209,224, 47,228, 78,
-225,254, 77,191,112, 14,111,195,221,143,225, 62,208,191, 8,249,167, 64, 7,100,247,107,216,163,131, 35,108, 79,157, 89,159, 62,
-117,130,124,238, 4, 62,147,144,155, 55,193, 94, 3,185, 15,246, 43, 46,190,186, 48,120, 88, 96, 20,228, 51, 91,120,181,247, 2,
-224,102, 92,226, 67,117,113,214,249,224, 58,130,171, 10, 23, 99, 24,159,109,102,237, 26, 9,217, 11,156, 61, 66,254,196,151,160,
-255, 9,168, 63, 11,233, 11,144,190, 12,114,242, 59, 34, 50,103, 57, 79,189,128,242, 16,198,223,134,195,223,131,171,127, 14,199,
-209,197,115,253,103, 97,247,123,225,236, 71, 97,247,101,191,120,111, 43,188,216, 76, 90, 83,132,114,142, 72,189, 4,123, 4,245,
- 41,232, 99, 72, 39,192,247,225,175,254, 77,228,195,115,228,234, 42,242,110, 55,144,183,254,143,246,208,159, 46,237, 86, 29,192,
- 46,144,178,135,195, 17,251,184,194, 91,192,219, 21, 62, 44, 62, 1, 25,218, 92, 53,136,116,187,166,234, 44,112, 91,224,229, 10,
-159, 6, 94, 50,184, 9,108, 79,160,127, 30,242,151, 32,255, 75,144,158,245, 3,170, 28, 96, 58, 64,247, 4,228, 31,195,197,215,
-176,127,120,133,253,111, 71,234,187, 87,236,199,129, 7, 73,248, 72,213, 35, 80, 43, 92, 85,191, 40, 69,124,207,108,205, 63,111,
-174, 63, 73, 11, 31,116, 57, 20,227,130, 24, 34,213,173,111,209,152,178, 64,176, 8, 81, 83, 22,245, 51, 72, 22,232,158,219,139,
- 82,116,114,161,201,145,121,152,232,234,246, 72, 87,163, 46,212,183, 44,206, 16,159, 86, 97, 77,197, 96, 66,231,232,217, 13,149,
-141,250,247, 26, 2, 41,187, 77,126,214,106, 93,198,219,134, 56, 27, 28, 23,135,174, 47, 66,189,182,111,150,217, 10,219, 34,117,
- 77,100, 86,180,139,174, 24,255, 77,241,175,138,153,135,141,232,202,119,110, 51, 8, 37, 56,246,232,204, 50, 95, 39,167,219, 39,
-138,213, 70, 98, 99,181,151, 22, 89, 26,191, 38,140,187, 14,139, 93,161,101,101, 9,225, 86, 22, 21,251,156,238, 38,215, 87, 65,
-178, 90, 69, 40, 77,200,184, 32,237,106, 60, 33,217,152,117, 3,105,206,118, 95,170,139,102,243, 43,198,108, 53,107, 99,255,164,
-193, 77, 88,133,206,172,147,210,220,250,173, 43, 55, 82, 3,245, 84, 74,248, 73,125, 61, 29, 94,126,147,153,217,223,190,196,100,
-238, 59,111,169,165, 86, 27,159,192, 63, 87, 42, 21, 82,154,153,249,213, 86, 32,231,185, 88, 10,215,152, 36, 84, 59, 82,238,200,
- 77,114,191,217,116, 51,198, 85,165,144,195, 24,191,238,173, 53,164,234,201,236, 26,237, 77,108, 5,143,152, 6,239,244,105,227,
- 31, 89,249, 4, 67,121,186, 94,213,173,108, 34,178,178,112, 37, 93,254,255,118,105,163,130,229,140,165,236, 47,112, 90,152,187,
- 85,193,138, 82,169, 81, 93,199,200,172, 20,180, 20,114, 25,155,219,208,253,188,125,118,241, 95,169,136, 84,103, 98, 87,247,239,
- 26,197, 61,164,210,242,205,109,245,102,187, 38,170, 82, 41, 90,177, 24, 36, 36, 85,116,171, 72,191,202, 80,149, 4, 79, 35,246,
-242,134,131, 91,234, 95,255,128,244,167, 55,240,163,119,208, 82,169,111,181, 7,195,184,241,193,149, 19,138,146,240, 52,128,253,
-199,218, 42, 73,155, 31,222,107,235,150,102, 27,143,232,207, 18,202,232,143, 54,160, 15, 43,183,127,235, 10,233,149,244, 25, 7,
-123,112,171,135, 33, 67, 55,120, 44,232, 24, 48,143, 83,117, 64,203, 11,241,130,190, 95,225,142,194,153,250, 30,250,253, 10, 87,
-151,158,166,118, 43,193,115,157, 75,174,159,139,247,243,209,209, 11,141, 47,111, 73,223, 60,192,169,162, 47,111,225, 83, 91,228,
- 75, 3,250, 96,130,183, 39,159,146,220, 72,216,133, 98,239, 86,244, 79,222, 67,126,207,125,248,248, 16,193, 27, 46,160,226,248,
- 1, 12, 95,117,255,216,157, 87, 64,254, 21,168, 63,237,225, 60,245,171,254, 75, 63, 28,224, 82,208, 91,189, 19,242,126,104, 7,
-175,109,145,123, 10,242, 58,232, 75, 80, 63,242,203,115,127,132,205, 9,242,211, 59,184,165,176, 81, 31,191, 30, 10,156, 79,177,
-103, 31,253,253,122, 28,246,186, 67,157,105,115,140,192,133, 33, 31, 2,151, 21,235, 14,200, 95,248, 44, 60,247, 23,221,179,159,
-255, 4,232, 41,252, 14,204,233, 69,109,246, 1,140,127, 23,246,255, 0,198, 39, 48,156, 71,215, 93,225, 34,123, 80,206,243,223,
- 71,238,252, 54,240, 71,224,236,247, 67,122,198, 71,245, 54, 45,125,133,244, 46,245,210, 91,192, 43,145, 51,202, 34, 3, 59,253,
-227,240,218, 99, 15,167, 47, 87, 32,167, 32,103,113, 27,111, 99, 74, 16, 26, 3,187,128,241,187,112,245, 79,192,126, 5,185,253,
- 33,232, 30,187, 1,188, 26,168,222, 42, 78,204,219,154, 35,210,110, 87,184, 49,132,158, 98,227, 63, 79,222,130, 62, 11,221,231,
- 33,255, 36,228, 79,129,222, 92,174,128,186, 7,219,131,126, 13,166,191, 15,223,120,143,250, 63, 13,216,175,236, 25,247, 7,158,
- 36,227, 65, 47, 60, 9,242,155, 43,251,149,174,239,226,130,115,124,117, 13, 33, 81,105,112, 72, 42, 57,185, 87,120,196, 60, 19,
- 30,155,213,238,132, 0, 46,199,136, 59, 1, 91, 49, 54, 89, 49,201, 8,137,177,194,113,154,188,171,195,249,252, 85, 28, 0, 34,
-171, 11, 67,227,119,153, 98,154,151,196,133,116, 26,170,237, 38,188,202, 77, 88, 43,115,204, 3, 5, 97, 31,159,135,147, 0,210,
-244, 38, 12, 6, 23, 49, 2, 63,137, 61,237,133,153,239,214,155,165,107,181,127, 94,152,237,204, 29,246, 58,137,172, 89,162,106,
-227,124,132,205,184,138,255, 35, 86,233,196, 39,119,226,109,233,210,237,175,244, 19,237, 27,213,149, 51, 98,181,225, 93, 21, 14,
-173,249,209,217,253, 35,200, 53, 1,154,172,110,210,165, 52,168,215, 60,109, 77,112, 55, 95,160,216, 15, 20, 0,242,137, 11, 86,
-227,194,111, 34,226,220, 20,244,234,197,154,139,184,151, 75, 93, 34,160,169,214, 74,169,133, 49, 84,255, 98,139,255, 35,169,144,
- 82, 14,225, 40,139,142, 34,252,235,165,150, 80,200,175,130,107, 12, 82, 78,244,125, 79,206,137,220,229,121,229, 43,179, 71, 63,
- 18,240,172,204, 83, 93,141,232,230,165,131, 15,100,111,245, 59,183,189, 95, 13, 85, 44,154, 22,188,112,107,188,204,167, 49, 41,
- 39,210,166, 67, 82, 34,119, 73,217,110, 55,164, 44,104,141,144, 2, 77,193, 62, 46,238,243,156,133,109,204, 41,105, 26,242,177,
-132,146,146, 6, 78,182,196,108,191, 71,202, 20, 99,148,136, 97, 76, 33,112,168,203,104,217, 52,154,194, 57,175, 60,186,119,149,
- 57,242,117, 22,125, 88,165,162, 88, 74, 30, 7, 90, 42,166, 1,125,152, 21,131,193, 39,142,159,173,138,161,117,242,157,240, 84,
-124, 23,170, 2,195,209, 63,132,147, 87,103,201, 10,181, 76, 14,206, 39, 4, 73, 76, 51,206, 17, 98, 77, 16,227,255,212,185,210,
-190,134, 40,252, 84,253, 16,113,144,117, 14,127,173,192, 73,113,218,222,100, 46, 6,163, 96,111, 23,202, 95,125,139,244, 31,125,
- 26,126,252,182,215,165,239,184, 30, 64,171,113,147, 3,245,178, 56, 38, 60,158,140,163, 57,244,100, 8, 94, 12,182,140,227, 89,
- 9, 70,172, 5, 27, 84, 79,135,122,144, 32,127, 60,114,243,235, 87,200, 46,161,157, 58,158,245,102,130,220, 59, 36, 96, 95,151,
-123,231,194,124, 87,252, 98,246,221,185,138,119,170, 35,126,233,215,138,189,125, 68,190, 93, 96,151,176,231, 21,121,238, 12, 94,
- 59, 69, 94,216, 33, 31, 94, 82,119,134,254,112,128,180,207,122, 36,101,244,217, 4, 47, 11, 60, 59, 34, 79, 38,108, 35,112,150,
-208,223,183, 67, 94, 63,131, 15, 47,189, 27,124, 55,148,246, 55, 30,194,243,103,208,253, 97,144,223, 13,124, 17,236,204, 47, 33,
-121, 31,236, 39,160,252, 83,236,106,132,219, 29,122, 59,195,203, 27,244,213, 13, 60, 43,208,191, 12,188, 28, 47,222,175,129,222,
- 68,238,124, 10,158,185, 2,121, 2,199, 11,236,145, 7,126,240,120,132,199,145, 68,247,168, 96,231, 5, 27, 70,191,239,142, 14,
-225,225,129, 33, 15, 42,178, 73,200,231, 78,144, 63,117, 23,249,242,151,224,238,127, 12,233,243, 33,115,109,186,234,244,137, 75,
-125, 0,123, 27, 14,255, 11,246,224,103,145,183, 46,176,243, 14,116, 7, 99, 7, 79, 51, 60, 10, 54,124,238,224, 92,177,215,223,
- 70,244,103,125, 68,189,251, 61,208,189, 24, 23,115, 23, 66,138, 97, 37,112,107,160, 17, 93, 57,150, 51,240, 44,200,243,110, 89,
- 92, 59,155,109,117,160,178,241,175,219, 63, 3,233, 21,232,222,128,252,243,176,123, 31,185,255, 16,198, 67, 44,158, 99,234,180,
- 81,159,244,156,108,160,251, 12,240, 98,168,213, 95,134,242, 10,200,203,160,119,125, 36, 51,127,191,201, 39, 19,211,155, 96, 63,
- 11,143,190,130,253, 31, 23,216,223,152, 40, 15,247, 92,216,196,195, 14, 30,198,168,125, 40, 62,178,164,235, 24, 45, 5,203,220,
-102, 72, 14, 56,154,182,159,247,137,158,185, 46,201,123,188, 17,193,202, 34, 78, 34,216, 27,189, 72, 64,165, 92, 96, 39,157, 82,
-138, 48, 77,222,169,149, 22,153,105,203, 94,121,238, 32,163,211,213,224,209,180, 81,115, 86, 31,181,175, 59,191,166, 25, 90, 70,
-217,203,158,212, 48,246,209,185,159, 86,225, 44,106,102,173,198,211,234,112,171,141,192, 72,101, 95, 38, 95,157, 70, 97,161,145,
-220,134,234,236, 61,111,180,178, 58,239,210, 35, 33, 44, 84,244, 22,194,230, 28, 76,247, 49, 2, 38,100,222, 93,203,156,188, 6,
-215,115,222,235,138, 84,246, 59,148,167,222,169, 26,115, 26, 89,224,219,174, 21, 27, 63,168,119,151, 31,184,218,215, 93,119,138,
-174, 91, 44,118,212, 65, 17, 77,235,192, 47,145, 85, 42,104,176,225,213,129, 53,224,107,160,100,174,253, 42, 2, 67, 41,243, 26,
-163, 90,101,170,230,233,103, 13,218, 19,129, 46,235, 88,221, 38,134,115,213,187,119,239, 99, 45,158,132, 86,150, 53,105,179,144,
- 9, 66, 29, 38,255, 89,250,126, 22,139,207,138, 1, 51,166, 90, 3,209,235, 36, 58, 82,192,162, 98,100,127,125,125, 93,231,160,
-165,106,174,242,119,242, 93, 76,195, 67,227, 85,103, 65, 96,135,118, 27,239,246,173,146,187,205,134,254,244,148,178,223, 71, 46,
-121,144,114,146, 5, 38,176,128,133,241, 93, 90,101,225,123,105, 69,209, 46,121,188,101,236,149, 60,141,166,206,170,120,153, 63,
- 13,178,132,146,204,232,189,182,149,247,175, 55,103,236,202, 2, 87,153,213,134,104, 88, 39,194, 35,217,186,104,153, 69,246, 49,
-222,119,155,193,236, 25, 47, 21,177,209, 45, 0,154,124, 12, 59,140,200,166,247, 85,253,228,157,122, 91,213,251, 7,172,186,146,
-151, 69, 89, 58, 91, 51, 42,115,158,252,228,161, 80,254,160,116,145,165, 91, 88, 80,129, 13,234, 62,198,133,127,154, 97,119,196,
- 30, 12,148,191,242,125,210,159,124, 21,249,242,109,127,131,222,241, 7, 33, 77,198, 45,142,110,185, 10, 53, 76, 73,144,171, 43,
-201, 11,203, 36,116,109,121,107,123,174, 41, 42, 90, 45,190, 58,126,154, 97,251,224,136,124,219,119,153, 42, 2,175,158,192,173,
-236, 0,238,227,232,139,190,193,224, 81,248, 36,139,186, 17,121, 8,206,251, 78,225, 86,196,124, 62,184,164,126,247,128,189, 83,
-176,193,208, 47, 63, 65,126,215, 25, 60,187, 69, 94,217, 34,210, 35, 39, 9,123,127,132, 62, 33,231, 81,157, 28, 60,130,212,196,
-176, 11,144,159, 56, 67,158,219,192,219, 71, 31,251,107,130, 77,129,231, 30,194,107, 2,249,223, 7,253, 67,113, 73,156, 70,226,
-205, 30,228, 6,148,247, 97, 56,247, 46,227,115,157, 19,232, 94,232, 29, 92,114,186,133,250,252,210, 53,111,126, 36, 12,168,223,
-133,241,125,184, 24,177, 71, 5, 30,140,240,104,194, 30,150,185, 91,175, 87,158, 71,108, 79, 11,246,110,133,135, 46, 50,212,151,
-183,232,159,185,131,254,158,123,240,236, 43,208,189,228, 29,175,253, 44,156,255, 53,236,209,119,224,193, 19,120,174, 67,238,220,
-133,252, 47,131,117,254, 61,247,191,130,189,243, 93,248,202, 21,252,218,142,122, 56,117,225,223,109, 3, 29,176,209,176,115, 63,
-108,117,167,112,209,193,101,194,222,120, 23,121,254,111,192,254,159,193,230,115,190,151,238,223,128,252, 42,200,205, 21,181, 67,
- 86,216,207,166,174, 28,227, 63,235,234, 2,255,228,241,188, 62,120, 51,164,231,225,228, 95,135,237,143, 67,121, 23,166, 15,192,
- 46,221,126, 71,129,116, 3,250,155,144,111,129,190, 30,109, 60,160, 23,110, 88,239,108,245, 61,197,255, 94,189,132,250, 8,134,
-127, 12,195,223,134,223,122, 23,251, 31, 10,245,171, 7, 46,167,129,135, 25, 62,238,148,167,213,152, 38, 95, 44,164,212, 65,191,
-137,156,104, 67, 73,145, 65,109,115,112,133,103, 96,183,209, 54, 84,153, 72,116, 75,102,130, 45, 29,223,132,123,193,253, 92,203,
- 88,206, 76, 98,140,165, 64,241,115,167,152,139, 93,205,165,212,243,206,213, 59, 50,157,169,159,197,100,241, 91, 95, 19,166, 53,
-255,155,205, 35,210,165,131,149,107, 29,107,109, 10,247, 8, 92, 57,195,216, 70, 20,235,185, 9,131, 85, 54,110, 8, 9,136,158,
-231,127,155,120,113, 50, 75,254, 86,137, 99,115,119,221,190,191,249,122,212,240, 66,129,153, 53,183,232,232,155, 64,120,134,150,
-204,187,217,213,213,109,215, 69,100,215, 18,207, 2,168, 51, 39,191,253, 78, 68, 57, 91,186,235, 31,252, 63,157, 99,188,117,102,
-194,235, 66,128,139,247,177,217,249,186, 70, 45, 85, 13, 81,100,241, 34, 45, 2, 88,142,213, 47,190,110,140,194,103,170, 46,162,
-140, 66,166,129,208, 84,160, 15,122, 27,179, 7,220,155, 59, 13,150,190, 52,143,122,116,244,165, 86,191, 7,139, 93,195,225, 46,
- 58, 21,159, 25,149, 90,152,166, 9, 82,231,151,171,248, 4,123,178, 74, 45,109,164,238, 77,240, 8, 28,143, 7,108,104,201,108,
- 54, 23,157,182,210,172,181,119,172,154,161,165,248, 68,188,115,224,154, 76,174,230,215,148,253,125, 8, 1, 93,238, 54, 27, 44,
- 5,253, 70, 12, 73,222,202, 99,101,246, 45, 90,178,101, 31,216, 36,215,226, 41, 84, 57, 41, 93, 45,241,176, 69,151,172, 75,162,
- 13, 51,153, 41, 70, 54,213, 13,251,213, 42,165,122,199, 43,193,137,111,185,191, 13,229,170,115,122, 20,148,172, 94,225, 76,213,
- 19,197,114, 63,143,113,102,128, 65,168,243,173, 44,161, 36,169, 20,218, 64,174, 69, 12, 82, 6, 24, 58,196,170, 11,250, 40,241,
-168,232,252,115,107, 27,225,229, 32,137,133,245,133, 85, 53,222, 62,189,131,193,201,100,110,153,168, 5,114,242, 39,250,104,238,
-225,110,138,197,211, 4,167,138, 29, 6,236, 27,231,240,191,190, 69,250, 15, 94,133, 47,223, 65, 53, 83,223,242,215, 39, 99,220,
- 26, 15,243,244, 66,134,120,102, 90,246,115, 89, 18,172,109,245, 51,213,120, 16,199, 58, 3,254, 56, 23, 56, 25, 13,253,254, 1,
-106, 66, 78, 5,185,147,224,238, 14, 78,178, 43,137,174,226, 50,191, 29,202,110, 12,246,129, 26,203, 9,187, 28,124,215,220, 9,
-246,193,145,250,205, 3,118, 82,160,135,250,235, 71,248,165, 11,120,117,131,124,170, 71, 94, 76, 46, 54,123, 53, 35, 99, 14, 48,
-139,193,183, 6,255,248, 92, 84,228,139, 59,228, 78,143,189,115,112,213,249, 85, 0,244,127,248, 9,188,120, 3,186,255, 10,244,
- 15,196,229,213, 55,229, 72,140,161, 5,234, 55,225,248, 0,166, 12,187,206, 35, 92,159,243,177, 62,242, 67, 32, 47, 68, 33,240,
- 0,244, 28,236, 91,112,120, 12, 31, 11,124, 84,144,183, 7,236,193,232,124,117, 49,234,177, 96, 15, 11,246,222,136,125, 80,144,
-154,208,251, 27,210,127,122, 11,249,221,183,144, 23,206, 96,211, 65,237,224,240, 33,188,247, 13,234,191,120, 76,253,123,143,225,
-235, 7,236,194,227, 31,229,134, 34,247, 19,188,252,143,252,198,233, 5,222, 83,236, 42, 83,199, 12,249,128,157, 30, 97,175, 46,
-210,155,119,236,161,112,189,236,208,203,130, 78, 29, 92,244,216,167, 15,240,252, 55,145,179, 55, 97,123, 6,221,125,216,126, 22,
-250, 31,135,252,162,119,251,146, 22, 3,147, 18, 35,246, 28,169, 39,233,250,168,243, 19, 6,163,235,189, 87, 1,217,122,209,144,
- 94, 9, 32,122,157,243,207, 67,232, 50,227, 64,150, 80,130,109, 40, 77, 74,196, 80,118,241, 30, 29,160,188, 5,227, 95,198, 62,
-252, 37,248,219, 7,236,111, 21,134, 15,175,120, 40,149,247, 54,194, 5,190, 55, 79,197, 87,128, 57,119,254,137,175,149, 74,245,
- 67, 78,149, 12, 76,146,168, 9, 36,249,250,172,214,226,218, 61, 96, 44, 70,169,147,159, 33,101, 57,152, 27, 68,101, 68,153,178,
-146, 52, 81,106, 97, 63, 20,178,154, 83,202, 88,180, 58, 37,197,247,142, 67, 88,100,189, 31,118,213,123,173,182, 34,139,249, 37,
-209,246,231,134,163, 92, 91,145,221,118,193,237,252,171, 43,155, 96,169,198, 85, 32,101,219,197,126,150,224,188, 58,163,253, 68,
-132,162,198, 80, 74, 48,230,109, 57,161, 86, 2,185, 53,239,189,174,222,235,201,184,166,188,110,231,236, 18,111, 18,201,141, 97,
-251, 42,164,217,143,125, 93, 15,178,254, 94,204, 28,122,137, 11,253,218,118,221,214,187,112, 91,177,165,116, 14,198,177,133,112,
-194,122,190,180, 14,252,106, 59,232,182,183, 78, 73,188,128,171, 54,171,196, 91,240,203,156, 64, 41,202, 70,124, 21, 82, 98,231,
-172,234,175,121, 10,167, 66,109, 34,233,153, 96,186, 56, 17,210,252, 57,119,200, 88,177,226,220,251, 32,184,105,117,138,100, 69,
-174,241,243,125, 58, 82,188,161, 11,171,113, 78,186,228, 13,168, 80, 75,241,152,232, 40,102, 38, 51,142,227,192, 52, 28,195, 54,
- 29, 13,225, 28,147, 27, 39,255, 39, 8,125,213, 28,104,162, 34,142, 86,206,105,150,213,207,179, 32, 19,114,234,187,200, 19,169,
-164,156,200,187, 29, 89,171, 39,142,197, 40,220,125,141,214,138, 81, 87,170, 39,175,158,196,204,125,153, 45, 47, 61, 40, 51,201,
-150, 48, 24,109, 96, 26,243,164,205,106, 94,133,205, 9, 64,178,108, 97,196, 22,122,146, 52, 17, 70, 82,239,190,109,194,180,247,
-170,170, 76, 88,118,248, 76,173, 37, 42,191, 28, 63, 92,248, 85, 17,196, 38,116,170,164,188,161,150,228,219,185, 58, 33,195, 33,
-126,166, 18, 74, 75, 91, 60,245,197,189,242,189, 24, 35, 30,191,170, 1,115,104,108,235,130, 6,204, 33,128, 28,147, 57,210, 54,
-235,210, 53,197, 7,147,205, 18, 12, 44,119, 50,246,209, 1,186, 66,253,234, 83,228,175,191,131,254,204,203,240,165, 51,164, 55,
-210,119,124,172,223, 85,184,245,241, 62,188,220, 54,251, 98,143,133,120,205,155, 55,125,113, 37,180,236, 97, 86, 89,209, 37,214,
-181,253, 97, 66,222,219, 35, 91, 37,223, 8, 97,216,189,141,175, 11,186, 50,123, 51,103,101,222,105,130,171,201, 67, 67, 30, 77,
-240, 65,133, 23, 5,158, 73, 62, 69,120, 58, 96,155, 8, 54,153,128,223,218, 99,223,240, 16,115, 41,226, 17,174,127,248, 22,250,
- 83, 55,177,179, 30,126, 8,120,119, 68, 63,123,138,221,234,176,119,246,254,195,137,250,222,246,228,145,219,158,182,127,213,199,
-237,178,249,132,218,181,149,239,125, 92,234, 7,144, 91, 72,151,224,134, 32,103, 29,228, 31,243, 17,112, 25,192,190,231,151,249,
-244,158, 71,118,189, 43,240,193, 4, 31,141,240,209, 64,189, 56, 82,135, 9,158, 26,246,176, 32,143,196, 73,103,127,252, 14,250,
- 7,239,192, 43,103, 17, 13,171,176, 63, 96,111, 62,161,254,220, 35,166,127,112,206,240,189, 43, 31,205,111,160,222, 16,210,173,
-140,116,160,147,160, 31,128,188, 55,198,231, 80,188, 88,233,253,194,177,106,240, 36, 56,248,125, 94, 70, 46, 18, 62,249,174, 96,
-214, 97,181,146,174, 12,206,123,248,190, 96,119, 39,184,255, 8,185,253, 24, 78,222,130,237,255, 71,215,187,198,106,150,165,119,
-125,191,103,173,181,247,251,158,107, 85, 87, 85,223,123, 60, 61,211,227, 25, 27, 15, 54, 54, 54, 25,108, 19, 18, 8, 96, 72, 72,
- 36,164, 68, 10,136, 64, 72, 66, 4, 81, 34,132, 20, 69,185, 8, 72, 20, 62, 68,202, 7, 4, 9, 81, 66, 20, 43, 16, 66, 32, 22,
-118,226, 27, 96, 99, 25, 12,182, 99,123,152,177,103, 60,198,115,233,238,153,158,190, 85,117,215,237,156,243, 94,246, 94,107, 61,
-249,240, 60,107,239,253,158,106,143,212, 83,125,169, 58,239,109,191,123, 61,151,255,255,247,255,167,198,177,143, 71,254,217, 39,
-187,200,194, 17,116,223, 0,171,143, 67,255, 50,200, 51,254, 62,118, 79,190,143,135,136,145, 73,132, 55,237,112, 14,212,182, 58,
- 83, 63, 36, 47, 96,156,145, 37, 37,193, 14,244, 0,229, 17,228,127, 4, 87,255, 3,250,185,183,224,251,133,250,217, 29, 87,187,
- 61,111, 39,184, 27,133, 93,101,186, 89,210,245,118,176, 86,181,239,184,107, 72,178, 66, 40,194,190,157, 53, 49,152,255, 62,118,
- 12, 49, 81,115, 65, 60, 53,176, 58,241, 45, 37,247, 87,187,216, 72, 5,134,152,216, 81,185,145, 71, 11, 73,241,123, 78,144, 64,
-212, 72,145, 72, 13,230, 99,206,181,113,115,195,180,175, 69,196, 89, 25, 62, 49,208, 22,254,195,148, 92,214,102, 34,205,219,220,
- 68,196,180,113,177,204, 59, 80, 21,161,136,129,143,182,110,213,203,190,103, 63, 10, 80,106,160, 70, 56,166, 80, 84,184, 82,235,
-238,135,146, 73,181, 90, 40, 85,179,202, 45,242,193, 85,235,181,132,243, 25,119, 59,128,117,139,112, 96,227, 10,158,237, 33, 64,
-174,101,242,187, 79,179,133, 73, 11, 53,215,128,211, 21, 83, 23, 2,188, 57, 32,122, 78,145, 91,136,217,104,215,255,181, 57, 81,
-219,133, 91,148, 77, 99,220, 91,214,188,197,208, 86,106,153, 31,184,221,161,218,121,146, 4, 82, 72,102,167, 84,139,180,174, 30,
- 29, 94,125,223, 45, 11,101,252,196,196,247,207,177, 86, 27,203,207, 72,218,121,252, 78, 99,178,187,109, 17,130,219,254, 22,200,
-238,182, 82, 14, 30,214,228,164, 63,137,209,138, 24, 85,198,156, 41,206, 60, 9,193,222,183,113, 24,166,206, 90, 26,120, 71,220,
-103,169,243,185, 87,235, 92, 2, 77,218, 10,159,136, 55,212,104, 75,162, 19,183,153,167, 20,162,251,201,133,110,125, 76, 58,127,
- 10,125,252,158, 37,132, 77, 21,154, 93, 60, 69,213, 32,247,206, 49, 22,172,170,201, 30, 48,144, 68, 38, 25, 78, 20, 27, 41, 77,
- 52,184, 22, 54,239, 29,250, 20, 67, 55,117,189, 45, 36, 99,190,232, 68,162, 39,189,225,162, 3,235,216,170, 68,163, 22,101,143,
-203, 43,217,246,141,169,237, 70, 34,168,101,221,106,181,200,173, 82, 11, 50, 14, 19, 30, 48,120,240,223,228,131, 81,243,176,167,
-166,184,196,200,119,169,216, 7,152, 61, 91, 89,167, 11,192, 84,150,163,170, 5, 15, 56,204, 67, 58,177, 55,160, 89,128,206, 60,
-160,251,162, 88,172,232,237,104,163,248,113,132,115,165,126,246, 33,114, 43, 33,127,224,121,228,155, 3,122, 20, 9,175, 61,166,
- 70,161,139,112,243,254,142,180, 41,246,146, 4,210,104,249,208, 82, 32,143, 30, 13,233, 23, 89, 55, 97,120,125,189, 81,108,146,
-158,139,146,163,165,132,213,109, 70, 95,219, 25, 39,252, 36,153,189, 41, 70,179,108, 61, 54,245,185,118,174,224,127,223,148,153,
- 12, 35,250, 86, 49, 53,250, 43, 61,242,114,100,252,185,145,253,202,154,215,110,173,196, 34, 68, 41,176, 55, 77, 20,119, 43,221,
-223, 28,173,113,252,228, 77,187, 48,111,218,161,207,221, 45,250,230, 8,199,150, 44, 71,205,240,209, 12, 71,255, 29,200,183, 58,
-250,119,176,207,244, 16, 94,105, 59,218,242, 89,180, 70,228, 41, 87,243,223, 9, 54,158,150, 15,217,243,149, 43,208, 79,195,238,
- 17,220, 15,240,134,192,251, 5, 86,142, 34,123, 48,194, 87,246,232,123,133,240, 76, 79,248,246,155,132, 63,120, 3,190,225, 24,
- 78, 58,227, 38,108, 50,250,234,125,202, 79, 61,102,251, 19, 23,108,223,216, 49,230, 74, 57,129,122, 35, 80,142,226,212, 94,180,
- 36,193,216, 43,253,202,109,153,110,125,145,216, 12,197,109,125, 35, 22,170,178,203,182, 7,246, 60,111, 55,247,130,100,235,252,
- 70, 37,142, 5,185,136,112, 47,193, 59, 9,189, 17,224,198, 8,231, 91, 75,200,235,189, 24,238,177, 9, 75, 60,182,128,157,237,
-171,176,126, 1,142,126, 51,164,151,125,133,225, 59,116,130,137,227, 24,141,104, 87,223,135,242,190,141,218,117, 99, 7,115, 88,
-249,190,253, 24,194,218,121,178, 30, 15,155,206,205,107,206,173, 5,152, 83,236, 73,168,152, 48,113, 74, 85,137,214, 0, 0, 32,
- 0, 73, 68, 65, 84,255, 87,224,238, 15,162, 63, 94,224,239, 66,126,251,138,251,101,228,173, 20,184, 47, 86,203, 37,223, 99,203,
- 58, 81,107,245,137,154,211, 18, 3, 19, 78,115,234, 68, 69,201,165, 80,139, 97,128, 99,234, 88,117, 29,165, 51,226,158,142,197,
-239, 45, 75,232, 71, 35,110, 85,114,182, 14,232, 40, 9,151,213,240,168,125,138,116, 4,114,181,100, 44,114,177,251,158, 52,111,
-182, 44, 60, 83,122,144,113,113,120,128,169,219,152,102,107,152, 58, 42,183, 97,101,157, 11,104, 16, 20,236, 64, 47,254,218, 10,
-138, 22,163,222,117,162, 28,185, 55,189,212,202,137, 59, 43, 55, 24,190,182,104,177,166, 35,122, 55, 39,184, 56,184, 30, 98, 16,
-166,243,120,182, 16, 79,180, 79,153,253,252,209, 3, 71,144,121,172,172, 79, 56,201,213,139, 7,153,136,104, 77,207,163,194, 36,
- 72,148,197,129, 57,163,191,229, 96,148, 47,173, 3,151,131,176, 56, 86,190,255,180, 18,209,116, 14,162, 70,229,211, 16,208,106,
-199,249, 88,125,130, 35, 54,105, 73,193,198,209,197,155, 59, 69,167, 91,122,112, 87,150, 65,118,132, 82,148,170,217,227, 74,109,
-157, 83, 23, 30,251, 24,230,233,195,236, 81,183,247,182,162,158,170,120, 61, 44,126, 30,197, 55,143,251, 80,172,216, 92,117,189,
-189, 39, 46,156,110, 51,146,146,139, 33,199,181, 78,227,123,185,174, 89,240,107, 36,132, 89, 77, 62,137, 38, 39,218,221, 44,206,
-108, 92, 2,149, 64, 18, 2,165, 22, 82,234, 73, 71, 39, 86, 97, 20,219, 7, 52, 75,198, 36, 16, 75,238,131,243, 71, 31,106, 37,
-151,106, 95,206, 0,189,170, 69,183,166, 72,138,129, 72, 37, 77, 81,117,118,200, 83, 26,186,199,199, 31, 85, 80,169, 7,246, 6,
- 22, 99,251, 16,131,141,181,101, 65, 83,242,192, 2,243,157,207,240, 3,145, 4,201, 14,175, 32,214,205,139, 58, 75, 89,138, 69,
-236,169,229,231, 74, 35, 37,249,222, 81,171,113, 90,197,171,254,214,238, 6, 26,186, 85,102,107,129,255,251, 34,144,213,170,238,
- 92,171, 97, 71,219,217, 83,176, 36,152,149,192, 90,109,167, 92,197,169,161, 9, 61, 90,155, 82, 62, 6,234,231,175, 8,183,223,
- 67,126,251,179,200, 55, 10,172,133,208, 39,106, 23,136, 41,112,254,222,134,112, 89, 8, 98, 58, 50,196,148,190,120,218, 19,190,
-163, 11,139,207,187, 49, 67, 86, 73, 89, 91,104,144, 77,164, 99,165,190,157, 9,221,222, 14,156, 19, 23, 95, 93,101,120, 35, 83,
- 31,100,184,169,246,156, 95,207,104, 15,242, 82, 7, 55, 61,164,250,162, 32,223,210,193, 63,177,178,134,181, 48, 22, 24, 81,116,
-132, 97,180, 26,166,127, 70, 56,189,200,132, 97,132,215, 55,222,198, 4,184,187,131,207,239,209,207,108,145,151, 87,200, 31,234,
-224,198, 5,220,252, 70, 8,191,207,133,101, 23, 30,152,221, 63, 97,160,161, 60,128,242,203,166,224,191,221, 35, 47,172,224,104,
- 15,229,194, 70,237,225, 4,198, 95,134,203, 7,112,127, 13, 15,170,105, 2,190,239,134,165,189,253,133,119,224,125, 37,124,252,
-140,240,199,215,240,219,111,194,233,202,238,156,187,130,188,254,144,242, 11,143, 25,126,248, 49, 23,191,190,225,241, 88,184, 60,
- 18,120, 42, 26,115, 96,122, 30,158, 17, 36, 86, 75, 38, 79,233, 43,105, 17, 23,172, 86,124, 33,115,210, 96, 8,205, 54,165, 7,
- 52, 59, 79,191,176,235, 48,248, 1,181, 85, 66,169,200,182, 32,219, 12, 15, 83, 75, 91,178,241,248, 26,243,149, 31,251, 53,118,
-126,137,220,186,128,211,135,144, 31,195,254, 49,172,191, 12,253, 43,144,110, 59,216,224,161, 29,188,245,109,216,191, 14,195,149,
- 21, 80,165, 90, 17, 21,125,164, 31,130, 29,252,169,154, 5, 46,125, 7,196,223, 14,188,232, 93,122,235, 77,131, 21, 0, 53,155,
- 91, 97,251,231,208, 47,255, 26,252, 47,137,250,207, 6,118,155, 29,119, 69,121, 43, 5,182, 14,110, 10,222, 1, 73,144,137,119,
-221, 20,237, 97,233, 97,246, 27,107, 84,166,213,158,162,228, 98,223,200,174, 91,147, 98,178, 14,186,139,140,197,110,216,115, 55,
-198,140,244,172,160,157,176, 74,129,203, 12, 67, 16,207, 22, 42,104, 41,118,159, 11, 62,221,155,212,226, 30,117,231,145,210,165,
-161, 57,107, 59,216,120, 98,140, 76,163, 90,186,104,104, 82,166, 47, 50, 38,101,193, 59,173, 14, 25,217,250, 72,254, 72,140,151,
-191, 14, 66,142,129,162,133,163, 86,247, 85, 27,221,182, 26,176,121,210,203,116,208,201, 19,163,240,209,133,126, 77,133, 95,151,
-178, 7,108,109, 17,167,164,206,234,246, 57, 57,184, 31,107,187, 39, 30, 80,222,174, 67, 89,230, 61,120,153, 10, 3,109,137,198,
- 51,244,101,209,109, 90,113,209, 80,187, 38, 96, 28,171, 33,191, 87, 33,206, 60,246,162, 20,205,182,223,246,142,186,199, 8,125,
-218, 37,114, 81, 74,105,170,242, 38,101,170, 19,191, 99,116, 22,190, 44,232,112,243,218, 82,166,102, 50,132,198,100,145,137, 9,
- 82,139,250,132,134,195,132,185,197, 27, 49,233,190,252,156,171, 77,251, 17,170,139, 38, 93,192,232,212,211,234,170,120,209, 37,
-172,134,131,194, 76, 61,210,220,180, 96,179,181,112, 38,177,232,129,252, 80,196,192,113,164,142, 84, 74, 53,177, 91, 58,178, 23,
- 50,152,226, 85,101, 6,243,182,157, 19,110, 21, 72,162,236, 75, 97,168, 58,171, 69,181, 13,108, 44,135, 56, 33,116,174, 84,149,
-160, 68,204,207, 93, 99, 68,181,152, 48, 78,116,254,248,165,153,233,195,252, 3, 29, 97, 40,117, 54,237, 91,122,145,250,248,202,
- 51,112,213, 58,184, 32,160,161, 35,116,130,196, 4,219,209, 46,198, 82, 76,252, 86,153, 47,220,106,129,217,177,165,165,120, 5,
-179,220, 76, 77,158, 88, 89, 38,243,224,254,119,183,222, 86,200, 85, 24, 58,229,120, 83,224,225, 96,202,241,170,176,117,224,244,
- 38,152, 61,234,212, 99,154,206,162, 77, 69,215,193, 82,193, 66,128, 47, 95,161,199,247,144,239,184, 13,175,156, 88,252,231,113,
- 64, 58,187,193,156,197, 13,242, 56, 19, 86, 74, 26,109, 98,157, 60, 77,110, 26,251,133,153,177,191, 10,112,220, 41, 55,215,202,
- 81,132,116,105,231,165,244,126, 34, 93,101,120,144, 12,163,229,222,122,189, 40,212,207, 95,152,232,233,165, 96,122,171, 71, 66,
- 88, 87,219,147,191, 89,224,173, 17,190,183,163,255,151,142, 24,254,241, 21,229, 68,173,176,241,102,180, 4, 19,233,140,254,133,
- 36, 96, 9, 57, 95,119,170,208,195, 10,247, 50,225, 60, 34, 87,152,234,252,197, 29,172,254,109, 59,213,202, 23, 77, 12, 23,158,
-126,242,206,161, 3,148,207,192,238,158,237,127, 95, 88,217, 11,213, 8, 97, 15,241, 10,242,231,224,254, 59,240,110,178,105,200,
-163, 0, 31,235,224,108, 5, 63,251, 0,126,239, 25,252,214, 99,228,153,181,137,162,134, 17,222,126,140,126,105, 67,249,193, 7,
-236,126,101,195,230,114,100,119, 36, 92,222, 20,182,125,100, 91,124,127,154,231, 27, 84, 18,166,152,226,137,236,167,138, 22,153,
- 50,170,139,123,138, 37, 96, 59,209, 22, 58,238,142, 15,233,197, 60,251,218,162,255,100,214,187, 69,108,210,164,106,218,129,157,
- 65,111,100, 31,204,205,177,242,234,160, 11, 38,120,116, 71,129,222, 23,184,115,129,220,217,194,241, 21,228, 75, 67,176,246,183,
- 77,224, 23, 86,110,146,117, 5,102, 13, 86,133, 21, 19,196, 50,110,237, 48,151,199,208, 93, 65,255,109,208,255, 81, 72,223,228,
-163,252,236,217,176,109, 68,176, 54,117,251,246,111,193,213,255,140,254,202, 5,250,191,246,228, 47, 92,113, 57,236,120,167, 19,
-238,138,161, 80,131, 19,219,136, 66, 9, 54,109, 91, 78,189, 90, 79,104,105, 85,243,184,177, 70,163,217,185,127,196,187, 60, 37,
-103,115,162, 83,125,101, 23,163,133,201,184, 56,137,226, 55,201, 40, 12, 17,118,158, 75, 20, 5,246,165,146, 61,212, 37,250,148,
-209, 10,119, 3, 91,101,135, 67,136,139,242,170,159, 22, 65,155, 19,230, 80, 86,118, 16, 12, 93, 77,149, 62,161,181, 91,239,171,
- 79, 26,189,213, 79,223,236, 43,135, 73, 92,230, 81,173, 33, 38,118, 82, 9,197, 82, 29,119, 49,204, 96,148,133,194,125,210,249,
- 44,159,153,204,121,240,178,160,235,181,195,182, 0, 99,173, 6,215,241,108,113,173,213,195, 89,194,194,230,182, 56,208,101,238,
- 84,151, 56,107,117, 17,113, 59,100, 2,115, 86, 19,141, 90, 26,194, 92, 32,248,123,213,137, 16, 67, 7, 98, 41,101,117,114, 50,
-217,189,219,168,109, 50, 29,230, 77,209, 17, 67, 36, 36,139,220, 46,101, 36,123,220, 96, 97,206,197,152,217, 42,115, 17,177, 76,
-116, 91, 12, 16,102,222,160,206, 58,173,234,202,116, 14, 96, 56, 75,246,237,181,207,223,213,244,234,128,159,125, 25, 97, 15, 37,
-231,197,246,171,253, 76,153,200,112,184,141,186,217,235,218,148, 69,155,208, 27, 19,220,233,129, 95,126, 94,219,197,224,147,171,
-126,141,166,142,164, 81, 8,235, 35,200, 35,227, 48, 16,171, 93,140,237, 34,175,137, 57,227, 72,132, 40, 86, 81,218, 95, 21,245,
- 69,110,179,156, 24,147,194,126, 95, 23,102, 36, 99,154,198, 79, 17, 77,130, 76, 86, 3, 27, 35, 53,219,129, 52,177,137,127, 25,
-164,206, 22, 10, 7,220,122, 0,140,237, 30, 76, 85,232,240,131, 97, 11,169, 35,134, 8,171, 19,180,236,208,113,239, 39,141,137,
-216,196, 43, 91, 25, 71,155, 48,250, 14,172,224, 55, 53, 15, 42, 40,234, 57,242, 90, 33, 55,251,136,241,173, 91,193,209, 38,236,
- 99, 85,219,177,239, 43,225,190, 9,202,164,183, 19, 95, 7,117,143,113, 65, 30,244,126,242, 97,255,253, 78,135,164, 0,217, 88,
-236,188,182, 69,211, 67,228,219,206,225, 27, 78, 44,171,251, 36, 16,142, 34,117, 21, 56,150, 13,225,241,224, 56, 69,187,120,227,
-202,198,240,227,130, 60,215, 46,186, 20,149,152,160,223, 64,119,212,209,255,235, 55, 8, 47,244,118,243, 59,139,118, 24, 94,218,
- 88, 93,111, 39, 27, 79,127, 45, 82,191,188,131, 13,134,121, 61, 14,232,133,227, 72,215,130,190, 54, 32,191, 10,225,251,206, 88,
-127,110,224,242,225,136,158, 47,214,178,193,242,182, 79, 43,172,190,115,101,213,241, 47,109,225,249,158,240,189, 39, 70,127, 59,
- 57, 50,159, 94,142,240,209, 4, 31,138, 16,191, 27,234, 93,168, 95,128,248,123, 22,160,244,197,222,183,188, 11,229, 47, 89, 55,
-123,243,204,184,244,187,140,116,157, 29, 64,229,211,112,111, 15, 95, 19,120,119,240,215,182,182, 47,207,166,192,119,220, 48, 15,
-145,102,184,220, 81,191,116, 65,249,233, 11,234, 47, 94,146,223,221,145, 99,229,209,177,176,187, 25, 24, 68,184,242,201,195, 80,
-204, 23, 26,213,166,220, 41, 64,109, 43,241, 57, 57, 98, 50, 59, 20,153,101,100,141,179, 48,223,213,125, 2,213, 5, 66, 10, 83,
-178,147,116,174, 45, 73, 62,229,161,117, 98, 21,173, 35,146,221,198,153, 61,124, 70,220, 75,219,196, 19,163,152,234,108,140, 48,
- 88,200,142, 60,243, 46,156,108, 32,191, 8,101, 15,249, 2,186,231,236,175,244, 52,196, 79,192,234, 33,212, 71,246,222, 14, 95,
- 51,135, 64,200,112,252,109,112,252,199,160,255,164,143,227,247,254, 87, 27,108,250,162,109,124, 13,182,255, 13,188,247,243,232,
- 63, 9,232,143,118,148,215, 46,184, 40,123,222, 88, 5, 30,170,189,245,125,152,245,122,134,134, 46, 19,205,172,248,158,145,197,
-120,183,101,190,183,155,103,136, 66, 41,198,116, 87,135, 52,170, 91,130, 36, 89,100,161, 20, 83, 40, 87,169,132, 24,109,160, 0,
-164, 24,169, 57,179,203, 5, 77,214,249,151, 42,140, 81,233,146, 16, 75,160, 83,179, 83, 21,204,250,213, 40,113, 38,176, 2,117,
- 86,122,110,222,101,157,221, 60,237,239, 99,179,133,133,198,135,119,174,249, 53,117,184, 89,231,116,154, 36,204,191, 26,140,166,
-115,175,123,115,201, 70,255,121,235,162,142, 76,144,169,104,172, 94, 24, 45, 0,163,115,113,225, 75,198, 41,174, 85,219, 64, 89,
- 60,205,172, 82,106,165, 80, 73, 26,233, 66, 36,164,206,114,187,151, 34, 45,213,107,135,215,225,252, 76,125,226,217, 94,179,133,
-104,133,131, 88, 85, 59,152,151,172,120, 91,103,166, 96,247,220, 65,149, 82,203,100,251,154, 44,130,238,163,143,194, 98,223,111,
-151,253,144, 51,185,152, 14, 66,155,142, 97,217, 68, 59, 14,182, 86,253, 64,137,232, 18,207,222,220, 90,234, 69,217,100,169,114,
-241,153, 4, 62,200, 6,176,240,217, 7,155, 4, 59, 58, 56, 52, 70,123,153, 19,237,138,206, 63, 91,181,186, 61,110,241,100,106,
-225, 9,173, 98, 59,252, 91,209,218, 8,142,106,194,108,243,133, 71, 86,125,207,106,125,196,160,149, 36, 33, 17,251, 35, 40,197,
- 98,248,114, 54, 24, 75,106, 21,135, 78, 72, 84, 99, 92, 84,178, 4, 50, 62, 54,147, 73,103,106,157,179,139, 75,134,170,236, 67,
-160, 23,103,238,186,113, 51,136,139,206, 38,168,131,206,201,107,237,255,155,130,180, 46,144,133,218,152,242,234, 54,181,234,123,
- 20,245, 16, 7,161, 14, 35,116,123, 88, 37, 40,163,249,218, 67, 7,169,186, 7, 93, 9,193,199,103,121, 36,116,238,128, 12, 30,
-203, 68,157, 5, 20,170, 84, 9,147, 82, 20,148, 80,149,197,196,196,118, 30,213, 88,202, 89,109,204, 19, 47, 71, 11,113,121,170,
-243,145,110,181,187,116, 20,116, 55, 90, 73,142, 98, 51,113,151,132, 6,231,150,135, 2, 95,186,180,113,207,111,190, 1,207,244,
- 72, 58, 71, 86, 1, 89, 9,146,132,163,183,149,244, 96, 36,105,229,162, 51,208,153,168, 29,236,197, 89, 50,102, 43,174,108, 71,
-187, 95, 31, 21, 88,253,137,155,132,223,122, 3,222,202,232,107, 91,234,107,174, 50,201,198,110,151,151, 87,112,179, 35,254,171,
-103,240, 51, 80,191,180,131,175,102,116,173,240,114,111,202,238,231, 18,114, 21,169,159,222,193, 42,209,255,190, 35, 86, 63, 80,
-216,239, 21, 93, 51,141, 74,143, 3,156,127, 44, 34, 79, 7,248,197,193,172,110,191,255, 12,118, 22,201, 74, 16,228,102,178,209,
-255,109,133,243,155, 16, 62,100, 93,120,184, 9,225,169, 39,187,244,122, 1,187, 63, 13, 15,190,108,190,232, 22, 26, 81,253, 96,
- 31,130, 57, 10,190,224, 5, 73, 4, 62,126, 4,223,116, 2, 55, 79, 92,184, 56,194,171, 87,212,127,252,144,252, 19, 23,148,247,
-246, 20, 10,122, 44, 12,207, 89, 23,180, 27,224,170, 8, 67, 54, 81, 98, 46, 77, 79,161,211,152, 76,174,145,226, 68,231,239,221,
-193,223,135, 89, 43,201, 98, 52, 27,212, 86, 81,210, 71,226, 81, 34,220,233,168,247,178, 21,168,209, 44,161,166, 65, 83,116,112,
-193,165,135,233, 72,115,123,104,157,226, 81, 29,131,232, 24, 66, 87,217,150,132,230,136, 60,243, 24, 78, 71,123,237,106, 28, 51,
- 83, 71, 61,111, 35,249,240,146, 11,220,178,145,233, 16,251, 44,186,151,252,240,222, 64,189, 15,225,212, 14,113,241, 3,189,238,
- 97,255,147,112,249, 23,209, 87,239,194,223,233,208, 95,175,148, 71, 27,246,101,207, 59,125,224,113, 49, 81, 90, 87,175,225,114,
-181,137,184, 28,208, 82, 57,200,179,182,173,196, 98,188,216, 68,117,141, 75, 46,193, 18,186,130,143, 73,115,165, 76,119,199, 98,
-252, 12, 17, 74, 8, 83, 20,166,196,142, 81,173, 64, 75,177,253,206, 74, 47,144,162, 48,146,168, 90, 25,198,226,147,130,106,102,
-219, 73,143, 36,104,148,137,120,214,196, 82,234, 2, 91, 59,204,108,175,153,105,163,247, 67,251,211,212, 37,234,236, 5,111,112,
-175,176,112, 39,142, 13,156, 35, 70,136, 11,170,142,180,181,217,136,184,112,175,168,146,107,246,149,103, 90,246,155,214, 43,235,
-204,254, 40,205,119,221, 60,245,142, 63,181, 32, 23, 83, 2,152,191, 59, 80, 67,128,146,231, 0,173, 32, 7, 81,179,211, 89,182,
-152,248, 79, 13,133,180,199,156,191, 43,213,133,216, 77,119, 21, 38, 40, 76,164,138,237,207,171,251,193, 39,128, 14,115, 74,153,
- 46,166, 16, 19,112,198, 47,154,170,117, 18, 43,206,135,185, 28, 60, 47,185, 22, 19, 87, 93,144,221,180, 3,246,124,226, 12, 25,
-107, 98, 72,173,211,107, 21,157, 3, 89, 38,157,153,179,118, 67, 48,103, 69,234,122, 98, 50,129,156,113,209,195,204,207,247, 21,
-128,230,106,159, 69,206, 72,201,147,126, 99,186, 40, 22,232,220,131, 59, 77,173,132, 24, 38, 66,107,173, 94,120,186,142, 64,244,
-152,152, 18,117,216,147, 82, 3,184,172, 86,200,214, 56,198,213,241,129,181, 56,131, 41, 4,106,173, 36, 42, 42,129, 18, 18,140,
-197,184,234,178,172, 13,235,116,200, 23,183,122, 13, 26, 72,216,126,221,186,203, 74, 10,209, 88,187, 62, 22,210,108, 35,159,118,
-129,183, 40,195, 57,185,196,165, 26,165,221, 49, 77,113,152,125, 60, 46,126,217,170,102, 24,118,232,234, 24, 66, 79, 25,242,132,
- 45, 52,171,157, 3,105,220,207, 30,125, 7, 84,149,201,167,217, 10, 13, 27,171, 23,215,222, 69,255,146,251,151, 99,106,206,108,
- 95,167,193,178,145,199, 4, 93,173,132,199,158, 6, 20, 65,119,131,141,184,143, 76,157,104, 82,122,236,228,243, 73,166, 4, 80,
- 87,236, 75,172,240,203,143,208,199, 35,242,157,231, 70,112,147, 35,100, 5, 97,149, 44, 73,236,141, 13, 79,221,223,147,174, 70,
- 86, 21,182,193,190,240,187, 98,194,190, 16,117, 2,101,108, 54, 74, 60, 75,132, 23,123,248,218,158,242,115, 27,234,171, 91,234,
-222,118, 80,225,220,158, 83,120,184, 34,252,166, 99, 56, 10,132,223,113,138,124,234, 4,253,245, 45,250, 83, 87,232,175, 15,240,
-116,178, 3,231, 27, 87,132,123, 10, 63,159,145,127,173,231,248,183,174, 24,126, 97,203,110, 29,136, 1,214, 43,225,164,171,232,
-166,194, 47,110,145,231,142,144,239, 89,193,195, 66,109,201,110, 27, 69,198,140, 60, 4,121, 74, 29,170,178,247, 89,245,167,230,
- 15,125,146,219,142,144,255, 11,244,205,159, 65,127,254, 41,216, 95,193, 75, 9,249,200,218, 90,192,161, 82, 63,243, 24,253,145,
- 75,228,155, 59,228,119,156,193, 51,189, 21, 13,162,240,254, 99,120,235,138,250,163, 15, 25,254,209, 35,198,253,200,120,164,212,
- 27,198,197, 47, 62, 97,106, 19, 15,116,206,176,143,190, 82,104, 73, 84, 50,225,141,231, 52,168, 70,172,122, 18, 11, 59, 31,232,
- 77, 15, 39, 56,211, 32, 89,101,159,190,235,196, 24, 0, 63,125,105, 75,248,149,218, 3,150,122,200,239,144, 15,192,128,204,200,
-197, 89,208, 94, 22, 23,233, 94,209,171,132,172, 55,144,238, 67, 93,249, 29,246,129, 29,210,113,109, 22,184,240, 28,112,195, 85,
-244,209,160, 2,229,211, 80,223,128,240,113, 8, 31,118,209, 98,111, 7,123,125, 7,182,127, 17,222,255, 41,248,172,194,223,238,
- 41,239, 12, 84,221, 83,135,145,247, 84,120, 80, 12,204, 20, 38,244,154, 78, 55,218,162, 51,155,187,202,161,227,174, 69,151, 4,
- 87, 92,151, 3,221,190,225, 84,107,181,158,180,180,213, 71,227, 40,199, 64,223,117,212,216,145,165, 30,120,248, 99, 16, 84,122,
-118, 73,145,154,161, 20, 6,133, 53, 66,167,176,209,226, 26,154,138,113, 41, 27, 62,180,250,152,211,198,199,227,242, 0,209,150,
-222,216,196,124,206,218,104,236,240, 41,172,190,241, 54, 60, 75,162, 69,167, 10, 7, 8,214, 54,114,173, 30,117, 59,205, 45,170,
- 31,136,106, 26,158, 70, 36,203,126, 31, 99,234,148,195,100,223,106,241,172, 58, 1,117,234,244, 24,149,153, 86,215, 16,185, 85,
-109, 20, 47,238,215,174, 33, 24,154, 82, 14,125,246,211, 52, 64,229,112,188,189,236,128,213, 58,178,160, 97, 66,133, 79,238, 40,
-153, 81,174,109, 74, 81,180, 26, 55, 96,194,204,206,241,163,117,242,207,207,128,247,150,174,215,212,231,162, 79, 82, 24,194, 18,
-157, 35,215, 88,246,117,246,228, 91,164,184, 77, 52, 74, 91, 85,120,192,205, 65, 17, 26, 22,253,125, 43,102,166,244,210, 72,234,
-123,186,174,119, 49,184, 18, 98, 71, 70,168,227,222, 14, 95,127, 14, 99,173,228, 60, 82,134,189,185,184, 66,242,247,184,248, 22,
-120,214,115, 89,140, 74,123,205, 97,242,185,183,198,146, 20,209,156, 41,165,178,221, 94,145, 67, 96, 63, 12,164, 20, 59,111,241,
-213,186,219,106,177,163,141,117,156,146, 1, 28, 98,176, 14, 66, 99, 68,170,197,217,213, 54,162,152, 30, 37,216, 27, 28,231, 10,
-174,138,121, 32,155, 80,200,130, 94, 44,231,188,186,221, 65,163, 3,245, 75,157, 50,117, 39,133,102,157,191, 64,211, 93,209,237,
- 46, 89,231,184,213,218, 72, 45,227,136,110, 47,225,252, 54,116, 61,100,131,229,215, 92,201, 49,146,212,137, 83, 65, 39,157,187,
-150, 58,101,210,106,177,113, 75,117,197,163, 42,196, 46,162,163,117, 51, 86, 95,206,233,110,197, 59,175,236, 35,251,146,188,170,
-186, 28,124,122,227,126,255, 65,141,202,214, 88,179,155,106,255,174,130, 30, 69,219,191,203, 96, 35,172, 46, 33, 95,188, 68,223,
- 31,144,239,189, 1,183,122,171,218,215,230, 51,231, 40, 17,222,220,112,254,254,150,245, 85,102,179,169, 36,179,148, 51,250, 55,
-180, 97, 52,143, 69,233, 95, 76, 48, 8,250,238, 72,189, 59, 80,182,153,242,104,160,236, 43,188, 5, 41, 6,210, 88,208,167, 42,
- 18, 58,164,235,144,103, 34,225,251,158, 34,124,104,133,254,245, 7,232,207,239,145, 99, 75,253,138,223,217, 67,237,209, 87, 71,
-194, 55,175,184,241, 78,134,119, 10,199, 47,219,106,100,247, 0,106, 81,228,161,114,186, 26,205, 74,182,142, 86,133,237, 44,204,
- 69, 87,126,210,237, 18, 50,220,133,245,175, 64,252,148, 29, 46, 7, 55,138, 45,228,255, 26,238,253,159,240,206, 29, 8, 17,253,
-226, 6,126, 13,228,247, 43,188,176, 66,223, 25,224, 65, 65,254,189,115,228,165, 35,187,216,135, 17,253,220, 35,244, 11, 27,244,
-231,183,232,227,129,124, 57,176, 61, 86,118,119,132, 18, 13, 35, 28, 93,184,217,186,197, 36,126, 67, 13, 66,245, 21, 75,194,166,
-219,105,113,107, 8,213,133,155, 81,231,200,202,131, 96,137,197, 89,219, 20,242, 78, 86,164, 11, 72,242, 17,234,231,183, 6, 24,
-106, 15, 62,122,135,144,117, 78, 71,235, 13,156, 68,100,202, 61,111, 48, 37,250, 86, 40, 70, 88,123,194,220, 58,192, 13,129,155,
-138,156, 84, 72,199,190, 15, 31, 93,252,182,130,248, 60,196,143,184,138, 29,251,247,186,247,101,254,235,160,239, 64,248, 46, 8,
- 47,248,201,220,217, 62,189,252,125,120,240, 23,224,213,247,224, 31, 28,161, 63, 87, 40,247, 47,201, 12, 16,225, 74, 42, 27, 17,
-122,175,100, 10,106,156,139, 50,231, 23,132,133,204,110,178,194,251,141, 50, 46,118,181,130,121,131,181,250,132,162,141,140, 29,
-253, 42,205, 99,238,225, 43, 72, 36, 83,205,226, 26, 93,240, 80,237,251,152,213, 52, 29,251, 34, 28, 33,244, 65, 24, 71, 43,202,
- 59,143,131, 78, 10,217,105,150,118,178,130,134,234,158,103,123,156,224, 66, 39, 60,189, 18, 9,212, 58, 31, 32, 19,208,117,154,
-234,232,188,187,157,176,172, 58,105,121,116, 17,200, 52, 1,165, 60,123,155,150,139,238,247,196,222,239,153,123,135,158, 36,148,
- 85, 8, 38, 82, 93, 36,142,225, 65, 38,202, 50, 3,124, 81, 28, 9, 7, 33, 46,147, 31,218,237,149,145, 22,121,141,211,206,230,
- 63, 39, 58,239,150,155,186,125, 74, 86,211,217, 15, 97,112, 26, 83,124,183, 69, 90,157, 86, 17, 76, 35,166,230,181,111,106,248,
-166, 15,154, 18,206,196, 83, 60, 23, 95, 48,245,184,213,170,242,129, 96, 27, 89,144,255,166,195,119, 9,196,241,209,188, 44, 2,
-105, 74, 45,102, 9,212,185,234,156,106, 50,239,236, 9,130,106, 88, 92,180,243,234, 97,154, 34, 85, 53, 42,107, 12,204,177, 34,
- 58,177,218,171, 86,234, 56,160,197, 10,181,144,226, 20, 26,163,186,180,142,250,160,192,195,196, 66,180,230,187,122,113, 28, 36,
- 26,136,199, 63,151,113,204,236, 31, 61,162,106, 37,133,245, 17, 73, 34, 82, 50,101, 40, 86, 37,165, 96,254,237,104, 4, 31,138,
-120, 60,106, 68, 37, 34, 82, 92,153,222,217, 94,203, 69, 64, 97,162,192, 57,213, 73,109,247, 93, 5,118, 85, 8, 42,244,209, 76,
- 28, 34,145,168,193, 4, 2,190,139, 41,193, 71,253, 50,239,154,236, 12,143, 19,127, 94, 91, 23,189,192, 57,106,219,211,212,130,
-146,209, 97,131, 12, 71,196,245,154,186,223, 88,112, 72,187,216,171, 17,228,168,205, 63, 25, 27, 56,221,110, 28,174, 19, 8, 14,
-147,146,166,156, 12, 2, 53, 17, 53, 19,220,151, 27,131,117,233, 19, 39,190,141,140, 4,106,118,191,161,231,212,139,131,119, 44,
- 30, 15, 24, 10,186,115, 11,156, 67,189,216,153,168, 79,131,143, 97,223, 82,244,199,222, 71,190,247, 28, 62,180,182,223,179, 62,
- 37,156,119,200,121, 71,120,167, 35,222,221,177,186,187,101,253,190,169,100,183, 29,228, 44,148,193,178,175,207,179, 18,146,193,
- 31,180,250,234, 98, 13,108,148, 77,134,161,135,117,174,156,189,177,183,130,225,134, 34,231,106,153,231,177, 67, 62,245, 52,116,
-145,252,191,221, 71, 63, 55, 32, 47, 20,248,214, 53, 60,219, 35,143, 20,121, 92, 8,223,220,115,246,238,142,205,219,202, 24,141,
- 91, 0,214, 8,174,223, 43,196, 95,218,192, 55,120,138,155,122,235,219,251,183,248,235,247,225,165, 45,220,124,121,113,160,183,
-255,189, 11,143,126, 47,250,107,175,195,163, 59,104,238,225,217,130,252,174, 53, 60, 2,189, 28,225, 45,247,125,127,247, 49,218,
- 43,245,253, 45,124,246,146,250, 75, 87,212,207, 95, 81,114, 65,215,166,252,223, 63, 5, 67,177,195,188, 22, 79, 5,140,246,249,
- 44,181,220,173, 99, 10,206, 16,138,101,246,212, 78,117,165,216,181, 30,220,130,213,156, 78, 97,177, 71,159,226, 62,197,214,212,
-161, 11,200, 73, 64, 86,173,184, 83,202,206, 15,160,233, 64,159,184,200,118,129, 37,207,183, 79,214,221,131, 32,235,232,225, 8,
- 1,142,146, 77,125, 78, 35, 28, 3, 55, 4, 57, 83, 56, 21, 88, 29,217, 11, 79,183,236,195,232,111,154,205,173,255,152,113,218,
- 57,245, 7,219, 45,138,168,106,214,192,248,145,197,171,233, 64,239,195,240, 87,224,241,223,129, 71, 61,124,246, 57,248,177,251,
-148,225,130,139, 50,146, 83,165, 11,194, 85,181, 55,232,200,183, 79,251,114, 56, 60, 96,138, 71,101,130,184,168, 23,230,178, 56,
- 56,166,184, 73, 13,196, 24, 45,118,213, 3, 84,130, 31,246, 34,129, 46, 68,136,137,189,239, 50,181,206, 4, 58,123, 45,205,141,
- 34,148, 97,100, 19,224,184, 15,172,251,142, 34,133,172,133,149, 42,125,234,216,102, 83,194,219, 87,221,233,147,174,249,105, 54,
-174, 66, 99,168,227,205, 4, 51,231,162,221,228, 61,134, 90,117, 30, 5,215, 41, 52,196, 44,104, 85,213, 59, 67, 31, 84, 47, 98,
- 83,179,119,167,145,246, 62, 68,178, 39, 97,118, 46, 18, 30,171, 34,165,208,123,183, 57,122,217,179,220,173, 87, 14, 19,185,194,
-193,129,207, 4,227, 82, 14, 61,218,226,186, 77,117, 59,224,148,131,206,161,248, 76, 88,118,146,203,213,138, 29,215,185, 90,166,
- 69, 84, 87,170, 95,147, 23,182,169,193,116,152, 45, 60,255, 45,144, 85,150,113,109,141,132,215, 20,234, 11, 1, 31, 83, 97, 40,
-147,198,225,218,208,108,154,194, 46, 48,250, 11,144,216, 34,179, 67, 23,133,166, 78,193,163,243,195,180,157,182,200,140, 43,111,
-239,163,235, 27,198, 90, 25,114, 70,179,175, 49, 66, 56, 76,152,243,224, 32, 98, 68,115, 49,161,234,193,194, 64,124, 13,189,120,
-237,237,222, 83,235, 36,142,211,206,184, 22,101,204, 30, 61,174,164,213,241, 9,186,189, 66,179, 7, 10, 6,191,168,170,219, 78,
-166, 91,147,221,217, 74,173,232, 88, 38,104, 12, 33, 32,181, 26,115, 69,131,193, 94,124, 76,144,164, 41, 59,133, 93, 49, 59,217,
-105, 80, 86,238,225, 84,196,246, 15, 98, 34,138,152,140, 24,167, 11,196,160, 86,183, 72,136, 39,224, 76, 41,102,117, 38, 55,233,
-194,154, 80,179, 65,102, 54, 87,132,227, 99,143, 83,181, 74,168, 22,179, 60,164,201, 59, 99,193, 6, 85,198,137,241,107,182, 59,
-199,220, 98, 17,136, 97,204, 62, 94, 51,156,100, 40, 77,188, 3, 71, 94,117, 71,247,139, 51,248, 23,187,200,196,218, 22, 92, 97,
- 37, 9, 57, 78,230, 55,219,169,101,176, 55, 37,180, 10,172, 34,122,229,169, 88,158,217,203,152,209, 31,122, 96, 35,229, 79, 30,
- 91,152, 74,232,224,230, 41,225, 78,143,124,245, 10,237, 18,221,217,192,201,253,145,171,135, 35,195, 94, 73, 43,161,127,161, 35,
- 92, 65, 60,239, 77,160,246,110,153,124, 67,233,169,192,106, 95,216, 1, 67,103,112,139,248,245, 61, 50,122, 91,121,222, 89, 2,
-218, 94,224, 83,183, 9,111, 12,232, 63,124,136, 94,140,212, 55, 6,194, 55,245,240,114, 7, 87, 2,151,145,213, 11, 9,121,144,
- 25, 70,216,111,236, 61,232,147,216,254,114,155, 33, 20,180, 75,150,226,117,100,221,147,254,210,125,228,119,141,112,231, 71, 64,
- 62,230, 95,231, 2, 92, 65,253, 73,120,244,159, 81,255,222, 61,244, 87,206,224,163, 32, 71, 14,188, 81,191,229, 5,177,160,132,
-168,232,151,175,208,127,190, 67, 63,125, 69,253,250,158,172,149,253, 49,228, 83,161,246,126, 30,148, 25, 96, 17,188,190,136, 1,
-186, 84,173, 35, 84,123,235,139,206,169,171,147,216,181, 66, 8, 11,210,161,219, 7,251,100,162, 80,170,219,214,220,131, 27,162,
-185, 52,162,143,140,195, 81, 64,250, 72, 88,205,211, 44, 13, 62,150,109,126, 46, 89, 94,151,157,237,221, 99, 64, 66,180,239, 97,
-114,241,215, 73,103,234,247,211, 8,103,201,186,242, 27,138,156, 0,235, 35, 72,103,166, 77,144, 51,243,153,167, 59,144,158,131,
-245,135, 76, 5, 79, 0,125,108,246, 54, 81, 59,248, 57, 95, 20, 83, 14,162,105, 98,184,225,215, 96,243,231,224,237, 47,192,120,
- 11, 62,249, 73,120,248, 14,250, 63,189,205,101, 44,188,151, 44,161,172, 43,202,174,161,226,125,147,144, 69,200, 69, 15,184, 55,
-115, 7,211, 50, 31,116,194,216,212, 41, 0, 67,124, 59, 14, 65,170, 89,191, 8,196,100, 83,195,210,226,152,221,121,209, 2, 87,
-138,183, 87,181,180, 67, 66,167, 81,116,136,145, 81,148, 44,182,211,237, 98,162,184, 37, 53,185, 79, 61, 54,215, 2, 66,141,201,
- 83,207,124, 52, 91,171,169,224,253,167,230,101, 60,137, 28,118,235, 65,130,143,185,231, 40,147, 38, 62,171,126, 48,239,171,122,
- 6,187,122, 34,152, 28,168,218,167,219,131,107,101,178, 90,119,110, 93, 95,157,126, 22, 46, 98,230,218, 39,200, 98,245,211,108,
-175,109, 47,222, 92, 7, 34, 76, 74,247, 54, 54,168, 54, 82, 93,104,159,154,208, 78,184,182,158,158, 15,201,133,146,159,105, 74,
-128, 35,198, 93,189,238,135,110, 8,243, 61, 92, 39,106,155,167,116,186,247,218,104,110,243,251, 49, 5,186,136,240, 27,129,103,
-101,202, 65,208, 3,235,153,180,201,192,162,112,106,235, 52,245, 85, 7, 77, 27,225,110,149,133,202,117, 46,104,244, 80, 92,215,
-188,255, 33, 70, 27,187,187,123,160,164, 72, 25, 51,227, 56, 82,115,182,255, 86, 50, 99,206,118,128, 79, 79,172,165,144,150,249,
-249, 74,120, 34,158,182, 58, 69, 44,196,100, 76, 17,181,213,120,208,138, 44,180, 0, 37,103,219,169,215, 16, 32,143, 84, 7,181,
-104, 72,211,158,202,200, 69, 62,250, 86,235, 94,165, 24, 11, 87, 9, 14,173,113,177,128,122,118,172,218,191,139, 2,201,131, 5,
-134, 10,151,106, 30,203, 49, 11,103,181,114,220, 85, 58, 23,178,168, 86, 98, 52,251, 66,116,158,123, 45,150,201,158, 21, 36,216,
- 7, 92,171,179,158,235, 60,158, 16,175,226,202, 34,115, 92, 90, 84,217,110,103,245,158, 68, 6,132, 84, 44,220, 64,156,158, 38,
- 30,213, 18,180,237,173,156,192, 68, 0, 49,117,126,168,115,110,124,213, 66,209, 98,227,247,160,116, 10,171,160,164,150,149, 92,
- 43,177,120,142,118,182,238, 42,164, 0,103, 9, 89,247,200, 89, 79,184,213,219, 73,242,200, 15,216,206,191,182, 33, 66, 18,164,
-207, 86, 16, 36,133, 99,144,236,111,200, 23,247,246,154,190,249,196,232,105,157,125,192,210, 41,242,237,103,240,172, 16,254,242,
-187,156,111,182,212,111,239,144,111,137,112, 30,208,183, 33,156,247,200,211, 43, 27,251,190, 57, 34,111, 14,240,116,199,209, 83,
- 80,238,154, 85,102, 92, 65,218, 42,221,151,118,132, 43,129,103, 87, 30,107, 84,225,228,148,240, 61,167,148, 31,127,159,225, 94,
-102, 4,250,183, 6, 86,159,236,145,111, 95,193,135, 35,220, 57,162,191,165,244,247, 10, 71,239,142, 48, 40,225, 56, 33, 47,184,
- 5, 43, 86,194,169,199, 27,254,244, 30,254,233, 37,225, 63,137,200,239,249, 25,139,232,212,183,160,252,143,112,241,195,176,191,
-132, 55, 31, 81, 95, 59, 66,223,191,141,202, 0, 95,221,216,238, 57, 26, 61,150,155, 25,221, 43,250,245,130,126,102,143,190,177,
- 7, 45,232, 80, 24,110, 91,248,205, 85, 17, 6,231,166,148,169,203, 54, 81, 37,165,241,188,253, 35,192, 10,186, 58, 90, 45,213,
- 71, 87,189, 86,216, 50, 31,214, 49,120,135,239, 81,183, 93,139,237,141, 11,158, 67,243,173, 7, 63,216,215, 17, 57,142, 72, 10,
-150,111, 30,197,161, 29, 77, 5, 38, 83, 28,174, 4,239,196,171,255,254, 46,152, 83,226,168,141,215,163,225,112,111, 36, 11,230,
-185, 89,145,227,206,186,112,185,227,201,109,167, 86,248,201,202,118,231, 97,109, 95,152,253,219,144,191,104,246,191,238,196,120,
-239,241,195, 24,132, 64,175,233, 1,142,237, 34,222,254, 67,184,252,139,112,247, 61,248,251,103,240,106,129,151,127, 21,126,242,
- 33,251,163,145,141, 10,161,216,186,103,159, 29, 81,188,192,133, 73,157, 53, 64,149, 3,151, 25,193, 15,152, 16, 26, 81,140,105,
-181,213, 66,149,113, 59,109,139, 16,213, 24,168, 14,165,114,123,243,116,191,202, 42,140,213,116, 52,105, 33,178,147, 48,231,190,
-103,132, 1,101,237,196,185,145, 96,156, 1,129,148, 28, 93, 45, 70,147,179, 78, 35,206,168,212,169,251,151,233,218, 97, 81,140,
-232,162,167, 93, 56,162,167,169, 99, 11,129,106, 74,119, 93,140,127,171,205,250, 29, 84,237, 13, 99, 75,100, 19, 35,206, 53, 38,
-134, 53, 40,149,229, 64, 90,150,121, 26, 11,205, 66, 83,113,215,101, 51,218, 16,178,110, 49,107,216, 85,213, 37, 36,102,142, 85,
- 21,117,209,180,204, 14,165, 89,229,160,211, 6,246, 58,102,118, 58, 99,219,136, 58,196, 41, 30,183,141,155,117, 10,192,209, 73,
-151, 34,110, 13,107,153,241,217,223, 12,113,168,153,203, 0,103, 24, 16, 51,235,126,122,253,122,189,250,144, 39,116, 27,211,140,
-125,249,201,181,169,192,245,156,214,169,188, 10,215, 52, 4, 78,114, 11,134, 33,111,159, 75, 46,133, 60,142,144, 51, 37, 6,242,
- 80,125,170, 45,211, 25, 37, 49,249,103,173, 31,152,204,176, 84,232,171,182, 41,114,227,196, 87,234,110,231,127,222,194,102,106,
-206,214, 96,151,171, 43, 34, 80,134,189, 85,167,109, 23, 24, 45,103,120,168,130, 72, 66,130, 82, 69,209,209,222,224, 16,150, 11,
-177, 64,168, 38,143, 75, 33,210, 7,165,147, 74,114, 17,218, 14, 97, 32, 80, 37,240,184,140,140,217,110,106,103,189,154,162, 47,
- 87,131, 86, 77,193, 8,139, 16,248, 86, 14, 21,157, 2, 21,108,121,163,147, 14,198,200, 64, 50,121, 12,147,102,235,216, 71, 69,
- 71, 47, 86,154,154,180,120,209,182,234, 8, 65, 72, 37,179,119, 37, 97,237, 92, 27,226, 31,125,169,133, 36, 74, 23,231,125, 79,
- 42,150, 96,154, 4, 86,162, 28, 85,123,157, 93, 7,233,104,109,157,184, 84, 24,253,210,139, 17,233, 59,194,113,135,220, 94,193,
-211, 61,220,116, 96,198, 17,112,190,114, 82,140,211, 74,210, 76,194,146,222,239,130, 21, 83, 39,143,126,154,172, 86,112,162,112,
- 30,108, 79,159, 43,124,105, 15,223,120, 78,248,195,183, 8, 73,169,191,112, 65,249,185, 29,114, 59, 33,191,169,135, 59, 61,236,
- 32,172,123,232, 71,116, 45,196, 79, 68,206,227, 72,125, 63, 83, 51,232,168,112,165,132,103, 10, 60,151,204,219, 93, 48,218, 92,
- 16,234,174, 50,174, 97, 60,134,237, 80,233,126,105,207,234, 11, 35,171, 23, 35,225,153, 72, 40, 86, 69,134,103, 18,108, 10,114,
- 81,208, 87, 43,250,213, 10,239, 85,194, 43, 91,120,170,135, 31,187, 36,252, 91, 71,200, 31,251, 69, 8, 47, 3,159,135,171, 63,
- 3,175,125, 22,174,214,112,117,130,126,253,182, 17,212, 62, 86,224,215,246,102,200, 47,198,170,215, 17,244,211, 25,125, 59, 79,
- 86, 16,206, 93,224, 56, 42, 57, 43, 67,129,161, 10,251,106, 10,246,216,108,103,136,173,161,219,247,182, 65, 95, 80,198, 97,206,
-166,206,121, 70, 34,247,190,102,235,130,155, 59,163, 76,171,236,118,208, 55, 2, 99,240,206, 60, 85,136, 71,226,233,120,177, 45,
-235,231, 4,176,150, 12,213,130, 45,130,229,204,227, 35,122,186, 56, 31,230,199,190, 39, 63,241,148,189,227, 0,103, 1, 57, 77,
- 54, 90, 15, 47, 66,184,227, 29,119, 48,235,153, 14,160, 15, 77, 20,167, 91,211, 38,232, 8,113,231,123,248,223, 6,225,121,195,
-234, 82,175, 29,232,103, 70,151,219,252, 8, 92,254, 85,120,253, 33,252,196, 26,253,149, 29,188,183,163,252,220, 72, 62, 42,108,
-162, 82,139, 77, 48,182,197, 14,244,206,117, 90,131,241,115, 60, 35,188,137,102, 27, 22,148, 73,196, 5,134,156, 22,119, 17,132,
- 96,123,100,170,131,155,238,211,161, 0, 0, 32, 0, 73, 68, 65, 84, 64,162,141, 83, 99, 20, 74, 13,211, 1, 32,110,239, 82, 31,
- 25,183, 3, 52,250, 77, 62,133,214, 65, 51,219,145,252, 16, 41, 85, 61,167, 69,201,181, 48,168,208, 5, 33,117, 29,195, 62,219,
-222, 59,248,190,179,206, 24,214,134,146, 86,149,169,145, 99,146,191,233, 34,203,125,217,214,233,148, 92, 86, 23, 89,218, 58, 69,
-212,203, 19, 19,226,218,124,251,202,193,161,215,242,219,155,128,108, 57, 25, 72,162,140, 42, 19,244,165, 49,224,218,204,165, 89,
-196,240,206,183,137,249,106,117, 13,194,188, 61,246,131, 59, 76, 66,191,233, 39, 42,215,152,103, 76,107,137,235,147,238,230, 4,
-104,192,176,105,182,208,136,156,122,216,250,198,107,195,231, 40, 1,124, 29, 43, 83,244,173, 16,157, 35,175,147,150, 74, 38,106,
- 30,215,222,247, 67,233,187, 30, 88,197,130, 44,156, 17,238, 94,208, 3,164,203, 82,137, 62,199,243,204,187,125, 47,112, 66, 32,
-197, 8, 41,146,139,149,162, 20, 15,134,114, 7, 65, 85,165, 14,123, 7, 75, 89, 19, 27, 16, 72,105, 70,251,202,147,150,185, 58,
-137,242,100,222,253, 23, 75, 20,109,137,164, 90,236,139,214,108,115,150,149, 48,108, 8, 88, 43,175, 97, 49,191,143,193,176,162,
- 68,232, 19,253, 88, 24,181, 46,170, 47,231, 39, 43, 22,192, 42,133, 24,132, 30,101,133,135, 37, 68,171, 94, 70, 21,207, 50,182,
- 96,149, 29,133, 71, 85,144, 26, 56,150, 66,172,206,203,245,177,199, 18,141, 23,189, 34,158,173,158,179, 88, 78,252,102, 91,180,
-117, 0, 58, 5,179,212,113, 68, 58, 87,212,215, 98, 69,135,180,189,164, 95,196,238,151,213,226,226,151,209,146,233,218, 27, 29,
-155,213,164, 42, 41, 84,122, 79,216, 89,229,194,170, 22,142,214,145,208,175,144, 62, 34, 39,157, 47, 18,131,135,198, 8,114, 35,
- 34, 31,238,145,143,218, 14,154,147, 14, 57,238, 97, 45, 77,160,234,207, 35, 88,132,101,219, 1, 54, 16, 72, 12,254,247,213,246,
-154,102,206,132,205,222,198,175,201,199,252,247, 7,120, 54,193,119, 61, 11, 99,134, 47,220, 71, 63,159, 77,124,119,183,160,191,
-186, 71,190,123,109, 29,224, 71,143,136,157, 93, 12,102, 87,235,136, 31,170,200,251, 25,222,203,132,167, 35,242, 45,107,116, 23,
-224, 67,182, 38,208, 55, 46,237,231, 70,227, 55, 23, 49,152,199,246,168, 18,179, 34, 95,206,244, 95,177,241,115,106, 14, 89,129,
- 85,179,125,136,216, 77,246, 11, 35,250,222, 64,248,115, 79, 33,127,252,103,129,167,129, 31,128, 87,255, 43,248,220, 37,244, 47,
- 66,159, 44,251,124,191, 71,190,190, 71,191,184,135,127,190, 67,206, 61,254,187,171,232,215,246,148, 77, 38,244, 98,182,185,211,
- 96,231,216,227, 98,167,117,117,173,217,168,236,139,117,116, 37,205,234,172,208, 34, 2,188, 30, 24,124,250,211,196,114, 45, 94,
-184,237,197, 59,177,115, 80,130,144,130,176,118,125, 90,195, 93, 6,207,155, 9,170,196,206, 22, 86,210, 7,130,195,133, 32,248,
- 90, 71, 17, 49,163,123, 8, 29,114,228,122,149,147,104,127,127, 28,237, 16, 95,118,230,235,100,191,246,254, 36, 82,132, 35,207,
-109,145,115,144,167, 45, 43,157, 0,122,215, 44,104,229, 93, 35,236,141,123,179,158, 9, 70, 29,234,206, 29, 88,243, 10,116,159,
-130,240,177,165,100,205,111, 92, 39,230,131,188,252,126,184,250,187,232,219, 27,248,241, 21,245, 51,151,212,171, 29,101, 28, 25,
-206, 96, 95,117,234,204, 7,204,194,154,125,234,209,182,180, 3,230,187,214,121, 51, 63,127,125,151, 93, 73, 85, 71,116, 54,157,
-210,116,131,177, 34, 92, 22,126,104,177, 79,133,224, 98, 50, 79,121,100, 49, 30,174, 46, 20,109,123,226,168,129, 18,116,138, 11,
-221,187,106,189, 96,130,224, 65,173,169, 72, 65,144,148,108, 69, 71,240,192, 24,235,142,100, 33,222, 42, 7,254,109,249, 13,204,
-207,135, 29,151, 52,250, 91, 59,168,219,222,240, 3,216,233, 19,203,125,250,213, 10,145,166, 4, 87, 79,245,106,247, 67, 93,184,
-113,116,214,185, 79, 63,190,177, 63,196,225, 44,142,120,153, 49,165, 28,250,184,229,122,152, 75, 19,184, 29, 72,238,158, 92, 87,
-135,246,126,136,175,168,130,184,206,170,229,189,215,137,229,160, 7, 73,237,135, 23, 68, 59,135,163, 55,117, 65,227, 68, 26,204,
- 45, 65,109, 49,234,111, 34, 23, 93, 76, 10,130, 3, 44, 89, 20, 36, 83, 16, 77, 43, 54,124, 69, 98,133,210,252,103,117, 17, 46,
-131, 28, 34,129,151,239, 82, 16,211, 10,196,190,183,207, 40, 23,186, 46, 77,175,173,113,254,107,201, 76, 80, 22, 92,135,147,108,
-106, 81,115, 93, 88,216,150, 27,141,230,168,104,246, 88,243,168, 87, 85,231, 51,148,195, 93,192,226,127,169,147, 64,221,109, 64,
-173, 43, 13, 25, 74,159,108, 20, 93, 70,250,213, 26, 77, 9,169,153, 16,162,209,217, 16,247,202,154,242,155,104, 57,234, 17,179,
-137,105,157, 43,194,170,129, 82,125,119, 62, 85,169,194, 88, 3, 23,163,237,195,142,129, 35,153, 25,241, 56, 74, 82, 83,176,189,
-243,193, 84,199, 15, 99, 17, 23,154, 96,143, 97,206, 77,243, 62, 86, 8, 20,116, 8, 83,158,123,208,106, 86, 22, 77,118, 65,228,
-108,157,145,152,167,187,226,226, 19, 45, 19, 23, 56,106,229, 40, 20, 86, 10,235, 82, 89, 69,219,159,166, 8,225,244, 24,185,177,
-134,216, 25,187,247,118,130, 91, 43,228, 27, 18,242, 98,111,232,170,179,118,247,247, 86,193, 99, 35,101,111,109,160,142, 62,163,
- 44,121,142,241,139, 97,170,215, 37,233, 34,218, 40, 79,156, 95,146,251,145,239,123, 23,255, 77,231, 70, 21,123,123, 3,111,109,
-225,205,108,135,202, 55,174,224,202,231,199,167, 9,158, 62, 65, 62, 60,192, 93,179,152, 73, 86,244, 42, 19,200, 6,250,120,144,
-237,241, 54, 88, 90,217,203,138,110, 7,216,102,120, 46, 18,110, 37,194,189,236,196, 44, 33, 38,140,227,223,195, 46, 40, 65,133,
-152,161, 31,132, 94,160,123, 54, 18,110,122, 96,203,187,138,190, 85,144,191,252, 2,242, 7,126,220, 78,232,242,167,208,191,253,
- 15,224,255,222, 35,127,248, 25,243,233, 63, 30,224,113, 65, 94, 29, 96,159,145, 80, 96, 45,240,187,142,209,143, 71,234, 95,123,
-200,120, 53, 50,220, 48, 50,213,209,101, 33,186, 60, 93,179, 82,163,227,234,221,250, 63,125, 41, 42,132,100,116,178,236,133, 99,
-241,183,122,159,231, 47,241,164,187,137,134,120, 21,119, 32, 70, 21,250, 40, 28,175,236,233,180, 80,165,246,179, 37, 6,130, 31,
-188, 33, 69, 36,137,117,219, 94,156,137,128, 28, 91, 55, 46, 55,146, 21,151,167, 6, 23, 98, 21,225,212, 59,240,174,253, 21,109,
-197,210,166, 55,147, 95,205,219,207,173, 64,122, 12,241,210, 57,237, 21,202, 6,198, 1, 46, 10,186, 43, 48,216, 40, 65,206,139,
-105,226, 66,129,227,151,224,228,143, 64,252,168,247,112,121,113, 99, 56, 50, 46,252,229,247,195,197, 15,160, 95,223,195, 47,246,
-232,215, 55,148,205,150,188, 29,216,139,133,177,236,178,125,246, 89,241,112, 33, 59, 72,246, 62,161,204, 24,191,161,168,255, 55,
-209, 39, 18,185,166,219,165, 26,164, 35, 53,160,138, 50,167,162,249,216,181, 28,160, 85,156,161, 63,221,106,101, 78,134,244,174,
- 94,170, 78,129, 32, 18, 70, 68, 83, 91,128, 50, 38,181,131, 34,152,226,187, 58,164,101,138, 34, 85,223,161, 59, 66,118,138, 95,
-246,155,108,156,116,219, 50,251,167,221,115,190, 28,115,139, 28, 18,161,102,240,204,108, 93,178,135, 91,236,170, 23, 10,242,210,
-188,205,181, 58, 55, 67,158,136, 56,106,244, 66,157,212,232, 44, 14, 54,239,240, 68,166,209,122,235,206,181,221,111,166,177,183,
- 28,216,191,116,138,138, 17, 22,121,130,139,254,188, 77,170,101, 33, 5,145, 73, 48, 58,133,221, 72,176,176,156,101, 62, 56,122,
-173, 45, 93,140,205, 49,113,157,106, 91,193,120,129,224, 13,133, 77,108,245,144,238,230,159,203,162,138, 57, 40, 20,230,195, 92,
- 28, 85,235,100, 59, 42, 37,143,211, 7,166, 7, 66,192,112,232,115,215,229, 13,194, 95,103, 8,164,174, 7,223,161, 7, 47,168,
- 74,173,148,113,116,189,128, 80,243, 56, 75,241, 91,113,209,220, 99, 13, 25,187,136,232, 93, 86, 19,203,231,222, 86, 41,234,186,
-138, 22, 44, 52, 27, 24,212, 53,215,170,212,253, 30,138,146, 66, 64, 83, 48, 14,139, 42,132, 72, 8, 43, 56,185, 67,208,187,148,
- 97, 55, 17,126,218,147,193,169,111, 33,136, 21, 5,142,127,173, 46,182,219, 18,201,152,133, 77, 69,193, 51, 96,107, 8, 12, 88,
- 20, 98, 27,254,172,181,177,151,153, 42,203,118,187, 13,139,100, 28,255, 4, 91,160,141, 61,213,106,119,226,226,234,210,128, 16,
-194, 72, 80, 3,200,180,162, 67, 74, 38,104,165, 75,133,168,149,160,149, 30,165,196,202,152,149,162,129,132,178, 14,149,163, 92,
-184, 81, 43,171,163, 72, 56, 90, 33,171,222,158, 93,151,144,167, 79,145,231, 86,240,145,136, 60,223,153,159,252, 52,218, 77,184,
- 6, 59, 41, 46, 10, 20,219, 47, 51,142,222,145, 59,250,176,168,117,151,142, 18,108, 74, 33,233,252, 74,236, 20,237,189, 67,139,
- 98, 45,144, 20, 7,214,248, 88,190, 84,228,169,149,253,243, 59, 87,240,206,222,126,239,135, 87,182,211,127,127,128,247, 28, 9,
-250,176,194, 29, 65,110,223,132,103, 51, 60,222,193, 38, 35,123, 69,182,197,114,213, 95, 24,225,178,160, 27,144, 91,105, 98, 2,
-176,182,195, 33,124,228,152,254,245, 29,117,173, 28,221, 14,236, 71,243,193,135,106,231,146, 65, 67,149,254,165,142,240,241,206,
-146,222,110,116,240,154,194, 29, 69,254,210, 43,240, 45,255, 57,232,143,194,246,111, 80,255,252,235,232,255,181,129,111, 91, 17,
-175, 54,176,141,112,175,216, 57,115,166, 22,179,121,187,131,239,232,225,118, 15,175,218,245,151, 49,166, 79,241,208,176,147, 17,
- 75,106,219, 11,236,117,194,184, 30,119,106, 43, 81, 13,104,181, 3, 61, 70,157, 10,204,232,137,128, 34,243,232, 52, 6, 19,109,
-166, 22, 95,235,149,230,186,192,185, 40,199,119, 58,195,156, 62,214,217, 99, 29,133,176,142,200, 42, 90, 23,208,251,232,220,173,
- 86,178,142,214,177,159, 5,179,246,157, 68, 43,178,250, 8,235,222,244,104, 93,178, 41,131, 0,213,145,105,237,203, 61,248,139,
-205, 62, 77,106,157, 83,103,215, 9, 97, 99,187,250,171, 10, 15, 76,204, 46,131,133, 59,112, 11,184, 37,176, 90,195,233,199,224,
-236, 79,248, 30,125, 92, 28,232, 13,249, 90, 96,247,163,112,245, 35,232,215,118,240,211, 61,188,177,163,198, 17, 58,235,242,118,
- 98, 5, 83,187, 65, 55,193,126,112,223,145,122,209, 81, 23, 55, 74, 93, 8,182,162, 46, 51,162,231,214, 68,157,160,156, 75, 75,
-205, 50,252,175,136,154,112,183,221,216,196,108,162, 45, 61, 45, 80, 41,132,201,113, 33,109,108, 93,161,235, 44,172, 74, 67, 52,
-139,153,119,139,121,180,123, 88, 23,152, 20,214,131,206, 1,166,170, 24,178, 84,237,177,169,213,247,236, 54, 14,142,186, 84, 96,
-205, 42,106, 89,208,219,100, 1,213,154,125, 92, 58, 17,213,230,103, 59,171,210,235, 98,124,111, 41,117,117, 26, 87, 47, 69,155,
-186, 80, 67,183, 20,184,122, 45,204,101,182, 5, 55,220, 45,147,186,187,237,208, 91,228,168, 54, 36,236, 2, 12,212,120,231, 13,
- 62, 19,100,217, 88,201,148,228, 46, 44,214, 0, 45, 42,155, 5, 77, 79,196,155, 52,109,154, 96,158,192,166,201,226, 39,202,100,
-116, 59,140,133,115, 54, 65,144,249,196,174,203,179, 91,159,156, 30, 28,132, 18, 78, 5,100,157,130,116,170,187,158,224, 16,121,
-123,192,232,127, 98,172, 63,251,243, 83, 8,132,174, 51,110, 66,173,134, 38,111,171, 17,143, 90, 53,135,129, 57, 9, 38, 5,125,
- 8,166, 87, 27,243, 34, 58, 87, 63,176,235, 22, 79,113, 19,241,235,183, 44,102, 37, 97,177, 0,210,185, 34, 75,101,183, 53, 37,
- 93,176,202, 72, 17,142, 17,164, 10, 49, 38,234,249, 29, 88,223, 66, 30,223,179,145,168,195, 9,230, 74,211,252,157,161, 88,104,
- 72, 12, 66, 45,202, 88,237,195, 25, 67, 48,223,115,181,185,127,104, 87, 92, 8,212, 40,176, 11, 92,234,124,137,172,211, 92,245,
- 81,236,201, 70, 53, 76,167, 20,187, 33, 87, 22, 42,197,210,206,121,177, 17, 85, 81, 74,178,157, 81, 95, 42, 81,140,200,148, 68,
- 45,155,151,202, 42, 64,143,141,222, 67,201,160,153, 85, 54, 59,217,145, 22, 11, 84,168, 74,191, 74,132, 91, 29,114,163, 71, 82,
- 15, 39, 17,121,182, 67, 94, 57,134,151,143,204,129,181, 42, 54,219,221, 87,120,188,135,203,106, 92,245,109,129,139,108, 54,181,
-156,189, 43, 87,216, 87,116, 91,231, 32,153, 93, 99, 84,187, 2,218, 85, 88,178,138,102,119, 91,187, 80,106,237,203,221,163,100,
- 11,195,155, 9,110,119, 22,141,250,181, 43, 27,193,159, 4,184,217,193,170, 71, 86, 1,125,216,193,173,193,238,196,185,218,172,
- 52,121,238,117,178,139, 66,212,161,220, 69, 32, 71,116, 95,236,181,108,178,165,184,157,118,246,252, 70,144,223,125,131,244,197,
- 29,199,239,239,204,191,175,176,206,208,157, 11,221,179,129, 48, 6,228, 78,130,127,249,200,112,165, 95,169,240, 83, 25,126,199,
- 57,252,201,239, 50,228,104,249,235,112,239, 11,212,127,255, 77,244,215,182,240, 50, 68, 6,248,210, 6,237,162, 93,156,125, 64,
-143, 3,178, 86,244,178, 32, 95, 85, 88,101,228, 41, 69,190,169,163,191, 28,185, 26,149,156,218,238, 91,145,143,175,144,231, 43,
-241, 51, 91,130,216,217,153,196,182, 20,217, 45, 98,181,218,205, 47, 10,238, 88, 16, 63,244,103,146,161, 49, 7,230, 6,171,238,
-148,190,194,250, 36,210, 63,211, 17,158,237,168, 91, 8,217, 87, 51,209,132,109,114,154, 76, 12,231,159,149, 28,119,118,232, 30,
-123, 8,203, 81,176,131,187,247, 78,188,217,213,130,216,225, 94, 60, 82,175, 41,206, 6,181,195, 60, 55, 72,183,211,255,170,139,
- 58,214, 30,109, 53,184,152,242,145,194, 99, 95,252,223,173,246,223,110, 40,156,101, 56, 57,133,227, 79,192,249, 31,181,212, 54,
-221, 93,215, 71,219,120,126,124, 29,174,254, 95,120,255, 1,252,114, 7, 95,217, 81,134, 1, 93, 87,116, 45,112, 97, 69, 78,240,
- 46, 90,101,166,189, 37, 21,130,216,193, 63,137,249,195,242, 97,230,206,218,172,164, 11,131,182, 51,172,115,209, 9, 97,170,158,
- 15, 95,107,157,178,194, 67,240,124, 6,223, 47, 74,245,238, 85,172, 25,168,254,178, 63,242,220,138,155,159, 92,241,198,103,246,
-188,127, 81,124,124, 94, 45, 79,187, 40,187, 90,217,150,204,154,202,202,173,113, 85,210,180,188,157, 4,103,190,174,211, 18,230,
-116,178,234, 25,220,254,138,150,203, 11, 75, 74, 20, 70,173,243, 14, 30,174,165,148, 57, 37,206,111,238, 85,231, 48, 16,220,206,
- 86, 23,157,189,253,252, 25, 56,210,196, 98,211,143, 13,139,181,228,181, 49,246,172, 70,247,240, 22, 85,191,127, 51, 1,190, 84,
-100, 10, 25, 65,231,144,154, 73,211,196,161,157,140, 15, 96, 32, 5, 93, 28,172,142, 5,151,224, 42,246,197,107,251,128, 13,197,
-204,117,208,182,226, 14,211,163,197,246,222, 46, 55, 28, 65, 8,213,223,121,109, 2,105,157,131,104,132, 5,253, 78, 38,139,234,
-245,157,143,106,153,247,208,215,153, 81,139, 85, 67,235,138,175, 63,251,136, 16, 83,111,231, 88,206,166,217,137,174,218, 47,254,
-179,131, 57,169, 90,246,188,101,164, 87, 23, 11, 54,204,235,172, 73, 16, 62,112,181,110,254,248,166,220,215,107, 80,170,195,122,
- 6, 69, 73,101,220, 59, 30, 85, 38,123,129,136,197,126,118, 93, 79, 89,157, 0, 3, 50, 92, 17,114,153,222,184,192,124, 17, 88,
- 32,130,195, 26, 84, 60,179,216, 20,242, 69,172, 51,149, 24,145,148,208,253,206,170,174, 90, 93,228, 96, 4,151,189,127,217, 85,
-108, 20, 31,124, 44,215,234,152,160,173,153, 85, 31, 66,250, 56,175, 6, 68, 44,114,177,182, 84, 31,111, 78, 35,133,236, 48,145,
-136, 16,170, 29,242,157, 84, 2,137,144, 51,253,104,214,141, 85,115,237,118,145,176,138, 70,111, 59, 75,240, 82,143, 60,219,219,
- 65,254, 97,239,176,130,139,211,246, 5, 30, 20,184,220, 91, 39,124,127, 64, 31,143,240, 40,163,155,193, 14,111,247, 71,105,167,
- 70,225,219,120,183,229,162, 29,180,162, 67, 70, 51, 19,164, 67,146,141, 9, 37,185,128,185,239,144, 51, 59, 4, 36, 5,228,212,
-199,253,247,147,253,172,205, 8,131, 88,112,204,152, 77,140,118,106,138,107,238,172,236,141, 73,192,123, 25, 61,222,120,124,152,
-115,199, 31, 87, 19, 63, 14, 94,132, 60,168,232, 87, 6,155,196,124, 34,195,183,158,218, 52, 64, 45,247, 35,252,233,167, 9,119,
-119,144, 11,233, 34, 35, 59,243,129, 51, 2, 23,216,110,127,155, 44, 72,229,103, 51,172, 87,240,239,124,204, 38, 14,227, 79,195,
-151,222,166,254,145,175,145, 47,183,140, 31, 9,232,169,176, 74, 74,247,246, 30,142, 34, 37, 6,203,108,223,248,205,110, 47,200,
-168,132,167, 34,218, 7,116, 29, 73,207, 70,214,111,101,198, 98, 89, 39,245, 82,137,239, 90,148,107,240, 14,156,208,232, 85, 83,
-138,131,237,205,247, 54,110,236,188, 99, 8,213,173,152,174,242,149, 98,213,112, 21,144,226,129, 9, 79,247,132,143,174, 9,119,
- 86, 48,184, 32,250,134, 21, 31,156, 70,228, 36,218,161,125,106,212, 61,214,193, 42,220,206,219, 65,137, 11,127,204,194, 0, 91,
- 21,246, 2,143, 71,247, 45,101,251,231,173,211,104,246, 83,204,148,147,113, 34,122, 22,108,218,190,242,169,208,101,133,187,217,
- 96, 70,191,239,150,237,226,127,240,158,221,237,142, 11,114,187,194,241,211,112,246,125,144, 62,234,168,216,114,237,174,177,182,
-117,200,246, 39, 96,243, 58,250,149, 14,190, 92,168,251,129,186,217,163,151,197, 44, 53,189, 16,139,103,160, 79, 70,173, 69, 42,
-152,207, 97, 61,120,109,178,159, 54, 66,156,223,211,236,209,235, 44, 52, 86,171,212, 61, 60,201,186,154, 32,209, 59, 42,166,177,
-178,137,113,173,101, 44,141,196,166, 50,229, 81,139,194,153, 4, 94,248,109, 43,226, 55,119,232, 47,108,169, 46, 86,106,229, 68,
-187,125,238,213, 92, 46,189,219, 19,107, 40, 38,236,155,218,225,105, 14,237, 29,126, 59,216,235, 2, 58,194,129, 72,172,163,237,
-234,231, 68,180, 57,192,211,254, 62,105,153,192,176, 7,242, 46,209,153,142,183,232,136,131,101,172, 30,218,168,218,125,238,186,
-183, 95, 15,201,124,237, 94, 89,166,108,113,157,189,206,174, 69,170, 75,222,122,235,254,245, 73, 96,203, 12, 99,145,107,112,242,
-107,105,103,115, 30,209,244,249, 76, 96, 63,230, 64,149,214,113, 87,153, 1, 54,210, 68, 84,117, 97, 61, 91, 38,238,137, 89,161,
-171, 51,152, 13,161, 59,139,196,102, 8,217, 60, 46,175, 11, 7,128,180, 66,209,181, 4,242,100,190,206, 44, 76,107, 54, 73,105,
-161, 57,126, 22,121,210, 92, 76, 29,161, 75, 94, 12, 85, 66,234, 38, 91, 95,235,210, 45,140,102,142,169,211,170, 72,169,208,165,
- 73,201,190,124,252, 15, 68,203, 79,168, 99,215,140,232,194, 74, 34, 79,212,140,150, 49, 79,169,179,136,204,195, 15,146, 8,146,
- 51,244,107, 98,201,144,214, 54, 50,240, 10,211,198,200,214,117, 55,178,154,165,176,153, 63,189,168,101,215,142, 84, 74, 53, 22,
- 58, 37, 32,235, 21, 49,196,105, 52, 31, 22,251,188,172,129,193, 22, 41, 20, 81,207,107,159, 63,160, 56,141,232,132,218, 62,244,
- 92,168,152, 53, 76, 39,133,169,221,148,109, 66,109, 55,207,147,104,142,177,158, 74, 71, 97, 85, 42,235,146,233, 99, 34,158,175,
-144, 35, 11,253,178,120, 98,223,195, 63,171,200,119,174,225,195, 39,200,173, 35, 59,112,107,133,109,133,171, 61, 60, 84,120,111,
-128, 7, 3,250,238,136,222,219,163,155,209, 14,243,161, 88,190,115,219, 93,165,134,215, 86,234, 88, 93,128,232, 23,187, 24,164,
- 97,142,185,117,251, 20, 3, 49, 57, 77,168, 31, 8, 15, 77,124, 37,235, 64,216, 36,194,174,131, 55, 92, 46,140,237, 79,229, 44,
- 34,251, 8,143, 21,185, 25,204,107,126,171,179,195,231, 81,134, 55,119,112,158,224, 70, 68, 78,131,117,225, 87, 25,222,202,112,
- 97,156,113,233, 42,242,162,160, 23,138,222, 43,200, 91, 35,220, 62,130, 27, 29,242,160,162,253, 10,158,143,208, 41,242,104,132,
- 7,131,141,250, 69,145, 91,197,172, 86, 23,192,223,218,194,247,158,194,127,249,113, 56,238, 97,115, 23,254,201,219,212,255,248,
- 53,134, 52,178,125, 37, 48, 6,161,238, 97,119,161, 60, 69,241,179, 79,169, 95,119,245,218,157,136,222,138,132,211,128,174,133,
-186, 41,232, 69, 57,232, 38,170,147, 5,211,253,138,110,108,215,223,149,198,233, 23, 66,178,200, 96,201,134, 61,175, 98,201,119,
- 33,137,229,198, 71,103, 49, 4, 69,114, 32,156,118,200,211,137,250,110, 65, 99, 48,161,227, 75,107,228,233,206, 30,244,210,119,
-220, 61,232,177,143, 3,130, 75,224,167,229, 98,103,191, 14, 98, 73,104,185,204,244,149,236,183,153,226,135,198,142,217,144,156,
- 77,241,169, 69,172, 83,223, 57,223, 64, 43,114,218, 27,163,224, 76,140,236,151, 58,120,184,133,175,239,109,101,209, 9,188,185,
-135,247,178, 5, 2,220, 8,246,121,156, 29,193,241,119,194,234,183,248,215,126,184,118,219, 88, 89,209,177,255, 60,236,126, 24,
-189,183,135, 47,247,232,227, 29,249,222,150,178, 25, 28,126, 99, 45, 89,170, 48,202,194,251,221, 82, 11, 91,184,201, 2,202,165,
- 11,130,220,146,197,221,178,210, 61,203,102, 49,142,158,168, 62, 62, 22,159,187,219,232,247, 26, 79, 8, 37,121,234, 99,113, 84,
-165,136,109, 45, 54, 65,249,220,143, 95,176,251, 97,101, 47,141,141,109,227,236,136, 80,156, 64,215, 55,221,105, 16,142,164,161,
- 67, 27,169,114,150,172,181,196,177, 6,108,105,217,202,193, 59,223, 50,185,188,197, 34,158,157, 35,149,181,129, 58,101, 49,250,
- 85,146, 67, 69, 6,223, 11,183,177,118,110,141,138,204, 80,155,165, 27,235,176, 27, 91,132,253, 77, 52,186,121,188, 20, 16,167,
-109, 46,138,132,198,253,152,148,224,117, 10,194, 20, 39,149, 29,100,177, 47,133,126,186, 32,104,126, 0,146, 85, 69,174, 53,239,
-166,149,146,197,206,160, 97,113,163,139,218,170,151, 1, 9,139,145,150,134, 79, 43,115,241,193, 34,213,112,210,112,205,212,148,
- 39, 78,194, 57,132, 38,120, 12, 44, 79, 8,251, 84,117, 1, 10,250,141,242, 89,218, 53,117,125, 57,223, 86, 17, 66,236,187,137,
- 4, 23,155, 71, 93,157, 76,151,179,221,163, 92,143,129,204,133,141,189,223,209, 14,254,246,124, 15, 88, 57, 11,106,229,114,151,
-222,214, 84, 58,123,250,209, 15, 24,216, 7, 33,229,106,136, 81, 45, 74,215, 7, 82, 76, 4, 81, 36,117,196,184, 66,227, 26, 73,
-167,212,106, 67,176, 78, 93,109,170, 25,145,206,144,120,248,151,172, 24, 41,174,198,196,128, 65, 39, 2,197,224, 32, 68,194,144,
-160,139,118, 64, 59,109,173, 46, 88,202,170,106, 80, 53,236,198,209,252,223,193,239, 14, 73, 60,159,183, 26,174, 47, 16,209, 80,
-217,143,197, 94,100,246,225, 94, 47,136, 22,118, 57,179, 18, 56, 78,194, 73,138,172,168, 28,111, 11,125, 8,196, 27, 61,242,244,
- 9,242, 66,111, 2,226,126, 68,184,132,167,247,200, 43, 43,184,243, 50,156,220, 52, 37,240,110,111,251,241,135,213,242,192,223,
- 26,208,119,246,232,251, 25,221,236,169,155, 17,174, 70,234,174, 80,107, 33,123, 61, 95, 69,169, 81,144,193,191, 40,193,242,207,
- 75,145, 86, 23, 77,228,172,226, 49,182, 13,157,153, 4,194, 8, 49, 40,105, 83,232,163, 18,163,146, 58, 33, 62, 20, 66,181,238,
- 36, 28, 91,150,189,238,132,112, 20, 9, 47,174,144,211,106,104,185,149, 32,187, 8,131,162,143, 70,216, 23,164, 56,121,250,162,
-192, 90,209, 62,194,105, 64, 7, 65, 71,179, 44,134,181,117,152, 82,176, 63,247,222,206,166, 22,231,107,232, 7,248,106,133, 51,
-144,149,131,116,246, 3,218, 85,228,158,194, 15,111,224,215, 51,252,201,231,224,207,124,163, 93,113,239, 95,192,223,120,157,242,
- 87,223,102,123, 86,216, 61, 39,236,131, 82,243,172, 31,169, 10, 49, 87, 52,249,170,119, 91,225, 45, 11,196,209,231, 19,117,175,
-104, 22,100, 87, 25,223,203,108, 42,142, 23,182,115, 83,179, 39,149,157, 68,194, 0, 97,167, 48,186, 53,243,164, 67,142, 18, 58,
- 66,237, 5, 61,241, 74,223,149,232,146, 32,196,222,246,222, 47,246,240,220,138,240,176,192,205,104, 83,143,243,100,171,139, 77,
-134,219,106,207, 81,152, 91,129, 81,237,191,143,222, 31,141,217, 66,101,176,184, 84, 70,172, 3,223,249, 33,159,220,215,165,213,
-146,234, 66,227, 75, 87,215, 99,248,216,105,133,209,231,238,244, 6,153, 89, 97, 34,187,130, 21, 98,175, 22,227, 29, 72,129, 13,
-240,247, 30,216,168,255, 70,132,155, 5,238, 20, 88,191, 0,235,239, 54,255,250, 20,153,186, 16,198, 73,130,241, 85,184,250,239,
-209,247,222,132,207,173,168, 95,186, 34,127,233,130,113,200,140,209, 1, 49,101,182,232,118,209,110,160,163,251,169, 7,153, 91,
-211,202, 33,242,244,131,136, 40,181,109,224,220,139, 29, 43,139,108,182, 54,182,159,163, 50,147, 52,142,185,186,154,218,111,184,
-157,117,199, 77, 17, 95,220,158,245,184,100,187, 79,232, 60, 5,168, 40, 35,202,190, 40,161,113, 47, 48,186, 32, 49,248,110, 94,
-167,149,158,248,159,159, 32, 40,211,227,232,204,255,215,249,144,111, 62,237,226, 19,196,212,148,232,139,110, 81,197, 64, 44,201,
-195, 88, 28, 9, 62, 29,226, 97, 41, 34,116,229,116, 89, 88,225,174,183,117,203,230, 92,171, 78,157,112, 27,179,183, 69,177, 30,
-236,241,117,145,186,118,168,112, 23,102, 11,222, 97,116,209,172,111,138,174,164,215,133, 72,238, 48,241, 76, 14, 70,216, 19, 64,
-133, 58,101,120,180, 71,175,174,113,152, 64, 79,190, 86,109,227,109, 9,205,214, 53,139,246,170, 43,166,150,225, 46, 70,146,170,
-211,115, 84, 89, 18,224, 90,142,192,108,169, 19,253,128,116, 6,209, 67,181,192, 53, 82,157, 46, 44,110, 41,153, 56,186, 17,249,
- 66, 76,102,171, 22,168,227,136, 22,215, 65,212,178,152, 50,184,222,160,235, 92, 18, 86, 93,171,113,232,226,230,137,207,101, 46,
- 52,108,244, 94, 15,162,111, 15, 28, 11,126, 1,165, 90, 43, 59,131,252,210, 75, 79, 82,165,171, 35, 93,215, 19,211,218,190,171,
-187,135,176,223,210, 21, 83,152, 27, 39,221,198,239, 41, 26,116,165,115,161,204, 94,139,147,210, 58,243,211, 73,165,247,175,122,
-148,129,152, 86,212, 16,209, 82,166,106, 75,252,159,115,197,253,168,179, 32, 69,131,144,130,135,176,160, 88,238,201,108,107, 16,
-194,172, 84, 22,151, 79,104,177,253, 92,133, 16, 42,235, 16,184, 81, 51,235, 42,164,243, 21,242,194, 25,242,202, 41,242,225, 0,
-207,111,145, 27, 27,100,157,225,244, 14, 60,245,135, 32,126,151,205,117,203, 15,161,151, 95,133,215, 42,188,150,209,175,110,225,
-253,129,122, 49, 82,119,131,249, 17,135, 66, 29, 70,114,174,100, 17, 70, 85, 70,103, 94,215, 98, 35,223,214,200,105,181,213,233,
-232,107,244, 54, 85,240,168,102,178,152,158, 78,147,107,226, 26, 45, 84, 44,153, 53, 22,136, 89,137, 87, 74, 79,161,235,160,219,
-184,216, 37, 4,180,239,224, 1,132, 75,181,113,253,168,232,101,134,119, 70, 83,182,223, 72,118, 51,236, 93, 3,240,254, 0,167,
- 61,188,208,217,225,241, 32,160, 95, 46,232,221, 1,217,251,158,255,182,160,249,210,202,238,151, 78, 44, 87, 61, 87,203,247, 88,
- 5, 56,173,200,235, 5,126,122, 15,255,223, 22,206,122,248,177,239,129, 79, 60, 13,219,119,225,157,135,240,231, 95, 99,248,199,
-247,217, 62, 15,155, 51, 75, 64,171,213,181, 3,206, 60,144,216, 70,123,158, 80,118,132,141,148,239, 86,116,175,240,116,231,232,
-211, 66,206,238, 63,246,223, 94, 70,195,222, 18, 2,114,158,108, 20,174, 1,185, 2, 25, 20,110,246,240,145, 53,114, 18, 9, 93,
-107, 67,220, 54,214,153,151,156,211,222,185,233,213, 86, 5, 31, 63,118, 5,122,180, 67,249,129,143,173,163, 34, 67,245,192, 51,
-117,237,132,162,123,191,137, 94, 96, 69,208,191, 48, 88,164,108,135, 31,248,106, 93,254,214,171, 16,162,117,219,219,206, 84,234,
- 53, 33,197,219,139,216,153, 31,253,142,147,227,250, 96,202,189, 62, 34, 87, 5, 94, 31,225, 81,181,247,232, 65, 99,131, 87,251,
- 61,157, 88,193,245,210, 0, 55,111,194,201,239,134,254,227,126,103, 41,179,185, 76, 86,246,103,246,191, 12,155,255, 22,238,189,
- 10,191,208, 81,126,228, 49,227,155, 23,140,146, 25,250, 48,121,156,227, 33, 97,133, 62, 78, 43,195,233, 95, 47,119,232,203,236,
-107, 28,158,210,254, 23, 15, 90,205,235,120, 81,143, 92,117, 6,123, 4,122,105,192,151, 89,108, 84, 93, 96, 22,220,165, 82, 68,
-167,169, 65, 20, 83,223,151,228,221,147,119,168, 90, 33, 68, 63,132,253,126,178, 87, 8,165,176, 90,220,219, 83,180, 90,204,183,
- 97,126,168, 86,115, 50, 48,243, 14,116, 49, 73, 92,246,170, 77,168, 89,188,121, 17,213, 5,144,198, 68,127, 9,241,235, 95, 23,
- 99,105,251,190, 79,197,145,206, 86,171,249,140, 20,174,199,122, 31,168,225, 85,167, 67, 34,120, 19,164, 85, 39, 49,149, 48, 79,
- 5, 88, 4,180,132, 5, 56, 39,200,108, 15, 92, 6,185,206,217,107, 79,214, 24,237,185,196,133,214, 96,145,240,242, 1, 61,177,
-206, 37,129, 44,130, 96,154,102, 56,204,222,255, 6, 9,159, 34, 95,117, 54,238, 5,105,118,189,176, 88, 35, 60,177,246,159, 67,
-109,244,240, 61,147,131,229,129, 78,123,235,105, 2,225,142,165, 22,170,210, 73, 32,244,189, 79,134,235,148,154,214, 68,113,154,
-203, 4,138,145,133, 28, 82, 29,190, 19, 66,116, 33,168, 78, 83,168, 67, 73,158, 28,136, 13, 38,226,100,176,231,178, 32,230,114,
- 61, 13,182,189,158, 20,125,238, 63,168,144,115, 33,239,246,116,235, 68,212, 64, 24,246,112, 60, 32,247,223, 36,212,140,132, 58,
- 89,188,149, 74,162,176, 86, 33,105,153,112,138,150,164,102, 28,204, 20,196,141,241,150,126, 36, 8, 26, 19,132, 68, 13, 13,198,
- 81,208, 96, 92,120, 10, 84, 15,187, 15, 94,225,110, 75,165,171, 74,239,222, 71, 81, 27,243,131,141,241,115, 41, 86, 45, 17, 12,
-227, 89,139,165,203,185, 10,127, 45,112,179, 84,206, 82, 15,207,172,145, 79,156, 34,159,236,145,143, 14,200,237, 45,172,143, 97,
-253, 59,161,251, 30,232,127, 27,132,103,161,108, 97,248,155,232, 59,255, 16,126,174,194,167, 51,245, 98, 75,221,143, 6,179,201,
- 35,117,167,104,168,148, 82,173, 81, 11, 66,198,179,142,139,255,234,254,249, 36,190,135,108,122, 52,191,246,134, 10,181,202,228,
- 40,104,118,158, 60,216,205,101,240,155,131,136,105,167, 58,177,149,104,136,112, 20,133,149, 42, 43,133,163,160, 68, 41, 72, 53,
-197,179,158, 20,244,204, 10, 3, 94,223,161,247, 71, 99,221,223, 74,112,220, 77,221, 5, 67,133,221, 96,144,153,231, 59, 27,223,
-247, 5,238, 68,228,237, 1,189,168,112, 92,209,251, 21,253,244, 99,100,183,183,131, 47, 10,250,214,158, 48, 84, 59, 48, 69,144,
-109,132,255,232, 89,248, 15,255, 77, 88,127, 28,234,143,194,107,239,195,127,240, 37,118,239, 94,177,125, 89, 24, 79,204,113, 85,
- 23,128,138, 62, 90, 82, 46,216,181, 99, 69,142,141,159, 21,172,123,206,106,218,133,125, 37,191, 58,178, 27,205, 15,142,219,139,
-210, 70, 45,158,246,230, 10,238,244,246,235,145, 69,219,202,168,230,233,126,190,131, 91,106,246,174,228,115,227, 32, 51, 13,101,
- 53,218,254, 63, 62, 99, 97,233,187, 75,123,162, 23, 21, 94,191,178, 2,104, 83, 97,168,232,174,160,219, 98,255,156, 21,221,121,
- 39, 55, 8,220,221, 33,127,106,141,124,235,191, 11,235, 63, 52, 7,169,232, 61,224, 43, 80,190, 0,229, 61,208, 43,168, 27,243,
-147,215,141, 85, 38, 57,216, 56, 60, 90,102,171,210, 65,233,124,108,175,200,155, 91,248,213,157, 49, 15,126,247, 45,248,226, 3,
-120, 99,107,223,171, 36,246, 70,222, 22,248,196, 22, 94, 88,195,201,247,192,250,123,124,183, 52,206,135, 57, 21,202, 61,216,253,
- 24,108,255,119,244,205, 7,232,255, 35,148,127,244,128,252, 96,203,238, 8,118, 41, 48, 44, 52, 57,141, 63, 16,253, 0,232,252,
- 62, 51, 78, 22,214,153, 22,215,249,239, 25,125,239, 91, 29, 27,123,144,204, 22,150,221,251,162,111,108,128, 23,204, 46,155,130,
-229, 69,104,139,171,245,181,156,184,141, 78,131, 77,185,130, 90,132,106,243,118,143, 10,251, 50,135, 50,129,216, 58,133,176, 80,
-221,155,112, 50, 3,235, 96,163,241, 82,237, 16, 25,125,159, 27,131, 21,222,197,195, 56,100, 98,110,133, 5,252,253,154, 57,253,
- 32,215,124,145,212,230, 97, 46,237, 30,221, 47,198,200, 73, 22, 30,246,230,197,174, 58,143,215, 15,211,203, 15,142,197,101,235,
-214,186,253,220, 20,241,234,169,115, 50, 75, 21,101,241,185,134,131,194, 96,113, 8, 45,215, 37,139,193,112,253,141,230,214,204,
- 84,185, 72, 53, 76,110,235,196,157, 12,215, 44,111,185, 33,106,213,227, 94,130,120,238,185, 23, 72, 65, 38,248, 78, 27,181, 7,
- 76,196, 90,189, 18,140, 62,201,136, 11, 86,190, 4, 99,132,148,122,200,132, 87,157,139, 26,189,166,116, 95,190,155,141,250,231,
-172,226,201, 41,208, 20,232, 1, 72, 93,239,104, 86, 59,180, 99, 76,190,110, 80,202,176,119,216,197, 98,247, 68, 43,186, 23, 25,
- 32,238, 60, 88, 36,198, 60, 9,189,145, 57,215,100,161,244,152, 16,138,242, 65, 48, 4, 47,120, 82, 41,149, 40,202, 81, 17,143,
-223,195,130, 60,134,129,176,238, 96,191, 37, 94,220,155,200, 67, 73, 76, 29,220, 41, 28,147, 73, 19, 53, 74,141,241, 92,133, 81,
-161,200, 72, 12,105, 26, 11,165, 10,149,140, 14, 3, 28, 37, 59,124, 68,145,236, 59,228, 34,179, 2, 83, 32,212, 58,125, 0, 89,
- 45,215, 56,149, 58, 67, 31, 52, 19, 67,180, 70,106,172, 68,242, 84, 37, 15, 62, 79, 56, 11,240, 66, 45,156,173,123,248,232, 41,
-225,149, 53,242, 91, 64, 94,217,192,217, 57,116,255, 10,172,254, 32,164,143,248, 30, 52, 66,185, 11,251,191,134,190,254, 67,240,
- 35, 17,253, 98,166,236,246,134,209,221, 13,212,161, 76,192,155,138,218, 33, 29,230,220,237,234,135,181, 78, 98, 20,133, 69,192,
- 92,109,187,161,214,157,235,225, 40,173,197,248, 14,238,145,110, 97, 2, 69, 13,230,209,196, 16, 67,133, 85,134,163,106,137,154,
-199, 40,221,163,193, 46,220,167, 2,172, 50,245,205, 75,184,178,116,183,112, 35, 33, 47,174, 12, 45,106,112,108,123,240,187,163,
- 61,169, 23,214,112,123,109, 10,250, 59, 3,188,176, 69,182, 5,237, 11,220,219,193, 63,219, 82,127,230,190,237,128,111, 37,179,
-225, 17, 8,191,121,109,177,156,127,246, 89,248,238,223,105, 63,123,252, 65,248,217,215,225, 63,253, 42,101,183, 97,248,136,144,
-147, 50,248, 67, 5,177,142,169,247, 72,121,170,157,107, 65, 43,146,155, 13, 7,100,109,209,168,147,129,229,189,202,240,168,162,
- 29, 30, 12,100,124,241,245, 51, 29,242,145, 99,228,229, 19,228,217, 53,242,204, 10,158, 2, 78,119,230, 78,232, 5,122,133,238,
- 41, 72,207, 24,180, 69,143,156, 82, 19, 33,158, 66,119, 11,228, 55, 1, 47, 0,127, 7,134, 95,178, 9,199,167,175, 96, 63,192,
-219, 35,188, 61,152, 23,121,168,168,157, 42,104, 39, 22,165,122, 63, 34,175,109, 8,127, 54, 34,159,250, 1,224, 21, 7, 10,173,
- 32,172, 64, 62, 14,252,139,243, 11,214,193, 72,111,186,113,133,225, 99,144,199,246,247,245, 17,148, 47, 35,250,171,176, 11,232,
-189, 17,253,252, 35,228,115, 27,187, 70, 63,220,193,151, 31,193,175,236, 32, 6,244, 52,152,150,225, 86,133, 15,239,144, 91, 79,
-193,233,167,224,244,223,128,244,226,162,103, 22, 40, 15, 97,248, 89,216,253, 31,240,232,255,167,235, 93,131,109,203,174,251,174,
-223,152,115,174,181,247,121,221,103,119,223,238, 86,235,237,150,228,182,172,216,178, 99, 89,118, 98, 59,113, 98,226, 56,113, 66,
-133, 24, 19, 82, 36, 69, 2, 5, 36, 80, 20, 85, 64, 97, 10,202, 64,133, 47, 64, 65, 21, 36, 85,144,144,132, 36, 80, 9,224,138,
-147, 24,236, 56,196,137,223,145, 45, 63,164, 88, 45,181, 30, 45,169, 91,253,186,239,199, 57,103,239,189,214,156,115,240, 97,140,
-185,214,218,231,182, 63,180,125,213,125,239, 57,231,238,189,246, 28,115,140,241,255,255,254, 47,161,159,174,212,191, 93,109,220,
- 46,133,237,229,192,166, 24,151,188,137,218,162, 90,231,219,162, 80, 87,113, 46,192, 93,180,188,244, 77,245, 14,205,211, 10,117,
- 70, 60, 77,241, 28,121, 49,122, 37,136,173,223, 90,231,219,160, 1, 77, 71, 88,108,200,154,170,249,206,163, 71,144, 70,102,221,
- 97,174, 70, 81,107,157,100,205,190,247,247,201, 69,198,200,130,101, 54,151, 91,132,102, 93,236,159, 5, 6, 21,182, 62,110, 15,
-226,145,164,193, 32, 53,181,234,148, 30, 23, 69, 38,209,153,161, 87, 93,240, 37,139, 84,177,139,225,187, 50,235, 0,194, 98, 50,
- 61,179,206,231,223, 29, 91,167,190, 76, 19,107,197, 91,116,143,233, 23, 91, 21, 98, 0, 0, 32, 0, 73, 68, 65, 84,190,196,195,
-182, 60,131,122,129,136,166,203,142,118, 65,167,211, 54,106,214,165, 57,109,169,187,210, 69,239,186, 47,190,171,250,152,248,122,
-175,227,213,169, 43,222,247,232,135,197, 42,162, 57, 7,194,197,191, 79,144,125,207,252,133,184,227,226,127,151, 37,217,174,168,
- 62,230,126, 3,125, 12, 28, 35,139,164,188,139,194,184, 9, 56,113,113,234,162, 30, 76, 38,102,217,238, 83, 34,244, 43,203,134,
- 87, 37, 46,128, 48,181,100,223,165,235,212,133,207,193, 44, 76, 40,217,101,118,250,194,133,246,182, 23, 37,109, 95,195, 3, 99,
-168,245,241, 49,196, 66,111,208,236,135,137,146,233,162,129, 68, 14, 99, 79, 9,129, 97, 55, 80,210,142,116,114, 29, 57,191, 75,
- 28, 55,150, 39, 60, 20, 83,101, 75, 32,105,225,160,190, 29, 61,201,104,114,165, 84, 6,231,170,183, 14, 53,146,169, 99,128, 52,
- 66,114,239,104, 48,251, 28,238, 15,157, 2,239, 27,160,193,189,150,141, 24,215,169, 34,193,197, 2,213,148,235,113,113,112, 0,
-116,162,156, 8, 60, 83, 50, 55, 18,196, 27, 7,200,251, 58,228, 91, 10,242, 65, 96,253, 65,232,254, 37, 56,248, 78,136,151, 13,
-161, 57,126, 14,182, 63, 5,143,254, 17,250,153, 91,240, 83, 61,229,141,145, 58,238,168,187, 1,221,101,178, 26,139,190,248,144,
-161,104,139,237,243,125,184,131, 56, 20,223,247, 90,108, 51, 33, 76,205,151,233,167,176,241, 94,219, 45, 54,108,101, 45,251,118,
-200,106,182,126,107, 42,219,135,195, 79,142, 33, 67, 78,166, 91,208, 29, 12, 17, 14,138,114, 92, 6,226, 77,168,159, 24,225, 53,
-181, 92,241, 15, 28,154, 5,174, 98, 10,247, 36, 45, 81, 1,185,181, 65, 95,181,220,119,121,246,208,105,120,246,131,232,249, 0,
-255,228, 33,229,179, 91,134,123,153, 92, 13,179,123,184,141,132,143,172,209, 91,138,254,250,136,252,240, 9,188,255, 18, 60,122,
-209,252,239,127,247, 77,248, 95,111,194,149, 29,229,105, 35,124, 85,103, 60,196,101,182,177,143,222, 87, 71,129,238,122, 52,152,
- 78,176, 14,133, 65,205,210,135,160, 81,172, 48,103,241,113,172, 83,254,182,176, 74, 17,121,223, 17,242,190, 99,228,125,135,200,
-179, 7,112,253, 12, 57,201,208,191, 7,194,135, 65, 62, 12,188, 27,228,138,207,245,197,230,180,205,171, 29,139, 23,214, 10,124,
- 26,118,191, 97, 54,193, 31,127, 8, 95,222,194, 7,162, 81,236,238,143,212,228,118,152, 13,200, 70,144,115,236,226, 68, 38,252,
- 87, 87,145,223,251,163,192, 19, 80, 63, 15,245, 31,128, 60, 3,250,141, 16,158, 3,185,106, 33, 43,178, 54, 11, 25,199,246,115,
-200,214, 72,112, 13, 88, 16,111, 1, 95,129,123, 27,244,197, 17,253,212, 41,124,121,103,135,201, 73,130, 79, 84,123,208, 14, 4,
-158,234,224,201, 12,207, 13,198,247, 63,124, 15,172,191, 7, 14,190, 7,186,119,187,255, 92, 65, 31,217,238,124,247,183,224,244,
- 23,208,151, 7,248,105,161,124, 98, 36,223, 63,103, 88, 43,103, 49,176, 41, 86,228,218, 4,169,157, 53, 69,188, 59,119, 87,221,
-232,207, 98,244,206,124, 43, 76, 99,226,226,191,191,214,185, 75,106, 26,246,169,168,142, 83,182,144, 77,232, 90,240,138, 39,230,
- 5,148, 88,253,247, 47,246,173,117,218,117, 47,247,185,222,161,183, 17, 64, 16,170, 36,250,232,246,200,226,231,135, 40,181, 56,
-223,162, 61,133,238, 1,223,170, 19, 17, 3,172,170,146, 92,218,208,192, 54,161, 46,213,209,179,216, 47,180,127,225, 44,250,134,
- 47,157,124,217, 62,126, 15, 11, 62,123,245, 51, 68, 22,180, 23,161, 5, 0, 49, 9,250,130,171,189, 77, 4, 38,123, 19, 0,157,
- 66, 89, 22,197,118, 9,167,209,102,134,147,233,156,105,187,249,160,251, 72,218,134,113,189, 56, 88,175, 23,108, 86,243,152,126,
-191,207, 13, 11,200,186,250,109, 33, 92, 48, 77, 46,227,201,219,152,190,178, 39, 32,152, 11,174,200,111, 19,217, 50, 55,192,181,
- 49,225,223,142,108,215, 58,166,197, 94, 95,228,241,145,251,108, 89,147,233,245,108,118,235, 37,204, 69, 98, 48, 59,116,191,114,
-151,140,131,182,186,206,129, 67,234,176,153,165,192,110,201,149, 55, 45, 66,104, 81,169,191,221,168,131, 69,138,249,146,208,164,
- 50,185,165,116, 41,242,211,249, 66,215,114, 4,140, 77,150, 11, 42,145, 85, 8,172,164, 50,212,145, 48, 22,186,206,226, 29,227,
-253,123,132, 98, 10,238,164, 74,172,133,181, 64, 39,117, 98, 98, 91, 28, 29,148,234,177,119,181,206, 64, 24, 12,187, 90,105,182,
-128, 2,187, 45, 34, 43,247, 74,218, 7,183,214, 72,168,131,139,137,171, 79,230,189, 27, 10, 45, 34, 47, 24,170,214,199, 88, 65,
-237,103, 82, 15,189,140, 56,219,131,194,181,237,142, 75, 73,137, 79, 29, 35,239, 89,195,183,123, 16, 88,247,173, 16,127, 8, 86,
- 31, 50,145, 80,254, 28,108,255, 50,220,254, 57,244,229, 13,252, 90, 68, 95,138,148, 71, 91,106, 25,208, 49, 83,182,153, 34,134,
-188,108,190,212,218,232, 76, 52,170, 29,251,170,236,210, 62,104, 23,198, 86,109,183, 62,237, 34,237, 80, 40, 89,167,215,114,185,
-159,242,201,171, 37,149,250,175, 59,139,228,118,175,163, 11,149,212, 50, 60, 34, 74,248,242,142,113, 7,241, 84, 57,122,125, 71,
-220, 40, 74, 66,174, 41,196,100,222,189,147, 14,206, 6,120,121,139,126,173,194,173, 1,190, 97, 68,179,192, 39,207,209,223,122,
- 4,111,109, 25, 67,102,123, 41, 80,174, 26, 48, 93, 70, 69, 15,125, 31,126, 41,194, 15, 93,129, 23,142,225,214, 41,220,189, 7,
-175,141,240, 19,247,224,201,140, 30,214,153, 66,185, 80,245,234, 34, 75, 33,136,208, 63,159,144, 99,129,251, 62, 38,172, 13, 16,
-238,135,250,177,195,218, 79, 18,221, 93, 69, 94, 29,140,152,119, 57, 66, 72,200,213, 53,242,145, 19,228,106, 7, 79,222, 70,142,
- 46, 65,252,211, 16,255, 32,196,119,128, 28, 46,108,101,186, 56,102,182,214, 21,203, 93, 7,237,108, 32,255, 56,124,254, 45,248,
- 63,182,148, 23, 79,169, 97,132, 95, 80, 27,185,111,173,128,235,185,105, 57,194,229, 68,120, 97,141,252,190, 43,200,199, 62,132,
-188,247, 47,122, 56, 74,129,244, 46, 40, 87, 29, 77,247,140,113, 93, 37, 61,158, 48, 37,173, 44, 30,248,255,255, 44,236,126, 20,
- 94,188,137,254,114,164,254,243,141, 1,155,142,237, 57,169, 67,181,232,226, 85, 68,159,142,240,174,140,188,171,192,229,231,160,
-255, 56, 28,124, 28,210,243,126, 89,141, 80, 55, 54,125,218,254, 18,236,126, 12,189,245, 10,252, 42,232,255,171,228, 91,231,212,
- 58,176, 61, 80, 30, 97,242,128, 93,101, 82,216,198, 6, 81,145,137,141,100,201,235,237, 96,246, 11,103,146,121, 39, 27, 29, 13,
- 91,242,190,250, 71,226,140,239,149, 11,157,108, 83,167,155,199, 87,246, 98, 38, 39, 37,245,212, 37,202,156,112,229,197,116,130,
-160,120,174,249, 56, 81,191,204,213,208, 43,156, 47,236, 96, 34, 1,209,185,175, 13,213,109, 78, 46,124,212, 54, 98,111, 2, 51,
-157, 47, 1,193,187,238,185, 24,153, 40, 46, 54,179,195,124,125, 33,182, 68,182,229, 16,251, 66, 71, 47,147,168,176, 78, 10,243,
-206, 19,234,170,202,133,210,184,152,234,121, 1, 42, 94,124,157,158,239,103, 83,157, 18,199,150, 99,241,165,214,161, 94,228,178,
-188,205, 36,119,249,221,101, 31,163,126,161, 67,159, 27,221, 37, 61, 79,246, 44, 15,115, 65,111, 23,131, 40,226, 92, 2,153,255,
-124,203, 3,240,236,120, 93, 88,241,166, 39, 66,218, 4, 73,166,221,114,101,145, 95, 47,238, 98,242,103,106,185, 10,145, 6,156,
- 10, 50,171,235,125,188,174, 11, 76,175,182,149,129, 79, 20, 82,138,132,152,236,189, 84, 69, 82,178, 66, 91, 43,185, 20, 75, 95,
-163,238,241,230,247,200,121, 33, 80, 67,160,148,108,161, 47, 19, 23,192, 52, 22, 42, 51,251,128, 69,158,193,164,198,208,178,135,
-136, 23,185,128, 21, 92, 68,224, 38, 36, 52, 14, 10,161, 84,214,100, 86,154, 81, 57,129,221,134,114,250, 8,137, 38,213,142, 8,
-157, 40, 93, 44,244,197, 30,223, 34, 66, 8, 38, 56, 41, 85,208, 26,201,213, 68,106,181,152, 77, 41,104,157,124,126,218,104, 49,
- 91, 65,250,222, 14, 71,140,252, 37,163,119,164,181,129,115,117,142,189, 68, 40,154,247, 62, 72, 45,172, 33,214, 74,162,114, 88,
- 11, 87, 74,225, 40, 64, 58,234,145, 43,107,228, 15,172,224,119,101,228,137, 75,208,125, 63,196,239,134,110,132,221,223,129,237,
- 47,192,253,151,208,207,111,224,147, 9,125,185,167,158,141,212, 60,160,117,152, 72, 65, 53,217, 77,191,150,166,216,100,102, 24,
-203,227,162,140, 61,239, 14,139,192,130,197,248,105,250,196, 92,136, 4, 94, 94, 71,155,186,177,113,140,165,206, 47, 75,251, 80,
- 4,119, 9,172,215,118,184,158, 15,240, 96,103, 93,213,245,104,183, 76,182,160,103,138, 94, 18,228, 60,195, 67,108,102,250,176,
-192, 65, 52,141,194,203, 5,121, 54,163,215, 59,248, 72,135, 92, 91,195,111, 41,241, 13, 88, 7, 33,171,192,202, 82,136,234,231,
-171,169,142,255,253,235,200,147, 7,112,115, 99, 41,114,193,242,188,249,222,158,242,226,128,190, 57, 34, 81, 89,128,114,231,196,
- 46,103,169, 4,224,252,165, 76, 95,252,113,182, 58,141, 30, 7, 83,187, 99,241,187,168, 88,113,255,112,164,187,218,193,135,123,
-163,205,189, 41,200,251, 15,144, 67,224,224, 85,228,232, 67,208,253, 37,232, 62, 48,167,147,253,182,215,226,100, 72,186, 18,108,
-215,156,255, 2,124,238, 37,248,107, 35,229,139,103,148,211,108, 81,184,143, 42, 82,132,112,220, 35, 31, 58, 38,252, 11,151,144,
-111,190,140,188,243,253,112,244, 97, 72,223, 9,114,205, 11,248, 8, 53, 67,121,217,119, 39, 79,248,252, 53,188,253,207,162, 25,
-228, 30,232, 79,194,238,111,194, 27,175,192,207,117,240,203, 1,221,157,195, 42, 27,227, 32, 6, 36,118,118,187, 91, 5,244, 70,
-130,247,239,144,247, 6, 56,254, 14, 56,248,227,208,127, 3,132,195,197,237,241, 12,242, 87,224,252,255,134,243,159, 69,191,250,
- 16,126,178,163,190,184,163, 12,231,148,152, 25, 68, 57, 43,182,238, 25, 90, 68,230, 66,223,212,208,205, 77, 76, 93, 44,112,207,
- 30, 93,119,167, 36,148, 94,132, 97,121, 25, 93,136,154,132,101,178,214, 92,224,202, 66,225, 27, 38,234,153, 46,210, 18,141,174,
-146, 11,148, 32, 70,236,242,206, 10,215,228,168, 23,232,246, 76, 21, 85, 52, 43, 69,139,243, 54,132, 21, 66,205,202, 80,235, 4,
-231,147, 11, 99, 78,241, 11, 67,213,249, 66, 17,188,235, 44, 58,255, 90,177,207, 91,179, 35,137, 24,221, 55, 8,220, 45,243,120,
- 58,136,208, 97,208,171,176,176,173,114, 65,212,214, 76,230,170, 50,141,211,219,247, 14,139,130,222, 14,241,186,136, 29,217,191,
- 28,201,228,162,215, 61, 21,157, 46,211, 81,253,125,219,167,239,201,194,192,215,158,210, 42,179,149,109, 89,136,117, 49, 29,145,
-199, 85,130,254,188,204,153,236,149,101, 22,138, 78, 32,161, 25,198, 42, 83,246, 89,149,253,142, 63, 46, 4,145,186,140, 87, 69,
-167, 92,245, 54, 53,105, 77, 99, 27,225, 7,177, 73,176,248,229, 46, 68,235,148, 69,162,173, 76,130,236,121,224,165,121,231,221,
- 19, 30, 93, 85,175,110,119, 20,135,244,140, 30,214, 18, 83,242,177,123, 65,199,209, 34,127,107,181, 41,227,130,224,143,175,109,
-164,235,205,202, 93,234,196,154, 87,239,242,219, 67, 35, 81, 30,163,236, 77,160,154,162, 51,161,175, 77, 40,218, 11, 35,251, 50,
-248,164,197,126,176, 65, 18, 53, 23,250, 80,233, 36, 32,169, 39,156, 62, 98,172,149, 34,145, 64,101,229,194,179,180, 8,125, 79,
-193, 60,143,187,106, 34, 19, 3,203,204,190,235, 80,203, 20,191, 23, 53,184, 88,166, 16,242, 56,101, 68,119,238,223,212,152,168,
-227,232,188,118,127,108,106,157,185, 29,117,113,227, 13, 16,171,221, 84,187, 90,185, 92, 50, 87, 68,232,143,215,200,165, 21,242,
- 97,133,239, 79,200, 7,158,128,248, 93, 16,126, 31,240, 0,118,255, 19,188,246, 34,250,250, 25,124, 13,120, 41,162,175,245,212,
-243, 76,213,173,169, 23,107,153, 33, 19, 50, 71, 11,234,226, 1,154,212,186,139,235,108, 27,211,237,125,136, 10,110,153,154, 3,
-197,216, 67, 62,202,219,166,244,168, 94,184,132, 45,254, 99,235,148, 86, 81,233, 59, 39,200, 10,156,111,109,186,222,101,120, 74,
-225,248,133, 3,248,214, 35,194,234, 0,174, 29,216,174,121,147, 93,142, 47,150,189,221, 85,228,219,119,112, 71,225,134,203,161,
-142, 42,242,206, 35,248,214,142,244,185, 45,233,179, 35,171,175, 95, 81,127,229,156,241,203, 3,233,195,135,200,191,251,132,133,
-141,124,225, 1,124,126, 11,175, 43,124,104, 5,215,122,244,201, 14,125,119,111,236,246,251,195,188, 55,146, 25,122, 33, 69, 41,
-209,124,198, 53, 43,185,179,184,211, 85,198,210,231,214, 1,118,126,196,100, 39,183,109,130,217,204,158, 92, 25,237,238,174, 34,
-151, 59,131,177,231,183,144, 39,191, 9,214,127, 11,210,117, 27,171,235,153,183,136,235,183,217, 2,250, 13, 66, 15, 64, 30,192,
-240, 31,193, 47,255, 58,245,191,129,250,234,150, 58, 22,184,220, 19,223,125, 68,248,174, 35,228,187,174, 32,207, 29,195,225, 26,
-186, 99,251,115,163,192,163, 79,160, 55,255, 30,250,217,219,232, 43, 3,225,247, 95, 67,158,255, 51,176,250, 30, 39,227,108,108,
-132,194,193,133,154,126, 6,250, 5,216,253,117,184,255, 51,240,210,125,187, 88,254, 86,143,106, 70,201,212,206,189,141,213, 93,
-225, 93, 48,160,208, 51, 17, 62,176, 67,222, 25,225,232,123,224,232, 79, 65,255,254, 57,161,205,114, 23, 97,252, 26,156,253,117,
-120,248, 75,232,103, 51,250,143,123,244,230, 72,233,183,212,243,204, 80, 42,103,152, 32, 63,123, 62,120,104,123,215, 38, 46, 11,
- 30,173, 60, 59,105,102,138,151,103, 15, 73,128,174,170, 91,219,108,224, 47,161, 49,225,103,222,187,138,238, 57,157,130,234,162,
- 27,217,183,116,165,230,237, 13, 80, 26,160,164, 84,235,148,177,241,125, 13, 22,136, 81,151,118,173, 90,173,243,118,161,211, 80,
-237,188, 90,251,104, 91, 20,206,202,156,115,158, 23, 99,255, 6,250, 16, 92,221,175,115,136, 72,155, 7,182,103, 39, 47,125,199,
-218,252,237,226,150, 54, 59, 20,218,190,183, 42,123, 69, 78, 23,175, 95, 93, 4,175, 84,199,255, 46,127,239, 52, 90,175,139,221,
-244, 36,121,171,123,103,200,236, 75,223,135, 2,161, 60,150, 63, 22,216, 23,141,181, 64, 24, 97, 57,109,120,188,147, 23,246,173,
- 84,203,189,241,148, 64,216,150,161,178,223,157,207,246,182,139, 73,100,138,134,102, 44,191, 72,133,123,108,233,224,147, 15,217,
-215, 45, 41,116, 49, 16, 83,164, 15,137, 24, 19, 33, 70,243,144,203, 68,206,113,226,161, 78,255, 84,173,190,218,173, 19, 43,191,
-169,234, 83,215,209,197,142,212,119,196, 16, 38, 33, 94, 74,157, 79, 11,132,243, 97,199,176, 90, 51,148, 66,206, 35,165, 20, 74,
- 85,198, 50, 82,198,129,154, 71, 68, 13,139,174,165,236, 65,111,150,186, 9, 9, 50,191,234, 77,192,235,211,134, 41,201,237,237,
-116,253,178, 39,201, 68,204, 89,161, 84, 9, 12, 33,178, 11,129, 94, 34, 93,239, 55,233, 97, 75, 8,129, 24, 18, 41, 70,122,170,
-225, 86,147,249, 58, 27,222,180, 86, 33,103,101, 91, 96,168, 25,213, 56,177,161,139, 42,181, 75, 70,254, 41,101,242,148,138,102,
-187, 28,168, 5,204,135, 46,145, 83, 66,106,153, 70, 19, 97, 82,130,122, 8,135,191,201, 61, 66,168,153, 64,101,157, 43, 87, 75,
-229,136, 68,184,118,128,124, 52, 16,126, 0,248,134, 15,192,193, 15,130,126, 39,212, 35, 24,127, 2,125,253,175,193, 47,158,193,
- 75, 29, 60, 90,161,231,153,186,115,129, 67, 53,119,185, 58,111,185,169, 33,107, 35,213,213,253,220,228,233, 17, 43,115,236,227,
- 18,210,208, 58, 25, 60,158,179,237,215,162, 52,177, 78,179,177,232, 20, 69,168, 11,161, 76,149, 9, 68, 52,141,169,219, 39,196,
-223,255,233,235, 14, 21, 78,207,224,108, 52,149,241,115, 1,142,159, 95, 33,223,127,213,138,208, 46, 26,188,100,157,204,239,220,
- 24,170,138, 21,196,163,222,198,229,219,130,190,248, 8,253,201,251, 4, 45,200,147, 98, 20,189, 63,127,221,114, 0,126,106,199,
-234,251,143,224, 7, 47, 25,124,253,215,239,194, 63, 60,133,251, 5,190,227, 0, 46,245,182, 31, 88, 11,114,163, 55,143,251,205,
-209,118,153, 46, 38, 44,101, 74, 32, 53,203, 80, 81,182,126,217,137, 10,114, 37, 32, 43,161, 12,190,115, 56,138, 70,165,234,163,
- 41,218,123,215, 6,124,169, 90,168,201,251,128,243,219,200, 7,190, 17, 46,253, 24,232, 3,208,191,231, 84,151,111, 4,158,127,
-251,130,222,110, 24,245, 77,184,247,175,162,127,251,139,212,191,210, 91,134,253,247, 95, 35,253,192, 37,194, 7, 46,193,165, 67,
- 91,180,138, 39,228, 61, 56, 69, 95,121,131,250, 43, 15,169, 63,123, 74,125,109,139,222, 43, 6,175, 73, 80,255,230, 45,194,135,
-126, 4,249,143, 63, 66,120,225, 47, 64,247,188,127,191, 7, 46,130,251, 77,216,254, 19,120,248,179,232,171,111,161,159,170,240,
- 27,107,244,245, 14, 98,166,166,115,232, 21,237,188, 53,206,201, 58,140,131,136, 92,234,224,217, 21,242,117, 91,120,199,122, 46,
-232,221,123, 93, 31,176,155,180,234,228, 91, 48,252, 61,120,244,139,232,175, 84,244,147, 9,221,141, 20,217,160,247,182,236,182,
-112,234, 17,169,109,125, 20,151, 49,162,190,227, 93,238, 68,219,180,178, 4,115, 86, 68,204,157, 23,247,104, 97,179,184,142,104,
-248,232,182,136,174,194,222,165, 92,203,133, 69, 41,182, 62,178,253,180, 81, 46, 41,173,147,174, 22,187,233, 23,133, 16,125, 87,
-238,116, 57,251, 18,117, 6,212,104,219,237,234, 36, 66,139,106,160,191,222,141, 31, 59,223, 95,123, 42,182,239, 37,117,218, 47,
- 71, 95, 5,166,226, 89, 22, 30,241, 89,246,118,195, 86,208,207,213,132,123, 54,222,173,123,148,175,101,231,220, 4,107,114,161,
- 73,104, 83,172,246, 26, 38,167,198, 5,229,226,198,122,138,173, 21,239,229,151, 17,168,123,211,238, 58,219,196,248,109, 24,112,
-178, 40,242,203, 79, 73, 81,221,179,123,233,126, 9, 95, 76,153,229, 49, 42,218, 98, 8,137, 59, 87,169, 75, 11,123, 99, 83, 52,
-107,180,159,109, 77, 9,175, 11,191,127,184,168,190, 95,236,186,155,250,109, 21, 34,253,170,167, 79,189, 77, 38,101, 86,139,103,
-247,139, 55,193,246,228,252,241,155,102,148,232,150,226, 64,173,126, 17,107,209,187, 37,163,209,242, 3, 36, 70,183,112,167, 41,
-108,104,204,133, 92,202, 76, 11, 76,137, 46, 38, 42, 74, 87,123,198,213, 26,205,227,164,142,207, 11,161,247,180,142, 16, 22,163,
-243,233,176,159,169, 63,211, 62,136,189, 36, 57, 31, 29,237,121,218,155,195, 32,165,100, 30,113,201,202, 86, 11,171,160, 22, 4,
- 49,236, 40,187,115, 98, 54, 86,112, 18,251,144, 75, 4, 73, 29, 33, 85, 59,228, 20, 80, 27, 85,103,215,239, 84, 45, 83, 96,131,
-229,164,103, 98,138,136, 99, 3, 82, 3, 17, 20,179,186,105, 13,140,181, 24, 35, 94,162,129,109, 88,176,139, 77,209,231, 99,124,
- 37, 81,233,107,229, 68, 11,199,187, 64,234,214,132,247,118,200,159, 0,249,248,187,225,202,191, 6,225,247, 64,184,102,150,161,
-179,191,128,126,225,167,225,199, 59,120, 45, 81,115, 54, 48, 64, 41,104,205,118,192, 4, 75, 77,211,176,175,236,208,197,195,180,
- 55, 62,126, 27,143,160, 46, 88,198,161, 50,133,216,180, 67, 44,121,151,170,222, 44,215, 11,176, 34,163,183, 90,210, 93,187, 68,
-168,103,186,136,168,177, 77, 60,200, 45,186,205,109,244, 67, 96,200,246,231,159, 70,185,244,142, 30,190,249,192,178,220, 31,130,
-156,103,219, 1, 5, 87,191, 71, 93, 40,128,189, 19,222,217, 7, 76,207,171,161, 71,213, 41,104, 47, 13,240, 98,182,246,235, 15,
-172,225, 27,162,113,218,255,241,134,242,202,104,241,173, 69,233, 62,179,133, 39, 2,188,223,101,233, 59,224, 41,231,161,223,207,
-148,245, 62,199, 89, 27, 9,206,195,128,114, 86,202, 65, 64, 46, 1,119,213,186,232,203,193, 72,110, 87,123, 51,234,171,229, 22,
- 79, 57,158,183, 10,242,234, 93,228,187, 34, 92,249,159,173,251,149, 53,240, 61,192,203,192, 7,125, 87,253, 54,142, 90,205, 48,
-252, 99,120,240,231,208, 79, 63,128,235,207, 16,254,198, 49,188,243, 18,172,220, 15,189, 27,224,193, 67,244,107,231,212, 95,124,
- 64,254,249,115,202,171, 27,242,131,209, 48,200, 43,208,163,136, 62, 3,161, 19, 58, 17,186, 26,136, 95, 1,249,215,127, 3,253,
-221, 63,136,252,145,107,200,213,222,214, 29,247, 6,120,237, 12,125, 69,224,206, 1,122,247, 16, 54,138,134,140, 94,221, 77,221,
-152,133,183, 40,172, 44, 8, 70,106, 68,142, 59,228,157, 9,190,225, 28,158,186, 12,135, 63, 0, 7,127, 12,210,115,166,164,183,
-113,134,245,201,186,131,252, 51,112,231,239,163,191,148,209,127,190, 70,183, 91,202,253,115,202, 27, 27,206,179,114, 38, 98,153,
-231, 42,115, 54,119,219, 31,239,229, 99,207, 71,186, 22,235, 80, 69,103,145, 21,227,140, 40, 77, 14,207, 11,139, 2, 86,131, 23,
- 38,173, 38,158,243,162, 91,124, 15,149,252, 89,239,253, 86, 43,110, 81,203, 77,205,173,179,245,172,226,220,236,246, 51,121, 72,
- 75, 93,164, 55, 6,143, 9,147,170,150,237,238,227, 93, 31,246, 76,135,121,138, 50, 55, 30, 4,106, 10,116, 77, 47, 83,161,102,
- 27,116, 31, 68, 37,138,173, 19,243, 20,184, 34,123,126,251, 81,149, 17, 49, 79,126, 19,244, 77, 34,172, 38,172,155, 63,232,177,
-101,128,235, 50,249,108,150,198,139, 66,148,234,129, 67, 77, 7,208,188,227,117,178,131, 70,183,208, 22,213,125, 4,220, 82,198,
-182,224,179,215, 11,133,120, 41,154,187,168,100,159,123, 8, 93,128,105,228, 49,192,218,227, 10,248,133, 50,223, 45,118,211, 14,
-152,118,249,114,174,251, 34, 14, 53, 74, 36,122,114,217, 88,171,101, 9,132, 54, 22,183, 12,245,177, 20,155,160,185,107, 33, 74,
-160, 75, 29,169,235, 9, 41, 78,176, 30, 45,121, 47,223, 94, 38,207,119,152, 50,222, 67,176,175,107, 35,121,219,223,103,119,120,
-149,106, 23,187, 20,125, 9, 36, 98,235, 28, 21, 6,169, 72, 45,140,170,108,135, 29, 99, 46, 20,167,195, 45,133,138,168, 61,127,
-177, 95, 17,186,158, 93, 30,145, 16, 41,195, 72, 45, 6,168,153,128, 57, 23,111, 68, 58,135,181, 40, 51,183, 96,207,202,118,193,
-235, 63, 9, 1,171,146,242, 80, 44,236, 32, 12,236, 42,156, 82,169, 49, 81,119,149,176,217, 17,164, 78,232, 84,170,239, 22,197,
-195, 41,142,123, 24, 10,186,117,116,107,105,162, 49,117,209, 76,180, 34,165,149,190, 40,169, 55,254,186, 37, 48,153, 37, 68, 85,
-169,238, 47, 55,250, 92,103,187,206, 90,136,213,110,223,154, 71,208, 74,196,194, 86, 86, 89,185, 50, 42,171,176, 34, 60,181, 34,
-252,145,138,252,192,101,120,250,207, 66,247,135,129,107, 62,255,251, 10, 60,250, 81,244, 51,191, 9,255,160, 71, 95, 55,108,173,
- 82,156,244,229, 4,179,184, 8, 83, 17,157,176,179,109,103, 94,203,252,122,199,199,200,217,186, 76,213,155, 62,148,102,127, 94,
-140,213,235, 28, 92, 16,124,156, 25, 23, 23,129,230, 16, 16,223,147,247,189, 71,136,186,202,120,229,128,157, 92,140, 69,146,157,
-123,146, 92, 28,184, 78,194, 81, 81,174,157, 4,228,235,122, 56, 11,240,178,229,163,211,139, 41,203,215,217,150,237, 71,222,174,
-164, 96,150,177, 85,178, 47,184, 29,145, 15,154,255, 90,223,218, 34,247, 71,144, 1, 94, 29,224,155, 86,182, 43,254,177, 45,249,
-179, 59, 54,219,204,112,100, 83,154,213,137, 32,247, 11,233,231,206,205, 7,255, 76, 15,135, 22, 16, 35,223,216,211,253, 82, 65,
-182, 22,209,186, 87, 90,117,246,145,170, 8,227, 80, 25,190, 4,105, 29,225,122,176,164,184, 75, 78,125, 83,144, 65,224,190,213,
-118,182,231, 72,127,142,124,223, 21,120,225,199, 49, 91, 67, 92,124,117,119, 53,224,222,239,229,199,161,110, 96,252, 77, 24,254,
- 50,244,151,145,111,123, 7,196, 3,187,205,111,118,232,171,143, 40,191,250,128,242, 51,143,216,125,246,156,241,225,200, 80, 43,
-185, 19,198, 99, 65,159, 17, 74,151, 88,202, 63, 66,177,184,217,117,172,172,175, 10,171, 49,194,175, 1,191,118,215, 46, 9,135,
- 46, 22, 8,107,155, 58, 60, 33,112,185,160, 93, 65,183,217, 81,109,205,180, 12, 72, 66, 46, 37,194, 81, 71,168,157,141,220, 63,
- 50,192,179,239,134,195, 63, 6,253,239, 51,149, 61,163,167,170, 36,187,208,232, 22, 54,127, 7,253,234, 95,132,159, 29,208,155,
-135,212, 7,103,148, 55,207, 24,239, 13, 54,110, 23, 97,172,236,199, 97,182,255,221,198,204,139, 73, 80,172, 83, 48,226, 36, 26,
- 83,109,177,165,115,164,106, 90, 36,131,181, 32,141,184, 88,253, 37,255,156,100,221,135,173, 20,153, 85,230,109, 93, 88, 23,163,
-222,226,251,199,204, 92, 36,140,157, 45,143,133,119, 68, 22,185,234, 64,231,208,142, 34,182,182, 42, 42,148, 96,157, 86, 41,118,
- 96,135,208,236,188,179,176, 73,189,226, 14, 84,122, 49, 61, 17,226,198, 89,245, 64, 40,255,187,108,105, 10,119,231, 74, 0,131,
-234, 98,251,189,124,230,213, 35, 89,101, 66,207, 46, 3, 61,130, 95,122,218,142,125, 18,215, 79,141,132, 76,231,203, 76,135,243,
-124,246,197, 94,126,207,211,188,112, 88,201,219,164,128, 45,235, 73,148, 89, 4,172,178,180,202,201, 50, 47,101,138, 62,213,133,
- 61, 45,184,235, 97,210,134,225,129, 59, 58, 19,239,218, 42,184,177,223, 45,125,204, 60,237,181,214,133,216,205,117, 24,205,102,
- 40, 17,237,172, 3,143,197,128,101,171,148, 8, 93, 15, 18,200,254,103,155,134, 35,180,191,140,119,105,109,188,173,126, 45,211,
-150, 36, 40,197, 38,197, 33,152,102, 44, 38,194, 42, 18,137,211,100, 73, 28, 24, 19, 68,168,181, 48,162,108,119, 59, 74,206,211,
-168,158, 16, 93,147,225,147, 94,199, 18,167,212,161, 33,208,197,104,206,142,110, 69,209, 66, 41,133, 90,178, 93,168,115,165,120,
-161,159, 58,238, 16,125,151,206, 30,197,144, 32,147,166, 33, 44, 40, 52,138, 76,226,201, 68, 49, 2,206,224,235,187,141, 84,164,
- 10, 33, 27, 10, 54, 52,177, 69,117,144,129, 8, 34,217, 89,215,214, 50, 86, 2, 37, 4, 98,200,172,198,106, 33, 42,192,202,183,
- 31,198,136,175,200,232, 31, 10, 41,147,194,143, 26,220,152,143, 37,153,213, 64,151,162,141,195,199, 1,212,242,187, 87, 94,127,
-142,134,202,241, 86,232, 47, 29, 34,223, 25, 8,127, 50,194,251,191, 23, 14,255, 67,144,119,216,155, 88,111,193,238,239,194,157,
-191,129,254,198, 67,248,153, 21,245, 86,246, 27,146,119,232,158,184, 68, 85,164, 10,218,114, 19,202,156,198,212,110,237,203, 29,
-121,184,144,142,163,236,135, 45, 44,133,113,234, 31,242,118,104,182,209,121, 10,179,216, 46,182, 81,188,119, 52, 77, 19,214, 69,
- 56,232,108, 60, 58,250,215, 57, 58,180,236, 22,173, 48,238,102,110, 74,136,230, 20,184,210, 41,253, 19,189, 21,141, 51, 69, 98,
-133,119,121, 46, 55, 61,220, 88, 27,228,100,187, 80, 63,117,142,171,235,128,212, 33,207, 95,182,221,251,237,173,177,196,239,110,
-224,214,104, 56,210,223,170,112, 69,144, 94,201, 89, 25,130, 61,112,171, 67,168, 61,232,205,140,124,226, 12,126,175, 88, 49, 46,
-192, 90,233,158,207, 28,189, 56, 24,116, 71, 22,169, 73,126, 44,212, 98, 44,237, 20, 33,174, 34, 60,149,224,106, 66,142, 2,156,
- 11,122,223, 46,150, 6, 54,218, 32,223,164,240,245, 79,192, 59,127, 4,142,254, 48,112,228,163,129,193, 59,243,222,186,118, 10,
-112,105,255, 2, 86,238, 67,249,103,192,255, 5,241, 14,148, 3, 11,177,249,226,215,168, 63,255,128,252,243,143,216,125,109,199,
-102, 24,217,246,129,124, 24, 40, 55,160,244,145,170, 22,209,105,171,169, 89, 77, 29,130,144,212,120, 5, 69, 97, 68,201,177,208,
- 95, 18, 18,129,208,249, 62,185,203, 72,231, 91,230, 18,141, 36,215, 18, 80,155,223,175,243, 78,179,139,132,117, 36, 28,216,202,
- 68, 62, 88,224,153,103,225,210,159,131,240,113,143, 31,202,126,212,247, 86,208,235, 91,112,255, 63, 69,127,227,167,209, 79,159,
-192,157, 3,234,171,143,200,175,159,115,186,203, 60, 20,177, 32,184, 58,219, 76,169,179,103, 90,155,142,197,171, 70, 83,129, 19,
- 76, 68, 91, 36, 76,151,221, 41,251,154, 11, 4,185, 69,140,104,150, 5,240, 99, 49,197,234, 74,155, 43,168,101,109, 87,101, 25,
-135,141,175,165,162,119,217,226, 29,105,235,216, 91, 33,105,187,116,243,146,219,119, 25,140, 45,138, 4, 83,144,219,175,211, 12,
-180,114,235, 89,245, 27,122, 85, 65,181, 80,135,106,127,231, 69,251, 89, 34,108,137, 32,193,158, 77,183,175,138, 51, 93, 27,103,
- 66, 84,167,184,231, 56, 81,217,116, 47, 55,125,222,161,234,100,169, 43, 83,131,224,182, 50,159, 75, 23,140,245, 81,117,129,133,
-209,185, 36, 5,143, 91, 45,203,216,211,133,104,109, 46,184,179,200,172,157,195,203,166, 94,222, 38, 57,109,201,211,152,146,218,
-150, 65, 11, 75,113,225,158,147,158, 61, 79,249,146, 31, 63, 71, 27, 47,244, 21,139, 75, 70, 20,153, 28, 69,139,235,220,100,235,
- 85,239,156,251, 24, 72,171, 21, 99, 46,172, 17,250,126,133, 6,115, 68,209, 44,142,139,231,175, 46,198,221, 90,152, 46,225,203,
- 85, 66, 16, 38, 12,112, 12, 66,138,137,149,246,196, 78,136, 18,168, 18, 76,221, 14, 20, 50, 21, 97, 44,153, 50,142,243, 36,203,
-187,126,131,168, 25,217,174, 74,182, 29,189,197, 64, 18, 37, 16,131,173, 61,149,206,214,210,165, 80,171, 82,180,146, 75,166, 44,
- 20,244, 85, 21, 29,199,169, 80, 52,128, 79, 99, 22, 72, 11,158,241, 55, 88, 23,102,247, 84,203,104, 35, 0,177, 15,206,161,152,
- 0,173, 25,221, 27,106, 85,170, 16,131, 18,163,237, 60,109,214, 84, 97,151,237, 3, 65, 96,157,162,229, 18, 47,136, 62, 59, 23,
-118,153,138,221,225,247, 45,161, 76,236,107, 35,193,114,216,181, 82,243,134,113, 51, 18,138,133,204,119, 33, 88, 24, 86, 80, 14,
- 55,149,131,146,136,239, 57, 36,252,153,138,252,174,167,225,234,143, 64,252,221,216, 44,244, 28,134, 95,129, 71,255, 29,124,249,
- 43,232, 63,235,225, 83, 7,212,179, 29,165,238, 12,155, 58, 65,246, 27, 1,102,225, 89,109, 81,174, 77,225,209, 48,143, 45,136,
-128, 69,103, 22,108, 95,152,219,110,204, 79,181,198, 49,174, 11,192, 76,155,168,182, 93,159, 52,253,147, 43,137, 71,247,189,167,
-133, 26, 37, 2, 71, 7,150,156,121, 54,216, 23, 57,232,172, 89, 62,117,131,111, 10,182, 38,239, 20, 46,103, 56,186,222, 89,238,
-248,198, 69, 63, 87,147,125,147, 46,192,183, 94,131, 43,199,240,202, 29,187, 61,244, 2,125, 54,122, 75,116,108,108,131, 81, 95,
- 90,219,254,250,114, 7,183, 18, 60,177, 67,223,218,193,121, 65,174, 42,241, 61,129,227,255,231,140,250, 96,164,174,172,209,143,
-107,195,147,242, 32,195,231,183,132,119,173,108,157, 49, 40,250,129,158,131,219,153,237,173,202, 89,191, 63, 10, 20,236,185,143,
-206,153, 9,215, 44,137, 77, 82, 64,118, 1,198, 64,184, 19,224, 16,248, 24,240, 29, 31,132,167,254, 51,144,223,225, 87,167, 87,
- 97,247, 15,224, 19,127, 5, 62,247, 38,124,236,221,240,142, 63, 12, 39,223, 4,171,239, 53,168, 11, 5,244, 33,148, 95,135,252,
-191,193,246, 11,232,131, 13,250, 98, 64,127,106,195,248,243, 15, 25,238,237,216, 69,101, 56, 20,118,215,133,177, 75, 12, 34,174,
- 11,241,100, 84, 15, 79,107, 63,255, 44,236,178, 15, 92,244,223,155, 11,108,131,125, 48,147, 40,105,204, 46,168, 10, 72,177, 7,
- 37,244, 78, 56,233, 60,237,173, 90, 90,161, 68,131, 84, 72, 31, 9, 99,176,142,253,134,194, 13,129,163, 63,228, 5,253, 10,243,
- 83,117,226,192,159, 95, 67,191,244, 39,225, 87, 79,225,245, 39,208, 91,149,242,133,123,108,239,110,121, 20,148,211, 96,132,184,
- 80, 61,217, 76,205, 18,170, 50,135,141,236, 73, 55,235, 60, 70,204,158, 73, 52,169,214,253,247,166, 69,119,231,122,251,137, 56,
- 87, 2, 72,149,105,132,222, 10,203,116,206,138,135,207, 85,157, 71,249, 14,230,208,133,136, 42, 6,136,181,169,148, 43,227,172,
-180,153,172, 90,211,168, 85, 26, 29, 28, 79, 7,243,160,146,226,121,214, 49, 46,186,233,202,206, 5, 51, 90,150,183,117,153, 80,
-172, 21,211,130,156, 41,164, 81, 89, 75,157, 88,226,203, 0,166,224, 93,178,250,152, 46,136, 93,242, 26, 25,207,118,196, 46,109,
-107,217, 22, 23, 35, 78, 23,211,190,234, 65, 49,117, 26,174,154,130,126, 18,221, 53,237, 64,235,116,167,232, 96,153,243,205,247,
-242,213,231,225,121,185, 80,208,151,232,243,165, 30,232, 49,239,186, 46,236,119,111,115, 33,104, 25, 30,123, 49,167,178, 15, 78,
-159,158,149,230, 4,241,213,155, 44, 64, 53,210, 28,242,238,150,106,148,247,166,198, 63, 73, 61, 97,157, 16, 2,185, 22,134, 90,
- 38, 37, 57, 90,167, 75,128, 46, 0,183, 75,146,253,242,181,144,197, 37,132,134,107,245,207,118, 41,133, 56,137, 38, 35,136, 48,
-214,202,152, 51,121, 28,231, 63, 31, 2, 81,194, 4, 16,209, 96,126,174, 64, 71,140,102,187,204,165, 64, 80, 15,126,137,182,106,
-206, 6, 79, 91,247, 9, 73,145, 49, 23,198, 82, 24,134,157, 53,157, 2,163,215,167,170,185,233,228,155, 1, 16, 87,140, 78, 60,
-151,229,223, 51,137,223, 22,186, 20, 72, 98, 56,214,136, 49,205,197,193,229,198, 85,175,182,127, 9,126, 8,197, 54,139,174,118,
-163,144, 72,144, 72, 31,109,100, 98, 67,238,234,160,136, 6,139,176,244,182, 16,133, 80, 33, 68,143, 87,205, 35, 99, 19,210, 53,
-202, 82,176,155,217, 90,148,147, 12,199, 69,233,226, 1,225,219, 86,132, 63, 39,240,254, 31,132,245,127, 0,242,164, 47,251,190,
- 10,155,255, 1,222,250, 89,244,211, 25, 62,121,136,190, 81,168,155,115,223,159, 87,106,174,179,191,116, 17,125,164,137,249,218,
-173,123, 27,242, 89,160,230,173,119,235,166,171,206, 69,122,138,140, 92, 20,171,184,192, 65,206,171,210,197,247,244, 59,132,191,
-111,243, 77, 57, 48,141,178,250, 0,235, 35,123, 61, 74,113,140,120, 50,146,220,218, 79,212, 67,224,210, 78, 57,188,158,144, 27,
-107, 88,117, 22,237,167, 66, 56, 15,134, 87, 93,117,240,214, 6,238,109,173,152, 95,139, 54, 30,239,122, 8, 79,128, 94,133,248,
-121,200, 91,139,251,108,137, 98,193,178,192,245, 48, 82,159,235,145,179, 98,162,176, 35,161,251,174, 67,174,254,211,115,106, 41,
-164,147, 54, 94, 16, 56, 16,228, 97,133,215, 70,228,190,137,139,234, 13, 33,188,167,231,202,102,135, 14,202,249,194, 31, 35,126,
-152, 30, 6,232, 14,131,161, 60, 75, 64,206, 5,222,244,232,210,111, 63,128,223,127, 3,158,253, 62,144, 63,226,127,248,239,194,
-253,255, 29,126,227, 37,248,171,103,240,115, 25,214, 61,172,191, 6, 31,251,139,240,111,119,240,194, 85,208, 39, 13, 87,183,219,
-192,221, 51,120, 69,168,255, 60, 82,127,102,160,190,114, 78,201, 3, 15, 66,229,193, 59, 2,181, 11,214,105, 23, 19, 64, 86,103,
-212,140,139,160,157,234,177,231,173,164, 38,241,226, 37,179,192,177, 86,203,121,151,232, 59, 95,177,125,115,200,214, 45, 74, 0,
-221, 41,178,170,150,197,126,152,144, 28,145,222, 4,129, 82,130,253,129, 62,194,141, 10,239,221,194,209,215, 67,250, 54,239,208,
- 23, 9,107,188, 1,183,255, 29,120,241, 19,240,171, 7,232,163, 27,212,219, 91,234,151, 79,217, 62,216,113,191, 19,118, 68,131,
- 32, 45, 46,140,193,185,211,206,129,153,149,208,178,192,117, 98,197,223, 36, 50, 66, 23,236,215,203,238, 92, 22, 32, 56, 9, 74,
-167,208, 5,101, 20,119,247, 85,123,189,180,204,119, 70,125, 27,241,147, 46,163,183,150,194, 94,181,110,115,237, 44,110, 93, 60,
-158,178,176,137, 52,118,154,103,238, 89, 71,174,226, 54, 41, 11,161, 42,163, 53, 48,113,234, 98, 61, 17, 46,137,255, 61,100, 82,
-196, 55,145,153,250,185,145, 17,106,132,181, 71,113, 54,162,164,250, 40,221, 86, 9,182,130, 9,173, 59,109,241,167, 50,143,245,
-138,143,236,203,210, 98,172,115,215,186,180,247, 7, 47,230, 81,247, 98,233,109, 21, 48,249,206,245,130,162, 93,246, 34, 90,245,
-194,170,182, 29,103,225, 2, 51,126, 63,135,116,182,138, 61,150,209,242,219,140,238,213,187,109, 89,196,172,182, 61,179,232,172,
- 79, 91, 50,229,219,191,171,186, 79,152,175, 62,253, 8, 8, 41, 69,186,148, 72, 33,178,142,137,163,131, 3, 82,234,184, 95, 10,
-219, 51, 27,129,215,150, 29,208, 38, 62,139,215, 69,101,150, 42,234,196,252,247, 61,254,130,250, 30,146,117,233, 49,118,123,183,
-158,160, 74,234,146,231,206, 7,116, 28,253, 89, 45,134,169, 85,165,198,197, 7, 72,148, 16, 3,171, 16, 72,253,202,206,136, 80,
- 40,181,184,246,161,210,135,136,174, 18,104,165,139, 9,237, 58, 42, 59, 74, 45,134,215, 85, 91,199,245, 93, 79, 77,206, 54, 16,
-198, 0, 0, 32, 0, 73, 68, 65, 84, 29,121, 28, 40,195, 48, 17, 87,223, 86,247, 59, 73, 24, 43, 73,125,199,211,169,178, 70, 56,
- 10, 16,171,221, 44, 2,115,192,253, 4, 0,104,172,140, 86, 8,147,189, 44, 53, 23,178,103, 9, 38, 7,209,107, 85, 6,212, 16,
-167,158,234, 20, 68, 9,197, 68, 16, 49, 59,141,162, 40,154,236,192, 91,185, 40,111, 37,202, 97, 86,142, 11,172, 74, 36, 94, 57,
- 32,252, 81, 65,126,232, 50, 60,253, 35, 16,191,207,126, 24,125, 0,219,159,134,135,127, 25,125,249, 13,248,100, 15, 47, 29,162,
-219,145,146, 71, 84,109, 17, 93, 27,237, 37,212, 11,128,221,201,231, 96, 66,165, 9,123,102, 35,143, 24,230, 32, 1,149,249, 1,
- 23,153,120,136,118, 3,150, 61,198,130,143, 44,231, 47, 23, 88, 48,165, 23,187, 43,113,144,204, 84,232, 23,142, 6,201,144, 78,
- 2, 71,201,138, 64, 12,246, 62, 29,172,129,157,210,141,202, 74,132,116,117,133,124,203, 17, 28,186,250,243,106, 50, 31, 93, 39,
-166, 72,127,114,101, 66,173, 85,180,157,247,170,194,106, 13,188, 7,248, 93, 32,191,229,239,107,178,255, 22,139,189, 47,181,122,
- 14,112, 64, 66,135, 30, 5,216, 6,100, 20,184, 46,132,239, 14,132,135,174,208,219, 85,120,171,218,173,164,157,108,217, 46,132,
-225, 77,168,125, 36, 62, 17, 57,188, 93, 24,243,226,254,228, 69,166, 79, 32, 7,222,169,222, 7,110, 3,223,122, 8,127,234, 89,
-120,223,101, 72,239,180,181, 74,249,207, 97,247, 26,188,120, 19, 62,149,225,142,239,168,255,141, 30, 62,118, 12,239, 62,178,226,
-206, 8, 95, 62,131, 7,119,224,213, 17,190, 34,112,119,109,240,152,113,160,202, 14,189,156, 57,143,112,175, 6, 30,141, 50,167,
-146,234,140,181, 44, 45,255,219,253,170, 5,177,176,161,133,191,185, 11,211,144,103,154,232, 88,241,145,169, 3,170,213,138,158,
-102, 87, 68, 38,139,210, 13, 41, 17, 14,220,153,112, 20,225,138,192,129,218,251,112, 56, 90, 30,250,181,119,155, 15, 61,220,240,
-217, 87, 48, 2,221,248, 99,240,202,127, 13,191,242,144,250,202,147,232, 78,208,219, 27,202,203,167,108,206, 70, 30,174, 2, 91,
-181,159,151,216, 58,107, 33, 6,123, 95,203,232, 89,219, 11,223,115,173,112, 33,146,122, 38,144,233,204, 91, 40,173,184,214,249,
- 18, 90,171,109, 20, 90, 7,223,123, 67,182,115,119, 67, 90, 98, 66,167,184, 81,220,194, 42,147,127, 26,157,133, 63,182, 79,182,
-162,107,176, 43,247, 53,123,145, 84,113, 53,122,176,228, 70,141, 97,206,234,198,184, 10,170,150, 25,190,155, 80,176, 22, 49, 29,
- 68,232,163,208, 41,236, 90, 96, 72,211,211,212, 58,185,190, 9, 86, 34, 6, 31,139,118,190,131,159, 39, 27, 86, 52, 82, 16,122,
- 95, 73, 13,101,145, 88,119, 65, 81, 43, 45, 6, 86,247,181, 58, 77, 0,183,212, 38, 72,109,107, 14,157,188,219,226, 10,124, 93,
- 20, 66, 46,248,199, 3,198,173,175,174,123,216, 3,191,200, 99,246,242,125,182,251,194,163,190, 52, 39,232,219,216,219,150,202,
-121,149,253, 92,111,120, 92, 80,215, 8,161,178, 72,190,155, 57, 62,246, 85, 83,128,195,144,136, 93, 71, 8,209,168,163, 34,100,
-132, 77, 46, 83,180,172, 77,208,202,130, 90,184,164,234, 53, 87,124,251, 94, 97,159,196, 38,251, 34,197,189, 85, 66,245, 64,153,
- 90, 33, 69,114,181,124,143, 97,216,161, 37, 19, 68, 40, 49,162, 57,147,107,133, 60, 58,232, 40, 16, 66, 36,106, 96, 72, 66,201,
-163, 93, 50, 67, 32,164,206,197,129,117, 62,248, 67, 34, 11, 12,187, 29,195,176,163,148,108,245, 37,165,201,254, 22, 99, 32,172,
-215,148,174,243, 41,115,245, 61,188,101,156, 32,198,128, 89, 86,248, 20,177,236,242, 75, 65, 57, 8,112, 37, 64,231,180,182,233,
- 54, 40, 86,144, 68, 22,254, 44, 49,159,153,186,132, 81,213,118, 3,177, 6, 52, 65, 31, 13,138, 94,170,221, 52,211,146,216, 34,
- 74,240,204,243,160, 74,151,108,148,124,160,202,186,192, 65,169,172,178,176, 42,129,120,184, 34,188,144,144, 63, 29,145,223,249,
-117,112,252, 95, 66,248,128,237, 70,199, 79,193,249, 95, 69,111,125, 6, 62, 23,224,215, 14,225,150, 26,163,189,100, 83,150,213,
-249,103,244,128,223,185, 42,199,253,228,169,105, 39,213, 12, 22,113,126, 80,100,162,255,204, 15,112, 88,136, 65,227,226, 80, 87,
-157,199,241,141, 47, 66,116,129,141,204, 15, 84,239, 19,128, 84,109, 47,222,110,183, 73,236,223,165, 12,117, 35,196,171,201, 86,
-195,143, 42,171, 92,233, 59, 67,229,134,152,144,247, 31, 34, 47,184, 15,253,176,183, 3,241,114,156,130, 87, 88, 39, 43,230,177,
-206,109,228, 14, 72,231,208,191,110, 33, 35,250, 34,156,122,242, 87, 91,189,236, 42,228, 98,171,136,195, 54, 47, 13,240,132,162,
- 15, 19,104, 68,222,233,121,236,247,138, 49,214,215,213,105,167,193,248,228,207, 39,248,212, 6,185, 7,210,249,216,119,227,163,
-250,182,147,173,118, 71,140, 91,144,187, 1,217, 9, 60,119, 0, 63,250, 52,124,211,211,176,234, 45, 96,231,214,167,224,183,238,
-194,235, 91,232, 59, 56,237,160, 91,193,135, 4, 62,186, 54,209, 38, 61,188, 54, 88, 34,206, 70,225, 81,128, 39,175,194,199,158,
-133,119,221,134,127,244,150,241,209, 79, 21,118, 88,129,221,250,161, 84,103, 4,116, 85, 40, 65, 39,187,162, 52, 66, 32,243,238,
- 79,253,240, 69, 46,228, 79, 87, 23, 60,122, 1,200, 75,120,134,216,100,194, 70,236,129,208,173, 8,151, 87,240, 68,180, 15,222,
- 51,138, 60, 81,225,104, 13,209,255,233,190, 14,214,191, 23,186, 23, 76,184, 16, 6,168, 95,132,219,127, 22, 94,122, 21, 62,123,
- 21,189,115, 3,125,144,169,119,118,228,215, 55,108, 54,133,211, 46,184,226,219,217,213, 58,219, 54,106,133,162,230,106, 9, 65,
-137,121,127,215, 24, 22,182,166,101, 38, 1,133, 69, 39,180,176, 97, 57,251,124, 84,251, 62,237,210, 19,221,207, 77,158, 11, 87,
-179, 40, 73,115,120,248,202, 74, 23, 59, 84,130,141,101,163,226,249,227, 54,245, 72, 2,169, 88, 49, 44, 65,125,183, 40, 11, 38,
-121, 37,151,106, 1, 31, 69,167,156,113, 69, 24, 49,119, 66,136, 54,134, 23,153, 3, 59,130,127, 22,179,170,253,188,117, 46, 60,
- 83, 76,168,143, 28,139,218, 14,223, 46,233,230,230,105,231, 64,223,246,250,106,178,149,140,238, 37,130,237, 45, 56, 26,148,103,
-223, 43,102, 41,113, 50, 91,202,218,254,116, 54,146,249,120, 93,116,186,112,133, 61,106,165,206, 53, 3,153, 48,174, 75, 17,100,
-185, 16,102,178,159, 0, 39,123, 5,253,109,140,160,139,209,251, 98,180,125,161,123,156,196, 92,141,131,180, 92, 53,248,207, 19,
-131, 77, 66,131, 43,211,145, 64, 10,129, 36, 1, 77,137, 90, 43, 35,118,110,137, 42, 49, 70,134, 90,232,179,178,234, 87,108, 98,
-152, 18,231,116, 47, 79, 46, 60,134,189,155,167, 14, 98,246, 83,153,125,238, 34,139, 14,163,148,233,123, 75, 20,106,169,148, 90,
-217,141, 3, 37,231,105, 26, 16, 66, 64, 99,164,150,226,170,121, 99, 40,132, 16, 72, 53,161,170, 12, 46,164,107,187,250,148, 58,
-186,104,226,140, 25,152,163,116, 34, 72,191, 34,151, 72, 41,133, 33,143,166, 31, 41, 54, 9,111, 96, 28,141, 9,173, 22, 96, 38,
- 93,240,226,159,173,216,151,249, 54,158,174,138,114, 18,133, 46, 41,235, 8, 39, 46, 8, 9,117,126,203,165, 46,246,193,107,191,
-242,143, 5,189,107, 25,154, 34, 86,168,179,143,233, 83, 21,186, 20, 73, 43, 99,126,111,115, 53,175,159,199, 42,118,190, 15,238,
- 5,214,170, 28,231,202,122,132,131, 26,232, 37, 16, 82,143, 92, 23,228, 27, 2,242, 7, 35,242,209,103,224,218,159,128,240, 3,
-182, 35,222,252,127,176,251, 63,225,193,231,208, 87,182,240,210, 26,190, 18,224,254, 72,221, 20,187,153,227,243,190,160,115,241,
-110, 50,210, 86,185,235, 66,125,158, 4, 41,113,126,247,187,246,201,240,150,162,180,194,236, 99,245,186,255,228,215, 89, 56, 63,
-143,222,252, 97, 78,209,126,236, 62,186,168,173,206,208, 47,201,222,165,122, 71, 79,163, 34, 37, 11, 10, 9, 93, 48,161,207, 81,
-176, 14,206,211,138,100,140, 86,208,127,231,101,228, 82,111,127,137, 85,244, 46,208,179, 76,197,196, 22,242, 32,219, 15, 54,120,
- 27,114,210, 89, 40,203,213, 71, 16,126,218, 68,226, 15,131,209,107, 54,174, 55,216,121, 83,120, 90,224, 97,177, 46, 42, 84,216,
- 96,182,183,195,232,241,171, 98, 94,247,195, 8,231,254,154,175, 34,124,244,216, 78,167, 87, 11,156,237, 8, 7, 2,199,149, 85,
-168, 12, 3, 72, 82,250, 32,164, 67,136,103, 32, 55, 5,186, 14,126,228, 25,248,222,119,194,149, 39, 96, 56,133, 55,239,192, 75,
- 15,208,159,188, 71,189, 89,144, 39, 35,225,253, 10,215,253, 85, 63, 3,238,136,197,191,173, 51, 60, 29, 97,221,153,247,254, 93,
- 21, 62,244, 78, 88,191, 31, 54,183,224, 36,192,189,140,222, 83,179,218, 61,145, 88,191, 81, 57, 42,202, 46,193,214,223,103,149,
-121,160,211,194, 56,150,194, 72,145,153,188, 37,111,131,219,156,173, 40, 50, 29,248,161, 5, 46,244,193, 4,112,235, 72,184,214,
-195,123,123,120, 78,145, 39, 43, 28,158,192,193, 11,208,127,135,165,197,133, 4, 28, 66,247, 36,200, 17,108,191, 2,103,255, 45,
-188,246, 73,248,226, 10,253,210, 13,244, 65, 65,135, 29,245,246,142,242,198,150,237,160,156, 39, 60, 81, 45,184,178, 91,124,252,
-183, 24,225, 78,228, 56,155,144,141,126,200,137,182,216, 79,155, 52, 4,157, 57,224,131,238, 39,123,197,198,205, 14,179,224,110,
-172,179, 10, 90,196,185, 4, 75,218, 73,181,189, 39, 85, 38,222,185, 15,117, 76,175,224,175, 87, 82,245, 61,190,191,206, 69, 73,
- 81, 88, 43, 12, 45,183, 96, 74, 64,210,249,148, 12,243, 56,120, 9,117,232,130, 32, 18, 73, 98,162, 54, 45,213,133,108, 86,156,
-181,218,254, 94,125, 26, 48,248,152,123, 17, 75,190, 7, 78,137,173,115,246,170,157,100, 22,197,142,126,174,164, 22,106,179, 16,
-135,202,130, 93,174,139,184,209,198,110,151,118, 17,241,135,109,154,130,200, 82, 59, 48,187, 11,154, 20,168,125,175,221, 66, 62,
-201,222,158,219,214, 18,210,152,252,162,251, 68, 57,153,145,189,242, 54,204,119,189,160,168,147,133, 80,238, 34, 94,182,157,177,
- 23,237,114,181, 9, 9,221,166, 22, 83, 98, 21, 19, 33, 90,134,103,241,142,123,212, 74, 29,243,100,228, 86,170,217, 19, 67, 71,
- 46,133,206, 87, 40, 65,228,130, 13, 79, 46, 44, 36,246,163, 90, 13, 44,228, 83,161,133,114, 63,138, 93,180,181, 86, 52,206, 14,
-154,234, 2,200,237,144, 25,119,219,233,245, 12,205,187, 30,130,191, 63, 70, 30,181, 21, 83,182, 77,174, 79, 57, 81, 53,242,103,
-140,164,152,233,186, 68, 74,137, 24, 35, 41, 70,143,250,141, 38,142, 44,182,111,239, 82,154,160, 58,185, 20, 70,135,216,104, 67,
-203, 54, 76,186, 8, 53, 38, 67,220, 6, 91, 95,215, 90, 73, 79,118,214,153,131, 5, 89,181,136,196,138, 78,196, 39, 17,143, 7,
-237, 39,207, 8,250,198, 14, 61,205,200,165, 72, 76, 74, 26,117,250, 48, 73,173,196, 92, 57,192, 2, 20, 30,102,101,231,123,167,
- 20,224, 48, 42,199, 69,185,146,149,163, 18,233,250, 21,225, 70, 36,188, 67,225,163, 32, 31, 89,193,251,142,224,218,215,193,193,
- 15, 64,248, 54,168,199, 70,200, 58,255, 49,216,254, 18,122,235, 20,190,216,193, 87, 78,224, 86,134, 71,163,129,100,234,136, 90,
- 48,251,158,164,115,202,199, 85,157, 37,189,109,165, 32,179,135,167,197, 24,180,225, 13,213, 80,183, 68,255,119, 90,237,146, 83,
-152, 70, 98,101,202, 36,152,139,249,164,242,144, 57,117, 44,137, 53,204,211,135,194, 11,183,244, 16, 86,201, 14,124,196,210, 49,
-143, 18,114,220,217,165,234, 56, 34, 81, 45, 87,252, 78,177, 91,194,183, 31, 19,190,254, 4,158, 58,180,219,209,232, 97,237,197,
-105, 52, 99,134,156,209,187, 3,122,223,119,229, 77,104,113, 28, 97,179,130, 77,239, 9, 51, 10,167, 25,182,163,123,232,252,214,
- 94, 21,238,143,150, 86,166,254, 23,192, 10,190,108, 60, 11,118,231,151,159, 85,176, 19,229,216,151,198,159,222,217,107,253, 84,
-103, 39,206,195, 12, 55,160, 63,173, 92,121, 45, 83,171,144, 18,200, 46,160, 33,194,191,114, 5,249,163, 55,224,169, 19,107,139,
-111,223,129, 79,191, 5,191,249,200,186,239, 71,217, 60,240, 7, 6,129,209,151, 3,108, 21,185,158,224,125, 43,120,102, 5,207,
- 94,130,171, 55, 96,243, 0,238,158, 27, 32,231,139,111, 66,249, 42,220, 42,118,145, 57,207,200, 58, 65, 81,228,178, 16,179,114,
-242,198,192, 78,149, 44, 98,186, 66,239, 88, 90,120,136,122, 39, 95, 23,251,191,165,159, 55, 44,243, 27, 26, 52, 40,216,243, 30,
- 81,186, 2, 49, 10, 97, 21,237,159,190, 35,172,122,184, 17,225,131, 35,242,244, 19,134,181,237,191, 17,214, 31,183, 85,131, 68,
-159, 5, 87, 40, 3,122,250,223,195,221,191, 15,111, 10,188,114, 21,190, 12,245,230, 14,221,141,212,243,145,114,115,100, 87,148,
- 97,229,221,158,206,151,204,230,177, 22,223, 91, 75, 50,171,143, 97,121, 61, 18,116, 82, 77,203, 98, 15,204, 84, 88, 27,241,172,
-237,225,219,122, 66,208, 9, 27,187,164, 31,139,143,178,167, 76, 4,167,118, 93,180, 84,103,239,116,163, 71,173, 78, 23, 0, 49,
-238, 69, 66,167,240, 22, 29,173, 0, 31, 40,156, 45, 50, 33, 22,227, 68, 19, 88,201, 62,105, 43, 6,131,207, 72, 45,174, 82,103,
- 10,143,106,130, 60,173, 70,156, 91,251, 69,163, 20,139, 83, 94,246,167, 45, 53, 75, 85, 41, 11, 69,119,139, 71,142, 11,245,120,
-184, 64, 94,147,230,253, 95, 50,232,117, 63,169,188, 17,207,178, 95, 86, 38,143,250, 66,133, 80,153,125,235,178,184, 80,244, 23,
- 80,224,117, 65,190, 92,150, 58,245,115,184,121,237,117,154,198,202, 62,199, 93, 23,248,220,197, 20,129, 11, 56,119, 46, 92,106,
- 91,162,228,172,146,183,131, 48,138,176, 10,198, 79,183,145,122, 32,186, 85,122,172,202,160,133, 96, 59, 42, 63,167,179,117,239,
-126,233,138, 93,111,147,163, 90,140,149, 80,205,138, 70, 8,179,250,114,159,209,249,182,113,102, 42, 51,196, 69,104,197, 54,122,
- 7, 47,132,148,246,124,254,187, 97,100,216,237,208,156,125,210, 22,140, 18,234, 59, 87, 21, 72, 33, 16, 82,240,159,175,101,114,
-148,105,169,213,106,105, 46,149,161,100, 82,140,116,169,163,235, 58, 43,242, 49,209,133,200, 65,223, 35,190, 78,218,229, 76, 46,
-217,156, 78,181,112,190, 57,183,241,127, 54, 5, 76,169,197, 58,244,102, 3,116,197,113,136,145, 68,176,145, 82,187, 21,166,133,
-218,116,218,195,184, 88, 67,220, 66,206,253,129,205,157, 29,131, 8, 39, 91,123, 17,123,143, 62,220, 72,129, 80, 57,146, 22,143,
- 41,156,169,176,243,204,220,203, 90,185, 49, 84, 46,145, 72,215,214,132,143, 4,228,123, 10,124,211, 17, 60,249, 33, 56,248, 54,
-232,126, 39,200,123, 77,229, 91, 43,212,155,176,249, 57, 56,255,135,176,249, 60,250,250, 8, 95, 57,132, 55, 42,220, 25,225,180,
- 80,115,158,110, 75,230, 25,115,187,214,162, 64, 91,151, 45,237, 52,152,176,109,210,205,159, 70,209,184, 31, 62, 88,227,158, 2,
-180,133, 71, 75,110,170,225,106,129, 55,237, 81,170, 70,135, 17,153,205,185,234, 17,126,225, 32,248,161,111, 99, 10,233, 2,178,
-138,200,229,128, 28, 37,228, 48, 88, 7,124, 24,152, 60,124,125,176,127, 78, 43,188,178,179,177,248,123,122,228,119, 92,129,167,
- 14,102, 19,189,170,177,220, 31,142,232,121,134, 71,150, 44,199,221, 29,250,208, 59,244, 3,219, 45,201,221,132,108, 42,114,154,
-225,216, 47, 63, 15, 43, 58,229, 79,122, 20,154,211, 67,204, 74,102,251,242,240,116,176,238,120, 0,206,133,122,154,209,123,133,
-112, 46,200,161,204,185,156,111,100,235,224,175, 38,120,223, 33,220,207,240,230, 22,158,128,248,206, 74,124, 54,194,175, 91,244,
-169,252, 91, 79,193,251,175,217,101,228,141, 71,240,218, 22, 62,183,129,219,131,189,222,151, 10,114, 89, 9, 15, 10,250, 85,165,
- 62, 97,165, 67,158, 95,193,187, 86,240,196, 26,222,117, 4,215,158,182,240,150,221, 93,139,200,187,189,131,135,213, 30,196, 36,
-134,159,125,111, 71,120,103, 64,239, 6,184, 63,160,215, 43,235,161,114,245,110, 49, 74,148,111, 32,202,130, 38, 72,181, 86, 40,
-102,243,221,182,238, 41,122,250, 94, 59, 91,146,107, 5,251, 96, 98,177,228, 35,250, 24, 35,241, 48, 18,214,129, 16, 58, 98, 88,
- 33, 79,172,224,249, 1,121,250, 89, 56,250, 55,173, 67, 15,151, 32, 28, 65,184,108,223,161, 60,130,205, 63, 68, 31,253,143,112,
-231, 54,220,185, 2,183, 34,122,115, 68, 31,110,169, 12,232,249, 64,189, 59, 48,170, 80, 86,182,143,148,234,244, 62,194,228,189,
- 14, 18, 45, 37, 49,202, 36, 18, 8, 75,236,113,176, 85, 72, 89,236,120,165,169,185,151,140, 6, 23,136,181,244, 47,169,243, 65,
-186, 36,137, 73, 89, 70,140,218,184,127,137, 46, 45,158, 83,222, 20,241,163, 31,127,193, 45,105,154,196,121,219, 13,231, 58,111,
- 63, 87,201,198,228,131, 66,149, 48, 33,165,117,193,112,105,251,246, 78,103,188, 52, 50,119,180,109, 12,155,139,175,213,194,156,
- 69,176,138, 86,200,238,251, 1, 45, 11, 49,158, 76,252,237,150, 60,201, 20, 55, 90,177, 44,241, 4,108,116, 86,228, 79,212,184,
-198,151, 95, 12,190,195,162,195,180,100, 59,159, 36,176,100, 93,232, 94,108,123,123, 93,155,254, 38, 46,196,108,157, 31, 67, 89,
-247,169,110,203,108,244,198, 28,176, 49,178,236, 69,127,234,226, 82, 22,189,160, 23, 30,239,202,121,187,252,239, 11,191, 39,197,
-104, 5, 47, 68,159, 28,138, 71,149, 54,133,191, 21, 45,245, 15, 89,157,198,167, 30, 78, 35,106,131,199,148,208, 24,168,217, 26,
-170, 28, 64, 71,195,121, 7,145, 9,143, 59,229,192, 47, 0, 73,179,185, 79,247, 35, 78,171, 78,202,117, 9,166,175,144, 69,151,
-174,170,140,217,212,232, 53,103,150, 15,175,249,220, 61, 43,222, 39, 64, 13,104, 99,211, 53,220,175,238, 60, 5,132,170, 78,157,
-244, 53,245,168,149, 84, 70,226,104,157,123,159, 58,250,190,103,213,117,244,169, 35,166,196,110, 28,201,121, 52,183,212,241, 9,
- 67, 57,100, 55,236,236,223,229,209, 70,254, 45,149, 78,194,116, 65, 75,237,234, 23, 69, 56,112,245,251, 52,214, 90,160,250, 66,
-244,236,232, 90,209,123, 35,111,102, 91,157,214, 77,229,168, 55,177,144,160,236,138,141,200, 82,128,117, 23, 56,140, 29,135, 39,
-145,235,231,153,124, 54,112, 37,195,250,228,128,240,194, 33,242,167, 10,124,248, 26,156,252, 48,244,255, 34,132,103, 45,146,178,
- 69, 57,149, 83,208,155,176,251, 36,156,253, 12, 12,175,160,183, 10,188,210, 91,231,245, 48, 27, 40,133,130,250, 41,210, 0, 39,
-226,170, 13,117, 35,120,227,224,139,170, 47,250,124,116,188, 18,199,144,202,158,170, 69,116,161,153, 92, 46,203, 9, 11,150,121,
-107,133, 22,114, 82, 89, 64, 30,130, 76, 93,126,232, 5, 14, 34,116, 66, 88, 71,147,123, 31, 4,228,146,167,166,173, 34, 28, 38,
- 59,117,218,213,191,217, 22, 2,112, 82,225, 56, 34, 71, 9,110,172,145,203,107,211,233,158,102, 99, 84,142, 25,125,115, 64,239,
-156,193,131, 1,189,183, 67,111,102, 67,252, 13, 10, 71, 32,151, 34,218, 69, 84, 11, 50, 84, 36, 41,194,202, 94,179,131, 41,255,
-113,206,212,212, 96,133,112, 19, 9, 59, 63, 17, 91,129,116,165,148,228, 96, 95,127, 61, 23,191,233,228,126, 4,220,170,214, 73,
-191,183,183,204,239,195, 17,182,110,190,255,161, 67,248,208, 85,251,190,175,159,195,107,231,232,103,182,240,112,132,203, 10,183,
- 54,200,189,140,174,162,125,173, 43, 61,242,237,107,120,225,192,108,120,103,213,104,176,247,119, 38, 8,188,247,101,187,168,245,
-201,126,254, 19,191,124,180, 7,114, 21,237,181,122, 40,200,218, 35, 69,182,129,122,216,177,122, 88,185, 52,154,247,126,231, 7,
- 71,245, 38, 32, 72,179, 32, 9, 73,103,149,111,231,110,193,117,116,167,130, 88,176,137,233, 72,197,242,150, 87,209,196,112,135,
- 29,225,160, 35, 92,238,225,125, 17, 62, 84,144,247, 62, 9,135,255, 50, 28,125, 28,194, 21, 79,113, 11,150,195,190,253,101,244,
-225,127, 1,119, 94,133, 91,135,240,224, 58,220, 83,244,246,128,222,222,162,155, 17, 61, 31,209, 71,153, 58,130,244, 74, 10, 50,
- 91, 44,125, 38, 62, 33, 79,163,225, 89,162, 39, 38, 78,197,175,122,224, 72, 89,110,168,236,112, 13, 77,228, 41,179,133, 83,147,
- 71, 10, 55,206,131,119,160, 41,206, 54,184,166, 43,104, 7, 97, 81,221,203, 75,104, 60,136,165, 80,108,250,189,110,251,138,227,
- 12, 33,145, 32,147,170,187,250,101, 42, 53, 98,165,226,201,110, 30,186, 49,173, 14,230, 96,153,214,245, 38,111,111, 67,235,198,
- 61,110,181,182,247,119, 18,243, 10,125,180, 59,233,110, 17,135, 28,218, 97, 77, 91,151, 9, 33, 90,103,154, 17,134,106,163,220,
-118,110,102,220,221,163, 58,165,136,233, 34,229,177,173, 53,226, 36, 22, 83,127,207, 46, 20,216,182, 91, 95, 22, 85,149, 61,121,
-208, 18,126,213,108,123,121, 97, 85,219,243,103, 47,134, 27, 23,131,224,154, 78, 34, 94,132,144,234,190,253,109,143,207,161,109,
- 37, 97,207, 60,206, 73,143, 33, 78,138,254, 38, 59,172,165,184,213,111,174,188, 51, 31, 97, 47,228,140,168, 66, 10, 1,233, 18,
- 37,207,152,241,162, 74,206, 35, 57,231, 41, 98, 86, 22,160, 16,213,199,111, 30,109,202,210, 94,103, 9,129,228,163,127,183,225,
-236, 41, 26,179, 8,195,104,141,162,104,155,212,186,221,109, 10,100,169, 86, 27, 48,126, 75,219,155, 75,140, 19, 52, 41,151, 66,
- 41,251,130,203, 82,109,245,147, 67, 37,213,202, 88, 10,197, 45,109,187, 49,211,117,153, 46, 6,142,186,142,176, 62, 96, 40,133,
- 49,143, 28,212, 74, 56, 58, 50, 42, 94, 8,164, 24, 72,126, 97, 42, 90, 25, 75,102, 44,133, 84, 29,215,113, 20,204, 7, 29,167,
-187,141,206,226, 22,117,145, 92, 18, 56, 47,156,109, 10,111, 84, 24,138,249, 41,111, 4,187, 33, 30, 69,216,121,202, 65, 95, 33,
-105, 36,252,240,117,210, 31,186,194,193,159,127,141,114,167, 34,207, 28, 34,127, 48, 33, 63, 88,224, 93,223, 2,235, 31,181,168,
- 72,137,134,183,212,211, 57, 65, 75, 31, 65,254, 34,156,254, 18, 12, 95, 67, 31,156,193, 87, 19,220, 46,112,199, 11,186,227, 28,
- 77, 30,107,169, 78,226, 45,133,214,133,239,166, 42,146, 23,243,164, 3, 65, 86, 9, 89, 41,212, 56, 49, 92, 85,231, 2, 45,117,
- 65,153,155, 76,162,134, 48, 21, 89, 48, 28,179, 71,249,245, 45, 50,212,126, 22,233,196,187,110,111,223,150,191, 62,104, 62, 39,
-117,131,182, 7,174, 55,234, 13, 46, 86, 27,125, 30,167, 98, 81,167,207, 88, 48,136,222,223,217,226,119, 87,225,171, 91,234,173,
- 45,220,223,160,183,119,214,225, 62, 28,144, 71, 70, 44,146, 8, 60, 10,232,198,216,233,114,201, 95,147,243,130, 30,102,219,177,
-119,254,243, 81,231,211,112,180,221, 57,199,157,245, 55, 67,129,135,234,168, 89,191,237,106, 50,165,219,206,215, 3, 62, 27,212,
- 67, 65, 86, 98, 93,126,174,112,176,130,167, 59,184,148,173,240,199, 4,215,122, 27,239,223,220,218, 68,225,229,209, 2,117,142,
- 20,190, 52,160,159, 26,144, 33,195,211, 61,242, 29,199,200, 55, 31, 33,151, 86,112,210, 91, 17, 7,155,195,238, 92,229,118,234,
-235,135, 52,218,195,248,238, 35,184,190,131,211,157,193, 0,206, 2,108, 35,114,167,162, 37, 18, 46,117,112,211, 91,202, 19,229,
-104, 59,176, 14,198,240,182,131,200,138,228,232,155,133,157,103,222,139, 23,150, 54, 76, 89,161,244, 85,233, 86,209,114, 17, 82,
- 32,116, 29, 97,149,144,147,158,112, 45,193,211, 9,121, 26,219,249, 63,217, 33,151,159,131,254,247,192,250,219, 12,103, 44, 43,
-200,111,193,246, 23,225,236,127, 65,239,127, 1,238, 31,193,221,167,225,243, 25, 61,223, 64, 45,212,135, 5,125, 56,162, 37,219,
-251,131, 32, 7,166,116,158, 66, 12,235,156,127,149,196,144,171, 76,157,163, 76, 98,181,234, 85, 49,103, 3, 0,181, 1, 93,112,
- 97, 93,240,207,117,151,246,193, 2, 37,248,134, 71,102, 85,245,162, 25,158,212,213,170,109, 47,121,129, 73,190,215,185,250,224,
-204, 63, 98, 59,223,165,199,101,162, 89, 89, 72,204,196, 34, 11,251,153,197,106, 30,244, 16,166, 40, 21,161,238,171,175, 9,211,
-238,187,122,170, 92, 23,196, 35,139,133,224,121, 19, 13, 22,147,253,163,221,139,253,236,121,143, 12,167,251,202,113, 21, 6, 23,
-212,141,174,162, 46,139,224,245, 82,155, 70,193, 59,201,176,240,124,233,108,143, 83, 23, 37, 44,139,116, 93, 92,130,150,170,245,
-186,192, 49, 46, 11,189, 94, 96,199,183, 21,201, 99,133,120,249,218,214,121,188,177, 92,141, 60,102, 93, 91,224,200,151, 28,247,
- 32,145, 24,141,152,150,156,170,150,157,123,144,181, 78,234,251,170, 13,170,226,110, 10,153,121, 0,147,234, 88,102,128, 76,240,
- 93,119,232,146,167,126,150, 89,197, 95,242, 4,207,178,137,145, 92, 64,216, 94,208,233,203,227,126,254, 20,162, 21,223,182,122,
-154, 64,236,206, 17, 24,182,104,246, 85, 77, 10,251,126,125,103, 17,132, 96,194, 55, 17, 39,198,117,157,237,219, 9,126, 17,197,
-179, 2,116,226,202,171, 95,162, 67,136,196, 16,173, 48,167,206,112,183, 49,210,117, 29,171,152,232,251,158, 46,173, 88,165,142,
-216,173,204,255,224,235,221, 90, 70,170,119,251,155, 97,112, 17,159, 78, 65, 72,105,141,218,200, 80,148, 88,230,107,115,171, 89,
- 77, 93,105,137,116, 5,125, 88,185, 51,216,104,170, 96,100, 51, 85,120,106,109, 34,187, 90,205, 71,125, 16, 64, 98, 15,111, 5,
-248, 75,103,112, 51, 18, 63,122, 12, 63,156,225,163,192,181,239,131,245,127, 2,233,134,217,143,244,209,226,241, 77, 80, 31,194,
-248, 69,120,244,179,176,123, 29, 78, 31,192,215,146,117,126,247, 42,156, 59, 44,165, 57, 84,163, 76,234, 77, 19,186,217,216, 77,
-170,162,217,219, 12,193, 10, 77, 23,144,131, 48, 69, 49, 73, 83,175,101,108, 31, 31,188,144,166,105,113,104,191, 14,243,126,158,
-206,137, 52,205,222,119,236, 92,242,132, 1, 93,186,246,245,235,204,142,140,179, 38, 97,154, 59, 14, 10,167, 64, 29,172,139,108,
- 59,234,109, 70,207,189,125, 90, 99,132,151, 23, 21, 62, 60, 34, 87, 15,172,155, 61,233, 96,237,233, 63,159, 62, 71,207,183, 48,
-142,112,111, 71, 61, 31, 25, 93, 36,152,178, 18,118,209,170, 83,103,218, 43, 80,244,188, 34,187,106,151,154,149,120,156,156, 78,
- 28,109,162, 26,128,102,240, 57,244,166,152,114,188,175, 30, 67,233,151,219, 46, 65, 42,246,218,157,154,149, 90,170, 95,104,250,
-100, 15,202,170,115,158,185,216, 68,226,238, 8, 47,159,218,123,121, 54,162, 59, 69, 87, 38, 76,226, 65,181,215,246, 59, 14,224,
-134, 32,207,246,112,121,101,175,197,198,115,130,235,104,151,144,203,157, 59, 50, 28,162,147,177,231,233, 32, 66,249, 48, 28, 62,
-130,131, 55, 97,216,192,209,153, 89,197, 14, 18,114, 22,145,183, 4,222, 97,225, 68,218,239, 8, 93,135,102, 69,118,197,242,192,
-179,162,185,144, 11, 12,131, 78,184, 82, 17,179,109,198, 32,116, 17,219,147,175, 35,225,176, 71, 14, 59,194, 73,132,107, 9,121,
- 42,192, 51, 1,185, 33,232,241, 10, 57, 56,130,254, 25, 8,207,155,131, 35, 60, 9,165,131,225,117,216,254, 4, 60,250, 27,112,
-126, 31,189,119, 0, 55,159, 49,245,254,189, 17,125,101, 75,205,197,133,151,117,142, 2, 12,254,156,103,166,100,196,170,222,113,
- 72,153, 96, 8,161, 21, 88,215,130, 84, 79,167,170, 85, 38, 24, 74,113,149,184,101,163,155,223, 60,186, 61, 45,234,140, 49, 54,
- 21,174,123,189,235,220, 1,230,133,181,205, 38,252,173, 19,223,111,153, 90, 65,207,162,123,227,218,246,171,213, 98, 39,186, 23,
- 28, 66,157, 62, 58, 80,109,173,209,236,110, 90,124,221,208, 44,120,115, 78,183,138, 19,184,196,188,235,179, 61, 53,144,168, 4,
-181,149,138,132, 64,168,213, 1, 67,246, 94, 7,173,211,223,105,162,148,181, 24, 21, 23,168,237,234,140,175, 13, 33,208, 7, 33,
-187, 80, 76, 22,110, 10,157,186,200,186,232, 30,101, 22,201,181,245,132, 79, 89, 42, 74, 21, 23, 4, 46, 80,188, 75,246,254, 84,
-108,125,130,209,172,176,181,217,246,218,126,254,226,220, 92, 46, 48,222,127,187, 28,139,139,127, 76,141,140,214,133,232, 9,104,
-113, 26, 61,131, 21, 25,173,118, 17,106, 1, 86,197, 83,198,180,182,149,143,236, 69,133,202,254,255,153, 96, 51, 81,132,174, 51,
-203,151,230,178,184, 8,185,245,216,127,240,224,152,217, 9, 20,118, 81,173,191,200, 25,111,207, 88,112, 7, 74, 35, 15, 70,119,
-163,168, 24, 13,110, 24,179,141,250,155, 29,198, 29, 36,136,184,248,212, 84,250, 49,218,197,160,234,130, 44,160, 70, 3,237, 82,
- 71,231,130, 56, 66,176, 90,153, 71, 7,159,205,170,196,198,160,111, 17,171,187,113,228,108,183,163,158,157, 82, 9,214,125,143,
- 35, 73,132,227,131, 67,174, 28,159,112,114,114,153,148, 58,106, 45,108,117,199,237,179, 71,108,206, 78, 45,161, 48, 4,210, 90,
-172,168, 71,117,107,145, 46,253,216,182,103,115,160, 14,100,216,237, 42, 55, 71,211, 32,137,216, 25,127,123,180,179,245, 10,202,
- 73, 85, 98, 22,250,245, 1,242,220, 9,124,139,192,229,115,248, 3,131,141, 29,175, 61, 15,235,127,207, 20,190,225,200,252,182,
-228,230,108,117,117,205, 61, 24, 63, 15,167, 63, 1,231, 95,131,221, 45,244, 86,133, 55,131, 37,130,109, 11, 19,175, 51,129,236,
-162,169,213, 61, 77,115,105,142,212,162, 38, 72, 91, 89, 4,159,172, 93,118,223,219, 40,220,138,181, 63,100,217, 17,144,203, 20,
-151,126,241,105, 73, 94,168,215, 10, 43, 7,167,116,237,228,115,219,124,148, 61,136, 3, 89,173, 40,102, 71,141, 85, 31, 9,231,
-140,110, 20,182, 21, 61,171,112, 58, 26,125,173, 40,210, 41,117, 83,172, 11,149,128, 92,139,200,213, 8, 95, 46,200,155, 91,248,
-253,106, 47,219, 87,182,240,142, 14, 93, 21,248, 64,128, 23, 49,198,187, 84,180, 91,120, 72,187,104,157,235,229,100, 33,235, 4,
-116,107,205, 33, 35, 54, 79,173,189, 95,124,218,172, 85,145,218,193,218, 46, 15, 42,190,231,124,100, 63,147,198,246,112, 22,223,
- 59, 10,210, 11,122,172,237, 84,183,145,249,213, 96, 5,246,161,139,221, 6,239,168, 71, 95,127,132,130, 30,131,246,160,135,192,
-224,131,191, 43,157,145, 11,139,162,111,129,188,145,209, 67,208,227, 74, 56,200,246,247, 9, 1,142, 58,184, 22, 76,237, 94,157,
-153,149, 4,210,161,125, 65,201,150,105,126,114,217, 2,103,158,123, 19,206,223,128,187, 59,120,135, 34,103,192, 61,144, 27,137,
-112,174,232,206,184, 9,241,180,218, 5, 98, 80,250,179,202,193,166,152, 86,193,187, 43, 57, 8, 70,182, 58, 12,200, 73, 15, 79,
- 36,228,138,192,147, 1,185,134,175, 26,214,144, 86,208, 61,137,196,119,131, 60, 15,122,205,247,134,175,195,248,105,216,124,198,
-166, 80,103, 91, 56, 63,132, 7, 79,195, 77,181, 91,243,217, 72, 61, 29,208, 33, 83,123,157,165,213, 83,232,203,156,148, 88,212,
- 34, 74,235,130, 21, 94, 28,129,169, 98,111,113,174, 58, 19,183,188,202,235,194, 31,221,238,157,201, 89,217, 73,204,122,214,184,
- 11,237, 66, 16,252,190,171, 23,124,216, 85, 76,116, 43,238,155,202,173,179,214,253, 98,161, 64,168,246,115,197,133,240, 75, 39,
- 64,192, 34,193, 74, 27,121,114,177, 7,158,228,172,208, 69, 33, 84,243, 45, 15, 42,211,238,157,118,169,152,130,224,253,107,180,
-110, 76, 42,157,204,194, 41,105,176, 29, 55,192, 72,109,107, 11,157, 4, 99, 65, 91,130, 91, 48, 64,150,204, 83,157, 32,176,241,
- 73,222, 70,101,242,211,215, 69,186,246,126,124,169,211,223, 60,168,166,238, 13, 2,234, 66, 25,175,123, 94,239,233,124, 94, 0,
- 98,170,238,211, 96,150, 2,190, 36,251,214,195, 73, 27,176,176,157, 93,244,159,179,200,132,151,104,215, 26, 17, 33,134, 64, 8,
-201,119,228, 70, 88,203, 90, 39,130,168, 76,171, 5,247, 82,235,156, 17,176,140,145, 94, 18,109,116, 1,187,105,118,147, 40, 66,
- 23, 12,192,164, 62, 2,175, 19,125,176,145, 16,103,214,185, 44, 5,172,186,152,232, 72,216,251, 59,181, 75, 76, 10, 97,234,166,
- 99,138,142,120, 53,250,224, 56,142,118,129,110, 29,188,204,121,236,180,204, 63, 17,138, 8,165, 20,164,100, 31,187, 39,223,109,
-219,186, 97,187,219, 48,158,219,232,189,186, 98, 32,231, 66,169,213,190, 71,201,115,170, 94,251, 60, 6, 65, 67,176, 63, 83,178,
-217,235,166,232, 85,108, 34,144, 58, 78, 46, 93,226,210,149,171,164,213, 1, 15,199,145,123,183,222, 36,159,157,186, 61, 48,144,
-142,188,182,173,130,137, 50,228,194,195,215, 53,197,118, 18,100, 20,242,185,157, 37,135, 97,254, 48, 94,170,202,225, 89,229,100,
-157, 8,151,215,200, 65,135,188,119, 5,127, 98, 7,223,185,133,120, 5,134,239,134,244,199, 33,124,179, 23,243, 17,107,235,154,
-249, 35, 65, 61,133,242, 50,148,183,172, 67, 63,191, 9,195, 93, 19, 60,189,150,108,135, 94, 93, 5,178,178,226, 40,209, 70,233,
-211,211,218,162,150,188, 59,150, 86,144, 87, 94,128,219,239, 95, 57,241,164,243,125,107,242,147,171,225,180, 84,231,147,164,181,
- 31,157,125, 13,209, 22,190,209,174,253,206,139,173, 94,192,183,213,186,218,161,218,136,251, 44,195,166,154, 48,168, 42,186,173,
-134, 80, 61, 27,209,179, 98,162,143,188,240,208, 39,199,171, 14, 62,230,201,145,112,210, 89,135,253,106, 33,126, 26,120,225, 4,
-190,186,129, 87, 54,240,177, 21,188,175, 67, 46,117,232,203, 10, 95,174,196, 7, 74, 24,108, 5,160, 39, 9,174,118,112,185,179,
-124,164,131,104,133,190, 93, 88, 54,192,186,216,114,184,154, 34,122,154, 78,104,130, 67, 69,162, 32,199, 17, 61,173,176, 45,246,
-117,165,162,155, 2,143,252,232, 73,246,250,132,236,151, 43, 21,184,151,109, 60, 30,125, 18, 81, 5,174, 9, 92,141,176, 41,232,
-105,181,191,107,239,239,209,145,243,115,183,192, 93, 15,151,201,190,228, 59, 23,228,161,247, 99, 7,110,219, 59,216,185, 22,225,
-220,253,222, 43,180, 7, 57, 28, 64, 62, 5,219, 83, 15,159,191, 14,253, 31, 7, 62, 4,233,111, 67,121, 19,142, 30, 34,249, 33,
- 58,238,160, 14, 72, 30,144,172,134, 19, 30,124,106,178, 3,182, 2, 15, 20,206,100,158,111,246,254, 51, 92, 22,155, 76,156, 68,
-207, 90, 95, 67, 56,129,244, 52,196,103,160,255,152,197,175,202,145, 65,115,182,191, 0,187,127, 2,103,111,160,167,231,176, 9,
-112,218,195,233,161, 77, 40,182, 59, 56,171,212,157,101,155,214, 97, 68,163,175, 97,134,108, 58,130,232,113,241, 91,179,102,101,
-156, 23,238,235, 2,173,144,139,237,121,219,199,165,137,182,106, 85, 87,176,235, 36,134,106,141, 82, 66, 77, 56, 85,101, 66,223,
-138, 40,161, 92, 40, 28,117, 14, 9,209, 37, 65, 12, 93,116, 91,214, 44, 84,239,240,171,119,196,180,244, 46,159,254,165,186, 36,
-165,205,240,147, 42,115,100,153,248,208, 40,133,121,223, 25,171, 19, 26, 69,232, 4,196,247,139, 89,149,161,154, 69, 74, 68,109,
- 61, 39, 58, 29,248,161,249,239, 85,201, 85,167, 29,190,234,156,107,142, 83,240,204,210,103, 95,191,138,237,197, 11,179,230,104,
-244,206, 93, 93, 77,254,160,194,153,119,214,213,167,134,121,207, 6,215, 84,230,205, 91,191,132,166, 56,224,107, 15,127, 43,123,
- 24,141, 37,252,103,233,127, 47,178, 63,117,174,139, 83,117,229,125, 69, 88, 36,121, 77, 5,126,210, 10, 44,246, 46,222, 77, 39,
-137, 19, 76, 69,188, 88,205,137,101, 54, 14,207,165,236,101,183,139,187, 8,204,229,160, 11,177,181,139, 50, 69, 22,153,240,243,
-127,219,139,131, 21,136, 90, 9,105, 53,143,221, 23,184, 93,212,192, 48, 83,218,156, 78,115,129,125,200,207,226,134,163,170,211,
-235, 30, 93, 28,103, 64,152, 52,113, 35,170, 10,195, 56, 80, 70,243,150,167, 24, 32,122,168, 75,169, 83,145,159, 12, 17, 90, 13,
- 56, 35,129,172,202,102,187,101, 28, 71,219,151,215, 74,201,153,210, 2, 90,166,105, 64, 68, 67, 52,101,124, 41,211,206,106, 10,
-232,145, 96, 62,244, 92, 60,240,204, 39,131, 97,246, 63,140,227,142, 59,183,111,114,251,206, 45,255,254, 22,146,214,210,244, 10,
-144,142,124, 85,190,198, 98, 48,151, 47,113,112,177, 66, 12,129,176,238,136, 53,114,242, 76,199, 11,119,183, 60, 58, 43, 72, 85,
-214, 69, 57, 14,129,213,122, 77,124,231, 17,242,241, 8,223,188, 67,222,119, 6,215,159,131,250, 39, 33,254, 33, 56,120,202, 31,
-235,193,247,230, 46,101,209,222,162, 35,235,151, 96,248, 5,168,107,216,126, 1, 54,119, 96,120, 4,103,143,208,183,162, 29,102,
-163, 23,215, 67, 31, 49,186, 61,219, 72, 96,213,119,213,177, 93,171,103,193, 87,114, 84, 93, 31,109,239,126,232,162,169, 3,143,
- 56,235, 13,206, 98,113,155,243, 50, 79,229,235, 21, 0, 0, 32, 0, 73, 68, 65, 84,203, 94,120,223,123,231,226,190,166, 96,183,
-154, 51,179, 45,144, 49,111,247,121,177, 34,117, 94, 77,196,244,168, 90, 62,249,198,195, 34,212, 14, 96, 69,169, 67,165,110, 43,
-117, 44, 12, 62, 34,181,189,162,117,233,186,243,124,241,149, 5,105,116,119, 11,125,180,245, 0, 15, 10,252,211,129,248,117, 43,
-248,150,206,162, 81,191,116,110, 80,150,156,225, 3,157,177,219, 63, 23,144, 71,126,251,186,150,224,160,179,163,164, 15,200,245,
-149, 41,244,175, 36,228,200, 25, 85,186,152, 58,244, 14, 18,168,254, 54, 5,177, 36, 25, 2,114,160,232,105, 65,135,236, 80,145,
-104,251, 93,166,214,201, 46, 31, 21,120, 75,225, 74,130,119,245,240,153, 17,174, 68, 3,197,188,190,133,109,161,158, 85,184,239,
- 2,152, 43,209,225, 70,209,110,166, 99,133, 65,108,154,161,158,233, 43, 17,185,226, 33, 40,215, 77,223,193, 23,183,182, 75, 94,
-169,173, 64,174,244,232,229, 4, 47,100,164,127, 96,227,253,163, 4,221,155,176,250,113,195, 10,111,158, 2,253, 48,132, 83, 72,
- 61, 18,119, 46, 74,116,235,158, 12,136,110,161,110,161, 62, 2, 61,131,225, 28,134,193, 82, 62,196, 95,167,110, 13,105,109, 59,
-241,248, 14,144,167,161,123, 15,252,255,116,189,217,179, 37,217,117,222,247, 91,123,239,204,115,238, 84,115, 79,213,232, 9, 3,
- 1,130, 0, 65,144, 20,105,138,146,104,153,150, 44, 59,100, 59, 68,234,193,118,132,195, 47,140,144,159,236, 71,251,145, 79,142,
-240, 63,224, 7,135, 31,236, 7, 7, 67,180, 77,155, 14,153, 14,112, 16, 1, 73, 4, 45,145, 24, 9,128, 32,134,106,116, 55,170,
-199,154,110,213,189,247,156,147,153,123, 47, 63,172,181, 51,247,185,213, 68, 68,161,167,170,123,239, 57, 39, 51,215, 94,107,125,
-223,239,235, 94,132,254, 54,196, 43,182,210,200, 23,176,253, 38,108,126, 11,206,191,130,222, 27,225,199, 61,188,219,163,239,140,
-232,147,115,116,227, 15,194,232,235, 17,197, 14, 13,131,191,246,161,160,143,252,239,163, 77,160,114,182,113,241, 38, 91,244,231,
-164, 74,206,194,152,153, 99, 78, 75,171,100,111, 10,110, 77, 76,139, 77, 44,104,213,101,182,222,252,200, 62,194,147,178,124, 93,
- 65,231,196,192,210,242, 26, 92, 48,215,137, 43,149,115, 45, 50, 46,150,194,236, 99,169, 10,213,130, 21,237, 88,143, 6,209,191,
-102, 97, 14,176,232,130, 33, 88,167, 98,197,180, 22,198, 92, 20, 13, 66, 87,247,150, 89,231,196, 46,117,113, 82,231,173,190,186,
- 10, 63,212,221,183, 46, 61,180, 22,157, 87, 24, 26, 23,181,121, 86,246,250,217,208,164,170, 21, 89, 68,107, 45,238, 86,102, 22,
-221,146,191,158,170, 0,209, 99, 68, 67,179, 95, 69,108, 85,168,243, 60, 93,247,226, 90,139,239,221, 91,188,233, 83, 10,244,230,
- 51, 8, 18,102,225, 88,231, 27,175,209, 59,226, 82,121, 24,178,172, 43, 77,212, 27,231,144,173,218,157, 70,177, 80, 19,196,210,
-199,114,241,247,184, 24,246,180, 22,203, 42,118, 43, 37,207,211,135,118,188,190,100,249,233,124, 48,144, 38, 22,119, 65, 14,155,
-183, 61,198, 8, 49, 81,198,237,178,150,104,198,231,178,151,235,254,148,155,126, 6,203,208, 70,175,170, 21, 71, 43,234,102,101,
- 19,183,162, 77,192,110, 55,146,199,145,104,121,228, 16, 2, 99, 49, 46,116,125, 79, 98,144, 57, 26,118,114,232, 75, 81,236,112,
-227, 7, 98, 9,193,215, 20, 70,146, 83, 89, 88, 10,190, 16, 34,166,158, 41, 38,202,176,243,231, 90, 35,116,172,168, 91,177,206,
-188,157,166, 89, 62,140, 52, 89,236,186, 63,206,247,201, 66,186,174, 74, 18, 33,244,193,229,249, 13, 5,194,239,250,176,238,136,
- 71, 43,228, 87, 14, 72, 31,239,184,245,223, 63,224,250,110, 7, 71,145,112,146,144,231, 58,248, 88,129, 95,222,193, 39, 35, 92,
-125, 21, 14,127, 3, 86,255,192, 30,108, 6, 89,180,228,172,121,167,212,129,118,134,254, 28,190, 12,219,223, 6,249, 12, 76,135,
-176,125,207,150,245,195, 35,235, 94, 54, 30, 70,126,226, 82,213,226, 79,172,202,153,172,209, 80, 61,115,202,213,140,122,234,101,
-201, 39,141,106,146,214, 85,180, 56,204,149, 43,185, 43,222,170,238,145,119,184,183,201,118,219,140,217, 67,192, 50, 92,140,232,
-214,139,206, 70,209,205,132,158, 43, 58,140,148, 33, 91, 33, 31, 10,101,107, 31,116,201, 19, 90, 28,118, 80, 76,116,179,155, 96,
- 40, 66, 78, 97, 30, 23,197, 58,234,241, 12,122,141,234,196, 50,219, 51,119,111, 79,196,104,163,167,254,209,150,245, 63,187, 71,
-250,175, 95,132, 79,118, 76,255,237,143,217,190,126,129,156, 4,250,111, 6,226,223, 63, 54,133,248,143, 10,220,140,200, 58, 89,
-218,115, 15,114,165, 67,158,237, 44,176,229, 40,186,109,193,223,219, 19,247,192, 31, 38, 27, 91,151,206,170,195,129,218, 88,252,
- 34,195,217,136, 76, 5,178, 23,223, 67, 31,196, 62, 25, 77, 13,127, 88, 76, 76,247,221, 9, 94,238,224, 87,175,194,149, 43,240,
-234,198,138,238,153,117,162,170, 10,157,162,189,239,113, 58, 49,181,102, 31,144,209, 42,140,198,209,234,236,125, 69, 79,139,233,
- 32,126, 42,217, 19,234,206, 14, 61,157,224,137,229, 31,235,104,137,110, 60, 24, 9, 93,132,183,182,232,161,141,214,120,121,101,
- 7,149,221, 27,208,191, 3,252,164,117,236, 60, 99,226, 76,142, 65, 94,104,198,130,238,250,141,197,100,216,229, 20,226, 27,112,
-252,142, 21,120, 70,151,198,247,150, 2, 23, 94,130,240, 41, 43,236,233,196, 21, 95, 63, 0, 30, 65,254,190,141,217,119,119,208,
-211,199,112, 55,192, 15, 18,122,231, 9,249,221, 29,229, 34,163, 58,217, 61, 87, 39, 73, 79,236,193, 64, 4,189,240,202,226, 92,
- 97, 45,120,225,114,177, 90,182, 75,116,114, 81, 87, 41, 97, 78, 16, 19, 47,158, 45, 57, 69,212, 30,156, 41,176,128, 73,252,236,
-150,177, 48,167,122,235,212, 4, 65,109,182,171, 53, 38,119, 70,119, 20,155,240,101,153,221,158,115,145,150, 96, 95,175, 22,192,
-212, 60,236, 67,133, 51,121,200, 76,146,101, 88, 54, 5,165, 27,189, 19,159, 67, 50,124,116, 42,246, 26,166,166, 43, 37, 87,132,
-234,100,156,244,102,191, 46, 69,205,185,154,189, 11,244,148,182,169, 22, 34,153, 13, 45,246,221,130, 29,112,151,124,234, 50,119,
-147, 21,223, 58, 79, 62,154, 66,187,148, 21,117,248, 8,115,116, 39, 51, 20,165,150,161,128,136,206,202,123,113,117,254, 2,183,
-209,197, 10,216,216,207,234,231,116,121,223, 61,199,170, 74, 64, 36,217,126, 88,133,108,126, 49,146,139, 36,237,177,238,207, 59,
-106, 78,121,240,246, 51,204, 69,189,102,140,215, 46, 87,243, 52,235, 12,236,176,101, 63,133,237,165, 13,188, 98,221,180, 31, 17,
-100,137,146, 85,105, 57,245,251,232,185,210,202, 0, 93,192,153, 68,136,221,138, 73, 39,178,157,234,104,178,223,102, 20,109,237,
-150, 91, 59,157,162,151,130,102,116,222, 53, 4, 9,214,156,138, 32, 49, 33,209,186,245,130, 48,110,119,228,113,156,201,118, 89,
- 76,165,111, 27,215, 52,103,173, 15,227,192, 48, 77, 76,195, 96,247,167,239,195,163,251,239, 13, 85, 92,220, 38, 88,102,166, 64,
-153, 39, 36,101, 6,185, 69, 9,208,117,228, 50, 44, 20, 64, 93,130,149,102,199, 66,251,254,233,165, 36, 29,223,245,107,105, 93,
- 87,144,214,171, 30,214, 1,233,236,195,149, 38,231,150,226, 10,241,171, 9,185, 17,225,137,194,239,236,224,153,158,248,185, 21,
-252, 68,129, 79,140,240,242, 57, 92, 63,128,195, 95,130,213,127, 5,221,103, 33, 28, 47, 35,118,205,151,242,199,221,182,150,255,
- 18,118,191, 3,143,255, 21,164,159,130,248, 60,236,190,106,224,148,178,181,113, 99,167,240,108,182, 14,105,151,247,153,131, 49,
- 46,225,229,181,237,136,141,197, 76,196,196, 83,161, 52,187,243,228, 79, 28,187, 24,101,240, 39,203, 96,123,122, 61,155, 12,125,
- 58,170,237, 84, 47, 28,125,186,153,236,191,159, 91,209,214,193,140,255,101, 44, 54, 78, 25, 51,186, 41, 22,167,151,133, 82,138,
-125,152,193, 0, 12, 25,101, 64, 24,178,113,240,139,231,180,215, 83,119,244, 31, 57, 86,107,145, 10,121, 92, 48,157,231, 34,116,
- 42, 68, 41,164, 35, 97,247,141,115,174,252,143,119,137, 63,145, 56, 63,221,241,248,186,208, 29,194,225,227,137,195, 63, 62, 39,
-252,167, 55,144,163, 3, 24, 2,114,179,135,171, 61,114,128,169, 25,143, 35,164,236, 29,167,195,110, 86, 9,186,107,208, 29,248,
-211,117,131,205,192, 19, 28,190,104,209,158,247,190, 7,231,131,219,195,140, 28,167, 33, 27,169,237,208, 64,233, 26, 10,124, 97,
- 99,133,249,205, 12, 31, 57,135, 79,249,154,163, 38,135,244, 2,143, 65,199,226,147,145, 98, 95, 79,146, 23, 54,111, 21,119, 85,
-255, 96, 85, 66, 94,142,102,155,122,103,164,188,185, 51, 31,254, 88, 40, 27, 53,126, 66,176, 74, 82,142, 34,114, 22,145, 20, 41,
-187, 64,124, 48, 34,155, 12, 47,172,225,240, 12,174,127, 29,142,238,129,126, 20,228,154, 77,142,198,239, 65,186,109,133, 89,189,
-191, 13, 35,240, 30,240,151,176,121, 11, 30,159,195,195, 11,244,113,237,164,125, 98,112,242, 45,100,245, 69,136, 7,158,231,185,
-177,226, 95,118,118, 0,188, 24,225,126,132,183, 3,122,103, 71,254,241,134,252,120,231,240, 8, 55,123,199,138,250,170,211, 34,
-187,196,183,155, 76, 9,145, 16, 5,137, 50,251,231, 39, 63,211,214,181,250, 20,116,217, 9, 55, 69, 64, 90,216, 73, 37,160,133,
- 96,153, 8,193, 11,162, 23, 22,187,240,194,188,183,150,134, 39,190, 87,218,179,119,171, 42,123, 57,224,115,180,101, 54,107, 88,
-108, 54, 87,194,165,224,110, 23, 94,101, 89,178,148, 10, 66, 44, 58,191, 13,201,247,243,147,235, 2, 43, 91, 73,157, 93, 95, 67,
-149,150,157,100,125,141,102, 87,171,221,118,169,145,199,106,116, 76,130, 61, 18,202,236, 34,107,147,228,196,105,124, 50,143,229,
-103,107,171, 39,241, 85,191,254, 50, 54,213,198, 21, 38, 53, 74, 98, 22, 80, 85,159,189,241,173,100, 14,211,169, 54, 53,109,130,
-118,148,194,174, 48, 35,176,130, 67,173, 44, 72,106,233,123,103,137, 97,112,205,127, 21,173,133, 84,223, 20,130, 83,176,212, 43,
-122,237,146, 17, 83,169, 75,176, 78, 92,137,179,182, 64,221,173, 80,166, 76, 41,217, 86, 50,254,232, 44,222, 91, 91,137,240,134,
-164, 20, 15,145,125, 42, 97,100,158,244,148,102,153, 31,100, 57,236,204,217,240,213,174,167, 74,215,117, 16, 3,121, 24,104, 94,
-226, 66,229,187, 28,198,213, 28, 76,219, 67,170,206,185, 37,203, 65, 37,132, 90,128,109, 42,168, 2,227, 48, 50, 57,115,221, 14,
- 77, 54, 13, 75, 18,136, 93,162,168,178, 29, 7,118,219, 45,211, 56,248, 68, 33, 56,164,198,167, 26, 33, 46,185, 5,179, 52,192,
-131,133,106,170, 95,179,239,215, 82,124,148, 31, 41,174, 27,168, 7, 57,213, 75,200,156, 75,228, 65,116, 95, 55,177,255,123, 29,
-181,155, 94,187, 2,135,139,159,154,236,136,212, 2, 28, 41, 92, 87,184, 61,194, 11,163,253,251,159, 83,184,154, 45,120,226,106,
- 15,183, 94,129,254,215,129,127, 0,188,228,155,156, 13,232,195,167, 53,149, 51,141, 97, 11,229, 59, 48,254, 30, 60,254, 35,144,
-235,176,254, 28, 12, 95,179,110, 94,176,217,243,225, 51,176,218, 32, 87,119, 46,160,187,180, 27,104,149, 23,101,223,250, 66, 14,
- 78,150, 19, 27,161, 79, 30, 58, 50,248,150, 43,251, 94, 82,189,229,185, 80,171, 99,231,101, 17,115,109,138, 21,240,157,147,123,
-138,218, 63, 79,254, 75,138,141,135,182, 25,157,148, 60,186,191, 89,116,206,103,175,153,236, 99, 17, 46,178,107,229, 26,209,198,
-212, 36, 27,213, 56,214, 41, 47, 15,140,186, 51, 59,159,124, 77, 18, 44, 2,247,236, 40,112,250,111, 46,232,255, 28,166, 3, 40,
- 43,235,238,166,117, 64,223,157, 76,221,253,111, 93,135,215,109,162, 34,175,174,225, 70,135,244,157, 83,132,138,141,150, 67,129,
-120, 19,120,222, 2, 67,226,123,192,199,129,191, 9,252, 79,192,251, 32,207, 66,121,100,135, 42, 73,112,100, 25,164,250,230, 57,
-122,103,135,190, 51,160,119,183, 86,164,175, 11,233,113,177, 41,192,127,126, 3, 94, 78,176, 27,173, 64, 31,123,215,114,210,161,
-103, 25, 57, 72,232, 65, 54,109, 68,151,108, 4, 24, 93,206, 59, 21,179,156, 92,235,237, 49,217, 7,251,154, 27, 40,167,153,114,
-238,113,132, 67, 97,218, 21,166,179, 74,236,202,132, 7,163, 97,118, 49, 85,122,217, 21,210, 90, 9,103,230,245,231, 86,129, 23,
-126, 0, 71,239,129,124, 4,228,138,143,199,255, 16, 86,207,195,193, 85, 43,208,225, 28, 46,238,193,143,206,225, 7, 5,222,119,
-241,156,170,241, 15,174, 39,228,102,132,213, 14, 13, 79,172,200, 31,122, 21,121,162, 86,156,239,187,177,227,108,160,108, 38,202,
-253,145,252,112, 71, 25, 39, 52,249, 41,222, 15,120, 18,218,129,165,144, 11,108, 82,180,226,148, 21, 53, 19,181,123,160,253, 35,
-204,150, 73, 62, 15, 38, 75,227, 93,110,144,174,245, 65, 76, 40,104,246,189,110,169, 44,241, 86,101, 46,115, 33, 14,205,190,180,
- 90,207,114,110,138,159, 44,133,139,178,140, 58,101,143, 47,190,144,214,170,204,162,212, 29,178, 83,156,167,217, 78,165,140,109,
- 87,231, 95, 55,120,129, 28, 93,132,148,115, 67, 72,203, 51, 30,142,146,171,119, 70,200, 18,216,130, 41,152, 61,246, 57, 87, 17,
- 96,185,172,200,215,133, 2,199, 50,118,151,153,144,102,133, 71, 85, 61, 7,190,109,152,132,168, 50,239, 61,139, 44,185, 6, 50,
-251,243,117,137,231, 37,120,119,181, 47,158, 91, 34, 97,101,222,240, 45, 7, 49, 89, 70,253, 92,202, 38,119, 17, 27, 33, 80,138,
- 26, 34,187,242,193,125,100, 44, 8,177, 75, 36, 76, 92, 90, 36,250,180,197,222,159, 49, 23,198,113,154,119,215, 53,142,122,246,
-203,123, 71,234,196, 21, 3,190,224,187,102,205,123, 62,120,213,125, 69,187,238,241,217, 22, 44,109,165, 19,138,123,198,241,240,
- 44, 73,157,173, 79,234, 68, 87,151,233,199,124,152,209, 38,113,174,201,117,173, 0,162,253,158,221, 38, 35,193,247,232,196,104,
-127, 46, 8,211, 84,152,198,113, 17,172, 85,146, 95,176,124,128,237,148,173,152, 15, 91,212, 99,195, 67,140,206, 62,241, 72,154,
- 16,230,201,196,158, 88,193,125,248,226,171,144, 90,152, 85,139,175, 41, 10,164,132,196,100,220,246,236,235,205,198, 58,184,231,
-146,104,171,184,238,255,181,138, 38, 43,188, 58,201, 63, 62, 52,208,199, 65,177,241,117,180,189, 46, 73,205,170, 36,209, 66, 53,
-250,235,144,174, 90, 7,222,189, 2,233,147,208,127,210,198,142,230,145,114,185,243,105, 51, 98,111, 11,122, 89,110,241,242, 14,
-148,183, 61, 59,244, 53, 88,255,134, 35,187, 86, 22, 12,178,187, 7,195, 7, 16, 55,126,215, 14,190,176,154,230, 11,203, 78, 33,
- 14, 87,209, 12, 97, 7,113, 7,211,102,177,166,141,117,215,173, 70, 22,219,168, 21,166,209,121,238, 59,111, 17,182, 5,182,166,
-124, 86,177,147,154, 58,102,175,100,155,213,105, 54,246,185, 37,185,249,184,105, 82,139,116, 45,197,132, 74,201, 82,145,102, 8,
- 7, 58,127,249,157, 15, 3,170, 10,119,239,124,162, 54,178, 42, 14, 56, 25,155, 17,104, 22,115,169,109, 70,119,204,245, 78,128,
-205,102,207,139,110,121,239, 39,223,201,109, 20,121,182,183, 11,230,160,135,151, 12,167,106, 16,143, 12,225,121,123,175,195, 45,
- 63,209,191, 7,121, 13, 97,107,138,236,153, 32,253, 29,215, 63, 76,176,253,115,123,255, 70,183,215,125,245,148,242,187,143, 40,
-111,109,209,149, 89,172,166,179,145, 41, 90,206,142,136,176,186, 40,244,255,230,140,144, 3,242,145, 43,118, 13,141,238, 30,184,
-218, 35,155,130,238, 38,228, 57, 63,201, 28, 56,201,101,240,207,183,179,193,177,172,124, 14,252,234,202, 46,179, 31,238,224,145,
- 82, 30,219, 46,126, 10,133,173, 42, 91,135, 92, 68,135,197,164, 65,233,243,196, 74,139, 77, 17,222, 85,226, 54,219,250, 97,219,
-193,174,135,151, 47,144,171, 31,128, 30, 64,255,243,160,223,135, 15,222,128,241,161,173,107,206, 4,126,152,225, 13,224,141, 9,
- 29,118,140, 97, 52,246,149, 68,228, 40, 18, 14,147, 29, 74,114, 64,142,147, 5,179,100, 76,224,183, 85, 83,239,110,139, 77,108,
-130, 31, 4,187, 50, 83,213,138, 66,118,107,153, 78,205,131, 59,152,130,122,204, 53, 28,198,108, 98,102, 80, 88, 34, 72, 53, 44,
-236,239,150,132, 45, 65,141,214,167,152,195,160, 52, 97, 7,158,180, 82,233,120,104,153,147,172,106, 65,183, 97,201,126, 39,201,
-164,205,238,216, 30, 52,129, 42,192, 23,155, 38, 96,123,242,132, 37,157, 85,200, 74,100, 9, 45,178, 64,153,197,101, 19,106, 7,
-222, 6,140, 84, 57, 7, 11, 49,109,172, 67,255,214,143,229,202,107, 27,165, 7,138, 4, 82,178,123, 40,229,194,228, 95,173, 20,
-245,115,188,206,118, 47,230, 14,116,177,141,105,179,159,108,219, 64,109,254, 93,161,233,246,165,142,235,195,204,115,175,231, 39,
-209, 50,175, 33,230,174, 43, 84,100,172,238,237,137,235, 88, 57, 58, 0,108,210,133,159,223,226,138,231, 3, 81,171,126,114, 37,
-184, 52, 92,240,162, 75,108, 90, 81,161, 72,161, 72, 38,187,136, 48, 35,228, 58, 54,111,242, 89,219,169,204, 2, 83, 12, 51, 67,
- 61,180,147,155, 89,192,182,175, 48,111, 55,224,250, 84, 37,104,200,110, 77,247, 25, 80, 98,236,153, 80,166,113,154,129, 65, 69,
-100, 86,210,239,101,193,238,215,243,249, 51,179,243, 65, 43,244,132, 16, 29, 21, 28,163,239,211,147,101,151,143, 59, 74,153,154,
- 61,191, 29, 48, 74,136,236,198,129,113,187,165,140,163,237,169, 59,159,128,200, 18, 53,104, 59,244, 56,159, 50,102, 17, 98, 67,
- 31,172, 2,189,122,125, 76,121,178,248, 86, 85, 68, 38, 36, 70, 66, 12,100,141,115, 50,168, 54,239,226,135, 89, 11, 91,187,158,
-162, 75, 65,151,154,167,254,169,104,118,160,238,186,117,204,241,196,112,149,114,197,254, 62, 29,251,174,240,153, 5, 97, 41, 7,
- 16,250,198, 0, 51,184, 53,109,247, 33,177, 22,122, 9,241, 83,172, 35, 12, 47, 64,252, 85, 43,226, 26,172,187,143,207, 67, 62,
-135,112, 10,241, 45, 8, 63,182,140,239,105,235,187, 77, 7, 64,171, 64,153,188,224,143, 62,234, 28, 96, 28, 77, 88,181, 43, 86,
-176, 55,174,160,126, 48,153,213,171,130, 80, 38, 69, 39, 87,152, 79,182, 31, 87,241,130, 93,199, 85,142,119,157,159, 34,163,239,
- 56,165,194,251,189,107, 47,197,236, 13,149,249, 62, 85,166,181, 48,168, 48,100,101,240,145, 98, 29, 16,168, 7, 10,180, 17,128,
- 41, 56,164, 32,251,122,191, 14, 78,196, 10,248,197,104,231,174,177,179,214, 97,167,246,210,123, 79, 88, 77,209, 30,142,235,171,
-145,240,211, 7,139,234,233,102, 63, 11,224,116, 83,144,225, 14, 28,156,128,220,116,130,217, 43,160,223,128,242, 99,200, 55, 96,
-250, 52,164,191, 2,254,149, 41,150,206,183,240,208,216,240,250,112, 64,191,244,128,242,127, 61, 2, 70,228, 25, 65,111,249,120,
-252,205,128,134,133, 18,166,219,130,126,225, 9,253, 31,110,144,191, 53, 16,126,253, 25, 23,232,169, 41,223,233,145,251,226,150,
-163, 26,154, 99,254, 73, 89, 1,169,216,190, 47,129,172, 19,218,129, 60,155,204, 50,248,254, 0, 63, 8,228, 71, 3, 79,164,176,
-233,226,194,220,143,190,207, 12, 22,114, 54,105,161,159, 70,242,123,133,114,145,137, 79, 38,194, 7, 35,242,206,132, 12, 7,232,
-107,167,200,245, 31, 3, 47,194,225,103,224,246, 49,220,185, 3,111, 2,253, 26,126,229, 16,110,159,192,255,240, 67,242,239, 63,
- 97, 76, 19, 37, 23,164,159, 8, 99, 36, 12,147, 39, 38, 5,100,154,224,253, 96,206,138,173, 11,175,178,171,175,179, 35,140,179,
-209,247, 36, 9, 97,231, 7,185,236,202, 85, 93,196, 86,129,194,164,193,245, 24,203,142, 88,231,251, 41,204,161, 34, 82, 71,124,
- 90, 22, 27, 79, 85,172, 5,157, 71,236, 85,136,150,103,101,142,117,233, 65,133,236,227, 84,109, 18,229,146, 44,201,131,101, 98,
-239,241, 98, 80, 22,103, 21,169, 61,188, 82, 22,250,209, 15, 33,107, 97,138, 48, 77,166,159, 72, 85, 64,215,216,148,117, 6,229,
-232,135,242,196,235,195, 63, 70, 51,155, 76,121,217,125, 87, 14,212,108,183, 11,113,182,145,137, 22, 66, 85,249,123,209,175,126,
-252,122, 88, 86,151,113, 72,131,193, 85, 31,233, 7,127,143,181,237,154,154,154, 50, 71,151,122, 33,152,227,249,170, 12,177, 9,
-254,217,235, 85,125,244, 60, 71, 60, 95,202, 37,175,169,110, 53, 35, 35,233,194,134, 9, 21,219,218,172, 82,104, 2, 77,170,184,
- 78,102,190,154,197, 4,211,100,155,139, 71,237,105,147,230, 86,230, 96, 31, 63,214,204, 98, 1,247,222,123, 33,203, 78, 80, 11,
-206,102, 47, 57,207, 70, 60,253,235,208,177,151,171,210,222,239, 93,142, 53, 69, 11, 41, 38, 74, 76,142,251,206,205,238,200,231,
- 39,186,140, 56,171,221,186, 6,210, 46,171, 38, 27,169,231,106,177, 19, 8, 33,121,135,157, 12,246,146, 18,163, 42,187,209,147,
- 60, 93, 33, 42,238,118, 42,192,110,183,101,220,237, 16,205,196,202,128,166, 10, 2,125, 49, 50,227,111,109,213,218, 28, 45, 22,
- 25, 69,123,204,246, 67, 64, 36,154,123, 96,154, 16,103,214,139, 79, 66, 74,153,154,251,251, 82,102,125, 8,243,195, 97,209, 80,
-212,116, 59,177, 41, 77,153,252,128, 95,128,178,130,233, 25,136,215,125, 28,121, 27,250,107,176,242,206, 60, 28,154, 37, 39, 30,
-215,244,112,208, 11,104, 73, 62,243, 81, 47, 95,218,230, 95,254,184,131, 29, 10, 72,149, 83, 9,229, 30,148,115,203, 70, 47,239,
-194,248, 46,140,239,121,177,158, 42, 93,195, 63,216,201,118,150,249,137,169,138,199, 29, 12, 25, 29,188, 35, 61,247,104,209,199,
- 19,220, 87,120,127,132,243,236,156,105,179,146,217,238,215,119,186,217, 69, 91, 46,248,208,170,124, 15, 11,107, 82, 91,212, 82,
-108,242,215, 29,185,169,141, 35,100,242,134,118,235,107,249,154,225,172,165,197, 14,235,254,122, 81,108,140, 58, 23, 68,149, 25,
-114,178, 27,149,141,219,199, 71,181,174, 93,154,189, 74,246, 73, 0, 59,120,110, 5,171,143,118,139,240, 44, 4, 88,247,166,251,
-162, 88,100, 41, 43,152, 30, 66,186, 11,225,115,222,141, 71, 40, 55, 64, 62, 6,211, 21, 59, 88,233, 53,251, 92,182,192, 54,163,
-111, 94, 80,190,240,152,242,149, 51, 67,172, 30, 36,251,168, 55, 1, 58, 37,158,153,117, 45, 36, 31, 37,215,125,230,227, 9,249,
-127, 78,145,103, 87,200, 63,188,229, 99,133,100,157,198,160,240,100, 50,111,120,244,125,110,125, 98,119, 17, 73,142,159, 13, 1,
-121,111, 64,223, 24,224, 16,194, 47,246,164,219, 10, 95,132,131,239,238,200,231,138,118,182,250,216, 70, 65,163,208, 37, 27, 10,
- 76, 65,152, 78, 21,221,140,244,253, 68,186, 58, 33, 33,146, 78, 38,235, 70, 59,208,248, 16, 57, 81, 79,152,251, 4,252,228, 21,
-120,243,155,246,207,183, 86,240,246, 19,248,218,134,210,153, 21, 82, 39,108,106,147, 60, 29,169, 19,130, 20,239,104,155, 15, 61,
- 96, 69, 61,248,228, 40,251, 3, 61,213, 66,228, 15,168,178,128, 4,107,206,124,240,223, 59, 11,171,124, 65, 89,229, 41, 81,150,
-188,110,209,118,140, 91, 40,181,124,171,169,198,172,147, 10,203, 38,214,199,207, 26,196, 84,244,190, 71,175, 26,111, 13,150,138,
-166, 49, 32,217,192, 33, 14, 91, 94,236, 72,179,127, 37, 32, 1,142,187,196,213,103,122, 14,126,233, 4,121,109,205,240,187, 15,
-120,239,251,231,168, 40,147, 83,197,122, 12,101,187,228,138, 87, 63,244,126, 0, 9,245,128, 86,106,176,155, 41,139,251,106,141,
-107,159, 44,209,211,198,213,239, 95,239,218,187, 96, 15,247,220, 28,136,132,229,251,212, 40,151,168, 85, 91,235,100, 50,241,110,
-119, 38,239,177,167,108, 95,188,226, 50,219,239,180, 1,200,212,113,104, 96, 9,150, 17,247,246,207,193, 46, 46,122,144,230,160,
- 49, 43,222,101, 89,153,204,123,246, 37,128,110,182,180, 61,181,193,150, 5, 17,107, 67,148,138,171,149,166,136,102,251,140, 29,
- 93, 27,244,175,249, 58, 44, 0,178, 89, 60, 93,178,119,156,181, 33, 41, 79, 63,218,165, 57,189, 92, 70,201,206,129, 56,251,157,
- 44,238,255,143,169,243, 85,165,121,185,237,163, 8, 51,108,168,253, 98, 90,202,126,104,187, 67, 92,234, 74,167,106, 21,130, 4,
- 35,172,185,143, 60,197, 72, 22, 97,179,219, 82,166,209,223, 99,239,112, 69,152,114,102, 26, 71,114,158,252,125, 14, 75, 16, 76,
- 61,132,120,247, 29,176,113, 86, 29, 64,235, 37,204,210,222,132,171,174,120,138, 57, 47, 44,201, 10,202, 48, 17,198, 9,233, 19,
-154,162,231,120,232,165, 9,135, 23,124,196,234, 32,245, 58,169, 33, 67,126,152,111,116, 22, 73,223, 47,200,179,167,176,254, 62,
-164, 27, 6,126,209,183, 64,111,129, 62, 15,253,203,208,221,114,140,235,129,119,119,218,242, 40,155,113,136,254, 53,233,187,149,
- 20, 87,247, 50,247,161,220,133,252, 77,144,143,218,109, 87,222,134,233, 3,200, 15, 44, 70,115,154,108,217, 86, 38,163,135,149,
-108, 69,127, 60, 51,123,209, 46, 27,113,109,235, 12,207,237,104, 5,104,147,173,176, 63,200,112,207, 4,109,133,105, 22,247,204,
-180,180,236, 35,245, 97,241, 85, 86, 91, 75,173,174,179, 68,166,217, 45, 34, 11,224, 70, 69,140,102, 59, 45, 33,105, 59,183,167,
-239,170,218,180, 57,185,207,172,234, 75, 55,102,244,206,190,126, 48,117,159, 55,154,163,130,169,134,167, 9,116,147, 79,166,213,
-186,243, 24,204,105,117,178, 18, 78,142,109, 3,162, 90,144,215, 55,232,107, 23,200,141,130, 62,216, 25,180,231, 90, 7, 55, 54,
-200,245, 11,232, 63,106,221, 41,175,131,188,228,199,255, 27, 80, 94, 3,254, 22,200,191,128,233,174,185, 15,222, 53,139, 30,159,
- 91, 17,126,121,133, 92,241,192,232, 71, 62,126, 27, 51,218, 95, 16, 30, 78,164,149, 63, 69, 79, 4, 89, 11,242, 40, 32,234, 14,
-137,179, 12, 39,201, 60, 54,169,131, 81,145,139, 26,143,107,159,195,172,230, 74,106, 19,128, 85,231, 6,221, 17,254,242, 2,253,
-241, 68,201, 35,124, 92,232,126,227, 42,105, 55,113,248,207, 55,148,119,204, 34,183,253,160,176, 27,236, 97,190, 58,176,209,215,
-147,173,146,163,144,178,178,126, 48,210,203,132, 14, 5, 78,132,120,226,160,145,143, 60, 52,237, 6, 64,255, 34,188, 38,240,206,
-183,225, 15,222,133, 31,143,112,162,232, 99,115, 72, 72,175,243,168, 75, 5,100, 40,104,231,139, 80, 48, 92,110, 46, 54, 78,111,
- 1,231,131,117,235, 50, 45, 18,112,201,251,137, 91, 97, 14,212,104, 78,254,149, 31, 81,230, 77,158,141,178,117,177,152,205,164,
-176, 16,144,121,212, 94,246,133, 69,178, 63, 69, 51,177,152,143, 30,181,198,123,186, 34,189, 65,103,214,192, 20,105,250, 44, 81,
-232, 29, 6, 18, 99,228,224, 36,112,244,179,199,132,255,236, 57,152, 70,244,119,238,205, 72, 41,113,111,248, 80, 51,189,221,186,
-148,231, 7,145,238,137,156,234,248,170,218,239, 42,120, 36, 52, 60,247, 50, 43,174,212, 44,145,234, 74,255,102,199, 95,209, 18,
-161,186, 94,117,153,250, 78, 46,239, 90, 53,124,251, 57, 90, 83,108,220, 28,154, 3,132,204, 36, 55,153,117, 16,212,127,174,152,
-215,153,135,198,172, 85, 48, 13, 68,196,229,104,182,219,247,162,222, 98, 95,133, 5, 36, 99, 12,251,101,207,223,242,172,230, 0,
-158,218,173,106,237, 89, 27, 90, 30,213,203, 45,151,176,182,178,112,220, 29,117,188, 72,157, 26,227,186, 44,241,181, 13,175,103,
-217,221,150,210,214,211, 15, 65,209, 85, 36,238,126,177,111,231, 22,203,250,160,144, 66, 66, 82, 50,111,183,175, 4,130, 23,111,
-213,167, 73,120,203, 7, 41,123,125,101, 21, 76,202,101,113, 92,140, 22,189, 27, 35,187,221,142, 60, 14,246,186, 66,244, 21,131,
-146,115, 38, 15, 35, 37,231,185, 33, 89, 70, 74, 45,157, 46,248, 72, 63,204, 65, 45, 13, 33,127,111, 68, 94,119,251,165, 89,111,
-137,107, 18, 36, 38,198, 14,116, 24,144,169, 16,186, 68,137,145, 50, 57, 33,181,221,197, 87, 56,143, 68,135, 22, 55,181, 76, 23,
-123, 31, 85, 40,199,251,217, 22,255, 87,207,145,227,157,141,190,245, 42,228,251,176,125, 23,242,219,144, 95, 53,255,109,218, 24,
- 88, 67,142,188,219,246, 25,176, 78,205, 6,236,242,167,236,223, 76, 19,148,251, 80,238,128,254, 24,198,191,130,221,215, 33,189,
- 6,221,175,249, 92,170,131,114, 2,229,194,108, 68,101,176, 95,195, 19,152, 30,195,197, 57,122,110,176, 19, 6,177, 59,117,151,
- 29, 18,162,139, 98,253, 81,182,228,182,209, 21,234,243,145,223, 59,242,188,112,222,231,211,189,255, 55,202, 62,151,218, 8, 73,
-126, 58,149,125,177,125,241,130, 58,142,214, 97,141, 62,249,207,174,216, 76, 77,148,239, 30, 68,162,241,162,218, 84,192, 47,239,
-178,236,165, 70,181,232,211,204,140, 57,158, 31,184,163,219, 70, 68,237,236,115, 24,225,133,171, 16,186,128,246,166,146,230,222,
-132,254,193, 67, 27,191,175,221,223,125, 52,194,250, 28,142,255, 49,132,255, 0,184,135, 5,147, 43,112,100,135, 56, 62, 9,225,
-143, 96,247, 47,225,237, 29,250,230,132,158,142,144, 51,114, 45,161,201,222,107, 57,138,240, 66, 66,146,160,187, 12,159, 58,182,
- 11,109,114, 69,223,129, 93, 96, 33, 8,226, 33, 42,156, 21,120, 82,204, 86, 24, 28, 65,123,225,171, 17, 5,217,150,101,163, 83,
- 71, 94,100,123,226,158, 36, 27,219,223, 29, 40,111,141,148,239,142,200,183,182,132,159,233,136,191,188, 38, 93, 51,144,196,250,
-237,145,252,229, 29,249, 71, 35,225,102, 68,142,133,241,207, 71,206, 86,202, 32, 86, 88,226,164, 28, 61,154, 56,124,125, 3, 35,
-196, 11, 69,206, 15,208, 79,108,144,107,119,204,175, 30, 95,132,231, 62, 13,219,111,187,102,163, 67,182, 9,189,231, 63, 79,242,
- 61,104,189, 32,134,236,162, 45,153,201,128,182,238,105,242, 75,107,180,105,158,159, 73,148,236,201,129, 13, 89, 45,200,194,113,
-183,219,167,241,157,137,122,215,141,237,201,181, 54, 44,106,171,137, 98,187, 58,234, 3,177, 29, 11,178,204,114,151,253,189,204,
-137,107,120,231, 94, 84, 81, 49,124,110,110, 84,240,161,238, 29, 27,245,182,170,237,175, 31, 61,158, 24,126,255,148,254,247, 79,
- 25, 55,133,115, 50,155,152,201,121, 25,127, 87,146, 92,168, 35,110,191,134,235,121, 35,205, 29,187, 54, 51,238,198,111,239,208,
-145, 25,219,234,185,232, 45, 54, 85,230, 87,106,249,232,120,166,123,152, 97, 57,234, 60,114,102, 13,198, 28,190,164,203, 1,170,
-138, 4,163, 44, 93,178, 94, 10,101,169,194, 47,101,127, 15, 42,174,158,175,202,232, 24, 28,114,162, 25,134,237, 37,251,218, 2,
- 84,175,215, 68, 93,231,213,132, 60,154,228, 52,209,125,181,119, 22,230, 33,244, 76,116,171, 74,232,214, 83,191, 23,224,186,252,
-249,232,135,143, 86,114,161,173, 35,220,253,253,226, 7,133,122,192, 42,151,188,225,237,212, 56,248,148,241, 67,255, 87,199,198,
- 24,146, 53, 9,164,174,159,125,238,179,240,178, 90, 39, 75,251, 19,237, 23,205,102,232,227,216,227, 37,219, 32, 4, 99,199, 71,
-239,208, 67,234,184,152, 38,118,195,206,255,123,116,165, 63, 76, 99, 38, 79,147, 89,245,218, 81,186,163, 25,149,229, 64, 39, 40,
- 49, 36, 23, 38, 22, 27,163,123, 66,219, 83,236,155, 70,112,160,174, 93,209,121, 74,101, 59,254,210,117,110,155,132,144, 58,159,
- 22, 47,201,125, 79,191,125,242,212,103,104,211,131, 56,139, 55, 18,127, 57,192,195,100, 36,175,103, 39,184,122, 10,199,143,224,
-224, 46,172, 86, 80, 14, 96,188, 5,253,107,150,249, 28,175, 67,188,225, 59,241,155, 16, 14,172,200,235,232, 54, 40,125,122,145,
- 50, 31,213,162,251,128,158,129, 48, 25,184, 99,248, 54,148, 47, 65,247,139, 54, 5,144,119, 32,223,243, 14,125,107, 94,245,139,
- 7,112, 54,160, 15, 4,206,130, 11,221,116,153,111,111,124,116,186,117,239,248,153,117, 98,138,157,250,108, 89,105,150, 33,173,
- 65, 47, 85,205, 94,253, 51,165,238,153, 90,138, 83,123, 10, 95, 94,130, 58, 56,174,178, 3,134, 98, 33, 6, 53,179, 58,250,239,
-147, 92, 19,156,116, 62, 40,212,241,223, 76,134,218,187,153, 60, 31,166,117,229, 5,219,151, 20,255, 67, 5,232,130, 1, 40,198,
- 73, 89, 37,120,233,170, 53,181, 42,193, 72,113,135,193,128, 43,193,176,181,114, 43,193,237, 2,183, 55,200,245,127, 4,241, 63,
-180,137,140,161,214,128,231, 64,126,210, 98, 75,229, 15,225,201,111,161,223, 5,222, 75, 40, 35,250,100,180,177,193,219, 59,195,
-151, 30, 6,244,165, 14,169,249,233,197,218, 39,217, 22,152,196, 14, 94, 15,118, 6,167,121, 49, 89,248, 74, 12,150,173,254,252,
-161, 61,185,118, 59, 15,190, 9,203,211,188,171,106,161, 88, 23,158,120, 96,177, 81,240,158,237,209,231, 6,228,129, 21,206,221,
-215,183,236,190,182, 37,246, 66,186,153, 88, 61, 31,233,126,101, 69,252, 76, 71,136, 66, 88,117,132,207, 38,142,223, 63,103,120,
-125, 96,119,100,194,179,139, 34,236,128,252,112,226,100,216,160,163,146, 6, 63, 89,191, 40,200, 51, 63,130,131, 71, 16, 62, 10,
- 47,191, 6,219, 59,240,104, 34,190,182, 34,142, 35,211,227,178, 56,138, 7, 31,133,201, 37,220,101,237,214, 28,129, 32, 77,122,
-148,178, 20,185, 82,100, 86,138, 27, 77,203,174,207,169,237,212,155, 10, 96,177,201,165,137,144, 14,139,176, 43, 96,123,186,210,
-230, 74, 75,227,111,181,199, 82, 41, 62,101, 42,204,158,233, 69,250,189, 32, 32, 82, 16,130,219,231, 52,168,119, 17,203, 53, 94,
- 83,213,152,148, 11, 10,187,113, 55, 15,239, 74, 80, 74,182, 12,233,185,171, 11,194, 80, 92, 3, 80,133, 70,186, 31,237,186,236,
-140,181,153,100, 73, 99,133,178,123, 87,212,138,118,209,203,221,209,172,179,158,173,113, 21,224, 82, 42, 40, 70,150,103,212, 84,
-215, 97,106,218, 0, 11, 18, 49, 43, 93,214,253,192, 20, 9,115, 50,232,222,100,178, 13, 21,145, 75,237,171,221,223,147,185, 22,
-131,218,232, 85,131, 97,162, 85,231,144, 71,105, 19,212,180,216,202,162, 73, 88,147,102,164,155,116,113, 23,132,134, 48,151,129,
-209,117, 18, 53,236,100,105, 76,116,239, 32, 34,173,214,176,174, 5,154, 52,158,224,100,185, 34, 62,238,110,148,232,121, 79,161,
-214,248,168,165, 85,228,115,169, 43,151,249, 16, 41,141, 85, 45,197, 14,237, 18,101,202, 75,240,204,124,176, 43, 79,229,187,138,
- 95,207, 82, 49,179,205,156, 95,154, 81,124, 10,209, 58,116,207, 45,223,169,178,219,110, 9,197, 24,253, 38, 80, 45,214,161,231,
- 66, 46,227, 12,126,177,209,250,194,140, 87,173,153, 31, 46,188, 11,129,130,237,192,161, 32, 33,205, 7,166, 42,116,171, 90,152,
-138,127,149,134,253,191, 56, 4,140, 57, 95, 60,178, 59,166,132,166, 14,157,166,230,117,201,226,120,208,188,119, 44,171, 48, 35,
-156,248, 87,155,211, 84,190,113,134,188,190, 34,116,201,210,183,142, 48,150,246,141, 17, 78, 54,232,141,135,200,173,187,112,244,
- 29, 88,253,190,229,197,166, 99,136,183, 32,222, 54,127,121,255, 11,208,125,204,115,160,139, 89,214,102, 83,114,125,199,179, 9,
-241,136,144, 15, 33,118, 32,190,179, 31,191, 14,211, 19, 8, 63, 13,225, 89,232, 78, 13, 25,187, 23, 25, 36,182,251, 13, 78,142,
-216,120, 87, 62, 86,210,195,130,104, 85, 87,164,171,150,134, 83,153, 41,141, 18,105,191,160,107, 67,202,210,197,178,211,138, 45,
-195,146,163, 49,102, 59, 63,100, 53,171, 90, 5, 97, 36, 22,238,118,237,172,179,159,146,217,123, 72, 85, 31,163,182,168,107, 2,
-203,225, 64, 29,237,168,254,128, 65,157,104,235, 12,157,226, 40,250, 87,175,194,209,202, 66, 32, 36, 69, 75,169, 19, 87,153, 95,
-233,145,219, 29,242, 82,129, 23,118,200,201,223,135,240,107, 80, 30,248, 46, 93, 13,188, 18, 20,194,187, 80,126, 7,253,224, 91,
-240, 77, 69,223, 14,112,115,128, 39, 25,253,192,115,205, 71,243,221,201,218, 22,252,250,246,206, 62,159, 67,247,147,171,154, 78,
-225,193,136,190, 49,153, 20,226,123, 35,242,194, 8,207,117,246,125,122,223,245,247, 30,115,118,144,144,110, 64,163, 19,254,206,
-213,152,247,167, 88,236,235, 73,231,184,177, 2,215, 2,225,163, 43,148,137, 32,153,124, 58,241, 24, 24,139, 18,223, 25,232,222,
- 20, 14,191, 53,112,248,108,224,224,118, 79,248,116,130, 65, 88,253,195, 3,174,252,211,145,199, 23,202, 32, 54, 28,216,185,211,
- 81, 54, 19,199,239,110, 97, 5, 41, 43,178, 21,116, 44,200,205,251,112,184,131,195,103,225, 99,183,208,205, 7,132,243, 66,186,
-182,166, 60,217,144, 55, 19,154,202,124, 58,171,162, 40,237, 4, 73, 46, 66,211,197, 47, 45,141,119,121,190,182,180, 94,111,179,
-242,170,121,142, 45,227,220, 69, 41, 44,203, 44,172, 25,117,214, 69,172,212, 81,255,135,200,150,202, 76,240,210,153,141, 86,217,
-234,185,105, 7, 13,109, 26,216,136,113,230, 67,168,157,160,175, 74,231, 75, 57,216, 79,162, 33,217, 0, 0, 32, 0, 73, 68, 65,
- 84,232,209, 71,217, 33,219,225,183, 56,103,190,222,122,161,146,219,116, 17,161, 73, 48,224, 76,112, 27,103,221,202, 21, 93,238,
-143, 58,208,180, 53,131, 16, 66, 85,117,251,180,173,181,234,105,155,105,206, 82,172,217,223, 58,168,103,116,171,238,171,187, 69,
-197,197,131,174,102, 15,166, 21, 40, 33, 16, 84, 44,174,214, 81,156, 33,248,104,188,242,185, 92, 73,254, 97,225, 36, 51,141, 47,
- 40, 33, 23,195,127,122, 82,155, 86, 85,119, 21,180, 73, 99, 97,213,229,185,177,247,243,203,135, 9, 10,101, 22, 56,230,166,128,
-207, 82, 52, 49, 97,228,130,154,213, 61, 27,157,206, 93,189,238,229,209, 75,163,170,215,218,109,214, 21,101,101,215,107,139,184,
-101, 46,130,251,251,117, 26,234,217,190,247, 58,138,144,250,222,126,238,146,151,239, 53,143, 55,195, 94,183, 90,213,236,104, 45,
-182,251, 25,233,117,236, 30,131, 69,192,246,221,138, 85,151,152,128,237,102,235,129, 39, 66,145,192,148, 39,242, 56,249, 14, 63,
-207,238, 1,145,125,171,180,250,158, 98, 81,177, 27,159,189, 30,154, 69,154,159,209,179,211, 85,150,227,101,104,118,234,186,143,
-197,153,245,103,130,225, 97,201,133, 24, 35, 83,113,248,132, 44, 26,171,118,116, 23,100,241,164, 51,243,255,139,119, 15, 66,252,
-111,142,195,111,134,179, 1, 30,101,164, 15,240, 83, 29,252,233, 0, 95,221,161,223, 86,244, 91,130,188, 21,224, 97, 48, 95,213,
-110,128,199,143, 97,251, 14,240, 38,232,159,193,240,251,144,191,106,136,215,112,213,199,243, 71, 70,230,178, 28,212,230, 82,140,
-214,222,208, 65, 88, 67,186, 9,241, 99,150, 46,162,247,188, 91,191,238, 68,179, 39,246, 53, 66, 15,253,100, 56,207, 81,236,215,
-224,221,122, 85, 20,111,176,253,248, 69, 54,145, 91,171,110, 81, 83, 33,207,127, 95, 22, 79,226,114,204, 95, 64, 47, 34,139, 90,
- 81, 60,233,172,102, 68,143,234,150,178, 57, 43, 90,230, 7, 80,239, 77,101,181, 27, 77,186,255,160,129, 37, 47, 37,122,236,183,
-238,199, 25,251,120,107,223, 99, 92, 85,179,171, 74,180,245,227,249, 43,215,224,250, 33, 4,141,132,163,206, 64, 65, 7, 29,241,
-164, 67,174,174, 9, 47,175,144, 87, 10,242, 66, 65, 14,255, 14,132,255, 4,244,129, 59, 21,220, 8, 27,254, 2, 46,254, 55, 56,
-253, 3,244,141,247,208,255,119, 64,191, 61,161,219, 1,213, 17,221, 12,240, 32, 83, 78, 71,235,144,130, 53,247,146,252,226,125,
- 99, 68,191,185,177, 19,207,218, 77,189,131, 91, 9,119,197, 82,196,114, 65,222, 26,225,139, 23,240,141, 11, 31,189, 39,123, 65,
-170,232, 27, 91,248, 96, 50, 17,221,177, 24, 69,237,194,131, 34, 38,103,199,111,178,135, 14,128,188,150,224,176, 80,238,140, 76,
-217, 68,114,244,130,174,133, 45,194,249, 6,134,251,133,248,195,129, 48, 22,244,134, 50,124,127,228, 98, 43,156, 15,194,217, 96,
- 35,217,209,207,123,113, 87,232,118,197, 39,253,138,236, 28, 69, 75, 70,194,185,217, 3,111, 69,120, 50, 33,239, 41,114,108,128,
- 1,189,176,107, 74,147,204,133,122,238,126,178,146, 75, 99,113,172,100,169,250,176,208,165,208,104, 83, 97,100,217, 18,205,254,
-235,160,203,206, 57,184, 66,123, 63, 36, 59, 92,138,157, 44,243,195,158,189,225,165,236, 35,221, 42,157,165,202,193, 43,189, 37,
-120,209,206,193,199,159, 94,252, 43, 31,199,159,254, 86,116,170, 86, 95, 93,189,175, 51, 50,162,222,126, 85,252,151,231,235, 91,
- 23, 97, 92,176, 2, 60,186,184, 42,121, 54,123, 5, 97, 69, 49, 58, 87,167, 74, 39, 54,177,218, 53, 1, 50,226, 4,187,106,160,
- 48, 83,251,146, 89, 94,191, 79,174,187,211,246, 93,144,202, 37, 23,183,149,182,122,172, 74,212,140,144,186,166,251,109,193, 62,
-254,249,248,222,164,130, 73, 44, 9, 44, 16,146,131, 78, 80, 68, 11, 82,178, 27,112,124, 34, 24, 2, 26,163,233, 32,136,116, 49,
-178,238, 87, 72,119, 64, 73, 43, 52,246, 16, 19,154,146, 49, 27, 66,104,120,242, 50, 11,188,234, 20, 98,182,177, 53,107, 1,219,
-126, 52,106, 8,109,136, 4,149, 25,224, 34,202, 89,225, 80, 89,233,158,192, 54,167,149, 53, 67,205,176,167, 95, 95,198, 5, 81,
-246, 73,119, 34, 77,225, 19,220, 47,110, 86,203, 46, 38,194,170, 39, 79,217, 20,225, 90,109,114,186,168,251, 61,129,173,238,199,
-231,217,137,234, 62,208,197,197,164, 49,134, 37,194,180,235, 32, 37, 46,118,131,129, 99,196,223,191,105,162, 76, 19,228,137,201,
-241,221, 85,177,110,159,223, 66,107, 19, 49,207,122,168,246,180,104,197,180, 74,231,230,215, 55, 7,204,216,215,144, 69,193,176,
-151, 74,183,136, 0,154, 57,134,184,200, 79,157,205, 65,205, 34,112, 85, 87, 89, 14, 16, 50,131,115, 76, 32, 87,180,204,147, 20,
-179,147, 6,210, 91, 91,225,250,182,112, 24, 54, 28, 94, 7,249,202, 68,121, 99, 67, 25,242,172,166,208,187, 29,242,221, 21,225,
-217,222,236, 95,231, 10, 55, 34,242,241, 12, 31,153,224,246, 6,174,255, 49, 92,251, 18, 28,220,132,245,207, 66,252,183,161,251,
-121,235,188,195, 85, 87,204, 15, 86,172,227,179,160,143, 93,241,126, 0,241,208,126,143,158, 65,190, 11,242,216,118,154,161, 51,
-100,108, 92,217,168, 62,222, 71, 14, 30,161, 7,152, 77,235, 84,108, 71,171, 1,210,100,133, 61,136,133,114, 20,167, 39,209,180,
-219,173, 76,248, 67,148,155,243,190,188, 34, 44, 85,109, 60, 90,149,233, 85, 57,235, 99, 67,101,201,130,137,193, 58,143,202,193,
-174,162,184,188, 23, 33,185, 88, 50, 82,180, 67,195, 84,149,200,205, 46,191,158,238,196, 9, 84,189, 71, 99, 38, 89,116, 99,207,
-118,112, 99, 5, 65,140,223, 46, 87,122,194, 81, 71,184,218, 35, 47, 30,160, 47, 68,120,121, 68,110,158, 64,247, 43, 16,255,174,
- 23,243, 17,244, 24,194, 35,224,159,161,239,126, 29,253,215, 59,202,151, 7,244,225,100,148,182, 94,209,164,200,155, 62,157,247,
-145,163, 14,130,116,222,113,108, 20,185, 42,104,202,198,126,255,171,201, 34, 69,174,121,162,206, 21,187,195, 53, 66, 94, 43,225,
- 72,225, 64,145, 7, 19,242,222,214, 44, 99, 69, 61,192,165,160,255,252, 9,122, 91,144,191,125,136, 60,159,140, 32,248,126,182,
- 64,152, 39, 5,253,222,136,158,102, 88, 25,122, 55, 51,145, 58, 97,221, 57, 85, 13,211,222, 73, 48,248,223,233,160,232,166,208,
-127,107,203,244, 53,229,113, 22,198, 32,108,179,178,205, 86, 16,214, 2,154,157,153,252, 56,115,172, 91,232, 32, 5, 69,206,122,
-120,152,209, 23,129,103, 50,114,114, 0, 63,123, 21,121,172,164,215, 33, 92, 23,194,235,129,233,193,232, 34,115,157, 9,198,140,
- 62, 2,109, 14,101,115,189, 13,127,141,255,231,178,222, 72,155,249,106,217, 79,161,122, 58, 50,186,217, 65, 95,234,227, 22,172,
-171,236, 5,166,204,160,166,121,228, 26,125,199,237,249,215, 25,207,193,110,236, 89, 25, 31, 87,137,255,113,153,195, 52,108, 50,
- 97,193, 24,153,154,208, 85,187,127,157,213,236,168, 46,123, 95,223,160, 85,139,210, 65,128,181,143,124, 75,195, 99,175,204,236,
-196, 2, 27,116, 92,196, 28, 51,154,125,151,123,153,180,165,151,252,113,210, 68,158,202,165,128,149, 54,202,116,242,206, 71, 85,
-200, 49, 89, 16,199, 52, 34, 20,231,122,123, 58,219, 28, 20, 99, 16,160, 34, 22, 50, 21,252,207,148, 26,252, 65,178, 81,175, 84,
-170,155,139, 5,253,161,108,151,134, 15,204, 75, 54,239,123,140, 75,200,135, 24,226, 20, 53,118,134,150,105,254,115,165,105, 72,
-234, 97, 35,184,117, 81,155,157,255,236,181,247, 17,246,158,189, 76, 47,137,216,170,186,124,182,249, 86,172,171,159, 1, 89, 94,
-123, 45, 76, 79, 73,231,154,108,215,250,255,209,161, 97, 81,160,235,123, 63,252,149,167, 48,105,218,138, 69,133,253, 29,125, 83,
-208,101, 94,142, 58, 10,214,177,173,125, 74,132,148,184,152, 38,242, 52, 16,130,101,219, 79,211, 72,241,253,121,174,205, 94,115,
-144, 43,141, 27, 97,182,167,248, 61,180,231,138,151, 89,178,106,214,219,138,205,189,164,236, 88, 16,185, 6, 40,162, 10, 45,103,
- 44,236,146, 42,103,209,200,230,206, 97,246,184,251, 10,182,177,140, 20,103,240,183,148,199,202,251,151, 24, 72,155, 16,136,209,
-166,158,135,119,118,240,189, 13,131, 51, 31,147,192, 90, 11,235,221, 72,218,108, 41,119, 35,101, 99,167,154,116,144,224, 47,146,
-137,117, 14, 34,114, 34,240,209, 2,159,126, 23,249,248,255, 13, 47,252, 30, 92, 63,134,245,199,160,251, 71,144,254,166, 97, 56,
-195,145, 63,132,214,134,225, 84,247,155,151, 83,147,110,135,107,134,150, 45, 24,228,102,245, 14,108,191,103,243,238,248, 2,244,
- 71,200,250,125, 56, 26,208,247,177,214,245,188, 24,217,194,125,172,236,196,200, 98, 23, 66, 41,226,207,171, 96,138,228,232, 99,
- 74,105,118, 99,178, 8,142,196, 33,207,101,242,110,174,168, 71, 90,170,227, 29,217, 3,103, 38,207,140,209,232, 23, 77,222, 87,
- 35,199, 70,221, 90,253,166, 53,167, 62,151, 75,138,120,239,196,170, 37, 67,188,107, 73, 98,138,233, 46, 40,135, 1, 14, 11, 60,
-119, 69, 72, 71, 9, 89,119,132, 3, 67,249,198, 27,107,120,177,135,151, 34,225,118,129,147, 23, 32,253,187, 16, 63,235,140,243,
- 96,254,244,248, 87,112,241, 63,163,223,249,128,242,123, 91,242, 55, 47,200,247,119, 22,125,218,155, 6, 82,122,177, 36, 57,127,
-250,202, 42,216,123,124,205,212,235, 82, 10,186,197,186,249,152,209,247, 39,228, 98, 66, 62, 62, 33,107,167, 54, 93,241,207, 38,
- 42,217, 74, 4, 92, 40,241,125,179,108, 49, 40,252,196, 33, 92, 13,232,170, 48,253,127, 27,248,242, 99,194,171, 29,225,167, 59,
- 75, 69, 27, 60,151,253,182, 32, 69, 40,119, 70,202,189, 17,174, 65,217, 8,105,172,126,106,241,248, 96, 37, 37,235,192,183, 69,
-121,112, 1,219, 81, 24,124, 92, 56,184, 75, 33,123, 51,158, 60, 2, 30, 32, 63,201, 92,121,115,107,209,171, 87, 11,114,154, 77,
- 39, 48,246,232,173, 0, 55, 59,248,187,215,144, 17,194,131, 72,247,217, 14,185,179,101,122, 48,218, 65,103,212,121, 26,222, 42,
- 98,247,206,150,165,217, 13,183, 81,151,141, 7,186,236,141,110,132,210,108,141,235, 42, 71, 84,246,145, 30, 66,227, 70,113,239,
-251, 37,187,105, 21, 67,201,222, 30,186, 1, 93, 56, 32, 99,102,126,235,228,254,238, 64,167,197,114,196,235, 20, 41,152,162,189,
- 0, 57,139,175, 26,172, 8,150, 25,177,202,220,209,236,145, 68,159, 82,123,195, 58, 64,103, 35, 40,138, 42, 67,118,191,185, 23,
- 40,117,211, 77,251,222,168,238,167,151,213,226,158, 91,139, 92,245,221, 4, 8, 26, 22, 79,127,147, 10, 38, 31,162,109,194,187,
-167, 73, 77, 12, 53, 54,121,221, 73, 76,105, 95, 37, 32,197, 31,190, 65,132, 18, 35, 18, 59, 99,136,171, 71, 57,251, 33,103,244,
- 78, 81,220, 75, 95, 60,127, 92, 93, 87, 80,161,244,165, 2, 99,114,178,102,162,212,180, 46, 43,251, 29, 32, 18,153,130,123,188,
-103,130,159,237,187,231,241, 56,151,140, 15,218,252,172,212,173,141,173, 15,164, 1, 96,181,160,206, 60, 43,172,151,104,213,125,
- 91, 90, 43,144,171,144, 30,109,248, 48,178,160, 90, 29, 81, 43, 10,177, 75, 72,234,200,211,248,148, 35,142,189, 78,223, 39, 6,
- 65,230,216, 96,217, 27,100,215, 57, 85,245,142,139,229,152,119, 29,131, 22,198,237,214,176,190, 18,200,101, 32, 79, 19,154, 39,
-255, 90,101,175, 99,174,133,214,137, 77,243, 72,190,226, 99, 5, 63,216,214, 48,156,217,211,175,174,196,119,182,124, 21,205,169,
- 77,166,171,160,148,102,205,146,203,178, 72, 81,215, 8,132,228,236,120, 64,250,142, 60,142, 38,164, 21, 3,109,233,222, 33,129,
- 61,176,141, 89, 15, 45,174, 54,254,147,231, 15,127,179,115,201,237, 16,132,243, 24, 56,147,192,185, 8,103, 8,231, 42,148, 96,
- 23,213,249,144, 57, 45,133, 33, 22,138, 20,134, 97, 96, 60, 31,152, 30,111, 41, 31,236,208, 59, 35,124, 5,248, 82, 68,255, 84,
-224,173, 1, 57,127, 7,228,139, 32,191, 11,250,117, 43,230,114,203,189,239,189, 23,154,232,197,254, 25,235,236,229, 69, 43,224,
-225, 58,196,231,160,123,198,232,118,156, 58,147,251, 10, 28,128,156,236, 96, 93, 22,190,106, 87, 79, 56, 97, 70,248,121, 12,149,
- 91,115,150, 43, 81, 90, 26, 66,176, 44,240,250,123,203,180, 48,181, 43,163,125,102, 16,248,205, 16, 5, 82, 20, 58,119,234,229,
- 73,103, 82, 86,185,116,209,215, 67,111,244, 8,240,206,215, 33,227,162,105,154,213,173,193, 85,190,177, 89, 61, 31,116,194,202,
-199,238,215, 50, 60,251, 92,164,127,110, 69, 56,233, 9, 39, 43,226,173, 53,225,246, 1,124,180,135,143, 9,242, 66, 15,135, 31,
- 55,184, 15, 47,219, 45, 47,226,170,174,127,138,190,247,127,192, 31, 63, 36,255,175, 23, 76, 95,127,204,227,237,192,233, 90,121,
-146, 96, 80, 37, 4, 11,111, 56,223, 40, 59,207,139,150, 11, 53, 61,198,181, 68,184,209, 67,143,165,181,157, 78,232,131,209,176,
-173, 23,217,146,225,178,218, 52,229, 8, 75,169,187,155, 41, 63, 28,209, 15, 50,122,191, 32, 71, 1,249, 72,132, 51, 69,142,109,
- 26,160,113,162, 92, 12,236, 94,223,112,246,198,142,139,191,216, 81,222,218, 33, 79, 38,228,186, 16,126, 97,141,124,126, 77,120,
-181, 39,124,106, 69,120,177, 51,209, 75, 54,122,220,202,109,248,235, 35, 97,213, 43,195, 4,167, 91, 97, 82, 97,235,197, 96, 48,
- 83, 4,131, 86, 2,155, 80,130, 44, 78,135, 8, 97, 80,210, 46, 47,214,133,173,189,118, 75, 35, 1, 78,122,120,121,133,188, 63,
- 64, 17,226,115, 29,193,151,160, 53,221,172, 6,243, 8,210, 6, 40, 45, 69,254, 82,138,149, 94,162,115, 20,246,187,241,189,223,
-223,196, 35, 7,167,183,153,114, 59, 46,192, 87,185,100, 60,158, 83,187,100,190,208,164,249, 1,130,167,101, 77,197, 56, 19,234,
-243,253, 18,116,246, 52,151,185,251,150, 89,147, 82,153,236,197,185,237,243,175, 6,129,106,126,110,153,247,193,210,116,109,201,
- 15,197,125,130, 85, 12, 36, 49,215,192,144, 97, 82,221,167, 46, 58,133,113,200, 31,190,210, 74, 1, 58, 31,163,103, 17,247,198,
-203, 98, 41,144,250, 90,131,143, 59, 3, 53,149, 57, 86, 8,141,180,130,172,101,149, 48,185, 37,111,116,212,108, 85, 94, 71, 87,
- 61,219,180,219, 16,164, 65,162,107,106,220, 83, 92, 20, 77,201, 15, 58,117,159, 95,156, 74,233, 3, 19, 17,186, 40,164, 32, 75,
- 4,172,199,228, 22,138, 13,199,213,156, 8,234,175, 33, 5, 33,164,206,198,210,212,247, 95,103,172,108, 16, 89,160, 53,254,179,
-170,200,211,158,242,102, 20, 95,199,136,245,181,137, 29,227,150,126, 94, 91,234,159,238, 7,139,104,227,125,170, 30,106, 93, 4,
- 73, 22,181,107,201,104, 81, 32,174, 14,252, 64, 56,205,187,116,109, 2, 77,236, 32, 22,136, 30, 1,171, 85, 32,217,220, 52,218,
- 72,239,140,235, 30,232, 82,207,122,213, 83, 98, 98,179,221, 32, 37, 67,180, 41,137,141,221, 7, 11,128,210,203,200, 28,153,223,
-131,138,221, 53,247, 66,216,211, 47,204, 83, 3,145,189,110,219,244, 6,121,185,113,253,123,180,160,229,197, 37, 33,203,184,195,
- 79,216, 85, 64, 87,170, 69, 83,156,248, 55,141, 14,227,105,217,184,230, 93, 15, 18, 45,152, 70, 76, 20, 40, 41,154,219,226,191,
-124,246,240, 55,147, 27, 53, 11,194, 64, 96, 7, 70,179,242, 4, 31,137, 48,168, 24, 88, 76,132,173, 8,155,108,182,240,199, 17,
-206,162,112, 30,149, 49, 20,114,158, 40,155, 1,121, 48,193,157,130,126,165, 67,190,209,193,102, 68,210, 29, 83, 87,151, 63,176,
- 81,187,220,246, 29,188, 35, 95,101,106,150, 93, 14,169, 9,215, 76,148,151,110, 67,255, 12,132, 11,131,105,107,130,238, 0, 57,
- 84,228,218, 0, 87, 11, 28, 57,219,187,143,150,246,229,209,122, 18,237, 36, 99,170,156,138, 76,117,193, 69,146, 69,125, 61,184,
- 98,183,217,197,213,247, 63,213,164, 40, 23,107, 71, 49, 21,122,113,210, 85,181,140,176,247, 16, 95, 38, 80, 33,154,170,182, 51,
- 81,186,237, 17,235,206,181,209,102,204,130,112, 63,163, 28, 4,179,172, 29, 71, 56,217, 40,215,111,116,244, 31, 63, 32,244, 43,
-226,141, 3,194,237,181,101,215,127, 60, 32,175, 4,228,218,179,176,250, 60,196,159, 55, 42,160, 76,222,230, 60,130,241,127, 65,
-223,254, 38,124,185,144,255,112,195,238,205, 51,238,167,204,253,149,112,166,182,107, 62,203,246, 64, 60,219, 9,143,118,194,102,
-244,144,176, 2, 93, 22,194,245,104, 35,118, 1,253, 96,162,220, 29,152, 30, 78, 51, 46, 32,111, 50,242, 36, 19,206,213,114,228,
-223,203,148,187, 19,250,129, 89, 15,195,115, 9,249, 72, 71,120,161,179,234,250,110,134,105,160,188,189, 65, 31, 14,156,159, 21,
-222,139,118,173,157,110,149,241, 97, 38,252,104, 36,190, 51, 18,158,137,200,107, 7,200,203,107,228,246,138,248, 82, 32,220,140,
-196, 40,164, 67,232,110, 5,226,181,128,158, 41,167, 79,224, 34,135,121,165, 49, 78,230,126,156,178,237, 24, 83,172, 39,106,153,
-187,178,236,159,163,168, 18, 55,254, 48,149,154, 75, 84,233, 97, 10,215,123,120,190, 71,238, 26, 66, 82,158, 75,200,198,191, 81,
-242,192,135,184, 60,232, 68,247,211,169,246,241,150, 11, 35, 91, 26,161, 84,227,128,219, 91,197, 5, 22,123, 86,106,246,241, 33,
-232,158,233, 68,218,125,186,196,249,139,213, 68,171,217,102,227, 86,174,162,178, 32,152,235,175, 36,243, 20,161, 52, 83, 37,196,
- 19,187,128, 66, 88,246,231,218, 60,238,157,119, 94, 2,205,247,182, 78, 38,122, 88, 75, 77, 74, 78,224,185,240,202, 38, 11,219,
- 22,246, 82, 41,113, 52,224,193,150,218, 86,197,167,158,174,140,109, 63, 24,170,149,203,119,229,177, 41,216,234, 93,117,240, 2,
- 22,188, 16, 90,199, 83,215, 95, 58, 11,217,212,225, 31, 90,242,114,152,168,138,230, 70,164, 92, 21,202, 82,227, 58,125,250,161,
- 49,153,142,160,100,119,228,152, 45,169, 52,184,240,250,115, 76,237, 7, 30, 22, 37,248,172, 76,247, 3, 9, 41,206,251,233, 16,
- 59,223,175,218, 26,160,175,190,123,177,178,220,137,165,159,153, 37,177,204,182, 50,221,187,246,164, 25,149,219,243, 81, 69,246,
-124,225,101,239,242,213,189,195,128, 60,125, 78,152,133,101,181,232, 74,140, 4,132,212,245,214,165,231,105, 57,232,180,250, 38,
-239, 66,103, 94,187,132, 69, 8, 22,132,167, 96,180, 62,114, 79,201, 52, 9,113,213,179, 25, 71,166,221,206, 72,131, 37, 51,229,
-201,196,210,165, 44,163,107,221, 79, 61,146, 86,101, 31,130,255,114, 17,170,255, 60, 93, 76,116, 93, 79,136,209, 14, 89, 94,128,
-149, 96,160,167,185,235,215,217,103, 95, 49,183,165, 2,206, 40,174, 43, 89,126,158,146,173,139,148,102,255,102,105,123,186,103,
- 69,173, 48,160,224,201,112, 82,181, 6, 62, 33, 10, 18,136,255,228,249,227,223, 76,110, 13,153,138,237, 27,183,165, 42, 69,157,
-103, 21, 2, 59, 21,206,179, 48, 98,234,234, 18,133, 93, 17,182, 69,217,169, 37,144, 93,136,176, 11,194, 38, 9, 83, 80,162,102,
-194, 52, 89,123,116, 39,194, 55, 58,120, 91,225,226, 62,116, 95, 70,226, 23,172,157,139,175,120, 1, 58, 48,196, 23,161,153, 1,
-137,137,232,194, 53,203,173,238, 94,128,238, 42,244,147, 37,141,165,222,232, 99,199,130, 92,203,200,245, 1,174,103, 56,193,212,
-213,201,192, 6,210,133,229,131, 74, 11,171, 82,130,123, 33, 39,245,128, 23,165,234, 66,234,141,218,121, 49, 78,209,111,190,232,
- 65, 15,197, 44, 73,237,184, 61,200, 37,212,165, 44,112,139,152,236,225, 49,233, 62, 37, 74,196, 58,254,228,162,245,181,135,158,
- 29, 39, 51, 35, 28, 5, 88, 35, 28, 61,211,179,250,236, 49,225,228,144,240,194, 10,121,173,135, 79, 4,120, 45, 34, 55,175,195,
-193,103,172,152,199,143, 2,174, 99,144, 96,106,247,233,183,209, 7,119,225, 59,145,252,197, 51,118,175,159,242, 65, 46,124,224,
- 7,180, 41, 91,214,205,206,245,104,231,158, 6, 42,193, 58,136,149,194,250, 40, 18, 95, 94, 17,110,116,246, 30,110, 76, 64,183,
-221, 42,143, 51,108, 85,216,170,112, 49,193,230, 65, 97,120, 47, 19,207,149,120, 40,200,237,100,221,245, 47, 31, 32,183, 18,250,
-142, 41,158,202,247,183,148,247, 7,166, 63,185, 96,251,112,226,145,103,166, 76,110,118,216, 69,216, 78, 74,185, 59, 18,191,186,
- 69,238, 77,179, 93,144, 46, 34,193,198,251, 37, 23,244, 73,161, 60, 42,236, 46,148,179, 81,216,101,153, 95,211, 99,255,107,138,
- 86,208,131, 68,255,188,150, 66, 23,196,172,100, 89,108,142,155, 54,101,230,105,115, 86,144, 51, 69, 14,253, 3,189,209,195,205,
- 4, 63,154,144,117, 64,142, 2,250, 32,155,171, 33, 25, 54, 54,164,104,145,198,200, 94,199,189,116,244,117,124,185, 60,164, 90,
- 77,198,194, 16, 95, 58,220, 24, 27,206,251,188,107, 92,148,187,114, 57,193, 41,132, 26,206,108,191, 55, 93,154,161,138, 93,195,
-243,232, 81, 91,162,152,236, 9, 56, 39, 87,186,151, 25,194, 18,108, 53, 85,154,189,174,119,219,203,136, 93, 23, 37, 59,150, 85,
-208, 71,235,112,131,207,115,173, 11,134, 11, 21, 70, 31,249,106, 67,155, 75,254,217,132, 70, 16,215, 24, 2,230,131, 77,242,221,
-124,141,118,152, 27,116,135,208,172,130,160,151, 86, 14,117,102, 17,252,160, 31, 28, 98, 83,154,221, 63, 78, 81,107,243,205,235,
-103, 90, 90, 15,121, 51,117,169,185,221, 26, 92,217,172,217, 4,103,170, 51,102, 87, 47, 77, 27,180, 10,179,106,161,245,221,115,
-253,123,149,128,132, 72,137,201,139,126,130,212,161,211, 96, 62,237, 70,253, 62,239,164,133,134,199,111,141,197,222,126,189,249,
- 61, 75, 38,183,189, 31, 42, 97,111,135,141, 11, 61,151,117,146, 46, 63,248,229,162,126,185,171, 76, 70,145, 76, 18, 72,171,181,
-173,110,178,189, 11,165,148, 61,155, 66,181,172,133,154,128,134,161, 88, 45, 0, 70, 46,145, 76,237,189, 78, 49,178,234, 87,172,
- 86, 43,134,162,236,182,155,217, 89,148,167,201,173,205,121,129, 70,181,247, 73,179,187,183, 2,153, 22,145, 99,213, 63, 4,119,
- 21,185,242, 93,221, 26, 87,113,177, 18,189, 1,110, 24, 1,141,126,112,161, 9,126,152,164,203,237, 11,179,170, 61,134,246, 6,
- 95,152, 38, 78,178, 11,226, 93,121, 12,132, 24,188, 67, 79,243,247, 73,193, 97, 7, 8,236,138,199,130,170,123, 17, 85, 40,158,
-220, 54,170, 48, 86, 11,150, 58, 71, 58, 70,198,146, 9,110,247,144, 82,216,169, 18, 35,108, 5,182,162, 28, 78,153, 62,103,186,
-243, 29,221,251,145,240,122, 79,248,227,158,240,249, 53,250, 31,223, 67, 62,241,223,193,201,111, 67,255,239, 67,250,101, 27,205,
-203,161, 21,114,137,205,192, 78, 32, 30, 89, 97, 15, 47,195,234,151, 12, 85,171, 27,243,181,231, 7, 6,180, 25,127,132,108,238,
-194,246, 33,156,239,208,135, 1,222, 11,112, 47, 34,167, 9,121,164, 48,140,200,110,162,236, 2, 58,100, 66, 54,180,168,246,138,
-140, 98,224,137,156, 73,106, 83, 10, 89, 7, 27,207, 79,214,201,215,241,162, 20,217, 75,196,154,109, 12,141, 66, 84,154, 28,104,
- 84,108, 55,231,191,127,229,250,164,212, 80,244, 87,106, 39,109, 27,183, 7,226,145, 16, 83, 71, 56,234,136,159, 61, 68,174,247,
- 22,247,249,140, 88, 86,250,209, 53,136, 47, 65,120,205, 98, 68, 37,154,131, 64, 31,185,100,127, 7,211, 23,209, 39,239,194,247,
- 2,229, 95, 63,102,124,253, 9,247, 39,248, 64, 2,231,147,204, 86,161,177,250,168, 39,251,153, 87,126,245, 69, 85, 86, 2,225,
- 70, 34,220,234, 9,199,201,146,235,130, 61,233, 71,204,230, 55, 84,125, 73,177, 7,228,245, 91,166,115, 8, 31,237, 8,159, 62,
- 48,128,119, 14,232,159,109,209, 15,132,248, 55,122,228, 35, 9,125, 50, 50,141,133,109,191,116,211, 67, 94,114, 93,114, 7,186,
- 10,148, 60,113,237,171,103,116, 15, 39,226, 11, 61,178,142,148,123, 19,211,219, 3,211,253,129, 39, 99, 97, 27, 33,135, 96, 63,
- 79,134,179,193,214,250,227, 84,117, 47,118, 83,104,130, 62,218, 40,112,187,181,113,123,116,111,233, 78,224,113, 50,146,223,241,
-253,137,245,227, 76, 60,152,208, 65, 73,189, 89,160,136, 1,158, 59,128,191, 1,124,245, 2,185, 46,196,155,153,252,227,193,140,
- 31,149,233, 62,170, 45,238, 55,153, 32,197,212,250, 90,133,152,142,106, 45, 11,251,189, 37, 60,148,176,175,237, 20,177,183, 80,
- 23, 25,200,242,192,111, 81,150, 94,237,212,219,254,121, 72, 16,170, 4, 95,125,255, 44, 85,227,118, 89, 81, 54, 63,108, 66,168,
- 63, 87,125,192, 4, 38,191,186,117,198,182, 26,247,191,140,101,166,178, 73, 85,189,207,216, 83,211, 88, 7,159,134, 20,241,174,
- 84, 27,229,186,238,143,122,235,215,233, 92,155, 66, 83,208,105,242, 92,234,136, 92,138,199, 28, 8,172, 28,224, 82, 71,245, 49,
- 88, 81, 47,126, 24,183,189,166, 54,244,252,133,254, 84, 59,251,209,127,134,224,239, 67,104,172,167,200, 94, 56,157, 77, 4, 2,
- 77,167,102, 74,108,153, 70,235,192, 42,221, 46, 5,239,218, 23,171, 88,104, 68, 97,170, 75,135, 44,168,237,239, 3,236, 84,102,
-174,123, 8,201, 4,120, 10,196, 14,101,103, 36, 52,255,190, 83, 61,172,168,204, 92,179, 73, 13,101, 28,129,222,223,155,249,240,
-243, 33, 12,208,162,151,131, 67,234,103,210,232, 54, 46,195, 81,218,110,215,167, 96,162,190, 6, 21, 33,170,210,245, 43, 8, 17,
-245,104, 85, 81,221, 79,117,243,247, 68, 90, 7,130,182,234,144,197,119, 87, 61,229, 97, 46,234, 61, 37, 4,134,205,150, 80, 89,
-238,117, 26, 48, 90, 28, 80,144,200, 42, 5, 52,216,103,150, 27, 52,171, 93,226,145,152, 18, 93,215,205,240,155,226,160,163,162,
- 22, 82,148, 27, 75,164,173, 21,146,173, 60, 82, 90,186,110,221,223,251,235, 37,191,253,190, 32,209, 68, 86,245,112, 95, 17,225,
-162, 32, 41,218,100,106,154,252,144,211, 30, 34,236,160, 17,194, 2, 26, 50, 7, 73,144,121, 31, 51, 2,147,216, 15, 61,185,106,
-117, 66,216,249, 15, 49,250,155,222,213, 27,215,119, 73, 18, 29,171, 88,160, 99, 66,180, 48, 40,236,180,112,234, 76,145, 21,112,
-156, 39, 14,207, 38,186, 39, 23,164, 63,236,145, 63,235, 9,175,101,228,231,190, 14, 31,251, 6,242, 98,128,171, 7, 22,125,217,
-157,216,158, 61,173, 65, 78, 32,253, 12,164,159,131,240,138,237,218,229, 25, 22,163, 76,163, 52, 42,231,214,153, 14,223,132,205,
- 23,144,231,190, 7, 47, 61,130, 39, 91,244,161,192,155, 17,222, 78,132,123, 29, 34, 35,154, 50,165,207,115, 50,155,157,170, 27,
-245, 71, 7,244, 1, 29, 45,130, 53,228,209,139,185, 86,247, 12,157,143,210,170, 69,106,142, 81,172, 55,108,116, 17,203, 76,176,
-242, 29,125,180,140,231,228,251,246, 20,133, 24, 3, 97,109,145,161,225, 56, 17,174,116,200, 65, 66, 62,217,195, 11, 17,174,129,
- 92, 89,195,250,186, 79, 56, 94,114,113,161,130,108,236,223,229, 55,161, 60,182,201, 71,249, 62,236,222,128,215, 3,229, 79,207,
-152,190,245,152,199, 67,230, 65, 20,158, 56, 13,175,158,188, 39,167,140,197,149,189,236,226,163,200, 94,160,235, 3,225,102,103,
-163,247, 20,188,245, 85,202,206, 10,250,136, 21, 78,124,191,121,120, 37,178, 62, 14,132, 11, 67,193,234,195, 9,221,128,126,175,
- 32, 93, 36,254,108,135,220,240,216,200, 81,225, 43, 66,159,148,131, 4,103, 59, 22,102,183, 26,129,237, 2, 40,209, 72, 46,215,
-222,219,161, 39, 66, 58, 84, 3,226, 93, 4, 56,181,135,245,105, 14, 84,237, 77,241, 88,207,106,149,138, 53, 6, 52, 66,223, 5,
- 62,254,249, 67,158,220, 31,249,209, 95,110, 76, 97, 30,173,238,141, 46,234, 26,197, 14, 25, 7,131,114,117, 26,231, 27, 48,173,
-163,217, 63, 99,132,151, 14,108,180,240,253, 45,225,213, 53,114, 14,122, 62, 17, 79,108,119,146,207, 38,244,116, 48,225, 97, 49,
-152, 75, 81,157, 33, 70,165,232, 2, 86,201,203,228,187, 92, 66, 94, 87, 81,230, 44,116,247,247,134,230,159,159,222, 18,178,191,
-255,204,151,214, 0, 82,139,188, 49, 85,181,185,157,172,234,235, 66,156,115,229,242,232,226,174, 50,103,144, 7, 51,138, 85,161,
-206, 12, 60,241, 0, 16,196,174,117,223,101,217,110,190,236,231,151, 87,250,153,180, 80,168, 37,200,101, 22,153, 46,176,233, 5,
-222,211, 12, 30, 70, 42, 93,216,246,199,187,106, 19, 84, 37,168,204,247,229,194, 90,175, 83,135,101, 4, 92,194,114, 88,216, 91,
-159,205,135,243,101, 87, 93,119,217, 58, 79,124,100, 22, 10,106, 76,150, 12, 87, 44, 61,174,166,122,197,152,172, 56,228,130, 78,
- 19, 57, 27, 85, 45, 72,211, 61, 42,179, 66, 94, 27,229,191,109,127, 50, 90, 70, 8,201,222,247,225,194, 24, 26,213, 49, 80, 61,
-220,190,225,174,247, 80, 13,242, 25,253, 32, 21,155,149, 68,110,196,126,168,208, 14,230,231,228, 57,173,154, 3,105, 20,219, 50,
-179, 22,120,170,104,201,156, 82,134,239,253, 87,171, 21,221,106,205,118,156, 90,103,221,194, 96,111, 38, 47,115, 44,235,158, 52,
- 68,246,200,199, 53,208, 36, 5, 43,232,146, 18,227, 52, 89, 80,139, 59, 15,114,182,168, 83, 45, 21,237, 92,220, 30,231,137,109,
- 68, 7,208,100, 23, 38, 71,250,149, 29, 60, 74,158,252,221, 95,246,230,168, 54,215,110,153, 25,250, 22, 24, 19,144,148,128,201,
-244, 13, 69,247,209, 59,210,236,211,139,101, 0, 84,237, 87,169, 86,194,246,186, 11,158, 84,217, 89,250, 32,174, 51, 8, 33, 44,
- 59,127,191,182,202,124, 24, 86, 82, 41,206,124, 22,179,162, 84,207,232, 6,191, 17,138, 25,226, 17,153,173, 67, 89,101, 30, 31,
- 34,193, 34, 6, 93,241, 90,196,198, 78, 5,227,227,166, 98, 93,255,128,146,131, 48,117, 74, 15, 28,234, 72, 58, 29, 9, 95,139,
-200,215,163,239,188, 3,114,248, 24,185,254, 24,110, 1, 30, 28,199, 21,133, 27,191,135,188, 18,224,197, 99,184,246, 73, 56,252,
- 47,160,251, 5, 8, 55, 61, 74,212, 91,159,152,140,122,215,189, 6,135,255,158,117,241,227, 29,216,253, 57,178,251, 50,188,250,
- 6,122,111, 11,175, 71,228,135, 9,121,208, 17,114,221,215,248,227, 47,251, 77, 85,178, 49,201,139,129,110, 74,202,104, 74,168,
-102, 98, 81,210,228, 98,136,201,118,105,165,152, 98,188,120,236, 34,201,131, 56, 74,158,115,168,235,222, 60, 6,155, 14,196, 40,
-150,240,117, 20, 9,171,100, 83,129,227,132, 92,239,144, 43,201,222,135,219,192, 51, 43,164, 63, 49, 93,129,124,196,243,207, 87,
-214,163,148,187,192, 99,136,159, 48,178,223,244, 61, 43,246,211,219,160,223, 69,223, 41,232,183,183, 76,223, 57,229,236,108,228,
- 81, 18,182, 59,131,132,100,160, 83, 27,135, 74,103,157, 75,242, 61,126,240,189,126, 63, 9,241, 70, 34,220, 92, 33,199,209, 42,
-227, 35, 12,135, 90, 44, 59, 62,142, 16,163, 5,118,172, 18,200, 88, 56,255,192,104,190,221,157,204,234, 71,153,120, 18,137,215,
- 58,226,231,123, 68, 35, 92, 24, 30, 75, 78, 18,161,143,232, 38,179, 58, 22, 11,133,217,249, 65,210,249, 0,243, 3, 47, 26,110,
-246,218,155, 59,228, 68,136, 47,117,164, 85,135,110, 38,142,222, 29,216, 1, 15,139, 5,234,132, 58, 13, 9,206,206,247, 14, 34,
-250, 40,229,237, 31,108, 57, 63,205, 11,145,214, 7,159,163,175,206,147, 56,172, 16,115, 31, 92, 57,157, 64, 46,144,215,133,212,
-249,174,164, 83,248,216,177, 9,234,238,239,144, 79, 31,192,191,184,128,151,123,248,123,107,194,151,158,160,239, 41,218,179, 71,
-242, 82,109,243,178, 23, 52,106,171,232,110,133,150,179,142,206, 71,247, 84, 45, 6,218,128,167,116,217,151,151,253,209, 40, 13,
-103, 93,171,184,206,164,213,196,138, 37, 45, 77, 50,161, 87,181,146,173,123, 33, 66, 16,207,146,207,130,134,122,221,123,239, 60,
- 93, 66, 87, 6, 33, 21,153, 83,199, 74,168, 28,124,157, 11, 73,165,112,133, 69, 85,199, 20,162, 63, 0, 77,249, 94,167, 10,179,
-189,190,138,192,252, 1, 22,154,201,151,248, 78,186, 23,232,171, 71,155, 5, 30, 80,234,193,192,109, 65,193, 5,114,185,161,174,
- 40,206,178,154,173,136, 50, 91, 75,235, 62,179, 30, 90,234, 55,158,115,189,213,173,174, 33,154,255, 60,103, 74,140, 51,105,178,
- 79,137, 28, 34, 69, 18, 49, 41, 41,140, 72,182,144, 42,113,127,118, 3,255,195, 66,167,131,231,183, 23, 71,235, 66, 41, 22, 70,
- 82, 98, 50,124, 51,173, 51,103,102,141,241, 52,138, 67,246,121, 94, 77, 54,124, 17, 59,130, 21, 95, 7,137, 86,246,187,204, 57,
-242,251, 35,118,153, 35, 94,165,237,166,165, 25, 29, 35,115,146, 89, 23, 18,221,234,208,237,142, 77,158,176, 54, 0, 46,183, 84,
- 46, 98, 60,217,203,173,159,109,201,243,244,199, 33, 51,169, 35,246, 61,147, 42,227, 48, 56, 62, 87,152, 38, 11,135,209,113,156,
- 89,219,138,185,148,132, 60, 35,137,139,179,236, 83,234,232,250,149,105, 40,114,158, 39,214,185,174, 7,244, 50,202,169,174,230,
- 29, 78, 36,246, 44, 15, 49, 94, 10,121,113, 28,114,104,167, 30,101,241,181,187, 38,160,136,160,121,108, 88,238,246,223, 82, 12,
-224, 40,221, 86,115, 80,149,157,170, 75, 6, 0, 64,146,104, 29,206,232,136,193,209, 97,109,163, 95, 0, 81, 5, 25, 50, 18, 35,
-147, 8,145,192, 40,236,219, 10, 84,232, 66, 32,198, 64, 25, 97,146,108, 54,175, 92,201,105, 54,194,202, 82, 49,167, 86,228, 87,
- 65, 89,147, 9,100,207, 76,142,200, 20,145, 15, 4,238, 86,207,133,239,192, 83, 32, 28, 7,228,246, 22,126,241, 43,200,231,190,
- 14,207,223,132,107,159,129,245,175, 88,190,123,188, 5,242,156,121,223,137, 6,192, 73,135,144, 94,130,131,191, 13,229, 55,224,
-234, 29,228,198,111,193,179,127,130,126,236, 49,188, 5,220, 79, 48, 90, 91, 32, 71,190,199, 28, 50,108,221, 86,245, 16,232, 51,
- 97,116, 10, 29,101,137, 79, 84, 39, 61,121, 48, 12, 59, 79,130,171,109,161, 47, 35,235, 72, 91, 86,130,116, 98,160,152,181, 64,
- 31,145, 99,219,201,154, 95, 45, 26,227,252, 42,214,149, 31,175,224,224,182,197,213,202,243, 70,128, 67,141, 8,151,239, 25,176,
- 71, 51,164, 23, 32,188, 4,195, 31, 66,233,205, 22,168,223, 67, 31, 94,192,119, 38,242, 55,207, 24, 78,119, 60, 10,194,227,209,
-120,221,197, 39,178, 93,178, 61, 62,190,239, 79, 1,214,201, 16,180, 43,224, 64,132,120,163, 39, 92, 79, 8,209, 0, 63, 15, 21,
-206,204,207, 28, 4, 86,201,234, 91,181,118, 14, 19, 60, 25,237,198, 93, 71,229,170, 22,142, 21,226,173, 14,185,217, 35,215, 87,
-240,126, 49, 10,224,113, 38, 30, 7,219, 24,172, 23, 1, 98,110,146,188,166, 98, 41,108,165,152, 31,189,127,152, 57,121,125, 68,
-186, 64,120,161,163,123,237, 0, 57, 83,202,163, 76,174,215,244,100, 7,168,164, 21,175, 45, 51,212, 37, 79,133,247,223,207,172,
- 68,109, 44,234,237, 88,197,243, 22,199,163, 86, 21,214,217, 36, 4, 81,174,156, 22,132, 45,225, 71,102, 65, 33, 4,248,104, 66,
- 62,125, 8, 95, 43,112, 18,225, 51, 5,190,191, 67,255, 56, 51,125,111,135, 70,157,103,157,243, 16, 72,246,163,122,171, 2, 61,
-243, 52,144,104, 22,212,150, 57,102,126,121, 92, 4,246, 58, 2,109,177, 96,123,187, 60,239, 40,213, 24,241,245,125,144,182,147,
- 47,251,129, 40,245,235,148,217, 43,223, 88,211,138,223,224,186, 48,142, 23,113, 94, 65,220,148,162, 46,246,145, 58,234,246,231,
-114,186, 52, 69,168, 73,107, 50, 22, 52, 6, 98, 74,243, 8,201, 24, 13, 54, 73,180, 28,246, 68,233, 35,162,153, 48, 88,216, 83,
-156, 11,251, 82, 24,163, 79, 91,234,208, 88,125, 95, 30,103,135, 65,217,243, 93, 47,226, 68,239, 86,181,217,183, 59,217,177,168,
- 65,133,148, 50, 43,215, 43, 60, 68, 53, 83, 52, 52,194,155,138,180, 30, 17, 85, 70,205,140, 26, 40,253,218,154,131, 90, 44, 66,
- 50,142, 61, 54,202, 13,165, 64,153,102,120,149,250, 78,151, 82, 76, 92,133,144,243, 56,115,171,107, 49, 85, 45,179,112,109,137,
-240,253, 16,112,183,180, 81, 91,203,161, 37,212,174,189,233,152,107,120,141, 92, 78, 93,155,197,143,186, 76, 44,184,188,159,183,
-247, 34,137,176, 90,175, 33, 36,166,113,240, 34, 84,201,119, 31, 22, 21,199,156, 64, 86,156,146,182,183,175,175,163,119,137, 6,
-154, 89,245, 72,136, 76,195,206, 56,234, 33,144,199,113,206, 46,159,111,234,122, 76,168, 7,179,146,253, 62, 40, 86,208, 87, 43,
- 99,221,187,221,176,134,203, 80,218, 57,216,211, 60,118,117, 37,105,113,230,124, 8, 1,141,117, 54,226,138,247, 57, 1,168,198,
- 77,215,207,201,225, 82, 98,235, 86,149,110, 78, 13, 69,148, 24, 3, 49,245, 75,178, 91,158,236,240,221,120,247,139,195,105,172,
- 55,205,164, 18, 3, 90, 44,127,184, 4,231, 66,123,199, 30, 84,152,234, 3,207,223,172, 89,150, 95,253,142,193,253,195,106,230,
-123,213, 72,206, 16,181, 48,170,141,221,234,232, 33, 20,171,145,235, 40, 28,196,192, 65, 40, 28, 38,165, 67, 89,171,113,169,196,
-247, 32, 98, 71, 63, 0, 0, 32, 0, 73, 68, 65, 84, 17,117,175, 20, 74, 33,102,135, 55,156, 9,225, 78, 71,248, 97,135,252,239,
- 32,215,238,193, 39,255, 8,174,255, 17, 92, 87,228,165, 14, 94,125, 14,110,190, 12,135,191,102, 60,249,240,188, 39,203, 37, 43,
-250,235, 27,208,127, 10, 14,223, 66,174,253,115,184,253, 39, 70,199, 27,183,118,165,118, 9,210,202,115, 84,207,208,211, 45,188,
-157,225,110, 68, 30,138,241,206,119,178,204,115,235,174,114,106, 18, 89,166,198,198, 80, 47,254,149, 35, 82, 87,174,204, 63, 12,
-232,145,121,252,103,100,234,177,255,245,176, 67,250,171,166, 43, 72, 31,177, 86,189,170,166,202,133,237,203,203,153,179,246, 11,
-132, 91,144, 62, 7,195,159, 65,126, 8,225, 19,160,175, 27, 55,255,174, 82,190,127,206,244,254, 5,103, 5, 78, 85,216, 78, 14,
-228,243, 44,156, 50, 25,181,183,143,152,142, 96,182,111, 20,214, 2,171,103, 18,225, 51,107,228,181, 53, 28,116,200,189,193,230,
-162, 43, 8,189,176,246,177,237,144,173,144,154, 37, 9,114, 46,230, 86, 84,216, 37, 56,212, 98, 63,242, 22, 19,153, 29,216, 75,
-144,126, 36,220,236,137, 63,222, 65,150,217,164, 48,168,165,104,209, 32, 74, 69,160, 36,216, 5, 88,223,155,144,195, 68,124,182,
- 71, 62,218,145, 56,224,248,219, 27,244,126, 38, 39, 99, 19, 73,150,153,165, 31,171, 23, 56, 7, 36, 40,125, 92,198,170, 18, 27,
- 78,193,222, 67, 38, 88,142,119,130,243,108,239,205,201,249,132,156, 14,116,119,109, 77,194, 42,193, 43, 7,240,147, 71,240, 87,
- 23,240,153, 3,244,206,192,248,229,115,244, 89, 95, 10, 95, 84, 28,234, 50, 95,107,159,105,161, 17, 90,181,236, 2,105,188,192,
- 21, 0, 39,205,181,101,197,210,193, 7,109,182,118, 19,108,210,166, 98,105, 51, 10,176,125,161,167,105, 53, 86,162, 82,187,214,
-218,217, 21, 32, 22,202,232,232,229,169, 32,197, 12,239,218, 20,115,145,253, 20,183, 42, 37, 11,165, 85, 52,219,142, 56, 54,114,
-106,117,133,251,232,130,184,145, 70, 37, 23, 18,218,217,115,104,202,117,135, 47, 22, 66, 69, 68, 53,144,198, 45,157,102, 43,206,
-237,250,162,174, 14,230, 17,123, 29,191,107,131, 44,185,148,149,217,172,205,140,200,230,227, 85, 89, 2, 30,231, 2, 92,173,112,
-158,250, 50,205,225, 76, 58,251,254, 53, 38, 86, 34,196, 82, 24, 52, 27,217, 12, 5, 57,176, 46, 50, 79, 11,107,189,235,136, 39,
- 55,172,176,108,206,208,237,214, 70, 37,117,205, 16, 2,185,136,251,219,179, 9,122,163,146, 99,164,196, 30,213, 97, 1,185, 52,
-188,250, 57, 6,185,233,206, 67, 93, 21, 72,141,212, 21,211, 73,201,178,126,144,214,245,123, 41, 76,165, 85,201,163,234,201,128,
-245,144, 80,199,204, 54, 34,238,251, 53,177, 91, 49,148, 50, 35, 89, 89,230, 29, 79, 37, 97, 70, 26,186,159,234, 30,133, 77, 36,
-122,138, 25,196, 24, 89,117,189,121,210,243, 68,158, 76, 56, 51,150, 98,144,153,108,212,184,122, 3,205,234,125,167,200, 21,191,
-206, 82, 8,196,212,249, 26, 89,153,138,241,224, 43,205,173,213,121, 32,173,192,209,199,102,213,146,230, 10, 87,165,248, 33,112,
- 57,220,168, 51,244,115,201, 75,160, 83,187, 94, 40,217, 5,133, 29, 37,218,164, 64,167,201, 2,105, 58, 83,185,171,136, 9,121,
- 93,143,176,172, 44,202,162,182, 47,153, 84,219,145, 82,187,147, 58,114,172,185,196, 13, 13, 77, 84,233, 28,196,210, 38, 56, 91,
-174,236,228,162,136,142,162,194, 46,143, 78, 71,178,145, 88, 93,215,173,130, 61,168,143,114,225, 56, 10,185,192, 65, 20,203,164,
-214,224,249,193,101, 62, 92,168, 70,186,169,176, 26, 71, 82, 20,244, 8,242,129, 18,186, 68, 24, 58,228,251, 7,232, 7, 35,229,
-189, 29, 12, 59,194,141, 55,144,159,120, 11,254,222,159, 34, 63,125, 2,207,127, 12,142,127, 21,186,207, 67,120,198,232, 42, 56,
-158,246,248,215,225,224, 63,130,233,212,109,114,163,101,198,167,107,134,166, 45,143,144,107, 95,134,231,190, 4,159,120, 7,125,
-114, 97,168,220,236, 94,215,154,141, 93,124,247, 49, 86,168,127,244, 89, 96, 66,164, 44,102,216,222, 21,115, 49, 65, 95,153,152,
- 62,251, 77,226,193, 26, 29,228, 53,156, 95, 88,235,187,254,121, 3,243,200, 19,251, 57,203,153, 85, 69,221,185,186,125, 13,233,
- 19, 48,189, 5,155, 63,131,254,103,140, 28,167,239,161,247, 7,248,238,150,233,238,134,237, 38,243, 40, 8,231, 91, 35,184,106,
-150, 25,215,185, 43, 86,208,241,169, 88,196, 14, 95, 69, 3,199,100,116, 27,144, 28, 23, 21,146, 5,131,219,235,247,220,249,177,
- 30, 18, 10,156, 15,176, 43, 38,152,236, 93,188, 84,218,124,130,173,167,211, 4,177,223,112,210, 19,158,235,232, 86, 22, 77,216,
- 39,179,131,159, 95, 24, 20,169,243,183, 45, 68,123,240, 15, 25, 70, 31,155,234, 54,163,143, 50,225,181, 21,241, 39, 15,144,152,
- 56,249,230, 25,250, 96, 66, 69, 56,171,249,129,137,153, 10,168, 98,187,222,232,226,166, 32, 6,174, 9, 77,220,165, 52, 33,154,
-248, 41,216,241, 61,164, 65, 9, 15, 7, 83,182,175, 34,114, 16,209,131,128,124,100, 13,175,172,225,157, 29,242,239, 28, 33,255,
-167,117,145,210, 21, 52,137, 39, 3,250,251, 80, 22,122,153, 40,104, 84,226, 36, 51,142,184,137,181,110, 73,198, 76,126, 15,149,
-204,252,222,207,221, 64,190, 36,120, 43,151, 30,142,181,197,217,115,244, 52, 44, 87, 31,242,206, 45, 91, 21,131,105, 65,166,134,
-214,230, 28,118, 90, 86,184,239,168,231, 26, 25, 92,164,231, 95, 39,214,209,119, 12, 30, 65,106, 45,179, 56, 9,174,184, 35,187,
-119, 12,236,136,233, 91, 68,237,223, 79, 49,146,177, 73, 82, 41,217,210,217, 98, 32,249,153,169,111,152,239, 89, 13, 54, 82, 26,
-149,246,194,221,119,193,158,191, 93,213,111,220,202,197,130, 86,220,169, 94, 2,221, 44, 19,143,250,185,197,176, 64,129,212, 21,
-227, 69, 11,108,207,209, 16,221, 59, 29, 73,177,179,243,126,183,140,128,139, 19,234,138, 39,126,201, 48, 80, 54,103,196,245, 49,
-101,117,108, 87,219,230,204, 94,175,216, 94,213,114,183, 11,185, 12, 22, 40,162,246,122,136, 61, 26, 59,131, 65,185, 70,160,204,
-130,185,198,126,230,175, 53, 87,178, 89, 61,122,105, 67, 9,110, 69,152,232, 94, 0,139, 74,104,116,255,141, 66, 59, 52,113,170,
-179,141, 77,232,186, 21,253,122,141, 6,241, 36, 52, 43,166,218,232, 42,158,202,110,173, 2,185, 82,156,179, 94,173,151,139,253,
-174, 82,227,186, 85,111, 7, 66, 15,132, 81, 17,198,113, 36,103, 87,220,214,105,211,124,168,113,237,212, 12, 45,183,180,180,144,
-162,127, 46, 94,208,125,154, 48, 67,119,116, 57, 16,171, 79,110,184,196,114,159,189,246,132,185, 27, 23,191,230, 67,116,144, 80,
- 30, 80,151,154,154, 78,193, 52,105, 85,252,166, 51,227, 2, 98,234,172, 75, 15, 97, 33, 52, 58, 50, 87, 36, 88,106,158,235, 79,
- 74,206,115, 4,113,138, 30, 72,145, 51,108,199,194,182,216, 8,222,186, 0,102,225, 72,168,105, 79, 30,176, 16, 93,249, 74,201,
-110, 17,139, 20,133,190, 79, 4,141,140, 27,101, 44,153,186, 41,170, 34,141,169, 40, 35,197, 70,169, 2, 57, 8,121,178,209,255,
- 81, 18,186,100, 98, 49,123,130,217, 60, 55, 28, 69, 79, 78, 10, 14,157, 73,246, 32, 61, 12,112, 8,220, 78,200,185,119,207, 41,
-217,213,249,197,130,126, 97, 7, 71, 95,135,231,191, 14,159, 16,228,213, 53, 28, 31,195,122,237,124,215, 99,232, 79,160,191, 5,
-233, 21,232, 62, 9,221, 21, 72, 87, 92,129,255,140,141,238,251,191, 3,235, 31, 35, 55,223,128,252, 30,228, 45,232,128,144, 23,
- 34,158, 15, 79, 69,182, 32,131,181,160,165,238,114,234, 5, 22,102,106, 20, 83, 54,156,237,198, 44,127, 70,103,115, 21,221,238,
-255,167,235,221, 98,109,203,210,251,174,223, 55,198,152,115,174,125, 57,183, 58,117,239,174,238,118,119,187,219, 54, 77,219,177,
-163, 36, 68,113, 68, 98, 19,130,148, 60, 32, 2,146,133,184, 8, 9,161, 32, 33, 4, 88, 8,241,128,242,196, 59, 32,241,130, 16,
-138, 20,204, 67, 0, 33, 8, 82, 2,137,130,131, 37,156,142,113,140,237,166,239,238, 91, 85,117,117,213,185,238,203, 90,107,206,
- 57,198,248,120,248,190, 49,231, 92,187,154,150,142,186,251,212,169,179,247, 94,107,174, 49,190,203,255,255,251, 63,129,233, 57,
-242,199,127,213,125,230, 31, 88,193, 81,247,118,153,215,131,119,233,201, 58,249,154, 97,255,119, 64, 46,173,107,215,111,194,248,
- 2,222,171,148,111, 31,200, 63, 62,242,162, 40, 47,179,112,200, 22, 61, 31,150,247, 84,137,222, 5, 73,176, 6,188,197, 77,118,
- 64, 39,129,240, 48, 33,103,193,100,228, 31, 29,169,223, 58,146,255,104,100,254,225,204,109,132,253, 12, 71,159,196,198, 8, 23,
-189,185, 13,115,241, 31, 93,160, 70, 89, 94, 2,223,245,216, 31,246,223, 11,143,122,239, 22, 12,114,115, 57,192,163, 12, 79, 71,
-219,171,231,128,233, 0, 20,138,243, 88,135, 51,232,174, 11,241, 73, 33,124, 2,228,245,158,240,165, 68, 55, 85,238,253,254,158,
-114,157, 41,157, 29, 52,199, 54, 80,217,238,178, 67, 19, 96,233, 50, 14, 94, 60,205, 34,167,227, 62,255, 76, 28,139, 23, 25,199,
- 74,120, 49, 33,103,137,244, 94,132, 20,236, 98,127,109,176,215,233, 50,144,254,108, 37,255,239, 47,145,215, 65,250,106, 76,251,
-122, 26,118, 17, 60,189,164,206,246, 58,116,237,194,150, 19, 11,237,210, 41,213,226,216,129, 40, 72,169,166,253,208, 59, 84,186,
-147,237,103,221,228, 88,175, 56,217, 69,248, 67,155,105,111, 71, 2,178, 97,210,235,250,251,106,221,135,212,181, 67, 89,214,168,
- 42,196,160,107,124,176,174, 48, 23,113,113, 34,149,197, 57,162,110,194,182,241,173,137, 69, 37, 84,134,100,218,157,118, 14,217,
-247,215, 56,105,118,184,205,213,206,133,164, 74,212, 74,143, 46,106,245,217, 59,254,122,167,171,172,170, 76,181,122,238, 66,203,
-115,223,164,223,169, 46, 74,253,229,215, 18, 20,104,175, 65,110,161, 42,186,138, 93,219,235, 88,253, 66, 47, 77,139,147,109,222,
- 89,163, 59,136, 82,180,166,167, 6,170,199,126,134,197,238,230, 96,153,170,228,253, 53,189, 42, 12,231, 72, 76, 72,215,163,135,
- 91,170,102,170, 68,123, 33, 99, 34, 12,103,232, 60,219, 8, 57, 23,168, 19, 53, 68,155,108,108,138, 23,105, 35, 32,116,137,147,
-173, 63, 65,149,221,152, 0,193,233, 72,210,246,205, 13, 72,163,235,101, 27, 54, 41,150,237,217, 10, 75, 58,158,137,183,162, 4,
- 98, 55,208, 13, 3, 33, 38,198,108,157,180,120,193,161,101, 21,152, 44,206, 13,109,223,115, 88, 38, 46, 13,214,228, 8,248, 5,
-150,100,130,182, 30, 77,137,105,154,236,117,148,192, 92, 50,101,158,109,181, 81,170,137,235, 54, 72, 92,221, 96, 12,131, 64,138,
-137,152, 58, 23,214,153, 96,174,117,219, 39,101,221,118,159,237,235,172, 32,186,174,118, 54, 41,109, 34, 66,149,232,145,223,234,
-137,130,174, 92, 79, 59,106, 42,246,231, 66, 36,196,224, 4,193, 74,205,198, 55, 8, 49, 34, 77,125,175, 74,206,197, 39, 1,246,
-169, 12,209,179, 0,156,149, 95,171, 17,231,162, 8, 97, 56, 35,229,106,118, 13,149, 96, 35,200, 90,233,124,127,165, 45,234, 83,
-214, 56, 68,169,129,144,172,210,108, 63, 96,108, 10,207, 32,132,110,176,221,210, 56,115,116,196, 93, 16,243,180,207, 42, 36,205,
- 4,133,189,143, 88, 74,182, 70,247,178, 6,204,114, 44,156, 11,244,157,165,129,233,101, 66, 30,236,208, 65, 32,216,155, 36,231,
-189,167,130,121,213, 60,184,118,255, 38, 91, 39,125,168,214,142, 22,224,105, 71,252, 97, 64,190,209,161,159, 15,240,240,104, 54,
-184,177, 66,254, 49, 92,249, 73,253, 90, 68, 62,135,137,158,222,122, 19,206,238, 91,196,172,244,118,129,206, 71, 63,248, 58, 59,
- 85,195,153,135,208,236,124,190,117,180,246,102,206,232,126,143,236,175,205,236, 45,193, 47,113,151, 85, 87, 59,121,116, 95,236,
-251,172, 30, 86,210,139, 5,154, 68,129,239, 30,224, 79,191, 10,151,127, 2,230, 31,122,190,124,177, 40,218, 58,217,197, 46,172,
- 17,184,227, 87, 96,124, 9,247,126, 17,184, 5,253, 33,250,116, 66,191,115,164,124,112,224,230, 86,121,166,129,253,108,251,192,
-236,135,217,208, 0, 38, 98, 62, 97,153,221,250,218, 0, 59, 10, 41, 6,194,227,132, 60,238,236, 95,120, 94,169,207, 50,249,233,
-204, 62, 87, 94,102,235,204, 75, 59, 25,252, 71,142,254,247, 84,255,224, 22, 86,196, 46, 55,126,250, 62, 22,184,181,165,183, 60,
- 48,111,168, 76, 21,233, 97,232,225, 85, 87,188, 30,102,181,177,163, 23, 31, 45, 87, 62, 6, 19,228, 61,248,250,145,112, 30,137,
- 15, 58,228,149, 68,248,249, 11,186,163,114,255,171,123,242,177, 90,224,139,152,210, 63,248,158,119, 59,102, 95,156, 10,178, 73,
-145, 58,101,128, 44,159,235, 42,112,244,196,188,238, 54, 19,158, 79,200, 46, 18,207, 45,242, 86,135,132,188,115,134,254,224, 22,
-126,225,156,240,245, 35,245,199,123, 99,220, 15, 66, 56,110, 14,214,176,233,216,189,232, 24,156, 19, 51, 42, 39,225, 33,213,221,
- 37,217,104,199,164,168,222,137,182,236,128, 37,208,215,179, 11,182,180, 16, 87,177, 47,191,181,166,173, 84,255, 92,171,132, 83,
-139,146,239, 70,181,165, 82,149,214,197,213, 69, 64, 37,226,148, 65, 93, 39,145, 49,232, 18,164,104, 77,191, 44,219,235,224,234,
-229,172,186, 6,164, 86, 59,107, 26,118, 53,169, 57, 66, 6, 10, 41, 4,195, 52,251,159,151,176, 58, 75, 16,232,180,218,216,221,
- 69,113,147,218,133, 94,100,221, 41, 27,190,214,252,245,145,192,188, 88,197, 86,204,109, 92,176,170,237, 82,210,147, 12,243,232,
-254,117, 9, 86,148,196, 77, 39,187, 4,162,196,132,226,226,184, 82,125,132,236, 1, 37,197, 59, 64,173, 72,181,208,141, 26, 58,
- 66,151,176,102,219,160, 35, 18,173, 59,173,227,222,153, 26,137, 20, 19, 12, 3,117, 60, 90,199,158, 11, 85,102, 36,117,132,212,
-129,118,212,108,151,154, 53, 5,137, 24, 59,223,233,250,165, 18, 76,175,100, 5, 85, 65,213, 46,233, 37,145, 82,215,212,175,234,
- 43,207,181, 99,151, 37, 12,163,234,221,100,239,187,197,129,141,222,219, 56, 59,165,142, 16,123, 38,167,185,209, 24, 7, 14, 96,
-161, 5,205,184, 18,156, 37,166,212, 39, 23, 65,238,176, 28,154,155, 34,210,197,142,216,245,182,247, 46, 54,162,202,192, 60,205,
- 94,228,172,147,132,186,201, 34,208,205, 52, 46,132,104,254,249,152,236, 57, 41,229, 14, 5,174,126, 92,144, 80, 55,188,252, 13,
- 97, 78, 54, 43,131,208,188,234,162, 11,114, 57, 0,187,126, 48, 97,121,173,116,201, 96, 49, 99, 45, 28,166,145, 50,142, 14,189,
-113,198, 65,215, 45, 69, 74,174,166,226,215, 90,156, 56,106,161, 47,185, 20,242,116, 68,170, 18, 37,216,212, 34, 37, 82,242, 61,
- 66,212,194,121, 4,145,196,160,133,169,216, 11, 33, 46, 46,201, 62,126,145, 32, 20, 73, 84,169, 11, 53,202,192,133,182,223,203,
-125,100,154, 10,211, 92,104, 5, 67,169, 48, 23, 37, 72,229, 92,108,135,129, 7,173,133, 98,190,236,131, 79,117, 45,197, 72,184,
-168, 74, 31,148,184, 87,139,184, 44,222,229, 14,246,193,209, 32, 75, 26,132,238,149,250, 66,169,199, 64,157, 50, 76,147,137,104,
- 34,132, 93, 68,207,123,226,107,129,240,112,103,221,252,177,218, 92,247, 38, 83, 63,152,209, 39, 5,190, 94,145,223,141,200,195,
- 61,132,175,195,179,201, 78,188, 93,180,121,103,136,200, 89, 7, 15, 2,124, 50,193,219,157,159, 46, 56,197, 78,225, 70,224, 71,
- 25,158, 9,122, 13, 60, 10,240,122, 92, 85,155, 13, 85,151,196, 4, 98,183,110,200,153, 10, 92,249,102,224,137,130,142,200,151,
-126, 5,202, 45,148, 23,158, 45,127,176, 75, 93,111,253,239,115, 1, 96,253, 8,230,119,161,123,211,126, 79,191,142,222,188,128,
-239,102,234, 31,237,153, 94, 78, 60, 15,112, 61, 25,100,166, 20,139,189,204,108,172, 81, 69,204,218,222,146,182, 16, 82, 80, 6,
-133,238,126, 36,188,218, 27, 1, 39, 11,245, 42, 83,158,204,228,219,204,173, 26, 87,125,159,173, 88,104,147, 91, 41,107,199,219,
- 59, 75, 97,241,102,103, 63, 69,167,138,244,209,170,226,164,200,189, 72,188,215,209,189,200,164,170,140,213, 44, 96,187, 4, 53,
- 8,251,227, 74, 85, 44,197, 10,193,171,201,182, 21,114,149,121,248,213, 3,114, 63, 18,126,225, 18,121, 99, 32,126, 25,250, 27,
-229,225,119,247,212,162, 92, 1, 7, 17, 39,202,157,100,165, 16, 88,106, 68, 31,175,174, 76,240,120, 39, 0, 72, 93,188,116, 84,
-232, 50,214,173,239, 2,210, 7,194, 16,224,222, 17, 62,115,137,124, 98,135,190,156, 8,127,225, 62,241,191,158, 96,151,221,116,
-111,185,228,155,245,243,230,114, 48,109,195,208, 40,133,171,190,103, 25,249, 90, 97,161, 39,252,244, 59,167,237,154, 64,184,137,
- 29, 19, 86, 20,106, 46, 91,229,173,189,206,167, 35,119, 57, 9,150, 17,223,187,139, 10,162, 1, 77, 66,210,178,184, 38, 40,117,
-241,131, 47, 26, 32,100, 9, 41,218, 42,203,181,165,134, 45,113,158,235, 48,183, 20,124, 82, 35, 72,138, 4, 85, 82, 45,118, 54,
- 86, 83, 35,119, 18,108,100, 25,212,249, 9,149, 36,202,173,130,207,206, 78,134,185,230, 97,111,113,183,186, 92,202,141, 11, 81,
-165, 69, 28,183, 97,133, 46,187,249,246, 60, 71,239,202,113,151, 95,216,108, 44,172,153, 73, 62,114, 45, 70, 21,243, 73, 87, 43,
- 32, 45, 90,180, 50,249,206,190, 11, 21,173, 35,185, 36,159,134,219,154, 51, 68,199, 91,215,130,206, 35,117,151,168, 2, 93,215,
-219, 69, 55,103,114, 41,134, 14,157, 70, 66,204,132,212,147,186,193, 5,124,246,208,212, 50,251,207,100, 78,129, 20, 2, 85, 12,
- 35,172,165, 16, 81,119, 40,201, 42, 6,245, 11,253,132, 98,232,107, 8,245,243, 95, 54,197,207,106,199,112, 17, 97, 35,244,133,
- 72, 12, 61,161,235,144,216, 83,180,146, 75, 89,162, 99, 43,117, 51,122,111,104,216,182,191,174,104, 72, 75, 17,215, 16,179,150,
- 79, 94, 23, 56, 76,138,137,212,119, 16,133, 60,102, 11,101, 17,131,204,148,121,242,142,185,110,188,255,107,112,202,154,198,102,
-190,242, 16,147,209, 36,107,246,148, 56,255,190,234, 70,212,162,219,156,144, 85, 28,217,170,254,224,250,129,182,222,169,181, 16,
- 98, 34,164, 14, 81,216,197,200,253,251,247,144,110, 96,154, 38, 74,173,204,170,148, 60, 49,231, 66,153, 51, 81,108, 45, 91,169,
-148,108, 1, 62, 49,217,106, 32,249,190,188,106, 37, 16,208, 16,188,179,159, 77,232, 60,236, 8, 93, 34, 87,101, 60, 28, 72,103,
-154, 73, 49,114,214, 65, 41,202, 49, 22,139, 24, 45,190,191,114, 49,213, 81,125, 21, 90,149,218, 71,178, 4, 68,103, 84,133, 33,
- 24, 26, 83,231,130, 20, 72,233,140, 24,111, 57, 23,245, 61, 88,165, 6, 56, 19,229,204, 61,185, 81,108,212,154,130,125,160, 26,
-184,100,170,166,156,190, 81, 97,168,112, 62, 41,195, 97,166, 83, 37, 14,160, 15, 88,103,161,213,104, 28,122, 93,201, 7,101, 76,
- 1, 21, 37,244,129, 46,122,108, 67, 12,118, 74,158,187, 89,118,244, 98, 32, 84,106, 84,116, 7,245, 21, 19, 2,113, 25, 76,189,
-254, 12,244,104,102, 15,153,252, 65,232, 33, 12,138,148, 64,232,147, 77,191,251, 96,151,249, 92,225,170,160, 79,170,157,198,103,
- 98, 13,254,212,153,167,171,110, 20,197,183, 10,151,222,114, 30,109, 70,173, 30,251, 41, 47,129,111,140,240,239,189, 1,195,167,
- 97,255,129, 95,230, 51,212,209, 60,248, 76, 38,209, 15,175, 64,184, 7,183,191, 9,211, 75,184,252, 83,160, 63, 66,231, 31,194,
- 7, 25,253,214,145,242,254,129,155, 12, 47,171, 48,218,121,195, 84,151, 4,223,165, 19, 45,155, 14,181,177,162,135, 0,103, 10,
-241,161,199,142,122,252,153, 62, 49,206,251,177, 8,147,192,232,253, 77, 81,187,172, 60,216,207,238,136, 96,250,207,157,172,246,
- 40,252,245,180,150, 41,192,224, 2,204, 7, 61,225,237,129, 97,154,185,189,205,220,102, 27,195, 86, 3,198, 49, 58, 16,170,115,
-156,255,236, 31,176,235, 0, 93, 23,232,159,102,228,247,142,244,247, 58,228, 11,103,200, 39,122,210, 47, 94, 48, 28, 42, 15,222,
- 59,154,128, 73, 12, 65,154,235,218, 1,167, 53, 55,229,164, 51,113, 30,132,141, 88,239, 28,116,234, 59,246, 3,144, 70,219,175,
-203, 16,237, 87, 23,209,157, 32,239, 60, 66,138,160,159,129,240,103,238, 81,127,235, 37,242, 72, 33, 7,100,170, 54,170,222,100,
-137,107, 93, 55, 53, 49,194,176,137, 24, 61, 73,103,243,248,209, 37,116,124,129, 92,164,211, 97,106, 27,157,120,229, 18,217,116,
-246, 85, 79, 76,110,178,165,172, 53,122,218,242,255,195,186, 50,113,129, 85,148,202,224, 48, 21,203,241, 86, 36, 52,120,145,120,
- 84,100,195,160,174,214, 31,226, 70,168,231, 54,170, 22, 13, 26,124, 50,100,182,159, 0, 69, 73,126, 25,196, 54, 2,199, 58,224,
-157, 27,187, 67,206,156, 73,165,136,145,232, 50,171,216,173,141,198,131, 26,146,182,222, 65,165,136, 95,236, 81, 54, 89,230,178,
-138,234,216,224, 99,131,172,100,191,197,219,173, 44,172,247,186,132, 90,215,165,219, 87,169,174, 36,151, 69,127,144,117,229, 62,
- 12, 1, 83,103,235,186, 94,137,213, 61,212,162, 84,157, 45, 42, 54, 68, 66,133, 97,119, 78, 77,133,227, 60, 34,206, 50,215,106,
- 88,238,160,213, 0, 40, 33, 57,134, 86, 23,236,109,140,105, 65,222, 74, 8, 22,108, 85, 11,193,195,119,216,234, 10,228, 84,192,
-185,237,146,131,216,243, 19,116, 77, 12, 83, 9,171,114, 94,162,237,133,131, 5,181,132,216,249,229,104, 41,117, 21,239,130,203,
-230, 66,119,253, 84, 91,234,139,248,216, 61,207, 70, 77,107, 19, 51, 87, 99,218,235, 31,232, 59,183,176, 21, 37,231,188, 52, 35,
-243, 60,129,110, 80,171, 34,190,191, 95,217,235,226, 46,171, 16,147,217,237, 98,240, 46,120,237,191, 91,110,124,115, 18,168,224,
-168,241,184,136,219,194,170,100,217,192,130,236, 12, 61,239,122,206,207, 47, 8, 41,129, 42,187,174,163,219,237,184,158, 38, 14,
- 57, 51,205, 19,243, 60, 51,231, 12, 57, 47, 59,247,230,188,176, 58,185, 56, 16, 52,210,133, 72, 28,118, 75, 94,122, 6,234, 52,
- 50,132, 72,127,126,142,246, 3,251,227,145,227,237, 21,121, 28, 73,247,165,144,212, 62, 60,115,176, 17,121, 86,165, 68, 33, 19,
- 32,218,135,245,166, 40, 47,139, 85,249,147,135,193,207,193,132, 42, 69, 33, 82,173, 59,158, 71,226,249,125, 46,206,118,212, 82,
-108,151, 50, 91,135,126,233,190,245,234, 56,189,132, 44, 73, 71,147,218,225, 16, 16,166, 42,116,106,168,212, 89, 34,247, 66, 34,
- 74,161,237,255,169,213, 46,230, 93,183,158,178,157, 11, 18,212, 41, 67,168, 69, 23,166, 72,184,223, 17, 30,196,133,239,222,210,
-180, 24,128,135, 54,230,210, 92,208, 23, 51,229, 69, 70,231,106,115,192, 24, 8, 93, 48,241,252, 25,232, 99,129, 71, 98,176,154,
- 25,184, 26,209,155,138,126, 56,163, 71,181,244,178,123, 29,225, 97,176, 19,111, 44,200, 21,107,200,112,241, 54,175,141, 37,230,
- 66,125,153,209,209,124, 97,225, 3, 37,124, 54,194,151,127, 30,142, 87,144,111,188, 18, 24,237, 82,215,217, 78,189,152,160,251,
-164,117,241,227,247,253,146,239, 97,254, 14,124,116,128,111, 78,148,111, 31, 56,222,204,188,116,225,218,177,192, 92,215, 28,226,
- 70,245,138,209,212,189,169,241,230,253,215,160,102, 45,147,203,132, 92,118,118, 88,238,161, 94, 21,242, 77,101, 18, 49, 72,203,
- 98,225, 20, 74, 59, 36,106,165, 74, 32,121, 16, 78, 39,246,126,196,212, 22,246,109, 73, 29, 44,156, 39,221,192, 43,129,240,169,
- 68,124, 47,210,213, 98,121, 3,115,195, 30,194,121, 7,215, 94,148,132,141, 45, 44,136,112, 19,220,180,240,193,145,240,187,145,
-116,158,144,119,122,228,157,129,244,229,202,110, 84, 30,124, 52,217,197, 30,173,174,219,118,201,203, 1, 16,100,109,153,101,131,
-254,188,147, 42,169, 62,205, 40,246,206,144,110, 10,242, 98, 38,116,126,176,221, 75,232,195, 91,228,254, 99, 36, 62,133, 95,189,
- 71,252,135,123,184, 81,116, 23,168, 59, 69,167, 53, 41,203,101,249, 39,221,118, 23, 45,246,119,210,211, 38, 58,108,114,202, 79,
-149,250,121, 99,199, 88, 11,145,213, 66,237,226, 52,221, 50, 26, 87,119, 6,213,231,218,245, 39, 68,101,121,196,231, 22,185,186,
- 11, 91, 37,248,218,217,108, 7, 82,186,217, 0, 44,246,101,133, 16, 43, 90, 44,221,173,253,153,234, 0,148, 66, 64, 84, 8,222,
-253,203,182,252, 16, 67, 54, 95,116,173,211,183, 68,171,189,174, 98,220, 37,161,178,145,224,196,214,137, 56,136, 40,159,136,251,
-172,139, 23, 2,157, 88, 26, 99, 27,217,139,174,221,185,178, 30, 57,181,217,183, 60, 72, 67, 92,100,105, 1, 45,234,239, 64,117,
-120,146, 80,125,212,189, 20, 50, 21,102,207,119, 24,188,151,208,101,108,219,178,100, 3, 90, 10,146, 71,164, 63, 71,131, 9,185,
-134,152, 80, 44, 99, 67, 84,140,150, 86,138, 65, 82,202,228,108,245,176,174, 41,162, 77, 88,230,227,100, 26,202,152,252, 11, 5,
- 19,234,233,102, 97,125, 34, 12,213, 77, 0,143,108,162, 86, 29,162, 83, 27, 48,200,226, 97, 67, 76,254,111, 6,231,145, 71,143,
-252,245,253,184, 83, 56, 75, 46,182, 38,104,232,217, 86, 96,106,181,233, 71, 23,169,217, 60,251, 18,172, 35,181,101,122, 93, 24,
- 18, 11, 28, 38, 6,202, 56,217, 62,217, 71,209,117,206, 62,206,175,190, 82, 98,237,250,217, 16,232, 98, 48,113, 92,140,214, 89,
-107,221, 68,208,110,199,244,226, 48,173,136,196,184, 38, 24,214,109,145,184,134, 35,197, 20, 57, 31,118,220,191,184, 36,118,157,
- 23, 60,129, 26, 19,207, 14, 7,174,110,110, 25,199,163,237,156,155,215, 60, 69, 74,173, 76,227,209,206,200,216, 17,186,110, 89,
- 83,132,109,108,107,203, 90,207,217,113,187,145, 57, 4, 14, 55, 87, 76,251,189, 71, 3, 67,186,223, 53, 69,189,146,188, 18,110,
- 69,126,145, 98,163,143, 40,156,163,220, 19,225, 16,148,105, 80,142, 53,112, 28,179,225, 11, 43,196,208, 89, 10, 79, 85,130, 22,
-186, 24,152,242, 68, 71,129,104,147,229,179, 8,179,151,127, 70,251, 82,180, 90,230,118,231,251,176,200, 42,242, 40,130, 9, 6,
- 58,251, 97,232,234, 26, 47,185,235,224, 44, 89,121,191, 87, 66,174,244,101,178,197, 94,159,144, 92,145,162, 72, 19, 47, 61, 76,
-182,187,174,117, 25,167, 72,239,158,210, 51,129,235,136, 30,142, 86, 8, 4, 1,177, 7, 43, 92,118,200,131,132,184,221, 76,231,
-140,238, 21,189, 42,232,211,140, 30,124,192,248, 48, 32,143, 58,120, 45,192, 78,208,235, 10,123,108,196,124,230,153,239,197,243,
- 86,247,118,250,105, 1, 61,216, 56, 74,178,192,139, 10,191,254, 25,224, 21,152, 95,216, 37, 46, 25,242,232, 72,220, 98,187,252,
-248,134,141,218,143,255, 0,174, 95,192, 43,159, 3, 62,128,155, 23,240,157, 76,253,218,158,249,201,129,171,201,226,230, 75,105,
- 89,189,235, 5,149,252, 12,239, 69, 40, 98,187,208,222,119,233, 22,247, 42,196, 62, 16, 94,237, 44, 66, 21,165,190,156,169,207,
-179,141,143,196,189,227,109,116,186, 81,117,215, 24, 76,112, 23, 86,213,122,140,178,162, 31, 27, 98, 80, 34,240, 22,232, 75,228,
-124,132, 55, 7,226,227,145,243,155,153,123,179,114,136, 54,181,153,171, 29,130,247, 59,184,153, 87,207, 58,213,104,115, 41,155,
-122,127, 80, 37,254,224,136,252, 65, 36,222,143,200,163,142,240,133, 51,186, 91,133,223,171,232,203,153, 26,101, 73,200,107,187,
-224,185,248, 7,243, 20,125,110,135,153,108,206, 21, 93,183,137,234, 2,153, 89, 77,233, 31,174, 39,194,185,165, 36,201,187, 9,
- 94, 13, 6,238,223,125, 26, 57,255, 22,225, 95,187, 64,255,179,153,250, 86, 68,118,192,148,215,233, 94,105, 4, 41, 7,187, 84,
- 27, 15,246,193, 62, 31,249,206,126, 93,151,148, 85,189, 99,241,221, 64, 49, 62,166,132,210, 69,214,108,219, 32,239, 40,117, 19,
- 68,180, 32,189, 78,151,136, 90, 87,201, 80, 69,233,162, 9,190,212, 69, 69,232, 10,173, 89,194, 86,188,208,219, 2, 62,107, 86,
-162, 47, 37,117,113,180,123,113,224, 23,140, 84,231,108, 55,160,138, 4, 39,194,217,175, 42, 74, 46,149, 94, 76,244, 54, 85, 56,
-186,154,123,141, 10,117, 15,185,251,182,163,197, 4,120,126,185,189,247,139, 82,190,178, 56, 84,194,230, 53, 43, 62, 89,138,209,
- 62,186,115, 11,180,145,200,236, 29,170,111,209, 9, 81, 72, 90,209,160, 11,100,170,250,131, 19,212, 60,246, 85, 54,238,172, 70,
- 55, 12,230,163,111,113,187,165, 90, 16, 77, 46,222, 13, 78, 19,210, 13,132, 52,160, 33, 33, 90,232, 98, 36,207,147,123,155, 35,
-210, 37,136,113, 21,135, 57,114, 48, 68, 43,254,141,123, 94,124, 29, 82,150, 56, 88,139,122,209, 37, 73,254, 84, 52, 39, 27,217,
-219,122, 29,158,228,159, 72, 32,132,100,217, 26,186, 78,117,212,187,254,208,246,248, 40, 85,220, 10,233,223, 71, 27, 59, 45, 95,
-165,130,116,209,237,224,237,235,234, 29,235,122,219,215, 71,250,174,183, 88,213,108,194,182,138,146,231,121,121,129,151,213,142,
-171, 71, 23,200, 17, 45, 8, 37, 46,232,218,186, 86,142,171,213,110, 99, 53, 51,117,122, 92, 86, 0,237,239,194,119,254, 45,252,
- 37, 70, 11,148, 73,169,115, 52, 65, 38,134,200, 49, 20,174,110,111,217,223,222,216,174,223,197,116, 33,218,251, 54,151,108,241,
-179,197, 61,243,213, 86, 25,169, 23,162,116,166,154,175,149, 60,207,238, 54,146, 37, 66,247,118, 28, 25, 15, 7,234, 60, 45,254,
-123, 17, 33, 37,130, 31, 88,149,168,106,202,203, 32,203, 62,170,248,135,182, 79, 66,170, 74, 95,172, 58, 63, 14, 61,251, 25, 38,
-175,234,164, 15,104, 13,110,150, 55,196, 30,243, 68, 9, 22, 43, 56,136, 24,215,188,147,101, 47, 89, 16,106, 88, 67, 19,162,239,
-180, 58,169, 12,213, 71, 99,231, 59, 87,147, 58,147, 60,138,181,101, 93,242, 79,106, 65,206, 35,177, 8,122,125, 52, 97,138, 70,
-179,149, 5, 65, 30, 13,200, 59, 59,163, 36, 29, 42, 39,124, 66, 13, 32,197,254,206,203, 72,144, 1,121, 92,151,110, 77,186,128,
-188, 18,145,251,166, 24,172, 31, 77,232,203,217, 46,245,209,253,244,247, 13, 38, 99, 94, 61, 27,171,215,131,192,222, 81,160,169,
- 34, 93,112,159,142,127,114,179,218,218, 96,116, 27, 66, 47,240, 3, 69,126,177,135,207,254, 52,220,222,154, 32,142, 12,249, 96,
-106,251,166, 64, 11,103,144,222,132,227,223,133,247,191,141, 78, 3,242,166,192,248,125,244,195,138,254, 96, 36,191,119,228,112,
- 83,121,137,112,204,106,233,105,173, 32, 95, 1, 91,110,171, 88, 3, 28,108,108,105, 68,185,190, 64,119, 47, 33,175, 59, 22,246,
- 80,225, 89, 70,111,138,121,209, 89,248, 8, 11,155,193,215, 66, 86, 20,248,230, 67,219,133,152, 86, 48, 13, 17,211, 42,196,100,
-150, 60,122,216, 61,133,183,247,132,215, 7,250, 39, 19, 23, 47, 38, 6,177,172,243,105, 90,239, 36,113, 75,101,213, 53, 26,119,
- 44,112, 59,155,103,190, 27, 11,241,155, 71, 43,198,254, 88,128,139,142,248,115,103,112, 44,156,125,109, 79,190,202, 75, 67,107,
- 59,107,219,207, 22,189, 75,223, 58, 85,169,109,108,204,171,213,204,245,126, 33, 8,221, 94,137, 47,102,106, 23,145, 15, 39,228,
-135, 17,125,253, 71,200,163, 63, 7,220, 71,126,249,155,132,223,219, 19,254,254, 1, 62, 19,169,103, 21,142,198,147,214, 98, 93,
- 69,187,208, 93, 19, 68,236,132,110,182,139, 46,111, 78,184,186,193, 85,126,124,153,126,138,120, 93, 67, 90,196,135, 69, 13,253,
-186,118,164,139,159,189, 52,199,154,218,229,220,198,222,245, 4,143,109,105, 85, 94,128,176, 92,168,235, 14,191, 29,124,213,213,
-127, 90, 65,114, 93,121, 3,181, 41,134,117,179,247,182,231, 36, 44,186,123, 89, 28, 26, 22, 27,106,127,235,132, 85,147, 41, 42,
-193, 71,145,121, 93,214, 47,108,238, 6, 78,105,100,192, 90, 79,147,222,178,158,178,219, 41, 75, 40,157,123,230,253,242, 85,187,
-139,138, 4,183,149,217,235,150,212,222,119, 75,108,172, 20,255,203, 27,222,216,194, 61,236, 66, 79,205,109,232,120,233, 40,167,
-233,114,213, 15,105, 91, 35,136,115,218, 65, 74, 38, 78, 19, 33, 14, 22, 33,234, 62,237, 24, 34,101, 26, 77, 56,215, 50,161,187,
-100,168,235, 90,150,213,135,230, 66,205,121,157,203,108, 39, 6,109,236, 46, 97, 9, 2,218, 22,181,117,219,183,183,128, 23,115,
-178, 59,127, 60, 25, 53, 79, 45, 97,143,208,138, 49, 35,170, 25, 73,206, 59,104, 79, 39,115, 37,182,147,221,116,241,129, 75,244,
- 46,116,154, 86, 37,253,162,184,247,207, 93, 85,179,120,117, 29, 69,132,113,154, 55, 23,185, 46, 28, 21, 90,240,139,132,211,120,
- 94, 23,175, 53,251,152,169,221,117, 25,255, 47,118,181,229, 51, 97, 85,158, 46, 1, 48,155, 88, 88, 17,251,123,220,206, 29, 61,
- 41, 47, 5, 11,175,169, 34,140,121,102,158,247, 76,165, 80,202,140,180, 4, 54,199,230,206,165, 80,219,186, 96,153,154, 52, 40,
- 78,165,228,138,138,141, 38,139,255, 76,120, 12,108,174,133,105, 26,169,211, 4,181, 18,150,131,213, 83, 68,195,152,208, 82, 9,
- 85,156, 0,101,214, 48, 5,106,168,134,134,213,134,206,244, 39,176, 20,186,243,196,174,235, 72,197, 46, 69,213, 76,150, 64,191,
-235, 41, 65,232,181,208, 7, 27,105, 73, 48, 42,153, 0,169,197, 57,122,151,158, 55,163,224, 22,127, 73,123, 44,165, 67,134, 51,
-228,184, 55,156, 98, 3,169, 15,131,221, 28,209, 80,172, 60, 8, 72,202,118, 84,185,162, 72,187,136,220,235, 9, 63,117,102,135,
-220, 17,187,236,131,213,232,198, 20, 87,191,157, 76, 40, 38,175,247,107,254,250,253, 96, 93,126, 48, 23,173,126, 48,219,197, 92,
- 4, 46, 20,238,153,141, 79,162,237, 14,234,161, 34,135,201, 70,246, 23, 62, 65, 8,174,108, 45, 98,130,132,169,174,126,170, 32,
-118,217,139,129, 1,228,165, 34,255,210, 39,160, 94, 66,190,246, 55,224, 96,151,123,157,124,197,144, 44,165,174,124, 27, 62,250,
- 38,250,141, 10, 95,126, 8,241, 37,250,209, 1,222,203,212,247, 70,202,237,200, 53,112,157,197, 59, 82,179,108,205,254, 97, 73,
- 11,210,209,209,153,193,208,153, 45, 98,118, 0,118, 9,226,163,142,240,176, 55, 95,227,237, 76,125, 81,168, 83,101, 18, 28,130,
-209, 44,246, 74,104, 0, 48,223, 13, 23, 63,231, 67,241, 76,122,245,203,189,108, 88,167,109,236, 39, 15, 32, 62,128,183,174, 8,
- 63,125, 78,120, 58,114,126,152,185,172,202, 53,194,209,239, 40,241, 75,167,147,213, 91,219,169,173, 21,142, 5, 98,134,151, 9,
-210,205,140,124,125, 79,255, 56, 34, 95, 56,131, 87,122,226,207, 92,210, 29,149,139,111,236,157,144,104,113,194,234,167,191,108,
-156,183, 69, 87, 15,121,106, 69, 73,219,173, 53,225, 88,219,195,183,172,118,132,116, 91,144,243,153, 48,116,200,147, 10,207,110,
-225,149,167,208,253, 37,232,190, 68,248, 55,254,123,194,223,251, 67,244,208, 33, 59, 19,205,233,180,138,204,234,221, 64,151, 2,
- 93,244, 47,146, 27, 43,109, 67, 50,228, 99,121, 26,126, 80,182, 36,173,211, 63,113,194,232, 14, 62,185, 89,212,240,101, 3,249,
- 88,185,227, 84, 57, 77, 29,116, 1,220, 26,116,177,218,156,138,114,199, 15,109, 63, 84,208,181,103,207, 91, 49,150,174,175,163,
- 58,162, 54,251, 20,161,101,116, 71,183,154, 37, 87,191,183,159, 67,151,236,241,246,122,212, 13, 15, 94, 22,101,123,243, 24,207,
-155,188,239,178,185,180, 54,132,224,213,246,180,233, 92,149,150,196,229,197,100, 41, 36,196,158, 11,132, 81, 5,157, 43,147,159,
-145, 89,197,206, 80, 17, 7,244,216,103,174, 84, 22,164,234,150, 77,166,136,229,107, 96,128, 29,109,197,112, 43,218,188, 35, 52,
-165,183, 18, 36,179,243,177,244, 56,207, 11,194, 52, 72,132,190, 51, 65, 97,206,238, 44,240,229,200, 38, 66, 85,182,188, 8,217,
-128, 98,238,132, 4,109, 83,208, 44,209, 48, 44,144,154,144,210, 26, 68,228, 59,242,160, 38, 96,140,169,179,221,184, 8,115, 41,
-140,243, 76,158, 70,247,214,215, 69,240,216, 62,104, 33, 8,244,189, 23, 31,171, 40,205, 10,206,234, 3,115, 75, 86,236,251,158,
-216,155,154,126,154,102, 71,242,138, 49, 11,220,163,170, 57,175, 29, 64, 91, 47,137,119,220,206,124, 15, 33, 46, 48, 24,221,236,
-224,106,243,150,139,239,252, 84, 54,150, 59,143, 60,197,252,153,109, 36,110, 26, 8, 97, 8,194,217,238,140, 28, 34, 55,227,200,
- 52, 30,172,216,241,203, 95,162,189,118, 5,152,243,236,142, 5, 93, 53,184, 27,203, 96, 69,125,165,146,109, 4, 47, 6, 38,210,
-220, 50,225,179,157,213,169,115,241,236, 54,171, 93, 73,242,231, 3,242, 52,192,147,100,203,198,138,161,245,230, 76, 61, 40, 53,
-154, 82,122,210,150,188, 38,148, 98,172,217,185, 63,163,140, 7,179, 64,212, 66,223, 71, 66, 85,152, 71,170,147,150,196,167,219,
-182,254,142,116, 81,136,234, 24,217,224,187,176, 16,172, 63,143,220, 0, 0, 32, 0, 73, 68, 65, 84,152, 84, 56,150, 74,214, 74,
- 23,236,247,228,124, 71,236,122,226,237, 11, 95,222,218, 44, 76,187, 1, 57, 23, 68, 39,123,241,207, 34, 50, 84, 56,219,217, 15,
- 54, 43, 66, 36,188,209, 35,175,245,254, 41,206,112, 17,209,210, 33,227,228,251,233, 22,150,110,249,166,114,105,114,109,149, 98,
- 41, 56,179, 80,111,205,132, 93,159,101,171,234,206,253, 22, 60,100,116,159,151,169, 6,135,138, 78,106, 10,167,206, 25,208, 55,
-138,220, 55,101, 44,147,117,238, 4, 65,179, 34,179, 34, 15, 2, 97,223,193, 31, 78,132,159,233,225,157,119,224,230,104, 35,137,
- 90,237, 50, 47,163, 83,227, 58, 11,184, 9, 17,174,127, 31,253,110,133,235,132, 60, 78,176,127, 1, 31,205,232,251, 19,245,106,
-102,174,166,143,200, 77,168, 83,237,210, 78,219, 76,233,134, 14,246, 66, 63,138, 29, 84,125,128, 65,148,212, 7,194, 27,157, 97,
- 79, 85,109,250,127, 85, 40,199, 74,222,120, 51, 83,180,131, 42,103,150, 72, 89,201,141,254,102, 21,232, 92, 44, 44, 38,119,172,
-105, 88, 85, 86,153,154, 36,208, 55,145,139, 39,232,167, 50,241,123, 59,250,167, 51, 23,243, 72, 95,109,106,112, 88,224, 78,171,
-162,167, 29,216, 30, 69,204, 88,132,235, 0, 59,148,238,233, 68,248,131, 61,221, 89, 7,159, 78,240, 86, 71,204,231,244,183, 10,
-239, 29,144,169,176, 15,107, 8,143, 21,175,174,120,175, 27,160,217, 73, 96,138,156,164, 81,137,223, 26, 85, 97,138,208,205, 74,
-188, 45,212,243,140,220,102,228, 22,208,143,140,125,208,125, 30,222,122,139,240,107,255, 62,250,223,222,194,207, 38, 35,180, 29,
- 42, 57,183,253,235,170,118,223, 66, 93, 6,177,209,252,220,146,189,234,157,192,150,192,194,180, 61,193,190,254, 36,252,166,167,
- 46,182,220,162,182,207, 44, 62, 54, 21,223,109,223,197, 97,110,215, 18,150,165, 46, 75,236,235, 6,127,115, 2,159, 49, 58,164,
- 15,119,253,114, 54,122,156,250,200, 93, 28,122,181,118,236,139,210, 88,194,162, 36, 95,173,242,118,168,246,254,231,230,170, 76,
- 85, 40,190, 19,173,122, 39,232,165,178,229,161, 46, 5, 69,217,118,160, 77,216, 25,214, 11,173,180,247, 58,250,238, 72,155,207,
-219,173, 94,193,236,113,147,194, 88, 42,217, 3,176,114,179,104, 57,146,205,239, 36, 99, 53,180, 68, 52,245,239, 95,130, 11,197,
-132, 89,124,188, 95,219,254,222, 5,167,209, 51, 49,170,249,154,205, 52,148,172,187, 78, 25,205,213,163, 93, 87,177, 89, 8,137,
- 48,116,238,106,169,126, 49,182, 66, 84,209,208,118,197,193,131, 86,100,249,122, 43, 70,214,254,121, 11, 27, 65,130, 79,250, 92,
-208,165, 74,205,117,141,153, 77,182, 87,143, 41,217, 36, 13,152, 75, 49,165,247, 52,218, 69, 94,171,231,139, 87,247,129,251,192,
-172,235,237,253,119, 81,100,187,216,150,139,212,239,231, 46,245, 12,195, 14, 66,100, 30,109, 74, 33,209, 21,231,117,182,239,211,
-211, 53, 55, 50, 96,179,197,185,125, 13, 49, 13, 0, 14, 14,211,141, 57,109, 83,197, 45,222,214,214,241,171,200,114,226,180,255,
- 21,163, 1, 96, 68, 96,151, 18,195,238,140, 41, 4,174,111,175,169,243, 76,148, 96, 40, 96, 47, 17,171, 4, 74,201,228,226,190,
-114, 79,124,195, 67, 93, 8,193,190,108, 12, 27, 82,156,117,231,179, 86,166,155,107,202,120, 68,106,117, 77, 64,178,245, 71, 12,
- 14, 4,210,101,133,150,194,127,244, 6,204,123,216,223,160, 31,102,248,221, 11,248, 63, 59,120,119, 34,228,137,110, 63, 26,138,
- 50, 86,166, 16,184, 21,203, 74,215,121,166, 74, 71, 14,137, 58,103,186, 24,169,177, 67,166,105,121,177,178, 38,227, 94, 43,164,
- 82, 9,169, 50, 96,251,167, 40, 32, 73, 40, 33, 80,106, 37,182,180,162,222, 71, 79, 53,210,237, 6,250,121,164,203,217,121,186,
- 9,238,157,193,189,206, 72,100,231,103, 72,159, 45,212, 96, 82,120,212, 59,201,202, 78, 99,217, 5,179,139,197,100,251,119,173,
-182, 5, 75, 59,100, 31,144,161,160, 23,238,113, 74, 88, 18,219,117,134,155, 74,185,202,112,116,142,187,248, 40,221,253,148,122,
- 44,102,163,107,106,197,132, 93,246,131,239, 18,198, 66,185,205, 72,141,132,183, 58,240, 8, 82, 28,154, 98,164, 23, 59, 96,195,
- 89,130,144,145,127,253, 19, 80,238,155, 56, 78,171,217,215,202,108,197, 7, 45, 93,229, 77,235,183,175,247,240, 61, 53,107,221,
-160,232,143,103,248, 81, 70,127, 52, 81,110,103,227,186,155,110,143, 17,155,190,132,118, 99,232,234,201, 78, 54,245, 50,123, 79,
-187,220, 3,116, 5,186,243, 72,120,173,131,157,183,201, 79,103,234,209,187,202, 96, 69, 75,112, 27,210,178,131,212,187,233, 86,
-126,104,139, 43,225,179,154,160,112,242,253,139, 84, 83,246,235,193,120,253,225, 53,120,188, 39,188,181, 35,188,123,228,252,122,
-226,126, 54, 93,225, 81, 78,119,180,114, 71,188, 86,212,132,123, 83,128,171, 32,116,185, 18, 62,152, 8, 95,187, 37,158, 9,188,
-181, 67,222,222,145,126,193,235,130, 15,143,200, 33,115, 76, 54,205,136, 97,221,142,212,176, 65,183,202,102,191,168, 39, 13,204,
-199, 46,188, 18,160,238, 51,117, 95,136,185,192, 62, 65,126,110,175,123,247, 26,200,125,194, 95,249,139,232,255,250, 55,209, 23,
-230, 91,215, 98, 22,206,188,181,216,137,251,165, 27,229,207,217,250,169, 42, 83,222,172, 49,218,250,187,222,233,142, 27, 99,122,
- 51,126, 80, 62, 14,147,183, 67, 95, 92, 21,191,134,175,148,176,109,242,117, 81,114,181,215, 60, 87,159,232,213,109,215,189,190,
-102, 77, 45,215,184, 4,205, 51, 95, 89,215,122, 45, 52,165, 46,157,241, 93,125,128, 3,173, 48,166, 58,190,167, 77, 94,232, 76,
-165, 50,185, 60,165, 16, 9,162,116,161, 82,171,186, 15,126, 19, 12,162,235,183,216,194,129,182,239, 99,227, 19, 76, 77,112,231,
- 35,210,165,106, 68,137,181, 34,161,105, 6,132, 89,132,169,218,247,209,178,230, 23,207,122, 93, 71,181, 13,151,159, 17,170, 8,
-157, 88,160, 80,221,168,186,181,182,181,139, 3,108,157,120,102,117,141, 17,206, 12,230, 99,223,108, 37, 64,234,145,100, 80,147,
-128, 43,184, 53,155, 39,218, 71,229, 75, 64,149,119,151,161,133, 1,249,104,186,170,175, 53, 54,249,231, 77, 24,183, 92,236,222,
- 0, 68, 49,176, 77, 3,142, 5,223, 51, 75,176,241, 51, 33, 81,197,246,197, 69, 33,231,153, 60, 79, 80,243,130, 48, 93,119, 56,
-130,148,130,164,100,148, 60,103,128,200, 73,218, 81, 88, 70,241, 73, 2,195,176, 35, 14, 61,199, 92,200,121, 38, 4,219,215,235,
- 60,155,142, 43, 37,234, 56,218, 62, 60,218,121, 41, 77,119,224, 48,155,232,239,107,169, 45, 29, 45,218,179,181, 88, 26,101,137,
-222, 93, 32, 5,219,108,244,118,161, 7,103,178, 32, 12, 41, 17,186,142,155,156, 57, 28, 15,224,104, 87,137,209, 83,250, 10, 37,
- 59, 30,214,167, 17, 18,215,231, 90,189,112,176,232,214,206,128, 67,110, 91, 45,185, 50,229,137, 50,142,148,146,237, 30, 86,161,
-150, 66,150, 98,144, 51, 57, 77,198, 11, 64,226,193,111, 26, 56,165,190,135,188,249,159,195,103,254, 30,252,177, 9,190, 61, 32,
- 95,191, 64,190,115, 78,250,104,102,120, 54,115,185, 31,185,159, 11,207,146,114,211, 23, 74,151,208,216,145,210,206, 59, 22,179,
- 99,148, 90,201,146, 40,209, 84, 90, 85,102, 38, 81, 58,181,125,131,198,134,218, 19, 68, 51,177, 88,114, 91,223,153, 40, 33, 6,
- 65, 14, 19,253,229, 64, 87, 38,122,177, 86, 95, 46,206,145,221,206, 60,206, 82,140,253,156, 3,114,123, 64, 59,123, 72, 92,253,
-101, 7, 74,209,149,136, 82,163,237,159,230, 10, 41,161, 15, 6, 27, 29, 93,143,232, 7,123,235,186,167,140,142,149,122,171,246,
- 6, 84, 19,204,145, 2,225,194, 2, 39,202,213,108, 7,211,130, 35,179, 17,101, 80,108,122,208, 69,187,244, 71,251, 59,234,211,
-137,240,102, 66, 30, 69,120,233,115,192,217, 31,215,234, 30,248,127,177,131,207,188, 3,123,167,211,213,217, 58,116, 29,157,177,
-217, 65,234,161,255, 50,148,223,131,169, 32,207, 20,254,244,206,138,150,167, 51,250,124,164,220,204,228, 99,177, 45,129,159, 73,
- 73, 76,140, 83,155,224, 40,216,222, 50,134,213,122,214,162, 31,131,119,234,157, 96,138,247,123,201, 94,131,171, 66,125, 62, 83,
-246,133, 41,251, 78,178,200,178,119, 92, 15, 79, 59, 72, 75,221,144, 30,117,211, 77,183, 25,237,114,177, 31,237,245, 45,183, 16,
-118,160, 15,225,242, 3,120, 59, 19,238,247,244,221,145,243, 99,161,235, 44, 55,160,212,230,180,216, 40,184,155,237,164, 29,218,
- 5,142, 1,110,147, 48,236, 11,225,253, 3,242,176, 39,156, 39,120,144,144,207, 12,116,163,243,170, 63,130, 48, 22, 38,191,216,
-131,216,248,183,137,232, 66, 16, 82, 16, 75,223,219,142,141,221,222,180, 37, 69,182, 93,106, 41, 16,143,217,224, 71, 55,189, 65,
-129,242, 55,129, 47, 26,180,232,209, 63, 71,248,245,255,131,250,215,158, 89,246, 80, 88,193, 45, 86,114,110,152,156,117,213,175,
-137,191, 95,125, 88,117,202,101,227,183, 95, 92, 85,156, 70,188,173,223,183, 95,116,133,213, 67,231,174,208,149, 60, 23,169,193,
- 10,211,192,202,133, 95, 44, 65,155,113,100,105,169,101,117,189,247, 91, 33, 39,185,145,181, 60,168,198,119,226,213, 47,219,186,
- 20,129,250, 19,139,164,101,197, 32,178, 8,238,106, 27,138,251,251, 61, 58,230,193, 87,245, 4,132,206, 59,183,105, 73,118, 51,
- 78,122,254,216,110,245,227, 49,181,230,217, 14,248, 18,111,243, 26, 42, 9, 93,236,123,206,141,244,208,159,122, 2,161, 41,205,
- 23, 93, 54,187,224, 38,249,242, 53,100, 64, 93, 3,176,186, 40, 52, 8, 73, 2,153, 96, 17,160,178, 38,159,213,106,211, 75,235,
-194,237, 97,201,190,126,144, 54, 98, 14, 98,163, 48, 23, 88,202,202, 39,181,188,245, 90,214, 78, 83,130,167, 72,174,130, 79,196,
-199,224, 33, 46,113,170,108,166, 53, 65, 44,102,184,233,180, 36,246,246, 62,214, 21, 41,216,210,246,170, 4,230,121, 98,158, 39,
-239,208,213, 3, 82,140,254,103, 49,163, 38, 20,211,152,124,175,172, 39,122,149,101, 22,231, 98,206,174, 55, 50,157,198,200,124,
- 56,218,186,184,235,200,174,254,151,198, 2,152,103,223,119,219, 97, 22,155,171, 69, 65,106, 65,186,206, 59,251, 66, 12, 22,149,
- 90,169, 86, 68,181,168, 87,239,108,108, 66, 32, 43,163,221, 9,112, 54,149,240, 85, 67, 8,212, 24,217, 79, 35,101,158, 22, 33,
-158,196,232,133, 77,166,228,201, 5,114,155, 41, 37,235, 24,201,196,127,137,110, 24,144,126,160,148,194,148, 39,230,105, 50,207,
-125,201,110,163,147,211,216,228, 45,143,162, 37, 44,250, 89,156,136, 59,224, 30,240, 42,196,255, 18, 30,252, 16,249,242,223,129,
-159,251,159,225,159,121, 23, 94,222,194, 7, 17,249,127, 7,194, 87, 47,121,229,247,247, 60,248,241,145,219,219,145,167,103,145,
-151,231,231,148,148, 12, 8,147,122,251,248,141, 35,104,101,154, 45, 90, 48, 71, 53,152,134, 31, 21, 83,181, 75, 37, 69, 19, 42,
-149,224, 10,108,236,197,175, 83,165, 83, 69,135, 1,158, 31,153, 52, 64, 55, 64,183, 67, 94,102,226,152, 9,181, 32,146, 9,211,
-104,240,146,115, 80,153,225, 92,144, 55,122, 52, 5, 36, 76, 54,206,232,173, 75,151,108,187,118, 8,232,141,162, 31,102,234,187,
- 35,243,213, 76, 61,102, 51,253, 91, 0, 51,210,131, 68, 27, 77, 74,173,212,234, 7,154,143,181,151, 64, 7, 31, 71,114,163,132,
- 2,225,205,206,148,242, 25,234,143,103,202,251, 19, 97,215, 17,191, 28, 76,129,127,163,200,220, 66, 97, 34,188, 3,242, 39,223,
-128,124,223,118,233,181,218,101, 87, 71,155, 99,203,224, 51,187, 47, 65,255, 69, 56,252,109,120, 89,224,162,131, 55, 7,184,154,
-145, 39, 25,125,154,169,215,153, 50, 25, 29,174, 41,124, 61,209,150,226,137,123, 65, 44,246,213,138,126, 37,185, 48, 46, 5,207,
- 77, 23,232, 37, 16, 31,154, 53, 11, 5,189,206,212,103,133,114,240, 4, 52, 87,164,235,162, 8,150, 53,132,196, 59, 62,241,139,
- 60,250,101,210, 58,249, 50, 41, 58, 42, 50,123,142,183, 96,220,253,250, 4,226,219, 72,255, 0,125,109, 36,188,217, 19,223,235,
- 56,223, 23, 46, 10, 28, 61,121, 77, 54,130,182, 46, 8, 26,117,201, 1, 87,177,130, 99,246, 3,255, 44, 40,233,101, 37,124,255,
- 64,191, 19,248,210, 37,114,127,128,207, 7,186,217, 23,184,207,143,132,177, 18,211,218,177, 53,203, 92,240,177, 91, 12, 45, 45,
-107,205,239,145,141,141,187, 93,172,110, 85,166, 30, 42,229,118, 38,125, 56,160, 31, 78,200,197,223,130,248, 73, 24,190, 0,115,
-143,124,233, 83,200,163, 23,232,143, 39,100,103, 54, 45,241, 48,165,150,134,189, 44,125,151,221,116,181,194, 75,238,112,244,117,
-147,154,229,157, 82,235, 60,150,162, 64, 86,187, 14,117, 19,238, 34,156,192,105,116,177,116,121,184,146, 3, 74,244,174,225,169,
-229, 90,215,182,115, 85,138, 46, 81,110,158,251,108,239,111,192,226, 52,139,174,113,146,170,119,109,115,178, 57,175, 90,191,212,
-246, 3, 77,205,111,234,229,193,247, 19,147, 23,121,109, 39,154,125,218, 96, 25,236,235,197, 89,221,251, 92, 89, 95, 63,217,236,
-206,219, 89, 89, 8, 11,114,247, 36,217, 66, 21,159,220, 26,132,178,138,235, 82,170,191, 30,234,154, 32, 49, 16, 77,169,203, 8,
- 62,122,204,111,241, 28,139,224,133,109,241,244, 74, 75, 59, 50, 91,110,168,153,144,231, 37, 30, 88,154,189, 82,140,117, 63, 78,
- 6, 26,145,104,239, 9, 33, 17,130, 41,167,181, 89,190,100,179, 8, 49, 68, 29,177,235, 61, 93,175,248,206,216,157, 56,110, 71,
- 19, 54,158,205,102, 33,107,115,142,170, 11,217,206, 46,110,123, 40,151,240, 16,116, 29,107,187,232,121,158,102,230,105,180,251,
-192,199,237, 91,241,157,180,226, 36, 37,202,220,192, 49,110, 21, 91,132,188,222,240,133, 64,215,117,244,253, 64,232, 59,142, 57,
-147,231,217,186,218, 16,208, 89,109,245,219,245, 6,228,241,137,174,249,245,173,144,180, 26,182, 24,122,188,165,190,121, 65,169,
-234,152,229,166,149, 73,209, 4,123, 13, 34,227, 1, 80, 1, 83,221,199,174,183, 2, 10, 37,249,250, 98,156,103,131,192, 56,120,
- 71, 60,198,120,158,103,242, 60, 90,227,184, 20,169, 97,227,172, 49, 28,108,140,137,216, 15,182,130,158, 38,166,227,129,121, 58,
-218, 26, 65,218,132, 76, 78, 48,208,252, 68,190,196,106,255, 76,242,225,159,128,123, 95,128,238,179, 16,223, 66,229, 13, 8,191,
- 4,225, 87,161, 87,228,193, 15,224, 19,127, 11,190,244,219,112,245, 28,253,214, 5,241,127, 59,231,254, 63,158, 57,127,145,120,
- 92, 18, 55, 73,216,239, 6,198,190,163, 28,143,148, 58, 19,242,100,111,172,216, 88,201, 66, 20,140,232,149, 69,136, 18,173,163,
-204,133, 73,205, 82, 39,126, 1,132,169,112,126,121,193,144,206,209,253, 51, 36, 14,132,112, 15, 61, 84,166, 81,169, 7,165, 79,
-129,238,246, 64, 55, 30, 56, 79, 66, 26, 18, 81,133, 24, 10,225,195, 9,162,169,214,229,237,138,124,242, 12, 46,146, 29,120,199,
-138, 94, 85,202,211, 76,253,254,129,195,213,145, 43, 9,148,110, 71,234, 33, 81,232, 37, 19, 45, 93,216,171, 88, 91,136, 73, 10,
-132,251, 3,220, 90,199,154, 58,150, 28, 99,201,106,182,180,217,214, 10,225, 81,103,252,231,171, 66,254,222,209,168,125,159, 31,
- 8,175,184, 12,252,104, 45,177,124,241, 12,238,189, 99, 70,114, 81, 23,197, 29, 13, 50,163,254,161, 79, 3, 12,127, 6,234,143,
-225,240, 3,248,102,129, 79, 14,166,254,127,126,139,190,152,168, 55,153,114,156, 25,139,217, 6,219,126, 46,184,192, 40,109, 46,
-159,118,113, 5,223,163,167, 32,116,161,218,255, 86, 8,187,128,220,235,221,107,175,150,122,118,147,201, 69, 77, 36,215,118,161,
-106, 32,148,176,209, 87, 45,143, 92,109, 51, 18,161, 95, 38,106, 62, 82,174, 78,213,205, 25,210,193, 14,154,239,127, 3, 62,247,
- 16,194, 99,184,124,134,188,209, 17,239,119,156,189, 24, 57,175,112, 83, 76,108, 52, 97,187,212,182,251,236,116, 69, 73, 46,121,
- 37, 30, 29,124, 91, 97,151, 11,241,106, 38,127,127, 34, 61,152,224, 51,150, 29,192, 23,206,237, 98,255,142,194,139,153,144,179,
-141,118, 13,118,215,226,182,236,188, 9, 38,248, 59,129,114,132,245,210,148,205, 69, 81, 34,212, 92,168, 87, 51,250,116, 66,190,
-113,134, 94,124, 15,145,255, 10,230, 95,131,240, 0,250, 55, 8,127,225, 12,254,139, 35,241,211,174,206, 86,221,216,202,238,254,
-167, 46, 4, 58,145, 21,152,115,162, 92, 63, 13,173,244,234, 62,178,196,180, 4,124,236,104,130, 39,238,140,188, 33,248, 72,189,
- 46,138,246, 86, 64,157,100,160,123, 14,145, 44,186, 10, 79,227,162,154, 86,164,157, 93,101, 5,116,108, 25,246, 77,172, 28,219,
-107,187,116, 67, 27,241, 88, 19,118,105,245,194, 74, 23, 11,230,174,237,211,117,189,208, 75, 53,198,211,194,199,103, 85, 44,175,
-119,214, 38,176, 69, 88, 44,137, 34,107, 87, 42, 85, 23,186,156,184,111, 60,122,161,155,213, 92, 22, 89,149, 94, 42, 29,149,178,
-241, 60,154,157,183,122,168,203, 10,180,105, 1,142,109, 29, 82,138,241, 52,250, 70,137, 43,153, 90,178, 91,248,100, 17, 4, 6,
-177, 46, 80, 67,103,202,123,218, 14, 54,227,158, 37, 98, 10,148, 26, 29, 61, 26, 60, 25, 44,184,157, 78,168, 46, 98,147, 16,109,
-207, 92,178,237,212, 67, 92,133, 95, 98,221,191, 46,194,200, 86,166,132,197, 43,174, 34,148,146,109,132, 92,117, 5, 85, 5, 79,
- 15,115, 79,250, 60,102,166,241,136,214, 76, 45,142,111,221, 20,107, 11,197, 48,117,246,207,180, 56,211,221,139, 61,223, 53,203,
- 18,150,147,232, 58, 19,199, 21, 96, 26,237,146, 76,187,222, 38, 76,213, 34, 83,107,223,145,247,123,175, 75,130, 79, 3, 32, 23,
- 11,205,137,193, 20,249,101, 89,139,232, 34, 26, 53, 58,173, 39,241,165,232,238, 12,221, 20,178,129, 46, 70, 82, 99,177,187,112,
-173, 8, 20, 87,223,199, 16,189,216, 10,228,134,117,157, 39, 23, 17,234,146, 64,103,231, 70, 88, 66, 39, 36,216, 10, 96, 42,133,
-121,191,247,232,216,188,234, 26,126,146, 53,117, 51,210,210, 45, 85,114, 19,178,147,202, 47,127,141,240,137,175, 33, 95, 72,240,
-115, 17,249,147, 3,188,125,142, 62,122, 0,221,231, 64,126, 5,228, 95,129,240, 87,225,236,219,200,227,191, 1,159,251, 26,250,
-143,119,196,175, 92,112,249,245,204,249,115, 24,199,204,129, 61,199, 62,112,211,247, 4,157,157,225, 43, 12, 82, 25,164, 46,123,
-233, 54, 82,202,197,132, 38,227,146, 71,108,135, 73, 42, 74,188,247, 10, 90, 59,142, 53, 18, 46, 31, 34, 50, 80,247, 7, 38,141,
-148,144, 97,156, 97,154,185, 8,194, 69, 12,156,107,165, 11,137, 46, 36,250,155, 66,156, 15,196,151,145, 48, 59, 13,227, 97, 71,
-221, 11,220, 84,244, 22,244,166,146, 75,101,127,185,227, 56, 43,181,206, 70, 22, 14,137,210, 91,186, 90,157, 51,177,181, 36,206,
-108, 15, 40,177,183, 17,229, 33, 55, 88,139, 34, 73,136, 41,160, 89,225, 96,173, 93,120,188,131,203,153,242,193, 76,249,246,193,
-108, 97,159, 30, 8,111, 12,240, 40, 34,143, 35,188,246, 10, 76,131,117,171, 57,175, 4, 57,205, 6,148, 9,201,194,102,244, 5,
- 28,255, 71,120,118,133,126, 15,228, 47,247, 86, 8, 60,155,225,186, 82,246,153, 50,155, 10,187,141,146,183,108,243, 70, 66,146,
- 85,139, 98, 58,160, 69, 32, 23,216, 73,101,168, 74,188,236,144, 55,147,157,188, 71, 69, 95, 22,244,214,172,108,217, 51,215,205,
-230,100,251,216,237, 90, 71,188,149,213,184, 9, 24,241,139,183,110,119,189, 69,208, 89,145,238, 96, 99,214,255,103, 68, 30,125,
- 23, 94,255, 60,114,126,134,190, 62, 19, 94, 31,232, 62, 24,185, 87,102,110,146,121,214, 75,216, 72,149, 55,177,144, 33,108,146,
-192,144,101, 58, 48, 2,105,159, 9, 47, 39,226,247,142,112, 25,144, 55, 35,188, 50, 32, 63,171,164, 12,212, 35, 50, 9, 33, 87,
- 56, 22, 66,217,140,182,195,186, 58,168,245, 52, 79, 90, 54,169, 86, 49,174,246,190, 82,149,112, 51, 17,158, 38,210,144,224,172,
- 67,245, 91,200,107,255, 3,236,126, 13,244,179,132, 95,253, 3,226, 95,191,161,222,204,164, 11,239, 52,239, 36, 54, 75, 93, 69,
- 60,218,118,232,213, 61,206,149,141,222,117,211,180,111,130, 48, 52,152, 7,120,233,218,117,133,206,212, 37,166,204, 21,222,146,
-144,133,179,238,107,113, 49,210, 97,109,136, 54, 87,168,171,235,120,162, 4,230,160,230,131,174,167,249,237, 45, 49,107,123, 16,
- 45, 7,229, 86,125,200, 42, 54, 92, 47,223,150,203,237, 62,240, 22,190,225,226,170,162,106,251, 96,214,189,252,228, 54,199,186,
-233,245,215,194, 69, 61,160,101,197,213,202, 29,174,190,110,230,242,226, 33, 63, 17, 39, 24,218,199,192, 72,132, 33,218, 69, 31,
- 33, 87, 11, 46,169,139, 48, 78, 79,173, 97,178,249,187,219,168, 61,117, 72,215, 33, 82,137,197,199,171, 45,254, 86,172,120,137,
-254, 1,205, 93, 79,137,253,226,102, 56,177,164,210,242,187,157,104, 23,182,209,167, 38,158, 82, 49, 30,124,168,230, 52,145,212,
-249,106, 33, 44, 19, 23, 33,248,106, 32, 26,132, 69, 51, 90,149, 89, 29, 37, 44, 45,215,188, 44, 83, 24, 17,199,102,167,184,136,
- 2,231, 82,152,199,131, 39,232, 21,143,148,245,120,215, 38, 8, 83,247,163,151, 12,185, 88,183,141,241, 58, 44,148, 68,151, 91,
- 74, 82, 36,245,157,197,142,118,137,113, 46,204,243, 76,151, 34,221,112,198,205,225, 96, 13,202,176,227, 56,155, 32, 47,248,133,
-169, 33, 88, 65, 83,138, 17, 16, 99, 90, 43,254,150,190, 38, 44,151,110,155, 24, 46, 84,101,145, 69,195, 16,188,176,153,107,117,
-251,157, 21,197,154,243,210,157, 35,230, 92,152, 91,192, 78,105,197,207, 50, 66, 91,246,221, 49, 69,170,123,207, 75, 41,148,105,
- 50,198, 64,206,139,117, 72,183, 46,146, 45, 77,242,206,133,126, 2,196,218, 8, 85,227,191,124,214,253,181,253,135,194,248,213,
- 74,254, 7, 21,253,155,153,240, 55, 70,248,219, 55,132, 63,252, 33,114,241, 91,112,254,191, 64,255,155,144,246,144,190, 12,231,
- 63,134,199, 19,250,250, 61,244,205, 14,121,116, 78,247,226,150,179,195,200,133,118,236, 36,209,213, 66,212, 66, 39,149,115,102,
-118,193, 60,155, 65,203,134,102,101, 97, 14, 83,179,198,248, 8,169,203,149,203,159,254, 34,212,217,146,125, 30, 63,164, 30,142,
- 86,105,157, 13,132,156,153, 15,183,140,227,136, 6,167,210, 53,188,101, 12,212, 46, 49,135,200, 52,103,226,205, 12, 47, 50,250,
-222, 4, 79, 38,180, 56,209, 36,155,177, 37,136, 61,104, 34,221,134,117,239,248,131, 46,185,183, 50, 34, 73,168, 53,112,123,176,
- 74,173,195, 86,224, 22,174, 97, 84,169, 24,132,112,110,190,110,125,225, 73, 64,175,245, 11, 20,142, 99, 69, 62, 40,132, 93,135,
-124,170,135,159,234,225,222, 39,236,123, 41,142,130,229, 22,230,201, 91,178, 1,226, 61,232, 94,129,233, 43,176,255, 54,124,173,
-194,187,138,252,211,247,225,102, 66,127, 56,162, 31, 29, 41, 31,140,204,135,204,193,116,122,107, 46,247, 86,179,233,159,253,216,
-118,232,126, 25,117,209,224, 45,231, 65, 57,139,145,254,237, 29,241,139,231,200,121, 66, 95,102,202,119,143,204, 79, 38, 14, 69,
- 57, 98,107,252,169,220, 25,221,222,137,122,144,150,209,236, 54,144, 62,153,150,240, 60, 5,210,235, 59,194, 39,118,240, 40, 25,
- 79,127, 62,194,255,125, 3,243, 1,249,236, 3,255, 91, 70,228,186,160, 79, 11,220,102, 70,207, 10,216,122,226,171,255, 44,166,
- 94, 54, 1, 75, 39,226,187,240,166,236, 55, 58, 97, 44,237,176, 14,112, 30,225,178,243,220,122, 65, 70,204, 86,216,155,205, 43,
-228, 6,131,193, 5, 49, 43, 30,180,110, 70,244,219, 32,152,200,218,125, 74,109, 35,122,227, 97, 75,142,182, 63,120,244, 17,114,
-246, 24,194, 47,192,229,119,144,219,103,212,223, 25,225,210,109, 93, 91,173,192,146,131,173,167,203,198,205, 88, 88,183,222,121,
- 95,178,159,144,230,116,165,214,217,153,180, 22, 59,117, 19,195, 41,193,118,128,181, 49,184,197,133, 91,126, 25,182, 65,115,101,
- 13, 61,137, 81, 72, 98,182,163,166,230,109, 49,160,178,137, 42, 69,215,174,120,171, 75,216, 90,234,195,102, 52,111,227,124,241,
-233,145, 65,144,186,205,115, 27,197, 40,112,163,174,107,129,236, 19,161,217, 11,170,178, 93, 79,248,247,211,254, 93,145,141,247,
-184,129, 30, 37, 80, 52, 80,176, 14, 76,252,189, 77, 98,151, 58, 2,163, 10,179, 36, 52, 6,186, 32,164,100,244,187, 73,132,217,
-247,180,219, 52,210,224,207,101,117,192,141,138,160,169,183, 15, 92,158,144, 50, 47,214, 46,189,251,249, 12, 54,206,183,149,165,
-141,132, 99,240,113,121,136,214,141, 46, 22, 62, 89, 46,166,208, 28, 9, 62, 46,175, 62,122,246,212, 30,227,178,123,110, 56, 30,
-186, 18, 83, 90,226, 98, 45,143,219,186,236,198, 39, 81, 86, 32, 74, 16, 83,124,135,212,209, 13, 59, 19,124,149, 74,174,153,121,
-154,108,234, 80, 11, 90,102, 47,222,101,233,140, 5, 75,208, 84,112,251,154, 11, 41,131, 56, 47,189,158, 68, 1,119,253,192,217,
-249, 5,221,238,140, 18, 2,227,241,136,214,194,249,238, 12,217, 13, 76,135, 91, 82,236, 24, 67,224,240,242, 5,226,188,117,137,
-201,138, 16,143, 33,141,169, 35, 72,112, 77,199,170,111, 88, 29, 45, 94,244, 5, 7,210,176, 22, 46,203, 51,169, 77, 20,111,212,
- 73,205,133,228, 54, 67, 21,152,181, 26,228,199,247,223,141, 9,176,157, 60,181,247, 86, 99,103,240,174,105, 34,143, 71,243,154,
- 55,229,255,102,213,117,114,161,235, 54, 34,152,143, 29,186,119, 49, 61,233,183, 6, 56,219, 9,247, 68, 56, 87,184, 95, 42,151,
-165,114,249,213,137,139,223,135,179,223,136,116, 15,247,132, 47,190, 64,254,249,111,193, 63,117,137,190,254, 0,118,103,200,107,
- 9, 36,161,111, 2, 63,117, 6,239, 38,194,243,129,203, 31, 84,206,191,119,203,195,227,200, 94, 51,210,139,117, 60,162, 76,174,
-200,156,189, 27,152, 49, 33,123,219, 97, 76,185, 48,164,142,238,141, 55, 56,252,224, 93,194,163,199, 48, 41,229, 56,154, 29, 32,
-194,116, 56,144,143, 35, 85,101,209,157, 69,169,198, 53,158,179,193, 45, 98, 71, 25,206,152,242,204,238, 56,123,164,104, 50, 97,
- 79,136,104, 12, 72, 10,236,114, 37,234,145,177, 31,152,217,185, 15,117, 66,234,178,168,179,195,172,219, 81, 66,101, 63, 39,142,
-115,230,181,243,202,227,168,220, 28,108,151, 30,147, 32, 67,103,252,204,226,169, 89,123, 65,111, 33, 60,238,209,108, 62,119, 57,
-239,221, 79, 89,145,123,151, 80,122,219,161,151, 17,244,165, 93,232, 57, 26,167,149,100, 49,176,249,143, 96,255, 61,248, 64,209,
-111, 84,228,103,122, 83,243,127,255, 22, 14,230,117,174, 83,179, 70,173,193, 31, 91,212,105,220,220, 12,193,243,128,163,119,183,
- 73,236, 82,239, 9,164,203, 68,124,189, 67,238,123, 95,116,101,182,171,130,154, 42,218,187, 88,217, 88,133,164,169,106,239, 76,
-142,151, 29,102,216,252,163,246,185,137,234, 56,173, 3,204,217, 2,109,190, 53,195, 47,188, 15,175,188,137,220,127,129,190,221,
- 19,223, 28, 24,158, 31,121,176,207,236, 59,155, 18,136, 31,148,113,233,252,214,226, 97,123,169,169,243,126,246, 64,154, 11,114,
- 59, 35, 31, 77,164,206, 9, 57,175, 38,139,107,205,144,138, 82,158,143,112, 95, 16,157,145, 81, 41,162,139,122, 95, 93,121, 29,
-116,229,180,155,237,104,211, 1,183, 51, 32,249,126,125, 46,148,219, 9,185,138,200,251, 59,120,179,192,131,223,129,244,167, 64,
-254, 34,225,215,222, 35,253, 79,123,234,245, 76,119,223,161, 76,242, 19, 6,108, 46, 36,106, 29,116,101,195, 1,192,213,250,126,
-249, 55, 74,158,129, 92, 92,237,189,128, 20,149, 26,124, 87, 88,183,170,112, 19,148,181, 75,166,182, 49,165, 10, 53,250,101,173,
- 43,132,164, 74, 96,212, 66,170, 78,199,114, 33, 27,155, 68,182,197,239, 45, 56,146, 84,204,230,234, 26, 20, 81, 61, 25,187, 23,
-239,234,140,151, 96, 34,164, 78, 3,209, 81,176,101, 97, 8,152,186, 93,151,140,116,219,135,151,230, 79,119,108,109, 92,214, 76,
- 62,210,110,194,185, 77,119,223, 64, 63, 85,221,254,185, 28,246,234,194, 57, 43, 48,134, 40, 36, 17,131,237,108,172,121, 57, 8,
-115,118, 87,135,199,249, 53,237, 88,243, 90, 55,200, 22, 24,214, 53, 22, 43,113, 74,104,234,110, 89, 96, 52,219, 40,207,162, 30,
- 80, 82,143, 36, 31, 31,175, 33, 59,117, 17, 2,106,195,183, 53,209, 74, 16,148, 98,221,164,154,187, 65,156,160, 38,226,192,148,
-100,227,248, 42, 88,183,216,246,242,186,146, 7, 91,118,250,106,177,180,142, 62, 4, 33,246,118,161,231,121, 54,149,187, 11,214,
- 74,173,214,113,150,246, 76,110,166, 51, 41,217, 51,208, 58,248, 38,156,172, 80, 75,221,100, 24,120, 86,122, 63,208,167, 14, 73,
-157,137,198,242, 76, 31, 2,221,217, 25,251,105, 34, 84,165,238, 18,135,171, 43,116,158,221,226,101,163,247,226,246,185,246,255,
-115,219, 69,202,221,181,150,158, 88,213, 84,117, 97,111, 44,102,183,170, 14, 65,138,190,158,114,210,161, 7,184, 76, 37, 91, 2,
- 93, 93, 71,100, 75,158,253, 70,241, 47, 98,207, 83, 29,143, 20, 95,185,232,182,112,186,139,118,102,227,187,228, 14,228, 81,185,
-195,169, 56, 61,120, 83, 44, 48,162, 28,189, 34,254,192,197, 29, 23, 59,191,228,115,229,222,126,228,193,111, 31,185,248,191, 2,
-187,179, 91,226, 63,121, 69,248, 87, 47,209,159,127,132,190,253, 8,189, 22,244,252, 1,124,186,194,225, 0, 63,170,132,223,191,
-224,242,155,133,139,143,110,169,115, 65, 43,204, 81,152, 98, 37, 39,187,140, 83, 88,105, 82,165,218,161, 54,228, 66,119,255, 33,
-250,240, 85,228, 71, 31, 65,223, 51,125,244, 1,211,113, 68, 83, 64,111,111, 40,135, 3, 69, 10,125, 39, 11,215,153, 12,218, 57,
- 7,184, 66,208, 74, 37, 48,165,142, 46, 5,130,206, 22,231, 55, 77,208,117, 4, 49,251, 0,131,144,242,140,212,217, 24,248, 65,
- 8,201, 44,104,246,154,187,192,166,228, 13,157, 42, 48,206,194,197,195,200,131, 7, 21,125,110,126, 80,233, 65,118,129,250, 36,
- 55,101,154,165,126,160,200,121,103,241,160, 95,216,193,167, 6,248,116,132,238, 1,228, 9,116, 2,110,236, 98,159,226,218,170,
-197, 11,208, 27, 24,223,135, 15, 3,188,155,225,122,134, 63,123,110,139,223, 27,171,104, 52,219,127,215,182,235,194,201, 86, 27,
-117,116, 59,144, 9,206,170, 22, 76, 36,215, 58, 18, 49,144, 75,188,236,144,183, 7,203, 0,205,106, 57,239,179, 90,166,140,195,
- 90, 90, 12, 98,139, 37,213,159,176, 6,222,142,249, 83,104, 93,172,156,206, 61,125, 88,174,207,179,217, 41,223, 8,240,213,151,
-200,159,125, 8,195, 61,228,205, 76,248,116, 38,125, 52,114,241,254,158,251, 69,153, 35, 28,252,176,109,227,193,184,233,226,156,
-254,184,156, 79,179,147, 41,227, 12,247,174, 51, 97,152,145,120, 36,246, 64,119,110, 62,252,183,123,194, 92,224, 91,192,149,141,
-165, 19,153, 48, 87, 27,189,183,213,169,172,151,168,110, 88,236,225, 78,135, 29,218, 94,238, 88, 41,177, 16,110, 38, 98,223,193,
-203, 8,211, 19,184, 60, 64,252, 37,120,237, 93,210,191,243, 27,148,255,244, 37,220,247, 11,174, 29, 40,245,227, 94,115,101, 19,
-213, 26, 54, 99,185, 59, 5,213, 66, 79, 91,118,134,235, 31,169,158, 95,223,130, 75,140,127,190,170,115,219, 78,113,251,245, 84,
- 54,142,204,106,201,138,133, 74, 9,234,240,186,181,227,180, 2, 65, 23, 56, 80,113,116,235, 18,146,177,249,118,215,128,185, 53,
-159, 58,168,144,168,116, 42, 30,184,178, 22,111,217,157,144,213, 23, 44, 45, 36,165,104, 93, 5,125, 75,161,105,190,223,206,122,
- 93, 8,155,120, 96,214,215, 36,251,246, 60,139,172, 61,115,144, 37,173, 48,110, 10,168, 45,160,101,150,192, 92, 12, 89,171, 75,
- 97,228, 5,141,174, 5, 85,241, 76,132,198,170,239, 93, 64, 55, 59, 98,185, 77, 3, 82,155, 54,182,159,177,218,249,181, 20,230,
-213, 11,178,205,164,115, 29,157, 55,117,189, 91,228, 84, 23,193,106,187, 80,196,149,243,165, 22,164, 40, 26, 13, 26, 97, 99,239,
-108,175, 89,140,132,254,204, 41,147,141, 33, 80, 55,163,228,149, 65,158,115,161, 78,147,137,205, 74, 65,107, 70,107, 94,126,120,
- 89, 86,126,178,140,172,107,201,235,110,185, 61, 3,165,249,215,213,221, 80, 66, 55,244,116, 67, 79,232,122, 99,164, 56,188,102,
-119,118, 14,169, 99,186,185, 97, 2,198,171, 43,234,254,150,232, 22, 54,109,130,187, 86,117, 71,187,224,107, 45,238, 99,151, 83,
- 8,132, 63, 8,182,174, 96, 41,108,218,132, 65,181,161,138,163, 23,101,149, 24, 3, 41, 36,106,136,140,243, 68,157,166,229, 25,
- 22,183,204, 89,162,154, 46,145,186, 16, 60, 62, 53, 59, 89,111,187,255,145, 77, 65,115,183,230,144, 19,202,229,233, 34,125,251,
- 27,119, 46,245,229, 60,168,202,232,202, 61,193,194, 51,130,171,189,207, 6,225,114,128,135,192,195,121,230,149,127, 52,242,224,
- 31, 93,113,246,234, 71,196,191,124, 15,249, 23, 30,162,159,120,149, 58, 93, 34,207, 4,186, 35,188, 38,240, 37, 65,190, 54, 16,
-159, 76,240,188, 16,159, 22,250,253,209,162, 88, 35, 28,130, 46,163,137,189,167,145,134,185,112,241,230, 91,196,183,223, 34,124,
-243, 27, 76,251, 43,242,225,214, 0,145, 37, 65,153,232,165, 48,196,232,251, 54, 99,196,103, 31,177,198,206, 71,102,170, 46, 9,
-154,137,146, 44,231,125,178,139, 93,231, 76,149,142, 16,171,137, 72,250,129, 64,161,159, 50,193,217,146,218, 8, 82,234,202, 46,
-177,216,187, 33, 21,230, 16,153,107,101,190, 86,250,207,158,195, 91, 21,253,238,232, 73, 62,254, 33,235,212, 40,117,209,238,235,
-120,191, 35,124, 98,128, 79, 15,240,185, 8,143, 31, 64, 57,179, 11, 93,247,118,161, 31,227,102,110, 58,152, 72,110,254,177, 49,
-225,175, 20,125, 81,204,102,246,120,128,235,108, 59,122, 15,138,209, 90,151,131,190,113,204,131,172,137, 83,178, 29,233,184, 80,
- 40, 96, 35,212, 20,161, 43, 74,220, 5,194,195, 14,121,165,183,155,248, 88, 96,175, 14,185,112,138,220,194,102,112, 25,148,119,
- 95, 4, 54, 1, 28, 91,164,232,230, 87, 48, 37,180,164, 22, 79,230, 63,235, 71, 35,220, 22, 27,139,127, 43,195,103,158,192, 59,
- 15,225,209, 25,124,166, 16,223, 63, 50, 60, 27,185, 63, 23, 14, 81,150,241,106, 59,200,219,238,115, 89, 45,202, 50,113,180,130,
-113,118,189,225, 65,137,215, 51,165, 19,228,195, 64, 56,143,232, 39,119,200,101,132,119,206, 44,207,253, 91,178,100,239,176, 47,
-200, 92,220,225,192, 73, 94,178,174,247,235, 58, 46,151,205, 47,127,108,116,172,232,141,194,195,106, 19,152,154, 65,158,194,217,
-151,161,254, 21,228, 47,125,155,244,215,255, 46,122,101, 67,153,234, 80,149,117,220,177,225,122,182,139,120,115,161, 47,227,185,
- 13,120, 69, 55, 93,109, 3,188, 44,235, 24,117, 95,180, 24, 28,165, 40,139,128,201,192, 72,156,176,217,173,128, 51, 27,149,248,
-173, 88, 75,182, 93,186,108, 46,105,101,193,247, 54, 66, 86,241,174,127,205,178,118, 0,204, 9,235, 67, 87, 65,231,146, 2,135,
-227, 85,133,206, 79,176,124, 23, 44,227,211,190,153, 53, 35, 94,253, 32, 79,209,236, 74, 73,103,162, 26, 21,179, 46, 29,145,219,
-209,252,224,182,112,150,184,120,234, 67,114,123,170, 86, 43, 50,216, 68,148,182,233, 66, 16,230, 90,201, 89,151, 66,172, 52,180,
-238, 86, 61,239, 26, 33,245,175, 23,177, 78, 87,100, 9,220, 90, 4,136, 45,237,172, 81,242,138, 43,246,163,239,132,107, 53,207,
-186,116, 61,226,209,165,102, 63,247,224,147, 48, 19,139,159,167,218,168,124,237,162,171, 4,103, 93, 20,140, 49, 94,107,241,239,
-177, 58,210, 54,152, 71, 58, 88,160, 14, 34, 68, 85, 66,138,150,194,167, 94,168,182,238,126,158, 44, 69,206, 41,113, 11, 0, 39,
-156,100,148, 46,187,250,234,133, 67,216,232, 38,212,178,219, 78,170,214,152, 18,221,176, 35,117, 61, 53, 4, 3,205,228,153, 33,
- 68, 98, 63, 48,205, 19,135,105,226,120,115, 13,121,118,187, 93, 58,185,148,109, 58,225, 96,154,210,186,225,186,168,247, 37,108,
-180, 61,173, 24,212,149,150,160,117,213,149, 7,127, 13, 75, 53, 96, 90,215, 37,164,235, 56, 78, 35,121, 28, 87,241,223,146,167,
-238, 54,193,150,173,128, 90,103, 94,243,162,188, 23,130,231,173,215,117, 92,223,166, 73,155,144,169, 53,198,248,244, 30,215,143,
- 67, 39, 78, 6, 17, 41,109, 42,231,217, 31,204,134, 79,188,174,150,149, 29, 49, 42,220,135, 17,206,147,112,255, 65,228,126, 85,
- 30,223, 76,188,246,223, 60,225,222,111,188, 96,248,165, 15,137,255,246, 99,244,243,143,209,113, 7, 79,177,236,206,135,192,190,
-179,125,242,183, 43,241,187,137,248,209, 76,186,206,116,204,164, 14,134,100,129, 49,215,147, 85,164,203,244,181, 98, 0, 0, 32,
- 0, 73, 68, 65, 84,221, 91,159, 66, 47,206, 8,199, 3,245,230, 6,166,145, 46,218, 40,174,148, 9,237,130,251,150,237, 69, 42,
- 85,201,193,188,238, 45,218, 48,182,189, 97, 45, 6,190, 33,160,169, 51,250,212,156,209,227, 30,173, 29, 49, 38,228,124,135,116,
-103,200, 48, 33, 58,195, 14,100, 84,194,172, 54,202,154,109, 87, 18, 99, 36, 45,104,213, 64, 29, 43,245,163,137,244,197,115,248,
- 66,103,129, 49,147,121, 49,101, 23,144,179,232, 17,145,129,240,184,135, 47,236,224, 51, 1, 30,222, 71,242, 67,247,104, 31,160,
-236, 77, 88,208,102,140,187, 8,221, 25,240, 18,158,237,225,185, 67,113,114,134,199, 14,210,121,182, 55,207,113,239, 31,182,186,
- 17, 88, 56, 98, 57,212, 38, 86, 82, 79,254,114,199,156,179,220, 98, 83,190, 11,244, 81, 9,151, 29,225,149, 14,206, 19, 34, 17,
- 61,204,166, 6, 44,186, 68,104, 86, 86, 16,159,186, 25,119, 85, 96,234,169, 2, 94,252, 18,111,251, 66, 85, 36, 53, 35,124,179,
-207, 8, 60, 47,232, 84,108,219,219, 5,244, 43, 55,200,235,231,112,150,144, 55,123,194, 39, 7,226, 7, 59, 46, 14, 7, 30, 70,
-251, 89, 14,229, 84, 49,205,102,239,218,158,231,226,109, 65,244,125,252, 65,148,120, 93,216,133, 25, 25, 2,242,131,128,116, 1,
- 13, 3,114,153,224,173,128, 28,109,167,169, 85,208, 50, 81, 35,164, 99, 69, 68, 23,156,107, 83,162, 7, 61, 45, 94,100, 99,153,
-146,165,110,177,125,171, 30, 43,210,124, 86, 18,128, 29,132,183,225,254,127, 72,252, 79,190, 74,253,171,239,161,175, 36, 82, 46,
-228, 77, 90,239,137, 0,109,243, 1,174, 62,147, 94,185,212,171, 80,238, 46, 99,189,234, 41, 76,166,229,129, 47, 23,157,202,202,
-240,223, 72,110,164,173, 30,164,218,122,197, 47,180, 54,246,157,138,109,155, 90, 87, 94, 79, 46,120,150, 11,234, 36,137,109,251,
-117, 54,151,123,251,217,162, 40, 73, 34, 41, 8,103,174,135, 24, 91, 16, 75, 83, 80,187, 45,203,124,229,120,220,168,189,240,177,
-229, 88,251,110,175, 86, 7,191,232,194,123,114,194,152, 31,254,238,193,110,145,157, 65,117,137, 88,109,148,185,185,108,132,120,
- 98,201,121,177,174,170,230,186, 76, 16, 62, 62, 12, 93, 11, 45, 89,180, 44,202,250,223, 45,163, 61, 34, 39,130,168, 22,205,147,
-130,123,196,171,225, 65,187,126, 48,238,186, 90, 38, 0, 21, 3,193,164,206, 58,229, 5,103,106, 23,112, 21, 89, 38, 73,170,149,
- 16,162,189, 30, 57, 47, 42,137, 16,251, 37,171,214,196,114,193,149,238,213, 88,243, 46,136, 83, 87, 62,169, 43,197,107,198,172,
-100, 43,191,109,117, 18,184,202,212,178, 13,202, 70, 48, 18,214,204,242, 69,216,160, 30,220, 3, 49,117,116, 93, 71,140, 29,115,
-206,140,199,189,189, 39, 67,207, 62,103,110,166, 35,199,219, 27,152, 39, 83,241, 75,216,116,186,174, 42, 23,243,159,183, 9,192,
-214,215, 45,178,126, 77,221,120,245,101, 11,171,212,117,196,185, 29,137,247, 18,136,195, 25,183,243,196,180, 63,152,237, 44, 24,
- 91, 69,116,179, 14,241, 47, 84,188,152,105,251,253,187,134,180, 86, 70,180,194,118,219, 16,233, 6,207, 44,119,133,239,250,241,
-177,251,246, 31,165, 45,180, 63,249,131,159, 48,142,241,190, 42, 99,181, 81,204, 40,112, 85,225, 50, 40, 87, 98, 77,213,179,157,
-240,254, 46,240,106,174,188,241,219,215, 60,252,135,183,236,126,246, 35,194,191,251, 10,250, 79, 60, 66,231, 30, 25, 20,198,108,
- 63,240, 27,192,207, 36,248,163,137,240,189, 76,255,195, 91,226,205,204, 89, 52,132,232,189,122,164, 92,222, 99,250,229, 63,199,
-252, 59, 95, 33, 93, 61,103, 56, 94,147, 58, 83, 53,206,215, 47, 12, 20,224,166,127, 98,132, 26,208,154,153, 8,236,220,130, 98,
- 9, 72, 66, 23,253,192, 18,181,109, 91, 85,144,132,244,157,189, 33, 37, 35,121,134,121, 68,206,207,145,139, 29,114,110,164, 38,
- 66,133, 51,123, 48,120,105, 59,240, 42, 25, 81,203, 36, 14, 82,145,206,148,238,245,187, 71,226, 39,123,120, 61,193,179, 98,243,
-255,115, 65,206, 4, 25,133,240,102, 7,159, 31,224,179, 10,143, 30, 35,229,129, 75,155,179, 41,232,114,134,209, 88,244,210,230,
-225, 65,225,197, 21, 60, 81, 27,185,239, 13,151, 38, 63,229,113,179,123,239,210,123, 95, 61,232,122, 52, 54,180, 98,108,241,152,
- 85, 12,149, 47, 6,159,105,162,174,222, 89, 1,157,168, 1, 21,118, 9,121,212, 35,131,169, 82,153, 42,117, 86,223,177,110,210,
-165,124,252,203,169, 99,229,228,177,148,141,237,169, 46, 23,222, 50,103,116,147,187, 93, 24, 92,249,148,225,201, 68,124, 39,194,
- 77,134,175,189,132, 47, 63,130,123, 59,228,115, 23,164,247,103,234,237,204,189,167, 51, 57,185, 39,189,174, 43,134,200, 10, 7,
-217,126, 56, 74, 49,226, 95, 85, 24,197, 66,137,186,171, 66, 56,203, 72,154, 73,239,187,223, 47, 6,184, 76,240,233,193,120, 67,
-163,207,118,247, 80,123, 33,206,149,160,117, 25,197,159,168, 82,125, 92, 25,101,221,221,138, 99, 70,165,237,168,199,138, 76,213,
- 15,202, 25,164,115, 60,238,167,145, 63,254, 31, 16, 63,255,235,212,143, 42,241,190,109,109, 26,180, 71, 78, 62,176,178, 77,162,
- 89, 49,240,122, 39, 49, 85,148, 90,228,206,101,190,190, 81, 85,215,239, 89,116, 51, 6, 87,167,191, 21, 69,213,118,190, 82,170,
- 67, 85,252, 0,114,229,244,236,119,107,239,172,242, 82,218, 37, 87,239, 36,181,157,130,113, 22, 86,245,230,123,107,127, 38,160,
-110, 35,139,182, 63,245,189,209, 92,170,247, 89, 43,240, 68,169, 75,108,108,195,100,138, 8,146, 58,251,251,231,201,104, 94, 11,
- 68,199,113,199,106,254, 95,203,151,143,144, 44, 32,100,137,245,118,245,190,162, 75, 44,106, 70,236, 89, 19,235,247,230,172,158,
- 38,185, 94,216,139,179,195,159,122, 65,108,237,224,162,188,212,166, 73, 27, 18,105,245,106,180,122,241, 19,218, 5,179,196,156,
- 43,177, 51, 58, 89,172,166, 22,111,217,233,235,196,194, 59,209,208,161,204, 54, 93,104,138,248, 90,137, 81, 60,254, 51, 82,138,
- 79,111,234, 76,157, 45,166, 83, 99,178,179,174,174, 43,146,170,101, 93, 3,105, 37, 87,179,251, 45, 91,161,176,226, 12,197,253,
-218,134,103,149,117, 4, 45,193, 56,229, 37, 47,153, 9, 77,160, 38,158,179,222,232,109,213, 63, 80, 49, 90, 86,122,151,122, 52,
- 4,142,211,200, 60, 78,116, 49,114,156,102,170,142,204,165, 90, 14,200, 38,167,160,226,201,115, 18,189, 67,175,148,121, 51, 1,
- 16, 57,249,124,156,208,146, 56, 53, 98,180, 3,212,125, 1, 92,132,196,197,227, 87,217, 31, 15, 72,169, 28, 85, 57,222,222, 82,
-243,140,104, 37,134,206,233,122, 86, 52, 45, 22, 54,177, 98,166, 93,232,167,133,158,219,183, 55, 72,220, 19,231, 90,189,155, 15,
-240,255,131,124,190,171, 33, 90,118,234,232, 66, 55,109,217,205, 90, 12,222, 49, 55, 21,175,239,138, 50,240,172, 10,103,230, 12,
-227,182, 24,224,227, 42, 10, 79, 31, 8, 15,179,242,214,215,111,121,244,111,237,217,125,225, 25,225,215, 95,181,192,145,177,179,
-127,225, 76,224,126, 15,143, 19,250,217, 10,223, 72,196, 63, 56, 16, 95,140,116,185, 48,236, 97,254,103,127,133,253,171, 63, 69,
-247,238,127,199,120,251,220,236, 81,221,142,241,214, 4, 17,196,176, 16, 70, 69,226, 18, 13, 86,131, 82, 36, 27, 80, 37,177, 40,
- 65,205,167,109,150, 17,201, 74, 96,166,106, 64,163, 47, 63,107, 37,104, 33,220, 92, 67, 25,145,116, 9,151, 61, 18,138, 9,184,
- 10,132,123,138,206,150, 84, 22,102,165, 75,217,160, 42,179,209,230, 68, 2,250, 34, 35,169, 67, 94, 9, 80, 18, 18, 5,233,212,
-212,213,159,218,193, 79, 43,188,250, 73,136,127, 30,246, 95,241, 18,254, 0,249,104,108,211, 92,215, 37,109, 47, 48,223,194,147,
- 25,110, 51,154,189,109, 24, 20,222, 26,236, 38, 27,125,124,114, 8,182,146,199,224, 13, 97, 35,218, 90, 58,131, 54,250,246,189,
- 37, 77,221,219,242,211, 85,108,236,120,225, 44,249, 62,216, 5,244, 66,215, 56,171,237, 72,125,211,157,182, 29, 89,240, 72,239,
- 19,123,155,172,162,147,182, 83,151, 22,133, 21,163,141,193,178,249,224,245,210, 98,104,121, 50, 17,223, 24,208, 63, 56, 32,159,
- 56,131,199, 59,120,125,135,124,254,130,244, 60, 51, 28,111,184,184, 46,228, 4,199,236, 95,183,174, 10,226,213,206, 41, 39, 43,
-135,182, 27,206, 81, 56, 86, 8, 47,230, 37,208, 34,118, 1,237, 2,116, 88,204,236, 59, 3, 50, 85,226,204, 2,179,183,173,140,
- 16,167,122,130,112,219, 6, 66, 44, 62, 84,185,139,199,242, 27,250, 38,192,116,132,249,187,190,210,217, 25,147,224,236, 87, 9,
-255,241,231, 9,255,230, 55, 9,247,226,226, 36,111,251,241, 69,108,168,171, 53,113,113,133,149,143,119,136,181,174, 48, 69,253,
- 56, 29,246,132, 14,215,250,155, 18, 54, 75,112,191, 50,150, 8, 81,173, 70, 39, 67, 86, 4,170, 11,214,174,171,114,230,227,243,
-181,251, 98,131,221,244,142,184, 17,225,238,132,209,156,128, 94,196,189,214, 53, 35, 21,178, 68,102, 17,230, 54,194, 21,181,188,
-245,205,208,150,182,139,181, 54,157, 26, 34,101,158, 44,104, 74,252, 66,151,176,137,243,148,165,192,140, 41, 57, 65,175,174, 32,
-169,186, 6,216, 22,167, 11, 21,247,154, 87,133,172,213,186,255,205, 68, 42, 46,121,240,186, 92, 94,117,171,106,247, 41, 89, 23,
- 87,113,162,108,100, 90,237, 98, 95,157, 12,178, 64,130,226,112,238,157, 96, 98,206,133,233,112, 67, 9,137, 34,137, 34,222,169,
- 58, 36,166, 96,220,143,144, 44,133, 76, 61, 53,172, 8, 11,115,124,206, 51,250,255,209,245,118,177,182,101,217,125,215,111,140,
- 57,215, 90,123,159,143,251, 85,117,235,163,171,219, 93,238,110,219,109,119, 28, 39,178, 19,199, 73, 72, 8,249, 80,148, 32,100,
-132, 64,188, 16,161,136, 8,158, 64,138,120, 0, 5,162, 86,224,129, 7,144, 16,136, 7, 4, 15, 72, 8, 33,148, 40, 65, 74,136,
- 66,136,132, 29, 59,182,227,182,211,137,237, 78,140,251,195,238,118, 87,119, 87,215,199,173,251,113,206,222,123,173, 57,231,224,
- 97,140,185,214,190,183,170, 31,142,238,173, 91, 71,103,159,189,246, 90,115,206, 49,198,255,255,251,215,226, 7,151, 96,160,139,
- 26, 58,100, 68, 60,136, 74, 35,124,165,135,209,208, 43,205,200, 73,167,149,104, 15,199, 28, 89, 18, 41,197,231, 16,170,251,178,
-204, 33,138,123, 30, 99,138,177,118,111, 94, 84,135,169, 38,242, 56,145,198, 49,226, 75,103,196, 26, 85,178,231,137,164, 68,237,
-162,180, 56, 2,174,121, 68, 13, 52,249, 90, 79,192,125,214,145,128,157, 89, 75,122, 39,202, 54,253,196,122,152, 91,215, 12,191,
-110,123, 17, 94,185,127,143,116,125,205, 92, 27,207, 88,184,125,250,100, 37,189,233,121,141,220,147,221, 66,211, 80, 75,161,126,
-196,134,126, 78, 76, 20,145, 23,192, 75, 47, 90,216, 94,168,149, 94,216,221,237, 67,186,247,168,212,135, 14,236,232, 2,156,234,
- 21,249, 51,123, 17, 71, 23, 92,232,102,220,138,144, 35,211,250,164, 48, 55,227,166, 10,207,146,240,232,174,240,114,133, 87,191,
-122,195,131,255,224,192,248,185, 71,200, 95,121, 25, 62,117,215,191,249,113, 2, 93, 28,167, 58, 9, 92, 42,124,125, 68,191,254,
- 20, 30,188, 9,127,242, 47,178,251,250,111,162,239,189,199,188, 28, 25, 46, 39,110, 91,225,180, 84, 52,249,147, 87,173,173,228,
-172, 38, 41, 78,249,130,234,192,160,238, 45, 23, 1, 29, 98, 51,204, 18,152,191, 16,100, 52,219,136, 85,234, 22, 16,217, 73, 36,
- 87, 29,253,163,218,141, 78,170, 43,234,161, 44,167,134,188, 7,195,179, 19,106, 66, 27, 96, 89,140, 60, 20,164, 39,153, 61,170,
-200,107, 3,242,178, 15,251,164,138,171,200, 63, 1,188,114, 1,187,191, 16, 60,247, 91,151, 72,183, 19,204, 21, 59,133, 40, 32,
- 16,183,104,130,175, 62,243,168,211, 78, 93,155, 4,185,140,235,117,138,118,211,164,216, 77,243,254,160, 60, 47, 80,123, 78,117,
-190,218,171,156, 72,165,230,212,173, 20,155,122, 78,130,238, 7,244, 58,123,181,170,130,157,188, 27, 96,139, 11,101,200,241,126,
-100,155,136,173,155,121,220, 55, 61,224, 78,206,110,196,243,198, 67, 10, 26,135, 12,177, 8, 15,217, 75,190, 39,160, 15, 18,245,
- 4,237,189,130,236, 18,122, 55,218,240,127,106,132,187, 35,242,201, 61,233,131,133,241, 84,185, 58,221,120,199, 38,195,161, 42,
-170,182, 37,107,197,254,153,251, 24,226,133, 57,127,109, 1,243, 59, 25,211,211,133,146,207, 84,193, 73,145,151, 51,220, 25,176,
- 55, 65,231,216, 61, 31,187, 79,208,250, 14,219,236,204,188,199, 11, 97, 16, 81,150,117,254,106,239, 59,151,234, 57,178,239, 27,
- 60,252, 53,104,239, 64,186, 10,213,218, 53,242,123,255, 93,244,211,255, 25,242, 54,164,139,173,197,223,171,232, 62,207, 62,119,
-185, 61, 39, 88, 78,120,117, 30,149,120, 61, 39,192,173,161, 21, 27,161,202,100, 75,109,107,141,115,133,222, 58, 82, 89, 49,177,
-205, 43,139, 22,115,120, 83, 89, 19,243, 14, 65,118,155,158,179,167,157,221, 3, 38,129, 37,149, 51, 31, 93, 59,179,231,185, 70,
- 32,197, 76,151,168,173,231, 86, 60,181, 77, 51, 53, 57, 10,202,196,217,238,218,122, 69, 84,163, 77,105, 48,140,200,180,119,123,
- 86,109, 30, 46,164,225,249, 24,188, 85,211, 74,115,114, 28, 48,134, 61,236, 60,231,198,197,109,182,126,188, 37,198, 67,173, 54,
-170,184,135,191,213,237,222,110,173, 51, 18, 92,112, 90,250, 26, 26,182,185, 30, 89,148, 4,246,131,249, 89,189,109, 35,136,117,
-131,215,205, 1,144, 2, 72, 50,152,161,251,107,116,218, 83,159, 61,102, 62,222,114,210,129,197, 18, 85, 26,164, 70,149,228,126,
-119, 4, 77,153,166, 25,202,226,226,219,228, 85,120, 69,168, 75,161,116, 65, 91, 93, 34,213, 76, 67, 57, 47, 27, 75, 66,125, 51,
- 84,201,161, 78,143,123,190, 89, 79,110, 90,103,245,213,106,220,107,254, 89,166, 52,160, 57,252,215,243, 49, 54,212,231, 21,134,
- 98,207, 71,152,114, 54, 62, 19, 17,242, 48,145,199, 9,178, 50,207, 11,182,204, 1,183,113, 72,112,109,205,223, 95,216,229,120,
-206,186, 41, 43,202,214, 58, 96, 34, 54,117,211, 51, 4,232,139, 21,202,202, 17, 8, 47,130,120,152, 88,183,216,157, 16,242,241,
-136, 13,153,195,211,199,212,211, 41, 52, 4,172,209,172, 61, 81, 46,165,193,181, 21,181,248,200, 33,174,177,189,208, 38, 63,255,
- 85, 92,164,215,214, 81,206,139,169,136, 47,110,232,219, 4,254, 35,143, 10,190,230,150, 26,148, 46,188, 80,233,175, 58,116,235,
-107, 84,232,141,115,230,180, 81,205,103, 75,214, 28, 97, 94,154,255,219,209,224, 86,225,131, 43,229,165, 6,175,127,233, 9,247,
-254,194, 45,249,143,221, 69,254,227, 87,224, 99, 23,240,193, 8,143, 60, 71,220, 38,224,165, 4,156,104,175,127, 6,218, 7,164,
-250,187, 12,237,134, 97, 20,198, 1,242,237, 1, 83, 35,153, 80, 37, 78,202, 6, 86, 23, 52, 85,100, 26,208,164,238,131,151,140,
-100, 67, 99,246, 42, 23,206, 93,183, 15,234,154, 53, 44, 65, 17, 90,123,183, 99, 80,177, 6, 69,174, 51,146,129,203,134,212, 29,
- 28,103,207,139, 31, 20,203,194, 48, 87,228,253,133,121,134, 97,167, 94,121, 46, 5,118,226, 74,241, 15, 10,114, 63,123, 91,234,
- 22,184,151,224,161, 57,177, 79, 94, 66,150,191, 19,106,119,131,122,139, 45,226,171, 98,204,160,109, 55, 34, 79,102,236,231,159,
-193, 93,129,135,193,135,159,129, 59, 25,246, 9,222, 15,144,255, 78,182, 15,168,190, 72,205,242,177, 67,183, 55,201, 25,214, 86,
-113,244,101, 82, 23, 23,234, 40,232, 69, 70,238,142, 1, 23,151,213, 42,103,181, 33,203, 38, 0, 17,233, 41, 85,178,230, 67, 59,
-251,252,172,210, 56,243,114,247,155, 82,165,111, 50,201,211, 73, 58,110,235,212, 96, 39,232,189, 1,110,149,246,205,133,246,157,
- 5, 25, 19, 82, 11,124,233, 25,252,216, 53, 60,156,224, 83, 59,210,227,202,176, 24, 87,223, 57,120, 43, 54,193, 28, 49,176,233,
- 5, 59,223,249, 6,115, 46, 66, 49, 7,255,145, 15, 13, 25,139,115,204, 39, 69,190,157,176, 4,242,242,132,220, 25,177, 79, 53,
- 15,194, 41,128,204,180,217, 51,142,173,182, 15,141, 27, 76,195,159, 25,188,239, 85,178,221, 95,183, 26, 60,169,240,158,194,241,
- 29, 56,125, 17,242, 39,232, 3, 47,166, 63,140,254,107,215,232,127,253,152,124, 87, 73,173,177,156,209, 98, 95,172,186,251,230,
-210,133,144, 17,183,189,158,242,245, 92,127,164,231,221,132, 16, 26, 38, 11, 14,188,173, 94,103,107,219, 74, 82,123,245,216,147,
-219,218,182, 2,184,134,163,174,227,199, 67,176, 38, 70, 83,199,167,246, 10,207,124, 35,236, 98, 50,117,133,154,211,210,186,143,
-189, 67, 57, 6,223, 20, 82,241,150,110,193, 88,162, 98,172,154,144,148, 73,106,206,170,104, 53, 72,118,189, 37, 53, 96,187, 11,
-191, 30,167, 83,108,228, 3, 77, 19, 58,184,106,168, 30, 15,171, 47,186,105,162, 36,159, 19,151,184, 6,169,139, 36,218, 54, 38,
-144, 32,185,149, 56,147,181, 51, 48, 79, 63, 44,182, 23,132,154, 53, 64, 75,189,165, 59,132, 93,116, 10,177,199,218, 85, 57, 19,
- 65,244,182,123, 83, 33,103, 39, 99,234,197, 30,189,186, 71, 59, 29, 88,230, 19,183,115, 97, 81,165,132,210,187, 83,224, 2,108,
- 14,106,232,180,243,207,165, 69, 78,119, 39,214,244,239,139, 86,180, 68,139, 77, 52,193,144, 17,205,254,247, 94,169,170,103,120,
-180,226,164,123,205,201,197,104,209,246,182,214,168,165, 3,102,188, 58,214,148, 93, 76,187,148,176,153,186,176,167,133,119,240,
-195,176,148,179,229, 74, 97,208,196, 48,238, 72,121,160, 24,204,243, 28,209,165,217,157, 0, 34,148, 82,227,119,248,176,219, 70,
-147, 99, 87,171, 61,159, 54,103, 29,123, 43,182,229, 34,124,168, 52,246,103,182,131,102,106,173, 80, 11, 7, 73,220, 62,125,202,
- 43,151,151,124,208,140,229,224,244,203, 86,125, 92,184,234, 34,162, 80,108, 89,168,181, 98,165, 70, 39, 64,183,238,152,124,184,
-242, 22,209,179,124, 67,215, 31, 61,135,165,144,239,221,114,127,177,245,126,254,255,210,191,122, 55,127, 30, 44,172, 63,178,198,
-115,234,121,252,227, 11,189,253,118, 22, 34, 49,135,192,227,196,166,186, 94,162, 82,184, 81,225,118,231, 15,232,248,229, 91,242,
-223,185,241,121,226,143, 14,158,168, 54,203,202, 89, 39,123, 28,167,237, 4,145,119, 73,239,127, 29,185, 63,145, 7, 97,119,156,
-217,165, 16,115,201,134, 83,145,206, 4,181,202, 96,141,125, 86,174,166,204,176, 27,144, 65,209, 41, 33,151, 9,238, 13,126, 74,
- 60,201,122, 44,119,129, 67, 40,213,155, 7,128,203,253, 1,125,121,132, 33, 98,245,118, 78, 51,146,218,252,160,112,145,144,187,
-153,116, 87,201,248,130,111,197,189, 43,122, 1, 50,186, 21,206,145,237, 78, 91,145,151, 6,248,152,194,213, 15,128, 93, 32,135,
- 95,136, 39,251, 0,243, 18, 43, 98,103,103, 38,184,163,240,179, 79,224,183, 79,216,163, 25,153, 27,188,146, 96, 81,228,245, 9,
- 94,157,224,241,226, 23,120, 18,248,214, 66,251,237, 3,229,184, 56,247, 28,161, 54, 13, 21,177, 57, 36, 33, 52,105,201,186, 10,
- 93, 72, 89,124,206,103,158,200,150, 31, 76,164, 55,119,200, 43,147,223, 77,223,157,177,111, 30, 41,143,102,202,161,113, 60, 19,
- 3,153,109,160,160,222,194,110,182, 41,232, 58,236, 38,169, 48,168, 48, 38, 97, 63, 56,124,102,184, 59,144, 94,223, 35,175,141,
-112,223,145,187,124,115,134,251, 2, 23, 81,178, 28, 13, 57,128,220, 17,248,160, 34,175,100,184,183, 11, 16,140,162,181, 33,179,
-145,159, 45,171, 24,200,100, 19, 65,157,143, 8, 68,182,104, 77, 61, 19,211,145,194, 46, 85,226,126,200,126,205, 48,144, 81,224,
- 50,251, 97,106, 48,228,132,179,234,101, 27,136,174,247,207,224, 35, 5, 73,157, 87, 29,179,116,141,255,238,127, 31, 61,135,154,
-203, 4,175, 85,100, 47, 48,253, 4,200,126, 45,239,229,213, 95,194,254,250,239, 98, 57,129,182,231,230,234,231,170, 87,225,249,
-127,176,182, 9, 41, 42,231, 62, 86, 57,107,185, 75, 84, 22,182,169,249,215, 74,127, 83,173,251, 89,119,179,166,173,115, 62,219,
- 4, 69, 45, 42,229,206,198,239,249,229,213,132,114,230,205,174, 43,245,109,179, 5, 72,120,174, 53,123, 40,134,224, 30,240, 33,
- 39,210,144,201, 17,252, 81, 3,114,180, 52,143,173,148, 97,244,192,166,174, 38, 31, 6,218, 48,193,184,195,166,157,255,174,243,
-236,213,249,144, 33,143, 94, 49,151,133,118, 58,122, 12,108,242,182, 52,170,222,166, 87, 13,116,104, 91,149,207,117, 77, 2,220,
-188,145,174, 77,168,155, 29,171,139, 32,251,225,241,236,222,146,149,134,231,107,233, 46,206,176, 41,124,202,179, 41, 53,152,250,
- 93,196,217,131, 67,194, 45,237,133,241,229, 53, 88, 99,153,143, 28,151,202, 44,137,170,153,150, 39, 76,242, 6,118,233,136,218,
- 46, 16,196, 60,199,189,139,192,130,119,222,172,110, 48, 35,186, 64, 48,163, 17,225,169,113, 93, 92, 91,236, 48,149,243,239,105,
-214,176,226,213,121,181,141,152,166,241,218,152,209, 22,239, 2,108, 29,247,180, 97, 23,217,238, 53,206,245,104,226, 51,255,113,
- 24,153, 46, 46,200,227,196,220,140,211,225,198,127,102, 31,249,136,227,151,169,109,165, 43, 34, 91, 85,155, 66, 99,213, 98,166,
-221, 3,128,164, 39, 87,225, 86, 51,105,182,126, 96, 61, 86, 85, 67, 96,105,170, 72,171,228,148, 72,195, 68, 85, 23, 20, 30, 69,
-121,252,244, 9,229,116,136,238, 69,116, 67, 35,138, 86,196,159,237, 98, 80, 79,135, 24, 81,180, 45, 66,248,133,137, 62, 1, 65,
- 18,217, 6,109, 98, 91,128,147,124, 4, 96,230,121,157,187,125, 20,131,102,171,212, 69, 2,135,152, 66,225,217, 96,136,190,170,
-198,236,168,179,175,123,229,222,236,188,114,119,101,244,100,112,140,212,139,169, 91,108,212,125,197,199, 65,184, 25,149, 87, 14,
- 71, 30,252,247,111, 51,252,223, 55,200, 95,125, 25, 62,117, 15, 25, 34,239,252, 13,133,227,128,236, 27,242,206,251,200,165,186,
-180,246,100,228, 60,113,241,184, 50,206, 11, 83,105, 12, 5,230,106, 28,171,119,244,181,129,148,138,230,130,214,140, 12,151,176,
-223,251, 65, 97, 39,176, 31,189,229,127, 58, 65,137,184, 65,196, 45, 91, 39, 67,170,231,148,234,117, 70, 46,242, 26,130, 41, 26,
- 54,171,253,232, 37,237,212, 72, 53, 99,195,136,126, 48, 81,254,233, 13,203,239, 30,105, 55, 13,189, 82,184,219, 96, 17,172, 8,
-146, 11, 60,220,249, 83, 45,226, 41, 40,243, 63,246, 63,205,160,156,176, 99,196,176,246, 82,230, 66, 92,204,240, 79, 14,212,188,
-208, 78, 11,250,181,133,244,125,131,255, 30,151,161,124, 43,226,136,182,177,121,117, 72, 7, 36,244,116, 33, 11,245,238, 38, 44,
- 82, 54, 24, 77,138, 13,190, 11, 10,117, 76,232, 85,134,171,209,191,225,216,224, 81,165, 30, 10,118, 44, 44, 37, 40, 93,161,185,
- 72,201,219,237,125,243, 44,109, 83,153, 55,182,106, 53,197,220, 62,171,127, 20,178,243,205, 83,122,111, 60,121, 70, 59,173,151,
-123, 13,189, 74,216, 32,200, 28, 24, 89,105,216, 23,110,144, 63,185, 67,238,239,176, 55, 26,114,218, 51,136,103,212,223,121,231,
-128,101, 33, 69,247,230,140, 32,187,158,100,211,115,170,244, 13, 65,218, 4, 90, 49,100,110,180,165,210,142, 5,125,164, 88,255,
-165,239,140,200,171,187, 21,228,194,187,190, 33,182, 82,177, 98,235,125,228,130,163,173,156,150,190,211,174,146,235, 16,173, 44,
- 13,158,137,219, 17, 31,188, 5,237,125,208, 7,241, 84, 93,193,195,127,157,244,211,191, 74,251, 27,133,244,170,146, 91,101, 89,
- 67, 70,236, 57,226, 92, 39, 99, 57,237,139,109,241,235,115,194,118, 54,202,236, 77,169,216,112, 83, 84,236,231, 0,151, 53, 13,
-109, 85,116, 7, 31,123, 5,164,123, 62,173,213, 45,204,163,243,225,107,156, 73,157,199,238,180, 51,225,121, 98, 28,161, 52, 95,
- 15, 59,221, 87,237,242, 55,114,171, 12, 36,116, 72,216,169,156,217,181,146, 39, 34,214, 22,228,197,130,106,194,198, 17,149, 33,
-238,203,160,171, 13, 67,216,155, 20,155,143,216,124,112,190, 4,184,109, 45, 37,183,241,105,194,146, 15,184,235, 25,194, 84,195,
- 86,166, 57,109,222,242,224,230, 23,220,226,213,120, 94,200, 45,103,225, 89,221,138,215,100,155,209, 14, 41, 86, 19,243,188,117,
- 98,115, 39, 18, 18, 53,230, 44, 93,171, 96,102, 48, 78,180,101,102, 89, 22, 78,167, 19, 75, 53,150,136,231, 21,150,128,199, 68,
-117,151, 61,246,212, 84,221, 82, 59,237,189, 13, 94,230, 21, 23,219, 22,239,135,104, 18,134, 97,242,120,217, 62,211,213, 28, 65,
- 39,230, 52,184,142,130,213,158,211, 29,235,125, 41, 17, 21, 26,237,102, 17,199,196, 34, 78, 83, 91,102, 95, 20,206,139, 63,219,
-196,140,222,138,174,207, 69,225,246,153,114, 82, 37,143, 99,240,213,149, 82,143,107, 87,224, 57, 32, 82,171, 27,237,149, 13,202,
-162,113, 88,108,103,140, 56,255,124,210,154, 6,106,210,226, 61,217,218,193, 16,112,119, 65,140, 97,146, 8,105,156,200, 73,253,
-154,150,133,211, 60,115,120,252,129,163, 92, 45, 58,110,107,203,223, 15, 11,170, 66,213,196,114,184,197,150,226,225, 76,145, 89,
- 96,234,194,234,205,237, 17,249, 8,210, 43,117, 63,144,183,243,230,250, 11,221, 4,251, 8, 64,172,125, 68,213,222,255,146,239,
-134,120,163,136,123,211, 23,235, 73, 93,158, 97,125, 48,215,103,153,179, 72, 86,235,139,196,134, 63,190,208,205, 56,154,197,220,
-200,219,124,217, 60, 4,225,152,132,155,189,240,116,223,120,245, 43, 79,184,250, 75, 39,228,223,188, 69,254,226, 67,216, 11,150,
- 95,162,181, 55,145,227,140, 62,125, 31,153,129, 71,126,242,179,212,144, 1,116, 86,198,164, 92,139,249,102, 46,158, 60,214,250,
-195, 85, 64,150,226,182,180, 36,112,121, 9,247, 38,120, 9, 56, 10,242, 94,195,180, 33, 86,177,185,177, 6, 12,223,201,232,195,
-201,103,227,163, 64, 83,175,214,198, 16, 9,141, 97, 65, 58,156,224,105,245,104,191, 34,164, 87, 7,236, 73,161, 62,105,180, 15,
-140,180,107,222,182,190, 82,236, 8,178, 68,168,185, 42,212,103,200,252, 36,230, 60, 7,236, 20, 23,187, 68,127,111, 23,153,236,
-191,248,140,118, 40,216, 93,195,230, 74,125,180,160, 95, 62, 33, 63, 49, 5,173, 46, 46,248, 69, 88,163, 98, 39,147, 41,147,150,
-230,155,117,242, 89,104,171,207,159,250, 68,108,173, 84,221, 89, 38,164,164,232, 69,246,121,250,165,130, 41,118, 91,176,219,138,
- 29, 42, 45,162, 86,103,219,216,231, 22,221,229,210, 89,235,201, 63,231, 30,233,184,194,110,116, 99,178,187,129, 65,144,203, 12,
-187,193,231, 59, 57,195, 55,102,236, 59, 5, 94, 51,236,169,159, 28,229, 42,146,245,212,165, 7,242,126,195,126,227, 9,242,227,
-247,224,229,201,237,145, 18,234,232, 95, 51,238,190,127,226,105, 22,199, 13,159,181,172,107,188,251,132,121, 32, 86,131, 23,249,
- 55, 45,153, 47,214,115,163, 29, 61,249, 79, 6,133,189,122,231,101, 63,192,107,178,198,123,202, 7,254, 96,180,217,129, 67, 22,
-220, 90, 29, 4, 75,194,122,250,105, 94, 25,172,195,109, 11, 22,251,193,224, 3,224,245,247, 97,121, 7,134, 31,136, 82,123,128,
-244, 39,208,127,231,147,232,223,248, 50,169, 36, 70,169, 20,188, 2,174,103,208,148,142, 50,213,248, 71,167,198,217,214,146,238,
-226,186, 51, 25, 90,138, 10,176, 87,214, 43,199,253, 76,168,100,237, 69, 4,134,156,197,148,250,168,199,108, 99,161,154,232, 74,
-217, 90, 35, 54, 61,154,100, 83,238,214,136,173,140,217,185,160,158, 94, 38, 91,183, 71,226,144,144, 74, 65,166, 29,101,151, 54,
- 28,109,139,132,177,197,193, 25, 41,103,100,156,124,174, 27,164,196, 86,253,103,212,214,176,229,228,239,107,153,209, 90,124,212,
- 52, 12,174,126,111, 46, 14,107,187,168,194, 14,199,141,212, 19, 95,131, 24, 73,140, 83, 28,136, 37,198, 23, 82,206,104,113,241,
-231,144,182, 71,176,156,193, 94, 82, 56, 16,186,208,208, 35,131,109,245,172,247, 36,182, 28, 7,155,117, 20, 97,193,104,215,204,
- 92, 10,199,121, 94,237, 96, 22,209,188,114,170, 46, 92, 27, 6, 48,113, 92,112,110,212,154,160,229,141, 30, 41,201, 5,113, 73,
-145, 97,192,138,195,120,114,242, 77,166,210,199, 46, 78,191,244,106,126,243,153, 91,173, 88, 89, 34,156, 38,173, 51,103, 19,167,
-131,246, 19,163,213,182,206,126,252,254,178,231,157, 26, 91,196,208,246,239, 93,183, 32, 78,143,211,148,209, 60,146, 82,162,224,
- 8, 85,179,237, 48,233,152,227,182, 34,103,109, 67, 33, 70, 17, 33,235,166,184, 10,117, 53, 61,215, 89, 94,117, 14, 81,161,123,
-154,155,119, 34,104,182,134,185,148, 82, 67, 36,232, 98,205, 60,140, 44,165, 4,163,190,108, 58,128,232, 20,104, 10,204,114,107,
-212, 50,211, 37,153, 46,148,136, 92, 82,145, 77, 99,176,110,150,186,186, 2, 52,242, 3,186, 50,168,107, 94,158,171,210, 87, 90,
-221,247, 20,194,111,240,153, 31,105,198, 44,194, 81,224,113,134, 91,115,194, 92, 50, 97, 15, 92,246, 8,112, 92,159, 53, 27,236,
-194,175, 89,207, 5,179,103, 51,248, 19,190,145,239,154, 39,116,213, 80, 60, 46, 10, 55,131,242,236, 14,188,118,156,121,233,127,
-253, 46,227, 23, 79,240, 87,239,195,103, 62, 6,111, 63, 68,228, 9,122,231, 6,174,197,171,154, 91,127,168, 41,213, 31,174,136,
- 87, 28, 13,106,242, 5,163,103, 42, 39,241,133, 27,245, 42, 74, 70,241, 22,106, 18,184,186,194,246, 9,110,158,249, 83,218, 43,
-167,221,136,126,242, 18,185,151, 97,111, 1, 38,136,147, 77,242,157, 64, 84, 48, 43,176, 27,125, 99, 63, 85,152, 13,185, 72,164,
- 31,186, 66,190,189,248, 5, 42,225, 11,156,207,230,221, 6,164,201, 67, 90,218,201,167,143,167,234, 23,105,142, 50, 71,195,155,
-190, 24,246, 43, 7,236, 42, 34, 11, 23,127, 47,237, 91, 51,233, 88,131,242,214, 96,183,248, 97,229, 80, 92,220, 53, 37,164, 41,
- 67,107, 76, 33, 88,111,210, 61,198, 18, 9,121, 33,130, 49, 86,224, 76,198, 21,239, 58,102,184, 55, 34, 23, 41, 84,218,134, 61,
- 45,216,220,168, 39,227, 84,124,131, 44,214, 33, 13, 27, 26,182,179,216, 85, 55, 26,203,185, 88,111,101,118, 35,232, 62,163, 83,
-134,189,122,200, 9, 96,223,152,177,103, 11, 60,115, 31,172, 51, 93, 5,185, 56, 83,121,142, 5,249,154, 97, 15, 15,200,247, 93,
- 97, 15,155, 43,150, 71,101,104, 2,191,246, 24,158,156, 56,170,112, 74, 17, 52, 19, 93,164, 62,232,215,152,187,245, 89,155,134,
-229, 71, 82, 44,218,213,104,135,134,228, 70,122, 90, 96, 76,216,197,236, 7,184, 75,133,215,247, 80,253,100,157,222,181,213,223,
-218, 78,113, 82,104, 32,201,252,251,163,106, 94, 87,252,236,195, 85, 91, 26,114,106,240, 52,193,233, 6,230, 95,135,253, 31, 96,
-195,228,188, 2,175,255,123,164,159,254,207,177,191, 93,176,215, 19,195, 77,165,157, 55,222,206,132,136,171,136,110, 37,198,121,
-217,173,104,232, 30,206,221, 43,222, 81, 91,146,231,134,175,191, 99,237,109,204,120,208,215,104,213,168, 76,187, 55,146,236,149,
- 86,245,195, 33,205,144, 97,196,134, 17, 41, 5,155,103,154, 44, 97,137,218,184,239,172,249, 3,129,157,109,254,251,228, 30, 37,
-107,198,128,178,164,204,148, 35,222, 50,101,234,241,136,150,194, 14, 40,121, 96, 25, 19, 53,170,112,103,206, 87,199,207, 54, 67,
-171,145, 90,128, 80,186,157,104,157,181,102,210,144, 2, 40,100,180, 20,190,226,182,101,109,232, 89,130,156,103,214,251,207, 40,
-209,245,170, 97, 37,169,145, 51,207, 25,251,191,207,220, 91,219,186, 84,122,150,133,217, 66,107,100, 17, 93,168,146, 24,101, 99,
- 58,116,148,174,164,240, 7, 4,206,245, 84, 11,181,132, 42, 31, 89,175,149,147,217,150, 46,247,166,213,130,150,130,230,193,173,
-100,170,180,230,207,182,107,135, 22, 52, 42, 63, 77,105,229,246,155,165,109,179,169,109,157,235, 90,115,161, 23,165,110,246,180,
-216, 50, 85, 19, 41,185,248,171,118, 79,123, 7,170,164,240,185,247, 36,213,179, 80, 30,139,200, 85, 86,225,165,110,164,187, 24,
- 63,164,148,104,146, 56, 85,143, 87, 61, 55,243,187,149,113,123,173,243, 70, 88, 23, 38, 86, 51, 31,135, 18,121,234,113,223,119,
-193,162,157,209, 0,147, 8, 57,229, 85, 88,231,143,105,163,205, 14,136,169,173,145,172,177,155,118, 88,158,176,101,241,215, 54,
- 91,109,124, 93,123, 64,140, 82,106, 93,156,229,208, 71, 2,129,212,150,102,207,181,115, 36,184, 1,136,110,221,178, 78, 6,236,
- 7,225,100,103,176, 41,158, 63, 38,189,208,141,252, 80,158,163, 25,233,191,249,254,221,231,239, 53, 87,172,191, 92,225, 65,133,
- 7,102, 92, 38,184, 80,225, 78,242, 49,224,164, 49, 98, 92,163, 58,125,223, 26,116, 75,201,210,179,164,155,110, 3, 89, 45, 36,
- 81, 97,148,234,234,227,195, 78,169, 25,166,239, 28, 25,254,254, 9,253,216, 45,242,123,158, 66, 73,232,242, 12, 30, 0, 59,117,
- 25, 77,193, 91,229,161,100,180, 64,138,117,110,242, 16, 27,199,148, 96, 18, 37, 93,102,184, 28,225,206, 21,220,191,240,139,113,
- 92,188, 21,209,212, 91,165, 55, 62,195,214,143, 95, 32, 63,180,131,169, 70,208, 65,184,247, 53, 16,119, 41, 57, 25,206, 12, 73,
-230, 39,187,222, 94,108,234, 89,203,123,133,197, 49,132, 50,102, 84, 20,189,227,170,121, 30, 42, 60,188, 3,166, 72,121, 10, 86,
-176, 83,139, 19, 82,172, 8, 67,136, 5,191,122,130, 95,189,193, 94,194, 85,231, 53, 20,241, 71, 72,115, 66,126,226,210,239,148,
-233, 26, 46,127, 20,210, 35,228,155, 79,225,155,197,213,252,165,158, 59, 55,214,148, 49,141, 96,145,245,122, 41, 12, 73, 72, 99,
- 66,167, 76,126,105, 66,190,111,135,220,223,123,155,243,221,153,246,246,137,250,184, 80,231,194,161,201,170,147,232, 51,199,172,
-178, 10, 76,123, 80,130,200, 71,224, 97,197, 89, 57, 87, 10,195,253,145,244,112,135,188, 49,193,203,163, 71,141,253,253, 39,180,
-182, 96, 41, 42,166, 28,243,234, 11,221, 86, 73, 83,215, 60, 60, 51,120, 53, 35,119,198,240, 95, 26,114, 61,160,187,132,190,219,
-208,147,199,167,106, 98,101, 99,247,170, 48,105,132,144,196,172, 51,169,111,242, 57,185,157, 79, 34, 25,198, 15, 43, 26, 11, 67,
-140, 11, 38, 31,140,202, 20,243,242, 57,126,126, 55, 32,219, 6, 14,146,236, 17, 94,114,198,106,151, 20,115,119,146,119, 1,166,
-132,188,210,224,226, 8,187,159,132,244,160, 75,205, 64, 95, 67, 62,243, 51,216,223,122, 23, 27, 93,148, 86,187,158,225, 12,247,
-138, 88,180, 74,159,167, 81,105,100,216, 39,241, 38,209,144,146,207,162,199, 17,153,118,232, 56, 58, 57,175, 72, 48,217, 59,188,
-104,219,140, 87,255, 55, 96, 73, 49,205,129, 3, 13, 46,184, 14,136,186, 40, 72,202, 66,171,254, 44, 89,180, 73,251,205,215,206,
-185,214,218, 55,145,104,249,139,147,220, 44, 15,222, 74, 31, 6,210,224, 63, 99,110, 66,209, 76, 30, 6,210, 56,146,134, 1,146,
-122, 94,185, 53,134,230, 26,246,214, 60,222, 83, 59,218,181,197,225,165, 89,180,233,149, 60, 13, 30,189, 25,106,209, 78,207,236,
-204,244,180, 6,208, 88,176, 6,162,149,219,182,234,176, 91,241, 52,200,207,221, 99, 92,240,160,151, 99,245,231,163,244,103,164,
-111, 68,241, 48,166,222,214,143, 13, 63,197, 65,187,173,109,101, 54, 17,106, 30, 48, 29, 56, 45,133, 82,106,244, 61,226,231,134,
-192,215,234,102, 43,108,165,120, 91, 58, 70, 16, 12,227, 26,231, 38,113,250,118, 86, 69, 8,218,162,125, 86,154, 81,231, 25, 74,
- 4,203, 68,152, 79,247,255,107,140, 74, 58,119,185,123,192,123, 56,208,138,100,109,219,252,166,199,181,174,219,168,200,166, 0,
-183,118,134, 3,118,178,158,226,175,145,135,137, 97,218, 65, 26, 56,205,142, 94, 85,137,216,215, 24,145,180, 37, 14, 50,102,207,
-153, 77, 36, 14, 4, 73,213, 5,125,145, 12,234,113,195, 62,190,241, 2,191,110, 4,200, 30,222, 18,173,249,218,204, 5,110,173,
- 82,154,185, 0,219, 64,114,136,255,138, 19,244,182,153,179,191,166, 14, 99, 56, 23,132, 90,150,104,141,202,115, 41,169, 26,185,
-245,253,181, 36, 58, 84,170,186,142,128, 86, 44,109,173,107, 74,155,125,175, 93,251,133,192,151,243,178, 61, 50,222, 72,159,255,
- 31, 95,250,124,250,131, 19,249,135, 71,118, 15, 71,238, 92, 38,238, 37,229,193, 34,188, 92,140, 7, 5, 94,170,198, 3,117, 56,
-220,117, 18,174,146, 48,169,119,167, 99, 13, 99,140,205,117,212,205,194,148,227,212,175,122, 86,189,245,177,176,249, 60,188,142,
-202,112, 88, 24,126,110, 70,143, 7,244, 15,206, 94, 49,138, 7,110,144, 4, 57,186,145, 86,150,176,198,196,160, 71, 85, 24, 84,
- 25,212, 24, 21, 38,245,216, 86,189,235,100, 52,219, 93,120, 14,250,225, 0, 99, 67,110,193,170,248,140,195, 20,121, 56,160, 31,
- 27,224,218,243,189, 58, 12,119,167, 0, 0, 32, 0, 73, 68, 65, 84,101,182, 51, 5, 71,243,141,195, 12,217,165,181,135, 42,234,
- 27,187,244,214, 64,176,141,201, 62,255,215,203,140,220,155,144, 73, 60,183,251, 19, 25,238, 61, 64,150, 91, 40,183, 30, 98,114,
-140, 77,189,167,147,236, 20,174, 18,252,236, 51, 63, 53,143,134,157,236, 57,196,171, 62, 85,228, 15, 93, 64, 46,112,241, 3,112,
-249,103, 33,127, 3, 62,248, 22,252, 78, 11, 79,100, 64, 36, 94,196,179,190, 88, 53, 43, 12, 89,145, 81, 73, 23, 3,233,149, 9,
-190,111,239,191,239,161,193,219, 11,246,238, 76,187,153, 89,142,198,225,172, 74,108,108,237,123, 51,159, 15,202,121, 54, 91,236,
-232, 26, 27,127,138, 80,180,253,164,228,251,147,191,214,235, 59, 23,252, 61, 91,224,103,159,210,172,210, 74,195,110,154,111,126,
-147,250, 6, 56, 70, 6,123,197,239, 1,113,188,152,188, 26, 4,184,197,231, 0,242, 32,147, 6, 69,159, 9, 90,141,220,162,141,
- 74, 95, 60, 58,169, 76, 72,121,187, 6, 41,197, 67, 55,196, 38, 46,172, 68, 46,201,253, 1, 52, 24,241, 13,125, 28, 98,156, 18,
- 54,243,178,209,169,104,125, 45, 13,107,228, 62, 26,161,226,118, 52, 25, 4, 25, 82,220, 47, 25,238,128,220,185,133,225, 30, 12,
-159, 13,174,172, 1,123, 31,195, 60,250, 71,180, 47, 20,236,194,162,189,187,217,160, 56,163,218,157, 7,231,164,216,116,178, 12,
-232,180, 67, 46, 46,225,226, 26,219,141, 14, 39,137,236,131, 84, 22,172,213, 72,213,234,161, 53,103, 18, 67,217,238,109,107, 17,
-151,236, 50,113,127,221,181, 34,142,110, 93,173,216,178, 32,121,240,205,189,148, 77, 48,213, 89,218,189, 26, 73,217,121, 14, 81,
-145, 19,249,223, 18, 29,160,170,137,162,138,229, 28,112, 41, 79, 14,147,230,182, 33, 48,114,246, 22,190,136, 39,165, 57, 30,217,
- 92,200,213,140,214,138,183, 62, 7, 7,131, 72,107, 33,148,143,254, 74,140, 16, 68,206,208,219, 34, 46, 80, 76, 9,211,204,146,
- 7,106, 30,176, 60,161,211,222, 81,210,105, 8,134,186,135,165, 44,230, 7,144,115, 98,158,157,105, 74,250,193,118, 58, 3, 98,
- 73, 23, 69,245,192,151,102,190,145,152,145,205, 5, 87, 51,153,121, 94, 40, 22, 41,127,178, 89, 53, 27,155, 35,193, 86,125,200,
- 70, 46, 84,201,174, 78, 95, 22, 74, 51,202,178, 80,235,178,110, 20,162,222,249, 44,157,146, 25, 66,182,182, 58, 32,218,217,125,
- 21, 54,195,158,185,110,117,203,139,183,134, 68, 94,251, 74,148,139, 3,195, 42,100,238,248,214, 86,195, 73, 16, 80,171,179,180,
- 41, 17, 33,229,145, 97,154,144, 52,176,148, 5,169, 21, 19, 87,161,151, 90, 86,165,189,217, 25,237, 80,117,205, 91,207, 57,147,
-199,232,240,196, 1,167, 31, 94,218, 26,254, 19,202,255,176, 41,186, 88, 54,173,128,156, 46,112,236,188,118,213,228, 33, 58,170,
-148,184,191,207,249, 23, 67, 30, 96, 24,144, 82,177,236,160, 29,106,217,210,236,226,224,224,243,254,188, 50, 1,122, 10,161,179,
- 4,212,159,147,110,219,171,171,165,229, 67,184,237, 15,129,102, 94, 64,202,158,135, 64,100,251, 95,110,209, 79, 13,240, 35, 10,
-159, 28,224,206,132,102,152, 30, 87,198,111, 26,252,118,131,175, 20,236,187,149,250,164, 82, 22,227,184, 52, 14, 2, 55, 98,220,
-100,225,169, 9, 79,163, 61,191, 84, 56, 70,225, 90, 59,211, 57,102, 30, 37, 66, 67, 36, 42,246,163, 8,239, 42,212, 11,229,181,
-121,225,238, 95,127, 76,250,142,192, 95,126, 9,125,115, 71,251,170,194,103, 34,244,113, 20,248,182, 32,143, 10,217,132,148, 42,
-150, 98,209, 89,161, 21,134,142,186,149, 81, 30,216, 14,169, 98,247,119,112,167,193,147,131, 11,178,118, 6,247, 19,220,205,113,
-196,238, 84,164,110,253, 48, 56,198, 21, 27,170,251,183, 35,217, 65,174, 67, 16,228, 41, 8,112, 87,209,107,131,161, 56, 98,118,
-223,160,166,120,162,163,165, 93,159,122,151,224, 20,135,133,158, 35,154,204,219,187,223, 45,240,157,130,221,139,240,230,174,104,
-147,234, 20,187,139, 56, 53,169,192,248, 38, 92,254, 24, 28,190, 2, 15,254, 9,161,228,193,102,247,209,134, 6,109, 5,179,240,
-220,201, 17, 82,235, 85,168,207,179,184, 51,184, 64, 48, 80,145,148,182, 86, 84,245,156,101,189, 86, 26,231,173,172,176, 76,181,
-109,211, 57,167, 45, 38,245,137, 68, 30,252, 16,193,148, 99,160,159,225,157, 91, 23, 93,197, 33,134,102,180,103,138, 94,248, 2,
-205, 73,145,189,109, 38,104, 12,222, 45,216,151,158, 33,191,239, 14,242,112,244, 7,101,159,224, 39, 7,242,195,145,244,207, 14,
-180, 71,179, 3, 72, 78,149,214, 10,197,220, 46,132,198,181, 89,129, 46,174, 74,239, 30, 36,105,206,185,111,181, 33, 82,145, 97,
- 99,191, 90, 82,228,110, 70,174, 6,120,216, 28, 8, 4,200, 83,208, 91,176,157, 31, 76, 56,198,155,159, 21, 25,122,171,177,133,
- 42, 62, 62,239, 83,133,111,103,120,229, 22,118,127, 15,118, 63, 14,195,143,132,177,116, 4,253,113,244,223,120, 5,253,155,111,
-145,170,145, 66,113, 91,207,221,241, 1,186, 17, 4, 53, 63, 84,170, 38,223, 88,243,224, 21, 75, 53, 56,204, 62,103, 94,202,154,
-238,226, 52, 70, 37, 15, 3,165, 41,181,154,191,103, 26, 90, 60, 65, 76, 37, 81, 83,138, 46,132, 99,114,125, 61, 86,239,172,168,
- 98, 38, 88,202,232,110,196,106, 11, 54,249,128,236, 46,208,211, 28,156,116,175,222,172, 91,119, 36, 44,113,181, 34,230,130, 34,
-143, 54,245,251, 37, 91,137,170,213,157, 13, 38,142, 65,117,108,157, 87, 80, 41,194,160,176, 70,138, 67, 73,130,160,167,137,251,
-181, 25,144,113,128, 50, 99,102, 43, 44,198, 69,147, 78,152, 44,113, 0,110, 8, 45,101, 44, 57,236,166, 38, 65,135, 1,134,201,
-237,142,154, 17,140, 82, 10, 66, 37,215, 25, 93, 78,228,200,193, 46,102, 31,130,118,166,228,143,107, 94, 89, 14,178,218,244,123,
- 39,171,111,180, 53, 54,122, 81,111,197, 46,243,137,101, 41,158, 63, 17,113,167,137, 70,194,168,174,116, 12,171,152,109,163,147,
-230,237, 34,107, 5,116, 88, 49,189,180, 74, 91,142,142,123, 77,121,125, 72,107,139,208, 39,210, 74,189,107,181, 63, 24,105,157,
-237,183, 32,165,245,214,178,136,167,233,121,229,160,113, 64, 74,171,134,192,194,218, 74, 0,127, 86, 6,250, 89,122,217,106, 83,
- 55, 99, 84, 71,225,142,195, 72, 27, 51, 50,187, 31,189, 90,163,198, 61,213, 90,228,194,155,160, 73,221,254,152,178, 87,203, 41,
-187,112,143, 22, 9,106,178, 10,223,170,157,157,124, 3, 67, 75,116, 45, 45,249, 28,188, 44,209, 21,160,173,182,205,164,137, 33,
-103, 52, 37,183,149, 6, 21,111, 85,218, 35,200, 48,208,106,139, 67,164,249,136,163,179, 15,122,167,164,235, 20,154,231,186,119,
- 39, 64,159,235,183, 53,144, 74, 86,126,194, 71,123,207,237, 35,133,113,242,156,211,101,123,175,249,173, 95, 57,176,255,213, 35,
-187, 44, 12, 59, 37, 93, 41,250, 70, 70,126,104, 64, 62,151,224,115, 19,118,255, 2,185, 49,134, 15, 26,249,171,198,238,139, 51,
-247,126,103,161,189, 91, 89, 78,149, 83,109,220, 42, 60, 81,120, 60, 10, 55, 56, 64,238, 96, 27, 42,180,131, 72, 36,170,249, 73,
-182, 40,203, 69,224,209, 36,164, 90,185,254,133, 15,188,205,250,151, 95, 66, 62, 57,193,215, 20,126,112,143,237, 78,160,234,130,
-164, 99,246,211,193,209, 91,217,214,156,184,137,122,149,231, 67, 18,175, 74, 44,141,212, 87, 63,141,221,221,161,239,126,211,209,
-176, 47, 53,184,111,174,176,175, 53, 72, 37,190,209,154,216, 25,146, 43,200, 68, 39, 67,238,157, 97,218,196,144,187,209, 70, 61,
- 53,216, 3, 69,177,219, 80,185, 87, 28, 53,123, 87,195,166,117,240,121,249,162,222,210,239,189, 58,100, 83, 37,254,230,236, 21,
- 90,242, 84, 52, 43, 21, 59, 86, 56, 84,218,169, 97,178,243,159, 41,234,116,146,225, 14,212,207,194,149, 87,145, 82,156,221,185,
-212, 21,216, 70, 50,176, 49, 22,146, 53,111,193, 23, 28,153, 18, 58, 38, 31, 17,220,201, 46, 8, 19,117,181, 91, 87,154, 5, 62,
-179,139,223, 90,124,102,185, 67, 93,162,149,111,155, 69,123, 75, 32,236,220,159, 8,141, 97, 23, 39,223, 41,124, 62, 9,248, 86,
-193,114, 16,244,202, 86,229,154,121,117,110,179,107, 15,228, 94,246,141,189,199,174,189, 53, 99,251,103,200, 15,223,133,151,197,
- 43,254,151, 12, 62,113, 23,249, 49, 33,125, 61,145,126,125, 71,125,107,161,220, 28,209,227,236, 24, 83,193,187, 61,153,205,206,
-216,227,215,206,134, 85, 86, 27,237, 84,225, 54,218,149, 79,226, 90, 20, 69, 30, 36,236, 94,218,218,237,136,171, 72, 14, 29, 80,
-232,159,175, 73, 67,170, 56, 0, 41,192, 29,235,124,162, 25, 60, 73,216,187, 5,185,122, 11,118,255, 39,220,249, 56,232,101,128,
- 89, 30,192,195,215,208, 63,252, 54,252, 92, 35,221,137,241, 64,235,157, 18, 57,131, 9, 13,228, 72,168,210, 52,132,162,181, 66,
- 93,226, 96, 86,189, 66, 26, 70, 44,169,111, 13, 18, 76,182, 82,144, 82,144,101, 33, 45,149,166,153,186,219,187,128,177, 95,151,
-192, 68,163, 94,181,153, 66,121,250, 20, 59, 28, 28, 70, 19,212, 48, 29, 70,116,119,129, 13,131, 71, 94, 86,163,148, 5,171,213,
- 23,215,210,182, 20,175,243,182,108, 84,110, 75,245,246,111, 27, 92,196,212, 59, 1,100, 69,107, 88,153, 52,121, 35,122, 89,200,
-218,188, 29,175,130,204,133, 33,185, 34,190,106, 10,235, 21, 72,241, 64,151,108,142,186,173,103, 93, 14,149,234, 41,145,226, 17,
-164, 86, 11,165,186, 32, 74, 69,208,211,193,253,239,217,173,115,102, 80,155, 35, 12,115, 31,160,231,201, 23,241, 84,145,214, 60,
- 80, 37, 78,209,238, 93,223, 28, 33, 37,112, 20,205,188, 98,231,140,182,104, 18,207,106, 84,115,101, 89,162, 34, 55,106, 83,119,
-143, 12,217, 63,218,210,104,197,239,175,231,225, 96, 45, 42,244,153, 52, 76, 43,163, 2, 29,161, 85,172, 26,181, 85,180,182, 53,
-240,200, 34, 52,102,131,156,185, 34,218,219,236, 70,137, 16, 18,159, 84, 68,181, 94,159,239, 32, 18, 4,183,115, 76,234,154,216,
-103,109, 85,215,182,126, 47,174, 9,114,230,241,186,211,158,105,127, 65, 26, 7,150,102,204,167,133,121,153,253, 94, 48,243, 42,
-189, 85, 4,101,152,198,128,211,228,200, 56,240,251,184,181, 26,174, 28,215,126, 52,241,206,229,218,205,224, 57, 55,170,231,192,
- 75,162, 45,243, 42,120,179, 56,240,174,227,195,148,104,170,110,237, 67, 72,121, 88,253,232,195, 48, 58,142,120, 89,214,131, 5,
-185, 98, 53,196,163,182, 29, 36, 52,197,134,156,124,134,238,163,219, 45,111,221,171,110,221,170, 46,219,234,113,251, 30,114, 56,
- 59,211,128,240, 34,175, 30,200,255, 56,114,212,247,139,177,171,149,171,167,133,235,183,102, 46,190,160, 92, 12,194,116,157,200,
-175, 39,228, 71, 70,248,241, 17,249, 3, 3,246,167, 38,168,144,222,174,164,255,175,176,251,197,133,235,175,157,120,248,184, 49,
-159, 42, 71, 26,143, 19, 60,201,194, 77, 8,130,139, 60,143, 16,237,164,177,169,251,134, 21,110, 51,140, 75,101,250,205, 39,240,
- 95, 53,228, 47, 63,128, 31,188,128,127,161,200,247, 79,216,157, 1,222,159,144,247, 23,248,160, 97,143, 23,100,158,145, 42,207,
- 39,107, 36,133, 57, 86,240,131,120, 40,202,245, 53,246,240,190,223,140,119, 26,236,139, 51,233,137,152,212,229, 12,145, 89, 3,
-138, 82,193,118,138, 44,134,221,152, 87,179, 45, 54,253,172,176,111, 94,121,162,136, 85,159,141,223,198,162,253,122,242, 57,249,
-238, 2, 78,199,144,144, 23,182, 94,106, 28,225,167, 16,212,189, 95,224, 37,241, 54,135,129, 29, 13, 59,248, 65,163, 29,219, 54,
-235, 40,129, 23,179,147,127,117,168,192,168, 48, 38,210,220, 56,213,152,143, 6,231, 93,187,115,165, 17,115,178,132,236,146, 87,
-234, 87, 25,121, 48,192,206, 33, 29, 54,183,141,140, 22,121,155,154,125,108,145,226, 20,174,230,228,178,174,161,168,109,227,204,
-159,223,116,189,217, 48,164, 24, 81,140,201, 7,236,147,250,245,254,157, 19,114, 33,200,168,232,232,239, 77,162,180,177, 86,253,
- 26, 29,154, 47,154,215,209, 55,183,120,177,175,159,176,252, 20,249,204, 93,208, 2,186,135,235, 31,133,151,175,225,205, 95,195,
- 62,247, 91,164, 47, 8,250,203,153,242,254, 45, 44,139, 87,255, 1,190,247, 46, 92, 28, 0,149,231, 66,223,173,199, 87,222, 54,
- 76,221, 18,213,129,230,214, 6,184, 55,194,125,117,187,157, 76,222,214, 93, 60,130, 81, 39,176,108,216, 98,125, 5,247,241,205,
-178, 69, 82,130,193,105,129,119, 19, 60, 60,193,238,215, 97,255, 79, 97,250, 41, 23, 88,200, 29,224, 14,250,231, 39,210,207, 85,
- 82,115, 14,195, 18, 84, 20,141,177, 65, 78,222, 45, 82,107,164,148, 2,140, 83,250,240,149,170, 25,147,236, 29, 4,107, 1,155,
-153, 93, 77, 94,155,227, 62,155,243, 33,116, 24,104,227, 62, 14, 47, 33,205, 83, 9, 13,137, 87,236,173, 6, 31, 33,135,109,172,
- 86,154, 86,207,208, 62, 29,145, 60,146,246,123,200,147, 87,152,116,178,154, 56, 76, 72,166, 16, 57, 85, 15, 2, 41, 37,102,185,
-174,153, 47, 34, 17,237, 90, 17, 51,170, 10,102,213,231,155, 49,147, 7, 99, 10,198,190,228, 76,198, 96, 26, 97,186,164, 78, 59,
-210,188,128, 46, 44,117,113, 44,180,120, 37, 88, 17, 71,165,246,172,117,105,254,115,211, 6,153, 49,171,110,229, 19,208, 38,206,
-167,168,149, 90,107,204,191,235,154, 24,111,117,107, 69,155, 38, 39,218, 37,159,229,167, 86, 25,164,173, 27,250,233,140,229,223,
-187, 91,216, 25, 93, 44,100, 60,162,202,177, 20,150, 90, 87,202, 91,177,198,128,144, 98, 99,211,148, 61,195, 94, 92, 83, 96, 18,
-204,249,200,168, 71,132,188,191,164, 28, 15, 80,139,119, 20,243, 68,107, 39,170,249,238,155, 87,216,225,166, 77, 50, 9,197,184,
-166,216,224,219, 25,101, 48,116, 10,210,206,136,112,182, 30, 4, 86,237, 68,216,197,172,143,116,154, 87,217, 91, 76, 96, 88, 93,
-115,246,224,157, 33,147, 52, 57, 79,127, 41,204,165, 82,202,236, 7,227,206, 68, 23,111,117,167,113,242,141, 53,190,223, 67,124,
-188,171,150, 12, 36,167,117,102,237,159, 83,132,211, 6, 55,163,213, 18,173,117, 89,113,183,198, 86, 65,119,114,167, 11,106,147,
-243, 22,102, 31, 93, 16,116, 56, 17,101, 24,132, 52,142,222,180,237, 17,198, 61,165,206,156,210, 41,105,235,112,184, 83,172,190,
- 48, 35,119,167, 76,171,171, 49,207,133,216,108,162, 82, 59,115,160,219, 71,196, 90,159,195,225, 95,252,174,252,229,197,188,106,
- 22,200,205, 5, 69, 89,225,130,198,117,129, 7,239, 23, 30,190, 7,119,190,116,224,234,111, 37,198,187,137,225, 83, 35,242, 71,
- 38,236,247,143,216,159,184,128, 63, 45,200,163, 70,250,157,194,197, 47, 47,236,127,253,196,189,239,158, 88,142,149,185, 54,110,
- 7,113, 33,187,186,237,104, 6,154,186,144,164,198,252,189,152, 48,155,113, 51,129, 46, 30,246, 98,255,109, 66,255, 35,129, 31,
-190,192,126, 59, 33,159, 29,177, 35,240,237, 25,190, 60, 35, 39,193,170,120,123, 60,157,209,213, 74,108, 16,178, 64,109,232,119,
-223,130,203,167,240,202,222,231,162,185,249,124, 32,141, 62,172,173, 17,174,210, 43,137,106,216, 28, 11,127,113,178,154, 28,138,
-179,214, 59,236,185,246, 40,167,120, 90, 71,133,151,212,155, 51,115, 12,146,175, 7, 63, 68,156,138,183,193,151, 80, 24, 31,227,
-233,206,226,173,227,155, 6, 79,189, 36,182, 83,156,118,187, 42, 71, 67, 29,216,177, 98, 43,255,245, 25, 44,191,238,135,151, 69,
-125,244,144, 29,166,146,130, 91,189, 52,176,131,145, 6,143,164,213, 20,200,220,193, 55, 89,149,128,172,236, 6,239, 73,159,218,
-243, 97,215,230,194,136, 20,196, 52, 11,244,169, 74,231, 39,199,223,117,243,176,219, 70, 7,101, 8,221,133,230,128,198,236,146,
-107, 7, 46, 7, 23, 62,190, 91, 87,224,140,180,230, 35, 14,195,243,225,155, 34,131, 97,218,252,134,121, 26,194,201,148,253,115,
-154,178, 3,122, 46,158, 32,111,188, 12,135, 35,180, 59,176,255,183, 32,255, 37,228,226,239,193,197,127, 7,211,129,252,143,174,
-144, 15, 14, 94, 57,186, 36,117,179,151,232,153,194, 79,227, 51, 9,152,139,149,134,221,198, 98, 36, 6,143,226, 48, 86, 4, 30,
- 12,216,189,209, 53, 14,217, 63, 91,185, 1,158, 9,146,131, 60, 23, 7, 67,159, 67, 4,146,167, 11, 78, 26,206,237,255,160, 32,
-151,239,194,205,207,195,240,105,247,173,235, 4,250, 83,200, 27,191,140,190,158,209,239,156,152, 46, 61,195,187,246,200,220, 36,
-228, 88,220, 68, 70, 68, 51, 84,159, 71, 10,174,242,182, 90,124,243,172, 62,255,108,226, 42,255, 26,149, 73,141, 42, 76,114, 70,
-242,228, 85,123,199, 47, 71, 6, 4, 75,217,136,115,181, 4,246, 85,176, 97, 8, 50,153, 83,199, 90, 53, 88,102,172, 84,116, 60,
- 65,158,220, 74,150,167,245,126,160,248, 1, 96,141,192, 76,201,253,254,134,255,190,209,146, 84, 77, 94,205, 90, 99,142, 10, 44,
-229,236,135, 9, 19, 74, 54,234,168,107,117, 92,135, 29,146, 71, 70, 17, 74, 30, 97, 62,209,110,235,218,113,104, 98, 43,168,197,
- 90,245,138, 61,208,183, 26, 50,120, 85, 65, 99, 4,211,158, 19, 35, 57, 78, 90, 52,121,219,182, 86,172, 45,219, 92, 75,148, 20,
-248, 64, 77, 3, 50,141, 36, 42, 99, 89,160,250, 6, 93, 59, 82,180, 19,131,215, 42, 51,110,195,216,188,172, 25, 75, 93,188,179,
- 97,193,221, 15, 65, 94,238,177,162,109, 19,164, 33, 9,197, 91,233,162, 33, 34,107,133,122, 60,160,227, 68, 61, 25,182,212,136,
- 27,245,158,125, 13,162,166,132, 69,211,226, 61, 16,221, 17,135,166,132,229, 81, 66,240,169, 1,117,169,177, 70, 69, 43,187, 61,
- 23,155, 26, 91,139,181, 16,117,122,152,137,133, 45, 80,146,146,243,232,225, 39,225,139, 47,165, 96, 82,215,177,145,157,253, 28,
- 49, 97, 76, 35, 50,106,204,164, 99,105,106,117, 61, 84,136, 36,134,232,122,216, 89,220,116, 78,201, 9,143,177, 73,214,142, 85,
- 12, 18,161,196,193,196,171,253, 20,156, 15,141, 66,197, 29, 8, 37, 0, 60,173, 5,231,192, 42, 25,193,210, 64,105,222,125,106,
-165,197,178,108, 43, 80, 38,169,250, 1,163, 69,236,113,173, 33, 48, 13,205, 65,117,193,162,167, 94,182,176,152,198,181, 93, 67,
-185,228,123, 10,228,214, 42, 93, 94,228,208,108,147,247,124, 91,225,131, 56,189,105,204, 69,122,108,233,133,194, 78, 60,154,243,
-158,192,131,218,120,240,110,229,213,119,103,238,127,225,150,139, 75,101,248,248,132,254,145, 29,246,199,247,240,123, 6,236, 39,
- 46,224,105, 67,190, 50, 51,254,226,194,248, 47,142, 92,126,119,230,193,161,112, 59, 55,158, 42, 60, 27,133,219, 24, 43, 31,101,
-139,143,208, 32, 53,230, 1,212, 10,249,219,207,104,255,131,160,255, 62,200,103,175,176,247, 12,185,239,155,177, 29,131, 2,247,
-182,250,238, 53, 5,147,177,212, 77,205,181, 23,111,181, 78, 21,238,220, 64, 59, 98,179, 35, 15,209,140, 77, 13,169,147, 63,184,
- 41,146,217, 78,165,251,128, 66, 3, 21, 96,148, 20, 54,183, 59,195,115,209,124, 44, 49,184, 22, 65,238, 77, 62, 87, 47,192,221,
-228,135,128,229,128,149, 32,163,244, 77,221,226,130,167, 64,212,254,230, 1,150,134, 93,130, 29, 10,246,172,110,225,228,241, 64,
-112, 39,210, 90,108,128,241, 83,193,164,252,142, 19,217, 58, 35, 85,188,221,155, 22,235, 33,104, 20, 17,108,113, 27,155,142, 49,
-251, 24, 18, 58,170,207, 13,175,146, 75,211,163,213,202, 77,141,124,118,127,111,238,108,144,181, 5,223, 21,245,253, 32,143,201,
-202,124,239,205, 7,139, 42,126, 80, 15,145, 75,131,122,151,227,110, 14,139, 66,130,223,121,134, 61, 94,176,215,187, 39, 40, 4,
- 23,139,159,250,156,135, 28,106,242,165,109,171,225, 16,194,201, 33, 98,125,127,235,128, 77,143,145,151,238,194,241, 31, 66,249,
- 41,216,255, 17,200, 63, 13,118,131,252,161,255, 9,134, 35,249,103,119,200,141, 80,106,241,214,250, 25, 67, 86,244,108,115,175,
-125, 1,118, 95,117,107,134,158,234,154,220, 68, 57,185,205, 82,128, 7, 25,185,202, 30, 14, 36,138,188, 29,179,224, 67, 13, 59,
- 78,111,109, 38, 79, 43,236, 89, 3, 57,200,110, 75,131,167, 10,203, 2,243, 91, 80,223, 1,153, 64,238,193,248,167,225,206,255,
-140,254,177, 70,254, 63, 38, 76, 11, 23, 97, 23,109,173,249, 25, 52,103,200, 59,191, 79, 79,199,128,123,120,123,166,206,133,186,
- 84,154,149, 21, 41,155,186,234, 60,178, 19, 90,180,254,210, 48,122,136, 71,100, 38,180, 26,149,189,197, 40,164,127,175, 66,109,
-226,155,189,132,206, 0,127, 14,181,187,108, 69, 98, 62,191, 68,186, 91,168,239, 99, 67,110,167, 19,173,206,171,189,135, 14,250,
-104, 94,117,169, 40,150, 50, 77,189,147,196, 52, 98,201,171,116,137,236,238, 74,117,122,153, 25, 69, 71,218, 82, 24, 14, 55, 78,
-248, 34,193, 82,208, 90, 86,183,192,210,124, 62, 75, 11, 24, 72, 87, 74, 18,224,153,240, 53, 73,191,215,215,249,127,143,104, 45,
- 46,188,142,182, 45, 75,241,217,126, 2,165,117, 84,149,199, 66,227,179,107,221, 93, 80, 85, 97, 62,193,241,228,149, 98,124,223,
-220, 54, 22,122, 86, 33, 27, 40,149,210, 95, 39,150,251,190,102,151,160,252,229, 96, 46, 44, 86,157,185, 46,190,142,121, 0,157,
- 5,190,181, 32,183, 79, 25,199, 29,146, 7,218,241, 22,149,192,188,182,138,217,226, 51,231,228,130, 97,103,192,119,165,127, 13,
-104,239,246,254, 45, 41,174, 61,235,163, 5, 57,195,156,186,213,108,181, 94,181,182,165,243, 53,223,176, 82, 14,177,162, 38, 74,
-107, 44, 37, 44,107,205, 28, 11,156, 61,148,198,186, 54, 64,132,156, 7,114,118, 66,158, 9, 46, 84,171,171, 12,209,109,205, 57,
- 99, 42,148,165,132, 3, 34,236,139, 34, 12, 73,227,250,137, 87,243,173,249,216, 49,126,151,166, 10, 75,241,131, 78,192,107,170,
-128,182,186, 6,252,132,247,114, 21,203,250, 60,222, 29, 24, 22,179,114,107, 45, 28, 51,234,203, 73,159, 73,226,163,189,222, 33,
-235,182,189,166,186, 10, 29,215, 89,154, 74, 64,127,218, 11, 1,172, 31, 81,165,191,152, 42, 39,231, 2,185,109,204,144,254,192,
- 94, 63,223,139,200,163,193,108,226,130,183, 22, 73,108, 45,144,213, 38,188,103,240, 45, 17,190,153,132,239, 40,188,127,106,156,
-222, 91,224,139, 71,210, 63, 56,146,126,225,132, 62,110,240, 70,130, 31, 24,225, 39, 39,248, 67,123,228,205, 29, 58, 12, 76, 71,
-229,242, 88,185, 92,140,203, 30,240,209,125,123,177,182, 75, 4, 66, 37, 13, 81,221, 98,216,111, 25,242, 3, 9,121, 35,195,219,
-230, 22,178,251,142,108,229,158,248, 6, 58, 70,117,124,111,128,171,193,255,173,207,111,115,194, 87,196,134,220, 46,126, 50, 46,
- 11,210, 15, 0, 75,236, 84,199, 88,236,107,136,153,196, 85,234, 82, 28, 94, 66,210,168, 22,117,203,249,124,142,210, 31,253,238,
-189,122,238,249,157,228,172,203, 18, 39,152, 83, 92,228,110, 85,187, 8, 31,253,223,125,134,205,197, 5, 99,207, 10,237,209, 18,
-254,231,104,127,215, 68,122,243, 18,249,253,123,144, 17,174,127, 26,242, 67,223,196,126,247,171,216,111, 66, 45, 75, 84,184,182,
-182,250, 56,219,132, 83,204,210, 73,138, 94,103, 23,155, 92,142,240,241, 61,242,210,206,223,219, 51,131,247, 78,240,120,161, 61,
-153,169,207, 22, 63,117,203,115, 41,134, 94, 69,233, 38,154,227, 5,230, 58, 34,140, 34,236,146, 31, 12,243,229, 64,126,117,143,
-188,186,131,215,246,240,242, 0, 95,124, 74,251,242, 45,118, 41, 91, 37, 59,168,123, 75, 3,122, 46,221, 42, 22, 10,236, 62, 64,
-236,137,181, 82, 5,116,240, 46,199,117, 69,174, 39,120,246, 15, 97,124, 3,134,215, 32,127, 26,166,215,145,135,191, 1, 23, 71,
-244, 59, 25, 89,100,141,141,117, 11,154, 70, 91, 92, 86, 64,189,104, 90, 57,201,231,246, 64, 66,113,237, 76,228,248, 12,119, 26,
-163,143,205,168, 44,221,188,172,226,153,215, 35,200,190,219,220,196,131,140,114,228, 6,236, 19,114,183,193,120, 5,187, 79, 65,
-254,184,163, 99,211, 61,224, 55,144,139, 47, 99,191, 58, 96,183, 46,222,179,218,168,166,200,176, 67,246,147, 87,142,203, 66,173,
-149,138, 82,154, 58, 64,163,122,151,234,124,218,211,149,178, 45, 54,105, 65,169, 50,210, 36, 69,104,134, 87, 12, 93, 84,103,182,
-109, 88, 22, 45, 88, 59,135,128,212, 13, 71,234,239,103, 64,198, 93,159,109,108,243,204, 97,192, 82,222,146,163, 67,216, 83,197,
-253,209, 18,149,176,228, 33,190,124, 83,148,253,133, 91,169,140, 32, 49,122, 53,163,101,102,160, 81, 82,102,174,149,118, 56, 58,
-220, 72,140,211,233,200, 50, 31,161,245, 48,164,110,212, 98,157,211, 98,205, 59,146,201,159,229, 6,212, 26,232,219,213,193,177,
-129, 86, 4, 23,160,182,148, 61,215,178,121, 68,236, 16,238, 14,119, 63,170,171,229, 53,185,166, 96,220, 33,215,247,176,253, 61,
-170, 36,183, 69,213,122,230,179,246,194, 33, 99,164,228,135,196,197,132, 83, 21, 90,228,244,249, 51,213,179,201,187, 56,181,115,
-243,195, 82, 22, 15,157,230,140,232,232,127,166,228, 42,111, 17,202,233,224,155,117,202,190,177,135, 77, 46,231, 17,212, 69,102,
-173,213,149, 69,222,211,248, 68, 4, 13,123, 92,171,238, 73,151,190, 0,196,252,255,220, 98,166,225,175, 23, 81, 7,202,228,236,
-155,168,166,168,202, 23,202,105,166, 84,199,213,106,210,192,254,194,144, 51,211,232, 97, 46,118,174, 60,151, 62, 51,119,225,174,
-158,165, 32, 54, 51,106,109,212,110,201,107, 27,139, 67, 84, 73,162,228,193, 35, 92,171, 53,218, 82, 72,154,200,195, 16, 29,155,
-182, 22,146,162,178,206,213,205, 44, 28, 33,222,181,144,184, 46, 73,125, 92,160, 42, 36, 52, 68,143, 45, 14, 44, 26,174, 44,167,
-203,137, 38,135,251, 68, 40, 76,199, 71, 91,160,106,183,232, 97,255,236,106, 41, 62, 26, 92,119,194,239, 81,165,235,139,161,235,
-155,100, 78,206,182,245,244, 83, 23,250,121,214, 28,245,152,127,219, 86, 88,206,205, 79,150,135,232, 16, 63,109,240,212,132,247,
- 27,124, 71,132,111, 37,225,219, 34, 60, 58, 85,234,123, 11,250,207, 14,164,127,112, 75,250,245,130, 92, 24,188, 49,194,103, 71,
-228, 39,247,240, 99,123,244,114,100,168,153,221,177,113,117,104, 92,182,240,126,246,152,164,190, 87, 42,100,179, 80,185, 26,246,
- 85, 67, 62,149,145, 55, 6,236,253, 6,151,134,220,207,112, 21, 39,250, 34,222,166,189, 12,113, 90,247,171,140,177,240, 7, 5,
-142,147,192,222,206,200, 95, 45, 44, 58, 46, 18,243,232,190, 32,183,168,251,163, 93,169,146,145,166,112, 61,250, 70,220,129, 10,
-242,194,160, 67,146, 31, 42,238, 69,148,231, 28, 28,213,131,249,151,157, 33,137,238, 13,112, 91,177,127,126,194,172, 80, 31, 23,
-152,227, 67, 63, 86, 23, 9, 13,137,100,137,244,169, 61,242,185,236,232,185,235, 63, 3,249, 62, 28,255, 31,248,157,111, 96, 95,
-129,182, 20,183, 29, 45, 22,194,159, 77,237,174, 94,156,175,158, 73, 29,148,116, 53, 32, 15, 70,228,245, 29, 60,112,118, 51,143,
-102, 87,151,223, 46,212, 39, 11,237, 89,241, 86,165,156, 89,169,206, 38, 16, 93, 28,109, 47,228,103, 39, 96, 76,226,103,170,172,
-228, 59, 19,249,149, 11,248,248, 14, 94, 27, 97,202,216,223,124,159,118, 90,176,125,119, 16, 90, 8,204, 92,197,207, 18, 91, 64,
- 63,116,133,135,157,232, 26, 88,232,211, 56, 52, 79, 12,123,188,192,125, 65, 46, 47,225,217,207,195,248, 50,140,159,134,225,115,
-176,251,125,112,239, 23, 64,110,208,183, 50,178,180,192, 71,134, 96, 78,116, 75,156,145,228, 78,138,236,178,126, 57,179,185,117,
- 90,137,172, 89,156,145,228,177, 87, 63, 60,142,186,217, 94, 10,235, 34,168,200,234,113, 39, 71,252,108, 22,100,231,240, 7,185,
-223, 96,186, 11,187, 55, 97,252,193, 24,244, 78, 32, 63, 0,227,255,133,164, 19,246,203, 13,180,208, 82,102,217, 95, 99,121, 68,
-151,197, 63,247,158, 53,222, 51,156, 91,136,228, 58,205, 74,207, 5, 85, 97,137, 18,165,229,193,231,238,230,243, 61,234,130,198,
-102,184, 5, 79,184,218,121,197,134, 55, 91, 15,121,182,210,202,163, 89, 21,222,111,207, 62,238, 66, 14, 69,198,201,133, 71, 61,
-100, 36, 84,213, 68,101,168,195,228, 22,188,156,145,156, 93,232, 53, 14,206, 14,215,204,134,142, 87, 20, 35, 91,245,199,217,224,
- 52, 23, 76, 51,121,183, 39,103,165, 56, 72, 53,126,126, 67,107, 69,251, 98, 77,119,148,184,120, 51, 7,115,176,169,210, 52, 14,
-148, 91,244,218,218,154,150,168, 66,155, 38,167,217,117, 95,187,217, 74,228,157,205, 81,178,164,236,139,188,184,138,123, 54,133,
- 60,110, 96,156, 90, 86, 11,220, 42, 52,239, 26,208,230,108,248,118, 78,241, 59,247, 99,139,146,212, 86,232, 80, 99,131,188, 88,
-231,185,231, 33,220, 17,190,185,149,101,246,247, 20,155,156, 14, 83,164,254, 21, 90, 93,188, 61,220,159, 39,250,198, 44,225,162,
- 72,190, 89,245,226, 75,210, 58, 54,241,239, 75, 46, 20,203,206,142,239,110, 12, 19,168,214,220, 78, 87,252,192,217,149,229, 26,
-188,248,156, 7,134, 97, 96,202, 35, 87, 87,215, 92, 93,221, 97, 24,119, 44,101,161,149,226,153,232,177,161, 75, 44, 64, 61, 96,
-168,197,140,186,243,231, 83, 74,228,148,200, 67, 38,231,129,148, 51, 57,126,159, 82,235,115,155,117, 39, 50, 82,155,111,208,209,
- 5,178,208, 77,208,186,126, 98,115, 0,117,208,140, 35, 95, 59, 66, 55,186, 23, 42,107, 40,210,134,166,141, 67,155,109, 82, 90,
-215,132,168,199,209,174,174, 65,191, 38, 53, 68,173,172,225,192, 31, 45,142,227, 12, 58,213, 13, 90,124, 68,168, 75,250,227, 23,
-250,249,116,118, 70, 72,231, 85, 89,220, 80, 35,155,183,188, 70,245,126,219,188,176,125,210,124,212,248,190, 10,223, 76,240, 78,
- 18,110,231,138,124,253, 68,254, 71, 7,242,207, 31,145,167, 1, 13,121,115, 68,126,255, 30,249,189, 35,242,241, 29,169,100,166,
- 34, 92,206,149,203, 98,140,157,250,117, 38, 22,206, 61,202,185, 24,246,117, 67,190, 63, 35,223, 63,194,141,227, 68,229,101, 65,
-174,171,111,238, 67,248,232, 58,111,187,111, 57,115,180,119,251,134, 93,226,196,153, 3,204,108,134, 52, 87,176, 58, 38,237,140,
-176,221, 89,144,139, 67, 73,184,159, 87,178,155,156,103,123,118, 26,192, 36,112,119,240,116, 54,139,120,167, 78,143, 59,181,205,
-155, 62,136,207,144,223, 94,144,155,234,169, 89, 55,197, 55, 52,154,255,169,130,238,188,165,168,159,186, 64,126,104,242,138,229,
-242, 95, 2,189,128,155,191, 3, 95,121, 27,251,186,209,202,236,179,255,110, 43,209, 51, 5,186,194,144, 61, 46, 74,114, 66,115,
- 66,119,163,167,145,189, 58,186,242,253, 84,177,183, 79,142,230,125,186,208,110, 10,237,166, 6,210, 81, 54,255,118, 88, 48,180,
-135,151,172,139,190,172, 30,204,172,206,188,222, 53,152,118,153,244,112,135,126,108, 15,175, 15,240,234, 30,110, 10,252,253, 71,
-180,177, 98,251,104,231,214, 56,136,244, 21,235,133, 59,216, 96,107,155,198,120,193,154, 95, 83,185,169,254,217, 60, 43,225,106,
-184, 7,207,126,201,199, 20,227,247,129,126, 12,201,111,194,245,207,195, 7, 11,250,118, 66, 6, 54,133,102, 15,161,201, 26,194,
-108,137,185,229,243, 38,112, 89,229,202, 81,217,247,194,107,192, 15,122, 23,217, 31,150,238,146,168,108,200,200, 28, 66,193, 28,
- 85,206, 20, 80,138, 75, 65, 30, 8,236,238,193,229,167, 97,248,161,240,172, 23,200,175,130, 86,228, 99, 95,128, 95, 22,218, 7,
-123,236,222, 21,173, 37, 90, 57, 33,181,250,226, 46,157, 67,219,168,225, 61, 79, 49, 62,168,125, 97, 9, 74, 26,189,189,171,147,
-255, 25,240,141,182,156,192, 42,231,241, 19, 22, 7,133,126,232, 49,149, 51,175,176,108, 56,203,179, 46,142, 87,184, 81,237,229,
- 17,221,237,124, 35,204,131, 87, 37,125,129, 15,191,183,230, 1,166, 41,116, 34, 1, 30, 10, 59,144, 87,139,121, 93, 24, 53, 37,
-134,105,199,184,223, 49, 12,131,207,160,155,209, 46,174, 24,118, 59,111, 77,207, 39,230, 16,224,181,214,220, 86, 22,141, 19,123,
-206,153,225,170,114,111,165,198,248, 44, 15,126,160,227, 60,224,101, 83, 37, 55, 51,135,153, 12,147, 91,250,226,126,240,184,205,
- 46,238, 12,181,183,192, 82, 42,203,241, 72,149,112, 31, 72, 70, 8,145, 32,178, 6, 13,245,235,183,152,135,224,212,224, 6,120,
- 14,189,172,248,223, 14, 81,146, 72,131,179, 46,244,236, 33, 55,214, 66,247, 96,107,215, 99, 37, 72,228, 1, 29, 6,100,152, 64,
-149, 58, 31,195, 15,206,170,196,182, 94,241, 70,184, 75,175, 38,219, 89, 72,139,177,205,126,207,193, 41,173, 85, 90,113, 97, 92,
- 53, 91,253,222,221,175, 45,154, 24,242,192, 52,237,152,118,123,118,251, 11,198,221, 5,121, 28, 25,226, 96, 80, 69, 56,205, 51,
-243, 50,111,155,113,101, 3,208,148,186,122,212, 29, 96,163, 12, 57, 51, 78, 35,121, 28, 72, 41,123,213,159, 28, 92,116,106,141,
-211,233,232, 87, 71, 29, 80,147,146,227,134,172, 22, 15, 22, 10,203,101,105,174,152, 95,187, 80,237,172,117,190,242,225, 67,140,
-152, 18,165, 54,164,109,241,170, 61,160,197, 98,195, 95,115,145, 59,201, 46, 66,175,172,148, 51, 12,108,243,217,252, 82, 34, 48,
-233,249,198,175,189,152,233,242, 28,223,250,195, 62,246,117, 83,255, 87, 46,245,243,221, 75,201,202, 4, 63, 19, 5, 71,129, 59,
-156, 1, 76,242,198, 12, 98,110,193, 82,105,198,147, 38, 60, 70,120, 79,132,119, 70,225, 89,107,148, 71, 11,195, 23,111, 25,126,
-230,128,188, 83,225,245, 12, 31, 31,145, 31,220, 33, 63,234, 16, 18, 33, 49,204,202,238,212,216,151,198,132, 48,196, 60,163, 31,
- 56,100,114, 1,156,125,179, 33,159,136, 86,124,141, 56,210,187, 47, 35,247,223, 69,174, 12,230,209, 45, 72, 68,203,251,253,230,
-170,243,254,238,151,186, 65,202,119, 17,126,221,179, 42,171,251, 58,233, 74,210, 98, 62, 3, 40, 13,230,134, 92,171,119, 2,166,
-141, 47, 28, 12, 84,175, 34,171,248, 2,255, 90, 68,164, 30, 98, 54,222,249,186,199,182,109, 2,187,152,185,255,179,163,171, 74,
-123,158,108,109, 88,177,104, 9, 25,210,212, 83,148, 62,121,137,124,106,130,227, 9,246,159,241,159,243,228,239, 98,191,113,139,
-125,123,161, 30,150,149, 52,117,238,120, 92, 63,175, 93, 90,147,235,210, 46,163,187, 1,121,121, 68, 94, 25,124,179,121, 86,224,
-237, 5,110, 10,237,102,161, 61, 41, 62,131,169,103,172,136, 51,115, 65,143,162,238,247,110,183,143,244,255, 63, 70, 30,207,112,
-119, 34,191,182, 67, 62,177,115,161,226,131, 9,126,251,150,246,171, 79,104,151,177,226, 86,217, 4,101, 97,167,179,210,177,136,
-242, 33,210,130, 21, 91, 45, 21, 86,170, 7,128,156, 26,178,100, 63,117,222,175,200,197, 61,184,249, 5,200,247,124, 84, 33, 15,
-125,211,126,233, 75,240,172,161,143, 60,234, 83, 7,117,234, 94, 74, 17,131,217,103,174, 65,152, 27,206,218,159,189,101,177,248,
-109,227, 51,246,184, 40, 23,129, 88,220, 7,215,126, 58,123, 96, 36,136, 76,187, 51,219, 71, 7, 97, 92, 11,114, 23,216, 95, 59,
- 84,104,248,108,248, 51,139, 31,167,211,143,192,248, 27,200, 75,223,160,254,191, 23,200, 48,187, 78, 35, 88,219, 45,176,158,181,
-122, 44,101,179, 80,218,170,160,155, 51,115,157,123,150,230, 25,229, 69,148, 22,115,213,186,204,190, 32,191,176, 94,116,104,204,
- 26,195,186,130, 79,116,253,255,235,124,181, 15,160,243,132,236,246,174,204, 28, 28,120,211,230,217,171, 20, 51,218,233, 16, 7,
-136, 0,132, 12,227, 10,142, 89,169, 99,181,184, 2,190,206,104,168,143,181, 44,100, 53,134,120,196,114, 74,180,221,158,101,127,
-151, 50,236, 17, 49,210,241, 25,203,233,224,222,226,160,228,229,112, 95,244,228,184, 94, 89,245, 67, 73,141,153,105,194,153,239,
- 41,103, 76, 18,165,249, 38,222,191, 44,132, 80,158, 49,159,145,193,121, 0,222, 6,174,103, 78, 36,223, 32,139,102,170, 37, 74,
- 53, 74,153,177,148, 72,227, 30, 77, 3,182,156,188,136, 72, 66, 90,129, 53, 74, 21,165,116,109, 37,186,197,230,198,161,179,187,
- 77,232, 48,159, 8, 49,105, 43,124,198, 86, 97, 27,154,125,116,209, 59, 71, 42,171, 77, 81, 82, 38,143, 59,119, 72,212,176, 14,
- 70,229,173,154,221,186,184,230, 1,120,181,124,150,250,179,181,231,213, 19,208, 52, 90,253, 73, 93, 79,144,243, 72, 26, 38,210,
- 48,248,124,124,220, 49,140, 19,105, 24, 73, 99,142, 72, 84, 71,187,150,226, 85,170, 6,168,102, 41,133,101,153, 93, 68,215, 2,
- 69, 27,179,124, 81, 37,167,196, 48,100,118,211,196,126,191, 99, 26,167,240,148,103, 6, 85,246, 67,230, 42, 14,126, 39, 51,150,
-121,118,199,131,193, 24,223, 87,154,235,144,114,206, 62,235, 22, 88,150, 18, 35,158,179,248, 98,117,144, 12, 41,175, 89,242, 43,
-212,166, 99, 99,131,159,161,189,245, 30, 29, 64,108, 27, 21,244,103, 44,117,167,242, 0, 0, 32, 0, 73, 68, 65, 84,213, 2,117,
-107, 42,235,251,106,181,185, 11,228, 67, 91,249,134,131, 94,207,149, 31,218,208, 95, 76,107,243, 93, 63,253,153, 43,253,252,208,
- 23,224, 88,123,186,117,122,138,117,104,165,197, 1,163, 74,108, 20,209,221,142, 53, 45,120, 59,204,205, 71,179, 39,132, 15, 68,
-120,127, 16, 30, 39, 40,183,133,225, 75,183, 12, 63,115,139,188, 85,176,215, 18,242,137, 29,242,233, 9,249,236, 8,175, 15, 8,
-153, 52, 39,198, 5, 6, 19, 6, 2,152,159,226,166,235, 66,170,247, 64, 94, 85,120, 21,183,119,229, 63, 15,211,159,130,253, 23,
- 16,169,112,155, 92, 16,112,219, 98,134,221,251, 91,241,165,241, 97, 76, 93,201,206,166, 72,182, 13,170,237,192, 13,231,121,203,
- 24, 15,198, 40,200,133,183,234, 66,214,186, 17,184,150, 96,162,190, 26, 61,181, 67,164,222,116,224,204,201,182, 54,242,117,246,
-139,245, 43, 71,108,140, 14,193,114,150,252,165,226, 27, 78,206, 36,201,200, 39,247,200,247,141,112,123, 11,151,159,112,213,254,
-119,126, 17,190, 80,104, 79,139,183,164, 74, 91, 3, 95,186,152, 59, 53,208,125, 66,246, 25, 25, 18, 58, 37,116,151,209,171, 1,
- 94, 30,144,251,147,223,200,143, 11,188,183, 96, 55,133,118, 91,176,165, 98,179, 69, 71,218,182,112, 22,221,114,217,123,219,175,
-173,247,153,172,212,186,157,194,152,149,252,210,158,244,230, 5,124,108,231, 27,250, 85,194,254,238, 35,236,189, 35,118,135,149,
-173,105,241,160,117, 69,241,230, 1, 58,123, 72,122,128,117,243,246,153, 45,109,107,213, 47, 21, 57,178, 34, 25,185, 94, 96,119,
- 31,185,249, 85,168,223,138,159,251, 25,184,184,143,188,241,101,184, 56,109,145,149, 54,120, 59,113,136,154, 71, 53,108,111,178,
-126, 22,146,211,246, 16,213,232, 38,245, 3, 71,104, 31,188, 13, 63,120, 39,103, 12,233,255,160, 91,103,102, 12,147,127,207,181,
- 22,137, 74,221, 96,186, 15,251,143,195,248, 57,188,141, 16,237, 11,189, 2,249, 17,228,213,127,136,252,220,219,180,223,109,112,
-173,180,192,180,174, 95,173, 82,173,198,218,235,236,246, 30,149, 91, 99,173,232,183, 71,147,180, 85,233, 1,247, 96,157,120,111,
- 49,160,125,145,168, 56, 34,182,217, 89,115,176,123,107, 37,230, 59,226, 56, 89,157, 70,167,197,105,162,206, 39,150,195, 13,237,
-120,235, 18,148, 90, 87,242, 25,165, 56, 93,110,218,249,134, 88, 74, 55,139, 97,197,199, 0, 98, 37, 58,104, 11, 58, 31, 25, 78,
-183, 12,243,145,100,190,218,212, 52,178, 92,222,167, 93,222,117, 94,247,211,119, 93,113, 46,137, 66,168,219, 99, 39, 92, 44,180,
-198, 42,219,134,165, 94,241,246,251,214, 85,232,158,223, 62,147,125,182, 26, 85,108, 86,103,175,215,230,115, 39, 49,200,121,192,
-134,145,182, 44, 94,221,139, 31,120, 28,245,224, 64,155,138, 98,173, 80,170,183,115,251,136, 65, 74, 40,232, 37,226,118, 98, 86,
- 93, 16,138,157, 41,160,109,203, 68,239, 81,198, 26,213,121, 51,191,150,222, 86, 14,154,155,122, 26, 29,154,183, 16,144,110,241,
-138, 78,130,198,198, 43,195,206, 55, 44,156, 11,159,134,157,207,209,163,157,238,115,242,228, 7, 33, 81,114,192,170, 82,136,216,
- 28, 2,227,204,121, 37, 88,230,113,208,243, 42, 56,251,198, 57,100, 42, 49, 87, 47,133,218, 42,165, 86,230, 90, 88,230,197, 45,
-104,162,193,201, 55,150,226, 92,127,139,238, 76,206,153,253, 56,113,121,113,193,213,126,199,157,139, 43,246, 23, 23, 12,195,176,
-250,196,251, 60,125, 20,225,238,110,199,245,229, 53,170,202,220,169,137,205, 65, 49, 22, 68,193, 20,162, 58, 82, 98,110,141, 58,
-159, 34, 72, 65, 54, 34,167,186,242,190, 59, 3, 92,248, 23,234,253,200,117, 95,219,238, 18,136,220,222,129, 18, 65,114,246, 74,
-188, 91, 20,251,159,226,118, 73, 19,175,220, 91, 35, 14,155,124, 40,143,205,206, 82,128, 55, 91,160,125,207, 60,117, 17, 33,239,
- 98,156, 56,200, 22,171,106,103, 80,132,115,182,119, 23, 63,118, 10, 82, 87,102,250,201,116,203, 98, 55,131,178, 24, 79,178,219,
- 49, 14, 9,222, 25,132, 87,128, 55, 30,159,120,237,111,207, 92,253,226, 51,228,207,221,135,159,190, 3,175, 79,200, 43, 35,242,
-131, 23,216,151, 14,240,107, 39,244,173,147, 43,209, 91,219, 74,206,226,234,116,251,221, 19,252,140, 32,195, 53,188,121,132,246,
- 15, 64,254, 11,152,254, 83,120,237,191,132, 71, 2,143, 5,158,225, 27,247, 7,177,185,166, 51, 79,192,208, 23,164,216, 76, 52,
-193,212,223, 96, 72,187,171,108, 45,216,212,103,237, 81, 81,119,209, 66,238,161,212,234,149,247,189,104,179,222,148,168, 38, 3,
- 54,115,178,179,244,147, 80,161,127,115,113, 40,199, 33,178,119,147,111,192, 54, 24, 66, 70, 46, 61, 45, 78,158,102,184,138, 28,
-243, 19, 72,123,236,132,186,239,206,238,215, 95,249,173,177,209,196,124, 70, 76,220, 7,126,145,145, 49,123, 82,217, 20, 26,132,
-189,250, 76, 87,195, 61,240,180,248,193,227,118,139,219,148,157,211,191, 82, 85, 39,119,149,104,133,169,208, 74,216,107, 86,159,
-164,172, 33, 46, 3, 48, 52, 35, 93, 78,232,189, 17,238,143,174, 69,184, 84,127,157,127,126,192,174,252,100,104,183, 56,183,222,
-218, 89,160,119, 59,195, 38, 57, 60,197, 85,186,113,253, 59,119,186,198,134,110,230, 93,147,249, 8, 95, 7, 85,243, 95,226,211,
-111,195,229,235,112,251, 53, 56,124,205, 45, 99,211, 31,132, 87, 63,137,252,209,255, 29, 62,248, 26,246,206, 12,111, 41,242,141,
- 17,121, 63, 97, 83,245,174, 76, 87,174, 43,235,136,102,221,200, 70,159,169, 59, 96, 70,253,240,246,168,248, 38,158,178,131,137,
-242,128, 13, 33,154,188, 80, 23,163,132, 26,150,146, 2, 94,210, 47, 94, 8, 47,237,212,229,162,241,136, 86,176,163, 11,254, 46,
-255, 67,210,127,242, 87,208,191,120, 32,213,196, 40, 71, 74,243, 5,178,214, 74, 89, 91,168,189, 96,220, 62,155,174,135,104,125,
- 70,222,154,183, 9, 67,248, 70,108,128,125,230,222, 34, 73, 75,206, 89, 86,113,111,245,141,190, 43,117,155,177,250,163, 77,156,
-153, 46, 75, 13,155, 91,197,202,236,226,187,195, 77, 84, 1, 46,132, 19,240,107,212,231,144, 67, 14,255,122,129,121, 38, 81, 25,
-178,231, 42,139, 24,218,170,219,248,218, 66,187, 57, 80,110,158, 81,244, 3,218,229, 13,109,186,164, 45, 51,167,106,228,164,100,
-131,165,134,135,124,229, 26,133, 27, 94,212,157, 21,130,207,175,123,130, 92, 8,210, 82,245, 89,184,138,103,174,183,182, 97, 77,
-147,224,214,192,178,144, 38, 33,219, 66, 29, 47,105,211,222,187,114,209,102,117, 37,122, 60,134,121,240, 13, 69,220,219,159, 4,
-210,180,195,202, 5,237,246, 25,205, 36,114, 10, 88, 85,210,170,189, 94,136,145, 68, 92,243,214, 29, 57,193,215, 79,254,228,196,
- 97,162,219,177, 28,177,189, 30,158,204,231,197, 57, 43, 12, 3,229,120,242, 96,152, 60,162, 73,209, 97,231, 26,135,101,137,181,
- 41,252,222,177,193, 73,143,142, 13,103,148,158,121,169, 65,220, 62, 38, 25,203,254,134, 19,194,110,154,184,184,186,195,126,127,
-197, 48, 58,221,110, 46,133,121, 62, 80,230,197, 29, 40,213, 55,238, 82, 11,212,202, 48,122, 74, 27, 34, 92,239, 47, 92,209,222,
- 26, 57,132,127,217,220,218, 88,173,113, 44,149,185, 44,204,161,164,175,103,226,179,103,214,184, 61, 30,121,101, 89,184,184,186,
-230,122,183,135, 86, 93,103, 17,252,126, 75, 3,132, 35,185, 38, 63,124,154,181, 53,161, 78, 99, 12,164, 41,249,115, 82, 93,119,
-181,162, 93,123,122, 95,210,237, 58,197,103,219, 31, 58, 77,234,220,133, 16,120,246, 20,182, 85, 19,212,221, 2, 61, 32,160, 61,
- 95,165,219, 89, 31, 94,206,106, 77,249, 30,212,185, 30,101,107, 64,222,197,232,247, 58,109,137,107, 75, 4, 67,244, 10,227, 28,
- 53,186, 86,101,103, 48,133,174,101,234,248,108, 11,203, 83,111,235,151,234,133,115,201,240,120,167,124,215,224,227,143,142,188,
-250,191,125,151,221,207, 61,131,127,251, 1,242, 47, 95,193,103,118,200,199, 50,124,118, 7, 95,154,225, 75, 71,236,157,197,127,
- 64,178,213, 67,206, 50,195,111,131,253, 66, 66,228, 2,222,252, 6,240,215,192,254, 44,236, 94, 69, 94,122,132,189, 51,248,139,
-206,230, 11,235,108,225, 60, 59, 19, 11,204,192,253,120,130,250, 70,146,237,204, 4, 24, 87,114,136, 25,234, 62,218, 41,183,213,
-231,247,187,104, 89,156,226,110,191, 86, 87,227,167, 64,189,118, 27,214,210, 21,239,108, 20, 57, 12, 30, 53,184, 19,141,147, 18,
-100,161, 36,232,221,120,189, 18,191,198,189, 20,237,125, 54, 25,179, 29, 60,148,102, 62, 59,120,136, 99,101, 9,198, 52, 41, 56,
-234,125, 67, 31,146,243,199,199, 72,232,233,130,194, 83, 8,249,150,176,142, 20, 59,131, 52,132, 37, 1, 67,181,209,154,172, 26,
-168,185,196, 60,252, 44, 82, 50,197,121,105, 24,149,116,103, 68, 95,217,193, 75,131,111,232,151, 3,252,218, 99,236, 88,176, 87,
- 60,181,204,240,195,207,243,112, 6,123, 62,254,211,154, 39, 23, 21, 86,203,217,122, 56, 82,207,148,239,226,174,242,228, 22,253,
-226, 66,122, 82,253, 52,252,153,111, 34,119,222,132,229,101,152,191,230,134,247,203, 63, 7,247,254, 26,220,249, 10,242,218,207,
-193,247,255, 18,246,214, 35,248,173,140,124,125, 66,134,138,105,133, 99,243,101,179,143, 88, 74, 31, 67,232,230,107,151,230, 29,
-154, 67,129, 71, 10,227, 9,155, 60,241, 78,134, 12,187,132, 93, 21,223,212,159, 84,184,109,200,208,182, 78, 91, 98,227,235,150,
-199, 96,203, 11,105, 13,115,196,178,254,113,228,135,255, 40,195, 79,254, 61,236,151, 43,246, 96, 38, 91, 69,205, 34,158,181, 55,
- 58,252,126,232,173,247,149, 35,212,206, 44, 49,171,210,189,167,188,245, 25,185,157, 97, 10,122,230,180,174,179, 57, 43,178,206,
- 94,237, 44,131,180,245,138,208, 34,235, 92,195,166, 20,203,127, 19, 79, 22, 19, 18,114, 50,100,183, 71,247,151,209,190,116, 53,
-183,180, 68,109, 93, 80,229,135, 42,173,174,117,113,123, 96, 97,152, 38,114, 30, 56,156, 78,148, 22,175,187,156, 60, 33,110, 62,
- 49,179,101,235,182, 88, 9,251, 28,189, 4,146,182,231,208,247,181,174,153,172,169,126,162,234,209,197, 2,201, 26, 85,101, 93,
-204,106,168,164, 77,204, 55,245,189,231,127, 55, 77,232,254,138,122,186,245,116, 51,245,113, 14,106,171,173,170, 58, 38, 49,174,
-171,162,163,251,234,151,186, 56,194, 87,220, 35,223,219,228,106,222,250,245,243, 86,195, 66, 32,216, 66, 67,144,194,190, 37,227,
- 64,139,170,150,134, 83,212,210, 16,202,244, 77, 96,103, 64, 9,250, 89,218,237,169,203,236, 27,126, 40,214,117, 24,124,180, 16,
- 29, 31,143,203,141, 20,184,206,246, 23, 11,209,156,174,161, 36, 52,243, 90,104, 55,177,155,246, 30,204, 50, 12,140,195,158,113,
-116,229,187,207,195, 43, 41,121,107, 92, 46, 4, 21,111, 99,247,124,123,107,109, 85,204,215, 86, 41,167, 35,135,249,200,241,112,
-160,212,194, 82, 27,183,117, 97, 57, 45,156,150,194,113,153, 61,223,188,235, 46, 82, 90,215,141, 90,141,199,225, 6,185, 79,176,
- 57, 98, 32, 89,227, 57, 81, 51,146, 10, 69,149,219,211,137,122, 58,173,150, 53, 86, 93,151, 67,110, 90,140, 1,178,248,207,106,
- 34, 52, 43,126,222, 34, 57,198, 59, 90,239, 62,194,243,142, 67, 19,241, 17, 66,117,251,232,234,227, 23,239,152, 52,129,186, 20,
-111,191,159, 19, 45, 95, 88, 6,251,120,126, 3, 87,109, 40, 17,125,190, 81,191,118,119,254,127,190,222, 52,214,178,236,186,239,
-251,173,189,247, 57,231,222, 55,213,171,170,174,158,216,221,108,138, 83,115,146,168,209,177,100, 89,146, 37,197,178, 29,197,145,
-129,216,138,157,216,136,157, 1, 65,226, 0, 14, 2, 88,249, 96, 68, 64, 2,196, 8,224, 15, 73,156,192, 8,144, 15,129, 97, 4,
- 6,236, 0, 65, 2,120, 72, 96, 73,182, 18, 75, 20, 69,154, 17, 73, 73, 20,155,100,119,147, 61,212,208, 85,245,166,123,207, 57,
-123,239,149, 15,107,237,115,239,171,110, 69, 68,161,212, 53,188,186,239, 14,123,237,181,214,255,255,251,167, 35,191,137,173, 61,
-133,237,202,111,152, 33,236,216, 28, 53,236,246,169, 45,254,187, 21,244,160,242, 30,194,221,222,170,141,236, 77, 72,242,127,122,
-204,112, 63,193,246, 32,240,184, 86, 94,120,237,156, 27,255,205, 68,252,220, 9,252,165, 91,200,135, 14,224,149,132,220, 73,232,
- 11, 61,242,219, 91, 99,162, 63,158,124,198,111,222, 64,173, 21,121, 99, 68, 63, 23, 16, 89,193,139,223,128,252, 63,129, 28,161,
- 7, 29,242,148,152,130, 28,239,218, 46,170,101, 89, 87,143, 69,109,163,135, 18,140,252,246,216, 11, 91, 8, 54,179,110, 87,163,
-236,114,201,149,255,104,106,199,177, 94, 59,240, 88, 39,184,105,163, 81, 88, 91,215, 85,196, 45, 4, 94,164,178,238, 82,111,198,
- 2,111,204,232, 74, 17,141,104,170, 72, 49,208, 13,151,190,243, 47,102,133, 66,131, 25,250,131, 26, 63, 93, 86,118,216,135,118,
- 9, 49, 47,187,204,141,151,229,157,213, 96,221,184, 56, 62, 87,162,237, 88,164,119, 81,215,186,119,241, 96,195,214,178, 87,172,
-236, 96,146, 10,218,249, 27,161, 4, 36,215,157,150,176,238, 38,230, 13, 1,156, 68,232,181, 18, 14, 7,226,157, 1,158,233,225,
-180, 67,142, 59,160, 71,127,115,131,174,212,146,242, 54,234,194, 64,189,134, 71, 92,222,224, 98,124, 0,205, 78,210,217,223, 15,
- 6,183,149,197, 86, 24,119,187,191,122,150,209, 47,103,210,168,200,168,240,201,175,155,211, 64, 63, 12,249,117, 24,255, 55, 24,
-254, 2, 12, 63, 1,235, 63, 2,135,223, 70,142,255, 22,220,249,101,244,185, 9, 94, 93, 33,119, 19, 28,102, 36,251,165, 86,252,
-125,180, 47, 48,104,170,210,226,239,145,171, 2,143,130,177, 10,158, 1, 14, 6, 8, 3, 50,140,112,176, 69, 15, 20, 30, 72,203,
- 38,222,165,176,180,208,238,114, 14,229, 93, 3,208, 44,146,181, 10,108,204,187, 62,252,123,196,191,242, 5,226,159,126,157, 58,
- 87,146, 15,203,219,190,184, 5, 88, 4,175,230,139,238,176, 54,238,182,117,224,198,238, 94, 64, 3, 86,104,252,146,164,101,255,
- 58, 21, 44,105,177,134, 93,112,205,123, 90, 8, 19, 7,225,163,204,230, 55,110,235, 20,233,250,101,212,172,126,139,208,121, 50,
- 2,155, 19,194, 90,140, 40, 49, 17,242, 12, 49, 17, 17,162,203,123,141, 85, 63, 32,125, 2,157,169, 18,152,165,177, 36, 20, 26,
- 16, 36, 27, 54, 39, 55, 22,182,152,136, 45,171, 90,170,236,146, 90, 86,119, 35, 13,217,155, 68,106,243,222, 23, 75,159,172,187,
-125,115,222, 11, 53, 72, 40, 50,110,161, 27,168,146,168, 41,248, 74,163, 32, 90,156,109,212, 65, 23,173, 43,140, 62,161,153,183,
-148,188,133, 20, 73,135, 71,212,203, 3,242, 52,210, 48, 36,133,157,106, 58,180,124,242, 69, 40,170,139, 82, 63,184, 67, 64, 83,
- 71,154, 38,138,231, 21,104,205,198,121, 71,108,180,238,123, 91,139, 10, 53,225, 90,183, 58,160, 14, 86,216, 77,156, 85, 81, 2,
- 49, 25, 17, 79,203, 68, 41,211,226, 66,210,101,167,237, 78,128, 16,136, 62,114, 79, 33, 48,116, 43, 14, 86,135,172,214, 7,196,
-126, 69, 13,129,237,102,195,102,115,225,152,105,235,128,231, 82,152,199,201,128, 46,174,251, 88, 38, 72,142,121, 77,253, 0, 40,
-185, 20,174,166,145,203,237,150,121,154,188,129, 44,174,132, 55, 54,123, 8, 98, 93,188, 35,146, 91,231, 95,181,146,181,114, 57,
-207,232,249, 25, 67,191,162,247,203,130,230,236,169,149,246,190,222, 76, 19,211,118,227,151,131,157,106,209,226, 14,170, 43,213,
-237,226, 32,177, 3,137,206,121,119, 61,149,191, 33,154, 0, 79,124, 66, 82,197,196,133,185,228, 37, 15,222,240,186, 45,187,222,
-109,132, 45,150,245,125,218, 25,145, 61,182,140, 62,185, 71,223,173, 36,117, 95,141,215, 52,226,127,241,118,248,197,222,155,206,
- 27,205,214,237, 63,119,190,103, 95, 5,225,160,179,198,238, 56,152,253,250, 56, 90,243,181,142,112, 16,133,195,100,117,226, 32,
-218,143,195, 8,171, 40, 12,254,223,107,223,219, 55,238,113,242, 74,176, 29, 2,181, 20,134,111,108,137,159, 31, 97,165,200,179,
-214,221,201,157,136,220, 73,230, 73,143,193,124,201, 77,217,158, 92, 36, 60, 41,140,130, 28,174,237, 1,220,243,241,230,224, 55,
-203,236,114,253, 73, 29,106,162,230, 77,238,217, 9, 8, 86, 46,126,203, 45,227,124,127,215,238,136,211, 33, 58,248,220, 31, 67,
-113,222,250,198, 23,110,119, 34,220,153,225,224, 19,118,147,185,120,199, 70, 19,155, 98, 35,237,185,122, 78,173,251,234, 31, 84,
-248,173, 43,247, 59, 59,248,166,136, 83,193,220,131,125, 96, 2,183, 22, 12, 35, 31, 76,118, 64, 28,253,176,237,194,222,253, 42,
-188,169,230,229, 47,238,185, 79,150, 8, 22,134, 72, 56,244,231, 45, 6,187,177,118, 22, 79, 40,125, 7, 79,155,165,141, 8,250,
-184,192,187,179, 41,224,231, 74,157,219,242,213, 71,128, 77,189,227, 83,130,134,116,222,239,174,155,136,103, 85,148,190,139,164,
- 91, 7,196, 15, 31,192,203,135,112,123,141, 28,245,232,197,136,254,189,251,212,131, 98, 23,133,209,169,107,237,192,220, 27,117,
- 94,203, 87,204, 38, 30,212,201, 46, 62,173,160,154,127,121, 95, 65,130,233, 10,170,123,168, 47, 50,225, 93, 19, 37,202,201, 67,
- 56, 56,132,238,251, 33,127, 27,194, 59,102,119, 11,167,102, 15, 28,126, 20,214, 47, 33, 39, 95, 65, 78, 31,217, 40,125,238,161,
- 70,179,167,197,125,225, 91,243,195,202,110, 60,209,148, 44,201, 63, 96,157, 24,112, 38,221, 4,185,233, 69, 73,145,131,209, 19,
- 73,124,247, 63, 84, 11,173,233,143,161, 95,193,240, 65, 72,207, 63,129,139,242, 23,150, 3, 56,250, 14,124,241, 43,212, 87, 11,
-249, 16,143,253, 12,168, 54, 5, 47,139,125,107,153,236, 47,157,181,175,255, 61,222, 17,207,239,110,179,150,214,181, 46,123, 7,
- 15, 98,146, 39,149,184,178, 99, 86,171, 23,231,230, 51,103,112, 43, 90,234, 80,209, 37, 97,203, 91, 50, 40, 5,209,106,201,105,
- 93,111,190, 72, 88,124,236, 34, 66,208, 74, 71, 49,113,110, 74,212,213, 26,141,145,213,188, 33,205, 35,147, 86, 70,215, 12, 16,
- 34,181,239,109,168, 85,139,137,144, 22,157,135,238, 69, 64,251,250,202,127, 95, 61,254,115, 1,159,248,143,234, 2, 41,252,174,
- 91,252,207,238, 44,157, 66, 23,133, 78,109,237, 49, 13, 71,148,126,133,110, 47,108,119,234,164,178, 44,145,178, 58,180,206,110,
-158,172, 3, 23, 39,211,149, 76,208, 66,153, 38,234, 60, 46,232,224, 90,118,105,124,237,158, 43,169,167, 59,190, 97,123,227, 24,
-136,195, 1, 49,173,252,207, 91,218,158,150, 22, 78,227,128,152,108,238,130,176, 90,219,172,100, 79,165, 93,242,108,246,170, 82,
- 40,243,108, 99,230,176,147,214,198,152,232,250,129,174, 27,124,117, 80, 22,183, 71, 8,145,224,222,243, 24,205,150, 86, 69, 24,
-231,145,205,213, 21,211,184,101,154, 38,174, 54,151,108,175,174,200, 57,147, 75,113,146,163, 41,216, 55,211,150,205,118,203,229,
-246,138,203,171, 43, 46,175, 46,217,110,174,152,166,201, 64, 49,202,210,157,183, 66,142, 86, 82, 8,116, 33,209,167,142, 62, 37,
- 82, 76,214, 13,151,194,156,231,101, 28, 63,207, 51, 37,151,229, 8,169,236,160, 57,205,110, 55, 22,229,114,220,144,199,173, 93,
- 60,119, 35, 44,227, 39, 56, 71, 95, 80, 87,218, 71, 82,138, 22, 21, 92,170,133,148,185, 82, 56,136,113,249, 13,211,236, 78,136,
- 70,203,203,101,153,208,180,244, 76,117,171,158, 77, 26,174,227, 96,159,236,212,245,189,107,246,107,190, 98,217,151,197,203,242,
- 93, 16,255,243, 59,225, 23,111,154, 8,151,155, 17, 78,147,193,203, 14, 35, 28,138,112,146,132, 67, 47,228, 71, 94,172,111,138,
- 89,155, 79, 19,220,140,194, 13, 81,110, 6,225,166, 23,251, 3,129,195, 78, 56,242,191,119,226,100,208,163, 32, 28,251,215, 89,
- 11, 68, 21, 52,194,220, 25,250, 49, 61, 24, 73, 95, 24,145, 7,213,148,222,183, 58,235,242, 78, 3,226,183, 6,233, 3, 82, 93,
-100,148, 60,145,103,170,214,204,156, 56,140,230, 65,177, 98,125,224,158, 98,215, 28, 33,193, 2, 95,218, 51,181,114, 43, 82,181,
-219,138,156, 36,235,162,219, 62, 33, 25,151,124,241,157,172, 45,231, 91,146, 5,142,144, 61,201,173, 11,240, 82,134,155,199, 48,
-252, 25,200,223,132, 71,111,193,148,118, 49,171, 13, 17,218,251,205,232,205, 12,247,178,239,241, 13, 74,163, 23,197,206,210,228,
-233, 97, 67,180,164,176, 24,225, 56, 33, 47, 70,232, 19, 28,253, 56,164, 27,144,255, 57,188,173,112,102,197, 24,245,136, 79, 87,
-186,139,135, 8, 72, 12,222,169, 59,212,225, 56, 33, 79, 15,112,210, 27, 28,231,172,192,121,182,201,198, 84,157,128,183, 19,164,
- 45, 69, 87, 91,119,110, 51,202, 93, 14,180,233,161,251, 2,131, 8,233,104, 69,122,238, 16,249,248, 17,124, 96,141, 28,251,173,
-238,119,206,209,207, 93,160, 79, 97, 56,220,217,247,231,181,197,121, 94, 55,189,139, 91,108,150,124,157, 22, 48, 83, 93,206, 85,
-119,111,228, 5, 6,212,216, 1,222, 92,242,104, 38, 60, 0,142, 58,228,232,109, 99,254,167, 31,135,250, 16,226,100,182,177, 86,
-153,187, 87, 96,245,227,112,248, 0,185,245, 38,156,108,160,116, 22, 74,144, 89,132, 80, 75, 76,107,116,197,119,191,199,110,108,
-147,131,212, 18,230, 58, 8,183,205,190, 17,123,235, 80,135,140,244,217, 61,235,216,133,177, 59,130,110, 5,195,211, 14,160, 89,
-177, 43, 71, 13,103,153,128,137,240,202, 23,169,127,239, 2, 68,153, 58,216, 22, 37,231,189,227,161, 41,213, 69,118, 81,157,117,
- 15, 64,179,103, 23, 84,127,238,100,113,180,200,242,163,186,149,170,250,239, 87, 31,165, 47,250,130, 16, 9,195,129, 89,214, 66,
-112, 20,164,169,174,233, 7,131,157,148,130,150,217,241,179,182,127,143, 82, 9, 53,155,211, 36, 36,180, 89,175,180, 90,200, 71,
- 8, 4,170, 81, 16,187,206, 10,216,118, 67, 87, 38,227, 86, 72, 96, 86,203, 48, 87,100, 73,166, 83,183, 36,105,240,236,117,143,
-134, 85,215, 18, 52, 14, 56, 18, 60,216,200, 99,112, 99,220,123,238,100,249,251, 69,219,243, 39,110, 85, 82,162, 8,131,199, 73,
-231,156, 25, 75,133,131, 19, 83,204, 95, 89, 97, 47, 18,208,216, 81,250, 3,202,184,161,110, 46, 97, 30,237,217,237,122,215, 20,
- 4,106,158,168,121, 90, 70,228,138,236,249,211,237, 53,144,110,205,193,211, 31,176,206,188,186,112,102,222, 82,167, 43,211, 31,
-136, 88, 0,145,234,210,208, 53,156,106,138, 61,253,193,145, 41,235,115,166,230,108,232, 94, 39,173,229, 82, 28, 70, 99,192,151,
-216, 15, 38, 32, 75,201, 98,107, 83,231,224, 20, 99,206,235, 94,241, 43,165, 48,151,204, 52,141,204,211,200, 56,141,204,211, 68,
-158, 70,166,217, 66, 89,230,105,164, 56, 69,174,204,217, 19,208,236,185, 79, 18,233,146,137,241, 66, 48, 21,122, 20, 33,245, 38,
- 90, 77,238,139, 15, 41, 44,208,180, 6,189,156,107, 49, 50, 93, 41, 75, 81,175,217, 93, 7,213, 47,142, 14,161, 81, 9, 76,181,
-178,205,153, 49,207,108,166,153,237,118,187,236,209,171,238,101,211,187,131,160,221,224,130,236, 10,122,236,122, 95,123,151,101,
-204, 30, 84,233,162, 65,118, 26, 73,177,233, 4,170, 95, 94, 85,246, 4,114,109,240,187, 60,222,221,100,242, 73, 52,236, 34,146,
-171,187,226,189, 68,220,182,232,229,253,247,137,236, 46, 39,241,191,190, 19,127,241, 84,132, 91, 65,184,145,132, 27, 81,184,161,
-194, 77, 17,110,181, 2,142, 21,239,155, 34,156,138,112, 28,132, 35, 9,156,136,253,249,211, 40,156,248,143, 27, 34,220, 12,194,
-173,160,246,251,190,102,190, 33,112, 67,132,227,160,220, 8,194,113,216, 1,213,140,178, 41,148, 1,226,148,137, 95,159,224, 27,
- 5, 94,232,144,219,201,110, 10,199,130,156,116, 54, 66, 56,114,176, 75,136, 59,131,125, 21,184,172,200, 41,200,179,157,177,194,
- 69,224, 72,118,144,152, 82,173,128,175,147, 7,131, 0,135,178,120,205,165, 19,228, 48,186,156, 95, 97, 37, 59,210,216, 81, 66,
- 78,124,124, 17,131,237,161,213, 59,245, 65,224,197,140,156,126, 22, 89,253, 44,242,248,239,194,197, 37,140,221,174,168,171, 35,
- 97,215,174,136,126,148,225,162,216,147,208,177,131,225, 68, 89, 8, 68,168, 88,182,252, 42,217, 4,227,165,100,249,219,167, 63,
-101,221,156,254, 51,228,193, 5,220,139, 59,118,112, 47, 72,151,172,240,184, 13,164,185, 7,108,167,110, 62,122,121,186,223, 5,
-171, 60,202, 38, 96, 27, 11, 58,249, 5, 33,239,167, 80,248,162,209, 79,140,150, 77,220, 0, 8,226, 8,210, 65,148,238,160, 39,
- 61,117, 72,120,229, 8, 62, 50,216, 52, 96, 56,178,231,254,239,223, 55,246,247,145,160,219,106, 41,108,121,159,176,180,211,139,
- 44,163, 57,159,206,150,186,119,107, 13,123,150, 77,109,246, 50, 53,222,115,221,203,155, 13, 30,206,114,127, 34, 60, 4, 86, 61,
- 12,111, 34,235,119, 32,126, 55,212, 43,143,179,187,237, 95, 45,219,255, 63,252, 33, 88,125, 10, 57,120, 3,185,121,215, 46, 2,
- 87,157,173,183,147,236,192, 70, 14,147,129,189, 46,190,129,133,122,123, 82,100,141, 41,216, 99, 15, 97,101,164,184,120, 8, 73,
-145,222, 98,129, 9, 3,244, 7, 16, 87, 48, 28, 67,250,128,253,157,107,218, 2,247, 36, 79,111,193,209,111, 35, 95,191, 79,249,
-221,145,121,112,190,145,238,128, 36,236, 29, 21,212,150, 70,119,253,247,218, 33,138, 91,122, 26, 72, 6,177,241, 98, 89,146,182,
-118,133,254,122,244,227,206, 6, 69, 72, 4,228,154,207,177, 22, 71,226, 36,231, 60,212,217, 70,172, 49,144,162,137,138, 52,103,
- 52,207,158,189, 29,237,206, 27, 3, 93,223,155,245, 43, 8,186,189,162,142,219, 5,120,147,124, 74, 98,247,116,211, 91, 4,137,
-164, 97, 77, 23, 45, 37,209,194,140,124,255,233,223,131,132,214,169, 57,124, 38, 8, 93,136,212,152,124, 48,221, 14,210, 93,215,
-190,140,228,155,207,216, 1, 47, 93,216,109,211,230,121,178,143,199,241,169,133,128,108,174,204,174,213,173, 44, 58,116,220, 88,
- 86, 65,240, 56, 87, 47, 34, 50,172, 44,154, 51,103,167,218,201, 53, 4,171, 29,105, 70,166, 43,243, 76, 25,175, 80,223,193,147,
-199,165, 3,148, 16,150, 53,138,236, 3,107, 28,116, 19, 82, 79,119,116,195,116, 14,101, 38,196,222,117, 1, 6,117, 73,195,138,
-180, 90,145,134,181,105,104,124, 25,111, 96, 23,118,113,161, 13,110,227,220,244,170, 74, 45, 6,137,209,236,222,110, 7,238,228,
- 82, 40,217,252,248,165,100,114,206, 76,243,188,216,215,218,153, 81, 29, 8, 99,124,126, 27, 77,167, 96,231,111,110,169,125,222,
-249,182,110,124,204, 51,227, 52, 89, 71, 94,118,226,196,234, 86,228, 20,157,104, 23, 77, 15, 80,114, 89, 32, 54,165,148, 37, 63,
- 93,247,114,214,245,218, 85, 87,174, 43,201,163,197,176,106,136,212,146, 45,118, 53, 38, 15,225, 17, 98,215,163, 18,252,235, 22,
-114,245,201,212, 94,224, 13,206,101, 48,158,193, 76,157,235,222, 68,189, 94, 19,199,237, 79,195, 68,127, 63,149, 81, 43,123,118,
- 6, 73,104,186, 24,239, 29,251, 79, 30,152, 7, 77,217,121,216,102,167,159, 53,207, 48,251, 65, 38,114,109, 62, 32,253,254, 94,
-211,131,145,197,119,180,163,171,132,155,168, 38, 58, 45, 44,251, 97, 27,236,133,213, 89,169,157,223, 66,214, 66,221,100,228,139,
-143,224,191,154,225, 47,220, 66,254,240,177, 33, 97, 7,133, 67,224,169,104, 66,184,135,197, 84,199,147,119, 15,231, 25,190, 22,
-224,149, 98,130,187,251, 62,114,251, 64,135, 36, 31, 45, 94, 84,168,131,181, 46,219,201, 8,115, 39, 17,201,106, 98,166, 67, 69,
-142, 48,232,204, 70,119,123,143,149,223,167,170, 63, 7,226, 2,184, 22, 18,127, 80, 33,125,175,221,156,198, 7,150,167,222,210,
-223,148,107,163, 91, 83, 1, 71, 99,135,215,138,110,117, 71,191,155,247,148,136, 45, 29, 76,124, 49, 90, 35,172,110, 66,247, 12,
-132, 19,179, 64, 61,245,142, 89, 80, 82,132, 97,199, 95, 94, 72, 80,109, 15, 93,188, 24,117,238,161, 79,113, 39,228,203,117, 39,
-146,208,253, 24,198, 22,251, 19,216, 95,130, 5, 44,144, 33, 4, 33, 36, 11,191,137,170,164,190, 35,157,172,136, 47,174,225,101,
-115, 52,208,221, 54,238,247, 91, 15,209,239,204,232, 45, 65, 71, 19,144,180,128, 24,221, 11,209,104,133, 92, 60, 80,164, 77,109,
-117, 47,171,189, 61,198,208,132,143, 51,232,176,255, 24, 29, 48,164,230, 9, 45, 2,242,230, 21,233,171, 29,178, 93,163, 31,125,
- 21,158,191, 11,235, 15, 33,250,174,189,118,253, 39,140,214,167, 87, 38, 76, 91,253, 40,244,159,132,245,223, 71, 14,255, 54,122,
-120, 1,191, 51,192, 3,236,144,238,195, 46,212,103, 9,175,247,238, 61, 99, 26,141,195,100,236,239,244, 16,120,193,200,134,210,
- 65, 60,242,194,254, 16,210,185,249, 99,131,123,211,235, 5,212, 71,182, 87,151, 97,175, 91,247, 99, 64, 11,100, 8, 63,127, 72,
-252,229, 13,105,206,196,110,119, 20,233,158, 14,212,198,237, 74,173,114,141, 36, 29, 68, 40,209,215, 40,190, 83, 39,154,152, 76,
-179,119,244,126,200, 62, 89,204,131, 23,155,165,132,148,226,182,210, 72, 12,214, 41,217, 97,157,169,115,203,185,174,206,156, 80,
- 58, 17,122,183,245, 77,185, 50,215,153,176, 61, 35, 72, 37, 29, 28, 17,125,228, 91, 83,164, 22, 23,220,249, 90, 96,235,145,157,
-157,216, 99, 78,193, 53,156,243,134, 88, 86,196,131, 3,122, 81,174,198,137,169,218,254,217,238,228,118, 27, 45,197, 82,216, 66,
-234,232, 67,187,187,203,254,179,187,244, 66,230, 79,111,197,166, 45, 43,141, 62, 86, 66, 37,138,135,233, 0,243,197, 35,106,234,
-137,167, 79,219,101,102,187,177,254,161, 78, 54, 98,245,203, 79, 93,220, 47,198,215,151,217, 50,231,107,176,125,108,197, 56,244,
-193,149,250,241,224,152,154, 6, 74,158, 60, 44,199,188,212, 17,167,172, 9, 6,100,145,184,216,175,180, 88,167,106,159,155,194,
-120,113,198, 60,207,196, 97, 77, 90, 31,218,216, 55,171,137,230,250,129,126,117,176,187, 84,227,246,171, 82,150, 85,129, 21,144,
-232,199,126, 94, 70,241,210, 80,177,218,108,184, 97,185, 76, 52,116,176, 74, 52, 77, 78,132, 92, 11,185, 88, 81, 22, 7,235,104,
-131,185, 52,139, 30,182, 30, 72, 41,121, 76,105, 3,162, 5,136,145,226,150, 56,234,142,159,174,150, 22, 99,174, 1, 17, 59, 7,
-125, 18,177, 80, 21,231,226,217,231,181,129,138, 23,172,181,190, 39, 14,165, 57, 29,204, 19, 31,251,100,152,223, 50,123,170, 95,
- 90,244,173,209, 53, 36, 54, 41, 48,232, 78,241,238, 95,170, 46,132,199,224,177,191,213, 59,120,125, 34, 39, 93,246, 69,114,123,
- 72, 14,105, 19,199,186, 19,165,202, 19, 64, 26, 89,106, 11, 11,214, 54,201,159, 57,177,110,115,220,139, 20, 93,137, 21,250,141,
- 31, 18, 90, 77, 53,221, 36,237,121,207,163,122,225, 75,171,196, 78, 16,134,141,175,245,202, 35, 12, 54,190,223, 86,179, 76,233,
-214, 47, 2,213, 18,184,100,178, 81,172,122,166, 57, 43,207, 54,127,115,131,254,183,247, 8,175,101, 83,200, 63,213, 33,183, 65,
-215, 30, 16,114, 50,195, 73,183,228,142,147, 3,122, 89,145,111,122, 36,233,211,130,156,217,139,172,207,116, 72, 23,208,251, 46,
- 68,219,244, 22, 94,178, 5,142,246,118,229,163, 35,244,214,193, 46, 17,217,121,238,115,113,161,158,238,102, 65, 67,176,231,237,
-150,194,193,128,198, 15, 34,245,109,184, 58,131,122,219,139,190,143,132, 27, 6, 23, 39,179,156, 4,184, 8,240,184,192,153,137,
-176,164, 19,116,242,240,152,214,237,225,143,233,184, 21,216, 59, 86, 20,100,101, 86,167,147,223,116,113, 94,178,137,196,204, 46,
- 12,102, 73, 23,245,199, 58,196, 29,206, 52,237, 21,160, 73,159, 72,103,107,170,217,230,121,119, 92,107,139, 10, 20, 33,184,238,
- 64, 92, 69, 25,250, 72, 58, 93, 17,159, 61,130, 87, 6,228,165, 8,235, 15, 64,125, 26,228, 53,248,173,115,203,157, 63, 4,222,
-245,203,157,243, 41,155,245, 72, 91,198,124,221,249, 51,117,190, 94,208, 5, 22,101,175,202,206,113,193,182, 58,132,123,239, 55,
-240,139, 87, 18, 74,202,132,199, 91,226,183,129,199, 43,248,224, 4, 47,126, 25,189,249, 59, 48,254, 26,114,244, 39, 97,253,199,
- 32,158, 88, 60,169, 94, 66,184, 9, 71,127, 17,186, 87,144,244,215,209,195,239,192,239, 14,112,127,176,149, 79, 44, 11,186,150,
-196,226,148, 88, 46, 97,231, 21,189, 81,144,254, 49,164,167,108,127,207,104,157,121,124, 10,234,202, 46,103,245,204,247, 26,226,
-223,240, 6,123, 99, 14, 79, 44,211,170,253,250, 56,195, 83,145,248,177, 3,210,171,103,244,201, 18,134,213,231,114, 82,119,130,
-250, 39,243, 32,116,145, 70,136,167,129,217, 68, 65, 85,144,234,130,187, 54,134,220, 27, 9,239,168,113, 78,224,171, 24, 19,188,
- 78,132, 96,192,150,230,199, 93, 40,122,154, 45, 67, 61,103, 98,201, 36, 81,151,175,236, 44,156,166, 31,153, 8, 87,103,132, 58,
- 65, 50,159,180,122,196,102,238,214,150,125, 93,205, 67,158, 75, 38,186, 20, 38,137,144,162, 26,110,118,123, 70, 92,245,200,250,
-144,174, 86,166,113,166, 54, 50,100,234,118, 97, 55, 77,229,222, 5, 27, 89,186,137,191,168,137,201, 8,182, 34, 48,124,194,110,
-130,212, 46,218, 53,154,143,220, 38, 31,142,116, 85,200,103,247, 9,177,167,123,250, 37,242,249, 67,202,217, 67,148,108,154,133,
-234,207,111,232,150, 52,178,178,185,128,209, 32, 66,161, 52,159,115, 52,145,149, 22,232,215,132,213,161,141,137,125,124,173,101,
-182,243,187, 27,136,221,218,244, 6,181, 82,242, 68,215,173,145,126, 32, 76, 35,108, 54,104,193,161, 65, 48, 95,156, 17, 54, 23,
-172,110,220, 54,130, 95, 81,194, 48, 16, 98,103,220,113, 79, 62, 83,137,246,245,102,139, 63,221, 23,233,181, 98,109, 2,200,226,
- 52,205,176,211,146,180, 34, 89, 91,130, 90,112,253,231, 46, 66, 85,171,248,200, 91, 22,187,100,241, 14,187,122,163,176, 29, 71,
-250,156,145,148, 22,174, 65,206,230,175,111, 48, 23, 80,139,115, 14,201,199,247, 38,218, 83, 17,230,106,239,145,154,235, 66,133,
-171,194, 46,231,221,171,165, 44, 4,204,157,243, 38, 56,130, 51, 58,122, 86, 82, 52,151, 68,153, 13, 78,228,211, 35, 99,152, 88,
- 64,203, 92,173,251,183,132,188,253,108, 3, 22,170, 94, 65,204,233, 80,202,110,229,245,196, 39,243,189, 81, 46,215,241,219,242,
-158, 92, 23,217,233, 85,155,191,222,247,234, 73, 62, 59,236,172, 83,165, 9,127,194,174, 61,178,100, 69, 36,121,128, 69,183,231,
-101,155,177, 78,119, 18,244, 74,204,198,213,174, 18, 91,255,199,139, 23,154,217,113, 86, 37,152,192,172,197,164, 94,250,210,160,
-169,211,139,154, 4,255,188,160, 15, 43,220,155,169,255,203,187,132,111, 21,248,143,111, 27,176,230,164, 64, 15,122,146,224,150,
- 34,103,201, 46, 23,219,178, 3,204,188,153, 65, 18,114, 71,208, 53,200,198,119,232,235,136, 62, 2, 30, 7,163, 94,181, 66,222,
-169, 9,216,130,139,212, 98, 48, 15, 58,109, 58,225, 62,161,150, 6, 82,176,139,196, 36,214,233,197, 53,196, 59,232,230,171,246,
-248,115, 52,160, 70, 51,242, 39,150,132, 46, 14,125, 10,208,205,240,182, 47,140, 7, 31, 17,174, 89,248,174, 18,247,140,255,205,
- 62, 21, 79,119,163,216,244,156,141,243, 79, 4, 25, 13, 93,107,118, 20,221, 19,147, 7, 15,219,136, 86,220,163, 91,243,146,123,
-190,103, 87,110,203,245,162,126,237,255, 74,176, 76, 97,143, 99,107,158, 72,131, 93, 8, 66, 36, 30, 13,164,103, 14,225,123,123,
-248,184,192,141, 15,129,188, 2,221, 21, 92,158,195,151, 71, 56,182,168,220,154,125,158,190, 23, 62, 99,159,109,185,142,209,175,
-215,169,177,251,221,232,190,182,206,132, 43, 62, 97,122, 82,120, 18,247, 72,116,165,160,219,217, 82,222, 30, 38,120, 45,194,119,
-101,120,225, 53,244,198,127, 7, 71,255, 4, 57,253, 79,237,178, 36,157, 23,215, 4,171, 31,134, 91,255, 5, 18,254, 6, 28,252,
- 30,250,214, 4, 15,123,184, 18,123,110, 26,145,176, 83, 27, 51,224,162,199, 9,179,185,173, 55,208,157, 65,255, 52,132, 99,243,
-158,135,104, 35,246,144,236,107,212, 43,203,133,103,107,111,200,122, 14,241, 96,207,243, 86,221, 91,105,121,233,114,161,196,207,
-174, 72, 95, 63, 39,170,237,122,155,235,174,236,239,228,124, 87, 29, 90, 8, 69, 27,165, 47,226,119,135,255, 4, 93,162, 62,197,
- 85,209,203,110, 30, 75, 97,171, 94, 36,170,175,138,212,193, 40, 53,136,191,158, 5,149,184,219,145,135,106,190,245, 58, 19,169,
-244, 2, 61, 74, 71,117,113,150,239,245, 85, 16,157,209,205, 76,145, 64, 9, 29,165, 95, 83,186,158,210,117,148,212,251,168,126,
-178, 78, 46, 91, 84,171,173, 93,252,125, 48,142,212,199, 15, 72,167,119, 72,135, 39, 48, 63,244,125,241, 78, 11,160,112,205,247,
- 6, 0, 0, 32, 0, 73, 68, 65, 84, 49,184, 97,162, 18,155,103, 29, 69,197, 30,143,120, 91, 84,170,169,151,235,222, 56,219, 38,
- 67, 74,165,146, 3,100,148,185,216,207,234, 96,145,122,118,223,178,194, 79,110,145, 85,169,103, 15,145, 16,137,233,208,138, 65,
-236,168,211,104,222,125, 42,193,241,162,180, 81,182,136,121,227, 99, 36, 29, 28, 83, 98, 79, 45, 27, 43,188,158,154, 23, 14, 79,
-137,199,167, 22, 76,130, 16,181, 18, 75, 70,130, 21,248,164, 64,236,169,219,209,140, 66,221, 64,108, 62,236, 90,144,212, 35,125,
- 71,201,133,105,123,102,148,180,174,115, 91, 86,211,140, 36,160,144,167,201, 46,101,173,140,168, 49,228, 21, 35, 57, 74,104,143,
-223,223,155,254,121, 44,234, 98,200,230,111,246, 66, 95, 90, 90,158,191,171,170,178, 20,236, 37,248,196, 45,116,195,106,101, 98,
- 63,133, 46, 26,226,181, 79,137,218,245,104,177, 48,157,206, 31,119,174,117,241,170,199, 16,152, 68,152, 37,163, 69,252,189,213,
- 86,123,123,250,160, 16, 23, 85,191, 44,133,222,207, 53,215, 98, 52, 32, 82, 20,139,141, 53,164,114,113, 75, 97, 36,139,144,167,
-217, 50, 13,212,166,207,237,123, 85,143, 57, 86,127,124,213,237,109,139, 64,245,154, 9,141, 39, 6,241,123,213,123,111,106, 43,
- 79,136, 86,101, 15, 21, 41,158, 68,135, 4,146, 60,221,153,141,197,115, 51,101, 25,230,199, 37, 35,214,254, 59,129, 30, 1, 39,
-246,123, 58,250,225,179, 5, 29,205, 78,181,241, 39,172,184, 98, 90,154,183,215,111,238,181, 56,204,195, 37,212,165, 66,238,224,
- 42, 34,179,154,239,250, 74,208, 51, 51,182,203,187, 25,125, 56,195,215, 11,250,235,151,240, 11, 21,126,225,150,225,101, 15,214,
- 72, 63,195,225, 6,110, 22,155,154, 94,120,203,178,241,162,123, 63,163, 29,200,237, 14, 93,137,217,194,186, 96,138,242,181, 90,
-231,186, 31,113,218,186,111,221, 69,232,217,124,109,143,238,148,189,187, 25,129,183, 50,108, 29,144, 17, 86, 16,159,134,205,255,
-128,206, 62,122,111,233,108, 77, 17,221, 40, 63,135,105,201, 80,215,199, 25,110,123,224, 71,241,189,123,220, 75,121, 80, 87,160,
-143, 5,202,100,130,170, 32,222,226,216, 88, 74, 86,160, 41, 64,182, 34,187, 36, 59, 53,145,156,103,168, 19,204,174, 32, 43, 3,
- 81, 48,101, 19,197,201,222, 69, 45, 63, 33,187,148,189,229, 78,139,180,117, 17, 10,157,137, 92,210,170, 35,124,224, 8, 62, 43,
-200, 71, 20, 78, 62, 9,225, 15,184,253,240, 30,250,237,135,246,220,159, 84,244,194, 32, 55, 90,212, 17,148, 62, 5,216,219,163,
- 47,238,169, 6,228, 41, 92,187,225,134,228, 5,223,255, 76, 81, 8,179,238, 30,110,244,174, 95,174,243,218, 85, 43, 53, 43,161,
-155,141,104,246,122,128, 7, 17,222, 90,193,199, 20,110,127, 14,182,255, 17,220,250,203, 86,200,227,205,221, 88,160,255, 44,220,
-252,107,208,253, 93,228,224,215,225,242,161, 93,222,198,176,176,235, 81, 7,249,204,205,203,105, 23, 66, 61,155,172, 91,239,174,
- 32,173, 33, 29,237,177,118,111, 67,126, 8,122,207,108,138,201, 63, 95,136, 77, 11,228,198,222, 71, 57,154, 93, 50, 12,232,168,
-200, 58,210,221,233, 73,143, 70, 82, 15,163, 24, 14, 51,239,157, 5,178,175,112,108, 59,111,159,180,148,182,142,173,234, 93,173,
-109,214,203, 34,182,243,159,107,165,196,128, 70, 7, 0,249,254, 61,164,206, 46,198, 45, 69, 13,252,207,212,229, 82, 25, 82, 71,
-210, 66,151, 71,250, 96,235,146,166,113,237,130,216, 40, 63,196, 69, 68, 84,137, 76, 69,153,166,145, 50,207,132,110, 64,250, 21,
-161, 79, 30, 48, 50,195, 60, 81, 74, 97,148,200,236, 54, 62,213,194,106,115, 69, 12,239, 18,110, 62,139, 28,222, 64,207, 30,249,
-229,195,188,222,109,159, 37,216, 69,163,230,138, 22, 49,223,178,183, 67,217,193, 58, 45, 83,220,161,243,246,171,254,121,210, 96,
- 94,227,226,225, 42, 38, 26,180,196,179,242,238,219,164,227, 76, 92, 29, 19,179, 41,211,101, 24,208,121,164,206,147,249,245, 61,
- 79, 60, 58,104,166,165,158,137,211,199,218,229, 54, 12, 3,113,107,241,169, 5,156,165,127,100,150,190,162, 80, 50, 41, 40, 49,
-246,166, 28,247,120, 87, 9,193, 84,234, 85, 45, 92,135, 96,189,218,106,229,120, 86,150,180,176, 82, 10, 93, 48,203,214,226,135,
-142,201,102, 26,253, 64,201,209,148,224,186, 19,181, 72,112,231,134,219,229, 52, 25,207,162, 20, 3, 14, 89, 18,155,186,207,126,
- 39, 18,171,222,205,182,122,208,222, 95,210,200,161,178, 75, 41,139,170, 12,253,202,178,208, 75,118, 62,187,169,252, 39, 41,156,
- 79, 19,211,102, 99,123,245, 90,220,183, 45,116, 41, 18, 83, 67,209,122, 38, 61,123, 99,119,246, 14,153, 86, 22, 27,255, 94,119,
-227,112,123,109,146, 81,244, 60,117,173, 22, 43,232,125,215, 81, 99,100,158, 51,197, 83,239,212,147,227, 26,209,211,190,121, 49,
-157, 69,158, 22, 32,216,251,152,215,118,112, 88,121,162,159, 82,150, 38,234,122,173,151,107,182,113, 43, 19,150,126, 39, 26, 72,
-245, 31,159,155, 16,109, 91, 97, 16,244,212,228,233,114, 18,173,243,233, 61,194,180,207, 72, 26, 33,140,102,173,225, 96, 17, 81,
-216,193,151,145,195,214,241,123,135, 88,247,158,188,136,143, 19,147,197,135,134, 54,186, 25,237,199, 60,219,223,155, 42, 92, 5,
-203,153,190, 0, 57, 83,244,251, 11,188, 54,195,175,110,209,191,246, 46,252, 39,167,200, 31, 22,232, 94,178,127, 48,157, 33,135,
- 87,112,115, 3, 23, 51,250,168,179, 11,194, 12, 60, 82, 52,101,228,116, 13, 71, 61,112,233,197,162,183,199,182,153,151, 17,180,
-190, 91,144,219,158,186, 85,253, 29,222, 21,223,153,186,119, 92,124,153,187,194, 2, 74,186, 0, 79, 77, 16,191, 11,164, 71,207,
- 95,133, 50,120,204,170,143,182, 27,133,167,224, 69,181, 71,211,108, 22, 59,181,189,187, 32,230,253,107,251,145,171,186, 40,189,
-161,120, 12,212,108, 65, 46,116,126,177,138,215, 32,253, 18,108,220, 37, 26,118, 92,213,228,193, 53, 41,236, 86, 43,235,180,187,
-234,205,205,163, 46, 59,145, 53,187,188,120,209,104, 32,150,186, 67,158, 74, 76, 72,114,180,228,193, 64,248,240, 33,124, 47,200,
-203, 43, 88,127, 22,134,159,118,110,202,219, 80, 30,192,107, 19,218, 91, 46, 51, 89, 77,136, 87,119, 31, 34,220,130,116, 77, 44,
-178,183, 62,160,218,122, 34,204,123,159,197,180,123,235,209,226, 97,219,174,189,161,101,221,195,101,225, 82,230,137,183,220,110,
- 63,164, 99, 69,182,130,188,158,161, 30,192,139,207,160,183, 30,195,244,215,145,211, 31,128,131,159,131,254, 51, 54, 34,151, 0,
-221,119,193,141,255, 16,214, 63, 10,235,127, 0,243, 91, 48, 95, 88, 46, 88,197, 46, 93,185,216,123,121, 59,249,180,198,191,177,
-241, 17,116,247,161, 27, 96,248,184, 69,173,214,251,246, 89, 24,110, 67,125,206,186,240,120,195, 19,218,130,117,244, 76, 32, 79,
-237, 41,220,142,253,239, 36,200, 51,233,217,142,225,225,184, 36, 26,102,125, 18, 99,177, 11, 38,145, 38, 40, 13,166, 97, 8,197,
-186,240,220,254,148,238,124,186,186, 11,155, 55, 1,169, 68, 43,135, 49, 44, 16,146,216,175,220,222, 88,172, 8,122, 86,117,221,
-110,108, 30,144, 58, 98,136,116,235, 21,253, 38, 35, 90, 41, 34,100,148,132,208,249,228, 54, 7, 33, 99, 95, 63, 87,101,150,202,
- 84, 21,242, 68,205,153, 88, 10,105,181, 38,118, 29,162, 7,150,152, 88, 38, 74, 46,100, 13,126, 21, 9,118,151,218, 94, 17, 31,
-223, 39,222,120,150,120, 18,200,103,143,208,146, 17,241,228,185,154,109,199,238, 69, 77,202, 46,183,160, 74, 34, 19, 12, 58, 35,
-134,105,182,105, 84,103, 69,147, 93, 23,134,184,232, 84,227,178,139,182,240,147,153,233,241, 61,226,173,142,238,246, 51,212,237,
- 72,222,156, 81,167, 9,165,216, 22,190, 20, 42, 74,242,240, 26,245,118,177,248,197, 83, 42,232, 52,162,235,186, 64,160,240,100,
-178, 50,141,214, 37,214,108, 35,225, 52,216,152,221,249,225,161, 27,200,115,134,216, 25,242,214, 97, 62,161, 31,144,110,112, 21,
-252,214,142,153, 97,181, 84,147,138,141,221,197,147, 38,237,130,160,132, 20,209, 26,208,146, 23,222,185,248,254,187,161, 79, 53,
- 4,106,158, 45, 98, 85,213, 97, 97,102, 85, 22,183, 41,182,247,148, 56, 12, 70, 28, 0, 84,197, 46, 93,161,121,174,221,189,176,
-153, 38,143,151,236, 25,231,217, 94,175, 61,198, 64,138,129,185, 70,247,146,183, 21,138,229, 32,196,217,108,123,178, 48,237, 27,
- 48, 74,247,151,212,187,222,141, 29,205, 15, 60, 11,194, 49,185,134, 24, 54, 24, 79, 39,145,174,239, 40, 65,216,142, 51,121,158,
-141,239, 32, 98,221,120, 41, 75, 51,166,106,180,191,156,103, 3,208,236,237,191,244,218, 86,253,253,202,188, 59,125,244, 58,219,
- 93,126,255, 80,214,221,146, 76, 42, 41,255,103,247, 60, 64,163,101, 64, 67,186,217, 81, 63,177, 66, 38, 65, 31,168, 21,248,151,
- 35,242,153, 11,120,230, 1, 60,229,251,245, 77,112,252,170, 23,255,222, 81,169, 7,209,160, 41,238, 5,151,232, 59,199,208,192,
- 44,183, 64,111,130, 62,211,124, 71, 16, 51,112, 5,199, 35,114,235,161,117, 47,211,140, 94, 9,114,149,224,211,135,240,195, 25,
-253,194, 22,253, 59,151,112,145,145,159,121, 3,134,207,194,252, 97,144,115,232, 30,195,233,183,144,225, 2,125, 24,224,210, 59,
-230, 51, 69,229, 28,185,113, 12,199,199, 32,143, 64, 59,100, 18,152, 12, 79,201,161,143, 75, 71,239,128,211, 19,177,117,189, 79,
- 27,162,154,130,254, 57,255,243, 67,128,213, 22,226, 7,161,220,131,135,111,128,222,112, 52,108,221,189, 18,157,123, 11, 79, 6,
- 91,226,135,115,227,126, 39,168, 91,211, 3, 72,106,109, 86,241,152, 86,105, 50, 81,167,168,101,144, 35,175,116,157,141,111,147,
-123,236, 7,215, 58,204,123,240,156,230,177, 79,126,129,234,124,175,222,187,107,160,205,106,103,174,239,212, 61,209,110, 9,143,
- 40,209, 97, 75,123,232,200, 20,136, 7, 61,225,249, 3,248, 76, 64, 62,124, 4,199,255,186, 21, 60, 57,130,252, 22,212,119,208,
- 71,111,195, 93, 67,168,106,246,247,153,115, 85,212,189,179,251, 26, 61,226,130,196,182,207,192,188, 71,215,107,111, 97,223,237,
- 47,172,246,253, 27,174, 68,170, 68, 66,153,177,134, 98,199, 21, 96,107,118, 61,137,123,144,149, 4,108,183,240, 14, 72, 60,128,
-139, 27,112,121,129,222,248,127,144, 91, 95,128,211, 79,195,240, 51, 38,164,139,183,237, 57, 95,253, 65, 19,209,213,183, 96,126,
-219,196,109,122, 14,211, 59, 48,127, 7,166, 71,112,112, 9,121,130, 58,185, 88,114, 54,229,250,112,234,227,247,151, 33,222, 1,
-189,239, 1, 46,207,239,101, 41,174,188,192, 42,232, 99, 83,205,203,137, 95, 40,159,130,176, 70,142, 2,122, 27,194, 65,164, 63,
- 10,116,219, 74, 31,217, 9,224,124, 28,216,108,130, 97, 25,189,123,104,144,143,126, 85,212, 5,105,174,157,144,182,183,140, 22,
- 43,234,163, 15,109,123, 12,159,128,132, 16,157,149,110, 89,222, 57, 8, 69,130,113,222,183, 27,159,230, 8,177, 42,131, 88,120,
- 70,113,165,120, 16, 33,123,238,124,160, 90,104,139, 56, 49,109, 54,143,114,219,173,148, 32,200, 54, 35,117, 36, 12, 43,211, 80,
-116, 61, 26, 35, 57,206, 72,217,141, 80, 53, 8, 85, 42,108,206, 9,161, 39,157, 60,109,249,227,103,239, 82,203,180,236,118, 89,
-122,182,246,191, 64, 14,145, 18,123,136,206, 51,119,223,124,157,204, 99, 78,173,232, 60,249,228,171, 67, 67,178, 66, 59,141,228,
-105,180, 49,181, 8, 26, 7,100, 56,176, 20,180, 16,145,254, 0,166,129, 82,206,208,249,138,234, 23,167,216, 2, 37,117,145,152,
- 45, 22,166, 32, 66, 26, 6,223,250, 25,129,174, 19,219, 33,211, 69,139, 83, 45,149, 90, 11, 41, 4,210,224,118,179, 96, 49,183,
- 90, 3,121,218,144,231,201, 67, 90,140, 67,222, 50,226, 91, 87, 45, 82,141,225, 30, 58,132,106,151,164,217,152,251,203,100,209,
- 39, 10,213, 45,109,197,129, 44,173,211, 7, 40,217,126, 45, 40,196, 62, 89,134,185, 79,110,234,222,250,162,185, 11,218,122,176,
-250, 78,189,214,234,162, 87,215, 22, 84, 53,130,228,102,195,161, 8, 93, 63,176,189,186, 34,133,106,222,120,148, 84, 42, 93, 76,
-108, 82,100,154, 60, 66,182,148,107, 35,234, 90, 42, 34,213,243,213, 77,131, 81, 99,244,238,190, 46,103, 71, 88, 70,124,190, 78,
-108,137,107, 46,252, 75, 2, 93,234, 33, 38,182,165, 48,141,166,115, 16,159, 52,213, 82, 22, 69,189,131, 33,188,160, 79, 80,178,
- 71,184,202,251, 84,101,225,247,255,149,157,224,240, 61, 37, 95,158,164,206, 57,254, 86,236, 93,157,222, 28, 10,131,128,172,132,
-203,217, 68, 54, 39, 23,149,227,175,101,228, 78, 68,223, 41,240,166, 16,222, 73,200,107,157,249,193,159,235,172,155,125, 75,209,
- 11,181,238, 90,156,175, 94,197,154,248,163,100, 93,225,179, 29,124,184, 67,158,143,240, 92, 64,110, 95,192,241,125, 56, 92, 33,
-253,202,196, 72, 50, 0,167, 80,111, 65,237, 44, 71, 58, 61,128,248, 22,178, 62,135,211, 11, 19, 94, 62, 51, 32, 47, 13,240, 67,
- 35,252,230,140,254,195,251,200, 79,253, 6, 28,253, 33,152,111,251,119,245,105, 88,127, 19,137,111,193,186,162,151,189, 21,132,
-179, 8,114,142,220,232,144,227, 15,160,188, 9,115,132,210,217,190,189,100,180,137,157, 26,101,173, 41,142, 22, 84,143,207,136,
- 59,221, 65,193,181, 56,236,225, 37,216,190, 13,151,179,121,155,103,103,169, 87,221,243, 96,249,248, 93,231, 29,224,166,119,123,
-215, 69, 70, 52,217,161,179,113, 26, 87, 10,168, 70,139,132,173,225,122, 36, 41,186, 43,234,235,178,203,234, 22,139, 76, 52, 56,
-143, 88, 87, 19, 92,193,222, 57,239,189,139,150, 12,215, 42,105,218,217, 96, 22, 38,121,149,221,247, 55,237, 50,224, 37,186, 77,
-174, 75,132,163, 30, 94,136,230,159, 63,252, 19,112,248,175, 65,184, 97, 62,191,250, 8,228, 46,188,117, 31,238, 71, 52,206, 54,
- 21,169,142,222,100,207, 50,164, 59, 83, 73, 45,239,129, 44, 45, 67,135, 29,212,204, 61,242,169, 13, 20,148,128,184,163,162, 99,
- 39,139,182,142, 65, 60,177, 75,167,138, 92, 41,154,108,215, 74,149,197,147, 47,219,201, 4,148, 53,193,213, 10,222, 88,161,113,
- 11, 47,127, 14,121,233,203,176,126, 9,186,239,134,245, 79,193,240, 49, 43,200,241, 25, 72,243,110, 23, 80,183, 86,220,243,235,
- 48,125, 9,174,190, 2,243,185, 93,180,106,181,223,159,223,128,122, 10,242,125,150, 32,135, 23,118,237, 77,161, 41,105,231, 75,
-215, 75,223,235,191, 11,241,216, 39,240,207, 67,247,148,249,192,111, 77, 72,151,232,110,116, 12,155,145,173,191,204,197,239,127,
-181, 81,192, 84,233, 16,215,183,170,125,207,170,230,195,142,178,224, 92, 9, 22,202, 98,171, 50, 64, 50, 82, 92,184, 21,213,161,
- 50,209, 64, 49, 62,202,111, 65, 23, 69, 3, 58, 95,161, 87, 23,246, 34,198,158,160,217,146,207,242, 12,142, 47, 21,204, 53, 49,
- 19, 23,145, 25,218, 64, 35,251,157,139, 46,137,181,137, 10,121,164,214,108,250,137, 24, 45, 5, 45, 68, 98,138, 36,191,184, 69,
-157,161,206,204, 85,201,231, 15, 17, 2,221,173,231,209,212, 49, 61,124,199,172, 96, 13,154,227,139,214,140, 48,213,106,217,226,
- 82,173,185,232, 43,148,108, 17,162, 37, 35, 49, 18,251, 21,169, 95, 19,251,142,128, 50, 79, 51,101,187,161,204,141, 27, 30,237,
- 60,235,143,237,251,217, 92, 50, 94, 94, 16, 14, 79,208,148, 8,235, 3, 19,222, 77,163,119,130,118,177, 41,110,175,139,146,144,
-186,139,133,141,253,202,146,156, 15,143, 77,161, 94,103,219, 86,250,202,138, 24,168, 57, 51,109, 46,145,228, 23,144,121,182,203,
- 86,180,124,249,198, 20, 8,221,128,196,222,137,139,133, 24,211,178, 94, 80, 96, 46, 70,109,139, 41, 17, 83,191,139,143,109, 43,
-171,146,151,110, 51,165,222, 0, 42,165, 16, 90, 65, 22,183, 16,214,234,107,181,234,142, 22,251,108,135,150, 59, 46,215, 5, 50,
- 18,133,168,137,216, 60, 24,173,168, 7, 3,221, 32, 1, 41,133,227,213, 1,225,240,144,237,102, 67,170,149,213,208,147, 99,101,
-202,133,131,216,177, 90, 37,178, 86,166,108,105,133, 82, 93,133,142, 93,124,164,212,197,142, 24,163, 77, 72,170,211,238,100,223,
-162,201,110,220,237,238,111, 82, 52,246,252, 12, 76,211,104, 19, 17,173,182,230, 36, 44,217, 11,162,126, 33,118,164,112,206, 51,
- 58,103, 87,247,239,119,233,240,126, 82,185,247, 5,186,235,123, 75,190,136, 92,203, 91, 87,103, 17,214,189,110, 62,189, 21,196,
-132,209, 1,102, 17,206, 29, 73,254,114,169,156,204, 48, 31, 42,227,182,178, 46, 74,216, 86,228,204, 88,175,225,227, 29,156,128,
-110, 10,234,150, 17, 38,181,157,229, 28,144,115, 23,101,189, 29,144, 47,119,104, 67,213,137,249,188,229,102, 64, 94,137,240,241,
-183,144,167, 3,220,234,225,228,208,201,109,135,182,163, 14,213, 14,186,116, 12,221,165,249,122, 87, 9, 61, 94,193,139, 3,188,
- 58,162,255,252, 2,249,254, 95,129,211, 31,135,242, 28,132,183, 64, 95, 48, 58, 87,119, 23, 89,159,163, 23, 9,198, 1,221, 36,
- 36, 62, 52, 16,201,241,135,208,252, 13,184,244, 14,182,136, 21,175,206, 5,125, 97, 15,180,139,238,197,127, 6, 91,242,186,133,
-128,185, 9,217,158,131,241,243,150, 16,215, 72,119,237,235, 37,255, 58, 3,206, 48,159,109, 60, 63, 66,221, 20,139, 25,157, 42,
- 28, 90,161, 85, 15,131,145,117,176, 17, 96,239, 58, 5, 85,208,139, 93, 91, 29,143,161, 91,195,209,165, 21,234, 80,156,164,231,
-175,120,111,227, 61,243, 98,123,236, 94, 31,247,114, 56, 23, 0,246,162,118, 38,201, 50, 94,213,108,121,198, 82,117,207, 35,110,
-185,227, 97,136,166, 13,184, 9, 28,156, 88, 80, 74, 60,222, 61, 79,245, 18,174, 62, 15, 95, 25,161,118, 22,162,145, 45,129,139,
-154,109,247,218, 40, 88,173,160,191,143,206,141,125,171,214, 94, 97,183,200, 86,159, 36,184,157, 50,136,189,150, 58,244,134,108,
-173,101, 15,163,232,254,117,203, 30, 53,162, 93,181,110, 83,163,119, 15, 83,177,204,249,171, 10,155,138, 94,116,240,234, 0, 31,
-201,240,241, 87,145, 27,175,194,225,175,192,241,207,192,225,207, 65,252,192, 46, 0,136, 96,171, 17, 57,134,248, 28, 12,159,129,
-245, 59, 48,126, 1,166,175,192,252,200, 47,128,231,192, 55,129,135, 16, 62,224,182,134,167, 65, 31,250,184, 61,238,201,214, 71,
-208,119,172,219, 15,207,218, 30, 33, 28, 64,255,221,208,125, 1,110,157,193, 97, 34,174, 35,235, 36, 92, 86,101,148, 29,156,208,
-242,201,189, 19,209, 93, 90,147,237,132,155, 90,217,118,164,154, 2,237, 86,219, 12,134,185, 85,221, 96, 91, 89,149, 72,110, 40,
- 88,221,241, 0, 10, 66,221,110,209,121,235,124,116, 43,248, 93,205, 12,209,192, 24,165, 76, 8,193,212,234, 18,152, 37, 90, 38,
-184, 35, 67,231,118,181, 8, 46,102,107, 20,221, 96,157,162, 77,116,204, 54, 84,107, 33, 75,166,120,158,120,236,204,158,213,165,
- 53,154,131, 21,220,170,212,243,119,141,188,120,243,121, 11, 49,121,248, 54,184, 47, 30,129,210,224, 60,190,239, 45, 45, 71,123,
-220,186,165,205, 60,149, 49, 25, 52, 40,228, 12,213, 98,100,179, 88,174,186,148, 98, 26, 33,247,187,151,243,135, 6,149,113,145,
-161,204, 91, 66,191,166, 59, 56,130,213,177,165,143,229,173, 61,247, 5,178, 4, 75,108, 22,217,189, 68, 53, 48,111,206,169, 85,
-136,199,167,132,131, 3,168,106,202,238, 75, 3,217, 72,103,233, 97,217, 73,209, 18,237, 82, 48,231, 76, 17,179,237,117, 26, 40,
- 90, 92, 75,225,153,236,177, 51,112,148,119,119, 45, 92, 71, 20, 7,204,224,130,174,157,117,172, 98,132,180,226,204,245, 90, 89,
-138, 93,187,216,213, 90,125,252, 93,201,222,249,198,101, 50,178,163,185, 73,179, 89,138, 21,214,144,170,175, 48,118,161, 52, 49,
- 37, 91, 35,186, 0,174,215, 74,127,116,196, 35,181,243, 35, 41,244, 93, 79,144,204,228,197, 57,170, 16, 16,102, 9,228,154, 77,
-252, 89,138, 9,232,156,183, 27, 36,144,107, 48, 0, 78,140, 22,218,211, 40, 12, 98,176,153,184,100,181,219,132,163, 32,140, 45,
-218,184,113, 1,170,173, 11,179,103,200,155,117, 54,184,138,223,136,120,117,158,237,220,148,253,204, 5,253,125, 67, 89,158, 20,
-194,233, 30,146, 70, 91,216,177, 92, 23,212,233, 94, 14,235,110,199, 46,164, 92,119, 13,153, 79,136, 57, 87,184, 8,202,113,168,
-200,161,145,155,250, 78, 9, 87,246,141, 49, 43,186, 13,200,105,178,189,113,169,232,166, 48, 7,101,219, 97, 99, 18, 12,110, 17,
-178,216, 14,171,120, 49, 31, 77,224,171,239, 8,250, 53, 49,212,220, 65, 68,142,183,240,252, 6,189,115,128,222, 1,185,117,134,
-156,142,200,177, 32, 55, 58,184, 97,200, 83,214,213,146, 41, 59,224,123,214,232,163, 30,125,227, 2, 41,255, 4,110,253, 36,240,
- 33,224,235,118, 80,202, 51,112,112, 23,233, 94,131,241, 18,221,174, 97,234, 96,188,107,135,247,233,243,232,230,219,240, 86,179,
-118,249,104, 55,184,173,173, 5,165,180,133,173,250,220,120,222,185,139, 12,243, 26,140, 57,191,253, 26, 20, 27,203, 49,122,167,
-184, 0, 57,246, 98,239,166, 43,120, 87,225,145,101,160,163,216,158,121,107,193, 9,250,112,164, 62,206,200,105, 79,172,106,227,
-177, 41,160,155,138,148, 7, 94,225,162, 21,144,238, 24,250, 75,239,212, 3, 18, 20,205,123,243,232,125,188,105,220, 89,217,180,
-229,188,143,102, 43,220,221, 12, 93,229, 63,202,110,223, 94,118,153,206,162, 30,239,216, 59,136,103,104,170,108,113, 81, 76,133,
-242, 8,242, 23,209, 55, 95,131, 55, 58,180, 47,158,205,222, 2,121,212,187,106, 27,131,235,123, 60,154,186, 3,203,236,143,214,
- 91, 97,247,193,135, 54, 97,120,217, 9, 94, 68, 4, 73,189,105, 63,212,187,113,247, 6, 83, 48,116, 99,113, 75, 75,240,238, 93,
-130, 57, 36,122, 19,124,105,142,246,189, 20,129, 81,208,175,173,224, 98,128,211, 13,220,120, 27,249,174,191, 13,183,127, 3, 78,
-254, 42,244,175,248,251, 98,222,137,234, 8,118,131,235,190,203, 64, 50,235,127, 9,242,183,160,220,117,241,219, 5,112,215,191,
-145,198,146,127,202,226,116,235, 3,127,160, 29,148,183,160,190, 10,241, 19, 54, 1, 48,107, 4,244,159,134,120,108,193, 69,167,
- 25,190, 19,233,214, 66,188,220,187,208,181,240, 10,183,169,213, 61,158,123, 91,173,171,236,104,105, 82,132,162,217, 46,116, 41,
-162, 41, 81,114, 37,116, 16,164, 67,163,197,103,106,158,151, 93, 59, 85,169,157, 91,143,218,175, 71, 59,220, 18,149, 21,202,160,
-194, 40, 66,173,149, 46, 84,130,122,182,185, 43,200, 43, 38,168,170, 62,154, 13, 65,232, 37,120,114,154,113,212, 3,214, 81, 55,
-135, 90,240, 81,166,184, 90,160,150, 74,183,205,196,213, 10, 82,231,154,146,217,198,204,103, 15, 64, 18,233,198,211,228, 24,168,
- 15,223,129, 50,154, 64,207,159,131, 42,106, 90,128,118, 79,172,217,239,175,226,112,157,104, 54,172, 60, 81,199,201, 30, 75,191,
-118, 61,139, 32,193,214, 1, 58,110,209, 98, 43, 6, 13, 54,233,210,108,162, 62,219, 21, 71, 66,234,157,193, 48,146, 75, 38,107,
- 37, 68, 49,145, 56,129,185, 42,105,181,182, 46,143,128, 76, 19, 33,246,206, 49,168,132,213,218,117,198,197,209,179, 9, 73, 61,
- 49, 36,106,176,132,187,185, 20,230,185, 16,253, 57, 43, 87, 23,196,212, 19,250, 97,161, 1, 6, 32, 13, 43,214, 7,199,244,131,
- 41,205,203, 92,216,110, 47,152,234, 22,212,108, 93,177, 75,206, 52, 55,113, 93, 94, 10,187,217,197,196, 85,236,181, 20,211,171,
- 56, 44,166,214, 76,206,101, 25,211, 43, 59,177,106,219,203,183,233, 95,104,113,184, 94,212, 67, 8,134, 82,173,106, 96,165,121,
-230, 36, 38,230,213,138,203, 77,101, 44,133,224, 29,241, 14,233,106, 96, 35, 9, 16,138, 16,164, 16, 66,160, 22,115, 5,152,229,
- 78,246,118,222,118,132,166, 96,197, 61,133,176,192,163,218, 78,187,248,101,165,199,244, 7,147,154,128,211,148,251,213, 60,232,
-152,123,160, 46,148,189, 74,158, 38, 19, 41, 62, 9,130,218,211,189,255,126,241, 85,215,164,240,203, 17,168,123,244,184, 61,107,
- 94,219,165,239,123,219,137,164,140, 18,171, 44,225, 45, 7, 2,227,158,248, 58,246, 74, 10,234,249,205, 14,175,152, 11,122, 47,
- 35,183, 34,242, 84, 64,167,128, 94, 22,255,160,122, 98,155, 71, 3, 70,160,155,149, 48,219,184, 69,171, 80,170, 34,197,139,126,
-157, 9, 36,170, 36,228, 91, 19,252,238, 21,178,186, 64,159,126,138,154, 14,225,236, 10, 25, 39,136, 21,121, 94,144, 31,238, 9,
- 31, 79,200,109,139, 74,149,161,135, 27, 39,232,163, 11,228,221,127, 4,183,126, 2,228,135,128,239, 88, 34,151,222, 54,250, 90,
-250, 58,210,223,181, 46,185, 14,144,223,134,238,121,228,185,231,168,211, 91, 22,215,170,150,181,110,241,134,123, 50,236,165,178,
-236, 5, 65,204, 30,206,178, 6, 89, 31,217,179,250,240, 45,208,149, 23, 75,221,129,122,100,143,244, 57, 1,239, 22,184, 59, 81,
-239,205,118, 24,138, 53,105,234,254,174, 58, 86,242,182, 16,238,111, 76, 97,189, 82,226, 16,144, 71, 64,249,246, 94, 92,216,129,
-119,110,174,218,223,216,165, 67, 34, 59, 21,166,236,217, 21,147,119,234, 45, 70, 54, 59,108,122, 73,255, 48, 85,175,110,117, 23,
- 49,235, 93,141, 68, 47,234, 67,176,130, 46,201,218,229, 62,219,250, 68, 39,179, 97,213,115, 24,191, 12,231,255, 7,124,181,122,
- 22,113,177, 21, 67,118,213,187, 96,170,247, 37,157,109,135, 31,109, 42,214,253,205, 39,123,247,147, 86, 51,165,114, 45,124, 4,
-113,238,123,114,127,109,112, 33,225,126,120, 71,195,200, 78,160,189,151,186,224, 47,118, 27, 13,150,106, 23,159,236, 43,141,222,
- 11,252,121,133, 71, 17,206, 87,232,183,102,248,190, 47, 33, 47,255, 2,156,254,151, 48,124,175, 79, 40,182,123,159, 72, 23,128,
-146,172,203,238,239, 88, 97,214,251, 54,134,103, 6,238, 3, 47,238,169, 75, 87, 86,184,235, 99,123,204,227, 47,217,107, 29, 94,
-114, 40,142,211,136,210,203, 48,124, 8,142,222, 36,188, 88,224,247, 18,129, 64,175, 13, 60,180,203, 94,217, 57, 10,196,176,204,
- 93,135,206,121, 73,255,106,118,180, 37, 26,178,218,123, 67,165,218,158,174,216,231, 90,243,236, 93,181,227, 96, 5,180, 75, 54,
-222,205, 51, 69,108,252,184,184, 38, 69, 22,115, 73,213,221, 24,189, 74,100,174,118, 0, 22, 95, 21,181,184, 82,212,236, 67, 49,
- 37, 75,124, 43, 21,130, 46,217,218, 79,180, 36, 14,231, 16,146, 40, 93, 80,164,108, 33, 24,141, 78,114, 89,102, 14,245,241, 61,
-163,131,221,124,142, 26, 2,250,240, 77,170, 23,118,162,175,109,234,206,175,220,128,155,193,179,209, 21, 65,156,158, 70,205, 38,
- 24,172,149, 48, 12,148,170,148,237,149, 23,243, 22,108,211,140,136,254,252,170, 50,111, 46,156,238,216, 91,135, 27, 7,234, 28,
-209,121, 7,168, 81, 42, 50, 28, 18,143,111, 83,183, 87, 11,194, 54, 87, 69,231,173,237,200,135, 53, 97, 88,163,211,214, 10,181,
-199,215,230,121,180,221,174,135,178,162,222, 93, 74, 52, 1,158,139,186,114,173,104,169,190,113,179, 51, 98,154, 70, 66, 76, 84,
- 53,177, 92,243,194, 39, 9, 38, 78,108,179, 27,223, 99,151,190, 50, 59, 30,182,228,217,128, 62, 34,164,212,177,228,200,186, 82,
- 61,123,242,155,209,220, 10, 82,101,209,115,180,136,224,253,177,251,114,220,170,193,131,156, 89,198, 58, 70,182,195,138,113, 59,
- 82,146,178,157,103, 74, 53,197,119, 3,207,224, 83,170,152, 2,189,167,201,217,197,204,186,248,224,164, 78,117,204,116, 23, 2,
- 41, 24, 80,104,246,149, 66,174, 74,214,106,184,217,170,164,104,175,205,182, 86,166,105,132,106,159,149,166, 53, 8,126,217,205,
-165, 50,151,153, 50,206,203, 90, 67,222,131,137,227, 90,108,241,255,255,244, 93,223,143, 6,239,161,183,122, 77, 72,247,100, 54,
- 67,202,106,246, 1, 92, 59,181,138,194,202, 39,182, 90,236,236,142,193,254,145,217,155,214,132,208,159, 27, 47,156,219, 29,114,
- 51, 16,206, 3,105, 83,204, 82,227,206,175,169,133,170,181,129, 65,221, 75, 33,141, 74, 47,202, 80, 43,195, 69, 33,229,130, 30,
- 4,131,153, 48, 33,103, 19,220,184, 65,205, 9,238,206,112, 57,193,215, 20,253,229,142,186, 78,200,103, 2,225,103, 6,228,149,
- 1,185,145,144,131, 99, 56,223,192,227,127, 4,199, 23, 16,255, 21,235,134,228, 29,224,131,160, 31,131,238,235, 16,191,100,135,
-102,237,188,176, 63, 67,120,233, 14,250,232, 30,250, 45,127, 90, 98, 53, 79,171,132,235,166,104,217,251,113, 96, 99, 24,142,170,
-237, 70,235,119,224,209,235,118, 97,104,223,228,210, 45, 7, 59,195, 59, 15,152,185, 63,193,131,209,198,236,106,123, 17, 29, 43,
-122, 81,151,119, 66,233, 76, 40, 21, 74,166,142, 16,106, 68, 30, 70, 75,241,210,173, 89,157,164, 55,144,137, 56, 20, 40, 98, 79,
-190,232,142, 94, 39, 59, 56,138,237,211,221, 58, 55, 22,227, 10,140,126, 1, 96,207,210,150, 29,150,211, 9, 82, 93, 8,217, 70,
-185, 93,178, 76,246,152,224,164, 26, 68, 39, 60,103,197,107,190, 11,243,215, 97,252, 71,232,215,223,129,111,117,104,200, 38, 80,
-115,145, 90,187, 23, 45, 22,182,125, 24,195,242, 65,223,137,188,158,244,113,162,120, 76,237,245,203,146,186,237,205,132, 71,158,
- 72, 87,154,229, 96, 9,232,178,127,116,202, 86,240, 15, 35,210, 86, 66, 88,106,156,133,235,120,136, 76,241,231, 45, 57,235,158,
-106,169,111,191, 19,224,221, 1,253, 3,175, 35,159,250, 43,112,235,111,192,240,131,254,141,108,159,248,120,238, 41, 80,229,196,
-138,182,220, 7,238, 1,103,192, 99, 12,196,236,170, 69,185,101,157,252,230,127,134,243,175,194,250,123, 32,157, 65,124, 23,240,
-113,127, 56,130,245, 31,132,139, 47,193,203, 35,114, 59, 17,239, 37, 86,151,153, 74, 32, 39,155, 60,197,234,239, 45,191, 51,100,
- 81, 84,178, 25,156, 90, 39,233, 89,246, 90,240, 84, 49, 7,180, 84, 47,166,101,246,199,229,172,247,152,208,212,147, 5,243, 91,
-207,121, 73,247, 17,177, 78,125, 21,132,163, 40,196, 46, 50,230, 74,204,153,222, 95,132, 82,161, 96,200,204,186,151,198, 39, 46,
-160, 18,117,107,142, 43,200,236, 82,224,118,161,234,151,203,246,150, 84,107, 26,146, 88,162,155,212, 66,157, 38,232,147,241,232,
-167,201, 87, 48, 21,125,120, 23, 81, 33,221,126,150,148, 6,120,248, 29,202,120,229, 39,147, 34,209,120,228,197,253,243,193, 25,
- 12,100, 83,125,167, 16, 44,128, 6, 59,200,101,125,140, 14, 3,170,151,212,121,182, 29,117,158,140,191,230,133, 4, 9,166, 14,
-247,231, 39,231,130,150, 45, 93,234, 12,217, 28, 59,130,154, 98,181,184, 7,188, 63,126,202, 82,225,106,165, 27, 44, 47,160,186,
- 98, 58, 68,131,161, 72,201, 84, 9,244,195, 26, 73,145, 92,148,162,230, 43,159,171, 82, 66, 90, 46,182,226, 66,179,154,231, 37,
- 39,158,100, 2,213,113,156, 24,183, 38,232,139,157,103,140,135, 64, 74, 29,161,249,192, 29, 2, 20,170,177, 32,146, 11, 21,195,
-106, 77, 85,101,158,103,230,121, 98,154, 39,242, 60, 51, 23,131,228, 52, 34,220, 16,141,155,110,200,146,202, 84, 10,197,197, 99,
-141,250,182,104, 51, 60, 88,166,122,119,159,130,112, 35,118,220, 57,185,193,176, 58, 64, 46,206, 65,212, 26,199, 82, 40,185, 77,
- 84,204,102, 56,187,159,191, 93,208,163,152,183,189, 11,145, 16,133,136, 16,196, 44,190,234,232,216,109, 41,100,173,204,213,126,
-100,199,220, 26,144,199,214, 51,185, 90, 4,171,197,118,135,197, 5,160,130, 69,197,214,194, 60,153, 83,131,170,239,201, 57,223,
-157,117,250,190,181, 92,121, 66, 71,212,178, 45,174, 65,107,119, 54,211, 38,254,181,231,184,219, 35, 83,216,229, 40, 77,186,151,
-183,220,153,144,186,129,123,202,236, 60, 13, 49,224,132,224,184,187,168,196, 92,145,123,133,176, 22,228, 52,162, 87,149,244, 78,
- 37,141,186,131, 95, 40, 20, 21,182,218,130,190,236,131, 28, 69,232,170, 48, 5, 97, 20, 88,169,178,218,206,164,109, 32,117,130,
- 92, 5,228,234, 2,185,191, 37,164, 3,234,233, 9,156,246,176,157,237,240, 43,138,126,169,162,159,191,180,130,254, 99, 3,242,
-199, 15, 9, 47, 28, 89,177,222,254,223,208,223,133,238,207,249,206,242, 45,235,106,229, 71, 64, 94, 6,249,191,172,216,215, 9,
-230,123,144,158, 66, 62,125,104, 35,250,111,121,129,156, 20,142,117, 81,128,238, 60, 94,123,210,236,206, 70,222,196, 3, 24,127,
- 13,222,245,217,112,206, 22,148,210, 2, 62, 74,181, 91,210,141, 30,206,172,168,235,189,217, 20,179,157,171,145,175, 10,122,149,
- 45,196,229, 72,232, 6,161,230, 54,181,247,248,195,139, 4,211, 99,239, 0, 39,239,142,247, 96,192,109,204,238,182,165,133,247,
- 73, 48, 11,212,202, 15,243,234,214,193,246,194,204,186,151,161,234, 74,250,162,206,149,110,194, 57,219,239,135,163, 1, 57, 30,
-224, 52,192,199,102,228,230,243, 48,252,128,189,121,198,175,192,244, 91,112,247,171,240,197,104, 35,119,205, 6, 73,107, 30,206,
-246, 33,174,126,107,189, 38,150, 50,145, 16,125,114,112,200, 94, 65,126, 2,169,212, 36, 46,193,209,189, 34,230,145,150,220, 38,
-140,201,199, 34,126,201,137,178,227, 35, 87,215, 77,108,130,241, 10,210,222, 5, 97,244,223,155,125,138, 17,162, 77, 95, 92,163,
-160, 43,167,142,223,235,224,159, 30,160,243, 93,228,123,254, 50,220,254,239,189, 99, 15, 30, 8,240,164, 89,165,209,150, 34,200,
- 29,175,112,175, 66,253,135, 16, 62, 1,241,211,254,228,251, 56,103,254, 85, 19,207,233,224,153,222,231,246,186,139,133,166, 48,
-124, 10,142,239,192, 7,207,144,143, 9,233,141,158,213,227,137,195, 45, 92,134,224, 73, 99,106, 20, 47,236,114,110, 22,225, 4,
-201,248,223, 58,109, 13, 42,212,202,123, 21, 52, 68, 99,194,199,232,185,230,189, 21,172, 96,254,223, 18, 18, 37, 23,230,121,132,
- 92,155, 81,194,144,193,173, 75,239,132,222,157, 77, 33, 4,250,176,131,251, 21,177,139, 70,245,241,121,179, 59, 5, 85, 7, 25,
- 41, 81, 77,197,156, 21,230,178,231, 31, 14, 59,228,126,140,248, 24,217,132,102,226,241,129, 90, 11, 58,110, 32,249, 40, 62, 27,
- 52,165,212, 74,126,124,151, 33, 6,134, 59, 47, 66,215,163,239,124,147,122,117,101, 95, 39, 38,235,220, 21, 35,208, 5,183, 62,
-133, 74,234, 6, 82, 55, 32, 90,169,209, 86, 77, 26,204,179, 31,135, 3, 27, 55, 79,227,114,122,167,208, 48,204,182, 72,170, 82,
-209,160, 11, 14,185,250,123,182, 32,132,174, 39,106,180,116,198,216, 33,195,154,105,220, 26,192,167, 27,168,106,232,211, 42, 70,
-124, 11,254, 53, 66,111, 48,148, 80,246,146,192,250,222,222,183,165,154,250, 92,133,152, 58, 66, 63,120, 8,137,249,209,107, 41,
- 30, 42, 98,153,228,193, 59,203, 24,109,205,144,231,217, 62, 50, 49,185,115, 66,137, 24, 23,126,118, 12,109,244,213, 68, 31, 19,
-235,174, 67, 56, 98,170,133,105,158,153,199, 43, 74,174,204, 53,147,231,201,198,209, 98,192,150,117, 76,164,174,167, 11,150, 79,
- 81,213, 10,120,192,179,228,177,245, 94,215, 69,142,250, 21, 7,253,138,208,117, 92,109,174, 88, 9,140,195,138,237,118,227,211,
- 1,131, 7,141, 90, 25,199,140,186,143,188,105, 38, 50,202, 84,202, 50,221,169,110,163,221,239,122,131,135,117, 53,183, 72,109,
- 83,164,182, 54,208,166, 44, 23,183,236,205,136, 71,181, 26,193,174, 24,129,111,206,239,203,106, 23,185, 38,102,127, 95,167,250,
-147, 96,173,221,172,104, 79, 14,228,220,108,105,178, 96,221,249,213,209,110,207,237, 14,241,207,223,137,191,216, 7, 97,149,132,
- 30, 33,133,221, 4, 37,185, 78,126, 42, 70,101,202,123,177,174,162, 98,109,126,117, 91, 87,167,200,133,137,195,178, 55,131,185,
-194,168, 98, 31, 78,245, 4,210,197, 2,189, 75,128,202,200,222,206,204,189,196, 27,133, 77, 65, 98,129, 35, 69,110,172, 97, 53,
- 88,251,209, 85,184,217, 33,199,197,118,160,191, 51,193, 63, 30,209, 71, 17, 94, 88, 35, 55,215, 16,222,132,250, 37,144, 79,130,
- 60, 15,114,233,190,250,103,205, 62,196,125,144, 51,107,241,106,129, 97,128,167, 19,220, 47,240,157,178, 83,104,118,114,157,140,
- 18,247, 82,193,146,219,247,110, 36,244,242, 46,252,222,149,253,165, 11, 47,148, 1, 47,164,158, 81,251,204, 0,239,108,225,219,
- 35,250,206,214,195, 12,116, 23,160,162,246,231, 91, 55,194,228,225, 7,158,161, 28,110,245,200, 39,176,148,182,112,106,226,170,
-139, 95,134,179,199,240,174, 39,194,213,186,167,214,247, 19,119,101, 20, 59, 57,237,209,181,195, 66,206,178, 97,114, 47, 76,168,
-183,248,202,252, 16,221,117,249,118,179,141,177, 35,220, 92, 33,119, 14,224,165, 8,159,152,145, 23,143,224,232,167, 97,253,125,
- 80, 46, 96,250, 50, 92,253, 26,250,169,114,251, 17, 0, 0, 32, 0, 73, 68, 65, 84,107, 27,120, 75, 80,201,232, 88,168, 91,191,
-228,108,138,223,208,237,178,167,123, 84, 87,109, 35,180, 61, 32,133,244,105,137, 56, 92,118, 71,254,184, 44,149,104, 23,188, 32,
-205,237,174, 1, 14, 79, 32, 87, 36,111,175, 97, 21, 5, 75,192, 67,157,177, 31,205,174,101, 95,203,158, 3,105, 56, 76, 45,254,
- 92,218,141, 97,137,235,221,248, 42, 97, 16,184, 12,200, 55, 18, 12,231,200,237, 95,130,244, 65, 27,141, 91,138,203, 19, 81,137,
-126,243, 88, 62, 65, 39, 16,158,183, 63, 91,254, 25,212,175, 65,248,144,173, 50,194, 83,144, 62, 11,252, 6,232, 35, 72, 47,218,
-154, 37,220, 48,187, 32, 2,233, 0,134,111,131,124, 19,206, 70,248, 54,232,121, 70,199,153,243, 86, 12,171,239,138, 37, 80,131,
-197,161,198,104,169,104, 90,157, 97,239,183,123,195,178, 58,239, 59,244,150, 15, 30,130, 23,115,203,238, 46,170,228,113, 36, 79,
-219, 37,175, 92,154,205,209, 59,135,149, 8, 7,193, 21,241, 53,147,176,168,202, 73, 97,110,137,126, 33,238,184,222, 65, 12,247,
- 42, 74,223, 80, 8,126, 47,173, 40, 99,109,124, 40,117,210,178,253,108,130,166, 96, 50,145, 40, 22, 45, 28,130,195,136,204, 98,
-100,128,164, 97,103, 49, 82, 53,159, 55,133,238,240,148,178, 62,102,206,179,115, 16, 58,163,225,121, 54, 55,121,178, 93,109,236,
-124, 20,109, 83,136,130, 51,188, 85,208,144,108,199,188,185, 68,203,228, 81,157,178,224, 70,139,154,184,144, 16,173,227, 13,174,
- 71,113, 70,135,166,158,212,175,232, 87, 43, 66,236, 72,135, 39,164,147,167,200,170, 70,130,235,250,229,220, 41,213,226, 58, 67,
- 12, 72,215, 67,232,150,176, 41,155,100, 24, 33, 79,252,223,104, 83, 21,130,115,209, 99,180, 11,198,108, 29,187, 41,213, 11,129,
- 64,236,122,186, 24, 57, 60, 57,229, 71,127,254,207, 50,172, 15,120,116,247, 29,138,136,165,175,213,194, 39,127,234,143,240,185,
- 95,250, 63,185,247,224, 46,119,239,190,205,219,119,223,226,157,187,111,114,247,193, 93,238, 61,188,207,221,119,239,114,255,193,
- 61,206,206, 30,113,181,217, 50,205, 54,170,142, 98, 52, 56,245,154, 48,123,168,138,122, 34, 95, 31, 34,171,212,177,238,122, 14,
-251, 21,167,195,138, 59,199,167,220, 58,189,197, 48,172, 44,222,118,115, 73,158, 70,219,159,107, 69, 84, 57, 61, 62,225,199,255,
-220,159,229,213, 47,127,197, 59,244,178,156, 31,226,147, 18,107, 70,171,103,163,151, 61, 84,172,122, 70, 59,187,145,123,105, 49,
-177,197, 71,239,117, 7, 31,114,146,162,106, 93,152,248, 5,152,243, 68, 25, 39,211,233,236, 21,230, 39,169,112,186, 31,210,242,
- 62,230,181,182,250, 86,239,118,228,201, 77,186, 88,189, 21,194, 14,138,166, 21,149,226,188,196,221, 24, 89,130,144, 14, 61, 57,
-178,209,185,216,195,186,103,255, 64,181,228,208,236, 93, 97,135, 9, 59,194,172, 12,239,100, 27, 91,222,244,177, 93, 18, 27,213,
-136,144,189, 25,212,165, 25, 18,206,171,237,237, 69, 76, 68,227,182, 87, 70, 31,215,231, 96, 92, 23, 91,219, 9,177, 40,146, 55,
-232,168,232,234, 20, 14, 14,108,204, 94, 42, 58,116,136,142,246,111,231,130,254,250, 25,250,165, 45,252,200,128,252,203, 55,145,
-103,206,161,252, 77,208,159, 7,249, 12,240,192,138,123,120, 14,248, 9, 40,255, 0,120,219,104, 88,219, 13,178,234,145, 31, 89,
- 25,138,251,181,209, 58,236,117,128,126,159,110,178, 36, 97,120,135, 28, 80,221,194,131,201, 70,186,115,221,117,191,157,236, 58,
-227, 67,127,146, 31, 87,244,188, 80,183, 21, 58, 93, 70,210,210, 57,237,110, 72,190,151,171,132, 42, 30,219,231,212,178,123, 1,
-206, 46,225,206,107, 86, 64,242, 35, 3,158,148,189,180,141,208,172,111,123,124,250, 46,182, 48,123, 15,219,241,123,226,236, 35,
-235,232,168,206,104,143, 63,212,134,165,245, 98,152, 2,161, 27,224,233, 21,124, 12,120, 57, 35,199,119,224,240,143,195,250,199,
-236, 11,108,127, 11,166, 47,163,191,253, 8, 94,239,160, 27,225,170,152, 16, 45,219, 30, 79,252, 18, 83,159, 12,104,121,226,131,
- 32,186, 23, 10,148,146, 69,107,182,240, 16,252, 2, 20,158,128, 37,183, 55,123, 23, 27,208,244,186,114, 30, 15,142, 40,123, 41,
-166, 62, 61,208,236,170,255,192, 46,143,122,210,189,165,216, 8, 99,112,156,170,203, 83,174, 50,162, 51,114, 25, 8,255,251, 33,
- 90, 30, 33, 63,240, 11,112,243,207,195,240,115,198,122,151,190,209,115,124,106,224,214,207,234, 59,119, 18,132, 87, 44,160,167,
-252, 42,148, 95,129,244,211,182, 91,239, 62, 3,199,127, 21,182,127,211,213,242,207,216,100,198, 4, 29,198,123,168,159,133,241,
- 55,224,233, 51,228,131,137,244,118,199,193,163,137,195,154,217, 22, 89, 6, 18, 82,131,183,182, 74,165, 16, 82, 93,178,196,171,
-159,110, 26,219, 94, 82,172,227,147, 72, 80,139,230, 44,192, 56,110,209,121,244,104, 83,217,177,173, 91, 78,128,182,139,153, 79,
- 93, 36,208, 73, 32,105, 97,171,187, 97, 80,231,251,239, 33, 6,211,214, 44,251,241,176,100,193, 77,234, 69,172,217, 20,219, 39,
- 79,219, 68, 1,178, 86,186, 8, 67, 8,203,251, 85, 37, 18, 82,164,211, 66,168, 74,174, 19,193, 5, 86,121,154,137, 85, 81,205,
- 76, 15,239,153, 92,226,246, 75,172, 63,240, 41, 54,247, 95, 39,159,221, 71,197,233,107,193, 32,254, 18, 19,178, 58, 48, 11, 87,
-181,116,175, 50, 57,195, 91,146, 61, 31,243, 72,168,217, 27,146,232,145,174, 30, 39,171, 97, 81,123,107,173,182, 74,243,209,110,
-198, 86, 27, 21,208, 48,208,157,220, 38, 29,223, 68,227, 64,127, 96,194,194,178,189, 68,199, 43,164, 91,161,253, 26, 21,243,127,
- 75,177,195,188, 74,235, 52, 27,107,223,172,117,209, 97, 84,115,182, 84,183, 34, 24, 49, 14,155, 58,118,222,185,183, 61,120, 5,
-234, 60,115,231, 67, 31,226,222,183,223,224,198,179,207,112,118,126, 70,201, 51,115, 54, 75,223,118,115,193,246,226,140, 32,214,
-241,215,146, 45,143, 93,240, 75, 68, 0, 13, 11,141, 79,213, 82,248, 68,108,114,145,186,142, 33,245,196,100, 89,236, 83,136, 92,
-205, 35, 41, 68,250, 24,137,203,215, 80,130, 60, 32, 73, 96,136,145,148,204, 31,191,201,153,139,105,107, 32,154,156, 73,195, 64,
- 86,184, 28,183,182,235,102,183,117,212, 70, 8,109,110,138,134,123,209,221,123,169,161,101,151, 81, 58,187, 11,234,114, 14,133,
-176, 20,226, 36,130, 74,178, 49,125,206,228,236,197,188, 33,110,247, 36,112,239,217,152,251,170,104,247,165,229,125,187,244,107,
-169, 86,187,227,215,173,108,238,244,105, 99, 78, 41,123,171,250,188, 56, 12,170,118,196,191,248,108,252,197, 5, 12,231,147,214,
- 46,226,111, 12, 24,171,176, 45,215, 19, 68, 77, 16, 45,254,228, 9, 97,171,132,173, 46,208,139, 17, 97,204, 62,110,115,203, 75,
-138,118,200, 92,150, 93, 10,105, 23,109,156, 63, 86, 97,198,240,166,234,170,249, 78, 28,112,226, 34, 48,161,194, 52,219,205,187,
-239, 29, 18,131,225, 85, 59,103,167, 31,250,112,235,247, 38,248,167, 19,156,156, 34,207, 22, 24,126,211,111,188, 63,232, 42,162,
- 11,199,111, 86, 19,212,213, 45,148,222,254,123,165,240, 76,130,111, 84, 56,159,144, 99, 15,151,175,251,123,117, 31,171, 15, 98,
-187,245, 62,193, 55, 71,239,208,205, 14,101,194, 1,177, 98, 90, 5,158,239,172, 48,124,107, 68, 31,249, 62, 29,221,169,194,241,
-224,149, 24, 60,103, 59, 32, 67,180,159,147,221,192, 67, 72,240,145,138,220,121,202, 70,189,243, 59,112,249,107,240,232, 18,185,
-240,130, 85,116,201,243, 54,216,182,141,221,229, 32, 89,142,186,143,214,185, 40,240,200, 11, 88,187,117, 21, 89, 30, 11,209, 31,
- 67, 76,132, 97,128,103, 87,240,169,138,124, 12,228,244,135,224,244,223,135,131, 63,108,225, 50,229, 62, 76,191, 14,111,126, 1,
-190, 96,139, 83,205, 5,221, 90,148,171, 69,186,170,223,154, 93, 4,255, 62,206, 53,217,171,205, 44, 59,214,106, 62,125, 28,160,
-145,134, 38,242,240, 27,185,143,113,147,253,121,243, 11,175,145, 57,195,188,181, 61,152,143,121, 23,108,108,240,215, 47,201,146,
- 75,108,100,228,128, 36,208,209,237,136, 52, 53,121, 53,229,108, 8,203,250,135, 90,209, 41,163,204,212,115,144,175,172,145, 56,
- 33,183,190, 8,252,115, 35,233,213, 51, 8, 87,166,123,224,166, 91, 42,216, 79,189,246,125,245, 33,132,143,218,239,235, 35,239,
-198,171, 89,222,226,167,128,215,124,236,126,211,185, 14,106, 23, 6,141, 48,253,142,237,232,231, 25,222, 86,228,108, 70,230,202,
-165, 68, 54, 26,125, 5,100, 7,166, 86, 93,118,189,209,139,186, 6,179, 50, 73, 50, 21,181,136, 41,223, 69,132, 50,110, 41,243,
-104,176,147, 58, 47,128, 20,133, 37,230,182,229,109, 55, 15,173,101, 5,217, 62,180, 75, 70,227,218, 54,243,131,143,183,187, 0,
- 67, 74, 38,158,107,217, 59,162,118,166, 99, 54,162,162, 59,105, 74,117,161, 86, 11,193, 67, 96,242, 27, 97, 75, 91,171,109,194,
-226,224, 16, 66,192,254, 87,221, 38,213,155, 77,169,157,179,121, 50,192,206,250, 24, 57,186, 77,206, 35,249,234,177,189,231,146,
- 21,116,186,149, 89,213,230,217,244, 3,139,247,210,214,105, 33,245,198, 77, 7, 98,234,209, 52,144,250,193,214, 20, 68,106,195,
-202, 56,196, 71,177,177, 61,146, 60, 1, 77,136, 53,219,158,247,232,212,148,241,213, 34, 75,231,201,166, 76,105, 88, 17,134, 3,
- 52,152,205,171,230,108, 43,147,102, 41,116, 91, 95,241, 34, 37,213,147,241,180, 46,113,163,165, 84,166,105, 75,222,110,141, 35,
-239,244,183,121,158,184,188, 60,231,226,236, 17,151,151,231,124,215,247,125, 47, 95,250,229, 95,166, 91, 13, 76,219, 13,143,238,
-221,163,230, 76, 74,137,151, 62,249, 41,190,241,197, 47,129,192,234, 96,205,103,127,226, 39,249,232, 15,254, 0, 47,127,242,187,
-121,250,165,151,120,240,250, 27,148, 60,115,122,251, 54, 63,241,243,255, 6,111,127,235, 91,228,113,228,163,223,255,253,188,240,
-202, 39,120,245,171, 95,225,114,179, 37,163,124,236,135,127,132, 23, 62,253, 41,158,254,232, 71, 56,122,230, 25,222,126,253,117,
-202, 60,241,194,167, 63,197, 83, 47,191,204,219,111,188,193,166,100,230, 24,248,238,159,253, 89,190,246,255,126,137,243,237,150,
-139,105,203,229, 56, 50, 78, 19,164,200,243,159,120,133,223,250,220,111, 56,163,222,214, 16,171,195, 67,126,250,223,252,183,248,
-237,223,252, 60, 90, 43,253,225, 1, 63,249,103,255, 28, 95,249,252,231,153,114,230,248,246, 45,254,224,207,254, 44, 31,248,232,
- 71, 88, 31, 29,241, 67,127,244,143,242,213,207,255, 6,170,149,211, 59,119,248, 67, 63,251,175,242,145,239,249, 30, 94,248,240,
- 71,185,247,198,235,104, 41,188,242,131, 63,196, 51, 31,122,153,215, 94,125,149,113, 28,137, 49,240, 39,255,237,127,135,175,125,
-241,139,104,173,220,124,250,105,126,236,231,254, 20, 31,251,222,207,242,226, 71, 63,202,155,223,252, 22,121,158,249,228, 15,254,
- 32, 31,250,196, 39,248,246, 55,190,137, 96,143,237, 79,254,165,127,151,223,253, 23,255,194,116, 22,123,133,123, 73, 50,117,171,
- 97, 59, 21,131,236, 5,194,198,232,239,193,249, 9,202,220,110,127, 40, 18, 73,165,168,147,152, 92, 20,109,124, 2,170, 43, 87,
-199,106, 2,236,169, 81, 71, 27, 67,165,205,253,147,141,156, 58,103,156, 23,129,109, 22, 11,125, 51, 70, 2, 81,149, 80,205, 76,
-211,183, 20,209,176,171, 37,179,154,253,102,242,244,167,161,229,167,208, 40,116, 94,100,100,134,237, 35, 52, 29, 64,191,182, 67,
- 38, 21,100,188, 50,113, 91,113, 21,213,105,178,162,255, 63,222,167,126,254, 24,249, 83, 7,200, 7,127,201, 44, 67,250,167,125,
- 60,122, 31,194, 7,129,143, 64,250, 42,228, 45,228, 21, 16,145, 91, 21,254,196,128,254,157, 9,125,187, 88,142,123,220, 59,135,
-219,146, 35,248,188,112, 84, 43,144,213,139,116,131,181, 68,159, 57,117, 30,229,250,218,136,190, 53,161,103, 5, 93,155, 93, 10,
-164,189, 70, 46,110, 46,118, 82, 13,150, 14, 39, 93,103,227,248, 34,168, 6,228,221, 10,243, 55,160, 92,238,120,169,169, 29,220,
- 46, 51,214,186, 3,221,236, 61, 86, 93, 38, 7, 62, 73, 16, 7, 7,101,191,101,121, 11, 45, 37, 44, 1, 52, 97,232,224,176,183,
-203,196, 7,129, 27, 63, 6,199,255,129,165,197,169, 47,161,235, 25,108,190,136,190, 54,195,198,149,240,179,123, 56,103,143, 64,
-156, 43,185,168, 79,127,246,111,181,187,118,125,129, 46,197,134,199,109,169, 74,106, 24, 98,143,153, 36, 13,176, 26,108,143, 62,
- 79, 80,231, 37, 34, 87,106,240,184, 96,221,237,180, 90, 37,106,226,187,102,122, 15,126, 9,242,236,102,185, 84,116,112,159,248,
- 16, 96,170,214,197,119,134,182,211,130, 93,146,250,201,112,183, 83,166, 94,100,216,206,166, 21,249, 95,123,226, 55, 11,242,211,
-175, 34, 79,127, 27,214, 71,112,122, 8, 39,127, 12,248, 99,254,133,254,191,186,222, 45,214,178,235, 58,207,252,198,156,107,173,
-189,247,185, 86, 21, 89,188, 20,201, 98, 21, 69, 21, 73,241, 38, 81,150,168, 72,109,155,146,124,105,201,185, 57,134,221,128,186,
-129,142,131,110,244, 67, 39, 8, 16, 32, 15,121,243, 67, 16, 32, 15,121, 72,128,228, 45,221, 9,130,238,192,157,216, 29,199,136,
-218,138, 36, 43,113,219, 84,100,138,142, 69,145,180, 68,177,138, 34,171,120,169,219,185,159,125, 89,107,206, 57,242, 48,198, 90,
-123,159, 18, 93,130, 64,137, 85,117,206, 62,231,236, 53,231,184,252,255,247,223,107,130, 57, 61,230,164, 55, 50,248,251,209,119,
-179,253,239,197,139,192, 47, 67,121,217,232,114,218,250,199, 73,182,130,105,158,128,230, 42, 92,188,140, 60, 82, 19,174,143,216,
-152,103, 78,119,202, 60, 86,148, 90, 73, 26,157,144,149, 76, 35, 32,209,166,110,154,157,228,102,187,232, 92, 58,219,119,183,166,
-188,214,156,145, 98,138,119,237, 61,183,254, 83,139,197, 29, 11, 30,140,210, 79, 70,250, 85, 74,244,125,126, 43, 13,109,132,226,
-227,164,133, 66, 72, 86,240, 86,177, 70, 82, 59,188, 71, 75, 81, 22,142,229,108,197, 34,115, 85, 44,136, 38,123,182,118, 12, 80,
- 7, 75, 54,235, 9, 90,201,149,230, 22,214,178,116, 84, 12,164,219,188,160,202,137, 80,143,232, 70,149,137,223,114,135, 30, 94,
- 39, 86,145,209,250,221,196,115,151, 56, 30,111,208,221,252,177, 41,220, 43,227,142,247,121,232,161,167,140,149,132, 84,145, 56,
-217, 68, 70, 19, 11, 73,233,230,180,139, 25, 93,107, 14,129, 76,241,248, 9, 25,224, 35,254, 54,243,206,214, 19,198, 98,244,130,
-170,161,180,115,114,136,132,102, 50,236,190,213, 85, 37,154, 18,185, 36,114,182,137, 87, 73, 29, 85, 93, 19,234, 49, 85, 61, 54,
-138, 98, 76,195, 52,128,156,137, 33, 18, 37,146,154, 17, 26, 42,142, 14,118,153,207, 14, 17,137, 44,102,199, 94,152,197,129,132,
-182,125,215,221,160,176,243,193,251,140,214,198, 60,112,233,113,174,190,241, 3,162, 10,113,109,157,170,170,104,214,214,200, 41,
-241,220,207,253, 34,111,189,250, 42,239,189,117,133,110, 49,227,220, 35, 31,225,153,207,127,129,151,190,250, 31, 56,220,221,225,
-181, 23, 95,228,147, 95,252, 34,111,190,252, 50, 23,159,124,138,255,255,183,126,139,201,218, 58,109, 78,124,242,191,255, 18, 63,
-250,147, 63,225,221,203, 87, 40,100, 30,190,244, 56,143,124,252, 89, 94,254,143,255,145, 27, 47,190,200,207,127,229, 43,236, 77,
-167,212,170, 60,240,177,143,113,237, 71, 63, 98, 54,159,179, 40, 5,205,137,113, 8,104, 29, 76,136,157, 50,109,215, 90,110,188,
-136, 71, 47, 20, 83,241,123, 30,124,202,133,236,202,118, 84,249,228, 23,127,142,239,191,248, 71,188,119,249, 10, 79,124,234, 83,
- 54,173,136,145, 40,129,207,126,233,151,248,225, 75, 47,241,238,149, 43, 60,241,252,167,121,250,167,127,154, 23,127,239,247,120,
-253,123,127,202, 23,127,245, 87,105,231, 54, 33,190,240,228, 83,188,119,249,178, 21, 72,192,103,190,244, 37, 94,121,241, 69,174,
-253,232, 71, 60,243, 23, 62,199,115, 47,188,192,183,191,250, 85, 46,191,242, 10,191,244,235,191, 78,252,207,127, 64,234, 22,124,
-228,233,167,249,241, 15, 94, 39,185,192,111,245,204,147,161,103,148,225,200,150,213,229, 97,127, 94,149,229, 92, 64, 48, 59,158,
-196, 56,152,179, 80,165, 42,120, 44,170, 91,181, 23, 62, 46, 24,251,244, 49,123,211,146, 28, 8,145, 87, 48,230, 5, 15, 70,203,
- 30,189,238, 49,153,237,114, 61, 11,197,167,208,193,238,219, 94, 76, 67, 92,222,143,149, 96,251, 58,215,160, 45,130, 75,164,150,
- 12,197, 37,102, 53,117, 72,119,132, 78, 64,227, 6, 28,131,182, 53,194,194, 42, 16, 85, 24, 39,116, 18,225,158,132, 94, 62, 64,
-254,143, 9,242,215,198,132,167,191, 13,117,130,252, 63, 88,144, 6,173,141, 63,117, 10,241,170,115,232, 39,208,173, 33,231, 90,
-248,139,235,232,239, 30,193, 65,134,237,149, 60,244, 30,126, 82,123,149, 51, 93,185, 36,211,170,242,221,193, 36,181, 5,125,232,
-213,150,114,203, 61,158,163, 62,170, 83, 76,141,153,250,200,213, 94, 44,237,179,164,144,173, 2,170,163, 93,248,183, 35,204,111,
- 66,153, 25, 78, 52,142,140,128, 85,121,164,107, 81, 55,112,251, 62,165,128, 76, 2,172, 85, 54,241,136,149,245, 61,125,136, 79,
-101, 88, 89, 19,154, 69,164,246,207,215, 91,215, 38, 13, 92,140,200,133, 14, 78, 61, 9,155,255, 43,212,247,184,101,203, 79,205,
-124, 5,110,127, 0, 59,166,196,215,146, 41,157,243,181, 83,166, 28, 38,186, 69,166, 11, 70, 30, 43,170,119,136, 69,164, 39,188,
-218, 94, 59, 47,203, 80,233, 25,239, 14,201, 65, 18,116, 5,201, 17,105, 70,230,122,104,231, 72, 59,245, 34, 83, 44,124,130,100,
-223,207, 85,164,131, 56, 5,168, 91,193,133, 54,203,149,133,246, 35, 41, 17,100,156,125, 93,209, 71, 13,123, 78, 65,235,158,252,
-218, 58, 36,157,250, 90,170,206,196, 80,136,127, 84,168,174, 84,196,231, 21, 57,119, 0, 15, 28,194,163,255, 10,214,254,173,147,
-228,190, 4,205,151, 45, 97,143,145, 19,227,122, 94,111,190, 67, 66,147, 13,157, 28, 31,128,176, 14,229, 74, 31, 41,104, 84, 66,
-198,208,156, 55, 47,252,230, 13,120,100,143,120,101, 68,115,212,113,122,127,193, 94,154,179,183,112, 44,104, 31,214,225,151,176,
- 89,253,178,119,239,234, 35, 73, 89, 42,227, 83,231, 63,222,176, 92,229,244,188,217,149,104,223,210, 79, 83,252,105, 14, 82, 17,
-130, 41,234, 51, 74,194,247,249,161,178,174,180,168,213,176,185, 80, 99, 35,219,156,178, 1, 19, 17,186, 12,173, 7, 97, 20, 39,
-174,225, 32, 18,139,173,112,113,179,119,249,125, 8,203,188,152, 22,101,210,199,162, 6, 43, 46,178, 8,170,166,224, 46,139,169,
-233, 3,154,145, 1, 86,114, 71,218,123,159,160,133, 90,206,178,121,250,126,218,166, 97,113,251,154,141,142, 83,231,171, 18, 75,
- 24, 11, 36, 66, 51, 38,174,159,178,216,208,249, 33,101,118, 76,119,180,107,246,174, 30, 30, 41, 50,132,178,104,233, 69, 86, 12,
- 92,115,113, 34, 98, 41, 74,110, 2,180, 11,255,250, 2,218,182,228,146,173, 95, 11, 1, 98,133,212, 99, 36, 7, 98,207,189,232,
- 83,213, 98, 99, 5,151,139,205, 52, 39, 35,224, 41, 3,252,198,232,139,153, 24, 2,245,120, 98,233,217,205,200, 39,131,145,140,
-249,170, 31,126,242,105,222,191,252, 38,177,110,184,126,245, 93,158,252,220,207, 48,158,172,209,205,230,158, 22,105, 69,205,104,
- 50,225,236,131, 15, 50, 90, 95,227,177,231,159, 39,251, 74,161, 20, 19, 65,171, 42, 63,126,237, 53,238,186,239, 62,158,251,133,
- 95,224,197,223,249,119, 38,252, 3,154,209,152,123,207, 63,196,120, 60,230,169,207,126,118, 56,163, 66, 12,204, 75,226,120,119,
-151, 55, 95,123,157,241,189,247,240,246,235,175,243,204, 3,231,248,246,239,254, 46,243,163, 35, 34, 66, 21, 45,227, 92, 36, 80,
-151, 66, 37,194,233,201, 4, 29,143,135,248,214,241,120,194,168,170, 89, 27,217,191, 27, 53, 35,154,170, 98, 99, 52,166, 26, 53,
-156,189,251, 44,179,235, 55,217,222,216, 96,255,221,247, 24,127,234,211,108, 78,214,169, 70, 35,182,238,186,139,119,174, 92,102,
-145, 18,127,246,202, 43,252,244, 95,250, 75, 28, 31, 31,161, 7, 7,236, 93,191,193, 3, 15, 95,224,189, 43,111,241,200,147, 79,
-242,221,255,244, 45, 10, 74, 61,106,216, 58,125,134,171,111,252, 8,128, 31,191,241, 3, 62,255,203,191, 98,209, 23,139, 5, 87,
- 47, 95,230,226,199, 30,231,205, 87, 94,225, 35, 79, 63,195, 55,255,237,191, 57, 49,154, 15, 39,158,120, 93,225,116,200, 9,171,
- 90,191,110, 12, 49, 64,170,135,181, 71, 47, 30,237,105, 70, 90, 18,149,246, 0, 8,135, 66,244, 54, 52,245, 70, 47,137,178, 80,
- 25,104, 95,209,127, 63, 9,236, 36,223,133, 23,243, 41,110, 87,246,185,107,241,148,163, 21, 24, 91,238,201, 93,253,125,181, 18,
-104, 83,121,128, 91,167, 58,160,233,219, 98, 92,147,152, 10,212,213,202,168,201,159,148,217,145,117,100, 97,211, 14,230,131, 5,
-210,167,179, 29, 36,168, 5, 61,213,152,113,241, 22,240, 59, 35,202,124,130, 60,251, 50,178,190, 3,229, 43,230, 97,103, 14,241,
- 89, 59, 40,203, 21,179,139,149, 49,116,155,200, 37,129, 47,102,120, 57, 25, 61,173, 89,129,180, 52,193, 70, 10, 85,128,195,206,
-170,155,232, 21, 80, 15,117,214,108,161, 30,141,123,252, 14, 91,116,209,218,186,160,117, 65, 88, 16,116,179, 70, 22,217,246,235,
- 43, 63, 64, 67,109,249,188, 58,250,232,228, 38,144,102,118,184,199, 53, 11,248, 88, 27,193,150, 26,160,166,213,101, 54,119,194,
- 46,159,245, 8, 19,243,152, 59,205, 99,153, 31, 95,123,124,168,152,149, 15,169, 96,228,127,118,173,134,115, 17, 30, 93,192,246,
-189,176,245,235, 80,159,243,253,112,178,139, 38,239,195,236,235,232, 78, 54,175,127, 40,104,167, 30,228,167,148,189, 68,187, 40,
-119, 92,232,186, 28, 50,137,220, 17, 51,200, 48, 46,151,168,195,221, 38, 39,242, 6,253, 13,218, 46,236,123, 61, 26,153,182,160,
-237,236,235, 45, 62,158,119,105,118,112, 43,138,136, 85,182,182, 28,119, 87, 66, 27, 93,124,233, 69,155, 65,155,205, 96,112,106,
-130,108,143, 12,243, 58,243, 50, 86, 58, 35, 48,116, 17,138, 41, 81,187,166,161, 85, 33,146,105, 54, 43,154,219,145,234,155, 45,
-241, 66, 38,110,213, 48, 73,240,192, 46, 92,216,133, 7,255, 57,172,127,221,194, 98, 38,191, 8,241,140,119,223,126,185,175,202,
-252,135,242,187,179,117, 81,124,108,153,184,134,216,220, 43,156, 50,209, 92,125, 31,242,208, 1,156,171,136,183, 27,214,102,137,
-179,154, 57,204,234,186, 21,165, 45,203,172, 55,165,143,209,237,147, 0,123,126, 80,111,116,183, 29,156,250, 8, 79,122,142,129,
- 8,145,228, 53,150,107, 75, 98, 52,176, 74,172,136,149, 80,185, 13,104,142,208,246,133,173,216,239,143, 67,178, 21, 93, 81,166,
- 40,157, 6,203, 74,215, 94,226,144,201,206,239,183, 37, 69,241,145,186, 37, 83, 23, 9,182, 25,113,112, 76, 31, 2, 51, 47, 74,
- 69, 96, 96,147, 21,122,124,153, 91,147,132, 76, 36,183,115,155,238, 52,107, 72, 61,182,139,245,120,215,212,247,245, 58,147, 83,
-247, 19,183,238, 35, 95,253, 30,229,248,144, 48,218,160, 84, 35, 52,181,212,107, 27,200,250, 22,237,238, 7,164,131,219,196, 30,
- 96, 83,213, 70,170, 83, 37,137, 89,167,162, 31,186,134,225,237, 87, 60, 38, 62, 52,149,127, 64, 99,101, 66,183, 98, 81,176,185,
-100,210,124, 74,187,152, 19, 84, 9,205, 4,169, 71, 72,157, 8, 85,141,132,202,134,110, 33, 24,128,167, 20,180,180,214, 71, 56,
-193, 71, 17,138,102, 82,215,145,146, 93,184,226,209,165,177,174,141,135,142,129,188,138,143,235, 65,184,255,226, 35, 20, 85, 30,
-122,226, 99,131,214,225,129, 75,143,243,206,107,223, 55,226,160,170,179,228, 27, 20,248,246,239,252,123, 74, 49,149,120,215,195,
-104,234,134,146, 77,176,182,121,247, 89, 22,139, 5,213,104, 68,151,179, 77, 89, 60, 13,242, 91,191,249,155, 75,209, 90, 16, 98,
- 12,142,183, 21,174,188,246, 42,159,254,249, 95, 96, 49,155,114,251,198, 13, 62,120,255, 93,155,112, 12, 34, 53, 43, 46,214, 23,
- 91,204,231,115,142,142,142,136, 49, 16, 99,101,221,122, 49,132,107,116,106, 98, 83, 87,182,206,173, 34, 77, 85,185,150, 68, 76,
-157,159, 51,109,201, 28,204,103,144, 90,166,243, 25, 59,251,123, 20, 85, 42,135, 42,145,109,137,242,214,107,175,114,241,169,167,
- 56, 62, 56,160, 30,141,184,113,237,218, 9,189,199, 29, 75,240,225, 40,251,225,127,253, 19, 62,247,229, 47, 51,155, 78, 57,216,
-185,205,209,222,222,114,156, 46, 63, 25,163,170, 3,138, 97,121, 70, 14,186,160,212,111, 91, 60,191,190,116,148, 54,163,234,193,
- 57,254,193,170, 62, 11,186, 56,169,169,117, 65,123,113,182,118,239,224,202,197, 8,174,136, 13, 11,167,157, 53, 53,123, 30, 98,
-118,166, 86,102, 89,140,184, 26,150,152,199,192, 74,152, 91, 30, 72,163, 52, 50,232, 34,136,186,172,186, 43,143,193,107,139, 9,
-166, 99, 87, 8,199,201,226, 79,163,154, 85,132, 98, 23, 56,251, 48, 81,116,109, 11,109, 54, 96,182,139,134,108,232,233,133, 34,
-251, 45, 52, 53, 90,101,184, 90,224,183, 18,188,211,192,207, 92, 65,238,251,167, 16,255, 6,228,243,214, 49, 5,239, 72,202,187,
-118,177,231,117,208, 45,228,217,128,238, 31, 88,234,219,186,227,100,139,239,211,215, 21,198,121, 57,114, 15, 43,182,173,122,165,
- 20, 27, 11,236,122,130, 87, 40,131,175, 87,181,216, 30, 55,138,117,210, 51,247, 99,213, 50,132,158, 80, 44, 7, 90,251, 64,149,
-164,118,129,233, 28,170, 51,208,156,131,230,199,134,138, 61,170, 60, 79,158, 97, 68, 34, 19, 87,222, 79,188,219,119,100, 34,125,
-208, 75, 21,236,117, 39,123, 24,192,255,252,168,130,123,106,120,116,129,156,217,130,237,191, 98,232, 83, 60,148,135,177,253,239,
-238, 7,112,252, 14,124, 48,182,105, 68,127, 58, 31, 36,216,107, 73,243, 76, 23,196, 56,227, 3,220, 35,252,185,236, 5,237,249,
-198,125, 74,104,210, 15,205, 62, 16,108,156, 38,101,102,130,166,186, 70,218, 14,105,154, 21,213,126, 24,234, 93,211,128,217,229,
- 98,223,131,176,236, 60, 75,180,247,215,154, 87,165, 71,166,166,229, 32, 89, 97,116,255, 22,108,174,193,222, 20, 22,115,116,102,
-246,162, 50,222,134,109,235,116, 75, 46, 44, 82,102, 33,133, 73,187,203,104,119, 78,220, 47, 84,167,107,194,164, 65,190, 95, 17,
-238,169,225,217, 57, 60,245, 6,114,246,159,192,228,119, 97,227,127,129,241,231, 44, 9,142,185,173,136,250, 75, 91,100,168,192,
-151,123,156,213, 75, 93, 44,238,119,125,211,145,193,155,200,227,251,196,107, 13,213, 97,199,233, 46,115,186,134, 15,186,101,184,
-224,176,233, 9, 22,211,154, 89,126, 72,193,222,123,170,142, 23, 30, 58,114, 67,103,230, 42,130,227, 64,251,102, 32, 98,234,117,
-154, 53, 68, 51, 81,109,106,212,166, 68,171, 66, 23,204,122, 36, 34,228, 80, 51,207,230, 69, 87,167,196,165,178, 76,145, 54,134,
-249,114, 63,172, 20, 15,141, 49,117, 62, 30, 0,212, 39, 93,149, 96,112,151, 84, 10,173, 71,196,214, 30, 36,131,132,161, 46,182,
-241,189,160,177, 70,101,196,162, 93, 80,230, 51, 98, 46,196,181, 45,104, 38,174, 10,159, 18,118,174, 81,159, 57,207,246, 71,127,
-150,246,120,135,249,254, 7, 38, 0, 28,109, 16,183,239,231,232,250, 27,164,131, 93,123, 7, 86,181, 77, 58,162, 19, 12,179,119,
-216, 18,237,162, 18,161, 83,233, 33,234, 75, 15,134, 7,233, 80, 10,217,213,225, 82, 85,142, 91, 53,159,126,145, 72, 46,201,242,
- 18, 22,115, 83, 14,171, 9, 30, 99, 48,129,220,224, 32, 50,111,128, 89,228,202,138,109,180,255, 79, 74,102,193,115,155, 86,151,
- 23,230, 74,113, 30,193,125, 23, 31,225,248, 96,159,151,126,239,255,179,221,127, 46,108,157, 57,205,199, 63,255, 5,222,251,225,
- 15,134, 85, 70,140,145,156, 50,183,223,123,159,139,207, 62,203,155, 47,127,151,128, 48,170, 71,172,157,218,102,239,246,109, 82,
-215,241,228,103, 63,203,238,205,155, 92,254,250,215,248,220, 95,254,203,236,253,246,111, 51, 59, 62, 38, 45, 90,110,190,123,141,
- 75,159,254, 52,175,127,231,191, 16,138, 82, 85, 53,219,103,239, 97,127,103, 23, 68, 56,222,223,167,109, 23,124,252,103,126,150,
-151,126,255, 27, 14, 36, 98,136,101,205, 69, 41,218, 17,218, 57,139,174,101,255,248,136, 16,123, 71, 1,132,227, 35,142,231,115,
-102, 34, 28,238,239,114,246,177, 75, 28,205,102,220, 58,216, 7,224,250,141, 27,212,119,159,225,250,155,151,121,252,177,143, 50,
-157,207,217, 63,180, 92,249,189,155, 55,121,240,194, 69,174, 94,126,147,243,151, 30,227,198,181,171, 67,223,124,245,205, 55,120,
-238, 11,159,231,241, 79,253, 20,151, 95,125,213,126,126,222,141, 31,222,222,225,193, 71, 31,229,218,229, 55, 57,127,233, 18,215,
-223,189, 54,156, 83,123,183,110,179,152,205,248,169,207,127,129,151,190,249,141,159,244,158,175, 68,172,246,239,143,176, 18,132,
- 51,140,233,139, 82, 74,187,100,202,101,203,101,248, 9, 85,158, 64,252,159,207,202,111,200, 0, 21,147,165,181,217, 59,234,165,
- 69,192,206,187,185,159,215,187, 25,142,146,189,128,181,101,250,231,240,162,131,255,157,190, 1, 18,159, 80, 39, 12, 96, 48,142,
-125, 67,234, 36,160,126,141,235,127,183,239, 40, 34,182,131,211,185, 45,248,165, 95,242, 47,178,169,161,103,157,121,113, 39,155,
-254,244,154, 93, 34,140,100,136, 17, 52, 52,107, 7, 55, 90,120,179, 69,119,199,112,230, 24, 57,253, 26,132, 79,128,222,239,115,
-222,202,198,157,204,236, 51,151, 13, 8, 99,228,108, 11,187,157, 47,123,197,170,155,211, 25,182, 55,145,250, 44, 92,191, 5, 31,
-184,244,107,102,228, 52,233,179,211, 43, 79,174,123,171, 93,114,242,143, 12,190,208, 11,219,164, 10,198,108,239,245, 3,213,138,
- 48,175,216, 44, 81, 42, 49,166,254,153,136, 60,211,192,246,207, 65,117, 47,200, 20,218,183,108,133,208, 9,210,133,229, 52,161,
- 10,200,164,130,237, 10, 78, 69,168, 93,100,213,181,230, 47,156,103, 15, 35, 95,138,188,169,131,253,112,238,169,225, 98, 65,206,
-173,193,246, 47,192,214,175,153,160,203,140,236,254,207, 3, 56,250,199,232,251, 87,225,213,218, 71, 50, 11,116,127, 65,185, 62,
-163, 59,232,232, 68, 78, 96, 74, 7,251,211, 10,237,108, 53,254, 80,124,228, 27, 60,130,146, 85, 27,199,202,155,190, 7,213, 72,
-233,119,148,193, 10,128,245, 45, 19,247,165,185,125,140,222,230, 35,158, 41, 95, 87, 78,157,115, 59, 91,175, 49,232,127, 30, 56,
- 77,174, 3,102,115,216,107, 97,154,208,173,109,116,115, 11, 93, 84,104, 25,153, 96,179, 82, 56, 94, 80, 22,135,148,249, 33,233,
-240,128,197,209, 49,157,118,148,144,208,160,148,131,142,178,200,232,108, 78,185,221,193, 85, 8,239,215, 48,202, 72,184, 9,229,
- 15, 32,127,207, 82,254,234,251,188, 96, 10, 12, 34, 14, 89, 29,199,223,145,242, 32,209,216,230,205, 12, 38,235,176, 89,193,232,
- 26,114, 53, 32,183, 11,210,218,131,191,147,127,114,176, 95, 92,145,219,111,241, 42,177, 78, 86, 9,253,118,156, 74,139, 89,161,
-212, 70,232, 18, 45,105, 45,231,228,148,174, 96,197, 84, 51, 70,169,168, 52, 49,198, 20,193, 93, 81, 19,198,185,120,135,170,161,
- 84,145, 46, 21,218,146,232, 52,120, 71, 30, 28, 60, 82, 67, 61, 54, 38,124, 78, 3,152, 70,135,253,162,119,235,110, 13,235, 11,
-141, 24, 2, 29,193,115,208, 25, 44,115,161,106,208,102, 76,142, 21, 89, 42, 24,109, 18,214,182,144,102, 66, 71,164, 45,133,174,
-109, 45,164,195, 5,115, 97,253, 52, 52, 91,166,234,143, 53,245,169,243,132,241,182,197,110,174,159, 69, 54,207,177, 56,248, 0,
-157,238, 33,213,200, 44,128,174,207,208, 1, 88,184, 98, 73,213, 62,216,100,185,142,147,170, 34,122,193,145,179,137,226,200, 9,
- 66, 69,219,117,180,211, 3,180,155,123, 62,183, 27, 53, 67,244,160, 20, 67,159,246, 96,151,148, 18,109,219,210, 45, 22,204,167,
-199,180,243, 25, 41, 27, 4,165,148, 52,124,191, 76,156,106,122,148, 80,213, 4,137, 75,218, 90, 8, 60,254,153,207,240,254, 59,
-239,176,119,253, 58, 82,148, 24, 43,186,197,130,139, 79, 61,195,225,206, 46,139,249,156,135,159,120,130, 43,223,123, 5, 68,185,
-241,246, 59,156,123,228, 35,124,244,211,159,230,252, 19, 79,112,254, 99, 31,163,107, 23,236,124,240, 1,247, 94,184,200,131,143,
- 61,102, 99,243,233, 49,169, 77, 60,254,252,243,188,243,250,235, 20, 85, 62,248,241, 91, 60,116,233, 18, 79,126,246,115, 92,124,
-234, 41, 62,242,236,179,148,212,113,251,250,141, 33,212,165,168,114,246,193, 7,248,211,255,244,159, 17,145,161,136,233,173,106,
- 34,194,104, 60,230, 99,159,126,158, 71,159,121,134, 75,159,252, 36, 31,253,196,115,220,119,225, 2,111,189,246, 26,179,227, 41,
- 63,245,197, 47,242,192, 71, 30,101,127,103,135,211,247,222,203,171,223,249, 14,165, 20,110,223,184,193, 39, 95,120,129, 11, 79,
- 60,206, 98, 58, 99,227,212, 54, 63,248,238,203,136, 8, 55,223,123,159,231, 94,120,129,199, 63,241, 28,163,241,152,151,190,241,
-117,243,236,139, 33,114, 55, 79,159,225,226, 19, 79,242,226,215,126,143,206, 21,247, 0, 55,223,123,143,231,126,246, 5, 30,123,
-238, 19, 52,163, 9,127,252,245,111,144,187,165, 80,170,148,196,125,231, 31,246, 75,125,229, 90,239,247,230,186, 44,212,205, 94,
- 43, 67,218, 27, 20,180, 24,208, 71,115, 70,115,177,233, 65, 89, 30,139,119,198,178,202,215,158, 8,238,100, 19, 55, 2,217, 27,
-114,236,211,229, 24,237,110, 42, 42, 28,103, 99,167,180,142, 54, 79,197,124,166,107, 22, 0, 70, 19, 44,152,160,241,255, 95, 71,
-131, 80,244,217, 40,243, 2, 71,157,208,212, 54,205,150,225, 11,179, 14, 95,188,147, 16,167,119, 54,149,176, 30,237,227,244, 71,
-122, 40, 86, 93, 88,225, 30, 28, 12, 48, 34,159, 61, 11,227, 13,194,205,219,132, 60,181,139,169, 75, 54,199,111, 92, 25, 62,183,
-110, 84,198, 53,124,124, 11,249, 53, 37, 92,216,130,240,119,161,108, 3, 87, 65,255, 12,202,159, 65,158,131,158,178,220,248, 42,
-163, 7,111,195, 27, 83,219,185,111, 70,184,119,134,172, 63, 15,213, 58,250,221,175,193, 15,124,113,121,208,162, 11, 65,198,254,
- 77,220,176,177,189,190, 62,183,113,205, 88, 41,215, 22,232, 97,235,223, 36,183, 78,172,185,229,236,184,179,241,117,113,108,172,
- 11,107, 66,172,137, 90, 33,207, 52,200,175,222, 5,231,254,161,121,162,211,251,176,247,127,195,193,107,176,187, 7, 55, 28,112,
-211, 57, 68,103,171,130,123, 35,108,175, 25, 11,159, 29,216,219, 71, 63, 72,182, 63,233,220,166,208, 22,175,101,196,138,128,243,
- 1,185,168,112,230, 83,112,234,111, 65,125,214, 5, 93, 35,255,175, 64,247, 13,184,254, 15,208,239,204,224,135, 53, 58,202,148,
-119, 15, 41,239, 77, 73,211,100, 30,227,158, 10,118, 7,140,161, 47, 78,195,157,118,110,207, 62, 14,189, 7, 90,203,137,183,108,
- 16,245,221,187,215, 96, 26,236,144, 10, 35, 27,185,111,157,182,143, 49, 59,132,118,134, 52,209,240,251,157,207,174,106, 43,242,
- 36,228, 37, 19,134, 98,107, 11, 95,230,155, 11, 67,209,206,225, 45, 97, 12,219,247, 16,238,218, 68, 70, 29,204, 14,225,248, 24,
-142,230,232,180,163,107, 23,204,115,199,188,133,105,142,164, 16,105,164, 48, 10,197, 38, 82,165, 16,179, 18, 90,165,150, 64,179,
-209, 80, 93, 92, 71, 46,141,224,241,130,220,159, 77, 80,119,215, 23, 97,243,239, 0,231,253,133,237,184,118,161,156, 4,224,175,
- 94,234, 18,252,207,101,224,107,176,243,127,193, 31, 28,192,127,152,211,190,115,204,124,119,198,149,185,114,173, 27,190, 84, 27,
-115,159, 48,215,136,193, 8,253,132, 80, 15, 85, 9,170,212,177, 2,137,116, 85, 67,201,234, 74,248, 68,168, 27, 15, 3, 9,238,
-193,174,153,148,150,237,104,153, 81,139, 46, 81,122, 68,103,168, 13,246, 34,193, 97, 29, 11,180, 88, 7, 79,221,216, 69, 93,212,
- 88,240, 69, 93,188, 85, 6,104,136, 12, 19, 28, 83,145, 23,191, 32,131,152,194, 62, 75,164,195, 70,196, 81, 19, 35,148,170, 54,
- 94,189, 18, 40,213,136,220, 76,204,187,156,230, 44,102,199,204,230, 51,139, 12,117, 1, 92, 61, 89,103,114,247, 67,212,247, 92,
-178, 61,243,108,207,244, 1,107,103,144,102, 29,169,215, 8,163, 45, 22,121,202,222,229, 63, 98,250,254, 27,148,174, 51, 17,112,
- 20, 82,202, 44,146,141,188,163,168,193, 85,130,251,178,251,176, 71,223,167, 7,255, 58, 59,195,167, 81,215, 13, 97,125,155,174,
-107,209,197,220, 79,105,219,165,211,140,237,176, 31, 82,238,252,231,158, 90, 52,183,110,227, 54, 73, 0, 0, 20,143, 73, 68, 65,
- 84,148, 34, 36, 45,228,118, 97, 3,168, 88,217, 88, 62,119,182,202,236, 35, 68, 9, 38,104,172,226,114, 18, 83, 12, 27,155,181,
- 80,138, 18, 84,137, 85, 53,248,157, 87, 5,172,154,242, 96, 9, 43,217,241,172, 49,184,118, 74, 45, 72,166,109, 17,132,132,105,
-105,144, 37,185,173,248,170,199, 92,192,209, 95, 87, 15,128,137,131, 13, 13,129,103, 95,248, 89, 14,119,118,121,227,229,151, 93,
-223,106,187,250,226, 83, 92, 99, 93,232,128, 1,238, 33, 49, 61, 96, 94, 7,130, 91, 30,158,152, 8,182,134,168, 27, 23,184, 41,
-143,125,226, 57,238, 58,247, 0,223,250,119,191,181,130, 34, 81,183,101,174,184,114,188,161, 69,101,128, 7,157,200,164, 24, 2,
-167,194, 74, 28,234,242,215,243, 63,255,115, 28,237,239,241,250, 75,127,220,211, 50, 78, 92,234, 22,152, 85, 78,116,229,246,204,
-151,165,239,183,156, 28,213, 7,249,240, 0, 87, 1,226,255,116,143,252, 70, 41, 75, 55, 84,235, 65,247,189,158,181,232, 50, 64,
-126, 0,130,233, 82, 5,223,219,207,154, 21, 1, 93, 29,100,240,165, 87, 97,136,170, 53,155,138,255,249, 53, 15,109,235, 59,243,
-232,175,200, 39,103, 78,181,147, 97,132,100,144, 26, 75,115,106,135, 41,183, 29,186,228, 14,230, 29, 58, 30, 19, 70, 19,100, 92,
-112,181,136,141, 27,212, 42,104,197,225, 34,109, 66,110, 39,104,182,144,251, 91,100,242, 18,196,159, 54, 92,167,140,150, 57,214,
-154, 65,215,160, 84,200,218,189, 80,239,218,152, 98, 35,192,166, 32,213, 11,168, 28,192,229, 55,224,182,197,107,234, 84,151,190,
-243, 70,150,222,240,219,254,141, 27,121,103, 56,205,195,190,161,135, 72, 12,251,136,185, 99, 59,251,216,214,108, 15, 68, 40, 53,
-242,164, 32, 79,220, 11,155,127,213, 45, 78,107, 14, 33,123, 7, 56,178,203, 57,123,183, 62, 10, 86,128,108, 41, 52,150,195, 13,
-115, 11,148, 57,102,176,109,245,168,114, 68, 60,121, 45,194,195, 9, 57,117, 31,156,250,235,208, 92,242, 11,221,125,214, 52,144,
-175,194,254, 63, 66,175,222,130, 63,173,161, 18,244,120,134, 94, 61, 38, 29,182, 6, 29,186,227, 66,239, 15,136, 62,136,236,206,
- 11, 29,196,196,111,245,200,197,129, 50,168,224,135,200,227,254,177,232,167, 73, 18, 9, 82, 76, 52, 50,217,128,122,205,108, 61,
- 17, 83,204, 7,223, 53,245,203, 42, 7,114,144,210, 82,124, 71,131, 6,235, 36,181, 4,114, 87, 76,103, 18, 27,186,102, 68, 75,
- 36, 29, 29, 34,239,189, 79,220,187,137,132, 57, 18, 19,228,130,116, 9,237, 90, 27,129, 22,161, 43,202,162,179,177,170,132,138,
- 80,217,116, 39, 99,153, 10, 11, 32, 31,117,132,253, 22,217, 83,228, 70, 5,135,149, 9, 61,229,135,150, 2, 23,239, 7, 57,229,
- 93,123,239, 67,253,144, 8, 8,193, 83,104, 4,248, 17,116, 95, 51,102, 68,125, 8, 83,129, 27, 25, 89,100,154, 82, 56, 54,150,
-211, 16, 71,176, 90, 35,244, 65, 38, 1, 37,107,191,223, 86,167,136,171,139,178,106,138, 56,227, 59, 54, 84,163, 53, 74,172,124,
-215, 25,168, 66, 69, 29, 3,212, 53,139,148,200,169, 91, 78, 6,197, 72,101, 37, 4,114,168, 76, 65,174,106, 35,228, 80, 65, 51,
-182, 11,189, 51, 31,190,198,106, 96,193,179,146,117,173, 3,188, 37,250, 22, 44, 24, 18,194,187, 89,234, 6,173,199,150, 92,216,
-152, 29, 45, 52, 35,114,181, 70,231, 72, 92, 45,230,175, 78, 57, 15,212,182, 28, 43, 82,206, 44,142,118, 72,135, 55,200,221,212,
-215, 1,141,189,230,233, 1, 90, 18,117, 51,102,114,234, 33,214,238,255, 24,163,237,123,104,182,238,162,222, 58, 99,144,152, 24,
- 73, 18,141,111,158, 18,161,182,253, 81,155, 50,201, 67, 84,204,198,102, 93, 95,246,139,169,138,129, 48, 94, 3,177,215, 64,207,
- 50,175, 71, 84,155,167,237,235, 8,113, 24,207,171, 90,166,121,106,103,134,110,142, 21,197, 45,108, 18, 42, 19, 36, 74, 48,255,
-122, 8, 67, 76,170, 41,194, 77, 13,158, 82,103,162,186,254, 76,207,217,190,197,209,177,182,170, 43,113,200,206,114, 24,152, 1,
-118,134,246,187,237, 97,134, 52, 68, 40,171,107,133, 60,226,214, 71, 45, 85, 8,196, 24,169,171,134,170,170,137, 49,154,234, 60,
- 70,215,189, 8,147,141,117,126,230, 87,126,133,170,174,120,229, 15,255, 16, 41,101,136, 96,101, 69, 21,190,234, 55, 31, 94,171,
- 95, 76, 58, 92,236,197,255,185, 12, 61,137, 34,220,251,240, 69, 62,251,229, 95,226,177, 79,124,130,245,237,109,190,243,251, 95,
-167,157,205,221,147,174, 39,102, 98,220, 65, 6, 63,113,125,202, 79, 70,172,157, 80,171, 3,147,245, 9,191,248,149,175, 80,215,
- 53,223,253,214, 55, 61,120,102,229,163, 13,225, 50, 38, 90, 45,165,184, 93, 49, 19,244, 36,251, 93,244,142,215, 35, 39,197,118,
- 43, 71, 41, 85,151, 78, 98,236,122,126,118,111,182, 81,215,120,173, 69,165, 66,152, 88, 68, 55,173, 66, 85,150,152,240,232,123,
-244,210, 87, 26,209, 84,183,197, 73,155, 82,150,128,179,222,127, 87,245,182,181,232,184,144,180, 92, 37,247,138,191,164, 98, 66,
- 9, 79,240,201, 78,154, 66,133, 88,148,177,100,154, 32,196,197, 20,185,117, 11,125,244, 33,202,214, 25,194,219, 59, 80,101,251,
- 36,211, 76, 41, 9,245,240,134,144,149, 48, 93, 32, 95,223, 65, 55,238,129, 47, 28, 32,155,127, 31,194, 63,128,112,193, 20, 9,
-113,102,177,151,150,254, 97,130,183,187,158,131,197, 31,155, 80, 45,110,219,158, 91,111,218, 40, 27, 93,222, 96,125, 85,149, 87,
-102,157, 99, 96, 38,118,153,175, 87, 70,201,155, 39, 47,187, 92, 4,167, 5,105, 34, 26,141, 90,102,251,119, 29, 86, 20,140, 3,
-220, 93, 96,116,214,132, 83,106,144, 12,234,103, 97,237, 53, 88,236,193,214, 14,180,161,143, 32, 50,210, 79,179,102, 59,240,176,
- 6,229, 86,239, 59, 90,122, 7,219,108, 55,236, 72, 96, 43,194,217,130,108, 52,176,246,180,167,144,173, 42,179, 71,198,206,223,
-255,167,176,243, 22,252,176,178,172,251, 73, 66,119, 22,164,221,150, 69, 22, 22,142, 37, 45,189,170, 61, 47, 7, 79,154, 79, 18,
-147,134,177,124, 83, 27,212, 35,119, 4, 77, 72,231,127, 34,248, 28, 73,117,233, 53, 95,189,226,138, 26,132, 40,156,177, 13, 73,
-231, 3,255, 92,160, 88,199,130, 84,198,131,239,171, 10, 26, 84, 91, 83,205,106,182,148,173,106,141, 44, 53,121,148, 41,243, 57,
-105, 49,165,235, 22,104,155, 16, 45, 36, 85,210,190, 50,234, 10,213,182,225,114,117,180, 70,216, 89,163,242, 31,255,184, 4,242,
-162,208,118,137, 46, 4, 66,105,169, 82,242,247,117,160, 4,165, 27, 5,186, 89,102,237,234, 1,163,157, 57,213,187, 19,226,187,
- 99,228, 17,129, 91,151,225,252,255, 6, 27, 79,195,250,223,134,209,199, 65, 55,176, 42,236, 14, 58,133,170, 23, 89, 11, 96, 27,
-218, 11, 48, 63,182, 81,252,227,251,200, 59, 19,226,113,102,179, 43, 60,144, 50,135,153,161, 32, 22,129,174,232, 18,144, 24, 92,
-197,175,106, 26,115, 9, 67,170,116, 6,130, 11, 85,173,129,243, 4,171,156, 76,208, 85, 27,149, 44,136,146,170,134,188,104, 79,
-226, 56, 52,147,169, 40,120,184, 8,110,195,241,189,179, 21,183, 35, 7,195,231, 19,159,183,191,228, 76,104,214,239,163,173, 96,
- 42,106,130,188, 92,212,108,141,201, 68, 97,165,170, 81, 34, 85,176,174, 56,229,153, 51,231, 11,162,201,212,229, 65,236,245,100,
-179,183, 81,236,235, 91,236,188,143,222,122,151,166, 25, 51,185,231, 97,226,221, 23,236,210,235,166,148,116, 68, 61, 63, 96,180,
-253, 0,167, 31,120, 10, 46,126,202, 72,155,199, 59,164,233,174,101,122, 75,225,224,237,239,113,240,250, 31, 80,186,185,125,189,
-214,222,158, 8, 60,200, 67, 46,196,200, 58,249, 60,243,247,113, 70,170, 17,113,188, 14, 33, 14, 9,134,169,107,237,185,241,221,
-106, 46,197,207,201,228,243, 85,179,253,169,154, 69,173,228,100, 53,184, 66, 8, 53, 69,194,176,186,210, 82,252,251, 40,148,148,
- 41, 41, 13, 16,155,226, 9,112, 20, 87,218, 59, 6, 68, 42,139,173, 84,205,195,179, 91, 74,182,199,169, 40, 33, 88,170, 27,197,
- 86, 12,217, 9,108,125, 7, 29,253,243, 13,187,254, 21,112,145, 96, 78,128,249,241, 49,223,252,215,255,122, 73, 41,140,113,165,
-192,232, 19,253,138, 39,179,249,191,115,244,107, 63, 9, 24,136,113,220,193, 96,247, 49,224, 7,239,188,205,187, 63,126,203,240,
-180,168,137,225, 60,183,160,172, 38,175,200,114, 3,234, 42,174,225,212, 9,238,250,232,215, 46,114,167,151, 71,140,123, 49, 63,
- 62,230,171,255,242, 95,220,153, 67,228,103,142, 39, 82,149,178,178, 79,255,201,174, 91, 62, 36,141, 90, 62,164,182, 88,157, 26,
-196, 95, 59, 35,191,177,114, 23, 81, 84, 92, 76,179,252, 48, 69,122,138,233, 82,189, 46,158, 83, 82,123,167, 93,133, 59,232,164,
- 14,248, 80, 21,162, 95,222,115,160, 51,232,243, 32, 28, 23, 31,129,170,202,224, 93,199,181, 91, 61,220,102,136,253,246,138, 80,
- 4,114, 49,241, 85,231,189, 91, 29,148,208, 38,100,123,140,158,218,132,133, 32, 83, 27, 47,167, 89,161, 45, 74, 30, 2,125,149,
-208, 58, 77,231,106, 7,247,157, 70,206,237, 64,248,190, 7,193,172,219, 65, 41,135,160, 9,180,241,113,224, 3, 48,234,160,188,
- 13,163,187, 44, 18,179,251, 51,248,254, 45,243,156, 39,139, 79,181,149,168,152, 0,174, 14, 48, 9, 72,171,182,107,207,138,172,
-245,249,237,101,105,143, 11,190,243,141, 1, 90, 69, 23,101,217, 70,169, 18,186, 72,220, 30,193,103, 4,121,240,203,208,124,198,
- 15,243,108, 1, 31, 36,104,223, 48,171, 83,206,144, 42,216,176,179,158,234,148,239,211, 11,148, 35, 88,204,236,116,239, 60,118,
-117,225, 42,248,141, 10, 78, 87,112,182, 67, 54,239,134,237, 95,134,230,209, 21,239,180,235, 14,142,254, 61,236,255, 14,122, 5,
-248, 81,132, 81, 70,119,231,148,183,166,204,167,137,105, 37,203,159,151,172, 20,140, 75,178,204,201,203, 92, 34, 52,181,189, 23,
-218,185,141,199, 87, 43, 96, 31,201, 15,221,252, 48,167,247,199, 45, 23, 83,186,111,157,177,215,167, 45, 34,174,202, 76,221,160,
-150,215,226, 57,226,145, 65, 16,148, 67, 69, 38,208,117,129,182, 8,139, 54,209,150,138, 69, 28,145,230, 29,186,232,108,215, 92,
-143,161, 94, 35,175,175, 3, 19, 36,172,193,230,105,244,244, 22,170,181, 69,238,142, 54,208,209,216,136, 97,237,140, 46,181, 14,
- 45,233,195, 78,150, 99,188,206, 81, 10,165,205,232,222, 2,217,203,200, 13, 8,183, 26, 91,135,196,235,208,125,219,116, 11,245,
- 37,115, 57, 12,155, 91, 61, 57,250, 80, 32, 31,128,174,195,252, 6,164, 41, 84,135,246,189,154, 67, 56, 86, 38,179, 66, 46,194,
-129,211,177,196,159,231,158,221,222, 63,119,253, 92, 81,252,251,171, 30, 4,161, 37, 19, 37,208,169, 69,157,230,212,145,125,132,
-155, 85, 77, 36, 86, 50,165, 30, 89, 49, 95,140,245, 93,213, 13,161, 30, 91, 65,147,179, 75, 68, 26, 67,120,106,191, 47, 78,246,
-214, 12,209,108,112,197,188,216,214,228,219,251, 67, 98,133,198, 6,141, 53, 37, 68, 47, 24,151,196,107, 27,231, 6,183,197, 25,
-115, 92,157,168, 86,210,130,182, 93,176,104, 59, 82,215, 13,103, 93,231, 84,180, 92,242,137,227,209,104,190,166,234,158, 30,239,
-113,188,251, 62,237,241, 46,121, 49, 37,205, 15,232, 22, 7,148,197, 1,165, 77, 4, 10,213,218, 54,213,218, 22,218, 76, 88,164,
-150,195,119, 94,165,189,125,205, 18,189,220,150,167, 43,151,141,122,152,141,132,218, 46,170,236,225, 38, 10, 18, 26,194,100,157,
-148,149,118,122, 76,110, 91,114,106,173,160,141,145,210, 45,204, 99,175,253,152,214,169,127, 69, 45,246,115,177, 48, 22,121,234,
-134,175, 45, 97,244,190, 16,140,113, 79, 63,133,237, 89,232,197,155, 42,199,169, 90,181, 96,111,138, 80,138, 9, 81, 67, 88, 42,
- 58,180, 12,123, 95,213,158, 15,178, 18, 19, 26,130,107, 54,204, 47, 31,162, 79, 86, 92, 32,105, 95,235,146, 22,104,218,190, 66,
- 46,217, 63,127, 89, 82,215,202,178,251, 46, 62,234, 79, 57,155, 13,210, 39, 16, 69,203,201,203,109, 40,254,151,180,194, 62,210,
-117, 16, 80, 34, 38,200,212, 37,222, 82, 87,135, 96,194,159,219, 26,175,102, 22,220,121,177,202, 48, 75, 60,121, 9,171, 23, 57,
- 57,123,131,233,209,181,171,221,182,252, 57, 23,251,234, 72, 63,172, 20, 8,114, 39,184,171,183,136, 39,189, 67,127,227,173,114,
-118,133,169,122,188,118, 39, 66, 22,165,113,147, 63,197, 47,247,136, 43, 84,197, 85,155, 12,123, 16, 16,114,112,223,186,199,109,
- 15,239, 23,150,222, 89,252,135, 85,178,244,233,167,148, 96,132,179, 94,204, 45, 62,205, 54,152,196, 73, 42, 89, 31,215,185, 22,
- 10,241,189, 91,150,115, 50,222, 64,171, 9,180,153, 84, 23,102,179, 98,163,216, 74,204,150, 92, 67,140, 5, 61, 90,192,191,217,
- 71, 31,186, 11,121,248, 77,232,254, 25,212,127,199,160, 52,122, 8,114, 21,149,100,157,110,190, 5,213, 83,176,113,205, 58, 3,
-237,108,244, 63,235,145,163, 50, 92,194,140,117,169, 54, 92,175,160, 46, 72, 93,108, 93, 48, 23,194,134, 80,180, 50,178, 92,244,
- 93,166, 4,100,108,195, 1, 57, 84, 74,107, 99,248, 16, 60, 93,109, 29,228,116,128,250,169, 21, 31,179,223,152,245, 5, 27,177,
- 87,199, 48,105,173,192, 88,199,242,214,171, 45, 8, 99,175,158,202,242, 93, 91, 28,124,211, 99,185, 54, 35,156, 74,200,198, 24,
- 38, 15, 65,243,209,147,254,233, 48,134,242, 30,204,127, 27, 14, 18,114,121,100,157, 65,238, 40,239,206,232, 14, 59,142,235, 48,
-144, 7,195,138,223,242,206,234,178, 63, 0, 52,212, 48, 89, 71, 84, 41,243,163,161,122, 47, 62,153, 17,239,110,150,251,196, 21,
-193,167,167,179,105, 12,150,161, 45,238,251, 72,153,178,232, 92,116, 98,193, 27, 84,160,173, 65, 98,148,198,212,192, 57,163, 33,
-144, 52,210,230,204, 98,158,205,227,158,167,134, 35,158,108,194,246, 61,200,120,203,246, 94, 85,160,180, 29,139,212, 82, 4,154,
-157, 41,213,193, 28, 25, 67,104, 2, 85,183, 32, 79,143,168,167,199,196,156,233,146, 37, 27,106, 48, 28,107,232,148,170, 95, 51,
- 33,148, 90, 56,208,194, 34, 41,107,187, 83,198,199, 45,205,126,162, 62, 90,135,182,130, 75,183,161,252, 38,164,107,112,234,127,
-135,234, 60,203,242,120,101, 80,216, 43,172,217,132,250, 60, 76,119,160,190, 9,247, 76, 9, 15,140, 8,199, 74,245, 72,228,163,
- 63,110, 57,124,187,227,182, 31, 74,181,152, 54,134, 30,215,186, 18, 23, 53,236,238,176,233,152,148, 66,206, 45,226,113,162,214,
-176, 25, 87,190,170,215, 41,117, 77, 14,134, 72,149,201, 6, 50, 50,123, 83,234,195, 90,202, 2, 41, 74, 53, 26, 51,143, 21,121,
-145,125,100,107, 84,181, 72,182, 68, 50, 44,228,163,223,153,139, 11,134, 76,197, 30,220,239,157, 78,112,244,251,189,238,208,145,
-133,202,172,110,209,146,219, 52,103, 83,224,135, 72,215,119,177, 57,123, 66,157, 34, 33,218, 26,167,105, 28,153, 57, 67, 36, 82,
- 98,197,124,122, 64, 59, 63,182, 67,245,246,117,234,102,196,120,227, 20,245,218,186, 89,204, 98,133,134,138,249,236,136,195,253,
- 29,186,195,219, 72,106,105,234,106, 56,248,251, 17,116, 63,186, 78, 30, 16,130,191,182,130, 9,224, 66,109, 43,141,110, 62,179,
-167, 46,171,165,186, 53, 35,194,168, 38, 39, 79, 15, 43,198, 43, 86, 31,177, 11,129,210, 45, 12, 22, 20, 2,129, 72, 81,191,240,
-130,217, 72, 11,153,180, 48, 80, 72,239,147,215, 21,252,168, 1,136, 12, 31, 44,190, 50, 34,103,219,209,135,224,151,231, 10, 26,
-216,135, 94, 41,217,247, 56,136, 5, 1,101,177, 68,189, 12, 6,202, 81, 23, 73,245,190,121,197,109,103, 1, 41, 66,161,144,197,
-236,124, 37, 89, 78, 64, 22, 49, 12,110, 63,154,246, 19,163,167, 71, 87,206,224,207,217, 47, 21,231,172,232,202, 9, 51,116,251,
-125, 80,140,120,234,166,163,145,139, 90,250, 30,197, 3,118,134,221, 32, 39, 46,119, 86, 39,199,171,207,133,234, 9,152,187,172,
-172, 3,150,151,188, 23, 28, 89, 7,209,164, 14,207,127,127,225,203,106,146,203,135, 95,232, 39, 38,154, 39,163, 86,249,144,110,
-190, 18,150, 88,115, 5,162,119,180,125,135,149,220,157, 85, 84,153,187, 21, 35,246, 49,156, 43, 1,102,161,156,172, 88, 50, 56,
-245,201, 35,234,130, 12, 49,135,165, 8,217, 65,104, 41,247, 1, 50, 66,206,253,110,207, 71, 30,193, 35,191,157,203,210,174,252,
- 94,171, 38,130,239,173,112,227,190, 16,208, 5,178,183, 71,184, 59,192,233,177,229, 49,239,103, 22, 36, 42, 85,195, 91, 74, 48,
-241,155, 22,164, 42,112,245,136,242,255,212,196,191,117, 14,214,126, 31,218, 39,160,254,239,128,123,209,176,239,249,215, 78,133,
-209, 5,132,207, 66,249, 19, 68, 94, 71,231, 71, 62,238, 54,117,106,207,106,151,226, 34,133,224,227, 12,140,246, 38,168,143,209,
- 2,225,116,176,177,111,242, 78, 7,207,173,245,232,178, 92,220,209,157, 10,210, 4, 56, 19, 96,173,177,137,193,157,144,146,224,
-246,182,120, 3, 70,199,214,161, 78,214, 32,222,109, 40, 87,169,122,138,143, 67,110, 86, 60,132,184,200, 97, 91,145, 83, 1,154,
-187, 96,252,156, 5,136,244, 69,128, 7,171, 16, 94,130,173, 15,224,242,196, 26,248,168,148,119,231,228,155, 51,142,138, 50,147,
- 64,209, 64, 20, 99, 83, 87,206, 30, 64, 7,186,171, 63,128,246,160,105,255,186,114,242, 17,154, 12, 35,225,101, 66,156,117,168,
- 69,252,101,228, 21,255,122,191,112,106,156,128,150, 11, 26, 4, 73, 29, 37,116,214, 97,228, 76,153,183,100, 21, 91,231,164,150,
- 92, 53, 38,200, 91, 36,148,108,151, 69,168,208, 18,173, 88,235, 90, 27, 76,164,117,239,246, 35,154, 10,218,182, 16,133,197,236,
-136,210,205,105,214, 55,168, 51, 4,233,136, 58,165, 74, 51, 66, 84,234, 98, 19,166,226,180, 68, 77,182,159, 46, 98,212, 51,196,
- 38, 83, 37, 11,243,168,116, 33,144,187, 12,183,142, 8,149, 18,159, 62, 5,111,143, 96,122, 12,247,253, 33,164, 93, 56,243, 55,
-161,126,220,160, 67,204, 86,142, 28,119, 36,200, 1, 52,103, 96,116, 14,202,109,228,204, 85, 19, 73, 86, 35,184, 84, 51,254,127,
- 11,231,175,117, 28,182,194,169,173,200,250,134,240,246,245,196,113, 42,196,149, 89, 99,208,129, 91, 73,150,229,161, 26, 17, 74,
-172,109, 50, 82, 7,170, 56, 34,132, 10, 25, 79,172, 72, 41,153, 60,157, 65,233,108,215, 94, 58,178, 66, 83, 69, 66, 53, 34,212,
- 35,114,206, 70, 6,172, 70,230, 17, 87, 99,251, 84,165,163, 42, 86, 52, 8,193,133,117, 14,157, 9, 66,171, 22,127, 73,172, 16,
-137, 68,205,132, 98,151, 70, 17,177,132, 53,239, 38,135,208,152, 24, 40,146,172, 83, 11,193, 20,254,173,141,223,251,130, 79,170,
- 96,187,249, 30,255,170, 74,116,140,107, 81, 69,114,231,163, 99,243,130, 47,186, 57,233,224, 22,245,254,117, 82,234, 92,100, 86,
- 28,184,229, 86,186,186,182, 66, 72,151,125,146,138, 69, 2, 19,107, 75, 99, 19,147, 39, 22,130,249,218, 39, 19,138, 6,186,249,
- 20, 41, 9,234,145, 63,162, 54, 34,238,186,133,235,153,116,105, 79,114,190,123, 94, 76, 13,149,234,168,227, 32,134, 7,206, 33,
- 90,177,163,105,165,243,237, 63, 70, 25, 86, 44, 5, 99,185, 15,200, 81, 53, 49, 27, 85, 88, 78, 24, 68,150,184,229, 40, 22,203,
- 91,242,112,111,100, 31,147,103,247,164,211, 39, 46, 14, 86,186, 94, 72,230, 22, 69,207, 15, 89,105,148, 79, 76,135,251,177,123,
-242, 98,163,191, 44, 69,130,133,249,212,129, 42, 42,165, 24,195, 68,125,242, 80,252,230,151, 21,229,109, 20, 59,107, 66, 8, 30,
- 52,150,141,139,191,210, 41,235,170, 79,124,229,198,236,179,173,202,170, 13, 93,197,166, 84,114,114, 19,102, 76, 4, 91,211, 81,
-124, 93,184,114,201,243, 19,161, 46, 44,167,120,119, 52, 60,171,191,130,124,152,165,247, 67,215,250,214,169, 31, 55, 99,143,171,
-243, 75,156,147, 6,122, 17, 12,168,224,202,211, 62, 15, 35, 4, 60,159,246,164,149,173, 31, 17,228,202, 15,135, 21, 1,156, 6,
-232,212,254,206, 34,152, 15,126, 53,124,171, 13,134,151,173,221, 13, 86,130,208, 58,192,170, 79, 21, 13, 46, 69, 76, 89,152,149,
- 62,213, 73,152, 71, 24,141,204,110, 86,102, 25,142,167,118,209, 54, 99,142, 42, 56,168,231,108,199, 68,138,197,194, 43,114,182,
- 73, 67, 21,140,137,254,189, 5,242, 85, 8, 63,127, 6,194,255, 9,245, 8,229,148,197,110,102, 44,166, 85, 1,221, 1, 61,131,
-148,123,160, 92, 69,247, 61, 18,117,226,106,233, 54,192,196, 30, 88,201, 1, 98, 99, 29,124, 29, 96, 35,217,174,156,226,104, 62,
- 65,199, 54, 62,211,206, 61,127,199, 70,246, 73, 90,152, 42,132,160,140,163, 81,160,170, 51, 35,132, 13,131,161,228,206,161, 37,
- 44,243,174,203, 5,208,183,109,252, 94, 31,129,222, 13,229, 44,228, 26,178,115,192, 91,160,173, 44, 43, 92,176,203,188, 17, 24,
-215,176, 85,144,250, 12,132, 75, 32, 79, 56,236,127,230,212,131, 9,112, 13,184, 2,225, 65,152, 30,193,180, 51,108,254,187,133,
- 89, 27,217, 13, 21,173,135, 6, 84, 10, 18, 77,225, 91,245,218, 12, 89, 42, 55, 75,191, 43, 15,181, 29,242,173,239,240,134, 14,
-205,246,116, 34, 86, 56,200,170, 58,190,146,165, 13, 78, 21, 73, 9,105, 54,109,140, 15, 38, 8, 28,103, 72,115,138, 38, 83, 51,
-231,134, 86,160, 75,138,230,128, 38, 19,205, 5, 41, 86, 68, 4,123, 42, 83,172,209, 81,131,106, 68,170, 9, 18,199, 72,137,132,
-186,166,228, 22,169,106, 66,108, 16,153,210,141, 55, 56,102,196,248,104,202, 72, 23,132, 74, 41,163, 26,109, 43, 19,126, 5, 60,
-198,177,191,122,237, 98,143, 81,135, 17, 83, 9,234,227,111, 37, 53,208,102,101,235,160,208,124,107, 1,177,134,251, 38,240,241,
- 22, 46,188, 2, 71,127, 15,238,254, 31, 97,244, 5, 23,200,245,130,152, 9,148,202,222, 19,237, 28,242, 6,232, 57,136,187,112,
-166,131,131, 0,223, 92,160,135, 35, 54,239, 19,206,239, 22,170,179, 53,177,142,108,205, 91,230,199, 38, 26, 12, 94,108,228,232,
-157,156,101,225, 26,180,135,128,214, 53, 42, 53, 49,103,234,209, 58, 57, 86, 6,173,242,100, 52, 45,157,129,167, 42,161,202, 32,
-213,136,166, 25, 33,227, 53, 74,168, 77,156,149,210, 32,172, 11,193,170,246,162, 62,146,212, 66, 83, 5,106,137,110,135, 19,239,
- 2,173,174, 75, 89,145,186, 49, 21,179, 91,238,106,181,168,214,164, 86,241,169, 55, 36,189,163,102, 92, 85,148, 24, 72,177,177,
-140,237,197,145,169,235,251, 17,188, 8, 41,249,197,225,107, 6, 81,235, 80, 67, 85, 67, 12, 84,185, 16,163,216,123, 32, 84, 20,
- 45,132,212, 50, 86,163,227,117, 41, 83,123,176,199,137, 5,170, 10,181, 79, 60,113,156, 39,161, 50, 77, 64,172,236,140, 81,140,
- 24, 87,215,104,206,228,182,163,116,115,155, 86,169, 35,124, 83, 50, 59, 90, 93, 13,153, 8, 37, 23,218,156,144,197,140, 74,198,
- 52,205,216,214, 17,210, 43,215,109,141, 58, 68,145,170, 12, 98,189,129,209,224, 19, 48, 45,106,130,212,176,220, 17, 7, 49, 55,
- 78,201,166,235,137,209,255,174,150,225,239, 20, 45, 52,120,170,157,247,187, 37, 91,145, 19,156,126, 22,252,153,214,254,107,241,
- 75,183,191, 4,203, 80,248, 26, 2,119,200, 84, 17,251, 59,157, 22, 74,178,113,181,222, 57, 98,247, 88,212, 97, 53,224,171, 89,
-237, 87, 40,234,119,146,219,225,138, 64,151, 11, 33,117, 52,121,252,231,129, 50,126,162, 61,150, 21,206, 91, 24,174,127, 25, 46,
-255,129,232,231,106,117,209, 1,200,177,154,139, 53, 12,213,238,188,140,131, 79, 10,250,187, 83, 79,216,207,181,223, 24, 15,161,
-113,194, 10, 6, 91, 87, 9, 31,246,235,191, 1, 3, 19, 63,235,194,153, 66, 72, 0, 0, 0, 0, 73, 69, 78, 68,174, 66, 96,130,
+int datatoc_splash_png_size = 229594;
+char datatoc_splash_png[] = {
+137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 1,245, 0, 0, 1, 26, 8, 6,
+ 0, 0, 0, 8, 90,206, 70, 0, 0, 10, 79,105, 67, 67, 80, 80,104,111,116,111,115,104,111,112, 32, 73, 67, 67, 32,112,114,111,
+102,105,108,101, 0, 0,120,218,157, 83,103, 84, 83,233, 22, 61,247,222,244, 66, 75,136,128,148, 75,111, 82, 21, 8, 32, 82, 66,
+139,128, 20,145, 38, 42, 33, 9, 16, 74,136, 33,161,217, 21, 81,193, 17, 69, 69, 4, 27,200,160,136, 3,142,142,128,140, 21, 81,
+ 44, 12,138, 10,216, 7,228, 33,162,142,131,163,136,138,202,251,225,123,163,107,214,188,247,230,205,254,181,215, 62,231,172,243,
+157,179,207, 7,192, 8, 12,150, 72, 51, 81, 53,128, 12,169, 66, 30, 17,224,131,199,196,198,225,228, 46, 64,129, 10, 36,112, 0,
+ 16, 8,179,100, 33,115,253, 35, 1, 0,248,126, 60, 60, 43, 34,192, 7,190, 0, 1,120,211, 11, 8, 0,192, 77,155,192, 48, 28,
+135,255, 15,234, 66,153, 92, 1,128,132, 1,192,116,145, 56, 75, 8,128, 20, 0, 64,122,142, 66,166, 0, 64, 70, 1,128,157,152,
+ 38, 83, 0,160, 4, 0, 96,203, 99, 98,227, 0, 80, 45, 0, 96, 39,127,230,211, 0,128,157,248,153,123, 1, 0, 91,148, 33, 21,
+ 1,160,145, 0, 32, 19,101,136, 68, 0,104, 59, 0,172,207, 86,138, 69, 0, 88, 48, 0, 20,102, 75,196, 57, 0,216, 45, 0, 48,
+ 73, 87,102, 72, 0,176,183, 0,192,206, 16, 11,178, 0, 8, 12, 0, 48, 81,136,133, 41, 0, 4,123, 0, 96,200, 35, 35,120, 0,
+132,153, 0, 20, 70,242, 87, 60,241, 43,174, 16,231, 42, 0, 0,120,153,178, 60,185, 36, 57, 69,129, 91, 8, 45,113, 7, 87, 87,
+ 46, 30, 40,206, 73, 23, 43, 20, 54, 97, 2, 97,154, 64, 46,194,121,153, 25, 50,129, 52, 15,224,243,204, 0, 0,160,145, 21, 17,
+224,131,243,253,120,206, 14,174,206,206, 54,142,182, 14, 95, 45,234,191, 6,255, 34, 98, 98,227,254,229,207,171,112, 64, 0, 0,
+225,116,126,209,254, 44, 47,179, 26,128, 59, 6,128,109,254,162, 37,238, 4,104, 94, 11,160,117,247,139,102,178, 15, 64,181, 0,
+160,233,218, 87,243,112,248,126, 60, 60, 69,161,144,185,217,217,229,228,228,216, 74,196, 66, 91, 97,202, 87,125,254,103,194, 95,
+192, 87,253,108,249,126, 60,252,247,245,224,190,226, 36,129, 50, 93,129, 71, 4,248,224,194,204,244, 76,165, 28,207,146, 9,132,
+ 98,220,230,143, 71,252,183, 11,255,252, 29,211, 34,196, 73, 98,185, 88, 42, 20,227, 81, 18,113,142, 68,154,140,243, 50,165, 34,
+137, 66,146, 41,197, 37,210,255,100,226,223, 44,251, 3, 62,223, 53, 0,176,106, 62, 1,123,145, 45,168, 93, 99, 3,246, 75, 39,
+ 16, 88,116,192,226,247, 0, 0,242,187,111,193,212, 40, 8, 3,128,104,131,225,207,119,255,239, 63,253, 71,160, 37, 0,128,102,
+ 73,146,113, 0, 0, 94, 68, 36, 46, 84,202,179, 63,199, 8, 0, 0, 68,160,129, 42,176, 65, 27,244,193, 24, 44,192, 6, 28,193,
+ 5,220,193, 11,252, 96, 54,132, 66, 36,196,194, 66, 16, 66, 10,100,128, 28,114, 96, 41,172,130, 66, 40,134,205,176, 29, 42, 96,
+ 47,212, 64, 29, 52,192, 81,104,134,147,112, 14, 46,194, 85,184, 14, 61,112, 15,250, 97, 8,158,193, 40,188,129, 9, 4, 65,200,
+ 8, 19, 97, 33,218,136, 1, 98,138, 88, 35,142, 8, 23,153,133,248, 33,193, 72, 4, 18,139, 36, 32,201,136, 20, 81, 34, 75,145,
+ 53, 72, 49, 82,138, 84, 32, 85, 72, 29,242, 61,114, 2, 57,135, 92, 70,186,145, 59,200, 0, 50,130,252,134,188, 71, 49,148,129,
+178, 81, 61,212, 12,181, 67,185,168, 55, 26,132, 70,162, 11,208,100,116, 49,154,143, 22,160,155,208,114,180, 26, 61,140, 54,161,
+231,208,171,104, 15,218,143, 62, 67,199, 48,192,232, 24, 7, 51,196,108, 48, 46,198,195, 66,177, 56, 44, 9,147, 99,203,177, 34,
+172, 12,171,198, 26,176, 86,172, 3,187,137,245, 99,207,177,119, 4, 18,129, 69,192, 9, 54, 4,119, 66, 32, 97, 30, 65, 72, 88,
+ 76, 88, 78,216, 72,168, 32, 28, 36, 52, 17,218, 9, 55, 9, 3,132, 81,194, 39, 34,147,168, 75,180, 38,186, 17,249,196, 24, 98,
+ 50, 49,135, 88, 72, 44, 35,214, 18,143, 19, 47, 16,123,136, 67,196, 55, 36, 18,137, 67, 50, 39,185,144, 2, 73,177,164, 84,210,
+ 18,210, 70,210,110, 82, 35,233, 44,169,155, 52, 72, 26, 35,147,201,218,100,107,178, 7, 57,148, 44, 32, 43,200,133,228,157,228,
+195,228, 51,228, 27,228, 33,242, 91, 10,157, 98, 64,113,164,248, 83,226, 40, 82,202,106, 74, 25,229, 16,229, 52,229, 6,101,152,
+ 50, 65, 85,163,154, 82,221,168,161, 84, 17, 53,143, 90, 66,173,161,182, 82,175, 81,135,168, 19, 52,117,154, 57,205,131, 22, 73,
+ 75,165,173,162,149,211, 26,104, 23,104,247,105,175,232,116,186, 17,221,149, 30, 78,151,208, 87,210,203,233, 71,232,151,232, 3,
+244,119, 12, 13,134, 21,131,199,136,103, 40, 25,155, 24, 7, 24,103, 25,119, 24,175,152, 76,166, 25,211,139, 25,199, 84, 48, 55,
+ 49,235,152,231,153, 15,153,111, 85, 88, 42,182, 42,124, 21,145,202, 10,149, 74,149, 38,149, 27, 42, 47, 84,169,170,166,170,222,
+170, 11, 85,243, 85,203, 84,143,169, 94, 83,125,174, 70, 85, 51, 83,227,169, 9,212,150,171, 85,170,157, 80,235, 83, 27, 83,103,
+169, 59,168,135,170,103,168,111, 84, 63,164,126, 89,253,137, 6, 89,195, 76,195, 79, 67,164, 81,160,177, 95,227,188,198, 32, 11,
+ 99, 25,179,120, 44, 33,107, 13,171,134,117,129, 53,196, 38,177,205,217,124,118, 42,187,152,253, 29,187,139, 61,170,169,161, 57,
+ 67, 51, 74, 51, 87,179, 82,243,148,102, 63, 7,227,152,113,248,156,116, 78, 9,231, 40,167,151,243,126,138,222, 20,239, 41,226,
+ 41, 27,166, 52, 76,185, 49,101, 92,107,170,150,151,150, 88,171, 72,171, 81,171, 71,235,189, 54,174,237,167,157,166,189, 69,187,
+ 89,251,129, 14, 65,199, 74, 39, 92, 39, 71,103,143,206, 5,157,231, 83,217, 83,221,167, 10,167, 22, 77, 61, 58,245,174, 46,170,
+107,165, 27,161,187, 68,119,191,110,167,238,152,158,190, 94,128,158, 76,111,167,222,121,189,231,250, 28,125, 47,253, 84,253,109,
+250,167,245, 71, 12, 88, 6,179, 12, 36, 6,219, 12,206, 24, 60,197, 53,113,111, 60, 29, 47,199,219,241, 81, 67, 93,195, 64, 67,
+165, 97,149, 97,151,225,132,145,185,209, 60,163,213, 70,141, 70, 15,140,105,198, 92,227, 36,227,109,198,109,198,163, 38, 6, 38,
+ 33, 38, 75, 77,234, 77,238,154, 82, 77,185,166, 41,166, 59, 76, 59, 76,199,205,204,205,162,205,214,153, 53,155, 61, 49,215, 50,
+231,155,231,155,215,155,223,183, 96, 90,120, 90, 44,182,168,182,184,101, 73,178,228, 90,166, 89,238,182,188,110,133, 90, 57, 89,
+165, 88, 85, 90, 93,179, 70,173,157,173, 37,214,187,173,187,167, 17,167,185, 78,147, 78,171,158,214,103,195,176,241,182,201,182,
+169,183, 25,176,229,216, 6,219,174,182,109,182,125, 97,103, 98, 23,103,183,197,174,195,238,147,189,147,125,186,125,141,253, 61,
+ 7, 13,135,217, 14,171, 29, 90, 29,126,115,180,114, 20, 58, 86, 58,222,154,206,156,238, 63,125,197,244,150,233, 47,103, 88,207,
+ 16,207,216, 51,227,182, 19,203, 41,196,105,157, 83,155,211, 71,103, 23,103,185,115,131,243,136,139,137, 75,130,203, 46,151, 62,
+ 46,155, 27,198,221,200,189,228, 74,116,245,113, 93,225,122,210,245,157,155,179,155,194,237,168,219,175,238, 54,238,105,238,135,
+220,159,204, 52,159, 41,158, 89, 51,115,208,195,200, 67,224, 81,229,209, 63, 11,159,149, 48,107,223,172,126, 79, 67, 79,129,103,
+181,231, 35, 47, 99, 47,145, 87,173,215,176,183,165,119,170,247, 97,239, 23, 62,246, 62,114,159,227, 62,227, 60, 55,222, 50,222,
+ 89, 95,204, 55,192,183,200,183,203, 79,195,111,158, 95,133,223, 67,127, 35,255,100,255,122,255,209, 0,167,128, 37, 1,103, 3,
+137,129, 65,129, 91, 2,251,248,122,124, 33,191,142, 63, 58,219,101,246,178,217,237, 65,140,160,185, 65, 21, 65,143,130,173,130,
+229,193,173, 33,104,200,236,144,173, 33,247,231,152,206,145,206,105, 14,133, 80,126,232,214,208, 7, 97,230, 97,139,195,126, 12,
+ 39,133,135,133, 87,134, 63,142,112,136, 88, 26,209, 49,151, 53,119,209,220, 67,115,223, 68,250, 68,150, 68,222,155,103, 49, 79,
+ 57,175, 45, 74, 53, 42, 62,170, 46,106, 60,218, 55,186, 52,186, 63,198, 46,102, 89,204,213, 88,157, 88, 73,108, 75, 28, 57, 46,
+ 42,174, 54,110,108,190,223,252,237,243,135,226,157,226, 11,227,123, 23,152, 47,200, 93,112,121,161,206,194,244,133,167, 22,169,
+ 46, 18, 44, 58,150, 64, 76,136, 78, 56,148,240, 65, 16, 42,168, 22,140, 37,242, 19,119, 37,142, 10,121,194, 29,194,103, 34, 47,
+209, 54,209,136,216, 67, 92, 42, 30, 78,242, 72, 42, 77,122,146,236,145,188, 53,121, 36,197, 51,165, 44,229,185,132, 39,169,144,
+188, 76, 13, 76,221,155, 58,158, 22,154,118, 32,109, 50, 61, 58,189, 49,131,146,145,144,113, 66,170, 33, 77,147,182,103,234,103,
+230,102,118,203,172,101,133,178,254,197,110,139,183, 47, 30,149, 7,201,107,179,144,172, 5, 89, 45, 10,182, 66,166,232, 84, 90,
+ 40,215, 42, 7,178,103,101, 87,102,191,205,137,202, 57,150,171,158, 43,205,237,204,179,202,219,144, 55,156,239,159,255,237, 18,
+194, 18,225,146,182,165,134, 75, 87, 45, 29, 88,230,189,172,106, 57,178, 60,113,121,219, 10,227, 21, 5, 43,134, 86, 6,172, 60,
+184,138,182, 42,109,213, 79,171,237, 87,151,174,126,189, 38,122, 77,107,129, 94,193,202,130,193,181, 1,107,235, 11, 85, 10,229,
+133,125,235,220,215,237, 93, 79, 88, 47, 89,223,181, 97,250,134,157, 27, 62, 21,137,138,174, 20,219, 23,151, 21,127,216, 40,220,
+120,229, 27,135,111,202,191,153,220,148,180,169,171,196,185,100,207,102,210,102,233,230,222, 45,158, 91, 14,150,170,151,230,151,
+ 14,110, 13,217,218,180, 13,223, 86,180,237,245,246, 69,219, 47,151,205, 40,219,187,131,182, 67,185,163,191, 60,184,188,101,167,
+201,206,205, 59, 63, 84,164, 84,244, 84,250, 84, 54,238,210,221,181, 97,215,248,110,209,238, 27,123,188,246, 52,236,213,219, 91,
+188,247,253, 62,201,190,219, 85, 1, 85, 77,213,102,213,101,251, 73,251,179,247, 63,174,137,170,233,248,150,251,109, 93,173, 78,
+109,113,237,199, 3,210, 3,253, 7, 35, 14,182,215,185,212,213, 29,210, 61, 84, 82,143,214, 43,235, 71, 14,199, 31,190,254,157,
+239,119, 45, 13, 54, 13, 85,141,156,198,226, 35,112, 68,121,228,233,247, 9,223,247, 30, 13, 58,218,118,140,123,172,225, 7,211,
+ 31,118, 29,103, 29, 47,106, 66,154,242,154, 70,155, 83,154,251, 91, 98, 91,186, 79,204, 62,209,214,234,222,122,252, 71,219, 31,
+ 15,156, 52, 60, 89,121, 74,243, 84,201,105,218,233,130,211,147,103,242,207,140,157,149,157,125,126, 46,249,220, 96,219,162,182,
+123,231, 99,206,223,106, 15,111,239,186, 16,116,225,210, 69,255,139,231, 59,188, 59,206, 92,242,184,116,242,178,219,229, 19, 87,
+184, 87,154,175, 58, 95,109,234,116,234, 60,254,147,211, 79,199,187,156,187,154,174,185, 92,107,185,238,122,189,181,123,102,247,
+233, 27,158, 55,206,221,244,189,121,241, 22,255,214,213,158, 57, 61,221,189,243,122,111,247,197,247,245,223, 22,221,126,114, 39,
+253,206,203,187,217,119, 39,238,173,188, 79,188, 95,244, 64,237, 65,217, 67,221,135,213, 63, 91,254,220,216,239,220,127,106,192,
+119,160,243,209,220, 71,247, 6,133,131,207,254,145,245,143, 15, 67, 5,143,153,143,203,134, 13,134,235,158, 56, 62, 57, 57,226,
+ 63,114,253,233,252,167, 67,207,100,207, 38,158, 23,254,162,254,203,174, 23, 22, 47,126,248,213,235,215,206,209,152,209,161,151,
+242,151,147,191,109,124,165,253,234,192,235, 25,175,219,198,194,198, 30,190,201,120, 51, 49, 94,244, 86,251,237,193,119,220,119,
+ 29,239,163,223, 15, 79,228,124, 32,127, 40,255,104,249,177,245, 83,208,167,251,147, 25,147,147,255, 4, 3,152,243,252, 99, 51,
+ 45,219, 0, 0, 0, 9,112, 72, 89,115, 0, 0, 11, 19, 0, 0, 11, 19, 1, 0,154,156, 24, 0, 0, 0, 7,116, 73, 77, 69, 7,
+220, 4, 26, 17, 37, 54, 89,161,235,246, 0, 0, 32, 0, 73, 68, 65, 84,120,218,236,189,123,184,110, 87, 93,223,251,249,253,198,
+ 24,115,206,119,173,189,119,216, 33, 23, 18,238,225,242, 88,180,162, 36, 94, 16,139, 96, 55,167,199,123,233, 49,248,148,199, 43,
+167, 36, 94,122,144, 99,213,192,169, 85,218,199,138,212, 99,165, 96,149, 68,212, 90,107, 61,199,160, 85,171, 88, 32, 41, 94,224,
+ 40, 98,138, 90,193, 90, 32, 4, 80, 2, 9,201,190,173,245, 94,230, 24,227,247, 59,127,140,119,101,175, 44,118,246, 45, 59, 9,
+ 9,243,243, 60,235, 89,239,251,174,249,142, 57,199,156,115,141,239,239, 54,199,128,137,137,137,137,137,137,137,137,137,137,137,
+137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,
+137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137, 51, 71, 30,138,157,250,175,191,228,133,100,127, 25,
+ 74,135,250, 27,248,251,255,238, 63,136,224,211,229,152,152,152,152,152,152,120, 24,137,186,255,198, 55, 63,159, 99,219,255,149,
+ 35,219,206,254, 11,224,162, 11,133, 50,254, 71,198, 99,215,202,139,110,220,154, 46,201,196,196,196,196,196,196,185,161, 15,250,
+ 30, 63,118,235, 38,183,223, 6,119,254,205,130, 15,255,213,156,219,110,157,227,225,197, 12, 7,255,220,127,251,165, 79,159, 46,
+201,196,196,196,196,196,196,195, 69,212,191,253, 29,191,205, 76, 95,201,190,110, 3, 33,114,231,199,140, 91,255,114,206, 50, 63,
+ 9, 75,127,233,191,253,210,255,109,186, 44, 19, 19, 19, 19, 19, 19,103,143, 60, 84, 59,246,215,127,241, 87,176, 44,111, 98,229,
+ 61,181, 44,232, 6,229, 9, 79,141, 92,248,232,142,186,122, 45,218,189, 66,190,242,245,171,233, 18, 77, 76, 76, 76, 76, 76,124,
+154,139, 58,128, 95,127,229, 83,216, 14,111,102, 89,159, 78,174,115, 66,128,203,159,172, 60,230,242, 1,203,127, 70,240,191, 47,
+ 95,241,134,219, 30, 46, 39,211,221,175, 4, 14,174,223,222, 42, 34,183, 62,146,111,158,207,180,254, 78, 76, 76, 76, 76,162,126,
+ 58, 97,248,177,207,221, 36,165,255,192,220,191,150,236, 75, 48,184,244,241,194,101, 79,152, 17,100, 36,149,175,150,191,119,253,
+219,206,179, 24, 93, 1, 92,113,134,155, 31, 22,145, 91,206,176,221,183, 1,135,214,111, 95, 33, 34,175,121,132,139,250,103, 84,
+127,207,211, 57, 19, 17,153,158,244,152,152,152,120, 64,136,247,123,144,122,251,243, 34, 31,237,250,147,254,241,248, 40,236,239,
+ 28, 46,133, 75,129,163,203, 19, 70, 68,191, 95, 72, 43,129, 11,193,239,122, 57, 31,249, 72,207,150,253, 47, 24, 35,135, 63, 9,
+ 27,251,150, 60,234,226, 68,237,222,234,255,229, 31,255, 32,253, 95,188, 90,158,255,187,229, 60,245,251,106,224, 71,207, 98, 32,
+ 6,184, 17,184, 73, 68,110,152,110,155, 71,132,184,170,136,216,158,168,195, 55, 0,207, 94, 27,124, 7,129,158, 19,117, 39, 6,
+ 44,128, 15, 2, 63, 37, 34,215,159,147, 21,125, 26, 65,119,247,207, 91,223,159,135,128,199, 2,151, 0, 35,240, 49,224,189,192,
+ 59,128,223, 18,145,191,186,143,239, 95, 14,124, 33,240, 5,192,149,192,229,192, 69,192,163,129, 79, 2,183, 2, 31, 2,222, 2,
+252,242,238,115, 48, 49, 49,241, 25,236,169,251,171, 94,165, 28,184,249, 26,170,252, 83, 68, 46, 34, 4, 67, 4, 84,219,143, 8,
+132, 32,168, 66, 88,191, 87, 5, 93,127, 38, 2,178,179,173, 86, 66, 88,225,178,137,236,218, 54, 4, 48,148,161, 75, 72,253, 61,
+102, 92, 45,207,125,253,157,231, 97, 64,191,238,108, 68,125, 15, 55, 1, 47, 18,145,195,147,167,254,200,233,175,175, 45,183,179,
+224, 40,240, 66, 17,121,251,121,218,255,229,192, 79, 0, 47, 58, 67,227, 64,206, 67, 63,222, 7,188, 82, 68,126,115, 26, 10, 39,
+ 38, 30, 25,156,123,245,251,163,110,254,110,208,159,166,112, 9, 38, 66, 37, 80, 37,180,223,235,215,133, 64,241, 64,246,246,122,
+244,192,104, 74,118,101,164,125,222,126, 58,114,221,135, 59,109, 10, 26,105,191,221, 65,197,200,117, 69,213, 47, 99, 46,255,195,
+111,254,174,103, 61, 0,231,225,166, 83,252,236,229, 16,240, 54,119, 63, 56,221, 62,159,209, 92, 0,220,236,238,223,112, 30, 4,
+253,179,129,247,156,169,160,159, 71,158, 1,252,186,187,127,221,116, 57, 39, 38, 30, 25,156, 83,248,221, 95,133, 98,254, 29,204,
+179, 83,115,166, 26,136, 72,243,251,165,249,255, 66,243,184, 17,230,185,110, 16, 20,125,244, 37, 16, 35, 84, 71,154,135, 14,106,
+237,119, 85, 80, 95,191,151, 29, 15,158,126, 72, 43, 4,168,140, 84, 14, 66,186,197,111,126,217,119,240,229,255,230,250,243,149,
+155, 20,145, 23,156,102,208,221, 9,215,239,228,225,175, 4,174, 1,166, 28,242, 35,147,191, 1,126,151, 22,162,126, 55,240, 17,
+ 90, 2,233, 31, 0,255, 24,120,210,206,173, 3,252,146,187,191, 93, 68,238, 56, 71, 65,127, 10,240,118,224,226,245, 71, 35,240,
+ 70,224,215,104,225,246, 79, 2, 3, 45, 20,255, 12,224, 57,192, 87,159,162,201,143, 1,239, 90,255,220, 2,220, 14,220, 1, 28,
+ 3, 30, 71, 11,205,191, 10,120,250,174, 62,252,123,119,255, 2, 17,249,159,211,165,159,152,120,120,115,238,225,247,215, 61,231,
+ 90,142, 47,223, 64,169,107,241,222,213,154,200,137,215,165,218,124, 68,101,255, 65,100,255,254, 19, 97,247, 16, 16, 13,160, 2,
+178, 78,149,171,180,144,187,106,107, 76, 35,125, 63, 91,177,179, 29, 65, 16, 81,134, 24,193,222,196,252,130,111,145,175,125,213,
+252, 28, 6,210,123,133,223,239, 43,148,185,231, 59, 87, 0,127,194,137,106,239, 91, 68,228,170, 61,219, 76,225,247,135,207,177,
+119, 34, 50,238,122,191, 5,252, 50,112,157,136,220,125,154,239,254, 24,240,189,187, 62,122,179,136,124,213, 57, 28,131,172,141,
+135,231,174, 63,250, 0,240,149, 34,242,254, 7,184,239,195,250, 94,254,236, 93, 31,255,107, 17,249, 39,211,144, 56, 49,241, 25,
+232,169, 3,200,203,222,121,189,255,235,103,221, 76,208,167, 98, 42,136,237, 42,184,209,245,235,186,162,219,124,246,106, 57,252,
+232, 70,154, 97,102, 77,180, 5, 48,195,199, 45, 36, 8,250,248,103,162, 23, 63, 21, 57,240, 24,100, 56, 0,101,133,109,223,137,
+ 31,191,157,213,157,255,179,103,181, 5, 97, 6, 82, 65, 3,178,101,116,155,253,215,179,239,216,147,253, 45,223,251,101,242,247,
+254,239,237, 7,220,250, 17,185,213,221,111, 92,123,232, 59,222,250,249, 24, 96, 15,238,105,235,150,147,229,235,207,161,221,221,
+ 21,254,231,244,184,217,249,104,227,193,232,239,158,227, 60,163,246,118, 11,250,250,253,190,179,184, 23,190,207,221,159, 67, 43,
+170, 99,151, 40,159, 45,223,186,235,187,119, 3,207, 23,145,191,126, 16,238,229,165,187,127, 63,240,219,187, 62,190,106, 26, 14,
+ 39, 38, 62,131, 69, 29, 64,190,231,191,125, 96,237, 93,156,124,176,253,133,175,253, 92,150,229, 27,247, 5,167,152, 55,111,123,
+185,196, 87,219, 80,183, 9, 79,255, 59,196,171, 94, 76,120,242, 23,127,202,119,119,146,253,126,247,109,148, 15,222, 76,253,240,
+ 59,145,208,129, 59, 46, 48,206, 71,186,141,238, 74,130,191,217,255,228,154, 67,114,213, 13,249, 65, 56, 95,231,229, 57,236,181,
+176, 93, 67,171,114,190,242, 36,127,191, 21,184, 1,184,225,190, 4,202,221,127,116,215,119,111, 20,145, 27,118,181,123, 13,123,
+ 30,217, 91,183,249,154, 51,169,222,119,247,107,128,235,238,163,141, 83, 30,215, 3,209,223, 83,244,245,186,117,187,187,235, 27,
+110, 2, 94,240, 32,220, 11, 63, 4,188,117,253,122,243, 28,219,120,217,174,215,215, 61, 24,130,190,139,255,182,231,253,231, 77,
+195,225,196,196,103,184,168,159,114, 32,255,185, 23, 92,203,214,242, 13, 20,169,165, 58,158, 87,248,114, 14,101, 5,209,233,191,
+242,149,196,171,254,225,233, 13,135, 11,159, 68,186,240,127, 71, 31,243,185,148,119,191, 17,180, 54,201, 23,129,209, 70, 54,210,
+115, 57,188,241, 67,192, 15, 60, 8,231,107,183,120,156,147,119,233,238,135,128, 95,217,211,214, 94,174,160,165, 7,174,113,247,
+ 23,221,199,115,242, 87,114, 34,244,125,211,250,145,172,235, 79, 17, 65,184, 2,184,222,221,175, 20,145,107, 79, 33,190,215,175,
+197,247, 84,199,117,181,187,191,224, 65,236,239,201,250,250,182,211,180,249, 64,243,174,221,183,233, 57,220, 7, 87,237, 18,210,
+187,128, 95,124,144,143,127,175, 17,252,201,105, 56,156,152,152, 68,253, 83, 7,171,235,191,122, 3, 91,188,158,109,127, 9, 85,
+ 86,120,174,190,181,181, 65,201, 32,142, 36,232, 95,248,106,194,231,156, 72, 65, 30, 91,172,120,203,159,222,198, 91,254,236, 54,
+238,222, 90,144,130,240,183, 46,191,144,175,189,234,169, 60,235, 41,151, 1, 16, 30,255, 5, 72,183,159,252,142, 31,135, 46, 2,
+222,220,249, 69, 46,164,248, 79,253,237,255,231,191,147,231,255,196, 7, 30, 48, 35,165, 9,222,213,123, 60,194,179,109,227,234,
+181,192,237,230,150,117, 91, 59, 70,194,110,111,246, 10, 90,165,253, 11, 78, 51, 1,206,193,117,187, 59,158,245,141,235,118,119,
+ 4,113,247,113, 95,227,238,183,222, 71,254,251, 71, 79, 34,232,187,219,218, 57,182, 43, 79,210,143, 7,171,191, 7,247, 8,250,
+225, 93,199,119,197,131,248,191,243,249,187, 94,215,115,248,254,151,239,122,253,159, 68,228,193,158, 18,249,153,123,222,255,233,
+ 52, 28, 78, 76, 76,162,126,239, 65,252, 13,207,125, 26,171,173, 55, 83,244,169, 56, 11,234,220,201, 43, 48,131, 24,144,178, 77,
+122,206, 63,186,151,160,255,209,251,111,231,251,126,233, 15,184,245,147,199, 25,250, 68,138,138, 58,252,217, 71,239,230, 77,127,
+248, 63,248,154,171,158,194, 63,187,250,239,176,209, 39,244,210,207, 34,126,206,139, 40,239,249,121,216,127,233, 78,133,189,225,
+ 2, 37,252, 27,224,171, 30,136,147,180,203,131,221, 45, 26, 55,156,101, 27, 87,172,219,216,225, 86,224, 90, 17,217,107, 28,188,
+102,143,119,187,179,239, 83,229, 60,175,219, 37,192,215,238, 13, 97,175,247,253, 43,187,196,243, 58,119,191, 87,168,123, 29,114,
+191,102,143,248,190,104, 79, 30,125,247,177, 29,122,136,250,123,221,174,246, 94, 33, 34, 55,158,228, 90, 61, 24,236, 46,148, 59,
+151,185, 19,190,112,215,235, 63, 88, 31,251, 69,180, 60,251,215,175,239,181, 3,180, 92,251, 7,105, 5,117, 63,127,158,234, 26,
+ 34,247,158,167,193,128, 31,158,134,195,137,137, 73,212, 79, 12, 20,255,246, 75,255, 87, 22,254,235, 20, 34, 90,231,148, 17,106,
+ 89, 87,180, 11,120, 69, 46,122, 60,241, 11,191,249,158,239,188,255,227,135,249,230,127,251, 22,238, 88, 20, 54, 54,103,228, 16,
+ 72, 41,208, 5, 33,120,135,212,194,175,190,235, 3, 4, 85,126,248,197,207,107, 30,251, 83,159, 79,253,171,255, 2,117, 11,210,
+190, 38,236,181, 22,130, 28,242,223,127,249,101,242,220,215,222,126, 14,131,220,117,167,248,243,161,147, 8,216,201,196,233,116,
+ 92,191,199,187,188,234,190,242,210, 34,114,211, 58,188,189,227,145, 94,233,238,215,156, 38, 31,126,147,136,188,232, 62,218,187,
+213,221, 95,177,110,111,199,219, 61,180, 54, 2,246,138,229,142, 96,190,224,100,199,183,235,216,254,228, 33,236,239,173,247,213,
+222,249, 40, 50, 60,131,251,229, 82,224, 43,118,125,244,230,115,104,230, 25,187, 94,255,249,250, 89,241, 55,210,102,127,219,205,
+101,235,159, 47, 5, 94,233,238,111, 0,254,201,217,122,246,238,174,180, 71,218, 62,159,246, 72,219,231,237, 18,244,239, 21,145,
+247, 76,195,225,196,196, 36,234,248,245, 87, 38,150,179, 31,102,229,223, 79,145, 21,161,172,168, 45,212, 78,218, 41,119, 19, 60,
+143,196,167, 63, 23,217,119, 98,204,122,197, 47,189,147,247,255,245, 81,184, 96, 31, 71,183, 10, 72, 37, 8,108, 4,225,162,205,
+200,193, 89,228,130, 11,246,241,235,127,252,126,158,247,217, 79,228,208, 51,159, 12, 33, 18,174,120, 46,229, 79,127, 1, 54, 15,
+128, 91,155,160, 38,133,142,108, 95, 7,188,225, 28,186,113,166,179,203,221, 64, 43,212, 58, 43, 65, 95,231,128,119, 27, 6,175,
+ 56,157,248,136,200, 45,238,126,195, 46,177, 61,116,154,232,192,181,167,105,239, 38,119,191,133,123,135,186,119,142,239,234, 61,
+ 81,136,215,156,234,248,118, 29,219, 53, 15, 81,127, 95,243, 96,136,247, 41,120, 39, 16,214,175, 51,240,221,231,208,198,133,123,
+188,246, 55,112,250,220,124, 0,190, 11,248, 60,119, 63, 36, 34,203, 51,184,247, 78, 53,151,195,123,214,215,230,173,211, 80, 56,
+ 49,241,200,224,126,173,167,238,175,251,162,199,113, 60,189,147,101,253,126,178,207,145, 90,169,185, 13, 61, 81, 32,136, 16, 69,
+ 36, 40, 18, 5,189,252,115,238,249,238,135, 62,113,132,223,249,211,143,192,198,236,196,179,233, 33, 80, 81,142,175, 42, 31,186,
+115,206,173,119,204,201, 46, 88, 8,220,252,223, 63,124, 66, 0, 46,122, 42,190, 56, 6,148,117, 8,222,161, 24,216,189, 66,154,
+ 15, 4, 87,175,189,200,179, 13,241,238, 22,184,195,103, 49,127,252, 77,123,246,125, 95,220,114,134, 97,217, 91,238,227,152, 14,
+237, 17,216, 51, 57,190, 27, 31,162,254,222,250, 80,206,191,239,238,191, 14, 60,101,215, 71,175, 20,145,173,115,104,234, 81,187,
+ 94,191,118,151,160,223, 12,124, 29,109,178,155,110,253,251,235,128,255,186,107,251,231, 0, 63,121, 63,187,242,139,192, 63,156,
+ 4,125, 98, 98,242,212,219,224,246,250, 47,126, 14,243,122, 51, 89, 19, 81,230, 4,107, 94,179, 35, 20, 17,162, 56, 65,214,179,
+195, 85, 36,118,232,193, 39,220,243,253,219,238, 60,198, 98,158,225, 64,207, 61, 83,208,237,248, 20,170,224,206,145,173, 76, 30,
+ 11,143,187, 32,114,124,121,162, 88, 87,246, 95,218,156,150,213, 54,204,246, 11,224,228, 2,145,103,186,191, 74, 69, 94,117,182,
+139, 84,188,226, 20,127,187, 98, 45, 82, 59,139,124,220, 83,253,125, 22,222,226,161,251, 16, 86,206,192,187,190,151, 7,124, 31,
+ 5,100,103, 26, 57,184,245, 20,125, 60,171,182,246, 30,219,131,216,223, 91, 30,170,127, 22,119,255,169,181,192,238,240,123, 34,
+242,227,231,193,160,158,173,127,255, 11, 17,249,161, 61,219,221, 1,252, 38,240,155,238,254, 47,128,127,182,254,252,219,220,253,
+181, 34,242, 23,231,184,255,111, 2,190,105, 29,189,249, 54, 17,249,239,211,112, 56, 49,241, 25, 40,234,254, 43, 87, 7, 62,252,
+161,239,225,120,249, 87, 84, 25,233, 89,162, 38, 84,119,178, 9, 65, 58, 18,135,169,190, 73, 12,205,107,183,181, 27,226, 39, 22,
+ 89,187,228,130, 13, 66,151,168, 6,184,112, 98,222,247,245,111, 23, 8,202,246, 60,243,225,229,146,254,153,187, 14,213, 43,120,
+134,178, 4, 61, 0, 94, 5,170, 83,253,114,126,231,174, 4,156, 85,190,241, 76,102, 66, 91,231,221,175, 91, 11,251,206, 35, 85,
+103, 58, 97,199,238,199,204,174, 88,207,196,118, 46,220, 87,132,224,254,134,162,207, 73,132,215,219, 94,249, 32,247,247, 33, 17,
+117,119,127, 45,240, 29,187, 62,122,159,136, 60,239,126, 52,121,156,123,135,224,223,118, 18, 65,223,123,159,254,160,187, 63,123,
+125,189,148, 86, 84,247,189,167,249,142,172,143, 63, 2,143, 95, 27,112,255,136, 54,207,188,174,175,213,187,221,253, 37, 34,242,
+ 31,167, 33,113, 98,226, 51, 72,212,253,250, 43, 47,224,182, 15,190,137, 81, 14, 33,178, 96, 22, 64, 17,178, 57,171, 26,233,180,
+163,151,151,130, 95, 65,229, 21, 56, 75,180,133,223,201, 25,251,228, 7,208,199,127, 1, 0,127,235,177,143,230,139,158,118, 9,
+255,223, 95,222,217,230,131,119,105,115,191,123, 51, 2, 0,176,230,233, 47,239,222,230,105,143, 57, 49,190,251,177,143,193,234,
+ 24,140,115, 95, 91, 4, 96, 56, 10,204,142, 63, 32,107,196,139,200,107,214, 94,228, 78,254,253, 76,138,215, 78, 38, 78,103,179,
+150,251, 67,193,225,243,176,237,195,169,191,103, 34,232,175,167,205,249,190,195,135,248,212, 71,194,238,175,168,191,238, 12,191,
+247,186, 93, 70,216,243,207,226,254, 45,235,227,254, 16,109, 33,154,235,105,147,231, 36,218, 18,179, 55,184,251, 31,138,200,135,
+166, 97,113, 98,226, 51, 64,212,253,199,191,240,153,220, 85,255, 51, 69, 30, 79, 10,115, 6,109,226, 57,154, 51,214,129, 65,150,
+204,228,107,229,255,248,227,183,248,143, 95,245,195,152, 8,130,180,202,119,129,168,248, 39, 78, 68, 10, 85,133, 31,120,225, 85,
+124,229,251,126, 11,150, 25,250,174,109,199, 90,212,141, 22,206,223,154,243,249,207,120, 44,223,244,101, 39,166,169,182, 59,254,
+ 18,247, 12,117,108, 27,186, 3,166, 32,183,243,188, 39,141, 15,212,201, 90, 11,251,238,162,186,171, 57,203, 71,219,104, 33,240,
+115,125, 44,233,240,195,240, 30,123, 88,247,215,221,127, 26,248,246, 93, 31,253, 13,240, 89,107,145,188, 63,252, 53,240,196, 93,
+239,255,232, 12,191,183,123,187, 39,220,143,123,249,119,221,253,135,128, 31, 89,127,180, 73,155, 37,239, 91,167, 97,113, 98,226,
+ 17, 44,234, 14,194,143,125,254, 75, 88,214,159,193,164, 48, 11,115,122, 21,220,157, 69,117,204, 55,217, 23,254,138,153,124,141,
+124,251,187,214, 11, 81,200, 7, 16, 7,199, 81, 17, 84, 96,216,160,222,246, 14,226,225,219,144,131, 79, 2,224, 43, 62,255, 73,
+220,240, 29,207,231,229, 63,251, 7,204,143,172, 96,232,219,218,235,238, 48,102,152, 47,120,214,103, 93,202,155,190,239,171,216,
+ 28, 82,107, 58, 47,168,239,251, 85,164,235,219, 92,240,110, 96,214,188,244,232,239, 57,135,124,250,217,114,211, 46, 79,233,208,
+ 57,124,255,134, 71,250, 66, 47,143,148,254,186,251,207, 1,223,182,235,163, 79, 0, 79,223, 59,111,252, 57,242, 23,180,130,183,
+ 29,142,156,225,247,118,111,119,193,253, 60,134,223,222, 37,234,112,158,214, 51,152,152,152,120,232, 56,125,245,251,143, 95,117,
+ 13, 89,223, 8,186,100,127,202,204,130,224, 56,219, 21, 84, 54,217, 8,191,198,197,242,133, 39, 4, 29, 24,120, 47,218,210,220,
+ 64, 19,234, 24,161,108,145,223,241, 19,247,106,254,165,127,247,179,249,195, 87,127, 61, 47,255,234,191,205,147, 47,236, 25, 60,
+179, 79, 43, 95,242,180,139,248,201,239,252,114,126,255, 95, 94,205,147, 47, 61, 49,118,149,119,191, 17, 63,114, 27,164, 30,164,
+ 89, 14,148,245,243,240,226,183,124,154,158,231,251,170, 58,127,184, 31,223,161,135,105,127,207, 68,208,127,121,143,160,223,185,
+ 22,244,249,121,218,197,222, 25,220, 30,117,134,223,123,212, 57, 24, 2,247,197,222, 80,251, 19,167, 33,113, 98,226, 17,236,169,
+251,245, 87,110,112, 71,253, 17, 76, 70, 14, 4, 72, 34,100,119,230, 57,208,105, 79,210,127,197,144,127, 64,190,241,150,123,207,
+ 35, 29,237,189,136,126,148,106,143,193,189, 14, 93, 88, 34, 64,191,143,229, 71,126,127, 40,239,124, 45,241, 57, 47,191,103,243,
+207,125,226, 69,252,196, 75,158,203,171,191,169,240,241,187,183,233, 82,228,242, 11, 63,117,141,140,250,190,223,160,252,249, 47,
+194,176,177, 54, 73, 66, 43,208,171, 38,120,206,168,255,214,131,112,206,206, 37, 63,188,187,160,236,144,187, 31,124,136,159,179,
+222,203,173,187,142,239,140,188,181,245,179,232, 15,215,254,158,174,111,191, 6,188,112,215, 71,119,173, 5,253,216,121,220,205,
+127, 6,126,138, 19,143,178, 61,123,253,217,233,120,246,174,215, 31,190,159,199,240,185,123,222,191,111, 26, 18, 39, 38, 30,201,
+158,250,130,139,112, 14,130, 20,204,157,121,117,230,165,163, 19, 97, 63, 47,146,239,254,163,235,228,218, 91, 62,101,117, 52,185,
+246,150, 57,189,188, 30,241,196,178,250, 58,136, 47,168,138,108,236,167,254,249,191, 39,223,244, 3,248,252,222,107, 72, 12, 41,
+242,164, 75, 47,248, 84, 65,207, 11,234,187,126,138,242, 7,255, 18,233, 59, 36,132,182,132,123,234, 33,103, 48, 75, 80,223, 44,
+ 47,184,225, 35, 15,240, 96,191,183,232,235, 76, 35, 3,123, 31, 19,187,230,211,236, 62,216,125,124, 7,215,211,182,158,171,151,
+254,112,232,239,169,174,241,111,157, 68,208,159, 42, 34, 71,206,231,126, 68,228,111,128,119,236,250,232,101,103,248,213,221,219,
+221,124, 63, 15, 99,239, 92, 0,239,158,134,196,137,137, 71,178,168, 95,190,248, 56,179,112, 27, 73, 54,216,206, 27,152,109,176,
+ 33,199,217, 31,158, 43,215,254,241,141,167,142, 1,116,111, 36,112,148, 85,137,100,107,207,171, 7,218,148,177,155,251,177, 15,
+254, 14,227,175,126, 51,245,189,191,138, 31,251,155,147, 15,176,219,119, 98, 31,188,137,241, 63,189,132,242,158,159,129, 97,128,
+ 16,219,100, 51, 34, 32, 73, 88,100, 33, 56, 56,175,124,128, 7,251,157, 69, 83,118,115,227, 25, 14,224, 55,114,239, 98,177,235,
+ 78,227,233, 62,216,220,200,189,139,210,174, 59,131,115,113,221,195,184,191,247,213,175,183,114,239,245, 3,118, 60,244, 35, 15,
+208, 46,119,207,183,126,200,221,255,249,105,142,239,159, 3,127,119,253,182, 2, 63,123, 63,250,250, 82, 62,117, 38,188,223,155,
+134,196,137,137,135, 55,167, 12,191,203,139,222, 55,250,245, 95,250, 60,150,249,123, 48,125, 44,157,190,155, 89,250,121,121,201,
+ 31,156,118, 1, 11,249,206,119, 28,246,159,122,246, 75, 89,217,175,176, 85, 10, 81, 33, 4,105, 46, 54,176,113, 0,202, 81,242,
+ 59,126, 4,233,246, 33,143,254, 44,244,194,167, 64, 28,192, 50,118,228, 35,248,157,239,133,229, 17, 72, 9, 54,119,213, 4,237,
+ 20,187,143,234,244,116,120,121,181,124,205, 47,252,229, 3,232,157, 31,226, 83,215, 23, 63,204,217, 85,190, 95,203,189,231, 94,
+127,219,122,153,209,155,206, 96,255, 87,175,197,242, 1, 41, 56, 19,145,195,238,254, 26, 78, 60,174,119,200,221,175, 63,217, 18,
+173,107, 65, 63,147,101, 79, 63,109,251,123, 31,251,125, 59,240,188,147, 8,250,221,247,163, 77,223,117,142,229, 36,231,253,173,
+238,254, 27,156,152,208,230, 7,221,253, 75,104,143,173,253, 33, 45,103,254, 40, 90,200,253,101,123,162, 35, 63, 41, 34,239,223,
+179,191,219,104, 11,191,252, 30, 45,148,126,247,186, 31,199,105,115,202, 63,150,246, 40,222,119,113,239, 85,230, 0,126, 81, 68,
+222, 52, 13,137, 19, 19,143, 96, 81, 7,144,107,223,241, 17,224,229,231,212,250,119,254,225,155,248,201, 47,122, 45,197, 95,206,
+177,113,193,254, 78, 8,180,162, 54, 28, 82, 66, 82, 2, 55,252,174, 63,163,220,113, 11, 59,211,202,137, 70,136, 29,108,238,219,
+ 51, 82, 2, 99,197,109, 6, 26,122, 40,111,103,177,120,213,253, 28,208,253, 28,190,118,237,217,228,137,215,179,165, 93,203,137,
+149,203,118,132,238, 38, 90,184,122,119, 40,127, 39,204,127,136, 19,185,233, 87, 60,192,247,194, 13,220,123, 25,212,107,214, 97,
+248, 27,118, 29,219, 33, 90, 40,253,224,218, 19, 63,204,125,228,224, 31, 6,253,221,203,243,246,188,127, 52,112,215, 89,220, 26,
+ 79, 19,145,115, 89,250,247,155,214, 66,252,172, 93,231,248,116,233,143,183, 2,223,119,146,207,159, 8,124,203,250,231,108,120,
+ 23,240,210,105, 56,156,152,248, 12, 16,245,251,229, 1,130,123, 42,223,143,166, 75, 24,253,197, 28, 27,151, 62, 4,100, 8, 45,
+ 12,191,227,187,136, 66, 55,156,122, 53, 11, 7,204, 97, 85,177, 99, 35,179,203, 46,133, 80,111,161,196,127, 32, 47,186,113,124,
+ 16,207,217, 45,107, 65, 63,235, 74,123, 17,185, 97,215, 4, 54, 7,207, 98, 16,127,192, 89,123,235, 47, 90,123,215, 87,236, 18,
+219,147, 45,118,115,152, 54, 35,217,143, 62, 92,251,251,233,130,136, 28, 95, 27, 79,175, 3,190,241, 52,155,231,245,118,175, 56,
+ 15,207,201, 3,124, 4,248, 9,224,103, 30,130,245,220, 39, 38, 38, 30,110,162,222, 60,253, 91,178,191,234,121,223,194,197,203,
+191,166,240,253,233, 88,102, 92, 25,186, 17,219, 42,110, 1, 68,228,228,235, 83,173,157, 36,175,109,193, 22,159, 87,116, 62, 50,
+187,232, 32,108, 12,191, 6,199,190, 85, 94,248,155,199, 31,132,243,116,211,218, 51,189,105,239,250,221,231, 40,236, 55,209,194,
+249, 87,115,250, 48,246,141,235,253,223,248,128, 95,171,182, 68,235, 85,107, 17,190,230, 20,231,226,218,245,182, 15,235,254,126,
+ 26, 9,251, 97,218, 60,236, 63, 9,188,152, 54, 83,220,229,180,245,212, 15, 3, 31,160, 21,197,253,172,136,156,170,226,253,113,
+192, 23,209, 86,125,123, 22,240,152,117,196,225,209,192, 98, 45,226, 31, 93,255,188, 19,248,127,206,147,113, 48, 49, 49,241,233,
+ 50,158, 60,152, 59,243,159,254,146, 47,255,240, 29,243,155,159,120,176,167,172,156, 18, 5,134,128, 68,109,158,187,238, 58, 28,
+119,168,224,197, 96, 89, 9,217, 72, 73, 56, 86,225,192, 19, 47,123, 49,127,241,121,255,175,188,234, 1,159,104,230,129, 63, 39,
+205, 75,219, 27,194,190,149,182,186,217, 77, 15,225,113,237,132,195,119,175,137,126,211, 25,174, 6,247,176,235,239,196,196,196,
+196, 36,234,231, 50,168,191,238,139, 14, 48,200, 55,176,240,255, 11,243, 39,181,169, 97,221, 81, 53,148, 19, 34,109, 40,102, 74,
+123, 24, 14,130,222, 73,228,181,204,134,159,147,111,251,221,143, 79,151,110, 98, 98, 98, 98, 98,226, 33, 22,245,123,196,253,205,
+ 95,209,243,209, 35, 79, 39,219,215,131, 60,135,234,151, 97,246, 40,156, 14, 36, 19,229, 40, 65, 62,129,249,159,210,201, 47, 83,
+134,247,202,119,253,238,214,116,201, 38, 38, 38, 38, 38, 38, 62,205, 68,253, 83, 68,254,237,207,139,220, 70, 36,220, 29, 24, 54,
+141,195, 99, 57,217,196, 54, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19,159,134,200, 51,174,124,182,111,198,128, 16, 48,173, 36,132, 98,224, 46,168, 10,130, 80, 53, 35, 34, 4, 7, 71, 49,
+ 51,196, 21, 19,192, 4, 13,142,168, 32,110,136, 7,140, 74, 64,113,218,228,242, 70,193, 92, 81, 93,175,157,238, 17, 23,199, 13,
+ 36,128, 6,144, 42,184, 64, 80, 48, 4,149,128,148,140,170,146,113, 36, 9, 81, 3, 54, 86, 28, 33,196, 64, 80,197,221,136, 34,
+ 72, 72,168, 84,106, 5, 84,136,193, 32, 37, 48, 8,102, 24,142,152, 83,129, 90,156,216, 13,196,206,160, 10,227, 98, 4,169, 72,
+138,168, 42, 86, 42, 67, 18, 86,217,136, 8, 32,148, 24, 81,169,152,181,229, 96, 85,149,106, 70, 10, 74, 12, 29, 8,152, 26,162,
+142,102,197,107,197,113, 92, 5, 17, 65, 76, 17,117, 60, 40, 29, 48, 86,195, 67, 59,167, 34, 14,169, 67, 16, 52,130, 84, 99,149,
+ 43, 33, 40, 73,132, 98, 21, 65, 41,222,182, 79,106,140,213, 8, 4,170, 27, 42,142,116, 9,149,132, 68, 69,168, 4, 17, 16,193,
+179, 3,134,163,184, 26,193,149,226, 5,178, 97, 26, 41, 86, 32, 8, 82, 32,198, 13,106, 93,146, 98, 36,231,140,171,162, 81, 41,
+ 89, 25,130, 96,140,228,234, 68,237, 48, 55,132, 17,243, 72, 80,197,172, 29, 47, 65, 48, 23,130, 5, 68, 12, 79, 66, 39, 80,106,
+129, 16, 81,119, 52, 38, 4, 3,119, 28,152,197, 30,196, 89, 25,164, 88,177,209,209, 16, 25, 98,192,131,226, 84, 98, 23,240, 10,
+101,171, 16,250, 72, 13, 70, 48, 65, 61,226, 81, 9, 17,194,160,212,121,165,170, 48, 4,161,122,160,246, 78,153,103,186, 16, 48,
+119, 82, 7, 33, 5,198, 45, 33,170,227, 22,136,189, 80, 23,133,106,198,232, 25,137, 3,170,129,153,116,100, 27,241,100, 12, 26,
+153,111, 87,102, 73, 40,106,120, 31, 25,106,207,241,213, 28,239,149,224, 61,212,140,104, 66, 80, 22,121,129,231, 5,146, 4, 43,
+145, 40,138,107,193,179, 48,204,122,132, 64,208,142,176,161,232,166, 33, 38,196, 18,136, 30, 81,150,228,156,232,146, 51,103,100,
+195, 35,210,193,188, 20, 54, 82,164, 22,167,142,130,121,134, 90,177, 20, 97,125,175,205,100, 31,230, 35,227,184,100,144,136,118,
+142, 75,162,100,167,134,202, 16,123,204, 32, 5,199,197, 41, 49, 49,235,103,248,124, 27,168, 20,153, 97,121,139, 94, 55,169,238,
+ 44,243,138,136,179, 18,240,234,172, 22, 35,243,178,196, 67, 96, 53,102, 58, 82,235,119, 20,196, 4,241,158, 28, 70,168, 21, 92,
+ 16,119,172, 75, 68,156, 52,204, 24,231,133, 24, 19, 42,134, 27,148,114, 28,151,192,254,212, 51,175,130,139, 17,220, 41, 53,211,
+111,236,163,138,224, 57, 19, 24, 64,231, 96, 17,179, 64,149, 66,192, 48,173, 72,136,248, 98,196,112, 98, 12,120,113, 42, 70,215,
+109, 50,142, 43, 76, 42,158,231,228,218, 35, 1, 66,239, 96, 25,169, 51, 54, 14,244,132,234,184,247, 8, 75, 8,138,121, 32,120,
+164,248,138, 46,129,229,192, 42,103, 66,116,136, 3,238,149,152,122,196, 12, 74,197,235,138, 18, 7, 60, 67,218,220, 64,210, 2,
+219, 90, 33, 26,112, 2,157, 20, 86,210, 49,136, 16, 83,135,108, 84,108,140, 48, 86,250, 65, 40, 18, 80,239,232,170, 18,162, 16,
+ 58, 69, 7, 97, 49,135,253,170,212,206,128,192,144, 2, 75,139,132, 40, 12,226,140,222, 35,131, 18,115, 32,106, 38,104,101,181,
+ 50,186, 11, 34, 62, 42, 65, 21,197, 81,141,232,160,104, 5, 73,129, 94, 20, 69,144, 46,226, 42, 28,216,119,128, 75,174,120, 26,
+161,219,100, 83, 29,237, 20, 87,240,218, 86,196,222, 89, 33, 68, 12, 98, 0, 23, 40,208,198,239,245,235,163, 35,204,111,191,131,
+188,125, 4, 74,225,242, 75,246,179,113,217,227,219,178,155, 14,189,182,149,181, 29, 16,111,223, 3, 48, 64, 79,236,226,158,247,
+ 59,220, 97,112,215,109, 71, 41,199,111,103, 51, 85,158,240,228,199,146,102,143,186,103, 57,207,184,254,237,235, 31,217,245,158,
+ 93,109,237,252,125,231,253, 22,112,251, 49, 88,222,254,113,124,251,110,158,116,105,199,129,199, 94,177,103,239,231,206, 28,248,
+139, 59,224,174,247,221,138, 47, 63,132,213,145,229,241,145,213, 18,186,153,145, 92,217,178,145,186,170,132, 44, 44,181, 82, 61,
+113,112, 83,176,101, 97,107, 25,160,135,217,190,202,246,177, 66, 62,186,192, 83,160, 32,228,156, 9,117, 69, 73, 16, 45, 81, 74,
+ 69, 60,226, 62,103, 94,141,168, 33, 96, 94,193, 42,110, 70, 9, 9, 95, 75,177,139,129, 41,110, 1,193, 17, 12,167, 96, 4,144,
+138, 22,105, 23, 31,199,115,187, 90, 81, 29,171,142,168, 98,193,241,234, 36, 9, 68,192,220, 41,102,168, 20,100,125,183,136, 10,
+216,218, 40, 16,193, 49,130, 56,138, 82, 36, 80,176, 54, 32,186,128, 56, 34, 1, 9,109, 95,213, 10, 65, 3,174,138,215,145, 16,
+ 19, 67, 82, 22, 94, 49, 4,169, 59,119, 73, 32,186, 81,196,137,162, 72,114,140, 21, 99,110,219,196, 62, 96,197,209, 10, 65, 29,
+ 51, 97,185,172, 16, 64,136, 84,119,118, 44, 16,181, 74, 49, 3, 23, 98, 8, 20, 51,198, 58, 71, 60,172, 13, 15,197,172,160,162,
+ 84,109,119, 93, 66,112, 19,170, 56, 4,161,152, 17, 98, 51,108, 2,160,234,212, 90, 40, 4,196,140,190,182,155, 83, 35,140,185,
+130, 7,164, 90, 19, 73, 2, 99,109,255, 21,230,138,138,224,226,168, 9, 34, 32, 53, 83, 1, 98, 34,105,196, 40,132, 20, 41,165,
+ 80, 75,197,165, 73,124, 12, 74, 41,134,122, 64,196,201, 24, 90, 22,136, 56, 6,132,152,176, 82,192, 42,169,119,106, 81, 74, 81,
+ 16, 71,125, 5,162,152, 8,181, 26, 34,138,132,128, 85,163, 74, 37,104,162, 83,200, 56, 88, 96, 52, 7, 2, 18, 28,149,136, 89,
+165, 75, 16, 70, 97, 25,140, 76, 70, 67, 64,139,161,213, 80, 87,162, 10, 5, 67,172, 82,170,227, 69,219,181, 28, 34, 85,160,221,
+ 81, 21, 87, 16, 81, 40, 5,173,142,204, 54,232, 74, 37, 84,195, 8,248,214,138,144, 34, 34,134,141,134, 75, 71, 17,167,214, 17,
+173,138, 41,140,163,209, 97,104,175,200, 50, 16, 36, 17,186, 66,193, 81, 42, 37, 11,115, 28, 73,149,133, 25,213, 5, 86,134,204,
+ 64,106, 66,138, 97, 33, 99, 82,208,226, 64, 36,152, 99,105,131, 33, 4,150,227, 10,250, 8, 42, 4, 79, 84, 45,116,217,200, 86,
+241, 85, 96,179, 15,228, 18, 17, 95, 33,170,104, 80, 82, 40,148,218, 17,107,192,197, 24,151, 77,192,243, 16,145, 33, 96,115,129,
+133, 81,180, 32, 57, 17,168,136, 58, 43, 91,226,181, 66, 7,163,102, 82,223, 81, 74, 66,124, 65,159,148, 98,214, 78,227,198,126,
+242,184, 98, 35,175, 8, 6,161,219, 96, 21,230,164, 34,140, 37, 81,125, 69, 82,129, 3,130, 45, 29, 89, 26,149, 66,148, 14, 17,
+131,220,145, 68, 17, 81, 34,198,144,122, 86,181,176, 44,153,154,149,212,181,235,148, 60,224, 14, 86,115, 51,206, 6,197,234, 8,
+197, 48, 53, 98, 8,184, 7,138,197,102, 36, 26, 12,155,145, 98,210, 6,225, 84,214,134,121, 97,158, 71, 72, 25,177,128,214,200,
+104, 43, 92,155,193, 59,132, 72,149,230,104, 20,182,152,197, 77,130, 11, 53, 4,196,141, 28, 3, 27,169,195,163, 83,114, 38,165,
+158, 66,161,203, 3, 26, 14, 82,226,138,213,202,241, 82,232, 21, 60,100, 74, 72,104, 46,108, 70, 67,124,160, 74, 70,180, 9,222,
+184,189,160,239,155, 97,140,247,136, 87, 52,129,231, 45,130, 9,157,244,152, 3,106,104, 84, 54,131, 50, 35,176,240, 74, 25, 33,
+ 5,101,227,130,158,154, 35,145,128,233,156,106, 70,169, 1, 17, 97, 22,149,110,191, 50,206, 29, 49,163, 80,137, 54, 35, 81,200,
+ 25, 86, 14,110, 14, 22, 33, 8, 81,193,164, 3, 10, 86,122, 66, 16,196, 87,132, 46, 34, 26, 48, 7, 29,148,128, 19, 98, 27, 79,
+ 59,109,162,254,184, 75,102, 92,246,232,125, 59,126,222, 9,101, 10,167, 81,174, 93,250, 23,103, 48,118, 3, 62,143,204,122,229,
+226, 11,247, 33,247,165,143,167, 88, 70,108,239, 46, 55, 20,182,162, 32,154,184, 96, 51,210,207,134,189,187,190,167, 73, 57,197,
+ 46,246,254,125,216, 49, 8, 4,102, 93, 96,223,129,254,188, 9,250, 78, 63, 20, 67, 37, 51,142, 5, 23,135,160,232,144,169, 42,
+148,209, 89,137,226,139, 37, 49, 10, 51, 13,212, 8, 43, 27,145, 89, 33, 34,108,244,251, 24, 23, 78,204, 66, 60,216,115,220, 20,
+ 61,178, 77,206, 75,180,131, 80,132, 84, 42, 5,160, 23, 60, 12,232,209, 54,118, 18, 93, 24,189, 32, 33, 80,202, 72,144,216, 60,
+219, 44,132,232, 77,144, 69, 41,213, 16, 5,241, 74, 8, 97, 61,160, 86,188,130,144, 48,140,234,165,157, 46,119,180, 86,204, 20,
+ 83,193,212, 80, 73,116,209,169,185, 98, 89,144,224,136,183,193, 90, 83,243,250,161,137,183,249, 72, 8,177,121, 98, 82, 17, 4,
+ 43,160, 98, 72, 74, 4, 4,138, 99, 46,136, 68,130, 26,213, 42,230, 70, 76, 1,119, 3,183,118,114, 67,196, 9,104, 6, 87, 24,
+196,192, 2,243,177,137, 44,106,164,117,255, 86,185,121, 77, 30, 65, 76, 49, 45,184, 8, 62, 58, 53, 8,157,116,184, 84,170, 26,
+234,144, 80, 50, 32, 24, 86, 64, 58, 80, 89,123,174, 34,184, 40, 54, 22, 92, 3,162, 80,115,165, 6, 39,136,182, 78,135, 74, 40,
+134,155, 19, 28,138, 85,114, 16,162, 4,188, 52, 27, 83,215,215,198, 9,212,154, 81, 29, 80, 42,149, 74, 34, 98, 42,132,181,209,
+ 69,234, 8,185,144,164,226,237, 62,162,100, 67, 36,145,218,101,193, 77,154,160,136,163, 81,219,117,145,178, 54,186, 28, 86, 75,
+ 98,136, 24, 32, 10, 49, 8,102, 5,204,233, 82, 36,133,158,108,149,106, 43, 84, 65,107,187,190, 18, 59, 58, 28,241,102, 36, 84,
+ 7, 47, 11,148, 68,236,148, 50, 86,138, 56,196, 66,174,138,105,196,179,182,123, 77, 32,168,225, 69, 40,161, 35, 38, 69,139, 97,
+ 94,154,137, 89, 33, 12,134,187,175,163, 64, 21,130,226, 42, 12, 42,100,131,229, 24, 72,201,232, 85, 41,193, 72,230, 8, 29, 70,
+ 65, 81,130, 56,213, 5, 29, 3,170, 21, 83, 71,171,144,199,140,199, 64,113, 65,134,212, 12, 31, 7, 33,131, 68, 74,133, 96,129,
+ 24, 7,188,203,216,106, 65,172,206, 56, 86, 48, 69,187, 64, 93,140,224, 78,181, 37, 21, 37,136, 50,200,140, 72, 68,122,195,163,
+ 17,101, 64, 28,180, 24, 57, 25, 81, 19,148,204, 56, 55,116, 16, 92,218,144, 54, 90, 4,182,169,171, 76,236,135, 38,110, 26,216,
+232, 19,171, 60, 82,139, 0,133,144, 18, 93, 13,140,221, 72, 94,122,139, 54, 85,103,136, 27, 88,223,162, 56,178, 12,224, 25,137,
+198,134,110,144, 25,169, 37,179,181,117, 20,145,136,153, 19,107,198,234,146,161,239, 24,139,177, 57,236,167, 75, 74, 8,219,220,
+181, 5, 38, 17,153, 45,177,197,138, 98,214,238, 7, 89, 65, 78, 72, 52,164, 19,108,116, 48,193,213, 17, 29, 17, 87, 98, 73, 16,
+156, 20,140,133, 5,108,233,104,116,200,205,129, 16,171,200,144,136, 12, 20, 12, 47,112, 32, 14,132, 40, 88,141,200, 40,152, 71,
+162,100, 74, 82, 54, 57,128, 5, 69,171, 49,218,136,196,129, 33, 21, 74,152, 45,132,206, 0, 0, 32, 0, 73, 68, 65, 84,134,130,
+161,150,154,225, 29, 55, 9, 30,168,158,177,224,216, 88,233, 92, 25,125,132,170,136, 11,165, 38,102, 93, 36,234,140, 81, 87,100,
+150,196,174, 25,202, 33, 42,121,229, 12, 62, 50, 22,225, 88, 40, 72, 74, 72,137,132,188,194, 7,197,123, 40,150,168,121,197,108,
+232, 9, 36,196, 97, 75, 42,137,128,211, 81,226,138,228,138, 17, 25,231, 32,131,181,254,199, 68,172, 61,190, 90, 82,108, 36, 12,
+ 3, 27,125,100,126,108,100,216,175,120, 89,177, 56, 26,233,135,125,172,100,139,200,140,125, 34,216, 56,178, 10, 25,181, 30, 24,
+208,148,200, 46,104, 41,120,152, 81, 99,193, 54,149, 20, 90,164,178,212,136,104, 7, 81,233, 53,227,174, 68, 87,212,123,138,173,
+218,184, 33,176, 49,219,184,223, 34,230, 14, 17,167,170, 50, 75, 5,233,186,243,163,142, 6, 1, 33,196,200,108,166, 64, 58,111,
+194, 27,189, 69,136,251,160,104, 63, 59,175, 33,240, 12,248,104, 32, 5, 73, 2, 57, 34,201,217,140,137,237, 60, 50, 95, 25,209,
+132,112, 32,177,176,202,254,208, 67,133,237,121,102, 51, 69,102, 27,153,213,246,156,149, 37,234, 0,146, 87,244,195, 1,124,182,
+193,102, 12,172,242,113,134, 24,169,161, 71, 10,216,226, 24, 58, 40, 78, 79,184,248,242,199,189, 42,184, 67, 8,132,144,214,230,
+140,180,171,100, 77,116,171,181,176,178,155, 83, 76, 8,205, 97,195, 69,144, 16,136,170, 32,149,160, 1, 83, 5, 1, 85, 65,109,
+ 45,208,193, 16,148, 24, 90, 72, 54,168,131, 74,243, 40,125,237, 29,227, 84, 7, 9, 10,190, 35,122,218,140, 39,131, 24, 20,241,
+ 10, 26, 80, 73, 68,117,240,230,185,167, 96,136, 64,206, 21,213,212, 66,153,205, 72,166, 90, 94,135, 95, 42,238,118, 79, 56, 72,
+ 20, 52, 40, 81, 3,201,156, 42, 80,130,160,185,133, 49, 53,208, 68, 57,128,187, 99, 98,152,131,107,109,131,101, 16,148,128,136,
+ 18, 66, 66,131, 96,162,184,129,209,172, 99, 80,194,144,112, 3,151,128, 74,160,223, 49, 23, 37,180,200,131,183,192,208, 50,151,
+181,161,232, 72,208,123,194, 69, 81, 4,119, 72,125,104,226,183, 78, 77,168, 8, 49, 6, 50,153, 32,144, 52, 96,234, 72,140,136,
+ 37, 60, 59,117,157,242,136, 24, 65,140,106,172,195,243,173,241, 22, 41,112, 28,195,131,222,243,223, 41, 30,240,224,235,176, 88,
+135,215, 54, 24,137, 8,230, 80, 28, 60, 8, 93,144,102,144,105,139, 24,152, 22,204, 13, 93,219,219,170,237, 62,170,107, 67,135,
+ 42,196,168,212, 10, 42,130, 56,152,121, 75,219, 84,161,186, 99, 82,137, 33,160,181, 9,176, 72,215,250, 26,104,169, 2,169,168,
+ 42,177, 8, 67,215, 65, 53, 82, 20, 66,151, 64,132,152, 4,143, 78,165,182, 72, 67,181,118, 28,210, 53,227,195,155, 72, 5, 42,
+ 21,165, 70, 65, 93, 49, 75,107,195, 66,200,238,148,209,155, 33, 87,154, 97,164, 65, 24,203,146, 90, 90, 28,171,235, 59,198,177,
+ 67,106, 33,134, 21, 49, 9,145,216,162, 0,120,187,249,196,241, 42,100, 31, 97,149, 9,149,102,212,248,136, 6, 33,154,225, 30,
+ 41, 54, 50, 11, 61, 42,144,151,115,164, 55,162,119, 88,140,164, 78, 72, 26, 16, 77, 44,243, 72,175,149, 88, 67, 51,102,131, 81,
+179, 99, 99,166,132,245, 45, 37,142, 57,228,170,104,105, 6, 56,140, 72, 7,203,226, 4, 21,186, 24,161, 42, 85, 71,186, 16,209,
+126,147, 36, 10,181,162, 58, 32, 33, 35, 29,100, 9, 96, 35,106, 29,117,125, 93, 86,197, 64,157,136,224,182, 66,106,166,139, 3,
+ 85, 34, 85,156, 56, 11, 12, 26, 48, 15, 52,231,196, 72,169, 39,132, 22,161, 49,105,158, 51, 4, 60,116,148,146, 41, 94,233, 66,
+130,212, 17,131, 82,165, 25,113, 9,195,125,164,170,160,125, 34, 13,145, 96, 61,206,136,166,158,104,142,122, 32,196,158,236, 43,
+136, 74,112,167, 75,137,209, 43,170,134,164,128, 75, 5, 21,108, 29, 65, 81,117, 82,216, 71,220, 31, 49,148, 90, 87,136,104,139,
+178, 8, 72, 12, 72, 14, 72, 48,102,113,134,133,136,185, 19,135,128,149,130, 86,161, 51, 33,151, 72,112,135, 40, 72, 85,114, 82,
+250, 40,104, 84,164, 8,163, 21,106,132, 46, 6, 52,130,107, 64, 67, 15,227, 72,139,111,128, 72, 70, 29,182,142, 45, 80, 4,180,
+237, 67,150,109,140, 29,235, 72, 68,217, 63, 27,144,226,160, 1, 87,129, 89, 71,119, 96,131,222,157, 52, 27,145, 62, 18,170,209,
+139,225,170,216,152, 91,100, 72, 2,226,153,150,172, 11,132, 36,136, 87,220,133, 62,118, 12, 93,224,178,199, 94, 66,236, 55,239,
+ 95,184,217, 96,117,108,142,231, 21, 7, 6,101,227,224, 5,187,130,227,231,206,162,192,246,177, 5, 82, 22, 92,120, 32, 18,103,
+ 7, 56, 31, 43,134, 87,224,248,182, 49, 46,183, 56,144, 50,251, 46,220, 0, 61,127,194, 62, 7, 14,127,114,197,226,232, 39,208,
+186,162,122, 97,116,163, 46,173, 69,107, 11, 68, 83,100, 22, 24,151, 6,209, 32,130,198, 64,170,138,140, 45, 50,231, 1,186,153,
+ 98, 57, 51,120,101, 65,166,174, 70, 0, 74,236, 25,116, 31,149,163, 20,132, 89, 80,182,115,104, 41, 99, 7, 84, 28,188, 34, 85,
+ 64, 11,168, 32,180, 27, 72, 2,168, 27,182, 14,149,123,139, 8,163, 65, 9, 40, 42, 21, 68,209,216, 18, 44, 6,205, 43, 10, 45,
+119,163, 82, 17, 81, 92,192, 11,136, 10, 65, 13,173, 45,239,107, 34,168,213,245,128,100,168, 87,140,174,185, 75, 72, 19, 87,179,
+182, 83,111, 97,122,139, 1,220, 16,111,225, 89,237,215,255,104,158, 49,154, 97,209,199, 1,195,201, 99,203,233,167, 24, 81, 49,
+178,173,197,168,253, 15, 1, 66,178,128, 25,100, 42,186, 54, 42,106,169,120, 21, 8, 17, 73, 16,170, 96, 82, 16, 17,180, 40, 33,
+181,208,183, 81, 1, 39, 6,193,139,144,146, 96, 18, 48,171, 48,142, 4,119,172,229, 12,168,166,232, 0,120,203,241,162,181, 69,
+ 64, 16,240, 74,146, 72,112,193,196,113,132,168,130,161,140,235, 28,101,144, 4,234,160, 78, 10,138, 72, 36,155, 50, 55, 35,136,
+ 32, 11, 71, 67, 37, 36, 35,214,204,106,177,164, 20,105,209,148, 46,210,185,224,154,192,154,248,182,136,132, 33, 57,147,171,161,
+162,104, 52, 76,192, 10, 80, 70, 36, 65, 29, 91,193,131, 32, 20,117,130,107,179,140, 4,138, 4,188, 84,116,108, 3,156, 37, 67,
+108, 64, 44, 35, 49,210,249, 58,252,149, 12, 51,176, 90, 90,152, 57, 42, 93, 82,106,161, 25, 77,181, 16,102,145,202, 72, 94,180,
+ 16,127, 87, 33, 87,199, 99,165,154, 82, 86, 43,178, 87,168,129, 71, 93,114, 41,179,161, 71,189,133,222,157, 74, 44, 61,171,229,
+136,132,192,124,107,139, 35,199, 14,115,241,129, 11,216,216,127, 33,113,136,204,139, 96,186,194,189,226,121, 64,107,166, 22, 37,
+132, 64,246, 17,207, 66, 55,236, 35,216, 72,233,106,171, 37, 88,129,121, 69,212, 48,115, 66,106,198,103,223, 57,154,103,148, 49,
+163, 93,108,225,100,153, 33, 82,112,150, 96,153,108,153,152, 4,141, 3,110,134, 89, 33,224,104,129, 94, 7,114,202,120,215,163,
+ 40, 99,206,168,182,218, 1,201, 16,101,133,210, 17, 58, 33,231, 37,209,157,232, 27, 88, 52,130, 25, 30,193, 18, 4, 29,216,164,
+ 96,157,226, 75,167,154,161, 10, 41, 10,133,145,129,158,226,173,102,102,149, 3, 99,103,136, 86,186,110,131, 32, 6,203,109,114,
+ 82,138, 24,125,153, 19, 36,145, 23, 6,193, 41, 33, 65, 93, 17, 76, 48, 13, 12, 7, 34,203, 99, 11, 66, 80,124, 72, 45, 58,150,
+157, 28,115, 11,183,214,132,229,138, 6, 65, 67,196, 10,172,130, 35,217,113, 7,106,203,169,215, 82,137,234, 20,221, 32,212, 17,
+145, 64,164, 99,105,133,125, 18,161,135, 42, 35, 86,123,162, 87,164, 66, 30,141,101, 57,134,171,145,106, 33, 12, 1, 31,157, 98,
+133,160, 61,125, 72,184,143,148,108,184, 20, 10, 80,151,145,106, 17,234, 18, 15,134,155,182,240,184,174,232,150,155, 20,113,146,
+ 25,150,156,210, 41,113,169,140,101, 36,165, 25, 49, 12,148,228, 40, 1,219, 42,172,242, 10, 73, 61,244,138,174, 42,157, 26,101,
+213,181, 52,145, 6, 76, 87,152,117,104, 86, 86,186, 69,223,247,212, 26, 17, 23,246, 15,129,185,101, 40,134,123, 38,151, 99,224,
+137, 62, 5,204,149,216, 67,234, 18,226,133,100, 1,223,152,161, 2,155,117, 31, 23,236, 75,228, 26, 40, 41, 82, 93,232, 6, 88,
+149, 37, 54, 79,196, 26,136,105, 70, 89,174,176,218, 97,227, 18,157, 69, 98, 23, 72, 37, 82,212, 8,235,208,147, 14,218,234,138,
+ 66, 27, 7, 85,133,161, 31,208, 24,238,191, 72,174, 12,183,220, 66,204,225, 60,122,188, 25,130,228, 86,247, 19,187,243, 34,232,
+ 0,163, 67,205, 25,165, 69,255,206,103,232, 29, 96, 81,161,140, 43,200, 14, 21,162, 27,169, 58,121,128, 88,148, 33, 26,177, 87,
+200,142, 23,167,215, 22,117, 17,135,229,170,213, 72,213, 84,169, 73, 25,150,128,110,176, 8, 66, 89, 44,240,110,147, 78, 5,182,
+182,240,176,197,144, 18,197, 20,179,237,150, 14,243,236, 72,171,179,193,204, 48, 23, 34, 9,113,167,120, 37,122,128, 10, 30,148,
+128,224, 33, 16,104,131,176, 10,152, 85,220, 50, 30, 59,172,180, 80,137,136, 96,230,205, 80,160,121, 71, 74,165, 90, 11, 57,160,
+ 96, 30, 81,154,215, 95,165,229,131, 93,215,169,107,109,161,172, 10,116, 2,174,134, 75, 11,135, 7,137,205, 10,201,133, 40,130,
+133, 0, 94,176,108,184, 43,130, 83,154,107,140,120,110, 65,135, 38,153,235, 1, 21, 98,140,136,181, 34, 45, 36, 16,164,146,243,
+ 58, 68, 27, 66, 43,226,208,132,135, 57,234,218, 78, 78,113, 98,132, 92, 65, 44,224,238,100, 27, 81,137, 80, 5,141,130,173, 11,
+ 71,188,100,136,235,188,185, 53,175, 30,175,120, 85,138,192,204, 34,172,163, 6,226,235,200, 4, 21,143,129,234, 21,163,229, 34,
+171, 11, 85, 2,142,209,187, 32,162,212,104,120,113, 20, 39,163, 84,247,230, 20, 38,109,121,181, 58, 71,114, 97,235,174, 35, 28,
+ 93, 56,166,105,157,247, 83,130,172,232, 59,101,163, 75,136, 36,232, 20,109, 81, 91,196, 91,184,220,204,176,146,233,250,141, 54,
+ 8,187,227, 46, 68, 81,242,168, 96,133,216, 69, 92,157,156,141, 72, 32, 4,163, 72,110,213, 48,157,226, 43, 16,150,184, 58, 93,
+140, 72, 85, 36, 9, 57,183, 99,237, 52, 98,177,146,205, 24,250,117,200, 51, 84, 74, 54,242,209,109, 86, 11,103, 57, 63, 78,149,
+ 74,201, 74, 33, 35, 14, 73, 19,102,198,162, 20, 66, 63,240,216,191,189,159,139, 83,224,240,145, 45,114,110,181, 19,243,220,138,
+ 37, 85,157, 59,238,254, 4,159,248,228,156,143,221,113,152,139, 47, 57,194,229,151, 95, 74, 31, 15,160, 68, 86,217, 48, 90,205,
+128, 57,184,143, 80, 58,186, 32,200,114, 93,216,153,148,213, 88,214, 69,142, 70,135,160,161, 67, 66,162,150,177, 69,146, 98, 70,
+ 98,162,230, 22,209,137, 82,154,129, 59, 12,212,149, 65, 17, 74,134, 33, 8,197, 90, 78, 83,130, 48,154,160, 98,132,210, 68, 99,
+206,146,160, 51, 54,102,155,228,178, 98,244, 57, 51,113,146,119,172,182, 71, 66, 12,164, 16,168, 94, 40, 53, 97, 35,152,141, 40,
+149,148, 18, 35, 74,210, 68,208,142,101, 90, 32,106,176,161,248, 86, 79, 13, 21,239,156,148, 21, 99, 73,144,129, 26,149, 90, 51,
+ 67,104,255, 95, 99,201,196, 24,232, 59, 90,196,101,110,148,222, 41, 8,154, 51,113,232,216, 62,226,140, 94, 40, 46, 45, 85,102,
+218,238,237, 40, 12, 68, 68,157,101,172, 45, 99,105, 35, 26, 64,181,167, 19,165,178,164,118,145, 90,189, 21,116,166, 74,117, 39,
+185,226,253,128,196,142,213,184,160,235, 35,174,180, 98, 82, 15,168,131,149,136,164, 74,164,178,169, 61, 75, 45, 4, 43, 56, 25,
+ 98,196,169,148, 12, 50,174,240, 80,208,216, 82, 31,203,177,165, 29, 24, 91, 4, 43,169, 98, 99,165,168, 48,247,138, 82, 80, 45,
+ 84, 47,120, 21,196, 5,247, 76, 74, 9,196,201,203,145, 82, 34,155,177, 9,161, 97,132, 90, 8, 4,180, 11,164,101, 97,177, 79,
+176,226,212,186, 34,154, 65, 89,146,221, 24,147, 96,219, 75, 82,236,240, 46,112,248,216,162, 85,129,244, 74, 41,129,161, 19, 98,
+ 63, 99, 89, 35, 33, 4,102, 41,160, 67, 34,120, 70,150,137,126, 38,212,234,196, 82, 89,149, 86,243, 84,103,145, 92,140,152, 51,
+221,178, 96,143,158, 51, 31, 35,157, 9, 34, 61, 27, 51, 97,105, 3, 75,131,125,174,152, 20,186, 16,241, 40,116, 8,193,109,157,
+110, 19, 52, 70, 74, 23,208, 24,136, 97,184,127,161,119, 90,244, 46,210,156,180,216,199,243, 18, 38,223, 41,241, 21,167, 21, 70,
+167,254,188,137,110,109, 46, 22, 90,141,141,205, 8,247,243, 28,156, 36,107, 64,174,160, 82,112, 9,237,127, 63,209,198, 74, 12,
+117, 97,233,176,223, 13,143, 66, 89, 22, 74, 16, 66, 8,132,141,202,220,156,154,141,205, 0, 94, 11, 93, 13,148, 85, 75,225,185,
+ 47, 9, 86, 89,216,136, 14, 70,239, 61,228, 57,177,223,135,149,163, 68, 81,199,188,133,217, 53, 40,238,165, 9,145, 52, 15,189,
+ 82, 17,147,245,223,104, 5, 71, 42, 4,243, 86,249, 41,134,135,208,170,111,173, 21,184,137,180,220, 89,147,127, 97,180,102,165,
+107,144,150,159,174,235, 66, 55,117, 28, 71,221,113,109,129, 96, 49,199, 5, 52, 42,110, 45,103, 94,139, 19, 66,196,131, 80,169,
+ 68,105, 66, 83,173,213, 74, 6,109, 21,247,230, 17,213, 76, 31, 91,248, 78,140,117,117, 56,132,216, 34, 4,209,149,162,237, 31,
+216,220, 40, 53, 55,143,199,149,178,174,206, 15,162,212, 85,133, 24, 33, 4, 48,195,179,145,139, 97, 34,120,208, 22,209,200,144,
+146, 81,181, 21,178, 17, 90,214, 98, 92, 23, 15,105, 13,116, 23, 62, 1,205,119,177,216, 62, 70, 76, 45, 82, 81,106, 38,105, 36,
+ 68, 69,106, 5,107,245, 8, 82,155,181,232,102,172,162,183, 10, 85,175,184, 86, 52,117,212,172,152, 87, 66, 7,190,180,118,103,
+ 26,152,103,146, 37,198,213,156,213,124,155, 99, 71,140,227, 34, 36, 85,162, 45,201,101,108, 6,140, 71, 86,139,192, 34, 69, 98,
+ 76, 72, 15, 27, 49, 49,196,158, 16, 91, 38,176, 87,216, 30,141, 82, 43, 42, 21, 13,161,213, 69, 72, 70, 61, 96, 34,237,105, 2,
+ 17, 36, 54, 35,174,138,173,207,181,208,229, 30,247,138,197, 66,136,161, 21,255,100,103, 8,210, 12, 17, 51, 98, 23, 17, 89, 23,
+139,212,130, 70, 97,156,111,115,236,174,227, 28, 91,117,108,110,238, 99, 85, 90, 74,194, 37,162,235,168, 69,174, 43, 68, 19, 49,
+ 69, 44,175,184,228,130,253, 60,254,224, 38,159,252,248, 17,114,128,228,235, 28,183,116, 28,191,235, 19,220,126,231, 81, 54, 30,
+117, 57,125,136,204,183,143,241,209, 15,222, 70,234, 6, 46,126,204, 99,216,119,193,197,140,139,145,236, 5,233, 3,193, 21,245,
+246, 79,213, 6,249, 2, 99, 11,193,166, 52, 80,124,196,149, 38, 72,210, 19,146, 65,137,228, 58, 18,226, 58,239, 43,125, 75,199,
+228, 12,181,195,195,136,228,130, 81, 89,209, 55,175,192, 50,173, 74,197,113,109, 69,137,102, 70,116, 1, 70,198, 26, 49, 5,199,
+ 88, 89,100, 30,150,116,162, 4, 15,204,197,232, 76,153,251,146,141,125, 61, 41, 43,110, 17, 20, 66,173, 48,182, 58,128, 16, 91,
+ 97,107,222,106,181, 24,125,236, 24, 87,149, 81, 42,251,117,134,176, 65,149, 5,163, 45,241,212, 17, 61, 17, 61,224,181,213,115,
+228,117,137,178,148, 17,151, 74,145,196,184,204,140,101,217, 60, 62,239,218,255, 69, 40,136,111, 96,186, 36,206, 6,202,184,162,
+ 11, 27,104,167,176, 20,136, 21,195,113, 81,100, 95, 66, 77,137, 25,146, 27, 43,235, 90,154, 65, 2, 30, 35,186, 26,177, 0,193,
+ 33, 91, 33, 58, 80, 29,223,232,137, 56, 35, 35, 53, 27, 9,199, 70, 97,236,105,199, 98, 61, 49, 26,162,165, 25, 85, 52,195,175,
+172,203,181,163, 67, 10, 21,186,196,106,158, 33, 20,130, 7,156, 72,214,142,104,133, 49, 26,189,206,208,218,147,217, 34,142, 70,
+ 77,173,202, 91, 81,138, 85,250,184, 46,160,204,133,124,116,201, 50, 26, 93,104, 79, 33,104, 22,170, 23,196,135, 22,205,202,149,
+ 16,133,162, 74, 20, 39, 58,148,174, 99,144, 30, 75,129, 46,118,100, 59,202,102, 95,153,177,201, 98,181,141,205, 43,165, 70,220,
+ 70, 58, 89, 17,242, 6,139,232, 16,140, 33,111,128,192,106,105,216,152,241,141,128, 95,160, 32, 61,145, 14, 17,167, 4,103, 89,
+188,229,247, 99, 70,139, 16,246,117, 45, 74,164, 66, 52,109, 85, 55, 30,128, 74,180,136,122, 97, 24, 28,237,226,121,144, 49,199,
+ 35, 68, 51,250, 20,206,155,231, 43,214, 82,181, 73, 32,166,120,222, 68,215,141,123,106,185, 82, 60,191,185,122, 0, 51,168, 37,
+227,222, 34, 51, 26, 34,203,229,146, 96, 10, 38, 84, 10, 94, 71,142,199, 66, 23,133, 42, 66, 94, 25,186,168,204, 54, 54, 16,151,
+ 22,145, 21,133,161, 99, 57,102,198,156,155,147,103,199,241, 60, 96,195,128,213, 5, 98,133, 65, 58,142,215, 57, 33,116, 68,168,
+248, 58, 92,237,102, 45,204, 46, 77,108, 52,134, 86, 69, 46,180,220,175,182,240,141,172,159,101, 48, 49, 68,194, 58,111,211, 66,
+164,110,134, 75, 59,200, 90, 11,130,182,112,181,234,218,238,106, 23, 9,113, 4,199,204,113,137,136,210, 30, 45,145,102, 73, 86,
+ 49,204, 29, 83,105, 85,182, 42,235, 4,124,179,130,146,180,160,183,212, 17,183, 64, 81,232, 82, 69, 44, 96,165,162, 8, 53, 52,
+ 35,195,112,130, 64,169, 74, 22,133,149,177,180,202,108, 22,169,185, 80,150,137, 16,140, 40, 21,243,212,142, 73, 13,169,173,224,
+206,173,172, 31,229,232, 91,228,193, 10,170,177, 21,212,137,181, 71,235, 20,186, 96,216,168, 56, 74,176,140, 5,184,236,241,151,
+242,180,164,252,201,159,207, 57, 94, 13, 66, 19, 58, 17, 65,157, 22,154, 39,147, 84, 25,173, 34, 26,136, 49,144,180, 85,255, 86,
+ 10,120,171, 63, 48, 17,124,149,169, 93, 98,232,218,113,206,196, 89,141,115,142, 29, 94,114,116,203,200, 12, 84, 32,132,140,212,
+ 5,243,197,138, 85,117,204,140, 64, 89,187,229,129,161,235,209,206, 24,187, 13,134, 80,233,251, 68,232, 2,105,150, 72,177,165,
+ 94, 70,175,104, 49, 66,215, 66,239,129, 86, 84, 41, 2, 86, 28, 9, 52,207, 77,157, 32,130, 86, 33,196, 74,169, 21,207, 1,145,
+138,105, 32,104,165,140,161,229, 81,125,132,234, 20, 11,104, 39, 88, 94,113,228, 19,135, 57,124,236, 24,139,165,209,111, 30, 64,
+ 67,199,170, 44,201,117, 36,174,115,143, 59, 6,147,149,150, 30, 25,129,237,197,130,203,159,113, 25,183, 94, 52,227,246, 59,182,
+ 8, 2, 46, 17,100,201,209,163, 71,208,126,131, 11, 47, 24,216, 47,129, 44,151,176, 61, 6,238, 62,114, 23,135, 63,244, 97, 46,
+185,248,110, 46,189,248,113,244, 27,155,148, 85, 69,129, 24, 30,133,198, 57,105, 44,108, 85, 3,156, 32,177, 25,169,210,211,245,
+153, 82, 86, 88, 30,233,215, 79, 95, 72, 8, 4, 28, 82, 68,215,145,140, 81, 87,212, 26, 8,204,168, 97, 78,151,189, 21,235, 69,
+176,249,255,207,218,187,245, 72,150, 29, 89,122,159,217,190,156,227, 30,151,172, 11,139,108,146, 98,179,187,213, 45,116, 79,235,
+ 50, 45, 13, 4, 12,160,145,158,244,191,248,167,244,162,223,160, 7, 61, 8,141,145, 26, 28, 77, 95,201,170,188, 71,132,187,159,
+115,246,222,102,122,176,157, 73,189, 8,146, 80, 25, 0, 1, 22,193,204, 10,143,112, 63,123,219,178,181,190, 69, 60,252,138,226,
+ 24,228,202,169, 14, 52, 17,198, 38,187,145, 60,129, 62,210,184, 49,198, 1, 57,179, 12, 65, 49,186, 88,236,189,173,199,234, 32,
+ 85, 74,137,207, 88, 58,194, 72, 34,181,211,110, 3,115,167,214,196,182, 59,105, 93, 89,134,179, 15,208,250, 68,238, 17, 61,124,
+249,120,144,189,160,201,227,194, 41,194,154,160,229,193,117, 55,212, 20, 74, 65, 84,168,165,177, 15,167,230, 19,227, 56,208, 90,
+176,110,160, 21, 21,165,228, 74, 86,167,177, 33, 75,165, 31, 27, 75,209,240,215,164,133,235,209,201,201,145, 28,254,154, 36, 11,
+167, 7, 97,219,122,188, 95,186,114, 28, 66, 89,194,157,109,105, 39, 17,207, 26,241, 48,104, 30,227, 25, 89, 64,151,132,111, 66,
+247,103,170, 36,106, 94,105,182,113,236,157,211, 90,226, 18, 91, 43,227,114,197, 51,120,235,177,225, 77, 57, 46,128,169, 96,118,
+ 76,149,232, 20,134, 51, 49,202,249,132,121,166, 30, 79,116,205,208, 43, 35, 13,134,221,232, 71,167,171,226, 61, 46, 93, 55, 55,
+180,213, 48,227, 46,149, 86, 22, 28,227,180,156,121, 76,149,151,219, 65, 33, 33,154, 73,169,208,172,177,206, 11, 3,174, 92,183,
+ 78, 25, 23,100,141,203, 15,251,142,202,142,164, 19, 47,251,134,237, 78, 57,125, 5,115,152, 89,164, 80, 30, 23,188, 11,108, 30,
+ 41,128,118, 69,234,202,121, 45,216,101,196, 51,112, 81,212, 19, 36, 97, 59, 58, 15, 57, 97,110,120,142,213, 78,169,133,161, 66,
+113,229, 84,214, 31,125,160, 25, 17,243, 13,123,129,144, 74,249, 98,211,174,185,225, 54, 88,138,198,100,246,165, 14,117, 15,191,
+137, 26,228, 90,190,184,252,126, 52, 16,107,148,228,108, 12,220,102,242,234, 20,178,134,238, 32, 46,236,215, 65, 90, 42,231, 82,
+ 80,117,174,190,115, 60, 93,184, 63,159,177, 62,120,105,157,243, 93, 98, 32,120, 63, 81,229,160,237, 66, 83, 71,181,160,253,129,
+131, 27,221, 55,106, 46, 28, 71, 33, 35, 25,241,136,148,185, 15, 64,195,192,164, 26,147,245,208,207,175,215,220, 64, 50, 88, 11,
+ 73, 91,115, 28,248,128, 15, 99,140,216, 53, 38, 28, 12, 4,197, 60,166,244, 33,131,146,231,131, 61,129,245, 61,114,133, 26,242,
+157,247,129,251, 64,139,226, 3,116, 76,243, 93, 6,119,101,152, 32, 24, 41, 73,196,153,188, 77, 9, 59,178,219,106, 48,114, 39,
+229, 18, 89,249, 41, 81,187,199, 69,193,136, 9,188,211,201, 25,150,145, 66,174,215,185, 66, 72, 48,218,148,163,177,240, 18,244,
+ 78, 31, 29,205, 25,247,200,124,138,247, 57, 65, 11, 84,193, 40,168, 59,102, 74, 34,145, 5,154,109,180,174,164,212,120,243,219,
+255,149, 81,157,125,186, 11,173, 77, 53,255, 56,200,178,132,241,110,116,208,138,168,161, 73, 25,195, 73,150,145, 20,145, 48,215,
+144, 94,146,128,166,152,168,205, 26,251,190,241,241,165,241,225,121,103,179,153, 2, 72,141, 36, 59,182, 15, 46, 35,162,125, 70,
+248, 25,134,132,148, 37, 46, 92,143, 3,237,198,222, 52,190,191,227, 64,114,226,252,205,119,220,221, 87, 62,190,190, 6, 43, 64,
+ 51,168,227,219,193, 48,161,219, 65,169, 43,146, 50,227, 0,211, 48,196,173,185,114,120, 28,246,174,130, 74, 15,222,193,209, 99,
+106,177, 30, 43, 30, 28, 90, 39, 73,231,250,242,129,167,167, 15,124,120,238, 28,230,136, 56,185,111, 56, 95,163,105,161, 95, 14,
+ 70,106, 97,104, 36, 51, 92, 65, 58,221, 28, 21, 37,201,193,127,253,159,255,148,209,158,249,159,254,231,255,157,102,160, 90, 24,
+199, 21,183,196, 87,231, 19,169, 29,188,125,121,225,116,122,224,235,175,190,227,187,239,254,154,143, 47, 47,188,249,253, 63,242,
+230,245,191,231,143,126,246, 13,223,126,253,115,206,143, 95,209,246, 43, 38,198,186, 22,206, 30,174,119, 81, 71,108,167,212,130,
+250,202,170,202,166, 47,136, 74, 68,182,214, 21, 90,199,219,149, 83, 17,182,230, 72,202, 20,156,222,183, 88, 65, 45,153,126, 27,
+ 72, 17,252,172,113,136,102,197,117,128,118, 92,194, 45, 47,119,138, 30, 70, 59, 6,235, 84,202,142, 22, 70, 20,243, 48,144,105,
+ 90,168,230,248,165,179, 87, 69, 52,209,111,142, 90,225,112,200,107, 24, 45, 87,117,182,222,232,125,112,174,225,141, 41, 77,216,
+211,206, 80,143,239,161, 43,195,116, 94, 94,130, 49,208,198, 1,182,144, 79, 39, 82, 51,196,148,209, 54, 68, 79, 48,156, 49, 12,
+147, 75,172,157,172,163, 37,179,228,132,221,118,242,233, 1, 31,141,197,157,230, 70,202, 15,148, 82, 40, 52,158,111, 27, 85, 87,
+198,233, 32,159,156, 59, 18,125, 52, 76, 50,218,140,242,237,137,227,221,109,122, 38, 10, 35, 37,178,117,106, 79,236, 52,198,136,
+235,185, 72, 13,207, 65,135, 68, 39,167, 76,111,225, 77, 41,154,169,107, 24, 1,251,238,184, 14, 54, 55, 82, 3,225,140,248, 65,
+202,141,145, 11, 73, 51,218,149,221,110, 44,114, 66,232,160,157,222,194,124,123,115,167,111, 59, 75,238,100, 81,110,192,144, 30,
+198, 57, 95, 88,115,194,252,133,113, 50,170,148,240, 27,245, 22, 23,226, 82, 57,110,157,236,194,230, 87,186, 23,216, 14, 74, 27,
+108, 98, 28, 99,193, 77, 41,192,177, 30,208,157, 98, 32,169,144,238, 31,177,214, 24, 55,208,154, 72,105, 39,121,230, 65, 87,158,
+ 85,209,190, 65, 90, 80,132,147, 14,236,225, 76,139,253, 17,101, 41, 88,118, 14,230, 10,205, 18, 57,103, 54, 19, 74, 10,246, 72,
+169, 25, 73, 57,100,136, 84,168,107,249,209,123,234, 49, 71, 83,117, 67,220,191,200,142,254, 15,151, 5, 34,107,159,132,255,231,
+140,220,255,255,175, 62, 96,140, 78, 86, 35, 45,235, 23,219,213,127,250,121,140, 14, 58, 58,189,247, 80,185,213, 73, 35,225,123,
+ 35, 37,167, 38,199,199,160,120, 5, 51,174,215,131, 34,194,157,172,152,108,112, 26,220,146,147, 13,218, 21,172, 56, 35, 95, 41,
+205,120,113,168,115,197,109,150,200, 86,131,111,144, 43,164, 51,233,143,126,241,199,191, 41,105,198,246,199,244, 87,167,216,111,
+171,134, 49, 42, 79,121, 69, 16,146,204, 7, 64, 4,168,208,153,197,150,252, 73,130, 23, 82, 73,161, 90, 11,184, 42, 57,101,210,
+ 92,195,185,143, 48,181,187,204, 76,110, 10,202,129, 7,140, 6, 97,238,160, 53,114,242,238, 1,234, 40, 5, 45, 74, 34, 99,222,
+ 2,176, 66,194,100,238,173, 73,136, 38,134, 9, 41,205,139, 9,196, 63,139,146,167,187,144, 17,113, 49,106,138, 9,208, 70,236,
+ 86, 82,152,119,204, 13,173,225,106, 55,111, 97, 28, 35,148,134, 54,122, 56,180, 61,192, 25, 38,241, 51, 48,226,127,179,153,217,
+ 30,238,211,221, 45,236,163,243,254,186,199,228,111,134,117, 67, 25,177,103,105, 7, 46, 66, 82, 97, 31,206, 24, 17, 49,241,102,
+ 52,179,152,142, 36,209,123,184, 85,201,153, 84, 29,235, 79,124,120,243,196,247, 31, 14, 94,122,130,162,241, 90,180,225,182,113,
+244,169,136, 76,233, 74,145,128,226, 0, 18,118,248,216,253, 15,167,143, 3,243,193,222, 99,106,249,197, 79,127,202, 47,190,174,
+188,127,190,177,223, 54, 94,158,223,113,187,190,240,244,241,137,231,203,133,143,207, 23,158, 95, 94, 24, 14,119,107, 65,181,198,
+ 95, 54, 52,128, 55, 22, 38, 30, 18,216, 16,186, 55,204,103,254,212, 59,163,117,182,231,143,124,120,255, 3,223,191,121,207,251,
+107, 15, 94,193,132, 29,229, 82,249,238,155,175,184, 91, 86,142, 99,139,181,132,135,145, 83, 61,110,111,214, 27,244,198,162,133,
+191,249,203, 95,241, 39, 63,251,138,191,251,199, 39,222, 94,247,144,133,199,198,240,131,156, 43,215,219,198,205,140, 54, 58,151,
+203, 27,164,191, 80,214,133,199,243, 79,233,238,188,121,243,129,143,111,127, 79,178,198,122, 87,169,158,240, 97,116, 31, 97,128,
+114, 35,159,214, 80, 85,134, 98, 73,200,222,145, 2, 62, 4, 59,224,126,133,214,226,189,159,165,162, 53,147,221,208,113,112, 76,
+178,131, 15,137,196, 69, 62, 49,134, 35,214, 25,110,228, 97, 12, 22,202,168,228,210,145,228, 88, 75,184, 77, 16,202,112,164, 19,
+123,113, 19, 24,194, 41, 47, 52,160,119, 71,151, 18,224,166, 30, 38, 69, 39,140,120,153,140, 46,149,222, 19,106, 78, 89, 6,189,
+ 31,244,121,105,204,106,212, 84,241, 84,177, 53,226,160, 41, 37,214,101,165,213, 20, 81,206,139,177,245,193, 16,165,181,131,205,
+ 99,253,208,183, 13, 81, 39,245,202,146, 87, 82, 54,198,176, 88,215,168,147,181,224,201, 89, 24, 36,133, 77, 2, 16, 85, 82,162,
+ 97, 20, 77, 20,207, 32, 39,228,214, 64, 11, 3, 98,191,222,143, 48, 18, 10,248, 72,241, 41, 55,167,239,161,106, 68,230,253, 96,
+ 45,113, 57, 53, 83,146, 41,146, 70,172, 79,236,142, 61, 53,134,117,116, 79,180, 30, 23, 74,119, 65,164,179,141,131,222, 65,165,
+134, 74, 54,182,112,199,219,224, 44,101,174, 27, 21,215, 59, 78, 53, 5, 19, 33, 43,231,122,138, 11, 14, 22, 23,251, 28, 74,136,
+ 31,134,168,146,206, 25, 29, 59, 93, 29,219,140,209, 15, 52, 45,145, 18, 34,163,230,140, 69, 24,217,168, 67,168, 89,112, 93, 66,
+124,172,133, 69, 5, 74,198,215,133,180, 9,181,156,201,154, 80,205,184, 20,138,215, 88,103,121,192,183,150, 44,156,239,148, 75,
+111, 12,115,106, 2, 58,200,110,164,109,160,165,224, 38,156, 22, 9,181,117,178, 31,210, 92,107,230,148, 88,180,240,147,111, 31,
+ 88,239, 31,127,156,153,205,224,242,124, 99,244,131, 34,131,135,199, 59, 72, 63, 62,210,214, 28, 46, 79, 59,118,220,184, 95,149,
+122,119,255, 69, 14, 95, 3, 94,110, 70,191, 94, 41,222,120,120, 40, 72,185,251, 98,135,122, 3,222,188,111, 92,222,190, 99,180,
+ 43,230,198,190, 31,140,209,226, 12,114,231,198, 32, 75,101,119,167,103,163,223, 2,110, 52,138,176,109,141,102, 47, 17,183, 59,
+223,177,223,174,232,166,140, 28,166,206,228,149, 38, 3,247, 28,151,190,179,210, 7,236,151, 39,182,235, 59,210, 79,126,254,199,
+191,201, 51,130,150,210,148, 89, 85,113,139, 55,130,194,220,241, 41, 37, 41, 62, 65, 48,174, 78,174,133,164,142,183, 17,123,107,
+143, 75, 64,164,205,226, 67,230, 6,168,199,100,251,233,224,158, 57, 53,145,132,206,195, 81, 68,200,154,227,154,147, 4,117,139,
+184,146,228,121, 11, 49,242, 8, 83,153,121,184,237, 19, 57, 60, 0, 51,226,158,210, 39,192, 73, 2, 27,177, 91,148,136,108, 73,
+174,244,214, 34,202,229,130, 73, 33,143, 1, 35,148,130,125,239,241, 32,241,120, 45,195, 27, 54,156, 82,115,196,213, 90,143, 7,
+108, 73,145,145, 86,157,119,145, 78, 74, 11, 69,116, 26, 8, 7,185,156,226,114, 82,148,156, 64, 75, 66,143,142,117,137, 67,214,
+253,243, 53, 41,139, 48,136, 41, 85, 20, 36,231,184,116,184, 7,145,202,231,238, 80, 5,177,141,203,199, 55,252,238,119, 55,158,
+246,133,161, 9, 77,176,172,137, 36,141,190, 31, 28,157, 9, 15,154,210,213,167,108, 54, 25,153,196,189, 16,114, 45, 36,202, 17,
+106,137,217, 96,223, 55,236,104,177,191,237,198,245,227, 19,111,222, 63,243,114,221,216,154,209, 71,120, 28,122,173,124,245,211,
+ 87,124,247,112,230,184, 28, 17, 69,148,198,104, 35,124, 9,132,223, 33,232,119,142,123,199,108,208,219,193,203,251, 55,124,255,
+230, 53,239, 94,118,204, 39,188,100,102,236, 98,194, 87,198,237,133,235,229,153,235,237,133,125,116,122,111, 28,183,157,253,104,
+225,129,240,240,129,124,124,255,145,114,255,138,255,225,191,251, 11,164, 57,127,247, 47,111,177,105,154,234,214,200,170,180,227,
+160,245,142,245,206, 72,202,211,118,227,118,123,135,182,141,188,156,184,187,251, 9,221, 18,191,127,253,134,167,119,175,201, 58,
+184,171, 39, 60, 45, 72,249,164, 74,229,136, 90,114,101,120, 35,175,107, 92,230, 90,163,139,211, 70, 67,150,204, 72, 43, 93,149,
+214,118,250,110,152, 36,134, 57, 72,162, 46,105, 78,186,113,120, 38, 58,201,136,139,154, 84,234,146, 40,192,229,104,168,198,131,
+ 1,132,243,114,199,176, 22, 83, 62,198,209, 7,121,105, 84,237,248,176, 88,222,137,179,222, 45, 20, 45,248,216,201, 82, 64, 50,
+186,196,231,184,212,160,199,221,118,167,150,206,216,226, 66,172, 8,199,209, 81, 9,176,210,162, 74, 19, 56,110, 59,214, 6,123,
+151,152, 50, 59, 28, 42, 28, 22,123,110, 12,186, 27, 85,149,130,241,210,246, 9,131, 2, 41,107, 76,251, 9,106,169,164,147,210,
+ 53,179,228, 21, 45,130, 22,200,150, 89, 79, 5,245, 51, 71,143,125,124,213,206,209,156, 70, 99, 61,173,161, 94, 20, 1, 73,184,
+159, 41,169,227,218, 16,141, 72,220, 80,193, 74,161,158, 18,227, 24,225,201, 73,130,143,193,190, 95, 16, 27, 36,113, 54,187,146,
+ 90, 24, 29,199,100, 72,157,114,162, 42,168,156,130,135,224, 21,207,137,162, 39, 76, 13,242, 2, 42,172,229,192,250,136,103, 70,
+238,100,171,140,222,232,214, 24, 12, 48, 67,172, 49,124, 32,229,196,184, 12, 36,133, 54,182, 15,199,178,147,151,149, 98,145, 54,
+ 89,238, 86,242,169,178,172, 15,152, 15,244,124, 38,141, 65, 42, 80,101, 33,121,192,142, 74,142,100,140, 75,227,252, 80,208,180,
+224,117,144,186,208,125, 65,178,179, 32,124,120,110,200, 80, 30,214, 66, 61,192,199, 96,152, 80, 78, 39,238,139,144,242,140, 28,
+ 39, 72,154, 40, 75,250, 67, 28,182, 86, 78, 53,243,147,111,191,161,252,200,156,250,165, 67,219, 54,122,111,172,234,220,189,122,
+ 12,114,214,143,252,218, 28,110,151, 6,125,231,126, 77,148,243,221, 23, 57,212,119,224,118, 25,180,118, 35,251,193,227,227, 25,
+201, 95, 46,206,118, 1, 62,126, 24, 92, 63,126,192,246, 23,108, 42,219, 85, 74, 92, 32,187,147,125,112, 28, 17, 51,190,211, 28,
+145,229,220,185, 28, 7,173, 9, 71,235,148,121, 33,189,202,141, 62, 4,233, 27, 89,140,161, 3, 93,148,109,187,210,112, 84, 23,
+ 56, 6, 42, 43,102,144,126,254,235, 63,251, 77,118,139,105, 78,102, 28,102,146,162,196,231, 1,238, 80, 74, 72,211, 17,237,153,
+128, 62, 15,171, 62,104, 76,204, 30,121,116,149,136,100,105,170,177,167,159,230, 57,155,217,100, 33, 12,105,174, 22,217,113,211,
+153, 37,118, 72, 97, 30,242,153, 96, 27,102,152,196, 60,220, 90, 28,180, 72, 69, 75, 33,137, 33,195, 24, 90, 98,183,157,156, 42,
+ 51,235,169,147,234,227, 4,121, 46, 43, 62, 12, 41, 74,170, 14, 1,181,194, 11, 20,141,201, 62,238, 17,131, 97,142, 90, 28,174,
+ 41, 49,205, 14,142, 89,153, 59, 62, 71, 78, 9, 29, 3, 36,192, 47,137,200, 98,143, 20, 7,166, 72,162,148,105, 36,235, 3,213,
+128,139, 4,148,102, 34, 19, 75, 32,119,179, 13, 84,202,140,158, 52, 92,116,238, 92, 35, 38, 40,169,128,238, 92,223,191,225,251,
+ 15, 74, 75,103,114,145,160, 82, 45, 5, 31, 55,142,126,224, 54,147, 6, 30,153,250, 88,129, 88,208,222,122,251,188, 53,178, 57,
+ 57,206,197, 18,195,140,251,187, 7,206,119,143,116, 73, 52,235,236, 47,239,121,243,225,194,112,161,164, 76, 78, 53, 94,203,112,
+126,249,103,127,194,255,248,239,254,138,124,249,200, 63,188,121, 14, 85, 39, 71,244, 44,140, 45, 13,233,113,120, 41, 17,227,186,
+188, 60,241,254,245, 27,222, 61,239, 33,181,187, 78, 73,109,174,111,156,112,233,139,243,244,114,225,233,118,176,247,192,219, 98,
+206,152,223,103,146,132,106, 60,152,250,232,216, 72,252,155,191,249, 19,254,252, 63,253,138,223,254,159,239,121,253,230,198,178,
+158, 89,180,208,143, 78,235, 35,176,182, 2,226, 33,165,154, 65, 27,141,214,175,164,190,115,127,126,164,222,125,195,232,198,247,
+191,251, 23, 62, 60,255, 64,173,194, 82, 79,156,239, 87,164, 75,100, 13,106, 76, 76, 48,200,233, 20,138,210, 72,120,239,164,225,
+ 28,214,113, 14,100, 12,108, 76,184, 82, 50, 24,161,110, 45, 57, 50,195,162,145, 6,168,249,132,138,145, 37, 83, 52,115,140,128,
+205, 8, 32,169,134, 95, 37, 67,206, 74,183, 20,239, 53, 13,200, 75,235,138,187,163,106,104,174, 72,201,236,251,129,118, 65,244,
+158,230, 91, 92,106,135, 33, 57, 81,199, 74, 75,145,141, 85, 73,193, 65,144, 68,210,206,210, 65, 88, 35,159,223,161,183, 78, 58,
+ 58,187, 42,154, 51, 99,187, 49, 36,194,227,169,198,251,191, 44, 11, 99,190,223, 4,199, 60,145,215,138, 53,135,197,144,155,161,
+ 57,211, 44,179,236,241, 75, 30,101, 48,154,227, 73,200,167, 76,245, 48,145,157,214, 48,138,110,251,152,175,121,141,201, 56, 41,
+194, 17,176,161,226,184, 4,177,177, 31, 7, 70, 99,108, 7, 34, 70,235, 13, 90,103,219,247,121,216, 6,186,121,248,192,123,227,
+192,240, 84,201, 75,152,106,207,229,142,114,127, 79,146,196,146, 6, 35, 13,234,162,192, 96,223,198,140,240, 54,250,109, 48, 10,
+ 28, 7,248, 1,105, 52,198,128, 65,236,121,157,142,119,195,122,193,117,204,149,228, 58,221,246,149,122, 62,145,123, 40,116,105,
+209,216,169,114, 38,175, 43,232, 32, 31, 3, 22,161,166, 12,135,209,115, 13, 38, 65,114,238,152, 70,222, 53,209, 94,174, 88, 18,
+186, 11,125,187,114,151,148,230, 61, 20,128, 83,172, 96,214, 85,233, 75, 9,111, 75,118,200, 9, 75, 78,238, 33,127,202, 52,250,
+253,225, 80, 47,156,150,194,119, 63,251,246, 71,187,202,119,131,118,219,176, 54,184, 95, 19,235,195,195, 23,217, 81, 31, 6,219,
+181,225,253,202,227, 93, 37,175,231, 47, 35,189, 3,215, 91,103,220, 54,238,115,227,252,245, 99, 80,195,190,212, 62, 29,120,243,
+177,113,121,251, 26,111, 47,184, 88, 80, 39, 85,233, 30,135,114,247, 66, 27,157,189,109,144,140, 13,197,181,114,186, 9, 66, 67,
+ 74,130,182, 96, 99,199,250, 9, 49,199, 82, 97,116,231,168,141,211,178, 80, 53,135,113,243,184, 34,154,113,137,132, 81,250,217,
+ 47,126,254,155, 58,163,106, 17, 61,179,216,239,105, 24,204,116, 2, 45, 2, 37, 30,147,183,144, 99, 7, 15, 49,221,231, 68,177,
+ 21,194, 0, 0, 32, 0, 73, 68, 65, 84,132, 16,135,122,210, 12, 89, 80,151,208,230,221, 64,193,199,204, 47,234,188,107,185,144,
+116, 58, 1,125, 26,211, 84,241,110,100,137,105,210,231, 3, 3,203, 65, 66, 83, 38, 99, 62,205,195,111, 96, 34, 51,203, 62, 66,
+142, 99,238, 4,154,131,102,180,132,201, 79,154, 51, 98,150,142, 15,153,134, 41,200,124,238,180,201,193,150, 47, 57,216,243,180,
+ 64, 78,182, 17,152, 63, 98,202,144, 20,210,188, 90,142,125,158, 13, 36, 7,234,154, 4, 57, 39, 20, 13,167,123, 82,220,131, 37,
+143,200,204,250,134,220,214,123, 76,202, 33,203, 58,147,178,139, 23, 69, 44,190, 79,215,248, 51, 99,127,225,233,253, 51,175,159,
+ 18,105, 89, 88, 39,188,231,180, 56,139,237,188,108, 59, 71,159,224,155,222, 17,143,139, 80,100, 11, 36, 30, 64, 62,232,198, 52,
+ 57, 6,109,207, 49, 82, 86,212,149,245,116,207,207,190,125,197,154,225,250,244,150,119, 79,183, 88, 93,168,163, 58,141, 26, 34,
+172,175, 94,241, 55,255,234, 79,248,235,111,132,191,255,167,183,188,185,244,240, 37,244,184, 68,237,163,135,234, 51, 34,171,127,
+187, 62,243,238,245,247,188,126,247,204,203,209,255,192,120, 22, 72,162, 51,187,173, 80, 79,156,214, 19,231,229, 20,108,112,133,
+ 84,106,252,238,166,146,148, 83, 10,208,141, 74, 80,187, 4,110, 47,207,252,228,171,159,242,223,252,247,127, 5,183,157,255,240,
+247, 55,150,124, 98,185, 91,192,149,247,239, 63, 48,218, 17, 25,243,137,239,209, 65,236,231, 81,142,113,176, 31, 47,120,187,178,
+148, 68,215,149, 91,203,124,255,230, 45,251,245, 61,171, 36,238,238, 86,212, 66,137, 74, 54, 87, 36,214, 49,155,188,128, 18, 80,
+165,173, 53, 24,157,165, 46, 65, 81, 28,193, 2, 72,105,161,151, 18, 10,211, 17,236,248, 69, 43, 37,215,169,153,236,116, 61, 2,
+102,148,133,179, 69,212,104,117,195,108,160, 18, 24,213,172,137, 83,130,158,192, 69, 67,121, 74,137, 84,238, 56,174, 7, 41, 67,
+173, 39,204,157,180,148,144,216, 70,164, 20,186, 55, 52,103, 52, 13, 84, 22,154, 25, 49, 64,198,229,128,212,217,122,167,119, 99,
+191, 29, 52,119,218, 62,240,113,196,159, 21,165,230,130,119,137, 11, 77, 73, 48,110,248,161,236, 99,114,255,213, 97, 55, 18,209,
+ 7,208,236, 50,209, 90,157,230, 7,226,133, 34, 66,147, 22, 88,227, 4, 89, 19,125, 20, 46, 91,172, 27,214,114,166,232, 96,244,
+ 62,213,190,129,143, 78,167, 80,122,101,140, 27, 41,221,147,125,208,199, 17,208,165,174,200,114,194,250, 96,169, 43, 57, 87,210,
+ 42,113, 33, 28,193, 67, 88,242, 61,140,142,211,233, 22,234, 68,215, 45,232,126,163,115, 88,166,237, 1,231,233, 54, 98, 79, 47,
+112, 52,167,106,152, 26,135,218,132, 7, 13, 82, 73,147, 73,176,204,174, 9,101,121, 88, 88, 79, 25,151,232,108,168,229, 1,181,
+ 74,150, 70,185, 91,112, 18, 37, 67, 27, 91, 12, 58, 61, 46,111,167,197,130,137,225, 7,212, 19,227, 58, 56, 68,216,125, 96,215,
+128, 15,229, 57, 28,136,194,122,206, 36, 93,145,243,202,114,142,157,184, 29, 70, 89, 75,100,128, 37,145,151, 66,150,132,245, 88,
+129,174,121,198, 3,179, 33, 20,114, 41, 60,156, 50, 63,249,238,187, 31, 61, 85,111,221, 57, 46, 27, 98,131, 87,119,153,188,222,
+127,145,195,113, 27,112,123,217,200,182,243,234,171, 19,146,215, 47, 38,143,239, 91,195,142,141,251,234, 44,143, 15, 95, 4,148,
+243, 57,163, 14,188,121,119, 99,123,247, 6,250, 5,213,248,252,185,135, 15,196, 59,236,109, 64, 13,117, 73,119,135,214,216,135,
+177,239,161,138,221,221,175,236,109,208,201, 20, 77,236,126,227,118,187, 48, 42,228,177, 34,239,131,155,208, 44,206,179,163,237,
+164,227, 66, 27, 78,250,238, 23,127,252,155,172, 97,116, 19,141,188,117, 87, 13,200,134,195, 32,226,108,250,153,160, 27,211,171,
+ 38,254, 80, 86,226, 51,163,155,130, 80,198,176, 57, 5, 8, 33, 46, 71, 30,219,108, 96, 35,136, 96,146, 34,215,109,170, 72,142,
+189,152, 89,144,112,212,163,168, 69, 82, 69,179,196, 11,159,178,212,128,192, 97,166,112,144, 74,206,104, 17,100, 26,243,196,161,
+ 58, 12, 29,225,206,111, 62,127,168,134, 90, 24,234, 28,157,228,179, 17,248, 71,162,112, 37,101, 16, 73, 44, 89, 40,165,196,116,
+167,160, 86,130,158, 39,177, 23,197,162,232, 70,240,136,228,232, 64, 72,168, 6,136, 70, 52,152,232, 17,145, 82,188,143,208,185,
+ 71, 60,140,149,248,128, 53, 59,102,236,203, 25,189,135, 44,159, 37, 28,251, 30, 12,252,254,252,158, 31,222,124,228, 67,187, 99,
+ 89, 22,138, 6, 63,191, 36, 7,105,124,120,186,226,158,240,110,147,159, 31,174,236,214,108,210,231, 36, 32, 55, 22,135,178, 58,
+ 33,188, 10, 81,194, 49,226, 66,247,234,171,123, 30, 11, 60,191,125,207,219,231,107,196,144,194, 66, 5,169, 96,110,156, 31, 95,
+241,175,255,171, 95,243,215,191, 56,241, 15,191,253, 71,254,246, 31, 46,104,138,233, 90, 45, 12, 90, 38, 30,234, 73, 63,184,124,
+124,205,239,191,255,158,151, 13, 36, 71,114, 32,105,130,233,189, 20, 55, 68, 11,229,124,226,254,116, 71,241, 17, 4, 64,159,166,
+ 76, 15,243,141, 38,141, 98, 16, 55,210,188,140,184, 12,178, 42,219,209,184,236, 27,255,230,191,248, 51,254,242,175,190,229,119,
+255,241, 13,175, 95, 46, 0,188,249,151,127,226,210,131,116,182, 93, 55, 70,143,134,138,154,227, 33, 45, 3,198,112,172,135, 99,
+191,181,141,170,202,221,253, 35, 57, 21,158,159,119,190,127,251,154,109,127, 38,139,112,119,122, 69, 90,163,244, 39,149, 37,232,
+103, 99, 4,157,109, 57,131,134,161, 79,114, 65, 75,236,191,145,138,233,129,140,240,108, 8, 30,101, 38,147,160,152,212, 40,185,
+208,243, 18, 46,239, 38,156,139,114, 48, 24, 85,177,173, 97, 30,114,111, 94, 78, 52,115,236, 56,230,132, 44,148, 82, 81,194,189,
+175,245, 28,148,186,180,161,169,112,186,143,226, 28,245,240, 79,248, 24, 72,170,127, 88,249, 12,129,222,217,186,114,244, 29,134,
+209,117,193,199, 62,119,193,225,117,144, 92, 81, 21,122,115,186, 24, 9,227,216, 15, 52, 79, 21,204,194,125,143, 10,122, 90,241,
+174, 12,185,198,229, 88, 87, 22, 79,129, 17, 30,202,112, 13,197,100, 31,108,222, 3, 63,124, 28,152,183,224,253,223, 58,253, 8,
+ 41,183, 75,167,219,224,104,157, 84,207,208,199, 76,153, 58,102, 11,186, 36,116, 77,104,201,164,126, 71,169, 30,252,126,107,180,
+230,208, 91, 68, 51,147,210, 83,199,124,224,118,144,180, 82,206,103,186, 23, 60, 13,164, 15,112,229,104, 71,196, 12,151, 68, 26,
+ 74,254,116, 9, 55,133,106,184,100,170, 66,170, 9,215, 19, 73, 50,233,161,178,228, 28,193,250,102, 97,100,237, 18,114,191,221,
+ 40, 89, 96, 81,218, 17,189, 25,227,118,141,105,138, 6, 75,194,196,233, 28,216, 40,148,226,241, 57, 78,137, 45, 53,114, 77,156,
+ 61, 62, 44, 41,223,147,150, 5,151,194,121, 89, 65, 32, 77,224,150,245,206,233,241,204, 87,119,117,238,234, 35, 26,103, 29, 36,
+ 23, 74,137,213, 27, 9,114, 73,212,146,209, 82,184, 63, 23,190,250,201, 79,254, 63, 64,222,255, 95,228,230,230,244,219, 6,214,
+121, 56, 23,210, 23, 66,174,222, 58,244,109, 35, 99,220,223,175, 19, 62,243,227,191,118,135,253,210,232,251,198,195,234,212,187,
+199, 47,234,126,127, 30,240,241,245, 70,187,188, 71,199,206, 49, 66,249, 13,119,103,248,167,180, 57, 69,160, 23,192, 22,170, 54,
+146,102, 92, 42,244, 78,187,193,182, 95, 72,106,208,158,113, 63,200,174,212, 81,169, 52,154,100,246,108, 80,149, 85, 10,126, 90,
+ 16,140,109,111,164, 63,250,229,175,126, 83,167, 28,158,202,167,232,153,131,197,193,226, 56,202, 39, 51,154,207, 29,237, 60, 64,
+244,211, 99, 63,220,213, 89,226,160,235, 76,227,154, 77, 64,205,136,195,206, 52,114,159,154,210,116,207, 70,169,131, 78, 73, 81,
+211,116,183,165,233,138,247,224, 52,151, 20,113,187, 46, 66, 21, 13, 24,136, 8, 42, 1, 39,183,225,164,160,174,130,148,207, 25,
+224, 56,212, 74, 28, 78,243,242,145,178, 32, 75,228,137, 73,144,194,189, 23,235, 7,155,251,250,249,109,228,156,200, 58, 39,238,
+225, 20,145, 9, 68,144, 56,112,150, 40,106,137, 86,180, 68,111, 18,136, 70,130, 79,173,181,196,195,212,199,103, 50, 31,163, 5,
+105, 78,230,129, 59,129, 13,138, 99, 35, 94,143,228,184,184, 28, 31,222,240,253,251,157,139,223,177, 36, 37,219,136,105,211, 7,
+162, 74, 27, 78,235,246, 25,160, 98,163, 7, 27, 94, 50, 74, 96,110,101, 86, 35,137, 50,131,183, 66, 74, 30,175, 95,227, 50,180,
+220,223,243,221,227,153,231, 15,111,121,255,180, 49,200,136,134,244,173,105, 65, 53,184, 0,223, 60, 86,254,244,107,184,188,254,
+ 23,254,151,255,227, 13, 77,239,169, 37,246,152, 34,147, 79,128,209,182, 11,223,191,254,158, 55, 31,158, 57, 92,200,105,101, 89,
+114,196, 2, 61,156,178, 99, 56,185,156,169, 53,202, 95,232, 7,173,221,184,109, 55,182, 30,201,134, 49, 26,163,199,110,124,111,
+ 61, 34, 96, 46,225, 46, 79,159,248,254,202,203,229,198,119,223,126,197,127,249,111,255, 21, 15, 57,243,219,223,126,207,232,198,
+239,191,255,129,189,109,172,229, 12, 26,110,246,118, 8,189, 53,212,133, 82,148,148, 66,212,145, 20, 68,249,222,110, 88, 31,148,
+ 2,231,135, 7,100, 57,113,185, 28,188,121,251,134,235,126, 33,171,243,187,127,254, 39,222,189,123, 77,126,184, 99,189,123, 64,
+204,104,199, 17, 49,173, 37,146, 26,227,165,227,222,105,132, 41,212, 49, 52,101,146, 70,140,209, 61,179, 22, 33,151, 5,242, 9,
+ 21, 33, 81, 57, 21,161,105,236,208,185, 29,236, 99, 74,210,122,162,141, 29,183, 35,218, 4, 61, 83, 52, 14, 77,151,131,161, 14,
+ 35,212,129, 90, 21, 70, 35,155,177,155,208,110, 1, 86,146, 44,156,165,206,188,249,137,222,133, 62, 12, 27,141,177, 43,116, 24,
+ 82,209, 26,200,225,156, 43, 58, 34,115,109, 10,205,140,202,220,221,165,232, 15,136,230,174, 20, 23,153,229,132,245,142,217, 21,
+ 92,112, 47,152, 24,187,120,168,114,253, 22, 14,125, 39,168,106,158, 2, 99,235,157, 99,187,209,231, 37,135, 68, 76,184, 37,163,
+235,153,180,174, 60, 44, 25,177, 40,124,145, 10, 69,150,144, 53,113, 82,143,203,134, 9,152,109,120, 19,178, 39, 6, 78,239, 55,
+246, 35,214,103,234, 18,158,143, 34,209, 46,119, 75,140,110,152,100, 10,176,148, 59, 52, 21,180,119,146, 68, 33,213, 82, 22, 74,
+ 81,114, 93,144,226,148,165, 70,204,177,197, 67,116,164, 6,217, 41, 61, 46,113,174,142, 14, 67,178, 51, 90,168, 42, 57, 45, 88,
+ 3,219, 27,150, 66,113, 9,207,148, 80,124,197,233,228,164,148,116,226,160,147, 79,128,157, 88, 84,112, 93, 65, 51,119,165,196,
+243,151,131,181, 46,164, 85,216,172,227, 93, 56, 37,184, 63,135, 65,115,213, 26,112,163, 54,216,247, 61,220,248, 22, 3, 80, 94,
+ 99, 40,114, 19,178, 22,190,126,120,224,225,171,111,126,212,158,218,129,151,109, 48,182, 27,202,224,225,126, 65,203,143,159,168,
+ 29,184, 29,206,126,121, 33,211,184,127,188,155, 5, 33, 95,224, 80,183, 80, 0,218,177,241,234,164,148,243,151, 65,207,126,250,
+250,216,224,195,247, 31, 57, 46, 31, 25, 22, 30,160,222,183,207,235,236,222, 15, 14, 55, 40, 3,187,118, 6,138,228, 26,165, 85,
+190,177, 62, 20,236,230, 52,235,129, 79,214, 78, 89,206,184, 20,218,209,105, 99, 58,229,207, 9, 1,246,113, 71,118,193, 24,120,
+ 55,210,207,127,253,171,223,100, 9, 3, 20, 8,210, 7,166,130,203,136,221,110, 14, 83,143, 78,221, 92,146,198,110,203,163, 34,
+212, 92,226,128,246, 22,132,180,185, 7,246, 17, 92,243,195, 12, 73, 57, 14,154,208,211,113,157,211, 60, 97,124, 15, 73, 56,218,
+209, 66,110,148,207, 85,176,242,201, 54,255, 89, 45,152, 13,102, 30,111,113,243,112,119, 39, 36, 80,130, 2,221,123,152,238, 44,
+118,151,163,119,146, 57, 75, 46, 72,142,190,185,236, 97, 96,242, 96,148, 70,117,234,228,102,143,201,173,143, 3,153,144,206, 83,
+180,101,185, 89, 60,240,146, 34, 35,152,240,197,149, 49, 39,208, 92, 34, 69, 32, 4, 49,206,198, 17,181,163,125,150, 1,142,168,
+ 97, 49,137, 70, 40,108,204,127, 71, 33, 73,138,239, 99,127,225,229,221, 91,126,120, 50,142,114, 71,214, 20,134, 64, 21,180, 6,
+125,205,199, 39,183,125,200, 73, 89,125,250, 1, 18,154, 11,238,113,251,142,182,179,120,109,193,150,158, 30, 9,210, 36,224, 9,
+167,101, 69,198,141, 55, 31, 94, 48, 41, 81,127,235, 18, 28,253,164,147, 69, 32,220,158, 95,248,251,127,120,205,255,246, 31,223,
+ 97,245,145,199,243, 18,211,143, 4,233,239,216,158,121,255,246, 7, 94,191,123,226,178,247,104,246,211,132, 36, 69, 69,241, 17,
+ 40, 90, 16,202,178,176,164,224,110,111,251, 78,235,141,214, 7,109, 76, 50, 95,104, 31,216, 24,180, 17,233,136,164,177,246,145,
+ 89,235,203, 84, 34,156, 65,223, 7,255,237,191,254,115,254,147,255,236,103,188,253,251,247,188,127, 26,172,167, 59, 62, 60,189,
+ 13,233,122,185,139,203,164, 10, 93,102,196,110,214,215,230,186, 48,124, 48,182,142,229,232, 34,196, 6,163, 55, 42, 11,231, 90,
+ 89,239, 94,241,124,217,249,253, 63,255, 51,255,242,230,137, 15, 79,207,188,188,127,139,238,141,188, 20,150, 83,161,212,115, 72,
+197,251, 49, 83, 17, 35, 46,159, 6,201, 67,169,193, 21, 41,137,178, 46, 48, 7,188, 92,107, 48,249, 75, 71, 74, 67, 85, 24,150,
+ 25, 45,222,167,154,227,194, 52,128,146, 18, 75, 73,147,116, 56,216,221,195,244,169, 53,240,198,147,140, 37, 41,162, 50,163,119,
+ 12,101,247, 9, 80, 74, 7,151,173, 49,142,198, 62,118, 26, 61, 62, 87, 93, 73,185, 64, 9,102, 66, 73,209, 2,213,109,144,150,
+130,179, 70, 15,132,100,178, 57,229,156,226,242, 59, 12,203, 70,201, 57, 34,167, 12,218, 0,247,112,173,251,126,155,165, 73, 39,
+250,245, 5,115,231, 54, 47,167, 39, 3,100,165, 21, 33,105,225, 84,239, 57,165, 96,173,215,243,202, 82,156, 37, 9, 53,175,208,
+110, 44,105, 33,105, 20, 48,221,218,193, 96, 80,189,145,115, 72,252, 62, 90,168, 47, 20,250, 98,220,246, 78, 59,118,100,173,168,
+ 20,180, 31, 51,154,154,162,242, 56, 65,249,116,209, 79, 74, 87, 37,157,156,251,165,198,192,144, 21,107,123,148,162,152,224,150,
+162, 25,173, 57,102, 29, 43, 13,245, 76,239, 59,189,197, 26, 99,120,163, 51,104,173,161,203,138, 30,206,201,157,203,104,113,233,
+211, 40, 13, 93,203, 35,217, 59,156,141, 85, 43,126,190,103, 77, 5,183,138, 13,227,188,102,146, 13,140,142,155, 82, 93,169,119,
+133,156, 42,101, 12,110, 99, 96,162, 88, 55,214,187,196, 90,114, 76,249, 34,108,219, 1, 14, 85, 3,193,253,105,109,133,164, 32,
+126,162, 44,185,240,245, 55, 15,220, 61,188,250,209,241,173,235,203,134,143, 3,177,193,253, 93,249, 34,135,186, 1,151,203,160,
+237, 23,150,228,156, 31,239, 34, 78,253, 37, 20,128, 22,235, 2,252,224,225, 36,228,211,195, 23, 59,212, 13,120,251, 60,120,121,
+251,129,126,123,194,245,192, 13,154, 55,220,140, 91,100,138, 73,187, 49,186,224, 57, 33,214,233,215, 70, 74, 80,236, 64,110, 7,
+151,124,163,100,160, 4,246, 58, 12,171, 55,118,110,136, 8,235,114,162, 90,134, 22,102,200,177, 95,240, 60, 11, 93,126,241,171,
+ 63,254, 77,206,130,247, 9, 90, 17, 80,153,249,115,143, 9, 85,230, 55,130,199, 58, 86, 73,145,145,251,212,127, 62, 26, 46, 66,
+ 65,104, 12,204,108, 78,227, 18,187,230,249, 7,117, 70,220, 2, 63, 26, 83,146,230,104,120, 83,205, 32, 22, 38, 21, 98,207,158,
+ 36, 98, 24,195, 66,138, 21,241,217,228, 54,235, 54, 5,146, 24,185,204, 7,189, 24,101,102, 4, 99, 47, 62,240,168,152,195, 83,
+ 16,166,134, 43,244, 56,116, 69, 67,150,180,217,102,230, 18, 7, 50, 54,226, 48,243,136,233, 49,156,180,230, 72, 75,245, 6, 35,
+ 20,135,195,156,164,179,192,195, 52,254,172,198, 37, 39, 17,255, 46,153,197,195, 18,237,163,241,115, 67,166,115, 54,104, 96, 42,
+ 35, 30, 54,217,145,253,194,229,253,123, 94, 63, 43,190,124, 77,201,225, 91,144, 42,212,236, 44, 26,185,251,162,144,147,115,180,
+ 30, 56,206,225,116, 9,156,171, 8,179,109,106,129,148, 16, 41,164,153,106,136, 5, 74, 40, 10,104, 20,183,200,216,217,183, 78,
+159,107, 15,119, 65, 74, 33,231, 48,239,185, 15,108,236, 28,189,179, 53, 48,148,187, 87,175, 56,175, 65, 46, 43, 24, 79, 79,239,
+120,251,246, 53,111,159, 55,246, 99,252,161,207, 88,102,251, 15, 62,163, 84,153,156,194,233,123,236, 55,142, 99,208,137,139,134,
+ 77, 42, 68,236,217, 37,204,137, 51, 44, 33, 18, 70, 41,141,107, 35,130,145, 85, 98,253,146,224,195,135,143,252,252,155,111,249,
+171,191,249,107, 22,223,249,219,255,240, 3,235, 87, 95, 49,172,243,238,237, 59, 78,245,140,150,130, 89, 99, 73,133, 92, 23, 26,
+ 25, 27, 29,119, 35, 91, 40, 80,119,223,252,148, 68,229,216,119, 64,113,139,149, 64, 54,103,173, 11,229,238,129, 82,214, 32,141,
+ 53,231,253,135, 15,188,123,251,154,236,177, 75,247,180,124,246, 44,160, 5,179, 68, 73,160,158,217, 37,100, 89,201, 11,248,129,
+ 91,167,214,115,236,178,246,184, 48,230, 44,220, 47, 43,205,156, 46, 7, 42, 5, 87,161, 22,199,114,157,253,242,138,246, 96, 64,
+104,206,129, 80, 62, 6, 57, 11,110, 71, 56,193,139, 81,134, 17,214,177,152,198,155, 89, 32, 94, 75,142,131,175, 57,121,241, 89,
+242, 19,114, 78,145, 80,206, 78,231, 20, 60,136, 96,189, 66,107, 28, 30, 85,183, 73, 15,132,120, 93,133,216,221, 38, 61, 49,218,
+142,154,145,189, 68,221, 41,141,126, 4,134,150, 36,208, 52,126,247,101,137, 53,132,103,214,116,130,121, 73,233, 57, 69, 67, 96,
+118,154, 58,158,102,197,241, 22,151,151, 75,187,197, 10,165, 40,216, 65,201,145,135,247,158, 73, 56, 71,119,108,148,160,198,141,
+ 24, 30,196, 18, 69, 42, 73, 7, 53,215,112,229,159, 86,210, 90, 65,160,158, 50,230,131,181,156,177, 17,125, 22, 34, 11,251,113,
+ 65, 70,152, 24,247,100,193,207, 16,197, 24, 52,219,163,220,167, 29,100,117,100,100,172,244, 96,124,175,161, 92,164,188,146,125,
+150, 93, 49,184,171,149, 36,142,231,133,186, 4, 81, 81,114, 13, 72,149, 20,178,158, 73,205,104, 62,168,167, 66, 46,198,118,117,
+178,220,179,172, 9,201, 25,215,134, 47, 53,222, 83, 18,126,165, 36,194,178,172, 92,175, 27, 46,137,214, 6,251,136,231,120, 73,
+225,141, 74, 37,124, 62, 90,148,148, 43,226,137,245,156,249,230,155, 87,172,231,251, 31, 45,101, 95, 47, 59,214, 27,201, 7,247,
+143,167,185,106,251,241, 89,239,235,181, 99, 19, 96,116,186,191,255, 34, 57,245, 1, 92, 54,167,111, 27,222, 14, 94,221,159, 72,
+203,249,139, 77,233, 59,240,246,217,184,124,124,130,237, 18,173,165,210,241,214, 57,134, 99,195,232, 61, 81,117,198,200, 55, 97,
+180,144,209,181, 24, 55, 41,236,123, 39,149,196,169,221, 33, 45,206, 76,109,141, 37, 59,139, 59, 62,140,135,229,196,199, 22,230,
+228,193, 51, 57, 59, 69, 6,173, 85,210,207,127,249,235,223,100,241,217,170,149,230, 35,127, 26,226,116,230,153, 93, 63,115,210,
+ 61, 71, 32,234, 83, 67,154,166, 0,184,248,164,195,137, 76,119,173,164,233,148,143, 73, 91,197,201, 85,131, 2,103, 97, 14,227,
+ 83, 97, 12, 78,250,108,139, 87, 52,167,217, 16, 22,187,250,148, 35,202, 70,207, 33,183,123, 64,104,164,132,105,169, 16, 46,114,
+ 60, 5, 2, 54, 7,113,202,124,174, 1, 36, 26,198,240,196,154,163,174, 51,226, 94, 18,120,206, 52,226,112,183,216,125,135, 50,
+173, 33, 37,210,195, 84,214,227,181, 40,225, 98, 31, 62, 62,119,244,154, 27,163,183,248, 89, 77,226,158,155,127, 86, 19,178, 66,
+ 55, 67, 36,227, 62, 72,174, 84,141,150, 52, 21,157,253,240, 80,188,115,123,122,207, 15, 79,224,245, 43,238,214, 68,182,131,163,
+ 13, 74, 86,170,166,224,101,167, 18,253,188, 71,103,140,193,214,162, 61, 15, 15, 32, 65, 38,248,250,250, 9, 4,132,144,103,163,
+156,187,135,179, 94, 9,251,191, 38,124,174, 34,100,170, 23,193, 4,136,201,207, 90,163,247, 3,179, 96,247,187, 15,114,202,124,
+243,234,107,150, 53,115,123,249,200,235, 31,126,199,155,247, 79,220,142,160, 0, 78,205,103,174,116,194, 80,232, 61, 10, 87, 96,
+ 70,111, 70,195, 70,195, 52,135,188, 63, 2,151, 26,239, 51, 1,140,148, 38,141, 76, 34, 94, 41, 26,168, 75,239,125,122, 2,210,
+103,179,102,223, 7,125,119,254,221,191,253, 11,190,249,246,158,223,254,221, 91,110,251,224,171,239,190, 98,223,111,188,121,251,
+142,122,119,199,185,174,180, 54,102,212, 50, 24,246, 46,112,220, 26,121,169,252,228,171, 71,220, 32,157,239, 17,148,219,229, 25,
+243,198,101,108,140,118, 99,205,153,243,233,196,178,222, 5,189, 78, 59,173, 27, 31, 62, 62,241,238,205,247,152,118, 78,165,134,
+107,220,163, 64,164,164,130,201,193,222,111,104,248, 74, 3, 60,131, 99, 18, 85,196,203,242, 42, 98,154,222, 98, 66,235, 53, 74,
+121,206, 5,107,209,120, 70, 79,152,237,172, 37,209,123,195,106,133,226, 36, 51, 20,168, 10,187, 27,169, 40,119, 9,172, 21,134,
+100,140,193,184, 5,213,106,200,244,122,144,163,166,216,227,146, 80,207, 41, 14,163, 20,128, 35,241,132,244,184, 26,163,131, 49,
+ 34, 39, 94,172,133,252,108,209,113,208,145,105,168,212,240, 85,176,208,251,141, 92, 10,230,194,178, 60, 34, 39, 65, 44,192, 86,
+154, 50, 89,194, 75, 66, 45,108,227,134,181,141,190, 55, 6,157,158,133,222, 21,219,247,152,186, 15,184,141, 35, 96, 61, 30, 21,
+184, 90, 22,250,209, 88,169,216,128, 81, 98, 37,151, 52,145,179,178,230,168,115,246, 52,168, 90,201, 37,136,119, 94,149,187,111,
+238, 88,206, 95,131, 57,165, 84, 76, 50,230,137,210, 58,121, 73,136, 21,246,125, 99,152, 35, 26,172,237,228, 3,187, 54,124, 12,
+142, 61,158, 5,195,140,156,239, 73, 90,102,220, 87, 24, 54, 34,123,223,149,164, 21,179,152,190, 68,157, 37,159, 25,101, 97, 89,
+239, 73, 73,105, 35, 46, 97, 41,215, 88, 1,202, 64,170,227,116,138, 9,178, 27,141, 28,106, 89, 54,154, 43,150, 19,146,161,220,
+165, 96, 65, 12,153, 42,152,211,250, 76,248, 88,128,182,114,157,105,133, 20, 41, 19,213, 32, 62,230,153,135, 63,157, 78,124,247,
+237, 43,202,143,220,127, 15, 96,187, 70,157,239,162,198,253,171,251, 47, 18,103, 27,192,229,229,192,142, 27,143,119,153,114,250,
+ 50,113,182,144,245,141,125,219, 88,232,188,250,250,203,100,234,255,239,206,250,119, 47,131,151,247,239,144,254,204,176,142,249,
+ 65,107,131,225, 97, 12, 94,134, 65, 82,142,222, 32, 39,198, 28,168,245,206, 40, 71, 97,147,134,228, 19,151,235, 7,204,118,210,
+169,146, 10, 92, 71,133,154, 89, 87, 56, 88, 56,182,157,158, 78, 28,118,163, 54,165,114,166, 31, 27,233,143,126,253,167,191, 17,
+ 27,241,166, 34, 42, 53,133,142,248,236,244, 78,241, 97,205, 42, 72, 9,135,117,128, 68, 20, 77, 37,100,120,201,224,105,190,121,
+ 34, 98,225,248,140,197,197,154, 59, 14,104,141, 27,227, 52,105, 33, 26, 86,127,241,120, 96,127,218, 39,143,152,144,181,196, 20,
+178, 38,197, 38, 39,155, 36, 44, 41,118, 43,158,162, 45,204, 45,104, 91,136, 80, 74,138,102,247,230, 36,139, 73, 82,210, 64,166,
+155, 85, 83,166,141,241,185, 49,202,103, 78,187,225, 32,153, 44, 6, 57,232, 85, 54,140,241,233,118, 51,121,190, 33, 99,199,161,
+159,138,146,137,135, 80,184,145,132, 36,177,146, 24, 35, 34,122,154,102, 73,138,133, 92, 28, 38,189,129, 17,125,235,145,213, 14,
+ 95,194,126,125,207,235,247, 59,123,126, 96, 41,130,183, 43,221,102,116,173, 36,242,186, 70, 92,237,176, 9, 52,216,184,236,159,
+192, 26,193,218,207, 51,238,229,113, 46,198,195, 24, 67,137, 61, 59, 50,163,137, 54,232,163,147, 83,249,124, 25, 49,139, 24, 98,
+ 89, 42,171, 68, 87,116, 31,141,222,123, 0,125, 36, 38, 87, 93, 42,143,143,103,246,143,239,120,251,254, 3, 47,123,159, 53,169,
+194,108, 83,137,184,154,235,140, 74,198,229,108,244, 30, 44,248,209,233, 30,242,225, 12,212,199, 84, 53, 83, 15, 50, 49,181, 50,
+223, 79,238,127,152,208,153,221,235,228,144,244,179, 72,228,159, 83,230,242,124,229,207,127,253,115,254,244, 23, 63,229,223,255,
+237,247,120, 55,202,186,112,247,240, 53, 31, 62,188,227,122,121,102, 21,193,146, 16, 1,131,142,122, 9,247,183,100,214,211,137,
+177,109, 28,125,231,103,223,125,203,126,188,240,244,252, 68,242,224,235,119,139,142,238,225,157, 90, 18,181, 44, 20, 57, 81, 31,
+ 31, 35, 31,189,117, 62,188,127,226,249,205, 91,220,140,243,249, 14,213, 5,147,157,156, 18, 99, 8,165,220, 35,122,224,166, 72,
+ 15, 21,163,228, 26, 80, 32, 29,113, 72,137, 4, 74,119, 24,213,207,120,115,116,169, 88,219,105,132,236, 45, 53, 62, 35, 41,105,
+ 92, 2,204,217, 61,250, 24,232, 6, 86,241,147,176, 95,119,246,190, 35, 53, 7,134, 57,173, 17,215,179, 68, 57, 37, 78,121, 33,
+165, 65, 45,137, 53, 21, 78,181,208,232,228, 28,210,251, 49,169,141, 93,132,228,241,158,237,233, 76,187, 93,145,114,130,217, 29,
+ 97, 12, 52, 71, 79,173,106,172,112,244,148,145,146,162,184,198, 50, 3, 67, 37,145,203, 39, 18, 86,163, 15, 65, 77,241,234,100,
+ 25, 28, 91,143,194, 17,140,194, 9, 23,167,206,244, 13,229,204,242,120,162, 28, 35,212,155,156, 89,214,202, 16,229,148, 11,185,
+206,139, 90,214,248,121, 29,157,243,114, 38,223, 69,203, 99, 53,165,239,142,136,113, 46,130,245,131,253, 22,196,175, 97,129,164,
+109, 54,224,232,108,121, 67,134, 96,187,210,116, 71, 60, 32, 62, 94, 4, 60,147, 21,242, 57,192, 89, 34,131,106,137,187,122,130,
+188,132, 17, 82, 64,181, 83, 82,102, 80, 67,221,233,141,146, 34,203,238,226,208, 5,125, 88, 41,165, 35,195,105, 67,168,118,166,
+123, 99,179,142,100, 65,233, 12, 87,210, 41,158, 71, 92, 59, 39, 34, 22,120,119, 58, 33, 67, 57,223, 9, 11, 5,177, 66, 87,161,
+ 86,161, 2, 78, 92, 46, 85, 61,146, 7,249,140, 76,236,118, 74,202, 79,127,246, 77,168,121, 63, 50, 75,126,220,110,120, 31,156,
+146,179,190,186,255,209,198,187, 79,123,239,237,218,160,109, 60,156, 43,105,253, 50,230,187, 1,236, 55, 99,236, 55, 22,233,156,
+191,186,155, 62,172, 47,231,124,127,255, 97,231,246,241, 25,179, 43,105, 24,251, 17,229, 69,184, 71,111,135, 57, 62, 18,173, 25,
+189, 26,168,114, 90, 19,126,105,112, 51,198, 82,192,141,179, 15,242,131,210,155,193, 67,133,182, 33,253,160,249,100,248,203,153,
+114,223,240,125, 32,102,244, 82,121,185, 61,147,126,249,199,191,252, 77, 78, 25,199, 41,146,167,227, 56, 0, 45, 51,199, 70, 77,
+ 50,203, 90,102,174,108,182,158,185, 59, 99,180,248,115, 4, 81,234,147,179,156,153,199,158,231, 8, 54, 34, 22,149,136, 15,213,
+167, 26,214, 20,218,234,148,187, 67,214,206,162, 65,219, 74,153,146,106,132, 16,220, 98, 79, 44,128,134, 81, 76, 71,236, 44,155,
+199,148,169, 50,144, 20,117,169,237, 48, 44, 65,205,204,250,206,193, 16,159, 77,110,132,145, 77,130,210, 35,204, 3, 57, 11,181,
+ 8,160,180, 99,246,181, 47, 33,161,125,202,232,227,225, 42,151,153, 16,208,154, 35, 27, 58,223, 50,161, 14,132, 67,247,147, 67,
+223, 62,253, 76,230, 62, 75, 92,208,249,128, 12, 6,126, 66,182, 39,222,188,123,226,201,206,172,235,138,200, 1,250, 64, 93, 87,
+ 78, 69,226, 16,203,153,146,230, 30, 63, 11,183,163,197, 94,102, 86,201,250,188,212, 12, 62,237,210,136, 30,233,249,223,221, 71,
+ 52,216,165,169, 94,104,250,220, 96, 87, 92, 49,205, 44,229, 76,146,192,208, 90, 50,124, 68,164, 39,215,105,244,243,136, 33,113,
+ 92,121,255,225,194, 97,243,226,166, 78, 22,226,205, 75, 96,135, 83, 42, 56,134,245, 49, 47, 50,161, 96, 32,142, 72, 72,144, 19,
+ 59, 19,112,162, 79,198,190, 32,228, 68, 92,201,163, 3, 62, 37,137, 73,222,237,115, 79,187,166, 0, 22, 5, 19, 64,217,246,141,
+119,111,174,252,236,241, 91,126,120,234,188,185,117,124,100, 78,167,202,215,175, 30,121,121,255,196,219, 15,239, 80,235,148, 20,
+177, 49, 27,241, 26,115, 81, 94,173, 75,252,253, 34, 12,107,124,124,251,251,176,124,214, 18, 43, 41, 66,250,210,148, 81, 58, 62,
+ 6,231,245,158,191,252, 87,127, 77, 89, 31, 57, 90,244, 4,140, 49,248,248,252,204,243,135,183,208, 27,231,187, 51,230,131,101,
+ 93, 40, 57,212, 45, 52,212,147,122, 82,210, 90,195,252,216, 59,218, 13,187,171, 68, 82, 84,241,209, 41, 98,228, 53,147,146, 82,
+151, 59,180,109,104,130,118,219, 81,115, 32,199, 69,210, 19, 57, 27,157,198,216,194,221,223,218,160, 38,157, 77,116, 43,119, 37,
+ 6, 19, 95, 66, 49,169, 89,209,228, 84, 73,228,147,194,112,108,115, 68, 15,250, 41,222,187,126, 52,218, 40,209,231,224,198, 80,
+ 71,107,139,136, 41,134,247, 78,174, 10, 82,195, 69,159, 27,154,203,188, 56, 94, 97, 3,134, 49,124,199,247, 30,117,200,122, 48,
+134, 49,100,208, 92,201,221,232,107, 70,205, 98, 60, 39,161, 90,209,101,153,139,111,135, 10,107, 78, 49,225, 62, 20, 70, 90, 66,
+245, 51, 33,149, 51, 70,116, 83,156,171, 66, 86,110, 71, 15,114,221,225,116,223, 3,185,236, 30,106,227, 17,201, 15, 75, 7,200,
+ 65,117, 97,183,198,232, 97,248,181, 49,137,113, 37, 62,199, 82, 3,222, 18, 43,192,206, 90, 11,178,199, 64,112, 62,223,115,244,
+206, 16,161,164,131, 98, 9, 77,117,254, 39,214, 77, 34, 3,145,194,214, 14, 22, 9,178, 99, 87,195,142,107,184,249,147, 82,100,
+161,209,161,116, 74, 90, 33, 13, 44, 9,203,140, 16, 10, 70,154, 0,172,135,181,210,247, 57,141,175,209, 18, 56,122,139,109,201,
+140,103,105,214, 32,125, 78,179,165,171,225,196,244,126, 94, 51,223,125,247, 93,164, 87,126,204,225,219,103,178,100, 52,238, 42,
+ 44,119,247, 95,196, 73,190, 15,216, 46, 55,164, 31,220, 63, 44,164,186,126,177, 73,250,122,109, 28,251,198, 89, 7,167, 87, 15,
+ 97,174,248, 66, 95,215, 1,207,111,174, 28,207,207, 28,219,133,214,119, 68,156,162, 18,102,206, 99,160,199, 44, 26, 27, 10,199,
+ 96, 79, 87, 60, 37,122, 83, 90,143, 40, 49, 26,113,228, 37,156,157, 60,191, 24,119,122, 34, 23,103,219, 19,180, 65,117, 99,244,
+ 29, 77,142,101, 37,231, 29, 25, 78,250,229, 47,130, 40,247,169, 82,214, 60,220,210, 62, 31, 98, 34,177,219,140, 46,233,185,207,
+211, 40, 50, 17,145,144,234, 36,118,220, 99,102, 41, 17,155,221,219, 68,172,205,137, 15,201,188, 39, 12,143,189,178,164,132,228,
+ 20,123,198, 56, 11, 80,145,184, 79,249,148,217, 25,211, 44, 21, 7,165, 70,112, 30,245,105, 12, 27, 81, 52,195,136,202, 82,235,
+ 19, 51, 27,139,101,178, 36, 58, 18,132,174, 17, 53,118, 41,167, 48, 2,150, 28,153,239,217, 21,239,201,145,254,105,122, 54,172,
+123, 76, 28, 40,189,219,188, 80,232,188,137,202,244, 19,204,137,115,150,222,216,236, 73,119,226,161,208, 71, 32,101,139,214,200,
+210,231,248, 25,139, 70,146, 0,132,108,131, 15, 31,222,242,182, 47,172,231, 71,178, 93,130, 4,118,119,230,254, 28,123,123, 23,
+ 69,117,230, 84,243,224,182, 53, 30,191,251,150,159, 62, 40,207,215, 3, 47, 57,186,237,213, 62, 99,106, 53,197, 78, 92,100,102,
+232,165,144,209,144,211,221,200, 17,226,143,219,123, 45,228,178, 6,209, 78, 51,163, 93,113, 83,150, 28,149,154,102,145,107, 64,
+ 19, 62,226,247,220,198,248,124,128, 99,246,153,158, 38,170,164,148,195,213, 48, 34, 74, 52,204,131, 38,244,121,205, 19, 44,127,
+199, 35,190, 40, 18, 63,115, 62,173, 74,130,176, 87,210, 92,189, 76,233, 65, 98, 81, 31,239, 21, 52, 50,226, 81,161, 67,206,137,
+119,207, 87,174,214, 40,245, 1, 43,153,222, 12,117, 37,173,153,111,127,242, 71,148,122,226,249,253, 71,246,219,141, 97,141,164,
+ 81, 67, 9,157,164, 70,213,194,253, 82,120,126,126,226,195,243,109,238,139, 97,201, 37,218,148, 60, 86, 38, 46,177,242,209,190,
+211,219,133,135,135,123,190,126,248, 26,175, 57,136,134, 24,219, 24,188,127,247,150,203,211, 91,126,120,255,134,203,211, 7, 94,
+ 61,124, 75, 22,101,213, 4,218, 73, 75,101, 41, 29, 79, 78, 41, 5,205,153,147, 59,137,138,136, 80,178, 98,139,225, 71,166,158,
+ 50,181, 15, 88,148, 29, 71,252,204, 41,101,250,112,134, 54, 16,225,184, 70, 50, 37, 75,162,215,168,128, 37, 25,244,142,148,130,
+150, 66,219, 27,107, 86, 30, 78,143, 49, 85, 6, 11,149,253,118,176,155,161,107,193, 70,141, 9, 97, 56,201,157,182,117, 6, 78,
+118,103,116,103, 77,137, 67,140,163,141,104,169, 59,194, 12,232, 75, 66, 70, 66, 77,176,237, 8,229,203, 58,189, 53,122, 15, 40,
+202, 90, 79,244, 91, 24,208, 82,142,125,250,189,156, 98,106,215,204,178, 70,186,225,112, 1,233,104,141,202,222,220, 2,153,139,
+164, 48, 92, 14, 65,220,103,236,199,241, 50, 88,214,130,155,243,114,233, 65, 18, 20, 24,253, 32,137,114,219, 59,169,128,250,194,
+ 97,141, 54,241,201,203, 88, 73,146, 25,185,144, 69,194,211, 42,144,181, 34,213, 89,150,133, 59,114, 96,161,211, 3,153,196, 54,
+ 58,139,174,211, 56, 12,249, 20,184,103, 63, 42,182, 4,131, 65, 60, 74,139,106, 25,220,246, 29,146,112,242, 2, 37, 98,114,150,
+140, 69, 86,144, 74,223, 6,148,140,165,140,141,134,186, 83, 83,101,185, 95,144,107,163,121, 37,201,194,227,253, 29, 57,175,236,
+ 87, 11, 86, 65,178, 48, 72,137, 98,105, 80, 36,179,212,244,185,238, 25,148, 60,235, 86,133, 17,165, 59, 37,113,127, 90,248,246,
+187,111,127,244,129,118, 61,140,227,186,225,222,185, 95,132,114,254, 50, 40,215, 91,119,110, 79, 55, 10,141,199,135,245,139,236,
+233, 63,161,103,111,215, 70,219,119, 30,171, 83,191, 16, 40,231,211,215,135, 1,207,239,158,185,189,188,167,219,117,174,106, 60,
+146, 18, 67,105,195,104, 24,108, 54, 89, 7, 70,219, 58, 91, 19,134, 42, 99, 7,218,129,152,210,113,210,128, 75,106, 72,191,197,
+ 37,180,117,154,247,168,250,178, 30, 60, 15, 75, 84, 41,228,205,184,108,157,244,211, 95,253,234, 55, 49,129, 79,110,123,138, 3,
+ 91,103,107,155,169,205, 58,210,192,185,106,154,230, 50,137, 76,183, 50, 93,225,201,144,233, 34, 23,209, 9, 9,153,242,111,138,
+155, 51,234,209, 64, 69, 0, 33,146, 70,155,144,216,192, 44,140, 44, 62,101,111, 62, 81,213,231, 78,213, 37,148, 2,225,211,222,
+218, 63,205,120, 84,173,161,144,103, 69,107,130,209,162, 77,110,238,185,162,127, 60, 12,126,154,192,109, 96,157,153,123,158, 59,
+220, 2,185,199,255,247, 19,182, 69,101,102,231, 53,178,242,146, 52,100,102, 79,177,211, 23, 24, 71,240,219, 37, 23,176,128, 87,
+ 0,241,218, 82, 10, 68,174,197,170,192,109,204, 28,119, 68,218,178,134,114,113,123,121,205, 15, 31, 21,150, 7,214,124, 99,140,
+ 78,210,194,253, 67,230, 62,199, 19,166,148,200,188,215, 42,200, 56,216, 44,243,167,191,254, 57,127,241,179, 51, 31,158, 95, 72,
+185, 96,162, 81, 85,170,137,154,211,108,199,171,224,198, 34, 39, 28,167,141, 3, 81,231,180,172, 33,197, 79, 31, 68, 42,143, 36,
+ 45,129,185, 84, 99,223,142,160,251,169,211,134,205,140,117, 28,112,189, 7,217, 79, 38, 26,183,207,200,158,207, 75,153, 68, 75,
+ 14, 71,239,211,103, 56,189, 22,159,126, 99, 18,235, 2,183,120,109, 41,110, 68, 97, 84,156, 74,202, 39, 47,169, 32, 1,244,209,
+ 50, 47,155, 51,111, 79,236,216,179,166,144,247,137,247,211,209, 54, 46,205, 57,127,251, 45, 53, 29,108,109, 76, 45, 34,113, 42,
+ 5,236,153,223,255,240,154,158,206, 65,240,243, 35,154,208, 12,142,163, 49,128, 54, 58, 79,215, 27,157,130,229,144,205,197,102,
+175,124,157,181,181,226,244,126,176,245,198,251, 15,207, 60, 63,253,128, 31, 55,150,186,112,126,120,164,212, 51,210, 99,197,177,
+217, 96, 63,140,219,214,232, 45,254,254,203,243, 19,248, 96, 52, 99, 59,140,197, 21,205, 80,178, 80, 40,140,179,224, 35,133, 25,
+ 12,153,242,233,137, 61,117, 90,107, 97, 56,235,133,231,237,138, 75, 96, 40,123,219, 35,167,236,137,221,123, 64, 96,114, 71, 83,
+162, 8,156,151,202, 82,132,180, 38,210,150,232,121,196, 82, 99, 24, 67, 50,142, 48,198,160,156,148,100, 97,194,204,186,176,117,
+240,201,117,239, 51,145,178, 31,145,101, 95,180, 83,164, 32,189, 35,139, 96, 86,233, 71, 35,173, 2, 68, 73, 81, 78,144, 78, 5,
+ 19, 97, 41, 18, 81,215, 82, 57, 45,103,196, 14, 50, 9,207, 37, 64, 62,154, 41,231,132,105, 34,175, 37,216, 17, 71,184,207,149,
+ 83,148, 10,181,151,184,231, 81,162, 65, 15,235,208,156, 0, 0, 32, 0, 73, 68, 65, 84,177, 74,112,231,107,124,207,251,177,115,
+140, 62,115,249, 17, 87,236, 35, 16,198,247,247,143,104,183, 32, 36, 86, 67, 45, 69,215, 69,118,106,173,161,170, 17,112,160,240,
+115,156,168, 75,194,118,101,200,142, 18,234, 66, 78,194,186, 22, 18, 97,140,141, 5,154, 97,148, 9,205,137,247,254,222,250,132,
+211,212, 0,118,141,192,132,186, 53, 50,202, 80,167, 75,166, 72,166,181,134,211, 40,227,142, 69,238, 40, 94, 88,213,217, 83,226,
+ 62,215,160, 54,110,157, 94, 66,177, 40,139,145, 74,225, 76, 32,136,179, 42, 82,167,163, 69, 62,213, 70, 15,178, 46,225,223, 24,
+ 78,201, 5, 69,185,187, 91,249,250, 39,223,254,168, 3,205,128,203,173,195, 30, 13,118,231, 69,169, 95,224, 80, 55,224,122, 29,
+244,237,138, 90,231,254,254,244,197, 50,234,183, 6,251,243, 13, 27,141,115, 26, 44, 15, 95,102, 93,240,233,251,254,248,113,240,
+244,254, 45,215,203, 71,220,110,140,225, 12,194, 32,235,238,216, 30, 24,232,156, 43,151,100,108,210, 65,207, 84,203, 12, 57, 16,
+239,113,158,173,112,108, 87,252,188, 34, 35,207,129,106,112, 53, 35,157, 87,250, 6,153, 30, 83, 44, 3,124, 99,219, 14,140, 74,
+142,178,140,140, 43,140, 22,192, 2, 36, 32, 6, 33, 55,199, 84,101,115,207, 53,154, 71, 60,109, 76, 82,172, 31,179, 60,100,238,
+224,125, 10,186, 46,243, 97, 30,221,235, 35, 15,100,132,147, 93,243, 4,192,244,246,217,192,134,135,123, 91, 52,238, 0, 99, 56,
+163, 27,170,138,149, 76, 50, 65,122, 72, 86,185, 6,183,122,180, 30, 49, 27,143, 31,148,154, 96,173,205,143,215,108, 46,114,229,
+255, 98,237, 93,123, 52, 75,175,243,188,107, 61,167,189,247,123,168,170,238,158,158,238, 25,246, 12,135,164,117, 0, 21, 69,176,
+ 12, 57, 78, 16, 56, 65, 28, 36,254, 89,250,158, 31,148,111, 9, 16, 5, 65,108, 41,144,109,201, 36,101, 82, 34,103, 56,167,158,
+ 62, 85,213,123,218,251, 57,173,124, 88,187,155,148, 19, 3, 6,212, 5, 16,232, 30,206, 84, 87, 23,234,125,247,243,172,117,223,
+215,213,229,237,224, 95, 17,111, 62,225,222, 42,210,189, 25,142,156, 85,112, 82,143,212,160,235, 11,221,210,187,189,118,156, 38,
+ 66,247,116,223,241, 42,166,143,244,206,242, 4,206,211,123,167,149, 66, 8,182,211,124,203,161,199,217,139,205, 5, 59,224, 4,
+103,183,133,170,157,168, 30,231, 61, 75, 57,243,205,155, 76, 30,158,112, 21, 27,189, 46,228, 62,112,117,181, 97,183, 77,104,110,
+132,104, 24,203,224, 6,180,158,121, 94, 60, 15,110,174,217,199, 70,240, 3,211, 52, 50,202,200, 33, 47, 28, 15,106,226, 24,105,
+246,144, 14,110,245, 64, 43,229,114, 36, 4, 33, 14, 9,212, 17, 69, 81, 31, 33,237,136,126, 64,122,179, 85, 75, 93,152, 9,168,
+111, 76,155,192,249,214,104, 71, 97, 8,107,226, 94,168,170, 56,111, 1,157,134, 9, 34, 88, 25, 6,181,118,171, 59,245, 53,236,
+182,194, 99, 84,127,195, 54, 48,249,143,190, 11, 64,233,186, 91, 71,204,244,164,118, 37,183,112, 94, 45, 54, 38, 14, 3, 26,196,
+156,228,235, 65,176,181, 85,213, 91, 59, 89, 28, 55, 15,191,199,147,143, 62,195, 17,240,218,205,102, 36,153, 40,112,255,230, 21,
+127,253,215,255,158,219,195,194,199,159,124, 68, 62, 31,185,125,121, 7,162,132, 21,116, 84,202, 66,238, 14,117,129, 16, 26,173,
+130,223, 4, 50,130,228, 74, 60, 45,104,202, 12,209,222,244, 75,237,208, 26,247,247, 11,151,185, 48, 29,239,185,222,236, 25,175,
+118,164, 71, 55,248, 49, 81, 46,103,206,231, 35, 93, 50,175,223,124, 65,153,247,116, 17,210,113, 99,164, 48,113,236,246,123,110,
+198, 13,222,119,198,171,192, 62,222,176,117, 9, 66, 98,236, 66,118, 51,151,195, 5, 29, 71,234,165, 50, 5,199,161,157, 77,135,
+ 28, 70,202,229,100, 7, 27, 25, 40,209,177,241,142, 73, 32,151, 78,138, 29, 25, 35, 73, 96,110,150, 95,113, 67, 64,115, 91, 91,
+ 44,178, 78,223, 34,165, 22,220,108,172,131, 32, 43, 73,141,153, 82,103,156, 58,150,174,108, 92,167,246, 21,106,228,225,146, 11,
+ 42, 74,184, 40, 62,101,163,203,181,128,164,104, 36,186,105,196,183, 74,203, 51, 18, 58, 18, 35,254,210,105, 37,147,210,214,216,
+ 23,222, 19,157,199, 23,240,217, 1, 21,205, 51,125,116,180,230,104,117,102,179, 79,176, 52,154, 8,146, 23,220,176,208, 24, 88,
+150, 78,136, 29,189,171,118, 89,240,222, 4, 39,105,161, 75,178, 31,171,105, 32, 70,143,199, 19, 71, 7, 13,138,118, 24, 61, 42,
+138,234, 72, 47,133,208, 65,252,150, 48,218, 4,169,149, 72, 61,157,112,201,209, 23, 71,218, 0,101,139,196,194,220,192,235,130,
+ 23, 65,245,138,210,160, 75, 65,154,135, 9, 26, 13,157, 21,170,226, 39,129,165,208,195,218,134,105, 3,234, 3,234, 43, 3, 5,
+239, 39, 51, 72,198,100,221, 14, 87,152,181,155, 55, 91,103, 84,132,235, 7,158,118, 41,156,123,197,109, 19,253,226, 81,231,152,
+181,224,147,160,206, 91, 77,211, 55,155,126, 57,143,200,250,176,232,230, 85,120, 75,248,156,166,244, 15,166,168,153,150, 66, 41,
+221, 4, 65,113,156,222, 91,152,173,170, 53,133,220,154,157,120,111, 6, 53,125,155,113,106,248,228,223, 43, 73,110, 1,230,174,
+132,102,104,178,222,213,104,157,189,210,122, 51,252,114,178,203,205, 41, 23,187,176, 54,143,239, 13, 21,165, 95,128,224,209,166,
+ 52, 7,131, 75,118, 49, 40, 11, 65, 71,203,173,232, 45,253,238,192,180,221, 35,243,192,236, 20, 39, 25, 45, 30,134, 66, 57,207,
+ 4,175,250,110, 79, 28, 87,159,138,168, 73, 49, 88,109,106,173, 22, 16,103,207, 94, 58,244, 98, 29,206,181,174,166,130, 73, 79,
+180, 34,106, 2, 17,161,128,170,225, 15, 67,180, 14,122,235,132,232,214, 52,185,183,207,169,205,248,234, 85,233,213,106,107, 66,
+131, 30, 86,198,183,213,234,236,135,213,250,226,174,175,220,111,177,209,180,169, 79,109, 23, 6,110,213,200, 86,180, 55,196, 69,
+240, 66, 47, 29,188,217,146, 84, 76, 15,104, 9,253,106,211, 4, 21, 22,239,209,238,109, 4,220,141,231,174,193, 66,122, 56,251,
+111, 92,239,235,215,101,245, 43,137,163, 5,238,180, 17,130,103, 22, 79,207,118,115,117,216,186,192, 98,119,141, 82,173,134,133,
+ 26,121,173,228, 51,175, 95,188, 97,241, 55,220, 92, 69, 56, 29,200,213, 18,227, 67,176,233,200,116, 51, 33,231, 76,139,142,109,
+ 80,222, 28, 50, 67,216,241,225, 46,145, 23,211,243, 13,227,104,189,242,197, 49, 36, 69,122, 48,132,110,179,215,152,119, 29,213,
+ 11,155,113, 36,166, 13, 93, 42, 57, 47,224, 60, 46,140,196,112,133, 11, 66,110, 71,142,167, 51,222,119, 98,114,228,166,112,168,
+134,225, 12,214,221,174,181,173, 35,244,142,214,181, 26,167,106,107,136,174,235,238,118, 29,169,175, 92,255,213,135,135, 58, 75,
+ 94, 59,177,232,158,136, 61,252, 13,112,180, 86, 45, 68,241,226,105,116,188, 58,154,216, 94, 40,215,130, 11, 48, 18,185,190,217,
+178,217, 36,238, 79, 51,247,135,153,162,194,239,254,232, 25,143,159,126,194,254,106, 71, 12, 74,111, 11, 75, 9, 4, 47,120, 31,
+ 56, 30, 15,252,228,167,127,205,183,207,143, 56, 47,188,250,234, 23,212, 90,184, 95, 50,131, 56,156, 84, 92, 80,198,100,201,255,
+ 40,118,112,244, 13, 90, 46,168, 83,162, 79,212, 22,201,217, 42, 77, 33,218, 11,207, 77,145, 82, 5,109,157,211, 60, 51,247,204,
+118,185,231,106,220,113,189,191,226,234,217, 15,185, 28, 78,124,247,237,231,156,151, 19,167,243, 61,165,194, 16,108,151, 22,135,
+ 45, 75,109,148,113,166,247, 78, 58, 94, 49,189,250, 14,105,103,246,215,215,140,251, 61, 83, 24, 80, 2,229,120,162, 19,152,107,
+161,212,108,147,161, 34,184,224,205,166,230, 6,118,195, 68,168, 25,100,102, 28, 61,177,120, 22, 42,151,106, 83, 44,154,141,170,
+123, 24,232, 93,168,117, 97, 76, 1, 41,153,193, 55, 84, 43,151,222,240, 89, 57,182,163,153,234, 42,148, 10,113,152,104, 37, 51,
+ 13, 27, 46,161,112, 57,207,196, 20, 8, 41,209,234,140, 2,195, 48,225,199, 68, 61,157,215, 62,187,178,204, 74,242,129,158,187,
+185,190,135, 68,107, 29,245,217, 36, 37,120,114,185,216,254, 63, 76,198,158,183,183, 16, 54, 94, 24,247,137, 59, 61,209,115, 6,
+ 95,105, 26,145,147,146, 70, 51, 51,150,101,161, 55, 72, 65,144,170,196, 94, 41, 68, 82,132,222, 2,105, 52,133,107,208,140, 79,
+ 55, 44,249,140,248,193, 42,187, 4,156, 70,194, 38,194, 37, 91,160, 85,149, 56,141,244,122,161,104,103,240,227,218, 16, 1,245,
+ 23,106,177,209,118,211,198,232,175,172,142,232,160,196,134,239,145,128,105,147, 93, 84, 36,116,166,228,169,205,177,212,142,236,
+ 35,110, 46, 12, 91, 71,244,123,202,105,198, 57,101, 12, 19,190, 38,138,191,167, 54,207,102,124,136,200,140,195,147, 37,163,135,
+ 13,110, 10,184, 12, 75, 93, 51, 23,100,196, 21,171, 6,146, 40,245, 98, 32, 32,181, 85,133,138,245,117,157, 42, 99,136,104,176,
+160,165,143,254,189,220, 76,123,181,195,181,211, 70,140,239,231, 1,169,216,148,184,105, 35,122,236,150,247,158, 62,122, 55,171,
+166,168, 29,160,222, 39,116, 38, 96, 53,202,170,141, 0,152, 75,180,226,131, 82,171, 88,134,108,116,212, 37, 83,179,226,134, 70,
+111,142,208, 3, 69, 51, 41, 57,212,205,212,115, 39,223,123,154,116, 54, 13,156,102, 52,120,242, 41,147, 52,162, 94,168,151,133,
+ 22, 60,132, 4,151, 45,165,157,104,162, 56, 42,193,112,149,197, 70,139,128, 91,251,177,130, 61,225, 43,153, 16,236,116,195,186,
+ 39,106, 52, 27,109,173, 26, 64, 36,208, 74, 71, 29,132, 16,173,114, 20,236, 13,177, 75,160, 54,219, 13,138,211,149,126,230, 32,
+ 85, 75, 83,183,138,115, 38,164,160, 90,138, 79, 93,164,162, 12,211,202,121,175,138,123,215, 7,175,168,243, 52,181,240,151,136,
+210, 74, 39,122, 99,228,170,179,221,110,148, 64,117,250, 91, 61,121,135,115,149,218, 96, 8,158,236,108, 79, 39, 42,120,137,107,
+168,160,209,168, 68,231,169,174, 35,205, 32, 52, 54,219,111,180, 12,201, 59, 60,141, 86, 59,173,174, 61, 34,215,145, 22,200, 75,
+ 39,186, 96,181,174, 21,174, 19,213,129, 87,154, 42,181,153, 34, 50,138, 65, 85,110,111,239,185,171, 55,108,246, 27,250,229,110,
+245,129, 79,140,201, 19,146, 1, 90,118,227, 68, 74, 3, 46, 53, 94,125,247,154,251,182,225,211, 15,119,214,223,119,194,233, 88,
+104, 75,103,209, 78,232,137, 18,172,119,174, 56,162, 56,242,114,226, 88, 23,123,160,199,209, 86, 37,216, 56,176, 57,199,184,125,
+ 72,116,142,186,156, 9,117, 54, 8, 75,105,214,207, 94, 10,111, 58, 86,171,112, 1, 5,150,197,152,248, 93, 27,170, 30,215,140,
+ 43,208,189, 39,136, 39,250,192, 37,159, 44, 91, 97,155,164, 53,181,110,117,186,190,190, 49,202,186,139,183,204,134,173,125,186,
+128,107, 54, 14, 29,136, 4, 31, 86,213,165,185,203,187, 86, 90,233, 28,142,182, 18,122,124,179,225,102,136, 60,127,147,249,244,
+163, 71,124,255,147,199,220,157, 13, 47,234,156,129, 57, 74,104,148,211,137,191,249,233, 79,248,226,171, 23,116,239,233,234, 56,
+228, 70,171, 22,218, 43,189,153,151, 32, 43,181, 84,134,209,250,244,226, 28,195, 96,237,138, 75,235,171,108,168,225, 67, 50,118,
+ 66, 85,186,171,164, 80, 9, 49, 32, 14,154, 88,230, 98, 62, 23,150,124,199,208, 46,108,183,145, 63,252,189,223,225,248,209, 15,
+249,119,191,250,183, 28, 95, 63,167,204,197, 12,116, 75,134,218, 40, 30,206, 71,147,190,236,107, 39, 15,182, 83, 59,180, 11,254,
+190,144,176, 7,158, 79,145,221,246,134, 48,142, 68,157,232,173,146, 82, 66,106,103,244,138, 31, 43,190,221,147, 91,103, 28, 18,
+170,182,246,202,213,214, 46,222, 21, 74, 24,161,204,180, 84,208,217, 17,186,146,253,145,224,214, 38, 73, 53,192,252, 92, 10, 18,
+ 28,125,182,206,189,132,142,250, 74,119,141,238,149,168, 3,108, 4,231, 61,158,142, 31,134,117, 85,213,233,213, 17,125,160, 55,
+ 80, 87,137,226,233, 67,160,229, 11,189, 71,146, 66,205, 51,179, 84,252,232, 8,249, 98,253,122,141, 72,174,228,160,116,159,144,
+ 57,147,203,137,154, 61, 89, 26,161,218,131, 35,197, 96,175, 81,245,171,234, 21, 92,175,214,227,239,208,124,198, 15,129,228, 70,
+100,241,244,101, 97,196, 51,108, 70,154,120,124, 28,215,189,246,133, 92, 33,184,102,232,102,201, 84,109, 36,133,114, 94,167,129,
+ 9, 90, 91,144,230, 57, 29, 10, 93, 10,174, 55, 3, 70, 57,207,162, 51, 78, 58, 18, 61, 65, 18,218, 58,205,219, 84,202,139, 64,
+ 74, 28,238,206,164, 52,154,149, 16, 33,142, 3,229,212, 8,155,137, 16, 45,104, 28,213, 81, 68, 72, 97, 48,192, 77,155,145, 49,
+224, 43,180,161,242, 34, 31,153, 14,138, 31, 38,100,177,247, 65, 31, 60, 9,207, 69, 59, 99, 44,196, 24,105,218,137, 56,196, 69,
+243, 30,104, 32,165, 96,196,130, 38,132,104,245,197,127,240, 3, 82, 49, 76, 50,188, 19,117,189,175, 49,118, 47,213, 2,126, 81,
+215,138,235,123,250,220,213, 50, 90,210,186, 17, 76,223,227,135, 98,218,236,185, 45,228,101,198,105, 99,166,209, 22, 19, 59,233,
+224,184,116, 91,221, 8,192, 18, 80, 95, 8, 77,200,173, 83, 60, 72, 27,216, 70, 71, 47,103,188, 84,106, 19,250, 16, 88, 80,252,
+224,241,167,145,115, 57, 81, 59,164,232,208,185, 82,229, 2, 97,160,229, 76,233,130,255,248,123, 31,255,169,243,193,116,153,205,
+120,212,125, 69,138, 54, 93, 49,140,106, 35,210,190,222,170, 44, 53,237, 8,193,170, 70,109,133,202,184,213,177,142, 55,146,153,
+116, 93,249,236, 22,110, 97,165,197, 53,175,246, 67, 32, 66,175, 6, 59,113,221, 33,174, 65, 20,171,190,121,235,121, 39, 93,193,
+ 35,120,186,184, 21,148, 33,171,126, 13,106,209,149, 96, 84, 86,189,162, 82, 90, 67,156,199,247,183,196, 49, 59,144, 4,231,201,
+205,186,212,136,174,228, 55,121,167,115,117, 43,119, 30, 81, 67,151, 74, 64, 74, 71, 89,113,150,235,238,150,119,123,225, 68,213,
+ 66, 88, 3,134, 94, 28,126,221,201,251,181,166,103,251,102, 59, 41,183, 86,109, 31,175, 74,155, 79,188,188, 43,200,120,197, 20,
+ 10,229,178,160,126, 98, 24, 60,219,113,228,106,123,195,131, 93,196, 41,164,125,192, 45, 51,223,124,119,100,247,240,134,135,215,
+ 86, 80, 75,195, 68,140,202,113, 46,220,221, 53,122, 85, 98,156, 24,134,104,221,213,229,158,115,153,137, 97, 36, 72,162, 73,197,
+105,183, 55,201,165,146,136,136, 20,242,229,118,173,124, 29, 41,117,166,148,202,146, 51,173, 89,106,221, 33,212,108, 62,110,149,
+192,219, 45,245,176, 25,240, 62, 48,164,193, 76,110, 33,226, 98,176, 44, 65,107, 52,167, 70, 41, 19,123,227, 77,105, 32, 14, 35,
+105, 53,156,133, 20,240, 26, 86,245,235,218, 54, 72,182,143,199,117,212, 89, 8,206,123, 35, 27, 10,118, 0, 80,148,203, 92, 56,
+ 29, 27,181, 41, 75, 45,220, 31,143,108,135,145,176,217,160, 62,210,115,166,137,144,203,194,207,126,246, 83,254,246,243,111,209,
+110, 52,182, 20, 35, 72, 71,123, 49,152,145,246,117,226,100,154,222, 90, 42, 53, 23, 90,111,150,139,116,107, 86,192,217, 52,200,
+175,147, 30, 33,128, 10, 37,219, 21, 64, 86,170, 97,112, 9,245, 32,210,241, 21,142,167, 25, 87,207,164, 49,179,221,239,216,236,
+ 62, 68,188, 77, 83, 28, 74,147, 70,203,246, 90,201,173,114, 60,221,115, 57,157,112,174,173,239, 20,202, 82, 60, 48,144,253,192,
+253,225,142,229,124,103,100,169, 52, 18, 35, 20, 26, 74, 39, 18,237,117,179, 17,252,108,220,112,141, 74, 41,182,234, 74, 27, 11,
+ 98,245, 10,163, 4,164,122,150, 82,173, 75,191,116,156, 36,156, 31,232, 90,113,123, 96, 10, 22, 66,107,142,184,217, 98,241, 71,
+161,135,193, 82,232, 68,156,102,100, 12,150,155,136,214,210,232,151,133,228, 71, 42, 5,102,243, 26, 72,116,168, 84,131,229, 68,
+ 33,185, 70, 67,136,206, 16,194, 52,123,207,169,125,193,251,181, 38, 75, 49,252,101, 12,140,110, 3, 67, 67,162,183, 27,189, 11,
+184,224,153, 82, 52,229, 50,141,208,197,192, 55,210, 24,156,195,169,237,242, 25, 2,227,176,179,213, 93,178, 53, 83,111, 66, 15,
+224,134, 72,107,153, 58,155, 70, 53,120, 69,170, 82,165, 65,117, 4, 77, 88,102,223,168,123,154,148,232, 12,158,227,147,178, 29,
+ 61,213,216,182,248,102,225, 84, 47,113,205,181, 20,240, 35,174, 70,226,198,193,118, 36,148,209, 0, 89,107,109, 48,142, 29, 29,
+ 10,179, 15,248, 56,224,107,194, 75,161, 56,243,200,187,170,176, 56,130, 84, 74, 15,196, 41,130,247,180,216,240,189,179, 29, 7,
+210,218, 16, 65, 64,170,172, 18,164,128, 56,143, 19, 69,188,213,224,164, 59,196,123,198, 96,151,155, 90,140,108,169,189,161,221,
+ 58,248,186,106,101,123,239,166,247,125, 11,132,106,214,238, 64,237,193,120, 56,205,148,243,133,222,236, 18, 48, 6,240, 49,218,
+231,105, 54,169,163, 91, 6,138,110,107, 53,222,253,175,255, 71,191, 94,255, 28,237,156, 78, 11,243,233, 72,235,141,128,178,153,
+ 60,178,234,168,109, 2,184,166,170,223, 62,148,126,251,215,191,245,103,216,191,219,222,253, 25,115,173, 28,238,238,169,203,153,
+ 90, 26,187, 36,196,193,173, 47,255, 21, 58,182,254,187,218,215,223,247,110,149,219,110,129, 79,233,246,189, 65,187,129,171,218,
+ 98,123,237,190,240,234,246,200,171,175,190,166, 93,142, 44,101, 54,175, 1,166,189, 46, 43, 46,188,148,198,164,163, 61, 83,170,
+ 48, 80,185, 20, 71, 37,144,253, 66,111,222,104,151, 17,186,116, 66,247,132, 24, 8, 85,144, 90, 89,152, 87,179,101, 99, 94,238,
+109,138,206, 98, 97, 97,239,168, 53, 34,255,248, 79,254,169,138,128, 35, 89, 95, 87, 27, 46,173, 50, 10,170,237,101,154,233, 0,
+123,179, 78,185, 95,245,149, 34,138, 19,227, 88,235,186, 51,238, 98,181, 15,183, 66, 93,140,233,110,183, 38,209,106,123, 36,100,
+ 29,195,218,120, 66, 80, 18,145,172,198, 37,183,222,171,221,182,189,216, 77,163,175,193,243, 48,136,213, 2, 48,237, 99,105, 74,
+242,171,182, 53,154, 76,161,245, 12, 62,224,213, 27, 85,206, 55,180, 90,231,185,172,225, 25,112,150, 5, 96, 13, 8,174, 16, 25,
+ 31, 2,162, 29,231, 2, 42, 74, 45,141,142,105, 84, 85, 21,223, 45,184, 37,222,140,114,185,101,124, 48, 88, 71,173, 11,218, 43,
+154, 38, 6, 44,124,211,232, 80, 28,177, 53,106,232,212, 10,125, 62,113,247,230,192,177, 71, 66,240,164, 16,236,166,231,163,145,
+129,134,137, 71,251, 29, 15,158,236,184,142, 2,243,204, 47,191,124,197, 65, 3,191,251,253, 27, 6,140, 66,212,125, 96,255,112,
+199, 39,207, 62,100, 94, 22,126,254, 55,223,240,205,151,183,116,215,185,191,189,227,254, 92,113, 49,144,196, 12, 92,189, 58,122,
+203,148,118, 1, 25, 72, 18, 80,189,112,169,198, 31,118,171, 13,202,148,173, 74,119, 32, 62,226,124,176,219,116, 20,188, 4, 66,
+156, 8, 49,146,250,133, 16, 77,135,121, 58,156,185,203,103,122,177,159, 19,197,148,160, 67,154,152,246, 15, 25,130, 67,186,133,
+ 45,123,235,228,118, 38, 4,143,230,198,156, 15,134,221,204,133,230, 58,209,123,252,218,146,104,213, 24,228,226, 45,187, 48,164,
+ 4,210,233,249,109, 34,223, 86, 54,193, 15, 60,184,218,240,236,179,143,121,250,209, 99,188, 68,242,188,240,197,231,255,129,159,
+255,237,183,204,181, 17,130,189,209,246,154,185,212,106,121,143,117,207,111, 43,124, 35, 2,246,110, 15,105,191,194,115,146, 55,
+163,218, 48, 38,210,176, 65, 92,226,156,179,101, 80,104, 68,226,138,243, 84, 92,232,108,162, 35,140, 17, 45,157,224, 2,121, 61,
+ 68,110,146,227,230,225, 21, 63,248,209, 63,225,227, 15,127,192, 79,127,246, 51,126,250,147, 63,167,181, 51,243,220,200,221,234,
+116, 90,237,251,238, 35, 36, 23,232, 30,130, 11,124,244,224, 41, 31, 62,251,152,195, 82,248,246,215,223,226,164,176,217, 15,124,
+248,228,134,113,119, 5, 52, 82,179,230, 74,140,133,161, 58,170,122,102, 21,130, 52,212, 39,170,131,168, 11,168,163,245, 8,203,
+197, 24,231,254,154, 62, 52,150,218,104,185,208,187, 35, 77,202,229,190, 48,207, 5,231, 6,100, 16,134,193, 49,183,140,214, 72,
+ 28,192, 5,101, 57, 84, 98, 20, 92, 11,184, 96,182,197,218, 45,240, 24,186, 85, 15,115, 5, 13,224,180,226,157,163,150, 21,246,
+219, 4, 55, 54, 52, 37, 60,142, 86, 32,174, 80,168, 69, 34, 67, 40,204,165, 48,140, 14,252, 72,175, 11,236, 34,105,217, 16,106,
+ 51, 44,180, 52,186,206, 70,216,171, 35, 90, 10, 23, 61, 19,212, 81,157, 18, 72,224, 27,251,155,107, 4,200,217,110,175,189, 23,
+ 46,165, 25,162, 90, 23,250,165,211,100, 50, 54,194,249, 76, 73,230, 52, 24,123, 96,110, 5, 25, 13,140, 85,206,103, 84, 19,187,
+ 52, 82,139,241,220,157, 56, 52, 10, 27,153,112, 18,200,114,100,114,129, 62, 14,148, 82, 13,235, 57, 23,226, 48,112,208, 78,208,
+ 78, 8,157,185,155,219, 94,164,225,250,150, 77,176, 6, 72, 79, 14,215,140, 27,210, 5,194,236,240,131, 55,250,216,224,153,118,
+ 9, 93, 26,251,171,196,118,187, 53, 6, 1,202,169, 54,122,233, 76, 67, 88,223,232, 45, 64,235, 69,136,206, 14, 63, 49, 13,108,
+118, 87, 12,155, 45,209, 5,134, 33,174, 25, 32,123, 27, 53, 13,182,188, 67,114, 27,144,204, 52,216, 96,105,238, 37, 55,150,203,
+140,167, 24, 88,203,193, 24, 71,226, 56,174,156, 1,227,120,200,170,249, 21,237, 22,160,133, 53, 13,110,236, 1,123, 62,246,245,
+230,175, 44,165,145,151, 25,213,178,242,250, 97, 72,145,148, 70,203,143, 96,239, 55,172, 86, 81,227, 4,172,244, 73,187,117,226,
+188,253,190, 54, 12,195, 45, 22,216,190, 44,153,220,214, 26,104, 91,195,142, 41,154,176,104, 37,128,249, 53, 96,108, 68, 75, 11,
+ 52,235, 26,206,126, 75, 30,117,216,123, 83, 45,157,214,141,196,153, 91,229,112, 56,146,207,103,180, 67, 94,238,232,181,177,244,
+197,190,175, 57,115, 90, 58,165,195,164,198,251,168, 93,105,161,144, 91,197, 55,199, 44,149, 54, 47,104,233,232,220,241, 67, 34,
+171,162,139,229,130,154, 83,212, 37,106,153, 73,237, 72, 13,137,188, 40,193,101,146, 27,112,186,225,112,233, 4, 60,184, 6,226,
+ 12,151,233,125, 64, 12,251,182, 30,160,196, 52,158,186, 62,136,213,198,190,193,121,187, 89, 59,197, 55,187, 57,175,193,111, 28,
+182, 95,213,102,181, 11,156,141, 51,155,116,154, 66, 32,226,164, 83, 90,179,174,177, 88,189, 67,170, 65, 68,130,170, 5,217,196,
+186,230,189,234,138,104,181, 29, 44, 98,101, 40,175,224,162,163,118, 99,140,186,106,149, 39,137,130, 22, 5,223,169,171,161,204,
+137, 82, 89,171,122,218,240,206,217,168, 30, 71,136, 17,105, 6,215,176,191, 60, 54,198,112,109,117,126,219,227,191,228, 70,115,
+246, 55,116,189,210,194,250,179,175, 38,171,233,107,194, 81,180,144,187,183,206,127,183, 19, 99,247,118,102,243,189,112, 58, 31,
+120,125,158, 9,131, 77, 64,156,139,124,248,236, 99,126,248, 36,242,213,243, 55, 28, 46, 70, 24, 90, 46,141,205,205, 21, 85,207,
+220,150,194,135, 79, 31,178,219, 6,122,133,210, 33,183,194,155, 23,119, 68, 21,158, 61,189,230,191,251,231,191,195,223,252,249,
+ 79,248, 63,254,213,175, 56, 20,251,123,215,124,160,187,192,146,141, 14,215, 69,152,246, 15, 40,185,161, 33, 49,164, 71, 56,109,
+108, 18, 68,183,167,123, 33, 14, 66,242,147, 49,238,241,196, 24,184,222,236,241,253,196,210,149,143, 30, 61,100,255,240, 17,191,
+254,226, 87,188,124,254,115,142,135, 25,231, 76,217,107,239, 10,138,184,176,190, 64,148, 39, 87,137,221, 52,210, 27, 84, 81,122,
+117,204,125,224,246,213, 61,113,216,144,245, 68, 95,188,237, 44,223, 78, 8,188,153,242, 66,240, 54,150,247,158,228, 6,162, 87,
+114, 83, 98,180,150,198, 82,212,218, 24,181,240,234,238,200,221, 95,253, 7,190,251,246, 27, 62,251,225, 15, 56,190,121,195, 47,
+127,249,156,162,126, 37,123,193,156, 45,145, 42,111, 15,117,210,141,132,232,141, 53, 47,234, 0, 59, 60,212,214,233,165,211,122,
+166,107, 51,157,110,143,248, 48, 48, 36,161,185, 8,117, 13,203,225,168,222,214, 57,167, 44,248, 92, 72,174,227,118,118, 88,234,
+115,225,178,192,252,197, 75,122,254, 11,182,229,192,213, 16,248,236,247,126,159, 23,175,190,134,151,175, 24,150, 70,205,149, 51,
+198,137,118,217,179,184, 6,201,177,148,198, 47,191,253,146,231,175,191, 51,167,122,156,136, 97,226,124, 82,126,253,197, 61,195,
+230,150,237, 56,176,219, 25, 86,212,181, 29,135,190,224,123,182, 67,247,104,185,142, 20, 18,174,173, 73,236,188, 32, 91,111,150,
+181,102,118,188, 97, 35,228, 38, 40, 19,238,210,236, 48, 31, 27,212,153,126,114,104, 77, 48,128,250, 66,203, 2,203,170, 68,238,
+ 74, 41, 21,183, 84,220,184, 67,130,195,245, 76,149,128,244,190,134,181, 28, 58,122, 82, 15,184,218,104, 24, 84,133, 20,209, 62,
+ 32, 61,179, 25, 39,123, 64, 22, 71, 74,153,206,250, 48, 15, 25,127, 89, 8, 4,244,210, 8,221,122,253, 18, 27,218, 7,156, 12,
+244, 65,232, 4,114, 63,217,216, 63,108,145,126,164,167,134, 27, 28, 77, 43,109,174,120,159,104,139,194, 80,137,201,147,231, 5,
+231, 54, 16, 58,157,153,218,133,144, 60,251,152,152,213,102,115, 73, 3, 5,135,204,129,141,223, 24,115, 35, 41, 68,193, 21, 71,
+236, 66,211, 6,110,198,249, 9,231, 2,185,119,244,188,144,198, 72, 62, 93, 40,181, 49,137,199,185, 74,214, 66,239, 35,123, 73,
+ 44, 68,216, 52, 54,203,194, 57,235, 10,245,218,129, 43,140,181,147,221, 66, 26, 6,130, 58,230,161,208, 91,163, 94,172, 55,162,
+107,181, 23, 32,151, 74,107, 54,205,202,189, 17,147,113, 24,172,138, 30,108,186, 25, 12,154,244,217,167, 79, 25,119, 59,203,205,
+185,191, 63, 66,254, 79, 13,187, 85,127, 59, 32, 7,111, 78,141,203,237, 27,200, 51,163, 87, 62,124,250, 16, 23,211,187,113,252,
+223, 11,214,175,159,248,237, 69, 90,248,205,239,215,172,178,173,247, 20, 14,135, 74, 62,220, 82,150, 51,251, 77,100,255,248, 49,
+235, 95,130,183,133, 98,149,245,146,254,150, 60,250, 31,125,237,111,191, 70,126,251,255,187,116,252,253, 29,173,204,212,211,153,
+205,118, 96,251,193,211, 85, 57,186,174, 4,215,209,120,183, 71,224, 59, 50,237,187,223,175, 24,209,149, 93,198,170, 76, 33, 3,
+241,168, 28,190,121,206,237,203, 23,104, 83, 83, 80,107, 32,151, 76,108, 48, 52, 79, 10, 74,166,178, 28, 51,195, 54,174,153,163,
+192,185, 20, 98,154,240,123,207,252,221, 27,100, 26,205,236, 86, 79,164, 33,112,186,204, 12, 98, 7,253,243, 44, 36, 54,184,208,
+201,203, 5,138,210,162,101,209, 70, 46, 4, 45, 86, 11,235, 88,210,208,189,109, 15,119, 11,201,161,214, 11,118,218, 45, 69, 42,
+209,118,202,125, 33,134, 64,236,145, 69, 43,174,139, 33, 40, 49, 69,166, 56,179, 10, 21,116,149, 44,168, 5,179,122,165, 75,195,
+221,124,159,199, 79,119,132,239,126,193,237,221, 66, 94, 41,111,165,152,235, 56,186, 0, 94,168,173,173, 99,207, 21, 20,175,150,
+126,173,125,237,123,235,219,106,157,141,139, 90, 16, 11,167, 57,123, 49, 86, 21, 59,153,121, 7,161, 49,226,232,117,237, 75,123,
+ 7,165,161, 53, 91,149, 47, 56,186, 58,162,218,184, 92,131,167,151,182,214,251,148,228,253,187, 84,119, 15,106, 86,171, 98,253,
+116, 13,109, 29, 83,129, 84, 69, 93,165,213,182,170, 56,101,229,225, 67,206, 71,222,220,207,246,102,229,140,177, 63,183,133,152,
+ 2,159,126,176,231,245,171, 11,151, 96, 1,187,229, 60,147,243,158,211,253, 9,117,194, 52,118,164, 36,187,121,135,194,208,133,
+ 75,133, 55, 47, 46,124,247,252, 21,121, 57,112,251,230,200,177,101, 42,145,205,213, 53,195,240, 17,227,110, 71,108, 74,247, 27,
+ 30, 63, 29,105, 57,227,227, 3,166,209,116,156,155,224,216,143,194,233,112,161, 15,141,122, 94,168, 75,177, 20,243, 24,217,166,
+ 72, 88, 10,231,166,228, 10,249,246, 43,190,187,124,199,163, 15, 62,225,112,255, 13,231,195,188,134,251, 96, 57, 85,156,218,109,
+156,222, 41,253,204,175,190,250,156,201, 79, 54,213,241,158,253,144,120,248,228, 41,109,223,121,121,247, 10, 39, 19,226, 22, 66,
+ 55,117,103,237,157,174,133,174,158,205, 52,224,125,229, 50, 55, 98,178,174,190,102, 91,179,168,179, 10,182,213,233,154,101, 36,
+ 66,228,243,111, 94,241,226,187, 87,116, 34,248,129, 81,140,127, 94, 90, 69,155,241,213,181,174, 15,243, 96,167,250,156, 27,162,
+142, 48, 4,162,216,122,201, 5,251,249,107,189, 65,238,156,156,237, 88,125, 60,179,217,111,152,198, 68,239, 35, 75, 83, 74,201,
+ 72,171, 6,254, 33,209, 91,179,126,246,125,198, 71,207,176, 25,232,203, 2, 26,121,254,245, 29,255,215,225,223,178,189,222,243,
+193, 7,223,227,143,126,231,191,230,244,236,196,207,254,230,255,225,112,120,205,206,121, 74, 86,230, 57,147,187, 64,181,250,211,
+118,191,195, 77,137,211,156,233,231, 91, 6,119,100,156,182, 16,182,156, 46,142,195,171,215, 4,255,138,221, 46,240,193,135, 79,
+217,222, 60,164,103, 97, 28,149, 62, 56,164, 15,208, 22, 92, 18,195,185,119,135,250, 72, 88, 42, 61, 42,185, 11,254, 50,163, 26,
+169, 90, 89, 56, 81, 69,136,110, 66,134, 11,101,169, 20, 85, 38, 29,232, 61,147,151, 78,150,142, 95, 9,148, 41, 77,228,222, 13,
+225,234, 38, 46,189,224, 91, 35, 12,137, 65, 44,180,118, 90, 26,179, 8,227, 54, 34,205,147,162, 39,215, 19,174,116,116,101, 94,
+184, 96,171, 36, 51,166, 41, 62, 90, 37,182,204,153,180,210, 14,139,216,109,155, 0, 99, 20,106,134,190, 8,248,245, 34,160,158,
+ 86, 79, 12,147, 55,158,194,178, 18,219,100, 67, 26, 35,181,103,114, 29,232,154,105,106,246,199,152, 26, 73,141,107, 81,215,134,
+135,170,133,159,162,236,233,156, 44, 12,150, 2, 82, 22, 14,171,195,126, 8,129,232, 38,232, 23,102,215, 17, 57, 65,223,224, 89,
+208,222, 40,217,222,159, 92,140, 52,159,112,181,208,150,133,144, 2,115,176, 73, 81,157,149,179, 10, 34, 35,174,100,154,220,163,
+161,147, 59,116, 77,204,189,145,156, 99,127, 61,177,100, 24,106,199, 93, 69, 74, 43,112, 92,136, 42, 20,233, 22, 70, 12,158,193,
+139,129,131, 48, 72,150, 80,109, 20,222, 60,155,109, 98,187, 27,121,247,148,252,207,253,144,191,255,235,221,228,169,167,128, 22,
+199,205, 62,146, 82,250,255,255,119,127,251,247,242,255,253, 60,191,253,145,128,182,241,212,131, 35, 57,199,213,126, 98, 76,239,
+ 39,128, 39,123,199,155, 75,164, 44, 23, 54, 81,120,250,225,213, 74,102,252, 79,125,209,255, 25,201,184,223,250,136, 15,132,243,
+113, 3,183, 54,106,111,173, 17, 92,183,231,150,131,202, 66, 85,211, 15, 15,227,192,133, 70,200, 6, 40,211,236,136,189,225,212,
+ 49,107,160,151,198,226, 35,221,121, 42, 51, 83,186, 70, 91,229,124, 62, 16,101,160,141,145,214, 97,138, 19,205, 29,105, 64,208,
+ 6, 82, 9, 72, 64,187, 85,195, 80, 27,135, 27,176, 69,215, 7,207,111, 78,226,226,223,178,160,237,225, 85,115, 55,110,122,244,
+171,113, 76,215, 96,142, 1, 25,196, 54, 7,246,205, 18, 27,109,202,218,135,141,215, 19,255,244, 71, 3, 90, 59,255,231,193,147,
+ 75, 93,247, 32,150,149, 94, 88, 59,180, 88, 45,160,169,165, 61, 11,134,124, 29, 86,132,172,190,181,159,173, 99, 62,215, 61, 52,
+103,193, 21, 17, 11, 19,168,195,171,101, 6, 84,108,183,228,215,248,150,137, 74, 32,144, 80,148, 20,131,237,128,106, 69,151, 70,
+105, 74, 28,162,165,191,155,237,123,213,250, 48,208,131, 1, 92,168,182, 55,246, 66, 41,213, 58,253,235,138,129,184,106,106, 85,
+209,156,185,125,115,207,220,197,198,171,206, 88,216, 46,116,234,114,226,197,107, 3,215, 12, 14, 52, 54, 30, 93, 13, 60,255,245,
+151,252,242,249, 29,223,251,222, 99,174,252,136,216, 2,159,136, 16, 55, 66, 34,161,151,204,151,223,126,203,183,183,158, 97,247,
+ 33,207,158, 13,140,155,200,102,119,195,211,135, 31, 19,250, 75,106,105,108,246,143,120,188, 83,238, 15, 13, 63, 36,235, 55,135,
+ 5,233, 59, 62,120,240,132,211,237,183,168, 84,206,167,204, 82,132,135, 15, 34, 75, 13, 56, 45,156,142, 7, 38,119,197,249,118,
+230, 94,224,245,221, 29,165,125,201,245,163, 15, 89,202,133,122,119, 33, 86,232,206,192, 30,178,238,139,123,173,204,173, 83, 5,
+194, 48, 88,199,190,156, 40, 29, 62,124,250,148,165, 47,220,189,186, 35,141, 19,251, 39, 55, 60,222,236,153,219,153, 90, 27,115,
+174, 72, 47,212,114,176,158,109,207,168,139,164, 56, 26,108,200, 25,105, 76,213, 14,109, 90,161, 75, 99, 28, 6, 11,250,105, 39,
+104,125, 71, 71,140,206, 83,196, 24, 5, 78, 45,124, 89,155,173,123,140, 34,215, 40, 75,179,209, 94, 11,132,232,136,201,227,137,
+ 72,231, 55,233,101, 41,248,124,193,249,138, 15, 27,118,155,145,214, 70,242, 92, 56,231,217,252, 1, 3,148,236,173, 94, 89, 50,
+ 50,175, 23,165,201,168,103,151, 86,241,167, 19,103,253,134, 20,132,103,159,126,159, 44, 63,226, 23,191,240, 92,110,111,137,210,
+ 96,240,208,205, 4,214,186, 73, 87, 66,239,108,167,200,253,171, 19,103, 50,234,149,121, 62, 19,211,196, 52, 68,106, 75,188,124,
+213,248,244, 89,224,191,255,111,254, 11,190,254,106,225,215, 95,124,129,159,103, 52, 25,238,151,170, 52, 41,198, 93, 56, 55,170,
+ 87, 82, 82, 74, 45,104,177,145, 37,173,216, 36,172,119, 46,125,161,183,130, 72, 68,244, 66, 62,159,216,142, 35, 36,103,156,246,
+220, 56,246,142,215,133, 97, 19, 8,221,147,123,181, 86,197,246,194,166, 64,149, 13,121,117, 66,187, 41,146, 43, 76,216, 42, 45,
+166, 61,226,222, 18,221, 28,177, 13, 84,159,201,117, 97,231, 70,122,168,148, 37,154, 2, 21,165, 85,199,226, 10,155, 20,169,117,
+ 32, 55, 8,226,240,162,148, 48, 83, 79,141, 9, 79,145, 64,189, 52, 6, 47, 44,234, 9,169, 83,101, 49,110, 69, 72, 68,160,208,
+ 9,170, 12,147, 50,215,192, 16, 3,253,156,113,226,136, 18,136,201,209,202,217,234,177,226,233, 58,195,185, 33,233,134,105, 43,
+116,127,162, 31, 27,199, 80,112,234,112,107, 77,142,222,236,230, 30, 60,185,116,118,219, 0,186, 48,207,103, 66, 26, 72,126, 64,
+ 93,101,179,153,168,179, 77,166,252,232,105,167, 25,241,106, 68, 74,231,113,169,211, 90,199,247,200, 56, 25,235,130,148,104, 9,
+ 6, 17,171, 95,118, 88,162,216,168, 91,212, 46, 55,213, 19,213,232,147,186,218, 13, 85, 29,209, 57, 82,112,239,165,155,109, 83,
+ 73,193, 59, 37,165,247,135, 90, 53, 16,154,154,215, 35,186,247,155,100, 91, 41,169, 99,114,198, 22,121,143, 31,162,230, 53, 9,
+ 81, 40, 81,232,217, 88, 5,181, 43,205, 85,220,228,209, 2, 41,120,206,135, 76, 27, 59, 18,149,249, 62,211,165,112,159, 43,211,
+ 60,225,135,107,122, 60,145,231, 66,174,129,160, 39, 98, 63, 83,167,100, 83,171, 83,133, 90,169,139, 18, 73,136, 92, 33,189, 51,
+235, 75, 90,247, 4,203,217,187,117,119, 32,171,188,161,129,120,235, 8,162,148,254, 54, 92,102, 22,175,176,142, 41,187, 58,202,
+ 90,229,120,235, 43,119, 33,144,187, 85,219,188, 24, 53, 76,176, 91,182,215,182,186,213, 11,237,203,159,243,151, 47, 26,199,165,
+113,210, 0,120, 27, 43,138,165,157,107, 95,189,211, 40,149,138,119,201,240,170,221,161, 65,233,222, 35, 90,240, 43,143,158, 20,
+ 44,108,215, 21, 13, 22,194, 19, 44,136,215,189,141,229,181, 89,200, 69,180,209,107, 51, 84,105, 10,120,160, 96, 98, 4,233, 54,
+185,144,224,145,170, 80, 11,172, 8, 72,130, 5, 41,130,136,213, 76,188, 5,201,188, 26,109, 77, 13,132, 71, 93, 7, 62, 70,224,
+ 50,111,124, 76,142,211,249,204,113, 54, 97,188, 23, 49, 64,133, 11,140,211, 64,156,103,158,191,236, 70,105, 15, 70, 58,223,248,
+192,203,243,137,221,163, 27,158, 93,143,228,243,145, 30, 6,134,209, 64, 42,139, 40,151, 55,247,124,243,229, 87,124,125, 91,217,
+ 61,250,148, 31,127,250, 41, 59,119,100,190, 8, 15, 30, 61,226,251,223,127,140,151, 45,195,112,205, 16, 13,143,248,193,179,107,
+250,233,200, 57,159, 16, 29,169,217, 19,244,150,229,248,156,187,251, 35,210, 34, 46,116,190,188, 63,115,127,123,226,249,171, 23,
+156, 87,118,254,155,187, 35,211,246, 17,127,240,123,191,207,139,151,207,153,166, 27, 30, 95, 63,102,185,124,201,114,233,212, 90,
+ 80,177,108, 66, 91,150,181,139,217,168, 50,211, 46,179,237,140,123,227,117,110, 44,203,133, 42,157, 82, 23,246,219, 27,126,248,
+193,150,124,127, 75, 43,149,152, 28,187, 97,194,249, 29,139, 62, 96,218, 87, 88, 50,199,124,166,148, 19,221, 53,162, 19,196, 37,
+ 98, 12,212, 94,109,189,211,100, 21, 17, 57,194, 26,232,113, 43, 74,246,173,151,160,213,167,232,226,155, 0, 0, 32, 0, 73, 68,
+ 65, 84,186,202, 69,148,249,178,188,203, 0,172, 99, 41,106,179,176,214, 82, 33,214, 72,244,201,110, 99,193, 91,165,175, 84,222,
+220,118,206,177,178,153, 58, 83,111, 12,195,192,180, 1,252,192,124,185,160,221, 52,188, 78, 70, 68, 60,151, 6,163,118,164,118,
+130, 55,129, 78,111,141,115,168,188,249,234,115, 94,221,191,226,225,230, 33, 63,254,236,199,188,120,245,146,207,191,254, 37,190,
+ 84,198, 26,169,106,120,225, 90, 50,103,239,169,151,204,225,124, 97,179, 73,235, 77, 22,180,102,142,186,224,157, 7, 31,120,117,
+127, 96,106,183,252,238, 15,174,249,238, 54,112,188,205, 68, 63, 0, 3, 77, 51, 45,116,244,220,172,254,184,233,180, 73, 72,135,
+ 78,119,142, 28, 60,174, 8,205, 25,249,177,157, 23,186,183, 62,190, 11, 74, 41,157, 67,111,140,209, 51,121,161,143, 27,106,175,
+136,139, 84, 32,104, 33,106, 36,138,174,248, 82, 33, 36,199, 92,108, 36,153,170, 51, 74, 93,244,208, 21,113,205,118,241,151,138,
+138,226,195,192,198,121,212, 69,230,243, 61,210, 61,161,193, 38, 57,114, 17, 78,253,100,254,136,104, 65, 52, 41, 51, 45, 37,164,
+129, 63,216,161,165, 95, 41,204,138,171,198,205,143, 10, 26, 19, 15,175, 71,218,253,204,105, 57,147,134, 29,163,120,100,155,141,
+ 27,209, 51,209, 39,102, 10, 62,218,250, 7,223,105, 37, 32,173,227,227, 6,212, 24,241, 14,161,212, 74, 44,145,209, 11,111,234,
+194, 62,238, 25, 60, 28,231,194,176,162,109,235, 82, 8, 42,232, 37,210,163,225,179,196, 16,133,148,150,153, 15, 5,141, 66, 98,
+ 64,116, 70,130,163,185, 61,131,203, 6, 16,202,129, 81, 38,218, 94, 57,149,194,213,146,136,163,103, 41,153, 97, 81, 24, 28,121,
+ 85, 41,143,209,209, 75,195,135,213,133,209, 43,226, 6,188, 58,155, 21,123,243,115,140,195,240, 94,170, 92,189,241, 14,171, 44,
+ 62,188,183,228,123, 51,119,239, 90, 29,126,143,135,133,102, 18, 43,237,106,214,192,247, 88,103,123,251,253,168, 75, 65,178,146,
+112, 84,103, 14, 16, 15,171, 62, 90,104,115,129,161, 66,171,200, 57,145,211, 9,137,157,155,184,161, 92, 22, 14, 75, 37,244,194,
+168, 19, 34, 5, 23,142,244,101,196,121,101,108,133, 69,205, 89,192,180,193, 87, 37,169, 50,183, 78,145, 74,240, 3, 53,207, 4,
+241,178,238,190,223,142,216,205,184,212,213,172, 78,234, 87, 47,185, 84,196, 41,210, 76,161,105,138, 84,115, 68,235,197,234, 28,
+160,212,213,126,230,145,119, 61,105,149,117,183, 44, 14,149,130, 83,168, 53,243, 77, 49, 30,185,139,235, 55,184,155,121, 77,187,
+141,208, 21, 11,226,104,111,150,104, 45, 25,113, 29, 47, 30,105,171,118, 82, 65,122, 67, 84,222,189,233,246,158,141, 9,191,250,
+224,163, 54, 58, 98,114,249,226, 25,130,208,214, 23,152,115, 3,195,184, 80,230,138,184,145,224, 44, 11,144,165, 91,197, 39, 8,
+165, 55,122,245,118,243, 6, 8,193,146,209, 88, 8,144,106, 19,138, 46,224,194,154,150,247, 14, 23, 11,173, 53, 68, 61,121,201,
+ 28,239,103, 74,119,248,224,172,175, 47, 74, 91, 42, 51,157, 55,218, 41,110,226,131,199,143,217, 12,129, 93, 28,209,229,196,165,
+ 41,159,125,111,135, 32, 28,150,204,178,187, 37,104,162,168,114,119, 58,145, 79,183,224, 29,209, 37,150,195, 29,122, 62,162,215,
+143,184,122, 52,242,120,215,120,254,139,191,224,246,120,207,245,195,135, 28, 94,191,230,238,116, 15, 56,142, 47,110,121, 57,223,
+ 35, 45, 48,151,194, 93,158, 57, 31, 47,168,223, 16,156,112, 56,188, 65,221, 6,239, 2,231,243, 29,196,200,245,205, 13,231,195,
+ 29,151, 95,191, 36,250,196,227, 15, 54, 44,151, 87, 12,155,107,182,227, 53,111,222,220, 83,242,133,174, 74, 19, 27,251,133,232,
+233,162, 4, 31,161, 27,198,214,133,136,138,112,123,184, 71, 93,224,131,199,143,121,180,247,188,185,123,131, 75,201,152, 7, 8,
+ 72,161,207,103,188,247,236,182,137,253,205,142,204, 3,154,192,221,241,142,118,188,112, 57,158, 41,205,126,166,222, 98,132,173,
+139, 42, 76,226,169,210, 87,231,128,163,161, 56,231,136,235,232,170, 43,140,163,167,230,133, 57,159,215, 0, 79,179,234,102,240,
+104,239,212, 90,169,181, 83,170, 35,166,193,132, 57,186, 6,126,106,231,112, 42,228, 82, 25,242,145, 41,109,205,117, 62, 13,180,
+232, 40,231, 66,233,179,245,194,155,144, 83, 34, 47,103,130,235,140,219, 45,146, 6,242,165,211,107,231,245,252,146,101,184,231,
+230,234, 3,126,248,241, 51, 30, 60,249,144, 95,253,242, 23,124,247,213,175,108,202,211,141,243, 95,207, 51, 89,154,253,247, 77,
+ 56,206, 11,187,158,240,222,116,181, 45,116,130, 43,252,228,167,191,224,127,249,250, 75,254,240,199,191, 67,238,137,187,251,215,
+ 60,251, 56,152,248, 71, 10,161, 56,212,123,242, 88,233,151, 66, 95, 44, 65, 47, 93,160, 21, 74,174,184, 20,232, 14, 42, 21,201,
+102,246,243,120,210, 52,160,116,230,101, 38,165, 13, 49, 89,184,116, 35,194,210, 27, 65, 70, 36,102,196,205,248,106, 19, 53, 23,
+ 22, 66, 11,118, 0,174,157, 28, 70, 74, 47,140, 30,130,118,232, 1, 31, 6,186, 84, 46,254, 68,104, 66, 47, 2,206,209,186,163,
+251,128,111,133, 54, 8,177, 22,130, 38,250,156,193,157,145,228,105, 44, 56, 38,226,160,108,100,162,230,198,152, 18,110,232,168,
+ 23,162, 14, 76, 97,143, 43,138,198,196, 85,216,176,180,108,142,246,162, 56,215,145, 48,146, 23,101, 63,108, 40, 78, 17,201,148,
+158, 16, 55, 16, 6, 11,226, 85, 87,105, 10,213, 45,118,248,172,149, 57, 42, 33,141,212, 94,201, 89, 33,101, 46, 25, 66, 52,152,
+ 72,108,214, 50,137, 33, 18,156,226,139, 24,135, 30,184,132,202,134, 64,239, 23,116, 22,148, 1,124,230,152,103,118,211,142, 24,
+ 70,106, 61,209,151,142,186,100,134,200,121,161,208, 40, 2, 62,155,130,185, 59, 97,174,142, 49,232, 58, 93,180,158,130,247,213,
+204,128,226,241,193, 40,140,105, 24,222,211,197,215,182,216,206, 89,192,236,189,222,122, 81, 98,116, 86,117,126,143, 23,117, 86,
+157,247, 48, 37,112,239,247,166, 94,129,210, 96, 94,102, 84,243, 58,106, 95,109,127,205, 84,220, 41,136, 29,244,214,192,120, 61,
+119,152,177,149, 80, 98, 61, 44, 94,208,243, 9, 21,143,134,209, 50, 38,245, 76,190, 52,115,157,197,145, 50, 95, 24, 17,154, 36,
+186,102,118,178, 48, 47, 9, 74, 33,188,213,152,178,142,187,173,186, 96,105, 93,213,183, 28,116,163,206,185,181, 54,211, 86, 40,
+162,170,141,185,139, 42, 90, 76,255,232,165, 89,149, 77,220, 10,165, 49, 53,171,180,138,226,236,240,224,132,222,140,252,228,188,
+ 37,220, 75,175,224,141,195,237,180,210, 74, 53, 88,107,179,100,169, 91,205, 70,218, 61, 82, 58,221, 23, 92,243,246, 64,139,158,
+226, 77, 46,163,173,155, 62,178,234, 59, 77,108, 83, 35, 99, 5,111,201,205, 75,183,155,178,174, 83,129,232,120, 39,148, 81,111,
+ 78,227, 94,236,156,225, 92, 48,213,108, 92,245,120,226, 77, 76, 82,127, 35, 38,113, 35,180, 57,211,155, 37,233,113,221,220,232,
+107,107,195,139,178, 28,143,220, 93,108,228,233, 48,162, 85,171, 5,194,200,144, 70,110, 79, 71, 26,194,205,190,113,245,120,207,
+142,206,231,207, 95, 18,226,200, 78,193,111, 34, 79,159, 92,113,238,157,210,133,122, 56,177,220,189,100, 84, 71, 72,202,183, 34,
+196,155, 71,132,135, 91,158, 62,126,204,131,169,242,191,253,217,255,202, 95,254,236,107, 74,213, 53, 84,209,233,221,163, 52, 46,
+189,174,181, 21, 37,249, 13,105,152, 56,157, 43,251,107, 8,131,231,114, 11, 41,194,213,102, 99, 63,100,226,216,196, 13,196,133,
+211,124,199, 79,255,238,231,196,233,199, 92,239, 28,175,110, 95, 16,167, 71,108, 54,157,194, 29,165,102, 91,181,104,135,158,241,
+ 45,216,142, 58,138,137,113,176,202,200,120,253,128, 79,158,125,196, 70, 27,132,198,227,239,125, 76,242, 11, 63,251,217,175, 24,
+227, 53,143, 30, 61,100,188,113, 92,164,115, 56, 95,200,243,137, 33, 14, 12, 99,100,218, 79,180,237, 53,249,177,237,195, 47,203,
+204,114,190,163,148,217, 40,128,210,169,242, 22, 44,220,223, 25,222, 88,229, 58, 34,235, 97,221,129,119,137, 97,176,122,212,144,
+ 6,190,123,249,138, 90, 77,218,225,131, 85,181,186, 90, 29, 51, 14,137,249,124, 90, 51, 30,222,180,172,199,202, 44,194,121, 48,
+242,221, 48,141,120, 34,131, 27,209,222, 76, 13,235,236,166, 45, 18,169,205, 50, 2,129,198,224, 42, 62,153,106,248, 84, 59,167,
+215,223,226,106,230, 15,254,232, 79,248, 71,223,255, 1,255,247,191,249,115, 62,255,249,207,168, 45,227,106,165,214, 74,143, 66,
+164, 24,205,208, 77,156,114, 1,223, 73,222,113, 51,108, 24, 55, 35,151,176,240,226,245,129, 63,251,215, 63, 99, 63,221,144,235,
+ 17, 74,224,201,147, 39, 48, 42, 41, 59,188,199,176,175,210,169,235,129, 62,215, 74,114,142,150, 28, 93, 61,229,188,216,222,177,
+ 38,136, 1,164, 34, 61,210,106, 70,163,160,174,145, 5,212,123, 46, 21, 82, 15,248,208,209,182,161,185, 70, 8,112,153, 51,181,
+ 8,211,102, 96,190, 40, 83,135,222,239,113, 29,168,137,162,157, 56, 40,213, 43,173, 47,232, 18,169,106,171,155, 56,174,204,245,
+229,200, 18, 61,234,130, 85, 44,213,188,241,145, 64, 45, 74,139,142,164, 35, 77, 10,110, 18,246,189,209,139,189, 9,198, 93, 36,
+ 58, 71, 28,109,250, 66, 83,226, 40,248,139, 35, 37,135,243, 59,196,123,242, 50, 35, 1, 6,201,108,156, 90,186,248, 24,232,233,
+158, 92,133,121,153,237,176,129,135,146,173, 19, 78, 67, 92, 66, 90, 97,230, 66,242,215,104,241, 56,181,214, 76,113,138, 50, 83,
+197, 17,103,203,138,180,113, 32,106,132,102,194,153, 26, 29,122, 46, 4,151,136,161, 24, 88,139,137,114,236,212,233,130, 96,168,
+223, 62, 12, 28, 90, 37,180, 74,242,137, 69,132,201, 71,162, 55, 10, 89,241,214,174,209, 85,112,229,189, 85,141, 21,129, 33,162,
+ 18, 72,152,207,225,253, 0, 98,116, 21, 57, 57,156,123,127,224,153,183,163,236,232,176, 16,219,123, 59, 40,240,206,103,146,134,
+248, 94,153,239,239,190,248,214, 9, 42,148,238, 87,145,217,140,246,142, 31,132,114, 86,250,232,208, 18,161, 44,184,220, 9, 17,
+162,223,112,204, 51,135, 89,217,108,141,255, 94,212, 66,143,209, 69,226, 20, 56, 29, 11, 62,120,124,132, 38, 3,147,107,228, 83,
+ 33,231, 35, 56,161,106,100, 18,161, 57,143,127,242,241,179, 63,117,171,251,218,250,111,224,157,185,183,197, 12, 47,120,233,102,
+ 87, 91,173, 94,172,183,112, 89,185,222, 56, 33, 40,248, 24,214, 94,222, 91, 15,246,202,123, 71, 44, 84,214, 21,159, 44, 93,252,
+ 86, 32,227,188,208, 44, 48,189,126,143, 61, 33, 40,173,151,213,190,253,182, 59, 14, 62, 8,189,216,237,207,211,105, 88,253, 66,
+215,213, 0,206,173,100,183, 64, 8, 98,174,234,102, 55,123, 3, 13,216,169,169,117, 93, 37,124, 22, 82,160,175,180, 31,105,136,
+247,182,131,213,190,138, 29, 58,222, 5, 28,209,186,243, 98,172,251, 49,122,188, 56,242,178,224,180,217, 63, 95,215, 11,244,183,
+249, 66, 49,133,109, 47,220,223,222,113,119, 89, 57,250, 30, 68,237, 13, 58,142,215,236,166,145,203,249, 72,169,230, 35,254,228,
+217, 67,250,253,137,159,124,241,138,171,199, 87, 92,109, 34,189,192, 54, 12, 32,149, 87,223,125,195,229,238,192,126,218,177, 77,
+194, 97, 41,188, 60, 71,158,126,250, 49,159,110, 39,166, 48,161,209,241,191,255,235,191,228,245,105, 38,134, 64, 85,235,216, 26,
+251, 89, 12,250, 19, 6,162, 19,124, 8, 76,211, 64,203, 11,187,253,150, 71,187,129,195,221, 17,112,124,248,240,198,120,234,151,
+153,235,155,107,112,112, 58,157,208,222, 56,156, 23,110, 30,127,194, 54, 69,122,155,121,252,232, 9,215, 87, 27,198,205,192,163,
+253, 67,110, 30, 62, 34,110,182,236, 54, 55, 92, 93,223,176,219, 95, 49,110, 30, 18,199, 29,126,152,248,193, 39,223,227,233,206,
+ 76,120,207, 30,124, 72,155,239,120,241,242,142, 95,126,241,156, 95, 63,255,154,239, 94,189, 68,157,227,225,245, 13,131,120,118,
+211,158, 39, 79, 63, 98, 59,110, 57,207, 71,180,204,196,160,236,167,128, 23,101, 26,182, 12,227,142, 56, 77,208,161,174,252,239,
+ 94, 43,104,121,151,152,125,219,117,181,116,125, 96,136,145, 31,254,232, 51,254,229,191,248,103,252, 79,255,252,143,249,248,227,
+ 15,121,115,123,226,116, 60, 89,231, 22,101,179,221,240,227,223,255, 3,126,239, 15,255,128,113, 51, 50,207, 51,151,249, 12,210,
+236,103, 16, 59,149,231,150,201,115,166,213,106,110,117, 17,115, 26,136, 95,101, 71,246, 38,219,178, 99,206,243,106,214,170,164,
+ 56, 81, 74, 38,231,133, 23,199, 59,190,187,253,154,157, 86,246,219,107, 14,249,100,149, 29,181, 26,140, 91, 25,237,193, 55, 74,
+158,209,106, 60,137, 90, 26,231,185,224,189,242,112,220,226,188,103,110,133, 92,102,230, 92,184, 63,192,231, 95,127,195,213,228,
+185,249,248,134,185,128, 86,193,119,200,218, 45, 15,147, 45,223, 50,248, 72, 81, 71,197, 56,253,162,144,100,117,233,168, 67, 92,
+ 96,240, 19,105, 52,151,121,208, 64,239,102,242, 11,110,141, 51,119, 93, 27, 20, 14,154, 35, 87,165, 86,168,174,146, 20,186, 75,
+150,185,168,149, 99,206, 70,255, 83,165,118,243,204, 39, 17, 74, 1,215,237, 53,138,239, 70,207,195,145, 16,203,253,116, 75,239,
+199,125, 98, 96,189, 88,116, 11, 38,117,103,230, 57,245, 48,122, 79,170,194, 38,140,136, 75, 20,109,132,232,113,211,132, 46, 39,
+114,109,196,253, 42,101,162, 34,117, 64,135,132,202, 25, 89, 32,186,145,220, 47,180, 16, 33, 12,132,186, 48,197,128, 99,196,251,
+ 64,151,206,200,128, 72,103, 16,143, 58,161, 86, 97,112, 74,119,153, 90,149,208, 35, 49, 6,182,187, 29,185,219,247,149, 17,211,
+204,118,136,155, 43, 70, 58,243,226,137,226, 89,202, 5,137, 17,145,129,154, 77,208,178, 73, 91,134,193,114, 67,147,172,114,152,
+176, 62, 76,240,164, 24, 24,163, 77,100,212,153,103, 99,240,102,149,244, 26,216, 77,145, 71,143, 31,224,227, 63,252,182,126,158,
+ 43,117, 94, 72, 14, 54,187,233, 55, 81,241,127,224,248,253,116, 46,244,178, 48, 37,207,176,221,188,183, 49,249,210, 96,185,204,
+104,158,185,218, 14,248, 97,124,175,207,244,115,133,219, 23, 7,230,229,141, 81, 60,155, 53, 21,122, 91,155, 99, 13,179,249,133,
+192,165, 46,164,193, 83,103,229, 52, 55, 32,227,167, 70,108, 16,122, 52, 17,145,203, 38, 44,148, 14, 58,163, 75,161, 78,149,224,
+ 28,243, 92,160,246,149,127,224,137, 20, 90, 53, 39,138,255,232,227,239,253,169, 19, 33, 68, 35,134,137,247,246, 48, 23, 49,146,
+ 28,111,187,139,157,250, 54,226,255, 54,103,225, 45, 33, 47, 62, 34,230,252,195, 99,105, 78,123,160, 7,227, 39, 55, 59, 39, 73,
+244,248,232,113, 69,145,110, 41,123,113, 54, 62,215,245,125,192,105, 67,155, 29, 44,188, 66, 8,238,221, 55, 70,130, 95, 63,191,
+ 26,197, 77,214, 96, 92, 95,109,114,189, 33,193,126,152, 91,229,221,196, 32, 4, 79, 43,150, 75,118,221,173,192, 15, 97,240, 14,
+183, 26,208,122,201,228, 98,183,187,183,162,149, 94,117, 53,174, 65, 12,186, 62,168,157, 41, 65, 69,223,245, 33,197,197, 53, 83,
+ 16,214, 14, 99,181,238,122, 95, 43, 94,218,121,245,234,206, 88,209, 94,222,189, 41, 55, 85, 66,218, 16,122, 33,231, 51, 89,132,
+253,213,158,189,131, 47,190,248,150, 50,108,249,209,247, 38, 66,169, 44, 40,109,233,124,253,213, 11,238,142, 71,190,119, 53,176,
+241,157,101,201, 44, 37,162, 97, 75, 34,226,114, 97,251,228, 35, 62,251,209,239,241,239,254,205,159,241,250,222, 30,234,174,129,
+138, 95,239,171,198, 62,214,102,223, 51, 21,216,132,145, 86,102, 52, 37,246,187, 43,142,119,119,228,210,120,112,115, 67,213,204,
+225,124,102,119,181,103,191, 29,184,191,187, 71,197,225,189,178, 31, 2,255,248,143,254,136, 79,158,125,196,167, 79,158,146, 88,
+232,100,174,134,206, 38, 4,162,111,108, 39,207,199, 31, 60,226,163, 39,215, 60,122,248,144,109, 82,166,160, 36,169,140,227,142,
+103, 31,126,194, 55,127,247,239,249,235, 47,190,227,193,245, 13,109,158,185,189, 63,115,206, 11,113,154,168,245,200,175,191,254,
+156, 87, 47,223, 48,121, 72,155, 72, 26, 38,134,105,139,171,141,243,114, 33,247, 70,155,103,104, 23,134, 8,251,235, 29,131,223,
+227,125,100,216, 76,136,139,134,128, 21, 19,183, 12, 99, 34,250,200,143,126,244,125,254,231,255,241,159,241, 47,255,197, 63,225,
+193, 54,226, 92,228, 95,252, 15,127,204, 63,250,236, 99, 94,188, 58, 83,187, 9,137,126,248,131, 31,241,217, 39,207,216,110, 18,
+ 79, 30, 63,225,163,167, 31,115,117,125, 67,201,149,121,190,224,162, 65,113,180,218,100,168,181,198,178, 62,180, 27, 66, 8,202,
+176, 73,136, 11, 43,224,195, 60, 4, 85, 28,165, 9, 57,159, 24,104,204,165,113,201,149,185, 40, 47,222,188,226,245,171,151,164,
+184,101,179,189, 6, 26, 90, 12,146, 68, 16,194, 38, 16,146,113, 25,234, 26, 84,173,125,230,246,205, 29,247,199, 19,251,235,107,
+ 84, 49,249,138,235,208, 60,185, 9,127,242,199,191,203,127,251, 95,253,151,228, 46,220,190, 57,226,196,194,103,180,128,134, 96,
+ 39,210,210,200, 93,233, 53, 51, 14,137, 16, 35, 49, 56, 52,154, 30,117,152, 2, 68,235, 23,251, 30,112,181,216,129,122, 55,146,
+131,131, 36,184,218, 89, 74,167, 75, 95, 15,245,142, 8,160,149,230, 59,158, 64, 16,101,110,118,219,219,184,117,215,174,224,131,
+103,116,137,203, 10, 79,114,210,169, 94,240,185,211, 93, 32, 12,209,104,133,222, 19, 83, 66,124,194, 19,140, 56, 57, 25, 98,153,
+ 49,145, 8,108,118,193, 72, 24,126, 3,105, 64, 60,248, 10,227,102,135,155,214, 53,145, 79,140,221,118,224, 99,156,240,211, 14,
+189, 20,234, 50,211,194,202,193, 80,144, 22,137, 40, 50,218,196, 14, 9, 20,169,150, 87, 40,138,248,106,127,223,238, 9,130, 85,
+132,179, 34,140,196, 4,195,198,179,168,160,181, 18, 39, 35, 38,250,197,122,233,157, 66,116,123, 90,235,212,182, 48,238, 62,192,
+251,110,104,234,141,237,248,107, 19,180,129, 4,207,184,119,112,106,180, 14, 81,212, 66,214,206,240,215,173, 91, 56,219, 49,224,
+197, 17, 92,196, 57,199, 56, 12, 60,250,240,131,127,176,114,181, 1,243,165,160,165, 48, 38,247,222, 30,190, 69, 97,185, 84, 90,
+201,246,121, 55,211,123,123,168,159,115,167, 92,102,168,133,253, 46,189, 55,157,235,219,143,195,185,115,247,230, 53,231,227, 43,
+168,139, 77,148, 74, 96, 41,139, 33,105,171,216,212,170, 22,200, 80,187,103,135,231,212,206,248, 36,176,100, 74, 20,230, 34,224,
+172,173,144,146, 80,138,210,101,195, 57, 95,232, 24,246, 59,246,107,124,220,227,168,120,175, 54,170,199, 51,231, 66, 16,237,230,
+199,110,171, 87,156,102,193, 51,179, 46,194,122,115,173,205,238,224,170, 54,130,103,213, 59,118,111,212,175,214,205,195,222,197,
+ 60,229,125, 77, 98,170,247, 54,102,235,208, 91,165,213,213,163, 29, 86,226, 92, 53, 62,153,141,229, 89, 49,166, 30, 51,188, 91,
+173, 77,107, 53,142, 85,183, 49,185,119, 88,106, 89,196,212,142, 30,164, 23,148,128,211,176, 18,241,148, 24, 88, 67,108,205,244,
+165,120, 35,205,173, 95, 80,239,133, 82, 5,151, 18,234, 86,226,207,220, 12, 92,147, 44,176,230,215,114,230,210,234,154, 66,174,
+200,104,105,120,235,210, 11,206,219, 24,187,168,201,106,156,172,200, 74, 9,248,232, 88, 78,103,230,170,120, 31,236,176,208,108,
+ 87, 75, 72, 12,227,134, 86,239, 40,181,211,203,204,243,175,158,227,230,133,187,219, 59, 30, 62,124,192,229,245,133,155, 7, 59,
+226,165,242,119,191,252, 37,191,122, 62,243,253, 79, 54,244,208,185, 44,134,201, 4, 33, 74, 99,183,185,225,250,201, 3,110, 30,
+ 61,224,245,223,254, 5,183,135, 76,240, 17,173,141,142, 82,123,163, 10,246,231,151,190,154,209,148, 86,171,145,248, 84,113,167,
+ 76,219, 52,124, 26,104,249,204, 92, 59, 27,159,112,226,200,151,198,211,155, 61,227,152, 56, 92, 50,211,176,165, 93,206,252,228,
+175,254,130,207,190,255,140,248,232, 67, 54,155,206,135,109, 67,159, 59, 99,218,113, 97, 32, 94, 61,226,227,199, 79,208, 92,169,
+237,204,207,110, 95, 16,189, 99, 24, 39, 90, 94,248,187, 95,252, 21,255,234, 39, 63, 39,238, 30,114, 89, 22,134,209,104,133,181,
+116,106,174, 8, 59, 36,195,151,183, 47,249,252,197,107,158,222,220,240,224,193,222,210,164,185,177,219,237,184,190,218,147,246,
+194,237,237,107,238, 47, 51, 41, 55,254, 95,214,222,108,217,178,236, 58,207,251,198,236,214, 90,123,239,211,100, 87,153, 89, 5,
+128, 0, 8,144, 32,197,198,146, 72, 72,178,195, 97,135, 20,214,141,111,253, 64,124, 16, 63,129,223, 64,182, 67, 97,218, 84,144,
+ 18,109, 81, 32, 65,128, 34,122, 20,170, 65, 85,102,158,110,239,189,214,154,205,152,190, 24, 43, 11,164, 29, 14, 95, 48, 51,162,
+162,154,168, 58,117,242,156,179,247,154,115,140,255,255, 62,167,157,253, 94, 8,126, 98, 76,143, 89, 90, 35,175,133,199,143, 42,
+251,253,200,139,247, 31,243, 47,254,224, 91,252,250, 7,239,241,139, 79,110, 72,227,192,229,229,192, 60, 31, 57,221,159,249,111,
+255,155,111,227,189,103, 93, 23,222,220,175,172,173,219,126, 92, 11,135,203,107,166,195,158,229,116,207,205,171,207,109,111,239,
+ 3,126,219,187,151,220,200,154, 57,233,202,105, 89,185,184, 56, 48,140, 35,195, 48,177,223,143,204,107,197,236,161, 74, 85, 71,
+ 87,227, 67, 8,149,189, 79,164,225, 41, 45,175,204,121,166,105,101, 55,237,216, 31,158, 49, 14,207,121,120,248,148, 92,206,248,
+ 38, 76, 83,226,203, 95,125, 65,107,141,155,207,111, 56,223, 47,156,124,103, 94, 59,187,113, 71,110, 29,223, 5,173,142,230,108,
+237,176,214, 7, 38,206,252,214,151,158, 49,207,153,143, 63,250,165,133,171,170, 99, 68,201, 94, 89,137,150,216,237,134,122,109,
+186,176,168,178, 11,246,240,204,171, 26, 20,170, 55, 92, 87,162,171,132, 48,208,231, 70,143,149,188, 8,174,102,246, 50,176, 84,
+ 69, 7,129, 82, 54, 78,133, 57,233,149, 76,174,157, 93,138, 52,241,156,180, 17,189,105, 68,227,224, 41,165, 18,188, 71,165, 16,
+197, 89, 54,102,242, 68, 50,185,121, 90,131,105, 50,121,147,174,133, 62, 37,131,218, 84, 96, 7,125,169, 91,238,101, 32,246,145,
+230,132, 92,148,171,209,193,193,227, 99,164,230, 74,114,145, 30,161,228, 29,187, 49,210,253, 66,209, 35,147, 31,104,238, 64,114,
+ 80,243,173, 57,219,125,226, 92,110, 89, 91, 97,240, 19,218,173,250, 89,218,130, 75,117,155, 86, 94, 34, 75, 70,164,218,251, 78,
+180, 52,188, 48,177,204, 21,223, 27,209,175,212, 5,123,159,116, 19, 82, 22, 86, 45,244,116,131,115,158,232, 5, 57, 52,118,221,
+130,141,126, 12, 52, 77,200, 34, 20, 50, 7,239,240,165,225,198,248,182,148,131,168,146, 91,195,139,146, 92,218,154, 76,141, 85,
+ 45, 7,226,176,213, 90,120, 7,123,234,183,157,117, 17, 54,230,251, 59, 12,157,105, 71,164,147,146,127,231, 31,183,109,213,226,
+119,157, 1, 80, 32,139,218, 84, 80, 45, 44, 29,176, 21,102,233,142,234, 42,197,201,150, 86, 47,228,186,210,114,101,237, 3,195,
+ 52, 50, 4,147,138,201, 16, 72,206,241,112,159, 24,135,149, 59, 61, 17,114,231, 20, 10,187,203,129,176, 12, 84,205,156,231, 95,
+178, 75, 19, 61,174,200,234,105, 18,168, 52, 84,133,224,147,167,171,145,207,188, 8,180, 70, 85, 27,113, 85,108, 28,208,229,237,
+ 30, 52,219,131, 77,172, 18, 36,221,228, 41,206, 23,164,117, 59, 69,134,109,135,243, 22, 49,234,189, 17,128, 2,120, 21,180, 54,
+123,234,109,244, 31,143, 35,107,179,202,133,120,168, 74, 19,197, 59, 27,176, 75,182, 90,209,178, 54,211,180,227, 32,120,171,131,
+109, 86, 34,193,217,234,165,117, 42,198,108,143,219,104,206,106, 77,216,109,164,109,213, 39, 17,168, 6, 72, 9,162, 44,243, 66,
+ 74,158,228, 44,160, 37,193,161,165,144,223, 54, 0,122,163, 59,143,214, 70,116,206, 14, 45,217,250,216,157,206,154, 11,209,219,
+ 40,183, 54, 75,199,123, 31,168,155,177,110, 61,173,212,109,255,164, 98, 97, 66,232,196,241,146,167,215,143,153,111,238,185,215,
+ 74,107, 91,191, 54, 55,214,170,156,142, 71,254,250,225,158,175,125,208, 89,142,119,252,248,179,149,162,158,190, 84,154,238,184,
+ 72,142,172,194,110, 80,220,154, 24,246, 19, 47, 31, 95,242,213,171, 75,254,244,175, 62,226,252,144,241,193,163,197, 70,253, 5,
+190,144,223,136,139,104, 51,184, 40, 2,235,122, 70,232, 44,235,194,221,241,142,218, 42,136,227,156,143,236, 68, 72, 46,144,215,
+ 66, 16, 56,140,137,251,211,106,213,181, 24,249,238, 15,127,196, 31,255,159,127,201, 87, 63,248, 50, 47,222,187,226,238,230, 13,
+243, 82,185,186,124,196,179,167,143,216,173, 43,245,213,231,230, 15,142,144,215,153,190, 20,206,121,198, 15,137, 55, 55,119,230,
+209, 88, 23,142,115, 65,122,192, 71, 79,207,133,243,121,102,109, 7,100, 12,132, 16,208,214,200,173,160, 82,249,244,103,159,241,
+234,238,158,113, 8, 92, 63,122,194,243,235,167, 4, 81,124, 1,162, 48, 30, 38,214,156,201,235,145,160,141,224, 28,195,197, 14,
+ 90,231, 95,254,171,127,202, 31,254,254,175,243,131,191,249,144, 87, 55, 39,126,231, 31,127,131,127,247,199,127,206,127,250,222,
+ 79,249,198, 87, 94,242,239,254,195,247,249,246, 63,251,125, 46,167,137,175,189,124,198,215,190, 52,240,167,255,241,123,124,242,
+249,107, 94,188,247,140,114,124,195,223,254,224,111,248,249,207, 63, 38,164,137,105,183,103,220, 93, 49, 13,145, 32,202,218, 29,
+181, 45,156, 31,142,148,229,196,105, 89, 41,205,129,120, 86,157,141, 17, 30,194,102,180, 83, 8, 19,107,171,168, 54,174, 46, 39,
+118, 59,225,161, 15,172, 13,150,227, 61,243,241,132, 31, 27, 47, 95,124,157, 52, 8, 55,175, 62,166,233,194,122, 86,202, 67,230,
+226, 50, 80,246, 35,189, 9, 15,199,149,139,105, 98, 74, 3,119,231,163,201,131,212, 94,147,211, 0,195, 20,248,248,254,158, 9,
+225,107, 47,223, 35,223, 31,185, 59, 61,208, 7,199,178,218,237, 51,164,193,192, 59,161,208,106, 37, 38,161, 45, 35,139, 86,156,
+100,155,122,117,155, 58,137, 40,185, 41, 94,237, 70,210,139,224, 54,212,111,141, 74, 44,202,172,149,224, 33,212,192, 18, 2,190,
+117, 11, 11,249, 98, 10, 92, 63,162,177,208, 90, 38, 2, 82, 26, 89, 97, 26, 38,235,241,246, 98, 8, 88, 7, 94, 18,141,145,233,
+162, 81,207, 11, 61, 69,188, 11,132,115, 51, 78, 58,153,245,174,144, 24,104,190,177,222,100,210,216,184,138, 35,181, 7,206, 57,
+179,155, 18,156, 23,130,143, 76, 67,160, 72, 71,117, 33, 5,207,202,200, 50, 87, 24, 26, 41, 68,142, 15, 11, 97, 59,160,171, 20,
+118, 62, 49, 21, 65,131, 34,197, 19,170, 39,139,167, 13, 7,212,175, 36, 93, 57,171, 16, 9,156,122,193, 7,181,166, 70,152, 89,
+154, 25, 11, 99,109, 54,174, 79,246,123, 27, 93,226,166, 42,115,107, 92,140, 91, 27,169,101, 78,234, 9, 65, 41,231,206,152, 20,
+ 25, 26,113,174,104,119,204,107,128,209,152,241, 29,221,124, 5,102, 77,243,190, 19, 93,178, 76, 71, 20,154, 20,162,236,136, 62,
+253,131, 29,234,127, 87,186,210,187, 5,138,223,165,112,133,110, 53, 67,247, 46, 63, 46,111,161, 55, 27,194,251, 29,154,223,222,
+126, 61,242, 98,121,172, 20, 58, 53,123,122, 81,154,111,182, 30,233, 32,190,161,177,160,165,176,219, 37,214,150, 16,129, 80, 11,
+222, 9, 89, 34,249,222,179,248,149, 28, 58,107, 41,172, 8,205,101,130, 68,134, 46, 44,229,200,172, 17,221, 14,197,221, 9,171,
+175,248,139, 68, 57,182,237, 32,135,213, 33,164,169,141,218,197,130, 69,221, 91, 16,174,170, 34,254,173,163,215,188,226,174,217,
+ 24,188,118, 59,153,120,186, 89,194,124,183,126,184, 61, 82,237,196,229, 55, 14, 47,118,162, 43,197,160, 44,222, 57,130,116, 74,
+ 23,240, 9, 23,173,227,215, 99,192,111,123,187,174,213,194, 85, 46,144,124, 53,134,124, 83, 52,203,118, 72, 96,219, 53, 26,216,
+166, 75, 53, 68,237,150,152,245, 56,156, 43,219,168, 63,161,100, 75,185, 98,164,187, 64,167, 57,221, 92,195, 74, 16,251,253, 7,
+239, 81,173,219,225,197, 92,220, 73,132, 54,218,216,188,234,178, 97, 23,133,214, 5,117,233, 11, 60,146,108,120,197,214, 43,146,
+ 60,158,202,188,174,198,196,239, 74,111, 2,205,246, 24,211,176,163,230, 35,243,106,201,107, 31, 76, 15,121,174,199,205,122,103,
+238,247,159,255,228, 19, 94,205, 74,195, 19,130,161, 43,247,209,225,139, 13,211, 47, 66, 34, 14,239, 81,214, 19,127,242,199,255,
+ 43,119,167,127,205,167,231,130, 11, 9,109,171,161,145, 43,116,169, 84,221,136, 19, 98,220, 93,135, 81,240, 74, 89,183, 41, 76,
+103,158,103, 74,110,208, 43,235,188, 90, 56,178, 55,150,114,228,147,207, 19,196, 61, 79,159, 38,188, 15, 60,172,141, 16, 39, 82,
+234, 28,151, 76,241,194,185, 86,126,246,233,107,210,205, 61,154,148,120, 11,127,253,183, 63,198, 7,207,243,151, 47,168, 75,230,
+205,235, 55,184,224,121,249,242, 57,105, 3, 1, 45, 75,230,124, 58, 49, 13,198, 49, 14, 81, 88,214, 19,231,211, 5, 62, 38, 11,
+185,104,101, 85, 3, 34,165,157,199, 63, 88,168,234,116,158,249, 69,121,195,241,116,203,224, 58,151, 87, 87, 92,249, 11,116, 85,
+ 82, 28, 89, 90,195, 83, 33,219, 62,248,167, 63,252,132,151,143,158,242, 91,191,253,235, 60,126,126, 77,227,204,254,106,199,139,
+231,207,248,245,111,124,153,251,115,225,248,112,228, 23,191,248,148,159,127,114,224,119,126,243, 27,212,249,158,239,124,231, 59,
+252,120,119, 64,123,231,225,124,226,241,227,103, 92, 31,174, 44,116,169,138,232, 74,115,194,229,238,146,113,127,201,122,113,193,
+195,253, 13,175, 94,223,241,228,217, 51,190,241, 27,223,228,231, 63,251, 9,191,252,248, 83,195, 95,198,193, 8,122,101,166,163,
+ 12, 7,227,255,223,223,190, 97,186,124,204, 56,237,249,236,147, 27,150, 92,232,231,143,208,114,207,225,250, 25,195,112,205, 57,
+191, 97, 26,225,205,235, 19,111, 62,175,124,245, 91,191, 70,119,119,188,254,196, 92,206,159,125,254, 41, 75, 89, 76,236,146,141,
+136,120,125,185,231, 75,207,175,113,221,115,204, 51, 77, 60, 31,124,237, 43, 60,124,255,199,228, 58,111,104,206, 64,109,167,109,
+ 31,102,173,215, 53, 55, 66,172,150,145, 73, 14,213, 72,207,129, 13, 78,128,184, 78, 46,217, 14,235,181, 34, 81,137,233,130, 82,
+ 58, 67,170, 12, 77,169,193, 66, 59, 23,222,147,123,178,186,171, 86,212,117,156,207, 12,189, 19,242, 14, 55, 24, 55, 60,226,105,
+ 45, 64, 93,104, 30,156,175,236,152,200, 10,149, 51,251,236,141,151,177, 26,223, 33,215, 35, 61, 90, 66, 63,106, 64, 92, 32,183,
+ 5,169,142,105, 47,172,205,227, 37, 35,226, 56,159, 61,135, 33,208, 93,101,174, 25, 9, 30, 6, 97,169,194, 20, 70,171,216,137,
+ 17, 39,189,245, 84,201, 93,161,143,236,164,176,186, 51, 61, 57,166,139, 68, 91, 50, 82, 39, 10,153,122,204, 44,205, 60, 21,153,
+ 21,215, 4, 77,131,161,175, 93, 66,114,227, 98, 47,188,247,226,203,220,190, 46,220, 31,111,204,147, 17, 7, 82,239,164, 62, 50,
+168,131, 1,134,238, 56, 21, 71,233,142, 20, 2,251, 0,165,120,184, 8,104, 49, 61,169,171,157,238, 26,132, 78,109,213,110,227,
+201,111,178,164,190, 25, 21, 61,158,128,243, 16, 83,124, 39,183,223, 90,205,204,104,140,136,119,119,155, 54, 4,187,110, 16,162,
+119,251, 80,111,213, 8,254, 65,216, 20,208,239,246,166, 94,114,161,150, 74,171,102, 46, 85,103,235, 56,169,118, 89, 44, 5,138,
+ 8, 48, 24,107,101, 16,147,101, 13,137, 93,140,176, 84,150,193,158, 89, 49,102,230, 69,241,106, 6, 75,223,132,163, 10,195, 62,
+ 32,210, 72,231, 68,174, 66,175, 51,201, 57,132,133, 41, 37, 84, 2,161,183,142, 74,133,224,209,102,108, 57,186,216, 77, 92,100,
+ 75,248, 90, 90,217,137,225, 81, 5,235,139,171, 56,136, 1,165, 90,149, 72, 54,252,102,115, 72, 18,146,183, 4,125, 83, 65,196,
+ 89,221,173,111,227,121, 39,168,223,176,156,218,191, 72,215,107, 83, 52, 12,224, 42,209, 5,219, 61, 23, 19,194,216,232,206,246,
+ 73, 78, 4,103,243,126, 74,175, 27,233, 46, 90,124,102,131, 62, 72,179,149,128,153,132,218,246,128, 86, 16,123,232, 46, 77,192,
+219,222, 75,181,211,130, 61, 44,234,146,109,204,207,198, 67, 86, 33, 72,223,192,252, 13, 85,143,139, 80, 17, 90,171, 36,239,105,
+218,240,126,163,204,117,204,155,219, 59,249,188,178,214,205,227, 94,213, 26, 1,206,129, 15,140, 67, 66,219,194,113, 53, 68,167,
+247, 32, 65, 57,159, 87,134, 97,199,197, 46, 16,171,242,203,251,149,182,173, 51, 74,239,220,212,206,235,211,202,251,143,174,121,
+ 34, 16,189,242,253,143, 63, 99,246,158,143, 42,252,179, 47,127, 21,249,197,127, 96,209, 51,189, 59, 74,175,168, 20,219,249, 98,
+149, 37,231,228,139,188,128,223, 2, 46, 29, 19, 76,136, 24, 79,191,212,206, 58,175,196,105,228,112,253,152,203,171, 39, 60,127,
+242, 30,251, 36,244,100,252,167,228, 19,206, 21,142,119, 71,238,151, 27,202,105, 33, 18,152,134, 72, 65, 57,159, 51, 47, 95,236,
+184,186, 60,240,250,214, 14, 47,215, 79, 15,188,185, 59,114, 42, 43,247,199,133,235,139,196, 52, 36,206,231,133,211,124, 79, 26,
+175, 54,141,174,133,203,154, 42,169, 59, 98, 20, 74, 21, 90,206,180, 6,210, 29,222, 25,139, 64, 0,239, 27,201, 59,230,186, 50,
+191,126,205,241,148,113,162,208, 50,251,171, 43,158, 92, 63,166,172, 43, 97, 16, 62,123,243,192,159,253,249,119,248,201, 79, 14,
+252,247,255,195,191,196, 15,158,127,252,237,223,226, 31,125,235,235, 56,224,122, 26,248,241,135,175, 89,158, 63,231,209,245, 5,
+ 15,167, 51,159,221,220,112,117,189,227,227,143, 95, 17, 66,226,234,233,115, 46, 14, 7,164,207,204,243,105,219, 99,186,141,136,
+151,161,142, 68,151, 24,198,145,103,143,161,148,153,178, 28,249,221,127,244,187, 60,121,246, 62, 63,249,209,247, 57, 29,111,120,
+122,245, 24,130,231,248,112, 34,184, 78, 57,175,140, 46,178,235,157,215,183,159, 49, 47,103, 19,232, 72,231,116,188,103, 94,103,
+134,225,146, 48,152, 24,231, 75, 95,186,226,219,255,228,247,248,246,183,127,143,255,252,179,159,241, 63,190,249,159,248,229, 71,
+175, 89,203, 39,120, 23,184,124,116,193,110,186,228,220,225,233,227, 43, 6,127, 9, 61,114,123,115,131,212,200,243, 95,123,193,
+251, 47,175,249,217, 79, 78,212, 6, 75, 91,240,211, 0,115,163,180,140,211,104, 7,250,182,226,122,162,175, 1, 74, 37,186,142,
+244,192,172, 43, 40,196,105, 64, 84,240, 97, 79, 43,103,116,153,233,218, 88,194,100, 88,233,197,166, 85, 85,173,177, 81,125,161,
+ 55, 97,144, 11,154, 52,252,154, 9, 59, 71,110,153,166,194,224,160,149, 51,213,155,217,113, 23,246, 44, 0,174, 33,107, 32,227,
+144,168, 80, 21, 9,246,112,214,214, 32, 39, 6,117,180, 61,132,213,236,122,243,220,201,161,114,209, 2,145, 78,107,103,102, 60,
+ 81, 5,137,202, 24,163,221,254, 67,192,119,165, 71,171,158, 46,107,227,176,243, 20,221,225, 81,166,197,161, 41,242,144,193, 39,
+168, 40,238, 81,164,221, 43,125, 94,153,162,163,118, 8,161, 67,241, 27,228, 72,161, 7,226,106, 45,160,131,223,243,236,242,154,
+245,246, 51,206,234,232,163, 48,183, 70, 24,204,189,225,253,192,218, 28,116,235,207, 15,140, 84, 49, 94,136,143, 35,139, 54,218,
+ 12,195,190, 49, 13, 59, 83, 83,247,206,152, 44,172,233,212, 46, 24,205, 91,134,166,169, 34,174,217,207,208,244,110,106, 92,125,
+227,176,122, 7,254, 93,250,206,213,164, 74, 94, 4, 39,239,238,227,214,190,189,245, 75,223,146,250,239,118,252,158, 59,244, 92,
+113,181, 81,123,167,170, 77,221,188, 90,195,234,220, 21,122, 99, 62, 21,252, 69,196,229,202, 40, 74, 72,142, 12,228, 94,113,151,
+142,112, 22,244, 65, 41,110,101,234, 19,121,153,201, 99, 96,172,133, 92, 18,107, 23, 14,154, 88,235, 2, 34, 52,174, 89,227,189,
+ 73,166,180,218,244,185, 43,155, 62,117, 43,229, 59,143,120,163, 24, 65,199, 7,135,219, 36, 45, 85, 77,208, 34, 62, 80,154,169,
+ 83, 61, 98, 39,117, 31, 45,189, 74, 67,187,226,244, 45, 23, 87, 76,167,218,197,126,224,136,134,139,149, 66,175,130,108, 35, 35,
+ 74, 65,123,167,244,134,111,209,166, 6,222, 72,112, 26, 4,223, 21, 95, 59, 18,204,126,133,195, 92,237,120, 82,116,208, 10,173,
+ 25, 5,207, 59, 76,254,140,117, 65,187,217, 81, 77,135,232,109,175, 34, 34,168, 19,188, 19,162,136, 29, 28,140, 14,111, 9,229,
+102,129,162,241,209,173, 0, 0, 32, 0, 73, 68, 65, 84,158, 30, 19, 78, 13,109,233,122, 67,182,204, 65, 32,209,213,129,119,180,
+181,162,152,150, 85, 38, 7,179,245,230, 61,158,156, 43,181,154,114,150,237, 32, 34,206,170,124,206, 41,235,122,162,150,182,121,
+153,189,189,232, 47,175,120, 62,121,242,124,207,210,160,138,173, 57,236, 60,226, 57,159, 5,199,192,133,119,132,141, 94,181, 30,
+ 63,226,123, 31, 45,212, 97,228,175,255,226,223,242,201,135,159,194, 82,201,170,104,215,237,112,110, 33, 65,245, 14,237,130,182,
+130,243, 14, 47,126,227, 7, 10,174, 59,178,118,122,171, 32,194,254,242,125,158, 63,127,202,184,243, 60, 62, 92,145, 92,179,177,
+189,119,212,249,136, 75, 35,211, 97,226,234,226, 5,251,187,196,235,219, 19,126,245, 92, 62,174, 60,156,206,188,122,117,143,208,
+ 25,124, 4, 26,247,119, 15, 92, 12,129,139,221,200,114,151, 57,205, 39, 46,118,145,195, 48,112, 62,159, 89, 22,165,174,158, 49,
+ 37,206,171,157,124,215,229,196, 16,119,164,105, 34,175,150,251, 88,215, 98,234, 73,103,240,232, 86, 26,126, 31,173, 23,191,110,
+255,108, 11, 98,222,223,157, 32,141, 60,122, 36,228, 53,115,177,223,145,162,227, 71, 63,249, 5,194, 75,150,155,207,137,151, 17,
+ 84,136,131, 39,159, 43, 75, 81, 30, 95, 29, 56,205, 74, 12,145,195,126, 34, 14,145,188, 84,134, 97, 96,127,121,197,163,195,196,
+146, 79, 56, 21,122,247, 20,173,228,178,210,123,165,136, 26,159, 65, 50, 67, 8, 92, 60,121,198,105,153,185,185,189,225,189,231,
+143,248,198, 87,159,243,236,201, 53,255,249,187,223,229,238,205,107,118, 23, 35,193,123,150, 83,166,134,206,163,199, 35,111,110,
+ 94,241,139, 95,254, 18, 39,222,124,229,221, 81,157,114, 57, 29, 88,215,149,245,124,143,147,145,151,207,222,227, 43, 95,185,102,
+ 31, 29,174,116, 46,199, 61, 31,243,218,160, 36,162, 60,220, 63, 48,141,138, 15,215, 60,123,121, 65,215,149, 86, 19, 23,251, 29,
+175, 62,125,224,238,245, 43,122, 55,167,183,111,221,106, 88,165,208, 52,155,207, 65, 12, 36,213,250, 96,252,128,220,233,169, 89,
+ 43,164, 41,174, 21, 28,131, 33,145, 55,159,180, 72, 67, 54, 5,174, 19,147,119,132,232,168,210,137,221, 52, 78, 46,140,248, 8,
+122, 94,112,128,140, 35,173,174,212, 94,136, 62, 48, 5,161,121,111,245,203, 30,223, 38,126,168, 53,227,178, 99,118,214,123, 15,
+150,101, 52,171, 90, 17, 28, 43,139,239,208, 7,106,119, 28,162,193,148,106, 62,113, 26, 3, 67, 78, 12, 65,145,168,180,150,240,
+ 18,185, 59,206, 12,251, 9, 39,155,200, 7,143,148, 78, 84,211,207,122,245,212, 94,145,209,209, 92, 38,201,129, 65, 11,235,176,
+ 34,110, 64, 6, 88,130, 18, 53, 16,239,149, 93, 12,168, 91,184,155, 87,168,149,235,131,183,240, 92,123, 66,246, 51,223,255,225,
+135,204,243,202,197,232,201,213, 52,210,173, 43,164, 1,199, 96, 10,236,224,241,201, 83, 79, 5,215, 19, 71, 7, 65, 10, 72, 99,
+ 76,131,237,133, 93,163,174,141, 24, 60, 90,108,194, 37, 97,147,175,180,198, 16, 71,132, 74,148, 72, 12,129,228,223,205, 67,189,
+110, 23, 64, 7,239,118, 76,110,227, 73,188,219, 32, 61,239,144, 82,215,186,133,159,211,206, 66,220,239,242, 87,219,100, 85, 33,
+ 40, 61,118,180, 24,128,180, 22,161, 74,161, 72,163,169,176,191, 26,240,139,114,179, 42,109,237, 92, 28,172,125, 18,171,224, 70,
+165, 46,133, 83, 59,225,207, 21,191,239,244,253,142,126,215,168, 62,224,220, 2, 24, 96,171,248,134,171,157,180, 11,132, 22,201,
+247,243, 86, 69, 79,132,206,219, 27,180,245,112,251,182, 43,239,189, 26,233,127,219,127,183,238, 8, 98,233,239, 42,178,233,106,
+196, 24,241,226,105, 82,137,221, 88,235,160, 54, 6,240,118, 91,102, 75, 94, 54,103,124,238,222, 27, 65, 28, 4, 67,178,182,110,
+148, 55,188, 85, 87,130, 44, 56, 9, 84, 13,230,105,118, 29, 81, 99, 58, 55,245, 56, 42, 90,192,133,104, 5,187, 98, 9,123,239,
+236,230,230,188,125,243,138,179, 16, 97, 23, 71, 15, 14,167,198,161,151, 16, 45,240,212,213,170, 50, 40,226,186, 17,225, 74, 71,
+131,105,210,107, 85,164,228,109,239, 28,168, 20,180,118, 42, 13,183,102, 91, 91, 56,133,224, 76, 74,131, 71, 66, 39,142,253,173,
+201,143, 82,234, 70,209,179, 4,237,232,163,117,215, 67, 36,186,192,188, 86,123,232,110,189,127,239, 60, 95,122,180,199,231, 59,
+226,193, 49,206,141,155, 89,168, 90,141,129,220, 60,143, 14,194,123,215, 17,100,229,180,118, 92,152,248,214,215,174,248,240,246,
+204,167,119, 39,254,247,255,237,223, 18,134,180,233,106, 45,115,160,106,118,243,183,246, 3,121, 59,150,115, 30, 63,154, 62,212,
+ 41, 68, 47, 84,205,140,211, 99, 62,120,241, 77,222,127,249,152,221,208, 88,202, 66, 47, 15,100, 26,165, 9,100,131,241,204,249,
+196,124,187,226,117, 0, 85,246, 83,130, 14,251,139,129, 90, 43,243, 58,179,206, 43, 69, 29,206, 57,150,156,185,121, 56,217,129,
+177, 99,249,129,210, 72,131,125, 46, 69, 51,213,101, 98, 12, 4, 39,100,173, 44,107,101, 26, 26,189, 26, 19,129, 90,153,207, 39,
+219, 15,226,104,210,113, 40,222,219,152,209,252,130, 91, 6,196, 37, 66,220, 44, 83,181,224,156,129,139, 90, 81,254,187,127,253,
+ 95,241,237,127,254, 91,196,120, 70,139,226,125,162,183,206,249,126,166,171,216,138,198, 67,244,209,232, 97, 26, 72,227, 5,207,
+247, 79,192,117,150,114,102, 55, 6,164, 42, 55, 15, 11,243,241,100, 52,196,222,168, 15,103,150,249,196,227,203, 71, 36, 58,165,
+204, 92, 95, 30, 24, 39,199,239,252,230,151,185, 63, 62, 80, 40,252,243,127,241,207,249,254,223,252,128, 31,254,224,123, 56,239,
+ 24,134, 3,116,199,155,215, 39,142, 15,179, 57,197,187,229, 79, 66,138,198,216,159,246, 4,175,244,229, 1,156,112,188, 89,249,
+159,255,205,159,240,135,255,117,231,245,205, 29,159,126,254,154,222,154,153, 4,155,179,125,250,122, 98, 31, 18,147, 8,218, 23,
+230, 89,137,110,100,117,141, 15, 63,126,195,124, 90,201,171, 67,134,142,215,138,115,145, 30, 7,242,188,210,251,130,196,145, 46,
+129, 32,158,228, 18, 69,149,181, 44,120, 25, 72,195,158, 21,165,215,217,164, 20, 46, 64,220,225, 27, 95, 92, 12,106, 83,220, 65,
+ 72, 50,208,215, 64,140,178, 9, 50, 26,153,197, 82,229,114,132,193, 51,174,123, 92, 84,238,231,133,233,224,241,171,125,159,187,
+ 10,148,149,131, 23, 86,175,180,188,218, 45,113,136,204,222,163, 15, 29,138,210, 70,152,186,167,173, 74,240,145, 93, 26,104, 77,
+209,102, 85,194,117, 74,104,170,164,115, 70, 99,227,232,162,173, 20,171,199,135,142, 4, 79,244,141, 78, 36, 14, 23,160,149,124,
+127, 6,129,180,155,160, 56, 52,205,180,224,241,110,194,149,200, 48,128,207, 43, 82,132, 50, 84,203,246,120,207,120,189,183,247,
+162,226,104, 81, 24,166, 74, 88, 29,119,245, 68,218, 59,214,115, 37,250, 61,113,138,198,124, 47,142, 54, 65, 59, 47, 6,129,123,
+122, 77,203, 10, 46,211, 37,226,113,196, 36, 16, 12,255, 90, 91,193, 37,179, 79,218, 92,185, 18, 9, 12, 81,172,170,212, 59, 62,
+ 89,189,177,123, 49,232,213, 59,216, 31,107, 83, 11,157,241,238, 68,234, 38, 93, 83,122,107,132, 36,239,180,163,222, 55,243,162,
+ 29, 24,222,113, 0,111,251,228, 91, 46,204,107,195,245, 68,107,213, 70,239,163,224, 72,132,181,126,241,140, 57, 3,131, 15,140,
+131,160,203,153, 24, 3,179, 58, 56,122,156, 22, 98, 31, 72, 97, 7,221, 81,214, 70, 74, 9,145, 76,140,123,150,227,204, 76, 99,
+204,130,132,192, 82,142,196, 62,146,139, 35,238, 20,215, 27,193,163,150, 22,215, 77,222, 34,111,251,223,225,139, 55, 94,186,141,
+143, 59,102, 76, 99, 99,105, 59,217, 76, 87, 94, 13,233, 42,221, 48,174,146,192,219, 55,219, 13, 30,205,138,115,149,136,167,122,
+211,170,118,239,232,173,109, 88,120, 69, 17,219,203, 59,111,156,237,216,209,150,113, 93, 89, 87,199, 97, 8,184,222, 89,138, 49,
+197, 7, 9, 86, 93, 21,161, 55,103, 59,216, 77,209,170, 34, 52,177,116,190,115,237,139,125,103,235,182,171,211, 22, 73, 67, 96,
+204,149, 34,206,110, 90, 98,212, 57,117, 98,129, 24,181,155,106, 87,187,205,155,199,219,128, 29, 40, 70, 26,163, 89,101,202, 37,
+122, 95,237,244,186, 8, 62, 89,133,207, 53, 51, 39,173, 93,113, 61,224, 66,220,122,245, 13,145, 45, 64, 40,109,243,179,123,106,
+ 45,180,146,208,114,203,224,149,203, 97,160,113,230,246, 1, 30,112,214,159,215,202,213,245, 72,140, 43,111,212,163,197, 49,180,
+202,245,176,231,247,191,252,140,115,249, 28, 63, 8,247, 15, 11,205,245, 47,244,141,142,110,171,252,183, 76,128,110, 53,198,105,
+ 24,104,181,108,104,126,111,161,197,238,121,241,222, 7,252,151,191,255, 79, 8,195,145,211,178,240,230, 38, 32,222,115,127,124,
+ 67, 19,240, 53,227, 82, 66,181,145,170,163,144,105,174, 17,165,177,195,130, 67,227, 48,176, 27, 15, 60, 76,103,142,119,119, 60,
+145, 71,156,114,102, 93, 29,222, 59, 14,151, 23,164, 16, 54,221,169, 67, 60, 44,231,133,178,172,236,134,209,114, 5, 13,214,156,
+113,178,103,116,222,168,135,173,177, 44, 74, 11, 25, 69,209,222,192, 69,188, 42, 85,183,189, 34, 66, 43,141, 30, 4, 31, 18,189,
+153, 36,168, 57,251,119,206,243, 3,127,248, 7,191,206,179, 15,174,185,251,116,134,213,209,135,142,106, 97,119, 57,114, 62, 23,
+214,166, 16, 18, 63,249,240, 67,254,226, 47,191,199, 71, 31,191,102,127, 56,144, 98,228,246,230, 53, 49, 56,124, 83,110, 79, 71,
+214, 50,155,245,175,218,148,171,119,229,124, 84, 92,126, 77,120,246, 20,233,149,225, 74, 24,210,158,139,120, 32, 94,122,254,151,
+127,243,127,240,149,175,127,139,223,253, 47,126,155, 39,143,174,249,247,127,246,167, 28,251, 61,187, 97,199, 90, 44, 25, 61,133,
+ 72,107,157, 90, 27, 57, 84,158, 94, 92,226, 90,167,106, 97,112,130,134,196,112,113,193,152, 28,223,249,243,255,200,116,185,227,
+209,229,129,251,219,123, 11,239,180, 74,244,176, 54, 69,230, 19,243,121,221, 78,116,137,178,118, 90, 11,156,215,206, 90, 29, 99,
+ 72, 44,110, 69,212,211,215, 76,173, 91, 91, 68, 6,180, 22,162, 91,193, 37,214, 8,129, 61,169,207, 40, 25,134,132,111,224,155,
+ 39,106,199,135, 74, 17,232, 61, 33, 58,163,179, 85,160,122, 23, 38, 7,132,202,114,178,208,105,243,133,216,131,145, 44,189, 16,
+170,103,237,149, 92, 5, 39,145,249,193,118,161, 18,179, 41,105,219,153,186, 63,192, 48,208,214, 19, 85, 23,168,141,243,169,160,
+217, 65,175,102,215,203,141, 20, 29,213, 11,180,196,144, 54,155,227,234,129, 51,174, 70, 22,162,209,228,176, 74,154,182,204, 18,
+ 19, 73,237,101,233,162,125, 47,149,134, 12,142,128, 77, 45,135, 48, 50, 36,193,187,200,178, 40, 4,197,185, 70,144, 72,137,149,
+113,112, 4, 63, 16, 99,229,110,134,250,208, 73,106,210,155, 50, 47,156, 91, 32,186, 72, 26,237,225,178,212, 21,215,236,235,238,
+227, 37, 75,173, 80,149, 24, 58,210,102, 36,121,100,245,164,222,209,131, 35,159, 97,242,141, 48, 41, 90, 29,174, 59,198,193, 52,
+187, 61, 88, 94,167,181, 70,138,208, 61,172,173, 32,193,244,189, 46,164,127,248,173,148,141, 1,177, 77, 83,223,213,195, 87,129,
+ 82,218, 38, 14,251,149,254,245, 93, 5,240, 84,173,214,236,125,226, 93,255,106,106,120, 91,175,121,131, 95, 69,227,247,231,140,
+120,107,106,116, 49,208, 25, 69, 41, 30,206, 55,103, 34,141,197, 67, 61, 40,235,109, 38,132, 68,138, 43,193, 79,148,234,104,231,
+ 59,228, 58, 64,138,140,103, 37, 5,203, 88,172,218,241,165, 17,171,163,214,140,184, 72, 94, 58,174, 58,252,139, 23, 47,254,232,
+ 45,240,207, 30, 92, 98,157,113,111, 61,100, 23, 4,239, 29,210, 58,234, 77,128,235,192,110,167, 94,160, 7,123, 72,200,219, 66,
+156,223, 64, 53,130,244,102,151,125, 15,162,142,130, 65,250,221,118, 46, 64,155, 41, 58,183,235,163,176, 73, 9,156, 5,229,130,
+179,125,175,219,200,220, 0, 94,148,238,135,109,204,100, 97, 56,186, 5,223,212, 9,116, 65,212,180,159, 94, 43,173,169, 81,229,
+106, 69,213, 92,207,136,165,104,181,235,150, 29,104, 6,140, 81, 71, 23, 67,225,210,173,102,151,188, 80,100, 51,216,105,167,108,
+233,204,222, 45, 12, 17, 7, 71, 64,232,190, 35,209, 51,132, 1,173,111, 53,128,141,251,155, 91,230,106,123,167,224,141,157,111,
+184, 82,207,110, 76,172,203,204,186, 97,160, 84, 58,151, 59,229,189, 67,224,114,242,236,163,163,212,206,169, 69,214, 34,224, 6,
+194, 16,105, 85, 56, 61, 40,105, 76, 60,222, 39,251, 58, 13,194,179, 52,242,234,248, 64,238,142,132,114,206,155,167,233,173, 18,
+ 21, 35,186, 53, 4, 31, 34,215,251,137, 33, 9, 37,219,234,194,190,247,141, 24, 19,142,206,252,240, 25,247,183,159,114, 60, 31,
+185,126,244,132,103,143,159,145,166,167, 84,113,228,146,233,189,162,217,252,216,218, 10, 45, 23,186, 23,114, 85,150,210,169, 78,
+145, 96,148,194, 82, 11,135,253,129,231, 87,239,241,228,201, 99,158, 63,123,196,213,254,146,235,203,201,106, 63,206,155, 22,212,
+ 25,137,207, 5,251,188,138, 42,222, 57,174,246, 87,100, 45,172,165, 80,138,226,130,199,123,161,109,107, 23, 17,103, 50,158,214,
+ 89,107, 51, 29, 43,157,113,183, 99,191,155, 40,181,114,121,216,163,170, 4,159,240,193,243,123,191,251,117, 14, 87,201, 60,205,
+ 91,118, 16,117,148,165,113, 58,175,220,159, 50,222, 7,254,226, 47,191,203, 95,124,247, 7, 72, 48, 26, 98, 41, 21,173,157,113,
+136, 44,203,204,113, 89,104,165, 51,140,137,142,176, 84,155,142,212,214, 56,231, 74, 8,145, 56, 70,196, 43, 67,116, 60,121,242,
+148,247,159, 95,242,199,127,242,103,124,247,175,254,150,103,151,215,124,253, 43, 95,226, 92, 26, 63,252,225,143,104, 40,209,121,
+ 98,180,215, 73,201,246,250,186,216, 95, 16, 93,162,212,108, 30,249, 22,232,213,113, 62,159,185,188,114,148, 90,185, 63,101,198,
+ 52,160, 4,206,167, 25,117, 86, 25, 69, 29,185, 22,238,111, 79,188,255,244,146, 39, 47, 30,115,251, 58,243,176, 8,203,154, 81,
+ 50,161,195,154,205, 85, 95,186, 18,189,216,142,218,123,155,138,137, 61,224, 37,217, 33,119, 12,157,181, 40,189,217, 67, 69,106,
+176,192, 39, 66,105, 32, 94,136,218,200, 36, 59, 76,122, 80,178,185,181,187, 71, 6,197,247,128,119,158, 36,202,210, 34,173, 71,
+114,155,113,170,118, 91,243, 21,237, 21,167, 1,245, 51,131,139,150,192,207,153,209, 59, 30,206, 43,165, 58, 36, 40,212, 76,235,
+157,232, 61, 1,135, 31,133,113, 24,169,163,224,187, 80,115, 65,220, 8, 49,224,146,167, 20,168, 45,178, 31,246,248,216,169,221,
+ 81,117, 70, 90, 64, 82, 68,123,133,102,225, 88,159,182,241,106,140,230,180,112, 10, 98, 55,123, 66, 39,133,184, 73,165, 70,134,
+113, 32,141,163, 73,164,122, 37,198,198,126, 63,208,177,181, 76,237,214, 61,142,111,165, 82,162,212, 44,104, 11,134,190,246, 16,
+123, 66, 54,169,201,154, 11, 97,244,184,234,152, 75, 38,148,198,148, 18,115,237,164, 24, 33, 64,105, 86, 9,246,158,141,249,225,
+182, 77,162,241, 52,146,247,236,198,145,103,239, 61, 49,166,200, 63,112, 63, 61,159, 51, 45,175,236, 7,199,176,219,191,155, 7,
+ 99,135,243,185,162,235,194,110, 10,164,105,122,119, 96,152,220, 88,207, 51,154, 11, 23, 23,145, 48, 76,239,244,161,126,123,106,
+188,121,117, 67, 57,223, 18,104,182,190,236,133, 92, 21,201, 66,153, 43,187,109, 79,164,179, 9,149, 86, 15,209, 57, 19, 18, 97,
+205, 49,215, 18,234, 59, 69, 29,218, 60, 81, 2, 99, 16,102,237,148,135,140, 6,143,109,138, 51, 94, 10, 93, 50,243, 90,152,134,
+136,248,200,233,188,224, 95,190,124,127,123,168,111, 15,196, 46, 6,145, 9, 54,202, 54,135,185,199,109, 85, 53,123, 88,219,126,
+118,107,126, 91, 98, 54,188, 85,160,218, 45, 76,187,218,131,119, 27,201,119, 12,161,234,137,116, 39, 91,176, 9,180, 9, 62,184,
+ 45,121, 33, 91,176,169,253,202,221,222,177,234,203,246, 3, 42, 46,216, 20,165, 41,210, 13, 94, 17,188,153,112, 98, 16, 68, 43,
+ 93, 32,249, 78,107,149,230,133, 40, 80,213, 78,240,253,237,231, 95, 55,108,160, 98,178, 22,204,218,165,106,245, 19, 85,163,127,
+ 57,111,159,119, 83, 27,159, 52,237, 91,200, 12,156, 75,150,216, 23,181, 93,149, 51,124,174,219, 14, 46,212,194,237,221, 3, 75,
+209, 77, 14,180,105,105,135,192, 56, 76, 28,246, 59,202,124,102, 41, 5,241,158,199, 87, 19, 95,125,188, 99,231,149,232, 19,169,
+ 43, 75,174, 44,218,121,168,118,216, 17, 60,165, 38, 78,115,229,197,228,185,158, 34, 25, 56, 46, 71, 90, 31,153,124,231,151,111,
+ 30,232, 56,214,106,159,187, 74,199, 99, 78,242,182,117, 59,134,152, 24, 6, 43,184,158,231, 74,235,138,235, 6,248,216, 79, 7,
+198,184, 99, 46, 51,175, 79,183,144, 11,173, 60,208, 67, 99, 63,140, 60,121,249,146, 39,207,158, 32, 68, 78,235,202,170,157,188,
+ 66,110, 43, 85,132, 92, 76,117, 74,110,148,121,165,228,149,105, 26,153,226,192, 16, 60,193, 91,151, 86, 98,176, 4,190, 19, 6,
+ 63, 48,142, 59,174, 30, 29,136, 99,160,174,217,190,238,173, 81,155,245,149,157,183,145,190,182,134, 79,241, 11,126, 50,210, 17,
+117,184, 24,236,230,222, 44, 27,209,123, 39,120, 71,171,133,105,220,241,248,250,218,126,110, 68, 24,134,145,111,255,211,223,224,
+209,211,189, 65,149,188, 51,166,246, 90,201,165,115, 94, 26, 75,238,172, 37,243,215,223,255, 1,183,183, 15,140,195,128,239,198,
+251,239,173, 51,140, 19,243, 58,219, 8,212,218,106,228,121,165, 20,251, 25,244, 94,108,237,225,133,195,245, 8, 61,226, 10,164,
+ 24,121,246, 98,207, 79,127,254, 17,223,249,222,143,184,121,245, 41,151,207, 30,243,236,215, 94,242,139, 31,255,140,155,219, 91,
+203,161,248,142,106,199,169,165,249, 47, 31, 95, 25,184, 66,160, 71, 8,241,128,195,177,172, 15,252,242,243, 27,174, 47,159,242,
+187,191,241, 62,159,221,220,113,253,248, 49,181, 21,150,117,197, 7, 33,184,132, 83,184, 61, 29, 57, 46,149,175,124,233, 5,170,
+ 3,243,218,113,172,172,121,101,241,142,214,149, 46,193, 80,194, 13,180, 27, 81, 18,159,136,162,120,111,140,131, 1, 71, 22,135,
+186,142, 15,141, 62,237, 41, 85,241,169, 35, 61,225,220, 64,201, 39,123,127,208,134, 6,135, 27, 12, 65, 45,139,189,102,189, 15,
+244, 46,172,210, 80, 86, 90, 93, 40,181,162, 69,112,161, 33, 77, 9,197,130,110,158, 98,126,114, 21,122, 19, 84,236,235, 93,171,
+ 71,251, 10,205, 17, 91,162,246,188,129, 85, 18,125, 35, 87, 6, 28,193,121,186,138, 77, 60, 48,218, 87,109, 71,195,239,106, 35,
+247, 70,201, 71,219, 95,187, 74, 26,119,232,220,232, 82,104,197,110, 94,201, 37,187,181, 27, 63,218,242, 65, 85, 44,195,131, 67,
+240, 72,138,248,232,240, 21,202, 26,113,190, 50,122,207, 82,156,229,130,122, 49, 14,134, 68, 14,193,209,106,164,116, 72,110,160,
+ 73, 32,197, 78, 8,150,150,151, 97,162,149,142,239,153, 62, 0,227,128,107,130, 19,193,139,195, 15,110,123,136, 11,161, 91, 3,
+193,137,241,221,125, 12, 72,143, 95, 60,232, 29,129,113, 10, 60,125,246,248, 31, 92,105,171, 29,230,211, 76, 43,153,253, 20,137,
+227,244,206,110,234,231,115, 70,203,202,197, 20, 9,227,248, 14, 31,234, 86, 93,150,186,114,125, 53,225,226,248, 46, 39,239,220,
+156,149,219,207,223, 80,230, 7,219,123,107,177, 48,111, 48,210,163, 4, 8, 41, 48,175,246,222,215,122,163,212,153,152, 70,138,
+247,228, 94, 89,142, 51,190, 7,115,137,232, 76,237,149, 33, 42,139, 40, 97,221,113, 21, 29,139,158,241,173, 33, 84,100,239,232,
+222, 42,146,210,183, 28, 20, 3,254,197, 7, 31,252,209,214,183, 50, 80,156,179,135, 79,111,150, 44,199, 57,156, 55, 59,153,235,
+134,143,245,222,189,253, 79, 44,244,246,197,195,204,125,193,214,237,155,230,212, 70,161, 30,165, 19,183,219,188, 72, 55, 39,123,
+238, 6,107,149,130, 71,104,106,206,118,188,253,123, 42,118,115,175, 90, 45,108,227, 61,218, 54, 6,123, 12, 70, 67, 11,106,187,
+236,110, 15,111,156,224,164,153,124,161,118, 68,141,220,214,213, 96, 53,189,119,235,180, 6,235, 89, 42,182,175,151, 77, 51,139,
+ 90,198,192,117, 71,114, 80,170, 34,222, 81,242, 91,192,131,213,223,156, 64,138, 30, 84,112,222, 8, 86,234,173,254,227,162, 77,
+ 22,214,101,225,246,238,129,214,133,174,138,136, 85, 77, 2,158, 33, 78,236,125,228,120,190, 99, 45,202, 56, 68,190,254,116,199,
+151, 46, 7,246, 67, 32, 75,227,184, 58,124, 10, 36, 31, 40, 50, 82,155, 80,218, 74,244,194, 56, 94, 49,247, 74,144,149,169,131,
+184,137,235,167,239,241,104, 16,238,111,239,184, 57,101,242,210,182,160,156, 81,228,140, 98,215, 96, 11,252, 53, 58,203, 82, 88,
+138,121,159, 59,194,110, 58, 48, 12, 17, 60,236, 6,207,205,235,215,188,186, 61,114, 58,175,220,221,190,226,248,112,207, 56,120,
+174, 47, 2, 95,255,181, 47,243,248,217,215, 89,107,100,174,153, 22,160,101, 40,231, 51,181, 84,150,211,137,170,194,112, 24, 24,
+ 98,100,151, 18,234,149,166,178, 33, 91, 27,107, 54,248,207,224, 61,205,155, 85, 45,133,136,147,104,129,180,113, 50, 10, 91,112,
+219, 97, 74,201, 37,155,212, 39, 68,122,107,244,190,117,169,163,245,219,107,206,214,216,216,154, 15,181, 22,198,113,228,114,183,
+167,182, 74,213,194,203,151, 47,121,184,185,167,229,194,203,175,188,180,214, 69,169,244,230, 9, 49,146,215, 78,195,243,201,167,
+159,240, 87,127,245, 3,106, 85,124,136,248, 52,144,196,108,102,181, 21,150,101,161, 46,153, 97,244, 52,237, 28, 31, 22,171, 87,
+ 34,104,237, 68,129, 16, 35, 41,140,150,233, 8,142,230, 22,158, 60, 26,120,243,203, 27,126,246,233,107,238,143, 15,204,199, 19,
+223,248,230,111,178,219,237,248,201,143,126, 66,169,149, 90, 10,173, 20, 98, 12, 60,123,239, 61, 16, 40, 57,163,173,224, 69, 24,
+199, 29,222,245,237,176,166, 68, 17,222,220,188,226,227, 79,238, 56, 76,123,198, 93, 98, 45,153,210,140, 76,133,130,138,227,252,
+176, 0,142,203,203,199,212, 86,201,117,102,205,230,222, 22, 17,198,110, 58,213,166, 48, 68, 33,170, 80,109, 71,103, 99,108, 54,
+ 51,151, 4,162,235, 36, 9,246,240, 31, 58, 84, 15,165, 81,157, 82,115, 70, 70, 97,196,219,158,189, 67,146,141, 53,235, 21,209,
+100, 19, 48, 42,125,235,240, 83, 27, 77, 60, 84, 71,205, 21, 39,193,136,147,154,240,221,216,215, 65, 58,190, 70,170,118, 2, 21,
+186,103,156, 18,180, 74,117,134, 1,174, 62,160,219, 1,104,236,142,222, 2, 69,149,166,141, 16, 21, 87,192, 21,235, 45,183,208,
+ 9, 54,170, 99, 61, 87,198, 97, 32,175,149,174,202, 92, 50, 74, 39,137,223, 14,249,254, 11,132,109,140, 38,185,233,218,241,209,
+ 28, 22, 94, 28,174, 27,251,195, 57, 79, 75,144,114, 69, 52, 48,215, 74,214,182, 41,125, 15,224, 58,161, 27,119, 97,191,155, 76,
+105, 93, 21,223,236,253,160, 82,217, 57,136, 62, 80, 39,207, 62, 11, 49, 64,142, 66,152, 18,135,228,172, 29,178, 10,226, 61, 46,
+202,214,229, 87,123,159,117,142, 96, 51, 11, 11, 36,139, 24, 3, 64, 60, 53, 87,104, 54,113,164,111,187,108,172, 34,220,251,134,
+212,238,111, 23,221, 91,210,108, 35,206,204, 75, 97, 57, 47,212, 90, 73,174, 51,238,223, 13,245,109,109,112,188, 63, 67, 93, 56,
+236,226, 59,195,184, 42,112, 94, 26,101,158,241,154,185,186,218, 35, 97,120,119,163,125,224,246,152,185,125,115,131,214,123,186,
+ 26,206,185,209,201,213, 2,210,104,163,183,134, 43,160,121, 3,187,185,104,133,114,231, 88, 78, 71,100,103,245,181,220,206,200,
+126, 59, 64,182, 66,146,145, 92,207,204,235,140,247,158, 41, 88, 51,171,128,113,228,253,140,223,155,140,136, 86,241, 47,222,127,
+241, 71, 97,115,159,235,166, 79,237,106,183,243,190,193,224,157, 23, 68, 77,255,184,101,229, 65, 28,218, 97, 74,230, 58, 23, 18,
+226, 44,236, 38,186,133, 28, 92,223,144,179, 27, 49, 62,216,248,190,171,221,152,157, 56,122,135, 40, 22,198, 19, 44, 52,167,116,
+ 92, 55,253,158,247,125,187, 21, 7,188,247,208,204,147,221,183, 14,124, 24, 18,110, 11,162,233,150, 14,111, 40,104, 65,155, 65,
+216,165,219,109,206, 57,143,115, 66,176, 40, 31, 77,133,224,212,132, 17,221,161,213,210,163,118,125,135,210,219, 86,199, 19, 90,
+109,104,247,155,214,211, 42,120, 18,141, 55, 79,183,135,184, 32, 4,111, 24,203, 33, 4,214,211, 29,175,239, 78, 38,176, 15, 14,
+ 9,193,210,196,173, 17,198,137, 16, 28,167,229,140,139,145,167, 87, 19, 95,123,111,226,242, 48,209, 93, 39,116,101, 23, 29,187,
+ 67, 98,169,129,211, 50, 48, 87,101,188,220,145,198, 17, 39,145,211,156,121, 51, 7,110, 86,120,113, 61,242,100, 55,208,152,153,
+166,198,235,207,142,124,248,250,196, 82, 13, 2,212,138, 81,239,236,197,218,127,133,239,221, 40, 75, 69, 45,104,182, 31,119,164,
+ 16,236,160,230, 26,199,243,194, 90, 50,243,178,240,230,254,142,155,155, 91,142,247,247, 60,220,223,112,188,191, 35,180,149, 58,
+223, 82, 40,236,166, 39,120, 9, 44,203, 3,218,149,247,190,252, 77,222,251,224, 37, 99, 26,113,190, 17, 90, 71, 67,183, 85,141,
+ 56, 90,171, 4,231, 25, 70,161, 59,251,129, 14,155,192,167,139,103, 74, 35,187,157,245,182,163, 31, 54, 38,129,146,123, 51, 67,
+ 86,124,251,245,124, 43,102,137,244,110,142,116,121,155, 5, 17,251,137, 13, 33,114,185,223,179,228,149,166,149,195,254,146,143,
+ 63,121, 69,239,141,223,255,131,111,209,230,149,243,205,194,188, 84, 78, 15,213,170,156,218,249,211,127,255, 23,124,244,201,107,
+ 58,106, 97,185, 52,208, 4,164, 43,190, 71,170, 22,138,102,123,224,158, 10,203,230, 26,160,119,188,235, 76, 23, 35,187, 97,199,
+ 52,140, 92, 14,158,185, 86, 84, 51, 65, 51, 63,252,233,231, 60, 28,207,212, 92,185, 63,206, 28,239,110,217,143, 59,110,238,238,
+152,151, 51,218, 10,211,110,207,211,231, 47,169,170,212, 82, 80, 45, 84, 85, 66, 24,137,221,234, 93,221, 15,248, 56,242,236, 98,
+228,195, 79, 63,230,225,126, 70, 36,129, 28,152, 18, 76, 49, 49, 47,213,252, 7,218, 64, 42,111,222,220,113,184,120, 66, 26, 15,
+ 20,102,122, 43,148,181, 16, 91,160,106, 67, 3,168,107, 12,227,128, 96,192,169, 24,247,166,244,148,104, 29,105,153,241,174,210,
+ 37, 50,168,176, 31, 70, 90,178, 16,107,236,158,224, 26, 69, 2,173,141, 52,183, 80,230,153,214,173,141,226,123,163, 84,136, 18,
+161,101,147,152,196, 64, 16,217,236, 17, 30,113, 5, 29,161,171,201,115,124,237,104,134,142,103, 8, 22,172,164,182,141, 18,105,
+ 19,173, 56, 93,210,114, 33,137, 29,188,155, 4, 66, 50,100,107,169, 30,167,209,194,183,195,129, 32, 13,130, 82,235, 30,167,202,
+ 26, 10,173, 27, 93,115, 89, 42, 45, 23, 52,120, 46, 98,164,186,200,130,237,239,229,109,198,168,153,116, 6,103, 19, 76,196,153,
+200,169, 54, 52,218,219,189,107, 66,117,176,139, 35,133, 66, 33,226,170,210,100,161,230,198,213,148, 76, 12,211, 10, 97, 3,185,
+236,210, 5,222, 43,165, 43, 67,220, 65,232,196, 48,114, 8,158, 69, 61,211, 24,152, 6,163,227,117, 31,232, 78,137, 2, 18,220,
+246,231,136,244, 45, 55,231, 5, 31, 6,187,221, 15,123,106,216,177, 86,251,111,179, 66,110,157,117,173,172,165, 81, 74, 35,151,
+ 74,206,149,146, 59,185, 52,214,165, 50,207,149,117,169,156,207,133,187,251, 51,167,251,123,250, 22,148, 43, 85, 41, 75, 37,231,
+102,254,239,181, 24,180,168, 54,106,110,214,236,105,221, 14,215,185,125,145, 57,105, 27, 45,178,213,134,230, 74, 94, 11,199,135,
+ 19,101, 93,208, 13, 23,158,182, 75, 96,111, 38,208,234, 88,171,165,171,253, 89,182,131, 70,239,191,250,235,191,255,135, 29,212,
+150, 92, 57, 29, 79,214, 76,105,133,195, 20,240,111, 77,117,102,191,249, 7, 29, 74,114,131,215,175,111, 57,222,223,145,151,147,
+125, 78,106, 89, 31,231,160,173,221, 64, 90, 85,104,210, 56,191,205, 13, 4, 79,201,149,222, 42, 90, 21,239, 70,170, 38,195,175,
+ 51, 32, 57,176,174, 5,233,157, 33, 56, 36, 24, 23, 37,119, 33,106, 71,188, 35, 55,103,255,143,188, 16,124, 99,157, 27,161, 55,
+187, 17,243, 22, 60,179, 1, 87,154,110, 34, 19,121, 75,141, 2,227,181,109, 56,187, 77,185,215,240,224, 11, 77, 42,174,111,246,
+178, 38,244,216, 45,135,220,141,179, 46,189,227,154,195, 11, 6,180, 81,103, 23,125,103, 31,103,221, 40,107,210,237,225, 40, 68,
+132,134,239, 54, 2, 4, 91, 13,184, 0,154,187,129,102, 8,232,106, 90, 86, 17,143,120,161,170, 41, 17, 29,208,131, 67,234, 54,
+150,112, 91,154, 89, 59, 42,141,214,132,174,157,204, 86,215,209,134,106, 71,122, 33,185, 64,241,160, 42,184, 32,155,151,206,210,
+227, 97,171,102, 57,111, 15,139, 97, 26,137,192,186, 90,213,164,109,216, 92,241, 74, 85, 91, 80,184,183, 58, 48,204, 75,239,156,
+ 33,115,135, 56, 48,165, 61,185,173, 92,239, 35,251,224, 80,231, 40, 93, 76, 3,235,109,201,241,250,182,114,219,140, 27,238,186,
+177,236,101, 45,244,146,185,201,137,221,229,142, 39,143, 61,174, 61,160,235, 3,196, 61, 50, 30, 88,234, 61, 4,103, 35,207,205,
+220, 36,222,214, 38,155,107,199,100, 55, 78, 17,109,132, 96,163, 67,233,194,213,176,163,201, 76, 16,251,123,179,249, 69,214,210,
+248,201, 71,159,240,241,171, 87, 76,233,231, 92, 31,118,136, 79, 76,195, 5,227,240, 64,154, 44, 28, 23,210,200, 55,127,237, 37,
+207, 30, 77,220,206,153,211,205,153,243,124,195,121,205,232,122, 98,237,149,221,152,112, 62, 81,233,196,161,147,207,158,230, 87,
+ 66,104,140,106,252,126,213, 70, 28, 18,184, 70,242, 19,211,180,103,119, 49,114, 62,205,120, 60,174,195,177, 88,120,142,109, 87,
+235,186,133, 34,107,111,184,230,236,229,218,237,144, 86,181, 18, 67,224,213,171, 87, 92, 93, 30,248,237,223,250, 58,134,242, 19,
+210, 52, 81,117, 97, 45, 43, 21,207,135,159,190,226,199, 63,255, 20, 16, 66, 8,180, 86,208,156,185,120,244,152,135,251, 55,184,
+ 0,211, 16, 89,150,192,233,184,152,107, 29,217, 2, 57,176, 63, 92,176,191, 58, 16,107, 35, 37,199,179,103, 23,124,242,201, 13,
+ 55, 55,133,255,235,248, 33,247,119,247,140, 46,113,138, 35, 77, 43, 63,253,217,207,249,249,135,191, 48, 5,172, 8, 93, 2, 49,
+238,140,226, 88, 43,209, 98, 62,236,210, 30,130, 35,247,237, 0,209,148,167,135, 3,206,159,185,123, 88,105, 85,121,243,230, 51,
+246, 23,153, 71, 23,215,188,252, 96,162,247,143,216, 93, 93,224, 67,228,147, 79,126,193,253,253, 3,127,243,195,239,243,205,177,
+ 49, 13, 1,173,130,239,145,197,109,189,230,236, 8,187,129, 62, 68, 16, 97, 18,229,246,248, 25, 15,175,238,184,125,243,134, 94,
+ 21, 82,103, 8, 9, 23, 34,222, 11,147,223,161,190, 49,237,247, 92,236,174,236,125,195, 77, 56,201, 84,148, 93,138,148,166,136,
+194,218, 60,227,224, 57,157,239,136,209,179, 31, 6, 74,111,204, 93,160,101, 6,137, 52,115,152,208,213,227,166, 45, 60,231, 28,
+221, 53, 78,189, 18, 7,193, 37,232,231, 66, 95, 5, 65,201,199, 59,196,253,106,170,179,219, 77,104,168,212,102,227,105,165, 24,
+ 88,106, 57,209,147,178,172,157,216, 78,228,212,237,115,147,198,169, 58,210,212,232, 53,146, 79, 39,110, 93,161,158, 23, 38, 31,
+153, 89, 25, 39, 79,149,142, 52, 71,196,147, 70,160, 10,221,217, 84, 17, 39, 56, 26,129,204,210, 58, 67, 24,209, 4, 7,217,145,
+ 38,143,186, 76, 57,206,244, 12,115, 72,248,226,113,204,246,245, 26,119, 48, 36,195,112,207,133, 97, 16,124, 31,205,189, 33,202,
+ 0, 84,133,214, 5, 63, 8,154,133, 33, 37, 43,251,117,165, 56,143,228,102,175,235, 96,115,210, 42, 6,251,122,239,217,129,231,
+239,191,247,133,207,227,109, 14,173,243,119,158,107,253,139, 77,232,175,170, 96,250,171, 27, 41, 69, 89,111, 4,214, 51,210,149,
+113,218, 49, 28, 46, 55, 81, 81,183, 6,149,179, 92,150,217, 16,101,251, 56,125,187,136,217, 69,174,183,110, 62,118,187,227,176,
+228, 74, 91, 86, 27,135,122, 56, 54,200,167,106,135,164,238, 54,163,162,223, 24, 95,221,250,255,219, 95, 55, 53,138, 39, 98,149,
+ 56,227,170, 24,243,164, 53,101,201,171,245,198, 59, 52,113,124,242,249,145,233,190,154, 86,252,237, 42,195, 27,251, 68,183,233,
+158,119,150,187, 98,203, 80,249, 45,139,165,218, 41,205,124,232,104, 35,107,227,213,221,204,253,241,132,182, 25, 81,160, 55, 84,
+ 42,189, 41, 33, 58, 84, 26, 11,129, 97, 16,186,119,196,188, 82,202,192, 40,141,238,102,230,146,172, 26, 92, 42,199,110, 16,170,
+158,103,156,159,240,211, 64,161,224, 51, 16, 7,234, 82,104,174,163,218,208,230,241,154, 9,107, 99, 29, 6,198, 62, 32,126, 33,
+116,177,107,142,138,255,194, 42,246, 86,153,170,221,148,149, 90,237,196,231,182, 55,120,188,163, 85,219,115, 54, 54,254,184,218,
+ 93, 21,113,168,239, 72,105,168,183, 7,180,219,192, 41,218,183, 7,231,150, 70,172,116,162,183, 94,184,217,225,196,240,164, 36,
+ 36, 70,122,181,230,120,240, 22, 2,234, 45, 51,196,173, 30,183,249,223,105,197,194,117,108, 0, 18,167,180, 77, 80,241, 86,175,
+138,120, 20,161,213, 76,197,225, 93,196, 7,165,245,186,161,101,197, 96, 53,210,113,173, 81,218,230,121,119,134,250, 43,219, 55,
+ 53,120,135,184, 95,237,242, 25, 38,198, 20, 24,157,141,146,233,113, 59,248, 41, 61,119, 59,228, 96, 0, 30, 4,252,246, 3,136,
+ 19, 92, 83,150,101, 54,104, 77, 80,164, 55, 11,241,181,198, 16, 35, 97, 84, 6,133,207,239, 28,183,179, 71, 98,193, 57,165,157,
+149,153,153, 1,143,119, 3,158,198,215,158,119,174,189,163,172, 43,189, 8,167,227,194, 47,239, 31,108,199,220,170, 29, 42, 54,
+192,140,106,163,139,160, 77, 72, 84,234,246,226, 14,222,210,166, 65, 60, 41, 4, 36,101, 78,111,206,212,214, 13,240,210,130,237,
+163,157,179,175,123, 85, 78,101,230,254, 60, 19, 83, 96,138, 39,118,201,147,246, 59,118, 23,123,244,254,150,255,244,167,159,112,
+253,252,154, 47, 63,127, 15, 15, 92, 94, 93,114, 17, 6,116, 81, 30,238,239,168,229,158,211,249, 68,117,137, 93,117,248,184, 64,
+247, 68,239,169, 88, 23, 94,176,218,228,228, 61,254, 48, 34,193, 19,218,196,253,120,102, 62, 46,204,243,108,136,225,110, 6,164,
+161,155,109,168,245,186,229, 59,108, 21,116,158,143, 28,239, 7, 98, 50,222,247, 93,190,165,139,242,217,231, 15,228,251, 2, 93,
+ 25,167,137,117, 49,249,202,156,149,207, 62,255,156,211,241, 68, 12, 1,196,211,189, 41,130, 99,116, 60,122,252,132, 55,175, 63,
+ 35, 97, 1,191,181, 47,168,138, 29, 66, 55, 23, 66,171,106,116,179, 32,236, 47, 15,132, 16,153,215,198, 92, 87,206,186, 9, 95,
+100,224,242,234,192,249, 60,155,130, 56, 67,239,133, 46,202,126, 55,241,252,241,123,164, 33, 25,130,185, 20,166, 52,209,134,136,
+ 22, 51, 35,218,109,169,163,181,241,144, 23, 11, 45,186, 70,165,178,156,239,248,188, 20,214, 58,240,252,241, 37,143,158, 62,231,
+250,197,151,249,224, 75, 95,230,238,230,150,243,178,192, 26,200, 26,104,117,221, 94,171,129,238, 27,108,161,197,251,155, 87,220,
+188,185,225,238,205,231,220,191, 89,112, 24,178,210,251,128, 22,199, 49,219,155,123,183, 19,162, 29,180,156,145,203,166,221,142,
+221,229, 21, 87,195,142,184,187, 36,140, 9,233,145,182, 86, 42,157,226,102,123,159,145,145, 89, 43,210, 96, 8,142,202,128,214,
+204,220, 22,246,225,138,224, 2, 69, 51,222,153,175, 58,196, 14,197,209, 78,157,234,155,121, 32,124,164,105,193,227, 40,120, 74,
+235, 8,129,164,133,178,120, 26, 1, 13,214,210,105,116,106, 95, 24,206,209,220, 7,237, 12,253, 2,159, 60,161, 22,155,252,172,
+ 3,167,114, 66,189, 80,239,148, 93,112,172,209,161, 56, 90, 89, 25,187, 34,253,130,165,173, 60,114, 97,243, 82,168, 17, 52, 37,
+ 24, 14,219, 7, 36, 54,114,109,132,185, 19,211,128, 72,101,125,232,244,146, 24, 31, 79,204,210,104,109,133, 41,210,151, 96, 32,
+ 48,215, 24,123, 35, 76, 9,191,181,122,170,131,186, 8, 14,163,224,229, 10,163,128,239, 25,237,201,144,217,165,161,209,152, 16,
+130, 80,123,181,181,168, 70,210, 46,113,185, 31,121,235,227,250,127, 93, 76,229,239,249, 73,255,222, 63,255,187, 96,183, 49, 56,
+ 90,217,177,246,138, 47,202,227,171,137, 48,254,127,117,223,255,255,234,115,191,234,138,207,125,228,238, 77, 36, 31,239, 8, 20,
+158, 60,186, 38,238,118,166, 98,125,219,154,147,255,199,130,221, 16,199, 0, 0, 32, 0, 73, 68, 65, 84,229,250,173,237,180,255,
+ 10, 37, 99,195, 71,187,213,235,219, 84,250, 67,129,249, 72, 94, 86, 98,207, 76,215, 87,184,241,226, 11, 90,185, 29, 62,183,170,
+222,219, 21,171,179,183, 76,221,166, 2, 69,220, 23, 7,136,210,109,141, 89,187, 50,247,198, 10,136, 47,232,186,128,111,244, 2,
+218, 60,206, 69,218, 92,104,222, 96,100, 77, 45, 88, 58,200,192,122,232, 44,181, 35,179,114, 49,108, 12,135,251, 0,249,100,230,
+190, 30, 81,183, 18,188,167, 28, 3,181, 47,228,101,177, 3,114, 3,173,142,212, 34,218, 4, 21,143, 44, 51,115, 56, 19, 28, 4,
+193,217, 73, 76, 12,105,166,111, 37,224,221,146,233, 93,109, 55,142,218,136,201,119,168,197, 82,213,150, 44,223, 8, 70, 2,221,
+ 25, 49, 42, 57, 71,109,230,131,117,222,250,207,130, 71,163,218,199,236,197,146,232,218,232,205,255,138, 73,142, 65,106,192,210,
+203, 1, 16, 23, 44, 93, 42,130, 71, 54,189,163,245, 72, 69, 54,141,156, 15,244,178,162,106,110,120,173,186, 49,144, 13, 78,209,
+181,210,141, 61, 75,167,109,129,153,142,104,183,241, 58,250,197,106,193,137,167,168, 2, 30,109, 70,128,139,209,111,232, 89,181,
+ 83, 35, 14, 23,188,237,161,181,115,234,219, 9,175, 23, 66,115,102,231, 17, 33,120,219,151,212,237,160,164, 98,134,185,174,142,
+218, 11,119,167,147,177,243, 9, 84, 21,178, 87, 38, 47,236,101, 71,209, 19,183, 15, 11,199,179, 18,211,158,163,170, 61, 28,130,
+ 80,154,176,148,134,248,192, 62, 69,158,239,173,210,151,174, 34,210, 3, 31,253,248,115, 62,191, 93,241,193, 19,182, 19,116,119,
+ 91, 69,164, 89,136, 77, 20,106, 83, 74, 95,137,222, 35,120,106, 41,156,150,153,112,112,220,191, 57,241,234,238,196,218,236, 84,
+108,111,248,155,239,216, 57, 84,108,106,225,182,213,201,121,153, 89, 43,164,101,230,254,254,214,118,208, 93,249,244,238, 53, 63,
+253,217, 71, 92, 92,238,121,254,232, 25,239,191,255,140,105,186, 6,174,208,246,152,184,187,101,110, 25,157, 31,200, 39,195,144,
+246, 20,240, 58,144,130,163,105, 33,118,199,211, 23, 79,200,203, 61,159,125,126,131, 56,199,154, 27, 62,136,185,164, 53,211,180,
+ 90,218,216,217, 3,206, 91,231,193, 62,239,104,196,192,135,227,249,255,102,237,205,154, 44,203,206,243,188,103,125,107,216,251,
+ 76, 57, 84,117, 85,117, 85, 53,186,129, 38, 1, 16, 36, 77,130, 16, 41, 50, 72,219,180, 40,138, 54, 25,158, 34,228, 27, 95,248,
+191,224,215, 56,194,150, 29,161, 27, 57, 36,134, 45, 75,214, 64, 17, 33, 26, 48, 5,146, 24,137,110,116,163,187,170, 43, 43,231,
+115,246,176,134,207, 23,223,206, 2, 45,249, 14,153, 17, 29,209,209, 85,157,145,231,228, 62,107,125,195,251, 62, 47,219,221,218,
+206, 42, 17,174,174,175,249, 39,255,231, 55,120,250,246, 35,126,254,253,167,188,120,241, 25,125,183,179,233,138,115, 92,158, 95,
+ 45,249,192,230,191,104,197,138,180,155,155, 11,222,123,247, 61,166,225,192,126,127, 75,234, 60, 91, 61,194, 77,153,121, 30,104,
+165, 18, 82, 34,108, 58,130, 51, 43,166,171, 35, 63,254,244, 18,117,149,105, 26, 25, 39, 19, 98,110,215, 43,230,154, 23, 12,174,
+163,101,227,140,179, 18, 30, 62,120,128,239,226, 66,106, 44,203,228,199, 14, 48,135,241, 23,204,199, 42,168,159,216,207,141,174,
+ 11,140,211,140,139,214,217, 28,166,145,171, 23,123,166,147,198, 87,126,254,125,222,126,118,204, 39, 82,217, 56,161, 58, 79,214,
+ 70, 38, 83, 35,196, 92, 65, 42, 62, 57,174, 62,122,193,217,213,107, 62,123,245, 2,109,158,221,122,197,106,213, 83, 71,193,249,
+ 6, 17,162,247,244, 18, 22,212, 67, 33,227,150,233, 82,160, 85,101,191,223, 51,149, 70, 75, 35,237,250,130,157,143,164,221,134,
+245,230,136, 62,110, 40, 45,163,209, 17,165, 80,230, 9, 69,232, 92, 32, 5,251, 92, 30,185, 53,193, 5,138, 43,232,104,156,120,
+212,242, 32,154,107, 52, 7, 33,219,214, 88,164,153, 31,191, 87,186,220, 56, 52,219,245, 23,223,232,124, 96,202,215, 68, 4,157,
+ 3, 53, 5,132,129, 67, 72,203,202,172, 71,187, 70,222, 79,198,155,143,139,155,101,110, 72,241,148,170, 28,250, 70,152,102, 36,
+ 40, 83,113,200, 92, 40, 20, 86, 93,225,118, 86, 36,152,213, 54,184,192, 92, 6, 90,118,248,104, 90,151, 16, 43, 96,249, 24, 57,
+ 52,106,167,156,132, 30,245,129, 54, 21, 92,234,232, 18,204, 93,101,106, 70, 85, 27, 67,193,213,142, 20,237,243,238, 10, 4, 17,
+102,148, 94, 34,218, 76,212,232, 67,196,231, 10, 94,153,180,209,227, 80, 45,168, 4,155, 90,121,161, 15, 61,157,243,196,238,126,
+246,200,178, 0, 98, 66, 20, 66,184, 31,152, 77, 92,214,188, 56,232, 66,160,239,211,127, 88,112,240,255, 95,120,132,255,160, 76,
+248,255,254, 5,119,212,113, 93,102,230, 97,100,219, 39, 30, 61, 60,250,153,196,130,237,223,179,247,125,186, 63,225,236,195,159,
+ 48, 12, 35, 34,129,154, 42,126,176,198,130,232, 8, 69, 25,153, 41, 37, 16,139,114,200, 51,190,121, 91, 65,181, 0, 65, 40,101,
+164,184, 74,231,205,213,176,221,108, 57,180, 91, 19,138,135,145,113,190,198,215, 68,198,194,174, 4,101,110, 55, 56, 31,136, 25,
+115,104,185,200,205,124, 48,125,200, 93,132, 40,173, 44, 76,220,165,125,211,106, 42, 83, 5,223, 4,117,139, 69,189, 89,153,164,
+174,162,106, 96, 19,219,143,219,206,188,224,112, 18,151, 12,107,251, 94,246,237,236,226,118,106, 15,134, 79,193,178,153,151,145,
+123,173, 10, 18,150,160, 24,251,229,212,230, 44, 32, 37, 58,230,185,224,151,177,187, 43, 38,254, 42, 90,160, 21,226, 82,161,149,
+101,150,212,212,126,190,230,226, 79,105,121,206,232, 86,121,206,248, 96, 41,108,138, 46,246, 15,219,173,207, 4,130, 52,243, 28,
+ 87,219, 13,178,128, 72, 68,173,243,194,139, 13,228,115,225,144, 5,223,123, 60,130, 79, 44,126,232, 72,211,138,143,222, 84,239,
+173, 25, 36, 99,161,247,121, 49, 60,174, 11,110,177,227,129, 86, 33,170,103,133, 35,183,137,161, 84, 10,158,247, 78, 59,186,126,
+ 98,188,236,145,228, 41, 25, 84,122, 66,172, 56, 34, 39, 15,223,161, 11, 7,188,155, 72, 15,222,225,102,186,224,135, 63,249, 17,
+ 77, 34, 65,140, 20,232,146,188,129, 35, 84, 97, 89, 73,180, 55, 54,196,101,120,128,182,194, 48,217, 46,119,127, 24, 23,181,253,
+130,217, 21,131,213, 56, 39,139, 13,208, 70, 97, 93, 76, 60,122,120, 76,153, 51,115,179,196,183, 97, 60,216, 55, 12,158, 92,148,
+ 50, 93,115,179,191,225,245,217, 5,103,231,231,156,158,158,178, 91,111,216,118, 59, 54,235,200,195,221, 41,181, 60,167,180,202,
+217,103, 31, 50, 30,174,233, 52,163,120, 78, 30,191,205,131,117,199,103,103,159,113,118,113,110,194,198,154,161,101, 10,106,220,
+228, 90, 41,154, 81,103,161, 60,120, 49, 54,160, 26,210,216,123, 71,159, 58,131, 60,204, 19,219,205,154, 86,149, 24, 61,231,231,
+ 23,252,239,255,252,223,242,201,203, 47,240,189, 31,125,200,111,124,237,171,172,251, 13,235,237,154,253, 97, 52, 38,248, 82,240,
+169,154,125,238,230,122,224,242,213, 25,235,184,225,170,236,161, 41, 49, 68, 30,110,122,114, 61,129,234,136, 65,217,108, 2,211,
+ 84, 8, 81,216, 95, 28,184, 29,103,240,149, 92, 42, 67,153,241, 34, 84, 41,228,105, 38,121,143,119,158,214, 85,242,156, 57, 90,
+109, 8,253,198, 66,129,242,196, 60,143,196,184,177, 46,164,192,202, 69,230,154,153, 75,225,201,131, 21,204, 87, 36, 53,177, 27,
+201,132,163,181,154,163, 35,106,228,236,252,134,127,243,231,223,230,111, 51, 64, 92, 49,133, 64,157, 70,130,139, 68, 85, 34,202,
+205,112,201,235,159, 92,115,126,113,198,205,229, 45, 33, 57,158,191,243,148,231, 15,118,236, 15, 35,127,245,195,143,152,231,194,
+ 58, 70, 19,127,202,140, 75,230, 96, 80, 1, 81,127, 55,175,180,120, 83,146,129,155,221,140,148,192,156,122,118,169,226,252,129,
+ 16,143,104,115,197,141,153,218, 57,219, 29,139,105,214,197, 65,145, 13, 42,141,155,122, 32,138, 67, 87, 29, 76, 51, 85, 33, 22,
+161,118, 21,223,245,228, 67, 1,103,105,139, 73, 76, 85,236, 3,196, 22,240, 46,147,115, 71,107, 7,200, 70,148,172,171,130, 56,
+ 71,209, 64, 20,193,249,217,166, 35,251,138,143, 21, 79,199, 88,103,130, 58,154,139,180, 0,157,171, 28,246,142,173, 7,119, 59,
+ 49, 15, 21,191, 18, 52, 53, 46,175, 26,113,187, 99, 69,197,163, 76,170, 72,245,198, 67,111, 86, 86,170, 86, 90,107, 76,243,140,
+ 87,232,202,154,170,141, 54, 85, 54,235, 64, 11, 30, 38,129, 58,188,113,207,172, 90,160, 74,160,204, 66, 74,158,170,149,208,217,
+ 20,176, 58,179, 72,245,201,113,152,148, 46, 6,130, 40, 41,220, 77, 69,141,165,169,106, 90, 18,231, 13, 84, 34,247, 64, 81,171,
+ 10,181,154,117, 72,184, 95, 47,185,173, 81,177,152, 82,119,127,224, 25, 1,107, 34, 93,163,239,195,207,156,251, 46,255,222,191,
+ 71, 49, 77,150,171, 74,203,230,244,242,193,246,234,174, 52, 14, 8,218,122,164,101,116,231,200,147,112, 68,133,131,185, 74,134,
+131, 3, 53,220,182,246, 14,201,194, 65, 70, 74, 80,194,124, 96,110, 21,113, 29,147,102,194,202, 83, 10, 16, 19,181, 20,186,226,
+152, 37, 81,105,212,121, 38, 52,197, 63,121,250,236,235,134,129,181, 23,141,218,158, 27, 49,111,167, 46, 11,125, 19,191, 89,238,
+177,152,100,213,120,237,234,108, 7,224,204,246,209, 22, 44,172,247, 44, 10,243, 5, 54,211, 22,207,164,218,229,208,114,133,216,
+ 17,187, 68, 39, 38,148, 42,214, 35,225, 93, 64,226,178,211, 8,198,153, 23, 53,129, 90,245, 38,120,187,139,183, 19, 51,156,155,
+152,173, 86, 19, 85, 56,161, 45,169, 84, 90,203,162,180,182,101, 81, 91,254,252, 77,122,156,152,194,255, 78, 88, 69,116, 11,245,
+174, 81, 21,132,133, 90, 23,148, 20,197, 46, 53,111, 23,127, 8,182, 71,139, 78,237, 2, 23,111,147, 11, 3,188, 83,203,204,229,
+249, 45,213,121,188,218, 14, 9, 21, 36,129, 36, 59,196,125,112,104,182, 11,112,157, 2,226, 12, 86, 67,136,244,189,167, 11,102,
+219, 26,230,200, 44,142,160,145,121, 46,196, 20,121,248,248,125,222,254,220, 59,120,148,237, 73,207,241,211,175,242,209,199, 31,
+243,205,239,125, 68,232,210, 27, 31,191,199,118, 48,186, 40,247,171,253, 32,139,130,249,167, 97, 61, 13,168,115, 97,206, 11, 20,
+ 8, 71,244,198, 46, 16, 2, 46, 6,179,203, 88,118, 33,136, 99,187, 59,161, 95, 84,170,187,205,154,174, 91,227, 83, 32,136,249,
+143,157, 55, 75,135,182,198,172,202,245,254,134,215,231,103, 28,198,137, 92, 14, 12,251, 11,110, 95,157, 67,203, 60,126,231, 25,
+ 63,255,222, 47, 16,125,207, 80, 6, 90,232,120,251,201,142,235,139,215,156,157, 93, 19, 3,104, 12,118,224, 54,135,119,145, 62,
+ 70, 86,125,207,106,179, 33, 69,123, 30,113, 66,171,213, 14,136, 16, 16,239,151,189,120,194,169, 5, 93, 4,111,185, 2, 49, 69,
+174,175,247,124,250,233, 25,169,235,120,241,241, 39,224, 3,199,167, 59,190,249,239,254,130,215,175,111,232, 99, 7, 40, 57,207,
+ 22, 1, 28, 60,227, 97,111,120,225,102,108,250, 82, 70,198,105, 64,156, 35, 37,161, 79, 66, 44,133, 66,102,204,153, 97, 56, 44,
+137,113, 6, 88,194, 53, 74, 51, 10, 98,205,149, 4,148, 60, 35, 49,210,247,107,182,155, 99,186,152, 8, 52, 90,206,198,149, 15,
+ 1, 23, 28,182, 48,114,111,220, 33,184, 74,109,133, 24,123, 94, 95, 94, 34,101, 73, 57, 92, 58, 53,151, 4,231,133,235,235, 27,
+254,234,251, 63,230,236,245,107,222,126,248,152,228, 35, 55, 87, 7, 94,190,248,144,179, 79, 63,229, 71, 31,125,196,171, 87,151,
+148,170, 60,127,246,144, 95,251,197, 47,240,206,233,150, 15, 63,254,136,239,126,248, 25,195, 52,129, 42,115, 45,148,229,179, 53,
+ 87,203,114,112,213, 86, 56,170, 86, 44,182, 69, 9,190,222,118,156,156,246, 28,175,183, 28,109,183,116,210,216,238, 34,105, 19,
+216,108,143,112,197, 44, 94, 77,148,184, 22,166,105,178,238, 69, 10, 7,189, 69, 52, 64,169, 40, 19,155,184, 50, 72, 77, 84,226,
+162,151, 9,205, 82, 21,205,250,104, 69,193, 52,102,168, 74, 31, 86,203,179, 82, 45, 23, 34,172, 41, 89, 9,190,225, 90,132,105,
+ 68,106,135,215,229,220, 35,217, 14, 58, 87, 74, 49, 71,136, 56,208,210,232,212,172,172,153, 37,158, 57,120,156,143,244, 83, 96,
+ 28, 6,252,156,113,234,201,234, 65, 61,135,225,134, 50, 41,115, 30, 9,206, 81,171,195,175, 61,125,244, 4,241,212,162, 72, 84,
+ 66, 23, 40,211,132,168,199,135, 8, 94,233, 87,158,169, 25, 51,190, 79,102, 89,106, 94,168, 83,102,181, 56, 51, 28,149,110,201,
+192, 64,192,123, 75,173,116, 75,225,237,162,121,234, 85, 33, 6,207,233,241,150,211,135, 39, 63,243,133, 86, 20,166, 49, 83,115,
+ 33, 5,207,122,183,190,151,139,189, 52, 24, 15,179,229,168,119,129,126,125,127, 62,242, 49, 55,166,105,198,105,230,120,157, 8,
+253,134,251,252,186, 30, 42, 87,231,151,204,183, 87,248,101, 44,175,203, 93, 83, 81, 36,195,236, 50, 49,121,114,110,232,228, 77,
+ 52, 57, 21, 6,157,200,110,177,104,206, 16,252,204,212,178,173, 10, 74,197,205, 29,211,224,208,144, 80,205,144,157,117,255,206,
+195,152,153,242, 8, 93,196,187, 70,169, 19,154, 33,168, 54, 83,125,227,208,104,173,120,171, 38,234,174,170,168,136,141,169, 69,
+113, 69, 80, 87,237, 96,147, 69,204, 35, 14,135,183,249,137, 54,180,154,101,162,170,169, 68,109,199,104, 29, 33,109, 89,189, 47,
+241,171, 2,120,111, 98,138,208, 28, 5, 79,147,134,212, 74,157,179, 77, 16, 90,176,206, 27,155,253,182,106, 44, 93, 43,231, 27,
+234,236, 33,110,234,208,224,209, 2, 57,103,162, 65,171,241, 22, 19, 67,115,166,121,199,123,124, 83,114, 46,148, 98,197, 75,236,
+ 13,118,227, 8,184, 90, 76,225, 94,173, 43,247,190,161,206,252,206,230,155,175,184, 86,112, 98,216, 69,175,254, 77,206, 59,139,
+ 93,174, 58, 37, 38,143,159,172, 16,170, 57,219,165, 24, 60,193, 57,162, 23, 60, 17,175,222, 62, 37,222,132, 67,159, 92, 54, 98,
+172, 60, 8, 43,188,143,108,146, 99, 63, 85,210,241,154,247,156,227,187,231,133, 38,176,233, 19,109,181,227,241,207,255, 60,239,
+ 28,111, 56,123, 53,113, 49,123, 30, 14,183,124,240,193, 79,168,206,128, 47, 78,141, 40, 37,117,113, 53,136, 85,242,193, 65,209,
+133, 8,197,157, 48,209,217,229,191, 40,121, 21, 3,240, 84, 21, 66, 88,138,178,106,133, 21, 94, 17, 20, 31, 87,236,142, 54,180,
+172, 92,223,222,112,125,221, 88,175,214,144, 34,169,131, 77,232, 40,165,114, 27, 70,234, 60,147,107, 33,231,202, 88, 27, 31,125,
+250, 41,159,189,126,197,170, 79,116,169, 99, 55, 92,240,147,243, 23, 60, 57,121,196,147, 71,143,120,231,243, 95, 96,127,113,197,
+139, 31,159,115,123,115,107,176, 34, 49,123,149, 75, 17, 23, 87, 38, 27,139,182,235,247,115, 97,213, 39,166, 92,232,198,137, 62,
+ 6,246,243,108, 30,242, 16,160, 53,154, 52,162,116,148, 90, 12, 36,211, 96,206, 25, 37,224,246, 3,221,122,197,237,205,192,163,
+167, 87, 92, 95,158,113,184, 57, 88, 36, 98,201, 84,205, 76,227, 68, 76,145, 72, 96,110,149,169, 77,156,156,236,184,188,184, 96,
+110,209,198,243, 58, 67,201,204,213,179,207, 38,214,171,213,224, 70, 77, 21,241,166, 6,102,161,158, 93,151,107, 19,154, 73,199,
+237, 60,178,242,240,248,248, 49,105,221, 91,197, 47,149, 58, 89, 49, 88, 42,184, 78,240,106,168, 98,213, 72, 76,142,243,215,103,
+156,110,215,236,203, 76,110, 74, 8,139,238,164, 54,180, 68, 68, 45,153,106, 82,101,152, 43,231, 87,151,124,240,193,247, 56, 28,
+ 42, 23, 87,151, 52,103, 98,210,105,110,236,182, 27,190,244, 11,207,136,204,124,244,193,199, 92, 92,238,121,121, 61, 88, 90, 25,
+222,206, 9,249,105,220,170,230,193, 44, 95, 33,145,114,227,120,123,204,195, 7, 71,188,245,228,132,211,183, 78, 57, 94, 11,167,
+ 39, 1,209, 21,235,221, 67,134,124,131,212, 76, 67, 41, 37,240,137, 63,230,252,118,166,148,153, 58,236, 41, 83, 67, 58, 91,199,
+249, 98, 18,110,151,122, 36, 15, 12,106,194, 68,135,144,169,148,154,105, 58,227, 75,165, 76,133,144, 54, 76,115, 35,215, 72,144,
+198,208, 50,219,245, 22,165,163, 14, 13, 29,110, 9,177, 67,179,113,210,145,104,164,188, 38,100, 50,132, 25, 66,162,148, 66,159,
+ 58, 66,131, 48, 5,246, 76, 22, 82, 84,102, 26,142, 24, 19,243,156,209,166,132, 46, 18,100,226,186, 57,210,205, 64, 90, 9,186,
+ 93, 35,190, 39,185,108,244,191, 60,224,216,208, 85, 15,193,206,163, 16,141, 94, 88,129,176,238,153,167, 70,239, 35,125, 19, 90,
+181,232, 77, 47, 1, 17,207, 60, 55, 92,104, 4,239,152,166, 76,242,158, 92,132,171, 97,102,219, 69,146,243, 38,234,245, 14,241,
+230,240, 1,211,114,121, 81,107,204,156,220, 79,228,170, 46,184,105, 42,209,246, 11,247, 23, 16,163, 86,156,164, 46,222,235,165,
+ 91,155, 93, 23,181, 0,238,126,153,239, 13,168, 99, 93,226,203, 11, 26, 27, 45,155,126, 42, 0,197, 59,202, 10,226,193, 81,166,
+153, 85,239,233,138,114,233, 2, 48, 17, 55,129, 80,149,210,102,138,143, 22, 2, 84, 20, 95,160,120,143,232, 64,113,133,173,236,
+152, 8,220,204, 55,156,198, 19, 82,131, 27,129,184,138,232, 52, 24,217, 83, 97,239, 45, 78,124,225,201, 53, 52,171, 65,102,212,
+ 42, 73, 3,181,216, 62,181, 45,157,246, 93,154,151,138,101, 38,123, 49, 94, 59,197, 17,163,169,186, 85, 45, 55, 61, 69, 19,168,
+149,106, 2, 11,165,209,130, 44,114, 74, 27, 13,163,166,130, 55,229,176,117,221,213,101,171,116,138, 9,103, 22,221, 56, 72,195,
+ 53, 37,168,103,110,186, 0, 95, 26,185, 86,139, 56,172,134,122,117, 78,236,239, 47,112,155,184,140, 79,171,243,248,232, 33, 79,
+116, 97, 65,247, 53,104,163,190, 9,158,168,234,152,151,201,194,178, 78, 69, 48, 29,129,151, 64,232,188,169,199,157, 35, 58, 79,
+113,139,185,127, 49,238, 55,103,150,192,218,204, 23, 26, 68, 64, 43,226, 3,155,126,101,151,105,173,168,216,216,221, 45,146,211,
+224,148,221,166,113,122,186, 98, 45,189, 93,160,181,240, 96, 29, 56,159, 60, 87, 83, 67, 88, 35, 82, 41,174,178, 58,121,139,119,
+ 30,158,178, 81,199,176,125,132,122,207, 7, 63,248, 51,254,242,227, 51,230,106, 43,147,182, 64, 49,170,128,139, 1,159, 33, 59,
+139, 82,245,139,146,212,189, 73,104,131, 24,211, 2, 78,177,149,132,186,187,103,192,186, 67,212, 52, 7,118,233,195,102,181, 97,
+229, 61,251,105, 32, 23,243,197,223, 14, 35,222, 59,210, 42, 66,183,193,187,136,247,158,245,209,206, 20,155,218,112,185,113, 59,
+ 76,248,232, 57,140, 3, 55, 55, 35,251, 97,160, 11, 23, 92,190, 60,103,156,246,124,241, 43,191,196, 23, 62,255,140,163, 77,207,
+119,191,159, 41,211, 5,185, 10,130,176,242,193, 56,216,157,205, 16,198,113,134, 96,126,112, 81, 79,222, 8,235,245,138,157, 51,
+218, 90, 46, 10, 58,211,199, 68,223,111,200,173, 50,206,135, 55,162,205,170, 3,243, 52,112,216,239,105, 14,254,229,191,186,229,
+ 91,223,252, 43, 14,251,129,224, 26,181,218,132,202, 57,115,133,104, 0, 95, 2, 77, 34, 15, 79,159,112,123,189, 71,130, 71,188,
+101, 32,223, 78,213, 88,231, 49,161,101,166,185, 98,244, 55,160,228,201,178, 0,100,185,228,213,241,229,247, 30,243,254,123,207,
+248,167,255,250,219,168, 38,118, 71, 15, 1,227,220,207,195,213,114, 40, 5,164, 15,134, 58,173, 21,175,102,157,140, 93, 69, 52,
+115,123,115,201, 92, 26, 33,120, 27, 43, 47,192,235, 90, 10,138, 50,206, 35,115,171,180,170, 76,147,231,242,242,156, 50, 7, 42,
+ 74,157, 43, 42,202,118,211,241,235,191,252, 14,167,199, 27,254,228, 91,223,227,227,143,207,140,239,189,132, 53,197,208, 83,235,
+158,150, 27, 26,163, 29,192, 49, 25, 93,206, 7,126,241, 75, 79,249,234,175,253, 10, 79,158,157,144,135, 27,110, 46, 71,246, 23,
+ 7,126,248,226, 83,252, 74,120,112,114, 69, 72,129, 50,192,163,199,199,188,245,228, 45,158, 61,223,242,237, 15, 95,242,227,191,
+254,132,149,246,248, 53,212, 58,226,196, 19,220,154, 42, 25, 87, 27,206,109, 32,103, 70, 7, 41, 8, 94, 51,145, 64, 21, 71,201,
+ 35,194,138,164, 48, 37,135,111,130, 27,101, 81, 88, 11,190,205,166,160, 15, 17,137, 19,234, 86,228, 58,146, 86, 30, 81,207, 48,
+ 40,201,117, 4, 61,216,180, 68,123,152, 43, 69, 28,202, 68,136,141,105,158,168, 89,145, 46,225, 75, 65,250, 68,149,202,156,111,
+ 72, 81, 72,109,131,214,204, 60, 92, 83, 93, 69, 10, 12,126, 89, 75,248, 21,201, 57,134,201, 52, 72, 93, 20, 52,219,216,125, 46,
+131, 17, 33,125, 64,212, 52, 37,205, 5,162, 64,163, 50,213,138, 23,207, 60,103,186,232, 44, 14,218, 43, 14, 79, 7,228,214,112,
+190,154,143,190, 41,174,101,154,139,230, 54,234, 32, 73, 64,130, 16,188,191,167, 11, 82,151,204,115,131, 48,221,219,229,168, 44,
+171, 80, 91, 79,222,231,151,195,166, 45,226,116,137,158,189,231,200,213,165, 96,143, 2,115,174,120,245, 76,101,134,154,161,120,
+170,218,186, 85, 82,199, 52, 84,164, 22,202, 56,194, 52,211,185, 13, 61,202,109,173, 56,191, 36,151,198,133,138, 57,205,104, 85,
+ 18,158,121,186,164, 21,207, 58, 30, 49, 13,133, 91, 49,225,104, 95, 29, 55,165, 50,148,194,138, 74,106, 16,154,191, 19,186,121,
+104,197,108,172,152,143, 78, 23,122, 81,115, 98,104, 65, 91,126,219,222,170,122, 66,116,214, 13, 44,151,211,156,109,143, 83, 40,
+ 56, 85,230,220,222,120,218,231, 86,150, 48, 13,187,162, 21,103,213,110,109,120, 26,165, 85, 66,232,112, 5,170,175, 84,181,238,
+ 50, 23, 19,118,165, 36,120, 2, 65, 43, 77, 26,190, 42,197, 53,235,208,171, 90, 88,129, 83,180, 44, 97, 20,186,168, 65, 69,153,
+140,117, 97, 92,251,162,128, 89,219,156,170, 81,237, 80, 90,205, 86,116,136, 61,176,158,176,240,233,151,173,187,183,203,183,169,
+141, 76, 17,207,220,204, 21, 47, 81,222, 68,180, 74, 53,111, 98,234, 60,227,236,169,148, 55,170,243,185,100, 82, 8,230,201,149,
+138,239, 60,222, 89,230,249,172,153, 58, 53,116,142,148,126, 73,138,242,209, 86, 18, 78,121,188, 85,114, 29, 24,243,138,121,243,
+140,119,158,253, 2,121,156,184,240, 80,105,124,114,241, 19,190,255,111,191,199,217,229,158,234, 12, 47,233, 37, 66,131,202,108,
+157,182,182,197, 26, 34, 38,110, 2,196,119,136, 83, 74,153, 44,133,202,155, 75,216,105, 91,148,167,141,230,188, 29,138, 98,252,
+226, 86,148,245,118,195, 59,207,223,198,229,202,229,124,133, 54,136,189, 21, 55,115,105,204, 99,230,236,112, 65, 83,136,189,167,
+ 15,145,224, 59,188,143, 56, 17,182,199, 61,155, 46,114,126, 5,195, 52,161, 69,185,157, 39,110,135,129,195,119, 14,196,245,134,
+163, 47,190,143,171,215, 60,124,180,101,184, 84,246,243,100, 5, 35,144,117, 38,185,128,107,141,152, 60, 46, 7,188, 86,220,202,
+ 49,205,166, 10, 95,121,161, 59, 58, 97,106, 51, 45,119, 56,173,168,100,166, 97,128, 98, 66,159, 41, 23,106, 54,132,176,111, 14,
+ 9,129,233, 48,113,126,126, 69, 76, 1,137,222,242,230,235, 76,109,217, 58, 61, 93,138,221,185,178,217, 70, 8, 66,158, 71,180,
+ 40,121, 44,100,173,228,146,241, 57,155,254,196,217,172,170,152, 16, 5, 45,224,131,210,188,137,205,126,253, 87,191,196,215,126,
+243,107,244, 39, 15,248,179,111,124,128,225, 88, 42,117,184, 94, 8,132,145, 58, 22,116,154,240, 78,237,185, 40,138,116,149, 54,
+238,241, 49,112,152, 71, 14,183,215,236,142,143,217,244, 29,251,195,108,220,114,173,212, 41, 27, 31, 98,177,133, 70, 21,162,247,
+116,125,224,250,102,196,121, 79,192,115,186, 61,230,242,242,130, 63,249,179,239, 48,102,216, 28,109, 97,110,236,167,137,172, 35,
+ 45, 23,130,128, 11, 29, 74, 37,132,100, 48, 30, 15,191,240,149,231,252,225,223,251, 61,142, 31,110,249,246,183,254, 29, 63,248,
+238, 7,116, 18, 57,126,120,194,230,193, 17,199, 61,188,252,236, 53,125,183,197,249, 45, 77,123, 74, 81,222,126, 24,249,157, 95,
+121, 31, 7,124,244,131, 15,137, 8,177,243,116, 46, 48,123,101,206,130, 22, 65,251, 74,205, 19, 65,163,233, 74,162,179,105, 89,
+174, 52, 13,172,214,209,248, 23,135,140, 75, 29,108, 59,250, 62,210, 24,109, 87, 43,141, 66, 32,141,222, 2,131, 18,248,232,240,
+ 67,164,151,204, 20, 70,180,116,166,176,247,197, 46,130, 59, 92,244,146, 73, 81, 42,172,197, 10,235,208, 43,179, 6,110,134, 61,
+ 15,195,154,162, 25,215,103, 91,241,101,211,160,172,251, 74, 41, 1,218,140,118,137, 41,155,186,190,115,142, 97,114, 20, 17,170,
+122,210, 42, 88,147, 81,102,178, 11,196, 85, 96,213, 42,135, 9, 92, 15, 58,155,120, 89,188,176, 10,194,156, 29,157, 87, 90,138,
+232, 92, 17, 21,178, 86,130,118,214,241,150,106,100, 59,111,207,170, 87, 71,119, 79,116,182, 59,203,152, 83,119, 95, 77,250, 79,
+ 47,223, 37,152,226, 62,139,133,187, 49, 64,171,205,166,173,254,126, 35, 87, 45,220,166, 64,169, 8,145,192,130,182,118, 30, 58,
+104, 67, 97,154, 11,178, 50,148,175,182,204,109,169,102,213, 77, 29,171, 36, 92, 79, 35, 84, 33,201,138,129,137, 86, 51,161,131,
+113, 24,108, 85,163,102,251,117,169, 34,226,216, 15, 19,161,192,202, 7,203, 73, 8, 3,173,122,106,236,144,195, 68, 8,142, 55,
+185,218,130, 51, 97,142,218,120,205,251,100,109,170,187, 27,209, 26,165, 75, 22, 21,124,101,233,110,155, 89,189, 12,202,230,104,
+214,214, 47, 86, 46, 71, 39,158,236,212, 46, 6,215,222,100,171,155, 21, 77,153,171,226, 99, 52, 88,140, 7,231, 34,174, 53, 59,
+ 80, 81, 19,185, 52, 8, 30,114,109,212,187,209, 70, 53, 70,184,143,166, 48, 22,156,137,218,196,225,130,123, 3, 49,152,179,237,
+230,163, 55, 54, 53,106,129, 45,181, 53,138, 19,162, 19,124,240,118,129, 46,251,218,130, 69,219, 33,142,148, 28, 26, 34,178,116,
+217, 52, 71,191,235,172,255,175,131,177,205,155, 89,254, 16,197,171,160,179, 41,247,189, 64,110, 5, 87,108,226, 80,231,140,138,
+ 99, 37, 30,109,133, 66, 36, 6, 79,205,149,171, 49,210, 66,160,139,138,230, 74, 8,107,166, 82,121,212, 57, 98,116, 68,157,121,
+113, 61, 81, 30, 63,231, 97,111,241,180,193, 67,155, 50,175, 63,252, 1,159, 92, 13,168,247, 72, 45,184,234, 12, 66,224,188,177,
+232,155, 82,181, 46,180,168,133,123,239,188,105, 11,188,208,212,222,143, 59, 14,127, 83,197,137, 17, 2,205, 95,122, 55,144, 48,
+ 54,251, 23,159, 62,225, 97,128,151,251,153,212,117, 28, 29,173, 65, 28,251,219, 1,169,109, 17, 59, 46,112,136,162, 76,181, 48,
+104, 54, 49,149, 84,186,174,135,118, 68, 92,128, 60,111,192, 50,185, 49,238, 7,254,244, 79,190,193,249,139,151, 28, 61, 88,177,
+ 94,173, 45,153,236,228, 9, 14,139,208, 28,134, 3,109, 95,241,157, 51,176, 77, 12,104,141,244,161, 26,196, 1,168,181, 17, 68,
+137,178, 66,178, 67,253, 68, 31, 18,239, 63,127,198,229,205, 5, 47, 47, 14, 6, 79, 26,103,178, 43,168,183,221,108, 45, 21, 9,
+145, 60,100, 66,169, 36,239, 25,242,204, 84, 42, 41,121, 24,103, 36, 6,102,157,185,188,189,181, 32, 25,169,166, 74, 21,199,124,
+152, 23,175,111,181,125,179,247,244, 93,160, 14,153,130, 97,123, 5,163, 29,142,213,113,121,117, 77, 31, 60,239, 61,125,202,135,
+143,174,105, 89,152,231,186, 8,146, 2, 65, 13,199, 90,102,165,239, 77,164,150, 85, 57, 74,142,235,171, 66,223,239,120,239,217,
+ 19,190,243,253, 31,112,115, 51,224,212, 51,213,106,164, 69, 76,169,220, 44,209,130,224, 3, 93, 23,152, 10,204,121, 38, 74,196,
+139,231,104,227,241,177,241,221, 31, 93, 50,150, 70,209,204,126, 63, 16, 99, 71,232, 19,137, 8,181, 48,150,138, 83,163,174,133,
+ 20,217,244,194,175,254,210,151,248,189,191,251,155,228,105,228,159,253,147, 63,229,236,166,178,219, 29,241,252,201,150, 93,127,
+ 68,117, 19,105, 3,167, 21,122,231,233, 78,182, 75,138,156,231,226,106,230,120,237,248,149, 47, 63,199,205, 55,188,120,113,101,
+171,163, 90,240,162,134,205,244, 66,145,153, 85,232,160,121,230,114,160,148, 14,124,102,170, 3,136,209, 35, 27,224, 98,162, 18,
+ 16,167,248, 90,193, 71, 42, 30,199, 0, 90,168, 18, 13,152,147, 61,174,122,154, 87,198, 54,225,231, 21,141,140,107, 66, 90, 89,
+134, 64,174,197,214,135, 62,208,239, 2,237, 66, 13,124, 21, 26,101, 72,244,100,124, 88, 49, 86, 7,109, 52,141, 67, 21, 82, 44,
+ 12,192, 48,172,241, 73,208,186,103, 53,247, 12,211, 45,185,121,198,117, 66,251, 25, 52,145,154,210,166,145,155, 17, 98,223,225,
+ 61,184, 92,200, 64,234,237,231, 64,148,117,215,225,176, 78, 94,196, 33,234,169, 82, 73,209, 81,145, 5,246,102,154,156,232,132,
+ 90, 29,174, 54, 20, 27,145,167,251,234, 80, 23, 92, 55, 94, 23, 28,239, 61,117,188,165,209,234,157, 11, 73,238,119, 60, 94,237,
+110,242,122,207,201,108,119, 98,185, 5,255, 93,235, 72,115, 86,196, 75, 19,114,179,103, 50,137,163, 12,141,146,103,124, 52,144,
+218,198,219,154,103, 95,102,220, 38, 18,198,196, 52, 10,169,101, 14,100, 8,129,109,216, 49,165,128,155, 46, 73, 53,209,170, 80,
+ 36, 19, 83,194, 15,153,177, 78, 22, 42,166,129, 70,182,176,152,216,225,223,126,250,236,235, 14,140,233,238,173, 42, 53,106,154,
+ 51,189,190,187, 3,205, 52,164, 45, 73, 95, 75,200,138, 10, 70, 48,105,149, 24,109,183,189,112, 95, 9,222, 8,112, 34,150,190,
+229,131, 51, 47,183, 91,248,235,222, 70,169, 18,173,106, 8, 78, 8,170,111,222,136,224,108,231, 89,139,177,139,157,119,139, 77,
+205, 20,247, 34,166,180, 21, 49, 32, 64,203,133,156, 27,213, 9, 94, 77,232, 38,193,118,128,238, 14, 2,163,152,135,190,217,158,
+169, 57,123, 48,157, 15,102,106, 91,198,237,141,165, 26, 93,196,157, 33, 5,212,219,107,239,130,224,119, 27, 78,223,122,194,211,
+ 7, 27,170,206, 28, 38,197, 59, 33, 70,135, 6, 69,189,137,208,146,143,212,105,224,242,250,176,224,116, 77,147, 32, 78, 8, 18,
+105,205,227,220,140, 23,135,215,196, 91, 15, 2,239,237, 34, 62, 59,182, 33,208,197,200,190, 22,196, 9, 71,199, 59,142,182,130,
+223, 62,167, 59,125, 78,191,234,161,206,212, 90,233, 87,149, 31,126,255, 47,184,184, 25,168, 53, 91,161,133,237,208,154,171,139,
+189,208,186, 81, 19, 0,234,146,237, 30,173,114, 21, 27, 45,163,134,164, 12,209, 47, 81,151,250,198, 24, 34,138,161, 40,213,241,
+224,248, 1, 95,254,210, 59,124,239, 71, 47, 25,125,226,193,233, 17,155,221,154,163, 24,185,185,189, 53, 56,132,247,168, 24,110,
+216, 57, 79,173,246,126, 54,173,212,101, 31,122, 24, 14, 54,173, 89,176,194,193, 7, 66, 12,246,126,151,202,171,243,215, 92,239,
+ 7,130, 58,118,187, 13, 69, 43,228,137,205,238,152,227,213, 17, 93,191,197,165,134,107, 1,245, 5, 95, 45,215,188, 97, 5, 92,
+ 72, 29, 93,103, 69,203,201, 58,242,251,127,247,215,249,175,255,219,223,229,191,255, 31,254,144, 71,167,199,124,243,155, 31, 89,
+ 38,181,154, 23,223, 86, 43, 6,172, 16,105,204,211,204, 60,102,180, 86,134,113,194,185,196,106,181,165,232,184,116,223,142, 7,
+155, 13,227,205, 64, 46,149, 70,161, 58, 40,106, 62,110,154, 77,146,124,176,137, 75, 93,204,175, 41, 69,180, 42,181,152,231,181,
+235, 60,173, 20,190,245,173, 79,152,114,166,214,129,156, 39, 66,151,222,172,123,116,110, 54, 98, 21,161,228,198,102,179, 97, 46,
+153,139,171, 43,182,169,231, 23,127,238,109,158,189,125,196, 95,127,252,138, 97, 28,137,222,180, 17,181, 84,106, 51, 48,137,115,
+142, 24, 61, 62, 4,230, 81, 23,237,140,225,120,215, 93,228,197,103, 47,152, 38, 11,244, 9, 41, 34, 42,148,214,168,115,161,149,
+138,139,130,248,142,224,133,110,215,241,248,104,197,223,249,237,175,242,187,191,251, 31,243,250,252, 21,255,219, 63,254,167, 92,
+190,158,248,220,243, 83,250,157,163,148,194,166,179,136,201,152, 58,118,199,107, 20,229,228,228, 33,235,237,154, 58,143,156,110,
+183,196, 24, 57,233, 3, 49,246,236, 95, 95,227,170, 50,119,130,243,142, 36,107, 83, 18,171,173,196,166,106,216,205, 80,204,221,
+224, 83,194, 21,229,118, 24, 41,197,178,203, 81,208,156,241, 93, 96,229, 59,218,236, 64,103, 35, 23,118,110,225, 81,116, 84,201,
+212, 84,240, 13, 86,222,104,134,123,157,168, 8,157, 86,124,234, 9,234,208, 16,112, 19, 4,157, 25,199,137, 38,138,235, 2,146,
+ 59,130,183,137, 37, 21,180, 20, 92, 51, 12,168, 0, 38,171,220,227,123,165,141, 80, 52,160, 83,165,249, 64,174,138,180, 10,131,
+149, 28,210, 21,106,179,207, 93,232,197, 4, 79,206,224, 83,222,123,155, 36,197, 37,155, 67,195,162,136,214,101,178,166, 8, 30,
+ 73, 75, 99,161,166, 21,114, 13, 82, 72,116,235,192,163, 71,167,248,248,179,167,147, 77,185,145,199, 9, 90, 97,183, 91,155, 94,
+229, 30,190,166,172,228,105, 70,156,178,217,116, 63,115,232,204,223, 84,235,143, 99, 33, 79, 19, 65,148,205,110,125,111,223,251,
+ 14,109,123,125,117,224,246,250,146, 86, 14,214, 16, 85,168,205,206,219,234,109,173, 48,222, 86, 90, 15,121,112,136,142,180, 38,
+ 72,157,136, 85, 81,215,152,154, 67,167,106, 13, 66,169,120, 21,124,218,130, 42,121, 63, 46, 80,184, 76,168,137, 74,225, 48,238,
+105, 65,105,243, 76, 25, 10, 42,208,199,158,105,170,248,167, 79,222,254,186,115,118,145, 25, 55,221,198, 21,162,206, 84,235,206,
+240,173,106, 64,157,133,195,108,177,144, 44, 98, 42,179,196,201,130,115, 52, 72,203,157,177, 63, 58, 27,133,150,170,198, 74,110,
+150, 32,164, 45,224,157,101,153,235,221, 72,222, 41, 26, 2,209,233,226, 13,118, 22,163,232,108,119, 90,212,153, 29, 75, 76,117,
+ 78,179,177, 71, 89, 86, 0,212,187,116,162, 5,148,211, 20,103,115,103, 84, 34, 62, 46,123,239,106,213,110,215, 45, 44,123,113,
+148, 50,191, 33, 11, 58, 17, 36, 5,146,115,166,154,119, 98,126,251, 78, 76,116,214, 28,169, 19, 98,203,236,231,137,156, 27,157,
+ 88,254, 55, 85,241,193,155,154, 23, 79,183, 74, 92, 94,223, 48, 78,101,201,122,247,164, 16,105, 45, 27,250,214, 9,121,110,244,
+171,200,111,188,127,204,201, 6, 38,231,145, 46,162, 94, 88,237, 86, 28,157, 28, 17, 31, 29,179, 73,167, 20,125,202,217,193,246,
+178,170,145,227, 39,143, 25, 95,252, 53,127,245,189,191,100,127,152, 41,117, 38,197, 72, 12, 22,241,149, 91,166,148,138, 22, 19,
+108,153, 27,209,153,138,221, 47, 65, 23, 75, 28,107, 10,194, 58,245,244,169, 3, 15, 37,155, 24,168,181,138,120, 89, 4, 56,194,
+207,189,255, 57,118,219, 19,110, 90,199,233,131,167,108,163,176,221,236,152,166, 27,174,110, 15,148,188, 56, 38, 22, 46,182, 91,
+118,248, 54, 94,179,223,211,162,226, 48,173, 3,141,214, 10, 57, 23,106,105,196,224,217,172, 58,170,107, 76,135,204,249,229, 13,
+183,183,123,188,175, 36, 31,140, 9,158, 64, 66,192,197, 21,171,221,177,141,149, 17, 52, 21, 26,149,232, 61, 43, 31,136,206,209,
+111, 35,127,240, 7,191,197,127,243,223,253,231,244, 50,243,234,229, 25,175, 94, 94,243,227,159,188,226,242,102, 64,213,138,157,
+128, 95,240,185,166,156,111, 8, 83,182, 75, 49,136,163, 91,155, 0,173,243, 70,233,243, 93, 98,219,111,185, 60,220,144,250,192,
+ 48,218,122, 71, 91,177, 17,172,243,244,235, 64,110, 70, 70,147,104, 2,201, 78, 60,199,235, 21,191,249,159,252, 42,222, 71, 46,
+ 94,237, 41, 28, 51, 76, 38, 84,237,154, 37,254, 65,196, 87,165,102,168,226,144,100,122, 20,113,208,175, 28,175,206, 47, 65,173,
+219,175, 36,190,246,181, 95, 96,187, 89,243,189, 31,125,132,195, 19,197,226,124,181,149, 55,128,141,174,235, 72,253,134,218,148,
+ 85,138, 52,231,121,251,209, 26,213,202,203,179, 27,106,177, 66,177,182,106,207,231,178, 51,103, 41, 12,162,115,116, 93, 7,234,
+248,234, 87, 62,207, 31,252,193,239,242,217,249, 25,255,242,159,125,147,119, 31,158,240,238,243,135,108,142, 59,118,167,107,252,
+228, 88,157, 30,179,217, 5, 98, 60, 37,244, 39,180,114,192,149,202, 47,125,229,125,158,127,254, 57,199,111,173,121,240,100,203,
+230, 36,113,188, 78, 12,115,229,118, 26,172,168,200,145,162,149,185, 90,176, 77, 51, 74,146,233,103,186, 70, 47,102, 3,189, 29,
+243,178, 30,108,184,184, 50,212,106,159, 72, 41, 82,115,161, 6, 11,162,145, 26,193,173,105, 78, 23, 52,244, 68,153, 43,125,234,
+169,193, 33, 98, 78,134,230,140,239, 80,230,140, 23,103,200,236, 58, 83, 99,177, 24, 84, 39,196, 46, 16,134, 17,197,236, 0, 0,
+ 32, 0, 73, 68, 65, 84,177,244, 65,231,215, 56,215,144, 60, 91,122,165,138,137,215,230,145, 20,183,148, 16, 24,111, 43, 21,193,
+ 73, 33,248,100, 4,211, 2,211, 92,109,117,224, 61,125, 72,168,111,248,166, 56,177, 9, 91, 16,155,161,214,102,107,151,138, 5,
+ 47, 5,111, 22, 89, 39, 16,212, 47,157,179,117,165,150, 68,105, 35, 96,137,129,190,235,121,235,173,135, 63,243,232, 89,129, 49,
+ 43,243, 56, 33, 52,182,247,120, 65, 78,165, 81,166,137,232,149,213,186,127,163,245,249,153, 59,117,103,220,247,121,158,232,189,
+178, 57,218,112,159,123,131, 67,133,203,203, 91,134,155,107,164,218, 14,188, 57, 99,102,200, 34, 12,247, 10,222, 87, 19, 33, 35,
+120,231, 41, 35,204,237, 0, 14,118,101, 77,246, 10,186, 55, 61, 86,231, 33, 5,234, 80,200,254, 96,103, 94,114,212,178,103,104,
+ 13, 52,208,173, 18,213, 91,154,163,119, 14, 77, 11,136,103, 4,255,228,237,183,191, 46,226, 12, 37,234, 22, 53,244, 29, 59,215,
+217, 37,239,229,110,236,242,134,154,103, 2, 48, 4, 9, 66,242,222,210,177, 22, 31,184, 46,129, 29,222,185, 69,176,115, 71,108,
+147, 69,156,101, 85,100,211, 98, 89,201,206, 33, 65,105, 8, 77,151, 64,132,165, 11,215, 86,172, 96,168,102,123, 83, 81,100,185,
+160, 74,177, 61,161,199, 81,221,242,132,211, 8,226, 44,113,205,140,225,127,131,205,108, 99,109,241,126,201, 72, 7, 87, 29, 46,
+ 6,148,130, 44,194, 50, 42, 4,117, 80,141, 38, 39,152,162,212,167, 96,120,219, 90,152,198,145,121, 46,224,204,226,165,193,147,
+235,132,168,189,230, 50, 55, 98,140,116,171,132,104,225,230,234,118,137,145, 21,219,219,123,155, 80,244, 93, 68, 66,228,189,199,
+ 27,222, 57,134, 57,219,165, 65,244,172,195,134, 7, 15,142, 89,159, 60, 71, 4, 66,191,101,168,141,243,146,144, 41,211, 29, 63,
+229,217, 91,137,111,253,233,191,224, 39,159,125,102,194, 63, 93,228, 38,226,105,165, 90,184, 73,157, 40,205, 46,216, 5, 31, 99,
+ 49,145,226,173,235, 17,219, 37,187, 86,153,243,200, 60, 79,148, 82,150,137,130,137,125, 88, 44,131,221,106,203,207, 61,123,135,
+243,155, 27,170, 36,222,125,250,136,113,190,225,209,110,197,213,120,195,245,254,134, 41,103,179,218, 40,139,229,198,225, 1,117,
+230,253,183,159, 79,240,193, 45, 75, 31,187,112,204, 30, 86, 44, 88, 5,165,239, 59,214,157,217,178, 14,195,129,179,243,115,206,
+247, 55,236,247, 7,186,149,152,224,100, 58, 32,165,176, 94, 31,177,121,248,136,144, 60, 34,129,150, 77,215,241,224,209, 49,255,
+213, 31,253, 14,191,247, 71,191,207,167, 63,248, 49,255,227,255,244,199,252,195,127,244, 13,126,251,183,191,202,205,197,107,126,
+244,241,185,141,180, 75, 53,203, 24,194, 60,141, 76,185,145, 86,137, 86, 45, 88,165,235,215,244,235, 21,218,108, 36, 43, 78, 88,
+245, 61,243, 60, 51,206, 3, 41, 5,202,178,155,159,231,193, 66, 63,186, 13, 41, 36,112,178,160, 37, 51,165, 20,104,194,233,233,
+150,191,255,247,255, 30,143, 30,108,249,209,167, 23, 60, 60, 89,196,113,205, 4,137,120,103,123,218, 8,101,178, 20, 61, 23,160,
+213, 70,223, 5,188, 40,175, 46, 47, 73,105, 67,140,107,106, 17,142,118, 61, 95,124,255,148,156, 27, 31,127,248,234, 13,226,184,
+ 53,179,157,249, 24,233,250,141,233, 40,194,114, 89,212,204,254,246,154,139,171, 61, 94, 34, 49, 26,162,180,214, 66,205, 25,106,
+ 70,156, 32,201, 17, 98,111,227,120,239,249,242,151,223,229, 15,255,232,247,121,241,233,103,252,131,255,229, 31,227,188,240,185,
+119,142,120,246,206, 49,187, 7, 15,216,236, 86,164, 20,104,251,129,227,211, 83,182, 71,143,233,189,231,104,179,102,159,111,168,
+185,240,228,217, 49,113,183, 2,191, 1,191, 35,109, 55,236, 86,158,235,155, 3,215,151,151, 4,223, 81,243, 76,105, 35,226, 28,
+193, 5,170,102,188, 52, 50, 66,157, 29,163, 10,173,141, 52, 89, 52, 59, 62, 81, 66,193, 17,233,186, 21,109,121,182,125, 93,120,
+228,154,241,193, 34,156, 87, 81,112,165, 71, 37, 18,155,163,197, 14,137,213,172, 68,205,209, 98,192, 55,199,100,163, 67,180,139,
+136, 56,146, 68,188, 38,102,157,161, 41,157, 40,189,243,148,154,153, 41,168,118, 38,252, 76, 61,165, 86,234,184, 64,149,164,146,
+220,140,119, 48, 11,184,185, 24,126, 56, 4, 74,137,196, 16,108,106,144,130, 37, 94, 6, 53,184, 12, 66,139, 54, 57,147, 59, 1,
+183, 54,106,116,198,206,103, 17, 6, 55,227, 98,120,117, 4,233,204,249, 18, 3,219,213,138,135,111,157,218,101,255,179,218,195,
+ 6, 3, 5,121,133,237,118, 5,247,240, 61, 21,139,252,205,227, 72, 16, 88,109,214,247,230,127,175, 10,211, 88,168,121,100, 21,
+133,126,187,185,151,240,153, 55,197, 72,131,171,243, 61, 55, 87,231,180, 50,162, 78,201,217, 46,246, 38, 22,255,157, 5,102,167,
+140,115,163, 28,102, 60, 66, 90, 48,198,172,214,204,216,154,175,180,142,153, 6,174,144,179,157,217,222,123,250, 44,204, 57, 80,
+166,145, 16, 3, 34, 27,106,222, 19,139,210,107, 48,161,245,110, 69,190, 29, 25,199,137, 0,214,121,222,113,111,165, 90, 78,184,
+211,191,233, 95,182,203,248, 77,210, 88,178,170, 88, 22,114, 73,118, 16,131,141, 20,141,187,187, 48,211,219,226,245, 22, 49, 53,
+103,179, 35, 92,113, 84,183,164, 1,185,128,138,129, 50,156,154,176,167, 52,111, 29,157, 55, 33,151,191,187,135,150,116,168,234,
+194, 66, 52, 82, 84,195, 50,246, 50, 46,188,121,232, 27,115, 81,251,111, 2, 82,161,181,121,201,107, 55,208, 78, 19,179,193, 37,
+ 67,228, 17,156,208,170,253,185,248,134,250,134,122,111,162,162, 96,123, 76, 87, 2, 46,152, 72,196,123, 97,210,134, 31, 27,169,
+ 11,132, 36,148,185, 65,180, 9,135, 23,181,234,189,117,108,187,158,224,133, 57, 43, 49, 45, 28,246,166, 68, 47, 76,109,102,187,
+ 90,243,244, 4,214, 64, 22,207,140,178, 22, 97,181,237,241,235, 35, 92,169,184,238,132,217,221,114,178, 25,120,187,116, 92,209,
+ 83,202, 45,255,230,255,250,231,124,255,163,239,219,225, 81, 43,121,202, 86,197, 71,101,110, 51, 77,231, 69, 20,103,133,154,163,
+ 25,123,223,153, 8, 16, 87,193, 67,151, 86,104, 9, 12,245,198, 70,245,203,184,214, 33,120,145, 37,175,222,243,115,207,158,209,
+202,200,139, 79, 94,178,125,120,202,197, 75,200,178,162,184, 98, 49,186, 46,210, 71,103, 15,247,156,223,132, 43, 84,119, 87,108,
+216,243,117, 23,141,106, 63,195,221,168,223,186,249,138,227, 48, 76,140,185,178, 93,119, 36, 31,217,198, 21,213,193, 56,143,188,
+186,253,140, 87,103,103,188,117,116,204,147,199,143, 89, 29, 41, 83, 25,136,251, 13,167,199,111,241,240,241, 99,240,194,218, 59,
+126,249,111,125,129,223,250,157, 47,242,157,111,124,131, 87,159,237,233,250, 21, 47, 95,238,249,246,119,126,200, 56, 79, 22,100,
+164,249, 14, 87,128, 11, 16, 83, 98, 62, 12,228, 97,198,187,136, 75,129,212, 37,187,248, 77, 78, 73,242, 22,101,122, 51,220,208,
+175, 34, 90,140,234, 5,149,229, 37,161,100,230,217, 81,115,166, 77,217,132,136, 64, 73,240,250,234,146,171,179,115, 62,247,228,
+152,207, 61,123, 66,209, 66,211, 25,116, 32,173, 87,180, 34, 22,224, 34,141, 16, 29,109,130, 50, 87,203,216,142,158,139,171, 91,
+196, 9,169,235, 88,245,134,162,253,139,239,191, 4, 30,243,135,255,233,215, 56,220,140,252,249, 95,254, 8,241,205,176,200, 41,
+145,124, 32,248, 96,218, 17, 49,107,220, 84, 51, 87,215,123,180,100, 66, 52, 94,184,143,137, 24, 87,104,203, 72, 83,242, 82,120,
+175,125, 32,118,129, 95,250,185,103,252, 23,255,229,223,225,230,252, 21,255,224, 31,254, 31, 28,174, 11,218,110,248,203, 31,192,
+238,173, 35,158, 61,138,228, 82, 88,109, 86, 28,202,100, 89,240, 81, 72,209,115,250,224, 17,239,190,247,152,143,127,114,206,247,
+190,253, 99,222,121,254,152,237, 51, 64, 54,192, 99, 30, 60,239,248,210,213, 37,175,207,206, 25,166, 61, 93,128, 82, 19, 99,110,
+ 72, 40,244, 85,105,206,227,179, 69,158,170,179,247,183,239, 60,206, 57,242, 92, 8,210,112,113,196,103,155, 68,184, 90,200, 57,
+131, 4,212,123, 52,244,196, 58,162,217, 17, 59,183,220, 31, 29,212, 66, 85, 97,211, 9,101,134, 68, 68, 98, 37,135,138,230, 70,
+204, 27,100, 26,144,232, 24,219, 76,112,182,174,106,101,102, 80,101,172, 74,138, 14,188,167,206,158, 67,187,197,151, 68, 83, 71,
+232,193,105, 96, 44,134,167, 14,201,112,204, 97,235,153, 14,144,146,226,125,193,121, 15, 1,106,153,241, 98,231,142,208, 72,234,
+ 40,173, 46, 32, 41, 27,199, 83, 27, 89,102,115,155,168, 89,127,171, 87, 74,171,136, 22, 92, 21, 92,179,243,233, 62,246,223,134,
+ 93, 53, 15,182,147,251, 3,207, 52,133, 90, 42, 14,115, 33,221,171,144,173,217,205,238, 22, 91,219,125, 94,232,127,211,138, 39,
+206, 51,223,177,243,157, 67,139, 34, 46, 83,107, 69,130,163,206, 13, 29,171, 89,190,197, 49,207, 19,113,157, 8,101, 98, 28, 43,
+205, 9,161, 13,204, 90, 32,158,224,218, 43,124,187, 37,142,137,131, 6,179, 63, 75,162,186, 66,149,137, 60, 59,188, 11, 12, 58,
+ 51, 55,240,251, 66,210,128,243, 30,255,228,241,211,175,227,218,155,139,220,178,130, 45, 56,193, 7,177,135, 71,151, 78,119, 73,
+ 92,243,238,238, 13,210,101, 63,235,237,255,105, 75,119,189,176,118,156, 68, 83,204, 75,197, 53,101,158,139, 9,241,150,144, 17,
+239, 27, 18,132, 90, 76,156, 39, 98, 9, 91,193,123,156,180, 37,209, 73, 44,170, 85, 64,154,199, 33,180,102,172,110,213, 37,171,
+217,217, 11, 12, 46,188,201, 80, 54,123,155,141,237, 20, 53, 79,186, 51, 32,236, 93,112,129,225,231, 42,206, 47,211,131,187,232,
+ 68,239,192,155,101,195, 59, 79, 31,163, 9,242, 48,109, 64, 12, 30, 9,193, 70,220,203,251,229,235,194,110,119,130,151,133, 69,
+ 28,132,152, 58,246,215,231,156, 93,222, 82,229,167,130, 62, 21,135,143,158,164,142, 40,129,211, 35,207,241,166,103,181,237,137,
+219,192,110,117, 2,125, 52, 21,252, 52, 83, 83, 34, 10, 76, 99,228,234, 80,185,154,102, 84, 15,252,228,123,223,225,213,229, 37,
+ 85,161,229,201, 86, 35,226,193, 21,202, 52,147, 91, 89, 70,194,182,222,104, 75, 81, 21, 66,162,235, 58,250, 85,111,191,179, 82,
+126, 74, 18, 20,115, 67,136, 98,228, 43,103,201,122, 93,151,120,250,224,132,155,219, 91,246,195,192,233,201, 17,135,253, 5,255,
+209,175,252,109,122, 70, 62,249,248, 5, 53, 56,214,155, 45,235,216, 19,163,167,239,146, 21, 25, 18, 13, 98,227, 45,240,199, 45,
+147, 24, 39,186,132, 52, 24,198,183,185, 37, 56, 65,149, 90, 33,231,106, 54,187,101,223, 31,187,158, 85,191,194, 57,199,112, 24,
+121,117,117,193,249,235, 11, 3,163,212,198, 88,110,113,165,242,254, 59, 79,121,254,222,231,217,109, 60, 31,252,224, 3,168,158,
+183, 78, 55,252,241,191,248,127,120,125, 61,115,254,234,134,207, 94, 94,240,250,242,156,146, 7, 74,245, 76,179,237,250,171,192,
+ 48,204,228, 60,211,245, 29,125, 50,110,128,163,226, 93, 66, 2,244, 49, 81,180, 49,150, 25, 39,222, 18,168,178,121,217,167, 33,
+ 27,201,203,253, 52, 95,189, 81,151, 11, 51,216,186, 39, 23,218, 60,179,223,195,112,104,148, 73,113,204,228,209,244, 30,185,153,
+ 43, 36, 23, 53,139,105, 91, 18,199, 36, 32,210,184,188,185,166, 91,173,232,250,245, 27,144, 81,211,194,235,203, 91,222,125,247,
+ 57,127,235, 87,191,194,135, 31,252,152,243,171,129,126,179, 66,146, 39,173, 55, 52,239,108,130,166,134,177, 44,227,132, 23,177,
+ 61,122,112, 84, 85, 91,187,212,130, 71,109,130,227, 35, 41, 38,186, 16,248,220,163, 39,252,103,191,251,107,228,195, 53,255,232,
+143,255,132, 82,133,213,186, 67,155,227, 48, 90,166,228,131,109,100,187, 74,244,113,203,233,131, 39,172,214, 91, 30, 30, 37,142,
+118,158,110, 27, 73,111,109,121,240, 96,203,120, 51, 80,138,178,123,107, 11,238, 4, 43,107, 55,156, 62,216,224, 91,230,211,159,
+188,100, 56,100,211,134,168, 82,100, 2, 13,208, 60,146,140, 92, 87,155, 99,118,208,137,135,234,141,119, 46,130,147, 68,220,173,
+112, 56,203,110, 8,194, 38,122, 10,141,168,160,185, 48,107,162,138,195, 69,197, 75,182,224, 38,133, 76, 67,106, 64, 83,101, 44,
+ 48,183, 17, 90,101, 67,143, 68,207, 52, 89,183,221,168,104, 48, 31,249,144,111, 41, 14, 92,181,243,209, 88, 1, 6,128, 73,219,
+158,234,108,101,193,122,199, 58, 8, 50, 6,166,160,120, 28,193, 21, 8, 29,115,181,148,199,185,182, 37, 0,107, 81,131,163,148,
+165,201, 10, 49, 45,250, 23, 67, 97,215, 10, 49,121, 35, 70, 98,231,165, 56,179, 33, 58,239, 77,175,112,180,101,119,124,116, 47,
+151,239, 52,102,242, 52,209, 39,191,116,189,247,163, 32,159,198, 66,158, 39,250, 20,232, 86,247,151,117, 62, 55, 24,135,153, 60,
+ 79,172,251, 64,183, 94,221,235,197,126, 59, 53, 46,174,174,201,195, 45,117, 30,108,189, 89,178, 37,157,138,160,189, 39,143,138,
+ 43, 13,167, 5, 41,149, 24,149, 67, 24,104,154,224,214,236,209, 78, 6, 74, 43, 56,122,100,116,116,213, 2, 21, 11,133,154, 12,
+130,228,212, 51,211, 40,109, 32,248,204, 62,103,106, 51,248, 80,155, 77, 84,155,180,226,159, 60,123,251,235,134, 8,117,119, 43,
+242, 55,201,108,119, 34, 68, 39,150,100,131,115,111,246,164,150,174,186,192, 83, 22,197,188,113, 98, 28,190,185,197, 30,102,209,
+131,212,198, 92, 33, 18, 65, 28,173, 22,106,109,248,100, 65, 25, 82,155, 89,124, 22,117,162,136, 21, 9,119,234,245,187,130,176,
+220,217,172, 44,130,197, 18,118,196, 89,196,224,226,167,175, 78,151, 41,131,188,161,227,137,119, 56, 53,223,117, 8,102,224,174,
+205,210,210,112, 38,186,107,193, 50,209, 81,183,112,210,205,110,228,157,117,182,125,178,195, 52,165,136, 4,111, 79,139, 90,240,
+141, 83,152,231, 12, 94, 80,188,141,126, 67, 36, 36,251,128,125,246,217, 43, 94, 95, 15,118,208,139,241,195, 67,232,136,222,210,
+121,164,235, 72, 93,228,228, 40,146,196,219, 1, 21, 28,210,103,230,155, 1,223,111,240, 82, 65,183, 92,149, 83, 84, 39,186,208,
+241,201, 39,223,231,227,143, 63, 96, 44, 51,211, 48, 83, 90,181,223, 31,141,156, 51,185,232, 27,129,218, 29, 96, 6,231,232, 82,
+207,170, 95,211,165, 14,241,129, 82, 50,121,154, 25,198, 97, 73, 24,179,125,156,247, 9,241,203, 46,220,193,233,209,142, 92, 27,
+183,227, 76,174,153,211, 99, 91, 7,252,198,175,255, 50, 31,255,240,207,249,248,236,154,253,237,173,117,164, 10,187,205,138,126,
+189,102,211,245,236,118,107,214, 41,144, 98, 34, 70,135,168,229, 10,220,101, 52, 91, 32,110, 89, 48, 69, 54,126, 14, 18, 23,102,
+127,179,220,106,231,105,173, 0,158, 39,143,159,241,214, 91, 39,168, 22,202,156,185,185,222,115,125,187,231, 48,206, 92,239,175,
+185, 62,156,145,122,104,172,232,251, 21,243,112,197,167,175, 94,243,239,190,253, 49,115, 45, 56, 23,120,245,234,140,139,155, 27,
+ 82,223, 17,130,231, 48,236, 41,165,226,170,163, 52, 19, 90,174,183, 27, 83,170,123,150,241,101, 33,136,163,102,101,204, 19,105,
+221, 33, 90, 41,227,204, 48,205, 76,205,240,189, 34,134,166, 28,243,108, 83, 45, 9,203,239, 59, 46,126,220,128,147, 35,170,118,
+116,209,227, 20,166, 60,227,154, 55, 82, 91,110,204,173,224,131, 97,143,107, 43,224,148,245, 42,114,126,181,167,213,198,106,189,
+ 66, 36, 17,196,209,111, 59,122, 9,168,115, 92,158, 79,212, 58, 47,152,216, 53,125,183,131,150, 17,159,208, 5,144,228,112,228,
+ 97,207,225,246, 22, 66,192,199, 64,144, 72,148,244,102, 61, 85,106, 65, 85, 9, 41, 17,125,164,235, 87,252,206,111,125,153,163,
+147,192,255,252,191,254, 43, 42,194, 23,223,125,204,238,100, 67,236, 4, 45,240,234,236,192,217,217, 21,187, 85,224,189,119,223,
+227,237,211, 19, 78, 79, 34, 71, 15,214,248, 62,192, 42,130,108,112, 97,203,209,131, 21,229,122, 36,122, 69, 86, 15,150, 75,221,
+186,246, 85,188,225,131,239,126,151,177, 4,100,211, 81, 5,200, 21, 71, 98,172,197,136,114, 85,152,218, 68,140, 59,180, 64, 72,
+153,137, 70,161,145,186,196,106,189, 6,175,104,155, 45,176, 72, 21, 95, 35, 26, 35,153, 70,119,135, 82, 78,105,161,208, 45, 5,
+112,245,224, 11,213, 77,228, 92, 81, 28, 41, 4,154, 22,114,168, 8, 9, 73,149,230, 21, 37, 49,140, 87,136,139,108, 98, 15, 84,
+188,174,152,124, 97, 19, 86,180,193,130,134, 92,231,112,117,198, 51,211,130, 39,180,198,166, 87,106, 78,220,206, 19,218, 34,169,
+115,132, 86,152,115, 70, 98,180, 21,103,181,174, 60, 68, 19, 44,171, 83,251, 60, 54,219,133,138, 88, 35,162, 94,240, 69, 17, 9,
+ 56, 60,169, 19,156, 15,164, 16,120,112,122,196,122,187,253,217, 71,217,216, 5, 89,203,204,170,139,247,118,249, 54, 96, 88,104,
+114,155, 85,186, 55, 70, 61,139, 67,106,127,152,104,101,226,104,211, 19,250,254, 94, 59,245,235, 65,185, 56,187,228,112,251,154,
+208,218,178, 26,130, 88, 29, 53, 55,246,185,225,171, 16, 66,160, 97, 44, 11,205,142, 60, 21,124, 16,114, 81,156,159,152, 91,161,
+185, 35, 90, 84,202,180, 71, 99,160,170, 82, 37,227,125, 51, 20,108,131, 88, 39, 92,118,136,139, 16, 42,234, 10,100,207,218,247,
+ 12,154,173,224,124,252,248,233,215,113, 22,196,226, 84,222, 8,229,180,217,206, 89,192,136, 87,119,227,119, 21,187,244, 85,236,
+ 31, 47,182,255,185, 83,156, 59,111,130, 22,111,204,115, 93,178,204, 21,192, 27, 14, 79,245,142,170,230, 45, 36, 5,161,181, 59,
+106,155, 9,149,172,122, 88, 18,220,196, 89, 42,140,184, 37, 56,126,129, 31, 44, 48, 4, 39,178, 36,203,181, 37, 95,119,241,210,
+171, 37,124,149, 82, 12,166,180,140,178,238,210,200,250, 69,237,236,177,162,165, 96, 57,201, 62, 44,240,149, 37, 80, 38,198, 64,
+112, 98,252,118, 23,172,104, 8, 22,168,209, 74,129, 14, 68, 76, 29, 95,213,194, 82,124, 52,246,117, 29, 38, 62,249,228, 51,246,
+135,108,187,174, 16, 40,181,226,125, 35,250,192,122,181, 38,246, 59,202, 56,242,232, 4,203, 16,206,141,154, 71,156, 68,188, 58,
+210,163,167,132, 8,181, 20,214,238,192,233, 10, 34,141,111,254,223,127,193,171,235, 27,198, 60, 89,116,108, 93,112,145, 14,166,
+146,223, 32, 59,181, 89,167, 14,142,216, 37, 54,171, 35,124,240,196,232,105,181, 82,242,188,232, 29,108, 18, 83, 85,223,204,150,
+116, 81,134,167,216,179, 74,107, 52, 91, 71, 83,171, 32, 93, 64,112, 28, 31,173,249,240,199, 31,115, 53,204,180,217, 86, 40, 14,
+193, 47, 60,126, 35, 15, 54, 16, 79,223,173,216,173,214,196,216,177, 89,117,172,214,235,101,239,238, 77,205,171,205,118,163,216,
+138,195,105, 35,166,142,205,118,103, 26, 15, 47, 54, 54,247,158,205,241, 41,199,187, 19, 82, 72, 68,111, 83,136,162,141,105, 26,
+232, 87, 61,133,132,200,150,241,242,130, 31,125,252, 33,173, 4, 62,252,248,130, 16, 2,222, 5,242,108, 42,246,180,218, 82,242,
+ 76, 30, 7, 67,171,138, 95, 10,184, 68, 18,111, 99,110,223, 44,210,215,155,250, 70,106,179,162,182, 53,166,217,188,168,135,105,
+ 36,134, 68,232,122,106, 49,197,173, 42, 4,241, 36,151,104,136,105, 56,200, 28,159,158,240,252,217,123,164,152, 32,143, 76,211,
+126,169,186, 51, 51,149, 20, 2,171,190,135,230,105,147,253, 78, 66,244, 8,133,235,195, 45,222, 11, 49,244, 72,112, 68, 85,186,
+232,201,165,177,191, 30,120,117,126,224,187, 63,122,193,231,222,121,192, 87,190,248, 46, 47, 62, 19,166, 58,216,110,217, 43,129,
+132, 35, 47,129, 70,138,182, 76, 45,153, 90,139,209,194, 4,124,234, 16,151, 72,253,138, 85,215,225,212,241,206,179,231,124,254,
+ 11,143,248,215,127,246,151,188,188,184,229,249,179, 7,156,172, 58,158, 60,220,240,222,211,199, 28,239, 54,108,143, 19,143,222,
+218,240,240,225,219,188,247,238, 59,172,123, 33,198,176,184, 87,162,197,103,138, 7, 22,204,234, 73, 64, 74,197,113,128,112, 4,
+216,244, 43,109, 34,109, 58,231,230,246, 64,171,141,220, 38, 82,243, 22,165,155, 44,254,121,210, 74, 29, 70, 96,196, 99,175,165,
+173,122,124, 81,250, 46, 90, 34,155, 54, 52, 67, 45,138, 71, 9, 18, 72,105, 17,219, 22, 71,171,153, 90, 4,205, 51, 33, 54,214,
+126,205, 92,148, 42, 21,209,222,206,131,228,240,186,198,139, 66, 77,248, 44, 20, 22,215,198, 97,198,211, 17,220,242,217,239, 86,
+ 11,115,163,217,152,126,204,244,114,151,147, 17,233,154,241,254,187, 4,173, 69,166, 42,116,171, 72,234,205,137, 19,213, 92, 43,
+206,121,180, 90,104,145, 19, 7,106,225, 70, 74, 51,167,210,146,201, 32, 98,239,151, 15, 1,109, 75, 90,101,176,179, 49,224, 17,
+ 31,121,112,114, 98,123,234,159,241, 43, 23,101, 26, 38,106,201,244,125, 32,221,211, 5,153, 27, 12,135,209,178,206,215, 29, 62,
+165,123,187,116,115, 49,252,172, 43, 19,187,109,143, 79,221,189, 94,234, 55, 83, 99,127,117,197, 52, 94, 67, 53, 23,194, 84, 51,
+197,196, 13, 76, 21,179, 82,250,194,213,126, 38,116, 14,215,102,102,241, 56,233, 88, 53,207,220, 34,115, 39,204,121, 34,164, 66,
+ 84,225,102,184, 33,202,100,159,135, 42,180,177, 80,219, 68, 12, 70,121,173, 83, 69, 92,160, 74,195,233,140,150,105,137,241,246,
+119, 49,180,230,239, 94,132,158, 54, 30,117,119,251, 13, 71,211,188, 28,206,178, 16,208,140,220,230,177,172, 99,239,101,177,171,
+ 5, 19, 85,181,138, 54, 33, 56, 71, 86,247, 38,163,215,114, 14,204, 82, 38,222, 46,242, 86, 13, 22, 19,124, 88, 46, 33,104,226,
+ 8,106, 42, 98,239,127, 26,249,169,173, 33,173,162,213,177, 8,237,233,196, 27,230,114,121,208,125, 93,148,198,152,151, 23,109,
+230, 77,199, 10,137,102,237,191,141, 70,199, 98, 99,245, 96,146,108,183,132,215,180,170, 4, 60,222,233, 50,178,110,118,245, 59,
+165,104,166, 39,224,131, 51,247, 30,209, 98,102, 69,108,191,223, 38, 90,136, 80,132, 38,133, 60, 90,247,232,112, 52,181,200,211,
+224, 34,173, 26,143,123, 40,153, 13, 7,166,210,120,113,230,136,167, 29, 47, 95, 95,241,224,241, 49,207,146,162, 33,209,169, 67,
+230,107,152, 7,124,234, 73, 15,190,200,103,103,127,205,203,243, 87,228,105,194,225, 13, 54,227,140,216, 54, 47,136, 88, 81, 40,
+170,180,214,104, 56,219,191,174, 55,164,174,167,228,137,113, 26,153,115,166,149,121,153,200, 88, 92, 96, 16,140,122,215,204,175,
+ 30,227,138,211,163,135, 28,111,119,204,109,224,236,226,140, 24, 58,188, 56,118,219, 29,175, 62, 62,227,250,242,192,245,197,245,
+162, 94, 15, 72,202,140,193,225,218, 93,168,142, 21, 91, 18,148,236,173, 11, 78, 62, 33, 93,100,179,219, 48,141, 35,211, 60,211,
+ 74,102,206,149,195, 56,211, 90, 49, 26, 93,127,204,131,211, 99,134,225,134, 33, 55,130, 52, 46, 46, 95,115,241,255,178,246, 38,
+ 63,182,166, 91,122,215,111,189,221,247,237, 46,154,211,103,158,108,171, 50,111,111, 76, 25,170, 92, 50,133, 4, 46,171,140, 96,
+ 98, 23, 66,194,136,110,104,129, 24,152, 9, 67,106,128,248, 11,144, 60,131, 49, 66,162,145, 65, 32, 33, 6, 22, 20, 24,227,194,
+229,219,223,186,183, 50,239,189,153,121, 50,243,116,209,237,189,191,230,109, 22,131,245,197,201, 50, 24,123, 80, 39,164, 80, 28,
+157, 19, 25, 25, 17,123,239,247, 93,205,243,252,158, 23, 47,120,244,240, 1,187,221,137,161,108,111,174,152,154,167,230, 70, 25,
+ 76,185,172,193,241,197,213,196,119,190,241, 1, 63,253,163, 79,153, 26,244, 30, 10,158,148, 34,125, 73, 11,198, 85,113, 97, 69,
+ 10, 17,231,148, 94, 86,175,210, 11, 5, 99,154,223,166,238,105,201,139,245,177, 49, 15, 22,122, 84,180, 34,222,114,159,107,179,
+217,153,162,196, 46, 18,154,208,212, 58,103,191, 76, 74,126,243,159,251,109,118,105,197, 39, 31,255,152,195, 52,225,176,202, 59,
+122, 99,219,123, 12,164,212, 68,169, 73, 8, 53, 80,231,202,203,105,143,111, 74,215,173,161, 5,168, 32,189,112,189,207, 28,135,
+ 76,205,166,230, 62, 59, 95,243,181,247, 30,112,117,121,224,242,120,131, 74,162,228,145, 78, 21, 66,133, 16,113,189, 99,215, 39,
+124, 85,142, 67,102, 30, 14,228,150,105, 56, 82,179,181, 66, 23,140,194, 40,193,242,184, 63,254,233,199,124,252,211, 47,232,215,
+ 91,134,195,140,158, 20, 98,240,156,172,132,251,111,222, 39,244,143,184,115,231, 49,119, 54,119,249,248,211, 79,248,209,247,254,
+ 62, 90, 60,190, 15, 68, 45,118,102,212,138,138,231,238,189, 51,254,169, 95,251, 38,111,124,248,216,250,181,250, 83,240,223,176,
+253, 54,107,222,122,231, 62, 79,159,189,100,122, 82,233, 42,236,213, 33,110, 66,147, 71, 22, 95,179, 46,197,186,184,138,203,129,
+118,147,129,134, 76, 75,163, 66,192,121,135,182, 66,141, 17,223,214,200,156, 17, 29,241, 84,170, 38,156, 20,178, 52,198, 73,240,
+ 97, 66, 90,198, 15, 32, 29, 86,160,229, 61, 18, 70,134,169,177,233,148,210, 5, 18,145,161, 30,241, 93,164, 87, 79,174,224,164,
+163, 78, 66,145, 9,239, 34,205, 9,116,182,230, 8,206, 70,228, 83, 19, 98,237,168,146,201, 5, 68, 71,104,206, 50,211,179, 81,
+253, 11,137, 78, 51,147, 52,142, 90, 89,247,209,180, 28,226,240, 42, 72, 85,156, 23, 66, 23,173, 96,119, 6, 72,162, 51,209,176,
+182, 70, 85, 35,206, 9,144,186,215, 99, 59,171,173, 89,134,132,234,107, 13,114,169, 69,145, 90,111, 77,223,175,245,210, 45,173,
+161, 90, 95, 89,182, 95,247,155, 54,101,170, 86, 56, 54,201, 76,197,248, 19, 85, 43, 20, 97,189, 76, 56,178, 52, 98,108,148,166,
+116,174, 35, 72,134,236,152,214,149,105,127,164,142, 2,101, 36,183,200,161,152, 11,236, 88, 76,255,213, 69, 79,140,153,121,106,
+ 92,207, 25,102, 32, 70,188,206,104,129, 68,162,134,204,205,116, 3,205, 17, 28,139,245,203,181,165, 11,118,175,172, 0,218,140,
+209, 46, 53,224,156, 46, 52, 47,163,146, 89,156,167, 46,193, 20, 75,117, 47, 86,253,154, 8,107,161,179, 81, 22,239,187, 41,222,
+ 85, 45,132,162,212, 66, 83,219,149,107,168,214,113,227,201,203,206, 89,156, 77, 4,212,129, 18, 22, 5,175,141,232, 91, 48,255,
+180, 23,103,152, 68, 4, 81,219,167,219, 11,200,196, 36,174,205,168, 23,186, 16,108, 93,220, 20,241,150,206,214,170, 21, 2,222,
+ 39,212,123,188, 98,150, 40,175,166,190,151,165,240, 80, 11,164,137,209, 80,182,130,208, 18, 48, 54, 27,121, 57, 65, 91,164, 73,
+ 70,180,226,189, 9,144, 82,176,238,255,242, 56, 50,102,203, 48, 39,218, 90,129,214, 72,105,197,122,125, 74,112, 66,206, 35,210,
+ 2,159, 93, 8,195,116,201,201, 58,114,218,219, 97, 21,207, 31,226, 99, 67, 71, 79,211,142,110,245,128, 97,130,223,255,195,239,
+114,147,139, 61,121, 68, 45, 6,214, 9,245, 22, 13,170, 95,217,199,186,126,195,106,179, 35, 38, 79,128,175, 46,113,177,239, 81,
+124,178, 78,191, 85, 2,150,218,215,196,194, 88,188, 8,201,123, 78,119, 59, 30,255,202,135, 56,217,243,238,248,152,155,253, 0,
+ 18,184,247,240,148,235,103, 79,184,184, 62, 90,200,139, 40,165, 53, 74,201,200, 77, 37, 38, 79,148,106,169,120, 62,217,243,162,
+ 41, 69,103,138,122, 92,157,109, 26, 18, 2, 49,120, 98, 56,181, 92,244,155, 35, 57, 27,143,111,179,237,184,119,114,202,149,171,
+132,121,230,162, 24, 19,253,120,188,226,242,112,195,246,238, 93,164, 68,198,113,166, 73, 7, 14,174,142, 35,207, 62,255,146,243,
+205, 35,186,213,138,124, 16,126,254,243, 47,200,173, 34,190,163,148,137, 99, 25, 25, 90, 33, 34,116,190, 35,172,150,149,140,115,
+184, 90,105, 41, 80,201, 80, 26,226,195, 87,142,130, 92, 45,103,187, 97,220,132, 82, 25,230, 25,223, 37,106, 19,114, 29,201,173,
+144, 75, 97,154, 43,235, 20,105, 82,241,193,115,247,206, 9,143, 31,253, 42,223,120,235, 67, 62,250,248, 7,104,178,108,112,245,
+ 17,183,140,127,163,139,204,227, 12,209,211,156, 16, 5, 86, 93,199,179,124,201, 92, 10,155,176, 33,185,142, 16, 59, 90,204, 76,
+ 89, 41,135,137,211,147, 83,196, 55,118,125,199,230, 52, 66, 15, 63,253,252,153,169,199,203, 68,171, 3,181, 95,211, 57,193,177,
+102,116, 7,203, 46,112,133,221,137, 39,247,137, 25, 37, 31, 15,212, 50, 17,124, 68, 48, 48, 82, 72, 61,207,159, 94,241,197,197,
+ 19, 66,240,184, 2,227, 85,225, 51,191,199,197,200,221, 71, 91,210,106,205,233,246,132, 77,140,124,255,251, 63,228,111,253,143,
+255, 59, 63,254,232,167, 68, 39, 68, 31,217,122,112, 41,210,170, 57, 27, 30,220,127,155,156, 61,255,244, 84,121,248,238,155, 68,
+169,176,254, 25,196,111, 2,107,206,223,250,117,222,187, 86,158, 62,253, 17,163, 10, 41,192,236, 59,242, 88,137,201, 58, 91,191,
+218,154,110, 70,102, 90, 16,220, 12, 93,232,208,216, 27, 70, 87, 50,185, 4, 98, 88, 65,104, 8, 19,185, 88,145,102, 96,106, 59,
+215, 36,108, 9,109, 96, 47,166,142,207, 52,188, 43,196,193,188,227, 67,169,132,218,200,206, 81,210,128,171, 61, 73, 86,176,242,
+ 54, 94, 31, 26, 49, 40,210, 9,169,174,141, 81, 81, 20,237,108, 2, 88,115,166, 75, 61,107, 81,230, 38,236,135, 69, 39,210, 59,
+228, 0,178, 74,244,179,217, 59, 71, 61, 18,125,196, 73, 68, 85, 57,222, 12,156,244,145,208,121,156, 4,107, 64,154,129,183,106,
+ 3, 45,217, 44,199, 62, 34, 33, 32,222,104,153,234,141,241,145,250,248,154, 46,117,181,130, 85,219,107,195,206,222, 22, 11, 54,
+177, 93, 86,175,175,145,246, 86,115, 53, 96, 24,202,235,190,210, 21,200,217,146,216,124, 47,228,217, 65,203,120,113, 76, 71,163,
+ 20,116, 17, 14,131, 64, 21,180, 11,184,195,192, 84,170, 5,123,141, 7, 40, 9,169, 51,226, 34,142, 68,190,201,184, 60, 35, 46,
+ 83,252,154, 80,130,221,105,101, 36, 36,208, 26, 33,101,234, 84, 12,121, 94, 27,199,169,224,156, 77, 47,171, 54, 2,173,208,156,
+162, 34, 72,243,139,104,169, 45, 8, 81,243,162,183,101,140,174,218, 12, 80,179, 8,230,230,106,222, 72,183,176,208, 75,169, 54,
+ 50,174,230, 13, 55, 90, 98, 69,125,164, 41, 72,153,208, 16,151,241,174, 16,157,249,222,125,245,102,185,114, 13,105, 66,240, 54,
+ 41,184,221, 33, 33,166,122,215, 91, 49,117, 21,163,218, 46, 15,147, 46,214, 57,243, 67,155,200, 75,243,180,236,131, 3, 62, 52,
+ 90, 85, 74, 19,250, 40, 75,174,139,237,205, 67,178, 20,167, 82,133,228, 29, 42, 13, 47,142,121, 17,226,165,232,105,139,207, 88,
+213, 17, 98, 96, 33,215, 19,196,190,166,184, 66,242, 66,174,102,177,179, 17,182, 67, 93, 34,246, 43,188,119,230,165,207, 35,177,
+239,208,180, 33,118, 9,231, 96, 27, 19,251, 57, 51,150,137,185,206,188,156, 35,219, 4,125,167,172,238, 61,224,173,183,222,161,
+ 12,151,124,116, 13,215, 67,227, 27,119, 30,241,209,207,190,199,143,127,241,130, 86, 23,200,187,130, 90,223,177,164, 77, 97, 72,
+ 82,239,217,237, 78,217,109,182, 4,148,105,154, 81,148, 92, 27, 57,207,104,107, 52,138, 65,122, 52,162, 24,136,165,214,130, 54,
+ 33,164,158, 77,234, 17,215,152,162,231,252,108,199,112,115,228,238,195,251,156,111, 6,252,106,199,251,239, 60,228,127,250,227,
+ 31,113, 51,206,196,148,172,240,242, 6,146,209,230,168,121,121, 92,231,134,247,149, 73, 64,196,246,148, 49, 24,104,166,150,145,
+222, 37, 98, 8,148, 50, 51, 30, 51, 14, 71, 76,102, 47,220,158,157, 18,250, 72,210, 21, 94,132, 67,172,140,135, 17, 17,232,250,
+ 68, 31, 3,178, 59,193,191,120, 78, 83, 71,116, 29,125,223,211,202, 68, 30, 95,178, 58,127,147, 63,252,225, 31,115,121,177,183,
+149,143,100,164, 12,116, 62, 66, 44,208,204,246,117, 43, 12,149, 90, 13,181, 91,150,188,232,141, 67,180,210,198,153,161,100,188,
+ 23,106, 83,114,205, 72,131,113,158,105, 45, 19,170, 39,163,148, 57,243,232,222, 41, 95,255,240, 33, 79, 95, 30,248,201, 79,158,
+224,137, 56, 81,222,120,120,151, 63,247, 27,255, 60, 55,215,123,158,189,248, 28,164,177,234,253,130,155,140,140,109, 98, 22,103,
+160, 23, 53, 78, 67, 81, 43,140, 53, 11,174, 84, 92,239,201,177,199,123, 79,231, 20, 13, 86,116,196,196,146,154, 88, 89,199, 13,
+207,159, 94,242,228,233,133,177, 23,104,164, 16, 13,132, 35, 25, 47,153,132, 16, 34, 28,103, 27,235,167, 96,235,132,176,238,105,
+ 53,226, 23,218, 95,171,166, 14,255,248,243, 47, 16,157, 9,169, 39, 59, 8,173,241,249,139, 35,215, 55, 19, 62, 57,126,227,215,
+239, 48, 78,133,191,251,251,127,135,255,249,247,127,200,213,213,158, 77,232,169,210,112,190,103,246,141, 40,129, 24,148,190, 63,
+225,108,183, 38,208,248,249,151, 79,248,226,226,200, 38, 69, 30,189,113,135,243,247,214, 32,239, 3,103,156,159,221,161, 75, 27,
+114,184, 38, 22, 69,166,197,190,170,160, 67,163, 76, 35,132,158,234, 3,206, 87, 60, 30,113,142,148,140, 43, 81, 7, 71,110, 25,
+113, 1, 29, 11,234,183,180,118,160, 87, 27,179,207,177, 33, 98, 44,253, 85,191,226, 58,207,184, 90,145, 56, 82,203, 17,117,153,
+ 66,196, 21,193,165,104, 75,165,131,210,214,141,232,123,234, 44, 48, 85,252,102,131, 84,136, 35,196,147, 70, 11,194,248, 98,192,
+133, 74, 58, 49,106, 95, 44, 21,233, 44,144,182,175, 91,230,232,217,184,194,126,156,104,215,151,100,233,200,222, 40,143,115,168,
+172, 85,233,157,167,249, 14, 13, 54, 73,117, 90,205,189, 98, 74, 61, 84,205,198,102,114, 25,181,145,189,115,136,143,228,162,116,
+190,161,179,173, 8,255,180, 23, 88, 41,150,131, 96,112,169,215,123, 65, 54,173, 4,177,245,225,235,164,201,149,218, 40,173,144,
+ 68,145,240,122,195, 92, 50, 80,134, 9,173, 51, 50,102, 35,140, 6,115,139,197,149,225,124, 39, 28,205, 77,204,185,145, 68,200,
+161,103,158, 10, 77,108,205,168, 28, 89,169,103,156, 5,105, 70, 4,108,206,163,178,166,186, 74,209, 75,146, 11,204, 46,208,198,
+ 76,234,172,243,143,125,207, 84, 13, 69, 29,187, 64,137,107, 74,155, 72,162,132, 38,214,141,181, 42,203, 30,219,186, 81,116, 9,
+ 68, 80,181,202,207,121, 88,114,206,181, 45,250, 38,177,142,119,217,138, 47, 35,102,243, 7, 55,113,120,127,139,100,181,127,211,
+224,209,102, 12,222, 40,130, 52, 71, 67, 25,107,193, 75, 90, 80,126,141, 86,170,197, 30, 6,179,171, 53,109,102,135, 18,165, 73,
+ 67,212, 47,162, 58,251,255,214,214,192,155,138, 28,215,200,197, 50,165, 10,198, 80,183, 95,150, 1, 0,180,121, 36, 58,131, 58,
+ 52, 99,185,187, 16,104, 82,200,173,210,102, 37,121, 11, 66,104, 40,170,149,160, 11,112, 34,221, 70, 93, 26,119,186,184,138, 95,
+ 8,118,178,168,250,167, 98,138,216, 32,138, 74,101,119,118,135,243,211,103,124,242,249, 75, 52, 68,114,174,164,100, 30, 69, 47,
+129, 22, 61,121, 12,164, 94,144,150,217, 31, 38,254,232,179,145,146,214,252, 11, 31,188, 67,215, 69,180,110, 25,198, 27,134,208,
+ 83, 53,243,131, 31,126,151,163,222, 34, 21, 3,173, 21,180,150, 87, 49,160,218, 42,162, 16, 92, 71,138, 17,234,204, 97, 28, 56,
+ 78, 51, 49, 69,188, 11, 32,144,243,108,211, 25,205,248,208,225, 67,176, 4,183, 42,204,173,144, 82,100,183,237, 40,115,230,108,
+189, 51, 71, 65, 54,174,251,148,161,223,192,147,207, 62,230,226,122,192,247, 30, 74,163,239, 59,106, 83, 74, 25,205, 95,235,212,
+ 4,112,226, 13, 48, 81, 10, 65, 27,222, 11, 71,102, 66,140,116, 11,111,219, 45, 2,174, 57, 47,151,152,107,184, 6,235,212,113,
+ 60, 30, 57,223,158, 48,132,192, 29,224,201,176,167, 9,120,117,212, 82,152,199,145, 92, 12,195, 21, 55, 59,206,206,238, 50,207,
+215,204, 2,209,247, 76,115,198,165, 72, 84,200,109,102,170, 3,181, 53, 78, 54, 59, 74,155,153,180, 49, 78, 25, 21, 71, 31, 45,
+ 84,162,148,138,139,102, 39,201,211, 72, 41,141,232,189,141,218, 91,195,169,231, 56, 77,160,158, 85,138, 54,161,168,141,166,142,
+247,222,190,203,191,246, 87,127,155,243,179,251,252,205,255,226,191,229,111,255,175,127,192,182, 63, 97,123,254, 62,219,147,187,
+252,226,151, 63, 48,171,167, 52, 66, 72, 12,147,185, 76, 92,179,188,231, 32,145,220,160, 11,137, 50, 87,142,251, 3,101, 62, 16,
+189, 35,164, 53,205, 7,154,107,168, 4, 58,160, 70,108,207, 31, 10,243, 84,185,188, 24,249,236,201, 21,199,189,199,251,153, 90,
+ 71,162, 11,104,157,152, 75,165,143, 13,231, 28, 57, 43,142,138,147, 68,117, 51, 14, 33,245, 61, 53, 55,106, 86,166, 50, 17, 67,
+143,230,153, 86, 51, 62,173,160,154,134,165,184,200,221,179,200,221,147, 29, 79,159, 29,248,195,191,247,199,188,188,170,252, 31,
+255,247,207,169,181,208, 4,149,164, 3, 0, 0, 32, 0, 73, 68, 65, 84,173, 60,100,107, 18,212, 9,117, 81,109, 23,233, 56,223,
+108,184,251,248, 28,233, 96,222,103,202,250, 37,135,185, 49,125, 10,135,227,129,183,190, 6,196,135,244,171, 14,113,144,102,101,
+ 14,158,131, 22,227, 70,204, 14,239, 70,186,206, 68,141, 1,207, 60, 13,102, 39, 12, 43, 66,116,212,121,102,164,225, 87, 66,148,
+ 66,110, 13, 13, 19, 49, 36,142,243, 17,113,129, 92,109,157,163,147,163, 76, 21, 23,160,198, 2, 45, 49,231, 74, 74,142,168,141,
+224, 2, 45, 87,178,119,168, 19,198, 5, 17, 27, 84,152, 90, 68, 75, 38,246, 29,227,108, 4, 62,209, 3,222, 53,164, 4,202,228,
+104,203,180,177, 30, 97,189,243,104,152, 8, 49, 50, 22,135,246, 9,175, 71,106,232,104,181,226,107, 37,109,183, 56,157,153,166,
+204,122, 19, 33, 64, 46,203,152,221, 41,218, 44, 82, 25,103,186, 33,151, 2,161, 57, 26, 29,170, 86,220,251,232, 41, 14, 62,125,
+242,130,211, 93,198, 69,139,114,246,209, 35,222, 47,142, 31, 19, 70,203,226, 10,250,127, 91,213,100,177,129,181,170,148,105, 66,
+171,113, 20,244,118, 92,254, 58, 46,223, 90,121,229,203,121,141,227,119, 43,148,205,185,147,162,188,118,166,188, 46, 23,123,117,
+ 51, 5,135,115,137, 60, 29, 64, 76,175,210, 43, 28,138, 50,187, 66, 23, 2,199, 67, 38,119, 10,157, 82,110, 26,126,101, 64, 52,
+157, 21,207, 76,141, 51,174,245,144,148, 54, 79,164, 10, 53,110,168,154,153,219, 76, 44,129, 16, 27,140,141, 34, 71,124,132,182,
+238, 73, 94, 9, 67, 97,214, 21,193, 23,219,169, 27,138, 85,113,203, 78, 86,219,146,109,190,136,222,188, 0,213,112,175,150,108,
+101, 57,230,150,112, 85,109,204, 81, 28,209, 25,202, 48, 55, 83, 96, 59,177,184, 72,244, 54, 34, 85,190,138,205,177,137,132,237,
+147, 80, 2,213,252,151,206,163, 98, 23,184, 56,251,164,132,163,170,163, 46,150, 19,195,183,218, 1, 26, 92,128, 86,236,243,189,
+160,206,209,121, 40, 78,241,248, 5, 64, 99, 88,214, 69, 90,103,193, 31,213, 89,244, 98,109, 11,233,203, 83, 91,193,123,165, 69,
+219,247,107, 83,116,170,212, 32, 36,177, 2,161, 57, 83, 71,163,182,215,171,169,146,196,145, 43, 12,121, 98,221,117,180, 2, 57,
+ 41, 65,109,191,249,206,189,115,158, 62,189, 96,174,149, 1,133,105,192,187, 53,135,121, 79,110,145, 82, 26, 93,127,202,201,118,
+ 5,231, 70, 86,186,113,247,120,126,241,156, 52,125, 78,215,189,197,251,191,250,171,156, 61,120,196,139,207,190,207,143,127,249,
+ 2,230,140, 74, 91, 2, 66, 42,170,213,236,111, 33, 80,139,177,221, 17,101, 30,246,100,103,185,240,125,191, 70,181,144,243,188,
+216,172, 4,173, 38, 96, 44,101,162,182,140, 11, 61,136,176, 94,111, 73,206,113, 56, 30,145, 38,136,244,188,124,249,146,213,166,
+ 39,224, 57, 72,134, 86,249,244,201, 39, 28,167, 17,178, 82,107,229,206,157, 7,220, 63,187,207,143,126,242,125, 14,211, 96,138,
+113,109,244,105, 69,234, 34,181,217,222,183,168, 81,189, 74, 41,204,192,189, 55, 31,114,186,221,114,241,244, 37,170,149,105,174,
+ 52,173,244,253, 6, 23, 26,135,171, 35,247,206,214, 60,191,184, 54,120,136,154, 29,168, 52,225, 56,140, 12,195,193,214, 36,222,
+ 33,154,233,188, 16,253,150,195,213,196,225,236, 64,223,117,164, 4,215, 87, 7,166,225,192, 80, 50,121,174,140,211, 68, 23, 59,
+210, 54,176, 78,189,101,201, 99,142,138, 16,160,214,137, 49,155,136, 12,143, 37,154,209, 44,180,165, 26,200, 40, 4,199, 92, 11,
+173, 22,206,118,107, 78, 55, 27,158,190,188,225,231, 79, 62,227,195,119,127,149,191,246,187,191,195,143,127,244, 83, 30,189,251,
+ 29,126,253,215,255, 60, 47, 95, 60,161, 77, 3, 43,239,200,217,225, 37,224,219, 0,107,135, 47, 43,242,176,103,212,130, 72,164,
+100,101, 28, 50,173, 78, 84, 38, 98, 92,225,215, 61,125, 19,114,139,184,128,141,213,179, 82,188, 66,246,220, 28, 38,158, 94, 28,
+208, 92, 17,191,130, 54, 33, 75, 88, 81,159, 2,201,109, 25,134, 3, 62, 56,180,130,119, 66, 22,165,181, 64, 80,165,204, 5,205,
+ 86,128,181,214, 32, 5,100, 73, 69,107, 45,160,174,225, 35,132,206,209,175,123,238,221,219,177, 31, 60,255,219,223,125,194,245,
+152,105,190, 18,181,217,104,178, 85, 19,197, 57,219, 45,139, 38,118,235, 19, 54,155, 19,246, 71,207, 39,159, 85, 30, 63, 12,244,
+235,132, 56,184, 25,158,113,124,113,198,205, 63,248, 62,231,103, 63, 96,179, 62, 99,214,204,190, 85,162,122, 66, 2, 38, 69, 74,
+198,173, 10,121, 20, 82,179, 51,136,148,112, 25,122,239,144,201, 32, 86, 65, 28,101, 26,153, 66,193,251,136,211,137, 89, 3, 1,
+ 79, 8, 75, 51,115,172,180, 88,200,161,179,137,213,104,163,252,237,218,145, 7,135,172, 18,196, 68, 57, 30, 88,165,206,200,114,
+ 57,224,134, 66,149,229, 66,174,149, 81,214, 80, 11,206, 41,211,161,226,214,107,194, 44,232,228,113,157,224,221, 64,157, 3,121,
+ 62, 34,154,113,165, 49, 28, 10,155,174, 71,195, 25,197,195, 38, 52, 74,139,184,208,200, 26,112,213, 24, 15,101,110,116,183, 43,
+ 60, 49,221, 72,197, 17,146,197,250,214, 25,146,115, 84, 45,196, 96,103,183, 56, 71,140, 29,178,187,195,156, 18, 65, 76,220,235,
+218,210,229, 99,204,140,219,192,161, 91, 66, 29,183,123,249,106,241,217, 77,155,217,145,235,114,230,208,184,184, 26,216,100, 93,
+ 80,224,134,192,118,126,209, 92,233, 82, 28, 44, 5,130,252,137, 52,202,127,212, 72, 63,143, 19,181, 84,154, 91,196,216,175,233,
+238,173,149,101,173,216, 22,178,232,107,246,168, 55,236, 28,157,138,185,189, 90, 99, 30, 50,210, 50,174, 5,166,170,120,205,116,
+ 46, 48, 81,137, 65, 9,185, 49, 42,184, 0, 50, 28, 8,163,208,238,238, 24,175,110,104, 99,196, 79,153, 76,129,184,166,247,149,
+169, 22,218,190,210,173,132,236, 3,165, 90, 28, 49, 20,164, 69,156,116,140,227, 13,174,122,210,230, 30, 91,255,194, 26,214, 34,
+109, 9, 5,104, 11,117, 76,150, 49,136, 24,203,176,122,102,169, 11, 73,203,163,106,194, 56,117,186,112,224, 45,185, 76, 17,242,
+108,229,157,248, 70,201,109,201,240,118,230,223,107,150,103, 94,213, 80,173, 42, 66,244, 98, 23,179,218, 97,105, 64,216, 37, 58,
+178, 84,252,130,147, 47, 57, 35,152,205,201,184,229,203,222,168, 85, 66,180,255,162,106, 33,104, 48,216,138, 90,106, 90, 12,102,
+ 9, 17, 89,180, 0,106,106,112,171, 84, 26,130, 5,180,212,102,144, 25,175,144, 9, 84, 49,133,122, 39,193, 72,121, 46,216,174,
+ 90, 10, 65, 28,117, 89, 71,184, 86,152,113, 70,186, 10, 97,121,145,100,168, 66,109,194,196,145,213,217, 9, 39,187,158, 47,158,
+ 31, 64, 34, 72, 36,248,132,151,132, 40,196, 20, 24,166, 27,156,203,188,245,240, 29,130, 4,222,250,206,175,241,173,239,188,203,
+225,226, 41,251,253,158,195,151,159,241,242,179,159,240, 7, 63,252, 30,215,163, 61, 22, 85,213,158, 76,170, 52,181,199,207,161,
+180, 98,226, 45, 87, 27, 85,148,206, 37,186,205,150,224, 3,211,120, 68,219,204,118, 19, 40,173, 49,141, 19,121,217,177,123,196,
+198, 66, 33,176,238,172,251, 24,231,145,216,111,217,244, 9, 92,197,183, 30,164, 18,150,168,200,203,171, 43, 74, 89, 28, 7,192,
+205,245,129,175,127,237,107,188, 59,188,195,143,126,242,179, 69,131, 33, 16, 28,223,252,206, 55, 56,233,123, 46, 94, 94,178,191,
+ 57,112,117,125,201,211,231,207,193, 11, 15,239, 62,224,237,199,247,225,107, 31, 48,238, 7,110,110,174,249,228,211, 79,184,217,
+ 23,230,253, 64,244,112,121, 56, 48,141, 32,154, 57, 78, 3,226, 29,125,236,113, 26,168, 10,125,138,172,187, 68, 12,189, 89,149,
+182,137,241,248,146,139,207, 44,112,103,127,179,231,249,139,231, 76, 83, 6, 28, 62, 69,230,185, 80,231,204,126,244,108, 55, 43,
+ 58,231,153,106, 35, 43, 4,181,140,100,164,190,138, 93, 5,139, 21,110, 13,124,115, 20, 10,165, 10, 83,158,240,226, 88,119,145,
+ 63,243,237, 7,252,253,239, 61,225, 15,254,175, 31,241, 43,239,188,207, 55, 63,248, 58,127,249, 47,253,139, 12,245,132,224,122,
+198,203, 11, 82,105,184,228,152, 60,204,243, 96,222,226, 16, 9,206,115,147,133, 58, 43, 74,177, 44,109, 15, 58,217,244, 41,174,
+206, 41, 37, 25, 42,203, 85,243,101,123,199, 56,100,134, 50, 46,211,175,184,112, 34, 20, 31, 19, 65, 3,195, 92,169, 94, 9, 49,
+113,255,206, 67,166, 86,121,250,249,167,203, 62,218,163, 57, 19,188,183, 44,185,166,116,222,166, 74,125,191, 33,134,158,185, 94,
+ 81,105,104, 57,226,124, 96,149, 78, 56,221, 69, 68,225,187, 31,189,228,250,112,228, 48,212, 87,212,198, 90,231, 37,226, 23,154,
+ 55, 70,130,180,196,157,179, 7, 60,186,247, 6,155,179,192,163,147,158,210,132, 95, 62, 63,242,120,149, 56, 59,223, 49,236, 95,
+160,195,129,233,234,192, 23,159, 21,210,234, 37,135, 60,131, 95, 49, 14, 51,218,135,101, 45, 55,162,197, 47,137,104,202,160, 19,
+204,222,248, 18, 65, 24, 25,104, 37,208,187, 13,158,138,143, 27,170, 38,142,135,193, 4,116,222,184, 26,136,167,239,122,230, 84,
+ 40,213, 47,136,224,158, 68, 67,104,136,132, 5,113, 61,147, 82, 79,105, 19,110, 74,230, 83,151, 68, 99, 32,137, 99, 44, 30,173,
+141,224,237, 82,236,220,218,176,217,109, 68, 81,106,105,168,115,132,174,195,213,129, 57, 57,186, 10, 61, 61,185, 78,116,155,142,
+168, 19,115,234,240, 45, 80, 14, 13, 31,204, 90,220,170, 7,173, 84,239,160, 22,163,138,137,237,253,107, 85,156,170, 21, 99,139,
+238,105,182, 58,140,152,149,187, 15,118,188,245,230,217,255,111,167,121,251, 81,249,135,239,220,162, 44,107, 87,187,120,199,253,
+ 72,189,153, 77,151, 36, 66, 11,145,129,100, 5, 66, 53, 64,166, 43,183,144,171, 91, 84,237,130, 28, 95,244, 59,218,204, 98,251,
+ 42,237,173, 53,230,121,164,212,140,168,146,171,240,236,233, 21, 93,215,153,243, 69, 12,101,125,107,165,230,150, 63,249, 39,238,
+102,113,242,170, 89, 84, 93,236,126, 98, 25, 38,195,113, 38,207, 71, 67, 80, 87,133,121,132,228,151,239,235, 79, 15,207,153, 43,
+148,105,166, 84,165,169,217, 72,195, 86,104, 71,111,171,236, 60,225, 69,200, 10,117,182,213, 92,108,153,144,149, 57, 22, 82,113,
+ 20, 85,142,229,248,138, 73,144,189,218, 84,172,193, 44, 13,154, 48,107, 35, 20, 71,159, 42,163, 40, 20,101,118,183,193, 93, 74,
+112,150,236,153,135, 3,103, 49,227, 31, 60,122,248,123,222,133,197,198,102,135,151,138, 95,130, 3,150, 42,240,182,189, 94,148,
+143,183,151, 47,226,190, 34,209, 97,187,233,133,202,106, 66, 58,181, 11, 95,151, 75, 94, 23,219,148,168,169,202, 87,169,179,224,
+ 11, 53,242, 91,109, 74,116, 14,213,106, 23,214, 98, 73,105,234, 22, 21,178,195,123, 12,107, 42,193,198, 70,218, 44,130,209, 41,
+ 78,130, 65, 75,104, 36,139,102, 55, 85,120,144,101,236, 47,184,102,169, 89, 96,187, 99,239,156, 41,100, 29, 8, 6,198,175, 82,
+137,222, 68,100, 78,176,253, 48, 54, 70, 12,201,219,180,194,155, 71,190, 45,191,120, 28,120,156, 9,226, 22,177,153, 81,245, 60,
+ 49, 38,106, 25,121,126,113,133, 72,100,189,222,208, 5, 71, 43,153,174, 91,113,239,193, 3,250,205, 9,170,149,235,171, 75,234,
+ 48,113,247,108,203,131,251, 15,185,255,246,187,188,241,238, 7,228, 44,124,242,233, 47,249,201, 39, 31,243,252,217,149, 85,190,
+209,219, 67,180,128,128, 74,177,195,239,235,223,254, 22,247, 31, 62, 34,117, 29,211, 56, 24,199, 91, 27,227, 52,146, 23, 26, 84,
+244,176, 90,245,156,238, 54,244,169, 71, 85, 88,237,118,156,156,159,176, 89,239,216,118, 61, 77,149,185, 40,119,223,120,135,135,
+247,206, 77,172,184,106, 12,211,145,208,237,208,241,146, 95,252,242, 51,166,209,162, 38,213, 65,169,149,251,247, 31,242,198,155,
+111,114,189,127,193, 48,205,164,184,162,204, 51, 33,194,227, 55, 30,242,248,237, 55, 57,223,109,249,242,139, 39,220, 28, 6,112,
+142,151, 23, 23, 60,249,236, 9,187,147, 19,222,120,248,208,162, 34,155, 26,243, 29, 97,174,133,227, 48,129, 56,110, 14,123,174,
+174, 15,172,214,107,222,120,243, 62,119,183, 59, 82,180, 24, 92,159, 12,189,219,196,115,125,115,195,229,205, 5,157, 19,174,111,
+ 6, 78,238, 60,224,229,203, 23,148,102, 23,161, 29,148, 66,173,102,255,203,165, 80,166, 98, 33, 68, 18,113, 98, 1, 45,173,129,
+ 20,133, 38, 12,243, 76,201,213,220, 21,185, 46,217,210, 86,124, 58,113, 28,198,137,171,235,145,155,235,137,144,148,247, 62,120,
+204,183,190,253, 53,226,234,156,139,203,198,112,113,193,148,143,236,247,123, 92, 16,178,216,228, 39,186, 0, 45, 82,242,196,156,
+ 51,165, 88,219,100, 41, 83, 19,101,158, 72, 33, 17,250, 13,222, 11,222, 55,164, 21,234, 88, 40,181, 49,204,149, 86, 44,244, 36,
+136, 17,186, 42,153,237,106, 69,140,129, 92, 7,218, 56,210,180,177,233, 58,222,125,252, 54,155,211,251,236,135, 61,165, 14, 4,
+231, 8, 18,150,253,230, 66,123,212, 74, 90,237, 16,239, 32, 79,148, 90,205, 97,239, 3,190, 58,166,185,240,226,122,230,234,242,
+200,116, 28, 9, 73,105,165,216,254,181,217, 36, 32, 72, 71, 21, 19, 97,238, 54, 39, 60,126,244, 62,247,222,190,199,174,131,221,
+249,142,187,247,119,196,216,179, 61,181,204,129,146, 11,115, 61, 82,134,145,235, 43,161,210,232, 92,227,221,119, 31, 50,236, 51,
+151,215, 7,180, 89, 32, 84, 30, 6,139, 68, 13, 88, 66, 90,131, 78, 4,233,108,218,103,145, 79, 35,213, 53,242, 40, 16,101,153,
+ 52, 57,230, 6,173, 6,154, 88,211,161,179,185, 85, 66,168,212,217,138,225,220, 34, 41, 89,204,110,157, 10,165, 85, 60,149,144,
+ 28,121,202,136, 55, 1, 75,238, 34,174, 90,100, 98,110,133,218,175,104, 56,116,188, 49, 93,207, 18, 88, 37,193, 88, 30,165,245,
+244,201,145,107,123, 5,190,114, 41, 26,251,125,242, 16, 77, 91,164, 96, 33, 81, 75, 98,162, 79,150,119, 33, 44, 46, 26,167,198,
+204,144,136, 72,193, 7,155,136,136, 95, 48,204, 18,120,240,240, 14,235,205, 63, 26, 18, 35,127,226,221, 45,231,246,237,123, 16,
+ 22,129,163, 88,136, 85, 23,201, 83,163,149,194,170, 75, 60,124,120,151,237, 58,177,234, 35,171, 85,100,213, 7,186,206,147, 58,
+139,244, 77,157, 39, 38, 79, 74,129,152, 2, 33,121, 66, 23,240, 41,154, 35,164,143,184, 62,209,188,241,249,117, 17, 25,167,205,
+ 22, 77, 9,245,129,134,163,122, 79, 21, 71,105,194, 92,117, 17,167,218,159,167,220,152,138, 50,230,202, 48, 21,142, 99,230, 56,
+ 20, 14,199,204,229,229,129,195,225,102, 9,137,177,216,220,225, 48, 49, 28, 38,198, 97,102, 60,142,204, 99, 38, 79,153, 60,216,
+223,149,113, 34, 79, 19,101,154,152,198,153, 60,204,148,188, 64,188,166,153,121, 63, 89,128,202, 52, 50, 30, 7,190,120,250,146,
+227,225, 37,195,184, 71, 71,115, 33,169, 52,230, 99, 5, 95, 76, 48, 78, 32,123,135,132,138,159, 7,142,181, 18,187,142, 24, 3,
+ 55,147,208,234,132,159,149,222,245, 20,153, 8, 90,168, 33,224, 93, 68,115, 37,165, 70, 17, 75,127,108, 82,104, 89,240, 45, 17,
+214,188,178,161, 91,127, 42,212, 92,120,127,151,240,247,238,220,249,189,175,124,204, 86,233,249, 37, 64, 64,151,165,138, 91, 46,
+114, 67,163,187,165,250, 90,112, 38,134,144,166,213,102, 35, 95, 28, 34, 16, 23,155, 69, 91, 58,111,135,113, 98,197,155, 71, 92,
+150,125,141,143,158,162, 38,124,233,130, 91,252,204,242,138,191, 87,155,121,149,253,146,115,126,235,163,111,230, 91,179, 31, 8,
+ 11,185,112,222,189, 10,163, 65, 27,205,217,206,188,137, 91, 20,161,246,189, 53,111,150,175,144, 28,174, 45, 69,155, 26, 98,209,
+214, 4,142,232,108, 52, 85, 53, 24, 49, 46, 57,186,219,157,129, 87, 60, 1,137, 66,155,117, 17,166, 4,188, 26, 4, 55,168,199,
+ 5, 79, 86,240, 5,250, 24, 89,245, 61,215,135,107,166,169,145,130,178,233, 87,228, 54,146,235,136,107, 22,247,233,125,135, 91,
+245, 4,223, 49,207,215,252,228, 7,223,229,217,139, 47,233,200,196,205, 57,119, 30,172,248,232,251,127,192, 39, 95, 92,153,149,
+199, 69,250,110,133,119,150,231, 29,119,119,248,215,255,205,191,198,223,248,247,126,151,127,229, 47,254, 38,191,243, 23,255, 89,
+ 90, 59,242,135,223,255,163,165, 42,206,228,178,176,197,113, 84,189,253,157, 56, 98,234,185,123,231,140,147,205,150,180,218,114,
+126,118,194,246,100,199,189,179,123,156,159,158, 88, 50,143,183,181,138, 79, 91,222, 56, 63,227,217,179, 79,121,118,121,109, 47,
+ 74,177,131,135,106, 2,144, 7,143, 31,114,178, 91,115,253,226,146, 90,237,121,115,184, 60,114,117, 24,120,252,246,125,142, 55,
+151,252,224,199,127, 76,189,101,253,151,202, 48, 12,148,150,185,251,232, 17,117,168,140,135, 27,182,155,142,208, 71, 98, 88,209,
+199,142,195,225,136,143,158,225, 56,114,239,238,125,190,246,254,175,112,247,222,150,198, 76,153,103,114,109,120, 15,199,155, 61,
+ 47,159, 63,103,200, 51,207,111,110, 24,143, 71, 78, 78,214, 92,223, 92, 47, 74, 91,165,212,106,153, 7, 77,161,154, 37,173,121,
+111, 48, 15,105, 70,137,107,182,218,192, 59,180, 86,230,146,151, 40,219, 74, 94,138, 94, 89, 10, 92,113, 30, 26, 28,110,102,124,
+ 16,250, 46,240,248,225, 29, 78, 54,247,120,242, 44,114,125,117,164,140, 95, 50, 92, 31,237,113,168, 21,239, 61,211, 52,113, 51,
+141, 20,173,228,169, 48, 59,103, 36, 69,133, 92, 42,195,176, 39, 32,164,213, 22, 33,225,157,210,106,166,228, 76,169,150,220,229,
+131, 46, 45,151, 91,132,156,134,151,245,253,154, 16,133, 90,143,204,211,136, 84,216, 31, 15, 56, 31,184,119,255, 62,226, 26,195,
+112,164,210,200,181,225, 22,226, 92, 45,133, 24,123,240,137,220, 38,188,152,230, 33, 4, 79,115, 48,207,149,253, 48, 51, 77, 5,
+218, 68,171, 6,132,114, 10,165,141, 54,118, 15,130,106, 33, 74,192,209,241,230,131, 71,124,227, 87,223, 97,155, 44,245,113, 60,
+ 58,250,184,229,222,195, 83,186, 46,217,101, 29,149,208, 60,174,235,249,242,249, 37,135,203,145,206, 7,214,169,160,209,115,184,
+ 82, 90, 44, 20,173, 76,163, 21,245, 78, 29,109,114,116, 33,176, 94,226,162, 55,201,155,176, 75, 4,207, 26, 23,102, 86,193, 81,
+103,165, 69, 72,161, 26, 18,155,138,235,148,218, 26, 65,133,168, 86, 64, 74,115,116,189,117,191,130, 71, 52, 64,170, 72,140,168,
+ 88,226,164, 11,144, 86,167,116, 40, 78, 51,205, 67, 46, 5, 45,141, 46,206,118,234,169, 16,250, 21, 37, 5, 2,141, 30,103, 10,
+229, 26, 72,125,194,225,241,197, 81, 66,199, 92,192, 55, 19, 98, 38, 47, 36,139,207, 68, 59, 72,192, 56,101, 43, 18,156,199, 97,
+185, 12,194, 87,129, 47,174,217,231,199, 85, 79,200,129,212, 7,238,222,187, 99,137,142,127,106,134,186, 48, 13, 35, 85, 43, 39,
+155,142,126,189,250,255, 20, 6,242, 79, 40, 20,156, 13,236,240,206, 62, 38,103,231,255, 60, 84,106,201,156,158,108, 56, 63,223,
+177, 74,193,136,117,157,167,143,206,222,147,197, 23,119,157, 21, 15, 93, 23,232,251, 72,223, 7,186, 62,146,250, 68,215,119,116,
+235,142,180,238,241,235, 53, 85, 77,248, 75,169,196, 46,176,190,123, 23, 86, 27, 92,236,112, 41, 65,234, 80, 31,169, 62, 80,212,
+ 81,156, 39,227,153,170,103, 44,194,220, 28, 67, 17,134, 25, 14,147,114, 51, 76, 92,141,149, 23,251,137, 47,159,239,185,188,184,
+102,154,247,104,158,192,121,107, 86,167,138,243, 80, 68,209,172,140,243,136,159, 51,154, 76, 56,222, 52,163,218, 33,185, 89,241,
+138,163,182,153, 90, 50,146, 43, 89, 42, 94, 86, 6,223, 90,157, 48, 14, 35,117,178, 72,239,226,147, 77,151,187,106, 25, 35, 26,
+ 77,243, 86,102,188, 20, 82,220,176, 97,143,127,227,222,195,223,179,137,187,162, 8,226,189,237,153,197, 50,201,157, 91, 16,163,
+106,195,234,224,151,174,188,216,206,182,138, 26,182,113, 25,151, 88, 70,136,179,108,245, 96,104,187, 0,148, 96,157,135, 44,244,
+119,231,109,132, 45,128,107,186, 16, 74,101, 73,100, 83,164, 54,243, 75, 47, 99, 97,179,176, 45, 57,233,183,164, 87, 7,209,252,
+117,214,121, 53,235, 94,108,231,105, 83, 4,191,116,213, 96,223, 71,173, 95,237, 86,196, 89, 84,167, 44,118, 7, 39,134,135,165,
+ 46,150,141,104, 83,136,218,172,144,136,113,169,160, 22,207,169,248, 37, 21,110, 25,205,222, 82,248, 84, 77,184,231,112,172, 16,
+ 52, 9,161,239, 57, 59,217,114,115, 99,213,227,148,139,173, 33, 26, 76,211,200,241,120,205,113,216, 83,230,204,189,187, 15,121,
+248,214, 7,156,116, 61, 63,253,225,247,248,201, 71, 63, 7, 63,242,131, 63,248,125,254,222, 63,248,152, 42,222,172,108,181,154,
+ 37,135,198,155,239,125,131,191,254,215,255, 29,254,202,111,127,139,144,143,180, 92, 72,171,200,183, 63,248, 26, 95,252,252, 83,
+ 62,254,252, 57,125,215,225,150,112, 17, 89,170,191,172,134, 33, 61, 57,221,209,167, 68,242,145,213, 58,178, 57, 93,115,122,114,
+138, 95, 39, 84, 39,202, 84, 89,173, 55,148,220,112, 84,206, 78, 2,159,127,249, 57, 95, 62,187, 96, 86,179,104,120,111,235,142,
+171,235, 27,198,121,224,195, 15, 62,100,188,222,115,152, 7,162,120,136,198,236,127,231,237,119,121,254,236, 25, 79,190,120,106,
+ 19, 18,103,156,249,224, 28,227,116,196,105,228,124,119,135,156,175,217,110,118,164, 16,217,238, 54,156,110, 18, 55,251, 61, 95,
+251,214, 55,113, 14,162, 68, 30, 62,184,143,115,141,225,120, 88, 82,164, 50,109, 86, 91,187, 44,248,201, 86, 32,151,198,139,139,
+ 11,166,121, 88, 2,100,228, 85,180,172, 44,153,187, 90,219,226,107,109,212, 60, 81,170,208, 90,161, 21, 37, 3,185, 54,234,156,
+ 13,201, 41,183, 92, 3, 43,134, 83, 88, 89,119,228, 60,234,205, 94,184, 90,117,164, 92,217,187, 13,115,233, 56,188,120, 66, 29,
+ 38,174,135, 75, 52,170,217,204, 71,165, 58,115, 86,152,232,212,190,158,175, 22, 45, 90,138, 64,203,196, 85,194,117, 61,205, 57,
+106,153,208, 82,240,106,162,189,213, 42,226, 83,135,230, 66,211,178,240, 30, 50,206,175,209,172, 68, 42, 53, 15,140,227,104,244,
+ 68, 96,156, 38,142, 55, 47,233,227,154,199,247,222, 32,109,119, 28,199,137, 50, 15, 70,121,140,129,184,218, 81,107,163, 21,211,
+ 76, 88,225,188, 36, 32, 10,139,205, 84,192, 69, 74, 81,124, 19,240,141, 86,236,146, 79,190, 55,151, 73,244,172, 87,103,124,240,
+222,187, 60,122,123,205,137,131,126,221, 35,210, 49,221, 20, 36, 57,124, 52, 36,109,201, 7,134, 23, 35, 97,157,216,110, 18,222,
+141,252,209,143,126,193,207,158, 28, 56, 54, 97, 40, 19,174, 10,142,128,143,142, 94,160,120, 15, 97,178,137,139, 23, 66,112,144,
+193, 37, 33, 38,135, 74, 38,108,182,172,162, 51,187,225, 40,120, 85, 36, 8,248,104,107, 7, 93,194, 63,234,104,188, 74, 73,134,
+ 39,110,133, 58, 91,102, 54,193,211,240,120, 85, 66,231, 8,120,106, 19,198,113,228,168, 51,177,235,240,165,177, 90, 34,132,189,
+ 23,134, 86,105,213,206, 17,170,199,167,158,232, 50,181, 75, 48, 10,205, 55,226, 73, 79,158, 42,189, 23,168,149,169,206,164,149,
+ 35,182, 4, 78,137,206, 10,169, 92, 33, 32, 68,187,237,141,205,239,150,117,232,114,195, 58, 48, 43,162,179,136,223,251,247,238,
+ 16,187, 63, 61,204,101,174, 6,158,105, 37,115,178, 93,189,150,175,105, 59,117, 24,134, 9,167,149,221,166, 39,252, 99,192, 51,
+255,184,226,193,203, 87,197, 66,116,208, 7,161,168,144,167, 25,218,196,195,187, 39,156,156,110,217,116,158,117,231, 89,117,158,
+ 62, 57,250,228, 88, 37,199,186, 15,175,222, 55,235,192,122, 19,217,109, 34,219, 77,100,187, 77,108,182, 29,155,147, 53,219,179,
+ 53,103,103, 59, 54,247,206,193,175,201,227, 68,153,247,104,173, 72,177, 9, 51, 9, 90,245, 72, 41,100,173,140,197,138,150,178,
+ 76,164,167,155,140,110,236,130,214,227, 68,213, 70,231,122, 74,107,204,205, 33, 19, 84,205,196, 97, 92, 86, 41, 29, 77, 7,252,
+ 58,209, 74,161,150,137,166,182,146,118, 90,169, 42,228, 16, 41,120,158,239, 39,252,131,135,143,126, 79,124,131, 5, 98,128, 10,
+ 34, 13, 13, 54,246,241, 75,104,189, 56,143, 91,168, 73, 44, 59,245,102, 24, 55, 68, 45,198, 77,157, 45,101,162,247,198,152,118,
+ 30, 89, 40,107, 96, 59,110, 83,181, 11, 81,236, 42, 85,183,236,182,151,110,217,246, 45,183, 9,108,206, 8, 87,118,163,211,165,
+100, 0, 19,167,120,231, 89,210,210, 9,161,179,156,246,219,112, 0,189, 77,150,211, 87,208,156, 16,172,139, 44,185,190, 42, 96,
+168,203, 62,122, 25, 12, 56,231,240,205,170,251,234, 45, 59, 86,154,197,192,246, 97, 5, 98, 60,103,156,154, 74, 60, 23, 27,139,
+168,249,187, 69, 45, 18,182,121,251,206, 99,178,180, 53,145, 64, 31, 60,187,110,203,241,230,154,253, 97, 98,125,114,143,147,211,
+ 83,202,156,209,133,254, 20, 4, 92, 43,236, 47,159, 50,220, 92,225,220,204,151, 55, 95, 16,107,224,242,211, 79,249,222,143, 62,
+226, 80,213,210,223, 98,183, 88,158, 70,170,235,249, 15,254,195,127,159,127,233, 55,222,101, 62,140, 38,110,162, 80,242, 64,234,
+ 18,239,191,243,152, 63,252,238,143,185,216,143, 70,156,115, 1,109, 13,159, 18,235,110,197,233,110,205,106,189,166,239,123,182,
+119,206,217,116,137,147,245,134,232, 60, 85,148, 85,218, 18, 67, 36,173, 12, 79,185, 91,159,210,230,107,126,241,249, 23, 12,199,
+197, 42,229, 29,206, 69,212,119,132,224, 56, 94,223,176,219,110, 24,246, 3,199,113,178, 75, 59, 38, 84, 51,243,112,228,229,243,
+231,220, 28,167,197,190, 40, 75,154,158, 51,251, 84,115,220,191,123, 70,169,149,232, 2, 83,206,104, 16,214,235, 53,167,119, 31,
+208,117, 61,165, 78,116, 41,242,232,205,251,160, 19,151, 87,215,148,102,118, 50,113, 1, 23, 87,182,167,155, 71,139,188,117, 11,
+ 61, 80,172, 56,149,224,113,237,118, 39,119, 75, 68, 52, 45,137,162,139,144,208,166, 69, 45,207,214,209,171,233, 21, 68,160, 58,
+240, 75,177, 43, 46,210, 69, 79, 72, 43,206,118,167,196,224,153, 74, 97,157, 34,253,250,132, 59,247,191, 73, 42, 55, 72, 61,240,
+242,230,134,161, 14, 52,223, 8, 18, 8,190,103, 46,163, 37,127,249,158, 90, 26, 18, 10,173, 20, 90,109, 28,231,129, 76, 37,208,
+ 3,182,114, 74, 18,160,201,130, 29,134, 85,220,210, 66, 48,194, 84, 21,155, 76,137,199, 57,235,234,109,213, 84,185, 26,110,152,
+234,104,136, 85, 21,246,135,145, 74,227,222,105,207, 91,247, 31,208, 66, 98,191, 63,146,231, 3, 82, 27,158,176, 28, 86, 19, 46,
+ 56, 75,253, 90, 82,193,196, 71,156, 4,212, 11,173,216, 84,171, 5,112,165, 16,125,193,119, 9,151, 2,181, 9,235,245, 25,223,
+124,247, 3,222,120,180,230,116, 19,241, 93,226,238,227, 59,244, 39, 29, 55,121,230,217,231, 3,135,171,129,221, 46,224, 93,165,
+230, 9,215, 43, 41,118, 28, 94,222,240,252,122, 70,214,103,180, 2,105,213,209, 26, 68,159,169, 62, 83,112,180,121,198, 53,165,
+ 54,143,139,202,170, 91, 89,144, 71, 89,130,163, 16,242,208,200,227, 76, 1,124, 85, 92, 92,118,182, 65, 40,206,145, 39,195, 44,
+207, 75,161,226, 92,180,159, 31,136,146,168,206, 25,158,121, 65,111,149,102,175,213,216, 10,213,173, 88, 57,143, 91,214,146,246,
+123, 90, 44,104,206,163,179, 96,112, 96, 65,235,140,111,106, 36, 48, 28, 73, 2,179, 36, 18,230,164,193, 37, 86,106, 83,147, 42,
+ 14, 23, 77, 75,129,218,227,222,197,101,175,120,203,131, 23, 67,252,138, 55, 59,169,147, 96, 93,188, 15,172, 87, 43,238, 63,188,
+135,127, 13,158,242, 97,170, 76,227, 4,173,178,123,141,212,183,220, 96, 56,152,166,100,187,219,252,169,227, 97,255,161, 88,212,
+169, 48, 30, 71,188, 86,238,156,159, 32,225,159,236,215,255,147,133,194,171,105,195, 82, 52, 68, 7,105,249,184,246, 48, 52,225,
+234,226,134,121,191, 71,107,163, 46,113,229,180,106,141,132, 42,157, 4, 82,242,148, 42, 28,243, 72, 63,117, 56, 63, 49,215, 70,
+200,137, 16, 60,210,102, 74, 7, 18, 35,169, 22, 38, 21,208, 25, 47, 21,122, 53,155,236, 48, 17, 75, 97, 21,149,140,129,164,214,
+ 33,152, 59,171, 63,129,210, 51,177,231,205, 93, 36, 32,149,214, 22, 53,187,242, 85,184,198, 34,122,168,206,246,228,210,110, 19,
+208, 60,117, 25,177,138,103, 9,113, 97, 33,204,153,106,188,136,169,233, 75,201, 11,222,193, 66,223, 45,245,205, 81,203, 45,221,
+199, 68, 20, 6,112, 84,195,132, 98,124,111, 19, 68,120, 16, 37, 44,137,106,181,153,154,182, 52, 8, 65, 22,240,141, 9, 55,112,
+186,188,108, 28, 41,154,160,164, 84,161,121, 33, 74, 51, 69,120,185, 37, 80, 41,209,123, 52,207,228,214, 72,105,189,112,239, 61,
+141,108,244,181,165, 24, 72,193,178,142, 91, 40,102,199, 41,118,176, 78,210, 94, 69,134,118,234,104, 62,152,136,132,102,236,104,
+129,190, 24, 60, 4, 87,169, 8,173,206, 28,167,137, 89, 60,247, 79,206,185,127,255, 46,190, 21, 94, 94, 94, 44, 63, 67, 88, 58,
+ 72,120,118,241,140,227,120,195,152, 3,111, 60, 56,227,234,242,151,220, 76,121, 17, 31,217,129, 30,165,210,210, 61,222,122,251,
+ 49,127,247,239,252,159,252,133, 63,243, 87,145, 78,105, 35,168,244, 56, 95,201,121,224,253, 15,222,224, 27,239, 61,230,151, 95,
+ 94,130,119,196, 24,217,222,221,176,233, 35,193,245,156,158,173, 72,146,232,226,142,176, 78,244,193,130,115, 92,170,132, 57,130,
+ 91,211,111,173, 11, 95,167,153,249, 40,252,252,249, 37,115, 73, 60,120,227, 45, 54, 65,105, 20,230,106,228,189, 54, 79,204,165,
+240,211,143,127,201, 42,120, 66,240,212,172,120, 31,152,134,145, 63,254,232,151,134,127,245,203,220, 70,156, 9, 22,197, 30,243,
+237,201, 9, 5,232,186,181,189, 32, 80,186,117,199,234,164,167,140,214,121,237,118, 27,152, 29,201,247, 92, 92, 63,103, 56, 78,
+116,125, 34,246,137,221,106,199,113,158, 8,105,197, 80, 39, 14, 7,131,121, 36,239, 45, 80,168,216,184,221,185, 64, 91,124,254,
+141,106, 47,226,106, 59,157,134,195,181,140,182,180, 68, 10,219,138,196, 2,123, 20, 45,183, 98, 79, 80,173, 52,223,115,178, 90,
+177, 94,119, 60,136, 43,126,249,188,114, 28, 10, 97,119,159,162,153, 33, 31, 57,150, 66, 0,238,164, 29, 51, 51,199,170,108,188,
+176,233, 18, 67, 83,186,170,212, 62, 49, 79, 25,170, 50,101,168,121, 38, 4, 15, 8, 69, 43,169,121,112,145, 20, 3,115, 27,233,
+ 83,178,248, 98,245,108, 54, 59, 92,218,114,115,245,153,241,206,117,109, 28, 6,154, 77,210, 74,101,156, 27, 45,143,236, 54, 74,
+151, 86,236,175, 95,242,211,159,141,244,187,103,172, 54,107, 30, 61,120,200,179,103,149,113, 26,200, 53,219, 52, 14, 72, 98,108,
+247, 44, 13, 23, 32, 16,240,113,133,150,153,230,102,187, 80,117, 54, 6,128,243, 6, 78, 17,193,199,196, 59,111,191,207,183,254,
+236,123,108,182, 51, 93,220, 48,143, 19,211,113,198,247, 59,238,223,201,148,242,156,151, 47, 43,233,163,137,247,191,117,135,185,
+247,228,171,153, 43,119,224,103, 31, 95, 80,226, 9,109, 1,158,232,172, 20, 13,104, 25,168,218, 40, 89,204,189, 35,158,216, 59,
+ 92, 76,150,245, 80,133, 89, 29,157,243,100, 49,237, 12, 45, 82,170, 69, 10, 19, 77,217,149, 7,177, 46, 64, 33,250, 74, 8,107,
+152,171, 97,117,151,213,155,186,108, 78,132,206,108,110,178,164, 81,206, 17,210, 42,194,116,131,234, 26,173, 51,138,163,104,194,
+135, 74, 20,143,150,136, 44,214,216,220,102,146,236, 96,101,132,185, 54, 59,198,156,113,162,100,154,157, 85,173, 65,232, 32, 15,
+204,181,177, 9,145, 89,103,124,138,248,232,201,197,198,237, 18, 76, 23, 3,213, 72,155, 62, 24,143, 64,218,114, 17, 57,186,206,
+156, 25,175,197, 26,134,105, 71, 66, 16,124,138,175,237,226,173,165, 45, 77,221, 45,173,244,245,121,212, 91,177,199,181,139,193,
+180, 7,175,249,173, 85,181,228, 68,191,240, 33, 90, 69,130,233,114, 18,129,227, 52,115, 83,141,179,162, 69, 23,174, 64,161,115,
+171,165, 0,152, 8, 81, 16, 58,110, 40, 36,105, 20,102,116, 22, 90,104, 12,110,198,143, 9,131,163, 87, 74, 78,224, 97, 3,148,
+208,147,157,167, 21,197,181,136,151,204, 73,238,249,173, 15,215,132, 82,111, 35, 49,205, 59, 29, 92,176,113,206, 66,248, 81,113,
+214,141,160, 20, 5, 89, 70,243,186,168,203,189,243,136, 19,156, 26, 76, 85, 4,196,235,146,129, 14,206, 85, 43, 6,212, 64, 50,
+246,103,168,232,146, 41,155,161,120, 91,213, 7,135, 22,139, 54,173, 78,241,193, 84,222,218, 26, 78,162,177,169,189,165,206,228,
+ 86,137,139,160,163,214, 98,149,113,187, 21,248, 88,122,147, 75, 38, 94,114,234, 17, 7,115,172, 72,109,104,109,168,171,132, 20,
+169,185,161,217, 32, 34, 57, 52,156, 43, 84, 21, 74,117,132, 20,200,106,151,121, 34, 82,165,124, 53,122,172,197, 88,240,197,155,
+186,183, 22, 19, 26,181, 70, 11,245,149,141,193, 45, 79,214,166, 80,231,153,195, 52,227, 37,112,125,241, 37,219, 62,176,234, 54,
+220,121,176, 33,250,153,139,103, 47, 40,179,210, 42,164,109, 79,215, 37,198,195,200,243,171, 47,185, 57,238, 77, 3, 80, 61, 77,
+ 27,181, 21,142,227,204, 95,250,151,255, 10,127,227,223,250, 29,254,227,255,232, 63,225,191,254,239,223,228,223,248,221,223,160,
+205, 47,237,178,242, 43,132,202,122,115,202,155,111,158,177, 93,117,108,182, 91,250,205,134, 62,117, 4, 47,172,214,103,220, 59,
+ 59, 33,117,194, 60, 52, 66,100,201,225,246,140, 83,195,213, 21,226,102,110, 14,141,243, 7,111,113,156, 47,248,228,243, 79, 57,
+142,123,186,126, 75, 20, 37,172, 34,226, 58, 98, 93,146,238,216,224, 41, 92, 29, 39,168,158,211,221, 57,234,205,215, 61, 28, 54,
+ 28,143, 55, 12,243,180,224, 44,141,182,213,128,205,106, 69,153, 27,167,247,206,113, 17, 43, 19, 23,123,204,219,239, 60, 32,120,
+225,201,103, 7,162,143,132, 24,160, 54,106,221,115,125, 24,184,222,103,118,222,115,186, 90,179,223,239,153,139,210,175,122, 54,
+221,134,195,245,136, 56,115,110,136,150,197,146, 9, 97,233, 88,231, 86,209,234, 76, 8,154, 26, 14,191, 28, 47, 14, 9, 11, 97,
+176, 42, 42,142, 16, 5,173,246, 60, 22, 39, 84, 10,222, 41,201,153,112,165, 41,212, 24, 73,177,227,252,206, 57, 95,127,252, 14,
+194, 53,211,116, 96, 62,238, 9, 10,153, 76,155, 28,104,102, 63, 93,161, 62,161,185, 49,187,138, 82, 81, 81,124,234,201,135,103,
+ 84,173,116, 97,101, 97, 36,197, 67,202, 54, 61, 19, 1, 2,213, 45, 93,103,243, 76,181,224,196, 19,154, 50,140, 25,226,140,239,
+182,104, 25,137,209,132,157, 78, 61,121,174,220,204,123,242, 58,115,190, 59,101, 32,115,249,242, 11,226,133,227,108,123,138,119,
+ 17,200, 86,176,228,189,237,255,101, 77,194,155,127,127, 54, 81,102,220,217,212,199, 35,196,206, 47,171,141, 64,201,182,199, 68,
+ 29,111,220,127,131, 63,251,225, 59, 60,184,151,104,206, 51, 31, 70,194, 90,105, 67,195,249, 1,239, 2,119, 79, 87,108,210, 76,
+222,143, 92, 92, 29, 73, 93,194, 15, 35, 63,254,222,199, 12,242,136,205,170,163,181,153,169, 78,228, 22,236,119,132, 80,230, 72,
+214, 3, 94,130,141,207, 39,243,249,151,228,128,132,164, 66, 43,166,159, 17,175,196,149,167, 19, 33,207,129,178, 63,226, 66,197,
+151,206, 28, 0, 49,162, 90,168, 46, 27,222, 55, 66,161,210, 37,193, 31,148,161, 22,124,216,154, 18, 94,102,146,223,144, 91,227,
+112,172, 4,233,205,198, 43,129, 22, 65,114,198,109, 78,209, 92,200,243, 72, 73,158,208, 42,107,191,161,246,150,177,221,138,224,
+ 93, 36, 72,101, 82, 79,205,133,160, 17,223, 65,245, 66,118, 43,220,148,169,179,144,250,104,150,219, 90,140,203,224,154, 21,154,
+152, 32, 80, 17,122,111, 86, 67,154, 16,131,195, 5,177, 46,240, 53, 80, 98,116,153,158, 42, 16, 92,120, 45,157,255,171,139,113,
+153,134,134,232,241,225,117,126,221, 37, 32,212,128, 29,175,221,206,102, 96,155,130, 50, 67,173,203,207,209,152,114, 37,196,192,
+161,152,112, 90, 66,134, 49, 51,207, 16,189,154,102, 36,230,197,142,171,180,125,128, 20,112,195,204, 88, 3,174, 57, 98,191, 1,
+181,148,196,185, 40, 89, 70, 82,176,149,202,152,103,230, 32,168,172,144,146, 49, 14,236, 37,244,145,149, 95,113,231, 36, 18,236,
+146, 50, 10,154,107, 88,174,249, 50,242, 86, 23, 64,218, 50,130,183, 49,180, 51, 37,140,137,224,154,163,184, 37,110,208,142, 74,
+188, 51,241,156, 9, 88, 48,239, 57,246,249, 94,196, 84,142, 56,124,109,228, 10, 36,227, 50, 59, 28, 81,149, 64,179,124,118,183,
+168,203,139, 67,164, 25,127,190,217,232,255,150,111,220,100, 17,185, 57, 90, 7,173, 37, 0, 0, 32, 0, 73, 68, 65, 84,181,128,
+ 17, 85, 43, 56,170, 41,207, 99,180,197,126,203, 74,231, 29,109,174, 11, 1,206,212,242,165,154,216,207, 97, 48, 20, 22,171,157,
+ 69,189, 58, 84,138,141,249, 67,162,169,225,116, 53,204, 84,111, 12,102, 95,149, 37, 6,198, 58,241, 86,109, 20,182, 0, 92,154,
+131, 64, 38,164, 14,167,112,117,189,231, 48,102,130, 83,142,195, 5,191,248,197,145,211,237, 29, 30,127,248, 29, 86,238, 72,144,
+ 45, 58, 93,113,117,179,103,183, 10, 92, 13,151,212,234,168,217, 83,202, 18,153, 42, 48,205, 51, 89, 39,136,107,126,235,207,255,
+ 26,143,238,157,240,239,254,219,255, 42,255,233,223,252, 47,249,230,215,223,227,215, 62,188, 99,233, 64, 82,145, 84,248, 31,254,
+187,255,133, 31,254,236, 37,247, 31, 60, 98,189, 53, 59, 93,136,107, 86,155,196,157,237, 25,221, 18, 80, 83,251, 98,114,200, 34,
+ 72,128,121,170, 56,169, 22, 57,171, 6, 5, 9,113,203,201, 54,146,107,101,179,181, 9,135, 91,121,218,156, 23,123,160,141,123,
+178,192,102,221,211,170,163, 95,119,172, 86, 43, 27,251,215,130,211,198, 48,205,212,150, 49,183,124,228,249,151, 95,240,236,249,
+ 5,105,189,226,237,199,239,194,152,185, 57, 94, 50,251,138,235, 18, 15,239,156,112,117,145,201,211,115, 66,178, 32, 19,239, 29,
+195,254,200,241,250, 96, 29,137, 4,174, 15, 19,215,215, 19,253,122,205,170,235, 89,199,192,254,230,200, 84, 50,226,155, 41,162,
+ 39,187,148,235,162,139,208,220,150,199,123,217,125,234,226,149,149, 37,157,173,154,164, 92,212,224, 73, 86,213, 89, 65, 27,128,
+154, 71,242, 56,146,250,142, 20,207,241,221, 41,111, 63,234,185,247,224, 46, 77, 60, 92,239, 57,212,153,218,138,209,252, 98,230,
+152,149, 82, 38, 52, 66, 26,109, 87,236,113,244,226, 56,204,133,185, 57,166, 97, 38,172, 35, 85, 11, 45,219,120,182,238, 51,116,
+ 51, 97,115,102,174,138, 58,155,248, 72,108,196, 14, 19,179, 78, 52,241,104, 52,155, 99,151, 18, 55,199,198, 92,192,197, 53,165,
+236, 25,166,202,172, 71,106,131,221,157,173,117,226,173,112,177,191,198,187,136,211, 70,148,196,132, 5, 16,137,131,216,203, 2,
+125,170, 64, 96, 60, 78,102,223, 36, 82,202, 13,186,240,253,155,206,196,212,177,222,221,231,219,223,254,128,135,119, 2, 53, 15,
+ 72,218, 17,182,137, 58,220,144,186,200,144,143,228,185,210,110, 10,171, 62,176,125, 99, 71, 19,229,120,113,205, 71, 63,249,152,
+ 47,158, 28,120,240,174, 48, 99,232,205,117,234, 25, 71,139, 96,106,100,122,167,168, 70, 32,226, 36,227, 26,116,201,227, 74,164,
+137,169,248,171, 11, 86, 4,151, 6,117, 79, 76,145, 90, 12, 77, 85,115,163, 53, 76,172,234, 2,209, 37,114,206,136,175,144, 61,
+ 85, 6, 52,158, 32,201, 17,202,132,182,202,218,217,128, 86,104,196,148, 8,106,209, 79, 69, 10,171,174, 67,139,167,232, 1, 61,
+ 14,148,176,195,215,105,193,180,122,142,211,136,204,214, 73, 55, 95, 64, 51,181,118, 36,105, 16, 3,197, 9,122, 44,172, 59,133,
+212,113,116, 19,147,203, 72,117, 4, 85, 92,178, 29,188,163, 17,156, 32,165, 34, 62,217,185,218,204, 50,167,162,148,232,232,220,
+ 98, 21,126,141, 93,175, 69, 39,155,254,228,245,229,145,155, 32, 59,152,125,228, 53,195, 97,108, 77, 17,156, 55,129,215,107,124,
+155,155,157,143, 65,148, 44,144,197, 40,167,177, 69,219, 41,104,193,175, 61,189, 58,142,162,248, 58, 35,181, 48,212,129, 92,215,
+108, 54, 29,109, 62,208,218, 4, 98, 9,140,204, 7,138,243,224,143,180,220,168,179,163,134, 70,114, 27,114,174,116, 65,152, 21,
+ 43, 16,226,113,185,183,122, 40,153,166, 35, 69,132,126,115,138,127,240,232,141,223, 67,219, 34,114, 91,174,102, 23, 32, 57,164,
+222,238, 24,150,252,239,101,203,232,196,198,129, 62,121,115,248,139,224, 2, 54, 98, 8,182,191, 54, 75,155,121,239, 4,135, 19,
+143,119,138, 95,176,178,186,140,204,157, 46,140, 2,220, 2, 65,176,104, 82,109,166,252,101,193,119,130,217,224,104,106,188,234,
+ 80,173, 94,119,118,144,208,254, 68, 2,156,115,248,206,219, 5, 83, 44,215,214, 56,181,205, 4, 50, 46, 44,158,198,219,157, 73,
+ 88, 18,202, 44, 81,203,133, 64, 90,212,251,117, 33,198, 53, 95, 80, 39,139,133,105, 65,216, 86,204,215,237, 29, 18,189, 41, 93,
+197, 49,151, 74,117, 86,213,182, 37, 21,206,185,202,211,207,159,241,236,197, 53, 62, 58, 78,118,231,156,173, 31,208,218,132,234,
+192, 73, 92, 33,234, 97, 30,169,170,164,212,113, 60, 76, 72, 80,124,232, 56,204, 35,243, 92, 88,175, 79, 8, 41, 45, 54,156,153,
+171,195,145,127,230,215,255, 28,239,255,202, 91,140,151,207,249,175,254,214,223,230, 47,252,214,111,178, 91, 69, 82, 90,241,195,
+239,254,136,255,236, 63,255,111,200, 97,197,118,187, 38,198, 53,235,179, 29, 15, 79,239,112,114,122,143, 62,118,172, 87,119,108,
+135,167, 10, 49,208,197, 21,173, 20, 35,168,137, 51, 87, 64,241,108,214, 15,145,122,224,197,211,207,241,225,132,243, 7,111,154,
+166, 65, 3,226, 2,109,177, 27, 74, 19,144, 14,159, 2, 93,151, 8,189,103,219, 71,166, 92, 64, 3, 49,117,248, 85, 36,117, 61,
+ 15,238,159,243,224,238, 93,190,253,237,175,241,222,219, 15,184,188,154,120,248,198,125,198,121, 79,109,153,214, 60,121,158,120,
+250,244, 37,159,127,250,140,225,184,103,127,125, 99, 94,241, 98,185,226,235, 77,207,163, 55, 31,113,216,143, 52,205,244,171, 21,
+181,121,130,135,245,106,197,156,103,210, 42,146,194,114,104, 59,243, 13,123,181,200, 83, 83,109,203,171, 64, 33,241, 86, 45,186,
+206,227,212,225,177,120, 94, 17,219,154,106, 83,188, 40, 97, 73, 47, 20,103,249,231, 78,133,232,123,250,245,154,179,243, 29,247,
+183, 59, 70, 45, 28,175,175, 25,181,226, 59,200,199, 3,109, 46,204,146,209,197,130, 85,106,198,135,255,135,182, 55,251,217, 44,
+ 93,239,179,174,251,153,214, 90,239,251,141, 53,116,119,245,220,187,123, 15,246,182, 29, 27, 59, 78,136, 29, 12, 73, 8, 81,144,
+ 37, 44,132,132,196, 25,199, 8, 33,132, 34,229, 0, 41,127, 0, 39, 28,240, 15, 16, 14, 16, 39,136, 0, 10, 4, 98, 99, 67,148,
+ 96,236,108,199, 99,188, 71,247, 92,213, 53,125,195, 59,172,245, 76, 55, 7,247,170, 50,226, 0, 33,165,220,210,214,150, 90, 91,
+187,190,170,250,190,247,121,158,251,254,253,174, 43, 17,124,180, 0,164, 79, 28,110,111, 89,142, 59, 78,166, 13,170,129,146, 59,
+221, 53,186,216,197,212,187,132, 23, 71, 84, 71,107,246, 58,243,109, 71,106,207, 56,148,138,170, 99, 51, 94,224,227, 6, 56,114,
+123,253,152,221,254, 96,191,135,124, 52,110,131,247,204,121,230, 56, 55,180, 41, 49, 57, 82, 26,240, 18,209, 94, 44,196, 21, 55,
+136, 90,238,193,201, 11,168, 81, 66,240, 44,189,217,170, 64, 42,186,190, 44,130, 55, 61,234,233,230,130,175,191,243, 33, 63,251,
+ 51, 31, 50,109, 6,150, 93,161,177,152,145,173, 41, 75, 41, 28,218, 66,185,186,229, 56, 87,230,172,180,154,241,146,249,238,159,
+124,193,199, 15,111, 24, 46, 94, 39,197, 17,233,144, 38, 71, 74, 9,233,118,233, 4,144,168, 12, 65,104,210,104,117, 96, 76,145,
+105,154, 0, 79,213, 29,158,192,228,170,213,200, 94,242,191, 59,110,113,204,174,219,115,174, 29,169,106, 93,247, 10,244,185,153,
+149,145, 64,211,142,107,144,139,233,118,189,179,116,123,113, 16,182,142,208, 26, 75, 22, 52, 84,194, 52, 64,235,148,158,209, 96,
+220, 4, 45,107,182,192, 21,131,171,168, 18,233, 36, 23,233,169,211,186,224,153,144,120,100,220, 52, 12,137,224,153,162, 49,227,
+ 75, 83,130, 40, 75, 7,167,142,136,208,162, 39, 34,248, 24,192,187,151, 59, 96, 69,236,243,199,121,130, 15,196, 16,185,115,247,
+130,205,171,176,179,173, 22,181, 86, 11,131,119, 76,219,233,149, 17,217,142, 75,165, 46, 11,211,240,234,172,111, 38,114, 49,157,
+235,178, 44,108,166,240, 74, 44,117,255,111, 13,237,227,231, 51,135,171,167,148,188,179,246,132, 4,202,210, 40,197,234,143,189,
+ 43,245, 8,157,136,120, 33,183,206,210, 26, 18, 6, 92, 25,205,204,232,102,230, 5,154, 8, 65,130,105, 89,203, 45, 58, 57,198,
+109, 34,208, 81,153,104,165, 51,210,240,174, 18,186,153,119, 11,130,139,142,228,148,216, 61, 91,132,127,233,235,247,240,247,238,
+222,251, 59,246,218, 93, 75,254, 98,251,159,222,186,133,194,212,161,110,229,187,175, 73,116,231,156,109,195,157,137, 87,252,106,
+191,145,254, 34, 81,110,243, 15,197,108, 66, 86,181, 88,255,253, 58,216,236, 65, 94,214, 0, 76, 45,104,246,166,214,214,208,222,
+ 26,174,107,235, 10,192,173,155,119,113,240, 34, 59,135,183, 3,190,171, 5, 83,172,150, 7,193,123, 68, 34, 62, 24, 83,219,252,
+224, 74,243,130, 11,198, 74, 86, 20, 17, 83,132,118, 21,188,183, 67,222, 39,103,154, 72,111, 41, 87, 26,184,232,112,218,108, 12,
+235, 60, 78, 59,165,218,110, 91,181,211,106,195,249,128, 11,194, 24,116,221,181, 43, 97,237,209, 35,194,224,148, 47, 62,125,200,
+237, 92,217,158, 93,242,246,189,183,185,119,255, 1,219, 49,240,244,209,151, 60,126,252,144,153,140,138,245,142,147, 75,148,126,
+ 64,196,179,217, 78,180,124, 32, 55, 91,101,108, 54, 19,199, 37,243,111,255, 59,255, 30,251, 47,191,203, 31, 63, 58,240, 23,126,
+230, 91,252,216, 71,239,242,123,223,249,109,254,232,147,231,252,194, 95,248, 25,188, 54,254,238,127,249, 63,112,189,135, 59,119,
+ 78, 73,241,132,237,116,193,249,233,134,211, 77, 36,110, 60,225,244,148,160, 19, 50,216, 56,222, 59, 24, 93, 52, 17,208, 16,209,
+144,200,185,131, 87,206, 78, 47,201,135,107,114, 59,218,215,112,187,231,112,125, 69,111, 7, 51,193,169,129, 50,146,143,108, 46,
+238, 49,158,156,226, 37, 49,196, 19, 68,141,211,174,177,145,134,129,237,184,193, 75,231,206,197, 9,239, 60,184,203,183,191,254,
+ 77,126,241, 95,254,113,156, 11, 60,253,242, 9, 55,215,207,232,222, 49, 68,143,147, 70, 41,205,194, 42, 49,226, 71,139, 72,230,
+214, 16,113,156,156,140,252,245,127,229,103,120,242,213, 21,215,115,225,244,116,195,241,104,187,198, 33,216, 55,230, 71,239,126,
+141, 52, 78,124,245,232,137,141,228,156,231, 37,231, 42,216,223,163, 15,206,212,194,193,173,225, 47, 97,240,142,232,237, 85,223,
+197, 64, 31,126,237, 28,139, 23, 90,171,150, 73, 9, 17,130, 80,143, 7,188,118, 94,123,227, 14, 58,120, 92, 89,184, 89, 14,104,
+ 62,210, 74, 38,171,216, 26, 96,240,196, 6,147,159,236, 34, 65,163,162, 84, 87,241,226,184,190,121, 98,166, 64,159,104,189, 83,
+157,224,188,183,195,219, 71,150, 60, 19, 52, 51,164, 35,155,212,216,186, 91,238,142, 71,168,149,171,217, 16,174, 73, 78,136, 94,
+ 57, 30,111,184,189,126, 66, 94, 14,235,222,215, 20,171,189,219,106, 72,123, 35,183, 66,206, 21,167,209, 90, 31,221, 38, 47,151,
+155, 75, 54,103, 39,244, 82, 86, 32,137,193, 61,124, 24,240,206,190,215,157,116, 68,138,249, 17,154, 50,166,137,119,223,127,151,
+143,126,252, 45,238,158, 15, 4,175, 16, 7, 66, 21, 27,209, 15, 66, 61,236,169,173,208,155,163,123, 97, 68, 56, 30,103,126,248,
+201,103,136, 75,252,216,183, 63, 96, 57, 2, 58,216,207,127,114,244,172,108,226, 64,150, 2, 52,130, 14, 44,125, 65,213, 96, 37,
+154,196,124, 3, 52,130,235,248, 14,139,218,228,176,101,251, 92,147, 22,112, 4,156,247, 56, 47,212, 94, 17, 31,128,133, 54, 91,
+251,193,181, 74,118, 86,207,213, 94,145, 20, 94,110,123,147,155,112,201, 49,186, 83,186, 95, 39, 57, 78,144,210,113,154,172, 13,
+227, 59,193, 25,191,157, 94,241, 93, 24, 24,240,154,112,174,211,210, 64,216, 12,180, 89,241, 33, 83,123,162, 57, 91,177,164,232,
+201, 81,215,252, 80,164, 20,197,111, 70, 38,177,105,154, 75,230, 75,183,139,166,125,166,234, 58,113, 18, 28,193, 5,156,115,140,
+105,226,242,206, 57,195,248, 47,174, 26,205, 77,201,115,161,151,182,122,212, 95,141,190,180, 43, 28,143, 25,109,149,113, 72,175,
+ 44, 81,111, 23, 17,229,120,152,169,101,225,116, 51,188, 50,247,251,255,243,162,115,245,228,192,113,255,156,222,102,131,177, 85,
+165, 99, 65,236,118,108, 12, 61, 82, 60,228, 58, 83,143,217,130,147,113,100, 76,157,228, 26,210, 50,115,142,196,224,216, 14,202,
+172,145,113,172,216,216, 52, 34,185,145,197,254,255,122, 85,106, 43,228,222,216,132, 97, 85,188,118, 6, 39,248,173,141,227, 47,
+ 70,199, 79,254,212, 61,130,115,242,114,196,168,226,208,117, 71, 78, 51,134, 56,172,251,195,149, 13, 92, 59, 72,171, 32,193, 20,
+231, 43,185, 74, 21,186,211, 85,217,106,227, 73,123,164, 58,250, 90,255,121, 73, 65, 19,112,221,153, 49, 76, 89, 59,206,107, 97,
+220, 89,127,154,110, 35, 81,135,199,169, 65,105,114,235,180,213,247,236, 68,112,205,104,120, 14,135,115,246,181, 52,109,212,214,
+ 25, 98,179, 91,189,122, 68, 10,109,189,140, 72,215,151, 66, 4,239,131, 5,184,164,217,107,221,121,235,164,186,246,114,156, 21,
+ 67, 34,183,138,119, 16,165, 34, 26, 17,245, 56,201,168,152, 27,218,187,181,155,161,142,174,158,228,160, 8, 56,121, 89, 80, 98,
+110, 11,199,106,154,217, 59,103,103, 92,223, 92,211,186,231,217,245,231,140, 23,119, 25,123,225,203,167, 79,217, 78, 9,196,115,
+ 51, 31, 89, 74,103, 60,137,148, 54, 91, 31, 24, 33,247, 25, 63, 43, 62,108,248,133, 95,250, 5,126,229,175,254, 24,255,209,223,
+249,207,249,213,111,126,139, 95,249, 55,126,154,255,240, 63,248,247,249,219,255,233,127,198,127,252,183,127,196, 79,127,227, 67,
+126,244,108,225,244,254, 3, 46, 46, 2, 67, 24, 56, 25,206,241,211,192, 52, 69, 54, 23, 27, 66,186,132,101,207,237, 12,101, 78,
+184,184, 97, 26, 34,238,201,158,205,216,185,157,149, 49, 70, 52, 44, 84,119, 68,182, 35,167,121,195,237,241,134,229, 80,169,181,
+176,204,199, 53,188, 56,218,237, 59, 64,216, 95,179,185, 60,199,251, 64, 40, 30,231, 19,103,219,115,222,121,240, 22,163,155, 73,
+186,227,226,252, 62, 63,243,231, 62,226,157,119,222,225,247,190,243, 5,127,248,189,103,108,210, 41,110, 12,156,115,142,248,100,
+220,128, 33,162, 52,131, 58,172,235,128,158, 60, 1,147, 87,188,245,206, 37,191,248, 75, 31,240, 71,127,252,207,249,193,167, 51,
+125, 76,120, 81,170, 8,135,158,105,206, 49,157,111,121,231,107,111,241,232,209,151, 60,123,254,204,148,190, 81,137, 46,161, 77,
+105,171,202, 55,183, 6,165, 91,142,170, 11, 21, 51,183,105,181, 80,103, 91, 87, 64, 29,197,251,142, 31, 34, 78,147, 5,159,176,
+196,252, 91,239,191,201, 27,175,221,227,112,115,195, 33,103,198, 52, 34, 53, 83, 74,225, 44,140,100,215, 41, 57,211, 82, 96,174,
+130,119, 3,189, 30, 81,109,108, 83,224,250,233,115,250,156, 57, 57,191,160, 22,163,219,121,169,140,189,179, 29,133,206, 72,161,
+243,250,230,154,251,119, 6, 54,195,145,216, 29,187,162, 60,187, 53,201, 80,242,129,210,118,244, 44,148, 58,179,212,106, 43, 36,
+215,240,222,228, 48,181, 44, 4, 31,236, 34, 47,130,107,158,219,219, 27,252, 30, 78, 54,118,120,237,118,207,184,127,231, 62, 39,
+247,239,240,240,106,207, 97, 46,235,132,171, 26,248, 34, 96,215, 17,137,168,183, 52,246, 91,175,191,207, 79,127,235,109, 46, 46,
+ 18, 55, 79, 43,103,247, 60, 18, 23,230,221, 74,188, 91, 20,217, 70,100,134, 65, 20,223, 59, 87,249,192, 15,127,240, 25,115,203,
+252,187,255,214, 95,230,217,243,133,239,150,143, 25,182, 30,233,142, 54, 47,224, 2, 59,215,217,229,140, 95,178, 41, 71,101,131,
+140, 21,239, 50, 61, 59,170, 75,140,234, 8,155,137,195,124,164, 46, 66,243,197,250,247, 53,209,123,161,185, 78,170, 3,105,236,
+ 84,167, 52,201,132,110, 76,119,175,158,230, 11,163,116, 22,133, 57, 87, 18, 35, 33, 41, 62,138,137,125,196, 83,186, 89, 27, 55,
+ 9, 42, 1,233,149, 34,217,252, 24,106,144,171,216, 23,130, 31, 89,122,161, 6,161,123,207,102,244,248,193, 49,223, 20,122, 40,
+248,237,128,204,138,175,202,110,206,180, 75, 97,100,192, 31, 51, 50,116, 52, 68, 70,173,224, 3, 42, 66, 90,181,181, 37,119,124,
+ 18,251, 59, 24, 18,189,205,182, 54,244,138, 74, 71, 93, 39,134, 87, 55, 38,183,199, 73, 35,198, 87,184,247, 94,169,117,214,197,
+123,181, 92,246, 86,117, 37,134, 26, 28,252, 85,255, 83, 58,228, 90,168,189,161,193, 17, 26, 20, 87, 81,129,228, 61,234, 29,251,
+ 93,103, 89,236,209, 87, 91, 38, 13, 27,188,131,165, 20,150,220,112, 33, 65,115,180,229, 10, 9, 27, 36, 31,240,222,206, 56, 87,
+138,237,220,163, 67,187, 18, 82,163,169, 39,166,192,162,157, 54, 43,219, 49,145,186,160, 75,197,135, 1, 92, 37,110, 54, 38, 35,
+244,205, 27, 34, 86,116,117, 69,123, 83,255,169,173,225, 45,152,236,193,117,196,173, 17,249, 94,233,213, 27, 7, 90,133,246,226,
+181,191,178,130,169, 86, 59,211,210,237,155,172,219, 77, 83,214,241,184,243,160,213, 96, 23,186,166,205,155,179, 52,187, 83, 65,
+124, 48,175,185,183,215, 64,117, 70,244,162,217, 37,194, 57,197, 75,160, 52, 53, 11, 84,183, 31, 38,239, 34,181, 53, 90,233, 36,
+ 63, 50,121, 79,238,246,170, 82, 53,121, 64, 20,155, 64,148,185,173,140,121,183,134, 0, 13,104, 35, 93, 73, 42,180,168,168,131,
+177,123,178, 54,170, 88,237,172, 35, 36, 63, 32, 78, 13,225,231, 28, 13,171,228,149,110,116, 49, 31, 35, 56, 72,221,246,206,183,
+ 87,207,217, 31, 50, 33, 88,199, 83,180,114,249,218, 37, 23,247, 18, 31,255,232,115,206,239,188,206, 38,236,152,151, 76, 10,142,
+ 16, 10,234, 60,155,176, 69,151,106,214, 56, 81, 92, 21, 14,203,145,179,215,239,178, 57,241,124,248,206, 55,248,149,127,253,175,
+243,155,255,215,239,114,245,249, 15,184,255,230, 27,252, 39,127,235,111,241,127,252,218,175,241,171,191,241, 91,220,121,240, 14,
+155,187, 35,103,227, 41,155, 52,112,113,121,134, 11, 91,182, 39,155, 21, 98, 49,209,183,142,205,118,100,206, 27,164, 69, 14,203,
+158,147,139,145,141,116,252, 4, 23,119,224, 56, 63,165,104, 97, 58,142,220,244,247, 25, 46,246,176,189,229,121,110,228,126, 75,
+221,207,180, 92,193, 43,199, 37, 19, 14,123,150,101, 49,255,251,232,105, 45,115,125, 59,114,245,244, 25,175, 63,120,147,191,242,
+ 23, 63,228, 47,253,252,187,184, 56,160,115, 34, 12,137, 63,254,157, 31,240,248,209,115, 92,244,140,155,209, 94,146, 26,232, 90,
+ 89, 68,112, 27,187,224,233,161,216,223,213, 0,211, 48,242,141,247,222, 98,136,129,119,223,188,143,212,239,115,243,252, 6, 23,
+ 71, 27, 17,183, 70, 82,229,201,147, 39,188,246,214,125, 46,207,207,216, 95,221,208,112, 72,176,117, 83, 92, 43, 90,133, 78,154,
+ 6,180,205, 4,231,172,154,217,133,170,153, 20,109, 4, 58,203, 64,173, 21,231, 18, 83,114,244, 26, 80,237,212,110, 97,203,119,
+223,124,139,111,127,244, 33, 87, 87, 55,148,217, 17,207, 6, 30,156, 95,242,197,195,207, 86, 88, 83,102,211, 26,170, 71, 82, 87,
+ 28, 74,209,192,224,148, 55,134, 35, 93, 3, 95,238,175, 73,105,131, 75, 3, 61, 31,120, 99,211, 56, 29, 23,166, 65, 8,126,224,
+121, 41,116, 26,111,159,121, 78,167,132, 87, 56, 82,184, 57, 86,110,179,167,118,199, 56, 6,230,249, 64,235, 1, 23, 12,173,234,
+188,133,145, 68,160, 84,195,218,234,139,149, 90, 81,186,175,107, 8,211,115,187,219,179,217, 68,114, 3,158, 59, 78,167,129,243,
+211, 9, 31,133,221,205,129,226, 7, 66,242, 72, 61, 26,252,165,219,229,252,181, 59, 95,227,103,127,238, 39,121,235, 93,161, 85,
+165,207, 66,239, 9,230, 35,135,249, 26,239, 7,250, 65,216, 29,247, 72, 20, 11,223,121,165, 28, 51,207,159,239,248,203,191,248,
+211,252,212, 79,125,196,223,251, 95,255, 41,205, 13,148, 58, 35,213,211,165, 19, 90,102, 95,140, 75, 95,154, 39,247,217, 30, 6,
+ 25,252, 16, 24, 70,101,147, 28, 57, 55,164,122,104, 1,109, 71,226, 16,113, 45, 18,165,163,147,183, 96, 90, 46,204,251, 35,226,
+130,213,148,124, 68, 99, 94, 87,118,137,185, 24,251, 60,110, 38, 98,239,164, 24, 77,179,155, 76,102,210,235, 13,226,182,198,129,
+167, 82,178, 71, 90, 38,156,108,237,227, 81, 59,163, 38,180, 22,136,110,173,116, 6, 6,159,200, 51,120,205,208, 59,135,171, 61,
+206, 27, 89, 48,185, 0,117, 65, 98,131,205, 72, 8, 48, 22, 71, 28, 44, 37,174,179,192, 24,168, 20, 6,159, 8, 10,185, 54,196,
+ 47,171,134,115,165,123,246,181,174,151, 94,209, 78,189, 91, 53,216, 57,121,165, 33, 57, 85, 86, 44,185, 18,195,171,247,168,183,
+214, 9,209, 33, 49,188,242, 67,189,230,142,182, 5,154, 34, 85,104,206,147,123,179,140,136, 15, 24,228,185,210,188,146,134, 4,
+ 65,240,109, 97,206, 74,207, 51, 67, 76, 22,172,237,152, 28, 44, 56, 74,175,228,110, 19,225,230, 65,124, 98, 88,148,154,102,188,
+243,180, 93,165,199,129, 94, 51,201,159, 16, 84, 40,190, 32,125,100, 24, 11,119,183,224,167, 45, 65,212,232, 90,221,189,240,247,
+177,118,187,141,236,246,130, 29,167,107,201,221,105, 39, 4, 71,235, 98,187,111, 58, 65,156,245, 68,213,250,177,226, 28, 26,250,
+203,189,245, 11,102, 47, 42,107,181,196,110,103,138,163,151,102, 59,120, 53,225,132, 23,249,211,148,125,192, 18,201, 2,197,218,
+ 53,230, 0,199,244,171, 77,204, 52,165,206, 38, 8,104, 37, 73,124,121,128,171,131,170, 21, 23,213,148,174, 29,102,113, 84, 26,
+177, 90, 2, 90, 66,176,223, 63,182, 92,245,222, 58,161,186,242,161,123,203,248,224, 25,196,198,252,234,192, 66,166,118, 81,241,
+ 43,141,200,137,101, 2, 52,120,178,118, 36, 87,124,140, 8, 22,140,219,207, 7,150,210, 24,182,194,114,189, 39,119,133,210, 24,
+134,115, 82,252,132,165,205,156,157,108,121,120,125,196,197,200, 52, 58,242,110, 38, 58,195, 94,138,135, 80,131,145,244,186,114,
+251,248, 43,254,251,191,255,191,113,249, 55,255, 85,202,213, 13, 63,248,253,223,228, 31,252,189, 31,178,185,251, 62,255,213,223,
+253, 47,248,169, 31,251,144,223,249,189, 31,217, 14,172, 78, 76,211,192,120,122,202,233,201, 61,194, 52,113,172, 51,161, 70, 90,
+104, 76,113, 68,210,150,131, 30,108,183, 81, 45, 40, 86,147, 82, 52,115,177, 61, 99,234,133, 71, 87,183, 72,235,156,142, 39,180,
+ 46,200,253,129,126,104, 28,107, 66,135, 76,174,149,232, 3,219,227,140,248,130,151,136,180, 68,113, 59,252,193, 81, 74,229,249,
+243,199,228,195,158,143,223,191,228,151, 46,255, 6, 87,159,124,143,127,246, 7,191,203, 31,252,209,151,236,158,221,130,175,120,
+ 29, 88,178, 93,190,186,102,219, 24, 58,101,244, 9,146,146,177, 75,156,107,157,161, 22,174,159,222,242,189,239, 62,225,195,247,
+239,178, 57,155, 56,204, 11,227, 90,107, 60, 22,197,143,158,253,205,115,158, 60,121,202,116,185,197,125,106,223,163,178,162, 80,
+107,171,116,113,220,123,227, 62, 78,149,253,126, 54,232,146, 42,121,174, 4,133,190,234,123,253, 10, 96,161, 66,107,246, 51,208,
+251, 26, 40,140,145,143,126,226, 39, 88,106,103,183,187,166,247,137,119,182, 23,184,250, 37,173, 53, 78, 82,227,193,120,195,249,
+ 48, 83,171, 55,183,193,168, 28, 23,207, 45, 91,134, 62,242,244,121,225, 56, 55,210,232,232,117,225,235,151,202,131,123,141, 52,
+ 36,118, 59,101, 41,194,137,207,188,126, 71, 56, 59, 31, 25, 90,100, 41,138,204,149,177, 55, 14,181, 80,107, 36,116, 71,148, 9,
+124,163,180,108, 21,194, 33,216,215,218,157,173,166,186,174,118, 44,251,126,222, 31,246,248, 20, 25,199, 19, 84,149,171,219, 3,
+211, 96, 41,248,185,206, 92, 4,225,245,179,215, 56, 30, 22, 91,134, 53,181,241,155,170,153,234,166, 55,120,255,131,111,243,209,
+215, 47,233,204,168, 91,240,177, 50, 4, 69,250, 41, 12,123,110,123,166,133,132,243, 88, 61,107,236, 28,247,153, 63,252,193,231,
+ 92,188,118,135,159,255,249, 31,231,176,191, 97,119, 56, 18, 86,182, 64,165, 17,187,146,129,145,200, 81, 10, 77, 60,113,112, 6,
+ 96, 41,102, 95,116,125, 64, 37,163,120,142,199, 35, 16,137, 39, 39,182, 55, 95, 26,226, 26, 44, 14, 25, 18,117,104,180,131,224,
+187, 33,122,155,171,244,210, 73, 62,112,104,149, 74, 96,244,158, 33, 88, 86,166,181, 78,215,132, 59, 86, 92, 0,167,145,226, 58,
+117,238,132, 46, 22, 29,140,163, 1, 65,196, 26, 60,183,192, 20, 60, 94, 61, 49, 64,165,179,223, 85, 11,201,249,194,137,159, 40,
+ 90,113,209,115,226, 78,169, 53,115, 20, 71,235,145,208, 27, 77, 35, 91,111, 43, 5,122, 35,166,200,140, 18, 93,160,176, 30,136,
+ 62, 64, 53,119,122,237, 13,215, 7, 82, 50, 9,151,151, 87,115, 0,183, 98,175, 77,186,190, 50,217,202,139,151,250,218,189,122,
+165, 30,245, 23,133,243, 23, 60,251,248,103,112,168, 31,150, 78,201, 5,205, 11, 77,236, 51,100,116,193, 30, 10,162,112,104,184,
+208, 25, 3,228,226, 16, 34,199,195,129, 92, 64, 79, 38, 92, 61, 50, 22,243, 50,180,182,176, 59,236,172, 74, 30, 55,200, 80,153,
+170,144,143,160, 81, 76,197,188,183, 73, 73,223,173, 88,244, 77,167,132, 68,200,133,148,148,125,114,140, 83, 36,108, 71,130,115,
+ 14,183,250,137,251, 10,142,161, 89,183,181,118,227, 8, 55,237,166,154, 20, 59, 64,181,217,190, 88,125,167,174, 35,201,174,118,
+ 48,186,181, 79,240,210, 77,237, 28, 98,154, 48, 59,144,221, 11, 7,185,125,104,202, 75, 12,161, 82,155,221, 6, 21, 11, 4, 5,
+137,232,218, 9,198,137, 17,172, 60,168,132,213, 27,189,142,154,154,190,236,166,182,214,137, 33, 90,232,165, 40, 51,149,208,220,
+138,140,176,157,186,118,123,221, 75,240,102,222,146,149, 64,181,246,232, 17,240,105,245,181,119,171,242, 69, 49,207,123, 89, 95,
+251,193, 89,135,222,108, 6,216,126,177, 98, 65,160, 20, 81, 76,254,210,112,184, 38, 28,111,231, 21,187, 27,152,123, 65,220,132,
+246, 78,169, 7,182, 39, 19,187,121,230,108,155,224,153,145,213, 68,250,218,139,175,232,216,233, 13,164, 52,170, 20,132,138,116,
+225, 55,126,245,215,121, 48,110,248,225,159,124,143,207, 30,126,133, 31, 70, 98,108,252,214,255,254,235,252,163, 95,255, 39,112,
+186,161,235,194, 56,194,233,233, 57,211,230, 4,130,163,249,206, 70, 38,250,224,105, 78,169,181,145,119, 11,101,169,148,219,130,
+246,130,247,224,157,103,148, 17,106,102,191, 44,244,178,160,227,137,213, 55,154, 99, 72,231,108,229, 22,189, 29,145,180, 33,166,
+ 3, 42, 16, 87, 25,144,120, 71, 16, 79,240, 91,218,169,210, 41,182,146,241,129,223,255,221,143,249,205,127,252,135, 60,251,234,
+ 11,190,243, 7,223, 39,207, 71,251,223,134,129,188,100, 19,232,120, 27, 35, 74,139, 68,241,132,210, 41,199,140,118,107, 38, 4,
+132,221, 97,225,246,249,194,197,249, 41, 31, 63,127,198,135,239,221,229,123, 63,120,204, 38, 5,174,118, 71, 84, 32, 87, 33, 41,
+ 60,254,228, 11,246,203,145, 44, 74, 80,193,105, 51, 47, 65,176, 62,175,212,102,166, 43, 55, 16, 38,171, 39,198, 84,200,115,165,
+148,134,139,142,162, 7,106,233,160, 13,231,162,245,219,155,225,149,223,124,240, 22,131, 36,118, 55, 79,240, 41,113,234, 27,223,
+124,251,154,178,187, 97,210,196,137,159,185, 60,111,248, 52,208,178,103, 62, 54,170, 23,252,222,113,230, 50,121,231,249,189,231,
+ 87,156,140,157,247,238, 86,124, 56,242,254,155, 19, 42, 35, 83,235,184,212,201, 67,227,194, 5, 82, 40, 12, 77,232, 61,227, 21,
+134,168,212,230,168,197,176,172, 85, 42, 93, 32,161, 84,157,217,156,159,225, 73,220,220, 92,219,196, 71,108,127,219,123,163, 82,
+144, 22,108,157,160,208,231, 35, 26, 19, 93,224, 80, 20,159, 43,131, 75,228,165,177,121,253, 28, 39, 95,113,200, 7, 70,111,162,
+145, 20, 2,221,193,107, 23, 39,188,255, 78,100,222, 63, 39,157,157, 34,199, 25,202,194,114,244,108, 78, 4, 77, 35,203,141,224,
+ 3,132, 41, 81,175,142,184, 33, 81,230,103,248, 56,240, 75,127,229,207,243,248,122,199,255,244, 15,126,131,219,188,181,214, 73,
+237,140,105,132,190,144,231,198,144, 20, 41,208,251, 76,157, 29, 50, 68,220, 88, 40,121,161, 19,104, 75,176,245,153, 8,131,183,
+215,209,146, 5, 55, 52,107,219,104, 65,218,128,215, 74, 26, 3, 75,177,190,113,201, 74,151, 45, 75,153, 9, 65, 9, 13,198,141,
+133,229,180,219, 33,173, 99,163,205, 2,139,181, 67, 92,110,148,178,160,211, 57,190, 88,168,181,117, 8,174,162, 46, 66,236,180,
+ 54, 80,124, 36,248, 35, 33,158,210,242,140,107,198,214, 88,180, 50, 56, 79, 37, 25, 52, 41, 37, 82,235,184, 12, 21, 71,152, 26,
+251, 34,120,132,224, 61,222,117,186,235,212, 38,184,232,169, 94, 9, 90,113,193,170,174,234,101,205, 67,192,144,162,133,233,254,
+ 69, 95,164, 47, 40,156,198, 27,229, 85,158,234,218, 45, 63,229, 2,182,178,125,133, 74, 84,181,217,190,241, 85,228,207, 96, 0,
+239,204, 29,226,130,133,136,117,201, 28, 92, 69, 67,135, 14,199,158,145, 14,203,254,192,162,138,119,129, 52,122,114,222, 19,115,
+196,169,227, 58, 47,104,243,200,102,130,186, 39, 68, 71,201, 71,144, 96,153,140,218,233, 23, 16,151, 17, 61, 46,120, 63,209,157,
+195, 69, 33, 23,199, 64, 67,166, 1,109, 66,216, 15,180,147, 1, 85,103,234,213,186,146,220,220,250, 2,126, 33, 37, 17,173,244,
+ 2,120, 80, 39, 54,238,177,175, 25, 89,173, 64, 22, 72, 55,228,168,136,189,121,123, 53,224,140, 56,195,196, 74,208,181,247,238,
+ 95,218,218, 36, 8,174, 91,223,180,136,189,254, 67,233, 70,105,179,108, 61, 90,250, 74, 73,242,166,105, 13,238, 37,228, 70, 87,
+ 31,186, 52, 16, 23,240,218,112,209,246,111, 93, 87,204,173, 7,175, 1,239, 28,157, 78,233,213,124,233,201,170,108,173,219,239,
+169, 24, 83, 7,113,202,146, 51,163,143,244, 23,138,215, 33, 18,213,126, 93,196, 51,244, 78, 17,251, 16,111,205,106,122, 47,152,
+198,234,214,222,101,173,102, 38, 83, 79, 28,132,227,114,224,217,245, 30,113,230,254, 22,231,233,171,215,250,252,100,224,114,115,
+201,211,167,159,112,123,112, 4,113,244,210,185, 89,102, 68, 59, 75, 61,162,183, 66, 43,121,205,233, 11,110, 74,120,159,184,119,
+118,202,179, 63,249, 1,159, 63,217,179, 73, 3,243,162,244, 37,243, 95,255,183,255, 11,239, 63,248, 6, 31,188,118,151,186,204,
+140,147, 39,134, 13, 41,120,194, 16,109,252, 95,214, 28,132, 23,114, 87, 6, 60, 18, 58,199, 33,208, 90,160,110, 42,245, 32,116,
+ 9, 60, 59, 60, 98,127,123, 13,195, 57,113, 60, 55,249,197,198,246,148, 83, 58, 67,101,164, 29,247, 68, 23,168, 61,211,125,166,
+ 46, 2, 45,227, 55,195,202, 18,159,145, 16, 25,147, 67,162, 64, 17,254,199,255,249, 31,114, 60,220, 48, 93,158, 17,124, 52,220,
+172,108,232,221,209, 5,162, 15, 12, 82, 41,190, 33,205,147, 38,143,239,157,122, 91,232,213, 67, 18,106,232,108,238,223, 37, 73,
+224,243, 47,158, 17, 92,103,154, 70,110,247, 71, 66, 76,208, 60,145, 66,218, 38,118,199, 35,249, 56, 51,132, 64, 87, 65, 37,145,
+ 6,199,118,147,136, 62,209,114, 97, 95, 43,173,117,244,160,108,206, 2, 90, 29,105, 60, 97, 60,219,146,181,241,236,217,151,212,
+146, 81,111, 74,217,160,202,210, 11,105, 28,248,214, 55,126,140,237, 80, 41, 1,194,206,241,237,119,149, 59,103,215, 92,103,207,
+131,115,101,240,133,190, 9, 4, 81, 32,178,153, 34,199, 93,163, 13, 51,147, 14,124,124,221,216,229,133,111,191,127,193,253, 83,
+101,218,130,171, 66, 89, 26,120,225,226, 98,164, 22,225,208, 26,187, 92,240,218,137, 94, 41, 77,121,246,180,241,241,227,202,126,
+134, 97, 10,228,117,250,180,244, 74, 91, 10,119, 79,207,144,181, 9,208,234,145,218,140, 83,239,186,195, 87,187,232, 53, 87,208,
+172, 20, 10,162,157, 97,216,208,221,176, 22, 92,162,129, 92, 92,165,107, 68, 57,172, 24,233, 68,111,153, 97,115,198, 7,239,190,
+198,105,188,226,152, 3,203, 67,251, 32, 59,208,249,226, 7,159,113,113,103,195,229,233,150,179,184,229,234,234, 9, 67,172,164,
+147,129,135, 95, 62,225,147, 47, 31,243,222,123,239,242,254, 27,247,249,245, 95,251, 71,252,211,223,251,148,175,125,244,109, 84,
+ 51,162, 66,153, 11,157,194, 68,162,173, 14,121,149,133, 82, 11, 30,187,156, 79, 50, 24, 80, 74,236, 64, 36,119,156,102, 10, 74,
+105, 5, 87, 7, 66,234,104, 20,194,208,105, 59,203, 17,136,235,212, 50, 27,251, 59,206, 56, 77,164,186, 80,105,148,218,200,165,
+ 16,100, 75, 10, 74,138,138,140,145,242,172,144,155,178, 9,137, 58,140, 84,205,140, 99,160, 83,241,217, 81,245,204,106,134,243,
+ 17,221,120,164,206,180, 99,160, 31, 51, 18, 51,226, 79,113, 45, 19,188,101,110,196, 59,118,173,145, 2,171, 80, 38,210,129,201,
+ 9,109,227,144,108, 15, 12,117,138, 20,177,207,235,214,104, 81, 9,147, 95,149,165, 6,212, 10,210,208,206,122,160,203, 43,123,
+ 81,187, 53,244,252, 42,199,239,165,118,122,171, 47,205,118,175,178, 67,222,170, 25, 71,221,139,140,215,171,246,168,151,140,214,
+138,170, 71, 41,230,134, 40,149,232,148,214,117, 13,185,121,188, 68,224,192,210,133,193, 71, 54,113,194, 21, 7,161,160,131, 35,
+202, 25,173, 95, 67,111, 4, 85,162, 27,169,181,114,123,216, 51,134,192,188,235, 20, 60, 97, 82,166,144, 76,109,172,209,248, 25,
+177,225,123,160,119, 97,220, 8,219,177, 35,241, 14,161,244,110,120, 66, 89,255, 52, 92, 67,196,140, 79,182, 71,121, 33,184, 80,
+ 74,183,195,182,175,254, 93,239, 2, 42, 13, 87,215, 68,172, 88, 65,172,203,154, 20,238,188,244,162, 91,218,188, 90,175,212, 57,
+243, 82,235, 74,129,235, 14,137,246,107,224, 28, 78, 59,235, 90,222, 28,230,232,154, 48,246,150,194,151,117,111,191,206, 89,156,
+ 98, 70,159,222,112,125,197,194, 70, 71,167,218, 88,222,121,180,234,159,238,252,187,174, 88,215,110,254,113,214,144, 94,247,150,
+228, 15,142, 90,236,215, 73,193, 91, 8,170, 53,138,235, 86,209, 83,208, 86, 45,108, 23, 60,185, 67,200, 98, 99,124,111,243,249,
+193, 5,170, 70,106, 46, 44,183,123,150,222, 9,105,160,245,204, 50, 55,130,100, 62,249,226, 79,248,112,243, 1,183,187, 43, 11,
+190,120, 11, 17, 82, 11,181, 86, 8,166, 70,173,205, 40, 93, 1,143, 87,161, 86,101,152, 38,238,159, 93,242,197,211, 47, 57,178,
+ 55,180,175, 56,198,105,203,102, 76,148,118, 11,121,203,157,187,119,184,184,119,202,197,249, 37,231,211,150, 99,203,102, 18,146,
+140,215,129, 72,129,193, 49, 8,140, 62, 49,156, 42, 79,158, 29,233,165,210,199, 72, 98,129,185,114,240,145,139,113,160, 19, 88,
+ 78, 60,142, 72,236,133,138,210, 70, 79,105,139,193, 88,106,164, 19,113, 27,161,215,145,222, 35,121, 46,224, 18, 90, 10,183,199,
+138, 12, 14,149,198,243,135,215,108, 6,207,185,156, 83,213,154, 20,234, 29, 36,203,116,156,196, 13,169,207,220,212, 91,114,173,
+ 84,237,132, 96, 12, 2,145,145,174,153, 97,156,216, 29, 23, 30, 95, 29,248, 75, 63,247, 77,254,217,119, 62, 35,165,136,230, 74,
+136,194,193, 43,185,128,111,205, 56,233, 39, 27, 30,188,249, 30, 63,250,225, 15,217,239,143,156,108,206,153, 54, 91,114,107, 6,
+ 75, 66, 16,108, 90, 81, 14,176, 59,206, 40, 71,196,117,206,239,188,206,241,112,205, 50, 31,232,173, 91,250,158, 70,237,133,159,
+251,232,219,252,244, 71, 35, 27,247,125, 24, 19,251,189,240,222,219, 23,132, 82,217, 78, 55,100,183, 71, 11,244, 99,101, 9,142,
+180,221, 96,142,144, 43, 36, 55, 90,159,120,122,243,152,203,169,242,206,253, 17,234, 17,105,129,216,204,135,224, 70, 79, 8,137,
+ 92,102,122,169,196, 14,207,110,149,160,112, 85, 11,255,252, 81,224,217, 97,131,151,108,218,217,245,194,172,181,178,219, 29, 17,
+ 73,140,120,104,197, 20,186, 42, 38,218,193, 28, 69,120,197,169,163, 80, 45, 56, 88, 23,196,121, 78, 47,182, 22,104,242,157,185,
+ 21,244,208, 24, 93, 96, 81, 79, 16, 59,200, 90,247,220, 61,123,143,187,119,238,208,251, 21, 44,240,228,234, 25, 78,132,167,251,
+133,155,157,146,221,130,106, 37, 68,144, 1,106,113,168,102,110,119, 59,142, 71,229,237, 7, 3,183,187,175,168,173,114,121,118,
+159, 24, 38,150,156,193, 21, 52,140,212, 93, 69,221,145,112,220,144,151, 61, 21, 75,254,242,194, 5,223, 22, 98, 22,212, 71,147,
+202, 56,179, 86,117,132, 20, 18,210,187,173,206,106,176,240, 81, 84,100,137,120,215,232, 81,153,188, 99, 89, 12, 14,146, 17,122,
+173,196, 35, 12, 67,162,133,138,147, 72,191, 17,218, 16,240,163,163, 45, 11, 89, 43,195, 48,217, 31,105,232,116, 73, 84, 33, 8,
+ 95,170, 0, 0, 32, 0, 73, 68, 65, 84, 55,211,231, 29,209, 15,182, 26,204,197,186,210,131, 35,149,194,161, 8,154, 58, 49,120,
+ 60,201, 18,211, 85, 8, 27,123,152,232, 18, 73,106,240,167,138,199, 87,155, 96, 70,133, 44,214, 84,152, 54,129,158,149, 42,142,
+158, 61, 93, 42, 49, 36,164,121, 99,134,111,163, 81, 53, 95, 85,232,172, 53, 74,135, 41, 58, 91, 61,189,178,241,251, 58, 5,241,
+193, 76,128,175, 16, 60,211, 91, 55,201, 77,144, 87,121, 95,120, 57,189,152,231, 74,161, 83,209,213,230, 41,244, 8,186, 56, 90,
+ 43, 20, 7, 69, 51, 67, 12,120,127,198,112, 20,202,124, 75,143,157,197, 57,150, 54,147,116, 68, 91,164,239,142,224, 77, 15,235,
+ 4,178,175,228,170, 6, 83,139, 30, 63,154,252,230,234, 80,172,253,144,187, 61,118,122, 64,202,192,152, 26,167, 37,241,198,217,
+ 4,195,134,160,107, 34, 93, 86,216,173, 39,130,118,148,106,220, 98,177,122,153, 95, 95,171,234,186,113,165, 49, 82, 83, 23, 59,
+196, 17, 75,191,135,117, 4,111, 59, 59,187, 65,106, 87,188, 42, 90, 29, 4, 11,219,105,239,107,221,204, 94,248,189, 53,164,219,
+171,183,170,117,166,131,120,219, 51, 4,135,215, 70, 95,247,255,182,168,239,168,120,156,216, 5, 64, 86,232,141,199,180,172, 68,
+193, 53, 59,132, 91, 55,188,231, 16, 34, 34,197,234,169, 62, 16, 2,235,175, 99,255,205,250,234, 46,117,117, 75,247, 74, 41,138,
+186,134, 15, 30,167,141, 42,127, 58,210,105,216, 95,132,198, 72,201, 74, 8,222, 80,183, 62, 49,231,142, 4,195, 42,238,247, 7,
+ 14,135, 3,138,103, 24, 18,251,253,115, 46,207, 46, 57, 30,111,248,131,223,255, 14,181, 22,238,221,249, 0, 45,183,184,114,100,
+ 81,163,103,133,120,202, 24, 19, 75,201,116,129, 92, 10, 78,133, 97, 72,108,134, 19, 78, 38,199,243, 92,185,185, 57,178,116,199,
+112,114,201, 73, 28,185,126,246,136,231, 79, 31,242,240,209, 23,108,130,231,236,181,251,188,243,238, 7,188,121,247, 53,228,228,
+132, 20, 29,219,105, 2, 31,232, 88,239,181,107,161,170,195,119,101, 59,101, 60, 19, 61, 43,195, 56,177,185,255, 77,222, 67,249,
+209,199,223,165, 30, 3,149,136,143, 19,245,234,128,108, 51, 91,239, 57,248, 83,154,100, 35, 8, 14,137, 56,116,114,235, 28,230,
+ 66, 26, 28,170, 3,251,178, 88,208,181, 57,178, 55,150,246,233,230, 1,177,120,227,231,107, 92,195, 73,145,232, 70, 68, 43,199,
+212, 9,135, 13, 33, 57,186,100,230, 82,145, 48, 49, 36, 5,157, 24, 79, 70,158, 63,125,198,231,159,126, 69,124,251,146,101,173,
+249,196, 40,204,205,164, 23,121, 41,134, 83,244,157,225, 98,224,206,221, 51,174,111,206, 44, 23, 33,194,177, 44,200,210, 17,175,
+ 70, 93,235, 14,159, 18,113,115, 73, 58,105, 92, 95, 95,113,125,115,141,120, 37,109, 34, 91,189,228,217,163, 47,144, 21,118,244,
+254, 27,151,252,181,191,250,179,188,119,127,161,151, 72,109,194,197,201, 29, 59, 92,229,128, 27,131,213,189,156, 18,123, 52, 51,
+211,241, 6,188,199,215, 72,247,202,211, 67,225,102,158,121,239,193, 57,163,107, 84,215, 57, 30, 28,105, 18,134,104, 96,153, 86,
+ 14,180,146, 57,204,157, 93, 22,190,218, 55,118,123, 79,119, 91,142,205,227,250,142,222,205,150,102,253,179,202, 97, 62,114,172,
+ 71, 66,142,196, 62,154, 98,185, 8,226,219, 10,222,177,160,170,107,142,210, 26,221, 11, 90,161,119,171,235,105, 83, 19,245,108,
+ 60, 49,110,104, 77,168,174,224,157,229, 73,180,119, 36, 54, 46,238,143,108, 79, 34,174, 71,242,174,147,162,242,213, 85,230,217,
+245, 45, 85,148,199, 55,157,222, 54,156, 36,199,249,249,192, 56, 38,126,247,123, 63,226,211,199,153,183,223,188,195,152, 60,215,
+ 79,159, 81,197,177, 61, 57,133, 96,212, 53,231, 71,218,188, 71,146, 85,240, 74, 40,248,226,161,111,193, 45, 20,109,248, 69,145,
+ 41,161,163, 3, 6, 27,153,183, 66,155, 34, 3, 9, 84, 89, 56,224, 90,196,233,200,241,118, 79, 26,133,153, 5,209,128,138, 35,
+ 54,143,196,153, 58,232,186,107,183,203,101,206,118,144,150,177, 33, 18, 72, 34,180, 32,140,109, 67,144,138,175,133,158, 58, 82,
+ 3, 78, 42,117,105, 12,120, 92,129, 57,218,138, 39,166,196,109,171,140,110, 67,240,149,160,134, 62,206, 89, 25,214,212, 64, 60,
+ 0, 91,144, 36,180,157,146, 78, 58,185, 90,144, 42,224,168,189, 16,170, 35, 56,161,228, 10,234, 25,221,202,201, 16,177,209,188,
+ 54,251, 68,205, 66, 12,227, 43, 26,145,219, 1,169,173, 89,240,238, 21,141,178, 21, 91,227, 54, 53,195,230,171, 36,190,189, 72,
+213, 55,237,140,222, 35,175, 26, 60, 83, 49,177, 83,207,104,155,113, 62,114, 40,149, 29, 13,183, 52,150,185, 67, 4,223, 61,146,
+ 27, 42,133, 92,161,187,206,156, 43,219,148,104, 75,199,245, 10,163,163,199, 17,245,133,152,128, 30,173,234,184, 85,202, 98,134,
+200, 45, 39,168,102,124,115, 72,143,180, 97,135,196,192,152, 59,199,114, 75, 28, 78,152, 54,158,241, 34, 0, 35,193,169, 5,226,
+ 4,135,118,104,107,191, 58,132,132,128,245, 56,157, 67,213,198,242,218, 42,222,219,168, 25, 85,180, 10,126, 48, 12, 44,152,220,
+196, 14,109,183,250,100,205, 25,172,125, 61, 56,155, 85,146,116,173,199,121, 81,208,106, 0,147, 0,116,179, 96, 5,137, 72, 8,
+ 92, 94,156, 51, 12,142,229,112,195,205, 97,161,181,213, 33,174, 6,178, 49,175,184, 32,205,162,255, 46,120,170,107,107,101,238,
+ 5, 33, 12, 82, 84,122,183, 90,152,243, 70,190,243, 88, 45,165, 7,144, 20,113,221,227, 93,197, 87,172,195,190,186,222,107, 47,
+160, 1,105, 13,231,132,236,186,165,242,187, 91, 31, 62,157,234, 58,226, 59,209,156,168,180, 96, 29,117,109, 66,235,182,223,239,
+174, 34,125, 64,189,114,123,216, 17,131,144,155,240,198,107, 31,178,241,141, 79,175,174,104,186,210,239,214, 10, 94, 76,158,188,
+207,212, 98, 58,217,232, 5, 55, 6, 78,182,145,165,205, 92, 31, 50,170, 13,231, 7,238,220,123, 27,157,111, 25, 37,177, 73, 39,
+ 92,149, 35,181, 43,122, 61, 50,125,241, 37,199,229,200,246,244, 62, 67,130, 97,123,202, 52, 25,226,179, 84, 91,161,228,155,163,
+ 93,144, 54, 35, 67, 18, 54, 39, 27,124,234, 72,128,187, 23,151, 32, 31,241,240,209,129,154, 29,109,242,248,225,130,105,232, 92,
+237,111,240, 30,184, 41,244,152, 8,174,226, 73,140,147, 25,188,150,155, 27,114, 94,144, 20, 45, 41, 42, 66, 62,220,226,212, 91,
+184,168, 41, 67,138,150,112,142, 27,180,117,130, 8,131,247,220,118, 51, 38,213,101, 38, 75,224,116, 60,161,236, 50, 89, 10, 39,
+ 46,178,245, 35,179, 15,156,223,123,131,207, 31,126, 6,181, 18, 84, 56,104, 32,183, 2,218, 12,104, 84, 58,103,219, 75, 62,120,
+240, 54,127,242,233,199, 44,203,194,249,233, 22, 45, 22,254,204,222,204,122, 90, 27,185, 86,124,245,120,217, 49,158,156,208, 78,
+ 78,185,109,141,221,237, 30,113,129,209, 37,166,113, 67,173,123, 6,231,249,133,191,248,231,121,235,190, 18,218, 21,112,129,115,
+ 66, 11,247,184,122,246, 59,244,186, 35,164, 17,137,142,190, 84,170,108,225,133, 88,101,216,160,139, 16,198,200,243, 79, 22,134,
+ 0,111,190,249, 22, 97,255, 4,188,146, 67,231,201,109, 36, 53,207,205, 82,184,174,157,221, 34, 60,217, 37,118,205,122,226,218,
+109,143,171,189,210,250,130, 95, 93,226,121,213,225, 82, 11,117, 41,180,100, 97, 57,137,206, 32, 71,109,253,249,117, 47,186,247,
+129, 41,121,114,110,104, 40,150,122, 87,207, 60,207, 76,227,192,128, 85, 8,251,232, 9,155, 19,244,248, 28,145,110,202,147,238,
+233, 42, 28,231, 25, 23, 26,187,118,224,241,149, 82, 14,217, 68, 37, 37, 48, 47,133,230, 21,231, 35, 31,127,249,132,249,176,240,
+ 39,159, 62,103,216,108,248,115,223,186,199,148, 60,173, 0,179,210,130,224,124, 96,144, 5,137,157,190,203, 44,174, 51,196,141,
+ 57,236,181, 82,189, 2, 5,223, 32,171,112,238, 29,222, 7, 68,141,243, 32,234,113,100,186, 83,170, 7, 45, 1,113,208,100, 33,
+ 40, 80,204,212,214,218, 66,147,196,210, 0,239,232, 55,153,232, 6,252, 4, 69, 61, 33, 0, 81, 40,185,179,149,142,239, 66,158,
+103, 60,158,133,110,211,157, 49,176, 91, 22,156,131, 81, 28,105, 27,233,189,208, 23,197,199,201, 46,148,181, 64, 90,112,147, 71,
+250, 13,180,173,241,224, 69,233, 12,244, 37, 51, 5, 97, 55, 31, 25, 91,192, 21,165,212,192, 52, 36, 91, 55,174, 14,132,165, 47,
+140, 50,224,157,193,127,124, 52,181,179,116,140,159, 16,133,228, 29,225, 21, 85,207,230,102, 97, 82,131,140,188,218,189,119,111,
+171,111,225, 21,115,217, 85, 49,117,120,111, 68, 31,254, 76, 16,177,173, 43,154, 51,173,175,172, 3, 23,136,116,186,216, 74,132,
+172,244,122,228,166,102,170,111, 70,222,156,149, 40,142,161, 22,138, 15,168, 4, 60, 55,116,151,169, 69,241, 1, 68, 35,222, 55,
+ 92, 80,106,177,250,226,190, 45, 4, 45,184,164,184,214, 80,239, 89,118,133,192, 64,216, 2,181,178,212, 35, 66,178,169,144,240,
+ 34, 37,104,175, 76,100,117, 16, 11,150,238, 94, 69, 47, 43, 73,214,222,225,202, 42,226,120, 33,106,183, 80,194,203,174, 97, 87,
+139,165,169,165,230, 29,198,137, 23,103,251,110,109,110,197,175,154, 9,170,183, 66,119, 21,237,206,186,180, 82, 17,237,164,233,
+156, 59,111,188,206,217,208,153,119,158,246,217, 99,110,123, 3,204,222, 85,105, 43,174, 83,112, 81,104, 69, 13,237,105, 75, 0,
+ 75,216,171, 32, 93, 41,182, 59,192, 27, 22, 11, 80,102, 53,208,135,235,178,226,113, 51,210, 3,221, 57, 83,190,174,106,119,239,
+ 61,173,214, 85, 34, 99,223,219,185,170,165, 75,163,117,236, 67, 15,248, 44,232, 24,204,176,227, 3,174,219,101,227,222,107,175,
+241,240,225, 99,158, 94, 31,214, 17,139, 82, 41,244,218, 8,227,134,214,247,124,241,244, 41, 57,103, 80,225,152,139,189, 30, 4,
+116,110,180,185,173,126,122, 15, 40,135,227,204,220, 27,185, 64,157, 43,209,121,222,254,218,183,233,243, 53,251,122, 32,164, 13,
+155,237, 5,143, 31, 62,198,159, 78,180, 80, 89, 92,224,226,244, 46,127,243,223,252,107, 60,252,236,135,124,250,232, 57, 65, 2,
+185, 20,206, 46,206,185,253,234, 49,187,155,199, 60,122,250, 57,234, 54,220,187,115,194,131,123, 15, 56,185, 51,114,184, 90,248,
+234,211, 79, 25,166,115,110,118, 79, 56, 30,110,201,143, 26,195,118,224, 52,221,225,152, 11,189,237,113,227,132,106, 69,116, 32,
+249, 17,113, 11,149,202,174, 39,246,229, 96, 44,253,174,136, 44,156, 57, 72,231,119,241,201,126, 95,146, 48,232,199, 92,136, 18,
+105,131,146,221,128,235,194,210, 50,219, 96,156,113,209, 70, 58, 17,146,110, 94, 74,154,211,144,120,227,181,187,124,185, 60,162,
+ 73, 39,164,137,190, 44, 80,149,224, 3,125, 4, 87, 59,151,119,207,200,181,114,253,244,136, 75,182,118,242,209,175,232,218,134,
+180,132,136,112,122, 49, 65, 28, 88,110,247, 60,122,248, 5,209,143, 56, 55,161,249,150, 38, 51,195, 24, 57, 63, 57,103, 87, 60,
+ 95,187, 55,241,237, 15, 71,194,242,125,188, 27,108, 28,236, 46, 9,113, 15,245,154,219,167,157,105,112,164, 75, 32, 4,234,254,
+ 64, 62, 42,155,141, 25,208,186, 40,101, 63,241,201, 23,215,188,246,218, 25, 3, 98,200,199,131,114,123, 29,249,254,147,142, 50,
+ 49,183,200,145, 78,171,138,243, 1, 79,162,181,133,105,136, 28,187,218,135,122,242, 86,233, 44,213,210,251,173,145,243, 1,122,
+161, 82, 8, 17,198,148,184, 89,172, 54, 19,253,250, 51,154, 2, 67,220,210,234,158, 90, 22,220, 24,236,231,211, 7,164,218,106,
+170, 40,104,109,120, 17, 98,243,102, 42,116, 98,106, 88, 38, 82,169, 44,243,142, 62, 28,137, 67,224,250,240,156,249,250,192,233,
+ 40, 56, 13,148, 82,249,236,233, 21, 55,135,206, 97, 62,240,213,211, 35, 85, 60, 63,255, 19,111,112,118, 17,168,217, 17, 93,226,
+238,105,228, 90, 35,243, 44,148, 86,241, 71,112, 62, 26,209, 77,132, 99, 86, 74,237,136,235,244, 22,241,100,226,152,144, 26,168,
+ 5,116,222,147,210, 72,143,141, 86,161, 4, 27,152,186, 26,144,168,232,146, 45,247, 50, 36,154,107,132, 42,208, 15, 84, 21,180,
+ 69,203, 98,123,165, 46,130,243, 16,135, 68,169, 74,162,210, 71,101,151,175,173,170,187,237,196, 18, 17, 55, 82,231,229,165,181,
+ 82,169,104, 78,184, 65,136,113,203, 54, 36, 22,157, 41,162, 56,201, 56, 61, 99, 62, 86,100, 56,144,206, 78,152,119,141, 33, 31,
+ 73,147,167,214,192, 32,194, 48, 37, 52, 26, 75, 67,157, 48,215,204,169, 31,204, 99, 95, 3,189, 67,138,198,194,104, 93,233,234,
+140,217,225,148,212, 34, 61,192, 48,196, 87,118,128,149,218,232,194, 43,187, 40,152, 12,197, 40,127,171,171,243,213, 30,186,106,
+ 25, 46,165,191,114,244,236,139, 11, 73,174,149, 78, 99,144,198,161, 54, 90,114,132, 18, 41,131,226,103,165,116,101,118,130, 31,
+ 60,174,155,173,109, 78,224, 39,184,189, 61, 34, 64, 58, 59,165,149,192,221,205,192, 56,188,198,167,143, 31,210,229,150,224,134,
+245, 66, 24,144,158,144,182, 24, 91,162, 10,153, 10,123, 91,139, 47, 73, 25,117,160, 83, 57,220, 30,104,199,211, 21,190, 38,158,
+130, 29, 76, 47, 14,111,117, 74, 89, 42, 62, 68, 75,188,175,181, 23,145, 53,245,254,130, 3,223,108,167,208,170,174,135, 59,136,
+154, 62, 83,165, 19,124, 91, 15,214,149,178,182,210,227,156,172,114,151,214, 76, 91, 25, 34,165, 23,179,220,200,154, 64, 87, 12,
+244,176, 88,162,176, 46,139,201, 25,122, 71,130, 97, 95,253, 10,139,168, 43,129,206,121,219,153,171,130,171,182, 22, 8,235,142,
+187,174,147, 2,143, 16, 28,171, 36,113,173, 31, 72, 39,106, 36,120, 40,205, 38, 7, 62,202,203,218, 29,226,137,226, 44,128,179,
+ 20,156,179,148, 49,222, 86, 4, 78,141, 66,167, 93,233, 75, 65,131, 81,246,154, 8,209, 85,210,102,226,131,247,222,103,247, 71,
+127,204,178, 28, 24, 37, 90, 99, 0, 40,251, 91, 30,214, 25,223,197,114, 6,210,193,195,224, 45, 48,177,239,133,224, 18, 26,108,
+143, 79,112,164,232, 73,125, 64,106,103, 94, 22,206,238,127,192,223,248,165,127,141,223,254, 39,255,144, 79,230, 61,219, 97,224,
+201,213, 87,180, 30, 24,211,196,197, 48,113,122,182,229,151,127,249,151,249,137,175,191,205, 55,191,246, 14,251,227,204,126,183,
+231,246, 56,243,181,247,222,227,211,239,253, 62,255,205,127,247,247, 89,230,206,156, 31,113, 56, 92,113,253,204, 46, 26, 15, 63,
+255,156, 90, 58,151,119,238, 48,110,207,216,223, 62, 33,239, 51, 37, 41, 99, 56,225,124,123, 74,220,156,226,134,204,228, 59,135,
+253, 13,199,179, 17,223, 43,173,154, 88, 39, 46,137,188,236,201,185,115,122, 18,217,108,238, 16,211,136,182, 74,247,157,227, 30,
+134,193,136,105,201, 9, 18, 3, 75, 62, 48,169, 35, 71,225,216, 60,137, 72,119, 29,245,141, 9, 15,154, 9,131,231,141, 7,247,
+ 57,153, 2, 15, 94,187,207,197,217,196,243, 91, 24,134,129,155,253,108,148,187,158,185,185, 61,112,187,223,147, 54, 35,219,205,
+150, 33, 38, 83, 91,170, 82,251, 72,234, 21,136, 44, 75,131,158,120,240,218, 5,135,243, 19,234, 39,157, 58, 23,198,205,134,158,
+ 46,184,189,126,204, 97, 57,226,186, 50, 58,207,207,255,244, 91,156,159, 60, 71, 57, 82,218,129,206,192, 77,125,147,171, 79, 62,
+ 97,170,145, 97, 88,236,251,120, 78, 52,109, 28,103,120,248, 36,242,250, 70,152,134, 35,185, 58,190,255, 72, 56,118,229,237,119,
+239,211,111, 31,114,117, 93,248,254,179,137, 71,187,200, 81, 29,212, 10, 33,226, 58, 4,215,136, 30,122, 20,164, 4, 90,237, 4,
+239,112, 65, 89,154,129,152,186,235,107, 75,165, 83, 74, 33,172, 89,146,121,127, 68,123, 93,229, 28,138,182,142, 15, 66, 26,183,
+120,231,216, 29, 26,193, 39,220, 48,216,234, 64,133, 30,155,165,171,215, 85, 88,239,206,172, 84,206,160, 82, 69, 42,222, 87,142,
+249, 57,165,193,245, 83, 35,234,149,249,150,180,137, 70,111, 67,169,187,204,237,225,200,163,103,141, 45,141,186, 56,190,246,141,
+251,124,240,238, 93,202,114,228,171,175,174, 24,211,158,146, 28, 62,109, 41,117,193,185,200, 50, 31, 80, 47,120, 25,200,203, 76,
+119,141, 19,159,232,170,204, 44,100, 17,124, 46,228,105,100, 83, 58, 26, 77,142, 90,102,243, 48,120, 28, 82,149,193, 69,230,118,
+228,216,149, 41, 12,168,247, 68, 21,235,230,103,135,159, 18, 37, 43, 74, 64,179, 66, 84,188, 91, 40,213, 83,107,182, 15,198, 57,
+226, 93, 39,250, 72, 89, 58, 89, 58,155,112, 36,149,128, 15, 27, 10, 71, 98, 28,169, 71, 97, 19, 18,221, 43, 26,138,125, 29,251,
+ 83,114,157,241,165,208,195,132,180, 78,223,121, 54, 93,169,222, 51,183,136,104,101,136, 19, 77, 2, 3,235, 78, 21, 8, 83, 36,
+ 75, 33,100,111,144, 32, 1,237,141,144,176,149,149, 10, 4,163,219,169,116,123,108,201,171, 58,124,187,253,167,174,166,187, 87,
+ 8,111,233,181,219,251,138, 87, 13,158,105,212,106, 24,230, 63,139,127,106,195, 2,225, 10,234,141,143,210,231, 35, 4,199, 38,
+193, 46,139,125,182,120,133,217,112,176,221,123,228,194, 81,151,142,139,158, 78,132, 42,220, 81,207,143,255,248, 5,253,252, 13,
+110,255, 96,224,249,103, 63, 50,234,163, 27,193,109,104,109,135,139,138,246, 68,211, 74,243,141, 20, 6, 98,140,116,153, 65,148,
+ 50, 12, 68, 34,103,247, 46,128, 13,161,139,174,230, 29,147, 20,168,174, 60,244,224, 95,248, 86, 13, 31,187,238, 42,100,181,102,
+181,106, 47,112,212, 88,217, 34, 38,136,123, 17, 26, 48, 20,165, 73, 47,140, 34,103,187,233,168,214, 61, 93,111, 9,120, 10,101,
+149,128, 68, 23,168,173,226,197, 18,157,249,120,195, 87, 95, 53,110, 82,167,236,103,230,190,238,243,213,200,113,254,197,129,235,
+236,114,161, 88,199, 61, 5,139,179,235, 11,191,177,218,104, 3,188, 37,190,233,107, 0,208, 46, 16, 85, 27, 93, 23,122,119,134,
+164,244,171,134,214,153, 27,185,228, 74,242,142,150,197,176,183,106, 76,230,136, 82,114, 37, 79,158, 97,136, 72,105,208,189, 57,
+219,125,165, 85,165, 58, 75,226,158,223,191,203,135,249, 45,254,248,123,159, 82,214, 42,132, 87,103,166,178,125, 93,137,120, 70,
+180,243,193,250,252, 37,103,211, 75,246, 14, 5,187,204, 44,160, 34, 92, 94, 94, 32, 42,220, 28,247,124,253, 39,222,160,203,194,
+ 91,239,126,157,234, 29, 79,159, 60,230,201,245, 19,198,225,130,200,132,106,224,205,119,191,198,183, 63,122, 27,128, 24, 19, 23,
+ 49,113,113,118,246,242, 27,245,195,111,253, 24,239,125,231,183,121,252,229, 83,174,142, 71,158,127,245, 57,223,221, 45,204,199,
+ 29,119,206,206,136,226,249,225, 39,207, 57,217,158,178,137, 17,239, 60,219,120,151, 41, 37, 72,142,203,251,247, 17, 31,184,185,
+122,206,211,231,159,192,117,165,139,208,171, 16, 83, 34, 33,212,195, 53,251,249,200,102,124,151,182,157, 56,157,162,165,151,241,
+244, 13,140, 45, 32,163,245,162,123, 85, 98,130,124,124, 81,148, 52, 5,234,152, 26,162,131,145, 13, 81, 28,129,111,125,235, 3,
+198, 77,231,147,239,239,152,111, 14,236,111, 51,219,147, 83, 54,243,129,249,184,227,234,249, 42,210,137,194, 69, 19,158, 31, 42,
+ 97, 18,134,148,136, 58, 65,128,113, 59, 17,211,134,109, 83,246,135, 29,160,188,126,127,195,103,159, 6,138,203, 4,102,194, 56,
+225,110, 21,239,140, 54,248, 19,239,188,193,143,127,253, 14, 33,238,112,213,130, 63, 7,222,225,187,159, 55, 62,253, 65,231, 98,
+184,100,138, 25,161,178,180, 3,203,226, 56,230, 45,187, 99,228,203,180,224, 93, 69,219,196,199, 95,222,242,209, 91,151, 76,126,
+195, 15,190,220,241,195,175, 28,143,143, 1,141, 29, 63, 90,211, 36, 72,231,116,147,200,226,108,133,165,130,250,128,168,112, 46,
+ 59,170, 86,118, 8, 61,152,246, 84,164, 81, 98, 65,198,141,161, 75,187,154, 65, 42, 4, 68, 23,132,129,142,117,176,125,247,224,
+ 76,105,108,216,211,110, 53, 29,223,201,181,146, 98, 2, 23, 24, 16,164,174,136,101, 32, 55,251,208,191, 60, 29,144,161,177,155,
+111,169, 10, 90, 11, 45, 87,180, 11,183,168,173,244,162,231,245,187,167,124,250,229, 87, 60, 58,102,222,184,115,198, 71,175,159,
+144,175, 15,248,109,224,236,236,132,231,143, 14, 60,203, 51, 85, 78,232,245, 72,217,119,156, 79, 40,133, 86, 42, 42,142,193, 53,
+122,183,238,111, 79,129, 97,132, 88, 54, 12, 62, 50, 68, 40, 93,112, 85, 24,156,125, 62,149,118, 68,113, 28,252, 14,221,119,198,
+ 48, 34,234, 8,135,110, 33, 71,233,244,113,130,214, 25,112,228,222,144,113,160,183, 3,218, 60,189, 31, 8, 97, 34, 57,168, 82,
+145,238,225,232,136, 41,152,114,118, 39, 44, 46, 19, 91,176,222,124, 28,160,216,159,175, 40, 44,173,152,222,121,109, 91,148,210,
+ 72, 81, 41,101, 64, 99, 67,181, 82,196, 86, 64,246, 9,160,204,237, 64, 83,240,217, 19,199,129,249,144, 25,146,199,123,199,232,
+215, 26,166,115,212,210,113,216,103,147, 4,111, 96, 48,111,135,240,245,227,231,156, 93, 88, 56, 56, 4,135, 11,209, 72,161, 47,
+ 74,220,238,255, 95,226,188,150, 74,175,217, 46,128,238, 85,190,118,173,149,160,205,194,175,175,114, 52, 62,151, 70,171,118, 34,
+216, 90,248, 21, 31,234,165,145,115,129,214, 40,185,179, 84,155, 10,151, 37,115,212, 76,242, 3,168, 32,189, 83, 57,224, 38,143,
+175,158, 90,103, 11, 86,203,150, 92, 23, 92,237, 92,183, 61, 79,159,102,114, 61,103,190,217,209,203,204, 52,194,210, 59,199,221,
+ 66, 72, 13, 81,103, 21,237,110,109,178,236,151,245, 19,113, 67,102,199,184,158, 37,211, 38, 0,129,224, 83, 48,171,153,186,245,
+118, 39,235,193,214,205, 45,174, 6,250, 80, 5, 9, 66,119,214, 53,151,117, 39, 39,206,104,109,162, 98,206,116,233, 16, 20,154,
+195, 20, 4,245,101,191,209,137, 95,211,231, 29, 93,148, 24, 61, 93,108,132,174,226, 40,235, 24,166,211,204, 45,174,157,195,110,
+207,193,214, 90,118, 83,116, 98,216, 78, 93, 95, 14,246,133,224, 89,237,112,145,181, 63, 94, 13,215, 40, 1,117, 38,156,241,252,
+233,133, 68,197,118,214,116,197,117, 71,193,118,170,209,121,186, 87,122,151,151, 97,163,214, 87, 0, 64,104, 22,186, 80,160, 41,
+181,117,124,176, 32,142, 46,230,108,111, 44,168, 56, 88,108,204,222,139,224, 82, 66, 69,120,227,245, 55,185,185,190,229,179, 71,
+207,137,226,169,218, 80, 58,209, 91, 47,209, 59,191, 82,150, 76, 45,235,147,141,169, 10,141, 0,144,205,245,157,134, 13,120,184,
+126,246, 4, 23, 19,148, 35,223,249,173,127,204,102,154,120,227,226,156,175, 62,251,140,165, 54,210, 52,211,218, 1,137,167,188,
+253,238, 3,254, 63,127,118, 36,242,206,131,215,249, 63,253, 31, 17, 36,226,138,199, 71, 79,204,145,179, 59,247,216,166,137, 59,
+193,155, 19, 64, 32, 52,208, 65, 40, 58, 51, 31, 27,159,125,254,199,148, 67, 70,186,208, 68, 57,191, 56,103, 94,102,174,175,158,
+145, 75,224, 80,109,191, 29, 61, 92, 63,254,130, 82, 14,156,110,223, 97,228,148, 62,118, 98,114,230,222, 81, 8,189, 82,168,132,
+193,104, 95,139,243, 76,163, 99,222, 31, 16, 54,104, 20,134,170,204,205,170, 62,219, 77,100,222, 29,136, 67,194, 79,129, 71, 31,
+ 63,228,114,233,120,167, 60,189,186, 37,151,202,102, 19, 95,126,239,229, 92,217,229, 70,244, 51,163,159,241,201, 83,203,194,217,
+208,184,123,119, 34,157,142, 60,122,120,195,178, 12, 76, 49, 49,151,153,146,139, 53, 43,198, 17,237,202, 4,252,228, 79,190,203,
+201,137,135,230, 88, 42, 28,143,129, 47,110, 28, 95,126,254, 20,245,157,135,255, 55,107,111,250,107,105,118,221,231, 61,123,237,
+189,223,225,156,115,167, 26,122, 98,119,115,104,145,212, 44, 43, 98, 20, 11, 49,236, 36, 78, 12, 59, 1, 2,229, 67,254,199, 32,
+ 64, 62,248, 67, 32, 25,178, 44, 71,137, 13,107, 8, 4,137,146,104,138, 83, 23,123,170,234,170,186,117,239, 61,195,251,190,123,
+ 90,249,176,222,106, 54, 25, 82,148,168, 38, 64,128,133, 70,119, 23,171, 78,157,189,247, 90,191,223,243,204, 1, 57, 12,102,136,
+139,103,148, 57,227, 98,132,190,176,159, 58, 36,121,174, 46,223,128,250, 13,144,142, 63,255,238,158,111,190,215, 81,124,135, 12,
+171,107,122,137, 4,111, 75,178,154, 13,196,164, 50, 50,248,202,208, 11,125,218,243,122, 44,124, 99,170, 54,137,202,213, 2,120,
+162,164, 98,230,176,162,144,231, 9,105,149, 14, 33,210, 83,154, 85, 71,155,139,164, 60, 17,136, 68,111,129,213,150,101, 69, 69,
+103, 46,130, 29, 30,117, 73,184,208, 81,245,196,225,100, 2,139,178,204,244,195,200,217,217, 37,157, 4,234,220, 56, 29, 14,150,
+159,105,142,235,195, 9, 87, 13,183, 59,110, 60, 69, 22,156, 64,191,219,240,198, 27,103,244,190,242,254,179, 91,194, 33,114,209,
+141,188, 56,205,236,231, 74, 55, 22, 90,233, 80, 55, 17,196,170,170, 77,178,193,175,138, 77,217, 36, 52, 66,205,184, 57,128, 24,
+ 95,125,159, 42,155,205,134, 46, 70,102,141, 28,245, 68, 87, 5,209, 64, 1,134,179, 72,192, 81,114,163, 69, 33, 29, 10, 72, 37,
+ 68,251,126,211, 48,211, 14, 74,173, 86,243,245,189, 82,181,162, 58,227,180,163,181, 74,223,247,212,148,208, 10,131, 12, 76, 84,
+ 98, 44,104,173,214, 23, 94, 76, 81,218, 74, 35,132, 30, 29,188,113,255,155, 34,157,224,165, 81,176,124,129,111,222,208,177, 65,
+ 73,139,130, 68, 14,167, 2,161,216, 33, 61, 88,127,216,213,130,138, 49, 37,156, 51, 67,100,193,196, 84, 47,159,228, 90,234,186,
+ 79,142,148, 46,240,241,169,113,147, 79,132,160,244, 49, 16,186, 96,171,199,106,141, 34, 31,173,233, 99,181, 47,183,250,172,132,
+178, 2,102,156,179,169,229,188,159,168,171,236,105, 73,137,193, 82,201,159,201,107,186,214,130,188,116,140,124,118,204, 25,112,
+110,229, 11, 84,250, 62,252,189, 71,235,238,167, 92, 26,142, 75,161, 78, 22, 44, 70,192,123, 40,174, 99,185, 75, 38, 70, 27,171,
+169,177, 81, 58,221,224,114, 34,231, 61,174,101,202, 12,197,109,172,155, 63, 84,242, 97,161, 76,130,191,240, 6,128, 83, 56,150,
+104,159,237, 48,209, 92,207, 72, 64, 83,166, 31, 2, 9, 11,160, 55, 63, 80,189, 16,107, 7,199,142,214,101, 26,211, 90,123,198,
+202,255,165,148, 85, 93, 26, 0, 51,160,137,154,112, 69, 81, 8, 1, 81,235,203,218, 56, 93, 76,215,138,213,197,212, 55,227, 72,
+139,133,141,154,135,162, 25,215,108, 44,132, 19, 59, 40,221,203,154,154,165,148,179,218, 97, 27, 86,146,157,120, 33, 55, 99,189,
+247,226,152, 75, 89, 49,110,250,201,200, 58, 74,143, 80, 81,111,227, 41,193,209,106,195,251, 66,112,242, 9, 5,207,119,208,116,
+213,218,213, 96, 48, 14,177,189,180,139,182, 6, 72,139,133, 64,156, 54, 52,155,234,206, 90, 0, 22, 28,108,226,136,242,242, 15,
+142, 93, 66,154, 8,186, 6,241,164, 24,105,172,245,106,117, 64,196, 0, 42,117, 49, 96,138, 51,219, 91, 90, 42,195, 54,240,230,
+171,175,243,244,249,145,148, 18, 33,120,250, 56, 24, 56,199,137, 77, 41,130,217,223,170,115,120,141,150, 73, 40, 74, 82,165,235,
+ 20, 9,129,216,237,152,114,229,233,254, 68,244, 61,239,191,251,136, 60, 47,140,247,206,121,120,117,193,205, 97,143, 19,103,150,
+ 53,137,132,232, 57,205,135,159,250, 49,182, 95,185,245, 80,232, 61,236,149, 16, 59,182,103,103,108,227,136,244,158,232,148,101,
+113, 4, 96,114, 66,154, 15, 44,199, 35,105, 74,102,223,139,129,174,117, 8,129,203,179,123, 68, 13, 60,187,121,194, 92,142,184,
+185,146, 85,193, 71,150, 23,137,214, 22,198,254,140,139,251, 15,185,186,119,133,122, 71,153, 10,113,115,206, 54,118,108, 54, 29,
+ 76, 16,219,129,126,235,144,206, 17, 48, 19,210,177, 84, 74, 89,120,245,225, 3,252, 50, 51,165,194,171, 15,238,241,240,225, 21,
+237,235,223,227,112,152,120,243,157,119,120,253,149, 87,152,143,123, 30, 61,121, 78, 90,131, 42,209,103, 22, 93,209,160,226,201,
+181,225,139,162, 99, 32,211,115,111,219,113,188,254,152,239,126,247,134,203,179,123,156,247, 91,210, 50,209,114,134,166,180, 82,
+248,185,119, 62,207, 91,111, 62, 32,165, 71,164,105, 98, 58, 21, 94,204,175,241,254,117,162,229,133, 94, 58,164, 95,200,131,167,
+ 59,154,215,187,121, 71,215, 26, 25, 35,208,213,232,169, 33,147, 93,226,251, 55,133,101,154,200,190, 99,136, 1,231, 28,169, 9,
+ 37, 47,168,139, 8,246,153,186,223,195,253, 29,236,198, 5, 2, 92,246,129,116, 74,228,143, 42,184, 96,176,166,144, 41,171,163,
+ 91,104,248,113,160,169, 99,201, 9, 31,236, 11, 92, 43, 84, 20, 45, 19,142, 13,227,197, 25, 69, 28,243,139, 27,202,146, 57,209,
+ 8,218,120,251,139, 15,185,217, 23, 82, 42,204,190,195,167, 76, 43,134, 56, 45, 10,231, 33,114,121, 17,152,211,204,233, 52,131,
+ 54,150,100,149,211,222, 11,169, 22, 92,116,220, 28, 14, 28,167,153,224, 55,252,194, 59,175,240,149, 47,236,200, 8,211,156, 88,
+246, 51, 71,102, 78,167,133,214, 54,156,150, 9,175,158, 49, 68,114, 91,208,165, 3,215,211,252, 68,115,172,246, 64, 5, 55, 48,
+151,140,235, 26,213, 87, 2, 1, 74, 71,118,137,101, 46,148, 86, 44,235,210,103,122,155,243, 82, 93,225, 84,138, 25,245,130,144,
+112,148,102,129,173,185,120,124,151,105,101, 34,202, 72,213,130,174,254,112, 95, 3, 16,233,164,103,138,137, 70,226,148, 23,198,
+110,192,197,128,180,200, 33, 45, 12, 67,181, 16, 91, 84,156,206,140, 37,130,219, 82,100, 38,146,145, 54, 16,116,161,101,165, 72,
+166, 70,163,228, 17, 2,133, 68, 32,218, 23,119,137, 68,117,212, 94,233,107,176, 4,190,218, 35,164, 57,111,252, 5,215, 32,122,
+212,179,174, 82, 58, 84,149,243,139,129, 47,124,233, 77,155,246,213,102, 12, 13,231,172,229,148, 77, 48,165, 86,220,164,101, 91,
+197,148,170,164,100, 99,235, 86,218,218,182, 72, 64,182, 6,132, 8,207,111, 39,230,180, 74,149,130, 55, 27,102, 16,115,106, 56,
+214,203,193,203, 10,153, 77,111,249,244, 64,192,253,224,232, 77,203,106,174,115,250, 50,213,245,153,237,187,107, 53,213,174,168,
+ 16,254,158, 33, 60,247,119,248,235,205, 89, 91,168,185,197,244,183,206, 62, 67,170, 16,124,228,133, 83,234, 32,196, 67,132, 21,
+ 95,238,232,112,165,145,154,192,182, 49,250,130, 46, 91, 22, 93,184, 89, 78,148, 15,158,211, 14, 79,209, 14,136,145,110,205, 99,
+ 73,235,152,202,132,118,141,172,214,101,215,234,113,205, 49,203,132, 15,149, 88, 51, 89,204,240, 6,141,160,249, 7,123,110,135,
+163,214,140,190, 12,181, 53,235,106, 59, 39,168, 22, 27,251, 84, 65,154,241,220, 13,184,102,123,115,105,138, 72,165, 21,147,168,
+132, 80,105,213, 94,210,174,173, 55, 59,103, 53, 52, 31, 60,190, 54,170,152,144, 0, 26, 34,118, 67,126, 73, 36,211,214, 12,191,
+ 42, 6,155,113,190,225,154,183, 11, 70, 51,115,141,141, 32, 33, 84, 71, 19, 79,107,141,210,156,117, 64,157, 64,201,134, 83, 84,
+161,182, 98,112,138, 12,137, 66, 44,242,146,127,183,174, 23, 2,205, 27,197,173,111,209,214, 9,161, 33,197,209,188, 67,226,203,
+155,108,181,203,143, 8, 75,173,120,181,196,125,203, 11,161,115, 56, 31,105, 52, 60,142, 83, 74,120,223, 17, 93,192,163,228, 12,
+155, 87,238,241,107,253,175,113,184,126,206,163, 15,223,167,212,194, 40,253,218,209,119, 52,245,224,171,169, 22, 93, 71,227,100,
+126,111,181,238,188,122,165,147,202,241,249, 11,242,116, 34,244, 27,238,142, 19,170,141,229,184,112,183,127,143,219,227,137, 24,
+ 35, 82,149,116,202, 28,143,137,239,189,251,136, 23,251, 19, 87,103,155, 31,255, 49,214,194, 71,143,175,209,162,246,226,115, 66,
+171,149,174,219,217, 75, 44,192,216, 25,225,139,182,225,226,193,134, 97, 55, 48,221, 77, 60,121,239, 61,170, 52, 92,110, 28, 91,
+166,187,218,160,210,168,169,176,189,188,160,118,133,143, 63, 42,228, 37, 83,152, 16, 85,106,245,188,120,241,130, 99,119,228,230,
+197, 11,110, 55, 59,124, 31,105,206,113,182, 29,120,248,234, 91,108,124,199, 82, 10, 42, 59,130,139, 92,157, 57,206,206, 95, 33,
+ 77, 11, 47,142, 47,184, 58,243,188,122,182, 37,244, 29,211,221,137,143,110,158,225,124,199,253,251, 87,148,230,104, 41,243, 95,
+125,237, 87,216,223,126,200,199,215, 55, 92,223,220, 48,198, 13,227,118,228, 60, 12, 12,189, 7, 47, 28,111,110, 13, 73,236, 19,
+215,215, 47, 72,181,231,222,171,247,168, 37, 80, 83, 98, 24,182,148, 50, 83,138,169,130,239, 95,158,243,203,191,240, 6,135,227,
+145, 15,175, 11,207,158,100,124,255, 42,231, 23,175,144,142,143, 81, 2,135,156,236, 53,236,148, 40, 30,239, 27,130, 39, 47,137,
+110, 20, 74,178, 47,225,187,219,107, 36,120,162, 23,110,211, 17,223,116,189,160, 6,124,236, 32, 64,175,133, 49,102, 30,158, 23,
+222, 62,247, 60,188,112,184,206,163,193,163,169,241,190,142,148,190, 18,212, 19,137,150, 31,105,149,146, 22, 66,232, 80,215, 24,
+ 54, 29,233,152,120, 62,221,209,111, 34,157,139, 38,164, 40, 48, 45, 71,250,101,100,236,123, 82, 8,180,229, 68, 75, 11,251, 37,
+241,215,223, 89,216,236,174,184,242, 9, 63, 94, 90,218,119,201, 72,128, 16, 33, 83,120,250,226, 41, 65, 61,169, 25, 12,199, 64,
+115,142,101,158, 41, 4, 14,203,145,227,113,207,217,120,193,213,249, 57, 63,255,246, 5,103,231,158,103, 55, 21, 61, 53,230,169,
+112,151, 50,165, 8,253,121, 68,162,103, 57, 44, 20, 47, 84, 76, 45,169, 90, 41, 75,179,133,154, 23,178,107, 72, 81, 92,128,154,
+ 51,197, 7,226,208, 81, 75, 34,231,133,162,213, 38, 11, 91, 65,138, 80,167, 5, 87, 79,150,157,233, 3,165,206, 20, 13,182,218,
+146, 96,197, 78,127, 66,134, 70,218, 3, 84,124,109,244,187,193, 40,123,161,176,164, 70, 40, 86,109, 27,182, 3,233,118,177,233,
+ 95,177, 76, 82,239,173,214,107, 97, 81,133,225,156,153, 66,215, 6, 80, 83, 25, 35,133,190,135,234, 29,125,245,180,217,113,146,
+138,146,209,174,153,162,122,216, 16,200,248, 86, 41, 83, 68,197,190,211, 74,177, 14,253, 16, 11,193, 59,156, 4,203, 31,181, 64,
+213, 76,168,133, 16, 35,247,207,182,108,215,158,250,240, 67, 51,243,149,146,245,233,255, 12, 63, 56,244,166, 53,239,172, 10, 11,
+202,237,113, 97,122,242,140, 90, 50,174,115,196,205,142,176,219,126, 66,153,171,106,144, 3, 87, 45,148, 9,159,180,141, 45, 51,
+165,214, 48,122,249,106,182,164,181,146,107, 99, 78,121,253, 46,111,236,239,142,104,131, 16, 2,136, 77,137,196,175,120,242,151,
+255, 76,247,119, 59,118,219,218,171,175,173,218,185,194,103, 63,126,175, 57,211,170, 17,227,178, 66,169,133,146, 45,115,150,106,
+ 69,167, 70,236, 7, 90,231,104,105, 94, 21,201, 61, 83, 75,196,126,192,105, 79, 59, 60,102,123,190, 37, 29, 19,223,251,248,128,
+182, 71,148,102, 23,108,156,177, 53,198,216,113, 42, 25,159,138, 93,192,226, 26,226,108, 11, 29, 32,177, 34,109,160,213, 68,236,
+148,167,122,201,181,165, 88,194, 42,105,177, 67, 88,188, 95,193, 46, 43,215,121, 77,178, 91,177,208, 17, 92,161,184, 98,169,245,
+102,191,140,206, 89,122, 62, 23, 83,116,138,115,235, 47,103, 91, 95,254, 47,247,215, 5, 21,219, 87,219,182,123, 53, 68,181, 74,
+109, 66,240,129, 90, 22,112,206,196, 18,206,234, 97,226,237, 28,183, 17,126,253,164,119,238,219, 74,176, 11,246,114,110, 85,145,
+ 10,213, 85,219,155, 59, 7, 77,232,188, 35, 59,112, 81,160, 54, 60, 30, 87,100, 29,125,123, 35,193,169, 37,253,165, 52, 82, 43,
+140,209,170, 10,166,118,181, 27,173,119,117,197,233,253,224, 3,218,188, 67, 37, 24,220, 98,129,216, 41,126, 69,199,138, 40,212,
+130,230, 1,149, 66, 45, 66,161,112,121,177, 97, 28, 59,226,182,227,209,187, 31, 48, 77,139, 73, 39,240,168, 6, 91, 64,104, 99,
+105, 51,115, 78,176,202, 69,166,101, 38,164,128, 68,103, 96,154,148,136,125,180,151, 95,232,208, 52,115,119, 60,128,152, 96,163,
+ 34,100, 50,167,105,226,227,119, 63,226,247,126,255, 15,248, 95,127,251,127,250,177, 31,243,239,124,227,175,248,207,223,123, 15,
+ 21, 11, 52,150,101, 70, 3,196,109,207,176,233,209,229, 4, 97, 96, 51, 68, 14,251, 27,254,224,247,255, 45,190,239,217,132, 17,
+197, 51,108, 55,136,120,186, 24,185,216,236,232,165,103, 57, 77, 28, 79, 39,210,105,193, 23, 49,200,141,246,164,164,164,249, 96,
+ 48,160, 82, 72,122, 34,207, 19,253,174,199,119,194,208, 95,242,236,241, 99, 35,125,213,134, 43,137,155,155, 74, 87, 2,126,124,
+ 70,220,245,208, 42,175,157,191,205,118, 60,231, 91,223,124,159,219, 23, 31,242, 7,127,242,151, 60,126,242, 28, 45,149, 16, 60,
+ 47,246, 47,248,240,233, 13,149,106, 10,219, 69,226,193, 0, 0, 32, 0, 73, 68, 65, 84,211,211,194, 49,100,138, 38,206, 54, 14,
+233, 59, 46, 99,207,248,202, 21, 31,223, 92, 51,157, 78, 76, 83,162,106,207, 91,159,123, 72, 58,135, 15, 63,124, 76,120,249, 37,
+221, 28, 81,225,213, 55,238, 83,232,248,214,119,102,142,233, 62, 89,183,252,242, 91,191,204,245,237, 53,169,218,225,237,154,224,
+ 91,143,180,133, 73, 11,195,176, 65,242,201, 94, 75, 51, 86,249,235, 6, 62,120,250, 49,103,219, 11,150,201, 0, 40,213,217, 69,
+ 87,201, 92,196,204,131,209, 14,244, 93, 8,188,241, 90, 71,191,235,204, 5,144, 28, 50, 10,249,174, 82, 82, 68,165, 16, 98,103,
+ 64, 37, 26, 82, 42,169, 11, 88,230,171,225, 93,160, 68,219,196,217,142, 54, 24, 68, 42,128, 75,153,219,167, 31,154, 39, 93,132,
+ 86, 28, 77,205,133,144,150,198,197, 69,135,239, 58,118, 18,152,150,147,177, 42,212, 81, 11,180, 86,153,247, 19,206,123,170,194,
+236, 32,202,192,110, 48, 31, 66, 58, 90,242,126, 24, 54,132, 97,203,107,175,244, 72,175,124,252,244,192, 41, 21,106,132,229, 80,
+ 56,156,160,180, 68,119, 47, 88, 63, 61, 6, 90, 45, 22,100,109, 61, 85, 29,165,174,106,229, 32,248, 86, 56,145,136,110, 96, 51,
+116,200,224,109,164, 93, 27,197, 59, 58, 81,178, 91,209,166, 34, 86,181, 28, 58,160,226,114,193, 81,105, 21, 34,118,209, 31,186,
+ 74,174, 13,246,158,216,143,180, 58, 81,146, 39,102, 79,149, 74,171,133, 56,120, 90, 24,112,169,209,230, 6, 33,178, 80,169, 83,
+194,197, 1,239,242,234, 5,243,196, 2,117,185,161,250, 64,212,145, 77,244,204, 90, 73, 85, 40,222,177,243, 74,189, 19,102,151,
+161, 9, 18, 70,196, 53, 11,226,105, 97,222, 10,211,148,233,179, 35,110, 58,212, 43,203,169, 33,187,128,116,129, 86,148,156, 51,
+125,244,166,164,118, 14, 98,143, 14, 29,225,103,244,146,143,230,214, 6, 96,135, 35,236, 6,158,238, 55,156,142,123,130, 8,175,
+ 63, 56,251,177, 47, 95, 93, 15,211,151, 63,104,138, 29,248, 47, 51, 87,117,125,249,163,164,162,204,199,153, 82,103,220,186, 50,
+120, 49, 21,246,101,193,203,130, 97,203,193, 7,103, 13,171,182,174, 86,229,165, 46,219,173, 20,207,151, 57,174,151, 60,122,187,
+ 2, 28, 83,101, 58, 76,168,179,151,237,233,184, 55, 24,149,179,224,167,172, 43,220,127, 24, 77,174,160, 75, 66,235,234, 78,168,
+ 21,231,173,118, 24, 67, 33, 29, 26, 76,153,224, 50,179,119,148,236,168,186,103,112, 27,170,243, 8, 21,231, 61, 75,157, 81, 87,
+193,245,212,184, 32,110,135,228, 17,105,149, 89, 27, 57,207,134,171, 30, 34, 46, 39,148,142,226, 27, 46, 37, 74, 87,168,169,225,
+156,163, 27,183,236,252,194,219,111, 92,217,159, 15,113, 47,107,103,235,174,218,252, 85,180, 86,205,226,229,215, 93,117,211,181,
+183,110,164,170, 38,213,252, 47,205,125, 66,140, 67, 13,202,162,173, 65,181,215,108, 83, 11,206, 73,244,166, 39,109, 74, 94, 57,
+240, 81,172, 46,235,221,218,131,111,118, 11,110, 43, 2,182,122, 75,212,231,154,140, 60,236,236,239, 83,103, 35,247, 66,251, 4,
+112,227, 93, 65,124,160,153, 41,154,206,201,154, 4,182,223,136,190,247,168,247,120,167, 72, 53,171, 28,234, 13, 55, 43,182,253,
+111,213,120,217, 78, 28, 75,203,136,115, 44, 88,112, 47, 74,160,173,216, 90,251,121, 11, 65, 76, 98,163,173,173,112, 17, 71, 45,
+141,141,119,184,102, 17,212,174, 11,180,182, 16, 92,192, 59, 33, 87,199, 82, 23, 74,106, 92,221,123,192,110,179,227,219,127,243,
+ 93,110, 15, 71, 98,103,201, 93, 85, 89, 43,133,117,237,185,103,227,205, 59,135,122, 79,173,142, 16, 27, 83,154,168,119,153, 24,
+ 58,124, 7, 75, 93, 56,206,137,174, 55, 95,183,186,149, 29,191, 36,210,205, 51,254,236, 63,253,223,188,184,123,198,231,238, 63,
+224,234,222, 3, 94,185,127,143,171,251,151,252,241,159,254, 9, 95,255,139,191,230,246,230,134,211, 50, 51,207, 11,173, 21, 68,
+ 97,123,118,193, 38, 58,138, 92, 48,167, 19,231,225, 1,175,221,223,241,221,179, 11, 78,211,194,221,124, 71, 81,165,221,124,140,
+132, 64,171,149,143, 62,122,151,179,110,128,174,231,237,207,125,133, 77,220,114, 10, 7,131,127, 56, 71,210, 66,144, 17,239, 12,
+ 40, 34,162,104, 52,120,198,160, 3,115,170,252,163,223,250, 37,254,213,191,250, 23,252,233, 31,253, 49,239,125,248, 30,167, 52,
+ 17,179,176,185,127,206,183,255,242,175, 72,203,129,239,125,251, 91,124,249,139,111, 18,203,115,156,116,252,218,175,253, 58,254,
+207,255,154,179,205,192,247, 30,189,207,114, 58,113,251,252,150,205,185,231,213,251,231, 60,123,188, 97, 81,101, 89, 22, 92,189,
+ 37,231, 72,220,109,185,186,186,160,107,142,219,219, 61,187,237, 8, 26,249,222,119, 62,228,176, 79, 36, 45,156, 14, 71,130, 9,
+171,233,250,142,123,151, 15,184, 73,194,184,185,143, 15, 51,231,175,188,197,131,207, 93,241,225,147,239,208,123,101,142,137, 88,
+ 42, 50, 26, 62,173, 29, 19,117, 57,161,193,209,134,136, 84, 65,100,195,199,207, 62, 32,116,141, 7,247,207,248,214,163, 39,244,
+193,115, 62, 78,108, 99,226,225, 78, 56,223,122,122, 47,120,215,177,180,138, 68,199,112,181,161,204, 19,165, 19, 66,111,137,149,
+187,211, 68,173,133, 49,244,182, 19, 69, 56,169,193, 91,108, 2, 20, 72,185, 24,214, 23, 97, 42,142,121, 90, 8,210, 32, 6,227,
+236, 47, 11, 73,247, 43,202,217,242, 47, 49, 42,125, 28,232,186, 1,233, 60,253,102,195,225,217, 1, 87,149,230, 44, 1, 47,205,
+ 62,147,115,129, 82,102,198, 56, 66,240, 76, 57,227, 66, 97,202, 7,198, 46,226,226, 25, 15,238, 13, 60,120,112,198,130,112,172,
+194,254,174,145, 75, 99, 58,101,150,165,174,135,174, 24,131, 62, 11,185,122, 92,236,112,193,144,174,100,103, 97,209, 90,104, 47,
+171,172,197, 19, 34,136,118,159,144, 26,195,176,195,215,128, 43, 51,121, 49,106,185,247,138, 23, 80,239,209, 9,168,227,234,163,
+104, 20, 85, 38, 87,160,244,164, 50, 17, 6,207,224,118,100, 63,147,105, 12, 10,117,169,132,104,141, 19,154,226, 90,160, 31, 50,
+148,130,110, 59,202, 98,147,204,144, 70,170,203,232, 0, 97, 9, 4,151,217,179, 39,106,193,123,165,186, 17,114, 69,114, 70,123,
+ 27,179,250,176,218, 29,181,163,180,106, 50,151,187, 64,140, 1,233, 59, 82, 80, 70,233,217,141,197, 50, 67,197,162,138,131, 88,
+ 24, 43, 55,199, 16,123, 19, 40, 53,165, 11,159,145,157,173, 42,181, 54, 68,161,239,194, 79, 28,101,127,234, 46,176,174, 87,225,
+135, 10,117, 65,126, 40,225,126, 58,235,121,242, 97, 35,165, 76,140,158, 87, 95,127, 64,232, 59,211,153,174,255,190,234, 86,140,
+117,181,148,121, 91,167, 3,154,171,101,169,212, 81,180, 65, 42,102, 73, 44, 74,202,153, 60,159,140, 77, 33,141,214,148,247,158,
+ 29,248,248,118,198, 96,253, 48,120,111,144, 48,252, 74,131,115,230, 36, 15, 86,130, 86, 85,147,248,120, 89,207, 59,181,233,147,
+216,138,116,159, 26,199,219, 23, 20,210, 39,147,213,212, 18,217,123,171,231, 22, 1,183,144,252,158, 78, 34,193,193, 60,205,184,
+208,168,115, 33,181, 19, 72,226,162, 63,163,212, 30, 45,135,117, 77, 36, 20, 87, 40, 28, 16,173, 12, 93, 68,203,200,114,154, 8,
+253,136,107, 74,171, 51, 62, 11,174, 52,170, 91,136, 99, 79, 73, 19, 78, 35,231, 62, 18, 66,111, 98, 33, 37,175,250, 59, 83,192,
+ 57,117, 54, 38,199,161,205,106, 89, 22, 76, 91,157,203,120, 75,201,131, 17,231, 84,215,181,236, 26,220,248,132,250,166, 86,181,
+112,198,144, 71, 87,110,112, 85, 42, 32,157, 71,155,253, 6,138, 56,114, 41, 56, 31,108,244, 94, 10,213, 25,182,213,173,211,130,
+166,246,246,151,216,209,105, 91, 59,142,107,112, 78,109, 20,228,164, 33, 65,112, 8,226, 12, 54,225,165, 81,138,237,249, 35,158,
+220, 10,206, 9, 46, 4, 43,247, 23, 5,201,208,108,231,212,212,170, 36, 77,236,114, 97, 53,162, 70,107,150,158,206, 25, 74, 2,
+ 85, 91, 63, 56,177,142,176,115, 98, 19, 0,239, 88,138,173, 19,130,116,248, 16, 8,177, 82,214, 17,183, 84, 79,150,134,244, 30,
+173,194,102,179,227, 43,191,240, 85, 30,189,251, 46,143,159, 92,219,174,170, 11,118,211, 93,105,118, 52, 27, 97, 53, 39,116, 62,
+112,222, 69, 14, 47,110,169,181, 50,105, 35,167, 74, 88, 50, 9,251,226,110,185, 80,170,195,239, 60, 41, 7,230, 50,115,115, 7,
+137,200,237,254,207,249,155, 7,103,108,124, 79,204, 21,183,233, 56,236, 15,236,143, 51,121,158, 57, 78, 39,230,211,158,121, 89,
+ 75,127,249, 68,206,137,193,143,228, 84,152,188,176, 95, 50,175,127,241, 29,104,130,239,148,227,221, 76, 94,102,114,154, 40,197,
+163, 53,177,204, 55,136,194,217,253, 11,110,110,230, 21, 94, 4, 75, 5,143, 93, 56, 8, 3,174, 54,148,202,182, 31, 17, 31,216,
+108, 54,124,233, 23,191,204,111,255, 47,191,205,118, 28,248, 23,255,242, 95,178,164,196,233,120, 66, 81,238, 93, 93,241,239,127,
+255,223,241,111,254,207,223,165,186,204,147,103,143,249,173, 95,255, 60, 47, 94,204,116, 33,208,117, 59,254,217, 63,255, 26,255,
+120, 89,248,223,255,183,223,225,233,245, 19,222,216, 94,114,249,218,134,123,207, 95, 97, 90, 86,164,166,206,220,221,237,121, 49,
+ 77, 72, 23,217,109, 7,166,220, 80, 13,204,167,137,155,155, 9,209, 12,209,155, 32,161, 22,232,224,226,225, 3,250,113,195, 54,
+246,198, 95, 24, 59,222,126,235, 53,158,127,252, 33,215,207,159, 34,120,164, 5,212, 53, 42, 9, 52,152,209,206, 7,202,188, 48,
+196,158,109,220,112,154, 22, 78,167, 27,222,122,251, 45,150,214,240,226,120,112, 89,248,210,165,114,113,111,131,168,210,185,222,
+178, 42,210, 8, 19,104, 88,237,127,157, 35, 31, 51,117, 49, 9,205,126, 78, 56,233,240,206,217, 23,163,102,150,178,112, 56,220,
+ 48,158, 93,160, 88, 24,169, 54, 99, 84,111, 54, 27,230,227,222, 94, 44,169,174, 33, 46,243,222,131,226, 90,165,180, 10,173, 34,
+163,167,235, 7,134,190,163,186,145,105,190, 54, 83, 93,112, 68,111,234,219,172, 54,109,211,164,102,123, 43, 19, 53,205, 12, 30,
+198, 46,224,194, 25,231,231, 3,239,188, 57, 66,173,124,240,254,129,146, 78, 44,115, 35, 33,104,241,204,121, 34,196, 96,201,142,
+154,172, 82, 26,236,133,149,106,166,148,134, 84,104, 62,211, 90, 36, 68,165,147,194,178,156, 56,180,145,158,108,136,215, 20,137,
+179, 34, 93,196, 69, 59, 56,106,200,248, 26, 57,238, 79,132,222,227,197,161, 36,106,137,184,126,125, 12,104, 35,118,129,164, 66,
+ 44,137,185,100,186, 93, 88,105,154, 59,136, 29,130,160, 82, 81, 31,208,206, 30, 27, 53, 71,134, 26,104,237, 14, 84,168, 62, 18,
+183, 59,123,101,114, 36, 59,147,222,104,201, 28,136,248,112, 64,147, 77, 27,194, 24,233,180,152,164,131, 8,206,156, 6,217, 5,
+124, 95, 73,217,130,177, 99,115,198,236,239,192, 47,142,190,111,104,113,104,240, 72, 47,198,203,112,106,210, 45, 17,186, 24,127,
+230, 87,232,167,223,176, 90,215,174,183,115, 4,255,217, 81,217, 58,183,158, 29,193, 51,244, 29,219,161, 3,160,247, 6, 0,250,
+161, 81,183,117,156,112, 63, 58, 17, 88,113,173,121, 13,215, 54,251,186,228,250,230,196,124,253,130,211,180,167, 11,194,238,222,
+ 5,174, 31, 73, 21,180, 86,230, 21, 41,142, 42, 45, 25,144,201, 46, 28,197, 88,244,101,177,243,196,153, 64, 43, 83,104,165,208,
+106, 51,221,248,169,216,180,170,158, 40,181,177,148,108,121,179, 92,145,102,240, 36,205, 13, 37,114, 76,208,186,202, 54,118,204,
+ 68,114,223,136,197,209, 74,228,148, 15,244, 98,159, 17, 21,135,107,153, 86, 29,157,223,208,188, 82, 59, 19, 24, 57, 23,153,211,
+158, 14,161, 91, 65,145,140, 29, 45,219,154, 60,116,194, 50, 45, 38, 24, 91,153, 82, 65,109,134, 78, 83,187, 97, 57, 12, 72,111,
+163,235, 98, 35,118,111,234, 79,219,155,136,241,183, 9,148,102,212, 42, 17,143,183,118,153,197,214, 90, 69,171,172,151, 4,197,
+117, 98,135,165,179, 81,119, 45, 5, 87, 26,234,189,101,216,138,237,144,181, 53, 11,239, 52,104, 4,196, 41,222, 53, 8,130,170,
+ 16,157,144, 83,182, 3,212, 9,205, 25,126,214, 55, 11,237, 41,160, 69, 9,107, 87,183,161,116,226, 64, 43,185, 88,175, 54,186,
+245,128, 44,217,166, 9,209,110, 96,181, 53,114, 89,209,153,234, 8,120, 11,137, 52, 71,108,129, 89, 51,139,154,139, 26,113, 72,
+243, 20, 50, 62, 10,154,131,229, 13, 80,194, 92,241,155, 96,127, 24,170,144,114, 37, 70,165,106,198,121,143, 68, 37,210,129,102,
+ 83,188, 98, 52,181,119,222,249, 18,155,190,231,221,247, 30, 83,150,100, 31, 20,231, 63, 9, 2,170,179,177,120, 16, 35,119,125,
+124,123,195,146, 50, 33, 4, 82,201,230,106, 30,162,153,223,106,163,208,112,201, 42, 99,211, 97, 33,247, 74,105, 79, 25,150, 13,
+211,146,200,189,253, 28,143,143, 23,104,205, 26, 9, 45,179, 44, 11, 89,149, 66, 93,117,180,141,229,228, 9, 87, 61,193,207,156,
+191,250,128,167,127,253, 30,239,126,231,235,132,254,156, 94,192,135,136,247,145,224, 61,195, 24,240,253, 14, 13,247,209,211,129,
+ 52,221, 48,151, 19,126, 24,208,121,161, 74, 69, 80,186,206, 51,158,157, 49,205,197, 62,115,162, 72,140, 56,173,252, 23,191,252,
+107,108,199, 31,140, 16,251,174,163,239,186, 79,126,252, 27,191,249, 95,242,159,254,228,143,120,113,253,132, 37,103, 66,188,199,
+217,121,230,201,251,239,241,241,211,143,248,254,211,107,254,199,127,250,235,252,206,239,254, 33,215,183, 7, 30,172, 97,160,148,
+102,110,175,247,156, 93,108,184,119,255, 62,205, 85,238,110, 14,236,247, 71,206,118, 35,231,155, 13,115,158,113,169, 90, 54, 67,
+196,242, 37,193,177,217, 12, 60,124,237,156,175,254,242,207,179, 45, 35, 14,225, 88,238,120,237,245, 55,152, 78, 7,190,253,141,
+111, 35,178,165,184, 76,203,109,149,247,216, 31, 98,240,156,166,140,150, 70,205, 21, 55,220, 17,198, 66,215, 5,196,123,106,186,
+230,213, 11,229,193,182,241,234,133,224,124, 64, 85, 62,249, 22, 11, 3,236, 98,103,196,197,176,162, 91,233,209, 34, 60,190,113,
+ 28, 82,199,249, 54,114,170,176, 9, 30, 57,205,156,106, 35, 45, 71,115,168,111, 70,251,179,136,160,213,129,120,134,221, 5,183,
+119, 31, 83,115,161,235,251, 85,225,153,237,101, 38, 66,231,189,217,237,188,167, 11,194,232, 58,234,148,168,190,225,162,179, 9,
+ 66,236,137, 94, 57, 29,102,156,243, 52,231,105, 53, 83,188, 85, 49,247,139,162, 50,176, 57, 59,231,141, 87, 35,155,251, 61,251,
+199, 19, 55,119, 39,114,182,170,102,170,246,197, 92,251,192, 86, 60,157, 12, 44, 46,179, 44, 14, 98, 98,104,129, 41,173, 85,219,
+174, 67,124, 66, 17,242, 58,133,208,214, 19,218,128, 84,165, 95, 39, 33,181,154,119,186,206, 29, 93, 39,244, 81, 32, 41,185, 56,
+202, 97,194,109, 55,182,143,214, 74,107, 30,150,202,208, 65,114,133, 62, 10, 37,103,218, 70,200,205,211,171, 35,233,132,250, 70,
+239,172,131,174, 37,225,179, 16,194,198,148,188,121, 33, 12, 17, 90,164, 21,165,206, 11, 85, 27,213, 23,194,176, 69,221,140, 6,
+207,232,183,132, 54,225,154, 61,152,244,120,160,116, 17, 52, 33,174,178,137, 29,139,131,238, 44,154,197, 47,207,204,171,189,109,
+ 24,140,252, 24, 98, 32,217, 93,145,224,212,132, 91, 1,170,135,232, 10,193,143,182,155,254, 25, 14,244, 19,176, 89, 15,208, 35,
+112,156,138, 77, 87,117, 53, 86,126,102,118, 54, 91,219,184, 6,241,167,116,223,253, 79,154, 8,172,255,187,255,145,191,189,158,
+245,148,125, 64,230,192, 48, 70, 62,255,202,149, 9,193,128, 5,155, 32, 56, 32,175,151, 0, 89, 91,111, 47, 93, 35, 75,174,246,
+136,109,138, 86,229,176, 44,246,247, 22, 71, 93, 10,243,179, 61, 78,158,144,247, 51, 1,101, 84,152, 22, 7,235, 67,180, 81, 25,
+123, 88,230,192, 60,207,132,188,224,220, 57,120,193,231,231, 56,109, 8,145, 37, 37,146,191,166, 16,169,203,129, 57,120, 74,128,
+ 94, 78, 56, 63,160, 51,168,156,112,120, 40, 14,183,137,232,210,161,238, 72,117,149,160,133,178, 20,188, 84,104, 91,230, 67, 36,
+189,247, 17, 31, 15,151,118,168, 59,111,187,107, 45,197,246,199,110, 37,169,137,141,148, 69,237,213, 38, 65,112, 77,236,214,236,
+148,205,253,215,184, 55, 46, 60,127,124,205,169, 88,154, 84,170,251, 36, 53, 46,212, 85,101,106,149,145,210,204,175, 46,226,237,
+189, 95, 45,217,222,104,198,120,119, 38, 89,209, 21,251,162, 84,106,182, 15,148, 11, 14, 13,224,242,202, 1,244,110, 77, 58,234,
+ 75, 27,186, 49,235,155,208, 58, 11,209,181,182, 38,192,157,128,175,182, 22, 48,224, 59,218, 10,170, 74,107, 30, 9, 66,110,118,
+ 9,240, 30, 51,189,149,180, 42, 42,253, 58,106,244,148,100, 7,152,147, 98, 88,206,218, 96, 81, 58,103, 99,208,170,216,205,168,
+100, 58,245,132, 94,105, 98, 47,140,232,172, 37,144, 37, 91,122,116,101,222,233,250,169, 18,132,183,190,240, 54,195, 56,240,189,
+239,189,203, 33, 37,134,110,164,143, 29,185, 20,243, 25,163,228,101,226,246,214,155, 33, 46,152,167, 57,101, 35,227,213,210,200,
+ 41, 17, 98,199,249,213, 37,181, 86,168, 51,173, 66, 90, 10,141,196, 49, 39,134,227,145, 83,116, 52,239, 63, 33,238,213, 6,165,
+206,228, 50, 83, 75,161,212,130,163,145,151, 74,154, 39,150,231, 31, 19, 54,142,171,123,231, 12,187, 29,191,242, 75,191,193,146,
+ 61,183,211,129,105,127,205,148, 27,249,116,164,164,132, 11, 17,156,242,240,242, 21, 74, 90,136, 69,120,112,113, 73, 14, 71, 94,
+ 28, 28,197,159, 16, 9,204,211,204,213,249, 57,131,143, 60,190,185, 35, 58, 8,155,142,205,249,229,223,250, 7,253,236,236,140,
+ 55,222,124,133,143, 63,124,204,180, 63,240,238,199, 47,248, 39,191,249, 53,110,238, 30, 19,187,198,183,191,241, 61,246,255,232,
+171, 28,231,180, 94,182, 28,243,205,204,105,127,199,254,120, 96, 90, 14,148,101,225,193, 43,151,184, 93,227,238,144, 13, 97, 28,
+ 29,154, 13,113,252,242,146,170, 41,241,218, 91,111,240,181,255,250,159, 82,239, 14,244,165, 82,242, 66, 12, 29, 67,191, 97, 51,
+108,152, 31, 63, 99, 19, 59, 66, 63, 82,202,204,220, 47,182, 39,173,142,139,152,136, 57,115,229, 79, 68, 14,140,125,161,239,206,
+120,244,100,207, 23,223,190,207,231,223,112,204,143,159, 17, 46, 46,141,205, 80, 33, 86,243,120, 59,169, 44,174,193,198,211, 19,
+ 32, 4,194,166,195,221, 38, 56, 19,150,187,196,205, 93,198,133, 13,231,195, 57,161, 84,168, 74,212,194,205,109, 69,169, 76,211,
+ 29, 34,202,184,187,132,102,204,119,233, 28, 37, 85,134,126, 67,209,163,129,155,154, 7,239, 88, 45,204, 54, 6,119,230, 93,151,
+206,227, 99, 79,118,149,232,123,106, 41, 84,117,212, 82,216, 79, 21,161, 90,221, 78,132,162, 48, 32, 76, 84, 22,223, 19, 55, 59,
+206,207, 2,157, 84, 62,250, 96,207,233,102, 97,154,103, 74,237,241, 33, 82,164,176,180, 74,153, 42, 97,240, 52,151,236, 59, 33,
+ 39,118, 46, 16, 9,204,173,210,121, 40, 57,127,114,169, 46,181,224, 17,188, 79, 56, 47,196,110,139, 27, 35,156, 38,124,139,248,
+146,168,222,248,234,209,121, 22, 10,157,143,208, 57,106, 73,136,136, 17, 21,235,130,120, 27, 97,163, 13, 87, 77,197, 27,219,186,
+150,104, 25, 33,227,188,146,178,226,221, 25,137, 59, 10, 29, 73,149, 24, 55,224, 22,219,173, 10,200,224,201, 53,209,137, 71, 36,
+226,146, 25,223,134, 81, 72,117,166, 52,199, 86,108, 53, 55,229,194,216,197,149, 20,185, 48,107, 68, 75,101, 57, 45, 70,169,220,
+ 88,250, 57,120,152, 5,235,115, 23,243,169, 55,177,118,146,184,138,211,130, 22, 40, 62, 48,244,221,207, 68,126,115,134,158,255,
+193, 69, 26,251,238, 47, 43, 0,167,143,241, 51, 59,212, 75, 81, 92, 45,150,123, 10,159,177, 22,181,169, 53,183, 4,235,246,175,
+ 78,249,176,254,247,229,127,226,203,255,211,238, 71,110, 15, 63,178, 98,168,187,136,137,187,237, 61,255,193, 43, 23,124,243,235,
+133,116,247,156,206, 57,114, 20,166,156,168,116, 68,157, 0, 79, 41,133, 67,190,193, 95,108, 24,117,228,116,187,103, 92, 34, 55,
+181,208,188, 80,124,193, 43,140,178,195,199, 35,174,141, 52, 6, 98, 59, 80, 92,162,158, 38, 66, 27,232, 6, 79,105,141,141,246,
+ 84,122,146,155,105,174, 32, 5,156, 27,112,113, 36,178,144,253,194,215, 15,137,119,255,245, 95, 82,142, 95, 39,120, 31,144,151,
+135, 81, 19,123,181,161, 80, 65,157, 88, 8,161,130,203,106,125,116, 26,184, 70,118,145,207,125,249, 87,249, 31,222, 89,248,227,
+223,253, 15,124,253, 90,105, 75,181, 32,130,179,125,151, 45,217, 61,181,218, 66, 95, 80,162, 40, 69, 87, 35, 91, 19, 35,200,173,
+221,116, 95,141, 23,239,229,101,229, 77,105, 98, 35,110,106, 53,162,155, 91,143,240, 44,248,206,210,128,173,217, 17,169,206,174,
+ 3, 53,155,223, 92,116, 69, 16,198, 8, 43, 52,163,174, 59,199,128,162,222,236,107, 37,151, 79,104,115,100, 51,204, 41, 74, 43,
+224, 67,179,253, 23,130,115, 38,135,137,222, 58,245,234, 5,223, 11, 78, 35, 81,140, 80,167,213,254,249,174,239, 87,239,174,176,
+ 52, 33, 52, 51, 64, 69,137,120,223, 67,104,232,100,187, 65, 71, 67,164,195,121,229,213, 55, 94,165,235, 59,190,243,157,119,121,
+113,119, 68, 66, 64,130,133,231,188, 19, 66, 23,120,122,243,204, 46, 58, 17,150,197,126,109, 93,133,172,133,171,123,247,248,210,
+231,223,166,223,142,124,248,193, 7,136, 15,220,221,158, 8,205,184,216,173,155, 56,228, 4, 39, 35,226,137,116, 70, 94,106, 88,
+216, 9,152, 15, 51,237,101,118, 65, 3,167,195, 45, 50,156,227,124,199,221,243, 39, 60,250,246, 55,141, 96, 21, 58, 54,195, 5,
+103,231,247, 12,252, 83, 46, 13, 52, 84, 10,167,227,173,217,138, 28,108,182,155,213,172,215,115,207,119, 60,187, 89,168,100,206,
+119, 3,189,247, 84, 93, 12, 36,227, 26,154, 26,211,225,248, 83,172, 81,133, 52, 21,118,231, 87,208, 18,105,233,233,183, 15,209,
+149,172,246,238,163,239,243,236,110,194, 85, 71,154,142, 28,151, 45, 13, 56,205,139,173, 77, 90,224,249,237, 29,139,102, 94, 63,
+191,162,247,149, 82,204, 81,223,196, 35,162,184, 98,140,241,165,101,158, 63,187, 97,186,153,185,186,122,149,235, 39,239, 50,140,
+ 14, 87, 51,159,127,243,171, 8,240,253,231,215,120, 81,122, 61, 90,182, 4,143,180,198, 23,198,231,120,157, 73,163,240, 96, 87,
+ 8,109, 65,189,227, 46, 45,148, 71, 11,191,250,155,111,194,233, 49,213,193,195,171,130,139, 61,167,131,131, 14,216,246,224,149,
+174,234, 58,202,245,132, 24,113,110, 68,130, 25, 15,143,183,133,219,195,196,249,189,183,136,221, 22, 14,215,148, 83,101, 18, 11,
+140,122,231,200, 57,155,171, 62,118,132,110,131, 72,160,181, 66,144, 8,227, 6,113,194, 52, 29, 17, 87,168,185, 80,106,166,243,
+ 17,117,150,192, 31,199, 13, 1,207, 16, 60,167,101,161,235, 5,217,158,113,186,155,168,243,132, 35,154,208,169, 40, 34,133, 41,
+ 43,179,107,184,176, 97,220,189,206,217,133, 39,250, 3,251, 67,193,105, 92, 17,211, 17,215, 26, 83,106,164,146,209,220,232,156,
+195,251,142,146,102,170, 23, 36, 6,166,162, 44,221, 66,183, 3, 95,148, 67,171, 72,139, 54,230,198,211,168, 12, 50, 16, 6,103,
+ 99,208,187,196,128,131,205,154, 9, 82, 33,116,141,101, 41, 84, 50, 4, 33,184,106,225,221,213, 51, 49,148, 13,201, 37,186,160,
+212, 58, 48,251,133, 94, 60, 93,141, 20, 81,106,141,168, 70, 98, 41,204,193,161,105, 97,187, 9,204,185, 33,197, 80,196,217,101,
+220,104,154, 94,106, 54,208, 11, 21,167, 91, 74,205, 8,149,105, 82,124,203,208,119, 76,173, 24,132,203,123,212, 45,200, 46,162,
+203, 96,102,189,206,104,149, 81, 43,116, 35,227,176, 78, 22, 23, 97,174, 21,162,167,223, 40,164, 66,245, 66,107,158,224, 26,190,
+247, 56,113,116,209,127, 38,132, 54,183, 10, 87, 68,149,226, 28, 49,126,118,227,247,164,186, 62,160, 28, 42,254,255, 23,184,243,
+159,250,241,223, 87,202, 90, 75, 51,162,156,107,196,240, 15,191,136,124,114,214,191, 12, 19,138, 49, 1,130, 19,170,154,129, 47,
+ 87,172, 53,177, 88,229,181,212, 72,110,142,208, 22,242,236, 81,173,168, 84,194, 24,200,115, 37,248,134,171,129,197, 5,182, 99,
+ 79, 21, 71,157, 26,241,204, 26, 21, 4, 79, 22,143, 78, 51,190, 55,205,106,157, 14,120,109,168, 90,112, 83, 28,204,211,145, 41,
+218,218,219,119, 61,233,242, 21, 38,132,224,176,194,187,174,166, 54, 93,123,228,118, 62,138,117,143, 81,243,141, 27,246, 1, 47,
+ 17,239, 42,207,191,245, 23,252,217,181,240,100,178,157, 96,176, 24,188,129,106, 20,131,169, 84,219, 97,171,151, 31,252, 53,103,
+ 48, 3,195,193, 54,235,151,250,178, 66,230, 86,133,233, 10,157, 11, 86, 12, 4,111,137, 92, 93,145,172,184, 70,203,150,127,192,
+ 85,180, 9,162, 66, 11,246,247, 87, 53, 41, 72, 21,104,174,128, 90,216, 33,231,178, 6,255,108,154,160, 6,180, 39,116,206,120,
+196, 89,137,226, 44,184, 81, 50,234, 28,185, 25,112, 65,196, 81,114, 93,131, 68,138,111, 74, 77,128, 20,186, 16,209,182,226,118,
+189,197,248,144, 72,104, 98, 1, 41,103,225, 31, 20, 92,172,248, 92,105,173, 33,205,252,206,205,182,238, 40,149,203,251, 15,248,
+213,221,134, 71,143,190,207,163,247,159, 90,190,176, 42,103, 87,103,252,252,207,125,129,247,223,251, 62,143, 62,122,198, 40, 27,
+180, 21, 51,214,105,195, 17,249,202,151,222,225,234,254, 22, 84,216,124,249, 43,180, 6,115,158,200, 83,194,187,142,221,110,224,
+241,147,143,120,250,244,104,191,155, 50,211,133,145, 70, 64,235, 66,174, 51, 57,103, 28,214, 71,173,181,218,120,191,156,232,117,
+228,250,250,142,126,247,128,216, 15,204,121,207,237,221, 11,230,156,137,181,145,171,141, 25,251,184,193,139,103,232,133, 41, 85,
+ 52,216,103, 1,233,232, 46, 29,113,138,180,226,240, 49,174,174,110,143,143,141,211,146,137,161,240,245,191,252, 11,190,246,181,
+223,160,239,187, 31,251, 7,237,253,247, 62,228,131, 15,222,231,181, 87, 95, 99,220,237,192,111,120,254,228, 9, 76, 13, 87, 34,
+199,219,103, 60,122,247,125,148, 70,231, 34,117,105,236, 79, 51, 23,187, 45,173, 66,109,141,128, 48, 79, 11,183,113,143, 70, 79,
+175,158,227,146,168, 90, 44, 83, 82,170,125,246,188,141,209,238,158,126,200,253,205, 6, 36,147,102,197,249,158,243,179,158,253,
+211,175,179, 13,143,136, 2,199,121,203,102, 19, 56,203, 21,164,242,202,189,133,233, 4,110,138, 52, 10,210,121, 72,194,243,103,
+ 71,182,247,207,216,141,133,235,239, 63,101, 28, 58,100,211,115,188, 25,169,229,110,229, 27, 84, 66,223,225,218, 14, 23,193,185,
+128, 23, 27,239,226,149,229,232,121,116,179,227,195,147,242,243,159,219,210,220,200,243,169, 17,155,178,204,153, 37, 79, 8, 16,
+199,136,184, 64,154, 22,212, 11,145,113, 85, 16, 87,130, 15,136,239,169, 49,147,107, 33,132, 72,169,101,109,190, 52, 66,236, 57,
+ 59,123,192,249,189,123, 12,227, 21,183,251, 39,196,222, 70,225, 81,140,222,168,181,146,138, 93,150,251,104,125,106,245, 35,219,
+225, 62,187,173,160,203,145,219,101,166,247,208,123, 79, 6, 74, 13,148,188,144,106, 70, 51, 28, 14,123,238, 93,245,252,220, 23,
+239, 49,207,129,103,199, 35,125,180,149, 95,142,133,187,155, 3, 47,174,175,137,126,195,235,175,188,202,177, 36,124,107, 4,215,
+ 16,169,104,139,180,156,240,126,196, 7,103,149,169,147,162, 20,124, 52,208,120, 71, 67,179,163, 9,196,173,208,138, 61, 54,212,
+ 37,106, 81,166, 90,169,109, 54, 36,167, 64,214,134,182, 96,235,188, 65,200,115, 3,215, 35, 52,234,172,196, 65,200, 65,112, 11,
+ 4,239,169,197, 19, 26,168,203, 68,215,152, 22, 37,236, 26, 44, 24,209,207, 53,134,190,103,113,133, 82, 33, 23,103,176,159,206,
+130,198, 13, 65,157,237, 69, 99,117, 36, 31,232,166,133,218,108, 53,210,162, 82,151,140,248, 64,206,153,236,133,141, 88, 11, 72,
+125, 79,109,235,247,175,243, 63, 51, 88,229,135, 14, 94,160,164, 98,185, 35, 32,126,134, 47,106, 49,118, 23, 77,173,170,247,233,
+139,132,252, 45, 63,231,186,254, 56,124,106,167,254,233, 3,119, 86, 88,166, 76,107,109,117,130,132, 31,170,186,125, 22, 64,218,
+ 92,204, 43,226, 29, 28, 74,101, 74, 74,144, 30, 55, 77,164,166, 36, 45,160,153,128,195,157, 2,141, 9,215,195,161, 58, 92,217,
+224,234, 45,161, 68, 90,107, 56, 58,246, 37,227,202,137, 74,163, 46,142, 48, 20,160, 67,150,194, 84, 11, 74,228,164, 19,174,101,
+ 70,191, 5,215,113,200,119, 22,104, 45, 11,210,237, 24,171,240,139, 95,220,242, 43,255,243,127,203,247,159, 94, 17,112,206,226,
+248,230,248,179, 95,200,108,227,110, 39, 43,216,197,131,120,143,150,182,150, 6, 5,239,149,252,226, 49,127,241,194,210,165,118,
+248, 11, 72, 4,193,210,211,110, 69,155, 54, 16, 53,196,107,105, 86,163,241, 56,123,193,171, 17,200,218,122,137, 48, 81,131, 29,
+ 82, 34,193,144,161,235,225,167, 78, 86, 73, 12,159, 48,174,113, 66,112,172, 85, 44,108, 7, 36,142, 32, 74,198,254, 61, 20, 19,
+ 97,212,102,216, 82, 93,245,173,130, 82, 74, 35, 68,161, 38,163,141,137,183,159, 79,158, 51,206, 59,130,218,184, 8,111,136, 91,
+ 39,142,214, 26,222, 91,127,190, 85,243,123,215,100,146, 25, 21, 65, 20,124,177,169,133,250, 96,105,222, 48,224, 37, 67, 51, 39,
+188, 23,104,209, 94,157,218, 48,152, 14,142,230,132,208, 18, 97,136,188,253,165,183,216,237,206,169, 53,115, 56, 45,156,157, 95,
+210,143,145,135,175,220,231,163,143,111,208, 82,233,134,184,122,163, 43,125,216,224, 98,100, 78, 86,193, 25, 70, 83, 93,246,253,
+ 14,189,104, 72,242, 60,127,254,156,187,187, 19, 14,165,204, 51,205,121,178, 59,130, 55, 52,173,106,229,101, 35,194,225,112, 93,
+ 88,237,123,133, 89,149, 23,143, 31, 49,205, 47, 24,135,183,184,216, 92,114,113,246,144,219,219,103,244,206, 48,164,115,177, 3,
+101,217, 31,121,243,245,175,130, 6, 90,154, 41, 65,104, 45, 32,203,108,122, 95, 23,168, 75,165,219,120, 42,106,142,240,224,241,
+ 10,143,191,255, 33,255,230,223,253, 91,254,249,127,243,223,209, 5, 79,252,212,232,239,250,249, 53,127,240, 7,191,199,233,238,
+150,235, 6,178,143, 76,169,241,246,195,192,197, 89, 79,107,149, 37, 87,254,245,255,241, 59, 72, 28,105, 34, 44, 9,134, 93,207,
+ 63,249,173,175,240,127,253,135,111,241,244,238, 22, 51, 86, 11,105,177, 26,166, 15,144,150,180, 34,132, 65, 42,104, 23, 9, 94,
+120,184,187, 36, 68,199,205, 71,239, 18, 58,225,112,154,121,253,231,190, 68, 44, 79, 56,119,223,100,120, 53,177,191,117, 12,187,
+ 91, 54, 99,166,157, 58, 62,122,218,113,151, 3, 23,103, 71,182, 15, 28,233,197,108, 19, 37,231,120,126,211,120,248,246,142,116,
+216, 35, 45, 65,236, 56,220,118,224, 50,190, 87, 52, 85,154, 44,116,125,135,122, 65, 7, 65,178,210,150, 68,206, 71,188,122,158,
+ 94, 15, 60,158,206,232,251,142,155,219, 59,196, 39,202,162,168, 43,102, 64,212, 12, 78,232,194, 64,236, 70,235,237, 47, 9, 25,
+ 35,173, 57, 68, 76,119,107,169,183,142,150,109, 28, 26,215, 44, 71,109,141,205,112,193,120,190,227,193,229, 61,230, 35, 76,185,
+225,155,173,128,232, 4,124, 32,169,221,144, 5,199,210, 26,125, 23, 25,119,247,233,134, 30,209, 76,201,137, 60, 85,234,208,177,
+144,232, 53,178, 52, 37, 85,135,150,142,170,153,172,149, 39, 79, 15, 44,105,207,151,223,124,157, 23,127,249,140,143,158,156, 24,
+ 98,228,233,205, 19,110,158,223,225,154,145,229, 92,239, 56, 59,123, 96,181, 75, 38,240, 13, 41,222, 12,138,100,150,230,200,197,
+225,135,128, 43, 5, 85,143,108,140,194, 85, 74,181,239, 29, 21,234,146,104, 40, 41, 20,180,244,116, 77, 13,104,163, 30,151, 43,
+211, 18, 80, 89, 24, 46, 34,170,137, 84, 10,204, 21,113, 29,213,121, 92, 81,164, 21,170, 20,186,230,241, 14, 78, 53,177,137, 30,
+178,183,106, 97, 62,225,182,129,124,108,116, 97, 68, 27,196,224, 40,157,173, 11,187, 97, 64, 93, 37,157,236, 21, 47,234,140, 59,
+191,233, 33, 10, 12, 30, 21, 79, 89,167,135,226, 35,199, 19,196,170,196,141,241,197,131,119,168,203, 54, 80,246,202,184, 27,127,
+ 50,148,229, 83, 7, 96, 94, 15,186,254,101, 71,125,125,149,134,245, 16, 45, 73, 73,203,178,230,171, 62, 91,233, 74, 45,109,101,
+111, 56,179,168,253, 4,248,139,251,145, 31,251,191,101,223,142,109,101,168, 24, 63, 4, 17,124, 63,124, 42,112,103, 23,149,237,
+167,113,178,107,134,224,211,193, 59,247, 83, 38, 5,211, 60,211,218, 66,195,227, 87, 7,130,235,149,124, 91, 80, 58, 58, 47,100,
+ 61, 34, 62,160, 93, 79, 57, 28,105,197, 83, 66, 15, 67,164, 78,141,230,103,124, 56,163,164, 66,235,102, 98,128,232, 27,126,240,
+236,143,130,204, 71, 2,231,200,118,135,182, 35, 29, 14,189,244,212, 69,113,243, 76, 44,166,218, 29, 7,129,141,178,193,241,213,
+215,183,124, 65,206, 89,206, 49,162, 92, 67,241, 47, 3, 96,120,178,227, 19,222,187,119,110,149,184,120,154,232, 15,232, 57, 5,
+130,120,226, 90, 13,123,249,101,216,164,125,178,143,111,168,225,103,197,222,248,205, 53, 11, 70,172,157,115, 47, 74,171,197,110,
+130,171,222,213, 85, 71,109,198,141, 86,209, 53,125,105,123,138,182, 34, 85, 95, 86,219,156, 98,176, 14, 21,219, 49, 97, 47,246,
+134, 35,169, 65, 32, 80, 49,248,189, 84,208, 70,117, 54,150, 67,188,133,201,104,148, 82, 77, 60, 34,107, 23,163,218,175, 71,173,
+ 10,222, 83,197, 33,162,248,232, 9, 56,114,158, 41,217,211,247, 27, 74, 49, 45,107,213,134,167,208, 36, 80,115, 69, 54, 17,130,
+179,169, 68, 3,159, 87, 37,173, 20,124, 11, 20,177, 47, 17,141,118, 33,104,174, 64, 21,131,245, 7, 97, 94, 50,170,194,195,123,
+247,136,131,167, 84, 49,226, 83,106,156,157, 95,240,234,195, 11, 30, 63,189, 37, 47, 70,246,138, 93,224,236,226,156, 32, 80,106,
+163, 73, 99, 33,211,240, 48,191,236,114, 86, 62,122,250, 17,143,159,191,160,243, 1,156,193,115,178, 90,231,190, 54,161,185,117,
+114,211,148,110,231,173, 81,224,172, 25, 17,170,224, 78, 19,154, 10, 79, 63,252, 14,199,124, 66,157,195,227,145, 40, 12,177,163,
+ 15, 27,206,118,247, 56,138,112,182,219,177,159, 38,134,176,163, 54, 33,170, 50, 79, 71,235, 27,123,147,205,120,223,184,221, 79,
+148,234,232,123, 33,137,227,120,218,243, 71,255,207,127,228,155,223,248, 14,247, 46, 47,120,112,239,146, 47,189,243,121, 88, 22,
+126,239,223,255, 33,239, 63,126,204,188, 63,112, 58, 77,196,205,134,219,155, 59,254,223,161,241,171, 95,126,157, 40, 66,109,202,
+120, 54, 82,179, 99,105,133, 24,160,204,153, 15,223, 59, 49,149, 25,175, 6,199,120,137,167,240, 78, 89, 84,215,254,181,224,130,
+ 17,178, 28,142, 94, 60,103,151,247, 72,251,138,187,223, 56,223, 69,222,184, 55,240,149, 47,110,233,239,254, 35, 26, 23, 14, 93,
+ 79,139, 39,134,169, 80,138, 33, 64, 47,174, 64, 36, 89,130, 41,247,168,159, 16,215,113,183, 20,138,115,124,238,141,135,148,235,
+ 15,233, 66, 79,115,158, 90, 19, 93, 95, 56,165, 72,208, 72,136,141,148, 19, 54,106, 50,175,114, 62, 57,110,246,142,167,215, 29,
+251,101, 96,244,202,112, 21,160,235, 56, 30,102,156, 47,180,230, 41,115, 66,124, 71,236, 61, 33,122,243,219,171,176, 28,246,220,
+ 29,239,184,188,188,180,133, 87,174,228,102, 47,205,214, 15,164,154,104,106,248,206, 86,149,243,243, 43,118,155, 11,198,205, 25,
+ 47,158,191, 71, 43, 11,169, 26, 24, 67,168,120,107,151,161,186,126,198,125,160, 31,175, 8,113,196,187, 74,107, 25,145,104,137,
+241,140,237,225,163,163,250, 68,178, 14, 4, 75, 58,226,125,227, 23,127,225,115,164, 60,243,231,255,249,187,148,165,242,252,197,
+ 19,158,127,124,141, 11,194,102, 24,113,193, 32, 27, 79, 30,189,135,255,252,192,118, 59, 90,218,183, 58, 36, 42,174, 23,131, 74,
+105, 71, 80, 8, 90, 89,180, 18, 11,244, 1,102,239, 9,126, 67, 45, 39,234,105,213,175,138, 9,125,134, 80, 41, 85,112,100, 74,
+ 22,212,213,117, 28, 15,237,164,230,147,112, 29,161, 11,204, 62, 19,154,224,155,218, 84,175,223, 80, 45, 73,134,111,149, 84, 71,
+144,108, 50,169,214,163,139, 97,176,203,148,169,222, 49,248,145,214, 42, 50, 40, 77, 19,109, 47,248,234,169, 99, 69, 6,135,207,
+133, 69,103, 34, 91, 91, 48,204, 11,226, 60,101,191, 16, 8,184,161,225,134,141, 77, 55, 91, 35,231,198, 38,142,102, 27, 44,208,
+253,132, 49,185,251,145,157,114,248, 17,142,155,251,212,143, 51,112,147, 77, 6,148, 90,161,113,142, 23, 0, 0, 32, 0, 73, 68,
+ 65, 84,165, 15,145, 69,127,112, 0, 46,216,134,232,103,141,206, 45,185, 82,138, 77,119,253, 63, 96, 2,224,126, 28,237, 77,219,
+ 58,101,244,156,125,202, 84, 23,249,225,154,157,124,234, 66,243,147,254,153, 63,122,168, 79,192,225, 52,211,202, 68,201,153, 30,
+ 72, 90, 44,204, 24,132,150, 23,188, 4, 66,232, 8,203,196, 41, 47, 52,141,148, 58,209, 82, 35, 72, 97, 16,225,168,133,224,102,
+ 52, 24,143,164, 86, 91, 69,248,147,152,183,161, 8, 69,178,181, 73, 74,162, 15,158,244, 60,209,188,208, 74, 37,186,158, 83, 77,
+116, 94, 24,171, 35,151, 68,191, 25, 1, 79,106, 16, 60,158,230, 44, 92,224, 94, 26,115,212,217, 72,219, 16, 13,171,200, 69,215,
+145,181,141,171, 85,130,237,157,155,237,216,197,123, 11,190,181,213, 8,227,141, 72,231,197, 58,133,205,173,213, 47, 49,212,107,
+203,213,168, 72, 47,251,144,162,120, 9,182, 71,199, 17, 58,135, 40,148, 98,123,115, 39,209,122,181,171,130,209,254, 53,214,215,
+108,222, 38, 10,157, 4,170, 87, 74,179,241,187,119,166, 46, 44,206,172, 85,110,221, 79,138,179,215,246, 74, 93, 52,176,136, 96,
+248,197, 82,215,202,213,218,159,198,234,106,150,210, 95,236, 38, 31, 87,173,234,186,178,168,190,224, 75,195,181,128, 43, 54,157,
+104, 8, 46, 91,213,199,135,206, 94,193,226,104, 20,230,214, 80,173,132,106,247, 27,234, 58,133,112,142, 42, 21, 71,135, 68,197,
+103,187,116,100, 53,253,161, 58, 75,113,123, 31,248,202,151,222,225,254,195, 3,185, 38,134,113,100,211,111,233,198, 14,209, 66,
+ 43, 17,223,155,186,146,220, 8,206, 28,218, 55,251,107,110,175,111,108, 76, 39,142,136,167,170,251,132,205,223,124,163,101,251,
+253, 84, 17,188,115,212,154,152, 21, 54, 97,160,245,149, 83,153,184,188,119,159,216,117,228,230,168,243, 76,106,153, 99,157,201,
+165, 66, 61,113,188,121,142,139,157, 9, 71, 92, 37,173,230,168,165, 40,172,181, 67, 4, 74,104,248,248, 50, 51,224,200,115,195,
+105,166,133, 98, 59,112,247,148,180,191,227,253, 15,222,229,207,254,226, 79, 41, 83,102, 90, 18,203,124,203, 60,207, 44,173,176,
+153, 50, 85, 23, 62,248,254, 51,126,233, 11, 15,108,100,223, 10, 55,199, 59,186, 56,178, 25, 7,230,211, 66,163, 50,205, 51, 85,
+215,117,144, 49, 73, 8,162,108,134,158,227,105,162,105, 37, 52,112,179,210, 44,198,192,229,131, 75, 62,247,160, 35,184,202, 69,
+ 55,240,133, 87,110,120,235,171,255, 24,233,133,229,100,149,147, 33, 85,102,231,168,190,209,242, 57,170,202,217,246,136,182, 64,
+229,138,114, 56,208, 82,133, 51,199,147, 23, 11, 23,151, 27, 6, 89, 56,201, 1,221,192, 48,128, 31, 6, 90, 43,148, 59, 51,133,
+157, 52, 48,212, 74,217,207, 76, 75,230, 46,119,188,127, 29,153,231,158,180,114, 21, 36,118, 92,157,141,212,234,185, 93, 14, 36,
+ 38,242, 2,121, 57, 89,109, 47,120, 11,123,182, 96, 59, 56,204,212, 54,197,158,126, 99,175,152,224, 26, 45,118,116, 98,198, 66,
+117, 2,146, 41, 73, 56, 27,122,222,122,237,138,139,139,115,190,245, 87,123,136, 66,155, 11,115, 58,225,102, 24, 55, 29, 62, 10,
+117,113,136,143,244,103, 15,136,103, 59, 68, 11,129, 5,231, 60,115,134,166,214, 88,169,185,225, 90, 50,233,156, 64, 37,115, 74,
+ 51,175, 92,116,252,247,255,236,171,124,253,111,222,227,247,255,240,175,185,119,241, 42, 95,124,243,117,182,177,231,241,243, 23,
+ 28,150, 76, 23,157,141,214,181,241,228,241, 99,222,249,252,231,112, 46, 16,157, 18,139,210, 34,150, 18,198,170,105,181, 6,134,
+ 2,205, 43,139,102,243,171, 91,210, 21,137, 74,213, 68,206, 38, 98,129,198, 82,214,183,154, 24,246,147,222, 19, 22,161,229, 74,
+127, 30, 12,126, 19, 5,169, 66, 91, 38,180, 10,221,184, 33,100,161, 48, 35, 18,232,253, 64,106,230, 63,112,209,163, 29,232,146,
+ 16, 55, 34, 90,112, 29,104, 84,220,177,162, 62, 50, 77,149,209,117,200,232, 80,153,209, 56, 26,217,178, 22, 90, 72, 44, 71,203,
+ 18,117,113, 93, 81,141,158,221, 38, 48, 55,101,174,137,179, 94, 16,177,138,177, 52, 79,232, 59,198,177,251, 59, 31,136,159, 62,
+192, 62,141,171,233,214,106,121,106,213, 30,105, 94,217, 14,225, 39,190,144,255, 94, 33, 57, 32,167, 68,211,102,174,144,207, 48,
+ 85, 95,212, 86,177, 65,148,248,119, 64,196,254,232, 95, 13, 63,102, 77,192,143,132,235, 20,152,115,162,104,165, 86, 97, 86,168,
+222,218, 21,210,132,156, 10,245, 48, 81,181,209,141,231, 84, 89, 80,122,144, 70,190, 62, 18,206, 3,231,117, 67, 77, 66,199, 9,
+ 63, 56,138,139,212,101, 97,246,208,230,163, 57,217,135, 13,131, 42,167, 85,169,155,197, 19,171,163,185,140,107,194, 38,108,168,
+117,134,147,226, 98, 88, 45,147,149,114, 82, 66,117, 47,181,169,206,196,239,106,175,113, 93, 83,143, 77, 60,226,204,181,110,190,
+150,182, 6,119,214, 78,183, 83,112,230, 18,246, 56,147,148,180, 8, 78,136,174, 25, 32, 64, 27, 62,172,149,154,214,112,226, 41,
+174,174, 92,121, 91,158,139,179,157,116,109, 25, 39,150,202, 38,216, 24,221,240,178,182,131,111, 52,210,122,208,135, 0,117,174,
+ 16, 28, 21, 71,171,206,190,152, 0,180,179,221,187, 54,242,210,108,117,192,203, 73, 67, 67, 34, 68,132,172,150, 90,237,229,255,
+ 99,237,205, 98, 45, 75,207,243,188,231,251,135,181,214,222,251, 12, 53,116,245, 88, 61,112, 38, 37, 82,180, 76, 39, 82, 36, 74,
+148, 37, 37, 78,100, 9, 9, 32, 88,113,128, 0,214, 69, 46, 18, 32, 1, 2, 4,200,101,224,171, 92,229, 34, 64, 6,192,129, 51,
+ 8,200,128, 0, 70,224, 68,177, 69, 71,130, 16,197,178, 72, 81,164, 56, 72, 34,155,108,246, 60,213,112,170,206,180,247, 94,107,
+253,211,151,139,111, 85,117,177,173,144,138, 36, 52, 26,232,234, 83, 56,117,206,169,115,246,250,255,239,123,223,231, 89, 72, 65,
+226,112, 62,216, 78, 28, 65,107,125,168, 28, 52,135, 58, 86,161,107, 74,166, 17,156,167,149,138, 58,207,220, 20, 47, 74, 23, 61,
+174, 21, 27, 51,247, 1, 39, 17,231, 27,162,133,154, 29, 77, 10,195,202, 96, 38, 62, 58,124, 22,170, 52, 83,108, 46,240, 28,169,
+ 66, 63, 68,114,105,184,218,232,125, 68,139,146, 92, 65, 85,136,253,138, 39, 14, 6, 99, 59,135, 30,105, 86,211,171, 56, 99, 18,
+103, 59, 84,120,239,105, 90,112,222,190,118,226,252, 67,169, 67,140,129, 32,222, 38, 35,170,212, 44, 4,255,128, 9,174,248, 4,
+ 29, 22,232,201, 57,211,230,142, 91,119,239, 50,158,126,155,126,216,224, 99, 79, 23, 61,113,221,227,187, 53,155,213, 26, 65, 8,
+171, 3,182,121,203,249,253, 83,130,157,147, 40,121,182,190,123,244, 6,204,168,149,185,244,232, 62, 49,132,158, 81, 38,138, 8,
+190,236,205, 1,150, 12,120,225,189,195, 79,149, 41,237,184,156,246,108,199, 75,171, 29,145,201,187,204, 60,120,138, 54,238,140,
+ 39,188,242,246, 93,226,106, 69, 20,225,236,100,203,209,113,224,217,231,143, 77,147,153,205, 56,232,101, 32,185, 9,143, 18, 37,
+128, 15,104, 17,230,212,208,162, 38,210, 64, 81,129,227,131, 21, 63,249, 67, 55,184,249,116,230,221, 83,143,115, 23, 28, 29, 94,
+ 67, 14,110,146, 79,111,195,240, 12,180, 13,125,184, 96, 85,207,200,229, 10, 78, 58, 58,119, 6,171, 64, 58, 19,104,103, 56,151,
+137, 7,142,253, 88, 56, 61,175,124,252,211, 31,160,230,123,184,150,185,220, 59,134, 85,224, 96, 0, 55,122, 14, 14, 10,111,159,
+ 52, 94,127, 11, 14,214, 14,207, 33,231, 23,141,153,158,222, 5,170,239, 24, 6,171,202,141,185, 33,108, 8,226,152,234, 72,158,
+ 26,243, 52, 51,151, 76, 83,165,186, 74, 77, 25, 41, 91, 27,147,171, 16, 92,100, 26,119,224, 3, 33,246,139, 41, 14,112,129,206,
+175,200,204,164, 42, 92,185,118, 68,119,180,230,240,224,152,182,155, 24,167, 4,189, 1, 72,214, 18,153,200, 86, 67, 69,232,186,
+136,116, 43, 54,171, 35,250,224,112, 37, 49,207, 51,161, 63, 36,198, 64,214,104,135, 81,141,104,112,208,132,150, 39,198,201, 84,
+176,247, 46, 43,191,247,251, 47, 45,246, 43,229,206,221,119, 88,175, 27, 63,242,169, 23,248, 81,255, 33,190,250,226, 43,188,254,
+218, 29,214,174, 67,112, 76,211,196, 91,183,111,243,228,147, 79,179, 90, 69,147,174,204,149,232,134,197, 50,231, 81,241,132,230,
+217,107,182,126,187, 52, 90,171,172, 36,146,138, 9,167,106, 49,228,245, 28, 20, 47, 29,201, 57,186,117, 52, 10,228,174,208, 2,
+104, 31,105, 41,131, 58, 84, 61, 45, 55,188,174,104, 94, 73,173,146,107,194, 43,132,190,225, 58, 33, 54,135, 52,227,170, 51,103,
+162,219,224, 37,216, 42,174,122,116,191, 99,213, 7,116, 63, 83,116,192, 31,116,120,167,132,186, 34, 77,129, 18, 27, 97,180,117,
+ 95,136,221, 18,234, 83, 84, 26,109,182, 70,207, 16, 21, 23,173, 77,180,118,246, 90, 72, 16,196,117,198, 25,249, 75,224,167, 79,
+185, 34,205, 2,211,113,245,189,187,239,240, 23,124,168,151,130, 1,187, 98, 48, 27,202, 35,123,252,248,200, 99, 62, 63,178, 14,
+120, 48, 50,119,239, 67,194,126,207,175,139,210, 82,165,101,197,245,242,151,170,138,125,240,177,207,243,204,202, 41,179,135, 57,
+229, 69,128,212,200,187, 61,110,125, 72,214,153,189, 38,162, 40,171,174,177,203, 30,241, 14,167,197,166,122,251,153, 77,131, 34,
+144,106,135,248, 25, 95, 42,190, 53,166,150,141,219,226, 87, 20, 26,110,170,148,150, 12,173, 78,193,201, 64,107, 3,165,237,209,
+222, 83,242, 4, 73, 56, 8, 27,222, 26,143, 72, 56, 78, 78, 19, 65,181,162,213, 88,233,178, 40, 82,131, 55,219, 79, 83,227,157,
+179,116,199,213, 89, 74, 94,104, 6,154,193,129,154,177, 72,197, 82,216,136,221, 14, 16, 35,190,217, 62,253,193, 72,183,154,175,
+ 61, 40,190, 51,212,163,170, 25,201,106, 43,118,243,118,106, 58,206,102,112, 26, 84, 17,241,152,243,209,118,174, 56,115,142,183,
+172,104,176, 74,150,119,129, 89, 0,191,140, 80,155, 82,117,217,141, 54,197,105,163,169,144,106, 65,125,176,240,202,226,127,175,
+213,222,246,224, 59,168,180, 68, 88,184,242, 78,192,171,128,135, 92, 45,103, 64,107,232,242,173, 93,213, 92,238, 33,120,114, 85,
+171,130, 84, 51,187,249, 46, 16,154,162,146,104,193, 81,212, 66, 78,222, 89, 69,174,137, 16,177, 48,159, 56,232,250,222,130, 74,
+197,166, 25, 53,171,213,118,186, 64,244,158, 52, 11,173, 89, 95, 89,105, 72,232,160, 22,242, 52, 17,189,195,135,193, 32, 47,117,
+ 54,199, 47,198,218, 23,129,177, 38,198,113, 52,155,174,135,224, 59,186, 85, 79,223,247,236,118, 23,160, 22,242,168, 77,208,180,
+180, 2,156, 82,163,195,137,125, 60, 87,142,215,124,250,211,255, 18,183,222,126,147,251,103,119,153,247,151,220,191,191,131, 19,
+197,199, 64, 23, 34, 18, 35,173, 42, 87,175, 29, 83,212, 66, 65, 38,118,240,120, 9, 84,167, 84,201,212,148,153, 46, 42,171,227,
+ 3, 90,107,204, 83,193,119,150,234,236, 66,199,156, 19,167, 23, 23,236,199, 29, 36,165, 57, 33,239, 51,117, 46,156,207,149, 86,
+ 44, 85,156,198, 29, 5,165,150,204,119, 94,123,139,171,199, 27, 91, 39,133, 1,109,141,219, 39, 91,214, 49,154,194, 54, 55,156,
+ 15, 4,231, 8, 78,112, 62,224, 67,199, 88, 10,213, 43,145, 1, 93,110,172,162,153, 15,127,240,113, 62,248,194,134,213,234,194,
+210,211, 99, 38, 94,185, 74,222,159,161,231,223,180,131,111, 4,164, 35, 72,135,211, 45,184, 66, 43,160, 91, 65,231, 5,164,189,
+169,172,250,129,123,167,137,110,117,200, 83, 55,174,112,255,245, 55,160,121,166,226,232,178,103,188, 63, 50,109, 29,219, 82, 57,
+ 25, 3, 28, 30,113, 55, 23, 86,178, 38, 15,153,142, 72,240,176, 58, 94, 17,179, 9, 63,242,246,140, 57, 43,251,113,103,233,125,
+169, 20, 77, 76,105,102,183, 61,163,180, 66, 23, 15, 24, 86, 43, 66,173, 52, 49, 42,218, 56,111, 81, 46,216, 28, 30,219,172, 78,
+196,128, 23,106,135, 57, 39,194,213,227,199, 76,179, 59,108,248,218,119,190, 78, 89,146,248,234,150,201,139,115, 86,141,171,142,
+ 33,172, 88, 29, 95, 33, 68,197,101,155,132, 84, 13,203, 65,122, 34,202,154, 68, 99,154,103, 36, 5,196,121, 82, 77,164,150, 64,
+ 6,246,251, 11,190,252,245, 87,249,220,191,240, 49,254,173,191,245, 89,100, 74,124,249,235, 47,243, 71, 47,191,194,175,252,194,
+207,240,153,191,242, 97,254,201,111,253, 1, 95,250,195, 23, 81,241,196,174,113,121,113,206,181,195,107,180,254,128,230,109,125,
+225,164, 18,100, 77,118,150,187,217,251,134,120,193, 39, 15, 99,164,180,137,209, 55,251, 30,244,118,104, 5, 3, 3,229, 92,112,
+ 77,201,201,234,132,171,161,177, 45, 21,167, 6,175,170,185,209,165,137, 62,116,184, 67, 71,155, 43, 45, 87,112,198,233, 80, 7,
+105,106,248,104, 89,158,170,208, 73,160,133,108,108,125,215, 51,172, 6,114,139,168, 40,185,121, 84, 2,181, 37, 92, 22,130,239,
+ 17, 55,209, 38,197,187, 21,117,127,137,187, 22,108, 66, 55, 69, 66, 31,113,185,114,162, 35,171,216,115,221,119, 56,113,228, 86,
+172, 62,217, 34, 78,160, 45,225,176,253, 34,171, 92,201,123, 33,178,184,148,156, 30, 70,143,220,123, 15,197,162, 60,180, 56, 42,
+182,174,170,181, 46,176,174,225, 61, 57,203, 95,180,113,214, 32,213,130,115,142, 33,122,250, 71,198,239,241,125,247,118,247,255,
+ 49, 14,127,240, 64,159,129, 71, 19, 4,151,115, 33,231,100, 23, 59, 85,106, 93, 90, 30,203, 3,249, 81,174, 93,251,115,132,230,
+170, 66,200,153,210,178,101, 58,138,253, 63, 31, 42, 26,131, 53, 46, 66,166, 59, 56, 34,236,246,236, 79, 71, 88, 71, 58,157,153,
+ 71,135,244, 27, 66, 41, 76, 98, 95, 91, 57,190, 66,190,156, 81, 77,104,173,116, 94, 41,128,234, 37,101, 87,105,186, 38,116, 17,
+205,179,181,173,116,162, 85, 79,141,142,218, 28,226,122,138,143, 28, 68,229, 67,207, 60,206, 53,132,119,143, 58,130,151, 96, 72,
+ 62, 47,184,186, 48,132,213,152,201, 78,108,247,104, 15,251,102,227,119, 22, 45, 33,203, 45,125,233,181,138, 55,186,156, 87,191,
+ 16,233,140,132,230, 88,202,253,165, 17,188, 35, 99, 34,230, 7, 70, 31, 53, 74,235,242,103,250, 69, 82,176,140,216,155,129, 54,
+170,100, 43,245, 56,111, 52,160, 86,105, 73,136,222, 89,226,212, 91,248,172,168, 18,213,170,107,234, 50,218, 28,117,193,181,214,
+ 38, 86, 51,241,206,254, 50,139,221,254,171, 46,182, 57, 97,209,214, 45, 93, 93, 53,137, 75,171,182,110,144,210,240, 11,210,182,
+169,141,239,130, 55, 58, 85,197, 94, 8,135,222,240,131,222, 41,196, 64,163,224, 37, 82, 68,145,234, 8,206, 45, 1, 64, 83, 32,
+154,113, 73,232,131, 51,153, 77, 82,188,120,235,136, 59,161, 23,135, 39,146,188,144,165, 34, 1, 66, 54,129,128, 58,240, 73,141,
+ 20, 38,158, 82, 51,171,222,166, 6, 41,101,110,159,220,163,150,202,225,193,192,170, 27, 88,173, 6, 46, 79,183, 76,165,178, 90,
+247,108,142, 14,249,247,255,163,255,152, 31,249,216, 71,120,229,165, 63,230,127,248,239,255, 62, 47,189,252,214, 82,200,180,124,
+ 68, 23, 59,230,125,230, 96, 19, 17,102,238,223,186,205,143,255,216,143,195,167,254, 42,111,191,125,139, 34,153,221,253, 11,238,
+156,223, 35,231, 9, 45, 59,198,221,158,147,211,219, 92, 59,126,154,131,110,205,249,254, 46,113,115, 8,179,249,152, 3,142, 40,
+ 98,221,227, 80,209,224,136, 40, 79, 61,214,179, 27, 39,230, 84, 24,167, 70,196, 49,233,204,165,216, 33, 72,240,104,158, 73, 57,
+ 81,180,208,230,196, 79,253,244, 79, 51,167, 61,191,243,187, 95,164, 11,194,253, 91,247,185,118,116,204,193,202,130, 97,206, 69,
+154,122, 70,169, 72,129,121,202,148,105,182, 16,147,139, 6,161,200, 51,185, 85, 92, 5,233, 2,222,119,136,102,142,250,129,143,
+126,224, 10,235,112, 73,157, 51,199,125,133,110,141, 47, 74,125,231, 11,164,253, 27, 68, 9, 72,215, 83,171,210,202, 12, 93,135,
+107, 74, 25, 21,157, 3,185, 40, 26, 34,235,180,163,249,204,155,119, 70,174, 93, 61,228,229,215, 79,248,206, 87,247,124,240, 89,
+219,244,189,245,182,112, 54,130,205,118,174, 67, 23,241,186,226,106,111,128, 39, 47,206,124,219,186, 65, 90,230, 98, 60,229,234,
+241, 39,184,126,176,230,157, 87, 95,225,114, 30,105, 53, 81,202,204, 52,110, 73,105,100,218, 79, 52,105,172,122,240,190,167, 52,
+171, 9,170, 3,223,121,210, 60,225, 68, 88, 29, 94,181,105, 74, 54, 58, 91,201,149,131,131, 21, 67, 31,249,232,115, 55,105,213,
+113,247,242,130,232, 12, 42,229,197, 49, 12, 3,117, 55, 81, 70,160,107,208,123, 67, 39, 79, 91,146,141,122, 44,145,174,102, 8,
+ 47, 1,250, 18, 40, 58, 51,215, 75,188, 95, 25,179, 98, 33,173,137, 11,156,156,142,124,249, 15, 95,229, 23,127,233, 6,186, 25,
+184,117,235, 62,111,221, 61, 35, 95, 78,252,157,191,253, 11,252,123,255,246,223,228,233,231,174,241,249,207,255, 33,243,156,104,
+210,184,123,239, 45, 14,143,123, 14, 55,199, 76,169, 25,107, 95, 2, 44, 53, 62,149, 70, 88, 13,164, 86,112, 50,131,235,151,202,
+212,142,185, 86,130,115,116,210,168, 52,246,213,122,157,126,223,160, 15, 20, 31,104, 15, 2,106,165, 89, 69,213, 5,171,208,238,
+ 19, 81, 54,164,160,168, 76,148,106, 42,232, 46, 40, 85, 10, 77, 58, 98, 83, 28,129,138, 55,182, 5, 80,245, 18, 45, 66,138,145,
+ 20,132,206, 9,185,100,112,158,148,148,153, 75, 6, 31,145, 78,241,171, 67,163,117, 6,193, 83,145, 4,184, 76,140,160,205,113,
+ 57, 11, 71, 3, 54, 21,164, 67,212, 38, 62,135,171,254,225, 56,253,209, 75,123,147,247, 30,138, 5, 56, 3,186, 5,188, 50, 43,
+104,130, 7, 45,220,185,192,180,159, 13, 54, 86, 22,110,135,218,107, 92, 93, 14, 11,127, 94,124,122,173, 80, 91, 33,171, 61, 15,
+190,223,142,252,251, 5,227,220,251, 30,232, 15,108, 50,181, 54,187,228, 5,111, 83,161,229, 48,176, 93, 66,113, 15,150, 19,151,
+203,127,175, 30, 9,210, 77,239,235,234,151,247, 77, 37,182,251,153, 52,238,105,205,112,228, 33, 40, 33,249,165,181,227,208, 52,
+211, 87,197,213,142,117, 28, 56,201, 23,232,124,128,168,167, 6, 79,139,147, 5,184, 75,143,247, 5, 77,163,173,126,166,153,134,
+ 48,116,157, 93,252,182, 66,136, 61,206, 59,107, 5,177,129, 44, 84,127, 73, 65,232, 52, 34, 53, 51, 28, 15, 92,110,149,213, 58,
+112,116,124,104,159,107, 42, 4,231,108,239,137, 51, 64,190, 87, 80, 28,109,145,188,219, 67,203, 42, 53,110, 9,196, 72,176, 91,
+176,106, 35, 58,219, 7, 91,178, 72, 81,178,185,214, 77,197, 98,123,122,103, 60,243,134,165,232,197, 43, 53, 21,166,106,236, 93,
+ 45, 75,205,205,137, 77, 6,106,163,137, 1,105, 92, 23,177,159, 46,191, 36,214,253, 3, 42,173,253, 62,117, 24,116, 71,161,218,
+ 13,186,170,209,225,252,226,126,215, 86,105,193,225,151,221,162, 85, 30, 26,234,162,173, 30, 36,152, 19,221,186, 58,214,169,110,
+208,154,163,106,197,137, 82,197, 86, 20,210,202,194,195, 95, 48,182, 78,232,157, 29, 2,134,222,132, 26,206, 5,188,132, 37,112,
+213,112, 64, 8,182,255,215,232,104, 30,250, 26,104,174, 48,205,201,126, 48, 99,164, 54, 35,232,105, 21,156,239,204,196,149, 43,
+ 90, 28, 18,237,182, 44,189, 39, 86,131,235, 84,105, 75,197, 67, 16,241,108,239, 95,242,198, 59,111, 51,101,216,239,102, 74, 43,
+220,194, 2,141,171,190,179,131, 86, 16, 74, 42,124,246,167,127,150, 95,250,249,159, 1,224,249,103,159, 65,167, 51,254,147,255,
+244, 63,167,137,163,228,132,243,158,161, 95, 49,244, 29,165, 41, 29, 43, 46, 47, 78,249,167,191,247,121,142, 86, 87,216,237, 51,
+155,163, 35, 98, 92,209,197,192,149, 43, 55, 56, 58,124,158, 90, 2,219,221, 61,124,170, 92,142, 91, 98,183,194,183,128,250, 74,
+196, 49,166,153,139,179, 61, 93,223,113,227,234, 21,180, 58,134, 88,121,242,217,199,120,245,181, 19,238,159,238,137, 27, 97,190,
+ 76,203, 10,167, 35,248,192,225,141, 35,230,221, 22,220, 49,183,111,191, 67,191, 90,243, 55,126,241,167,168, 57,241,165, 47,125,
+157,148,118, 92, 92,156,115,114,118, 65,183,238, 97, 95,233, 87, 29, 62,216, 43, 87,115,118,136,148,192,210,115,134,222,121, 35,
+147, 57, 79,236,141,242,229,213,209,212,243,145,231,158,229,153,117,143,184,145,166,130, 78,153,107, 79,222,160,238, 47,184,127,
+239,109, 84, 59,214,131, 66, 46,104, 18,235, 38,207, 80, 71,129, 62, 24, 98, 55,153,156,200, 69, 97,123,158,216,239, 3,159,252,
+225,199,249,221, 47,191,198, 31,191,217,112,157, 99,238, 58, 78,247, 29,195,224, 24,188,167,118, 61,171, 85,207,122, 29, 57,234,
+110, 48,215, 66,174, 91,188, 22,230,109,129,203,145,183,223,189,195,217,105, 79,236, 10, 46, 40,140, 19,190, 22, 52, 14,148,122,
+ 74,169,214,182,112, 84, 74,205, 76,243, 14, 90,193,187,184, 76,218, 34,195,186,163,212,204,246,244,148, 56,244,212, 58, 83,114,
+161,235, 6,174, 95,187,198,245,171, 87,233, 36,242,165, 63,250, 2, 37, 21,155,176, 45,171,148, 26,133, 48, 68,166, 92, 25,100,
+131,147, 72,246,106, 10,226, 49,225, 86,157,221, 94, 49,204,106,107,133, 73, 4,245,142, 58, 37,114,134,121, 30,145,154,160, 86,
+ 36, 4,214,155, 21,111,223,191,228, 31,126,254, 75,124,238,175,254, 16, 31,255,240,115,156,167,202,187,119, 79,249, 7,255,251,
+239,112,248,183,127,142,127,227, 95,249, 49,242,228,248,252,111,126,145,166,202,184,175,156,220,189,199,102,115, 68,136, 27,124,
+115,204, 50,226,102,123,116, 55,167, 84, 45,100, 87,232,171,105, 74, 75,222, 81,246, 5,149, 14,130,103,146,138,164, 66,140, 17,
+245,166, 61, 46, 8, 37, 79,248, 0, 45, 13,104,180,158, 49, 62,176,175, 74, 84, 79,239, 21, 81,191,188,214,101, 52, 87, 90,244,
+132,208, 19,187, 35,202,254, 30, 37, 58, 52, 89,230, 60,246, 61,154, 38,154,107, 20, 34,157,175,228,233,146, 1,161,117,107,240,
+ 9,159, 86,100, 21,106, 13,200,202, 94,223,230, 42, 32,129,190, 21,243, 77,196,200,208, 53, 6, 81,230,108,175,153, 3,138, 4,
+165,123, 36, 24,246,254, 91,232,250,125,187,225,199,220, 35, 1, 48, 1,233,223,219,171,223,119,182,118, 45, 98, 90,106,215,121,
+178, 88,254,253, 92, 33, 52, 56,244,239, 77, 0, 86, 96,129,233, 63,195, 13, 56,101,227, 33,104,109, 22,214,253,203,228,206,212,
+ 70,173,141,185, 54,174,244, 6,252,122,112, 88,120, 63,206,234,240, 79,201, 24,116, 63,192,254,118,154, 48,194, 92,206,214,238,
+138,142,178, 47,184, 36,244, 3,108, 91, 65, 91, 71,109,133,203,208,208,117,132,177,176, 19, 79,105,151,144, 60,121, 46,116, 85,
+ 72, 96,248,226,208, 97,210, 93, 97,218, 89,203,192, 71, 71,101, 79,211, 64,218, 22,188, 43, 20, 85,156, 14,116, 50,209,106,164,
+133, 76,157, 3,174, 12, 28, 13, 74,136,246, 49,142,165, 16, 84,173, 59,142,179,157, 34,222,180,171, 52, 83,178,162,203,206,221,
+ 60,110, 56, 39,104,110, 22,132,211, 66, 22, 19,182, 32,246,123,156, 8,169, 85,156,243, 15,107, 99,176,116, 49,155,249,157, 93,
+179, 91,189,170,208,196,108, 60, 77,176, 10, 25,230, 95,175,205, 35,190,217,255,127,112, 32, 16,165, 52,219,229, 57, 91,205, 89,
+210,173,181,135,249,188,162, 15, 84,136,150,231, 20,245,148,102, 26, 64,117, 14, 39,105,129,227,244,150, 33,104,141, 24, 44, 56,
+102, 41,125, 83, 64,122,156, 17,241,194,210, 31,109, 13, 13, 75, 87,178, 53,162, 11,244, 3,164,182,124,238, 98,234,189,220,160,
+ 67,113,177,218,174,210,155,211, 57, 21,187,105,187,162, 56, 23,169,106, 19,143, 0, 20, 28,154,171, 5,105, 48,189,103,112,142,
+148, 50, 33, 64, 31, 34, 65, 29, 91,153,113,173,210,199, 72,206,106, 66, 27, 5, 25,236,139,241,230,203,239,112,122, 97, 80, 36,
+ 23, 2,146,178,201, 14,106,101, 63, 45,135,156, 16,104,206, 51,166,249,123, 67, 34,118, 93, 51, 44,112,181,144,137,146, 40, 57,
+ 18,194,129,237,118, 58,101,123,153,216,239,118, 36,122,110,157,223, 39,231,145,174, 27, 24,164,227,236,232, 42, 50, 52,250, 32,
+232,152,137,195, 33,161,235,137,177,144,181,144,166,138, 75, 91, 98, 16,142,143, 35,173, 84,106,201,108,174,174, 41,217,113,251,
+222, 5, 23,219,153,176, 19,188, 55,161, 69, 0,234, 60,113,126, 43,209,173, 87, 60,125,253, 6,117,156, 25,250, 21,117,110,172,
+ 98,199, 79,255,245,191,198,111,252,227,223,134, 84,121,245,197,111,115,229,198,117,134,131,171, 28,246, 3,199,107,229,246,217,
+222,118,116,213,214, 36, 94,122, 67,250,122,103, 66,153,106,183, 16, 23,236, 64,243,248,213, 53, 79, 63,182,225,183,191,124,194,
+179, 79, 10,159,252, 96, 37,118, 29,155,199,159,229,252,205,111, 49, 37,197,119,149,145, 30,153,161,151,130,167, 65,243,180,185,
+224, 54, 14, 29, 42,161, 8,190, 43,196,131,192, 75,175, 86,214, 87,174,243,204,135,110,242,220,203, 47, 49, 63, 21,185, 87, 86,
+164,230, 56,244, 29,117,174,180, 94,216,108, 60, 87,175, 92,227, 74, 55, 32, 52, 58,223,225,227, 21,206,238, 93,176, 62, 84,246,
+ 23, 74,167, 27,144,145, 34,224, 91,164,170, 16, 98,228, 50,103,230,125,230,227, 47, 60, 73,113,142,111,126,243, 13, 59,140, 86,
+147, 18,185,165,152,228, 96,201, 19,120, 74, 25,217, 94,236,169, 90,233, 67,224,234,213,167, 56,216, 28,177, 14, 43,190,254,226,
+183,184,115,231, 62, 67, 31,105, 5,106, 47,228,154,161,120, 75,125,235,136, 87, 37,150,140,203, 43,250,225,136, 57, 20, 92, 20,
+116, 46,100, 43,143,224,221, 49,181,206,200, 16,105,211, 37,105,218,226,107,161,180,134, 58,111, 42, 94, 81, 98, 12,188,253,206,
+ 61,190, 32,223,230,115, 63,249, 41, 62,242,241,167,152,247, 91,254,233,239,189,200,127,245,107,191,206,191,243, 43,255, 42, 31,
+120,225,121,158,185,249, 46,111,188,245, 26, 83,206,156,220,187,228,169,107,247,185,241,212, 77,238,238, 38, 88, 68, 30,221,225,
+ 10,191, 47,212,125, 53,239,183,120,170, 90,243,165,198, 64, 20, 79, 47,134,169,213, 6, 83,153,241,157, 16,252,138,170,153, 78,
+149, 16,122, 92,176, 14,121,147, 74, 73,246,240,170, 52, 74, 48,143,131,138,169,166,155, 52, 38,245,116,169,160,220,163, 70,193,
+141, 25, 87, 61, 97,213, 40, 36,156,118,136, 79,168, 20, 92, 30,240, 62, 66,200,148,146,240,170,132, 3, 71,218, 90,235,199,237,
+ 42,174,235, 16, 95, 73,206, 94, 51,215,190, 55,184, 86,117,164, 40,132,104,215,111,239,128,232, 24, 66,247,103,222,153,127,143,
+157,237,253,129, 48,133,154, 27, 46, 89, 95,255, 96,136, 15,147,226,209,238, 50, 15,111,176, 77,190,247, 33,254,253,138,111, 25,
+216, 78,153, 92, 51,226, 48,103,192,131,212,250, 95,176, 71,174,139,114,181, 21,203,113,133, 31, 0,203,113,127,202,175,221,247,
+ 9,206, 57, 96, 88, 72,134,169, 86,102, 4,149, 74, 88, 21,202, 56,113,177, 23,138, 87,134,169, 81,210, 5, 71,221, 26,201, 29,
+251, 92,104,117,162, 95, 59,146, 0, 57,146, 99,161,120, 37, 68,165,159, 51,179, 8, 94,170, 65,134,188,199, 13,145,142, 53,187,
+147, 29, 12,246,189, 85,115,130, 57,146, 67,161,181, 29,131, 56,210,229, 4,222,211,133, 21,100,165,172, 32,157,109,241,207, 60,
+245,228,223,109, 11,152, 69,237,217,101,184, 86,100,129,205, 44, 38, 52, 85, 28,134, 76,245,222, 63, 8,184, 91, 21,162,153, 83,
+ 92,155, 73, 86, 92,112,134, 98,173,246, 62,188,247, 38,136,192,161,206,110, 73,226, 29,190,139, 72, 91,174,245, 18, 88,228,163,
+168, 24,114, 85,176,132,185,170, 65,122,155, 46,220, 96, 17,196,217, 3, 81,212,204,113, 2,120, 23,172, 83, 14,102, 42,114, 75,
+239,212,252,127,152,255,197,225,154, 61,156,107,179, 16, 92, 23,172, 10,145,115, 93, 70, 75,246, 80,177, 19,154, 34, 77,141,161,
+237,133,224,237, 22,111,117, 55,232, 6,112, 5, 84,132,150, 27,161,143,116,241, 65,174,160,218,237,218,117,104,106,134,225, 21,
+161,105,165,104,195, 5,197,247, 17, 47,193, 32, 50,226,151, 21,135,209,238, 52, 91,106, 92, 69, 73,217,170,127,165, 66,105, 32,
+ 68, 66,203, 54, 34, 83, 72, 37,243,206, 59,119,112,222,186,218,173, 54,114, 30,121,143, 34, 96,243, 56, 47,102, 32,186,115,235,
+ 29,134,245, 17, 55,159,121,154,183, 94,254, 54,255,205,223,251, 53,222,186,115,178, 76, 63, 44,148, 56,172, 14,192, 53,164, 54,
+ 98,151,129, 74, 46,158,132,195,220, 60,133, 46,216,168,200, 71,232, 92, 79,236, 58,148,198,208,119,244, 93, 52,117,172,102,130,
+120,246, 83,166,185,194,170, 83,180,102,230, 73, 89,109, 34, 47,220,188,206,203,175,221,226,237,119,207,137,125,192,171,237,187,
+ 37,152,227,190,150,196, 60, 37,182,151,123,166,221,204,213,235, 71, 28, 93, 57,224, 91,223,124,133,175,125,245,155, 76,101,230,
+153,167,159,225, 3, 31,120,158,143,126,248, 5, 86,113,197,110, 59, 19, 66,207,110,183,165, 91, 13,180, 8,151,251, 61,181,194,
+ 16, 3,190, 11,248,224,208, 82,141,158,183, 8,115,134, 85,207,167, 63,241, 33, 66,140,188,248,206,125,134,174,227,249, 39, 54,
+ 28, 93,185,198,229,249, 37,103,103,247,136,157,163,140, 9,230,130,106, 49,112,200,250,208, 38, 75, 30,252,122,141, 43, 9,223,
+ 28, 49, 6, 90,234,248,253,151, 39,206, 39,199,110,234,121,249,157,115,246, 5,170,239,192, 41,227, 56, 51,151, 74,139,106,129,
+172,105,102,220, 79, 92,140,123,134,154,185,125,114,155,211,251, 59,238, 95, 94,178,159,102,186,131, 3,230, 92,232, 93, 69, 75,
+229,116,123,142, 58,199,246,236,146,203,237, 25,159,250,244,211,252,216, 95,251, 40,127,242,173,119, 25,231,132,243,128,243, 4,
+241,214,228, 0, 83,172, 98, 57,151,214, 42, 89, 43,199, 71, 87,121,242,241,199,121,226,137,171,100,113,188,123,231,222,146, 32,
+246, 56, 41, 32, 80,117, 48, 99, 96, 15,157, 95,217, 42,105,232,240,195, 33,206,135,135,175, 29,218, 96,221, 31, 34,174, 35,251,
+130,111, 66, 75,141,113, 60,183, 20, 58,133, 18, 4,105,158, 90, 51, 90, 44,120, 43, 30,238,221, 63,101,183, 29,121,238,153, 43,
+188,250,250, 45,254,248, 59,111,115,251,100,203,173,123,119,121,250,169,235, 60,249,248, 77,158,124,114,195, 60,237,185,119,186,
+163,181, 29,207, 60,187, 97,181, 94, 49, 93,236,209,102,135, 51,175,150, 1, 48,251, 21,204,169, 64,111, 63, 3, 62, 88,208, 53,
+ 33,228, 44,172, 67, 48, 23, 67, 80,104,153,214, 58,170,111, 76,101,111,249,157, 38,208,121,186,206, 2,168, 89,139,133,255, 92,
+160, 73,197,247,107,164, 21,115,173, 87, 71,105,129,208, 5, 2,141, 85, 12,132, 40, 20,245, 86, 35,237, 28,186,175,244,177, 48,
+ 22, 33, 59,135,103,128,150, 17,188,173, 35,253, 76, 17,115, 99,196, 67, 65, 23, 45,174, 93,198, 27, 53,152,148,170, 61,184,148,
+ 0,171,213, 1, 55, 30,187,242,240,117,226, 65, 78, 76, 22,178,246,131,181,248,251,147,239,237,125,227,239,211, 89, 57,191,123,
+ 65,201, 51,206,195,141,235,199,108,150,177,190, 91,198,224,242, 72, 77,206,125,159,135,229, 63,119,219,221,101,166,221, 30,113,
+202,209,193, 1, 7, 75, 90,127,126,164, 42,247, 16,126,243,200,131, 53,189,239,253,191, 31,164, 83, 20,238,157,141, 92,236,118,
+212,218,120,226,234,134,131,245,230, 47,117, 18,112,231, 98,228,242,238, 61,198,105,194, 81,104, 69,209,201, 42,116, 89, 58, 74,
+201,236,118,231,248,205,138,172,141,172,130,186, 66,220, 40,117,231,145, 82,113,131, 39,196, 21, 89, 7,106, 58, 95,204,116,106,
+ 23,201,141,199,247,158,118, 57, 51, 81,104, 85, 8,181, 81, 19,120,137, 38, 28,243,150,241, 10, 56, 66,104, 76, 85, 57,232, 29,
+155,155, 79,243,250,252, 36,183,190,243,109, 66, 93,126,192,141,254, 98, 16,133, 86,154,221, 24,195,146,115, 47, 13, 93,130,111,
+198,123,145,135, 29,116,167,141,228, 60, 62, 24,101,173,149,106,200, 23, 15, 78, 21,117,158,212,148, 32,222, 94,168,157,157, 46,
+131, 83,154,150,197,135,235, 9,190,209,176,138,134, 87, 53, 53, 42,141,146,203,210,153, 55,232,141,136, 25,208, 68, 27,117,169,
+223, 57, 93, 2,122,222, 91, 37,170, 85,163, 93,225, 64, 11,193, 71,178, 61, 93,237, 95, 87, 45, 43,208,132,170,149,172,142,188,
+116,211, 69,253,210,213,110,120,196,184,241,193,126, 64, 68, 44, 45,232,189,177,115,157, 58, 52,217, 70,198, 97, 63, 96,165, 21,
+186, 37, 53, 90,232,140, 19,223,189,247, 45, 47, 33,224, 3,132, 36,120, 13,120,245,139,193, 44, 24,169,174,233, 66, 11, 82, 98,
+240,246,103, 86, 69, 52, 24,168, 68,204, 91,175,204, 75, 93,208, 81, 82, 98,220,110,209, 90,169,229,130,230, 28, 41, 77,104,179,
+159,236,166,182, 94,113, 78, 81,241, 52,148,113,119,193,127,249, 95,252,103,252,175,255,243,255,196,246,252,148,221,126,107, 93,
+245, 82, 41,101,166,235,143,128, 7, 95, 19, 37,180, 72,106, 66,115, 29, 65,236,118,209, 84,208,214,152,211,200,102, 24,216,177,
+103,152, 18, 8,244,135, 27,114, 26,105, 85,168,213, 48,158, 62,122, 14, 36,112, 54, 87, 82, 41,184, 88,152,179,112,247,206,158,
+183,222, 62,193, 5,227,113,135,161,195,199, 72, 23, 3, 94, 11,147, 52,156,107,148, 41,113,245,177, 67,126,245, 87,255, 77,110,
+ 62,243, 56,243,126, 68, 60,120,103,226, 17, 23,132, 85,191,230,183,127,243,159,241,223,253,218, 63, 96,211, 11,147,102,158,190,
+126,131,147, 91,119,168, 89,113,177, 91,104,133,182,207,172,218,232,221, 0,113, 96,158, 19,171, 46, 48,244, 43,124,127,192,143,
+127, 34,243,220,181, 25,119,188, 98, 74, 29,227,118,135, 44,156,240,119,223, 62,102,117,165,113,124,148,169,219,194, 80, 46,172,
+ 98, 53,172,108,125,133, 80,157, 50,110,247,188,113, 55,112, 57, 29,240,177, 79,124,156,219, 39,247,185,119, 41,136,139,172,170,
+ 35,174, 86, 6, 34,233,123,214, 7, 3,219,109, 33, 68, 33, 28, 56,242,229,158,211,147, 29,231,243,158,146, 35,110, 19,201, 84,
+174, 28,117,220,124,226, 38,223,125,233,143, 57,159,118,184,150,105, 34,248, 40, 12,235,200,183, 95,124,151,191,242,195, 31,230,
+147,159,120,158,223,253,202, 55,112,150,238,164,170, 29, 78, 89, 64, 82,210,234,195,124,198,193,176,230,202, 99,143,113,112,124,
+ 5, 21,199,201,253,219,198, 55, 92,156, 3, 4,235, 65, 11,150, 34,207, 89,136,171, 64,239, 54,132,205, 10,141,130,228,134, 87,
+111,153,155, 85, 71, 83, 71, 45,208,183,142, 89,102,230,233,130, 58,143,180,186,216, 4, 83, 67,235,140,167, 26, 42,179, 46, 83,
+ 61, 58, 94,124,233, 54,162,133, 79,124,232, 89, 30,187,118,141,183,111,223,231, 91, 47,189, 13,237, 11,124,246,199,254, 69, 62,
+242,161,143,114,180, 62,228, 11, 95,252, 6, 39, 39,151,188,245,250,187,124,244, 99,143,179,141,141,154, 39, 52, 4,168, 5,241,
+142,181, 10, 37,122,230,113, 79,153, 61, 62, 24,184, 69, 39, 35, 70,122,215, 81,130,163,230, 25,102,165,143, 61, 45,194,148,132,
+ 32, 17, 45, 13, 23, 86, 12,209,156, 0,169,179,155,172,199, 70,226, 85, 32, 76,138,120, 7, 4,102, 95,136,190,210,215,142,230,
+214,164,108,175, 89, 45, 84,196, 7,218,110,166, 86,163, 11,210, 69,250, 94,144, 50,225,178,163, 6,155, 24,133,122, 68, 11, 17,
+ 50,248,125, 37,123, 65, 92, 37, 27, 52,130,190,137, 29,174, 10,180, 97, 89,151, 14,253, 67,200,202,101,131, 67,103,225,183,139,
+102, 60,129,195,110, 9,152,229,101, 90, 19, 23,186, 91,130, 85,120, 79,144,150, 39,179,252,229,154,232, 36,210, 61,178,251, 46,
+143, 60,212,255, 60,129,179,154, 42,173,102,188,126,111,143,124,248, 1,245, 50,255,131, 58,228, 13,114,174,232,130, 36, 79,242,
+222,251, 30,177,251, 93, 39,223,131,136, 55,254,198,159,245,227, 6,230, 57, 81,107, 6, 77,164, 84, 40,173,178, 79, 80,198,138,
+110, 34,186,111, 28, 13, 29,181, 57,146, 2,113,166,141, 35, 85, 61,114,220,147,207, 61,165, 64,164,209,105,162,100, 72,110, 38,
+ 0,153, 14, 77,145, 50,158,219,101,179, 12,248,133,214,216,130,195,133, 2, 13, 98, 13,212, 80,113,205, 81, 4,250,206,113,116,
+ 44, 92,121,238, 9, 70,239, 24,227,138,176,120, 84,140, 37,110, 91,223,101,148,108, 8, 87, 37,224,163, 49,207,205, 82, 39,203,
+ 11,129, 44, 55, 58, 11,160,213, 82,241,205,238,133, 84,219,201,120, 49, 94,108,192, 25, 86,210, 41,190, 42, 4,104, 52, 90, 82,
+196,119, 56,173, 52,113,214,215,166, 89, 29,100, 97,165,107, 5,139,215,251, 37,173,105,138, 84,125, 48,194,151,197,219, 46,138,
+207, 9,143,163, 74, 32,107, 35, 46,200,214,220, 10,173,218,126,136, 96, 61,117,167, 24,119, 88,161,230, 98, 21, 47, 31,200,181,
+210, 59, 1, 1,134,126, 0, 0, 32, 0, 73, 68, 65, 84,251,179,164, 51, 56, 69, 91,186,244,161,127,112, 50, 14,132,224,108,142,
+209, 4,193,155,192,193, 67,201,141,164, 22, 46, 81,111, 14,116,153,167, 69, 50,176,120,219, 91,160, 44, 12, 30,166, 76,232,109,
+ 10,162, 37, 49,170,137,110, 98,215,227,162,199,181, 7,253,203,102,208, 22, 26,100,165,118,216,250, 64, 58,180, 9,187,253, 72,
+ 74,118,107, 12,150, 60,196, 19,104,106,188, 1,215, 22,158,189, 52,180, 37,219, 51, 55,225,157,183,222,178, 31,145, 90,201, 45,
+ 83, 74,166,161,132,206,227,165, 46,129,178,198,168,202,230,232, 58,183, 95,255, 22,115,154, 8, 97,160,239, 7,212,193,208, 29,
+224,180,227,202,241, 53,198,237,125, 46,166, 29,211, 56,178, 25,122,154, 86,230, 22, 73,165,114,120,117,224,246,233, 57,219,139,
+ 29,157,131,253, 69,229,238,201,158,239,190,122,143,232, 29, 67,215, 17,187, 64, 28, 34, 71,171,235, 56,157,104,217,161,181, 50,
+187,106,178, 29,239,185,119,114,193,115, 79, 63,206,245,107,135, 11,168, 72, 41, 53, 83,107,102,154,148,183,223,124,139,147,147,
+219, 92,185,222,243,137, 79, 61,199,147, 87,175,240,221,111,191,140, 84, 91, 51, 8,198,152,111,206,153, 19,220, 5,154, 4,130,
+ 87,250,126,205,110,204,236,118, 39, 60,241,184,135,120,131,105, 14, 28,220,120,142, 34, 47,226,136, 84,231,152, 58,207, 91,183,
+225,137,169,227,153,131, 83,210,168,104,109,108,219,204, 52,121,238, 95, 42,103, 59,199,221, 93,207,157, 83, 65, 92, 32, 17,184,
+123,114, 74,158,118, 84,241, 36, 42,107, 9, 92, 91,111,136,171,222, 64, 43,190,208, 92,207,217,118, 68,231,140,102,171,103,169,
+ 76, 70, 30,163, 39, 79, 66,127, 24,168,173, 81, 53,211,135,206, 58,207,125, 32,117, 29,183, 78, 46,121,243,181,219,124,246, 39,
+ 62,196,215, 94,252, 14,121,204, 4,223,240,193, 20,194,186,160, 70,170,152,180,103,211, 13, 28, 93,123,140, 43,135,199, 56,239,
+ 57,189,191,133,217,234,154,185, 36,114, 43, 56,233, 64, 34,120,199, 16, 35, 26, 7,164, 11, 56,233, 88, 29, 92, 99,204, 51,170,
+ 59,154, 23,162,116, 84,117,228, 98,175, 15,185, 66,157, 51,211,116, 66, 45, 19, 56, 71, 45, 98, 33, 91,129, 42,206,198,139, 44,
+248, 89,103,106,230,151,222,184,195,241,245, 99, 62,245,201,103,249,248, 7, 31,231, 96,240,124,237,197, 91,252,222, 31,124,131,
+127,237, 23,127,134,159,250,177, 79,241,115,159,251, 81,254,143,127,252, 59,252,179, 47,124, 19,105, 47,242,145,143,125,132, 55,
+ 73,228, 54, 19,163,133, 98,231,169, 17, 40,172, 67,103,158,119,177, 92,181,196, 14,169,141,226,161,105,165, 15, 29, 26, 42, 57,
+ 23,152,132, 97,216,224, 92,177,183,209,104,123, 69,134,128, 56, 71,240, 3, 90, 77,102,211,247,107,230,253,142,160,158, 62, 54,
+198, 58, 67,237,200,204,132, 62,227,194, 33,117, 63,226,195, 12,226,233,157,167,197, 70, 81, 79,215, 55,166,105, 34,174,122, 80,
+ 33,170, 34,177,183, 20,187,155, 40, 69,240,225, 0, 90,178,135,144,218,218,196,247,182, 86, 36, 8, 45,219, 19,235,250,193,128,
+ 95,198,233,171, 71, 72, 43, 71, 14,106,103,183,224, 10,236,253,123, 41,248, 75,224,188,193,161, 13, 30,169, 21, 78, 47, 70,107,
+ 27,161, 20,173,108, 83,121, 56,126, 79,179,193,124,188,183,151,211, 90,149, 85,144, 63, 19,138,182, 0, 83,158, 77, 21,221,197,
+229,114,244,103, 27,143,251, 31,240,246,240,240, 57,166, 12, 14,174,174, 86,223, 91, 69, 91,246,232,229,193,199,161,112,117,209,
+ 44,108,129,109,131,235,242, 94, 54,192, 84,217,186,128,215,224, 50, 55, 46,183,231,148, 60,211,106,161, 8,196,217,211, 13,141,
+ 62, 4,146, 83,212,247,224, 34,173, 77, 48, 38,220,176,166, 27, 18,181,173,144,152, 8,212, 5,159, 94,113,172,241, 94,233,244,
+156,174, 27,160, 37,166,180,165, 70, 71, 72,118, 20, 25,181, 32,226, 9, 46, 82,247,224,188, 18, 84, 73,234,152, 53,209,210, 33,
+ 85, 19,172, 28, 79,116, 43,238,102,144,150, 8,118,235, 93,198,179, 52, 30,220,220,131, 19, 10,222,186,213,213, 6, 52,162,142,
+182, 32, 33,205,229, 26,105,203,200, 73, 48,252,171,228,250, 48, 26, 41,152,176,196,251,104, 39,201, 82,104, 78,104, 85,237,228,
+ 37,142,166,217,110,176,213,254,226,154,229,221,236, 59,166,232,146,158, 55,254,145,107,208,188, 33, 76,171, 46, 15,243,218,168,
+106,200, 62, 17, 93,172, 66,106,245,184,133,184,132, 83, 27,187, 3,181,101,178, 90, 88,202, 73, 93,242, 2,139,198, 81,140,146,
+213,180, 45,182, 43, 65,154,163, 95, 69,230, 57,153,104,193,137,125,231, 7,219,134, 75,174, 84, 47,164,146,233,162, 91,128, 55,
+158,186,236, 89, 75,213,133, 86,103, 70, 53,239, 35,117, 54, 62,177,239, 76, 74, 51,231,204,208, 10,181, 46,208, 28, 31, 17, 45,
+228,162, 68, 49,211,156, 60,232,196, 59,193,119,230,222,205,115,177,177,120, 39,204,187,209,108,109,221, 10, 17,187,253, 55,181,
+106,130,115, 74, 93, 68, 61,174,202, 82,231,115, 52,153,236, 24,167,182, 18,104,173,218, 65, 77,141,251, 60,151,132,228, 30, 41,
+ 19,155,205,134,245,193, 21,198,221, 37,251,253,142,110,216, 48,237, 70,138,102,130,222,226,174,143, 28,222, 59, 96,181, 58,198,
+247, 61, 83,157,153, 83,197,187, 2, 62,226,106,133, 20,152,230,153,253,148,217,230, 68, 55, 4, 82, 18,156, 23,250, 56,208,197,
+ 64, 92,109,248,236,207,126,150,159,253,201,159, 37,141,123,254,159,223,249, 29,190,248,165,223, 67,200,136, 54, 90, 58,227,159,
+252,214,231,249,194,239, 63,205,207,252,248,167,185,241,196, 33,243, 60, 83,146,249,144,239,221, 63,231, 11, 95,254, 6,190,139,
+ 76, 83, 99,186, 40,124,235,221, 55,216,167,194, 16,156, 85, 1, 69,104,222,225, 21,138, 56,170, 83, 14, 99,196,245,145,227,205,
+154,143,125,252,211,236,211,204, 27,111,253, 9,231,231,247,184,122,237, 5, 46,170, 35,157, 29, 83,231, 68,201, 66,119,237, 9,
+142,217,113, 57, 77,188, 90, 6, 86, 82,185,216, 43,183, 47, 50,219,217,147,230, 70,149, 21,174, 19,118,229,148, 92,206,249,163,
+ 63, 25, 57,189,123, 98, 22,172,126, 96, 51,244,212,156,216,237, 18, 7,172,184,188, 84,142, 6,123, 96,108,183,230, 8,232,163,
+ 65,121, 74,174,236,242, 25,169, 20,100, 31,185,152, 47, 24,167, 68,104,176, 47,137,146, 29,251, 41,241,236,227, 87,249,240,205,
+167,248,246,203,247,249,232,167, 62,206, 7,158,123,138,175,127,227, 37,214, 43, 79,109,149,224, 59, 10, 74,171,149, 90,224,232,
+232, 58, 7,135, 27,214,155, 35,214,253,138,150, 10, 5, 65,131, 35,165,198,156, 50,142,229, 48, 16, 20,109, 25,149, 64, 84,112,
+ 85,161,171,132, 16,113,187,137,226, 29,222,175, 80, 49,223,115,149,140,119,145, 57,159,115,122,242, 10,210, 70, 91,211, 45, 24,
+ 79,105,130, 83,143, 86, 75,192,135, 86,169, 69, 13, 32,227, 34, 41,123,190,242,141,239,242, 83,159,249, 4, 31,253,192,147,124,
+229,171, 47,113,114,114,159,119,110,159,240,129,231,175,242,185, 79, 63,205,245, 15, 63,201,191,251,252, 47,163,205,241,213,111,
+190,200,199, 63,254, 24, 79,221, 56,230,213,119,182, 12,172,204,123,176,200, 93, 90,105, 28, 12, 61,147, 22,106,106,168, 55,241,
+147, 47,153, 92, 26, 37, 70,218, 36,104, 16,188,119,104,155,104, 1,162, 31,152, 53, 83,139,195,239, 18,210, 53, 92,235, 9, 97,
+160, 50,161,117, 66, 91, 65,250, 21,147,155,108,135, 41, 21,207,176, 76,218, 10, 18, 29,161,143,196,234,216,205,141,216, 71, 42,
+202,188,205,104,245,139, 13, 46,208,250, 1,178, 67, 24,161,122, 19, 37,249, 66,152, 42,253,224, 45,107,226,141,251, 80, 16, 92,
+ 51,121,140,107, 29,171,254, 79, 23,152, 60, 74, 83,115,192,245, 71,170,108, 7,192,106,176,212,183, 3,118, 30,238, 68,161,166,
+108, 23, 53,113,182,190, 90,210,225,123,243,229,224,151,219,113,153,148,245, 90,240,206, 38, 0,157,194, 81,247,222,237, 57, 46,
+107, 90, 7,140, 99,177,247, 43, 98,120, 95,249,203, 3,207,212, 10,115, 46, 70,242,139, 29,195, 35, 59,245, 67,224, 80,222,179,
+207, 85, 96,237,222,251,154,108,150, 33,174,123,127, 18, 95,228,225,127,239,213, 81,170,233,110,147, 42, 45, 53,154, 23,198,148,
+ 24, 90, 67, 74, 35,104,100, 91, 47,112, 58, 51,196, 13,151,197,170,172,101, 63,147,199, 61,145,142,214,175,112, 61,204,103,231,
+164,253, 14,231,149,236, 28,228,102, 78,117,231,104, 78,192, 71,124,217, 80,229,146, 86, 60, 67, 23, 24,105,180,180, 35, 76,142,
+172,142,110,227,169, 20, 86, 49,114,137,103,103,100, 31, 66,244,193,146,222,186,144,211,156, 1, 87, 74, 51, 93,170,184,133, 19,
+221,202,146,100,181,219,178,125,210,206, 30, 32,213,198,245, 45,200,195, 94,116,196,144,119,185,218,105, 15, 28,189,247, 75,240,
+237,193,208,198,210,244, 42,214, 35,199,217,195,187,177,164, 46, 85, 22,104,131, 80, 91,163,184, 10,205, 25,187, 90, 77,145,105,
+ 55,210,138,111, 66,110,138,247,206,170,120,234,168,173,154,185,197, 59, 84,131, 81,237, 44,189,134,119,214, 33,110, 15, 20,147,
+174, 46,129, 49,103,201,126, 23,141,120, 20,236,244, 23, 69,150, 61,164, 66,179,212,180,177,237, 61, 61,145, 74,161, 22,143, 70,
+235,243,250, 69,148,243,224,155, 67,163,117,254,231, 50,161,222,250,249, 41, 57, 60, 66,168, 74,170, 86,173,241, 42,164, 60,179,
+ 31,149,225,112,141,139, 14,223, 11, 45,219,109, 79,104,230,123,110,138,132,104,183,138,166,108,119, 35,181, 53, 92,171,230,133,
+ 55,186,192,210, 74,112,104,205, 54, 42,111,150,113,160, 62, 32,136, 89,240,207, 45,241, 73,109,217,170, 59,205, 38, 49, 37, 39,
+240, 66, 33, 35,235,198,148,102, 86, 7, 87,120,234,153, 15,154, 11, 28,161,213,145,119, 94,127,133,119,110,191,195,245,235,133,
+167, 54, 31, 36, 51, 2, 25,175, 1,117, 21,193, 83, 4, 66, 23, 9,222,198,248, 93, 55,224,125, 51,181,167, 90,167,248,198,141,
+ 39,248,229,127,253,111,113,245,232, 8,128, 39,111,222,228,245,183, 95,231,237, 87, 94, 65, 75,229,246,189,115, 30,211,192,217,
+189, 87,249, 31,223,122,137,117, 60,224,114,119, 78, 78,133,161, 59,160,232,196,157,251,247, 89,175, 14,104, 21, 94,125,227, 46,
+103,231,103,120, 58,106,176,181, 74,231,132,169, 22, 68, 29,174,102, 82, 42,236, 90,197,133,200,106,238,120,241,229, 63,226,202,
+181, 27, 92,191,126,147,169, 42,175,191,123,135,111,126,251, 53,250, 24,185,156,247,196,120,200,227, 69, 89, 29, 94,103, 95,183,
+ 92,156,120,242, 52,218,195,144, 2,101,207,249,110,164,247,153,141,174, 41,101,164, 37,200, 58,177, 94, 15, 52, 2,158, 70, 60,
+112,172,165,167,150,198, 92,236,176,188,223,194,110,123, 66, 65,113, 62,176,109,153, 52,111, 73,205, 72,139, 85, 43, 33,121,198,
+203,153,177,238, 12,166, 68,161,105, 96, 55,103,238, 95, 20, 62,253, 67, 79,240,251, 95,251, 54,175,191,244, 22, 31,126,254, 25,
+254,240,107, 47,209,176, 80, 43,106, 36,200,212, 42,235,245, 1,215,158,184, 65,232, 58,250, 62, 24,112, 36, 70,196, 91, 55, 91,
+114, 33,134, 64,145,108, 19,186,220,140,154,213,219,193,208,171,167,182, 72, 73,213,166, 63,177, 35,198,158,113, 63,162, 62, 33,
+210,179,187, 60,225,242,246,203,180,113,143,239,196, 14,242, 15,249,178,102, 87,108,216,106,200,182, 86, 54, 85,202, 98,244,183,
+ 41, 21,190,244,181,151,112,210, 24, 54,107, 14,214, 7, 28, 31,109,112,192,237,187,103, 92, 57, 10,108,110,220,228, 63,248, 15,
+127,133,191,247, 95,255, 47,124,241,203,223,225,111,254,220, 79, 80,175, 31,242,230,173, 83, 35,177, 73, 64, 35, 36,109, 84, 81,
+156,174, 8,100, 40,149,172,160, 82, 17,181, 21,154, 12,171,101, 60,108, 19,198,162, 13,153, 27,193, 5,123, 98,161,184,214, 19,
+189,199,117,153, 82,122,234, 60, 34,126, 32,251, 74,116, 74,171, 1, 90,166,120,232, 90, 71, 78, 19, 93, 24,104,123, 97,234, 43,
+177,247,224, 44, 87, 18, 92,160, 56, 99,114, 52,105,204, 85, 25, 92,195, 85,171,202, 54,153,200,115,165,174,215,244,218, 32, 87,
+182, 69,112,210,144,222,163,157,146, 68, 88,187,102,135,165, 63,227, 40,217,189, 79,179,234,190,167, 27,222,136,205,234,124, 33,
+ 8,199,189,167, 95, 38, 0, 71,221,123, 15,195,181,135,243, 3,247,240, 64, 80,130,253, 30,255,160, 71,110,195, 24,226,242,235,
+243,220, 76,205, 44,118,113,152,170,213,132,235,195, 94,255, 82,129, 94,254,253,255, 51,214, 47,205,214, 66, 82, 50,113,129, 86,
+125, 63,146,156,255, 62,218,217, 63,109, 50,176,242, 38, 96,223,215, 76,117,130,134, 64,206,149, 58, 54, 38, 23, 41, 53,145,211,
+ 93, 91,175,224,152,194, 76,223, 6,198, 57, 81, 91, 0, 57,160, 56, 71,187, 44,100, 86,184,184,160,194,181, 18,242, 76, 66,173,
+ 5,210, 53,210, 22,198,113,166,111, 51, 68,155,132,239,118,123, 90,180,103,170,215, 25,113,145,178,191,192, 59,207, 65,173,148,
+180,167, 92, 6, 72,151,132,222,123,166,214,150, 27,177, 37,182, 5, 65,220, 18, 48,211,138,226, 13,226,176,116,201,155,179, 49,
+130,228,138, 11, 38, 86,105, 77,109,177, 31, 30, 4,220,132,212, 12,214,162,213, 72,102,245, 1,179,189, 57, 11,190,213,102,183,
+124, 7,170,197,126,128,150, 29,121,107,141,214,132, 38,246, 64, 16, 31, 17,169, 22, 40, 83,197,133, 64, 45, 21,167,118,234, 47,
+181,128, 55, 29,163,107, 32, 49,162,217,198,239,158, 96,154, 60, 49,230,187,195,126,136, 58, 9,212,133, 45, 31,196, 48,183, 21,
+243,240,186, 96,102, 45, 21, 33,100, 69, 37, 16, 6, 37,149,229,246,219, 44,165, 46,234,209,206, 84,146,190, 86,180, 58,114, 51,
+ 72,133,132, 0,165,218,225, 40, 53,138, 47,184, 22, 44,192,179, 28,162, 74,178, 27,178,138,195,117, 15, 18,225,149,179, 93,165,
+ 93, 92,114,120,116, 68,191, 50,253,171,151, 70, 28, 12,132, 49, 56,111,187,243,160,228,113, 98,174,137, 90,149, 14,243, 92,219,
+ 6,195,120, 2,134,184,109, 54,134, 95, 2,145,162, 25, 33,216, 45, 73,160,166,134, 11,126, 89,195, 8,120, 79,206,141,224,148,
+ 46,120,114, 75, 92,222, 61, 69, 85, 89, 29, 29, 82,242, 72, 74,137,166,158, 43,199, 79,112,253,169,155,220,122,243,187, 12,235,
+ 35, 98, 31, 40,163,113,168,115,105,180, 73, 89,173, 55,204,115, 65, 74, 0, 55,208, 57, 49,205, 39,150,172, 46,216,129,172,247,
+ 16, 30, 41,193,246, 49, 18, 67, 96, 86,111, 68,184, 56,112,243,249,143,112,237,218, 49,125, 84,154, 23,206, 79, 46,249,194, 23,
+190,200, 27,111,190, 78,191, 90,177,238, 6,243,219,215, 74, 74,198,122,183,239,217,128,199, 51,151, 66, 73,213,186, 57,173,225,
+189, 35,213,130,247,145, 89, 29,175,189,246, 26,249,181,215, 56,238,143,121,242,185,167,120,225, 67,159, 96, 62, 57,163,215,198,
+189,233,140,221, 56,242,206,155,223,197,175, 87,244,210,113,184,186, 70, 59, 88, 51,107, 98,222,109,153,178,101, 75,148,142, 49,
+ 59,210,156,233, 92,111,163, 55, 4,169,182, 99,205,115,101,102,162, 69,135,168, 77,109,234,121,162, 57, 59,240, 94, 78,231,104,
+115, 12,193,248, 13,117, 86, 18,201,234, 70,219,115, 11, 85, 90, 28, 27,213,153, 77,231, 56,223,141,172,142,122,158,121,238,105,
+254,228,197, 55,248,133,159,253, 81,190,250,149, 39,121,253,221,123, 48, 84,170,142, 24, 37,216,179, 94, 15, 54,117,171, 66,155,
+205,178, 70,245,140, 57,145, 41, 72, 16, 92,243,184, 92,105,181,226,124, 52,186,164,243, 20,103,213,208, 94,149, 60,205,200,234,
+ 0, 39,133, 77,244, 76, 33,145,246, 51,251,203,187,220,187,243, 50,144, 88,135,142, 90, 20,155, 3, 44,202,101,169,212,106, 2,
+165,154, 43,142,182,216, 24,205,255, 32,170, 12,113,197,217,118,207,215,191,243, 22,191,244,185,207,240,153, 79,125,148,163,213,
+134, 23, 62,240, 24, 55,159,140,248, 78,217,191,243, 46,253,213,107,252,234,223,249,101,254,254,127,251, 15,249,131,175,254, 9,
+ 63,250,163,159,228, 98, 92,179, 59,155,201, 82, 76,149,106,223,214,212, 58,209,102,136, 61,180, 16, 40,179, 3, 55,145,104,116,
+ 8, 78,109, 5, 24,134, 64,221, 67,146,202,224, 7,211,157,170, 64,204,168,102,180, 68, 92, 19, 90,240,116, 85,208,170, 80,122,
+130, 88,141,205,209, 76,161, 42, 32,109, 68,197,209,106,165, 23, 24, 75, 37,234, 6,245,166,210,236,156, 35,202, 33,174, 51, 21,
+113,237, 4, 70,101,232, 35,162, 43, 98,232, 73, 50,163,217, 38,139, 97, 8,148, 38,228, 6, 7,193, 20,187,127,244,173, 87,184,
+126,229, 24,245, 29,199,253,192,225,225, 10, 9,142, 82,149, 97, 8,116,193,217,199,160, 60, 36,205,188, 63,173,174, 10,105,159,
+ 40,146,105,181, 16,252,202,116,218,127,202,239,109,203, 46,252,193, 62,252, 64,222,227,169, 59,108,156,253, 61, 15, 74, 7,105,
+206,148,148,113,171,129,184, 76, 22,116,129,229, 60,144,198, 38, 96,191,140,199, 31,132,228,178,194,230,145,209,120, 85,232, 31,
+121,255,227,152,208,106,175,123, 65,222, 11, 5,126,191,244,191,252,128, 52,253,163,111,159,114,165, 44, 57,165,152, 29, 90,148,
+ 90,148,232,128,117, 65, 47, 26,193, 31, 44, 33,234, 61, 42,153,182, 27,241, 62,208, 92, 79,232,140,147, 17,157,226,135, 3,202,
+121,195,249, 83, 90, 41,164,206, 49,238, 61,206, 79,172,139, 82, 80,164, 57,178,107, 56,237, 23, 18,168,226,200,104,129,172, 30,
+ 9,221,194, 89,232, 57, 29,215,188,248,134,112,114,247,140, 54, 37,252, 51,207, 60,251,119, 31,161,225,219,174, 73, 28, 18, 76,
+242,193,242, 96, 94,152, 52,214,245,117,178,208,253, 22,213,159, 51, 32,253,131,127,156,115, 11,174,181,162, 77, 9,203, 13,163,
+ 53,111,178,145,165, 2,102, 94, 15, 75,138,251, 7,212,185, 37,245,206, 66,138, 83, 89,232, 52, 78, 12,227,185,128,113,170, 86,
+104, 6, 95,209,224, 89,144,117,118,255, 87, 59,245,139, 55,105,140, 20, 27,201, 71,239,168,173, 45, 78,109,123,187,243,138,115,
+216, 13,191,115,244,222, 45,206,103,183,136,105,236,175,214, 5, 79,177,200,188,125,174,178, 36,233,189, 85, 80, 68,173, 90,231,
+154,129, 82,146, 86,114, 73,230,105,239, 28,203,194, 1, 39,206,190, 46,226, 8, 94, 9, 20, 90,183, 32,122, 27,244,222,177,223,
+237,184,127,182,231,226,114,203,246, 98,100,188, 24, 57, 59,219,114,177,207,140,185,146,246,149, 92,132,210, 60,165, 88,229,112,
+ 30,247,156,159,143,196, 16,169,181, 44,232, 87,155, 14,104, 85,107, 31, 88, 88, 2,169, 75,253,208, 25, 14,152, 5,192, 67, 51,
+173,108, 12,142,213,106, 67,240,145, 0, 4, 21,196,119,140,247,239,113,127,187,165, 15, 29, 93, 28,168,165, 26,244,100,233, 27,
+239, 46, 47, 56,186,254, 56, 93,183, 38,231, 25, 45,101,105, 28,116,214,253, 47,137, 86,151,114,100,205, 84,105,120,137, 22,226,
+ 19,115,205,143,101, 66, 53,240,194, 11, 31,160,182,194,111,252,163,127,196,151,191,242, 21,202,172,236,114,226,147, 63,252, 17,
+ 62,246,177, 15, 16,250,142, 62, 12, 56,223, 24,214, 29,211,104,208,157, 0, 52,117,236,246,123,200,198, 31,119, 94,152,243,140,
+247, 61,173, 9,251,221, 37,170,130, 15,145,218, 76, 94,130,115, 28,172,215, 28, 31, 31, 49,239,246, 28, 29, 94, 39,181,194,106,
+125,200,143,255,244,207, 51,206,123,198,105,207, 19,207, 61, 78,168,158, 77,183,226,208,219, 48,239,236,226, 18,210,142,205,209,
+ 53, 94,120,246,195, 60,126,229, 73,226,176,230,232,198,117,222,125,251, 93,166,121,164, 11, 1,213,202,110, 63,211, 20, 98,176,
+219,132, 83,103, 14,104,129,105,159,200, 58,147,198,137,253,180,227,252,114,203,184, 79,156, 93, 92,112,114,255, 62,248,200,102,
+ 24, 8,189, 61, 32,199,253,104, 57, 23,130,117,200, 83, 33,167,202,213,227, 99, 62,124,243, 57,222,124,247, 46, 7,135, 71,188,
+113,247, 30,119,239,157,227,188,131,230,232,253,134, 46,116,172,215, 43, 36, 70, 60, 74, 23, 86, 68, 31,153,210, 72,245, 13,247,
+ 96, 50,144,102,168, 14,113,209, 38, 99,157, 71,188,183,191, 83,183, 97,221, 7,250,110,192, 71, 79, 23,122,106, 21,182,219,123,
+220,187,243, 58,187,211, 55, 41,121,182, 29,190,243,248,216, 45,109, 14, 3, 89, 17,212, 88, 22,205,204,114,205,137,113,211,155,
+ 57, 37, 84, 31, 40,143, 61, 23,231, 59, 90,109,124,230,211, 31,230, 71, 62,120,157,167,158, 57, 96,181,233, 17,233, 72, 37,243,
+198,203,119,184,241,204,211,252,208, 15,127,140,175,124,253, 21,230,180,231,195,207, 63,205,235,239, 90,163,195,139, 67,163,135,
+ 28,240, 57, 81,125,176,212,119,107, 72,103, 93,250,206, 45,175, 63, 33,208, 52,163,165,224, 8,224, 34,222,155,136,199,213,128,
+107,106,164, 47,173, 54,185, 43,145,230, 86,204, 76,196, 14,195,193, 6, 37,101,165,182, 64, 8, 3,197, 87, 88, 57, 92,178,139,
+ 75,215, 27, 45,204, 59, 97,181,234,145,108,181,218, 13,133, 57, 21, 36, 21, 52, 22,218, 98, 46,116, 99,162,101,155, 44,224,236,
+208,208,121, 24,170, 77, 37,213, 9,231,211,196,221,251, 91, 46, 47,118, 92,156, 79,188,115,114,193,219,119, 78,185,117,118,201,
+221,147, 51,110,223, 57,231,157,187, 23,220,189,117,193,126, 59,115,185,155, 57, 57,155, 57, 63,219,209,114,161,228,194,249,229,
+196,201,221, 51,198,113,139,102,232, 87, 29, 79,222, 56,198,251,240,207, 89,204, 30, 80,218,226, 35, 15,249,239, 87, 36,187,119,
+ 81,216,158,159,211,180,176,217,172,120,250,177,227,135,239,111, 37,223,235, 46, 31, 30, 9,177, 45,174,177,135,111,175,134,249,
+127,248,231,206,192,237,179,137,253,217, 37,115,202,116,209,115,237,250,177,249, 54,128,221, 2, 77, 19,121, 0, 79, 91, 38, 18,
+143, 16,244, 30,109, 7, 40, 44, 42,172,247, 30,235,183,183, 51,119,238,222,226,252,108,199, 52, 85, 18, 25,154,133,229,116,103,
+151,223,234,123, 10, 35, 93,233, 40,115,198,123, 8,222,145, 52,145,117,132,177, 32,125,197,245, 3,251, 59,231, 56, 41, 20, 28,
+115, 74, 56,113, 84,102,166,125,166,102, 79, 63, 68,106, 72,148, 57, 17,157,195,117,129, 90, 60,110, 48,219, 41,165,144,164,114,
+180, 17,126,230,231, 62,202, 71,126,232, 51,220, 45, 7,220,123,253, 93, 66, 91,234, 98, 15,190,241,155, 23,139,234,103,115,198,
+214,229,129, 78, 83, 36,152,209, 74,112,148, 7, 99,115,140,224,211,176, 94,186,136,125,209, 60, 66,112,150, 15, 85,177, 19,191,
+202, 66, 83, 19,165, 36, 75, 86,235,194, 59,207, 8, 94,150, 29,186, 42,173, 20,106,131,208, 5, 80,219,195,137,148,165, 23,106,
+ 61,114,130, 77, 8, 36,103,196, 27, 0, 70,205, 38,251,176, 26,167,205, 44,102, 33, 56,219,117, 53, 27,193,106, 16,180,217,126,
+ 71,156,152,181,168,168,221, 98,157, 80,164,176,146,184,168, 72,237,243,181,139, 68,180,155,223, 98,165, 83, 20, 41,133,220, 26,
+ 82, 4,239,132,216, 57, 51,176, 53,104,222, 19,233,141,218, 87,102, 90, 92,198,255,203,144,169,212,197,112,229, 58, 90, 45,204,
+173, 50,230, 14, 71, 99,221, 57,196,119, 52, 10, 18,204, 84,119,255,100,143, 23, 59,244, 12,253,218, 86, 33, 90,232,250,235, 60,
+253,212, 1,185,205,204,105,100,222,207,168, 22,106,173,148,156, 45, 84,232, 5,215,170, 37, 88,197, 18,246, 15,146,209,141, 69,
+ 35, 88, 5, 31, 58,123, 88,231, 70, 8, 27,146, 98, 55,178, 50, 35, 90,216,237, 47,112,161,179,128, 89,109,104,155, 73,251, 75,
+156, 10,117,222, 83,253, 64,154, 13,222,177, 34,224, 36,225,195,192, 62,101,212,193,188,132, 77,162,119, 52,177, 93,101,140,214,
+199,204, 99,226,255,250,245, 95,231, 43, 95,249, 3,240,194,189,147,187,104,109,180, 54,113,243,233, 99,170, 20,222,189,117,135,
+ 16, 86,108,186,142, 55,223,124,131, 59,183, 95,163, 21,207,245,163,171,108,231, 29, 90,102,126,254, 95,254, 9,238,221,185,199,
+239,127,233, 59,172,174,172,113,109,101,180,186,121,107,122,209,230, 72,251,189, 53, 60,130,179,158,121,205,236, 46,182,228, 73,
+241,110,205,147,143,223,224,160, 19,190,240,127,255, 58, 13, 33,250,142,187,247, 46,184,115,126, 10,222,209,227,241,209,113,245,
+184, 71, 69,184,113,112,200,144, 18,111,222,187,195,241,225, 33,170,141,237,124,138, 11, 54,101,152,246,137, 42, 25, 69,153,178,
+169, 74, 83,218,210, 82,102,206,102, 53,211,214,204,144, 23,133, 16, 34,210, 5,122,223,211,111, 54,248, 24,240,206,147,210,100,
+193,207, 96,130, 32,209,142,185,212,133,165,238,120,237,246, 57,143,223,124,154,245,209, 99,252,111,191,249, 7,108,207,183,244,
+ 93,135, 11,129,232, 7,250,245, 1, 74,163, 52, 33,138, 48,108, 6, 90,129,185,101,100,176, 70,135, 43, 30,245,138,139,246,240,
+ 83,183,160,149,137, 4,241, 16, 34,125, 55,152, 8, 40,128, 87,207,156, 28,101,188,203,233,237,183,184,188,119, 11, 13, 88,202,
+189, 41,181,102,124,231,233,196,112,201, 37,202,210, 79, 53,203, 34, 84,162,216,164, 45, 89,111,149,232, 29,133, 66, 8, 3, 93,
+ 8,124,243,165,119,248,226, 87,190,201, 71, 62,244, 89,168,137,179, 19, 24, 14, 60, 49,218,223,195,139,127,252, 29, 62,249, 35,
+ 63,204,223,248,249,191,206,255,249, 27,191,197,241,230, 29, 62,245,241,155,124,235,197, 83,180, 22, 84, 51,213, 39,235,135, 55,
+103, 29,121, 18, 45, 55,186,197,142,213,188, 49, 48, 92, 28,112, 69, 9,226, 24,181,226,170,163,182,137,182,138,196,169, 99,191,
+157, 24, 54,158, 50, 21, 52,102,188, 88,168,169, 37, 27,227,171,122,252, 16,168,169, 80, 67, 51, 63,197, 69, 70,250, 3,138,155,
+112, 5,138,140, 72,240, 54, 0, 15,142,224,247,108, 39, 91,243,185,160, 72, 56, 36, 5, 37,249,194, 52, 27, 68, 43,104, 35, 14,
+ 7,182,202,156, 11,251,206,113, 32,176, 94,175, 57,252,127, 89,123,147,102,205,178,235, 60,239,217,221, 57,231,235,110,151,153,
+149,213,100,101,181,168, 42, 64, 16,193, 34, 64, 74,180, 40, 43, 20,116, 72, 17, 30,216,161, 31,160,137,127,132,198,254, 35, 30,
+122, 34,135, 71,178, 29, 86,216,164, 45,211, 20,200, 32, 1, 16, 96,161, 41,161,250,236,187,219,124,205,105,118,179,182, 7,235,
+100, 86, 17,166, 24,118,132, 48,170, 74, 20, 10,153,247,187,247,156,189,215,122,223,231,121,253, 77,140,117, 76, 87, 61, 98, 91,
+245, 60,196,136, 76, 3,219,108,245,114, 54, 36, 40, 35,207,118,123, 76, 80, 67,152,254, 57,245, 70, 37, 51, 84, 39,103,161,105,
+ 42,253,126,224,103, 63,255,146,213,170, 35, 2,199, 77,203,217,209,138,166, 9, 28,178, 96, 76,197, 47, 3,198, 58,173,253,121,
+243,119,184,200, 35, 57,205, 72, 84,255,255,221,192,246,155, 29,242,223, 52,174,121,244,121, 47, 57, 99,210,204,199,152,153,242,
+117,238,210,127,243,133,125,152,141,115,221,252,107, 59,129, 49, 67, 59,103, 1,146,192,120,136,172,151,141, 62,163, 4,250,139,
+ 11,124, 18, 98,174,180, 77, 97, 26, 51,251,221,132,149,164, 96, 54, 3,174, 92, 49, 13, 19,201,119,116,139, 37,135,148,137,185,
+ 82,211,132,229,136,232,206,217,108, 22,148, 26, 72,236, 9,214, 34, 4,188, 68,204,148,193,119,212,186,215, 74, 47, 22, 91, 52,
+235,165,246,163, 68, 25, 7, 74, 93,178, 12, 66,242, 45, 98, 4,147, 42, 47, 5,195, 17, 90, 49, 94,185,130,207,136,126, 65,230,
+151,160, 17,139,109,132, 90,102,187,238, 44,251,112,104, 15,189,212,130,115,118, 14,151, 41, 7,182, 86,143,153, 11,238,117, 62,
+ 85, 85, 81,170,131, 1,146,204,164, 28,167, 31,143,169, 85,193, 50,202, 12,196,186, 0,165, 32, 24,170, 5,107, 10,115,167,141,
+146, 53, 64, 80, 49,179, 14, 83, 19,245,213,104,240,197,207,130,136,156, 10,214,205,181,173,130, 90,198,172,211, 14,169,100, 74,
+153,247,253,243,136,207,187,231,183, 83, 94,220,178, 49,144,147, 65,235,182,149,169, 68,108,112,170,133,149,164,174, 92, 17,252,
+ 92,165, 43,169, 32,206, 41, 71,220, 88, 37,188,213,140, 21, 1,111,177, 30,140,173, 20, 25,193,120,106,227,161, 20, 74, 74, 24,
+175, 74, 71,153,213,123,173,215,154,223, 97, 40, 28,118,153, 41, 30, 88,116, 45,198, 85,213,241,121, 15,141,163, 75,253,252,141,
+106, 49,177,103,215, 15,204, 57, 70,188,181,115, 63,188,101,113,163, 99,179, 62, 66, 82,230,217,249, 83,250,254, 64, 46,145,152,
+ 19, 41, 37, 13, 63, 74, 37, 81,213, 11,236,156, 62,140, 76,197, 89,139,115, 94,253,213, 86, 67, 82,166, 66, 28,162, 2,138,124,
+230,234,252, 49, 24,163,170, 71, 49, 76,169,199,251,134, 48, 39,136,237,252,112,139,166,208,152, 74,208,239, 48,156, 8, 38,171,
+140,194, 56,131,137, 5,239,102, 9, 70,137,212,236, 17,147,248,252,139, 95,179, 10,157,190, 0,242,132,107, 42, 71, 75,207,207,
+127,242, 11,126,145,126,134,247,122,131,170, 78,141,119,102,210,207,212,174, 29,191,255,159,253, 14,255,228, 7,223,230,241,163,
+135,220,187,115,143,255,112,247,138,182, 89, 18,135,131, 58,151, 69,244, 5,134, 18, 10, 13,232,139,199, 24, 46, 47,207, 49, 77,
+203,211,203,175,232,251,128, 91,108,184,121,252, 50, 55,110,222,196,213,194,230,104,197,106,189, 98,138,133,139,167,231, 20, 99,
+112,161, 37,201,132,136,227,201,197, 83,206, 31,222,163, 61, 57,230,171, 59,119,152, 14, 61,205,114,205,152, 34, 83,142, 56, 35,
+140,135,158,203,180,213,155,168, 85, 40,204, 98,233, 89, 47, 55, 44,252,146,166, 83, 1, 10,243, 84,171, 68,152, 36,170,173,171,
+ 20, 98, 44,136, 84, 90,223,208,143, 35, 49,239,169,162,129,215,177,100,238,222,125,130, 55,134,221,152,216, 15, 19,190,105,177,
+ 97,193, 34, 4,170,209, 91, 72,157, 34, 87, 67, 79,170, 89, 13,109, 46,225,219, 21,118,178,248,234,169, 68,200, 89,171, 63, 14,
+146, 76,248,118,165,245,211,166,165,216,128,219,180, 4,219, 64,233,152,204,196,246,226, 49,219,199,159, 50, 30, 46, 8, 33,168,
+101,177,106, 32, 13, 17,100,170, 20,175, 63,247,186,118,179, 84, 91,240,198,225,196, 80, 68, 3,164,198, 10,198, 27, 61,236, 86,
+245,150,135,110,137,193,243,231, 63,249,148, 91,183,174,241,143,127,239,239, 97,189,167,157, 6, 22,173,227,236,100,205,211,187,
+231,124,254,249, 23,252,238,239,191,195,186,245,252,155,255,249,223,114,251,205,142,215,110,175,121,116,231, 41,141, 93, 50,213,
+ 94,201,141, 37, 81,242,200,132,193,132,128, 77,153,236, 50,193,118,186,222, 75,149,224, 42,197, 38, 76,177,100, 96, 49,179, 35,
+ 50, 35,185, 26,226,228,176, 86,247,237,147,140, 4,211, 96,168, 72, 45,216,146,113, 98, 17,211, 48,236,123, 66, 23,192, 54,120,
+ 12,185, 84,162, 12, 4, 87, 9,238,152,113, 60,208,148,134,188, 88,144,164,208, 68,167,134,189,210, 19,166, 21,165,241, 74,181,
+155,132, 82, 44,195, 54,225, 54,149,188,240,116,217, 34, 85, 56,190,126,196, 15,222,186, 65, 4, 30,165, 51,174,207, 30,139,203,
+ 2,187,190,114, 20, 12,131,192, 97,204, 12,219, 65,217, 5, 37, 51,236, 6,117, 24, 88,139, 76, 17, 59,236,245,121,105, 21,214,
+ 84, 74,229,124,119,224, 98, 55, 34, 8, 79,141,229,179, 4, 77,167,129, 96, 41,176,232,148, 43, 97,141,227,108,189, 36, 4, 79,
+117, 30,145,204,178, 11, 52,222,145,157,225,176, 61,167,164,164, 43,132, 89,176,245,159,194,210, 86,103,154,156,154, 55, 11,203,
+198,254,141,140,192,145,249,155,187,242,179,223, 88,183, 47, 44, 44,154,175,167, 12,163, 5,187,234,104,230,105,193, 96, 96,204,
+ 13, 70,132,208,102, 98,111,176,135,217,180, 25,150,200, 98,164, 92, 85, 14,195, 68,201,142,188, 16,232, 51,118,156, 48,102,143,
+208,208,116, 9,153, 4, 57, 20,114,152, 53,220, 38, 82, 35, 84, 87,208,183,223,252,238,179, 14,114,192,103,139, 11,153, 20, 51,
+ 22,171,208, 49, 25,153,170, 78, 77,154, 92, 89,156, 56,218,229, 53,157, 94, 28, 20,230,229,165, 84, 29,141, 86,131,215, 97, 18,
+214, 88,156,211, 29,145, 11, 78,189,228,229, 57,196, 68,197, 15,234,108, 81, 26, 92,121,158, 54,127, 94,137,123, 62, 34,153,199,
+233,179,247, 74,127,176,231, 79, 33, 24,131, 4,221,239, 72, 45, 47,170,116,165, 42,191,215, 26,131,183, 70,193, 51,206,226,157,
+114,220,141,104,189, 75,252,188,159,182,138, 0,181,115, 98, 94,127, 7,162, 59,228, 26,181,190,100, 29,222, 25,130, 84,178,105,
+ 20,202, 96, 4,103,213, 33,238,190,177, 37, 50, 86,145,171,197,161,225,170,162,202,211,198, 26, 4,136,169,204,117, 15,149, 39,
+212,148,168,206,234, 65, 33, 84,138, 64,202,250,123,118,165,208,120, 29,225,149,154,161,177,164,249,129, 44,217, 34, 46, 19,240,
+ 88,175, 35,242, 82, 13, 37,122, 66, 99, 72,180,184,166,165,177, 22,130,163,163,225, 16, 7,104, 60,142, 66,140, 58,178, 92,172,
+150, 72,150, 23, 35,247, 49,234, 72,118,154, 6,182, 87, 87,132,118,129,115, 45,155,227, 14,239,172,170, 78,141, 97, 24, 15,108,
+ 47,175,216,247, 61,165,102,221,229, 27, 67,227, 21,120, 81,158, 47, 83,156,197, 73, 75,131, 99, 55, 30,240,203, 21, 39,167,103,
+ 42, 17,153, 50,222, 59, 98,201, 16,237,172,225, 69,201, 72, 88,130, 11, 88,215, 33, 76,140, 78,176,222, 80,162, 30,170,150,109,
+ 51, 7, 44, 13, 18,202,220,151,181,100,153,176, 70,171, 80, 67, 44,136,113,216,106, 24, 37,241,201,175, 31, 48,142, 73, 67, 85,
+ 67,193,218,137,205, 38,144, 68, 15, 80,165, 22,214,171, 5,215, 78, 91,254,215, 63,250,247,252,203,255,230,191,230,191,253,240,
+ 45,254,213,191,250,239,120,178,157, 8,203,134, 52, 36,166, 52, 97,157,193,139,195, 26,209,239,163,182,125, 49,130, 11,206,176,
+ 63, 12, 44,142, 58,166, 92,120,248,232, 46, 95,222,251,138,197,122,201, 75, 47,221,228,214,237, 55,185,121,109,195,178, 89,241,
+236,217,125, 18,133,216, 11, 95, 92,125,142, 49,130,219,172, 40, 86, 87, 30,198, 58,166,113,192, 91,143,228, 66,182,218, 77, 63,
+190,190,210,158, 61,186,190, 42, 70,144,236, 72, 50, 40,131,189, 8, 53,171,158,152, 86,201,119,181,177,244,243,205,118, 72, 61,
+ 49,121,210, 48, 81, 4, 98,173,180,190, 35,248, 76, 21,248,242,222, 57, 85, 42,109,183,208,181, 79,169, 51, 2, 56,145, 74,102,
+154, 70,106, 85,184, 17,146,217,108,150,180, 86,195,111,160, 42,211,146, 52, 27, 35,185,224, 66,139, 37,232,195,191, 6,214,139,
+ 13,222,119,218,117,143, 79,185,123,231, 83,246,151,247,168,146,232,218,133,170,153,171,232, 4, 44,105,175, 54,229, 76, 2,150,
+174,193, 24, 79,170,133, 92, 51,182, 38, 13,147,226, 49,161,168, 93,208, 43, 46,218,160,124,136,156, 35,109,187, 38,102,225,207,
+254,244, 99, 36, 10, 31,124,247, 61,222,127,253, 38,130,174, 3, 79, 54, 11, 62,249,244,215, 28, 45, 91,190,253,157, 87, 57, 63,
+252, 30,127,244, 71,127,206, 43,183,110,176,186,190,226,242,178,135, 98, 73, 40,247,125,101, 90,182,146,152, 36, 97,131, 26,214,
+ 74, 77,228,121,117,133, 13,152,236, 85,155,106, 10, 83,227, 97, 80,102, 71, 45,149,104, 10,203, 38, 16, 83,197,219, 35,178, 31,
+177,232,196,101,152, 50, 77,208, 23, 90, 48, 11, 72,134,246, 52, 64,202,144,160,115,158, 98, 2,166, 70, 92, 42, 36,132,144,206,
+112,229,130, 33, 27,214,116,140, 6,138,221, 98, 19,234,203,246,107,252, 96,168,141,114, 60,156,131,100, 43,193,192,217,106,243,
+194,145,126, 22,190,198,160,182, 14, 78, 55,134,245,252,247, 79, 23,158,254,100,195, 53,171,253,237,199,227, 41, 27, 3,161,129,
+ 93,129, 39,247, 14, 76, 95,125, 73,157, 38, 50,142,211,107,167,180, 55,174,147,147, 80,182, 7, 42, 17, 41,144, 81, 77, 50,214,
+208,103,109, 11, 65,228,208, 23, 50, 5,177, 80, 75,161, 51, 14, 68,137,146, 53,139,230, 74, 26,199,195,167, 23,148,148, 88, 46,
+ 87, 24,231,104,156, 99,189,108,241,193,147, 5,172, 17,218, 54,188,128, 36,105, 6,195,252, 71,161, 54, 41, 37,114,137, 10, 61,
+242,255,255,240,179,225,111, 33,236, 45,236,223,172,203, 97, 12,251, 24,137,169, 48, 85,101,171,132, 69,160, 63,244,152,152, 48,
+101,129, 11,215, 40, 54, 97,167,145,108, 51,102, 9, 77, 92, 51,164,145,105,220,107, 32, 58,195,224, 14, 80, 51,249, 42, 99,188,
+ 16,167,132,167,193, 38, 5,250,102,155,136, 84,178,100,188,237, 16, 91, 40,217,224,186, 37, 85,122, 76, 53,172,221,130, 62, 30,
+ 8,211,158, 69,235, 25,129,114,216, 83,235,132,111, 27,131,136,142,158,197,104,247, 91, 63, 32, 64,202,220,251,158,237,100, 69,
+129, 45,198, 43,134,181,166, 57,236,102,133, 82,253,215,139,247, 92,177, 78,247,104,207, 67,114,213,168,162,206, 88,125, 33,102,
+ 51, 3,111,170, 32, 51, 57,169, 72,213, 23,185, 5,231,176,137, 30,187, 0, 0, 32, 0, 73, 68, 65, 84,204,139,132, 54, 78,113,
+178,144,102,252,172, 67,234, 60,254,174,186, 23,182,243,218,192, 22,245,164,219, 90, 52,224, 97,130,142,249,170,190,132,131,201,
+ 24, 12, 89, 64,234,156,130,159,169,109, 37, 85,108,251, 92,248, 82, 8, 62, 19, 81,121, 76,114, 94, 67, 85, 34, 36, 99, 21,246,
+ 49,243,127,141,171,212, 73,187,246,110, 86, 63, 58, 83, 16, 3, 57, 59,138,181,216,182, 98,114,154,233,123,117, 54,177,169, 31,
+ 62, 20,221, 3, 27, 42,203,227, 87,113,135,158,152, 70,156, 13, 88,223,224, 92,197,153, 64,157, 14,120, 83,145,172,135,146, 90,
+149,157,111,109,125,145, 26,181,226,177, 51,192,162,136, 64,158,200,162,135,182,222, 42, 7, 61, 52, 29, 88,195,226,232,132,211,
+155, 47,235, 52,101, 72, 96, 34,219,203, 11,253, 28,139,106, 5,167, 67,101, 29, 28, 25, 33, 17,233,252, 9,190,237,232, 28,152,
+ 14,218,118, 5,161,240,244,254, 67,221, 49, 74,101, 26, 70, 85,236, 82,233,108,162,159,138, 2, 56,156,144,115,166, 98,184,245,
+234, 9,143, 30,156,179, 27, 38, 37,128,121,121,209,157,173, 22, 66,117,164, 82, 8, 70,168, 88,198, 60, 42,144,103, 86, 77, 78,
+ 83,164,109, 60,227, 36, 88,163,234, 91,113,134,163,166,229,231, 63,253, 5,239,190,251, 29,154,106, 56,191,186,224,218,145,227,
+211,207,206,241,139,160, 15, 21,163, 35,198, 82, 43, 73,132, 96,132,102, 54, 72,229,106,105, 93,135,196,200,227,251, 23,156,156,
+174, 49,221, 9,157,207,148, 56,241,197,103,159,240,232,222, 87,172, 22, 39, 88,167, 7,213,208, 53,180, 33,208, 54,150,225, 80,
+216,246, 59,134,113,100,218, 31,168,222, 48, 13,137,108,116, 77,229,231,195,242,238,114, 75,206, 25,235,103, 6, 66, 99,177, 4,
+ 38, 23,104,157, 39,216,138,105, 91,172, 53,196,152, 72, 49,210, 87, 88, 52,170, 2, 29,199,129, 82, 10,195,161,103,213,174,184,
+241,210, 53, 14, 99, 36,111, 71,140,211, 92,139,128, 18,243,138,182, 86, 28,149, 49,141, 32,133, 38,120,154,176, 1, 3,195, 56,
+145, 43, 28,155,128,115, 94, 5, 50, 94,237,124,181,104, 65,212, 85,193,136,224,221, 18,227, 23,184,102,195,184,219,113,121,126,
+159,195,197, 67, 14,219, 39,152,214, 99,173, 87, 42, 26,170,215, 21,175,251,187,106,173, 94, 14, 18, 16, 58, 92, 51, 63, 63,130,
+161, 74, 3, 24, 92,209,113,174, 65,127,102,107,181, 24,231,230,198, 73, 68,100, 98,189, 56,225,222,179,129,255,229,223,125, 68,
+173,134,163,197,138,245,106,201,144, 18, 79, 30, 63,227,215, 95,126, 65,101,193,111,125,167,242,247,223,127,131, 39,143,246,252,
+217, 15,255,130,151,222,120, 13, 91, 3,210, 0,105,134,221,200, 2,159, 35,181, 38, 76,237,244,112,104,147, 66,149,166,204, 36,
+ 70,215,104,168,181,210, 20, 13,206,154,164, 42, 87,103, 13,185, 26,164, 36,214,109,161,151,202,161,168, 36,198,153,138, 13, 6,
+ 91,162, 62,203,170, 69,174, 18,214,154, 57,219,224,177, 50,145,140,199,209, 32, 38, 19,250, 45, 7, 28,213, 78,244, 56,237,105,
+205,207,214,241,188,176,238, 52,180, 76, 48,196, 92,241, 83, 33,172,192,210,210,217,191, 93,141,106,126,227,165,229,140,214,216,
+ 86,243,203,171,111,225,229,121, 63,253,178, 7, 57,105,249,242,158, 69, 44,180,213,240,222,155, 47,113,114,186,162, 7, 30,239,
+ 54, 52, 85, 48,193,209,199,204,184, 31, 8,109, 32, 98, 48,147, 32, 49,107,149,180, 8,210,143,138, 71,181,142, 40, 17,219, 15,
+ 24, 91,136,195,128,145, 74, 50,142,251,231, 61, 97, 55,105, 40,219, 24, 13, 99,163,239, 35,107, 43,141,179, 52,222, 81, 43, 44,
+ 27, 71,187,104,113,214, 50,101,161,177,149,197, 34,224,156,227, 50,102,118,151, 23,218, 4, 42,170, 27,254, 79,249,159, 2,212,
+ 49,146,178,190, 92, 73,137, 36, 5, 16,188, 43,228, 33,227,218,129,197, 8,161,104,181, 51,153,162,113, 51,241,212,162, 46,146,
+156, 61, 39,214,146,165,144, 76, 67,105, 50,213, 6,106, 74,216,208, 96,188,197,246, 66,204, 19,126, 81,169, 67,197, 78,130,105,
+243, 60,141, 76,216,149,133,232, 48,165, 34,109,229, 80, 10, 31,127,244, 25,241,233, 45,158, 61,249, 4, 17,193,235, 13,220,104,
+ 96,196,234, 75, 66, 94,220, 88,156,170,247,230,128, 87,170,122, 75,111,140,195,168,140, 82, 71,158, 70,125,230,214, 42, 78,177,
+154, 58,247,158, 13, 37, 11,174,153, 21,172,115, 80, 11, 99,230,219,106, 70,164, 18,188, 74, 89,172,204, 90, 87,163,100,150, 82,
+243, 76,181,155,199,238, 85, 11, 48, 22,247,141,223,155, 87, 38,124,142, 84, 49,208,232,148, 1, 81,227, 90,148,130, 49, 6,111,
+ 52, 15, 80, 69,215, 6,166, 90,114,141,202, 67,199,205,139, 23,171, 15, 26,167,171,132,113,202,248,224,102,151,122,209,191,182,
+250,200, 50, 50,191,188,139, 40,160,198, 86,160, 80,170,165,206, 98, 1, 93, 1, 40, 30, 54, 20, 79,232,244,167,170, 74,157,191,
+145,161,184, 74,142, 9,239, 2,194,146,118,115,157,253,213,151, 96, 58, 76,211, 33, 69,199,251,217, 36, 22,109,160,100, 40,117,
+196, 89, 40,232,206,191,177, 78,165,111,162, 55,236, 90,181,111,174,244, 93,165,216, 7, 44,213,233,105,215, 20, 51,247,148,133,
+108,122,114,169, 56, 31, 56, 94, 29,115,184,186, 36,214,172, 55,173, 12,169, 22,174,234,129,102, 95,168, 69,119,102, 67, 63, 40,
+125,203, 24, 82,172,132,206,207,112, 29, 29,193, 21, 50,206,122,138,133, 93, 26, 8,126,201,178, 89,113,232,207, 57, 90, 45,184,
+218, 79, 60,124,186, 69, 36,107, 11, 34, 21,106, 22,138,171,115,210,214, 18,131, 96, 37, 48,150,132,109,140, 6, 42, 75, 36, 35,
+196,164, 73, 23, 51,187, 0,168,208, 4,237, 60,187,198, 51,140,137,179,163, 83,238,124,122,193,191,249,227,127,207, 54, 85,190,
+245,247,222,224,226, 98,207,246,234, 48,211, 1,245,229,154,199,136,233, 44,110,209, 81,114,162, 90, 67,205,145,198,183, 28,157,
+ 28,115,180,106,232,199,130,245,154,103,166,107,169, 70,136,105, 75,220, 37, 50,130,223, 26,112,150,213,122,193,162, 57,193,153,
+150,233,240,148, 73, 70,210, 88, 20, 68,100,181,134, 25,163,208, 46, 3,199,203, 53,253, 48, 97,201,196,172,140,130,104,244, 65,
+145,197, 81, 98,198, 4, 85,122,230,113, 36, 77, 19, 75,115,132,179,186,200,144,152,232,199,137, 36,208,154,202,181,235, 55,152,
+ 30, 60, 96,187,123,138,169,142,213,122,205,205, 27,215,145, 82,185,186, 58,199,248,145,103, 23,145,110,217,226, 93, 71,104,151,
+224,170,106,104, 75,203, 36, 19,195,238,192,209,250,136,234, 43,105,212,138,161, 32,136,215,125,123, 75,128, 34,196,113,199,179,
+103,119,136,253, 51, 98,191,199, 59,171, 50,145,170, 36,189, 33,141, 4,239, 21,148, 82,117, 5, 85, 49, 52,120,166,156,216, 14,
+ 59, 22,169,193,181, 94,215, 31,214,171, 42,211,168,189,177,216, 12,121,206,173, 84,131,179,129,106, 43, 53, 71,162, 63, 32,193,
+210,231,204, 31,253,217, 47,248,233,175,238,112,251,205, 87,120,235,213,155,252,242,227, 47,232,115,100,179,186,203,191,254,159,
+ 62,227,159,255,227, 63,224,159,253,225,247,216, 14, 87,124,254,213, 83, 94, 57,187,206,231, 79,159,104,202,202, 26, 14,110,192,
+ 57,193, 69,133,107, 17, 42, 77,235, 73,201, 96,151,142, 90, 91,164, 10, 53, 69,196, 20,194, 98,137,243,158,202, 72,152,131,178,
+181, 24, 66,219,113, 96,164, 86,139, 55, 45,206, 10,217, 57,234, 60, 21, 60,148, 1,147,133, 54,180, 4,223,113,152, 18,181, 43,
+ 24, 9,172,130,103,148,145,198,121,170,201, 80,133,182,109,112,169,227,144, 71, 58,148,241,145,210,200,182,100, 22, 97, 65,189,
+180,248,205, 2,223, 24,236,228,136,222,112,255, 42,195, 81, 37, 78,153, 38, 70,236,217,138,224,225, 48, 63,159,218,206,129, 5,
+159, 53,203,132, 51, 47,158, 25,246, 27,142,211,154, 50,117, 78, 96, 47,154,192,201,178, 37, 0,199,128,217, 88,214,115,178, 98,
+183, 8, 12, 71,129,107,115,248,108,171, 86,105,150, 86,131,107,207,226, 10, 39,149,106, 33, 21,184,122,122,201,197,253, 7,100,
+163,181,221,245,233, 41,238,232,136, 44,134, 58, 37, 58, 99, 49,193,147,162, 96,210, 68, 33,209,151, 74, 47, 5, 91, 42, 59, 17,
+100, 27, 85,174, 85,133, 90, 4, 87,133, 49,167, 23,151, 54, 74, 70,128, 95,127,245,152,243,203, 61,139,101, 75,193, 17, 92,224,
+120,213,105,149,215, 25, 98,206, 44, 90,175, 43, 34,163,191,191,174,245,115,190,225,121, 34,252,235,205,126,173,232,212,215, 25,
+ 98,173,132, 81,139,212, 81, 70,188, 24, 38, 91, 9, 2,187,105, 7, 37, 83,140,224,219, 53, 69, 96, 55,237,105, 12,120,191, 34,
+199,137,166,243,140, 25,178,157,112,161, 69, 74,194, 86, 71,154,246,200,160,117,237, 54,104,170, 61, 97,152,196,226, 38,240,197,
+ 83,106,160, 92, 69, 48, 17,227,159, 33,180,132, 35,199,179,107, 27, 70,183,198,199,204, 33, 38,188, 48,215,199,204,108,168,154,
+103,251, 82, 43,209,184,121, 92,110,200, 34,170, 40,181, 78,137,254, 51, 49,184,136,158,122, 29, 50,215,225,148, 23,175,215, 4,
+ 93, 74,212, 57,144,245,252,135,212,200,204, 98, 55, 78, 79,179, 78, 41,106,224,245,133,110, 12, 66,193, 88, 52, 16, 39, 80,201,
+154,204,118,110, 30,213,171,164, 33,103,181,121,129,213, 27,138,209,111,210,130,210, 4, 92,177, 47, 14, 19, 2, 42,104, 40,134,
+138,130, 21,168,162,166, 40,235,212, 98,102,244,100,168,141,116,175, 39, 98,107,112, 86,253,201,206,185,185,250, 45,136,119,212,
+108,200,197,128,171,200, 28,148,107, 90, 67, 78,122,250,180, 86, 15, 30,206, 84,178, 81, 58,154, 21, 53,119, 57,241,228,164, 82,
+ 22,239, 42,147, 52,236,174,158,176, 29,158,178, 88, 46,240,181,165, 11, 51, 52,198, 54,148, 0, 98, 43, 55,150, 11, 46,246, 79,
+216,165,137,205,250,136,245,122, 67,153, 70,236,120, 32,102,153,119,147,105,134, 15,120,124,240, 56, 31,104, 44,148, 89,162, 44,
+ 81, 40, 34, 4,223,128, 15,172, 54, 43,134,237, 57,211, 52,225,219,142,105, 42,115, 61,177, 98,163,238,143,210,152, 89, 44, 1,
+171, 4, 62, 42, 24, 39, 80, 53,205,190, 92,157,178, 58, 57, 33,197,158,241,208, 83,162,193,216,150,176, 80, 27, 94,183, 90, 96,
+ 75, 36,197,196,209,170,163,235,214,236, 15,151,216, 70, 52,153, 42,154,161,176, 14, 36, 22, 77, 71, 91, 75, 73,149, 82, 39,170,
+204,146,156,172, 31,121,176, 1,114, 34,138,161,100, 75,215,120,142,218,150,123,251,200,131, 71, 15, 9,203,202, 85, 31, 56, 59,
+187,197,135,191,253, 62, 95,126,113,159,255,227,255,254, 33, 67, 63,205,244,192,164,225, 71,235,112, 52, 76, 53,170, 12,199, 26,
+144,196, 43,175,189,202, 43,175,223,230, 87, 63,253, 49,103,103,175,114,243,214,235,124,252,243,143,216,110, 31, 67, 8,108, 78,
+174, 19, 69,216, 93, 92,112,254,228, 17,235,147, 99, 94,189,190,193,212, 72,117, 70,189,234, 84,188,115, 76,113,210,252,132,241,
+184, 73,232,107,164, 31, 14, 72,213,188,135,161, 98,141, 35,116, 14, 17,157,108,184, 90, 21,106, 98, 19,203, 69,131, 55, 48,142,
+ 35, 82,149,237,141, 36,114,156,184, 24,119,252,201,159, 60,210, 85,151,247,100, 73,236,250, 43,222,222,188,206,186, 61,225,104,
+ 5,223,255,246,134, 63,249,217, 21,143,158, 29, 48,165,224, 27, 59,175, 63,230, 22, 72,134, 33, 78,152,253, 21,174, 9, 4,223,
+ 97,179, 6, 74, 69, 34,140,202,166, 31,166, 3,231,219, 61, 57, 31,232,108,160, 86,171, 4, 72, 99,177, 53, 83,170,197, 89, 63,
+131,193,245, 25, 97, 45,228, 44, 76, 85, 25, 8,182, 84, 98,142,116,193,178, 89,174,153,198,137,195, 52,226,157,218,221,164,102,
+170, 3,111, 23,154, 74,167, 34,174,197,251, 70, 67,156,249,128,136,176,221, 78, 92, 94,142,124,113,247,130,191,104,126,197, 36,
+142,155,175, 28,243,213,103, 15,120,250,108,207,221,119,223,224,214,173, 83,254,224,251,191,197,253, 47,255,152,103,231,119, 56,
+ 91,159,241,236, 98,192, 74, 98, 81, 13,169,120,106,227,176, 49,232, 84, 35, 86,188, 15, 16, 39, 36,136,138,157, 66,197,136, 39,
+149, 72,138, 3,221,162,165, 24,193,196, 22,108,102, 28,244,246,218,181, 6,153,132,128, 78,202,172, 47, 12, 67,130,234,112, 71,
+ 75,109,154,148,138, 95,120,186, 77, 75,154, 42, 83,204, 52,193, 83,147,103,139,197,214,137,236, 60, 99, 61, 16,130,163,164,168,
+249, 23,107,201, 86,152,124, 97,221, 90, 66,152, 33, 93, 41,115,220, 29,243,234,237,151, 56,221, 24,238, 15,158,135, 59,195,179,
+ 90,113,197,144, 46, 19,140,145,205,233,138,206,194,238,114,192, 53, 13, 97,165,153,135, 97,183,103,187, 10,172, 59, 79,113,134,
+195,197, 14, 91, 38, 74,204, 52,139, 64,248,134, 73,237, 55,251,236,207, 33, 52, 14, 56, 49, 95, 99, 87, 27,192, 54,176, 80,231,
+ 38, 5,248,229,188, 38,148,156, 41,222,241,202,171,103,188,116,188, 33, 1, 79,179, 78, 15,156,211,250,218,118, 16, 85,242, 58,
+ 67,202, 66, 25, 35,214, 58,140,181, 20,169,164, 49, 66,133,156, 43,109, 41,212,233,128, 25, 70, 14,211, 78, 51, 76,206,242,116,
+210,128, 90, 77,218,176,192,239,176,181,206, 85,223,140, 7,130,181,196, 82,144, 82, 89, 45,155,153, 36, 42,148, 92,241, 54,177,
+ 88,119,184, 10, 87, 83,225,201,211, 11,166, 62,225, 99, 33,251,192, 48,238, 16, 19, 73,217,210, 24,199,148, 28,185, 89, 66, 25,
+ 49, 37, 99,178,197,230,129,182,201,228, 62,211,218, 74,148, 29, 82,215,164, 73, 43,113,245,144,112,173, 90, 30, 73, 30,215, 84,
+ 38, 91,145,164, 33,110,124,165, 74,196, 20,143, 24, 75, 44, 19,222, 23,106,234, 40,102, 66,226,200,153,179,188,252,214, 53,238,
+197, 21, 61, 19,213, 56, 60, 50,199,133,172, 80,213,187, 58, 7,221,132,156,235, 92, 11,208,189, 59, 70,117,172, 50,195,115,109,
+117, 32,149,130,222, 74,109,169, 51, 95,122, 70, 8, 82,102,154,155, 2, 47,220,204, 22, 87, 75,154,211, 32,153, 49, 96, 4,107,
+ 27,173,145,155,170,117, 44, 83,177, 98,212,202,102,173,210,234,170,210,238,140,177,196, 28,177, 24,149,203,168, 98,125, 54,199,
+169, 96,198,184, 58,215,125,244,252, 33, 70,111,163, 38,100,204,188,171,179,222, 80,196, 35, 58,225, 39, 4, 75,197,106,255,221,
+ 27,220,243,145,108, 17, 26,111, 41, 20, 13, 46,165, 2, 78, 79,156, 98,116,119,228,103,119,175,169,122,216, 48, 54, 41, 48,164,
+ 26,188, 17, 29,215,100,171, 72, 83, 3, 77, 1,124, 80, 81, 78, 22,114, 29, 73, 57,233,205,165, 91, 98, 29,152, 52, 34,214,129,
+ 4,166,105,162,154, 68, 17,161,217,156,113,249,213, 5, 15, 31, 61,229,178,235,240,161,211,155,145, 49, 4,223,224,155,150,211,
+211,155,148,152, 24,135,131, 6,223,130, 83,227,155, 13, 20,111, 72,174,210, 86, 67, 76, 9,153, 6,204,122,161, 7,180, 82, 84,
+224, 18,156, 6, 26,173, 78, 94, 92,240, 8,133,126,119, 78,108, 26, 93, 13, 52,142, 38,168,188, 71,114,101,181,217,112,118,186,
+225,242, 65, 15, 65,237, 97,166, 22, 66, 73,236, 14,123,198, 52,210, 20,104,188,163, 84,195,229, 56,205, 97, 72,165,148,121,235,
+ 53,209, 41,224,172, 86,243,158, 19, 12,173,204, 88,220,162,193,160, 96, 45,161,113,140,212,153, 71,144, 57, 58, 59,229,144, 44,
+219,221, 72,173,240,236, 28,250, 67, 98,189,218,240,229, 87,143,248,241,143,126,202, 97,119, 0, 11, 83, 41, 56, 2, 50,155,238,
+ 98,218, 83, 98,196,186,134, 73, 42,139,206, 99,156,229,147,143,127,201,205,151,223,228, 59,223,253, 62,126,225,120,250,248, 9,
+103, 71, 55, 88, 28,117,124,240,221,239,177, 61, 63,240,249,199,127,205,110, 24,160, 86, 46,206,239, 3,142,105,154,136, 83, 84,
+170,159,211,100,112,170, 5, 67, 38, 77, 21, 41,154,189, 16,165, 47, 97,124,214, 17,123, 4, 35,149,156, 51,165,100,130, 51,116,
+ 75, 71,183, 88, 98,171, 48,148, 76,154,132,126,232, 25,198,253, 92, 47,115,132,160,159,191,136,193, 53,134, 24, 35, 15, 31, 94,
+240,206,235, 39,164,210,176, 92,182,252,243, 63,252,125,254,183,127,247, 11, 30, 63,122,160, 65, 84, 59, 35,115, 49,220, 56,125,
+153, 49, 30, 40, 49,145,147, 33,215, 9,147,210, 60,141,211,157,252,249,112, 69,154, 84, 3,233,189,215,160,172,241, 58, 61, 74,
+ 17,231, 53, 37, 43,243,193,218, 25,117,127, 23, 41,243, 65, 94, 19,216, 21,131,169,158,113,200,108, 26,104,187, 5,209, 36,210,
+ 52,225, 77,131, 21,167, 98, 27,139, 98,150,189, 99,121,116, 74,231, 87, 76,211, 78, 95,162,250, 95,210,182, 58,129, 58,136,134,
+143,238,222, 59,231,193,253,103,120, 10,255,253,191,254,183,252,159,127,250, 19,190,117,251, 77, 86, 11,199,163,203,158,183,143,
+ 95,226,144, 87,148,105, 75, 73,149,138, 39,197, 68,181, 9, 71, 71,202, 35,190,142, 26,240,155, 34,141,247, 24,103,168, 4, 76,
+ 30,105,131,131, 40,202,139,159, 49,162,109, 99, 89, 5,203, 32, 19,214,173,144, 80,177, 11, 37,169,120,231,105,124, 67,204, 90,
+157, 28, 67,131, 11, 13, 38,170,127,189,202,156, 3,106, 43,126, 44,224,143, 40,195,158, 98, 60, 49, 39, 76,151,176,102,129,115,
+ 94,229, 86, 35,244,214,178,114, 66, 29, 60,178,180,116, 77,224,149,101, 32, 24,184,222, 25,150,141,231,196, 43,254,244,178, 52,
+176, 14,200,198,178, 43, 80, 83,199,241, 70, 39, 64, 87, 2,231, 91,207,238, 42,209,244, 21,201, 19, 87,151,231, 20,137,140, 41,
+147, 75,225, 98, 55,209,110, 90, 74,130,126,156,216, 44, 60,222, 26,246,177,176,112,118,166,178,252,191,129, 54,205,111,252,125,
+141, 25, 43, 5,231, 29,161, 11,156,180, 13,205,252,207, 57,175, 7,134,231, 27,243,110,105,105,105,105,102,138,221,246,184,227,
+236, 27,166,183, 67, 93,178,156, 47,212, 61,240,232,233,134,243, 59, 95, 34, 86,240, 22,142, 94,186,137,217,156,104,198,106,200,
+122,250, 9, 26, 2, 54,227,115,198, 64,161,148,164, 24,238, 56,114,153, 29, 53,101,144,136,175,149,113,154,152,238, 95,144, 37,
+235,116, 50, 79,108,183, 3, 54, 11,198, 8,146, 50, 18, 26,170,139,228,201, 82,137, 44, 3, 28,166,130, 47, 29, 83, 19,149,254,
+153, 26,172,131,125,156, 48,174,101,127, 56,103, 40,158, 58, 78, 24, 2,185, 47,186,202,113,142, 88, 34, 34,137,130, 99,100, 67,
+ 93, 78,216, 82,144,201, 82, 91,131, 59, 36, 36, 27,240,153,152, 33,229, 3, 86, 54, 4,183, 70, 98, 70, 38, 33,198, 17,143,247,
+122,178,192,145,171,254,240, 41,180,223,226,189, 94,246,124, 53,218, 35,157,249,192,169,228, 23, 99, 9,227, 45,118,126, 25, 40,
+253,209,234,203, 84, 12,214,169,140, 69,106, 81,143,121, 53,216, 16, 48, 98,230,186, 89, 81,213,170, 85, 89,140, 41,243, 45,237,
+185,252, 4,135,216,168, 55,110, 9, 90,133,171, 21, 51,235, 87, 67,103,168,197,169, 15,222,168, 62,179, 86,173,209,132, 10, 41,
+231, 57, 21,222, 48,214,164,123,231,168, 52, 60, 49, 6,147,237, 60,154,215, 67,140,100, 48,182,224,131,199, 59,136, 89,247,194,
+214,235, 14,191, 58, 75, 41,162,226,131, 10, 50, 10, 33, 24,156,171, 68,129,234, 29, 34, 66,137, 19, 93,104, 8,115, 53, 39,249,
+249,235,117, 40, 4,239, 72,214,144,171,176, 40,137,146, 10, 38, 24,114,174, 60,188,247, 41,175,190,115,202,122,125,157,169,223,
+ 99, 91, 77,153, 22,209,244,237, 52, 8, 71,171, 13, 67,220,242,236,106,135,181,158,148, 53,248,101,202,124, 10,157,121, 1,207,
+158, 62,196,121,199,234,232, 38, 55,207,174, 67,217, 19, 92,203,194,105, 44,118,108, 20, 76, 83,140,208, 45, 20,209, 58, 28,118,
+228, 90, 33,103,220,188,203, 52, 34, 52,221, 2,170,182, 22, 98,140,136,101, 14,152, 25,210, 52,106,110,162, 86, 26, 23,200,219,
+ 81,251,226,193, 97,170,161,144,145, 0, 77, 52,196,170,139, 20, 39,149, 60, 36,198,148,113,214,145,139,161,198, 66,105, 10,165,
+ 56, 82,137,152,160,105,124, 11, 20, 87,112, 34,148,164, 16,153, 82, 51, 71,221, 2,103, 29,216,136, 51, 21,111, 61,215,175, 95,
+231,226,124,135,100,161, 9,134, 59,247, 30,112,216,238,153,178,240,179, 95,126,196,211, 39, 79, 9, 78,199,215,214,232,104,217,
+ 59, 71, 27, 90,114,140,184, 82,104,215,158,161,143, 88,239,184,247,249, 39, 12, 83, 36, 95,236,168, 99,130,101,195,131, 71,119,
+240, 4, 94, 59,126,139,199, 15, 30, 48,197,196,122,185,226,232,104, 73,201, 25,113,134,169, 31,200, 89, 27, 24, 38,170, 62,184,
+ 82,200,169, 16,154,150, 97,156, 88,110, 2, 47,191,118,141, 60, 21,190,248,236, 19, 98, 17, 66,235, 40, 73,237,131,213, 24, 82,
+201,212, 98,153,162,176,219,238, 88,175, 50,226, 13, 54,107, 32,211,134, 5, 93,227,145,108,181,246, 34, 26, 42,147,249,214,127,
+117,249,140,225,149,215, 89,118,215,249,226,193, 21, 63,248, 48,209, 54, 58,117, 11,141,199, 54, 6,107, 61,203,229,146, 91, 55,
+ 94,231,209,147,251,108, 47, 47,200,185,208, 31, 70, 98, 63,168,113,111,177,152, 81,197, 5,113, 6, 95, 28, 38, 87, 6,147, 48,
+ 70, 56, 57, 58,229,228,250, 45,238, 62,184, 79,141,232,106,199,206, 45, 10, 84,171,106,172,135, 34,243, 74, 77,215, 93, 21, 97,
+ 59,238,216, 44,215,116,190,163, 12, 35, 80, 9,206, 17, 69, 25,237, 77,187,164, 89, 30,227, 67, 71,191,219, 18,199, 43, 68, 10,
+214, 84,226,172,138,246,115,250,217,184,231, 13, 28,133,178,220,185,127,201,221,199,123,254,226,163,207, 56, 93, 29,241,210,245,
+ 19,124, 87, 57, 59,109,120,112, 95,215, 82,206,103,186, 84,233, 83,162,184, 68, 87, 85,138, 66, 87,169,163, 85,247,247, 60, 5,
+116, 33, 96,173, 97, 74, 74,187,116,193,106,144, 49, 87,114,110,176, 38,224, 27,163,177,225,209,144,197,226,140, 71,170, 96, 74,
+135, 53,133,148,244,230, 53,182, 3,221,216,232,203,165, 1, 41,158,174, 49, 24, 41,140, 69, 48,181,199, 20, 8,245,152,214,130,
+ 35, 48,150, 72,227, 27, 76, 22,170, 19,228,144,240,213,209,189, 26,120,158, 13,139, 73,159,209,155, 89, 19,125,153, 43,171,133,
+ 62, 63, 14,192, 50, 88, 94,153,171, 91,199, 64, 58,235,104, 58,117,203,212,190,129, 39,231, 28,178,126, 29,253,178,129, 77,195,
+193,194, 37, 48,137,225, 73, 54,164, 92,113,187,204,170,115,236,130,230,161,198,109,225,164,181,180,173, 30,192,135,177,176, 90,
+232,215, 39, 2, 83,127, 96,200, 25,201,153, 53,134, 96,237,223,200, 0,152,223, 32,220, 53,243,175,181, 51,202, 54,124, 35,212,
+182,252, 70,129,125, 13,140,193,241, 76, 12,198, 27, 58,215,240,222,235,215,105,218, 64, 69,211,255, 94,148, 87, 95, 42,244, 69,
+101, 60, 56,200,165,146,146, 48,236, 38, 92,215, 80,196,144,106, 38, 93,246,184,105,160,171,149, 60, 38,232,175,104,154,158,243,
+ 93,161, 68, 37,134,182,182, 97, 26, 51,181,115,200, 48, 80,171, 78, 17, 91,239,152,106, 34, 30, 70,164,105,113,165,193,155,137,
+ 90, 45,212,194, 97,159, 48,121,160,109, 59,198, 24,201,181,210, 82,161,140,250,125,231,150,136, 76,152,216,235,202,122,206,165,
+229, 49,106, 79,205,130, 15, 25, 87, 42,213, 46, 56, 57, 57,162,203, 32,105, 55,187, 85, 10,190,166, 57, 94,255,220,186,230,173,
+122,207,171,193,104,174,234,185,128,117,246,170,204,100,117, 83, 49,166,144,147,198,217, 77,208, 20,185,153, 15, 6, 98, 2,198,
+ 54, 32,170, 85,172,243, 92,220, 24,163,251,231, 58,143, 69,130,222,222, 21,253, 10,217,152,231,155, 12, 4,193,185, 70, 81,152,
+186,216,192,136,130,237,149, 2,103, 16,171,129,183,231,128,193, 96,225, 5, 60, 78,147,116, 84, 91,104, 69,147,244, 82,235,140,
+ 66,172,170,145, 21, 53, 57, 37,141,187,206, 7,131,185, 59,110,102,170, 15, 85, 51, 3,206, 18,208, 91, 98,181, 66, 42, 90,205,
+114,193, 97,242,156,166, 55,250,117, 44, 82,177,193, 82, 74,213,177,158, 5,231, 60,177, 36,133, 69, 24, 71,246,218, 20, 48,174,
+193, 27,139,228,129,187,119,191,224,157,183,190,205,194,180,180,139, 64, 88, 54, 28, 46, 46,233, 92, 75,235, 15,184, 50,113,245,
+236, 25,187,253, 78,111, 43,179,228,198, 91, 59, 91,162,244,192,145,166,137,126, 72,172,142,111,210,110,142,136,227,172,128, 93,
+122, 76,174,172,138,144,108, 34,224, 89,173,142,120,251,229,107,220,249,228,231, 84,227,181,198, 49,244,186, 27,178, 65,247,243,
+117,161,255, 95, 62,208, 45, 55,234, 7,240, 30, 95, 97,191,155,193, 38,206,114, 57,142, 36, 17, 29,107,137,142,200, 93,123,204,
+123,223,126, 19, 83, 96, 63,246, 76,135, 61,249,160,183,130,219, 31,188,206,209,209,138, 31,253,249, 79,120,252,240, 41, 47,191,
+124,202,230,116,205,254,114,164,228, 68,140,137,126,223, 51,149,202,148, 11,113,154, 88,117,158,174,105,233,211, 56, 27, 4,161,
+ 91, 44,248,214,219,111,242,127, 61,248, 41, 69,224,201,179,145, 39,207,118,228, 60,241,249, 39, 95, 17,251,145,214,251,185,179,
+170,211, 5,107, 44, 97,177,164, 6, 71,156, 34, 1, 59, 31,236, 12, 38, 23, 82,170,220,126,253, 45,142,215, 39,148, 42, 60,252,
+252, 14,183,223,122, 27,113,137,187,159,254, 7, 62,254,197, 30,231,130,174,113, 74, 38,204,107,153, 49, 38,189,245, 27,207,192,
+220, 47, 77,145,229,170, 99,181, 92, 99, 37,115,235,221,219,188,113,251, 13,188, 52,156, 30, 45,248,203,159,252,148, 52,150,121,
+ 90,161, 15,172, 96,245,179,200,104,179,224,176,239,213,101,237,252,204, 78,247,148, 25, 36, 81,179, 98, 50,155,198,115,124,124,
+157, 87,111,191,193,189,175, 62, 97,215, 63,225,253,219,239,242,248,217,129,253,249, 21,175,189,124,202,103,119,238,226, 60, 52,
+190,161, 90,195, 56,236,248,232,227,159, 65,206, 88, 35, 28,134,194,217,201,138,127,242,207,126,192,143,126,252, 43,238, 62, 73,
+172, 86, 11,188, 85,157,239, 56,238, 53,131,177,120,137, 55,222,120,149, 91,175,191, 69, 4, 46, 46, 47,184,232, 47,180,219,155,
+161,144,180,122,105, 85,249,154,156, 18, 41, 77, 97,158,200, 84,198, 24,113,236, 89, 46,214, 44,150, 29, 37, 38,181, 53,186, 66,
+215,116, 44, 55, 39,148,106,216, 30,158,146,251, 3,214,184,249,198, 38, 24,201,244, 7, 8,205,188, 38, 20,176, 2,222,169,120,
+198, 89, 75,168,138,183,221,110, 15,140, 83,230,141,151,143,121,247,237,119,120,242,224, 74,177,190, 85,136,146, 0,135,199,131,
+215,167,157,137,158, 96, 60,153, 1,146,163,161, 50,153, 66, 44,133, 22,253, 92,240, 6, 95, 51, 83,103, 95,212,241,166,169,195,
+212,130, 4, 37,164, 52,203, 64, 78, 66,176,122,177,169,174, 98, 90,161,164,202,193, 68,157,128,229,145,146, 38,106,211,210,132,
+137,246,108,205,164,215,106, 82,217,171,216, 41,247,212,102, 69,173, 6,147, 38,250,125,197,187, 6, 95,132, 80,103,152,143,213,
+233,143,117,240, 12,195,121, 69,235, 80,235,128,199,208, 72,197,203,215, 53,178, 94,244, 89,233, 23, 26,154,219, 75, 97, 28,122,
+164, 86, 58,223,177,234, 22,156,206,189,115,211,130,109, 26, 78, 28,108,129,167,171, 5, 55, 29, 4,171, 35,243, 97,109, 73,214,
+208, 91,216, 71,168,201,208,181,134, 84, 97,234, 43,233, 50,146,179, 6, 54, 75, 20,206, 47, 7, 78, 79, 52, 92,157, 83, 97,181,
+112,179,182, 23,130,232, 69,239,155, 47,249,191,155,251, 46, 72, 42,148,177,210, 93, 91,176,249, 70, 9,254,229,111, 50, 97, 13,
+ 28,207,238,121,243, 66,233,234,200,199,129,229,115,180, 45,129, 71, 39, 11,130,213, 3,227,174,192,227,175,174,216,125,250, 43,
+ 76, 81,135, 70, 63,141, 88,163,161,199,233,208, 99, 83, 70, 74, 98,155, 12,206,137, 74,180,178,165,173,153,146,174, 52,171,225,
+ 45,165, 55, 72,244,212, 38, 33,206, 81,203, 4,182,165,250,150, 82, 38,156, 24,176, 29,198, 10, 57,143, 32, 29, 86, 77, 13,164,
+ 49, 35, 82,232,130, 35,143, 78, 65, 97,206,240,171, 59,231,236,255,135,255,157, 75, 2,110, 0,169,215,240, 69, 34,118, 38,138,
+ 9, 6, 51, 91, 85,202, 60, 84, 41, 69,199,227,102,222,161,214, 44, 90,109,211,121,247,204, 69,127,142,125, 4,193, 98,130,193,
+198, 74,169,250,250,244, 86,193, 51, 25,189,157, 75, 21,172,168,158, 53, 75,153,107,104,110,254,226,103, 61, 73,212,217,102, 46,
+115,186,156,172,234, 86, 99, 84, 31, 89,209, 96,156, 17,144,130,181,102, 78,221,234,173, 63, 43,200, 29, 35,133,130,193,123, 13,
+ 0,138,209,125,186,173,122,108, 72,243,175,233,152,244,121,216,175,104,213,205,155,121,223,170, 20, 44,221, 65,122, 98, 17, 26,
+ 23,240, 77, 37, 71, 29, 9, 25,163,182,164,234,212, 46, 23, 83,196, 22, 59,123,213,117,117, 80,157,193,207, 35, 95,243, 60,220,
+234,117,135,234, 76,203,235,175,191,202,231,119,238,113, 56,188,198,233,217, 53, 98,191,195, 75,199,162, 91, 17,115,194,118, 13,
+139,124,197,189,123, 59,114, 18,156,215,138, 95,209, 20,131, 30,168,230,219,176,118,246, 61,155,213,134, 6,139, 52,158,118,213,
+ 96,170, 2, 72,130, 53, 72,234, 89, 57, 79,160, 98,107, 34, 22,157, 82,136, 8,185, 10, 37,103,109, 45,148,204, 20,123,253, 67,
+196,204,212, 15,180, 93, 32,103,149,217, 84,235,112,214,178,234, 54,156,157,157,112,137, 78,110, 48,130, 53, 30, 87, 11, 79,174,
+182,172,221, 17, 77,187,102,181, 88,209,189,220, 98,172,165,219, 24,228, 16,249,193,135,191,139, 9,158,235, 71, 43,214, 55,142,
+217, 93,142, 24, 34,113,140,244,211,200,238, 48,114,249,244, 41,219,195,158,243,135,119,169, 89,173,129,214, 88,240,142,183,190,
+245, 14, 77,215,145,178,165, 31, 70,126,253,217, 35,174,246, 59, 14,253,150, 24, 11,214, 55,179, 55,125, 14,188, 89, 93, 2,182,
+141,195, 91, 24,147, 32,139,142, 41,103, 86,190,225,218,245,235,124,231,251, 31,178,123,114,197,227, 7,119,213, 82, 88, 39,202,
+ 84,248,157, 63,248,125,222,126,251,187,124,244,211, 31,243,224,203,207,192,168, 59,185, 11,150,125,223,147, 69,205,102,146, 19,
+ 18, 19,135,254,192,230,104,201,135,191,243,219,156,157,157,129, 20, 90, 23, 48,162, 45,137, 15,190,247,219,152,245,154,143,254,
+242, 39,244,135, 81, 9,123,162, 21, 52, 99,244,175,141,115,138, 44, 14, 26,162, 19, 10, 62, 4, 4,253,217,189,113,114,202,107,
+175,190,194, 75, 55, 95, 99,185,217,176, 12, 1, 91,180,239,223,191, 54,224,186, 5,159,127,245,132,215,175,223,102,213, 46, 41,
+185,178, 29,175,152,198, 68, 49,133,166, 9,180,182, 99,113,180, 65, 56,240,218,203, 55,248, 23,255,213,127,129,111,225,243,255,
+241,167,172,151, 71,228, 26,233,150, 75,126,235,195,239,227,214, 11, 90,183,100,233, 2, 77,163,134,193, 55,223,124,143,171,243,
+ 31, 34, 57,227,108, 75,178,133,198, 7, 13,223, 58,161, 21, 75, 65, 31,236,198, 88,188, 81, 92,242,144, 10,193,102, 92, 23, 72,
+ 26, 68, 96,181,184,193, 98,121,194, 97,188,162, 76, 7, 82, 63,234,234, 75,228,107, 81,209,252,115,249,124, 77, 40,165,146,141,
+ 33,203,136, 23,139,119, 13, 83, 5, 59, 39,250, 15,195,200, 87,119,182,124,247,219,149,211,117,199,253,167,207, 52, 48, 73,131,
+177,122, 8, 77,136, 6,101,171, 80,219, 57, 15,147, 60,253,116,208, 80,157,109, 40,157,163,179, 6, 51,194,224, 5, 91, 33, 89,
+ 75,231, 61,251,113, 84,126, 67, 9, 44,187,134,148, 34,141, 3, 92,102, 18, 15,165,161,198, 3, 54,235,100, 20, 83, 9, 93,192,
+174, 13,101,128, 92, 61, 38, 22, 93, 59,186,138, 23,205, 42,237, 99,131,235, 2, 14,135,152, 37,101, 42,212, 32, 56,239,120,182,
+189,226,227,207, 31, 19,154, 21,207, 46, 46,113,109,195,242,120, 67,172,133,254,106, 75, 91, 55,132, 46, 48,246, 19,173, 49, 60,
+ 47,188, 73,213,155,111,154,199,231, 41, 38, 74,138,100,209,166,139,107,190,238,129, 95, 22, 56, 65, 43,212, 30, 8, 2, 43,255,
+117,186,126,221, 26,110,204, 87,171,243,165,118,194,158,247,193,159,181,134, 95,220,235,104,140,182, 25,194,178,225, 73,183,224,
+ 66, 12,142,138, 75,112,210, 64,231, 97, 42, 48, 30, 10,155,149, 37, 56,203, 56, 9, 18, 11,155, 77, 96,182,113,107,139,228, 27,
+144,155, 20, 35,212, 76,245,133,229,194,254,157,140, 88,243,183,212,217,252, 55,114, 2, 11,224, 86,203,243, 99,155, 94,100,174,
+173,121,242,105, 75, 26, 35, 78, 2, 83,222, 51,153, 72, 77,144,226,132,175, 75,192,176,236,132,152,123,100,128,214, 44,169,229,
+ 64, 53, 45, 67, 26, 41, 46,225,109, 71,179,246,148, 4, 83, 26, 20, 57, 92, 11,102,172,148, 98, 17, 95, 49,249, 74,243, 3, 85,
+167, 47,209, 25,124, 54,106,237,100, 32,138,182,237, 13, 66, 83, 13, 95, 92, 28,184,243, 87,119,104, 76,207, 27,175,157,233, 84,
+171,214, 58,223,195,231, 0, 97,169, 51, 72, 70,193, 17,182,206,163,112, 91,103,151,178, 82,230, 44,134, 84,100,102,191, 91, 36,
+101,213, 84,204,169,107,230, 36,175, 65, 73,116, 20, 75,205, 19,198,122, 13, 34,205,165, 74, 91, 44,213,107,229,205,160,190,114,
+ 85,186,206, 19, 0,163, 72, 85,102, 76,136,173, 22,201,133, 16,180, 79, 91,107,197, 27, 79,117,149, 34, 21, 17,139, 55,142, 98,
+202, 92,230,215, 91,115, 49,250,178,107,141,165, 24,139, 17,193, 20, 77,219,106,152,195,227,157, 82,219,244, 97, 57, 75,102,188,
+165, 68, 8,157,213,127, 87, 81, 55,124, 45,234,127,182,179,111,222, 27, 75,156,247,207, 82,138,142,231,106,213,180,172,179,148,
+ 25,225,105,157, 42,105,253,156,176,172,200, 44,159,201,216,224,121,235,214, 25,247, 30,254,138,163,213,111,227,221,130,188,159,
+152,134, 75,134, 60,210, 46, 12,173, 77, 92, 92, 94,206,252,226,231, 99,100, 93, 31, 24,163, 10, 90,106,165, 22,131, 15, 13, 16,
+ 8,141, 69, 14,208,228,249, 27,194, 10,165,241, 56,177,212, 98,249,173,111,127,151,171,243, 59, 76, 99,194, 89, 75, 44, 66, 46,
+ 69, 43,140,190, 97,181, 58, 34,229,145, 20, 39,140,169,164,212,147,147,197,206, 19,155, 54,104,132,230,206,221,207,121,122,222,
+210,120,199,245,211, 99,182,251,158,102,113,198,247,254,254,239,146, 77,100,187,223,209, 95, 93,240,120,215,107, 47,159, 17, 41,
+130, 21, 33,180, 29,103,215,110, 16, 39,224,201,136, 12, 3,110,181,162, 9, 29,116,134, 27,199, 27,222,187,245, 38,171,227,142,
+191,254,171,159,113,247,206, 93,174,250, 61,211, 52,114,118,237, 6,239,127,251, 45, 62,253,228, 62, 34,153,195, 40,220,121,240,
+144, 88, 70, 36, 39, 22,139, 35, 36,171,139,222, 86, 33, 75, 81,200,137, 1,211,122,165,250,145, 89,122, 85,254, 38,147,184,254,
+202, 43, 60,184,251,128,187,159,126,194, 98,179,226,123,223,253,144,227,179, 51,198,237,196,163,123,119,184,127,255,115,190,253,
+238,251,200,238,138,187,207,158, 32,113,164, 79,115, 90,124,230,140, 99, 42, 82, 34,103, 39, 27, 62,252,189,223,225,230, 75, 55,
+ 48,165,146,104,180,206, 40,218, 79,150,100,120,231,214,155,156, 28,159,240,232,225, 51,126,245,227, 31, 51,164, 17,177, 42, 27,
+122,158, 34, 52,117,102, 74, 80,231,240,165,186,203, 91,187,224,173,183,222,227,253, 15, 62, 32,203, 72, 38,211,199,204,141, 55,
+222,226,179,175, 62,229,114,187,229,229,235,175,176, 27,133,111, 95,155,248,224,253, 55,249,171,191,254,132,195, 94, 39, 13,139,
+197,138,206, 7,154,174,197,225, 9, 77,199,249, 46,243,236,201,192, 7,239,189,199, 34,252, 25,125,127, 78, 51, 59,231, 99,108,
+121,213,111,168, 33, 83,114,196, 73, 67,168,153,215,222,122, 23,131,229, 23, 31,253,152, 24, 39,156, 88,205, 85, 88,125,104,196,
+ 82,192, 20,170, 24,154,224,230,166,129,138,149,118,211,158,224, 58, 68, 60, 77,227,233, 66,199, 48, 30, 24,251, 11,242,164,104,
+221, 44,149, 96, 50,182, 86,245, 68, 56,143,179, 22, 59,135,103, 73,117,246, 76, 23,178,171, 26, 74,117, 6, 68, 15,159,141,107,
+184,255,228, 25,159,223,185,199,217,201, 17,143,118,129, 58, 65,176, 69,167, 51,226, 73, 18,117,133,103, 42, 62, 42, 3, 62, 51,
+225,237, 66,205,107,141,135,160,159, 51,174, 98,109,160,193,145,108,166, 24, 71,231, 90,162, 76, 24,201, 76, 51, 81,178,105, 44,
+185, 36,178,129,154,213, 58, 41, 73,159, 97, 54, 88,166, 52, 96, 75,192,165, 22,150, 13,102, 42,248, 88, 25,131,208,181,150, 69,
+ 13,140, 43,149,185,148, 54,225, 59, 71,119, 48,179,231,194,176,104, 90,226,209,154,193,122,226,206, 19,142,143,216,173, 61,117,
+ 15,206, 44, 25,125,199,101,132, 56, 56,182,219, 75,134, 81, 45,120,151,253, 64,205, 61,167,103, 27,178,129,254,226, 10, 72, 12,
+162,158,137,165,255, 6, 7, 93,163, 33, 0, 92, 61,127,185,126,163, 39,158, 51,152,249,159, 31, 43,172,191, 33, 90,247,117,102,
+ 87,152, 66, 54,137,110,179,224,157,163,192, 2,157, 40,132,206,113,242,141, 94,125,119,228,191, 86,189,206, 67,196,111, 0, 0,
+ 32, 0, 73, 68, 65, 84, 6, 75,177,134,105,126, 33,231,153, 19,182,156, 47,224,187, 65,184,188,184,132, 44,152,226, 24,135,204,
+148, 42, 46,232,115, 93,210, 44,212,124,158,238,151,249,157,111,254,227, 47,250,223,108,185, 27,169,196,148, 84,116, 70, 65,156,
+ 37,143, 66, 91, 58,146,107, 72,131,157, 51, 36, 21, 87, 91,162,201, 76, 68,188,175, 36, 1,159, 28,113, 40, 44,143, 13,190, 57,
+101,251,244, 9,141,201, 52,174,161,207,149,106, 28,248, 60,191, 31,149, 67, 33, 8, 37, 30,244, 0,236, 26, 44, 22,153, 43,167,
+ 18, 15,122, 17, 53,149,215, 95, 95,115,237,157,127,192,176, 23,138,236, 40,163, 50, 24,180, 17, 96, 44,150,175, 57,233, 50,203,
+142, 53, 32, 46,243, 11, 83,230,112,141,222,200,125,208, 31,168, 42,147,254, 51, 70, 89,241,122, 65,183, 84,209, 68,108,148,129,
+ 90,131,134,227,140,204,120, 26,189,237,171, 81, 77,230, 17, 47,207,211,112, 56, 87, 53, 20, 87,133, 58,239,252, 93, 80,137,132,
+195, 81,171,238,210,189,117,234, 98,151, 66, 99, 33, 74,129, 10, 78,192,250, 74, 78,149,214,233,169, 88,114, 65, 92,160,206,227,
+124, 77,249,139,214,223,108,157,129, 41, 30,178, 50,228,109,167,228,184,106, 10,166,232, 3,180,186, 10,190, 34,105,198, 23,250,
+ 74,202,138,200,245,182,146, 77, 69,170, 39, 4, 71,107, 69, 43,117,212,121,207,175,161,195, 62, 37,108, 12, 44,218,160,201, 99,
+128,154,145,169,208, 46,142,121,121,189,229,215, 63,251, 19, 76, 56,194,134,134, 16, 26,186,176,160, 91,172,233,150,158,107,103,
+ 71,132,174,101, 28, 19,125, 63,204,250,219,249, 86,231,244,198, 98,208, 61,230,106,115,196,171,111,188,205,195,123,159, 51,140,
+145,165,135, 85,112,244,117, 66,106,228,157, 91,183,184,253,234,107,252,241, 47,127,196,229,118, 71,219, 46, 84,191, 91,170,126,
+ 54, 70,200,101,164, 36, 61, 52,104, 54, 98, 22, 60,216, 25,182, 35,145,106, 97,123,245,144,221, 54,224,188,229,230,181,150,221,
+213, 21,239,222,126,151, 38, 44, 41, 87, 61,139,234,105,143,174,115,116,221,146,134,145,106, 35,229, 32, 80, 71,206,175,118, 60,
+186,251, 21,190,105,200,189,130, 81,138,113, 84,211, 18,235,200, 38, 44,185,118,124,198,230,248, 24,186, 83,222,252,214,117,188,
+111, 24,251, 29,171,227, 13,203,197, 41,199,103,194, 7,223,218,240,206,237, 3,191,248,245, 47,185,184, 18,108,163,211, 33,140,
+157,201,132,202,222,214, 3,170,101, 26,138,238,220,112,164, 56,177, 94, 46, 56, 94, 93,103,119, 56,240,240,206,167,124,239,187,
+255,136, 55,223,123,155,166,209,207,192, 28, 85,238, 62,254,130,195,213, 72,124,169,114,242,210, 13,238, 95,221, 39, 71,157, 38,
+121, 58, 76,233,137, 57, 33, 89,153, 9,175,190,113,155,147,213, 25,121, 44,212,214,226,115, 85,141,172,245, 88, 35, 76, 73,153,
+207,157,107,121,233,236,136, 79, 22, 75, 44,208,182, 65,167, 63, 89,213,157,243, 23,159, 16, 2,222, 5,140,169,132,160, 80,166,
+237,110, 75,174, 3,217,232, 33, 49, 69,189,149,157, 94,191,206,195,123,143,121,227,198,107, 28,164, 97,219,239,248,189,239,189,
+ 77,145,235, 88, 43, 92,108,159,114,255,254,231, 84,175,173, 14,103, 33,180,129,221,110,224,231,191,252,132,127,240,143,190,199,
+ 91,111,223,228,231, 63,123,132, 44,175,115,180,110,185,118, 20,177,193,130,243,116, 38,208,167,200,141, 83,203,155,111,222,230,
+139,179, 83, 86,235, 51,254,250,103, 63,100,183,189,192,214,140, 45,173,190, 0,141,209,238,185, 8, 5,253,121, 47, 85,176, 77,
+171,187,235, 97,160,109,215,180, 97,193, 48,237,217, 79,189, 30,124,210,132, 9,110,158, 74,105, 45,179,193,145,171, 46,198,152,
+ 10,213,234,158,182, 72,197, 25,247,226,223, 93,171, 1,215, 16, 40, 56, 87, 25, 73,252,240, 39,159,242,237,183,110,177,244,107,
+182,195,158,208, 4, 16, 33,214,136, 95,120,106,178,212,152,193, 38,124,104,201,217,208, 89,129,174, 85,227, 99, 78, 76, 57,225,
+218, 14,151,133, 98, 50, 62, 55,136,205,180, 11, 71, 25,148,189,225,124, 67,200,115,117,116,244,170,118, 54,134, 18, 45,166, 22,
+106,227, 48, 46,195,193,235,215,223, 27,210, 48, 81,131,199, 53,134,206, 27,108, 50,196, 18, 48,238, 64, 49, 81,221, 25, 7,161,
+ 13, 75,202,243, 29,250,210,177, 92,183,140, 9, 22, 93,203,245, 27, 45,226, 96,111, 45,203,182,229,205, 83, 61,248,127,190,241,
+ 60,245,150,184,246, 92,141,117,174,131, 53,236, 14, 14,151, 18,233,252, 64, 28, 35,197, 20, 22,222,243,248,217, 64,117,151,136,
+241,108,135, 9,183, 94, 98,214, 29,206, 85,236, 88,160, 13, 74,225,172,186,246,120, 33, 75,145,175,189,228, 0,251, 4, 37,141,
+ 72, 1, 41,150, 96,194, 11, 43, 90, 6, 22,223, 0,203, 57,244,133,253,252,127,126,108,121,161,242,254, 90,177,102, 94,176,232,
+218,206, 34,206, 33,162,111,251,118,181,164,204, 47,244, 61,186, 67,223,204, 19, 5, 3, 92, 13,149,198,131,107,117,205,155,250,
+ 74, 87,133,118,165, 97,174, 90, 32, 77,137,197,194,235, 10,192,192,216, 15, 80, 53,204,150,146,134,122,107, 83, 57, 92,237, 49,
+ 36,196, 70,188,141, 28,246, 25,187, 57, 33, 48, 80,198,145,140, 33,197,158, 28,139, 6,177, 99, 70,124, 37,212,105,198,172, 43,
+122, 56, 90,139,165,208, 58, 67, 52, 80, 37,227,154,134, 84, 58, 76,142,148,146, 52,192,233,188, 78,141,107,165,150, 21,214, 78,
+124,240,238,187, 28,127,255,191,228,203,143,239,243,244,203, 31, 98,242,132,151,250,252, 37,172, 1, 26, 59,143,188,235,236, 35,
+ 47,250,211, 65,145,138,113,141, 42, 35,141, 90,154, 76,173, 26,146, 50, 22,239, 20, 7,235, 85, 72,174,187,229, 96,217,156, 94,
+199, 15, 91,158, 92, 13, 84,167, 99,120,176,138,127,116, 16,139,158,132,236,204,187, 5,139,179, 96,108, 70,202,115,233,138, 2,
+ 58,100, 14,213,213, 90,245,219,193, 5,172, 55,212,156, 72, 89,107,110,166,234,184, 29, 28,146, 52,161,158, 4,178, 88,173, 43,
+ 80,168,104, 2, 48, 87, 69,212,106, 93,194, 32, 89,171, 35,198, 25,154,249,207,145,178, 96,189,135, 90, 41, 89,244,247, 84, 11,
+181,212,185, 34,103,213,189, 92, 53,124,209,200, 12,199, 49,150,132, 30, 8, 26,103,168, 98, 73, 78,141,108, 4, 13, 63, 76, 53,
+ 19,138, 66,103,138, 87,146,217,144,133,213,233,154,183, 23, 13,219,126, 96, 40, 61,227,225,156,253, 46,243,224, 1,108, 95, 62,
+227,165, 91, 47,177, 62, 63,112,247,201,142, 49, 85, 92, 26,245,179,152,119, 82,207,157, 74,205,106,197,230,228, 8, 25, 71,188,
+ 51,220,190,245, 38,199, 97,131,233, 84,184,179, 92,108, 56, 61, 89,114,181,187,228,203, 59,247, 20,192,243,252,246,111, 52,197,
+236,168,164,148, 94, 16,150,157,209,151,125,174,149, 82,193, 24,253, 90,138,168, 5,173, 9, 30,219, 58, 62,254,236, 17,235,245,
+ 13, 94,191,117,139, 47, 31,124,197,210,117, 20,233, 33, 26,194,114, 65,168, 13, 11,211, 48,173, 71,118,135,204,122,177, 34,183,
+ 45, 93,215, 82,143,133, 56, 70, 44, 69, 31,116,178,160,138,193, 47, 4,161,231,217,179, 61,105, 59,226, 27,203,208, 79, 8,133,
+ 95,255,170,195,135,150,213,241, 41,255,244, 15,255, 33,201, 28,248,241, 95,126,164,243, 66,107,136,227, 56,147, 16,245,176, 88,
+234,188, 18, 17, 33,215,162,120, 78, 12,135,105,228,246, 27, 55,185,118,122,194,131, 59,159,114,116,227, 37,174,159,156,210, 15,
+122,208,160, 86,190,248,245, 39,236,134, 29,155,227, 99,190,188,147, 41, 9, 53,156,121,143,171,129, 96,245,231,197, 89, 75,104,
+ 22,124,241,249, 23,124,242,233,103,188,246,210,171,252,224,195,223,194,217, 66, 31, 29,182, 17,166, 84, 72, 53,233, 33, 35,234,
+ 62, 63, 52, 1, 59, 25, 36, 38,172,109, 41,161,170, 88,200,104,184, 12,171, 2, 18,231,156,234, 12,178, 38,122, 75, 18, 76,227,
+ 24,134,145, 50, 70,186, 16,120,249,250,171,252,245,189, 31,113, 49, 92,112,188, 58,229,206, 87,143,248,238,135, 7, 94,125,229,
+152,161,102, 22, 71, 29, 79, 30,222,215,145,102,176,232, 19, 0,164,142, 60,184, 56,231,149,151,110,240,225,123,239,113,231, 78,
+207,247,126,251, 59,172,164,240,159,255,195,247,121, 50, 86,254,244, 79,126,201, 97,191,195,251,145, 15,222,122,159,247,223, 56,
+227,181,151,175,225, 28, 92,110,159,240,241, 95,253, 8,103, 61, 98, 5,227,220,220, 38, 49,200,156, 57, 41, 49,225,189,161,228,
+168,181,211, 92, 41,174, 48, 12, 17, 91, 71,114,234,145, 25,126, 83,167,252,194, 32,232, 28,140,162,193, 61, 55,163,155,181,178,
+234, 17,169, 90, 75,156,167, 25,136,144, 25, 24, 71, 71,215,181, 52, 62,112,185,235,249,232,147,251, 92, 59,189,137,245,122,203,
+244,238,136,106, 7, 98,158,176,198,227, 91, 67,118, 42,217,176, 38, 80,172,193,228, 9, 75, 59,115, 61, 44,117, 72, 84,239,136,
+ 21, 54,193,208, 15, 5,107, 35,206,174, 64, 70, 24, 43, 9,160,232,228,175,241, 66, 9, 80, 14, 3,193, 4, 74,244,184, 54,210,
+174,244, 79, 54, 38, 33, 88,237, 57,247,131,208, 82,241,141,103,178, 7,150, 29,152,148, 40,209, 16,173,197,120, 21,237,228, 88,
+168,255, 15, 95,111,246, 99, 87,150,157,249,253,214,218,123,159,115,238, 16, 17,140, 32, 51, 73, 38,153, 67,101,149,170, 84,115,
+201, 37, 27, 18, 90,106,117, 11, 6, 26,240,147, 95,140,126,233,127,202,143, 54, 96,192,232, 23,191, 88,134,219, 13,195,237,182,
+ 44, 72,109, 89,182,212,173, 42,149,106, 72,101,229,156, 36,147, 12, 50, 24,211, 29,206,176, 39, 63,172, 19,204,148, 0,247, 27,
+ 25, 36,131,113,239, 61,231,236, 53,124,223,239, 19, 79, 74,149,184,139, 54,149, 72,118,217, 19,133,131,240, 37, 59,189,164, 74,
+235,148,117, 23,104, 3,236,199, 5,254,104, 9,235, 0, 19,188,232,119,164,139, 51,210, 84,209,133,178,186,117,135,253,241, 17,
+155,125, 70, 38,199, 11, 9,124, 17,177, 0,147,151,123,198,126, 65,219, 52,108,198,129,113,191, 35, 31,118,100,148, 93,204,172,
+214, 13,139,131, 6, 28,196,109, 34,237,182,140,113,196, 59,135,247,198,213,152, 99,184,204, 55,207,151,137,108, 58, 11,229,248,
+143,128,100,229,171, 81,177, 53, 91, 19, 42,133, 59,235, 37,203,175,140,214,215,221,151, 42,252, 2, 28,172,228,213,247,206,192,
+212,152, 23,252,102,192,220, 23,184, 76,208,102,155, 8, 76, 3, 92,156,245,236,243, 64, 85,111,236,253, 98, 52, 71,173,133,236,
+161, 40, 70, 10,213,204,216,159,163,123,179,228,225, 64, 39,107, 36, 93,137, 56,239, 72, 98,241,227, 58,245, 12,213, 32, 69,181,
+ 38,139, 33,151, 6, 77, 38, 12, 78,195, 22,157,181, 87, 74,162,117, 29,149,137, 84,123,106,113,160,153,224, 60,239,190,243, 26,
+175,127,103,197,211,243,219,180, 23, 29,154, 34, 94,171,237,147,115, 49,111, 40,115, 74,154, 58,179,158,152, 50,205,112,176, 55,
+239,228,152,204,102,150,170,237,158,188, 51,225,145, 24,134,157, 60,171,218,107, 14,132,118, 65,147,246, 38,164,210, 74, 46,206,
+ 64, 54, 20, 26, 47,184, 57,163,221, 7, 43, 18, 10,118,104,203, 92,145,219,120,220,161,126, 30,101, 87,219,185, 57,175,148, 20,
+137,179,239,253,102, 2,224,157,204,234,122,235,254, 27, 60,144, 72, 84,200, 74,118, 22,187, 26,102,193, 84,117, 66, 35,206, 86,
+ 2, 10, 99,177,162, 69,156,163,162,120,141,120, 49,141, 65,240,144,139,237,101, 27,231, 77,241, 62, 36, 92,107,235, 8, 37, 80,
+ 92,124,101,123,115,170, 72, 19, 40, 14,210, 56,153,136, 37, 64,171, 74,163,222, 84,186,185,216,191, 47, 66,174,246,128,238,113,
+ 44,219,142,245,194,177, 42, 14,110,217, 5,185,221, 90, 20,231, 56, 86,190,120,113,197,182, 31,168,117,196,169, 21, 61,175,162,
+239, 68, 56, 60,186,197,235,175,221, 99,181, 92, 51,244,137,126, 63, 18,215, 19, 79, 47, 30,113,231,248,136,215, 31,188,205, 98,
+153,121,255,151,127,197,175,127,245, 75, 62,127,250, 20,117, 86,188, 8,197,184, 2,213,168,117, 82,138, 37, 67,137,152,126, 64,
+ 5, 63, 95, 55, 34, 5, 55, 19,161,106,206,164,172,248,228,240,135, 7,252,222,239,252, 1,107,223,178,115, 3,186, 86,114,239,
+ 17,215, 82,138,210, 28, 89, 92,237,254,202,118,164, 37, 77,228, 4,131, 14, 38, 62,164,210,116, 13, 33, 4, 66, 14,180, 30, 14,
+ 78, 60, 7,238,144,117,179, 70, 95,119, 52,173, 99,220, 23,174,166, 61,251,235,115, 54,219,137,183,111, 47,217, 95, 63,225,229,
+211,103,168,122,170,247, 76,211,254,213, 77,155,171,145, 0,107, 45,132,102,129,111,221,172, 19, 49,213,178,122,207,203,235,103,
+ 60,124,240,144, 91,135,183,249,197,207,255, 3,206, 21, 3, 66,184,150,203, 93,207,179, 23, 79, 56, 58,185,195,213,126,195,211,
+103,143,161, 84,170, 4, 90,117,164, 34,236,243, 96,107,153, 10,164,194, 56, 68,166, 56,241,233,240, 41,111, 60,124,157,251,247,
+222, 32,151,194,180, 27, 73, 34,116, 97, 69,210,129,208, 65, 63, 86,106,205,228,152,192, 41,146, 38, 76,215, 87, 77, 52, 90,157,
+125, 30,179,232,202, 8,117,194, 40, 66,174, 19,139,157,103,168,106, 36,186,154, 89, 30, 29,114,116,120,204,233,139, 51,110,127,
+253, 62, 47, 55,129,167,167,207, 41,181,240,236,179,107, 78,238,189,201,250,224,136,139,243, 83, 36, 55,116,115, 12, 40, 77,224,
+131,247, 31,241,254,251, 31,242,163,255,236,183,248,225,143,127,139,111,125,243, 1,255,227,255,252,191,241,191,252,171, 63,165,
+ 31, 71,222,255,236, 11,150,139, 35,222,124,227, 30, 87,151, 35, 67,206, 12,187, 11,116,120,206,119,191,253, 13,158,124,246,107,
+174,174, 54,116, 4,242, 20, 9, 98,154, 24,180,190,242,240,215, 92,190,212,244,136, 90,224,135, 84,242, 52, 18,167,105,214,219,
+204, 76, 9, 28,170,217,182, 17, 21,188,187, 57, 24,172,112, 19,169,136,218,115, 64,146, 82,196,248,226, 82,153,125,244, 80,147,
+224, 29,236,118, 35,185,110,185,119,239,117,146, 86, 50, 91,179,139,166,134, 28, 50,213,183, 4, 2, 46,155, 96, 74, 91,193,213,
+209,214, 70,227,132, 72,160,107, 29,217,108, 50,108,250, 17,231,139, 81, 96,221, 14,151, 6,208, 9, 93,118, 72,156, 44,205,177,
+ 40,211, 62,226,180,226,138, 32,101, 98,234, 43,226, 12,211,234,150,149, 26,231,128,161,156,169,185, 97, 40, 9,183, 44,228,216,
+210, 72, 99, 57,218,165, 82,119,133, 26,148,182,107,112, 37, 51, 93, 92, 48,245, 6,125, 98,154, 31, 5, 99, 69, 87, 95, 30,137,
+165, 86,156, 24,170,116, 55, 20,198,126, 96,117,176,194, 13, 70,190, 78,177,103,170,149, 28, 11,237,210,113,251,100, 73, 88, 11,
+135, 75,207,216,122,190,126,104, 77,243,163,234, 56,243,135, 12,107,184,206,208,239,141,117, 50,101,235,144,199,113, 79, 68,209,
+ 28,168, 21,182,207, 46,137,211, 96, 20,207, 6,246,187, 29, 47,174, 70,212, 53, 12,113,130,206,193,194,191, 26,143,231, 27, 95,
+245,108,105,107,255, 35,217,234,187, 49, 49,236, 7, 10, 19, 94,133,182,253,251,208, 87,253, 7,191,254,234, 20, 32,204,207,116,
+153,253,244, 8, 44, 91,184,213,134, 87, 35,248,125,128,151, 39,135,240,129, 18, 68,184, 30, 54,116, 41, 34,105,207,232, 42,208,
+146,182, 61, 73, 18,197, 21,220,222, 92, 43, 97,117, 11,145,145,202, 14,145, 68,236,133,237,184,131,225,140, 28, 39, 3, 13, 21,
+135,211, 53,232,104,133,116, 30,209,154, 9,218, 18,107, 32,165, 17, 69, 73, 8,169,246,132,162, 68, 73, 64, 34, 87,143, 47,153,
+ 59,171, 3, 90, 32,244, 17,250,202, 88, 21, 95,196,212,227,222,155,122,182,224,237,225, 86,211,172,120,247, 56, 95,240,174,218,
+222, 68,101,206, 53,159, 44, 61, 77, 60,181,220,220, 60,118, 16,168, 81, 99, 16, 34, 47, 30,125, 65,213,106,232, 73,249, 74,149,
+229,205, 30,102,149,183, 29,104, 22,228, 98,192, 20, 81,143, 56,243, 76,103, 49, 21,117,112, 66, 77, 51,162, 53,207, 75,155,153,
+ 84, 87, 36, 19, 75,161,157, 11,128,169, 36, 2, 58, 71,190, 90, 72,139,175,142, 92, 48, 59,136,128,102, 35,219, 85,181,241, 93,
+ 85,193, 37,157,199, 59,201,246,247,115,132, 43,181, 32,173, 39, 36, 19, 0,170, 42,171, 32,228, 34, 20,230,174,214, 65, 28, 65,
+171, 37,222, 81, 10,105,204,102, 67,114, 14,173,113, 94, 73, 8, 77,211, 18,107,154,145, 78,102,127,203,238, 38,220,166,204,187,
+102, 71,156,234, 92,197, 65,183,236, 32, 10,251,161,103, 24,109,199,234,213,145,138, 49,235, 13,220, 97,135,100,183, 88, 48,238,
+206,249,248,195,191,225,254,253,175,147,199,204,243, 47, 78,233, 14,148,187,247,191, 73,186,126,201,159,252,233,255,197,207, 63,
+124,143,113,200,228,106,246, 46,153,163, 97,197, 9,174,204,193, 53,197,210,170, 42, 86,208, 84, 49,242, 20,243,103, 22, 93,153,
+201,126, 6, 40, 72,185,242,214, 91,191, 65, 88, 52,156, 62,191, 32, 44, 26, 98, 63,226,107,135, 54, 48,140,145, 38, 22,174,174,
+ 71,210,104,249,224,197, 53,144, 38,106,246, 20,111,240,139, 69,109, 17, 17, 58,175, 44,188, 99,216, 65, 88, 69, 88, 8,187,109,
+207, 69, 63, 34, 69,105, 91, 71,115,112,135, 7,111,220,226, 31,253,206,111,240,201,175,127, 9,210,144,189,162,190,208,213,134,
+ 44,142,137, 74,238,123,198,113,164,233, 26,139,188, 44,137,156, 11, 65, 90,211, 66, 36,199,246,242,154,103, 95,124,198,119,191,
+255, 99,126,254,183,191,224,207,254,207,255,149,197,122, 73,208, 5, 85,132, 7,111,190,203,189,251,111,240,222,207,127,194,229,
+139, 83, 92, 19,112, 10, 67, 63, 80,141, 48,140,160, 76, 41,177, 79,145,162,214, 85,199, 92,248,228,211, 71, 28, 31, 31, 19, 17,
+164, 22, 59,148,102,173, 9, 89, 89,132,194, 55,126,227, 29,206,175,182, 44,125,192, 21,161, 52,142, 71, 79,158,176,219,238, 16,
+231,205,245, 32, 55, 76, 4,101,210, 66,158,172,240,220,105, 65,163,208, 74, 32, 74, 66,125,224,222,253, 55,249,228,209,175, 89,
+181, 31,177,219,140, 60,126,178,161,143, 31,115,121,177,231,181,211, 83,142,143,143, 57,123, 89, 40, 83, 68,186, 5,177, 38, 68,
+225,241,211, 43,254,213,191,249, 63,248,175,254,203,127,198,249,203, 45,255,245,127,243, 63,240,211, 95,124,196,110,211,227,170,
+231,224,232,144,227,213, 49,187, 77,230,175,127,242,136,197,226, 47,249,226,209, 99,190,247,131,239,240,253,215, 30,114,117,241,
+125,254,237,255,254,127,147, 98, 37,231, 4,193, 25, 43,162, 78, 72,182,144, 10,211,225, 22,212, 89,242, 98, 45,133, 52, 12,228,
+156,240, 85, 13,175, 91,197, 92, 43,154,173, 48,159,175,199,224,220, 92,208,207,189, 71,101, 22,248,154,104,215,116, 58,214, 24,
+148, 42,244, 83,164, 9, 1,147,202, 36,246,187, 11, 46,175, 60,183,110,223,166,138, 77,232, 74,205,180,206, 19, 83, 37, 53,153,
+ 86, 42, 83,206,140,219,194, 66, 27,138,236, 17,239,105,218, 3, 92, 26,233,199, 72, 77, 5, 23, 20,218,128,196,134,117,169,108,
+176, 9,160, 27, 43, 94, 43, 62, 44, 24,174, 35, 53, 39,194,177, 35,237,204,235,172,186,194,171, 41,229,157, 0, 83,198,217,248,
+ 18,105,148, 80, 65, 6, 33, 39,199, 94, 71,104, 35,153,150,181, 46, 24,114,198, 73, 97,191,175,164,167, 27,166, 56,178,110, 22,
+ 60, 31, 2,161, 49,113,223,245,201,146, 5, 75,162, 42,195,249, 30,169, 35,190, 58, 26,169, 76, 53,227,196,152, 9,105,152,144,
+212,227,213,132,121,190, 10, 33,216,136,122, 63,193,162,124, 25,192,214, 22, 35, 56, 30,118,176, 1,210,232, 57, 88,174,240, 71,
+ 75,166,177, 66, 73,116,119, 23, 52,141,253,131,243, 77,103,200,106, 87,104,213, 17,155, 53,159,187, 57,240,231, 42,178,219,140,
+ 28, 30,172,112, 8,187,253, 68, 93, 5, 14,150,142, 22,136,251,204,113,107, 60, 2, 17,131, 24,217, 36,215,238,129,105, 28, 41,
+105,100, 28, 35, 7,141,167,105,220,255,111, 46,122,153,187,243,240, 15, 16,176, 95,253,125,154, 39, 8,242, 21, 14,124, 29, 19,
+227, 16,233,247, 3,149,145, 73, 33, 54,138,139,137,234,123,100,154, 40,125, 75,146,129,214, 5, 19,106,199, 61,212, 1,180, 34,
+177, 80, 73, 76,185,101, 74,209, 52, 79, 69,112,161,162, 50,146,103,138,165,196, 74, 85,103,105,118,217, 65,241, 84, 77,212,226,
+ 13, 1,238, 21, 98, 32,168, 37,222, 45, 58, 97, 29,132, 1, 72,113, 32, 75, 38, 8,120,170,249,203,185,177,250, 84,243,212, 82,
+ 29,206, 87,106,174,166, 40,143,198,236,206, 55, 8,189, 36,179, 72,125,142,239,155,163,213, 67, 8,212, 92,172, 99,244,182, 35,
+ 23,153,243,198,113,160,201, 70,246,217, 89,125, 36, 38, 99,213, 92,113,248, 89,145, 81,173,170, 46,166,104,167, 8, 89, 1,157,
+ 87, 2, 21,163,199, 57,179,171,196,106,140,250, 82, 19, 17,103, 64,135,170,134,244, 3,130, 26,235,125,114,149,160,246,134,166,
+ 98, 99, 61, 45,118,211,122, 28,161,129,224,149, 88, 12,119,169,181,154, 98,218, 57,180,152,241,211,205, 73, 58,137, 68, 42, 51,
+192, 35,151, 89, 83,144, 76,132, 17, 44,140, 34,107,197, 21,251,243, 27,223,189,159, 67, 93,118,195,136,243,106,130,185,105,206,
+146, 22, 83,124,150, 70,137, 99,161,109, 59,104, 10,169,239, 13,250,147,236, 51, 25,134,158,148, 71, 27, 89,206, 35,241, 92,103,
+ 57,171,152,149,175,107, 27,218,133,231,229,243,207,249,252,195,247, 17,231, 56, 56, 60,100,181, 62,228,242,197, 11,190,120,244,
+ 49,103, 23, 87,196,100,193, 48, 94,237, 82, 54,208,198,108, 99, 17,219, 93, 21,245,148, 57, 51,190, 9, 45,119, 95, 59,161, 93,
+ 6,203,166,159, 42, 69, 76,237,190,221,141,196,156, 88, 29, 30,112,239,248, 30, 47,175,246,140,174,112, 84, 19, 50, 20,122,245,
+ 52,101, 98,218,103,188,107,184,115,247, 1, 31,255,221,223,176, 62,186, 69, 61, 90,179,189,188,196, 57,207,225,193, 9, 39,247,
+ 79, 72,174,240,242,249, 19,182,195,134,186,110, 89,234, 33, 90, 2, 87,187, 61,203,195, 91,116,154, 24,251, 17,159, 38, 70, 15,
+ 15,223,188, 77,191,189,224,209,227,151,132,238, 0, 39,167,104,130, 50,227, 80,115, 52, 39,134,118, 13,161, 93,128, 84,114, 54,
+155,163,107,221,172,138,207,224,132, 79, 63,127,204, 23,103,167, 48, 37,210, 48,177,190,243, 38,183,110,157, 64,104,153,210,200,
+255,251, 23,255,142, 28, 51, 77,232, 40, 57, 83,181, 24,162,182,223, 19,179,129,114,210,124,168, 84,148,170, 6,107,186,190,220,
+178,185,222,114,120,112,196, 24, 42, 82,148, 41, 70,100, 37, 4, 7,107,127,192, 55,126,227,219, 16, 71, 66,178,117,149, 4,199,
+110,219,179,187,218, 32,110,142, 64,158, 29, 34, 57,219, 97,144,211,192,208, 23,203, 30,200,150,174, 54,104,182,117,135,111,105,
+ 23, 11, 78, 47, 47,241,201, 49,228, 96,157,230, 26,158, 63,125,196,234,240,144,166, 13,148, 26, 25,163, 50,196,209,162, 36,181,
+225,227, 15, 46,249,111,255,187, 63,226,211, 79,207,216,150,202, 65,115,200,173,213,138,234,148,197,162, 33, 28,174,233, 55, 19,
+ 87,189,240,233,135,215,220, 58, 58,226, 15,127,255,135,156,159,245,252,238, 15,190,207,175,254,246, 67, 62,127,246,212, 18,204,
+ 74, 69, 66, 67,238, 51, 34,145, 86,149, 8, 76, 53,226,146,117,158,130, 93,103, 69, 60, 56, 67,154, 72, 6,167,106,107, 10,241,
+166, 1,154, 57, 18,206,219,164,162,148, 74, 8,134,179,166,202,171, 53,146, 83, 3, 95, 49,147, 50,243, 56,160,221,138, 82, 18,
+101,152, 56, 63,115,172,143,110,209,122, 99,103, 72,235,169,162, 52, 2,105, 28,152, 26,187,255,125, 54,173, 17,190,179,232,231,
+146, 40,121,154, 95,211,124, 10,228,142,152,122, 44,223,210,132,168, 26,102, 4,109, 63,145, 67, 65,157, 39,245,149, 82, 6,252,
+ 34, 64, 25,169,222, 19,180,176,159, 18, 53, 7, 80,199,202, 23,162,102,166, 88,233,154,195,249,190,172, 22, 89, 92, 18,181,141,
+ 48, 9,135,221,130,219,183,239, 35,171,187, 92, 95, 94, 34,235,142,225, 78, 71, 63, 86,210,147,137, 39, 23, 27,158,238, 12,102,
+ 52,109,174,241,237,130,221,246,154, 52,244, 12,211, 57,157,142, 56,237,216,239,123,166,161,103,146,121,175,171, 38, 0,102, 86,
+186, 31,126, 69, 61, 22, 13, 73, 63,191, 78,251,130, 48, 18,164, 49, 69,191, 10, 39, 65, 8, 24, 28, 70, 99,164,143, 19,219,148,
+ 89,174, 58,110,221, 94,225,214,106, 33, 36,105, 65, 8,208,175, 28, 53,131,147,150,215, 14,141, 12, 58, 2,251,198, 60,246,141,
+ 13, 10,185,188, 24,105, 93, 98,209, 5,114, 76,188,248,226, 37, 18, 11, 82,173,169, 27,250,129,197,218,226,107,166, 89,200,236,
+189,190, 58,165,165,252,253,246, 93,255,193,120,127,156, 15,242,175, 30,250,113, 63,225, 90, 11, 77,242,172,241, 97,100,220,239,
+153,118,150,172,201, 52, 33,181, 69,189, 50, 14,153, 80,149,212,122,198, 62,210, 0,213,123,188,207,116,139, 5,211,126,133,166,
+ 75,138, 55,171,120, 78,189,137,211,205,179,132,184,132, 74,139,142, 61, 34,129, 41,123, 60,145,166, 86, 6, 50,226,171,141, 59,
+ 72, 20,133,143, 31,159, 18,203, 51,174, 95,190,143,108, 35, 67, 4, 31,173,173,128, 98,225, 41,106,139,108, 19, 95,161,184, 27,
+133,106, 1,211,130, 90,171,166,106, 27,240, 82,110,100,117, 70, 96,171,217, 70, 84,170, 16, 39,195,124,218,133,111, 93, 92, 41,
+198, 62,119, 90, 64,189, 9,125,162, 69,171, 86,111,130,183, 89, 70, 55,231, 56, 43, 97,190,200,114,130,132,220,228,192,160,206,
+104, 60,168,169,226,187,106,130, 56,227, 69,207,156,115, 53,101, 57,197, 65,181,200,205,224,173,194, 23, 39,175,164,144,149, 76,
+140, 74,158,233,117,181, 64,118,230, 93, 53, 38, 61,212,166,224,146, 80,197,207,239,147, 21, 44, 81,237, 80, 20,159,161,192, 52,
+152, 21,172, 83,103,129,246,129, 87, 52,189,154, 43,190, 83, 24,147, 17,210,170, 34, 76, 56,231,172, 91, 44, 21,179,146,218, 78,
+213,226,116, 29,174, 6, 38, 73, 56,173,102, 37, 43,133,206, 55, 22,154,131,220,212, 70,228,148,172,171,111, 58,163, 95, 21,153,
+193, 64,145, 54, 6,142,221, 17,103, 47,191,224,229,213, 37, 5,104,187,134, 92,235,172,202,181, 7,144,159, 85,244, 55, 49,172,
+162, 50, 67, 52, 18, 93, 27,248,222,119,191,203,242, 48,240,226,197, 5,169, 70,222,122,248,144,213, 98,201,199,159,124,198, 79,
+126,242,115,110,223,186,199,195,119,191,195,233, 23, 31,153,250,184,117,196, 41,225,194, 64,223, 79,140,185,242,237,111,252,136,
+147, 3,248, 55,255,250,231,108,119, 61,222, 59,138, 42, 33,116, 28,174,143,121,227,193,155,118, 99, 78, 3, 85, 2, 11,109, 56,
+186,187,230,162,223, 50,140, 61, 77, 92,210, 54, 43,154,133, 67,170,227,181,213,109, 94,191,123,196,211,103, 31,242,233,147, 79,
+ 89,250,150,160,193, 92, 5, 73, 73,197,148,218,200,172,145, 16,163,251, 53,174, 33, 89,196, 31, 93,219, 26,212,100, 24,232, 25,
+209,177, 16, 84, 80,239,121,118,246,132,179, 23, 79, 12,169, 76,182,204,109,153, 87, 69,206,155, 7, 23,229,106,219,191,138, 40,
+174, 89,236,189,195,214, 26,234,133,218, 56,134,169, 18,114, 34,180,129, 82, 10,157,182, 20, 96, 17,132, 90, 70,115,152,228,194,
+ 46, 13,172,154, 5,181,100,186,198, 96, 62,165, 84, 52,207,164,230, 90, 16, 18,162,118,191,185,160,182, 2,144,194,100, 40, 7,
+134,105,195,167, 31,255, 10,113, 13, 18, 28, 77,211, 82, 82, 36,107,166,140,153,169, 76, 60, 59,125,108, 19,163,154,145,170,180,
+161, 97,213, 52,108,211, 72, 14, 13,191,254,248, 12,239,148,147,163, 3,148,198,160, 48, 65,104,154, 5, 71,139, 35, 14,186,192,
+229,117,143,200, 45, 67,140,166, 66,240,158,223,249, 79,190,205,251,159,127,198,127,255, 47,255, 39,218,101, 64,130,112,188,128,
+218,172,120,118, 62,226, 60, 44,157, 67, 39,177,157,100,172,104,176,150, 80,147,209,214, 74, 52,117,176,101, 74,152, 42,184, 74,
+ 69,114,193,121, 37, 71, 8,162, 84, 41,228, 34, 52,206, 28, 56,206,153,176,208,214, 46,142,224,132,152, 50, 12,133, 92,118,168,
+ 42,190,105,137,169,103,220, 95,210, 29, 31,130, 19, 92,177, 7,116, 13, 43,202,126,164, 68,193,181,115, 1,213, 10,190, 4,219,
+157, 78,201, 14,247,166,218, 36,207, 41, 37, 77,212, 16,232,227,104,207, 49,183,132, 49, 50,213, 68,179,114, 44,180, 35,230,129,
+154, 58, 52, 12, 52, 85, 72, 9,180,107,140, 57, 48,237, 8, 11, 37,120,199,229,126,164, 45,106,121, 19,139, 66,147, 29,121, 47,
+164,169, 71, 23,129, 90,150,184,234, 9,157, 71,124, 67,112,208,133,150,147,215, 91,222, 56,132,235, 34,124,122,181,228,160, 93,
+144,151, 11,250,253, 72,215,182,188,246,230,138, 77,133,103,143, 19, 92,192,101, 81,242, 62,209, 15, 59,118, 49,145,182,213,138,
+ 45,205, 60,249,252, 57,242,212, 38, 55, 26, 90, 14,244,150, 49, 57,174, 19,203, 82,112,165,177, 2,170, 31,217,135, 61,185, 47,
+ 76,125, 65,107,195,225,108,112,122, 89, 97,191,143,140, 90, 40,162,180,206,209,181,142,251, 88,151,255,196, 9,185,181,213,174,
+ 83,179,198,221, 88,225, 10, 70,154,185, 51,119,207, 17,136, 39, 11, 86,150,105, 67, 95, 33,189,184,164, 31, 39, 38, 28,190,194,
+181, 40,147, 49,207,216,109, 10,141, 66,123, 96,167,243, 48, 84,220, 16, 57, 57,110,152,135,138, 92, 92, 79, 44, 91,111,147,128,
+ 10,113,200, 44,194, 44,195,191,241,174, 79, 19,187,190, 82,138, 67,100,193,245,254,194,172,207,181,103,200, 35,101, 29,168, 87,
+ 61,178,203, 22,254,162,209, 58,235,153,103,146, 83, 71, 91, 38,130, 52,184, 42, 36,151,200,170,132,125, 38,137, 93, 63, 37, 26,
+138, 88, 98, 33,106,143, 4, 99,168,120,103,244, 77,153, 85,248,140, 22,253,171,192,209, 90,144, 7, 15,184,112, 39,196,190, 16,
+128, 73, 3,182, 81,152,253,228, 41,103,163,190,105,182,176,140, 60,119,236, 78,240, 26,140, 28, 87, 11,226,189,249,205,139,165,
+ 99,169, 24,109, 12, 81, 82,169,120, 53, 76,100, 77,144,179,137, 89,114, 41,184, 57, 41,230, 70,213,110,157, 82, 65, 84,105, 52,
+224,212,120,243,126,190,121,111, 64, 49, 57,155,226, 79,252, 77, 80,139, 9,186,210,100,147,128, 90,132, 18, 42,204, 42,244, 66,
+162,173, 74,214,106,234,118,102,229, 62,198,249,141, 41,145, 68,104, 48, 85,174, 40, 20, 2, 34, 38,190,105, 80,138, 51, 53,121,
+245,246,128,245, 34,102, 27, 83,251, 63,114, 18,188, 7,157,249,181, 94, 11, 99, 44,166,194, 68, 17,241,150, 79,238,178, 65, 77,
+230,180,185,154, 11,184,140,134, 96, 92,123, 50, 78, 28, 22, 92,152,172,234, 20,135,107,109,204, 58, 77, 19, 73, 42,161, 88,129,
+ 52,165,145,126,187,183,164,185,154,172,128, 18, 1,175,166,172,205,137,197,114,137,122,229,244,233, 11,174,174,182,104, 48, 81,
+ 71, 65, 89, 31, 30,114,125, 49,130, 42,222, 7, 84,234,252, 57,206,242,213, 98, 86, 9,197,248,141,130,173, 77,156, 84, 68,220,
+156, 11,173,124,240,203, 15,249,244,209, 35,164, 13, 52,178,226,219,223,186,141,111, 28,169, 36,110,191,246, 22, 97,209, 64, 73,
+200, 8,146,123,104, 50, 99, 4,101,193,209,235,183,120,251,205,187,124,242,179, 63,229,122,179, 65,213, 84,165, 72,101,156, 44,
+ 41,238,233,163, 15,112,218,160, 77,224,157,119,127, 68,247,224, 77, 54,253,134,125,205,172, 15,238, 16,135,132,166, 9, 45,133,
+195,251,119,249,241,143,190, 71,218, 62,229,227,191,253,132,247,222,123,194, 15,191,247, 77,139,202, 77,133, 80,212,162, 35,243,
+140,120, 76,246, 89,105,105,141, 71, 79,139, 58,187, 78, 26,223,144,107,182,221,110,169,228,236,232,211,136,244, 61,237,106,197,
+218,169,133,170,164,200,197,102,139,115, 29,183,110,223, 97,216, 93,177,219,237,136, 83,111, 33, 17, 83,180,194,115,214,162, 20,
+108,189, 53,108,119, 92, 93, 92,112,120,120,136,196,128, 91, 20,106,137,232, 84,137,147, 55, 11, 75,153,152,178,221, 68,117,198,
+170,130,146,197, 32, 40, 70,175,242,198,197,207,133, 68, 97, 28, 39, 54,167,167,180,175, 63,164,201, 45, 81, 18,117,156, 56, 63,
+123,201, 46, 79, 28, 54, 97,198, 32, 23,114,142, 76,253, 68, 77, 25,231, 26, 46, 95,156,178, 92, 46, 57, 56, 56, 6,239, 13,164,
+113, 61,130,115,132, 91,129,110,185,194,137, 41,171, 65,209,208, 18,164,218,251, 52, 13,136,243,196,254,130,135,247,239,178,217,
+ 9,239,253,234, 11, 46,174, 94,240,238, 91,239,242,251,255,233,111,243,254,167, 47, 73, 87, 47,121,251,173, 35,218,166,229,206,
+241, 9,255,242,143,254,148, 41, 15, 6, 1, 82,197,181,133, 60,102, 92, 85,210,100,163,243, 90,231, 74,149,138, 84,251, 51, 40,
+120,148, 76,157,237,183,222,214, 5, 65, 81,241,164,132, 89,197,180,144,179,216,181,237, 32,197, 57, 76, 88, 2, 57, 86, 66,107,
+140,128,156,132,151, 47,206, 56, 62,184,101, 41, 88,193,147, 53,146,226,150, 42, 66, 35, 66,138,134,147,246,177, 50,197, 13,206,
+ 5, 82, 30,144,198, 64, 64,185, 84, 36,155,181,215, 75,161,122, 79, 78, 35, 69, 38,156, 58,218,218,224,134, 64, 8, 48,186,150,
+218, 42,194,138,156, 19, 77, 59, 7, 39, 57,229,112,217, 48,214, 76,140, 17,201,182, 38,204,147, 67,106,102,146, 1, 77,126, 70,
+ 27,119, 12,123, 37,231,158, 69, 56, 0,181, 53, 97, 43,153,219,173,185,208,163, 81, 62,168,222,168,140, 82, 42, 93, 19,120,171,
+ 53,120,204,245,177, 35,200, 49,254,214,138, 58,129, 62, 45,188,124,122,198,203,205, 72,179, 44,220, 10, 71, 44, 78, 94,103, 75,
+ 96,243,242,140,126, 26, 56,125,108,161, 89,227,230,130,182, 21,218,139,181,161,141,183,231,172,214,194,116,157, 24, 99,196,215,
+134,243,197,146, 69,231,208, 88,200,211, 21,165, 36,134,169,144,178,217,140,183,179,245, 45,204,158,115,153, 69,114, 94,255,254,
+232, 60,127,165,179,150,153,148,119,248,149,196,185, 84,139,173,205, 70,155, 2, 60, 56, 57,192, 91,142, 16,254,216,177,158, 19,
+232,112,112,237,133,109,211,208,219, 35,156,161,192,117, 53, 93,213, 84,205, 35,127,181, 43, 92,151, 17,127,184,198,101,184,120,
+185,103,127,253, 4,134, 61,181,191,102,146, 72, 30, 91, 98,218, 89,195,236, 3,117,155, 72,100, 86,193, 38,102, 83,154,168, 53,
+ 17,242,146, 84, 54,212,120, 65, 12,194, 16,148, 49, 93,195,228,168, 30,106, 91, 41, 67,197,181,129, 82, 11,105,220,163, 69,240,
+ 62,144,167, 61,133,150,152, 34,165, 90,163, 23, 52,160, 82,136,217, 50, 51,171, 56,252,176,180, 6, 54,192,180, 76,172,250, 9,
+239,213, 83,106,157, 21,229, 70, 98,147,202, 92, 45,103, 98,169, 22,216,162,179, 93, 65,205, 34,164,100,178,204, 99,141,146, 45,
+ 62,179,218, 76, 31, 21, 82,174,168,138,217, 75,164,190, 82,150,163, 2,217, 98, 74, 45,220,229,102, 53, 94,113,115,246,122,158,
+253,237,102,123,179, 15,160, 5,166,100,135,139,177,227,132, 52,103, 70,136,218, 24,147,234, 40,213, 10,143,209, 87, 52,169,205,
+137,196, 32,254, 2, 56, 31,230, 61,124,161,144,112,213, 2, 92,114,158, 88,180,158, 44, 80,178,208,120, 37,213, 27, 7,133, 89,
+ 99, 74, 18, 70, 41, 6, 6, 81,243,196, 87, 17,114, 77,164, 8, 57,123,212, 85, 92, 51,171, 77,243, 60,248,147,138,195,190,103,
+ 73,102,225,207,106,107, 13, 93,120,123, 80, 22, 32,154,130, 61,168,241,204,227,156,164, 36,177, 16,125,162, 38, 75,189,155,114,
+165, 86,193, 59,207, 84,147, 9, 75,146, 85,137, 69,141,135,255,252,197, 25,215, 87, 87,118,112,123, 71,144,128,136,210,199,129,
+235,205,198,132, 67, 40,164,132, 96, 55, 86, 74,204, 81,183,206,252,144,197,126, 30,106,181,248,214,156,168, 89,248,232,211,143,
+249,236,227,207,168,185,226, 50,156,159,191,160,250, 55, 72, 83, 79, 77,240,236,241,199, 44,219, 63,224,251, 63,254, 49,159,125,
+254,132,139,151, 79, 72,125,133,152,232,142, 29,239,126,237, 45,150, 26,249,171,159,254,148,152,139, 29,254,226,112,206,108,149,
+ 69, 42, 85, 61, 5, 97,209,118,180, 11,101,136,231, 80,146,105,179,213, 33, 8,251,180, 37, 69,207,189,195,187, 28, 30, 30,241,
+171, 15,127,201, 47,255,238, 3, 46, 55, 23,108,119,251,217,250,145, 24, 74,102,204,217, 14, 79,113,120,103, 35,217,126, 26,152,
+ 98, 34, 52, 45,109, 23,240, 65, 9, 89,144, 27,209,103, 46,196, 52,226,150, 1, 34, 76,215, 3, 27, 95,240,174,101,202,153, 24,
+ 51,168, 50, 14, 61,253,176, 99, 26,173, 16, 24,167, 72, 41, 51, 97, 81,103,241,167, 26, 77, 45,215,194,233,217,115,222,122,248,
+128,198,141,212,164,140, 41,209,202, 28, 83, 92, 5,167, 13,203,160, 51,125, 43,163,203, 22, 31, 58,144, 68,241,205,204,111,152,
+193, 21, 88,194, 89, 63, 70, 62,248,236, 51,170,243, 28, 30, 62,176,136,223,201,177, 90, 30, 17,218, 96, 26,150, 84,153,234,192,
+148, 35,251, 52,226,130, 7,104, 24, 82, 0, 0, 32, 0, 73, 68, 65, 84,199, 21, 33,199, 9,117,158, 41,103,164,100, 98,138, 80,
+ 10,235,245, 9,174,182,212, 2,174,109, 76,132,164, 54,149, 24, 39,179,181, 93,111, 55,172,110, 57,188,203,124,254,197, 19,182,
+ 19,124, 99,123,159,229,186,225, 79,254,236,223,178, 60, 56,230,187,223,253, 14,231, 79, 30,243, 79,255,233, 15,121,126,118,206,
+122,125,194,237,227,191,229,201,227, 71, 36, 55, 39,129,168,167,250,201, 14, 95, 17,139,123,118,222,146,190,100,122,245, 44,176,
+191, 91,161,120, 19,204,137, 32,120,188, 51,209,216, 56, 89,116, 42, 85, 64,131,101, 45,196,136,136,105,119, 4, 11,175, 26, 75,
+ 34, 71,197,139,103, 63, 76, 92, 94,109, 56,188,117,200,152,139,249,221, 67,194, 47, 91,139, 91, 78, 74,145, 68, 77, 3,197, 59,
+202,140,123,106, 93,139,244,142, 84, 19,206,101, 35, 72, 98,164, 60, 81,165,230, 68, 10,194,178, 13,196,156,185, 78,145,154,153,
+225, 34,137,218,169,253,172,193,209,167, 61, 75, 15, 58, 8,251,216,207,244, 76,227,111,176, 16,242,101,158,225, 80,183,144, 52,
+146,229,154, 66, 99, 73,152,155, 45,101, 44,208, 79,140,219, 53,155, 22,174, 7,240, 37,209, 6, 79,118, 51,149, 45, 8,215,179,
+207,220, 77,133, 57, 41, 11,231, 32,199,104,238,167,153,202,215,180, 45,221,162,133,226, 40,139,142, 69, 23, 8,135, 75,250,100,
+219,197,213,235, 45, 91,175,228,231, 17, 55,100,134,112, 0,107, 71, 30, 34,244,137,143, 6,101,186,174,212,205,158, 97,179, 99,
+ 24, 43, 62, 9,174,122, 54,207,247,164, 67,211, 2, 77,155,107, 22, 97,133,107, 3,113,194, 68,147,173,252,189,147,253, 70, 41,
+159,110, 44,115, 55,251,239, 10,113, 44,196, 58,145, 75,100,221, 28,226,103, 94,174, 0,157,124,169,162,103,206, 72,111,154, 47,
+179,210, 59, 15,225,150,127, 53, 25,192, 67, 61, 9,244, 4, 82,176,255,107,220, 59,134,113, 98, 75,162, 70,230,128,157, 13,117,
+ 26,240,174, 35,145, 73,195,128,120,216, 77,213, 26,161, 32,148,152, 16,137,100, 58,164, 38,163, 3,206, 90,145, 80, 60,117, 76,
+ 36,111,150, 64, 70, 59, 20, 60,144,107, 38,167, 72,160, 37, 75,176, 64, 23, 17,180, 22,180, 70, 82, 77,120,245, 80, 23,136, 8,
+163,174, 72, 57, 19,195, 68, 70, 40,177,224,139, 84, 84, 43,181,122,156, 51, 91, 87,169, 17, 73, 54,238,242,150,210, 48,103,101,
+ 39,196, 43,226, 10,105,176, 19, 79,171, 69, 94,214,155, 0, 7,205,182,135,206, 2, 37, 65,219, 89,212,101,153, 19,177,196,153,
+231,214,158,205,102, 19, 42,115,154,155, 20,164,204, 73,113,246,204, 2,205,120,173, 76,213,208,126,234, 28,121,102,192,215,146,
+201,226,112, 5, 74,137, 51,208,195, 4, 95, 53, 23, 34,217,126,254, 56, 3,118,212,132, 48, 78, 21, 87, 44,104,165,170,155, 59,
+244,185,171, 23, 3,243,249,121,198,239,138,169,104, 83, 49,144,164,162, 76, 36,116,126,111,166,152,240, 34, 68, 18,185, 10, 29,
+134,174, 21,145, 87, 97, 13,121, 78,186,171, 65, 17, 47, 52,217, 19, 73,115,161, 80, 77, 57, 25, 45,192, 70,189, 99, 44, 22,150,
+225,114, 52, 14, 64, 53,100,173,165,150, 53, 28, 31, 29, 18,227,165,117,206, 94, 45,109,236,166,187,174, 74,236,123,246,165,208,
+ 52,193,222,139, 98, 8,217, 90, 12,255, 58,140,102, 33, 50, 60,176, 55, 61, 66, 41, 56, 39,243,215,197, 38, 18, 53,218,216, 71,
+ 61, 65, 1,223,177, 27, 6,174, 63,253,212,172, 40,206,186,198,231, 47,158,115,246,236, 5,101, 40,136,120, 46, 46, 30,243,222,
+ 47,126,201,239,252,227,127,204,215,222,129,135,111,222, 99,218,108, 73, 35, 52,135, 29,223,120,231, 29,182,167,191,226,163,143,
+ 30, 81, 82, 54,109, 70, 73, 68,177,131, 48,207,196, 61,173,176, 88,220, 97,233,215, 76,155,200,234,240,136, 32, 19, 49,159, 19,
+163,144,196, 88,231,203,118, 73,206, 91,222,127,239, 23,124,248,228, 41, 42, 5,113,149,160,194,249,190, 71,231,145,108, 21, 11,
+ 32,138, 53,207,233,103,194,225,209, 33,139,245,154,152, 71, 64, 73, 41,162, 1, 26, 28,165, 40,253, 52, 49,109,119,182,207, 76,
+130,235, 51, 89,247,198,137, 78, 19,174, 31,216,237, 95, 82, 81,214,139, 53, 94, 34,187,105,178, 21, 43, 5,201,166,102, 86, 53,
+158,182,212,202,213,229,134,205,245,134,229,221, 59, 54,197, 9, 1,151,173, 64,108,154, 66,173, 29, 83,158, 8, 20,106, 3, 50,
+139, 88,237, 38, 51,244, 49, 8, 69, 21,153,169, 92, 34,149, 49,102,206, 79,159,243,218,237,215, 25,198,204, 80, 11,139,131, 67,
+ 86,221,138,188,223, 19,125,161, 31,123,250,253, 68, 22,165,235,132, 58, 51, 6,250,126,164,120,165, 85, 79, 35,158,234,109, 2,
+185, 10,149,141, 47, 52,141, 71, 93, 71,209,132, 79,217, 52, 36, 81, 25,153, 56, 17, 71, 94, 44,249,233, 47,159, 83,130,160,225,
+231,252, 23,127,240, 53, 62,255,252, 57, 79, 78, 63,224,135,191,253,187,188,253,224, 46,175,221,121,200, 55,223,121,151, 79,158,
+ 60, 65, 93,182, 34,167, 20, 11,140, 74,182,238,169,226,230,233,159,165, 59,230, 82,172, 16, 83, 33,170,233, 96,236,154, 81, 74,
+245,136,171,102,149,203,153, 41,142, 38,214, 44, 6,240,200,181, 7, 21,188, 4,212, 91, 66,100, 42,137, 90,103,183, 8, 13,217,
+ 87,130,120,206, 46, 94,208,172, 15,173,171,243,230, 33, 78,113, 52,178,216, 28,207,236,202,154,156,247, 72,181, 34,167,150,108,
+118,222, 98,215,111,170, 21, 63, 13,150,191,160, 74, 40,129, 84, 51,125,172,212,164,136, 47,180,210,146,202,100,226,215,186, 64,
+181, 32,113, 66, 74,166,210, 18,131, 3, 47, 52,131,146,146,197, 64,167, 77, 36,165, 68, 19, 2, 67,186,100, 93, 21,239, 58,170,
+107,112,221, 93,134,241,136,169, 31,216,143,103,196, 95, 79, 44, 22, 75, 43,100,167, 29,151,233, 16, 31, 58,202,184,229,126,115,
+196, 49,129, 93,129,116,157, 88,104, 70,114, 37,141, 19,211, 52, 32,100,234,148,240,107,133,198,209, 87, 97, 51, 64,217,143,164,
+226,105, 90, 3,201, 84,129,215, 87,202,170,129,179,209, 19,167, 35,218,163,150,102, 5, 99,104,184,117, 2,119, 79,108,159,254,
+249,203, 67, 46,207, 58,106, 86,150,157,226,151,107,206,155, 53,177, 8, 58,128,244,202,213,139, 68, 40,153, 58,141, 20, 87, 9,
+175,159,160, 78,232, 83,102, 59, 36,186,163,214, 92,119,185,152,222,107, 86,184,143,179,222,165, 47,153,234,197, 92, 88,175, 32,
+227,166,185,254,234,194,124,151,161,169, 95,118,254,181,254,125,145, 28, 38,219,226,142, 55,122,222, 22,248,192, 9,215, 35,108,
+206,175,240,217,210, 63,243,156,110,152,118,153, 18,237, 57, 78,198,114,227,139, 71,164, 65,165, 33,231,129,170,153,145, 72, 30,
+ 10, 46, 95,163,213, 49,229, 45, 46, 44,168,141, 82,199, 29, 41, 38, 52, 56, 68, 2,190,142,148, 28,152, 92,162,230, 4, 25, 52,
+120, 34, 35,211,188,150,213,162,148,218,115,220, 30,114,114,114,155,103, 27, 40,209,244, 91,187,184,199,223,224, 93,107,205,228,
+153,218,228,110,204,253,110,174,138, 83, 68,234, 44,248, 73, 21, 55,199,166, 82, 44,117,201,200,104,117, 78, 37,178, 61, 99, 82,
+ 19,198, 85,201,175, 68, 98, 42,118, 8,220,120, 82, 74, 46,175,240,178, 18, 64,138,216, 65, 58,239, 50,110,118,222,137, 98, 93,
+225, 60, 34,173,147,237, 33,196,207, 25,186,197,118,228,185, 22, 43, 80,164,226, 52, 32, 57, 89,193, 0, 22,198, 48,219,231,110,
+236, 77,150,200,150, 44, 11,218, 91,247,171,226, 44, 10, 22,219,153,167,100, 9, 63, 55,251,242, 82, 51,190, 85,100,178,135, 54,
+ 84,166, 98,246,165, 32,182, 23, 86, 21, 82,181, 64,156, 6, 99,196,171, 10,165, 6, 84,140,217,171,210, 80,234, 64,174,144,147,
+216, 67,205,164,208,243,251, 90,102, 81, 98, 33,207,121,232, 57, 71, 50,149,219,119,110,179,223,247, 92,247, 19, 82,173,227, 23,
+ 53,203,142,201,105, 42, 77, 99,121,193, 34,193,120,253, 51, 59,255,242,252,226,213,254, 87,253, 77,148,173,189,150, 20,235,171,
+194, 73,213,108,126, 82, 13,102, 82, 29, 4,167,196,148,200,201, 14, 76, 17,219,183, 95, 94,109,248,127,254,242, 61,155,188, 80,
+240, 62,243,241,175,255,146, 55,223,254, 22, 37,238, 56,186,115,155,161, 79,168, 83,218,245, 1,135,203,142,191,252,217, 79, 25,
+ 99,229, 7, 63,252, 46,247,238,157,240,179, 95,126,192,217,243,151, 44,187, 37,139,174, 99,219,111,152,166,137,176, 58,196, 45,
+ 2, 77,211, 34, 58,146, 93,161, 12,230,203, 45,165,114,112,231,136,227,195,142, 47, 62,255,136, 95,252,250,215,236,182, 3,109,
+171, 44,218, 37, 71,235, 29,159, 61,218,217,174, 60, 56,218,102,193,225,178,163, 91, 47, 89,174, 15,185,117,124,204,221,215,142,
+ 1, 79, 30,237,189, 78,147,141,114,139,128,155, 25, 14,195,126, 32, 78,209,186,162,146, 44,124, 33, 21,166, 52,112,118,126,193,
+211,167, 47, 88, 45, 91, 92,200,236,175, 6,131, 23, 5, 12, 48,145,203, 92,116,126, 73, 15, 44, 49,114,122,246,148, 55, 30,190,
+198, 36,138, 47, 38, 54, 44, 81, 73, 37, 19,221,136,100,193,185,150, 26, 42,231, 47,207,249,226,217, 83,156,115,228,148,241,106,
+121, 8,133,196, 27,247,238,240,214,219,111,241,232,209, 19,250,221,158,243,235, 13,251,113,207,144,149,177, 22,186,210,114,235,
+240,117, 62,120,246, 83,188, 91, 16,171, 41, 96,186, 38,224, 85, 40, 26, 8,173,224,241, 54,161, 83,203, 81, 48,248, 77,203,241,
+201, 49, 47, 55,215, 72,202, 72, 26,137,177, 16,199,132, 6,152,250, 1, 74,228,162, 93,112,123,113,204,243,122,198,216,195,123,
+239, 61,166,201, 91,222,251,236,140,253,245,196, 63, 82,248, 39,191,255,219,180,139,142,147, 55, 14,120,244,228,115,242, 4,205,
+ 98,193, 56,109,205, 1,227, 21,226, 76,177,100, 22,188,137,206,194, 32,157,185, 9,137, 58, 39, 25,182,234, 73,206,158, 29,100,
+ 75,137, 44, 81,230,248,228, 57, 50,245, 70, 87, 83,237,254, 52, 44,171,162,217, 18, 36, 19, 9,167, 5, 23,132,113, 10, 76,125,
+207,193,241, 17, 83, 1, 39,147, 77,140, 80, 98, 42,136, 26,191,157, 17,194, 90, 41, 53, 19,167, 74, 44, 3,206,117, 51,168,105,
+ 36, 75,107, 5,186, 20,115, 56,136,217, 17,125,174,208, 4,198,209, 38, 5,222, 59, 92, 84, 38,201, 72, 99,248, 95, 42,168, 47,
+180,169,193,117, 17,137,149, 82,128, 98, 5, 94,138, 19, 90, 43, 3, 45,190,192, 97,235,249,206,253,183, 8, 15,151,156,158,173,
+ 25,159, 14, 12,205,158, 40, 19,125,159, 57, 56,120,131,122,188,160,239, 43,151, 87, 91,250,203, 71,156, 95, 30, 49, 20,165,191,
+218,144,155, 37,110,119, 77,205, 59,174,175,183,140,147, 77, 32,243, 96,251,112, 95,108,191,188, 17,104, 23,129,234, 45,184,133,
+ 49,113, 57, 65,227,160,201,149,212, 56,220, 45,108,132, 61, 84,154,165,176,158, 5,103,167, 57,179,155,140, 34, 88,114,228,248,
+ 96,201,119,239,219, 74,224,195, 73, 25,215,199,112,104,226,187,124,209,177,237, 39, 62, 80,200, 35,212,173, 9, 33,163,237, 38,
+ 25,174, 50, 75,205, 12,199,129,156,225,249,211,107,242, 16, 41,181, 35,213, 61, 83, 78,164,161,199,249,150, 88,197, 78,245,238,
+203,121,190,212,155,176,176, 47, 69,112,238, 31,122,228,212, 58,124, 1, 58, 96,223,103,246, 99, 33,212, 74, 74, 91,134, 60,224,
+ 85, 9, 42,244, 53, 83,247, 17, 41, 66,242,150, 54, 39,201,236,152, 40,228, 50,145,231,231,114, 27, 32,180, 29,151,227,142,218,
+100,106, 30,208, 1, 98, 76,136, 4,210,100,231, 46, 41,145, 40,116, 62, 32, 76,134,235,142,166,119,210,154, 16,239, 72, 37, 26,
+ 34, 61, 69,134,151, 31, 49,108, 54,248,241,154,214, 79, 20,237,240, 57,102,212,123,235, 84,115, 70,164,204,105,107,206,184,233,
+ 86,214, 98, 9,227, 50,195, 71, 12,241, 88, 74, 34, 23, 67,200,170, 19,106, 21, 50,182, 3,114, 98, 55,106, 53,137,174, 21, 76,
+ 58,163, 81, 42, 72, 99,221,171, 20,193,169,146, 71,163,111, 73,149, 47, 15, 19, 75,111,177, 32,150, 89,225,253,213,232,215, 80,
+230,156,247, 82, 80,149,153, 60,107, 22, 13,235,252, 5, 98, 52,230,122,245, 38,153, 85,211, 9,136,193,227, 77,157, 92,204,170,
+231, 10,212, 49, 83, 22,214,173,230, 10,206, 21,219, 93,204,118, 56,106, 66,179,146,213,147,106, 66,213, 70,235, 49,154,229,162,
+ 36,179,151, 53,141,199,205, 74,123,201, 54, 41,240,206, 94, 95, 46,153,148,220,108,197,145,121, 79, 89,201, 67, 33, 43, 52,173,
+101,199,231,152,237, 53,120,172,178, 37,152,175,210,101,250,105,132, 92,230,104, 84, 3,247,212,155,209,180,128,115,206, 72,248,
+206,124,147,204, 95,179, 17,166, 55, 76,110,193, 40, 90,126, 38,112, 80, 8, 93,103,162, 73, 53,159,126,137,118,129,218,228,193,
+118,154, 86, 72,153,178, 69,138, 35, 52,142,253,245,196, 24, 7, 99,146, 75,203,230,250,140,159,252,244,207,121,247,205,119,185,
+222,236, 88,180, 13,119, 31,222,229,246,235, 39,156,159,126,196, 95,252,213, 79,216,236, 6,124,104,249,205,111,125,143,211,211,
+ 43,174, 46, 94,242,214,219, 15,248,237, 31,255,136,225,122,207, 31,255,249,159,243,224,225,215,249,205,239,253, 22,169, 76,236,
+119, 23,180,186, 36,229,204,182,159,104,221,146, 34, 27,254,226, 79,254, 53,164,107,126,253,233,199,168, 26,124,232,229,213, 57,
+183,142,142,249,222,247,190,207,225,193,154,131,147, 53,235,238,136,131,197,130,148, 19, 46,172, 24,114,207,148,108, 18,228, 92,
+135, 91, 37, 22,165,179, 81,189,154,226,186, 19,199,113,179,102, 20,240,226,201,110,132, 90,104,154, 53,228,196,102,184,226,234,
+229, 57, 93,211,225,124,195,127,248,247,127,205,227,211, 51,203,110, 78,243, 14,251, 6, 92, 36, 66, 8,128,120, 94,156, 95,177,
+221, 12, 28,174, 22, 76, 2, 34,142,182, 21,198,169,208,185, 76,241, 11, 38, 28,161,102,246,151,123, 54,215, 91,139, 44,118, 95,
+146,229, 52,195, 91,111,156,240,245,175,127,131,214, 47,249,236,241,103,188,120,254,130,253, 56,226,253, 1,161,129, 97,234,185,
+188,190,160, 31, 19,200,158,174,109, 8, 65, 9,174, 49,204, 44,153,160, 30,117,130,171,198,251, 44,106,250,146,235, 97,203,184,
+157, 8,234,216,111,183,168, 11,236,211,104,227,236,164,243,207, 18,216,109, 55,188,118,116,155,182,105,240,113,100,189,128,191,
+248,217, 19, 84,148,127,241,207,255, 25,255,228, 15,255,115, 54,209,113,121,158,184,125,187,130, 54, 44,143,142,184,216, 77, 48,
+153,176, 48, 21,197, 57,235,144,107,182, 67,216,114, 17, 44,153,175, 96, 8, 88,165, 5, 45,134,125,214,121, 20,174,102,239,116,
+ 40, 37,203,236, 10, 41, 84,211,247,218, 4,178,154,149, 13, 47,104,227,208, 84,172, 64,106, 90,170, 10,113, 24,216, 93,188, 96,
+189,238,184,220, 95,115,107,189,160,241, 13,113, 42, 4, 28, 69, 51,148,136,243, 13, 49, 22,187,175, 75, 36,168, 53, 4, 82, 35,
+146,156, 77,227, 38, 40, 62,209, 52, 38, 64,141,217, 26,147, 80, 27,138, 14,182, 40, 46,149, 68, 52, 25, 80,204, 56,233, 40, 49,
+205, 2, 75, 11,195,137, 78,240, 73,209,198,172, 92,217, 9,109,105,136, 85,153,114,207,241,193, 61, 78, 14, 26,220, 45,120,250,
+ 28, 86,141,112,176, 92,217, 51, 4,199, 15,190,182,102,117, 0, 61,240,211,124, 76,222, 79, 92,215,200,126, 24,168,186,226,240,
+193, 93, 74, 7,155,139, 53,233,233, 57,253,238,154,212, 7, 66,215,178,159, 22, 76, 79,182,212, 56, 17,251, 11,214, 10,126, 92,
+146,251,129, 86, 21, 73, 7, 76, 23, 80,246, 19,135,157,178,242, 38, 92, 67, 45, 17,141,185,211,189,232, 19,187,237,134,158, 17,
+175, 45,173,111, 95,169,203,151, 2,165,133, 67,129,209,195, 54, 24,175,191, 30,136, 5,172,180,129,183, 23,112, 48, 39,119,126,
+210, 6,238, 72, 96, 61,135,200,108,142, 14,136,143,159, 18,115,196, 83,184,170,202,123, 87,214, 60,148,169,208,140,123, 94,191,
+119,203, 10, 40,224,252,108, 71,117,153,241, 96, 69, 43,194,102,152, 56, 64,224,168,125, 69,198, 99, 42,132,133,137,167, 5,168,
+227,200,126,191,195,209,130, 36,212,239, 16, 42,177, 86,106,177,107, 55, 84,161, 76,149, 41, 23,132, 72,174, 25,149,130, 47,102,
+229, 83,231,169, 36, 8,158,178, 51,129, 97,174,197, 24, 44, 5,179, 60,183,133,210,239,236, 62,208,192, 56, 88, 46,138,243, 74,
+156,122,112,138,215, 14,167, 74,146, 17, 73,158,235,101,199,211,180,224,250,122, 75,222,143, 36, 41, 68,153,179, 45,140,241,110,
+129, 37,168, 81,171, 12, 32, 99,213,206, 13,181, 73,103, 27, 77, 44, 51,208,161,216, 97,219,168,169,205,115,170,243, 46,220,118,
+222, 69, 44, 67,221, 20,171, 38, 42,171, 26,240, 70, 11,158,225, 16, 74,150,108,110,172,106,126, 95, 74, 65,107,166,168, 80, 75,
+ 50,206,112, 53, 58,189,237,125,205, 55, 30,163, 5, 93,136, 86,202, 76,220,210,249, 97, 35,181, 82,113, 84,175,120,197, 10,148,
+108,118, 56,117,138,243, 30, 41,201,184,209, 50,127,255,217,254,162,165, 48,206,166,198,234,103,104, 5,118, 0,203,156,156,229,
+ 21,139, 2,173,224,165, 34,165,226, 26,219,145, 57, 4, 87,178, 41, 23, 69, 8,193,160, 44, 54, 27,168, 72,201,104,205,136, 83,
+ 75,154,147,108, 55,182,179,159,183, 98,170,248,166, 89,144,242,100, 7,119, 18,188,122, 60,130, 52,129,215, 94,191,205,147, 71,
+167, 20, 23,230,177,134,249,201,133, 74, 19, 26,144, 66,117,134,230,144,108,201, 85,181,232,171, 11,124, 63, 76, 76,217,212,149,
+ 54,218, 53,200, 79, 46,217, 30,144, 2, 82, 12,207, 91,106,166, 76, 25,130, 29, 62, 37, 89,241, 33, 57, 83,124, 33, 84,143,247,
+102, 13, 44,147,165, 9, 5, 31,184, 58,251, 59,254,253,147,247,200,213,113,114,114,143, 91,143,111,115,252,225, 9,236, 30,243,
+249,233, 11,112,202,118,215,179,233,123,226,184, 71, 27, 3,122,248,101,195,254,244,140,102,185,100,181, 56, 96,247, 98, 79,179,
+106, 57, 56,186, 79,231,148,234,225,120, 95,248,236,163,159,243,215, 63,249,119,164,152,120,112,247, 46, 95,123,248, 53, 46,118,
+ 59,250,221,142,203,231, 47,249,246,239,125,155,119,111, 31,205, 5, 85, 96, 26, 71,226,100,116,193,169,238,168, 37,226,252, 18,
+ 23, 28,244, 17,246, 38,222,112, 85,137, 84,198,201,147,202,100,193, 21,181, 18,217, 81, 70, 72, 57,145, 83,161,161,165,115, 11,
+186,119, 30, 82,122, 37,141,133,251,111, 60,228,217,203,231,148,120,131, 63, 54, 12,113,227,213, 64, 73, 85,240, 8,219,205,200,
+227,211, 83,190,251, 27,223,192,149, 72, 86, 71, 85, 79,219, 8, 37, 37, 10,189,141,163,219, 5,205,193,138,224, 3, 99, 76, 86,
+120,214,104, 35, 63, 17,170, 76,108, 46,159,115,112,116, 11,127,250,156,146, 42,227, 4,141,115,140,215,123,222,123,255,175,233,
+119, 59,186,102,133,119, 66, 27, 26, 98,206, 44,194,130, 84, 19,168, 57, 92,212, 89, 17,127, 51,169,147, 2,211, 16,121,114,241,
+130, 69,219,112,169,158, 48, 89, 10, 93, 33, 17,240, 44, 87,135, 44,252,138, 88,119,236,227,196,237,147,135, 60,125,254, 25,103,
+231,151, 92, 95,111,248,195,223,253, 49, 63,254,237,223,229,241,197,192,139,139,196,237,131, 53,207, 47, 35,103,151, 91,179, 68,
+169,162, 77, 99,221,149,155,241,209, 89, 64,146,105, 6,102,196, 50,234, 13,237, 43, 9,215, 40, 41, 87, 74,157, 32, 42,190, 58,
+ 34,160,206,174, 73,102,167, 65, 86,197,205,216,106,193, 50, 25,100,126, 46,213, 50, 39, 47,138,226,178, 13,199,130,180,214, 60,
+148,145,237,217, 57,187,151,158,187,175,221,101,213,117,100, 73,148,212,216, 97,220, 85,202,212, 82,203, 30,113,142, 92,213,104,
+138, 98,254,242,220, 79, 56,241, 72,105,104,156, 35,107, 38, 39, 71,169,137,212, 79,248,197, 44,254,242,134,122, 19, 58,147,114,
+167, 72,246, 66,141,149,126,215, 67,240,132, 54, 19,147, 53, 92,193, 41,211, 24, 25,171, 18, 22, 29,177,122,214,206,115,112,228,
+104, 61, 28,118,149,243,150, 89, 64,156,105,146,190, 58, 92,125,129, 54,103,218, 69, 32,123,129,236,105,218, 53,223,127, 29, 66,
+128,159,138,227,243,218, 49,198,194, 80, 11,199,183, 86,124,235, 91,239,176, 95, 42,143, 79, 43,227,163,150,151,131,121,198,251,
+113,226,200,119,148,199,149,161, 20,246,155, 43,142,218, 74,188, 56, 98, 32,147,210,128, 95, 31, 67,107, 62,115,237, 13,115, 90,
+118,133,208, 65,219, 52,175,188,227,185,192, 90,173, 35, 30,128, 58, 21,110, 32,226, 2, 44, 4, 86, 95,230,170,240,154,179,168,
+213,155,224,149,133, 19,134,168,148, 60,145,170,242,206,253,215,120,251,238, 1, 21,216, 20, 24,167,134,182, 53, 57,242, 0, 12,
+173,227,160,245,100,175,108, 10, 60,155, 10, 23,227,200,129, 4, 58, 39,244,165,176,189,220, 49, 29,175,112,234,232,119,153,221,
+243,151,104,204,140,227, 14,173, 59,234, 14, 70, 25, 81, 18,101, 80,114,134, 36, 61,121,178,226, 83,147, 37,178, 77, 82, 24,117,
+ 66,213, 83,114,162,248, 21,251, 84, 40,113,162, 58,227,177, 36, 87, 64, 91, 36,101,107,148,178,195,137, 80,235, 96,114, 7,177,
+176, 44,117, 70,194,175, 89,136,101, 36,150, 76, 39,137,175,223,123,141,251, 95,255, 14, 79,246,231,208,180,108, 46,182,196, 33,
+226,115, 49,128,193,124,251,204,108,236, 57,155, 91, 76,224, 83,196,225,102, 49,157,204, 33, 30,222,153,162,187,148, 74,158,199,
+230,130, 9, 29, 10,160,115,234,145,136,224,155, 57,189,165, 96, 0, 22,177,145, 90, 85,190,140,122, 85, 49,142,110,149,121,132,
+236,236,208,159, 11, 13, 41,216, 14, 78, 50, 34, 30, 39,197,118,239,197, 70,219, 41,153,184,201, 32, 18,106,202,200, 89,200, 84,
+102,136, 74, 81, 71,171, 51,201,170, 22,219, 87,207, 53,217, 92,202, 80,156,129,101, 40,101, 30,135,151, 89,244,102,135,112, 64,
+168, 89, 81,167, 84, 73,136, 42, 83,129, 34, 9,193, 58,231,226, 20,173,102,193,139,213, 66, 81,156, 73,160,201,117, 78, 66,104,
+117,246,220, 87,242,208, 81,188, 69,241,149, 41,145,130,117,249,157,243, 56, 15, 57,101,178, 84, 83,168, 55, 13,165, 86, 90,223,
+224,212,186, 26,212,148,178, 94,157, 69, 51, 86, 59, 80,166, 60,204,239,149, 35,206,175, 35,204,138,216,251, 15,239, 16,199, 29,
+155,171,173,137,117,164,188, 18,102, 57,167,248,106, 74,255, 44, 6,103,169, 53, 19,199, 72,201,149,140, 9, 7,133,202, 66, 90,
+ 82,129, 49, 78, 38,176,186, 9, 42,201,133,111,191,249,128,232,170,229, 14,239, 71,174,207, 62,225,236,139,247,200,100, 98, 76,
+196, 34,108,246,123,210,144, 25,246,189, 21, 77,190,161, 76, 19, 79, 94, 60,165,115, 11,154,101,195, 85,127,205,129, 91, 19,188,
+121,248,217,246,252,236, 47,255,152,247,223,251, 9,221,250,128,119,191,245,155,220,191,119,155, 85,187, 96, 36,195,188,159,109,
+ 69, 72,251, 13,213,205, 80, 30, 5,100, 66, 27,235,232,106,118,248, 82,241, 37,210, 75,143,182, 74, 78,222,146,163,170,199,231,
+140,180,158, 65, 18,205, 60,109,202, 81, 77,120, 88, 3,169,169,228, 26,113,251, 53, 83,158, 32, 13,156, 28, 31,179, 90, 44,185,
+ 28,174,205,246, 41,157,221,236,222,252,188, 57, 21, 35,196, 21,229,244,217, 11,190,246,238,219, 52,139,142,101, 50, 27, 26,193,
+155,245,209, 9,173, 91,178, 75, 59, 62,249,228, 67, 92, 80,150,190,101,138,211,124, 95,217,114,179,223, 12,156,215,167,232,242,
+ 53,206, 94,156, 18,188, 35,172, 86, 76, 62,209,167, 43, 74, 74, 52,221, 18, 77, 54,125,152,146,165, 36, 86,151,145,234, 80,245,
+115, 78,128, 67,106, 33,180, 13,205,210,163, 53, 16,251,202,230,106,203,209,131,251,220, 90, 20,118,195,149, 77,124, 66,224,246,
+201, 29,214,221, 33,139,176,164,234, 29,174, 54, 27, 98,222,224, 59,229,244,124, 36,180, 75,220,250, 14, 31, 60, 27,232,251,202,
+242,176,165,184,196,126, 19,249,232,195, 79, 56, 63,125, 66,144, 5,109,104,153,246, 91, 60,158, 50, 79,177, 84,133,164, 25, 71,
+ 32,168, 89, 41,197, 7,131,135,212,108,227,243, 50,119,187, 58, 71, 81, 85,197,221, 68, 30,123,161,200, 92, 28,171, 77,175,124,
+177,112, 38, 81, 71,174,213,208,181,185, 48,185, 9, 31, 86,136, 23,250, 24, 41,201,177, 92, 29,240,236,217,231,228,184,229,193,
+155,239, 32,190,101, 44, 61, 94, 50,235, 81,153,234, 22, 45, 5, 87,132,118,225, 76,184,234,140,165,161, 98, 19, 56,117,158,177,
+ 79,176,244,224, 19,154, 2,117,236,169,213, 35,221, 2,156, 39,110,118, 56, 95,112,174, 18,197,209, 21, 40, 93, 69,119, 86,219,
+148, 58,143,221, 9,198,188,200, 66, 70, 88, 23,200, 37, 18,100, 98, 56, 27,105,155, 14,223, 79,232,120,141,107, 3, 83,204, 4,
+ 89,224,111, 2, 88, 34,108,135, 9,105,122,155, 20,142,153,197,218,219,212, 8, 8, 61, 76,195,134,181,131, 73, 35, 75,241, 60,
+ 88, 43,180,112,242,134,240, 41,183, 56,188, 15, 23,123,232,158, 31,179,174,176,126, 8,245,218, 49,196, 59,236, 67, 98,240,142,
+ 52, 64, 26, 29,191,124, 33,248, 45,184, 17,174, 79, 47, 41, 83,194,141,142,112, 80,137,251,129,221,254,128, 18,224,250, 60,114,
+103, 33,184,198,211, 85,216, 76, 5,191, 54,127,187,204,193, 45,175,130, 88,248, 42, 2,123,166,189,109, 51,101,234, 25, 98,162,
+115,129,195,182, 53, 95,248,188, 27, 63,240,238, 85,246,122, 11,212,163,142, 35,247,229,247,240,183,151,120, 89,176, 84,211, 61,
+105,113,220, 90, 29, 16,156,177,242,179,119,196,118, 77, 2,166, 9,100, 40, 72,201, 20, 63,144, 82,166,209,134, 82, 50, 83,201,
+ 52,174,144,138, 67, 67, 67,142, 19, 99, 26,105,154, 96, 48,177, 82,241,174,101, 31, 71,132, 72, 77,137,154, 21,167, 45,217, 7,
+116,200,175,152, 32,177, 68,164,117,184,201, 56,214,105,156, 8, 44,208, 38,146,226, 64,138,166, 91,234,180,114,188, 88, 81,115,
+203,176,217, 49, 93,101, 22, 65,145,168,120,145,106, 62,229, 58,139, 74,139, 29,160,182,153, 53,162, 91,205,182, 7, 55, 34,156,
+ 9,118, 68,103,124,163, 51,186, 91, 81,161,117,166,108,207, 89,208, 96,227, 94, 43,187,188, 89,162, 80, 68,102,183,123,181,129,
+ 62,115, 1, 33,179, 81,165,148,155,138,218,200,116,213,155,159,216, 94,178, 67,181, 34,243,190,222,196, 53,134,149,208, 57, 57,
+174, 80,144, 44,224,234,171, 37, 74,214, 74,115,147,192, 53,127,224,200, 77,172,171,179, 78,124,182,207,136, 84,136,133, 70,148,
+172, 54, 5,168, 69,230, 14, 54,162, 26,108,234,224, 61, 90,156,141,251, 75,196, 55, 22,110, 83,138,173, 34, 50,197,178,190,181,
+ 82,147,165,205,153, 96,207,196,108,169, 26, 46,182,250, 3,222,122,231,247,240, 77,226,239,254,230,207,184,120,121,137,184, 64,
+101,228, 96,209,161,173, 18, 92, 71,163,152, 23,150,138,119,149,253,126,160, 93, 29,216,103, 37,133, 58,175, 66, 92, 51,103,200,
+ 39,179,177,184, 57,187,190, 74,161,122,177,253,190, 20, 94,187,123,143,131,182,229,195,143,254,142,167,167,103,102,205,153,119,
+ 73,165, 20, 98,132,174,179, 44,245,146,226,172,157,144, 25, 29,107, 65, 56,109,112,168,247,166, 38,142,150,125,174,222,196, 79,
+ 57,101,198, 10, 93,215,178, 90, 46, 89,189,222,176, 88, 31, 50,142, 3,207, 47,207,249,244,243, 71,228,253,196,238,234,138,253,
+230,138, 49, 71, 40,137, 60,101,198,201, 49,198,196,227, 39,143,217,110,255,152,110,217,113,116,114,196,122,125, 7,114,195,139,
+ 79,254,150,245, 58,241,214, 59,247,216, 85,207,215,223,126,135, 92,138,133,241,212, 9,117,149, 16, 58, 38,122,234, 62,145, 92,
+ 33, 84,123,194,169, 40,226, 61,162, 35,163, 78,228,108,157, 45,206, 96, 33, 49, 43, 73, 28,190, 25,144,186,160,137,217, 82,151,
+ 50,100,117,132,133, 71,162, 35,230,200,212,155,237, 50,141, 47, 72, 2, 45, 5,215, 40,119, 78,110,115,126,117,101,197,239,236,
+234, 72, 41,207,112, 32,131, 53, 5, 47,236,118, 59,174, 95,158,113,255,225, 27, 84, 31,208, 38, 19,175, 77,211,208,248, 64,140,
+ 61, 31,126,248, 11, 94,190,220,242,221, 31,124,155,243,203, 51, 62,126,255, 9,136,117,226,177, 86, 35,214,237,182, 60,254,228,
+ 9,231,231,103,124,243,155, 63, 48,239,125,222,225,180,163,113, 29, 99,156, 44,108,137, 66, 42,133,198, 57, 22,190, 35, 57,101,
+ 24,122, 84,188, 21,242,206, 17, 90,103,225, 65,126, 73,234, 18,155,235, 29, 53, 43,111,188,243, 53, 62,252,245,207,152,166,137,
+245,162,227,232,214,235,172,156,103, 26,133, 84, 39,106,220,114,117,117, 74,173, 45, 77,112,220, 57, 62, 33,214, 21, 63,253,249,
+ 99,126,244,221,135, 44, 27, 71,154, 18, 49, 87,154,166, 35,105,162,164,145,133, 91, 48,104, 75,140, 3,162, 13, 94, 32,214,140,
+102, 33,107,180, 93,191, 10, 82, 35,222,130,202,204,230,151,203, 28,163, 59,135, 71, 85, 33, 91, 58, 20,165, 26, 23,226,149,221,
+ 21, 69,170,218,180,174,164, 87,154,161, 34,144,134,145,136,167,109, 23,164,105, 98,179,221,242,236,236, 11,134, 97, 64,106,225,
+122,115,197,201,157,123,248, 82,104,107,107, 32,153, 96, 20, 72, 21, 19,169, 74, 88,144,179,113,188, 53,168,173,173, 72, 70,197,
+235, 33,122,179,227, 45, 23, 45, 49, 9, 68,168,236,113,183, 2,186,201, 76,219, 76,183,240,168,116,248, 49,227,187, 21,125, 30,
+152,114,101,204, 3, 77, 11,117, 12,166,121,105, 97, 72, 59,196, 11, 31, 95,158,242, 71,127,246,167,172,151, 7,244,211,142,234,
+ 11,135, 93,197, 47, 90,252, 65,229,250,209, 33,171, 91, 13,211, 21,232,112,197,164, 61,154, 45,240,201,215, 89,184,164,160, 41,
+227,210,192,245, 46, 50,101,101,237, 23,175, 14,211,221, 57,248, 30,242, 30,150, 51, 71,254,155,247,225, 96, 13,251, 37,252,252,
+210,209,174, 28, 59,129,224, 61,183, 15, 23, 60,120,199,146, 60,207, 7,120,118,218,210, 39, 5, 34,161,233,184,208,142,231,103,
+208, 42,140,207,119,236,229,154,208,182,144,161, 31, 51,233,246, 9,235,201,163,185,224,227,132, 44, 59,152,199,239,229, 43, 75,
+240, 10,244,227, 72, 22,203, 60,200,121,100,135,114, 58,115,227, 47, 98,101, 85,235,255, 71,213,155,244, 90,146,101, 87,122,223,
+233,204,236,222,251, 90,111,194, 61, 60,186,108,152, 73, 38,123, 17, 44, 21, 33, 86, 73, 66, 17,172, 65,141, 36, 64, 3, 13, 4,
+ 1,250, 5,130,254,129,126,136, 0, 13, 53,144, 80, 40,112, 34, 65, 20, 68,128,162,216, 21,197,166,178, 97, 50,155,136,140, 8,
+143,240,240,231,175,191,141,153,157,102,111, 13,182, 61, 79,210,103,142,231,254,224,254,238,189,118,206, 94,123,173,111,113,178,
+100,228, 38,133,235, 81, 25, 54,142,149,249,218,216,205,202, 42,194,208, 25, 62,118, 47,112,228,221,219, 61,251,208,195,119,157,
+227,238,234, 64,170,133,226, 60,154, 64, 71, 27,180,234, 42, 80,196,170,121,179,218, 96,218, 90, 70, 36, 89,245,106,153,169,110,
+137, 52,143,119, 86, 48,148, 60, 46, 27,133, 53,151,134,103,199, 76,195,139, 82, 17, 59, 43, 31, 60, 8,210,240,157,167, 49,225,
+125, 36,197, 64,139, 80,179,153, 50, 43, 43,246, 99, 69,198, 61, 81, 15,212, 10,173,138, 93, 96,189,154, 33, 67,151,219,127, 21,
+ 49,132,101, 48,166,183, 91,246, 82,170, 15,183, 98, 3,216,187,197, 32,167,206, 45,211, 46,180, 32,230,208,109, 75,130,205,219,
+196, 44, 14, 35,251, 16, 44, 87, 24,172, 1,238, 65, 26, 43,181,226,147,167, 75,145, 86,204,244,214, 57,135,139,158, 82,108, 29,
+128,179,138, 83,117,230,128,181, 12,181, 77, 28, 86,237,103,153,251, 34,133,232,130, 69,220, 22,255,121, 19, 79,114,145,185, 25,
+222,180,143,246,131,149, 38, 72,224,237,116,238,154,153, 69, 52, 26,104, 95, 69,209, 16, 9, 33, 90, 76, 69, 21,231,132, 60, 29,
+172, 28, 4,243, 18,200, 82,145,169, 77,168, 45, 35,222,209,169,195,137,153,203, 4,107,120, 27,134,206,138,102, 4,130,119,108,
+ 78, 62,224,195,247,222,225, 47,254,223, 63,224,205,197, 43,226, 58, 81,114,161,214,204, 56, 77,200,178,246,240, 78,241, 49, 49,
+ 12, 29,221, 16, 25,139,165, 9,124,114,102,244,202, 66, 45, 19,206, 37,195, 0,133,133,103,143, 93,174,188, 70, 82,124, 40, 46,
+ 80, 2,141,208, 91,107, 94,109,213, 46, 51,205,227,172, 13,131, 24,236,147, 84,107,165,104, 69,170, 41, 32,210,154, 33, 63,189,
+167,235,142,112, 41, 81,231,217,160, 55, 34,116, 62,130, 58,166,170,144, 60,174, 52,170, 54,242, 10,230,187, 27, 20, 56, 89, 31,
+211,187,158,189, 76,148, 42,236,199,131,237, 66,241, 12,177,167,182,153,251,155, 59,182,247,183,108,119,247,120, 41,116,125,111,
+106,141, 83,186,222,243, 95,252,243,223,225, 7, 63,120, 69, 81,165, 4,107, 20,156,165,226,131, 80,130,160,108,169,186,161,118,
+ 17,234, 76,150,201,120, 12,205,192, 70,218, 59,220,193, 17,164, 32,195, 98, 84,241,213, 60, 8,165, 18,139, 48,145,217, 77, 19,
+235,245,198,222,175,169,209,228, 64,171,130, 87, 75,133, 52, 10,165, 54,138,203, 84,159,136, 62,240,254, 7, 31,241,242,171,175,
+216,141, 19,210, 50,170, 86,190,128,115, 56,181, 66, 11, 23,149,185, 53,190,250,242,138,247, 62,120,223,228,244,217,140,152,104,
+225,230,238,150,139,215, 23,188,252,244, 13,171,254,148,155,219, 43,238,238,182,248,104, 43, 34,177,155, 47,247,119, 51, 59, 55,
+243,213, 87,175,121,246,244, 93,158, 61,127,135, 82,238,109, 90,124,104, 8,116, 74, 65,105,173, 25,116,195, 59,102,133,163,126,
+197, 62,108,237,243,232, 6, 82,231,112,178,180, 85,169, 88,164,235,176,227,254,230,138,213,201, 49,201, 89,158, 23, 63,176,189,
+188,230, 46,192,243,179,167,104, 19,238,119,183, 92, 92,188, 65,138,178, 90, 69,158,188,251, 62,234,214,252,229,159,254, 9, 47,
+ 30,255, 27, 54, 71, 3,227, 44,140, 99,225,247,126,247,183,249,226,179, 47,248, 63,255,232,207,121,242,104,195, 48,156,113, 91,
+ 94,227,100,196,165,136,199, 62,187, 1, 65,116,230,193,141, 43,120,154, 20,235,151,247,201,198,142, 5, 86,133,179, 67, 58, 46,
+ 23, 55,117,118,184,139, 19, 40,153, 52, 44,207, 29, 91, 96,145,165, 46,101, 32,214, 29, 97, 6, 93, 71,149,204,201,201, 35,118,
+183, 55,140,234,185,185,190,225,241,201, 99,162,218,224,210,130,210,187, 72,105,149,185,143,132,170,196,108, 37, 44,120,144, 44,
+ 28,173,122,112,145,195,178, 74,136,205,180,199, 26, 71,106,141,184,154,241, 33, 17,103,161, 13,158,144,133, 62, 4, 91,215,100,
+ 3,151,212,185,216,186, 65, 61, 58,218,243, 81,189,173, 95,102, 73,248,166, 28,194,196, 79, 94,189,124,107,232,236,210, 17, 83,
+222,114, 52, 28,177,234,182,252,237,247, 62,229,172, 95, 49, 83,153,226,204,170,115, 4,231,233,226, 64,127,186,230,101,121,194,
+112,222,115,121,177,101,110, 19, 41,120,158, 36,199,102,243,115,124,220,174, 45, 54,154, 27, 8, 27,115,143,135,188, 24,207,156,
+153,195, 66,132, 52,152, 93, 73, 70,216,240,243,164,214, 92, 39,154,102,139, 72,198, 53,191,246,222, 49,195,145,129,103, 62,110,
+ 27,106,173, 72,140,228, 67,163,239,214,156, 62, 25, 80,129,251,157,103,186,205,148, 38,172,135,129,210,132, 58, 54,198,231, 61,
+ 93, 15,211, 4,219,171, 29, 99, 22,102, 2,125, 84,200, 5,175,182,171,191,154,234, 98,109,183, 67,253, 78, 96,159,133,233, 40,
+176, 90,246,253,219,172,140,209, 14,241, 14,152,170, 25,182,255, 49, 93,110, 55,102,170, 28,104,249, 30,137, 21,223, 2, 82, 60,
+234, 34, 77, 51, 53,239,237, 98,169, 75, 33,129,243,198,209,243,214,195, 33,243,206, 64, 70,125,131, 18,112,213, 67,115, 84,215,
+240,209,129, 68, 35,148,138, 53,181,165, 37,230,157,165,226,189,189, 39,231, 90,105,197,250, 87,156, 42,190, 57,171, 11, 22,161,
+220,191,166,228,107,130,243,184, 99,101,158, 51, 49, 46,220,114, 31, 28, 30,121,219, 46,165,250,208, 16,111,153, 79, 17, 12,110,
+162,214,134, 67, 52,131,153,119, 15,252,117, 53,233,252,161,103, 55, 6,147,187, 16, 44,138,106, 7, 53,242,208,209,103, 15, 16,
+145,182, 96, 74, 61,218, 44, 1,170, 75,102,217, 34, 22, 98, 56, 87,111,230, 23,105,182,103, 15,186,248,188,117,201, 0, 59,219,
+157,136, 46,123,153,230, 23, 40,142,117,166,107,131, 66, 37, 44,140,233,210,108,119,172,222, 19, 48,222,188,226,241,157,117,227,
+206,181, 17,163,153,244,188, 43,132,152,136,222,227,170,163,136, 26,251,222, 47, 4, 60,175,182, 83,137,138,111,205,218,124, 8,
+140, 37,211, 13, 61,130, 16, 92,162, 11,150, 51,183,142, 92,143, 36,193,197,192, 87,175, 62,225,243,175,126,134, 6,123,193,189,
+ 86,188, 58,236, 17, 4, 69, 43,181, 54, 92,173,204,211,104,198, 68,103, 43,141,182,180,188,185, 16,233,215,107,144,182, 0,112,
+172,181, 14,241,111, 9,106, 34, 74, 45, 19,190,235,241,209, 86, 15,211,158, 41,176, 97, 0, 0, 32, 0, 73, 68, 65, 84,156,173,
+113,110,233,255, 54,208, 76,192,133,184, 60, 48, 45,165,192,146,249,150, 38, 84, 81, 86,209,122,184,107, 41, 22, 45,108,213,252,
+ 19,181, 80, 90, 52, 66,112,104,116, 46,209,212,209,122,187,161, 90, 15,179, 48,244,137,118,173, 28,246, 19,151,247,123,114,201,
+160,142,216, 65,157, 38,166, 60, 47, 17, 59,123, 13,134,110, 0,175,244, 67, 32,143,153, 79, 62,189,230,205,205, 53,231, 47,190,
+129,215,136,186,209, 98, 99,234,209, 41, 34,189, 57,202,141,159, 29,152, 0,231,146,213,243, 78, 5, 41,222,114,157,206, 35,213,
+ 96, 70, 46,130,100, 15,117,102,114,129,226, 10,131, 11, 8, 5,239, 3,117, 55,211, 90, 69, 82, 68,165,210,147,168, 99,197, 31,
+ 41,238,222,145,186,136, 43,158, 46, 6, 30,157, 61,230,238,238, 83, 75, 18,184, 72,197, 89, 76,239,161, 96, 68, 5,209,192,155,
+235, 91,238,111, 15,116,157,242,249,167, 95,240,234,242,150,105,222,145,107, 35, 52,168, 85,185,111, 91,174, 63,190,163,239, 61,
+ 67,244,204,139,132,142,194,235,139, 59,130,119,156, 29,159,242,157, 95,249,117,162,141,117,168,243, 12,195,176, 64, 92,170,125,
+ 46,213,222, 11,173, 52,238,239,175,240, 49,210, 13, 61,135,195, 30,197, 82, 13,157, 55,249,144, 24, 89,187, 30,183, 89,115,125,
+119, 77,119,179, 66,187,129,118,152,216,239,111, 56,108, 95,241,248,201,123,172,143, 79,144,160,156,236,223,240,179,207, 43, 55,
+ 87,151,188,251,236, 29, 78,143,206,233, 54, 43,158, 61, 62,102,142,137,218,224, 48, 22,246,221,129, 15,222, 59,103, 56,219, 48,
+229, 61, 69, 38,214,235,142,253,220, 25,152,196, 27,203,193,208,222,246,217,148, 7,133, 67,100,185, 88,186, 37, 78, 96,209, 82,
+176, 94,117,145, 70, 85, 71, 23, 4,213, 96,208, 42,167,164,206, 47,101, 38,193,214, 85, 14, 58,103,132,201,138,163,180, 76,167,
+ 9, 23, 28,211, 97,207,187, 79,158, 83, 30,239,184,217,221,178,219,221,113,117,245,134,199,207,158,113,152, 71, 99, 90, 36, 8,
+126, 96,190,207,132,206,225, 98,161,149,138,224,217,196, 21,227,161,160,110, 34,208, 83,240,116,169,210,212,147,115,160, 39,211,
+130,213, 82,235, 88,112,157,145,246,154, 30,160, 57, 10, 13,169,118,121, 17, 2, 41,118,212, 82, 89,247, 43, 38, 23,168, 89,233,
+ 84,113, 73, 9, 27, 40,219,134,151, 74,212, 21,180, 61,206, 21,164, 20,238,101,207,253,148,184, 57, 28, 83,211,140,214, 76, 29,
+ 23,213, 18,199,143,227, 21,169,115,120, 34,181,131,195,152, 89, 19,152, 82,227, 71,159,127,193,217,191, 63,102,117,182,230,254,
+ 46,211,197,194, 81,119,142,108, 61,227,182,210,142,173, 7, 45, 8,172,131, 69, 31,227, 26,246,163, 29,168,110,209,183,183, 91,
+200,247, 59, 43,177,137,194,209, 38,114,154,126,206, 88,247, 78, 57, 62, 90,211, 13, 43,198,144,121,228, 61, 31, 30,219,215,111,
+142,224, 71,237,132,221, 9,108, 59,112,119,142, 71, 39,129,176,178,153,113, 31,172,210,117, 95,171,109,104,117,197,203,109,162,
+253,180,112, 20, 29,251,219, 59, 78,134,137,246,248,156, 16, 61,119, 83,129,125, 65,211, 99,198, 30, 14, 2,117, 55,114, 52,244,
+156, 46, 46,175, 88,117, 25,146, 22,121, 63, 47, 9,143, 86,168, 78,233, 18,212,221, 68,149, 25,213, 70, 55, 58, 6, 15,217, 59,
+186,185,216, 96,151,108,133, 57, 75,179, 84,213, 92,105,109, 36, 14, 71,184,162,180, 58, 33, 56, 82, 48, 82,105,149,108,175,165,
+122, 90,115, 20,138, 89,164,116,233, 42,105, 66, 71,160,213,106,190, 54, 60,234, 3,163, 10,159,222,122,194,103, 47,217, 93,220,
+216,133,117, 25,160,162,177,150, 23, 89,245,161, 88, 94,151, 6,179, 69, 38,119,218, 12, 67,250, 64, 89,115,186, 72,216, 22,161,
+114, 56,163,192, 45,210,172, 54, 59,217, 91,112, 11, 49,138, 37, 39,109, 6, 21,215, 89,105,137,229,107, 45, 3,158, 22,183,118,
+ 91, 14,102,175,214,111,238, 29, 54,117, 99,217,247, 66,123,203,145,215,133,247, 30, 31,148,118, 53,167,186, 41, 4,134,212, 12,
+222,131,216,119, 54, 70,183, 51,160,195, 98, 68,112,222,178,201,193, 47,166,176,166, 84,105, 68,122,188, 66,244, 29,173, 41,196,
+138,136, 21, 80, 24, 47,220, 50,244,210,132,184,180, 73,228,170, 11,154,214, 89, 68, 48,152,121, 48,161, 84,169,144,173,238,181,
+239,143,204, 88, 19, 7,130, 42, 63,249,193,127, 96,206, 51,189,235,233, 26, 22,115, 74, 9, 41, 25, 23, 28,195,176,225,168, 31,
+216,237,183,228, 82,105,109,166, 74, 38,122,111,209, 51,231, 44,182,181,178,106,220, 86,218,226,174, 52, 83,187, 46, 60,237,218,
+172, 21,203,164,122, 97,222,239, 56,236, 71,251,217, 46,209,194,232, 19,222, 57,234, 92, 44, 26,228,140,254, 39, 11, 26, 88,150,
+178,154, 71, 79,223, 97,232,123,110, 14, 35, 42, 98, 56, 97, 49, 92,112, 21, 37, 20, 65, 70,101, 28, 26,209, 39,250,104,170,137,
+180, 30, 52,211, 13,131, 77, 36,181,178,223,239,201,243, 68, 63,116,100, 17, 90,243, 68, 9,212, 90,173, 25,207, 59,166, 90, 9,
+222,177,146, 14,169,141,159,124,114,193,249,233, 19,158, 31, 63,165,239,132,169, 56,202, 44,214,126,164, 29,174,117,228,186,131,
+108,241,196,161,247,100,233, 57,104,198, 57,139,103,105, 16,196,247,182, 22,105, 25,105, 3,149,201,204, 85,170,196,165,120,161,
+228,106, 0,165,102,176, 23,230,138,122, 79,115, 66, 74,142,105,223,232,135,132,155, 70, 66, 72,164,216,243,181,231, 79,121,253,
+250, 75,230,186, 76,189,206, 76,148,242, 16, 25, 21,131,255, 84, 7,243, 60,241,201, 79, 63,231, 39,159,125, 69, 41,178,224,135,
+141, 54,214,245,198,229,238,187, 72,240,129, 67,153,144, 90,237,226,189, 8,145,255,242,183,191,205,217,217, 41,179, 79, 84,129,
+166,129,170,137,251,237, 21, 74,163, 17, 44, 50, 38,205, 90,209,130,163,214,194, 97,127,203, 48,172,129,100,187,104, 53, 53,236,
+176,219, 19,156,176, 62,234,113,226, 25, 15, 7,174,222,124, 69,215,159, 81, 68, 56,236,239, 73,210,248,232,253,196,201,163,158,
+221,221, 72, 31, 87, 60,126,242,152,155,171, 75, 78,143,143,121,255,197, 47,178,122,124,198,127,246,235,207,249,252, 18, 46,111,
+ 50, 65,225, 54, 42, 47, 47, 50,241,248, 28,137,129,221,118,203,209,163,199, 28,175, 79,185,219, 95, 35,186, 48,160,213,246,156,
+165, 64, 92,224, 87,110,169, 67,118,203, 20,110,198, 83,187,128, 42,134,135, 86,111,131, 71,195,226,173, 94, 44, 97, 35,210, 32,
+ 88,170, 67, 84,169, 44, 81, 80,181, 74, 82,113,137, 76, 33,226, 73,189,231,233,179,119,153,234,129,233,110,100,232, 10,223,254,
+246, 9,223,253,193, 1, 45,130,182,192, 52,142,139,161,184,103, 87,102, 18, 74, 33, 82,139, 91,214, 35,158,135,108,216,202, 15,
+168,116, 52, 49,205, 91,103,104,209, 67,114,212,241, 30,159, 86,184,100, 73,149, 42,129, 86, 21,223, 67,107,158, 12,134,136, 46,
+ 13,183,105,196,108, 23, 87,153,109,240,240,222, 83,155, 71,216,177,138,145,232,132,210,238,112, 18,208, 16,153,195,129,208, 60,
+161, 54, 14,140,104,174,120, 13,204, 76,212,173,129,123,194, 96,133, 35, 45, 29, 83,139,242,253,221,103,188,252,242,154,156, 3,
+ 18,149,225, 88, 25,220,128,243,142, 97, 72,188,186,248,144,244,253, 99, 52, 42,249,176,229,197,211, 19,220,166, 35,103, 37, 28,
+ 31,129,246,111, 91, 4,157, 22,142,142, 35, 49, 58, 78,214,171,133,130, 99, 47,113,112,224,187, 72, 91,106,175,211,240,115,133,
+ 96,202, 16, 85, 56,238, 60,253, 26,246,197,241,110,132,163,229,143,116, 43,248,204,121,116,231, 8,181,241,209,243,115,126,237,
+ 23, 31,115,171,144, 5,102,247,136,204,158,151, 46,208,178, 82,238, 51,208,179, 59, 64,221, 89, 68,174, 93,101,227, 93,108, 22,
+ 37,229,106,199,241,243, 99,226, 58,208,121,184,189, 17,246,183, 55,132,214,131,115,228,125,161,150, 3, 49, 40, 78,109,216,168,
+ 4, 36,139,197, 93, 93,165,140,138,214, 70,140,157,149,135, 73, 35, 52,161,230, 25, 41,131, 49, 13,136, 20, 17,212,205, 4,141,
+104,118, 72,155,223,182,146, 58,231, 33, 88,173,171,170,163,204,214, 65, 18, 30,162,231, 14,206,142, 34,167, 31,125,147,250,244,
+ 63, 38,125,250, 71,212,241, 43,180, 57,180,118,196,182,180, 20,171, 10, 20, 3, 45,184,133,118,246, 48,241,217,108,101,212,183,
+228,157,177,104,173, 6, 9,109, 98,134,185,106, 55, 97, 23,197,118,243,152,212,137,179,239,221,150, 7, 37,222,211, 17,169,174,
+ 48,182, 70, 88, 56,237,226,108, 2, 87,113, 11,113,201, 38,249,234, 45,183,170,106, 17, 42,143,194,130,157, 93,144,221, 40,182,
+251,110,213, 38,250,232,162, 69,197,156, 46, 15,212,102, 53,177, 49,216,102, 64, 11,170,113,145, 40,205,244, 21,156,167, 34,136,
+122,164,121, 98, 90,214, 2,202, 2, 51, 49,156,163,171,101, 81, 86,132,114,176, 78, 31,245, 14,151, 28, 46, 45,146,254,188, 24,
+123,106, 69,124,198, 71,219,255, 87,108,175, 45, 98,230,150,150, 35, 55,229, 13, 35,202,239,254,171,255, 18,157,110,184,120,249,
+ 41, 23,187,107,218, 62,147,156, 99,202, 51, 93, 90,243,238,139,175, 81,230, 74,113,194,122,213, 81, 14,247,236, 70,219, 31,111,
+111,111,201,101,102,222,239, 9, 41, 17,213,218,117, 92,236, 24,146, 35, 14,145,104, 68, 13, 90,131, 16, 35,135,237,204,171,235,
+175, 56,140,243, 82,155,106, 44,252,182, 24,228,250, 85, 71,157, 10,201, 5,178,155,200, 98, 81, 70, 71,225,252,236,148, 15, 63,
+248,128,253,110,199,245,229, 27, 84,237,242, 52,137,225,108,115,206, 16,237, 66, 34,181,161, 49,224,170,224,179,210,188, 16, 82,
+207,241,209, 10,180, 33, 90,185,190,186, 68,213,179, 94,173,108,111, 36,176, 58,222,224, 22,122, 88, 80, 37, 58,115,157,167,216,
+ 49,183,198,120,125,197,211,211, 99, 82,106,196, 38, 80,204,165, 31,130, 85,232,162,153,228, 18,210, 57,202,220,104, 35,168,223,
+226,219, 66,201,243, 30,239, 19,181, 22, 52,131, 11, 74,174,153,216, 9,213, 43,177, 0, 93,135,115, 61,170,153,185, 20, 36, 91,
+109,102,223, 41,174,154,122,225, 17,164,130,180, 10, 46, 16, 18,132, 42,156, 61, 62,225,228,236,152,139,139, 27,130,139,104, 51,
+ 63,132,247, 97, 49,165,217,202,232,116,213, 81,100,207,237,126, 71,109,249,109,124, 16,245,184, 10,197, 21,212, 65, 46, 6,218,
+ 96, 89,145,229,170,203, 26,197,243,197, 23,151,108,243,196,253,120,193,106,125,202, 59,239,189,195,246,171, 55,252,195,143,127,
+200, 16, 18, 33, 26,224, 41,134,136,212, 6,209,227,171,167,204,149,174,131,110,112,236,239, 38,220, 16,217,237,183,104,171,244,
+103,199, 86,138, 18,236,130,252,234,213,151, 28, 31,143,172,134,196, 56,205, 12,125,199,212,132,251,221, 87,228, 81,184,122,115,
+ 73, 27, 11, 41,245,164,213, 25,117,158,217,143,153,139, 85,199, 92, 42, 83,201,132,213, 0,179, 99,187,207,248,116,204,147,179,
+ 39,220,222, 94,115, 38, 14, 93, 15,176, 15, 72,153,205, 72,216, 44,146,134, 83,131, 57,105, 88,218, 32,237,240, 83, 21, 66,234,
+108, 21,164, 51, 8,116,157,169,115,181, 69, 28, 13,159, 30, 12,133,134,167,110, 75,110,220, 59,208, 98,153,117,113,150,140, 8,
+165, 48,105,230,205,254, 13, 77, 10,239, 60,127,198,163, 39,239,242,249,205,207,184,191,203, 28,135,200, 59,231,145, 47, 94,103,
+200, 70, 64,212, 37, 6, 40,116,224, 29, 82, 51,208,112, 30,114,173, 22,177,213, 70, 11, 61,115,155, 80, 25, 41, 17,154, 4,162,
+ 76,180,220, 25,239,162,205,108,247,138, 46, 53,104,177, 10,178,244,110,135,169,210,134,138, 52,135,219,139, 65,182,164,167,235,
+ 19,161,102, 36,195,224, 6, 14,109,100,231,215,120, 18,154, 71, 58,223,161, 76, 22, 11,214,181,145, 27, 1, 41,133, 89,151,215,
+ 85, 29, 67, 31, 24,243,196, 84, 70, 54,125,133,245,128,204,133,157, 87, 90,139,180,172,236,199, 76,159,122,171,204, 13,158, 79,
+190,184, 36,181,142,156, 34,110,206,156,157, 38,178,139,184, 80,120,167, 59, 99,245,151, 39,172, 87,137,203,121,228,254,122, 15,
+100,116,240,124,121,113,205, 7,111,222,103,117, 28,185, 60, 64,189,191,167,239, 3, 49, 58, 60,149,245,170,255,185,244, 93, 45,
+ 20, 16, 23,146,169,102,204,108,250, 0,146, 25, 33,207, 35, 99, 30,153,238, 42,143,191,179,226, 60,194,249, 3,227,100,227,121,
+114,116, 76, 26, 76, 70,255, 34,246,188,136,142,167,167,134,208,125, 57,195,237,250,156,211,115, 88, 43, 76,162,220,202, 49,183,
+ 41,216,129,175,240,229,181,112,127, 83,168,243,132,228,108, 43, 70, 13,196,180,240, 81, 90, 69, 74,179, 51,200, 53,106,109,230,
+ 55,138,142,181,171, 20, 21,178, 42,104,196, 77,107,202,116, 32, 56, 37, 57, 97,148,106, 7,127, 80, 92, 49, 26,168, 11, 44,207,
+ 39,131, 77,121,237, 45,230, 24, 65,169,104, 85,124, 23,160, 40,143,186,192,139,103, 79,216,118, 29, 63,165, 49,107,135, 59, 52,
+180,108,137, 34,134,166,244,193, 52, 19,239, 77, 63,113,139,179,188, 25,189,218, 14,115, 75,155,225, 22,200,137, 96,123, 97, 34,
+212, 98,147, 97,203, 14,162,129,102,104,198, 88, 55, 33, 77,233,146,183,134,180, 86,241,170, 4,177,184,155, 15,201, 48,128,205,
+ 14,108,231,171,113,191,197,147,107, 70,194, 18,167, 91, 58,241,122,239,200,205,163, 81, 9,106, 89, 63,197, 24,210,120, 43,239,
+112,132,183,107,132,130, 46,135,133, 46, 57,109,171, 23, 85,117, 6,177, 1,198, 34,164,224, 73,189, 69, 92,194,162, 70, 20, 45,
+ 20, 13, 48, 54,162, 83,219, 41,170, 25,247,162,235,240,209, 28,183,125, 52, 18, 94,206,141,206,121,138,204,118,201,113,134, 13,
+ 84, 81,232, 34,174,122,166,150,233,221,154,169, 8,251,253, 27,158,188,255, 29,190,241,226, 59,188,190,252,156,240,225, 83, 30,
+205,119,236, 14, 59,198,155, 47,217,237,239,216,110,239,249,225, 15,254, 18, 66, 79, 63, 12,188,251,206,135,116,105,224,163,143,
+ 62,226,228,241, 11,180,121,238,175, 94,115, 56,188,228,229,203,159,114,183,207,198,211, 70,233,194,128,142,158,236, 11, 81, 29,
+199,167,231, 60,127,239,107, 92, 95,189,230,245,197,119,105,173,129,143,166,142, 96,236,113,154, 80, 75,161, 73, 49, 20,111,215,
+179, 9, 61,130,181, 61,157,159, 63,198, 1,119,119,215,228, 86, 81,167, 28,173, 6,230, 92,120,232,102, 77,206,147,196,147,186,
+ 8, 94,169,251, 74,236, 55,168, 78,204,101, 98,125,188, 90,170, 20, 43, 87,151,183,244,113, 81,107, 98,164,202, 76, 74,157, 21,
+ 34, 52,168, 82,136, 49, 89,126, 25,248,218, 7, 31,113,180,129, 87, 23,215,116,111,222,176,121,244,132,232, 29, 29,142,169,205,
+196,254,200,214, 44,147,162, 67,135,247,129,185, 30,240,173,225, 90,160,174,122, 8,130,211,158,164,149,169, 89, 53,106,244,144,
+178, 73,159, 26, 28, 37,103, 67,229, 54,136, 49, 82,162, 67,154,205,115, 41, 98,105, 0,167,164,100, 81,169, 32,208,166, 66,115,
+129,161, 63,226,189,231, 31,112,115,121,135,122, 83,145, 2,206, 58,222,245, 1,109,220,216,231, 3,251,233,142,103,239,157,176,
+223, 29,184,223,141,111,125, 42,115,110,180, 57, 47, 13,138,102,202, 67,252,146,114,104,139,129, 85,249,238, 39,175,249, 96, 63,
+209,173, 60, 95, 93, 92, 50, 28, 29,243,241, 79,127,204,110,183, 35, 28,157,208, 71,219, 63,139,143,150,227,175,213, 14,250, 6,
+ 49, 6, 54,233,152,156, 51,251,195,129, 60, 78,108,134,193, 98,155,234,144, 46,210,175, 55,200,197, 5,215, 87, 95,114,124,124,
+134,247, 3,185, 86, 62,249,241,223,115,124,218,241,222,243,111, 50,214,239,243,249,151,159,162, 8,199,143, 79, 24,245,192, 7,
+231, 79,185,222, 86,123,248, 23, 97,200,149,131, 58,182, 1,230, 61,124,240,225,135,220,222,188, 97, 46,123, 86,199,143,233,135,
+ 13,247,119, 35,218,132, 24,226, 66, 2, 52,122,151, 58,195,246,166, 24, 45,107,174,130,171, 70,132, 20,105,120, 31,192, 5,124,
+180,173,121, 67, 44,105,224, 12, 41,236, 66,248,121, 12, 55,152, 31,200, 46, 79, 38,239,231, 37,221,160, 34, 92,223, 92, 65, 83,
+198, 60,227,125,229,250,250,154, 39,155, 39,252,254,127,247, 47,248,163, 63,254, 49,127,252, 39,127, 69,174, 6,137, 74,235,206,
+106,146, 43,164, 96,181, 86, 50, 11, 62,205,120,223, 81,106, 96,156,182, 52, 7, 74, 71,215,172,174,186,230, 29, 42, 7,179,255,
+198, 13, 72,161, 28, 38,186,213,154, 26, 20, 87, 27,222,245, 84,159,209,226,136, 33,209,198, 74,117,158, 20,205,192, 92,197, 90,
+ 38,231, 84,169,179,224,100,194, 5, 51,155,214,176,181,232,218, 44,148,148, 9, 58, 16,171,145,243, 93,231,144,168,164, 82, 41,
+ 37, 82,107,181, 65,168,120,220, 88, 16, 28,101,156, 0,165,136, 18,130,210,176, 11,191, 31,123,154,236,233, 86, 3,125,115,212,
+216, 56,236, 61, 89, 7, 36, 23,238,227, 30,247,250, 53,174, 21, 98, 50,118, 71,243,208,167,129,191,126,243, 19,126,248,241, 27,
+ 54,195, 9, 57, 10,174,220,115,114, 22,232,143, 86,180, 41,177,127,255,107,188,247,193, 57, 93,244, 92, 92, 23,154,142,132,251,
+ 19,210, 28,136,147,210,157,252, 28, 21, 51,102,200,101,180,116, 85,239, 57, 57, 30,254, 9, 84, 70,196, 86,138,109, 41, 26, 27,
+ 68, 89, 39,255,182, 71,125,173,112,186,129, 71,203, 69, 97,194,241,228, 60,112,244,243,123, 5,211, 20, 9,146,104,135,157, 41,
+ 63,169, 50,141, 86,214, 20,235,100,134, 78,159, 72,201, 46,142, 50, 46,109,144,210, 44,179, 31,109, 40, 81, 39,132, 96,173,157,
+118, 69,169, 56, 49, 12,123, 93,160,232,193,123, 74, 81,164, 86, 82,112,120,183,178,179,214, 7, 91,245,202,178,214,104, 1,135,
+176, 58, 77,248,254,148,171, 29,204, 45,147, 58,193,233, 49,174,215,135, 29,191,190,157,122,237, 96,183,195, 79, 84,151,155,231,
+ 3, 13,110,129,187, 60, 20,127, 44,109,170, 97,249,128,212,182,116,219, 57,103, 21,144,178,236,116, 19,111,177,143,210, 22,203,
+106,176,250, 86,156,185,207,195, 98,138,107,139,228,217,212, 66,252, 49,218,206, 88,150,210, 2, 36, 82,171, 55,170,157,218, 30,
+191,106,193,171,201,238,178,244, 47,123, 7,218,138, 85,138, 46, 50,123,240, 86, 51,235,196, 17,196, 62,208,213, 57, 98,122,168,
+136, 16,106, 14, 6,179,240, 13,173,206, 88,234,209,106, 8, 15, 40,125,151,104,179,185,161, 9,208,185,165,219, 87,156,253,220,
+ 48,213, 1, 9, 72,140, 52,117,196,234,136, 78, 23,120,141,197,111,230,121, 66, 90, 34,172, 54,124,235, 59,191, 68,201, 91, 14,
+119, 35,243,172, 48, 43, 46, 11, 45,121,186,147,133,250,164, 74,203, 35, 57, 31,216,239,110,240, 4,134,190,167,169,231,232,248,
+148,190, 31, 8, 33, 50, 87,143, 91, 64, 30, 34, 54,233, 5, 5, 87, 97,162,146,111, 47, 56,121,250, 46, 71, 71, 3,211, 56,129,
+ 11,246,138,170,162,206, 50,248,121,158,241,213,189, 85,104,188,143,182,115, 70,137, 49, 48,141, 19,151, 23, 87, 28,246,123,154,
+ 52,134, 85,207,209,209,154,155,235, 91,136,182,139, 15,209,140, 97,213, 23,203, 18, 87, 40,190,224, 18,196, 20,233, 87, 27, 66,
+ 74, 32,158,253,126,162, 63,179, 86, 57,113,134, 3, 61,121,126, 70,252,161,103, 26,243,219,110, 0, 23, 60,215,183,183,188,120,
+113,206,227, 71,199,188,186,218,113,250,232,212,146, 14,189, 67,102,150, 85,210, 68,201,201,144,160,187, 61,190,245, 16, 34, 85,
+ 22, 14, 65,181,203, 73,244, 70,113,115,189,229,211, 93,238, 56,180, 70, 11, 51,155,152, 40, 89,104, 73,136, 2,157,128, 70, 3,
+ 49,245,179,167,174, 18,206, 67, 96,166, 91, 37,202, 78,144, 54,226,162, 39, 55,161,185,200,147,231,143,121,252,213, 35,222, 92,
+223,144, 98,180,215, 31,195,148,186,102, 74,193, 56, 86,174, 94,237,120,255,131, 71,188,255,252,140,191,255,233, 68,109,205,234,
+140,253,210, 81, 32, 15, 29,225, 15,134,177, 98,223,107,121,207, 5, 60,219,253,200,179,179, 83, 82,171,124,246,217, 79,184,186,
+190, 53, 78, 2,149,208, 29,211,164,145,130,103,136,199, 72,206,140, 58,146,231, 66,158,103,208, 13,222, 39,164,237,105,205, 92,
+219,126, 22,106, 11, 68,151, 88,167, 53,235,245, 17,151,215,215,140,211, 27, 86,235,213, 98, 82, 85,198,237, 1, 61, 19, 3, 72,
+181, 70,215, 13, 60, 59,125,143,163,147, 19, 83,229,122, 40,247, 14,124,199,172,133, 54, 55, 62,121, 61,113,183,207,172, 78, 31,
+179, 57, 59,227,254,238,150,163,225, 49,155,213,154,221, 46, 44, 21,199,126,233, 30,176,216,166,168, 97,169,173,165,206, 76,149,
+ 66, 35, 69,165, 76, 6,164, 42,190,226,232, 77,213,195,224, 85, 94,163, 65,109,212, 88, 12, 86,169,236, 9, 88, 76, 83,229,161,
+157, 80,145, 96,207, 2,135,227,118,119, 99,178,170,119,236,101,226,242,238, 13,143,223,255, 55,252,230,119,246,252,251,191,138,
+ 80, 61,131, 27, 24,235,150,210,130, 85, 38,171, 91, 36,101, 33,165, 21,173,121, 66,106,204,181,129,135,212, 85,242,210, 51, 17,
+ 21,232,140, 83, 97,240, 41,187,240,145, 50,243,190, 24,232,200, 27,240,167, 57,161,142, 7,162,122, 98,223,227,197, 49,141,149,
+208,153, 34,170, 98, 28,254, 86, 51, 33, 23, 66,108, 32,137,198,204,152,133,164,112,104,247,168, 6,214,199, 3,229,208,136, 68,
+170,120,196,239, 45, 25,161,142, 89, 43, 65, 38,196, 7,107,191, 11,230, 5, 82,215,227,117, 54,186,102, 29, 97, 8,212,170, 84,
+ 49, 19, 92,201, 43,188, 63,216,101,179, 10, 46, 30, 33,174,161, 85,232, 99, 99, 44, 30,225, 64,149,196, 97, 44,220,186, 27, 74,
+ 27,145,228,233, 46, 60,105,117, 76,157, 29, 63,250,248, 75,130,239,136, 36,124, 84, 98, 20,214,125,143,235, 3,157,143,124,249,
+226,125, 78,159,156,178, 94,247,124,250,234,158,203, 47,223,176,241,214, 52,169, 26,255, 9, 19, 94,171, 69, 88,133, 96,205,105,
+ 89,232,207,126,126, 41,168, 2,253, 63, 2,201, 59,177, 60,255, 63,254,117,152,148,253,253,158, 41,239, 17,153,105, 1, 68, 38,
+ 27,150, 22,122, 92, 81, 35, 77,186, 42,168, 86, 74,141, 52, 58,148,140,148,153, 84, 60,174,115,140,171, 23,212,195,151,168,236,
+169, 83, 37,116,142,130, 95, 90, 8,109,109, 27, 68,168, 96,170,138, 47, 84, 45, 68, 99,177, 98, 87,219,104,116, 87,113,156, 4,
+ 71, 23,142,144, 34,244, 2,210, 41,187,237, 37, 43,231, 77,169, 13,139,217,173,169, 29,186,193,189,141,149, 63,112,117,168,106,
+192, 23,151,156,201,235,203,254, 88, 68,209,217,128, 43,205, 41, 49,184,101,234,118,164, 96,125,198, 56,203,111, 59,103,187,121,
+197,150,224,226, 28, 62,218,238,184, 70, 37, 6,147,172, 61, 17,167, 70, 87,162, 45, 44,118, 35,200, 24,223,221, 45,209, 53,177,
+105,218,121,171,141,141,222, 94, 44,239, 44,150,101, 14,216,229,129,160,144,194,207, 27,179,130, 51, 88,189,138, 29,216, 62, 90,
+156,207,163,132, 5, 56, 19,162,163,102, 53,186,216,208, 25, 25,174, 42, 77, 23,153, 63, 6,107,171, 67,145,234,151,222, 92,195,
+185, 58,183, 84, 16, 56, 71,205, 14,159, 34, 82, 77,166, 9, 62, 49,205, 51,251,195, 76,109,247,252,221,159,255, 95,120,127,202,
+227,179, 15,249,230,135,239,211,157,126, 11,230,204, 63,252,236,111,248,226,243,159,218, 5, 37, 24,173, 78,176,250,218,224,148,
+146,149,220, 42,187,221, 13, 78,133, 46, 13, 12,199, 39,196,193, 58,229,131, 58,124, 81, 90,172,196, 96,249, 4, 31, 58, 78,142,
+ 31,115,255,213,143,168,173,225,147,193,104, 84,221,178,159, 15, 20, 45,180,102, 26, 77, 67,241, 45, 25,198, 84, 11, 33, 69,138,
+ 20,242,238,142, 92,205,109,122,178, 94,225,117,233,155,214,229, 77, 25, 28, 49,121,219,105, 70, 15, 41,208,135,142,121, 62, 16,
+ 66,228,244,100,195,106,221,113,127, 51, 18,186,142,205,201,192,106,125,130,106,162, 76,149, 62,246,196,148,104,227,193, 28,192,
+115,229,197,251,207,153, 51,140,219,145,240,232,132, 95,248,250, 55,121,255,197,115, 42,129,150,173,141, 43,132, 21,178,228,212,
+125, 53,153, 90, 66, 49,198, 53,141,190, 79,196,154, 49, 42, 66, 91,222,151,129,105,223, 72,100,170, 52,196, 67, 65,104, 26,240,
+115,165, 14,246, 51,225,144, 45,183,174,214,122,215,173, 19,117, 20,230, 41, 83,114,197, 71, 71,140, 3, 94,246,200,184, 39,132,
+196,175,254,242,175,242,211,143,127,200,151,175, 47,205,108,234, 61,168,221,230,141,188,159,216,141, 7,212, 61,166,219, 12,116,
+125,100,220, 90,150, 85,162,105, 92, 49, 44,229, 37,234, 44, 18,186, 16,201,112,198,115, 32,192,118,170, 76, 63,187, 49, 73,222,
+111,109, 13,161,206, 12, 92,165, 18,131, 65,159, 98, 80,180, 11,116, 50,176, 45, 66,206, 19,210,172, 33, 77,107,163,230,145,146,
+108,114,112, 88,158,221, 71,243,195,168, 40,173,206,236,246,133, 20, 34,155,245,154,146, 65, 98,130,206, 86, 79,143, 78, 79, 89,
+159,111,200, 45,112,249,229, 4, 76,164,238,136,169, 4, 98,177, 34,197,251,253, 72,107,194,166, 31,120,247,233,251,124,255,213,
+ 95,179,219, 94,177, 62,123, 68, 63, 28, 51,239,175, 41, 11,163, 61, 5,255,182, 38,215, 47,228, 69,187, 92,154,163,127,154,171,
+117, 54,121,165, 86,165,204, 35, 93, 26,232,215, 27, 52,207,204,243, 72, 76,105,233, 51,136,132,104, 80, 27,188,173, 7,213, 9,
+177,115,120,215, 64, 13, 20,226,189,209, 47, 93, 12,184, 0,100,229,255,249,211,239,242,141,111,252, 33,223,248,232, 3,126,227,
+215,191,193,231,175,110, 64, 2, 55,123,199,213,253, 22,239, 19,174, 5,130,159,168, 94, 81, 9, 36,223,200,217, 36,115, 92, 66,
+139,165, 76,130, 4,212, 85, 66, 77, 11,145,243,222,156, 73, 30, 92,233,241,174, 81,212,122, 48,172, 3,161,144, 98, 7, 41,146,
+141, 61, 12,222,211,180,218,228,217, 58,154,179,116,131, 56, 7,179,165,108, 96, 68,177, 21, 30,173,208,245,199, 6,202,241,133,
+221,126, 71,148, 8,189, 67,199,138, 58, 71, 93,247,232, 44,148,118, 32, 49, 16, 93, 71,174,138, 31, 42,147,100,214,206, 17, 66,
+199, 30, 97,156,246, 8, 35,177, 83,154,207,248, 18, 33,154, 34,229, 68, 40,226, 16,118,212,220,209,122,161,102,143, 20,207,208,
+ 57,114,236, 13,193,155,119, 20,103,159, 5,241,224,239,154,165,142, 90, 71, 77,208,213,202,205,106, 96,170,149, 21,137,207, 62,
+121, 69,110,158,181,235, 16,221, 51,181,201,152, 36, 67,199, 31,254,201, 95,243,221,159,188,207,240,244,152, 81, 3,135,171, 43,
+158, 61,118, 28,159, 28,155,177,117, 23,120,247,228, 5, 71,105, 73,105, 21, 8,255,168,237, 69,108, 51,252, 79,126,221,238, 51,
+247,187, 59,124, 45,204,211,132,232, 1,241, 51, 77, 60, 99, 50,229, 5, 49, 19,115,240, 17,215, 39, 14,251,137,206,175,240,206,
+145,139, 69,223,158, 61, 61, 34,156,127,157,253,229, 5, 50, 10, 93, 12,180,150,141,159, 17, 61, 84,123,158, 55,247, 64, 66,141,
+111,227,228,213, 59,188,184, 37,154,108,207,184, 92, 10,243, 78,105, 23, 23,108,111, 51,251,121, 71, 24,149, 94,236,182, 18, 81,
+ 79,109,197, 36,170, 5,227,170, 11,140,196,171,237,174, 68, 22,103,131, 3,169,182,215,118,222, 19,156,183, 82,131, 96,127, 55,
+169,145,169, 80,136, 24, 69, 45,250, 98, 84, 58,162, 33, 76,189,229,222,173, 43,221,234, 15,181,139,200,210,122,101,197, 42,246,
+128,116,120, 51,122, 5, 71,109,101,217, 93,216,161,236,124, 64, 60, 36, 13,136,218,215,170, 90,249, 8, 78,150,138, 73, 89, 72,
+107,160, 90, 77,254,240, 17,239,236,239, 58,191, 52,199, 57,107,116, 11, 41,162,190, 82,150, 56, 86, 12,145, 20, 42, 77,236, 80,
+ 14,173, 48,138,218, 5,160,202, 82,133,106, 32, 30,231, 33,183,182, 16,234, 2, 1,235,164, 87, 2, 18,148, 96,153, 65,251,186,
+ 87,238, 47,111,248,248,147, 47, 64, 28, 63,253,201,247, 9, 49,178,234,215,252,229,122, 67,191, 57,229,217,227,247,233,163, 99,
+ 62,220, 27, 34, 50,215,165, 24, 70, 30, 20,110,115, 41,107, 88, 12, 88,142,167,167,199,184, 20,201, 18, 25,210,128,119,142, 70,
+195,135, 53, 82, 71, 90,203, 56,141,244,189,227,243, 87,159,227,151, 53,137, 69,157,150,127,183,131,226, 45,165, 96,210,149,241,
+ 8, 68, 45, 97,112,122,116,134,211,198,118,220, 83, 23,201,242,252,244,140, 60,238,104, 98, 13,114, 78,109,218,113, 93,135,206,
+198,237, 71,149,171,114,203, 48, 56,230,169,177, 89,109,120,124,122,194,213,229, 29,189,172, 24,226,192,250,120,195,201,233, 17,
+ 58, 59,180, 38,214,253,138,157,155, 80,132, 34,133,175,127,244,132,243,205, 17,127,244,103,127,205,227,119,206, 57,123,250,158,
+153,158,202,196,186, 37,180,247,180,216,153,225, 43, 23,156, 84,112, 61, 45, 85,218,164,196, 52, 80,154,229,249,155,247,228,113,
+ 38,249, 72, 72,150,162,104,181,226,131, 73,145,101, 20,124, 20,154,247,150,247,167,209,165, 72,169,224,250, 74, 8,145,150,103,
+186,206,145, 91,160, 56,179,164, 4, 32,197,222, 46,146,115, 68,186,202,147,231,231,220,239, 14,220,221,236, 77, 74,246,142,152,
+ 58, 68,132,185, 21,214,213,113,115,127,199, 87,111,182,124,240,238, 35,222,123, 46,124,246,217,107,198,210, 56, 62, 90,241,222,
+251, 79, 72, 78,249,248,227, 87,108,247,197,248,229, 34,248,206,226, 95, 18,172, 13, 81,100,121,207,247, 70, 73, 84,177,124,252,
+118,183,231,228,228,132,105,202,236,247, 91,214,171, 21,155, 97,195,106,189,226,118,127,224,126,123, 67,203, 51, 57,207,172,214,
+ 71, 12, 67, 79, 85,152,166,130,248,204,118,159, 9,195, 96, 40,232,250,128, 49, 21,124,240,212, 92, 80, 85,162,139,132, 46,176,
+ 90,119,228,195,204,237,224,248,193,255,247,191,115,118,124,204,119,126,227,247,168,177,153,211,252,160,220,220,237,136,109, 75,
+ 47,149,231,207,158,243,233,201, 49,119,219,107,134,205, 49,155,126, 69, 25,205,225, 27, 30,184, 19,174, 45, 41,155,133,143,190,
+ 20, 54,181, 34,246,236,146, 96, 49,183, 24, 81,109,156,158,157,243,225, 47,254, 2,173, 84,238, 46, 46,120,245,250, 75,187,228,
+ 47, 41,141,232, 2, 56,107,138, 12,178, 36,104,130,135,154,145,197,236, 41,197,208,216,113, 25, 10,126,242,242, 75,254,221, 31,
+252, 33,255,195,127,255,223,240,175,127,239,183,248,223,254,224,143,249,233, 39, 95,176,234,123,126,247, 55,126,145,191,255,228,
+ 75,238,118,123,212, 69,124, 54,169,181,116,205,202, 96,212, 17, 58,104, 69,240,213,227,123, 91,143,145, 13, 33, 42, 2,212,134,
+174, 3, 97, 50,222, 66,138, 54,245, 6,215,152,179, 48,197, 76,202, 16,162,152, 9, 14,200,135,204,106,216,160, 28,144,108,241,
+204,234,173,207,162, 77,158,160, 13, 92,134, 85, 71, 44, 3,165, 56,202, 52,226,186,137, 46, 37,100,154,201,147, 95,148,198, 74,
+167, 30,241, 11,135, 1, 67,145,102,157, 88,183, 30, 25, 51,163, 43,196,184, 54,111, 81,174, 40,246,222, 71, 51, 49, 28,145, 73,
+168,220,195,242,204,100,104,228,124,143, 76, 64, 58,193,215, 61,186,180,252, 57,146, 93,198,194, 72,110, 19, 82,123, 86,238,148,
+ 42,247,212,114, 64,231,200,236, 34,174,238,113,140, 52,183, 98, 47,141,224, 26,247,218,177,238, 11,226, 61,109, 82,122,223,248,
+209, 87, 35,255,240,197,231, 68, 25, 40,209,227,147,208, 77, 21,215, 25, 83, 36,196,192,159,255,237, 51, 78, 54,103,244,113, 67,
+158, 43,239, 60,143, 60,127,126,202,217,201,138,235, 61,156,169,231,131,143, 78, 89,175,108, 15,127,119, 53,242,248, 28, 86,238,
+ 93,182,183, 29,165,238, 80, 55, 81, 14,102,152,172, 65, 17,103,171,151, 67, 45,184,193, 19, 82,143,182, 9,231, 76,237,142, 73,
+ 57, 62,234, 24,125,135,140, 7,186,216,168,206, 8,161,170, 86,166, 86, 90,229, 80, 76,249,114,222,210,104, 97,233,215,200, 40,
+205, 89,218,203, 98,209, 1,239, 61,183,110,195, 15,238,143,185,184, 58,144,184,183,245, 33,137,156,242,178, 83,199,204,106, 14,
+ 43, 61,104,117, 65,169, 58,193, 58, 81,252,226,124, 23, 51,130,121,139, 90,225, 13,103,106,249,117,143,249, 60,244,173,123,221,
+187,182,160, 75,141,176, 70,176,195,214, 97,123, 74,231,148, 20,149,169,153,124,150,188,160,205,242,166, 42,129,232, 42, 4,147,
+216,189, 26,247, 90, 84,169, 77,232,240, 84, 10,179, 40,209, 57,130,179,189,112, 85,197,249,246,143, 84, 6,115,203,187,176, 92,
+131,154, 44,172,230, 72,169,149,228, 59,130,199,130,255,181, 17,156,253,191,145,165, 68, 38, 38, 84,133,105, 55, 25, 16,192, 27,
+ 24, 71,164, 49, 31, 26, 26,194,242,189,173,207,220,227,104,209, 26,150,156,218,110,194,227,168,206, 81,107, 99,149,220, 50,100,
+153,210,161,222,176,164,222, 57,106,205,108,183, 51,119,219,107, 46, 94,253,212, 34, 72, 97,153, 22, 44,137, 99,182, 69, 93,242,
+231, 30,139,249,137,209,252, 66,151,104, 75, 12,198,227, 40,206,227,187, 68,223, 29,243,173,175,253, 38, 87, 23,255,192,229,182,
+ 50, 29, 26, 55, 87,111,222,198,226, 4,139, 79, 4, 18, 99, 57,216, 52, 17,108,117, 98,105, 7, 97,158,103, 30,157,156,112,126,
+210,113,121,121, 71,205,153,138,114,188, 26, 56, 59, 59,225,179,221,173,169, 48,162,224, 26,189,179,104, 18,193,177, 82,184,217,
+223,113, 59, 70,186, 59,199, 23, 47,191,199,250,244, 20,161,231,236,232,148,224, 29,111,174, 38, 86, 39, 35, 71,231,153, 24, 18,
+125,215,113,126,118,204,213,205, 29, 49,116,116, 93, 96,191,159,184,189,219,241,230,250,128,115, 3, 71, 67, 34,103,161, 75, 66,
+ 92, 41, 99,174,180, 67, 35, 97,128, 23,240,136,107,118,160,251,158,220, 10,110,174,248,206,145,151,162,154, 74,160, 22,135,104,
+165,115,129, 92,148, 42,145,192, 76, 83,103, 85,184,213,211,187,140,247, 27,196, 87,146, 15,214,248, 85, 50,115, 8,212,234,169,
+ 84, 98, 3,105, 5, 15,246, 80,235, 26,119,215,111,208,185, 90, 78,122,121, 87, 90, 97,144,121, 48,168,149,219,109,227,254,135,
+ 95, 49,151,194,217,215,122,126,225,235,207,248,206, 47,127, 72, 19, 97,123,121, 75, 63,172, 56, 76, 35,171, 85,199,221,118,162,
+235, 28,171,213, 64,174, 22,241, 4, 65,131, 85, 1,227,148, 92,140,116, 24,131,149, 63,156, 14,194,111,255,214,115,190,251,195,
+151,124,254,241, 61,231,167, 39,108,206,143,209, 93,131,187, 45, 55,215, 23, 56,224,217,243, 15,120,250,228, 9,126,232,113, 10,
+165,121,166,125, 70, 28, 28, 31, 63,198,135,142,237,213, 53,227, 60,162, 78,104, 98,245,162, 27, 10, 29, 29,193, 7,178, 10, 77,
+ 42,218, 38,174,183, 23, 56,175, 76,203,238, 58,111, 51,187,220,152,198,215, 28,201, 29,179,175,172, 86, 3,239,188,251, 1, 63,
+251,241,223, 51,221,223, 18,195,192,241,241, 19,106,109,204,243,110,225, 95,152, 99, 61,245,150,162,152,218, 76,205,149,232, 61,
+195,250, 17,247, 55,215,132,152, 8,209,153,114,161, 2,185,225, 90,229,249,187, 79, 57,204, 7,110, 46, 46,113, 49, 44,253, 20,
+102,116, 12, 78,241,193,234, 75,141,157,241,144, 16,192,166, 97,167, 56,177, 84, 78,169,194,238, 80,112,195, 49, 79, 94,124,147,
+211,211, 63,225,227,159,252, 3,191,255, 59,191,195,127,251, 95,255, 43,254,237,255,241,103,252,223,127,252,183,236,231, 76, 31,
+ 29,234,102, 82, 1, 23, 55,148,166,212,253, 12, 71, 61, 93, 53,167,247,216,132,193, 71, 84,246, 20, 73,118,200, 29, 4,245,141,
+228, 19,115,174,184,208,104,179,149,217, 36,122,187,208,104,177,127,107,138, 16,132, 57,239,232,186,132,248,128,212, 70, 16,168,
+190,225,235, 1, 73,130,106,194,207,149, 18,193,139,153, 46,141,198, 54,209, 69, 67, 78,183,185, 88,145,200, 65,112,233,200,208,
+166, 34,148, 58, 82,235,196,168, 5, 52,224,155,103,150,108,165, 77, 46, 17,210,162,154,102,101,102,143, 58, 79,168,130, 23, 83,
+ 12,124,105,212, 41, 35,206, 19,219, 29,226, 29, 99,158,168, 18,112,105, 77,146, 25,157,150, 62, 14,151, 57,184, 59, 82,236,241,
+ 97, 99,245,220,146,153,243,150,147, 62, 81,230, 12, 65,168, 49, 18,202,196,174, 9, 65, 18, 62,194,174, 84, 98,237,113,117, 75,
+ 23, 38, 92,245, 52,129, 67,173, 48, 21,240, 27, 84, 50,183, 23, 87,104,141,164,116, 6,173,241, 31, 86,149,212, 26,126, 72, 16,
+ 54,116,181,113,118,116,198,209, 42, 82,188,242,249,171, 87, 28,118,111, 44,101,209, 12,249,186,218,156,144,206, 79,152,167,198,
+237,216,113,127,123, 65,140,183,196, 89,209,113,161,109,182,133, 14,169, 21, 21,232, 66,207, 62, 13,182,238,197,153,122, 92,172,
+ 37,148,100,117,227,169, 91,145,235,193, 6,204,210,104, 78,222, 22,143, 65,160, 58,243,126,149, 92, 24, 2,252,202,215,223,229,
+163, 95,249, 85,182,223,191,225,245,205, 15,168,108, 57, 28,148,239,124,116, 66,180,124,186,205, 99, 34, 75, 87,185,122, 50,178,
+ 62,150, 0, 0, 32, 0, 73, 68, 65, 84,104, 30, 9, 10,161, 17, 30, 36,243,229, 86, 27,253, 82,212,178, 84, 64, 6,171,164, 65,
+189, 91,200, 89, 86,198, 16,150, 51, 84,157,208,180, 46, 82,167,185,202, 69, 20,213,194, 84, 18,162,141,212,117, 68,231,201, 82,
+ 76, 74,119,139,235,221, 5,203, 88, 58,147,195,194,242,176, 86,175,214, 92, 38,230,212,111,106, 21,142,193, 89, 93,163,149,180,
+216,222, 13,239,113, 62,217,135,116,153, 66,113, 74,212, 96, 55,244, 20,232,106,163, 72, 35, 75,160,239,226,219, 98,122, 39,141,
+134,152,105, 40,218,234,161,149,165, 14,114,233, 92, 71, 28, 89,204,193,152,212,246,210, 72,195,165,128,115,205,194, 51, 75,171,
+214, 52,122, 82, 48,232, 77,242,209,140,106,216,247, 84,191,176,146,188, 93, 4, 68, 45, 50,231,130,201,161,194, 67,111,160,224,
+189, 25,255,140, 96,100, 32,136,237,246,192,163, 39,239,144,142,158, 50,116,167,244,157, 50,142, 35, 45, 59, 66, 92, 49, 78,153,
+117,223,243,249, 39,223,227,112, 56,224,221, 2,243, 88,138, 66,156,119, 72, 51,220,109,195,225,213,222, 92,173, 52, 30,157,157,
+242,248,244,132,233, 48, 51,150,106,242,100, 85, 86,171, 13, 49, 5,198,253,193,202,103,180,226,194, 64, 58, 90, 27,115, 62, 42,
+179,131,171,155, 29, 78, 31,113,177,187,226,110,119,203,246,176, 35, 6,199,249,163,119,108,189, 83,132, 79,126,252, 9,175, 95,
+126, 78,236, 2,169,239,185,189,185,103,179,142,116,190, 35,118, 29, 87, 55, 91,126,233, 87,127,141,127,253,228, 67, 54, 39, 3,
+ 49,109,240, 13,138,142,236, 23,251,168,132, 74,158,227,162, 0, 57,163, 80,141, 86,195, 27,122, 40,181, 99, 26,183,136, 15,184,
+190, 51,206,123, 81, 90, 45,236,151,154, 79, 97,178,221,170, 68, 66, 21,122,103,209,149, 97, 21, 65, 26, 53, 43, 41, 84, 52,118,
+148,234, 8,173,218, 45,187, 55,121,124,174,224, 53, 82,202,150, 24,133,185,154, 63,163,137, 95,164, 63, 65,117, 90,208,200,158,
+220, 28, 20, 51,194,125,117,117,207,175,252,230, 55,248,231,255,209,175, 81,220,158,251, 87, 23,252,205, 95,189,228,199, 31, 95,
+114,125,127, 32,132,192,106,213,153,126,146,205,216,229,150,124,169,115,130, 52, 93,100, 91,161,235, 29,155,213, 49, 90, 39, 94,
+ 60, 61,230,183,126,245, 63,225,127,250,159,255, 16, 23, 59, 82,234,136,105,135,147, 74,215,117, 60,123,250, 46,199,143,158,144,
+124, 66,180,195,105,166,150,145,105, 30,141, 47,161, 48,244, 39, 12,239,118,236,111,239,217, 30,238,161,217, 42, 96,142,137, 77,
+127, 68, 23, 60,243, 56,114,123,125,205,251,167,194,123,143,158,160,171,129,150, 71,170, 15,204,115,230,240,230, 11, 86,171,107,
+186, 77,160, 52,207,197,245, 27, 94,126,241, 25,185, 89,129, 76, 63, 56,186,225,132, 50,110,169, 85,173,156,197,131,208,240,101,
+198,117,129,227,180,161, 36,207,254,176,227,249,139,247,121,242,244,140,151, 63,251,194,220,193, 46,160, 52,162, 55, 72, 75, 41,
+194,166, 95,115,161, 21,223,108,213,168,234,240, 33, 18,186,100,123,236, 90,233, 98, 68, 80,178, 84,130, 6,171,157, 86,181,207,
+ 92, 48,186,230,103,175,174,249,155, 63,253, 30,191,255, 95,189,207, 7,239,189, 64,154,227,114,119,197, 52,222, 51,132,153,111,
+125,227,140, 87, 95, 22,182,179, 41,135,179,100,122,217,219,231, 41,122,194,100, 57,241,185, 57, 6,239, 41,174,217,154, 44, 20,
+ 42, 38, 79, 35, 7, 90, 72, 84,231, 8,185, 18, 53,225, 59, 71,106, 25, 21,225,144, 43, 3, 17, 95, 4,219,228, 8,121,116,144,
+ 44,110, 89,180,226, 66, 34,231,137,212, 15,120, 87,104,234,161, 42,161, 21, 66,191,226, 48, 41,190, 84,220,176,194, 45,233,159,
+ 24, 61,206, 37,144, 70,150,145,134,103,192, 17,151,210,169,224,148,234, 49, 85, 84, 4,169,153, 54, 26,134, 52, 68, 65,203, 64,
+240,145, 70, 91,148,216, 2,121, 99,220, 19,183, 36, 3, 52, 26, 11, 95, 14, 12,193, 49,231,106,113,216, 38,184,126,192,171,103,
+ 62, 20,196, 93,209,121, 7, 45,225, 80, 14,226, 44,127, 63, 23, 36,103, 92, 74,104,203,228, 90,208,232, 72, 7,143,180, 66,150,
+ 3, 99,112,132,190,199, 77, 66, 46,197, 88, 12,245,158, 92,196,226,168, 62, 80,154,195,133,145,178,159,200,179,162,247,205, 98,
+146, 53,240, 38, 5,100,204, 20,167, 72,189, 71,155,146,101, 6, 38, 66,181,181,136,177,254, 29,234, 18, 41, 52,196,203,114, 62,
+154,162, 73,179,104,181,184, 64, 45, 19,251,105,226,182, 93, 80,117, 38, 54,243, 93,169, 95,222, 91,162, 75,180,119,103,195, 21,
+ 11,221, 52,218,115,201,163,248,174,210,106, 88, 86,164,137, 80, 38, 62, 56, 31,248,232,235,142,191,252, 65, 69,182, 74,241, 10,
+ 97, 98,181,122, 70,120,250,228,236,127,124,216, 33,249,101,191,174,216,116,230, 22, 34,153, 42, 6,112, 89, 14,228,232,140, 64,
+231,150, 47,122,239, 76,218,194,166,114, 22, 41, 95, 22,200,140,143, 14,151,146, 73, 18,206,166,210,214,108, 82,101,233, 74,126,
+ 27,145,115,118,113,112,222, 78,170,135, 41,223,249,128,136,253, 27, 2,222,118, 48,206,155,187,220,179,100, 79, 77,117, 72,206,
+ 72,105, 52, 5, 93,140, 96,210,136,203,254,209, 45,217,247,148,122,124,176,195,255,225,255, 34, 44,187, 22,177,216, 90, 69,112,
+206, 19,176, 15, 58,206,126, 47, 26,208,100,135,225, 16,194, 2,239,193, 34,121, 64,145, 10, 85,150, 88,160, 97,108,131,127,160,
+239,121, 82,234, 56, 57,217,112,114,188,102,189,217,112,116,212, 19, 22, 68,126, 45,229, 45,159, 94, 45,106,176,168, 33, 15, 36,
+ 39,219, 49,226,121,155, 90,112,206, 49,142, 7,246,247, 91,110,111, 47,217,110, 47,223, 2, 60,208, 70,107,133,195,118, 66,117,
+226,245,197, 75,118,251,145, 16,252, 91,192,140,226,137,113,201, 0, 55,161,182, 70,105,149, 90, 50,169, 75,124,253,189, 23,164,
+ 46,240,250,230,150,105,158,109, 9, 21,192, 69, 83, 41,238,111,110,109,186,240,129,174,219,240,232,201, 57,143, 30,111,168,213,
+110,184, 55,151,183, 92, 92,191,225,238,246,146, 38, 66, 80,177, 98, 56,111,142, 79,245, 54, 25,205, 99,102,191,223, 49,238, 15,
+196,228,233,134,200,208,245, 4,129, 34,194,253,221, 45,121, 60, 48,229,202, 97, 63, 50, 79, 35,243, 56,147,115,163, 79,129, 46,
+ 26, 3,124, 86,112,174, 26,228, 72, 33,123,123,216,104,205,246,158, 81,165,200, 76,203, 21,154,185, 81,173, 67, 36, 27,101,208,
+121, 82, 39,203,197, 81, 8, 39, 29,165, 9,210, 10,235,206, 25, 37,111, 22,235, 2, 16, 91,133,116, 17,124, 49,131,232,110,127,
+107, 37, 16,206,113,241,230,150, 55, 87,247,102, 18,117,142,210,228,193,110,186,116,134, 87,112,198,214, 15, 17,190,249,205,231,
+188,122,125,193,159,253,233,247,152,246, 19, 18, 2, 62,121,230, 82,169,217,214, 56,165,180, 37, 45, 18, 12,209,178,172,154,156,
+ 42, 62,120, 98, 76, 4, 31, 57, 62,234,216,239, 38,126,246,229, 37,207, 30,111,120,245,213, 53,215,119, 19, 39, 71, 27,154,204,
+188,185,185, 98,189, 62,225,201,163,119,168,173, 80,201,248,106,109,141,187,105, 94,168, 86,129, 82, 27,170,197, 46,218,193,170,
+ 81, 75,153, 57, 63, 57,227,249,251, 47,152,155,112,245,250,134, 90, 51,231,231, 79,232,215,231,124,251, 91, 95,231,244,236, 9,
+115,109,236, 15,123, 46,191,252, 17,167,113,203,215, 63,124,206,209,209, 17,115,110, 28,110,111,249,248,227, 31,219,206, 30, 83,
+174, 28,176,219,221,210,202, 72, 23, 59,235,105,192,179, 26, 18,167,231,214, 15, 31, 99,164,136,103,123,119,201,215,190,254,109,
+ 78,207,207,184,189,189, 67,242, 76,151, 34,103, 79, 30, 3,106, 69, 45,120, 46,111, 46,205, 83,210,204, 64,231, 88, 76,109, 84,
+ 91,215, 53, 56,228,153,150,179,197, 89,101, 25,248,107,102,206,153,176, 0, 64, 62,123,125,193,123,207, 31,209,201,138,191,248,
+155,239,179,221, 11,231,231,143, 57,236, 70,222,125,178,225,209, 81,207,253,190, 82,114,193,171,241, 32, 92,140,184, 32, 36,215,
+ 44,137,211,236,178, 47,218,204,189, 95,172, 58,182, 53, 59,228,188,139,182,182,107, 38, 49,135, 16,201, 84,164,130, 11,145,210,
+148, 38, 25,245,198, 21,175,205,122,209,209,102,102,212,230,150,134,198,136,151, 70,109,160, 45, 80, 69, 81,205,132,133,169,238,
+131,183, 46,239, 32, 52,137,148, 50,227,162,121, 10,172,119,126,180,125,183,243, 20,105,204,197,186,191,141,222, 55, 45,171,208,
+106,230, 77, 5,105,142, 41,239,161,101, 90,155,161, 75,168,152,219, 95,219,132, 74, 94,138,141,132,178,175, 52,167,136,236,169,
+174,153,239,200, 25, 75,189,201,126,121,254,100,186, 0,101,222, 82,164,216, 65,216,242,162,250, 6,170,100, 74, 62, 32,109, 70,
+171,149, 83, 77,121,164,140, 35,173, 40, 62, 31,112,174,162,117, 54,133, 88, 26,181,140, 86,137,218,238, 40,211,222,160, 97, 8,
+ 77,118, 84,201,150, 74,104, 35,218, 50,170, 51,193, 21, 84,178,189,142,206,218,113, 28,106,117,202, 1,180, 85, 18,166, 80,149,
+ 86,236, 92, 91,210, 43,161,115,104,141,220,108,247, 28,238, 63, 5,217, 25, 33,212, 5, 26, 98,112, 44, 59, 44,236, 57, 44, 86,
+121, 45, 90, 22, 86,129, 41, 92,190,197,229, 76, 21, 40,194, 32,153,255,244,215,126, 25,121,231,159,241,119,223,251,130,122,253,
+247, 4, 13, 68,148, 95,253,198,115,226,219, 61,186, 44, 13, 70,206,118,190, 44,102, 51, 59,214, 23,201, 24,165,115, 75, 60,235,
+193, 96,176,208,111,204,198, 98,121,111,195,199, 26,228,194,135, 37, 87, 90, 27, 69,149, 62, 26, 0,197, 57, 19,147, 85,109,199,
+ 25,151, 82,146,164,202, 92, 29,174,179, 55,164,168,218, 14,205,179, 20,202, 68,188,183, 9,179,105,163, 22, 33, 68, 59,148,157,
+211, 37,183,186,220,238, 69, 44, 67,157,108, 10, 53, 31,151,237, 51, 13, 39,219, 72,193, 32, 39,101,201, 47,199, 96,145,152,172,
+ 75,159,185,154,193,166, 4,183, 84,209,154,129,197, 59, 71,203, 13, 31, 19,205, 27,100, 63,122, 99,107, 87,215, 8, 41, 25,116,
+ 0, 51,199,181, 37, 62,244,240,103,196,195,230,232,136, 16,237,208, 73, 41,218, 26,160, 9,227,161,112, 24, 15,236,199, 3,135,
+105, 98,158,170,237,201,154,233, 34,110, 57,236,189,149, 80, 45,157,244,182,163, 41,109, 70,199,153,105,127,203,221,229,203,133,
+ 16, 20, 9, 33,112,122,246, 30,239,190,243, 28,173,198,242,143, 62,226,122,123, 56, 7,239,141, 85,175, 15, 78,225, 5,157, 25,
+ 34, 39, 71, 39,204,211,204,253,152,153,230,250,118,117,208,117,107,130, 31,120,115,241,134,237, 97,178,168,163, 26, 45,201,249,
+128,215, 64, 8,142, 86, 71,166,177,224,156, 29,144,195,106, 69,183,238,153,166, 76, 45,150,221,174, 53,155,236,159, 28, 94, 34,
+157,119,116, 36,230, 89,217,202, 76,138,158,182,107,220,221,155,195,124,211,223,211,109, 58, 60,118,128, 37,239,217,172,143,120,
+246,238, 51,222,121,231, 49, 95,123,241, 53,126,246,241, 75,164, 76,196,174,224,102, 53,154, 26, 13,143, 48, 21,129, 69, 41, 73,
+189, 25, 32,107, 19, 51,246, 45, 20,187,164, 61,141,108,135,113,105,132, 98,135,240, 84,237,193,239,165, 82,164, 48,183,198, 42,
+ 88, 42,130,224,136, 46,112,191, 29,185,157,175, 88,133,142,152, 28,165,152, 99,221, 7,191,168, 69,182,162,177,155,160, 67, 74,
+ 69, 81, 86,177,227,246,245, 61,223,251,201,103,188,252,244,146,211,227, 35,190,249,237,119,120,252,206, 9,207,198, 19,246,119,
+ 35,181, 61, 16, 20, 43, 84,107, 51,116, 97, 1, 5,133, 37, 65, 80, 27,177, 11, 68,191,226,120, 45,220, 92,237,248, 95,254,215,
+191, 96, 63, 79,164, 24, 25,190,253,109, 66, 23,240, 18, 8, 41,112,123,184,167,115,129,225,104,197,102,125,206,201,211, 71,188,
+ 72,158,195,205,200,188,223,115, 56,220,177,155,247,228,189,210,170, 82,106, 49,252,113,104,108,134,142,117,255, 24, 93,159, 82,
+238,183,100,153,185,159,111, 57,147,247, 24,101,203,184,223,242,230,226, 51, 98,190,226,195,239,252, 18, 71, 39, 1,169, 43,134,
+254,192,217,147,167,252,194, 55,127,137,195, 97,207,245,213, 21, 37, 79, 28,109,206, 56, 26,142,185,159, 38,178,206,116,206,145,
+186,142,212, 69, 66, 13,132,181,195, 53,161,239,123, 14,251,145, 79,126,250, 99, 75,157, 16, 88,159,157,112,250,244, 41, 87,151,
+151, 52,245,244, 93,207,106,181,102,221,173,201, 50,154, 7,161, 46, 7,185, 58,164, 90, 49,149, 58,165,213,106, 23, 59,171,247,
+192,135,142, 95,254,214, 51,142, 54, 43,190,247,131,151, 52,173,124,245,250,130,127,251,239,254,144,127,249, 59,191,193,147,119,
+207,248,244, 71, 23,252,240,239,190,207,211, 23,239,240,249,103,175,248,207,255,197, 63,227,228,236,140,191,252,171, 79,184,157,
+ 22,124,109,109, 54,113, 15,107,252,221, 22, 31,102, 90, 14, 22,188,142,230,227,199, 53,195, 42, 87, 71, 45,149,208,139,145, 32,
+ 81, 74, 25,241,222,227,134, 64,173, 75,169, 82,112,248, 50, 66, 21,114, 45,244, 46, 65,112, 20,105, 11, 74, 55,178, 10, 22, 77,
+213,160, 52, 9,132, 32, 4,177,122, 73,117,145,156, 27,193, 25,147, 33, 12, 66,136, 22, 49, 46, 57,144,232, 77, 9,212, 74,144,
+ 3, 46, 68, 58,140,113, 78,155,145, 4, 65, 27,161, 84, 83, 69, 92,161, 53, 33,121,227,150,180, 10,174,217, 37, 73,253,194,142,
+104, 80,138,173, 55, 92,205, 20,109, 4,237,173, 23,195,141,212, 52,211,251,101,197, 58, 78,248, 80, 24, 75, 66,212,227,213,131,
+ 31, 16, 85, 10,153,228, 43,174, 21, 40,142, 22,205,120,216,230,131,109, 88,179,165, 49, 66, 20,242, 60, 65, 76, 56,111,209, 91,
+137, 9,218, 14,201, 51, 77, 51, 49, 64,205,130,239,103, 74, 85,180, 22,134,144, 40,128,202, 68,147,100, 6, 81, 21, 90,205,248,
+ 2,154,150,102,211,169,226,147,163,170,162,197, 84,193,224, 44, 71,229, 66, 67,138,224,150,150, 54,223, 20, 77, 1, 45, 21,201,
+211, 2,230, 89, 32,104, 75,122,170, 73, 53, 16,141, 91,218, 60,107,120, 91,179,167, 53,226,165,218,128,153, 28, 23,173, 35,126,
+ 5,161,218,231,121, 30, 27,171, 1,158, 61, 93, 19,189, 75,182,147,211, 5, 43,202,255,207,212,155, 53,201,122, 93,233,121,207,
+218,195,151,153, 53,156,121, 6,206,193, 76,128,221, 36,123,180,212, 82, 72,161,112,132,110, 28,225, 8, 95,217,190,244, 95,225,
+ 79,241,207,176, 47,172,144, 67,178,218,205, 38,205, 86,179,187,217, 68, 55, 1, 18,103, 62,117,106,174,202,204,111, 15,107,249,
+ 98,237, 42,136, 55, 32,128, 64, 85,158,204, 47,247, 94,195,251, 62,175, 99, 91,233, 87,116, 52,247,211,250,120, 47,211,113,104,
+131,195,105, 20, 98, 26,234,108, 79, 39,178,171,140,242,145,169,147,144, 17, 59, 90,145,166, 84,137,206, 90,142, 17,189,218,217,
+210,233, 38, 68, 75, 52,245, 75, 58,116,167,234,180,238, 80, 27, 70, 7, 34,234,246,171,104,142,180,149, 32, 36, 3,141, 66, 38,
+ 97,177,123,149, 44,137, 28, 35, 18,194, 40, 2,134,138,169, 57, 13, 76, 22,145, 48,251,135,145,196, 19,150, 26,195, 87,169, 67,
+213, 63,252,142, 41, 37,136,142,247, 76, 61,176,213, 74, 78, 3, 75,219,154,199,102,138,139, 7,187, 56,215,254,202,242, 39,209,
+131, 85,188, 35,142,132,228,133,194,148, 19,177,127, 63,185,168,173,195,180, 68, 68,185,121,115, 98,119,111,151,135,146, 40,210,
+ 72,221, 56,191,188,224,247,191,127,201,229,166, 12,112,138,103,206, 51, 24,242, 93, 7, 64, 40,140, 9,126,204,255,141, 53, 81,
+105,181,243,254,224, 27,206,207,223, 13,171,148, 87, 99, 49, 68,207,110,179, 72, 31, 30,124, 36,120,180, 37,129, 7,183,238,176,
+183,191,195,225,197, 57,243, 92,199, 69, 63, 98, 94, 37,146, 82,162,151,141,175, 43, 84,201, 41, 32, 41,179,204,238,159,188,177,
+218,229,236, 96,230,232,252, 18,137,198, 98,218,129, 24, 89,196, 93,190,248,195,175,192, 10,229,244,156,131,245, 9,231, 71, 39,
+ 36,140, 82,157,120,214,106, 71,109, 1, 73,168,173,185, 70, 66,226, 8,240, 48,182,151, 21, 73, 78,203, 18, 85, 46, 54, 91, 76,
+ 22, 60,126,244,165,139, 2,251,150,157, 4,107,155,152,146,142,215,183,160,182,206,210,115,152, 60,146,113, 14,164, 65, 47,180,
+ 88,208, 94, 89,134, 76, 51,255,242, 46,227,228, 54, 42,243,241,118, 65,124,196, 24, 3, 90,133, 24,141,237,236,182, 34,172,122,
+ 0,145, 4,158,255,254, 61,251, 55,118,136, 42,180,230, 43, 23, 51,144,228,170, 89, 17, 87,119,250, 63, 15,100, 17,230, 90,248,
+249,223,252,150,227,147,115, 66, 8,108, 74,161,150,206,217,217,134, 55,239, 79, 88,175, 11,139,156,124,247, 54, 69, 90, 83,103,
+ 66, 72,164,135, 64,194, 92,237,190,200,124,249,197,151,172,183,151,180, 96,236, 89, 98,189, 57, 25, 22, 42,223, 25,107,245,223,
+171,226,207,232,116, 99,143,157,105,159,197,180,131,168, 80, 46,103, 54,151,199, 92, 94,158, 19,136,236,173,238,178, 13, 5,206,
+ 55, 92, 52,245,131, 45, 70,214,179,208, 41,220, 92, 45, 57, 63,170,172, 55,151,220,154, 11,167,103,167,108, 90,229,232,248,132,
+114,118,192, 7, 31, 60, 98, 63, 47,136,211,196,250,162, 96,115,129, 32,124,241,213,143, 0,229,239,254,246,111,120,245,242, 57,
+180, 66, 78,153,180,179, 66,173,121, 50, 93, 9, 44, 22, 80,218, 76,210,132,100,144,217,105,133,235,179,203,193,218, 6,173,145,
+139,139, 53,167, 71, 7, 16,150, 8, 74,158, 50,214, 59, 89,178,143,210, 91, 35,154, 51, 41,167,133,208, 76, 40,117, 67,208, 78,
+ 26,118,174,105, 17, 81, 2,159,126,246,132,127,245, 47,126,194,155,227,255,131,231,223,190, 65,122,231, 87,127,255, 59,172, 9,
+237, 50,160, 58,243,245,183,175,248,248,179, 15,120,249,246,128,179,179, 11,126,252,131,199, 28, 29,190,230,239,190,237,208, 58,
+ 77,188, 64,232,165,186, 90, 59, 8,228, 56, 48,208,202, 98,103,129, 89,103,190, 84, 54, 52,178, 70,250,182,208, 36,251, 20, 41,
+251,153, 89, 75,167,205, 29,105, 74, 23,165,182,153, 24, 38,167, 96,166,138, 88,114, 58, 94,110,132,222, 89,111, 27,102,157, 96,
+153,102,149,190,105,244, 60, 97,210,113, 72,114,192, 82, 36, 69, 95,147, 74,191, 90,139,118,214,243,198, 15,146,232,222,234, 16,
+151,152,110,125,149, 80, 35,162,234,235, 89, 2, 27, 3,173, 74,208,153, 38,197,215,136, 67,111,209,181, 15, 10,160,115, 33,154,
+ 10, 81, 27,164,132,182,237,136,177,158,200,178, 71, 91, 95,208,108, 70,163,209,122, 33,104,116,231,140, 25, 42,238,191, 15, 49,
+163, 44,217,110, 47,145, 60, 66,138,234, 6,137,153,212, 3, 26, 42,189,205,212, 80,104,230, 78,157, 80,103, 66,102,232, 20, 24,
+ 43, 54, 87,166, 99, 23,116, 13,180,243, 54,114,208, 97,203,198,153, 28,179, 33, 20, 22,201,227, 98,123, 72, 62,253, 40,133, 89,
+125,186, 18,213,221, 5, 18, 61,251,131, 1, 74,194,212,197,212,209, 27,181,232, 98, 7, 95,109, 15, 79,157, 89, 29, 73,168, 87,
+ 19,217, 64, 48,111, 42, 52, 56,176, 13, 85,122,109, 24, 13, 73,137, 30, 59, 27,141,252,159,191,252, 37,246,187,255,157,243,151,
+175,208,254, 6,233,137,155, 59,137,223,124,125,151,120,255,254,189,159,218,136, 5, 85,115,203, 77,188,186,176,101,140,111,197,
+253,144, 50,104,115, 81,130, 95, 6,209, 71,187,152,143, 9,174, 0, 48,189, 59,191, 93, 70,177, 64,240, 17,247,232,229,241, 48,
+101, 23,128, 73, 12, 76,193, 83,148,252,146,241, 55,166, 99, 68,115, 91, 88,107,230,214, 51,235,244, 48,200,116, 3,145,233, 4,
+159, 43, 20,180,143, 61,166,232,185,180, 33,186,239, 93,192,187,173, 16,174,147,227,172,143,237,180,140,200,214,177,171,207, 64,
+109, 10, 83, 30, 69,138,143, 81,196,163,235,156,131,238,110, 56,180,187, 45, 15, 12, 75,190,162,112,196, 40,168, 54,170,249,238,
+ 69,204,237, 93,190, 58,240, 85,129, 95, 32, 1, 73, 66,202,113, 88,144,124, 20,221,240, 81, 51,166, 68, 19,114,138,172,215,151,
+ 28, 30,158,250,229, 63,168, 99, 18, 32,230, 64,148,116,181,244, 24,174,132,228, 23,175,245,129, 37, 13,136,132, 17,249, 89,221,
+ 71, 78, 66,146, 43,244, 61,226, 80, 71,130, 88,119,107,140, 25, 59,171, 29,238,221,187,141,245,198,197,229,150,210, 27,221,124,
+171, 33, 33, 58,180,103,187,102, 59,207,244, 90,135,152,105,201,106,181,203,227, 7,247, 72, 89, 56, 60,185,100,179, 77,220,186,
+125,199, 87, 35,113, 73, 70, 40,115,225,217,135,159,240, 23,255,242, 47,248,163, 63,255,239,248,234,179,175,248,232,217, 71,252,
+240, 71,127,202,189,167, 31,115,255,238, 99,238, 63,184,203,173,187,194,241,225,154, 41,132,235,103,112,177, 74,168,141,100, 46,
+237,208, 2, 33, 24,115,109,152, 41,247, 31, 62, 97,110,151,148,126, 65,235,129, 98, 62,229,136,113, 65, 67,169,117, 6, 21,102,
+117, 1, 99,136,157, 58, 55,255, 12,167,133, 83,248,134, 39, 60, 14,110,114,136,144, 53, 80,130, 79, 42,230,210, 9, 67, 96,101,
+234,226,176,164,238,173, 46, 6,235,205, 57,175, 95, 28,112,116,188,225,252,242,210, 47,243,232,164, 52, 29,147,144,174, 62, 29,
+ 50, 92, 3, 18, 66,164,214,202,197,102,235, 19,169,236, 28,254, 69, 78, 28,188, 61,163,110, 43, 31,127,120,143,245,166,248,164,
+ 65, 28,195,188,179, 92,146, 66, 70,187, 82,180,179, 90,172,248,131, 63,254, 19,158, 60,249,144,178,109,156,157,157,242,167,127,
+240,144, 47,158,222,229,249,225, 9,166,141, 15, 30, 61,193, 44,243,254,253,123,210,148,216,223,217, 35,167, 68, 78, 43,170, 8,
+103,103,199,156, 30, 31,179,185, 60,103,179,169,108, 75, 97,219,214,227,181,118,230,237,134,219,247,238,241,241, 39, 95, 18, 87,
+ 15, 57, 60,124,207,211, 15,239,243,239,254,248, 3,126,245,143,191, 65,251,146,180,186,201,201,197, 57,219,179,183, 60,184,181,
+203,254,174,119, 76,155,147,153,211,147, 11, 46,107, 39,161,204,115,135, 94,137,203, 5,111,223,188,244, 96,139,188, 96, 90, 44,
+249,252,243, 31, 48,175,103,206,206,207, 73,193, 45,169,181, 54, 54,219,194, 60,175, 41,101, 77, 83,255, 12,156, 92,169,172,215,
+231,196,148, 88,166, 21,132, 76,157, 55,195, 6,231,197,186,168, 59, 62,210, 34,179,147,220, 61,210, 90, 27,147, 47, 35,196,140,
+152, 79, 47,223, 28, 28,243,237, 55, 7, 28,190, 95,211,173,185, 62,168, 55,206,206,103, 2, 11, 74, 47,148,178,101,127,255, 46,
+ 15,110,239,242,229,151, 15,248,252,207,254, 45,247,239,236,115,112,124,194,209,225, 41, 49,116,230, 14,139,232, 89, 19,161,248,
+ 8, 90,162,178,200, 59,142,148,213,192,114,153, 61,245, 80,221, 98,139, 5, 44,118, 98, 80, 36, 7,122, 11,104,169, 14, 99, 18,
+117,184,202, 24, 69,219,112,169, 76, 11,232,181, 19,101,194,130,251,240,107, 5,161, 58,116,107, 20,222, 53, 5, 98, 52,212,220,
+118,103,197,169,227,165,118,132, 74,198,174,193, 49,214,189,233, 48, 26, 77,149, 62,244, 6,165,186, 35,167, 55,223,231,135, 88,
+ 40, 87,140,138,104, 48,251,235, 11, 49,121,241,168,101,196,171, 8, 41,186,152,121,138,222, 16, 17, 10, 58, 86, 14,161, 14,107,
+ 92, 76,136,118,199, 53,219, 85, 96, 21, 52, 42,216,140,228, 68,157, 55,126, 71, 20,165,137,120,162,100,221, 98,166,204, 38,136,
+ 20,180, 84,250,236,197,156, 10,104,237,180,109, 37,136,210,231, 45, 74, 99, 0, 26,199, 8,189,160,205,113,218, 81, 60,146, 27,
+ 21, 66,239, 36,201,110,181, 78,126,247, 52,156, 46,215, 69, 61,101,114,232,182, 60, 36, 73,124,141,129, 13,214,130,191, 62,139,
+ 32, 57, 33,209,207, 1,143, 58,183,145, 32, 60,148, 83, 33, 33,234,209,193, 14,132, 19,130, 36, 28,155, 22, 88,159,158,113,254,
+246, 27, 74,121, 75,169, 27,234,124,198,217,197, 9,191,250,231, 87,196,123,183,239,253,212, 21,166,131, 62, 35,126, 49, 94, 9,
+224, 84,140,132, 95, 10, 41,122,103,140,250, 98,218,189,207, 35, 98,117, 36, 37,101, 25, 42,120,211,113, 17,123, 65, 16, 66, 28,
+136,198, 17,141, 24,131, 7,128,152, 16,195,132, 4,241, 61, 56,113, 68, 38,250,184,221,163, 77, 27, 54,138, 9, 6,156, 70,198,
+ 31, 84,112,177, 73, 74,190,143,143, 68, 39,152,141, 55, 85, 77, 6,184, 34,146,226,194, 83,198, 66, 31,168, 78, 79,168,107, 42,
+ 72,242, 75,242, 42, 15,158,232, 94,117, 47, 4, 2,210,227,136, 56,245,169, 69, 23, 63, 96, 34, 16,212, 1, 32, 62, 50,241, 0,
+ 13, 53,115, 0,143,132,209, 57, 7,175,218,154,177, 90, 77, 76,139,229, 80,176,123,133,214,219, 72,140,138,195, 47,169,145,144,
+125, 68, 62,111,103,158,191,122,201,197,229, 60, 72, 88, 97,132,212, 24, 41,100,210, 20, 9, 49,146,114, 34,231, 52, 44, 49,105,
+ 0,119,220,154,119,181,139,159,242, 14,102, 30,118,146,196,223,155, 43,227,154,118, 31,237,153, 58, 58,115,119,119, 7,213,198,
+250,114, 75, 41,238,171,118, 81, 93, 26, 22, 35,223,227,117,237,244, 58,196,127,139, 29,118,119,246,185,253,232, 22, 71,239,142,
+ 57,120,117,200, 98,239, 38, 79,159,125,194, 34, 45,185,119,251, 38, 55,110,222,231,248,236,144,127,248,251,191,230, 23,127,245,
+ 95,248,203,159,253, 23,254,241, 87,127,199,235, 23,135, 28, 95, 30,115,124,120,130,149,192,195,135,159,240,175,255,252, 75, 94,
+190,122,205,217,182, 59, 57, 76,156, 26,168,131,147,236, 59, 59,255, 18, 53, 53,110, 44,119,185,121,235, 38, 61, 20,186,102, 31,
+ 21, 70,232,221, 87, 64, 42, 5,147, 60, 24, 6,174,146, 37, 7, 82,110,132,214,124,221, 20,124, 20,239, 60, 42,199, 19,183, 94,
+189,184, 68,177,214,189, 43, 23, 67,104, 72, 52,186, 69, 23, 53,154, 81,186,242,226,245, 75, 54,231,151,110,189, 50, 39,152, 93,
+ 11, 84,204, 39, 84,221,220, 18, 24, 36,185, 93,204, 6,227, 57,199, 17,124,227,151,250,249,197,154,211,243, 53, 63,250,225,135,
+252,207,255,211,191,229,230,205, 93,222,190, 59,246,195, 52, 68,242, 34, 19, 98,160,180,198,106,119,201, 87, 95,254, 1,143, 31,
+127, 4, 91, 79, 71, 92,159, 31,242,249, 15,110,115,116,114,193,183,207,143, 89, 72,224,195,103,207, 0,229,224,240,136, 52, 77,
+144, 18, 49,123, 42,163,169,139, 59,183,237,210, 3,127,212,127, 78,211, 74,223,118, 71,201,106,231,195, 15, 62, 98,181,218,227,
+108,187,230,252,240, 45,127,240,244, 54,255,230,223,253, 11,254,175,255,248,151,188,124,245, 2, 82,198,202,150, 71, 55, 87,236,
+172, 86,108, 16,206,203,218, 47,194,173,209,172, 82, 74,161,182, 78,107,141,105,127,201,217,201, 37,231,231,103, 44, 23, 75,232,
+112, 99,127,143,123,119,239,243,246,221, 91,119, 11,152,176,222,108,104,243,236,147,156,222,125, 77, 40, 2,234, 89, 16,136, 79,
+213, 98, 26, 51,195,145, 56, 88,123,119, 11,110, 47, 78,187,180, 78,169,234,221,173,118, 98, 10,196, 56, 93,229,193, 33, 65,152,
+183,141,211,139,217, 17,201,161,211, 84, 7, 97,112,193,106,103, 34,165,137,245,102, 67,239, 51, 95,124,242,128,222, 55,124,242,
+217,143,184,113,239, 75,110,223, 80,190,249,246, 45,151, 39, 51, 42, 17,201,206,233,216,214, 66, 19,101, 74, 11, 79,205, 51,101,
+ 17,118, 97, 74,244,237,214, 19, 11, 87,137, 28, 12,216,113,166, 55,234, 57,223, 90, 72,203, 9, 84, 9, 41, 51,169,119, 24,162,
+226,185,237, 67,171,210,130,162,181, 35,166,180, 86, 73, 33, 83,197,252,188, 10, 66,235, 29,141,145, 86, 42, 13,111,128,162,217,
+ 8,146, 74,168,206,148, 81,224,211, 2, 61, 21,186, 54,239,238,213, 65, 43,221, 73, 94,196,212,137,214,144,144, 17, 38,230,178,
+ 65, 77,232,173, 34, 90,145,222,104,214,144,133, 63,235, 88,163, 23, 27,235, 84, 37,152, 66, 87, 54,219,181, 95,208,218,157, 17,
+ 98,174,241, 49, 51, 38, 64,115,192, 52, 18,251, 37,165,204,204,115,243, 73,169, 26, 98, 5,169, 21,109, 5,205,222,124, 89, 45,
+160,230,182,176, 58,123, 46, 4,126,161,183, 90,145, 36,174, 27, 42,117,136,193, 27, 93,156, 58,169,230,186, 18, 19,168,163, 32,
+ 65,132,210,102, 39, 26,138, 3,110, 90, 27,218, 8,140, 24, 50,201, 60, 53,148, 46,116, 85,180, 67, 30, 26, 14, 83, 37, 68, 67,
+ 90,115, 72,207,208,120, 25, 50,214, 65,157, 16, 28,158,134,186, 87, 29, 3, 77,190, 6,215,230, 69, 64,156, 2,105,145, 60,118,
+123,172,219, 72,234,147,226,185,144,160,249, 30, 96,196,123,106, 87,135,104, 72,164,141, 20,243,239, 59,204, 49,157, 69,125,108,
+172,174,210, 14,195,139, 41,194,224,178, 13,232,254,228,135,103, 43, 58, 0,255,206, 99,135,128, 90, 24,129, 12,130,106,117, 33,
+ 28, 30, 30,146,163,179,170, 85, 70,198,115,246, 3,207, 6,101, 11, 95,143, 15,161,156,103,154,247,230,129, 35,233, 10,103,139,
+195, 58,114,200, 20, 45, 96,110,209, 80, 19, 66,119,138,157,154, 82,131, 92,231, 10,247,209,233,196, 28,199,136,203,200, 34,152,
+ 58,151, 62, 96,136,100, 82,128, 98, 70, 51, 60,164, 33, 68,183,211,140, 34,166, 90, 96,138,145, 96,158, 10,215, 76, 61, 42,118,
+ 17,125,124,212,188,250, 19, 27,215,105, 85, 98, 48, 82, 72, 62,218, 85, 35,102, 31,163,246, 32, 92,156,156,114,114,186, 30, 73,
+ 83, 97, 28, 58, 9, 89, 46, 92,184,164, 87,152,223,241,239, 66, 32,231, 76,178, 37,170,149, 82,102, 76, 61,190, 81,109, 30,113,
+186,209,119,200,130,119, 32, 54,156, 10,102, 76,211,196,205,189,253, 17,230,177,165,119, 63,204, 66,116,126,184,152,209,196, 47,
+190,189,157, 5,171,157,125, 94, 62,127,227,186, 6,139, 44,150,129, 36,137,147,227, 11, 22,105,226,193,221, 7,156,159,157,145,
+ 23,198,124,190,230,248,226, 28, 21, 69, 91,227,108,179,134,139,115, 78,195, 33, 18, 94, 82,126,227,159,149, 5, 97,145, 23,220,
+250, 95,254, 71,190,248,248, 9,239, 14, 79, 33, 6,114, 94, 82, 91, 3, 53, 23, 5,169,119, 84, 87,234,239, 16, 87,164, 41,162,
+219, 51,164, 36, 90,108,148,154,124,138, 19,155, 83,231,100, 66,185,240, 17,180, 66,188, 72,244,197, 2,137,133,148,221,170, 40,
+ 34, 72,222,101, 18, 71,207, 74, 4,146, 49, 85,165,134, 70,170,160,105, 73,236, 66,239, 74,171,243, 96, 43, 76,204,235, 13,231,
+ 39,103,164, 41, 64, 45, 88,197,169, 93,193,195,143,220, 9,209, 9,226, 43, 18, 44, 12, 30,132, 63, 63,232,149,234,219,133, 99,
+181,116, 30, 61,188,193,237,123,187,252,213, 47,190,230,237,187, 35, 54,155,153, 90, 27, 33, 6, 54, 23, 27,114, 14,236,223,220,
+229,135, 63,248, 33,183,110,222, 98,123,185,161,206,133,229, 42,177,127, 99,159,191,252,217, 75,142, 14,143, 48, 51, 39,156,201,
+224, 43,152, 98,205,197, 62,121,242,113,111, 18, 65,167, 9,182, 30, 76, 20, 37,184,179,160, 53,106, 43,180, 86,208, 86,176,234,
+174,133,156, 61,227,225,213,249, 33,103, 23,141, 68,228,253,251,119,132,229,223,243,147, 63,252, 35,150,187,187,172,183,103,180,
+144, 8,179,147,212,220, 7,222,177,238,197,174, 69, 35,214,196,227, 7, 31,114,242,230, 13,219,114,201, 34, 46,121,241,252, 5,
+ 63,248,225, 87,220,191,255,128,131,131,183,172,245,114,172,156,124,173, 38, 49,179,138,217, 19,242,166,140, 85, 72,169,177, 16,
+ 39,254,205,205,237,172, 55,238, 76,236,175,118,184,216,158,179, 59, 53, 74, 49,231,114,119,197, 26,172,215,194,101, 45,228,156,
+ 9, 49,209,122,189,222,177, 75, 47,116, 9,244, 0, 34,209,133, 86,173,209,107, 65,166, 9,201,137,215, 7, 71,188, 57, 41,132,
+ 90,120,241,143,191,224,217, 79,254, 7, 62,249,244, 75,190,252,252,159,248,217,209, 17,189,119,234,133, 34, 49, 50,229, 64, 47,
+ 74,233, 67,148,103,145,166,151,180, 6, 27, 26, 38,209,115,216,197,133,109, 54,132,171,150, 27,210, 18,213, 58, 89, 38, 36, 58,
+231, 61, 52,165,217,160,225,213, 72,242,252,193,145, 47, 15, 49,103, 66, 10,228,224,153,242,165, 57, 34,155, 90,156, 43, 18, 60,
+ 17,112, 86, 23,109,134, 40,244, 90,129,197, 88,197,174,177, 57,194,184,144, 91,247,148, 78,137,193,225, 70, 10, 88,242, 78, 53,
+140,192,164,226,214,195, 41, 68, 82, 88, 96, 50, 99,115,199,186, 49, 75, 32,137,210,173,122, 34,159, 69,122, 23,239,210,205, 39,
+188,109,110,144, 3, 90,160,140,105,172,228,137, 82, 47, 89,182,113,115, 88,199,146,199,149,170,249,103,134, 68,104, 16,181,178,
+237,133,168, 11,239,242,155,199, 42,199,166,222, 8,132,198,246,162, 16,146,239,235,107,159,209,226, 40, 86, 27,100,210,222, 26,
+152,145,162,163,136,123,240,239,169,108, 12, 66,115,155, 31, 29, 53,215, 57,245,222,233,102,196,232,113, 65,214, 59, 65,157,227,
+ 79,243,220, 15,154,107,181,130, 4,159,112, 23,199,196, 6, 7,191, 95, 15,190, 25,231, 52, 4,172, 13, 24,220,112,186,212,210,
+201,178,130, 20,174,215, 27,109,128,212,178,116, 18, 18,174,197,110,142,136,117,175,113,163,141, 40, 23, 25, 35, 5, 15,153, 8,
+195,114,133, 57, 15, 56, 93, 81,217,204, 92,112,210,125, 4, 31, 66,244, 75,185,187, 8,165,245,238, 94,242, 36,136, 42,210,197,
+133, 33,234,227, 7,237, 62,162,143,147,123, 69,187, 53, 80, 15,140, 49,241,136, 64,228,202,127,174,142, 55, 21,175,190, 83,114,
+238,179, 53,101, 27,140, 41, 70,207, 14,111,230, 30, 72,198, 27, 98,174,206,239,173,251,248, 67,194,128,200,100,143, 60,197,131,
+ 61, 76, 93,236, 33, 67,244,231, 10,110,161, 91, 32, 7,163,139,184, 8,130, 33, 0, 9, 35,158, 84,125, 82, 48, 13,178, 94, 15,
+137, 86,141,197, 34,140,206, 47, 33,238,160, 33,246, 62,176,138, 62, 13, 9, 33, 82, 90, 67, 82, 36, 76,110, 95,179, 22, 40,101,
+205,203,163, 3,218,224, 94,123, 4,173,184, 16,109, 12,221, 25, 29,180,136,239,214,187,130,213,230,136,220, 33,120,235, 77,189,
+ 56,137, 62, 74,182, 62,144,155, 30, 35,143,210, 49, 9,228,156,184,123,251, 54,139, 41,112,126, 89, 93,149,219,250,136,218,245,
+113,157,153, 87,250, 83, 78,124,252,201, 71,180,186,225,249,139,151, 78,209,147,198,205,219,183,233,109,203,201,225,123, 36, 71,
+210, 55,255,192,179, 15,159,241,228,241, 71,228,251, 43,238,110,214,252,246,183,127,199,251, 55,207, 93,131,160, 94, 84, 50,138,
+139, 22, 28, 79, 89,181,242,127,255,231,191,166, 16,145,188,226,222,157,219,236,221,184,141,196,200,173,229, 46, 55,238,236,178,
+217, 28,240,250,187,231, 60,127,127,194,250,226,130,157,253, 61, 82, 54,239,110,114,229,252, 82, 9,210,136, 50, 81, 76,144,222,
+105,237,210, 71,238,173,176, 76, 75, 36, 5,182, 52,172,248,115,143,184,162, 60,100, 99,174, 27,144,236, 73,133, 89,168,213, 72,
+ 61, 82,181,210, 75,133, 86,137, 65, 73, 41, 48,215,153, 82, 47,121,243,230,152, 90,189,131,152,107,243,207,165,185,242, 61,196,
+ 72, 18, 27, 68,102, 47,236,108,112, 27, 76, 70, 0, 82, 48,122,247, 9,153,137,127,182,119,238,220, 34,132,204, 47,255,246, 27,
+222,190, 61, 33,164,236, 86, 76, 9,200,114,162,181,194,179,143, 63,230,198,157,187,212,121,118, 81, 94,130,185, 43,203,189, 91,
+ 14,165,233, 70, 57,122, 71,213,134,212, 64,177, 45,115,155, 93,123,146,132,208, 38,114,186, 42, 66,183, 4,139, 44,242, 2, 9,
+145,178, 29,151, 59,198,165, 42,181,193,217,220,184,145,178,199, 32, 91,224,232,112,205,250,228,152, 24, 39,246,110, 61,230,131,
+ 15,191,224,206,237, 91,108,206, 55,212,160,132,160, 62,110,157,133,110, 27, 44, 9, 49,174, 60,157,172, 53, 74,173,220,190,127,
+143,189, 59,247,185, 56, 61, 96,186, 49, 81,171,242,245,175,255,129,237,188,117,222, 67,237,132, 32,228,105,135, 27,251,119,185,
+185,179,203,222,141,219,188,223,204, 64, 37, 95,107,126, 2,151,219, 51, 66, 50,230,237,204,237,253, 37,255,219,255,250,239,185,
+247,232, 14,200,154,237, 37,104,204, 8, 51,229,114,205,193,219, 51,254,195,127,250, 25,191,250,251,223,211,227,146, 56,237,211,
+ 54,231, 62, 77,177,230, 8, 50, 13,142,211, 6, 31, 93, 75, 66, 91, 98,177,156,216, 94, 92,240,205,215, 47,121,248,199, 31,243,
+ 55,255,245,111,248,224, 7, 63, 36, 46,239,241,236,209, 77,254, 38, 53,102, 2, 22, 42,166, 43, 15,130,161,211,105,232, 60, 81,
+204,161, 56, 77, 26, 44,196, 63,131,217, 25,227,102, 91,188, 76, 82,202,182, 35, 97,114,181,180,219, 65,220,141,147,128,160,104,
+137, 62,162,215,226,185,242,147,187,115,168,126,158, 68, 26,102, 66, 14,147,103, 95,244,128, 42,174,123, 10, 70, 43,141,101, 84,
+154, 40, 33,175,104,115, 69, 71, 33,170, 77,232,230,207, 85,156,252,251,111, 37,251,212,176,119, 54,125,118,239,252,194,215,162,
+173,207, 30, 47,139, 50,215, 45, 77,148,168,221, 11,107, 4,139,184, 95,189, 55,166, 12,181,184,112,174,107,100,138, 78,130, 12,
+178,112,103, 83,237,116, 77,176,222, 34, 52,160,208,173, 0, 0, 32, 0, 73, 68, 65, 84,189,177, 33, 17,227, 2,237,213,197,195,
+221, 85,255, 65,204, 19, 42,251,104,138, 44,160,109, 30,180, 75, 69,139, 39,196,244, 80,145,238,204,149, 62,207,180, 48,185,195,
+ 43, 42,162, 25,180,162, 84,255,255,166, 62,253, 25, 5,176,168, 59, 3, 28,251,221, 6, 94, 91,157, 17,161,222,105,107,159,176,
+222,253, 46, 25,197,186, 98,100,205, 14, 58, 50,195,164, 14,237,153, 39,188,133,144, 29, 64,148,243,224,120,130, 22,197,174, 20,
+242,226,147, 91, 83, 65,170,175, 32,194, 52,185, 19, 42, 42,169, 39, 90,223,208, 53, 16,239,222,187,253, 83, 29,162,167, 16,198,
+178, 31, 27,187,232, 17,247, 38, 54,176,167,114, 61,250,165,251, 47, 38,122, 71,172, 87, 64, 25,132,184, 24,246,160,198,117, 72,
+140, 13,232,134,232,176,139,117,247, 6,142, 31,235,129,242,230, 23, 77, 20, 87,114,217,192,182, 74,136,144, 71,252,170,121,113,
+193, 80,105,167,113,209,249,242,192,247, 18, 49, 6,191,192, 71, 28,158, 54,195, 66,186, 30, 31,131,141, 32, 8,143, 12,149, 56,
+ 42, 97,145,107,192, 11,221,113,172, 62,141,117, 6,188,147,168,148, 62,118,230,194,128,195,128,187, 2,192,253,207,209,176,224,
+157, 80,199, 71,172,130, 91,140,220,214, 7,139,236, 93,154, 8, 84,147,193,203,240, 11, 5, 2,185, 9, 26, 2,239,223,191,227,
+245,155, 67, 32,186, 90, 61,186,158, 33, 38,167,107, 73, 8,206, 13, 48, 87, 81,234,192,228,250,212,196,215, 5,165,235, 64,186,
+250,239,187, 90,175, 16,100,192,108,134,223, 89,132,155,251, 55,216,221,217,103,189,217, 80,181,211,106,245,244, 51,185, 26,145,
+200,245, 4,227,147,103,143,249,224,195, 39, 92,158,110,120,245,242, 53,221,140,221,253, 61, 62,253,228, 19,118,151,194,155,151,
+ 47,120,243,238, 29,135,239, 94,242,205,111,191,230, 87,127,247, 75,126,245,247,255, 31,223,189,248, 39, 78, 14,222,114,118,126,
+230, 54, 49,145, 49,254, 82,215, 82,104,160, 85, 15, 30, 33,103,144,192,222,206, 62,139,229,142, 91, 86,122, 65,226,196,222,173,
+ 59,236,164,137, 59,251,183,249,183,127,252,231, 76, 35, 22,119, 90, 78, 88,104,148,217,168, 53, 58,251, 32, 78,164,210, 7,156,
+165, 34,152,227, 79, 43,244,176,101,158,103,250,236,168,224,148,193,180,184,103, 95, 50,147, 45, 72, 40, 86,171,175,113, 66, 66,
+181, 99,181,123, 82, 83,234, 92, 94,156,114,116,244,158,227,227, 51, 94,189,121,135, 69, 33,231,192,249,217,236, 59,244, 48, 82,
+ 3,199,142,237, 42, 56, 52,140,168, 80,223,245, 58, 6, 88,204,227, 89, 83, 76,238, 20, 73, 30, 93,121,122,118,201,235,183,231,
+ 94,229, 71,127, 54,123,247, 21, 78,181,202, 50,172,184,127,231, 33,155,185, 34,116, 86,139, 68, 75,194, 36,201,149,181,166, 84,
+ 81,234,122,230,201,163, 71,212, 90,120,243,250,141,143,147,167,232, 5, 42,254,153,151, 58,211, 91,103,153, 86,164, 60, 86, 11,
+ 24,219,186,101, 46, 27, 36, 4,166,213,138,221,221, 29,170,117,182,235, 53,185, 85, 62,252, 96,151,231,239, 59, 22,111,243,244,
+201, 61,166,188,131,174, 22,164, 54,179, 92,237,163,193,104,115,241,206, 34,120,228, 39,181,140, 12, 2, 35,239, 8,155,245,154,
+247,111,223,146, 23, 75,118, 22, 43, 74, 41,148, 90,104, 90, 88,228, 21,123,251,251, 60,184,251,152,189,213, 62,133, 17,155, 43,
+209,245, 13,209,216,174, 43,231, 23, 27,218, 64,233,214,121,230,232,232,148,211,203, 19,158,126,112,151, 63,248,226,115, 62,248,
+234, 83, 30, 61,251,148, 71, 79,159,241,193,167,159,242,197, 79,126,200,191,250,243, 63, 32, 90,229, 55,223,190, 28,216,223,128,
+ 13,171,175,153,145, 22, 19, 18,160,214, 66, 10,145,197, 98,135,214,102,159,250,169,114,121,126,201,114,119,193,201,250,130,163,
+183, 7, 60,121,178,199,179, 79, 62,162,172,141,239,126,127, 64, 23,159, 4,230,228,254,100,209,128,118,183, 34, 77, 49, 80, 69,
+ 73,248,180,164, 37, 96, 46,104,236,126, 25,247, 48, 4,152,205,251,136,145, 84,105,230, 17,214, 54,249,190, 93,162,160,161,179,
+ 96,225,221,122, 83, 79,213,108,134,169,139,120,219,160,114, 26, 74, 26,103,162, 57, 88, 31,187,202,175,232, 62, 61,140, 67,103,
+181, 92,142, 68, 76, 9, 76,201, 87,172, 70,165,153,207, 69,123,243,253,123,215,130,206,138,106, 70,172, 33,161, 81,181, 19,186,
+ 50,155, 99,138, 99, 72,180,222,232,226, 66, 62, 68, 92,243,212,221,182, 85, 7, 96, 43,152, 14,193,181,208,138, 43,213,189, 1,
+168, 84,243, 49, 61,218, 92,188, 29,156,252,215, 90,115,107, 31,110, 51,213, 94,175, 89, 3,189, 52,106,109, 68, 21,199,144,107,
+243,137, 51, 74,194, 39,181, 97,160,207, 37, 57,155, 64, 44,208,135, 59, 66,171,123,212, 45,250,243, 16,186, 79,214,122,116,145,
+ 86,112,175,223,208,203,116,183, 65,155, 13,250, 34,190, 62,100,172, 59, 37, 13,199,216,192,164,165, 68,176,142,144, 65,117,172,
+244, 12,235,221,115, 81,240, 34,196,130,185, 88, 47, 69,204,234, 72, 31,132,208,219,149,199,156,248,232,254,221,159, 58, 1,246,
+138,186,230, 67, 92, 25,227,109,134, 63,221,239,123,239,212, 7,153,214,109, 99,102,163, 18, 26, 99,248,224, 63,225,234,130,109,
+234,121,200,105,172, 96, 71, 95,201, 32,133, 95,239,206, 49,241, 66, 98,140,145,147,184,104,197,134,199,219,149,124, 46,212,155,
+146, 67,250,175,103,241,193,127,209, 88,183, 14,229,186, 95, 22,170,206,122,214,241,122,188,138,119,102,187, 71,229, 5, 23,189,
+ 85, 29, 32, 8,223,201, 51,128, 49,222, 24, 15,224,139,118,255,112,123, 31,162, 63,239,174, 68,220,146,151,146,147,239, 66, 84,
+162, 56, 41, 40, 44,157, 72,101,193, 53, 9,158, 20,231, 73, 56, 97,116,220,174, 24,180,145,226, 21,136,248,239, 44,243,150,223,
+127,247,154, 82, 10, 41, 37,183, 9,166, 64,136, 94,200,184, 78,193, 93, 7,140,104, 92,193,209,131, 14,180,105,204,243,204,182,
+120, 69, 41, 33, 92, 39, 83,165, 48, 58,172,239, 99,247, 88,174,150,228, 24,233,165,178,157,231,113,161,123,145,149, 82,102,145,
+ 38,183,207, 76,145,207, 62,121,202,227,199,247, 73,217, 83,253, 14,222,190,101, 91, 11,159,125,254, 41,183,111,239,179,187,152,
+184,123,231, 38,111,223,190,243,160,159,232,162,188,214,103, 54, 23, 23,108,214, 23,215,152, 60, 25,169, 90, 85,125, 52,213, 91,
+195,198,232, 43, 72, 96,185,187,207,147,167, 31,240,244,147,143,121,184,119,143,148,132,105, 90,178, 12, 75, 94,189,251,150,179,
+243,153,143,239,127,206,254,157,192,239, 94,255,158, 32,153,152, 61,179,220,153,239,158,119, 31,174, 51,146, 64,131, 3,133, 90,
+109,244, 33,176, 84, 81,143,232,235,206, 86,136, 98,164,148,189, 3, 48, 99,125,177,113,123,214,225, 59,214,155, 13, 55,119,246,
+ 96,202,156, 95,156,113,122,118,200,171, 87,135,188,120,125, 76,140,194,122,189, 37,133,196,157,155, 43, 79, 91, 27, 54, 66, 51,
+215,167,152,249,235, 33,248, 23, 63,242,125, 96, 82,140, 87, 69,142,235, 85,114, 74,204,115,227,244,108,141,186,234,147, 90, 11,
+134,121,128, 77,239, 64, 98,189, 93,115,251,246, 29,166, 41,162, 89, 72,139, 68,180, 70,136,145,144, 50,151,167,103,132,166, 92,
+108, 46,120,240,232, 49, 90,132, 23,175,158, 99,230, 83, 32, 69,136, 57,185,219,163,185,104, 51, 70,165,149, 78,111, 70,169,202,
+102,187,165,183, 13, 65, 50, 41, 11,243,246,130, 90, 10,101,222, 50,133,196,131,251,247,121,117,112,192,106,113,155, 71, 15,111,
+211,203,214,243, 16,172, 96, 59, 1, 43, 62,205,139, 57,248,228,173,251,168, 40,150, 70,143,174,168,127,245,187,111,153, 55, 27,
+146, 68,106,239,180, 46,190,254, 9,145,157,197, 14, 55,118,118,145, 0,167,151, 23, 92,170,113,124,122, 64, 2,150, 59,183,209,
+222,232,101, 75,211, 70, 22, 65, 53, 96,234,137,131,223,252,238, 45,127,253,139, 95,243,237,111,126, 15,151,103,196,190, 38,166,
+192,180, 51, 1, 51,139,189, 91,252,241,159,255, 33, 59, 4,126,241,203, 95,211,212,136,139, 37,189, 13, 6,128,203,104,208,228,
+ 81,184, 65, 92,108, 86,172, 49, 45, 2,235,245,134,121,219, 89, 78, 59,252,245,207,255,134,182, 57,231,199,127,244, 19, 30, 63,
+125,204,119,191,127,205,235,151,111, 8, 49,147, 72,227,108,243, 32,171, 22,161,184, 0, 7,219, 54, 74,203, 80, 10, 77, 29, 74,
+ 99,189,141,224, 15, 63,188,213,160,121, 42,144,227, 98,123,199,106,245,117, 68, 85, 98,138, 4,241, 51,170, 53, 35, 5,101, 21,
+ 34, 77, 29, 65,234,218, 37,191,120,166,201, 3,152,106, 83, 68,140,214, 61, 62,185,119, 37,141,231,180,138,141, 93,175, 79,143,
+218,176, 55,135,193,199,143, 49, 19, 82, 38,101, 37,212,138,244,140,153, 95,174, 26,125,237, 23,174, 28, 76,128, 73, 27, 9,194,
+ 46, 28,235,109,140,173, 5,186,186, 31, 63,197,236,207,160, 53,239,214,147, 59,120, 90, 23,230, 90,233,181,163,181,186,115,170,
+121, 96,149,104,167,197,238, 49,109,173, 57,193,180, 55, 68,148,214,219, 32,242, 49,220, 83, 70,235, 13,237,144,228, 42, 31,125,
+ 8, 33,233, 88,112,135,143,154, 23, 36, 88,247, 24,219,152,221, 37, 48,184, 40,102,140, 85, 98,245,168,103, 92, 63,224, 63,133,
+241,158,113, 29, 25, 92,205, 95, 71, 14, 97,124,190,226, 23,187, 54,191,251,186, 67,208,180,123,238,189,137,135,115,185,160, 54,
+ 95,115, 90,176,238,140, 16,117, 77,136,217,247, 76,153,120,255,225,253,159, 74,136,215,255, 80,112,168,136,255,189, 92, 51,204,
+196,194,181, 50,221,130, 31,122,218,221, 78, 37,226, 93, 69, 74,227, 50, 28,101,129,168,199, 77, 94,253, 50,198,161,229,254,245,
+116,253, 6,219,168, 48,188,243,205,222,226,143,169,129, 12, 9,102, 83,223,214,167,228,172, 98,241,105, 38,166,141,222,188, 48,
+112, 75,150,139,233, 90,241,206, 95,132,209, 17, 95,137,197, 92,157,216,154,139, 70, 76,148,222, 60, 89, 45,166, 64,183, 78,173,
+238,169,190, 10,202, 75,226, 23,122, 55,168, 54, 34, 27,241,206, 38,134,232, 86, 59,140,144,133,136,249,123,149,134, 93, 47, 38,
+ 22,217, 31,232,156,124,162,145,166, 68,169,179, 71,242, 17, 8, 99, 20,147, 9,195,226,230, 8,209,131,247,111,121,251,254,132,
+128,139,152, 44, 8, 49,102, 82, 78,163,232, 24,175, 80,252,247,199, 0, 49,123,150,188,246, 74, 41,149,185, 84,239,194, 9,215,
+ 48,159, 24,220,114,209,186,143, 82, 76, 96,185, 90,177, 90,100,106, 45,108,231, 74, 85,239,162, 66, 8,132,148,145, 16,169,101,
+ 75,142,194,135, 31, 63,227,193,163, 71,152, 68, 98,232,172,210,196,221,123,119,120,248,248, 9, 31, 60,122, 72,206,206,119,206,
+203, 29, 98,242, 66,105,103, 49, 49,133,161, 23, 72,105,120, 63,253,121, 72,163, 34, 87,223, 3,248, 72,113,140, 16,230,178,229,
+244,248,136,111,190,253, 45,223,254,250,107,126,251,187,111,120,251,246, 21,239,223,191,163,108,215,180,121,230,254,221,155,228,
+101,226,197,251,175, 57, 63,219, 16, 87, 59,144,221,183,220,154,147,158,220,161,167,148, 14, 22,189, 91,238,165,210,186, 82,250,
+ 64, 2,119,144,236, 23,155, 52, 65,166, 72, 82, 97,187,157,121,119,124,192,249,246,144,180,232, 28,191, 63,226,229,219,119,156,
+156,156,113,118,118,204,193,201, 17,239, 14, 46,120,127,120,198,114,145,120,252,112,159,103,207, 62,224,135, 95,126,204,167, 31,
+220,226,197,171, 83,182,173,140, 80,161, 68,200,190, 56,177,232, 88,217, 24,174,160, 75, 54,166, 57, 92, 11,235, 66,246,244,193,
+ 50,123,134,130,160, 20, 85, 2, 94, 44,171,250, 69, 40, 4, 74,157,217,187,115,155, 27, 55,118,145,234,123, 81,235,193,139, 28,
+129,105,103,201,246,244,152, 50,207,220,222,191,201,249,188,225,240,240, 0, 53, 72,203, 21, 41,174,200, 49, 16, 70, 76,113,178,
+192, 86,157, 9,223,230, 45,115,171,148,245,134,109,217,144,243,202,215, 87,189,145, 17,154, 53, 22, 41,241,213, 15, 30,240,187,
+151,223,178,119,227, 14, 33, 71, 90,219, 66,143, 52, 19,114, 27, 22, 36, 58, 73, 22,244,217,105,134, 94,108, 71,103,129,107,231,
+240,240,144,179,139, 75,215, 19,212,142,106, 37, 5, 97,185, 88,144,147,219,254,206,183,151,215, 29,138,160,204,165,144, 87,123,
+ 8,201, 3,154, 48,106, 43,168,109,209, 54, 99,173, 58,102,179, 42,191,123,254,138,255,247, 23,191,230,215,255,240, 79,124,252,
+240, 1,143, 63,186, 77, 59, 57,133, 54, 35,171,137,211, 55,103,252,199,255,231, 23,108,180, 49,133,132,116,241, 8,216,214, 9,
+105, 66, 66,118, 36, 43,157,253,229, 46,155,217,169,142, 93, 59,102,202,106,247, 54,167,103,151,124,124,127,143, 31,254,228,135,
+236,220,122, 72, 98,230, 31,254,233, 27,247,200,147,232, 85,145,101,242,172,185, 46,104, 53, 82,247,149,141, 31, 90,141,237,188,
+185, 62, 10, 29,162,225,110,158, 58, 38,155, 6,132,230,226, 81, 29, 36,189,214, 27,162,234,122,168,118, 37, 72, 14,108, 91,161,
+245,226,251,250,152,188, 8, 32,211, 77, 41,117,235, 35,226,174, 36,137, 88,136,132,156, 60,167, 35,102,180, 84, 98, 55,183, 89,
+245, 97,217, 10,222, 16, 25, 14, 91, 50,233, 68,243,145,126, 71, 73,187,174,119,200, 18, 29,187, 13,228, 20,145,152,104,189,187,
+168, 81,235,152,168,250, 36, 88,146, 11,167,193,134, 31,219,252,252,194,159,253, 54, 23,255,206,104,119,141,151, 26, 13,232, 58,
+211,187,139,218, 84, 13,109, 74, 41, 67,224,233, 32,143, 81,216, 65,208,136, 49, 95,131,202, 80,247,236,135, 1, 3,194,174,198,
+221, 74,178, 68, 41,141, 16, 59, 77,187,159, 37, 22,105,189,141,179,209,239, 21, 53, 71, 14,155,249,249,106, 97, 36,152,138,141,
+251,205, 87,211, 93,205,159,155, 17,111,206,152,134,235, 16,231,114, 53,237, 29,159,173,119, 60,142, 65, 55,115,104,141,105,247,
+215, 28,188,169,245, 84, 74,134,211,161, 59, 57,240,193,131,187, 63, 13,163, 67, 54,211,161,214,214, 33, 62, 50, 31,243,217, 8,
+ 66, 9, 78, 76, 19,240, 52, 43,243, 12,108,223,203, 15,161,221,136, 50,140, 35,228,197, 70,117,123,245,191, 32,120, 0,140,186,
+ 95, 48,100, 79,115, 51, 13,196, 56,198,237,216,176, 73,248,120,217,180,187, 96,109,144,223,100, 20, 26, 72, 28, 42,236,126,173,
+ 22, 86, 95, 51, 97,214,209, 40, 35,135, 79, 28, 85, 40,110,241,242, 7,211,197,101, 97,136,221, 66,240,135,175, 15,153,159, 43,
+208,187,239,194,109,224, 39, 51, 78,171, 35,186,104, 42, 69, 79,126, 11,230,136,216,152, 71,161, 33,136,172,188,240, 8,174,210,
+214,166,126,217, 34,172,114,114,157,129, 93,113,220,251,216,187,132,225, 62,128,245,229, 5,207, 95,188,161,206, 14,178, 49, 60,
+ 21, 46,135,124,109,203, 11,146, 80,148,185, 86, 36, 70,130,138,143,131,172, 83,183,101, 88,208,140,144,178,119, 21, 87, 59,118,
+134,253,103, 84, 90,171,197,138,156, 38, 23,255,168,127,182,136,187, 7, 66,114,237, 65, 47, 51, 41, 9,159,254,224, 99, 30,221,
+185, 51,118,248, 78,162,107, 77, 88,174, 86,220,218,223, 35,197,129,215,149,137,188, 16,238,223,191,195,211, 71,143,249,228,179,
+167,124,252,241, 51,158, 61,249,144,135, 15, 30,113,255,225, 93,110,238,238,114,107,103,135,144,188, 20, 21, 73,195, 34,230,106,
+104, 83, 87,131,247,238, 99,181,210,102,214,155, 51,206,207, 79, 57, 56,122,199,119,175,126,199,219, 55,111,120,119,112, 72,109,
+133,180, 52,230, 57,179,218,221, 71, 91,245, 3, 52, 14,132, 99,247,196,175,210, 43,117,174, 88,117, 5,189,135,225,116, 66,132,
+184,138, 44,210,146,165, 76, 88,156, 57, 63,191,228,226,244, 20,147, 53, 79,159,222,228, 95,253,235, 47,249,227, 63,249, 17,183,
+247,118, 57, 61, 59,227,226,124,195,166,174,169,181,113,126,186, 97,154, 2,159,124,254,152, 39,143,239,113,251,214, 62,235,121,
+195, 47,127,245, 29,239, 79,206, 60, 60, 7,119, 82,216, 40,151, 91,237, 62, 94, 31,154, 15,128,152,174,254,125,240, 16, 33,241,
+ 80,150,222,174, 44, 50,230,100,177,161,152,237,221, 45,153, 68,207, 91,120,250,228, 25,121,218,115, 77, 72, 82,178, 37,154,118,
+186, 42,139,197, 13,142, 78, 79,152,231, 66,140, 75, 14,142,222,115,126,121,129,154, 49,165, 76, 78,153, 24,242, 72, 21, 27,249,
+ 6, 5,230,178,245,253,174,186,190,100,179, 89,179,179,191, 67, 94, 44,192,148,156, 38,164, 11, 33, 27,127,246,195,103, 20,221,
+241,233, 76,104,212, 16, 89,165,228,182, 83,160,149,121,196, 45, 7,180, 27, 83,112, 65,106, 27,171,151, 32,254,188,190,123,243,
+ 6, 53, 31,139,202, 32, 39,106,112,234,222, 92, 11, 18,125, 2, 54,207, 30,106,212,123, 33, 38,183, 71,181, 90, 8,193,104,218,
+169,243, 76,169,227,253, 11,145, 40,129, 73, 18,197,224,240,240,130,143, 30,223,226,214,222, 77,222,190,124,203,241,233, 41,155,
+227, 99,254,195,127,254, 57, 63,255,229,183,110,229,237, 46,234,109,204,238,224, 69,145, 56, 17, 13,202,188,117,212, 44,194,118,
+187,198,186, 51, 61,130, 4,214, 23,107,246,246, 18, 79,159,220,231,238,253, 61,110,222,186,205,193,187, 11, 94,189,120,139,100,
+143,131, 13, 26, 40, 42,132,214, 92,104,137,249,104,183, 55, 36, 54,106, 83,130, 76, 76,171, 21, 18,179, 71,226,106, 64, 91,245,
+ 11,163,225, 17,209,210,136,109,184, 64, 26,222,192, 8,222, 49,154, 81,108,156, 97,113, 92, 54, 33,208,181, 32,221,155,129,166,
+184, 67, 32, 12, 55, 17, 30,208, 67, 87, 84,103, 23,227, 38,255, 28, 50,222, 77, 55,115,161, 88, 83,195,250,140,116,163,139, 23,
+151, 26,148,212,101, 8,103, 61, 52, 75,128, 20, 5,181,177, 6, 28,128,179,101,136, 72,158,152, 96, 36,241,141, 75, 61,169,175,
+ 78,171,249,110, 91, 32, 38, 40,173, 19,174, 96,161,226,214, 63, 9, 46,218,179, 90,177,226,246,178, 56,208,184,173, 59,142,156,
+ 46, 67, 43,213, 92,249,111,174, 35,106,234, 26,170, 74, 31, 76,148,192,108,190,170,160,122,199,174,162,158,144,168, 66, 12,213,
+ 11, 70,117,181,185,141, 9, 50,102,244, 16,168, 84, 7, 88,209, 6, 88,198, 6, 74,124, 52, 86, 68,108,196, 6,119,237,164,224,
+ 98,111, 85, 35,152,211,255,166,232, 12,148,110, 67,159, 96,234,119,131, 94,173, 80, 96, 74,131,212,103, 62,170,167, 42, 9, 25,
+197,184, 23, 77,126,128,143, 88,200, 64, 64,194, 80,177,247, 43,180,169, 98, 36,223,211,104, 31,222, 58,239, 92,131, 25,166,133,
+102,193,119, 36,248,110, 55,166, 97,145, 24, 69,131, 96,238,205, 30, 92,117,183,186,123,215, 24,178,139,241,100,164,178, 49, 48,
+141,202, 8, 90, 48, 35, 6, 31, 11,169, 66, 78,217,197,121,230,201,104,158,163,110, 87,141,171,219,134,186,211,219,100, 68,217,
+217,213,104, 94, 96, 74,129, 46, 62, 77, 88,165, 48,172, 12,227,193,138,254, 87,195,173, 93,174,118,175, 68,117,159,116,192,119,
+236, 12,255,187,133,192, 52, 8,118,137, 72,136,138, 82,220, 30,163, 35, 70, 49, 12,127,166,193,102,158, 93,141,218,141, 28,161,
+182, 64, 53, 35, 14,192, 77,180,206,241,209, 17,235,117, 37, 79, 11, 98,188, 54, 87,249, 24,200,146, 71, 99,134,136,182, 25,173,
+142,147, 36, 70,223,161,209,105, 87, 97, 58,226, 95,124,144, 33, 70, 28, 56, 92,103,255,178,183,218, 97,239,134, 19,227, 74, 85,
+191,208,237,170, 91,112,235, 90,157,103,246,119, 22,124,244,209, 51,110,222,185,197,146,177,147, 11,238,191,235, 81,104,193, 71,
+ 93, 89, 2, 57, 70,178, 24,181,204,104,116, 18, 24, 65,152,166,204,254,206, 29,238,106,163,196,193, 15,152, 27, 77, 27,141, 70,
+189,172,204,155,153,109,221,114,121,122,198,182, 84, 78,207,206,217,206, 91,230,222,152,231, 58, 62,115, 7,112, 69,132, 94, 11,
+ 47, 94,125,199,187,163,119,252,248,203,175,184,255,228, 9, 89, 34,101,144, 15,117,246, 63,211, 34,100,182,205, 64, 43, 75,132,
+173,121, 14,168,136,139, 5,187, 94,241,218, 61,236,102,110,199,176,154,248,163,175,158,242,249,167,143,217,191,245,136, 26,215,
+156,189, 59,224,252,114,166, 53,175, 86,247,151, 43,182,173,112,247,214,210,163, 83,167, 5,235, 75,229,249,203,151, 60,127,121,
+192,249,201,154,157,157, 60, 16,157,174, 37,185,174,198,205,177,186,173, 43, 41,184,157,138,222,135,110,194,217, 3,243,166, 58,
+ 0, 10,232, 50, 32, 80,214,221, 50,164, 29, 98,194,186,179,235,247,119,247,216,191,177,130,108,216, 28, 49, 38, 26,129, 30,183,
+131, 88,165, 92, 94, 94, 96,166, 28, 95,158,177,217, 94,210, 90,245,236, 7,235,104, 47,148,226,182,202,218,189,227, 17,113,218,
+ 97,217,120,129,232,228, 66,248,147,175,158,177,183,183,207,127,250,249,175,216, 70,103,232, 55, 77,156, 85,229,206,205, 15,185,
+220,188,195,172,186,179,166,206,196,100,204,179, 50, 13, 86, 64,239,149, 36,141,218,149, 90, 11, 49, 37, 52, 8, 77,133, 91, 55,
+110,115,247,222,125, 46, 78, 14, 60, 19,222,160,213, 54, 26, 1,159,210,245,162, 88,114, 30,122, 31, 98,165,237,217, 25,203,157,
+125,154,217, 88, 19,204, 78, 95,171,219,161, 1,138,180,224, 54, 32,130,210, 52,240,159,127,254,119, 92,110, 47, 29,218,179,204,
+244,237,204,207,126,246, 91,154,249, 51,131, 86,234,128,146,168,184,122, 59,216, 26, 20,138, 86,206, 46,207,216,221,185, 73,235,
+221,105,111,150,216,174,215,172,107,225, 55,223,188,231,151, 63,251,175, 44, 22, 11,158,125,242, 17, 79,159,236,241,237,173, 93,
+222,157,215, 65, 95, 44, 35, 74,217, 92, 26,213, 59,166, 9, 74,163,180,230,235, 76, 18,165,108,137, 49, 16,186,239,226,147,224,
+182,195,232,151,170,199,176,118,255,239, 99,118,212,174,245,235,213,131, 12, 14, 70,107,190, 94, 42,163,104,215,190,165,169,103,
+104,164, 0,189, 39,170,205,196,184,160,215,153,185,117,166, 9,186, 85,164, 71, 90,139,232,213, 51,172,160,177,185, 8, 55,234,
+112, 46, 57,209, 83,204,156, 98,215, 42,154,129, 58, 46, 93,243, 6,224,234,252,113, 54, 7,244, 86, 9, 18,201,146,232,166,206,
+ 19,240,217, 39,203,149, 50, 91,167, 87,104,181,147,122,248,190, 1, 85,163, 23,159, 56,134,152,125,197, 53,208,220, 69, 5,233,
+213,155,172, 56,249, 72,187,117, 82,244, 81,120,243,202,216,185, 42, 99,202,137, 25,149, 62,190,167, 3,110,150, 19, 90,253,253,
+157, 12,186,137, 79, 56,175, 86, 25,214, 7,198,103,140,194, 49,106,175,164,161, 27, 8,233, 10,157,142,127, 31,166, 5,210, 60,
+212,154, 81,200, 16,156,230,231, 43, 0, 95, 87, 88, 20,186, 65, 30, 43, 96, 21, 29,105,122,130,201,194,139,102, 43, 88, 20, 82,
+247, 66, 1, 11, 4,105,174,126,247,226,200,133,101, 54,114, 93,163, 93, 49,223,227,245,152,215,217,196, 46,154,210, 48,120, 37,
+166,174,176, 20,103,165, 75, 24, 49,144,214, 93,225,126, 37, 60, 27, 23,174,142,238, 63,228,201,233, 91,221,133, 28,193, 92,192,
+ 17,130,124,127, 17,169,239,196, 98,242, 98, 40,146, 49,173,168,248,129,131, 92, 29, 60,226,169, 54, 67, 41,175,234,138,226,222,
+253, 77, 78,214,125, 44, 79, 36, 68,127,160,186, 42, 77,125, 95, 95, 77,199,174,201,247,219,142,220,236, 52,243,202,191, 99, 78,
+241, 82, 67,171,209, 68,201,113,225,157, 18, 56,230, 48, 36,194,228,106,126, 23, 55,249,100, 32, 52, 99,177, 19,105,150,145,162,
+196, 36,168,102,232,138, 76,157,156, 19, 92,118, 82, 18,234,168,144,183,243,134,195,211, 11,223,163, 4,135, 13,136, 68, 31,245,
+ 39,255, 60, 34,217, 1, 26, 97,197,206,106,242, 14, 63,120, 53,218,155, 11, 87,124,231, 10,214,132, 24,199,164,162, 15,137, 86,
+ 72,220,220,219,227,230,222, 30,115, 45,116,173,174,131,107, 62,250,137,100,162, 36,182,219, 13,183,246,118,248,252, 7,159,178,
+179, 88,161,189, 49,135,136,105,164,181,153, 60, 77,238,229, 15,209,225, 54,109,198, 66, 70, 84,153,166, 29, 66, 18, 47,106, 12,
+250,220,217,234,165, 43,135, 27, 72,107,190,163, 34, 49, 77,145,221,213, 14, 11, 11, 84, 25, 85,117,247,170,122, 46,149,185, 94,
+ 50,111, 59,109, 46, 92,108, 46,216,172, 43, 23,103, 27,230,178,165,246,198,118, 91,120,253,238, 13,207, 62,249, 8,116,102, 25,
+ 97,182,128,133, 68,154, 12,102,239,254,187, 37, 23,206,153,143, 84,139, 22, 22,113,137, 6,227,232,253, 27,206, 15, 79, 80, 43,
+ 60,251,248, 30,127,250,163, 47,249,236,211,143,168,210, 57,219, 28,242,230,249, 17,207, 95,188,226,245,203, 99,222, 29,188,167,
+206,202,249,153,175,107, 52, 68,246,196, 71,140,175, 78,103,222,189, 57, 68, 21,166, 69, 30,123, 34,187, 22,186,244,246,189,231,
+127,208, 51,137, 83, 34,154, 81,139,142,156, 5,103,203,187,176,110, 20,169,234, 9,136, 14, 72, 1,186, 31,110, 72, 64,187, 50,
+237, 46, 71, 23,220,153, 38,223,125, 54, 81,164, 5, 66,111, 88,223, 80,234,150,139,205, 37,251,201,199,221, 86, 59, 58, 69, 74,
+131, 88, 60,129,171, 53,231, 38, 36, 34,183,246,118,185,245,232, 62,243, 60,115,112,124,196,209,187, 45,165, 54, 62,120,120,131,
+251,143, 30,242,151,191,252, 53,171,213, 10, 9, 19,203, 4, 55, 86,187,180,176,164,190, 86, 31,187,214,202,108,129,108, 11, 76,
+214,254,236,171,127,183, 26,213, 35,100,147, 67,116,130, 69,214,235,194,251, 55,175,217, 92,158, 95, 31,134, 18, 3,189, 20,162,
+ 5,100,225, 7,143, 26,180, 90,252, 2,145, 54,120,218, 51,155,141, 63,189, 69, 43,148, 74,183, 74,235,243, 72, 98,100, 76,179,
+ 6,227, 34, 24,223,190, 58,225,213,193,223, 18, 2,164, 69,162,215,206,155,131, 1,186, 25,147,175, 56,212,211,155,170, 36,203,
+228,133, 7, 45,181, 6,155,205,204,237,125, 99, 38, 51,215,130,138,114,177,217,208,204, 56,186,156,249,199,111,222,115,243,238,
+ 63, 50,207,194,148,133, 56, 53,127,125,243,102, 20,107,145, 24,156,159,222, 76, 9,221, 3, 88,122,129,148,160,197,177, 54, 88,
+ 23, 31, 57, 7, 7, 28,245, 10, 65, 60,194, 53, 72, 34, 37,165,170,123,200, 67, 80,122, 15, 4,117,117,248, 50, 70,146, 84,108,
+130,106,145,208, 11, 50, 67, 17,199,194,250,250, 58, 97,189,250, 5,210, 10, 21, 67, 19,108, 55,141,101, 88, 18,146,175, 58,139,
+ 25,105,146, 33,118,118,251, 44, 42, 3,190,210,253, 78, 8, 6,213,207, 85, 33, 58,148,174, 43,219, 50,123,110, 60,129,104,222,
+ 20, 20, 51,255,158, 7,176,224,118,190, 60,160, 43, 98,226, 72,228,209, 57, 71, 17,114,202, 52,107,152, 54, 23,111, 91,101, 10,
+145,174,141, 41,249,247, 29,237,204,120,243,167, 6, 86,202,160,181, 57,190,150,216, 9, 54,210,198, 66, 35,132,136,149,193,137,
+ 8, 35,110,220, 60,223, 32, 52, 47, 30, 6,176, 16,105, 70,235,176, 8,114, 29,128, 22,131,255, 46, 27,211, 16, 27,107,198, 16,
+109,104, 9,124,154,171,226,223,183, 78, 39,152, 11,233,132,129,125, 9, 50,130,185,100, 60,223,131, 30,163, 14,100, 51,115,184,
+ 78, 8,153, 64,165, 42,164, 52, 13,238,130,187,188,170,205,152,101,210,148,211, 53, 65, 76,162,145, 36,186,215,188,186, 21,202,
+ 35, 29,135,244,205,240, 39, 77, 28, 81, 42,193,223,168,124, 37, 38, 11,120,247, 27, 92, 8,208,171, 91,116,166,156, 60,180,195,
+209,101, 88,136, 94, 65,170,251,221, 37,248,151,199,205,244,174, 42, 84, 4,137,145,116, 53,118,144,224,225, 6,201,109,110,125,
+ 28,118, 58,210,204,174,252,244, 78,236, 50,166, 36, 16,197,173, 77, 87,244, 58,241,241, 83, 10,238, 19,141,209, 83,136,252,146,
+ 31,190,120,186,115,134,211, 68,186, 50, 3,180,161,142,183,200, 98,202,222, 77,137,250, 67,150,253,181,182,222,145, 58,118,111,
+163,194, 18,235, 52,137,216,172, 30, 7,155,147,191, 86,153, 60,213,203,130,143, 83, 71,240,202,148, 4, 26,156, 28, 29,177,221,
+110, 73,121, 49,108,118, 78,226, 51,113,213,187,116,229,178,156,123, 76, 97,200,164,232, 22,149,170,149, 82,188, 67, 55, 11, 4,
+190, 7,240,244,238,159, 35, 24, 33, 9,203,157, 37,211, 98,193,118,222,178,221,206,148,174, 94, 33,170, 33, 41, 16, 82,160,213,
+153,189,157, 37, 31,125,250, 9, 55,119,110,248,197,143, 82,187,191,239,116,232,165,145, 87,201,133, 78,132, 17,222, 80,135,229,
+ 78,233, 51,144, 19, 49, 76,244,114,137, 36,136, 53, 80,164,248, 26, 41,249,225, 48,205, 66,223,129,139,214, 28, 18,163, 30, 95,
+184,147, 50,139,165,176,220, 91, 16,250, 68,138,193, 81,148, 93, 41, 27, 69,181, 81, 74,101, 59, 55,106, 45, 14, 29, 34, 19,243,
+ 2,237, 51,211,232,112, 52, 85,122, 80,122,117,122, 97, 87,163, 39,255, 98, 93, 92,158,240,230,237,107,202,118,205,221, 7,187,
+252,201,143,191,224,233, 7, 79,184,183,191,224,229,235,215, 28,157, 93,112,124,252,150,151,191, 59,230,253,201,134,139,205,154,
+205,122, 38,196,204,122, 91,169,189, 33,221, 59,140,222, 59,111,223,156,250,184, 49, 45,156, 15, 80,219, 16,133,126,239, 83,151,
+ 1, 3, 82, 51, 82,136,104,113, 20,230,213, 84,170,142,188,234, 41, 39,239, 54,209,161, 52, 30, 41,133,221, 15, 12, 53,151,218,
+160,234,191, 15,119,142,244,230,154,136, 94, 28,208, 19, 36,178,202, 11, 38,113,187,141,213, 70,195,147,190, 68, 33,139, 57, 7,
+ 91,113, 53,118, 74,220,190,181,207,141,219,183, 60,239,249,252,146,157,197,130, 47,255,236, 75,126,243,207,240,219, 23,239, 57,
+ 88,119, 22,121,197, 78, 90,113,190, 94,115,161,153, 60,173,120,124,119,159, 95,125,189, 37,247, 72,154, 18, 76, 66, 91, 55,176,
+192, 86, 11,180,128, 36, 63,180,187, 5,178, 4,106, 54,222,191,125,195, 63,125,253, 27,108,158,137,217, 29, 29,115,117,186, 92,
+ 16,161,170,210,202,214, 69,158,113,216,137,112,116,116,143,238,244,176,205, 6,137,110,169,181, 40,244,210, 8, 33,249, 94,146,
+ 48, 38,117,238,116,137, 67,196,187,187,187, 67,179,206,209,217, 57, 71,167,107,223, 75, 6,215, 11,140, 22,206,215, 67,106,174,
+248,174, 67,148,106, 74,221, 20, 46,215,231,164,229, 2, 93, 87,106,245, 17,100,110,129,237,220,248,221,251, 99, 30,127,247,134,
+128,114,247,209,167,252,201, 31,253,152,119,255,233,215,204,165,147,178, 43,206,105,130,180,230, 90, 6, 81,102,221, 16,131, 16,
+101, 98,219,252,210, 10,209, 40,173, 66,117,196,105, 90,152,123,211, 45, 17,233, 20,109,238,151,150,136, 21,131,169,210, 69,188,
+176,178,206,166,155,235, 68, 48, 52,122, 96,151,153,121, 32, 81, 53,135, 53,153, 95, 78,168, 55, 87,193,154, 35,104,163,145,241,
+187,161,217,150, 94, 51,193,250, 0,139, 13, 79,188, 69, 50,193, 65,114,173,248,239,202,209, 27, 54,109,100,240,232, 99, 11,228,
+180,164, 7, 31,137, 47, 82,164, 79, 25, 9,153,214,103,135,182,196, 78,159,135, 86,196, 58, 83,152,124,165, 16,157,222,167,227,
+245,105, 52, 66, 95, 64,223,140, 48,166,171,239, 87, 98, 10, 13, 22, 75, 58,141, 86, 7, 27, 37,249,189, 21, 67,192,130, 83,240,
+250, 80,107,215,226,128,165,148,196,249, 4, 8, 21, 31,189,199,241,157, 37,121,130,105, 28,123,114,233,120,241,163,254, 44,132,
+152,209,226,239,135,133,238,150,186,170,132, 60,194,202,204,245, 0,134,141,187,210, 41,165,140, 12, 17,223,233,123,147,234, 23,
+117,244,212, 75,191,245,253, 46, 18, 87,243,135, 24,208, 90,208, 14, 51,190,122,179,110,180, 94,137, 31, 60,121,248,211, 16,130,
+179,200, 7, 43,125,146, 72,140, 54, 50,214,125, 39,236, 73, 97,174,126,215,107,141,188,143,237, 85,100,192, 94,124,111,226, 34,
+243, 56,140,241,190, 23, 39,142,102,121, 80,219, 2,190,219, 38,197,239,119,226, 35,192, 32, 12,118,176,143,186, 7,138,112, 84,
+ 56,170, 62,238,182,145, 4,110, 64,235,230, 20, 38,174, 30,198,224,135,155, 94, 13,173, 93,196, 54, 68,134,215,136, 85, 69, 71,
+120,135, 31,184,138,177,154,226, 16,116, 76, 64, 96, 18,163, 53, 29,254,204,140,226, 9, 94, 59, 83,118,204,172,185, 13, 37,249,
+164,206, 59,156,156,198, 84, 66, 9, 57,195,232,176, 99,134,168,201,171,213,144, 61,197,103,116,189, 33, 56, 46,247,228,226,148,
+231, 47,222, 80,198,207,137, 33, 32,164,161, 50, 55,162, 36, 68, 34,203,189, 93, 62,251,244, 41,155,203, 11,230, 82, 80,243,204,
+115,237, 46, 40,116, 18, 19,195,101,224,107,138,213, 98,201,238,106,193, 34, 77,228, 52,177,153,103, 15,231,168,109,136, 63,198,
+151, 98,140,135,247,247,246,249,193,151, 95,112,235,214,174,115,171,195, 24,139, 13,109, 66, 72, 48, 77, 1,137, 19, 65,132, 69,
+ 22, 22,209,195, 85, 8, 94, 38,171,186, 13,144, 86, 92,200,178,173,148,160,196,180, 24,228, 47,231,248,231, 28,233, 10,117, 91,
+124, 71,103,145, 90,175,104,108, 35,123,186, 42,235,186,101,189,153,209,218, 73, 4,114,154,200,147,176,179,187,100,218,217,197,
+146,142, 73,142,161, 73, 64, 58,165,109,233, 10,189,141,169, 77,240,247,176,215,153,195,247,239,120,251,246, 53,214, 58, 31,124,
+240,128, 31,125,246,132, 39,247,238, 97, 65, 57, 60, 58,229,155,231,111,248,237, 63, 63,231,235, 95,191,228,221,241, 57,151,151,
+ 27,234,218,197, 53,189, 22, 90,245, 4, 49,134,168,235,252,108, 30,157,160,199, 65,234,176,171, 13, 93, 11, 58, 68,158, 97,120,
+ 39, 83,156,188, 75,163, 12, 90, 30,180,238,225, 54, 62,253,234,126,152, 95, 89, 49,245,191, 85,157,186,156,215,204, 15,180, 15,
+ 63,120,202,195, 15, 31,208,170, 23, 70,214, 6,241, 49, 71, 52,185, 3,225,213,239,126,207, 92, 46,217,219,221, 39, 69, 72, 83,
+230,246,157,219,236,223,184,193,238,206,130,148, 2, 41, 76, 60,120,240,144,189,253, 61,150,203, 37,155,237,153,135,117,244,198,
+159,253,233,231,252,235,127,249, 99,126,253,143, 95,243,250,229, 1,111,222,189,101,110,107,132,202,235,215,175, 57, 61, 63, 33,
+ 10,108, 6,201,177, 26,208,157, 21,222,205,167, 63,102, 5, 13,133,160, 70, 32, 82,154, 79, 39,222,188,250,142,163,247,111,137,
+ 41, 59,224,232,106, 42,193, 8, 95, 25,223,103, 9, 54,132,142,205, 15, 56,145, 49, 97, 26,194, 36,171, 99,119, 89, 17, 83,210,
+208,164, 4, 92,212,100,195,203,174,138,187, 57, 22, 75,126,240,233, 99,254,252, 39, 95,113,112,180,230,232,228,140, 56,214, 89,
+170,221,167, 8, 81,198, 72,246,138, 94,232,150,203, 40,208,212,184,121,251, 22,189, 42,165,108, 89, 78, 25, 11,137,121,179, 33,
+ 50,177,179,152,216, 93,116,226, 98,129,234,146,111,191,123,193,220,221, 13,209, 90,103, 46, 74, 76,110, 57,108, 29, 66,118, 36,
+104, 47, 46,105,106,214,105, 10, 42,126,192,196,225,138, 16, 38,186, 56, 69,207,146,147, 59,181, 86,178,186, 86,199, 5, 91,126,
+ 89, 89, 31,251,216,224, 54,219, 86,189,136,204,196, 49,229, 16, 90,173,174, 59, 0,212, 26,145, 4,137, 49, 78, 22,230,238,162,
+211,148,134,206,195,198, 25, 51,156, 53, 17, 27,252,244,224,205,105, 28,206, 40, 53,202,240, 94, 7,247, 2,121, 48,214,240,105,
+ 95, 77,205,164,123, 62,195, 21, 7, 37,139,143,251,175,144,102, 82,125,245,192,176,174, 90,247, 3, 93, 71,123,103,131,186, 86,
+205,191, 63, 50,146, 58,175,162, 99,137,248, 4, 49,164,161,100, 31,196,205, 16,137, 9, 66, 28,142,151,101,246,207,192,188,166,
+115, 33,162, 91, 79,227,176, 5,171,185,139,160,117,255,243,197, 48,194,181, 2, 87,139,210, 97, 55, 27,106,252,232,211,239,126,
+ 69, 33, 21,103, 80,136,233, 88, 53,140, 29,122,184, 34,124,250,138, 88,213, 32,250,250, 54, 6, 29,172, 16,220, 74,173,230,147,
+ 39, 17, 44, 5,114,200,244,174,196, 71, 15,239,254, 52,132,116,189, 31, 13, 34, 99, 95,235,227,135,156, 93, 12,150,134, 36, 55,
+135,232, 25,187, 38,228, 44,164, 33,252, 9,146, 33, 8, 57, 48, 50,199,251,247, 66,177, 96, 67, 72,231, 85,160, 68, 39,101, 37,
+146,119,239,138, 63,189,209,198,126, 79,135, 7,211,199, 94, 87,231,151, 12,235, 91, 12, 35,215,124,140, 66,162,248,133, 23,174,
+119, 20,134,225,182,183,104, 87, 98, 46,187, 86,235,135, 48,248,207, 10, 41, 37, 31, 7,171, 34, 41,123,215, 52, 86, 10,225, 90,
+185, 31,134,125,220, 19,200, 2, 66,206, 17, 73, 78,251, 82,243,206, 32,192, 16, 7, 14,237, 64, 8, 36,113,192, 8, 18, 73, 41,
+147, 70,151, 72,116,225, 91,104,145,144, 2, 41,123,140,233,203, 23, 47,120,127,188, 33, 7, 87,198, 42, 78, 52,242, 11,222,173,
+108, 57, 46,185,255,225, 83,246, 86,153,131,131,247,180,238,221,106, 99,248, 44,199,123,165,227,240,239,173,177, 88,237,242,233,
+ 71, 79, 73,162,180,106,148,222,188,106, 52, 70,242, 83,191, 38,226,165, 36,220,127,112,159,143,159,125,196,254,254, 98,240,134,
+ 59, 70,119, 81,158, 8,139, 24,145,144, 8, 22, 89,166,204, 32,241,146,162, 34,221, 85,150, 17,195,121, 0, 0, 32, 0, 73, 68,
+ 65, 84, 81, 53, 14,101,107,107,244,106,212,222, 33, 39, 31, 55,141,209,102, 88, 64,102,120, 64,107, 39,238,184,182,195,196,181,
+ 27,105, 74,172,210,130,222, 58, 51, 91,130, 6,106, 51, 98,134,162,176,169,157,106,174, 2,183, 40,244,173, 39,239,165,168,244,
+217, 19,204,226, 78,134,117, 35, 36,119, 66,104, 23, 46,214,151,188,120,241,156,227,195,119,164,148,120,252,248, 30,207, 62,188,
+ 77,154,150, 92, 94,108, 56, 59, 59,230,159,190, 61,226,229,139,119, 28,159, 92,114,185,105,148,109,119, 10, 97,239, 72, 8,212,
+185,146,162,211,214, 74,113,139,228,200, 58, 28,202,213,177,186, 26,244,168, 97,226, 28,194,184, 43,185,156,103, 9,228,148,136,
+ 18,168,213,201, 87,134, 67, 55,180,251,116,203,139,231,241,124,143,113,190,224,251,197, 48, 70,118, 31,126,244,148,221,188,235,
+192,163,156, 40, 24, 49, 47,252,155,160,149,180, 90,160, 58,243,201, 71,159,242,217, 23, 95,240,236,222, 67,238,223,127,194, 71,
+159,125,193,141,253, 91,236,173,110, 34, 18, 88,237,237,176,123,107,207,211,173, 4,118,151, 59,220,188,125,159,203,205, 37, 39,
+103,149,255,254,223,252, 5, 95,125,246, 33,255,252,205,119,252,230,235,127,230,243, 79, 62,227,243, 47,127,204,102, 19,249,235,
+159,255, 21,173,117,110,223,121,132, 76,129,216,133, 82,182, 46,172,138, 99,189, 35,197,103,142,234, 34,185, 56,172,175,111,223,
+188,229,236,236, 4,137,129,218,113,177,173, 65, 27,103,132,136, 79, 36,174, 10, 37, 29,151, 87,111, 3,113,109,206,144,240,226,
+215,190, 63, 0,211,228, 7, 72, 47,174, 6,113,201,182,139,103, 85, 57, 59, 95,243,238,240,148,109,237,188, 59, 60, 99,189,217,
+248,119,118, 16, 7,175,224, 85, 30,131, 49,118,252,189,141,243,201, 51,198,151, 97,201, 34, 79,172, 55, 23, 35, 74, 26, 54,181,
+178,156,150,220,216,223,229,230,221,125, 98, 16,190,254,250, 27,222, 28, 28,210,106,244,104,229,170, 16,157,205, 16,136, 4, 51,
+ 84, 20,107,117,116,123, 74,235,149,208,187, 79, 15,134,208, 77,212,249, 32, 34,157,201,140, 74, 0,139, 46, 84, 85,255,238,244,
+110,200, 20,189,166,174, 51,178,136,116,137, 80,189,251,116,104,138, 39,138,185,141,202, 65, 52,134, 39,198, 49, 10,169,201,160,
+ 89,164,106,247, 53, 94,115,125,129, 12, 17,107,183,113,166,171,167,190,105,215,161,255,240,130, 61,154, 79, 23, 66, 31, 73,154,
+ 58,146, 9,135,173, 59,117, 15, 48, 49,117,253,149, 74,245,115,184, 27, 57, 64,193,133,207,166, 66, 27,201,158,100, 25, 58, 41,
+127,143,212, 6, 0, 12,189,126, 93,173,251,179, 50, 69, 95,121,169, 8, 22, 59, 29,165,107, 24, 12, 18,183,210,198,232,147,199,
+ 48,114, 53,162,184,208, 91,134,106, 61, 5,223,249,143,173,215, 40,166, 71,180,182,186,125, 45, 40,232,120, 46,186,186, 29, 55,
+ 17,220,245,131, 79, 86,204,220, 97, 0,110,125,182,232, 13,160,168, 12,138,157,235,166, 66, 12,184,214,239, 74, 31, 31,104,125,
+252,204,225, 46, 98,196, 45,187, 39,219,241,197, 34, 66,188,113,107,239,167,243,118,166,110,103,230,178,101, 91, 42,219,185,186,
+ 98, 15,175, 52,100, 36,203,132, 32,126, 49, 77,233, 90,204, 48, 45, 18, 41, 77, 44,242,130,197, 40, 0,124,239,235,213, 68,140,
+ 30, 7,153,226,184, 34, 7,173,205,212, 71, 33,150,252, 66,116,101,188, 17, 76,137,230, 16, 16,141, 35,237, 39,184,103, 29, 13,
+ 99, 13,224, 15,146,118, 87,204, 94, 69,143,146,133,160, 94, 81,129,179,205,221,255,238, 73, 86,190,171,247,226, 68,213,223,139,
+ 62, 68,108, 46, 8,154,152,166,137,197,120, 64, 21, 27, 44,120, 23, 50,137,137,167, 37,198,232, 97,246,193,223,224,100,208,131,
+ 16, 82, 32,146,200,203,137,197,238,138,189,157, 29,143, 44, 12,145,180,200,254, 97,198, 65,239, 19, 37,165,232, 36, 49, 20,137,
+194,229,229,154, 87, 47,222, 48,143, 47,157, 4,207,215,205, 57, 17, 83, 30,163,230,198, 20, 19,189, 52,222,191, 63,166,245, 70,
+109,149, 86,170, 31, 96,100, 66, 8,131,252, 54, 56,194, 49,243,217, 39,159,241,201,135, 31,112,122,114,204,241,229,197, 8,167,
+105,244, 62, 32, 12,230,222,208,219,119,110,241,209, 71, 31,240,225,179,167,228,156,177, 86,168,221, 71,167, 98,230,168, 73, 22,
+ 44, 86,113,248,215, 23,132,165, 14, 21,183,143,132, 91,183,107, 78,126, 25,100,187,176,240, 3,112,154, 38,168,141,190, 45,254,
+190,103,163, 84, 88,152, 19, 6, 93,183,225,236,227, 62, 37, 22,198,112, 10, 8,181, 85,122,141,254,108,150,234,218,134, 20,152,
+154,171,230, 67, 16,114, 78, 44,131, 31,120, 1, 87, 0,247, 25,164, 87, 90,168,108,186,242,254,253, 1, 47,190,251,142,245,229,
+ 41,251, 55,119,185,119,255, 22, 55,118, 92,124,178, 89, 55, 14, 15, 79,121,245,250,136,231,175,143, 56, 60, 60,101,189, 25,150,
+159,218,152,107, 37, 70,231,235,107, 11,212, 1,177,104,117,118, 71, 64,112, 1, 91, 24, 30,252,136, 23,119,138,251,139, 51,110,
+207,188, 74,112,186,218,187,153,186,194,223,221, 19, 12,111, 52, 67,244, 52,162,117,213,191, 31,225,218,238,226,211, 59, 51, 47,
+196,159, 60,253, 8,201,137, 44,209, 99, 74,131,176,191,152,136, 57, 51,207, 91, 98,217,186,102,165, 41, 71,199,135,156,109,103,
+ 34, 66, 52, 79, 46,204,217,145,167, 0,139,180, 66,181,147, 45,178, 90,253,255, 84,189, 89,179,101,217,117,157,247,205,213,236,
+125,154,123,111,246,153,149, 89,149,213,163, 0, 1, 32, 77, 5,101,218, 18,237, 8,203,150,195, 86, 4,195,244, 79,194,223, 81,
+132, 95, 28,126,115,132, 27, 89,242, 3, 3,148, 68,152, 36, 72, 11, 64, 53, 89,168,204,170,236,111,115,206,217,123,175,102,250,
+ 97,206,115,147,126, 66, 1, 72, 36,238, 61,205, 94,107,142, 57,198, 55,214,204,125, 97, 60,219, 80, 84, 89,246,149,255,238,159,
+255,103,252,250,203, 39, 60,249,246, 57,143, 31,190,199,221,251,239,241,241,195,219,220, 60, 91,113,227,206, 35,134,237,138, 48,
+ 9, 61, 68,163,139,149,163,139,221,253, 24,101, 66, 37,160, 13,115, 12, 15,208,150,153,231, 63,252, 64, 80, 33,134, 68,239,213,
+ 47,244,150,138,209,238,149,195, 88, 42,195,228,204, 2, 33, 26, 23,254,232,182,238,248,170,207, 38,236,186, 52,119, 92,119, 22,
+231,237,219, 36, 27,124,106, 74, 28,166,153, 31, 94,188,226,176,219, 95,151,249,104,247,135,183,119,146,103,177,110,243, 20,227,
+245,129,213, 20, 95,117, 52,198, 60,112,168,197,113,213,217, 92,248, 57, 17, 55,198,164, 80, 26,245,176,227,229,121,101, 58,242,
+191, 59, 70,135,171, 66, 81,107, 39,236,158,139, 87, 53,133, 34,123,175, 69, 80,143, 17,143,206,182, 72, 22,129, 43,170, 72, 52,
+216, 75,148, 78,139, 70, 86, 67, 18, 90,204,196,220,187, 51, 41, 90, 35,186,159, 33,198, 76, 20,175, 0,214,106, 10, 99,183,105,
+182,249,128,148,174, 75,175, 26,181, 26, 82,183, 5,177, 52,129,151,145, 72,196, 58,205, 37,218,119, 87,132, 94,237, 66,170,162,
+144, 44,193,100,222, 39,243, 79, 73,176, 42,100,237,198,140,192,169,163,201, 1, 53,213, 39,124,155,226,109, 45,216, 90, 49, 87,
+122,192, 7,181, 98, 20,182, 32,134,151,237,141,230, 43, 36,106, 55, 40,144, 39,147, 8,199,250,112,219,165, 71,204, 96,232,133,
+161,246, 28,244,169, 28, 95, 55,119,245,110,235, 96,151,203, 36,246,187,171,127, 23,155, 63,115,142,170, 18,106,150,185, 16,130,
+ 49, 0,143,118, 53, 81, 87, 65, 13,104,166, 14,218, 50,244,178,186, 2,101,190, 3,179,114,188,107, 46, 13, 30,107, 19, 87,119,
+ 37,152,220, 79,169,190,195,119,137, 28, 69,212, 86,175,241,206,237, 27,191, 8,189, 27, 55, 91, 58,218, 76, 86,234,117,166,181,
+ 98, 38,134,165, 82,107, 99,105,141, 82, 43,165,116, 74,183, 93,116,109,226,191,136,237, 0, 82,202,246,195,135,196,144, 71, 35,
+ 8,165, 68, 14, 22,227,176, 91,108, 36,199, 76,204, 6,166,183, 40,155,185,125, 91,179, 3, 78,213, 37, 84,123, 71,108,175, 30,
+236, 96,104, 88, 9,130, 65,244,195,241,249,102, 83,190,120,218,190, 91,230,176,105,243,226, 20,251, 67, 71,248,138, 98, 42, 68,
+120,215, 68,105,111, 70, 54,158,111, 45,213, 46, 12,110, 82, 16, 73,164,156, 9,254,207,155,205,138,152,173,122,116,149,182,172,
+ 86, 25,141,129,117, 62, 97, 56, 73, 16, 35,245, 48,115,113,113,224,114,223,174, 47, 18, 61,192,184, 90, 25,201,204, 60, 78, 44,
+181,160, 13, 94,255,240,146,239, 95,190, 65,162,151,107,132, 64,204,129, 60,100,155, 42,106,103,119,216,147, 98,180,178, 1,237,
+244, 50,115,152, 23,154,196,107,212,175,122, 59,219, 17, 95,123,247,189,247,248,252,211,143,129,200,184,222,178,223,159,115,121,
+113,105,151, 43, 53,131,210,217,217, 41,239,127,244, 62,159, 60,254,128,245,106, 36, 54,101, 46,147,101,241, 91, 96, 16,187, 40,
+228, 60, 48,108, 87,244, 90,189, 77, 74,144,106, 15,221, 30, 18, 26,173,221, 78,114, 34, 69,199, 10,167, 72,104,238,152,111,205,
+ 11, 42,132,213,152,136, 49, 27, 45, 43,218, 42, 38,164, 12,139, 80,154,237,239,123,181, 44,185,101, 80,124, 23,152, 35, 73, 50,
+ 42,145,208,141, 76,117, 92, 29,109, 82,164, 84,163, 82, 5, 1,230,198,178, 76, 44,190,122,249,225,233, 51,126,255,236,123, 74,
+ 91,216,110, 54,220, 60,221,176, 26, 7,154, 86,230,253,194,197,249,142,243,171, 75, 94, 94,236,216, 95,238,205,252,233,123,241,
+165,218,229, 38,196,104, 70,203, 86,125, 10,234,118,184,240,142,200,136, 95, 98, 69,109, 93,149,130,137,141,197,241,148,105, 72,
+ 86,164,210,173,203,189,107,119,170,223,113,250,179, 67, 61,116, 51,155, 40,238,118, 23,241,138,228, 96,166, 28, 55,207,125,242,
+233,103,220,121,240,128, 49, 14,196, 65,209, 48,216, 23,165,207, 92,190,121,201,139,167,223,115,216, 93, 82, 91, 97, 59,172,201,
+ 39, 43, 86, 97,100,125, 50,144,135, 53, 57, 25, 2, 57,133, 21, 33, 36,139,135,213, 74, 15,157,101,174,182, 75, 68, 89, 13,129,
+239,190,123,201,131, 15,110,243,193,251,247,248,187,223, 62, 67,180,113,239,238, 35,238,110,224,193,123, 15,152,218,202,246,129,
+173,209,162,241,213,135, 16,168, 75, 53, 38,133,211,228,162, 26,240, 74, 68,208,182,176,217,110,121,115,121,193,180,187,178,103,
+136,218,165, 93,123,247, 85,153, 15, 6,106, 4,178,166,238, 70,247,164, 64, 16, 91, 7, 90, 94,216,113,213, 40,181,204, 6, 53,
+233, 22,213, 21, 95, 37,198,144,188, 97,207,118,156, 57, 88,149,173,237, 73,109,205,102, 55, 4, 91, 9, 90, 74, 33,154,113, 81,
+196,163,176, 70,171, 44, 75, 97,154,247, 14, 12,202,228,156, 41,109,177,130,165,144,208, 5,186, 70, 94,190, 61,103,119, 48,104,
+ 75,136,129,222, 26, 34,217,218, 33,219,132,198, 68,142,221, 94,171,166, 72, 22,250,226,113,191,152, 77, 74,246, 53, 76,104,150,
+130,232, 1, 66, 41, 4,146, 81, 24, 99, 2,245,127, 86,123,182, 43,118,241, 35,184,242, 81, 27,205,135,156,227,250, 43,103, 75,
+ 17, 53,235,105,162, 22, 43, 49,169,221,158,201,173,129,132, 78, 19, 8,189, 89, 21,113,239, 4,245,195, 6, 39,141,170, 37,166,
+162, 68,135,127, 90, 41,146,205, 52,102,222, 13, 57, 94,203,247, 41, 37, 42, 70,187, 11, 21,138, 67,167,212,191, 47,141, 78,243,
+166, 69,179,111,217,103, 3,191,248,138,163,200,143,171,216,160,216,251,228,159,177,163, 26,166,106,123,240,224,127, 86, 85,140,
+ 82,167, 92, 27,174, 43,174, 4, 35,148,230, 75,155, 0, 89,176, 53, 81,116, 21, 96, 94,236,239,141,199,203,130,122,198,191, 57,
+165,206,158,195,205,155, 51,113, 67,171,247,210,218,115,161, 70, 83, 3,180,217,170,214, 91, 59,205,220,109, 3,170,136, 85,188,
+210,252,194,234,207,108,146,181,127,198, 28,174,137,148,131, 36,150,218, 72,203,212,140, 82,230,199,106, 78,106, 5, 42,189,123,
+ 14, 92,209,104,163,125, 95,204,249, 45, 78,114, 11,142, 84, 59, 36, 99,173, 7,201,132, 33,146,180, 81,154,144, 87,107, 70, 91,
+198,219,131, 62,153,196,159,106, 32, 15,195,245,164,220,164, 24,166, 82, 27, 37, 68, 74,135,144,149, 49, 25, 92,192, 26,119, 76,
+122,215, 96,114,251,177,196,195,140,114,157, 20, 65,107,179, 91,175, 88, 89,125,245, 72, 87, 20, 3,221, 52,154, 65,246,147,137,
+ 76, 71, 87,126,208, 78,143,230,224,108,161,250,244,108, 46,202, 30, 32,198,193, 32, 14,201, 88,219, 42, 66,105,176, 76,197,118,
+151,253, 64,109, 11,243, 82,233,101,225,234,112,224,106, 42, 44,135, 3,181,204,246, 80,143, 35,195,106,197,106,179,225,228,116,
+203,102,220,112,231,193,125, 54,163,146, 10,148,174,206,249,182,203, 75,112,174,190, 68, 43,159, 65,132,245,118, 77, 63,114,245,
+181,210, 75,227, 48,205,148, 90,236, 65, 38,234,209,195,232,217,111, 32,193,126,127,224,245,249, 5,103,235, 21, 26,133,143, 63,
+254, 20,209,223,240,242,205, 21,119,239, 62,224,236,228,132,155,103, 39,172, 78, 87,180,226,238,253,208,223,197,171,114,164,134,
+192, 16,237, 0, 43,211,204,102, 12,206,142,183, 78,240,106,128, 2, 82, 22, 86, 67,224,224,114, 89,247,200,210, 24, 86, 4, 45,
+214, 11,156,215,196,184,102, 46,123, 6,148,144, 71,148, 66,172, 21, 77,182,198,233,197, 34,134,173, 69, 99,111,163,132, 56, 88,
+195,209,210, 33, 41, 81,186,253,108, 93,233,154, 48,204,245, 66,205,208, 14,205,162,118,173, 16, 99,228, 48, 85,158, 63,253,142,
+ 55, 23, 23, 68, 85,242,176, 98,189,201, 40,202,213,110,103, 6,165,171,153,214, 59, 75,129,105,182,126,229, 94,187,229,148,109,
+183,130, 40,148,121, 54, 92,102,180,104, 76,237,139, 39, 39,108,202,241,238, 93,186,154,185,235,236,108,228,100, 51,242,242,249,
+ 57,218, 59, 99, 74,215,240,155, 35,220, 73,143,152,228,214,253,139,110, 12, 88, 21,147, 36, 77, 46,118, 47,137,243, 36,106,179,
+248,225,143, 62,253,130,207, 62,253, 49,173, 43, 63, 60,123,202,131,199,239, 83,175,246,188,126,251, 3,203,114,129,104,228,228,
+100,203,122, 60,229,244,244, 6,171,213, 17,244, 19, 24,214, 35, 45, 70, 78,243,138,185, 44,196,101, 38,164, 21, 75,155, 72,131,
+ 17,202,163, 10, 81,173,208,100,232,157,179,237, 41,255,250,223,254, 45,127,254, 47,254, 19,254,224, 39, 31,242,235,191,251, 61,
+111,119,133, 54, 77,220,189,125,131,147,141,114,177, 88,189,173,204,142,157, 78,230,161, 9,173, 17,219, 98, 42, 79, 20,150,194,
+117,255,130, 14,129,199,143, 62,224,111, 95,190,180, 75,142, 4,107,240, 82, 55, 96, 10,212,102,201,133, 64,180, 29,166, 4,180,
+ 47, 38, 79,122, 27,150, 25,138,178, 13, 29,101,246,149,156,213,245, 14,121, 96, 61, 38,166, 90,188,253,209, 36,207,168,182,206,
+105,106, 10, 83,144,232, 96,146,119,151, 4,241, 24,169,170, 82,123, 49,195,149, 42, 90, 23,135, 65, 37, 75, 19,228,234, 14,245,
+ 78,157,139,121, 64, 90,103,183, 44,148,182, 99,149,239, 80,166, 78, 74,234,235,160,153,189, 87, 44, 47,165,112,104,141,117,202,
+ 44, 46,243, 75, 72,118,177,243, 34,158, 42, 98, 50,125, 79,206, 32,247,238, 12, 96, 72,194,210,141,155,168,173,162, 43,203, 87,
+167,144,208,214, 72, 57,209,163, 80,131, 48,136, 41, 34,225, 24, 33,235,129, 40, 74,141,197,214,157,161, 91,190, 90,133, 62,153,
+202,106,220,122,227,105,116,233,150,155,215,234,205, 98,205,170,156,197,160, 55,170, 66, 95,140,179, 33, 61,120, 89, 76, 48, 47,
+ 78, 19,230,106,180, 56,154, 88,225, 18,213, 6,179,166,244, 94,168,106,205,101,221,171,137, 99, 12, 4,127, 93,213,135,183,214,
+ 13, 26, 19, 75,132, 49,218,179, 65,148, 34,230,112,239,199,237, 87, 13,164,228, 43,186,210, 8, 67, 50,162,228,210, 72, 99, 32,
+ 13,163, 39, 7,196, 27,218, 32, 5,203,142,183, 46, 44,154,104,209, 58, 28,186, 19, 84, 45, 13,213,188,162, 89, 72,132,235, 66,
+179,138,130, 38,130, 90,130, 39, 37,243, 4, 25,147,249,232,142, 47,102,110, 52, 61,132,118, 60,204,155, 80,163, 93, 78,162, 43,
+185, 29,195,245,138, 68,106,179, 72, 99, 12, 62,188, 98,175,117,177,211,144,248,224,238,141, 95,136, 90,198, 88,125,191, 80,107,
+ 51,135,179, 79,226,173,218, 95,218,163,213,110,102,137,190,224,247,224,191, 21,117, 91,252,166, 22,187,217,181, 70, 91, 22,230,
+102,109, 92,181,207,236,246, 51,211,178,152, 27,216,247, 32,165, 88,221,170, 6,163, 9,165, 28,145,176,178, 94,247,148,200, 67,
+242, 3, 46,146,194,177,137,205, 92,224,209, 39, 21, 28, 90,208,220,240,102, 45,236, 38,133, 70,130,213, 37,138, 16,162,129, 25,
+ 68,109,146, 82, 58, 73,163,187,249, 29,104,163, 70,109, 3,203,214,167, 56, 48,140,153,213, 38,147,135,200,144, 2, 63,124,255,
+ 3,191,253,234,247,188,120,249,150,139,243,115,158,191,124,201,171,215,231,236,118, 7,174,118,151,156, 95, 94, 81, 14, 11,173,
+ 89,211,142,121, 20, 76,254,139,173,112,249,230, 53,207, 95,189,228,106,233,172, 54, 39,228,152, 32,219,225,113,117,190, 55,230,
+189, 24, 6, 54,199,129,253, 97,199,220,149, 60,102,155,152, 91,161,148,153,195, 97, 98,174,139, 93,118,186, 37, 24, 66,200, 68,
+204,120, 39,222,244,181,236, 39, 74, 19,238,220,188,101,231,124,202,220, 56,189,201,237,219,183,184,251,240, 1,219,205,198, 12,
+ 65,222,160,135, 99, 75,135,117, 70,116,160,183, 5,180,217,197,102,136,150,177,116,114, 95,202, 66, 30,173, 99, 56,118, 83, 88,
+150,102, 92,230, 62,123,169, 65,181,106, 90, 29, 50, 12,145,158,236,178, 88,157,240,219,180, 81,171, 48,172, 70,131,204,180, 9,
+ 51,194,170,181,238,117,239,142, 22, 51,243,149,106,230,152,156, 7,186, 70,210, 24,145,212, 25,213,204, 83,211,174,210,155,103,
+103, 67,102,154,246,124,251,251,175,121,245,250, 13, 34,194, 48, 68,198,149, 25, 67, 75,179,252,244, 82, 42,115,105, 76, 75,101,
+169,166, 40,128, 53,192,117,237, 94,172,107,173, 72,173, 26, 56,162,183,238,189,247, 6,201,177, 41,178, 95,179,245,171,118, 90,
+169, 24,253, 81, 88, 74,183, 38, 45,239, 73, 56, 62,136,155, 90,252, 82,176,216,139,113,158, 77,166,195, 15,147, 16,205,192, 36,
+209,214, 30,173, 21,136,129,207,191,248, 49,159,125,246, 99, 68,149,231, 47,190,165,206, 51,135,233,138,221,229, 75, 86,121,224,
+244,228,140,147,237, 9,183,239,220,229,244,236, 6,163, 8, 11,194,201,118,205,230,230, 13, 78,238,221, 97,236, 29,141,131, 87,
+209, 22,139, 12,161, 12, 57, 19, 52, 17,194, 64, 12,129,185, 20, 22, 9,140, 41, 83, 74,227,230,221, 7,124,244,222, 77,126,249,
+215, 95,241,250,237, 91, 62,124,239, 46,127,242,199, 63, 33,172,132,111,159,190, 69,147, 53, 47, 90,245,103,112,242, 93, 68,195,
+ 64,144, 64, 21, 69, 66, 38, 4,155,158,106,239,220, 56,185,193,213,229, 5,231,231,111, 13, 91, 45,129, 36, 98,242,104, 53,194,
+161,118,155,222, 76,206,108,199,122, 65, 75,204, 56,210, 90,131, 69,165,212,110,212,164,144, 33, 25, 79, 98,189, 30,184,117,114,
+202,122, 28,174,177,205,174, 96,210,177, 75, 32, 57,209,171,248,100,239, 94,158, 33, 33,201,146, 40, 41,101,143,249,218,238, 56,
+ 39,119,158, 11,228,156, 57, 59, 61,229,234,176, 51,243,237,122, 69,115,137, 95,187,178, 90,159,250,202, 68,169, 49, 81,251, 98,
+235,196,218,161, 47,166,202, 89,216,140,156, 34, 73,188, 90, 53, 64,247, 70, 63,237,193,148,225,230, 81,212, 36,104,104,182,182,
+ 9, 56,169,206, 62,139,199,184,169,200,177,215,219,192, 76, 33, 37,139,129, 53,113,188,161, 56,226, 20,122,177,215, 58,250,202,
+163,131,119,119, 88,242,232, 58, 30,150,193, 66,238,130, 54,239, 31,239, 54, 92,136, 26,157,240,200,149,144,227,174,190,119, 74,
+179,157,180, 28,205,159,209, 10, 82,106,175,102,112, 86,165, 53, 65, 28,151,218,245,168, 94,249,247, 66,133, 65, 34,157, 70,164,
+211,186,120,124,179, 90,227,184,239,236, 69,156,175,160,246,140,239, 62,168,136, 8,161,185, 17, 51,225, 23, 55, 3, 65,213,165,
+251, 37,189, 83, 93,129, 39,218,180,222, 61,142,218,143,124,250,112, 92,147, 4,186,151,181, 4, 9,214,200, 22,154,179,219,142,
+ 21,192,118,105, 58, 54, 48,166, 96,234,135,186,225, 60, 74,176, 88,182,226,173,167,141,226, 24,109, 99,167,200,245,164,159, 13,
+ 51, 72,239,199,207, 70, 51, 31,131, 6,226,189, 59,183,127, 33,170, 84, 18,146, 50, 67,176,195, 50,250, 11,212,142,165, 39,110,
+128,232,254,144,171, 62, 99,116, 63,252,205, 8,100,110,238, 16,146, 31,246, 71,244,172, 57, 49,135, 36,164,222,160, 54, 14,243,
+194,180,204, 28, 14, 7,174, 14, 51,203,116, 96,127, 40,236,167,153,101, 54,154, 82, 13, 38,173,208, 20,201,129,152,147,247,253,
+ 90,255,121,148, 64,136,102, 36, 27,162, 51,114,187, 18,163,145,184,108, 33,233, 82, 87,176, 93,142, 73,215,239, 90,219,130, 87,
+180,166, 60,152, 89, 34,216, 58, 65,130, 50,228,129,156, 77, 18, 73,113, 69,107,149, 87, 47, 95,240,244,187,239,173, 69, 43, 70,
+ 90, 45, 44,211, 66, 41,197, 84,135, 14, 33, 39,134, 97, 96,187,222, 48,140, 3,113, 72,156,158,110,249,224,206, 9, 39,235,196,
+229,161, 48, 77,149,195,229, 57,175, 95, 95,146,214, 43,110,108, 54,188,122,250,130, 23,111, 46, 9,217,233,122,113, 96,189, 26,
+ 89,166,189, 91, 37, 76,130, 47,213, 14,244,226, 32, 19, 61, 22,242,136, 92,223,144, 81,163,249, 5,191,141,199,144, 56,187,117,
+195,138, 2,150,206,144,147, 97, 92, 49, 96,144,210,141,117, 45,150,205,215,118, 52, 6, 89,205,162,237,145,229, 26, 97, 24,188,
+110, 19, 79, 19,235, 98,104, 34,141,102,196,171,181, 17,197, 92,198,137, 64,233,141, 36, 16,226, 72,236, 64,175,100,212, 38,224,
+214,200, 41,217, 52,177,152,105,135, 56,144, 93,242,157,139, 27, 73,146, 66, 78,172,176, 66, 25,235,130,111,132,208,160, 8, 75,
+155,153, 14,149,185,152, 76, 22,135,200,238, 98,199, 87, 95,125,205,238,242,146,144,108, 37,176,202,150,157,157,166, 70,105, 11,
+101,169, 44, 75, 99,158, 11,197,110,179, 38,201,250,151,158,107,252,100,117, 40,209, 49, 67,218,253,224,117, 24,198, 63,128,179,
+244, 86,209,230, 12,135, 16, 41,222,213, 46, 94,240,160, 30, 67,107,189,154, 49,211,251, 6,244, 56, 5,136, 94,239,205, 77,189,
+180,194,147, 20, 2,235,117,166,169,242,163, 79,127,196,103, 95,124, 70, 90, 39,158,191,120, 77,189,122,203,122, 28,105,109,225,
+189,251,247, 57, 61, 61, 97,123,178,229,100,181, 37,110, 6,171, 86, 21, 24,242,150, 7,119,110,145,215,137,172,118,216,149,150,
+ 9,173,144, 66,181, 7, 89, 52, 3, 83,144,192, 24,130, 21,153, 40,228, 32, 28, 14,133,178, 40,111,119, 19,127,242, 71, 95,240,
+228,233,151,252,245, 95,253, 61,127,254, 47,255,148,255,225,127,252,111,121,117,222,248,238,249, 43,166,203, 61,218,173, 78,211,
+184,182,107,178, 55,229,229, 20, 77, 97,106, 46, 79,246,197,138, 99, 84, 56, 57,185,193,197,229, 57,187,253,206, 40,122,197, 34,
+142,193,190,184,206, 96,183, 97, 34,250,103,188,138,189,182, 71, 95,131, 93,202,204, 36, 23, 37,122,121,145, 82,171,178, 44,133,
+165, 26, 59,123, 53, 12,220, 60,221,208, 74, 97, 55, 77,244,110,135,157, 73,159,134,108,182,117,162, 93, 16, 66, 55,215,114,142,
+131,247, 43, 44,212, 86, 60,215,108, 28,254, 60, 36,182,155, 19,166,195,236,187,100, 37, 15, 17, 93, 26, 33,143,164,156,169, 90,
+168,125, 54,168, 14, 66,238,221, 14, 3,245,137, 54, 36,178,154, 1,178, 98, 7, 81, 67,137,213,214, 87, 68, 43, 3,145, 96,151,
+194,238, 89,106, 9,208,171, 90, 43, 32,150,248, 17,245,122,107,119,135,247,102,138,152,224,145,169,100, 64,174, 46,214, 58, 40,
+ 68,122, 53,179,114,196,134, 38,162,153, 87, 59,102,212,236,165,160, 89,136, 49, 18,186,210,155, 81, 57, 69,149,166,213, 46, 16,
+193, 19,129,189,217, 10, 69, 21,169,126, 7, 11,230,171,234, 98,147,184, 21,100,169, 53,187, 57,213, 82,212, 76,162, 67, 18, 47,
+209, 50,243,116,119,249, 90,213, 42,161,235,162, 52, 49, 21,150,110,236,143,166,225,122, 87, 45,193, 94, 83, 28, 50, 35,193, 36,
+108, 53,249,216, 59, 34,174, 87,211,230, 59,195,188, 25,173,155,242,219,151, 74, 84,115,237,215, 35, 66,219,245,222, 24,109,210,
+238,210,108,144, 12,129, 94,171, 69, 32, 37, 57, 70,199,108,239,221, 29,253,210, 45,106, 28, 7, 87,178,163, 94,247,150, 52, 12,
+ 54, 19,163, 87,109,119,177,203,156,116,211, 2,252, 92,141,120,146, 38,218,122, 69, 92,246,143,167,167,155, 95,180,218,232,205,
+160,254, 75,183,136,154, 89, 5,162,239,119,147, 85, 70,134,204,144,236,225,110,101, 39,209,205, 83, 86, 39, 34, 62, 45,214,222,
+168, 75,165, 19, 9,106, 73, 70,155,159, 59,115,183, 61, 73, 45,133, 82,109, 79,217,123, 35,116,165, 46, 11,165, 53,122, 93,104,
+173, 49, 47, 51,243,188,216, 65, 95, 27,243, 84,153,150,153,165,246,107,226, 79,147,227, 27,174, 72,138, 12, 49, 19, 83,102,200,
+ 86, 56,145, 7,147,168, 98, 20, 86,155,124, 68,236, 50, 12,201,234, 38,135,196,144,162,221,209,130,237,204, 36,192, 56,172, 65,
+224,205,249, 5,175, 95,191,229,245,243, 23,252,240,244,123,158,191,186,160,107,180, 86,181,186, 48, 47,139, 53, 3, 5,187,252,
+196, 49,179,221,110,216,108,206, 56,189,113,131,245,176, 97,115, 54,114,182, 93,145,164,243,230,114,225, 80,149,148, 51, 67,138,
+148,121,226,234,106,207, 50, 53,222,188,125,115,205, 12,136,193,147, 5,218, 25,134,108,194, 74,107, 44,243,204, 92,138,187,114,
+125,162,247,213,128,161, 86, 35, 99, 30,188,181,206,190,116, 49, 90,188,112,117,122,194,144,163, 89,118,196,110,193, 93, 22,170,
+199,143, 98,108, 22, 93,115,132,110, 41,157,160,141, 85,206,182, 59,170,194, 60, 21,123, 88,198,232,230, 15,231,184,247, 72,163,
+154, 19,182,219,205,191,247, 70,143,120,196,208,153,238, 78,189, 11, 40, 61,123,202,162, 65,149,198,220, 22,106, 21,234,210,209,
+184, 80,196,202, 68,114,198,219,204,204,213,222, 17,134, 4,105, 5,181, 26, 14,178,165,102, 57, 85, 1, 36,145, 99,230,237,155,
+215,124,253,229,239,216, 93,236,104, 10, 67, 78,140,233, 24,111, 18,235,132, 47,157, 86,139,237,197,107, 49,220,163,154, 90,213,
+154,183,171, 85, 51,238,136,154, 4,142,231,160,123, 63,186,174,237, 51, 85,187,119,162,123,251, 83,142,153,228,171, 45,219,193,
+ 31,213, 20,155,248,123,213,107,163,102,192,168, 85,215, 37, 63,222,192,103,208, 33,115,196,133,100,255,159,173, 42, 31, 63,254,
+152, 47,190,248, 17, 41, 7,246,251,137, 23,191,127, 98, 23,239,222,249,248,253, 15,121,244,248,125, 98, 94,113, 99,115,139, 49,
+103,242,102, 52,147, 99, 26, 89,159,142,220, 58, 59,181, 98, 35,133,188,186, 5,251, 43, 66, 16,187,212,104, 99, 19, 78, 29,136,
+100,242,102,237, 11,171, 49,209,177, 75,191,212,198,249,235, 75,222,238,103,254,201, 31, 60,228,175,126,245, 21,255,249,159,254,
+ 49,171,237,138,178, 95,248,217,231,159,242,246,242, 21,111,118, 87,164, 4,171,148,236,129,213,141, 79,160,241,136,157,109,168,
+ 86,186, 87, 30, 55, 13, 12,171,145, 59,119,239,179,236, 14,188,124,249,194, 98,143,201,158, 31,150, 26,176,200,172, 56,111, 91,
+157,105, 97,185,119,219,157, 91,143, 68,240,142,138,102, 74,100,115,201, 82, 34,135,105, 98, 63, 45,222, 97,175,230,137,145,206,
+ 52, 23, 47, 92, 50, 99,168,155,162,157, 2, 88,137, 41, 89,175,131, 19,253,138, 75,200,218, 59, 49, 38,255,204,116,198,213,200,
+180, 44, 44,147,193,122, 98, 16,134, 65, 25,226, 72, 72, 3,165, 89,161,144,173,154,108, 10,238, 94, 67,157,131, 16, 36, 27,221,
+ 17,203,175, 75, 11, 80,173,112, 4, 9,134,120, 61, 26, 7,163, 77,194,189, 27,219,160,149, 74,139, 74,202, 35, 34,205,250, 5,
+ 36,210,197,164,109, 51,178,194, 48,200,181,191,160,187, 81, 75, 34, 44,254, 60,166, 91, 39,123,148, 64, 76,131,149,202,168, 33,
+151, 83,180,146,170,210, 5,157, 11, 33, 65, 17,243, 29, 28, 63,179,234, 4,182,235,236,117, 0,205, 70, 13, 77,158, 15, 23, 12,
+156,132, 38, 90, 47, 4,154,169, 57,218,188,138, 56,250, 90,197,163,156,189, 25,111, 64,195,117,132,177, 97,191,187,157,150,166,
+250,106,105,239,136,164, 98,166,209,238, 96, 53,179,191, 4,122,176, 60,184,122,118, 60,104,183,159, 37,121, 61,150,152,164,110,
+131,164,241, 68,172,138,213, 46, 82,122,125, 17,115, 22,187,250,235,233,158,140,224, 61,233,199,195,250,200,118, 15, 4,186, 24,
+ 34, 54,184, 55, 68,130, 41, 11, 70, 78,181, 46, 10, 31,135,237, 50,155,189,132, 76,205,112, 23,197,214, 2, 98, 95, 38, 7,215,
+216,170, 36,222,184,121,243, 23, 61, 6, 67,182,122,144, 30,109,104,175,212,230, 59,141, 86,169,165, 25, 58,210,161, 32, 34,129,
+ 72,183,219, 14, 30,217, 17, 65,226, 64,246,252,177,248,180,161, 57,146,101, 97,222, 79, 28,166, 98,152,217, 32,118,235,165,163,
+ 85, 41,199, 95,250, 24, 95,195,126, 14,113, 96, 71,111,149, 86, 23,179,242, 99, 15,206,105,178,202,204,233,112, 96, 55, 47,148,
+106,248,201,165,153,187,180, 54,111,197, 10, 66,146,108,177,179, 97, 32,229,196, 42, 38,198, 97, 68,178,144,194,192,122,189,102,
+179,202,108, 86, 35,235,237,150,216, 42,191,251,237,127,228,247, 79,159,211,230,198,126,183,103,127, 40, 86, 75,233,133, 39, 98,
+ 72, 61,182, 39, 43,110,158,109,185,123,123,205,157, 59,107, 78,214,107,242,176,229,198,201,134,245,217, 0, 61, 82, 22,229,226,
+178,114,121,176,223, 95,189,182, 53,196,132,244,198,197,197, 37,115,245,233, 66, 60, 45,174, 30,219, 33, 26,108,165, 76,148, 90,
+175, 89,245, 33,216, 94, 39, 88,141, 29,104, 55, 52,109, 76,164,193,235, 65,181,155,100, 24, 3,159, 60, 56,227,238,217, 9,189,
+ 69,222, 94,158,115,152, 15,244, 82,169,189, 91,185, 77,173,214,254, 20, 32,229,200, 42, 69, 66, 14, 84, 21, 67, 84,122,243, 93,
+136,102, 49,237,197, 72,249,189,153, 67, 62,103, 51,127,148,178, 24, 36,166, 9, 25,177,150, 49,173,246,103,134,136,180, 72, 28,
+161,213,104,239,109, 12,132,165,211, 67,162, 39, 65,103,123,143, 7, 13,150,215,143,130,144, 88,202,132, 86,200,106, 41, 2,218,
+145, 26, 88,145, 60,146,186, 80,197,118,249,231,151,151,124,249,213,111,185,188,220,115,114,178,181, 27,122, 11,164,113,160,139,
+178, 56,119,189, 22,219, 79,181, 96,114, 95,111,149, 82,171,125,245,146, 79, 61,221,157,196, 46, 67,226,196, 41, 31,211,129, 70,
+169, 71, 83,166, 18, 99, 96,200,217, 43, 37,171, 61,232,187, 32,209, 46,151,218,222,201,182,193,149, 33,219, 17,246, 99, 15,177,
+ 73,159,106, 19,178,122, 73,227, 49, 90,245,225, 71, 31,242,179,159,255,156,148,132, 10, 60,123,250, 12,180, 81,181,114,227,236,
+ 22, 55,111,221,102,140,137,205,250, 38,103, 55, 78, 25,114, 98, 41,133, 30,225,246,233, 67,182,171, 21,123,148,170,153,243,171,
+115, 94,190,122,193,102, 53,162, 81, 40, 77, 88,180, 18,157,139,176,234, 3, 75,177, 29,241,152, 86,208,133, 97,101, 15,232,213,
+ 58,242,253,243, 87, 60,122,239, 17,159,127,116,151,170,107,126,243,229, 87,252,242,175,254,146, 63,250,233, 79,249,248,211, 15,
+121,246,244, 41, 83, 85,131,254,116,155, 50, 58, 66,104,133, 62, 36,147,104,165, 67,207, 72, 88, 17,134, 0,181,144, 72,220,189,
+247, 62, 33,193,155,215,175, 41,165,216,193, 46,225, 24, 1,230,221, 63, 28,205,175,118, 32, 90,226, 38,121,205,129, 77,119,222,
+ 67,121,109, 88, 53, 75,148,186, 90,208,184,119,255, 30,103, 55,110, 51, 29, 10,117,153,141,213,175,226,244,178, 35,147, 92,144,
+ 40, 36, 73, 6,130,202,201, 48,215, 62,249, 25, 33, 80,145, 36,108, 86, 55, 40, 75, 99,183,187,160, 54,101,153, 23,134, 24, 57,
+ 57,187,109,166, 48,178,201,206,189,153, 23,168, 31, 65, 49,214,207, 80,123,167, 37, 65,212, 24,247, 82, 26, 37, 52, 24,252,130,
+ 92, 45,174,149,196, 38, 56, 1,164,117,219,171, 70,203,102, 27, 99,164,211, 99, 52,213,169,217,255, 62, 72, 64, 91,177,203,143,
+100,130, 9,253, 70,201, 67,105,179, 93,110, 37, 10,164, 35,200,200,226,151,161,187,210,201,145, 67,225,109,152, 98,138,106, 24,
+ 3, 57, 24,219, 95,187,213, 6, 75,136,164, 56,152,161,175,154, 60,109,159,113,135,165,182, 74,243,152,113, 8,194, 82, 23,187,
+120, 75, 48, 53,178,123, 71,130,103,226,123, 55, 4,109,243, 66, 42,136, 86, 42, 22, 2, 41,252,131,212,130,133,166,141,252, 25,
+236,114, 29, 48,172,184, 38,156, 63,208,173, 21, 82,155,189,151,206, 29,160,138, 23,177,200,245,217, 70,239,215,121,114, 61,130,
+108,131,184,236,110,177,212, 99, 3,104,116, 24, 69, 8,205,140,110,226,241,213,163,220, 78, 39,137, 73, 98, 33,138, 61,103,150,
+102, 60, 19,191,176,168, 26, 4,204,124, 85, 71, 60, 94, 36, 13,225,186,207,196,115,212, 32,129,140,241, 29,226,118,187,253, 69,
+239,225,186,183, 86, 9, 72, 72, 22,235,136, 1, 73,137,113,200,228,144,204,140, 38,234, 77,103,222, 18,213, 26,197,191,244,173,
+155, 27, 82,189,249,170,248,164, 24,188,235, 60,134,129, 16,131, 73,224,118,169, 50, 85,206,155,168,130,247,214,182,218, 88,106,
+ 53,140,107,244, 47, 83, 56,198,234,188,162,240,104, 36, 59,246, 29, 55,181,219,122, 47,230,136,165,176, 76, 7, 46, 47,246, 92,
+205,133, 82, 11,135,101,177, 56, 84,173, 20,119,207,171,218,151, 52,143,145,184, 30, 24,199, 21,155, 85,226,135,239,158,240,187,
+ 39,223, 19,226,200,144, 35, 75, 89, 40,221, 63,236, 1, 98,202,156,221,124,192,123, 15,238,115,243,108,224,246,141, 83,238,223,
+ 62,229,206,217,218,216,195, 75, 70,210, 8,179, 29,102,251,195,129,182,216,161,105,140,120,147,105, 84,108, 50,139,226,147,173,
+250, 27,235, 49, 63,235,224,110, 76,117,161,151,238, 7,140,231,149,187,151, 37, 4,147,222, 37,218,155, 29, 82,230,244,244, 4,
+ 45, 11, 75, 41,212,218, 89, 13, 3,255,248,199,119,184,123,170,124,245,237, 83,190,125,242, 13,111,223,188,228,106,191,227,222,
+141, 21, 67,220, 80,106, 39, 69,235,140,206, 49,178, 94,153,255,160,137, 77, 61,116,119,106,214,110, 29,201, 98, 81, 45,137, 24,
+101,171,218,195, 69, 99,179,114,144, 33,209,232, 44, 98, 18, 85,136,201,157,174,194, 56, 68,234, 92, 76,226,235,176, 10,129, 18,
+ 20,157,155,237,252,180, 50, 74, 34,100,101,154, 59,211, 98, 78,252, 20, 50, 18, 12,124, 33,254,101,110,245, 88,103,106,153,213,
+ 23,207, 95,242,213, 87, 95, 50,207, 54, 89,173, 54, 43, 62,120,124,151, 56, 6,118,135,133,222, 11,173, 86,159,172,171, 93, 12,
+154, 49,226, 75,171,140,121,100,179, 93, 91,245,108,109,102, 92, 52,195,133,197,170,174,165,118, 67, 39,155, 43, 30,251, 28,197,
+228,145, 66,139,168, 93,175, 43,252, 61,147, 99,119,186,167,210,180,217, 69, 65,143,123, 63, 9, 30,213, 50,217,181,117, 43,140,
+ 56, 94, 24, 62,121,252,152, 63,252,217,207, 73, 67,162,246,192,114,152,249,230,171,223,161,189,112,235,244, 6,119,110,223, 49,
+216,201,201,150,241,228,182, 81,207,106,160,118,225,253,247, 31,113,186, 61, 99,154, 39,174, 46,222,176,219,217,191,182,221, 37,
+183,110,223,182,203,116,180,104, 99, 18,161,210,233, 89, 57, 44, 11,195,106,100,179, 89,161,193,212,187,221,225,138,231,207,127,
+ 96,218, 79,188,126,245,134, 63,255,179,255,154,175,190,126,198,223,252,250,183, 60,121,242,146,205,122,195,207,190,248, 49,207,
+190,126,202, 55,223, 60, 37,159,108,108,162,113, 53, 41, 72,165,213,224, 19, 81,117,202,158, 16,142,181,201, 4,100, 16,238,223,
+187,199,205,155,103,204,243,129,121,182,142,123,117,186,229, 17,250,147,146,239,108, 67,178, 74,215, 24, 60,190,165,174,142,244,
+127,176, 54, 57, 18,168,212, 77,118,230, 82,174, 75, 97,187,217,114,178, 25,216,237, 15,102,252, 76,201, 17,216,226,123, 84,123,
+207,179,151,159, 12,121, 32, 32,204,203,100,102,177, 38, 52, 21,134,152, 57, 57, 93,113,255,246, 77,174, 14, 19, 83, 57, 0,141,
+ 49,175,216,156,222,180,159, 95, 2,170,145, 24,212,232,102,217, 30,240, 29, 83, 71, 2, 46,103,183,192, 82,139,199,118,223,149,
+ 87, 69,181,120, 88,247,246, 72,232, 84, 9,132, 96,242, 49,193,248, 27,109, 17,143, 74, 25, 1,165,251,164, 23,114,176,162,146,
+121,161,185, 57,204,106, 65,149, 88,204, 1,111, 70, 51,107, 99,235,189, 32,201,211, 67,193, 61, 8,230, 42,176,247,180, 85,146,
+ 64,194,228,207,212, 85, 0, 0, 32, 0, 73, 68, 65, 84,200,104,221, 77,134,228, 72, 84,187, 72,217,251, 36, 84,109, 6,136,242,
+194,232, 35,229, 79,124,202,150,238,184,153,230,151, 47, 9, 84,143,232,250,182,158, 32, 6,165,178, 53,170,199, 30,181,217,186,
+194, 39,124, 57,166,165,130,237,188,165,118,126,242, 96,203,103,159,124,192,171,157, 82,247, 7, 52,114,173,148,225,112, 24,187,
+115,116, 90,232,164, 44,148,218,140,251, 95,171, 87,111,219,243, 64,220,199,225,179,249,187,194, 22,169,136,228, 35,198,203,212,
+ 82, 53,238,137,164,224,235,205,134,118,167, 21,138,208,163, 48,136,197,211,186,255, 89,195, 69,123,137,161, 95,106,136, 9,191,
+214,217, 64,133,163,106, 53,160,193, 84,170,148, 98,188,150,180,142,131, 71,239,141, 5,159,154, 75,163,101,107, 64,247,113, 2,
+196,218,166, 44, 98, 16,200,126,123, 52,170,144, 73,185, 43,127,203,180, 23,147,123, 8, 54,217, 30,225, 27,248,171, 23, 18,121,
+ 48, 51,140, 54, 51,146, 73,138,148, 98, 82, 3, 30, 73, 56,198,181,122, 41,204, 77, 73,238,224,180, 8, 73, 32, 37, 65, 75,225,
+160,221, 50,144, 29, 82, 10, 12,221, 17,138,205,220,131, 90,103, 84,132,101,110,236, 93, 54, 78,195, 64,218,217,180, 36,154, 9,
+114,224,187,223, 63, 39,143, 43,195,140, 6, 37,101,219, 9,222, 56, 27,233,181,176, 28, 26,171,213, 13, 30,126,248, 25,151,207,
+255,142,195,220,200, 33,163,193, 92,172, 81,160, 44,133,178,219,113,185, 76,180,214, 88,161,164, 52,128, 8,193, 91,238,196, 75,
+230,187,218,206,176,149, 78,209,133, 97,149,125, 31, 5, 75, 51, 35,200,177, 8,225,216, 85,175, 30,163, 72, 41,144, 99,194,250,
+ 26, 58,189, 28,216, 93, 98,151,162, 60, 18,129, 7,239,109,153,181,241,219,175, 95,242,252,135, 31, 72,162,164, 20,184,117, 58,
+112,186,106,188,126,253,146,188, 57, 35,135,126,237, 65, 16,172, 98, 82,101, 97, 41,110,210, 74,208, 15, 70,202,147, 20,173, 81,
+170,192, 32, 13, 37,219, 36,227,114,243, 50, 87,210,144,136, 77, 88,101,207,150, 78, 21,209,198, 20, 71,208,196, 82, 39, 98,142,
+ 28, 80,202, 98, 4,170,156,148, 82,149,121,217,195,224,151,159,110,107,159,113, 48,170, 88, 95,108,143, 90,117,177,216, 79,105,
+104,237,124,247,226, 25,191,127,242,148,185,118,114, 54, 88,207,213,213,158, 87,111, 51,219,117,162,213,133,165, 52,178, 87,215,
+106,183,242, 18,233,134,119,220,110, 79, 25,115,102,119,121,201, 82,139,197,187,130,101, 84,139,171,237,221, 47,179,134, 14,182,
+ 41, 60, 37, 75, 9,208, 77,130,108, 90,175,227, 87, 40, 84,127, 56,105,199, 47,193,253,186, 87, 93,189,220, 66, 67, 32,180,110,
+ 49,201,113, 96,181, 57, 97, 53, 14,108, 87,107, 86,219, 53,119,110,222,224,198,233, 45,210, 42,153,178,213, 59, 57, 8,203,188,
+231,100,115,131,245,233,134, 33, 12,172, 87,103,172, 78,238,241,254,227,143,233,203,142,167,207,158, 80,231, 29,175,158, 25,109,
+173, 1,211,126, 71,233,157,155,247,238, 65,181,120, 95, 37, 50, 79, 87,180,218, 56,180, 66,185,172,212,101, 97,179, 74, 12,227,
+ 64,239, 43, 78,198,206, 85, 57, 16,242,138, 59,103,119,120,246,253, 83,158, 61,189,226,242,170,241,225,135,247,248,119,255,254,
+ 63,240,195,239,127,224,127,254, 95,254, 55,238,221,191,199,189, 71,119,224,111,102,130, 54,102,245, 73,165, 43, 45,143,116,170,
+113, 40, 52, 18, 82,162,149,137, 52, 4, 90, 53, 78, 67,153,109,157,115,255,222, 7,220,186,125,151, 87,111,223,240,246,135,231,
+188,121,251,154,171,171, 43,230,186, 88, 84,114, 1,213, 68, 26,160, 30, 21, 13,237, 4, 13,174,123,180,227,253,216, 46,255, 33,
+160, 85, 25,178,152, 91,187, 9, 47,223,158,211,165,243,233,135, 15,185,119,247, 22,223, 61,123, 99,135, 97,118,154, 88,235,150,
+255,207,182, 70, 80, 26,211,178,103,157, 7, 86,195,154,171,125,101,174, 51,170,112,178,218,176,205, 3,127,252,179,143,216,108,
+ 50,191,254,205,215,172, 67,229,214,173, 51,131, 63,185, 73,110,169, 19,213,137,156,171, 16, 96,108, 76,123,207, 40,199,232, 15,
+248, 25,137,230, 48,111,173,147,177,180,135, 87,193,184,252, 42,212,217, 18, 33,244, 78, 13,129, 32,141, 58, 53,191,200,128,178,
+166,117,163,209,133, 96,189, 13, 38, 59, 99,205,102,221, 14, 5,210, 17,141,106, 7,101,107,199,136,151,253,255,244,208,105,243,
+108,254,130,232,121,116, 85,195,119, 19, 1, 27, 34,204,219, 16,160,204, 84, 53, 9,123,105,190, 19,111,174, 62,117,107, 43,235,
+ 26,136, 97,160,206,147,169,118, 93, 8, 14, 25,210,108,125,227, 33, 98,174,119, 55,188, 53,197,234, 90, 93,225,106,158, 4, 73,
+ 41, 27, 11,194,115,121, 34, 66,168, 22,132, 22, 81,238,220, 94,243,232,243, 79,249,143,111,159,113,245,246,156, 80,172,106,181,
+ 59,183, 61,104,178,193,101,101,107,130,190,188, 75,167, 48, 36,106, 53,195,179,246,102,238,116,167,198, 5, 73, 14, 74, 91,140,
+155, 16, 33, 30, 29,118, 93,104,126, 49, 55, 96,158,123,102,164,251,138,219,134,234,170, 66, 74, 92,211, 85, 21,107, 97, 84, 53,
+116, 55, 13,132, 66,105, 28, 93, 61, 22,131,211,238, 91,123,165,147, 72,130,231, 37,181,155,140,115, 68, 10,250,228,220, 29,104,
+127,180,241,139,239, 66, 76,194, 18,223, 17,218, 77,199, 24,229, 29,130,201,133,225, 90, 34, 59,118,160,219, 62, 40,138,120, 20,
+195,238, 57,109,174, 72, 74, 30,180,143,150, 13, 28, 34, 57, 56, 80, 64,205,185,217,213,235,250,146,185, 1,231,185,248,238,223,
+195,167,189,219, 45, 42,218, 11,177,244,104, 46,122,181, 47,142, 54,107,216, 89,220,104, 21,189, 54,181, 76,123, 46,206,103,230,
+ 98, 95,202,152, 34,105,216,112,115, 29,157, 78,133, 53, 61,133,136, 72, 96, 89,148,152, 35,243,238, 21, 63,188,216,144,154, 33,
+ 93,175,166,137,133,145, 94, 22,222, 94, 30, 12, 9, 90,173, 9, 73, 17,230,238,178,149,187, 39, 67,176,157,211,245, 30,198,119,
+219, 90, 11,135,229,192, 42, 15,215,125,245, 57, 7,150,163,132,230,102, 32, 83, 46, 2, 49,173, 24, 87, 35,120,231,117, 91, 26,
+157,133,113, 28, 16, 34,155,117,226,253,135,167, 60,125,250,156,223,126,243,138, 20,133, 97,140,172, 55, 35, 49, 37,254,254,155,
+ 11,110,158, 13,220, 59,205, 44, 58,154,108,223,132,165, 86, 74,175, 30, 29,244, 93,104,203,196,236,152,221, 94,201,209,107, 68,
+155, 85,239,206,251, 3,195, 48,218,100,235, 28,126, 65,153,154,115,166,131,157,142,165, 78,180, 22,104, 75,101, 14,157,218, 35,
+ 67,112, 10, 20, 74, 81, 65, 75, 37,201,154, 30,148,245,198,178,158, 13,119,136,246, 14,213, 10, 83, 76, 52,236, 60,249,246, 91,
+190,249,250, 41,138,245,217,219,174,206, 62,155,175, 95, 93,114,158,130, 49,213,251, 59, 78,107,183, 80, 56,173, 11,219,147, 19,
+ 98, 10,236,118,123,150,102, 78,109,187,145, 91,228,112,169, 6,233,209,250,238,247, 18,167, 46,134,144, 29,142,241,142,128,168,
+250,110,183, 75, 15,166, 14,104, 39,167,200,141, 91,103,108,198, 21, 57, 15,108, 86,107,203, 9,175, 7,134,148, 57,221,222, 96,
+ 76, 3,228,129, 30,149,172,153, 60, 36,242, 0,189, 8,109,241,169, 32, 69,222,188,125, 73,211,206,217,233, 77,110, 13, 39,220,
+ 58, 59, 65,214, 27, 98,134,171,229, 37, 47,159, 62,167,206,123,150,203, 43, 90,104,200, 16, 88, 71,152,123, 97,220,222,230,209,
+131,143,168,151, 47, 25, 86, 43, 78, 78,215, 92,188, 86,230,195,142,114,190,183,198,189, 97, 75, 80,171, 91, 21, 13, 28,106, 69,
+165,114,231,244,148,245,253,123, 76,203,158, 90, 34,247,238, 62,228,223,254,197, 47,105,218, 25,182, 3, 47,223, 60,225,219,111,
+127,195,221, 59,143,108, 85,149,172, 38, 50, 39,208, 98,157,231,189, 87,107,218, 11,214, 5, 63, 14,214, 69, 29, 67, 32,137, 82,
+138,192, 42,209,180, 16, 36,112,251,244, 62,247,110, 61,162,177,112,254,234, 5,151, 87,151, 44,135, 3, 87,187, 43,166,121, 97,
+ 41, 11,243, 60, 95,239, 54,131,187,156,197,129, 85,118,136, 53, 82,136,220,190,119,143,135,247, 31,243,252,229,247, 60,127,241,
+ 61, 49, 4, 94,191,185, 96,153, 23,110,223,186,201,184,138,182,154,105,198,216,142, 18, 24, 66, 50, 40, 86,109, 8,133, 74,228,
+144,148, 60,140,108, 55, 91,118,251, 75, 68, 50, 45,116,166,101,199, 7, 31,158,112,247,225, 31,178,187,170,188,190,120,129,196,
+145, 82, 13, 83,220,231, 74, 82,161, 19, 73, 88,244, 81,131,184, 2, 58, 82,169, 68, 42, 41, 56,136,197,229,236, 41,184, 65,203,
+105,144,189, 43, 50, 36,194,102,180,103,101,155,233, 75,123, 7, 59, 9, 66,202, 1, 74, 69,130, 45,179, 53,118, 40,193,148,163,
+108, 53,216, 96, 53,173,210,124,119,220,205,148,233,248,148,235, 18, 45,165,112,108,229,238,238,228, 78,201,128, 41,181, 26,119,
+210, 48,191,209, 20, 23, 47,115, 33, 68, 83, 26,143, 13,144,173, 59, 65, 77,205,249, 78, 51,108,171, 87,197, 74, 55,111, 2, 45,
+155,235,157, 74,175,254,115, 58,191,161,137, 24, 78, 92, 29, 36,147, 26,165, 44,132,144,232,170,100,231,143,136,255,251,210,224,
+ 87, 95, 95,240,235,215,191,226,205,219, 43,130, 22,219,193,183, 64, 20, 83, 15, 66,119, 53, 85,173,218, 54,166, 0,120,137, 88,
+241,102, 53, 28,250,226,207,107, 91, 33,169, 51, 7,130, 55,105, 26,213, 84,130,119,169,104,177, 75, 88, 55,133, 81,147,201,250,
+164, 64,175,134,180, 85, 47, 38, 27,130, 61,123, 53,184,111,173, 86,154,202,181,235, 62,113,164, 38, 70,183,230,171,149,135,121,
+121, 78,234,248,206,192,119, 19,142,193,242,135, 89, 39,164,227,222,208, 76, 72, 33,184, 59, 87,237, 0, 63,238,127,187, 40,210,
+202,117,206,214,114,155,114,236,104, 3, 17, 98,244, 41, 95, 77,126,138, 41,145, 82,179,182, 41, 95,141, 37,177,130,135,170,134,
+191,172,150, 24, 39, 36,203,245,150,224,198, 1,196,214, 2, 41, 16, 99,164,246, 66,113, 9,116, 92, 39,234, 50, 51,207, 51, 85,
+ 44, 22,151,180, 50, 77, 54,253,199, 16, 41,105, 32,171,177,154,167,253,129, 42,194,106, 28,173, 64,195, 10,135, 80, 39, 60, 17,
+186,237, 91, 83, 71,151,133,222, 58,227, 56, 16, 67,161, 94,189,177, 66,152, 80,233, 49,112,245,226,146,125, 89,204,217, 24,178,
+117,221,250,100,189,120, 82, 32,132,102, 70,147,102, 55,200,222,236, 0,171,205, 71, 65,177, 3, 96, 70, 33,102,134,152,144,174,
+108,214, 35,178, 30,108,210, 81, 65, 93, 58,174,243,204,164,199,238, 98,115,251, 11,126,211, 85, 37, 37,248,254,201,115, 94,190,
+186, 66, 21,198, 49,179, 89,143,148, 89,185,184, 60, 48,207, 74,138,157, 87, 87, 59,182,219,100,181,137, 75, 35,169,201,116,165,
+ 45,150, 66,168, 21,177, 22, 12, 59,181,170,210,135,104,166, 69, 73, 68,109, 48, 70,170,152,212,166, 85,220,101,218, 65, 6,106,
+ 12,208,140, 36,183,214,200, 44,202,144,147,205, 18,163, 48, 47,149, 90,187, 85,202,170,213,216,138, 90,182,185,102,195,137,246,
+165,144,176, 28,231, 82,102, 74, 13,164, 28, 40, 75,227,249, 15,175, 57, 44,149,113, 48, 6,114,136,110,112,105, 98,148,170,169,
+ 80,151,106, 30, 3,113, 35, 77,179, 53,204,176, 30,137, 57,177,223,237, 88, 22,143,162, 4,177, 30, 99,109,180,186, 88,187,154,
+127,164, 3,182, 70,138,241,184,167,109,215, 82,189,250, 83, 47,250, 14, 86,233,212,165, 16,134,200,227,123,119,249,252,163,207,
+184,115,239, 30,102, 45,140,164, 77, 36,231,209,164,208, 90, 81, 77,204,165,177,148,153,200,104,211,147, 86,154, 70,200,118,216,
+ 36,127,120, 60,251,230, 9, 39,219, 45, 39, 39,183,121,252,197,143,204,165,127,152, 56, 28, 18,207,255,214,228,113, 13, 74, 14,
+137, 86,103,164,251,133,184, 84, 62,255,226, 67,138, 78,228,245,192,106,157,216,159, 95, 25,107,190, 8, 93, 19,235, 85,167,199,
+ 68, 95, 58,196, 72,110, 5, 77, 48,110,173,220,167,134,133,199, 31,125,204,195, 71,159,114,126,245,130,255,245,255,252,223, 9,
+154,248,199, 63,249,132,213,250, 67,238,222, 61,225,135,151,175,184,117,243, 46,159, 62,188,195,111,190,126, 67, 15,149,158, 38,
+ 43,217, 8, 66,207, 66, 47,209,162,143,165,122, 47, 66, 96, 42,149,180,138,244,217, 26,183, 66,176,146,166,185,205, 68,137,220,
+ 58,187,205,173,219, 15,200,161, 25, 19,162, 44,212,178, 48,237,206,121,251,246, 45,251,221,129,105,191,103, 94, 38,255, 78, 69,
+134, 49,114,118,118,147, 7, 15, 30,178, 61,187, 67,208,145,143, 63, 57, 97,187, 89,243,237,183, 79,160,119, 46,119, 19,251,249,
+149, 69, 63,131, 80,103, 8,110,160,141,195,241,144,240,181,143, 59,189,181,136,113, 15, 70,101,154,246,212,105,226,106, 31, 89,
+ 14,157, 15, 62,190,195, 31,254,209, 99,158,124,147,120,245,182,178,168, 96,133,143,157, 78, 70,106, 67, 67,177,105,176, 70,235,
+ 43, 32, 34, 75,161, 71, 37, 53, 33, 71,235,139, 87,143,223, 85,108, 47, 29,114, 67,154, 77,244,170,179,151,124,152, 43, 62,166,
+ 96,106, 81, 87, 88,212, 28,244, 33,121,201, 79,165,117,123,166, 80,109,122, 44,158,123,166,219, 10,179,213, 64,141,141,152, 2,
+145,129,134,173,226, 74,181,193, 42,199, 72,175, 92,163,151,105,206,253,192, 25,253, 65,236, 96, 22,107, 12, 58,242, 66,164, 44,
+198,177,143, 1,209, 98,185,119,143,193,209, 3, 85, 43,177, 97, 9,145,102, 17, 45, 51,193, 59, 97, 78,212,144,230,209,152, 9,
+ 21,117,143, 86,114,234,229,145,193,208, 41,209,122,229, 67, 82, 35, 26,210, 57,223, 79, 48, 61, 71,123, 33,134, 72,167, 64,200,
+116,141,180,210,173,160, 38, 7,139,209, 73,181,245,226,177, 37, 81,187,173,127,125,181,150, 66,176, 53, 5, 88, 67,137, 31,194,
+ 33, 90, 10, 74,232,244,122,188, 84, 54, 7, 25, 89, 65, 87,244,213, 17, 94, 70,102, 3,132,197,127, 75,180, 85, 79,108,226,107,
+ 85, 75,192,207,126,182,166,104, 96,156,238,195,114,119,131,109,169, 21, 45,141,212,125,214, 13,130, 79,228,174,178, 59,113,169,
+219,167,216, 91,165,172,152,158,238,144,148,227, 98, 5,131,248, 6, 49,105, 71,157, 19,127, 52, 20, 57,201,154, 86, 3,234, 55,
+ 45, 81, 99,101,207,190,111,116, 20,182,199,212, 18, 49, 89,252,172, 91,170,131,168,137,113, 21, 89,121,198,143,230, 48,125,137,
+144,132, 84, 21, 89, 37,147, 73,188,249,138, 85, 34,166,129, 85,118,201, 40,118,130,154, 1, 98,158,118, 92, 58,171,123,149, 71,
+134,100, 69, 3,117,113, 89, 92,173, 32,161, 53,203, 35, 55,231,209,207,197,220,176,211,162,172, 71, 97, 46, 51, 82, 27,200,154,
+ 60,140,148, 82,172, 63,120,240, 55,172,120,111,175,216,135,162,186,241,207,216,246,141, 86,142, 78,126,187, 5, 18,130,197,181,
+ 56, 18,254,237,203, 54,140,137,113, 24, 24,134, 13,105,173,212,195,194, 60, 21, 46,174,246,148,182, 48, 29,150,107, 7,118, 10,
+201, 92,167, 75,129,160,156,156,110,232,243, 68,200,129,187,235, 76, 36,179,223,119,174,166,234, 45, 4,133, 23,207,103, 68,206,
+184,181,185, 97,166,170, 65,153,107, 71,170,221, 6, 67, 72,222,199,100,178,250, 42,175, 45,103, 91, 22,104,153, 24,187,129,122,
+122, 48,117,161, 86,123,227,176, 29,209,170, 24, 39,223,154,193, 76, 25, 90, 90, 37,170,144, 5,234, 98,109,100,105,104,148,201,
+ 81,150, 58, 51, 6, 67, 15,151,174, 44,173,179, 74,226, 80, 26, 75, 93,212, 94, 17, 25, 88,150,153,182,120,111, 60,182,151,147,
+ 35,101,207, 25, 1,213,233, 84,177,191,155, 44,104, 88,212, 11,229,234, 98,111,135, 42,134,201, 12, 94, 10,212,106, 53, 88,137,
+ 90,108, 79, 36, 18,179, 77,224,234, 95,240,107,174,123,195,229,116,187,248,204,197,166,173, 7,247,238,240,209,199, 31,242,225,
+ 7, 15,201,195, 13, 74,153, 73,204,172, 17,166, 22,168,186, 64, 85,180, 2, 49, 19, 67,103,181, 78,164,148, 25,131,161, 56, 67,
+ 8, 44,138, 69,196,134, 64,185,218, 49, 77, 19, 15, 31,222,231,131, 15, 63,224,198,221,123, 60,251,246,107,174, 46, 95, 33, 87,
+111,152,166,110,252,117, 18,164,200, 92, 39,202,161,114, 85, 43,195,102,100,189,221, 80, 47,207,105, 53,241,230,205, 5,245, 80,
+ 8, 55, 70,182,235, 13,165,236,204,232,212, 38,160,114,146,215,172, 79, 78, 89, 40,212,189, 33, 78,167,125,101, 24,183,124,120,
+255,125,254,167,127,245,175,248,205,223,127,205,184, 30,248,232,131,123,252,249,127,245,223,243,224,189, 71,124,253,187,255, 11,
+ 33,240,248,253,123,188,125,189,227,201,203, 11,242, 58, 19, 6, 27, 33,202,220,233,186, 16, 71,143,199,206,129, 88, 21,233,145,
+188,177, 10,213, 48, 87, 36, 70,138, 22,171,185, 44,153,210,170,241,185,155, 85, 81,110,134,145, 18, 19, 55,111,110,184,247,232,
+ 17,245,208, 56,236,246,236,118, 23,236,118, 23,164,113,197,237, 59,247,216,142,131,213,151,150, 74, 9,157, 90,149,187,183, 31,
+ 50,110,215,124,243,187,175,184, 60, 92,209,102, 43, 54, 33, 70, 98, 72,150, 65, 15,145,122, 68, 79, 58,111,123, 76, 43, 68,212,
+165,226, 66, 30, 7, 78,182,107,106,181, 36,198,213,213,196,201,102,197, 31,253,228, 1, 55, 79, 35,127,241, 31,190,229,226,194,
+ 65, 36,170,136, 44, 78,201, 52,250,156,169, 19, 21,105,141, 24,204, 89, 80, 82, 34,116,163,227, 36,132, 69, 60,255,221, 13,141,
+ 74, 14,132, 34, 44,210,188,214,179, 16, 36,211,155, 83, 87, 60, 17, 17, 99,116, 62,186,181,205,133,166,126,216,200,255, 47,158,
+ 44,161, 89,250, 66, 58,131,184,243, 59, 8,173, 23,164,217, 48, 82,139, 82,180,152,123, 95,178, 73,221, 29, 55, 13, 26,197,141,
+107,218,159, 64,240,242,146,110,223,205, 16,142, 53,194,217,170,176,123,187, 46,255,234,173, 17,232, 16, 50,173, 41,244,226, 89,
+149,104,223,145,102,145,200,238, 28, 18, 69,141, 70, 41,221, 14, 74,154,167, 31,236, 76,146,208,142, 7,154, 25, 85, 67,198,111,
+ 9, 52, 49, 35,117,210, 70,151,104, 20,196,234, 38,195, 99, 25, 86, 79,142, 55,183,105,186,117,165, 52, 95, 69,168,103,239,195,
+ 49,137,100, 13,166, 77,195,181,209,249, 8, 57,179,225,160,191,147,222,187, 93,180,130, 68,114,202,126,161,176, 60,157, 86,181,
+203, 84, 23,138, 86, 2,137, 66, 55, 73, 95,140,103, 34,136,141, 4,221,206,219,138,169,136, 34, 66, 58, 50,165,193, 28,126, 54,
+ 5,187,195,220, 27,105,204,128, 36,214,110,229,203,247,118, 36,152,137, 25, 81,208,100, 14,200,224,149,169, 98,112,130,235,191,
+207,108,188,118, 11, 13, 98,125,237, 88, 30, 88,157,150,211,213, 8, 96,180, 66,168,145, 9,185,222,123, 30,251,196,211,104,216,
+ 62,186, 83,204, 80, 74,177,200, 83, 76,246,192, 21, 4, 73,137,216, 93,150, 17, 33,141,107,206,182,137,101,222,243,246, 98,207,
+126,182,108,244,102,189,242, 66, 49,235,117,239,199,140,178,168, 69, 68,212, 58,130,211,176, 33,165,132,200,200,192,204,178, 28,
+ 56,175,133,113, 89,216,228, 8,161, 81,235,129,174,197,242,221,154, 60, 98, 2, 89,109, 21,161,209, 11, 9, 28,135,219,106,181,
+146, 19,204, 81, 30,131, 1, 37,240, 10,193, 97,200,228, 28, 88,165, 1, 69,216, 29, 42, 18,103,100,206, 44, 7,131,164,196,148,
+144,232,187,170,227, 36,105,129, 84,186, 81, 21,120,249,114,207,217, 58,115,255,206, 9,243, 2,231,151,141,210, 26,109,105,104,
+176,222,242,113,189,225,238,205,141,237, 35,131, 23,182,168, 85, 39,106,180, 60,118,232, 71,198,116,225, 80,103,178,120, 44, 36,
+ 52,164,186,236,150, 34,189, 5, 58,222,239, 62, 55,134,149,101,146, 43, 1, 29,163, 93,146,138,203, 33, 41,218,151, 87, 23,114,
+ 20,234,164, 12, 6,243, 3,141, 52, 93,136, 50,248, 23,173, 81,251,232, 0, 7, 95,231, 4,187,248,212, 86,232,193,111,242,102,
+127,189, 46,228,200,209,246,138,181, 85, 99, 18,184,130,148, 16,134,237,134, 24, 35, 23, 87, 59,207, 20, 31, 93,230, 86, 28,209,
+181,209,138, 77, 3,183,206,182,252,228,195, 15,249,250,251, 23, 92,238, 39,163,143,185,196,223,187, 99,139,137,215, 69, 33,181,
+ 54,214,171,145,159,253,232, 71, 60,124,252,136,245,118, 64, 84,184,218, 95, 48,108, 34,212,196,110, 41,104,143,104,170,244,170,
+ 44,181,131,238, 8, 73, 24,113,215, 50, 22,205,210,154,160, 44,164, 60, 32, 33,243,221,247, 79,233, 40, 15,238,127,204,159,252,
+167,255, 37, 79, 95,255,158, 84, 58,181, 69,118,203,204,152, 2,189, 22,210, 40, 84, 61,144,134,200,235,243, 55,188,125,241,154,
+127,250,207,254, 25, 49, 6,166, 90,152,166,201, 38,146,193, 24, 2,170, 5,137,217, 0, 56,101, 98, 53,140, 12,195, 72, 15,129,
+211, 37, 51,109,149, 90, 2,151,251,204,237, 91, 31,114,126,241,130, 95,254,234,111,208,222,169,211,194,191,254, 55,127,201,197,
+213,194,230,228,148, 62, 85,238, 63,124, 68, 57, 52,206,110,159,209,158, 62, 35,170, 80,105,212,144, 17, 81, 6, 50, 90,237,153,
+ 18, 86,209,119,153, 7,118,135,198,106, 8,196, 54, 82,165,217,100,152,131,145,206, 66,164, 37,181,105,175, 10, 85, 42, 77, 58,
+251,197, 42, 85, 21, 97,117,178,102,187, 61, 37, 12, 15, 89, 20,243, 97,168,165, 79,114, 12,118,225,142, 80,164,113,182,189,199,
+ 79,126,118,147, 47,191,250, 91,206, 95,189, 2,113,244,108, 50,138, 37,213, 20,181,104, 69,146,180,210,200,177,177, 30,214,180,
+102,181,168,173, 20, 90,142,172,183, 27, 14, 23, 19, 87,135,115,210,250,148,205,237,202,248,122,231, 80,168, 2,161, 56,181,210,
+ 20, 41,233, 80,123,164,177, 56, 51, 34,184,172,108,131,145,162,104,182, 3, 56,164, 72,116,153,187, 54,159,134,212,146, 5,189,
+119,162, 26,130,183,250,144,144, 98,162,139, 85,162, 6, 45, 44,213,124, 21, 81,178,245,203,135, 96,184, 85,181,184, 87,212, 96,
+106,152, 95, 2,234,210, 8,169,179,116, 67, 34,219, 14,206,232,145, 61, 69,164, 85, 23,232, 13, 9, 27,113, 15, 66,175, 14, 4,
+130,164, 66,107,118,144, 55, 34, 57,152, 31,165,245,104, 61,247, 75,177,132,130,203,238, 11,221,211, 54,166, 62,246,232,157,234,
+199, 68,149,218, 57, 83, 36, 92,127, 38, 56,230,202,155, 29,222, 6,133,177, 20,139,150,163,104,142,247, 7, 88, 7,189,181,120,
+250,185,229, 25,239, 78,161, 87,177,159,153,110,207,245, 46,116, 10,129,193,207,191,201, 98,106,168,199, 10,227,245,107,115,157,
+220,242,214, 54,149,234,173,141,198,121, 49,211, 95,119,168, 79,164, 5,177,103,231,160, 14,151, 49,117,207,144,216,199,162,151,
+118,125, 70,135,209,218, 43,237, 3, 36, 44, 85,137,249, 8,189,177,216,103, 18, 13, 94,247,230,229,238,218,174,101,248, 36,193,
+100,117,240, 62, 98,147, 72,172,247,221,176,128, 26, 70, 18,221, 36,100,255,179, 6,233, 55, 50,155,127, 46, 45,187,171,106,210,
+149,187,131, 45,123,235, 86,127, 49,211,129,244,108,183, 56,223, 9, 5, 55,195,169,115,155,151,185, 80,124,191,223,155, 77,125,
+193,115,195, 20,191, 32,136,155,246,196, 72, 59, 41, 9,181,117,150,221, 21, 23,187, 61,162,194,118,181,178,206,240,218, 92,121,
+ 48, 50,210, 56, 68, 6,148,165,168, 67, 10,160,232,138, 24, 7, 52, 14,228, 60,178,236, 94, 51,149, 5, 20,182,235, 19, 78, 86,
+153,183,151,151,136, 20,107, 32, 18, 33,235,114, 45,147,191, 43,113,177,123, 77, 43, 11,189,118,170, 42,171,245, 72,107,106,166,
+160, 86,200, 57, 49,174, 51, 41,103, 86,121, 64, 90,103, 41,141,234,113,149,185, 68,202, 60,179,155, 22,242, 96,140,233, 94, 77,
+ 77, 9,217, 42, 33,173, 42,214, 80,139, 41, 25, 58,177, 36,229,234, 10,118,115,163,116,251, 34, 29,243,216,235, 97,228,241, 7,
+239,177, 89,103,166,101, 33,174,140,111,157, 5,170,170,239,175, 58,154, 70,154, 24, 91, 90, 92,158, 14,106,114,124, 79,246, 70,
+ 7,236,161,194,108,147,187, 10, 70, 39,236,157, 74, 37,237, 35, 75,111,228, 85, 96, 29, 50,147, 75,213, 42,102, 10, 73, 67, 38,
+132, 68,101,102,204,209, 10, 46, 74, 97,212,200,201, 24, 88, 90,133, 16, 88,229,108,243,116, 13,204, 5,134,113,197,103,159,189,
+207,151, 95, 63,227,234, 98, 34, 38,203,128,119, 85,218,190, 17, 99, 69,213,140, 53,226,185,253,245, 56,144,114, 96,183, 59,160,
+ 90,201, 65,220,156,226, 75, 67,212,229,249,206,227, 71,247,248,249, 79, 62,231,193,237,251,144, 7,126,245,235,255,215,254, 59,
+237,142,241, 52,114, 23, 85, 89,218,130, 2, 15,238,221,225,103, 63,249, 9,247,238,220,167,117,101, 42, 11,210,173, 16,166, 75,
+ 98,223,172, 11, 64,151, 25,157,221,213, 59, 68, 66,111, 12, 98, 89,216,193,107,106,151,165, 1, 7, 66, 24, 9, 81,153,202,158,
+183, 47,158,243,224,238, 93, 62,255,228, 67,238,222,187,109, 78,229, 59, 59, 14,135,198, 84,206, 25,215, 17,105,131, 57,142, 75,
+225,201,179,167,124,248,240, 17,159,191,255, 62, 63,255, 71,127,192, 15, 47, 95,177,236, 38,214,235, 45,123, 85,230,249,156, 80,
+179,145,219, 48,199,252, 92, 59,227, 58, 50,156,110, 56,212,128,234,142, 65, 3, 97,189,102,211, 58,183,239,220,228, 87,255,238,
+255,224,183,223,124, 73, 28, 3,210, 77,241,250,139, 95,254, 18, 9,194,127,241, 79,254, 41,103,219,192,201, 73, 96,184,178, 26,
+ 98,131,138, 64,107,139, 71,252, 60,110,214, 19,161, 55,203,198, 15, 86, 70, 82, 15,118,224, 84,169,214, 57, 93,154,245,123, 55,
+243,207, 20, 26, 61, 4,227, 7, 56, 15,252, 88,237,217, 28,229,169, 52,150,218, 8,126, 34,107,129, 42,202,152, 6, 75,110, 72,
+131, 58,179, 74,153,143, 62,250,130,191, 57,255,247,180,186,160, 33,208, 12,216, 72, 12,214, 9, 97,109, 89, 29, 90,101,158,173,
+190, 53,196, 64,169, 54, 41,150,105, 38,137,181, 46,126,249,187,167,252, 89, 18,110, 62,248,140,151,223, 30,232,253,119,166, 36,
+ 53,163, 13,198,216, 8, 53, 80,233, 72, 42,126, 94,218,165, 88,233,126, 0,181,235, 98,160, 38, 29,102,207,119,231,132,246,106,
+ 81,192, 94,237,162, 34,118, 57, 64,178,253,172,193, 39,215,166, 20,137, 6, 20, 19,168,221,246,243, 10,180,101, 33, 98, 10,103,
+ 8,193,168,100, 1, 90,114,198, 72, 83,218, 92,125,143, 28,173, 40, 70,109,157, 99,216,226,110,173,109,170,228,220,233,154, 60,
+178,105,127,191,116, 97,174,166,124, 4, 35,220,216,207,216, 26,218, 23, 74,115,152, 24,130,182,226,201, 42, 43,140,209,238, 5,
+223,122, 4,225, 56,187, 33, 96,223, 81,181,215, 92,221, 75,229,159, 34, 47,100,193, 25,245, 71, 46,188,157, 17,173, 21, 66,138,
+ 84, 21,104, 74, 58, 22,190, 52, 87, 4,212,128, 51,199, 1,183,209,208,144,172,193, 45,218, 69, 36, 17,252, 0,110,132,108, 74,
+166,244,102,141,131,214, 26,198,187, 13,184,209, 86,113, 43,155,248,103, 18, 73, 22,229,244,210,153,168, 22, 17,175, 98,116, 78,
+169, 13, 73,217,134, 17, 47,246, 73, 77,233,234, 84, 69,111, 59, 57, 58,225,193,200,114, 18, 34,169, 97,197,245, 81,196,203, 83,
+124, 58,214,198,130, 27, 37, 60, 11,109, 53,143,126,208,135, 64,136,153, 32,118,195, 74, 1,203, 26,122,150,221,118, 99,174,148,
+123,230, 49,226, 61,184,213,121,190, 71,119,176,203,205, 57,184, 19,208,220, 72, 22, 89,114,146,142, 85,166, 10,253,218,101,232,
+ 47,210,181,212, 99,230,189,230,237,105, 49, 4, 52, 67,236, 74,153, 11,243,126,199,249,229, 76, 90,173,216,172, 6,147,149,156,
+200, 22,147,239,117,188,203,125,125,182,226, 78,206,108,134, 64, 45,133,239, 94, 52, 14,213,106,103,235,116,206,229,229, 91, 74,
+239,172,198,129, 48, 36,230,218,188, 22,143,235,138,188, 46,253,154,199, 14, 94, 35,171,157, 64,164, 54, 3,145,172,214, 43,198,
+ 16,121,179,191,162,245,206,102,181,226,198,233, 41, 39, 39, 35,251,195,204, 97, 50,226, 84,239,206,183, 31, 3, 90, 27,135,105,
+ 50, 24, 12,246,123, 39,223, 91,169, 8, 33,100, 66,176, 78,239,211,237,200,118,187,102,154, 11,135,253,194, 68,112,218, 81,113,
+180, 97,103, 51,142,124,254,217, 39,156,108,215,104,179, 6,184,117, 12, 76, 42, 28,220,217, 45, 42,140,155, 12, 97, 96, 57, 40,
+213,127,159, 94, 58, 99, 78,164, 16, 41,189, 51, 45,141,144,128,100,217, 88, 37,208,164, 82,150,153, 32,158, 25,165,209,251, 66,
+157,133,131, 6,150, 80,137,171,204, 74, 19,186,120, 23,186, 24,166, 86, 23,165, 47, 1, 66,101, 66, 57, 44,198,124,110,181, 83,
+250, 66,169, 22, 3,219,156,110, 88,165,200,157, 91, 15,216,140,183,249,234,171,175,120,249,230, 21,101,246,174,109,209,235,155,
+180,160,148,121, 38, 13, 3, 42,137,203,203, 29,189, 85, 55,225,217, 14, 30,117,103,124, 16, 62,250,232,125,110,222,216,240,224,
+225, 67,198,180, 98,175,133,247,223,127,192,247,207,158,241,228,135, 23,118,244,151,226,248,221, 68,239,157, 28, 3,159,124,252,
+ 1, 63,251,233, 79, 25,157, 44,150,186,146, 7,101,100, 64,123, 96, 90, 2, 34,197,112,144, 73,236,146,104,114,142,181,250,169,
+201,172,227,118, 77, 20,152,151,217, 14,164, 24,145, 97,195,213,203, 75,106,239, 60,126,244, 49,143,222,123,204, 50,237,185,184,
+ 56, 80,198,204,171,233,130,203,139,215,204,243,200,102,125, 66,236,194, 2, 28, 46,206, 57,253,252,199, 60,124,240, 35, 46,119,
+149,195,190,113,114,178, 37,116,171, 81, 30,194, 41, 61, 10,122,181,135,105, 34,246,206,233,217, 29,230,114,201,244,226, 53,104,
+224,236,254, 9,107,201,188,124,115,193,237,211,219,172,211, 57,255,230,151,255, 55,173, 85, 54,227,198, 34,171, 33,162,179, 81,
+ 14, 31,222,187,205,144,133,205,217, 29,222,252,221,115,226,106, 64,107, 39,123, 93,103, 40,238,211, 56, 22, 56, 37,241, 54,187,
+145, 22, 43,138,145, 7,123,183,203,112,210, 76,212, 70,149, 70,170,145, 82,221,163, 18, 70, 98,180,140,189,246,206, 16,172,175,
+224, 48, 79,132,138, 69, 42,131, 66,139, 32,150,200,145, 20, 24, 67,166,207, 80,165,160, 93, 72, 49, 17,197,106, 70,219, 49,194,
+137, 32,217,240,179,145, 8, 25, 52, 38, 98,176,168, 85,104,130,186,113, 78,171, 50, 76,151,252,244,139,247,121,125, 62,243,155,
+191,251,146,127,249,103,255,130,243,183, 31,112,247,175,182, 92, 30, 38,148,129,132,201,236, 61, 86, 82, 53,247,126,169,246,196,
+ 77, 9,171, 6,117, 24, 18, 14, 59, 9, 67, 66,171, 32,193,166,123,186, 79,240, 5,187, 24,120,149,169, 61,103, 12,166,210,164,
+ 59,175, 94,188,170, 53, 34,152,175,197,234,172, 35,146,133,170, 16, 66, 35,106, 48,102,185, 15, 86, 41,153,234, 86,181, 81,122,
+ 39,117,115,186,135, 0, 75,169,228, 40,158, 49,239,200, 34, 44,125, 62, 58,128, 25, 83, 50,126, 67,235, 70,196, 19,175, 60,245,
+204,117,107,199,110,114, 83,124, 85,142,254, 35, 59,158,173,227, 98, 49, 62,123,136,215,127,182, 21,147,194,147, 68, 98,118,117,
+221,213, 49, 67,236,198,235,244,139,122,249,139,168,173, 80,113, 28,111, 72, 1,117, 74,163,248,127,174, 14, 26, 10,222,170,166,
+ 98,248, 91,212,155,247,162,216,247, 80,149,238, 36, 78, 99,222, 27,108, 42, 29, 11, 91,194, 81, 17, 16, 95, 33, 24, 83,222,106,
+177,133,168,102,108,115,228,167,197, 78, 11, 88,217,182, 41,189, 68,152,251,236,138,141, 35,126,197,112,217, 26,186,249,181,154,
+ 69,226, 74, 53,207,137, 85,190, 6,146,241, 46,222, 1,242,173,209,220, 14,183,230, 13, 81, 4, 71,137, 86,147,165, 45, 55, 23,
+105,161,123, 27,141, 29,184,193, 1,251, 33,102,151,230, 13, 83,152,146,130,172, 64, 27, 57,121,199, 49,110,254,169,213, 77, 35,
+234, 37, 23,246,179,132,224, 45, 62, 29, 98,142,142,168, 85,231, 26, 59,222, 48,102, 87,246,223, 85,208, 73, 83,235, 72, 79,114,
+109, 86,144, 52, 48,158, 68,238,111,236, 67,179,168,237, 92,114,181, 15,107,175,118,211,237, 4,154,199,141,234,186,243,182, 44,
+ 92,236, 11,115, 53,134,184, 72, 99, 62, 92, 58,120,198,238, 73,243,254,202,189, 3, 71,186, 85, 53,186,145, 27, 28,162, 55,149,
+ 85,133, 94, 29,110,210, 42, 57,101, 86, 67,226,106,183,163,214,206,102,179,230,198,217,150, 33, 71, 88, 26,243,110,102, 95, 27,
+195,224,210,218,210,217,228, 13,183,111,156,112,152, 34,111,246, 19, 73, 35,195,104, 95,186,212, 19,115, 89,108,186,139, 3, 61,
+219,244,178,148,194,180,204, 8,137, 28,224, 48, 79, 20,151,204,134,213,138, 15, 63,250,192, 12,120, 73, 57,205,107, 84,148,180,
+202,124,241,249, 39,232, 60,241,244,201,119, 28,218, 64, 31,132, 16, 51, 41,102,234,126,166,205, 19, 61, 42,125,180,198, 34, 82,
+102, 16,107,185,194, 77, 68, 1,123, 63, 90, 47,212, 50, 83,131,185,210, 99, 12,164,117,162, 30, 22,164, 43,177,218, 36, 84,178,
+ 18, 19,132, 86,153,231,153,175,191,251,129,195, 92, 24, 82, 48,197, 67, 42,171,100,190,139,222, 43, 75,233,104, 19,110,223,187,
+131,222, 60, 35,166, 21,195, 74,248,224,227, 71,220,190,119,131,105,154,248,253,147,103, 76,229,104,164,177, 9, 60,199,196,122,
+ 28, 56, 28,230,107,207, 68,111,222,137, 28,173,142,179,122,158,252,236,246, 77, 62,121,252,216, 46,155,197, 12,111, 34,194, 31,
+252,252, 15, 56, 59,251,138,171,157, 93,176,114,206,215, 45, 97,119,238,220,225,189,135, 15,216,134,196, 65, 42,121,155,145,131,
+ 73,104, 37, 9,173, 66,109, 7, 36,225,192, 27,147,206,196,203,124,178, 3, 66,134, 96, 19, 68, 91, 39,198,147, 1,102,171,120,
+ 44,147,242,250,229,107, 30,220,189,203,103, 31,127,196,141,179, 59, 40,145,215, 47,159,241,245,147, 47,217, 77, 59,238,223,127,
+100, 93,211,205,190, 83, 57, 6, 62,251,241,103,124,251,236, 91,126,244,249, 79,185,184,120,203,106,104,196,205, 9,243,116, 73,
+ 10, 25, 29, 51,181, 47,148,165, 16, 36, 50,174, 86, 44,193, 38,152, 33, 5, 54, 97, 96, 55, 57,174, 84, 19,119, 30,220,231,175,
+255,159,191,228,171,175,190,226,108,187,101, 53, 12,132, 0, 83,177,236,114, 30,236,243,114,235,222, 45, 36, 8, 23,111,175, 8,
+173, 90,109,192, 34,215, 69, 69,181, 84,180,137,169, 97,139,131,128, 88, 72, 52, 90,234, 76, 13, 86,216,144,218,250, 76,212, 68,
+151, 21,113,128, 85,140,148,165,210, 41, 84, 53, 70,124,200,118,209,110,117, 50, 83,101,243, 85,141,118,250, 16,200, 26,169, 98,
+126,150,165, 55,130,248,228,235, 7, 67, 26,146,197, 54,171, 53,100, 5,167,145,105,140, 52,188, 63,194,193, 68,221, 85,206,160,
+193, 14,149, 20,169,181, 50,166,204, 31,255,163,247,248,245,175,255,158,127,254,223,252, 41, 63,254,241, 99,126,250,243,207,248,
+250,217, 43, 66, 47,102,226,244,129, 35, 6,195,221,198,152,189,226,183,209, 42, 52,175, 22,142, 26, 45, 94,233, 84, 54,123, 46,
+ 87, 51,244,206,147,153,167, 66,162,118,219, 99,167,104,197, 37, 69,186, 53,183, 53, 69,117,242,157,175,225,139,155,185,158,205,
+136,222,124, 42, 22, 87, 60, 56, 54, 71,118,198, 49,209, 60, 38, 24,181,218,122, 13, 59, 36,163,239,138, 83, 50, 42,222,210,139,
+ 13, 27,173,218, 0, 84,188,220, 37, 68,122,241, 26,221,110,144,151, 46,118,169,107,189, 59,138,197,118,241,157, 99, 55,120,163,
+105,245,231,125, 66,186, 41,128,205, 39,183, 60,248,122, 32,136, 7,182,173,173,179,105,187, 78, 22,165, 96,141,111, 72,160, 55,
+129,190, 56, 1, 46,162,165, 32, 67,164,119, 55,135,171, 33,155,143, 5, 41,209,211, 49,226,236, 20, 91,243, 10, 93,108,218,215,
+ 96, 48,161,238,201,176,128,145,246, 68, 42,161, 71,107, 99, 20, 53, 34, 93,244,149, 46,225,154,176, 26,142,205,121,106,187,252,
+ 46,234,117,183, 86,195,107,174, 96,131,230, 91,164,209, 46, 83, 66,244,179,170,218,231, 48, 58, 85,180, 91, 22,223, 21,118,203,
+ 84,219, 1, 92,220, 80, 16, 29, 81,103, 59,128,148,131,229, 17, 93,126,231,184,103,175, 70,180, 9,110, 56,104,149,107,178, 18,
+177, 81,171,197, 9, 66, 3,164, 94, 71,136,196,111, 93,200, 64, 24,162,239,190, 13,115,199, 98, 11,255,218,253, 67,171,149,174,
+201,162,114,106,237,113,221,155,147, 2, 71,143, 66,164,247,128, 28,113,123,252,127, 76,189,219,175,109,219,117,167,245,245,214,
+123, 31, 99,204,185,214,222,123,237,203,217,103,159,155,207, 57,246,177, 29,199,177, 83, 9,185, 57, 9, 85, 20, 16, 82,170,155,
+138,146,160, 36, 36,144, 0, 81, 8, 30,224, 15, 64, 66,145,120, 67, 66, 20, 15,136, 7, 30,144, 10, 21, 82, 69,133, 2, 2, 68,
+ 42, 74,225,220,202, 46,151,147,216,142,237,216,177,125,236,115,191,236,251,186,205, 57,198,232,151,198, 67,107,115, 29, 63,248,
+193,183,179,247,154,107,206, 57,122,111,237,247,251,190, 64, 36,146,252, 7, 86, 9,228, 60,218,173,185,249,139,230,246, 57,209,
+134,166, 78,144, 70,234, 86, 45,105, 13,158,158,173,180,223,248, 92,147, 0, 0, 32, 0, 73, 68, 65, 84,117, 53, 87, 49,160,125,
+ 97,223,140, 40,135,155,227,106, 43,134, 52, 69,188, 81, 87, 29,237, 41,222,251,247,224,139,122, 73,246,176,215,237, 48,110,204,
+183,188,174,157, 33,101,142,183, 19, 73,225,114, 89,152, 59, 20,109,140, 57,113,116,180, 65,235,194,165, 54,142,134,108,218,215,
+163,155, 44,237, 1,180,195,159,101,111,154, 16, 35,185, 91,146,180,174,171, 37, 67,103, 59,108,140,131,237,253,148,110,130,135,
+ 16,184,121,231, 54,173, 41,143,159,156, 35, 41,112, 62,100, 34, 74,222, 31,243, 75, 47,127,130,151,158,185,198, 63,123,248,127,
+243,224,225, 37, 71,227,134, 49, 8, 45,118, 90, 6, 73, 91, 54,201,247, 57,185,177, 44,141, 54, 69, 66, 15,180, 82,188, 86,100,
+ 24, 70,103,196,122,194,181, 89,245,112, 85,242,104,230,168,221,110,230,178,239,168,173,176,150,202,186,175,156,157, 61,225,195,
+ 71, 79,200, 18, 25,134,200,241,209,192,179,119,111,240,177,103, 79, 56,222, 12,164, 96,196,173,203,179, 61, 79,206,102, 62,126,
+ 7,194, 52,240,221, 31,157,129, 8, 39, 55,239,112,250,248, 17, 75, 91,217, 47, 43,181, 53, 68, 18, 41, 89,230,226,236,233,217,
+ 85, 38, 3,159,238,228, 96, 85,168,165,154, 89,233,214,205,107,220,188,117,211, 84,139,187, 29,105, 76,132, 96, 35,215,241,250,
+200,107, 63,241, 73,198,124,196, 92, 11, 49, 41, 49, 36,114, 20,186, 36,218, 92, 40,189, 90,152, 51, 5,114,135,160,131, 85,119,
+ 68, 9,154,168, 75,161, 22,131,104,140,227,136,100, 99,173,107, 72,244,100,159,107, 24,208, 53, 26,101,175, 53, 36, 11,107,221,
+115,254,244, 1, 63,253,249, 79,115,227,246,117, 74, 92,120,244,100,161,235, 57, 79, 30,189,199,181,107,183,184,113,251, 54,187,
+203,115,202,229,158,180,221,144,211,196,229,217, 19,238,221,123,134, 87, 62,249,113,190,245,141,111, 48,140, 35,115,153, 9, 12,
+196,188,101,185,188,164, 45, 51, 49, 10,151,235,138,236,149,202,204, 81, 22,174,143, 35,103,187, 74,185,124,202, 18, 58,211,176,
+165,158, 63,228,255,250,127,127,155, 77, 78,196,148, 40,218,201,205, 70,167,157,206,115,247,110,210, 66, 97,147, 55,212,102,117,
+163, 54, 23,152, 6,235,138,235, 10,205, 94,183, 30, 43, 53, 88,224,172, 55,147, 92,175,161, 19,230,206,144, 18,139, 64,148, 78,
+144, 17,154, 16, 83,177, 92, 72, 80,122,180, 47,218,220,125, 58,212, 42,213, 97, 99, 41, 5, 82, 43,246,122,107, 36, 53,231,102,
+ 15, 6,248,208, 96, 55,178,222,149, 82, 87,131,184, 52,179, 47, 50,101, 18,209, 86, 44,221,136,132, 97,176,124, 70,107,157, 82,
+ 22,219,195,138,243,193, 91,231, 83,247, 78,248,252,167,158, 35, 72,224,179, 63,245, 19, 60,220, 95,242,198,155,239,242,211,191,
+250,243,124,254, 39, 63,207, 87,191,250, 58,143, 30, 63,245,224,151,203,172, 58,148,110, 40,215, 32,137,185, 55,122, 42,136,250,
+200, 88,171,123, 31,108, 52, 30, 53,162, 84, 74, 89,141,224, 25,157,208, 22, 44,117,236, 74,121,151, 43,205, 6, 38,233,157, 33,
+195, 94,149,156, 6,180, 85, 90, 15,104, 86, 66, 55, 3,163,101, 29,186,113,239,187,173,207,214,197, 46, 95, 99, 12,228,148,217,
+215, 66, 23, 51,133,197, 14, 89, 58,189, 8,213,235, 94,177, 91,200,186,134, 64,211, 21, 82, 96,168, 54, 9, 80,237,228,104,235,
+183,174, 21,233, 38, 67, 65, 33, 54, 75,245, 91, 23, 91, 73, 81, 40,181, 34,205,220,245, 42,157,126,133, 79,117,210,156, 8, 97,
+237, 54,182,246,236, 18,193,234,101, 81,236,125, 96,162, 46, 91,251,150,106,249,136, 32,102, 32,109,213,130,143, 70,133,115, 13,
+108, 16, 84, 44, 72, 43,154,160, 27, 6, 56,133, 64,245, 42,158,115,184,204, 93, 78,240,223, 27, 40,245,170,185,116, 72,194, 91,
+205,218, 66,125, 7,159,187,184,150, 24,137,246,250,151,195,119, 80, 53,218,157,246, 43, 21,184,197,212,148,205, 96,251,252, 46,
+ 29,105,163, 61,107,253,182, 47, 1,195,200,170, 32,107, 37, 37, 49,184, 64,143, 54,162,178,211, 70,184,210,208,169, 90,151,208,
+ 14, 84,110, 64,234,135,164,186, 5,168,154,167, 66,237,228,237, 6, 41,181,240, 4,197,228,243, 7,146,173, 96,163,132,210, 12,
+177, 42,118, 48,179,189,191, 8, 34, 3, 18, 32,183,102,191,228,238,156,112,151,148,116,133, 24,204,201,107, 50, 0,163, 25,217,
+ 15, 96, 29,192,152,212, 82,251, 61,160, 33,217, 11, 91, 26,113,204,126,160,176, 95,106, 76,163,215,173,108,111,108,183,111,117,
+144,191,194,182, 49,100,251, 37,149, 82,168, 42,104, 75,180,181, 80,221, 11,108, 60, 94, 11, 15,170,107, 92,109, 76,116,168,116,
+ 28, 14, 61,234,144,128,142,196, 12,170,204,107, 49,171,211, 24,141, 19,109, 6, 21,242,118,226,198, 96, 39,239,117, 94,160, 43,
+227,144, 8, 83,160,148,217,107, 19,209,236, 82, 13, 98, 26,208, 84, 8,181, 49,215,143,200, 81, 74, 53,253,163,155,232,172, 50,
+209,145, 24,185,125,231, 14, 83,178, 7, 75, 76, 66, 40,157,179,253, 76, 30, 39,226,124,202,239,252,246, 23, 25,179,240,254,187,
+ 31, 16, 66, 99,183, 44, 76, 1,171, 81,116,227, 24,132, 49, 33, 37, 64, 14, 72, 74,104, 19,242, 80,233,209,117,168,181,211,197,
+ 60,191, 53,194,102, 18,180, 26,227,120,202,182,255,123,252,244,140, 55,223,122,151, 16,237,195, 57, 36, 59, 88,244,106, 65, 47,
+ 92, 63,155, 98,166,105, 98,110, 74, 92, 45,216,168, 49, 48,151,200,163,211,133,207,188,146,121,249,185,219,252,240,157, 5,136,
+236,207,247,188,254,163,119,152,231,234, 55,232,200,102, 24,105,170, 92,238, 47,237,195,153,178,237,167,130, 50, 13,147,141,185,
+ 75, 33,244,206,152, 3,159,122,237, 21,174,167,193, 89,229,129,181, 84,134, 33,147,198,224,156,249, 4, 17,198,104,155,173,178,
+159, 13,139, 57,118,136, 66,209, 13,194,130,148, 70,141,118, 98,207, 17,234,140, 57, 15, 74,179,155, 88, 24,145, 97, 36,230, 72,
+216,175, 72,180,101,251, 10,132,170, 72,183, 41,130,166, 68, 47,129,211,243, 83,242, 24, 57,121,230, 54,219,219,119,185,125,251,
+ 14,127,254,173,111,178, 59, 61,227,214,141,187,196,205, 17,143,159, 60, 38,213,202,144, 70,186,116,122, 61, 99,119, 49,243,210,
+189,231,185,255,240, 17,105,216,162, 41, 50,181,153,186, 40,243,254, 28,213, 29,183, 55,199, 44,219,213,224, 54, 85,137,121,195,
+178, 22,206,215,194, 26, 43, 12, 9,221,237,185,118,107,203, 63,255,202,215,248,240,193,251,108,199,145,101, 53,190,185,138, 92,
+237, 92, 63,251,218,167,121,249,149,123,188,240,226, 51,156,157,239, 41,203, 66,158, 70,211, 74, 14, 22,214,154, 47,149, 20, 44,
+208,104,208, 21,101, 84,161,171,213,172,114,136,172,116, 90,237,164, 60, 88, 0, 43, 71,187, 92,116, 19, 94, 68,215,107,244,222,
+104, 45,120,170, 56, 17,195, 96,128,160,102, 33,168, 44,182,183,109,201, 40,103,181, 99,148, 76, 34,189,172,100,177,110,178, 86,
+ 35,209, 73,109,254,157, 98,127, 31, 85,179,156, 33,198,215,200, 49,217, 45,208, 84,112,180,218, 88,214,153, 59,119,174, 65,142,
+148,186,227,229,151, 95,228,209, 7,247,161,118,158,121,225, 54, 47, 60,127,155,135, 15, 30, 59,142, 89,200, 89, 89,215,234, 41,
+243, 78, 43,123,243,198,123,139,162,225,135, 15,223, 27, 15,195, 8,177, 82, 84,136,105,180,118,105,237, 31,133,180,204, 49, 77,
+ 91, 59,201,235,150, 68, 33,183,100, 25,134, 96,212,187,106,192,121,114,177,146, 77, 22,161,209, 89,202, 74, 10, 31, 29, 38,140,
+181, 0, 90, 97,141,246,239,197,241,197, 41, 64,109, 2,217, 19,222,118,201, 37, 6,101, 41, 51, 45, 38, 82, 41, 84,205,148,110,
+ 1,197, 36, 74, 45,133, 16, 29,215, 27, 18,134,210,177,181,218, 21, 15, 62,224,151, 72, 91,144, 23, 85,164, 26,133, 45,248,216,
+ 58, 10, 22,246,235,166, 73, 85,109,214, 59, 87,231,171, 68, 99, 30, 72,176,160,107, 28,109, 90,167,158,255, 18,172, 14, 86, 91,
+ 35, 99, 30,147,171, 80,152,211,221,170, 54,119, 55, 4,151,217,248,119,122,116,242, 99, 83,151, 52,217,180, 26, 21,127, 55, 26,
+ 7, 64, 15,147, 2,237, 68, 15, 70,166,168,246,119,112, 87,132,184, 5,146, 30,173,240,228, 20, 56,237,118,209, 24,228,240, 12,
+244, 66, 17, 54, 25, 48,132,110, 33, 73,186,162, 13,170, 6,210,225,102,218,235, 1, 31, 31,220, 9,237, 53,182,195,141,220,111,
+163,118, 28,179, 61,235, 1,179, 26,176,138, 79, 60, 32, 48,125,127,222, 91,161, 81,233, 45, 58,121,199,247, 22,213, 59,141,206,
+174, 53, 43,154,255,101,131,207, 78, 8,100, 20,178, 61,184,210,161,244,175,174,174, 12, 29,173,149,166,221,246,250, 4,219,191,
+119,171,156, 72,180,135,119,180,134,166,133,100,186, 82,122,167, 20,151, 36,116, 32, 88,128,198,127,100, 59,224, 96,234,188, 24,
+178,229, 6, 82, 99, 24, 13,118,144,212,198, 56, 85, 97, 93, 13,118, 17,170,241,155,235,225, 97,167,129,218,235, 21,102, 49, 68,
+177,219, 49, 6, 65,208, 96,224,156,165,184,254,112,200,244, 2,105, 28,216, 78, 91, 34,141, 82, 23,235,160, 23, 39, 15,181,202,
+233,105,224,104, 59, 48,104,133, 10,146, 7, 75,173,214, 70,163,177,150,195, 58,195,252,222,221, 45, 70,248, 58, 35, 74, 34, 76,
+112,114,243, 4, 17,168,107,181, 64,202,162,164, 44,158, 86,175, 12, 67,224,254, 59,111,211, 74,163, 15, 98,233, 92, 13,172, 49,
+ 18,233,244, 18, 24,162,178,236,109,236,214, 4,242, 32,132,214,145, 20,152, 91,131, 26, 24,242, 72,204, 29,213,140, 68,241, 55,
+190,123,159,243,200,205,113,226,195,119,222,225,236,226,146,187,119,142,217,142, 19,105,176,247, 74,220, 69, 46,246,197,220,208,
+165,243,248,108,207,227,243, 29,111,189, 43,150,202,119, 57,202,141, 27, 55,216,110,183,252,193,215,127,196,167,159, 54,106, 24,
+169,203,202,155,239,188,205,217,197, 41, 33, 64, 78,131, 1,113, 98,162,172,179, 51,188,147,213, 76,174,212,184,198, 58,168,205,
+250,253,175,125,236,101,158,127,230, 25,235, 5,199,234,211,167,100,187,176,170,244, 34,150,132,238, 43, 90,212,165, 58,153,201,
+193, 41,171, 88,168,102,174,198,162, 15, 3,104,107, 92,236, 22,147,178, 4,119, 58, 70, 35, 34, 70,129, 52, 4, 74, 55, 48,139,
+ 65, 61, 58, 18, 27, 75, 11, 48,129,236, 4, 25, 50, 79, 31,223,231,198,241, 77,142,211,109,234,238,146,251,239, 61,225,209,211,
+ 29,187,146,152,182, 27,230,249, 18, 26,196,235, 25, 82, 36,246,206,254,204,148,148,199,183,159,229,135,223,255, 1, 55,174,111,
+ 88,245,136, 28, 39,234,102,101,140,137,121,159, 56,159, 47, 44,232,153,132,139,186, 48, 52, 75, 11,135,152,236, 51,169,202,209,
+141,231,185,104,231,252,206, 31,254,174,121,156,171,175,206, 90,179, 26, 44,202,107, 47,125,140,103,111,221,229,229, 59,119,121,
+254,238, 11,252,159,255,236, 75,172,113, 70,210, 53,100,153,145,162,172,186,210, 53, 82, 66, 33, 20,163,172, 5,201,104,131,124,
+104, 59, 72, 67,234, 64, 14, 6, 0,210,186, 18,134,145,186, 22,242,224, 55,202,170,196,208, 41,161, 89, 27,163, 39,180, 85, 58,
+201,190,241,115,180,112,164, 67, 89, 80, 40,173,153,128, 5,165,175,179,179, 0,156,191,230,249,157, 40, 7,243,153,239, 79, 67,
+ 37,196,193,113,177,201,191, 99,204,121,221,123, 32,165,204,155, 15,158,242,206, 7,143,248,229, 95,249, 44, 66,224,100, 51,113,
+ 94,224,244,254, 3,114, 12, 44,187, 39, 76, 89,216,151,234, 59,214,236,204,132, 78,169,166,190, 18,175,234,138, 52,180,205,134,
+124,245,192,112,109,197, 87,143,214, 41, 47,173,216,119, 86, 17,154,250,228, 44,234,149, 95, 59, 70,131,179,244,216,104, 54,200,
+246, 11, 91,242,118, 94, 32,134,230, 57,159,122, 32,146, 80,181, 17,154,221,224,123,200,172, 90,160,117,198,104,135,161, 24,160,
+168,173,102,165,117, 11,233, 73,176,224, 97, 53,122, 91,210,142,180, 72, 79, 92, 5,197,122, 55, 87,249,161,195, 94,235,226,200,
+222,224,117, 84,227,153, 84,181,137,222, 21,193,180, 71, 91,239,210, 9,206, 78, 9, 65, 24, 52, 28,134,199, 24,215,170,250,101,
+174, 35,221,242, 87, 11,254, 48,148, 67, 81, 85, 28,226,117, 8,243, 43, 45, 59,127, 66,109,213,167,173, 89, 16, 87, 15,114, 22,
+ 75, 59,247, 98,191, 43,193,214,101,253,192,106,241,105,183,150, 6, 17,247, 13, 88,194, 93,130,146, 83,112,115,158, 25, 48, 85,
+ 6,187,137,215,238, 54, 64,107,159, 29,206, 21,221,167,225, 74,114,229,179,101, 28,114, 50,131,158,229,111, 76, 7,156,248,168,
+249,212, 85, 72, 86, 65,176, 15,133,120,145,255, 80, 63, 15,110,167,193, 65, 52,218,237,148,103,189, 76, 83,124, 6,215,158,181,
+ 98, 21, 51, 17,235,209, 86,119, 16, 35,131,191,145,154, 99,251,112,198,185,237,239, 53,120,152, 44, 56, 7,250, 48,102,119, 91,
+ 85, 10,209,110, 46,222, 57, 86,199, 1,118,204, 28, 36,218, 73, 41,154, 14,207, 79,209,253,128,227, 67,209,140,167,147, 45,165,
+ 89,203, 1,215,105, 95,202,226,238, 96,171, 36, 43,186,136, 33, 61,163, 80,129, 42,254, 80,142, 92,221,192,115,204, 68, 53, 34,
+221,184,201,140,181,184, 49,206, 56,188, 90,172,131, 72, 16,227, 5, 59,197,191, 53, 69, 82, 68,123,103, 45, 54,157, 32, 42,203,
+ 92,216, 12, 27,142,143, 6, 36, 40,243, 92, 88,139,105, 4,171,194,152, 35,203,190,176,239, 43,171,141, 87, 72,209, 67,111,206,
+ 43,239,173, 80,234, 33,101,233,171,140, 30, 24, 83,182, 78,230, 90,209,216,185,251,204, 61,110, 94,223,176,174,139, 5, 48,114,
+224,114, 85,118, 75,117,221,234,202, 80,162, 43,120,189,207,170,145, 50,175,204,221, 96, 49, 81, 35,227,209, 64, 40, 21,130,141,
+ 75,119,103,254,187, 31, 6,214,186, 16,106,103,191, 95, 41,125,101,119, 57,211,155, 57,181, 67,140,104, 43, 92, 63,185,206, 43,
+207,222,227,252,252,156,105,176,209,124, 45,166, 47,164, 7,206, 47, 87,219,163, 55,179,254,153,114,209,216,235, 81, 2,146,236,
+ 97,188,223, 45,140,195,196,251, 15,159,178,219, 85,134,105, 98, 89, 42, 79,158, 60,162,180,206,144, 12,237, 57,109, 55, 44,243,
+106,161, 25, 57,124,117, 53,180, 25,213,111,183, 59,183,239,144,222,184,125,231, 38,159,124,245,227,128,176,150,149,216, 18,109,
+ 84, 36, 52,250,206,124, 4,195, 54,146,100, 68,107,161, 73, 52, 33, 82,239,236,171,249,189, 45, 45, 92, 25,232,116, 17,230,106,
+ 97,152, 90, 76,144, 49, 69, 33,110,146,173, 4, 98, 36,199, 74, 93,172,195, 60,201, 64,165, 82, 90,100, 28,187,245,144,207, 3,
+161, 87,130, 90,120,115, 58, 58,161,212,153,151, 94,121,133,243, 71,103,108, 71,227,235,223,127,116, 97, 95, 66, 34, 70,102, 28,
+ 3,235,185,237,192, 95,249,216,203,156, 28, 95,227,244,209, 19, 72, 39,196, 80, 73,155,145,105, 58,102,185, 88,200,195,132, 14,
+130,214,206,197,211, 74, 30, 38,210, 16,152,106, 35, 78, 91,230,221, 3,214, 53, 82,134, 61, 95,250,163,223, 99,183, 59,227,218,
+116,100,187,205,214,173,173,160,202,141,227,235,188,246,202, 43, 92,191, 61,241, 51,191,240, 89,222,126,184,242,246, 91, 31, 18,
+100,176, 67, 80, 48,126, 69,171, 29,201, 43,109,113, 14,120,233, 6,101,138,209,250,185,105,195, 32,205,216, 2, 13,122, 89, 65,
+163, 93,150,162,250,103,220,190,160,213, 83,211, 18,212, 32, 43, 90,208,176, 26,111,163, 71,155,200, 37, 33, 13, 25, 74,165, 72,
+ 66, 82,163, 22,155,208, 5,241,247, 31,106, 89, 30,127,135,216, 13,168, 59, 65, 81,157,163,126, 96,122, 91, 85,203, 90, 64, 10,
+162, 44,251,198,119,127,244, 1, 95,248,194, 79,178, 61,185, 78,210,202, 75, 47,190,196,151,191,250, 13,110,159,220,225,231,255,
+149,207,242,224,209, 87, 56,127,208, 73, 40,117,221,219,207, 34,209, 96, 77,126, 8,175, 98,170,226, 20, 5,165,153, 84, 73,149,
+170,133,168,150,223,168,169, 35,205,130, 97, 77, 14, 13, 18, 87, 46,119,251,172,116, 96,208,200,190, 54,178, 40,154,226,213,207,
+ 21, 83,183,137, 21,202,218,108,109, 23, 35, 52, 45,176, 26,238,186,246,110,193,178,161, 19,178, 88, 7,187, 27, 50,185,118, 37,
+209, 41,218, 73,254,200, 13,226, 54,198,110,249, 4, 11,182,205, 36,196,184,143, 78, 36,181, 91,173,255,121,221, 16,176,161,117,
+ 36,155, 94,218, 70,228,201,219, 83,118,131,175,168,173,168,220,194,167,171,101, 80, 66,254,136, 30, 73, 55,177, 74, 79, 6, 98,
+ 49, 61,134,169,172,107, 53,197,177,198,106,207, 10, 55,174,225,147,230,238,232,229, 32,166, 60, 86, 9,132,118,168,251, 85,247,
+ 45,153, 99, 35, 71,203, 95, 5,241,252,121,199,201,118,234,188, 14, 92, 74, 99,239, 37,123, 14,219, 97,203,198,246,122,197, 37,
+129, 78,179, 27,244, 85,101, 60,146, 77, 78,165,133,174, 25, 13, 54,149,106,221,134, 84,205,157, 5, 16, 89, 15, 90,214,110,207,
+217, 68, 12,164, 16,157, 65,174,214,107,108, 62,126,240,158,122,208,230,227, 39,220,153,235,150, 26, 71, 48,210,236, 47,101, 24,
+209, 78,145, 67,149,196,212,145,110,138,135, 96,200,191,238, 65,173, 32,205, 61,196, 22, 86,146, 48,248, 88,197, 30, 76, 77, 43,
+245, 48, 37, 16,155, 2,196, 96, 15,134,216, 43,122,160,240,248,232,195,234,201,217,190,172,171,186, 26,208, 2, 19,210,149,165,
+ 44,180, 46, 76, 41, 80, 90,101,237,182,247, 72, 41, 56, 84,193,170, 52,163,218,190, 78, 98, 50,251,213, 90,104,193, 69, 52, 46,
+139,104,173, 91,253, 95, 93,106, 47,145,237,144,104,106,149,156, 41,102, 79, 79, 30,144,141,254, 24,105,246,165,223,122, 99, 93,
+102,186, 54,114,206, 28, 31,143,164,152, 89,246,123, 74, 49, 5,173,168,112,180, 61, 98, 24,182,108,143, 34,109,189,224,244,236,
+ 41, 41,142, 76,195,192,126, 94,216, 45, 59, 11, 30,250,120, 80,146,241,247,107,235, 12,209,198,244,231,187,217, 30,112, 99, 98,
+ 95, 86,110,132,137,205,148,145, 96, 24,218, 60,175, 44, 40,218,138,219,137, 34,121, 18,250,178, 34, 26,145, 60,144,147,157,202,
+251, 82,216,215,202, 48,108,152,219,202,190, 88,216,173,117, 40, 8,236,247,208, 27,165,194,126,217, 49,239,119, 22, 66,211,230,
+104, 80,123, 51,175,165, 80,215,194, 7, 79, 78, 25, 6, 59,125,158,183,133,122, 81,105,197, 44,106, 65, 59, 83,142,214, 38, 80,
+ 24, 69,252,205,108,159,135, 49, 11, 55,142,224, 51, 47, 14, 60,255,151, 62,205, 48,101,182,227, 72, 41,149, 63,254,118,226,171,
+223,122,135,162,118, 43,159,119,179, 7, 28,133, 24,226,149,124,232,176, 63,106,221,146,244,215,182, 19,159,120,229, 19, 72, 76,
+204,117,161,197,142,200,196, 96, 79,127, 52, 38,100, 80, 66,129,158,253,125,145, 77, 97, 42,173, 18,242,100,212,180,181, 94, 73,
+ 70, 74, 83,179,208,181, 78,111, 43, 61, 36, 66, 30,136, 34, 76, 83, 36,135,228,182,186,206, 13, 25, 88,131,237, 39,135,148,209,
+162,198, 27,143,221, 72,107, 23, 51, 77, 43,155,173,112,237,250, 17,105, 28,168,161,208,119,149,122,217,145, 38, 72, 28,220, 82,
+149,169, 23, 54,186, 95,180,240,236,189, 59,172,203, 76, 30, 97,115, 52,176,153, 34, 83,218, 32, 49,114,150, 26,189, 4, 36, 77,
+188,241,193, 59,124,255, 47,254, 37,239, 61,188,228, 95,253, 55,127,141, 23,110,159,112,255,233, 99, 54, 57,113,255,188,114,255,
+205,111,241,250,159,127,139,164,201,104, 94,193,236, 88, 65,132,220,224, 11, 63,251, 89, 94,126,245,121,126,245, 23, 63,207,245,
+ 27, 39,252,241,239,254, 30,125,169,200,112, 4,177, 18, 82, 96,221,173,212,166,164, 24, 73,161,179, 4, 87,125,214, 74,234,149,
+150, 19,251,176,103,179,102,210,144,216,247, 10, 41, 19,168,158,194, 54, 11, 97,145, 10,210,172,119,221,103,164, 11, 34, 11, 61,
+ 25, 12,164, 6,131,183,196,195, 84,115, 53,218,151,118, 79, 98,247,106,171,145,106, 18,149,214,176,176, 45,209,222, 19,161, 89,
+ 48, 83, 18,181, 86, 98,239,144, 51,193, 27, 59, 26, 26, 42,153,128,201, 63,114,219,240,238,251, 79,121,251,141, 15,249,153, 95,
+121,142,210,148,187,183, 70,222,251, 96,228,242,195, 55,248,149, 47,124,129,111,191,245,128,119,238,255, 9, 25,131,175, 84,231,
+ 74, 36,123, 44,218,119,145,163, 64, 27,208,171,184,145,172,145, 9,180,161, 33, 29, 66,143,172, 93,136, 93,201,217,162, 66,173,
+117, 18,198,200,168, 2,161, 52,246, 84,136,209, 15,201,254, 90,132,108, 45,165,160,164, 46, 36,237,214, 60,104, 54,249, 12, 67,
+242, 80, 86,165, 39, 33,117, 59, 68,175,218, 12,132,164,166,123,238,221, 58,230, 85,108,154, 90, 90,163, 20,131,170, 92,161,108,
+237, 25,233,220, 52,123, 88,151, 67,253,181,118, 11, 76, 7, 75,174,171,119,205,163, 21,220,189,202,102,147,225, 38,226,121, 1,
+211, 71, 87,181, 62,123, 10, 92, 29,194,162, 24,114,182,205,102, 69, 36, 10,201, 9,248, 49, 56,159, 94,149,168,246,190, 45,162,
+142, 97, 63, 72, 82, 20,113,238,132,221,122,195, 21, 61,191,169,173, 47, 67,178,223, 75, 9,120,178,221,228, 91,165,217, 13,218,
+112,252,141,216,131,133,231, 13,254,225, 25, 53,107, 40,129, 5,103,123,112,104, 77, 15,144,220,223,174,234, 77, 13,207,106,116,
+151,221,120,239,191,122,131,236,144,141, 10, 13,107,173, 56, 52, 46, 73, 72, 38, 97,145,238, 15,112,239, 25,251, 13,221, 78, 39,
+214, 61, 69, 12,242, 18,100, 32,118,189, 26,165,212, 90,125, 28,143,141, 27,176,177,182, 5,161, 13, 26,161,190, 75,183, 7,180,
+191, 80,193,126,201, 7, 49, 34, 90,209, 46,238, 47,118,231,119, 48,236, 97, 47, 46,136, 73,209, 3,122, 7,227,146,189,216, 17,
+ 19, 12,180, 3,130, 86,172, 94,166, 21,138, 6,211,233,245,193,156,209,221,189,182,193, 60,242,149, 72, 45,102,114, 34, 22,203,
+ 5, 96,163,123,251,240,171,133, 35,186, 33,110, 27,141,144, 44, 4, 33, 93,136,121, 68,164,123,182, 32,144,114,186, 26,247, 27,
+119,224,144,128,180, 27, 92,202,217,210,158, 94, 43, 25,183, 19, 65, 2,203,126, 54,108,237, 58,219,158, 44,140,244,181,179, 72,
+229,198,245, 13,167,231,123,214, 82, 56, 57,217,178,174, 51, 23,151,123,148, 67,208,195,214, 24, 70,111,181,244,253, 56, 68,118,
+203,138,106,119,163,158,141,234,147, 36, 36,139,141,138, 52,178,221,142, 86, 49,146,137, 44,246,128, 13, 65,217, 71, 76, 9, 41,
+216,151,205, 97,198, 85, 27, 15, 31,159,185, 97,201, 12, 66,218,109, 10,178,219,207, 87, 13,130,174,134,125,173,158,174,109,116,
+ 68,237,176, 87, 74,229,242,114, 79,171,141,185, 99,107,131, 86, 89, 75,181,233,141,218,232,115,140,145,107, 83,224,232, 40,115,
+ 60,141,228, 8, 23,115,225,253,135, 23,132, 40,156, 92, 59,230,153,187,183,248,236,231,238,113,237,232,136,208,133,126, 13,250,
+144,248,209,123,143,249,224,137,241,216,151,121, 37, 70, 83, 43,134,195, 41, 55,132, 43, 54,117, 8,129,227,141,240,242,171, 47,
+113,124,235,152,185,237,109,199,218,149, 16,173, 27,223, 53,131,116, 50,202, 58, 40,173, 42, 67, 26, 96, 46, 54,158, 29,133,210,
+ 87,250,162, 36, 79,219,159,158,159, 83,195,200, 52, 5, 82,142,212,139,204, 38, 7,242, 16,144,176, 97,136, 66,169,123, 82, 26,
+144,150, 57, 95, 42,140,208, 16, 6, 12,101,185,246, 25,109,157, 33, 29,243,240,244, 9,219,188,225,222, 11, 47,241,210, 43,175,
+176,191,216,241,254,251,239,115,185, 91, 56,171,123,242,104, 43,170, 90, 43,210, 77,248, 48,164,204, 16,148, 60, 30,241,224,236,
+ 67,110,156, 28,147, 99,102, 36,115,121,121,193,176,189,206,245, 27, 55, 41, 97,143,180,153,227, 33,242,111,253,234,207,242,143,
+127,235,255,227,135,223,252, 51, 94,249,171,127, 13, 41,143,184, 44,149,203,167,231,124,253,235,127,202,249,197,142,113,202,126,
+152, 86,146, 4,150,165,242,217,215, 62,198,223,254,219,127,149,155,215,239,240,211,127,233, 39,249,227,111,191,206,215,190,249,
+ 93,114,204,166,115, 46, 70,236,139,193,214, 71, 75, 41,132, 16, 25,137,212,212, 8,177, 80, 27, 30,160, 11, 84, 10,178, 20, 36,
+ 43,162, 6,242,208,214, 88,113, 59, 89, 59, 48,252, 45, 65,175,162, 70, 52,108,145, 82, 59,227,212, 89,181, 17, 99,182,112,108,
+107,254,127,233,214, 7,239,213, 56,229,106,198,189,142, 53, 43, 74,175,100,207,240, 32,129, 80,234, 85,143, 91,187, 9,168,122,
+240,148, 80,176, 42, 98, 18,203, 94,156, 95,118,190,254,231,111,240,185, 95,250, 5,198,227, 35,230,101,229,103,127,246, 83,188,
+253,198, 19,198,113, 34,135,201, 30,132,254,224,150,226,171, 73,177,160, 86, 12,206,202,168,133, 76,186,170, 87,245,222,233, 61,
+ 32,139,113,226, 27, 21,169, 70,207, 92, 75,247, 84,186,218, 77, 59, 8,210,213, 24, 29, 62, 25,109,158, 1,146,152,109,229, 68,
+ 96,233,133, 93,171,100, 15,136,169, 6, 98, 74,116,141, 22,226, 83, 11,125,117,167, 37,246,213,172,122, 81,146,161, 94,155,135,
+242, 74, 53,107,156, 54, 15, 18, 30,180,168,182,143, 47,116,127,168,217, 51,196, 24, 16,118,144,235, 7, 98,155,155, 56, 83,114,
+ 67, 91,179, 86, 83,239,157,144,178, 61, 87,106,197,190,144, 12, 66,102,207, 28,155, 38,118, 7,207,224,245,226,126,245, 8,179,
+ 74,112, 56, 64,113, 16,130, 10, 33, 53,215,234, 30, 24, 34,166, 13,173,109, 37,165,228,171,102, 27,125, 75,179,207,164,134, 0,
+213,122,248, 68,185,162,165, 70,239,155, 27, 67, 71, 88,187,117,224, 15,109, 2, 61, 24, 53,241, 94,186, 39,204, 74, 3,201,149,
+208,141,211,112, 48, 8,246,110,220,130, 26, 2,117,245, 92, 80,244, 32,164,115, 30,232,129,222,162, 77,124, 61, 0,221, 67, 32,
+ 17, 14,198,151,232, 59,101, 91, 67,137, 58,192, 36,224,255, 52, 39,187, 97,137,107, 27, 81, 20,132, 4,177, 16,163,239, 54, 60,
+ 28, 96,189,250,131, 30,211,217,189,158, 2,183,241,143, 87, 67,104, 87,134,183, 32, 1,180, 82,171,213, 71, 98,192,195, 86,246,
+130, 36,156,235,235,152,189,230, 55,100, 9, 30,224, 11, 88,250,184, 98, 50, 21, 44,181, 26, 49, 90,156,117,237, 3, 18, 50,205,
+229,243, 65,140,246, 22, 90,167, 5, 27,193,116, 49, 76, 96, 45, 13, 17,200,201, 60,181,218, 10, 53, 24, 58, 54,146,157,246,101,
+125,102,105,248,129, 37,153,250,176, 11, 26, 33,135,104,111,202, 44, 76, 10,211,100,191,152,182,174,200,112,228,183, 78,241,160,
+ 29, 68,201,140, 25, 90, 84,144, 72, 9, 43,177,118, 46, 46, 27, 23,151,231, 4,160,172, 51,101, 89,232,205, 70,128, 6,146, 56,
+120,169,109,183, 57,109,182, 86,153, 41,157, 97, 72, 30, 72, 52, 74,154,170,249,130,163, 8,195, 96,183,173, 24,204, 45, 94,189,
+ 66, 88,138,237, 71,131, 40,217, 73, 69, 74, 39, 12,153,107, 17, 46,231,149,214,187,157, 50, 99,100,183,236, 41,243, 74, 41,197,
+122,173,181,153, 94, 16, 12,231,170, 54,121,104,193,198,130,251,181,176, 91, 10, 77, 3,177, 41, 75, 95,108,175, 28,229,106, 63,
+219, 85, 56,187,216,115,243,214, 17, 47,220,189,201,118, 26, 8, 1,166,203, 29, 79, 78,247, 92,206,133,247, 31,158, 49,127,179,
+243,253,247, 30,147, 37,178, 44, 11, 50,100, 46, 47, 42,251, 98,163,211, 86, 26,173, 22, 35,198,137, 31, 60, 85,220,107,175,132,
+152, 56, 30,133, 87, 94,122,142,151, 94,122,158,108,154, 35,180, 71, 82, 50, 92,235,229,126, 53,216, 69,194, 38, 60, 8, 27, 87,
+207,150, 12, 90, 96,109, 98,159,137,158, 88, 91,101, 85,101,233,145,180, 53,200, 81,212,196,148, 64, 54,137,156,196, 2, 48, 61,
+ 81,155,133,107, 98, 80, 36,217, 94, 81,171,210,227, 64,105,139, 33,117,215,142,234,142, 71,167, 15,185,182,221,146,114, 36,111,
+142,104, 33,178,238, 47,104,177,208,150,106, 7,148,100, 56,231,107, 99,164, 4,225,242,242,146,123,183,110,178,157,174,113,122,
+121,206,230,198, 77,226,118, 67, 84,229,230,120,194,121,233, 92,238,247, 44,243, 5, 79, 30,207,164,124,194, 51,175,190,202,223,
+252,187,207, 51, 78, 71,156, 94, 60, 33,167,196,124, 17,121,253,251,223,226,253,119,223, 50, 67,151, 66,202, 3,181, 22,150,181,
+114,231,218, 9,127,231,239,252, 27, 60,243,194, 61, 94,123,238, 99,252,232,221,199,252,230,111,254, 54,215, 82,102, 31, 96, 94,
+ 86, 87,102, 6, 42,145,208, 23, 70, 73, 20, 85,175,232, 84, 40,150,124, 22,237, 70, 12,139,141,208, 64,122,116,166,183, 65, 61,
+162, 70,198, 33,217,195,172,119, 72, 3, 33,172, 76, 49,176, 56,234, 25, 9,148,101,177, 3, 61,137,160,102,107,236, 10, 3,135,
+ 68,182, 16,123,163,214,224, 15, 89,219, 77,214, 90,140,214,136,133,106,161,177,182, 70, 36,145, 67,183,201,137,102, 11,240,178,
+ 56,216,198,190,199,100,200,124,239, 71, 31,112,254,225,135, 60,115,235, 46, 31, 60, 62,231, 99,227,134, 62,192,255,246,155,255,
+132,215,223,120,199,107, 74,141,192, 96,187,211,216,208, 28,232,171, 35,194, 61,248,101, 40,236,195, 77, 83, 8,158,176, 86, 21,
+219,173, 11,204,205,196, 86, 72, 71,101,180,254,123,183,149,101,105, 46,205, 1, 50,166, 81,238, 10, 73,171, 81,231, 14,163,112,
+ 23, 36, 73, 48, 99, 94, 90, 44,159,163,193, 70,201, 7, 76,111, 11,182, 30, 77, 77,161, 46, 38,104, 81, 11, 19,174,118,194, 55,
+175,184, 90,189,236, 80,243,108, 46, 73, 9,106, 83,202, 72,178,176, 94,244,134, 12, 30,112, 68,200, 4, 22,237,118,224, 10,242,
+ 81,128,185,121,170,221, 5,172, 92,221,220, 33, 58, 65,207, 86,104,135, 84, 63, 87,127,110,196,171,105,106, 15, 63,237,130,253,
+241, 62, 13,241, 27,118,215, 78,204,201, 46,134, 14, 27,178, 29,125, 53,138,101, 14,134, 1,143,241,202, 56, 26,156,173,110, 59,
+241,118, 72,166, 89,126,204,106, 8,244,104, 35,254,160,145, 16, 44,249,110, 84,216, 6, 45, 56,152,218, 2,112,246,171, 51,126,
+133, 98,147,165,222,140,185, 18, 98,247, 93,126, 50,130,159,135, 3,175, 2,118,189,144,130, 90, 7,179,119, 51, 78,137, 26,241,
+205, 64, 11, 7, 75,141,221,200,164, 5, 35, 53,181,110, 86,161, 32, 62, 78, 72,158, 92,183,113,150,136,141, 60,241,211, 17,213,
+ 8, 79, 33,124,100, 36, 67, 13, 36, 96,141, 52,179,179,105, 87, 36,100,242, 16,252,102, 15, 67, 74, 14,217,143,150, 80, 87, 75,
+166, 30,182,162,170,205, 18,204,189,163, 93,168,181, 26, 28,165, 7,179,244,196,140,180,238,135,134,136,100, 33, 5,136, 61,218,
+ 45, 52,170,211,131,140,240, 35, 18,172,146, 16,236,127,223,123, 5, 18, 67,238,148,165,179, 84,123, 16,104,171, 70,217,171,205,
+119,112,130,106, 1, 49, 37,108, 80, 53, 44,101, 50, 84,107,168, 54,182,243,207,222, 85,199, 48, 96,187, 43,130,178,149,100,142,
+238,218,124, 39,110, 15,192,218,109,218,112,237,228,132, 86,109,135, 29,195,196, 52,116,170,227, 24,113,178, 89,138, 66, 47, 51,
+213,157,200,165,117,146, 7,229,134, 40, 52, 45, 60,189,188, 32,146, 72, 17,166,154, 32,250,161,168,137, 65, 25,180,208,170,157,
+246, 85,188,179,218,237,182, 58, 76, 66,138, 3,219,156, 80,133, 41,192,233,249, 5,235,188, 51,235,158,133,109,201, 18, 41, 69,
+217, 78,137,227,227,145, 33, 26,144, 98,209,149, 7, 79,102,206, 46, 58,107, 93, 25, 36,144,167, 76,148, 64,204,206,184,109,176,
+155, 59,203, 98, 15,225, 90, 10,247, 31,158,145,115, 38, 38,147,125,172,171, 82,151,206,195,229,130, 7,143, 47,208, 31, 28,122,
+157, 86,241, 24,182, 91,162, 88,167,179,121,151,180, 53,131,107,132,232,252,110,135, 58, 36, 81,142,143, 54,220,188,123, 15, 66,
+100, 93,155, 33,126,155,245,131,199,203,202,118, 51, 49, 12,248,225,117, 36,212, 74,149, 78,152,205,123,189, 34, 94, 65, 51,198,
+122,171,149, 46, 66, 74, 27, 98,109, 68, 15,152,230, 40,164, 41, 51,165, 72, 91, 58, 75, 95,201,219, 13,169, 64,237, 43, 61, 7,
+ 66,232, 72,176,132, 60,205,216,219, 83, 78,244,165,176,172, 59,238,220,185,197, 56, 29,115, 52,110,120,251,221,119,157,200,167,
+136,195,111,142, 54, 91, 36, 30,209,150,153,181,236, 41,109,207,115,207,127, 30,137, 35,183,142,174,113,253,248,196,229, 28,157,
+ 16, 35,203,110, 79, 93,206,121,250,248, 41, 31, 60,248, 11,100, 21,138, 44, 28,111,175,243,228,236, 17, 2,156, 94, 92,242,238,
+123,111,241,250,155,223, 51,217, 68, 72, 22, 48,170,230, 96, 8, 10,127,235,215,127,133,159,251,185, 95,226,249,123,183,169, 40,
+191,249,191,255, 54,231,187, 29,219,163,103,200,251, 25,149, 21,141,153,190,218,225, 57,137, 85, 52, 67,239,164, 80, 44,144, 25,
+ 19,189, 45,110,159,138, 72, 76,212,208, 25,186,117,162, 75,183,207,123, 8,145,218,172,254, 26, 99, 48,137, 70,243, 21, 26,157,
+ 36,141,158,162,161, 93, 99,182,239,135,234,208, 36, 85, 10,193,157,230,126, 11, 61,180, 98,192, 45, 95,230, 4,151,152,233,189,
+218,247,131, 65,174,205,180, 21,189,178, 41, 7,126, 67, 50,166, 6,141, 17,225,241,147, 75,190,243,237,239,241,153,207,253, 20,
+ 75,203, 60,121,116,193,171, 47,156,240,197, 40,252,232,135,111,179, 73, 27,187,225,246, 78,151, 74, 78,241,202, 3,177,132,132,
+184, 69, 82,131,101, 15,160, 16,100,164,187, 89, 50,134, 78, 88, 18,107, 48,149,241, 1,105,174,181, 81,180,216, 4, 64,141,207,
+208,187, 53, 75, 52, 88,195, 40, 17, 88,151,197, 30, 56,201, 46, 48, 93, 2, 34,110, 78,155,103,203, 23,137, 73,153,114, 78,244,
+214,232,165,216,224, 59,226,162, 43, 31,249, 54,161,246,118,101, 45,236,181,217,136,185, 91,112,109, 12,216,235,233, 21,105,237,
+ 54,237,236,218,161,122, 88, 9, 37,117, 69, 7,171,200, 17, 44, 7, 97,245, 61,159,104, 4,187, 20,212,106, 42, 86,106, 37,144,
+168,158,121, 32, 66, 47,106,159,239,234,172, 19, 55, 69,166,100,248, 90,227,230, 67, 17,181, 85, 10,130,136, 61, 88,137,253,176,
+ 12,183,223,177, 4,106,107, 68, 53,214,255, 90,237,233, 26,162,253,158, 98,140, 32,134, 67,239, 98,183,229,160,226,211,101,245,
+219,127,191, 34,233, 29, 4,117, 65, 15,127, 23,191, 93,247,112,197, 30, 0, 65,181, 19,181, 91, 5, 15, 91,143,107, 52,158,139,
+144, 12, 14, 20,236,168, 38, 10,107, 48, 38, 31,254,121, 72,138,171, 40,187,177,103,171, 19,184, 98,180,196,104, 88,171,119,161,
+ 29,107,231, 33,163,120,216, 99,168,153,109,122,181,157,136, 4, 3,103,168, 68, 82,138,136, 66, 72,197,194,113,221,110,165,189,
+ 55, 3,239,184,153, 39, 28,198, 49,189, 95, 9,101, 98, 16, 99,165,251, 41, 80, 87,179,210,136,116, 11,155, 5, 83,120, 74,116,
+165,156, 20,219,216,244, 78,110,205, 79,215, 21,218, 74, 11, 25,165,152,148,160, 4,122, 28,140, 31, 31,220,178,213,237,118, 20,
+ 92, 36, 35, 98,111,164, 33, 4,106,179, 15, 86,148, 12,155,200,160,135,137, 67,247,157,136, 5, 70,114,202,148,110, 1, 12,181,
+ 99,153,253, 12, 46, 59, 40,172,126, 88,112, 28,110, 12, 72, 55,172,230, 50, 23,154, 86, 82, 26, 24,178,133, 67,182, 41, 51, 76,
+ 25, 6, 57,128,208, 9, 58, 82, 75,161, 55,168,171,209,228, 74, 45, 52, 58,165,118,127,182,135,171,201, 74,175,202, 52,142,116,
+237,228,113, 36, 7, 11, 3,238,206, 47,109,183, 44,145,121,159,201,201,216, 1,196,200,133,238,201, 49, 16,253, 48, 17,147, 85,
+ 45,186,118,162, 24,124,133,216, 81,215, 80,174,193, 12, 65,183,175,223, 96,165, 19,122,103, 89, 77,131,153,177,196,189,134, 68,
+ 28,237, 65,118,146,182,156, 94, 60,162,212, 75,114,132, 33, 91,170,181,183, 64, 41,237, 96, 18,116,220,174,173, 51, 74, 81, 46,
+215, 64, 88,103,118,187, 98,135, 28, 71, 47,198,136,189, 7, 60,112, 25, 60,100,169,189, 49,215, 66,173,118, 91,136, 34,158,115,
+177,204, 1, 98,163,218,222,141, 76,181,219,207,124,237,235,127,102,117,154,174,164,136,221,166,163,221, 92, 62,253,201, 87,248,
+252,167, 62,205, 78, 45,104,212,235, 66,206,214,123,157,207, 43, 90,171, 77,148,138, 88, 74,190, 43,244, 68,148,110, 35,225,156,
+ 24, 80,138, 38, 98,183,230,129,113,160, 23, 82,177, 20,118,163,160,251,128, 12,137,148, 7, 68, 26,101,223,136, 33, 33, 49,243,
+248,201, 3,234,218, 24,227,200,115,207,220,227,230,241, 17,223,127,250,128,211,139, 66, 41,141,233,200, 42,111,173, 23,110, 78,
+215,120,178,238,169, 42,164, 52,113,237,198,109,222,123,247,148,124,156,168,122, 73, 42,129,186, 68,150,181,128, 10,155,156, 89,
+ 7,248,133, 95,248, 9,110,110, 38,222,249, 96,199,233,121, 67,163,178,159, 19, 15,239, 63,230,143,190,252,135, 92,156, 93, 16,
+ 83,178, 3, 94, 10,212,190, 48,164,204,191,251,183,126,157, 79,126,242, 85,238,222, 58,226,230,141, 99,126,247,203,127,198,219,
+111,189,201,209,241,115,236,202,130,246,213,210,185, 75,179, 67,100,116, 0, 85,155, 81, 42, 26, 70, 59,182,213, 56,197, 0, 0,
+ 32, 0, 73, 68, 65, 84,100,180,153, 56, 69, 90,202, 80,204,161,160,189,176,107,157,174,139, 53, 74,106, 32, 36, 71, 35, 99,156,
+243, 84, 76, 0,181, 95,103,243,218,251,195, 91, 43,208,170,175, 90,108,101, 40,161, 83, 61, 77, 30,186,173,244, 8, 43,234, 50,
+143,187,119,239, 49, 95, 60,177,135,164,186,196,138, 78,142,217,255, 25,246,192,164,137,213,128, 17, 91,251, 52, 15,122,210,233,
+ 57,243,135,127,250, 29,126,233,175,188,203,107,175,124,150, 39,167,103,212,165,241, 55,127,253,215,249,214,159,191,199, 15,127,
+240, 22, 67,154, 28,159,237, 43,167,214,136, 41, 18,212,218, 52, 57, 97,117, 62,223,134,198,102,172,122,237,141,238, 46,114,245,
+198,144, 52,236,245,195,106,120,130, 77, 35,138, 54, 55, 93, 38,131,195,168,178, 63,152,193, 36, 64,179,221,172, 6, 23,131,120,
+208, 51,248,120, 88, 69, 89, 90,113, 28,169, 92,137, 87, 52,224, 55,123,243,132,219,105,200, 24, 5,214,169,175, 87,245,186, 53,
+170,177, 23,214,217, 38,117,218, 73, 34, 86,127,236, 7,213, 72, 71, 37,219,218,209, 33, 81,218,173, 89, 35,221, 70,223,221,171,
+204,146, 60,131,141,201,158,232,129,208, 92, 71, 27, 32,144,136,209,190,103, 85,141, 94,216, 14,136, 27,111, 97,101,247, 75, 88,
+163, 43,250,132, 25,211,153, 98, 74,218,238, 78,170, 20, 3,165, 99,202,221,102, 2,153, 16,204, 85, 98,102, 81, 37,138, 29, 20,
+ 57,200,216, 14,187,245,102,174,212,208,213, 66,223,126,176, 82,167, 4, 38,213, 43,200, 77, 23, 8,205, 94,119,107, 41,218,141,
+191,139, 77, 91, 8,163,233, 93,163,241,251,165, 41, 61,139,255, 30,172,161, 17, 67, 32, 94, 59,185,241, 27, 33, 8, 98, 86, 71,
+ 82, 18,115, 55, 39,177,192,154,186,117,167,117,106, 91,253,139, 86,232,158,150, 52,119,116,248, 72,164,113, 64,236, 57, 29,168,
+ 30,144,127, 33, 80,154,237,118, 66, 20, 55,236, 68, 82, 74,164, 56, 64, 23, 39,193, 69, 75, 43,138, 24, 39, 90, 12,200, 97,134,
+ 88,123,226,167,104, 20, 33,107,191, 89,125, 44,244,238, 9,125,187, 57, 73,140,132, 56,144,114,250,232,131,119, 80,227,165, 43,
+101,141, 39, 19, 15,194,146,238,225, 24,175, 35, 8, 36, 25, 72,131, 48, 78, 70,128, 11, 98, 15,186,113,200, 12, 57, 49, 77, 91,
+166,205,214,170, 88,218,201,146, 73, 41, 92,125, 17,224,117,133,224,127,254,225, 32, 96, 99, 68, 27,177,181,106,225,146,186,206,
+ 44,173,210,122,101,119,185,178, 47,157,121,221, 51,239, 86,202,210,153,231,197,160, 26, 34, 72, 78,228,156,217, 76,137,105, 51,
+ 48,108, 50,155, 97,195, 48,216,127,150,243,200,112, 52, 48,102, 11,213,109,142, 54,140,211, 64, 78, 3,180,102,235, 4,137,246,
+197,224,146, 4, 9,205, 94,107,117, 77, 93,176,125, 92,105,205, 87, 35,134,169,109,221,131, 36,173, 49, 47,149,178,118,115,189,
+ 99,181, 47, 9, 66,202,102, 24,147, 20,153,151,194,197,126,101,183, 52,206, 78, 23,158, 60,221, 17,162, 50,229,140, 42,172,189,
+ 83,106,165,148,202,186, 86, 90,179,247,225,176, 73, 22, 42,172, 22,236,217,207,133,203,157,161,115, 77, 11,101,239,149, 36,246,
+128, 48, 20,102,101, 93,138,161, 27,187,237,246,245,112,137,231,224, 78,183, 44, 69,247,176, 92,107,149,101, 93, 41, 75,177, 38,
+ 65, 55,134,126,171,246, 62, 94, 74,161,148, 75, 94,121, 97,226,241,217, 5, 15, 31,159,163,107,161,104,101,183,168, 81,241,146,
+221, 42,204,117,223, 25,210, 72, 19, 11,131, 78, 41,179,221, 36,155,130, 13,145,109, 76, 72, 79, 20,154,215, 94, 13,185,156,124,
+254,148,143, 50, 33, 68,202,170,244,197, 2,131, 45,193,253, 15,239, 83,215, 61,119,239, 61,203,167, 63,254, 83, 4, 85,222,126,
+247, 13, 46,250, 37,195,152,217,132, 45,189, 54,198, 41,115, 52,100,206,231,153,139,178,112,247,198, 61,226,112,196,147,243,251,
+220,126,246, 14,125,182,181,210,152, 70,134, 65,232, 82,104,155, 35,174,221,126,150,178,143,156,238, 50,183, 94,120,141, 40, 3,
+177, 11,173, 52,190,244,165, 47,242,206,219,111, 48, 14,131, 37,253,197,170, 77, 55,142, 39,254,131,191,247,215,249,183,255,157,
+191,203,201,201, 49,159,252,236,171,124,239,141, 71,252,119,255,195,255,200,107, 31,255, 20, 31, 60,188, 36,197,149, 32, 74,155,
+ 27,205,173, 89, 65,213,178, 31,106,123,179, 22, 2,169,155, 99,188,248,154, 47,197,100,252,254, 62, 35,170,200, 24, 16, 18,189,
+ 21,147, 21,133,108, 95,110,209, 76,121,237,144, 64, 46,182, 71,181,181,167,208, 66,161, 55,155, 82, 37,197, 53,161, 94,224,237,
+ 54,210, 21,181, 47,246,170,157,235, 55,182,236,119, 51, 23,231,167, 70, 10, 68,188, 51,238, 15,149,104,125,252,232,227,222,144,
+ 45,204,107,227,101,187, 81,142,211,200,195,199, 59, 78,142, 50,159,251,169,159, 96, 26, 50,203, 90,121,225,249,107,180, 2,127,
+242,141,111,186,160, 37, 16,178,237,229,205, 87,174, 78,227,148,131,103,197,158, 44, 62,198,213, 80,125, 72, 27, 33, 84,162, 90,
+200,179,117,219,241, 54,212,214, 24, 88,133,170, 31,246,218,190, 99,239,221, 42, 89, 65,140, 95, 30,196, 17,166,218,140, 60,215,
+205,136, 22,195, 0,189,185, 16,211,234,163,162,234,146,146, 31,251,123,121, 68,205,170,141,205,166, 3, 52,191,236,116, 91, 9,
+ 4,171, 29, 26,146,251, 48,213,140,182,118,208,234, 94,119,223,141,247,238,110, 22,251, 41, 85,187, 77, 19,252,187,178,187, 81,
+ 60,137,181, 80,130,157,173, 12, 85,158,156,174, 30, 35, 93, 44,237, 46, 87, 59,252,224,218,235,195, 65, 77,124, 77,124,168,199,
+ 29,246,243, 54,238, 15,213,130,173, 26,241,245,144, 58, 95,222, 46, 64, 42,118, 11, 63, 28, 72,240, 0, 91,112,137,142, 98, 0,
+ 27,155,152,216, 45, 93,124,100,255,209,179,172,163, 26, 61,144, 46, 87, 74,103,107,206, 56,165, 46, 28, 56,239,205, 95,244, 70,
+ 52,154,155, 61,240,187,143,245,197,107,227,189, 18,159,187,253,204,111, 68, 63,105, 85, 21, 79,104,219,104,221, 92,180,217,133,
+ 41, 54,154, 21, 9,164,104,149, 41, 3,215,116,211,164,138,125,160,130, 4,174,202,105,205,198,182,173,154, 43, 60, 96, 55,109,
+220,182,211, 93, 42,208,213, 45, 52, 46,219, 8, 41,255,216, 3,209, 70,210,146, 50, 49, 37, 11,230, 72, 66,194,225,129,157, 17,
+137,164, 97, 36,229,129, 60, 38,114,140, 36,177, 96, 87, 76,150,237,138,158,144,143, 49, 57,170, 52,147,134,137, 28, 44,108, 19,
+252,228,222,138,221,182, 75,117, 87,121,239,172,235,225,148,218, 13, 59,168, 86,237, 11,209,160, 22, 67,136, 52,109,228, 33,179,
+217,100,162, 36,134, 33,177, 29, 38,114, 74, 70,171,139,193, 58,163, 8,217,223,100,104,180,218, 90,245, 53,197,161,167,216, 29,
+225,232,193, 24,220,235,222,106,167, 84, 88,150,133,253, 90,152,151,197,121,206, 66,142,131,237,206, 83, 32,165, 72,206,118, 8,
+ 25,198,129,205,118,228,218,141, 45,155,109,102, 24, 71,198, 60,144,115, 36, 39,203, 35,152,166,212, 78,190, 81,130, 77, 27, 56,
+140, 23,237, 38, 29,179, 5, 0, 45, 64,168,164, 28,157,174,214,137, 98,163,124, 28, 50, 44, 33, 58,160, 33,145, 98,186,146,238,
+ 4,141,236,231,133,148,236,203,182, 52,211,202, 62,115,115,195,189,219, 27,182, 83, 98, 59,154, 79, 64,226, 96,237,133,181, 49,
+142, 38,118, 41,173,218,184, 60, 37, 15,168,224,156, 3,203, 11, 44,139,189, 70,211, 48, 92, 17,181, 98,140,108, 54, 27,174, 95,
+ 63,230,217, 59, 39, 68, 26, 23,151, 23,118, 99,195, 30,224, 34,145,113, 24,201,195, 96, 31, 52,103, 52,183,214, 93, 11, 25, 56,
+189,152,121,227,157, 71,124,247,187,111,144,250,194,175,253,235, 47,179,137, 35,223,250,206,251,236,246, 59,246,187,133,203,203,
+133,203,101,161, 84,181,137, 87,239,164,112,196,144, 2,199,155, 13, 61, 10,219, 65, 24,243,192,144, 51,105, 51, 16, 11,228, 49,
+ 51, 78, 38,106,105,173,217,200,115,112, 63,130, 2, 41,162, 77,121,255,253,119,200,227,196,203, 47,189,202, 52, 28,115,255,254,
+135,204,243, 25,121,237,228,184, 97,217, 45, 72,236,164,148,121,122,177,178, 46, 11, 89, 58,159,122,237,115, 60, 93, 78,185,118,
+ 77,184, 57, 93,163,117,229,104,179, 37,228,129, 46,240,250,119,127,192, 63,250, 71,255, 43,251,243,251, 60,247,236, 11,156,220,
+125,142, 24,149,109,158,120,116, 49,243,149, 47,253, 33,223,248,198,151, 33, 88, 7,116,147,172,134, 39,146,248,236, 79,254, 52,
+159,255,185,159,225, 51,175,189,200,167, 63,255, 25, 30, 62, 85,126,227,191,249, 7,236,158, 60,225,198,245, 59,124,255, 7,223,
+227,214,205, 91,172,197,252,246,146, 6, 11, 72, 81,188,119,189, 18, 83,134,218,209, 30,145, 56,184, 49,180,163,107, 35,132,217,
+170, 69, 98,224,151, 90,149, 97,204, 76, 98, 15,133, 22,130, 25, 17, 75,181, 44,129,217,235,233, 88,211,162,187,108,170, 7,188,
+ 86,107, 15,124, 73, 70,218, 54, 8,138,117,187,155, 54,203, 93,168,141, 90, 79, 79,159, 56,156,200,146,238,129, 96, 92,251,131,
+ 1, 59,102, 91, 85,106, 32,165,132,228,100,240,161, 0,210, 3, 75,133,167,143,238,243,153,215,158,229,206,221, 23,120,116, 62,
+243,225, 7, 15,120,245, 99, 47,242,238,251,143,121,243,237,247,201, 67, 54, 56,144,123,195,179,216, 94,183,118,159, 86,225,246,
+ 73,191, 43, 71, 85, 75,220, 87,191, 32,248,173, 58,133,108,227,115, 95, 79,212,102,214, 68,235, 80, 91, 93,181,170, 50, 8,196,
+156, 44, 12,139, 49, 20, 98,200, 14,104,233,190,187,183,236, 77,117, 27, 27, 93, 63, 58,176,184, 88, 70,122, 39,133, 64, 9,234,
+160,169, 70, 10, 7,223,121, 50, 2,105, 53, 96, 78,247,174, 55,218,174,210,229,226, 19, 47,187,236,218, 69, 76,125,133,125,184,
+108, 73,240, 78,121, 56,172, 87, 61, 4,121,160,150, 58, 28,198,214,235,209,141,162,206,120,144, 67,248,206,194,110,250,227, 66,
+ 21, 14,198, 80, 7, 7,137,248,234, 23,151,141,245,171,144,243,193,222,214,186, 56, 99,196, 30,168, 90, 61, 68, 43,225,106,237,
+152, 83, 64,179,175,164,253,191, 11,206,193,176, 56, 63, 62,178, 55,249, 10, 87,223, 98,110,117,107, 7,121,145, 67,149, 2,172,
+173,217, 84, 88,108, 98, 29,197, 14, 35, 34,110,216,235,230,169,144, 32, 54, 25,209, 64,186,115,235, 24,109,149,181, 26,210,178,
+ 87, 11,170,173,181,208,131,208,187,197,250,163,255, 67,237,152,102, 95,132,150, 64, 55, 81,130,246, 78,202, 25, 9,214,107,108,
+206, 87,111,221, 74,122,221,249,190, 7, 72, 16,221,110,220,218,236,131,167,206,137, 55,196, 94,178, 23, 68, 45, 85,172, 98, 41,
+249, 3,145,142,208,108,236,175, 22, 36,232, 18,220,142,147, 9,201,247, 25,234,129, 27,183,162,201, 96, 8, 65,141, 98,163,151,
+ 26, 32, 70,130, 12, 76, 77, 92,112, 96, 15,114,173,141,218, 42, 7, 37,113,107,157,178,204, 70, 53, 74,129, 44,214,141,157,253,
+231,203, 18,209,168,246, 69,157,124,112,149, 51,169,175,180,181, 33,105,240,176,158,218, 88, 53, 84,234,186, 90,111,221,223, 52,
+ 6, 37, 80,170, 6, 74, 45,132,208, 12, 75, 24,237,144, 34, 64, 72,201,130,105, 26, 44, 68,120,112,123,123, 87,114,213,106,111,
+ 91,181,196,122, 16, 51, 45, 5, 7,200, 72, 74,132,212,153, 75, 67,162, 65, 17,164, 31, 68, 15,126,235, 64,169,210,137, 85,232,
+150,229, 48, 59, 82,115,168,207,144,144,214,145,100,154, 70,213, 68, 43,149,148, 2,210,162,217,220,176, 21,132, 12,134,129, 13,
+109, 36,134,138, 74, 99,187,221,128,108,237,198,208, 12, 27,121,114,107,224,232,104, 34,107, 36, 75,231,254,227, 83,126,248,246,
+142,243,179, 83,186, 42,147,102,122, 91, 61,191,225,191,115,199, 78,198, 96,127,201,121, 89, 89,215,194,241,181,235,108,143,142,
+120,242,244,145,213,250,242, 96,230,165,214,217, 28,109,217,157,159, 90,235,128, 64,140,145,107,211,214,250,182,142,104, 77, 81,
+104,213,132, 31, 49,167,171, 41, 19,170, 60,125, 50, 51,151,194,241,241,200,231, 63,245,113,190,247,250,135,220,188,153,121,114,
+ 89, 8,181, 19,115,160,247,200, 50, 47,180,139, 11, 19,178,196, 75,246, 99,102,222,239, 45,216,217, 96, 24, 19,113, 18, 84, 50,
+ 89, 18,153, 70, 91, 23, 36,193,120,124, 68, 42,145,194,194,118,136,172,161,162, 18, 41,187,133,182, 22,182,195,214,164, 62, 23,
+143,184, 88,206,208,121,225,250,241, 9,143,247, 59,208,194, 52,108,153,107,161,176, 39, 13, 35, 83,218,160,203,204,254,236,156,
+231,159,127, 1,237,145,113, 27,205, 28, 72,161, 46,149,219, 55,111,144,214,133, 27,195,204, 51,183, 54,188,245,222, 3, 54,199,
+137,249,113,225,139,191,255, 59,252,225, 31,252, 83,114,138, 87, 13,138, 60, 77, 92,236,247, 60,115,231, 38, 39,121,195,242,112,
+225,197,159,248, 56,223,254,206, 27,252,215,255,213,127,203, 15,190,241,103,252,218, 95,255, 27,252,224,141, 31, 17,116,239,235,
+ 8,243, 18,164,218, 24,164, 83,187,173,160, 84, 51,171,174, 72, 82,106,141,116,113, 25,203, 82,168,165, 18,153,208, 94, 60,213,
+126, 72, 76, 79,212,193, 28,220,177, 69,251,114,245, 41,157, 51,172,237, 38,216,172, 11, 78, 24, 89,203,130,150,134, 38, 67,111,
+150,186, 90,218, 90,131,145,214,154,237, 91, 9,137, 90,149,205,246,216, 90, 42,221, 70,197,126, 87,116,168, 8, 46, 32,241, 93,
+123,180, 29,188, 54, 59,248,106, 54,202,219, 52, 13,188,245,254, 25,255,226,203,127,202,209,157, 23,249, 39,255,244,247,249,238,
+ 31,127,157,255,228,223,255,123,124,225, 47,255, 44,223,121,243, 45,118,103,123, 3,153,116,187,217,149,106, 2,150,134, 77,104,
+114, 18,234,106,205,145,174, 22,136,235,171,225,179, 37, 98,123,106, 34, 61, 84, 66,109, 46,169, 18, 2, 6, 49, 10,210,201, 98,
+104,214,224,220, 11, 61, 44,119, 85,253,112,189,216,119,138,189, 41,232,180, 43,132,114, 15,205, 31, 60,225,163,116,187, 26,147,
+163,117,215, 43, 87, 39,120,162,166, 84, 22, 23,179, 4,211, 31, 75,197, 32, 63, 46, 86,234, 26,208,190, 16, 98,178,125, 51, 70,
+213,139, 62,153,181,218,184, 81, 62,137,238, 33,209,128,228,128,150,110, 1, 50, 95, 37,106,131, 40, 6, 29,194,109,127,218,244,
+ 42, 16,169,142,118,165,117,107,154, 96,239,147,160, 6,125, 82,196, 14, 19, 33,217,107, 89,173, 1, 17, 66,184,154, 20, 4, 2,
+ 18,197,246, 13, 29, 84, 26, 17, 87,201,214,213,173,105, 38, 60, 11,221,118,232, 42,253,234,246,109, 56, 87, 67,235,232, 97,191,
+168,246,103,116,177, 3,137,118, 11, 9, 30, 14, 61,182, 62,242, 90,121, 59,136,120, 44,117, 31,124, 90,110, 85, 58, 27,205,247,
+110,217,174,160,145,248,194, 43, 31,255,141,148, 38,146,100,226,118, 96,179,177,189,238,118, 19,125,167,168,100,245,108, 94,211,
+195,103,230,199,198, 8,209, 84,131,146,200,142,221,148, 40, 76,155, 13,155, 49, 50, 13, 98,163,193,209,176,178, 73, 32,121,141,
+ 45,137,144,197, 78,100, 33, 68, 11,167, 89, 93,207,186,146, 65, 93, 28, 96,196,174,224,144,252, 31,179,227, 26,129, 46, 88,144,
+175,174, 43,189, 22, 90,239,118,179,109,118,184,104, 65, 61,153,104,181,143,238,163,151,214,171,227,255, 4, 82, 70, 37, 34,105,
+ 96,220,108, 25, 55, 71, 12,227,134,163,209,198,215,227,144,152,134,204, 56, 77,164,152,217, 76, 91,134,144,174,106, 4,218,172,
+226, 84,150, 66,213,198,110,183, 99,222, 91,223,189,119,101, 89, 87,127,147, 57, 61,239,160, 23, 12,126,250, 34,144,163,173, 61,
+198,108, 7,131,148,128,117,161,213,149, 86, 87,202,186, 58, 67,192,161, 24,193,254,236, 40,201,195,131,217, 71,104, 16,135, 12,
+152,109,170, 87,245, 83,240, 97, 26,208, 76,167,234,167,226,232,188,250, 48,136,113,159,233,134,126, 69,124, 92,109,219,187, 94,
+ 61,213,143, 77, 3, 66,176,215, 36, 13,145,237, 48,146,198,200,102, 72, 54,173,136,198, 31, 24, 36, 56, 40,196,209,140,193, 14,
+ 87, 49,218,237, 2, 17,246, 43, 92, 92, 42,167,151, 38,208, 41,205, 79,184,209, 80,151,225, 64,187,116,189, 96,215,143, 56, 10,
+ 10,142,231, 92,153, 54, 19, 41, 10,231,231,231,148, 82, 44, 52,216, 11,165,216, 33,170,107, 99, 89,246,150,204,119,125, 98,206,
+217, 12, 94, 41, 26, 71, 57, 70, 19,206,164,241, 42, 48, 42,193,194, 80, 4,187,217,157,237,102,214,167,167,252,228,107,183,185,
+126, 99,226,253,247, 47, 40, 2,251,101,161,173,110,159,146,102,175,219,193, 97, 64,167,175,133,178,206,180, 94,185,208,198,178,
+ 44,212,165, 49,207, 51,231,187, 29, 23,251, 74,111, 43, 23,187, 75, 86, 79,100,247,181,146, 98, 98,183,158,241,225,123,247,217,
+ 30, 31,115,235,230,117, 68,132,179,203,115,180, 4,246, 33,178,212, 61, 18,221, 5, 17, 35,227,198,118,108,119,239,221,227,246,
+221,123,236, 47, 87,142,175,141, 12,106, 83, 23, 81, 16,217,240,193,163, 83,174, 61,115,155, 95,254,229, 95,166,230,235,140, 39,
+247, 56,127,240,144, 15,222,249,128, 47,254,193,239,243,181, 63,249, 35, 90, 41,196,108, 21,205,105, 72,172,205,110,221, 71,227,
+ 6,213,153,218, 2,239, 63,216,241, 15,254,251,255,137, 31,124,243,107,252,103,255,249,127,200, 59,247,103,190,250,245,175,242,
+226,203,175, 48, 12, 27,171, 5,165,136,134,106,114, 13, 43,139, 91,210,124, 87,140, 86, 23, 44,180, 91,181,208, 43,196, 56,209,
+ 84, 41,218,220, 68,104, 77,149,210, 86,107, 98, 52,187,213, 74,176,207,112,169,213, 61, 8,216,216,190, 22, 63,148, 55,171,196,
+138, 9, 88, 68,172,237,163,221,140,133, 30, 5, 54,208,145,167,170,115,180,236,201,188,187,180,203, 74,116,177,103,176, 96,157,
+248,103, 80, 57,228, 99,240,157,172,209,223, 66, 52, 65,204, 82, 10,143,159, 92,114,190, 15,124,249,143,254,132,235,229,130,219,
+ 39, 3, 15,206,207,120,243,157,199,212,181,147,131,143,201, 69,109, 28,110,114, 79,167,198, 41,197,191, 91,212, 67,177, 77,149,
+ 68,240,253,172,179,233,253,150, 73, 15,222,105,110, 87,233,250,165,216,244, 65,162,121, 11,174,252, 28,222,120,178,189,190,151,
+201,163, 5,223,172,168, 20,175,246,212,118,179, 7,135,179, 91,163, 64, 18,173, 25,228, 69,253,182,221, 14, 54, 74,223, 21,119,
+ 15,170, 30,164, 41,158,214, 51, 98, 29, 7, 43,156, 29,212, 53,216, 61,218, 8, 94, 78,183,139,198,205, 8,120,126, 42,134, 43,
+225,104,240, 85, 95,243,139,159, 93,143,108,237,123, 56,134,117,111, 92, 93, 97,206,131,175, 17,187, 29, 18, 99,178, 41,109, 14,
+225,144,169,247,218,118,248,104,122, 44,150, 95,104,197,198,237,162,118,225,233,222,194,138, 73,174,192,100, 66, 68, 91,160, 57,
+204, 44,224, 83,162, 3,247, 61, 90,229, 77,131,175,170, 29,151, 30,154,229,209, 16,117, 56,155, 79,131,174,170,224,126, 70,194,
+ 14, 42, 33,122, 38, 64,140,246,168,158, 87, 75, 40, 73, 91,115, 82,173,133, 45, 90, 72,118, 27, 11,145, 52, 89,228,191, 87,131,
+135,116,239,244,169, 90, 34,185,246, 70,237,149,165,122,192, 64, 43,146,109, 28,222, 83, 38,202, 64,198,246, 70,162,141,177, 29,
+ 0, 50,246,197, 44, 18,160,154,121,167, 25,219,195,100, 10,218, 89,107,183,174,100,182, 61, 67,148,136,102, 11, 58, 36, 95,128,
+ 28, 12, 74, 34,202, 64, 36,142,214,137,110, 14,132, 17,177, 36,177,193, 75,250, 1, 76, 76,244,125, 6,221, 32,130, 41, 85, 3,
+175, 52,219,247,205, 33,121,213, 67, 40,190, 67,145, 52,144, 36,209, 83, 96, 84,103, 0,231,196, 32,141,218, 18,173, 86, 66, 18,
+122, 93,141, 34, 55,100,123,104,183,238, 42, 81,161,174,133, 50, 95, 50, 19, 13,200,210,154, 87,184, 64,242, 72, 11, 17,161, 58,
+230, 54, 16, 36,177,221, 70,214,214,141,179, 79,163,214, 25, 84, 40, 85, 72, 26, 89,103,165,230,193,214, 25,205, 79,200, 34,196,
+ 93,164,209, 25,220, 20, 23,115, 96,196,199, 84,146, 8,201, 70, 68, 80, 17, 77, 38,142,108, 70,175, 34, 8, 65, 19, 33, 43,172,
+ 92,125,248,123,235,244, 82,232, 10,235,170,150,187,136,118,176, 40,232, 85, 71,120,200, 3,155,113, 36, 68,200, 89,104,205,216,
+253,117,153, 45, 85,170,129,162,133,117, 54,231,115,161, 99,240,175,236,157,213,149, 60, 38,238, 28,221, 50, 48,140,195,122,138,
+118,122, 81, 55, 6, 86,214, 90,172, 7,239,163,179,218,236,139,172,180,149, 97, 24,156,192,228,208, 8,173,156,159,158, 51,215,
+149, 90, 42, 18, 19,170,202,110, 93,152,198,129,160,233, 42, 44, 10, 78,213,114,237,240,218, 42,219,237,150,222,149,214, 10,247,
+ 31, 46,252,246,191,124,157,147, 23,110,176,174,249,234,134,101,233,229, 25, 29, 34,210, 2,210, 58,227, 48, 49,175, 6, 19,218,
+140, 16, 71, 97, 95,149,113,177, 94,239,254, 96,173,138,193, 48,203,123,159,224,236, 50, 49, 86, 82,140,196, 38, 60,122,248,136,
+ 30, 34,215,175,221, 32, 13, 91,154,154,180, 39, 75,160,148, 83, 11,106, 46,157,216,149,179,253,125,114,156,200,219,137, 79,124,
+226, 51,204, 5,174, 95,223, 26, 12, 99, 92,217,132, 35,100,200,124,231, 47, 94,231,127,254,135,255, 11,165,238,249,143,254,227,
+191,207,221,187,207,240,230,183,191,195,229,126,199,131, 15,223,225,219,127,246, 21,230,101,111,185,149, 82, 24,134, 13, 26, 51,
+109, 93,184,118,124, 68,105,202, 91, 31, 62,226,131,211, 63,229,247,190,244, 7,104,223,241,139, 95,248, 85,230, 53,243,181,175,
+255, 11,110,223, 56,225,218,201, 93,160, 90, 27,100,113,175,117, 86,122, 18,106, 89,161,194,241, 56,178,246,149, 90,171,125,177,
+138,171, 36,123,115, 14, 67,179, 16, 80, 27, 93,163,169,164,230, 25,138,222, 13, 69,141, 29,238, 91,251,232, 38, 26, 67,160,174,
+ 54, 50,149,209,177, 94, 53,163, 67,160,246,110, 46,241, 81,104,205,254, 21,116, 53,250, 92,133,152, 97,123,237,152,199, 79, 30,
+ 48, 56,134,154,222, 81,137, 38,231,104,234, 20,176,206, 50, 23, 86, 86,130, 4,246,101, 33,199,192, 52,108,137, 81,216, 76, 27,
+222,250,240,156,231,191,247, 45,254,139,127,239, 95,227,238,115,183,249,222,251, 79,248, 63,126,235,159,243,230,143,222,230,227,
+ 47,222,229,115, 63,253, 42,127,241,131,167,156,158,239, 44, 68, 27,130,103, 2,212, 14, 64, 34, 72, 93, 80, 73,246,220, 21,203,
+148,212,110,151,162,230, 94,140,160, 9,201,246,157, 99,123,121,168,117,143,134,238, 50,146,240, 81,104, 52, 24, 14, 89,253,159,
+111, 29, 52, 99,138,160,209,250,252, 62, 32,214, 67,227,168, 27,213,206, 2,167,209, 62,111, 24,197, 83, 27, 22, 68,246, 48,155,
+207,211,174, 70,233, 7,240,138, 65, 27, 77,217,170,192,210,171,181, 10,162,129,201, 90, 53,180,140,197,218, 32, 84,123,160, 18,
+108,157, 27,101,240, 74, 53, 31,193,115,196,179, 44,174,169,197,181,201,168,113,223, 9,129, 33,186, 95, 36, 88, 91,162,249, 65,
+176,118, 72,217, 97, 68,213,242,213,150,181,112,138,160,103, 45, 44,204,157, 76,122,150, 45,144,108,153, 4,161, 59,163,160,225,
+211,131,222,175, 96, 59, 68,191,128,169, 87, 37, 91,191, 26,186,247,230,213,239,106,244, 79, 21,203, 46,133,116,144, 8,153,214,
+ 86,187, 18, 15, 98, 33, 17,243, 96,248, 1, 54, 7, 88,123,181,112,187,218,228, 56,197,132,209,147,218, 65, 74,226,106, 69,199,
+248,181,110,238, 96,122,100, 72,135,206,121, 39,231,129,214, 87,214,101,182,125,135, 22,123, 33,131,217,133,116, 87,153, 67, 36,
+166, 68,210,232, 53, 46,161,210, 40, 33,146,163,221,132,242, 8, 73,236,151,217, 91,101, 89,133, 46,157,105, 85,138,218, 91, 66,
+186,193, 96,106,183,219, 90,116, 9,135, 25,173,108,223, 22,213,236, 86, 49,155, 79, 86, 60, 97, 89, 90,101, 72, 70,149,171, 77,
+127,140,110,151,136, 57, 59, 84,167, 19,200,244,104,187, 1, 75, 38,154, 66, 16, 17, 36, 84,122,233,236,214, 83,106, 83, 46,162,
+ 89,109,210, 48,145,228,163, 42,149,250, 78, 36, 68, 71, 30,180, 78, 26,162,117,226,117, 96, 24, 26, 89,142,169, 10,173,154, 56,
+164,251,234, 67,219,130, 58, 74,177,234,161, 98,214,136, 41, 49, 14, 35, 34, 86,173, 11, 30, 52, 17, 63,249,133,222, 25, 6,104,
+165, 80, 68, 77, 10, 80, 10,161,175,104,107,204, 1, 87,242,217, 77,103, 28, 45, 96,151,242,200, 40, 1,146,239,155, 66,190,178,
+205, 73, 80,164,118,250,106,137, 98,165, 17,186,216,116, 33,224,189, 82,123, 61, 91, 43, 70, 69,242, 67, 89,163, 17,206, 22,219,
+107,141,137, 33,103,198,236,191,151,105,195,148,173, 86,148,202,192,118, 18, 72,202, 90, 23,202,188, 90,215,117,109,172, 68, 54,
+ 57,162,209,118,246,169, 87,104,137, 34,193,130, 60,189,160, 7, 27, 82,181, 67, 83, 41, 22,142, 91,107,165,247, 13, 90, 45, 15,
+ 33, 13,134,110,164,166,165, 54, 74,169,118,152,114,233, 77, 95, 87,114, 74,140,163,221,208, 47,119,123,154, 86,203, 56,168, 82,
+ 74,115,164,166, 29,134,134, 28, 57,218,108,217,110,183,124,229,107,143, 25, 54, 71,196, 20, 73, 34, 12,211,132, 12, 70,248, 10,
+ 4,246,125,165,119, 27,243, 73,175,180, 54,216,195,131,206,130, 9,101,232,149,165, 20,215,123, 54,138,216,222, 50,132, 66,237,
+ 6, 96,138, 77,185,120,188,243,123,136,176, 61,222, 80,231, 29, 37, 88,202,248, 56,111,169,107,167,247,202,233,147,135,180, 90,
+184,125, 50,112,188,217,112,237,218, 45,222,248,214, 55, 88, 47,159,114,116,239, 99, 76,155, 72, 28, 71,246,203,158,156, 42, 47,
+222, 25,121,252,193, 3,158,190,243, 22,247,238, 62, 67,173,157,215, 95,255, 62, 95,249,227, 47, 49,175, 59, 35, 32,250, 45,168,
+248,123,245,230,241, 13,238,220,122,134,135, 15, 62,160,246,194,122, 57,179,206, 11,175,190,116,143,235,119, 95,226,183,254,159,
+223, 97,190, 56,229,167,126,254, 47, 19,105, 84,111,151, 24,133, 59, 2, 3,185,175,104,136,180, 1,230,213,136,146,141,192, 24,
+ 19,181,153,220, 36, 73, 99, 76, 80,212, 2,147,115, 89, 73,105, 32,116,152,203, 74,140, 91,171, 28, 29, 26, 60, 7,113, 70, 56,
+172,248,140, 78, 22, 98,167,214,104, 32,144, 8,172, 21, 9,149,148, 35,133,110, 30,243,110,245, 71, 66, 71,226, 64,107,202,245,
+ 27, 55, 25,134,247,204,216,150,140,113, 97,129,165, 72, 69, 41,101, 79, 40,182, 20, 60,218,100,142,166, 27, 12,219, 27, 92,156,
+ 63,102,183, 59, 37,229,137,152, 50,121, 16, 30,158,159,242,202,167, 62,201,245,123, 47,242,143,191,248, 15,121,235,237,119, 89,
+230, 83,206,206, 50, 39,249,211,220,190,117,147,211,211, 11, 36, 14,254,192,245,208,154, 20, 3,185, 4, 51,246, 73,104,190,127,
+ 55,167,184, 95,208, 12,190,115,136,235, 7, 76, 16, 83,237,161, 39,110,183, 68,108,141,103,172, 15,171, 84,169,138,165,196,219,
+ 33, 7,229, 96,160, 96,120,230, 36,118, 61,140,174,138,181,155,178,162,165,218, 35, 91,205,113,161,216,231,154, 24,205, 25, 17,
+236,150,220,181, 95, 41,118, 91, 56,236,152,253,144, 4, 12,142,137,181,138,176,208,197, 89, 36, 81, 8, 61, 16,180,122,190,200,
+ 87,129,161, 57,142,220, 98,165,173,169, 93, 80,154, 79, 59,162, 99,131,125, 58, 96, 63,170,210,162,137,203, 56, 4,255, 14,114,
+ 49, 76,174,210, 48, 6, 62, 26,253,126,172,168,216, 74,195,134, 14, 9,161,160,193,114, 47, 1, 99, 96,200, 16, 29,234,117,213,
+ 87,179,215,199, 1,107,138,161,102,163,231,165,172,217,234,127, 30,157,226, 97,205, 68, 50,145,173, 31,228,122,112,134,127,117,
+ 97,138,131,133,104, 80,117, 37, 4,171,120, 95, 37,238,125,196,161, 40,169, 20,165,137,221,142, 7,181, 90, 64,199, 30,168, 21,
+144, 48,216,141, 78, 43,165, 21,114, 16,154,116,119,200, 70, 98, 28,237,193, 28, 5,137,142, 1,109,118, 58, 94,218,194,186,174,
+172,107,114, 78,109,240,209,151,176,186, 91, 59, 73,118,101,157,125,145,135, 81,200, 1,242,198, 32, 18,170,150,102, 20,109,110,
+136,243,234, 29, 74, 12,209,130,119,216,201,217,244,142,246,112, 12,217, 2, 55,162,234,230,156, 72,204, 32, 41, 24,212,192,251,
+225,150, 82,172, 68,237,104,140,182,147,160,179, 16,220,127,110, 95,164, 67,234,136,102,151,221,219, 38, 75, 84,105,107, 49,168,
+127,204,214,225, 84, 35, 78, 73,176,180,168,214, 98, 48, 21,233,104, 21, 66,182, 84,104,151,200, 24, 45,252,167,201,126, 97, 1,
+251,121,107, 55, 70,113, 95, 26, 75,171,212,102, 59, 55,241, 81,243,188, 46,128,250, 13,179,113,186, 24, 37, 46, 37,177, 48, 18,
+145, 32, 13,212, 66,134,118, 2, 94, 81, 85,246, 43,236,163,144, 66,178,118, 65,182,157,116,206,137, 32,209,242, 1,162,100, 17,
+198, 41,217, 13, 18,171, 97,137, 40, 77, 3,235,186, 90,239,218,123,190,130, 18,166,104, 19,148, 98,111,114, 51,131, 21, 11,244,
+133, 67,215, 18, 82, 22, 98, 10, 12,155,209, 14,137, 93,153,226, 68,220, 38,162, 6,142,183, 48, 47,213,129, 13,118,234, 93,246,
+ 1, 77, 48, 58, 49, 16, 54,244,181, 83, 5,116, 99, 39,242,169, 55,178, 88, 13,178, 21,123,157, 36, 89,157,169, 84, 59, 52,238,
+231,217, 68, 59, 93,168,173, 80, 90,161, 84,245, 96, 95,134,104,129,196, 82, 43,227,176,181,208, 96, 90, 56,222,110, 56, 26, 34,
+215,143,111,113,253,250, 9,121,216, 16,162,189,231,247,203,158,181,217,216, 53, 21,104, 37,208, 82, 38, 71,187, 65, 4,233, 76,
+211,200,148,237,247,160, 29, 7,143, 8,161, 41,125, 76,180, 93,101, 35,134, 46,174, 29, 22, 10,171,192, 20,132,161,102,118,235,
+142,203,121,207,181,163, 13,147, 88,197,242,244,201, 57, 15, 30, 63,228,198,201, 49,131, 14,148, 82, 24, 68,121,239,205,119,184,
+115,247, 5,142,111,220,227, 11,191,248, 11,188,247,222,155, 60,124,250,136, 65, 7,214,245,156,163,126,211,171, 65,145,107,215,
+ 78,248, 79,255,254,127,201,230,248,136, 55,223,125,200,143,254,226,117, 62,252,224,109, 62,241,226,200, 27, 63, 56,246,224,226,
+192, 7, 31, 62,102, 55, 47,108,162,175,202, 34,156, 93,156, 82,235,250,255, 51,245,102, 77,150, 93,231,153,222,179,166, 61,156,
+147,115,214, 60, 0, 69, 76, 44, 12, 28, 10,224, 0, 18, 32, 4, 18, 18, 73, 81,162,220, 33, 65,164,228,110,187,237,112,203, 86,
+132, 35,252, 27,116,103, 95,116, 71,216,173,107,119, 72,106,169, 29,150, 40,117, 91, 82,107,104,113, 4, 8,176, 69, 2, 36, 5,
+ 98, 44, 20,128, 26, 80,168, 41, 51, 43,167,115,206,222,123, 77,190,248,214,201,226, 5,131, 17, 12,146, 85,200, 60,103,239,181,
+190,239,125,159,167, 16, 28,101, 18,240,233, 79,126,130,159,188,245, 6,155, 55,175,112,246,225,143,162, 92, 67, 8, 81,110, 68,
+ 97, 38, 99,101, 99,200,105, 74,239,229, 32, 62,148,228,176, 83, 74, 14, 56, 33,161, 26, 11,193, 8,253,208,213, 84, 42, 51,120,
+217, 33,203,139, 35, 99,147, 34,134, 94,146,237, 41,202,237, 48, 43, 76, 40,224, 18, 6, 57,184,149, 70,168,166, 92,191, 85, 32,
+101,143,197, 10,107,163, 15,104, 91,201,222, 30, 69, 54, 86, 52,159, 49,224, 70, 21,163,197, 37,246,182,110,161,172,145,177,111,
+ 89,127, 69, 50, 49,120,106,231,104, 27,121,121, 7, 31, 96,232, 24, 47,174,147,194,148,189,157,125,252,208,161,173,227,237,203,
+187,252,225,127,248, 91, 78,158, 61,195,115, 47,252,132,173,141, 45,156,213,220,184,221,241,206,165, 27, 44, 44, 31,193, 85,154,
+140, 36,245,115,136,146,239,209,101, 52, 30, 51,232, 65,166, 90,101, 76, 61, 31, 61,171, 82,210,182, 90,158, 29, 57,121, 33,207,
+ 41,209,187,166,210,199,182, 74,198,194, 68,161, 40,102, 43,232,235, 52,103,111,204,215, 89,101,186,104,115,150, 10, 85,249,204,
+ 73,102, 78,152, 27, 58,151, 23, 16,136, 77,179, 28, 38, 84, 20,247,134,190,211,196, 21,188,152,146,172, 79, 32,224, 52, 2,238,
+ 73, 89, 4, 45, 90,160, 93, 30, 73,243,163, 10, 69,143,112,224, 26,145,127, 98, 85, 80,172,134,228, 59,225, 37, 96,100,231,108,
+101, 71,173, 82,198, 72,160, 72,160, 95,197,122,173, 35,229,121,194,129,233, 19,149,101,173,226,229,217, 54, 15,248,102,162,236,
+226, 85,121,167,193,193, 65, 5, 35,214,210, 74, 9,226, 53,251, 44,237,233,121,130, 94, 33, 13, 32, 74,144, 45, 75,150, 74, 27,
+ 93,100,230,154, 33,203,103, 95,147,202,164, 5, 17, 60, 41, 85,188, 8, 89,106,124, 41,149, 49,123,201,179,105, 35,211,129, 36,
+125,250,164,132,152,170, 16,105, 15,200,148,218,206, 98,194,101,139,211,138, 62, 9,141, 74,176,179,178,171,210,185, 39,151,142,
+175,195, 16,203,130,211,216,140, 78, 6,135,193,186,146,148, 87,169,220,228,196, 42,230,178,140, 12, 66, 2,223, 69,124, 14, 4,
+ 15,222,203, 73,198,104,139,169, 42,193,233,105,133, 31, 76,129,206, 40,140,115,212,165,254, 34,198, 52, 73, 91,107, 19,161,178,
+ 16, 75,253, 65, 73,184,194, 88,129,183, 4,239,138,132, 70, 78,165, 85,170, 9, 40, 66,204,212, 70,146,170,209, 10, 49, 40,135,
+ 80,240,122,153,161, 72, 34,170, 74, 70,217,118,214, 19, 74,128, 33, 6,232, 84,249, 16,231, 2,156,176, 53, 86, 41,140, 74, 36,
+ 37,192,253, 20, 66, 1,254, 43, 44, 21,198,229,131,132, 42, 66, 54, 44,192,150,204, 48,247,247, 90, 71,107,231,235, 38, 85,250,
+241,194, 18,183, 77,164, 14,189,236,165,124, 46, 83, 9,133,181, 37, 57,169, 20, 41, 11,111, 62, 38, 17,214,232, 92,128, 54,186,
+162, 42, 99,203,160, 29,163,197, 17,163,113,131, 10,210,193, 54, 57,225, 99, 70, 69,177,187,129,103,214, 79, 8, 81,234, 32, 3,
+ 48,157,150,209,146,173, 48, 42,209, 54, 21,170, 46, 52, 62,196, 42,150,131,112, 2,138, 88, 15, 42, 73,210,166, 20, 5, 57, 75,
+ 2, 29,165, 71, 58,239, 14,251, 76, 55,244, 76,165,133, 75,229, 28, 90,105,156,211, 84,149,194,213, 13,174, 18, 83,148, 73,153,
+214,198, 3,146,159, 83,153,104, 44, 97, 8,164, 65, 51,228,249, 77, 56, 17,145, 92, 64, 93, 37,114, 0,109,101,135, 24, 82, 66,
+103,195,200,247,164, 36,189,236,156,115, 89,211,248,162, 23,150,135,101, 99,150,241, 37,112, 20,162,103,177, 26, 83, 85, 53, 85,
+109,137, 9,118,103, 51, 84,223, 51,114, 22, 74,242, 55, 67, 1,251, 40,178, 49,216, 28, 72,161, 0,111,140,198, 79, 39, 56,101,
+168,235, 10,173, 13,227,166,161, 50, 14, 87, 67,212,137,145, 19, 98, 79, 21,149,144,205, 36,217,135, 82, 10,107, 28,187,187, 59,
+ 68, 50,163,209,136,182, 54,108, 93,251,128, 43,239, 95,102,117,109, 65, 36, 42,126,134,211, 21,201, 26, 78,157, 62,131,182,150,
+221,205, 27,188,117,233, 38, 59,183,174, 19,125, 67,178,137, 81,213,178,191, 51, 99,103,127,155,172,106,250, 97, 96,230, 59,210,
+254, 14, 55,175,109,241,234,207,126,198,219, 23, 94,227,127,253,159,127,139, 71, 30,220,226,149,243,151, 88, 95, 61,204,210,226,
+ 42, 23, 46,190, 75,136,208,180, 11, 4,239,241,179, 41, 40,169, 49, 37, 63,240,149, 95,250,101,246,252,136,119,222,190,192,153,
+ 51,247,112,228,240, 73,186, 56,224, 92, 3,253, 64,101,148,132, 79,135,136,170, 13, 89, 71,166,222,147, 83,166,209, 21, 26, 67,
+ 80, 50,126, 87, 67,148,135,173,133,174,235, 75,234,218,144,140, 40,121, 83,180, 16, 34, 73, 15,100, 79,209, 12,203,141, 48,147,
+176, 9,250, 24, 24,140,224, 97,133,193,175,136, 67,143,169, 32,103, 67, 63, 4,156, 86, 5,124,149, 74,133, 78,110,119,177,132,
+188,234,164, 89, 93, 93,101,127,123, 75,110,176, 37,123, 18,178,140,174,157,214, 56,235, 14,166,154,125, 14,204,118,183,105,204,
+ 62,218, 74, 94,100,152, 69, 24,228,182,249,237, 23, 94,101,250,220,203,236,109,109, 21, 14,129,140,111,187,157, 61,150,215,214,
+137, 94,126, 70, 90,207, 15,128, 94, 38,136,229,165,166,178,240,225,125,136,104,171, 17, 46, 27,101,143,156,136, 73, 21,120,149,
+228,149,162,146,195, 14, 37,147,148,146,176,213,117, 5,217,107, 8,145,160, 37,104, 76, 40, 4, 54,100,228,166,140, 97, 40,180,
+ 74, 19, 5, 13, 45, 50, 36, 89,119,198, 40,249,135,156, 15, 18,182,114,153,211,186,220,126,239,132,189, 84,206,104, 11, 33,148,
+138,155, 22,229, 51, 74,161, 92,217, 25,151,218, 94, 42,183, 82,202,247, 74, 21, 94,123, 34, 30,224, 81, 29,243,177,183,100, 3,
+ 82,121, 15,228, 36,217, 38,101, 53,248, 50,129, 45, 47,119,156,157,151,101, 74,157,215,146, 99,209, 99, 23, 33,203,252,165,175,
+203,242, 64, 57, 45,220,127,149,136,165,190, 22, 83, 18,164,110,169,241,233,194,163,157,135, 46,165, 62, 23, 15, 98,221,202, 88,
+212, 28, 24,166, 11,163, 68,131, 15, 94, 2,222, 89,214, 31, 89,139, 55,133, 40, 1, 56,157, 36, 48,158,146, 63,104, 28, 8,157,
+ 85,198,249,115, 96, 18,165,180,168,231, 40, 90,192,206,102,145, 92,205, 37,238,243, 84,160,149,211, 83,214,228,212,147, 18, 68,
+ 93,164, 42,194, 82,148, 38,234, 17, 71, 0, 0, 32, 0, 73, 68, 65, 84,222,105, 10, 56,109,105,138,153, 39, 41,153,247, 99,164,
+144,175, 82,148,148,105, 20,155,140, 43,227,161, 92, 66, 30, 41, 75,161, 63,196,140, 15,133,116,104,196,108, 19, 58,208,206, 82,
+ 85, 50, 30, 18, 68,162,252,239,135,174,103,230, 75, 21,201, 24, 17, 2, 16,233, 82, 36,107, 67, 85, 21,248, 68, 82,210,103,204,
+ 26,173, 51,170,106,104,172, 17,235, 87,234,241,101,204,174, 11, 64, 69,231,136, 33,177, 52, 90,164, 90,144, 19,217,144, 61,201,
+ 7, 98,148, 83, 91, 84,153, 28,228,165, 26, 98, 34, 24, 71,229,156, 88,210, 84,102,200,170,104, 53, 69,106, 18,173,124,241, 98,
+206,100,163,168,157,195, 25, 77,157, 61, 54,107, 6,239,165, 90, 84, 96, 43, 42, 41,170,186,150, 21, 67,242, 76,186, 76, 82, 14,
+167, 34,117,213, 98, 17,242, 88,176,134, 48,235,165,215,157,198, 64, 36,204, 2, 73,103, 66, 10,248,217,192, 20,121,177,145,193,
+247,145,201,254, 62,104, 25,169,143, 70, 82,171,170,106,203,130, 86, 56, 99, 56,172, 5, 77, 88, 89, 67, 55, 27, 8, 36,186,105,
+199,108, 38,249,137,236, 51,193,207,196, 52,164, 65, 5,105, 28,204,199,217,198, 89, 32, 8,218, 19, 39,187,167,152,208, 86,163,
+162,194,212,146,110,143,115, 57, 80,202,114,176, 83, 82, 77,201,222, 51,244,242,247,173,113,146, 38,245, 10,219,212, 18,156,244,
+ 14,227, 12,217, 70,124, 81, 61,154, 40,112,144,218, 72,183,123,150, 18,218,100,108,173,209, 57,211,135,132, 77, 50, 61,176, 77,
+ 77, 74,134,169,151,196,106,165, 45, 49, 88,114,233, 62,135,228,113,174, 46, 85,171,128, 70, 38, 22, 51,223,211,167, 64,239, 3,
+170,239,112,198,209, 25,241, 92,155,162,236,236,180,150,181, 70,237, 48, 73, 82,214, 1, 33, 89,169, 32,245,160,212, 75,224,116,
+179,235, 48, 86,254,124, 93,105, 42,107, 4,142,169, 43,178, 9, 50,180,139,146,148, 77,202,211, 79,247,228, 64, 90, 85,232,186,
+226,202,251,151,185,118,253, 58,199, 79, 63, 70,211, 44,176,123,123,143,202,120, 76,237, 48,227, 5, 90,179,128,182,134,183, 94,
+251, 25, 41, 6, 22, 23, 22,120,224,161, 15,179,184,188, 66, 99, 50,123,211, 61,246,124,194,172,142,152,236,237,113,249,157, 15,
+120,229,149, 31,243,214, 27, 63, 99,152, 13, 92,120,239,125, 62,242,216, 71,121,241,229, 55, 8,195, 22,207, 60,245, 17,158,250,
+212,135,249,119,127,250, 45,218,186,102, 58,204, 27, 50, 3, 74,101,238,185,251, 52, 33, 91, 94,124,225,187, 28, 59,116,152,187,
+239,121, 64,124, 9,198,146,213, 64,204, 30, 93, 41, 42, 47, 55,149, 62, 72,112,201,101,217,139,245, 97, 86,106,156,141,172, 30,
+178,151,106,149,105, 8,106,134,141,229, 69, 26,122, 1, 43, 5, 1,217,248, 33,201,243,170,236, 87, 35,153,108, 68,191, 44,173,
+ 16,241,106,231, 36, 64, 30,173,101, 69,150,138,169, 81,114, 24, 65,160, 34, 74,198,174, 41, 10, 93,204, 40, 69,242,145,118,180,
+128,107,218, 50,129,147,113,114,140, 17,171, 13,174,178,165,238, 84,158, 31, 74,234,110,125, 24, 32, 12, 98,214,117, 2, 34,234,
+102,251,236, 13,189,160,102, 11,125, 76,151,253,252,214,100,198,194,100, 31,172,166,113, 53, 67, 47,129, 88,103, 44,129, 3, 52,
+ 8, 57,107, 84,249,179, 84,128,172,101, 90,165,138, 60, 43, 35,181, 51,225,141,103, 84,214,178,187, 46,116, 76, 95,198,248,185,
+224,154,201, 25,147,140,172, 18,181,102, 72, 65,212,202, 90,145,163, 48,241,149, 22,151,132, 46,194,174,148, 50,131, 14, 7,149,
+172,148,138,172, 42, 73,200,111, 30,212,149, 91,107,121,105,106,197, 48, 8,179, 93,101, 69,240,146,153, 80, 5,137,106,140, 92,
+235, 83,200, 5,227, 45,183,107, 14, 68, 48, 97, 94,186, 66,155,249, 36, 83,203,193,165,136,200, 72,114,187,206, 7,196, 78,196,
+ 88,151,131, 48, 75, 10,206, 54, 43,141,214,197, 41,167,231,212, 66, 69,246,197, 43, 80,116,217,206,200,164,200,163,165,169,161,
+178,144, 77,209, 37,240,108,202, 42,180,176, 90, 40,218,238,210, 46, 80, 73,194,108,150, 68,151, 18,149,147,164,127,204,241, 14,
+162,156, 44,136,215,232, 81,161,116,225,115, 89, 71, 43, 57, 88,104, 85, 8,168,101,117, 45, 12,123,141,213, 6,147, 35, 62,114,
+135, 92,167,228,240, 99,125,223,163,114, 44, 32,156, 40, 55, 48, 93,201,126,220, 8,194, 81, 41, 57,137, 68, 82, 49,239, 20,170,
+154,118,120,147,233, 20, 34, 49,201, 10, 93, 60,193,209,104,185, 13,163, 36,140,161,148,236,237,109,141,113, 70, 94,250, 5,184,
+175, 24, 24, 6,185, 57, 65, 38,100, 33,225,232, 74,118,193, 10, 35,100,161, 40,117, 20,227, 52,181,129, 48,100,188, 15,162, 61,
+ 12,130,200, 11, 4, 72,150,136,224, 15, 13, 1,149, 29, 89, 69,166,179,142, 61,235,168, 91,141, 65,164, 47, 46,103, 73, 60,107,
+ 57,249,170,172,152, 13, 1,111,107,156,203, 40, 42,218, 70,118,169, 81,201, 38,196, 26,176,214,144,166, 61,183,247,118, 64, 25,
+156,210, 12,169,194, 25, 75,101, 53,169,239,152, 70,193, 33,206,166, 72,119, 57, 6,250,126,134,199, 48,100, 9,145,229, 24, 8,
+123, 19, 66, 86, 24,107, 48, 70,246,124,139,109, 77,213, 84, 56,171, 14,254,126, 58, 57,178,201,164,228,208,206, 98, 22,199,228,
+152,177,206,226, 44, 7,118, 36,171, 52, 67, 55,197,251,129, 62, 36,246, 59, 79, 55,243,101,244,169,240, 67,199,246,230, 30, 49,
+120,105, 7,164,132,182,182, 96, 88,101,239,229,140, 19,189,171, 53,168, 88,224, 63,165,179,174,180,212, 64,106, 37,201,246, 46,
+200, 7, 62, 13,101,167,103,133,251,188,183, 43, 4, 44,107, 29, 10,131, 30, 12,149, 21, 44,112,214, 10,227,180, 4, 36, 83, 66,
+ 59, 67, 78, 96,173,184,176,251,217,128,214,208,251,140, 11,226,187,175,219, 90,254,251,131,132,121,116,101,168,202,216,139, 82,
+151,169,131, 28,212,230,225,185,218, 54, 50, 34, 76,153,156, 60, 58, 5,198,166,150, 17,156, 81, 40,151, 24,188,156,132,137,208,
+117, 3,179,105,143,247, 34,195,152,139,105, 80, 37,148,153, 18, 51,100, 31,107,116,241, 32,151, 22,134,177, 61,182,115, 12, 86,
+ 86, 33,202, 73, 26,185,210, 22,141, 56,166,157, 53, 36, 21,169, 76, 81,201, 70,216,153,193,108, 95, 86, 3, 67, 24,232,166, 83,
+134,224, 25,215, 13,139,109,205,246,116, 66,109, 23,216,219,159,176,188,190,206,120,188,200, 93,199, 45, 97,128,237,110, 87, 60,
+ 4,170, 34,231, 26,147, 18,219,211, 45, 6, 15, 33,121,114, 14,140,155,154,241,234, 58,110,121,141, 35,199, 79,112,216, 39,174,
+223,188,142, 73, 29,111, 95,127,133, 31,189,252, 67,222,122,227, 39,132, 24, 56,121,236, 52, 57,181,140, 71,135,168, 43, 67,223,
+237,241,242,171, 23,120,248,236,125, 44, 47, 54, 44,182,153,163,203, 75,224, 3,221, 16,232,178, 97,117,101,157,127,252,193,143,
+168,109,230,222,143,125,148, 33,104, 82,246,100, 15,202,120,129,117,100, 77,202, 3,170, 77,152,153, 28,242,117,209, 84,106,171,
+136,157,199,106, 75,118,146, 8, 78,125,128, 90,223, 49, 66, 26,228, 57, 82, 58,193,115,127, 4,133, 35,145,148,112, 45, 84,202,
+101, 90, 85, 52,151,193,139, 73, 78,219, 66, 16,211,228, 28,228,176, 20, 13, 38, 43,178, 81,133, 17,144, 15, 62, 71, 90, 27,169,
+105,229,204,120,188,200,222,206,150, 28, 60, 99,144, 16,171,149, 21,202, 92,187,153,116, 66,103, 93, 46,125,138, 20, 6, 98,138,
+ 56, 39,207,210, 46,244,248,190, 63, 72,112, 11, 44, 75,118,183, 27,187, 19,150,119, 59,106,140,152, 4,179,244,171,125, 12, 40,
+ 39,163,213, 92, 52,161,181, 50,248,249, 68, 66, 33,150,200,130, 97,197,231,131, 86, 76, 72, 17,165,101, 26, 71, 1,201,200, 20,
+209, 73, 86, 39,201,152, 56, 70,153, 50,200, 74, 38, 74,214,200, 64, 82, 81,194,113, 65,110,209,185,200,199,115,154,251,222,231,
+144, 42,185,165,235,164,203,116, 42,150,186, 45, 63,167, 49, 53,100, 60, 54,149, 26,174,214,197,161, 62, 55,230, 69, 97,102, 88,
+ 57, 52,196,178, 51, 55,133, 18, 25, 75,248, 87, 75, 20, 92, 86, 4, 41,161,181,147,188,143, 49, 66,247, 83,194,135, 32, 75,104,
+151, 60, 39,229,204,155, 9, 90,170,213, 57,201,237,183,212,240, 76,116,133,133, 96, 14,110,217, 49, 69, 97, 24, 32, 18, 22, 98,
+ 62,104, 79,145, 51, 22, 33,109,162, 51, 41,150,122, 97, 73,215, 43, 10,213, 83,101,161,108,234, 50, 37, 17, 50, 70,185,152,201,
+ 74, 36,104,185, 93, 23,235,107, 89, 49, 73,190,193, 18,101, 69,233, 52, 41,202,133, 43,246, 30,147,100, 82,148,202,219, 51,229,
+ 80,234,152,178,144, 80,167,238,249,112, 54, 90, 78, 80,226,184, 77, 7,200,185, 92,250,122, 74,105, 41,214,151, 19, 32,197,206,
+ 38,136,198, 59, 21, 15,173, 12,218, 89,225,198,103,197,250,250, 58, 31,125,244,163, 60,244,192, 89,142, 28, 62, 84, 66, 87, 20,
+ 67, 80,102, 50,157,114,233,226, 21, 94,127,253,103,188,245,206,121,116,148, 93,204, 16, 11,242, 83,137,140, 67,200,197,130,157,
+149,138,148, 35,167,142, 97, 54, 72, 53, 66, 25, 98, 12,101, 20,147,231, 87,126,140, 21, 25,137,213,242, 80, 79, 7,169,120, 97,
+175,203,254, 89, 17,181,193,150, 9,130,176,194, 7,148,169,168,140,128,100, 76, 86, 24,155, 24,114,194,152, 26, 83, 25,170,218,
+146,125,192, 26, 73,161,103,157, 8, 24,156,177,180,149, 33,244, 61, 3, 18, 0,145, 52,106, 58, 56,121,186,148,233,147,244,224,
+173, 49,164,126,160,239,123, 33,178,145, 25,124,162, 15, 9, 99, 52,181,171,203,111, 58, 10,248, 6,133,171, 29, 99,215,148,118,
+128,162, 29, 9, 91, 61, 19,169,170, 22,165, 51, 67, 63,224,208,104, 35, 34,139,105, 63, 16,122,143, 31, 60,218, 58,122, 63,197,
+119,145,206, 7,102,179, 25,147,253,125,209, 42,102, 43,137, 80,171,203,110, 76,203,184, 41, 38,140,213,165,198, 17,240, 65, 81,
+ 85,182, 36, 90, 51,181,181, 56,163,101,231,229, 12,181,214, 36, 95,220,194,218, 20,130, 82, 65, 8,147, 11,204, 72, 10, 7,206,
+218,114, 29, 17,153, 66,109,229,159,119, 8,178,206,177,133, 34,152,172, 34,118, 2,148, 73, 70,246,122, 37, 54, 88,152,236, 50,
+209,169, 52,130, 20,206,114, 83, 10, 49, 8, 86,179,232,114, 99, 49,180,149,245, 23,120, 45,147,162, 66,236,154, 77,103,116, 19,
+143,143,153,193,123, 98,105, 84,196, 32,137,226,172,101,119,167,149, 34, 27,169,103,234, 36,233,219,108, 68,197,106,140,162,209,
+ 26,109, 13,206, 84, 18, 14,210,138,202, 57,154,186, 33,196,158,217,172,103,103,127,198,100, 50,195,144,168,202, 21,195, 20,192,
+201,225,229,241, 1,125, 42,250,196, 80, 84,188, 90, 41,108,211,112,232,240, 9,148,111,233, 98,192, 15,189, 96, 38, 81, 12, 97,
+202,224, 21, 62,244,204,166,123,132,105,143, 87, 50, 73,168,154, 49, 77, 61, 34,171, 76,173, 45,157,223,230,234,213,107,104,173,
+233,246,119,120,248,227,143,177,176,176, 66,220,189, 69, 55,219, 98, 50,237, 24, 66, 64,145,104,156, 84, 94,109, 85,113, 98,109,
+140,211,138,189,125,185,197, 93,186,181,201,209, 67,135,136,213,152, 65,141,104,236,136, 16, 61,202, 89, 65, 27,167, 40,160, 12,
+227,201,185, 38, 40, 80,193,203,109, 62, 75, 24,201, 84, 18,190,212, 5,243,156,229,217, 79,236, 61, 73,151,151,110, 8, 68, 45,
+ 1, 40, 91, 18,218, 33, 4,162, 10, 56,167,165,171,156, 33,101, 77,204, 65,218, 28,242, 67, 20, 29,174,149, 81,242,188,194,104,
+100,172,136, 85,154, 16,134, 82,195, 50, 37,116, 20,176, 90,113,123,111,194,181,247,223, 41,191, 23,249,110,160,140, 40,171, 53,
+ 88,227, 14,118,186, 26, 25,161,135,144, 80, 57, 50, 90,104,153,204,122,182, 54,183, 74,160, 86, 62,191,149,115,160, 52, 85, 61,
+194,217,192,177, 99, 71,169,236, 10, 62, 37, 66, 30, 14, 30,252,115,215, 10,115,169, 73,169, 94,205, 79, 19,166, 36,193, 67,148,
+239, 66,138, 82,221, 21,135, 3, 69, 48, 34,104,100,165, 50,217,184, 34, 54,146,207,115,244,169,104,115,101,255,174,178,176,199,
+ 67, 44,224, 35,209, 51, 21, 52,172, 76,104, 85, 78,229,239, 36,135, 94,241,182, 43,230,229,240,172,228,103,175, 74,221,139, 40,
+149, 65,135,172, 61, 83, 97,158,228,226, 56, 80, 37, 50, 96,230,117,179, 44, 50,169, 68, 98,174,146,154,175, 39,141,150, 44, 79,
+ 98,110,191, 44,225,179,108, 11,190, 90, 66,127, 42, 7, 57, 12,228,140, 53,142,156,230,141, 34,133, 41,211, 12, 95,198,251,146,
+155, 18,219,165,209, 5,108,149,181,100,110,178,164,241,253, 32, 8, 96, 37,243,121,169, 5,102, 11, 58,150,138,224, 29,168,135,
+153, 35, 75,165, 1, 92,158,234,101, 13, 81, 66,241, 62,201, 74, 40, 5,233,207,199, 82,169,212, 90,214,120, 42,103, 42,147, 10,
+ 92,205,130, 21,183,135, 31, 4,227,155,202,164, 67,154,136, 34, 88, 55,218, 18, 82, 70,157,188,235,129,172,202, 62, 92, 30,184,
+ 82, 87, 72,209, 31,148,238,181,154, 83,126,228,131, 75, 9, 56, 25, 93, 48,121, 90, 42,113, 41, 68, 76, 45,251,224,143,127,236,
+227,124,249, 75,191,200,161, 67,135,121,253,141,243, 92,186,124,137,141, 91, 55,217,221,157, 82, 85, 21,135,143, 30,226,204,233,
+211, 60,244,208,131,180, 77,205,143,126,252, 18,207, 63,255, 34,123,187,251,114, 19,214,170,240,201, 35, 67, 63,224,189, 40, 19,
+ 5,207,104, 48, 6,252,180, 35,168,140,210, 66, 82,211,161, 36, 58,181,220,168,141, 81, 40,211,128,145, 52,178,206, 65,170, 26,
+165,223,167, 11,112,102, 8,101,210, 16,197,126, 35, 82,178, 40,112, 26,101, 80, 73, 30, 6,186, 16,130, 20, 86,198, 67, 38, 83,
+ 25, 49,184,161, 83, 57,169, 90,218,166,130, 20,232,252, 64, 42,190, 93, 97,245, 88, 49, 63, 41, 65,205,186, 81, 77, 21,133,127,
+172,221,220, 42, 23,153, 13, 1,147, 29,117, 45,159,134, 33, 39, 20, 3, 49, 43,186,169, 39, 27,249, 38,132, 32,187,118,171, 10,
+ 39,222, 21, 76, 97,202, 4, 20, 78,215, 7,245, 14,107, 53,214, 36,134,137,208,182, 34,153, 62, 38, 92,150,147,113,232,123,118,
+ 39, 61,211,153,168, 47,109,211,144,162,167,155,204, 8, 49,201, 3, 50,202, 67, 88, 35,253, 78, 31,188,104, 40,173,208,143,180,
+134, 33, 8,155,223, 22, 32,142, 66,128, 34, 86, 43, 76, 18, 10,151,177,229,103,140, 84,213, 84, 86,132,129, 98, 23,211, 84,149,
+147,244,106,169,170,152,242, 1, 54,186,149, 73, 66, 78, 12,190,199, 24, 35, 99,167, 36, 95,240, 65, 71,156, 21, 97,133,182,138,
+186,106,193,102, 44,208, 58, 71, 46,220,130,206,223, 1, 27, 73, 71,182,220,144, 74, 30, 34,165,128,137, 48, 16,136, 62, 18,134,
+129,105,231,241, 83, 47,161, 25,114,169,166, 72,130, 53,204,111, 4,148,250, 98,121, 40, 10,111, 62,203,193, 74,101,153,230,100,
+ 69, 55,155,146,135,158,170,178,184,202,208,214,142,165,165, 17, 75,227,154,145, 19,170,223,168,182,124,232,244, 73, 94,121,239,
+ 22,227,202, 72, 16,174, 18,233,199,254, 48, 33, 37,203, 82, 51,130,148,209,166, 97,175,243, 92,219,218,197, 71, 47, 43,173,126,
+198,180,155, 48, 12,129, 97, 24,132, 37,173, 10,133, 12,161,242,229,172,104,234,138, 67, 71,214, 89, 94, 24, 99,117,162,169,107,
+198,173,102, 58,141,212, 77, 77,223,117,244, 67, 79,229, 12, 93, 31, 88, 28,213, 50, 61,114,150,165,229, 6, 19, 51,157, 79,132,
+ 33,176,223, 71, 90,171, 88,104, 90,250,106,137,168, 23,240, 64, 55,120,178, 87, 24,203,129,144, 72, 35, 21, 69,163,156,224,126,
+149, 70,231, 72,152, 91, 4, 17,132,105, 74, 74,116,155,128, 79,153,232,131, 4, 60,139,211,115,136, 2,109,202, 58, 80,169,242,
+ 50,143, 81,254,140, 18,238,138,177,112,200,131,172,228, 84,249, 46,162,147,216,248, 10, 56, 4, 21,201,126, 78,160, 19,232, 74,
+109, 97,115,107,143, 43,239,191, 71, 91, 85,160,165, 50, 84, 54,199,133,185, 96,133, 52, 39, 87, 58,124, 20,180,118,219,140,232,
+188,231,246,246, 22,209,135,131, 3,176, 49, 90,160, 72, 10,140,169, 73, 49,112,248,240, 42, 75,171, 71, 81,200,120, 63,165,132,
+113,146, 7, 24,202,196, 64, 37,129, 70,101, 93,216,234,166,132,247, 68, 66, 46,122,224, 84,224, 96, 6,114, 18,165,172,182, 98,
+168,204,243,155,181, 96,245,200,161, 28,121,138,241, 50,147, 80,214, 22,217, 87, 16, 5,119, 44, 90,219, 52,223,111,103, 14, 98,
+220,229,223, 66,246,196, 36,107, 78,149, 98,161,172,201, 63,131, 51,134,140,200,119,180, 41,191,183,249,174,188,220,228,173, 17,
+113,146,211, 2,255, 81,102,126,187, 46, 41,115, 69, 49,202, 21,186, 94, 81,129,103, 85,100,237, 86, 36, 45, 34,248, 74,194,225,
+ 64,250,237,218,164,242, 62, 83, 5,196, 35,221,246, 84,246,230,243,231, 50, 81,126,102, 33,153, 66,102, 51,165, 94, 29, 73, 74,
+ 17,186, 68,206, 3, 90, 9, 94,155, 57, 37, 87,240,129,114, 72, 41,173, 2, 61,151,120,205,139,109, 86,201, 51, 53, 9,139, 32,
+102,201, 62, 97, 51,209, 75, 93,206, 40,153, 80,162, 82, 33,212, 41, 26, 43, 23, 88, 77, 81,107,207,233,135, 8, 32,141, 98, 54,
+ 85,165,245,164, 83,194, 39,241,203, 75, 9,223,232,162, 18, 45,225, 8,165, 15, 82,137, 20, 82,153,153,135,161,226,124,230, 89,
+ 70, 67, 81, 18,177,214,201, 56,235,241,207,126,154, 95,249,213, 95, 97,115,115,147, 63,255,139,191, 32,122, 56,121,234, 56,107,
+203,203, 92,185,122,141, 55,222,124,147,119,223, 57,207,139, 25, 14, 29, 94,229,115,159,253, 12, 79,124,230, 73,214, 86,143,240,
+141,191,248,255,216,223,217,198, 88,176,166,132, 73,172,197,202, 16, 94,106, 62, 67, 95,146,220,131,124,136,245, 64,202,154,202,
+ 84, 24,103, 49,202,224,180,212,241, 72, 51, 82, 7, 89, 89,172,158,187,219, 11, 72,167,132,153, 20,138,232,229, 38,236,140,189,
+131,116,213, 8,160, 6, 73,139,146, 10, 34, 81,107,218,170,198,167,129, 62,123,108,146, 73,135, 16,220, 50, 81,121, 65, 31, 26,
+112,214,200, 8, 76, 91,154, 74,161,130,103,210, 5, 9,207,117,157,236,164, 34, 5,156, 34,230, 49, 87, 59, 82,147,233,186,112,
+128,237,117,198,202,237,160,146, 17,188, 49, 14,211,119, 66,112,211,224,149,199, 69, 67, 8,224,115,162,178,114,219, 51, 70,110,
+213, 74,183,120, 99,160, 50, 44, 54,224,103, 51,226, 60,249,237,160,173,199, 44, 46,180,248,126,160, 31, 98, 57, 52, 88,186,198,
+225,131,199,135, 72,223,121,200,138, 33, 12, 36,148,116,193,231, 35,176, 44,107, 26,135,104, 31,149,146,154, 93, 78, 50, 66,236,
+162,220,250,181,202, 40, 91, 38, 28,133,216,104,172,193,186,132,117,181,124,201,172,194, 79, 7,145,202,168,140, 79, 2,126, 80,
+ 54, 98, 93, 57,169,199,132, 45,211, 1,231, 28, 57,103, 90, 93,161,237, 29,239,192,108, 38,193, 28,149, 34, 83,229, 49, 90, 30,
+144, 49,105, 90, 43,216,218,172,101,236, 88,238, 26,232,108, 32,104,162, 17,129, 71,165, 28,102, 92, 51,238, 21,106, 61, 19,189,
+103,240,129, 62,118,194,188,239, 99, 9, 17,229,242,178,146, 53,133, 81, 98, 76,182, 72,120, 72,231, 72,240,112,247,241,150,183,
+ 47,111,163,107,203,225,245, 21,106, 39, 7,190,195,171, 43,220,115,247, 49, 78,174, 45,176,208,182,184,102,129,151,127,250, 6,
+ 23, 46, 94, 99,177,109, 24,141, 26,249,140, 40,208,118,129,233,206, 14,181, 50, 44,141, 26, 86, 23, 42, 78, 31, 25, 97,252, 77,
+222,184,240, 62, 33,128,118,230,192, 43,237,172, 41,196, 69, 65, 2,163, 85,193,106,106,142,172,173,202,195, 44,244,140,151, 87,
+176,214,224,127, 78, 59,186, 48,110,164, 14, 56, 4,201,101,168,192,125,247,172,176,113,123,194,168, 90, 98, 92, 85,188,252,179,
+ 75, 44, 46,215,228,168,240, 68,246,125,132,176, 67, 59, 18,162,159,169, 44, 62,105,166,161,147, 73, 96, 50,101, 18, 54, 20,185,
+ 83, 42, 72,102,249, 94,154,172, 65,107, 98,232, 25, 84, 38,249,132,201, 18, 10,205, 81, 17, 98,135, 83,134,202, 90,124,236, 37,
+223,145, 21,125,169,177,165, 20,202, 78, 85, 40,109, 66, 12,205,104,157, 49,182, 46,253,230,132, 73,154,172,163,220, 80,131,212,
+ 57,197,205,208,151, 73,142, 33, 68,197,164,155,145,130, 39,219,106,222, 90, 58,168, 47,153,194,153, 8,201,227,172,147,236, 77,
+142, 44,180, 99,250,108,217,218,221, 32, 12,125,161,127,113,160, 34, 37, 69, 76,237,228,230,167,146, 76, 49, 75,218, 92,106,182,
+ 78,216,226, 70, 97,147,198, 15, 67, 65, 34, 91, 44,137,161, 68,173,229,210,144,101, 76, 31, 44,170,188, 96,148, 86,248,156,177,
+ 42,151,233, 65, 46, 16, 40, 89, 79,164, 88,186,252, 6,162, 47, 92,123, 20,106,144,169,162,209, 5,196,163,132, 28,153,148, 28,
+ 88,137,165,163, 93,214,167,145, 84, 14, 12,146,178,215, 7, 13,115,193, 78, 11,184, 38,150,116,182,172, 9, 84,177,165,165, 98,
+ 53,155,203,175, 40, 92,145, 88, 82,243,166,164,238, 77,193,243, 38,188,188,111, 8,133, 23, 96, 73, 41, 98, 98, 40, 42,218, 18,
+ 88,211,229,246,122,231,105, 47,142,241,178, 66,240, 73, 86, 97,104,205,224, 51,141,146,208, 94, 78,136, 88, 43,139, 75, 89,229,
+178,167,142,233, 96, 53, 93,208,163,197,162, 46, 41,122, 29, 53,186,214,210, 90, 72,114,179, 79, 74,203,106, 41,102, 84,144,198,
+148, 50,148,204,129,164,220,109, 9,241,166, 36,147,224, 92,246, 22, 57, 27,105,131, 28,216, 83,133,149,146,180,252,204,138, 48,
+179, 76, 11,203, 36, 36, 75, 58, 63, 43, 48, 11, 75, 43,191,151, 83, 20,180, 94,150,147,155,184, 97, 57,248,129,100,197,193,252,
+ 94, 86, 22, 69, 87, 88, 94,252, 90,205,201, 63,154, 71, 31,125,148, 95,255,245,127,198,219,239,188,205,159,254,233, 55,248,240,
+125,247,243,204, 51, 79,115,239,125,247,114,250,228, 41, 30,126,232, 44,143,158,251, 24,227,209,152,235,215,111,178,189,181,197,
+123, 23,222,225,230,198, 6,159,124,244, 28,199,143,202,205,190,235, 3,174, 88,180, 66,233,203,235,100, 14, 24,189,243,148,106,
+ 22, 58,137,132, 26, 98,225,181,199,132,159,159, 68,179,220,188, 82, 12,114,179, 45, 95,156, 3,173,105,206,196, 16,136,126, 14,
+168, 81,104, 99, 49,117, 35, 53,175, 44, 15,166,202, 57,234, 74,106, 14,198, 25,177, 27, 37,168,173, 43, 61, 73,192, 24,176, 22,
+173,107, 9, 59, 25,139,209,149,252, 45,149,198,154, 26,172, 17,126,190, 22,127,185,116,252, 35, 42,101,169,255, 37, 69, 93, 91,
+134, 97, 38,148,161,212, 17, 82, 47, 29,251, 16, 36,148, 99, 12,149, 22,147, 87, 93, 89, 28, 2,126,112, 73,166, 15,209,168,146,
+ 47,240,164,144,152,120, 79, 55, 36,134,190, 39, 36, 67, 72, 26,159,197,193,155,148,197,105, 67,221,180,152,106,204,210,202, 33,
+ 70,227, 49,245,184, 97,101,237, 16,227,145,101,105,117,204,241, 67,171, 28, 95, 93,228,196,145,117,214,215,151, 89,108, 43, 86,
+ 86, 71,172, 46,181,162, 48,212, 10,109, 29, 75,109,131,179, 26,103, 28,174,109,104, 70, 53,181,171,229,239,105, 13, 57,120,148,
+150,186, 95,240, 18, 70, 11,243,105,129,143,178,247,202, 10, 83,183,152,166, 18,205,235, 98,203,184,169,104, 90,199,210, 72,108,
+115,109,101,209, 41, 22, 24, 70, 38,198,129, 48, 4,122, 95,234, 52,115,191, 60,185,124, 49, 51, 93,239,165, 46,151, 50, 41, 27,
+134, 40, 55,128,232, 33, 69, 69,215, 69, 6, 47, 55,173,148, 33, 68,232,123, 17, 72,100,101,208, 86,164, 67, 85, 93, 81,143, 90,
+198,227, 49,139,227,154,133, 81,197, 66, 85, 51, 26, 53, 88,107, 74, 74, 90, 29,176,173, 18, 20, 18, 94,230,238, 83, 71,216,184,
+189, 67, 70,177,178,188,128,173, 29, 22, 69,219,200,255, 95,213, 52, 12,192,222,254,192,203,175, 95,224,198,230,109, 98,206,116,
+ 67,199,108, 50,101,119,119, 66, 63, 4, 78,173,183, 44,181, 21,171,203, 35, 48,137, 58,121,158,253,103, 79,114,108,161,229,253,
+ 43, 87,153,206,194,193,193, 84,169, 59, 42,227,249,120,127,238, 50,104,154, 10,133, 98,119, 50,197,135, 64,101, 32, 13, 1, 83,
+ 60, 12,174,110, 25,213, 22,165, 52,171,227, 26, 93, 89,110, 79, 19,179,153, 98, 99,107,143,143,127,228, 44, 23, 46,127,192,198,
+230,109,148, 85, 12,222,176,187, 59,195,152,204,153, 19,107,220,184,117,155,181,133, 17,173, 22, 56, 80, 95, 50, 48,170,146, 49,
+119,138, 66,134, 83, 81, 73, 31, 59, 38,140,118,132, 48,208,199, 65,210,230, 49, 65, 33,154, 89, 7,163, 74,163,157,194, 85, 6,
+173, 34,161,247,178,166, 11,129, 16,101,151, 29,131, 4,230,196, 57,165, 15,164, 27, 25,249,140,205, 57, 15,177, 76,239,180, 50,
+228, 44,105,221,164,196,252,101,140, 1,101,184,181,181,193,116,111, 87,198,183, 70,166, 47,174,244,144, 83, 33,208,201, 86, 82,
+122,225,198,138,153,112,107,247, 54,195,116,239,128,136,152,231,205, 25, 35, 55,210,156,139,191, 92, 69,150,150,214,202,127,166,
+ 14,188, 11, 82,111, 66,110,145, 63,183,167, 37, 75,117, 88,194,133, 37, 37, 62,175, 86, 41, 65, 0,231, 12, 26,135,113,133,155,
+159,230, 91,136,242,226, 40,161, 63,144, 81,111,201,211, 30, 88, 11, 77, 33, 79,230, 82,227, 19,152,203, 29,191,135, 66,224, 59,
+114, 65,138, 16,231,100,208,132, 47,189, 49,101,138,247,157, 32,170, 80,165,202,129,104,206,132,147,201,162, 0,172,132, 37, 47,
+ 53, 26, 93,222, 60,130, 2, 86, 7,125,177,124,112,153, 60,192,168,166,132,202,194, 95,151,247,182, 57, 32,142,170,172, 80,201,
+148,149,133, 47,124,244, 2,147, 65,163,147, 16, 51,147,146, 12, 67, 60, 16,190, 68, 34, 2,235, 81,101,250,150, 74, 82, 47,151,
+213, 46,133,106,169,138,219, 62,151,199,191, 81,166,116,131, 36, 4, 72,177,158,166, 40, 47,123,165, 75,184,182, 48, 1,114,201,
+ 13,164, 92,248,238, 73,160, 96, 81, 2, 97, 2,109, 2, 1,210,168, 68, 30,130, 60, 87,116, 1,240,100,176, 37,116, 23,230,217,
+129,241,226,194,239,145,162,160, 2, 83,193,251,165, 64,140,254, 64,112, 64, 20, 74, 81, 76, 30,162, 23,106, 91,144,219,166,214,
+153,224, 61, 49,101,142, 30, 61,204,111,125,253, 89,182,182,182,248,163, 63,248, 15,220,218,216, 98,214,247,244,222,163,178,162,
+ 27, 6,246,167, 83, 20,176,182,190,134, 70,177,185,117,155,166,105,217,217,217, 99, 58,157,242,232,185,115,164,228,121,239,226,
+213, 98, 82,155,255, 50,106,217,191, 25, 25,105, 12, 65,164,245,198, 57, 22,199, 11,140, 70, 13,149, 86,248,190, 47,185, 0, 67,
+211, 44,210, 54,181,156, 58,189,103, 54,244,248,168, 14,126, 33,115,174,119, 44, 39, 48,231,172,220, 90,162,236,239,134,206, 51,
+164, 92,194, 21,162,147, 37,139,100, 64, 27, 69,211,180,140, 23, 91,249,128,197,140, 54,242, 33,148,106, 66,100,232,197, 18, 22,
+ 11, 9, 67, 69,129,246,184,186, 18,162,153,151, 81,119, 54,154,186, 54, 84, 70,132, 48,182, 50,152,100, 73,198, 50, 94, 94, 16,
+118,115, 24,202,190,106, 94, 95,137,136, 69, 69, 30, 42,210,217,151, 79,150, 66,146,153,206, 56,108,214,130, 56,240,129, 20,122,
+250,193,227,103, 61, 42,123, 73,204,247, 3,179,161,151, 19,100,136, 76,186, 14,159, 6,124,223,227,125,160,243, 61, 33, 43,250,
+ 62, 51,132, 68, 80,146, 45, 8, 70,225,218, 5, 22, 23,199,180,117, 75,211,150, 17,115, 93, 97,180,193, 71,208,141,147, 1,188,
+ 54, 24, 91,161,181,165,109, 90, 92, 59,166,109, 90,150, 22, 23,169,235,154,202,136, 47,188,178, 78, 30,220, 42, 75,245, 76,152,
+150,178,251,139,242,229,239,135, 72, 54, 14,235, 90,154,166, 97,180, 48,194,141, 44,117,221,210,214,142,218, 8, 82,210,100,138,
+ 81, 78,152,220,253, 32, 94, 1,109, 52, 49, 23,134, 8, 98,188,154,247,101, 93, 86,130, 40, 46,246, 39, 65,142, 6, 98,144,207,
+ 73,142, 17, 31, 12, 67,242,196,160, 36,173,158, 69,181,106,170,154,166, 25, 83, 53,142,229, 81,203,104, 84,211,182, 35,154,170,
+146,234,147,209,184,214,240,246,133,247,217,222,217,165,174, 29, 75,227, 17,163,186, 98, 8,137,219,187, 51,182,119,247,120,251,
+221, 75,124,112,229, 58,141,137,188,121,233, 58, 41, 6,234, 74, 58,200,146,154, 72,184,198,112,246,236,221,172,212, 45, 89,105,
+172,242,124,234,147, 31,230,233,223,254,117, 62,114,255,105, 78,173, 85, 92,189,116,149,173,221, 41,214,136, 34, 55,151,102, 75,
+ 76, 25, 93, 57, 82,130,181,213, 37, 14,175, 47,179,189,179, 79, 12,129,126, 54,165,110, 44,109,221,176,188, 56, 66, 27, 77, 61,
+178,172, 47, 45,178,184,188, 70,213,214, 76,102, 19,124,159,113,214,178,189,189,203, 75,175, 93,161,247, 3,147,201,148, 48, 4,
+102, 67,207,108, 54, 97,117,113,153,207, 60,254, 24,221,208,113,107,107,143,147, 39, 86, 56,125,236, 8,154,196,126,223, 73, 40,
+ 40, 36,116,146,234, 98, 46, 53, 72,180, 34, 32, 15,184,156, 34, 38, 40,113, 49,100, 79, 38,210,182,142,202,214,133, 53, 94,196,
+ 59, 65, 38, 9,170, 4,109, 7,239,201, 49,224,163, 84,145, 66, 8, 7, 82, 17, 93, 0, 40, 42, 11,220, 67,105, 77, 72,153,253,
+174, 99,107,103,151,219, 91,219,108,111,111,179,177,113,139,221,157, 93,246,103,251,236,237,238, 16,135,161,220, 26, 13, 42,137,
+ 75,251, 14, 33, 12, 12, 66, 86,140, 57,209,245,129,221,221, 45,102,221,190, 4, 75, 85,233,215,151,216,149, 4,228, 18,141, 51,
+172,142, 45, 39, 15,173,176,184,180, 34, 47,217, 44,211,200, 48, 79,170, 23, 41,137, 82,114, 24,144,247, 88,148,219,157, 46, 30,
+239, 80, 66, 97,141, 8,163, 68,123, 42,223,199, 92, 60,234,170, 8, 99,180,201,197, 79, 46,231, 3,159,228, 22,153,181,220, 34,
+229,138,172, 10,133,217,200,229,205, 26,161,195,202, 89,167, 28, 6, 82,177, 54,102, 14,232, 39, 37,204,167,203,116, 68, 91,203,
+124,209,172,180, 60,187,230,194, 47, 89,217,106,156,214, 68,163,127,142, 34,103,138,153, 44,138,132,171, 76,186,230, 23, 72,201,
+204,229,178, 11,207,168, 18,182,148, 49,178,158, 15,247, 75, 16, 79,254,188, 57, 2, 87,149,176, 47, 74, 96, 74,178,225,187,195,
+245,215,165, 6,157,147, 60,239, 83, 10,165, 46, 89,242, 50,115,179,103,188,163, 17,151, 63, 77, 38,214,194, 63,146, 73, 1,166,
+232,204,179, 70,151,245,111, 40, 60,123, 85,216, 41, 81,221,233,175, 23,205,144, 76, 44,202, 75,159, 34, 36,138,130,102, 16, 15,
+125, 81,184,170, 34,194, 49, 89, 11,155,160,100, 12, 82, 46,226,217,131,209, 68,241,164,167,178,195,202, 37,172, 38,249,140, 40,
+189, 10,109,112, 7, 2,120, 57,165, 73, 5, 39,240,248, 99,143,178,180, 48,230,143,255,253, 31,177,113,235, 26, 89, 41, 46,156,
+127,131,119,206,159,199, 57,199,250,145,195,220,125,230, 46,214, 87, 86, 9, 49,178,182,186,198,147, 79, 62,193,251, 87, 63,224,
+236,217, 7, 88, 93, 89, 97, 99,107,139, 19,167, 78, 51, 94,248, 41, 27, 27,155, 40, 39,164, 31,225,244,106, 81, 62, 70, 88, 92,
+ 90,230,248,177, 19, 28, 59,126,148, 35,135,143, 48,110, 91,134,190,227,242,229,139,236,239,239,115,242,212, 41,214, 86,143, 96,
+172, 98,119,119,151,119,223,125,151,243,111,190,201,224, 59, 66,180,104,163, 9, 62,224, 42,203,195,247,223,207,241, 19,199, 88,
+ 90, 94, 33,248,192,173, 91, 27,188,251,238, 5,110,108,108,162,181,102, 80,114, 83,214, 70,209,182, 45,167, 78,156,226,232,137,
+ 99, 28, 63,114,148,241,194,136,156, 18, 91,155,183,120,235,252,121, 54,182,110, 51,110,101, 68,230, 76,192,186,138,224, 35,203,
+107,235, 60,112,223, 3, 28, 62,114, 24, 83, 89,246,118,119,121,255,202, 21,222,126,247, 2,209, 75,247, 17, 45,225, 52,149, 18,
+103,206,156,225,248,201,147, 44, 46, 45,225,135,129, 91,215,175,243,238,197,119,216,157, 78,169,181,165,178, 48,219,159, 48, 11,
+ 50,106,143, 25,116,109,177,100,234,218,138,229, 39,107,102, 38,178, 96, 22,208, 33, 49,116,158,140,166,113,142, 88,198,206,174,
+181,204,162, 39, 87, 14, 61, 36,200, 61, 41, 57, 81,108, 38, 79, 91,181, 12, 65, 30,168,169,114,168,228,133,243,222, 67,238, 60,
+ 67,142, 24, 87,209,154,113,201, 31,100, 58, 99,176, 78, 48,146, 62, 14, 96, 44,179,201, 62,221,224, 49, 86, 75,106, 85, 65,213,
+212, 84,202,208,123, 57, 84, 10,215, 67,242, 17,217, 39,170,202, 80, 57, 33,191, 25,157,139, 56, 71, 2, 77, 93,138,194, 99,239,
+164, 86, 73,225,134,215,218,129, 21, 0, 82,107, 28,182, 29,177,210,214, 76,251, 41, 57,212,116, 65,110,139, 41, 8,230, 55, 6,
+ 67, 82,114, 66, 55,149,124,158,147, 81,168,104,201,126,192, 26, 75, 8,137,126,232,229, 6,110,122,156,202,101, 84, 40,201,110,
+165,172, 16, 13, 77,164, 81,150, 74,107,140,106,233,139,180,200,234, 76,223,121,246,187,142,174,235, 25,143, 28,187,147, 25, 49,
+ 37,182,118,167,108,110,237,176,216, 58,198,213, 18, 57,100,158,252,236,189, 92,187,182,135, 77,138,251,143,175, 99, 43, 77,240,
+153,157,253, 9,125,212,196,110,224,141,215, 46,114,246,244,113,140,129,193,123,118,102, 10,170, 49,237, 3,103,249,226, 93,199,
+120,236,211, 31,227,247,254,143,127,199,119, 94,122, 15,165,157, 60, 4,147,140, 98, 27, 91,163, 42, 67, 68,179,179,215,227,195,
+ 64,219,212,164,160,184,181,181, 75, 61,106,105,157,163,110, 27,236,168, 38,165,140,159, 37,154, 81,195,241,181, 53,110,238, 77,
+ 73, 81,177,188,182,140,219,155,145,179,103, 63, 4,250, 44, 29,244, 97, 54, 99,121,105,204,108,111,224,147, 31, 57,199,123, 31,
+108,240,194, 75, 63,229,137,115, 15,241,185,143, 63, 64,110, 70,252,213,223,255,128,237,217, 4, 91, 91,114, 23, 74,138,152,242,
+ 66,145,158,186, 82, 26,159, 35,217, 70, 98,148,149, 1, 81,209,231,128,193, 21,234, 90,198, 57,131, 13,133, 24,233, 37,116, 23,
+ 99, 73, 97, 71,121, 56, 83, 91, 84, 80,116, 33, 96,156, 28, 22,187, 73, 98,123,123,147,161,159,210, 77,246, 73,193,203,132, 86,
+151,181,162,171,137, 3, 84,128,109, 27,185,224,200,208, 85, 12,131, 86,220, 15, 26,205, 16, 51, 62, 13, 36, 63, 16,252, 64,140,
+161, 0,154, 10,185,185, 48, 38,156,209,212, 86,242, 5, 11,141,226,158, 19,135,248,240,189,119, 97, 70, 11, 76,102,137,208,239,
+ 11, 9,114,150,120,247,230, 46,187, 94, 2,179,206,148,135,250, 16, 36,243,225,132, 84,153, 99,193,178, 24, 75,152, 37,172,147,
+181, 95, 10, 94,228, 86, 90, 92,228,130,220,149,221,172, 48, 29, 74, 98, 62, 67,204, 6, 21,179,120, 22, 48,196, 44,223,197, 20,
+229,123, 17, 82, 44, 10, 81,153, 44,196,162, 71, 85,185,164,115,162, 48,198, 19,194, 47, 55, 86, 88, 36,186,184, 45,116,158,239,
+191, 13, 73, 27,140,137, 88,171,201, 67,241, 33,207,211,245,169, 36,185,117, 65, 53,151,234,154,200, 50, 10,184,169,240, 57,152,
+215,230,146, 8, 83,180, 54,119,214, 34, 82, 71, 32, 41, 89,101,164, 20,208,229,162,161, 84, 16,126, 70,206,114,168, 51, 6, 10,
+181,109, 46,235, 9, 73,114,234, 86,187, 82,151,158,235,226, 11,156,135,121,223,188,188,124,203, 1, 71,103,153,202,233,156,133,
+124,106,141,144, 82, 67, 18,163,167, 17,160, 89, 20,128,188,172,184,203,159,155,181,194,198, 34,211,153,239,235, 65,200,115, 70,
+ 17, 10,131,206, 22,192,153, 74,134,164, 32, 34,235,205,236,229,221, 13, 26,171,149,147, 17,101,150,211, 74,204,210,157,211,115,
+147, 21,243, 29,220,252, 60,113, 39, 39,129,130,144, 85,225,248, 38, 62,249,169, 79,240,250,235,175,113,229,242,123, 88,155,133,
+214,133, 66,233,200, 93,119,223,205, 39, 62,241, 41, 62,116,230, 12,171,171,171,194,173,173, 68,250,254, 7,127,252, 39,188,244,
+163, 31,242,181,103,159,101,125,125,157,195,235,235,252,250,127,243, 21,190,253,237,239,114,254,173,243,229, 38, 45,128,142,156,
+ 37,117,253,139,191,246, 21, 62,254,145,143,210,180,117, 65,160,202, 9,240,220,163,143, 18,163, 48,179,153,167,245, 51,156,123,
+244, 49,158,123,254,121,190,243,205,191,103, 8,241,128,158,116,215,233, 51,252,119,255,227,191,164,114,245, 1, 21, 9, 50, 23,
+223,125,151,191,254,235,255,204,123,239, 93, 38,149, 47,186,179,134,207, 60,254,105, 62,253,201, 79,177,190,190, 62,255, 77, 31,
+140,149,238,185,239,126,254,238,155,223,230,246,141,107,120, 35,196,182,201,116,224,200,225,195,124,233,151,191,194, 93,167, 79,
+203, 7, 71,203,127,255, 99,231,206,241,220,247,191,195, 75,255,245,167,120, 35, 63, 99,167,107, 62,242,216, 57, 30,255,228,103,
+ 25,213,141,236, 99,149,140,233,223,123,239, 2,223,121,254,121,246,119,118,137, 64,213, 2,211, 40,200, 74, 66,233,236, 91, 25,
+ 43,169,114,218,207,137, 33, 56, 22,170,138,197, 67, 99,124,242,116, 67,164, 54, 6,167, 27,186, 32,180,173,232, 7,140,177,212,
+180, 96,165,114,150,113,224,101, 39,155,140, 42,192,137,138,136,161, 93, 90,198, 12,248, 0, 0, 32, 0, 73, 68, 65, 84, 26, 99,
+180,116, 56,109,156,159,160, 69,201, 57, 66, 56,248,173,150,212,105,200,158,222,247,164, 73, 36,231,129,157,189, 93,246,186,129,
+228, 59,250, 33, 18,181, 18, 5,229, 48,224,227, 68, 2, 49,218, 49, 13, 3,157, 1,223,251,226, 78, 55, 52,182, 38,155,242,224,
+165, 35,197,136,113, 53,227,118, 76,206,145,125,100, 31,170,251,204, 52,121, 24, 60,126, 24, 17, 21, 84, 78,179, 56,110, 88, 41,
+217, 16, 89, 3, 56,217,139,170, 76, 7,168,148,152, 78,134,114,234, 29, 17,148, 39, 15, 73,168, 91, 74,129,145, 93,172, 15, 3,
+179,217, 64,210, 25,167,107,146,201, 84, 73, 9,119, 89, 87,180, 78, 97, 19,152,202, 98,173,204, 4,186, 91,219,244,253, 64, 93,
+181,196, 52, 97,243,246, 62,221,208,147, 99,100,241,208, 58, 43,171,135,240, 33,114,117,207,243,214,197, 15,200, 41,114,236,248,
+ 58, 11,173,161,159,246,156, 92, 89,230,234,237, 25, 27,219,183,240,211, 29, 86,199, 71, 57,186, 54,226,232,209,163,108, 93,251,
+128,189,235,183, 88, 60,118, 6, 26,203,250,163, 79,113,234,174,239,160,126,116, 1,137, 14,202,119,116,105,105,137,163, 39,238,
+ 99,119,186,195,198,181,139, 4, 87,201,238,114, 8, 84,181, 35,231,200,181, 43,183,104, 85,205,201,122, 5,141,197, 39, 79, 85,
+203, 33,224,246, 36,114,229,250, 13,134,153,192, 91,150, 87,198, 28, 93, 21,196,233,252,137,151,148,162,109, 27, 54, 55, 54, 49,
+205, 50,203,135,143,115,227,214,247,248,243,191,251,175,156, 62,121,156,175,124,241, 41,126,237,151, 31,231,175,254,246,187,220,
+218,153,202,231, 43,134,210, 32, 72, 36, 99,240, 19, 65,144,102, 44, 49,250, 50,166,150,155,176, 38, 99,113,132, 44, 1,205,152,
+ 37,236,166,117,194, 84,142,228,141,176, 18,178, 18,139,149,113,228, 98,240, 82, 6,226, 16,112,206,177,189,189,197,173,171,151,
+ 24,141, 42,172,210,180,227, 70,214, 99, 2,154, 70,107,131, 51,148,125,120, 34,132,200,116, 54,147,204,193, 1, 25, 93,232,133,
+222,123, 98, 26,228,198, 89,110, 85, 90, 41, 42, 43, 87, 68, 65, 90,151,219,169, 51, 44, 47,181,160, 13,135,214, 70,220,117,114,
+149,151,222,217, 68, 43,203,104,180,196,218, 66,195,189,199,199, 60,153, 19, 63,125,237, 42, 63, 57,127,157, 73, 40,185,130, 36,
+ 28,131,148,202,136, 91, 25,156, 43,211,198, 44, 13,146, 56,239, 63,163, 14,130,134,166,248,211,251,161,216,188,144,145,175,116,
+224, 11,137,110, 16,168,141,154,103,136,148, 34,135,178, 79, 86,166,208, 28, 35,169,120, 40, 84,241,143, 39, 37,236,119,103, 85,
+ 9,181,221, 89, 31,228, 84, 58,212,214, 9,224,134, 36, 76,123, 31,133,246,167,212, 1, 48, 43,229,132, 50,249,206,125, 91, 94,
+ 62, 28, 63,126,140,135, 31,121,132,111,127,243,191,200,182, 62,235, 3,209,204, 99,159,252, 4, 58,195,203, 47,255,168,116,217,
+197,206, 25, 85,148,119,154, 18,184,141,232, 74,229,192, 40,213,200, 34,108,201, 82, 55,182,149, 16,222,142, 28, 61,198, 3, 31,
+126,144,231,191,243,109,146, 10, 5,127, 43,217, 42,157, 75, 56,173,180, 30,148, 50, 34, 28,251, 57,188, 56, 74, 0,103,201,203,
+173, 62,166, 40, 43,146,162,174,149,232,128, 33,196, 50,117, 85,153,172,197, 90, 26,148,172, 85,178,132, 68, 36,229, 83, 66,144,
+105, 94,209, 46, 93,252,121,181, 78, 21,169,140, 50,114,168,209, 57, 96, 22,151, 86,126, 79, 23, 34,147, 36, 7, 11, 23,216,200,
+109,118,158,246,198, 20,144,126,161, 19,105,123,199, 96,149,139,145,231,215,190,250, 85,190,253,221,239,114,233,242, 21, 25, 1,
+103, 57, 85, 61,248,240, 35,252,139,127,241,207,249,240, 3,247,179,180,184,136,117, 78, 66, 86, 70, 48,133,206, 58,158,127,238,
+ 57, 94,123,237,117, 70,227, 49, 43,203,203,156, 56,113,130,135, 30,124,144,253,201,148,107,215,175,201,106, 64,201, 15,175,174,
+ 43,126,229,151,191,204,234,202, 10, 10,184,117,235, 38, 23, 47, 94,162,174, 43, 65,167,162,216,159,236,115,225,237, 11,204,166,
+ 51, 22, 22,198, 84,206,114,236,232, 81, 46,188,243, 54,183,111,111, 22,152, 3, 28, 63,126,148, 71, 30,126,152,247,175, 94,227,
+198,141, 91,242,226,104, 91, 86, 86,215, 88, 89, 89,225,252, 91,239,136,213, 75,101, 22,198,139,124,254,233,207,115,226,196, 9,
+148,130,141,205, 77,174, 92,185,140, 86,134,182,109, 88, 89, 89,101,161, 29,241,214,249,243,236,207, 38,116,251, 29, 73,193,231,
+159,250, 5,206,158,125,144, 12,108,108,220,226,242,165,247, 89, 91, 91,197, 89,203,250,242, 26,111,190,245, 6,211,217,148, 70,
+193, 3, 15,220,199, 23,158,254, 37,234,170,162,235, 59, 46, 94,122,143,156, 51, 77,221,176,188,182,198,242,226,152, 55, 94,127,
+ 85,234,163, 57,210, 69,185, 69,215,198, 34,219,145,129, 72,164,239, 3,251,131,152,221,134,222, 51,243,162, 38,213,218,208,165,
+194,117,175, 26,201, 8, 36, 37, 47,246, 12,209, 88,106,237, 80,198, 72, 37, 45,165,130,219,148, 10, 74,246, 66, 16,139, 49,210,
+245, 29, 97,240, 2,140,168, 20,237,162,220, 82, 43,227,168,170,154,152,161,173, 27, 84,206, 52,245, 2,163,213, 21,150, 86, 22,
+ 24, 47, 46, 50,110, 42, 70,139, 35,150,154,150,197,197, 69,172,209,180,163,134, 81, 91,163,181,220,244,157, 73, 96, 13,227,182,
+ 41, 99,117, 79, 68,210,232,164,140,201, 2, 99,232,125, 79, 55,219,101, 50,157,209,123, 9, 99,249,156, 48, 86, 73, 42,123, 58,
+101,178,191,199,100,218,177,215, 5, 38,157,103,103,210, 49,243, 50,133,242, 40,204,168, 46,208, 34,193,105,214,181, 97, 97,161,
+ 98, 84, 59,198, 11, 21,171,139, 99,198,139, 45,117,221, 80,143, 90, 22,155,154,118,161,166,182, 21, 85,150, 32,143, 26, 50,221,
+116, 70,215,117,236,118, 83,118,247,166,226, 88,159, 78, 25,186,129, 99, 43, 21,215,111,220, 98, 99,107, 91, 38, 11, 33, 98,148,
+226,232,225,195, 44,175,174,210,117, 29, 91, 59, 91, 92,184,112, 25, 29, 50,235, 43, 11,197, 13,144,233,122, 1,132,108,238,108,
+ 16, 73,156,185,235, 4,247,222,125,148, 15,159, 57,194,147,191,253, 63,113,232,216, 2,147,173,171, 44,159, 60, 5, 56,174,252,
+211,203, 92,121,227,117, 94,121,227, 50, 62, 41, 66,150, 12,201,120,229, 48,213,104,145, 20, 35,161,155,226, 12,212,141, 21,142,
+120, 74, 44,140,199,140,154,138,155,155,219,100,235, 24, 57, 71,227, 26,124,206, 92,190,124,149,237,173, 91,248,190, 39,133, 65,
+180,160,193,211, 44,140,168,109, 77,215,117, 82, 71, 50,134,213,213,117,246,247,167,172,158, 94,103, 54,153,112,243,250, 13, 76,
+ 74,220,218,220,229,251, 63,250, 9,247,127,232, 56, 79, 62,241, 25, 46, 93,120,135,105,223, 11,234, 19,105,174,132, 97, 64,107,
+193,148,134, 36, 43, 44,163,193, 33,191, 83,227,100,175,109,149, 36,172,125,136, 4,239, 15, 82,236, 98,131,147,135,167, 51,146,
+ 25,177, 86,170,146, 74,137,100, 3,101,216,188,121, 29, 63,204,176,214, 73,216, 82, 21, 7,134, 42, 43,153,152,100, 45, 73,129,
+170,100, 9, 45,185,170, 2,101,232,135,142,217,108, 70, 63,244,164,232, 15,226,224,115, 61,166,115, 22,235, 12,149,149,132,188,
+ 86, 70,216, 20,104,134, 32,213,221,253,174,199, 84,142,215, 46,221,228,181,215, 47,112,253,250, 22, 23,175,220,228,221,155, 59,
+ 28, 59,190,194,231, 30,191,159, 15, 63,112,152,237, 91,183,185,122,115, 27,109,164, 6,171,238,224,211,133,183, 62, 23,133,100,
+ 97, 39,160,229,230,168,203,243,124,136,114,200,207, 72, 3, 36, 69,177,173,205,235,170, 50,250, 79,119,228, 35,165,158, 37,234,
+ 81,125, 96, 70,148,234, 26,152, 36, 32, 46, 93,254, 60,109, 4,226, 98,178, 34,132,132,179, 86,244,203,243,219,112, 44, 21, 60,
+173,177, 74, 75, 54,168,146,137,136,160,183,193,206,241,176,133,238,168,181, 2, 13, 71, 15, 31,229,193, 71, 30,225,159, 94,249,
+167,185,166, 12,107, 44, 57,101,238,185,247, 94,172,181, 92,125,255,125,121,111,233, 44,226,149, 34,145,209,229,194,167,116, 62,
+112, 39,168,194,170, 55, 72,149,204,148,137,121,206,138,181,245, 35, 60,244,240, 89, 94,125,245, 85,193, 93,167, 84, 88, 21, 98,
+104,204, 5,214, 83,128,246,101,213,167, 81,149, 48, 64, 52,194, 64, 17, 50,190,188,120,231,184,216,164,228,179, 97,210,157,144,
+176,100,247,228, 0, 24,146,100,171, 14,138,245,200,122, 72, 23,235,220,252, 23,174,180, 24, 51, 83,150,181, 75,154,107, 93, 11,
+127,223, 44, 45, 47,255,158,162,252, 82, 85,249, 77,170, 2, 17,201,243,186,157, 36,226,117,169,153,229, 66,205, 73, 37, 41, 33,
+213, 65,205, 83, 79,125,142,231,190,247, 2, 59,123, 59, 7,167,211,147, 39,143,241,245,223,250, 58, 71,142, 28, 97,158,214, 81,
+ 90,253, 92, 46, 17,142, 29, 61,202,245,235,215,121,243,173,243,188,249,198,155,128, 98,188, 48, 38,196,196,217,179,247,115,123,
+107,139,155,183, 54,228, 47,173,197,232,115,238,227, 31,101,101,117,149, 16, 34,127,251,119,127,203,183,190,249, 61, 50,138,251,
+238,187, 23,173, 20,239, 93,188,196,159,125,227, 27,188,242,234, 27,220,117,215, 41, 86, 87, 87,176,214,113,243,214, 45, 46, 95,
+250, 64,190,160, 40,134,233,140, 55,223,124,131,231,191,255, 2, 63,122,233, 37,250,161,227,254,123,239, 21, 84,173,173,120,231,
+226, 69,182,183,119, 72, 81,234, 63, 15, 60,112, 63,135, 15, 29, 34,165,204,183,191,245,109,254,238,239,255,158, 27,215,111,114,
+223,125,247, 96,173,195, 40,205,107,111,156,103,227,246,109, 82,204, 44, 46,173,242,185,167,158,100, 52, 26, 17, 66,224, 47,255,
+243,223,240,147,159,188,202,217,135, 31,164,174, 27, 82,202,188,245,214, 59,236,110,239,163,141,229,220,163,143,113,252,196, 41,
+ 50,112,254,237, 55,249,246,183,254,129,173,173,109,238,189,239, 62,156,115,172, 44,173,242,218, 79,255, 9, 99, 18, 77, 91,211,
+ 86, 53,117, 85,225,170,154,166,118,212, 78, 9,130,212, 41, 90, 87,209, 44, 54,180, 54, 51,170, 43, 57,221, 38,143, 77,137,170,
+ 54,132, 48,160,116,192,182,142, 58,149, 79,152, 41,222,116,157,208,202,210, 52, 34,205, 25,217,134,197,102, 76,219, 90,217,131,
+187,150,241, 66,205,120,228,104,156, 43,167,249,154,202,180,101,119, 89,145,117, 36,230,128,177,141,132, 18,125,199, 16,133, 54,
+ 87, 45,142,105,171, 5, 22, 23,151, 89, 88,108, 88, 61,188,198,202,226,152,163, 43,107, 44, 47, 45, 80, 87, 53,139,163, 5, 52,
+ 2,193,208,202, 98,141, 67, 59,199,168,109,105, 91,233,196,219,170, 98,220, 86,184,218,225,180,145,132,125, 1, 20,197, 32, 39,
+ 95,107, 44,166,146, 13,157,239, 6,186,201, 62,125, 55,195,119,158,219,187,123,236,236,236,179,125,123,151,205,219,219,108,109,
+239, 49,120, 79,232, 51,189, 31,200, 88,178,114,152, 74,118,163, 90,103, 22, 70, 21,163,229,154,229,209,136,229,133, 49,213, 98,
+195,209, 35,139,140,234,150,165,133,138,229,197,134,218, 88, 42, 35, 35, 74, 82,164,109, 42, 30,249,208, 25,222,185,116,149, 62,
+244, 7, 22,193,227, 71,215, 89, 94, 93,161,247, 19,240, 30, 87, 57, 42,167,169, 44, 60,250,208, 9, 72, 3, 59,219, 19,118, 39,
+ 61,179, 24,139,255, 26,198,227,195,236,109,239,241,177, 79, 62,202,201,143,252, 26,227, 67,103,136,187,151, 24, 29, 57,204, 79,
+254,246,191,240,214,171, 63,227,173, 43, 59,236, 77, 3, 67,188, 19,214,153,205,122, 70,166,163,110, 50,195,208, 11, 35, 95,160,
+ 19,140, 22, 86,113,182, 98, 24,122,140,181, 36, 31, 57,121,242, 40,251,222,179,113,243, 6,155, 91,155, 34, 76,177, 6,107, 36,
+248,216,245,129,233,100,198,241, 19,107, 52,104, 54,111,239,179,188,186,192, 16, 2,179, 89,143,109, 91,174,223,220,226,246,230,
+ 53, 14, 45, 57, 30,186,255, 20,107,149, 69, 15, 59,156,251,212,199,168,150,143,241,195,127,252,199,178,159,246, 34,208,136,178,
+110,209, 38, 10, 41, 44,101, 76, 22, 37,235, 48, 4,114, 20, 12,175,247,129,236, 7, 98, 26,200, 57, 98,203,174, 53, 71, 49,127,
+105,163,239, 0,148,180, 60, 69,117, 1, 40, 5,159,216,218,220, 32,250, 65,122,255,198, 16,163,136,129,162, 36, 39,209, 36,154,
+186, 18, 70, 66, 78,162, 25,205, 25,109,106,170,166,149,172, 79,150,131, 69,144, 84, 84,185,189,202, 96,209, 25, 93,218, 43,148,
+ 78,186,147,137, 67,153, 34,134,156,152, 77, 2,211,221, 41,123,123, 19,182,119, 39,120,223,179, 55,153,112,227,230, 6,175,190,
+246, 46,149,201, 60,249,153,143,240,139,191,240, 81,142,172,213,188,249,238, 13,102,179, 32, 14, 5,109,100,135,139,144,202, 12,
+ 37, 60, 85,178,231,214,138,212, 40, 6, 33,239,197,178, 11, 87, 73,106,150,100,177,166, 45, 47,175,240,208, 67, 15,115,252,228,
+113,158,249,252,231, 57,124,232, 48, 31, 92,187,202,151,190,248, 37, 62,245,233,199, 25, 6,207,141,107,215, 48, 70,115,252,232,
+113,158,126,250,105, 62,253,217,207,242,224,217,179,108,108,108,176,183,179,199,189,247,220,203,202,202, 42,103, 31,121,132,103,
+158,121,134,211,119,221,197,149,203,151,201, 41, 49,106,199,124,229,171,191,194, 19, 79, 60,193,194,226, 50, 71,142, 28, 97,218,
+117,244, 93,199,250,234, 97,126,241, 23,127,137, 79, 62,254, 56,227,165, 69,110,221,188, 65,240, 17, 74,216, 23,165, 89, 63,116,
+152,211,167, 78,177,180,176,204,211, 79, 63,205,177,163, 71,184,122,237, 42, 49,123, 78,223,117, 6,148,226,202,229, 43,140,219,
+ 17,143, 63,254, 4, 79, 61,253, 11,220,125,250,110,110,109,220,162,235, 58, 86, 86,151,121,232,225,143,178,178,178,194, 23,191,
+248,101,238,127,224,126,110,239,108,179,189,187,139,210,153,135, 30,126,144,167,158,122,138, 7,207, 62,136, 34,179,178,178,204,
+171,175,190, 66, 86,240,137, 71, 63,193,231,191,240, 5, 30,120,224, 1,186,190,103,235,246, 22, 43,171, 43,220,123,207,125,124,
+250,211,159,226,227,231, 62,198,141, 15,174, 51,157, 13,210,115, 87, 10,175, 19,231,206,157,227,153,103,158,225,254,251,239,167,
+235, 58,110,239,220,102,117,121,133,123, 63,244, 33, 62,245,248,227, 60,252,209, 71,248,224,131, 15, 88, 89, 90,225, 75, 95,254,
+ 50,231, 30,123,148, 24, 61,103,207,158,229,253,203, 87, 11,250,119,206,206,144, 9,162,178,170, 84,252,242, 65, 46, 68,149,204,
+134, 41,117,213, 16, 51, 54, 99, 64,221,137,235,231,185,192, 93,186, 33, 82, 87, 40,220,217, 36,101,215, 3,112, 71, 89,182, 31,
+252,107, 24, 6,186, 97,192,168,138,172, 51,117,227,248,204,103,159,224,196,241,227, 63, 55,218, 62,152,220,223,233, 58, 42, 88,
+ 89, 93, 69,107, 77,223, 11, 89, 11, 50,127,241,231,255,145,133,241,136, 50,179,128,108,229,164, 87,108,185,148,157, 90,215, 5,
+246,246,119,249,224,234,251, 2,161,177,178, 19, 30,252,192,238,214, 22,183,183, 54,201,103,206,160, 20,226,118,142,169,156,244,
+ 21,147,233,148,163,238, 8, 79, 63,253, 57,214, 86,215, 88, 89, 94, 62,128,240, 40, 4,125,216, 13, 83,116,118, 69,225, 90,228,
+ 4, 5,152,224,123,207,214,214, 6,221,172, 99, 97,188, 40,181, 25, 34,169,235, 73,104, 26,103, 10, 70, 86,188,217,239,190,253,
+ 30, 49, 36,134,174,199,143, 60,147, 89,199,238,100,198,230,246, 54,237,104, 12,217, 49, 12, 3, 25,120,235,252,123,188,123,241,
+ 26, 91,187, 3,159,250,204, 54,135,214,215,137, 33,114,117, 99, 71, 66, 21,213, 32, 61, 85,165,193,106, 81,171, 26, 71,229, 74,
+138, 86, 9, 17, 74,219, 49,182, 25,177, 98, 21, 53,153, 48, 68, 82,233,221,103,157,113,109, 45,166, 55, 27, 49,100, 98, 82,244,
+ 29,162, 86,213,154,168,123,252, 44, 10,220, 1, 77,109, 42,162,210, 5,120,147,208, 41, 97,131, 43, 56, 94,133,170, 4,192, 97,
+146,161, 50, 25, 83, 89,130,213,204,102, 30, 87,218, 21, 58, 12,116, 94,240,176,212,154, 42, 59, 26, 91, 81,181,142,177, 89, 99,
+221,101,154,228,240,211, 61,246,167,251,236,238,236,177,223, 79, 24,178, 69,107, 67,200, 30,232,208,104, 70,163,150,217,172, 39,
+ 55, 74,234, 39, 42, 75,101,164, 42,186, 68, 4, 78,100,170, 10,167, 2,185,105,165,210,132, 17,104,137,174,136, 81, 56,249,125,
+ 31,217,153,238,179,171, 38, 2, 22,113,181,132,186,170, 76, 83,143,104,149,194,182, 14, 87, 87, 88,103,169,180,165,106, 29,125,
+212,168, 70,201, 33,200, 39,218,145,112,231,125,236,104,155,138,144, 35, 91, 67,150,238, 49,178,103, 60,180,186, 74,211, 86,228,
+ 48, 99,232,122,134, 33,177,186,180,140, 83,129,157,157, 93,110,236,122, 14, 31,185,139, 35,135, 50,215,110,110,243,254,230, 38,
+169,244,221,187,201, 54, 31,108,237,240, 15,207,189,192,199,191,252,219,152,234, 40,235, 15,156,227,226, 15,191,207,183,255,234,
+ 63,241,242,155,215,185,178,217, 99,154,117, 76,165,209, 81,225,108, 18, 93,109,138,172,214,154, 91,131,104,124, 99,204,180,149,
+101,127,214,209,119,129,198, 6,150, 22, 23,216,157,238,113,233,250, 45, 66,223, 99,109,164,109,107,210, 48,208,199, 76, 99, 12,
+174, 86, 52,203,171, 76,247,122, 54, 54, 59,180,174,209, 90, 49,182, 13,202,123,246,211,192,197, 11, 31,176, 55,217, 99,182,179,
+197,116, 71, 51,139,150,223,248,226, 23,104,234,158, 11,175,252,144, 99, 39,239,103,117,113,196,222,116,134, 6,130,182, 56,133,
+212, 74,157, 58, 24,127, 90,237, 80,102, 96, 8,129,193, 71, 28,125,121,249, 27, 98,242,248, 88,204, 93, 73,128, 49, 81,149, 67,
+171,145, 23, 57,201, 16,226, 64, 70, 51,155,205,184,250,254,101,250, 97,114, 32, 41,145,246, 76,162,174, 44, 75,163, 5,124,134,
+161,239, 5,242,161, 53, 42, 40,185,173,147,136,195, 84, 24, 13, 40, 92, 37, 19,204, 52,155,202,131, 56,231,131,110,245,124,149,
+ 23, 98, 62, 96,151, 26, 99, 72, 40, 58, 31, 32, 12,140, 70, 53, 71, 15,143,120,100,109,141,231, 94,126,155,201,172, 3, 37,120,
+225,201,100,198,159,253,245, 75, 92,188,120,131,103,190,240, 9,126,227, 75, 95,226,254,211,247,242,175,255,239,255,200,173,219,
+ 29,141, 51, 12, 49,146,148,198,149,108, 84,200, 82,115, 74, 94, 26, 64, 81,122,189,100, 12, 78, 89, 57,156, 40, 67, 76,210,137,
+214,201,178,118,232, 16,159,127,230,243,188,248,194, 11,188,248,226, 11,124,229, 87,126,149, 51,247,124,136, 31,191,244, 99, 46,
+ 92,120,135,175,126,245,215,248,224,253,247,233,186, 25,255,253,255,240, 47,121,254,185,231,249,217,171, 63,227,212,241,147,252,
+246,127,251,207,249, 55,255,230, 95,115,226,212, 73, 62,249,169, 79,243,195,151,126,200,243,223,251, 30, 95,252,242,151,249,210,
+151,190,200, 95,254,167,191,228,107, 95,255, 58,219, 59,183,121,225,185,239,115,238, 19,143,241,200, 35,143,240,135,127,240,135,
+244, 93,199,239,252,238,239,242,194,247,159,231,103,175,191,206, 39, 30,123,140,103,191,246,117,254,253, 31,253,145, 92, 86, 11,
+154, 54,164,192, 61,247,222, 67,223,205,248,193, 11, 47,240,224, 35,143,240,236,111,254, 38,127,242, 39,127, 84,194,128,242, 26,
+249,210,175,252, 42, 74,193,139,223,255, 62,199,142,159,224, 95,253, 47,191,203,191,253,183,255, 39,203,107,107, 60,243,204, 23,
+248,241,143, 95,230, 7, 47,190,192,131, 15, 62,196,111, 60,251, 44,191,255,251,191,207,253, 31,186,135,175,252,242, 87,249,187,
+191,249, 27,218,113,195, 47, 60,253, 5,174, 95,187, 70,214,150, 39, 30,255, 52,103,207,158,229,123,223,127, 1,149,224, 55,159,
+253, 77,254,244,255,253,127, 80, 74,243,181,175,127,141,111,253,195,183,184,185,113,147,205,157,109, 89,231, 58,139, 15,153,207,
+ 62,241, 4, 15,159,125,144,239,191,248, 2,117, 93,243,236,111, 60,203, 55,190,241,103,164, 12,191,249,181,175,243,205,239,124,
+139,217, 7, 51, 38,211, 9,255,234,119,126,135, 31,188,248, 3, 54, 55,183,120,242,201,207,113,252,196, 9,158,127,225, 69,121,
+ 45,134,242, 89, 18,181,155,196,244, 50, 18,146,116,160,188, 44,128,180, 42,157,247,161, 96,102,133,240, 86, 75,160, 34,249,162,
+244,147,126,122, 44,123, 0, 40,168, 88,163, 15,160, 14, 2, 1, 40,138, 82, 93,106, 50, 89,198, 52, 73,203,184,224,200,225, 35,
+156,123,244,220, 29, 78, 65, 89,202,231,210,215,156,159,108, 81,200,237, 0,136, 74, 49, 26,183, 34, 82,152,236,241,230,249, 55,
+ 75, 64, 73, 9,123, 56, 6,178,181, 7, 96, 96, 85,122,184, 41, 6, 97,214,151, 63, 77,105,141,115, 21,149,173,176,206, 29,168,
+ 52, 85, 10,100, 6,121,233,105,205, 51, 95,122,134,207, 63,245, 11, 84, 85,197,165,139,151,216,218,186,205,233,211,167,208,218,
+149, 94,101, 42,105,119,233, 32,230, 50, 14,148,127, 6,139, 15, 6, 87,143, 75,221, 68, 94,176,182,174,168,219, 86,118, 89,138,
+131, 42, 3, 74,106, 77,115, 20,107,209,178,136,190, 52,201, 13, 68, 68, 1, 98,234, 73, 62,224,251,158,190,159, 72,195, 32, 4,
+250, 97, 96,111,103,155,172,164,183, 98,172, 17,217,142,173,217,179, 34,221,153, 51,128,229, 33, 35, 45, 1, 91,239,163,180,161,
+177, 22,159, 2, 42,205, 57, 0,208, 52, 51,185, 81, 86, 6, 21, 13,117,169,242, 77,251, 40, 56, 69,157,240, 67, 64, 41, 75, 85,
+ 27, 22, 26, 69, 50,137, 24,132,107,157, 76, 64, 59,135, 69,112,181,189,151, 17, 93,180,208,186, 26, 93, 87, 76,189,167,113,178,
+106,209,217,200,195,167, 86, 84, 24,233,221,151,163,158, 82,145, 16,133,247,239,156,130,122,204,120,212,176,122,248, 24,181, 26,
+216,219,159, 48, 75,137,105,223,139, 33,175, 31,216,153, 14,212, 86, 51, 4,161, 61, 25, 35, 39, 90, 93,183, 50, 22, 47, 93, 80,
+ 31,130,220, 86,138, 65, 42,230, 32,184,199, 44, 35,184,136,193, 56, 49,152,169,156,208, 22,148, 46, 13,134, 33,179,191, 63, 48,
+ 53, 14,179, 39,176,162, 62,120,180,179, 52,166, 66, 27, 73, 64,187, 90,126, 38, 86, 27, 70,163, 49, 33,201, 46,119,186, 55,225,
+246,222, 77,102,222, 75,141,203, 56,112, 6, 31, 20,166, 24,129,117,134,253,233, 4, 63, 12,204,186,204,214,214,148,189,157,203,
+172, 44,142,248,248, 67, 39,152,254,108,155,119,223,219,226,232,177, 35,244, 65, 32, 44,231,127,250, 10, 63,252,251, 63,230, 51,
+ 95,253,223,192,173,241,227,239,191,196,115, 63, 56, 79,175, 42,252,224,217,155, 94,167,235, 67,105, 96,136,229,238,214,230, 62,
+231, 30,248, 16,211,219,123,236,238,205, 24,114,148, 61,222,176, 79, 99,165,101, 32,135,102,205,133,183,223,230,240,250, 10, 74,
+107,169,111, 26, 73,163, 55,203,203,220,117,239, 71,120,247,226, 21,250,201, 69, 54,110,190,143,143,153,181,229, 5,188,247,180,
+173,168, 95, 39,211,125,182,183,110, 49,155,116, 56, 11, 27, 23,206,115,254,220,199,121,242,137, 39,184,253,250,139,156, 30,117,
+220,115,230, 56,223,125,241, 21, 92, 37, 14,121,149, 21,202, 7, 49,175,233, 92,238, 17,129, 58,151,230, 66,206,168, 90,190,235,
+ 54,102,114,182,100, 21, 15,112,190, 89,105, 8,162,255, 53, 5, 8,163, 82,194,228,132,198,177, 51,155, 66,234, 75,130,184, 16,
+251, 82,192, 89, 35,141, 12, 91,161,163,103, 24, 96, 54, 29,176,149,129, 4,253,224, 89,104,107,214, 86, 86,216,220,155,208,245,
+ 51,178,113,132,148, 57,180, 60, 38, 87, 99,118,111,111, 82,215, 53,211, 94,120, 6,115, 34,103, 78,137, 20, 2,222, 42,188,239,
+197, 58,151, 51,125, 52, 92,221,152,114,252,216, 81, 78,158, 58,204, 91,239,188, 47, 45,135, 98,105, 91,168, 35, 75, 85,228,198,
+ 91,175,243,205, 56,227,217,175,125,157, 84, 25,254,247,255,235, 27,236,237,246, 24,167,255,127,166,222, 52,216,178,235, 60,207,
+123,190,181,214,222,251,156,123,251, 78,221,104, 52, 26, 35, 1,130, 19, 32,138, 4, 64, 82, 17, 73, 81,164, 56, 72, 10, 45, 74,
+178,108,201, 42,197,150,172,216, 41, 37,229,196,170, 56,131, 83,138,203,145, 83,149,164,146, 42, 87,156, 74, 92, 21,199, 81, 36,
+ 69,214, 96, 81, 49, 53,154,179,197, 73,148, 8,128, 32, 49, 17, 32,129,198,220,243,157,239, 57,103,239,189,134, 47, 63,190,117,
+ 78,235, 23,170, 64,176,251,222,115,246, 94,235, 27,222,247,121, 17, 95, 35,179,213,138,100, 23,172,115, 39,218,196, 67,189,237,
+253, 77, 9,111, 76, 14, 19,155,155, 2,187,148, 76, 63, 95,240,229, 47,127, 25,213,194,195, 15,127,141,181,233, 26, 95,123,248,
+ 17, 68, 51, 15, 62,248, 16,155,219,155,156,188,118,204,239,255,155, 79,240,248,227, 79,160, 10,123,215,246,248,224, 15,126,216,
+ 92, 55,120,158,123,238, 57,190,242,133, 47, 26,123,224,211,159,226,251,223,247,126,206,220,116,154,157,211, 59,252,250,175,255,
+ 26, 94,225,249, 11, 23,184,245,214, 91, 1,229,190,183,126, 23, 79, 60,241, 56, 95,249,234,151,209, 12, 23,158,253, 54,191,248,
+ 95,252, 3, 78,111,159,102,239,112,175,142, 60,236,242,216,219, 63,224, 19, 31,255, 56, 73,149,231, 46, 60,207,127,250,159,253,
+125,182, 79,109, 87, 85,190, 99,103,231, 52,183,221,118, 43,255,219, 63,251, 95, 17,224,194,243,223, 97,123,103,155,251,223,114,
+ 31,135,135,251, 44, 22, 11,190,244,249,207, 83, 92,224,197, 23, 95,228,151,254,209, 63,194,139,231,205,247,223,207, 23,190,240,
+121,190,245,237,167,201,201, 92, 76,247,221,119, 31, 57, 37, 30,120,251,131,252,230,191,250, 13, 91, 69,229,194,100, 58,225,190,
+251,223,202,211, 79, 63,205,165,139, 23,249,202,151,191,132, 11,246,174, 24,197, 48,131, 56, 30,122,224, 65,126,243, 55,254, 95,
+174, 31, 92,131,228,113,234,185,239,254,251,121,234,201, 39,185,120,241, 34, 95,254,210, 87, 64, 51, 15, 61,248, 16, 79, 61,245,
+ 20, 95,250,210, 23, 81,133,139, 23, 95,225,239,255,226, 47, 26,177,213,122,235,250,251,155,118,130, 98,218, 7,105, 28, 37, 89,
+ 74, 40, 75, 30,203, 0, 75, 29,127,208,146,137, 85,172, 96, 10, 64,111,212,164,186, 47,200,117,167, 98,192,132, 82,237, 8,144,
+147, 33,254,168,151, 75,142, 35,109,215, 48,157,182,104,236, 81,231,185,231,245,175,227,212,169,117,170,147,178,238,164,100, 57,
+164,170, 74, 69,152,205, 23, 92,189,114, 29, 9, 83, 26, 41,108,109,110, 25, 54, 85,108, 68,105,250,140,154, 38,180,196, 6, 46,
+113, 70,152, 49,223, 59, 87, 19,114,204,118, 97,200, 68,139, 99, 21,220,106, 77, 81,234, 63, 53,101,206,158,187,153,119,127,207,
+247,208,181, 45,179,197,156,223,253, 55,159,224,228,232,152, 55,223,247,102,227,149,139,224,212,155,104,170, 84, 27,153,234,106,
+119, 86,242,200, 24,231,228,146,150,142,254, 10,132, 48, 80,134,235, 28,139,113,164,143, 3,155, 34,180, 77,224,182,243, 55,241,
+210,203,175,145, 83,172,107, 12,106,218,143, 85,207,243,249,204,252,172, 34,108,110,109,129, 56, 54, 55,182,152,174, 77, 76,140,
+134,169, 39, 87, 54,153, 88, 72,149, 53, 47, 67, 38, 5,111,138, 88,245, 72,163, 52, 8,139,146,152, 42,148, 28,153,155, 80,147,
+105,219, 50,148, 25,130, 99, 54,247, 70,113, 59,194, 58,247, 96,227,200,226,177,253, 79, 35,196,197, 72,112, 29, 99, 76,204,230,
+115,124,177,189,183,184, 64, 74, 61, 90,253,251,173, 52, 72, 73, 56, 23,144, 86, 25,128, 60,159,145,163,128,180,204,226, 96, 23,
+169,120, 82, 73, 38,244,201, 19, 6,159, 8,190, 16,180, 48,142, 61,125,239, 24,214, 39,164,133,229, 97, 75,227, 40,210, 48, 61,
+181,197, 68, 11, 55,109,121,124,235, 88,159,116,204,102, 11,250,225,136,249,241,192,225,124,134, 43, 16,211,192, 60, 1, 57, 18,
+ 51, 76,186,134, 92, 2,174,245,196, 88,200,163,173,147, 20,191,114,120,204, 98,162, 41,158, 70, 45, 40, 34,229,108,142, 65,239,
+153, 52, 19, 74, 19,153,167, 17, 47, 30,146, 80,226, 72,236, 23,196,165,128,211, 53,168,135, 20, 19, 93,215,113,112, 50, 35, 13,
+ 54,150, 91,151,200,238,238, 62,154, 11, 15,222,127, 7,175, 94, 57, 38,247,115,174,238, 31, 27, 11, 62,180,196,148,107,208,136,
+114,122,171,227,149,203,215,185,231,246, 51,188,233,222, 29, 62,246,227, 31,225,179, 95,253, 22,170, 48,164,194, 56,159, 51,117,
+ 74,154,174,241,201,223,255, 12, 15,125,240,163,140,243, 93,254,221, 87,191,201, 81,182,124,237,181,233,212,132,110,249,132,212,
+219,251,148,178,146, 74, 79,241, 19,110, 58,119, 51,131, 94,195, 13,137,152,146,141,213, 91, 33, 70, 75, 71,115,206, 83,134,129,
+126, 88,208,122, 19,164, 22,133, 51,103, 78,179,118,250,118,158,122,242, 41, 78,246, 46, 49, 13,193, 4, 98, 46,115,254, 84,192,
+ 77, 3, 87, 14,102,108, 1,187, 71, 3,187,251,251,180, 14,134,177,112,106, 99,157,135,191,246, 23,236, 31,244,124,239, 59,223,
+206,133,151, 95,225,153, 87,175, 17, 53,227,138,171,197,135,163,196,190,226, 69, 45,221, 74,193,220, 15,134,225, 38,132,186,106,
+ 41, 53,187,161, 13,168, 54, 56,108,226, 50,233,108,244,141, 40,190, 8,185,115,132, 98,103,194,152,122,214,167,235,136, 12,244,
+101, 94,225, 41, 98,250, 15,129,249,176,176, 96,170,106,101,114, 4,155,254, 84,235, 83, 82,165,105, 45,238, 54,142,137,156, 70,
+ 38,235,183,112,253,100,160,228, 68,206,222,132,100,213, 62,183,236,224,231,195, 72, 72,201,220, 87,197, 98,136,219,201,132,253,
+147,145,175,126,243,121,138,192,198,116, 66, 28, 35,139,177, 71, 69, 57, 56, 25, 57, 92, 12,252,196,207,252, 36, 67,241, 92,184,
+248, 24, 15,222,247, 22,238,126,195,157, 60,242,200,179,172, 99, 83,136,172, 6,209, 81,148, 50, 70,115, 84,145,200, 56,124,242,
+ 72,181,247,225,151,140,112, 40, 53, 88, 69, 75, 97,111,127, 31, 77,181,227, 18,199, 98,222,155, 27, 64,165, 90,216,148,217, 98,
+206,230,246, 54,127,251,231,127,150,215,223,251, 6,246,247,247,172,137, 42, 22, 49,188,191,183, 91,201,115,181, 40, 20, 56,189,
+189,195,254,254,158,101, 67, 84,129,219,254,222, 30, 14, 88, 95,155,114,112,184, 79, 74,245, 59,246,142,189,189,125,118,118,118,
+184,190,127,221,166,195,106, 94,246,253,253,253, 21,245, 78, 11, 28, 30, 28,176,115,211,233, 37,124,129,173,157, 29, 78,159,222,
+225,191,251,229,127,178, 98, 50,168,194,231, 62,251,105, 14, 14,224,240,240,208,162,181,151, 89,242, 98,105,115,155,219, 91, 60,
+249,228, 83,245,215, 22, 14,246,247, 87,179,228,173,157,109,254,227,191,247,247,234,221, 97, 75,141, 11, 23, 94,192, 57,232, 23,
+ 11,187, 80,107, 49, 46, 42,104,177,198,109,123,123,139,171,215,119,107,220,108,230, 96,239, 42,247,221,255, 38, 0, 22,139,222,
+138, 45, 17,214, 38,211,250, 25, 26,205,117,255,240,160, 78,175,171, 78,173,162,129, 69, 13, 64,102,214,110,203,102,151, 98, 1,
+106, 2,164,100, 33, 42, 78,140,114, 25,172,147, 44, 43, 31,171,171,108, 97,169,220, 93,241, 21, 69,103,131,222,213,101,146, 43,
+143,215, 55, 75, 59, 2, 76, 39, 29,231,207,223,194,115,207, 93, 96, 18, 26,238,184,227,246, 21, 74, 80,111, 0,112,107, 55, 74,
+181, 58, 8,223,248,230,227,188,248,226, 75,148,146, 89, 95,159,112,231, 29,119,114,237,218, 46,135,123,135,136,179, 81,178, 69,
+102,130,175, 23,116,169, 18,124,131, 12,228, 26,129,169, 21,223,103,128, 6,205,149,100, 84, 31, 74, 86,138, 79, 99,133,119, 93,
+ 71,215, 78, 64,132, 54,180,188,239,189,239,166, 13, 45,147,182, 93,233, 6,134,126,176, 23, 69, 35, 69,219,106, 97, 88,254,205,
+102,115,147, 26,197,104,151,122, 38,143, 35,195,176, 64, 70,184, 30,175,113,225,194, 11,220,124,246,102,124,211,242,253, 31,248,
+ 1,190,243,204,179, 76, 38,147,213,207, 21,176,252,230,158,196, 43,175,188,200, 3,111,127, 27,226, 28,111,126,203, 27, 57, 62,
+ 57,226,117,119,221,197,218,100, 13, 69,185,124,245,178, 21, 59,197,142,152, 88,168, 98, 24, 75,145,138,201,128, 5,129, 12, 17,
+162, 51, 5,232,108, 54, 95,229,175,151,152, 25, 92,193, 23,227, 36,107, 84,198,216,161, 69,240, 94, 73, 62,144, 37,210, 56,243,
+206,151, 28, 40,234,232, 99,161,173, 93,116,193, 49,230,140, 11, 5, 70,165, 72,198, 47, 50,210, 22,146,102, 74,233,105,131,103,
+108,243, 82,158, 65, 91,249,210,234, 50,195,112, 66,142, 48,115, 74, 84, 11, 43,112,226, 9, 26,235,200,201,163,243, 57,206, 6,
+246,140,110, 32, 52,150, 52,229, 27,207,164,181,140,224,125,233,193,123, 54,167,167, 57,211, 5, 54,157,137,172, 38,206, 83,162,
+144,211, 17, 39, 7, 11, 22,140,164,146,153,207, 51,139, 18,201, 19,195,230,246, 99, 98, 99, 99,194,108, 62, 50,241,158, 73, 59,
+197,209, 26,224, 65, 50, 50, 22,102,125, 66,241,228, 86,153,166,204,252,164, 71,139, 37,219,133,154,157,172, 21,228,161, 41,209,
+122,155, 28, 9, 9,135,103,236, 7,240, 3, 39,139, 57, 41, 38,246,199,142,211, 59,107,136, 43, 92,187,118,149,211,103,111,101,
+107,218,112,114,120,196,124, 62,103,214, 71, 78, 78, 50,109, 3, 15,221,127, 23,239,126,255, 59,120,248,241, 87,120,229,165, 75,
+184,233, 58,123,187, 39, 56,137, 52,211,134, 44, 29, 79, 63,251, 18,159,250,248, 39,184,245,220, 6,143, 63,241, 60, 81, 27, 38,
+147, 53,206,108,111,242,234,222, 49,195, 56,212,247,207,222,135, 84,224,248,164, 39,208, 49, 38,165,237,188,225,131, 21,242, 34,
+147, 20,114, 92,224,167, 22,116,113,120,176,224,244, 78, 67,210, 58, 13, 11,235,188,250,226,139,204,246, 46,130,115, 36,129,233,
+ 90,199,209, 73,102,109, 13,142,162, 50, 31, 10,221, 52, 67, 25, 89,204, 23, 72,215,226, 61, 52,190, 97, 56, 60,224,243,159,250,
+255,120,230, 91,223,225,254,183,190,158, 23, 47,188, 12,177,208, 87, 2, 94, 46,166,209,241, 24,244,163, 4, 83,254, 22,212,254,
+ 71, 47,148,161, 22,210,106, 69,191,177,206, 21, 95, 49,163,131,179,134, 32, 52, 38, 80,115,206,194, 55,146, 22, 82, 30, 43, 55,
+189, 30,160, 73,153, 76, 26, 16,161,239, 45, 0,102, 32,174, 32, 31,139,190,199,187,128,115, 98,184,220,190, 71, 40,116,109,203,
+ 48, 30, 83, 74,102,247,112,198,108, 62,163, 81, 88,159,182,184,209, 19,135,113, 21,214, 33,197,206, 35,138, 1,170,186,224,217,
+218,220,164,109,215,137,195,156,221,253, 35,110, 94,119,156,187,249, 44,179, 94,185,126,120,192,222,193, 9, 57, 23, 30,125,242,
+ 53,126,255,143, 31,229,223,255,177, 31, 70,153,115,117,247, 34, 49,205, 9,222, 38, 47,146, 18, 46, 88,116,182,171, 23,139, 5,
+ 53, 25,231,222, 68, 79,118, 49,132,154, 94,169,146,241,206,254, 93, 74,169,230,126,231,218, 56,104,197,122, 85,184, 87,221,237,
+190,227,157,239,228,187,222,122, 63,159,255,204,167,248,215,191,245, 27,168,115,252,210,127,251,203,134, 71,174,177,159,133, 92,
+119,189,118,214, 31, 47,230, 76, 39, 19, 91, 13, 8, 56, 28,211,233,212, 68,119,138,189,111, 90,106,246,136, 99,251,244, 14,243,
+197,188,226,111,117,101,111,155, 78, 38,166,183, 47, 86,168,117,147, 9,243,217,192,210,248,213, 47,230, 92,186,120,153,127,249,
+ 47,254, 79, 82,205, 47, 57,125,102,155,253,107,251,220,115,239,189, 43,226,227,106,146, 93,193,236,253,188,103, 50,157, 88,241,
+142,208, 77, 38, 54,133,117,142,190,239,249, 63,254,249,255,206,241,225,140,148, 34, 27, 27,107, 32,194,173,231,206,215, 65,113,
+ 77,253, 19,123,182, 52, 89, 2, 95,191,232,153,118, 83,250,197, 12, 16,182,207,156,102,177, 88,212,233,180, 82, 72,160, 30, 42,
+116,202,176,229,133,105,219,173,156, 19, 22, 9,172,213, 15,159,168, 29,150,233,209, 42,180, 38,167, 82, 17,179, 86,144,160,222,
+242,212,181,233,108,236,141,237,167, 92,229,185,107,181, 14, 52,206, 60,144,212, 47, 92,212, 30, 18,215, 52, 85,198,111,200, 82,
+245,133,163,227, 99,222,254,214,239,230,235,143, 61, 70,142,118, 0,172, 88, 0,220,216,169,203, 13,108, 48, 79, 63,253, 45, 62,
+247,217,207, 49,244, 11, 0,238,184,253, 94,206,159, 63,207, 99,143,125,157,197,124,142,107,172, 10, 85, 17,154,106,147, 16, 47,
+108,158, 58,133,170,208, 52, 45, 93,215, 85,181,169, 65, 93, 16, 88, 91, 91,195,183, 70,247, 89, 91,219, 88, 77, 5,214,166,107,
+ 86,153, 3, 87,175, 92,231,169,167,159,228,161, 7, 31,164,105, 26,190,231, 93,239,188,177, 18, 80,229,217,103,159,229,210,229,
+215, 86, 84, 50,239, 29,211,233,250,114, 80, 76, 55,105, 45, 90, 80,149, 73,215,161, 57,211, 52, 85,193,153,199,138,169, 21,190,
+248,133, 63,229,236,153, 29,238,126,253,189,188,238,206,215,113,247,157,119, 91, 88, 69,125,120, 36,212, 62, 63, 41,223,124,226,
+113,238,186,235, 78, 30,120,224, 65,110,190,233, 44, 31,253,161, 31,102, 89,190,236, 94,191,206,231, 63,247,185, 21, 87, 36, 85,
+ 42,185, 0, 0, 32, 0, 73, 68, 65, 84, 56,103, 83,155,106, 42, 20,103, 7, 92,168,214,165,168,201,226,249, 90, 33,212,128,139,
+ 88,140, 3, 45,163, 67,163,101,121,139,183, 23, 74,147, 85,242,226, 3,195, 88,234, 32,103, 32,201,136, 74,139,138,141, 18,135,
+ 21,176, 71,241, 94,104,106,151,147,139,199,251,150,121, 30,235,132, 67, 72, 73,209,184,168,160, 14,101,196, 81,198,108, 9,109,
+ 94, 44,236, 64,139, 65, 97,178,128, 75,228,138,226,197,103,130,122,188,100,178, 75, 44,134, 64, 19,172,115, 26,143, 35, 39, 50,
+ 82, 68,105, 53,160, 90,216,239,214, 16,175,120, 39,132,110,194, 70, 59,165, 11, 5,165, 69,167, 19, 38,226, 16,159,105,221, 17,
+ 93, 59, 50, 12, 35, 39, 39, 71,228, 49,115,180,159, 25,213,114,214,231,169,224, 92, 98,218, 56,114,104,105,214, 2,161,174,160,
+ 38, 77,131,134,134, 70, 96, 24,212,226, 42,199,194, 24, 19,217, 69, 74, 30,193,121,166, 77,135,150,196, 16, 35, 41, 13, 12,195,
+192, 66,199,154,101, 32,188,242,194, 43,188,238, 14,227,124,199,210,112,215, 29,111,198,135,194,198,153,145,245,105,224,242,197,
+139, 60,255,157,111,115,102,251, 38,110, 62,115,134,173, 83,103,249,157, 47,253, 62,187,179,158,105, 76,140, 53, 40, 99, 62, 52,
+204, 19,180,120,126,243, 87, 63,206,250,198,148, 69, 9, 70,191, 42, 1, 92,199,108,118,141,188,228,160,171, 88, 20,111,202, 92,
+ 59, 60,100,226, 61,179,197, 72,108, 45,155,154, 98,226, 46, 98, 33, 2,218,143, 43,109,202,201,236,152,174,221,198,187, 9, 47,
+ 95,120, 30,193,236, 61,113, 76, 40,176, 62,157,208,239,101,190,125,113,143,243,119,220,201,214, 90, 7,149,142,184,179, 53,178,
+119,176,199,100, 98,239,230,113, 63,208,118, 83, 94,120,254, 49, 46,188,248,109,114, 28, 56,123,102,199,108, 99,165,208,143, 38,
+ 46, 84,204, 27, 61,206, 45,129,141, 38, 17, 8, 53, 2, 20,150, 91, 56,139, 44,182,255, 36, 75,134,177,142,149,115,180, 60,245,
+ 96, 93,187,247, 66, 63, 36,134,249,136,147, 42,110,115,182,110, 92, 91, 55,113, 95,138, 70, 63, 27, 83, 68,181, 88, 98, 89,201,
+ 21,170, 20, 88, 12, 25,215,220, 80,182,123, 31, 32, 23,242,120,130,230,209, 64, 82,237, 4,113,202,113, 76,117,167, 93,105,101,
+ 40, 57, 91,172,231,100, 58, 33, 23, 56, 62, 57, 50,148,111,211, 82,180, 16,211, 2,245, 27,108,108,156,161, 31, 18,251,251,187,
+ 36,214,249,213,223,251, 42, 95,254,250,243,252,212, 15,189,139,205,187,119,120,249,210, 30, 67, 31,201,109, 85,143, 71, 91,131,
+150,162, 4, 41,181, 40,213,154,122,153,172,171,202,133, 88, 59, 88,106,178,161,174, 56,238, 90,227,170,235,116, 83,171, 54,168,
+ 78, 88,181, 40,211,201,132,189,235,187, 92,248,206,183,217,186,233, 12, 31,248,192,135, 77, 60, 90, 69,109,203,115,211,126, 95,
+179,220, 93,185,244, 26,221,100,194, 3, 15,189,131, 71, 31,249, 58, 15,189,243, 33,206,223,118, 43,197, 9, 79, 60,241, 36,191,
+240, 11,191,192,139, 47, 94,224,194,243,207,241,125,223,247, 94, 4,184,120,241,181,202,135,175,154,111, 39,156,191,245, 86, 30,
+120,240,237,124,253,145, 71,120,239,247,189, 15, 69,120,229,213, 87,120,221,221,119,225,189,227,242,165,139,116,147,142,239,125,
+207,187,249,202, 87,190,204,206,233,109,254,131,191,245,115,252,241, 31,252,145, 85, 15,214,146,214,181,228, 82, 68, 47, 60,251,
+236, 51,188,231, 61,239,230,202,213, 43,140,139, 5,223,251,158,247, 48,246, 61, 72,225, 91, 79, 63,205, 7,222,255, 3,124,234,
+147,159,165,107, 3, 31,253,232,143,112,233,242, 21, 46,189,246,234,138,135,103,184,219, 92, 31, 67,155, 34, 60,245,244,183,248,
+240, 71, 62,196,103, 63,247,105, 38,109,199,131, 15, 62,196,163,143, 61, 86,237,226, 54, 89, 86,129, 39,191,245, 52,255,209,223,
+253,187, 60,241,244, 19, 92,190,116,145, 15,125,248, 35,149,250,103, 22, 65,155,244, 84, 18, 31, 25, 79,176,117,158, 22, 52,171,
+133, 18, 81, 44,166, 68,160,120,143, 58, 71,112, 98,203,117,173, 99, 89,205,213,129, 88, 76, 93, 89,106,120,189,136,199,137,137,
+ 48,124,107,248, 68,239, 44,252,192,212,239,153,111,124,227, 27,124,224,251,223,207,125,111,186,159,111, 60,254, 56, 15,127,237,
+ 81,110,185,229, 28,183,156, 59, 87, 31, 36, 89,141,169,143,103, 39,124,227,177,111,242,133, 47,126,145,189,131, 3,156,111,105,
+ 59,207, 15,252,192,251, 57, 56, 56,228,137,167,158, 33,180,193, 44, 85,110, 82,247,101,105,165, 98,125,230,153,111,115,243,222,
+ 1,185,100,174, 95,223,197,169,178,183,187,203, 83, 79, 61, 73,211,182, 92,187,118,165, 30, 56,153,239, 60,255, 29, 82, 21, 66,
+ 93,189,118, 13, 23, 2,154, 97, 76,202, 31,253,201, 39,217,219, 61,228,182,219,110, 99,109,173, 35,101,136,105,228,213, 87, 94,
+227,171,127,254, 53,250,209,114,152, 29, 66,142,133, 11, 23, 46,216, 40, 62, 39,174, 92,190, 82, 71, 85, 51,158,122,250, 41,182,
+183,182, 56,153,157,208,207,143,241,212,128,144, 2, 87, 46, 95,226,183,127,231,183,248,238,239,122, 27, 55,157, 61,203,198,230,
+ 38,247,190,225,141,180, 77,107,150,156,168,228,226,209,146, 57, 56,232,249,195, 63,249, 12,151,175,238,113,247, 93,119, 50,153,
+ 76, 40,165,112,125,247, 58,143, 61,242, 40, 47,190,252,146, 81,209, 74, 21,132, 21,115, 44,148, 8,193,219, 88, 27,103, 73, 71,
+185,250, 37,221, 50, 42, 80,149,210, 71,227, 16,120, 43,149,131,111, 72, 49, 35,100,130, 55,240, 80, 78, 74, 23, 26, 74, 13, 30,
+ 42,244,132, 98, 92,230,162, 16, 75,169, 80, 9,207, 80,172, 43, 16, 45,228,208,153, 6, 65,116, 85, 92, 45, 55, 52,190,142, 8,
+157,122,164, 21, 36,218,248,107, 25,115,153,180, 16,196, 17, 38, 30, 25, 12, 23, 58, 82, 17,142,201, 82,210, 92, 12,102, 51,169,
+233, 76,173,179,191, 35,247,137,156,102,102,137, 41, 45,101,152,115,181,233, 9,174, 69,226,136,107, 10,158,214,146,244,138,167,
+235,214,153,156,218,226,230,155,206,226, 53,115,180,152,147,115,100,118, 50,103,136, 35,125,138, 68,109, 9,100, 74,130,182,107,
+ 77,135,160,224, 75, 96,107, 99,147,241,148,209, 23,211, 80, 42, 75,220, 56,239,243, 56,210,199, 76, 28, 70, 75,126, 18,251, 94,
+ 36,183, 76,214, 3, 18, 61, 46, 24,107,122, 57, 93, 58,238,231, 28, 31,238, 18, 83, 97, 58, 93,227,228,224,152,118,218,177,177,
+ 57,225,212, 70, 96,125,210,114,253,210,101,206,157, 59,203,155,239, 62,207,241,188,231,100, 62,227,240,224,152,235,215,119, 89,
+235, 90, 14,143, 14,233, 95,182,113,171, 77,162, 58,134,177, 48,237, 90, 14, 79,230,150, 48, 86,108,127,170,197, 52, 44,210,182,
+148,162, 44, 22, 3,211, 54, 48,196, 76,209, 96,135,186, 56,211, 61,120,181,231, 52,142,104,152,112,125,247,128,137, 47, 36,245,
+104, 74,148, 26,128, 19, 99,164,168,242,226,165, 99,166, 27,137,227,147, 5,107,109, 98,136,133,141,245,117,218, 70, 56,153, 29,
+ 18,112,196,156,137,125,100,218,174, 49, 12, 61,107,235, 27,156,218, 58,101, 48, 14, 50,139,126, 36,231,194,164,245,164,100,150,
+181,156, 11, 82, 18,153, 76,204,142, 76, 54, 11, 39,150,127,157, 8,171,117,157,171,132,178,226, 76,232, 89,212, 16,180,154, 61,
+227,162, 39,167, 8,193,145,114,166, 20,165,105,150,184,102,161,235,166,136,239,208,161, 39,165,145,156,122, 20,216,108, 3,125,
+ 52, 11,154,171, 88,106, 87,247, 2,147,174, 1,223,208, 71,203, 25, 80, 85,124,227,140,171, 81,173,102, 94,164, 6, 98,153,160,
+200,148,205,217,236,151, 69,241, 56, 94, 61,158,115, 60, 36,182,182, 44, 4,234,129, 55,222,198,241,201, 6, 47, 94,222, 39,162,
+ 60,252,228, 75,244, 39, 7,188,237,161, 55, 51, 63,152,161,197,208,207,134, 46, 5,145,130,198, 66, 12, 38, 14,109,156, 53, 64,
+185, 88,200, 80,112,158,236,148,148, 13, 78,163, 75,108,108, 69,145,230,234,199, 86,189,145,145, 94,170,250, 58,229,204,159,127,
+229,207,249,153,191,245, 55,249,229,255,225,127, 98, 24, 6,190,241,200,215, 89, 44, 22,108,109,239,172,210,199, 88,170,178,197,
+172, 86,168,240,187,191,253,219,124,244, 99, 63,202,143,124,236, 99, 60,247,220,115, 92,124,237, 34,154, 11,123,187,123,252,225,
+ 39, 62,193, 71,255,202,143,176,115,122,135, 23,158,191,192,239,253,238,239, 34, 78,120,221, 61,247,240,125,239,125, 31,191,246,
+107,191,142, 20,229,226,107,175,113,223, 91,238,231, 99, 63,242, 49,158,127,225, 2,127,252,135,127, 88, 87, 27,134,136, 45, 42,
+124,252,119,127,135, 15,126,232,195,124,240, 67, 31,166,239,123,190,242,103,127,198,133, 11,207,113,207,189,111,184, 17,207,172,
+206, 82,212,234, 52,250, 91,207, 62,205,246,214, 38, 63,255,243, 63, 15, 10,207, 60,253, 12,219,167,183, 17, 45,124,254,243,159,
+225, 3, 31,252, 16,255,240,191,249, 47, 65,225,177, 71, 31,225,209,135, 31,230,214, 91,207, 87, 53, 84,237, 82, 11,252,227, 95,
+254,199,252,147, 95,254,239, 81, 41,124,246, 51,159,225, 35, 31,250, 32,255,245,127,245, 15, 89, 44,122,190,242,229, 47,241,200,
+195, 95,227,158,215,223, 3, 42,213,227, 14,251,215,175,243,153, 79,127,154,159,250,235, 63,197,233,157, 29,190,244,165, 47,175,
+216, 48, 69,132,162,182, 26,172,128,118,242,114,191,238,107, 84,150, 24, 97, 14, 95,179, 13,234, 32, 75,238,184,235, 77,234,234,
+222,199,215,228, 44,139,223,171,163,248,186, 75, 50,142,185, 3, 47,182, 47,173,121,212,154, 13,220,129,100, 78,159,222,228, 63,
+252,217,159,197,225,248,149, 95,249, 21,174, 92,189,198,109,183,221,198, 91,222,252, 38,206,157,191,149,233,116,194,108,126,194,
+149,203, 87,120,254,197,151,120,229,197, 87, 25,135,222, 88,203, 18,248,193,143,124,128,143,254,240, 15,241,111, 63,249,105, 62,
+251,217, 63,181, 42, 68, 11,162, 1,117, 38,166,210,154,175,179,182,190, 78, 8,230, 43,141, 99,102,140, 54,238,157, 78,215, 16,
+111, 97, 16,179,249, 12,205,194,100,109, 74, 55,233,172,211,236, 7,134,161,167, 20,135,247, 53, 92, 65, 60,167, 78,173,153, 74,
+ 57, 42,195, 56, 48,159,207,205,115,219,184, 21,201,168,196, 68, 55,153,208, 77, 38, 80, 10,139,177,103,236, 35,136,209,182, 90,
+223, 80, 92, 97,113, 60,179,232, 69,111, 95,253,250,250, 6,222, 11,195,252, 4,212,241,206,119,189,131, 31,251,171,127, 13, 39,
+176,191,187,203,255,253, 47,255, 47,174, 92,189, 94, 87, 27,134,155, 36, 11,235,155,155, 52,221, 4,124, 97,152,207, 73,139,158,
+236,148, 46,152, 47,149,224,106,193,149,209,100, 2, 39,156,141,177,141,113,109, 99,114, 85, 59, 36,100,153,113, 28, 26, 19, 15,
+ 57,235,180,137,133,210, 86, 55,100, 78,181,219,240,228,108,194, 72,245, 74, 43, 70,154, 42,165,224, 52, 24,178, 87, 50, 37,103,
+180, 9,184, 2, 37, 26,186,214, 7, 99,169, 91, 30, 57, 52,117,204,153,171,247,212,139,183, 40, 92, 2,173,168,237,253,154,218,
+ 17,213,135, 58,169,249, 91, 67, 48,226,155, 20, 79,240, 38,116, 28,139,210, 76, 27, 90,113,198,110,207, 9,159,132,166,235,200,
+ 53,103, 58,170,101,174,163, 25,113,208,117, 30, 15,196,228,209, 50,210,132,150,102, 18, 40, 98,120,201,141,105, 75, 25,141,253,
+157,198, 19,134,148, 72,227, 64, 63,140, 20, 21,198, 20, 13, 37, 28, 90,139, 23, 22,193,105, 70,125,160,113,130, 11, 45,211,181,
+150,161, 95, 48,159, 69, 82,137, 38,136, 90,140, 36,171, 81, 88,140,115, 58,239, 57, 58,182, 61,250,124,182,160,184, 9,107, 27,
+155,204,246, 15, 8, 77, 99,135,113,200,232,216,115,255, 27,111,229,239,252,141,247,115,239, 91,222,204, 47,252, 39,255, 35,169,
+221,230,174,215,223,197, 56, 87,156, 36, 36, 14,124,235,194,119, 56, 53,233, 76,193, 61, 20,102,139, 61,230, 67, 98, 99,243, 12,
+ 27, 93, 71,123,250, 22,158,124,252, 97,130, 15, 12,195,104,144, 17,133,123,238,186,141,105,215,112,233,234, 62, 57,143, 76,186,
+182, 66,153,172,227,240,206,145,179, 16, 2,132,208,177,232,123, 99,147,231,194,230,169, 73, 21,158, 10,169, 24,110, 56,248,192,
+149,253, 19, 54,218,192,250,214,105,246, 15,118, 57,187,181,206,180,107,112, 93,131,111,214,152,182,129,131,189, 3,174,236,159,
+160, 49,210,181, 13,206, 57, 22,197, 51, 89, 95,195, 59,161,107,221,138, 59,239, 48,125, 1,174, 70, 1,151, 66,227, 44,145,107,
+ 40,209,232,103, 49, 83, 52,130, 19,250,185,197,234,150, 58,186, 45,128,100,103,143, 65,221,167, 31, 45,122,142,247,236, 93, 27,
+115, 34,167,196,122,215,176,182,190,193,144, 18,109,232, 72, 69, 76, 29,142,146,134, 5, 57,103,126,252, 61,247,224,215, 55,249,
+212, 95,188,140, 15,222,130, 59,202, 64,204, 75,110,184,176,127,120,128, 47,202,217,155,118,144,166,225,248,232,152, 20,237,157,
+ 65, 12,195,122,170,107,152, 76, 39, 12,169, 88,126,183,178,234,150, 75, 30,153, 78, 38, 76, 27,135,111,133,155, 78,159,230,129,
+215,223,198, 11, 23,119,121,228,153, 87, 16, 10,211, 46,240,166,219,111,230,122,159,185,126, 48, 86,127,114,189, 64,139, 34,161,
+114,222,235,106,211, 57,243,220,139,247,132, 90, 88, 56,151,113,101,153, 21,190, 12,103, 49,154, 27, 53, 27, 67,116, 41, 32,212,
+ 21,102, 21, 45,198,243, 18, 71, 91,207,236, 84, 65,242,174, 42,254,197,213,120,216,234, 75,119,210,242,174,127,239, 29, 60,252,
+231,127,110,172,120,239,248,207,127,241, 31,240,171,191,246,255,112,184,191,111, 65, 80,206,161,234, 13, 22, 83,189,241,150,228,
+106, 9,107, 86,152, 45,245, 92,182,146,233, 16,198, 82,234,111,111,221,252, 50,101, 52,103,165,243,230,223,215,108,153,190,134,
+150,133,156,148,198, 47, 33,106, 86, 92, 21, 45,214,192,150,170,254,242, 5, 95, 39,228, 41, 91, 34,222,234,119, 87,106,228,105,
+101,188, 47,253,228,141, 24,153,110, 25,223,166, 88,236,100, 41,100, 76,164,232, 87, 73,121, 30, 87, 96,107,123,107, 85,204,168,
+ 42, 91,167,119,248,219, 63,247,115,252,211,127,250,191, 24,160,166, 18, 32,125, 21, 89, 59,103, 73,169,170,142,224,108,133,226,
+138,233,160,196, 55,132, 2, 99, 86, 66, 66,104,138, 85,157,169,216,238,220,188,232,186, 26,211,136,179, 3,119,185, 28, 47,121,
+ 4, 50,102,188,178,140,109, 81,184, 52, 36, 62,241, 7,127,204,223,252,153,159,230, 39,127,250,167,249,205,223,250, 56, 47,191,
+122,145,151, 94,185, 76, 55,237,104,186, 41, 57, 46, 88,204, 79,106,160,138, 85, 24,107,107, 19,222,253,189,239,225,135, 63,242,
+ 97,190,254,216, 55,248,194, 23,191, 82, 61,212,246,243,148, 18,107,108,225, 82, 40, 39,204,142, 23,212,200,250,186, 27,115,244,
+ 41, 50,140, 39,246,161,214,188, 96, 7,244, 39, 61,139,249, 96, 52, 32, 99,243,152, 96,196, 91, 39,109, 59,231,129,147,147, 5,
+165, 88, 74, 81,240, 14, 39,211, 21, 46, 23, 10,174,241,140, 41, 17,143,143, 65, 60, 34,134,138, 44,154, 73, 99, 52,134,181,130,
+ 15, 77, 85,214, 22,114,129,115, 55,223,202, 95,253,137, 31,101,119,119,151,113, 28,185,231,238,187,106,200,134,240,196,211,223,
+226,218,225, 49,197, 89, 88,132,166, 37, 3,184,208,159,236,115,124, 98,133, 71,206, 22,243,168, 69,137,161, 16, 90, 79, 80,129,
+ 28,205, 83,238, 61, 42, 9, 39,193,130, 76, 74,186,193,131, 47, 74, 33, 26,192, 64, 0, 34,100, 37,168, 51, 75,153, 55, 80, 5,
+ 37,219,192, 77,133, 69, 63, 16,130, 5,127,148, 84,152,107,196,105, 21, 80, 58,103,225, 56,206, 60,206,193,184,148, 20, 9, 72,
+140,166, 62, 86,136,131, 21,139,206,187, 85, 71,224, 67, 75,168, 47, 98,212,145,178, 76,174, 26, 77,160, 89, 16,178,100, 75, 55,
+171, 65, 13, 89, 33,229,132,244,153,206, 55, 56, 39,164, 65, 45,195, 90, 45,119, 96, 44,118, 0,123,113,140,106,187,168, 38, 24,
+105,171,145,134,146,196,162,112, 25,153,132,150,152, 19,241,100,206,152, 60, 93, 16,202,162,101,140,198,230, 15, 62, 16, 66,195,
+164, 89, 99,107, 91,104, 84,172, 88,235, 19,139,185, 37,227,229,146,140,196,165,153,162,158,182, 8,243,156,112, 10,107,211, 41,
+ 77,183,133,115,137,120, 50, 35, 59, 79, 46,142,210, 47,200, 2,231, 78,111,115,237,240,132,174,157, 67,132,197,226, 8,141, 61,
+ 65, 18,219,219,235,164, 18,184,124,208,211,118, 66,183,189,206, 65,191,224,206,155, 60, 79,188,116,192,119, 46,116,108, 78,166,
+ 76,215,166,192, 26,243, 62,210, 5,136, 49, 51,235,149, 66,195, 48, 14, 76, 99,207, 94, 26,185,244,242, 43, 4,177,221,155, 44,
+ 71,240,117,191, 62,166,154, 88,165, 16, 83,177, 2,174, 20,156, 23,198,108, 36,238,148, 10,109,104, 57,127,246, 12,199, 7,187,
+204, 82,228,213,107,115,251,206,151,218,152, 26, 82,161, 41,178,121,243, 77, 28,143, 22, 38, 51, 27, 35,163, 42, 12, 25, 45, 61,
+ 55,221,124,158, 59,111,127, 29, 87,119, 31, 35,161,164, 98,123,233,116, 60,227, 56,101, 66,235,217, 59,200, 56,124,245,169,123,
+ 67,192, 6, 79, 19, 2,210,128, 23, 71, 83,139, 85, 17,135, 11, 74, 19,214,104,187,142,245,117, 75,214,202,197, 89, 3,160, 70,
+ 2,196, 89,124,113, 30, 97, 24,123,118,179, 5, 9,149,122,198, 89,183,111,161, 66,243,126, 48,204,103,195, 42,187, 60,231,196,
+235,239,188,137,201,173,119,242,201, 71, 46,129,247,248, 96,214, 69, 45,145, 28, 35, 81,107,242,163,195,192, 53, 67,178,221,104,
+ 29,243,218, 90,187,176, 62,157,176,190,117,154,221,163, 35, 22,199,115,218,174,179,144,169, 18,107,198, 67, 33,198, 68, 89, 40,
+151,119, 95,230,252,186,231,157,111,189,135,103, 95,187,206,222,238, 33,222, 5, 94,187,182,207,250,230, 22,235,155,107,164,222,
+222,203, 33, 47,207, 72, 35,192, 81, 5,184, 70,149, 84, 74,172, 57, 22,197, 82,225,132, 96,204, 15, 12,214,227,196,190,207, 80,
+ 71,233,198,156,151,234,118,168,129, 47,234,200, 88,134,130,221,110,118,209,185, 96,232, 88, 81,211, 62,136,145,116,235, 88, 56,
+115,223,125,247,115,247,221,247,112,241,181,215,120,253, 27,222,192,238,238, 46,187,215,174,211,184, 80,201,115, 22,150,146, 85,
+ 44,248,200,153,211,201,132,153, 22,211,235,234,209, 85,170,202, 60,137, 53, 63,174, 10, 75,151, 43, 4, 99, 0,212,130, 70, 61,
+120, 69,115,180,194,196, 55,248, 80, 41,111,106,159,149, 56, 71,176,228,148, 85, 60,175,199, 66,177,140, 29, 99, 35,240, 66,182,
+200,223,140,221,119, 82,144,108, 93,114,165,242,212, 20, 60, 75,149,211,213, 42, 34,219,133, 95, 60, 37,165,250, 44,100, 10,158,
+126, 24,248,201,159,252, 41, 30,125,248,107, 44,134,158,135, 30,122, 39,143, 62,252,112,253,217,236,207, 49,203, 26, 20, 21,180,
+152,117,153, 84, 40,234, 32,217,133,174,149, 54,151,197, 33,178,132,207,104, 54, 36, 99,137,228,100,209,153,182,211,178,252,242,
+ 34,190, 2,247, 11,170, 9,209, 84,147,177, 20,145, 84, 35,242,172,139,186,118,233, 10,187,123,123, 60,244,192, 3,188,243,161,
+183, 51, 95,204, 57,222, 63, 96,118,124, 68, 63, 44, 72,113,176,220, 89,160,109, 91,238,186,227, 14,126,244, 71,255, 10,223,255,
+190,247,242,212, 83, 79,241,123,191,247,123, 28, 31, 29,225, 36,215,177,238, 95,194, 17, 82, 42, 89,206, 50,218,114,182, 46,108,
+ 25,228, 96, 79,130,137,218,188,154,242,176, 84,138, 82,169,151, 21, 36, 75,131,210, 12, 57,145,114, 36,141,145, 82, 34, 37,217,
+200,180, 20, 27, 65,167, 20,137,201, 96, 20,185, 36, 82,178,112,132,226, 20, 73, 86,237,149, 85, 96, 65,245, 72,103, 19,227,149,
+229,150, 69,133,205,205, 13, 30,120,224,109,220,121,199,157,156, 63,127,158,182,109, 57, 57, 62,230,241, 39,159,226,211,159,249,
+119,204, 78,102,150,238,163,166, 46, 86,177,253,159,115,134,154,245,206,194, 27,166, 19, 79,167,202,108,232, 25,146, 18,199,116,
+ 67,124, 24,130, 81,195, 44,128,142,148,139, 85,153, 18,200,178, 44,101,108, 71, 21,151, 64,150, 6,114, 49,236,160,237,212,133,
+ 6,139,143, 76, 44, 81,135,246, 50,249,234,133,181,147,192,212,170, 75, 3,131,203, 24, 73,138, 66,146,140, 95,238,213, 68,240,
+174,224, 67, 13, 99,240,206, 58,251, 12,177,152, 78,162,104,253,188,138,161,105,113,169,218,152, 28,100,235, 50,236,128, 87, 38,
+193,225,157,210,122,139,186,164, 20,124, 3,105,176, 75, 68,181, 64, 40,184,224, 44,158, 80, 66, 13,225, 80, 98, 78, 12,125, 61,
+ 12, 20,146,102,226, 80, 83,203,196, 49,142,153, 49,103, 98,137, 12, 37, 18,135,204,162, 6, 17,205,213,145,100, 2, 77, 67,211,
+173,209,180,129,166,105,209,100,137, 74,227,220, 50,199,211,220, 58,225, 20, 19,195,208, 51,164,132,211, 6,215, 4,186,181, 41,
+107,237,132,245, 83, 83, 54, 78,109,112,211,198, 41,110, 62,179,205,153,115, 55,113,238,244, 14, 59, 27, 83, 38, 19,143, 15,129,
+221,253, 3,130,203,124,232,157,111,226,141,119,191,129,249,209, 1, 63,254,177,247, 50, 92,187,204,159, 61,246, 28, 71,139,158,
+121, 63,112,178, 56,230,120,255, 10,235,235, 83, 74, 81,174, 94,191, 78, 26,122,212, 57, 58,239,153,141,137,197,162,167, 13,134,
+ 38,237, 99,170, 60,111,199,250,218,148,113, 76,156,204, 23, 43,222, 67,170,125, 79,240,142, 24, 45,213, 48,180, 29,235, 91,167,
+217,218,220,194,251,150,105,211,114,180, 24, 8,161,225,142,243,183, 24,207, 90, 43,224,196, 65,219, 77, 57, 56,216, 55, 98, 22,
+118,169,228,152,105,188, 99,182,152,115,199,237,175,195, 55,142,215, 46, 95,198,187,150,224,132, 88, 18,165, 40,247,222,121, 27,
+155,107,167,104,189, 29,214, 99,202,164,164,228,152, 57,158, 45, 24,230, 35,139, 69,228,120,214, 51,155, 47,152,207,122,102,125,
+166,143,153,249, 98,228,120, 54, 50, 68,203, 35,207, 89, 9,211, 0,222,211,248,134,181,181,142,201,250,148,126,140, 92,185,118,
+221, 46, 78,107, 62, 45,213, 49, 70,198, 56,146, 83,186, 33, 6, 78,133,148, 35,109,104,240,211, 53,154, 2,151, 95,189,204,201,
+ 98, 32,165,140,212, 51, 97,140,177, 90,208,178,113,218,155, 96,246,201, 58,222,103,133, 18, 17, 3, 84, 53,129,156, 51, 41, 39,
+ 54,183,118, 8,237, 58,173, 55,200,209, 56, 46,208,170, 95,138,185,208, 72,225,221,111,187,131,231,175,143,188,244,202,101, 84,
+ 11,135,179,200,124, 88,176,185,185, 65,211, 76,141,203,209,180, 21,176,228,113, 62, 16, 92, 13, 83,169,204,118,170,112, 13, 45,
+148,164,164,146, 13,220,147,108,162,212,247, 61,195, 56, 50,140, 35, 41, 69, 82,142,140,217,194,168,170,180,217, 98,184,193, 58,
+ 78, 49,162,168,175, 9,112,130, 84,240,141, 93,112, 43,157,131,111,248,246,183,191,141, 15,129, 16, 60,151, 46, 95,225,223,254,
+209, 31, 16,156, 35, 99,185,235, 78,188, 37,211, 84,184,153,229,187,151,165, 12,106,185,189, 54,209,152,106, 77, 25,180,142,151,
+ 98,207,157, 53,163, 21, 48, 36, 14, 13,102,127, 20,181,133,115,193,253,165, 41,130, 21,182, 37, 44, 87,135,213,107, 45,238, 70,
+192,151,150, 85, 3, 73, 73,213,230,173,171,212, 82, 8, 32, 25,239, 27,123,107,178,233,167,138,228,106, 95,118,166, 57,195,168,
+123,214,198, 27,220,196,176,181, 66, 26, 71,158,122,234, 73,118,206,152,138,255,209, 71, 31,225, 27,143,125,211,156, 65,106, 26,
+166, 32,212,226, 99, 73, 1, 46,245,162,247, 72,205, 71, 8,178,156,215,152, 34, 57,172, 62, 48,181, 15,198, 90,125,181,110, 79,
+147,237,132,178,146,171,101, 76,213,146,186, 92, 77,164, 81,231,208,108, 73, 52,134,151, 21,190,254,248, 55, 89, 44, 22,124,228,
+ 7, 63,204,223,248,201,191,198,213,247, 95,229,185,239, 60,199,107,151, 46, 49, 95, 44, 12,143,122,250, 12,175,123,221, 93,220,
+123,239, 61,244,195,192,167, 63,253,105,190,240,197, 47, 50, 91,204, 42,252, 5, 99,237,122,251,162, 52,143,198,249,118,161,246,
+231,246,226,185, 92,234,120, 45, 65,118,203,160, 75,146, 55,202, 78,112,118,169,121, 49,255,183,136,167,241,150, 62,151,213, 68,
+ 50,118,145, 75,229, 35, 23, 27,213,177, 12,181,177, 75, 65,130, 67,164,173,169,117,133,168, 32,218,224, 72, 68,117,148,232, 80,
+146, 61, 96,201, 0,253,174,190, 84,175, 93,124,145,223,250,205,127,197, 45,231,110,161,233, 58, 74, 74,134,182,125,233,101,226,
+ 48,226, 40, 38,252,241,142, 16,108, 50, 96, 17,128,106, 32, 1, 85, 27, 37, 97,217,231,167,212,252,194, 75,218, 16, 4, 24,172,
+194,239,139,218,136, 56, 56,130,115,184, 92,127,239, 70,144,182, 65, 83, 66,138, 71, 66,203, 48,244,182,147,169,130, 62, 31, 60,
+ 52, 19, 66,202,224,109,247,218, 5, 79, 22, 40, 73,201,222, 87,138,149, 85,175,173,216, 52, 32, 73, 65,178, 99,226, 76,228, 33,
+177,128,175,137,127,217, 20,201,206, 57, 98, 1,201, 22,107, 88, 4, 27,159,103,139,194, 20, 47,150, 88,172,138, 43,217,214, 42,
+ 57,163, 65, 56,165, 13,222,155,112, 10,177, 12,231, 16, 38, 20,236, 2,157,182, 13,125, 46,104,141,140, 28,139, 9, 16, 83,142,
+168, 11,120,241,140, 57,162,161,208,228,209, 30,127,245,136,120,139,232, 45,163,101, 70, 39,235,148,154, 38, 27,178, 17,161, 31,
+ 7, 92,219,144,199,253,218,213, 4, 51, 21,138,195,139,210,117,107, 76,252, 26, 74,164, 65, 25,171, 5, 97,200, 35,154, 28,201,
+247,184, 49, 80,230, 61,235,211, 6,137, 45, 40, 76, 39, 83,124,231,105, 82, 33,172,175,177,179,179, 97, 57, 52,197,113,251,173,
+215,144, 28, 9, 27,231,120,244,185,215,120,251, 27,206, 18,110,186,151,123,222,250, 38, 62,120,112,192, 35,223,218,101, 60,137,
+204,139,141, 5,103,243, 97, 5,108,242,141, 69,253,206, 98, 98, 72,182, 83,183,180, 57,243, 62, 47, 83,180,114, 44, 12,217,252,
+235, 27,235, 19, 74,202, 12,201, 10,228,190,207,117, 74, 38, 12, 25,246, 15, 14,145,177,183,119,240, 47,229, 73,159,191,227, 54,
+214,143, 35, 71,179, 30, 87, 50,154, 70,174, 29,236,219,187, 85,156, 69,134,170,208, 4, 43, 26,218,181, 53,174,238,238,178,181,
+125, 43,139,241,105,134,225,144,147,166,173,209,178, 35, 39,125,207,249, 91,110,102, 51, 77,201, 57,115,114,220, 83, 52, 87,140,
+169, 39,165,196, 24, 19, 99, 74, 80, 50, 67,138,228, 69, 98,177,160,146,231,140, 99,222, 56,193, 59,187, 68,138, 23, 58,111,118,
+ 82,215, 52,148,148,184,253,166, 77,250, 49,162, 57,179,232, 19,147,214,115,254,236, 54,195,152,185,184,123,204, 56,142,156,221,
+ 62,197,144, 11,141,131,233,218, 58, 47,188,118,196, 15, 62,120, 43,247,255,220,123,249,231,255,250, 97, 94,189,116, 64,104, 3,
+185,228, 90,148,234, 42,186, 52, 38,115,227,196,104, 65, 40,203, 20, 48,169,211,131,156,237,119, 16,148, 16, 90,134, 33,213, 84,
+ 81, 95, 71,200, 70,255,163,192,238,225,156,188, 24,184,247,174,115, 60,243,237, 87,217,153, 58,102,139,136,142, 17, 71, 65,130,
+ 71,146,226, 92,139,115,137,182,113,164,148,200, 58,226, 75, 13, 46, 41,197, 98,168, 83, 34,250,196, 72,196,101, 67, 48, 47, 29,
+ 5,133, 66,142,145,164,150, 17,174, 88,183,187,108,168, 28, 14, 95, 65, 62, 62, 44,215,111, 53,243,161,118,198,224,240,106, 74,
+110,149,202, 94, 37,179, 56,153,241,240,215,190,102,194,117,236, 25,211,124, 99,194,107,105,140,203,252, 8,136,162,248,202, 75,
+137, 53,171, 51, 87,138,154, 83, 87, 83,231,196, 92, 63,222,213,113,184, 84,174,109,205,149,205, 66, 40,150,101, 18,176,207, 53,
+ 21,187,183,156,138,157,239, 25,154,170, 71, 64, 26,156,119, 53,131,192, 33, 53, 69, 77,202,141,221,185, 22,203, 14,240,217,184,
+ 6, 34,142,156, 77,108,233, 66, 32, 21, 3,182, 21,117, 55, 26,224,250,179,149, 98,211, 7,239, 92, 77,186,203,168, 10,187,123,
+123,124,249, 75, 95,172,207, 8,171,207,212, 83,117, 81, 22, 45,103,133,143,104,101,222, 11, 69,150, 89,244,165,226,112, 45,114,
+ 55,102, 37,200, 50, 40, 71,151,245, 88,205,130,150,202,207,213, 82,189,159, 38, 36,177,250, 59,160, 75,148,108, 42,164,101,182,
+175,111, 42,159, 29,158,121,230, 89, 94,121,245, 50,111,125,219, 91,249,174,251,222,196, 91,191,251,109,188,235,123,222, 85, 71,
+128, 6, 67,216,221,223,227, 75,127,246, 23,124,243, 27,223,228,229,151, 95, 54, 65,137,111,237,187,201, 70,185, 43,213, 31,111,
+113,194, 30,209,132,214, 17,141,212, 49,141,101,221, 86,112,255, 82,212,166,177, 70, 46, 56,163,102,105, 94,229,223, 22,108,244,
+110,242,116,243,100, 87,108,143,253,142,206, 70, 58,182,139,182,184, 69,213,130, 74, 29,169,137,117,174, 86, 65,153, 77, 76, 28,
+104, 50,182,176,175, 80, 7, 21, 71,168,158,254,239, 92,120,149, 23, 94,120,181,202, 43,172,255,205,174,198, 7,171, 67, 66, 67,
+206,150,192,211, 96,221,139,115,134,119, 20, 41,182,191, 77,118,209, 56,239,144,198,173,114,120,131, 24, 73,171,235, 60, 37,154,
+202, 61,147,136,125, 38,121, 43,190,130, 4,208,249,106,164, 9,182, 11,109,170,167,159,166, 88,213,173, 25,117,198, 39,182,135,
+200, 42,223, 92,148,113,136, 4,169, 34, 73, 41,168,247,120,133, 44, 5, 87,149,213,102, 3,242,118,145,139,133, 22,168, 4, 19,
+ 45,134, 2, 93, 64, 7,179,246,164,154, 55,143,100, 59, 72,100, 41,192,179,226,138,250,242,143,174, 64, 18, 22,121,196, 74,172,
+ 76, 97,249,130, 26, 65, 48,143,121,101,133, 50, 4, 92, 93,179,208,163,193,175,246,140,206,129,208, 0,189, 65,137, 84,241,109,
+107,224, 36,132,160, 14,151,148,210, 58,202, 88, 40,193, 98, 15,115, 54, 86, 66, 76,163,117, 37, 62,161,193, 51,246, 51,116, 20,
+154, 78,232, 19,136,179, 46,169,145,137,177,181,131,117,153,228,129, 97, 1, 37,137,145,237,162, 39, 28, 11,146,205,146,162, 37,
+210, 77, 59,166,147, 83,156,190,229, 13,248, 73,226,165,221, 5,254, 96,228,197,139,135,148, 79, 62, 69,233, 7,154,211,119,243,
+208, 59,238,164,164,196, 98, 49,210, 15, 35,135, 71,115, 78,230, 51, 54,215, 54, 45,137,202,219, 14, 50,199,194,152,178,237, 69,
+ 75,198,239,116, 12,243, 57,139, 49,114, 60,159,145, 74, 97, 28, 19,235,231,207,160,146,153, 95,185,102,137,141, 2,227,152,105,
+ 26, 79, 30, 22,116,174,144,181, 97,210,118,156,140,209, 38, 24,105, 36,116,167,209,217, 62,253,241, 53, 3,214, 56, 49,171,161,
+ 78,140,106,166,217,220, 25,216,225,220,105, 97,152,159,176,190,182,193,153,157,211, 28,238, 95,163,196, 30, 39, 66,163,153,197,
+201, 9, 99, 60, 3, 18,104,155,192,230,150,103,172,156,255,206, 7, 70,181,162, 36, 21, 69,114,102,136, 35, 89,197,172, 99, 49,
+210,167,108,185, 7,177, 48, 14, 61,139,222,214,134, 7,117, 18,225,131,163,233, 60,147,233, 6,211, 46,211, 56,152, 12,137,245,
+245,142,115,183,157,231,120, 62,114,249,248, 5, 38,204,184,243,238,187, 57,158, 39,142, 15,118, 17,231, 56,153,245, 92,158,195,
+ 27,238,191,155,243,183,189,192,229,235,135, 28,204,102,102, 83, 91,145,228,140, 0,182, 44,158, 82,201, 43,109,146, 33,218, 5,
+215,216, 89,146,114, 50,222,119, 50,141,143, 43,134, 0,182, 84, 66, 97, 24, 35,136,114, 56,139, 92,221, 61,226,141,119,220,201,
+230,230,105,214,166,129,228,231,140,243, 99,200,133,182, 13, 36,201, 56,201, 20,169, 73,100, 21,140,229,155, 96,107,136,172, 68,
+ 95, 40,157, 18, 82,102,210, 22,178, 70, 98,170, 32,173,146,145, 49,217,245, 80,187,203, 92, 50,213, 79,101,128, 44, 50, 37,217,
+148,103, 28,204, 18,236,124, 91,133,176,149, 19, 18, 92,181,120, 86, 31,184,247, 86, 0,215,212,187,214, 45, 61,239,141, 89, 96,
+197, 35,132,202, 66,169, 93,104,213,221,148, 98,200,213,160, 30,135,146, 70,179,194,226,155,106,196, 42, 72, 19,240,165, 54, 18,
+181,131, 85,231, 41, 37, 35,185, 50,223, 67, 61,203,171,216, 27, 7, 69,146,137,208, 74,229,249,123, 27,241,151, 82,109,125,197,
+104,163, 86,146, 44,173,146,102,213, 43,163,105, 40,150,145,171,246,179,214,110, 90,106, 71,111,177,117,214,140,138, 1,181,156,
+152, 80, 85,197, 10, 59,167,174, 14, 26, 76,148, 90, 84,170,104,216,192, 99, 53,152,174,126,250, 74,170, 56,103, 39,161, 94,135,
+ 10, 37, 82, 28,100, 95,239,167,108,211, 98,185,245,174,215,107,168,217,173,127,249, 82,151, 21, 60,190,254,211,215,170, 69,106,
+165, 83, 47, 27,117, 38,152,113,185,218,226,124,168,224,251, 90, 73, 52,178,242, 0, 90,138,206, 96,179, 1, 87,167, 65, 42,118,
+144,135,250, 0,170, 84, 58, 91, 50, 37, 41,138,211,108,185,227,174,146,190, 42,218,209,156,247,106, 62, 65, 49,194, 78, 17,173,
+106,193,229,229,233, 33,184,154,154, 84,247,248, 56, 92,227,241, 44, 61,212, 38,206,146,154, 84, 87,220, 18,161,111,227, 51,253,
+ 75, 52, 92, 42,124, 95,234,223, 89, 10, 20,103,151, 55, 90, 11, 15, 92, 21,121, 8,222, 99,227,126, 17,139,231,196, 40,109, 5,
+173, 66,186,106, 37,245,117,100,163,197,252,167,185,218, 36, 92,221,247, 20, 37,166,140,115, 1, 23,150,190,104, 5, 23,144,162,
+ 4, 20,223,154,218, 86,139, 89, 55,116, 41,102, 84,136, 99, 49,106,157, 52,248, 54, 88, 92,168, 20,186,214,219, 30,203,190, 61,
+156, 91, 30, 68, 85,239,225, 42, 23, 59, 69,203, 53, 54,211, 45,193,133,154, 77,110, 55,158, 21, 51, 75,129, 94, 64,154, 96, 93,
+195, 56,146, 83, 77, 92,114, 88, 39, 25, 51, 41, 21,168,249,233,190,138,179,198,148,232,124, 75, 8,181,170,174, 62,220,101, 52,
+161,195,198,150,104, 49, 56, 16,169,218, 6, 77, 60, 21, 53,217,136,222,123,198,146,235,115, 42,148, 6, 72,118,201,225,165,250,
+150, 75, 21,236,153,141, 79, 48, 1, 31,106,223,143, 5, 22,213,124,226, 38,224, 39, 13,141, 90,209, 18, 87,207,101, 13,165, 78,
+245, 3, 35,145,179,226, 93,107,171, 10,169, 66,159, 96,218,135, 89, 78, 16,149, 56,206, 73,163, 29,134,237,250,132, 73, 55,197,
+ 51,214, 14, 88,112,110,202,164, 85,114,116,248,137,157, 32,101, 24,232,186,134,136,217,150, 38,109, 11,173, 82,134, 68, 39,142,
+249, 98, 65, 26, 35, 49,101,142, 23, 11,226, 16,201, 89,233,135, 5,243,177,175,217,211,230, 64,136,243, 25,169, 12, 12, 99, 98,
+ 28, 18,210,118,148,146, 24,102, 11,130,179, 80, 20, 85,104, 28,180,141,199,183, 13,235,211, 41,109,104, 56, 58,153,113,105,239,
+ 0,135,240,192, 59,223,195,252,104,193,254,222,101, 66,211,130, 86,251,212, 56,167, 9,129,217, 48, 44,183,139,136,192,198,218,
+ 41, 78,173,111,112,230,220, 77,236, 31, 70, 14,247,143,232, 26,161,159,237,177,232, 71,214,182,118, 56,123,122,135,180,236,140,
+ 92,221,141, 22, 97,226, 21,239, 2, 81,133,198,217,228, 33,149, 72,232, 26,200, 70,110, 28,134,136,199,147,114,178, 17,114,178,
+223, 47,198,145, 82, 18,125,157, 94,140, 67, 50, 65,221, 95,210, 13,121,103,200,213,249,201, 49,235,157,103,231,236, 45,196,152,
+112, 57, 86,177, 89,161,233, 90,214,183, 55,144,172,188,118,121,151,253,107,215, 76,132, 25, 44,179,205,190,251, 58,209, 20, 42,
+ 35,227, 6,211,163,113,194,250,198, 58, 93,219,209, 15,102,153, 19,215,144, 82,162,241,216,103, 47, 74,202, 6,186,138, 41,147,
+ 83,225, 39,222,247,122, 62,240,161,239,229,127,254,245,175,113,249,226, 30,157, 79,136,142,220,124,211,205,132,233, 41,156,135,
+ 92, 19,219, 98,206,214,169,213,164,180, 82,207, 14,154,137,129,113, 74, 38,212,240,158, 62,102,188,154,110, 34,141, 67,117,183,
+152,197,212,156, 1,182,123,214, 82,203,232,156, 43, 85, 94,204, 33, 85,125,228, 46, 4,211, 2, 57, 91,179, 73, 13, 4, 19,197,
+206, 89, 23, 16, 85,154,198, 89,180,178,232,242,180,193,230,214,216,221, 82,247,232,120,143,215,186, 50,117,178,194,140,248, 80,
+239,144,122, 38,160,149,108,234,128, 92, 79,253,128, 77, 86,181,173, 5, 66,169,157,178, 61, 75,193,155,204, 63,215, 49, 63,217,
+220, 95,174, 89,130,109, 12,229,139,207,164, 44,140,125,101,157,144,170, 56,116,137, 83,183,251, 98,105,239, 41, 26, 9, 98,100,
+ 63,173, 46, 33, 89,222,167, 44,143,118,107,244, 86, 86,112,183,252,222,170, 27,162,148,202,137,177,255, 87, 46, 85,202,232,100,
+101,135,243, 78, 48,130,131,233, 16, 68,164,230,214, 91, 67,148,163, 18,212,249, 58,150,230,198, 72, 91,106, 10, 80, 77,116, 81,
+167,182,148,175, 91,134, 82,189,202,165, 72,229,196, 91,166, 45,197,188,161,150,139, 91,119, 31,169,142, 28,138,128,199,172, 78,
+171,196,122,243,120,139, 22, 52, 37,226,210, 65, 88, 61,122, 90, 76,148,224,196,225, 29, 53, 73,200,173,188,182, 57, 11, 18,236,
+ 66, 75, 37,147,212,196, 5,190,118,176, 32,241, 14,215, 0, 0, 20,218, 73, 68, 65, 84,170,102, 91, 72,163,210, 4, 95,133, 20,
+118, 72,250, 10,111,201, 85, 8,129, 19,156, 47,164, 49, 87, 44,174,145,228, 68,177,174,175,122,237, 85,157, 9, 52,176,139, 76,
+107,167,173,248,234,215,180,177, 11,181, 42,213,100, 95,156, 15, 30,245, 6,135,113, 8,161, 13,213,254, 34,184,166, 37,136,121,
+ 68,139,220,120,113,212,149,149, 87,183,100, 65,165,161, 46,178,172,115, 47, 66,227, 90,146, 12,140,165,224, 71, 95,185,211,213,
+188,235, 28, 89, 28, 65, 10,237,164,224,104,201, 37, 51,142, 35,226, 19,163, 58,198, 88,240,222, 91,150,178,100, 98, 86, 28,246,
+114,250,198,190,239,152, 0, 13,149, 84,151,104,171,101, 72,139,144, 83,182, 93, 24, 66,138,153,166,149,122, 88, 22,124, 18,146,
+250,154,107,156,109,191,156,204,238,179,156,254,100, 50,190,109,173, 11,160,144, 72,164, 44,171,140,223,166,117,164, 40, 53,250,
+180, 88, 39, 29, 60, 18,132, 60,212,151, 42,216,157,218, 73,139, 15,118,160, 65,187, 66,175,122,231,208, 46, 83,178, 85,255,144,
+ 44,153,216, 11, 78, 58, 59,100,178,229,178,143,234,136, 57,209,144, 81, 95,208,228,209, 52,214,200, 92,143, 27, 29,190, 49, 33,
+ 86,206,133, 0,148, 46, 88,170, 93, 82, 92, 87,133, 66, 41,131,247,166,194, 12,182, 90,240,185, 33, 74,162, 9, 45,154, 34,222,
+123,114, 82,198, 52, 48,105, 91,196,101,130, 19,202, 56, 16, 51,100, 39,140,243, 26, 73, 89, 50,115,205,134,149,205,137,147,124,
+ 2,141,189,204, 27,107, 45, 41, 9,139,152,153, 78, 58,110, 93,155,210,199,200, 52, 76,160, 17,250,197, 17,215,119, 71,250, 52,
+152,206,226,212,142,137,141,134, 72,210,196,152, 19,113, 54, 99, 46,158,197, 98,198, 48, 24, 98,181, 93, 91,227,230,115,183,115,
+112,184, 15, 89,137, 26,233,115,166, 20,232,218,134, 50, 63, 97,126,114, 76, 44, 35,121, 76,230,154, 41,133,105, 19,240, 65,232,
+146, 67, 74,166, 79,133, 16, 60,195, 48, 48,157, 78,137,243, 57, 27,107,107,204, 22, 83,252,244, 20,253,193,117, 78,250, 57,131,
+102,206,159,221, 97, 18,106, 52,101, 42,117,173, 2,189, 42, 90,162,113, 20, 80, 82,170, 19,179,122,226, 59,231, 80,231, 73, 5,
+218, 73, 71,147,215, 76, 9,189, 97,205, 65, 83,109, 64, 57,103,163, 48,166,145, 62,141, 44,134, 66, 31, 45,109, 48, 70,152,208,
+ 49,198,204,213, 75, 23, 1, 8,161, 49,231,136,115,104, 63,114,112,112,204,100,210, 17,164,112,122,103,157,146, 51,167,166, 19,
+230,163,114,120,116, 72,206,229, 70,183,236,106, 36,180, 80,207, 75,165,159,155, 99, 38,139,224,125, 75,137, 61, 94,148,132,161,
+182,189,247,248,188, 84, 57,103,156, 40,143, 62,183,199,173,119, 94,226, 3,111,217,230, 79,246,175,176,123,216,179,179, 57,193,
+183,141,133,224, 20,143, 72,131,232,136, 83, 35,179,133,224, 24,115, 66,147,160, 65,113,165,135, 88,181, 2, 1,138,120, 66,168,
+215,131, 40,205,100, 98, 90,169,170, 5, 16, 45,164,202, 3,208,146,108,236,171,182, 99,207, 37,211,148,101,180,104,237,176,221,
+178,145, 74,230, 74, 72,182, 46,213,104,211, 84,231, 60,131,247,136,243,184,198,156, 84,109,229,225, 75, 48, 86,135,137,132, 13,
+122,102,205, 82, 37,212,228,100,147,204, 98,103,212, 18, 97,236, 48, 53,187, 57,126, 12, 91, 46,165, 16,154, 64, 82,243,111, 75,
+ 49,166,138,136,161,174, 71,117,248, 2,197, 27,168, 39, 87, 45,150,195,206,216, 54,216, 5,171,209,190, 47,231,129,100,211,166,
+ 82,177,164,190,170,223,139,164, 21, 70,221, 9, 53, 22,216, 44,125, 86,184, 88,118, 61, 85,120,238,185, 49,189,241, 53,230, 60,
+217, 56,192, 86, 41, 42,104,109,100,140,164,104,154,162,198,172, 8, 21,180, 6, 69,204,129, 36, 62,212, 96,181, 42, 88, 14,166,
+216, 15,140,182, 39,147,154,219,237,151,163,118,150,221,250, 13, 24, 11,222, 33,206,118, 56,185,254,165,169,142, 73,197,137,141,
+ 54,165, 80,138, 91,229,245,106,162,178,189,125,253, 96, 44,204,194, 42,100,227,165, 11,201,210,236,188,171,212,165,140, 86,225,
+147,137, 12,156,237, 89,168,149,236, 56, 2, 38,220, 42,152, 24,194,173,194,101,170,192,219,217,216, 29, 41,120, 53,234, 90, 42,
+224,130, 93,146,146, 87,155,249, 42,104, 83, 52, 91, 16,196,234,119,174,213,149,212,208,190, 37,167, 33, 47, 35, 10, 75,169,161,
+ 18, 86,108,100, 92, 13, 10,169,147, 12, 23,106,177, 96,163, 93,173, 81,155,182, 19,113, 52, 82,137, 89,154, 80,103,157,127,240,
+214,121,151, 80, 39, 29, 90,193,184,173, 77, 72,164, 20,171, 52,179, 7,151,137,154,204,251, 45,166, 54,117, 94,170,162,211, 17,
+213, 44, 25, 62, 56,188, 56,178, 4,124, 72,172, 5, 75, 79, 11, 57, 87,186,159,169,197, 29, 82,137, 92, 85, 69, 89, 28, 42,137,
+ 98, 99, 24, 20,165, 9, 16, 90, 33,101,131, 75, 4,103, 15,113, 66,160,238,210, 74, 81,114, 31,173, 67, 17, 87, 33, 80,222, 86,
+ 17,154,160, 56, 74, 20,156, 87,219,105, 97,207, 85, 8,185,162,126, 5, 52,145, 84,144, 12,193, 9,169,216,224, 93,189,181,246,
+185,140,203,122,182, 82,166, 4,200, 70,167,243,172, 80,157,193,217,222, 51,151, 82,213,179, 74,201,208,250, 14,215, 20, 84, 35,
+154,237,192, 80, 6, 50, 82, 87, 52, 86,108, 74, 80,164, 20,210,201, 64,108,172, 35,241,189,137,235, 18,153, 17, 59,124,130, 19,
+ 91,101, 8, 12,149, 15, 32,174, 62, 7,125,193,235, 82,203,106,227, 54,157,180, 53, 47,217,148,180, 57,101, 74,227, 25,227, 2,
+ 34,182,163,246, 86,164,206,147,121,228,139, 43,117, 82,210,217, 94, 51, 37, 74, 54,100,165, 43, 86,224, 30,159, 44,104,138, 35,
+ 4, 97, 22,204,154,227,101,139,230, 84, 15, 57,144,138,167,164, 1,141, 16, 93, 66, 93, 98,130,194,218, 6, 59, 56,250,249, 17,
+243,217, 49, 49,143, 12, 99,228,234,238, 53, 90,103,246,156,101,241, 45,128, 15,129,131,227, 19,139,149, 77, 17,239,132,214, 57,
+214, 26, 79,104,108,239,217,116,158, 56, 42, 62,219,206, 89,196,178, 11, 22,253,192,233,141,211,184,114,204,236,228,184,118,182,
+142,237,181,134, 51, 59, 19,198,193,186,185,226,133,109, 87, 8, 69, 25,164, 49, 43,162, 90,186, 89, 78,150,196, 22,139, 89, 82,
+155,154,105,144, 99, 33, 82, 44,231, 94, 60,206,181,164,104, 35,121, 23, 60,234, 45,197,208,249,204,154,179, 73, 79, 78,150,133,
+222,224, 24,116, 36,245, 61,177, 31, 76,104,216, 47, 88, 44, 70,134, 33,146,115,102, 44, 54,154,110, 66, 75,104,167, 21, 66, 19,
+216,156, 40,211,206,213, 96, 24,179,202,197,148, 41,185,112,211,214, 58, 27, 91,155, 38,198, 28, 7,114, 44,244, 57,211,231,129,
+152, 18,234,171,234, 27,101, 77, 28,190,109,136,189, 21,146,147,182, 97,127, 46,252,217,195, 23,248,165,191,243, 30,222,247,238,
+187,249,103,255,226, 79,121,101,247,152,201, 36,160,174, 37,141, 22, 30, 80,162,173, 2, 27,241, 20,245,102, 37,245, 90, 85,226,
+ 80, 58,129,209,242, 61,172,241,177,243, 71,156, 66, 22, 27, 56,133,134, 16, 2, 13,129, 84,215,152, 90,179, 34,164,158, 21, 41,
+231, 26, 73, 91, 89, 11,197,166,138, 49,219,229,239,150, 81,113,197,138,123, 19, 98,214,118, 80, 19, 37,143,100,129, 40,174,142,
+176,221,202,126,103,147,222,132,215, 96,196, 82,176,148, 61, 49, 81, 93,201,102,111,148, 32,117, 36,109, 83, 22, 19,197, 89,195,
+153,170,205,218, 73, 38,105,192,167, 92, 1,102,101,165,122,103, 57, 53, 13,118,239,217, 57, 14,131, 42,196,100,147,219, 96, 8,
+ 92,231,151, 77,162, 77,210, 74, 37, 29,221, 16,221,107, 69,125,187,122, 83, 20, 84,109,218, 96,218, 4,197,235, 82, 60,103,218,
+143, 92,245,105,230,216,180,201,216, 82,223, 32,170, 6,224, 18, 59,215,199, 74, 95, 21,196,166,210, 90, 12, 23, 87,106,209, 18,
+108, 69,234,235, 42, 58,168,115, 43, 78,175,253,189,193, 46,142, 37,128,160,142,196,109,143, 80,208, 98,227, 57,138,189, 56, 22,
+104, 86,187, 93,150,225, 47, 55, 18,223,108,199,238,173,219,207,185, 6,187,152,210, 89,150, 57,176,206,118, 57, 82, 74,197,227,
+ 53,248,106,109, 2,235,210,195,114,140,231,189,125,105,174, 1,239,104,196,118,169, 13, 14, 41,150, 73,171,181,114,211,165,226,
+187,142,249,197, 87,105,248,242,139,173, 1,243,170, 3,174,216,101,109,202,115, 27, 11,175,226, 20,139,174, 60,251,213,201,129,
+ 52,245,178,119,185,142,130, 50, 74,180, 15,222,155, 38, 65, 42, 99, 89,235,192,189,134, 60, 91,192, 10, 53, 98,216, 43,141,107,
+112, 65,107,183,234, 73,106, 66, 45,219, 75, 47,173,106,246,194,153, 72,211, 4, 60, 90,108,221, 80, 92, 64,146,174, 46, 85,177,
+254, 23,241, 66, 88, 74, 31, 86,168,222,101,161, 96, 21,179,132, 66,147, 29,177,220, 32,193,213,111,145,152, 76,241, 90,212, 94,
+ 98,231, 2, 67, 46,196,190,106,233,157,167,109,140, 63,223,134, 58,102, 19,101,158, 99,205, 9,142, 20, 53, 60,108, 78, 54,250,
+ 45, 1,178, 88, 53, 47,201, 84,233,173, 56,130,179,233,136, 3, 82, 99,197,128,170, 35,101, 64,172,232, 19,231,236, 80, 80,143,
+ 87, 71,104,160, 79,222,112,214,212,195, 73, 51,181,196, 51, 62,187, 75,104, 91,253,202, 57, 35,193,227, 52,153, 37,179,215,250,
+121, 26,206,115, 57, 85,113, 54,207,195, 5, 27, 9,118,117, 39, 95,162,109,202, 18, 66, 95, 82,133,217, 22, 68, 38,181,131,177,
+117,143,185, 36, 44,128, 65,124,180, 92,250,122,128, 52, 98,128, 15,169,163,124,231, 3, 49, 25,108, 37, 21,177,159, 81, 32, 69,
+203,151, 75, 14, 75,249, 43,138, 47, 25, 72,168, 38,242,208, 51, 38, 27, 13,138,179,130,217,103, 37, 21, 27, 45,186,193, 83,242,
+220,118,173, 62,152, 8,177, 20, 28, 35, 37, 37,138, 6,186, 16,112, 14, 22,197,138, 70,145,192,186, 59,195,198,198, 22,125, 74,
+104, 73,204,143, 79,200,121, 96, 49, 38,154,198, 44,113, 33,120,154,166, 97,119,111,159,146, 35,107, 19,207,180, 11, 56, 23,152,
+ 54,134, 15,238, 99,180,206,211, 53,244,140,148,108,130,165,147,217,156,166, 13,156, 46,145, 46,100,118,175,237,161, 57,146, 83,
+100,251,220, 89,242,116,131,227,217, 49, 82, 10,147, 83, 29,167, 78,173,161,163,167, 35, 49,245, 29,147,105,192,183,230, 60, 48,
+113, 78, 65,218, 27, 19,190, 54,192, 34,141,228,226, 9,210,144,211, 64, 44,153,152, 70, 14,143, 70,102, 39, 61, 89, 6, 83, 31,
+139, 88,167,164, 14, 45, 29,237,116, 74,167,137,245, 86, 9, 59, 21,104, 83,122,114,206,184,177, 48,166,129,163,249,156, 49,142,
+164, 81, 25,198,194, 34, 42,195, 48, 34,206,130,101,156,111,152,116,245,204,114, 66, 19,132,157,205,117,214, 54,183,141,213,144,
+147,173,130, 74,230,181,235,251,188,122,241,114,205, 66, 55,209, 85,159, 19,231,207,238,208, 53, 13,254,100,206,250,198, 26,184,
+142, 75,215,103, 92,218, 61,225, 99, 63,246,195, 76,166,103,249,213,223,250, 12,126,109, 27,130, 97,136, 83, 52, 38,125, 63,212,
+192, 44, 95,136,163, 81, 29, 93, 41,118,102,131,141,106,197,200,103,193,153, 31,223,139,173, 11,125,181,136,165,229,184, 91,108,
+ 28,236, 93,107, 93,179,128,102, 71,231,212, 44,199,226,173,123,198, 4,213,169,138,198,180,234, 57,146, 38, 52, 89,215,169,229,
+198,170,211, 50,202, 21,239,205,103,190, 28,235,199, 58,163,196,153,239, 93,106,144, 86,211, 52,248, 58,177,117,174,174,171,181,
+216, 90, 75,151,219,109, 59, 95, 69, 28, 41, 69, 60, 66,235, 61,189, 83, 19, 86,146,113, 14,123, 14,107, 48,153,138,224, 83, 5,
+ 25,137,253,254, 36,147, 90,107,168,171,225,148,140, 91, 47,206,254,101,245,236, 21,234, 36,184,152,232, 78,156, 71,178,153,213,
+ 20,200,110,233, 16,178,105, 67, 34,155,194, 31, 76, 20,156, 11,161,166,129,170,203, 21,119,108,200,113,245, 5,141, 84,151,145,
+ 53, 52,174, 10,216,109, 53, 90,181, 75,181,121, 21, 49,209, 97,201, 74, 44, 66,112,222,219,151,206,242,206, 17, 59,144,196,164,
+136,141,171, 96, 2,164, 86,100, 74,241,213, 61, 86, 71, 48,203, 93,115,169, 99,124, 17,103, 59, 98, 48,181, 56,106,225,240, 62,
+ 84, 68,171, 17,162, 76, 25, 10, 46,203,202,211,237,138, 61, 88,136,172, 38, 6, 78,188,137,176, 82,164, 36,235,222,139,100,139,
+ 66, 21,197,249,182, 94,210,163, 65,245,157, 9,234,156,247,148,100,129, 46,234, 66,197,214, 22, 84,171,253,161,140,171, 15, 74,
+ 5,188,214,191,119, 73,238,169,251, 17,113,174, 90,206,212, 10, 25,139, 37,178,162,197,217,129,175,130,137,252,178,214,220, 98,
+181,214, 25,251,115,156, 15, 22, 85, 95, 59,254,152, 11,174, 30,192, 89,160, 75,178, 74, 14,203,154, 8,141,162, 99,162, 56, 83,
+ 56, 23,103,179, 14,201, 2,161,179, 18, 86, 70,252,210,168,214, 77,237,191, 43, 6, 67,132, 10, 71, 17, 99,147, 91, 88,200,136,
+250,174, 38,234,217, 37,228,162,146, 27,236,146,213,106,231,145,108,104,215,108, 99, 39, 45, 22,185, 26, 28, 44,162, 34, 4, 26,
+ 47,149,210,103,133, 93, 87,195, 22,114,174,221, 48,174,114,246,141,100, 21,196,108, 70, 41,103,196, 57,218,224, 45,238,180,113,
+248, 42,114,201, 20, 82,117,121,122, 49,113, 74, 94,238,177,188,160,161,144,146, 64, 95, 40, 19, 79,118,130,247,169,170, 78, 13,
+164,227,196,236,108, 77,129, 62, 23,154, 44,166, 90, 87,207, 88, 76, 84,168,222,226, 70,157,218, 37,232,156,224, 75,160, 31, 19,
+184,140,248, 14,209, 6, 29, 51, 89, 50,243, 26,214, 48,169, 95,244, 64, 66,188, 71,179, 89,233, 82, 28, 43,183,188, 37,248, 2,
+154,241, 98,130, 46, 84,151,225,137, 22, 38, 82,113,204, 82,215, 56,185,134,249, 40, 2,121,180,233, 78,201,132, 73,160,100,208,
+ 92,192, 5,130, 55, 76,177,211, 14,193,124,201,217,165,154,232,149,136, 37, 18,199, 66, 86, 99, 68,219,123, 87,104, 90,155,164,
+180,106,164,200, 28, 99,157, 90,100, 22, 37, 17,124,174, 26, 12,111,154,139,152,106,202,157,233, 53,214,167,155,140,100, 72,166,
+121,216,222, 57,197,154, 70,242,152, 88,156,156,172,222,167,152, 96,218, 65,170, 19,211, 18, 51, 49,143,108,174, 79,201, 76, 57,
+153,205,107, 17,108,237,215, 56,140,248,110,194,209,252, 21, 58,151,241,206,115,120,148, 89, 60,119, 17,209, 76, 27, 2, 71,253,
+130,227,131, 14,130,195, 75,166, 33, 32,141,199,139,195,133, 22, 21, 97,125,179, 65,143, 76, 33, 15,129, 38, 52, 8, 13,126, 18,
+200,162, 16, 90,156, 10, 27,205,148,172, 61,161,157,226,137, 38,190, 74, 74, 31,163, 41,135,221,210, 82, 90, 61,238,146, 76,172,
+ 25, 54,112,161,176, 54, 41,180, 34,132,110,100,109,205,132,167, 7,253,192,222,254, 17, 99, 63,162, 37, 17, 75,102, 28,109,247,
+154, 82,102, 28, 51,197,195, 65,127, 76,184, 62,199, 53,129,105,219,178,189, 97,163,243,145,166,198,185, 42,222, 43, 94,140, 27,
+191,125,243,237, 28,204, 18,177, 92, 67, 37,160, 41,211,199,196,167,191,250, 52,119,190,245, 33,238,125,224, 1,254,122, 9,124,
+226, 83, 79, 33, 26, 57,115,182, 53, 97, 89,201,140,243,194, 32,145,152, 51,101,176,243, 56,151, 76, 42,144, 98,164,100, 71,198,
+ 87,125, 14,140,217,147,179, 48,105,237,188, 78,117,215,219, 56, 76,215,226, 12, 2, 84, 74,229, 24,212, 65,154,111,166, 6, 84,
+201, 74,240, 22, 93,236, 75,107,235, 72, 64,187,140,138, 90, 92,183, 26,178, 54, 39,227, 6,148,100,142,129, 36, 74,201, 54,161,
+ 80,205, 72,177, 28, 15, 91, 85,216,236, 92,213, 49, 46,236,210,247,193, 86,156, 46,217, 10,215, 55, 2,165,193, 73,194,183, 54,
+213,243,171,148, 15,123,215, 68,151, 22, 50, 3, 6, 57, 64, 74, 38,136, 77, 7, 20,197, 21,143,115,230, 14,177,181,137, 61,196,
+ 6,228, 89,250,192,235,185, 46,230,148, 50,113,191, 86,139,122,205,195,168,235,100,239, 60, 78, 13, 72, 43,150, 79,100, 66,242,
+154, 75, 82, 42,126, 47,166,186, 79,207, 22,241, 45, 78, 8, 89,136,165, 78, 15,140,194, 98, 66,218, 26,160, 33, 85, 57,239,196,
+217,228,118,185,230,175,211,229,214, 9,114,238,246, 55,104,235,116,165,212,179, 29,144, 86,168,124,133,151, 84, 10,142, 23,219,
+111,228, 85, 74, 89,174,119,191,175, 54, 33, 27,125,218, 31, 83, 42, 76,224, 70,231,110,210,124, 27,203,216, 46,195,155, 32, 75,
+179,153,235,169, 10, 64,155, 35,152,117,209, 9, 90, 71,240,138, 89,209,124, 17, 8,222, 14,122,172,251,137,209,168, 82,246,225,
+218, 65,105, 30,119,169,254, 71, 95,139,143,234,232,211,202,224, 93,238,112,212,118, 88,158,170,160, 22,187, 40,114,205,132, 19,
+105,240, 90,139,154,229,128, 94,108,164, 98,202,247, 37, 88,160,170,251, 5,235, 62, 75,169, 75, 95, 91, 39,248,101,141,229,188,
+ 61, 52,206,255,255, 77,157, 75,139, 37, 69, 16,133, 79, 68,100,214,189,211,190, 6,231,225,204,232,128, 8, 34,184, 18,183,238,
+252,213,254, 1,119,110,213,133, 8,186, 17,193,141,142, 76,223,170,138,204, 8, 23, 39,170,218, 85, 67,211,208,175,170,204,120,
+156,243, 29, 10,166,160, 24,226, 53, 94, 21, 38, 20, 73, 98, 14,175,157, 84, 71,111, 2,175,127,174,246,165,252,138,173,148,249,
+220, 17, 29,213,247,169, 78,146,194, 14, 6, 5,100, 83, 38,105, 88, 9,184, 68, 41, 80, 75, 35, 1, 7,172, 65, 66,216, 37,198,
+118, 78, 23,178,188,145, 49,202,174, 82,104, 88,105,165, 32, 69,199,242,168, 67,179, 35,125, 32, 45, 17, 42, 72, 95, 57,109, 17,
+218,243,182,122,150,186, 4, 55, 36,141, 68, 59, 40,199, 87, 57,248, 51,183, 54,234, 91, 43,181,142, 98, 64, 36, 54,103, 72,202,
+ 16,238,160,150, 43, 93, 26,126,207,203, 98,233,236, 36,229,216,109,178,109, 97, 21, 95, 79, 46,145,152, 15,200, 98, 53, 57,115,
+ 14,124, 4,102, 52, 64,137, 7,102, 65,211, 8,223,176,134,244, 32,121,203, 26, 36, 43, 20, 99, 80,254,216,170, 27,154, 57,177,
+ 40,213,190, 3, 2,100, 67,196, 64,107, 70,142,128, 4,154, 49,101, 44,102, 98, 42, 99, 68,187, 5, 38, 40, 42,186,154,192, 35,
+152,197, 93,194,192, 24, 65, 4,170,112, 38, 52, 51, 96, 40,154,151, 37,196,147,190,233, 57,128, 14, 10,196, 60, 79, 34,149, 4,
+139,117, 15,118, 37,164,193, 49, 50,118,228,113,152,213,187, 32,129, 17, 43, 26, 26,139,128,224,251, 12,229,247, 9,163,240,210,
+ 55,199,182,222, 48, 99,167,214, 98,225,225, 57,198,196, 85, 3,210, 30,225,182, 15,228,220,185,178,177,134, 23, 47,158,226,238,
+238, 49,166, 7,110,111,254,196,239,127,252,133,155, 3, 47,158,127,132, 71,239,189, 3, 76,197,229,218,145,166,144, 80, 44,166,
+208, 46, 88,132,129, 62,189, 84,214,210, 13,125,161,200,113, 1, 69,141,104, 64, 95,174,184,235,244,105,239,201, 78, 85, 67,177,
+ 23,175, 32,125, 69,107,236,250,210,121,102,141, 57,207,206,175, 13,224, 30, 0,116,192, 60,225, 30,240,216,145, 38,167,182, 72,
+ 77,177, 99,208,159,126,227,185, 36, 25,240,233,136, 16, 12, 15,108,251,141, 35,247, 49,176,110, 43, 54,103,104, 78,235,132,170,
+220,223,110,216,239,111, 96,201,108,104, 6, 60,254,224,125, 92,222,125,138,125,191,135, 97,240,153, 58,210,234, 0, 60,121,249,
+ 2, 95,126,241, 26,159,125,250, 10, 63,253,252, 27,222,252,253, 15,150, 75,103,170,226,164,173, 43,149, 30,248,136, 64, 95, 26,
+238,218, 35,160, 37,214,109,197, 92,189, 4,135, 59,223, 53,101,179, 54,157, 92,122,215, 6,247, 1, 76,131, 87, 81, 46,214, 49,
+247,114,163,244, 36,179, 36,146,145, 55, 66, 33, 93,231, 6, 25, 30, 44, 8, 99,140, 18, 45,179, 25,202,242,200,107,146,111,130,
+ 3,104, 22,156, 94,248, 44, 97,116, 4, 11,131, 18,101, 19,106, 83,196,184, 26,211,103,204, 83,175, 64,191,248, 65,158,235, 21,
+112,194,102,139,206, 37,173, 0, 50,186, 11,154,150,230, 38,153,209, 17,189, 82,252,146,202,243, 17, 15, 65, 42, 25,138,136, 9,
+ 45, 40,137,227, 32,144, 22, 42,191,108,175,162,198,162, 82,178,142,220,226,229, 43,155,165,204,242,150,151,123,152, 22,248, 26,
+233, 11, 67,106,172,160, 69, 25, 65,187,175, 82,220,141, 6,152, 20, 1,180, 36,224,113, 82, 71, 42,122, 91,128,156, 92,127,165,
+ 0,242,252,245,103,217, 15,212, 30,180,186,204,146,106, 41, 21,229,140, 48, 52,138,204,216, 62,148, 23,139, 63,136,150,111, 48,
+165, 2, 35,106,212,130,164,245, 65,114,224, 48,124, 20,194,134, 31, 75, 68, 32,101, 91, 35, 30,190, 50,144, 85,207,172,117,126,
+221,177,219,160,226, 93, 0,132,105,197,208, 81,201, 42,162,116, 97, 24, 71,238,166, 28, 65, 31,126, 75, 42, 39,216,165, 74,240,
+ 79,147,149,156,131,170,122,154, 54, 70, 78,202, 1,224,121,200,244,157, 17, 36,157, 85, 42, 78,166,210,210,102,117, 83,228,172,
+ 24, 79,150, 10,140,205, 27,188,116,149, 42,109,148,173, 65,117,129, 40, 9, 68,170,244,182,241,240,101,241, 65,155, 28,125,166,
+ 99, 38,154,118,168, 82, 16,168, 10,160, 53,216, 89,229, 38,250,113,241,218,133,157, 97, 58,125,225,194,106, 53,208,208,154, 34,
+125,175, 64, 70,197,144, 9,193, 66, 15,111,173, 36, 18, 29,211, 55,168, 68,177,180,219,131, 24,228,172, 20, 5, 37,241,168,169,
+ 5, 47, 75, 51,131,161,115, 12, 39, 2,109, 87,104, 4, 34,189, 38, 65,220, 97, 91, 85,153,138,168,152, 92,242, 13, 22, 89, 32,
+145,216,146, 43, 25, 65,226,178, 24,124,196,233,141,190, 52,190,176, 35, 2, 22,137,222, 13, 35, 20, 57,248, 91,181, 14,126,110,
+ 70,173,126, 88, 56,101, 38, 53, 24, 57, 41,104,116,190, 8,158,252,123,170, 52,104, 35,169,110, 34, 49,149,207,242,184,119,116,
+105,240,218,133, 55, 17,116, 3,246, 16,180, 34,235, 29,129, 33,237, 16, 9, 5, 57,250,172,191, 72, 78, 51,101, 58,215, 28, 19,
+150, 64,191,112,188, 56,182,193,181, 73, 5, 78,112, 4, 42, 20,125,166, 66, 26, 57,250, 45, 73,181,226,122,108, 47,251, 17,159,
+ 25,170, 99,121, 96, 70, 18, 92,132,166,152,251,198, 78, 41,152,225,189,198, 10,137,138,107,172,125,107,179, 14,157, 66, 30,120,
+ 30, 43, 48,250,172,103,240,125, 60,231, 82,166, 76, 1, 27, 1, 91, 20, 97,128,140,192,186, 13, 24, 38,145,186, 49, 32, 50, 17,
+131,100, 51, 31, 94, 72,105,224,237,253,142,102, 13,159,188,122,205, 93,110,118,124,251,205, 87,248,245,151, 31,241,221,247, 63,
+224,195,103, 31,227,114,119, 69, 14,170,166, 69, 5, 54, 19,166, 29, 48, 66,113, 76, 27,236,194,194,185, 47, 68,159,154, 24, 46,
+ 11, 17,182, 98,156,234,221, 93, 47,212,128,216, 21, 88, 58,252,237,134,136,149, 16,146, 69,208, 50,176, 72, 98, 15, 67, 88,194,
+ 60,177,152,226,182, 79,226,178,141,221,105, 43,245,122,143, 6, 55, 94,202,195, 57, 65,139,160, 16, 48,110,117,248,254,239, 98,
+ 72,153, 24,251,138, 8, 96, 12, 96, 93,223, 98,250,196,190, 77,184,111,248,119,223, 24,219,234,142,183,235, 13,155, 15, 54, 21,
+203, 21, 51, 8, 29,233,151,142,222, 13, 10,171, 9, 90, 98,236,142,125, 50, 64,234,235,207, 95,226,201,211,103, 12, 21,154,206,
+204,251,203, 5,161, 19,195, 3,178, 57, 90, 87, 76, 91, 48, 66, 17,219, 14,228, 32, 67,220, 12,195, 3, 41,137, 46,197,198, 7,
+ 65, 99,185, 57,167, 77,197, 83,245, 32,142, 84, 58, 67,181,124,212,121, 39,134, 61,192, 20, 64, 34,213,224,147,194,186, 0,233,
+117, 82,209,161, 82,241, 48, 86,205,222, 60, 8,165,117,246, 11,120,121, 19, 75, 59,153,107, 49,179,168,160,147,133, 56, 33, 21,
+149,246, 29,213,107,242,121,214, 0,208,137,133,205,164, 83,202, 14,135,185,234,185,186,109,198,119, 88, 68, 79, 49,114, 36, 96,
+ 89,120,107, 86,229,216,133,151,242,220,198,131,147, 73,170,161, 19, 54, 5, 40,235,154,158, 1,101,165,164,175,112, 45,137, 35,
+222,249, 48,106,101, 53,181, 21, 13, 94, 93,182,130,139,243, 84,174,142,219, 65,116, 85, 78,141,180, 26, 66, 20, 13, 50,148,239,
+ 2,202,153,149, 73,180,114, 72, 32,162,225, 63,143, 52,168,208, 66, 34,213,237, 0, 0, 0, 0, 73, 69, 78, 68,174, 66, 96,130,
0};
diff --git a/source/blender/editors/datafiles/startup.blend.c b/source/blender/editors/datafiles/startup.blend.c
index 177fe320ed7..133e92409d3 100644
--- a/source/blender/editors/datafiles/startup.blend.c
+++ b/source/blender/editors/datafiles/startup.blend.c
@@ -1,16 +1,13 @@
/* DataToC output of file <startup_blend> */
-int datatoc_startup_blend_size= 358796;
-char datatoc_startup_blend[]= {
- 66, 76, 69, 78, 68, 69, 82, 45,118, 50, 54, 50,
- 82, 69, 78, 68, 32, 0, 0, 0, 56,211, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,250, 0, 0, 0,
- 83, 99,101,110,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 76, 79, 66, 48, 4, 0, 0,
-224,206, 35, 0, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 32, 32, 32, 51, 3, 0, 0, 0,250, 0, 0, 0, 1, 0, 0, 1,
-248, 9,215, 3, 0, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 0, 16, 0, 0,128, 32, 4, 0,126,176, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+int datatoc_startup_blend_size = 373072;
+char datatoc_startup_blend[] = {
+ 66, 76, 69, 78, 68, 69, 82, 45,118, 50, 54, 51, 82, 69, 78, 68,
+ 72, 0, 0, 0, 64,178,119, 2,255,127, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,250, 0, 0, 0, 83, 99,101,110,
+101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 76, 79, 66,
+ 48, 4, 0, 0, 80,174,119, 2,255,127, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 32, 32, 32, 50, 2, 0, 0, 0,250, 0, 0, 0,
+ 1, 0, 0, 1,120,141, 16, 7, 0, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 0, 16, 0, 0,128, 32, 4, 0, 29,180, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -39,471 +36,475 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 87, 77, 0, 0, 88, 1, 0, 0, 8, 78,210, 3, 0, 0, 0, 0,146, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 77, 87,105,110, 77, 97,110,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,122,199, 3, 0, 0, 0, 0, 56,122,199, 3, 0, 0, 0, 0,
- 56,122,199, 3, 0, 0, 0, 0, 56,122,199, 3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,232, 89,178, 3, 0, 0, 0, 0,
-120, 93,178, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136, 60,171, 3, 0, 0, 0, 0,
-104,164,152, 15, 0, 0, 0, 0, 16, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120, 58,171, 3, 0, 0, 0, 0,120, 58,171, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 86,178, 3, 0, 0, 0, 0,184, 88,178, 3, 0, 0, 0, 0,
- 88, 86,178, 3, 0, 0, 0, 0,136, 87,178, 3, 0, 0, 0, 0,184, 88,178, 3, 0, 0, 0, 0,232,255,210, 3, 0, 0, 0, 0,
-232,255,210, 3, 0, 0, 0, 0,232,255,210, 3, 0, 0, 0, 0, 68, 65, 84, 65, 0, 1, 0, 0, 56,122,199, 3, 0, 0, 0, 0,
-147, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93,198, 3, 0, 0, 0, 0,
- 1, 0, 0, 0, 0, 0, 0, 0,248, 9,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,115, 99,114,101,101,110, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 78, 0, 70, 5,178, 2,
- 0, 0, 0, 0, 1, 0,238, 3, 0, 0, 0, 0, 1, 0, 0, 0,152,127,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,136, 39,205, 15, 0, 0, 0, 0,152, 0,212, 15, 0, 0, 0, 0,
-168,255,211, 15, 0, 0, 0, 0,104, 12,163, 3, 0, 0, 0, 0, 56, 9,163, 3, 0, 0, 0, 0, 88, 11,163, 3, 0, 0, 0, 0,
- 88, 11,163, 3, 0, 0, 0, 0,152, 84,171, 3, 0, 0, 0, 0,120,149,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 83, 78, 0, 0, 8, 1, 0, 0,136, 7,214, 3, 0, 0, 0, 0,210, 0, 0, 0, 1, 0, 0, 0,
- 8,156,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 83, 82, 65,110,105,109, 97,116,105,111,110, 0, 46, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168, 9,201, 3, 0, 0, 0, 0,
- 72, 20,201, 3, 0, 0, 0, 0,184, 88,171, 3, 0, 0, 0, 0,248,107,171, 3, 0, 0, 0, 0, 24, 9,214, 3, 0, 0, 0, 0,
-248,150,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,168, 9,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,
- 72, 10,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 32, 0, 0, 0, 72, 10,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,232, 10,201, 3, 0, 0, 0, 0,
-168, 9,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,222, 2, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,
-232, 10,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,136, 11,201, 3, 0, 0, 0, 0, 72, 10,201, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,240, 4,222, 2, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,136, 11,201, 3, 0, 0, 0, 0,
-211, 0, 0, 0, 1, 0, 0, 0, 40, 12,201, 3, 0, 0, 0, 0,232, 10,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-240, 4, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 40, 12,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,
-200, 12,201, 3, 0, 0, 0, 0,136, 11,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,195, 2, 1, 0, 0, 0,
- 68, 65, 84, 65, 32, 0, 0, 0,200, 12,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,104, 13,201, 3, 0, 0, 0, 0,
- 40, 12,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4,195, 2, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,
-104, 13,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 8, 14,201, 3, 0, 0, 0, 0,200, 12,201, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 24, 4, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 8, 14,201, 3, 0, 0, 0, 0,
-211, 0, 0, 0, 1, 0, 0, 0,168, 14,201, 3, 0, 0, 0, 0,104, 13,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 24, 4,195, 2, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,168, 14,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,
- 72, 15,201, 3, 0, 0, 0, 0, 8, 14,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 4, 60, 1, 0, 0, 0, 0,
- 68, 65, 84, 65, 32, 0, 0, 0, 72, 15,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,232, 15,201, 3, 0, 0, 0, 0,
-168, 14,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 60, 1, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,
-232, 15,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,136, 16,201, 3, 0, 0, 0, 0, 72, 15,201, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,136, 16,201, 3, 0, 0, 0, 0,
-211, 0, 0, 0, 1, 0, 0, 0, 40, 17,201, 3, 0, 0, 0, 0,232, 15,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 24, 4, 88, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 40, 17,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,
-200, 17,201, 3, 0, 0, 0, 0,136, 16,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 1, 88, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 32, 0, 0, 0,200, 17,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,104, 18,201, 3, 0, 0, 0, 0,
- 40, 17,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 1,195, 2, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,
-104, 18,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 8, 19,201, 3, 0, 0, 0, 0,200, 17,201, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 8, 19,201, 3, 0, 0, 0, 0,
-211, 0, 0, 0, 1, 0, 0, 0,168, 19,201, 3, 0, 0, 0, 0,104, 18,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-192, 1, 4, 1, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,168, 19,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,
- 72, 20,201, 3, 0, 0, 0, 0, 8, 19,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 4, 60, 2, 0, 0, 0, 0,
- 68, 65, 84, 65, 32, 0, 0, 0, 72, 20,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-168, 19,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 60, 2, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
-184, 88,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,104, 89,171, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 72, 10,201, 3, 0, 0, 0, 0,232, 10,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
-104, 89,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 24, 90,171, 3, 0, 0, 0, 0,184, 88,171, 3, 0, 0, 0, 0,
- 72, 10,201, 3, 0, 0, 0, 0, 40, 12,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
- 24, 90,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,200, 90,171, 3, 0, 0, 0, 0,104, 89,171, 3, 0, 0, 0, 0,
-232, 10,201, 3, 0, 0, 0, 0,200, 12,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
-200, 90,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,120, 91,171, 3, 0, 0, 0, 0, 24, 90,171, 3, 0, 0, 0, 0,
- 40, 12,201, 3, 0, 0, 0, 0,200, 12,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
-120, 91,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 40, 92,171, 3, 0, 0, 0, 0,200, 90,171, 3, 0, 0, 0, 0,
-168, 9,201, 3, 0, 0, 0, 0,104, 13,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
- 40, 92,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,216, 92,171, 3, 0, 0, 0, 0,120, 91,171, 3, 0, 0, 0, 0,
-136, 11,201, 3, 0, 0, 0, 0,104, 13,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
-216, 92,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,136, 93,171, 3, 0, 0, 0, 0, 40, 92,171, 3, 0, 0, 0, 0,
-200, 12,201, 3, 0, 0, 0, 0, 8, 14,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
-136, 93,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 56, 94,171, 3, 0, 0, 0, 0,216, 92,171, 3, 0, 0, 0, 0,
-104, 13,201, 3, 0, 0, 0, 0,168, 14,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
- 56, 94,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,232, 94,171, 3, 0, 0, 0, 0,136, 93,171, 3, 0, 0, 0, 0,
-136, 11,201, 3, 0, 0, 0, 0, 72, 15,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
-232, 94,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,152, 95,171, 3, 0, 0, 0, 0, 56, 94,171, 3, 0, 0, 0, 0,
-168, 14,201, 3, 0, 0, 0, 0, 72, 15,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
-152, 95,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 72, 96,171, 3, 0, 0, 0, 0,232, 94,171, 3, 0, 0, 0, 0,
-168, 9,201, 3, 0, 0, 0, 0,232, 15,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
- 72, 96,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,248, 96,171, 3, 0, 0, 0, 0,152, 95,171, 3, 0, 0, 0, 0,
- 8, 14,201, 3, 0, 0, 0, 0,136, 16,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
-248, 96,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,168, 97,171, 3, 0, 0, 0, 0, 72, 96,171, 3, 0, 0, 0, 0,
-104, 13,201, 3, 0, 0, 0, 0,136, 16,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
-168, 97,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 88, 98,171, 3, 0, 0, 0, 0,248, 96,171, 3, 0, 0, 0, 0,
-232, 15,201, 3, 0, 0, 0, 0,136, 16,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
- 88, 98,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 8, 99,171, 3, 0, 0, 0, 0,168, 97,171, 3, 0, 0, 0, 0,
-232, 15,201, 3, 0, 0, 0, 0, 40, 17,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
- 8, 99,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,184, 99,171, 3, 0, 0, 0, 0, 88, 98,171, 3, 0, 0, 0, 0,
-136, 16,201, 3, 0, 0, 0, 0, 40, 17,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
-184, 99,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,104,100,171, 3, 0, 0, 0, 0, 8, 99,171, 3, 0, 0, 0, 0,
- 40, 12,201, 3, 0, 0, 0, 0,200, 17,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
-104,100,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 24,101,171, 3, 0, 0, 0, 0,184, 99,171, 3, 0, 0, 0, 0,
- 8, 14,201, 3, 0, 0, 0, 0,200, 17,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
- 24,101,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,200,101,171, 3, 0, 0, 0, 0,104,100,171, 3, 0, 0, 0, 0,
- 40, 17,201, 3, 0, 0, 0, 0,200, 17,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
-200,101,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,120,102,171, 3, 0, 0, 0, 0, 24,101,171, 3, 0, 0, 0, 0,
-232, 15,201, 3, 0, 0, 0, 0,104, 18,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
-120,102,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 40,103,171, 3, 0, 0, 0, 0,200,101,171, 3, 0, 0, 0, 0,
- 40, 17,201, 3, 0, 0, 0, 0, 8, 19,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
- 40,103,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,216,103,171, 3, 0, 0, 0, 0,120,102,171, 3, 0, 0, 0, 0,
-104, 18,201, 3, 0, 0, 0, 0, 8, 19,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
-216,103,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,136,104,171, 3, 0, 0, 0, 0, 40,103,171, 3, 0, 0, 0, 0,
-168, 14,201, 3, 0, 0, 0, 0,168, 19,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
-136,104,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 56,105,171, 3, 0, 0, 0, 0,216,103,171, 3, 0, 0, 0, 0,
- 8, 14,201, 3, 0, 0, 0, 0,168, 19,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
- 56,105,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,232,105,171, 3, 0, 0, 0, 0,136,104,171, 3, 0, 0, 0, 0,
-200, 12,201, 3, 0, 0, 0, 0, 72, 20,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
-232,105,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,152,106,171, 3, 0, 0, 0, 0, 56,105,171, 3, 0, 0, 0, 0,
- 72, 15,201, 3, 0, 0, 0, 0, 72, 20,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
-152,106,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 72,107,171, 3, 0, 0, 0, 0,232,105,171, 3, 0, 0, 0, 0,
-168, 19,201, 3, 0, 0, 0, 0, 72, 20,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
- 72,107,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,248,107,171, 3, 0, 0, 0, 0,152,106,171, 3, 0, 0, 0, 0,
- 40, 12,201, 3, 0, 0, 0, 0,104, 18,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
-248,107,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,107,171, 3, 0, 0, 0, 0,
-200, 17,201, 3, 0, 0, 0, 0, 8, 19,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,
- 24, 9,214, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 56, 10,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 40, 12,201, 3, 0, 0, 0, 0, 72, 10,201, 3, 0, 0, 0, 0,232, 10,201, 3, 0, 0, 0, 0,200, 12,201, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0,196, 2, 0, 0,222, 2, 0, 0, 7, 7,241, 4, 27, 0, 1, 0,
- 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152,197,207, 3, 0, 0, 0, 0,152,197,207, 3, 0, 0, 0, 0,
-136,221,175, 3, 0, 0, 0, 0, 56,223,175, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,136,221,175, 3, 0, 0, 0, 0,
-215, 0, 0, 0, 1, 0, 0, 0, 56,223,175, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,148, 68,
- 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 32,158, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0,
- 0, 0, 0, 0, 25, 0, 0, 0, 0, 0,158, 68, 0, 0,200, 65, 0, 0,158, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,241, 4, 26, 0,241, 4, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0,196, 2, 0, 0,221, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,241, 4, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 56,223,175, 3, 0, 0, 0, 0,
-215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136,221,175, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,240,109, 69,
- 0, 0,128,192, 0, 0, 0, 0, 0, 0, 0, 0,255,255,109, 69, 0, 0, 0,192, 0, 0, 0, 0,112, 7, 0, 0,129, 7, 0, 0,
- 18, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0,
- 18, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 2, 0, 0, 0, 1, 0, 3, 3, 2, 0, 0, 4, 10, 0,129, 7, 2, 0,112, 7, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,222, 2, 0, 0,222, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, 56, 10,214, 3, 0, 0, 0, 0,
-214, 0, 0, 0, 1, 0, 0, 0, 88, 11,214, 3, 0, 0, 0, 0, 24, 9,214, 3, 0, 0, 0, 0,104, 13,201, 3, 0, 0, 0, 0,
-168, 14,201, 3, 0, 0, 0, 0, 72, 15,201, 3, 0, 0, 0, 0,136, 11,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 25, 4, 0, 0,240, 4, 0, 0, 0, 0, 0, 0, 59, 1, 0, 0, 4, 4,216, 0, 60, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,184,123,199, 3, 0, 0, 0, 0,184,123,199, 3, 0, 0, 0, 0,232,224,175, 3, 0, 0, 0, 0,
-152,226,175, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,232,224,175, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,
-152,226,175, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,148, 67, 0, 0, 0, 0, 0, 0,208, 65,
- 98, 39, 38, 54, 0, 0, 88, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,215, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0,
- 0, 0, 87, 67, 0, 0,200, 65, 0, 0, 87, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3,
- 4, 0, 12, 0, 10, 0,216, 0, 26, 0,216, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 25, 4, 0, 0,240, 4, 0, 0, 34, 1, 0, 0, 59, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-216, 0, 26, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 87, 77, 0, 0, 88, 1, 0, 0, 24,186, 15, 7, 0, 0, 0, 0,146, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 77, 87,105,
+110, 77, 97,110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,152,226,175, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,232,224,175, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 67, 0, 0, 61,196, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 71, 67, 1, 0,145,195, 0, 0, 0, 0,199, 0, 0, 0,216, 0, 0, 0, 0, 0, 0, 0, 33, 1, 0, 0,
- 0, 0, 0, 0, 62, 1, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,198, 0, 0, 0, 0, 0, 0, 0, 33, 1, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 1, 0, 0, 1, 0, 7, 0,
- 18, 0, 0, 4, 6, 0,216, 0, 34, 1,199, 0, 34, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 25, 4, 0, 0,240, 4, 0, 0, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-216, 0, 34, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 51,214, 3, 0, 0, 0, 0,
-216, 71,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 56, 51,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,
- 24, 53,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 66, 85, 84, 84, 79, 78, 83, 95, 80, 84, 95, 99,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184,187, 15, 7, 0, 0, 0, 0,184,187, 15, 7,
+ 0, 0, 0, 0,184,187, 15, 7, 0, 0, 0, 0,184,187, 15, 7, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 88,185,237, 6,
+ 0, 0, 0, 0, 88,185,237, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 74, 65, 8,
+ 0, 0, 0, 0,168, 15, 55, 8, 0, 0, 0, 0, 16, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,216,199, 54, 8,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 66, 85, 84, 84, 79, 78, 83, 95, 80, 84, 95, 99,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 67,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,248, 21, 7, 0, 0, 0, 0, 8,250, 21, 7,
+ 0, 0, 0, 0, 40,248, 21, 7, 0, 0, 0, 0, 24,249, 21, 7, 0, 0, 0, 0, 8,250, 21, 7, 0, 0, 0, 0, 56,151, 21, 7,
+ 0, 0, 0, 0,216,199, 54, 8, 0, 0, 0, 0, 56,151, 21, 7, 0, 0, 0, 0, 68, 65, 84, 65, 0, 1, 0, 0,184,187, 15, 7,
+ 0, 0, 0, 0,147, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,250, 21, 7,
+ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,120,141, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,115, 99,114,101,
+101,110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 25, 0,
+ 62, 6, 98, 4, 0, 0, 0, 0, 1, 0,238, 3, 0, 0, 0, 0, 1, 0, 0, 0, 24,181, 31, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,248,228, 31, 7, 0, 0, 0, 0, 72,215, 65, 8,
+ 0, 0, 0, 0, 72,215, 65, 8, 0, 0, 0, 0, 88,183, 31, 7, 0, 0, 0, 0,200,158, 31, 7, 0, 0, 0, 0,216,181, 31, 7,
+ 0, 0, 0, 0,216,181, 31, 7, 0, 0, 0, 0,248, 76, 53, 8, 0, 0, 0, 0, 24,237, 31, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 78, 0, 0, 8, 1, 0, 0, 8,189, 15, 7, 0, 0, 0, 0,210, 0, 0, 0,
+ 1, 0, 0, 0,248, 32, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 83, 82, 65,110,105,109, 97,116,105,111,110, 0, 46, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,132, 15, 7,
+ 0, 0, 0, 0,232,196, 15, 7, 0, 0, 0, 0, 88,197, 15, 7, 0, 0, 0, 0,152,209, 15, 7, 0, 0, 0, 0, 8,210, 15, 7,
+ 0, 0, 0, 0, 40, 23, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,189, 18, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 56,132, 15, 7, 0, 0, 0, 0,211, 0, 0, 0,
+ 1, 0, 0, 0,168,132, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,168,132, 15, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 88,190, 15, 7,
+ 0, 0, 0, 0, 56,132, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,222, 2, 0, 0, 0, 0, 68, 65, 84, 65,
+ 32, 0, 0, 0, 88,190, 15, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,200,190, 15, 7, 0, 0, 0, 0,168,132, 15, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4,222, 2, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,200,190, 15, 7,
+ 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 56,191, 15, 7, 0, 0, 0, 0, 88,190, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,240, 4, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 56,191, 15, 7, 0, 0, 0, 0,211, 0, 0, 0,
+ 1, 0, 0, 0,168,191, 15, 7, 0, 0, 0, 0,200,190, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,195, 2,
+ 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,168,191, 15, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 24,192, 15, 7,
+ 0, 0, 0, 0, 56,191, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4,195, 2, 1, 0, 0, 0, 68, 65, 84, 65,
+ 32, 0, 0, 0, 24,192, 15, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,136,192, 15, 7, 0, 0, 0, 0,168,191, 15, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 4, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,136,192, 15, 7,
+ 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,248,192, 15, 7, 0, 0, 0, 0, 24,192, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 24, 4,195, 2, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,248,192, 15, 7, 0, 0, 0, 0,211, 0, 0, 0,
+ 1, 0, 0, 0,104,193, 15, 7, 0, 0, 0, 0,136,192, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 4, 60, 1,
+ 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,104,193, 15, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,216,193, 15, 7,
+ 0, 0, 0, 0,248,192, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 60, 1, 0, 0, 0, 0, 68, 65, 84, 65,
+ 32, 0, 0, 0,216,193, 15, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 72,194, 15, 7, 0, 0, 0, 0,104,193, 15, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 72,194, 15, 7,
+ 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,184,194, 15, 7, 0, 0, 0, 0,216,193, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 24, 4, 88, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,184,194, 15, 7, 0, 0, 0, 0,211, 0, 0, 0,
+ 1, 0, 0, 0, 40,195, 15, 7, 0, 0, 0, 0, 72,194, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 1, 88, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 40,195, 15, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,152,195, 15, 7,
+ 0, 0, 0, 0,184,194, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 1,195, 2, 1, 0, 0, 0, 68, 65, 84, 65,
+ 32, 0, 0, 0,152,195, 15, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 8,196, 15, 7, 0, 0, 0, 0, 40,195, 15, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 8,196, 15, 7,
+ 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,120,196, 15, 7, 0, 0, 0, 0,152,195, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,192, 1, 4, 1, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,120,196, 15, 7, 0, 0, 0, 0,211, 0, 0, 0,
+ 1, 0, 0, 0,232,196, 15, 7, 0, 0, 0, 0, 8,196, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 4, 60, 2,
+ 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,232,196, 15, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,120,196, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 60, 2, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 0, 0, 0, 88,197, 15, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,200,197, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,168,132, 15, 7, 0, 0, 0, 0, 88,190, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 0, 0, 0,200,197, 15, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 56,198, 15, 7, 0, 0, 0, 0, 88,197, 15, 7,
+ 0, 0, 0, 0,168,132, 15, 7, 0, 0, 0, 0, 56,191, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 0, 0, 0, 56,198, 15, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,168,198, 15, 7, 0, 0, 0, 0,200,197, 15, 7,
+ 0, 0, 0, 0, 88,190, 15, 7, 0, 0, 0, 0,168,191, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 0, 0, 0,168,198, 15, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 24,199, 15, 7, 0, 0, 0, 0, 56,198, 15, 7,
+ 0, 0, 0, 0, 56,191, 15, 7, 0, 0, 0, 0,168,191, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 0, 0, 0, 24,199, 15, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,136,199, 15, 7, 0, 0, 0, 0,168,198, 15, 7,
+ 0, 0, 0, 0, 56,132, 15, 7, 0, 0, 0, 0, 24,192, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 0, 0, 0,136,199, 15, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,248,199, 15, 7, 0, 0, 0, 0, 24,199, 15, 7,
+ 0, 0, 0, 0,200,190, 15, 7, 0, 0, 0, 0, 24,192, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 0, 0, 0,248,199, 15, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,104,200, 15, 7, 0, 0, 0, 0,136,199, 15, 7,
+ 0, 0, 0, 0,168,191, 15, 7, 0, 0, 0, 0,136,192, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 0, 0, 0,104,200, 15, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,216,200, 15, 7, 0, 0, 0, 0,248,199, 15, 7,
+ 0, 0, 0, 0, 24,192, 15, 7, 0, 0, 0, 0,248,192, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 0, 0, 0,216,200, 15, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 72,201, 15, 7, 0, 0, 0, 0,104,200, 15, 7,
+ 0, 0, 0, 0,200,190, 15, 7, 0, 0, 0, 0,104,193, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 0, 0, 0, 72,201, 15, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,184,201, 15, 7, 0, 0, 0, 0,216,200, 15, 7,
+ 0, 0, 0, 0,248,192, 15, 7, 0, 0, 0, 0,104,193, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 0, 0, 0,184,201, 15, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 40,202, 15, 7, 0, 0, 0, 0, 72,201, 15, 7,
+ 0, 0, 0, 0, 56,132, 15, 7, 0, 0, 0, 0,216,193, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 0, 0, 0, 40,202, 15, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,152,202, 15, 7, 0, 0, 0, 0,184,201, 15, 7,
+ 0, 0, 0, 0,136,192, 15, 7, 0, 0, 0, 0, 72,194, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 0, 0, 0,152,202, 15, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 8,203, 15, 7, 0, 0, 0, 0, 40,202, 15, 7,
+ 0, 0, 0, 0, 24,192, 15, 7, 0, 0, 0, 0, 72,194, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 0, 0, 0, 8,203, 15, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,120,203, 15, 7, 0, 0, 0, 0,152,202, 15, 7,
+ 0, 0, 0, 0,216,193, 15, 7, 0, 0, 0, 0, 72,194, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 0, 0, 0,120,203, 15, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,232,203, 15, 7, 0, 0, 0, 0, 8,203, 15, 7,
+ 0, 0, 0, 0,216,193, 15, 7, 0, 0, 0, 0,184,194, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 0, 0, 0,232,203, 15, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 88,204, 15, 7, 0, 0, 0, 0,120,203, 15, 7,
+ 0, 0, 0, 0, 72,194, 15, 7, 0, 0, 0, 0,184,194, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 0, 0, 0, 88,204, 15, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,200,204, 15, 7, 0, 0, 0, 0,232,203, 15, 7,
+ 0, 0, 0, 0, 56,191, 15, 7, 0, 0, 0, 0, 40,195, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 0, 0, 0,200,204, 15, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 56,205, 15, 7, 0, 0, 0, 0, 88,204, 15, 7,
+ 0, 0, 0, 0,136,192, 15, 7, 0, 0, 0, 0, 40,195, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 0, 0, 0, 56,205, 15, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,168,205, 15, 7, 0, 0, 0, 0,200,204, 15, 7,
+ 0, 0, 0, 0,184,194, 15, 7, 0, 0, 0, 0, 40,195, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 0, 0, 0,168,205, 15, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 24,206, 15, 7, 0, 0, 0, 0, 56,205, 15, 7,
+ 0, 0, 0, 0,216,193, 15, 7, 0, 0, 0, 0,152,195, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 0, 0, 0, 24,206, 15, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,136,206, 15, 7, 0, 0, 0, 0,168,205, 15, 7,
+ 0, 0, 0, 0,184,194, 15, 7, 0, 0, 0, 0, 8,196, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 0, 0, 0,136,206, 15, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,248,206, 15, 7, 0, 0, 0, 0, 24,206, 15, 7,
+ 0, 0, 0, 0,152,195, 15, 7, 0, 0, 0, 0, 8,196, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 0, 0, 0,248,206, 15, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,104,207, 15, 7, 0, 0, 0, 0,136,206, 15, 7,
+ 0, 0, 0, 0,248,192, 15, 7, 0, 0, 0, 0,120,196, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 0, 0, 0,104,207, 15, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,216,207, 15, 7, 0, 0, 0, 0,248,206, 15, 7,
+ 0, 0, 0, 0,136,192, 15, 7, 0, 0, 0, 0,120,196, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 0, 0, 0,216,207, 15, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 72,208, 15, 7, 0, 0, 0, 0,104,207, 15, 7,
+ 0, 0, 0, 0,168,191, 15, 7, 0, 0, 0, 0,232,196, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 0, 0, 0, 72,208, 15, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,184,208, 15, 7, 0, 0, 0, 0,216,207, 15, 7,
+ 0, 0, 0, 0,104,193, 15, 7, 0, 0, 0, 0,232,196, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 0, 0, 0,184,208, 15, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 40,209, 15, 7, 0, 0, 0, 0, 72,208, 15, 7,
+ 0, 0, 0, 0,120,196, 15, 7, 0, 0, 0, 0,232,196, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 0, 0, 0, 40,209, 15, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,152,209, 15, 7, 0, 0, 0, 0,184,208, 15, 7,
+ 0, 0, 0, 0, 56,191, 15, 7, 0, 0, 0, 0,152,195, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 0, 0, 0,152,209, 15, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,209, 15, 7,
+ 0, 0, 0, 0, 40,195, 15, 7, 0, 0, 0, 0, 8,196, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+160, 0, 0, 0, 8,210, 15, 7, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,216,213, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 56,191, 15, 7, 0, 0, 0, 0,168,132, 15, 7, 0, 0, 0, 0, 88,190, 15, 7, 0, 0, 0, 0,168,191, 15, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0,196, 2, 0, 0,222, 2, 0, 0, 7, 7,241, 4,
+ 27, 0, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,104, 32, 16, 7, 0, 0, 0, 0,104, 32, 16, 7,
+ 0, 0, 0, 0,248,210, 15, 7, 0, 0, 0, 0,104,212, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,248,210, 15, 7,
+ 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,104,212, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0,128,148, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 32,158, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+240, 4, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0,158, 68, 0, 0,200, 65, 0, 0,158, 68, 0, 0,200, 65, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,241, 4, 26, 0,241, 4, 26, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0,196, 2, 0, 0,221, 2, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,241, 4, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,104,212, 15, 7,
+ 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,210, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0,240,109, 69, 0, 0,128,192, 0, 0, 0, 0, 0, 0, 0, 0,255,255,109, 69, 0, 0, 0,192, 0, 0, 0, 0,112, 7, 0, 0,
+129, 7, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,
+111, 7, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 2, 0, 0, 0, 1, 0, 3, 3, 2, 0, 0, 4, 10, 0,129, 7, 2, 0,112, 7, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,222, 2, 0, 0,222, 2, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,220,255,199, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,216,213, 15, 7,
+ 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,104,238, 15, 7, 0, 0, 0, 0, 8,210, 15, 7, 0, 0, 0, 0, 24,192, 15, 7,
+ 0, 0, 0, 0,248,192, 15, 7, 0, 0, 0, 0,104,193, 15, 7, 0, 0, 0, 0,200,190, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 25, 4, 0, 0,240, 4, 0, 0, 0, 0, 0, 0, 59, 1, 0, 0, 4, 4,216, 0, 60, 1, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,237, 15, 7, 0, 0, 0, 0, 40,237, 15, 7, 0, 0, 0, 0,200,214, 15, 7,
+ 0, 0, 0, 0, 56,216, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,200,214, 15, 7, 0, 0, 0, 0,215, 0, 0, 0,
+ 1, 0, 0, 0, 56,216, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,148, 67, 0, 0, 0, 0,
+ 0, 0,208, 65, 98, 39, 38, 54, 0, 0, 88, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,215, 0, 0, 0, 0, 0, 0, 0,
+ 25, 0, 0, 0, 0, 0, 87, 67, 0, 0,200, 65, 0, 0, 87, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
+ 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,216, 0, 26, 0,216, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 25, 4, 0, 0,240, 4, 0, 0, 34, 1, 0, 0, 59, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,216, 0, 26, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,
- 24, 53,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,248, 54,214, 3, 0, 0, 0, 0, 56, 51,214, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,114,101,110,100,101,114,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,114,101,110,100,101,114,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 56,216, 15, 7, 0, 0, 0, 0,215, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,214, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 67, 0, 0, 61,196,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 71, 67, 1, 0,145,195, 0, 0, 0, 0,199, 0, 0, 0,216, 0, 0, 0, 0, 0, 0, 0,
+ 33, 1, 0, 0, 0, 0, 0, 0, 62, 1, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,198, 0, 0, 0, 0, 0, 0, 0,
+ 33, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 1, 0, 0,
+ 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,216, 0, 34, 1,199, 0, 34, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 25, 4, 0, 0,240, 4, 0, 0, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,216, 0, 34, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168,217, 15, 7,
+ 0, 0, 0, 0,136,235, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,168,217, 15, 7, 0, 0, 0, 0,213, 0, 0, 0,
+ 1, 0, 0, 0, 72,219, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 83, 95, 80, 84, 95, 99,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 83, 95, 80, 84, 95, 99,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,135,255,199, 0, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 67,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,220,255,199, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,248, 54,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,
-216, 56,214, 3, 0, 0, 0, 0, 24, 53,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 88, 1, 0, 0, 72,219, 15, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,232,220, 15, 7, 0, 0, 0, 0,168,217, 15, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,114,101,
+110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,114,101,
+110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82,101,110,100,101,114, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 76, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,135,255,199, 0, 61, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,111,255,199, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,232,220, 15, 7, 0, 0, 0, 0,213, 0, 0, 0,
+ 1, 0, 0, 0,136,222, 15, 7, 0, 0, 0, 0, 72,219, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,
-216, 56,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,184, 58,214, 3, 0, 0, 0, 0,248, 54,214, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,100,105,109,101,110,115,
-105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,100,105,109,101,110,115,
-105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140,254,199, 0,203, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 76, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,111,255,199, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,184, 58,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,
-152, 60,214, 3, 0, 0, 0, 0,216, 56,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 88, 1, 0, 0,136,222, 15, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 40,224, 15, 7, 0, 0, 0, 0,232,220, 15, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,100,105,
+109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,100,105,
+109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,105,109,101,110,115,105,111,110,115, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140,254,199, 0,203, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 65,110,116,105, 45, 65,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 58,254,199, 0, 58, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 40,224, 15, 7, 0, 0, 0, 0,213, 0, 0, 0,
+ 1, 0, 0, 0,200,225, 15, 7, 0, 0, 0, 0,136,222, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,
-152, 60,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,120, 62,214, 3, 0, 0, 0, 0,184, 58,214, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,109,111,116,105,111,110,
- 95, 98,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,109,111,116,105,111,110,
- 95, 98,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 97,109,112,108,101,100, 32, 77,111,116,105,111,110, 32, 66,
-108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,254,199, 0, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 65,110,116,105, 45, 65,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 58,254,199, 0, 58, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,120, 62,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,
- 88, 64,214, 3, 0, 0, 0, 0,152, 60,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 88, 1, 0, 0,200,225, 15, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,104,227, 15, 7, 0, 0, 0, 0, 40,224, 15, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,109,111,
+116,105,111,110, 95, 98,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,109,111,
+116,105,111,110, 95, 98,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 97,109,112,108,101,100, 32, 77,111,116,105,
+111,110, 32, 66,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,254,199, 0, 0, 0, 20, 0, 0, 0,
+ 4, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 83,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 10,254,199, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,104,227, 15, 7, 0, 0, 0, 0,213, 0, 0, 0,
+ 1, 0, 0, 0, 8,229, 15, 7, 0, 0, 0, 0,200,225, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,
- 88, 64,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 56, 66,214, 3, 0, 0, 0, 0,120, 62,214, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,101,114,102,111,114,
-109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,101,114,102,111,114,
-109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 83,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,242,253,199, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 10,254,199, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 56, 66,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,
- 24, 68,214, 3, 0, 0, 0, 0, 88, 64,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,111,115,116, 95,112,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 88, 1, 0, 0, 8,229, 15, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,168,230, 15, 7, 0, 0, 0, 0,104,227, 15, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,101,
+114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,101,
+114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,101,114,102,111,114,109, 97,110, 99,101, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,111,115,116, 95,112,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,242,253,199, 0, 0, 0, 0, 0, 0, 0,
+ 4, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 80,111,115,116, 32, 80,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,218,253,199, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,168,230, 15, 7, 0, 0, 0, 0,213, 0, 0, 0,
+ 1, 0, 0, 0, 72,232, 15, 7, 0, 0, 0, 0, 8,229, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,111,115,116, 95,112,114,111, 99,101,115,115,105,110,103, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,111,115,116, 95,112,114,111, 99,101,115,115,105,110,103, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,
- 24, 68,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,248, 69,214, 3, 0, 0, 0, 0, 56, 66,214, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,116, 97,109,112, 0,
+ 0, 0, 0, 0, 80,111,115,116, 32, 80,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,116, 97,109,112, 0,
+ 0, 0, 0, 0, 0, 0,218,253,199, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,194,253,199, 0, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 88, 1, 0, 0, 72,232, 15, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,232,233, 15, 7, 0, 0, 0, 0,168,230, 15, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,116,
+ 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,116,
+ 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,194,253,199, 0, 0, 0, 20, 0, 0, 0,
+ 4, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,248, 69,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,
-216, 71,214, 3, 0, 0, 0, 0, 24, 68,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,111,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,111,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,232,233, 15, 7, 0, 0, 0, 0,213, 0, 0, 0,
+ 1, 0, 0, 0,136,235, 15, 7, 0, 0, 0, 0, 72,232, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,111,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 79,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,111,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 40,253,199, 0,130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 79,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 40,253,199, 0,130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,
-216, 71,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 69,214, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 98, 97,107,101, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 98, 97,107,101, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 88, 1, 0, 0,136,235, 15, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,233, 15, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 98, 97,
+107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 98, 97,
+107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16,253,199, 0, 0, 0, 0, 0, 0, 0,
+ 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16,253,199, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0, 40,237, 15, 7, 0, 0, 0, 0,179, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0,184,123,199, 3, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255, 21, 0, 0,160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+160, 0, 0, 0,104,238, 15, 7, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 88,243, 15, 7, 0, 0, 0, 0,216,213, 15, 7,
+ 0, 0, 0, 0, 56,132, 15, 7, 0, 0, 0, 0,216,193, 15, 7, 0, 0, 0, 0, 72,194, 15, 7, 0, 0, 0, 0, 24,192, 15, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 4, 0, 0, 0, 0, 0, 0, 87, 0, 0, 0, 15, 15, 24, 4,
+ 88, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,242, 15, 7, 0, 0, 0, 0, 56,242, 15, 7,
+ 0, 0, 0, 0, 88,239, 15, 7, 0, 0, 0, 0,200,240, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 88,239, 15, 7,
+ 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,200,240, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 32,140, 68, 0, 0, 0, 0, 0, 0,208, 65, 39,182,158, 55, 0, 0,131, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 23, 4, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,224,130, 68, 0, 0,200, 65, 0,224,130, 68, 0, 0,200, 65, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 24, 4, 26, 0, 24, 4, 26, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 4, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 4, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-255, 21, 0, 0,160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,
- 88, 11,214, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,120, 12,214, 3, 0, 0, 0, 0, 56, 10,214, 3, 0, 0, 0, 0,
-168, 9,201, 3, 0, 0, 0, 0,232, 15,201, 3, 0, 0, 0, 0,136, 16,201, 3, 0, 0, 0, 0,104, 13,201, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 4, 0, 0, 0, 0, 0, 0, 87, 0, 0, 0, 15, 15, 24, 4, 88, 0, 1, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216, 92,200, 3, 0, 0, 0, 0,216, 92,200, 3, 0, 0, 0, 0,
- 72,228,175, 3, 0, 0, 0, 0,248,229,175, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 72,228,175, 3, 0, 0, 0, 0,
-215, 0, 0, 0, 1, 0, 0, 0,248,229,175, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,140, 68,
- 0, 0, 0, 0, 0, 0,208, 65, 39,182,158, 55, 0, 0,131, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 4, 0, 0,
- 0, 0, 0, 0, 25, 0, 0, 0, 0,224,130, 68, 0, 0,200, 65, 0,224,130, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 24, 4, 26, 0, 24, 4, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 4, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 24, 4, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,200,240, 15, 7,
+ 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,239, 15, 7, 0, 0, 0, 0, 0, 0, 64,192,
+ 0, 0,126, 67, 0, 0, 0, 0, 0, 0, 72, 66,112,189, 17,192,246, 70,125, 67, 0, 0, 0, 0, 0, 0, 72, 66, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 4, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,
+ 23, 4, 0, 0, 18, 0, 0, 0, 61, 0, 0, 0, 0, 0,128, 63, 0, 0, 72, 66, 0,124,146, 72, 0, 0, 72, 66,205,204,204, 61,
+ 0, 0, 32, 65, 72, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, 4, 8, 0, 24, 4, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 4, 0, 0, 26, 0, 0, 0, 87, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 4, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,248,229,175, 3, 0, 0, 0, 0,
-215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,228,175, 3, 0, 0, 0, 0, 0, 0, 64,192, 0, 0,126, 67,
- 0, 0, 0, 0, 0, 0, 72, 66,112,189, 17,192,246, 70,125, 67, 0, 0, 0, 0, 0, 0, 72, 66, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 4, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 23, 4, 0, 0,
- 18, 0, 0, 0, 61, 0, 0, 0, 0, 0,128, 63, 0, 0, 72, 66, 0,124,146, 72, 0, 0, 72, 66,205,204,204, 61, 0, 0, 32, 65,
- 72, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, 4, 8, 0, 24, 4, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 4, 0, 0, 26, 0, 0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 24, 4, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,208, 0, 0, 0, 56,242, 15, 7,
+ 0, 0, 0, 0,190, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,208, 0, 0, 0,216, 92,200, 3, 0, 0, 0, 0,
-190, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 68, 65, 84, 65,
+160, 0, 0, 0, 88,243, 15, 7, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 24,250, 15, 7, 0, 0, 0, 0,104,238, 15, 7,
+ 0, 0, 0, 0,248,192, 15, 7, 0, 0, 0, 0,120,196, 15, 7, 0, 0, 0, 0,232,196, 15, 7, 0, 0, 0, 0,104,193, 15, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 4, 0, 0,240, 4, 0, 0, 61, 1, 0, 0, 59, 2, 0, 0, 3, 3,216, 0,
+255, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,247, 15, 7, 0, 0, 0, 0, 40,247, 15, 7,
+ 0, 0, 0, 0, 72,244, 15, 7, 0, 0, 0, 0,184,245, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 72,244, 15, 7,
+ 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,184,245, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0,128,244, 67, 0, 0, 0, 0, 0, 0,208, 65, 98, 39, 38, 54, 0, 0, 88, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,
-120, 12,214, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 40, 14,214, 3, 0, 0, 0, 0, 88, 11,214, 3, 0, 0, 0, 0,
-168, 14,201, 3, 0, 0, 0, 0,168, 19,201, 3, 0, 0, 0, 0, 72, 20,201, 3, 0, 0, 0, 0, 72, 15,201, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 25, 4, 0, 0,240, 4, 0, 0, 61, 1, 0, 0, 59, 2, 0, 0, 3, 3,216, 0,255, 0, 1, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,255,208, 3, 0, 0, 0, 0, 40,255,208, 3, 0, 0, 0, 0,
-168,231,175, 3, 0, 0, 0, 0, 88,233,175, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,168,231,175, 3, 0, 0, 0, 0,
-215, 0, 0, 0, 1, 0, 0, 0, 88,233,175, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,244, 67,
- 0, 0, 0, 0, 0, 0,208, 65, 98, 39, 38, 54, 0, 0, 88, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,215, 0, 0, 0,
- 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 87, 67, 0, 0,200, 65, 0, 0, 87, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,216, 0, 26, 0,216, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 25, 4, 0, 0,240, 4, 0, 0, 34, 2, 0, 0, 59, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,216, 0, 26, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+215, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 87, 67, 0, 0,200, 65, 0, 0, 87, 67, 0, 0,200, 65, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,216, 0, 26, 0,216, 0, 26, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 4, 0, 0,240, 4, 0, 0, 34, 2, 0, 0, 59, 2, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216, 0, 26, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 88,233,175, 3, 0, 0, 0, 0,
-215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168,231,175, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,141, 67,
- 0, 0,244,194, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 67, 0, 0, 83,195, 0, 0, 0, 0,199, 0, 0, 0,216, 0, 0, 0,
- 18, 0, 0, 0,228, 0, 0, 0, 0, 0, 0, 0,198, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,198, 0, 0, 0,
- 18, 0, 0, 0,228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 18, 2, 0, 0, 2, 0, 3, 3, 0, 0, 12, 4, 6, 0,216, 0,229, 0,199, 0,211, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 25, 4, 0, 0,240, 4, 0, 0, 61, 1, 0, 0, 33, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,216, 0,229, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,184,245, 15, 7,
+ 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,244, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0,128,141, 67, 0, 0,244,194, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 67, 0, 0, 83,195, 0, 0, 0, 0,199, 0, 0, 0,
+216, 0, 0, 0, 18, 0, 0, 0,228, 0, 0, 0, 0, 0, 0, 0,198, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,
+198, 0, 0, 0, 18, 0, 0, 0,228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 18, 2, 0, 0, 2, 0, 3, 3, 0, 0, 12, 4, 6, 0,216, 0,229, 0,199, 0,211, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 4, 0, 0,240, 4, 0, 0, 61, 1, 0, 0, 33, 2, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216, 0,229, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 1, 0, 0, 40,255,208, 3, 0, 0, 0, 0,
-183, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 1, 0, 0, 40,247, 15, 7,
+ 0, 0, 0, 0,183, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-152, 13,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
- 68, 65, 84, 65, 16, 0, 0, 0,152, 13,214, 3, 0, 0, 0, 0,237, 0, 0, 0, 1, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0,
-248, 30,199, 3, 0, 0, 0, 0, 68, 65, 84, 65,224, 0, 0, 0,248, 30,199, 3, 0, 0, 0, 0,236, 0, 0, 0, 14, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 1, 0,168,194,217, 3, 0, 0, 0, 0, 19, 0, 0, 0, 1, 0, 1, 0,168,194,217, 3, 0, 0, 0, 0,
- 20, 0, 0, 0, 1, 0, 1, 0,168,194,217, 3, 0, 0, 0, 0, 21, 0, 1, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 1, 0, 24, 51,163, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,184,219,217, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 1, 0,136, 48,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,152, 7,218, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 1, 0,216, 29,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,168,225,217, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 1, 0,120,209,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,200,213,217, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 1, 0, 24, 98,200, 3, 0, 0, 0, 0, 21, 0, 0, 0, 1, 0, 1, 0,168,194,217, 3, 0, 0, 0, 0,
- 68, 65, 84, 65,160, 0, 0, 0, 40, 14,214, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 72, 15,214, 3, 0, 0, 0, 0,
-120, 12,214, 3, 0, 0, 0, 0, 40, 17,201, 3, 0, 0, 0, 0,200, 17,201, 3, 0, 0, 0, 0, 8, 14,201, 3, 0, 0, 0, 0,
-136, 16,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,193, 1, 0, 0, 23, 4, 0, 0, 89, 0, 0, 0,194, 2, 0, 0,
- 1, 1, 87, 2,106, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184, 73,214, 3, 0, 0, 0, 0,
-184, 73,214, 3, 0, 0, 0, 0, 8,235,175, 3, 0, 0, 0, 0, 72, 88,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,
- 8,235,175, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 56, 83,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 64,113, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,192, 21, 68, 0, 0, 0, 0, 0, 0,208, 65,
+ 0, 0, 0, 0,136,248, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 86, 2, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128, 21, 68, 0, 0,200, 65, 0,128, 21, 68, 0, 0,200, 65,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 87, 2, 26, 0, 87, 2, 26, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,193, 1, 0, 0, 23, 4, 0, 0, 89, 0, 0, 0,114, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 2, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 68, 65, 84, 65, 16, 0, 0, 0,136,248, 15, 7, 0, 0, 0, 0,237, 0, 0, 0, 1, 0, 0, 0, 14, 0, 0, 0,
+ 14, 0, 0, 0,232,248, 15, 7, 0, 0, 0, 0, 68, 65, 84, 65,224, 0, 0, 0,232,248, 15, 7, 0, 0, 0, 0,236, 0, 0, 0,
+ 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,200,189, 18, 7, 0, 0, 0, 0, 19, 0, 0, 0, 1, 0, 1, 0,200,189, 18, 7,
+ 0, 0, 0, 0, 20, 0, 0, 0, 1, 0, 1, 0,200,189, 18, 7, 0, 0, 0, 0, 21, 0, 1, 0, 1, 0, 0, 0,200,189, 18, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,120,216, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,232,225, 18, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,136, 24, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,200,239, 18, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,216, 5, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 40,233, 18, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,184,211, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 72,219, 18, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,168,210, 18, 7, 0, 0, 0, 0, 21, 0, 0, 0, 1, 0, 1, 0,200,189, 18, 7,
+ 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, 24,250, 15, 7, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,168, 7, 16, 7,
+ 0, 0, 0, 0, 88,243, 15, 7, 0, 0, 0, 0,184,194, 15, 7, 0, 0, 0, 0, 40,195, 15, 7, 0, 0, 0, 0,136,192, 15, 7,
+ 0, 0, 0, 0, 72,194, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,193, 1, 0, 0, 23, 4, 0, 0, 89, 0, 0, 0,
+194, 2, 0, 0, 1, 1, 87, 2,106, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 5, 16, 7,
+ 0, 0, 0, 0,248, 5, 16, 7, 0, 0, 0, 0, 8,251, 15, 7, 0, 0, 0, 0,200, 0, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0, 8,251, 15, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,120,252, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,113, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,192, 21, 68, 0, 0, 0, 0,
+ 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 86, 2, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128, 21, 68, 0, 0,200, 65, 0,128, 21, 68,
+ 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 87, 2, 26, 0, 87, 2,
+ 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,193, 1, 0, 0, 23, 4, 0, 0, 89, 0, 0, 0,
+114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 2, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,
- 56, 83,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,232, 84,214, 3, 0, 0, 0, 0, 8,235,175, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 15, 67, 0, 64, 70,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67,255,127, 70,196, 0, 0, 0, 0,
-143, 0, 0, 0,160, 0, 0, 0, 18, 0, 0, 0, 43, 3, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0,
- 0, 0, 0, 0,142, 0, 0, 0, 18, 0, 0, 0, 43, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,160, 0, 44, 3,143, 0, 26, 3, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,193, 1, 0, 0,193, 1, 0, 0,115, 0, 0, 0,194, 2, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 80, 2, 0, 0, 5, 0, 3, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0,120,252, 15, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,232,253, 15, 7, 0, 0, 0, 0, 8,251, 15, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67, 0, 64, 70,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67,255,127, 70,196,
+ 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 18, 0, 0, 0, 43, 3, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0,
+ 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 18, 0, 0, 0, 43, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,160, 0, 44, 3,143, 0,
+ 26, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,193, 1, 0, 0,193, 1, 0, 0,115, 0, 0, 0,
+194, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 80, 2, 0, 0, 5, 0, 3, 0, 1, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,
-232, 84,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,152, 86,214, 3, 0, 0, 0, 0, 56, 83,214, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 16, 67, 0, 0,206,194, 0, 0, 0, 0, 0, 0, 0, 0,231,102, 16, 67, 0, 0,206,194, 0, 0, 0, 0,
-143, 0, 0, 0,160, 0, 0, 0, 18, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0,
- 0, 0, 0, 0,142, 0, 0, 0, 18, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,160, 0,120, 0,143, 0,102, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,193, 1, 0, 0,193, 1, 0, 0,115, 0, 0, 0,115, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 6, 0, 34, 0, 2, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0,232,253, 15, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 88,255, 15, 7, 0, 0, 0, 0,120,252, 15, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 67, 0, 0,206,194, 0, 0, 0, 0, 0, 0, 0, 0,231,102, 16, 67, 0, 0,206,194,
+ 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 18, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0,
+ 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 18, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,160, 0,120, 0,143, 0,
+102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,193, 1, 0, 0,193, 1, 0, 0,115, 0, 0, 0,
+115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 6, 0, 34, 0, 2, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,
-152, 86,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 72, 88,214, 3, 0, 0, 0, 0,232, 84,214, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 35, 67, 0,128, 96,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 67, 0,128, 96,196, 0, 0, 0, 0,
-163, 0, 0, 0,180, 0, 0, 0, 18, 0, 0, 0,147, 3, 0, 0, 0, 0, 0, 0,162, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0,
- 0, 0, 0, 0,162, 0, 0, 0, 18, 0, 0, 0,147, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,180, 0,148, 3,163, 0,130, 3, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 4, 0, 0, 23, 4, 0, 0,115, 0, 0, 0,194, 2, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0, 88,255, 15, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,200, 0, 16, 7, 0, 0, 0, 0,232,253, 15, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 67, 0,128, 96,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 67, 0,128, 96,196,
+ 0, 0, 0, 0,163, 0, 0, 0,180, 0, 0, 0, 18, 0, 0, 0,147, 3, 0, 0, 0, 0, 0, 0,162, 0, 0, 0, 0, 0, 0, 0,
+ 17, 0, 0, 0, 0, 0, 0, 0,162, 0, 0, 0, 18, 0, 0, 0,147, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,180, 0,148, 3,163, 0,
+130, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 4, 0, 0, 23, 4, 0, 0,115, 0, 0, 0,
+194, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 1, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,
- 72, 88,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152, 86,214, 3, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0,200, 0, 16, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,255, 15, 7,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,193, 1, 0, 0, 23, 4, 0, 0,115, 0, 0, 0,194, 2, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 2, 80, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,193, 1, 0, 0, 23, 4, 0, 0,115, 0, 0, 0,
+194, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 2, 80, 2, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,115,214, 3, 0, 0, 0, 0, 68, 65, 84, 65,112, 3, 0, 0,
- 8,115,214, 3, 0, 0, 0, 0,173, 0, 0, 0, 1, 0, 0, 0, 0, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,200,167,141, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 13,128,191, 0, 0,128,191,
- 0, 0, 0, 0, 0, 0, 0, 0, 74,215, 76,190, 0, 0, 0, 0, 68,239,209, 62, 51,177,205,190,184,158, 81, 63, 0, 0, 0, 0,
- 70,119,105, 63,143, 74, 70, 62, 35, 44,185,190, 0, 0, 0, 0,162, 84, 89,188,166, 33,101, 63, 42, 61,228, 62, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,214,211,111,193, 0, 0,128, 63, 69,239,209, 62, 70,119,105, 63,176, 84, 89,188, 0, 0, 0, 0,
- 53,177,205,190,142, 74, 70, 62,166, 33,101, 63, 0, 0, 0, 0,185,158, 81, 63, 35, 44,185,190, 43, 61,228, 62, 0, 0, 0, 0,
-164, 96, 68, 65,111,121,173,192,248,209,213, 64, 0, 0,128, 63,178,157,229, 62,209,162,227,190, 48,180, 81,191,184,158, 81,191,
-117, 90,127, 63, 13,114, 91, 62, 26, 63,185, 62, 35, 44,185, 62,145,180,109,188,105,147,125, 63,138, 84,228,190, 42, 61,228,190,
- 0, 0, 0, 0, 0, 0, 0, 0, 9,185,108, 65,214,211,111, 65, 99,240,191, 62,110,116, 85, 63, 64,185, 70,188, 0, 0, 82,180,
- 48,221,185,190, 44, 45, 51, 62, 28, 11, 79, 63, 0, 0, 56,179, 67,108,117,194,183,204,216, 65,105,156, 5,194,212,247,159,192,
-235, 62,114, 66, 59,254,213,193,158,225, 3, 66, 55, 8,160, 64, 68,239,209, 62, 51,177,205,190,184,158, 81, 63, 0, 0, 0, 0,
- 70,119,105, 63,143, 74, 70, 62, 35, 44,185,190, 0, 0, 0, 0,162, 84, 89,188,166, 33,101, 63, 42, 61,228, 62, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,214,211,111,193, 0, 0,128, 63,178,157,229, 62,209,162,227,190, 48,180, 81,191,184,158, 81,191,
-117, 90,127, 63, 13,114, 91, 62, 26, 63,185, 62, 35, 44,185, 62,145,180,109,188,105,147,125, 63,138, 84,228,190, 42, 61,228,190,
- 0, 0, 0, 0, 0, 0, 0, 0, 9,185,108, 65,214,211,111, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 2, 16, 7, 0, 0, 0, 0, 68, 65, 84, 65,
+112, 3, 0, 0, 56, 2, 16, 7, 0, 0, 0, 0,173, 0, 0, 0, 1, 0, 0, 0, 0, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,200,167,141, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 13,128,191,
+ 0, 0,128,191, 0, 0, 0, 0, 0, 0, 0, 0, 74,215, 76,190, 0, 0, 0, 0, 68,239,209, 62, 51,177,205,190,184,158, 81, 63,
+ 0, 0, 0, 0, 70,119,105, 63,143, 74, 70, 62, 35, 44,185,190, 0, 0, 0, 0,162, 84, 89,188,166, 33,101, 63, 42, 61,228, 62,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,214,211,111,193, 0, 0,128, 63, 69,239,209, 62, 70,119,105, 63,176, 84, 89,188,
+ 0, 0, 0, 0, 53,177,205,190,142, 74, 70, 62,166, 33,101, 63, 0, 0, 0, 0,185,158, 81, 63, 35, 44,185,190, 43, 61,228, 62,
+ 0, 0, 0, 0,164, 96, 68, 65,111,121,173,192,248,209,213, 64, 0, 0,128, 63,178,157,229, 62,209,162,227,190, 48,180, 81,191,
+184,158, 81,191,117, 90,127, 63, 13,114, 91, 62, 26, 63,185, 62, 35, 44,185, 62,145,180,109,188,105,147,125, 63,138, 84,228,190,
+ 42, 61,228,190, 0, 0, 0, 0, 0, 0, 0, 0, 9,185,108, 65,214,211,111, 65, 99,240,191, 62,110,116, 85, 63, 64,185, 70,188,
+ 0, 0, 82,180, 48,221,185,190, 44, 45, 51, 62, 28, 11, 79, 63, 0, 0, 56,179, 67,108,117,194,183,204,216, 65,105,156, 5,194,
+212,247,159,192,235, 62,114, 66, 59,254,213,193,158,225, 3, 66, 55, 8,160, 64, 68,239,209, 62, 51,177,205,190,184,158, 81, 63,
+ 0, 0, 0, 0, 70,119,105, 63,143, 74, 70, 62, 35, 44,185,190, 0, 0, 0, 0,162, 84, 89,188,166, 33,101, 63, 42, 61,228, 62,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,214,211,111,193, 0, 0,128, 63,178,157,229, 62,209,162,227,190, 48,180, 81,191,
+184,158, 81,191,117, 90,127, 63, 13,114, 91, 62, 26, 63,185, 62, 35, 44,185, 62,145,180,109,188,105,147,125, 63,138, 84,228,190,
+ 42, 61,228,190, 0, 0, 0, 0, 0, 0, 0, 0, 9,185,108, 65,214,211,111, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -511,691 +512,676 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12,163, 91, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 12,163, 91, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12,163, 91, 64, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 92, 62, 55, 63, 56,186,224,190,237,203,148,190, 3,236,234,190,
-214,211,111, 65,214,211,111, 65, 0, 0, 0, 0, 0, 0, 0, 0,236, 15, 72, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 1, 0, 0,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 32, 33, 12, 66, 86,152,137, 66,113, 27,126, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 96, 1, 0, 0,184, 73,214, 3, 0, 0, 0, 0,174, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 51, 51, 51, 63,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 32, 65,205,204, 76, 62, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0,200,213,217, 3, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12,163, 91, 64, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 12,163, 91, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12,163, 91, 64,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 92, 62, 55, 63, 56,186,224,190,237,203,148,190,
+ 3,236,234,190,214,211,111, 65,214,211,111, 65, 0, 0, 0, 0, 0, 0, 0, 0,236, 15, 72, 59, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,128, 63, 32, 33, 12, 66, 86,152,137, 66,113, 27,126, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 96, 1, 0, 0,248, 5, 16, 7, 0, 0, 0, 0,174, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
+ 51, 51, 51, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 32, 65,205,204, 76, 62, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0, 72,219, 18, 7,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 3, 0, 8, 8,128, 0, 0, 0, 12, 66,
- 0, 0,128, 63,205,204,204, 61, 0, 0,250, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 16, 0, 10, 0, 7, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 3, 0, 8, 8,128, 0,
+ 0, 0, 12, 66, 0, 0,128, 63,205,204,204, 61, 0, 0,250, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 10, 0, 7, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,
- 72, 15,214, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,104, 16,214, 3, 0, 0, 0, 0, 40, 14,214, 3, 0, 0, 0, 0,
-232, 15,201, 3, 0, 0, 0, 0,104, 18,201, 3, 0, 0, 0, 0, 8, 19,201, 3, 0, 0, 0, 0, 40, 17,201, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191, 1, 0, 0, 89, 0, 0, 0, 3, 1, 0, 0, 2, 2,192, 1,171, 0, 1, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,149,199, 3, 0, 0, 0, 0, 8,149,199, 3, 0, 0, 0, 0,
-248, 89,214, 3, 0, 0, 0, 0, 8, 95,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,248, 89,214, 3, 0, 0, 0, 0,
-215, 0, 0, 0, 1, 0, 0, 0,168, 91,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 89, 68,
- 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,224, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191, 1, 0, 0,
- 0, 0, 0, 0, 25, 0, 0, 0, 0,128,223, 67, 0, 0,200, 65, 0,128,223, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,192, 1, 26, 0,192, 1, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191, 1, 0, 0, 89, 0, 0, 0,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,192, 1, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+160, 0, 0, 0,168, 7, 16, 7, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 88, 16, 16, 7, 0, 0, 0, 0, 24,250, 15, 7,
+ 0, 0, 0, 0,216,193, 15, 7, 0, 0, 0, 0,152,195, 15, 7, 0, 0, 0, 0, 8,196, 15, 7, 0, 0, 0, 0,184,194, 15, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191, 1, 0, 0, 89, 0, 0, 0, 3, 1, 0, 0, 2, 2,192, 1,
+171, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 14, 16, 7, 0, 0, 0, 0, 88, 14, 16, 7,
+ 0, 0, 0, 0,152, 8, 16, 7, 0, 0, 0, 0,232, 12, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,152, 8, 16, 7,
+ 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 8, 10, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 64, 89, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,224, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+191, 1, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,223, 67, 0, 0,200, 65, 0,128,223, 67, 0, 0,200, 65, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,192, 1, 26, 0,192, 1, 26, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191, 1, 0, 0, 89, 0, 0, 0,114, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 1, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,168, 91,214, 3, 0, 0, 0, 0,
-215, 0, 0, 0, 1, 0, 0, 0, 88, 93,214, 3, 0, 0, 0, 0,248, 89,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 67,
- 0, 0,112,193, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 67, 0, 0,254,194, 0, 0, 0, 0,200, 0, 0, 0,217, 0, 0, 0,
- 18, 0, 0, 0,144, 0, 0, 0, 0, 0, 0, 0,199, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,199, 0, 0, 0,
- 18, 0, 0, 0,144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 10, 6, 0, 0, 2, 0, 3, 3, 0, 0, 0, 4, 6, 0,217, 0,145, 0,200, 0,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216, 0, 0, 0,115, 0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,217, 0,145, 0, 0, 0, 2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 8, 10, 16, 7,
+ 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,120, 11, 16, 7, 0, 0, 0, 0,152, 8, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 72, 67, 0, 0,112,193, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 67, 0, 0,254,194, 0, 0, 0, 0,200, 0, 0, 0,
+217, 0, 0, 0, 18, 0, 0, 0,144, 0, 0, 0, 0, 0, 0, 0,199, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,
+199, 0, 0, 0, 18, 0, 0, 0,144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 10, 6, 0, 0, 2, 0, 3, 3, 0, 0, 0, 4, 6, 0,217, 0,145, 0,200, 0,127, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216, 0, 0, 0,115, 0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,217, 0,145, 0, 0, 0, 2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 88, 93,214, 3, 0, 0, 0, 0,
-215, 0, 0, 0, 1, 0, 0, 0, 8, 95,214, 3, 0, 0, 0, 0,168, 91,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,120, 11, 16, 7,
+ 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,232, 12, 16, 7, 0, 0, 0, 0, 8, 10, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,191, 1, 0, 0,191, 1, 0, 0,115, 0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191, 1, 0, 0,191, 1, 0, 0,115, 0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 8, 95,214, 3, 0, 0, 0, 0,
-215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 93,214, 3, 0, 0, 0, 0, 0, 0, 16,193, 0, 0,130, 67,
- 0, 0,160,192, 0, 0,160, 64, 0, 0, 0, 0, 0, 0,122, 67, 0, 0, 16,193, 0, 0, 32, 65, 0, 0, 0, 0, 17, 0, 0, 0,
- 18, 0, 0, 0,144, 0, 0, 0, 18, 0, 0, 0,230, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0,230, 0, 0, 0,
- 18, 0, 0, 0,144, 0, 0, 0,111, 18,131, 58,111, 18,131, 58, 0,124,146, 72, 0, 80, 67, 71, 0, 0, 0, 0, 0, 0, 0, 0,
-105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0,231, 0,145, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,217, 0, 0, 0,191, 1, 0, 0,115, 0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,231, 0,145, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,232, 12, 16, 7,
+ 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120, 11, 16, 7, 0, 0, 0, 0, 0, 0, 16,193,
+ 0, 0,130, 67, 0, 0,160,192, 0, 0,160, 64, 0, 0, 0, 0, 0, 0,122, 67, 0, 0, 16,193, 0, 0, 32, 65, 0, 0, 0, 0,
+ 17, 0, 0, 0, 18, 0, 0, 0,144, 0, 0, 0, 18, 0, 0, 0,230, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0,
+230, 0, 0, 0, 18, 0, 0, 0,144, 0, 0, 0,111, 18,131, 58,111, 18,131, 58, 0,124,146, 72, 0, 80, 67, 71, 0, 0, 0, 0,
+ 0, 0, 0, 0,105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0,231, 0,145, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,217, 0, 0, 0,191, 1, 0, 0,115, 0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,231, 0,145, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,240, 0, 0, 0, 8,149,199, 3, 0, 0, 0, 0,
-178, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,240, 0, 0, 0, 88, 14, 16, 7,
+ 0, 0, 0, 0,178, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,119,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,112, 0, 0, 0,
- 40,119,214, 3, 0, 0, 0, 0, 37, 1, 0, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152, 15, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+112, 0, 0, 0,152, 15, 16, 7, 0, 0, 0, 0, 37, 1, 0, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65,160, 0, 0, 0,104, 16,214, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,248,150,214, 3, 0, 0, 0, 0,
- 72, 15,214, 3, 0, 0, 0, 0,104, 18,201, 3, 0, 0, 0, 0, 40, 12,201, 3, 0, 0, 0, 0,200, 17,201, 3, 0, 0, 0, 0,
- 8, 19,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191, 1, 0, 0, 5, 1, 0, 0,194, 2, 0, 0,
- 12, 12,192, 1,190, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,230,208, 3, 0, 0, 0, 0,
-200,230,208, 3, 0, 0, 0, 0,184, 96,214, 3, 0, 0, 0, 0, 24,100,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,
-184, 96,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,104, 98,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,192, 94, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,224, 67, 0, 0, 0, 0, 0, 0,208, 65,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,191, 1, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,223, 67, 0, 0,200, 65, 0,128,223, 67, 0, 0,200, 65,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,192, 1, 26, 0,192, 1, 26, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191, 1, 0, 0, 5, 1, 0, 0, 30, 1, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 1, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, 88, 16, 16, 7, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 40, 23, 16, 7,
+ 0, 0, 0, 0,168, 7, 16, 7, 0, 0, 0, 0,152,195, 15, 7, 0, 0, 0, 0, 56,191, 15, 7, 0, 0, 0, 0, 40,195, 15, 7,
+ 0, 0, 0, 0, 8,196, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191, 1, 0, 0, 5, 1, 0, 0,
+194, 2, 0, 0, 12, 12,192, 1,190, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152, 21, 16, 7,
+ 0, 0, 0, 0,152, 21, 16, 7, 0, 0, 0, 0, 72, 17, 16, 7, 0, 0, 0, 0, 40, 20, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0, 72, 17, 16, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,184, 18, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 94, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,224, 67, 0, 0, 0, 0,
+ 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,191, 1, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,223, 67, 0, 0,200, 65, 0,128,223, 67,
+ 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,192, 1, 26, 0,192, 1,
+ 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191, 1, 0, 0, 5, 1, 0, 0,
+ 30, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 1, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,
-104, 98,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 24,100,214, 3, 0, 0, 0, 0,184, 96,214, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 55, 67, 0, 0, 0,194, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 67, 0, 0,201,195, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,199, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0,
- 0, 0, 0, 0,199, 0, 0, 0, 18, 0, 0, 0,163, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 8, 4, 0, 0, 2, 0, 3, 3, 0, 0, 2, 4, 6, 0,200, 0,164, 1,200, 0,146, 1, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,199, 0, 0, 0, 31, 1, 0, 0,194, 2, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 0,164, 1, 0, 0, 2, 0, 3, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0,184, 18, 16, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 40, 20, 16, 7, 0, 0, 0, 0, 72, 17, 16, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 67, 0, 0, 0,194, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 67, 0, 0,201,195,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,199, 0, 0, 0, 0, 0, 0, 0,
+ 17, 0, 0, 0, 0, 0, 0, 0,199, 0, 0, 0, 18, 0, 0, 0,163, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 8, 4, 0, 0, 2, 0, 3, 3, 0, 0, 2, 4, 6, 0,200, 0,164, 1,200, 0,
+146, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,199, 0, 0, 0, 31, 1, 0, 0,
+194, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 0,164, 1, 0, 0, 2, 0, 3, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,
- 24,100,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,104, 98,214, 3, 0, 0, 0, 0,
- 0, 0, 32,193, 0, 0,104, 68, 0, 0, 72,194, 0, 0, 0, 0, 0, 0, 32,193, 0, 0,104, 68, 0, 0,201,195, 0, 0, 0, 0,
-231, 0, 0, 0,248, 0, 0, 0, 18, 0, 0, 0,163, 1, 0, 0, 0, 0, 0, 0,230, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0,
- 0, 0, 0, 0,230, 0, 0, 0, 18, 0, 0, 0,163, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,124,146, 72, 0, 64, 28, 70,
- 10,215, 35, 60, 0, 0, 72, 66, 74, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, 4, 4, 0,248, 0,164, 1, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 0, 0, 0,191, 1, 0, 0, 31, 1, 0, 0,194, 2, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 0,164, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0, 40, 20, 16, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184, 18, 16, 7,
+ 0, 0, 0, 0, 0, 0, 32,193, 0, 0,104, 68, 0, 0, 72,194, 0, 0, 0, 0, 0, 0, 32,193, 0, 0,104, 68, 0, 0,201,195,
+ 0, 0, 0, 0,231, 0, 0, 0,248, 0, 0, 0, 18, 0, 0, 0,163, 1, 0, 0, 0, 0, 0, 0,230, 0, 0, 0, 0, 0, 0, 0,
+ 17, 0, 0, 0, 0, 0, 0, 0,230, 0, 0, 0, 18, 0, 0, 0,163, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,124,146, 72,
+ 0, 64, 28, 70, 10,215, 35, 60, 0, 0, 72, 66, 74, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, 4, 4, 0,248, 0,164, 1, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 0, 0, 0,191, 1, 0, 0, 31, 1, 0, 0,
+194, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 0,164, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 72, 1, 0, 0,
-200,230,208, 3, 0, 0, 0, 0, 38, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 72, 1, 0, 0,152, 21, 16, 7, 0, 0, 0, 0, 38, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,
-248,150,214, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,104, 16,214, 3, 0, 0, 0, 0,
-168, 19,201, 3, 0, 0, 0, 0, 8, 14,201, 3, 0, 0, 0, 0,200, 12,201, 3, 0, 0, 0, 0, 72, 20,201, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 25, 4, 0, 0,240, 4, 0, 0, 61, 2, 0, 0,194, 2, 0, 0, 1, 1,216, 0,134, 0, 1, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152, 75,214, 3, 0, 0, 0, 0,152, 75,214, 3, 0, 0, 0, 0,
-200,101,214, 3, 0, 0, 0, 0,120,103,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,200,101,214, 3, 0, 0, 0, 0,
-215, 0, 0, 0, 1, 0, 0, 0,120,103,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,102, 68,
- 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,165, 67, 0, 0, 0, 64, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73, 1, 0, 0,
- 0, 0, 0, 0, 23, 0, 0, 0, 0,128,164, 67, 0, 0,200, 65, 0,128,164, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 74, 1, 24, 0, 74, 1, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 25, 4, 0, 0,240, 4, 0, 0, 61, 2, 0, 0, 61, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+160, 0, 0, 0, 40, 23, 16, 7, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 16, 16, 7,
+ 0, 0, 0, 0,120,196, 15, 7, 0, 0, 0, 0,136,192, 15, 7, 0, 0, 0, 0,168,191, 15, 7, 0, 0, 0, 0,232,196, 15, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 4, 0, 0,240, 4, 0, 0, 61, 2, 0, 0,194, 2, 0, 0, 1, 1,216, 0,
+134, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184, 30, 16, 7, 0, 0, 0, 0,184, 30, 16, 7,
+ 0, 0, 0, 0, 24, 24, 16, 7, 0, 0, 0, 0,136, 25, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 24, 24, 16, 7,
+ 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,136, 25, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,102, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,165, 67, 0, 0, 0, 64, 0, 0,208, 65, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 73, 1, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0,128,164, 67, 0, 0,200, 65, 0,128,164, 67, 0, 0,200, 65, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 74, 1, 24, 0, 74, 1, 24, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 4, 0, 0,240, 4, 0, 0, 61, 2, 0, 0, 61, 2, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 26, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,120,103,214, 3, 0, 0, 0, 0,
-215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,101,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,136, 25, 16, 7,
+ 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 24, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 25, 4, 0, 0,240, 4, 0, 0, 61, 2, 0, 0,194, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,216, 0,134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 4, 0, 0,240, 4, 0, 0, 61, 2, 0, 0,194, 2, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216, 0,134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 24,152,214, 3, 0, 0, 0, 0, 68, 65, 84, 65,112, 3, 0, 0, 24,152,214, 3, 0, 0, 0, 0,
-173, 0, 0, 0, 1, 0, 0, 0, 56,255, 13, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,228,100, 64,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,154, 65,128,191, 0, 0,128,191, 0, 0, 0, 0, 0, 0, 0, 0,
- 72, 1, 77,190, 0, 0, 0, 0,221,149, 47, 63, 86,126,162,190, 8,165, 39, 63, 0, 0, 0, 0, 51, 70, 58, 63,225,251,159, 62,
-149, 84, 28,191, 0, 0, 0, 0,192, 56, 49,188, 55, 53,101, 63, 52,247,227, 62, 0, 0, 0, 0, 90, 38,173,190, 0,222,192,190,
-152, 9, 52,193, 0, 0,128, 63,223,149, 47, 63, 55, 70, 58, 63,160, 56, 49,188, 0, 0, 0, 0, 88,126,162,190,229,251,159, 62,
- 55, 53,101, 63, 0, 0, 0, 0, 7,165, 39, 63,150, 84, 28,191, 51,247,227, 62, 0, 0, 0, 0,110,101,239, 64,151, 62,208,192,
- 78,255,170, 64, 0, 0,128, 63, 47,201,194, 63, 61, 73,145,191,244,250, 39,191, 8,165, 39,191,190,164,206, 63,209, 10,143, 63,
-180,164, 28, 63,149, 84, 28, 63,224,153,196,188,136,239, 76, 64, 10,108,228,190, 52,247,227,190,125, 21, 64,191,126,113,172,191,
-216, 49, 49, 65,152, 9, 52, 65,149, 70,158, 62, 24,234,167, 62,192,214,159,187, 0, 0, 6,181,196,188,181,189, 71,238,178, 61,
-127, 45,128, 62, 0, 0,226, 51,168,120, 21,194,107, 5, 2, 66,203,135,213,193,147,214,159,192,177, 38, 19, 66,124,173,255,193,
- 96,101,210, 65,128, 40,160, 64,221,149, 47, 63, 86,126,162,190, 8,165, 39, 63, 0, 0, 0, 0, 51, 70, 58, 63,225,251,159, 62,
-149, 84, 28,191, 0, 0, 0, 0,192, 56, 49,188, 55, 53,101, 63, 52,247,227, 62, 0, 0, 0, 0, 90, 38,173,190, 0,222,192,190,
-152, 9, 52,193, 0, 0,128, 63, 47,201,194, 63, 61, 73,145,191,244,250, 39,191, 8,165, 39,191,190,164,206, 63,209, 10,143, 63,
-180,164, 28, 63,149, 84, 28, 63,224,153,196,188,136,239, 76, 64, 10,108,228,190, 52,247,227,190,125, 21, 64,191,126,113,172,191,
-216, 49, 49, 65,152, 9, 52, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 26, 16, 7, 0, 0, 0, 0, 68, 65, 84, 65,112, 3, 0, 0,248, 26, 16, 7,
+ 0, 0, 0, 0,173, 0, 0, 0, 1, 0, 0, 0, 56,255, 13, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0,228,100, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,154, 65,128,191, 0, 0,128,191, 0, 0, 0, 0,
+ 0, 0, 0, 0, 72, 1, 77,190, 0, 0, 0, 0,221,149, 47, 63, 86,126,162,190, 8,165, 39, 63, 0, 0, 0, 0, 51, 70, 58, 63,
+225,251,159, 62,149, 84, 28,191, 0, 0, 0, 0,192, 56, 49,188, 55, 53,101, 63, 52,247,227, 62, 0, 0, 0, 0, 90, 38,173,190,
+ 0,222,192,190,152, 9, 52,193, 0, 0,128, 63,223,149, 47, 63, 55, 70, 58, 63,160, 56, 49,188, 0, 0, 0, 0, 88,126,162,190,
+229,251,159, 62, 55, 53,101, 63, 0, 0, 0, 0, 7,165, 39, 63,150, 84, 28,191, 51,247,227, 62, 0, 0, 0, 0,110,101,239, 64,
+151, 62,208,192, 78,255,170, 64, 0, 0,128, 63, 47,201,194, 63, 61, 73,145,191,244,250, 39,191, 8,165, 39,191,190,164,206, 63,
+209, 10,143, 63,180,164, 28, 63,149, 84, 28, 63,224,153,196,188,136,239, 76, 64, 10,108,228,190, 52,247,227,190,125, 21, 64,191,
+126,113,172,191,216, 49, 49, 65,152, 9, 52, 65,149, 70,158, 62, 24,234,167, 62,192,214,159,187, 0, 0, 6,181,196,188,181,189,
+ 71,238,178, 61,127, 45,128, 62, 0, 0,226, 51,168,120, 21,194,107, 5, 2, 66,203,135,213,193,147,214,159,192,177, 38, 19, 66,
+124,173,255,193, 96,101,210, 65,128, 40,160, 64,221,149, 47, 63, 86,126,162,190, 8,165, 39, 63, 0, 0, 0, 0, 51, 70, 58, 63,
+225,251,159, 62,149, 84, 28,191, 0, 0, 0, 0,192, 56, 49,188, 55, 53,101, 63, 52,247,227, 62, 0, 0, 0, 0, 90, 38,173,190,
+ 0,222,192,190,152, 9, 52,193, 0, 0,128, 63, 47,201,194, 63, 61, 73,145,191,244,250, 39,191, 8,165, 39,191,190,164,206, 63,
+209, 10,143, 63,180,164, 28, 63,149, 84, 28, 63,224,153,196,188,136,239, 76, 64, 10,108,228,190, 52,247,227,190,125, 21, 64,191,
+126,113,172,191,216, 49, 49, 65,152, 9, 52, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,102,103, 97, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,102,103, 97, 64,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,102,103, 97, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63,241, 22, 72, 63, 78,162,246,190, 43, 8, 90,190, 2, 35,171,190, 0, 0, 32, 65, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,253,191,136, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 65, 1, 2, 0, 0,
-255,255, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 7, 0, 0, 0,128, 63,190,133, 65, 66,
- 99,212, 90, 66, 27,183,118, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 96, 1, 0, 0,
-152, 75,214, 3, 0, 0, 0, 0,174, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 51, 51, 51, 63, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65,205,204, 76, 62,
- 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0,200,213,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,102,103, 97, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+102,103, 97, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,102,103, 97, 64, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,241, 22, 72, 63, 78,162,246,190, 43, 8, 90,190, 2, 35,171,190, 0, 0, 32, 65,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,253,191,136, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 65,
+ 1, 2, 0, 0,255,255, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 7, 0, 0, 0,128, 63,
+190,133, 65, 66, 99,212, 90, 66, 27,183,118, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 96, 1, 0, 0,184, 30, 16, 7, 0, 0, 0, 0,174, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 51, 51, 51, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65,
+205,204, 76, 62, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0, 72,219, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 3, 0, 8, 0,128, 0, 0, 0, 12, 66, 0, 0,128, 63, 10,215, 35, 60,
- 0, 0,250, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0,
- 10, 0, 7, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 78, 0, 0, 8, 1, 0, 0, 8,156,214, 3, 0, 0, 0, 0,
-210, 0, 0, 0, 1, 0, 0, 0,248, 9,215, 3, 0, 0, 0, 0,136, 7,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 83, 82, 67,111,109,112,111,115,105,116,105,110,103, 0,103, 46, 48, 48, 49, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 3, 0, 8, 0,128, 0, 0, 0, 12, 66, 0, 0,128, 63,
+ 10,215, 35, 60, 0, 0,250, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 16, 0, 10, 0, 7, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-232, 20,201, 3, 0, 0, 0, 0, 8, 29,201, 3, 0, 0, 0, 0,168,108,171, 3, 0, 0, 0, 0, 24,123,171, 3, 0, 0, 0, 0,
-152,157,214, 3, 0, 0, 0, 0, 40,231,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,232, 20,201, 3, 0, 0, 0, 0,
-211, 0, 0, 0, 1, 0, 0, 0,136, 21,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,136, 21,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,
- 40, 22,201, 3, 0, 0, 0, 0,232, 20,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 4, 0, 0, 0, 0,
- 68, 65, 84, 65, 32, 0, 0, 0, 40, 22,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,200, 22,201, 3, 0, 0, 0, 0,
-136, 21,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 5, 4, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,
-200, 22,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,104, 23,201, 3, 0, 0, 0, 0, 40, 22,201, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,104, 23,201, 3, 0, 0, 0, 0,
-211, 0, 0, 0, 1, 0, 0, 0, 8, 24,201, 3, 0, 0, 0, 0,200, 22,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,234, 3, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 8, 24,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,
-168, 24,201, 3, 0, 0, 0, 0,104, 23,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7,234, 3, 1, 0, 0, 0,
- 68, 65, 84, 65, 32, 0, 0, 0,168, 24,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 72, 25,201, 3, 0, 0, 0, 0,
- 8, 24,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 6, 92, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,
- 72, 25,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,232, 25,201, 3, 0, 0, 0, 0,168, 24,201, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 92, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,232, 25,201, 3, 0, 0, 0, 0,
-211, 0, 0, 0, 1, 0, 0, 0,136, 26,201, 3, 0, 0, 0, 0, 72, 25,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 32, 6,234, 3, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,136, 26,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,
- 40, 27,201, 3, 0, 0, 0, 0,232, 25,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140, 1, 0, 0, 0, 0,
- 68, 65, 84, 65, 32, 0, 0, 0, 40, 27,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,200, 27,201, 3, 0, 0, 0, 0,
-136, 26,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 6,140, 1, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,
-200, 27,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,104, 28,201, 3, 0, 0, 0, 0, 40, 27,201, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 4, 3,140, 1, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,104, 28,201, 3, 0, 0, 0, 0,
-211, 0, 0, 0, 1, 0, 0, 0, 8, 29,201, 3, 0, 0, 0, 0,200, 27,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 4, 3, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 8, 29,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,104, 28,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 6, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 40, 0, 0, 0,168,108,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 88,109,171, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,136, 21,201, 3, 0, 0, 0, 0, 40, 22,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 40, 0, 0, 0, 88,109,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 8,110,171, 3, 0, 0, 0, 0,
-168,108,171, 3, 0, 0, 0, 0,136, 21,201, 3, 0, 0, 0, 0,104, 23,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 40, 0, 0, 0, 8,110,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,184,110,171, 3, 0, 0, 0, 0,
- 88,109,171, 3, 0, 0, 0, 0, 40, 22,201, 3, 0, 0, 0, 0, 8, 24,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 40, 0, 0, 0,184,110,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,104,111,171, 3, 0, 0, 0, 0,
- 8,110,171, 3, 0, 0, 0, 0,104, 23,201, 3, 0, 0, 0, 0, 8, 24,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 40, 0, 0, 0,104,111,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 24,112,171, 3, 0, 0, 0, 0,
-184,110,171, 3, 0, 0, 0, 0,200, 22,201, 3, 0, 0, 0, 0, 72, 25,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 40, 0, 0, 0, 24,112,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,200,112,171, 3, 0, 0, 0, 0,
-104,111,171, 3, 0, 0, 0, 0,168, 24,201, 3, 0, 0, 0, 0, 72, 25,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 40, 0, 0, 0,200,112,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,120,113,171, 3, 0, 0, 0, 0,
- 24,112,171, 3, 0, 0, 0, 0, 8, 24,201, 3, 0, 0, 0, 0,232, 25,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 40, 0, 0, 0,120,113,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 40,114,171, 3, 0, 0, 0, 0,
-200,112,171, 3, 0, 0, 0, 0,104, 23,201, 3, 0, 0, 0, 0,232, 25,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 40, 0, 0, 0, 40,114,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,216,114,171, 3, 0, 0, 0, 0,
-120,113,171, 3, 0, 0, 0, 0,168, 24,201, 3, 0, 0, 0, 0,232, 25,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 40, 0, 0, 0,216,114,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,136,115,171, 3, 0, 0, 0, 0,
- 40,114,171, 3, 0, 0, 0, 0, 8, 24,201, 3, 0, 0, 0, 0, 72, 25,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 40, 0, 0, 0,136,115,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 56,116,171, 3, 0, 0, 0, 0,
-216,114,171, 3, 0, 0, 0, 0,104, 23,201, 3, 0, 0, 0, 0,136, 26,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 40, 0, 0, 0, 56,116,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,232,116,171, 3, 0, 0, 0, 0,
-136,115,171, 3, 0, 0, 0, 0,232, 25,201, 3, 0, 0, 0, 0, 40, 27,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 40, 0, 0, 0,232,116,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,152,117,171, 3, 0, 0, 0, 0,
- 56,116,171, 3, 0, 0, 0, 0,136, 26,201, 3, 0, 0, 0, 0, 40, 27,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 40, 0, 0, 0,152,117,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 72,118,171, 3, 0, 0, 0, 0,
-232,116,171, 3, 0, 0, 0, 0,136, 26,201, 3, 0, 0, 0, 0,200, 27,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 40, 0, 0, 0, 72,118,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,248,118,171, 3, 0, 0, 0, 0,
-152,117,171, 3, 0, 0, 0, 0, 40, 27,201, 3, 0, 0, 0, 0,200, 27,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 40, 0, 0, 0,248,118,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,168,119,171, 3, 0, 0, 0, 0,
- 72,118,171, 3, 0, 0, 0, 0,232, 20,201, 3, 0, 0, 0, 0,104, 28,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 40, 0, 0, 0,168,119,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 88,120,171, 3, 0, 0, 0, 0,
-248,118,171, 3, 0, 0, 0, 0,104, 28,201, 3, 0, 0, 0, 0, 8, 29,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 40, 0, 0, 0, 88,120,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 8,121,171, 3, 0, 0, 0, 0,
-168,119,171, 3, 0, 0, 0, 0,200, 22,201, 3, 0, 0, 0, 0, 8, 29,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 40, 0, 0, 0, 8,121,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,184,121,171, 3, 0, 0, 0, 0,
- 88,120,171, 3, 0, 0, 0, 0,168, 24,201, 3, 0, 0, 0, 0, 8, 29,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 40, 0, 0, 0,184,121,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,104,122,171, 3, 0, 0, 0, 0,
- 8,121,171, 3, 0, 0, 0, 0,200, 27,201, 3, 0, 0, 0, 0,104, 28,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 40, 0, 0, 0,104,122,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 24,123,171, 3, 0, 0, 0, 0,
-184,121,171, 3, 0, 0, 0, 0, 40, 27,201, 3, 0, 0, 0, 0, 8, 29,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 40, 0, 0, 0, 24,123,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-104,122,171, 3, 0, 0, 0, 0,232, 20,201, 3, 0, 0, 0, 0,136, 26,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65,160, 0, 0, 0,152,157,214, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,184,158,214, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,104, 23,201, 3, 0, 0, 0, 0,136, 21,201, 3, 0, 0, 0, 0, 40, 22,201, 3, 0, 0, 0, 0,
- 8, 24,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,235, 3, 0, 0, 5, 4, 0, 0,
- 7, 7,127, 7, 27, 0, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,198,207, 3, 0, 0, 0, 0,
- 88,198,207, 3, 0, 0, 0, 0, 40,105,214, 3, 0, 0, 0, 0,216,106,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,
- 40,105,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,216,106,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 32,148, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,224,239, 68, 0, 0, 0, 0, 0, 0,208, 65,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 78, 0, 0, 8, 1, 0, 0,248, 32, 16, 7,
+ 0, 0, 0, 0,210, 0, 0, 0, 1, 0, 0, 0,120,141, 16, 7, 0, 0, 0, 0, 8,189, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 82, 67,111,109,112,111,115,105,116,105,110,103, 0,103, 46, 48, 48, 49, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,126, 7, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,192,239, 68, 0, 0,200, 65, 0,192,239, 68, 0, 0,200, 65,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,127, 7, 26, 0,127, 7, 26, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,235, 3, 0, 0, 4, 4, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,127, 7, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 72, 34, 16, 7, 0, 0, 0, 0,248, 39, 16, 7, 0, 0, 0, 0,104, 40, 16, 7, 0, 0, 0, 0,152, 49, 16, 7,
+ 0, 0, 0, 0, 8, 50, 16, 7, 0, 0, 0, 0, 56,102, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 72, 34, 16, 7,
+ 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,184, 34, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,184, 34, 16, 7, 0, 0, 0, 0,211, 0, 0, 0,
+ 1, 0, 0, 0, 40, 35, 16, 7, 0, 0, 0, 0, 72, 34, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 4,
+ 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 40, 35, 16, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,152, 35, 16, 7,
+ 0, 0, 0, 0,184, 34, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 5, 4, 0, 0, 0, 0, 68, 65, 84, 65,
+ 32, 0, 0, 0,152, 35, 16, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 8, 36, 16, 7, 0, 0, 0, 0, 40, 35, 16, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 8, 36, 16, 7,
+ 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,120, 36, 16, 7, 0, 0, 0, 0,152, 35, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,234, 3, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,120, 36, 16, 7, 0, 0, 0, 0,211, 0, 0, 0,
+ 1, 0, 0, 0,232, 36, 16, 7, 0, 0, 0, 0, 8, 36, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7,234, 3,
+ 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,232, 36, 16, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 88, 37, 16, 7,
+ 0, 0, 0, 0,120, 36, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 6, 92, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 32, 0, 0, 0, 88, 37, 16, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,200, 37, 16, 7, 0, 0, 0, 0,232, 36, 16, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 92, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,200, 37, 16, 7,
+ 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 56, 38, 16, 7, 0, 0, 0, 0, 88, 37, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 32, 6,234, 3, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 56, 38, 16, 7, 0, 0, 0, 0,211, 0, 0, 0,
+ 1, 0, 0, 0,168, 38, 16, 7, 0, 0, 0, 0,200, 37, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140, 1,
+ 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,168, 38, 16, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 24, 39, 16, 7,
+ 0, 0, 0, 0, 56, 38, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 6,140, 1, 0, 0, 0, 0, 68, 65, 84, 65,
+ 32, 0, 0, 0, 24, 39, 16, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,136, 39, 16, 7, 0, 0, 0, 0,168, 38, 16, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 3,140, 1, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,136, 39, 16, 7,
+ 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,248, 39, 16, 7, 0, 0, 0, 0, 24, 39, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,248, 39, 16, 7, 0, 0, 0, 0,211, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136, 39, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 6, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,104, 40, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,216, 40, 16, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184, 34, 16, 7, 0, 0, 0, 0, 40, 35, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,216, 40, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 72, 41, 16, 7,
+ 0, 0, 0, 0,104, 40, 16, 7, 0, 0, 0, 0,184, 34, 16, 7, 0, 0, 0, 0, 8, 36, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 72, 41, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,184, 41, 16, 7,
+ 0, 0, 0, 0,216, 40, 16, 7, 0, 0, 0, 0, 40, 35, 16, 7, 0, 0, 0, 0,120, 36, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,184, 41, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 40, 42, 16, 7,
+ 0, 0, 0, 0, 72, 41, 16, 7, 0, 0, 0, 0, 8, 36, 16, 7, 0, 0, 0, 0,120, 36, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 40, 42, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,152, 42, 16, 7,
+ 0, 0, 0, 0,184, 41, 16, 7, 0, 0, 0, 0,152, 35, 16, 7, 0, 0, 0, 0, 88, 37, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,152, 42, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 8, 43, 16, 7,
+ 0, 0, 0, 0, 40, 42, 16, 7, 0, 0, 0, 0,232, 36, 16, 7, 0, 0, 0, 0, 88, 37, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 8, 43, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,120, 43, 16, 7,
+ 0, 0, 0, 0,152, 42, 16, 7, 0, 0, 0, 0,120, 36, 16, 7, 0, 0, 0, 0,200, 37, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,120, 43, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,232, 43, 16, 7,
+ 0, 0, 0, 0, 8, 43, 16, 7, 0, 0, 0, 0, 8, 36, 16, 7, 0, 0, 0, 0,200, 37, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,232, 43, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 88, 44, 16, 7,
+ 0, 0, 0, 0,120, 43, 16, 7, 0, 0, 0, 0,232, 36, 16, 7, 0, 0, 0, 0,200, 37, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 88, 44, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,200, 44, 16, 7,
+ 0, 0, 0, 0,232, 43, 16, 7, 0, 0, 0, 0,120, 36, 16, 7, 0, 0, 0, 0, 88, 37, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,200, 44, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 56, 45, 16, 7,
+ 0, 0, 0, 0, 88, 44, 16, 7, 0, 0, 0, 0, 8, 36, 16, 7, 0, 0, 0, 0, 56, 38, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 56, 45, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,168, 45, 16, 7,
+ 0, 0, 0, 0,200, 44, 16, 7, 0, 0, 0, 0,200, 37, 16, 7, 0, 0, 0, 0,168, 38, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,168, 45, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 24, 46, 16, 7,
+ 0, 0, 0, 0, 56, 45, 16, 7, 0, 0, 0, 0, 56, 38, 16, 7, 0, 0, 0, 0,168, 38, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 24, 46, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,136, 46, 16, 7,
+ 0, 0, 0, 0,168, 45, 16, 7, 0, 0, 0, 0, 56, 38, 16, 7, 0, 0, 0, 0, 24, 39, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,136, 46, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,248, 46, 16, 7,
+ 0, 0, 0, 0, 24, 46, 16, 7, 0, 0, 0, 0,168, 38, 16, 7, 0, 0, 0, 0, 24, 39, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,248, 46, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,104, 47, 16, 7,
+ 0, 0, 0, 0,136, 46, 16, 7, 0, 0, 0, 0, 72, 34, 16, 7, 0, 0, 0, 0,136, 39, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,104, 47, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,216, 47, 16, 7,
+ 0, 0, 0, 0,248, 46, 16, 7, 0, 0, 0, 0,136, 39, 16, 7, 0, 0, 0, 0,248, 39, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,216, 47, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 72, 48, 16, 7,
+ 0, 0, 0, 0,104, 47, 16, 7, 0, 0, 0, 0,152, 35, 16, 7, 0, 0, 0, 0,248, 39, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 72, 48, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,184, 48, 16, 7,
+ 0, 0, 0, 0,216, 47, 16, 7, 0, 0, 0, 0,232, 36, 16, 7, 0, 0, 0, 0,248, 39, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,184, 48, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 40, 49, 16, 7,
+ 0, 0, 0, 0, 72, 48, 16, 7, 0, 0, 0, 0, 24, 39, 16, 7, 0, 0, 0, 0,136, 39, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 40, 49, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,152, 49, 16, 7,
+ 0, 0, 0, 0,184, 48, 16, 7, 0, 0, 0, 0,168, 38, 16, 7, 0, 0, 0, 0,248, 39, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,152, 49, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 40, 49, 16, 7, 0, 0, 0, 0, 72, 34, 16, 7, 0, 0, 0, 0, 56, 38, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, 8, 50, 16, 7, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,216, 53, 16, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 36, 16, 7, 0, 0, 0, 0,184, 34, 16, 7, 0, 0, 0, 0, 40, 35, 16, 7,
+ 0, 0, 0, 0,120, 36, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,235, 3, 0, 0,
+ 5, 4, 0, 0, 7, 7,127, 7, 27, 0, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,140, 16, 7,
+ 0, 0, 0, 0,232,140, 16, 7, 0, 0, 0, 0,248, 50, 16, 7, 0, 0, 0, 0,104, 52, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0,248, 50, 16, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,104, 52, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,148, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,224,239, 68, 0, 0, 0, 0,
+ 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,192,239, 68, 0, 0,200, 65, 0,192,239, 68,
+ 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,127, 7, 26, 0,127, 7,
+ 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,235, 3, 0, 0,
+ 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,127, 7, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,
-216,106,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,105,214, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,240,109, 69, 0, 0,128,192, 0, 0, 0, 0, 0, 0, 0, 0,255,255,109, 69, 0, 0, 0,192, 0, 0, 0, 0,
-112, 7, 0, 0,129, 7, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0,
- 0, 0, 0, 0,111, 7, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 2, 0, 0, 0, 1, 0, 3, 3, 2, 0, 0, 4, 10, 0,129, 7, 2, 0,112, 7, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 4, 0, 0, 5, 4, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,
-184,158,214, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,216,159,214, 3, 0, 0, 0, 0,152,157,214, 3, 0, 0, 0, 0,
- 8, 29,201, 3, 0, 0, 0, 0,168, 24,201, 3, 0, 0, 0, 0, 72, 25,201, 3, 0, 0, 0, 0,200, 22,201, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0,126, 7, 0, 0, 0, 0, 0, 0, 91, 0, 0, 0, 15, 15, 94, 1, 92, 0, 1, 0,
- 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 94,200, 3, 0, 0, 0, 0, 40, 94,200, 3, 0, 0, 0, 0,
-136,108,214, 3, 0, 0, 0, 0, 56,110,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,136,108,214, 3, 0, 0, 0, 0,
-215, 0, 0, 0, 1, 0, 0, 0, 56,110,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,115, 68,
- 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,175, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 1, 0, 0,
- 0, 0, 0, 0, 25, 0, 0, 0, 0,128,174, 67, 0, 0,200, 65, 0,128,174, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 94, 1, 26, 0, 94, 1, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0,126, 7, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 94, 1, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 56,110,214, 3, 0, 0, 0, 0,
-215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136,108,214, 3, 0, 0, 0, 0, 0, 0, 64,192, 0, 0,126, 67,
- 0, 0, 0, 0, 0, 0, 72, 66, 50, 51, 74,193,154,209,131, 67, 0, 0, 0, 0, 0, 0, 72, 66, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 93, 1, 0, 0,
- 18, 0, 0, 0, 65, 0, 0, 0, 0, 0,128, 63, 0, 0, 72, 66, 0,124,146, 72, 0, 0, 72, 66,205,204,204, 61, 0, 0, 32, 65,
- 72, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, 4, 8, 0, 94, 1, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0,126, 7, 0, 0, 26, 0, 0, 0, 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 94, 1, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,208, 0, 0, 0, 40, 94,200, 3, 0, 0, 0, 0,
-190, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,
-216,159,214, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,248,224,214, 3, 0, 0, 0, 0,184,158,214, 3, 0, 0, 0, 0,
-168, 24,201, 3, 0, 0, 0, 0,232, 25,201, 3, 0, 0, 0, 0, 8, 24,201, 3, 0, 0, 0, 0, 72, 25,201, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0,126, 7, 0, 0, 93, 0, 0, 0,233, 3, 0, 0, 4, 4, 94, 1,141, 3, 1, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,125,199, 3, 0, 0, 0, 0, 56,125,199, 3, 0, 0, 0, 0,
-232,111,214, 3, 0, 0, 0, 0, 40,161,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,232,111,214, 3, 0, 0, 0, 0,
-215, 0, 0, 0, 1, 0, 0, 0, 40,161,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,148, 67,
- 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,175, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 1, 0, 0,
- 0, 0, 0, 0, 25, 0, 0, 0, 0,128,174, 67, 0, 0,200, 65, 0,128,174, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 94, 1, 26, 0, 94, 1, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0,126, 7, 0, 0,208, 3, 0, 0,233, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 94, 1, 26, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 40,161,214, 3, 0, 0, 0, 0,
-215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,111,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,174, 67,
- 0,128, 92,196, 0, 0, 0, 0, 0, 0, 0, 0,255,127,166, 67,255,191, 92,196, 0, 0, 0, 0, 77, 1, 0, 0, 94, 1, 0, 0,
- 0, 0, 0, 0,114, 3, 0, 0, 0, 0, 0, 0, 82, 1, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 76, 1, 0, 0,
- 0, 0, 0, 0,114, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64,
- 10, 3, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0, 94, 1,115, 3, 77, 1,115, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0,126, 7, 0, 0, 93, 0, 0, 0,207, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 94, 1,115, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-120, 77,214, 3, 0, 0, 0, 0, 8,210,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,120, 77,214, 3, 0, 0, 0, 0,
-213, 0, 0, 0, 1, 0, 0, 0, 88, 79,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 83, 95, 80, 84, 95, 99,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 83, 95, 80, 84, 95, 99,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 67,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,220,255, 76, 1, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 88, 1, 0, 0, 88, 79,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 40,193,214, 3, 0, 0, 0, 0,
-120, 77,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
- 84, 95,114,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
- 84, 95,114,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82,101,110,100,101,114, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,135,255, 76, 1, 61, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0,104, 52, 16, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 50, 16, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0,240,109, 69, 0, 0,128,192, 0, 0, 0, 0, 0, 0, 0, 0,255,255,109, 69, 0, 0, 0,192,
+ 0, 0, 0, 0,112, 7, 0, 0,129, 7, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, 0, 0, 0, 0,
+ 17, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 2, 0, 0, 0, 1, 0, 3, 3, 2, 0, 0, 4, 10, 0,129, 7, 2, 0,112, 7,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 4, 0, 0,
+ 5, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 40,193,214, 3, 0, 0, 0, 0,
-213, 0, 0, 0, 1, 0, 0, 0, 8,195,214, 3, 0, 0, 0, 0, 88, 79,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+160, 0, 0, 0,216, 53, 16, 7, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,200, 58, 16, 7, 0, 0, 0, 0, 8, 50, 16, 7,
+ 0, 0, 0, 0,248, 39, 16, 7, 0, 0, 0, 0,232, 36, 16, 7, 0, 0, 0, 0, 88, 37, 16, 7, 0, 0, 0, 0,152, 35, 16, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0,126, 7, 0, 0, 0, 0, 0, 0, 91, 0, 0, 0, 15, 15, 94, 1,
+ 92, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,168, 57, 16, 7, 0, 0, 0, 0,168, 57, 16, 7,
+ 0, 0, 0, 0,200, 54, 16, 7, 0, 0, 0, 0, 56, 56, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,200, 54, 16, 7,
+ 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 56, 56, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0,128,115, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,175, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0,
+ 93, 1, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,174, 67, 0, 0,200, 65, 0,128,174, 67, 0, 0,200, 65, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 94, 1, 26, 0, 94, 1, 26, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0,126, 7, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 1, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 76, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111,255, 76, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 56, 56, 16, 7,
+ 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 54, 16, 7, 0, 0, 0, 0, 0, 0, 64,192,
+ 0, 0,126, 67, 0, 0, 0, 0, 0, 0, 72, 66, 50, 51, 74,193,154,209,131, 67, 0, 0, 0, 0, 0, 0, 72, 66, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,
+ 93, 1, 0, 0, 18, 0, 0, 0, 65, 0, 0, 0, 0, 0,128, 63, 0, 0, 72, 66, 0,124,146, 72, 0, 0, 72, 66,205,204,204, 61,
+ 0, 0, 32, 65, 72, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, 4, 8, 0, 94, 1, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0,126, 7, 0, 0, 26, 0, 0, 0, 91, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 1, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,208, 0, 0, 0,168, 57, 16, 7,
+ 0, 0, 0, 0,190, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 88, 1, 0, 0, 8,195,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,232,196,214, 3, 0, 0, 0, 0,
- 40,193,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
- 84, 95,100,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
- 84, 95,100,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,105,109,101,110,115,105,111,
-110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140,254, 76, 1,203, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,232,196,214, 3, 0, 0, 0, 0,
-213, 0, 0, 0, 1, 0, 0, 0,200,198,214, 3, 0, 0, 0, 0, 8,195,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 68, 65, 84, 65,
+160, 0, 0, 0,200, 58, 16, 7, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 88, 83, 16, 7, 0, 0, 0, 0,216, 53, 16, 7,
+ 0, 0, 0, 0,232, 36, 16, 7, 0, 0, 0, 0,200, 37, 16, 7, 0, 0, 0, 0,120, 36, 16, 7, 0, 0, 0, 0, 88, 37, 16, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0,126, 7, 0, 0, 93, 0, 0, 0,233, 3, 0, 0, 4, 4, 94, 1,
+141, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 82, 16, 7, 0, 0, 0, 0, 24, 82, 16, 7,
+ 0, 0, 0, 0,184, 59, 16, 7, 0, 0, 0, 0, 40, 61, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,184, 59, 16, 7,
+ 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 40, 61, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,148, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,175, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 65,110,116,105, 45, 65,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 93, 1, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,174, 67, 0, 0,200, 65, 0,128,174, 67, 0, 0,200, 65, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 94, 1, 26, 0, 94, 1, 26, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0,126, 7, 0, 0,208, 3, 0, 0,233, 3, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 1, 26, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58,254, 76, 1, 58, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 40, 61, 16, 7,
+ 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184, 59, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0,128,174, 67, 0,128, 92,196, 0, 0, 0, 0, 0, 0, 0, 0,255,127,166, 67,255,191, 92,196, 0, 0, 0, 0, 77, 1, 0, 0,
+ 94, 1, 0, 0, 0, 0, 0, 0,114, 3, 0, 0, 0, 0, 0, 0, 82, 1, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,
+ 76, 1, 0, 0, 0, 0, 0, 0,114, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,
+ 0, 0, 0, 64, 10, 3, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0, 94, 1,115, 3, 77, 1,115, 3, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0,126, 7, 0, 0, 93, 0, 0, 0,207, 3, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 1,115, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,152, 62, 16, 7, 0, 0, 0, 0,120, 80, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,152, 62, 16, 7,
+ 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 56, 64, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 83, 95, 80, 84, 95, 99,111,110,116,101,120,116, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 88, 1, 0, 0,200,198,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,168,200,214, 3, 0, 0, 0, 0,
-232,196,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
- 84, 95,109,111,116,105,111,110, 95, 98,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
- 84, 95,109,111,116,105,111,110, 95, 98,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 97,109,112,108,101,100, 32,
- 77,111,116,105,111,110, 32, 66,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,254, 76, 1, 0, 0,
- 20, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 83, 95, 80, 84, 95, 99,111,110,116,101,120,116, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,168,200,214, 3, 0, 0, 0, 0,
-213, 0, 0, 0, 1, 0, 0, 0,136,202,214, 3, 0, 0, 0, 0,200,198,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,220,255, 76, 1, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 83,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10,254, 76, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 56, 64, 16, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,216, 65, 16, 7,
+ 0, 0, 0, 0,152, 62, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,114,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,114,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82,101,110,100,
+101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,135,255,
+ 76, 1, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,216, 65, 16, 7,
+ 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,120, 67, 16, 7, 0, 0, 0, 0, 56, 64, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 88, 1, 0, 0,136,202,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,104,204,214, 3, 0, 0, 0, 0,
-168,200,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
- 84, 95,112,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
- 84, 95,112,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,101,114,102,111,114,109, 97,
-110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,242,253, 76, 1, 0, 0,
- 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,104,204,214, 3, 0, 0, 0, 0,
-213, 0, 0, 0, 1, 0, 0, 0, 72,206,214, 3, 0, 0, 0, 0,136,202,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,111,115,116, 95,112,114,111, 99,101,115,115,105,110,
-103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,111,115,116, 95,112,114,111, 99,101,115,115,105,110,
-103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 80,111,115,116, 32, 80,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111,255, 76, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,
+ 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,218,253, 76, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,120, 67, 16, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 24, 69, 16, 7,
+ 0, 0, 0, 0,216, 65, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,100,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,100,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,105,109,101,
+110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140,254,
+ 76, 1,203, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 88, 1, 0, 0, 72,206,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 40,208,214, 3, 0, 0, 0, 0,
-104,204,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
- 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
- 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,116, 97,109,112, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 24, 69, 16, 7,
+ 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,184, 70, 16, 7, 0, 0, 0, 0,120, 67, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105,
+110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105,
+110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65,110,116,105, 45, 65,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,194,253, 76, 1, 0, 0,
- 20, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58,254, 76, 1, 58, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 40,208,214, 3, 0, 0, 0, 0,
-213, 0, 0, 0, 1, 0, 0, 0, 8,210,214, 3, 0, 0, 0, 0, 72,206,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,111,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,184, 70, 16, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 88, 72, 16, 7,
+ 0, 0, 0, 0, 24, 69, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,109,111,116,105,111,110, 95, 98,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,109,111,116,105,111,110, 95, 98,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 97,109,112,
+108,101,100, 32, 77,111,116,105,111,110, 32, 66,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,254,
+ 76, 1, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,111,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 79,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 88, 72, 16, 7,
+ 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,248, 73, 16, 7, 0, 0, 0, 0,184, 70, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,104, 97,100,105,110,103, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,253, 76, 1,130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,104, 97,100,105,110,103, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10,254, 76, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,
+ 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 88, 1, 0, 0, 8,210,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 40,208,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
- 84, 95, 98, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
- 84, 95, 98, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 97,107,101, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16,253, 76, 1, 0, 0,
- 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,248, 73, 16, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,152, 75, 16, 7,
+ 0, 0, 0, 0, 88, 72, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,112,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,112,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,101,114,102,
+111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,242,253,
+ 76, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0, 56,125,199, 3, 0, 0, 0, 0,
-179, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,152, 75, 16, 7,
+ 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 56, 77, 16, 7, 0, 0, 0, 0,248, 73, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,111,115,116, 95,112,114,111, 99,101,
+115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,111,115,116, 95,112,114,111, 99,101,
+115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,111,115,116, 32, 80,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,218,253, 76, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,
+ 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 56, 77, 16, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,216, 78, 16, 7,
+ 0, 0, 0, 0,152, 75, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,116, 97,109,
+112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,194,253,
+ 76, 1, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,255, 21, 0, 0,160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65,160, 0, 0, 0,248,224,214, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 8,230,214, 3, 0, 0, 0, 0,
-216,159,214, 3, 0, 0, 0, 0,104, 28,201, 3, 0, 0, 0, 0,200, 27,201, 3, 0, 0, 0, 0, 40, 27,201, 3, 0, 0, 0, 0,
- 8, 29,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 3, 0, 0, 31, 6, 0, 0, 0, 0, 0, 0,139, 1, 0, 0,
- 1, 1, 27, 3,140, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,211,214, 3, 0, 0, 0, 0,
-232,211,214, 3, 0, 0, 0, 0,216,162,214, 3, 0, 0, 0, 0,152,169,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,
-216,162,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,136,164,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 64,113, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,192, 70, 68, 0, 0, 0, 0, 0, 0,208, 65,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 26, 3, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128, 70, 68, 0, 0,200, 65, 0,128, 70, 68, 0, 0,200, 65,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 27, 3, 26, 0, 27, 3, 26, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 3, 0, 0, 31, 6, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 3, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,216, 78, 16, 7,
+ 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,120, 80, 16, 7, 0, 0, 0, 0, 56, 77, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,111,117,116,112,117,116, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,111,117,116,112,117,116, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,
-136,164,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 56,166,214, 3, 0, 0, 0, 0,216,162,214, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 15, 67, 0, 64, 70,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67,255,127, 70,196, 0, 0, 0, 0,
-143, 0, 0, 0,160, 0, 0, 0, 18, 0, 0, 0, 43, 3, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0,
- 0, 0, 0, 0,142, 0, 0, 0, 18, 0, 0, 0, 43, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,160, 0, 44, 3,143, 0, 26, 3, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 3, 0, 0, 5, 3, 0, 0, 26, 0, 0, 0,139, 1, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,114, 1, 0, 0, 5, 0, 3, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,253, 76, 1,130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,
- 56,166,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,232,167,214, 3, 0, 0, 0, 0,136,164,214, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 16, 67, 0, 0,206,194, 0, 0, 0, 0, 0, 0, 0, 0,231,102, 16, 67, 0, 0,206,194, 0, 0, 0, 0,
-143, 0, 0, 0,160, 0, 0, 0, 18, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0,
- 0, 0, 0, 0,142, 0, 0, 0, 18, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,160, 0,120, 0,143, 0,102, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 3, 0, 0, 31, 6, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 6, 0, 34, 0, 2, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,120, 80, 16, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,216, 78, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95, 98, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95, 98, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 97,107,101,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,
-232,167,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,152,169,214, 3, 0, 0, 0, 0, 56,166,214, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 35, 67, 0,192,108,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 67, 0, 0,184,195, 0, 0, 0, 0,
-163, 0, 0, 0,180, 0, 0, 0, 18, 0, 0, 0,129, 1, 0, 0, 0, 0, 0, 0,162, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0,
- 0, 0, 0, 0,162, 0, 0, 0, 18, 0, 0, 0,129, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,180, 0,130, 1,163, 0,112, 1, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 6, 0, 0, 31, 6, 0, 0, 26, 0, 0, 0,139, 1, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16,253,
+ 76, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,
-152,169,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,167,214, 3, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0, 24, 82, 16, 7,
+ 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 3, 0, 0, 31, 6, 0, 0, 26, 0, 0, 0,139, 1, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 3,114, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, 21, 0, 0,160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, 88, 83, 16, 7, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,232, 96, 16, 7,
+ 0, 0, 0, 0,200, 58, 16, 7, 0, 0, 0, 0,136, 39, 16, 7, 0, 0, 0, 0, 24, 39, 16, 7, 0, 0, 0, 0,168, 38, 16, 7,
+ 0, 0, 0, 0,248, 39, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 3, 0, 0, 31, 6, 0, 0, 0, 0, 0, 0,
+139, 1, 0, 0, 1, 1, 27, 3,140, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 95, 16, 7,
+ 0, 0, 0, 0, 56, 95, 16, 7, 0, 0, 0, 0, 72, 84, 16, 7, 0, 0, 0, 0, 8, 90, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0, 72, 84, 16, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,184, 85, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,113, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,192, 70, 68, 0, 0, 0, 0,
+ 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 26, 3, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128, 70, 68, 0, 0,200, 65, 0,128, 70, 68,
+ 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 27, 3, 26, 0, 27, 3,
+ 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 3, 0, 0, 31, 6, 0, 0, 0, 0, 0, 0,
+ 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 3, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24,226,214, 3, 0, 0, 0, 0, 68, 65, 84, 65,112, 3, 0, 0,
- 24,226,214, 3, 0, 0, 0, 0,173, 0, 0, 0, 1, 0, 0, 0, 93,101,230, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 30,133,119, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,154, 65,128,191, 0, 0,128,191,
- 0, 0, 0, 0, 0, 0, 0, 0, 72, 1, 77,190, 0, 0, 0, 0,221,149, 47, 63, 85,126,162,190, 8,165, 39, 63, 0, 0, 0, 0,
- 51, 70, 58, 63,225,251,159, 62,149, 84, 28,191, 0, 0, 0, 0,191, 56, 49,188, 54, 53,101, 63, 50,247,227, 62, 0, 0, 0, 0,
- 90, 38,173,190,254,221,192,190,152, 9, 52,193, 0, 0,128, 63,223,149, 47, 63, 55, 70, 58, 63,192, 56, 49,188, 0, 0, 0, 0,
- 87,126,162,190,228,251,159, 62, 56, 53,101, 63, 0, 0, 0, 0, 7,165, 39, 63,150, 84, 28,191, 50,247,227, 62, 0, 0, 0, 0,
-110,101,239, 64,151, 62,208,192, 77,255,170, 64, 0, 0,128, 63, 42, 6,158, 63, 99, 28,157,191,244,250, 39,191, 8,165, 39,191,
-211,164,167, 63, 55,175,154, 63,180,164, 28, 63,149, 84, 28, 63, 39,127,159,188,135,157, 93, 64, 8,108,228,190, 50,247,227,190,
- 4,213, 27,191,122,122,186,191,216, 49, 49, 65,152, 9, 52, 65, 25, 25,195, 62,176,249,206, 62,128,238,196,187, 0, 0,192,179,
- 55, 15,168,189,201,118,165, 61,152, 15,109, 62, 0, 0,152, 51,211,120, 21,194,144, 5, 2, 66, 6,136,213,193,193,214,159,192,
-219, 38, 19, 66,196,173,255,193,154,101,210, 65,173, 40,160, 64,221,149, 47, 63, 85,126,162,190, 8,165, 39, 63, 0, 0, 0, 0,
- 51, 70, 58, 63,225,251,159, 62,149, 84, 28,191, 0, 0, 0, 0,191, 56, 49,188, 54, 53,101, 63, 50,247,227, 62, 0, 0, 0, 0,
- 90, 38,173,190,254,221,192,190,152, 9, 52,193, 0, 0,128, 63, 42, 6,158, 63, 99, 28,157,191,244,250, 39,191, 8,165, 39,191,
-211,164,167, 63, 55,175,154, 63,180,164, 28, 63,149, 84, 28, 63, 39,127,159,188,135,157, 93, 64, 8,108,228,190, 50,247,227,190,
- 4,213, 27,191,122,122,186,191,216, 49, 49, 65,152, 9, 52, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0,184, 85, 16, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 40, 87, 16, 7, 0, 0, 0, 0, 72, 84, 16, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67, 0, 64, 70,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67,255,127, 70,196,
+ 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 18, 0, 0, 0, 43, 3, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0,
+ 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 18, 0, 0, 0, 43, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,160, 0, 44, 3,143, 0,
+ 26, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 3, 0, 0, 5, 3, 0, 0, 26, 0, 0, 0,
+139, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,114, 1, 0, 0, 5, 0, 3, 0, 1, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0, 40, 87, 16, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,152, 88, 16, 7, 0, 0, 0, 0,184, 85, 16, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 67, 0, 0,206,194, 0, 0, 0, 0, 0, 0, 0, 0,231,102, 16, 67, 0, 0,206,194,
+ 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 18, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0,
+ 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 18, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,160, 0,120, 0,143, 0,
+102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 3, 0, 0, 31, 6, 0, 0, 26, 0, 0, 0,
+ 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 6, 0, 34, 0, 2, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0,152, 88, 16, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 8, 90, 16, 7, 0, 0, 0, 0, 40, 87, 16, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 67, 0,192,108,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 67, 0, 0,184,195,
+ 0, 0, 0, 0,163, 0, 0, 0,180, 0, 0, 0, 18, 0, 0, 0,129, 1, 0, 0, 0, 0, 0, 0,162, 0, 0, 0, 0, 0, 0, 0,
+ 17, 0, 0, 0, 0, 0, 0, 0,162, 0, 0, 0, 18, 0, 0, 0,129, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,180, 0,130, 1,163, 0,
+112, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 6, 0, 0, 31, 6, 0, 0, 26, 0, 0, 0,
+139, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 1, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0, 8, 90, 16, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152, 88, 16, 7,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62,250,150, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 62,250,150, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62,250,150, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,241, 22, 72, 63, 78,162,246,190, 44, 8, 90,190, 3, 35,171,190,
-214,211,111, 65,214,211,111, 65, 0, 0, 0, 0, 0, 0, 0, 0, 80, 49,183, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,160, 65, 1, 2, 0, 0,255,255, 0, 0, 92, 62, 55, 63, 56,186,224,190,237,203,148,190, 3,236,234,190, 1, 0, 0, 0,
- 0, 0,128, 63,190,133, 65, 66,100,212, 90, 66, 31,183,118, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 96, 1, 0, 0,232,211,214, 3, 0, 0, 0, 0,174, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 51, 51, 51, 63,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 32, 65,205,204, 76, 62, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0,200,213,217, 3, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 3, 0, 8, 8,128, 0, 0, 0, 12, 66,
- 0, 0,128, 63,205,204,204, 61, 0, 0,250, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 16, 0, 10, 0, 7, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 3, 0, 0, 31, 6, 0, 0, 26, 0, 0, 0,
+139, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 3,114, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,
- 8,230,214, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 40,231,214, 3, 0, 0, 0, 0,248,224,214, 3, 0, 0, 0, 0,
-136, 26,201, 3, 0, 0, 0, 0,104, 23,201, 3, 0, 0, 0, 0,232, 25,201, 3, 0, 0, 0, 0, 40, 27,201, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 6, 0, 0,141, 1, 0, 0,233, 3, 0, 0, 16, 16, 32, 6, 93, 2, 1, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168,174,214, 3, 0, 0, 0, 0,168,174,214, 3, 0, 0, 0, 0,
- 72,171,214, 3, 0, 0, 0, 0,248,172,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 72,171,214, 3, 0, 0, 0, 0,
-215, 0, 0, 0, 1, 0, 0, 0,248,172,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 66, 68,
- 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,196, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 6, 0, 0,
- 0, 0, 0, 0, 25, 0, 0, 0, 0,224,195, 68, 0, 0,200, 65, 0,224,195, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 32, 6, 26, 0, 32, 6, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 6, 0, 0,141, 1, 0, 0,166, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 32, 6, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120, 91, 16, 7, 0, 0, 0, 0, 68, 65, 84, 65,
+112, 3, 0, 0,120, 91, 16, 7, 0, 0, 0, 0,173, 0, 0, 0, 1, 0, 0, 0, 93,101,230, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 30,133,119, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,154, 65,128,191,
+ 0, 0,128,191, 0, 0, 0, 0, 0, 0, 0, 0, 72, 1, 77,190, 0, 0, 0, 0,221,149, 47, 63, 85,126,162,190, 8,165, 39, 63,
+ 0, 0, 0, 0, 51, 70, 58, 63,225,251,159, 62,149, 84, 28,191, 0, 0, 0, 0,191, 56, 49,188, 54, 53,101, 63, 50,247,227, 62,
+ 0, 0, 0, 0, 90, 38,173,190,254,221,192,190,152, 9, 52,193, 0, 0,128, 63,223,149, 47, 63, 55, 70, 58, 63,192, 56, 49,188,
+ 0, 0, 0, 0, 87,126,162,190,228,251,159, 62, 56, 53,101, 63, 0, 0, 0, 0, 7,165, 39, 63,150, 84, 28,191, 50,247,227, 62,
+ 0, 0, 0, 0,110,101,239, 64,151, 62,208,192, 77,255,170, 64, 0, 0,128, 63, 42, 6,158, 63, 99, 28,157,191,244,250, 39,191,
+ 8,165, 39,191,211,164,167, 63, 55,175,154, 63,180,164, 28, 63,149, 84, 28, 63, 39,127,159,188,135,157, 93, 64, 8,108,228,190,
+ 50,247,227,190, 4,213, 27,191,122,122,186,191,216, 49, 49, 65,152, 9, 52, 65, 25, 25,195, 62,176,249,206, 62,128,238,196,187,
+ 0, 0,192,179, 55, 15,168,189,201,118,165, 61,152, 15,109, 62, 0, 0,152, 51,211,120, 21,194,144, 5, 2, 66, 6,136,213,193,
+193,214,159,192,219, 38, 19, 66,196,173,255,193,154,101,210, 65,173, 40,160, 64,221,149, 47, 63, 85,126,162,190, 8,165, 39, 63,
+ 0, 0, 0, 0, 51, 70, 58, 63,225,251,159, 62,149, 84, 28,191, 0, 0, 0, 0,191, 56, 49,188, 54, 53,101, 63, 50,247,227, 62,
+ 0, 0, 0, 0, 90, 38,173,190,254,221,192,190,152, 9, 52,193, 0, 0,128, 63, 42, 6,158, 63, 99, 28,157,191,244,250, 39,191,
+ 8,165, 39,191,211,164,167, 63, 55,175,154, 63,180,164, 28, 63,149, 84, 28, 63, 39,127,159,188,135,157, 93, 64, 8,108,228,190,
+ 50,247,227,190, 4,213, 27,191,122,122,186,191,216, 49, 49, 65,152, 9, 52, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,248,172,214, 3, 0, 0, 0, 0,
-215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,171,214, 3, 0, 0, 0, 0, 0, 0, 32,193, 0, 0, 0, 68,
- 0, 0, 32,193, 0, 0, 0, 68,128,195,217,195,192,225,108, 68, 96,240,187, 64, 62, 16,253, 67, 15, 6, 0, 0, 32, 6, 0, 0,
- 18, 0, 0, 0, 66, 2, 0, 0, 0, 0, 0, 0, 14, 6, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 14, 6, 0, 0,
- 18, 0, 0, 0, 66, 2, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,250, 70, 0, 0,250, 70,236, 81,184, 61, 10,215, 19, 64,
- 10, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 4, 0, 0, 32, 6, 67, 2, 15, 6, 49, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 6, 0, 0,167, 1, 0, 0,233, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 32, 6, 67, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 1, 0, 0,168,174,214, 3, 0, 0, 0, 0,
-191, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 10,215, 19, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 10,206, 97, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,
- 40,231,214, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,230,214, 3, 0, 0, 0, 0,
-232, 20,201, 3, 0, 0, 0, 0,136, 26,201, 3, 0, 0, 0, 0,200, 27,201, 3, 0, 0, 0, 0,104, 28,201, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0,139, 1, 0, 0, 6, 6, 4, 3,140, 1, 1, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,232,214, 3, 0, 0, 0, 0, 72,232,214, 3, 0, 0, 0, 0,
- 88,176,214, 3, 0, 0, 0, 0,184,179,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 88,176,214, 3, 0, 0, 0, 0,
-215, 0, 0, 0, 1, 0, 0, 0, 8,178,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,215, 67,
- 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 65, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0,
- 0, 0, 0, 0, 25, 0, 0, 0, 0,192, 64, 68, 0, 0,200, 65, 0,192, 64, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 4, 3, 26, 0, 4, 3, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 4, 3, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62,250,150, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 62,250,150, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62,250,150, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,241, 22, 72, 63, 78,162,246,190, 44, 8, 90,190,
+ 3, 35,171,190,214,211,111, 65,214,211,111, 65, 0, 0, 0, 0, 0, 0, 0, 0, 80, 49,183, 58, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,160, 65, 1, 2, 0, 0,255,255, 0, 0, 92, 62, 55, 63, 56,186,224,190,237,203,148,190, 3,236,234,190,
+ 1, 0, 0, 0, 0, 0,128, 63,190,133, 65, 66,100,212, 90, 66, 31,183,118, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 96, 1, 0, 0, 56, 95, 16, 7, 0, 0, 0, 0,174, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
+ 51, 51, 51, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 32, 65,205,204, 76, 62, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0, 72,219, 18, 7,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 8,178,214, 3, 0, 0, 0, 0,
-215, 0, 0, 0, 1, 0, 0, 0,184,179,214, 3, 0, 0, 0, 0, 88,176,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 3, 0, 8, 8,128, 0,
+ 0, 0, 12, 66, 0, 0,128, 63,205,204,204, 61, 0, 0,250, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 10, 0, 7, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+160, 0, 0, 0,232, 96, 16, 7, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 56,102, 16, 7, 0, 0, 0, 0, 88, 83, 16, 7,
+ 0, 0, 0, 0, 56, 38, 16, 7, 0, 0, 0, 0, 8, 36, 16, 7, 0, 0, 0, 0,200, 37, 16, 7, 0, 0, 0, 0,168, 38, 16, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 6, 0, 0,141, 1, 0, 0,233, 3, 0, 0, 16, 16, 32, 6,
+ 93, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184,100, 16, 7, 0, 0, 0, 0,184,100, 16, 7,
+ 0, 0, 0, 0,216, 97, 16, 7, 0, 0, 0, 0, 72, 99, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,216, 97, 16, 7,
+ 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 72, 99, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0,128, 66, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,196, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0,139, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 31, 6, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,224,195, 68, 0, 0,200, 65, 0,224,195, 68, 0, 0,200, 65, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 32, 6, 26, 0, 32, 6, 26, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 6, 0, 0,141, 1, 0, 0,166, 1, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 6, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,184,179,214, 3, 0, 0, 0, 0,
-215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,178,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 67,
- 0, 0, 0, 0, 0, 0,128, 67, 0, 0,129,191, 0,128, 0, 64, 0, 0,100,190, 0,128,156, 63, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 3, 0, 0,
- 0, 0, 0, 0,114, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 72, 99, 16, 7,
+ 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216, 97, 16, 7, 0, 0, 0, 0, 0, 0, 32,193,
+ 0, 0, 0, 68, 0, 0, 32,193, 0, 0, 0, 68,128,195,217,195,192,225,108, 68, 96,240,187, 64, 62, 16,253, 67, 15, 6, 0, 0,
+ 32, 6, 0, 0, 18, 0, 0, 0, 66, 2, 0, 0, 0, 0, 0, 0, 14, 6, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,
+ 14, 6, 0, 0, 18, 0, 0, 0, 66, 2, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,250, 70, 0, 0,250, 70,236, 81,184, 61,
+ 10,215, 19, 64, 10, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 4, 0, 0, 32, 6, 67, 2, 15, 6, 49, 2, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 6, 0, 0,167, 1, 0, 0,233, 3, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 6, 67, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 26, 0, 0, 0,139, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 4, 3,114, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 1, 0, 0,184,100, 16, 7,
+ 0, 0, 0, 0,191, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 33, 0, 0, 72,232,214, 3, 0, 0, 0, 0,
-184, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 65, 0, 0, 0, 0,154,153,153, 62,
- 0, 0, 0, 0,100, 0, 0, 0,154,153,153, 62,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 10,215, 19, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 10,206, 97, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+160, 0, 0, 0, 56,102, 16, 7, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232, 96, 16, 7,
+ 0, 0, 0, 0, 72, 34, 16, 7, 0, 0, 0, 0, 56, 38, 16, 7, 0, 0, 0, 0, 24, 39, 16, 7, 0, 0, 0, 0,136, 39, 16, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0,139, 1, 0, 0, 6, 6, 4, 3,
+140, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120,107, 16, 7, 0, 0, 0, 0,120,107, 16, 7,
+ 0, 0, 0, 0, 40,103, 16, 7, 0, 0, 0, 0, 8,106, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 40,103, 16, 7,
+ 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,152,104, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,215, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 65, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3, 3, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,192, 64, 68, 0, 0,200, 65, 0,192, 64, 68, 0, 0,200, 65, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 4, 3, 26, 0, 4, 3, 26, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 3, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,152,104, 16, 7,
+ 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 8,106, 16, 7, 0, 0, 0, 0, 40,103, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0,139, 1, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 8,106, 16, 7,
+ 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152,104, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 67, 0, 0,129,191, 0,128, 0, 64, 0, 0,100,190, 0,128,156, 63, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 4, 3, 0, 0, 0, 0, 0, 0,114, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 26, 0, 0, 0,139, 1, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 3,114, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 33, 0, 0,120,107, 16, 7,
+ 0, 0, 0, 0,184, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 65, 0, 0, 0, 0,
+154,153,153, 62, 0, 0, 0, 0,100, 0, 0, 0,154,153,153, 62,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -1309,7 +1295,6 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,100, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -1325,6 +1310,8 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
+100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -1439,3248 +1426,3740 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,100, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 83, 78, 0, 0, 8, 1, 0, 0,248, 9,215, 3, 0, 0, 0, 0,
-210, 0, 0, 0, 1, 0, 0, 0,152, 66,216, 3, 0, 0, 0, 0, 8,156,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 83, 82, 68,101,102, 97,117,108,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-168, 29,201, 3, 0, 0, 0, 0,136, 36,201, 3, 0, 0, 0, 0,200,123,171, 3, 0, 0, 0, 0,120,135,171, 3, 0, 0, 0, 0,
-184, 11,215, 3, 0, 0, 0, 0, 56, 16,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48,102, 10, 64, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,168, 29,201, 3, 0, 0, 0, 0,
-211, 0, 0, 0, 1, 0, 0, 0, 72, 30,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 72, 30,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,
-232, 30,201, 3, 0, 0, 0, 0,168, 29,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,178, 2, 0, 0, 0, 0,
- 68, 65, 84, 65, 32, 0, 0, 0,232, 30,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,136, 31,201, 3, 0, 0, 0, 0,
- 72, 30,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 70, 5,178, 2, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,
-136, 31,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 40, 32,201, 3, 0, 0, 0, 0,232, 30,201, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 70, 5, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 40, 32,201, 3, 0, 0, 0, 0,
-211, 0, 0, 0, 1, 0, 0, 0,200, 32,201, 3, 0, 0, 0, 0,136, 31,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,151, 2, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,200, 32,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,
-104, 33,201, 3, 0, 0, 0, 0, 40, 32,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 70, 5,151, 2, 1, 0, 0, 0,
- 68, 65, 84, 65, 32, 0, 0, 0,104, 33,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 8, 34,201, 3, 0, 0, 0, 0,
-200, 32,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,112, 4, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,
- 8, 34,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,168, 34,201, 3, 0, 0, 0, 0,104, 33,201, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,112, 4,151, 2, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,168, 34,201, 3, 0, 0, 0, 0,
-211, 0, 0, 0, 1, 0, 0, 0, 72, 35,201, 3, 0, 0, 0, 0, 8, 34,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-112, 4, 56, 2, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 72, 35,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,
-232, 35,201, 3, 0, 0, 0, 0,168, 34,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 70, 5, 56, 2, 0, 0, 0, 0,
- 68, 65, 84, 65, 32, 0, 0, 0,232, 35,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,136, 36,201, 3, 0, 0, 0, 0,
- 72, 35,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,
-136, 36,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232, 35,201, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,112, 4, 84, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,200,123,171, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0,120,124,171, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 30,201, 3, 0, 0, 0, 0,
-232, 30,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,120,124,171, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0, 40,125,171, 3, 0, 0, 0, 0,200,123,171, 3, 0, 0, 0, 0, 72, 30,201, 3, 0, 0, 0, 0,
- 40, 32,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 40,125,171, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0,216,125,171, 3, 0, 0, 0, 0,120,124,171, 3, 0, 0, 0, 0,232, 30,201, 3, 0, 0, 0, 0,
-200, 32,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,216,125,171, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0,136,126,171, 3, 0, 0, 0, 0, 40,125,171, 3, 0, 0, 0, 0, 40, 32,201, 3, 0, 0, 0, 0,
-200, 32,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,136,126,171, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0, 56,127,171, 3, 0, 0, 0, 0,216,125,171, 3, 0, 0, 0, 0,168, 29,201, 3, 0, 0, 0, 0,
-104, 33,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 56,127,171, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0,232,127,171, 3, 0, 0, 0, 0,136,126,171, 3, 0, 0, 0, 0,136, 31,201, 3, 0, 0, 0, 0,
-104, 33,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,232,127,171, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0,152,128,171, 3, 0, 0, 0, 0, 56,127,171, 3, 0, 0, 0, 0, 40, 32,201, 3, 0, 0, 0, 0,
- 8, 34,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,152,128,171, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0, 72,129,171, 3, 0, 0, 0, 0,232,127,171, 3, 0, 0, 0, 0,200, 32,201, 3, 0, 0, 0, 0,
- 8, 34,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 72,129,171, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0,248,129,171, 3, 0, 0, 0, 0,152,128,171, 3, 0, 0, 0, 0,104, 33,201, 3, 0, 0, 0, 0,
-168, 34,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,248,129,171, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0,168,130,171, 3, 0, 0, 0, 0, 72,129,171, 3, 0, 0, 0, 0, 8, 34,201, 3, 0, 0, 0, 0,
-168, 34,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,168,130,171, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0, 88,131,171, 3, 0, 0, 0, 0,248,129,171, 3, 0, 0, 0, 0,200, 32,201, 3, 0, 0, 0, 0,
- 72, 35,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 88,131,171, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0, 8,132,171, 3, 0, 0, 0, 0,168,130,171, 3, 0, 0, 0, 0,136, 31,201, 3, 0, 0, 0, 0,
- 72, 35,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 8,132,171, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0,184,132,171, 3, 0, 0, 0, 0, 88,131,171, 3, 0, 0, 0, 0,168, 34,201, 3, 0, 0, 0, 0,
- 72, 35,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,184,132,171, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0,104,133,171, 3, 0, 0, 0, 0, 8,132,171, 3, 0, 0, 0, 0,168, 29,201, 3, 0, 0, 0, 0,
-232, 35,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,104,133,171, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0, 24,134,171, 3, 0, 0, 0, 0,184,132,171, 3, 0, 0, 0, 0, 40, 32,201, 3, 0, 0, 0, 0,
-232, 35,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 24,134,171, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0,200,134,171, 3, 0, 0, 0, 0,104,133,171, 3, 0, 0, 0, 0, 8, 34,201, 3, 0, 0, 0, 0,
-136, 36,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,200,134,171, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0,120,135,171, 3, 0, 0, 0, 0, 24,134,171, 3, 0, 0, 0, 0,104, 33,201, 3, 0, 0, 0, 0,
-136, 36,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,120,135,171, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,134,171, 3, 0, 0, 0, 0,232, 35,201, 3, 0, 0, 0, 0,
-136, 36,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,184, 11,215, 3, 0, 0, 0, 0,
-214, 0, 0, 0, 1, 0, 0, 0,216, 12,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 32,201, 3, 0, 0, 0, 0,
- 72, 30,201, 3, 0, 0, 0, 0,232, 30,201, 3, 0, 0, 0, 0,200, 32,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 70, 5, 0, 0,152, 2, 0, 0,178, 2, 0, 0, 7, 7, 71, 5, 27, 0, 1, 0, 0, 0, 0, 0, 7, 0, 8, 0,
- 72,207,177, 3, 0, 0, 0, 0, 24,199,207, 3, 0, 0, 0, 0, 24,199,207, 3, 0, 0, 0, 0,104,181,214, 3, 0, 0, 0, 0,
- 24,183,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24,196,207, 3, 0, 0, 0, 0,
-216,196,207, 3, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,104,181,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,
- 24,183,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,163, 68, 0, 0, 0, 0, 0, 0,208, 65,
- 0, 0, 0, 0, 0,224,168, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 70, 5, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0,
- 0,192,168, 68, 0, 0,200, 65, 0,192,168, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3,
- 4, 0, 12, 0, 10, 0, 71, 5, 26, 0, 71, 5, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 70, 5, 0, 0,152, 2, 0, 0,177, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 71, 5, 26, 0, 2, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 88, 6,178, 3, 0, 0, 0, 0,120,128,214, 15, 0, 0, 0, 0,120,128,214, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,120, 13,163, 3, 0, 0, 0, 0,216, 19,163, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 24,183,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,104,181,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,240,109, 69, 0, 0,128,192, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,192,168, 68, 0, 0, 0, 0, 0, 0, 0, 64, 70, 5, 0, 0, 87, 5, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0,111, 7, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 69, 5, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 2, 0, 0, 0, 1, 0, 3, 3,
- 2, 0, 0, 4, 10, 0, 87, 5, 2, 0, 70, 5, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,178, 2, 0, 0,178, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 40, 5,178, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,232, 20,163, 3, 0, 0, 0, 0,248,116,208, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,216, 12,215, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,
-248, 13,215, 3, 0, 0, 0, 0,184, 11,215, 3, 0, 0, 0, 0,104, 33,201, 3, 0, 0, 0, 0,168, 34,201, 3, 0, 0, 0, 0,
- 72, 35,201, 3, 0, 0, 0, 0,136, 31,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,113, 4, 0, 0, 70, 5, 0, 0,
- 0, 0, 0, 0, 55, 2, 0, 0, 4, 4,214, 0, 56, 2, 1, 0, 0, 0, 0, 0, 0, 0, 8, 0,248,205,177, 3, 0, 0, 0, 0,
-184,126,199, 3, 0, 0, 0, 0,184,126,199, 3, 0, 0, 0, 0,200,184,214, 3, 0, 0, 0, 0,120,186,214, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24,205,207, 3, 0, 0, 0, 0, 88,195,207, 3, 0, 0, 0, 0,
- 68, 65, 84, 65, 40, 1, 0, 0,200,184,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,120,186,214, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,148, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 86, 67,
- 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,213, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 85, 67, 0, 0,200, 65,
- 0, 0, 85, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,214, 0,
- 26, 0,214, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,113, 4, 0, 0, 70, 5, 0, 0,
- 30, 2, 0, 0, 55, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,214, 0, 26, 0, 4, 0, 1, 0,
- 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 3,178, 3, 0, 0, 0, 0,
-200, 53,163, 3, 0, 0, 0, 0,200, 53,163, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 8,118,208, 3, 0, 0, 0, 0, 56,121,208, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 40, 1, 0, 0,120,186,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-200,184,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,178, 67, 0, 0, 61,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 67,
- 0,128, 7,196, 0, 0, 0, 0,197, 0, 0, 0,214, 0, 0, 0, 0, 0, 0, 0, 29, 2, 0, 0, 0, 0, 0, 0, 74, 1, 0, 0,
- 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,196, 0, 0, 0, 0, 0, 0, 0, 29, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 1, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,214, 0,
- 30, 2,197, 0, 30, 2, 0, 0, 72, 91,192, 15, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,113, 4, 0, 0, 70, 5, 0, 0,
- 0, 0, 0, 0, 29, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,214, 0, 30, 2, 5, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 2,178, 3, 0, 0, 0, 0,
- 8,150,212, 15, 0, 0, 0, 0,152, 72,163, 3, 0, 0, 0, 0,200,213,214, 3, 0, 0, 0, 0,184, 75,215, 3, 0, 0, 0, 0,
- 72,122,208, 3, 0, 0, 0, 0,152,127,208, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 88, 1, 0, 0,200,213,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,168,215,214, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,232, 35,178, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 83, 95,
- 80, 84, 95, 99,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 83, 95,
- 80, 84, 95, 99,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67,111,110,116,101,120,116, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,220,255,197, 0, 36, 0,
- 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,168,215,214, 3, 0, 0, 0, 0,
-213, 0, 0, 0, 1, 0, 0, 0,136,217,214, 3, 0, 0, 0, 0,200,213,214, 3, 0, 0, 0, 0, 40, 34,221, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,114,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,114,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,135,255,197, 0, 61, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 11, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 88, 1, 0, 0,136,217,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,104,219,214, 3, 0, 0, 0, 0,
-168,215,214, 3, 0, 0, 0, 0,200, 35,221, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
- 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
- 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 97,121,101,114,115, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111,255,197, 0, 0, 0,
- 0, 0, 0, 0, 4, 0, 6, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,104,219,214, 3, 0, 0, 0, 0,
-213, 0, 0, 0, 1, 0, 0, 0, 72,221,214, 3, 0, 0, 0, 0,136,217,214, 3, 0, 0, 0, 0,104, 37,221, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,100,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,100,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 83, 78, 0, 0, 8, 1, 0, 0,120,141, 16, 7,
+ 0, 0, 0, 0,210, 0, 0, 0, 1, 0, 0, 0,216,166, 17, 7, 0, 0, 0, 0,248, 32, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 82, 68,101,102, 97,117,108,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140,254,197, 0,203, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 13, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,200,142, 16, 7, 0, 0, 0, 0,120,148, 16, 7, 0, 0, 0, 0,232,148, 16, 7, 0, 0, 0, 0, 88,156, 16, 7,
+ 0, 0, 0, 0,200,156, 16, 7, 0, 0, 0, 0,216,134, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,220,104,118, 1,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,200,142, 16, 7,
+ 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 56,143, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 56,143, 16, 7, 0, 0, 0, 0,211, 0, 0, 0,
+ 1, 0, 0, 0,168,143, 16, 7, 0, 0, 0, 0,200,142, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 98, 4,
+ 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,168,143, 16, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 24,144, 16, 7,
+ 0, 0, 0, 0, 56,143, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 6, 98, 4, 0, 0, 0, 0, 68, 65, 84, 65,
+ 32, 0, 0, 0, 24,144, 16, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,136,144, 16, 7, 0, 0, 0, 0,168,143, 16, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 6, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,136,144, 16, 7,
+ 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,248,144, 16, 7, 0, 0, 0, 0, 24,144, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 64, 4, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,248,144, 16, 7, 0, 0, 0, 0,211, 0, 0, 0,
+ 1, 0, 0, 0,104,145, 16, 7, 0, 0, 0, 0,136,144, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 6, 64, 4,
+ 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,104,145, 16, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,216,145, 16, 7,
+ 0, 0, 0, 0,248,144, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 5, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 32, 0, 0, 0,216,145, 16, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 72,146, 16, 7, 0, 0, 0, 0,104,145, 16, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 5, 64, 4, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 72,146, 16, 7,
+ 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,184,146, 16, 7, 0, 0, 0, 0,216,145, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 5,160, 3, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,184,146, 16, 7, 0, 0, 0, 0,211, 0, 0, 0,
+ 1, 0, 0, 0, 40,147, 16, 7, 0, 0, 0, 0, 72,146, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 6,160, 3,
+ 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 40,147, 16, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,152,147, 16, 7,
+ 0, 0, 0, 0,184,146, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 32, 0, 0, 0,152,147, 16, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 8,148, 16, 7, 0, 0, 0, 0, 40,147, 16, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 5,140, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 8,148, 16, 7,
+ 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,120,148, 16, 7, 0, 0, 0, 0,152,147, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,188, 3, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,120,148, 16, 7, 0, 0, 0, 0,211, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,148, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 5,188, 3,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,232,148, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 88,149, 16, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,143, 16, 7, 0, 0, 0, 0,168,143, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 88,149, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,200,149, 16, 7,
+ 0, 0, 0, 0,232,148, 16, 7, 0, 0, 0, 0, 56,143, 16, 7, 0, 0, 0, 0,136,144, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,200,149, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 56,150, 16, 7,
+ 0, 0, 0, 0, 88,149, 16, 7, 0, 0, 0, 0,168,143, 16, 7, 0, 0, 0, 0,248,144, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 56,150, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,168,150, 16, 7,
+ 0, 0, 0, 0,200,149, 16, 7, 0, 0, 0, 0,136,144, 16, 7, 0, 0, 0, 0,248,144, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,168,150, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 24,151, 16, 7,
+ 0, 0, 0, 0, 56,150, 16, 7, 0, 0, 0, 0,200,142, 16, 7, 0, 0, 0, 0,104,145, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 24,151, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,136,151, 16, 7,
+ 0, 0, 0, 0,168,150, 16, 7, 0, 0, 0, 0, 24,144, 16, 7, 0, 0, 0, 0,104,145, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,136,151, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,248,151, 16, 7,
+ 0, 0, 0, 0, 24,151, 16, 7, 0, 0, 0, 0,136,144, 16, 7, 0, 0, 0, 0,216,145, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,248,151, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,104,152, 16, 7,
+ 0, 0, 0, 0,136,151, 16, 7, 0, 0, 0, 0,248,144, 16, 7, 0, 0, 0, 0,216,145, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,104,152, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,216,152, 16, 7,
+ 0, 0, 0, 0,248,151, 16, 7, 0, 0, 0, 0,104,145, 16, 7, 0, 0, 0, 0, 72,146, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,216,152, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 72,153, 16, 7,
+ 0, 0, 0, 0,104,152, 16, 7, 0, 0, 0, 0,216,145, 16, 7, 0, 0, 0, 0, 72,146, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 72,153, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,184,153, 16, 7,
+ 0, 0, 0, 0,216,152, 16, 7, 0, 0, 0, 0,248,144, 16, 7, 0, 0, 0, 0,184,146, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,184,153, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 40,154, 16, 7,
+ 0, 0, 0, 0, 72,153, 16, 7, 0, 0, 0, 0, 24,144, 16, 7, 0, 0, 0, 0,184,146, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 40,154, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,152,154, 16, 7,
+ 0, 0, 0, 0,184,153, 16, 7, 0, 0, 0, 0, 72,146, 16, 7, 0, 0, 0, 0,184,146, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,152,154, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 8,155, 16, 7,
+ 0, 0, 0, 0, 40,154, 16, 7, 0, 0, 0, 0,200,142, 16, 7, 0, 0, 0, 0, 40,147, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 8,155, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,120,155, 16, 7,
+ 0, 0, 0, 0,152,154, 16, 7, 0, 0, 0, 0,104,145, 16, 7, 0, 0, 0, 0,152,147, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,120,155, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,232,155, 16, 7,
+ 0, 0, 0, 0, 8,155, 16, 7, 0, 0, 0, 0, 40,147, 16, 7, 0, 0, 0, 0,152,147, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,232,155, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 88,156, 16, 7,
+ 0, 0, 0, 0,120,155, 16, 7, 0, 0, 0, 0,136,144, 16, 7, 0, 0, 0, 0, 40,147, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 88,156, 16, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,232,155, 16, 7, 0, 0, 0, 0,216,145, 16, 7, 0, 0, 0, 0,152,147, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,200,156, 16, 7, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,152,160, 16, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136,144, 16, 7, 0, 0, 0, 0, 56,143, 16, 7, 0, 0, 0, 0,168,143, 16, 7,
+ 0, 0, 0, 0,248,144, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 6, 0, 0, 65, 4, 0, 0,
+ 98, 4, 0, 0, 7, 7, 63, 6, 34, 0, 1, 0, 0, 0, 0, 0, 7, 0, 8, 0,184,206,240, 6, 0, 0, 0, 0, 72,166, 17, 7,
+ 0, 0, 0, 0, 72,166, 17, 7, 0, 0, 0, 0,184,157, 16, 7, 0, 0, 0, 0, 40,159, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184, 79, 55, 8, 0, 0, 0, 0,232,143,100, 7, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0,184,157, 16, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 40,159, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0,128,188, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,224,199, 68, 0, 0, 0, 0,
+ 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 62, 6, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,192,199, 68, 0, 0,200, 65, 0,192,199, 68,
+ 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 63, 6, 26, 0, 63, 6,
+ 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 6, 0, 0, 65, 4, 0, 0,
+ 90, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 6, 26, 0, 2, 0, 1, 0, 2, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,208,240, 6, 0, 0, 0, 0,168, 67, 66, 8,
+ 0, 0, 0, 0,168, 67, 66, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,252, 31, 7,
+ 0, 0, 0, 0, 8,191, 31, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0, 40,159, 16, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184,157, 16, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0,192,239, 68, 0, 0, 0, 0, 0, 0,200, 65, 0, 0, 0, 0, 0,192,197, 68, 0, 0,128, 64,
+ 0, 0, 64, 65, 46, 6, 0, 0, 63, 6, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, 0, 0, 0, 0,
+ 17, 0, 0, 0, 0, 0, 0, 0, 45, 6, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 2, 0, 0, 0, 1, 0, 3, 3, 2, 0, 0, 4, 10, 0, 63, 6, 8, 0, 46, 6,
+ 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 6, 0, 0, 91, 4, 0, 0,
+ 98, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 6, 8, 0, 3, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216,207,240, 6, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184,194, 31, 7,
+ 0, 0, 0, 0,104,205, 31, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+160, 0, 0, 0,152,160, 16, 7, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,104,201, 16, 7, 0, 0, 0, 0,200,156, 16, 7,
+ 0, 0, 0, 0,104,145, 16, 7, 0, 0, 0, 0, 72,146, 16, 7, 0, 0, 0, 0,184,146, 16, 7, 0, 0, 0, 0, 24,144, 16, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 5, 0, 0, 62, 6, 0, 0, 0, 0, 0, 0,159, 3, 0, 0, 4, 4,250, 0,
+160, 3, 1, 0, 0, 0, 0, 0, 0, 0, 8, 0, 88,202,240, 6, 0, 0, 0, 0, 40,200, 16, 7, 0, 0, 0, 0, 40,200, 16, 7,
+ 0, 0, 0, 0,136,161, 16, 7, 0, 0, 0, 0,248,162, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,104,160, 31, 7, 0, 0, 0, 0,216,106, 56, 8, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,136,161, 16, 7,
+ 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,248,162, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,148, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,122, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+249, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0,121, 67, 0, 0,200, 65, 0, 0,121, 67, 0, 0,200, 65, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,250, 0, 26, 0,250, 0, 26, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 5, 0, 0, 62, 6, 0, 0,134, 3, 0, 0,159, 3, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,250, 0, 26, 0, 4, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,205,240, 6, 0, 0, 0, 0,232, 93, 53, 8, 0, 0, 0, 0,232, 93, 53, 8,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,159, 56, 8, 0, 0, 0, 0, 24, 1, 32, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,248,162, 16, 7,
+ 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136,161, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0,128,178, 67, 0,128, 97,196, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0,105, 67, 3,128, 97,196, 0, 0, 0, 0,233, 0, 0, 0,
+250, 0, 0, 0, 0, 0, 0, 0,133, 3, 0, 0, 0, 0, 0, 0, 74, 1, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,
+232, 0, 0, 0, 0, 0, 0, 0,133, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,
+ 0, 0, 0, 64, 10, 3, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,250, 0,134, 3,233, 0,134, 3, 0, 0,168,160, 50, 8,
+ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 69, 5, 0, 0, 62, 6, 0, 0, 0, 0, 0, 0,133, 3, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,250, 0,134, 3, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120,203,240, 6, 0, 0, 0, 0, 40,136, 55, 8, 0, 0, 0, 0,200, 28, 49, 8,
+ 0, 0, 0, 0,104,164, 16, 7, 0, 0, 0, 0,136,198, 16, 7, 0, 0, 0, 0,184, 2, 32, 7, 0, 0, 0, 0,152, 7, 32, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,104,164, 16, 7,
+ 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 8,166, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,104,204,240, 6,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 83, 95, 80, 84, 95, 99,111,110,116,101,120,116, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 83, 95, 80, 84, 95, 99,111,110,116,101,120,116, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,220,255,233, 0, 36, 0, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 8,166, 16, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,168,167, 16, 7,
+ 0, 0, 0, 0,104,164, 16, 7, 0, 0, 0, 0,200,233,137, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,114,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,114,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82,101,110,100,
+101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,135,255,
+233, 0, 61, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,168,167, 16, 7,
+ 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 72,169, 16, 7, 0, 0, 0, 0, 8,166, 16, 7, 0, 0, 0, 0, 56,236,137, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111,255,233, 0, 0, 0, 0, 0, 0, 0, 4, 0, 6, 0, 0, 0, 0, 0,
+ 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 72,169, 16, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,232,170, 16, 7,
+ 0, 0, 0, 0,168,167, 16, 7, 0, 0, 0, 0,168,238,137, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,100,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,100,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,105,109,101,
+110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140,254,
+233, 0,203, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,232,170, 16, 7,
+ 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,136,172, 16, 7, 0, 0, 0, 0, 72,169, 16, 7, 0, 0, 0, 0, 24,241,137, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105,
+110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105,
+110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65,110,116,105, 45, 65,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58,254,233, 0, 58, 0, 20, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
+ 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,136,172, 16, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 40,174, 16, 7,
+ 0, 0, 0, 0,232,170, 16, 7, 0, 0, 0, 0,136,243,137, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,109,111,116,105,111,110, 95, 98,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,109,111,116,105,111,110, 95, 98,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 97,109,112,
+108,101,100, 32, 77,111,116,105,111,110, 32, 66,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,254,
+233, 0, 0, 0, 20, 0, 0, 0, 4, 0, 6, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 40,174, 16, 7,
+ 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,200,175, 16, 7, 0, 0, 0, 0,136,172, 16, 7, 0, 0, 0, 0,184,143, 97, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,104, 97,100,105,110,103, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 88, 1, 0, 0, 72,221,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,184, 43,215, 3, 0, 0, 0, 0,
-104,219,214, 3, 0, 0, 0, 0, 8, 39,221, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
- 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
- 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65,110,116,105, 45, 65,108,105,
- 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58,254,197, 0, 58, 0,
- 20, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,104, 97,100,105,110,103, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,184, 43,215, 3, 0, 0, 0, 0,
-213, 0, 0, 0, 1, 0, 0, 0,152, 45,215, 3, 0, 0, 0, 0, 72,221,214, 3, 0, 0, 0, 0,168, 40,221, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,109,111,116,105,111,110, 95, 98,108,117,114, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10,254,233, 0, 0, 0, 0, 0, 0, 0, 4, 0, 6, 0, 0, 0, 0, 0,
+ 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,109,111,116,105,111,110, 95, 98,108,117,114, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 83, 97,109,112,108,101,100, 32, 77,111,116,105,111,110, 32, 66,108,117,114, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,200,175, 16, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,104,177, 16, 7,
+ 0, 0, 0, 0, 40,174, 16, 7, 0, 0, 0, 0, 24,253,137, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,112,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,112,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,101,114,102,
+111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,242,253,
+233, 0, 0, 0, 0, 0, 0, 0, 4, 0, 6, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,254,197, 0, 0, 0, 20, 0, 0, 0, 4, 0, 6, 0, 0, 0, 0, 0, 15, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,104,177, 16, 7,
+ 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 8,179, 16, 7, 0, 0, 0, 0,200,175, 16, 7, 0, 0, 0, 0,136,255,137, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,111,115,116, 95,112,114,111, 99,101,
+115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,111,115,116, 95,112,114,111, 99,101,
+115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,111,115,116, 32, 80,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,218,253,233, 0, 0, 0, 0, 0, 0, 0, 4, 0, 6, 0, 0, 0, 0, 0,
+ 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 88, 1, 0, 0,152, 45,215, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,120, 47,215, 3, 0, 0, 0, 0,
-184, 43,215, 3, 0, 0, 0, 0, 72, 42,221, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
- 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
- 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,104, 97,100,105,110,103, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10,254,197, 0, 0, 0,
- 0, 0, 0, 0, 4, 0, 6, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 8,179, 16, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,168,180, 16, 7,
+ 0, 0, 0, 0,104,177, 16, 7, 0, 0, 0, 0,248, 1,138, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,116, 97,109,
+112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,194,253,
+233, 0, 0, 0, 20, 0, 0, 0, 4, 0, 6, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,120, 47,215, 3, 0, 0, 0, 0,
-213, 0, 0, 0, 1, 0, 0, 0, 88, 49,215, 3, 0, 0, 0, 0,152, 45,215, 3, 0, 0, 0, 0,232, 43,221, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,168,180, 16, 7,
+ 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 72,182, 16, 7, 0, 0, 0, 0, 8,179, 16, 7, 0, 0, 0, 0,104, 4,138, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,111,117,116,112,117,116, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,111,117,116,112,117,116, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 80,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,242,253,197, 0, 0, 0, 0, 0, 0, 0, 4, 0, 6, 0, 0, 0, 0, 0, 17, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36,253,233, 0,134, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
+ 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 72,182, 16, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,232,183, 16, 7,
+ 0, 0, 0, 0,168,180, 16, 7, 0, 0, 0, 0, 72, 9,138, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95, 98, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95, 98, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 97,107,101,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 88, 1, 0, 0, 88, 49,215, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 56, 51,215, 3, 0, 0, 0, 0,
-120, 47,215, 3, 0, 0, 0, 0,136, 45,221, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
- 84, 95,112,111,115,116, 95,112,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
- 84, 95,112,111,115,116, 95,112,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,111,115,116, 32, 80,114,111,
- 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,218,253,197, 0, 0, 0,
- 0, 0, 0, 0, 4, 0, 6, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12,253,
+233, 0, 0, 0, 0, 0, 0, 0, 4, 0, 7, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 56, 51,215, 3, 0, 0, 0, 0,
-213, 0, 0, 0, 1, 0, 0, 0, 24, 53,215, 3, 0, 0, 0, 0, 88, 49,215, 3, 0, 0, 0, 0, 72, 48,221, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,232,183, 16, 7,
+ 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,136,185, 16, 7, 0, 0, 0, 0, 72,182, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,115, 99,101,110,101, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,115, 99,101,110,101, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 83,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 99,101,110,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,194,253,197, 0, 0, 0, 20, 0, 0, 0, 4, 0, 6, 0, 0, 0, 0, 0, 19, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,135,255, 41, 1, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,136,185, 16, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 40,187, 16, 7,
+ 0, 0, 0, 0,232,183, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78,
+ 69, 95, 80, 84, 95,117,110,105,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78,
+ 69, 95, 80, 84, 95,117,110,105,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 85,110,105,116,
+115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28,255,
+ 41, 1, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 88, 1, 0, 0, 24, 53,215, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,248, 54,215, 3, 0, 0, 0, 0,
- 56, 51,215, 3, 0, 0, 0, 0,232, 49,221, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
- 84, 95,111,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
- 84, 95,111,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79,117,116,112,117,116, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36,253,197, 0,134, 0,
- 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 40,187, 16, 7,
+ 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,200,188, 16, 7, 0, 0, 0, 0,136,185, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,107,101,121,105,110,103, 95,115,101,116,115,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,107,101,121,105,110,103, 95,115,101,116,115,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,248, 54,215, 3, 0, 0, 0, 0,
-213, 0, 0, 0, 1, 0, 0, 0,216, 56,215, 3, 0, 0, 0, 0, 24, 53,215, 3, 0, 0, 0, 0, 40, 53,221, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 98, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75,101,121,105,110,103, 32, 83,101,116,115, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 98, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191,254, 41, 1, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12,253,197, 0, 0, 0, 0, 0, 0, 0, 4, 0, 7, 0, 0, 0, 0, 0, 21, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,200,188, 16, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,104,190, 16, 7,
+ 0, 0, 0, 0, 40,187, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78,
+ 69, 95, 80, 84, 95,112,104,121,115,105, 99,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78,
+ 69, 95, 80, 84, 95,112,104,121,115,105, 99,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71,114, 97,118,
+105,116,121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,131,254,
+ 41, 1, 36, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,104,190, 16, 7,
+ 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 8,192, 16, 7, 0, 0, 0, 0,200,188, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,115,105,109,112,108,105,102,121, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 88, 1, 0, 0,216, 56,215, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,184, 58,215, 3, 0, 0, 0, 0,
-248, 54,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84,
- 95,115, 99,101,110,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84,
- 95,115, 99,101,110,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 99,101,110,101, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,115,105,109,112,108,105,102,121, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,135,255, 41, 1, 61, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,105,109,112,108,105,102,121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27,254, 41, 1, 80, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,184, 58,215, 3, 0, 0, 0, 0,
-213, 0, 0, 0, 1, 0, 0, 0,152, 60,215, 3, 0, 0, 0, 0,216, 56,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,117,110,105,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,117,110,105,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 8,192, 16, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,168,193, 16, 7,
+ 0, 0, 0, 0,104,190, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78,
+ 69, 95, 80, 84, 95, 99,117,115,116,111,109, 95,112,114,111,112,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78,
+ 69, 95, 80, 84, 95, 99,117,115,116,111,109, 95,112,114,111,112,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67,117,115,116,
+111,109, 32, 80,114,111,112,101,114,116,105,101,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,223,253,
+ 41, 1, 36, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 85,110,105,116,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28,255, 41, 1, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,168,193, 16, 7,
+ 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 72,195, 16, 7, 0, 0, 0, 0, 8,192, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 69, 88, 84, 85, 82, 69, 95, 80, 84, 95, 99,111,110,116,101,120,116, 95,116,
+101,120,116,117,114,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 69, 88, 84, 85, 82, 69, 95, 80, 84, 95, 99,111,110,116,101,120,116, 95,116,
+101,120,116,117,114,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16,255,187, 0,204, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 18, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 88, 1, 0, 0,152, 60,215, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,120, 62,215, 3, 0, 0, 0, 0,
-184, 58,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84,
- 95,107,101,121,105,110,103, 95,115,101,116,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84,
- 95,107,101,121,105,110,103, 95,115,101,116,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75,101,121,105,110,103, 32, 83,
-101,116,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191,254, 41, 1, 69, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,120, 62,215, 3, 0, 0, 0, 0,
-213, 0, 0, 0, 1, 0, 0, 0, 88, 64,215, 3, 0, 0, 0, 0,152, 60,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,112,104,121,115,105, 99,115, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 72,195, 16, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,232,196, 16, 7,
+ 0, 0, 0, 0,168,193, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 69, 88, 84,
+ 85, 82, 69, 95, 80, 84, 95,109, 97,112,112,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 69, 88, 84,
+ 85, 82, 69, 95, 80, 84, 95,109, 97,112,112,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 97,112,112,
+105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77,254,
+187, 0,171, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,112,104,121,115,105, 99,115, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 71,114, 97,118,105,116,121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,232,196, 16, 7,
+ 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,136,198, 16, 7, 0, 0, 0, 0, 72,195, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 69, 88, 84, 85, 82, 69, 95, 80, 84, 95,105,110,102,108,117,101,110, 99,101,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,131,254, 41, 1, 36, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 69, 88, 84, 85, 82, 69, 95, 80, 84, 95,105,110,102,108,117,101,110, 99,101,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73,110,102,108,117,101,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,223,252,187, 0, 86, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 88, 1, 0, 0, 88, 64,215, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 56, 66,215, 3, 0, 0, 0, 0,
-120, 62,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84,
- 95,115,105,109,112,108,105,102,121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84,
- 95,115,105,109,112,108,105,102,121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,105,109,112,108,105,102,121,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27,254, 41, 1, 80, 0,
- 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,136,198, 16, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,232,196, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 66, 74, 69,
+ 67, 84, 95, 80, 84, 95, 99,111,110,115,116,114, 97,105,110,116,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 66, 74, 69,
+ 67, 84, 95, 80, 84, 95, 99,111,110,115,116,114, 97,105,110,116,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 98,106,101,
+ 99,116, 32, 67,111,110,115,116,114, 97,105,110,116,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160,255,
+187, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 56, 66,215, 3, 0, 0, 0, 0,
-213, 0, 0, 0, 1, 0, 0, 0, 24, 68,215, 3, 0, 0, 0, 0, 88, 64,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95, 99,117,115,116,111,109, 95,112,114,111,112,115, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0, 40,200, 16, 7,
+ 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95, 99,117,115,116,111,109, 95,112,114,111,112,115, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 67,117,115,116,111,109, 32, 80,114,111,112,101,114,116,105,101,115, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,223,253, 41, 1, 36, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0,
+ 0, 0, 0, 0,232,246, 49, 8, 0, 0, 0, 0,255, 21, 0, 0,160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,104,201, 16, 7, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 88,206, 16, 7,
+ 0, 0, 0, 0,152,160, 16, 7, 0, 0, 0, 0,200,142, 16, 7, 0, 0, 0, 0, 40,147, 16, 7, 0, 0, 0, 0,152,147, 16, 7,
+ 0, 0, 0, 0,104,145, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 5, 0, 0, 0, 0, 0, 0,
+139, 0, 0, 0, 15, 15, 68, 5,140, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,158,240, 6, 0, 0, 0, 0, 56,205, 16, 7,
+ 0, 0, 0, 0, 56,205, 16, 7, 0, 0, 0, 0, 88,202, 16, 7, 0, 0, 0, 0,200,203, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136,195, 31, 7, 0, 0, 0, 0,232,201, 31, 7, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0, 88,202, 16, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,200,203, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 96,146, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,128,168, 68, 0, 0, 0, 0,
+ 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 67, 5, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 96,168, 68, 0, 0,200, 65, 0, 96,168, 68,
+ 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 68, 5, 26, 0, 68, 5,
+ 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 5, 0, 0, 0, 0, 0, 0,
+ 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 5, 26, 0, 6, 0, 1, 0, 2, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,160,240, 6, 0, 0, 0, 0,136,188, 50, 8,
+ 0, 0, 0, 0,136,188, 50, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 9, 32, 7,
+ 0, 0, 0, 0,152,250, 31, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0,200,203, 16, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,202, 16, 7,
+ 0, 0, 0, 0, 0, 0, 64,192, 0, 0,126, 67, 0, 0, 0, 0, 0, 0, 72, 66, 88,218,103,194, 40,147,141, 67, 0, 0, 0, 0,
+ 0, 0, 72, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 5, 0, 0, 0, 0, 0, 0,
+ 17, 0, 0, 0, 0, 0, 0, 0, 67, 5, 0, 0, 18, 0, 0, 0,113, 0, 0, 0, 0, 0,128, 63, 0, 0, 72, 66, 0,124,146, 72,
+ 0, 0, 72, 66,205,204,204, 61, 0, 0, 32, 65, 72, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, 4, 8, 0, 68, 5,114, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 5, 0, 0, 26, 0, 0, 0,
+139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 5,114, 0, 7, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,159,240, 6, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,236, 31, 7,
+ 0, 0, 0, 0, 88,247, 31, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+208, 0, 0, 0, 56,205, 16, 7, 0, 0, 0, 0,190, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0,
+ 1, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, 88,206, 16, 7, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,216,134, 17, 7,
+ 0, 0, 0, 0,104,201, 16, 7, 0, 0, 0, 0, 72,146, 16, 7, 0, 0, 0, 0,216,145, 16, 7, 0, 0, 0, 0,248,144, 16, 7,
+ 0, 0, 0, 0,184,146, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 5, 0, 0, 62, 6, 0, 0,161, 3, 0, 0,
+ 63, 4, 0, 0, 3, 3,250, 0,159, 0, 1, 0, 0, 0, 0, 0, 0, 0, 8, 0, 40,155,240, 6, 0, 0, 0, 0, 40,210, 16, 7,
+ 0, 0, 0, 0, 40,210, 16, 7, 0, 0, 0, 0, 72,207, 16, 7, 0, 0, 0, 0,184,208, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,206, 31, 7, 0, 0, 0, 0, 56,216, 31, 7, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0, 72,207, 16, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,184,208, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0,128,244, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,122, 67, 0, 0, 0, 0,
+ 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,249, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0,121, 67, 0, 0,200, 65, 0, 0,121, 67,
+ 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,250, 0, 26, 0,250, 0,
+ 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 5, 0, 0, 62, 6, 0, 0, 38, 4, 0, 0,
+ 63, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,250, 0, 26, 0, 8, 0, 1, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,157,240, 6, 0, 0, 0, 0, 88, 17, 32, 7,
+ 0, 0, 0, 0, 88, 17, 32, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,248, 31, 7,
+ 0, 0, 0, 0,168,213, 31, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0,184,208, 16, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,207, 16, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0,128,141, 67, 0, 0,244,194, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,106, 67, 0, 0,230,194,
+ 0, 0, 0, 0,233, 0, 0, 0,250, 0, 0, 0, 18, 0, 0, 0,132, 0, 0, 0, 0, 0, 0, 0,232, 0, 0, 0, 0, 0, 0, 0,
+ 17, 0, 0, 0, 0, 0, 0, 0,232, 0, 0, 0, 18, 0, 0, 0,132, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 18, 0, 0, 0, 2, 0, 3, 3, 0, 0, 12, 4, 6, 0,250, 0,133, 0,233, 0,
+115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 5, 0, 0, 62, 6, 0, 0,161, 3, 0, 0,
+ 37, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,250, 0,133, 0, 9, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,156,240, 6, 0, 0, 0, 0,232,227, 50, 8,
+ 0, 0, 0, 0,232,227, 50, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,209, 50, 8,
+ 0, 0, 0, 0,184, 15, 32, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 24, 1, 0, 0, 40,210, 16, 7, 0, 0, 0, 0,183, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 88, 1, 0, 0, 24, 68,215, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,248, 69,215, 3, 0, 0, 0, 0,
- 56, 66,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 69, 88, 84, 85, 82, 69, 95,
- 80, 84, 95, 99,111,110,116,101,120,116, 95,116,101,120,116,117,114,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 69, 88, 84, 85, 82, 69, 95,
- 80, 84, 95, 99,111,110,116,101,120,116, 95,116,101,120,116,117,114,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16,255,187, 0,204, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 5, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,104,205, 55, 8,
+ 0, 0, 0, 0,104,205, 55, 8, 0, 0, 0, 0,136,211, 16, 7, 0, 0, 0, 0, 0,115,101, 32, 83, 99,117,108,112,116, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 68, 65, 84, 65, 16, 0, 0, 0,136,211, 16, 7, 0, 0, 0, 0,237, 0, 0, 0,
+ 1, 0, 0, 0, 42, 11, 0, 0, 42, 11, 0, 0,232,211, 16, 7, 0, 0, 0, 0, 68, 65, 84, 65,160,178, 0, 0,232,211, 16, 7,
+ 0, 0, 0, 0,236, 0, 0, 0, 42, 11, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0,200,189, 18, 7, 0, 0, 0, 0, 19, 0, 0, 0,
+ 1, 0, 1, 0,200,189, 18, 7, 0, 0, 0, 0, 20, 0, 0, 0, 1, 0, 1, 0,200,189, 18, 7, 0, 0, 0, 0, 21, 0, 1, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,120,216, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 1, 0,232,225, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,136, 24, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 1, 0,200,239, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,216, 5, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 1, 0, 40,233, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,184,211, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 1, 0, 72,219, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,168,210, 18, 7, 0, 0, 0, 0, 21, 0, 0, 0,
+ 1, 0, 1, 0,200,189, 18, 7, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 20, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 22, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 24, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 26, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 28, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 30, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 32, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 34, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 36, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 38, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 40, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 42, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 44, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 46, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 48, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 20, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 22, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 24, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 26, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 28, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 30, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 32, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 34, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 36, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 38, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 31, 0, 40, 0,
+ 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 30, 0,255,255,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 30, 0,255,255,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 30, 0,255,255,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 30, 0,255,255,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 30, 0,255,255,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 30, 0,255,255,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 30, 0,255,255,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 30, 0,255,255,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 30, 0,255,255,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 30, 0,255,255,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 30, 0,255,255,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 30, 0,255,255,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 30, 0,255,255,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 30, 0,255,255,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 30, 0,255,255,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 1, 0,
+ 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 3, 0,
+ 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 5, 0,
+ 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 7, 0,
+ 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 9, 0,
+ 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 11, 0,
+ 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 13, 0,
+ 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 15, 0,
+ 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 17, 0,
+ 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 19, 0,
+ 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 21, 0,
+ 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 23, 0,
+ 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 25, 0,
+ 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 27, 0,
+ 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 29, 0,
+ 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 31, 0,
+ 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 33, 0,
+ 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 35, 0,
+ 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 37, 0,
+ 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 39, 0,
+ 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 41, 0,
+ 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 43, 0,
+ 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 45, 0,
+ 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 47, 0,
+ 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 49, 0,
+ 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 51, 0,
+ 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 53, 0,
+ 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 55, 0,
+ 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 57, 0,
+ 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 59, 0,
+ 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 61, 0,
+ 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 63, 0,
+ 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 65, 0,
+ 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 67, 0,
+ 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 31, 0, 69, 0,
+ 1, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,168,210, 18, 7, 0, 0, 0, 0, 30, 0,255,255,
+ 1, 0, 0, 0,184,211, 18, 7, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 30, 0,255,255,
+ 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 30, 0,255,255, 3, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 30, 0,255,255,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 30, 0,255,255,
+ 1, 0, 0, 0, 8,189, 15, 7, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,248, 32, 16, 7, 0, 0, 0, 0, 30, 0,255,255,
+ 1, 0, 0, 0,120,141, 16, 7, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,216,166, 17, 7, 0, 0, 0, 0, 30, 0,255,255,
+ 1, 0, 0, 0,232,246, 17, 7, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 88, 70, 18, 7, 0, 0, 0, 0, 30, 0,255,255,
+ 1, 0, 0, 0,120,141, 18, 7, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,216, 5, 19, 7, 0, 0, 0, 0, 30, 0,255,255,
+ 1, 0, 0, 0, 24,186, 15, 7, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,120,216, 18, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 20, 0,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 22, 0,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 24, 0,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 26, 0,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 28, 0,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 30, 0,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 32, 0,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 34, 0,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 36, 0,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 38, 0,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 40, 0,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 42, 0,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 44, 0,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 46, 0,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 48, 0,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 50, 0,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 52, 0,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 54, 0,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 56, 0,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 58, 0,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 60, 0,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 62, 0,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 64, 0,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 66, 0,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 68, 0,
+ 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 20, 0,
+ 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 22, 0,
+ 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 24, 0,
+ 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 26, 0,
+ 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 28, 0,
+ 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 30, 0,
+ 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 32, 0,
+ 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 34, 0,
+ 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 36, 0,
+ 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 38, 0,
+ 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 40, 0,
+ 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 42, 0,
+ 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 44, 0,
+ 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 46, 0,
+ 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 48, 0,
+ 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 50, 0,
+ 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 52, 0,
+ 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 54, 0,
+ 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 56, 0,
+ 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 58, 0,
+ 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 60, 0,
+ 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 62, 0,
+ 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 64, 0,
+ 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 66, 0,
+ 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 68, 0,
+ 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 20, 0,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 22, 0,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 24, 0,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 26, 0,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 28, 0,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 30, 0,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 32, 0,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 34, 0,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 36, 0,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 38, 0,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 40, 0,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 42, 0,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 44, 0,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 46, 0,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 48, 0,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 50, 0,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 52, 0,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 54, 0,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 56, 0,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 58, 0,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 60, 0,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 62, 0,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 64, 0,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 66, 0,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 68, 0,
+ 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 20, 0,
+ 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 22, 0,
+ 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 24, 0,
+ 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 26, 0,
+ 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 28, 0,
+ 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 30, 0,
+ 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 32, 0,
+ 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 34, 0,
+ 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 36, 0,
+ 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 38, 0,
+ 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 40, 0,
+ 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 42, 0,
+ 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 44, 0,
+ 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 46, 0,
+ 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 48, 0,
+ 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 50, 0,
+ 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 52, 0,
+ 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 54, 0,
+ 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 56, 0,
+ 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 58, 0,
+ 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 60, 0,
+ 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 62, 0,
+ 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 64, 0,
+ 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 66, 0,
+ 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 68, 0,
+ 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 20, 0,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 22, 0,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 24, 0,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 26, 0,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 28, 0,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 30, 0,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 32, 0,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 34, 0,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 36, 0,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 38, 0,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 40, 0,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 42, 0,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 44, 0,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 46, 0,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 48, 0,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 50, 0,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 52, 0,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 54, 0,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 56, 0,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 58, 0,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 60, 0,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 62, 0,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 64, 0,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 66, 0,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 68, 0,
+ 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 20, 0,
+ 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 22, 0,
+ 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 24, 0,
+ 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 26, 0,
+ 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 28, 0,
+ 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 30, 0,
+ 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 32, 0,
+ 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 34, 0,
+ 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 36, 0,
+ 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 38, 0,
+ 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 40, 0,
+ 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 42, 0,
+ 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 44, 0,
+ 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 46, 0,
+ 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 48, 0,
+ 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 50, 0,
+ 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 52, 0,
+ 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 54, 0,
+ 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 56, 0,
+ 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 58, 0,
+ 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 60, 0,
+ 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 62, 0,
+ 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 64, 0,
+ 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 66, 0,
+ 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 68, 0,
+ 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 20, 0,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 22, 0,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 24, 0,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 26, 0,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 28, 0,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 30, 0,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 32, 0,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 34, 0,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 36, 0,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 38, 0,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 40, 0,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 42, 0,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 44, 0,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 46, 0,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 48, 0,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 50, 0,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 52, 0,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 54, 0,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 56, 0,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 58, 0,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 60, 0,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 62, 0,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 64, 0,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 66, 0,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 68, 0,
+ 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 20, 0,
+ 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 22, 0,
+ 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 24, 0,
+ 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 26, 0,
+ 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 28, 0,
+ 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 30, 0,
+ 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 32, 0,
+ 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 34, 0,
+ 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 36, 0,
+ 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 38, 0,
+ 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 40, 0,
+ 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 42, 0,
+ 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 44, 0,
+ 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 46, 0,
+ 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 48, 0,
+ 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 50, 0,
+ 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 52, 0,
+ 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 54, 0,
+ 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 56, 0,
+ 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 58, 0,
+ 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 60, 0,
+ 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 62, 0,
+ 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 64, 0,
+ 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 66, 0,
+ 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 68, 0,
+ 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 20, 0,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 22, 0,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 24, 0,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 26, 0,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 28, 0,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 30, 0,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 32, 0,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 34, 0,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 36, 0,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 38, 0,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 40, 0,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 42, 0,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 44, 0,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 46, 0,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 48, 0,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 50, 0,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 52, 0,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 54, 0,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 56, 0,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 58, 0,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 60, 0,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 62, 0,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 64, 0,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 66, 0,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 68, 0,
+ 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 20, 0,
+ 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 22, 0,
+ 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 24, 0,
+ 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 26, 0,
+ 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 28, 0,
+ 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 30, 0,
+ 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 32, 0,
+ 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 34, 0,
+ 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 36, 0,
+ 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 38, 0,
+ 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 40, 0,
+ 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 42, 0,
+ 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 44, 0,
+ 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 46, 0,
+ 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 48, 0,
+ 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 50, 0,
+ 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 52, 0,
+ 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 54, 0,
+ 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 56, 0,
+ 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 58, 0,
+ 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 60, 0,
+ 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 62, 0,
+ 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 64, 0,
+ 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 66, 0,
+ 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 68, 0,
+ 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 20, 0,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 22, 0,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 24, 0,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 26, 0,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 28, 0,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 30, 0,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 32, 0,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 34, 0,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 36, 0,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 38, 0,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 40, 0,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 42, 0,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 44, 0,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 46, 0,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 48, 0,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 50, 0,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 52, 0,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 54, 0,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 56, 0,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 58, 0,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 60, 0,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 62, 0,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 64, 0,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 66, 0,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 68, 0,
+ 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 20, 0,
+ 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 22, 0,
+ 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 24, 0,
+ 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 26, 0,
+ 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 28, 0,
+ 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 30, 0,
+ 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 32, 0,
+ 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 34, 0,
+ 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 36, 0,
+ 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 38, 0,
+ 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 40, 0,
+ 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 42, 0,
+ 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 44, 0,
+ 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 46, 0,
+ 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 48, 0,
+ 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 50, 0,
+ 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 52, 0,
+ 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 54, 0,
+ 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 56, 0,
+ 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 58, 0,
+ 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 60, 0,
+ 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 62, 0,
+ 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 64, 0,
+ 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 66, 0,
+ 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 68, 0,
+ 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 20, 0,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 22, 0,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 24, 0,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 26, 0,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 28, 0,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 30, 0,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 32, 0,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 34, 0,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 36, 0,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 38, 0,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 40, 0,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 42, 0,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 44, 0,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 46, 0,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 48, 0,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 50, 0,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 52, 0,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 54, 0,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 56, 0,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 58, 0,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 60, 0,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 62, 0,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 64, 0,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 66, 0,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 68, 0,
+ 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 20, 0,
+ 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 22, 0,
+ 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 24, 0,
+ 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 26, 0,
+ 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 28, 0,
+ 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 30, 0,
+ 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 32, 0,
+ 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 34, 0,
+ 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 36, 0,
+ 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 38, 0,
+ 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 40, 0,
+ 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 42, 0,
+ 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 44, 0,
+ 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 46, 0,
+ 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 48, 0,
+ 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 50, 0,
+ 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 52, 0,
+ 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 54, 0,
+ 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 56, 0,
+ 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 58, 0,
+ 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 60, 0,
+ 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 62, 0,
+ 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 64, 0,
+ 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 66, 0,
+ 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 68, 0,
+ 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 20, 0,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 22, 0,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 24, 0,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 26, 0,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 28, 0,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 30, 0,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 32, 0,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 34, 0,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 36, 0,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 38, 0,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 40, 0,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 42, 0,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 44, 0,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 46, 0,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 48, 0,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 50, 0,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 52, 0,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 54, 0,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 56, 0,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 58, 0,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 60, 0,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 62, 0,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 64, 0,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 66, 0,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 68, 0,
+ 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 20, 0,
+ 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 22, 0,
+ 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 24, 0,
+ 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 26, 0,
+ 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 28, 0,
+ 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 30, 0,
+ 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 32, 0,
+ 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 34, 0,
+ 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 36, 0,
+ 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 38, 0,
+ 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 40, 0,
+ 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 42, 0,
+ 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 44, 0,
+ 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 46, 0,
+ 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 48, 0,
+ 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 50, 0,
+ 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 52, 0,
+ 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 54, 0,
+ 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 56, 0,
+ 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 58, 0,
+ 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 60, 0,
+ 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 62, 0,
+ 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 64, 0,
+ 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 66, 0,
+ 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 68, 0,
+ 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 20, 0,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 22, 0,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 24, 0,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 26, 0,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 28, 0,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 30, 0,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 32, 0,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 34, 0,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 36, 0,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 38, 0,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 40, 0,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 42, 0,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 44, 0,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 46, 0,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 48, 0,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 50, 0,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 52, 0,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 54, 0,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 56, 0,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 58, 0,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 60, 0,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 62, 0,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 64, 0,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 66, 0,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 68, 0,
+ 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 20, 0,
+ 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 22, 0,
+ 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 24, 0,
+ 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 26, 0,
+ 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 28, 0,
+ 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 30, 0,
+ 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 32, 0,
+ 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 34, 0,
+ 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 36, 0,
+ 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 38, 0,
+ 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 40, 0,
+ 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 42, 0,
+ 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 44, 0,
+ 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 46, 0,
+ 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 48, 0,
+ 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 50, 0,
+ 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 52, 0,
+ 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 54, 0,
+ 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 56, 0,
+ 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 58, 0,
+ 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 60, 0,
+ 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 62, 0,
+ 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 64, 0,
+ 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 66, 0,
+ 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 68, 0,
+ 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 20, 0,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 22, 0,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 24, 0,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 26, 0,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 28, 0,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 30, 0,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 32, 0,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 34, 0,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 36, 0,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 38, 0,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 40, 0,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 42, 0,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 44, 0,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 46, 0,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 48, 0,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 50, 0,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 52, 0,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 54, 0,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 56, 0,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 58, 0,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 60, 0,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 62, 0,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 64, 0,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 66, 0,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 68, 0,
+ 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 20, 0,
+ 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 22, 0,
+ 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 24, 0,
+ 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 26, 0,
+ 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 28, 0,
+ 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 30, 0,
+ 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 32, 0,
+ 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 34, 0,
+ 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 36, 0,
+ 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 38, 0,
+ 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 40, 0,
+ 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 42, 0,
+ 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 44, 0,
+ 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 46, 0,
+ 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 48, 0,
+ 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 50, 0,
+ 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 52, 0,
+ 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 54, 0,
+ 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 56, 0,
+ 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 58, 0,
+ 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 60, 0,
+ 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 62, 0,
+ 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 64, 0,
+ 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 66, 0,
+ 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 68, 0,
+ 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 20, 0,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 22, 0,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 24, 0,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 26, 0,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 28, 0,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 30, 0,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 32, 0,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 34, 0,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 36, 0,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 38, 0,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 40, 0,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 42, 0,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 44, 0,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 46, 0,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 48, 0,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 50, 0,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 52, 0,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 54, 0,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 56, 0,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 58, 0,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 60, 0,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 62, 0,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 64, 0,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 66, 0,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 68, 0,
+ 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 20, 0,
+ 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 22, 0,
+ 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 24, 0,
+ 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 26, 0,
+ 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 28, 0,
+ 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 30, 0,
+ 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 32, 0,
+ 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 34, 0,
+ 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 36, 0,
+ 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 38, 0,
+ 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 40, 0,
+ 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 42, 0,
+ 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 44, 0,
+ 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 46, 0,
+ 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 48, 0,
+ 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 50, 0,
+ 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 52, 0,
+ 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 54, 0,
+ 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 56, 0,
+ 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 58, 0,
+ 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 60, 0,
+ 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 62, 0,
+ 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 64, 0,
+ 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 66, 0,
+ 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 68, 0,
+ 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 20, 0,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 22, 0,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 24, 0,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 26, 0,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 28, 0,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 30, 0,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 32, 0,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 34, 0,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 36, 0,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 38, 0,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 40, 0,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 42, 0,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 44, 0,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 46, 0,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 48, 0,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 50, 0,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 52, 0,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 54, 0,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 56, 0,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 58, 0,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 60, 0,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 62, 0,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 64, 0,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 66, 0,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 68, 0,
+ 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 20, 0,
+ 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 22, 0,
+ 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 24, 0,
+ 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 26, 0,
+ 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 28, 0,
+ 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 30, 0,
+ 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 32, 0,
+ 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 34, 0,
+ 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 36, 0,
+ 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 38, 0,
+ 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 40, 0,
+ 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 42, 0,
+ 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 44, 0,
+ 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 46, 0,
+ 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 48, 0,
+ 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 50, 0,
+ 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 52, 0,
+ 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 54, 0,
+ 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 56, 0,
+ 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 58, 0,
+ 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 60, 0,
+ 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 62, 0,
+ 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 64, 0,
+ 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 66, 0,
+ 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 68, 0,
+ 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 20, 0,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 22, 0,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 24, 0,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 26, 0,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 28, 0,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 30, 0,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 32, 0,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 34, 0,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 36, 0,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 38, 0,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 40, 0,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 42, 0,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 44, 0,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 46, 0,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 48, 0,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 50, 0,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 52, 0,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 54, 0,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 56, 0,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 58, 0,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 60, 0,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 62, 0,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 64, 0,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 66, 0,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 68, 0,
+ 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 20, 0,
+ 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 22, 0,
+ 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 24, 0,
+ 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 26, 0,
+ 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 28, 0,
+ 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 30, 0,
+ 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 32, 0,
+ 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 34, 0,
+ 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 36, 0,
+ 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 38, 0,
+ 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 40, 0,
+ 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 42, 0,
+ 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 44, 0,
+ 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 46, 0,
+ 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 48, 0,
+ 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 50, 0,
+ 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 52, 0,
+ 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 54, 0,
+ 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 56, 0,
+ 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 58, 0,
+ 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 60, 0,
+ 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 62, 0,
+ 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 64, 0,
+ 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 66, 0,
+ 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 68, 0,
+ 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 20, 0,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 22, 0,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 24, 0,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 26, 0,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 28, 0,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 30, 0,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 32, 0,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 34, 0,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 36, 0,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 38, 0,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 40, 0,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 42, 0,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 44, 0,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 46, 0,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 48, 0,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 50, 0,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 52, 0,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 54, 0,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 56, 0,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 58, 0,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 60, 0,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 62, 0,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 64, 0,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 66, 0,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 68, 0,
+ 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 20, 0,
+ 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 22, 0,
+ 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 24, 0,
+ 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 26, 0,
+ 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 28, 0,
+ 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 30, 0,
+ 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 32, 0,
+ 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 34, 0,
+ 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 36, 0,
+ 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 38, 0,
+ 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 40, 0,
+ 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 42, 0,
+ 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 44, 0,
+ 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 46, 0,
+ 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 48, 0,
+ 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 50, 0,
+ 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 52, 0,
+ 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 54, 0,
+ 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 56, 0,
+ 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 58, 0,
+ 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 60, 0,
+ 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 62, 0,
+ 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 64, 0,
+ 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 66, 0,
+ 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 68, 0,
+ 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 20, 0,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 22, 0,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 24, 0,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 26, 0,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 28, 0,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 30, 0,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 32, 0,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 34, 0,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 36, 0,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 38, 0,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 40, 0,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 42, 0,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 44, 0,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 46, 0,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 48, 0,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 50, 0,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 52, 0,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 54, 0,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 56, 0,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 58, 0,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 60, 0,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 62, 0,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 64, 0,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 66, 0,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 68, 0,
+ 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,216, 48, 20, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0,168,210, 18, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,168,210, 18, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0,168,210, 18, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,168,210, 18, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0,168,210, 18, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,168,210, 18, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0,168,210, 18, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,168,210, 18, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0,168,210, 18, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,168,210, 18, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0,168,210, 18, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,168,210, 18, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0,168,210, 18, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,168,210, 18, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0,168,210, 18, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,168,210, 18, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0,168,210, 18, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,168,210, 18, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0,168,210, 18, 7, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,168,210, 18, 7, 0, 0, 0, 0, 31, 0, 20, 0,
+ 1, 0, 0, 0,168,210, 18, 7, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,168,210, 18, 7, 0, 0, 0, 0, 31, 0, 22, 0,
+ 1, 0, 0, 0,168,210, 18, 7, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,168,210, 18, 7, 0, 0, 0, 0, 31, 0, 24, 0,
+ 1, 0, 0, 0,168,210, 18, 7, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,168,210, 18, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0,184,211, 18, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,184,211, 18, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0,184,211, 18, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,184,211, 18, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0,184,211, 18, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,184,211, 18, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0,184,211, 18, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,184,211, 18, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0,184,211, 18, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,184,211, 18, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0,184,211, 18, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,184,211, 18, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0,184,211, 18, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,184,211, 18, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0,184,211, 18, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,184,211, 18, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0,184,211, 18, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,184,211, 18, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0,184,211, 18, 7, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,184,211, 18, 7, 0, 0, 0, 0, 31, 0, 20, 0,
+ 1, 0, 0, 0,184,211, 18, 7, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,184,211, 18, 7, 0, 0, 0, 0, 31, 0, 22, 0,
+ 1, 0, 0, 0,184,211, 18, 7, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,184,211, 18, 7, 0, 0, 0, 0, 31, 0, 24, 0,
+ 1, 0, 0, 0,184,211, 18, 7, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,184,211, 18, 7, 0, 0, 0, 0, 31, 0, 26, 0,
+ 1, 0, 0, 0,184,211, 18, 7, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,184,211, 18, 7, 0, 0, 0, 0, 31, 0, 28, 0,
+ 1, 0, 0, 0,184,211, 18, 7, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,184,211, 18, 7, 0, 0, 0, 0, 31, 0, 30, 0,
+ 1, 0, 0, 0,184,211, 18, 7, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 1, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 3, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 5, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 7, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 9, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 11, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 13, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 15, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 17, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 19, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 21, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 23, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 25, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 27, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 29, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 31, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 33, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 35, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 37, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 39, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 41, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 43, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 45, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 47, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 49, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 51, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 53, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 55, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 57, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 59, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 61, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 63, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 65, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 67, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 69, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 70, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 71, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 72, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 73, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 74, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 75, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 76, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 77, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 78, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 79, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 80, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 81, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 82, 0, 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 83, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 1, 0,
+ 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 3, 0,
+ 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 5, 0,
+ 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 7, 0,
+ 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 9, 0,
+ 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 11, 0,
+ 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 13, 0,
+ 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 15, 0,
+ 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 17, 0,
+ 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 19, 0,
+ 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 21, 0,
+ 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 23, 0,
+ 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 25, 0,
+ 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 27, 0,
+ 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 29, 0,
+ 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 31, 0,
+ 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 33, 0,
+ 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 35, 0,
+ 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 37, 0,
+ 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 39, 0,
+ 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 41, 0,
+ 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 43, 0,
+ 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 45, 0,
+ 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 47, 0,
+ 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 49, 0,
+ 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 51, 0,
+ 1, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 1, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 3, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 5, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 7, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 9, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 11, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 13, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 15, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 17, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 19, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 21, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 23, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 25, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 27, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 29, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 31, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 33, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 35, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 37, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 39, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 41, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 43, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 45, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 47, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 49, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 51, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 53, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 55, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 57, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 59, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 61, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 63, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 65, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 67, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 69, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 70, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 71, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 72, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 73, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 74, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 75, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 76, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 77, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 78, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 79, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 80, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 81, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 82, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 83, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 84, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 85, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 86, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 87, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 88, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 89, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 90, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 91, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 92, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 93, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 94, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 95, 0,
+ 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 96, 0, 1, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 20, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 22, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 24, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 26, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 28, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 30, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 32, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 34, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 36, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 38, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 40, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 42, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 44, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 46, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 48, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 50, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 52, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 54, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 56, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 58, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 60, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 62, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 64, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 66, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 68, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 70, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 71, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 72, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 73, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 74, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 75, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 76, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 77, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 78, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 79, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 80, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 81, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 82, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 83, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 84, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 85, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 86, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 87, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 88, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 89, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 90, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 91, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 92, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 93, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 94, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 95, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 96, 0,
+ 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 1, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 3, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 5, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 7, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 9, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 11, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 13, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 15, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 17, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 19, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 21, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 23, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 25, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 27, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 29, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 31, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 33, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 35, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 37, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 39, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 41, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 43, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 45, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 47, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 49, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 51, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 53, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 55, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 57, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 59, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 61, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 63, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 65, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 67, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 69, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 70, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 71, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 72, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 73, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 74, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 75, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 76, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 77, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 78, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 79, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 80, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 81, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 82, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 83, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 84, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 85, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 86, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 87, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 88, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 89, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 90, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 91, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 92, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 93, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 94, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 95, 0,
+ 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 96, 0, 1, 0, 0, 0, 40,233, 18, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0, 8,189, 15, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 8,189, 15, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0, 8,189, 15, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 8,189, 15, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0, 8,189, 15, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 8,189, 15, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0, 8,189, 15, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 8,189, 15, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0, 8,189, 15, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 8,189, 15, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0,248, 32, 16, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,248, 32, 16, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0,248, 32, 16, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,248, 32, 16, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0,248, 32, 16, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,248, 32, 16, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0,248, 32, 16, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,248, 32, 16, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0,248, 32, 16, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,248, 32, 16, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0,120,141, 16, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,120,141, 16, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0,120,141, 16, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,120,141, 16, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0,120,141, 16, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,120,141, 16, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0,120,141, 16, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,120,141, 16, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0,120,141, 16, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,120,141, 16, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0,216,166, 17, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,216,166, 17, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0,216,166, 17, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,216,166, 17, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0,216,166, 17, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,216,166, 17, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0,216,166, 17, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,216,166, 17, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0,216,166, 17, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,216,166, 17, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0,232,246, 17, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,232,246, 17, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0,232,246, 17, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,232,246, 17, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0,232,246, 17, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,232,246, 17, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0,232,246, 17, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,232,246, 17, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0,232,246, 17, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,232,246, 17, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0, 88, 70, 18, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 88, 70, 18, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0, 88, 70, 18, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 88, 70, 18, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0, 88, 70, 18, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 88, 70, 18, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0, 88, 70, 18, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 88, 70, 18, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0, 88, 70, 18, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 88, 70, 18, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0,120,141, 18, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,120,141, 18, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0,120,141, 18, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,120,141, 18, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0,120,141, 18, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,120,141, 18, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0,120,141, 18, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,120,141, 18, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0,120,141, 18, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,120,141, 18, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0,216, 5, 19, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,216, 5, 19, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0,216, 5, 19, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,216, 5, 19, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0,216, 5, 19, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,216, 5, 19, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0,216, 5, 19, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,216, 5, 19, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0,216, 5, 19, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,216, 5, 19, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0,216, 5, 19, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,216, 5, 19, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0,216, 5, 19, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,216, 5, 19, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0,216, 5, 19, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,216, 5, 19, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0,216, 5, 19, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,216, 5, 19, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0,216, 5, 19, 7, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 24,186, 15, 7, 0, 0, 0, 0, 31, 0, 1, 0,
+ 1, 0, 0, 0, 24,186, 15, 7, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 24,186, 15, 7, 0, 0, 0, 0, 31, 0, 3, 0,
+ 1, 0, 0, 0, 24,186, 15, 7, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 24,186, 15, 7, 0, 0, 0, 0, 31, 0, 5, 0,
+ 1, 0, 0, 0, 24,186, 15, 7, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 24,186, 15, 7, 0, 0, 0, 0, 31, 0, 7, 0,
+ 1, 0, 0, 0, 24,186, 15, 7, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 24,186, 15, 7, 0, 0, 0, 0, 31, 0, 9, 0,
+ 1, 0, 0, 0, 24,186, 15, 7, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 24,186, 15, 7, 0, 0, 0, 0, 31, 0, 0, 0,
+ 1, 0, 0, 0,120,216, 18, 7, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,120,216, 18, 7, 0, 0, 0, 0, 31, 0, 2, 0,
+ 1, 0, 0, 0,120,216, 18, 7, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,120,216, 18, 7, 0, 0, 0, 0, 31, 0, 4, 0,
+ 1, 0, 0, 0,120,216, 18, 7, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,120,216, 18, 7, 0, 0, 0, 0, 31, 0, 6, 0,
+ 1, 0, 0, 0,120,216, 18, 7, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,120,216, 18, 7, 0, 0, 0, 0, 31, 0, 8, 0,
+ 1, 0, 0, 0,120,216, 18, 7, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,120,216, 18, 7, 0, 0, 0, 0, 31, 0, 10, 0,
+ 1, 0, 0, 0,120,216, 18, 7, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,120,216, 18, 7, 0, 0, 0, 0, 31, 0, 12, 0,
+ 1, 0, 0, 0,120,216, 18, 7, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,120,216, 18, 7, 0, 0, 0, 0, 31, 0, 14, 0,
+ 1, 0, 0, 0,120,216, 18, 7, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,120,216, 18, 7, 0, 0, 0, 0, 31, 0, 16, 0,
+ 1, 0, 0, 0,120,216, 18, 7, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,120,216, 18, 7, 0, 0, 0, 0, 31, 0, 18, 0,
+ 1, 0, 0, 0,120,216, 18, 7, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,120,216, 18, 7, 0, 0, 0, 0, 31, 0, 20, 0,
+ 1, 0, 0, 0,120,216, 18, 7, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,216,134, 17, 7, 0, 0, 0, 0,214, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,206, 16, 7, 0, 0, 0, 0, 40,147, 16, 7, 0, 0, 0, 0,136,144, 16, 7,
+ 0, 0, 0, 0,216,145, 16, 7, 0, 0, 0, 0,152,147, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 67, 5, 0, 0,141, 0, 0, 0, 63, 4, 0, 0, 1, 1, 68, 5,179, 3, 1, 0, 0, 0, 0, 0, 0, 0, 8, 0, 40,161,240, 6,
+ 0, 0, 0, 0,152,164, 17, 7, 0, 0, 0, 0,152,164, 17, 7, 0, 0, 0, 0,200,135, 17, 7, 0, 0, 0, 0,104,159, 17, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,142, 55, 8, 0, 0, 0, 0, 56,228, 31, 7,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,200,135, 17, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 56,137, 17, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,108, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0,
+ 0,128,168, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 5, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 96,168, 68,
+ 0, 0,200, 65, 0, 96,168, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0,
+ 10, 0, 68, 5, 26, 0, 68, 5, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 67, 5, 0, 0,141, 0, 0, 0,166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 5, 26, 0,
+ 10, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136,171,240, 6,
+ 0, 0, 0, 0,232,208, 48, 8, 0, 0, 0, 0,232,208, 48, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,200,187, 31, 7, 0, 0, 0, 0,184, 19,238, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 56,137, 17, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,232,154, 17, 7,
+ 0, 0, 0, 0,200,135, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,178, 67, 0, 64, 48,196, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 15, 67, 0, 64, 48,196, 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 0, 0, 0, 0,192, 2, 0, 0, 0, 0, 0, 0,
+142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0,192, 2, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 3, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4,
+ 6, 0,160, 0,193, 2,143, 0,193, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+159, 0, 0, 0,127, 1, 0, 0, 63, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 0,193, 2,
+ 11, 0, 5, 0, 3, 0, 0, 0, 0, 0, 0, 0,160, 0, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,168,240, 6,
+ 0, 0, 0, 0, 40,225, 54, 8, 0, 0, 0, 0, 40,225, 54, 8, 0, 0, 0, 0,168,138, 17, 7, 0, 0, 0, 0, 72,153, 17, 7,
+ 0, 0, 0, 0,152, 58, 51, 8, 0, 0, 0, 0, 40,244, 55, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,168,138, 17, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 72,140, 17, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152, 35,141, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87,
+ 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95,111, 98,106,101, 99,116,109,111,100,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87,
+ 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95,111, 98,106,101, 99,116,109,111,100,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 98,106,101,
+ 99,116, 32, 84,111,111,108,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,233,253,
+143, 0,255, 1, 0, 0, 0, 0, 0, 0, 39, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,248, 69,215, 3, 0, 0, 0, 0,
-213, 0, 0, 0, 1, 0, 0, 0,216, 71,215, 3, 0, 0, 0, 0, 24, 68,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 84, 69, 88, 84, 85, 82, 69, 95, 80, 84, 95,109, 97,112,112,105,110,103, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 84, 69, 88, 84, 85, 82, 69, 95, 80, 84, 95,109, 97,112,112,105,110,103, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 72,140, 17, 7,
+ 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,232,141, 17, 7, 0, 0, 0, 0,168,138, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95, 98,114,117,115,
+104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95, 98,114,117,115,
+104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,114,117,115,104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 77, 97,112,112,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,117,254,143, 0,115, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77,254,187, 0,171, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,232,141, 17, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,136,143, 17, 7,
+ 0, 0, 0, 0, 72,140, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87,
+ 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95, 98,114,117,115,104, 95,116,111,111,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87,
+ 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95, 98,114,117,115,104, 95,116,111,111,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84,111,111,108,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 88, 1, 0, 0,216, 71,215, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,184, 75,215, 3, 0, 0, 0, 0,
-248, 69,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 69, 88, 84, 85, 82, 69, 95,
- 80, 84, 95,105,110,102,108,117,101,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 69, 88, 84, 85, 82, 69, 95,
- 80, 84, 95,105,110,102,108,117,101,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73,110,102,108,117,101,110, 99,
-101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,223,252,187, 0, 86, 1,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74,254,
+143, 0, 61, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,184, 75,215, 3, 0, 0, 0, 0,
-213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216, 71,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 79, 66, 74, 69, 67, 84, 95, 80, 84, 95, 99,111,110,115,116,114, 97,105,110,116,115, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 79, 66, 74, 69, 67, 84, 95, 80, 84, 95, 99,111,110,115,116,114, 97,105,110,116,115, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 79, 98,106,101, 99,116, 32, 67,111,110,115,116,114, 97,105,110,116,115, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160,255,187, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65,248, 0, 0, 0,184,126,199, 3, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0,232,198,226, 3, 0, 0, 0, 0,255, 21, 0, 0,160, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,248, 13,215, 3, 0, 0, 0, 0,
-214, 0, 0, 0, 1, 0, 0, 0, 24, 15,215, 3, 0, 0, 0, 0,216, 12,215, 3, 0, 0, 0, 0,168, 29,201, 3, 0, 0, 0, 0,
-232, 35,201, 3, 0, 0, 0, 0,136, 36,201, 3, 0, 0, 0, 0,104, 33,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,111, 4, 0, 0, 0, 0, 0, 0, 83, 0, 0, 0, 15, 15,112, 4, 84, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-152,104,177, 3, 0, 0, 0, 0,120, 95,200, 3, 0, 0, 0, 0,120, 95,200, 3, 0, 0, 0, 0, 40,188,214, 3, 0, 0, 0, 0,
-216,189,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,207,207, 3, 0, 0, 0, 0,
-216,205,207, 3, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 40,188,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,
-216,189,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96,146, 68, 0, 0, 0, 0, 0, 0,208, 65,
- 0, 0, 0, 0, 0, 0,142, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111, 4, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0,
- 0,224,141, 68, 0, 0,200, 65, 0,224,141, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3,
- 4, 0, 12, 0, 10, 0,112, 4, 26, 0,112, 4, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,111, 4, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-112, 4, 26, 0, 6, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-232,186,177, 3, 0, 0, 0, 0,232,169,209, 15, 0, 0, 0, 0,232,169,209, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,168,128,208, 3, 0, 0, 0, 0,216,131,208, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,216,189,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 40,188,214, 3, 0, 0, 0, 0, 0, 0, 64,192, 0, 0,126, 67, 0, 0, 0, 0, 0, 0, 72, 66,
- 88,218,103,194, 40,147,141, 67, 0, 0, 0, 0, 0, 0, 72, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,111, 4, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,111, 4, 0, 0, 18, 0, 0, 0, 57, 0, 0, 0,
- 0, 0,128, 63, 0, 0, 72, 66, 0,124,146, 72, 0, 0, 72, 66,205,204,204, 61, 0, 0, 32, 65, 72, 0, 0, 0, 0, 0, 0, 2,
- 4, 0, 0, 4, 8, 0,112, 4, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,111, 4, 0, 0, 26, 0, 0, 0, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-112, 4, 58, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-184,185,177, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,232,132,208, 3, 0, 0, 0, 0, 88,140,208, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,208, 0, 0, 0,120, 95,200, 3, 0, 0, 0, 0,190, 0, 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 1, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, 24, 15,215, 3, 0, 0, 0, 0,
-214, 0, 0, 0, 1, 0, 0, 0, 56, 16,215, 3, 0, 0, 0, 0,248, 13,215, 3, 0, 0, 0, 0,168, 34,201, 3, 0, 0, 0, 0,
- 8, 34,201, 3, 0, 0, 0, 0,200, 32,201, 3, 0, 0, 0, 0, 72, 35,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-113, 4, 0, 0, 70, 5, 0, 0, 57, 2, 0, 0,150, 2, 0, 0, 3, 3,214, 0, 94, 0, 1, 0, 0, 0, 0, 0, 0, 0, 8, 0,
- 72,103,177, 3, 0, 0, 0, 0,200, 0,209, 3, 0, 0, 0, 0,200, 0,209, 3, 0, 0, 0, 0,184,107,215, 3, 0, 0, 0, 0,
-104,109,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152,209,207, 3, 0, 0, 0, 0,
- 24,208,207, 3, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,184,107,215, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,
-104,109,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,244, 67, 0, 0, 0, 0, 0, 0,208, 65,
- 0, 0, 0, 0, 0, 0, 86, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,213, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0,
- 0, 0, 85, 67, 0, 0,200, 65, 0, 0, 85, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3,
- 4, 0, 12, 0, 10, 0,214, 0, 26, 0,214, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-113, 4, 0, 0, 70, 5, 0, 0,125, 2, 0, 0,150, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-214, 0, 26, 0, 8, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-136,184,177, 3, 0, 0, 0, 0, 40, 59,163, 3, 0, 0, 0, 0, 40, 59,163, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,104,141,208, 3, 0, 0, 0, 0,152,144,208, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,104,109,215, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,184,107,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,141, 67, 0, 0,244,194, 0, 0, 0, 0,
- 0, 0, 0, 64, 0, 0, 71, 67, 0, 0,143,194, 0, 0,172,193,197, 0, 0, 0,214, 0, 0, 0, 18, 0, 0, 0, 67, 0, 0, 0,
- 0, 0, 0, 0,196, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,196, 0, 0, 0, 18, 0, 0, 0, 67, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 18, 0, 0, 0, 2, 0, 3, 3,
- 0, 0, 12, 4, 6, 0,214, 0, 68, 0,197, 0, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-113, 4, 0, 0, 70, 5, 0, 0, 57, 2, 0, 0,124, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-214, 0, 68, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 88,183,177, 3, 0, 0, 0, 0,232, 69,163, 3, 0, 0, 0, 0,232, 69,163, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,168,145,208, 3, 0, 0, 0, 0, 8,231,207, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 1, 0, 0,200, 0,209, 3, 0, 0, 0, 0,183, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,136,143, 17, 7,
+ 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 40,145, 17, 7, 0, 0, 0, 0,232,141, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95, 98,114,117,115,
+104, 95,115,116,114,111,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95, 98,114,117,115,
+104, 95,115,116,114,111,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,116,114,111,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69,254,143, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,
3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 40,145, 17, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,200,146, 17, 7,
+ 0, 0, 0, 0,136,143, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87,
+ 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95, 98,114,117,115,104, 95, 99,117,114,118,101, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87,
+ 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95, 98,114,117,115,104, 95, 99,117,114,118,101, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67,117,114,118,
+101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45,254,
+143, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,120,243,211, 15, 0, 0, 0, 0,120,243,211, 15, 0, 0, 0, 0,136, 17,214, 3, 0, 0, 0, 0,
- 0,115,101, 32, 83, 99,117,108,112,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 68, 65, 84, 65, 16, 0, 0, 0,
-136, 17,214, 3, 0, 0, 0, 0,237, 0, 0, 0, 1, 0, 0, 0, 42, 11, 0, 0, 42, 11, 0, 0,136,139,215, 3, 0, 0, 0, 0,
- 68, 65, 84, 65,160,178, 0, 0,136,139,215, 3, 0, 0, 0, 0,236, 0, 0, 0, 42, 11, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0,
-168,194,217, 3, 0, 0, 0, 0, 19, 0, 0, 0, 1, 0, 1, 0,168,194,217, 3, 0, 0, 0, 0, 20, 0, 0, 0, 1, 0, 1, 0,
-168,194,217, 3, 0, 0, 0, 0, 21, 0, 1, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
- 24, 51,163, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,184,219,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
-136, 48,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,152, 7,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
-216, 29,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,168,225,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
-120,209,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,200,213,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
- 24, 98,200, 3, 0, 0, 0, 0, 21, 0, 0, 0, 1, 0, 1, 0,168,194,217, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,
-200, 66,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,
- 24, 98,200, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 30, 0,255,255, 3, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,136, 7,214, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,
- 8,156,214, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,248, 9,215, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,
-152, 66,216, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 56, 43,217, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,
-232,117,217, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 24,157,217, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,
-216, 29,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 8, 78,210, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,
- 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
- 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
- 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
- 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
- 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
- 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
- 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
- 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
- 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
- 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,
- 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,
- 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,
- 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,
- 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,
- 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,
- 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,
- 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,
- 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,
- 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,
- 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,
- 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,
- 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,
- 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,
- 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,
- 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,
- 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,
- 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,
- 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,
- 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,
- 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,
- 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,
- 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,
- 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,
- 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,
- 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,
- 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,
-200, 85,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
-104, 94,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
-104, 94,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
-104, 94,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
-104, 94,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
-104, 94,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
-104, 94,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
-104, 94,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
-104, 94,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
-104, 94,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,
-104, 94,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,
-104, 94,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,
-104, 94,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,
-104, 94,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,
-104, 94,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,
-104, 94,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,
-104, 94,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,
-104, 94,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,
-104, 94,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,
-104, 94,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,
-104, 94,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,
-104, 94,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,
-104, 94,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,
-104, 94,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,
-104, 94,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,
-104, 94,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,
-104, 94,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,
-104, 94,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,
-104, 94,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,
-104, 94,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,
-104, 94,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,
-104, 94,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,
-104, 94,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,
-104, 94,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,
-104, 94,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,
-104, 94,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,
- 8,103,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
-168,111,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
-168,111,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
-168,111,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
-168,111,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
-168,111,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
-168,111,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
-168,111,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
-168,111,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
-168,111,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,
-168,111,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,
-168,111,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,
-168,111,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,
-168,111,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,
-168,111,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,
-168,111,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,
-168,111,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,
-168,111,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,
-168,111,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,
-168,111,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,
-168,111,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,
-168,111,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,
-168,111,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,
-168,111,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,
-168,111,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,
-168,111,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,
-168,111,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,
-168,111,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,
-168,111,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,
-168,111,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,
-168,111,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,
-168,111,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,
-168,111,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,
-168,111,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,
-168,111,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,
-168,111,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,
- 72,120,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
-232,128,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
-232,128,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
-232,128,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
-232,128,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
-232,128,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
-232,128,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
-232,128,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
-232,128,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
-232,128,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,
-232,128,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,
-232,128,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,
-232,128,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,
-232,128,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,
-232,128,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,
-232,128,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,
-232,128,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,
-232,128,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,
-232,128,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,
-232,128,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,
-232,128,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,
-232,128,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,
-232,128,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,
-232,128,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,
-232,128,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,
-232,128,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,
-232,128,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,
-232,128,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,
-232,128,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,
-232,128,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,
-232,128,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,
-232,128,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,
-232,128,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,
-232,128,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,
-232,128,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,
-232,128,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,
-136,137,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
-104,176,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
-104,176,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
-104,176,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
-104,176,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
-104,176,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
-104,176,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
-104,176,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
-104,176,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
-104,176,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,
-104,176,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,
-104,176,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,
-104,176,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,
-104,176,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,
-104,176,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,
-104,176,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,
-104,176,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,
-104,176,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,
-104,176,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,
-104,176,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,
-104,176,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,
-104,176,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,
-104,176,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,
-104,176,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,
-104,176,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,
-104,176,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,
-104,176,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,
-104,176,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,
-104,176,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,
-104,176,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,
-104,176,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,
-104,176,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,
-104,176,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,
-104,176,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,
-104,176,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,
-104,176,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,
- 72,183,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
- 40,190,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
- 40,190,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
- 40,190,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
- 40,190,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
- 40,190,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
- 40,190,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
- 40,190,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
- 40,190,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
- 40,190,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,
- 40,190,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,
- 40,190,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,
- 40,190,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,
- 40,190,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,
- 40,190,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,
- 40,190,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,
- 40,190,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,
- 40,190,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,
- 40,190,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,
- 40,190,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,
- 40,190,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,
- 40,190,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,
- 40,190,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,
- 40,190,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,
- 40,190,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,
- 40,190,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,
- 40,190,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,
- 40,190,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,
- 40,190,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,
- 40,190,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,
- 40,190,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,
- 40,190,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,
- 40,190,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,
- 40,190,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,
- 40,190,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,
- 40,190,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,
- 8,197,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
-232,203,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
-232,203,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
-232,203,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
-232,203,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
-232,203,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
-232,203,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
-232,203,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
-232,203,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
-232,203,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,
-232,203,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,
-232,203,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,
-232,203,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,
-232,203,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,
-232,203,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,
-232,203,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,
-232,203,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,
-232,203,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,
-232,203,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,
-232,203,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,
-232,203,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,
-232,203,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,
-232,203,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,
-232,203,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,
-232,203,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,
-232,203,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,
-232,203,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,
-232,203,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,
-232,203,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,
-232,203,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,
-232,203,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,
-232,203,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,
-232,203,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,
-232,203,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,
-232,203,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,
-232,203,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,
-200,210,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
-168,217,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
-168,217,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
-168,217,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
-168,217,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
-168,217,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
-168,217,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
-168,217,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
-168,217,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
-168,217,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,
-168,217,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,
-168,217,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,
-168,217,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,
-168,217,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,
-168,217,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,
-168,217,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,
-168,217,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,
-168,217,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,
-168,217,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,
-168,217,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,
-168,217,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,
-168,217,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,
-168,217,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,
-168,217,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,
-168,217,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,
-168,217,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,
-168,217,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,
-168,217,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,
-168,217,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,
-168,217,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,
-168,217,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,
-168,217,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,
-168,217,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,
-168,217,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,
-168,217,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,
-168,217,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,
-136,224,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
-184,212,210, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
-184,212,210, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
-184,212,210, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
-184,212,210, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
-184,212,210, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
-184,212,210, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
-184,212,210, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
-184,212,210, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
-184,212,210, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,
-184,212,210, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,
-184,212,210, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,
-184,212,210, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,
-184,212,210, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,
-184,212,210, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,
-184,212,210, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,
-184,212,210, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,
-184,212,210, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,
-184,212,210, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,
-184,212,210, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,
-184,212,210, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,
-184,212,210, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,
-184,212,210, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,
-184,212,210, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,
-184,212,210, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,
-184,212,210, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,
-184,212,210, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,
-184,212,210, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,
-184,212,210, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,
-184,212,210, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,
-184,212,210, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,
-184,212,210, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,
-184,212,210, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,
-184,212,210, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,
-184,212,210, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,
-184,212,210, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,
-200,219,210, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
-216,226,210, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
-216,226,210, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
-216,226,210, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
-216,226,210, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
-216,226,210, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
-216,226,210, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
-216,226,210, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
-216,226,210, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
-216,226,210, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,
-216,226,210, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,
-216,226,210, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,
-216,226,210, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,
-216,226,210, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,
-216,226,210, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,
-216,226,210, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,
-216,226,210, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,
-216,226,210, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,
-216,226,210, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,
-216,226,210, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,
-216,226,210, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,
-216,226,210, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,
-216,226,210, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,
-216,226,210, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,
-216,226,210, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,
-216,226,210, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,
-216,226,210, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,
-216,226,210, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,
-216,226,210, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,
-216,226,210, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,
-216,226,210, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,
-216,226,210, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,
-216,226,210, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,
-216,226,210, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,
-216,226,210, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,
-216,226,210, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,
-232,233,210, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
-248,240,210, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
-248,240,210, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
-248,240,210, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
-248,240,210, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
-248,240,210, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
-248,240,210, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
-248,240,210, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
-248,240,210, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
-248,240,210, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,
-248,240,210, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,
-248,240,210, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,
-248,240,210, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,
-248,240,210, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,
-248,240,210, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,
-248,240,210, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,
-248,240,210, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,
-248,240,210, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,
-248,240,210, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,
-248,240,210, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,
-248,240,210, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,
-248,240,210, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,
-248,240,210, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,
-248,240,210, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,
-248,240,210, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,
-248,240,210, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,
-248,240,210, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,
-248,240,210, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,
-248,240,210, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,
-248,240,210, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,
-248,240,210, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,
-248,240,210, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,
-248,240,210, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,
-248,240,210, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,
-248,240,210, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,
-248,240,210, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,
-152,231,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
-168,238,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
-168,238,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
-168,238,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
-168,238,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
-168,238,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
-168,238,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
-168,238,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
-168,238,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
-168,238,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,
-168,238,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,
-168,238,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,
-168,238,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,
-168,238,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,
-168,238,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,
-168,238,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,
-168,238,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,
-168,238,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,
-168,238,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,
-168,238,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,
-168,238,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,
-168,238,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,
-168,238,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,
-168,238,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,
-168,238,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,
-168,238,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,
-168,238,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,
-168,238,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,
-168,238,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,
-168,238,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,
-168,238,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,
-168,238,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,
-168,238,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,
-168,238,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,
-168,238,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,
-168,238,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,
-184,245,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
-200,252,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
-200,252,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
-200,252,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
-200,252,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
-200,252,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
-200,252,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
-200,252,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
-200,252,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
-200,252,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,
-200,252,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,
-200,252,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,
-200,252,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,
-200,252,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,
-200,252,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,
-200,252,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,
-200,252,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,
-200,252,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,
-200,252,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,
-200,252,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,
-200,252,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,
-200,252,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,
-200,252,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,
-200,252,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,
-200,252,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,
-200,252,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,
-200,252,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,
-200,252,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,
-200,252,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,
-200,252,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,
-200,252,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,
-200,252,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,
-200,252,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,
-200,252,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,
-200,252,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,
-200,252,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,
-216, 3,219, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
-232, 10,219, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
-232, 10,219, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
-232, 10,219, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
-232, 10,219, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
-232, 10,219, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
-232, 10,219, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
-232, 10,219, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
-232, 10,219, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
-232, 10,219, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,
-232, 10,219, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,
-232, 10,219, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,
-232, 10,219, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,
-232, 10,219, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,
-232, 10,219, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,
-232, 10,219, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,
-232, 10,219, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,
-232, 10,219, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,
-232, 10,219, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,
-232, 10,219, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,
-232, 10,219, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,
-232, 10,219, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,
-232, 10,219, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,
-232, 10,219, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,
-232, 10,219, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,
-232, 10,219, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,
-232, 10,219, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,
-232, 10,219, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,
-232, 10,219, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,
-232, 10,219, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,
-232, 10,219, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,
-232, 10,219, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,
-232, 10,219, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,
-232, 10,219, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,
-232, 10,219, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,
-232, 10,219, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,
-248, 17,219, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
- 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
- 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
- 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
- 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
- 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
- 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
- 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
- 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
- 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,
- 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,
- 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,
- 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,
- 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,
- 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,
- 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,
- 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,
- 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,
- 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,
- 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,
- 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,
- 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,
- 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,
- 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,
- 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,
- 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,
- 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,
- 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,
- 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,
- 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,
- 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,
- 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,
- 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,
- 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,
- 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,
- 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
- 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
- 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
- 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
- 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
- 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
- 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
- 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
- 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
- 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,
- 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,
- 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,
- 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,
- 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
-120,209,217, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
-120,209,217, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
-120,209,217, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
-120,209,217, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
-120,209,217, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
-120,209,217, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
-120,209,217, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
-120,209,217, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
-120,209,217, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,
-120,209,217, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,
-120,209,217, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,
-120,209,217, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,
-120,209,217, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,
-120,209,217, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,
-120,209,217, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 70, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 71, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 72, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 73, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 74, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 75, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 76, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 77, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 78, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 79, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 80, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 81, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 82, 0, 1, 0, 0, 0,
-152, 7,218, 3, 0, 0, 0, 0, 31, 0, 83, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,
-136, 48,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,
-136, 48,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,
-136, 48,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,
-136, 48,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,
-136, 48,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,
-136, 48,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,
-136, 48,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,
-136, 48,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,
-136, 48,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,
-136, 48,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,
-136, 48,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,
-136, 48,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,
-136, 48,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,
-136, 48,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,
-136, 48,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,
-136, 48,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,
-136, 48,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,
-136, 48,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,
-136, 48,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,
-136, 48,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,
-136, 48,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,
-136, 48,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,
-136, 48,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,
-136, 48,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,
-136, 48,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,
-136, 48,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 70, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 71, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 72, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 73, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 74, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 75, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 76, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 77, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 78, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 79, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 80, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 81, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 82, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 83, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 84, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 85, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 86, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 87, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 88, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 89, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 90, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 91, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 92, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 93, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 94, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 95, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 96, 0, 1, 0, 0, 0,
-200,213,217, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 70, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 71, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 72, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 73, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 74, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 75, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 76, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 77, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 78, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 79, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 80, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 81, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 82, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 83, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 84, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 85, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 86, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 87, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 88, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 89, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 90, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 91, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 92, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 93, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 94, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 95, 0, 1, 0, 0, 0,
-184,219,217, 3, 0, 0, 0, 0, 31, 0, 96, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 70, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 71, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 72, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 73, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 74, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 75, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 76, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 77, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 78, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 79, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 80, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 81, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 82, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 83, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 84, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 85, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 86, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 87, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 88, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 89, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 90, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 91, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 92, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 93, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 94, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 95, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 96, 0, 1, 0, 0, 0,
-168,225,217, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,136, 7,214, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
-136, 7,214, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,136, 7,214, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
-136, 7,214, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,136, 7,214, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
-136, 7,214, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,136, 7,214, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
-136, 7,214, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,136, 7,214, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
-136, 7,214, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 8,156,214, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
- 8,156,214, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 8,156,214, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
- 8,156,214, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 8,156,214, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
- 8,156,214, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 8,156,214, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
- 8,156,214, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 8,156,214, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
- 8,156,214, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,248, 9,215, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
-248, 9,215, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,248, 9,215, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
-248, 9,215, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,248, 9,215, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
-248, 9,215, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,248, 9,215, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
-248, 9,215, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,248, 9,215, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
-248, 9,215, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,152, 66,216, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
-152, 66,216, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,152, 66,216, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
-152, 66,216, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,152, 66,216, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
-152, 66,216, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,152, 66,216, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
-152, 66,216, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,152, 66,216, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
-152, 66,216, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 56, 43,217, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
- 56, 43,217, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 56, 43,217, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
- 56, 43,217, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 56, 43,217, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
- 56, 43,217, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 56, 43,217, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
- 56, 43,217, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 56, 43,217, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
- 56, 43,217, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,232,117,217, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
-232,117,217, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,232,117,217, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
-232,117,217, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,232,117,217, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
-232,117,217, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,232,117,217, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
-232,117,217, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,232,117,217, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
-232,117,217, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 24,157,217, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
- 24,157,217, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 24,157,217, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
- 24,157,217, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 24,157,217, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
- 24,157,217, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 24,157,217, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
- 24,157,217, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 24,157,217, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
- 24,157,217, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,216, 29,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
-216, 29,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,216, 29,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
-216, 29,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,216, 29,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
-216, 29,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,216, 29,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
-216, 29,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,216, 29,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
-216, 29,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,216, 29,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
-216, 29,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,216, 29,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
-216, 29,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,216, 29,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
-216, 29,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,216, 29,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
-216, 29,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,216, 29,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,
- 8, 78,210, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 8, 78,210, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,
- 8, 78,210, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 8, 78,210, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,
- 8, 78,210, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 8, 78,210, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,
- 8, 78,210, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 8, 78,210, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,
- 8, 78,210, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 8, 78,210, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,
- 8, 78,210, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,
- 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,
- 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,
- 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,
- 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,
- 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,
- 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,
- 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,
- 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,
- 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,
- 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 24, 51,163, 3, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,
- 56, 16,215, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 15,215, 3, 0, 0, 0, 0,
-232, 35,201, 3, 0, 0, 0, 0, 40, 32,201, 3, 0, 0, 0, 0, 8, 34,201, 3, 0, 0, 0, 0,136, 36,201, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111, 4, 0, 0, 85, 0, 0, 0,150, 2, 0, 0, 1, 1,112, 4, 66, 2, 1, 0,
- 0, 0, 0, 0, 0, 0, 8, 0,232,105,177, 3, 0, 0, 0, 0,152, 92,215, 3, 0, 0, 0, 0,152, 92,215, 3, 0, 0, 0, 0,
- 24,111,215, 3, 0, 0, 0, 0,216,117,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 24,214,207, 3, 0, 0, 0, 0, 88,210,207, 3, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 24,111,215, 3, 0, 0, 0, 0,
-215, 0, 0, 0, 1, 0, 0, 0,200,112,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,108, 68,
- 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,142, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111, 4, 0, 0,
- 0, 0, 0, 0, 25, 0, 0, 0, 0,224,141, 68, 0, 0,200, 65, 0,224,141, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,112, 4, 26, 0,112, 4, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111, 4, 0, 0, 85, 0, 0, 0,110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,112, 4, 26, 0, 10, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 88,199,177, 3, 0, 0, 0, 0,248, 77,163, 3, 0, 0, 0, 0,248, 77,163, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,233,207, 3, 0, 0, 0, 0,120,238,207, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,200,112,215, 3, 0, 0, 0, 0,
-215, 0, 0, 0, 1, 0, 0, 0,120,114,215, 3, 0, 0, 0, 0, 24,111,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,178, 67,
- 0,192, 5,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67, 0, 0,168,195, 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0,
- 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0,
- 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64,
- 10, 1, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,160, 0, 80, 1,143, 0, 80, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,159, 0, 0, 0, 71, 1, 0, 0,150, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,160, 0, 80, 1, 11, 0, 5, 0, 3, 0, 0, 0, 0, 0, 0, 0,160, 0, 50, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 88,195,177, 3, 0, 0, 0, 0,136, 64,163, 3, 0, 0, 0, 0,136, 64,163, 3, 0, 0, 0, 0,
-152, 77,215, 3, 0, 0, 0, 0, 8,165,165, 15, 0, 0, 0, 0,136,239,207, 3, 0, 0, 0, 0,184,242,207, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,152, 77,215, 3, 0, 0, 0, 0,
-213, 0, 0, 0, 1, 0, 0, 0,120, 79,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,235,223, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95,111, 98,106,101, 99,116,109,111,
-100,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95,111, 98,106,101, 99,116,109,111,
-100,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 79, 98,106,101, 99,116, 32, 84,111,111,108,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,233,253,143, 0,255, 1, 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, 0, 0, 9, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,200,146, 17, 7,
+ 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,104,148, 17, 7, 0, 0, 0, 0, 40,145, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95, 98,114,117,115,
+104, 95, 97,112,112,101, 97,114, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95, 98,114,117,115,
+104, 95, 97,112,112,101, 97,114, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65,112,112,101, 97,114, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 88, 1, 0, 0,120, 79,215, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 88, 81,215, 3, 0, 0, 0, 0,
-152, 77,215, 3, 0, 0, 0, 0,136, 0,225, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80,
- 84, 95,116,111,111,108,115, 95, 98,114,117,115,104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80,
- 84, 95,116,111,111,108,115, 95, 98,114,117,115,104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,114,117,115,104, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,229,253,143, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,
+ 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,117,254,143, 0,115, 1,
- 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,104,148, 17, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 8,150, 17, 7,
+ 0, 0, 0, 0,200,146, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87,
+ 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95,118,101,114,116,101,120,112, 97,105,110,116, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87,
+ 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95,118,101,114,116,101,120,112, 97,105,110,116, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79,112,116,105,
+111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,149,253,
+143, 0,146, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 8,150, 17, 7,
+ 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,168,151, 17, 7, 0, 0, 0, 0,104,148, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95, 98,114,117,115,
+104, 95,116,101,120,116,117,114,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95, 98,114,117,115,
+104, 95,116,101,120,116,117,114,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84,101,120,116,117,114,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93,254,143, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 88, 81,215, 3, 0, 0, 0, 0,
-213, 0, 0, 0, 1, 0, 0, 0, 56, 83,215, 3, 0, 0, 0, 0,120, 79,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95, 98,114,117,115,104, 95,116,111,
-111,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95, 98,114,117,115,104, 95,116,111,
-111,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 84,111,111,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74,254,143, 0, 61, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,168,151, 17, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 72,153, 17, 7,
+ 0, 0, 0, 0, 8,150, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87,
+ 51, 68, 95, 80, 84, 95,115, 99,117,108,112,116, 95,111,112,116,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87,
+ 51, 68, 95, 80, 84, 95,115, 99,117,108,112,116, 95,111,112,116,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79,112,116,105,
+111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21,254,
+143, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 72,153, 17, 7,
+ 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168,151, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,115, 99,117,108,112,116, 95,115,121,109,
+109,101,116,114,121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,115, 99,117,108,112,116, 95,115,121,109,
+109,101,116,114,121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,121,109,109,101,116,114,121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,253,253,143, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,
+ 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,232,154, 17, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,248,157, 17, 7,
+ 0, 0, 0, 0, 56,137, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,178, 67, 0, 0, 90,195, 0, 0, 0, 0, 0, 0, 0, 0,
+227,102, 16, 67, 24, 30, 90,195, 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 0, 0, 0, 0,215, 0, 0, 0, 0, 0, 0, 0,
+142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0,215, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 3, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4,
+ 6, 0,160, 0,216, 0,143, 0,216, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+159, 0, 0, 0,167, 0, 0, 0,126, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 0,216, 0,
+ 12, 0, 6, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0,216, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,169,240, 6,
+ 0, 0, 0, 0,248, 23, 55, 8, 0, 0, 0, 0,248, 23, 55, 8, 0, 0, 0, 0, 88,156, 17, 7, 0, 0, 0, 0, 88,156, 17, 7,
+ 0, 0, 0, 0,168,178, 50, 8, 0, 0, 0, 0,120,106, 50, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 88,156, 17, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,170,240, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87,
+ 51, 68, 95, 80, 84, 95,108, 97,115,116, 95,111,112,101,114, 97,116,111,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87,
+ 51, 68, 95, 80, 84, 95,108, 97,115,116, 95,111,112,101,114, 97,116,111,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 78,101,119, 32,
+ 83, 99,114,101,101,110, 0, 0, 32, 77,111,100,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216,255,
+144, 0, 16, 0, 0, 0, 0, 0, 0, 0, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 88, 1, 0, 0, 56, 83,215, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 24, 85,215, 3, 0, 0, 0, 0,
- 88, 81,215, 3, 0, 0, 0, 0,200, 3,225, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80,
- 84, 95,116,111,111,108,115, 95, 98,114,117,115,104, 95,115,116,114,111,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80,
- 84, 95,116,111,111,108,115, 95, 98,114,117,115,104, 95,115,116,114,111,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,116,114,111,107,101, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69,254,143, 0, 0, 0,
- 0, 0, 0, 0, 4, 0, 4, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,248,157, 17, 7,
+ 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,104,159, 17, 7, 0, 0, 0, 0,232,154, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 52, 67, 0, 96,158,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 67, 0, 96,158,196, 0,128,142,195,163, 0, 0, 0,
+180, 0, 0, 0, 0, 0, 0, 0,213, 3, 0, 0, 0, 0, 0, 0,162, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,
+162, 0, 0, 0, 0, 0, 0, 0,213, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,
+ 0, 0, 0, 64, 10, 1, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,180, 0,214, 3,163, 0,214, 3, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 5, 0, 0, 67, 5, 0, 0,167, 0, 0, 0, 63, 4, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,163,240, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,104,159, 17, 7,
+ 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,157, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 24, 85,215, 3, 0, 0, 0, 0,
-213, 0, 0, 0, 1, 0, 0, 0,248, 86,215, 3, 0, 0, 0, 0, 56, 83,215, 3, 0, 0, 0, 0,104, 5,225, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95, 98,114,117,115,104, 95, 99,117,
-114,118,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95, 98,114,117,115,104, 95, 99,117,
-114,118,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 67,117,114,118,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45,254,143, 0, 0, 0, 0, 0, 0, 0, 4, 0, 4, 0, 0, 0, 0, 0, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 0, 0, 0, 67, 5, 0, 0,167, 0, 0, 0, 63, 4, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,164, 4,153, 3, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,162,240, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,239, 52, 8, 0, 0, 0, 0, 56,238, 52, 8,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216,160, 17, 7, 0, 0, 0, 0, 68, 65, 84, 65,112, 3, 0, 0,216,160, 17, 7,
+ 0, 0, 0, 0,173, 0, 0, 0, 1, 0, 0, 0, 0, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 26,150,180, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,142, 6,128,191, 0, 0,128,191, 0, 0, 0, 0,
+ 0, 0, 0, 0, 11,210, 76,190, 0, 0, 0, 0, 68,239,209, 62, 51,177,205,190,184,158, 81, 63, 0, 0, 0, 0, 70,119,105, 63,
+143, 74, 70, 62, 35, 44,185,190, 0, 0, 0, 0,162, 84, 89,188,166, 33,101, 63, 42, 61,228, 62, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 33,210,111,193, 0, 0,128, 63, 68,239,209, 62, 70,119,105, 63,176, 84, 89,188, 0, 0, 0, 0, 52,177,205,190,
+142, 74, 70, 62,166, 33,101, 63, 0, 0, 0, 0,185,158, 81, 63, 35, 44,185,190, 43, 61,228, 62, 0, 0, 0, 0, 62, 95, 68, 65,
+ 51,120,173,192,115,208,213, 64, 0, 0,128, 63,178,157,229, 62, 51, 25, 17,191,116,169, 81,191,184,158, 81,191,117, 90,127, 63,
+176,224,139, 62,158, 53,185, 62, 35, 44,185, 62,145,180,109,188, 2,162,161, 63,218, 72,228,190, 42, 61,228,190, 0, 0, 0, 0,
+ 0, 0, 0, 0, 33,171,108, 65, 33,210,111, 65, 39,240,191, 62,124,116, 85, 63, 48,189, 70,188, 0, 0,184,180, 61,203,145,190,
+ 88,140, 12, 62,193,104, 34, 63, 0, 0, 78, 52,197,112,117,194,178,208,216, 65,220,158, 5,194,231,251,159,192,221, 54,114, 66,
+ 29,247,213,193, 58,221, 3, 66, 25, 4,160, 64, 68,239,209, 62, 51,177,205,190,184,158, 81, 63, 0, 0, 0, 0, 70,119,105, 63,
+143, 74, 70, 62, 35, 44,185,190, 0, 0, 0, 0,162, 84, 89,188,166, 33,101, 63, 42, 61,228, 62, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 33,210,111,193, 0, 0,128, 63,178,157,229, 62, 51, 25, 17,191,116,169, 81,191,184,158, 81,191,117, 90,127, 63,
+176,224,139, 62,158, 53,185, 62, 35, 44,185, 62,145,180,109,188, 2,162,161, 63,218, 72,228,190, 42, 61,228,190, 0, 0, 0, 0,
+ 0, 0, 0, 0, 33,171,108, 65, 33,210,111, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 88, 1, 0, 0,248, 86,215, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,216, 88,215, 3, 0, 0, 0, 0,
- 24, 85,215, 3, 0, 0, 0, 0, 72, 10,225, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80,
- 84, 95,116,111,111,108,115, 95, 98,114,117,115,104, 95, 97,112,112,101, 97,114, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80,
- 84, 95,116,111,111,108,115, 95, 98,114,117,115,104, 95, 97,112,112,101, 97,114, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65,112,112,101, 97,114, 97,110,
- 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,229,253,143, 0, 0, 0,
- 0, 0, 0, 0, 4, 0, 4, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,216, 88,215, 3, 0, 0, 0, 0,
-213, 0, 0, 0, 1, 0, 0, 0,200,168,165, 15, 0, 0, 0, 0,248, 86,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95,118,101,114,116,101,120,112, 97,
-105,110,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95,118,101,114,116,101,120,112, 97,
-105,110,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 79,112,116,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,149,253,143, 0,146, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 88, 1, 0, 0,200,168,165, 15, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,232,166,165, 15, 0, 0, 0, 0,
-216, 88,215, 3, 0, 0, 0, 0, 40, 2,225, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80,
- 84, 95,116,111,111,108,115, 95, 98,114,117,115,104, 95,116,101,120,116,117,114,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80,
- 84, 95,116,111,111,108,115, 95, 98,114,117,115,104, 95,116,101,120,116,117,114,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84,101,120,116,117,114,101, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,196,122,221, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+196,122,221, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,196,122,221, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 92, 62, 55, 63, 56,186,224,190,237,203,148,190, 3,236,234,190, 33,210,111, 65,
+ 33,210,111, 65, 0, 0, 0, 0, 0, 0, 0, 0, 9,191,201, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 1, 0, 0,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 32, 33, 12, 66, 85,152,137, 66,113, 27,126, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 96, 1, 0, 0,152,164, 17, 7, 0, 0, 0, 0,174, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 51, 51, 51, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65,
+205,204, 76, 62, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0, 72,219, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93,254,143, 0, 0, 0,
- 0, 0, 0, 0, 4, 0, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,232,166,165, 15, 0, 0, 0, 0,
-213, 0, 0, 0, 1, 0, 0, 0, 8,165,165, 15, 0, 0, 0, 0,200,168,165, 15, 0, 0, 0, 0, 8, 7,225, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,115, 99,117,108,112,116, 95,111,112,116,105,111,110,115,
+ 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 3, 0, 8, 24,128, 0, 0, 0, 12, 66, 0, 0,128, 63,
+205,204,204, 61, 0, 0,122, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 16, 0, 10, 0, 7, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,115, 99,117,108,112,116, 95,111,112,116,105,111,110,115,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 78, 0, 0, 8, 1, 0, 0,216,166, 17, 7,
+ 0, 0, 0, 0,210, 0, 0, 0, 1, 0, 0, 0,136, 22, 49, 8, 0, 0, 0, 0,120,141, 16, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 82, 71, 97,109,101, 32, 76,111,103,105, 99, 0, 46, 48, 48, 49, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 79,112,116,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 40,168, 17, 7, 0, 0, 0, 0,216,173, 17, 7, 0, 0, 0, 0, 72,174, 17, 7, 0, 0, 0, 0, 8,183, 17, 7,
+ 0, 0, 0, 0,120,183, 17, 7, 0, 0, 0, 0,152,239, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 40,168, 17, 7,
+ 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,152,168, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,152,168, 17, 7, 0, 0, 0, 0,211, 0, 0, 0,
+ 1, 0, 0, 0, 8,169, 17, 7, 0, 0, 0, 0, 40,168, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 4,
+ 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 8,169, 17, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,120,169, 17, 7,
+ 0, 0, 0, 0,152,168, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 5, 4, 0, 0, 0, 0, 68, 65, 84, 65,
+ 32, 0, 0, 0,120,169, 17, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,232,169, 17, 7, 0, 0, 0, 0, 8,169, 17, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,232,169, 17, 7,
+ 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 88,170, 17, 7, 0, 0, 0, 0,120,169, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,234, 3, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 88,170, 17, 7, 0, 0, 0, 0,211, 0, 0, 0,
+ 1, 0, 0, 0,200,170, 17, 7, 0, 0, 0, 0,232,169, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7,234, 3,
+ 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,200,170, 17, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 56,171, 17, 7,
+ 0, 0, 0, 0, 88,170, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140, 1, 0, 0, 0, 0, 68, 65, 84, 65,
+ 32, 0, 0, 0, 56,171, 17, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,168,171, 17, 7, 0, 0, 0, 0,200,170, 17, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 6,140, 1, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,168,171, 17, 7,
+ 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 24,172, 17, 7, 0, 0, 0, 0, 56,171, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 32, 6, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 24,172, 17, 7, 0, 0, 0, 0,211, 0, 0, 0,
+ 1, 0, 0, 0,136,172, 17, 7, 0, 0, 0, 0,168,171, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7,140, 1,
+ 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,136,172, 17, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,248,172, 17, 7,
+ 0, 0, 0, 0, 24,172, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 5,140, 1, 0, 0, 0, 0, 68, 65, 84, 65,
+ 32, 0, 0, 0,248,172, 17, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,104,173, 17, 7, 0, 0, 0, 0,136,172, 17, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 5,234, 3, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,104,173, 17, 7,
+ 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,216,173, 17, 7, 0, 0, 0, 0,248,172, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 1,140, 1, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,216,173, 17, 7, 0, 0, 0, 0,211, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,104,173, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 1,234, 3,
+ 1, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 72,174, 17, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,184,174, 17, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152,168, 17, 7, 0, 0, 0, 0, 8,169, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,184,174, 17, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 40,175, 17, 7,
+ 0, 0, 0, 0, 72,174, 17, 7, 0, 0, 0, 0,152,168, 17, 7, 0, 0, 0, 0,232,169, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 40,175, 17, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,152,175, 17, 7,
+ 0, 0, 0, 0,184,174, 17, 7, 0, 0, 0, 0, 8,169, 17, 7, 0, 0, 0, 0, 88,170, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,152,175, 17, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 8,176, 17, 7,
+ 0, 0, 0, 0, 40,175, 17, 7, 0, 0, 0, 0,232,169, 17, 7, 0, 0, 0, 0, 88,170, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 8,176, 17, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,120,176, 17, 7,
+ 0, 0, 0, 0,152,175, 17, 7, 0, 0, 0, 0,232,169, 17, 7, 0, 0, 0, 0,200,170, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,120,176, 17, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,232,176, 17, 7,
+ 0, 0, 0, 0, 8,176, 17, 7, 0, 0, 0, 0,200,170, 17, 7, 0, 0, 0, 0, 56,171, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,232,176, 17, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 88,177, 17, 7,
+ 0, 0, 0, 0,120,176, 17, 7, 0, 0, 0, 0,120,169, 17, 7, 0, 0, 0, 0,168,171, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 88,177, 17, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,200,177, 17, 7,
+ 0, 0, 0, 0,232,176, 17, 7, 0, 0, 0, 0, 56,171, 17, 7, 0, 0, 0, 0,168,171, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,200,177, 17, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 56,178, 17, 7,
+ 0, 0, 0, 0, 88,177, 17, 7, 0, 0, 0, 0, 40,168, 17, 7, 0, 0, 0, 0,200,170, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 56,178, 17, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,168,178, 17, 7,
+ 0, 0, 0, 0,200,177, 17, 7, 0, 0, 0, 0, 40,168, 17, 7, 0, 0, 0, 0,168,171, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,168,178, 17, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 24,179, 17, 7,
+ 0, 0, 0, 0, 56,178, 17, 7, 0, 0, 0, 0, 88,170, 17, 7, 0, 0, 0, 0, 24,172, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 24,179, 17, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,136,179, 17, 7,
+ 0, 0, 0, 0,168,178, 17, 7, 0, 0, 0, 0,120,169, 17, 7, 0, 0, 0, 0, 24,172, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,136,179, 17, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,248,179, 17, 7,
+ 0, 0, 0, 0, 24,179, 17, 7, 0, 0, 0, 0, 56,171, 17, 7, 0, 0, 0, 0, 24,172, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,248,179, 17, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,104,180, 17, 7,
+ 0, 0, 0, 0,136,179, 17, 7, 0, 0, 0, 0,136,172, 17, 7, 0, 0, 0, 0,248,172, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,104,180, 17, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,216,180, 17, 7,
+ 0, 0, 0, 0,248,179, 17, 7, 0, 0, 0, 0, 88,170, 17, 7, 0, 0, 0, 0,248,172, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,216,180, 17, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 72,181, 17, 7,
+ 0, 0, 0, 0,104,180, 17, 7, 0, 0, 0, 0, 24,172, 17, 7, 0, 0, 0, 0,136,172, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 72,181, 17, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,184,181, 17, 7,
+ 0, 0, 0, 0,216,180, 17, 7, 0, 0, 0, 0,200,170, 17, 7, 0, 0, 0, 0,104,173, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,184,181, 17, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 40,182, 17, 7,
+ 0, 0, 0, 0, 72,181, 17, 7, 0, 0, 0, 0,136,172, 17, 7, 0, 0, 0, 0,104,173, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 40,182, 17, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,152,182, 17, 7,
+ 0, 0, 0, 0,184,181, 17, 7, 0, 0, 0, 0,232,169, 17, 7, 0, 0, 0, 0,216,173, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,152,182, 17, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 8,183, 17, 7,
+ 0, 0, 0, 0, 40,182, 17, 7, 0, 0, 0, 0,248,172, 17, 7, 0, 0, 0, 0,216,173, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 8,183, 17, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,152,182, 17, 7, 0, 0, 0, 0,104,173, 17, 7, 0, 0, 0, 0,216,173, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,120,183, 17, 7, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 72,187, 17, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,169, 17, 7, 0, 0, 0, 0,152,168, 17, 7, 0, 0, 0, 0, 8,169, 17, 7,
+ 0, 0, 0, 0, 88,170, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,235, 3, 0, 0,
+ 5, 4, 0, 0, 7, 7,127, 7, 27, 0, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,246, 17, 7,
+ 0, 0, 0, 0, 88,246, 17, 7, 0, 0, 0, 0,104,184, 17, 7, 0, 0, 0, 0,216,185, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0,104,184, 17, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,216,185, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,148, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,224,239, 68, 0, 0, 0, 0,
+ 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,192,239, 68, 0, 0,200, 65, 0,192,239, 68,
+ 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,127, 7, 26, 0,127, 7,
+ 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,235, 3, 0, 0,
+ 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,127, 7, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21,254,143, 0, 0, 0, 0, 0, 0, 0, 4, 0, 4, 0, 0, 0, 0, 0, 5, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0,216,185, 17, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,104,184, 17, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0,240,109, 69, 0, 0,128,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,238, 68, 0, 0, 0, 0,
+ 0, 0, 0, 64,112, 7, 0, 0,129, 7, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, 0, 0, 0, 0,
+ 17, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 2, 0, 0, 0, 1, 0, 3, 3, 2, 0, 0, 4, 10, 0,129, 7, 2, 0,112, 7,
+ 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 4, 0, 0,
+ 5, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 88, 1, 0, 0, 8,165,165, 15, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-232,166,165, 15, 0, 0, 0, 0,168, 8,225, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80,
- 84, 95,115, 99,117,108,112,116, 95,115,121,109,109,101,116,114,121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80,
- 84, 95,115, 99,117,108,112,116, 95,115,121,109,109,101,116,114,121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,121,109,109,101,116,114,121,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+160, 0, 0, 0, 72,187, 17, 7, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,216,211, 17, 7, 0, 0, 0, 0,120,183, 17, 7,
+ 0, 0, 0, 0,168,171, 17, 7, 0, 0, 0, 0, 56,171, 17, 7, 0, 0, 0, 0, 24,172, 17, 7, 0, 0, 0, 0,120,169, 17, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0,126, 7, 0, 0, 0, 0, 0, 0,139, 1, 0, 0, 4, 4, 94, 1,
+140, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152,210, 17, 7, 0, 0, 0, 0,152,210, 17, 7,
+ 0, 0, 0, 0, 56,188, 17, 7, 0, 0, 0, 0,168,189, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 56,188, 17, 7,
+ 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,168,189, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,148, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,175, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,253,253,143, 0, 0, 0,
- 0, 0, 0, 0, 4, 0, 4, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 93, 1, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,174, 67, 0, 0,200, 65, 0,128,174, 67, 0, 0,200, 65, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 94, 1, 26, 0, 94, 1, 26, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0,126, 7, 0, 0,114, 1, 0, 0,139, 1, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 1, 26, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,120,114,215, 3, 0, 0, 0, 0,
-215, 0, 0, 0, 1, 0, 0, 0, 40,116,215, 3, 0, 0, 0, 0,200,112,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,178, 67,
- 0, 0, 90,195, 0, 0, 0, 0, 0, 0, 0, 0,227,102, 16, 67, 24, 30, 90,195, 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0,
- 0, 0, 0, 0,215, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0,
- 0, 0, 0, 0,215, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64,
- 10, 3, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,160, 0,216, 0,143, 0,216, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,159, 0, 0, 0,111, 0, 0, 0, 70, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,160, 0,216, 0, 12, 0, 6, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0,216, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,136,196,177, 3, 0, 0, 0, 0, 88, 83,163, 3, 0, 0, 0, 0, 88, 83,163, 3, 0, 0, 0, 0,
-184, 90,215, 3, 0, 0, 0, 0,184, 90,215, 3, 0, 0, 0, 0,200,243,207, 3, 0, 0, 0, 0,248,246,207, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,184, 90,215, 3, 0, 0, 0, 0,
-213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184,197,177, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,108, 97,115,116, 95,111,112,101,114, 97,116,111,114, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,168,189, 17, 7,
+ 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,188, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0,128,174, 67, 0, 0, 61,196, 0, 0, 0, 0, 0, 0, 0, 0,255,127,166, 67,255,255,184,195, 0, 0, 0, 0, 77, 1, 0, 0,
+ 94, 1, 0, 0, 0, 0, 0, 0,113, 1, 0, 0, 0, 0, 0, 0, 78, 1, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,
+ 76, 1, 0, 0, 0, 0, 0, 0,113, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,
+ 0, 0, 0, 64, 10, 1, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0, 94, 1,114, 1, 77, 1,114, 1, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0,126, 7, 0, 0, 0, 0, 0, 0,113, 1, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 1,114, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,108, 97,115,116, 95,111,112,101,114, 97,116,111,114, 0,
+ 0, 0, 0, 0, 24,191, 17, 7, 0, 0, 0, 0,248,208, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 24,191, 17, 7,
+ 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,184,192, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 83, 95, 80, 84, 95, 99,111,110,116,101,120,116, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 83, 99,117,108,112,116, 32, 77,111,100,101, 0, 32, 77,111,100,101, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 83, 95, 80, 84, 95, 99,111,110,116,101,120,116, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216,255,144, 0, 16, 0, 0, 0, 0, 0, 0, 0, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,220,255, 76, 1, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 40, 1, 0, 0, 40,116,215, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,216,117,215, 3, 0, 0, 0, 0,
-120,114,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 52, 67, 0, 96,158,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 67,
- 0, 96,158,196, 0,128,142,195,163, 0, 0, 0,180, 0, 0, 0, 0, 0, 0, 0,213, 3, 0, 0, 0, 0, 0, 0,162, 0, 0, 0,
- 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,162, 0, 0, 0, 0, 0, 0, 0,213, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 1, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,180, 0,
-214, 3,163, 0,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111, 4, 0, 0,111, 4, 0, 0,
-111, 0, 0, 0,150, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0,
- 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,189,177, 3, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,184,192, 17, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 88,194, 17, 7,
+ 0, 0, 0, 0, 24,191, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,114,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,114,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82,101,110,100,
+101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,135,255,
+ 76, 1, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 40, 1, 0, 0,216,117,215, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 40,116,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 88,194, 17, 7,
+ 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,248,195, 17, 7, 0, 0, 0, 0,184,192, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 0, 0, 0,111, 4, 0, 0,
-111, 0, 0, 0,150, 2, 0, 0,160, 0, 0, 0,111, 4, 0, 0,111, 0, 0, 0,150, 2, 0, 0,208, 3, 40, 2, 13, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24,188,177, 3, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 40,151,207, 3, 0, 0, 0, 0,168, 34,208, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168, 62,216, 3, 0, 0, 0, 0,
- 68, 65, 84, 65,112, 3, 0, 0,168, 62,216, 3, 0, 0, 0, 0,173, 0, 0, 0, 1, 0, 0, 0, 0, 0,140, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71,137,247, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-142, 6,128,191, 0, 0,128,191, 0, 0, 0, 0, 0, 0, 0, 0, 11,210, 76,190, 0, 0, 0, 0, 68,239,209, 62, 51,177,205,190,
-184,158, 81, 63, 0, 0, 0, 0, 70,119,105, 63,143, 74, 70, 62, 35, 44,185,190, 0, 0, 0, 0,162, 84, 89,188,166, 33,101, 63,
- 42, 61,228, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33,210,111,193, 0, 0,128, 63, 68,239,209, 62, 70,119,105, 63,
-176, 84, 89,188, 0, 0, 0, 0, 52,177,205,190,142, 74, 70, 62,166, 33,101, 63, 0, 0, 0, 0,185,158, 81, 63, 35, 44,185,190,
- 43, 61,228, 62, 0, 0, 0, 0, 62, 95, 68, 65, 51,120,173,192,115,208,213, 64, 0, 0,128, 63,178,157,229, 62, 69,228, 70,191,
-116,169, 81,191,184,158, 81,191,117, 90,127, 63, 69,188,191, 62,158, 53,185, 62, 35, 44,185, 62,145,180,109,188, 86,142,221, 63,
-218, 72,228,190, 42, 61,228,190, 0, 0, 0, 0, 0, 0, 0, 0, 33,171,108, 65, 33,210,111, 65,100,240,191, 62,110,116, 85, 63,
- 48,185, 70,188, 0, 0, 82,180,137,185, 84,190, 30, 18,205, 61, 77,247,236, 62, 0, 0, 40, 51,197,112,117,194,178,208,216, 65,
-220,158, 5,194,231,251,159,192,221, 54,114, 66, 29,247,213,193, 58,221, 3, 66, 25, 4,160, 64, 68,239,209, 62, 51,177,205,190,
-184,158, 81, 63, 0, 0, 0, 0, 70,119,105, 63,143, 74, 70, 62, 35, 44,185,190, 0, 0, 0, 0,162, 84, 89,188,166, 33,101, 63,
- 42, 61,228, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33,210,111,193, 0, 0,128, 63,178,157,229, 62, 69,228, 70,191,
-116,169, 81,191,184,158, 81,191,117, 90,127, 63, 69,188,191, 62,158, 53,185, 62, 35, 44,185, 62,145,180,109,188, 86,142,221, 63,
-218, 72,228,190, 42, 61,228,190, 0, 0, 0, 0, 0, 0, 0, 0, 33,171,108, 65, 33,210,111, 65, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111,255, 76, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,
+ 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,248,195, 17, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,152,197, 17, 7,
+ 0, 0, 0, 0, 88,194, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,100,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,100,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,105,109,101,
+110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140,254,
+ 76, 1,203, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,152,197, 17, 7,
+ 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 56,199, 17, 7, 0, 0, 0, 0,248,195, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105,
+110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105,
+110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65,110,116,105, 45, 65,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58,254, 76, 1, 58, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60,203, 6, 64, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60,203, 6, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 60,203, 6, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 92, 62, 55, 63, 56,186,224,190,
-237,203,148,190, 3,236,234,190, 33,210,111, 65, 33,210,111, 65, 0, 0, 0, 0, 0, 0, 0, 0,114,145,245, 58, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 32, 33, 12, 66, 85,152,137, 66,113, 27,126, 66, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 96, 1, 0, 0,152, 92,215, 3, 0, 0, 0, 0,174, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 56,199, 17, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,216,200, 17, 7,
+ 0, 0, 0, 0,152,197, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,109,111,116,105,111,110, 95, 98,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,109,111,116,105,111,110, 95, 98,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 97,109,112,
+108,101,100, 32, 77,111,116,105,111,110, 32, 66,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,254,
+ 76, 1, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 51, 51, 51, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65,205,204, 76, 62, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0,
-200,213,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,216,200, 17, 7,
+ 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,120,202, 17, 7, 0, 0, 0, 0, 56,199, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,104, 97,100,105,110,103, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 3, 0,
- 8, 24,128, 0, 0, 0, 12, 66, 0, 0,128, 63,205,204,204, 61, 0, 0,122, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 10, 0, 7, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,104, 97,100,105,110,103, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 83, 78, 0, 0, 8, 1, 0, 0,152, 66,216, 3, 0, 0, 0, 0,210, 0, 0, 0, 1, 0, 0, 0, 56, 43,217, 3, 0, 0, 0, 0,
-248, 9,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 82, 71, 97,109,101, 32, 76,
-111,103,105, 99, 0, 46, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 37,201, 3, 0, 0, 0, 0, 72, 45,201, 3, 0, 0, 0, 0,
- 40,136,171, 3, 0, 0, 0, 0,184, 80,216, 3, 0, 0, 0, 0, 88, 17,215, 3, 0, 0, 0, 0,248, 22,215, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10,254, 76, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,
6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 32, 0, 0, 0, 40, 37,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,200, 37,201, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,
-200, 37,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,104, 38,201, 3, 0, 0, 0, 0, 40, 37,201, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 4, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,104, 38,201, 3, 0, 0, 0, 0,
-211, 0, 0, 0, 1, 0, 0, 0, 8, 39,201, 3, 0, 0, 0, 0,200, 37,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-126, 7, 5, 4, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 8, 39,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,
-168, 39,201, 3, 0, 0, 0, 0,104, 38,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 32, 0, 0, 0,168, 39,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 72, 40,201, 3, 0, 0, 0, 0,
- 8, 39,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,234, 3, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,
- 72, 40,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,232, 40,201, 3, 0, 0, 0, 0,168, 39,201, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,126, 7,234, 3, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,232, 40,201, 3, 0, 0, 0, 0,
-211, 0, 0, 0, 1, 0, 0, 0,136, 41,201, 3, 0, 0, 0, 0, 72, 40,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,140, 1, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,136, 41,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,
- 40, 42,201, 3, 0, 0, 0, 0,232, 40,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 6,140, 1, 0, 0, 0, 0,
- 68, 65, 84, 65, 32, 0, 0, 0, 40, 42,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,200, 42,201, 3, 0, 0, 0, 0,
-136, 41,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 6, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,
-200, 42,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,104, 43,201, 3, 0, 0, 0, 0, 40, 42,201, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,126, 7,140, 1, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,104, 43,201, 3, 0, 0, 0, 0,
-211, 0, 0, 0, 1, 0, 0, 0, 8, 44,201, 3, 0, 0, 0, 0,200, 42,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 64, 5,140, 1, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 8, 44,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,
-168, 44,201, 3, 0, 0, 0, 0,104, 43,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 5,234, 3, 1, 0, 0, 0,
- 68, 65, 84, 65, 32, 0, 0, 0,168, 44,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 72, 45,201, 3, 0, 0, 0, 0,
- 8, 44,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 1,140, 1, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,
- 72, 45,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168, 44,201, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 1,234, 3, 1, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 40,136,171, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0,216,136,171, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 37,201, 3, 0, 0, 0, 0,
-104, 38,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,216,136,171, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0, 88, 68,216, 3, 0, 0, 0, 0, 40,136,171, 3, 0, 0, 0, 0,200, 37,201, 3, 0, 0, 0, 0,
-168, 39,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 88, 68,216, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0, 8, 69,216, 3, 0, 0, 0, 0,216,136,171, 3, 0, 0, 0, 0,104, 38,201, 3, 0, 0, 0, 0,
- 72, 40,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 8, 69,216, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0,184, 69,216, 3, 0, 0, 0, 0, 88, 68,216, 3, 0, 0, 0, 0,168, 39,201, 3, 0, 0, 0, 0,
- 72, 40,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,184, 69,216, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0,104, 70,216, 3, 0, 0, 0, 0, 8, 69,216, 3, 0, 0, 0, 0,168, 39,201, 3, 0, 0, 0, 0,
-232, 40,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,104, 70,216, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0, 24, 71,216, 3, 0, 0, 0, 0,184, 69,216, 3, 0, 0, 0, 0,232, 40,201, 3, 0, 0, 0, 0,
-136, 41,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 24, 71,216, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0,200, 71,216, 3, 0, 0, 0, 0,104, 70,216, 3, 0, 0, 0, 0, 8, 39,201, 3, 0, 0, 0, 0,
- 40, 42,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,200, 71,216, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0,120, 72,216, 3, 0, 0, 0, 0, 24, 71,216, 3, 0, 0, 0, 0,136, 41,201, 3, 0, 0, 0, 0,
- 40, 42,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,120, 72,216, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0, 40, 73,216, 3, 0, 0, 0, 0,200, 71,216, 3, 0, 0, 0, 0, 40, 37,201, 3, 0, 0, 0, 0,
-232, 40,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 40, 73,216, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0,216, 73,216, 3, 0, 0, 0, 0,120, 72,216, 3, 0, 0, 0, 0, 40, 37,201, 3, 0, 0, 0, 0,
- 40, 42,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,216, 73,216, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0,136, 74,216, 3, 0, 0, 0, 0, 40, 73,216, 3, 0, 0, 0, 0, 72, 40,201, 3, 0, 0, 0, 0,
-200, 42,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,136, 74,216, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0, 56, 75,216, 3, 0, 0, 0, 0,216, 73,216, 3, 0, 0, 0, 0, 8, 39,201, 3, 0, 0, 0, 0,
-200, 42,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 56, 75,216, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0,232, 75,216, 3, 0, 0, 0, 0,136, 74,216, 3, 0, 0, 0, 0,136, 41,201, 3, 0, 0, 0, 0,
-200, 42,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,232, 75,216, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0,152, 76,216, 3, 0, 0, 0, 0, 56, 75,216, 3, 0, 0, 0, 0,104, 43,201, 3, 0, 0, 0, 0,
- 8, 44,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,152, 76,216, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0, 72, 77,216, 3, 0, 0, 0, 0,232, 75,216, 3, 0, 0, 0, 0, 72, 40,201, 3, 0, 0, 0, 0,
- 8, 44,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 72, 77,216, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0,248, 77,216, 3, 0, 0, 0, 0,152, 76,216, 3, 0, 0, 0, 0,200, 42,201, 3, 0, 0, 0, 0,
-104, 43,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,248, 77,216, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0,168, 78,216, 3, 0, 0, 0, 0, 72, 77,216, 3, 0, 0, 0, 0,232, 40,201, 3, 0, 0, 0, 0,
-168, 44,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,168, 78,216, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0, 88, 79,216, 3, 0, 0, 0, 0,248, 77,216, 3, 0, 0, 0, 0,104, 43,201, 3, 0, 0, 0, 0,
-168, 44,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 88, 79,216, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0, 8, 80,216, 3, 0, 0, 0, 0,168, 78,216, 3, 0, 0, 0, 0,168, 39,201, 3, 0, 0, 0, 0,
- 72, 45,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 8, 80,216, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0,184, 80,216, 3, 0, 0, 0, 0, 88, 79,216, 3, 0, 0, 0, 0, 8, 44,201, 3, 0, 0, 0, 0,
- 72, 45,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,184, 80,216, 3, 0, 0, 0, 0,
-212, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 80,216, 3, 0, 0, 0, 0,168, 44,201, 3, 0, 0, 0, 0,
- 72, 45,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, 88, 17,215, 3, 0, 0, 0, 0,
-214, 0, 0, 0, 1, 0, 0, 0,120, 18,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168, 39,201, 3, 0, 0, 0, 0,
-200, 37,201, 3, 0, 0, 0, 0,104, 38,201, 3, 0, 0, 0, 0, 72, 40,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,126, 7, 0, 0,235, 3, 0, 0, 5, 4, 0, 0, 7, 7,127, 7, 27, 0, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,216,199,207, 3, 0, 0, 0, 0,216,199,207, 3, 0, 0, 0, 0,136,119,215, 3, 0, 0, 0, 0,
- 56,121,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,136,119,215, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,
- 56,121,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,148, 68, 0, 0, 0, 0, 0, 0,208, 65,
- 0, 0, 0, 0, 0,224,239, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0,
- 0,192,239, 68, 0, 0,200, 65, 0,192,239, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3,
- 4, 0, 12, 0, 10, 0,127, 7, 26, 0,127, 7, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,126, 7, 0, 0,235, 3, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-127, 7, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 56,121,215, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,136,119,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,240,109, 69, 0, 0,128,192, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,238, 68, 0, 0, 0, 0, 0, 0, 0, 64,112, 7, 0, 0,129, 7, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0,111, 7, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 2, 0, 0, 0, 1, 0, 3, 3,
- 2, 0, 0, 4, 10, 0,129, 7, 2, 0,112, 7, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 5, 4, 0, 0, 5, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,120, 18,215, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,
-152, 19,215, 3, 0, 0, 0, 0, 88, 17,215, 3, 0, 0, 0, 0, 40, 42,201, 3, 0, 0, 0, 0,136, 41,201, 3, 0, 0, 0, 0,
-200, 42,201, 3, 0, 0, 0, 0, 8, 39,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0,126, 7, 0, 0,
- 0, 0, 0, 0,139, 1, 0, 0, 4, 4, 94, 1,140, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 56,128,199, 3, 0, 0, 0, 0, 56,128,199, 3, 0, 0, 0, 0,232,122,215, 3, 0, 0, 0, 0,152,124,215, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 40, 1, 0, 0,232,122,215, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,152,124,215, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,148, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,175, 67,
- 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,174, 67, 0, 0,200, 65,
- 0,128,174, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 94, 1,
- 26, 0, 94, 1, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0,126, 7, 0, 0,
-114, 1, 0, 0,139, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 1, 26, 0, 0, 0, 1, 0,
- 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,120,202, 17, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 24,204, 17, 7,
+ 0, 0, 0, 0,216,200, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,112,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,112,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,101,114,102,
+111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,242,253,
+ 76, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 40, 1, 0, 0,152,124,215, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-232,122,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,174, 67, 0, 0, 61,196, 0, 0, 0, 0, 0, 0, 0, 0,255,127,166, 67,
-255,255,184,195, 0, 0, 0, 0, 77, 1, 0, 0, 94, 1, 0, 0, 0, 0, 0, 0,113, 1, 0, 0, 0, 0, 0, 0, 78, 1, 0, 0,
- 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 76, 1, 0, 0, 0, 0, 0, 0,113, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 1, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0, 94, 1,
-114, 1, 77, 1,114, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0,126, 7, 0, 0,
- 0, 0, 0, 0,113, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 1,114, 1, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 24,204, 17, 7,
+ 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,184,205, 17, 7, 0, 0, 0, 0,120,202, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,111,115,116, 95,112,114,111, 99,101,
+115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,111,115,116, 95,112,114,111, 99,101,
+115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,111,115,116, 32, 80,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120, 94,215, 3, 0, 0, 0, 0,184,205,216, 3, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,218,253, 76, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,
+ 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 88, 1, 0, 0,120, 94,215, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 88, 96,215, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 83, 95,
- 80, 84, 95, 99,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 83, 95,
- 80, 84, 95, 99,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67,111,110,116,101,120,116, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,220,255, 76, 1, 36, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,184,205, 17, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 88,207, 17, 7,
+ 0, 0, 0, 0, 24,204, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,116, 97,109,
+112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,194,253,
+ 76, 1, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 88,207, 17, 7,
+ 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,248,208, 17, 7, 0, 0, 0, 0,184,205, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,111,117,116,112,117,116, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 88, 96,215, 3, 0, 0, 0, 0,
-213, 0, 0, 0, 1, 0, 0, 0, 56, 98,215, 3, 0, 0, 0, 0,120, 94,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,114,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,111,117,116,112,117,116, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,114,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,135,255, 76, 1, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,253, 76, 1,130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,248,208, 17, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 88,207, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95, 98, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95, 98, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 97,107,101,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 88, 1, 0, 0, 56, 98,215, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 24,100,215, 3, 0, 0, 0, 0,
- 88, 96,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
- 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
- 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 97,121,101,114,115, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16,253,
+ 76, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111,255, 76, 1, 0, 0,
- 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0,152,210, 17, 7,
+ 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 24,100,215, 3, 0, 0, 0, 0,
-213, 0, 0, 0, 1, 0, 0, 0,248,101,215, 3, 0, 0, 0, 0, 56, 98,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,100,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,100,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140,254, 76, 1,203, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, 21, 0, 0,160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,216,211, 17, 7, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 72,219, 17, 7,
+ 0, 0, 0, 0, 72,187, 17, 7, 0, 0, 0, 0, 40,168, 17, 7, 0, 0, 0, 0,200,170, 17, 7, 0, 0, 0, 0, 56,171, 17, 7,
+ 0, 0, 0, 0,168,171, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 6, 0, 0, 0, 0, 0, 0,
+139, 1, 0, 0, 17, 17, 32, 6,140, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184,218, 17, 7,
+ 0, 0, 0, 0,184,218, 17, 7, 0, 0, 0, 0,200,212, 17, 7, 0, 0, 0, 0, 72,217, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0,200,212, 17, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 56,214, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,196, 68, 0, 0, 0, 0,
+ 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 31, 6, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,224,195, 68, 0, 0,200, 65, 0,224,195, 68,
+ 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 32, 6, 26, 0, 32, 6,
+ 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 6, 0, 0, 0, 0, 0, 0,
+ 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 6, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0, 56,214, 17, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 72,217, 17, 7, 0, 0, 0, 0,200,212, 17, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 67, 0, 0,185,195, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 67, 0, 0,185,195,
+ 0, 0, 0, 0,203, 0, 0, 0,220, 0, 0, 0, 0, 0, 0, 0,113, 1, 0, 0, 0, 0, 0, 0,202, 0, 0, 0, 0, 0, 0, 0,
+ 17, 0, 0, 0, 0, 0, 0, 0,202, 0, 0, 0, 0, 0, 0, 0,113, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 3, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,220, 0,114, 1,203, 0,
+114, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,219, 0, 0, 0, 26, 0, 0, 0,
+139, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,220, 0,114, 1, 0, 0, 4, 0, 3, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168,215, 17, 7, 0, 0, 0, 0,168,215, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 88, 1, 0, 0,168,215, 17, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 79, 71, 73, 67, 95, 80, 84, 95,112,114,111,
+112,101,114,116,105,101,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 79, 71, 73, 67, 95, 80, 84, 95,112,114,111,
+112,101,114,116,105,101,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,114,111,112,101,114,116,105,101,115, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 88, 1, 0, 0,248,101,215, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,216,103,215, 3, 0, 0, 0, 0,
- 24,100,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
- 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
- 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65,110,116,105, 45, 65,108,105,
- 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58,254, 76, 1, 58, 0,
- 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,196,255,203, 0, 36, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,216,103,215, 3, 0, 0, 0, 0,
-213, 0, 0, 0, 1, 0, 0, 0, 88,196,216, 3, 0, 0, 0, 0,248,101,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,109,111,116,105,111,110, 95, 98,108,117,114, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,109,111,116,105,111,110, 95, 98,108,117,114, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 72,217, 17, 7, 0, 0, 0, 0,215, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,214, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 68, 0, 0, 0, 0,
+ 0, 0,112, 67, 0, 80, 31,195, 0,234,179, 68,224,198,182,194,184,177,165, 67, 51, 5, 0, 0, 68, 5, 0, 0, 18, 0, 0, 0,
+113, 1, 0, 0, 0, 0, 0, 0, 50, 5, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 50, 5, 0, 0, 18, 0, 0, 0,
+113, 1, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,250, 70, 0, 0,250, 70, 0, 0, 0, 63, 72,225,154, 63, 10, 0, 0, 0,
+ 0, 0, 3, 0, 0, 0, 0, 4, 0, 0, 68, 5,114, 1, 51, 5, 96, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,220, 0, 0, 0, 31, 6, 0, 0, 26, 0, 0, 0,139, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 5,114, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 83, 97,109,112,108,101,100, 32, 77,111,116,105,111,110, 32, 66,108,117,114, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,254, 76, 1, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 72, 0, 0, 0,184,218, 17, 7, 0, 0, 0, 0,192, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, 72,219, 17, 7, 0, 0, 0, 0,214, 0, 0, 0,
+ 1, 0, 0, 0, 8,226, 17, 7, 0, 0, 0, 0,216,211, 17, 7, 0, 0, 0, 0,136,172, 17, 7, 0, 0, 0, 0,248,172, 17, 7,
+ 0, 0, 0, 0, 88,170, 17, 7, 0, 0, 0, 0, 24,172, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 5, 0, 0,
+126, 7, 0, 0,141, 1, 0, 0,233, 3, 0, 0, 9, 9, 62, 2, 93, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 24,223, 17, 7, 0, 0, 0, 0, 24,223, 17, 7, 0, 0, 0, 0, 56,220, 17, 7, 0, 0, 0, 0,168,221, 17, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 56,220, 17, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,168,221, 17, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,230, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0,
+ 0,128, 15, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, 2, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 64, 15, 68,
+ 0, 0,200, 65, 0, 64, 15, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0,
+ 10, 0, 62, 2, 26, 0, 62, 2, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 5, 0, 0,
+126, 7, 0, 0,141, 1, 0, 0,166, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 2, 26, 0,
+ 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,168,221, 17, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 56,220, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,181, 67, 0, 0, 0, 0, 0,128,218, 67, 0, 0, 0, 0,
+131,248, 1, 68, 0, 0, 0, 0, 86, 26, 3, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, 2, 0, 0, 0, 0, 0, 0, 66, 2, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10,215, 35, 60, 0, 0,122, 68, 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 0, 4,
+ 10, 0, 62, 2, 67, 2, 62, 2, 67, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 5, 0, 0,
+126, 7, 0, 0,167, 1, 0, 0,233, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 2, 67, 2,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 88, 1, 0, 0, 88,196,216, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 56,198,216, 3, 0, 0, 0, 0,
-216,103,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
- 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
- 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,104, 97,100,105,110,103, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10,254, 76, 1, 0, 0,
- 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65,160, 2, 0, 0, 24,223, 17, 7, 0, 0, 0, 0,186, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 56,198,216, 3, 0, 0, 0, 0,
-213, 0, 0, 0, 1, 0, 0, 0, 24,200,216, 3, 0, 0, 0, 0, 88,196,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 80,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,242,253, 76, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 88, 1, 0, 0, 24,200,216, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,248,201,216, 3, 0, 0, 0, 0,
- 56,198,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
- 84, 95,112,111,115,116, 95,112,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
- 84, 95,112,111,115,116, 95,112,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,111,115,116, 32, 80,114,111,
- 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,218,253, 76, 1, 0, 0,
- 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,248,201,216, 3, 0, 0, 0, 0,
-213, 0, 0, 0, 1, 0, 0, 0,216,203,216, 3, 0, 0, 0, 0, 24,200,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 83,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,194,253, 76, 1, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 88, 1, 0, 0,216,203,216, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,184,205,216, 3, 0, 0, 0, 0,
-248,201,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
- 84, 95,111,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
- 84, 95,111,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79,117,116,112,117,116, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,253, 76, 1,130, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,184,205,216, 3, 0, 0, 0, 0,
-213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216,203,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 98, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+160, 0, 0, 0, 8,226, 17, 7, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,152,239, 17, 7, 0, 0, 0, 0, 72,219, 17, 7,
+ 0, 0, 0, 0,104,173, 17, 7, 0, 0, 0, 0,216,173, 17, 7, 0, 0, 0, 0,248,172, 17, 7, 0, 0, 0, 0,136,172, 17, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 1, 0, 0, 63, 5, 0, 0,141, 1, 0, 0,233, 3, 0, 0, 1, 1,251, 3,
+ 93, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,237, 17, 7, 0, 0, 0, 0,232,237, 17, 7,
+ 0, 0, 0, 0,248,226, 17, 7, 0, 0, 0, 0,184,232, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,248,226, 17, 7,
+ 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,104,228, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 64,113, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,192,126, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+250, 3, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,126, 68, 0, 0,200, 65, 0,128,126, 68, 0, 0,200, 65, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,251, 3, 26, 0,251, 3, 26, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 1, 0, 0, 63, 5, 0, 0,141, 1, 0, 0,166, 1, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,251, 3, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,104,228, 17, 7,
+ 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,216,229, 17, 7, 0, 0, 0, 0,248,226, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 15, 67, 0, 64, 70,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67,255,127, 70,196, 0, 0, 0, 0,143, 0, 0, 0,
+160, 0, 0, 0, 18, 0, 0, 0, 43, 3, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,
+142, 0, 0, 0, 18, 0, 0, 0, 43, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,
+ 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,160, 0, 44, 3,143, 0, 26, 3, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 1, 0, 0, 69, 1, 0, 0,167, 1, 0, 0,233, 3, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 67, 2, 0, 0, 5, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,216,229, 17, 7,
+ 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 72,231, 17, 7, 0, 0, 0, 0,104,228, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 16, 67, 0, 0,206,194, 0, 0, 0, 0, 0, 0, 0, 0,231,102, 16, 67, 0, 0,206,194, 0, 0, 0, 0,143, 0, 0, 0,
+160, 0, 0, 0, 18, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,
+142, 0, 0, 0, 18, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,
+ 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,160, 0,120, 0,143, 0,102, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 1, 0, 0, 63, 5, 0, 0,167, 1, 0, 0,167, 1, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 6, 0, 34, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 72,231, 17, 7,
+ 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,184,232, 17, 7, 0, 0, 0, 0,216,229, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 52, 67, 0, 0,109,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 67, 0, 0,109,196, 0,128,145,195,163, 0, 0, 0,
+180, 0, 0, 0, 0, 0, 0, 0,144, 2, 0, 0, 0, 0, 0, 0,162, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,
+162, 0, 0, 0, 0, 0, 0, 0,144, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,
+ 0, 0, 0, 64, 10, 1, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,180, 0,145, 2,163, 0,145, 2, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 5, 0, 0, 63, 5, 0, 0,167, 1, 0, 0,233, 3, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 98, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,184,232, 17, 7,
+ 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,231, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16,253, 76, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65,248, 0, 0, 0, 56,128,199, 3, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 1, 0, 0, 63, 5, 0, 0,167, 1, 0, 0,233, 3, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,251, 3, 67, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,234, 17, 7, 0, 0, 0, 0, 68, 65, 84, 65,112, 3, 0, 0, 40,234, 17, 7,
+ 0, 0, 0, 0,173, 0, 0, 0, 1, 0, 0, 0,190, 35, 30, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 75, 40,139, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111, 18, 3,187, 0, 0, 0, 0, 0, 0, 0,128,
+ 0, 0, 0,128, 0, 0, 0,128, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,190, 35, 30, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 75, 40,139, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111, 18, 3,187, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,149, 53,207, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+112,121,107, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,249,195, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,190, 35, 30, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 75, 40,139, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111, 18, 3,187, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, 21, 0, 0,160, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,152, 19,215, 3, 0, 0, 0, 0,
-214, 0, 0, 0, 1, 0, 0, 0,184, 20,215, 3, 0, 0, 0, 0,120, 18,215, 3, 0, 0, 0, 0, 40, 37,201, 3, 0, 0, 0, 0,
-232, 40,201, 3, 0, 0, 0, 0,136, 41,201, 3, 0, 0, 0, 0, 40, 42,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 31, 6, 0, 0, 0, 0, 0, 0,139, 1, 0, 0, 17, 17, 32, 6,140, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,248,217,208, 3, 0, 0, 0, 0,248,217,208, 3, 0, 0, 0, 0, 72,126,215, 3, 0, 0, 0, 0,
-168,129,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 72,126,215, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,
-248,127,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74, 67, 0, 0, 0, 0, 0, 0,208, 65,
- 0, 0, 0, 0, 0, 0,196, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 6, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0,
- 0,224,195, 68, 0, 0,200, 65, 0,224,195, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3,
- 4, 0, 12, 0, 10, 0, 32, 6, 26, 0, 32, 6, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 31, 6, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 32, 6, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,248,127,215, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,
-168,129,215, 3, 0, 0, 0, 0, 72,126,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 67, 0, 0,185,195, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 75, 67, 0, 0,185,195, 0, 0, 0, 0,203, 0, 0, 0,220, 0, 0, 0, 0, 0, 0, 0,113, 1, 0, 0,
- 0, 0, 0, 0,202, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,202, 0, 0, 0, 0, 0, 0, 0,113, 1, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 3, 0, 0, 1, 0, 7, 0,
- 18, 0, 0, 4, 6, 0,220, 0,114, 1,203, 0,114, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,219, 0, 0, 0, 26, 0, 0, 0,139, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-220, 0,114, 1, 0, 0, 4, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152,207,216, 3, 0, 0, 0, 0,
-152,207,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,152,207,216, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 76, 79, 71, 73, 67, 95, 80, 84, 95,112,114,111,112,101,114,116,105,101,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 76, 79, 71, 73, 67, 95, 80, 84, 95,112,114,111,112,101,114,116,105,101,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,207, 3,116, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+207, 3,116, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,207, 3,116, 64, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,149, 53,207, 65,
+214,211,111, 65, 0, 0, 0, 0, 0, 0, 0, 0,221, 57, 80, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 65,
+ 0, 0, 5, 0,251,251, 0, 0, 92, 62, 55, 63, 56,186,224,190,237,203,148,190, 3,236,234,190, 1, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,180, 66, 0, 0,180, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 96, 1, 0, 0,232,237, 17, 7, 0, 0, 0, 0,174, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 51, 51, 51, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65,
+205,204, 76, 62, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0, 72,219, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 80,114,111,112,101,114,116,105,101,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,196,255,203, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 3, 0, 8, 8,128, 0, 0, 0, 12, 66, 0, 0,128, 63,
+205,204,204, 61, 0, 0,122, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 16, 0, 10, 0, 7, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,
-168,129,215, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,127,215, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,160, 68, 0, 0, 0, 0, 0, 0,112, 67, 0, 80, 31,195, 0,234,179, 68,224,198,182,194,184,177,165, 67,
- 51, 5, 0, 0, 68, 5, 0, 0, 18, 0, 0, 0,113, 1, 0, 0, 0, 0, 0, 0, 50, 5, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0,
- 0, 0, 0, 0, 50, 5, 0, 0, 18, 0, 0, 0,113, 1, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,250, 70, 0, 0,250, 70,
- 0, 0, 0, 63, 72,225,154, 63, 10, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 4, 0, 0, 68, 5,114, 1, 51, 5, 96, 1, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,220, 0, 0, 0, 31, 6, 0, 0, 26, 0, 0, 0,139, 1, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 5,114, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,152,239, 17, 7,
+ 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,226, 17, 7, 0, 0, 0, 0,200,170, 17, 7,
+ 0, 0, 0, 0,232,169, 17, 7, 0, 0, 0, 0,216,173, 17, 7, 0, 0, 0, 0,104,173, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 67, 1, 0, 0,141, 1, 0, 0,233, 3, 0, 0, 3, 3, 68, 1, 93, 2, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,104,243, 17, 7, 0, 0, 0, 0,104,243, 17, 7, 0, 0, 0, 0,136,240, 17, 7,
+ 0, 0, 0, 0,248,241, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,136,240, 17, 7, 0, 0, 0, 0,215, 0, 0, 0,
+ 1, 0, 0, 0,248,241, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,244, 67, 0, 0, 0, 0,
+ 0, 0,208, 65, 0, 0, 0, 0, 0, 0,162, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 0, 0,
+ 25, 0, 0, 0, 0,128,161, 67, 0, 0,200, 65, 0,128,161, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
+ 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 68, 1, 26, 0, 68, 1, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 67, 1, 0, 0,141, 1, 0, 0,166, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 1, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,248,241, 17, 7, 0, 0, 0, 0,215, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136,240, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,141, 67, 0, 0,244,194,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0,128,153, 67, 0, 64, 12,196, 0, 0, 0, 0, 51, 1, 0, 0, 68, 1, 0, 0, 18, 0, 0, 0,
+ 66, 2, 0, 0, 0, 0, 0, 0, 50, 1, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 50, 1, 0, 0, 18, 0, 0, 0,
+ 66, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 18, 6, 0, 0,
+ 2, 0, 3, 3, 0, 0, 12, 4, 6, 0, 68, 1, 67, 2, 51, 1, 49, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 67, 1, 0, 0,167, 1, 0, 0,233, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 1, 67, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 1, 0, 0,104,243, 17, 7, 0, 0, 0, 0,183, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 72, 0, 0, 0,
-248,217,208, 3, 0, 0, 0, 0,192, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,
-184, 20,215, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,216, 21,215, 3, 0, 0, 0, 0,152, 19,215, 3, 0, 0, 0, 0,
-104, 43,201, 3, 0, 0, 0, 0, 8, 44,201, 3, 0, 0, 0, 0, 72, 40,201, 3, 0, 0, 0, 0,200, 42,201, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 65, 5, 0, 0,126, 7, 0, 0,141, 1, 0, 0,233, 3, 0, 0, 9, 9, 62, 2, 93, 2, 1, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,228,216, 3, 0, 0, 0, 0, 40,228,216, 3, 0, 0, 0, 0,
- 88,131,215, 3, 0, 0, 0, 0, 8,133,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 88,131,215, 3, 0, 0, 0, 0,
-215, 0, 0, 0, 1, 0, 0, 0, 8,133,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,230, 67,
- 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,128, 15, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, 2, 0, 0,
- 0, 0, 0, 0, 25, 0, 0, 0, 0, 64, 15, 68, 0, 0,200, 65, 0, 64, 15, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 62, 2, 26, 0, 62, 2, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 65, 5, 0, 0,126, 7, 0, 0,141, 1, 0, 0,166, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 62, 2, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 8,133,215, 3, 0, 0, 0, 0,
-215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,131,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,181, 67,
- 0, 0, 0, 0, 0,128,218, 67, 0, 0, 0, 0,131,248, 1, 68, 0, 0, 0, 0, 86, 26, 3, 68, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, 2, 0, 0,
- 0, 0, 0, 0, 66, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10,215, 35, 60, 0, 0,122, 68,
- 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 0, 4, 10, 0, 62, 2, 67, 2, 62, 2, 67, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 65, 5, 0, 0,126, 7, 0, 0,167, 1, 0, 0,233, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 62, 2, 67, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,244, 17, 7,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 68, 65, 84, 65,
+ 16, 0, 0, 0,200,244, 17, 7, 0, 0, 0, 0,237, 0, 0, 0, 1, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 40,245, 17, 7,
+ 0, 0, 0, 0, 68, 65, 84, 65,224, 0, 0, 0, 40,245, 17, 7, 0, 0, 0, 0,236, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1, 0,200,189, 18, 7, 0, 0, 0, 0, 19, 0, 0, 0, 1, 0, 1, 0,200,189, 18, 7, 0, 0, 0, 0, 20, 0, 0, 0,
+ 1, 0, 1, 0,200,189, 18, 7, 0, 0, 0, 0, 21, 0, 1, 0, 1, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 1, 0,120,216, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,232,225, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 1, 0,136, 24, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,200,239, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 1, 0,216, 5, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 40,233, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 1, 0,184,211, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 72,219, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 1, 0,168,210, 18, 7, 0, 0, 0, 0, 21, 0, 0, 0, 1, 0, 1, 0,200,189, 18, 7, 0, 0, 0, 0, 83, 78, 0, 0,
+ 8, 1, 0, 0,136, 22, 49, 8, 0, 0, 0, 0,210, 0, 0, 0, 1, 0, 0, 0,232,246, 17, 7, 0, 0, 0, 0,216,166, 17, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 82, 77,111,116,105,111,110, 32, 84,114, 97,
+ 99,107,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152,235, 49, 8, 0, 0, 0, 0,232, 86, 65, 8, 0, 0, 0, 0, 24, 96, 55, 8,
+ 0, 0, 0, 0, 40,211, 55, 8, 0, 0, 0, 0, 40, 89, 55, 8, 0, 0, 0, 0, 88,136, 49, 8, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,220,104,118, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 32, 0, 0, 0,152,235, 49, 8, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,216, 6, 56, 8, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,216, 6, 56, 8,
+ 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 72, 80, 55, 8, 0, 0, 0, 0,152,235, 49, 8, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 98, 4, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 72, 80, 55, 8, 0, 0, 0, 0,211, 0, 0, 0,
+ 1, 0, 0, 0, 88,104, 55, 8, 0, 0, 0, 0,216, 6, 56, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 6, 98, 4,
+ 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 88,104, 55, 8, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 72,105, 55, 8,
+ 0, 0, 0, 0, 72, 80, 55, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 6, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 32, 0, 0, 0, 72,105, 55, 8, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,232, 18, 56, 8, 0, 0, 0, 0, 88,104, 55, 8,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 4, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,232, 18, 56, 8,
+ 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,168,182, 49, 8, 0, 0, 0, 0, 72,105, 55, 8, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 62, 6, 64, 4, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,168,182, 49, 8, 0, 0, 0, 0,211, 0, 0, 0,
+ 1, 0, 0, 0, 88,207, 49, 8, 0, 0, 0, 0,232, 18, 56, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 5, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 88,207, 49, 8, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,136,202, 31, 7,
+ 0, 0, 0, 0,168,182, 49, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 5, 64, 4, 0, 0, 0, 0, 68, 65, 84, 65,
+ 32, 0, 0, 0,136,202, 31, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,120,201, 31, 7, 0, 0, 0, 0, 88,207, 49, 8,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,108, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,120,201, 31, 7,
+ 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 56,186, 31, 7, 0, 0, 0, 0,136,202, 31, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 62, 6,108, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 56,186, 31, 7, 0, 0, 0, 0,211, 0, 0, 0,
+ 1, 0, 0, 0,248,162, 50, 8, 0, 0, 0, 0,120,201, 31, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120, 3,
+ 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,248,162, 50, 8, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,136, 76, 53, 8,
+ 0, 0, 0, 0, 56,186, 31, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 6,120, 3, 0, 0, 0, 0, 68, 65, 84, 65,
+ 32, 0, 0, 0,136, 76, 53, 8, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,232, 86, 65, 8, 0, 0, 0, 0,248,162, 50, 8,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,208, 2,120, 3, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,232, 86, 65, 8,
+ 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136, 76, 53, 8, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,208, 2, 64, 4, 1, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 24, 96, 55, 8, 0, 0, 0, 0,212, 0, 0, 0,
+ 1, 0, 0, 0, 8,106, 50, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 80, 55, 8, 0, 0, 0, 0,216, 6, 56, 8,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 8,106, 50, 8, 0, 0, 0, 0,212, 0, 0, 0,
+ 1, 0, 0, 0, 72, 65, 49, 8, 0, 0, 0, 0, 24, 96, 55, 8, 0, 0, 0, 0, 72,105, 55, 8, 0, 0, 0, 0,216, 6, 56, 8,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 72, 65, 49, 8, 0, 0, 0, 0,212, 0, 0, 0,
+ 1, 0, 0, 0, 24,183, 49, 8, 0, 0, 0, 0, 8,106, 50, 8, 0, 0, 0, 0, 72, 80, 55, 8, 0, 0, 0, 0,232, 18, 56, 8,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 24,183, 49, 8, 0, 0, 0, 0,212, 0, 0, 0,
+ 1, 0, 0, 0,248,127, 51, 8, 0, 0, 0, 0, 72, 65, 49, 8, 0, 0, 0, 0, 72,105, 55, 8, 0, 0, 0, 0,232, 18, 56, 8,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,248,127, 51, 8, 0, 0, 0, 0,212, 0, 0, 0,
+ 1, 0, 0, 0,248, 85, 53, 8, 0, 0, 0, 0, 24,183, 49, 8, 0, 0, 0, 0,152,235, 49, 8, 0, 0, 0, 0, 88,104, 55, 8,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,248, 85, 53, 8, 0, 0, 0, 0,212, 0, 0, 0,
+ 1, 0, 0, 0, 56, 81, 55, 8, 0, 0, 0, 0,248,127, 51, 8, 0, 0, 0, 0,136,202, 31, 7, 0, 0, 0, 0,152,235, 49, 8,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 56, 81, 55, 8, 0, 0, 0, 0,212, 0, 0, 0,
+ 1, 0, 0, 0,184,217, 31, 7, 0, 0, 0, 0,248, 85, 53, 8, 0, 0, 0, 0,120,201, 31, 7, 0, 0, 0, 0, 88,104, 55, 8,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,184,217, 31, 7, 0, 0, 0, 0,212, 0, 0, 0,
+ 1, 0, 0, 0,152, 16, 49, 8, 0, 0, 0, 0, 56, 81, 55, 8, 0, 0, 0, 0,120,201, 31, 7, 0, 0, 0, 0,136,202, 31, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,152, 16, 49, 8, 0, 0, 0, 0,212, 0, 0, 0,
+ 1, 0, 0, 0,248,101, 55, 8, 0, 0, 0, 0,184,217, 31, 7, 0, 0, 0, 0, 56,186, 31, 7, 0, 0, 0, 0,136,202, 31, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,248,101, 55, 8, 0, 0, 0, 0,212, 0, 0, 0,
+ 1, 0, 0, 0,136,101, 55, 8, 0, 0, 0, 0,152, 16, 49, 8, 0, 0, 0, 0, 56,186, 31, 7, 0, 0, 0, 0, 72,105, 55, 8,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,136,101, 55, 8, 0, 0, 0, 0,212, 0, 0, 0,
+ 1, 0, 0, 0,104, 49, 49, 8, 0, 0, 0, 0,248,101, 55, 8, 0, 0, 0, 0,248,162, 50, 8, 0, 0, 0, 0,232, 18, 56, 8,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,104, 49, 49, 8, 0, 0, 0, 0,212, 0, 0, 0,
+ 1, 0, 0, 0, 88, 92,239, 6, 0, 0, 0, 0,136,101, 55, 8, 0, 0, 0, 0,120,201, 31, 7, 0, 0, 0, 0,248,162, 50, 8,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 88, 92,239, 6, 0, 0, 0, 0,212, 0, 0, 0,
+ 1, 0, 0, 0, 24,218, 48, 8, 0, 0, 0, 0,104, 49, 49, 8, 0, 0, 0, 0, 56,186, 31, 7, 0, 0, 0, 0,248,162, 50, 8,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 24,218, 48, 8, 0, 0, 0, 0,212, 0, 0, 0,
+ 1, 0, 0, 0,104, 94, 56, 8, 0, 0, 0, 0, 88, 92,239, 6, 0, 0, 0, 0, 56,186, 31, 7, 0, 0, 0, 0,136, 76, 53, 8,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,104, 94, 56, 8, 0, 0, 0, 0,212, 0, 0, 0,
+ 1, 0, 0, 0, 40,243, 31, 7, 0, 0, 0, 0, 24,218, 48, 8, 0, 0, 0, 0,248,162, 50, 8, 0, 0, 0, 0,136, 76, 53, 8,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 40,243, 31, 7, 0, 0, 0, 0,212, 0, 0, 0,
+ 1, 0, 0, 0,200,233, 31, 7, 0, 0, 0, 0,104, 94, 56, 8, 0, 0, 0, 0, 72,105, 55, 8, 0, 0, 0, 0,232, 86, 65, 8,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,200,233, 31, 7, 0, 0, 0, 0,212, 0, 0, 0,
+ 1, 0, 0, 0, 40,211, 55, 8, 0, 0, 0, 0, 40,243, 31, 7, 0, 0, 0, 0,232, 18, 56, 8, 0, 0, 0, 0,232, 86, 65, 8,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 40,211, 55, 8, 0, 0, 0, 0,212, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,233, 31, 7, 0, 0, 0, 0,136, 76, 53, 8, 0, 0, 0, 0,232, 86, 65, 8,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, 40, 89, 55, 8, 0, 0, 0, 0,214, 0, 0, 0,
+ 1, 0, 0, 0,232,139, 55, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,105, 55, 8, 0, 0, 0, 0,216, 6, 56, 8,
+ 0, 0, 0, 0, 72, 80, 55, 8, 0, 0, 0, 0,232, 18, 56, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 62, 6, 0, 0, 65, 4, 0, 0, 98, 4, 0, 0, 7, 7, 63, 6, 34, 0, 1, 0, 0, 0, 0, 0, 7, 0, 8, 0,184,206,240, 6,
+ 0, 0, 0, 0,184,142, 55, 8, 0, 0, 0, 0,184,142, 55, 8, 0, 0, 0, 0,168,183, 55, 8, 0, 0, 0, 0, 24,185, 55, 8,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,234, 31, 7, 0, 0, 0, 0,200,145, 49, 8,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,168,183, 55, 8, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 24,185, 55, 8,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,163, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0,
+ 0,224,199, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 6, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,192,199, 68,
+ 0, 0,200, 65, 0,192,199, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0,
+ 10, 0, 63, 6, 26, 0, 63, 6, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 62, 6, 0, 0, 65, 4, 0, 0, 90, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 6, 26, 0,
+ 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,208,240, 6,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 24,185, 55, 8, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,168,183, 55, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,239, 68, 0, 0, 0, 0, 0, 0,200, 65, 0, 0, 0, 0,
+ 0,192,197, 68, 0, 0,128, 64, 0, 0, 64, 65, 46, 6, 0, 0, 63, 6, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,
+111, 7, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 45, 6, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 2, 0, 0, 0, 1, 0, 3, 3, 2, 0, 0, 4,
+ 10, 0, 63, 6, 8, 0, 46, 6, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 62, 6, 0, 0, 91, 4, 0, 0, 98, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 6, 8, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216,207,240, 6,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,232,139, 55, 8, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,232, 17, 56, 8,
+ 0, 0, 0, 0, 40, 89, 55, 8, 0, 0, 0, 0,152,235, 49, 8, 0, 0, 0, 0,136,202, 31, 7, 0, 0, 0, 0,120,201, 31, 7,
+ 0, 0, 0, 0, 88,104, 55, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 6, 0, 0, 0, 0, 0, 0,
+107, 0, 0, 0, 15, 15, 63, 6,108, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,158,240, 6, 0, 0, 0, 0, 88,219, 48, 8,
+ 0, 0, 0, 0, 88,219, 48, 8, 0, 0, 0, 0, 8,223, 55, 8, 0, 0, 0, 0,120,224, 55, 8, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136, 20,238, 6, 0, 0, 0, 0, 8,105, 56, 8, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0, 8,223, 55, 8, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,120,224, 55, 8, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0,224,199, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,224,199, 68, 0, 0, 0, 0,
+ 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 62, 6, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,192,199, 68, 0, 0,200, 65, 0,192,199, 68,
+ 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 63, 6, 26, 0, 63, 6,
+ 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 6, 0, 0, 0, 0, 0, 0,
+ 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 6, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,160,240, 6, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 2, 0, 0, 40,228,216, 3, 0, 0, 0, 0,
-186, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
- 4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0,120,224, 55, 8, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,223, 55, 8,
+ 0, 0, 0, 0, 0, 0, 64,192, 0, 0,126, 67, 0, 0, 0, 0, 0, 0, 72, 66, 88,218,103,194, 40,147,141, 67, 0, 0, 0, 0,
+ 0, 0, 72, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 6, 0, 0, 0, 0, 0, 0,
+ 17, 0, 0, 0, 0, 0, 0, 0, 62, 6, 0, 0, 18, 0, 0, 0, 81, 0, 0, 0, 0, 0,128, 63, 0, 0, 72, 66, 0,124,146, 72,
+ 0, 0, 72, 66,205,204,204, 61, 0, 0, 32, 65, 72, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, 4, 8, 0, 63, 6, 82, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 6, 0, 0, 26, 0, 0, 0,
+107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 6, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,159,240, 6, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+208, 0, 0, 0, 88,219, 48, 8, 0, 0, 0, 0,190, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0,
+ 1, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,232, 17, 56, 8, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 72,215, 31, 7,
+ 0, 0, 0, 0,232,139, 55, 8, 0, 0, 0, 0,136,202, 31, 7, 0, 0, 0, 0, 56,186, 31, 7, 0, 0, 0, 0,248,162, 50, 8,
+ 0, 0, 0, 0,120,201, 31, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 6, 0, 0,109, 0, 0, 0,
+119, 3, 0, 0, 20, 20, 63, 6, 11, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 3,241, 6, 0, 0, 0, 0,120,224, 31, 7,
+ 0, 0, 0, 0,120,224, 31, 7, 0, 0, 0, 0,200,252, 52, 8, 0, 0, 0, 0,216, 62, 53, 8, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232, 82, 53, 8, 0, 0, 0, 0,120, 57, 51, 8, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0,200,252, 52, 8, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,152,155, 31, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 19, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,224,199, 68, 0, 0, 0, 0,
+ 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 62, 6, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,192,199, 68, 0, 0,200, 65, 0,192,199, 68,
+ 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 0, 0, 10, 0, 63, 6, 26, 0, 63, 6,
+ 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 6, 0, 0,109, 0, 0, 0,
+134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 6, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136, 12,241, 6, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0,152,155, 31, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,168, 14, 49, 8, 0, 0, 0, 0,200,252, 52, 8,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0,128,178, 67, 0, 64, 30,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67, 0, 64, 30,196,
+ 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 0, 0, 0, 0,120, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0,120, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 3, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,160, 0,121, 2,143, 0,
+121, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,159, 0, 0, 0,255, 0, 0, 0,
+119, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 0,121, 2, 0, 0, 5, 0, 3, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 9,241, 6, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0,168, 14, 49, 8, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,200,226, 31, 7, 0, 0, 0, 0,152,155, 31, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0,128,178, 67, 0, 0,240,194, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67, 0, 0,240,194,
+ 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 0, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 3, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,160, 0,120, 0,143, 0,
+120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,159, 0, 0, 0,135, 0, 0, 0,
+254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 0,120, 0, 0, 0, 6, 0, 34, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 10,241, 6, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136,107, 50, 8, 0, 0, 0, 0,136,107, 50, 8, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 88, 1, 0, 0,136,107, 50, 8, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 40, 11,241, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 76, 73, 80, 95, 80, 84, 95,108, 97,115,116,
+ 95,111,112,101,114, 97,116,111,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 76, 73, 80, 95, 80, 84, 95,108, 97,115,116,
+ 95,111,112,101,114, 97,116,111,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 78,101,119, 32, 83, 99,114,101,101,110, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216,255,143, 0, 16, 0, 0, 0, 0, 0,
+ 0, 0, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,200,226, 31, 7, 0, 0, 0, 0,215, 0, 0, 0,
+ 1, 0, 0, 0,200,190, 55, 8, 0, 0, 0, 0,168, 14, 49, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,178, 67, 0, 64, 60,196,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67, 0, 64, 60,196, 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 0, 0, 0, 0,
+240, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0,
+240, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 3, 0, 0,
+ 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,160, 0,241, 2,143, 0,241, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,159, 5, 0, 0, 62, 6, 0, 0,135, 0, 0, 0,119, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,160, 0,241, 2, 0, 0, 4, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,248, 6,241, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 99, 51, 8,
+ 0, 0, 0, 0,248, 99, 51, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,248, 99, 51, 8, 0, 0, 0, 0,213, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232, 7,241, 6, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 67, 76, 73, 80, 95, 80, 84, 95,103,112,101,110, 99,105,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 67, 76, 73, 80, 95, 80, 84, 95,103,112,101,110, 99,105,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 71,114,101, 97,115,101, 32, 80,101,110, 99,105,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,232,255,143, 0, 0, 0, 0, 0, 0, 0, 4, 0, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0,200,190, 55, 8, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 24,126, 51, 8, 0, 0, 0, 0,200,226, 31, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67, 0, 64,110,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 67, 0,192,105,196,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,159, 0, 0, 0, 0, 0, 0, 0,
+ 17, 0, 0, 0, 0, 0, 0, 0,159, 0, 0, 0, 18, 0, 0, 0,184, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 8, 0, 0, 0, 2, 0, 3, 3, 0, 0, 2, 0, 6, 0,160, 0,185, 3,160, 0,
+167, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 0, 0, 0,160, 0, 0, 0,135, 0, 0, 0,
+119, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120, 13,241, 6, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0, 24,126, 51, 8, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,216, 62, 53, 8, 0, 0, 0, 0,200,190, 55, 8,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,122, 67, 0, 0, 32,193, 0, 0, 32, 65, 0, 0, 0, 0, 0, 0,122, 67, 0, 0, 32,193,
+ 0, 0, 32, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 0, 0,128, 0, 0,124,146, 72,
+255,255,127,127, 0, 0, 0, 0, 0, 0, 0, 0,105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 0, 0, 0,160, 0, 0, 0,135, 0, 0, 0,
+119, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 7, 0, 0, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 6,241, 6, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0,216, 62, 53, 8, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24,126, 51, 8,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,255, 0, 0,128,127, 0, 0,128,255,
+ 0, 0,128,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,255, 4, 0, 0, 0, 0, 0, 0,241, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 10,215, 35, 60, 0, 0,122, 68, 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 0, 4, 10, 0,255, 4,241, 2,255, 4,
+241, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 0, 0, 0,158, 5, 0, 0,135, 0, 0, 0,
+119, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, 4,241, 2, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 5,241, 6, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 48, 1, 0, 0,120,224, 31, 7, 0, 0, 0, 0,196, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
+120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17,200, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,216, 21,215, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,
-248, 22,215, 3, 0, 0, 0, 0,184, 20,215, 3, 0, 0, 0, 0,168, 44,201, 3, 0, 0, 0, 0, 72, 45,201, 3, 0, 0, 0, 0,
- 8, 44,201, 3, 0, 0, 0, 0,104, 43,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 1, 0, 0, 63, 5, 0, 0,
-141, 1, 0, 0,233, 3, 0, 0, 1, 1,251, 3, 93, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-120,209,216, 3, 0, 0, 0, 0,120,209,216, 3, 0, 0, 0, 0,184,134,215, 3, 0, 0, 0, 0,216,234,216, 3, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 40, 1, 0, 0,184,134,215, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,104,136,215, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,113, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,192,126, 68,
- 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,250, 3, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,126, 68, 0, 0,200, 65,
- 0,128,126, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,251, 3,
- 26, 0,251, 3, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 1, 0, 0, 63, 5, 0, 0,
-141, 1, 0, 0,166, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,251, 3, 26, 0, 0, 0, 1, 0,
- 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, 72,215, 31, 7, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 88,136, 49, 8,
+ 0, 0, 0, 0,232, 17, 56, 8, 0, 0, 0, 0,136, 76, 53, 8, 0, 0, 0, 0,232, 86, 65, 8, 0, 0, 0, 0,232, 18, 56, 8,
+ 0, 0, 0, 0,248,162, 50, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,209, 2, 0, 0, 62, 6, 0, 0,121, 3, 0, 0,
+ 63, 4, 0, 0, 20, 20,110, 3,199, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 3,241, 6, 0, 0, 0, 0,168,104, 53, 8,
+ 0, 0, 0, 0,168,104, 53, 8, 0, 0, 0, 0,232,206, 50, 8, 0, 0, 0, 0, 88,110, 56, 8, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152, 94, 55, 8, 0, 0, 0, 0,248,239, 55, 8, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0,232,206, 50, 8, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 88,208, 50, 8, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,212, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,128, 91, 68, 0, 0, 0, 0,
+ 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,109, 3, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 64, 91, 68, 0, 0,200, 65, 0, 64, 91, 68,
+ 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 0, 0, 10, 0,110, 3, 26, 0,110, 3,
+ 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,209, 2, 0, 0, 62, 6, 0, 0,121, 3, 0, 0,
+146, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,110, 3, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136, 12,241, 6, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 40, 1, 0, 0,104,136,215, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,120,231,216, 3, 0, 0, 0, 0,
-184,134,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67, 0, 64, 70,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67,
-255,127, 70,196, 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 18, 0, 0, 0, 43, 3, 0, 0, 0, 0, 0, 0,142, 0, 0, 0,
- 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 18, 0, 0, 0, 43, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,160, 0,
- 44, 3,143, 0, 26, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 1, 0, 0, 69, 1, 0, 0,
-167, 1, 0, 0,233, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 67, 2, 0, 0, 5, 0,
- 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 40, 1, 0, 0,120,231,216, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 40,233,216, 3, 0, 0, 0, 0,
-104,136,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 67, 0, 0,206,194, 0, 0, 0, 0, 0, 0, 0, 0,231,102, 16, 67,
- 0, 0,206,194, 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 18, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0,
- 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 18, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,160, 0,
-120, 0,143, 0,102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 1, 0, 0, 63, 5, 0, 0,
-167, 1, 0, 0,167, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 6, 0,
- 34, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 40, 1, 0, 0, 40,233,216, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,216,234,216, 3, 0, 0, 0, 0,
-120,231,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 52, 67, 0, 0,109,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 67,
- 0, 0,109,196, 0,128,145,195,163, 0, 0, 0,180, 0, 0, 0, 0, 0, 0, 0,144, 2, 0, 0, 0, 0, 0, 0,162, 0, 0, 0,
- 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,162, 0, 0, 0, 0, 0, 0, 0,144, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 1, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,180, 0,
-145, 2,163, 0,145, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 5, 0, 0, 63, 5, 0, 0,
-167, 1, 0, 0,233, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0,
- 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0, 88,208, 50, 8, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 88, 91, 56, 8, 0, 0, 0, 0,232,206, 50, 8,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0,128,178, 67, 0, 0, 84,194, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67, 0, 0, 84,194,
+ 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 3, 0, 0, 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,160, 0, 53, 0,143, 0,
+ 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,209, 2, 0, 0,209, 2, 0, 0,147, 3, 0, 0,
+ 63, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 5, 0, 0, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 9,241, 6, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0, 88, 91, 56, 8, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 40, 16, 51, 8, 0, 0, 0, 0, 88,208, 50, 8,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0,128,178, 67, 0, 0,240,194, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67, 0, 0,240,194,
+ 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 0, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 3, 0, 0, 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,160, 0,120, 0,143, 0,
+120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,209, 2, 0, 0,209, 2, 0, 0,147, 3, 0, 0,
+ 63, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 6, 0, 0, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 10,241, 6, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 92, 56, 8, 0, 0, 0, 0,200, 92, 56, 8, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 88, 1, 0, 0,200, 92, 56, 8, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 40, 11,241, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 76, 73, 80, 95, 80, 84, 95,108, 97,115,116,
+ 95,111,112,101,114, 97,116,111,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 76, 73, 80, 95, 80, 84, 95,108, 97,115,116,
+ 95,111,112,101,114, 97,116,111,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 78,101,119, 32, 83, 99,114,101,101,110, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216,255,143, 0, 16, 0, 0, 0, 0, 0,
+ 0, 0, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 40, 16, 51, 8, 0, 0, 0, 0,215, 0, 0, 0,
+ 1, 0, 0, 0, 8,121, 55, 8, 0, 0, 0, 0, 88, 91, 56, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,178, 67, 0, 0, 45,195,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67, 0, 0, 45,195, 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 0, 0, 0, 0,
+172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0,
+172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 3, 0, 0,
+ 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,160, 0,173, 0,143, 0,173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,209, 2, 0, 0,209, 2, 0, 0,147, 3, 0, 0, 63, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,248, 6,241, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152, 17, 51, 8,
+ 0, 0, 0, 0,152, 17, 51, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,152, 17, 51, 8, 0, 0, 0, 0,213, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232, 7,241, 6, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 67, 76, 73, 80, 95, 80, 84, 95,103,112,101,110, 99,105,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 67, 76, 73, 80, 95, 80, 84, 95,103,112,101,110, 99,105,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 40, 1, 0, 0,216,234,216, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 40,233,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 71,114,101, 97,115,101, 32, 80,101,110, 99,105,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,232,255,143, 0, 0, 0, 0, 0, 0, 0, 4, 0, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 1, 0, 0, 63, 5, 0, 0,
-167, 1, 0, 0,233, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,251, 3, 67, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0, 8,121, 55, 8, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,120,122, 55, 8, 0, 0, 0, 0, 40, 16, 51, 8,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67, 0, 0, 45,195, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 67, 0, 0, 27,195,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,159, 0, 0, 0, 0, 0, 0, 0,
+ 17, 0, 0, 0, 0, 0, 0, 0,159, 0, 0, 0, 18, 0, 0, 0,172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 8, 4, 0, 0, 2, 0, 3, 3, 0, 0, 2, 4, 6, 0,160, 0,173, 0,160, 0,
+155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,209, 2, 0, 0,112, 3, 0, 0,147, 3, 0, 0,
+ 63, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 0,173, 0, 0, 0, 2, 0, 3, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120, 13,241, 6, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0,120,122, 55, 8, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 88,110, 56, 8, 0, 0, 0, 0, 8,121, 55, 8,
+ 0, 0, 0, 0, 0, 0, 32,193, 0,128, 91, 68,171,170,132,194, 0, 0, 0, 0, 0, 0, 32,193, 0,128, 91, 68, 0, 0, 27,195,
+ 0, 0, 0, 0,189, 2, 0, 0,206, 2, 0, 0, 18, 0, 0, 0,172, 0, 0, 0, 0, 0, 0, 0,188, 2, 0, 0, 0, 0, 0, 0,
+ 17, 0, 0, 0, 0, 0, 0, 0,188, 2, 0, 0, 18, 0, 0, 0,172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,124,146, 72,
+255,255,127,127, 10,215, 35, 60, 0, 0, 72, 66, 74, 0, 0, 0, 0, 0, 0, 2, 16, 0, 2, 4, 4, 0,206, 2,173, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,113, 3, 0, 0, 62, 6, 0, 0,147, 3, 0, 0,
+ 63, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,206, 2,173, 0, 0, 0, 7, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 6,241, 6, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 7,217, 3, 0, 0, 0, 0,
- 68, 65, 84, 65,112, 3, 0, 0, 72, 7,217, 3, 0, 0, 0, 0,173, 0, 0, 0, 1, 0, 0, 0,190, 35, 30, 61, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 40,139, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-111, 18, 3,187, 0, 0, 0, 0, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,190, 35, 30, 61, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 40,139, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-111, 18, 3,187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,149, 53,207, 65, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,112,121,107, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-255,255,249,195, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,190, 35, 30, 61, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 40,139, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-111, 18, 3,187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0, 88,110, 56, 8, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120,122, 55, 8,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,255, 0, 0,128,127, 0, 0,128,255,
+ 0, 0,128,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 46, 2, 0, 0, 0, 0, 0, 0,173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 10,215, 35, 60, 0, 0,122, 68, 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 0, 0, 10, 0, 46, 2,173, 0, 46, 2,
+173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 5,241, 6, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 48, 1, 0, 0,168,104, 53, 8, 0, 0, 0, 0,196, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17,200, 0, 0, 0, 0, 2, 0, 20, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, 88,136, 49, 8, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 72,215, 31, 7, 0, 0, 0, 0, 56,186, 31, 7, 0, 0, 0, 0, 72,105, 55, 8, 0, 0, 0, 0,232, 86, 65, 8,
+ 0, 0, 0, 0,136, 76, 53, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,207, 2, 0, 0,121, 3, 0, 0,
+ 63, 4, 0, 0, 20, 20,208, 2,199, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 3,241, 6, 0, 0, 0, 0, 24,206, 55, 8,
+ 0, 0, 0, 0, 24,206, 55, 8, 0, 0, 0, 0, 24,237, 55, 8, 0, 0, 0, 0,120, 92, 53, 8, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 2, 49, 8, 0, 0, 0, 0, 56, 19, 51, 8, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0, 24,237, 55, 8, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,136,238, 55, 8, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,212, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 52, 68, 0, 0, 0, 0,
+ 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,207, 2, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,192, 51, 68, 0, 0,200, 65, 0,192, 51, 68,
+ 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 0, 0, 10, 0,208, 2, 26, 0,208, 2,
+ 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,207, 2, 0, 0,121, 3, 0, 0,
+146, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,208, 2, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136, 12,241, 6, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,207, 3,116, 64, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,207, 3,116, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-207, 3,116, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,149, 53,207, 65,214,211,111, 65, 0, 0, 0, 0, 0, 0, 0, 0,221, 57, 80, 61, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 65, 0, 0, 5, 0,251,251, 0, 0, 92, 62, 55, 63, 56,186,224,190,237,203,148,190,
- 3,236,234,190, 1, 0, 0, 0, 0, 0,128, 63, 0, 0,180, 66, 0, 0,180, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 96, 1, 0, 0,120,209,216, 3, 0, 0, 0, 0,174, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0,136,238, 55, 8, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,104,173, 55, 8, 0, 0, 0, 0, 24,237, 55, 8,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0,128,178, 67, 0, 0, 84,194, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67, 0, 0, 84,194,
+ 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 3, 0, 0, 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,160, 0, 53, 0,143, 0,
+ 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,147, 3, 0, 0,
+ 63, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 5, 0, 0, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 9,241, 6, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 51, 51, 51, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65,205,204, 76, 62, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0,
-200,213,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0,104,173, 55, 8, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 72,164, 55, 8, 0, 0, 0, 0,136,238, 55, 8,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0,128,178, 67, 0, 0,240,194, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67, 0, 0,240,194,
+ 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 0, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 3, 0, 0, 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,160, 0,120, 0,143, 0,
+120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,147, 3, 0, 0,
+ 63, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 6, 0, 0, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 10,241, 6, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216,174, 55, 8, 0, 0, 0, 0,216,174, 55, 8, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 88, 1, 0, 0,216,174, 55, 8, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 40, 11,241, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 76, 73, 80, 95, 80, 84, 95,108, 97,115,116,
+ 95,111,112,101,114, 97,116,111,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 76, 73, 80, 95, 80, 84, 95,108, 97,115,116,
+ 95,111,112,101,114, 97,116,111,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 78,101,119, 32, 83, 99,114,101,101,110, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216,255,143, 0, 16, 0, 0, 0, 0, 0,
+ 0, 0, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 72,164, 55, 8, 0, 0, 0, 0,215, 0, 0, 0,
+ 1, 0, 0, 0,216, 16,238, 6, 0, 0, 0, 0,104,173, 55, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,178, 67, 0, 0, 45,195,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67, 0, 0, 45,195, 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 0, 0, 0, 0,
+172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0,
+172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 3, 0, 0,
+ 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,160, 0,173, 0,143, 0,173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,147, 3, 0, 0, 63, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,248, 6,241, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184,165, 55, 8,
+ 0, 0, 0, 0,184,165, 55, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,184,165, 55, 8, 0, 0, 0, 0,213, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232, 7,241, 6, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 67, 76, 73, 80, 95, 80, 84, 95,103,112,101,110, 99,105,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 67, 76, 73, 80, 95, 80, 84, 95,103,112,101,110, 99,105,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 71,114,101, 97,115,101, 32, 80,101,110, 99,105,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 3, 0,
- 8, 8,128, 0, 0, 0, 12, 66, 0, 0,128, 63,205,204,204, 61, 0, 0,122, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 10, 0, 7, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,232,255,143, 0, 0, 0, 0, 0, 0, 0, 4, 0, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65,160, 0, 0, 0,248, 22,215, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-216, 21,215, 3, 0, 0, 0, 0,232, 40,201, 3, 0, 0, 0, 0,168, 39,201, 3, 0, 0, 0, 0, 72, 45,201, 3, 0, 0, 0, 0,
-168, 44,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 1, 0, 0,141, 1, 0, 0,233, 3, 0, 0,
- 3, 3, 68, 1, 93, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,104, 2,209, 3, 0, 0, 0, 0,
-104, 2,209, 3, 0, 0, 0, 0,136,236,216, 3, 0, 0, 0, 0, 56,238,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,
-136,236,216, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 56,238,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,128,244, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,162, 67, 0, 0, 0, 0, 0, 0,208, 65,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0,216, 16,238, 6, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 72, 18,238, 6, 0, 0, 0, 0, 72,164, 55, 8,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67, 0, 64,110,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 67, 0,192,105,196,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,159, 0, 0, 0, 0, 0, 0, 0,
+ 17, 0, 0, 0, 0, 0, 0, 0,159, 0, 0, 0, 18, 0, 0, 0,184, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 8, 0, 0, 0, 2, 0, 3, 3, 0, 0, 2, 0, 6, 0,160, 0,185, 3,160, 0,
+167, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,147, 3, 0, 0,
+ 63, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120, 13,241, 6, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,161, 67, 0, 0,200, 65, 0,128,161, 67, 0, 0,200, 65,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 68, 1, 26, 0, 68, 1, 26, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 1, 0, 0,141, 1, 0, 0,166, 1, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 1, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0, 72, 18,238, 6, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,120, 92, 53, 8, 0, 0, 0, 0,216, 16,238, 6,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,122, 67, 0, 0, 32,193, 0, 0, 32, 65, 0, 0, 0, 0, 0, 0,122, 67, 0, 0, 32,193,
+ 0, 0, 32, 65, 0, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0,172, 0, 0, 0, 18, 0, 0, 0,207, 2, 0, 0, 0, 0, 0, 0,
+ 17, 0, 0, 0, 18, 0, 0, 0,207, 2, 0, 0, 18, 0, 0, 0,172, 0, 0, 0, 0, 0,128, 0, 0, 0,128, 0, 0,124,146, 72,
+255,255,127,127, 0, 0, 0, 0, 0, 0, 0, 0,105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0,208, 2,173, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,207, 2, 0, 0,147, 3, 0, 0,
+ 63, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,208, 2,173, 0, 0, 0, 7, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 6,241, 6, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 40, 1, 0, 0,120, 92, 53, 8, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 18,238, 6,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,255, 0, 0,128,127, 0, 0,128,255,
+ 0, 0,128,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,144, 1, 0, 0, 0, 0, 0, 0,173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 10,215, 35, 60, 0, 0,122, 68, 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 0, 0, 10, 0,144, 1,173, 0,144, 1,
+173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 5,241, 6, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,
- 56,238,216, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136,236,216, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,128,141, 67, 0, 0,244,194, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,153, 67, 0, 64, 12,196, 0, 0, 0, 0,
- 51, 1, 0, 0, 68, 1, 0, 0, 18, 0, 0, 0, 66, 2, 0, 0, 0, 0, 0, 0, 50, 1, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0,
- 0, 0, 0, 0, 50, 1, 0, 0, 18, 0, 0, 0, 66, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 18, 6, 0, 0, 2, 0, 3, 3, 0, 0, 12, 4, 6, 0, 68, 1, 67, 2, 51, 1, 49, 2, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 1, 0, 0,167, 1, 0, 0,233, 3, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 1, 67, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 48, 1, 0, 0, 24,206, 55, 8, 0, 0, 0, 0,196, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17,200, 0, 0, 0, 0, 1, 0, 20, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 1, 0, 0,
-104, 2,209, 3, 0, 0, 0, 0,183, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 83, 78, 0, 0, 8, 1, 0, 0,232,246, 17, 7, 0, 0, 0, 0,210, 0, 0, 0, 1, 0, 0, 0, 88, 70, 18, 7,
+ 0, 0, 0, 0,136, 22, 49, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 82, 83, 99,
+114,105,112,116,105,110,103, 0,103, 46, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,248, 17, 7, 0, 0, 0, 0,232,253, 17, 7,
+ 0, 0, 0, 0, 88,254, 17, 7, 0, 0, 0, 0,136, 7, 18, 7, 0, 0, 0, 0,248, 7, 18, 7, 0, 0, 0, 0, 8, 63, 18, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,104, 11,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 56,248, 17, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,168,248, 17, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 32, 0, 0, 0,168,248, 17, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 24,249, 17, 7, 0, 0, 0, 0, 56,248, 17, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 4, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 24,249, 17, 7,
+ 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,136,249, 17, 7, 0, 0, 0, 0,168,248, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,126, 7, 5, 4, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,136,249, 17, 7, 0, 0, 0, 0,211, 0, 0, 0,
+ 1, 0, 0, 0,248,249, 17, 7, 0, 0, 0, 0, 24,249, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,248,249, 17, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,104,250, 17, 7,
+ 0, 0, 0, 0,136,249, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168, 3, 0, 0, 0, 0, 68, 65, 84, 65,
+ 32, 0, 0, 0,104,250, 17, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,216,250, 17, 7, 0, 0, 0, 0,248,249, 17, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7,168, 3, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,216,250, 17, 7,
+ 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 72,251, 17, 7, 0, 0, 0, 0,104,250, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,240, 5,168, 3, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 72,251, 17, 7, 0, 0, 0, 0,211, 0, 0, 0,
+ 1, 0, 0, 0,184,251, 17, 7, 0, 0, 0, 0,216,250, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 5, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,184,251, 17, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 40,252, 17, 7,
+ 0, 0, 0, 0, 72,251, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,104, 1, 1, 0, 0, 0, 68, 65, 84, 65,
+ 32, 0, 0, 0, 40,252, 17, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,152,252, 17, 7, 0, 0, 0, 0,184,251, 17, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 5,104, 1, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,152,252, 17, 7,
+ 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 8,253, 17, 7, 0, 0, 0, 0, 40,252, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,248, 2,104, 1, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 8,253, 17, 7, 0, 0, 0, 0,211, 0, 0, 0,
+ 1, 0, 0, 0,120,253, 17, 7, 0, 0, 0, 0,152,252, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 5,236, 2,
+ 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,120,253, 17, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,232,253, 17, 7,
+ 0, 0, 0, 0, 8,253, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7,236, 2, 0, 0, 0, 0, 68, 65, 84, 65,
+ 32, 0, 0, 0,232,253, 17, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120,253, 17, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 2,168, 3, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 88,254, 17, 7,
+ 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,200,254, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168,248, 17, 7,
+ 0, 0, 0, 0, 24,249, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,200,254, 17, 7,
+ 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 56,255, 17, 7, 0, 0, 0, 0, 88,254, 17, 7, 0, 0, 0, 0,168,248, 17, 7,
+ 0, 0, 0, 0,248,249, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 56,255, 17, 7,
+ 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,168,255, 17, 7, 0, 0, 0, 0,200,254, 17, 7, 0, 0, 0, 0, 24,249, 17, 7,
+ 0, 0, 0, 0,104,250, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,168,255, 17, 7,
+ 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 24, 0, 18, 7, 0, 0, 0, 0, 56,255, 17, 7, 0, 0, 0, 0,248,249, 17, 7,
+ 0, 0, 0, 0,104,250, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 24, 0, 18, 7,
+ 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,136, 0, 18, 7, 0, 0, 0, 0,168,255, 17, 7, 0, 0, 0, 0,104,250, 17, 7,
+ 0, 0, 0, 0,216,250, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,136, 0, 18, 7,
+ 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,248, 0, 18, 7, 0, 0, 0, 0, 24, 0, 18, 7, 0, 0, 0, 0,136,249, 17, 7,
+ 0, 0, 0, 0, 72,251, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,248, 0, 18, 7,
+ 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,104, 1, 18, 7, 0, 0, 0, 0,136, 0, 18, 7, 0, 0, 0, 0, 56,248, 17, 7,
+ 0, 0, 0, 0,184,251, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,104, 1, 18, 7,
+ 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,216, 1, 18, 7, 0, 0, 0, 0,248, 0, 18, 7, 0, 0, 0, 0,248,249, 17, 7,
+ 0, 0, 0, 0,184,251, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,216, 1, 18, 7,
+ 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 72, 2, 18, 7, 0, 0, 0, 0,104, 1, 18, 7, 0, 0, 0, 0,216,250, 17, 7,
+ 0, 0, 0, 0, 40,252, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 72, 2, 18, 7,
+ 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,184, 2, 18, 7, 0, 0, 0, 0,216, 1, 18, 7, 0, 0, 0, 0, 72,251, 17, 7,
+ 0, 0, 0, 0, 40,252, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,184, 2, 18, 7,
+ 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 40, 3, 18, 7, 0, 0, 0, 0, 72, 2, 18, 7, 0, 0, 0, 0,184,251, 17, 7,
+ 0, 0, 0, 0,152,252, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 40, 3, 18, 7,
+ 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,152, 3, 18, 7, 0, 0, 0, 0,184, 2, 18, 7, 0, 0, 0, 0, 40,252, 17, 7,
+ 0, 0, 0, 0,152,252, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,152, 3, 18, 7,
+ 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 8, 4, 18, 7, 0, 0, 0, 0, 40, 3, 18, 7, 0, 0, 0, 0, 72,251, 17, 7,
+ 0, 0, 0, 0, 8,253, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 8, 4, 18, 7,
+ 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,120, 4, 18, 7, 0, 0, 0, 0,152, 3, 18, 7, 0, 0, 0, 0,216,250, 17, 7,
+ 0, 0, 0, 0, 8,253, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,120, 4, 18, 7,
+ 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,232, 4, 18, 7, 0, 0, 0, 0, 8, 4, 18, 7, 0, 0, 0, 0,104,250, 17, 7,
+ 0, 0, 0, 0,120,253, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,232, 4, 18, 7,
+ 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 88, 5, 18, 7, 0, 0, 0, 0,120, 4, 18, 7, 0, 0, 0, 0,136,249, 17, 7,
+ 0, 0, 0, 0,120,253, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 88, 5, 18, 7,
+ 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,200, 5, 18, 7, 0, 0, 0, 0,232, 4, 18, 7, 0, 0, 0, 0, 8,253, 17, 7,
+ 0, 0, 0, 0,120,253, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,200, 5, 18, 7,
+ 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 56, 6, 18, 7, 0, 0, 0, 0, 88, 5, 18, 7, 0, 0, 0, 0,248,249, 17, 7,
+ 0, 0, 0, 0,232,253, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 56, 6, 18, 7,
+ 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,168, 6, 18, 7, 0, 0, 0, 0,200, 5, 18, 7, 0, 0, 0, 0,216,250, 17, 7,
+ 0, 0, 0, 0,232,253, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,168, 6, 18, 7,
+ 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 24, 7, 18, 7, 0, 0, 0, 0, 56, 6, 18, 7, 0, 0, 0, 0,152,252, 17, 7,
+ 0, 0, 0, 0,232,253, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 24, 7, 18, 7,
+ 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,136, 7, 18, 7, 0, 0, 0, 0,168, 6, 18, 7, 0, 0, 0, 0,184,251, 17, 7,
+ 0, 0, 0, 0, 40,252, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,136, 7, 18, 7,
+ 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 7, 18, 7, 0, 0, 0, 0, 56,248, 17, 7,
+ 0, 0, 0, 0, 72,251, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,248, 7, 18, 7,
+ 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,200, 11, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,249, 17, 7,
+ 0, 0, 0, 0,168,248, 17, 7, 0, 0, 0, 0, 24,249, 17, 7, 0, 0, 0, 0,104,250, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,169, 3, 0, 0, 5, 4, 0, 0, 7, 7,127, 7, 93, 0, 1, 0, 0, 0, 0, 0,
+ 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 69, 18, 7, 0, 0, 0, 0,200, 69, 18, 7, 0, 0, 0, 0,232, 8, 18, 7,
+ 0, 0, 0, 0, 88, 10, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,232, 8, 18, 7, 0, 0, 0, 0,215, 0, 0, 0,
+ 1, 0, 0, 0, 88, 10, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,148, 68, 0, 0, 0, 0,
+ 0, 0,208, 65, 0, 0, 0, 0, 0,224,239, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0, 0, 0, 0, 0,
+ 25, 0, 0, 0, 0,192,239, 68, 0, 0,200, 65, 0,192,239, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
+ 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,127, 7, 26, 0,127, 7, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,236, 3, 0, 0, 5, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,127, 7, 26, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 88, 10, 18, 7, 0, 0, 0, 0,215, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232, 8, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,239, 68, 0, 0, 0, 0,
+ 0, 0, 28, 66, 0, 0, 0, 0, 0,192,237, 68, 0, 0, 0, 0, 0, 0,134, 66,110, 7, 0, 0,127, 7, 0, 0, 0, 0, 0, 0,
+ 66, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,109, 7, 0, 0, 0, 0, 0, 0,
+ 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 2, 2, 0, 0,
+ 1, 0, 3, 3, 2, 0, 0, 4, 10, 0,127, 7, 67, 0,110, 7, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,169, 3, 0, 0,235, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,127, 7, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,200, 11, 18, 7, 0, 0, 0, 0,214, 0, 0, 0,
+ 1, 0, 0, 0, 88, 36, 18, 7, 0, 0, 0, 0,248, 7, 18, 7, 0, 0, 0, 0, 72,251, 17, 7, 0, 0, 0, 0, 8,253, 17, 7,
+ 0, 0, 0, 0,120,253, 17, 7, 0, 0, 0, 0,136,249, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,241, 5, 0, 0,
+126, 7, 0, 0, 0, 0, 0, 0,235, 2, 0, 0, 4, 4,142, 1,236, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 24, 35, 18, 7, 0, 0, 0, 0, 24, 35, 18, 7, 0, 0, 0, 0,184, 12, 18, 7, 0, 0, 0, 0, 40, 14, 18, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,184, 12, 18, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 40, 14, 18, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,148, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0,
+ 0, 0,199, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,141, 1, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,198, 67,
+ 0, 0,200, 65, 0,128,198, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0,
+ 10, 0,142, 1, 26, 0,142, 1, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,241, 5, 0, 0,
+126, 7, 0, 0,210, 2, 0, 0,235, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,142, 1, 26, 0,
+ 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 40, 14, 18, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,184, 12, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,198, 67, 0, 0, 61,196, 0, 0, 0, 0, 0, 0, 0, 0,
+254,127,190, 67,254,127, 52,196, 0, 0, 0, 0,125, 1, 0, 0,142, 1, 0, 0, 0, 0, 0, 0,209, 2, 0, 0, 0, 0, 0, 0,
+126, 1, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,124, 1, 0, 0, 0, 0, 0, 0,209, 2, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 1, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4,
+ 6, 0,142, 1,210, 2,125, 1,210, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,241, 5, 0, 0,
+126, 7, 0, 0, 0, 0, 0, 0,209, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,142, 1,210, 2,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152, 15, 18, 7, 0, 0, 0, 0,120, 33, 18, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,152, 15, 18, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 56, 17, 18, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84,
+ 79, 78, 83, 95, 80, 84, 95, 99,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84,
+ 79, 78, 83, 95, 80, 84, 95, 99,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67,111,110,116,
+101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,220,255,
+124, 1, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 56, 17, 18, 7,
+ 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,216, 18, 18, 7, 0, 0, 0, 0,152, 15, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,114,101,110,100,101,114, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,114,101,110,100,101,114, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,135,255,124, 1, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 0, 0, 68, 65, 84, 65, 16, 0, 0, 0,104, 11,217, 3, 0, 0, 0, 0,237, 0, 0, 0, 1, 0, 0, 0,
- 14, 0, 0, 0, 14, 0, 0, 0, 88, 32,199, 3, 0, 0, 0, 0, 68, 65, 84, 65,224, 0, 0, 0, 88, 32,199, 3, 0, 0, 0, 0,
-236, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,168,194,217, 3, 0, 0, 0, 0, 19, 0, 0, 0, 1, 0, 1, 0,
-168,194,217, 3, 0, 0, 0, 0, 20, 0, 0, 0, 1, 0, 1, 0,168,194,217, 3, 0, 0, 0, 0, 21, 0, 1, 0, 1, 0, 0, 0,
-168,194,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 24, 51,163, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
-184,219,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,136, 48,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
-152, 7,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,216, 29,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
-168,225,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,120,209,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
-200,213,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 24, 98,200, 3, 0, 0, 0, 0, 21, 0, 0, 0, 1, 0, 1, 0,
-168,194,217, 3, 0, 0, 0, 0, 83, 78, 0, 0, 8, 1, 0, 0, 56, 43,217, 3, 0, 0, 0, 0,210, 0, 0, 0, 1, 0, 0, 0,
-232,117,217, 3, 0, 0, 0, 0,152, 66,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 83, 82, 83, 99,114,105,112,116,105,110,103, 0,103, 46, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232, 45,201, 3, 0, 0, 0, 0,
- 8, 54,201, 3, 0, 0, 0, 0,104, 81,216, 3, 0, 0, 0, 0,216, 95,216, 3, 0, 0, 0, 0, 24, 24,215, 3, 0, 0, 0, 0,
-184, 29,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,216, 18, 18, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,120, 20, 18, 7,
+ 0, 0, 0, 0, 56, 17, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 97,121,101,
+114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111,255,
+124, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,232, 45,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,
-136, 46,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 32, 0, 0, 0,136, 46,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 40, 47,201, 3, 0, 0, 0, 0,
-232, 45,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 4, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,
- 40, 47,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,200, 47,201, 3, 0, 0, 0, 0,136, 46,201, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 5, 4, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,200, 47,201, 3, 0, 0, 0, 0,
-211, 0, 0, 0, 1, 0, 0, 0,104, 48,201, 3, 0, 0, 0, 0, 40, 47,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-126, 7, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,104, 48,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,
- 8, 49,201, 3, 0, 0, 0, 0,200, 47,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168, 3, 0, 0, 0, 0,
- 68, 65, 84, 65, 32, 0, 0, 0, 8, 49,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,168, 49,201, 3, 0, 0, 0, 0,
-104, 48,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7,168, 3, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,
-168, 49,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 72, 50,201, 3, 0, 0, 0, 0, 8, 49,201, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,240, 5,168, 3, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 72, 50,201, 3, 0, 0, 0, 0,
-211, 0, 0, 0, 1, 0, 0, 0,232, 50,201, 3, 0, 0, 0, 0,168, 49,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-240, 5, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,232, 50,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,
-136, 51,201, 3, 0, 0, 0, 0, 72, 50,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,104, 1, 1, 0, 0, 0,
- 68, 65, 84, 65, 32, 0, 0, 0,136, 51,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 40, 52,201, 3, 0, 0, 0, 0,
-232, 50,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 5,104, 1, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,
- 40, 52,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,200, 52,201, 3, 0, 0, 0, 0,136, 51,201, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,248, 2,104, 1, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,200, 52,201, 3, 0, 0, 0, 0,
-211, 0, 0, 0, 1, 0, 0, 0,104, 53,201, 3, 0, 0, 0, 0, 40, 52,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-240, 5,236, 2, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,104, 53,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,
- 8, 54,201, 3, 0, 0, 0, 0,200, 52,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7,236, 2, 0, 0, 0, 0,
- 68, 65, 84, 65, 32, 0, 0, 0, 8, 54,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-104, 53,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 2,168, 3, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
-104, 81,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 24, 82,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-136, 46,201, 3, 0, 0, 0, 0, 40, 47,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
- 24, 82,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,200, 82,216, 3, 0, 0, 0, 0,104, 81,216, 3, 0, 0, 0, 0,
-136, 46,201, 3, 0, 0, 0, 0,104, 48,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
-200, 82,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,120, 83,216, 3, 0, 0, 0, 0, 24, 82,216, 3, 0, 0, 0, 0,
- 40, 47,201, 3, 0, 0, 0, 0, 8, 49,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
-120, 83,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 40, 84,216, 3, 0, 0, 0, 0,200, 82,216, 3, 0, 0, 0, 0,
-104, 48,201, 3, 0, 0, 0, 0, 8, 49,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
- 40, 84,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,216, 84,216, 3, 0, 0, 0, 0,120, 83,216, 3, 0, 0, 0, 0,
- 8, 49,201, 3, 0, 0, 0, 0,168, 49,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
-216, 84,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,136, 85,216, 3, 0, 0, 0, 0, 40, 84,216, 3, 0, 0, 0, 0,
-200, 47,201, 3, 0, 0, 0, 0, 72, 50,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
-136, 85,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 56, 86,216, 3, 0, 0, 0, 0,216, 84,216, 3, 0, 0, 0, 0,
-232, 45,201, 3, 0, 0, 0, 0,232, 50,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
- 56, 86,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,232, 86,216, 3, 0, 0, 0, 0,136, 85,216, 3, 0, 0, 0, 0,
-104, 48,201, 3, 0, 0, 0, 0,232, 50,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
-232, 86,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,152, 87,216, 3, 0, 0, 0, 0, 56, 86,216, 3, 0, 0, 0, 0,
-168, 49,201, 3, 0, 0, 0, 0,136, 51,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
-152, 87,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 72, 88,216, 3, 0, 0, 0, 0,232, 86,216, 3, 0, 0, 0, 0,
- 72, 50,201, 3, 0, 0, 0, 0,136, 51,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
- 72, 88,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,248, 88,216, 3, 0, 0, 0, 0,152, 87,216, 3, 0, 0, 0, 0,
-232, 50,201, 3, 0, 0, 0, 0, 40, 52,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
-248, 88,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,168, 89,216, 3, 0, 0, 0, 0, 72, 88,216, 3, 0, 0, 0, 0,
-136, 51,201, 3, 0, 0, 0, 0, 40, 52,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
-168, 89,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 88, 90,216, 3, 0, 0, 0, 0,248, 88,216, 3, 0, 0, 0, 0,
- 72, 50,201, 3, 0, 0, 0, 0,200, 52,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
- 88, 90,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 8, 91,216, 3, 0, 0, 0, 0,168, 89,216, 3, 0, 0, 0, 0,
-168, 49,201, 3, 0, 0, 0, 0,200, 52,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
- 8, 91,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,184, 91,216, 3, 0, 0, 0, 0, 88, 90,216, 3, 0, 0, 0, 0,
- 8, 49,201, 3, 0, 0, 0, 0,104, 53,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
-184, 91,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,104, 92,216, 3, 0, 0, 0, 0, 8, 91,216, 3, 0, 0, 0, 0,
-200, 47,201, 3, 0, 0, 0, 0,104, 53,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
-104, 92,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 24, 93,216, 3, 0, 0, 0, 0,184, 91,216, 3, 0, 0, 0, 0,
-200, 52,201, 3, 0, 0, 0, 0,104, 53,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
- 24, 93,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,200, 93,216, 3, 0, 0, 0, 0,104, 92,216, 3, 0, 0, 0, 0,
-104, 48,201, 3, 0, 0, 0, 0, 8, 54,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
-200, 93,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,120, 94,216, 3, 0, 0, 0, 0, 24, 93,216, 3, 0, 0, 0, 0,
-168, 49,201, 3, 0, 0, 0, 0, 8, 54,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
-120, 94,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 40, 95,216, 3, 0, 0, 0, 0,200, 93,216, 3, 0, 0, 0, 0,
- 40, 52,201, 3, 0, 0, 0, 0, 8, 54,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
- 40, 95,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,216, 95,216, 3, 0, 0, 0, 0,120, 94,216, 3, 0, 0, 0, 0,
-232, 50,201, 3, 0, 0, 0, 0,136, 51,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
-216, 95,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 95,216, 3, 0, 0, 0, 0,
-232, 45,201, 3, 0, 0, 0, 0, 72, 50,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,
- 24, 24,215, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 56, 25,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-104, 48,201, 3, 0, 0, 0, 0,136, 46,201, 3, 0, 0, 0, 0, 40, 47,201, 3, 0, 0, 0, 0, 8, 49,201, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,169, 3, 0, 0, 5, 4, 0, 0, 7, 7,127, 7, 93, 0, 1, 0,
- 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152,200,207, 3, 0, 0, 0, 0,152,200,207, 3, 0, 0, 0, 0,
-232,239,216, 3, 0, 0, 0, 0,152,241,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,232,239,216, 3, 0, 0, 0, 0,
-215, 0, 0, 0, 1, 0, 0, 0,152,241,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,148, 68,
- 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,224,239, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,
- 0, 0, 0, 0, 25, 0, 0, 0, 0,192,239, 68, 0, 0,200, 65, 0,192,239, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,127, 7, 26, 0,127, 7, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,236, 3, 0, 0, 5, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,127, 7, 26, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,120, 20, 18, 7,
+ 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 24, 22, 18, 7, 0, 0, 0, 0,216, 18, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,100,105,109,101,110,115,105,111,110,115,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,152,241,216, 3, 0, 0, 0, 0,
-215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,239,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,239, 68,
- 0, 0, 0, 0, 0, 0, 28, 66, 0, 0, 0, 0, 0,192,237, 68, 0, 0, 0, 0, 0, 0,134, 66,110, 7, 0, 0,127, 7, 0, 0,
- 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,109, 7, 0, 0,
- 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 2, 2, 0, 0, 1, 0, 3, 3, 2, 0, 0, 4, 10, 0,127, 7, 67, 0,110, 7, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,169, 3, 0, 0,235, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,127, 7, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,100,105,109,101,110,115,105,111,110,115,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, 56, 25,215, 3, 0, 0, 0, 0,
-214, 0, 0, 0, 1, 0, 0, 0, 88, 26,215, 3, 0, 0, 0, 0, 24, 24,215, 3, 0, 0, 0, 0, 72, 50,201, 3, 0, 0, 0, 0,
-200, 52,201, 3, 0, 0, 0, 0,104, 53,201, 3, 0, 0, 0, 0,200, 47,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-241, 5, 0, 0,126, 7, 0, 0, 0, 0, 0, 0,235, 2, 0, 0, 4, 4,142, 1,236, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,184,129,199, 3, 0, 0, 0, 0,184,129,199, 3, 0, 0, 0, 0, 72,243,216, 3, 0, 0, 0, 0,
-248,244,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 72,243,216, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,
-248,244,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,148, 67, 0, 0, 0, 0, 0, 0,208, 65,
- 0, 0, 0, 0, 0, 0,199, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,141, 1, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0,
- 0,128,198, 67, 0, 0,200, 65, 0,128,198, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3,
- 4, 0, 12, 0, 10, 0,142, 1, 26, 0,142, 1, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-241, 5, 0, 0,126, 7, 0, 0,210, 2, 0, 0,235, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-142, 1, 26, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140,254,124, 1,203, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,248,244,216, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 72,243,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,198, 67, 0, 0, 61,196, 0, 0, 0, 0,
- 0, 0, 0, 0,254,127,190, 67,254,127, 52,196, 0, 0, 0, 0,125, 1, 0, 0,142, 1, 0, 0, 0, 0, 0, 0,209, 2, 0, 0,
- 0, 0, 0, 0,126, 1, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,124, 1, 0, 0, 0, 0, 0, 0,209, 2, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 1, 0, 0, 1, 0, 7, 0,
- 18, 0, 0, 4, 6, 0,142, 1,210, 2,125, 1,210, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-241, 5, 0, 0,126, 7, 0, 0, 0, 0, 0, 0,209, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-142, 1,210, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,211,216, 3, 0, 0, 0, 0,
-152, 50,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 88,211,216, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,
- 56,213,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 66, 85, 84, 84, 79, 78, 83, 95, 80, 84, 95, 99,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 24, 22, 18, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,184, 23, 18, 7,
+ 0, 0, 0, 0,120, 20, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65,110,116,105,
+ 45, 65,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58,254,
+124, 1, 58, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 66, 85, 84, 84, 79, 78, 83, 95, 80, 84, 95, 99,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 67,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,184, 23, 18, 7,
+ 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 88, 25, 18, 7, 0, 0, 0, 0, 24, 22, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,109,111,116,105,111,110, 95, 98,108,117,
+114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,109,111,116,105,111,110, 95, 98,108,117,
+114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 97,109,112,108,101,100, 32, 77,111,116,105,111,110, 32, 66,108,117,114, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,220,255,124, 1, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,254,124, 1, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,
+ 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,
- 56,213,216, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 24,215,216, 3, 0, 0, 0, 0, 88,211,216, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,114,101,110,100,101,114,
+ 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 88, 25, 18, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,248, 26, 18, 7,
+ 0, 0, 0, 0,184, 23, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,104, 97,100,
+105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10,254,
+124, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,114,101,110,100,101,114,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,248, 26, 18, 7,
+ 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,152, 28, 18, 7, 0, 0, 0, 0, 88, 25, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,101,114,102,111,114,109, 97,110, 99,
+101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,101,114,102,111,114,109, 97,110, 99,
+101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,135,255,124, 1, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,242,253,124, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,
+ 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 24,215,216, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,
-248,216,216, 3, 0, 0, 0, 0, 56,213,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,152, 28, 18, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 56, 30, 18, 7,
+ 0, 0, 0, 0,248, 26, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,112,111,115,116, 95,112,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,112,111,115,116, 95,112,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,111,115,116,
+ 32, 80,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,218,253,
+124, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 76, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 56, 30, 18, 7,
+ 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,216, 31, 18, 7, 0, 0, 0, 0,152, 28, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,111,255,124, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,
-248,216,216, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,216,218,216, 3, 0, 0, 0, 0, 24,215,216, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,100,105,109,101,110,115,
-105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,100,105,109,101,110,115,
-105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,194,253,124, 1, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,
+ 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140,254,124, 1,203, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,216, 31, 18, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,120, 33, 18, 7,
+ 0, 0, 0, 0, 56, 30, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,111,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68,
+ 69, 82, 95, 80, 84, 95,111,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79,117,116,112,
+117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,253,
+124, 1,130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,216,218,216, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,
-184,220,216, 3, 0, 0, 0, 0,248,216,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,120, 33, 18, 7,
+ 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216, 31, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 98, 97,107,101, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 65,110,116,105, 45, 65,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 98, 97,107,101, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 58,254,124, 1, 58, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16,253,124, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,
+ 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,
-184,220,216, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,152,222,216, 3, 0, 0, 0, 0,216,218,216, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,109,111,116,105,111,110,
- 95, 98,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,109,111,116,105,111,110,
- 95, 98,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 97,109,112,108,101,100, 32, 77,111,116,105,111,110, 32, 66,
-108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,254,124, 1, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0, 24, 35, 18, 7, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,152,222,216, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,
-120,224,216, 3, 0, 0, 0, 0,184,220,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 83,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 10,254,124, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, 21, 0, 0,
+160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, 88, 36, 18, 7,
+ 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,232, 49, 18, 7, 0, 0, 0, 0,200, 11, 18, 7, 0, 0, 0, 0,152,252, 17, 7,
+ 0, 0, 0, 0,232,253, 17, 7, 0, 0, 0, 0,216,250, 17, 7, 0, 0, 0, 0, 40,252, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,249, 2, 0, 0,239, 5, 0, 0,105, 1, 0, 0,167, 3, 0, 0, 1, 1,247, 2, 63, 2, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 48, 18, 7, 0, 0, 0, 0, 56, 48, 18, 7, 0, 0, 0, 0, 72, 37, 18, 7,
+ 0, 0, 0, 0, 8, 43, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 72, 37, 18, 7, 0, 0, 0, 0,215, 0, 0, 0,
+ 1, 0, 0, 0,184, 38, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,113, 68, 0, 0, 0, 0,
+ 0, 0,208, 65, 0, 0, 0, 0, 0,192, 61, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,246, 2, 0, 0, 0, 0, 0, 0,
+ 25, 0, 0, 0, 0,128, 61, 68, 0, 0,200, 65, 0,128, 61, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
+ 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,247, 2, 26, 0,247, 2, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,249, 2, 0, 0,239, 5, 0, 0,105, 1, 0, 0,130, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,247, 2, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,
-120,224,216, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,248, 44,217, 3, 0, 0, 0, 0,152,222,216, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,101,114,102,111,114,
-109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,101,114,102,111,114,
-109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,242,253,124, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,184, 38, 18, 7, 0, 0, 0, 0,215, 0, 0, 0,
+ 1, 0, 0, 0, 40, 40, 18, 7, 0, 0, 0, 0, 72, 37, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67, 0, 64, 70,196,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67,255,127, 70,196, 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 18, 0, 0, 0,
+ 43, 3, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 18, 0, 0, 0,
+ 43, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0,
+ 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,160, 0, 44, 3,143, 0, 26, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,249, 2, 0, 0,249, 2, 0, 0,131, 1, 0, 0,167, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0, 37, 2, 0, 0, 5, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,248, 44,217, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,
-216, 46,217, 3, 0, 0, 0, 0,120,224,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,111,115,116, 95,112,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 40, 40, 18, 7, 0, 0, 0, 0,215, 0, 0, 0,
+ 1, 0, 0, 0,152, 41, 18, 7, 0, 0, 0, 0,184, 38, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 67, 0, 0,206,194,
+ 0, 0, 0, 0, 0, 0, 0, 0,231,102, 16, 67, 0, 0,206,194, 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 18, 0, 0, 0,
+119, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 18, 0, 0, 0,
+119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0,
+ 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,160, 0,120, 0,143, 0,102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,249, 2, 0, 0,239, 5, 0, 0,131, 1, 0, 0,131, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 6, 0, 34, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,111,115,116, 95,112,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 80,111,115,116, 32, 80,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,152, 41, 18, 7, 0, 0, 0, 0,215, 0, 0, 0,
+ 1, 0, 0, 0, 8, 43, 18, 7, 0, 0, 0, 0, 40, 40, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 67, 0,128,142,196,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 67, 0, 0, 26,196, 0, 0, 0, 0,163, 0, 0, 0,180, 0, 0, 0, 18, 0, 0, 0,
+121, 2, 0, 0, 0, 0, 0, 0,162, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,162, 0, 0, 0, 18, 0, 0, 0,
+121, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0,
+ 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,180, 0,122, 2,163, 0,104, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,239, 5, 0, 0,239, 5, 0, 0,131, 1, 0, 0,167, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,218,253,124, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 8, 43, 18, 7, 0, 0, 0, 0,215, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152, 41, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,
-216, 46,217, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,184, 48,217, 3, 0, 0, 0, 0,248, 44,217, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,116, 97,109,112, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,116, 97,109,112, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,194,253,124, 1, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,249, 2, 0, 0,239, 5, 0, 0,131, 1, 0, 0,167, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,247, 2, 37, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,184, 48,217, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,
-152, 50,217, 3, 0, 0, 0, 0,216, 46,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,111,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,120, 44, 18, 7, 0, 0, 0, 0, 68, 65, 84, 65,112, 3, 0, 0,120, 44, 18, 7, 0, 0, 0, 0,173, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74,141,193, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 1,128,191, 0, 0,128,191, 0, 0, 0, 0, 0, 0, 0, 0,225,215,163,188,
+ 0, 0, 0, 0, 68,239,209, 62, 51,177,205,190,184,158, 81, 63, 0, 0, 0, 0, 70,119,105, 63,143, 74, 70, 62, 35, 44,185,190,
+ 0, 0, 0, 0,162, 84, 89,188,166, 33,101, 63, 42, 61,228, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,214,211,111,193,
+ 0, 0,128, 63, 69,239,209, 62, 70,119,105, 63,176, 84, 89,188, 0, 0, 0, 0, 53,177,205,190,142, 74, 70, 62,166, 33,101, 63,
+ 0, 0, 0, 0,185,158, 81, 63, 35, 44,185,190, 43, 61,228, 62, 0, 0, 0, 0,164, 96, 68, 65,111,121,173,192,248,209,213, 64,
+ 0, 0,128, 63,178,157,229, 62, 30,132, 27,191,222,160, 81,191,184,158, 81,191,117, 90,127, 63,166,235,149, 62, 9, 46,185, 62,
+ 35, 44,185, 62,145,180,109,188,212, 60,173, 63,129, 63,228,190, 42, 61,228,190, 0, 0, 0, 0, 0, 0, 0, 0, 96,132,111, 65,
+214,211,111, 65,217,236,191, 62, 54,117, 85, 63,224,246, 70,188, 0,160, 32,182,252, 5,136,190, 43, 33, 3, 62,235,135, 23, 63,
+ 0, 0, 96, 53,215,104, 25,196,133,132,135, 67, 37, 9,167,195,136,252, 71,194, 3, 54, 25, 68,158, 87,135,195,205,209,166, 67,
+151,254, 71, 66, 68,239,209, 62, 51,177,205,190,184,158, 81, 63, 0, 0, 0, 0, 70,119,105, 63,143, 74, 70, 62, 35, 44,185,190,
+ 0, 0, 0, 0,162, 84, 89,188,166, 33,101, 63, 42, 61,228, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,214,211,111,193,
+ 0, 0,128, 63,178,157,229, 62, 30,132, 27,191,222,160, 81,191,184,158, 81,191,117, 90,127, 63,166,235,149, 62, 9, 46,185, 62,
+ 35, 44,185, 62,145,180,109,188,212, 60,173, 63,129, 63,228,190, 42, 61,228,190, 0, 0, 0, 0, 0, 0, 0, 0, 96,132,111, 65,
+214,211,111, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,111,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 79,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 40,253,124, 1,130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,
-152, 50,217, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184, 48,217, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 98, 97,107,101, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 98, 97,107,101, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 46, 86, 45, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 86, 45, 64, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 86, 45, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63, 92, 62, 55, 63, 56,186,224,190,237,203,148,190, 3,236,234,190,214,211,111, 65,214,211,111, 65, 0, 0, 0, 0,
+ 0, 0, 0, 0,107,227, 29, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0,255,255, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 30, 33, 12, 66, 86,152,137, 66,
+116, 27,126, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 96, 1, 0, 0, 56, 48, 18, 7,
+ 0, 0, 0, 0,174, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 51, 51, 51, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65,205,204, 76, 62, 2, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0, 72,219, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16,253,124, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
+ 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 3, 0, 8, 8,128, 0, 0, 0, 12, 66, 0, 0,128, 63, 10,215, 35, 60, 0, 0,250, 67,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 10, 0, 7, 1,
+ 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,232, 49, 18, 7, 0, 0, 0, 0,214, 0, 0, 0,
+ 1, 0, 0, 0, 72, 56, 18, 7, 0, 0, 0, 0, 88, 36, 18, 7, 0, 0, 0, 0, 56,248, 17, 7, 0, 0, 0, 0,184,251, 17, 7,
+ 0, 0, 0, 0, 40,252, 17, 7, 0, 0, 0, 0, 72,251, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+239, 5, 0, 0, 0, 0, 0, 0,103, 1, 0, 0, 18, 18,240, 5,104, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,120, 54, 18, 7, 0, 0, 0, 0,120, 54, 18, 7, 0, 0, 0, 0,216, 50, 18, 7, 0, 0, 0, 0, 72, 52, 18, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,216, 50, 18, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 72, 52, 18, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,160, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0,
+ 0, 0,190, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,239, 5, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,224,189, 68,
+ 0, 0,200, 65, 0,224,189, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0,
+ 10, 0,240, 5, 26, 0,240, 5, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+239, 5, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 5, 26, 0,
+ 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0,184,129,199, 3, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 72, 52, 18, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,216, 50, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0,224,189, 68, 0, 0, 0, 0, 0, 0, 51, 67, 0, 0, 0, 0,
+ 0,224,187, 68, 0, 0, 0, 0, 0, 0,167, 67,223, 5, 0, 0,240, 5, 0, 0, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,222, 5, 0, 0, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 2, 2, 0, 0, 1, 0, 3, 3, 2, 0, 0, 4,
+ 10, 0,240, 5, 78, 1,223, 5, 78, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+239, 5, 0, 0, 26, 0, 0, 0,103, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 5, 78, 1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,184, 53, 18, 7, 0, 0, 0, 0,193, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 40, 54, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 4, 0, 0, 0, 40, 54, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65,136, 1, 0, 0,120, 54, 18, 7, 0, 0, 0, 0,194, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,184, 53, 18, 7, 0, 0, 0, 0,184, 53, 18, 7, 0, 0, 0, 0, 62, 62, 62, 32, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-255, 21, 0, 0,160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,
- 88, 26,215, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,120, 27,215, 3, 0, 0, 0, 0, 56, 25,215, 3, 0, 0, 0, 0,
- 40, 52,201, 3, 0, 0, 0, 0, 8, 54,201, 3, 0, 0, 0, 0,168, 49,201, 3, 0, 0, 0, 0,136, 51,201, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,249, 2, 0, 0,239, 5, 0, 0,105, 1, 0, 0,167, 3, 0, 0, 1, 1,247, 2, 63, 2, 1, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120, 52,217, 3, 0, 0, 0, 0,120, 52,217, 3, 0, 0, 0, 0,
-168,246,216, 3, 0, 0, 0, 0,104,253,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,168,246,216, 3, 0, 0, 0, 0,
-215, 0, 0, 0, 1, 0, 0, 0, 88,248,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,113, 68,
- 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,192, 61, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,246, 2, 0, 0,
- 0, 0, 0, 0, 25, 0, 0, 0, 0,128, 61, 68, 0, 0,200, 65, 0,128, 61, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,247, 2, 26, 0,247, 2, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,249, 2, 0, 0,239, 5, 0, 0,105, 1, 0, 0,130, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,247, 2, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 88,248,216, 3, 0, 0, 0, 0,
-215, 0, 0, 0, 1, 0, 0, 0, 8,250,216, 3, 0, 0, 0, 0,168,246,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67,
- 0, 64, 70,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67,255,127, 70,196, 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0,
- 18, 0, 0, 0, 43, 3, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0,
- 18, 0, 0, 0, 43, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64,
- 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,160, 0, 44, 3,143, 0, 26, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,249, 2, 0, 0,249, 2, 0, 0,131, 1, 0, 0,167, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 37, 2, 0, 0, 5, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 8,250,216, 3, 0, 0, 0, 0,
-215, 0, 0, 0, 1, 0, 0, 0,184,251,216, 3, 0, 0, 0, 0, 88,248,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 67,
- 0, 0,206,194, 0, 0, 0, 0, 0, 0, 0, 0,231,102, 16, 67, 0, 0,206,194, 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0,
- 18, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0,
- 18, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64,
- 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,160, 0,120, 0,143, 0,102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,249, 2, 0, 0,239, 5, 0, 0,131, 1, 0, 0,131, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 6, 0, 34, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,184,251,216, 3, 0, 0, 0, 0,
-215, 0, 0, 0, 1, 0, 0, 0,104,253,216, 3, 0, 0, 0, 0, 8,250,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 67,
- 0,128,142,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 67, 0, 0, 26,196, 0, 0, 0, 0,163, 0, 0, 0,180, 0, 0, 0,
- 18, 0, 0, 0,121, 2, 0, 0, 0, 0, 0, 0,162, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,162, 0, 0, 0,
- 18, 0, 0, 0,121, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64,
- 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,180, 0,122, 2,163, 0,104, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,239, 5, 0, 0,239, 5, 0, 0,131, 1, 0, 0,167, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,104,253,216, 3, 0, 0, 0, 0,
-215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184,251,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,249, 2, 0, 0,239, 5, 0, 0,131, 1, 0, 0,167, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,247, 2, 37, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,112,121,116,104,111,110, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 4, 0, 0, 8, 4, 0, 0,
+ 68, 65, 84, 65,160, 0, 0, 0, 72, 56, 18, 7, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 8, 63, 18, 7, 0, 0, 0, 0,
+232, 49, 18, 7, 0, 0, 0, 0, 8,253, 17, 7, 0, 0, 0, 0,216,250, 17, 7, 0, 0, 0, 0,104,250, 17, 7, 0, 0, 0, 0,
+120,253, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,241, 5, 0, 0,126, 7, 0, 0,237, 2, 0, 0,167, 3, 0, 0,
+ 3, 3,142, 1,187, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 60, 18, 7, 0, 0, 0, 0,
+ 24, 60, 18, 7, 0, 0, 0, 0, 56, 57, 18, 7, 0, 0, 0, 0,168, 58, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,
+ 56, 57, 18, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,168, 58, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0,128,244, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,199, 67, 0, 0, 0, 0, 0, 0,208, 65,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,200, 76,217, 3, 0, 0, 0, 0, 68, 65, 84, 65,112, 3, 0, 0,200, 76,217, 3, 0, 0, 0, 0,
-173, 0, 0, 0, 1, 0, 0, 0, 0, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74,141,193, 63,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 1,128,191, 0, 0,128,191, 0, 0, 0, 0, 0, 0, 0, 0,
-225,215,163,188, 0, 0, 0, 0, 68,239,209, 62, 51,177,205,190,184,158, 81, 63, 0, 0, 0, 0, 70,119,105, 63,143, 74, 70, 62,
- 35, 44,185,190, 0, 0, 0, 0,162, 84, 89,188,166, 33,101, 63, 42, 61,228, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-214,211,111,193, 0, 0,128, 63, 69,239,209, 62, 70,119,105, 63,176, 84, 89,188, 0, 0, 0, 0, 53,177,205,190,142, 74, 70, 62,
-166, 33,101, 63, 0, 0, 0, 0,185,158, 81, 63, 35, 44,185,190, 43, 61,228, 62, 0, 0, 0, 0,164, 96, 68, 65,111,121,173,192,
-248,209,213, 64, 0, 0,128, 63,178,157,229, 62, 30,132, 27,191,222,160, 81,191,184,158, 81,191,117, 90,127, 63,166,235,149, 62,
- 9, 46,185, 62, 35, 44,185, 62,145,180,109,188,212, 60,173, 63,129, 63,228,190, 42, 61,228,190, 0, 0, 0, 0, 0, 0, 0, 0,
- 96,132,111, 65,214,211,111, 65,217,236,191, 62, 54,117, 85, 63,224,246, 70,188, 0,160, 32,182,252, 5,136,190, 43, 33, 3, 62,
-235,135, 23, 63, 0, 0, 96, 53,215,104, 25,196,133,132,135, 67, 37, 9,167,195,136,252, 71,194, 3, 54, 25, 68,158, 87,135,195,
-205,209,166, 67,151,254, 71, 66, 68,239,209, 62, 51,177,205,190,184,158, 81, 63, 0, 0, 0, 0, 70,119,105, 63,143, 74, 70, 62,
- 35, 44,185,190, 0, 0, 0, 0,162, 84, 89,188,166, 33,101, 63, 42, 61,228, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-214,211,111,193, 0, 0,128, 63,178,157,229, 62, 30,132, 27,191,222,160, 81,191,184,158, 81,191,117, 90,127, 63,166,235,149, 62,
- 9, 46,185, 62, 35, 44,185, 62,145,180,109,188,212, 60,173, 63,129, 63,228,190, 42, 61,228,190, 0, 0, 0, 0, 0, 0, 0, 0,
- 96,132,111, 65,214,211,111, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,141, 1, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,198, 67, 0, 0,200, 65, 0,128,198, 67, 0, 0,200, 65,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,142, 1, 26, 0,142, 1, 26, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,241, 5, 0, 0,126, 7, 0, 0,237, 2, 0, 0, 6, 3, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,142, 1, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,
+168, 58, 18, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 57, 18, 7, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0,128,141, 67, 0, 0,244,194, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,190, 67, 0, 0, 15,195, 0, 0, 0, 0,
+125, 1, 0, 0,142, 1, 0, 0, 18, 0, 0, 0,160, 0, 0, 0, 0, 0, 0, 0,124, 1, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0,
+ 0, 0, 0, 0,124, 1, 0, 0, 18, 0, 0, 0,160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 18, 6, 0, 0, 2, 0, 3, 3, 0, 0, 12, 4, 6, 0,142, 1,161, 0,125, 1,143, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,241, 5, 0, 0,126, 7, 0, 0, 7, 3, 0, 0,167, 3, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,142, 1,161, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 1, 0, 0,
+ 24, 60, 18, 7, 0, 0, 0, 0,183, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 46, 86, 45, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 86, 45, 64,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 86, 45, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 92, 62, 55, 63, 56,186,224,190,237,203,148,190, 3,236,234,190,214,211,111, 65,214,211,111, 65,
- 0, 0, 0, 0, 0, 0, 0, 0,107,227, 29, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0,
-255,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 30, 33, 12, 66,
- 86,152,137, 66,116, 27,126, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 96, 1, 0, 0,
-120, 52,217, 3, 0, 0, 0, 0,174, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 51, 51, 51, 63, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65,205,204, 76, 62,
- 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0,200,213,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,120, 61, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 3, 0, 8, 8,128, 0, 0, 0, 12, 66, 0, 0,128, 63, 10,215, 35, 60,
- 0, 0,250, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0,
- 10, 0, 7, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0, 0, 0, 68, 65, 84, 65, 16, 0, 0, 0,120, 61, 18, 7, 0, 0, 0, 0,237, 0, 0, 0, 1, 0, 0, 0,
+ 14, 0, 0, 0, 14, 0, 0, 0,216, 61, 18, 7, 0, 0, 0, 0, 68, 65, 84, 65,224, 0, 0, 0,216, 61, 18, 7, 0, 0, 0, 0,
+236, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,200,189, 18, 7, 0, 0, 0, 0, 19, 0, 0, 0, 1, 0, 1, 0,
+200,189, 18, 7, 0, 0, 0, 0, 20, 0, 0, 0, 1, 0, 1, 0,200,189, 18, 7, 0, 0, 0, 0, 21, 0, 1, 0, 1, 0, 0, 0,
+200,189, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,120,216, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
+232,225, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,136, 24, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
+200,239, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,216, 5, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
+ 40,233, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,184,211, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
+ 72,219, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,168,210, 18, 7, 0, 0, 0, 0, 21, 0, 0, 0, 1, 0, 1, 0,
+200,189, 18, 7, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, 8, 63, 18, 7, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 72, 56, 18, 7, 0, 0, 0, 0,184,251, 17, 7, 0, 0, 0, 0,248,249, 17, 7, 0, 0, 0, 0,
+232,253, 17, 7, 0, 0, 0, 0,152,252, 17, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,247, 2, 0, 0,
+105, 1, 0, 0,167, 3, 0, 0, 9, 9,248, 2, 63, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+216, 66, 18, 7, 0, 0, 0, 0,216, 66, 18, 7, 0, 0, 0, 0,248, 63, 18, 7, 0, 0, 0, 0,104, 65, 18, 7, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,120, 27,215, 3, 0, 0, 0, 0,
-214, 0, 0, 0, 1, 0, 0, 0,152, 28,215, 3, 0, 0, 0, 0, 88, 26,215, 3, 0, 0, 0, 0,232, 45,201, 3, 0, 0, 0, 0,
-232, 50,201, 3, 0, 0, 0, 0,136, 51,201, 3, 0, 0, 0, 0, 72, 50,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,239, 5, 0, 0, 0, 0, 0, 0,103, 1, 0, 0, 18, 18,240, 5,104, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,184, 80,217, 3, 0, 0, 0, 0,184, 80,217, 3, 0, 0, 0, 0, 24,255,216, 3, 0, 0, 0, 0,
-200, 0,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 24,255,216, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,
-200, 0,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,160, 67, 0, 0, 0, 0, 0, 0,208, 65,
- 0, 0, 0, 0, 0, 0,190, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,239, 5, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0,
- 0,224,189, 68, 0, 0,200, 65, 0,224,189, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3,
- 4, 0, 12, 0, 10, 0,240, 5, 26, 0,240, 5, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,239, 5, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-240, 5, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 40, 1, 0, 0,248, 63, 18, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,104, 65, 18, 7, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,230, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 62, 68,
+ 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,247, 2, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,192, 61, 68, 0, 0,200, 65,
+ 0,192, 61, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,248, 2,
+ 26, 0,248, 2, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,247, 2, 0, 0,
+105, 1, 0, 0,130, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 2, 26, 0, 0, 0, 1, 0,
+ 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,200, 0,217, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 24,255,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,224,189, 68, 0, 0, 0, 0, 0, 0, 51, 67,
- 0, 0, 0, 0, 0,224,187, 68, 0, 0, 0, 0, 0, 0,167, 67,223, 5, 0, 0,240, 5, 0, 0, 0, 0, 0, 0, 77, 1, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,222, 5, 0, 0, 0, 0, 0, 0, 77, 1, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 2, 2, 0, 0, 1, 0, 3, 3,
- 2, 0, 0, 4, 10, 0,240, 5, 78, 1,223, 5, 78, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,239, 5, 0, 0, 26, 0, 0, 0,103, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-240, 5, 78, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 40, 1, 0, 0,104, 65, 18, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+248, 63, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0,224,189, 68, 0, 0, 0, 0, 0,192, 22, 68,248,150, 23, 68, 8, 41,100, 68,
+ 46,224, 62, 67,233, 15,206, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,247, 2, 0, 0, 0, 0, 0, 0, 36, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 10,215, 35, 60, 0, 0,122, 68, 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 0, 4, 10, 0,248, 2,
+ 37, 2,248, 2, 37, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,247, 2, 0, 0,
+131, 1, 0, 0,167, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 2, 37, 2, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,136, 96,216, 3, 0, 0, 0, 0,193, 0, 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 40,182,117, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 4, 0, 0, 0, 40,182,117, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65,136, 1, 0, 0,184, 80,217, 3, 0, 0, 0, 0,194, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136, 96,216, 3, 0, 0, 0, 0,136, 96,216, 3, 0, 0, 0, 0, 62, 62, 62, 32,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65,160, 2, 0, 0,216, 66, 18, 7, 0, 0, 0, 0,186, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0,
+ 0, 0, 0, 0, 12, 0, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,205,204,204, 61,
+231, 1, 0, 0,243, 1, 0, 0,122, 1, 0, 0,124, 1, 0, 0,231, 1, 0, 0,243, 1, 0, 0, 4, 0, 0, 0,124, 1, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,112,121,116,104,
-111,110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 4, 0, 0,
- 8, 4, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,152, 28,215, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,184, 29,215, 3,
- 0, 0, 0, 0,120, 27,215, 3, 0, 0, 0, 0,200, 52,201, 3, 0, 0, 0, 0,168, 49,201, 3, 0, 0, 0, 0, 8, 49,201, 3,
- 0, 0, 0, 0,104, 53,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,241, 5, 0, 0,126, 7, 0, 0,237, 2, 0, 0,
-167, 3, 0, 0, 3, 3,142, 1,187, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 4,209, 3,
- 0, 0, 0, 0, 8, 4,209, 3, 0, 0, 0, 0,120, 2,217, 3, 0, 0, 0, 0, 40, 4,217, 3, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 40, 1, 0, 0,120, 2,217, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 40, 4,217, 3, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0,128,244, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,199, 67, 0, 0, 0, 0,
- 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,141, 1, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,198, 67, 0, 0,200, 65, 0,128,198, 67,
- 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,142, 1, 26, 0,142, 1,
- 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,241, 5, 0, 0,126, 7, 0, 0,237, 2, 0, 0,
- 6, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,142, 1, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 40, 1, 0, 0, 40, 4,217, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120, 2,217, 3,
- 0, 0, 0, 0, 0, 0, 0, 0, 0,128,141, 67, 0, 0,244,194, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,190, 67, 0, 0, 15,195,
- 0, 0, 0, 0,125, 1, 0, 0,142, 1, 0, 0, 18, 0, 0, 0,160, 0, 0, 0, 0, 0, 0, 0,124, 1, 0, 0, 0, 0, 0, 0,
- 17, 0, 0, 0, 0, 0, 0, 0,124, 1, 0, 0, 18, 0, 0, 0,160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 18, 6, 0, 0, 2, 0, 3, 3, 0, 0, 12, 4, 6, 0,142, 1,161, 0,125, 1,
-143, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,241, 5, 0, 0,126, 7, 0, 0, 7, 3, 0, 0,
-167, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,142, 1,161, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 24, 1, 0, 0, 8, 4,209, 3, 0, 0, 0, 0,183, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 11,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 68, 65, 84, 65, 16, 0, 0, 0,248, 11,217, 3, 0, 0, 0, 0,237, 0, 0, 0,
- 1, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0,184, 33,199, 3, 0, 0, 0, 0, 68, 65, 84, 65,224, 0, 0, 0,184, 33,199, 3,
- 0, 0, 0, 0,236, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,168,194,217, 3, 0, 0, 0, 0, 19, 0, 0, 0,
- 1, 0, 1, 0,168,194,217, 3, 0, 0, 0, 0, 20, 0, 0, 0, 1, 0, 1, 0,168,194,217, 3, 0, 0, 0, 0, 21, 0, 1, 0,
- 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 24, 51,163, 3, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 0, 1, 0,184,219,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,136, 48,218, 3, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 0, 1, 0,152, 7,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,216, 29,218, 3, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 0, 1, 0,168,225,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,120,209,217, 3, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 0, 1, 0,200,213,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 24, 98,200, 3, 0, 0, 0, 0, 21, 0, 0, 0,
- 1, 0, 1, 0,168,194,217, 3, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,184, 29,215, 3, 0, 0, 0, 0,214, 0, 0, 0,
- 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152, 28,215, 3, 0, 0, 0, 0,232, 50,201, 3, 0, 0, 0, 0,104, 48,201, 3,
- 0, 0, 0, 0, 8, 54,201, 3, 0, 0, 0, 0, 40, 52,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-247, 2, 0, 0,105, 1, 0, 0,167, 3, 0, 0, 9, 9,248, 2, 63, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,200,114,217, 3, 0, 0, 0, 0,200,114,217, 3, 0, 0, 0, 0,248, 82,217, 3, 0, 0, 0, 0,168, 84,217, 3,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 78, 0, 0, 8, 1, 0, 0,
+ 88, 70, 18, 7, 0, 0, 0, 0,210, 0, 0, 0, 1, 0, 0, 0,120,141, 18, 7, 0, 0, 0, 0,232,246, 17, 7, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 82, 85, 86, 32, 69,100,105,116,105,110,103, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,248, 82,217, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,168, 84,217, 3,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,230, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0,
- 0, 0, 62, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,247, 2, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,192, 61, 68,
- 0, 0,200, 65, 0,192, 61, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0,
- 10, 0,248, 2, 26, 0,248, 2, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-247, 2, 0, 0,105, 1, 0, 0,130, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 2, 26, 0,
- 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,168, 71, 18, 7, 0, 0, 0, 0,184, 74, 18, 7, 0, 0, 0, 0, 40, 75, 18, 7, 0, 0, 0, 0,
+136, 79, 18, 7, 0, 0, 0, 0,248, 79, 18, 7, 0, 0, 0, 0, 24,124, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,200,189, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,
+168, 71, 18, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 24, 72, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 24, 72, 18, 7, 0, 0, 0, 0,
+211, 0, 0, 0, 1, 0, 0, 0,136, 72, 18, 7, 0, 0, 0, 0,168, 71, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 5, 4, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,136, 72, 18, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,
+248, 72, 18, 7, 0, 0, 0, 0, 24, 72, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 5, 4, 0, 0, 0, 0,
+ 68, 65, 84, 65, 32, 0, 0, 0,248, 72, 18, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,104, 73, 18, 7, 0, 0, 0, 0,
+136, 72, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,
+104, 73, 18, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,216, 73, 18, 7, 0, 0, 0, 0,248, 72, 18, 7, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,234, 3, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,216, 73, 18, 7, 0, 0, 0, 0,
+211, 0, 0, 0, 1, 0, 0, 0, 72, 74, 18, 7, 0, 0, 0, 0,104, 73, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+126, 7,234, 3, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 72, 74, 18, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,
+184, 74, 18, 7, 0, 0, 0, 0,216, 73, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 3,234, 3, 1, 0, 0, 0,
+ 68, 65, 84, 65, 32, 0, 0, 0,184, 74, 18, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 72, 74, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 3, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
+ 40, 75, 18, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,152, 75, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 24, 72, 18, 7, 0, 0, 0, 0,136, 72, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
+152, 75, 18, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 8, 76, 18, 7, 0, 0, 0, 0, 40, 75, 18, 7, 0, 0, 0, 0,
+ 24, 72, 18, 7, 0, 0, 0, 0,104, 73, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
+ 8, 76, 18, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,120, 76, 18, 7, 0, 0, 0, 0,152, 75, 18, 7, 0, 0, 0, 0,
+136, 72, 18, 7, 0, 0, 0, 0,216, 73, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
+120, 76, 18, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,232, 76, 18, 7, 0, 0, 0, 0, 8, 76, 18, 7, 0, 0, 0, 0,
+104, 73, 18, 7, 0, 0, 0, 0,216, 73, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
+232, 76, 18, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 88, 77, 18, 7, 0, 0, 0, 0,120, 76, 18, 7, 0, 0, 0, 0,
+104, 73, 18, 7, 0, 0, 0, 0, 72, 74, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
+ 88, 77, 18, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,200, 77, 18, 7, 0, 0, 0, 0,232, 76, 18, 7, 0, 0, 0, 0,
+168, 71, 18, 7, 0, 0, 0, 0,184, 74, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
+200, 77, 18, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 56, 78, 18, 7, 0, 0, 0, 0, 88, 77, 18, 7, 0, 0, 0, 0,
+168, 71, 18, 7, 0, 0, 0, 0,104, 73, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
+ 56, 78, 18, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,168, 78, 18, 7, 0, 0, 0, 0,200, 77, 18, 7, 0, 0, 0, 0,
+ 72, 74, 18, 7, 0, 0, 0, 0,184, 74, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
+168, 78, 18, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 24, 79, 18, 7, 0, 0, 0, 0, 56, 78, 18, 7, 0, 0, 0, 0,
+216, 73, 18, 7, 0, 0, 0, 0, 72, 74, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
+ 24, 79, 18, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,136, 79, 18, 7, 0, 0, 0, 0,168, 78, 18, 7, 0, 0, 0, 0,
+248, 72, 18, 7, 0, 0, 0, 0,184, 74, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
+136, 79, 18, 7, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 79, 18, 7, 0, 0, 0, 0,
+248, 72, 18, 7, 0, 0, 0, 0,216, 73, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,
+248, 79, 18, 7, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,200, 83, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+104, 73, 18, 7, 0, 0, 0, 0, 24, 72, 18, 7, 0, 0, 0, 0,136, 72, 18, 7, 0, 0, 0, 0,216, 73, 18, 7, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,235, 3, 0, 0, 5, 4, 0, 0, 7, 7,127, 7, 27, 0, 1, 0,
+ 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,140, 18, 7, 0, 0, 0, 0,232,140, 18, 7, 0, 0, 0, 0,
+232, 80, 18, 7, 0, 0, 0, 0, 88, 82, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,232, 80, 18, 7, 0, 0, 0, 0,
+215, 0, 0, 0, 1, 0, 0, 0, 88, 82, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,148, 68,
+ 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,224,239, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,
+ 0, 0, 0, 0, 25, 0, 0, 0, 0,192,239, 68, 0, 0,200, 65, 0,192,239, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,127, 7, 26, 0,127, 7, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,235, 3, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,127, 7, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,168, 84,217, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,248, 82,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,224,189, 68, 0, 0, 0, 0, 0,192, 22, 68,248,150, 23, 68,
- 8, 41,100, 68, 46,224, 62, 67,233, 15,206, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,247, 2, 0, 0, 0, 0, 0, 0, 36, 2, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10,215, 35, 60, 0, 0,122, 68, 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 0, 4,
- 10, 0,248, 2, 37, 2,248, 2, 37, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-247, 2, 0, 0,131, 1, 0, 0,167, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 2, 37, 2,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 88, 82, 18, 7, 0, 0, 0, 0,
+215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232, 80, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0,240,109, 69,
+ 0, 0,128,192, 0, 0, 0, 0, 0, 0, 0, 0,255,255,109, 69, 0, 0, 0,192, 0, 0, 0, 0,112, 7, 0, 0,129, 7, 0, 0,
+ 18, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0,
+ 18, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 2, 0, 0, 0, 1, 0, 3, 3, 2, 0, 0, 4, 10, 0,129, 7, 2, 0,112, 7, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 4, 0, 0, 5, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65,160, 2, 0, 0,200,114,217, 3, 0, 0, 0, 0,186, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,200, 83, 18, 7, 0, 0, 0, 0,
+214, 0, 0, 0, 1, 0, 0, 0, 24,124, 18, 7, 0, 0, 0, 0,248, 79, 18, 7, 0, 0, 0, 0,168, 71, 18, 7, 0, 0, 0, 0,
+104, 73, 18, 7, 0, 0, 0, 0, 72, 74, 18, 7, 0, 0, 0, 0,184, 74, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,199, 3, 0, 0, 0, 0, 0, 0,233, 3, 0, 0, 6, 6,200, 3,234, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,168, 90, 18, 7, 0, 0, 0, 0,168, 90, 18, 7, 0, 0, 0, 0,184, 84, 18, 7, 0, 0, 0, 0,
+ 56, 89, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,184, 84, 18, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,
+ 40, 86, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,215, 67, 0, 0, 0, 0, 0, 0,208, 65,
+ 0, 0, 0, 0, 0, 0,114, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,199, 3, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0,
+ 0,192,113, 68, 0, 0,200, 65, 0,192,113, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3,
+ 4, 0, 12, 0, 10, 0,200, 3, 26, 0,200, 3, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,199, 3, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+200, 3, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 40, 86, 18, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,
+ 56, 89, 18, 7, 0, 0, 0, 0,184, 84, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 91, 67, 0,192,115,196, 0, 0, 0, 0,
+ 0, 0, 0, 0,254,255, 74, 67,254,255,115,196, 0, 0, 0, 0,203, 0, 0, 0,220, 0, 0, 0, 0, 0, 0, 0,207, 3, 0, 0,
+ 0, 0, 0, 0,202, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,202, 0, 0, 0, 0, 0, 0, 0,207, 3, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 3, 0, 0, 1, 0, 7, 0,
+ 18, 0, 0, 4, 6, 0,220, 0,208, 3,203, 0,208, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,219, 0, 0, 0, 26, 0, 0, 0,233, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+220, 0,208, 3, 0, 0, 4, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152, 87, 18, 7, 0, 0, 0, 0,
+152, 87, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,152, 87, 18, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 32, 0, 0, 0, 0, 0, 0, 0, 12, 0, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
-205,204,204, 61,231, 1, 0, 0,243, 1, 0, 0,122, 1, 0, 0,124, 1, 0, 0,231, 1, 0, 0,243, 1, 0, 0, 4, 0, 0, 0,
-124, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 73, 77, 65, 71, 69, 95, 80, 84, 95,103,112,101,110, 99,105,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 73, 77, 65, 71, 69, 95, 80, 84, 95,103,112,101,110, 99,105,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 71,114,101, 97,115,101, 32, 80,101,110, 99,105,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,152,255,202, 0, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,
+ 56, 89, 18, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 86, 18, 7, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 67, 51, 51, 43,191,154,153,213, 63, 51, 51,131,191,154,153, 1, 64,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,236, 2, 0, 0, 0, 0, 0, 0,208, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,220, 0, 0, 0,199, 3, 0, 0, 26, 0, 0, 0,233, 3, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,236, 2,208, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 33, 0, 0,
+168, 90, 18, 7, 0, 0, 0, 0,184, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 65,
+ 0, 0, 0, 0,154,153,153, 62, 0, 0, 0, 0,100, 0, 0, 0,154,153,153, 62,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 78, 0, 0,
- 8, 1, 0, 0,232,117,217, 3, 0, 0, 0, 0,210, 0, 0, 0, 1, 0, 0, 0, 24,157,217, 3, 0, 0, 0, 0, 56, 43,217, 3,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 82, 85, 86, 32, 69,100,105,116,105,110,103,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168, 54,201, 3, 0, 0, 0, 0, 8, 59,201, 3, 0, 0, 0, 0, 56, 97,216, 3,
- 0, 0, 0, 0, 24,104,216, 3, 0, 0, 0, 0,216, 30,215, 3, 0, 0, 0, 0, 24, 33,215, 3, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 32, 0, 0, 0,168, 54,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 72, 55,201, 3, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 72, 55,201, 3,
- 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,232, 55,201, 3, 0, 0, 0, 0,168, 54,201, 3, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 5, 4, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,232, 55,201, 3, 0, 0, 0, 0,211, 0, 0, 0,
- 1, 0, 0, 0,136, 56,201, 3, 0, 0, 0, 0, 72, 55,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 5, 4,
- 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,136, 56,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 40, 57,201, 3,
- 0, 0, 0, 0,232, 55,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 32, 0, 0, 0, 40, 57,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,200, 57,201, 3, 0, 0, 0, 0,136, 56,201, 3,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,234, 3, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,200, 57,201, 3,
- 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,104, 58,201, 3, 0, 0, 0, 0, 40, 57,201, 3, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,126, 7,234, 3, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,104, 58,201, 3, 0, 0, 0, 0,211, 0, 0, 0,
- 1, 0, 0, 0, 8, 59,201, 3, 0, 0, 0, 0,200, 57,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 3,234, 3,
- 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 8, 59,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,104, 58,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 3, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 40, 0, 0, 0, 56, 97,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,232, 97,216, 3, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 72, 55,201, 3, 0, 0, 0, 0,232, 55,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 40, 0, 0, 0,232, 97,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,152, 98,216, 3, 0, 0, 0, 0, 56, 97,216, 3,
- 0, 0, 0, 0, 72, 55,201, 3, 0, 0, 0, 0, 40, 57,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 40, 0, 0, 0,152, 98,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 72, 99,216, 3, 0, 0, 0, 0,232, 97,216, 3,
- 0, 0, 0, 0,232, 55,201, 3, 0, 0, 0, 0,200, 57,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 40, 0, 0, 0, 72, 99,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,248, 99,216, 3, 0, 0, 0, 0,152, 98,216, 3,
- 0, 0, 0, 0, 40, 57,201, 3, 0, 0, 0, 0,200, 57,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 40, 0, 0, 0,248, 99,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,168,100,216, 3, 0, 0, 0, 0, 72, 99,216, 3,
- 0, 0, 0, 0, 40, 57,201, 3, 0, 0, 0, 0,104, 58,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 40, 0, 0, 0,168,100,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 88,101,216, 3, 0, 0, 0, 0,248, 99,216, 3,
- 0, 0, 0, 0,168, 54,201, 3, 0, 0, 0, 0, 8, 59,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 40, 0, 0, 0, 88,101,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 8,102,216, 3, 0, 0, 0, 0,168,100,216, 3,
- 0, 0, 0, 0,168, 54,201, 3, 0, 0, 0, 0, 40, 57,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 40, 0, 0, 0, 8,102,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,184,102,216, 3, 0, 0, 0, 0, 88,101,216, 3,
- 0, 0, 0, 0,104, 58,201, 3, 0, 0, 0, 0, 8, 59,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 40, 0, 0, 0,184,102,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,104,103,216, 3, 0, 0, 0, 0, 8,102,216, 3,
- 0, 0, 0, 0,200, 57,201, 3, 0, 0, 0, 0,104, 58,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 40, 0, 0, 0,104,103,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 24,104,216, 3, 0, 0, 0, 0,184,102,216, 3,
- 0, 0, 0, 0,136, 56,201, 3, 0, 0, 0, 0, 8, 59,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 40, 0, 0, 0, 24,104,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,104,103,216, 3,
- 0, 0, 0, 0,136, 56,201, 3, 0, 0, 0, 0,200, 57,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
-160, 0, 0, 0,216, 30,215, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,248, 31,215, 3, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 40, 57,201, 3, 0, 0, 0, 0, 72, 55,201, 3, 0, 0, 0, 0,232, 55,201, 3, 0, 0, 0, 0,200, 57,201, 3,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,235, 3, 0, 0, 5, 4, 0, 0, 7, 7,127, 7,
- 27, 0, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,201,207, 3, 0, 0, 0, 0, 88,201,207, 3,
- 0, 0, 0, 0, 88, 86,217, 3, 0, 0, 0, 0, 8, 88,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 88, 86,217, 3,
- 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 8, 88,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 32,148, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,224,239, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-126, 7, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,192,239, 68, 0, 0,200, 65, 0,192,239, 68, 0, 0,200, 65, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,127, 7, 26, 0,127, 7, 26, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,235, 3, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,127, 7, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 8, 88,217, 3,
- 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 86,217, 3, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,240,109, 69, 0, 0,128,192, 0, 0, 0, 0, 0, 0, 0, 0,255,255,109, 69, 0, 0, 0,192, 0, 0, 0, 0,112, 7, 0, 0,
-129, 7, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,
-111, 7, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0,128, 63, 2, 0, 0, 0, 1, 0, 3, 3, 2, 0, 0, 4, 10, 0,129, 7, 2, 0,112, 7, 1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 4, 0, 0, 5, 4, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,248, 31,215, 3,
- 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 24, 33,215, 3, 0, 0, 0, 0,216, 30,215, 3, 0, 0, 0, 0,168, 54,201, 3,
- 0, 0, 0, 0, 40, 57,201, 3, 0, 0, 0, 0,104, 58,201, 3, 0, 0, 0, 0, 8, 59,201, 3, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,199, 3, 0, 0, 0, 0, 0, 0,233, 3, 0, 0, 6, 6,200, 3,234, 3, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120,119,217, 3, 0, 0, 0, 0,120,119,217, 3, 0, 0, 0, 0,184, 89,217, 3,
- 0, 0, 0, 0, 24, 93,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,184, 89,217, 3, 0, 0, 0, 0,215, 0, 0, 0,
- 1, 0, 0, 0,104, 91,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,215, 67, 0, 0, 0, 0,
- 0, 0,208, 65, 0, 0, 0, 0, 0, 0,114, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,199, 3, 0, 0, 0, 0, 0, 0,
- 25, 0, 0, 0, 0,192,113, 68, 0, 0,200, 65, 0,192,113, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,200, 3, 26, 0,200, 3, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,199, 3, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,200, 3, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,104, 91,217, 3, 0, 0, 0, 0,215, 0, 0, 0,
- 1, 0, 0, 0, 24, 93,217, 3, 0, 0, 0, 0,184, 89,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 91, 67, 0,192,115,196,
- 0, 0, 0, 0, 0, 0, 0, 0,254,255, 74, 67,254,255,115,196, 0, 0, 0, 0,203, 0, 0, 0,220, 0, 0, 0, 0, 0, 0, 0,
-207, 3, 0, 0, 0, 0, 0, 0,202, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,202, 0, 0, 0, 0, 0, 0, 0,
-207, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 3, 0, 0,
- 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,220, 0,208, 3,203, 0,208, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,219, 0, 0, 0, 26, 0, 0, 0,233, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,220, 0,208, 3, 0, 0, 4, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 54,217, 3,
- 0, 0, 0, 0, 88, 54,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 88, 54,217, 3, 0, 0, 0, 0,213, 0, 0, 0,
- 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 73, 77, 65, 71, 69, 95, 80, 84, 95,103,112,101,110, 99,105,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 73, 77, 65, 71, 69, 95, 80, 84, 95,103,112,101,110, 99,105,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 71,114,101, 97,115,101, 32, 80,101,110, 99,105,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,152,255,202, 0, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 40, 1, 0, 0, 24, 93,217, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,104, 91,217, 3,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 67, 51, 51, 43,191,154,153,213, 63, 51, 51,131,191,
-154,153, 1, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,236, 2, 0, 0, 0, 0, 0, 0,208, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,220, 0, 0, 0,199, 3, 0, 0, 26, 0, 0, 0,
-233, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,236, 2,208, 3, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 40, 33, 0, 0,120,119,217, 3, 0, 0, 0, 0,184, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,240, 65, 0, 0, 0, 0,154,153,153, 62, 0, 0, 0, 0,100, 0, 0, 0,154,153,153, 62,100, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -4791,6 +5270,7 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -4810,7 +5290,6 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 0, 0,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -4921,460 +5400,456 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,160, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,
+ 24,124, 18, 7, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 83, 18, 7, 0, 0, 0, 0,
+184, 74, 18, 7, 0, 0, 0, 0, 72, 74, 18, 7, 0, 0, 0, 0,216, 73, 18, 7, 0, 0, 0, 0,248, 72, 18, 7, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,201, 3, 0, 0,126, 7, 0, 0, 0, 0, 0, 0,233, 3, 0, 0, 1, 1,182, 3,234, 3, 1, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,139, 18, 7, 0, 0, 0, 0, 56,139, 18, 7, 0, 0, 0, 0,
+ 8,125, 18, 7, 0, 0, 0, 0, 8,134, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 8,125, 18, 7, 0, 0, 0, 0,
+215, 0, 0, 0, 1, 0, 0, 0,120,126, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,113, 68,
+ 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,128,109, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,181, 3, 0, 0,
+ 0, 0, 0, 0, 25, 0, 0, 0, 0, 64,109, 68, 0, 0,200, 65, 0, 64,109, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,182, 3, 26, 0,182, 3, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,201, 3, 0, 0,126, 7, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,182, 3, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,120,126, 18, 7, 0, 0, 0, 0,
+215, 0, 0, 0, 1, 0, 0, 0,136,129, 18, 7, 0, 0, 0, 0, 8,125, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 67,
+ 0, 0, 86,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67, 0, 0, 86,196, 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0,
+ 0, 0, 0, 0, 87, 3, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0,
+ 0, 0, 0, 0, 87, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64,
+ 10, 3, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,160, 0, 88, 3,143, 0, 88, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,201, 3, 0, 0,104, 4, 0, 0,146, 0, 0, 0,233, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,160, 0, 88, 3, 0, 0, 5, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+232,127, 18, 7, 0, 0, 0, 0,232,127, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,232,127, 18, 7, 0, 0, 0, 0,
+213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95,111, 98,106,101, 99,116,109,111,
+100,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95,111, 98,106,101, 99,116,109,111,
+100,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 79, 98,106,101, 99,116, 32, 84,111,111,108,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,233,253,143, 0,255, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 40, 1, 0, 0,136,129, 18, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,152,132, 18, 7, 0, 0, 0, 0,
+120,126, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0,242,194, 0, 0, 0, 0, 0, 0, 0, 0,231,102, 16, 67,
+ 91, 90,242,194, 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 0, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0,
+ 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 3, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,160, 0,
+120, 0,143, 0,120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,201, 3, 0, 0,104, 4, 0, 0,
+ 26, 0, 0, 0,145, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 0,120, 0, 0, 0, 6, 0,
+ 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,130, 18, 7, 0, 0, 0, 0,248,130, 18, 7, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 88, 1, 0, 0,248,130, 18, 7, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80,
+ 84, 95,108, 97,115,116, 95,111,112,101,114, 97,116,111,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80,
+ 84, 95,108, 97,115,116, 95,111,112,101,114, 97,116,111,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79,112,101,114, 97,116,111,114,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216,255,144, 0, 16, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,152,132, 18, 7, 0, 0, 0, 0,
+215, 0, 0, 0, 1, 0, 0, 0, 8,134, 18, 7, 0, 0, 0, 0,136,129, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 67,
+ 0,128,126,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 67,255,191,126,196, 0, 0, 0, 0,163, 0, 0, 0,180, 0, 0, 0,
+ 18, 0, 0, 0, 12, 4, 0, 0, 0, 0, 0, 0,162, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,162, 0, 0, 0,
+ 18, 0, 0, 0, 12, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64,
+ 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,180, 0, 13, 4,163, 0,251, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,126, 7, 0, 0, 26, 0, 0, 0,233, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 8,134, 18, 7, 0, 0, 0, 0,
+215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152,132, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,105, 4, 0, 0,126, 7, 0, 0, 26, 0, 0, 0,233, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 22, 3,208, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,160, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
-160, 0, 0, 0, 24, 33,215, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 31,215, 3,
- 0, 0, 0, 0, 8, 59,201, 3, 0, 0, 0, 0,104, 58,201, 3, 0, 0, 0, 0,200, 57,201, 3, 0, 0, 0, 0,136, 56,201, 3,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,201, 3, 0, 0,126, 7, 0, 0, 0, 0, 0, 0,233, 3, 0, 0, 1, 1,182, 3,
-234, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 59,217, 3, 0, 0, 0, 0,248, 59,217, 3,
- 0, 0, 0, 0,200, 94,217, 3, 0, 0, 0, 0,136,101,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,200, 94,217, 3,
- 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,120, 96,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 64,113, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,128,109, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-181, 3, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 64,109, 68, 0, 0,200, 65, 0, 64,109, 68, 0, 0,200, 65, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,182, 3, 26, 0,182, 3, 26, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,201, 3, 0, 0,126, 7, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,182, 3, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,120,135, 18, 7, 0, 0, 0, 0, 68, 65, 84, 65,112, 3, 0, 0,120,135, 18, 7, 0, 0, 0, 0,
+173, 0, 0, 0, 1, 0, 0, 0, 72,246,172, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 13,128,191, 0, 0,128,191, 0, 0, 0, 0, 0, 0, 0, 0,
+ 74,215, 76,190, 0, 0, 0, 0, 68,239,209, 62, 51,177,205,190,184,158, 81, 63, 0, 0, 0, 0, 70,119,105, 63,143, 74, 70, 62,
+ 35, 44,185,190, 0, 0, 0, 0,162, 84, 89,188,166, 33,101, 63, 42, 61,228, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 25, 95,192, 0, 0,128, 63, 69,239,209, 62, 70,119,105, 63,160, 84, 89,188, 0, 0, 0, 0, 52,177,205,190,142, 74, 70, 62,
+166, 33,101, 63, 0, 0, 0, 0,185,158, 81, 63, 35, 44,185,190, 43, 61,228, 62, 0, 0, 0, 0,188,173, 54, 64,136, 95,161,191,
+147,231,198, 63, 0, 0,128, 63,185,214, 13, 63,208,249,224,190, 48,180, 81,191,184,158, 81,191,189,188,157, 63,140,225, 88, 62,
+ 26, 63,185, 62, 35, 44,185, 62,241,213,146,188,206,156,122, 63,138, 84,228,190, 42, 61,228,190, 0, 0, 0, 0, 0, 0, 0, 0,
+100, 98, 82, 64, 0, 25, 95, 64,121, 92,155, 62,151,198, 44, 63,192,214, 32,188, 0, 0, 40,180,195, 15,188,190,132, 75, 53, 62,
+216,125, 81, 63, 0, 0,192,179,115, 77,100,193, 17,173,201, 64,181,148,248,192,203,247,159,192,233, 74, 87, 65,247, 46,190,192,
+ 88,106,234, 64, 45, 8,160, 64, 68,239,209, 62, 51,177,205,190,184,158, 81, 63, 0, 0, 0, 0, 70,119,105, 63,143, 74, 70, 62,
+ 35, 44,185,190, 0, 0, 0, 0,162, 84, 89,188,166, 33,101, 63, 42, 61,228, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 25, 95,192, 0, 0,128, 63,185,214, 13, 63,208,249,224,190, 48,180, 81,191,184,158, 81,191,189,188,157, 63,140,225, 88, 62,
+ 26, 63,185, 62, 35, 44,185, 62,241,213,146,188,206,156,122, 63,138, 84,228,190, 42, 61,228,190, 0, 0, 0, 0, 0, 0, 0, 0,
+100, 98, 82, 64, 0, 25, 95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,120, 96,217, 3,
- 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 40, 98,217, 3, 0, 0, 0, 0,200, 94,217, 3, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 32, 67, 0, 0, 86,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67, 0, 0, 86,196, 0, 0, 0, 0,143, 0, 0, 0,
-160, 0, 0, 0, 0, 0, 0, 0, 87, 3, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,
-142, 0, 0, 0, 0, 0, 0, 0, 87, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,
- 0, 0, 0, 64, 10, 3, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,160, 0, 88, 3,143, 0, 88, 3, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,201, 3, 0, 0,104, 4, 0, 0,146, 0, 0, 0,233, 3, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 0, 88, 3, 0, 0, 5, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 56, 56,217, 3, 0, 0, 0, 0, 56, 56,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 56, 56,217, 3,
- 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95,111, 98,106,101,
- 99,116,109,111,100,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95,111, 98,106,101,
- 99,116,109,111,100,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 98,106,101, 99,116, 32, 84,111,111,108,115, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,233,253,143, 0,255, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 40, 98,217, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,216, 99,217, 3,
- 0, 0, 0, 0,120, 96,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0,242,194, 0, 0, 0, 0, 0, 0, 0, 0,
-231,102, 16, 67, 91, 90,242,194, 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 0, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0,
-142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 3, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4,
- 6, 0,160, 0,120, 0,143, 0,120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,201, 3, 0, 0,
-104, 4, 0, 0, 26, 0, 0, 0,145, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 0,120, 0,
- 0, 0, 6, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 58,217, 3, 0, 0, 0, 0, 24, 58,217, 3,
+ 0, 0, 0, 0, 0, 0, 0, 0,248,201,250, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,201,250, 62,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,201,250, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,128, 63, 92, 62, 55, 63, 56,186,224,190,237,203,148,190, 3,236,234,190, 0, 25, 95, 64, 0, 25, 95, 64,
+ 0, 0, 0, 0, 0, 0, 0, 0,114,145,245, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0,
+255,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 30, 33, 12, 66,
+ 85,152,137, 66,116, 27,126, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 96, 1, 0, 0,
+ 56,139, 18, 7, 0, 0, 0, 0,174, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 51, 51, 51, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65,205,204, 76, 62,
+ 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0, 72,219, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 24, 58,217, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87,
- 51, 68, 95, 80, 84, 95,108, 97,115,116, 95,111,112,101,114, 97,116,111,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87,
- 51, 68, 95, 80, 84, 95,108, 97,115,116, 95,111,112,101,114, 97,116,111,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79,112,101,114,
- 97,116,111,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216,255,
-144, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,216, 99,217, 3,
- 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,136,101,217, 3, 0, 0, 0, 0, 40, 98,217, 3, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 35, 67, 0,128,126,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 67,255,191,126,196, 0, 0, 0, 0,163, 0, 0, 0,
-180, 0, 0, 0, 18, 0, 0, 0, 12, 4, 0, 0, 0, 0, 0, 0,162, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,
-162, 0, 0, 0, 18, 0, 0, 0, 12, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,
- 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,180, 0, 13, 4,163, 0,251, 3, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,126, 7, 0, 0, 26, 0, 0, 0,233, 3, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 3, 0, 8, 8,128, 0, 0, 0, 12, 66, 0, 0,128, 63,205,204,204, 61,
+ 0, 0,250, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0,
+ 10, 0, 7, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 78, 0, 0, 8, 1, 0, 0,120,141, 18, 7, 0, 0, 0, 0,
+210, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 70, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 83, 82, 86,105,100,101,111, 32, 69,100,105,116,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,136,101,217, 3,
- 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216, 99,217, 3, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+200,142, 18, 7, 0, 0, 0, 0,152,147, 18, 7, 0, 0, 0, 0, 8,148, 18, 7, 0, 0, 0, 0,120,155, 18, 7, 0, 0, 0, 0,
+232,155, 18, 7, 0, 0, 0, 0, 72,181, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+200,189, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,200,142, 18, 7, 0, 0, 0, 0,
+211, 0, 0, 0, 1, 0, 0, 0, 56,143, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 56,143, 18, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,
+168,143, 18, 7, 0, 0, 0, 0,200,142, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,222, 2, 0, 0, 0, 0,
+ 68, 65, 84, 65, 32, 0, 0, 0,168,143, 18, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 24,144, 18, 7, 0, 0, 0, 0,
+ 56,143, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4,222, 2, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,
+ 24,144, 18, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,136,144, 18, 7, 0, 0, 0, 0,168,143, 18, 7, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,136,144, 18, 7, 0, 0, 0, 0,
+211, 0, 0, 0, 1, 0, 0, 0,248,144, 18, 7, 0, 0, 0, 0, 24,144, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,195, 2, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,248,144, 18, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,
+104,145, 18, 7, 0, 0, 0, 0,136,144, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4,195, 2, 1, 0, 0, 0,
+ 68, 65, 84, 65, 32, 0, 0, 0,104,145, 18, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,216,145, 18, 7, 0, 0, 0, 0,
+248,144, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 92, 1, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,
+216,145, 18, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 72,146, 18, 7, 0, 0, 0, 0,104,145, 18, 7, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 72,146, 18, 7, 0, 0, 0, 0,
+211, 0, 0, 0, 1, 0, 0, 0,184,146, 18, 7, 0, 0, 0, 0,216,145, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 48, 2,195, 2, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,184,146, 18, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,
+ 40,147, 18, 7, 0, 0, 0, 0, 72,146, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 1, 0, 0, 0, 0,
+ 68, 65, 84, 65, 32, 0, 0, 0, 40,147, 18, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,152,147, 18, 7, 0, 0, 0, 0,
+184,146, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 2, 92, 1, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,
+152,147, 18, 7, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,147, 18, 7, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 68, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 8,148, 18, 7, 0, 0, 0, 0,
+212, 0, 0, 0, 1, 0, 0, 0,120,148, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,143, 18, 7, 0, 0, 0, 0,
+168,143, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,120,148, 18, 7, 0, 0, 0, 0,
+212, 0, 0, 0, 1, 0, 0, 0,232,148, 18, 7, 0, 0, 0, 0, 8,148, 18, 7, 0, 0, 0, 0, 56,143, 18, 7, 0, 0, 0, 0,
+136,144, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,232,148, 18, 7, 0, 0, 0, 0,
+212, 0, 0, 0, 1, 0, 0, 0, 88,149, 18, 7, 0, 0, 0, 0,120,148, 18, 7, 0, 0, 0, 0,168,143, 18, 7, 0, 0, 0, 0,
+248,144, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 88,149, 18, 7, 0, 0, 0, 0,
+212, 0, 0, 0, 1, 0, 0, 0,200,149, 18, 7, 0, 0, 0, 0,232,148, 18, 7, 0, 0, 0, 0,136,144, 18, 7, 0, 0, 0, 0,
+248,144, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,200,149, 18, 7, 0, 0, 0, 0,
+212, 0, 0, 0, 1, 0, 0, 0, 56,150, 18, 7, 0, 0, 0, 0, 88,149, 18, 7, 0, 0, 0, 0,248,144, 18, 7, 0, 0, 0, 0,
+104,145, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 56,150, 18, 7, 0, 0, 0, 0,
+212, 0, 0, 0, 1, 0, 0, 0,168,150, 18, 7, 0, 0, 0, 0,200,149, 18, 7, 0, 0, 0, 0,200,142, 18, 7, 0, 0, 0, 0,
+216,145, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,168,150, 18, 7, 0, 0, 0, 0,
+212, 0, 0, 0, 1, 0, 0, 0, 24,151, 18, 7, 0, 0, 0, 0, 56,150, 18, 7, 0, 0, 0, 0,136,144, 18, 7, 0, 0, 0, 0,
+ 72,146, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 24,151, 18, 7, 0, 0, 0, 0,
+212, 0, 0, 0, 1, 0, 0, 0,136,151, 18, 7, 0, 0, 0, 0,168,150, 18, 7, 0, 0, 0, 0,216,145, 18, 7, 0, 0, 0, 0,
+184,146, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,136,151, 18, 7, 0, 0, 0, 0,
+212, 0, 0, 0, 1, 0, 0, 0,248,151, 18, 7, 0, 0, 0, 0, 24,151, 18, 7, 0, 0, 0, 0,184,146, 18, 7, 0, 0, 0, 0,
+ 40,147, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,248,151, 18, 7, 0, 0, 0, 0,
+212, 0, 0, 0, 1, 0, 0, 0,104,152, 18, 7, 0, 0, 0, 0,136,151, 18, 7, 0, 0, 0, 0, 72,146, 18, 7, 0, 0, 0, 0,
+ 40,147, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,104,152, 18, 7, 0, 0, 0, 0,
+212, 0, 0, 0, 1, 0, 0, 0,216,152, 18, 7, 0, 0, 0, 0,248,151, 18, 7, 0, 0, 0, 0,104,145, 18, 7, 0, 0, 0, 0,
+152,147, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,216,152, 18, 7, 0, 0, 0, 0,
+212, 0, 0, 0, 1, 0, 0, 0, 72,153, 18, 7, 0, 0, 0, 0,104,152, 18, 7, 0, 0, 0, 0, 24,144, 18, 7, 0, 0, 0, 0,
+152,147, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 72,153, 18, 7, 0, 0, 0, 0,
+212, 0, 0, 0, 1, 0, 0, 0,184,153, 18, 7, 0, 0, 0, 0,216,152, 18, 7, 0, 0, 0, 0,216,145, 18, 7, 0, 0, 0, 0,
+152,147, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,184,153, 18, 7, 0, 0, 0, 0,
+212, 0, 0, 0, 1, 0, 0, 0, 40,154, 18, 7, 0, 0, 0, 0, 72,153, 18, 7, 0, 0, 0, 0,200,142, 18, 7, 0, 0, 0, 0,
+ 24,144, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 40,154, 18, 7, 0, 0, 0, 0,
+212, 0, 0, 0, 1, 0, 0, 0,152,154, 18, 7, 0, 0, 0, 0,184,153, 18, 7, 0, 0, 0, 0,248,144, 18, 7, 0, 0, 0, 0,
+ 72,146, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,152,154, 18, 7, 0, 0, 0, 0,
+212, 0, 0, 0, 1, 0, 0, 0, 8,155, 18, 7, 0, 0, 0, 0, 40,154, 18, 7, 0, 0, 0, 0,104,145, 18, 7, 0, 0, 0, 0,
+ 40,147, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 8,155, 18, 7, 0, 0, 0, 0,
+212, 0, 0, 0, 1, 0, 0, 0,120,155, 18, 7, 0, 0, 0, 0,152,154, 18, 7, 0, 0, 0, 0,136,144, 18, 7, 0, 0, 0, 0,
+184,146, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,120,155, 18, 7, 0, 0, 0, 0,
+212, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,155, 18, 7, 0, 0, 0, 0,104,145, 18, 7, 0, 0, 0, 0,
+184,146, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,232,155, 18, 7, 0, 0, 0, 0,
+214, 0, 0, 0, 1, 0, 0, 0,184,159, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136,144, 18, 7, 0, 0, 0, 0,
+ 56,143, 18, 7, 0, 0, 0, 0,168,143, 18, 7, 0, 0, 0, 0,248,144, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,240, 4, 0, 0,196, 2, 0, 0,222, 2, 0, 0, 7, 7,241, 4, 27, 0, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 56,189, 18, 7, 0, 0, 0, 0, 56,189, 18, 7, 0, 0, 0, 0,216,156, 18, 7, 0, 0, 0, 0,
+ 72,158, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,216,156, 18, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,
+ 72,158, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,148, 68, 0, 0, 0, 0, 0, 0,208, 65,
+ 0, 0, 0, 0, 0, 32,158, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0,
+ 0, 0,158, 68, 0, 0,200, 65, 0, 0,158, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3,
+ 4, 0, 12, 0, 10, 0,241, 4, 26, 0,241, 4, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,240, 4, 0, 0,196, 2, 0, 0,221, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+241, 4, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 72,158, 18, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,216,156, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0,240,109, 69, 0, 0,128,192, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,255,109, 69, 0, 0, 0,192, 0, 0, 0, 0,112, 7, 0, 0,129, 7, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0,111, 7, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 2, 0, 0, 0, 1, 0, 3, 3,
+ 2, 0, 0, 4, 10, 0,129, 7, 2, 0,112, 7, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,222, 2, 0, 0,222, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,184,159, 18, 7, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,
+168,164, 18, 7, 0, 0, 0, 0,232,155, 18, 7, 0, 0, 0, 0,200,142, 18, 7, 0, 0, 0, 0,216,145, 18, 7, 0, 0, 0, 0,
+152,147, 18, 7, 0, 0, 0, 0, 24,144, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0,
+ 0, 0, 0, 0, 67, 0, 0, 0, 15, 15,241, 4, 68, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+136,163, 18, 7, 0, 0, 0, 0,136,163, 18, 7, 0, 0, 0, 0,168,160, 18, 7, 0, 0, 0, 0, 24,162, 18, 7, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 40, 1, 0, 0,168,160, 18, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 24,162, 18, 7, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,140, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 32,158, 68,
+ 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0,158, 68, 0, 0,200, 65,
+ 0, 0,158, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,241, 4,
+ 26, 0,241, 4, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0,
+ 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,241, 4, 26, 0, 0, 0, 1, 0,
+ 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,105, 4, 0, 0,126, 7, 0, 0, 26, 0, 0, 0,233, 3, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 3,208, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 40, 1, 0, 0, 24,162, 18, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+168,160, 18, 7, 0, 0, 0, 0, 0, 0, 64,192, 0, 0,126, 67, 0, 0, 0, 0, 0, 0, 72, 66,112,189, 17,192,246, 70,125, 67,
+ 0, 0, 0, 0, 0, 0, 72, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0,
+ 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0, 18, 0, 0, 0, 41, 0, 0, 0, 0, 0,128, 63, 0, 0, 72, 66,
+ 0,124,146, 72, 0, 0, 72, 66,205,204,204, 61, 0, 0, 32, 65, 72, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, 4, 8, 0,241, 4,
+ 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0,
+ 26, 0, 0, 0, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,241, 4, 42, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,153,217, 3, 0, 0, 0, 0, 68, 65, 84, 65,112, 3, 0, 0, 40,153,217, 3,
- 0, 0, 0, 0,173, 0, 0, 0, 1, 0, 0, 0, 72,246,172, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 13,128,191, 0, 0,128,191, 0, 0, 0, 0,
- 0, 0, 0, 0, 74,215, 76,190, 0, 0, 0, 0, 68,239,209, 62, 51,177,205,190,184,158, 81, 63, 0, 0, 0, 0, 70,119,105, 63,
-143, 74, 70, 62, 35, 44,185,190, 0, 0, 0, 0,162, 84, 89,188,166, 33,101, 63, 42, 61,228, 62, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 25, 95,192, 0, 0,128, 63, 69,239,209, 62, 70,119,105, 63,160, 84, 89,188, 0, 0, 0, 0, 52,177,205,190,
-142, 74, 70, 62,166, 33,101, 63, 0, 0, 0, 0,185,158, 81, 63, 35, 44,185,190, 43, 61,228, 62, 0, 0, 0, 0,188,173, 54, 64,
-136, 95,161,191,147,231,198, 63, 0, 0,128, 63,185,214, 13, 63,208,249,224,190, 48,180, 81,191,184,158, 81,191,189,188,157, 63,
-140,225, 88, 62, 26, 63,185, 62, 35, 44,185, 62,241,213,146,188,206,156,122, 63,138, 84,228,190, 42, 61,228,190, 0, 0, 0, 0,
- 0, 0, 0, 0,100, 98, 82, 64, 0, 25, 95, 64,121, 92,155, 62,151,198, 44, 63,192,214, 32,188, 0, 0, 40,180,195, 15,188,190,
-132, 75, 53, 62,216,125, 81, 63, 0, 0,192,179,115, 77,100,193, 17,173,201, 64,181,148,248,192,203,247,159,192,233, 74, 87, 65,
-247, 46,190,192, 88,106,234, 64, 45, 8,160, 64, 68,239,209, 62, 51,177,205,190,184,158, 81, 63, 0, 0, 0, 0, 70,119,105, 63,
-143, 74, 70, 62, 35, 44,185,190, 0, 0, 0, 0,162, 84, 89,188,166, 33,101, 63, 42, 61,228, 62, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 25, 95,192, 0, 0,128, 63,185,214, 13, 63,208,249,224,190, 48,180, 81,191,184,158, 81,191,189,188,157, 63,
-140,225, 88, 62, 26, 63,185, 62, 35, 44,185, 62,241,213,146,188,206,156,122, 63,138, 84,228,190, 42, 61,228,190, 0, 0, 0, 0,
- 0, 0, 0, 0,100, 98, 82, 64, 0, 25, 95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65,208, 0, 0, 0,136,163, 18, 7, 0, 0, 0, 0,190, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,201,250, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-248,201,250, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,201,250, 62, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 92, 62, 55, 63, 56,186,224,190,237,203,148,190, 3,236,234,190, 0, 25, 95, 64,
- 0, 25, 95, 64, 0, 0, 0, 0, 0, 0, 0, 0,114,145,245, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 1, 0, 0,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 30, 33, 12, 66, 85,152,137, 66,116, 27,126, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 96, 1, 0, 0,248, 59,217, 3, 0, 0, 0, 0,174, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 51, 51, 51, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65,
-205,204, 76, 62, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0,200,213,217, 3, 0, 0, 0, 0, 0, 0, 0, 0,
+ 31, 0, 0, 0, 1, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,168,164, 18, 7, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,
+152,172, 18, 7, 0, 0, 0, 0,184,159, 18, 7, 0, 0, 0, 0,216,145, 18, 7, 0, 0, 0, 0,184,146, 18, 7, 0, 0, 0, 0,
+104,145, 18, 7, 0, 0, 0, 0,152,147, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0,
+ 69, 0, 0, 0, 91, 1, 0, 0, 8, 8,241, 4, 23, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 88,171, 18, 7, 0, 0, 0, 0, 88,171, 18, 7, 0, 0, 0, 0,152,165, 18, 7, 0, 0, 0, 0,232,169, 18, 7, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 40, 1, 0, 0,152,165, 18, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 8,167, 18, 7, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 26, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 32,158, 68,
+ 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0,158, 68, 0, 0,200, 65,
+ 0, 0,158, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,241, 4,
+ 26, 0,241, 4, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0,
+ 69, 0, 0, 0, 94, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,241, 4, 26, 0, 0, 0, 1, 0,
+ 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 3, 0, 8, 8,128, 0, 0, 0, 12, 66, 0, 0,128, 63,
-205,204,204, 61, 0, 0,250, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 16, 0, 10, 0, 7, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 40, 1, 0, 0, 8,167, 18, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,120,168, 18, 7, 0, 0, 0, 0,
+152,165, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 67, 0, 0,125,195, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 67,
+ 1, 0,125,195, 0, 0, 0, 0,203, 0, 0, 0,220, 0, 0, 0, 0, 0, 0, 0,252, 0, 0, 0, 0, 0, 0, 0,202, 0, 0, 0,
+ 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,202, 0, 0, 0, 0, 0, 0, 0,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 3, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,220, 0,
+253, 0,203, 0,253, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 4, 0, 0,240, 4, 0, 0,
+ 95, 0, 0, 0, 91, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,220, 0,253, 0, 0, 0, 4, 0,
+ 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 78, 0, 0, 8, 1, 0, 0, 24,157,217, 3,
- 0, 0, 0, 0,210, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,117,217, 3, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 82, 86,105,100,101,111, 32, 69,100,105,116,105,110,103, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,168, 59,201, 3, 0, 0, 0, 0,136, 66,201, 3, 0, 0, 0, 0,200,104,216, 3, 0, 0, 0, 0,120,116,216, 3,
- 0, 0, 0, 0, 56, 34,215, 3, 0, 0, 0, 0,184, 38,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,168, 59,201, 3,
- 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 72, 60,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 72, 60,201, 3, 0, 0, 0, 0,211, 0, 0, 0,
- 1, 0, 0, 0,232, 60,201, 3, 0, 0, 0, 0,168, 59,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,222, 2,
- 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,232, 60,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,136, 61,201, 3,
- 0, 0, 0, 0, 72, 60,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4,222, 2, 0, 0, 0, 0, 68, 65, 84, 65,
- 32, 0, 0, 0,136, 61,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 40, 62,201, 3, 0, 0, 0, 0,232, 60,201, 3,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 40, 62,201, 3,
- 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,200, 62,201, 3, 0, 0, 0, 0,136, 61,201, 3, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,195, 2, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,200, 62,201, 3, 0, 0, 0, 0,211, 0, 0, 0,
- 1, 0, 0, 0,104, 63,201, 3, 0, 0, 0, 0, 40, 62,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4,195, 2,
- 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,104, 63,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 8, 64,201, 3,
- 0, 0, 0, 0,200, 62,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 92, 1, 0, 0, 0, 0, 68, 65, 84, 65,
- 32, 0, 0, 0, 8, 64,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,168, 64,201, 3, 0, 0, 0, 0,104, 63,201, 3,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,168, 64,201, 3,
- 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 72, 65,201, 3, 0, 0, 0, 0, 8, 64,201, 3, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 48, 2,195, 2, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 72, 65,201, 3, 0, 0, 0, 0,211, 0, 0, 0,
- 1, 0, 0, 0,232, 65,201, 3, 0, 0, 0, 0,168, 64,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 1,
- 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,232, 65,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,136, 66,201, 3,
- 0, 0, 0, 0, 72, 65,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 2, 92, 1, 0, 0, 0, 0, 68, 65, 84, 65,
- 32, 0, 0, 0,136, 66,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232, 65,201, 3,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 68, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,200,104,216, 3,
- 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,120,105,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 60,201, 3,
- 0, 0, 0, 0,232, 60,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,120,105,216, 3,
- 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 40,106,216, 3, 0, 0, 0, 0,200,104,216, 3, 0, 0, 0, 0, 72, 60,201, 3,
- 0, 0, 0, 0, 40, 62,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 40,106,216, 3,
- 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,216,106,216, 3, 0, 0, 0, 0,120,105,216, 3, 0, 0, 0, 0,232, 60,201, 3,
- 0, 0, 0, 0,200, 62,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,216,106,216, 3,
- 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,136,107,216, 3, 0, 0, 0, 0, 40,106,216, 3, 0, 0, 0, 0, 40, 62,201, 3,
- 0, 0, 0, 0,200, 62,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,136,107,216, 3,
- 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 56,108,216, 3, 0, 0, 0, 0,216,106,216, 3, 0, 0, 0, 0,200, 62,201, 3,
- 0, 0, 0, 0,104, 63,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 56,108,216, 3,
- 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,232,108,216, 3, 0, 0, 0, 0,136,107,216, 3, 0, 0, 0, 0,168, 59,201, 3,
- 0, 0, 0, 0, 8, 64,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,232,108,216, 3,
- 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,152,109,216, 3, 0, 0, 0, 0, 56,108,216, 3, 0, 0, 0, 0, 40, 62,201, 3,
- 0, 0, 0, 0,168, 64,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,152,109,216, 3,
- 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 72,110,216, 3, 0, 0, 0, 0,232,108,216, 3, 0, 0, 0, 0, 8, 64,201, 3,
- 0, 0, 0, 0, 72, 65,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 72,110,216, 3,
- 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,248,110,216, 3, 0, 0, 0, 0,152,109,216, 3, 0, 0, 0, 0, 72, 65,201, 3,
- 0, 0, 0, 0,232, 65,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,248,110,216, 3,
- 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,168,111,216, 3, 0, 0, 0, 0, 72,110,216, 3, 0, 0, 0, 0,168, 64,201, 3,
- 0, 0, 0, 0,232, 65,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,168,111,216, 3,
- 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 88,112,216, 3, 0, 0, 0, 0,248,110,216, 3, 0, 0, 0, 0,104, 63,201, 3,
- 0, 0, 0, 0,136, 66,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 88,112,216, 3,
- 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 8,113,216, 3, 0, 0, 0, 0,168,111,216, 3, 0, 0, 0, 0,136, 61,201, 3,
- 0, 0, 0, 0,136, 66,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 8,113,216, 3,
- 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,184,113,216, 3, 0, 0, 0, 0, 88,112,216, 3, 0, 0, 0, 0, 8, 64,201, 3,
- 0, 0, 0, 0,136, 66,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,184,113,216, 3,
- 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,104,114,216, 3, 0, 0, 0, 0, 8,113,216, 3, 0, 0, 0, 0,168, 59,201, 3,
- 0, 0, 0, 0,136, 61,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,104,114,216, 3,
- 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 24,115,216, 3, 0, 0, 0, 0,184,113,216, 3, 0, 0, 0, 0,200, 62,201, 3,
- 0, 0, 0, 0,168, 64,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 24,115,216, 3,
- 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,200,115,216, 3, 0, 0, 0, 0,104,114,216, 3, 0, 0, 0, 0,104, 63,201, 3,
- 0, 0, 0, 0,232, 65,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,200,115,216, 3,
- 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,120,116,216, 3, 0, 0, 0, 0, 24,115,216, 3, 0, 0, 0, 0, 40, 62,201, 3,
- 0, 0, 0, 0, 72, 65,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,120,116,216, 3,
- 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,115,216, 3, 0, 0, 0, 0,104, 63,201, 3,
- 0, 0, 0, 0, 72, 65,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, 56, 34,215, 3,
- 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 88, 35,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 62,201, 3,
- 0, 0, 0, 0, 72, 60,201, 3, 0, 0, 0, 0,232, 60,201, 3, 0, 0, 0, 0,200, 62,201, 3, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0,196, 2, 0, 0,222, 2, 0, 0, 7, 7,241, 4, 27, 0, 1, 0, 0, 0, 0, 0,
- 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24,202,207, 3, 0, 0, 0, 0, 24,202,207, 3, 0, 0, 0, 0, 56,103,217, 3,
- 0, 0, 0, 0,232,104,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 56,103,217, 3, 0, 0, 0, 0,215, 0, 0, 0,
- 1, 0, 0, 0,232,104,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,148, 68, 0, 0, 0, 0,
- 0, 0,208, 65, 0, 0, 0, 0, 0, 32,158, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0, 0, 0, 0, 0,
- 25, 0, 0, 0, 0, 0,158, 68, 0, 0,200, 65, 0, 0,158, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,241, 4, 26, 0,241, 4, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0,196, 2, 0, 0,221, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,241, 4, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,232,104,217, 3, 0, 0, 0, 0,215, 0, 0, 0,
- 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,103,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,240,109, 69, 0, 0,128,192,
- 0, 0, 0, 0, 0, 0, 0, 0,255,255,109, 69, 0, 0, 0,192, 0, 0, 0, 0,112, 7, 0, 0,129, 7, 0, 0, 18, 0, 0, 0,
- 1, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, 18, 0, 0, 0,
- 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 2, 0, 0, 0,
- 1, 0, 3, 3, 2, 0, 0, 4, 10, 0,129, 7, 2, 0,112, 7, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,222, 2, 0, 0,222, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, 88, 35,215, 3, 0, 0, 0, 0,214, 0, 0, 0,
- 1, 0, 0, 0,120, 36,215, 3, 0, 0, 0, 0, 56, 34,215, 3, 0, 0, 0, 0,168, 59,201, 3, 0, 0, 0, 0, 8, 64,201, 3,
- 0, 0, 0, 0,136, 66,201, 3, 0, 0, 0, 0,136, 61,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-240, 4, 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 15, 15,241, 4, 68, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,200, 96,200, 3, 0, 0, 0, 0,200, 96,200, 3, 0, 0, 0, 0,152,106,217, 3, 0, 0, 0, 0, 72,108,217, 3,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,152,106,217, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 72,108,217, 3,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,140, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0,
- 0, 32,158, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0,158, 68,
- 0, 0,200, 65, 0, 0,158, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0,
- 10, 0,241, 4, 26, 0,241, 4, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-240, 4, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,241, 4, 26, 0,
- 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 40, 1, 0, 0,120,168, 18, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,232,169, 18, 7, 0, 0, 0, 0,
+ 8,167, 18, 7, 0, 0, 0, 0, 0, 0,112,196, 0, 0,112, 68, 0, 0, 7,196, 0, 0, 7, 68, 0, 0,112,196, 0, 0,112, 68,
+ 0, 0, 7,196, 0, 0, 7, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0,128, 59, 70, 0,128, 59, 70,172,197, 39, 55, 0, 80,195, 71, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 4, 0, 0,
+ 91, 1, 0, 0, 91, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 7, 0,
+ 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 72,108,217, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,152,106,217, 3, 0, 0, 0, 0, 0, 0, 64,192, 0, 0,126, 67, 0, 0, 0, 0, 0, 0, 72, 66,112,189, 17,192,
-246, 70,125, 67, 0, 0, 0, 0, 0, 0, 72, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-240, 4, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0, 18, 0, 0, 0, 41, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 72, 66, 0,124,146, 72, 0, 0, 72, 66,205,204,204, 61, 0, 0, 32, 65, 72, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, 4,
- 8, 0,241, 4, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-240, 4, 0, 0, 26, 0, 0, 0, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,241, 4, 42, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 40, 1, 0, 0,232,169, 18, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+120,168, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,122, 67, 0, 0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 0, 0, 0,122, 67,
+ 0, 0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0,252, 0, 0, 0, 18, 0, 0, 0, 20, 4, 0, 0,
+ 0, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 20, 4, 0, 0, 18, 0, 0, 0,252, 0, 0, 0, 0, 0, 32, 65, 0, 0, 0, 63,
+ 0,124,146, 72, 0, 0, 0, 66, 10,215, 35, 60, 0, 0,200, 66,105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 8, 0, 21, 4,
+253, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 4, 0, 0,
+ 95, 0, 0, 0, 91, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 4,253, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65,208, 0, 0, 0,200, 96,200, 3, 0, 0, 0, 0,190, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65,240, 0, 0, 0, 88,171, 18, 7, 0, 0, 0, 0,180, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,120, 36,215, 3, 0, 0, 0, 0,214, 0, 0, 0,
- 1, 0, 0, 0,152, 37,215, 3, 0, 0, 0, 0, 88, 35,215, 3, 0, 0, 0, 0, 8, 64,201, 3, 0, 0, 0, 0, 72, 65,201, 3,
- 0, 0, 0, 0,104, 63,201, 3, 0, 0, 0, 0,136, 66,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-240, 4, 0, 0, 69, 0, 0, 0, 91, 1, 0, 0, 8, 8,241, 4, 23, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,120,150,199, 3, 0, 0, 0, 0,120,150,199, 3, 0, 0, 0, 0,248,109,217, 3, 0, 0, 0, 0,136,160,217, 3,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,248,109,217, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,168,111,217, 3,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 26, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0,
- 0, 32,158, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0,158, 68,
- 0, 0,200, 65, 0, 0,158, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0,
- 10, 0,241, 4, 26, 0,241, 4, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-240, 4, 0, 0, 69, 0, 0, 0, 94, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,241, 4, 26, 0,
- 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 64, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,152,172, 18, 7, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,
+ 72,181, 18, 7, 0, 0, 0, 0,168,164, 18, 7, 0, 0, 0, 0,184,146, 18, 7, 0, 0, 0, 0,136,144, 18, 7, 0, 0, 0, 0,
+ 72,146, 18, 7, 0, 0, 0, 0, 40,147, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 2, 0, 0,
+ 93, 1, 0, 0,194, 2, 0, 0, 2, 2, 48, 2,102, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 72,179, 18, 7, 0, 0, 0, 0, 72,179, 18, 7, 0, 0, 0, 0,136,173, 18, 7, 0, 0, 0, 0,216,177, 18, 7, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 40, 1, 0, 0,136,173, 18, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,248,174, 18, 7, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 89, 68, 0, 0, 0, 0, 0, 0,208, 65,154,216, 65, 55, 0, 0, 12, 68,
+ 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 2, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,192, 11, 68, 0, 0,200, 65,
+ 0,192, 11, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 48, 2,
+ 26, 0, 48, 2, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 2, 0, 0,
+ 93, 1, 0, 0,118, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 2, 26, 0, 0, 0, 1, 0,
+ 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,168,111,217, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,216,158,217, 3,
- 0, 0, 0, 0,248,109,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 67, 0, 0,125,195, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 75, 67, 1, 0,125,195, 0, 0, 0, 0,203, 0, 0, 0,220, 0, 0, 0, 0, 0, 0, 0,252, 0, 0, 0, 0, 0, 0, 0,
-202, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,202, 0, 0, 0, 0, 0, 0, 0,252, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 3, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4,
- 6, 0,220, 0,253, 0,203, 0,253, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 4, 0, 0,
-240, 4, 0, 0, 95, 0, 0, 0, 91, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,220, 0,253, 0,
- 0, 0, 4, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 40, 1, 0, 0,248,174, 18, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,104,176, 18, 7, 0, 0, 0, 0,
+136,173, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 67, 0, 0,112,193, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 67,
+ 0, 0,157,195, 0, 0, 0, 0,200, 0, 0, 0,217, 0, 0, 0, 18, 0, 0, 0, 75, 1, 0, 0, 0, 0, 0, 0,199, 0, 0, 0,
+ 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,199, 0, 0, 0, 18, 0, 0, 0, 75, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 10, 6, 0, 0, 2, 0, 3, 3, 0, 0, 0, 4, 6, 0,217, 0,
+ 76, 1,200, 0, 58, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216, 0, 0, 0,
+119, 1, 0, 0,194, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,217, 0, 76, 1, 0, 0, 2, 0,
+ 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,216,158,217, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,136,160,217, 3,
- 0, 0, 0, 0,168,111,217, 3, 0, 0, 0, 0, 0, 0,112,196, 0, 0,112, 68, 0, 0, 7,196, 0, 0, 7, 68, 0, 0,112,196,
- 0, 0,112, 68, 0, 0, 7,196, 0, 0, 7, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,128, 59, 70, 0,128, 59, 70,172,197, 39, 55, 0, 80,195, 71, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 40, 1, 0, 0,104,176, 18, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,216,177, 18, 7, 0, 0, 0, 0,
+248,174, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 20, 4, 0, 0, 91, 1, 0, 0, 91, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
- 0, 0, 7, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,136,160,217, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,216,158,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,122, 67, 0, 0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 0,
- 0, 0,122, 67, 0, 0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0,252, 0, 0, 0, 18, 0, 0, 0,
- 20, 4, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 20, 4, 0, 0, 18, 0, 0, 0,252, 0, 0, 0, 0, 0, 32, 65,
- 0, 0, 0, 63, 0,124,146, 72, 0, 0, 0, 66, 10,215, 35, 60, 0, 0,200, 66,105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4,
- 8, 0, 21, 4,253, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 20, 4, 0, 0, 95, 0, 0, 0, 91, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 4,253, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 2, 0, 0, 47, 2, 0, 0,
+119, 1, 0, 0,194, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0,
+ 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 40, 1, 0, 0,216,177, 18, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+104,176, 18, 7, 0, 0, 0, 0, 0, 0, 16,193, 0, 0,130, 67, 0, 0,160,192, 0, 0,160, 64, 0, 0, 0, 0, 0, 0,122, 67,
+ 0, 0, 16,193, 0, 0, 32, 65, 0, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 75, 1, 0, 0, 18, 0, 0, 0, 86, 1, 0, 0,
+ 0, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 86, 1, 0, 0, 18, 0, 0, 0, 75, 1, 0, 0,111, 18,131, 58,111, 18,131, 58,
+ 0,124,146, 72, 0, 80, 67, 71, 0, 0, 0, 0, 0, 0, 0, 0,105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 87, 1,
+ 76, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,217, 0, 0, 0, 47, 2, 0, 0,
+119, 1, 0, 0,194, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 1, 76, 1, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65,240, 0, 0, 0,120,150,199, 3, 0, 0, 0, 0,180, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65,240, 0, 0, 0, 72,179, 18, 7, 0, 0, 0, 0,178, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 64, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,152, 37,215, 3, 0, 0, 0, 0,214, 0, 0, 0,
- 1, 0, 0, 0,184, 38,215, 3, 0, 0, 0, 0,120, 36,215, 3, 0, 0, 0, 0, 72, 65,201, 3, 0, 0, 0, 0, 40, 62,201, 3,
- 0, 0, 0, 0,168, 64,201, 3, 0, 0, 0, 0,232, 65,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 47, 2, 0, 0, 93, 1, 0, 0,194, 2, 0, 0, 2, 2, 48, 2,102, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,232,151,199, 3, 0, 0, 0, 0,232,151,199, 3, 0, 0, 0, 0, 56,162,217, 3, 0, 0, 0, 0, 72,167,217, 3,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 56,162,217, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,232,163,217, 3,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 89, 68, 0, 0, 0, 0, 0, 0,208, 65,154,216, 65, 55,
- 0, 0, 12, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 2, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,192, 11, 68,
- 0, 0,200, 65, 0,192, 11, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0,
- 10, 0, 48, 2, 26, 0, 48, 2, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 47, 2, 0, 0, 93, 1, 0, 0,118, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 2, 26, 0,
- 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+136,180, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,112, 0, 0, 0,136,180, 18, 7, 0, 0, 0, 0, 37, 1, 0, 0, 1, 0, 0, 0,
+200,189, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,232,163,217, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,152,165,217, 3,
- 0, 0, 0, 0, 56,162,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 67, 0, 0,112,193, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 72, 67, 0, 0,157,195, 0, 0, 0, 0,200, 0, 0, 0,217, 0, 0, 0, 18, 0, 0, 0, 75, 1, 0, 0, 0, 0, 0, 0,
-199, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,199, 0, 0, 0, 18, 0, 0, 0, 75, 1, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 10, 6, 0, 0, 2, 0, 3, 3, 0, 0, 0, 4,
- 6, 0,217, 0, 76, 1,200, 0, 58, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-216, 0, 0, 0,119, 1, 0, 0,194, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,217, 0, 76, 1,
- 0, 0, 2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, 72,181, 18, 7, 0, 0, 0, 0,
+214, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152,172, 18, 7, 0, 0, 0, 0, 40,147, 18, 7, 0, 0, 0, 0,
+ 72,146, 18, 7, 0, 0, 0, 0,248,144, 18, 7, 0, 0, 0, 0,104,145, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 49, 2, 0, 0,240, 4, 0, 0, 93, 1, 0, 0,194, 2, 0, 0, 8, 8,192, 2,102, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,248,187, 18, 7, 0, 0, 0, 0,248,187, 18, 7, 0, 0, 0, 0, 56,182, 18, 7, 0, 0, 0, 0,
+136,186, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 56,182, 18, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,
+168,183, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,245, 67, 0, 0, 0, 0, 0, 0,208, 65,
+ 0, 0, 0, 0, 0, 0, 48, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191, 2, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0,
+ 0,192, 47, 68, 0, 0,200, 65, 0,192, 47, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3,
+ 4, 0, 12, 0, 10, 0,192, 2, 26, 0,192, 2, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 49, 2, 0, 0,240, 4, 0, 0, 93, 1, 0, 0,118, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+192, 2, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,152,165,217, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 72,167,217, 3,
- 0, 0, 0, 0,232,163,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,168,183, 18, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,
+ 24,185, 18, 7, 0, 0, 0, 0, 56,182, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 2, 0, 0,
- 47, 2, 0, 0,119, 1, 0, 0,194, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
- 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 72,167,217, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,152,165,217, 3, 0, 0, 0, 0, 0, 0, 16,193, 0, 0,130, 67, 0, 0,160,192, 0, 0,160, 64, 0, 0, 0, 0,
- 0, 0,122, 67, 0, 0, 16,193, 0, 0, 32, 65, 0, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 75, 1, 0, 0, 18, 0, 0, 0,
- 86, 1, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 86, 1, 0, 0, 18, 0, 0, 0, 75, 1, 0, 0,111, 18,131, 58,
-111, 18,131, 58, 0,124,146, 72, 0, 80, 67, 71, 0, 0, 0, 0, 0, 0, 0, 0,105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4,
- 0, 0, 87, 1, 76, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,217, 0, 0, 0,
- 47, 2, 0, 0,119, 1, 0, 0,194, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 1, 76, 1,
+240, 4, 0, 0,240, 4, 0, 0,119, 1, 0, 0,194, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 24,185, 18, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,
+136,186, 18, 7, 0, 0, 0, 0,168,183, 18, 7, 0, 0, 0, 0, 0, 0,240,195, 0, 0,240, 67, 0, 0,135,195, 0, 0,135, 67,
+238, 33,143,196,238, 33,143, 68, 0, 0, 7,196, 0, 0, 7, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191, 2, 0, 0, 0, 0, 0, 0, 75, 1, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 59, 70, 0,128, 59, 70,172,197, 39, 55, 0, 80,195, 71, 0, 0, 0, 0, 0, 0, 6, 0,
+ 0, 0, 0, 4, 0, 0,192, 2, 76, 1,192, 2, 76, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 49, 2, 0, 0,240, 4, 0, 0,119, 1, 0, 0,194, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+192, 2, 76, 1, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65,240, 0, 0, 0,232,151,199, 3, 0, 0, 0, 0,178, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,136,186, 18, 7, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 24,185, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,122, 67, 0, 0, 0, 0, 0, 0, 0, 65,
+ 0, 0, 0, 0, 0, 0,122, 67, 0, 0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 75, 1, 0, 0,
+ 18, 0, 0, 0,201, 2, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0,201, 2, 0, 0, 18, 0, 0, 0, 75, 1, 0, 0,
+ 0, 0, 32, 65, 0, 0, 0, 63, 0,124,146, 72, 0, 0, 0, 66, 10,215, 35, 60, 0, 0,200, 66,105, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 8, 0,202, 2, 76, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,240, 0, 0, 0,248,187, 18, 7, 0, 0, 0, 0,180, 0, 0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 24,120,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0,
- 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,112, 0, 0, 0, 24,120,214, 3, 0, 0, 0, 0, 37, 1, 0, 0,
- 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,184, 38,215, 3,
- 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152, 37,215, 3, 0, 0, 0, 0,232, 65,201, 3,
- 0, 0, 0, 0,168, 64,201, 3, 0, 0, 0, 0,200, 62,201, 3, 0, 0, 0, 0,104, 63,201, 3, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 49, 2, 0, 0,240, 4, 0, 0, 93, 1, 0, 0,194, 2, 0, 0, 8, 8,192, 2,102, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,153,199, 3, 0, 0, 0, 0, 88,153,199, 3, 0, 0, 0, 0,248,168,217, 3,
- 0, 0, 0, 0, 8,174,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,248,168,217, 3, 0, 0, 0, 0,215, 0, 0, 0,
- 1, 0, 0, 0,168,170,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,245, 67, 0, 0, 0, 0,
- 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 48, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191, 2, 0, 0, 0, 0, 0, 0,
- 25, 0, 0, 0, 0,192, 47, 68, 0, 0,200, 65, 0,192, 47, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,192, 2, 26, 0,192, 2, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 49, 2, 0, 0,240, 4, 0, 0, 93, 1, 0, 0,118, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,192, 2, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,168,170,217, 3, 0, 0, 0, 0,215, 0, 0, 0,
- 1, 0, 0, 0, 88,172,217, 3, 0, 0, 0, 0,248,168,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 64,
+ 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 0, 0,216, 11, 0, 0,200,189, 18, 7, 0, 0, 0, 0,
+171, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 83, 99,101,110,101, 0,116, 97,103,101, 0, 97,105,110, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,201, 18, 7, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0,120,216, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+184,202, 18, 7, 0, 0, 0, 0,152,203, 18, 7, 0, 0, 0, 0,184,202, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,204, 18, 7, 0, 0, 0, 0, 8,245, 55, 8, 0, 0, 0, 0,
+ 17, 2, 24, 0, 90, 90, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,240, 4, 0, 0,240, 4, 0, 0,119, 1, 0, 0,194, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 0, 0, 0, 68,172, 0, 0,
+ 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,250, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,100, 0, 0, 0,100, 0, 0, 0, 0, 0, 1, 0, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 2,224, 1, 60, 0, 32, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 6, 0, 50, 0,
+141, 0,128, 7, 56, 4, 8, 0, 8, 0, 24, 0, 17, 0, 0, 0, 90, 0, 1, 0, 81, 0, 0, 0, 23, 0, 33, 0, 2, 0, 0, 0,
+ 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 8, 0, 24, 0, 10, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+248,207, 18, 7, 0, 0, 0, 0,248,207, 18, 7, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 1, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 5, 0, 2, 0, 1, 0, 1, 0,
+ 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,116,109,112, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 88,172,217, 3, 0, 0, 0, 0,215, 0, 0, 0,
- 1, 0, 0, 0, 8,174,217, 3, 0, 0, 0, 0,168,170,217, 3, 0, 0, 0, 0, 0, 0,240,195, 0, 0,240, 67, 0, 0,135,195,
- 0, 0,135, 67,238, 33,143,196,238, 33,143, 68, 0, 0, 7,196, 0, 0, 7, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191, 2, 0, 0, 0, 0, 0, 0,
- 75, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 59, 70, 0,128, 59, 70,172,197, 39, 55, 0, 80,195, 71, 0, 0, 0, 0,
- 0, 0, 6, 0, 0, 0, 0, 4, 0, 0,192, 2, 76, 1,192, 2, 76, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 49, 2, 0, 0,240, 4, 0, 0,119, 1, 0, 0,194, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,192, 2, 76, 1, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 8,174,217, 3, 0, 0, 0, 0,215, 0, 0, 0,
- 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,172,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,122, 67, 0, 0, 0, 0,
- 0, 0, 0, 65, 0, 0, 0, 0, 0, 0,122, 67, 0, 0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0,
- 75, 1, 0, 0, 18, 0, 0, 0,201, 2, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0,201, 2, 0, 0, 18, 0, 0, 0,
- 75, 1, 0, 0, 0, 0, 32, 65, 0, 0, 0, 63, 0,124,146, 72, 0, 0, 0, 66, 10,215, 35, 60, 0, 0,200, 66,105, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 8, 0,202, 2, 76, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,240, 0, 0, 0, 88,153,199, 3, 0, 0, 0, 0,180, 0, 0, 0,
- 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 64, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 0, 0,216, 11, 0, 0,168,194,217, 3,
- 0, 0, 0, 0,171, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 83, 99,101,110,101, 0,116, 97,103,101, 0, 97,105,110, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24,173,200, 3,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 24, 51,163, 3, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 40,117,216, 3, 0, 0, 0, 0,136,118,216, 3, 0, 0, 0, 0, 40,117,216, 3, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,207,217, 3, 0, 0, 0, 0,232,141,214, 15,
- 0, 0, 0, 0, 17, 2, 24, 0, 90, 90, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 0, 0, 0,
- 68,172, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,250, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,100, 0, 0, 0,100, 0, 0, 0, 0, 0, 1, 0, 0, 0,128, 63, 0, 0, 0, 63,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 2,224, 1, 60, 0, 32, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
- 6, 0, 50, 0,141, 0,128, 7, 56, 4, 8, 0, 8, 0, 24, 0, 17, 0, 0, 0, 90, 0, 1, 0, 81, 0, 0, 0, 23, 0, 33, 0,
- 2, 0, 0, 0, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 8, 0, 24, 0, 10, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 24,174,200, 3, 0, 0, 0, 0, 24,174,200, 3, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 1, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 5, 0, 2, 0,
- 1, 0, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,116,109,112, 92, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -5391,6 +5866,7 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 5, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -5406,7 +5882,6 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 5, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -5415,474 +5890,461 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,205,204, 76, 63,205,204, 76, 63,
+205,204, 76, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 62, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 6, 0, 16, 0, 0, 0,128, 63, 0, 0,128, 63,173, 2, 95, 0,154,153,217, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 4, 0, 1, 0,180, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 76, 69, 78, 68, 69, 82, 95,
+ 82, 69, 78, 68, 69, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,172, 0, 0, 0, 0,128, 63,
+102,166,171, 67, 0, 0,128, 63, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,133, 15, 7, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 78, 44, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+104, 57,237, 6, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 2,224, 1, 60, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 4, 0, 1, 0,180, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 5, 0,205,204,204, 61,
+154,153,153, 62,205,204, 76, 62,219, 15, 73, 63,102,102,102, 63, 0, 0, 0, 64,154,153, 25, 63, 0, 0, 64, 65,102,102,166, 63,
+ 0, 0, 0, 65, 0, 0,160, 65, 6, 0, 0, 0, 0, 0,192, 64, 0, 0,128, 63, 0, 0, 0, 0,205,204, 28, 65, 0, 0, 0, 0,
+ 32, 0, 0, 0, 32, 0, 1, 0,128, 0, 5, 0,218, 0, 0, 0, 60, 0, 5, 0, 1, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 64,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,195,245, 28,193, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65,128, 0, 0, 0,232,201, 18, 7, 0, 0, 0, 0, 9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
+184,202, 18, 7, 0, 0, 0, 0,143, 0, 0, 0, 1, 0, 0, 0, 40,203, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 82, 2,204, 1,232,225, 18, 7, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
+ 40,203, 18, 7, 0, 0, 0, 0,143, 0, 0, 0, 1, 0, 0, 0,152,203, 18, 7, 0, 0, 0, 0,184,202, 18, 7, 0, 0, 0, 0,
+ 1, 0, 0, 0, 2, 0, 0, 0, 0, 4, 0, 0,255, 2,213, 2, 40,233, 18, 7, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
+152,203, 18, 7, 0, 0, 0, 0,143, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,203, 18, 7, 0, 0, 0, 0,
+ 1, 0, 0, 0, 3, 0, 0, 0, 0, 4, 0, 0,131, 0, 29, 2, 72,219, 18, 7, 0, 0, 0, 0, 68, 65, 84, 65,240, 1, 0, 0,
+ 8,204, 18, 7, 0, 0, 0, 0,167, 0, 0, 0, 1, 0, 0, 0, 72,206, 18, 7, 0, 0, 0, 0,200,206, 18, 7, 0, 0, 0, 0,
+ 72,207, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 1, 0, 0, 0,205,204, 76, 63, 0, 0,180, 66,
+ 9, 0, 1, 0, 0, 0,128, 63,111, 18,131, 58,205,204,204, 61, 0, 0, 1, 0, 32, 0, 32, 0, 32, 0, 1, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 80, 0, 0, 2, 0, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 5, 0, 5, 0,255,255, 50, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 66,
+ 50, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 66, 50, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 66,
+ 50, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 66, 50, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 66,
+ 50, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 66, 50, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 66,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 62, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 10,215, 35, 60,205,204,204, 61, 2, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,250, 0,205,204,204, 61,205,204,204, 61,102,102,166, 63, 0, 0,192, 63, 0, 0,240, 65, 72,225,122, 63,
+205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 67, 2, 0, 3, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 35, 0, 0, 0,
+204,197,121, 63, 0, 0, 0, 63, 35, 0, 0, 0,204,197,121, 63, 0, 0, 0, 63, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 56, 0, 0, 0, 72,206, 18, 7, 0, 0, 0, 0,164, 0, 0, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 1, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 0, 0, 0,200,206, 18, 7, 0, 0, 0, 0,
+164, 0, 0, 0, 1, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,200,255,128, 1, 0, 0, 0,
+ 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 96, 0, 0, 0, 72,207, 18, 7, 0, 0, 0, 0,162, 0, 0, 0, 1, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,255,100,100,128, 1, 0, 0, 0,128, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
+155, 9, 25, 67,190, 23,237, 64, 75, 1,147, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,128, 0, 0, 0,
+248,207, 18, 7, 0, 0, 0, 0,149, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 82,101,110,100,101,114, 76, 97,121,101,114, 0,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,127, 0, 0,
+ 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 65, 0, 0,200, 0, 0, 0,168,210, 18, 7, 0, 0, 0, 0,
+ 22, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 67, 65, 67, 97,109,101,114, 97, 0, 97,109,101,114, 97, 46, 48, 48, 49, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 63,205,204,204, 61, 0, 0,200, 66, 0, 0, 12, 66,161, 14,234, 64,
+ 0, 0, 0, 63, 0, 0, 0, 66, 0, 0,144, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 65, 0, 0, 16, 2, 0, 0,184,211, 18, 7, 0, 0, 0, 0,
+ 36, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 76, 65, 76, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,247,255,239, 65, 0, 0,150, 66,
+154,153, 25, 62, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 24,214, 18, 7, 0, 0, 0, 0, 2, 0, 0, 0, 46, 26,128, 63,
+ 25, 4,240, 65, 0, 0, 52, 66, 0, 0,128, 63, 0, 0, 64, 64,205,204, 76, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 64, 11, 3, 0, 1, 0, 0, 0, 0, 2, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+111, 18,131, 58, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 64, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 8,216, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 64, 1, 0, 0,
+ 24,214, 18, 7, 0, 0, 0, 0,119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 2, 0, 1, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,243, 4, 53,191,242, 4, 53, 63,242, 4, 53,191,243, 4, 53, 63,
+168,215, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,205,204, 76, 63,
-205,204, 76, 63,205,204, 76, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 62, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 16, 0, 0, 0,128, 63, 0, 0,128, 63,173, 2, 95, 0,154,153,217, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 4, 0, 1, 0,180, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 76, 69, 78,
- 68, 69, 82, 95, 82, 69, 78, 68, 69, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,172, 0, 0,
- 0, 0,128, 63,102,166,171, 67, 0, 0,128, 63, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48,209,117, 3,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,149,158, 15, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 88, 87,171, 3, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0,168,215, 18, 7, 0, 0, 0, 0,
+117, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 40, 0, 0, 0, 8,216, 18, 7, 0, 0, 0, 0, 12, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 87, 79, 0, 0, 24, 2, 0, 0,120,216, 18, 7, 0, 0, 0, 0,142, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 79, 87,111,114,108,100, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 2,224, 1, 60, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 4, 0, 1, 0,180, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 5, 0,
-205,204,204, 61,154,153,153, 62,205,204, 76, 62,219, 15, 73, 63,102,102,102, 63, 0, 0, 0, 64,154,153, 25, 63, 0, 0, 64, 65,
-102,102,166, 63, 0, 0, 0, 65, 0, 0,160, 65, 6, 0, 0, 0, 0, 0,192, 64, 0, 0,128, 63, 0, 0, 0, 0,205,204, 28, 65,
- 0, 0, 0, 0, 32, 0, 0, 0, 32, 0, 1, 0,128, 0, 5, 0,218, 0, 0, 0, 60, 0, 5, 0, 1, 0, 5, 0, 0, 0, 0, 0,
- 0, 0, 0, 64, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,195,245, 28,193,
- 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65,128, 0, 0, 0, 24,173,200, 3, 0, 0, 0, 0, 9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+114, 99, 80, 61,114, 99, 80, 61,114, 99, 80, 61,199, 54, 36, 60,199, 54, 36, 60,199, 54, 36, 60, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+205,204, 28, 65, 0, 0, 0, 0, 0, 0, 32, 0,128, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 64,
+ 0, 0,200, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0,
+ 0, 0,112, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65, 0, 0, 0, 0, 0, 0,128, 63,205,204, 76, 61,
+ 0, 0, 5, 0, 0, 0, 0, 0, 10,215,163, 59, 0, 0, 0, 0, 0, 0,128, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 40, 0, 0, 0, 40,117,216, 3, 0, 0, 0, 0,143, 0, 0, 0, 1, 0, 0, 0,216,117,216, 3, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,232, 1, 20, 1,184,219,217, 3, 0, 0, 0, 0, 68, 65, 84, 65,
- 40, 0, 0, 0,216,117,216, 3, 0, 0, 0, 0,143, 0, 0, 0, 1, 0, 0, 0,136,118,216, 3, 0, 0, 0, 0, 40,117,216, 3,
- 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 4, 0, 0,118, 2,238, 1,168,225,217, 3, 0, 0, 0, 0, 68, 65, 84, 65,
- 40, 0, 0, 0,136,118,216, 3, 0, 0, 0, 0,143, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216,117,216, 3,
- 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 4, 0, 0,108, 0, 86, 1,200,213,217, 3, 0, 0, 0, 0, 68, 65, 84, 65,
-232, 1, 0, 0, 8,207,217, 3, 0, 0, 0, 0,167, 0, 0, 0, 1, 0, 0, 0,216,202,207, 3, 0, 0, 0, 0,152,203,207, 3,
- 0, 0, 0, 0,168, 1,211, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 1, 0, 1, 0,205,204, 76, 63,
- 0, 0,180, 66, 9, 0, 1, 0, 0, 0,128, 63,111, 18,131, 58,205,204,204, 61, 0, 0, 1, 0, 32, 0, 32, 0, 32, 0, 1, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,232, 10,219, 3,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 80, 0, 0, 2, 0, 2,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 5, 0, 5, 0,255,255, 50, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 72, 66, 50, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 66, 50, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 72, 66, 50, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 66, 50, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 72, 66, 50, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 66, 50, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 72, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 62, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 10,215, 35, 60,205,204,204, 61,
- 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,250, 0,205,204,204, 61,205,204,204, 61,102,102,166, 63, 0, 0,192, 63, 0, 0,240, 65,
- 72,225,122, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 67, 2, 0, 3, 2, 0, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0,
- 35, 0, 0, 0,204,197,121, 63, 0, 0, 0, 63, 35, 0, 0, 0,204,197,121, 63, 0, 0, 0, 63, 17, 0, 0, 0, 68, 65, 84, 65,
- 56, 0, 0, 0,216,202,207, 3, 0, 0, 0, 0,164, 0, 0, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,255,255,255,128, 1, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 0, 0, 0,152,203,207, 3, 0, 0, 0, 0,164, 0, 0, 0,
- 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,200,255,128, 1, 0, 0, 0, 2, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 96, 0, 0, 0,168, 1,211, 3, 0, 0, 0, 0,162, 0, 0, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0,120, 58,171, 3,
- 0, 0, 0, 0,255,100,100,128, 1, 0, 0, 0,128, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,155, 9, 25, 67,
-190, 23,237, 64, 75, 1,147, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,120, 0, 0, 0, 24,174,200, 3,
- 0, 0, 0, 0,149, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82,101,110,100,
-101,114, 76, 97,121,101,114, 0,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255, 15, 0, 0, 0, 0, 0,255,127, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0,
- 0, 0, 0, 0, 67, 65, 0, 0,200, 0, 0, 0, 24, 98,200, 3, 0, 0, 0, 0, 22, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 65, 67, 97,
-109,101,114, 97, 0, 97,109,101,114, 97, 46, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0,
- 0, 0, 0, 63,205,204,204, 61, 0, 0,200, 66, 0, 0, 12, 66,161, 14,234, 64, 0, 0, 0, 63, 0, 0, 0, 66, 0, 0,144, 65,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 76, 65, 0, 0, 16, 2, 0, 0,120,209,217, 3, 0, 0, 0, 0, 36, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 65, 76, 97,
-109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 32, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,247,255,239, 65, 0, 0,150, 66,154,153, 25, 62, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 8,212,217, 3, 0, 0, 0, 0, 2, 0, 0, 0, 46, 26,128, 63, 25, 4,240, 65, 0, 0, 52, 66, 0, 0,128, 63,
- 0, 0, 64, 64,205,204, 76, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 11, 3, 0, 1, 0, 0, 0, 0, 2, 1, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,111, 18,131, 58, 1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 1, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 64,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+216,218, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,216,218, 18, 7, 0, 0, 0, 0,
+ 12, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 66, 0, 0,112, 5, 0, 0, 72,219, 18, 7, 0, 0, 0, 0,
+129, 0, 0, 0, 1, 0, 0, 0,232,225, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 79, 66, 67, 97,109,101,114, 97, 0, 97,109,101,114, 97, 46, 48, 48, 49, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,119,216, 3,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 64, 1, 0, 0, 8,212,217, 3, 0, 0, 0, 0,119, 1, 0, 0,
- 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 2, 0, 1, 0, 0, 0,128, 67, 0, 0, 0, 0,
- 0, 0,128, 63,243, 4, 53,191,242, 4, 53, 63,242, 4, 53,191,243, 4, 53, 63, 40, 67,201, 3, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168,210, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0,250, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 6, 0, 0, 0,
+ 1, 0, 0, 0,250, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,110,101,239, 64,150, 62,208,192, 78,255,170, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 42,254,141, 63,192, 57, 49, 60, 34,159, 80, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,222,149, 47, 63, 53, 70, 58, 63,222, 56, 49,188, 0, 0, 0, 0, 86,126,162,190,227,251,159, 62,
+ 55, 53,101, 63, 0, 0, 0, 0, 7,165, 39, 63,149, 84, 28,191, 51,247,227, 62, 0, 0, 0, 0,110,101,239, 64,150, 62,208,192,
+ 78,255,170, 64, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,128, 63, 1, 0,128, 63, 1, 0,128, 51, 1, 0, 0,179, 0, 0, 0, 0, 0, 0, 0, 51, 0, 0,128, 63,
+ 1, 0,128, 51, 0, 0, 0, 0, 2, 0, 0,179, 2, 0, 0,167, 1, 0,128, 63, 0, 0, 0, 0, 1, 0, 0, 53, 1, 0, 0, 41,
+ 1, 0,128,168, 0, 0,128, 63,221,149, 47, 63, 86,126,162,190, 8,165, 39, 63, 0, 0, 0, 0, 51, 70, 58, 63,225,251,159, 62,
+149, 84, 28,191, 0, 0, 0, 0,192, 56, 49,188, 55, 53,101, 63, 52,247,227, 62, 0, 0, 0, 0, 90, 38,173,190, 0,222,192,190,
+152, 9, 52,193, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 5, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,100, 0, 0, 0, 0, 0, 0, 0, 56,180,150,201, 0, 0,128, 63,
+187,225, 16, 63, 0, 0,128, 63,205,204,204, 62,237, 54, 32, 63, 0, 0, 0, 0,143,194,117, 61, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 1, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0, 40, 67,201, 3, 0, 0, 0, 0,117, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 56,119,216, 3,
- 0, 0, 0, 0, 12, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 79, 0, 0, 24, 2, 0, 0, 24, 51,163, 3,
- 0, 0, 0, 0,142, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 79, 87,111,114,108,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,114, 99, 80, 61,114, 99, 80, 61,114, 99, 80, 61,
-199, 54, 36, 60,199, 54, 36, 60,199, 54, 36, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,205,204, 28, 65, 0, 0, 0, 0, 0, 0, 32, 0,
-128, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 64, 0, 0,200, 65, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0,112, 65, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 32, 65, 0, 0, 0, 0, 0, 0,128, 63,205,204, 76, 61, 0, 0, 5, 0, 0, 0, 0, 0, 10,215,163, 59,
- 0, 0, 0, 0, 0, 0,128, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,225, 18, 7, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,152, 0, 0, 0,
+ 8,225, 18, 7, 0, 0, 0, 0,132, 0, 0, 0, 1, 0, 0, 0, 0,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,205,204,204, 61,205,204, 76, 62, 10,215,163, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,119,216, 3, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,232,119,216, 3, 0, 0, 0, 0, 12, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 79, 66, 0, 0,112, 5, 0, 0,200,213,217, 3, 0, 0, 0, 0,129, 0, 0, 0, 1, 0, 0, 0,184,219,217, 3,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 66, 67, 97,
-109,101,114, 97, 0, 97,109,101,114, 97, 46, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 79, 66, 0, 0,112, 5, 0, 0,232,225, 18, 7, 0, 0, 0, 0,129, 0, 0, 0, 1, 0, 0, 0,
+ 40,233, 18, 7, 0, 0, 0, 0, 72,219, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 79, 66, 67,117, 98,101, 0,112,104,101,114,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,136, 36, 49, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,250, 0, 0, 0,
+ 10, 0, 0, 0, 10, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 6, 0, 0, 0, 1, 0, 0, 0,250, 0, 0, 0,
+ 10, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 24, 98,200, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,250, 0, 0, 0, 10, 0, 0, 0,
- 10, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 6, 0, 0, 0, 1, 0, 0, 0,250, 0, 0, 0, 10, 0, 0, 0,
- 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,168,231, 18, 7, 0, 0, 0, 0,248,231, 18, 7, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,110,101,239, 64,
-150, 62,208,192, 78,255,170, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 42,254,141, 63,192, 57, 49, 60, 34,159, 80, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,222,149, 47, 63,
- 53, 70, 58, 63,222, 56, 49,188, 0, 0, 0, 0, 86,126,162,190,227,251,159, 62, 55, 53,101, 63, 0, 0, 0, 0, 7,165, 39, 63,
-149, 84, 28,191, 51,247,227, 62, 0, 0, 0, 0,110,101,239, 64,150, 62,208,192, 78,255,170, 64, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 1, 0,128, 63,
- 1, 0,128, 51, 1, 0, 0,179, 0, 0, 0, 0, 0, 0, 0, 51, 0, 0,128, 63, 1, 0,128, 51, 0, 0, 0, 0, 2, 0, 0,179,
- 2, 0, 0,167, 1, 0,128, 63, 0, 0, 0, 0, 1, 0, 0, 53, 1, 0, 0, 41, 1, 0,128,168, 0, 0,128, 63,221,149, 47, 63,
- 86,126,162,190, 8,165, 39, 63, 0, 0, 0, 0, 51, 70, 58, 63,225,251,159, 62,149, 84, 28,191, 0, 0, 0, 0,192, 56, 49,188,
- 55, 53,101, 63, 52,247,227, 62, 0, 0, 0, 0, 90, 38,173,190, 0,222,192,190,152, 9, 52,193, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 5, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0,100, 0, 0, 0, 0, 0, 0, 0, 56,180,150,201, 0, 0,128, 63,187,225, 16, 63, 0, 0,128, 63,205,204,204, 62,
-237, 54, 32, 63, 0, 0, 0, 0,143,194,117, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
- 0, 2, 0, 1, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 68, 0, 0, 0, 7, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0, 0, 0,100, 0, 0, 0, 0, 0, 0, 0, 56,180,150,201, 0, 0,128, 63,169, 19,208, 60, 0, 0,128, 63,
+205,204,204, 62,229,208, 34, 62, 0, 0, 0, 0,143,194,117, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 0, 5, 0, 1, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 40,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 64, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,232, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 75, 49, 8, 0, 0, 0, 0,
+184, 98, 49, 8, 0, 0, 0, 0, 25, 0, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,152, 0, 0, 0,248, 40,215, 3, 0, 0, 0, 0,132, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 8, 0, 0, 0,168,231, 18, 7, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 4, 0, 0, 0,248,231, 18, 7, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,152, 0, 0, 0, 72,232, 18, 7, 0, 0, 0, 0,132, 0, 0, 0,
1, 0, 0, 0, 0,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,205,204,204, 61,
205,204, 76, 62, 10,215,163, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 79, 66, 0, 0,
-112, 5, 0, 0,184,219,217, 3, 0, 0, 0, 0,129, 0, 0, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0,200,213,217, 3,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 66, 67,117, 98,101, 0,112,104,101,114,101,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 79, 66, 0, 0,
+112, 5, 0, 0, 40,233, 18, 7, 0, 0, 0, 0,129, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,225, 18, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 66, 76, 97,109,112, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 4, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,107,205, 15,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136, 48,218, 3,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184,211, 18, 7,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,250, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0, 1, 0, 6, 0, 0, 0, 1, 0, 0, 0,250, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136, 12,217, 3,
- 0, 0, 0, 0,168,182,117, 3, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,154,112,130, 64,183,178,128, 63,112,236,188, 64,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,229,123, 38, 63,
+ 87, 43, 98, 61,229,229,238, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54,236,148,190, 25,134,116, 63,236, 13, 98,189,
+ 0, 0, 0, 0,221,102, 69,191, 57,174, 76,190, 34,194, 26, 63, 0, 0, 0, 0, 37,255, 16, 63,241,161, 95, 62,164,111, 75, 63,
+ 0, 0, 0, 0,154,112,130, 64,183,178,128, 63,112,236,188, 64, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 68, 0, 0, 0, 7, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,100, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 1, 0,128, 50, 0, 0, 0,179,
+ 0, 0, 0, 0, 1, 0,128, 50, 1, 0,128, 63, 1, 0, 0, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0, 0, 0, 1, 0, 0, 39, 1, 0, 0, 52, 1, 0,128, 39, 0, 0,128, 63, 54,236,148,190,221,102, 69,191, 38,255, 16, 63,
+ 0, 0, 0, 0, 24,134,116, 63, 57,174, 76,190,239,161, 95, 62, 0, 0, 0, 0,237, 13, 98,189, 35,194, 26, 63,166,111, 75, 63,
+ 0, 0, 0, 0,209, 19, 13, 63,241, 65,102,190, 10, 10,231,192, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0,
+ 0, 0, 0, 0, 5, 0, 1, 0, 0, 0, 68, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,100, 0, 0, 0,
0, 0, 0, 0, 56,180,150,201, 0, 0,128, 63,169, 19,208, 60, 0, 0,128, 63,205,204,204, 62,229,208, 34, 62, 0, 0, 0, 0,
143,194,117, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 5, 0, 1, 0, 0,128, 63,
0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 64, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 24, 42,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,243,206, 3, 0, 0, 0, 0,136,250,206, 3, 0, 0, 0, 0, 25, 0, 0, 38,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65, 8, 0, 0, 0,136, 12,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65, 4, 0, 0, 0,168,182,117, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65,152, 0, 0, 0, 24, 42,215, 3, 0, 0, 0, 0,132, 0, 0, 0, 1, 0, 0, 0, 0,192, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,205,204,204, 61,205,204, 76, 62, 10,215,163, 60, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 79, 66, 0, 0,112, 5, 0, 0,168,225,217, 3, 0, 0, 0, 0,
-129, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 79, 66, 76, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,232,238, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0,250, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 6, 0, 0, 0,
- 1, 0, 0, 0,250, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,154,112,130, 64,183,178,128, 63,112,236,188, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,229,123, 38, 63, 87, 43, 98, 61,229,229,238, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 54,236,148,190, 25,134,116, 63,236, 13, 98,189, 0, 0, 0, 0,221,102, 69,191, 57,174, 76,190,
- 34,194, 26, 63, 0, 0, 0, 0, 37,255, 16, 63,241,161, 95, 62,164,111, 75, 63, 0, 0, 0, 0,154,112,130, 64,183,178,128, 63,
-112,236,188, 64, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 1, 0,128, 50, 0, 0, 0,179, 0, 0, 0, 0, 1, 0,128, 50, 1, 0,128, 63,
- 1, 0, 0, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 1, 0, 0, 39, 1, 0, 0, 52,
- 1, 0,128, 39, 0, 0,128, 63, 54,236,148,190,221,102, 69,191, 38,255, 16, 63, 0, 0, 0, 0, 24,134,116, 63, 57,174, 76,190,
-239,161, 95, 62, 0, 0, 0, 0,237, 13, 98,189, 35,194, 26, 63,166,111, 75, 63, 0, 0, 0, 0,209, 19, 13, 63,241, 65,102,190,
- 10, 10,231,192, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 5, 0, 1, 0, 0, 0, 68, 0,
- 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,100, 0, 0, 0, 0, 0, 0, 0, 56,180,150,201, 0, 0,128, 63,
-169, 19,208, 60, 0, 0,128, 63,205,204,204, 62,229,208, 34, 62, 0, 0, 0, 0,143,194,117, 61, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 5, 0, 1, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,231,217, 3, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65,152, 0, 0, 0,232,238, 18, 7, 0, 0, 0, 0,132, 0, 0, 0, 1, 0, 0, 0, 0,192, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,205,204,204, 61,205,204, 76, 62, 10,215,163, 60,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,152, 0, 0, 0,
-200,231,217, 3, 0, 0, 0, 0,132, 0, 0, 0, 1, 0, 0, 0, 0,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 77, 65, 0, 0,128, 3, 0, 0,200,239, 18, 7,
+ 0, 0, 0, 0, 39, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 8, 90, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 65, 77, 97,116,101,114,105, 97,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,205,204,204, 61,205,204, 76, 62, 10,215,163, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,205,204, 76, 63,205,204, 76, 63,205,204, 76, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,205,204, 76, 63, 0, 0, 0, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 10,215, 35, 60, 0, 0, 0, 0, 0, 0, 8, 0, 1, 0, 50, 0,205,204, 76, 62, 0, 0,128, 63, 0, 0,128, 63,
+205,204, 76, 62, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 63, 0, 0, 0, 0,
+ 0, 0,160, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 2, 0, 2, 0, 50, 0, 0, 6, 0, 0,128, 63, 0, 0,128, 63,
+ 18, 0, 18, 0, 10,215,163, 59, 10,215,163, 59, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 4, 0, 67, 0, 64, 3, 67, 0, 64, 3,
+ 1, 0, 4, 0, 12, 0, 4, 0, 0, 0, 0, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 2, 0, 0, 0, 77, 65, 0, 0,128, 3, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 39, 0, 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 8, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 77, 65, 77, 97,116,101,114,105, 97,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 1, 0,205,204, 76, 63,205,204, 76, 63,205,204, 76, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,205,204, 76, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 10,215, 35, 60, 0, 0, 0, 0,
- 0, 0, 8, 0, 1, 0, 50, 0,205,204, 76, 62, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 16, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 63, 0, 0, 0, 0, 0, 0,160, 63, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 2, 0, 2, 0, 50, 0, 0, 6, 0, 0,128, 63, 0, 0,128, 63, 18, 0, 18, 0, 10,215,163, 59, 10,215,163, 59,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 4, 0, 67, 0, 64, 3, 67, 0, 64, 3, 1, 0, 4, 0, 12, 0, 4, 0, 0, 0, 0, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 63, 0, 0,128, 64, 0, 0, 0, 63,205,204,204, 61, 0, 0, 0, 63,205,204,204, 61,205,204,204, 61,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63,152, 11,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0,128, 64, 0, 0, 0, 63,205,204,204, 61,
+ 0, 0, 0, 63,205,204,204, 61,205,204,204, 61, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,152,243, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152,120,216, 3, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,111,148, 26, 63,
-111,148, 26, 63,111,148, 26, 63,205,204, 76, 61,205,204,204, 61,102,102,166, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 56, 1, 0, 0,152, 11,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,216, 29,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24,245, 18, 7,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63,111,148, 26, 63,111,148, 26, 63,111,148, 26, 63,205,204, 76, 61,205,204,204, 61,102,102,166, 63,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,152,243, 18, 7, 0, 0, 0, 0, 25, 0, 0, 0,
+ 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216, 5, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 1, 0, 0,
+ 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63,
0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 40, 0, 0, 0,152,120,216, 3, 0, 0, 0, 0,
- 12, 0, 0, 0, 1, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 53, 0, 53, 0,
- 88, 13,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 16, 0, 0, 88, 13,218, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 51, 2, 2, 2, 51,
- 6, 6, 6,153, 6, 6, 6,153, 6, 6, 6,153, 4, 4, 4,102, 3, 3, 3,102, 2, 2, 2, 51, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 51, 8, 8, 8,153, 11, 11, 11,204, 13, 13, 13,255, 12, 12, 12,255,
- 12, 12, 12,255, 11, 11, 11,255, 10, 10, 10,255, 10, 10, 10,255, 9, 9, 9,255, 9, 9, 9,255, 9, 9, 9,255, 4, 4, 4,102,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 3, 3, 3, 51, 10, 10, 10,153, 18, 18, 18,255, 20, 20, 20,255, 22, 22, 22,255, 23, 23, 23,255, 22, 22, 22,255,
- 20, 20, 20,255, 19, 19, 19,255, 16, 16, 16,255, 14, 14, 14,255, 11, 11, 11,255, 10, 10, 10,255, 9, 9, 9,255, 9, 9, 9,255,
- 9, 9, 9,255, 8, 8, 8,204, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 7, 7, 7,102, 19, 19, 19,204, 27, 27, 27,255, 31, 31, 31,255, 32, 32, 32,255, 33, 33, 33,255, 33, 33, 33,255, 31, 31, 31,255,
- 30, 30, 30,255, 27, 27, 27,255, 25, 25, 25,255, 22, 22, 22,255, 19, 19, 19,255, 16, 16, 16,255, 12, 12, 12,255, 10, 10, 10,255,
- 10, 10, 10,255, 10, 10, 10,255, 10, 10, 10,255, 4, 4, 4,102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 13, 13,153,
- 29, 29, 29,255, 37, 37, 37,255, 40, 40, 40,255, 42, 42, 42,255, 42, 42, 42,255, 43, 43, 43,255, 41, 41, 41,255, 40, 40, 40,255,
- 38, 38, 38,255, 36, 36, 36,255, 33, 33, 33,255, 30, 30, 30,255, 27, 27, 27,255, 24, 24, 24,255, 20, 20, 20,255, 16, 16, 16,255,
- 12, 12, 12,255, 10, 10, 10,255, 10, 10, 10,255, 10, 10, 10,255, 7, 7, 7,153, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 13, 13,102, 37, 37, 37,255,
- 44, 44, 44,255, 48, 48, 48,255, 50, 50, 50,255, 51, 51, 51,255, 51, 51, 51,255, 50, 50, 50,255, 49, 49, 49,255, 48, 48, 48,255,
- 45, 45, 45,255, 43, 43, 43,255, 41, 41, 41,255, 37, 37, 37,255, 34, 34, 34,255, 31, 31, 31,255, 28, 28, 28,255, 24, 24, 24,255,
- 20, 20, 20,255, 15, 15, 15,255, 11, 11, 11,255, 10, 10, 10,255, 11, 11, 11,255, 7, 7, 7,153, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 13, 13,102, 41, 41, 41,255, 50, 50, 50,255,
- 54, 54, 54,255, 57, 57, 57,255, 58, 58, 58,255, 59, 59, 59,255, 59, 59, 59,255, 58, 58, 58,255, 57, 57, 57,255, 55, 55, 55,255,
- 53, 53, 53,255, 51, 51, 51,255, 48, 48, 48,255, 45, 45, 45,255, 41, 41, 41,255, 38, 38, 38,255, 35, 35, 35,255, 31, 31, 31,255,
- 27, 27, 27,255, 23, 23, 23,255, 17, 17, 17,255, 12, 12, 12,255, 11, 11, 11,255, 11, 11, 11,255, 5, 5, 5,102, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 36, 36,204, 53, 53, 53,255, 59, 59, 59,255,
- 63, 63, 63,255, 65, 65, 65,255, 66, 66, 66,255, 66, 66, 66,255, 66, 66, 66,255, 65, 65, 65,255, 64, 64, 64,255, 62, 62, 62,255,
- 60, 60, 60,255, 57, 57, 57,255, 54, 54, 54,255, 51, 51, 51,255, 48, 48, 48,255, 44, 44, 44,255, 41, 41, 41,255, 37, 37, 37,255,
- 33, 33, 33,255, 29, 29, 29,255, 24, 24, 24,255, 19, 19, 19,255, 13, 13, 13,255, 11, 11, 11,255, 12, 12, 12,255, 3, 3, 3, 51,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 19, 19,102, 56, 56, 56,255, 64, 64, 64,255, 68, 68, 68,255,
- 71, 71, 71,255, 73, 73, 73,255, 74, 74, 74,255, 74, 74, 74,255, 73, 73, 73,255, 72, 72, 72,255, 71, 71, 71,255, 69, 69, 69,255,
- 67, 67, 67,255, 64, 64, 64,255, 61, 61, 61,255, 58, 58, 58,255, 54, 54, 54,255, 50, 50, 50,255, 47, 47, 47,255, 43, 43, 43,255,
- 39, 39, 39,255, 34, 34, 34,255, 30, 30, 30,255, 25, 25, 25,255, 19, 19, 19,255, 13, 13, 13,255, 12, 12, 12,255, 10, 10, 10,204,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, 54, 54,255, 66, 66, 66,255, 72, 72, 72,255, 77, 77, 77,255,
- 79, 79, 79,255, 81, 81, 81,255, 81, 81, 81,255, 81, 81, 81,255, 80, 80, 80,255, 79, 79, 79,255, 77, 77, 77,255, 75, 75, 75,255,
- 73, 73, 73,255, 70, 70, 70,255, 67, 67, 67,255, 63, 63, 63,255, 60, 60, 60,255, 56, 56, 56,255, 52, 52, 52,255, 49, 49, 49,255,
- 44, 44, 44,255, 40, 40, 40,255, 35, 35, 35,255, 30, 30, 30,255, 24, 24, 24,255, 18, 18, 18,255, 12, 12, 12,255, 12, 12, 12,255,
- 6, 6, 6,102, 0, 0, 0, 0, 0, 0, 0, 0, 22, 22, 22,102, 67, 67, 67,255, 76, 76, 76,255, 81, 81, 81,255, 84, 84, 84,255,
- 87, 87, 87,255, 88, 88, 88,255, 88, 88, 88,255, 88, 88, 88,255, 87, 87, 87,255, 86, 86, 86,255, 84, 84, 84,255, 82, 82, 82,255,
- 79, 79, 79,255, 76, 76, 76,255, 73, 73, 73,255, 69, 69, 69,255, 65, 65, 65,255, 62, 62, 62,255, 58, 58, 58,255, 54, 54, 54,255,
- 49, 49, 49,255, 45, 45, 45,255, 40, 40, 40,255, 35, 35, 35,255, 29, 29, 29,255, 23, 23, 23,255, 16, 16, 16,255, 12, 12, 12,255,
- 12, 12, 12,204, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49,204, 76, 76, 76,255, 84, 84, 84,255, 89, 89, 89,255, 92, 92, 92,255,
- 94, 94, 94,255, 95, 95, 95,255, 95, 95, 95,255, 95, 95, 95,255, 94, 94, 94,255, 93, 93, 93,255, 91, 91, 91,255, 88, 88, 88,255,
- 85, 85, 85,255, 82, 82, 82,255, 79, 79, 79,255, 75, 75, 75,255, 71, 71, 71,255, 67, 67, 67,255, 63, 63, 63,255, 59, 59, 59,255,
- 55, 55, 55,255, 50, 50, 50,255, 45, 45, 45,255, 40, 40, 40,255, 34, 34, 34,255, 28, 28, 28,255, 21, 21, 21,255, 13, 13, 13,255,
- 14, 14, 14,255, 0, 0, 0, 0, 14, 14, 14,102, 70, 70, 70,255, 85, 85, 85,255, 92, 92, 92,255, 97, 97, 97,255,100,100,100,255,
-102,102,102,255,102,102,102,255,103,103,103,255,102,102,102,255,101,101,101,255, 99, 99, 99,255, 97, 97, 97,255, 94, 94, 94,255,
- 91, 91, 91,255, 88, 88, 88,255, 84, 84, 84,255, 81, 81, 81,255, 77, 77, 77,255, 72, 72, 72,255, 68, 68, 68,255, 64, 64, 64,255,
- 59, 59, 59,255, 55, 55, 55,255, 50, 50, 50,255, 44, 44, 44,255, 39, 39, 39,255, 32, 32, 32,255, 25, 25, 25,255, 17, 17, 17,255,
- 13, 13, 13,255, 7, 7, 7,102, 24, 24, 24,102, 80, 80, 80,255, 93, 93, 93,255,100,100,100,255,104,104,104,255,107,107,107,255,
-109,109,109,255,109,109,109,255,109,109,109,255,109,109,109,255,107,107,107,255,106,106,106,255,103,103,103,255,100,100,100,255,
- 97, 97, 97,255, 94, 94, 94,255, 90, 90, 90,255, 86, 86, 86,255, 82, 82, 82,255, 77, 77, 77,255, 73, 73, 73,255, 69, 69, 69,255,
- 64, 64, 64,255, 59, 59, 59,255, 54, 54, 54,255, 49, 49, 49,255, 43, 43, 43,255, 36, 36, 36,255, 29, 29, 29,255, 21, 21, 21,255,
- 14, 14, 14,255, 10, 10, 10,153, 29, 29, 29,102, 89, 89, 89,255,100,100,100,255,107,107,107,255,112,112,112,255,114,114,114,255,
-116,116,116,255,116,116,116,255,116,116,116,255,115,115,115,255,114,114,114,255,112,112,112,255,110,110,110,255,107,107,107,255,
-104,104,104,255,100,100,100,255, 96, 96, 96,255, 92, 92, 92,255, 87, 87, 87,255, 83, 83, 83,255, 78, 78, 78,255, 73, 73, 73,255,
- 68, 68, 68,255, 63, 63, 63,255, 58, 58, 58,255, 52, 52, 52,255, 46, 46, 46,255, 40, 40, 40,255, 33, 33, 33,255, 24, 24, 24,255,
- 17, 17, 17,255, 13, 13, 13,204, 46, 46, 46,153, 95, 95, 95,255,107,107,107,255,114,114,114,255,118,118,118,255,121,121,121,255,
-122,122,122,255,123,123,123,255,123,123,123,255,122,122,122,255,122,122,122,255,120,120,120,255,118,118,118,255,114,114,114,255,
-110,110,110,255,106,106,106,255,101,101,101,255, 97, 97, 97,255, 92, 92, 92,255, 87, 87, 87,255, 83, 83, 83,255, 78, 78, 78,255,
- 73, 73, 73,255, 68, 68, 68,255, 62, 62, 62,255, 56, 56, 56,255, 50, 50, 50,255, 44, 44, 44,255, 36, 36, 36,255, 28, 28, 28,255,
- 19, 19, 19,255, 12, 12, 12,204, 47, 47, 47,153,101,101,101,255,113,113,113,255,120,120,120,255,125,125,125,255,127,127,127,255,
-129,129,129,255,130,130,130,255,130,130,130,255,131,131,131,255,131,131,131,255,131,131,131,255,129,129,129,255,125,125,125,255,
-120,120,120,255,113,113,113,255,108,108,108,255,103,103,103,255, 97, 97, 97,255, 92, 92, 92,255, 87, 87, 87,255, 82, 82, 82,255,
- 77, 77, 77,255, 72, 72, 72,255, 66, 66, 66,255, 60, 60, 60,255, 54, 54, 54,255, 47, 47, 47,255, 39, 39, 39,255, 31, 31, 31,255,
- 22, 22, 22,255, 12, 12, 12,204, 48, 48, 48,153,106,106,106,255,118,118,118,255,126,126,126,255,131,131,131,255,134,134,134,255,
-135,135,135,255,137,137,137,255,138,138,138,255,142,142,142,255,147,147,147,255,149,149,149,255,148,148,148,255,142,142,142,255,
-133,133,133,255,124,124,124,255,115,115,115,255,108,108,108,255,102,102,102,255, 97, 97, 97,255, 92, 92, 92,255, 87, 87, 87,255,
- 81, 81, 81,255, 75, 75, 75,255, 69, 69, 69,255, 63, 63, 63,255, 57, 57, 57,255, 49, 49, 49,255, 42, 42, 42,255, 33, 33, 33,255,
- 24, 24, 24,255, 9, 9, 9,153, 32, 32, 32,102,109,109,109,255,123,123,123,255,131,131,131,255,136,136,136,255,140,140,140,255,
-142,142,142,255,144,144,144,255,148,148,148,255,156,156,156,255,168,168,168,255,176,176,176,255,177,177,177,255,168,168,168,255,
-153,153,153,255,137,137,137,255,124,124,124,255,114,114,114,255,107,107,107,255,101,101,101,255, 96, 96, 96,255, 90, 90, 90,255,
- 85, 85, 85,255, 79, 79, 79,255, 72, 72, 72,255, 66, 66, 66,255, 59, 59, 59,255, 52, 52, 52,255, 44, 44, 44,255, 35, 35, 35,255,
- 26, 26, 26,255, 10, 10, 10,153, 17, 17, 17, 51,110,110,110,255,127,127,127,255,136,136,136,255,142,142,142,255,145,145,145,255,
-148,148,148,255,151,151,151,255,159,159,159,255,174,174,174,255,195,195,195,255,212,212,212,255,216,216,216,255,204,204,204,255,
-179,179,179,255,154,154,154,255,135,135,135,255,121,121,121,255,112,112,112,255,106,106,106,255, 99, 99, 99,255, 94, 94, 94,255,
- 88, 88, 88,255, 82, 82, 82,255, 76, 76, 76,255, 69, 69, 69,255, 62, 62, 62,255, 54, 54, 54,255, 46, 46, 46,255, 37, 37, 37,255,
- 26, 26, 26,255, 6, 6, 6,102, 0, 0, 0, 0,107,107,107,255,130,130,130,255,140,140,140,255,146,146,146,255,150,150,150,255,
-153,153,153,255,158,158,158,255,169,169,169,255,191,191,191,255,219,219,219,255,246,246,246,255,254,254,254,255,237,237,237,255,
-204,204,204,255,170,170,170,255,145,145,145,255,127,127,127,255,117,117,117,255,110,110,110,255,103,103,103,255, 97, 97, 97,255,
- 91, 91, 91,255, 85, 85, 85,255, 78, 78, 78,255, 71, 71, 71,255, 64, 64, 64,255, 55, 55, 55,255, 47, 47, 47,255, 37, 37, 37,255,
- 25, 25, 25,255, 3, 3, 3, 51, 0, 0, 0, 0, 65, 65, 65,153,129,129,129,255,142,142,142,255,149,149,149,255,154,154,154,255,
-158,158,158,255,163,163,163,255,176,176,176,255,199,199,199,255,232,232,232,255,255,255,255,255,255,255,255,255,255,255,255,255,
-220,220,220,255,181,181,181,255,151,151,151,255,132,132,132,255,121,121,121,255,113,113,113,255,106,106,106,255,100,100,100,255,
- 94, 94, 94,255, 87, 87, 87,255, 80, 80, 80,255, 73, 73, 73,255, 65, 65, 65,255, 57, 57, 57,255, 48, 48, 48,255, 38, 38, 38,255,
- 16, 16, 16,153, 0, 0, 0, 0, 0, 0, 0, 0, 21, 21, 21, 51,127,127,127,255,143,143,143,255,152,152,152,255,157,157,157,255,
-161,161,161,255,165,165,165,255,177,177,177,255,198,198,198,255,227,227,227,255,253,253,253,255,255,255,255,255,250,250,250,255,
-217,217,217,255,181,181,181,255,153,153,153,255,135,135,135,255,124,124,124,255,117,117,117,255,110,110,110,255,103,103,103,255,
- 96, 96, 96,255, 89, 89, 89,255, 82, 82, 82,255, 74, 74, 74,255, 66, 66, 66,255, 57, 57, 57,255, 48, 48, 48,255, 35, 35, 35,255,
- 10, 10, 10,153, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 93, 93,204,141,141,141,255,153,153,153,255,159,159,159,255,
-163,163,163,255,167,167,167,255,174,174,174,255,188,188,188,255,209,209,209,255,228,228,228,255,234,234,234,255,224,224,224,255,
-200,200,200,255,173,173,173,255,151,151,151,255,136,136,136,255,127,127,127,255,119,119,119,255,112,112,112,255,105,105,105,255,
- 98, 98, 98,255, 90, 90, 90,255, 83, 83, 83,255, 75, 75, 75,255, 66, 66, 66,255, 57, 57, 57,255, 46, 46, 46,255, 24, 24, 24,204,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 20, 20, 51,134,134,134,255,151,151,151,255,160,160,160,255,
-164,164,164,255,167,167,167,255,171,171,171,255,178,178,178,255,189,189,189,255,200,200,200,255,202,202,202,255,195,195,195,255,
-180,180,180,255,163,163,163,255,148,148,148,255,137,137,137,255,129,129,129,255,121,121,121,255,114,114,114,255,107,107,107,255,
- 99, 99, 99,255, 91, 91, 91,255, 83, 83, 83,255, 74, 74, 74,255, 65, 65, 65,255, 55, 55, 55,255, 41, 41, 41,255, 7, 7, 7, 51,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49,102,145,145,145,255,157,157,157,255,
-164,164,164,255,167,167,167,255,170,170,170,255,172,172,172,255,176,176,176,255,180,180,180,255,179,179,179,255,174,174,174,255,
-165,165,165,255,155,155,155,255,145,145,145,255,137,137,137,255,130,130,130,255,122,122,122,255,115,115,115,255,107,107,107,255,
- 99, 99, 99,255, 91, 91, 91,255, 82, 82, 82,255, 73, 73, 73,255, 63, 63, 63,255, 50, 50, 50,255, 22, 22, 22,153, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 78, 78, 78,153,149,149,149,255,
-160,160,160,255,166,166,166,255,168,168,168,255,169,169,169,255,170,170,170,255,169,169,169,255,167,167,167,255,164,164,164,255,
-158,158,158,255,151,151,151,255,144,144,144,255,137,137,137,255,130,130,130,255,123,123,123,255,115,115,115,255,106,106,106,255,
- 98, 98, 98,255, 89, 89, 89,255, 80, 80, 80,255, 70, 70, 70,255, 58, 58, 58,255, 27, 27, 27,153, 3, 3, 3, 51, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 80, 80,153,
-150,150,150,255,160,160,160,255,165,165,165,255,167,167,167,255,167,167,167,255,166,166,166,255,163,163,163,255,160,160,160,255,
-155,155,155,255,149,149,149,255,143,143,143,255,137,137,137,255,129,129,129,255,121,121,121,255,113,113,113,255,105,105,105,255,
- 96, 96, 96,255, 86, 86, 86,255, 76, 76, 76,255, 63, 63, 63,255, 38, 38, 38,204, 7, 7, 7, 51, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 78, 78, 78,153,147,147,147,255,157,157,157,255,161,161,161,255,163,163,163,255,162,162,162,255,160,160,160,255,157,157,157,255,
-152,152,152,255,147,147,147,255,141,141,141,255,135,135,135,255,127,127,127,255,119,119,119,255,110,110,110,255,101,101,101,255,
- 91, 91, 91,255, 80, 80, 80,255, 66, 66, 66,255, 32, 32, 32,153, 7, 7, 7, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,134,134,134,255,148,148,148,255,154,154,154,255,155,155,155,255,154,154,154,255,152,152,152,255,
-147,147,147,255,142,142,142,255,136,136,136,255,130,130,130,255,122,122,122,255,114,114,114,255,104,104,104,255, 93, 93, 93,255,
- 81, 81, 81,255, 54, 54, 54,204, 22, 22, 22,102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73, 73, 73,153,103,103,103,204,137,137,137,255,140,140,140,255,140,140,140,255,
-137,137,137,255,133,133,133,255,127,127,127,255,120,120,120,255,113,113,113,255,102,102,102,255, 91, 91, 91,255, 64, 64, 64,204,
- 28, 28, 28,102, 6, 6, 6, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 46, 46,102, 72, 72, 72,153,
- 72, 72, 72,153, 92, 92, 92,204, 88, 88, 88,204, 81, 81, 81,204, 54, 54, 54,153, 35, 35, 35,102, 16, 16, 16, 51, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 84, 69, 0, 0,168, 1, 0, 0,216, 29,218, 3, 0, 0, 0, 0, 33, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65,
+ 40, 0, 0, 0, 24,245, 18, 7, 0, 0, 0, 0, 12, 0, 0, 0, 1, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0, 1, 0, 53, 0, 53, 0,136,245, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 0, 16, 0, 0,136,245, 18, 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2, 2, 2, 51, 2, 2, 2, 51, 6, 6, 6,153, 6, 6, 6,153, 6, 6, 6,153, 4, 4, 4,102, 3, 3, 3,102,
+ 2, 2, 2, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 51, 8, 8, 8,153,
+ 11, 11, 11,204, 13, 13, 13,255, 12, 12, 12,255, 12, 12, 12,255, 11, 11, 11,255, 10, 10, 10,255, 10, 10, 10,255, 9, 9, 9,255,
+ 9, 9, 9,255, 9, 9, 9,255, 4, 4, 4,102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 51, 10, 10, 10,153, 18, 18, 18,255, 20, 20, 20,255,
+ 22, 22, 22,255, 23, 23, 23,255, 22, 22, 22,255, 20, 20, 20,255, 19, 19, 19,255, 16, 16, 16,255, 14, 14, 14,255, 11, 11, 11,255,
+ 10, 10, 10,255, 9, 9, 9,255, 9, 9, 9,255, 9, 9, 9,255, 8, 8, 8,204, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7,102, 19, 19, 19,204, 27, 27, 27,255, 31, 31, 31,255, 32, 32, 32,255,
+ 33, 33, 33,255, 33, 33, 33,255, 31, 31, 31,255, 30, 30, 30,255, 27, 27, 27,255, 25, 25, 25,255, 22, 22, 22,255, 19, 19, 19,255,
+ 16, 16, 16,255, 12, 12, 12,255, 10, 10, 10,255, 10, 10, 10,255, 10, 10, 10,255, 10, 10, 10,255, 4, 4, 4,102, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 13, 13, 13,153, 29, 29, 29,255, 37, 37, 37,255, 40, 40, 40,255, 42, 42, 42,255, 42, 42, 42,255,
+ 43, 43, 43,255, 41, 41, 41,255, 40, 40, 40,255, 38, 38, 38,255, 36, 36, 36,255, 33, 33, 33,255, 30, 30, 30,255, 27, 27, 27,255,
+ 24, 24, 24,255, 20, 20, 20,255, 16, 16, 16,255, 12, 12, 12,255, 10, 10, 10,255, 10, 10, 10,255, 10, 10, 10,255, 7, 7, 7,153,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 13, 13, 13,102, 37, 37, 37,255, 44, 44, 44,255, 48, 48, 48,255, 50, 50, 50,255, 51, 51, 51,255, 51, 51, 51,255,
+ 50, 50, 50,255, 49, 49, 49,255, 48, 48, 48,255, 45, 45, 45,255, 43, 43, 43,255, 41, 41, 41,255, 37, 37, 37,255, 34, 34, 34,255,
+ 31, 31, 31,255, 28, 28, 28,255, 24, 24, 24,255, 20, 20, 20,255, 15, 15, 15,255, 11, 11, 11,255, 10, 10, 10,255, 11, 11, 11,255,
+ 7, 7, 7,153, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 13, 13, 13,102, 41, 41, 41,255, 50, 50, 50,255, 54, 54, 54,255, 57, 57, 57,255, 58, 58, 58,255, 59, 59, 59,255, 59, 59, 59,255,
+ 58, 58, 58,255, 57, 57, 57,255, 55, 55, 55,255, 53, 53, 53,255, 51, 51, 51,255, 48, 48, 48,255, 45, 45, 45,255, 41, 41, 41,255,
+ 38, 38, 38,255, 35, 35, 35,255, 31, 31, 31,255, 27, 27, 27,255, 23, 23, 23,255, 17, 17, 17,255, 12, 12, 12,255, 11, 11, 11,255,
+ 11, 11, 11,255, 5, 5, 5,102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 36, 36, 36,204, 53, 53, 53,255, 59, 59, 59,255, 63, 63, 63,255, 65, 65, 65,255, 66, 66, 66,255, 66, 66, 66,255, 66, 66, 66,255,
+ 65, 65, 65,255, 64, 64, 64,255, 62, 62, 62,255, 60, 60, 60,255, 57, 57, 57,255, 54, 54, 54,255, 51, 51, 51,255, 48, 48, 48,255,
+ 44, 44, 44,255, 41, 41, 41,255, 37, 37, 37,255, 33, 33, 33,255, 29, 29, 29,255, 24, 24, 24,255, 19, 19, 19,255, 13, 13, 13,255,
+ 11, 11, 11,255, 12, 12, 12,255, 3, 3, 3, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 19, 19,102,
+ 56, 56, 56,255, 64, 64, 64,255, 68, 68, 68,255, 71, 71, 71,255, 73, 73, 73,255, 74, 74, 74,255, 74, 74, 74,255, 73, 73, 73,255,
+ 72, 72, 72,255, 71, 71, 71,255, 69, 69, 69,255, 67, 67, 67,255, 64, 64, 64,255, 61, 61, 61,255, 58, 58, 58,255, 54, 54, 54,255,
+ 50, 50, 50,255, 47, 47, 47,255, 43, 43, 43,255, 39, 39, 39,255, 34, 34, 34,255, 30, 30, 30,255, 25, 25, 25,255, 19, 19, 19,255,
+ 13, 13, 13,255, 12, 12, 12,255, 10, 10, 10,204, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, 54, 54,255,
+ 66, 66, 66,255, 72, 72, 72,255, 77, 77, 77,255, 79, 79, 79,255, 81, 81, 81,255, 81, 81, 81,255, 81, 81, 81,255, 80, 80, 80,255,
+ 79, 79, 79,255, 77, 77, 77,255, 75, 75, 75,255, 73, 73, 73,255, 70, 70, 70,255, 67, 67, 67,255, 63, 63, 63,255, 60, 60, 60,255,
+ 56, 56, 56,255, 52, 52, 52,255, 49, 49, 49,255, 44, 44, 44,255, 40, 40, 40,255, 35, 35, 35,255, 30, 30, 30,255, 24, 24, 24,255,
+ 18, 18, 18,255, 12, 12, 12,255, 12, 12, 12,255, 6, 6, 6,102, 0, 0, 0, 0, 0, 0, 0, 0, 22, 22, 22,102, 67, 67, 67,255,
+ 76, 76, 76,255, 81, 81, 81,255, 84, 84, 84,255, 87, 87, 87,255, 88, 88, 88,255, 88, 88, 88,255, 88, 88, 88,255, 87, 87, 87,255,
+ 86, 86, 86,255, 84, 84, 84,255, 82, 82, 82,255, 79, 79, 79,255, 76, 76, 76,255, 73, 73, 73,255, 69, 69, 69,255, 65, 65, 65,255,
+ 62, 62, 62,255, 58, 58, 58,255, 54, 54, 54,255, 49, 49, 49,255, 45, 45, 45,255, 40, 40, 40,255, 35, 35, 35,255, 29, 29, 29,255,
+ 23, 23, 23,255, 16, 16, 16,255, 12, 12, 12,255, 12, 12, 12,204, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49,204, 76, 76, 76,255,
+ 84, 84, 84,255, 89, 89, 89,255, 92, 92, 92,255, 94, 94, 94,255, 95, 95, 95,255, 95, 95, 95,255, 95, 95, 95,255, 94, 94, 94,255,
+ 93, 93, 93,255, 91, 91, 91,255, 88, 88, 88,255, 85, 85, 85,255, 82, 82, 82,255, 79, 79, 79,255, 75, 75, 75,255, 71, 71, 71,255,
+ 67, 67, 67,255, 63, 63, 63,255, 59, 59, 59,255, 55, 55, 55,255, 50, 50, 50,255, 45, 45, 45,255, 40, 40, 40,255, 34, 34, 34,255,
+ 28, 28, 28,255, 21, 21, 21,255, 13, 13, 13,255, 14, 14, 14,255, 0, 0, 0, 0, 14, 14, 14,102, 70, 70, 70,255, 85, 85, 85,255,
+ 92, 92, 92,255, 97, 97, 97,255,100,100,100,255,102,102,102,255,102,102,102,255,103,103,103,255,102,102,102,255,101,101,101,255,
+ 99, 99, 99,255, 97, 97, 97,255, 94, 94, 94,255, 91, 91, 91,255, 88, 88, 88,255, 84, 84, 84,255, 81, 81, 81,255, 77, 77, 77,255,
+ 72, 72, 72,255, 68, 68, 68,255, 64, 64, 64,255, 59, 59, 59,255, 55, 55, 55,255, 50, 50, 50,255, 44, 44, 44,255, 39, 39, 39,255,
+ 32, 32, 32,255, 25, 25, 25,255, 17, 17, 17,255, 13, 13, 13,255, 7, 7, 7,102, 24, 24, 24,102, 80, 80, 80,255, 93, 93, 93,255,
+100,100,100,255,104,104,104,255,107,107,107,255,109,109,109,255,109,109,109,255,109,109,109,255,109,109,109,255,107,107,107,255,
+106,106,106,255,103,103,103,255,100,100,100,255, 97, 97, 97,255, 94, 94, 94,255, 90, 90, 90,255, 86, 86, 86,255, 82, 82, 82,255,
+ 77, 77, 77,255, 73, 73, 73,255, 69, 69, 69,255, 64, 64, 64,255, 59, 59, 59,255, 54, 54, 54,255, 49, 49, 49,255, 43, 43, 43,255,
+ 36, 36, 36,255, 29, 29, 29,255, 21, 21, 21,255, 14, 14, 14,255, 10, 10, 10,153, 29, 29, 29,102, 89, 89, 89,255,100,100,100,255,
+107,107,107,255,112,112,112,255,114,114,114,255,116,116,116,255,116,116,116,255,116,116,116,255,115,115,115,255,114,114,114,255,
+112,112,112,255,110,110,110,255,107,107,107,255,104,104,104,255,100,100,100,255, 96, 96, 96,255, 92, 92, 92,255, 87, 87, 87,255,
+ 83, 83, 83,255, 78, 78, 78,255, 73, 73, 73,255, 68, 68, 68,255, 63, 63, 63,255, 58, 58, 58,255, 52, 52, 52,255, 46, 46, 46,255,
+ 40, 40, 40,255, 33, 33, 33,255, 24, 24, 24,255, 17, 17, 17,255, 13, 13, 13,204, 46, 46, 46,153, 95, 95, 95,255,107,107,107,255,
+114,114,114,255,118,118,118,255,121,121,121,255,122,122,122,255,123,123,123,255,123,123,123,255,122,122,122,255,122,122,122,255,
+120,120,120,255,118,118,118,255,114,114,114,255,110,110,110,255,106,106,106,255,101,101,101,255, 97, 97, 97,255, 92, 92, 92,255,
+ 87, 87, 87,255, 83, 83, 83,255, 78, 78, 78,255, 73, 73, 73,255, 68, 68, 68,255, 62, 62, 62,255, 56, 56, 56,255, 50, 50, 50,255,
+ 44, 44, 44,255, 36, 36, 36,255, 28, 28, 28,255, 19, 19, 19,255, 12, 12, 12,204, 47, 47, 47,153,101,101,101,255,113,113,113,255,
+120,120,120,255,125,125,125,255,127,127,127,255,129,129,129,255,130,130,130,255,130,130,130,255,131,131,131,255,131,131,131,255,
+131,131,131,255,129,129,129,255,125,125,125,255,120,120,120,255,113,113,113,255,108,108,108,255,103,103,103,255, 97, 97, 97,255,
+ 92, 92, 92,255, 87, 87, 87,255, 82, 82, 82,255, 77, 77, 77,255, 72, 72, 72,255, 66, 66, 66,255, 60, 60, 60,255, 54, 54, 54,255,
+ 47, 47, 47,255, 39, 39, 39,255, 31, 31, 31,255, 22, 22, 22,255, 12, 12, 12,204, 48, 48, 48,153,106,106,106,255,118,118,118,255,
+126,126,126,255,131,131,131,255,134,134,134,255,135,135,135,255,137,137,137,255,138,138,138,255,142,142,142,255,147,147,147,255,
+149,149,149,255,148,148,148,255,142,142,142,255,133,133,133,255,124,124,124,255,115,115,115,255,108,108,108,255,102,102,102,255,
+ 97, 97, 97,255, 92, 92, 92,255, 87, 87, 87,255, 81, 81, 81,255, 75, 75, 75,255, 69, 69, 69,255, 63, 63, 63,255, 57, 57, 57,255,
+ 49, 49, 49,255, 42, 42, 42,255, 33, 33, 33,255, 24, 24, 24,255, 9, 9, 9,153, 32, 32, 32,102,109,109,109,255,123,123,123,255,
+131,131,131,255,136,136,136,255,140,140,140,255,142,142,142,255,144,144,144,255,148,148,148,255,156,156,156,255,168,168,168,255,
+176,176,176,255,177,177,177,255,168,168,168,255,153,153,153,255,137,137,137,255,124,124,124,255,114,114,114,255,107,107,107,255,
+101,101,101,255, 96, 96, 96,255, 90, 90, 90,255, 85, 85, 85,255, 79, 79, 79,255, 72, 72, 72,255, 66, 66, 66,255, 59, 59, 59,255,
+ 52, 52, 52,255, 44, 44, 44,255, 35, 35, 35,255, 26, 26, 26,255, 10, 10, 10,153, 17, 17, 17, 51,110,110,110,255,127,127,127,255,
+136,136,136,255,142,142,142,255,145,145,145,255,148,148,148,255,151,151,151,255,159,159,159,255,174,174,174,255,195,195,195,255,
+212,212,212,255,216,216,216,255,204,204,204,255,179,179,179,255,154,154,154,255,135,135,135,255,121,121,121,255,112,112,112,255,
+106,106,106,255, 99, 99, 99,255, 94, 94, 94,255, 88, 88, 88,255, 82, 82, 82,255, 76, 76, 76,255, 69, 69, 69,255, 62, 62, 62,255,
+ 54, 54, 54,255, 46, 46, 46,255, 37, 37, 37,255, 26, 26, 26,255, 6, 6, 6,102, 0, 0, 0, 0,107,107,107,255,130,130,130,255,
+140,140,140,255,146,146,146,255,150,150,150,255,153,153,153,255,158,158,158,255,169,169,169,255,191,191,191,255,219,219,219,255,
+246,246,246,255,254,254,254,255,237,237,237,255,204,204,204,255,170,170,170,255,145,145,145,255,127,127,127,255,117,117,117,255,
+110,110,110,255,103,103,103,255, 97, 97, 97,255, 91, 91, 91,255, 85, 85, 85,255, 78, 78, 78,255, 71, 71, 71,255, 64, 64, 64,255,
+ 55, 55, 55,255, 47, 47, 47,255, 37, 37, 37,255, 25, 25, 25,255, 3, 3, 3, 51, 0, 0, 0, 0, 65, 65, 65,153,129,129,129,255,
+142,142,142,255,149,149,149,255,154,154,154,255,158,158,158,255,163,163,163,255,176,176,176,255,199,199,199,255,232,232,232,255,
+255,255,255,255,255,255,255,255,255,255,255,255,220,220,220,255,181,181,181,255,151,151,151,255,132,132,132,255,121,121,121,255,
+113,113,113,255,106,106,106,255,100,100,100,255, 94, 94, 94,255, 87, 87, 87,255, 80, 80, 80,255, 73, 73, 73,255, 65, 65, 65,255,
+ 57, 57, 57,255, 48, 48, 48,255, 38, 38, 38,255, 16, 16, 16,153, 0, 0, 0, 0, 0, 0, 0, 0, 21, 21, 21, 51,127,127,127,255,
+143,143,143,255,152,152,152,255,157,157,157,255,161,161,161,255,165,165,165,255,177,177,177,255,198,198,198,255,227,227,227,255,
+253,253,253,255,255,255,255,255,250,250,250,255,217,217,217,255,181,181,181,255,153,153,153,255,135,135,135,255,124,124,124,255,
+117,117,117,255,110,110,110,255,103,103,103,255, 96, 96, 96,255, 89, 89, 89,255, 82, 82, 82,255, 74, 74, 74,255, 66, 66, 66,255,
+ 57, 57, 57,255, 48, 48, 48,255, 35, 35, 35,255, 10, 10, 10,153, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 93, 93,204,
+141,141,141,255,153,153,153,255,159,159,159,255,163,163,163,255,167,167,167,255,174,174,174,255,188,188,188,255,209,209,209,255,
+228,228,228,255,234,234,234,255,224,224,224,255,200,200,200,255,173,173,173,255,151,151,151,255,136,136,136,255,127,127,127,255,
+119,119,119,255,112,112,112,255,105,105,105,255, 98, 98, 98,255, 90, 90, 90,255, 83, 83, 83,255, 75, 75, 75,255, 66, 66, 66,255,
+ 57, 57, 57,255, 46, 46, 46,255, 24, 24, 24,204, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 20, 20, 51,
+134,134,134,255,151,151,151,255,160,160,160,255,164,164,164,255,167,167,167,255,171,171,171,255,178,178,178,255,189,189,189,255,
+200,200,200,255,202,202,202,255,195,195,195,255,180,180,180,255,163,163,163,255,148,148,148,255,137,137,137,255,129,129,129,255,
+121,121,121,255,114,114,114,255,107,107,107,255, 99, 99, 99,255, 91, 91, 91,255, 83, 83, 83,255, 74, 74, 74,255, 65, 65, 65,255,
+ 55, 55, 55,255, 41, 41, 41,255, 7, 7, 7, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 49, 49, 49,102,145,145,145,255,157,157,157,255,164,164,164,255,167,167,167,255,170,170,170,255,172,172,172,255,176,176,176,255,
+180,180,180,255,179,179,179,255,174,174,174,255,165,165,165,255,155,155,155,255,145,145,145,255,137,137,137,255,130,130,130,255,
+122,122,122,255,115,115,115,255,107,107,107,255, 99, 99, 99,255, 91, 91, 91,255, 82, 82, 82,255, 73, 73, 73,255, 63, 63, 63,255,
+ 50, 50, 50,255, 22, 22, 22,153, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 78, 78, 78,153,149,149,149,255,160,160,160,255,166,166,166,255,168,168,168,255,169,169,169,255,170,170,170,255,
+169,169,169,255,167,167,167,255,164,164,164,255,158,158,158,255,151,151,151,255,144,144,144,255,137,137,137,255,130,130,130,255,
+123,123,123,255,115,115,115,255,106,106,106,255, 98, 98, 98,255, 89, 89, 89,255, 80, 80, 80,255, 70, 70, 70,255, 58, 58, 58,255,
+ 27, 27, 27,153, 3, 3, 3, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 80, 80, 80,153,150,150,150,255,160,160,160,255,165,165,165,255,167,167,167,255,167,167,167,255,
+166,166,166,255,163,163,163,255,160,160,160,255,155,155,155,255,149,149,149,255,143,143,143,255,137,137,137,255,129,129,129,255,
+121,121,121,255,113,113,113,255,105,105,105,255, 96, 96, 96,255, 86, 86, 86,255, 76, 76, 76,255, 63, 63, 63,255, 38, 38, 38,204,
+ 7, 7, 7, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 78, 78, 78,153,147,147,147,255,157,157,157,255,161,161,161,255,163,163,163,255,
+162,162,162,255,160,160,160,255,157,157,157,255,152,152,152,255,147,147,147,255,141,141,141,255,135,135,135,255,127,127,127,255,
+119,119,119,255,110,110,110,255,101,101,101,255, 91, 91, 91,255, 80, 80, 80,255, 66, 66, 66,255, 32, 32, 32,153, 7, 7, 7, 51,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,134,134,134,255,148,148,148,255,154,154,154,255,
+155,155,155,255,154,154,154,255,152,152,152,255,147,147,147,255,142,142,142,255,136,136,136,255,130,130,130,255,122,122,122,255,
+114,114,114,255,104,104,104,255, 93, 93, 93,255, 81, 81, 81,255, 54, 54, 54,204, 22, 22, 22,102, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73, 73, 73,153,103,103,103,204,
+137,137,137,255,140,140,140,255,140,140,140,255,137,137,137,255,133,133,133,255,127,127,127,255,120,120,120,255,113,113,113,255,
+102,102,102,255, 91, 91, 91,255, 64, 64, 64,204, 28, 28, 28,102, 6, 6, 6, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 46, 46, 46,102, 72, 72, 72,153, 72, 72, 72,153, 92, 92, 92,204, 88, 88, 88,204, 81, 81, 81,204, 54, 54, 54,153,
+ 35, 35, 35,102, 16, 16, 16, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 69, 0, 0,168, 1, 0, 0,216, 5, 19, 7,
+ 0, 0, 0, 0, 33, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 69, 84,101,120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 84, 69, 84,101,120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 62, 0, 0,160, 64, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 64, 0, 0, 0, 64,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 32, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 7, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 8, 0, 0, 0, 1, 0, 1, 0, 3, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,205,204,204, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 62, 0, 0,160, 64, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 64, 0, 0, 0, 64, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 64, 0, 0, 0, 0, 2, 0, 0, 0,
- 0, 0, 0, 0, 7, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 8, 0, 0, 0, 1, 0, 1, 0, 3, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
-205,204,204, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
- 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 7, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,200, 7, 19, 7,
+ 0, 0, 0, 0, 12, 0, 0, 0, 1, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
+ 16, 0, 15, 0, 56, 8, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 16, 0, 0, 56, 8, 19, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 72,121,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 72,121,216, 3, 0, 0, 0, 0, 12, 0, 0, 0, 1, 0, 0, 0,
- 32, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 16, 0, 15, 0, 8, 32,218, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 16, 0, 0, 8, 32,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -6009,119 +6471,101 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 69, 0, 0,232, 4, 0, 0,136, 24, 19, 7, 0, 0, 0, 0, 50, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 77, 69, 67,117, 98,101, 0,112,104,101,114,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184, 29, 19, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 42, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 38, 19, 7,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 77, 69, 0, 0,232, 4, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 50, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 69, 67,117, 98,101, 0,112,
-104,101,114,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 32, 19, 7, 0, 0, 0, 0,152, 35, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 13,217, 3, 0, 0, 0, 0,200,218,208, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 56, 98,198, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136, 2,211, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,232,217, 3, 0, 0, 0, 0,
- 24, 7,163, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184,122,209, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 53,218, 3, 0, 0, 0, 0,
- 0, 0, 0, 0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255, 1, 0, 0, 0, 5, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,136, 56,218, 3, 0, 0, 0, 0,255,255,255,255,255,255,255,255,255,255,255,255, 0, 0, 0, 0,
+ 0, 0, 0, 0, 8, 30, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 1, 0, 0, 0, 5, 0, 0, 0,
- 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,156,173, 15, 0, 0, 0, 0,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 0, 0, 0, 0,255,255,255,255, 1, 0, 0, 0,255,255,255,255,
-255,255,255,255, 2, 0, 0, 0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 1, 0, 0, 0, 5, 0, 0, 0, 24, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 33, 19, 7, 0, 0, 0, 0,255,255,255,255,
+255,255,255,255,255,255,255,255, 0, 0, 0, 0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255, 3, 0, 0, 0, 5, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 56, 64,218, 3, 0, 0, 0, 0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 0, 0, 0, 0,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 1, 0, 0, 0, 5, 0, 0, 0,
- 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168, 61,218, 3, 0, 0, 0, 0,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255, 0, 0, 0, 0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255, 1, 0, 0, 0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255, 2, 0, 0, 0, 5, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 24, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 51, 0, 0, 0,180, 0, 0, 0, 0, 4, 0,128, 63, 4, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 67, 0, 30, 0, 6, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 8, 0, 0, 0, 24, 13,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0,
- 68, 65, 84, 65, 8, 2, 0, 0,248, 53,218, 3, 0, 0, 0, 0,124, 1, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,232,217, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+255,255,255,255, 1, 0, 0, 0, 5, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216, 39, 19, 7, 0, 0, 0, 0,255,255,255,255,
+255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 0, 0, 0, 0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+255,255,255,255, 1, 0, 0, 0, 5, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,120, 36, 19, 7, 0, 0, 0, 0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 0, 0, 0, 0,255,255,255,255,255,255,255,255,
+255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 1, 0, 0, 0, 5, 0, 0, 0, 8, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 6, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 51, 0, 0, 0,180, 0, 0, 0, 0, 4, 0,128, 63,
+ 4, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 67, 0, 30, 0, 6, 0, 1, 0, 1, 0,
+ 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 8, 0, 0, 0,184, 29, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0,200,239, 18, 7, 0, 0, 0, 0, 68, 65, 84, 65, 8, 2, 0, 0, 8, 30, 19, 7, 0, 0, 0, 0,124, 1, 0, 0,
+ 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 88, 32, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65,160, 0, 0, 0,232,232,217, 3, 0, 0, 0, 0, 56, 0, 0, 0, 8, 0, 0, 0, 0, 0,128, 63,255,255,127, 63,
- 0, 0,128,191,230, 73,230, 73, 26,182, 1, 0, 0, 0,128, 63, 0, 0,128,191, 0, 0,128,191,230, 73, 26,182, 26,182, 1, 0,
- 1, 0,128,191,253,255,127,191, 0, 0,128,191, 26,182, 26,182, 26,182, 1, 0,250,255,127,191, 3, 0,128, 63, 0, 0,128,191,
- 26,182,230, 73, 26,182, 1, 0, 4, 0,128, 63,247,255,127, 63, 0, 0,128, 63,230, 73,230, 73,230, 73, 1, 0,245,255,127, 63,
- 5, 0,128,191, 0, 0,128, 63,230, 73, 26,182,230, 73, 1, 0, 3, 0,128,191,250,255,127,191, 0, 0,128, 63, 26,182, 26,182,
-230, 73, 1, 0,255,255,127,191, 0, 0,128, 63, 0, 0,128, 63, 26,182,230, 73,230, 73, 1, 0, 68, 65, 84, 65, 8, 2, 0, 0,
-136, 56,218, 3, 0, 0, 0, 0,124, 1, 0, 0, 5, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 7,163, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, 88, 32, 19, 7, 0, 0, 0, 0, 56, 0, 0, 0,
+ 8, 0, 0, 0, 0, 0,128, 63,255,255,127, 63, 0, 0,128,191,230, 73,230, 73, 26,182, 1, 0, 0, 0,128, 63, 0, 0,128,191,
+ 0, 0,128,191,230, 73, 26,182, 26,182, 1, 0, 1, 0,128,191,253,255,127,191, 0, 0,128,191, 26,182, 26,182, 26,182, 1, 0,
+250,255,127,191, 3, 0,128, 63, 0, 0,128,191, 26,182,230, 73, 26,182, 1, 0, 4, 0,128, 63,247,255,127, 63, 0, 0,128, 63,
+230, 73,230, 73,230, 73, 1, 0,245,255,127, 63, 5, 0,128,191, 0, 0,128, 63,230, 73, 26,182,230, 73, 1, 0, 3, 0,128,191,
+250,255,127,191, 0, 0,128, 63, 26,182, 26,182,230, 73, 1, 0,255,255,127,191, 0, 0,128, 63, 0, 0,128, 63, 26,182,230, 73,
+230, 73, 1, 0, 68, 65, 84, 65, 8, 2, 0, 0, 72, 33, 19, 7, 0, 0, 0, 0,124, 1, 0, 0, 5, 0, 0, 0, 3, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152, 35, 19, 7,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,144, 0, 0, 0,
- 24, 7,163, 3, 0, 0, 0, 0, 53, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 35, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0, 35, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 35, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 35, 0,
- 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 35, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 35, 0, 2, 0, 0, 0, 6, 0, 0, 0,
- 0, 0, 35, 0, 3, 0, 0, 0, 7, 0, 0, 0, 0, 0, 35, 0, 4, 0, 0, 0, 5, 0, 0, 0, 0, 0, 35, 0, 4, 0, 0, 0,
- 7, 0, 0, 0, 0, 0, 35, 0, 5, 0, 0, 0, 6, 0, 0, 0, 0, 0, 35, 0, 6, 0, 0, 0, 7, 0, 0, 0, 0, 0, 35, 0,
- 68, 65, 84, 65, 8, 2, 0, 0, 72,156,173, 15, 0, 0, 0, 0,124, 1, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,205,203, 15, 0, 0, 0, 0,
- 6, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 67,111,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-184,122,209, 15, 0, 0, 0, 0, 9, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,200,136,205, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65,144, 0, 0, 0,152, 35, 19, 7, 0, 0, 0, 0, 53, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 35, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 35, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 35, 0,
+ 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 35, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 35, 0, 2, 0, 0, 0, 3, 0, 0, 0,
+ 0, 0, 35, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 35, 0, 3, 0, 0, 0, 7, 0, 0, 0, 0, 0, 35, 0, 4, 0, 0, 0,
+ 5, 0, 0, 0, 0, 0, 35, 0, 4, 0, 0, 0, 7, 0, 0, 0, 0, 0, 35, 0, 5, 0, 0, 0, 6, 0, 0, 0, 0, 0, 35, 0,
+ 6, 0, 0, 0, 7, 0, 0, 0, 0, 0, 35, 0, 68, 65, 84, 65, 8, 2, 0, 0,120, 36, 19, 7, 0, 0, 0, 0,124, 1, 0, 0,
+ 5, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 78, 71,111,110, 32, 70, 97, 99,101, 45, 86,101,114,116,101,120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,200, 38, 19, 7, 0, 0, 0, 0, 26, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 78, 71,111,110, 32, 70, 97, 99,101, 45, 86,101,114,116,101,120, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 8, 2, 0, 0,168, 61,218, 3, 0, 0, 0, 0,124, 1, 0, 0, 5, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67,111,108, 0, 32, 70, 97, 99,
-101, 45, 86,101,114,116,101,120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136, 2,211, 3, 0, 0, 0, 0,
- 26, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 78, 71,111,110, 32, 70, 97, 99,101, 45, 86,101,114,116,101,120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,217, 21, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 56, 98,198, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -6130,22 +6574,19 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,192, 0, 0, 0,200, 38, 19, 7, 0, 0, 0, 0, 59, 0, 0, 0,
+ 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 3, 0, 0, 0,
+ 1, 0, 0, 0, 4, 0, 0, 0, 9, 0, 0, 0, 7, 0, 0, 0, 11, 0, 0, 0, 6, 0, 0, 0, 10, 0, 0, 0, 5, 0, 0, 0,
+ 8, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 4, 0, 0, 0, 8, 0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 10, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 2, 0, 0, 0,
+ 3, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 11, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0, 3, 0, 0, 0,
+ 5, 0, 0, 0, 4, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0,
+ 9, 0, 0, 0, 68, 65, 84, 65, 8, 2, 0, 0,216, 39, 19, 7, 0, 0, 0, 0,124, 1, 0, 0, 5, 0, 0, 0, 25, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 78, 71,111,110,
+ 32, 70, 97, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 42, 19, 7,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 96, 0, 0, 0,136, 2,211, 3, 0, 0, 0, 0, 62, 0, 0, 0, 24, 0, 0, 0,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 68, 65, 84, 65,192, 0, 0, 0,
- 56, 98,198, 3, 0, 0, 0, 0, 59, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0,
- 2, 0, 0, 0, 5, 0, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0, 9, 0, 0, 0, 7, 0, 0, 0, 11, 0, 0, 0,
- 6, 0, 0, 0, 10, 0, 0, 0, 5, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 4, 0, 0, 0, 8, 0, 0, 0,
- 5, 0, 0, 0, 4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 10, 0, 0, 0,
- 6, 0, 0, 0, 6, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 11, 0, 0, 0,
- 7, 0, 0, 0, 7, 0, 0, 0, 3, 0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
- 3, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0, 9, 0, 0, 0, 68, 65, 84, 65, 8, 2, 0, 0, 56, 64,218, 3, 0, 0, 0, 0,
-124, 1, 0, 0, 5, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 78, 71,111,110, 32, 70, 97, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,200,218,208, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -6157,26 +6598,25 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 72, 0, 0, 0, 40, 42, 19, 7, 0, 0, 0, 0, 58, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,
+ 4, 0, 0, 0, 0, 0, 2, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 2, 0, 8, 0, 0, 0, 4, 0, 0, 0, 0, 0, 2, 0,
+ 12, 0, 0, 0, 4, 0, 0, 0, 0, 0, 2, 0, 16, 0, 0, 0, 4, 0, 0, 0, 0, 0, 2, 0, 20, 0, 0, 0, 4, 0, 0, 0,
+ 0, 0, 2, 0, 66, 82, 0, 0, 88, 6, 0, 0,184, 42, 19, 7, 0, 0, 0, 0,123, 1, 0, 0, 1, 0, 0, 0,232, 52, 19, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 65,100,
+100, 0,104, 46, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 72, 0, 0, 0,200,218,208, 3, 0, 0, 0, 0,
- 58, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 2, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 2, 0,
- 8, 0, 0, 0, 4, 0, 0, 0, 0, 0, 2, 0, 12, 0, 0, 0, 4, 0, 0, 0, 0, 0, 2, 0, 16, 0, 0, 0, 4, 0, 0, 0,
- 0, 0, 2, 0, 20, 0, 0, 0, 4, 0, 0, 0, 0, 0, 2, 0, 66, 82, 0, 0, 88, 6, 0, 0,200, 66,218, 3, 0, 0, 0, 0,
-123, 1, 0, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 65,100,100, 0,104, 46, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,216, 50, 19, 7, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,104, 75,218, 3, 0, 0, 0, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -6209,49 +6649,49 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 35, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0,
- 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0,
- 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 56, 1, 0, 0, 96, 67,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 12, 0, 0, 0, 0, 0, 35, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,
+205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0, 80, 43, 19, 7,
+ 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,104, 75,218, 3, 0, 0, 0, 0,
-119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67,
- 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191, 54,189,194, 61, 14,215,126,191, 46,189,194, 61,248,121,216, 3, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,216, 50, 19, 7, 0, 0, 0, 0,119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191,
+ 54,189,194, 61, 14,215,126,191, 46,189,194, 61,104, 52, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 48, 0, 0, 0,104, 52, 19, 7, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 62, 31,133,107, 63, 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,232, 52, 19, 7, 0, 0, 0, 0,123, 1, 0, 0, 1, 0, 0, 0,152, 61, 19, 7,
+ 0, 0, 0, 0,184, 42, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 66,108,
+111, 98, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,248,121,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62, 31,133,107, 63, 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0, 40, 77,218, 3, 0, 0, 0, 0,
-123, 1, 0, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 66,108,111, 98, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,136, 59, 19, 7, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 13, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 8, 84,218, 3, 0, 0, 0, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -6284,49 +6724,49 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0,
- 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0,
- 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 0, 0,128, 63,
- 68, 65, 84, 65, 56, 1, 0, 0,192, 77,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 2, 0, 0, 0, 0, 0, 35, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,
+205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63,
+ 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 0, 0,128, 63, 68, 65, 84, 65, 56, 1, 0, 0,128, 53, 19, 7,
+ 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 8, 84,218, 3, 0, 0, 0, 0,
-119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67,
- 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186,168,122,216, 3, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,136, 59, 19, 7, 0, 0, 0, 0,119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191,
+ 46, 95,255,186,224,255,127,191,114, 97,255,186, 24, 61, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 48, 0, 0, 0, 24, 61, 19, 7, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,152, 61, 19, 7, 0, 0, 0, 0,123, 1, 0, 0, 1, 0, 0, 0, 72, 70, 19, 7,
+ 0, 0, 0, 0,232, 52, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 66,108,
+117,114, 0, 46, 48, 48, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,168,122,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,200, 85,218, 3, 0, 0, 0, 0,
-123, 1, 0, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 66,108,117,114, 0, 46, 48, 48, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 56, 68, 19, 7, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,168, 92,218, 3, 0, 0, 0, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -6359,49 +6799,49 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 35, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0,
- 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0,
- 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 56, 1, 0, 0, 96, 86,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 12, 0, 0, 0, 0, 0, 35, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,
+205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0, 0, 0, 1, 4, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0, 48, 62, 19, 7,
+ 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,168, 92,218, 3, 0, 0, 0, 0,
-119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67,
- 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191, 54,189,194, 61, 14,215,126,191, 46,189,194, 61, 88,123,216, 3, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 56, 68, 19, 7, 0, 0, 0, 0,119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191,
+ 54,189,194, 61, 14,215,126,191, 46,189,194, 61,200, 69, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 48, 0, 0, 0,200, 69, 19, 7, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 62, 31,133,107, 63, 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0,123, 1, 0, 0, 1, 0, 0, 0,248, 78, 19, 7,
+ 0, 0, 0, 0,152, 61, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 66,114,
+117,115,104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0, 88,123,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62, 31,133,107, 63, 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,104, 94,218, 3, 0, 0, 0, 0,
-123, 1, 0, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 66,114,117,115,104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,232, 76, 19, 7, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 31, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 72,101,218, 3, 0, 0, 0, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -6434,49 +6874,49 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 35, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0,
- 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0,
- 33, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 0, 0,128, 63,
- 68, 65, 84, 65, 56, 1, 0, 0, 0, 95,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 30, 0, 0, 0, 0, 0, 35, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,
+205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 0, 0,128, 63, 68, 65, 84, 65, 56, 1, 0, 0,224, 70, 19, 7,
+ 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 72,101,218, 3, 0, 0, 0, 0,
-119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67,
- 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186, 8,124,216, 3, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,232, 76, 19, 7, 0, 0, 0, 0,119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191,
+ 46, 95,255,186,224,255,127,191,114, 97,255,186,120, 78, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 48, 0, 0, 0,120, 78, 19, 7, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,248, 78, 19, 7, 0, 0, 0, 0,123, 1, 0, 0, 1, 0, 0, 0,168, 87, 19, 7,
+ 0, 0, 0, 0, 72, 70, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 67,108,
+ 97,121, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0, 8,124,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0, 8,103,218, 3, 0, 0, 0, 0,
-123, 1, 0, 0, 1, 0, 0, 0,168,205,210, 3, 0, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 67,108, 97,121, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,152, 85, 19, 7, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 15, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,232,109,218, 3, 0, 0, 0, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -6509,49 +6949,49 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 10, 0, 0, 0,
- 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0,
- 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 0, 0,128, 63,
- 68, 65, 84, 65, 56, 1, 0, 0,160,103,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 2, 0, 0, 0, 0, 0, 35, 0, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,
+205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63,
+ 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 0, 0,128, 63, 68, 65, 84, 65, 56, 1, 0, 0,144, 79, 19, 7,
+ 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,232,109,218, 3, 0, 0, 0, 0,
-119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67,
- 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186,184,124,216, 3, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,152, 85, 19, 7, 0, 0, 0, 0,119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191,
+ 46, 95,255,186,224,255,127,191,114, 97,255,186, 40, 87, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 48, 0, 0, 0, 40, 87, 19, 7, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,168, 87, 19, 7, 0, 0, 0, 0,123, 1, 0, 0, 1, 0, 0, 0, 88, 96, 19, 7,
+ 0, 0, 0, 0,248, 78, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 67,108,
+ 97,121, 32, 83,116,114,105,112,115, 0, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,184,124,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,168,205,210, 3, 0, 0, 0, 0,
-123, 1, 0, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 67,108, 97,121, 32, 83,116,114,105,112,115, 0, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 72, 94, 19, 7, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 3, 16, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 24,114,219, 3, 0, 0, 0, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -6584,49 +7024,49 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0,
- 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0,
- 33, 0, 0, 0,160,119, 78, 63, 0, 0,128, 63, 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 0, 0,128, 63,
- 68, 65, 84, 65, 56, 1, 0, 0, 64,206,210, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 2, 0, 0, 0, 0, 0, 35, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,
+205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0,160,119, 78, 63, 0, 0,128, 63,
+ 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 0, 0,128, 63, 68, 65, 84, 65, 56, 1, 0, 0, 64, 88, 19, 7,
+ 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 24,114,219, 3, 0, 0, 0, 0,
-119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67,
- 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186,152, 62,171, 3, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 72, 94, 19, 7, 0, 0, 0, 0,119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191,
+ 46, 95,255,186,224,255,127,191,114, 97,255,186,216, 95, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 48, 0, 0, 0,216, 95, 19, 7, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0,123, 1, 0, 0, 1, 0, 0, 0, 8,105, 19, 7,
+ 0, 0, 0, 0,168, 87, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 67,108,
+111,110,101, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,152, 62,171, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,168,111,218, 3, 0, 0, 0, 0,
-123, 1, 0, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0,168,205,210, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 67,108,111,110,101, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,248,102, 19, 7, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,136,118,218, 3, 0, 0, 0, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -6659,49 +7099,49 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 35, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0,
- 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 51, 51, 51, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0,
- 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 56, 1, 0, 0, 64,112,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 16, 0, 0, 0, 0, 0, 35, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,
+205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 51, 51, 51, 63, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 3, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,240, 96, 19, 7,
+ 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,136,118,218, 3, 0, 0, 0, 0,
-119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67,
- 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191, 54,189,194, 61, 14,215,126,191, 46,189,194, 61,104,125,216, 3, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,248,102, 19, 7, 0, 0, 0, 0,119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191,
+ 54,189,194, 61, 14,215,126,191, 46,189,194, 61,136,104, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 48, 0, 0, 0,136,104, 19, 7, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 62, 31,133,107, 63, 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0, 8,105, 19, 7, 0, 0, 0, 0,123, 1, 0, 0, 1, 0, 0, 0,184,113, 19, 7,
+ 0, 0, 0, 0, 88, 96, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 67,114,
+101, 97,115,101, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,104,125,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62, 31,133,107, 63, 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0, 72,120,218, 3, 0, 0, 0, 0,
-123, 1, 0, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 67,114,101, 97,115,101, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,168,111, 19, 7, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 18, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 40,127,218, 3, 0, 0, 0, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -6734,49 +7174,49 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, 4, 6, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0,
- 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 62, 0, 0, 0, 0,
- 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0,
- 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 0, 0,128, 63,
- 68, 65, 84, 65, 56, 1, 0, 0,224,120,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 2, 0, 0, 0, 0, 0, 35, 0, 0, 0, 4, 6, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,
+205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 62, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63,
+ 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 0, 0,128, 63, 68, 65, 84, 65, 56, 1, 0, 0,160,105, 19, 7,
+ 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 40,127,218, 3, 0, 0, 0, 0,
-119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67,
- 0, 0, 0, 0, 0, 0,128, 63,228, 97,175,190, 50,131,112, 63,218,243,127,191, 10,183,157,188, 24,126,216, 3, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,168,111, 19, 7, 0, 0, 0, 0,119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,228, 97,175,190,
+ 50,131,112, 63,218,243,127,191, 10,183,157,188, 56,113, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 48, 0, 0, 0, 56,113, 19, 7, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 62, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 64, 63, 10,215, 35, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,184,113, 19, 7, 0, 0, 0, 0,123, 1, 0, 0, 1, 0, 0, 0,104,122, 19, 7,
+ 0, 0, 0, 0, 8,105, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 68, 97,
+114,107,101,110, 0, 48, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0, 24,126,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 64, 63, 10,215, 35, 61,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,232,128,218, 3, 0, 0, 0, 0,
-123, 1, 0, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 68, 97,114,107,101,110, 0, 48, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 88,120, 19, 7, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,200,135,218, 3, 0, 0, 0, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -6809,49 +7249,49 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 35, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0,
- 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0,
- 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 56, 1, 0, 0,128,129,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 12, 0, 0, 0, 0, 0, 35, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,
+205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0, 0, 0, 1, 6, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0, 80,114, 19, 7,
+ 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,200,135,218, 3, 0, 0, 0, 0,
-119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67,
- 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191, 54,189,194, 61, 14,215,126,191, 46,189,194, 61,200,126,216, 3, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 88,120, 19, 7, 0, 0, 0, 0,119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191,
+ 54,189,194, 61, 14,215,126,191, 46,189,194, 61,232,121, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 48, 0, 0, 0,232,121, 19, 7, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 62, 31,133,107, 63, 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,104,122, 19, 7, 0, 0, 0, 0,123, 1, 0, 0, 1, 0, 0, 0, 24,131, 19, 7,
+ 0, 0, 0, 0,184,113, 19, 7, 0, 0, 0, 0, 0, 20, 1,160,255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 68,114,
+ 97,119, 0, 46, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,200,126,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62, 31,133,107, 63, 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,136,137,218, 3, 0, 0, 0, 0,
-123, 1, 0, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 0, 20, 1,160,255,255,255,255,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 68,114, 97,119, 0, 46, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 8,129, 19, 7, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 2, 31, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 88,146,218, 3, 0, 0, 0, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -6884,49 +7324,49 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 35, 0, 0, 0, 0, 4, 0, 8, 0, 0, 0, 0, 10, 0, 0, 0,
- 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0,
- 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 0, 0,128, 63,
- 68, 65, 84, 65, 56, 1, 0, 0, 32,138,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 30, 0, 0, 0, 0, 0, 35, 0, 0, 0, 0, 4, 0, 8, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,
+205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63,
+ 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 0, 0,128, 63, 68, 65, 84, 65, 56, 1, 0, 0, 0,123, 19, 7,
+ 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 88,146,218, 3, 0, 0, 0, 0,
-119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67,
- 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186,120,127,216, 3, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 8,129, 19, 7, 0, 0, 0, 0,119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191,
+ 46, 95,255,186,224,255,127,191,114, 97,255,186,152,130, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 48, 0, 0, 0,152,130, 19, 7, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0, 24,131, 19, 7, 0, 0, 0, 0,123, 1, 0, 0, 1, 0, 0, 0,200,139, 19, 7,
+ 0, 0, 0, 0,104,122, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 70,105,
+108,108, 47, 68,101,101,112,101,110, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,120,127,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,104,176,218, 3, 0, 0, 0, 0,
-123, 1, 0, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 70,105,108,108, 47, 68,101,101,112,101,110, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,184,137, 19, 7, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 24,148,218, 3, 0, 0, 0, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -6959,49 +7399,49 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0,
- 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0,
- 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 20,174,199, 62, 0, 0,128, 62, 0, 0,128, 63, 0, 0,128, 63,
- 68, 65, 84, 65, 56, 1, 0, 0, 0,177,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 2, 0, 0, 0, 0, 0, 35, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,
+205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63,
+ 0, 0,128, 63, 20,174,199, 62, 0, 0,128, 62, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 56, 1, 0, 0,176,131, 19, 7,
+ 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 24,148,218, 3, 0, 0, 0, 0,
-119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67,
- 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186, 40,128,216, 3, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,184,137, 19, 7, 0, 0, 0, 0,119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191,
+ 46, 95,255,186,224,255,127,191,114, 97,255,186, 72,139, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 48, 0, 0, 0, 72,139, 19, 7, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,200,139, 19, 7, 0, 0, 0, 0,123, 1, 0, 0, 1, 0, 0, 0,120,148, 19, 7,
+ 0, 0, 0, 0, 24,131, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 70,108,
+ 97,116,116,101,110, 47, 67,111,110,116,114, 97,115,116, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0, 40,128,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0, 72,183,218, 3, 0, 0, 0, 0,
-123, 1, 0, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 70,108, 97,116,116,101,110, 47, 67,111,110,116,114, 97,115,116, 0, 48, 48, 49, 0, 0,
+ 1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,104,146, 19, 7, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 21, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,216,149,218, 3, 0, 0, 0, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -7034,49 +7474,49 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0,
- 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0,
- 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 20,174,199, 62, 0, 0,128, 62, 0, 0,128, 63, 0, 0,128, 63,
- 68, 65, 84, 65, 56, 1, 0, 0,224,183,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 2, 0, 0, 0, 0, 0, 35, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,
+205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63,
+ 0, 0,128, 63, 20,174,199, 62, 0, 0,128, 62, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 56, 1, 0, 0, 96,140, 19, 7,
+ 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,216,149,218, 3, 0, 0, 0, 0,
-119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67,
- 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186,216,128,216, 3, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,104,146, 19, 7, 0, 0, 0, 0,119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191,
+ 46, 95,255,186,224,255,127,191,114, 97,255,186,248,147, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 48, 0, 0, 0,248,147, 19, 7, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,120,148, 19, 7, 0, 0, 0, 0,123, 1, 0, 0, 1, 0, 0, 0, 40,157, 19, 7,
+ 0, 0, 0, 0,200,139, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 71,114,
+ 97, 98, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,216,128,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0, 40,190,218, 3, 0, 0, 0, 0,
-123, 1, 0, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 71,114, 97, 98, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 24,155, 19, 7, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 22, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,152,151,218, 3, 0, 0, 0, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -7109,49 +7549,49 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0,
- 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0,
- 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0,
- 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 62, 0, 0,128, 63, 0, 0,128, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 56, 1, 0, 0,192,190,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 2, 0, 0, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,
+205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 62,
+ 0, 0,128, 63, 0, 0,128, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0, 16,149, 19, 7,
+ 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,152,151,218, 3, 0, 0, 0, 0,
-119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67,
- 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186,136,129,216, 3, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 24,155, 19, 7, 0, 0, 0, 0,119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191,
+ 46, 95,255,186,224,255,127,191,114, 97,255,186,168,156, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 48, 0, 0, 0,168,156, 19, 7, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0, 40,157, 19, 7, 0, 0, 0, 0,123, 1, 0, 0, 1, 0, 0, 0,216,165, 19, 7,
+ 0, 0, 0, 0,120,148, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 73,110,
+102,108, 97,116,101, 47, 68,101,102,108, 97,116,101, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,136,129,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0, 8,197,218, 3, 0, 0, 0, 0,
-123, 1, 0, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 73,110,102,108, 97,116,101, 47, 68,101,102,108, 97,116,101, 0, 48, 48, 49, 0, 0, 0,
+ 1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,200,163, 19, 7, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 23, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 88,153,218, 3, 0, 0, 0, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -7184,49 +7624,49 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0,
- 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0,
- 33, 0, 0, 0, 0, 0, 0, 62, 0, 0, 64, 63, 0, 0, 64, 63, 0, 0, 64, 63, 0, 0,128, 62, 0, 0,128, 62, 0, 0,128, 62,
- 68, 65, 84, 65, 56, 1, 0, 0,160,197,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 2, 0, 0, 0, 0, 0, 35, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,
+205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0, 64, 63,
+ 0, 0, 64, 63, 0, 0, 64, 63, 0, 0,128, 62, 0, 0,128, 62, 0, 0,128, 62, 68, 65, 84, 65, 56, 1, 0, 0,192,157, 19, 7,
+ 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 88,153,218, 3, 0, 0, 0, 0,
-119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67,
- 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186, 56,130,216, 3, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,200,163, 19, 7, 0, 0, 0, 0,119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191,
+ 46, 95,255,186,224,255,127,191,114, 97,255,186, 88,165, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 48, 0, 0, 0, 88,165, 19, 7, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,216,165, 19, 7, 0, 0, 0, 0,123, 1, 0, 0, 1, 0, 0, 0,136,174, 19, 7,
+ 0, 0, 0, 0, 40,157, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 76, 97,
+121,101,114, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0, 56,130,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,232,203,218, 3, 0, 0, 0, 0,
-123, 1, 0, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 76, 97,121,101,114, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,120,172, 19, 7, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 24, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 24,155,218, 3, 0, 0, 0, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -7259,49 +7699,49 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0,
- 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0,
- 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 20,174,199, 62, 20,174,199, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 56, 1, 0, 0,128,204,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 2, 0, 0, 0, 0, 0, 35, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,
+205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63,
+ 20,174,199, 62, 20,174,199, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,112,166, 19, 7,
+ 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 24,155,218, 3, 0, 0, 0, 0,
-119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67,
- 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186,232,130,216, 3, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,120,172, 19, 7, 0, 0, 0, 0,119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191,
+ 46, 95,255,186,224,255,127,191,114, 97,255,186, 8,174, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 48, 0, 0, 0, 8,174, 19, 7, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,136,174, 19, 7, 0, 0, 0, 0,123, 1, 0, 0, 1, 0, 0, 0, 56,183, 19, 7,
+ 0, 0, 0, 0,216,165, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 76,105,
+103,104,116,101,110, 0, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,232,130,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,200,210,218, 3, 0, 0, 0, 0,
-123, 1, 0, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 76,105,103,104,116,101,110, 0, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 40,181, 19, 7, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,216,156,218, 3, 0, 0, 0, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -7334,49 +7774,49 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 35, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0,
- 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0,
- 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 56, 1, 0, 0, 96,211,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 12, 0, 0, 0, 0, 0, 35, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,
+205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0, 0, 0, 1, 5, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0, 32,175, 19, 7,
+ 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,216,156,218, 3, 0, 0, 0, 0,
-119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67,
- 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191, 54,189,194, 61, 14,215,126,191, 46,189,194, 61,152,131,216, 3, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 40,181, 19, 7, 0, 0, 0, 0,119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191,
+ 54,189,194, 61, 14,215,126,191, 46,189,194, 61,184,182, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 48, 0, 0, 0,184,182, 19, 7, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 62, 31,133,107, 63, 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0, 56,183, 19, 7, 0, 0, 0, 0,123, 1, 0, 0, 1, 0, 0, 0,232,191, 19, 7,
+ 0, 0, 0, 0,136,174, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 77,105,
+120, 0,104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,152,131,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62, 31,133,107, 63, 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,168,217,218, 3, 0, 0, 0, 0,
-123, 1, 0, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 77,105,120, 0,104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,216,189, 19, 7, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,152,158,218, 3, 0, 0, 0, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -7409,49 +7849,49 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 35, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0,
- 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 51, 51, 51, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0,
- 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 56, 1, 0, 0, 64,218,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 12, 0, 0, 0, 0, 0, 35, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,
+205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 51, 51, 51, 63, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,208,183, 19, 7,
+ 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,152,158,218, 3, 0, 0, 0, 0,
-119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67,
- 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191, 54,189,194, 61, 14,215,126,191, 46,189,194, 61, 72,132,216, 3, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,216,189, 19, 7, 0, 0, 0, 0,119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191,
+ 54,189,194, 61, 14,215,126,191, 46,189,194, 61,104,191, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 48, 0, 0, 0,104,191, 19, 7, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 62, 31,133,107, 63, 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,232,191, 19, 7, 0, 0, 0, 0,123, 1, 0, 0, 1, 0, 0, 0,152,200, 19, 7,
+ 0, 0, 0, 0, 56,183, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 77,117,
+108,116,105,112,108,121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0, 72,132,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62, 31,133,107, 63, 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,136,224,218, 3, 0, 0, 0, 0,
-123, 1, 0, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 77,117,108,116,105,112,108,121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,136,198, 19, 7, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 88,160,218, 3, 0, 0, 0, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -7484,49 +7924,49 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 35, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0,
- 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0,
- 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 56, 1, 0, 0, 32,225,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 12, 0, 0, 0, 0, 0, 35, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,
+205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,128,192, 19, 7,
+ 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 88,160,218, 3, 0, 0, 0, 0,
-119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67,
- 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191, 54,189,194, 61, 14,215,126,191, 46,189,194, 61,248,132,216, 3, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,136,198, 19, 7, 0, 0, 0, 0,119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191,
+ 54,189,194, 61, 14,215,126,191, 46,189,194, 61, 24,200, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 48, 0, 0, 0, 24,200, 19, 7, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 62, 31,133,107, 63, 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,152,200, 19, 7, 0, 0, 0, 0,123, 1, 0, 0, 1, 0, 0, 0, 72,209, 19, 7,
+ 0, 0, 0, 0,232,191, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 78,117,
+100,103,101, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,248,132,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62, 31,133,107, 63, 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,184,212,210, 3, 0, 0, 0, 0,
-123, 1, 0, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 78,117,100,103,101, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 56,207, 19, 7, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 28, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 24,162,218, 3, 0, 0, 0, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -7559,49 +7999,49 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0,
- 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0,
- 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 62, 0, 0,128, 63, 0, 0,128, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 56, 1, 0, 0, 80,213,210, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 2, 0, 0, 0, 0, 0, 35, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,
+205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 62,
+ 0, 0,128, 63, 0, 0,128, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0, 48,201, 19, 7,
+ 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 24,162,218, 3, 0, 0, 0, 0,
-119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67,
- 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186,168,133,216, 3, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 56,207, 19, 7, 0, 0, 0, 0,119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191,
+ 46, 95,255,186,224,255,127,191,114, 97,255,186,200,208, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 48, 0, 0, 0,200,208, 19, 7, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0, 72,209, 19, 7, 0, 0, 0, 0,123, 1, 0, 0, 1, 0, 0, 0,248,217, 19, 7,
+ 0, 0, 0, 0,152,200, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 80,105,
+110, 99,104, 47, 77, 97,103,110,105,102,121, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,168,133,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,200,219,210, 3, 0, 0, 0, 0,
-123, 1, 0, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 80,105,110, 99,104, 47, 77, 97,103,110,105,102,121, 0, 48, 48, 49, 0, 0, 0, 0, 0,
+ 1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,232,215, 19, 7, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 29, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,216,163,218, 3, 0, 0, 0, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -7634,49 +8074,49 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0,
- 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0,
- 33, 0, 0, 0, 0, 0, 0, 62, 0, 0, 64, 63, 0, 0, 64, 63, 0, 0, 64, 63, 0, 0,128, 62, 0, 0,128, 62, 0, 0,128, 62,
- 68, 65, 84, 65, 56, 1, 0, 0, 96,220,210, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 2, 0, 0, 0, 0, 0, 35, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,
+205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0, 64, 63,
+ 0, 0, 64, 63, 0, 0, 64, 63, 0, 0,128, 62, 0, 0,128, 62, 0, 0,128, 62, 68, 65, 84, 65, 56, 1, 0, 0,224,209, 19, 7,
+ 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,216,163,218, 3, 0, 0, 0, 0,
-119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67,
- 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186, 88,134,216, 3, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,232,215, 19, 7, 0, 0, 0, 0,119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191,
+ 46, 95,255,186,224,255,127,191,114, 97,255,186,120,217, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 48, 0, 0, 0,120,217, 19, 7, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,248,217, 19, 7, 0, 0, 0, 0,123, 1, 0, 0, 1, 0, 0, 0,168,226, 19, 7,
+ 0, 0, 0, 0, 72,209, 19, 7, 0, 0, 0, 0,253, 21,192, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 80,111,
+108,105,115,104, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0, 88,134,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,216,226,210, 3, 0, 0, 0, 0,
-123, 1, 0, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0,253, 21,192, 32, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 80,111,108,105,115,104, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,152,224, 19, 7, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 21, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,152,165,218, 3, 0, 0, 0, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -7709,49 +8149,49 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, 4, 4, 4, 1, 0, 0, 0, 0, 10, 0, 0, 0,
- 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0,
- 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 20,174,199, 62, 0, 0,128, 62, 0, 0,128, 63, 0, 0,128, 63,
- 68, 65, 84, 65, 56, 1, 0, 0,112,227,210, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 2, 0, 0, 0, 0, 0, 35, 0, 0, 0, 4, 4, 4, 1, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,
+205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63,
+ 0, 0,128, 63, 20,174,199, 62, 0, 0,128, 62, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 56, 1, 0, 0,144,218, 19, 7,
+ 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,152,165,218, 3, 0, 0, 0, 0,
-119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67,
- 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186, 8,135,216, 3, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,152,224, 19, 7, 0, 0, 0, 0,119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191,
+ 46, 95,255,186,224,255,127,191,114, 97,255,186, 40,226, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 48, 0, 0, 0, 40,226, 19, 7, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,168,226, 19, 7, 0, 0, 0, 0,123, 1, 0, 0, 1, 0, 0, 0, 88,235, 19, 7,
+ 0, 0, 0, 0,248,217, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 83, 99,
+114, 97,112,101, 47, 80,101, 97,107,115, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0, 8,135,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,232,233,210, 3, 0, 0, 0, 0,
-123, 1, 0, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 83, 99,114, 97,112,101, 47, 80,101, 97,107,115, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 72,233, 19, 7, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 30, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 88,167,218, 3, 0, 0, 0, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -7784,49 +8224,49 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0,
- 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0,
- 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 20,174,199, 62, 0, 0,128, 62, 0, 0,128, 63, 0, 0,128, 63,
- 68, 65, 84, 65, 56, 1, 0, 0,128,234,210, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 2, 0, 0, 0, 0, 0, 35, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,
+205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63,
+ 0, 0,128, 63, 20,174,199, 62, 0, 0,128, 62, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 56, 1, 0, 0, 64,227, 19, 7,
+ 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 88,167,218, 3, 0, 0, 0, 0,
-119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67,
- 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186,184,135,216, 3, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 72,233, 19, 7, 0, 0, 0, 0,119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191,
+ 46, 95,255,186,224,255,127,191,114, 97,255,186,216,234, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 48, 0, 0, 0,216,234, 19, 7, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0, 88,235, 19, 7, 0, 0, 0, 0,123, 1, 0, 0, 1, 0, 0, 0, 8,244, 19, 7,
+ 0, 0, 0, 0,168,226, 19, 7, 0, 0, 0, 0,168,205,210, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 83, 99,
+117,108,112,116, 68,114, 97,119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,184,135,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,248,240,210, 3, 0, 0, 0, 0,
-123, 1, 0, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0,168,205,210, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 83, 99,117,108,112,116, 68,114, 97,119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,248,241, 19, 7, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 3, 31, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 24,169,218, 3, 0, 0, 0, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -7859,49 +8299,49 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0,
- 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0,
- 33, 0, 0, 0,160,119, 78, 63, 0, 0,128, 63, 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 0, 0,128, 63,
- 68, 65, 84, 65, 56, 1, 0, 0,144,241,210, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 2, 0, 0, 0, 0, 0, 35, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,
+205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0,160,119, 78, 63, 0, 0,128, 63,
+ 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 0, 0,128, 63, 68, 65, 84, 65, 56, 1, 0, 0,240,235, 19, 7,
+ 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 24,169,218, 3, 0, 0, 0, 0,
-119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67,
- 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186,104,136,216, 3, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,248,241, 19, 7, 0, 0, 0, 0,119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191,
+ 46, 95,255,186,224,255,127,191,114, 97,255,186,136,243, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 48, 0, 0, 0,136,243, 19, 7, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0, 8,244, 19, 7, 0, 0, 0, 0,123, 1, 0, 0, 1, 0, 0, 0,184,252, 19, 7,
+ 0, 0, 0, 0, 88,235, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 83,109,
+101, 97,114, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,104,136,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,152,231,218, 3, 0, 0, 0, 0,
-123, 1, 0, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 83,109,101, 97,114, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,168,250, 19, 7, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,216,170,218, 3, 0, 0, 0, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -7934,49 +8374,49 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 35, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0,
- 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0,
- 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 56, 1, 0, 0, 48,232,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 16, 0, 0, 0, 0, 0, 35, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,
+205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,160,244, 19, 7,
+ 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,216,170,218, 3, 0, 0, 0, 0,
-119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67,
- 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191, 54,189,194, 61, 14,215,126,191, 46,189,194, 61, 24,137,216, 3, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,168,250, 19, 7, 0, 0, 0, 0,119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191,
+ 54,189,194, 61, 14,215,126,191, 46,189,194, 61, 56,252, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 48, 0, 0, 0, 56,252, 19, 7, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 62, 31,133,107, 63, 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,184,252, 19, 7, 0, 0, 0, 0,123, 1, 0, 0, 1, 0, 0, 0,104, 5, 20, 7,
+ 0, 0, 0, 0, 8,244, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 83,109,
+111,111,116,104, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0, 24,137,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62, 31,133,107, 63, 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,168,238,218, 3, 0, 0, 0, 0,
-123, 1, 0, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 83,109,111,111,116,104, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 88, 3, 20, 7, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 33, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,152,172,218, 3, 0, 0, 0, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -8009,49 +8449,49 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0,
- 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0,
- 33, 0, 0, 0, 0, 0, 0, 62, 0, 0, 64, 63, 0, 0, 64, 63, 0, 0, 64, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 56, 1, 0, 0, 64,239,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 2, 0, 0, 0, 0, 0, 35, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,
+205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0, 64, 63,
+ 0, 0, 64, 63, 0, 0, 64, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0, 80,253, 19, 7,
+ 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,152,172,218, 3, 0, 0, 0, 0,
-119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67,
- 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186,200,137,216, 3, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 88, 3, 20, 7, 0, 0, 0, 0,119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191,
+ 46, 95,255,186,224,255,127,191,114, 97,255,186,232, 4, 20, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 48, 0, 0, 0,232, 4, 20, 7, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,104, 5, 20, 7, 0, 0, 0, 0,123, 1, 0, 0, 1, 0, 0, 0, 24, 14, 20, 7,
+ 0, 0, 0, 0,184,252, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 83,110,
+ 97,107,101, 32, 72,111,111,107, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,200,137,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,184,245,218, 3, 0, 0, 0, 0,
-123, 1, 0, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 83,110, 97,107,101, 32, 72,111,111,107, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 8, 12, 20, 7, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 34, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 88,174,218, 3, 0, 0, 0, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -8084,49 +8524,49 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0,
- 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0,
- 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 62, 0, 0,128, 63, 0, 0,128, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 56, 1, 0, 0, 80,246,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 2, 0, 0, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,
+205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 62,
+ 0, 0,128, 63, 0, 0,128, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0, 0, 6, 20, 7,
+ 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 88,174,218, 3, 0, 0, 0, 0,
-119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67,
- 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186,120,138,216, 3, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 8, 12, 20, 7, 0, 0, 0, 0,119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191,
+ 46, 95,255,186,224,255,127,191,114, 97,255,186,152, 13, 20, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 48, 0, 0, 0,152, 13, 20, 7, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0,123, 1, 0, 0, 1, 0, 0, 0,200, 22, 20, 7,
+ 0, 0, 0, 0,104, 5, 20, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 83,111,
+102,116,101,110, 0, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,120,138,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,200,252,218, 3, 0, 0, 0, 0,
-123, 1, 0, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 83,111,102,116,101,110, 0, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,184, 20, 20, 7, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,152,103,219, 3, 0, 0, 0, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -8159,49 +8599,49 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 35, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0,
- 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0,
- 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 56, 1, 0, 0, 96,253,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 16, 0, 0, 0, 0, 0, 35, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,
+205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,176, 14, 20, 7,
+ 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,152,103,219, 3, 0, 0, 0, 0,
-119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67,
- 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191, 54,189,194, 61, 14,215,126,191, 46,189,194, 61, 40,139,216, 3, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,184, 20, 20, 7, 0, 0, 0, 0,119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191,
+ 54,189,194, 61, 14,215,126,191, 46,189,194, 61, 72, 22, 20, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 48, 0, 0, 0, 72, 22, 20, 7, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 62, 31,133,107, 63, 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,200, 22, 20, 7, 0, 0, 0, 0,123, 1, 0, 0, 1, 0, 0, 0,120, 31, 20, 7,
+ 0, 0, 0, 0, 24, 14, 20, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 83,117,
+ 98,116,114, 97, 99,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0, 40,139,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62, 31,133,107, 63, 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,216, 3,219, 3, 0, 0, 0, 0,
-123, 1, 0, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 83,117, 98,116,114, 97, 99,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,104, 29, 20, 7, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 88,105,219, 3, 0, 0, 0, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -8234,49 +8674,49 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 35, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0,
- 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0,
- 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 56, 1, 0, 0,112, 4,219, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 12, 0, 0, 0, 0, 0, 35, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,
+205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0, 96, 23, 20, 7,
+ 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 88,105,219, 3, 0, 0, 0, 0,
-119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67,
- 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191, 54,189,194, 61, 14,215,126,191, 46,189,194, 61,216,139,216, 3, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,104, 29, 20, 7, 0, 0, 0, 0,119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191,
+ 54,189,194, 61, 14,215,126,191, 46,189,194, 61,248, 30, 20, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 48, 0, 0, 0,248, 30, 20, 7, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 62, 31,133,107, 63, 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,120, 31, 20, 7, 0, 0, 0, 0,123, 1, 0, 0, 1, 0, 0, 0, 40, 40, 20, 7,
+ 0, 0, 0, 0,200, 22, 20, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 84,101,
+120, 68,114, 97,119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,216,139,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62, 31,133,107, 63, 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,232, 10,219, 3, 0, 0, 0, 0,
-123, 1, 0, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 84,101,120, 68,114, 97,119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 24, 38, 20, 7, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 24,107,219, 3, 0, 0, 0, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -8309,49 +8749,49 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 35, 0, 0, 0, 4, 4, 0, 8, 0, 0, 0, 0, 10, 0, 0, 0,
- 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 51, 51, 51, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0,
- 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 20,174,199, 62, 20,174,199, 62, 0, 0,128, 63,
- 68, 65, 84, 65, 56, 1, 0, 0,128, 11,219, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 16, 0, 0, 0, 0, 0, 35, 0, 0, 0, 4, 4, 0, 8, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,
+205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 51, 51, 51, 63, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 20,174,199, 62, 20,174,199, 62, 0, 0,128, 63, 68, 65, 84, 65, 56, 1, 0, 0, 16, 32, 20, 7,
+ 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 24,107,219, 3, 0, 0, 0, 0,
-119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67,
- 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186,136,140,216, 3, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 24, 38, 20, 7, 0, 0, 0, 0,119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191,
+ 46, 95,255,186,224,255,127,191,114, 97,255,186,168, 39, 20, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 48, 0, 0, 0,168, 39, 20, 7, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0,123, 1, 0, 0, 1, 0, 0, 0,216, 48, 20, 7,
+ 0, 0, 0, 0,120, 31, 20, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 84,104,
+117,109, 98, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,136,140,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,248, 17,219, 3, 0, 0, 0, 0,
-123, 1, 0, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 84,104,117,109, 98, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,200, 46, 20, 7, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 38, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,216,108,219, 3, 0, 0, 0, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -8384,49 +8824,49 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 75, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0,
- 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0,
- 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 62, 0, 0,128, 63, 0, 0,128, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 56, 1, 0, 0,144, 18,219, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 2, 0, 0, 0, 0, 0, 75, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,
+205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 62,
+ 0, 0,128, 63, 0, 0,128, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,192, 40, 20, 7,
+ 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,216,108,219, 3, 0, 0, 0, 0,
-119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67,
- 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186, 56,141,216, 3, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,200, 46, 20, 7, 0, 0, 0, 0,119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191,
+ 46, 95,255,186,224,255,127,191,114, 97,255,186, 88, 48, 20, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 48, 0, 0, 0, 88, 48, 20, 7, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,216, 48, 20, 7, 0, 0, 0, 0,123, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 40, 40, 20, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 84,119,
+105,115,116, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0, 56,141,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0, 8, 25,219, 3, 0, 0, 0, 0,
-123, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 84,119,105,115,116, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,120, 55, 20, 7, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 39, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,152,110,219, 3, 0, 0, 0, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -8459,36 +8899,41 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 75, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 10, 0, 0, 0,
- 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0,
- 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 62, 0, 0,128, 63, 0, 0,128, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 56, 1, 0, 0,160, 25,219, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 2, 0, 0, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,
+205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 62,
+ 0, 0,128, 63, 0, 0,128, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,112, 49, 20, 7,
+ 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,152,110,219, 3, 0, 0, 0, 0,
-119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67,
- 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186,232,141,216, 3, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,120, 55, 20, 7, 0, 0, 0, 0,119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191,
+ 46, 95,255,186,224,255,127,191,114, 97,255,186, 8, 57, 20, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 48, 0, 0, 0, 8, 57, 20, 7, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 85, 83, 69, 82,112, 38, 0, 0,224,140, 41, 5, 0, 0, 0, 0,209, 0, 0, 0, 1, 0, 0, 0, 1, 8, 17, 1,
+ 63, 6, 0, 0, 5, 0, 0, 0, 47,116,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,232,141,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61,
- 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 85, 83, 69, 82,112, 38, 0, 0, 96, 41,141, 67, 1, 0, 0, 0,
-209, 0, 0, 0, 1, 0, 0, 0, 1, 8, 17, 1, 63, 6, 0, 0, 5, 0, 0, 0, 47,116,109,112, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -8506,14 +8951,14 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 0, 85,115,101,114,115, 47,116,111,110, 47, 68,101,115,107,116,111,112, 47, 0, 45,112,
+111,119,101,114,112, 99, 47, 98,105,110, 47, 98,108,101,110,100,101,114, 46, 97,112,112, 47, 67,111,110,116,101,110,116,115, 47,
+ 82,101,115,111,117,114, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 0, 85,115,101,114,115, 47,116,111,110,
- 47, 68,101,115,107,116,111,112, 47, 0, 45,112,111,119,101,114,112, 99, 47, 98,105,110, 47, 98,108,101,110,100,101,114, 46, 97,
-112,112, 47, 67,111,110,116,101,110,116,115, 47, 82,101,115,111,117,114, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -8530,12 +8975,12 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -8562,12 +9007,12 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -8658,12 +9103,12 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -8746,2474 +9191,2475 @@ char datatoc_startup_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 35, 0, 0, 0, 2, 0, 94, 1, 8, 0, 0, 0, 3, 0, 0, 0, 56, 52, 39, 0,
+ 0, 0, 0, 0, 1, 0, 2, 0, 0, 8, 0, 0, 2, 0, 0, 0, 68,172, 0, 0, 36, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0,
+ 72, 0, 0, 0, 0, 0, 64, 0, 5, 0, 2, 0, 72, 96, 20, 7, 0, 0, 0, 0, 72, 96, 20, 7, 0, 0, 0, 0,200, 71, 20, 7,
+ 0, 0, 0, 0,200, 71, 20, 7, 0, 0, 0, 0, 56,138, 20, 7, 0, 0, 0, 0, 56,138, 20, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 49, 19, 7,
+ 0, 0, 0, 0,152,137, 20, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 1, 0, 2, 0, 25, 0, 0, 0, 20, 0, 20, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0,205,204, 76, 63,205,204, 76, 63,205,204, 76, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63,
+ 0, 0,128, 63, 30, 90,100,191,154,153,153, 62,102,102,102, 63, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 31,250,254, 62,
+ 9, 0, 0, 63,156,153, 25, 63, 0, 0, 0, 0,205,204, 76, 62,205,204, 76, 62,205,204, 76, 62, 0, 0,128, 63, 44,135, 22, 63,
+ 32,133,235, 62,184,243,125, 62, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,195, 73, 76, 63, 42,135, 86, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 1, 43,135, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 16, 47, 93, 62, 58,180,200,190, 24, 47, 93,190,
+ 0, 0, 0, 0, 14, 0, 1, 0, 25, 0, 15, 0,120, 0, 60, 0, 3, 0, 5, 0,128, 0, 0, 0, 0, 0, 0, 0,144, 31, 15, 0,
+ 6, 0, 25, 0, 8, 0, 10, 0,200, 0, 0, 0, 0, 0, 0, 0, 2, 0, 4, 0, 10, 0, 50, 0, 20, 0, 2, 0, 1, 0, 0, 0,
+ 0, 0,128, 63, 60, 0, 0, 0, 0, 0, 2, 0, 2, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63,
+ 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63,
+ 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63,
+ 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63,
+ 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63,
+ 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63,
+ 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63,
+ 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63,
+ 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63,
+ 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63,
+ 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63,
+ 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63,
+ 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63,
+ 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63,
+ 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63,
+ 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,128, 62, 0, 0, 0, 0, 68, 65, 84, 65,168, 36, 0, 0, 72, 96, 20, 7, 0, 0, 0, 0,206, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,101,102, 97,117,108,116, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25,255,153,153,153,255,100,100,100,255,
+ 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25,255,153,153,153,255,100,100,100,255,
+ 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, 1, 0, 15, 0,241,255, 0, 0, 25, 25, 25,255,153,153,153,255,153,153,153,255,
+ 90, 90, 90,255, 0, 0, 0,255,255,255,255,255, 1, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0,255, 70, 70, 70,255, 86,128,194,255,
+255,255,255,255,255,255,255,255, 0, 0, 0,255, 1, 0, 15, 0,241,255, 0, 0, 0, 0, 0,255, 70, 70, 70,255, 70, 70, 70,255,
+255,255,255,255, 0, 0, 0,255,255,255,255,255, 1, 0, 15, 0,241,255, 0, 0, 25, 25, 25,255,153,153,153,255,100,100,100,255,
+ 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25,255,180,180,180,255,153,153,153,255,
+ 90, 90, 90,255, 0, 0, 0,255,255,255,255,255, 1, 0,236,255, 0, 0, 0, 0, 25, 25, 25,255,180,180,180,255,153,153,153,255,
+128,128,128,255, 0, 0, 0,255,255,255,255,255, 1, 0,236,255, 0, 0, 0, 0, 0, 0, 0,255, 70, 70, 70,255, 70, 70, 70,255,
+255,255,255,255,255,255,255,255,204,204,204,255, 1, 0, 15, 0,241,255, 0, 0, 0, 0, 0,255, 63, 63, 63,255, 86,128,194,255,
+255,255,255,255, 0, 0, 0,255, 0, 0, 0,255, 0, 0, 25, 0,236,255, 0, 0, 0, 0, 0,255, 25, 25, 25,230, 45, 45, 45,230,
+100,100,100,255,160,160,160,255,255,255,255,255, 0, 0, 25, 0,236,255, 0, 0, 0, 0, 0,255, 0, 0, 0, 0, 86,128,194,255,
+172,172,172,128,255,255,255,255, 0, 0, 0,255, 1, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0,255, 25, 25, 25,230, 45, 45, 45,230,
+100,100,100,255,255,255,255,255,255,255,255,255, 0, 0, 25, 0,236,255, 0, 0, 25, 25, 25,255,128,128,128,255,100,100,100,255,
+ 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 50, 50, 50,180, 80, 80, 80,180,100,100,100,180,
+128,128,128,255, 0, 0, 0,255,255,255,255,255, 1, 0, 5, 0,251,255, 0, 0, 0, 0, 0,255,190,190,190,255,100,100,100,180,
+ 68, 68, 68,255, 0, 0, 0,255,255,255,255,255, 0, 0, 5, 0,251,255, 0, 0, 0, 0, 0,255, 0, 0, 0, 0, 86,128,194,255,
+ 0, 0, 0,255, 0, 0, 0,255, 0, 0, 0,255, 0, 0, 0, 0, 0, 0, 0, 0,115,190, 76,255, 90,166, 51,255,240,235,100,255,
+215,211, 75,255,180, 0,255,255,153, 0,230,255, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 35, 0, 0, 0, 2, 0, 94, 1,
- 8, 0, 0, 0, 3, 0, 0, 0, 56, 52, 39, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 8, 0, 0, 2, 0, 0, 0, 68,172, 0, 0,
- 36, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 72, 0, 0, 0, 0, 0, 64, 0, 5, 0, 2, 0, 88,174,219, 3, 0, 0, 0, 0,
- 88,174,219, 3, 0, 0, 0, 0,200,152,170, 3, 0, 0, 0, 0,200,152,170, 3, 0, 0, 0, 0,200,154,199, 3, 0, 0, 0, 0,
-200,154,199, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,184,211,219, 3, 0, 0, 0, 0, 8,219,219, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 1, 0, 2, 0,
- 25, 0, 0, 0, 20, 0, 20, 0, 1, 0, 0, 0, 0, 0, 0, 0,205,204, 76, 63,205,204, 76, 63,205,204, 76, 63, 0, 0, 0, 0,
- 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 30, 90,100,191,154,153,153, 62,102,102,102, 63, 0, 0, 0, 0,
- 1, 0, 0, 0, 0, 0, 0, 0, 31,250,254, 62, 9, 0, 0, 63,156,153, 25, 63, 0, 0, 0, 0,205,204, 76, 62,205,204, 76, 62,
-205,204, 76, 62, 0, 0,128, 63, 44,135, 22, 63, 32,133,235, 62,184,243,125, 62, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
-195, 73, 76, 63, 42,135, 86, 63, 0, 0,128, 63, 0, 0, 0, 0, 1, 43,135, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
- 16, 47, 93, 62, 58,180,200,190, 24, 47, 93,190, 0, 0, 0, 0, 14, 0, 1, 0, 25, 0, 15, 0,120, 0, 60, 0, 3, 0, 5, 0,
-128, 0, 0, 0, 0, 0, 0, 0,144, 31, 15, 0, 6, 0, 25, 0, 8, 0, 10, 0,200, 0, 0, 0, 0, 0, 0, 0, 2, 0, 4, 0,
- 10, 0, 50, 0, 20, 0, 2, 0, 1, 0, 0, 0, 0, 0,128, 63, 60, 0, 0, 0, 0, 0, 2, 0, 2, 0, 8, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
- 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63,
- 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0,
- 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,
- 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63,
- 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0,
- 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,
- 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63,
- 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0,
- 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,
- 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63,
- 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0,
- 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,
- 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63,
- 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0,
- 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,
- 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63,
- 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0,
- 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,
- 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63,
- 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0,
- 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,
- 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63,
- 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 62, 0, 0, 0, 0, 68, 65, 84, 65,168, 36, 0, 0,
- 88,174,219, 3, 0, 0, 0, 0,206, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68,101,102, 97,117,108,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 25, 25, 25,255,153,153,153,255,100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0,
- 25, 25, 25,255,153,153,153,255,100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, 1, 0, 15, 0,241,255, 0, 0,
- 25, 25, 25,255,153,153,153,255,153,153,153,255, 90, 90, 90,255, 0, 0, 0,255,255,255,255,255, 1, 0, 0, 0, 25, 0, 0, 0,
- 0, 0, 0,255, 70, 70, 70,255, 86,128,194,255,255,255,255,255,255,255,255,255, 0, 0, 0,255, 1, 0, 15, 0,241,255, 0, 0,
- 0, 0, 0,255, 70, 70, 70,255, 70, 70, 70,255,255,255,255,255, 0, 0, 0,255,255,255,255,255, 1, 0, 15, 0,241,255, 0, 0,
- 25, 25, 25,255,153,153,153,255,100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0,
- 25, 25, 25,255,180,180,180,255,153,153,153,255, 90, 90, 90,255, 0, 0, 0,255,255,255,255,255, 1, 0,236,255, 0, 0, 0, 0,
- 25, 25, 25,255,180,180,180,255,153,153,153,255,128,128,128,255, 0, 0, 0,255,255,255,255,255, 1, 0,236,255, 0, 0, 0, 0,
- 0, 0, 0,255, 70, 70, 70,255, 70, 70, 70,255,255,255,255,255,255,255,255,255,204,204,204,255, 1, 0, 15, 0,241,255, 0, 0,
- 0, 0, 0,255, 63, 63, 63,255, 86,128,194,255,255,255,255,255, 0, 0, 0,255, 0, 0, 0,255, 0, 0, 25, 0,236,255, 0, 0,
- 0, 0, 0,255, 25, 25, 25,230, 45, 45, 45,230,100,100,100,255,160,160,160,255,255,255,255,255, 0, 0, 25, 0,236,255, 0, 0,
- 0, 0, 0,255, 0, 0, 0, 0, 86,128,194,255,172,172,172,128,255,255,255,255, 0, 0, 0,255, 1, 0, 38, 0, 0, 0, 0, 0,
- 0, 0, 0,255, 25, 25, 25,230, 45, 45, 45,230,100,100,100,255,255,255,255,255,255,255,255,255, 0, 0, 25, 0,236,255, 0, 0,
- 25, 25, 25,255,128,128,128,255,100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0,
- 50, 50, 50,180, 80, 80, 80,180,100,100,100,180,128,128,128,255, 0, 0, 0,255,255,255,255,255, 1, 0, 5, 0,251,255, 0, 0,
- 0, 0, 0,255,190,190,190,255,100,100,100,180, 68, 68, 68,255, 0, 0, 0,255,255,255,255,255, 0, 0, 5, 0,251,255, 0, 0,
- 0, 0, 0,255, 0, 0, 0, 0, 86,128,194,255, 0, 0, 0,255, 0, 0, 0,255, 0, 0, 0,255, 0, 0, 0, 0, 0, 0, 0, 0,
-115,190, 76,255, 90,166, 51,255,240,235,100,255,215,211, 75,255,180, 0,255,255,153, 0,230,255, 0, 0, 0, 63, 0, 0, 0, 0,
- 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,
+255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,
+255,255,255,255,130,130,130,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0,
+ 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,
+255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, 35, 97,221,255,200,200,200,255, 80,200,255, 80,
+ 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,219, 37, 18,255,240,255, 64,255,240,144,160,255,
+ 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255,
+ 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 57, 57, 57,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,
+255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,
+255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0,
+ 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,170, 64,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,
+255,160, 0,255,219, 37, 18,255, 32,255,255,255, 75, 75, 75,255,204, 0,153,255, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255,
+ 32, 0, 0,255, 0, 32, 0,255, 0, 0,128,255, 0, 0, 0, 0, 34,221,221,255, 35, 97,221,255,200,200,200,255, 80,200,255, 80,
+ 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,219, 37, 18,255,240,255, 64,255,240,144,160,255,
+255,255,255,255, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255,
+ 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0,200,200,200,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 76, 76, 76,255, 0, 0, 0, 0,250,250,250,255, 15, 15, 15,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,
+255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,102,102,102,255, 0, 0, 0,255, 0, 0, 0,255,
+255,255,255,255,145,145,145,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100,255,140, 25,255,
+250,250,250,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,130,130,130,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,
+255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, 35, 97,221,255,200,200,200,255, 80,200,255, 80,
+ 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,219, 37, 18,255,240,255, 64,255,240,144,160,255,
+ 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255,
+ 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+250,250,250,255, 0, 0, 0, 0,250,250,250,255,250,250,250,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,
+255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,102,102,102,255, 0, 0, 0,255, 0, 0, 0,255,
+255,255,255,255,255,255,255,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,150,150,150,100,112,112,112,100, 96,192, 64,255,
+ 94, 94, 94,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,140, 25,255, 79,101, 73,255,135,177,125,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,
+255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, 35, 97,221,255,200,200,200,255, 80,200,255, 80,
+ 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,219, 37, 18,255,240,255, 64,255,240,144,160,255,
+ 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255,153, 64, 48,255, 0, 0, 0,255,240,255, 64,255,
+ 64,192, 48,255,240,144,160,255,240,175,144,255, 82, 96,110,255,124,137,150,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,255,255,128, 0, 0, 0,255,255,133, 0,255, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,
+255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,
+255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0,
+ 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,
+255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, 35, 97,221,255,200,200,200,255, 80,200,255, 80,
+ 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,219, 37, 18,255,240,255, 64,255,240,144,160,255,
+ 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255,
+ 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,
+255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,102,102,102,255, 0, 0, 0,255, 0, 0, 0,255,
+255,255,255,255,255,255,255,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,150,150,150,100,112,112,112,100, 96,192, 64,255,
+ 94, 94, 94,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,140, 25,255, 79,101, 73,255,135,177,125,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,
+255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, 35, 97,221,255,200,200,200,255, 80,200,255, 80,
+ 12, 10, 10,128,255,140, 0,255, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,219, 37, 18,255,240,255, 64,255,240,144,160,255,
+ 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255,
+ 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 82, 96,110,255,124,137,150,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,255,255,128, 0, 0, 0,255,255,133, 0,255, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,
+255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,102,102,102,255, 0, 0, 0,255, 0, 0, 0,255,
+255,255,255,255,255,255,255,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,150,150,150,100,112,112,112,100, 96,192, 64,255,
+ 94, 94, 94,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,140, 25,255, 79,101, 73,255,135,177,125,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,
+255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, 35, 97,221,255,200,200,200,255, 80,200,255, 80,
+ 12, 10, 10,128,255,140, 0,255, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,219, 37, 18,255,240,255, 64,255,240,144,160,255,
+ 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255,
+ 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 82, 96,110,255,124,137,150,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,255,255,128, 0, 0, 0,255,255,133, 0,255, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,116,116,116,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,
+255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,
+255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0,
+ 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,
+255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, 35, 97,221,255,200,200,200,255, 80,200,255, 80,
+ 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,219, 37, 18,255,240,255, 64,255,240,144,160,255,
+ 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255,
+ 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 81,105,135,255, 32, 32,143,255,109, 88,129,255, 78,152, 62,255, 46,143,143,255,169, 84,124,255,126,126, 80,255,162, 95,111,255,
+109,145,131,255,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 53, 53, 53,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,
+255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,
+255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0,
+ 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,
+255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0,255,255,255, 10,255,133, 0, 60,255,133, 0,255,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, 35, 97,221,255,200,200,200,255, 80,200,255, 80,
+ 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,219, 37, 18,255,240,255, 64,255,240,144,160,255,
+ 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255,
+ 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+114,114,114,255, 18, 66,176, 38,255,133, 0,178,255,133, 0,127, 0,255, 0,255,255, 0, 0,255,225,210,195, 35, 0, 0, 0, 0,
+ 0, 0, 0, 0,153,153,153,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,
+255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,
+255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,143,143,143,255,198,119,119,255,255, 0, 0,255,
+ 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,
+255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, 35, 97,221,255,200,200,200,255, 80,200,255, 80,
+ 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,219, 37, 18,255,240,255, 64,255,240,144,160,255,
+ 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255,
+ 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0,100, 0, 0,255, 0, 0,200,255,128, 0, 80,255, 95, 95, 0,255, 0,100, 50,255,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,
+255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,
+255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0,
+ 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,
+255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, 35, 97,221,255,200,200,200,255, 80,200,255, 80,
+ 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,219, 37, 18,255,240,255, 64,255,240,144,160,255,
+ 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255,
+ 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51,127, 51, 76,
+130,135,140, 76,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,
+255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,
+255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,173,173,173,255,127,112,112,100, 0, 0, 0, 0,
+ 91, 91, 91,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,
+255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, 35, 97,221,255,200,200,200,255, 80,200,255, 80,
+ 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,219, 37, 18,255,240,255, 64,255,240,144,160,255,
+ 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255,
+ 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 57, 57, 57,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,
+255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,
+255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0,
+ 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,
+255,255,255,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, 35, 97,221,255,200,200,200,255, 80,200,255, 80,
+ 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,219, 37, 18,255,240,255, 64,255,240,144,160,255,
+ 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255,
+ 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 5,155,155,155,160,100,104,111,255,111,106,100,255,104,106,117,255,105,117,110,255,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,100,100,100,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,
+255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,
+255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0,
+ 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,
+255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, 35, 97,221,255,200,200,200,255, 80,200,255, 80,
+ 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,219, 37, 18,255,240,255, 64,255,240,144,160,255,
+ 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255,
+ 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,
+255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,
+255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0,
+ 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,
+255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, 35, 97,221,255,200,200,200,255, 80,200,255, 80,
+ 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,219, 37, 18,255,240,255, 64,255,240,144,160,255,
+ 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255,
+ 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,
+255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,
+255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0,
+ 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,
+255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, 35, 97,221,255,200,200,200,255, 80,200,255, 80,
+ 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,219, 37, 18,255,240,255, 64,255,240,144,160,255,
+ 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255,
+ 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96,128,255,255,255,255,255,255, 0,170, 0,255,
+220, 96, 96,255,220, 96, 96,255, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 57, 57, 57,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,
+255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,102,102,102,255, 0, 0, 0,255, 0, 0, 0,255,
+255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0,
+ 94, 94, 94,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,170, 64,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,
+255,160, 0,255,219, 37, 18,255, 32,255,255,255, 75, 75, 75,255,204, 0,153,255, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255,
+ 32, 0, 0,255, 0, 32, 0,255, 0, 0,128,255, 0, 0, 0, 0, 34,221,221,255, 35, 97,221,255,200,200,200,255, 80,200,255, 80,
+ 12, 10, 10,128,255,140, 0,255, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,219, 37, 18,255,240,255, 64,255,240,144,160,255,
+255,255,255,255, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255,
+ 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,255,255,128, 0, 0, 0,255,255,255, 0,255, 4, 0, 0, 0,255,127,127, 0,255,255,255,255,255,255,255, 0,
+255,127, 0, 0,255,127,127,127,255,200,200,200,255,255, 0, 0,255, 0, 0,255,255, 0, 0, 0,255, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,154, 0, 0,255,189, 17, 17,255,247, 10, 10,255, 0, 0, 0, 0,247, 64, 24,255,246,105, 19,255,250,153, 0,255,
+ 0, 0, 0, 0, 30,145, 9,255, 89,183, 11,255,131,239, 29,255, 0, 0, 0, 0, 10, 54,148,255, 54,103,223,255, 94,193,239,255,
+ 0, 0, 0, 0,169, 41, 78,255,193, 65,106,255,240, 93,145,255, 0, 0, 0, 0, 67, 12,120,255, 84, 58,163,255,135,100,213,255,
+ 0, 0, 0, 0, 36,120, 90,255, 60,149,121,255,111,182,171,255, 0, 0, 0, 0, 75,112,124,255,106,134,145,255,155,194,205,255,
+ 0, 0, 0, 0,244,201, 12,255,238,194, 54,255,243,255, 0,255, 0, 0, 0, 0, 30, 32, 36,255, 72, 76, 86,255,255,255,255,255,
+ 0, 0, 0, 0,111, 47,106,255,152, 69,190,255,211, 48,214,255, 0, 0, 0, 0,108,142, 34,255,127,176, 34,255,187,239, 91,255,
+ 0, 0, 0, 0,141,141,141,255,176,176,176,255,222,222,222,255, 0, 0, 0, 0,131, 67, 38,255,139, 88, 17,255,189,106, 17,255,
+ 0, 0, 0, 0, 8, 49, 14,255, 28, 67, 11,255, 52, 98, 43,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 0, 0, 0, 88, 49, 19, 7, 0, 0, 0, 0,207, 0, 0, 0,
+ 1, 0, 0, 0,248, 49, 19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,105,111, 95,115, 99,101,110,101, 95, 51,100,115,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 0, 0, 0,248, 49, 19, 7,
+ 0, 0, 0, 0,207, 0, 0, 0, 1, 0, 0, 0, 56,133, 20, 7, 0, 0, 0, 0, 88, 49, 19, 7, 0, 0, 0, 0,105,111, 95,115,
+ 99,101,110,101, 95,102, 98,120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 80, 0, 0, 0, 56,133, 20, 7, 0, 0, 0, 0,207, 0, 0, 0, 1, 0, 0, 0,216,133, 20, 7, 0, 0, 0, 0,248, 49, 19, 7,
+ 0, 0, 0, 0,105,111, 95, 97,110,105,109, 95, 98,118,104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 80, 0, 0, 0,216,133, 20, 7, 0, 0, 0, 0,207, 0, 0, 0, 1, 0, 0, 0,120,134, 20, 7,
+ 0, 0, 0, 0, 56,133, 20, 7, 0, 0, 0, 0,105,111, 95,109,101,115,104, 95,112,108,121, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 0, 0, 0,120,134, 20, 7, 0, 0, 0, 0,207, 0, 0, 0,
+ 1, 0, 0, 0, 24,135, 20, 7, 0, 0, 0, 0,216,133, 20, 7, 0, 0, 0, 0,105,111, 95,115, 99,101,110,101, 95,111, 98,106,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 0, 0, 0, 24,135, 20, 7,
+ 0, 0, 0, 0,207, 0, 0, 0, 1, 0, 0, 0,184,135, 20, 7, 0, 0, 0, 0,120,134, 20, 7, 0, 0, 0, 0,105,111, 95,115,
+ 99,101,110,101, 95,120, 51,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+ 80, 0, 0, 0,184,135, 20, 7, 0, 0, 0, 0,207, 0, 0, 0, 1, 0, 0, 0, 88,136, 20, 7, 0, 0, 0, 0, 24,135, 20, 7,
+ 0, 0, 0, 0,105,111, 95,109,101,115,104, 95,115,116,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 65, 84, 65, 80, 0, 0, 0, 88,136, 20, 7, 0, 0, 0, 0,207, 0, 0, 0, 1, 0, 0, 0,248,136, 20, 7,
+ 0, 0, 0, 0,184,135, 20, 7, 0, 0, 0, 0,105,111, 95,109,101,115,104, 95,117,118, 95,108, 97,121,111,117,116, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,
-114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,130,130,130,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255,
- 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0,
- 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255,
- 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,
-219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255,
- 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57, 57, 57,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,
-114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0,255,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,170, 64,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255,
- 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255, 32,255,255,255, 75, 75, 75,255,204, 0,153,255,
- 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 32, 0, 0,255, 0, 32, 0,255, 0, 0,128,255, 0, 0, 0, 0, 34,221,221,255,
- 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,
-219, 37, 18,255,240,255, 64,255,240,144,160,255,255,255,255,255, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255,
- 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,200,200,255, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 76, 76,255, 0, 0, 0, 0,250,250,250,255, 15, 15, 15,255,
-114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-102,102,102,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-160,160,160,100,127,112,112,100,255,140, 25,255,250,250,250,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,130,130,130,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255,
- 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0,
- 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255,
- 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,
-219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255,
- 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,250,250,250,255, 0, 0, 0, 0,250,250,250,255,250,250,250,255, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,
-114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-102,102,102,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,255,255,255,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-150,150,150,100,112,112,112,100, 96,192, 64,255, 94, 94, 94,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 79,101, 73,255,135,177,125,255,255,255,255,255,
- 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0,
- 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255,
- 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,
-219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255,
-153, 64, 48,255, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255,240,175,144,255, 82, 96,110,255,124,137,150,255,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0,255,255,133, 0,255, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,
-114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255,
- 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0,
- 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255,
- 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,
-219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255,
- 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,
-114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-102,102,102,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,255,255,255,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-150,150,150,100,112,112,112,100, 96,192, 64,255, 94, 94, 94,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 79,101, 73,255,135,177,125,255,255,255,255,255,
- 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0,
- 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255,
- 35, 97,221,255,200,200,200,255, 80,200,255, 80, 12, 10, 10,128,255,140, 0,255, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,
-219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255,
- 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 82, 96,110,255,124,137,150,255,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0,255,255,133, 0,255, 3, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,
-114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-102,102,102,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,255,255,255,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-150,150,150,100,112,112,112,100, 96,192, 64,255, 94, 94, 94,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 79,101, 73,255,135,177,125,255,255,255,255,255,
- 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0,
- 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255,
- 35, 97,221,255,200,200,200,255, 80,200,255, 80, 12, 10, 10,128,255,140, 0,255, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,
-219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255,
- 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 82, 96,110,255,124,137,150,255,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0,255,255,133, 0,255, 3, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,116,116,116,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,
-114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255,
- 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0,
- 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255,
- 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,
-219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255,
- 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81,105,135,255, 32, 32,143,255,109, 88,129,255, 78,152, 62,255, 46,143,143,255,
-169, 84,124,255,126,126, 80,255,162, 95,111,255,109,145,131,255,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, 53, 53,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,
-114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255,
- 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0,
-255,255,255, 10,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255,
- 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,
-219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255,
- 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,114,114,114,255, 18, 66,176, 38,255,133, 0,178,255,133, 0,127, 0,255, 0,255,
-255, 0, 0,255,225,210,195, 35, 0, 0, 0, 0, 0, 0, 0, 0,153,153,153,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,
-114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-143,143,143,255,198,119,119,255,255, 0, 0,255, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255,
- 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0,
- 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255,
- 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,
-219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255,
- 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0,100, 0, 0,255, 0, 0,200,255,
-128, 0, 80,255, 95, 95, 0,255, 0,100, 50,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,
-114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255,
- 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0,
- 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255,
- 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,
-219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255,
- 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 51,127, 51, 76,130,135,140, 76,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,
-114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-173,173,173,255,127,112,112,100, 0, 0, 0, 0, 91, 91, 91,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255,
- 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0,
- 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255,
- 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,
-219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255,
- 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57, 57, 57,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,
-114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255,
- 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,255,255,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0,
- 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255,
- 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,
-219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255,
- 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 5,155,155,155,160,100,104,111,255,
-111,106,100,255,104,106,117,255,105,117,110,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,100,100,100,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,
-114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255,
- 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0,
- 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255,
- 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,
-219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255,
- 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,
-114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255,
- 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0,
- 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255,
- 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,
-219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255,
- 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,
-114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255,
- 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0,
- 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255,
- 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,
-219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255,
- 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 96,128,255,255,255,255,255,255, 0,170, 0,255,220, 96, 96,255,220, 96, 96,255, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57, 57, 57,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,
-114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-160,160,160,100,127,112,112,100, 0, 0, 0, 0, 94, 94, 94,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0,255,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,170, 64,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255,
- 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255, 32,255,255,255, 75, 75, 75,255,204, 0,153,255,
- 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 32, 0, 0,255, 0, 32, 0,255, 0, 0,128,255, 0, 0, 0, 0, 34,221,221,255,
- 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,
-219, 37, 18,255,240,255, 64,255,240,144,160,255,255,255,255,255, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255,
- 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0,255,255,255, 0,255, 4, 0, 0, 0,
-255,127,127, 0,255,255,255,255,255,255,255, 0,255,127, 0, 0,255,127,127,127,255,200,200,200,255,255, 0, 0,255, 0, 0,255,
-255, 0, 0, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,154, 0, 0,255,189, 17, 17,255,247, 10, 10,255, 0, 0, 0, 0,
-247, 64, 24,255,246,105, 19,255,250,153, 0,255, 0, 0, 0, 0, 30,145, 9,255, 89,183, 11,255,131,239, 29,255, 0, 0, 0, 0,
- 10, 54,148,255, 54,103,223,255, 94,193,239,255, 0, 0, 0, 0,169, 41, 78,255,193, 65,106,255,240, 93,145,255, 0, 0, 0, 0,
- 67, 12,120,255, 84, 58,163,255,135,100,213,255, 0, 0, 0, 0, 36,120, 90,255, 60,149,121,255,111,182,171,255, 0, 0, 0, 0,
- 75,112,124,255,106,134,145,255,155,194,205,255, 0, 0, 0, 0,244,201, 12,255,238,194, 54,255,243,255, 0,255, 0, 0, 0, 0,
- 30, 32, 36,255, 72, 76, 86,255,255,255,255,255, 0, 0, 0, 0,111, 47,106,255,152, 69,190,255,211, 48,214,255, 0, 0, 0, 0,
-108,142, 34,255,127,176, 34,255,187,239, 91,255, 0, 0, 0, 0,141,141,141,255,176,176,176,255,222,222,222,255, 0, 0, 0, 0,
-131, 67, 38,255,139, 88, 17,255,189,106, 17,255, 0, 0, 0, 0, 8, 49, 14,255, 28, 67, 11,255, 52, 98, 43,255, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 0, 0, 0,
-184,211,219, 3, 0, 0, 0, 0,207, 0, 0, 0, 1, 0, 0, 0,136,212,219, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-105,111, 95,115, 99,101,110,101, 95, 51,100,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 80, 0, 0, 0,136,212,219, 3, 0, 0, 0, 0,207, 0, 0, 0, 1, 0, 0, 0, 88,213,219, 3, 0, 0, 0, 0,
-184,211,219, 3, 0, 0, 0, 0,105,111, 95,115, 99,101,110,101, 95,102, 98,120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 0, 0, 0, 88,213,219, 3, 0, 0, 0, 0,207, 0, 0, 0, 1, 0, 0, 0,
- 40,214,219, 3, 0, 0, 0, 0,136,212,219, 3, 0, 0, 0, 0,105,111, 95, 97,110,105,109, 95, 98,118,104, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 0, 0, 0, 40,214,219, 3, 0, 0, 0, 0,
-207, 0, 0, 0, 1, 0, 0, 0,248,214,219, 3, 0, 0, 0, 0, 88,213,219, 3, 0, 0, 0, 0,105,111, 95,109,101,115,104, 95,
-112,108,121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 0, 0, 0,
-248,214,219, 3, 0, 0, 0, 0,207, 0, 0, 0, 1, 0, 0, 0,200,215,219, 3, 0, 0, 0, 0, 40,214,219, 3, 0, 0, 0, 0,
-105,111, 95,115, 99,101,110,101, 95,111, 98,106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 80, 0, 0, 0,200,215,219, 3, 0, 0, 0, 0,207, 0, 0, 0, 1, 0, 0, 0,152,216,219, 3, 0, 0, 0, 0,
-248,214,219, 3, 0, 0, 0, 0,105,111, 95,115, 99,101,110,101, 95,120, 51,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 0, 0, 0,152,216,219, 3, 0, 0, 0, 0,207, 0, 0, 0, 1, 0, 0, 0,
-104,217,219, 3, 0, 0, 0, 0,200,215,219, 3, 0, 0, 0, 0,105,111, 95,109,101,115,104, 95,115,116,108, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 0, 0, 0,104,217,219, 3, 0, 0, 0, 0,
-207, 0, 0, 0, 1, 0, 0, 0, 56,218,219, 3, 0, 0, 0, 0,152,216,219, 3, 0, 0, 0, 0,105,111, 95,109,101,115,104, 95,
-117,118, 95,108, 97,121,111,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 0, 0, 0,
- 56,218,219, 3, 0, 0, 0, 0,207, 0, 0, 0, 1, 0, 0, 0, 8,219,219, 3, 0, 0, 0, 0,104,217,219, 3, 0, 0, 0, 0,
-105,111, 95, 99,117,114,118,101, 95,115,118,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 80, 0, 0, 0, 8,219,219, 3, 0, 0, 0, 0,207, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 56,218,219, 3, 0, 0, 0, 0, 99,121, 99,108,101,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,232, 0, 0, 0,200,154,199, 3, 0, 0, 0, 0,199, 0, 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,101,102, 97,117,108,116, 32, 83,116,121,108,101, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0,255,255, 0, 0,154,153, 25, 62, 0, 0,128, 63, 0, 0, 12, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0,255,255, 0, 0, 0, 0,128, 62, 0, 0, 0, 0, 0, 0, 11, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0,255,255, 0, 0,154,153, 25, 62, 0, 0,128, 63, 0, 0, 11, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 8, 0, 5, 0, 5, 0, 8, 0,
- 2, 0, 8, 0, 4, 0, 0, 0, 68, 78, 65, 49,136, 4, 1, 0,200,254,218, 15, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
- 83, 68, 78, 65, 78, 65, 77, 69, 58, 13, 0, 0, 42,110,101,120,116, 0, 42,112,114,101,118, 0, 42,100, 97,116, 97, 0, 42,102,
-105,114,115,116, 0, 42,108, 97,115,116, 0,120, 0,121, 0,122, 0,120,109,105,110, 0,120,109, 97,120, 0,121,109,105,110, 0,
-121,109, 97,120, 0, 42,112,111,105,110,116,101,114, 0,103,114,111,117,112, 0,118, 97,108, 0,118, 97,108, 50, 0,116,121,112,
-101, 0,115,117, 98,116,121,112,101, 0,102,108, 97,103, 0,110, 97,109,101, 91, 54, 52, 93, 0,115, 97,118,101,100, 0,100, 97,
-116, 97, 0,108,101,110, 0,116,111,116, 97,108,108,101,110, 0, 42,110,101,119,105,100, 0, 42,108,105, 98, 0,110, 97,109,101,
- 91, 54, 54, 93, 0,112, 97,100, 0,117,115, 0,105, 99,111,110, 95,105,100, 0,112, 97,100, 50, 0, 42,112,114,111,112,101,114,
-116,105,101,115, 0,105,100, 0, 42,105,100, 98,108,111, 99,107, 0, 42,102,105,108,101,100, 97,116, 97, 0,110, 97,109,101, 91,
- 49, 48, 50, 52, 93, 0,102,105,108,101,112, 97,116,104, 91, 49, 48, 50, 52, 93, 0,116,111,116, 0, 42,112, 97,114,101,110,116,
- 0,119, 91, 50, 93, 0,104, 91, 50, 93, 0, 99,104, 97,110,103,101,100, 91, 50, 93, 0, 99,104, 97,110,103,101,100, 95,116,105,
-109,101,115,116, 97,109,112, 91, 50, 93, 0, 42,114,101, 99,116, 91, 50, 93, 0, 42,111, 98, 0, 98,108,111, 99,107,116,121,112,
-101, 0, 97,100,114, 99,111,100,101, 0,110, 97,109,101, 91, 49, 50, 56, 93, 0, 42, 98,112, 0, 42, 98,101,122,116, 0,109, 97,
-120,114, 99,116, 0,116,111,116,114, 99,116, 0,118, 97,114,116,121,112,101, 0,116,111,116,118,101,114,116, 0,105,112,111, 0,
-101,120,116,114, 97,112, 0,114,116, 0, 98,105,116,109, 97,115,107, 0,115,108,105,100,101, 95,109,105,110, 0,115,108,105,100,
-101, 95,109, 97,120, 0, 99,117,114,118, 97,108, 0, 42,100,114,105,118,101,114, 0, 99,117,114,118,101, 0, 99,117,114, 0,115,
-104,111,119,107,101,121, 0,109,117,116,101,105,112,111, 0,112,111,115, 0,114,101,108, 97,116,105,118,101, 0,116,111,116,101,
-108,101,109, 0, 42,119,101,105,103,104,116,115, 0,118,103,114,111,117,112, 91, 54, 52, 93, 0,115,108,105,100,101,114,109,105,
-110, 0,115,108,105,100,101,114,109, 97,120, 0,117,105,100, 0,112, 97,100, 51, 0, 42, 97,100,116, 0, 42,114,101,102,107,101,
-121, 0,101,108,101,109,115,116,114, 91, 54, 52, 93, 0,101,108,101,109,115,105,122,101, 0, 98,108,111, 99,107, 0, 42,105,112,
-111, 0, 42,102,114,111,109, 0,116,111,116,107,101,121, 0,115,108,117,114,112,104, 0,117,105,100,103,101,110, 0, 42,108,105,
-110,101, 0, 42,102,111,114,109, 97,116, 0, 98,108,101,110, 0,108,105,110,101,110,111, 0,115,116, 97,114,116, 0,101,110,100,
- 0,112, 97,100, 49, 0,102,108, 97,103,115, 0, 99,111,108,111,114, 91, 52, 93, 0,112, 97,100, 91, 52, 93, 0, 42,110, 97,109,
-101, 0,110,108,105,110,101,115, 0,108,105,110,101,115, 0, 42, 99,117,114,108, 0, 42,115,101,108,108, 0, 99,117,114, 99, 0,
-115,101,108, 99, 0,109, 97,114,107,101,114,115, 0, 42,117,110,100,111, 95, 98,117,102, 0,117,110,100,111, 95,112,111,115, 0,
-117,110,100,111, 95,108,101,110, 0, 42, 99,111,109,112,105,108,101,100, 0,109,116,105,109,101, 0,115,105,122,101, 0,115,101,
-101,107, 0,100,116,120, 0,112, 97,115,115,101,112, 97,114,116, 97,108,112,104, 97, 0, 99,108,105,112,115,116, 97, 0, 99,108,
-105,112,101,110,100, 0,108,101,110,115, 0,111,114,116,104,111, 95,115, 99, 97,108,101, 0,100,114, 97,119,115,105,122,101, 0,
-115,101,110,115,111,114, 95,120, 0,115,101,110,115,111,114, 95,121, 0,115,104,105,102,116,120, 0,115,104,105,102,116,121, 0,
- 89, 70, 95,100,111,102,100,105,115,116, 0, 42,100,111,102, 95,111, 98, 0,115,101,110,115,111,114, 95,102,105,116, 0,112, 97,
-100, 91, 55, 93, 0, 42,115, 99,101,110,101, 0,102,114, 97,109,101,110,114, 0,102,114, 97,109,101,115, 0,111,102,102,115,101,
-116, 0,115,102,114, 97, 0,102,105,101, 95,105,109, 97, 0, 99,121, 99,108, 0,111,107, 0,109,117,108,116,105, 95,105,110,100,
-101,120, 0,108, 97,121,101,114, 0,112, 97,115,115, 0,105, 98,117,102,115, 0, 42,103,112,117,116,101,120,116,117,114,101, 0,
- 42, 97,110,105,109, 0, 42,114,114, 0, 42,114,101,110,100,101,114,115, 91, 56, 93, 0,114,101,110,100,101,114, 95,115,108,111,
-116, 0,108, 97,115,116, 95,114,101,110,100,101,114, 95,115,108,111,116, 0,115,111,117,114, 99,101, 0,108, 97,115,116,102,114,
- 97,109,101, 0,116,112, 97,103,101,102,108, 97,103, 0,116,111,116, 98,105,110,100, 0,120,114,101,112, 0,121,114,101,112, 0,
-116,119,115,116, 97, 0,116,119,101,110,100, 0, 98,105,110,100, 99,111,100,101, 0, 42,114,101,112, 98,105,110,100, 0, 42,112,
- 97, 99,107,101,100,102,105,108,101, 0, 42,112,114,101,118,105,101,119, 0,108, 97,115,116,117,112,100, 97,116,101, 0,108, 97,
-115,116,117,115,101,100, 0, 97,110,105,109,115,112,101,101,100, 0,103,101,110, 95,120, 0,103,101,110, 95,121, 0,103,101,110,
- 95,116,121,112,101, 0,103,101,110, 95,102,108, 97,103, 0, 97,115,112,120, 0, 97,115,112,121, 0,116,101,120, 99,111, 0,109,
- 97,112,116,111, 0,109, 97,112,116,111,110,101,103, 0, 98,108,101,110,100,116,121,112,101, 0, 42,111, 98,106,101, 99,116, 0,
- 42,116,101,120, 0,117,118,110, 97,109,101, 91, 54, 52, 93, 0,112,114,111,106,120, 0,112,114,111,106,121, 0,112,114,111,106,
-122, 0,109, 97,112,112,105,110,103, 0,111,102,115, 91, 51, 93, 0,115,105,122,101, 91, 51, 93, 0,114,111,116, 0,116,101,120,
-102,108, 97,103, 0, 99,111,108,111,114,109,111,100,101,108, 0,112,109, 97,112,116,111, 0,112,109, 97,112,116,111,110,101,103,
- 0,110,111,114,109, 97,112,115,112, 97, 99,101, 0,119,104,105, 99,104, 95,111,117,116,112,117,116, 0, 98,114,117,115,104, 95,
-109, 97,112, 95,109,111,100,101, 0,114, 0,103, 0, 98, 0,107, 0,100,101,102, 95,118, 97,114, 0, 99,111,108,102, 97, 99, 0,
-118, 97,114,102, 97, 99, 0,110,111,114,102, 97, 99, 0,100,105,115,112,102, 97, 99, 0,119, 97,114,112,102, 97, 99, 0, 99,111,
-108,115,112,101, 99,102, 97, 99, 0,109,105,114,114,102, 97, 99, 0, 97,108,112,104, 97,102, 97, 99, 0,100,105,102,102,102, 97,
- 99, 0,115,112,101, 99,102, 97, 99, 0,101,109,105,116,102, 97, 99, 0,104, 97,114,100,102, 97, 99, 0,114, 97,121,109,105,114,
-114,102, 97, 99, 0,116,114, 97,110,115,108,102, 97, 99, 0, 97,109, 98,102, 97, 99, 0, 99,111,108,101,109,105,116,102, 97, 99,
- 0, 99,111,108,114,101,102,108,102, 97, 99, 0, 99,111,108,116,114, 97,110,115,102, 97, 99, 0,100,101,110,115,102, 97, 99, 0,
-115, 99, 97,116,116,101,114,102, 97, 99, 0,114,101,102,108,102, 97, 99, 0,116,105,109,101,102, 97, 99, 0,108,101,110,103,116,
-104,102, 97, 99, 0, 99,108,117,109,112,102, 97, 99, 0,100, 97,109,112,102, 97, 99, 0,107,105,110,107,102, 97, 99, 0,114,111,
-117,103,104,102, 97, 99, 0,112, 97,100,101,110,115,102, 97, 99, 0,103,114, 97,118,105,116,121,102, 97, 99, 0,108,105,102,101,
-102, 97, 99, 0,115,105,122,101,102, 97, 99, 0,105,118,101,108,102, 97, 99, 0,102,105,101,108,100,102, 97, 99, 0,115,104, 97,
-100,111,119,102, 97, 99, 0,122,101,110,117,112,102, 97, 99, 0,122,101,110,100,111,119,110,102, 97, 99, 0, 98,108,101,110,100,
-102, 97, 99, 0, 42,104, 97,110,100,108,101, 0, 42,112,110, 97,109,101, 0, 42,115,116,110, 97,109,101,115, 0,115,116,121,112,
-101,115, 0,118, 97,114,115, 0, 42,118, 97,114,115,116,114, 0, 42,114,101,115,117,108,116, 0, 42, 99,102,114, 97, 0,100, 97,
-116, 97, 91, 51, 50, 93, 0, 40, 42,100,111,105,116, 41, 40, 41, 0, 40, 42,105,110,115,116, 97,110, 99,101, 95,105,110,105,116,
- 41, 40, 41, 0, 40, 42, 99, 97,108,108, 98, 97, 99,107, 41, 40, 41, 0,118,101,114,115,105,111,110, 0, 97, 0,105,112,111,116,
-121,112,101, 0, 42,105,109, 97, 0, 42, 99,117, 98,101, 91, 54, 93, 0,105,109, 97,116, 91, 52, 93, 91, 52, 93, 0,111, 98,105,
-109, 97,116, 91, 51, 93, 91, 51, 93, 0,115,116,121,112,101, 0,118,105,101,119,115, 99, 97,108,101, 0,110,111,116,108, 97,121,
- 0, 99,117, 98,101,114,101,115, 0,100,101,112,116,104, 0,114,101, 99, 97,108, 99, 0,108, 97,115,116,115,105,122,101, 0,102,
- 97,108,108,111,102,102, 95,116,121,112,101, 0,102, 97,108,108,111,102,102, 95,115,111,102,116,110,101,115,115, 0,114, 97,100,
-105,117,115, 0, 99,111,108,111,114, 95,115,111,117,114, 99,101, 0,116,111,116,112,111,105,110,116,115, 0,112,100,112, 97,100,
- 0,112,115,121,115, 0,112,115,121,115, 95, 99, 97, 99,104,101, 95,115,112, 97, 99,101, 0,111, 98, 95, 99, 97, 99,104,101, 95,
-115,112, 97, 99,101, 0, 42,112,111,105,110,116, 95,116,114,101,101, 0, 42,112,111,105,110,116, 95,100, 97,116, 97, 0,110,111,
-105,115,101, 95,115,105,122,101, 0,110,111,105,115,101, 95,100,101,112,116,104, 0,110,111,105,115,101, 95,105,110,102,108,117,
-101,110, 99,101, 0,110,111,105,115,101, 95, 98, 97,115,105,115, 0,112,100,112, 97,100, 51, 91, 51, 93, 0,110,111,105,115,101,
- 95,102, 97, 99, 0,115,112,101,101,100, 95,115, 99, 97,108,101, 0,102, 97,108,108,111,102,102, 95,115,112,101,101,100, 95,115,
- 99, 97,108,101, 0,112,100,112, 97,100, 50, 0, 42, 99,111, 98, 97, 0, 42,102, 97,108,108,111,102,102, 95, 99,117,114,118,101,
- 0,114,101,115,111,108, 91, 51, 93, 0,105,110,116,101,114,112, 95,116,121,112,101, 0,102,105,108,101, 95,102,111,114,109, 97,
-116, 0,101,120,116,101,110,100, 0,115,109,111,107,101,100, 95,116,121,112,101, 0,105,110,116, 95,109,117,108,116,105,112,108,
-105,101,114, 0,115,116,105,108,108, 95,102,114, 97,109,101, 0,115,111,117,114, 99,101, 95,112, 97,116,104, 91, 49, 48, 50, 52,
- 93, 0, 42,100, 97,116, 97,115,101,116, 0, 99, 97, 99,104,101,100,102,114, 97,109,101, 0,111, 99,101, 97,110,109,111,100, 91,
- 54, 52, 93, 0,111,117,116,112,117,116, 0,110,111,105,115,101,115,105,122,101, 0,116,117,114, 98,117,108, 0, 98,114,105,103,
-104,116, 0, 99,111,110,116,114, 97,115,116, 0,115, 97,116,117,114, 97,116,105,111,110, 0,114,102, 97, 99, 0,103,102, 97, 99,
- 0, 98,102, 97, 99, 0,102,105,108,116,101,114,115,105,122,101, 0,109,103, 95, 72, 0,109,103, 95,108, 97, 99,117,110, 97,114,
-105,116,121, 0,109,103, 95,111, 99,116, 97,118,101,115, 0,109,103, 95,111,102,102,115,101,116, 0,109,103, 95,103, 97,105,110,
- 0,100,105,115,116, 95, 97,109,111,117,110,116, 0,110,115, 95,111,117,116,115, 99, 97,108,101, 0,118,110, 95,119, 49, 0,118,
-110, 95,119, 50, 0,118,110, 95,119, 51, 0,118,110, 95,119, 52, 0,118,110, 95,109,101,120,112, 0,118,110, 95,100,105,115,116,
-109, 0,118,110, 95, 99,111,108,116,121,112,101, 0,110,111,105,115,101,100,101,112,116,104, 0,110,111,105,115,101,116,121,112,
-101, 0,110,111,105,115,101, 98, 97,115,105,115, 0,110,111,105,115,101, 98, 97,115,105,115, 50, 0,105,109, 97,102,108, 97,103,
- 0, 99,114,111,112,120,109,105,110, 0, 99,114,111,112,121,109,105,110, 0, 99,114,111,112,120,109, 97,120, 0, 99,114,111,112,
-121,109, 97,120, 0,116,101,120,102,105,108,116,101,114, 0, 97,102,109, 97,120, 0,120,114,101,112,101, 97,116, 0,121,114,101,
-112,101, 97,116, 0, 99,104,101, 99,107,101,114,100,105,115,116, 0,110, 97, 98,108, 97, 0,105,117,115,101,114, 0, 42,110,111,
-100,101,116,114,101,101, 0, 42,112,108,117,103,105,110, 0, 42,101,110,118, 0, 42,112,100, 0, 42,118,100, 0, 42,111,116, 0,
-117,115,101, 95,110,111,100,101,115, 0,108,111, 99, 91, 51, 93, 0,114,111,116, 91, 51, 93, 0,109, 97,116, 91, 52, 93, 91, 52,
- 93, 0,109,105,110, 91, 51, 93, 0,109, 97,120, 91, 51, 93, 0, 99,111, 98, 97, 0, 98,108,101,110,100, 95, 99,111,108,111,114,
- 91, 51, 93, 0, 98,108,101,110,100, 95,102, 97, 99,116,111,114, 0, 98,108,101,110,100, 95,116,121,112,101, 0,112, 97,100, 91,
- 51, 93, 0,109,111,100,101, 0,116,111,116,101,120, 0,115,104,100,119,114, 0,115,104,100,119,103, 0,115,104,100,119, 98, 0,
-115,104,100,119,112, 97,100, 0,101,110,101,114,103,121, 0,100,105,115,116, 0,115,112,111,116,115,105,122,101, 0,115,112,111,
-116, 98,108,101,110,100, 0,104, 97,105,110,116, 0, 97,116,116, 49, 0, 97,116,116, 50, 0, 42, 99,117,114,102, 97,108,108,111,
-102,102, 0,115,104, 97,100,115,112,111,116,115,105,122,101, 0, 98,105, 97,115, 0,115,111,102,116, 0, 99,111,109,112,114,101,
-115,115,116,104,114,101,115,104, 0,112, 97,100, 53, 91, 51, 93, 0, 98,117,102,115,105,122,101, 0,115, 97,109,112, 0, 98,117,
-102,102,101,114,115, 0,102,105,108,116,101,114,116,121,112,101, 0, 98,117,102,102,108, 97,103, 0, 98,117,102,116,121,112,101,
- 0,114, 97,121, 95,115, 97,109,112, 0,114, 97,121, 95,115, 97,109,112,121, 0,114, 97,121, 95,115, 97,109,112,122, 0,114, 97,
-121, 95,115, 97,109,112, 95,116,121,112,101, 0, 97,114,101, 97, 95,115,104, 97,112,101, 0, 97,114,101, 97, 95,115,105,122,101,
- 0, 97,114,101, 97, 95,115,105,122,101,121, 0, 97,114,101, 97, 95,115,105,122,101,122, 0, 97,100, 97,112,116, 95,116,104,114,
-101,115,104, 0,114, 97,121, 95,115, 97,109,112, 95,109,101,116,104,111,100, 0,116,101,120, 97, 99,116, 0,115,104, 97,100,104,
- 97,108,111,115,116,101,112, 0,115,117,110, 95,101,102,102,101, 99,116, 95,116,121,112,101, 0,115,107,121, 98,108,101,110,100,
-116,121,112,101, 0,104,111,114,105,122,111,110, 95, 98,114,105,103,104,116,110,101,115,115, 0,115,112,114,101, 97,100, 0,115,
-117,110, 95, 98,114,105,103,104,116,110,101,115,115, 0,115,117,110, 95,115,105,122,101, 0, 98, 97, 99,107,115, 99, 97,116,116,
-101,114,101,100, 95,108,105,103,104,116, 0,115,117,110, 95,105,110,116,101,110,115,105,116,121, 0, 97,116,109, 95,116,117,114,
- 98,105,100,105,116,121, 0, 97,116,109, 95,105,110,115, 99, 97,116,116,101,114,105,110,103, 95,102, 97, 99,116,111,114, 0, 97,
-116,109, 95,101,120,116,105,110, 99,116,105,111,110, 95,102, 97, 99,116,111,114, 0, 97,116,109, 95,100,105,115,116, 97,110, 99,
-101, 95,102, 97, 99,116,111,114, 0,115,107,121, 98,108,101,110,100,102, 97, 99, 0,115,107,121, 95,101,120,112,111,115,117,114,
-101, 0,115,107,121, 95, 99,111,108,111,114,115,112, 97, 99,101, 0,112, 97,100, 52, 91, 54, 93, 0, 42,109,116,101,120, 91, 49,
- 56, 93, 0,112,114, 95,116,101,120,116,117,114,101, 0,112, 97,100, 54, 91, 52, 93, 0,100,101,110,115,105,116,121, 0,101,109,
-105,115,115,105,111,110, 0,115, 99, 97,116,116,101,114,105,110,103, 0,114,101,102,108,101, 99,116,105,111,110, 0,101,109,105,
-115,115,105,111,110, 95, 99,111,108, 91, 51, 93, 0,116,114, 97,110,115,109,105,115,115,105,111,110, 95, 99,111,108, 91, 51, 93,
- 0,114,101,102,108,101, 99,116,105,111,110, 95, 99,111,108, 91, 51, 93, 0,100,101,110,115,105,116,121, 95,115, 99, 97,108,101,
- 0,100,101,112,116,104, 95, 99,117,116,111,102,102, 0, 97,115,121,109,109,101,116,114,121, 0,115,116,101,112,115,105,122,101,
- 95,116,121,112,101, 0,115,104, 97,100,101,102,108, 97,103, 0,115,104, 97,100,101, 95,116,121,112,101, 0,112,114,101, 99, 97,
- 99,104,101, 95,114,101,115,111,108,117,116,105,111,110, 0,115,116,101,112,115,105,122,101, 0,109,115, 95,100,105,102,102, 0,
-109,115, 95,105,110,116,101,110,115,105,116,121, 0,109,115, 95,115,112,114,101, 97,100, 0, 97,108,112,104, 97, 95, 98,108,101,
-110,100, 0,102, 97, 99,101, 95,111,114,105,101,110,116, 97,116,105,111,110, 0,109, 97,116,101,114,105, 97,108, 95,116,121,112,
-101, 0,115,112,101, 99,114, 0,115,112,101, 99,103, 0,115,112,101, 99, 98, 0,109,105,114,114, 0,109,105,114,103, 0,109,105,
-114, 98, 0, 97,109, 98,114, 0, 97,109, 98, 98, 0, 97,109, 98,103, 0, 97,109, 98, 0,101,109,105,116, 0, 97,110,103, 0,115,
-112,101, 99,116,114, 97, 0,114, 97,121, 95,109,105,114,114,111,114, 0, 97,108,112,104, 97, 0,114,101,102, 0,115,112,101, 99,
- 0,122,111,102,102,115, 0, 97,100,100, 0,116,114, 97,110,115,108,117, 99,101,110, 99,121, 0,118,111,108, 0,103, 97,109,101,
- 0,102,114,101,115,110,101,108, 95,109,105,114, 0,102,114,101,115,110,101,108, 95,109,105,114, 95,105, 0,102,114,101,115,110,
-101,108, 95,116,114, 97, 0,102,114,101,115,110,101,108, 95,116,114, 97, 95,105, 0,102,105,108,116,101,114, 0,116,120, 95,108,
-105,109,105,116, 0,116,120, 95,102, 97,108,108,111,102,102, 0,114, 97,121, 95,100,101,112,116,104, 0,114, 97,121, 95,100,101,
-112,116,104, 95,116,114, 97, 0,104, 97,114, 0,115,101,101,100, 49, 0,115,101,101,100, 50, 0,103,108,111,115,115, 95,109,105,
-114, 0,103,108,111,115,115, 95,116,114, 97, 0,115, 97,109,112, 95,103,108,111,115,115, 95,109,105,114, 0,115, 97,109,112, 95,
-103,108,111,115,115, 95,116,114, 97, 0, 97,100, 97,112,116, 95,116,104,114,101,115,104, 95,109,105,114, 0, 97,100, 97,112,116,
- 95,116,104,114,101,115,104, 95,116,114, 97, 0, 97,110,105,115,111, 95,103,108,111,115,115, 95,109,105,114, 0,100,105,115,116,
- 95,109,105,114, 0,102, 97,100,101,116,111, 95,109,105,114, 0,115,104, 97,100,101, 95,102,108, 97,103, 0,109,111,100,101, 95,
-108, 0,102,108, 97,114,101, 99, 0,115,116, 97,114, 99, 0,108,105,110,101, 99, 0,114,105,110,103, 99, 0,104, 97,115,105,122,
-101, 0,102,108, 97,114,101,115,105,122,101, 0,115,117, 98,115,105,122,101, 0,102,108, 97,114,101, 98,111,111,115,116, 0,115,
-116,114, 97,110,100, 95,115,116, 97, 0,115,116,114, 97,110,100, 95,101,110,100, 0,115,116,114, 97,110,100, 95,101, 97,115,101,
- 0,115,116,114, 97,110,100, 95,115,117,114,102,110,111,114, 0,115,116,114, 97,110,100, 95,109,105,110, 0,115,116,114, 97,110,
-100, 95,119,105,100,116,104,102, 97,100,101, 0,115,116,114, 97,110,100, 95,117,118,110, 97,109,101, 91, 54, 52, 93, 0,115, 98,
-105, 97,115, 0,108, 98,105, 97,115, 0,115,104, 97,100, 95, 97,108,112,104, 97, 0,115,101,112,116,101,120, 0,114,103, 98,115,
-101,108, 0,112,114, 95,116,121,112,101, 0,112,114, 95, 98, 97, 99,107, 0,112,114, 95,108, 97,109,112, 0,109,108, 95,102,108,
- 97,103, 0,100,105,102,102, 95,115,104, 97,100,101,114, 0,115,112,101, 99, 95,115,104, 97,100,101,114, 0,114,111,117,103,104,
-110,101,115,115, 0,114,101,102,114, 97, 99, 0,112, 97,114, 97,109, 91, 52, 93, 0,114,109,115, 0,100, 97,114,107,110,101,115,
-115, 0, 42,114, 97,109,112, 95, 99,111,108, 0, 42,114, 97,109,112, 95,115,112,101, 99, 0,114, 97,109,112,105,110, 95, 99,111,
-108, 0,114, 97,109,112,105,110, 95,115,112,101, 99, 0,114, 97,109,112, 98,108,101,110,100, 95, 99,111,108, 0,114, 97,109,112,
- 98,108,101,110,100, 95,115,112,101, 99, 0,114, 97,109,112, 95,115,104,111,119, 0,114, 97,109,112,102, 97, 99, 95, 99,111,108,
- 0,114, 97,109,112,102, 97, 99, 95,115,112,101, 99, 0, 42,103,114,111,117,112, 0,102,114,105, 99,116,105,111,110, 0,102,104,
- 0,114,101,102,108,101, 99,116, 0,102,104,100,105,115,116, 0,120,121,102,114,105, 99,116, 0,100,121,110, 97,109,111,100,101,
- 0,115,115,115, 95,114, 97,100,105,117,115, 91, 51, 93, 0,115,115,115, 95, 99,111,108, 91, 51, 93, 0,115,115,115, 95,101,114,
-114,111,114, 0,115,115,115, 95,115, 99, 97,108,101, 0,115,115,115, 95,105,111,114, 0,115,115,115, 95, 99,111,108,102, 97, 99,
- 0,115,115,115, 95,116,101,120,102, 97, 99, 0,115,115,115, 95,102,114,111,110,116, 0,115,115,115, 95, 98, 97, 99,107, 0,115,
-115,115, 95,102,108, 97,103, 0,115,115,115, 95,112,114,101,115,101,116, 0,109, 97,112,116,111, 95,116,101,120,116,117,114,101,
-100, 0,115,104, 97,100,111,119,111,110,108,121, 95,102,108, 97,103, 0,105,110,100,101,120, 0,103,112,117,109, 97,116,101,114,
-105, 97,108, 0, 42, 98, 98, 0,115,101,108, 99,111,108, 49, 0,115,101,108, 99,111,108, 50, 0,113,117, 97,116, 91, 52, 93, 0,
-101,120,112,120, 0,101,120,112,121, 0,101,120,112,122, 0,114, 97,100, 0,114, 97,100, 50, 0,115, 0, 42,109, 97,116, 0, 42,
-105,109, 97,116, 0,101,108,101,109,115, 0,100,105,115,112, 0, 42,101,100,105,116,101,108,101,109,115, 0, 42, 42,109, 97,116,
- 0,102,108, 97,103, 50, 0,116,111,116, 99,111,108, 0,119,105,114,101,115,105,122,101, 0,114,101,110,100,101,114,115,105,122,
-101, 0,116,104,114,101,115,104, 0, 42,108, 97,115,116,101,108,101,109, 0,118,101, 99, 91, 51, 93, 91, 51, 93, 0, 97,108,102,
- 97, 0,119,101,105,103,104,116, 0,104, 49, 0,104, 50, 0,102, 49, 0,102, 50, 0,102, 51, 0,104,105,100,101, 0,118,101, 99,
- 91, 52, 93, 0,109, 97,116, 95,110,114, 0,112,110,116,115,117, 0,112,110,116,115,118, 0,114,101,115,111,108,117, 0,114,101,
-115,111,108,118, 0,111,114,100,101,114,117, 0,111,114,100,101,114,118, 0,102,108, 97,103,117, 0,102,108, 97,103,118, 0, 42,
-107,110,111,116,115,117, 0, 42,107,110,111,116,115,118, 0,116,105,108,116, 95,105,110,116,101,114,112, 0,114, 97,100,105,117,
-115, 95,105,110,116,101,114,112, 0, 99,104, 97,114,105,100,120, 0,107,101,114,110, 0,119, 0,104, 0,110,117,114, 98,115, 0,
- 42,107,101,121,105,110,100,101,120, 0,115,104, 97,112,101,110,114, 0,110,117,114, 98, 0, 42,101,100,105,116,110,117,114, 98,
- 0, 42, 98,101,118,111, 98,106, 0, 42,116, 97,112,101,114,111, 98,106, 0, 42,116,101,120,116,111,110, 99,117,114,118,101, 0,
- 42,112, 97,116,104, 0, 42,107,101,121, 0, 98,101,118, 0,100,114, 97,119,102,108, 97,103, 0,116,119,105,115,116, 95,109,111,
-100,101, 0,116,119,105,115,116, 95,115,109,111,111,116,104, 0,115,109, 97,108,108, 99, 97,112,115, 95,115, 99, 97,108,101, 0,
-112, 97,116,104,108,101,110, 0, 98,101,118,114,101,115,111,108, 0,119,105,100,116,104, 0,101,120,116, 49, 0,101,120,116, 50,
- 0,114,101,115,111,108,117, 95,114,101,110, 0,114,101,115,111,108,118, 95,114,101,110, 0, 97, 99,116,110,117, 0, 42,108, 97,
-115,116,115,101,108, 0,115,112, 97, 99,101,109,111,100,101, 0,115,112, 97, 99,105,110,103, 0,108,105,110,101,100,105,115,116,
- 0,115,104,101, 97,114, 0,102,115,105,122,101, 0,119,111,114,100,115,112, 97, 99,101, 0,117,108,112,111,115, 0,117,108,104,
-101,105,103,104,116, 0,120,111,102, 0,121,111,102, 0,108,105,110,101,119,105,100,116,104, 0, 42,115,116,114, 0, 42,115,101,
-108, 98,111,120,101,115, 0, 42,101,100,105,116,102,111,110,116, 0,102, 97,109,105,108,121, 91, 50, 52, 93, 0, 42,118,102,111,
-110,116, 0, 42,118,102,111,110,116, 98, 0, 42,118,102,111,110,116,105, 0, 42,118,102,111,110,116, 98,105, 0,115,101,112, 99,
-104, 97,114, 0, 99,116,105,109,101, 0,116,111,116, 98,111,120, 0, 97, 99,116, 98,111,120, 0, 42,116, 98, 0,115,101,108,115,
-116, 97,114,116, 0,115,101,108,101,110,100, 0, 42,115,116,114,105,110,102,111, 0, 99,117,114,105,110,102,111, 0, 42,109,112,
-111,108,121, 0, 42,109,116,112,111,108,121, 0, 42,109,108,111,111,112, 0, 42,109,108,111,111,112,117,118, 0, 42,109,108,111,
-111,112, 99,111,108, 0, 42,109,102, 97, 99,101, 0, 42,109,116,102, 97, 99,101, 0, 42,116,102, 97, 99,101, 0, 42,109,118,101,
-114,116, 0, 42,109,101,100,103,101, 0, 42,100,118,101,114,116, 0, 42,109, 99,111,108, 0, 42,109,115,116,105, 99,107,121, 0,
- 42,116,101,120, 99,111,109,101,115,104, 0, 42,109,115,101,108,101, 99,116, 0, 42,101,100,105,116, 95, 98,116,109,101,115,104,
- 0,118,100, 97,116, 97, 0,101,100, 97,116, 97, 0,102,100, 97,116, 97, 0,112,100, 97,116, 97, 0,108,100, 97,116, 97, 0,116,
-111,116,101,100,103,101, 0,116,111,116,102, 97, 99,101, 0,116,111,116,115,101,108,101, 99,116, 0,116,111,116,112,111,108,121,
- 0,116,111,116,108,111,111,112, 0, 97, 99,116, 95,102, 97, 99,101, 0,115,109,111,111,116,104,114,101,115,104, 0,115,117, 98,
-100,105,118, 0,115,117, 98,100,105,118,114, 0,115,117, 98,115,117,114,102,116,121,112,101, 0,101,100,105,116,102,108, 97,103,
- 0, 42,109,114, 0, 42,116,112, 97,103,101, 0,117,118, 91, 52, 93, 91, 50, 93, 0, 99,111,108, 91, 52, 93, 0,116,114, 97,110,
-115,112, 0,116,105,108,101, 0,117,110,119,114, 97,112, 0,118, 49, 0,118, 50, 0,118, 51, 0,118, 52, 0,101,100, 99,111,100,
-101, 0, 99,114,101, 97,115,101, 0, 98,119,101,105,103,104,116, 0,100,101,102, 95,110,114, 0, 42,100,119, 0,116,111,116,119,
-101,105,103,104,116, 0, 99,111, 91, 51, 93, 0,110,111, 91, 51, 93, 0,108,111,111,112,115,116, 97,114,116, 0,118, 0,101, 0,
-117,118, 91, 50, 93, 0, 99,111, 91, 50, 93, 0,102, 0,105, 0,115, 91, 50, 53, 54, 93, 0,116,111,116,100,105,115,112, 0,108,
-101,118,101,108, 0, 40, 42,100,105,115,112,115, 41, 40, 41, 0, 42,104,105,100,100,101,110, 0,118, 91, 52, 93, 0,109,105,100,
- 0,112, 97,100, 91, 50, 93, 0,118, 91, 50, 93, 0, 42,102, 97, 99,101,115, 0, 42, 99,111,108,102, 97, 99,101,115, 0, 42,101,
-100,103,101,115, 0, 42,118,101,114,116,115, 0,108,101,118,101,108,115, 0,108,101,118,101,108, 95, 99,111,117,110,116, 0, 99,
-117,114,114,101,110,116, 0,110,101,119,108,118,108, 0,101,100,103,101,108,118,108, 0,112,105,110,108,118,108, 0,114,101,110,
-100,101,114,108,118,108, 0,117,115,101, 95, 99,111,108, 0, 42,101,100,103,101, 95,102,108, 97,103,115, 0, 42,101,100,103,101,
- 95, 99,114,101, 97,115,101,115, 0,115,116, 97, 99,107,105,110,100,101,120, 0, 42,101,114,114,111,114, 0,109,111,100,105,102,
-105,101,114, 0, 42,116,101,120,116,117,114,101, 0, 42,109, 97,112, 95,111, 98,106,101, 99,116, 0,117,118,108, 97,121,101,114,
- 95,110, 97,109,101, 91, 54, 52, 93, 0,117,118,108, 97,121,101,114, 95,116,109,112, 0,116,101,120,109, 97,112,112,105,110,103,
- 0,115,117, 98,100,105,118, 84,121,112,101, 0,114,101,110,100,101,114, 76,101,118,101,108,115, 0, 42,101,109, 67, 97, 99,104,
-101, 0, 42,109, 67, 97, 99,104,101, 0,115,116,114,101,110,103,116,104, 0,100,101,102, 97,120,105,115, 0,112, 97,100, 91, 54,
- 93, 0,108,101,110,103,116,104, 0,114, 97,110,100,111,109,105,122,101, 0,115,101,101,100, 0, 42,111, 98, 95, 97,114,109, 0,
- 42,115,116, 97,114,116, 95, 99, 97,112, 0, 42,101,110,100, 95, 99, 97,112, 0, 42, 99,117,114,118,101, 95,111, 98, 0, 42,111,
-102,102,115,101,116, 95,111, 98, 0,111,102,102,115,101,116, 91, 51, 93, 0,115, 99, 97,108,101, 91, 51, 93, 0,109,101,114,103,
-101, 95,100,105,115,116, 0,102,105,116, 95,116,121,112,101, 0,111,102,102,115,101,116, 95,116,121,112,101, 0, 99,111,117,110,
-116, 0, 97,120,105,115, 0,116,111,108,101,114, 97,110, 99,101, 0, 42,109,105,114,114,111,114, 95,111, 98, 0,115,112,108,105,
-116, 95, 97,110,103,108,101, 0,118, 97,108,117,101, 0,114,101,115, 0,118, 97,108, 95,102,108, 97,103,115, 0,108,105,109, 95,
-102,108, 97,103,115, 0,101, 95,102,108, 97,103,115, 0, 98,101,118,101,108, 95, 97,110,103,108,101, 0,100,101,102,103,114,112,
- 95,110, 97,109,101, 91, 54, 52, 93, 0, 42,100,111,109, 97,105,110, 0, 42,102,108,111,119, 0, 42, 99,111,108,108, 0,116,105,
-109,101, 0,100,105,114,101, 99,116,105,111,110, 0,109,105,100,108,101,118,101,108, 0, 42,112,114,111,106,101, 99,116,111,114,
-115, 91, 49, 48, 93, 0, 42,105,109, 97,103,101, 0,110,117,109, 95,112,114,111,106,101, 99,116,111,114,115, 0, 97,115,112,101,
- 99,116,120, 0, 97,115,112,101, 99,116,121, 0,115, 99, 97,108,101,120, 0,115, 99, 97,108,101,121, 0,112,101,114, 99,101,110,
-116, 0,102, 97, 99,101, 67,111,117,110,116, 0,102, 97, 99, 0,114,101,112,101, 97,116, 0, 42,111, 98,106,101, 99,116, 99,101,
-110,116,101,114, 0,115,116, 97,114,116,120, 0,115,116, 97,114,116,121, 0,104,101,105,103,104,116, 0,110, 97,114,114,111,119,
- 0,115,112,101,101,100, 0,100, 97,109,112, 0,102, 97,108,108,111,102,102, 0,116,105,109,101,111,102,102,115, 0,108,105,102,
-101,116,105,109,101, 0,100,101,102,111,114,109,102,108, 97,103, 0,109,117,108,116,105, 0, 42,112,114,101,118, 67,111,115, 0,
-115,117, 98,116, 97,114,103,101,116, 91, 54, 52, 93, 0,112, 97,114,101,110,116,105,110,118, 91, 52, 93, 91, 52, 93, 0, 99,101,
-110,116, 91, 51, 93, 0, 42,105,110,100,101,120, 97,114, 0,116,111,116,105,110,100,101,120, 0,102,111,114, 99,101, 0, 42, 99,
-108,111,116,104, 79, 98,106,101, 99,116, 0, 42,115,105,109, 95,112, 97,114,109,115, 0, 42, 99,111,108,108, 95,112, 97,114,109,
-115, 0, 42,112,111,105,110,116, 95, 99, 97, 99,104,101, 0,112,116, 99, 97, 99,104,101,115, 0, 42,120, 0, 42,120,110,101,119,
- 0, 42,120,111,108,100, 0, 42, 99,117,114,114,101,110,116, 95,120,110,101,119, 0, 42, 99,117,114,114,101,110,116, 95,120, 0,
- 42, 99,117,114,114,101,110,116, 95,118, 0, 42,109,102, 97, 99,101,115, 0,110,117,109,118,101,114,116,115, 0,110,117,109,102,
- 97, 99,101,115, 0,116,105,109,101, 95,120, 0,116,105,109,101, 95,120,110,101,119, 0, 42, 98,118,104,116,114,101,101, 0, 42,
-118, 0, 42,100,109, 0, 99,102,114, 97, 0,111,112,101,114, 97,116,105,111,110, 0,118,101,114,116,101,120, 0,116,111,116,105,
-110,102,108,117,101,110, 99,101, 0,103,114,105,100,115,105,122,101, 0, 42, 98,105,110,100,105,110,102,108,117,101,110, 99,101,
-115, 0, 42, 98,105,110,100,111,102,102,115,101,116,115, 0, 42, 98,105,110,100, 99, 97,103,101, 99,111,115, 0,116,111,116, 99,
- 97,103,101,118,101,114,116, 0, 42,100,121,110,103,114,105,100, 0, 42,100,121,110,105,110,102,108,117,101,110, 99,101,115, 0,
- 42,100,121,110,118,101,114,116,115, 0, 42,112, 97,100, 50, 0,100,121,110,103,114,105,100,115,105,122,101, 0,100,121,110, 99,
-101,108,108,109,105,110, 91, 51, 93, 0,100,121,110, 99,101,108,108,119,105,100,116,104, 0, 98,105,110,100,109, 97,116, 91, 52,
- 93, 91, 52, 93, 0, 42, 98,105,110,100,119,101,105,103,104,116,115, 0, 42, 98,105,110,100, 99,111,115, 0, 40, 42, 98,105,110,
-100,102,117,110, 99, 41, 40, 41, 0, 42,112,115,121,115, 0,116,111,116,100,109,118,101,114,116, 0,116,111,116,100,109,101,100,
-103,101, 0,116,111,116,100,109,102, 97, 99,101, 0,112,111,115,105,116,105,111,110, 0,114, 97,110,100,111,109, 95,112,111,115,
-105,116,105,111,110, 0, 42,102, 97, 99,101,112, 97, 0,118,103,114,111,117,112, 0,112,114,111,116,101, 99,116, 0,108,118,108,
- 0,115, 99,117,108,112,116,108,118,108, 0,116,111,116,108,118,108, 0,115,105,109,112,108,101, 0, 42,102,115,115, 0, 42,116,
- 97,114,103,101,116, 0, 42, 97,117,120, 84, 97,114,103,101,116, 0,118,103,114,111,117,112, 95,110, 97,109,101, 91, 54, 52, 93,
- 0,107,101,101,112, 68,105,115,116, 0,115,104,114,105,110,107, 84,121,112,101, 0,115,104,114,105,110,107, 79,112,116,115, 0,
-112,114,111,106, 65,120,105,115, 0,115,117, 98,115,117,114,102, 76,101,118,101,108,115, 0, 42,111,114,105,103,105,110, 0,102,
- 97, 99,116,111,114, 0,108,105,109,105,116, 91, 50, 93, 0,111,114,105,103,105,110, 79,112,116,115, 0,111,102,102,115,101,116,
- 95,102, 97, 99, 0,111,102,102,115,101,116, 95,102, 97, 99, 95,118,103, 0, 99,114,101, 97,115,101, 95,105,110,110,101,114, 0,
- 99,114,101, 97,115,101, 95,111,117,116,101,114, 0, 99,114,101, 97,115,101, 95,114,105,109, 0,109, 97,116, 95,111,102,115, 0,
-109, 97,116, 95,111,102,115, 95,114,105,109, 0, 42,111, 98, 95, 97,120,105,115, 0,115,116,101,112,115, 0,114,101,110,100,101,
-114, 95,115,116,101,112,115, 0,105,116,101,114, 0,115, 99,114,101,119, 95,111,102,115, 0, 97,110,103,108,101, 0, 42,111, 99,
-101, 97,110, 0, 42,111, 99,101, 97,110, 99, 97, 99,104,101, 0,114,101,115,111,108,117,116,105,111,110, 0,115,112, 97,116,105,
- 97,108, 95,115,105,122,101, 0,119,105,110,100, 95,118,101,108,111, 99,105,116,121, 0,115,109, 97,108,108,101,115,116, 95,119,
- 97,118,101, 0,119, 97,118,101, 95, 97,108,105,103,110,109,101,110,116, 0,119, 97,118,101, 95,100,105,114,101, 99,116,105,111,
-110, 0,119, 97,118,101, 95,115, 99, 97,108,101, 0, 99,104,111,112, 95, 97,109,111,117,110,116, 0,102,111, 97,109, 95, 99,111,
-118,101,114, 97,103,101, 0, 98, 97,107,101,115,116, 97,114,116, 0, 98, 97,107,101,101,110,100, 0, 99, 97, 99,104,101,112, 97,
-116,104, 91, 49, 48, 50, 52, 93, 0,102,111, 97,109,108, 97,121,101,114,110, 97,109,101, 91, 54, 52, 93, 0, 99, 97, 99,104,101,
-100, 0,103,101,111,109,101,116,114,121, 95,109,111,100,101, 0,114,101,102,114,101,115,104, 0,114,101,112,101, 97,116, 95,120,
- 0,114,101,112,101, 97,116, 95,121, 0,102,111, 97,109, 95,102, 97,100,101, 0, 42,111, 98,106,101, 99,116, 95,102,114,111,109,
- 0, 42,111, 98,106,101, 99,116, 95,116,111, 0,102, 97,108,108,111,102,102, 95,114, 97,100,105,117,115, 0,101,100,105,116, 95,
-102,108, 97,103,115, 0,100,101,102, 97,117,108,116, 95,119,101,105,103,104,116, 0, 42, 99,109, 97,112, 95, 99,117,114,118,101,
- 0, 97,100,100, 95,116,104,114,101,115,104,111,108,100, 0,114,101,109, 95,116,104,114,101,115,104,111,108,100, 0,109, 97,115,
-107, 95, 99,111,110,115,116, 97,110,116, 0,109, 97,115,107, 95,100,101,102,103,114,112, 95,110, 97,109,101, 91, 54, 52, 93, 0,
-109, 97,115,107, 95,116,101,120, 95,117,115,101, 95, 99,104, 97,110,110,101,108, 0, 42,109, 97,115,107, 95,116,101,120,116,117,
-114,101, 0, 42,109, 97,115,107, 95,116,101,120, 95,109, 97,112, 95,111, 98,106, 0,109, 97,115,107, 95,116,101,120, 95,109, 97,
-112,112,105,110,103, 0,109, 97,115,107, 95,116,101,120, 95,117,118,108, 97,121,101,114, 95,110, 97,109,101, 91, 54, 52, 93, 0,
-112, 97,100, 95,105, 49, 0,100,101,102,103,114,112, 95,110, 97,109,101, 95, 97, 91, 54, 52, 93, 0,100,101,102,103,114,112, 95,
-110, 97,109,101, 95, 98, 91, 54, 52, 93, 0,100,101,102, 97,117,108,116, 95,119,101,105,103,104,116, 95, 97, 0,100,101,102, 97,
-117,108,116, 95,119,101,105,103,104,116, 95, 98, 0,109,105,120, 95,109,111,100,101, 0,109,105,120, 95,115,101,116, 0,112, 97,
-100, 95, 99, 49, 91, 54, 93, 0,112,114,111,120,105,109,105,116,121, 95,109,111,100,101, 0,112,114,111,120,105,109,105,116,121,
- 95,102,108, 97,103,115, 0, 42,112,114,111,120,105,109,105,116,121, 95,111, 98, 95,116, 97,114,103,101,116, 0,109,105,110, 95,
-100,105,115,116, 0,109, 97,120, 95,100,105,115,116, 0,112, 97,100, 95,115, 49, 0, 42, 99, 97,110,118, 97,115, 0, 42, 98,114,
-117,115,104, 0,116,104,114,101,115,104,111,108,100, 0,115, 99, 97,108,101, 0,104,101,114,109,105,116,101, 95,110,117,109, 0,
- 42,108, 97,116,116, 0,112,110,116,115,119, 0,111,112,110,116,115,117, 0,111,112,110,116,115,118, 0,111,112,110,116,115,119,
- 0,116,121,112,101,117, 0,116,121,112,101,118, 0,116,121,112,101,119, 0,102,117, 0,102,118, 0,102,119, 0,100,117, 0,100,
-118, 0,100,119, 0, 42,100,101,102, 0, 42,108, 97,116,116,105, 99,101,100, 97,116, 97, 0,108, 97,116,109, 97,116, 91, 52, 93,
- 91, 52, 93, 0, 42,101,100,105,116,108, 97,116,116, 0,118,101, 99, 91, 56, 93, 91, 51, 93, 0, 42,115, 99,117,108,112,116, 0,
-112, 97,114,116,121,112,101, 0,112, 97,114, 49, 0,112, 97,114, 50, 0,112, 97,114, 51, 0,112, 97,114,115,117, 98,115,116,114,
- 91, 54, 52, 93, 0, 42,116,114, 97, 99,107, 0, 42,112,114,111,120,121, 0, 42,112,114,111,120,121, 95,103,114,111,117,112, 0,
- 42,112,114,111,120,121, 95,102,114,111,109, 0, 42, 97, 99,116,105,111,110, 0, 42,112,111,115,101,108,105, 98, 0, 42,112,111,
-115,101, 0, 42,103,112,100, 0, 97,118,115, 0, 42,109,112, 97,116,104, 0, 99,111,110,115,116,114, 97,105,110,116, 67,104, 97,
-110,110,101,108,115, 0,101,102,102,101, 99,116, 0,100,101,102, 98, 97,115,101, 0,109,111,100,105,102,105,101,114,115, 0,114,
-101,115,116,111,114,101, 95,109,111,100,101, 0, 42,109, 97,116, 98,105,116,115, 0, 97, 99,116, 99,111,108, 0,100,108,111, 99,
- 91, 51, 93, 0,111,114,105,103, 91, 51, 93, 0,100,115,105,122,101, 91, 51, 93, 0,100,115, 99, 97,108,101, 91, 51, 93, 0,100,
-114,111,116, 91, 51, 93, 0,100,113,117, 97,116, 91, 52, 93, 0,114,111,116, 65,120,105,115, 91, 51, 93, 0,100,114,111,116, 65,
-120,105,115, 91, 51, 93, 0,114,111,116, 65,110,103,108,101, 0,100,114,111,116, 65,110,103,108,101, 0,111, 98,109, 97,116, 91,
- 52, 93, 91, 52, 93, 0, 99,111,110,115,116,105,110,118, 91, 52, 93, 91, 52, 93, 0,105,109, 97,116, 95,114,101,110, 91, 52, 93,
- 91, 52, 93, 0,108, 97,121, 0,112, 97,100, 54, 0, 99,111,108, 98,105,116,115, 0,116,114, 97,110,115,102,108, 97,103, 0,112,
-114,111,116,101, 99,116,102,108, 97,103, 0,116,114, 97, 99,107,102,108, 97,103, 0,117,112,102,108, 97,103, 0,110,108, 97,102,
-108, 97,103, 0,105,112,111,102,108, 97,103, 0,115, 99, 97,102,108, 97,103, 0,115, 99, 97,118,105,115,102,108, 97,103, 0,112,
- 97,100, 53, 0,100,117,112,111,110, 0,100,117,112,111,102,102, 0,100,117,112,115,116, 97, 0,100,117,112,101,110,100, 0,115,
-102, 0,109, 97,115,115, 0,100, 97,109,112,105,110,103, 0,105,110,101,114,116,105, 97, 0,102,111,114,109,102, 97, 99,116,111,
-114, 0,114,100, 97,109,112,105,110,103, 0,109, 97,114,103,105,110, 0,109, 97,120, 95,118,101,108, 0,109,105,110, 95,118,101,
-108, 0,109, 95, 99,111,110,116, 97, 99,116, 80,114,111, 99,101,115,115,105,110,103, 84,104,114,101,115,104,111,108,100, 0,111,
- 98,115,116, 97, 99,108,101, 82, 97,100, 0,114,111,116,109,111,100,101, 0, 98,111,117,110,100,116,121,112,101, 0, 99,111,108,
-108,105,115,105,111,110, 95, 98,111,117,110,100,116,121,112,101, 0,114,101,115,116,114,105, 99,116,102,108, 97,103, 0,100,116,
- 0,101,109,112,116,121, 95,100,114, 97,119,116,121,112,101, 0,101,109,112,116,121, 95,100,114, 97,119,115,105,122,101, 0,100,
-117,112,102, 97, 99,101,115, 99, 97, 0,112,114,111,112, 0,115,101,110,115,111,114,115, 0, 99,111,110,116,114,111,108,108,101,
-114,115, 0, 97, 99,116,117, 97,116,111,114,115, 0, 98, 98,115,105,122,101, 91, 51, 93, 0, 97, 99,116,100,101,102, 0,103, 97,
-109,101,102,108, 97,103, 0,103, 97,109,101,102,108, 97,103, 50, 0, 42, 98,115,111,102,116, 0,115,111,102,116,102,108, 97,103,
- 0, 97,110,105,115,111,116,114,111,112,105, 99, 70,114,105, 99,116,105,111,110, 91, 51, 93, 0, 99,111,110,115,116,114, 97,105,
-110,116,115, 0,110,108, 97,115,116,114,105,112,115, 0,104,111,111,107,115, 0,112, 97,114,116,105, 99,108,101,115,121,115,116,
-101,109, 0, 42,115,111,102,116, 0, 42,100,117,112, 95,103,114,111,117,112, 0, 98,111,100,121, 95,116,121,112,101, 0,115,104,
- 97,112,101,102,108, 97,103, 0, 42,102,108,117,105,100,115,105,109, 83,101,116,116,105,110,103,115, 0, 42,100,101,114,105,118,
-101,100, 68,101,102,111,114,109, 0, 42,100,101,114,105,118,101,100, 70,105,110, 97,108, 0,108, 97,115,116, 68, 97,116, 97, 77,
- 97,115,107, 0, 99,117,115,116,111,109,100, 97,116, 97, 95,109, 97,115,107, 0,115,116, 97,116,101, 0,105,110,105,116, 95,115,
-116, 97,116,101, 0,103,112,117,108, 97,109,112, 0,112, 99, 95,105,100,115, 0, 42,100,117,112,108,105,108,105,115,116, 0,105,
-109, 97, 95,111,102,115, 91, 50, 93, 0, 99,117,114,105,110,100,101,120, 0, 97, 99,116,105,118,101, 0,111,114,105,103,108, 97,
-121, 0,111,109, 97,116, 91, 52, 93, 91, 52, 93, 0,111,114, 99,111, 91, 51, 93, 0,110,111, 95,100,114, 97,119, 0, 97,110,105,
-109, 97,116,101,100, 0,100,101,102,108,101, 99,116, 0,102,111,114, 99,101,102,105,101,108,100, 0,115,104, 97,112,101, 0,116,
-101,120, 95,109,111,100,101, 0,107,105,110,107, 0,107,105,110,107, 95, 97,120,105,115, 0,122,100,105,114, 0,102, 95,115,116,
-114,101,110,103,116,104, 0,102, 95,100, 97,109,112, 0,102, 95,102,108,111,119, 0,102, 95,115,105,122,101, 0,102, 95,112,111,
-119,101,114, 0,109, 97,120,100,105,115,116, 0,109,105,110,100,105,115,116, 0,102, 95,112,111,119,101,114, 95,114, 0,109, 97,
-120,114, 97,100, 0,109,105,110,114, 97,100, 0,112,100,101,102, 95,100, 97,109,112, 0,112,100,101,102, 95,114,100, 97,109,112,
- 0,112,100,101,102, 95,112,101,114,109, 0,112,100,101,102, 95,102,114,105, 99,116, 0,112,100,101,102, 95,114,102,114,105, 99,
-116, 0,112,100,101,102, 95,115,116,105, 99,107,110,101,115,115, 0, 97, 98,115,111,114,112,116,105,111,110, 0,112,100,101,102,
- 95,115, 98,100, 97,109,112, 0,112,100,101,102, 95,115, 98,105,102,116, 0,112,100,101,102, 95,115, 98,111,102,116, 0, 99,108,
-117,109,112, 95,102, 97, 99, 0, 99,108,117,109,112, 95,112,111,119, 0,107,105,110,107, 95,102,114,101,113, 0,107,105,110,107,
- 95,115,104, 97,112,101, 0,107,105,110,107, 95, 97,109,112, 0,102,114,101,101, 95,101,110,100, 0,116,101,120, 95,110, 97, 98,
-108, 97, 0, 42,114,110,103, 0,102, 95,110,111,105,115,101, 0,119,101,105,103,104,116, 91, 49, 51, 93, 0,103,108,111, 98, 97,
-108, 95,103,114, 97,118,105,116,121, 0,114,116, 91, 51, 93, 0,116,111,116,100, 97,116, 97, 0,102,114, 97,109,101, 0,116,111,
-116,112,111,105,110,116, 0,100, 97,116, 97, 95,116,121,112,101,115, 0, 42,100, 97,116, 97, 91, 56, 93, 0, 42, 99,117,114, 91,
- 56, 93, 0,101,120,116,114, 97,100, 97,116, 97, 0,115,116,101,112, 0,115,105,109,102,114, 97,109,101, 0,115,116, 97,114,116,
-102,114, 97,109,101, 0,101,110,100,102,114, 97,109,101, 0,101,100,105,116,102,114, 97,109,101, 0,108, 97,115,116, 95,101,120,
- 97, 99,116, 0,108, 97,115,116, 95,118, 97,108,105,100, 0, 99,111,109,112,114,101,115,115,105,111,110, 0,112,114,101,118, 95,
-110, 97,109,101, 91, 54, 52, 93, 0,105,110,102,111, 91, 54, 52, 93, 0,112, 97,116,104, 91, 49, 48, 50, 52, 93, 0, 42, 99, 97,
- 99,104,101,100, 95,102,114, 97,109,101,115, 0,109,101,109, 95, 99, 97, 99,104,101, 0, 42,101,100,105,116, 0, 40, 42,102,114,
-101,101, 95,101,100,105,116, 41, 40, 41, 0,108,105,110, 83,116,105,102,102, 0, 97,110,103, 83,116,105,102,102, 0,118,111,108,
-117,109,101, 0,118,105,116,101,114, 97,116,105,111,110,115, 0,112,105,116,101,114, 97,116,105,111,110,115, 0,100,105,116,101,
-114, 97,116,105,111,110,115, 0, 99,105,116,101,114, 97,116,105,111,110,115, 0,107, 83, 82, 72, 82, 95, 67, 76, 0,107, 83, 75,
- 72, 82, 95, 67, 76, 0,107, 83, 83, 72, 82, 95, 67, 76, 0,107, 83, 82, 95, 83, 80, 76, 84, 95, 67, 76, 0,107, 83, 75, 95, 83,
- 80, 76, 84, 95, 67, 76, 0,107, 83, 83, 95, 83, 80, 76, 84, 95, 67, 76, 0,107, 86, 67, 70, 0,107, 68, 80, 0,107, 68, 71, 0,
-107, 76, 70, 0,107, 80, 82, 0,107, 86, 67, 0,107, 68, 70, 0,107, 77, 84, 0,107, 67, 72, 82, 0,107, 75, 72, 82, 0,107, 83,
- 72, 82, 0,107, 65, 72, 82, 0, 99,111,108,108,105,115,105,111,110,102,108, 97,103,115, 0,110,117,109, 99,108,117,115,116,101,
-114,105,116,101,114, 97,116,105,111,110,115, 0,119,101,108,100,105,110,103, 0,116,111,116,115,112,114,105,110,103, 0, 42, 98,
-112,111,105,110,116, 0, 42, 98,115,112,114,105,110,103, 0,109,115,103, 95,108,111, 99,107, 0,109,115,103, 95,118, 97,108,117,
-101, 0,110,111,100,101,109, 97,115,115, 0,110, 97,109,101,100, 86, 71, 95, 77, 97,115,115, 91, 54, 52, 93, 0,103,114, 97,118,
- 0,109,101,100,105, 97,102,114,105, 99,116, 0,114,107,108,105,109,105,116, 0,112,104,121,115,105, 99,115, 95,115,112,101,101,
-100, 0,103,111, 97,108,115,112,114,105,110,103, 0,103,111, 97,108,102,114,105, 99,116, 0,109,105,110,103,111, 97,108, 0,109,
- 97,120,103,111, 97,108, 0,100,101,102,103,111, 97,108, 0,118,101,114,116,103,114,111,117,112, 0,110, 97,109,101,100, 86, 71,
- 95, 83,111,102,116,103,111, 97,108, 91, 54, 52, 93, 0,102,117,122,122,121,110,101,115,115, 0,105,110,115,112,114,105,110,103,
- 0,105,110,102,114,105, 99,116, 0,110, 97,109,101,100, 86, 71, 95, 83,112,114,105,110,103, 95, 75, 91, 54, 52, 93, 0,101,102,
-114, 97, 0,105,110,116,101,114,118, 97,108, 0,108,111, 99, 97,108, 0,115,111,108,118,101,114,102,108, 97,103,115, 0, 42, 42,
-107,101,121,115, 0,116,111,116,112,111,105,110,116,107,101,121, 0,115,101, 99,111,110,100,115,112,114,105,110,103, 0, 99,111,
-108, 98, 97,108,108, 0, 98, 97,108,108,100, 97,109,112, 0, 98, 97,108,108,115,116,105,102,102, 0,115, 98, 99, 95,109,111,100,
-101, 0, 97,101,114,111,101,100,103,101, 0,109,105,110,108,111,111,112,115, 0,109, 97,120,108,111,111,112,115, 0, 99,104,111,
-107,101, 0,115,111,108,118,101,114, 95, 73, 68, 0,112,108, 97,115,116,105, 99, 0,115,112,114,105,110,103,112,114,101,108,111,
- 97,100, 0, 42,115, 99,114, 97,116, 99,104, 0,115,104,101, 97,114,115,116,105,102,102, 0,105,110,112,117,115,104, 0, 42,112,
-111,105,110,116, 99, 97, 99,104,101, 0, 42,101,102,102,101, 99,116,111,114, 95,119,101,105,103,104,116,115, 0,108, 99,111,109,
- 91, 51, 93, 0,108,114,111,116, 91, 51, 93, 91, 51, 93, 0,108,115, 99, 97,108,101, 91, 51, 93, 91, 51, 93, 0,108, 97,115,116,
- 95,102,114, 97,109,101, 0,118,101,108, 91, 51, 93, 0, 42,102,109,100, 0,115,104,111,119, 95, 97,100,118, 97,110, 99,101,100,
-111,112,116,105,111,110,115, 0,114,101,115,111,108,117,116,105,111,110,120,121,122, 0,112,114,101,118,105,101,119,114,101,115,
-120,121,122, 0,114,101, 97,108,115,105,122,101, 0,103,117,105, 68,105,115,112,108, 97,121, 77,111,100,101, 0,114,101,110,100,
-101,114, 68,105,115,112,108, 97,121, 77,111,100,101, 0,118,105,115, 99,111,115,105,116,121, 86, 97,108,117,101, 0,118,105,115,
- 99,111,115,105,116,121, 77,111,100,101, 0,118,105,115, 99,111,115,105,116,121, 69,120,112,111,110,101,110,116, 0,103,114, 97,
-118, 91, 51, 93, 0, 97,110,105,109, 83,116, 97,114,116, 0, 97,110,105,109, 69,110,100, 0, 98, 97,107,101, 83,116, 97,114,116,
- 0, 98, 97,107,101, 69,110,100, 0,102,114, 97,109,101, 79,102,102,115,101,116, 0,103,115,116, 97,114, 0,109, 97,120, 82,101,
-102,105,110,101, 0,105,110,105, 86,101,108,120, 0,105,110,105, 86,101,108,121, 0,105,110,105, 86,101,108,122, 0, 42,111,114,
-103, 77,101,115,104, 0, 42,109,101,115,104, 66, 66, 0,115,117,114,102,100, 97,116, 97, 80, 97,116,104, 91, 49, 48, 50, 52, 93,
- 0, 98, 98, 83,116, 97,114,116, 91, 51, 93, 0, 98, 98, 83,105,122,101, 91, 51, 93, 0,116,121,112,101, 70,108, 97,103,115, 0,
-100,111,109, 97,105,110, 78,111,118,101, 99,103,101,110, 0,118,111,108,117,109,101, 73,110,105,116, 84,121,112,101, 0,112, 97,
-114,116, 83,108,105,112, 86, 97,108,117,101, 0,103,101,110,101,114, 97,116,101, 84,114, 97, 99,101,114,115, 0,103,101,110,101,
-114, 97,116,101, 80, 97,114,116,105, 99,108,101,115, 0,115,117,114,102, 97, 99,101, 83,109,111,111,116,104,105,110,103, 0,115,
-117,114,102, 97, 99,101, 83,117, 98,100,105,118,115, 0,112, 97,114,116,105, 99,108,101, 73,110,102, 83,105,122,101, 0,112, 97,
-114,116,105, 99,108,101, 73,110,102, 65,108,112,104, 97, 0,102, 97,114, 70,105,101,108,100, 83,105,122,101, 0, 42,109,101,115,
-104, 86,101,108,111, 99,105,116,105,101,115, 0, 99,112,115, 84,105,109,101, 83,116, 97,114,116, 0, 99,112,115, 84,105,109,101,
- 69,110,100, 0, 99,112,115, 81,117, 97,108,105,116,121, 0, 97,116,116,114, 97, 99,116,102,111,114, 99,101, 83,116,114,101,110,
-103,116,104, 0, 97,116,116,114, 97, 99,116,102,111,114, 99,101, 82, 97,100,105,117,115, 0,118,101,108,111, 99,105,116,121,102,
-111,114, 99,101, 83,116,114,101,110,103,116,104, 0,118,101,108,111, 99,105,116,121,102,111,114, 99,101, 82, 97,100,105,117,115,
- 0,108, 97,115,116,103,111,111,100,102,114, 97,109,101, 0, 97,110,105,109, 82, 97,116,101, 0,109,105,115,116,121,112,101, 0,
-104,111,114,114, 0,104,111,114,103, 0,104,111,114, 98, 0,122,101,110,114, 0,122,101,110,103, 0,122,101,110, 98, 0,102, 97,
-115,116, 99,111,108, 0,101,120,112,111,115,117,114,101, 0,101,120,112, 0,114, 97,110,103,101, 0,108,105,110,102, 97, 99, 0,
-108,111,103,102, 97, 99, 0,103,114, 97,118,105,116,121, 0, 97, 99,116,105,118,105,116,121, 66,111,120, 82, 97,100,105,117,115,
- 0,115,107,121,116,121,112,101, 0,111, 99, 99,108,117,115,105,111,110, 82,101,115, 0,112,104,121,115,105, 99,115, 69,110,103,
-105,110,101, 0,116,105, 99,114, 97,116,101, 0,109, 97,120,108,111,103,105, 99,115,116,101,112, 0,112,104,121,115,117, 98,115,
-116,101,112, 0,109, 97,120,112,104,121,115,116,101,112, 0,109,105,115,105, 0,109,105,115,116,115,116, 97, 0,109,105,115,116,
-100,105,115,116, 0,109,105,115,116,104,105, 0,115,116, 97,114,114, 0,115,116, 97,114,103, 0,115,116, 97,114, 98, 0,115,116,
- 97,114,107, 0,115,116, 97,114,115,105,122,101, 0,115,116, 97,114,109,105,110,100,105,115,116, 0,115,116, 97,114,100,105,115,
-116, 0,115,116, 97,114, 99,111,108,110,111,105,115,101, 0,100,111,102,115,116, 97, 0,100,111,102,101,110,100, 0,100,111,102,
-109,105,110, 0,100,111,102,109, 97,120, 0, 97,111,100,105,115,116, 0, 97,111,100,105,115,116,102, 97, 99, 0, 97,111,101,110,
-101,114,103,121, 0, 97,111, 98,105, 97,115, 0, 97,111,109,111,100,101, 0, 97,111,115, 97,109,112, 0, 97,111,109,105,120, 0,
- 97,111, 99,111,108,111,114, 0, 97,111, 95, 97,100, 97,112,116, 95,116,104,114,101,115,104, 0, 97,111, 95, 97,100, 97,112,116,
- 95,115,112,101,101,100, 95,102, 97, 99, 0, 97,111, 95, 97,112,112,114,111,120, 95,101,114,114,111,114, 0, 97,111, 95, 97,112,
-112,114,111,120, 95, 99,111,114,114,101, 99,116,105,111,110, 0, 97,111, 95,105,110,100,105,114,101, 99,116, 95,101,110,101,114,
-103,121, 0, 97,111, 95,101,110,118, 95,101,110,101,114,103,121, 0, 97,111, 95,112, 97,100, 50, 0, 97,111, 95,105,110,100,105,
-114,101, 99,116, 95, 98,111,117,110, 99,101,115, 0, 97,111, 95,112, 97,100, 0, 97,111, 95,115, 97,109,112, 95,109,101,116,104,
-111,100, 0, 97,111, 95,103, 97,116,104,101,114, 95,109,101,116,104,111,100, 0, 97,111, 95, 97,112,112,114,111,120, 95,112, 97,
-115,115,101,115, 0, 42, 97,111,115,112,104,101,114,101, 0, 42, 97,111,116, 97, 98,108,101,115, 0,115,101,108, 99,111,108, 0,
-115,120, 0,115,121, 0, 42,108,112, 70,111,114,109, 97,116, 0, 42,108,112, 80, 97,114,109,115, 0, 99, 98, 70,111,114,109, 97,
-116, 0, 99, 98, 80, 97,114,109,115, 0,102, 99, 99, 84,121,112,101, 0,102, 99, 99, 72, 97,110,100,108,101,114, 0,100,119, 75,
-101,121, 70,114, 97,109,101, 69,118,101,114,121, 0,100,119, 81,117, 97,108,105,116,121, 0,100,119, 66,121,116,101,115, 80,101,
-114, 83,101, 99,111,110,100, 0,100,119, 70,108, 97,103,115, 0,100,119, 73,110,116,101,114,108,101, 97,118,101, 69,118,101,114,
-121, 0, 97,118,105, 99,111,100,101, 99,110, 97,109,101, 91, 49, 50, 56, 93, 0, 42, 99,100, 80, 97,114,109,115, 0, 42,112, 97,
-100, 0, 99,100, 83,105,122,101, 0,113,116, 99,111,100,101, 99,110, 97,109,101, 91, 49, 50, 56, 93, 0, 99,111,100,101, 99, 84,
-121,112,101, 0, 99,111,100,101, 99, 83,112, 97,116,105, 97,108, 81,117, 97,108,105,116,121, 0, 99,111,100,101, 99, 0, 99,111,
-100,101, 99, 70,108, 97,103,115, 0, 99,111,108,111,114, 68,101,112,116,104, 0, 99,111,100,101, 99, 84,101,109,112,111,114, 97,
-108, 81,117, 97,108,105,116,121, 0,109,105,110, 83,112, 97,116,105, 97,108, 81,117, 97,108,105,116,121, 0,109,105,110, 84,101,
-109,112,111,114, 97,108, 81,117, 97,108,105,116,121, 0,107,101,121, 70,114, 97,109,101, 82, 97,116,101, 0, 98,105,116, 82, 97,
-116,101, 0, 97,117,100,105,111, 99,111,100,101, 99, 84,121,112,101, 0, 97,117,100,105,111, 83, 97,109,112,108,101, 82, 97,116,
-101, 0, 97,117,100,105,111, 66,105,116, 68,101,112,116,104, 0, 97,117,100,105,111, 67,104, 97,110,110,101,108,115, 0, 97,117,
-100,105,111, 67,111,100,101, 99, 70,108, 97,103,115, 0, 97,117,100,105,111, 66,105,116, 82, 97,116,101, 0, 97,117,100,105,111,
- 95, 99,111,100,101, 99, 0,118,105,100,101,111, 95, 98,105,116,114, 97,116,101, 0, 97,117,100,105,111, 95, 98,105,116,114, 97,
-116,101, 0, 97,117,100,105,111, 95,109,105,120,114, 97,116,101, 0, 97,117,100,105,111, 95, 99,104, 97,110,110,101,108,115, 0,
- 97,117,100,105,111, 95,112, 97,100, 0, 97,117,100,105,111, 95,118,111,108,117,109,101, 0,103,111,112, 95,115,105,122,101, 0,
-114, 99, 95,109,105,110, 95,114, 97,116,101, 0,114, 99, 95,109, 97,120, 95,114, 97,116,101, 0,114, 99, 95, 98,117,102,102,101,
-114, 95,115,105,122,101, 0,109,117,120, 95,112, 97, 99,107,101,116, 95,115,105,122,101, 0,109,117,120, 95,114, 97,116,101, 0,
-109,105,120,114, 97,116,101, 0,109, 97,105,110, 0,115,112,101,101,100, 95,111,102, 95,115,111,117,110,100, 0,100,111,112,112,
-108,101,114, 95,102, 97, 99,116,111,114, 0,100,105,115,116, 97,110, 99,101, 95,109,111,100,101,108, 0, 42,109, 97,116, 95,111,
-118,101,114,114,105,100,101, 0, 42,108,105,103,104,116, 95,111,118,101,114,114,105,100,101, 0,108, 97,121, 95,122,109, 97,115,
-107, 0,108, 97,121,102,108, 97,103, 0,112, 97,115,115,102,108, 97,103, 0,112, 97,115,115, 95,120,111,114, 0,105,109,116,121,
-112,101, 0,112,108, 97,110,101,115, 0,113,117, 97,108,105,116,121, 0, 99,111,109,112,114,101,115,115, 0,101,120,114, 95, 99,
-111,100,101, 99, 0, 99,105,110,101,111,110, 95,102,108, 97,103, 0, 99,105,110,101,111,110, 95,119,104,105,116,101, 0, 99,105,
-110,101,111,110, 95, 98,108, 97, 99,107, 0, 99,105,110,101,111,110, 95,103, 97,109,109, 97, 0,106,112, 50, 95,102,108, 97,103,
- 0,105,109, 95,102,111,114,109, 97,116, 0, 42, 97,118,105, 99,111,100,101, 99,100, 97,116, 97, 0, 42,113,116, 99,111,100,101,
- 99,100, 97,116, 97, 0,113,116, 99,111,100,101, 99,115,101,116,116,105,110,103,115, 0,102,102, 99,111,100,101, 99,100, 97,116,
- 97, 0,115,117, 98,102,114, 97,109,101, 0,112,115,102,114, 97, 0,112,101,102,114, 97, 0,105,109, 97,103,101,115, 0,102,114,
- 97,109, 97,112,116,111, 0,116,104,114,101, 97,100,115, 0,102,114, 97,109,101,108,101,110, 0, 98,108,117,114,102, 97, 99, 0,
-101,100,103,101, 82, 0,101,100,103,101, 71, 0,101,100,103,101, 66, 0,102,117,108,108,115, 99,114,101,101,110, 0,120,112,108,
- 97,121, 0,121,112,108, 97,121, 0,102,114,101,113,112,108, 97,121, 0, 97,116,116,114,105, 98, 0,102,114, 97,109,101, 95,115,
-116,101,112, 0,115,116,101,114,101,111,109,111,100,101, 0,100,105,109,101,110,115,105,111,110,115,112,114,101,115,101,116, 0,
-109, 97,120,105,109,115,105,122,101, 0,120,115, 99,104, 0,121,115, 99,104, 0,120,112, 97,114,116,115, 0,121,112, 97,114,116,
-115, 0,115,117, 98,105,109,116,121,112,101, 0,100,105,115,112,108, 97,121,109,111,100,101, 0,115, 99,101,109,111,100,101, 0,
-114, 97,121,116,114, 97, 99,101, 95,111,112,116,105,111,110,115, 0,114, 97,121,116,114, 97, 99,101, 95,115,116,114,117, 99,116,
-117,114,101, 0,111, 99,114,101,115, 0,112, 97,100, 52, 0, 97,108,112,104, 97,109,111,100,101, 0,111,115, 97, 0,102,114,115,
- 95,115,101, 99, 0,101,100,103,101,105,110,116, 0,115, 97,102,101,116,121, 0, 98,111,114,100,101,114, 0,100,105,115,112,114,
-101, 99,116, 0,108, 97,121,101,114,115, 0, 97, 99,116,108, 97,121, 0,109, 98,108,117,114, 95,115, 97,109,112,108,101,115, 0,
-120, 97,115,112, 0,121, 97,115,112, 0,102,114,115, 95,115,101, 99, 95, 98, 97,115,101, 0,103, 97,117,115,115, 0, 99,111,108,
-111,114, 95,109,103,116, 95,102,108, 97,103, 0,112,111,115,116,103, 97,109,109, 97, 0,112,111,115,116,104,117,101, 0,112,111,
-115,116,115, 97,116, 0,100,105,116,104,101,114, 95,105,110,116,101,110,115,105,116,121, 0, 98, 97,107,101, 95,111,115, 97, 0,
- 98, 97,107,101, 95,102,105,108,116,101,114, 0, 98, 97,107,101, 95,109,111,100,101, 0, 98, 97,107,101, 95,102,108, 97,103, 0,
- 98, 97,107,101, 95,110,111,114,109, 97,108, 95,115,112, 97, 99,101, 0, 98, 97,107,101, 95,113,117, 97,100, 95,115,112,108,105,
-116, 0, 98, 97,107,101, 95,109, 97,120,100,105,115,116, 0, 98, 97,107,101, 95, 98,105, 97,115,100,105,115,116, 0, 98, 97,107,
-101, 95,112, 97,100, 0,112,105, 99, 91, 49, 48, 50, 52, 93, 0,115,116, 97,109,112, 0,115,116, 97,109,112, 95,102,111,110,116,
- 95,105,100, 0,115,116, 97,109,112, 95,117,100, 97,116, 97, 91, 55, 54, 56, 93, 0,102,103, 95,115,116, 97,109,112, 91, 52, 93,
- 0, 98,103, 95,115,116, 97,109,112, 91, 52, 93, 0,115,101,113, 95,112,114,101,118, 95,116,121,112,101, 0,115,101,113, 95,114,
-101,110,100, 95,116,121,112,101, 0,115,101,113, 95,102,108, 97,103, 0,112, 97,100, 53, 91, 53, 93, 0,115,105,109,112,108,105,
-102,121, 95,102,108, 97,103, 0,115,105,109,112,108,105,102,121, 95,115,117, 98,115,117,114,102, 0,115,105,109,112,108,105,102,
-121, 95,115,104, 97,100,111,119,115, 97,109,112,108,101,115, 0,115,105,109,112,108,105,102,121, 95,112, 97,114,116,105, 99,108,
-101,115, 0,115,105,109,112,108,105,102,121, 95, 97,111,115,115,115, 0, 99,105,110,101,111,110,119,104,105,116,101, 0, 99,105,
-110,101,111,110, 98,108, 97, 99,107, 0, 99,105,110,101,111,110,103, 97,109,109, 97, 0,106,112, 50, 95,112,114,101,115,101,116,
- 0,106,112, 50, 95,100,101,112,116,104, 0,114,112, 97,100, 51, 0,100,111,109,101,114,101,115, 0,100,111,109,101,109,111,100,
-101, 0,100,111,109,101, 97,110,103,108,101, 0,100,111,109,101,116,105,108,116, 0,100,111,109,101,114,101,115, 98,117,102, 0,
- 42,100,111,109,101,116,101,120,116, 0,101,110,103,105,110,101, 91, 51, 50, 93, 0,110, 97,109,101, 91, 51, 50, 93, 0,112, 97,
-114,116,105, 99,108,101, 95,112,101,114, 99, 0,115,117, 98,115,117,114,102, 95,109, 97,120, 0,115,104, 97,100, 98,117,102,115,
- 97,109,112,108,101, 95,109, 97,120, 0, 97,111, 95,101,114,114,111,114, 0,116,105,108,116, 0,114,101,115, 98,117,102, 0, 42,
-119, 97,114,112,116,101,120,116, 0, 99,111,108, 91, 51, 93, 0, 99,101,108,108,115,105,122,101, 0, 99,101,108,108,104,101,105,
-103,104,116, 0, 97,103,101,110,116,109, 97,120,115,108,111,112,101, 0, 97,103,101,110,116,109, 97,120, 99,108,105,109, 98, 0,
- 97,103,101,110,116,104,101,105,103,104,116, 0, 97,103,101,110,116,114, 97,100,105,117,115, 0,101,100,103,101,109, 97,120,108,
-101,110, 0,101,100,103,101,109, 97,120,101,114,114,111,114, 0,114,101,103,105,111,110,109,105,110,115,105,122,101, 0,114,101,
-103,105,111,110,109,101,114,103,101,115,105,122,101, 0,118,101,114,116,115,112,101,114,112,111,108,121, 0,100,101,116, 97,105,
-108,115, 97,109,112,108,101,100,105,115,116, 0,100,101,116, 97,105,108,115, 97,109,112,108,101,109, 97,120,101,114,114,111,114,
- 0,102,114, 97,109,105,110,103, 0,112,108, 97,121,101,114,102,108, 97,103, 0,114,116, 49, 0,114,116, 50, 0, 97, 97,115, 97,
-109,112,108,101,115, 0,112, 97,100, 52, 91, 51, 93, 0,100,111,109,101, 0,115,116,101,114,101,111,102,108, 97,103, 0,101,121,
-101,115,101,112, 97,114, 97,116,105,111,110, 0,114,101, 99, 97,115,116, 68, 97,116, 97, 0,109, 97,116,109,111,100,101, 0,101,
-120,105,116,107,101,121, 0,111, 98,115,116, 97, 99,108,101, 83,105,109,117,108, 97,116,105,111,110, 0,108,101,118,101,108, 72,
-101,105,103,104,116, 0, 42, 99, 97,109,101,114, 97, 0, 42,112, 97,105,110,116, 95, 99,117,114,115,111,114, 0,112, 97,105,110,
-116, 95, 99,117,114,115,111,114, 95, 99,111,108, 91, 52, 93, 0,112, 97,105,110,116, 0,115,101, 97,109, 95, 98,108,101,101,100,
- 0,110,111,114,109, 97,108, 95, 97,110,103,108,101, 0,115, 99,114,101,101,110, 95,103,114, 97, 98, 95,115,105,122,101, 91, 50,
- 93, 0, 42,112, 97,105,110,116, 99,117,114,115,111,114, 0,105,110,118,101,114,116, 0,116,111,116,114,101,107,101,121, 0,116,
-111,116, 97,100,100,107,101,121, 0, 98,114,117,115,104,116,121,112,101, 0, 98,114,117,115,104, 91, 55, 93, 0,101,109,105,116,
-116,101,114,100,105,115,116, 0,115,101,108,101, 99,116,109,111,100,101, 0,101,100,105,116,116,121,112,101, 0,100,114, 97,119,
- 95,115,116,101,112, 0,102, 97,100,101, 95,102,114, 97,109,101,115, 0,114, 97,100,105, 97,108, 95,115,121,109,109, 91, 51, 93,
- 0,108, 97,115,116, 95,120, 0,108, 97,115,116, 95,121, 0,108, 97,115,116, 95, 97,110,103,108,101, 0,100,114, 97,119, 95, 97,
-110, 99,104,111,114,101,100, 0, 97,110, 99,104,111,114,101,100, 95,115,105,122,101, 0, 97,110, 99,104,111,114,101,100, 95,108,
-111, 99, 97,116,105,111,110, 91, 51, 93, 0, 97,110, 99,104,111,114,101,100, 95,105,110,105,116,105, 97,108, 95,109,111,117,115,
-101, 91, 50, 93, 0,100,114, 97,119, 95,112,114,101,115,115,117,114,101, 0,112,114,101,115,115,117,114,101, 95,118, 97,108,117,
-101, 0,115,112,101, 99,105, 97,108, 95,114,111,116, 97,116,105,111,110, 0, 42,118,112, 97,105,110,116, 95,112,114,101,118, 0,
- 42,119,112, 97,105,110,116, 95,112,114,101,118, 0,109, 97,116, 91, 51, 93, 91, 51, 93, 0,117,110,112,114,111,106,101, 99,116,
-101,100, 95,114, 97,100,105,117,115, 0, 42,118,112, 97,105,110,116, 0, 42,119,112, 97,105,110,116, 0, 42,117,118,115, 99,117,
-108,112,116, 0,118,103,114,111,117,112, 95,119,101,105,103,104,116, 0, 99,111,114,110,101,114,116,121,112,101, 0,101,100,105,
-116, 98,117,116,102,108, 97,103, 0,106,111,105,110,116,114,105,108,105,109,105,116, 0,100,101,103,114, 0,116,117,114,110, 0,
-101,120,116,114, 95,111,102,102,115, 0,100,111,117, 98,108,105,109,105,116, 0,110,111,114,109, 97,108,115,105,122,101, 0, 97,
-117,116,111,109,101,114,103,101, 0,115,101,103,109,101,110,116,115, 0,114,105,110,103,115, 0,118,101,114,116,105, 99,101,115,
- 0,117,110,119,114, 97,112,112,101,114, 0,117,118, 99, 97,108, 99, 95,114, 97,100,105,117,115, 0,117,118, 99, 97,108, 99, 95,
- 99,117, 98,101,115,105,122,101, 0,117,118, 99, 97,108, 99, 95,109, 97,114,103,105,110, 0,117,118, 99, 97,108, 99, 95,109, 97,
-112,100,105,114, 0,117,118, 99, 97,108, 99, 95,109, 97,112, 97,108,105,103,110, 0,117,118, 99, 97,108, 99, 95,102,108, 97,103,
- 0,117,118, 95,102,108, 97,103, 0,117,118, 95,115,101,108,101, 99,116,109,111,100,101, 0,117,118, 95,115,117, 98,115,117,114,
-102, 95,108,101,118,101,108, 0,103,112,101,110, 99,105,108, 95,102,108, 97,103,115, 0, 97,117,116,111,105,107, 95, 99,104, 97,
-105,110,108,101,110, 0,105,109, 97,112, 97,105,110,116, 0,112, 97,114,116,105, 99,108,101, 0,112,114,111,112,111,114,116,105,
-111,110, 97,108, 95,115,105,122,101, 0,115,101,108,101, 99,116, 95,116,104,114,101,115,104, 0, 99,108,101, 97,110, 95,116,104,
-114,101,115,104, 0, 97,117,116,111,107,101,121, 95,109,111,100,101, 0, 97,117,116,111,107,101,121, 95,102,108, 97,103, 0,109,
-117,108,116,105,114,101,115, 95,115,117, 98,100,105,118, 95,116,121,112,101, 0,112, 97,100, 50, 91, 53, 93, 0,115,107,103,101,
-110, 95,114,101,115,111,108,117,116,105,111,110, 0,115,107,103,101,110, 95,116,104,114,101,115,104,111,108,100, 95,105,110,116,
-101,114,110, 97,108, 0,115,107,103,101,110, 95,116,104,114,101,115,104,111,108,100, 95,101,120,116,101,114,110, 97,108, 0,115,
-107,103,101,110, 95,108,101,110,103,116,104, 95,114, 97,116,105,111, 0,115,107,103,101,110, 95,108,101,110,103,116,104, 95,108,
-105,109,105,116, 0,115,107,103,101,110, 95, 97,110,103,108,101, 95,108,105,109,105,116, 0,115,107,103,101,110, 95, 99,111,114,
-114,101,108, 97,116,105,111,110, 95,108,105,109,105,116, 0,115,107,103,101,110, 95,115,121,109,109,101,116,114,121, 95,108,105,
-109,105,116, 0,115,107,103,101,110, 95,114,101,116, 97,114,103,101,116, 95, 97,110,103,108,101, 95,119,101,105,103,104,116, 0,
-115,107,103,101,110, 95,114,101,116, 97,114,103,101,116, 95,108,101,110,103,116,104, 95,119,101,105,103,104,116, 0,115,107,103,
-101,110, 95,114,101,116, 97,114,103,101,116, 95,100,105,115,116, 97,110, 99,101, 95,119,101,105,103,104,116, 0,115,107,103,101,
-110, 95,111,112,116,105,111,110,115, 0,115,107,103,101,110, 95,112,111,115,116,112,114,111, 0,115,107,103,101,110, 95,112,111,
-115,116,112,114,111, 95,112, 97,115,115,101,115, 0,115,107,103,101,110, 95,115,117, 98,100,105,118,105,115,105,111,110,115, 91,
- 51, 93, 0,115,107,103,101,110, 95,109,117,108,116,105, 95,108,101,118,101,108, 0, 42,115,107,103,101,110, 95,116,101,109,112,
-108, 97,116,101, 0, 98,111,110,101, 95,115,107,101,116, 99,104,105,110,103, 0, 98,111,110,101, 95,115,107,101,116, 99,104,105,
-110,103, 95, 99,111,110,118,101,114,116, 0,115,107,103,101,110, 95,115,117, 98,100,105,118,105,115,105,111,110, 95,110,117,109,
- 98,101,114, 0,115,107,103,101,110, 95,114,101,116, 97,114,103,101,116, 95,111,112,116,105,111,110,115, 0,115,107,103,101,110,
- 95,114,101,116, 97,114,103,101,116, 95,114,111,108,108, 0,115,107,103,101,110, 95,115,105,100,101, 95,115,116,114,105,110,103,
- 91, 56, 93, 0,115,107,103,101,110, 95,110,117,109, 95,115,116,114,105,110,103, 91, 56, 93, 0,101,100,103,101, 95,109,111,100,
-101, 0,101,100,103,101, 95,109,111,100,101, 95,108,105,118,101, 95,117,110,119,114, 97,112, 0,115,110, 97,112, 95,109,111,100,
-101, 0,115,110, 97,112, 95,102,108, 97,103, 0,115,110, 97,112, 95,116, 97,114,103,101,116, 0,112,114,111,112,111,114,116,105,
-111,110, 97,108, 0,112,114,111,112, 95,109,111,100,101, 0,112,114,111,112,111,114,116,105,111,110, 97,108, 95,111, 98,106,101,
- 99,116,115, 0,112, 97,100, 91, 53, 93, 0, 97,117,116,111, 95,110,111,114,109, 97,108,105,122,101, 0,109,117,108,116,105,112,
- 97,105,110,116, 0,117,115,101, 95,117,118, 95,115, 99,117,108,112,116, 0,117,118, 95,115, 99,117,108,112,116, 95,115,101,116,
-116,105,110,103,115, 0,117,118, 95,115, 99,117,108,112,116, 95,116,111,111,108, 0,117,118, 95,114,101,108, 97,120, 95,109,101,
-116,104,111,100, 0,115, 99,117,108,112,116, 95,112, 97,105,110,116, 95,115,101,116,116,105,110,103,115, 0,115, 99,117,108,112,
-116, 95,112, 97,105,110,116, 95,117,110,105,102,105,101,100, 95,115,105,122,101, 0,115, 99,117,108,112,116, 95,112, 97,105,110,
-116, 95,117,110,105,102,105,101,100, 95,117,110,112,114,111,106,101, 99,116,101,100, 95,114, 97,100,105,117,115, 0,115, 99,117,
-108,112,116, 95,112, 97,105,110,116, 95,117,110,105,102,105,101,100, 95, 97,108,112,104, 97, 0,117,110,105,102,105,101,100, 95,
-112, 97,105,110,116, 95,115,101,116,116,105,110,103,115, 0,116,111,116,111, 98,106, 0,116,111,116,108, 97,109,112, 0,116,111,
-116,111, 98,106,115,101,108, 0,116,111,116, 99,117,114,118,101, 0,116,111,116,109,101,115,104, 0,116,111,116, 97,114,109, 97,
-116,117,114,101, 0,115, 99, 97,108,101, 95,108,101,110,103,116,104, 0,115,121,115,116,101,109, 0,115,121,115,116,101,109, 95,
-114,111,116, 97,116,105,111,110, 0,103,114, 97,118,105,116,121, 91, 51, 93, 0,113,117,105, 99,107, 95, 99, 97, 99,104,101, 95,
-115,116,101,112, 0, 42,119,111,114,108,100, 0, 42,115,101,116, 0, 98, 97,115,101, 0, 42, 98, 97,115, 97, 99,116, 0, 42,111,
- 98,101,100,105,116, 0, 99,117,114,115,111,114, 91, 51, 93, 0,116,119, 99,101,110,116, 91, 51, 93, 0,116,119,109,105,110, 91,
- 51, 93, 0,116,119,109, 97,120, 91, 51, 93, 0,108, 97,121, 97, 99,116, 0,108, 97,121, 95,117,112,100, 97,116,101,100, 0, 42,
-101,100, 0, 42,116,111,111,108,115,101,116,116,105,110,103,115, 0, 42,115,116, 97,116,115, 0, 97,117,100,105,111, 0,116,114,
- 97,110,115,102,111,114,109, 95,115,112, 97, 99,101,115, 0, 42,115,111,117,110,100, 95,115, 99,101,110,101, 0, 42,115,111,117,
-110,100, 95,115, 99,101,110,101, 95,104, 97,110,100,108,101, 0, 42,115,111,117,110,100, 95,115, 99,114,117, 98, 95,104, 97,110,
-100,108,101, 0, 42,115,112,101, 97,107,101,114, 95,104, 97,110,100,108,101,115, 0, 42,102,112,115, 95,105,110,102,111, 0, 42,
-116,104,101, 68, 97,103, 0,100, 97,103,105,115,118, 97,108,105,100, 0,100, 97,103,102,108, 97,103,115, 0, 97, 99,116,105,118,
-101, 95,107,101,121,105,110,103,115,101,116, 0,107,101,121,105,110,103,115,101,116,115, 0,103,109, 0,117,110,105,116, 0,112,
-104,121,115,105, 99,115, 95,115,101,116,116,105,110,103,115, 0, 42, 99,108,105,112, 0, 99,117,115,116,111,109,100, 97,116, 97,
- 95,109, 97,115,107, 95,109,111,100, 97,108, 0, 99,117,115,101,114, 0, 98,108,101,110,100, 0,118,105,101,119, 0,119,105,110,
-109, 97,116, 91, 52, 93, 91, 52, 93, 0,118,105,101,119,109, 97,116, 91, 52, 93, 91, 52, 93, 0,118,105,101,119,105,110,118, 91,
- 52, 93, 91, 52, 93, 0,112,101,114,115,109, 97,116, 91, 52, 93, 91, 52, 93, 0,112,101,114,115,105,110,118, 91, 52, 93, 91, 52,
- 93, 0,118,105,101,119,109, 97,116,111, 98, 91, 52, 93, 91, 52, 93, 0,112,101,114,115,109, 97,116,111, 98, 91, 52, 93, 91, 52,
- 93, 0, 99,108,105,112, 91, 54, 93, 91, 52, 93, 0, 99,108,105,112, 95,108,111, 99, 97,108, 91, 54, 93, 91, 52, 93, 0, 42, 99,
-108,105,112, 98, 98, 0, 42,108,111, 99, 97,108,118,100, 0, 42,114,105, 0, 42,114,101,110,100,101,114, 95,101,110,103,105,110,
-101, 0, 42,100,101,112,116,104,115, 0, 42,115,109,115, 0, 42,115,109,111,111,116,104, 95,116,105,109,101,114, 0,116,119,109,
- 97,116, 91, 52, 93, 91, 52, 93, 0,118,105,101,119,113,117, 97,116, 91, 52, 93, 0,122,102, 97, 99, 0, 99, 97,109,100,120, 0,
- 99, 97,109,100,121, 0,112,105,120,115,105,122,101, 0, 99, 97,109,122,111,111,109, 0,105,115, 95,112,101,114,115,112, 0,112,
-101,114,115,112, 0,118,105,101,119,108,111, 99,107, 0,116,119,100,114, 97,119,102,108, 97,103, 0,114,102,108, 97,103, 0,108,
-118,105,101,119,113,117, 97,116, 91, 52, 93, 0,108,112,101,114,115,112, 0,108,118,105,101,119, 0,103,114,105,100,118,105,101,
-119, 0,116,119, 97,110,103,108,101, 91, 51, 93, 0,114,111,116, 95, 97,110,103,108,101, 0,114,111,116, 95, 97,120,105,115, 91,
- 51, 93, 0,114,101,103,105,111,110, 98, 97,115,101, 0,115,112, 97, 99,101,116,121,112,101, 0, 98,108,111, 99,107,115, 99, 97,
-108,101, 0, 98,108,111, 99,107,104, 97,110,100,108,101,114, 91, 56, 93, 0, 98,117,110,100,108,101, 95,115,105,122,101, 0, 98,
-117,110,100,108,101, 95,100,114, 97,119,116,121,112,101, 0,108, 97,121, 95,117,115,101,100, 0, 42,111, 98, 95, 99,101,110,116,
-114,101, 0, 98,103,112,105, 99, 98, 97,115,101, 0, 42, 98,103,112,105, 99, 0,111, 98, 95, 99,101,110,116,114,101, 95, 98,111,
-110,101, 91, 54, 52, 93, 0,100,114, 97,119,116,121,112,101, 0,111, 98, 95, 99,101,110,116,114,101, 95, 99,117,114,115,111,114,
- 0,115, 99,101,110,101,108,111, 99,107, 0, 97,114,111,117,110,100, 0,103,114,105,100, 0,110,101, 97,114, 0,102, 97,114, 0,
-109,111,100,101,115,101,108,101, 99,116, 0,103,114,105,100,108,105,110,101,115, 0,103,114,105,100,115,117, 98,100,105,118, 0,
-103,114,105,100,102,108, 97,103, 0,116,119,116,121,112,101, 0,116,119,109,111,100,101, 0,116,119,102,108, 97,103, 0,112, 97,
-100, 50, 91, 50, 93, 0, 97,102,116,101,114,100,114, 97,119, 95,116,114, 97,110,115,112, 0, 97,102,116,101,114,100,114, 97,119,
- 95,120,114, 97,121, 0, 97,102,116,101,114,100,114, 97,119, 95,120,114, 97,121,116,114, 97,110,115,112, 0,122, 98,117,102, 0,
-120,114, 97,121, 0,112, 97,100, 51, 91, 50, 93, 0, 42,112,114,111,112,101,114,116,105,101,115, 95,115,116,111,114, 97,103,101,
- 0,118,101,114,116, 0,104,111,114, 0,109, 97,115,107, 0,109,105,110, 91, 50, 93, 0,109, 97,120, 91, 50, 93, 0,109,105,110,
-122,111,111,109, 0,109, 97,120,122,111,111,109, 0,115, 99,114,111,108,108, 0,115, 99,114,111,108,108, 95,117,105, 0,107,101,
-101,112,116,111,116, 0,107,101,101,112,122,111,111,109, 0,107,101,101,112,111,102,115, 0, 97,108,105,103,110, 0,119,105,110,
-120, 0,119,105,110,121, 0,111,108,100,119,105,110,120, 0,111,108,100,119,105,110,121, 0, 42,116, 97, 98, 95,111,102,102,115,
-101,116, 0,116, 97, 98, 95,110,117,109, 0,116, 97, 98, 95, 99,117,114, 0,114,112,116, 95,109, 97,115,107, 0,118, 50,100, 0,
- 42, 97,100,115, 0,103,104,111,115,116, 67,117,114,118,101,115, 0, 97,117,116,111,115,110, 97,112, 0, 99,117,114,115,111,114,
- 86, 97,108, 0,109, 97,105,110, 98, 0,109, 97,105,110, 98,111, 0,109, 97,105,110, 98,117,115,101,114, 0,114,101, 95, 97,108,
-105,103,110, 0,112,114,101,118,105,101,119, 0,116,101,120,116,117,114,101, 95, 99,111,110,116,101,120,116, 0,112, 97,116,104,
-102,108, 97,103, 0,100, 97,116, 97,105, 99,111,110, 0, 42,112,105,110,105,100, 0, 42,116,101,120,117,115,101,114, 0,114,101,
-110,100,101,114, 95,115,105,122,101, 0, 99,104, 97,110,115,104,111,119,110, 0,122,101, 98,114, 97, 0,122,111,111,109, 0,116,
-105,116,108,101, 91, 51, 50, 93, 0,100,105,114, 91, 49, 48, 53, 54, 93, 0,102,105,108,101, 91, 50, 53, 54, 93, 0,114,101,110,
- 97,109,101,102,105,108,101, 91, 50, 53, 54, 93, 0,114,101,110, 97,109,101,101,100,105,116, 91, 50, 53, 54, 93, 0,102,105,108,
-116,101,114, 95,103,108,111, 98, 91, 54, 52, 93, 0, 97, 99,116,105,118,101, 95,102,105,108,101, 0,115,101,108, 95,102,105,114,
-115,116, 0,115,101,108, 95,108, 97,115,116, 0,115,111,114,116, 0,100,105,115,112,108, 97,121, 0,102, 95,102,112, 0,102,112,
- 95,115,116,114, 91, 56, 93, 0,115, 99,114,111,108,108, 95,111,102,102,115,101,116, 0, 42,112, 97,114, 97,109,115, 0, 42,102,
-105,108,101,115, 0, 42,102,111,108,100,101,114,115, 95,112,114,101,118, 0, 42,102,111,108,100,101,114,115, 95,110,101,120,116,
- 0, 42,111,112, 0, 42,115,109,111,111,116,104,115, 99,114,111,108,108, 95,116,105,109,101,114, 0, 42,108, 97,121,111,117,116,
- 0,114,101, 99,101,110,116,110,114, 0, 98,111,111,107,109, 97,114,107,110,114, 0,115,121,115,116,101,109,110,114, 0,116,114,
-101,101, 0, 42,116,114,101,101,115,116,111,114,101, 0,115,101, 97,114, 99,104, 95,115,116,114,105,110,103, 91, 51, 50, 93, 0,
-115,101, 97,114, 99,104, 95,116,115,101, 0,111,117,116,108,105,110,101,118,105,115, 0,115,116,111,114,101,102,108, 97,103, 0,
-115,101, 97,114, 99,104, 95,102,108, 97,103,115, 0, 42, 99,117,109, 97,112, 0,115, 99,111,112,101,115, 0,115, 97,109,112,108,
-101, 95,108,105,110,101, 95,104,105,115,116, 0, 99,117,114,115,111,114, 91, 50, 93, 0, 99,101,110,116,120, 0, 99,101,110,116,
-121, 0, 99,117,114,116,105,108,101, 0,108,111, 99,107, 0,112,105,110, 0,100,116, 95,117,118, 0,115,116,105, 99,107,121, 0,
-100,116, 95,117,118,115,116,114,101,116, 99,104, 0, 42,116,101,120,116, 0,116,111,112, 0,118,105,101,119,108,105,110,101,115,
- 0,109,101,110,117,110,114, 0,108,104,101,105,103,104,116, 0, 99,119,105,100,116,104, 0,108,105,110,101,110,114,115, 95,116,
-111,116, 0,108,101,102,116, 0,115,104,111,119,108,105,110,101,110,114,115, 0,116, 97, 98,110,117,109, 98,101,114, 0,115,104,
-111,119,115,121,110,116, 97,120, 0,108,105,110,101, 95,104,108,105,103,104,116, 0,111,118,101,114,119,114,105,116,101, 0,108,
-105,118,101, 95,101,100,105,116, 0,112,105,120, 95,112,101,114, 95,108,105,110,101, 0,116,120,116,115, 99,114,111,108,108, 0,
-116,120,116, 98, 97,114, 0,119,111,114,100,119,114, 97,112, 0,100,111,112,108,117,103,105,110,115, 0,102,105,110,100,115,116,
-114, 91, 50, 53, 54, 93, 0,114,101,112,108, 97, 99,101,115,116,114, 91, 50, 53, 54, 93, 0,109, 97,114,103,105,110, 95, 99,111,
-108,117,109,110, 0, 42,100,114, 97,119, 99, 97, 99,104,101, 0, 42,112,121, 95,100,114, 97,119, 0, 42,112,121, 95,101,118,101,
-110,116, 0, 42,112,121, 95, 98,117,116,116,111,110, 0, 42,112,121, 95, 98,114,111,119,115,101,114, 99, 97,108,108, 98, 97, 99,
-107, 0, 42,112,121, 95,103,108,111, 98, 97,108,100,105, 99,116, 0,108, 97,115,116,115,112, 97, 99,101, 0,115, 99,114,105,112,
-116,110, 97,109,101, 91, 49, 48, 50, 52, 93, 0,115, 99,114,105,112,116, 97,114,103, 91, 50, 53, 54, 93, 0, 42,115, 99,114,105,
-112,116, 0, 42, 98,117,116, 95,114,101,102,115, 0, 42, 97,114,114, 97,121, 0, 99, 97, 99,104,101,115, 0, 99, 97, 99,104,101,
- 95,100,105,115,112,108, 97,121, 0, 42,105,100, 0, 97,115,112,101, 99,116, 0,112, 97,100,102, 0,109,120, 0,109,121, 0, 42,
-101,100,105,116,116,114,101,101, 0,116,114,101,101,116,121,112,101, 0,116,101,120,102,114,111,109, 0,115,104, 97,100,101,114,
-102,114,111,109, 0,108,105,110,107,100,114, 97,103, 0,108,101,110, 95, 97,108,108,111, 99, 0, 99,117,114,115,111,114, 0,115,
- 99,114,111,108,108, 98, 97, 99,107, 0,104,105,115,116,111,114,121, 0,112,114,111,109,112,116, 91, 50, 53, 54, 93, 0,108, 97,
-110,103,117, 97,103,101, 91, 51, 50, 93, 0,115,101,108, 95,115,116, 97,114,116, 0,115,101,108, 95,101,110,100, 0,102,105,108,
-116,101,114, 91, 54, 52, 93, 0,120,108,111, 99,107,111,102, 0,121,108,111, 99,107,111,102, 0,117,115,101,114, 0,112, 97,116,
-104, 95,108,101,110,103,116,104, 0,108,111, 99, 91, 50, 93, 0,115,116, 97, 98,109, 97,116, 91, 52, 93, 91, 52, 93, 0,117,110,
-105,115,116, 97, 98,109, 97,116, 91, 52, 93, 91, 52, 93, 0,112,111,115,116,112,114,111, 99, 95,102,108, 97,103, 0,114,117,110,
-116,105,109,101, 95,102,108, 97,103, 0,102,105,108,101,110, 97,109,101, 91, 49, 48, 50, 52, 93, 0, 98,108,102, 95,105,100, 0,
-117,105,102,111,110,116, 95,105,100, 0,114, 95,116,111, 95,108, 0,112,111,105,110,116,115, 0,107,101,114,110,105,110,103, 0,
-105,116, 97,108,105, 99, 0, 98,111,108,100, 0,115,104, 97,100,111,119, 0,115,104, 97,100,120, 0,115,104, 97,100,121, 0,115,
-104, 97,100,111,119, 97,108,112,104, 97, 0,115,104, 97,100,111,119, 99,111,108,111,114, 0,112, 97,110,101,108,116,105,116,108,
-101, 0,103,114,111,117,112,108, 97, 98,101,108, 0,119,105,100,103,101,116,108, 97, 98,101,108, 0,119,105,100,103,101,116, 0,
-112, 97,110,101,108,122,111,111,109, 0,109,105,110,108, 97, 98,101,108, 99,104, 97,114,115, 0,109,105,110,119,105,100,103,101,
-116, 99,104, 97,114,115, 0, 99,111,108,117,109,110,115,112, 97, 99,101, 0,116,101,109,112,108, 97,116,101,115,112, 97, 99,101,
- 0, 98,111,120,115,112, 97, 99,101, 0, 98,117,116,116,111,110,115,112, 97, 99,101,120, 0, 98,117,116,116,111,110,115,112, 97,
- 99,101,121, 0,112, 97,110,101,108,115,112, 97, 99,101, 0,112, 97,110,101,108,111,117,116,101,114, 0,111,117,116,108,105,110,
-101, 91, 52, 93, 0,105,110,110,101,114, 91, 52, 93, 0,105,110,110,101,114, 95,115,101,108, 91, 52, 93, 0,105,116,101,109, 91,
- 52, 93, 0,116,101,120,116, 91, 52, 93, 0,116,101,120,116, 95,115,101,108, 91, 52, 93, 0,115,104, 97,100,101,100, 0,115,104,
- 97,100,101,116,111,112, 0,115,104, 97,100,101,100,111,119,110, 0, 97,108,112,104, 97, 95, 99,104,101, 99,107, 0,105,110,110,
-101,114, 95, 97,110,105,109, 91, 52, 93, 0,105,110,110,101,114, 95, 97,110,105,109, 95,115,101,108, 91, 52, 93, 0,105,110,110,
-101,114, 95,107,101,121, 91, 52, 93, 0,105,110,110,101,114, 95,107,101,121, 95,115,101,108, 91, 52, 93, 0,105,110,110,101,114,
- 95,100,114,105,118,101,110, 91, 52, 93, 0,105,110,110,101,114, 95,100,114,105,118,101,110, 95,115,101,108, 91, 52, 93, 0,104,
-101, 97,100,101,114, 91, 52, 93, 0,115,104,111,119, 95,104,101, 97,100,101,114, 0,119, 99,111,108, 95,114,101,103,117,108, 97,
-114, 0,119, 99,111,108, 95,116,111,111,108, 0,119, 99,111,108, 95,116,101,120,116, 0,119, 99,111,108, 95,114, 97,100,105,111,
- 0,119, 99,111,108, 95,111,112,116,105,111,110, 0,119, 99,111,108, 95,116,111,103,103,108,101, 0,119, 99,111,108, 95,110,117,
-109, 0,119, 99,111,108, 95,110,117,109,115,108,105,100,101,114, 0,119, 99,111,108, 95,109,101,110,117, 0,119, 99,111,108, 95,
-112,117,108,108,100,111,119,110, 0,119, 99,111,108, 95,109,101,110,117, 95, 98, 97, 99,107, 0,119, 99,111,108, 95,109,101,110,
-117, 95,105,116,101,109, 0,119, 99,111,108, 95,116,111,111,108,116,105,112, 0,119, 99,111,108, 95, 98,111,120, 0,119, 99,111,
-108, 95,115, 99,114,111,108,108, 0,119, 99,111,108, 95,112,114,111,103,114,101,115,115, 0,119, 99,111,108, 95,108,105,115,116,
- 95,105,116,101,109, 0,119, 99,111,108, 95,115,116, 97,116,101, 0,112, 97,110,101,108, 0,105, 99,111,110,102,105,108,101, 91,
- 50, 53, 54, 93, 0,105, 99,111,110, 95, 97,108,112,104, 97, 0, 98, 97, 99,107, 91, 52, 93, 0,116,105,116,108,101, 91, 52, 93,
- 0,116,101,120,116, 95,104,105, 91, 52, 93, 0,104,101, 97,100,101,114, 95,116,105,116,108,101, 91, 52, 93, 0,104,101, 97,100,
-101,114, 95,116,101,120,116, 91, 52, 93, 0,104,101, 97,100,101,114, 95,116,101,120,116, 95,104,105, 91, 52, 93, 0, 98,117,116,
-116,111,110, 91, 52, 93, 0, 98,117,116,116,111,110, 95,116,105,116,108,101, 91, 52, 93, 0, 98,117,116,116,111,110, 95,116,101,
-120,116, 91, 52, 93, 0, 98,117,116,116,111,110, 95,116,101,120,116, 95,104,105, 91, 52, 93, 0,108,105,115,116, 91, 52, 93, 0,
-108,105,115,116, 95,116,105,116,108,101, 91, 52, 93, 0,108,105,115,116, 95,116,101,120,116, 91, 52, 93, 0,108,105,115,116, 95,
-116,101,120,116, 95,104,105, 91, 52, 93, 0,112, 97,110,101,108, 91, 52, 93, 0,112, 97,110,101,108, 95,116,105,116,108,101, 91,
- 52, 93, 0,112, 97,110,101,108, 95,116,101,120,116, 91, 52, 93, 0,112, 97,110,101,108, 95,116,101,120,116, 95,104,105, 91, 52,
- 93, 0,115,104, 97,100,101, 49, 91, 52, 93, 0,115,104, 97,100,101, 50, 91, 52, 93, 0,104,105,108,105,116,101, 91, 52, 93, 0,
-103,114,105,100, 91, 52, 93, 0,119,105,114,101, 91, 52, 93, 0,115,101,108,101, 99,116, 91, 52, 93, 0,108, 97,109,112, 91, 52,
- 93, 0,115,112,101, 97,107,101,114, 91, 52, 93, 0,101,109,112,116,121, 91, 52, 93, 0, 99, 97,109,101,114, 97, 91, 52, 93, 0,
-112, 97,100, 91, 56, 93, 0, 97, 99,116,105,118,101, 91, 52, 93, 0,103,114,111,117,112, 91, 52, 93, 0,103,114,111,117,112, 95,
- 97, 99,116,105,118,101, 91, 52, 93, 0,116,114, 97,110,115,102,111,114,109, 91, 52, 93, 0,118,101,114,116,101,120, 91, 52, 93,
- 0,118,101,114,116,101,120, 95,115,101,108,101, 99,116, 91, 52, 93, 0,101,100,103,101, 91, 52, 93, 0,101,100,103,101, 95,115,
-101,108,101, 99,116, 91, 52, 93, 0,101,100,103,101, 95,115,101, 97,109, 91, 52, 93, 0,101,100,103,101, 95,115,104, 97,114,112,
- 91, 52, 93, 0,101,100,103,101, 95,102, 97, 99,101,115,101,108, 91, 52, 93, 0,101,100,103,101, 95, 99,114,101, 97,115,101, 91,
- 52, 93, 0,102, 97, 99,101, 91, 52, 93, 0,102, 97, 99,101, 95,115,101,108,101, 99,116, 91, 52, 93, 0,102, 97, 99,101, 95,100,
-111,116, 91, 52, 93, 0,101,120,116,114, 97, 95,101,100,103,101, 95,108,101,110, 91, 52, 93, 0,101,120,116,114, 97, 95,102, 97,
- 99,101, 95, 97,110,103,108,101, 91, 52, 93, 0,101,120,116,114, 97, 95,102, 97, 99,101, 95, 97,114,101, 97, 91, 52, 93, 0,112,
- 97,100, 51, 91, 52, 93, 0,110,111,114,109, 97,108, 91, 52, 93, 0,118,101,114,116,101,120, 95,110,111,114,109, 97,108, 91, 52,
- 93, 0, 98,111,110,101, 95,115,111,108,105,100, 91, 52, 93, 0, 98,111,110,101, 95,112,111,115,101, 91, 52, 93, 0,115,116,114,
-105,112, 91, 52, 93, 0,115,116,114,105,112, 95,115,101,108,101, 99,116, 91, 52, 93, 0, 99,102,114, 97,109,101, 91, 52, 93, 0,
-110,117,114, 98, 95,117,108,105,110,101, 91, 52, 93, 0,110,117,114, 98, 95,118,108,105,110,101, 91, 52, 93, 0, 97, 99,116, 95,
-115,112,108,105,110,101, 91, 52, 93, 0,110,117,114, 98, 95,115,101,108, 95,117,108,105,110,101, 91, 52, 93, 0,110,117,114, 98,
- 95,115,101,108, 95,118,108,105,110,101, 91, 52, 93, 0,108, 97,115,116,115,101,108, 95,112,111,105,110,116, 91, 52, 93, 0,104,
- 97,110,100,108,101, 95,102,114,101,101, 91, 52, 93, 0,104, 97,110,100,108,101, 95, 97,117,116,111, 91, 52, 93, 0,104, 97,110,
-100,108,101, 95,118,101, 99,116, 91, 52, 93, 0,104, 97,110,100,108,101, 95, 97,108,105,103,110, 91, 52, 93, 0,104, 97,110,100,
-108,101, 95, 97,117,116,111, 95, 99,108, 97,109,112,101,100, 91, 52, 93, 0,104, 97,110,100,108,101, 95,115,101,108, 95,102,114,
-101,101, 91, 52, 93, 0,104, 97,110,100,108,101, 95,115,101,108, 95, 97,117,116,111, 91, 52, 93, 0,104, 97,110,100,108,101, 95,
-115,101,108, 95,118,101, 99,116, 91, 52, 93, 0,104, 97,110,100,108,101, 95,115,101,108, 95, 97,108,105,103,110, 91, 52, 93, 0,
-104, 97,110,100,108,101, 95,115,101,108, 95, 97,117,116,111, 95, 99,108, 97,109,112,101,100, 91, 52, 93, 0,100,115, 95, 99,104,
- 97,110,110,101,108, 91, 52, 93, 0,100,115, 95,115,117, 98, 99,104, 97,110,110,101,108, 91, 52, 93, 0, 99,111,110,115,111,108,
-101, 95,111,117,116,112,117,116, 91, 52, 93, 0, 99,111,110,115,111,108,101, 95,105,110,112,117,116, 91, 52, 93, 0, 99,111,110,
-115,111,108,101, 95,105,110,102,111, 91, 52, 93, 0, 99,111,110,115,111,108,101, 95,101,114,114,111,114, 91, 52, 93, 0, 99,111,
-110,115,111,108,101, 95, 99,117,114,115,111,114, 91, 52, 93, 0,118,101,114,116,101,120, 95,115,105,122,101, 0,111,117,116,108,
-105,110,101, 95,119,105,100,116,104, 0,102, 97, 99,101,100,111,116, 95,115,105,122,101, 0,110,111,111,100,108,101, 95, 99,117,
-114,118,105,110,103, 0,115,121,110,116, 97,120,108, 91, 52, 93, 0,115,121,110,116, 97,120,110, 91, 52, 93, 0,115,121,110,116,
- 97,120, 98, 91, 52, 93, 0,115,121,110,116, 97,120,118, 91, 52, 93, 0,115,121,110,116, 97,120, 99, 91, 52, 93, 0,109,111,118,
-105,101, 91, 52, 93, 0,109,111,118,105,101, 99,108,105,112, 91, 52, 93, 0,105,109, 97,103,101, 91, 52, 93, 0,115, 99,101,110,
-101, 91, 52, 93, 0, 97,117,100,105,111, 91, 52, 93, 0,101,102,102,101, 99,116, 91, 52, 93, 0,112,108,117,103,105,110, 91, 52,
- 93, 0,116,114, 97,110,115,105,116,105,111,110, 91, 52, 93, 0,109,101,116, 97, 91, 52, 93, 0,101,100,105,116,109,101,115,104,
- 95, 97, 99,116,105,118,101, 91, 52, 93, 0,104, 97,110,100,108,101, 95,118,101,114,116,101,120, 91, 52, 93, 0,104, 97,110,100,
-108,101, 95,118,101,114,116,101,120, 95,115,101,108,101, 99,116, 91, 52, 93, 0,104, 97,110,100,108,101, 95,118,101,114,116,101,
-120, 95,115,105,122,101, 0,109, 97,114,107,101,114, 95,111,117,116,108,105,110,101, 91, 52, 93, 0,109, 97,114,107,101,114, 91,
- 52, 93, 0, 97, 99,116, 95,109, 97,114,107,101,114, 91, 52, 93, 0,115,101,108, 95,109, 97,114,107,101,114, 91, 52, 93, 0,100,
-105,115, 95,109, 97,114,107,101,114, 91, 52, 93, 0,108,111, 99,107, 95,109, 97,114,107,101,114, 91, 52, 93, 0, 98,117,110,100,
-108,101, 95,115,111,108,105,100, 91, 52, 93, 0,112, 97,116,104, 95, 98,101,102,111,114,101, 91, 52, 93, 0,112, 97,116,104, 95,
- 97,102,116,101,114, 91, 52, 93, 0, 99, 97,109,101,114, 97, 95,112, 97,116,104, 91, 52, 93, 0,104,112, 97,100, 91, 55, 93, 0,
-112,114,101,118,105,101,119, 95, 98, 97, 99,107, 91, 52, 93, 0,112,114,101,118,105,101,119, 95,115,116,105,116, 99,104, 95,102,
- 97, 99,101, 91, 52, 93, 0,112,114,101,118,105,101,119, 95,115,116,105,116, 99,104, 95,101,100,103,101, 91, 52, 93, 0,112,114,
-101,118,105,101,119, 95,115,116,105,116, 99,104, 95,118,101,114,116, 91, 52, 93, 0,112,114,101,118,105,101,119, 95,115,116,105,
-116, 99,104, 95,115,116,105,116, 99,104, 97, 98,108,101, 91, 52, 93, 0,112,114,101,118,105,101,119, 95,115,116,105,116, 99,104,
- 95,117,110,115,116,105,116, 99,104, 97, 98,108,101, 91, 52, 93, 0,112,114,101,118,105,101,119, 95,115,116,105,116, 99,104, 95,
- 97, 99,116,105,118,101, 91, 52, 93, 0,109, 97,116, 99,104, 91, 52, 93, 0,115,101,108,101, 99,116,101,100, 95,104,105,103,104,
-108,105,103,104,116, 91, 52, 93, 0,115,111,108,105,100, 91, 52, 93, 0,116,117,105, 0,116, 98,117,116,115, 0,116,118, 51,100,
- 0,116,102,105,108,101, 0,116,105,112,111, 0,116,105,110,102,111, 0,116, 97, 99,116, 0,116,110,108, 97, 0,116,115,101,113,
- 0,116,105,109, 97, 0,116,101,120,116, 0,116,111,111,112,115, 0,116,116,105,109,101, 0,116,110,111,100,101, 0,116,108,111,
-103,105, 99, 0,116,117,115,101,114,112,114,101,102, 0,116, 99,111,110,115,111,108,101, 0,116, 99,108,105,112, 0,116, 97,114,
-109, 91, 50, 48, 93, 0, 97, 99,116,105,118,101, 95,116,104,101,109,101, 95, 97,114,101, 97, 0,109,111,100,117,108,101, 91, 54,
- 52, 93, 0,115,112,101, 99, 91, 52, 93, 0,100,117,112,102,108, 97,103, 0,115, 97,118,101,116,105,109,101, 0,116,101,109,112,
-100,105,114, 91, 55, 54, 56, 93, 0,102,111,110,116,100,105,114, 91, 55, 54, 56, 93, 0,114,101,110,100,101,114,100,105,114, 91,
- 49, 48, 50, 52, 93, 0,116,101,120,116,117,100,105,114, 91, 55, 54, 56, 93, 0,112,108,117,103,116,101,120,100,105,114, 91, 55,
- 54, 56, 93, 0,112,108,117,103,115,101,113,100,105,114, 91, 55, 54, 56, 93, 0,112,121,116,104,111,110,100,105,114, 91, 55, 54,
- 56, 93, 0,115,111,117,110,100,100,105,114, 91, 55, 54, 56, 93, 0,105,109, 97,103,101, 95,101,100,105,116,111,114, 91, 49, 48,
- 50, 52, 93, 0, 97,110,105,109, 95,112,108, 97,121,101,114, 91, 49, 48, 50, 52, 93, 0, 97,110,105,109, 95,112,108, 97,121,101,
-114, 95,112,114,101,115,101,116, 0,118, 50,100, 95,109,105,110, 95,103,114,105,100,115,105,122,101, 0,116,105,109,101, 99,111,
-100,101, 95,115,116,121,108,101, 0,118,101,114,115,105,111,110,115, 0,100, 98,108, 95, 99,108,105, 99,107, 95,116,105,109,101,
- 0,103, 97,109,101,102,108, 97,103,115, 0,119,104,101,101,108,108,105,110,101,115, 99,114,111,108,108, 0,117,105,102,108, 97,
-103, 0,108, 97,110,103,117, 97,103,101, 0,117,115,101,114,112,114,101,102, 0,118,105,101,119,122,111,111,109, 0,109,105,120,
- 98,117,102,115,105,122,101, 0, 97,117,100,105,111,100,101,118,105, 99,101, 0, 97,117,100,105,111,114, 97,116,101, 0, 97,117,
-100,105,111,102,111,114,109, 97,116, 0, 97,117,100,105,111, 99,104, 97,110,110,101,108,115, 0,100,112,105, 0,101,110, 99,111,
-100,105,110,103, 0,116,114, 97,110,115,111,112,116,115, 0,109,101,110,117,116,104,114,101,115,104,111,108,100, 49, 0,109,101,
-110,117,116,104,114,101,115,104,111,108,100, 50, 0,116,104,101,109,101,115, 0,117,105,102,111,110,116,115, 0,117,105,115,116,
-121,108,101,115, 0,107,101,121,109, 97,112,115, 0,117,115,101,114, 95,107,101,121,109, 97,112,115, 0, 97,100,100,111,110,115,
- 0,107,101,121, 99,111,110,102,105,103,115,116,114, 91, 54, 52, 93, 0,117,110,100,111,115,116,101,112,115, 0,117,110,100,111,
-109,101,109,111,114,121, 0,103,112, 95,109, 97,110,104, 97,116,116,101,110,100,105,115,116, 0,103,112, 95,101,117, 99,108,105,
-100,101, 97,110,100,105,115,116, 0,103,112, 95,101,114, 97,115,101,114, 0,103,112, 95,115,101,116,116,105,110,103,115, 0,116,
- 98, 95,108,101,102,116,109,111,117,115,101, 0,116, 98, 95,114,105,103,104,116,109,111,117,115,101, 0,108,105,103,104,116, 91,
- 51, 93, 0,116,119, 95,104,111,116,115,112,111,116, 0,116,119, 95,102,108, 97,103, 0,116,119, 95,104, 97,110,100,108,101,115,
-105,122,101, 0,116,119, 95,115,105,122,101, 0,116,101,120,116,105,109,101,111,117,116, 0,116,101,120, 99,111,108,108,101, 99,
-116,114, 97,116,101, 0,119,109,100,114, 97,119,109,101,116,104,111,100, 0,100,114, 97,103,116,104,114,101,115,104,111,108,100,
- 0,109,101,109, 99, 97, 99,104,101,108,105,109,105,116, 0,112,114,101,102,101,116, 99,104,102,114, 97,109,101,115, 0,102,114,
- 97,109,101,115,101,114,118,101,114,112,111,114,116, 0,112, 97,100, 95,114,111,116, 95, 97,110,103,108,101, 0,111, 98, 99,101,
-110,116,101,114, 95,100,105, 97, 0,114,118,105,115,105,122,101, 0,114,118,105, 98,114,105,103,104,116, 0,114,101, 99,101,110,
-116, 95,102,105,108,101,115, 0,115,109,111,111,116,104, 95,118,105,101,119,116,120, 0,103,108,114,101,115,108,105,109,105,116,
- 0, 99,117,114,115,115,105,122,101, 0, 99,111,108,111,114, 95,112,105, 99,107,101,114, 95,116,121,112,101, 0,105,112,111, 95,
-110,101,119, 0,107,101,121,104, 97,110,100,108,101,115, 95,110,101,119, 0,115, 99,114, 99, 97,115,116,102,112,115, 0,115, 99,
-114, 99, 97,115,116,119, 97,105,116, 0,119,105,100,103,101,116, 95,117,110,105,116, 0, 97,110,105,115,111,116,114,111,112,105,
- 99, 95,102,105,108,116,101,114, 0,117,115,101, 95, 49, 54, 98,105,116, 95,116,101,120,116,117,114,101,115, 0,112, 97,100, 56,
- 0,110,100,111,102, 95,115,101,110,115,105,116,105,118,105,116,121, 0,110,100,111,102, 95,102,108, 97,103, 0,103,108, 97,108,
-112,104, 97, 99,108,105,112, 0,116,101,120,116, 95,114,101,110,100,101,114, 0,112, 97,100, 57, 0, 99,111, 98, 97, 95,119,101,
-105,103,104,116, 0,115, 99,117,108,112,116, 95,112, 97,105,110,116, 95,111,118,101,114,108, 97,121, 95, 99,111,108, 91, 51, 93,
- 0,116,119,101, 97,107, 95,116,104,114,101,115,104,111,108,100, 0, 97,117,116,104,111,114, 91, 56, 48, 93, 0, 99,111,109,112,
-117,116,101, 95,100,101,118,105, 99,101, 95,116,121,112,101, 0, 99,111,109,112,117,116,101, 95,100,101,118,105, 99,101, 95,105,
-100, 0,102, 99,117, 95,105,110, 97, 99,116,105,118,101, 95, 97,108,112,104, 97, 0,118,101,114,116, 98, 97,115,101, 0,101,100,
-103,101, 98, 97,115,101, 0, 97,114,101, 97, 98, 97,115,101, 0, 42,110,101,119,115, 99,101,110,101, 0,114,101,100,114, 97,119,
-115, 95,102,108, 97,103, 0,102,117,108,108, 0,116,101,109,112, 0,119,105,110,105,100, 0,100,111, 95,100,114, 97,119, 0,100,
-111, 95,114,101,102,114,101,115,104, 0,100,111, 95,100,114, 97,119, 95,103,101,115,116,117,114,101, 0,100,111, 95,100,114, 97,
-119, 95,112, 97,105,110,116, 99,117,114,115,111,114, 0,100,111, 95,100,114, 97,119, 95,100,114, 97,103, 0,115,119, 97,112, 0,
-109, 97,105,110,119,105,110, 0,115,117, 98,119,105,110, 97, 99,116,105,118,101, 0, 42, 97,110,105,109,116,105,109,101,114, 0,
- 42, 99,111,110,116,101,120,116, 0,104, 97,110,100,108,101,114, 91, 56, 93, 0, 42,110,101,119,118, 0,118,101, 99, 0, 42,118,
- 49, 0, 42,118, 50, 0, 42,116,121,112,101, 0,112, 97,110,101,108,110, 97,109,101, 91, 54, 52, 93, 0,116, 97, 98,110, 97,109,
-101, 91, 54, 52, 93, 0,100,114, 97,119,110, 97,109,101, 91, 54, 52, 93, 0,111,102,115,120, 0,111,102,115,121, 0,115,105,122,
-101,120, 0,115,105,122,101,121, 0,108, 97, 98,101,108,111,102,115, 0, 99,111,110,116,114,111,108, 0,115,110, 97,112, 0,115,
-111,114,116,111,114,100,101,114, 0, 42,112, 97,110,101,108,116, 97, 98, 0, 42, 97, 99,116,105,118,101,100, 97,116, 97, 0,108,
-105,115,116, 95,115, 99,114,111,108,108, 0,108,105,115,116, 95,115,105,122,101, 0,108,105,115,116, 95,108, 97,115,116, 95,108,
-101,110, 0,108,105,115,116, 95,103,114,105,112, 95,115,105,122,101, 0,108,105,115,116, 95,115,101, 97,114, 99,104, 91, 54, 52,
- 93, 0, 42,118, 51, 0, 42,118, 52, 0, 42,102,117,108,108, 0, 98,117,116,115,112, 97, 99,101,116,121,112,101, 0,104,101, 97,
-100,101,114,116,121,112,101, 0,115,112, 97, 99,101,100, 97,116, 97, 0,104, 97,110,100,108,101,114,115, 0, 97, 99,116,105,111,
-110,122,111,110,101,115, 0,119,105,110,114, 99,116, 0,100,114, 97,119,114, 99,116, 0,115,119,105,110,105,100, 0,114,101,103,
-105,111,110,116,121,112,101, 0, 97,108,105,103,110,109,101,110,116, 0,100,111, 95,100,114, 97,119, 95,111,118,101,114,108, 97,
-121, 0,117,105, 98,108,111, 99,107,115, 0,112, 97,110,101,108,115, 0, 42,104,101, 97,100,101,114,115,116,114, 0, 42,114,101,
-103,105,111,110,100, 97,116, 97, 0,115,117, 98,118,115,116,114, 91, 52, 93, 0,115,117, 98,118,101,114,115,105,111,110, 0,112,
- 97,100,115, 0,109,105,110,118,101,114,115,105,111,110, 0,109,105,110,115,117, 98,118,101,114,115,105,111,110, 0,119,105,110,
-112,111,115, 0, 42, 99,117,114,115, 99,114,101,101,110, 0, 42, 99,117,114,115, 99,101,110,101, 0,102,105,108,101,102,108, 97,
-103,115, 0,103,108,111, 98, 97,108,102, 0,114,101,118,105,115,105,111,110, 0,110, 97,109,101, 91, 50, 53, 54, 93, 0,111,114,
-105,103, 95,119,105,100,116,104, 0,111,114,105,103, 95,104,101,105,103,104,116, 0, 98,111,116,116,111,109, 0,114,105,103,104,
-116, 0,120,111,102,115, 0,121,111,102,115, 0,108,105,102,116, 91, 51, 93, 0,103, 97,109,109, 97, 91, 51, 93, 0,103, 97,105,
-110, 91, 51, 93, 0,100,105,114, 91, 55, 54, 56, 93, 0,116, 99, 0, 98,117,105,108,100, 95,115,105,122,101, 95,102,108, 97,103,
-115, 0, 98,117,105,108,100, 95,116, 99, 95,102,108, 97,103,115, 0,100,111,110,101, 0,115,116, 97,114,116,115,116,105,108,108,
- 0,101,110,100,115,116,105,108,108, 0, 42,115,116,114,105,112,100, 97,116, 97, 0, 42, 99,114,111,112, 0, 42,116,114, 97,110,
-115,102,111,114,109, 0, 42, 99,111,108,111,114, 95, 98, 97,108, 97,110, 99,101, 0, 42,105,110,115,116, 97,110, 99,101, 95,112,
-114,105,118, 97,116,101, 95,100, 97,116, 97, 0, 42, 42, 99,117,114,114,101,110,116, 95,112,114,105,118, 97,116,101, 95,100, 97,
-116, 97, 0, 42,116,109,112, 0,115,116, 97,114,116,111,102,115, 0,101,110,100,111,102,115, 0,109, 97, 99,104,105,110,101, 0,
-115,116, 97,114,116,100,105,115,112, 0,101,110,100,100,105,115,112, 0,115, 97,116, 0,109,117,108, 0,104, 97,110,100,115,105,
-122,101, 0, 97,110,105,109, 95,112,114,101,115,101,101,107, 0,115,116,114,101, 97,109,105,110,100,101,120, 0,109,117,108,116,
-105, 99, 97,109, 95,115,111,117,114, 99,101, 0, 99,108,105,112, 95,102,108, 97,103, 0, 42,115,116,114,105,112, 0, 42,115, 99,
-101,110,101, 95, 99, 97,109,101,114, 97, 0,101,102,102,101, 99,116, 95,102, 97,100,101,114, 0,115,112,101,101,100, 95,102, 97,
-100,101,114, 0, 42,115,101,113, 49, 0, 42,115,101,113, 50, 0, 42,115,101,113, 51, 0,115,101,113, 98, 97,115,101, 0, 42,115,
-111,117,110,100, 0, 42,115, 99,101,110,101, 95,115,111,117,110,100, 0,112,105,116, 99,104, 0,112, 97,110, 0,115,116,114,111,
- 98,101, 0, 42,101,102,102,101, 99,116,100, 97,116, 97, 0, 97,110,105,109, 95,115,116, 97,114,116,111,102,115, 0, 97,110,105,
-109, 95,101,110,100,111,102,115, 0, 98,108,101,110,100, 95,109,111,100,101, 0, 98,108,101,110,100, 95,111,112, 97, 99,105,116,
-121, 0, 42,111,108,100, 98, 97,115,101,112, 0, 42,112, 97,114,115,101,113, 0, 42,115,101,113, 98, 97,115,101,112, 0,109,101,
-116, 97,115,116, 97, 99,107, 0, 42, 97, 99,116, 95,115,101,113, 0, 97, 99,116, 95,105,109, 97,103,101,100,105,114, 91, 49, 48,
- 50, 52, 93, 0, 97, 99,116, 95,115,111,117,110,100,100,105,114, 91, 49, 48, 50, 52, 93, 0,111,118,101,114, 95,111,102,115, 0,
-111,118,101,114, 95, 99,102,114, 97, 0,111,118,101,114, 95,102,108, 97,103, 0,111,118,101,114, 95, 98,111,114,100,101,114, 0,
-101,100,103,101, 87,105,100,116,104, 0,102,111,114,119, 97,114,100, 0,119,105,112,101,116,121,112,101, 0,102, 77,105,110,105,
- 0,102, 67,108, 97,109,112, 0,102, 66,111,111,115,116, 0,100, 68,105,115,116, 0,100, 81,117, 97,108,105,116,121, 0, 98, 78,
-111, 67,111,109,112, 0, 83, 99, 97,108,101,120, 73,110,105, 0, 83, 99, 97,108,101,121, 73,110,105, 0,120, 73,110,105, 0,121,
- 73,110,105, 0,114,111,116, 73,110,105, 0,105,110,116,101,114,112,111,108, 97,116,105,111,110, 0,117,110,105,102,111,114,109,
- 95,115, 99, 97,108,101, 0, 42,102,114, 97,109,101, 77, 97,112, 0,103,108,111, 98, 97,108, 83,112,101,101,100, 0,108, 97,115,
-116, 86, 97,108,105,100, 70,114, 97,109,101, 0, 98,117,116,116,121,112,101, 0,117,115,101,114,106,105,116, 0,115,116, 97, 0,
-116,111,116,112, 97,114,116, 0,110,111,114,109,102, 97, 99, 0,111, 98,102, 97, 99, 0,114, 97,110,100,102, 97, 99, 0,116,101,
-120,102, 97, 99, 0,114, 97,110,100,108,105,102,101, 0,102,111,114, 99,101, 91, 51, 93, 0,118,101, 99,116,115,105,122,101, 0,
-109, 97,120,108,101,110, 0,100,101,102,118,101, 99, 91, 51, 93, 0,109,117,108,116, 91, 52, 93, 0,108,105,102,101, 91, 52, 93,
- 0, 99,104,105,108,100, 91, 52, 93, 0,109, 97,116, 91, 52, 93, 0,116,101,120,109, 97,112, 0, 99,117,114,109,117,108,116, 0,
-115,116, 97,116,105, 99,115,116,101,112, 0,111,109, 97,116, 0,116,105,109,101,116,101,120, 0,115,112,101,101,100,116,101,120,
- 0,102,108, 97,103, 50,110,101,103, 0,118,101,114,116,103,114,111,117,112, 95,118, 0,118,103,114,111,117,112,110, 97,109,101,
- 91, 54, 52, 93, 0,118,103,114,111,117,112,110, 97,109,101, 95,118, 91, 54, 52, 93, 0, 42,107,101,121,115, 0,109,105,110,102,
- 97, 99, 0,110,114, 0,117,115,101,100, 0,117,115,101,100,101,108,101,109, 0, 42,112,111,105,110, 0,114,101,115,101,116,100,
-105,115,116, 0,108, 97,115,116,118, 97,108, 0, 42,109, 97, 0,107,101,121, 0,113,117, 97,108, 0,113,117, 97,108, 50, 0,116,
- 97,114,103,101,116, 78, 97,109,101, 91, 54, 52, 93, 0,116,111,103,103,108,101, 78, 97,109,101, 91, 54, 52, 93, 0,118, 97,108,
-117,101, 91, 54, 52, 93, 0,109, 97,120,118, 97,108,117,101, 91, 54, 52, 93, 0,100,101,108, 97,121, 0,100,117,114, 97,116,105,
-111,110, 0,109, 97,116,101,114,105, 97,108, 78, 97,109,101, 91, 54, 52, 93, 0,100, 97,109,112,116,105,109,101,114, 0,112,114,
-111,112,110, 97,109,101, 91, 54, 52, 93, 0,109, 97,116,110, 97,109,101, 91, 54, 52, 93, 0, 97,120,105,115,102,108, 97,103, 0,
-112,111,115,101, 99,104, 97,110,110,101,108, 91, 54, 52, 93, 0, 99,111,110,115,116,114, 97,105,110,116, 91, 54, 52, 93, 0, 42,
-102,114,111,109, 79, 98,106,101, 99,116, 0,115,117, 98,106,101, 99,116, 91, 54, 52, 93, 0, 98,111,100,121, 91, 54, 52, 93, 0,
-111,116,121,112,101, 0,112,117,108,115,101, 0,102,114,101,113, 0,116,111,116,108,105,110,107,115, 0, 42, 42,108,105,110,107,
-115, 0,116, 97,112, 0,106,111,121,105,110,100,101,120, 0, 97,120,105,115, 95,115,105,110,103,108,101, 0, 97,120,105,115,102,
- 0, 98,117,116,116,111,110, 0,104, 97,116, 0,104, 97,116,102, 0,112,114,101, 99,105,115,105,111,110, 0,115,116,114, 91, 49,
- 50, 56, 93, 0, 42,109,121,110,101,119, 0,105,110,112,117,116,115, 0,116,111,116,115,108,105,110,107,115, 0, 42, 42,115,108,
-105,110,107,115, 0,118, 97,108,111, 0,115,116, 97,116,101, 95,109, 97,115,107, 0, 42, 97, 99,116, 0,102,114, 97,109,101, 80,
-114,111,112, 91, 54, 52, 93, 0, 98,108,101,110,100,105,110, 0,112,114,105,111,114,105,116,121, 0,101,110,100, 95,114,101,115,
-101,116, 0,115,116,114,105,100,101, 97,120,105,115, 0,115,116,114,105,100,101,108,101,110,103,116,104, 0,108, 97,121,101,114,
- 95,119,101,105,103,104,116, 0,109,105,110, 95,103, 97,105,110, 0,109, 97,120, 95,103, 97,105,110, 0,114,101,102,101,114,101,
-110, 99,101, 95,100,105,115,116, 97,110, 99,101, 0,109, 97,120, 95,100,105,115,116, 97,110, 99,101, 0,114,111,108,108,111,102,
-102, 95,102, 97, 99,116,111,114, 0, 99,111,110,101, 95,105,110,110,101,114, 95, 97,110,103,108,101, 0, 99,111,110,101, 95,111,
-117,116,101,114, 95, 97,110,103,108,101, 0, 99,111,110,101, 95,111,117,116,101,114, 95,103, 97,105,110, 0,115,110,100,110,114,
- 0,115,111,117,110,100, 51, 68, 0,112, 97,100, 54, 91, 49, 93, 0, 42,109,101, 0,108,105,110, 86,101,108,111, 99,105,116,121,
- 91, 51, 93, 0, 97,110,103, 86,101,108,111, 99,105,116,121, 91, 51, 93, 0,108,111, 99, 97,108,102,108, 97,103, 0,100,121,110,
- 95,111,112,101,114, 97,116,105,111,110, 0,102,111,114, 99,101,108,111, 99, 91, 51, 93, 0,102,111,114, 99,101,114,111,116, 91,
- 51, 93, 0,112, 97,100, 49, 91, 51, 93, 0,108,105,110,101, 97,114,118,101,108,111, 99,105,116,121, 91, 51, 93, 0, 97,110,103,
-117,108, 97,114,118,101,108,111, 99,105,116,121, 91, 51, 93, 0, 42,114,101,102,101,114,101,110, 99,101, 0,109,105,110, 0,109,
- 97,120, 0,114,111,116,100, 97,109,112, 0,109,105,110,108,111, 99, 91, 51, 93, 0,109, 97,120,108,111, 99, 91, 51, 93, 0,109,
-105,110,114,111,116, 91, 51, 93, 0,109, 97,120,114,111,116, 91, 51, 93, 0,109, 97,116,112,114,111,112, 91, 54, 52, 93, 0, 98,
-117,116,115,116, 97, 0, 98,117,116,101,110,100, 0,100,105,115,116,114,105, 98,117,116,105,111,110, 0,105,110,116, 95, 97,114,
-103, 95, 49, 0,105,110,116, 95, 97,114,103, 95, 50, 0,102,108,111, 97,116, 95, 97,114,103, 95, 49, 0,102,108,111, 97,116, 95,
- 97,114,103, 95, 50, 0,116,111, 80,114,111,112, 78, 97,109,101, 91, 54, 52, 93, 0, 42,116,111, 79, 98,106,101, 99,116, 0, 98,
-111,100,121, 84,121,112,101, 0,102,105,108,101,110, 97,109,101, 91, 54, 52, 93, 0,108,111, 97,100, 97,110,105,110, 97,109,101,
- 91, 54, 52, 93, 0,105,110,116, 95, 97,114,103, 0,102,108,111, 97,116, 95, 97,114,103, 0,105,110,102,108,117,101,110, 99,101,
- 0, 42,115,117, 98,116, 97,114,103,101,116, 0,102, 97, 99,105,110,103, 97,120,105,115, 0,118,101,108,111, 99,105,116,121, 0,
- 97, 99, 99,101,108,101,114, 97,116,105,111,110, 0,116,117,114,110,115,112,101,101,100, 0,117,112,100, 97,116,101, 84,105,109,
-101, 0, 42,110, 97,118,109,101,115,104, 0,103,111, 0, 42,110,101,119,112, 97, 99,107,101,100,102,105,108,101, 0, 97,116,116,
-101,110,117, 97,116,105,111,110, 0,100,105,115,116, 97,110, 99,101, 0, 42, 99, 97, 99,104,101, 0, 42,119, 97,118,101,102,111,
-114,109, 0, 42,112,108, 97,121, 98, 97, 99,107, 95,104, 97,110,100,108,101, 0, 42,108, 97,109,112,114,101,110, 0,103,111, 98,
-106,101, 99,116, 0,100,117,112,108,105, 95,111,102,115, 91, 51, 93, 0, 42,112,114,111,112, 0, 99,104,105,108,100, 98, 97,115,
-101, 0,114,111,108,108, 0,104,101, 97,100, 91, 51, 93, 0,116, 97,105,108, 91, 51, 93, 0, 98,111,110,101, 95,109, 97,116, 91,
- 51, 93, 91, 51, 93, 0, 97,114,109, 95,104,101, 97,100, 91, 51, 93, 0, 97,114,109, 95,116, 97,105,108, 91, 51, 93, 0, 97,114,
-109, 95,109, 97,116, 91, 52, 93, 91, 52, 93, 0, 97,114,109, 95,114,111,108,108, 0,120,119,105,100,116,104, 0,122,119,105,100,
-116,104, 0,101, 97,115,101, 49, 0,101, 97,115,101, 50, 0,114, 97,100, 95,104,101, 97,100, 0,114, 97,100, 95,116, 97,105,108,
- 0,112, 97,100, 91, 49, 93, 0, 98,111,110,101, 98, 97,115,101, 0, 99,104, 97,105,110, 98, 97,115,101, 0, 42,101,100, 98,111,
- 0, 42, 97, 99,116, 95, 98,111,110,101, 0, 42, 97, 99,116, 95,101,100, 98,111,110,101, 0, 42,115,107,101,116, 99,104, 0,103,
-101,118,101,114,116,100,101,102,111,114,109,101,114, 0,108, 97,121,101,114, 95,117,115,101,100, 0,108, 97,121,101,114, 95,112,
-114,111,116,101, 99,116,101,100, 0,103,104,111,115,116,101,112, 0,103,104,111,115,116,115,105,122,101, 0,103,104,111,115,116,
-116,121,112,101, 0,112, 97,116,104,115,105,122,101, 0,103,104,111,115,116,115,102, 0,103,104,111,115,116,101,102, 0,112, 97,
-116,104,115,102, 0,112, 97,116,104,101,102, 0,112, 97,116,104, 98, 99, 0,112, 97,116,104, 97, 99, 0, 42,112,111,105,110,116,
-115, 0,115,116, 97,114,116, 95,102,114, 97,109,101, 0,101,110,100, 95,102,114, 97,109,101, 0,103,104,111,115,116, 95,115,102,
- 0,103,104,111,115,116, 95,101,102, 0,103,104,111,115,116, 95, 98, 99, 0,103,104,111,115,116, 95, 97, 99, 0,103,104,111,115,
-116, 95,116,121,112,101, 0,103,104,111,115,116, 95,115,116,101,112, 0,103,104,111,115,116, 95,102,108, 97,103, 0,112, 97,116,
-104, 95,116,121,112,101, 0,112, 97,116,104, 95,115,116,101,112, 0,112, 97,116,104, 95,118,105,101,119,102,108, 97,103, 0,112,
- 97,116,104, 95, 98, 97,107,101,102,108, 97,103, 0,112, 97,116,104, 95,115,102, 0,112, 97,116,104, 95,101,102, 0,112, 97,116,
-104, 95, 98, 99, 0,112, 97,116,104, 95, 97, 99, 0,105,107,102,108, 97,103, 0, 97,103,114,112, 95,105,110,100,101,120, 0, 99,
-111,110,115,116,102,108, 97,103, 0,115,101,108,101, 99,116,102,108, 97,103, 0,112, 97,100, 48, 91, 54, 93, 0, 42, 98,111,110,
-101, 0, 42, 99,104,105,108,100, 0,105,107,116,114,101,101, 0,115,105,107,116,114,101,101, 0, 42, 99,117,115,116,111,109, 0,
- 42, 99,117,115,116,111,109, 95,116,120, 0,101,117,108, 91, 51, 93, 0, 99,104, 97,110, 95,109, 97,116, 91, 52, 93, 91, 52, 93,
- 0,112,111,115,101, 95,109, 97,116, 91, 52, 93, 91, 52, 93, 0,112,111,115,101, 95,104,101, 97,100, 91, 51, 93, 0,112,111,115,
-101, 95,116, 97,105,108, 91, 51, 93, 0,108,105,109,105,116,109,105,110, 91, 51, 93, 0,108,105,109,105,116,109, 97,120, 91, 51,
- 93, 0,115,116,105,102,102,110,101,115,115, 91, 51, 93, 0,105,107,115,116,114,101,116, 99,104, 0,105,107,114,111,116,119,101,
-105,103,104,116, 0,105,107,108,105,110,119,101,105,103,104,116, 0, 42,116,101,109,112, 0, 99,104, 97,110, 98, 97,115,101, 0,
- 42, 99,104, 97,110,104, 97,115,104, 0,112,114,111,120,121, 95,108, 97,121,101,114, 0,115,116,114,105,100,101, 95,111,102,102,
-115,101,116, 91, 51, 93, 0, 99,121, 99,108,105, 99, 95,111,102,102,115,101,116, 91, 51, 93, 0, 97,103,114,111,117,112,115, 0,
- 97, 99,116,105,118,101, 95,103,114,111,117,112, 0,105,107,115,111,108,118,101,114, 0, 42,105,107,100, 97,116, 97, 0, 42,105,
-107,112, 97,114, 97,109, 0,112,114,111,120,121, 95, 97, 99,116, 95, 98,111,110,101, 91, 54, 52, 93, 0,110,117,109,105,116,101,
-114, 0,110,117,109,115,116,101,112, 0,109,105,110,115,116,101,112, 0,109, 97,120,115,116,101,112, 0,115,111,108,118,101,114,
- 0,102,101,101,100, 98, 97, 99,107, 0,109, 97,120,118,101,108, 0,100, 97,109,112,109, 97,120, 0,100, 97,109,112,101,112,115,
- 0, 99,104, 97,110,110,101,108,115, 0, 99,117,115,116,111,109, 67,111,108, 0, 99,115, 0, 99,117,114,118,101,115, 0,103,114,
-111,117,112,115, 0, 97, 99,116,105,118,101, 95,109, 97,114,107,101,114, 0,105,100,114,111,111,116, 0, 42,115,111,117,114, 99,
-101, 0, 42,102,105,108,116,101,114, 95,103,114,112, 0,115,101, 97,114, 99,104,115,116,114, 91, 54, 52, 93, 0,102,105,108,116,
-101,114,102,108, 97,103, 0,114,101,110, 97,109,101, 73,110,100,101,120, 0, 97,100,115, 0,116,105,109,101,115,108,105,100,101,
- 0, 42,103,114,112, 0,110, 97,109,101, 91, 51, 48, 93, 0,111,119,110,115,112, 97, 99,101, 0,116, 97,114,115,112, 97, 99,101,
- 0,101,110,102,111,114, 99,101, 0,104,101, 97,100,116, 97,105,108, 0,108,105,110, 95,101,114,114,111,114, 0,114,111,116, 95,
-101,114,114,111,114, 0, 42,116, 97,114, 0,109, 97,116,114,105,120, 91, 52, 93, 91, 52, 93, 0,115,112, 97, 99,101, 0,114,111,
-116, 79,114,100,101,114, 0,116, 97,114,110,117,109, 0,116, 97,114,103,101,116,115, 0,105,116,101,114, 97,116,105,111,110,115,
- 0,114,111,111,116, 98,111,110,101, 0,109, 97,120, 95,114,111,111,116, 98,111,110,101, 0, 42,112,111,108,101,116, 97,114, 0,
-112,111,108,101,115,117, 98,116, 97,114,103,101,116, 91, 54, 52, 93, 0,112,111,108,101, 97,110,103,108,101, 0,111,114,105,101,
-110,116,119,101,105,103,104,116, 0,103,114, 97, 98,116, 97,114,103,101,116, 91, 51, 93, 0,110,117,109,112,111,105,110,116,115,
- 0, 99,104, 97,105,110,108,101,110, 0,120,122, 83, 99, 97,108,101, 77,111,100,101, 0,114,101,115,101,114,118,101,100, 49, 0,
-114,101,115,101,114,118,101,100, 50, 0,109,105,110,109, 97,120,102,108, 97,103, 0,115,116,117, 99,107, 0, 99, 97, 99,104,101,
- 91, 51, 93, 0,108,111, 99,107,102,108, 97,103, 0,102,111,108,108,111,119,102,108, 97,103, 0,118,111,108,109,111,100,101, 0,
-112,108, 97,110,101, 0,111,114,103,108,101,110,103,116,104, 0, 98,117,108,103,101, 0,112,105,118, 88, 0,112,105,118, 89, 0,
-112,105,118, 90, 0, 97,120, 88, 0, 97,120, 89, 0, 97,120, 90, 0,109,105,110, 76,105,109,105,116, 91, 54, 93, 0,109, 97,120,
- 76,105,109,105,116, 91, 54, 93, 0,101,120,116,114, 97, 70,122, 0,105,110,118,109, 97,116, 91, 52, 93, 91, 52, 93, 0,102,114,
-111,109, 0,116,111, 0,109, 97,112, 91, 51, 93, 0,101,120,112,111, 0,102,114,111,109, 95,109,105,110, 91, 51, 93, 0,102,114,
-111,109, 95,109, 97,120, 91, 51, 93, 0,116,111, 95,109,105,110, 91, 51, 93, 0,116,111, 95,109, 97,120, 91, 51, 93, 0,114,111,
-116, 65,120,105,115, 0,122,109,105,110, 0,122,109, 97,120, 0,112, 97,100, 91, 57, 93, 0,116,114, 97, 99,107, 91, 54, 52, 93,
- 0,111, 98,106,101, 99,116, 91, 54, 52, 93, 0, 42,100,101,112,116,104, 95,111, 98, 0, 99,104, 97,110,110,101,108, 91, 51, 50,
- 93, 0,110,111, 95,114,111,116, 95, 97,120,105,115, 0,115,116,114,105,100,101, 95, 97,120,105,115, 0, 99,117,114,109,111,100,
- 0, 97, 99,116,115,116, 97,114,116, 0, 97, 99,116,101,110,100, 0, 97, 99,116,111,102,102,115, 0,115,116,114,105,100,101,108,
-101,110, 0, 98,108,101,110,100,111,117,116, 0,115,116,114,105,100,101, 99,104, 97,110,110,101,108, 91, 51, 50, 93, 0,111,102,
-102,115, 95, 98,111,110,101, 91, 51, 50, 93, 0,104, 97,115,105,110,112,117,116, 0,104, 97,115,111,117,116,112,117,116, 0,100,
- 97,116, 97,116,121,112,101, 0,115,111, 99,107,101,116,116,121,112,101, 0,105,115, 95, 99,111,112,121, 0,101,120,116,101,114,
-110, 97,108, 0, 42,110,101,119, 95,115,111, 99,107, 0, 42,115,116,111,114, 97,103,101, 0,108,105,109,105,116, 0,115,116,114,
-117, 99,116, 95,116,121,112,101, 0,108,111, 99,120, 0,108,111, 99,121, 0, 42,100,101,102, 97,117,108,116, 95,118, 97,108,117,
-101, 0,115,116, 97, 99,107, 95,105,110,100,101,120, 0,115,116, 97, 99,107, 95,116,121,112,101, 0,111,119,110, 95,105,110,100,
-101,120, 0,116,111, 95,105,110,100,101,120, 0, 42,103,114,111,117,112,115,111, 99,107, 0, 42,108,105,110,107, 0,110,115, 0,
- 42,114,101, 99,116, 0,120,115,105,122,101, 0,121,115,105,122,101, 0, 42,110,101,119, 95,110,111,100,101, 0,108, 97,115,116,
-121, 0,111,117,116,112,117,116,115, 0,109,105,110,105,119,105,100,116,104, 0,117,112,100, 97,116,101, 0,108, 97, 98,101,108,
- 91, 54, 52, 93, 0, 99,117,115,116,111,109, 49, 0, 99,117,115,116,111,109, 50, 0, 99,117,115,116,111,109, 51, 0, 99,117,115,
-116,111,109, 52, 0,110,101,101,100, 95,101,120,101, 99, 0,101,120,101, 99, 0, 42,116,104,114,101, 97,100,100, 97,116, 97, 0,
-116,111,116,114, 0, 98,117,116,114, 0,112,114,118,114, 0, 42, 98,108,111, 99,107, 0, 42,116,121,112,101,105,110,102,111, 0,
- 42,102,114,111,109,110,111,100,101, 0, 42,116,111,110,111,100,101, 0, 42,102,114,111,109,115,111, 99,107, 0, 42,116,111,115,
-111, 99,107, 0,110,111,100,101,115, 0,108,105,110,107,115, 0,105,110,105,116, 0, 99,117,114, 95,105,110,100,101,120, 0,110,
-111,100,101,116,121,112,101, 0, 42,101,120,101, 99,100, 97,116, 97, 0, 40, 42,112,114,111,103,114,101,115,115, 41, 40, 41, 0,
- 40, 42,115,116, 97,116,115, 95,100,114, 97,119, 41, 40, 41, 0, 40, 42,116,101,115,116, 95, 98,114,101, 97,107, 41, 40, 41, 0,
- 42,116, 98,104, 0, 42,112,114,104, 0, 42,115,100,104, 0,118, 97,108,117,101, 91, 51, 93, 0,118, 97,108,117,101, 91, 52, 93,
- 0, 99,121, 99,108,105, 99, 0,109,111,118,105,101, 0,115, 97,109,112,108,101,115, 0,109, 97,120,115,112,101,101,100, 0,109,
-105,110,115,112,101,101,100, 0, 99,117,114,118,101,100, 0,112,101,114, 99,101,110,116,120, 0,112,101,114, 99,101,110,116,121,
- 0, 98,111,107,101,104, 0,103, 97,109,109, 97, 0,105,109, 97,103,101, 95,105,110, 95,119,105,100,116,104, 0,105,109, 97,103,
-101, 95,105,110, 95,104,101,105,103,104,116, 0, 99,101,110,116,101,114, 95,120, 0, 99,101,110,116,101,114, 95,121, 0,115,112,
-105,110, 0,119,114, 97,112, 0,115,105,103,109, 97, 95, 99,111,108,111,114, 0,115,105,103,109, 97, 95,115,112, 97, 99,101, 0,
-104,117,101, 0, 98, 97,115,101, 95,112, 97,116,104, 91, 49, 48, 50, 52, 93, 0,102,111,114,109, 97,116, 0, 97, 99,116,105,118,
-101, 95,105,110,112,117,116, 0,117,115,101, 95,114,101,110,100,101,114, 95,102,111,114,109, 97,116, 0,117,115,101, 95,110,111,
-100,101, 95,102,111,114,109, 97,116, 0,116, 49, 0,116, 50, 0,116, 51, 0,102,115,116,114,101,110,103,116,104, 0,102, 97,108,
-112,104, 97, 0,107,101,121, 91, 52, 93, 0, 97,108,103,111,114,105,116,104,109, 0, 99,104, 97,110,110,101,108, 0,120, 49, 0,
-120, 50, 0,121, 49, 0,121, 50, 0,102, 97, 99, 95,120, 49, 0,102, 97, 99, 95,120, 50, 0,102, 97, 99, 95,121, 49, 0,102, 97,
- 99, 95,121, 50, 0, 99,111,108,110, 97,109,101, 91, 54, 52, 93, 0, 98,107,116,121,112,101, 0,112, 97,100, 95, 99, 49, 0,103,
- 97,109, 99,111, 0,110,111, 95,122, 98,117,102, 0,102,115,116,111,112, 0,109, 97,120, 98,108,117,114, 0, 98,116,104,114,101,
-115,104, 0,114,111,116, 97,116,105,111,110, 0,112, 97,100, 95,102, 49, 0, 42,100,105, 99,116, 0, 42,110,111,100,101, 0, 99,
-111,108,109,111,100, 0,109,105,120, 0,102, 97,100,101, 0, 97,110,103,108,101, 95,111,102,115, 0,109, 0, 99, 0,106,105,116,
- 0,112,114,111,106, 0,102,105,116, 0,115,108,111,112,101, 91, 51, 93, 0,112,111,119,101,114, 91, 51, 93, 0,108,105,102,116,
- 95,108,103,103, 91, 51, 93, 0,103, 97,109,109, 97, 95,105,110,118, 91, 51, 93, 0,108,105,109, 99,104, 97,110, 0,117,110,115,
-112,105,108,108, 0,108,105,109,115, 99, 97,108,101, 0,117,115,112,105,108,108,114, 0,117,115,112,105,108,108,103, 0,117,115,
-112,105,108,108, 98, 0,116,101,120, 95,109, 97,112,112,105,110,103, 0, 99,111,108,111,114, 95,109, 97,112,112,105,110,103, 0,
-115,117,110, 95,100,105,114,101, 99,116,105,111,110, 91, 51, 93, 0,116,117,114, 98,105,100,105,116,121, 0, 99,111,108,111,114,
- 95,115,112, 97, 99,101, 0,112,114,111,106,101, 99,116,105,111,110, 0,103,114, 97,100,105,101,110,116, 95,116,121,112,101, 0,
- 99,111,108,111,114,105,110,103, 0,109,117,115,103,114, 97,118,101, 95,116,121,112,101, 0,119, 97,118,101, 95,116,121,112,101,
- 0,115,104,111,114,116,121, 0,109,105,110,116, 97, 98,108,101, 0,109, 97,120,116, 97, 98,108,101, 0,101,120,116, 95,105,110,
- 91, 50, 93, 0,101,120,116, 95,111,117,116, 91, 50, 93, 0, 42, 99,117,114,118,101, 0, 42,116, 97, 98,108,101, 0, 42,112,114,
-101,109,117,108,116, 97, 98,108,101, 0,112,114,101,115,101,116, 0, 99,104, 97,110,103,101,100, 95,116,105,109,101,115,116, 97,
-109,112, 0, 99,117,114,114, 0, 99,108,105,112,114, 0, 99,109, 91, 52, 93, 0, 98,108, 97, 99,107, 91, 51, 93, 0,119,104,105,
-116,101, 91, 51, 93, 0, 98,119,109,117,108, 91, 51, 93, 0,115, 97,109,112,108,101, 91, 51, 93, 0,120, 95,114,101,115,111,108,
-117,116,105,111,110, 0,100, 97,116, 97, 95,114, 91, 50, 53, 54, 93, 0,100, 97,116, 97, 95,103, 91, 50, 53, 54, 93, 0,100, 97,
-116, 97, 95, 98, 91, 50, 53, 54, 93, 0,100, 97,116, 97, 95,108,117,109, 97, 91, 50, 53, 54, 93, 0,115, 97,109,112,108,101, 95,
-102,117,108,108, 0,115, 97,109,112,108,101, 95,108,105,110,101,115, 0, 97, 99, 99,117,114, 97, 99,121, 0,119, 97,118,101,102,
-114,109, 95,109,111,100,101, 0,119, 97,118,101,102,114,109, 95, 97,108,112,104, 97, 0,119, 97,118,101,102,114,109, 95,121,102,
- 97, 99, 0,119, 97,118,101,102,114,109, 95,104,101,105,103,104,116, 0,118,101, 99,115, 99,111,112,101, 95, 97,108,112,104, 97,
- 0,118,101, 99,115, 99,111,112,101, 95,104,101,105,103,104,116, 0,109,105,110,109, 97,120, 91, 51, 93, 91, 50, 93, 0,104,105,
-115,116, 0, 42,119, 97,118,101,102,111,114,109, 95, 49, 0, 42,119, 97,118,101,102,111,114,109, 95, 50, 0, 42,119, 97,118,101,
-102,111,114,109, 95, 51, 0, 42,118,101, 99,115, 99,111,112,101, 0,119, 97,118,101,102,111,114,109, 95,116,111,116, 0,111,102,
-102,115,101,116, 91, 50, 93, 0, 99,108,111,110,101, 0,109,116,101,120, 0, 42,105, 99,111,110, 95,105,109, 98,117,102, 0,105,
- 99,111,110, 95,102,105,108,101,112, 97,116,104, 91, 49, 48, 50, 52, 93, 0,110,111,114,109, 97,108, 95,119,101,105,103,104,116,
- 0,111, 98, 95,109,111,100,101, 0,106,105,116,116,101,114, 0,115,109,111,111,116,104, 95,115,116,114,111,107,101, 95,114, 97,
-100,105,117,115, 0,115,109,111,111,116,104, 95,115,116,114,111,107,101, 95,102, 97, 99,116,111,114, 0,114, 97,116,101, 0,114,
-103, 98, 91, 51, 93, 0,115, 99,117,108,112,116, 95,112,108, 97,110,101, 0,112,108, 97,110,101, 95,111,102,102,115,101,116, 0,
-115, 99,117,108,112,116, 95,116,111,111,108, 0,118,101,114,116,101,120,112, 97,105,110,116, 95,116,111,111,108, 0,105,109, 97,
-103,101,112, 97,105,110,116, 95,116,111,111,108, 0,112, 97,100, 51, 91, 53, 93, 0, 97,117,116,111,115,109,111,111,116,104, 95,
-102, 97, 99,116,111,114, 0, 99,114,101, 97,115,101, 95,112,105,110, 99,104, 95,102, 97, 99,116,111,114, 0,112,108, 97,110,101,
- 95,116,114,105,109, 0,116,101,120,116,117,114,101, 95,115, 97,109,112,108,101, 95, 98,105, 97,115, 0,116,101,120,116,117,114,
-101, 95,111,118,101,114,108, 97,121, 95, 97,108,112,104, 97, 0, 97,100,100, 95, 99,111,108, 91, 51, 93, 0,115,117, 98, 95, 99,
-111,108, 91, 51, 93, 0, 97, 99,116,105,118,101, 95,114,110,100, 0, 97, 99,116,105,118,101, 95, 99,108,111,110,101, 0, 97, 99,
-116,105,118,101, 95,109, 97,115,107, 0, 42,108, 97,121,101,114,115, 0,116,121,112,101,109, 97,112, 91, 51, 52, 93, 0,116,111,
-116,108, 97,121,101,114, 0,109, 97,120,108, 97,121,101,114, 0,116,111,116,115,105,122,101, 0, 42,112,111,111,108, 0, 42,101,
-120,116,101,114,110, 97,108, 0,114,111,116, 91, 52, 93, 0, 97,118,101, 91, 51, 93, 0, 42,103,114,111,117,110,100, 0,119, 97,
-110,100,101,114, 91, 51, 93, 0,114,101,115,116, 95,108,101,110,103,116,104, 0,112, 97,114,116,105, 99,108,101, 95,105,110,100,
-101,120, 91, 50, 93, 0,100,101,108,101,116,101, 95,102,108, 97,103, 0,110,117,109, 0,112, 97,114,101,110,116, 0,112, 97, 91,
- 52, 93, 0,119, 91, 52, 93, 0,102,117,118, 91, 52, 93, 0,102,111,102,102,115,101,116, 0,112,114,101,118, 95,115,116, 97,116,
-101, 0, 42,104, 97,105,114, 0, 42, 98,111,105,100, 0,100,105,101,116,105,109,101, 0,110,117,109, 95,100,109, 99, 97, 99,104,
-101, 0,104, 97,105,114, 95,105,110,100,101,120, 0, 97,108,105,118,101, 0,115,112,114,105,110,103, 95,107, 0,112,108, 97,115,
-116,105, 99,105,116,121, 95, 99,111,110,115,116, 97,110,116, 0,121,105,101,108,100, 95,114, 97,116,105,111, 0,112,108, 97,115,
-116,105, 99,105,116,121, 95, 98, 97,108, 97,110, 99,101, 0,121,105,101,108,100, 95, 98, 97,108, 97,110, 99,101, 0,118,105,115,
- 99,111,115,105,116,121, 95,111,109,101,103, 97, 0,118,105,115, 99,111,115,105,116,121, 95, 98,101,116, 97, 0,115,116,105,102,
-102,110,101,115,115, 95,107, 0,115,116,105,102,102,110,101,115,115, 95,107,110,101, 97,114, 0,114,101,115,116, 95,100,101,110,
-115,105,116,121, 0, 98,117,111,121, 97,110, 99,121, 0,115,112,114,105,110,103, 95,102,114, 97,109,101,115, 0, 42, 98,111,105,
-100,115, 0, 42,102,108,117,105,100, 0,100,105,115,116,114, 0,112,104,121,115,116,121,112,101, 0, 97,118,101,109,111,100,101,
- 0,114,101, 97, 99,116,101,118,101,110,116, 0,100,114, 97,119, 0,100,114, 97,119, 95, 97,115, 0,100,114, 97,119, 95,115,105,
-122,101, 0, 99,104,105,108,100,116,121,112,101, 0,114,101,110, 95, 97,115, 0,115,117, 98,102,114, 97,109,101,115, 0,100,114,
- 97,119, 95, 99,111,108, 0,114,101,110, 95,115,116,101,112, 0,104, 97,105,114, 95,115,116,101,112, 0,107,101,121,115, 95,115,
-116,101,112, 0, 97,100, 97,112,116, 95, 97,110,103,108,101, 0, 97,100, 97,112,116, 95,112,105,120, 0,114,111,116,102,114,111,
-109, 0,105,110,116,101,103,114, 97,116,111,114, 0, 98, 98, 95, 97,108,105,103,110, 0, 98, 98, 95,117,118, 95,115,112,108,105,
-116, 0, 98, 98, 95, 97,110,105,109, 0, 98, 98, 95,115,112,108,105,116, 95,111,102,102,115,101,116, 0, 98, 98, 95,116,105,108,
-116, 0, 98, 98, 95,114, 97,110,100, 95,116,105,108,116, 0, 98, 98, 95,111,102,102,115,101,116, 91, 50, 93, 0, 98, 98, 95,115,
-105,122,101, 91, 50, 93, 0, 98, 98, 95,118,101,108, 95,104,101, 97,100, 0, 98, 98, 95,118,101,108, 95,116, 97,105,108, 0, 99,
-111,108,111,114, 95,118,101, 99, 95,109, 97,120, 0,115,105,109,112,108,105,102,121, 95,114,101,102,115,105,122,101, 0,115,105,
-109,112,108,105,102,121, 95,114, 97,116,101, 0,115,105,109,112,108,105,102,121, 95,116,114, 97,110,115,105,116,105,111,110, 0,
-115,105,109,112,108,105,102,121, 95,118,105,101,119,112,111,114,116, 0,116,105,109,101,116,119,101, 97,107, 0, 99,111,117,114,
- 97,110,116, 95,116, 97,114,103,101,116, 0,106,105,116,102, 97, 99, 0,101,102,102, 95,104, 97,105,114, 0,103,114,105,100, 95,
-114, 97,110,100, 0,112,115, 95,111,102,102,115,101,116, 91, 49, 93, 0,103,114,105,100, 95,114,101,115, 0,101,102,102,101, 99,
-116,111,114, 95, 97,109,111,117,110,116, 0,116,105,109,101, 95,102,108, 97,103, 0,116,105,109,101, 95,112, 97,100, 91, 51, 93,
- 0,112, 97,114,116,102, 97, 99, 0,116, 97,110,102, 97, 99, 0,116, 97,110,112,104, 97,115,101, 0,114,101, 97, 99,116,102, 97,
- 99, 0,111, 98, 95,118,101,108, 91, 51, 93, 0, 97,118,101,102, 97, 99, 0,112,104, 97,115,101,102, 97, 99, 0,114, 97,110,100,
-114,111,116,102, 97, 99, 0,114, 97,110,100,112,104, 97,115,101,102, 97, 99, 0,114, 97,110,100,115,105,122,101, 0, 97, 99, 99,
- 91, 51, 93, 0,100,114, 97,103,102, 97, 99, 0, 98,114,111,119,110,102, 97, 99, 0,114, 97,110,100,108,101,110,103,116,104, 0,
- 99,104,105,108,100, 95,110, 98,114, 0,114,101,110, 95, 99,104,105,108,100, 95,110, 98,114, 0,112, 97,114,101,110,116,115, 0,
- 99,104,105,108,100,115,105,122,101, 0, 99,104,105,108,100,114, 97,110,100,115,105,122,101, 0, 99,104,105,108,100,114, 97,100,
- 0, 99,104,105,108,100,102,108, 97,116, 0, 99,108,117,109,112,112,111,119, 0,107,105,110,107, 95,102,108, 97,116, 0,107,105,
-110,107, 95, 97,109,112, 95, 99,108,117,109,112, 0,114,111,117,103,104, 49, 0,114,111,117,103,104, 49, 95,115,105,122,101, 0,
-114,111,117,103,104, 50, 0,114,111,117,103,104, 50, 95,115,105,122,101, 0,114,111,117,103,104, 50, 95,116,104,114,101,115, 0,
-114,111,117,103,104, 95,101,110,100, 0,114,111,117,103,104, 95,101,110,100, 95,115,104, 97,112,101, 0, 99,108,101,110,103,116,
-104, 0, 99,108,101,110,103,116,104, 95,116,104,114,101,115, 0,112, 97,114,116,105,110,103, 95,102, 97, 99, 0,112, 97,114,116,
-105,110,103, 95,109,105,110, 0,112, 97,114,116,105,110,103, 95,109, 97,120, 0, 98,114, 97,110, 99,104, 95,116,104,114,101,115,
- 0,100,114, 97,119, 95,108,105,110,101, 91, 50, 93, 0,112, 97,116,104, 95,115,116, 97,114,116, 0,112, 97,116,104, 95,101,110,
-100, 0,116,114, 97,105,108, 95, 99,111,117,110,116, 0,107,101,121,101,100, 95,108,111,111,112,115, 0,100,117,112,108,105,119,
-101,105,103,104,116,115, 0, 42,101,102,102, 95,103,114,111,117,112, 0, 42,100,117,112, 95,111, 98, 0, 42, 98, 98, 95,111, 98,
- 0, 42,112,100, 50, 0, 42,112, 97,114,116, 0, 42,112, 97,114,116,105, 99,108,101,115, 0, 42, 42,112, 97,116,104, 99, 97, 99,
-104,101, 0, 42, 42, 99,104,105,108,100, 99, 97, 99,104,101, 0,112, 97,116,104, 99, 97, 99,104,101, 98,117,102,115, 0, 99,104,
-105,108,100, 99, 97, 99,104,101, 98,117,102,115, 0, 42, 99,108,109,100, 0, 42,104, 97,105,114, 95,105,110, 95,100,109, 0, 42,
-104, 97,105,114, 95,111,117,116, 95,100,109, 0, 42,116, 97,114,103,101,116, 95,111, 98, 0, 42,108, 97,116,116,105, 99,101, 0,
-116,114,101,101, 95,102,114, 97,109,101, 0, 98,118,104,116,114,101,101, 95,102,114, 97,109,101, 0, 99,104,105,108,100, 95,115,
-101,101,100, 0,116,111,116,117,110,101,120,105,115,116, 0,116,111,116, 99,104,105,108,100, 0,116,111,116, 99, 97, 99,104,101,
-100, 0,116,111,116, 99,104,105,108,100, 99, 97, 99,104,101, 0,116, 97,114,103,101,116, 95,112,115,121,115, 0,116,111,116,107,
-101,121,101,100, 0, 98, 97,107,101,115,112, 97, 99,101, 0, 98, 98, 95,117,118,110, 97,109,101, 91, 51, 93, 91, 54, 52, 93, 0,
-118,103,114,111,117,112, 91, 49, 50, 93, 0,118,103, 95,110,101,103, 0,114,116, 51, 0, 42,114,101,110,100,101,114,100, 97,116,
- 97, 0, 42,101,102,102,101, 99,116,111,114,115, 0, 42,102,108,117,105,100, 95,115,112,114,105,110,103,115, 0,116,111,116, 95,
-102,108,117,105,100,115,112,114,105,110,103,115, 0, 97,108,108,111, 99, 95,102,108,117,105,100,115,112,114,105,110,103,115, 0,
- 42,116,114,101,101, 0, 42,112,100,100, 0, 42,102,114, 97,110,100, 0,100,116, 95,102,114, 97, 99, 0, 95,112, 97,100, 0, 67,
-100,105,115, 0, 67,118,105, 0,115,116,114,117, 99,116,117,114, 97,108, 0, 98,101,110,100,105,110,103, 0,109, 97,120, 95, 98,
-101,110,100, 0,109, 97,120, 95,115,116,114,117, 99,116, 0,109, 97,120, 95,115,104,101, 97,114, 0, 97,118,103, 95,115,112,114,
-105,110,103, 95,108,101,110, 0,116,105,109,101,115, 99, 97,108,101, 0,101,102,102, 95,102,111,114, 99,101, 95,115, 99, 97,108,
-101, 0,101,102,102, 95,119,105,110,100, 95,115, 99, 97,108,101, 0,115,105,109, 95,116,105,109,101, 95,111,108,100, 0,118,101,
-108,111, 99,105,116,121, 95,115,109,111,111,116,104, 0, 99,111,108,108,105,100,101,114, 95,102,114,105, 99,116,105,111,110, 0,
-118,101,108, 95,100, 97,109,112,105,110,103, 0,115,116,101,112,115, 80,101,114, 70,114, 97,109,101, 0,112,114,101,114,111,108,
-108, 0,109, 97,120,115,112,114,105,110,103,108,101,110, 0,115,111,108,118,101,114, 95,116,121,112,101, 0,118,103,114,111,117,
-112, 95, 98,101,110,100, 0,118,103,114,111,117,112, 95,109, 97,115,115, 0,118,103,114,111,117,112, 95,115,116,114,117, 99,116,
- 0,115,104, 97,112,101,107,101,121, 95,114,101,115,116, 0,112,114,101,115,101,116,115, 0,114,101,115,101,116, 0, 42, 99,111,
-108,108,105,115,105,111,110, 95,108,105,115,116, 0,101,112,115,105,108,111,110, 0,115,101,108,102, 95,102,114,105, 99,116,105,
-111,110, 0,115,101,108,102,101,112,115,105,108,111,110, 0,114,101,112,101,108, 95,102,111,114, 99,101, 0,100,105,115,116, 97,
-110, 99,101, 95,114,101,112,101,108, 0,115,101,108,102, 95,108,111,111,112, 95, 99,111,117,110,116, 0,108,111,111,112, 95, 99,
-111,117,110,116, 0,112,114,101,115,115,117,114,101, 0,116,104,105, 99,107,110,101,115,115, 0,115,116,114,111,107,101,115, 0,
-102,114, 97,109,101,110,117,109, 0, 42, 97, 99,116,102,114, 97,109,101, 0,103,115,116,101,112, 0,105,110,102,111, 91, 49, 50,
- 56, 93, 0,115, 98,117,102,102,101,114, 95,115,105,122,101, 0,115, 98,117,102,102,101,114, 95,115,102,108, 97,103, 0, 42,115,
- 98,117,102,102,101,114, 0,108,105,115,116, 0,112,114,105,110,116,108,101,118,101,108, 0,115,116,111,114,101,108,101,118,101,
-108, 0, 42,114,101,112,111,114,116,116,105,109,101,114, 0, 42,119,105,110,100,114, 97,119, 97, 98,108,101, 0, 42,119,105,110,
- 97, 99,116,105,118,101, 0,119,105,110,100,111,119,115, 0,105,110,105,116,105, 97,108,105,122,101,100, 0,102,105,108,101, 95,
-115, 97,118,101,100, 0,111,112, 95,117,110,100,111, 95,100,101,112,116,104, 0,111,112,101,114, 97,116,111,114,115, 0,113,117,
-101,117,101, 0,114,101,112,111,114,116,115, 0,106,111, 98,115, 0,112, 97,105,110,116, 99,117,114,115,111,114,115, 0,100,114,
- 97,103,115, 0,107,101,121, 99,111,110,102,105,103,115, 0, 42,100,101,102, 97,117,108,116, 99,111,110,102, 0, 42, 97,100,100,
-111,110, 99,111,110,102, 0, 42,117,115,101,114, 99,111,110,102, 0,116,105,109,101,114,115, 0, 42, 97,117,116,111,115, 97,118,
-101,116,105,109,101,114, 0, 42,103,104,111,115,116,119,105,110, 0,103,114, 97, 98, 99,117,114,115,111,114, 0, 42,115, 99,114,
-101,101,110, 0, 42,110,101,119,115, 99,114,101,101,110, 0,115, 99,114,101,101,110,110, 97,109,101, 91, 54, 52, 93, 0,112,111,
-115,120, 0,112,111,115,121, 0,119,105,110,100,111,119,115,116, 97,116,101, 0,109,111,110,105,116,111,114, 0,108, 97,115,116,
- 99,117,114,115,111,114, 0,109,111,100, 97,108, 99,117,114,115,111,114, 0, 97,100,100,109,111,117,115,101,109,111,118,101, 0,
- 42,101,118,101,110,116,115,116, 97,116,101, 0, 42, 99,117,114,115,119,105,110, 0, 42,116,119,101, 97,107, 0,100,114, 97,119,
-109,101,116,104,111,100, 0,100,114, 97,119,102, 97,105,108, 0, 42,100,114, 97,119,100, 97,116, 97, 0,109,111,100, 97,108,104,
- 97,110,100,108,101,114,115, 0,115,117, 98,119,105,110,100,111,119,115, 0,103,101,115,116,117,114,101, 0,105,100,110, 97,109,
-101, 91, 54, 52, 93, 0,112,114,111,112,118, 97,108,117,101, 0,115,104,105,102,116, 0, 99,116,114,108, 0, 97,108,116, 0,111,
-115,107,101,121, 0,107,101,121,109,111,100,105,102,105,101,114, 0,109, 97,112,116,121,112,101, 0, 42,112,116,114, 0, 42,114,
-101,109,111,118,101, 95,105,116,101,109, 0, 42, 97,100,100, 95,105,116,101,109, 0,105,116,101,109,115, 0,100,105,102,102, 95,
-105,116,101,109,115, 0,115,112, 97, 99,101,105,100, 0,114,101,103,105,111,110,105,100, 0,107,109,105, 95,105,100, 0, 40, 42,
-112,111,108,108, 41, 40, 41, 0, 42,109,111,100, 97,108, 95,105,116,101,109,115, 0, 98, 97,115,101,110, 97,109,101, 91, 54, 52,
- 93, 0, 97, 99,116,107,101,121,109, 97,112, 0, 42, 99,117,115,116,111,109,100, 97,116, 97, 0, 42,112,121, 95,105,110,115,116,
- 97,110, 99,101, 0, 42,114,101,112,111,114,116,115, 0,109, 97, 99,114,111, 0, 42,111,112,109, 0, 42,101,100, 97,116, 97, 0,
- 42, 99,111,101,102,102,105, 99,105,101,110,116,115, 0, 97,114,114, 97,121,115,105,122,101, 0,112,111,108,121, 95,111,114,100,
-101,114, 0, 97,109,112,108,105,116,117,100,101, 0,112,104, 97,115,101, 95,109,117,108,116,105,112,108,105,101,114, 0,112,104,
- 97,115,101, 95,111,102,102,115,101,116, 0,118, 97,108,117,101, 95,111,102,102,115,101,116, 0,109,105,100,118, 97,108, 0, 98,
-101,102,111,114,101, 95,109,111,100,101, 0, 97,102,116,101,114, 95,109,111,100,101, 0, 98,101,102,111,114,101, 95, 99,121, 99,
-108,101,115, 0, 97,102,116,101,114, 95, 99,121, 99,108,101,115, 0,114,101, 99,116, 0,112,104, 97,115,101, 0,109,111,100,105,
-102,105, 99, 97,116,105,111,110, 0,115,116,101,112, 95,115,105,122,101, 0, 42,114,110, 97, 95,112, 97,116,104, 0,112, 99,104,
- 97,110, 95,110, 97,109,101, 91, 51, 50, 93, 0,116,114, 97,110,115, 67,104, 97,110, 0,105,100,116,121,112,101, 0,116, 97,114,
-103,101,116,115, 91, 56, 93, 0,110,117,109, 95,116, 97,114,103,101,116,115, 0,118, 97,114,105, 97, 98,108,101,115, 0,101,120,
-112,114,101,115,115,105,111,110, 91, 50, 53, 54, 93, 0, 42,101,120,112,114, 95, 99,111,109,112, 0,118,101, 99, 91, 50, 93, 0,
- 42,102,112,116, 0, 97,114,114, 97,121, 95,105,110,100,101,120, 0, 99,111,108,111,114, 95,109,111,100,101, 0, 99,111,108,111,
-114, 91, 51, 93, 0,102,114,111,109, 91, 49, 50, 56, 93, 0,116,111, 91, 49, 50, 56, 93, 0,109, 97,112,112,105,110,103,115, 0,
-115,116,114,105,112,115, 0, 42,114,101,109, 97,112, 0,102, 99,117,114,118,101,115, 0,115,116,114,105,112, 95,116,105,109,101,
- 0, 98,108,101,110,100,109,111,100,101, 0,101,120,116,101,110,100,109,111,100,101, 0, 42,115,112,101, 97,107,101,114, 95,104,
- 97,110,100,108,101, 0,103,114,111,117,112, 91, 54, 52, 93, 0,103,114,111,117,112,109,111,100,101, 0,107,101,121,105,110,103,
-102,108, 97,103, 0,112, 97,116,104,115, 0,100,101,115, 99,114,105,112,116,105,111,110, 91, 50, 52, 48, 93, 0,116,121,112,101,
-105,110,102,111, 91, 54, 52, 93, 0, 97, 99,116,105,118,101, 95,112, 97,116,104, 0, 42,116,109,112, 97, 99,116, 0,110,108, 97,
- 95,116,114, 97, 99,107,115, 0, 42, 97, 99,116,115,116,114,105,112, 0,100,114,105,118,101,114,115, 0,111,118,101,114,114,105,
-100,101,115, 0, 97, 99,116, 95, 98,108,101,110,100,109,111,100,101, 0, 97, 99,116, 95,101,120,116,101,110,100,109,111,100,101,
- 0, 97, 99,116, 95,105,110,102,108,117,101,110, 99,101, 0,114,117,108,101, 0,111,112,116,105,111,110,115, 0,102,101, 97,114,
- 95,102, 97, 99,116,111,114, 0,115,105,103,110, 97,108, 95,105,100, 0,108,111,111,107, 95, 97,104,101, 97,100, 0,111,108,111,
- 99, 91, 51, 93, 0,113,117,101,117,101, 95,115,105,122,101, 0,119, 97,110,100,101,114, 0,102,108,101,101, 95,100,105,115,116,
- 97,110, 99,101, 0,104,101, 97,108,116,104, 0,115,116, 97,116,101, 95,105,100, 0,114,117,108,101,115, 0, 99,111,110,100,105,
-116,105,111,110,115, 0, 97, 99,116,105,111,110,115, 0,114,117,108,101,115,101,116, 95,116,121,112,101, 0,114,117,108,101, 95,
-102,117,122,122,105,110,101,115,115, 0,108, 97,115,116, 95,115,116, 97,116,101, 95,105,100, 0,108, 97,110,100,105,110,103, 95,
-115,109,111,111,116,104,110,101,115,115, 0, 98, 97,110,107,105,110,103, 0, 97,103,103,114,101,115,115,105,111,110, 0, 97,105,
-114, 95,109,105,110, 95,115,112,101,101,100, 0, 97,105,114, 95,109, 97,120, 95,115,112,101,101,100, 0, 97,105,114, 95,109, 97,
-120, 95, 97, 99, 99, 0, 97,105,114, 95,109, 97,120, 95, 97,118,101, 0, 97,105,114, 95,112,101,114,115,111,110, 97,108, 95,115,
-112, 97, 99,101, 0,108, 97,110,100, 95,106,117,109,112, 95,115,112,101,101,100, 0,108, 97,110,100, 95,109, 97,120, 95,115,112,
-101,101,100, 0,108, 97,110,100, 95,109, 97,120, 95, 97, 99, 99, 0,108, 97,110,100, 95,109, 97,120, 95, 97,118,101, 0,108, 97,
-110,100, 95,112,101,114,115,111,110, 97,108, 95,115,112, 97, 99,101, 0,108, 97,110,100, 95,115,116,105, 99,107, 95,102,111,114,
- 99,101, 0,115,116, 97,116,101,115, 0, 42,115,109,100, 0, 42,102,108,117,105,100, 95,103,114,111,117,112, 0, 42, 99,111,108,
-108, 95,103,114,111,117,112, 0, 42,119,116, 0, 42,116,101,120, 95,119,116, 0, 42,116,101,120, 95,115,104, 97,100,111,119, 0,
- 42,115,104, 97,100,111,119, 0,112, 48, 91, 51, 93, 0,112, 49, 91, 51, 93, 0,100,120, 0,111,109,101,103, 97, 0,116,101,109,
-112, 65,109, 98, 0, 98,101,116, 97, 0,114,101,115, 91, 51, 93, 0, 97,109,112,108,105,102,121, 0,109, 97,120,114,101,115, 0,
-118,105,101,119,115,101,116,116,105,110,103,115, 0,110,111,105,115,101, 0,100,105,115,115, 95,112,101,114, 99,101,110,116, 0,
-100,105,115,115, 95,115,112,101,101,100, 0,114,101,115, 95,119,116, 91, 51, 93, 0,100,120, 95,119,116, 0,118, 51,100,110,117,
-109, 0, 99, 97, 99,104,101, 95, 99,111,109,112, 0, 99, 97, 99,104,101, 95,104,105,103,104, 95, 99,111,109,112, 0, 42,112,111,
-105,110,116, 95, 99, 97, 99,104,101, 91, 50, 93, 0,112,116, 99, 97, 99,104,101,115, 91, 50, 93, 0, 98,111,114,100,101,114, 95,
- 99,111,108,108,105,115,105,111,110,115, 0,116,105,109,101, 95,115, 99, 97,108,101, 0,118,111,114,116,105, 99,105,116,121, 0,
-118,101,108,111, 99,105,116,121, 91, 50, 93, 0,118,101,108, 95,109,117,108,116,105, 0,118,103,114,112, 95,104,101, 97,116, 95,
-115, 99, 97,108,101, 91, 50, 93, 0,118,103,114,111,117,112, 95,102,108,111,119, 0,118,103,114,111,117,112, 95,100,101,110,115,
-105,116,121, 0,118,103,114,111,117,112, 95,104,101, 97,116, 0, 42,112,111,105,110,116,115, 95,111,108,100, 0, 42,118,101,108,
- 0,109, 97,116, 95,111,108,100, 91, 52, 93, 91, 52, 93, 0,118,111,108,117,109,101, 95,109, 97,120, 0,118,111,108,117,109,101,
- 95,109,105,110, 0,100,105,115,116, 97,110, 99,101, 95,109, 97,120, 0,100,105,115,116, 97,110, 99,101, 95,114,101,102,101,114,
-101,110, 99,101, 0, 99,111,110,101, 95, 97,110,103,108,101, 95,111,117,116,101,114, 0, 99,111,110,101, 95, 97,110,103,108,101,
- 95,105,110,110,101,114, 0, 99,111,110,101, 95,118,111,108,117,109,101, 95,111,117,116,101,114, 0,114,101,110,100,101,114, 95,
-102,108, 97,103, 0, 98,117,105,108,100, 95,115,105,122,101, 95,102,108, 97,103, 0, 98,117,105,108,100, 95,116, 99, 95,102,108,
- 97,103, 0,108, 97,115,116,115,105,122,101, 91, 50, 93, 0,116,114, 97, 99,107,105,110,103, 0, 42,116,114, 97, 99,107,105,110,
-103, 95, 99,111,110,116,101,120,116, 0,112,114,111,120,121, 0,116,114, 97, 99,107, 95,112,114,101,118,105,101,119, 95,104,101,
-105,103,104,116, 0, 42,116,114, 97, 99,107, 95,112,114,101,118,105,101,119, 0,116,114, 97, 99,107, 95,112,111,115, 91, 50, 93,
- 0,116,114, 97, 99,107, 95,100,105,115, 97, 98,108,101,100, 0, 42,109, 97,114,107,101,114, 0,115,108,105,100,101, 95,115, 99,
- 97,108,101, 91, 50, 93, 0,101,114,114,111,114, 0, 42,105,110,116,114,105,110,115,105, 99,115, 0,115,101,110,115,111,114, 95,
-119,105,100,116,104, 0,112,105,120,101,108, 95, 97,115,112,101, 99,116, 0,102,111, 99, 97,108, 0,117,110,105,116,115, 0,112,
-114,105,110, 99,105,112, 97,108, 91, 50, 93, 0,107, 49, 0,107, 50, 0,107, 51, 0,112,111,115, 91, 50, 93, 0,112, 97,116, 95,
-109,105,110, 91, 50, 93, 0,112, 97,116, 95,109, 97,120, 91, 50, 93, 0,115,101, 97,114, 99,104, 95,109,105,110, 91, 50, 93, 0,
-115,101, 97,114, 99,104, 95,109, 97,120, 91, 50, 93, 0,109, 97,114,107,101,114,115,110,114, 0,108, 97,115,116, 95,109, 97,114,
-107,101,114, 0, 42,109, 97,114,107,101,114,115, 0, 98,117,110,100,108,101, 95,112,111,115, 91, 51, 93, 0,112, 97,116, 95,102,
-108, 97,103, 0,115,101, 97,114, 99,104, 95,102,108, 97,103, 0,102,114, 97,109,101,115, 95,108,105,109,105,116, 0,112, 97,116,
-116,101,114,110, 95,109, 97,116, 99,104, 0,116,114, 97, 99,107,101,114, 0,112,121,114, 97,109,105,100, 95,108,101,118,101,108,
-115, 0,109,105,110,105,109,117,109, 95, 99,111,114,114,101,108, 97,116,105,111,110, 0,100,101,102, 97,117,108,116, 95,116,114,
- 97, 99,107,101,114, 0,100,101,102, 97,117,108,116, 95,112,121,114, 97,109,105,100, 95,108,101,118,101,108,115, 0,100,101,102,
- 97,117,108,116, 95,109,105,110,105,109,117,109, 95, 99,111,114,114,101,108, 97,116,105,111,110, 0,100,101,102, 97,117,108,116,
- 95,112, 97,116,116,101,114,110, 95,115,105,122,101, 0,100,101,102, 97,117,108,116, 95,115,101, 97,114, 99,104, 95,115,105,122,
-101, 0,100,101,102, 97,117,108,116, 95,102,114, 97,109,101,115, 95,108,105,109,105,116, 0,100,101,102, 97,117,108,116, 95,109,
- 97,114,103,105,110, 0,100,101,102, 97,117,108,116, 95,112, 97,116,116,101,114,110, 95,109, 97,116, 99,104, 0,100,101,102, 97,
-117,108,116, 95,102,108, 97,103, 0,112,111,100, 0,107,101,121,102,114, 97,109,101, 49, 0,107,101,121,102,114, 97,109,101, 50,
- 0,114,101,102,105,110,101, 95, 99, 97,109,101,114, 97, 95,105,110,116,114,105,110,115,105, 99,115, 0,112, 97,100, 50, 51, 0,
- 99,108,101, 97,110, 95,102,114, 97,109,101,115, 0, 99,108,101, 97,110, 95, 97, 99,116,105,111,110, 0, 99,108,101, 97,110, 95,
-101,114,114,111,114, 0,111, 98,106,101, 99,116, 95,100,105,115,116, 97,110, 99,101, 0,116,111,116, 95,116,114, 97, 99,107, 0,
- 97, 99,116, 95,116,114, 97, 99,107, 0,109, 97,120,115, 99, 97,108,101, 0, 42,114,111,116, 95,116,114, 97, 99,107, 0,108,111,
- 99,105,110,102, 0,115, 99, 97,108,101,105,110,102, 0,114,111,116,105,110,102, 0, 42,115, 99, 97,108,101,105, 98,117,102, 0,
-108, 97,115,116, 95, 99, 97,109,101,114, 97, 0, 99, 97,109,110,114, 0, 42, 99, 97,109,101,114, 97,115, 0,116,114, 97, 99,107,
-115, 0,114,101, 99,111,110,115,116,114,117, 99,116,105,111,110, 0,109,101,115,115, 97,103,101, 91, 50, 53, 54, 93, 0,115,101,
-116,116,105,110,103,115, 0, 99, 97,109,101,114, 97, 0,115,116, 97, 98,105,108,105,122, 97,116,105,111,110, 0, 42, 97, 99,116,
- 95,116,114, 97, 99,107, 0,111, 98,106,101, 99,116,115, 0,111, 98,106,101, 99,116,110,114, 0,116,111,116, 95,111, 98,106,101,
- 99,116, 0, 42, 98,114,117,115,104, 95,103,114,111,117,112, 0, 99,117,114,114,101,110,116, 95,102,114, 97,109,101, 0,100,105,
-115,112, 95,116,121,112,101, 0,105,109, 97,103,101, 95,102,105,108,101,102,111,114,109, 97,116, 0,101,102,102,101, 99,116, 95,
-117,105, 0,112,114,101,118,105,101,119, 95,105,100, 0,105,110,105,116, 95, 99,111,108,111,114, 95,116,121,112,101, 0,112, 97,
-100, 95,115, 0,105,109, 97,103,101, 95,114,101,115,111,108,117,116,105,111,110, 0,115,117, 98,115,116,101,112,115, 0,105,110,
-105,116, 95, 99,111,108,111,114, 91, 52, 93, 0, 42,105,110,105,116, 95,116,101,120,116,117,114,101, 0,105,110,105,116, 95,108,
- 97,121,101,114,110, 97,109,101, 91, 54, 52, 93, 0,100,114,121, 95,115,112,101,101,100, 0, 99,111,108,111,114, 95,100,114,121,
- 95,116,104,114,101,115,104,111,108,100, 0,100,101,112,116,104, 95, 99,108, 97,109,112, 0,100,105,115,112, 95,102, 97, 99,116,
-111,114, 0,115,112,114,101, 97,100, 95,115,112,101,101,100, 0, 99,111,108,111,114, 95,115,112,114,101, 97,100, 95,115,112,101,
-101,100, 0,115,104,114,105,110,107, 95,115,112,101,101,100, 0,100,114,105,112, 95,118,101,108, 0,100,114,105,112, 95, 97, 99,
- 99, 0,105,110,102,108,117,101,110, 99,101, 95,115, 99, 97,108,101, 0,114, 97,100,105,117,115, 95,115, 99, 97,108,101, 0,119,
- 97,118,101, 95,100, 97,109,112,105,110,103, 0,119, 97,118,101, 95,115,112,101,101,100, 0,119, 97,118,101, 95,116,105,109,101,
-115, 99, 97,108,101, 0,119, 97,118,101, 95,115,112,114,105,110,103, 0,105,109, 97,103,101, 95,111,117,116,112,117,116, 95,112,
- 97,116,104, 91, 49, 48, 50, 52, 93, 0,111,117,116,112,117,116, 95,110, 97,109,101, 91, 54, 52, 93, 0,111,117,116,112,117,116,
- 95,110, 97,109,101, 50, 91, 54, 52, 93, 0, 42,112,109,100, 0,115,117,114,102, 97, 99,101,115, 0, 97, 99,116,105,118,101, 95,
-115,117,114, 0,101,114,114,111,114, 91, 54, 52, 93, 0, 99,111,108,108,105,115,105,111,110, 0,119,101,116,110,101,115,115, 0,
-112, 97,114,116,105, 99,108,101, 95,114, 97,100,105,117,115, 0,112, 97,114,116,105, 99,108,101, 95,115,109,111,111,116,104, 0,
-112, 97,105,110,116, 95,100,105,115,116, 97,110, 99,101, 0, 42,112, 97,105,110,116, 95,114, 97,109,112, 0, 42,118,101,108, 95,
-114, 97,109,112, 0,112,114,111,120,105,109,105,116,121, 95,102, 97,108,108,111,102,102, 0,114, 97,121, 95,100,105,114, 0,119,
- 97,118,101, 95,102, 97, 99,116,111,114, 0,119, 97,118,101, 95, 99,108, 97,109,112, 0,109, 97,120, 95,118,101,108,111, 99,105,
-116,121, 0,115,109,117,100,103,101, 95,115,116,114,101,110,103,116,104, 0, 0, 84, 89, 80, 69, 16, 2, 0, 0, 99,104, 97,114,
- 0,117, 99,104, 97,114, 0,115,104,111,114,116, 0,117,115,104,111,114,116, 0,105,110,116, 0,108,111,110,103, 0,117,108,111,
-110,103, 0,102,108,111, 97,116, 0,100,111,117, 98,108,101, 0,105,110,116, 54, 52, 95,116, 0,117,105,110,116, 54, 52, 95,116,
- 0,118,111,105,100, 0, 76,105,110,107, 0, 76,105,110,107, 68, 97,116, 97, 0, 76,105,115,116, 66, 97,115,101, 0,118,101, 99,
- 50,115, 0,118,101, 99, 50,102, 0,118,101, 99, 51,102, 0,114, 99,116,105, 0,114, 99,116,102, 0, 73, 68, 80,114,111,112,101,
-114,116,121, 68, 97,116, 97, 0, 73, 68, 80,114,111,112,101,114,116,121, 0, 73, 68, 0, 76,105, 98,114, 97,114,121, 0, 70,105,
-108,101, 68, 97,116, 97, 0, 80,114,101,118,105,101,119, 73,109, 97,103,101, 0, 73,112,111, 68,114,105,118,101,114, 0, 79, 98,
-106,101, 99,116, 0, 73,112,111, 67,117,114,118,101, 0, 66, 80,111,105,110,116, 0, 66,101,122, 84,114,105,112,108,101, 0, 73,
-112,111, 0, 75,101,121, 66,108,111, 99,107, 0, 75,101,121, 0, 65,110,105,109, 68, 97,116, 97, 0, 84,101,120,116, 76,105,110,
-101, 0, 84,101,120,116, 77, 97,114,107,101,114, 0, 84,101,120,116, 0, 80, 97, 99,107,101,100, 70,105,108,101, 0, 67, 97,109,
-101,114, 97, 0, 73,109, 97,103,101, 85,115,101,114, 0, 83, 99,101,110,101, 0, 73,109, 97,103,101, 0, 71, 80, 85, 84,101,120,
-116,117,114,101, 0, 97,110,105,109, 0, 82,101,110,100,101,114, 82,101,115,117,108,116, 0, 77, 84,101,120, 0, 84,101,120, 0,
- 80,108,117,103,105,110, 84,101,120, 0, 67, 66, 68, 97,116, 97, 0, 67,111,108,111,114, 66, 97,110,100, 0, 69,110,118, 77, 97,
-112, 0, 73,109, 66,117,102, 0, 80,111,105,110,116, 68,101,110,115,105,116,121, 0, 67,117,114,118,101, 77, 97,112,112,105,110,
-103, 0, 86,111,120,101,108, 68, 97,116, 97, 0, 79, 99,101, 97,110, 84,101,120, 0, 98, 78,111,100,101, 84,114,101,101, 0, 84,
-101,120, 77, 97,112,112,105,110,103, 0, 67,111,108,111,114, 77, 97,112,112,105,110,103, 0, 76, 97,109,112, 0, 86,111,108,117,
-109,101, 83,101,116,116,105,110,103,115, 0, 71, 97,109,101, 83,101,116,116,105,110,103,115, 0, 77, 97,116,101,114,105, 97,108,
- 0, 71,114,111,117,112, 0, 86, 70,111,110,116, 0, 86, 70,111,110,116, 68, 97,116, 97, 0, 77,101,116, 97, 69,108,101,109, 0,
- 66,111,117,110,100, 66,111,120, 0, 77,101,116, 97, 66, 97,108,108, 0, 78,117,114, 98, 0, 67,104, 97,114, 73,110,102,111, 0,
- 84,101,120,116, 66,111,120, 0, 69,100,105,116, 78,117,114, 98, 0, 71, 72, 97,115,104, 0, 67,117,114,118,101, 0, 80, 97,116,
-104, 0, 83,101,108, 66,111,120, 0, 69,100,105,116, 70,111,110,116, 0, 77,101,115,104, 0, 77, 80,111,108,121, 0, 77, 84,101,
-120, 80,111,108,121, 0, 77, 76,111,111,112, 0, 77, 76,111,111,112, 85, 86, 0, 77, 76,111,111,112, 67,111,108, 0, 77, 70, 97,
- 99,101, 0, 77, 84, 70, 97, 99,101, 0, 84, 70, 97, 99,101, 0, 77, 86,101,114,116, 0, 77, 69,100,103,101, 0, 77, 68,101,102,
-111,114,109, 86,101,114,116, 0, 77, 67,111,108, 0, 77, 83,116,105, 99,107,121, 0, 77, 83,101,108,101, 99,116, 0, 66, 77, 69,
-100,105,116, 77,101,115,104, 0, 67,117,115,116,111,109, 68, 97,116, 97, 0, 77,117,108,116,105,114,101,115, 0, 77, 68,101,102,
-111,114,109, 87,101,105,103,104,116, 0, 77, 70,108,111, 97,116, 80,114,111,112,101,114,116,121, 0, 77, 73,110,116, 80,114,111,
-112,101,114,116,121, 0, 77, 83,116,114,105,110,103, 80,114,111,112,101,114,116,121, 0, 79,114,105,103, 83,112, 97, 99,101, 70,
- 97, 99,101, 0, 79,114,105,103, 83,112, 97, 99,101, 76,111,111,112, 0, 77, 68,105,115,112,115, 0, 77,117,108,116,105,114,101,
-115, 67,111,108, 0, 77,117,108,116,105,114,101,115, 67,111,108, 70, 97, 99,101, 0, 77,117,108,116,105,114,101,115, 70, 97, 99,
-101, 0, 77,117,108,116,105,114,101,115, 69,100,103,101, 0, 77,117,108,116,105,114,101,115, 76,101,118,101,108, 0, 77, 82,101,
- 99, 97,115,116, 0, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 77, 97,112,112,105,110,103, 73,110,102,111, 77,111,100,
-105,102,105,101,114, 68, 97,116, 97, 0, 83,117, 98,115,117,114,102, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 76, 97,
-116,116,105, 99,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 67,117,114,118,101, 77,111,100,105,102,105,101,114, 68,
- 97,116, 97, 0, 66,117,105,108,100, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 77, 97,115,107, 77,111,100,105,102,105,
-101,114, 68, 97,116, 97, 0, 65,114,114, 97,121, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 77,105,114,114,111,114, 77,
-111,100,105,102,105,101,114, 68, 97,116, 97, 0, 69,100,103,101, 83,112,108,105,116, 77,111,100,105,102,105,101,114, 68, 97,116,
- 97, 0, 66,101,118,101,108, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 66, 77,101,115,104, 77,111,100,105,102,105,101,
-114, 68, 97,116, 97, 0, 83,109,111,107,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 83,109,111,107,101, 68,111,109,
- 97,105,110, 83,101,116,116,105,110,103,115, 0, 83,109,111,107,101, 70,108,111,119, 83,101,116,116,105,110,103,115, 0, 83,109,
-111,107,101, 67,111,108,108, 83,101,116,116,105,110,103,115, 0, 68,105,115,112,108, 97, 99,101, 77,111,100,105,102,105,101,114,
- 68, 97,116, 97, 0, 85, 86, 80,114,111,106,101, 99,116, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 68,101, 99,105,109,
- 97,116,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 83,109,111,111,116,104, 77,111,100,105,102,105,101,114, 68, 97,
-116, 97, 0, 67, 97,115,116, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 87, 97,118,101, 77,111,100,105,102,105,101,114,
- 68, 97,116, 97, 0, 65,114,109, 97,116,117,114,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 72,111,111,107, 77,111,
-100,105,102,105,101,114, 68, 97,116, 97, 0, 83,111,102,116, 98,111,100,121, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0,
- 67,108,111,116,104, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 67,108,111,116,104, 0, 67,108,111,116,104, 83,105,109,
- 83,101,116,116,105,110,103,115, 0, 67,108,111,116,104, 67,111,108,108, 83,101,116,116,105,110,103,115, 0, 80,111,105,110,116,
- 67, 97, 99,104,101, 0, 67,111,108,108,105,115,105,111,110, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 66, 86, 72, 84,
-114,101,101, 0, 83,117,114,102, 97, 99,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 68,101,114,105,118,101,100, 77,
-101,115,104, 0, 66, 86, 72, 84,114,101,101, 70,114,111,109, 77,101,115,104, 0, 66,111,111,108,101, 97,110, 77,111,100,105,102,
-105,101,114, 68, 97,116, 97, 0, 77, 68,101,102, 73,110,102,108,117,101,110, 99,101, 0, 77, 68,101,102, 67,101,108,108, 0, 77,
-101,115,104, 68,101,102,111,114,109, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 80, 97,114,116,105, 99,108,101, 83,121,
-115,116,101,109, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 80, 97,114,116,105, 99,108,101, 83,121,115,116,101,109, 0,
- 80, 97,114,116,105, 99,108,101, 73,110,115,116, 97,110, 99,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 69,120,112,
-108,111,100,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 77,117,108,116,105,114,101,115, 77,111,100,105,102,105,101,
-114, 68, 97,116, 97, 0, 70,108,117,105,100,115,105,109, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 70,108,117,105,100,
-115,105,109, 83,101,116,116,105,110,103,115, 0, 83,104,114,105,110,107,119,114, 97,112, 77,111,100,105,102,105,101,114, 68, 97,
-116, 97, 0, 83,105,109,112,108,101, 68,101,102,111,114,109, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 83,104, 97,112,
-101, 75,101,121, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 83,111,108,105,100,105,102,121, 77,111,100,105,102,105,101,
-114, 68, 97,116, 97, 0, 83, 99,114,101,119, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 79, 99,101, 97,110, 77,111,100,
-105,102,105,101,114, 68, 97,116, 97, 0, 79, 99,101, 97,110, 0, 79, 99,101, 97,110, 67, 97, 99,104,101, 0, 87, 97,114,112, 77,
-111,100,105,102,105,101,114, 68, 97,116, 97, 0, 87,101,105,103,104,116, 86, 71, 69,100,105,116, 77,111,100,105,102,105,101,114,
- 68, 97,116, 97, 0, 87,101,105,103,104,116, 86, 71, 77,105,120, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 87,101,105,
-103,104,116, 86, 71, 80,114,111,120,105,109,105,116,121, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 68,121,110, 97,109,
-105, 99, 80, 97,105,110,116, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 68,121,110, 97,109,105, 99, 80, 97,105,110,116,
- 67, 97,110,118, 97,115, 83,101,116,116,105,110,103,115, 0, 68,121,110, 97,109,105, 99, 80, 97,105,110,116, 66,114,117,115,104,
- 83,101,116,116,105,110,103,115, 0, 82,101,109,101,115,104, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 69,100,105,116,
- 76, 97,116,116, 0, 76, 97,116,116,105, 99,101, 0, 98, 68,101,102,111,114,109, 71,114,111,117,112, 0, 83, 99,117,108,112,116,
- 83,101,115,115,105,111,110, 0, 98, 65, 99,116,105,111,110, 0, 98, 80,111,115,101, 0, 98, 71, 80,100, 97,116, 97, 0, 98, 65,
-110,105,109, 86,105,122, 83,101,116,116,105,110,103,115, 0, 98, 77,111,116,105,111,110, 80, 97,116,104, 0, 66,117,108,108,101,
-116, 83,111,102,116, 66,111,100,121, 0, 80, 97,114,116, 68,101,102,108,101, 99,116, 0, 83,111,102,116, 66,111,100,121, 0, 79,
- 98, 72,111,111,107, 0, 68,117,112,108,105, 79, 98,106,101, 99,116, 0, 82, 78, 71, 0, 69,102,102,101, 99,116,111,114, 87,101,
-105,103,104,116,115, 0, 80, 84, 67, 97, 99,104,101, 69,120,116,114, 97, 0, 80, 84, 67, 97, 99,104,101, 77,101,109, 0, 80, 84,
- 67, 97, 99,104,101, 69,100,105,116, 0, 83, 66, 86,101,114,116,101,120, 0, 66,111,100,121, 80,111,105,110,116, 0, 66,111,100,
-121, 83,112,114,105,110,103, 0, 83, 66, 83, 99,114, 97,116, 99,104, 0, 70,108,117,105,100, 86,101,114,116,101,120, 86,101,108,
-111, 99,105,116,121, 0, 87,111,114,108,100, 0, 66, 97,115,101, 0, 65,118,105, 67,111,100,101, 99, 68, 97,116, 97, 0, 81,117,
-105, 99,107,116,105,109,101, 67,111,100,101, 99, 68, 97,116, 97, 0, 81,117,105, 99,107,116,105,109,101, 67,111,100,101, 99, 83,
-101,116,116,105,110,103,115, 0, 70, 70, 77,112,101,103, 67,111,100,101, 99, 68, 97,116, 97, 0, 65,117,100,105,111, 68, 97,116,
- 97, 0, 83, 99,101,110,101, 82,101,110,100,101,114, 76, 97,121,101,114, 0, 73,109, 97,103,101, 70,111,114,109, 97,116, 68, 97,
-116, 97, 0, 82,101,110,100,101,114, 68, 97,116, 97, 0, 82,101,110,100,101,114, 80,114,111,102,105,108,101, 0, 71, 97,109,101,
- 68,111,109,101, 0, 71, 97,109,101, 70,114, 97,109,105,110,103, 0, 82,101, 99, 97,115,116, 68, 97,116, 97, 0, 71, 97,109,101,
- 68, 97,116, 97, 0, 84,105,109,101, 77, 97,114,107,101,114, 0, 80, 97,105,110,116, 0, 66,114,117,115,104, 0, 73,109, 97,103,
-101, 80, 97,105,110,116, 83,101,116,116,105,110,103,115, 0, 80, 97,114,116,105, 99,108,101, 66,114,117,115,104, 68, 97,116, 97,
- 0, 80, 97,114,116,105, 99,108,101, 69,100,105,116, 83,101,116,116,105,110,103,115, 0, 83, 99,117,108,112,116, 0, 85,118, 83,
- 99,117,108,112,116, 0, 86, 80, 97,105,110,116, 0, 84,114, 97,110,115,102,111,114,109, 79,114,105,101,110,116, 97,116,105,111,
-110, 0, 85,110,105,102,105,101,100, 80, 97,105,110,116, 83,101,116,116,105,110,103,115, 0, 84,111,111,108, 83,101,116,116,105,
-110,103,115, 0, 98, 83,116, 97,116,115, 0, 85,110,105,116, 83,101,116,116,105,110,103,115, 0, 80,104,121,115,105, 99,115, 83,
-101,116,116,105,110,103,115, 0, 69,100,105,116,105,110,103, 0, 83, 99,101,110,101, 83,116, 97,116,115, 0, 68, 97,103, 70,111,
-114,101,115,116, 0, 77,111,118,105,101, 67,108,105,112, 0, 66, 71,112,105, 99, 0, 77,111,118,105,101, 67,108,105,112, 85,115,
-101,114, 0, 82,101,103,105,111,110, 86,105,101,119, 51, 68, 0, 82,101,110,100,101,114, 73,110,102,111, 0, 82,101,110,100,101,
-114, 69,110,103,105,110,101, 0, 86,105,101,119, 68,101,112,116,104,115, 0, 83,109,111,111,116,104, 86,105,101,119, 83,116,111,
-114,101, 0,119,109, 84,105,109,101,114, 0, 86,105,101,119, 51, 68, 0, 83,112, 97, 99,101, 76,105,110,107, 0, 86,105,101,119,
- 50, 68, 0, 83,112, 97, 99,101, 73,110,102,111, 0, 83,112, 97, 99,101, 73,112,111, 0, 98, 68,111,112,101, 83,104,101,101,116,
- 0, 83,112, 97, 99,101, 66,117,116,115, 0, 83,112, 97, 99,101, 83,101,113, 0, 70,105,108,101, 83,101,108,101, 99,116, 80, 97,
-114, 97,109,115, 0, 83,112, 97, 99,101, 70,105,108,101, 0, 70,105,108,101, 76,105,115,116, 0,119,109, 79,112,101,114, 97,116,
-111,114, 0, 70,105,108,101, 76, 97,121,111,117,116, 0, 83,112, 97, 99,101, 79,111,112,115, 0, 84,114,101,101, 83,116,111,114,
-101, 0, 84,114,101,101, 83,116,111,114,101, 69,108,101,109, 0, 83,112, 97, 99,101, 73,109, 97,103,101, 0, 83, 99,111,112,101,
-115, 0, 72,105,115,116,111,103,114, 97,109, 0, 83,112, 97, 99,101, 78,108, 97, 0, 83,112, 97, 99,101, 84,101,120,116, 0, 83,
- 99,114,105,112,116, 0, 83,112, 97, 99,101, 83, 99,114,105,112,116, 0, 83,112, 97, 99,101, 84,105,109,101, 67, 97, 99,104,101,
- 0, 83,112, 97, 99,101, 84,105,109,101, 0, 83,112, 97, 99,101, 78,111,100,101, 0, 83,112, 97, 99,101, 76,111,103,105, 99, 0,
- 67,111,110,115,111,108,101, 76,105,110,101, 0, 83,112, 97, 99,101, 67,111,110,115,111,108,101, 0, 83,112, 97, 99,101, 85,115,
-101,114, 80,114,101,102, 0, 83,112, 97, 99,101, 67,108,105,112, 0, 77,111,118,105,101, 67,108,105,112, 83, 99,111,112,101,115,
- 0,117,105, 70,111,110,116, 0,117,105, 70,111,110,116, 83,116,121,108,101, 0,117,105, 83,116,121,108,101, 0,117,105, 87,105,
-100,103,101,116, 67,111,108,111,114,115, 0,117,105, 87,105,100,103,101,116, 83,116, 97,116,101, 67,111,108,111,114,115, 0,117,
-105, 80, 97,110,101,108, 67,111,108,111,114,115, 0, 84,104,101,109,101, 85, 73, 0, 84,104,101,109,101, 83,112, 97, 99,101, 0,
- 84,104,101,109,101, 87,105,114,101, 67,111,108,111,114, 0, 98, 84,104,101,109,101, 0, 98, 65,100,100,111,110, 0, 83,111,108,
-105,100, 76,105,103,104,116, 0, 85,115,101,114, 68,101,102, 0, 98, 83, 99,114,101,101,110, 0, 83, 99,114, 86,101,114,116, 0,
- 83, 99,114, 69,100,103,101, 0, 80, 97,110,101,108, 0, 80, 97,110,101,108, 84,121,112,101, 0,117,105, 76, 97,121,111,117,116,
- 0, 83, 99,114, 65,114,101, 97, 0, 83,112, 97, 99,101, 84,121,112,101, 0, 65, 82,101,103,105,111,110, 0, 65, 82,101,103,105,
-111,110, 84,121,112,101, 0, 70,105,108,101, 71,108,111, 98, 97,108, 0, 83,116,114,105,112, 69,108,101,109, 0, 83,116,114,105,
-112, 67,114,111,112, 0, 83,116,114,105,112, 84,114, 97,110,115,102,111,114,109, 0, 83,116,114,105,112, 67,111,108,111,114, 66,
- 97,108, 97,110, 99,101, 0, 83,116,114,105,112, 80,114,111,120,121, 0, 83,116,114,105,112, 0, 80,108,117,103,105,110, 83,101,
-113, 0, 83,101,113,117,101,110, 99,101, 0, 98, 83,111,117,110,100, 0, 77,101,116, 97, 83,116, 97, 99,107, 0, 87,105,112,101,
- 86, 97,114,115, 0, 71,108,111,119, 86, 97,114,115, 0, 84,114, 97,110,115,102,111,114,109, 86, 97,114,115, 0, 83,111,108,105,
-100, 67,111,108,111,114, 86, 97,114,115, 0, 83,112,101,101,100, 67,111,110,116,114,111,108, 86, 97,114,115, 0, 69,102,102,101,
- 99,116, 0, 66,117,105,108,100, 69,102,102, 0, 80, 97,114,116, 69,102,102, 0, 80, 97,114,116,105, 99,108,101, 0, 87, 97,118,
-101, 69,102,102, 0, 98, 80,114,111,112,101,114,116,121, 0, 98, 78,101, 97,114, 83,101,110,115,111,114, 0, 98, 77,111,117,115,
-101, 83,101,110,115,111,114, 0, 98, 84,111,117, 99,104, 83,101,110,115,111,114, 0, 98, 75,101,121, 98,111, 97,114,100, 83,101,
-110,115,111,114, 0, 98, 80,114,111,112,101,114,116,121, 83,101,110,115,111,114, 0, 98, 65, 99,116,117, 97,116,111,114, 83,101,
-110,115,111,114, 0, 98, 68,101,108, 97,121, 83,101,110,115,111,114, 0, 98, 67,111,108,108,105,115,105,111,110, 83,101,110,115,
-111,114, 0, 98, 82, 97,100, 97,114, 83,101,110,115,111,114, 0, 98, 82, 97,110,100,111,109, 83,101,110,115,111,114, 0, 98, 82,
- 97,121, 83,101,110,115,111,114, 0, 98, 65,114,109, 97,116,117,114,101, 83,101,110,115,111,114, 0, 98, 77,101,115,115, 97,103,
-101, 83,101,110,115,111,114, 0, 98, 83,101,110,115,111,114, 0, 98, 67,111,110,116,114,111,108,108,101,114, 0, 98, 74,111,121,
-115,116,105, 99,107, 83,101,110,115,111,114, 0, 98, 69,120,112,114,101,115,115,105,111,110, 67,111,110,116, 0, 98, 80,121,116,
-104,111,110, 67,111,110,116, 0, 98, 65, 99,116,117, 97,116,111,114, 0, 98, 65,100,100, 79, 98,106,101, 99,116, 65, 99,116,117,
- 97,116,111,114, 0, 98, 65, 99,116,105,111,110, 65, 99,116,117, 97,116,111,114, 0, 83,111,117,110,100, 51, 68, 0, 98, 83,111,
-117,110,100, 65, 99,116,117, 97,116,111,114, 0, 98, 69,100,105,116, 79, 98,106,101, 99,116, 65, 99,116,117, 97,116,111,114, 0,
- 98, 83, 99,101,110,101, 65, 99,116,117, 97,116,111,114, 0, 98, 80,114,111,112,101,114,116,121, 65, 99,116,117, 97,116,111,114,
- 0, 98, 79, 98,106,101, 99,116, 65, 99,116,117, 97,116,111,114, 0, 98, 73,112,111, 65, 99,116,117, 97,116,111,114, 0, 98, 67,
- 97,109,101,114, 97, 65, 99,116,117, 97,116,111,114, 0, 98, 67,111,110,115,116,114, 97,105,110,116, 65, 99,116,117, 97,116,111,
-114, 0, 98, 71,114,111,117,112, 65, 99,116,117, 97,116,111,114, 0, 98, 82, 97,110,100,111,109, 65, 99,116,117, 97,116,111,114,
- 0, 98, 77,101,115,115, 97,103,101, 65, 99,116,117, 97,116,111,114, 0, 98, 71, 97,109,101, 65, 99,116,117, 97,116,111,114, 0,
- 98, 86,105,115,105, 98,105,108,105,116,121, 65, 99,116,117, 97,116,111,114, 0, 98, 84,119,111, 68, 70,105,108,116,101,114, 65,
- 99,116,117, 97,116,111,114, 0, 98, 80, 97,114,101,110,116, 65, 99,116,117, 97,116,111,114, 0, 98, 83,116, 97,116,101, 65, 99,
-116,117, 97,116,111,114, 0, 98, 65,114,109, 97,116,117,114,101, 65, 99,116,117, 97,116,111,114, 0, 98, 83,116,101,101,114,105,
-110,103, 65, 99,116,117, 97,116,111,114, 0, 71,114,111,117,112, 79, 98,106,101, 99,116, 0, 66,111,110,101, 0, 98, 65,114,109,
- 97,116,117,114,101, 0, 98, 77,111,116,105,111,110, 80, 97,116,104, 86,101,114,116, 0, 98, 80,111,115,101, 67,104, 97,110,110,
-101,108, 0, 98, 73, 75, 80, 97,114, 97,109, 0, 98, 73,116, 97,115, 99, 0, 98, 65, 99,116,105,111,110, 71,114,111,117,112, 0,
- 83,112, 97, 99,101, 65, 99,116,105,111,110, 0, 98, 65, 99,116,105,111,110, 67,104, 97,110,110,101,108, 0, 98, 67,111,110,115,
-116,114, 97,105,110,116, 67,104, 97,110,110,101,108, 0, 98, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 67,111,110,115,116,
-114, 97,105,110,116, 84, 97,114,103,101,116, 0, 98, 80,121,116,104,111,110, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 75,
-105,110,101,109, 97,116,105, 99, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 83,112,108,105,110,101, 73, 75, 67,111,110,115,
-116,114, 97,105,110,116, 0, 98, 84,114, 97, 99,107, 84,111, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 82,111,116, 97,116,
-101, 76,105,107,101, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 76,111, 99, 97,116,101, 76,105,107,101, 67,111,110,115,116,
-114, 97,105,110,116, 0, 98, 83,105,122,101, 76,105,107,101, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 83, 97,109,101, 86,
-111,108,117,109,101, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 84,114, 97,110,115, 76,105,107,101, 67,111,110,115,116,114,
- 97,105,110,116, 0, 98, 77,105,110, 77, 97,120, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 65, 99,116,105,111,110, 67,111,
-110,115,116,114, 97,105,110,116, 0, 98, 76,111, 99,107, 84,114, 97, 99,107, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 68,
- 97,109,112, 84,114, 97, 99,107, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 70,111,108,108,111,119, 80, 97,116,104, 67,111,
-110,115,116,114, 97,105,110,116, 0, 98, 83,116,114,101,116, 99,104, 84,111, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 82,
-105,103,105,100, 66,111,100,121, 74,111,105,110,116, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 67,108, 97,109,112, 84,111,
- 67,111,110,115,116,114, 97,105,110,116, 0, 98, 67,104,105,108,100, 79,102, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 84,
-114, 97,110,115,102,111,114,109, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 80,105,118,111,116, 67,111,110,115,116,114, 97,
-105,110,116, 0, 98, 76,111, 99, 76,105,109,105,116, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 82,111,116, 76,105,109,105,
-116, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 83,105,122,101, 76,105,109,105,116, 67,111,110,115,116,114, 97,105,110,116,
- 0, 98, 68,105,115,116, 76,105,109,105,116, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 83,104,114,105,110,107,119,114, 97,
-112, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 70,111,108,108,111,119, 84,114, 97, 99,107, 67,111,110,115,116,114, 97,105,
-110,116, 0, 98, 67, 97,109,101,114, 97, 83,111,108,118,101,114, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 79, 98,106,101,
- 99,116, 83,111,108,118,101,114, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 65, 99,116,105,111,110, 77,111,100,105,102,105,
-101,114, 0, 98, 65, 99,116,105,111,110, 83,116,114,105,112, 0, 98, 78,111,100,101, 83,116, 97, 99,107, 0, 98, 78,111,100,101,
- 83,111, 99,107,101,116, 0, 98, 78,111,100,101, 76,105,110,107, 0, 98, 78,111,100,101, 80,114,101,118,105,101,119, 0, 98, 78,
-111,100,101, 0,117,105, 66,108,111, 99,107, 0, 98, 78,111,100,101, 84,121,112,101, 0, 98, 78,111,100,101, 84,114,101,101, 69,
-120,101, 99, 0, 98, 78,111,100,101, 83,111, 99,107,101,116, 86, 97,108,117,101, 73,110,116, 0, 98, 78,111,100,101, 83,111, 99,
-107,101,116, 86, 97,108,117,101, 70,108,111, 97,116, 0, 98, 78,111,100,101, 83,111, 99,107,101,116, 86, 97,108,117,101, 66,111,
-111,108,101, 97,110, 0, 98, 78,111,100,101, 83,111, 99,107,101,116, 86, 97,108,117,101, 86,101, 99,116,111,114, 0, 98, 78,111,
-100,101, 83,111, 99,107,101,116, 86, 97,108,117,101, 82, 71, 66, 65, 0, 78,111,100,101, 73,109, 97,103,101, 65,110,105,109, 0,
- 78,111,100,101, 66,108,117,114, 68, 97,116, 97, 0, 78,111,100,101, 68, 66,108,117,114, 68, 97,116, 97, 0, 78,111,100,101, 66,
-105,108, 97,116,101,114, 97,108, 66,108,117,114, 68, 97,116, 97, 0, 78,111,100,101, 72,117,101, 83, 97,116, 0, 78,111,100,101,
- 73,109, 97,103,101, 70,105,108,101, 0, 78,111,100,101, 73,109, 97,103,101, 77,117,108,116,105, 70,105,108,101, 0, 78,111,100,
-101, 73,109, 97,103,101, 77,117,108,116,105, 70,105,108,101, 83,111, 99,107,101,116, 0, 78,111,100,101, 67,104,114,111,109, 97,
- 0, 78,111,100,101, 84,119,111, 88, 89,115, 0, 78,111,100,101, 84,119,111, 70,108,111, 97,116,115, 0, 78,111,100,101, 71,101,
-111,109,101,116,114,121, 0, 78,111,100,101, 86,101,114,116,101,120, 67,111,108, 0, 78,111,100,101, 68,101,102,111, 99,117,115,
- 0, 78,111,100,101, 83, 99,114,105,112,116, 68,105, 99,116, 0, 78,111,100,101, 71,108, 97,114,101, 0, 78,111,100,101, 84,111,
-110,101,109, 97,112, 0, 78,111,100,101, 76,101,110,115, 68,105,115,116, 0, 78,111,100,101, 67,111,108,111,114, 66, 97,108, 97,
-110, 99,101, 0, 78,111,100,101, 67,111,108,111,114,115,112,105,108,108, 0, 78,111,100,101, 84,101,120, 66, 97,115,101, 0, 78,
-111,100,101, 84,101,120, 83,107,121, 0, 78,111,100,101, 84,101,120, 73,109, 97,103,101, 0, 78,111,100,101, 84,101,120, 67,104,
-101, 99,107,101,114, 0, 78,111,100,101, 84,101,120, 69,110,118,105,114,111,110,109,101,110,116, 0, 78,111,100,101, 84,101,120,
- 71,114, 97,100,105,101,110,116, 0, 78,111,100,101, 84,101,120, 78,111,105,115,101, 0, 78,111,100,101, 84,101,120, 86,111,114,
-111,110,111,105, 0, 78,111,100,101, 84,101,120, 77,117,115,103,114, 97,118,101, 0, 78,111,100,101, 84,101,120, 87, 97,118,101,
- 0, 78,111,100,101, 84,101,120, 77, 97,103,105, 99, 0, 78,111,100,101, 83,104, 97,100,101,114, 65,116,116,114,105, 98,117,116,
-101, 0, 84,101,120, 78,111,100,101, 79,117,116,112,117,116, 0, 67,117,114,118,101, 77, 97,112, 80,111,105,110,116, 0, 67,117,
-114,118,101, 77, 97,112, 0, 66,114,117,115,104, 67,108,111,110,101, 0, 67,117,115,116,111,109, 68, 97,116, 97, 76, 97,121,101,
-114, 0, 67,117,115,116,111,109, 68, 97,116, 97, 69,120,116,101,114,110, 97,108, 0, 72, 97,105,114, 75,101,121, 0, 80, 97,114,
-116,105, 99,108,101, 75,101,121, 0, 66,111,105,100, 80, 97,114,116,105, 99,108,101, 0, 66,111,105,100, 68, 97,116, 97, 0, 80,
- 97,114,116,105, 99,108,101, 83,112,114,105,110,103, 0, 67,104,105,108,100, 80, 97,114,116,105, 99,108,101, 0, 80, 97,114,116,
-105, 99,108,101, 84, 97,114,103,101,116, 0, 80, 97,114,116,105, 99,108,101, 68,117,112,108,105, 87,101,105,103,104,116, 0, 80,
- 97,114,116,105, 99,108,101, 68, 97,116, 97, 0, 83, 80, 72, 70,108,117,105,100, 83,101,116,116,105,110,103,115, 0, 80, 97,114,
-116,105, 99,108,101, 83,101,116,116,105,110,103,115, 0, 66,111,105,100, 83,101,116,116,105,110,103,115, 0, 80, 97,114,116,105,
- 99,108,101, 67, 97, 99,104,101, 75,101,121, 0, 75, 68, 84,114,101,101, 0, 80, 97,114,116,105, 99,108,101, 68,114, 97,119, 68,
- 97,116, 97, 0, 76,105,110,107, 78,111,100,101, 0, 98, 71, 80, 68,115,112,111,105,110,116, 0, 98, 71, 80, 68,115,116,114,111,
-107,101, 0, 98, 71, 80, 68,102,114, 97,109,101, 0, 98, 71, 80, 68,108, 97,121,101,114, 0, 82,101,112,111,114,116, 76,105,115,
-116, 0,119,109, 87,105,110,100,111,119, 77, 97,110, 97,103,101,114, 0,119,109, 87,105,110,100,111,119, 0,119,109, 75,101,121,
- 67,111,110,102,105,103, 0,119,109, 69,118,101,110,116, 0,119,109, 83,117, 98, 87,105,110,100,111,119, 0,119,109, 71,101,115,
-116,117,114,101, 0,119,109, 75,101,121, 77, 97,112, 73,116,101,109, 0, 80,111,105,110,116,101,114, 82, 78, 65, 0,119,109, 75,
-101,121, 77, 97,112, 68,105,102,102, 73,116,101,109, 0,119,109, 75,101,121, 77, 97,112, 0,119,109, 79,112,101,114, 97,116,111,
-114, 84,121,112,101, 0, 70, 77,111,100,105,102,105,101,114, 0, 70, 77,111,100, 95, 71,101,110,101,114, 97,116,111,114, 0, 70,
- 77,111,100, 95, 70,117,110, 99,116,105,111,110, 71,101,110,101,114, 97,116,111,114, 0, 70, 67, 77, 95, 69,110,118,101,108,111,
-112,101, 68, 97,116, 97, 0, 70, 77,111,100, 95, 69,110,118,101,108,111,112,101, 0, 70, 77,111,100, 95, 67,121, 99,108,101,115,
- 0, 70, 77,111,100, 95, 80,121,116,104,111,110, 0, 70, 77,111,100, 95, 76,105,109,105,116,115, 0, 70, 77,111,100, 95, 78,111,
-105,115,101, 0, 70, 77,111,100, 95, 83,116,101,112,112,101,100, 0, 68,114,105,118,101,114, 84, 97,114,103,101,116, 0, 68,114,
-105,118,101,114, 86, 97,114, 0, 67,104, 97,110,110,101,108, 68,114,105,118,101,114, 0, 70, 80,111,105,110,116, 0, 70, 67,117,
-114,118,101, 0, 65,110,105,109, 77, 97,112, 80, 97,105,114, 0, 65,110,105,109, 77, 97,112,112,101,114, 0, 78,108, 97, 83,116,
-114,105,112, 0, 78,108, 97, 84,114, 97, 99,107, 0, 75, 83, 95, 80, 97,116,104, 0, 75,101,121,105,110,103, 83,101,116, 0, 65,
-110,105,109, 79,118,101,114,114,105,100,101, 0, 73,100, 65,100,116, 84,101,109,112,108, 97,116,101, 0, 66,111,105,100, 82,117,
-108,101, 0, 66,111,105,100, 82,117,108,101, 71,111, 97,108, 65,118,111,105,100, 0, 66,111,105,100, 82,117,108,101, 65,118,111,
-105,100, 67,111,108,108,105,115,105,111,110, 0, 66,111,105,100, 82,117,108,101, 70,111,108,108,111,119, 76,101, 97,100,101,114,
- 0, 66,111,105,100, 82,117,108,101, 65,118,101,114, 97,103,101, 83,112,101,101,100, 0, 66,111,105,100, 82,117,108,101, 70,105,
-103,104,116, 0, 66,111,105,100, 83,116, 97,116,101, 0, 70, 76, 85, 73, 68, 95, 51, 68, 0, 87, 84, 85, 82, 66, 85, 76, 69, 78,
- 67, 69, 0, 83,112,101, 97,107,101,114, 0, 77,111,118,105,101, 67,108,105,112, 80,114,111,120,121, 0, 77,111,118,105,101, 67,
-108,105,112, 67, 97, 99,104,101, 0, 77,111,118,105,101, 84,114, 97, 99,107,105,110,103, 0, 77,111,118,105,101, 84,114, 97, 99,
-107,105,110,103, 84,114, 97, 99,107, 0, 77,111,118,105,101, 84,114, 97, 99,107,105,110,103, 77, 97,114,107,101,114, 0, 77,111,
-118,105,101, 82,101, 99,111,110,115,116,114,117, 99,116,101,100, 67, 97,109,101,114, 97, 0, 77,111,118,105,101, 84,114, 97, 99,
-107,105,110,103, 67, 97,109,101,114, 97, 0, 77,111,118,105,101, 84,114, 97, 99,107,105,110,103, 83,101,116,116,105,110,103,115,
- 0, 77,111,118,105,101, 84,114, 97, 99,107,105,110,103, 83,116, 97, 98,105,108,105,122, 97,116,105,111,110, 0, 77,111,118,105,
-101, 84,114, 97, 99,107,105,110,103, 82,101, 99,111,110,115,116,114,117, 99,116,105,111,110, 0, 77,111,118,105,101, 84,114, 97,
- 99,107,105,110,103, 79, 98,106,101, 99,116, 0, 77,111,118,105,101, 84,114, 97, 99,107,105,110,103, 83,116, 97,116,115, 0, 68,
-121,110, 97,109,105, 99, 80, 97,105,110,116, 83,117,114,102, 97, 99,101, 0, 80, 97,105,110,116, 83,117,114,102, 97, 99,101, 68,
- 97,116, 97, 0, 84, 76, 69, 78, 1, 0, 1, 0, 2, 0, 2, 0, 4, 0, 4, 0, 4, 0, 4, 0, 8, 0, 8, 0, 8, 0, 0, 0,
- 16, 0, 24, 0, 16, 0, 4, 0, 8, 0, 12, 0, 16, 0, 16, 0, 32, 0,128, 0,120, 0,152, 8, 0, 0, 40, 0,144, 0,112, 5,
-112, 0, 36, 0, 56, 0,160, 0,200, 0, 0, 1, 96, 0, 40, 0, 48, 0,224, 0, 16, 0,200, 0, 40, 0,216, 11, 48, 5, 0, 0,
- 0, 0, 0, 0, 56, 1,168, 1,216, 4, 24, 0, 8, 3,200, 0, 0, 0,104, 0, 64, 1, 56, 4, 80, 0, 24, 1,144, 0, 56, 3,
- 16, 2, 88, 0, 16, 0,128, 3,152, 0,136, 4, 0, 0,104, 0,104, 0, 0, 1, 80, 0, 8, 0, 16, 0, 32, 0, 0, 0, 8, 2,
- 0, 0, 0, 0, 0, 0,232, 4, 12, 0, 16, 0, 8, 0, 12, 0, 4, 0, 20, 0, 48, 0, 64, 0, 20, 0, 12, 0, 16, 0, 4, 0,
- 8, 0, 8, 0, 0, 0,176, 0,144, 1, 8, 0, 4, 0, 4, 0, 0, 1, 32, 0, 8, 0, 24, 0, 16, 0, 64, 0, 24, 0, 12, 0,
- 64, 0, 4, 0,112, 0,200, 0,136, 0,192, 0,192, 0,128, 0,192, 0,192, 0,128, 0,120, 0,200, 0,120, 0,144, 0, 16, 1,
- 56, 0,192, 0, 24, 1, 40, 1,120, 0,184, 0,200, 0, 64, 1,200, 0, 88, 1,112, 0,168, 0, 0, 0,152, 0, 48, 0, 40, 5,
-192, 0, 0, 0,152, 0, 0, 0, 0, 0,128, 0, 8, 0, 8, 0,112, 1,144, 0,152, 2,136, 0,192, 0,120, 0,128, 0,224, 4,
-208, 0,200, 0,112, 0,208, 0,144, 0, 16, 5, 0, 0, 0, 0, 48, 1,104, 1,160, 1,104, 1,136, 0,104, 0,112, 0,128, 0,
- 16, 0, 96, 1, 88, 0, 0, 0,200, 0,216, 0,152, 0, 48, 0, 24, 0,120, 0,152, 0,216, 1, 0, 1,184, 0, 0, 0, 72, 0,
- 32, 0,176, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 12, 0, 24, 2, 40, 0,184, 0,152, 0, 64, 0, 72, 0, 32, 0,120, 0,
- 24, 0, 56, 9, 64, 0, 24, 0, 16, 0, 56, 0,168, 0, 96, 0, 24, 0, 88, 6, 48, 0, 16, 0,168, 0, 96, 0, 24, 0, 56, 0,
-120, 0, 16, 0,232, 1, 32, 0, 8, 0, 24, 0, 80, 8, 0, 0, 0, 0,192, 8,104, 0, 8, 0,112, 3, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 96, 1, 56, 0,144, 0, 64, 0,240, 0,112, 0,248, 0,240, 0,160, 7,104, 0, 0, 0,168, 0, 0, 0, 24, 1,
- 16, 0, 16, 0, 40, 33,128, 16, 24, 16,216, 0,160, 2,168, 5, 64, 0, 24, 0,208, 0, 48, 1, 72, 0, 40, 0,136, 1,104, 0,
- 40, 1, 56, 0, 24, 4, 32, 0,232, 0, 32, 0, 32, 0, 8, 0, 80, 3,224, 1, 16, 0,168, 36, 80, 0, 56, 0,112, 38, 8, 1,
- 32, 0, 40, 0, 88, 1, 0, 0, 0, 0,160, 0, 0, 0, 40, 1, 0, 0, 48, 4, 8, 1, 16, 0, 8, 0, 44, 0, 16, 4, 72, 3,
-200, 4, 72, 1,208, 4, 32, 0, 12, 0, 24, 0, 32, 0, 16, 0, 24, 0, 24, 0, 32, 0,136, 1, 0, 0, 64, 0, 96, 0, 80, 0,
- 8, 0, 80, 0,136, 0,200, 0, 72, 0, 8, 0,136, 0, 76, 0, 72, 0,204, 0,136, 0,136, 0,128, 0,136, 0, 92, 0,128, 0,
- 80, 0,112, 0, 16, 0,168, 0, 32, 0, 72, 0,120, 0, 24, 0,144, 0,112, 0,148, 0, 32, 0,128, 0, 88, 0, 88, 0,208, 0,
-140, 0, 4, 0, 24, 0, 16, 0, 8, 0,160, 0, 48, 0, 40, 0, 72, 1, 0, 1, 16, 0, 32, 2, 4, 0, 40, 0,120, 0, 72, 1,
-120, 0, 56, 0,120, 0,160, 0,112, 0,184, 0, 24, 0, 88, 0, 80, 0, 80, 0, 80, 0, 8, 0, 72, 0,104, 0,104, 0, 80, 0,
- 80, 0, 24, 0, 88, 0,104, 0, 16, 0,144, 0,128, 0, 88, 0, 28, 0, 28, 0, 28, 0, 88, 0, 24, 0,160, 0, 16, 0,152, 0,
- 72, 0,168, 0, 48, 0,208, 0, 56, 0, 16, 0, 88, 1, 0, 0, 0, 0, 0, 0, 16, 0, 16, 0, 4, 0, 24, 0, 16, 0, 16, 0,
- 40, 0, 28, 0, 12, 0, 12, 0, 32, 4, 40, 4, 32, 0, 44, 0, 24, 0, 8, 0,128, 0, 64, 0, 32, 0, 16, 0, 32, 0, 32, 0,
- 8, 0, 96, 0, 20, 0,200, 3,216, 3,208, 3,200, 3,208, 3,208, 3,200, 3,208, 3,208, 3,208, 3,208, 3, 64, 0, 64, 0,
- 12, 0, 56, 0, 24, 0,104, 0, 0, 4, 24, 0, 56, 0, 56, 0, 20, 0, 16, 0, 64, 0, 40, 0, 32, 0,192, 0, 60, 0, 16, 3,
-104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 32, 0, 40, 0,192, 0, 40, 0, 88, 1, 0, 1,168, 0, 0, 0, 0, 0, 0, 0,
-120, 0, 0, 0, 32, 0,136, 0, 0, 0,120, 0, 24, 0, 24, 0, 16, 0, 24, 0, 8, 0, 16, 0, 24, 0, 20, 0, 20, 0, 56, 0,
- 24, 2, 40, 1, 16, 0,104, 0, 0, 1, 40, 0,208, 0,104, 0,112, 0,216, 1, 32, 0,128, 0, 56, 0, 80, 0, 64, 0,104, 0,
- 72, 0, 64, 0,128, 0, 0, 0, 0, 0,184, 0, 8, 3, 0, 0,248, 0,192, 0, 16, 0, 72, 0, 48, 0, 64, 0, 56, 0, 24, 0,
-128, 0, 0, 1, 16, 6, 0, 0, 83, 84, 82, 67,207, 1, 0, 0, 12, 0, 2, 0, 12, 0, 0, 0, 12, 0, 1, 0, 13, 0, 3, 0,
- 13, 0, 0, 0, 13, 0, 1, 0, 11, 0, 2, 0, 14, 0, 2, 0, 11, 0, 3, 0, 11, 0, 4, 0, 15, 0, 2, 0, 2, 0, 5, 0,
- 2, 0, 6, 0, 16, 0, 2, 0, 7, 0, 5, 0, 7, 0, 6, 0, 17, 0, 3, 0, 7, 0, 5, 0, 7, 0, 6, 0, 7, 0, 7, 0,
- 18, 0, 4, 0, 4, 0, 8, 0, 4, 0, 9, 0, 4, 0, 10, 0, 4, 0, 11, 0, 19, 0, 4, 0, 7, 0, 8, 0, 7, 0, 9, 0,
- 7, 0, 10, 0, 7, 0, 11, 0, 20, 0, 4, 0, 11, 0, 12, 0, 14, 0, 13, 0, 4, 0, 14, 0, 4, 0, 15, 0, 21, 0, 10, 0,
- 21, 0, 0, 0, 21, 0, 1, 0, 0, 0, 16, 0, 0, 0, 17, 0, 2, 0, 18, 0, 0, 0, 19, 0, 4, 0, 20, 0, 20, 0, 21, 0,
- 4, 0, 22, 0, 4, 0, 23, 0, 22, 0, 11, 0, 11, 0, 0, 0, 11, 0, 1, 0, 22, 0, 24, 0, 23, 0, 25, 0, 0, 0, 26, 0,
- 2, 0, 27, 0, 2, 0, 28, 0, 2, 0, 18, 0, 4, 0, 29, 0, 4, 0, 30, 0, 21, 0, 31, 0, 23, 0, 8, 0, 22, 0, 32, 0,
- 22, 0, 33, 0, 24, 0, 34, 0, 0, 0, 35, 0, 0, 0, 36, 0, 4, 0, 37, 0, 4, 0, 27, 0, 23, 0, 38, 0, 25, 0, 5, 0,
- 4, 0, 39, 0, 4, 0, 40, 0, 2, 0, 41, 0, 2, 0, 42, 0, 4, 0, 43, 0, 26, 0, 6, 0, 27, 0, 44, 0, 2, 0, 45, 0,
- 2, 0, 46, 0, 2, 0, 16, 0, 2, 0, 18, 0, 0, 0, 47, 0, 28, 0, 21, 0, 28, 0, 0, 0, 28, 0, 1, 0, 29, 0, 48, 0,
- 30, 0, 49, 0, 19, 0, 50, 0, 19, 0, 51, 0, 2, 0, 45, 0, 2, 0, 46, 0, 2, 0, 52, 0, 2, 0, 53, 0, 2, 0, 54, 0,
- 2, 0, 55, 0, 2, 0, 18, 0, 2, 0, 56, 0, 7, 0, 10, 0, 7, 0, 11, 0, 4, 0, 57, 0, 7, 0, 58, 0, 7, 0, 59, 0,
- 7, 0, 60, 0, 26, 0, 61, 0, 31, 0, 7, 0, 22, 0, 32, 0, 14, 0, 62, 0, 19, 0, 63, 0, 2, 0, 45, 0, 2, 0, 64, 0,
- 2, 0, 65, 0, 2, 0, 27, 0, 32, 0, 18, 0, 32, 0, 0, 0, 32, 0, 1, 0, 7, 0, 66, 0, 7, 0, 60, 0, 2, 0, 16, 0,
- 2, 0, 46, 0, 2, 0, 67, 0, 2, 0, 18, 0, 4, 0, 68, 0, 4, 0, 30, 0, 11, 0, 2, 0, 7, 0, 69, 0, 0, 0, 19, 0,
- 0, 0, 70, 0, 7, 0, 71, 0, 7, 0, 72, 0, 4, 0, 73, 0, 4, 0, 74, 0, 33, 0, 15, 0, 22, 0, 32, 0, 34, 0, 75, 0,
- 32, 0, 76, 0, 0, 0, 77, 0, 4, 0, 78, 0, 7, 0, 60, 0, 14, 0, 79, 0, 31, 0, 80, 0, 22, 0, 81, 0, 2, 0, 16, 0,
- 2, 0, 82, 0, 2, 0, 83, 0, 2, 0, 18, 0, 4, 0, 84, 0, 4, 0, 27, 0, 35, 0, 6, 0, 35, 0, 0, 0, 35, 0, 1, 0,
- 0, 0, 85, 0, 0, 0, 86, 0, 4, 0, 22, 0, 4, 0, 87, 0, 36, 0, 10, 0, 36, 0, 0, 0, 36, 0, 1, 0, 4, 0, 88, 0,
- 4, 0, 89, 0, 4, 0, 90, 0, 4, 0, 91, 0, 4, 0, 13, 0, 4, 0, 92, 0, 0, 0, 93, 0, 0, 0, 94, 0, 37, 0, 15, 0,
- 22, 0, 32, 0, 0, 0, 95, 0, 4, 0, 92, 0, 4, 0, 96, 0, 14, 0, 97, 0, 35, 0, 98, 0, 35, 0, 99, 0, 4, 0,100, 0,
- 4, 0,101, 0, 14, 0,102, 0, 0, 0,103, 0, 4, 0,104, 0, 4, 0,105, 0, 11, 0,106, 0, 8, 0,107, 0, 38, 0, 3, 0,
- 4, 0,108, 0, 4, 0,109, 0, 11, 0, 2, 0, 39, 0, 20, 0, 22, 0, 32, 0, 34, 0, 75, 0, 0, 0, 16, 0, 0, 0,110, 0,
- 2, 0, 18, 0, 7, 0,111, 0, 7, 0,112, 0, 7, 0,113, 0, 7, 0,114, 0, 7, 0,115, 0, 7, 0,116, 0, 7, 0,117, 0,
- 7, 0,118, 0, 7, 0,119, 0, 7, 0,120, 0, 7, 0,121, 0, 31, 0, 80, 0, 27, 0,122, 0, 0, 0,123, 0, 0, 0,124, 0,
- 40, 0, 14, 0, 41, 0,125, 0, 4, 0,126, 0, 4, 0,127, 0, 4, 0,128, 0, 4, 0,129, 0, 0, 0,130, 0, 0, 0,131, 0,
- 0, 0,132, 0, 0, 0, 27, 0, 2, 0,133, 0, 2, 0,134, 0, 2, 0,135, 0, 2, 0, 18, 0, 4, 0, 30, 0, 42, 0, 33, 0,
- 22, 0, 32, 0, 0, 0, 35, 0, 14, 0,136, 0, 43, 0,137, 0, 44, 0,138, 0, 45, 0,139, 0, 45, 0,140, 0, 2, 0,141, 0,
- 2, 0,142, 0, 2, 0,132, 0, 2, 0, 18, 0, 2, 0,143, 0, 2, 0, 16, 0, 4, 0,144, 0, 2, 0,145, 0, 2, 0,146, 0,
- 2, 0,147, 0, 2, 0,148, 0, 2, 0,149, 0, 2, 0,150, 0, 4, 0,151, 0, 4, 0,152, 0, 38, 0,153, 0, 25, 0,154, 0,
- 7, 0,155, 0, 4, 0,156, 0, 2, 0,157, 0, 2, 0,158, 0, 2, 0,159, 0, 0, 0,160, 0, 0, 0,161, 0, 7, 0,162, 0,
- 7, 0,163, 0, 46, 0, 65, 0, 2, 0,164, 0, 2, 0,165, 0, 2, 0,166, 0, 2, 0,167, 0, 27, 0,168, 0, 47, 0,169, 0,
- 0, 0,170, 0, 0, 0,171, 0, 0, 0,172, 0, 0, 0,173, 0, 0, 0,174, 0, 7, 0,175, 0, 7, 0,176, 0, 7, 0,177, 0,
- 2, 0,178, 0, 2, 0,179, 0, 2, 0,180, 0, 2, 0,181, 0, 2, 0,182, 0, 2, 0,183, 0, 0, 0,184, 0, 0, 0,124, 0,
- 7, 0,185, 0, 7, 0,186, 0, 7, 0,187, 0, 7, 0,188, 0, 7, 0,189, 0, 7, 0, 56, 0, 7, 0,190, 0, 7, 0,191, 0,
- 7, 0,192, 0, 7, 0,193, 0, 7, 0,194, 0, 7, 0,195, 0, 7, 0,196, 0, 7, 0,197, 0, 7, 0,198, 0, 7, 0,199, 0,
- 7, 0,200, 0, 7, 0,201, 0, 7, 0,202, 0, 7, 0,203, 0, 7, 0,204, 0, 7, 0,205, 0, 7, 0,206, 0, 7, 0,207, 0,
- 7, 0,208, 0, 7, 0,209, 0, 7, 0,210, 0, 7, 0,211, 0, 7, 0,212, 0, 7, 0,213, 0, 7, 0,214, 0, 7, 0,215, 0,
- 7, 0,216, 0, 7, 0,217, 0, 7, 0,218, 0, 7, 0,219, 0, 7, 0,220, 0, 7, 0,221, 0, 7, 0,222, 0, 7, 0,223, 0,
- 7, 0,224, 0, 7, 0,225, 0, 7, 0,226, 0, 48, 0, 15, 0, 0, 0, 35, 0, 11, 0,227, 0, 0, 0,228, 0, 0, 0,229, 0,
- 4, 0,230, 0, 4, 0,231, 0, 11, 0,232, 0, 7, 0,233, 0, 7, 0,234, 0, 7, 0,235, 0, 4, 0,236, 0, 11, 0,237, 0,
- 11, 0,238, 0, 4, 0,239, 0, 4, 0, 27, 0, 49, 0, 6, 0, 7, 0,185, 0, 7, 0,186, 0, 7, 0,187, 0, 7, 0,240, 0,
- 7, 0, 66, 0, 4, 0, 63, 0, 50, 0, 5, 0, 2, 0, 18, 0, 2, 0, 37, 0, 2, 0, 63, 0, 2, 0,241, 0, 49, 0,235, 0,
- 51, 0, 17, 0, 27, 0,168, 0, 42, 0,242, 0, 52, 0,243, 0, 7, 0,244, 0, 7, 0,245, 0, 2, 0, 16, 0, 2, 0,246, 0,
- 7, 0,112, 0, 7, 0,113, 0, 7, 0,247, 0, 4, 0,248, 0, 2, 0,249, 0, 2, 0,250, 0, 4, 0,132, 0, 4, 0,144, 0,
- 2, 0,251, 0, 2, 0,252, 0, 53, 0, 25, 0, 2, 0, 18, 0, 2, 0,253, 0, 7, 0,254, 0, 7, 0,255, 0, 2, 0,143, 0,
- 2, 0, 0, 1, 4, 0, 1, 1, 4, 0, 2, 1, 27, 0,168, 0, 4, 0, 3, 1, 2, 0, 4, 1, 2, 0, 5, 1, 11, 0, 6, 1,
- 7, 0, 7, 1, 7, 0, 8, 1, 2, 0, 9, 1, 2, 0, 10, 1, 2, 0, 11, 1, 2, 0, 12, 1, 7, 0, 13, 1, 7, 0, 14, 1,
- 7, 0, 15, 1, 7, 0, 16, 1, 50, 0, 17, 1, 54, 0, 18, 1, 55, 0, 13, 0, 4, 0, 19, 1, 4, 0, 20, 1, 2, 0, 21, 1,
- 2, 0, 18, 0, 2, 0, 22, 1, 2, 0, 23, 1, 27, 0,168, 0, 7, 0, 24, 1, 4, 0, 25, 1, 0, 0, 26, 1, 7, 0, 27, 1,
- 4, 0, 28, 1, 4, 0,132, 0, 56, 0, 4, 0, 27, 0,168, 0, 0, 0, 29, 1, 4, 0, 30, 1, 4, 0, 27, 0, 47, 0, 64, 0,
- 22, 0, 32, 0, 34, 0, 75, 0, 7, 0, 31, 1, 7, 0, 32, 1, 7, 0, 33, 1, 7, 0, 34, 1, 7, 0, 35, 1, 7, 0, 36, 1,
- 7, 0, 37, 1, 7, 0, 38, 1, 7, 0, 39, 1, 7, 0, 30, 0, 7, 0, 40, 1, 7, 0, 41, 1, 7, 0, 42, 1, 7, 0, 43, 1,
- 7, 0, 44, 1, 7, 0, 45, 1, 7, 0, 46, 1, 7, 0, 47, 1, 7, 0, 48, 1, 7, 0, 49, 1, 7, 0, 50, 1, 7, 0, 51, 1,
- 2, 0, 52, 1, 2, 0, 53, 1, 2, 0, 54, 1, 2, 0, 55, 1, 2, 0, 56, 1, 2, 0, 57, 1, 2, 0, 58, 1, 2, 0, 18, 0,
- 2, 0, 16, 0, 2, 0,246, 0, 7, 0, 59, 1, 7, 0, 60, 1, 7, 0, 61, 1, 7, 0, 62, 1, 4, 0, 63, 1, 4, 0, 64, 1,
- 2, 0, 65, 1, 2, 0, 66, 1, 2, 0, 22, 1, 2, 0,130, 0, 4, 0, 22, 0, 4, 0,127, 0, 4, 0,128, 0, 4, 0,129, 0,
- 7, 0, 67, 1, 7, 0, 68, 1, 7, 0, 91, 0, 40, 0, 69, 1, 57, 0, 70, 1, 31, 0, 80, 0, 42, 0,242, 0, 48, 0, 71, 1,
- 50, 0, 17, 1, 51, 0, 72, 1, 25, 0,154, 0, 53, 0, 73, 1, 55, 0, 74, 1, 56, 0, 75, 1, 0, 0, 76, 1, 0, 0,124, 0,
- 58, 0, 13, 0, 7, 0, 77, 1, 7, 0, 78, 1, 7, 0,176, 0, 4, 0, 18, 0, 0, 0,171, 0, 0, 0,172, 0, 0, 0,173, 0,
- 0, 0,174, 0, 4, 0, 27, 0, 7, 0, 79, 1, 7, 0, 80, 1, 7, 0, 81, 1, 27, 0, 44, 0, 59, 0, 9, 0, 50, 0, 82, 1,
- 7, 0, 33, 1, 7, 0, 34, 1, 7, 0, 35, 1, 4, 0, 18, 0, 7, 0, 83, 1, 7, 0, 84, 1, 4, 0, 85, 1, 4, 0, 86, 1,
- 60, 0, 74, 0, 22, 0, 32, 0, 34, 0, 75, 0, 2, 0, 16, 0, 2, 0, 18, 0, 4, 0, 87, 1, 2, 0,179, 0, 2, 0, 88, 1,
- 7, 0,185, 0, 7, 0,186, 0, 7, 0,187, 0, 7, 0,188, 0, 7, 0, 89, 1, 7, 0, 90, 1, 7, 0, 91, 1, 7, 0, 92, 1,
- 7, 0, 93, 1, 7, 0, 94, 1, 7, 0, 95, 1, 7, 0, 96, 1, 7, 0, 97, 1, 7, 0, 98, 1, 7, 0, 99, 1, 54, 0,100, 1,
- 2, 0,253, 0, 2, 0, 30, 0, 7, 0,112, 0, 7, 0,113, 0, 7, 0,101, 1, 7, 0,102, 1, 7, 0,103, 1, 7, 0,104, 1,
- 7, 0,105, 1, 2, 0,106, 1, 2, 0,107, 1, 2, 0,108, 1, 2, 0,109, 1, 0, 0,110, 1, 0, 0,111, 1, 2, 0,112, 1,
- 2, 0,113, 1, 2, 0,114, 1, 2, 0,115, 1, 2, 0,116, 1, 7, 0,117, 1, 7, 0,118, 1, 7, 0,119, 1, 7, 0,120, 1,
- 2, 0,121, 1, 2, 0, 91, 0, 2, 0,122, 1, 2, 0,123, 1, 2, 0,124, 1, 2, 0,125, 1, 7, 0,126, 1, 7, 0,127, 1,
- 7, 0,128, 1, 7, 0,129, 1, 7, 0,130, 1, 7, 0,131, 1, 7, 0,132, 1, 7, 0,133, 1, 7, 0,134, 1, 7, 0,135, 1,
- 7, 0,136, 1, 7, 0,137, 1, 2, 0,138, 1, 0, 0,139, 1, 31, 0, 80, 0, 46, 0,140, 1, 2, 0,141, 1, 2, 0, 76, 1,
- 0, 0,142, 1, 25, 0,154, 0, 57, 0, 70, 1, 61, 0, 18, 0, 7, 0,143, 1, 7, 0,144, 1, 7, 0,145, 1, 7, 0,146, 1,
- 7, 0,147, 1, 7, 0,148, 1, 7, 0,149, 1, 7, 0,150, 1, 7, 0,151, 1, 7, 0,152, 1, 2, 0,153, 1, 2, 0,154, 1,
- 2, 0,155, 1, 2, 0,156, 1, 7, 0,157, 1, 7, 0,158, 1, 7, 0,159, 1, 7, 0,160, 1, 62, 0, 4, 0, 4, 0, 18, 0,
- 4, 0,161, 1, 4, 0,162, 1, 4, 0, 91, 0, 63, 0,126, 0, 22, 0, 32, 0, 34, 0, 75, 0, 2, 0,163, 1, 2, 0, 18, 0,
- 7, 0,185, 0, 7, 0,186, 0, 7, 0,187, 0, 7, 0,164, 1, 7, 0,165, 1, 7, 0,166, 1, 7, 0,167, 1, 7, 0,168, 1,
- 7, 0,169, 1, 7, 0,170, 1, 7, 0,171, 1, 7, 0,172, 1, 7, 0,173, 1, 7, 0,174, 1, 7, 0,175, 1, 7, 0,176, 1,
- 7, 0,177, 1, 7, 0,178, 1, 7, 0,179, 1, 7, 0,180, 1, 7, 0,181, 1, 7, 0,182, 1, 7, 0,183, 1, 61, 0,184, 1,
- 62, 0,185, 1, 7, 0,186, 1, 7, 0,187, 1, 7, 0,188, 1, 7, 0,189, 1, 7, 0,190, 1, 7, 0,191, 1, 7, 0,192, 1,
- 2, 0,193, 1, 2, 0,194, 1, 2, 0,195, 1, 0, 0,196, 1, 0, 0,197, 1, 7, 0,198, 1, 7, 0,199, 1, 2, 0,200, 1,
- 2, 0,201, 1, 7, 0,202, 1, 7, 0,203, 1, 7, 0,204, 1, 7, 0,205, 1, 2, 0,206, 1, 2, 0,207, 1, 4, 0, 87, 1,
- 4, 0,208, 1, 2, 0,209, 1, 2, 0,210, 1, 2, 0,211, 1, 2, 0,212, 1, 7, 0,213, 1, 7, 0,214, 1, 7, 0,215, 1,
- 7, 0,216, 1, 7, 0,217, 1, 7, 0,218, 1, 7, 0,219, 1, 7, 0,220, 1, 7, 0,221, 1, 7, 0,222, 1, 0, 0,223, 1,
- 7, 0,224, 1, 7, 0,225, 1, 7, 0,226, 1, 4, 0,227, 1, 0, 0,228, 1, 0, 0,122, 1, 0, 0,229, 1, 0, 0, 76, 1,
- 2, 0,230, 1, 2, 0,231, 1, 2, 0,141, 1, 2, 0,232, 1, 2, 0,233, 1, 2, 0,234, 1, 7, 0,235, 1, 7, 0,236, 1,
- 7, 0,237, 1, 7, 0,238, 1, 7, 0,239, 1, 2, 0,164, 0, 2, 0,165, 0, 50, 0,240, 1, 50, 0,241, 1, 0, 0,242, 1,
- 0, 0,243, 1, 0, 0,244, 1, 0, 0,245, 1, 2, 0,246, 1, 2, 0, 74, 0, 7, 0,247, 1, 7, 0,248, 1, 46, 0,140, 1,
- 57, 0, 70, 1, 31, 0, 80, 0, 64, 0,249, 1, 25, 0,154, 0, 7, 0,250, 1, 7, 0,251, 1, 7, 0,252, 1, 7, 0,253, 1,
- 7, 0,254, 1, 2, 0,255, 1, 2, 0, 30, 0, 7, 0, 0, 2, 7, 0, 1, 2, 7, 0, 2, 2, 7, 0, 3, 2, 7, 0, 4, 2,
- 7, 0, 5, 2, 7, 0, 6, 2, 7, 0, 7, 2, 7, 0, 8, 2, 2, 0, 9, 2, 2, 0, 10, 2, 4, 0, 11, 2, 2, 0, 12, 2,
- 2, 0, 13, 2, 14, 0, 14, 2, 65, 0, 4, 0, 22, 0, 32, 0, 0, 0, 35, 0, 66, 0, 2, 0, 38, 0,153, 0, 67, 0, 20, 0,
- 67, 0, 0, 0, 67, 0, 1, 0, 68, 0, 15, 2, 2, 0, 16, 0, 2, 0, 18, 0, 2, 0, 16, 2, 2, 0, 17, 2, 7, 0, 5, 0,
- 7, 0, 6, 0, 7, 0, 7, 0, 7, 0, 18, 2, 7, 0, 19, 2, 7, 0, 20, 2, 7, 0, 21, 2, 7, 0, 22, 2, 7, 0, 23, 2,
- 7, 0, 24, 2, 7, 0, 22, 0, 7, 0, 25, 2, 7, 0, 26, 2, 69, 0, 20, 0, 22, 0, 32, 0, 34, 0, 75, 0, 68, 0, 15, 2,
- 14, 0, 27, 2, 14, 0, 28, 2, 14, 0, 29, 2, 31, 0, 80, 0, 63, 0, 30, 2, 0, 0, 18, 0, 0, 0, 31, 2, 2, 0, 32, 2,
- 2, 0,178, 0, 2, 0, 27, 0, 7, 0, 77, 1, 7, 0,176, 0, 7, 0, 78, 1, 7, 0, 33, 2, 7, 0, 34, 2, 7, 0, 35, 2,
- 67, 0, 36, 2, 30, 0, 11, 0, 7, 0, 37, 2, 7, 0, 38, 2, 7, 0, 39, 2, 7, 0,255, 0, 2, 0, 54, 0, 0, 0, 40, 2,
- 0, 0, 41, 2, 0, 0, 42, 2, 0, 0, 43, 2, 0, 0, 44, 2, 0, 0, 45, 2, 29, 0, 7, 0, 7, 0, 46, 2, 7, 0, 38, 2,
- 7, 0, 39, 2, 2, 0, 42, 2, 2, 0, 45, 2, 7, 0,255, 0, 7, 0, 27, 0, 70, 0, 21, 0, 70, 0, 0, 0, 70, 0, 1, 0,
- 2, 0, 16, 0, 2, 0, 47, 2, 2, 0, 45, 2, 2, 0, 18, 0, 2, 0, 48, 2, 2, 0, 49, 2, 2, 0, 50, 2, 2, 0, 51, 2,
- 2, 0, 52, 2, 2, 0, 53, 2, 2, 0, 54, 2, 2, 0, 55, 2, 7, 0, 56, 2, 7, 0, 57, 2, 29, 0, 48, 0, 30, 0, 49, 0,
- 2, 0, 58, 2, 2, 0, 59, 2, 4, 0, 60, 2, 71, 0, 5, 0, 2, 0, 61, 2, 2, 0, 47, 2, 0, 0, 18, 0, 0, 0, 27, 0,
- 2, 0, 30, 0, 72, 0, 4, 0, 7, 0, 5, 0, 7, 0, 6, 0, 7, 0, 62, 2, 7, 0, 63, 2, 73, 0, 4, 0, 14, 0, 64, 2,
- 74, 0, 65, 2, 4, 0, 66, 2, 0, 0, 94, 0, 75, 0, 68, 0, 22, 0, 32, 0, 34, 0, 75, 0, 68, 0, 15, 2, 14, 0, 67, 2,
- 14, 0, 28, 2, 73, 0, 68, 2, 27, 0, 69, 2, 27, 0, 70, 2, 27, 0, 71, 2, 31, 0, 80, 0, 76, 0, 72, 2, 33, 0, 73, 2,
- 63, 0, 30, 2, 14, 0, 74, 2, 7, 0, 77, 1, 7, 0,176, 0, 7, 0, 78, 1, 2, 0, 16, 0, 2, 0,178, 0, 2, 0, 75, 2,
- 2, 0, 76, 2, 7, 0, 77, 2, 7, 0, 78, 2, 4, 0, 79, 2, 2, 0, 27, 0, 2, 0, 32, 2, 2, 0, 18, 0, 2, 0, 80, 2,
- 7, 0, 81, 2, 7, 0, 82, 2, 7, 0, 83, 2, 2, 0, 50, 2, 2, 0, 51, 2, 2, 0, 84, 2, 2, 0, 85, 2, 4, 0, 86, 2,
- 11, 0, 87, 2, 2, 0, 22, 0, 2, 0, 97, 0, 2, 0, 66, 0, 2, 0, 88, 2, 7, 0, 89, 2, 7, 0, 90, 2, 7, 0, 91, 2,
- 7, 0, 92, 2, 7, 0, 93, 2, 7, 0, 94, 2, 7, 0, 95, 2, 7, 0, 96, 2, 7, 0, 97, 2, 7, 0, 98, 2, 0, 0, 99, 2,
- 77, 0,100, 2, 78, 0,101, 2, 0, 0,102, 2, 65, 0,103, 2, 65, 0,104, 2, 65, 0,105, 2, 65, 0,106, 2, 4, 0,107, 2,
- 7, 0,108, 2, 4, 0,109, 2, 4, 0,110, 2, 72, 0,111, 2, 4, 0,112, 2, 4, 0,113, 2, 71, 0,114, 2, 71, 0,115, 2,
- 79, 0, 47, 0, 22, 0, 32, 0, 34, 0, 75, 0, 68, 0, 15, 2, 31, 0, 80, 0, 33, 0, 73, 2, 63, 0, 30, 2, 80, 0,116, 2,
- 81, 0,117, 2, 82, 0,118, 2, 83, 0,119, 2, 84, 0,120, 2, 85, 0,121, 2, 86, 0,122, 2, 87, 0,123, 2, 88, 0,124, 2,
- 89, 0,125, 2, 90, 0,126, 2, 91, 0,127, 2, 92, 0,128, 2, 79, 0,129, 2, 93, 0,130, 2, 94, 0,131, 2, 95, 0,132, 2,
- 95, 0,133, 2, 95, 0,134, 2, 95, 0,135, 2, 95, 0,136, 2, 4, 0, 53, 0, 4, 0,137, 2, 4, 0,138, 2, 4, 0,139, 2,
- 4, 0,140, 2, 4, 0,141, 2, 4, 0,142, 2, 7, 0, 77, 1, 7, 0,176, 0, 7, 0, 78, 1, 2, 0,178, 0, 2, 0, 75, 2,
- 2, 0,143, 2, 2, 0, 18, 0, 2, 0,144, 2, 2, 0,145, 2, 0, 0,146, 2, 0, 0,147, 2, 2, 0, 32, 2, 96, 0,148, 2,
- 87, 0, 8, 0, 11, 0,149, 2, 7, 0,150, 2, 4, 0,151, 2, 0, 0, 18, 0, 0, 0,152, 2, 2, 0, 87, 1, 2, 0,153, 2,
- 2, 0,154, 2, 85, 0, 7, 0, 4, 0,155, 2, 4, 0,156, 2, 4, 0,157, 2, 4, 0,158, 2, 2, 0, 47, 2, 0, 0,159, 2,
- 0, 0, 18, 0, 89, 0, 5, 0, 4, 0,155, 2, 4, 0,156, 2, 0, 0,160, 2, 0, 0,161, 2, 2, 0, 18, 0, 97, 0, 2, 0,
- 4, 0,162, 2, 7, 0, 39, 2, 90, 0, 3, 0, 97, 0,163, 2, 4, 0,164, 2, 4, 0, 18, 0, 88, 0, 4, 0, 7, 0,165, 2,
- 2, 0,166, 2, 0, 0, 18, 0, 0, 0,161, 2, 91, 0, 4, 0, 0, 0,240, 0, 0, 0,185, 0, 0, 0,186, 0, 0, 0,187, 0,
- 80, 0, 5, 0, 4, 0,167, 2, 4, 0,141, 2, 2, 0, 47, 2, 0, 0, 18, 0, 0, 0, 27, 0, 82, 0, 2, 0, 4, 0,168, 2,
- 4, 0,169, 2, 81, 0, 6, 0, 42, 0,149, 2, 0, 0, 18, 0, 0, 0,152, 2, 2, 0, 87, 1, 2, 0,153, 2, 2, 0,154, 2,
- 83, 0, 2, 0, 7, 0,170, 2, 4, 0, 18, 0, 84, 0, 4, 0, 0, 0,185, 0, 0, 0,186, 0, 0, 0,187, 0, 0, 0,240, 0,
- 92, 0, 1, 0, 7, 0,171, 2, 93, 0, 2, 0, 4, 0, 13, 2, 4, 0, 16, 0, 86, 0, 7, 0, 7, 0,150, 2, 42, 0,149, 2,
- 0, 0, 18, 0, 0, 0,152, 2, 2, 0, 87, 1, 2, 0,153, 2, 2, 0,154, 2, 98, 0, 1, 0, 7, 0,172, 2, 99, 0, 1, 0,
- 4, 0,173, 2,100, 0, 1, 0, 0, 0,174, 2,101, 0, 1, 0, 7, 0,150, 2,102, 0, 1, 0, 7, 0,170, 2,103, 0, 4, 0,
- 4, 0,175, 2, 4, 0,176, 2, 7, 0,177, 2, 4, 0,178, 2,104, 0, 4, 0, 7, 0,240, 0, 7, 0,185, 0, 7, 0,186, 0,
- 7, 0,187, 0,105, 0, 1, 0,104, 0,151, 2,106, 0, 5, 0, 4, 0,179, 2, 4, 0,180, 2, 0, 0, 18, 0, 0, 0, 47, 2,
- 0, 0,181, 2,107, 0, 2, 0, 4, 0,182, 2, 4, 0,180, 2,108, 0, 10, 0,108, 0, 0, 0,108, 0, 1, 0,106, 0,183, 2,
-105, 0,184, 2,107, 0,185, 2, 4, 0, 53, 0, 4, 0,138, 2, 4, 0,137, 2, 4, 0, 27, 0, 88, 0,186, 2, 96, 0, 14, 0,
- 14, 0,187, 2, 88, 0,186, 2, 0, 0,188, 2, 0, 0,189, 2, 0, 0,190, 2, 0, 0,191, 2, 0, 0,192, 2, 0, 0,193, 2,
- 0, 0,194, 2, 0, 0, 18, 0, 95, 0,132, 2, 95, 0,134, 2, 2, 0,195, 2, 0, 0,196, 2,109, 0, 1, 0, 4, 0,173, 2,
-110, 0, 9, 0,110, 0, 0, 0,110, 0, 1, 0, 4, 0, 16, 0, 4, 0, 87, 1, 4, 0,197, 2, 4, 0, 27, 0, 0, 0, 19, 0,
- 41, 0,125, 0, 0, 0,198, 2,111, 0, 6, 0,110, 0,199, 2, 47, 0,200, 2, 27, 0,201, 2, 0, 0,202, 2, 4, 0,203, 2,
- 4, 0,204, 2,112, 0, 7, 0,110, 0,199, 2, 2, 0,205, 2, 2, 0,187, 2, 2, 0,206, 2, 2, 0, 92, 0, 11, 0,207, 2,
- 11, 0,208, 2,113, 0, 5, 0,110, 0,199, 2, 27, 0,168, 0, 0, 0, 19, 0, 7, 0,209, 2, 0, 0, 94, 0,114, 0, 5, 0,
-110, 0,199, 2, 27, 0,168, 0, 0, 0, 19, 0, 2, 0,210, 2, 0, 0,211, 2,115, 0, 5, 0,110, 0,199, 2, 7, 0, 89, 0,
- 7, 0,212, 2, 4, 0,213, 2, 4, 0,214, 2,116, 0, 5, 0,110, 0,199, 2, 27, 0,215, 2, 0, 0, 70, 0, 4, 0, 87, 1,
- 4, 0, 18, 0,117, 0, 13, 0,110, 0,199, 2, 27, 0,216, 2, 27, 0,217, 2, 27, 0,218, 2, 27, 0,219, 2, 7, 0,220, 2,
- 7, 0,221, 2, 7, 0,212, 2, 7, 0,222, 2, 4, 0,223, 2, 4, 0,224, 2, 4, 0, 92, 0, 4, 0,225, 2,118, 0, 5, 0,
-110, 0,199, 2, 2, 0,226, 2, 2, 0, 18, 0, 7, 0,227, 2, 27, 0,228, 2,119, 0, 3, 0,110, 0,199, 2, 7, 0,229, 2,
- 4, 0, 92, 0,120, 0, 10, 0,110, 0,199, 2, 7, 0,230, 2, 4, 0,231, 2, 4, 0, 27, 0, 2, 0, 92, 0, 2, 0,232, 2,
- 2, 0,233, 2, 2, 0,234, 2, 7, 0,235, 2, 0, 0,236, 2,121, 0, 3, 0,110, 0,199, 2, 7, 0, 27, 0, 4, 0, 16, 0,
-122, 0, 6, 0,110, 0,199, 2,123, 0,237, 2,124, 0,238, 2,125, 0,239, 2, 7, 0,240, 2, 4, 0, 16, 0,126, 0, 11, 0,
-110, 0,199, 2, 47, 0,200, 2, 27, 0,201, 2, 0, 0,202, 2, 4, 0,203, 2, 4, 0,204, 2, 7, 0,209, 2, 4, 0,241, 2,
- 0, 0,236, 2, 7, 0,242, 2, 4, 0, 27, 0,127, 0, 12, 0,110, 0,199, 2, 27, 0,243, 2, 42, 0,244, 2, 4, 0, 92, 0,
- 4, 0,245, 2, 7, 0,246, 2, 7, 0,247, 2, 7, 0,248, 2, 7, 0,249, 2, 0, 0,202, 2, 4, 0,203, 2, 4, 0, 27, 0,
-128, 0, 3, 0,110, 0,199, 2, 7, 0,250, 2, 4, 0,251, 2,129, 0, 5, 0,110, 0,199, 2, 7, 0,252, 2, 0, 0,236, 2,
- 2, 0, 18, 0, 2, 0,253, 2,130, 0, 8, 0,110, 0,199, 2, 27, 0,168, 0, 7, 0,252, 2, 7, 0,255, 0, 7, 0,108, 0,
- 0, 0,236, 2, 2, 0, 18, 0, 2, 0, 16, 0,131, 0, 21, 0,110, 0,199, 2, 47, 0,200, 2, 27, 0,201, 2, 0, 0,202, 2,
- 4, 0,203, 2, 4, 0,204, 2, 27, 0,254, 2, 0, 0,236, 2, 2, 0, 18, 0, 2, 0, 27, 0, 7, 0,255, 2, 7, 0, 0, 3,
- 7, 0, 1, 3, 7, 0, 81, 2, 7, 0, 2, 3, 7, 0, 3, 3, 7, 0, 4, 3, 7, 0, 5, 3, 7, 0, 6, 3, 7, 0, 7, 3,
- 7, 0, 91, 0,132, 0, 7, 0,110, 0,199, 2, 2, 0, 8, 3, 2, 0, 9, 3, 4, 0, 30, 0, 27, 0,168, 0, 7, 0, 10, 3,
- 0, 0,236, 2,133, 0, 10, 0,110, 0,199, 2, 27, 0,168, 0, 0, 0, 11, 3, 7, 0, 12, 3, 7, 0, 13, 3, 7, 0, 5, 3,
- 4, 0, 14, 3, 4, 0, 15, 3, 7, 0, 16, 3, 0, 0, 19, 0,134, 0, 1, 0,110, 0,199, 2,135, 0, 7, 0,110, 0,199, 2,
- 41, 0,125, 0,136, 0, 17, 3,137, 0, 18, 3,138, 0, 19, 3,139, 0, 20, 3, 14, 0, 21, 3,140, 0, 13, 0,110, 0,199, 2,
- 88, 0, 22, 3, 88, 0, 23, 3, 88, 0, 24, 3, 88, 0, 25, 3, 88, 0, 26, 3, 88, 0, 27, 3, 85, 0, 28, 3, 4, 0, 29, 3,
- 4, 0, 30, 3, 7, 0, 31, 3, 7, 0, 32, 3,141, 0, 33, 3,142, 0, 7, 0,110, 0,199, 2, 88, 0, 22, 3, 88, 0, 34, 3,
-143, 0, 35, 3,144, 0, 33, 3, 4, 0, 36, 3, 4, 0, 29, 3,145, 0, 4, 0,110, 0,199, 2, 27, 0,168, 0, 4, 0, 37, 3,
- 4, 0, 27, 0,146, 0, 2, 0, 4, 0, 38, 3, 7, 0, 39, 2,147, 0, 2, 0, 4, 0,128, 0, 4, 0, 39, 3,148, 0, 24, 0,
-110, 0,199, 2, 27, 0,168, 0, 0, 0,236, 2, 2, 0, 40, 3, 2, 0, 18, 0, 2, 0, 87, 1, 2, 0, 27, 0,146, 0, 41, 3,
- 4, 0, 42, 3, 7, 0, 43, 3, 4, 0, 53, 0, 4, 0, 44, 3,147, 0, 45, 3,146, 0, 46, 3, 4, 0, 47, 3, 4, 0, 48, 3,
- 4, 0, 49, 3, 4, 0, 39, 3, 7, 0, 50, 3, 7, 0, 51, 3, 7, 0, 52, 3, 7, 0, 53, 3, 7, 0, 54, 3, 11, 0, 55, 3,
-149, 0, 8, 0,110, 0,199, 2,150, 0, 56, 3,143, 0, 35, 3, 4, 0, 57, 3, 4, 0, 58, 3, 4, 0, 59, 3, 2, 0, 18, 0,
- 2, 0, 56, 0,151, 0, 8, 0,110, 0,199, 2, 27, 0, 44, 0, 2, 0, 3, 1, 2, 0, 18, 0, 2, 0,226, 2, 2, 0, 56, 0,
- 7, 0, 60, 3, 7, 0, 61, 3,152, 0, 6, 0,110, 0,199, 2, 4, 0, 62, 3, 2, 0, 18, 0, 2, 0, 63, 3, 7, 0, 64, 3,
- 0, 0,170, 0,153, 0, 8, 0,110, 0,199, 2, 0, 0, 65, 3, 0, 0, 66, 3, 0, 0,193, 2, 0, 0, 67, 3, 0, 0, 68, 3,
- 0, 0, 92, 0, 0, 0,181, 2,154, 0, 3, 0,110, 0,199, 2,155, 0, 69, 3,139, 0, 20, 3,156, 0, 10, 0,110, 0,199, 2,
- 27, 0, 70, 3, 27, 0, 71, 3, 0, 0, 72, 3, 7, 0, 73, 3, 2, 0, 74, 3, 2, 0, 75, 3, 0, 0, 76, 3, 0, 0, 77, 3,
- 0, 0,211, 2,157, 0, 9, 0,110, 0,199, 2, 27, 0, 78, 3, 0, 0, 72, 3, 7, 0, 79, 3, 7, 0, 80, 3, 0, 0, 87, 1,
- 0, 0,226, 2, 0, 0, 81, 3, 0, 0, 27, 0,158, 0, 1, 0,110, 0,199, 2,159, 0, 11, 0,110, 0,199, 2, 0, 0,236, 2,
- 7, 0,128, 0, 7, 0, 82, 3, 7, 0, 83, 3, 7, 0, 84, 3, 7, 0, 85, 3, 7, 0, 86, 3, 4, 0, 18, 0, 2, 0, 87, 3,
- 2, 0, 88, 3,160, 0, 9, 0,110, 0,199, 2, 27, 0, 89, 3, 4, 0, 90, 3, 4, 0, 91, 3, 4, 0, 92, 3, 7, 0, 93, 3,
- 7, 0, 94, 3, 2, 0,226, 2, 2, 0, 18, 0,161, 0, 29, 0,110, 0,199, 2,162, 0, 95, 3,163, 0, 96, 3, 4, 0, 97, 3,
- 4, 0, 98, 3, 7, 0, 99, 3, 7, 0, 4, 3, 7, 0,100, 3, 7, 0,250, 0, 7, 0,101, 3, 7, 0,102, 3, 7, 0,103, 3,
- 7, 0,104, 3, 7, 0,105, 3, 7, 0,240, 2, 4, 0,106, 3, 4, 0,107, 3, 0, 0,108, 3, 0, 0,109, 3, 0, 0,110, 3,
- 0, 0,111, 3, 0, 0, 18, 0, 0, 0,112, 3, 2, 0,113, 3, 2, 0,114, 3, 4, 0,214, 2, 7, 0,108, 0, 7, 0,115, 3,
- 4, 0, 27, 0,164, 0, 15, 0,110, 0,199, 2, 47, 0,200, 2, 27, 0,201, 2, 0, 0,202, 2, 4, 0,203, 2, 4, 0,204, 2,
- 27, 0,116, 3, 27, 0,117, 3, 54, 0,100, 1, 0, 0,236, 2, 7, 0,209, 2, 7, 0,118, 3, 0, 0, 18, 0, 0, 0,253, 0,
- 0, 0,211, 2,165, 0, 16, 0,110, 0,199, 2, 0, 0,236, 2, 2, 0,119, 3, 2, 0,253, 0, 7, 0,120, 3, 54, 0,121, 3,
- 7, 0,122, 3, 7, 0,123, 3, 7, 0,124, 3, 0, 0,125, 3, 4, 0,126, 3, 47, 0,127, 3, 27, 0,128, 3, 4, 0,129, 3,
- 0, 0,130, 3, 4, 0,131, 3,166, 0, 16, 0,110, 0,199, 2, 0, 0,132, 3, 0, 0,133, 3, 7, 0,134, 3, 7, 0,135, 3,
- 0, 0,136, 3, 0, 0,137, 3, 0, 0,138, 3, 7, 0,124, 3, 0, 0,125, 3, 4, 0,126, 3, 47, 0,127, 3, 27, 0,128, 3,
- 4, 0,129, 3, 0, 0,130, 3, 4, 0,131, 3,167, 0, 16, 0,110, 0,199, 2, 0, 0,236, 2, 4, 0,139, 3, 4, 0,140, 3,
- 27, 0,141, 3, 7, 0,124, 3, 0, 0,125, 3, 4, 0,126, 3, 47, 0,127, 3, 27, 0,128, 3, 4, 0,129, 3, 0, 0,130, 3,
- 7, 0,142, 3, 7, 0,143, 3, 2, 0,253, 0, 2, 0,144, 3,168, 0, 5, 0,110, 0,199, 2,169, 0,145, 3,170, 0,146, 3,
- 4, 0, 16, 0, 4, 0, 27, 0,171, 0, 8, 0,110, 0,199, 2, 7, 0,147, 3, 7, 0,148, 3, 7, 0,149, 3, 0, 0,250, 0,
- 0, 0, 18, 0, 0, 0, 87, 1, 0, 0, 27, 0,172, 0, 3, 0,173, 0,150, 3, 4, 0, 66, 2, 0, 0, 94, 0,173, 0, 29, 0,
- 22, 0, 32, 0, 34, 0, 75, 0, 2, 0, 48, 2, 2, 0, 49, 2, 2, 0,151, 3, 2, 0, 18, 0, 2, 0,152, 3, 2, 0,153, 3,
- 2, 0,154, 3, 2, 0, 30, 0, 0, 0,155, 3, 0, 0,156, 3, 0, 0,157, 3, 0, 0, 74, 0, 4, 0, 27, 0, 7, 0,158, 3,
- 7, 0,159, 3, 7, 0,160, 3, 7, 0,161, 3, 7, 0,162, 3, 7, 0,163, 3, 29, 0,164, 3, 31, 0, 80, 0, 33, 0, 73, 2,
- 90, 0,126, 2, 0, 0, 70, 0, 7, 0,165, 3, 7, 0,166, 3,172, 0,167, 3,174, 0, 5, 0,174, 0, 0, 0,174, 0, 1, 0,
- 0, 0, 19, 0, 0, 0, 18, 0, 0, 0,124, 0, 68, 0, 3, 0, 7, 0,168, 3, 4, 0, 18, 0, 4, 0, 27, 0, 27, 0,128, 0,
- 22, 0, 32, 0, 34, 0, 75, 0,175, 0,169, 3, 2, 0, 16, 0, 2, 0,170, 3, 4, 0,171, 3, 4, 0,172, 3, 4, 0,173, 3,
- 0, 0,174, 3, 27, 0, 38, 0, 27, 0,175, 3, 27, 0,176, 3, 27, 0,177, 3, 27, 0,178, 3, 31, 0, 80, 0, 68, 0, 15, 2,
-176, 0,179, 3,176, 0,180, 3,177, 0,181, 3, 11, 0, 2, 0,178, 0,182, 3,179, 0,183, 3,180, 0,184, 3, 14, 0,185, 3,
- 14, 0,186, 3, 14, 0, 28, 2, 14, 0,187, 3, 14, 0,188, 3, 4, 0, 87, 1, 4, 0,189, 3, 63, 0, 30, 2, 0, 0,190, 3,
- 4, 0, 32, 2, 4, 0,191, 3, 7, 0, 77, 1, 7, 0,192, 3, 7, 0,193, 3, 7, 0,176, 0, 7, 0,194, 3, 7, 0,195, 3,
- 7, 0, 78, 1, 7, 0,196, 3, 7, 0, 18, 2, 7, 0,197, 3, 7, 0,198, 3, 7, 0,199, 3, 7, 0,200, 3, 7, 0,201, 3,
- 7, 0,202, 3, 7, 0, 12, 3, 7, 0,203, 3, 7, 0,244, 0, 7, 0,204, 3, 4, 0,205, 3, 4, 0,206, 3, 2, 0, 18, 0,
- 2, 0,207, 3, 2, 0,208, 3, 2, 0,209, 3, 2, 0,210, 3, 2, 0,211, 3, 2, 0,212, 3, 2, 0,213, 3, 2, 0,214, 3,
- 0, 0,215, 3, 0, 0,216, 3, 4, 0,217, 3, 4, 0,218, 3, 4, 0,219, 3, 4, 0,220, 3, 7, 0,221, 3, 7, 0,108, 2,
- 7, 0,222, 3, 7, 0,223, 3, 7, 0,224, 3, 7, 0,225, 3, 7, 0,226, 3, 7, 0,220, 0, 7, 0,227, 3, 7, 0,228, 3,
- 7, 0,229, 3, 7, 0,230, 3, 7, 0,231, 3, 2, 0,232, 3, 0, 0,233, 3, 0, 0,234, 3, 0, 0,235, 3, 0, 0,236, 3,
- 0, 0,110, 0, 0, 0,237, 3, 7, 0,238, 3, 7, 0,239, 3, 14, 0,240, 3, 14, 0,241, 3, 14, 0,242, 3, 14, 0,243, 3,
- 7, 0,244, 3, 2, 0, 13, 2, 2, 0,245, 3, 7, 0,151, 2, 4, 0,246, 3, 4, 0,247, 3,181, 0,248, 3, 2, 0,249, 3,
- 2, 0,251, 0, 7, 0,250, 3, 14, 0,251, 3, 14, 0,252, 3, 14, 0,253, 3, 14, 0,254, 3,182, 0, 73, 1,183, 0,255, 3,
- 64, 0, 0, 4, 0, 0, 1, 4, 0, 0, 2, 4, 2, 0, 66, 2, 7, 0,143, 2,155, 0, 3, 4,143, 0, 4, 4,143, 0, 5, 4,
- 10, 0, 6, 4, 10, 0, 7, 4, 4, 0, 8, 4, 4, 0, 9, 4, 14, 0, 10, 4, 14, 0, 11, 4, 14, 0, 12, 4, 7, 0, 13, 4,
-184, 0, 14, 0,184, 0, 0, 0,184, 0, 1, 0, 27, 0, 38, 0, 7, 0, 12, 3, 7, 0, 79, 1, 7, 0, 13, 3, 7, 0, 5, 3,
- 0, 0, 19, 0, 4, 0, 14, 3, 4, 0, 15, 3, 4, 0, 14, 4, 2, 0, 16, 0, 2, 0, 15, 4, 7, 0, 16, 3,185, 0, 12, 0,
-185, 0, 0, 0,185, 0, 1, 0, 27, 0, 44, 0, 4, 0, 16, 4, 4, 0, 13, 2, 7, 0, 79, 1, 7, 0, 17, 4, 7, 0, 18, 4,
- 7, 0,170, 2, 2, 0, 16, 0, 0, 0, 19, 4, 0, 0, 20, 4,182, 0, 40, 0, 4, 0, 18, 0, 2, 0, 21, 4, 2, 0, 22, 4,
- 2, 0, 5, 3, 2, 0, 23, 4, 2, 0, 24, 4, 2, 0, 25, 4, 2, 0, 26, 4, 2, 0, 27, 4, 7, 0, 28, 4, 7, 0, 29, 4,
- 7, 0, 30, 4, 7, 0, 31, 4, 7, 0, 32, 4, 7, 0, 33, 4, 7, 0, 34, 4, 7, 0, 35, 4, 7, 0, 36, 4, 7, 0, 37, 4,
- 7, 0, 38, 4, 7, 0, 39, 4, 7, 0, 40, 4, 7, 0, 41, 4, 7, 0, 42, 4, 7, 0, 43, 4, 7, 0, 44, 4, 7, 0, 45, 4,
- 7, 0, 46, 4, 7, 0, 47, 4, 7, 0, 48, 4, 7, 0, 49, 4, 7, 0, 50, 4, 7, 0, 51, 4, 7, 0, 52, 4, 7, 0, 53, 4,
- 7, 0, 54, 4, 47, 0,169, 0,186, 0, 55, 4, 7, 0, 56, 4, 4, 0,214, 2,187, 0, 5, 0, 64, 0,249, 1, 7, 0, 57, 4,
- 7, 0, 58, 4, 2, 0, 18, 0, 2, 0, 59, 4,188, 0, 5, 0,188, 0, 0, 0,188, 0, 1, 0, 4, 0, 16, 0, 4, 0, 60, 4,
- 11, 0, 2, 0,189, 0, 9, 0,189, 0, 0, 0,189, 0, 1, 0, 4, 0, 61, 4, 4, 0, 62, 4, 4, 0, 63, 4, 4, 0, 18, 0,
- 11, 0, 64, 4, 11, 0, 65, 4, 14, 0, 66, 4,139, 0, 23, 0,139, 0, 0, 0,139, 0, 1, 0, 4, 0, 18, 0, 4, 0, 67, 4,
- 4, 0, 68, 4, 4, 0, 69, 4, 4, 0, 70, 4, 4, 0, 71, 4, 4, 0, 72, 4, 4, 0, 73, 4, 4, 0, 27, 0, 4, 0, 62, 4,
- 4, 0, 13, 2, 2, 0, 74, 4, 2, 0, 56, 0, 0, 0, 19, 0, 0, 0, 75, 4, 0, 0, 76, 4, 0, 0, 77, 4, 0, 0, 78, 4,
- 14, 0, 79, 4,190, 0, 80, 4, 11, 0, 81, 4,191, 0, 1, 0, 7, 0, 46, 2,181, 0, 30, 0, 4, 0, 18, 0, 7, 0, 82, 4,
- 7, 0, 83, 4, 7, 0, 84, 4, 4, 0, 85, 4, 4, 0, 86, 4, 4, 0, 87, 4, 4, 0, 88, 4, 7, 0, 89, 4, 7, 0, 90, 4,
- 7, 0, 91, 4, 7, 0, 92, 4, 7, 0, 93, 4, 7, 0, 94, 4, 7, 0, 95, 4, 7, 0, 96, 4, 7, 0, 97, 4, 7, 0, 98, 4,
- 7, 0, 99, 4, 7, 0,100, 4, 7, 0,101, 4, 7, 0,102, 4, 7, 0,103, 4, 7, 0,104, 4, 7, 0,105, 4, 7, 0,106, 4,
- 4, 0,107, 4, 4, 0,108, 4, 7, 0,109, 4, 7, 0,227, 3,183, 0, 54, 0, 4, 0, 62, 4, 4, 0,110, 4,192, 0,111, 4,
-193, 0,112, 4, 0, 0, 27, 0, 0, 0,113, 4, 2, 0,114, 4, 7, 0,115, 4, 0, 0,116, 4, 7, 0,117, 4, 7, 0,118, 4,
- 7, 0,119, 4, 7, 0,120, 4, 7, 0,121, 4, 7, 0,122, 4, 7, 0,123, 4, 7, 0,124, 4, 7, 0,125, 4, 2, 0,126, 4,
- 0, 0,127, 4, 2, 0,128, 4, 7, 0,129, 4, 7, 0,130, 4, 0, 0,131, 4, 4, 0,129, 0, 4, 0,132, 4, 4, 0,133, 4,
- 2, 0,134, 4, 2, 0,135, 4,191, 0,136, 4, 4, 0,137, 4, 4, 0, 82, 0, 7, 0,138, 4, 7, 0,139, 4, 7, 0,140, 4,
- 7, 0,141, 4, 2, 0,142, 4, 2, 0,143, 4, 2, 0,144, 4, 2, 0,145, 4, 2, 0,146, 4, 2, 0,147, 4, 2, 0,148, 4,
- 2, 0,149, 4,194, 0,150, 4, 7, 0,151, 4, 7, 0,152, 4,139, 0,153, 4, 14, 0, 21, 3,187, 0,154, 4, 7, 0,155, 4,
- 7, 0,156, 4, 7, 0,157, 4, 4, 0,158, 4,195, 0, 1, 0, 7, 0,159, 4,155, 0, 52, 0,154, 0,160, 4, 2, 0, 16, 0,
- 2, 0,161, 4, 2, 0,162, 4, 2, 0,163, 4, 7, 0,164, 4, 2, 0,165, 4, 2, 0,166, 4, 7, 0,167, 4, 2, 0,168, 4,
- 2, 0,169, 4, 7, 0,170, 4, 7, 0,171, 4, 7, 0,172, 4, 4, 0,173, 4, 4, 0,174, 4, 4, 0,175, 4, 4, 0, 27, 0,
- 7, 0,176, 4, 4, 0,177, 4, 7, 0,178, 4, 7, 0,179, 4, 7, 0,180, 4, 79, 0,181, 4, 79, 0,182, 4, 0, 0,183, 4,
- 7, 0,184, 4, 7, 0,185, 4, 31, 0, 80, 0, 2, 0,186, 4, 0, 0,187, 4, 0, 0,188, 4, 7, 0,189, 4, 4, 0,190, 4,
- 7, 0,191, 4, 7, 0,192, 4, 4, 0,193, 4, 4, 0, 18, 0, 7, 0,194, 4, 7, 0,195, 4, 7, 0,196, 4,195, 0,197, 4,
- 4, 0, 53, 0, 7, 0,198, 4, 7, 0,199, 4, 7, 0,200, 4, 7, 0,201, 4, 7, 0,202, 4, 7, 0,203, 4, 7, 0,204, 4,
- 4, 0,205, 4, 7, 0,206, 4,196, 0, 78, 0, 22, 0, 32, 0, 34, 0, 75, 0, 2, 0,179, 0, 2, 0, 88, 1, 2, 0,122, 1,
- 2, 0,207, 4, 7, 0,208, 4, 7, 0,209, 4, 7, 0,210, 4, 7, 0,211, 4, 7, 0,212, 4, 7, 0,213, 4, 7, 0,170, 1,
- 7, 0,172, 1, 7, 0,171, 1, 7, 0, 30, 0, 4, 0,214, 4, 7, 0,215, 4, 7, 0,216, 4, 7, 0,217, 4, 7, 0,218, 4,
- 7, 0,219, 4, 7, 0,220, 4, 7, 0,221, 4, 2, 0,222, 4, 2, 0, 87, 1, 2, 0,223, 4, 2, 0,224, 4, 2, 0,225, 4,
- 2, 0,226, 4, 2, 0,227, 4, 2, 0,228, 4, 7, 0,229, 4, 7, 0,230, 4, 7, 0,231, 4, 7, 0,232, 4, 7, 0,233, 4,
- 7, 0,234, 4, 7, 0,235, 4, 7, 0,236, 4, 7, 0,237, 4, 7, 0,238, 4, 7, 0,239, 4, 7, 0,240, 4, 2, 0,241, 4,
- 2, 0,242, 4, 2, 0,243, 4, 2, 0,244, 4, 7, 0,245, 4, 7, 0,246, 4, 7, 0,247, 4, 7, 0,248, 4, 2, 0,249, 4,
- 2, 0,250, 4, 2, 0,251, 4, 2, 0,252, 4, 7, 0,253, 4, 7, 0,254, 4, 7, 0,255, 4, 7, 0, 0, 5, 7, 0, 1, 5,
- 7, 0, 2, 5, 7, 0, 3, 5, 2, 0, 4, 5, 2, 0, 5, 5, 2, 0, 6, 5, 2, 0, 7, 5, 2, 0, 8, 5, 2, 0, 18, 0,
- 7, 0, 9, 5, 7, 0, 10, 5, 31, 0, 80, 0, 46, 0,140, 1, 2, 0,141, 1, 2, 0, 76, 1, 2, 0,181, 2, 25, 0,154, 0,
- 57, 0, 70, 1,197, 0, 8, 0,197, 0, 0, 0,197, 0, 1, 0, 4, 0,205, 3, 4, 0, 11, 5, 4, 0, 18, 0, 2, 0, 12, 5,
- 2, 0, 13, 5, 27, 0,168, 0,198, 0, 13, 0, 11, 0, 14, 5, 11, 0, 15, 5, 4, 0, 16, 5, 4, 0, 17, 5, 4, 0, 18, 5,
- 4, 0, 19, 5, 4, 0, 20, 5, 4, 0, 21, 5, 4, 0, 22, 5, 4, 0, 23, 5, 4, 0, 24, 5, 4, 0, 27, 0, 0, 0, 25, 5,
-199, 0, 5, 0, 11, 0, 26, 5, 11, 0, 27, 5, 4, 0, 28, 5, 4, 0, 30, 0, 0, 0, 29, 5,200, 0, 17, 0, 4, 0, 30, 5,
- 4, 0, 31, 5, 4, 0, 32, 5, 4, 0, 33, 5, 4, 0, 34, 5, 4, 0, 35, 5, 4, 0, 36, 5, 4, 0, 37, 5, 4, 0, 38, 5,
- 4, 0, 39, 5, 4, 0, 40, 5, 4, 0, 41, 5, 2, 0, 42, 5, 2, 0, 43, 5, 4, 0, 44, 5, 4, 0, 45, 5, 4, 0, 91, 0,
-201, 0, 17, 0, 4, 0, 16, 0, 4, 0, 32, 5, 4, 0, 46, 5, 4, 0, 47, 5, 4, 0, 48, 5, 4, 0, 49, 5, 4, 0, 50, 5,
- 4, 0, 51, 5, 7, 0, 52, 5, 4, 0, 53, 5, 4, 0, 92, 0, 4, 0, 54, 5, 4, 0, 55, 5, 4, 0, 56, 5, 4, 0, 57, 5,
- 4, 0, 58, 5, 21, 0, 31, 0,202, 0, 9, 0, 4, 0, 59, 5, 7, 0, 60, 5, 7, 0, 61, 5, 7, 0, 62, 5, 4, 0, 63, 5,
- 2, 0, 18, 0, 2, 0, 27, 0, 7, 0, 84, 4, 7, 0, 30, 0,203, 0, 11, 0,203, 0, 0, 0,203, 0, 1, 0, 0, 0, 19, 0,
- 63, 0, 64, 5, 64, 0, 65, 5, 4, 0,205, 3, 4, 0, 66, 5, 4, 0, 67, 5, 4, 0, 27, 0, 4, 0, 68, 5, 4, 0, 69, 5,
-204, 0, 13, 0, 0, 0, 70, 5, 0, 0,250, 0, 0, 0, 71, 5, 0, 0, 18, 0, 0, 0, 72, 5, 0, 0, 73, 5, 0, 0, 74, 5,
- 0, 0, 75, 5, 2, 0, 76, 5, 2, 0, 77, 5, 7, 0, 78, 5, 0, 0, 79, 5, 0, 0,124, 0,205, 0,106, 0,204, 0, 80, 5,
-198, 0, 81, 5,199, 0, 82, 5,200, 0, 83, 5,201, 0, 84, 5, 4, 0, 36, 3, 4, 0,129, 0, 4, 0,132, 4, 7, 0, 85, 5,
- 4, 0, 86, 5, 4, 0, 87, 5, 4, 0, 88, 5, 4, 0, 89, 5, 2, 0, 18, 0, 2, 0, 90, 5, 7, 0, 91, 5, 7, 0, 92, 5,
- 7, 0, 93, 5, 7, 0, 94, 5, 7, 0, 95, 5, 2, 0, 96, 5, 2, 0, 97, 5, 2, 0, 98, 5, 2, 0, 99, 5, 2, 0,250, 0,
- 2, 0,100, 5, 4, 0,101, 5, 2, 0,102, 5, 2, 0,103, 5, 2, 0,109, 1, 2, 0,108, 0, 2, 0,104, 5, 2, 0,105, 5,
- 2, 0,106, 5, 2, 0,107, 5, 2, 0,108, 5, 2, 0, 71, 5, 2, 0, 70, 5, 2, 0,109, 5, 2, 0, 72, 5, 2, 0,110, 5,
- 4, 0,111, 5, 4, 0, 87, 1, 4, 0,112, 5, 2, 0,113, 5, 2, 0, 91, 0, 2, 0,114, 5, 2, 0,115, 5, 2, 0,116, 5,
- 2, 0,117, 5, 2, 0,118, 5, 2, 0,119, 5, 19, 0,120, 5, 19, 0,121, 5, 18, 0,122, 5, 14, 0,123, 5, 2, 0,124, 5,
- 2, 0,125, 5, 7, 0,126, 5, 7, 0,127, 5, 7, 0,128, 5, 7, 0,129, 5, 4, 0,130, 5, 7, 0,131, 5, 7, 0,132, 5,
- 7, 0,133, 5, 7, 0,134, 5, 2, 0,135, 5, 2, 0,136, 5, 2, 0,137, 5, 2, 0,138, 5, 2, 0,139, 5, 2, 0,140, 5,
- 7, 0,141, 5, 7, 0,142, 5, 7, 0,143, 5, 0, 0,144, 5, 4, 0,145, 5, 2, 0,146, 5, 2, 0, 74, 0, 0, 0,147, 5,
- 7, 0,148, 5, 7, 0,149, 5, 0, 0,150, 5, 0, 0,151, 5, 0, 0,152, 5, 0, 0,153, 5, 4, 0,154, 5, 2, 0,155, 5,
- 2, 0,156, 5, 7, 0,157, 5, 7, 0,158, 5, 2, 0,159, 5, 2, 0,160, 5, 7, 0,161, 5, 2, 0,162, 5, 2, 0,163, 5,
- 4, 0,164, 5, 2, 0,165, 5, 2, 0,166, 5, 2, 0,167, 5, 2, 0,168, 5, 7, 0,169, 5, 7, 0, 30, 0, 37, 0,170, 5,
- 0, 0,171, 5,206, 0, 9, 0,206, 0, 0, 0,206, 0, 1, 0, 0, 0,172, 5, 2, 0,173, 5, 2, 0,174, 5, 2, 0,175, 5,
- 2, 0, 91, 0, 7, 0,176, 5, 7, 0, 30, 0,207, 0, 7, 0, 2, 0,231, 2, 2, 0, 87, 1, 2, 0, 94, 3, 2, 0,177, 5,
- 7, 0,178, 5, 7, 0, 30, 0, 37, 0,179, 5,208, 0, 5, 0, 7, 0,180, 5, 0, 0, 16, 0, 0, 0, 91, 0, 0, 0, 30, 0,
- 0, 0, 74, 0,209, 0, 15, 0, 7, 0,181, 5, 7, 0,182, 5, 7, 0,183, 5, 7, 0,184, 5, 7, 0,185, 5, 7, 0,186, 5,
- 7, 0,187, 5, 7, 0,188, 5, 7, 0,189, 5, 7, 0,190, 5, 4, 0,191, 5, 7, 0,192, 5, 7, 0,193, 5, 2, 0, 91, 0,
- 2, 0, 30, 0,210, 0, 32, 0,208, 0,194, 5, 2, 0,195, 5, 2, 0, 97, 5, 2, 0, 98, 5, 2, 0, 99, 5, 2, 0,250, 0,
- 2, 0,100, 5, 2, 0,196, 5, 2, 0,197, 5, 2, 0,198, 5, 2, 0,199, 5,207, 0,200, 5, 2, 0,201, 5, 2, 0,102, 5,
- 7, 0,202, 5,209, 0,203, 5, 7, 0,220, 4, 7, 0,221, 4, 4, 0, 18, 0, 2, 0, 87, 1, 2, 0,204, 5, 2, 0,223, 4,
- 2, 0,224, 4, 2, 0,205, 5, 2, 0, 27, 0, 2, 0,225, 4, 2, 0,226, 4, 2, 0,227, 4, 2, 0,228, 4, 2, 0,206, 5,
- 2, 0, 91, 0, 7, 0,207, 5,211, 0, 6, 0,211, 0, 0, 0,211, 0, 1, 0, 4, 0, 61, 4, 0, 0, 19, 0, 4, 0, 18, 0,
- 27, 0,208, 5,212, 0, 4, 0,213, 0,146, 3, 11, 0,209, 5, 0, 0,210, 5, 4, 0, 92, 0,214, 0, 8, 0,212, 0,211, 5,
- 2, 0, 18, 0, 2, 0, 27, 0, 2, 0,212, 5, 2, 0,213, 5, 2, 0,214, 5, 4, 0, 91, 0, 11, 0,215, 5,215, 0, 6, 0,
- 2, 0,108, 0, 2, 0, 67, 4, 2, 0,216, 5, 2, 0,225, 2, 4, 0, 18, 0, 7, 0,209, 2,216, 0, 14, 0, 2, 0, 18, 0,
- 2, 0,217, 5, 2, 0,218, 5, 2, 0,219, 5,215, 0,220, 5, 11, 0,215, 5, 7, 0,221, 5, 7, 0, 56, 0, 4, 0,222, 5,
- 4, 0,223, 5, 4, 0,224, 5, 4, 0,225, 5, 41, 0,125, 0, 27, 0,168, 0,217, 0, 14, 0,212, 0,211, 5, 4, 0, 92, 0,
- 4, 0,226, 5, 7, 0,227, 5, 7, 0,228, 5, 7, 0,229, 5, 4, 0,230, 5, 4, 0,231, 5, 7, 0,232, 5, 7, 0,233, 5,
- 4, 0,234, 5, 7, 0,235, 5, 7, 0,236, 5, 4, 0, 27, 0,218, 0, 1, 0,212, 0,211, 5,219, 0, 7, 0,212, 0,211, 5,
- 2, 0, 18, 0, 2, 0, 27, 0, 4, 0, 37, 0, 4, 0,237, 5, 90, 0,238, 5, 11, 0,215, 5,220, 0, 5, 0,220, 0, 0, 0,
-220, 0, 1, 0, 0, 0, 19, 0, 7, 0,239, 5, 4, 0, 27, 0,221, 0, 4, 0, 4, 0,108, 0, 7, 0,240, 5, 7, 0,178, 1,
- 4, 0, 18, 0,222, 0, 85, 0,219, 0,241, 5,219, 0,242, 5,217, 0,169, 3,218, 0,243, 5, 7, 0,244, 5, 2, 0,245, 5,
- 2, 0,246, 5, 7, 0,247, 5, 7, 0,248, 5, 2, 0, 67, 4, 2, 0,249, 5, 7, 0,250, 5, 7, 0,251, 5, 7, 0,252, 5,
- 2, 0,253, 5, 2, 0,222, 5, 2, 0,254, 5, 2, 0,255, 5, 2, 0, 0, 6, 2, 0, 1, 6, 7, 0, 2, 6, 7, 0, 3, 6,
- 7, 0, 4, 6, 2, 0, 5, 6, 2, 0, 6, 6, 2, 0, 7, 6, 2, 0, 8, 6, 2, 0, 9, 6, 2, 0, 10, 6, 2, 0, 11, 6,
- 2, 0, 12, 6,214, 0, 13, 6,216, 0, 14, 6, 7, 0, 15, 6, 7, 0, 16, 6, 7, 0, 17, 6, 2, 0, 18, 6, 2, 0, 19, 6,
- 0, 0, 20, 6, 0, 0, 21, 6, 2, 0, 22, 6, 7, 0, 23, 6, 7, 0, 24, 6, 7, 0, 25, 6, 7, 0, 26, 6, 7, 0, 27, 6,
- 7, 0, 28, 6, 7, 0, 29, 6, 7, 0, 30, 6, 7, 0, 31, 6, 7, 0, 32, 6, 2, 0, 33, 6, 0, 0, 34, 6, 0, 0, 35, 6,
- 0, 0, 36, 6, 0, 0, 37, 6, 27, 0, 38, 6, 0, 0, 39, 6, 0, 0, 40, 6, 0, 0, 41, 6, 0, 0, 42, 6, 0, 0, 43, 6,
- 0, 0, 44, 6, 0, 0, 45, 6, 0, 0, 46, 6, 0, 0, 47, 6, 0, 0, 48, 6, 2, 0, 49, 6, 2, 0, 50, 6, 2, 0, 51, 6,
- 2, 0, 52, 6, 0, 0, 53, 6, 0, 0, 54, 6, 0, 0, 55, 6, 0, 0, 56, 6, 4, 0, 57, 6, 4, 0, 58, 6, 4, 0, 59, 6,
- 4, 0, 60, 6, 2, 0, 61, 6, 2, 0, 91, 0, 4, 0, 62, 6, 7, 0, 63, 6, 7, 0, 64, 6,221, 0, 65, 6,223, 0, 8, 0,
- 4, 0, 66, 6, 4, 0, 67, 6, 4, 0, 68, 6, 4, 0, 69, 6, 4, 0, 70, 6, 4, 0, 71, 6, 4, 0, 53, 0, 4, 0,138, 2,
-224, 0, 4, 0, 7, 0, 72, 6, 0, 0, 73, 6, 0, 0, 74, 6, 2, 0, 18, 0,225, 0, 4, 0, 7, 0, 75, 6, 4, 0, 18, 0,
- 4, 0, 76, 6, 4, 0, 56, 0, 41, 0, 46, 0, 22, 0, 32, 0, 34, 0, 75, 0, 27, 0,208, 5,196, 0, 77, 6, 41, 0, 78, 6,
- 14, 0, 79, 6,197, 0, 80, 6, 27, 0, 81, 6, 7, 0, 82, 6, 7, 0, 83, 6, 7, 0, 84, 6, 7, 0, 85, 6, 4, 0,205, 3,
- 4, 0, 86, 6, 4, 0, 87, 6, 2, 0, 18, 0, 2, 0, 76, 1, 57, 0, 70, 1,226, 0, 88, 6,222, 0, 89, 6,227, 0, 90, 6,
-205, 0,185, 0,202, 0, 91, 6, 14, 0,102, 0, 14, 0, 92, 6, 11, 0, 93, 6, 11, 0, 94, 6, 11, 0, 95, 6, 11, 0, 96, 6,
- 11, 0, 97, 6,228, 0, 98, 6, 2, 0, 99, 6, 2, 0,100, 6, 2, 0,251, 0, 2, 0,206, 3, 4, 0,216, 3, 4, 0,101, 6,
- 14, 0,102, 6,208, 0,194, 5,210, 0,103, 6,224, 0,104, 6,178, 0,182, 3,225, 0,105, 6,229, 0,106, 6, 10, 0, 7, 4,
- 10, 0,107, 6,230, 0, 14, 0,230, 0, 0, 0,230, 0, 1, 0, 42, 0,242, 0, 40, 0, 69, 1,229, 0,106, 6,231, 0,108, 6,
- 7, 0, 96, 2, 7, 0, 97, 2, 7, 0,108, 0, 7, 0,109, 6, 2, 0,110, 6, 2, 0, 18, 0, 2, 0,143, 0, 2, 0, 27, 0,
-232, 0, 39, 0, 7, 0,111, 6, 7, 0,112, 6, 7, 0,113, 6, 7, 0,114, 6, 7, 0,115, 6, 7, 0,116, 6, 7, 0,117, 6,
- 7, 0,118, 6, 7, 0,119, 6, 68, 0,120, 6,178, 0,182, 3,232, 0,121, 6,233, 0,122, 6,234, 0,123, 6,235, 0,124, 6,
-236, 0,125, 6,237, 0,126, 6, 7, 0,127, 6, 7, 0,128, 6, 7, 0, 94, 1, 7, 0,129, 6, 7, 0,130, 6, 7, 0,131, 6,
- 7, 0,132, 6, 7, 0,175, 0, 7, 0,133, 6, 0, 0,134, 6, 0, 0,135, 6, 0, 0,110, 6, 0, 0,136, 6, 2, 0,137, 6,
- 2, 0,138, 6, 7, 0,139, 6, 2, 0,140, 6, 2, 0,141, 6, 7, 0,142, 6, 7, 0,143, 6, 7, 0,144, 6, 7, 0,145, 6,
-238, 0, 51, 0,239, 0, 0, 0,239, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6, 2, 0,149, 6, 7, 0,128, 6,
- 7, 0, 94, 1, 7, 0,150, 6, 2, 0,151, 6, 0, 0,211, 2, 4, 0,152, 6, 2, 0,135, 6, 2, 0,110, 6, 27, 0,208, 5,
- 27, 0,153, 6, 14, 0,154, 6,230, 0,155, 6,238, 0,121, 6, 0, 0,156, 6, 4, 0,205, 3, 4, 0, 86, 6, 2, 0,157, 6,
- 2, 0,158, 6, 2, 0,159, 6, 2, 0,160, 6, 2, 0, 18, 0, 2, 0, 31, 2, 7, 0,114, 0, 7, 0,161, 6, 7, 0,162, 6,
- 7, 0,163, 6, 7, 0,175, 0, 7, 0, 82, 6, 2, 0,164, 6, 2, 0,165, 6, 2, 0,166, 6, 0, 0,167, 6, 0, 0,168, 6,
- 0, 0,169, 6, 0, 0,170, 6, 0, 0,171, 6, 14, 0,172, 6, 14, 0,173, 6, 14, 0,174, 6, 2, 0,175, 6, 2, 0,152, 2,
- 2, 0,176, 6, 0, 0,177, 6, 11, 0,178, 6,178, 0,182, 3,240, 0, 24, 0, 19, 0, 37, 0, 19, 0, 63, 0, 18, 0,179, 6,
- 18, 0,180, 6, 18, 0,181, 6, 7, 0,182, 6, 7, 0,183, 6, 7, 0,184, 6, 7, 0,185, 6, 2, 0,186, 6, 2, 0,187, 6,
- 2, 0,188, 6, 2, 0,189, 6, 2, 0,190, 6, 2, 0, 18, 0, 2, 0,191, 6, 2, 0,192, 6, 2, 0,193, 6, 2, 0,194, 6,
- 2, 0,195, 6, 2, 0,160, 6, 7, 0,196, 6, 4, 0,197, 6, 4, 0,198, 6,239, 0, 6, 0,239, 0, 0, 0,239, 0, 1, 0,
- 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6, 2, 0,149, 6,241, 0, 8, 0,239, 0, 0, 0,239, 0, 1, 0, 14, 0,146, 6,
- 4, 0,147, 6, 7, 0,148, 6, 2, 0,149, 6, 0, 0,199, 6, 0, 0,124, 0,242, 0, 14, 0,239, 0, 0, 0,239, 0, 1, 0,
- 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6, 2, 0,149, 6,240, 0,200, 6,243, 0,201, 6, 14, 0,202, 6, 2, 0, 87, 1,
- 2, 0,203, 6, 4, 0, 18, 0, 7, 0,204, 6, 4, 0,160, 6,244, 0, 21, 0,239, 0, 0, 0,239, 0, 1, 0, 14, 0,146, 6,
- 4, 0,147, 6, 7, 0,148, 6, 2, 0,149, 6,240, 0,200, 6, 2, 0,205, 6, 2, 0,206, 6, 2, 0,207, 6, 2, 0,208, 6,
- 2, 0,191, 6, 2, 0,209, 6, 2, 0,210, 6, 0, 0, 18, 0, 0, 0, 27, 0, 11, 0, 72, 2, 4, 0,211, 6, 4, 0,212, 6,
- 22, 0,213, 6, 11, 0,214, 6,245, 0, 18, 0,239, 0, 0, 0,239, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6,
- 2, 0,149, 6,240, 0,200, 6, 7, 0, 96, 2, 7, 0, 97, 2, 2, 0,205, 6, 2, 0,215, 6, 2, 0,216, 6, 2, 0,217, 6,
- 4, 0, 18, 0, 7, 0,218, 6, 4, 0,110, 6, 4, 0, 27, 0,178, 0,182, 3,246, 0, 16, 0, 0, 0,219, 6, 0, 0,220, 6,
- 0, 0,221, 6, 0, 0,222, 6, 0, 0,223, 6, 0, 0,224, 6, 4, 0,225, 6, 4, 0,226, 6, 4, 0,227, 6, 2, 0, 16, 0,
- 2, 0, 18, 0, 2, 0,228, 6, 2, 0,229, 6, 2, 0,190, 1, 2, 0,230, 6, 0, 0,231, 6,247, 0, 16, 0,239, 0, 0, 0,
-239, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 4, 0,232, 6,246, 0,233, 6,248, 0,234, 6, 14, 0,235, 6, 14, 0,236, 6,
-249, 0,237, 6,237, 0,238, 6,250, 0,239, 6, 2, 0,240, 6, 2, 0,241, 6, 2, 0,242, 6, 2, 0, 30, 0,251, 0, 15, 0,
-239, 0, 0, 0,239, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6, 2, 0,149, 6,240, 0,200, 6, 14, 0,243, 6,
-252, 0,244, 6, 0, 0,245, 6,253, 0,246, 6, 2, 0, 18, 0, 2, 0,247, 6, 2, 0,248, 6, 2, 0,249, 6,254, 0, 25, 0,
-239, 0, 0, 0,239, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 4, 0, 18, 0, 42, 0,244, 2, 40, 0, 69, 1, 54, 0,250, 6,
-255, 0,251, 6, 0, 1,252, 6,178, 0,182, 3, 7, 0,253, 6, 7, 0, 96, 2, 7, 0, 97, 2, 7, 0,218, 6, 7, 0,254, 6,
- 7, 0,255, 6, 2, 0, 0, 7, 2, 0, 27, 0, 2, 0, 1, 7, 2, 0, 2, 7, 0, 0, 3, 7, 0, 0, 4, 7, 0, 0, 5, 7,
- 0, 0,160, 6, 1, 1, 11, 0,239, 0, 0, 0,239, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6, 2, 0,149, 6,
- 2, 0,203, 6, 2, 0, 18, 0, 4, 0, 27, 0,243, 0,201, 6,240, 0,200, 6, 2, 1, 31, 0,239, 0, 0, 0,239, 0, 1, 0,
- 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6, 2, 0,149, 6, 37, 0, 6, 7, 4, 0, 7, 7, 4, 0, 8, 7, 2, 0, 92, 0,
- 2, 0, 9, 7, 2, 0, 10, 7, 0, 0, 11, 7, 0, 0, 12, 7, 4, 0, 13, 7, 4, 0, 14, 7, 4, 0, 15, 7, 2, 0, 16, 7,
- 2, 0, 17, 7, 2, 0, 18, 7, 2, 0, 19, 7, 7, 0, 20, 7, 18, 0, 21, 7, 18, 0, 22, 7, 4, 0, 23, 7, 4, 0, 24, 7,
- 0, 0, 25, 7, 0, 0, 26, 7, 2, 0, 27, 7, 0, 0,211, 2, 11, 0, 28, 7, 3, 1, 10, 0, 22, 0, 32, 0, 11, 0, 29, 7,
- 11, 0, 30, 7, 11, 0, 31, 7, 11, 0, 32, 7, 11, 0, 33, 7, 4, 0, 92, 0, 4, 0, 34, 7, 0, 0, 35, 7, 0, 0, 36, 7,
- 4, 1, 10, 0,239, 0, 0, 0,239, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6, 3, 1, 37, 7, 2, 0, 92, 0,
- 2, 0, 9, 7, 4, 0, 91, 0, 11, 0, 38, 7, 5, 1, 3, 0, 5, 1, 0, 0, 5, 1, 1, 0, 7, 0, 39, 7, 6, 1, 9, 0,
-239, 0, 0, 0,239, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6,240, 0,200, 6, 14, 0, 40, 7, 4, 0, 41, 7,
- 4, 0, 18, 0, 7, 1, 27, 0,239, 0, 0, 0,239, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6, 2, 0,149, 6,
-240, 0,200, 6, 22, 0, 42, 7, 22, 0, 81, 0, 2, 0, 18, 0, 2, 0, 91, 0, 7, 0, 43, 7, 7, 0, 96, 2, 7, 0, 97, 2,
- 7, 0,218, 6, 7, 0, 44, 7, 7, 0, 45, 7, 7, 0, 46, 7, 57, 0, 70, 1, 57, 0, 47, 7, 4, 0, 48, 7, 2, 0, 49, 7,
- 2, 0, 50, 7, 2, 0,251, 0, 2, 0, 86, 1, 14, 0, 51, 7,178, 0,182, 3, 8, 1, 10, 0,239, 0, 0, 0,239, 0, 1, 0,
- 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6, 2, 0,149, 6, 2, 0, 18, 0, 2, 0,214, 3, 4, 0, 27, 0,178, 0,182, 3,
- 9, 1, 7, 0, 9, 1, 0, 0, 9, 1, 1, 0, 4, 0, 52, 7, 4, 0, 22, 0, 0, 0, 85, 0, 4, 0, 53, 7, 4, 0, 16, 0,
- 10, 1, 14, 0,239, 0, 0, 0,239, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6, 2, 0,149, 6, 4, 0, 10, 7,
- 4, 0, 27, 0, 14, 0, 54, 7, 14, 0, 55, 7, 0, 0, 56, 7, 0, 0, 57, 7, 4, 0, 58, 7, 4, 0, 59, 7, 11, 1, 6, 0,
-239, 0, 0, 0,239, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 4, 0, 27, 0, 0, 0, 60, 7, 12, 1, 24, 0,239, 0, 0, 0,
-239, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 7, 0, 96, 2, 7, 0, 97, 2, 7, 0, 61, 7, 7, 0, 62, 7, 7, 0,218, 6,
-231, 0, 63, 7,229, 0,106, 6, 13, 1,251, 6, 4, 0, 18, 0, 2, 0, 87, 1, 2, 0,110, 6, 4, 0, 64, 7, 7, 0, 65, 7,
- 7, 0,148, 3, 7, 0, 94, 3, 4, 0, 27, 0, 7, 0, 66, 7, 7, 0, 67, 7, 4, 0, 68, 7, 4, 0, 69, 7, 14, 1, 7, 0,
- 14, 1, 0, 0, 14, 1, 1, 0, 0, 0, 70, 7, 2, 0, 71, 7, 2, 0, 72, 7, 2, 0, 73, 7, 2, 0, 27, 0, 15, 1, 12, 0,
- 2, 0, 72, 7, 2, 0, 74, 7, 2, 0, 75, 7, 0, 0,211, 2, 2, 0, 76, 7, 2, 0, 77, 7, 2, 0, 78, 7, 2, 0, 79, 7,
- 2, 0, 80, 7, 2, 0,191, 6, 7, 0, 81, 7, 7, 0, 82, 7, 16, 1, 18, 0, 16, 1, 0, 0, 16, 1, 1, 0, 0, 0, 19, 0,
- 15, 1, 83, 7, 15, 1, 84, 7, 15, 1, 85, 7, 15, 1, 86, 7, 7, 0, 87, 7, 2, 0, 88, 7, 2, 0, 89, 7, 2, 0, 90, 7,
- 2, 0, 91, 7, 2, 0, 92, 7, 2, 0, 93, 7, 2, 0, 94, 7, 2, 0, 95, 7, 2, 0, 96, 7, 2, 0, 27, 0, 17, 1, 10, 0,
- 0, 0, 97, 7, 0, 0, 98, 7, 0, 0, 99, 7, 0, 0,100, 7, 0, 0,101, 7, 0, 0,102, 7, 2, 0,103, 7, 2, 0,104, 7,
- 2, 0,105, 7, 2, 0,106, 7, 18, 1, 8, 0, 0, 0,107, 7, 0, 0,108, 7, 0, 0,109, 7, 0, 0,110, 7, 0, 0,111, 7,
- 0, 0,112, 7, 7, 0,109, 6, 7, 0, 27, 0, 19, 1, 3, 0, 0, 0,113, 7, 2, 0,114, 7, 2, 0, 27, 0, 20, 1, 22, 0,
- 17, 1,115, 7, 17, 1,116, 7, 17, 1,117, 7, 17, 1,118, 7, 17, 1,119, 7, 17, 1,120, 7, 17, 1,121, 7, 17, 1,122, 7,
- 17, 1,123, 7, 17, 1,124, 7, 17, 1,125, 7, 17, 1,126, 7, 17, 1,127, 7, 17, 1,128, 7, 17, 1,129, 7, 17, 1,130, 7,
- 17, 1,131, 7, 18, 1,132, 7, 19, 1,133, 7, 0, 0,134, 7, 7, 0,135, 7, 7, 0, 27, 0, 21, 1,122, 0, 0, 0,136, 7,
- 0, 0,137, 7, 0, 0,101, 7, 0, 0,138, 7, 0, 0,113, 7, 0, 0,139, 7, 0, 0,140, 7, 0, 0,141, 7, 0, 0,142, 7,
- 0, 0,143, 7, 0, 0,144, 7, 0, 0,145, 7, 0, 0,146, 7, 0, 0,147, 7, 0, 0,148, 7, 0, 0,149, 7, 0, 0,150, 7,
- 0, 0,151, 7, 0, 0,152, 7, 0, 0,153, 7, 0, 0,154, 7, 0, 0,155, 7, 0, 0,156, 7, 0, 0,157, 7, 0, 0,158, 7,
- 0, 0,159, 7, 0, 0,160, 7, 0, 0,161, 7, 0, 0,162, 7, 0, 0,163, 7, 0, 0,164, 7, 0, 0,165, 7, 0, 0,166, 7,
- 0, 0,167, 7, 0, 0,168, 7, 0, 0,169, 7, 0, 0,170, 7, 0, 0,171, 7, 0, 0,172, 7, 0, 0,173, 7, 0, 0,174, 7,
- 0, 0,175, 7, 0, 0,176, 7, 0, 0,177, 7, 0, 0,178, 7, 0, 0,179, 7, 0, 0,180, 7, 0, 0,181, 7, 0, 0,182, 7,
- 0, 0,183, 7, 0, 0,184, 7, 0, 0,185, 7, 0, 0,186, 7, 0, 0,187, 7, 0, 0,188, 7, 0, 0,189, 7, 0, 0,190, 7,
- 0, 0,191, 7, 0, 0,192, 7, 0, 0,193, 7, 0, 0,194, 7, 0, 0,195, 7, 0, 0,196, 7, 0, 0,197, 7, 0, 0,198, 7,
- 0, 0,199, 7, 0, 0,200, 7, 0, 0,201, 7, 0, 0,202, 7, 0, 0,203, 7, 0, 0,204, 7, 0, 0,205, 7, 0, 0,206, 7,
- 0, 0,207, 7, 0, 0,208, 7, 0, 0,209, 7, 0, 0,210, 7, 0, 0,211, 7, 0, 0,212, 7, 0, 0,213, 7, 0, 0,214, 7,
- 0, 0,215, 7, 0, 0,216, 7, 0, 0,217, 7, 0, 0,218, 7, 0, 0,219, 7, 0, 0,220, 7, 0, 0,221, 7, 0, 0,222, 7,
- 0, 0,223, 7, 0, 0,224, 7, 0, 0,225, 7, 0, 0,226, 7, 0, 0,227, 7, 0, 0,228, 7, 0, 0,229, 7, 0, 0,230, 7,
- 0, 0,231, 7, 0, 0,232, 7, 0, 0,233, 7, 0, 0,234, 7, 0, 0,235, 7, 0, 0,236, 7, 0, 0,237, 7, 0, 0,238, 7,
- 0, 0,239, 7, 0, 0,240, 7, 0, 0,241, 7, 0, 0,242, 7, 0, 0,243, 7, 0, 0,244, 7, 0, 0,245, 7, 0, 0,246, 7,
- 0, 0,247, 7, 0, 0,248, 7, 0, 0,249, 7, 0, 0,250, 7, 0, 0,251, 7, 0, 0,252, 7, 0, 0,253, 7, 0, 0,254, 7,
- 0, 0,255, 7, 22, 1, 5, 0, 0, 0, 0, 8, 0, 0,159, 7, 0, 0,165, 7, 2, 0, 18, 0, 2, 0, 27, 0, 23, 1, 24, 0,
- 23, 1, 0, 0, 23, 1, 1, 0, 0, 0,172, 5, 20, 1, 1, 8, 21, 1, 2, 8, 21, 1, 3, 8, 21, 1, 4, 8, 21, 1, 5, 8,
- 21, 1, 6, 8, 21, 1, 7, 8, 21, 1, 8, 8, 21, 1, 9, 8, 21, 1, 10, 8, 21, 1, 11, 8, 21, 1, 12, 8, 21, 1, 13, 8,
- 21, 1, 14, 8, 21, 1, 15, 8, 21, 1, 16, 8, 21, 1, 17, 8, 21, 1, 18, 8, 22, 1, 19, 8, 4, 0, 20, 8, 4, 0, 27, 0,
- 24, 1, 3, 0, 24, 1, 0, 0, 24, 1, 1, 0, 0, 0, 21, 8, 25, 1, 5, 0, 4, 0, 18, 0, 4, 0, 27, 0, 7, 0,151, 2,
- 7, 0, 22, 8, 7, 0, 46, 2, 26, 1, 95, 0, 4, 0, 18, 0, 4, 0, 23, 8, 4, 0, 24, 8, 0, 0, 25, 8, 0, 0, 26, 8,
- 0, 0, 27, 8, 0, 0, 28, 8, 0, 0, 29, 8, 0, 0, 30, 8, 0, 0, 31, 8, 0, 0, 32, 8, 0, 0, 33, 8, 0, 0, 34, 8,
- 4, 0, 35, 8, 2, 0, 36, 8, 2, 0, 37, 8, 2, 0, 38, 8, 2, 0, 39, 8, 4, 0, 40, 8, 4, 0, 41, 8, 4, 0, 42, 8,
- 4, 0, 43, 8, 2, 0, 44, 8, 2, 0, 45, 8, 4, 0, 46, 8, 4, 0, 47, 8, 4, 0, 48, 8, 4, 0, 49, 8, 4, 0, 50, 8,
- 4, 0, 54, 7, 4, 0, 51, 8, 2, 0, 52, 8, 2, 0, 53, 8, 2, 0, 54, 8, 2, 0, 55, 8, 14, 0, 56, 8, 14, 0, 57, 8,
- 14, 0, 58, 8, 14, 0, 59, 8, 14, 0, 60, 8, 14, 0, 61, 8, 0, 0, 62, 8, 2, 0, 63, 8, 2, 0, 64, 8, 2, 0, 65, 8,
- 2, 0, 66, 8, 2, 0, 67, 8, 2, 0, 68, 8, 2, 0, 69, 8, 2, 0, 70, 8, 25, 1, 71, 8, 2, 0, 72, 8, 2, 0, 73, 8,
- 2, 0, 74, 8, 2, 0, 75, 8, 2, 0, 76, 8, 2, 0, 77, 8, 2, 0, 78, 8, 2, 0, 79, 8, 4, 0, 80, 8, 4, 0, 81, 8,
- 2, 0, 82, 8, 2, 0, 83, 8, 2, 0, 84, 8, 2, 0, 85, 8, 2, 0, 86, 8, 2, 0, 87, 8, 2, 0, 88, 8, 2, 0, 89, 8,
- 2, 0, 90, 8, 2, 0, 91, 8, 2, 0, 92, 8, 2, 0, 93, 8, 2, 0, 94, 8, 2, 0, 95, 8, 2, 0, 96, 8, 2, 0, 97, 8,
- 2, 0, 98, 8, 2, 0, 99, 8, 7, 0,100, 8, 4, 0,101, 8, 7, 0,102, 8, 2, 0, 18, 6, 2, 0, 19, 6, 2, 0,103, 8,
- 2, 0,104, 8, 50, 0,105, 8, 7, 0,106, 8, 2, 0,107, 8, 2, 0, 74, 0, 0, 0,108, 8, 4, 0,109, 8, 4, 0,110, 8,
- 7, 0,111, 8, 7, 0, 27, 0, 27, 1, 24, 0, 22, 0, 32, 0, 14, 0,112, 8, 14, 0,113, 8, 14, 0,114, 8, 14, 0,146, 6,
- 41, 0,125, 0, 41, 0,115, 8, 4, 0,116, 8, 4, 0, 91, 0, 2, 0,117, 8, 2, 0,118, 8, 2, 0,119, 8, 2, 0,120, 8,
- 2, 0,121, 8, 2, 0,122, 8, 2, 0,123, 8, 2, 0,124, 8, 2, 0,125, 8, 2, 0,126, 8, 2, 0,127, 8, 2, 0, 27, 0,
-237, 0,128, 8, 11, 0,129, 8, 2, 0,130, 8, 28, 1, 5, 0, 28, 1, 0, 0, 28, 1, 1, 0, 28, 1,131, 8, 15, 0,132, 8,
- 4, 0, 18, 0, 29, 1, 7, 0, 29, 1, 0, 0, 29, 1, 1, 0, 28, 1,133, 8, 28, 1,134, 8, 2, 0,121, 5, 2, 0, 18, 0,
- 4, 0, 27, 0, 30, 1, 25, 0, 30, 1, 0, 0, 30, 1, 1, 0, 31, 1,135, 8, 32, 1,239, 6, 0, 0,136, 8, 0, 0,137, 8,
- 0, 0,138, 8, 2, 0,139, 8, 2, 0,140, 8, 2, 0,141, 8, 2, 0,142, 8, 2, 0,143, 8, 2, 0, 27, 0, 2, 0, 18, 0,
- 2, 0, 69, 7, 2, 0,144, 8, 2, 0,145, 8, 4, 0,146, 8, 30, 1,147, 8, 11, 0,148, 8, 4, 0,149, 8, 4, 0,150, 8,
- 4, 0,151, 8, 4, 0,152, 8, 0, 0,153, 8, 33, 1, 22, 0, 33, 1, 0, 0, 33, 1, 1, 0, 28, 1,133, 8, 28, 1,134, 8,
- 28, 1,154, 8, 28, 1,155, 8, 27, 1,156, 8, 18, 0, 51, 0, 0, 0,147, 6, 0, 0,157, 8, 2, 0,192, 6, 2, 0,193, 6,
- 2, 0,158, 8, 2, 0, 27, 0, 2, 0,121, 8, 2, 0, 53, 7, 2, 0, 18, 0, 34, 1,135, 8, 14, 0,159, 8, 14, 0,146, 6,
- 14, 0,160, 8, 14, 0,161, 8, 35, 1, 24, 0, 35, 1, 0, 0, 35, 1, 1, 0,240, 0,200, 6, 18, 0,162, 8, 18, 0,163, 8,
- 2, 0,192, 6, 2, 0,193, 6, 2, 0,164, 8, 2, 0,165, 8, 2, 0,166, 8, 2, 0, 18, 0, 7, 0, 92, 2, 2, 0,141, 8,
- 2, 0,142, 8, 2, 0,120, 8, 2, 0,167, 8, 2, 0,125, 8, 2, 0, 86, 1, 36, 1,135, 8, 14, 0,168, 8, 14, 0,169, 8,
- 14, 0,160, 8, 0, 0,170, 8, 11, 0,171, 8, 37, 1, 14, 0, 0, 0,172, 8, 2, 0,173, 8, 2, 0,174, 8, 2, 0,175, 8,
- 2, 0,176, 8, 2, 0,110, 5, 2, 0,177, 8, 27, 1,178, 8, 41, 0,179, 8, 4, 0,180, 8, 4, 0,181, 8, 4, 0,182, 8,
- 4, 0, 27, 0, 0, 0, 70, 7, 38, 1, 3, 0, 0, 0,183, 8, 4, 0,184, 8, 4, 0,185, 8, 39, 1, 4, 0, 4, 0, 7, 7,
- 4, 0,186, 8, 4, 0, 13, 7, 4, 0,187, 8, 40, 1, 2, 0, 4, 0,188, 8, 4, 0,189, 8, 41, 1, 5, 0, 7, 0,190, 8,
- 7, 0,191, 8, 7, 0,192, 8, 4, 0, 18, 0, 4, 0, 27, 0, 42, 1, 7, 0, 0, 0,193, 8, 0, 0,221, 6, 44, 0,138, 0,
- 2, 0,194, 8, 2, 0, 72, 5, 2, 0,195, 8, 2, 0,196, 8, 43, 1, 12, 0, 43, 1, 0, 0, 43, 1, 1, 0, 4, 0, 28, 0,
- 4, 0,197, 8, 4, 0,198, 8, 4, 0,199, 8, 38, 1,200, 8, 0, 0,193, 8, 42, 1,176, 3, 39, 1,201, 8, 40, 1,202, 8,
- 41, 1,203, 8, 44, 1, 12, 0, 0, 0, 35, 0, 11, 0,227, 0, 0, 0,228, 0, 4, 0,231, 0, 4, 0,239, 0, 11, 0,232, 0,
- 7, 0,234, 0, 7, 0,235, 0, 11, 0,204, 8, 11, 0,205, 8, 11, 0,236, 0, 11, 0,238, 0, 45, 1, 48, 0, 45, 1, 0, 0,
- 45, 1, 1, 0, 11, 0,206, 8, 11, 0, 25, 0, 0, 0, 19, 0, 4, 0, 18, 0, 4, 0, 16, 0, 4, 0, 22, 0, 4, 0, 89, 0,
- 4, 0,207, 8, 4, 0,208, 8, 4, 0,198, 8, 4, 0,199, 8, 4, 0,209, 8, 4, 0,250, 0, 4, 0,210, 8, 4, 0,211, 8,
- 7, 0,212, 8, 7, 0,213, 8, 7, 0,214, 8, 2, 0,215, 8, 2, 0,216, 8, 4, 0,217, 8, 4, 0,218, 8, 43, 1,219, 8,
- 31, 0, 80, 0, 41, 0,125, 0, 27, 0,220, 8, 44, 0,138, 0,229, 0,106, 6, 7, 0,221, 8, 7, 0,222, 8, 44, 1, 71, 1,
- 45, 1,223, 8, 45, 1,224, 8, 45, 1,225, 8, 14, 0,226, 8, 46, 1,227, 8, 11, 0,228, 8, 7, 0, 84, 4, 7, 0,229, 8,
- 7, 0,230, 8, 7, 0,231, 8, 11, 0,232, 8, 4, 0,233, 8, 4, 0,234, 8, 4, 0,235, 8, 7, 0,236, 8, 47, 1, 4, 0,
- 47, 1, 0, 0, 47, 1, 1, 0, 14, 0,237, 8, 45, 1,238, 8,226, 0, 11, 0, 14, 0,239, 8, 14, 0,226, 8, 14, 0,240, 8,
- 45, 1,241, 8, 0, 0,242, 8, 0, 0,243, 8, 4, 0,244, 8, 4, 0,245, 8, 4, 0,246, 8, 4, 0, 27, 0, 19, 0,247, 8,
- 48, 1, 4, 0, 7, 0,248, 8, 7, 0, 94, 3, 2, 0,249, 8, 2, 0,250, 8, 49, 1, 6, 0, 7, 0,251, 8, 7, 0,252, 8,
- 7, 0,253, 8, 7, 0,254, 8, 4, 0,255, 8, 4, 0, 0, 9, 50, 1, 8, 0, 7, 0, 1, 9, 7, 0, 2, 9, 7, 0, 3, 9,
- 7, 0, 4, 9, 7, 0, 5, 9, 4, 0,250, 2, 4, 0, 6, 9, 4, 0, 7, 9, 51, 1, 2, 0, 7, 0,180, 5, 7, 0, 27, 0,
- 52, 1, 5, 0, 7, 0, 8, 9, 7, 0, 9, 9, 4, 0, 92, 0, 4, 0,212, 2, 4, 0, 10, 9, 53, 1, 6, 0, 53, 1, 0, 0,
- 53, 1, 1, 0, 2, 0, 16, 0, 2, 0, 18, 0, 2, 0, 11, 9, 2, 0, 56, 0, 54, 1, 8, 0, 54, 1, 0, 0, 54, 1, 1, 0,
- 2, 0, 16, 0, 2, 0, 18, 0, 2, 0, 11, 9, 2, 0, 56, 0, 7, 0, 22, 0, 7, 0,129, 0, 55, 1, 45, 0, 55, 1, 0, 0,
- 55, 1, 1, 0, 2, 0, 16, 0, 2, 0, 18, 0, 2, 0, 11, 9, 2, 0,246, 0, 2, 0,126, 4, 2, 0, 12, 9, 7, 0, 13, 9,
- 7, 0, 90, 0, 7, 0, 7, 3, 4, 0, 14, 9, 4, 0, 82, 0, 4, 0,214, 2, 7, 0, 15, 9, 7, 0, 16, 9, 7, 0, 17, 9,
- 7, 0, 18, 9, 7, 0, 19, 9, 7, 0, 20, 9, 7, 0, 4, 3, 7, 0, 68, 1, 7, 0, 21, 9, 7, 0, 22, 9, 7, 0, 27, 0,
- 7, 0, 23, 9, 7, 0, 24, 9, 7, 0, 25, 9, 2, 0, 26, 9, 2, 0, 27, 9, 2, 0, 28, 9, 2, 0, 29, 9, 2, 0, 30, 9,
- 2, 0, 31, 9, 2, 0, 32, 9, 2, 0, 33, 9, 2, 0, 31, 2, 2, 0, 34, 9, 2, 0, 28, 2, 2, 0, 35, 9, 0, 0, 36, 9,
- 0, 0, 37, 9, 7, 0,244, 0, 56, 1, 38, 9, 64, 0,249, 1, 57, 1, 16, 0, 57, 1, 0, 0, 57, 1, 1, 0, 2, 0, 16, 0,
- 2, 0, 18, 0, 2, 0, 11, 9, 2, 0,246, 0, 7, 0,255, 2, 7, 0, 0, 3, 7, 0, 1, 3, 7, 0, 81, 2, 7, 0, 2, 3,
- 7, 0, 3, 3, 7, 0, 39, 9, 7, 0, 4, 3, 7, 0, 6, 3, 7, 0, 7, 3,253, 0, 5, 0, 2, 0, 16, 0, 2, 0, 40, 9,
- 2, 0, 18, 0, 2, 0, 41, 9, 22, 0, 42, 7,252, 0, 3, 0, 4, 0, 68, 0, 4, 0, 42, 9,253, 0, 2, 0, 58, 1, 7, 0,
- 58, 1, 0, 0, 58, 1, 1, 0, 0, 0, 19, 0, 2, 0, 16, 0, 2, 0, 18, 0, 4, 0, 21, 0, 11, 0, 43, 9, 59, 1, 5, 0,
- 0, 0, 19, 0, 7, 0, 94, 1, 7, 0, 44, 9, 4, 0, 45, 9, 4, 0, 27, 0, 60, 1, 4, 0, 2, 0, 16, 0, 2, 0, 18, 0,
- 2, 0, 91, 0, 2, 0, 30, 0, 61, 1, 4, 0, 0, 0, 19, 0, 63, 0, 46, 9, 7, 0, 94, 1, 7, 0, 27, 0, 62, 1, 6, 0,
- 2, 0, 47, 9, 2, 0, 48, 9, 2, 0, 16, 0, 2, 0, 49, 9, 0, 0, 50, 9, 0, 0, 51, 9, 63, 1, 5, 0, 4, 0, 16, 0,
- 4, 0, 27, 0, 0, 0, 19, 0, 0, 0, 52, 9, 0, 0, 53, 9, 64, 1, 3, 0, 4, 0, 16, 0, 4, 0, 27, 0, 0, 0, 19, 0,
- 65, 1, 4, 0, 2, 0, 54, 9, 2, 0, 55, 9, 2, 0, 18, 0, 2, 0, 27, 0, 66, 1, 6, 0, 0, 0, 19, 0, 0, 0, 56, 9,
- 2, 0, 57, 9, 2, 0, 4, 3, 2, 0, 87, 1, 2, 0, 30, 0, 67, 1, 5, 0, 0, 0, 19, 0, 7, 0, 94, 3, 7, 0,217, 4,
- 2, 0, 18, 0, 2, 0,226, 2, 68, 1, 3, 0, 0, 0, 19, 0, 4, 0,214, 2, 4, 0, 54, 9, 69, 1, 7, 0, 0, 0, 19, 0,
- 7, 0,217, 4, 0, 0, 58, 9, 0, 0, 59, 9, 2, 0, 87, 1, 2, 0, 91, 0, 4, 0, 60, 9, 70, 1, 4, 0, 0, 0, 61, 9,
- 0, 0, 62, 9, 4, 0, 16, 0, 7, 0,230, 2, 71, 1, 3, 0, 27, 0, 63, 9, 0, 0, 64, 9, 0, 0, 65, 9, 72, 1, 18, 0,
- 72, 1, 0, 0, 72, 1, 1, 0, 2, 0, 16, 0, 2, 0, 66, 9, 2, 0, 18, 0, 2, 0, 67, 9, 2, 0, 68, 9, 2, 0, 69, 9,
- 2, 0, 91, 0, 2, 0, 30, 0, 0, 0, 19, 0, 11, 0, 2, 0, 73, 1, 70, 9, 27, 0, 44, 0, 2, 0,216, 5, 2, 0,176, 2,
- 2, 0, 71, 9, 2, 0, 27, 0, 74, 1, 11, 0, 0, 0, 19, 0, 0, 0, 16, 0, 0, 0, 72, 9, 2, 0, 18, 0, 2, 0,226, 2,
- 2, 0, 73, 9, 4, 0, 74, 9, 4, 0, 75, 9, 4, 0, 76, 9, 4, 0, 77, 9, 4, 0, 78, 9, 75, 1, 1, 0, 0, 0, 79, 9,
- 76, 1, 4, 0, 37, 0, 6, 7, 0, 0, 21, 8, 4, 0, 87, 1, 4, 0, 18, 0, 73, 1, 18, 0, 73, 1, 0, 0, 73, 1, 1, 0,
- 73, 1, 80, 9, 2, 0, 16, 0, 2, 0, 18, 0, 2, 0, 81, 9, 2, 0, 69, 9, 2, 0, 66, 9, 2, 0, 82, 9, 2, 0, 30, 0,
- 2, 0, 74, 0, 0, 0, 19, 0, 11, 0, 2, 0, 77, 1, 70, 9, 72, 1, 83, 9, 2, 0, 14, 0, 2, 0, 84, 9, 4, 0, 85, 9,
- 78, 1, 3, 0, 4, 0,240, 2, 4, 0, 27, 0, 27, 0, 44, 0, 79, 1, 15, 0,176, 0, 86, 9, 2, 0, 16, 0, 2, 0, 18, 0,
- 7, 0, 13, 9, 7, 0, 90, 0, 0, 0, 19, 0, 0, 0, 87, 9, 2, 0, 88, 9, 2, 0, 89, 9, 2, 0,134, 0, 2, 0, 90, 9,
- 2, 0, 91, 9, 2, 0, 27, 0, 7, 0, 92, 9, 7, 0, 93, 9, 80, 1, 8, 0, 7, 0, 94, 9, 7, 0, 95, 9, 7, 0, 96, 9,
- 7, 0, 97, 9, 7, 0, 98, 9, 7, 0, 99, 9, 7, 0,100, 9, 7, 0,101, 9, 81, 1, 13, 0, 2, 0, 18, 0, 2, 0,102, 9,
- 4, 0, 91, 0, 4, 0, 30, 0, 2, 0,177, 6, 7, 0, 84, 4, 7, 0,229, 8, 46, 1,227, 8, 80, 1,103, 9, 2, 0, 16, 0,
- 2, 0,115, 5, 2, 0,216, 3, 2, 0,104, 9, 82, 1, 11, 0, 4, 0,240, 2, 2, 0, 16, 0, 2, 0, 18, 0, 27, 0, 44, 0,
- 79, 0,105, 9, 0, 0, 19, 0, 7, 0,106, 9, 7, 0,107, 9, 7, 0,222, 3, 2, 0,108, 9, 2, 0,109, 9, 83, 1, 5, 0,
- 2, 0, 16, 0, 2, 0, 91, 0, 4, 0, 27, 0, 41, 0,125, 0, 27, 0,208, 5, 84, 1, 5, 0, 4, 0, 27, 0, 4, 0, 16, 0,
- 0, 0, 19, 0, 0, 0, 52, 9, 27, 0, 44, 0, 85, 1, 13, 0, 2, 0, 18, 0, 2, 0, 16, 0, 2, 0, 66, 9, 2, 0,223, 3,
- 7, 0,110, 9, 7, 0,111, 9, 7, 0, 86, 1, 7, 0,112, 9, 7, 0,192, 3, 7, 0,196, 3, 7, 0,113, 9, 7, 0,114, 9,
- 27, 0,115, 9, 86, 1, 10, 0, 2, 0, 18, 0, 2, 0, 16, 0, 7, 0, 13, 9, 7, 0, 90, 0, 0, 0, 19, 0, 0, 0, 87, 9,
- 2, 0, 91, 0, 2, 0, 30, 0, 2, 0, 74, 0, 2, 0,115, 5, 87, 1, 8, 0, 27, 0, 44, 0, 7, 0, 1, 3, 7, 0,116, 9,
- 7, 0,117, 9, 7, 0,223, 3, 2, 0, 91, 0, 2, 0,226, 2, 7, 0, 30, 0, 88, 1, 12, 0, 2, 0, 16, 0, 2, 0, 87, 1,
- 2, 0, 18, 0, 2, 0, 4, 3, 2, 0,240, 2, 2, 0,118, 9, 4, 0, 27, 0, 7, 0,119, 9, 7, 0,120, 9, 7, 0,121, 9,
- 7, 0,122, 9, 0, 0,123, 9, 89, 1, 9, 0, 2, 0, 18, 0, 2, 0, 16, 0, 4, 0, 13, 9, 4, 0, 90, 0, 0, 0, 19, 0,
- 2, 0, 86, 1, 2, 0, 63, 0, 2, 0,124, 9, 2, 0,125, 9, 90, 1, 7, 0, 4, 0,214, 2, 4, 0,126, 9, 4, 0,127, 9,
- 4, 0,128, 9, 7, 0,129, 9, 7, 0,130, 9, 0, 0, 58, 9, 91, 1, 7, 0, 0, 0,131, 9, 27, 0,132, 9, 0, 0, 64, 9,
- 2, 0,133, 9, 2, 0, 91, 0, 4, 0, 30, 0, 0, 0, 65, 9, 92, 1, 6, 0, 2, 0, 18, 0, 2, 0, 16, 0, 4, 0, 13, 9,
- 4, 0, 90, 0, 0, 0,134, 9, 0, 0,135, 9, 93, 1, 1, 0, 4, 0, 18, 0, 94, 1, 6, 0, 0, 0, 94, 0, 2, 0, 16, 0,
- 2, 0, 18, 0, 4, 0,136, 9, 7, 0,137, 9, 37, 0, 6, 7, 95, 1, 4, 0, 0, 0,181, 2, 2, 0, 18, 0, 4, 0, 16, 0,
- 27, 0, 44, 0, 96, 1, 2, 0, 4, 0, 16, 0, 4, 0,181, 6, 97, 1, 8, 0, 0, 0, 61, 9, 0, 0, 62, 9, 4, 0, 16, 0,
- 7, 0, 39, 2, 7, 0,138, 9, 7, 0, 27, 0, 27, 0, 70, 3, 27, 0,139, 9, 98, 1, 11, 0, 0, 0, 54, 6, 0, 0, 18, 0,
- 2, 0,140, 9, 4, 0, 16, 0, 7, 0, 94, 1, 7, 0,141, 9, 7, 0,142, 9, 7, 0,143, 9, 4, 0,144, 9, 27, 0, 70, 3,
- 27, 0,145, 9, 77, 1, 10, 0, 77, 1, 0, 0, 77, 1, 1, 0, 77, 1, 80, 9, 2, 0, 16, 0, 2, 0, 18, 0, 2, 0, 66, 9,
- 2, 0,146, 9, 0, 0, 19, 0, 11, 0, 2, 0, 27, 0, 44, 0, 46, 1, 17, 0, 22, 0, 32, 0, 0, 0, 35, 0, 38, 0,153, 0,
- 11, 0,227, 0, 38, 0,147, 9, 31, 0, 80, 0, 7, 0, 84, 4, 7, 0,148, 9, 7, 0,229, 8, 7, 0, 94, 9, 7, 0, 95, 9,
- 7, 0,149, 9, 4, 0, 92, 0, 4, 0, 27, 0, 11, 0,150, 9, 11, 0,151, 9, 11, 0,152, 9, 99, 1, 6, 0, 99, 1, 0, 0,
- 99, 1, 1, 0, 27, 0, 44, 0, 11, 0,153, 9, 2, 0,251, 0, 0, 0,211, 2, 64, 0, 4, 0, 22, 0, 32, 0, 14, 0,154, 9,
- 4, 0,134, 0, 7, 0,155, 9,100, 1, 28, 0,100, 1, 0, 0,100, 1, 1, 0, 21, 0,156, 9,100, 1, 38, 0, 14, 0,157, 9,
- 0, 0, 19, 0, 7, 0,158, 9, 7, 0,159, 9, 7, 0,160, 9, 7, 0,161, 9, 4, 0, 18, 0, 7, 0,162, 9, 7, 0,163, 9,
- 7, 0,164, 9, 7, 0,165, 9, 7, 0, 94, 1, 7, 0, 39, 2, 7, 0,166, 9, 7, 0,212, 2, 7, 0,167, 9, 7, 0,168, 9,
- 7, 0,169, 9, 7, 0,170, 9, 7, 0,171, 9, 7, 0,176, 0, 4, 0,134, 0, 2, 0,254, 5, 2, 0,172, 9,101, 1, 27, 0,
- 22, 0, 32, 0, 34, 0, 75, 0, 14, 0,173, 9, 14, 0,174, 9, 14, 0,175, 9,100, 1,176, 9, 11, 0,177, 9, 11, 0,178, 9,
- 4, 0, 18, 0, 4, 0,157, 6, 4, 0,179, 9, 4, 0, 27, 0, 2, 0, 8, 3, 2, 0,211, 6, 4, 0,180, 9, 4, 0,134, 0,
- 4, 0,181, 9, 2, 0,182, 9, 2, 0,183, 9, 2, 0,184, 9, 2, 0,185, 9, 4, 0,186, 9, 4, 0,187, 9, 4, 0,188, 9,
- 4, 0,189, 9, 4, 0,190, 9, 4, 0,191, 9,102, 1, 2, 0, 7, 0,165, 2, 4, 0, 18, 0,180, 0, 5, 0,102, 1,192, 9,
- 4, 0,212, 2, 4, 0,193, 9, 4, 0,194, 9, 4, 0, 18, 0,179, 0, 16, 0, 4, 0,195, 9, 4, 0,196, 9, 4, 0,197, 9,
- 4, 0,198, 9, 2, 0,199, 9, 2, 0,200, 9, 2, 0,201, 9, 2, 0,251, 0, 2, 0,202, 9, 2, 0,203, 9, 2, 0,204, 9,
- 2, 0,205, 9, 4, 0,206, 9, 4, 0,207, 9, 4, 0,208, 9, 4, 0,209, 9,103, 1, 40, 0,103, 1, 0, 0,103, 1, 1, 0,
- 21, 0,156, 9, 14, 0,251, 3, 0, 0, 19, 0, 2, 0, 18, 0, 2, 0,210, 9, 2, 0,209, 3, 2, 0,211, 9, 0, 0,212, 9,
- 0, 0,213, 9, 0, 0,214, 9,100, 1,215, 9,103, 1, 38, 0,103, 1,216, 9, 14, 0,217, 9, 14, 0,218, 9,180, 0,184, 3,
- 27, 0,219, 9,103, 1,220, 9, 7, 0, 77, 1, 7, 0,176, 0, 7, 0,221, 9, 7, 0, 18, 2, 7, 0,198, 3, 7, 0,200, 3,
- 2, 0,232, 3, 2, 0, 27, 0, 7, 0,222, 9, 7, 0,223, 9, 7, 0,203, 3, 7, 0,224, 9, 7, 0,225, 9, 7, 0,226, 9,
- 7, 0,227, 9, 7, 0,228, 9, 7, 0,229, 9, 7, 0,230, 9, 7, 0,231, 9, 11, 0,232, 9,177, 0, 16, 0, 14, 0,233, 9,
- 74, 0,234, 9, 2, 0, 18, 0, 2, 0, 27, 0, 4, 0,235, 9, 4, 0, 91, 0, 7, 0,108, 2, 7, 0,236, 9, 7, 0,237, 9,
- 14, 0,238, 9, 4, 0,239, 9, 4, 0,240, 9, 11, 0,241, 9, 11, 0,242, 9,179, 0,183, 3, 0, 0,243, 9,104, 1, 1, 0,
- 4, 0,240, 9,105, 1, 12, 0, 4, 0,240, 9, 7, 0, 78, 9, 2, 0,244, 9, 2, 0,245, 9, 7, 0,246, 9, 7, 0,247, 9,
- 2, 0,248, 9, 2, 0, 18, 0, 7, 0,249, 9, 7, 0,250, 9, 7, 0,251, 9, 7, 0,252, 9,106, 1, 7, 0,106, 1, 0, 0,
-106, 1, 1, 0, 14, 0,253, 9, 4, 0, 18, 0, 4, 0,254, 9, 0, 0, 19, 0, 22, 1,255, 9,176, 0, 9, 0, 22, 0, 32, 0,
- 14, 0, 0, 10, 14, 0,233, 9, 14, 0, 1, 10, 14, 0,102, 0, 4, 0, 18, 0, 4, 0, 2, 10, 4, 0, 3, 10, 4, 0, 27, 0,
-243, 0, 8, 0, 22, 0, 4, 10, 14, 0,233, 9, 64, 0, 5, 10, 0, 0, 6, 10, 4, 0, 7, 10, 4, 0, 18, 0, 4, 0, 8, 10,
- 4, 0, 27, 0,107, 1, 13, 0,239, 0, 0, 0,239, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6, 2, 0,149, 6,
-240, 0,200, 6,176, 0,179, 3,243, 0, 9, 10, 0, 0, 87, 1, 0, 0,203, 6, 2, 0, 18, 0, 7, 0, 10, 10,108, 1, 8, 0,
-108, 1, 0, 0,108, 1, 1, 0,106, 1, 11, 10, 31, 0, 80, 0, 14, 0,185, 3, 4, 0, 18, 0, 0, 0, 19, 0, 4, 0,118, 8,
-109, 1, 5, 0,109, 1, 0, 0,109, 1, 1, 0, 31, 0, 80, 0, 2, 0, 18, 0, 0, 0, 12, 10,110, 1, 14, 0,110, 1, 0, 0,
-110, 1, 1, 0, 11, 0, 2, 0, 2, 0, 16, 0, 2, 0, 18, 0, 0, 0, 13, 10, 0, 0, 14, 10, 0, 0, 19, 0, 2, 0, 27, 0,
- 7, 0, 15, 10, 7, 0, 16, 10, 31, 0, 80, 0, 7, 0, 17, 10, 7, 0, 18, 10,111, 1, 9, 0,111, 1, 0, 0,111, 1, 1, 0,
- 27, 0, 19, 10, 0, 0, 11, 3, 7, 0, 20, 10, 2, 0, 21, 10, 2, 0, 18, 0, 2, 0, 16, 0, 2, 0, 22, 10,112, 1, 7, 0,
- 37, 0, 6, 7, 21, 0,156, 9, 4, 0, 18, 0, 4, 0, 23, 10, 14, 0, 24, 10, 27, 0, 19, 10, 0, 0, 11, 3,113, 1, 15, 0,
- 27, 0, 19, 10, 2, 0, 25, 10, 2, 0, 18, 0, 2, 0, 26, 10, 2, 0, 27, 10, 0, 0, 11, 3, 27, 0, 28, 10, 0, 0, 29, 10,
- 7, 0, 30, 10, 7, 0, 39, 2, 7, 0, 31, 10, 7, 0, 32, 10, 2, 0, 16, 0, 2, 0, 87, 1, 7, 0, 94, 1,114, 1, 6, 0,
- 27, 0, 19, 10, 7, 0,192, 9, 2, 0, 33, 10, 2, 0, 34, 10, 2, 0, 18, 0, 2, 0, 35, 10,115, 1, 6, 0, 27, 0, 19, 10,
- 4, 0, 36, 10, 4, 0, 37, 10, 4, 0, 92, 0, 4, 0, 27, 0, 0, 0, 11, 3,116, 1, 4, 0, 27, 0, 19, 10, 4, 0, 18, 0,
- 4, 0, 36, 10, 0, 0, 11, 3,117, 1, 4, 0, 27, 0, 19, 10, 4, 0, 18, 0, 4, 0, 36, 10, 0, 0, 11, 3,118, 1, 4, 0,
- 27, 0, 19, 10, 4, 0, 18, 0, 4, 0, 36, 10, 0, 0, 11, 3,119, 1, 2, 0, 4, 0, 18, 0, 7, 0, 84, 4,120, 1, 2, 0,
- 27, 0, 19, 10, 0, 0, 11, 3,121, 1, 10, 0, 27, 0, 19, 10, 4, 0, 38, 10, 7, 0,128, 0, 4, 0, 18, 0, 2, 0, 4, 7,
- 2, 0, 39, 10, 2, 0, 91, 0, 2, 0, 30, 0, 7, 0, 40, 10, 0, 0, 11, 3,122, 1, 10, 0, 27, 0, 19, 10, 2, 0, 16, 0,
- 2, 0,134, 4, 4, 0, 89, 0, 4, 0, 90, 0, 7, 0,116, 9, 7, 0,117, 9, 4, 0, 27, 0,176, 0, 86, 9, 0, 0, 11, 3,
-123, 1, 4, 0, 27, 0, 19, 10, 4, 0,210, 3, 4, 0, 41, 10, 0, 0, 11, 3,124, 1, 4, 0, 27, 0, 19, 10, 4, 0,210, 3,
- 4, 0, 27, 0, 0, 0, 11, 3,125, 1, 6, 0, 27, 0, 19, 10, 7, 0,128, 0, 7, 0, 82, 3, 4, 0, 42, 10, 2, 0,210, 3,
- 2, 0,211, 3,126, 1, 6, 0, 27, 0, 19, 10, 4, 0, 43, 10, 4, 0, 44, 10, 7, 0, 45, 10, 7, 0, 46, 10, 0, 0, 11, 3,
-127, 1, 16, 0, 27, 0, 19, 10, 27, 0,216, 9, 4, 0, 16, 0, 7, 0, 47, 10, 7, 0, 48, 10, 7, 0, 49, 10, 7, 0, 50, 10,
- 7, 0, 51, 10, 7, 0, 52, 10, 7, 0, 53, 10, 7, 0, 54, 10, 7, 0, 55, 10, 2, 0, 18, 0, 2, 0, 27, 0, 2, 0, 91, 0,
- 2, 0, 30, 0,128, 1, 3, 0, 27, 0, 19, 10, 4, 0, 18, 0, 4, 0, 31, 2,129, 1, 5, 0, 27, 0, 19, 10, 4, 0, 18, 0,
- 4, 0, 27, 0, 7, 0, 56, 10, 0, 0, 11, 3,130, 1, 10, 0, 27, 0, 19, 10, 0, 0, 11, 3, 2, 0, 57, 10, 2, 0, 58, 10,
- 0, 0, 59, 10, 0, 0, 60, 10, 7, 0, 61, 10, 7, 0, 62, 10, 7, 0, 63, 10, 7, 0, 64, 10,131, 1, 5, 0, 27, 0, 19, 10,
- 0, 0, 11, 3, 7, 0,220, 2, 2, 0, 65, 10, 2, 0, 18, 0,132, 1, 8, 0, 7, 0, 8, 0, 7, 0, 9, 0, 7, 0, 10, 0,
- 7, 0, 11, 0, 7, 0, 66, 10, 7, 0, 67, 10, 2, 0, 18, 0, 2, 0, 31, 2,133, 1, 8, 0, 7, 0, 8, 0, 7, 0, 9, 0,
- 7, 0, 10, 0, 7, 0, 11, 0, 7, 0, 66, 10, 7, 0, 67, 10, 2, 0, 18, 0, 2, 0, 31, 2,134, 1, 8, 0, 7, 0, 8, 0,
- 7, 0, 9, 0, 7, 0, 10, 0, 7, 0, 11, 0, 7, 0, 66, 10, 7, 0, 67, 10, 2, 0, 18, 0, 2, 0, 31, 2,135, 1, 7, 0,
- 27, 0, 19, 10, 0, 0, 11, 3, 7, 0, 94, 1, 7, 0,103, 1, 2, 0, 18, 0, 2, 0, 87, 1, 4, 0, 27, 0,136, 1, 5, 0,
- 27, 0, 70, 3, 7, 0, 94, 1, 2, 0, 74, 3, 0, 0, 76, 3, 0, 0, 68, 10,137, 1, 7, 0,229, 0,106, 6, 0, 0, 69, 10,
- 4, 0, 18, 0, 4, 0, 27, 0, 0, 0, 70, 10, 27, 0,208, 5, 27, 0, 71, 10,138, 1, 3, 0,229, 0,106, 6, 4, 0, 18, 0,
- 4, 0, 27, 0,139, 1, 6, 0,229, 0,106, 6, 4, 0, 18, 0, 4, 0, 27, 0, 0, 0, 70, 10, 7, 0, 56, 10, 27, 0,208, 5,
-140, 1, 10, 0,140, 1, 0, 0,140, 1, 1, 0, 2, 0, 16, 0, 2, 0, 18, 0, 0, 0, 72, 10, 7, 0, 31, 1, 7, 0, 32, 1,
- 2, 0,253, 9, 2, 0, 73, 10, 27, 0, 44, 0,141, 1, 22, 0,141, 1, 0, 0,141, 1, 1, 0, 2, 0, 18, 0, 2, 0, 87, 1,
- 2, 0, 74, 10, 2, 0, 75, 10, 31, 0, 80, 0,176, 0, 86, 9, 27, 0,168, 0, 7, 0, 89, 0, 7, 0, 90, 0, 7, 0, 76, 10,
- 7, 0, 77, 10, 7, 0, 78, 10, 7, 0, 79, 10, 7, 0,253, 2, 7, 0,148, 3, 7, 0, 88, 9, 7, 0, 80, 10, 0, 0, 81, 10,
- 0, 0, 82, 10, 14, 0,188, 3,142, 1, 11, 0, 7, 0, 46, 2, 7, 0,116, 9, 7, 0,117, 9, 11, 0, 2, 0, 2, 0, 83, 10,
- 2, 0, 84, 10, 2, 0, 85, 10, 2, 0, 86, 10, 2, 0, 87, 10, 2, 0, 88, 10, 2, 0,181, 2,143, 1, 21, 0,143, 1, 0, 0,
-143, 1, 1, 0,143, 1, 89, 10, 0, 0, 19, 0, 11, 0, 90, 10, 2, 0, 16, 0, 2, 0, 18, 0, 2, 0, 91, 10, 2, 0, 92, 10,
- 7, 0, 93, 10, 7, 0, 94, 10, 11, 0, 95, 10, 2, 0, 96, 10, 2, 0, 97, 10, 4, 0, 74, 0, 11, 0,150, 9, 4, 0, 98, 10,
- 4, 0, 99, 10,143, 1,100, 10,144, 1,101, 10,142, 1,102, 10,145, 1, 4, 0, 0, 0,103, 10, 2, 0,104, 10, 2, 0,105, 10,
- 4, 0, 27, 0,146, 1, 37, 0,146, 1, 0, 0,146, 1, 1, 0,146, 1,106, 10, 0, 0, 19, 0, 2, 0, 16, 0, 2, 0, 18, 0,
- 2, 0,197, 8, 2, 0,176, 2, 2, 0,107, 10, 2, 0, 9, 7, 2, 0, 96, 10, 2, 0, 40, 9, 14, 0, 81, 9, 14, 0,108, 10,
-146, 1, 38, 0, 22, 0, 42, 7, 11, 0, 90, 10, 7, 0, 93, 10, 7, 0, 94, 10, 7, 0, 81, 2, 7, 0, 1, 3, 7, 0,109, 10,
- 4, 0,110, 10, 0, 0,111, 10, 2, 0,112, 10, 2, 0,113, 10, 7, 0,114, 10, 7, 0,115, 10, 2, 0,116, 10, 2, 0,117, 10,
- 11, 0,118, 10, 19, 0,119, 10, 19, 0,120, 10, 19, 0,121, 10,145, 1,154, 0,147, 1,122, 10,148, 1,123, 10,144, 1, 8, 0,
-144, 1, 0, 0,144, 1, 1, 0,146, 1,124, 10,146, 1,125, 10,143, 1,126, 10,143, 1,127, 10, 4, 0, 18, 0, 4, 0, 27, 0,
- 57, 0, 20, 0, 22, 0, 32, 0, 34, 0, 75, 0,178, 0,182, 3, 14, 0,128, 10, 14, 0,129, 10, 4, 0, 16, 0, 4, 0,130, 10,
- 4, 0,131, 10, 4, 0, 18, 0, 4, 0,110, 10, 4, 0,132, 10, 14, 0, 81, 9, 14, 0,108, 10,149, 1,133, 10, 11, 0,134, 10,
- 11, 0,135, 10, 4, 0,136, 10, 11, 0,137, 10, 11, 0,138, 10, 11, 0,139, 10,150, 1, 4, 0, 4, 0, 17, 0, 4, 0,230, 2,
- 4, 0,116, 9, 4, 0,117, 9,151, 1, 4, 0, 4, 0, 17, 0, 7, 0,230, 2, 7, 0,116, 9, 7, 0,117, 9,152, 1, 2, 0,
- 0, 0,230, 2, 0, 0, 86, 1,153, 1, 4, 0, 4, 0, 17, 0, 7, 0,140, 10, 7, 0,116, 9, 7, 0,117, 9,154, 1, 1, 0,
- 7, 0,141, 10,155, 1, 6, 0, 4, 0,127, 0, 4, 0,129, 0, 4, 0, 40, 9, 0, 0,142, 10, 0, 0,143, 10, 2, 0, 27, 0,
-156, 1, 16, 0, 2, 0,141, 8, 2, 0,142, 8, 2, 0,144, 10, 2, 0,145, 10, 2, 0,146, 10, 2, 0, 67, 0, 2, 0, 43, 7,
- 2, 0,147, 10, 7, 0,252, 2, 7, 0,148, 10, 7, 0,149, 10, 2, 0,109, 1, 0, 0,150, 10, 0, 0,151, 10, 4, 0,152, 10,
- 4, 0,153, 10,157, 1, 9, 0, 7, 0,154, 10, 7, 0,155, 10, 7, 0,149, 9, 7, 0, 94, 3, 7, 0,156, 10, 7, 0,218, 6,
- 2, 0, 92, 3, 0, 0,157, 10, 0, 0, 27, 0,158, 1, 4, 0, 7, 0,158, 10, 7, 0,159, 10, 2, 0, 92, 3, 2, 0, 27, 0,
-159, 1, 3, 0, 7, 0,160, 10, 7, 0,212, 8, 7, 0, 14, 0,160, 1, 4, 0, 0, 0, 35, 0,204, 0, 80, 5, 4, 0,129, 0,
- 4, 0,132, 4,161, 1, 6, 0, 0, 0,161, 10,204, 0,162, 10, 4, 0,129, 0, 4, 0,132, 4, 4, 0,163, 10, 4, 0, 27, 0,
-162, 1, 4, 0, 2, 0,164, 10, 2, 0,165, 10, 4, 0, 30, 0,204, 0,162, 10,163, 1, 9, 0, 7, 0,166, 10, 7, 0,167, 10,
- 7, 0,168, 10, 7, 0, 92, 2, 7, 0,169, 10, 7, 0,170, 10, 7, 0,171, 10, 2, 0,172, 10, 2, 0,173, 10,164, 1, 8, 0,
- 2, 0,174, 10, 2, 0,175, 10, 2, 0,176, 10, 2, 0,177, 10, 7, 0,178, 10, 7, 0,179, 10, 7, 0,180, 10, 7, 0,181, 10,
-165, 1, 2, 0, 7, 0, 5, 0, 7, 0, 6, 0,166, 1, 2, 0, 0, 0,170, 0, 0, 0,182, 10,167, 1, 1, 0, 0, 0, 19, 0,
-168, 1, 12, 0, 0, 0,183, 10, 0, 0,184, 10, 0, 0,209, 6, 0, 0,185, 10, 2, 0,144, 10, 2, 0,186, 10, 7, 0,187, 10,
- 7, 0,188, 10, 7, 0,189, 10, 7, 0,148, 3, 7, 0,190, 10, 7, 0,191, 10,169, 1, 2, 0, 11, 0,192, 10, 11, 0,193, 10,
-170, 1, 13, 0, 0, 0, 72, 5, 0, 0, 16, 0, 0, 0, 92, 3, 0, 0, 94, 3, 0, 0,184, 10, 0, 0,108, 0, 0, 0,181, 2,
- 7, 0,194, 10, 7, 0,195, 10, 7, 0,147, 3, 7, 0,196, 10, 7, 0,197, 10, 7, 0,191, 10,171, 1, 8, 0, 7, 0, 47, 9,
- 7, 0,128, 0, 7, 0,151, 10, 7, 0,172, 2, 7, 0,198, 10, 7, 0,240, 0, 7, 0,199, 10, 4, 0, 16, 0,172, 1, 4, 0,
- 2, 0,200, 10, 2, 0,201, 10, 2, 0,202, 10, 2, 0, 27, 0,173, 1, 8, 0, 7, 0,203, 10, 7, 0,220, 2, 7, 0,204, 10,
- 7, 0,190, 8, 7, 0,191, 8, 7, 0,192, 8, 7, 0,205, 10, 7, 0,206, 10,174, 1, 6, 0, 2, 0,207, 10, 2, 0,208, 10,
- 7, 0,209, 10, 7, 0,210, 10, 7, 0,211, 10, 7, 0,212, 10,175, 1, 2, 0, 58, 0,213, 10, 59, 0,214, 10,176, 1, 3, 0,
-175, 1, 79, 6, 7, 0,215, 10, 7, 0,216, 10,177, 1, 3, 0,175, 1, 79, 6, 4, 0,217, 10, 4, 0, 27, 0,178, 1, 1, 0,
-175, 1, 79, 6,179, 1, 3, 0,175, 1, 79, 6, 4, 0,217, 10, 4, 0,218, 10,180, 1, 3, 0,175, 1, 79, 6, 4, 0,219, 10,
- 4, 0, 27, 0,181, 1, 1, 0,175, 1, 79, 6,182, 1, 3, 0,175, 1, 79, 6, 4, 0,220, 10, 4, 0, 27, 0,183, 1, 3, 0,
-175, 1, 79, 6, 4, 0,221, 10, 4, 0, 27, 0,184, 1, 3, 0,175, 1, 79, 6, 4, 0,222, 10, 4, 0, 27, 0,185, 1, 3, 0,
-175, 1, 79, 6, 4, 0,250, 0, 4, 0, 27, 0,186, 1, 1, 0, 0, 0, 19, 0,187, 1, 1, 0, 0, 0, 19, 0,188, 1, 4, 0,
- 7, 0, 5, 0, 7, 0, 6, 0, 2, 0, 18, 0, 2, 0,223, 10,189, 1, 10, 0, 2, 0, 62, 4, 2, 0, 18, 0, 7, 0,217, 4,
- 7, 0,224, 10, 7, 0,225, 10, 7, 0,226, 10, 7, 0,227, 10,188, 1,228, 10,188, 1,229, 10,188, 1,230, 10, 54, 0, 11, 0,
- 4, 0, 18, 0, 4, 0, 63, 0, 4, 0,231, 10, 4, 0,232, 10, 19, 0,233, 10, 19, 0,234, 10,189, 1,235, 10, 7, 0,236, 10,
- 7, 0,237, 10, 7, 0,238, 10, 7, 0,239, 10, 0, 1, 10, 0, 4, 0,253, 9, 4, 0,240, 10, 7, 0,241, 10, 7, 0,242, 10,
- 7, 0,243, 10, 7, 0,244, 10, 7, 0, 9, 0, 7, 0, 11, 0, 4, 0, 87, 1, 4, 0, 1, 3,255, 0, 18, 0, 4, 0,132, 0,
- 4, 0,245, 10, 4, 0,246, 10, 7, 0,247, 10, 4, 0,248, 10, 7, 0,249, 10, 7, 0,250, 10, 4, 0,251, 10, 7, 0,252, 10,
- 4, 0,253, 10, 7, 0,254, 10, 0, 1,255, 10, 7, 0, 0, 11, 7, 0, 1, 11, 7, 0, 2, 11, 7, 0, 3, 11, 4, 0, 4, 11,
- 4, 0, 27, 0,190, 1, 4, 0, 42, 0,244, 2, 7, 0, 5, 11, 7, 0,178, 1, 7, 0, 27, 0,213, 0, 34, 0, 22, 0, 32, 0,
-190, 1, 6, 11, 54, 0,228, 10, 46, 0, 7, 11, 52, 0, 8, 11, 25, 0,154, 0, 0, 0, 9, 11, 7, 0, 10, 11, 2, 0,109, 6,
- 2, 0, 11, 11, 4, 0,108, 0, 4, 0, 18, 0, 7, 0, 12, 11, 4, 0, 89, 2, 4, 0, 13, 11, 7, 0, 14, 11, 7, 0, 15, 11,
- 7, 0, 16, 11, 7, 0,178, 1, 4, 0, 17, 11, 7, 0, 18, 11, 0, 0, 19, 11, 0, 0, 20, 11, 0, 0, 21, 11, 0, 0, 22, 11,
- 7, 0, 23, 11, 7, 0, 24, 11, 7, 0, 25, 11, 7, 0, 1, 3, 7, 0, 26, 11, 4, 0, 27, 11, 7, 0,240, 5, 7, 0, 28, 11,
- 7, 0, 29, 11,191, 1, 10, 0, 4, 0, 16, 0, 4, 0,128, 0, 4, 0, 18, 0, 4, 0, 15, 4, 4, 0, 30, 11, 4, 0, 31, 11,
- 4, 0, 32, 11, 4, 0, 73, 0, 0, 0, 19, 0, 11, 0, 2, 0,192, 1, 1, 0, 0, 0, 70, 7, 95, 0, 8, 0,191, 1, 33, 11,
- 4, 0, 34, 11, 4, 0, 35, 11, 4, 0, 36, 11, 4, 0, 37, 11, 4, 0, 30, 0, 11, 0, 38, 11,192, 1, 39, 11,193, 1, 5, 0,
- 7, 0,165, 2, 7, 0,240, 2, 7, 0, 39, 2, 2, 0,147, 2, 2, 0, 27, 0,194, 1, 5, 0, 7, 0,165, 2, 7, 0,159, 4,
- 7, 0, 40, 11, 7, 0, 41, 11, 7, 0,240, 2,195, 1, 5, 0, 27, 0, 42, 11,196, 1, 21, 0, 7, 0, 75, 6, 7, 0, 43, 11,
- 7, 0, 56, 0,197, 1, 3, 0, 7, 0, 44, 11, 4, 0, 45, 11, 4, 0, 46, 11,198, 1, 7, 0, 4, 0, 47, 11, 4, 0, 48, 11,
- 4, 0, 49, 11, 7, 0, 50, 11, 7, 0, 51, 11, 7, 0, 52, 11, 7, 0, 56, 0,199, 1, 8, 0,199, 1, 0, 0,199, 1, 1, 0,
- 27, 0, 44, 0, 4, 0, 3, 1, 2, 0, 18, 0, 2, 0, 87, 1, 7, 0,240, 2, 7, 0, 55, 9,200, 1, 7, 0,200, 1, 0, 0,
-200, 1, 1, 0, 27, 0, 44, 0, 2, 0,225, 2, 2, 0, 18, 0, 2, 0, 13, 2, 2, 0, 56, 0,201, 1, 17, 0,194, 1, 8, 4,
-194, 1, 53, 11,193, 1, 54, 11,194, 1, 38, 9,195, 1, 55, 11, 4, 0, 82, 0, 7, 0,240, 2, 7, 0, 7, 3, 7, 0, 56, 11,
- 4, 0, 47, 11, 4, 0, 57, 11, 7, 0, 51, 11, 7, 0, 52, 11, 7, 0,108, 0, 4, 0, 58, 11, 2, 0, 18, 0, 2, 0, 59, 11,
-202, 1, 15, 0, 7, 0,255, 0, 7, 0, 60, 11, 7, 0, 44, 11, 7, 0, 61, 11, 7, 0, 62, 11, 7, 0, 63, 11, 7, 0, 64, 11,
- 7, 0, 65, 11, 7, 0, 66, 11, 7, 0, 67, 11, 7, 0, 68, 11, 7, 0, 69, 11, 7, 0, 70, 11, 4, 0, 18, 0, 4, 0, 71, 11,
-203, 1,128, 0, 22, 0, 32, 0, 34, 0, 75, 0,204, 1, 72, 11,202, 1, 73, 11,187, 0,154, 4, 4, 0, 18, 0, 4, 0, 56, 0,
- 2, 0, 16, 0, 2, 0, 57, 10, 2, 0, 74, 11, 2, 0,122, 1, 2, 0, 75, 11, 2, 0,232, 3, 2, 0, 76, 11, 2, 0, 77, 11,
- 2, 0, 78, 11, 2, 0, 79, 11, 2, 0, 80, 11, 2, 0, 81, 11, 2, 0, 82, 11, 2, 0, 83, 11, 2, 0, 84, 11, 2, 0,224, 5,
- 2, 0, 85, 11, 2, 0, 86, 11, 2, 0, 87, 11, 2, 0, 88, 11, 2, 0, 89, 11, 2, 0, 28, 2, 2, 0, 31, 9, 2, 0, 6, 9,
- 2, 0, 90, 11, 2, 0, 91, 11, 2, 0, 25, 4, 2, 0, 26, 4, 2, 0, 92, 11, 2, 0, 93, 11, 2, 0, 94, 11, 2, 0, 95, 11,
- 7, 0, 96, 11, 7, 0, 97, 11, 7, 0, 98, 11, 7, 0, 99, 11, 7, 0,100, 11, 7, 0,101, 11, 7, 0,102, 11, 2, 0,154, 5,
- 2, 0,103, 11, 7, 0,104, 11, 7, 0,105, 11, 7, 0,106, 11, 7, 0, 13, 9, 7, 0, 90, 0, 7, 0, 7, 3, 7, 0, 19, 9,
- 7, 0,107, 11, 7, 0,108, 11, 7, 0,109, 11, 7, 0,110, 11, 7, 0,111, 11, 7, 0,112, 11, 4, 0, 14, 9, 4, 0, 12, 9,
- 4, 0,113, 11, 4, 0,114, 11, 2, 0,115, 11, 2, 0,116, 11, 7, 0, 15, 9, 7, 0, 16, 9, 7, 0, 17, 9, 7, 0,117, 11,
- 7, 0,118, 11, 7, 0,119, 11, 7, 0,120, 11, 7, 0,121, 11, 7, 0,122, 11, 7, 0,123, 11, 7, 0,124, 11, 7, 0,125, 11,
- 7, 0,222, 3, 7, 0,108, 0, 7, 0,126, 11, 7, 0,127, 11, 7, 0,128, 11, 7, 0,129, 11, 7, 0,214, 0, 7, 0,130, 11,
- 4, 0,131, 11, 4, 0,132, 11, 7, 0,133, 11, 7, 0,134, 11, 7, 0,135, 11, 7, 0,136, 11, 7, 0,137, 11, 7, 0,213, 0,
- 7, 0,138, 11, 7, 0, 52, 4, 7, 0, 50, 4, 7, 0, 51, 4, 7, 0,139, 11, 7, 0,140, 11, 7, 0,141, 11, 7, 0,142, 11,
- 7, 0,143, 11, 7, 0,144, 11, 7, 0,145, 11, 7, 0,146, 11, 7, 0,147, 11, 7, 0,148, 11, 7, 0,149, 11, 7, 0,150, 11,
- 7, 0,151, 11, 7, 0,152, 11, 7, 0,153, 11, 7, 0,154, 11, 7, 0,155, 11, 7, 0,156, 11, 4, 0,157, 11, 4, 0,158, 11,
- 46, 0,140, 1, 64, 0, 0, 4, 14, 0,159, 11, 64, 0,160, 11, 27, 0,161, 11, 27, 0,162, 11, 31, 0, 80, 0,182, 0, 73, 1,
-182, 0,163, 11,150, 0, 52, 0,150, 0, 0, 0,150, 0, 1, 0,203, 1,164, 11,201, 1,165, 11,198, 1,216, 9,190, 0, 80, 4,
- 11, 0, 81, 4,205, 1,166, 11,205, 1,167, 11, 14, 0,168, 11, 14, 0,169, 11,135, 0,170, 11,143, 0,171, 11,143, 0,172, 11,
- 27, 0,173, 11, 27, 0,174, 11, 27, 0, 38, 0, 14, 0, 24, 10, 0, 0, 19, 0, 7, 0,244, 0, 7, 0, 36, 3, 7, 0,175, 11,
- 7, 0,176, 11, 4, 0,214, 2, 4, 0,177, 11, 4, 0, 18, 0, 4, 0, 14, 9, 4, 0,178, 11, 4, 0,179, 11, 4, 0,180, 11,
- 4, 0,181, 11, 2, 0,251, 0, 2, 0,182, 11, 2, 0,183, 11, 2, 0,184, 11, 0, 0,185, 11, 2, 0,186, 11, 2, 0,187, 11,
- 2, 0,188, 11, 11, 0,189, 11,139, 0,153, 4, 14, 0, 21, 3, 14, 0,190, 11,197, 1,191, 11, 4, 0,192, 11, 4, 0,193, 11,
-206, 1,194, 11,141, 0, 33, 3,207, 1,195, 11, 7, 0,196, 11, 7, 0,197, 11, 7, 0,198, 11,137, 0, 38, 0,208, 1,150, 9,
- 7, 0,123, 4, 7, 0,199, 11, 7, 0,200, 11, 7, 0, 75, 6, 7, 0,236, 3, 7, 0,222, 3, 7, 0,201, 11, 7, 0, 91, 2,
- 7, 0,202, 11, 7, 0,203, 11, 7, 0,204, 11, 7, 0,205, 11, 7, 0,206, 11, 7, 0,207, 11, 7, 0,124, 4, 7, 0,208, 11,
- 7, 0,209, 11, 7, 0,210, 11, 7, 0,125, 4, 7, 0,121, 4, 7, 0,122, 4, 7, 0,211, 11, 7, 0,212, 11, 7, 0,213, 11,
- 4, 0,214, 11, 4, 0, 92, 0, 4, 0,215, 11, 4, 0,216, 11, 2, 0,217, 11, 2, 0,218, 11, 2, 0,219, 11, 2, 0,220, 11,
- 2, 0,221, 11, 2, 0,222, 11, 2, 0,223, 11, 2, 0, 27, 0,187, 0,154, 4,138, 0, 11, 0,208, 1,224, 11, 7, 0,225, 11,
- 7, 0,226, 11, 7, 0,250, 1, 7, 0,227, 11, 7, 0,228, 11, 7, 0,229, 11, 4, 0, 92, 0, 2, 0,230, 11, 2, 0,231, 11,
- 64, 0,249, 1,209, 1, 4, 0, 7, 0, 5, 0, 7, 0, 6, 0, 7, 0, 7, 0, 7, 0,232, 11,210, 1, 6, 0,210, 1, 0, 0,
-210, 1, 1, 0,209, 1,192, 9, 4, 0, 1, 1, 2, 0,233, 11, 2, 0, 18, 0,211, 1, 5, 0,211, 1, 0, 0,211, 1, 1, 0,
- 14, 0,234, 11, 4, 0,235, 11, 4, 0, 18, 0,212, 1, 9, 0,212, 1, 0, 0,212, 1, 1, 0, 14, 0,127, 0,211, 1,236, 11,
- 4, 0, 18, 0, 2, 0,233, 11, 2, 0,237, 11, 7, 0, 93, 0, 0, 0,238, 11,178, 0, 6, 0, 22, 0, 32, 0, 14, 0,123, 5,
- 4, 0, 18, 0, 2, 0,239, 11, 2, 0,240, 11, 11, 0,241, 11,213, 1, 6, 0, 14, 0,242, 11, 4, 0,243, 11, 4, 0,244, 11,
- 4, 0, 18, 0, 4, 0, 27, 0,237, 0,245, 11,214, 1, 19, 0, 22, 0, 32, 0,215, 1,246, 11,215, 1,247, 11, 14, 0,248, 11,
- 4, 0,249, 11, 2, 0,250, 11, 2, 0,251, 11, 14, 0,252, 11, 14, 0,253, 11,213, 1,254, 11, 14, 0,255, 11, 14, 0, 0, 12,
- 14, 0, 1, 12, 14, 0, 2, 12,216, 1, 3, 12,216, 1, 4, 12,216, 1, 5, 12, 14, 0, 6, 12,237, 0, 7, 12,215, 1, 32, 0,
-215, 1, 0, 0,215, 1, 1, 0, 11, 0, 8, 12, 4, 0,119, 8, 2, 0, 9, 12, 2, 0, 27, 0, 27, 1, 10, 12, 27, 1, 11, 12,
- 0, 0, 12, 12, 2, 0, 13, 12, 2, 0, 14, 12, 2, 0,141, 8, 2, 0,142, 8, 2, 0, 15, 12, 2, 0, 16, 12, 2, 0, 15, 4,
- 2, 0, 53, 7, 2, 0, 17, 12, 2, 0, 18, 12, 2, 0, 19, 12, 2, 0, 30, 0,217, 1, 20, 12,218, 1, 21, 12,219, 1, 22, 12,
- 4, 0, 23, 12, 4, 0, 24, 12, 11, 0, 25, 12, 14, 0,253, 11, 14, 0,160, 8, 14, 0, 26, 12, 14, 0, 27, 12, 14, 0, 28, 12,
-220, 1, 17, 0,220, 1, 0, 0,220, 1, 1, 0, 0, 0, 29, 12, 21, 0, 31, 0, 2, 0, 30, 12, 2, 0, 16, 0, 2, 0, 14, 0,
- 2, 0, 31, 12, 2, 0, 32, 12, 2, 0, 33, 12, 2, 0, 34, 12, 2, 0, 35, 12, 2, 0, 18, 0, 2, 0, 36, 12, 2, 0, 32, 0,
- 2, 0, 27, 0,221, 1, 37, 12,222, 1, 4, 0,222, 1, 0, 0,222, 1, 1, 0,220, 1, 38, 12,220, 1, 39, 12,223, 1, 11, 0,
-223, 1, 0, 0,223, 1, 1, 0, 14, 0, 40, 12, 14, 0, 41, 12, 0, 0, 29, 12, 2, 0, 42, 12, 2, 0, 43, 12, 2, 0, 18, 0,
- 2, 0, 44, 12, 4, 0, 45, 12, 11, 0, 46, 12,216, 1, 7, 0,216, 1, 0, 0,216, 1, 1, 0, 0, 0, 29, 12, 0, 0, 47, 12,
- 14, 0, 59, 8, 4, 0, 48, 12, 4, 0, 18, 0,249, 0, 14, 0,249, 0, 0, 0,249, 0, 1, 0, 0, 0, 29, 12, 21, 0, 31, 0,
-224, 1,135, 8, 11, 0, 49, 12, 11, 0, 50, 12,221, 1, 37, 12,213, 1, 51, 12, 14, 0, 52, 12,249, 0, 53, 12, 32, 1,239, 6,
- 2, 0, 18, 0, 2, 0, 86, 1,225, 1, 12, 0,225, 1, 0, 0,225, 1, 1, 0, 11, 0, 2, 0, 11, 0, 54, 12, 0, 0, 19, 0,
- 2, 0, 16, 0, 2, 0, 18, 0, 7, 0,138, 9, 7, 0,129, 0, 7, 0,132, 4, 7, 0, 88, 9, 7, 0, 80, 10,226, 1, 5, 0,
- 7, 0, 55, 12, 4, 0, 56, 12, 4, 0, 57, 12, 4, 0, 87, 1, 4, 0, 18, 0,227, 1, 6, 0, 7, 0, 58, 12, 7, 0, 59, 12,
- 7, 0, 60, 12, 7, 0, 61, 12, 4, 0, 16, 0, 4, 0, 18, 0,228, 1, 5, 0, 7, 0,116, 9, 7, 0,117, 9, 7, 0,240, 2,
- 2, 0, 42, 2, 2, 0, 43, 2,229, 1, 5, 0,228, 1, 2, 0, 4, 0, 53, 0, 7, 0, 62, 12, 7, 0,116, 9, 7, 0,117, 9,
-230, 1, 4, 0, 2, 0, 63, 12, 2, 0, 64, 12, 2, 0, 65, 12, 2, 0, 66, 12,231, 1, 2, 0, 37, 0, 37, 7, 21, 0,156, 9,
-232, 1, 3, 0, 19, 0, 67, 12, 4, 0, 18, 0, 4, 0, 27, 0,233, 1, 6, 0, 7, 0,108, 0, 7, 0,209, 2, 7, 0, 68, 12,
- 7, 0, 27, 0, 2, 0,250, 0, 2, 0, 69, 12,234, 1, 5, 0, 7, 0, 70, 12, 7, 0,128, 0, 7, 0,193, 9, 7, 0,194, 9,
- 4, 0, 18, 0,235, 1, 6, 0, 22, 0, 42, 7, 0, 0, 71, 12, 0, 0, 72, 12, 2, 0, 73, 12, 2, 0, 18, 0, 4, 0, 74, 12,
-236, 1, 7, 0,236, 1, 0, 0,236, 1, 1, 0, 0, 0, 19, 0,235, 1, 75, 12, 2, 0, 76, 12, 2, 0, 16, 0, 7, 0, 60, 0,
-237, 1, 7, 0, 14, 0, 77, 12, 0, 0, 78, 12, 11, 0, 79, 12, 7, 0, 60, 0, 7, 0,138, 9, 4, 0, 16, 0, 4, 0, 18, 0,
-238, 1, 3, 0, 7, 0, 80, 12, 4, 0, 18, 0, 4, 0, 27, 0,239, 1, 15, 0,239, 1, 0, 0,239, 1, 1, 0,106, 1, 11, 10,
-237, 1, 61, 0, 14, 0,188, 3, 30, 0, 49, 0,238, 1, 81, 12, 4, 0, 53, 0, 7, 0, 60, 0, 2, 0, 18, 0, 2, 0, 22, 1,
- 4, 0, 82, 12, 0, 0, 71, 12, 4, 0, 83, 12, 7, 0, 84, 12,240, 1, 2, 0, 0, 0, 85, 12, 0, 0, 86, 12,241, 1, 4, 0,
-241, 1, 0, 0,241, 1, 1, 0,176, 0, 70, 3, 14, 0, 87, 12,242, 1, 25, 0,242, 1, 0, 0,242, 1, 1, 0, 14, 0, 88, 12,
-176, 0, 86, 9,241, 1, 89, 12, 14, 0, 90, 12, 14, 0,188, 3, 0, 0, 19, 0, 7, 0,138, 9, 7, 0, 91, 12, 7, 0, 89, 0,
- 7, 0, 90, 0, 7, 0, 76, 10, 7, 0, 77, 10, 7, 0,253, 2, 7, 0,148, 3, 7, 0, 88, 9, 7, 0, 80, 10, 2, 0, 92, 12,
- 2, 0, 93, 12, 2, 0, 91, 0, 2, 0, 16, 0, 11, 0, 94, 12, 4, 0, 18, 0, 4, 0, 30, 0,243, 1, 6, 0,243, 1, 0, 0,
-243, 1, 1, 0, 14, 0, 88, 12, 4, 0, 18, 0, 4, 0, 13, 2, 0, 0, 19, 0,244, 1, 11, 0,244, 1, 0, 0,244, 1, 1, 0,
- 22, 0, 42, 7, 0, 0, 95, 12, 4, 0, 74, 12, 2, 0, 96, 12, 2, 0, 27, 0, 0, 0, 71, 12, 4, 0, 82, 12, 2, 0, 18, 0,
- 2, 0, 97, 12,245, 1, 10, 0,245, 1, 0, 0,245, 1, 1, 0, 14, 0, 98, 12, 0, 0, 29, 12, 0, 0, 19, 0, 0, 0, 99, 12,
- 0, 0,100, 12, 2, 0, 18, 0, 2, 0, 97, 12, 4, 0,101, 12,246, 1, 5, 0,246, 1, 0, 0,246, 1, 1, 0, 0, 0, 71, 12,
- 4, 0, 82, 12, 7, 0,230, 2, 34, 0, 12, 0,176, 0,179, 3,176, 0,102, 12,241, 1, 89, 12, 14, 0,103, 12,242, 1,104, 12,
- 14, 0,105, 12, 14, 0,106, 12, 4, 0, 18, 0, 4, 0,251, 0, 2, 0,107, 12, 2, 0,108, 12, 7, 0,109, 12,247, 1, 2, 0,
- 22, 0, 32, 0, 34, 0, 75, 0,248, 1, 5, 0,248, 1, 0, 0,248, 1, 1, 0, 4, 0, 16, 0, 4, 0, 18, 0, 0, 0,172, 5,
-249, 1, 6, 0,248, 1,110, 12, 27, 0, 44, 0, 4, 0,111, 12, 7, 0,112, 12, 4, 0,113, 12, 4, 0,253, 9,250, 1, 3, 0,
-248, 1,110, 12, 4, 0,111, 12, 7, 0,114, 12,251, 1, 8, 0,248, 1,110, 12, 27, 0, 44, 0, 7, 0, 77, 1, 7, 0,115, 12,
- 7, 0, 36, 3, 7, 0,149, 9, 4, 0,111, 12, 4, 0,116, 12,252, 1, 5, 0,248, 1,110, 12, 7, 0,117, 12, 7, 0,176, 2,
- 7, 0, 3, 3, 7, 0, 56, 0,253, 1, 3, 0,248, 1,110, 12, 7, 0,149, 9, 7, 0,118, 12,196, 1, 4, 0, 7, 0,119, 12,
- 7, 0,127, 11, 2, 0,120, 12, 2, 0, 87, 1,254, 1, 14, 0,254, 1, 0, 0,254, 1, 1, 0, 14, 0,121, 12, 14, 0,122, 12,
- 14, 0,123, 12, 0, 0,172, 5, 4, 0, 32, 0, 4, 0, 18, 0, 4, 0,124, 12, 7, 0,125, 12, 4, 0,113, 12, 4, 0,253, 9,
- 7, 0, 84, 4, 7, 0, 5, 3,204, 1, 23, 0, 4, 0,111, 12, 4, 0,126, 12, 7, 0,127, 12, 7, 0, 1, 3, 7, 0,128, 12,
- 7, 0,229, 8, 7, 0,119, 12, 7, 0,129, 12, 7, 0,209, 2, 7, 0,247, 10, 7, 0,217, 4, 7, 0,130, 12, 7, 0,131, 12,
- 7, 0,132, 12, 7, 0,133, 12, 7, 0,134, 12, 7, 0,135, 12, 7, 0,136, 12, 7, 0,137, 12, 7, 0,138, 12, 7, 0,139, 12,
- 7, 0,140, 12, 14, 0,141, 12,123, 0, 40, 0,122, 0,142, 12,255, 1, 73, 11, 64, 0,143, 12, 64, 0,160, 11, 64, 0,144, 12,
- 0, 2,145, 12, 43, 0,169, 0, 43, 0,146, 12, 43, 0,147, 12, 7, 0,148, 12, 7, 0,149, 12, 7, 0,150, 12, 7, 0,151, 12,
- 7, 0,152, 12, 7, 0,118, 8, 7, 0,153, 12, 7, 0,178, 1, 7, 0,154, 12, 4, 0,155, 12, 4, 0,156, 12, 4, 0,157, 12,
- 4, 0, 92, 0, 4, 0, 27, 0, 4, 0,158, 12, 2, 0,159, 12, 2, 0,160, 12, 4, 0,161, 12, 7, 0,209, 2, 4, 0,162, 12,
- 7, 0,163, 12, 4, 0,164, 12, 4, 0,165, 12, 4, 0,166, 12,139, 0,167, 12, 14, 0,168, 12,187, 0,154, 4, 4, 0,169, 12,
- 7, 0,170, 12, 7, 0,171, 12, 4, 0, 30, 0,124, 0, 12, 0,122, 0,142, 12,150, 0, 56, 3, 7, 0,143, 1, 7, 0,118, 8,
- 7, 0,172, 12, 7, 0,173, 12, 7, 0,174, 12, 2, 0,175, 12, 2, 0,176, 12, 2, 0,177, 12, 2, 0, 16, 0, 4, 0, 92, 0,
-125, 0, 13, 0,122, 0,142, 12,141, 0, 33, 3,143, 0, 35, 3, 7, 0,192, 9, 7, 0,178, 12, 7, 0,179, 12, 7, 0, 79, 1,
- 7, 0,180, 12, 4, 0, 33, 10, 4, 0, 29, 3, 2, 0, 16, 0, 2, 0, 27, 0, 4, 0, 30, 0, 1, 2, 15, 0, 22, 0, 32, 0,
- 34, 0, 75, 0, 46, 1,227, 8, 7, 0,181, 12, 7, 0,182, 12, 7, 0,183, 12, 7, 0,184, 12, 7, 0,148, 9, 7, 0,185, 12,
- 7, 0,186, 12, 7, 0,187, 12, 7, 0, 84, 4, 7, 0,229, 8, 2, 0, 18, 0, 2, 0,112, 9,231, 0, 3, 0, 4, 0,126, 0,
- 2, 0,215, 6, 2, 0,188, 12, 2, 2, 5, 0, 0, 0,193, 8, 2, 0,194, 8, 2, 0, 72, 5, 2, 0,189, 12, 2, 0,190, 12,
-229, 0, 16, 0, 22, 0, 32, 0, 34, 0, 75, 0, 0, 0, 35, 0, 4, 0,143, 0, 4, 0,144, 0, 4, 0,191, 12, 7, 0,162, 0,
- 7, 0,163, 0, 44, 0,138, 0, 3, 2,150, 9,178, 0,182, 3, 4, 2,192, 12, 11, 0,193, 12, 2, 2,194, 12, 4, 0, 18, 0,
- 4, 0, 22, 0, 13, 1, 10, 0, 4, 0,132, 0, 4, 0,195, 12, 52, 0,196, 12, 7, 0,197, 12, 2, 0,198, 12, 0, 0,181, 2,
- 4, 0,126, 0, 5, 2,175, 3, 6, 2,199, 12, 7, 0,200, 12, 7, 2, 3, 0, 4, 0,126, 0, 7, 0,201, 12, 7, 0, 79, 1,
- 8, 2, 11, 0, 11, 0,202, 12, 7, 0,203, 12, 7, 0,204, 12, 7, 0, 27, 0, 7, 0,205, 12, 2, 0,206, 12, 2, 0, 91, 0,
- 7, 0,207, 12, 7, 0,208, 12, 7, 0,209, 12, 7, 0,210, 12, 6, 2, 3, 0, 7, 0,211, 12, 4, 0,126, 0, 4, 0, 18, 0,
- 5, 2, 24, 0, 5, 2, 0, 0, 5, 2, 1, 0, 0, 0, 19, 0, 7, 0,212, 12, 7, 0,213, 12, 7, 0,214, 12, 7, 0,215, 12,
- 7, 0, 5, 11, 4, 0,216, 12, 4, 0,217, 12, 6, 2,218, 12, 7, 0,219, 12, 7, 0,201, 12, 4, 0, 18, 0, 4, 0,220, 12,
- 4, 0,221, 12, 7, 0, 84, 12, 2, 0,222, 12, 2, 0,227, 3, 2, 0,223, 12, 2, 0,224, 12, 2, 0,225, 12, 2, 0, 30, 0,
- 7, 0,226, 12, 9, 2, 22, 0, 4, 0, 18, 0, 2, 0,227, 12, 2, 0,228, 12, 7, 0,229, 12, 2, 0,230, 12, 2, 0,231, 12,
- 2, 0,232, 12, 2, 0,233, 12, 2, 0,234, 12, 2, 0,235, 12, 2, 0,236, 12, 2, 0, 3, 3, 4, 0,237, 12, 4, 0,238, 12,
- 2, 0,239, 12, 2, 0,240, 12, 7, 0, 94, 1, 4, 0,241, 12, 4, 0,242, 12, 7, 0,243, 12, 7, 0,244, 12, 4, 0, 74, 0,
- 10, 2, 12, 0, 4, 0, 18, 0, 4, 0,245, 12, 4, 0,246, 12, 7, 0,247, 12, 5, 2,248, 12, 7, 0,249, 12, 7, 0,250, 12,
- 7, 0,251, 12, 4, 0,190, 1, 4, 0,132, 0, 7, 0,148, 3, 52, 0,252, 12, 11, 2, 5, 0, 4, 0, 18, 0, 7, 0,201, 12,
- 4, 0,253, 12, 4, 0,254, 12, 7, 2,255, 12, 12, 2, 7, 0, 12, 2, 0, 0, 12, 2, 1, 0, 0, 0, 19, 0, 4, 0, 18, 0,
- 7, 0,148, 3, 14, 0, 0, 13, 11, 2, 1, 13, 13, 2, 1, 0, 0, 0, 2, 13, 4, 2, 10, 0, 9, 2, 3, 13, 8, 2, 4, 13,
- 14, 0, 0, 13, 11, 2, 1, 13, 10, 2, 5, 13, 5, 2, 6, 13, 14, 0, 7, 13, 4, 0, 8, 13, 4, 0, 9, 13, 13, 2, 90, 6,
- 14, 2, 48, 0, 14, 2, 0, 0, 14, 2, 1, 0,169, 0,145, 3, 15, 2, 2, 0, 64, 0, 10, 13,187, 0,154, 4,139, 0,153, 4,
- 14, 0, 21, 3, 4, 0, 11, 13, 0, 0, 19, 0, 2, 0,162, 10, 2, 0, 16, 0, 2, 0, 12, 13, 2, 0, 13, 13, 2, 0, 14, 13,
- 2, 0, 15, 13, 2, 0, 16, 13, 2, 0, 17, 13, 4, 0, 92, 0, 4, 0,186, 3, 4, 0, 18, 13, 4, 0, 19, 13, 4, 0,193, 9,
- 4, 0,194, 9, 4, 0, 27, 0, 7, 0, 20, 13, 47, 0, 21, 13, 0, 0, 22, 13, 4, 0, 23, 13, 4, 0,161, 12, 7, 0, 24, 13,
- 7, 0, 25, 13, 7, 0, 26, 13, 7, 0, 27, 13, 7, 0, 28, 13, 7, 0, 29, 13, 7, 0, 30, 13, 7, 0, 31, 13, 7, 0, 32, 13,
- 7, 0, 33, 13, 7, 0, 34, 13, 7, 0, 35, 13, 7, 0, 36, 13, 7, 0, 37, 13, 0, 0,202, 2, 0, 0, 38, 13, 0, 0, 39, 13,
- 0, 0, 40, 13,169, 0, 7, 0,168, 0, 41, 13,143, 0, 35, 3, 14, 0, 42, 13, 2, 0, 43, 13, 2, 0, 92, 0, 4, 0, 27, 0,
- 0, 0, 44, 13,170, 0, 24, 0,168, 0, 41, 13,143, 0, 35, 3,150, 0, 56, 3, 63, 0, 25, 2, 4, 0, 92, 0, 4, 0, 45, 13,
- 7, 0,185, 0, 7, 0,186, 0, 7, 0,187, 0, 7, 0,178, 1, 7, 0, 46, 13, 7, 0, 47, 13, 7, 0, 48, 13, 7, 0, 49, 13,
- 50, 0, 50, 13, 50, 0, 51, 13, 2, 0, 52, 13, 2, 0,222, 10, 2, 0, 53, 13, 2, 0, 27, 0, 7, 0, 54, 13, 7, 0, 55, 13,
- 7, 0, 56, 13, 7, 0, 57, 13, 69, 78, 68, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 0, 0, 0,248,136, 20, 7, 0, 0, 0, 0,207, 0, 0, 0,
+ 1, 0, 0, 0,152,137, 20, 7, 0, 0, 0, 0, 88,136, 20, 7, 0, 0, 0, 0,105,111, 95, 99,117,114,118,101, 95,115,118,103,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 0, 0, 0,152,137, 20, 7,
+ 0, 0, 0, 0,207, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,136, 20, 7, 0, 0, 0, 0, 99,121, 99,108,
+101,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
+232, 0, 0, 0, 56,138, 20, 7, 0, 0, 0, 0,199, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68,101,102, 97,117,108,116, 32, 83,116,121,108,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 12, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,255,255, 0, 0,154,153, 25, 62,
+ 0, 0,128, 63, 0, 0, 12, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0,255,255, 0, 0, 0, 0,128, 62,
+ 0, 0, 0, 0, 0, 0, 11, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0,255,255, 0, 0,154,153, 25, 62,
+ 0, 0,128, 63, 0, 0, 11, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 62,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 8, 0, 5, 0, 5, 0, 8, 0, 2, 0, 8, 0, 4, 0, 0, 0, 68, 78, 65, 49,
+ 84, 5, 1, 0,232, 8, 63, 8, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 83, 68, 78, 65, 78, 65, 77, 69, 62, 13, 0, 0,
+ 42,110,101,120,116, 0, 42,112,114,101,118, 0, 42,100, 97,116, 97, 0, 42,102,105,114,115,116, 0, 42,108, 97,115,116, 0,120,
+ 0,121, 0,122, 0,120,109,105,110, 0,120,109, 97,120, 0,121,109,105,110, 0,121,109, 97,120, 0, 42,112,111,105,110,116,101,
+114, 0,103,114,111,117,112, 0,118, 97,108, 0,118, 97,108, 50, 0,116,121,112,101, 0,115,117, 98,116,121,112,101, 0,102,108,
+ 97,103, 0,110, 97,109,101, 91, 54, 52, 93, 0,115, 97,118,101,100, 0,100, 97,116, 97, 0,108,101,110, 0,116,111,116, 97,108,
+108,101,110, 0, 42,110,101,119,105,100, 0, 42,108,105, 98, 0,110, 97,109,101, 91, 54, 54, 93, 0,112, 97,100, 0,117,115, 0,
+105, 99,111,110, 95,105,100, 0,112, 97,100, 50, 0, 42,112,114,111,112,101,114,116,105,101,115, 0,105,100, 0, 42,105,100, 98,
+108,111, 99,107, 0, 42,102,105,108,101,100, 97,116, 97, 0,110, 97,109,101, 91, 49, 48, 50, 52, 93, 0,102,105,108,101,112, 97,
+116,104, 91, 49, 48, 50, 52, 93, 0,116,111,116, 0, 42,112, 97,114,101,110,116, 0,119, 91, 50, 93, 0,104, 91, 50, 93, 0, 99,
+104, 97,110,103,101,100, 91, 50, 93, 0, 99,104, 97,110,103,101,100, 95,116,105,109,101,115,116, 97,109,112, 91, 50, 93, 0, 42,
+114,101, 99,116, 91, 50, 93, 0, 42,111, 98, 0, 98,108,111, 99,107,116,121,112,101, 0, 97,100,114, 99,111,100,101, 0,110, 97,
+109,101, 91, 49, 50, 56, 93, 0, 42, 98,112, 0, 42, 98,101,122,116, 0,109, 97,120,114, 99,116, 0,116,111,116,114, 99,116, 0,
+118, 97,114,116,121,112,101, 0,116,111,116,118,101,114,116, 0,105,112,111, 0,101,120,116,114, 97,112, 0,114,116, 0, 98,105,
+116,109, 97,115,107, 0,115,108,105,100,101, 95,109,105,110, 0,115,108,105,100,101, 95,109, 97,120, 0, 99,117,114,118, 97,108,
+ 0, 42,100,114,105,118,101,114, 0, 99,117,114,118,101, 0, 99,117,114, 0,115,104,111,119,107,101,121, 0,109,117,116,101,105,
+112,111, 0,112,111,115, 0,112, 97,100, 49, 0,114,101,108, 97,116,105,118,101, 0,116,111,116,101,108,101,109, 0,117,105,100,
+ 0, 42,119,101,105,103,104,116,115, 0,118,103,114,111,117,112, 91, 54, 52, 93, 0,115,108,105,100,101,114,109,105,110, 0,115,
+108,105,100,101,114,109, 97,120, 0, 42, 97,100,116, 0, 42,114,101,102,107,101,121, 0,101,108,101,109,115,116,114, 91, 51, 50,
+ 93, 0,101,108,101,109,115,105,122,101, 0, 98,108,111, 99,107, 0, 42,105,112,111, 0, 42,102,114,111,109, 0,116,111,116,107,
+101,121, 0,115,108,117,114,112,104, 0, 99,116,105,109,101, 0,117,105,100,103,101,110, 0, 42,108,105,110,101, 0, 42,102,111,
+114,109, 97,116, 0, 98,108,101,110, 0,108,105,110,101,110,111, 0,115,116, 97,114,116, 0,101,110,100, 0,102,108, 97,103,115,
+ 0, 99,111,108,111,114, 91, 52, 93, 0,112, 97,100, 91, 52, 93, 0, 42,110, 97,109,101, 0,110,108,105,110,101,115, 0,108,105,
+110,101,115, 0, 42, 99,117,114,108, 0, 42,115,101,108,108, 0, 99,117,114, 99, 0,115,101,108, 99, 0,109, 97,114,107,101,114,
+115, 0, 42,117,110,100,111, 95, 98,117,102, 0,117,110,100,111, 95,112,111,115, 0,117,110,100,111, 95,108,101,110, 0, 42, 99,
+111,109,112,105,108,101,100, 0,109,116,105,109,101, 0,115,105,122,101, 0,115,101,101,107, 0,100,116,120, 0,112, 97,115,115,
+101,112, 97,114,116, 97,108,112,104, 97, 0, 99,108,105,112,115,116, 97, 0, 99,108,105,112,101,110,100, 0,108,101,110,115, 0,
+111,114,116,104,111, 95,115, 99, 97,108,101, 0,100,114, 97,119,115,105,122,101, 0,115,101,110,115,111,114, 95,120, 0,115,101,
+110,115,111,114, 95,121, 0,115,104,105,102,116,120, 0,115,104,105,102,116,121, 0, 89, 70, 95,100,111,102,100,105,115,116, 0,
+ 42,100,111,102, 95,111, 98, 0,115,101,110,115,111,114, 95,102,105,116, 0,112, 97,100, 91, 55, 93, 0, 42,115, 99,101,110,101,
+ 0,102,114, 97,109,101,110,114, 0,102,114, 97,109,101,115, 0,111,102,102,115,101,116, 0,115,102,114, 97, 0,102,105,101, 95,
+105,109, 97, 0, 99,121, 99,108, 0,111,107, 0,109,117,108,116,105, 95,105,110,100,101,120, 0,108, 97,121,101,114, 0,112, 97,
+115,115, 0,105, 98,117,102,115, 0, 42,103,112,117,116,101,120,116,117,114,101, 0, 42, 97,110,105,109, 0, 42,114,114, 0, 42,
+114,101,110,100,101,114,115, 91, 56, 93, 0,114,101,110,100,101,114, 95,115,108,111,116, 0,108, 97,115,116, 95,114,101,110,100,
+101,114, 95,115,108,111,116, 0,115,111,117,114, 99,101, 0,108, 97,115,116,102,114, 97,109,101, 0,116,112, 97,103,101,102,108,
+ 97,103, 0,116,111,116, 98,105,110,100, 0,120,114,101,112, 0,121,114,101,112, 0,116,119,115,116, 97, 0,116,119,101,110,100,
+ 0, 98,105,110,100, 99,111,100,101, 0, 42,114,101,112, 98,105,110,100, 0, 42,112, 97, 99,107,101,100,102,105,108,101, 0, 42,
+112,114,101,118,105,101,119, 0,108, 97,115,116,117,112,100, 97,116,101, 0,108, 97,115,116,117,115,101,100, 0, 97,110,105,109,
+115,112,101,101,100, 0,103,101,110, 95,120, 0,103,101,110, 95,121, 0,103,101,110, 95,116,121,112,101, 0,103,101,110, 95,102,
+108, 97,103, 0, 97,115,112,120, 0, 97,115,112,121, 0,116,101,120, 99,111, 0,109, 97,112,116,111, 0,109, 97,112,116,111,110,
+101,103, 0, 98,108,101,110,100,116,121,112,101, 0, 42,111, 98,106,101, 99,116, 0, 42,116,101,120, 0,117,118,110, 97,109,101,
+ 91, 54, 52, 93, 0,112,114,111,106,120, 0,112,114,111,106,121, 0,112,114,111,106,122, 0,109, 97,112,112,105,110,103, 0,111,
+102,115, 91, 51, 93, 0,115,105,122,101, 91, 51, 93, 0,114,111,116, 0,116,101,120,102,108, 97,103, 0, 99,111,108,111,114,109,
+111,100,101,108, 0,112,109, 97,112,116,111, 0,112,109, 97,112,116,111,110,101,103, 0,110,111,114,109, 97,112,115,112, 97, 99,
+101, 0,119,104,105, 99,104, 95,111,117,116,112,117,116, 0, 98,114,117,115,104, 95,109, 97,112, 95,109,111,100,101, 0,114, 0,
+103, 0, 98, 0,107, 0,100,101,102, 95,118, 97,114, 0, 99,111,108,102, 97, 99, 0,118, 97,114,102, 97, 99, 0,110,111,114,102,
+ 97, 99, 0,100,105,115,112,102, 97, 99, 0,119, 97,114,112,102, 97, 99, 0, 99,111,108,115,112,101, 99,102, 97, 99, 0,109,105,
+114,114,102, 97, 99, 0, 97,108,112,104, 97,102, 97, 99, 0,100,105,102,102,102, 97, 99, 0,115,112,101, 99,102, 97, 99, 0,101,
+109,105,116,102, 97, 99, 0,104, 97,114,100,102, 97, 99, 0,114, 97,121,109,105,114,114,102, 97, 99, 0,116,114, 97,110,115,108,
+102, 97, 99, 0, 97,109, 98,102, 97, 99, 0, 99,111,108,101,109,105,116,102, 97, 99, 0, 99,111,108,114,101,102,108,102, 97, 99,
+ 0, 99,111,108,116,114, 97,110,115,102, 97, 99, 0,100,101,110,115,102, 97, 99, 0,115, 99, 97,116,116,101,114,102, 97, 99, 0,
+114,101,102,108,102, 97, 99, 0,116,105,109,101,102, 97, 99, 0,108,101,110,103,116,104,102, 97, 99, 0, 99,108,117,109,112,102,
+ 97, 99, 0,100, 97,109,112,102, 97, 99, 0,107,105,110,107,102, 97, 99, 0,114,111,117,103,104,102, 97, 99, 0,112, 97,100,101,
+110,115,102, 97, 99, 0,103,114, 97,118,105,116,121,102, 97, 99, 0,108,105,102,101,102, 97, 99, 0,115,105,122,101,102, 97, 99,
+ 0,105,118,101,108,102, 97, 99, 0,102,105,101,108,100,102, 97, 99, 0,115,104, 97,100,111,119,102, 97, 99, 0,122,101,110,117,
+112,102, 97, 99, 0,122,101,110,100,111,119,110,102, 97, 99, 0, 98,108,101,110,100,102, 97, 99, 0, 42,104, 97,110,100,108,101,
+ 0, 42,112,110, 97,109,101, 0, 42,115,116,110, 97,109,101,115, 0,115,116,121,112,101,115, 0,118, 97,114,115, 0, 42,118, 97,
+114,115,116,114, 0, 42,114,101,115,117,108,116, 0, 42, 99,102,114, 97, 0,100, 97,116, 97, 91, 51, 50, 93, 0, 40, 42,100,111,
+105,116, 41, 40, 41, 0, 40, 42,105,110,115,116, 97,110, 99,101, 95,105,110,105,116, 41, 40, 41, 0, 40, 42, 99, 97,108,108, 98,
+ 97, 99,107, 41, 40, 41, 0,118,101,114,115,105,111,110, 0, 97, 0,105,112,111,116,121,112,101, 0, 42,105,109, 97, 0, 42, 99,
+117, 98,101, 91, 54, 93, 0,105,109, 97,116, 91, 52, 93, 91, 52, 93, 0,111, 98,105,109, 97,116, 91, 51, 93, 91, 51, 93, 0,115,
+116,121,112,101, 0,118,105,101,119,115, 99, 97,108,101, 0,110,111,116,108, 97,121, 0, 99,117, 98,101,114,101,115, 0,100,101,
+112,116,104, 0,114,101, 99, 97,108, 99, 0,108, 97,115,116,115,105,122,101, 0,102, 97,108,108,111,102,102, 95,116,121,112,101,
+ 0,102, 97,108,108,111,102,102, 95,115,111,102,116,110,101,115,115, 0,114, 97,100,105,117,115, 0, 99,111,108,111,114, 95,115,
+111,117,114, 99,101, 0,116,111,116,112,111,105,110,116,115, 0,112,100,112, 97,100, 0,112,115,121,115, 0,112,115,121,115, 95,
+ 99, 97, 99,104,101, 95,115,112, 97, 99,101, 0,111, 98, 95, 99, 97, 99,104,101, 95,115,112, 97, 99,101, 0, 42,112,111,105,110,
+116, 95,116,114,101,101, 0, 42,112,111,105,110,116, 95,100, 97,116, 97, 0,110,111,105,115,101, 95,115,105,122,101, 0,110,111,
+105,115,101, 95,100,101,112,116,104, 0,110,111,105,115,101, 95,105,110,102,108,117,101,110, 99,101, 0,110,111,105,115,101, 95,
+ 98, 97,115,105,115, 0,112,100,112, 97,100, 51, 91, 51, 93, 0,110,111,105,115,101, 95,102, 97, 99, 0,115,112,101,101,100, 95,
+115, 99, 97,108,101, 0,102, 97,108,108,111,102,102, 95,115,112,101,101,100, 95,115, 99, 97,108,101, 0,112,100,112, 97,100, 50,
+ 0, 42, 99,111, 98, 97, 0, 42,102, 97,108,108,111,102,102, 95, 99,117,114,118,101, 0,114,101,115,111,108, 91, 51, 93, 0,105,
+110,116,101,114,112, 95,116,121,112,101, 0,102,105,108,101, 95,102,111,114,109, 97,116, 0,101,120,116,101,110,100, 0,115,109,
+111,107,101,100, 95,116,121,112,101, 0,105,110,116, 95,109,117,108,116,105,112,108,105,101,114, 0,115,116,105,108,108, 95,102,
+114, 97,109,101, 0,115,111,117,114, 99,101, 95,112, 97,116,104, 91, 49, 48, 50, 52, 93, 0, 42,100, 97,116, 97,115,101,116, 0,
+ 99, 97, 99,104,101,100,102,114, 97,109,101, 0,111, 99,101, 97,110,109,111,100, 91, 54, 52, 93, 0,111,117,116,112,117,116, 0,
+110,111,105,115,101,115,105,122,101, 0,116,117,114, 98,117,108, 0, 98,114,105,103,104,116, 0, 99,111,110,116,114, 97,115,116,
+ 0,115, 97,116,117,114, 97,116,105,111,110, 0,114,102, 97, 99, 0,103,102, 97, 99, 0, 98,102, 97, 99, 0,102,105,108,116,101,
+114,115,105,122,101, 0,109,103, 95, 72, 0,109,103, 95,108, 97, 99,117,110, 97,114,105,116,121, 0,109,103, 95,111, 99,116, 97,
+118,101,115, 0,109,103, 95,111,102,102,115,101,116, 0,109,103, 95,103, 97,105,110, 0,100,105,115,116, 95, 97,109,111,117,110,
+116, 0,110,115, 95,111,117,116,115, 99, 97,108,101, 0,118,110, 95,119, 49, 0,118,110, 95,119, 50, 0,118,110, 95,119, 51, 0,
+118,110, 95,119, 52, 0,118,110, 95,109,101,120,112, 0,118,110, 95,100,105,115,116,109, 0,118,110, 95, 99,111,108,116,121,112,
+101, 0,110,111,105,115,101,100,101,112,116,104, 0,110,111,105,115,101,116,121,112,101, 0,110,111,105,115,101, 98, 97,115,105,
+115, 0,110,111,105,115,101, 98, 97,115,105,115, 50, 0,105,109, 97,102,108, 97,103, 0, 99,114,111,112,120,109,105,110, 0, 99,
+114,111,112,121,109,105,110, 0, 99,114,111,112,120,109, 97,120, 0, 99,114,111,112,121,109, 97,120, 0,116,101,120,102,105,108,
+116,101,114, 0, 97,102,109, 97,120, 0,120,114,101,112,101, 97,116, 0,121,114,101,112,101, 97,116, 0, 99,104,101, 99,107,101,
+114,100,105,115,116, 0,110, 97, 98,108, 97, 0,105,117,115,101,114, 0, 42,110,111,100,101,116,114,101,101, 0, 42,112,108,117,
+103,105,110, 0, 42,101,110,118, 0, 42,112,100, 0, 42,118,100, 0, 42,111,116, 0,117,115,101, 95,110,111,100,101,115, 0,108,
+111, 99, 91, 51, 93, 0,114,111,116, 91, 51, 93, 0,109, 97,116, 91, 52, 93, 91, 52, 93, 0,109,105,110, 91, 51, 93, 0,109, 97,
+120, 91, 51, 93, 0, 99,111, 98, 97, 0, 98,108,101,110,100, 95, 99,111,108,111,114, 91, 51, 93, 0, 98,108,101,110,100, 95,102,
+ 97, 99,116,111,114, 0, 98,108,101,110,100, 95,116,121,112,101, 0,112, 97,100, 91, 51, 93, 0,109,111,100,101, 0,116,111,116,
+101,120, 0,115,104,100,119,114, 0,115,104,100,119,103, 0,115,104,100,119, 98, 0,115,104,100,119,112, 97,100, 0,101,110,101,
+114,103,121, 0,100,105,115,116, 0,115,112,111,116,115,105,122,101, 0,115,112,111,116, 98,108,101,110,100, 0,104, 97,105,110,
+116, 0, 97,116,116, 49, 0, 97,116,116, 50, 0, 42, 99,117,114,102, 97,108,108,111,102,102, 0,115,104, 97,100,115,112,111,116,
+115,105,122,101, 0, 98,105, 97,115, 0,115,111,102,116, 0, 99,111,109,112,114,101,115,115,116,104,114,101,115,104, 0,112, 97,
+100, 53, 91, 51, 93, 0, 98,117,102,115,105,122,101, 0,115, 97,109,112, 0, 98,117,102,102,101,114,115, 0,102,105,108,116,101,
+114,116,121,112,101, 0, 98,117,102,102,108, 97,103, 0, 98,117,102,116,121,112,101, 0,114, 97,121, 95,115, 97,109,112, 0,114,
+ 97,121, 95,115, 97,109,112,121, 0,114, 97,121, 95,115, 97,109,112,122, 0,114, 97,121, 95,115, 97,109,112, 95,116,121,112,101,
+ 0, 97,114,101, 97, 95,115,104, 97,112,101, 0, 97,114,101, 97, 95,115,105,122,101, 0, 97,114,101, 97, 95,115,105,122,101,121,
+ 0, 97,114,101, 97, 95,115,105,122,101,122, 0, 97,100, 97,112,116, 95,116,104,114,101,115,104, 0,114, 97,121, 95,115, 97,109,
+112, 95,109,101,116,104,111,100, 0,116,101,120, 97, 99,116, 0,115,104, 97,100,104, 97,108,111,115,116,101,112, 0,115,117,110,
+ 95,101,102,102,101, 99,116, 95,116,121,112,101, 0,115,107,121, 98,108,101,110,100,116,121,112,101, 0,104,111,114,105,122,111,
+110, 95, 98,114,105,103,104,116,110,101,115,115, 0,115,112,114,101, 97,100, 0,115,117,110, 95, 98,114,105,103,104,116,110,101,
+115,115, 0,115,117,110, 95,115,105,122,101, 0, 98, 97, 99,107,115, 99, 97,116,116,101,114,101,100, 95,108,105,103,104,116, 0,
+115,117,110, 95,105,110,116,101,110,115,105,116,121, 0, 97,116,109, 95,116,117,114, 98,105,100,105,116,121, 0, 97,116,109, 95,
+105,110,115, 99, 97,116,116,101,114,105,110,103, 95,102, 97, 99,116,111,114, 0, 97,116,109, 95,101,120,116,105,110, 99,116,105,
+111,110, 95,102, 97, 99,116,111,114, 0, 97,116,109, 95,100,105,115,116, 97,110, 99,101, 95,102, 97, 99,116,111,114, 0,115,107,
+121, 98,108,101,110,100,102, 97, 99, 0,115,107,121, 95,101,120,112,111,115,117,114,101, 0,115,107,121, 95, 99,111,108,111,114,
+115,112, 97, 99,101, 0,112, 97,100, 52, 91, 54, 93, 0, 42,109,116,101,120, 91, 49, 56, 93, 0,112,114, 95,116,101,120,116,117,
+114,101, 0,112, 97,100, 54, 91, 52, 93, 0,100,101,110,115,105,116,121, 0,101,109,105,115,115,105,111,110, 0,115, 99, 97,116,
+116,101,114,105,110,103, 0,114,101,102,108,101, 99,116,105,111,110, 0,101,109,105,115,115,105,111,110, 95, 99,111,108, 91, 51,
+ 93, 0,116,114, 97,110,115,109,105,115,115,105,111,110, 95, 99,111,108, 91, 51, 93, 0,114,101,102,108,101, 99,116,105,111,110,
+ 95, 99,111,108, 91, 51, 93, 0,100,101,110,115,105,116,121, 95,115, 99, 97,108,101, 0,100,101,112,116,104, 95, 99,117,116,111,
+102,102, 0, 97,115,121,109,109,101,116,114,121, 0,115,116,101,112,115,105,122,101, 95,116,121,112,101, 0,115,104, 97,100,101,
+102,108, 97,103, 0,115,104, 97,100,101, 95,116,121,112,101, 0,112,114,101, 99, 97, 99,104,101, 95,114,101,115,111,108,117,116,
+105,111,110, 0,115,116,101,112,115,105,122,101, 0,109,115, 95,100,105,102,102, 0,109,115, 95,105,110,116,101,110,115,105,116,
+121, 0,109,115, 95,115,112,114,101, 97,100, 0, 97,108,112,104, 97, 95, 98,108,101,110,100, 0,102, 97, 99,101, 95,111,114,105,
+101,110,116, 97,116,105,111,110, 0,109, 97,116,101,114,105, 97,108, 95,116,121,112,101, 0,115,112,101, 99,114, 0,115,112,101,
+ 99,103, 0,115,112,101, 99, 98, 0,109,105,114,114, 0,109,105,114,103, 0,109,105,114, 98, 0, 97,109, 98,114, 0, 97,109, 98,
+ 98, 0, 97,109, 98,103, 0, 97,109, 98, 0,101,109,105,116, 0, 97,110,103, 0,115,112,101, 99,116,114, 97, 0,114, 97,121, 95,
+109,105,114,114,111,114, 0, 97,108,112,104, 97, 0,114,101,102, 0,115,112,101, 99, 0,122,111,102,102,115, 0, 97,100,100, 0,
+116,114, 97,110,115,108,117, 99,101,110, 99,121, 0,118,111,108, 0,103, 97,109,101, 0,102,114,101,115,110,101,108, 95,109,105,
+114, 0,102,114,101,115,110,101,108, 95,109,105,114, 95,105, 0,102,114,101,115,110,101,108, 95,116,114, 97, 0,102,114,101,115,
+110,101,108, 95,116,114, 97, 95,105, 0,102,105,108,116,101,114, 0,116,120, 95,108,105,109,105,116, 0,116,120, 95,102, 97,108,
+108,111,102,102, 0,114, 97,121, 95,100,101,112,116,104, 0,114, 97,121, 95,100,101,112,116,104, 95,116,114, 97, 0,104, 97,114,
+ 0,115,101,101,100, 49, 0,115,101,101,100, 50, 0,103,108,111,115,115, 95,109,105,114, 0,103,108,111,115,115, 95,116,114, 97,
+ 0,115, 97,109,112, 95,103,108,111,115,115, 95,109,105,114, 0,115, 97,109,112, 95,103,108,111,115,115, 95,116,114, 97, 0, 97,
+100, 97,112,116, 95,116,104,114,101,115,104, 95,109,105,114, 0, 97,100, 97,112,116, 95,116,104,114,101,115,104, 95,116,114, 97,
+ 0, 97,110,105,115,111, 95,103,108,111,115,115, 95,109,105,114, 0,100,105,115,116, 95,109,105,114, 0,102, 97,100,101,116,111,
+ 95,109,105,114, 0,115,104, 97,100,101, 95,102,108, 97,103, 0,109,111,100,101, 95,108, 0,102,108, 97,114,101, 99, 0,115,116,
+ 97,114, 99, 0,108,105,110,101, 99, 0,114,105,110,103, 99, 0,104, 97,115,105,122,101, 0,102,108, 97,114,101,115,105,122,101,
+ 0,115,117, 98,115,105,122,101, 0,102,108, 97,114,101, 98,111,111,115,116, 0,115,116,114, 97,110,100, 95,115,116, 97, 0,115,
+116,114, 97,110,100, 95,101,110,100, 0,115,116,114, 97,110,100, 95,101, 97,115,101, 0,115,116,114, 97,110,100, 95,115,117,114,
+102,110,111,114, 0,115,116,114, 97,110,100, 95,109,105,110, 0,115,116,114, 97,110,100, 95,119,105,100,116,104,102, 97,100,101,
+ 0,115,116,114, 97,110,100, 95,117,118,110, 97,109,101, 91, 54, 52, 93, 0,115, 98,105, 97,115, 0,108, 98,105, 97,115, 0,115,
+104, 97,100, 95, 97,108,112,104, 97, 0,115,101,112,116,101,120, 0,114,103, 98,115,101,108, 0,112,114, 95,116,121,112,101, 0,
+112,114, 95, 98, 97, 99,107, 0,112,114, 95,108, 97,109,112, 0,109,108, 95,102,108, 97,103, 0,100,105,102,102, 95,115,104, 97,
+100,101,114, 0,115,112,101, 99, 95,115,104, 97,100,101,114, 0,114,111,117,103,104,110,101,115,115, 0,114,101,102,114, 97, 99,
+ 0,112, 97,114, 97,109, 91, 52, 93, 0,114,109,115, 0,100, 97,114,107,110,101,115,115, 0, 42,114, 97,109,112, 95, 99,111,108,
+ 0, 42,114, 97,109,112, 95,115,112,101, 99, 0,114, 97,109,112,105,110, 95, 99,111,108, 0,114, 97,109,112,105,110, 95,115,112,
+101, 99, 0,114, 97,109,112, 98,108,101,110,100, 95, 99,111,108, 0,114, 97,109,112, 98,108,101,110,100, 95,115,112,101, 99, 0,
+114, 97,109,112, 95,115,104,111,119, 0,112, 97,100, 51, 0,114, 97,109,112,102, 97, 99, 95, 99,111,108, 0,114, 97,109,112,102,
+ 97, 99, 95,115,112,101, 99, 0, 42,103,114,111,117,112, 0,102,114,105, 99,116,105,111,110, 0,102,104, 0,114,101,102,108,101,
+ 99,116, 0,102,104,100,105,115,116, 0,120,121,102,114,105, 99,116, 0,100,121,110, 97,109,111,100,101, 0,115,115,115, 95,114,
+ 97,100,105,117,115, 91, 51, 93, 0,115,115,115, 95, 99,111,108, 91, 51, 93, 0,115,115,115, 95,101,114,114,111,114, 0,115,115,
+115, 95,115, 99, 97,108,101, 0,115,115,115, 95,105,111,114, 0,115,115,115, 95, 99,111,108,102, 97, 99, 0,115,115,115, 95,116,
+101,120,102, 97, 99, 0,115,115,115, 95,102,114,111,110,116, 0,115,115,115, 95, 98, 97, 99,107, 0,115,115,115, 95,102,108, 97,
+103, 0,115,115,115, 95,112,114,101,115,101,116, 0,109, 97,112,116,111, 95,116,101,120,116,117,114,101,100, 0,115,104, 97,100,
+111,119,111,110,108,121, 95,102,108, 97,103, 0,105,110,100,101,120, 0,103,112,117,109, 97,116,101,114,105, 97,108, 0, 42, 98,
+ 98, 0,115,101,108, 99,111,108, 49, 0,115,101,108, 99,111,108, 50, 0,113,117, 97,116, 91, 52, 93, 0,101,120,112,120, 0,101,
+120,112,121, 0,101,120,112,122, 0,114, 97,100, 0,114, 97,100, 50, 0,115, 0, 42,109, 97,116, 0, 42,105,109, 97,116, 0,101,
+108,101,109,115, 0,100,105,115,112, 0, 42,101,100,105,116,101,108,101,109,115, 0, 42, 42,109, 97,116, 0,102,108, 97,103, 50,
+ 0,116,111,116, 99,111,108, 0,119,105,114,101,115,105,122,101, 0,114,101,110,100,101,114,115,105,122,101, 0,116,104,114,101,
+115,104, 0, 42,108, 97,115,116,101,108,101,109, 0,118,101, 99, 91, 51, 93, 91, 51, 93, 0, 97,108,102, 97, 0,119,101,105,103,
+104,116, 0,104, 49, 0,104, 50, 0,102, 49, 0,102, 50, 0,102, 51, 0,104,105,100,101, 0,118,101, 99, 91, 52, 93, 0,109, 97,
+116, 95,110,114, 0,112,110,116,115,117, 0,112,110,116,115,118, 0,114,101,115,111,108,117, 0,114,101,115,111,108,118, 0,111,
+114,100,101,114,117, 0,111,114,100,101,114,118, 0,102,108, 97,103,117, 0,102,108, 97,103,118, 0, 42,107,110,111,116,115,117,
+ 0, 42,107,110,111,116,115,118, 0,116,105,108,116, 95,105,110,116,101,114,112, 0,114, 97,100,105,117,115, 95,105,110,116,101,
+114,112, 0, 99,104, 97,114,105,100,120, 0,107,101,114,110, 0,119, 0,104, 0,110,117,114, 98,115, 0, 42,107,101,121,105,110,
+100,101,120, 0,115,104, 97,112,101,110,114, 0,110,117,114, 98, 0, 42,101,100,105,116,110,117,114, 98, 0, 42, 98,101,118,111,
+ 98,106, 0, 42,116, 97,112,101,114,111, 98,106, 0, 42,116,101,120,116,111,110, 99,117,114,118,101, 0, 42,112, 97,116,104, 0,
+ 42,107,101,121, 0, 98,101,118, 0,100,114, 97,119,102,108, 97,103, 0,116,119,105,115,116, 95,109,111,100,101, 0,116,119,105,
+115,116, 95,115,109,111,111,116,104, 0,115,109, 97,108,108, 99, 97,112,115, 95,115, 99, 97,108,101, 0,112, 97,116,104,108,101,
+110, 0, 98,101,118,114,101,115,111,108, 0,119,105,100,116,104, 0,101,120,116, 49, 0,101,120,116, 50, 0,114,101,115,111,108,
+117, 95,114,101,110, 0,114,101,115,111,108,118, 95,114,101,110, 0, 97, 99,116,110,117, 0, 42,108, 97,115,116,115,101,108, 0,
+115,112, 97, 99,101,109,111,100,101, 0,115,112, 97, 99,105,110,103, 0,108,105,110,101,100,105,115,116, 0,115,104,101, 97,114,
+ 0,102,115,105,122,101, 0,119,111,114,100,115,112, 97, 99,101, 0,117,108,112,111,115, 0,117,108,104,101,105,103,104,116, 0,
+120,111,102, 0,121,111,102, 0,108,105,110,101,119,105,100,116,104, 0, 42,115,116,114, 0, 42,115,101,108, 98,111,120,101,115,
+ 0, 42,101,100,105,116,102,111,110,116, 0,102, 97,109,105,108,121, 91, 50, 52, 93, 0, 42,118,102,111,110,116, 0, 42,118,102,
+111,110,116, 98, 0, 42,118,102,111,110,116,105, 0, 42,118,102,111,110,116, 98,105, 0,115,101,112, 99,104, 97,114, 0,116,111,
+116, 98,111,120, 0, 97, 99,116, 98,111,120, 0, 42,116, 98, 0,115,101,108,115,116, 97,114,116, 0,115,101,108,101,110,100, 0,
+ 42,115,116,114,105,110,102,111, 0, 99,117,114,105,110,102,111, 0, 42,109,115,101,108,101, 99,116, 0, 42,109,112,111,108,121,
+ 0, 42,109,116,112,111,108,121, 0, 42,109,108,111,111,112, 0, 42,109,108,111,111,112,117,118, 0, 42,109,108,111,111,112, 99,
+111,108, 0, 42,109,102, 97, 99,101, 0, 42,109,116,102, 97, 99,101, 0, 42,116,102, 97, 99,101, 0, 42,109,118,101,114,116, 0,
+ 42,109,101,100,103,101, 0, 42,100,118,101,114,116, 0, 42,109, 99,111,108, 0, 42,109,115,116,105, 99,107,121, 0, 42,116,101,
+120, 99,111,109,101,115,104, 0, 42,101,100,105,116, 95, 98,116,109,101,115,104, 0,118,100, 97,116, 97, 0,101,100, 97,116, 97,
+ 0,102,100, 97,116, 97, 0,112,100, 97,116, 97, 0,108,100, 97,116, 97, 0,116,111,116,101,100,103,101, 0,116,111,116,102, 97,
+ 99,101, 0,116,111,116,115,101,108,101, 99,116, 0,116,111,116,112,111,108,121, 0,116,111,116,108,111,111,112, 0, 97, 99,116,
+ 95,102, 97, 99,101, 0,115,109,111,111,116,104,114,101,115,104, 0,115,117, 98,100,105,118, 0,115,117, 98,100,105,118,114, 0,
+115,117, 98,115,117,114,102,116,121,112,101, 0,101,100,105,116,102,108, 97,103, 0, 42,109,114, 0, 42,116,112, 97,103,101, 0,
+117,118, 91, 52, 93, 91, 50, 93, 0, 99,111,108, 91, 52, 93, 0,116,114, 97,110,115,112, 0,116,105,108,101, 0,117,110,119,114,
+ 97,112, 0,118, 49, 0,118, 50, 0,118, 51, 0,118, 52, 0,101,100, 99,111,100,101, 0, 99,114,101, 97,115,101, 0, 98,119,101,
+105,103,104,116, 0,100,101,102, 95,110,114, 0, 42,100,119, 0,116,111,116,119,101,105,103,104,116, 0, 99,111, 91, 51, 93, 0,
+110,111, 91, 51, 93, 0,108,111,111,112,115,116, 97,114,116, 0,118, 0,101, 0,117,118, 91, 50, 93, 0, 99,111, 91, 50, 93, 0,
+102, 0,105, 0,115, 91, 50, 53, 54, 93, 0,116,111,116,100,105,115,112, 0,108,101,118,101,108, 0, 40, 42,100,105,115,112,115,
+ 41, 40, 41, 0, 42,104,105,100,100,101,110, 0,118, 91, 52, 93, 0,109,105,100, 0,112, 97,100, 91, 50, 93, 0,118, 91, 50, 93,
+ 0, 42,102, 97, 99,101,115, 0, 42, 99,111,108,102, 97, 99,101,115, 0, 42,101,100,103,101,115, 0, 42,118,101,114,116,115, 0,
+108,101,118,101,108,115, 0,108,101,118,101,108, 95, 99,111,117,110,116, 0, 99,117,114,114,101,110,116, 0,110,101,119,108,118,
+108, 0,101,100,103,101,108,118,108, 0,112,105,110,108,118,108, 0,114,101,110,100,101,114,108,118,108, 0,117,115,101, 95, 99,
+111,108, 0, 42,101,100,103,101, 95,102,108, 97,103,115, 0, 42,101,100,103,101, 95, 99,114,101, 97,115,101,115, 0,115,116, 97,
+ 99,107,105,110,100,101,120, 0, 42,101,114,114,111,114, 0,109,111,100,105,102,105,101,114, 0, 42,116,101,120,116,117,114,101,
+ 0, 42,109, 97,112, 95,111, 98,106,101, 99,116, 0,117,118,108, 97,121,101,114, 95,110, 97,109,101, 91, 54, 52, 93, 0,117,118,
+108, 97,121,101,114, 95,116,109,112, 0,116,101,120,109, 97,112,112,105,110,103, 0,115,117, 98,100,105,118, 84,121,112,101, 0,
+114,101,110,100,101,114, 76,101,118,101,108,115, 0, 42,101,109, 67, 97, 99,104,101, 0, 42,109, 67, 97, 99,104,101, 0,115,116,
+114,101,110,103,116,104, 0,100,101,102, 97,120,105,115, 0,112, 97,100, 91, 54, 93, 0,108,101,110,103,116,104, 0,114, 97,110,
+100,111,109,105,122,101, 0,115,101,101,100, 0, 42,111, 98, 95, 97,114,109, 0, 42,115,116, 97,114,116, 95, 99, 97,112, 0, 42,
+101,110,100, 95, 99, 97,112, 0, 42, 99,117,114,118,101, 95,111, 98, 0, 42,111,102,102,115,101,116, 95,111, 98, 0,111,102,102,
+115,101,116, 91, 51, 93, 0,115, 99, 97,108,101, 91, 51, 93, 0,109,101,114,103,101, 95,100,105,115,116, 0,102,105,116, 95,116,
+121,112,101, 0,111,102,102,115,101,116, 95,116,121,112,101, 0, 99,111,117,110,116, 0, 97,120,105,115, 0,116,111,108,101,114,
+ 97,110, 99,101, 0, 42,109,105,114,114,111,114, 95,111, 98, 0,115,112,108,105,116, 95, 97,110,103,108,101, 0,118, 97,108,117,
+101, 0,114,101,115, 0,118, 97,108, 95,102,108, 97,103,115, 0,108,105,109, 95,102,108, 97,103,115, 0,101, 95,102,108, 97,103,
+115, 0, 98,101,118,101,108, 95, 97,110,103,108,101, 0,100,101,102,103,114,112, 95,110, 97,109,101, 91, 54, 52, 93, 0, 42,100,
+111,109, 97,105,110, 0, 42,102,108,111,119, 0, 42, 99,111,108,108, 0,116,105,109,101, 0,100,105,114,101, 99,116,105,111,110,
+ 0,109,105,100,108,101,118,101,108, 0, 42,112,114,111,106,101, 99,116,111,114,115, 91, 49, 48, 93, 0, 42,105,109, 97,103,101,
+ 0,110,117,109, 95,112,114,111,106,101, 99,116,111,114,115, 0, 97,115,112,101, 99,116,120, 0, 97,115,112,101, 99,116,121, 0,
+115, 99, 97,108,101,120, 0,115, 99, 97,108,101,121, 0,112,101,114, 99,101,110,116, 0,102, 97, 99,101, 67,111,117,110,116, 0,
+102, 97, 99, 0,114,101,112,101, 97,116, 0, 42,111, 98,106,101, 99,116, 99,101,110,116,101,114, 0,115,116, 97,114,116,120, 0,
+115,116, 97,114,116,121, 0,104,101,105,103,104,116, 0,110, 97,114,114,111,119, 0,115,112,101,101,100, 0,100, 97,109,112, 0,
+102, 97,108,108,111,102,102, 0,116,105,109,101,111,102,102,115, 0,108,105,102,101,116,105,109,101, 0,100,101,102,111,114,109,
+102,108, 97,103, 0,109,117,108,116,105, 0, 42,112,114,101,118, 67,111,115, 0,115,117, 98,116, 97,114,103,101,116, 91, 54, 52,
+ 93, 0,112, 97,114,101,110,116,105,110,118, 91, 52, 93, 91, 52, 93, 0, 99,101,110,116, 91, 51, 93, 0, 42,105,110,100,101,120,
+ 97,114, 0,116,111,116,105,110,100,101,120, 0,102,111,114, 99,101, 0, 42, 99,108,111,116,104, 79, 98,106,101, 99,116, 0, 42,
+115,105,109, 95,112, 97,114,109,115, 0, 42, 99,111,108,108, 95,112, 97,114,109,115, 0, 42,112,111,105,110,116, 95, 99, 97, 99,
+104,101, 0,112,116, 99, 97, 99,104,101,115, 0, 42,120, 0, 42,120,110,101,119, 0, 42,120,111,108,100, 0, 42, 99,117,114,114,
+101,110,116, 95,120,110,101,119, 0, 42, 99,117,114,114,101,110,116, 95,120, 0, 42, 99,117,114,114,101,110,116, 95,118, 0, 42,
+109,102, 97, 99,101,115, 0,110,117,109,118,101,114,116,115, 0,110,117,109,102, 97, 99,101,115, 0,116,105,109,101, 95,120, 0,
+116,105,109,101, 95,120,110,101,119, 0, 42, 98,118,104,116,114,101,101, 0, 42,118, 0, 42,100,109, 0, 99,102,114, 97, 0,111,
+112,101,114, 97,116,105,111,110, 0,118,101,114,116,101,120, 0,116,111,116,105,110,102,108,117,101,110, 99,101, 0,103,114,105,
+100,115,105,122,101, 0, 42, 98,105,110,100,105,110,102,108,117,101,110, 99,101,115, 0, 42, 98,105,110,100,111,102,102,115,101,
+116,115, 0, 42, 98,105,110,100, 99, 97,103,101, 99,111,115, 0,116,111,116, 99, 97,103,101,118,101,114,116, 0, 42,100,121,110,
+103,114,105,100, 0, 42,100,121,110,105,110,102,108,117,101,110, 99,101,115, 0, 42,100,121,110,118,101,114,116,115, 0, 42,112,
+ 97,100, 50, 0,100,121,110,103,114,105,100,115,105,122,101, 0,100,121,110, 99,101,108,108,109,105,110, 91, 51, 93, 0,100,121,
+110, 99,101,108,108,119,105,100,116,104, 0, 98,105,110,100,109, 97,116, 91, 52, 93, 91, 52, 93, 0, 42, 98,105,110,100,119,101,
+105,103,104,116,115, 0, 42, 98,105,110,100, 99,111,115, 0, 40, 42, 98,105,110,100,102,117,110, 99, 41, 40, 41, 0, 42,112,115,
+121,115, 0,116,111,116,100,109,118,101,114,116, 0,116,111,116,100,109,101,100,103,101, 0,116,111,116,100,109,102, 97, 99,101,
+ 0,112,111,115,105,116,105,111,110, 0,114, 97,110,100,111,109, 95,112,111,115,105,116,105,111,110, 0, 42,102, 97, 99,101,112,
+ 97, 0,118,103,114,111,117,112, 0,112,114,111,116,101, 99,116, 0,108,118,108, 0,115, 99,117,108,112,116,108,118,108, 0,116,
+111,116,108,118,108, 0,115,105,109,112,108,101, 0, 42,102,115,115, 0, 42,116, 97,114,103,101,116, 0, 42, 97,117,120, 84, 97,
+114,103,101,116, 0,118,103,114,111,117,112, 95,110, 97,109,101, 91, 54, 52, 93, 0,107,101,101,112, 68,105,115,116, 0,115,104,
+114,105,110,107, 84,121,112,101, 0,115,104,114,105,110,107, 79,112,116,115, 0,112,114,111,106, 65,120,105,115, 0,115,117, 98,
+115,117,114,102, 76,101,118,101,108,115, 0, 42,111,114,105,103,105,110, 0,102, 97, 99,116,111,114, 0,108,105,109,105,116, 91,
+ 50, 93, 0,111,114,105,103,105,110, 79,112,116,115, 0,111,102,102,115,101,116, 95,102, 97, 99, 0,111,102,102,115,101,116, 95,
+102, 97, 99, 95,118,103, 0, 99,114,101, 97,115,101, 95,105,110,110,101,114, 0, 99,114,101, 97,115,101, 95,111,117,116,101,114,
+ 0, 99,114,101, 97,115,101, 95,114,105,109, 0,109, 97,116, 95,111,102,115, 0,109, 97,116, 95,111,102,115, 95,114,105,109, 0,
+ 42,111, 98, 95, 97,120,105,115, 0,115,116,101,112,115, 0,114,101,110,100,101,114, 95,115,116,101,112,115, 0,105,116,101,114,
+ 0,115, 99,114,101,119, 95,111,102,115, 0, 97,110,103,108,101, 0, 42,111, 99,101, 97,110, 0, 42,111, 99,101, 97,110, 99, 97,
+ 99,104,101, 0,114,101,115,111,108,117,116,105,111,110, 0,115,112, 97,116,105, 97,108, 95,115,105,122,101, 0,119,105,110,100,
+ 95,118,101,108,111, 99,105,116,121, 0,115,109, 97,108,108,101,115,116, 95,119, 97,118,101, 0,119, 97,118,101, 95, 97,108,105,
+103,110,109,101,110,116, 0,119, 97,118,101, 95,100,105,114,101, 99,116,105,111,110, 0,119, 97,118,101, 95,115, 99, 97,108,101,
+ 0, 99,104,111,112, 95, 97,109,111,117,110,116, 0,102,111, 97,109, 95, 99,111,118,101,114, 97,103,101, 0, 98, 97,107,101,115,
+116, 97,114,116, 0, 98, 97,107,101,101,110,100, 0, 99, 97, 99,104,101,112, 97,116,104, 91, 49, 48, 50, 52, 93, 0,102,111, 97,
+109,108, 97,121,101,114,110, 97,109,101, 91, 54, 52, 93, 0, 99, 97, 99,104,101,100, 0,103,101,111,109,101,116,114,121, 95,109,
+111,100,101, 0,114,101,102,114,101,115,104, 0,114,101,112,101, 97,116, 95,120, 0,114,101,112,101, 97,116, 95,121, 0,102,111,
+ 97,109, 95,102, 97,100,101, 0, 42,111, 98,106,101, 99,116, 95,102,114,111,109, 0, 42,111, 98,106,101, 99,116, 95,116,111, 0,
+102, 97,108,108,111,102,102, 95,114, 97,100,105,117,115, 0,101,100,105,116, 95,102,108, 97,103,115, 0,100,101,102, 97,117,108,
+116, 95,119,101,105,103,104,116, 0, 42, 99,109, 97,112, 95, 99,117,114,118,101, 0, 97,100,100, 95,116,104,114,101,115,104,111,
+108,100, 0,114,101,109, 95,116,104,114,101,115,104,111,108,100, 0,109, 97,115,107, 95, 99,111,110,115,116, 97,110,116, 0,109,
+ 97,115,107, 95,100,101,102,103,114,112, 95,110, 97,109,101, 91, 54, 52, 93, 0,109, 97,115,107, 95,116,101,120, 95,117,115,101,
+ 95, 99,104, 97,110,110,101,108, 0, 42,109, 97,115,107, 95,116,101,120,116,117,114,101, 0, 42,109, 97,115,107, 95,116,101,120,
+ 95,109, 97,112, 95,111, 98,106, 0,109, 97,115,107, 95,116,101,120, 95,109, 97,112,112,105,110,103, 0,109, 97,115,107, 95,116,
+101,120, 95,117,118,108, 97,121,101,114, 95,110, 97,109,101, 91, 54, 52, 93, 0,112, 97,100, 95,105, 49, 0,100,101,102,103,114,
+112, 95,110, 97,109,101, 95, 97, 91, 54, 52, 93, 0,100,101,102,103,114,112, 95,110, 97,109,101, 95, 98, 91, 54, 52, 93, 0,100,
+101,102, 97,117,108,116, 95,119,101,105,103,104,116, 95, 97, 0,100,101,102, 97,117,108,116, 95,119,101,105,103,104,116, 95, 98,
+ 0,109,105,120, 95,109,111,100,101, 0,109,105,120, 95,115,101,116, 0,112, 97,100, 95, 99, 49, 91, 54, 93, 0,112,114,111,120,
+105,109,105,116,121, 95,109,111,100,101, 0,112,114,111,120,105,109,105,116,121, 95,102,108, 97,103,115, 0, 42,112,114,111,120,
+105,109,105,116,121, 95,111, 98, 95,116, 97,114,103,101,116, 0,109,105,110, 95,100,105,115,116, 0,109, 97,120, 95,100,105,115,
+116, 0,112, 97,100, 95,115, 49, 0, 42, 99, 97,110,118, 97,115, 0, 42, 98,114,117,115,104, 0,116,104,114,101,115,104,111,108,
+100, 0,115, 99, 97,108,101, 0,104,101,114,109,105,116,101, 95,110,117,109, 0, 42,108, 97,116,116, 0,112,110,116,115,119, 0,
+111,112,110,116,115,117, 0,111,112,110,116,115,118, 0,111,112,110,116,115,119, 0,116,121,112,101,117, 0,116,121,112,101,118,
+ 0,116,121,112,101,119, 0,102,117, 0,102,118, 0,102,119, 0,100,117, 0,100,118, 0,100,119, 0, 42,100,101,102, 0, 42,108,
+ 97,116,116,105, 99,101,100, 97,116, 97, 0,108, 97,116,109, 97,116, 91, 52, 93, 91, 52, 93, 0, 42,101,100,105,116,108, 97,116,
+116, 0,118,101, 99, 91, 56, 93, 91, 51, 93, 0, 42,115, 99,117,108,112,116, 0,112, 97,114,116,121,112,101, 0,112, 97,114, 49,
+ 0,112, 97,114, 50, 0,112, 97,114, 51, 0,112, 97,114,115,117, 98,115,116,114, 91, 54, 52, 93, 0, 42,116,114, 97, 99,107, 0,
+ 42,112,114,111,120,121, 0, 42,112,114,111,120,121, 95,103,114,111,117,112, 0, 42,112,114,111,120,121, 95,102,114,111,109, 0,
+ 42, 97, 99,116,105,111,110, 0, 42,112,111,115,101,108,105, 98, 0, 42,112,111,115,101, 0, 42,103,112,100, 0, 97,118,115, 0,
+ 42,109,112, 97,116,104, 0, 99,111,110,115,116,114, 97,105,110,116, 67,104, 97,110,110,101,108,115, 0,101,102,102,101, 99,116,
+ 0,100,101,102, 98, 97,115,101, 0,109,111,100,105,102,105,101,114,115, 0,114,101,115,116,111,114,101, 95,109,111,100,101, 0,
+ 42,109, 97,116, 98,105,116,115, 0, 97, 99,116, 99,111,108, 0,100,108,111, 99, 91, 51, 93, 0,111,114,105,103, 91, 51, 93, 0,
+100,115,105,122,101, 91, 51, 93, 0,100,115, 99, 97,108,101, 91, 51, 93, 0,100,114,111,116, 91, 51, 93, 0,100,113,117, 97,116,
+ 91, 52, 93, 0,114,111,116, 65,120,105,115, 91, 51, 93, 0,100,114,111,116, 65,120,105,115, 91, 51, 93, 0,114,111,116, 65,110,
+103,108,101, 0,100,114,111,116, 65,110,103,108,101, 0,111, 98,109, 97,116, 91, 52, 93, 91, 52, 93, 0, 99,111,110,115,116,105,
+110,118, 91, 52, 93, 91, 52, 93, 0,105,109, 97,116, 95,114,101,110, 91, 52, 93, 91, 52, 93, 0,108, 97,121, 0,112, 97,100, 54,
+ 0, 99,111,108, 98,105,116,115, 0,116,114, 97,110,115,102,108, 97,103, 0,112,114,111,116,101, 99,116,102,108, 97,103, 0,116,
+114, 97, 99,107,102,108, 97,103, 0,117,112,102,108, 97,103, 0,110,108, 97,102,108, 97,103, 0,105,112,111,102,108, 97,103, 0,
+115, 99, 97,102,108, 97,103, 0,115, 99, 97,118,105,115,102,108, 97,103, 0,112, 97,100, 53, 0,100,117,112,111,110, 0,100,117,
+112,111,102,102, 0,100,117,112,115,116, 97, 0,100,117,112,101,110,100, 0,115,102, 0,109, 97,115,115, 0,100, 97,109,112,105,
+110,103, 0,105,110,101,114,116,105, 97, 0,102,111,114,109,102, 97, 99,116,111,114, 0,114,100, 97,109,112,105,110,103, 0,109,
+ 97,114,103,105,110, 0,109, 97,120, 95,118,101,108, 0,109,105,110, 95,118,101,108, 0,109, 95, 99,111,110,116, 97, 99,116, 80,
+114,111, 99,101,115,115,105,110,103, 84,104,114,101,115,104,111,108,100, 0,111, 98,115,116, 97, 99,108,101, 82, 97,100, 0,114,
+111,116,109,111,100,101, 0, 98,111,117,110,100,116,121,112,101, 0, 99,111,108,108,105,115,105,111,110, 95, 98,111,117,110,100,
+116,121,112,101, 0,114,101,115,116,114,105, 99,116,102,108, 97,103, 0,100,116, 0,101,109,112,116,121, 95,100,114, 97,119,116,
+121,112,101, 0,101,109,112,116,121, 95,100,114, 97,119,115,105,122,101, 0,100,117,112,102, 97, 99,101,115, 99, 97, 0,112,114,
+111,112, 0,115,101,110,115,111,114,115, 0, 99,111,110,116,114,111,108,108,101,114,115, 0, 97, 99,116,117, 97,116,111,114,115,
+ 0, 98, 98,115,105,122,101, 91, 51, 93, 0, 97, 99,116,100,101,102, 0,103, 97,109,101,102,108, 97,103, 0,103, 97,109,101,102,
+108, 97,103, 50, 0, 42, 98,115,111,102,116, 0,115,111,102,116,102,108, 97,103, 0, 97,110,105,115,111,116,114,111,112,105, 99,
+ 70,114,105, 99,116,105,111,110, 91, 51, 93, 0, 99,111,110,115,116,114, 97,105,110,116,115, 0,110,108, 97,115,116,114,105,112,
+115, 0,104,111,111,107,115, 0,112, 97,114,116,105, 99,108,101,115,121,115,116,101,109, 0, 42,115,111,102,116, 0, 42,100,117,
+112, 95,103,114,111,117,112, 0, 98,111,100,121, 95,116,121,112,101, 0,115,104, 97,112,101,102,108, 97,103, 0, 42,102,108,117,
+105,100,115,105,109, 83,101,116,116,105,110,103,115, 0, 42,100,101,114,105,118,101,100, 68,101,102,111,114,109, 0, 42,100,101,
+114,105,118,101,100, 70,105,110, 97,108, 0,108, 97,115,116, 68, 97,116, 97, 77, 97,115,107, 0, 99,117,115,116,111,109,100, 97,
+116, 97, 95,109, 97,115,107, 0,115,116, 97,116,101, 0,105,110,105,116, 95,115,116, 97,116,101, 0,103,112,117,108, 97,109,112,
+ 0,112, 99, 95,105,100,115, 0, 42,100,117,112,108,105,108,105,115,116, 0,105,109, 97, 95,111,102,115, 91, 50, 93, 0, 99,117,
+114,105,110,100,101,120, 0, 97, 99,116,105,118,101, 0,111,114,105,103,108, 97,121, 0,111,109, 97,116, 91, 52, 93, 91, 52, 93,
+ 0,111,114, 99,111, 91, 51, 93, 0,110,111, 95,100,114, 97,119, 0, 97,110,105,109, 97,116,101,100, 0,100,101,102,108,101, 99,
+116, 0,102,111,114, 99,101,102,105,101,108,100, 0,115,104, 97,112,101, 0,116,101,120, 95,109,111,100,101, 0,107,105,110,107,
+ 0,107,105,110,107, 95, 97,120,105,115, 0,122,100,105,114, 0,102, 95,115,116,114,101,110,103,116,104, 0,102, 95,100, 97,109,
+112, 0,102, 95,102,108,111,119, 0,102, 95,115,105,122,101, 0,102, 95,112,111,119,101,114, 0,109, 97,120,100,105,115,116, 0,
+109,105,110,100,105,115,116, 0,102, 95,112,111,119,101,114, 95,114, 0,109, 97,120,114, 97,100, 0,109,105,110,114, 97,100, 0,
+112,100,101,102, 95,100, 97,109,112, 0,112,100,101,102, 95,114,100, 97,109,112, 0,112,100,101,102, 95,112,101,114,109, 0,112,
+100,101,102, 95,102,114,105, 99,116, 0,112,100,101,102, 95,114,102,114,105, 99,116, 0,112,100,101,102, 95,115,116,105, 99,107,
+110,101,115,115, 0, 97, 98,115,111,114,112,116,105,111,110, 0,112,100,101,102, 95,115, 98,100, 97,109,112, 0,112,100,101,102,
+ 95,115, 98,105,102,116, 0,112,100,101,102, 95,115, 98,111,102,116, 0, 99,108,117,109,112, 95,102, 97, 99, 0, 99,108,117,109,
+112, 95,112,111,119, 0,107,105,110,107, 95,102,114,101,113, 0,107,105,110,107, 95,115,104, 97,112,101, 0,107,105,110,107, 95,
+ 97,109,112, 0,102,114,101,101, 95,101,110,100, 0,116,101,120, 95,110, 97, 98,108, 97, 0, 42,114,110,103, 0,102, 95,110,111,
+105,115,101, 0,119,101,105,103,104,116, 91, 49, 51, 93, 0,103,108,111, 98, 97,108, 95,103,114, 97,118,105,116,121, 0,114,116,
+ 91, 51, 93, 0,116,111,116,100, 97,116, 97, 0,102,114, 97,109,101, 0,116,111,116,112,111,105,110,116, 0,100, 97,116, 97, 95,
+116,121,112,101,115, 0, 42,100, 97,116, 97, 91, 56, 93, 0, 42, 99,117,114, 91, 56, 93, 0,101,120,116,114, 97,100, 97,116, 97,
+ 0,115,116,101,112, 0,115,105,109,102,114, 97,109,101, 0,115,116, 97,114,116,102,114, 97,109,101, 0,101,110,100,102,114, 97,
+109,101, 0,101,100,105,116,102,114, 97,109,101, 0,108, 97,115,116, 95,101,120, 97, 99,116, 0,108, 97,115,116, 95,118, 97,108,
+105,100, 0, 99,111,109,112,114,101,115,115,105,111,110, 0,112,114,101,118, 95,110, 97,109,101, 91, 54, 52, 93, 0,105,110,102,
+111, 91, 54, 52, 93, 0,112, 97,116,104, 91, 49, 48, 50, 52, 93, 0, 42, 99, 97, 99,104,101,100, 95,102,114, 97,109,101,115, 0,
+109,101,109, 95, 99, 97, 99,104,101, 0, 42,101,100,105,116, 0, 40, 42,102,114,101,101, 95,101,100,105,116, 41, 40, 41, 0,108,
+105,110, 83,116,105,102,102, 0, 97,110,103, 83,116,105,102,102, 0,118,111,108,117,109,101, 0,118,105,116,101,114, 97,116,105,
+111,110,115, 0,112,105,116,101,114, 97,116,105,111,110,115, 0,100,105,116,101,114, 97,116,105,111,110,115, 0, 99,105,116,101,
+114, 97,116,105,111,110,115, 0,107, 83, 82, 72, 82, 95, 67, 76, 0,107, 83, 75, 72, 82, 95, 67, 76, 0,107, 83, 83, 72, 82, 95,
+ 67, 76, 0,107, 83, 82, 95, 83, 80, 76, 84, 95, 67, 76, 0,107, 83, 75, 95, 83, 80, 76, 84, 95, 67, 76, 0,107, 83, 83, 95, 83,
+ 80, 76, 84, 95, 67, 76, 0,107, 86, 67, 70, 0,107, 68, 80, 0,107, 68, 71, 0,107, 76, 70, 0,107, 80, 82, 0,107, 86, 67, 0,
+107, 68, 70, 0,107, 77, 84, 0,107, 67, 72, 82, 0,107, 75, 72, 82, 0,107, 83, 72, 82, 0,107, 65, 72, 82, 0, 99,111,108,108,
+105,115,105,111,110,102,108, 97,103,115, 0,110,117,109, 99,108,117,115,116,101,114,105,116,101,114, 97,116,105,111,110,115, 0,
+119,101,108,100,105,110,103, 0,116,111,116,115,112,114,105,110,103, 0, 42, 98,112,111,105,110,116, 0, 42, 98,115,112,114,105,
+110,103, 0,109,115,103, 95,108,111, 99,107, 0,109,115,103, 95,118, 97,108,117,101, 0,110,111,100,101,109, 97,115,115, 0,110,
+ 97,109,101,100, 86, 71, 95, 77, 97,115,115, 91, 54, 52, 93, 0,103,114, 97,118, 0,109,101,100,105, 97,102,114,105, 99,116, 0,
+114,107,108,105,109,105,116, 0,112,104,121,115,105, 99,115, 95,115,112,101,101,100, 0,103,111, 97,108,115,112,114,105,110,103,
+ 0,103,111, 97,108,102,114,105, 99,116, 0,109,105,110,103,111, 97,108, 0,109, 97,120,103,111, 97,108, 0,100,101,102,103,111,
+ 97,108, 0,118,101,114,116,103,114,111,117,112, 0,110, 97,109,101,100, 86, 71, 95, 83,111,102,116,103,111, 97,108, 91, 54, 52,
+ 93, 0,102,117,122,122,121,110,101,115,115, 0,105,110,115,112,114,105,110,103, 0,105,110,102,114,105, 99,116, 0,110, 97,109,
+101,100, 86, 71, 95, 83,112,114,105,110,103, 95, 75, 91, 54, 52, 93, 0,101,102,114, 97, 0,105,110,116,101,114,118, 97,108, 0,
+108,111, 99, 97,108, 0,115,111,108,118,101,114,102,108, 97,103,115, 0, 42, 42,107,101,121,115, 0,116,111,116,112,111,105,110,
+116,107,101,121, 0,115,101, 99,111,110,100,115,112,114,105,110,103, 0, 99,111,108, 98, 97,108,108, 0, 98, 97,108,108,100, 97,
+109,112, 0, 98, 97,108,108,115,116,105,102,102, 0,115, 98, 99, 95,109,111,100,101, 0, 97,101,114,111,101,100,103,101, 0,109,
+105,110,108,111,111,112,115, 0,109, 97,120,108,111,111,112,115, 0, 99,104,111,107,101, 0,115,111,108,118,101,114, 95, 73, 68,
+ 0,112,108, 97,115,116,105, 99, 0,115,112,114,105,110,103,112,114,101,108,111, 97,100, 0, 42,115, 99,114, 97,116, 99,104, 0,
+115,104,101, 97,114,115,116,105,102,102, 0,105,110,112,117,115,104, 0, 42,112,111,105,110,116, 99, 97, 99,104,101, 0, 42,101,
+102,102,101, 99,116,111,114, 95,119,101,105,103,104,116,115, 0,108, 99,111,109, 91, 51, 93, 0,108,114,111,116, 91, 51, 93, 91,
+ 51, 93, 0,108,115, 99, 97,108,101, 91, 51, 93, 91, 51, 93, 0,108, 97,115,116, 95,102,114, 97,109,101, 0,118,101,108, 91, 51,
+ 93, 0, 42,102,109,100, 0,115,104,111,119, 95, 97,100,118, 97,110, 99,101,100,111,112,116,105,111,110,115, 0,114,101,115,111,
+108,117,116,105,111,110,120,121,122, 0,112,114,101,118,105,101,119,114,101,115,120,121,122, 0,114,101, 97,108,115,105,122,101,
+ 0,103,117,105, 68,105,115,112,108, 97,121, 77,111,100,101, 0,114,101,110,100,101,114, 68,105,115,112,108, 97,121, 77,111,100,
+101, 0,118,105,115, 99,111,115,105,116,121, 86, 97,108,117,101, 0,118,105,115, 99,111,115,105,116,121, 77,111,100,101, 0,118,
+105,115, 99,111,115,105,116,121, 69,120,112,111,110,101,110,116, 0,103,114, 97,118, 91, 51, 93, 0, 97,110,105,109, 83,116, 97,
+114,116, 0, 97,110,105,109, 69,110,100, 0, 98, 97,107,101, 83,116, 97,114,116, 0, 98, 97,107,101, 69,110,100, 0,102,114, 97,
+109,101, 79,102,102,115,101,116, 0,103,115,116, 97,114, 0,109, 97,120, 82,101,102,105,110,101, 0,105,110,105, 86,101,108,120,
+ 0,105,110,105, 86,101,108,121, 0,105,110,105, 86,101,108,122, 0, 42,111,114,103, 77,101,115,104, 0, 42,109,101,115,104, 66,
+ 66, 0,115,117,114,102,100, 97,116, 97, 80, 97,116,104, 91, 49, 48, 50, 52, 93, 0, 98, 98, 83,116, 97,114,116, 91, 51, 93, 0,
+ 98, 98, 83,105,122,101, 91, 51, 93, 0,116,121,112,101, 70,108, 97,103,115, 0,100,111,109, 97,105,110, 78,111,118,101, 99,103,
+101,110, 0,118,111,108,117,109,101, 73,110,105,116, 84,121,112,101, 0,112, 97,114,116, 83,108,105,112, 86, 97,108,117,101, 0,
+103,101,110,101,114, 97,116,101, 84,114, 97, 99,101,114,115, 0,103,101,110,101,114, 97,116,101, 80, 97,114,116,105, 99,108,101,
+115, 0,115,117,114,102, 97, 99,101, 83,109,111,111,116,104,105,110,103, 0,115,117,114,102, 97, 99,101, 83,117, 98,100,105,118,
+115, 0,112, 97,114,116,105, 99,108,101, 73,110,102, 83,105,122,101, 0,112, 97,114,116,105, 99,108,101, 73,110,102, 65,108,112,
+104, 97, 0,102, 97,114, 70,105,101,108,100, 83,105,122,101, 0, 42,109,101,115,104, 86,101,108,111, 99,105,116,105,101,115, 0,
+ 99,112,115, 84,105,109,101, 83,116, 97,114,116, 0, 99,112,115, 84,105,109,101, 69,110,100, 0, 99,112,115, 81,117, 97,108,105,
+116,121, 0, 97,116,116,114, 97, 99,116,102,111,114, 99,101, 83,116,114,101,110,103,116,104, 0, 97,116,116,114, 97, 99,116,102,
+111,114, 99,101, 82, 97,100,105,117,115, 0,118,101,108,111, 99,105,116,121,102,111,114, 99,101, 83,116,114,101,110,103,116,104,
+ 0,118,101,108,111, 99,105,116,121,102,111,114, 99,101, 82, 97,100,105,117,115, 0,108, 97,115,116,103,111,111,100,102,114, 97,
+109,101, 0, 97,110,105,109, 82, 97,116,101, 0,109,105,115,116,121,112,101, 0,104,111,114,114, 0,104,111,114,103, 0,104,111,
+114, 98, 0,122,101,110,114, 0,122,101,110,103, 0,122,101,110, 98, 0,102, 97,115,116, 99,111,108, 0,101,120,112,111,115,117,
+114,101, 0,101,120,112, 0,114, 97,110,103,101, 0,108,105,110,102, 97, 99, 0,108,111,103,102, 97, 99, 0,103,114, 97,118,105,
+116,121, 0, 97, 99,116,105,118,105,116,121, 66,111,120, 82, 97,100,105,117,115, 0,115,107,121,116,121,112,101, 0,111, 99, 99,
+108,117,115,105,111,110, 82,101,115, 0,112,104,121,115,105, 99,115, 69,110,103,105,110,101, 0,116,105, 99,114, 97,116,101, 0,
+109, 97,120,108,111,103,105, 99,115,116,101,112, 0,112,104,121,115,117, 98,115,116,101,112, 0,109, 97,120,112,104,121,115,116,
+101,112, 0,109,105,115,105, 0,109,105,115,116,115,116, 97, 0,109,105,115,116,100,105,115,116, 0,109,105,115,116,104,105, 0,
+115,116, 97,114,114, 0,115,116, 97,114,103, 0,115,116, 97,114, 98, 0,115,116, 97,114,107, 0,115,116, 97,114,115,105,122,101,
+ 0,115,116, 97,114,109,105,110,100,105,115,116, 0,115,116, 97,114,100,105,115,116, 0,115,116, 97,114, 99,111,108,110,111,105,
+115,101, 0,100,111,102,115,116, 97, 0,100,111,102,101,110,100, 0,100,111,102,109,105,110, 0,100,111,102,109, 97,120, 0, 97,
+111,100,105,115,116, 0, 97,111,100,105,115,116,102, 97, 99, 0, 97,111,101,110,101,114,103,121, 0, 97,111, 98,105, 97,115, 0,
+ 97,111,109,111,100,101, 0, 97,111,115, 97,109,112, 0, 97,111,109,105,120, 0, 97,111, 99,111,108,111,114, 0, 97,111, 95, 97,
+100, 97,112,116, 95,116,104,114,101,115,104, 0, 97,111, 95, 97,100, 97,112,116, 95,115,112,101,101,100, 95,102, 97, 99, 0, 97,
+111, 95, 97,112,112,114,111,120, 95,101,114,114,111,114, 0, 97,111, 95, 97,112,112,114,111,120, 95, 99,111,114,114,101, 99,116,
+105,111,110, 0, 97,111, 95,105,110,100,105,114,101, 99,116, 95,101,110,101,114,103,121, 0, 97,111, 95,101,110,118, 95,101,110,
+101,114,103,121, 0, 97,111, 95,112, 97,100, 50, 0, 97,111, 95,105,110,100,105,114,101, 99,116, 95, 98,111,117,110, 99,101,115,
+ 0, 97,111, 95,112, 97,100, 0, 97,111, 95,115, 97,109,112, 95,109,101,116,104,111,100, 0, 97,111, 95,103, 97,116,104,101,114,
+ 95,109,101,116,104,111,100, 0, 97,111, 95, 97,112,112,114,111,120, 95,112, 97,115,115,101,115, 0, 42, 97,111,115,112,104,101,
+114,101, 0, 42, 97,111,116, 97, 98,108,101,115, 0,115,101,108, 99,111,108, 0,115,120, 0,115,121, 0, 42,108,112, 70,111,114,
+109, 97,116, 0, 42,108,112, 80, 97,114,109,115, 0, 99, 98, 70,111,114,109, 97,116, 0, 99, 98, 80, 97,114,109,115, 0,102, 99,
+ 99, 84,121,112,101, 0,102, 99, 99, 72, 97,110,100,108,101,114, 0,100,119, 75,101,121, 70,114, 97,109,101, 69,118,101,114,121,
+ 0,100,119, 81,117, 97,108,105,116,121, 0,100,119, 66,121,116,101,115, 80,101,114, 83,101, 99,111,110,100, 0,100,119, 70,108,
+ 97,103,115, 0,100,119, 73,110,116,101,114,108,101, 97,118,101, 69,118,101,114,121, 0, 97,118,105, 99,111,100,101, 99,110, 97,
+109,101, 91, 49, 50, 56, 93, 0, 42, 99,100, 80, 97,114,109,115, 0, 42,112, 97,100, 0, 99,100, 83,105,122,101, 0,113,116, 99,
+111,100,101, 99,110, 97,109,101, 91, 49, 50, 56, 93, 0, 99,111,100,101, 99, 84,121,112,101, 0, 99,111,100,101, 99, 83,112, 97,
+116,105, 97,108, 81,117, 97,108,105,116,121, 0, 99,111,100,101, 99, 0, 99,111,100,101, 99, 70,108, 97,103,115, 0, 99,111,108,
+111,114, 68,101,112,116,104, 0, 99,111,100,101, 99, 84,101,109,112,111,114, 97,108, 81,117, 97,108,105,116,121, 0,109,105,110,
+ 83,112, 97,116,105, 97,108, 81,117, 97,108,105,116,121, 0,109,105,110, 84,101,109,112,111,114, 97,108, 81,117, 97,108,105,116,
+121, 0,107,101,121, 70,114, 97,109,101, 82, 97,116,101, 0, 98,105,116, 82, 97,116,101, 0, 97,117,100,105,111, 99,111,100,101,
+ 99, 84,121,112,101, 0, 97,117,100,105,111, 83, 97,109,112,108,101, 82, 97,116,101, 0, 97,117,100,105,111, 66,105,116, 68,101,
+112,116,104, 0, 97,117,100,105,111, 67,104, 97,110,110,101,108,115, 0, 97,117,100,105,111, 67,111,100,101, 99, 70,108, 97,103,
+115, 0, 97,117,100,105,111, 66,105,116, 82, 97,116,101, 0, 97,117,100,105,111, 95, 99,111,100,101, 99, 0,118,105,100,101,111,
+ 95, 98,105,116,114, 97,116,101, 0, 97,117,100,105,111, 95, 98,105,116,114, 97,116,101, 0, 97,117,100,105,111, 95,109,105,120,
+114, 97,116,101, 0, 97,117,100,105,111, 95, 99,104, 97,110,110,101,108,115, 0, 97,117,100,105,111, 95,112, 97,100, 0, 97,117,
+100,105,111, 95,118,111,108,117,109,101, 0,103,111,112, 95,115,105,122,101, 0,114, 99, 95,109,105,110, 95,114, 97,116,101, 0,
+114, 99, 95,109, 97,120, 95,114, 97,116,101, 0,114, 99, 95, 98,117,102,102,101,114, 95,115,105,122,101, 0,109,117,120, 95,112,
+ 97, 99,107,101,116, 95,115,105,122,101, 0,109,117,120, 95,114, 97,116,101, 0,109,105,120,114, 97,116,101, 0,109, 97,105,110,
+ 0,115,112,101,101,100, 95,111,102, 95,115,111,117,110,100, 0,100,111,112,112,108,101,114, 95,102, 97, 99,116,111,114, 0,100,
+105,115,116, 97,110, 99,101, 95,109,111,100,101,108, 0, 42,109, 97,116, 95,111,118,101,114,114,105,100,101, 0, 42,108,105,103,
+104,116, 95,111,118,101,114,114,105,100,101, 0,108, 97,121, 95,122,109, 97,115,107, 0,108, 97,121, 95,101,120, 99,108,117,100,
+101, 0,108, 97,121,102,108, 97,103, 0,112, 97,115,115,102,108, 97,103, 0,112, 97,115,115, 95,120,111,114, 0,115, 97,109,112,
+108,101,115, 0,105,109,116,121,112,101, 0,112,108, 97,110,101,115, 0,113,117, 97,108,105,116,121, 0, 99,111,109,112,114,101,
+115,115, 0,101,120,114, 95, 99,111,100,101, 99, 0, 99,105,110,101,111,110, 95,102,108, 97,103, 0, 99,105,110,101,111,110, 95,
+119,104,105,116,101, 0, 99,105,110,101,111,110, 95, 98,108, 97, 99,107, 0, 99,105,110,101,111,110, 95,103, 97,109,109, 97, 0,
+106,112, 50, 95,102,108, 97,103, 0,105,109, 95,102,111,114,109, 97,116, 0, 42, 97,118,105, 99,111,100,101, 99,100, 97,116, 97,
+ 0, 42,113,116, 99,111,100,101, 99,100, 97,116, 97, 0,113,116, 99,111,100,101, 99,115,101,116,116,105,110,103,115, 0,102,102,
+ 99,111,100,101, 99,100, 97,116, 97, 0,115,117, 98,102,114, 97,109,101, 0,112,115,102,114, 97, 0,112,101,102,114, 97, 0,105,
+109, 97,103,101,115, 0,102,114, 97,109, 97,112,116,111, 0,116,104,114,101, 97,100,115, 0,102,114, 97,109,101,108,101,110, 0,
+ 98,108,117,114,102, 97, 99, 0,101,100,103,101, 82, 0,101,100,103,101, 71, 0,101,100,103,101, 66, 0,102,117,108,108,115, 99,
+114,101,101,110, 0,120,112,108, 97,121, 0,121,112,108, 97,121, 0,102,114,101,113,112,108, 97,121, 0, 97,116,116,114,105, 98,
+ 0,102,114, 97,109,101, 95,115,116,101,112, 0,115,116,101,114,101,111,109,111,100,101, 0,100,105,109,101,110,115,105,111,110,
+115,112,114,101,115,101,116, 0,109, 97,120,105,109,115,105,122,101, 0,120,115, 99,104, 0,121,115, 99,104, 0,120,112, 97,114,
+116,115, 0,121,112, 97,114,116,115, 0,115,117, 98,105,109,116,121,112,101, 0,100,105,115,112,108, 97,121,109,111,100,101, 0,
+115, 99,101,109,111,100,101, 0,114, 97,121,116,114, 97, 99,101, 95,111,112,116,105,111,110,115, 0,114, 97,121,116,114, 97, 99,
+101, 95,115,116,114,117, 99,116,117,114,101, 0,111, 99,114,101,115, 0,112, 97,100, 52, 0, 97,108,112,104, 97,109,111,100,101,
+ 0,111,115, 97, 0,102,114,115, 95,115,101, 99, 0,101,100,103,101,105,110,116, 0,115, 97,102,101,116,121, 0, 98,111,114,100,
+101,114, 0,100,105,115,112,114,101, 99,116, 0,108, 97,121,101,114,115, 0, 97, 99,116,108, 97,121, 0,109, 98,108,117,114, 95,
+115, 97,109,112,108,101,115, 0,120, 97,115,112, 0,121, 97,115,112, 0,102,114,115, 95,115,101, 99, 95, 98, 97,115,101, 0,103,
+ 97,117,115,115, 0, 99,111,108,111,114, 95,109,103,116, 95,102,108, 97,103, 0,112,111,115,116,103, 97,109,109, 97, 0,112,111,
+115,116,104,117,101, 0,112,111,115,116,115, 97,116, 0,100,105,116,104,101,114, 95,105,110,116,101,110,115,105,116,121, 0, 98,
+ 97,107,101, 95,111,115, 97, 0, 98, 97,107,101, 95,102,105,108,116,101,114, 0, 98, 97,107,101, 95,109,111,100,101, 0, 98, 97,
+107,101, 95,102,108, 97,103, 0, 98, 97,107,101, 95,110,111,114,109, 97,108, 95,115,112, 97, 99,101, 0, 98, 97,107,101, 95,113,
+117, 97,100, 95,115,112,108,105,116, 0, 98, 97,107,101, 95,109, 97,120,100,105,115,116, 0, 98, 97,107,101, 95, 98,105, 97,115,
+100,105,115,116, 0, 98, 97,107,101, 95,112, 97,100, 0,112,105, 99, 91, 49, 48, 50, 52, 93, 0,115,116, 97,109,112, 0,115,116,
+ 97,109,112, 95,102,111,110,116, 95,105,100, 0,115,116, 97,109,112, 95,117,100, 97,116, 97, 91, 55, 54, 56, 93, 0,102,103, 95,
+115,116, 97,109,112, 91, 52, 93, 0, 98,103, 95,115,116, 97,109,112, 91, 52, 93, 0,115,101,113, 95,112,114,101,118, 95,116,121,
+112,101, 0,115,101,113, 95,114,101,110,100, 95,116,121,112,101, 0,115,101,113, 95,102,108, 97,103, 0,112, 97,100, 53, 91, 53,
+ 93, 0,115,105,109,112,108,105,102,121, 95,102,108, 97,103, 0,115,105,109,112,108,105,102,121, 95,115,117, 98,115,117,114,102,
+ 0,115,105,109,112,108,105,102,121, 95,115,104, 97,100,111,119,115, 97,109,112,108,101,115, 0,115,105,109,112,108,105,102,121,
+ 95,112, 97,114,116,105, 99,108,101,115, 0,115,105,109,112,108,105,102,121, 95, 97,111,115,115,115, 0, 99,105,110,101,111,110,
+119,104,105,116,101, 0, 99,105,110,101,111,110, 98,108, 97, 99,107, 0, 99,105,110,101,111,110,103, 97,109,109, 97, 0,106,112,
+ 50, 95,112,114,101,115,101,116, 0,106,112, 50, 95,100,101,112,116,104, 0,114,112, 97,100, 51, 0,100,111,109,101,114,101,115,
+ 0,100,111,109,101,109,111,100,101, 0,100,111,109,101, 97,110,103,108,101, 0,100,111,109,101,116,105,108,116, 0,100,111,109,
+101,114,101,115, 98,117,102, 0, 42,100,111,109,101,116,101,120,116, 0,101,110,103,105,110,101, 91, 51, 50, 93, 0,110, 97,109,
+101, 91, 51, 50, 93, 0,112, 97,114,116,105, 99,108,101, 95,112,101,114, 99, 0,115,117, 98,115,117,114,102, 95,109, 97,120, 0,
+115,104, 97,100, 98,117,102,115, 97,109,112,108,101, 95,109, 97,120, 0, 97,111, 95,101,114,114,111,114, 0,116,105,108,116, 0,
+114,101,115, 98,117,102, 0, 42,119, 97,114,112,116,101,120,116, 0, 99,111,108, 91, 51, 93, 0, 99,101,108,108,115,105,122,101,
+ 0, 99,101,108,108,104,101,105,103,104,116, 0, 97,103,101,110,116,109, 97,120,115,108,111,112,101, 0, 97,103,101,110,116,109,
+ 97,120, 99,108,105,109, 98, 0, 97,103,101,110,116,104,101,105,103,104,116, 0, 97,103,101,110,116,114, 97,100,105,117,115, 0,
+101,100,103,101,109, 97,120,108,101,110, 0,101,100,103,101,109, 97,120,101,114,114,111,114, 0,114,101,103,105,111,110,109,105,
+110,115,105,122,101, 0,114,101,103,105,111,110,109,101,114,103,101,115,105,122,101, 0,118,101,114,116,115,112,101,114,112,111,
+108,121, 0,100,101,116, 97,105,108,115, 97,109,112,108,101,100,105,115,116, 0,100,101,116, 97,105,108,115, 97,109,112,108,101,
+109, 97,120,101,114,114,111,114, 0,102,114, 97,109,105,110,103, 0,112,108, 97,121,101,114,102,108, 97,103, 0,114,116, 49, 0,
+114,116, 50, 0, 97, 97,115, 97,109,112,108,101,115, 0,112, 97,100, 52, 91, 51, 93, 0,100,111,109,101, 0,115,116,101,114,101,
+111,102,108, 97,103, 0,101,121,101,115,101,112, 97,114, 97,116,105,111,110, 0,114,101, 99, 97,115,116, 68, 97,116, 97, 0,109,
+ 97,116,109,111,100,101, 0,101,120,105,116,107,101,121, 0,111, 98,115,116, 97, 99,108,101, 83,105,109,117,108, 97,116,105,111,
+110, 0,108,101,118,101,108, 72,101,105,103,104,116, 0, 42, 99, 97,109,101,114, 97, 0, 42,112, 97,105,110,116, 95, 99,117,114,
+115,111,114, 0,112, 97,105,110,116, 95, 99,117,114,115,111,114, 95, 99,111,108, 91, 52, 93, 0,112, 97,105,110,116, 0,115,101,
+ 97,109, 95, 98,108,101,101,100, 0,110,111,114,109, 97,108, 95, 97,110,103,108,101, 0,115, 99,114,101,101,110, 95,103,114, 97,
+ 98, 95,115,105,122,101, 91, 50, 93, 0, 42,112, 97,105,110,116, 99,117,114,115,111,114, 0,105,110,118,101,114,116, 0,116,111,
+116,114,101,107,101,121, 0,116,111,116, 97,100,100,107,101,121, 0, 98,114,117,115,104,116,121,112,101, 0, 98,114,117,115,104,
+ 91, 55, 93, 0,101,109,105,116,116,101,114,100,105,115,116, 0,115,101,108,101, 99,116,109,111,100,101, 0,101,100,105,116,116,
+121,112,101, 0,100,114, 97,119, 95,115,116,101,112, 0,102, 97,100,101, 95,102,114, 97,109,101,115, 0,114, 97,100,105, 97,108,
+ 95,115,121,109,109, 91, 51, 93, 0,108, 97,115,116, 95,120, 0,108, 97,115,116, 95,121, 0,108, 97,115,116, 95, 97,110,103,108,
+101, 0,100,114, 97,119, 95, 97,110, 99,104,111,114,101,100, 0, 97,110, 99,104,111,114,101,100, 95,115,105,122,101, 0, 97,110,
+ 99,104,111,114,101,100, 95,108,111, 99, 97,116,105,111,110, 91, 51, 93, 0, 97,110, 99,104,111,114,101,100, 95,105,110,105,116,
+105, 97,108, 95,109,111,117,115,101, 91, 50, 93, 0,100,114, 97,119, 95,112,114,101,115,115,117,114,101, 0,112,114,101,115,115,
+117,114,101, 95,118, 97,108,117,101, 0,115,112,101, 99,105, 97,108, 95,114,111,116, 97,116,105,111,110, 0, 42,118,112, 97,105,
+110,116, 95,112,114,101,118, 0, 42,119,112, 97,105,110,116, 95,112,114,101,118, 0,109, 97,116, 91, 51, 93, 91, 51, 93, 0,117,
+110,112,114,111,106,101, 99,116,101,100, 95,114, 97,100,105,117,115, 0, 42,118,112, 97,105,110,116, 0, 42,119,112, 97,105,110,
+116, 0, 42,117,118,115, 99,117,108,112,116, 0,118,103,114,111,117,112, 95,119,101,105,103,104,116, 0, 99,111,114,110,101,114,
+116,121,112,101, 0,106,111,105,110,116,114,105,108,105,109,105,116, 0,100,101,103,114, 0,116,117,114,110, 0,101,120,116,114,
+ 95,111,102,102,115, 0,100,111,117, 98,108,105,109,105,116, 0,110,111,114,109, 97,108,115,105,122,101, 0, 97,117,116,111,109,
+101,114,103,101, 0,115,101,103,109,101,110,116,115, 0,114,105,110,103,115, 0,118,101,114,116,105, 99,101,115, 0,117,110,119,
+114, 97,112,112,101,114, 0,117,118, 99, 97,108, 99, 95,114, 97,100,105,117,115, 0,117,118, 99, 97,108, 99, 95, 99,117, 98,101,
+115,105,122,101, 0,117,118, 99, 97,108, 99, 95,109, 97,114,103,105,110, 0,117,118, 99, 97,108, 99, 95,109, 97,112,100,105,114,
+ 0,117,118, 99, 97,108, 99, 95,109, 97,112, 97,108,105,103,110, 0,117,118, 99, 97,108, 99, 95,102,108, 97,103, 0,117,118, 95,
+102,108, 97,103, 0,117,118, 95,115,101,108,101, 99,116,109,111,100,101, 0,117,118, 95,115,117, 98,115,117,114,102, 95,108,101,
+118,101,108, 0,103,112,101,110, 99,105,108, 95,102,108, 97,103,115, 0, 97,117,116,111,105,107, 95, 99,104, 97,105,110,108,101,
+110, 0,105,109, 97,112, 97,105,110,116, 0,112, 97,114,116,105, 99,108,101, 0,112,114,111,112,111,114,116,105,111,110, 97,108,
+ 95,115,105,122,101, 0,115,101,108,101, 99,116, 95,116,104,114,101,115,104, 0, 99,108,101, 97,110, 95,116,104,114,101,115,104,
+ 0, 97,117,116,111,107,101,121, 95,109,111,100,101, 0, 97,117,116,111,107,101,121, 95,102,108, 97,103, 0,109,117,108,116,105,
+114,101,115, 95,115,117, 98,100,105,118, 95,116,121,112,101, 0,112, 97,100, 50, 91, 53, 93, 0,115,107,103,101,110, 95,114,101,
+115,111,108,117,116,105,111,110, 0,115,107,103,101,110, 95,116,104,114,101,115,104,111,108,100, 95,105,110,116,101,114,110, 97,
+108, 0,115,107,103,101,110, 95,116,104,114,101,115,104,111,108,100, 95,101,120,116,101,114,110, 97,108, 0,115,107,103,101,110,
+ 95,108,101,110,103,116,104, 95,114, 97,116,105,111, 0,115,107,103,101,110, 95,108,101,110,103,116,104, 95,108,105,109,105,116,
+ 0,115,107,103,101,110, 95, 97,110,103,108,101, 95,108,105,109,105,116, 0,115,107,103,101,110, 95, 99,111,114,114,101,108, 97,
+116,105,111,110, 95,108,105,109,105,116, 0,115,107,103,101,110, 95,115,121,109,109,101,116,114,121, 95,108,105,109,105,116, 0,
+115,107,103,101,110, 95,114,101,116, 97,114,103,101,116, 95, 97,110,103,108,101, 95,119,101,105,103,104,116, 0,115,107,103,101,
+110, 95,114,101,116, 97,114,103,101,116, 95,108,101,110,103,116,104, 95,119,101,105,103,104,116, 0,115,107,103,101,110, 95,114,
+101,116, 97,114,103,101,116, 95,100,105,115,116, 97,110, 99,101, 95,119,101,105,103,104,116, 0,115,107,103,101,110, 95,111,112,
+116,105,111,110,115, 0,115,107,103,101,110, 95,112,111,115,116,112,114,111, 0,115,107,103,101,110, 95,112,111,115,116,112,114,
+111, 95,112, 97,115,115,101,115, 0,115,107,103,101,110, 95,115,117, 98,100,105,118,105,115,105,111,110,115, 91, 51, 93, 0,115,
+107,103,101,110, 95,109,117,108,116,105, 95,108,101,118,101,108, 0, 42,115,107,103,101,110, 95,116,101,109,112,108, 97,116,101,
+ 0, 98,111,110,101, 95,115,107,101,116, 99,104,105,110,103, 0, 98,111,110,101, 95,115,107,101,116, 99,104,105,110,103, 95, 99,
+111,110,118,101,114,116, 0,115,107,103,101,110, 95,115,117, 98,100,105,118,105,115,105,111,110, 95,110,117,109, 98,101,114, 0,
+115,107,103,101,110, 95,114,101,116, 97,114,103,101,116, 95,111,112,116,105,111,110,115, 0,115,107,103,101,110, 95,114,101,116,
+ 97,114,103,101,116, 95,114,111,108,108, 0,115,107,103,101,110, 95,115,105,100,101, 95,115,116,114,105,110,103, 91, 56, 93, 0,
+115,107,103,101,110, 95,110,117,109, 95,115,116,114,105,110,103, 91, 56, 93, 0,101,100,103,101, 95,109,111,100,101, 0,101,100,
+103,101, 95,109,111,100,101, 95,108,105,118,101, 95,117,110,119,114, 97,112, 0,115,110, 97,112, 95,109,111,100,101, 0,115,110,
+ 97,112, 95,102,108, 97,103, 0,115,110, 97,112, 95,116, 97,114,103,101,116, 0,112,114,111,112,111,114,116,105,111,110, 97,108,
+ 0,112,114,111,112, 95,109,111,100,101, 0,112,114,111,112,111,114,116,105,111,110, 97,108, 95,111, 98,106,101, 99,116,115, 0,
+112, 97,100, 91, 53, 93, 0, 97,117,116,111, 95,110,111,114,109, 97,108,105,122,101, 0,109,117,108,116,105,112, 97,105,110,116,
+ 0,117,115,101, 95,117,118, 95,115, 99,117,108,112,116, 0,117,118, 95,115, 99,117,108,112,116, 95,115,101,116,116,105,110,103,
+115, 0,117,118, 95,115, 99,117,108,112,116, 95,116,111,111,108, 0,117,118, 95,114,101,108, 97,120, 95,109,101,116,104,111,100,
+ 0,115, 99,117,108,112,116, 95,112, 97,105,110,116, 95,115,101,116,116,105,110,103,115, 0,115, 99,117,108,112,116, 95,112, 97,
+105,110,116, 95,117,110,105,102,105,101,100, 95,115,105,122,101, 0,115, 99,117,108,112,116, 95,112, 97,105,110,116, 95,117,110,
+105,102,105,101,100, 95,117,110,112,114,111,106,101, 99,116,101,100, 95,114, 97,100,105,117,115, 0,115, 99,117,108,112,116, 95,
+112, 97,105,110,116, 95,117,110,105,102,105,101,100, 95, 97,108,112,104, 97, 0,117,110,105,102,105,101,100, 95,112, 97,105,110,
+116, 95,115,101,116,116,105,110,103,115, 0,116,111,116,111, 98,106, 0,116,111,116,108, 97,109,112, 0,116,111,116,111, 98,106,
+115,101,108, 0,116,111,116, 99,117,114,118,101, 0,116,111,116,109,101,115,104, 0,116,111,116, 97,114,109, 97,116,117,114,101,
+ 0,115, 99, 97,108,101, 95,108,101,110,103,116,104, 0,115,121,115,116,101,109, 0,115,121,115,116,101,109, 95,114,111,116, 97,
+116,105,111,110, 0,103,114, 97,118,105,116,121, 91, 51, 93, 0,113,117,105, 99,107, 95, 99, 97, 99,104,101, 95,115,116,101,112,
+ 0, 42,119,111,114,108,100, 0, 42,115,101,116, 0, 98, 97,115,101, 0, 42, 98, 97,115, 97, 99,116, 0, 42,111, 98,101,100,105,
+116, 0, 99,117,114,115,111,114, 91, 51, 93, 0,116,119, 99,101,110,116, 91, 51, 93, 0,116,119,109,105,110, 91, 51, 93, 0,116,
+119,109, 97,120, 91, 51, 93, 0,108, 97,121, 97, 99,116, 0,108, 97,121, 95,117,112,100, 97,116,101,100, 0, 42,101,100, 0, 42,
+116,111,111,108,115,101,116,116,105,110,103,115, 0, 42,115,116, 97,116,115, 0, 97,117,100,105,111, 0,116,114, 97,110,115,102,
+111,114,109, 95,115,112, 97, 99,101,115, 0, 42,115,111,117,110,100, 95,115, 99,101,110,101, 0, 42,115,111,117,110,100, 95,115,
+ 99,101,110,101, 95,104, 97,110,100,108,101, 0, 42,115,111,117,110,100, 95,115, 99,114,117, 98, 95,104, 97,110,100,108,101, 0,
+ 42,115,112,101, 97,107,101,114, 95,104, 97,110,100,108,101,115, 0, 42,102,112,115, 95,105,110,102,111, 0, 42,116,104,101, 68,
+ 97,103, 0,100, 97,103,105,115,118, 97,108,105,100, 0,100, 97,103,102,108, 97,103,115, 0, 97, 99,116,105,118,101, 95,107,101,
+121,105,110,103,115,101,116, 0,107,101,121,105,110,103,115,101,116,115, 0,103,109, 0,117,110,105,116, 0,112,104,121,115,105,
+ 99,115, 95,115,101,116,116,105,110,103,115, 0, 42, 99,108,105,112, 0, 99,117,115,116,111,109,100, 97,116, 97, 95,109, 97,115,
+107, 95,109,111,100, 97,108, 0, 99,117,115,101,114, 0, 98,108,101,110,100, 0,118,105,101,119, 0,119,105,110,109, 97,116, 91,
+ 52, 93, 91, 52, 93, 0,118,105,101,119,109, 97,116, 91, 52, 93, 91, 52, 93, 0,118,105,101,119,105,110,118, 91, 52, 93, 91, 52,
+ 93, 0,112,101,114,115,109, 97,116, 91, 52, 93, 91, 52, 93, 0,112,101,114,115,105,110,118, 91, 52, 93, 91, 52, 93, 0,118,105,
+101,119,109, 97,116,111, 98, 91, 52, 93, 91, 52, 93, 0,112,101,114,115,109, 97,116,111, 98, 91, 52, 93, 91, 52, 93, 0, 99,108,
+105,112, 91, 54, 93, 91, 52, 93, 0, 99,108,105,112, 95,108,111, 99, 97,108, 91, 54, 93, 91, 52, 93, 0, 42, 99,108,105,112, 98,
+ 98, 0, 42,108,111, 99, 97,108,118,100, 0, 42,114,105, 0, 42,114,101,110,100,101,114, 95,101,110,103,105,110,101, 0, 42,100,
+101,112,116,104,115, 0, 42,115,109,115, 0, 42,115,109,111,111,116,104, 95,116,105,109,101,114, 0,116,119,109, 97,116, 91, 52,
+ 93, 91, 52, 93, 0,118,105,101,119,113,117, 97,116, 91, 52, 93, 0,122,102, 97, 99, 0, 99, 97,109,100,120, 0, 99, 97,109,100,
+121, 0,112,105,120,115,105,122,101, 0, 99, 97,109,122,111,111,109, 0,105,115, 95,112,101,114,115,112, 0,112,101,114,115,112,
+ 0,118,105,101,119,108,111, 99,107, 0,116,119,100,114, 97,119,102,108, 97,103, 0,114,102,108, 97,103, 0,108,118,105,101,119,
+113,117, 97,116, 91, 52, 93, 0,108,112,101,114,115,112, 0,108,118,105,101,119, 0,103,114,105,100,118,105,101,119, 0,116,119,
+ 97,110,103,108,101, 91, 51, 93, 0,114,111,116, 95, 97,110,103,108,101, 0,114,111,116, 95, 97,120,105,115, 91, 51, 93, 0,114,
+101,103,105,111,110, 98, 97,115,101, 0,115,112, 97, 99,101,116,121,112,101, 0, 98,108,111, 99,107,115, 99, 97,108,101, 0, 98,
+108,111, 99,107,104, 97,110,100,108,101,114, 91, 56, 93, 0, 98,117,110,100,108,101, 95,115,105,122,101, 0, 98,117,110,100,108,
+101, 95,100,114, 97,119,116,121,112,101, 0,108, 97,121, 95,117,115,101,100, 0, 42,111, 98, 95, 99,101,110,116,114,101, 0, 98,
+103,112,105, 99, 98, 97,115,101, 0, 42, 98,103,112,105, 99, 0,111, 98, 95, 99,101,110,116,114,101, 95, 98,111,110,101, 91, 54,
+ 52, 93, 0,100,114, 97,119,116,121,112,101, 0,111, 98, 95, 99,101,110,116,114,101, 95, 99,117,114,115,111,114, 0,115, 99,101,
+110,101,108,111, 99,107, 0, 97,114,111,117,110,100, 0,103,114,105,100, 0,110,101, 97,114, 0,102, 97,114, 0,109,111,100,101,
+115,101,108,101, 99,116, 0,103,114,105,100,108,105,110,101,115, 0,103,114,105,100,115,117, 98,100,105,118, 0,103,114,105,100,
+102,108, 97,103, 0,116,119,116,121,112,101, 0,116,119,109,111,100,101, 0,116,119,102,108, 97,103, 0,112, 97,100, 50, 91, 50,
+ 93, 0, 97,102,116,101,114,100,114, 97,119, 95,116,114, 97,110,115,112, 0, 97,102,116,101,114,100,114, 97,119, 95,120,114, 97,
+121, 0, 97,102,116,101,114,100,114, 97,119, 95,120,114, 97,121,116,114, 97,110,115,112, 0,122, 98,117,102, 0,120,114, 97,121,
+ 0,112, 97,100, 51, 91, 50, 93, 0, 42,112,114,111,112,101,114,116,105,101,115, 95,115,116,111,114, 97,103,101, 0,118,101,114,
+116, 0,104,111,114, 0,109, 97,115,107, 0,109,105,110, 91, 50, 93, 0,109, 97,120, 91, 50, 93, 0,109,105,110,122,111,111,109,
+ 0,109, 97,120,122,111,111,109, 0,115, 99,114,111,108,108, 0,115, 99,114,111,108,108, 95,117,105, 0,107,101,101,112,116,111,
+116, 0,107,101,101,112,122,111,111,109, 0,107,101,101,112,111,102,115, 0, 97,108,105,103,110, 0,119,105,110,120, 0,119,105,
+110,121, 0,111,108,100,119,105,110,120, 0,111,108,100,119,105,110,121, 0, 42,116, 97, 98, 95,111,102,102,115,101,116, 0,116,
+ 97, 98, 95,110,117,109, 0,116, 97, 98, 95, 99,117,114, 0,114,112,116, 95,109, 97,115,107, 0,118, 50,100, 0, 42, 97,100,115,
+ 0,103,104,111,115,116, 67,117,114,118,101,115, 0, 97,117,116,111,115,110, 97,112, 0, 99,117,114,115,111,114, 86, 97,108, 0,
+109, 97,105,110, 98, 0,109, 97,105,110, 98,111, 0,109, 97,105,110, 98,117,115,101,114, 0,114,101, 95, 97,108,105,103,110, 0,
+112,114,101,118,105,101,119, 0,116,101,120,116,117,114,101, 95, 99,111,110,116,101,120,116, 0,112, 97,116,104,102,108, 97,103,
+ 0,100, 97,116, 97,105, 99,111,110, 0, 42,112,105,110,105,100, 0, 42,116,101,120,117,115,101,114, 0,114,101,110,100,101,114,
+ 95,115,105,122,101, 0, 99,104, 97,110,115,104,111,119,110, 0,122,101, 98,114, 97, 0,122,111,111,109, 0,116,105,116,108,101,
+ 91, 51, 50, 93, 0,100,105,114, 91, 49, 48, 53, 54, 93, 0,102,105,108,101, 91, 50, 53, 54, 93, 0,114,101,110, 97,109,101,102,
+105,108,101, 91, 50, 53, 54, 93, 0,114,101,110, 97,109,101,101,100,105,116, 91, 50, 53, 54, 93, 0,102,105,108,116,101,114, 95,
+103,108,111, 98, 91, 54, 52, 93, 0, 97, 99,116,105,118,101, 95,102,105,108,101, 0,115,101,108, 95,102,105,114,115,116, 0,115,
+101,108, 95,108, 97,115,116, 0,115,111,114,116, 0,100,105,115,112,108, 97,121, 0,102, 95,102,112, 0,102,112, 95,115,116,114,
+ 91, 56, 93, 0,115, 99,114,111,108,108, 95,111,102,102,115,101,116, 0, 42,112, 97,114, 97,109,115, 0, 42,102,105,108,101,115,
+ 0, 42,102,111,108,100,101,114,115, 95,112,114,101,118, 0, 42,102,111,108,100,101,114,115, 95,110,101,120,116, 0, 42,111,112,
+ 0, 42,115,109,111,111,116,104,115, 99,114,111,108,108, 95,116,105,109,101,114, 0, 42,108, 97,121,111,117,116, 0,114,101, 99,
+101,110,116,110,114, 0, 98,111,111,107,109, 97,114,107,110,114, 0,115,121,115,116,101,109,110,114, 0,116,114,101,101, 0, 42,
+116,114,101,101,115,116,111,114,101, 0,115,101, 97,114, 99,104, 95,115,116,114,105,110,103, 91, 51, 50, 93, 0,115,101, 97,114,
+ 99,104, 95,116,115,101, 0,111,117,116,108,105,110,101,118,105,115, 0,115,116,111,114,101,102,108, 97,103, 0,115,101, 97,114,
+ 99,104, 95,102,108, 97,103,115, 0, 42, 99,117,109, 97,112, 0,115, 99,111,112,101,115, 0,115, 97,109,112,108,101, 95,108,105,
+110,101, 95,104,105,115,116, 0, 99,117,114,115,111,114, 91, 50, 93, 0, 99,101,110,116,120, 0, 99,101,110,116,121, 0, 99,117,
+114,116,105,108,101, 0,108,111, 99,107, 0,112,105,110, 0,100,116, 95,117,118, 0,115,116,105, 99,107,121, 0,100,116, 95,117,
+118,115,116,114,101,116, 99,104, 0, 42,116,101,120,116, 0,116,111,112, 0,118,105,101,119,108,105,110,101,115, 0,109,101,110,
+117,110,114, 0,108,104,101,105,103,104,116, 0, 99,119,105,100,116,104, 0,108,105,110,101,110,114,115, 95,116,111,116, 0,108,
+101,102,116, 0,115,104,111,119,108,105,110,101,110,114,115, 0,116, 97, 98,110,117,109, 98,101,114, 0,115,104,111,119,115,121,
+110,116, 97,120, 0,108,105,110,101, 95,104,108,105,103,104,116, 0,111,118,101,114,119,114,105,116,101, 0,108,105,118,101, 95,
+101,100,105,116, 0,112,105,120, 95,112,101,114, 95,108,105,110,101, 0,116,120,116,115, 99,114,111,108,108, 0,116,120,116, 98,
+ 97,114, 0,119,111,114,100,119,114, 97,112, 0,100,111,112,108,117,103,105,110,115, 0,102,105,110,100,115,116,114, 91, 50, 53,
+ 54, 93, 0,114,101,112,108, 97, 99,101,115,116,114, 91, 50, 53, 54, 93, 0,109, 97,114,103,105,110, 95, 99,111,108,117,109,110,
+ 0, 42,100,114, 97,119, 99, 97, 99,104,101, 0, 42,112,121, 95,100,114, 97,119, 0, 42,112,121, 95,101,118,101,110,116, 0, 42,
+112,121, 95, 98,117,116,116,111,110, 0, 42,112,121, 95, 98,114,111,119,115,101,114, 99, 97,108,108, 98, 97, 99,107, 0, 42,112,
+121, 95,103,108,111, 98, 97,108,100,105, 99,116, 0,108, 97,115,116,115,112, 97, 99,101, 0,115, 99,114,105,112,116,110, 97,109,
+101, 91, 49, 48, 50, 52, 93, 0,115, 99,114,105,112,116, 97,114,103, 91, 50, 53, 54, 93, 0, 42,115, 99,114,105,112,116, 0, 42,
+ 98,117,116, 95,114,101,102,115, 0, 42, 97,114,114, 97,121, 0, 99, 97, 99,104,101,115, 0, 99, 97, 99,104,101, 95,100,105,115,
+112,108, 97,121, 0, 42,105,100, 0, 97,115,112,101, 99,116, 0,112, 97,100,102, 0,109,120, 0,109,121, 0, 42,101,100,105,116,
+116,114,101,101, 0,116,114,101,101,116,121,112,101, 0,116,101,120,102,114,111,109, 0,115,104, 97,100,101,114,102,114,111,109,
+ 0,108,105,110,107,100,114, 97,103, 0,108,101,110, 95, 97,108,108,111, 99, 0, 99,117,114,115,111,114, 0,115, 99,114,111,108,
+108, 98, 97, 99,107, 0,104,105,115,116,111,114,121, 0,112,114,111,109,112,116, 91, 50, 53, 54, 93, 0,108, 97,110,103,117, 97,
+103,101, 91, 51, 50, 93, 0,115,101,108, 95,115,116, 97,114,116, 0,115,101,108, 95,101,110,100, 0,102,105,108,116,101,114, 91,
+ 54, 52, 93, 0,120,108,111, 99,107,111,102, 0,121,108,111, 99,107,111,102, 0,117,115,101,114, 0,112, 97,116,104, 95,108,101,
+110,103,116,104, 0,108,111, 99, 91, 50, 93, 0,115,116, 97, 98,109, 97,116, 91, 52, 93, 91, 52, 93, 0,117,110,105,115,116, 97,
+ 98,109, 97,116, 91, 52, 93, 91, 52, 93, 0,112,111,115,116,112,114,111, 99, 95,102,108, 97,103, 0, 42,100,114, 97,119, 95, 99,
+111,110,116,101,120,116, 0,102,105,108,101,110, 97,109,101, 91, 49, 48, 50, 52, 93, 0, 98,108,102, 95,105,100, 0,117,105,102,
+111,110,116, 95,105,100, 0,114, 95,116,111, 95,108, 0,112,111,105,110,116,115, 0,107,101,114,110,105,110,103, 0,105,116, 97,
+108,105, 99, 0, 98,111,108,100, 0,115,104, 97,100,111,119, 0,115,104, 97,100,120, 0,115,104, 97,100,121, 0,115,104, 97,100,
+111,119, 97,108,112,104, 97, 0,115,104, 97,100,111,119, 99,111,108,111,114, 0,112, 97,110,101,108,116,105,116,108,101, 0,103,
+114,111,117,112,108, 97, 98,101,108, 0,119,105,100,103,101,116,108, 97, 98,101,108, 0,119,105,100,103,101,116, 0,112, 97,110,
+101,108,122,111,111,109, 0,109,105,110,108, 97, 98,101,108, 99,104, 97,114,115, 0,109,105,110,119,105,100,103,101,116, 99,104,
+ 97,114,115, 0, 99,111,108,117,109,110,115,112, 97, 99,101, 0,116,101,109,112,108, 97,116,101,115,112, 97, 99,101, 0, 98,111,
+120,115,112, 97, 99,101, 0, 98,117,116,116,111,110,115,112, 97, 99,101,120, 0, 98,117,116,116,111,110,115,112, 97, 99,101,121,
+ 0,112, 97,110,101,108,115,112, 97, 99,101, 0,112, 97,110,101,108,111,117,116,101,114, 0,111,117,116,108,105,110,101, 91, 52,
+ 93, 0,105,110,110,101,114, 91, 52, 93, 0,105,110,110,101,114, 95,115,101,108, 91, 52, 93, 0,105,116,101,109, 91, 52, 93, 0,
+116,101,120,116, 91, 52, 93, 0,116,101,120,116, 95,115,101,108, 91, 52, 93, 0,115,104, 97,100,101,100, 0,115,104, 97,100,101,
+116,111,112, 0,115,104, 97,100,101,100,111,119,110, 0, 97,108,112,104, 97, 95, 99,104,101, 99,107, 0,105,110,110,101,114, 95,
+ 97,110,105,109, 91, 52, 93, 0,105,110,110,101,114, 95, 97,110,105,109, 95,115,101,108, 91, 52, 93, 0,105,110,110,101,114, 95,
+107,101,121, 91, 52, 93, 0,105,110,110,101,114, 95,107,101,121, 95,115,101,108, 91, 52, 93, 0,105,110,110,101,114, 95,100,114,
+105,118,101,110, 91, 52, 93, 0,105,110,110,101,114, 95,100,114,105,118,101,110, 95,115,101,108, 91, 52, 93, 0,104,101, 97,100,
+101,114, 91, 52, 93, 0,115,104,111,119, 95,104,101, 97,100,101,114, 0,119, 99,111,108, 95,114,101,103,117,108, 97,114, 0,119,
+ 99,111,108, 95,116,111,111,108, 0,119, 99,111,108, 95,116,101,120,116, 0,119, 99,111,108, 95,114, 97,100,105,111, 0,119, 99,
+111,108, 95,111,112,116,105,111,110, 0,119, 99,111,108, 95,116,111,103,103,108,101, 0,119, 99,111,108, 95,110,117,109, 0,119,
+ 99,111,108, 95,110,117,109,115,108,105,100,101,114, 0,119, 99,111,108, 95,109,101,110,117, 0,119, 99,111,108, 95,112,117,108,
+108,100,111,119,110, 0,119, 99,111,108, 95,109,101,110,117, 95, 98, 97, 99,107, 0,119, 99,111,108, 95,109,101,110,117, 95,105,
+116,101,109, 0,119, 99,111,108, 95,116,111,111,108,116,105,112, 0,119, 99,111,108, 95, 98,111,120, 0,119, 99,111,108, 95,115,
+ 99,114,111,108,108, 0,119, 99,111,108, 95,112,114,111,103,114,101,115,115, 0,119, 99,111,108, 95,108,105,115,116, 95,105,116,
+101,109, 0,119, 99,111,108, 95,115,116, 97,116,101, 0,112, 97,110,101,108, 0,105, 99,111,110,102,105,108,101, 91, 50, 53, 54,
+ 93, 0,105, 99,111,110, 95, 97,108,112,104, 97, 0, 98, 97, 99,107, 91, 52, 93, 0,116,105,116,108,101, 91, 52, 93, 0,116,101,
+120,116, 95,104,105, 91, 52, 93, 0,104,101, 97,100,101,114, 95,116,105,116,108,101, 91, 52, 93, 0,104,101, 97,100,101,114, 95,
+116,101,120,116, 91, 52, 93, 0,104,101, 97,100,101,114, 95,116,101,120,116, 95,104,105, 91, 52, 93, 0, 98,117,116,116,111,110,
+ 91, 52, 93, 0, 98,117,116,116,111,110, 95,116,105,116,108,101, 91, 52, 93, 0, 98,117,116,116,111,110, 95,116,101,120,116, 91,
+ 52, 93, 0, 98,117,116,116,111,110, 95,116,101,120,116, 95,104,105, 91, 52, 93, 0,108,105,115,116, 91, 52, 93, 0,108,105,115,
+116, 95,116,105,116,108,101, 91, 52, 93, 0,108,105,115,116, 95,116,101,120,116, 91, 52, 93, 0,108,105,115,116, 95,116,101,120,
+116, 95,104,105, 91, 52, 93, 0,112, 97,110,101,108, 91, 52, 93, 0,112, 97,110,101,108, 95,116,105,116,108,101, 91, 52, 93, 0,
+112, 97,110,101,108, 95,116,101,120,116, 91, 52, 93, 0,112, 97,110,101,108, 95,116,101,120,116, 95,104,105, 91, 52, 93, 0,115,
+104, 97,100,101, 49, 91, 52, 93, 0,115,104, 97,100,101, 50, 91, 52, 93, 0,104,105,108,105,116,101, 91, 52, 93, 0,103,114,105,
+100, 91, 52, 93, 0,119,105,114,101, 91, 52, 93, 0,115,101,108,101, 99,116, 91, 52, 93, 0,108, 97,109,112, 91, 52, 93, 0,115,
+112,101, 97,107,101,114, 91, 52, 93, 0,101,109,112,116,121, 91, 52, 93, 0, 99, 97,109,101,114, 97, 91, 52, 93, 0,112, 97,100,
+ 91, 56, 93, 0, 97, 99,116,105,118,101, 91, 52, 93, 0,103,114,111,117,112, 91, 52, 93, 0,103,114,111,117,112, 95, 97, 99,116,
+105,118,101, 91, 52, 93, 0,116,114, 97,110,115,102,111,114,109, 91, 52, 93, 0,118,101,114,116,101,120, 91, 52, 93, 0,118,101,
+114,116,101,120, 95,115,101,108,101, 99,116, 91, 52, 93, 0,101,100,103,101, 91, 52, 93, 0,101,100,103,101, 95,115,101,108,101,
+ 99,116, 91, 52, 93, 0,101,100,103,101, 95,115,101, 97,109, 91, 52, 93, 0,101,100,103,101, 95,115,104, 97,114,112, 91, 52, 93,
+ 0,101,100,103,101, 95,102, 97, 99,101,115,101,108, 91, 52, 93, 0,101,100,103,101, 95, 99,114,101, 97,115,101, 91, 52, 93, 0,
+102, 97, 99,101, 91, 52, 93, 0,102, 97, 99,101, 95,115,101,108,101, 99,116, 91, 52, 93, 0,102, 97, 99,101, 95,100,111,116, 91,
+ 52, 93, 0,101,120,116,114, 97, 95,101,100,103,101, 95,108,101,110, 91, 52, 93, 0,101,120,116,114, 97, 95,102, 97, 99,101, 95,
+ 97,110,103,108,101, 91, 52, 93, 0,101,120,116,114, 97, 95,102, 97, 99,101, 95, 97,114,101, 97, 91, 52, 93, 0,112, 97,100, 51,
+ 91, 52, 93, 0,110,111,114,109, 97,108, 91, 52, 93, 0,118,101,114,116,101,120, 95,110,111,114,109, 97,108, 91, 52, 93, 0, 98,
+111,110,101, 95,115,111,108,105,100, 91, 52, 93, 0, 98,111,110,101, 95,112,111,115,101, 91, 52, 93, 0,115,116,114,105,112, 91,
+ 52, 93, 0,115,116,114,105,112, 95,115,101,108,101, 99,116, 91, 52, 93, 0, 99,102,114, 97,109,101, 91, 52, 93, 0,110,117,114,
+ 98, 95,117,108,105,110,101, 91, 52, 93, 0,110,117,114, 98, 95,118,108,105,110,101, 91, 52, 93, 0, 97, 99,116, 95,115,112,108,
+105,110,101, 91, 52, 93, 0,110,117,114, 98, 95,115,101,108, 95,117,108,105,110,101, 91, 52, 93, 0,110,117,114, 98, 95,115,101,
+108, 95,118,108,105,110,101, 91, 52, 93, 0,108, 97,115,116,115,101,108, 95,112,111,105,110,116, 91, 52, 93, 0,104, 97,110,100,
+108,101, 95,102,114,101,101, 91, 52, 93, 0,104, 97,110,100,108,101, 95, 97,117,116,111, 91, 52, 93, 0,104, 97,110,100,108,101,
+ 95,118,101, 99,116, 91, 52, 93, 0,104, 97,110,100,108,101, 95, 97,108,105,103,110, 91, 52, 93, 0,104, 97,110,100,108,101, 95,
+ 97,117,116,111, 95, 99,108, 97,109,112,101,100, 91, 52, 93, 0,104, 97,110,100,108,101, 95,115,101,108, 95,102,114,101,101, 91,
+ 52, 93, 0,104, 97,110,100,108,101, 95,115,101,108, 95, 97,117,116,111, 91, 52, 93, 0,104, 97,110,100,108,101, 95,115,101,108,
+ 95,118,101, 99,116, 91, 52, 93, 0,104, 97,110,100,108,101, 95,115,101,108, 95, 97,108,105,103,110, 91, 52, 93, 0,104, 97,110,
+100,108,101, 95,115,101,108, 95, 97,117,116,111, 95, 99,108, 97,109,112,101,100, 91, 52, 93, 0,100,115, 95, 99,104, 97,110,110,
+101,108, 91, 52, 93, 0,100,115, 95,115,117, 98, 99,104, 97,110,110,101,108, 91, 52, 93, 0, 99,111,110,115,111,108,101, 95,111,
+117,116,112,117,116, 91, 52, 93, 0, 99,111,110,115,111,108,101, 95,105,110,112,117,116, 91, 52, 93, 0, 99,111,110,115,111,108,
+101, 95,105,110,102,111, 91, 52, 93, 0, 99,111,110,115,111,108,101, 95,101,114,114,111,114, 91, 52, 93, 0, 99,111,110,115,111,
+108,101, 95, 99,117,114,115,111,114, 91, 52, 93, 0,118,101,114,116,101,120, 95,115,105,122,101, 0,111,117,116,108,105,110,101,
+ 95,119,105,100,116,104, 0,102, 97, 99,101,100,111,116, 95,115,105,122,101, 0,110,111,111,100,108,101, 95, 99,117,114,118,105,
+110,103, 0,115,121,110,116, 97,120,108, 91, 52, 93, 0,115,121,110,116, 97,120,110, 91, 52, 93, 0,115,121,110,116, 97,120, 98,
+ 91, 52, 93, 0,115,121,110,116, 97,120,118, 91, 52, 93, 0,115,121,110,116, 97,120, 99, 91, 52, 93, 0,109,111,118,105,101, 91,
+ 52, 93, 0,109,111,118,105,101, 99,108,105,112, 91, 52, 93, 0,105,109, 97,103,101, 91, 52, 93, 0,115, 99,101,110,101, 91, 52,
+ 93, 0, 97,117,100,105,111, 91, 52, 93, 0,101,102,102,101, 99,116, 91, 52, 93, 0,112,108,117,103,105,110, 91, 52, 93, 0,116,
+114, 97,110,115,105,116,105,111,110, 91, 52, 93, 0,109,101,116, 97, 91, 52, 93, 0,101,100,105,116,109,101,115,104, 95, 97, 99,
+116,105,118,101, 91, 52, 93, 0,104, 97,110,100,108,101, 95,118,101,114,116,101,120, 91, 52, 93, 0,104, 97,110,100,108,101, 95,
+118,101,114,116,101,120, 95,115,101,108,101, 99,116, 91, 52, 93, 0,104, 97,110,100,108,101, 95,118,101,114,116,101,120, 95,115,
+105,122,101, 0,109, 97,114,107,101,114, 95,111,117,116,108,105,110,101, 91, 52, 93, 0,109, 97,114,107,101,114, 91, 52, 93, 0,
+ 97, 99,116, 95,109, 97,114,107,101,114, 91, 52, 93, 0,115,101,108, 95,109, 97,114,107,101,114, 91, 52, 93, 0,100,105,115, 95,
+109, 97,114,107,101,114, 91, 52, 93, 0,108,111, 99,107, 95,109, 97,114,107,101,114, 91, 52, 93, 0, 98,117,110,100,108,101, 95,
+115,111,108,105,100, 91, 52, 93, 0,112, 97,116,104, 95, 98,101,102,111,114,101, 91, 52, 93, 0,112, 97,116,104, 95, 97,102,116,
+101,114, 91, 52, 93, 0, 99, 97,109,101,114, 97, 95,112, 97,116,104, 91, 52, 93, 0,104,112, 97,100, 91, 55, 93, 0,112,114,101,
+118,105,101,119, 95, 98, 97, 99,107, 91, 52, 93, 0,112,114,101,118,105,101,119, 95,115,116,105,116, 99,104, 95,102, 97, 99,101,
+ 91, 52, 93, 0,112,114,101,118,105,101,119, 95,115,116,105,116, 99,104, 95,101,100,103,101, 91, 52, 93, 0,112,114,101,118,105,
+101,119, 95,115,116,105,116, 99,104, 95,118,101,114,116, 91, 52, 93, 0,112,114,101,118,105,101,119, 95,115,116,105,116, 99,104,
+ 95,115,116,105,116, 99,104, 97, 98,108,101, 91, 52, 93, 0,112,114,101,118,105,101,119, 95,115,116,105,116, 99,104, 95,117,110,
+115,116,105,116, 99,104, 97, 98,108,101, 91, 52, 93, 0,112,114,101,118,105,101,119, 95,115,116,105,116, 99,104, 95, 97, 99,116,
+105,118,101, 91, 52, 93, 0,109, 97,116, 99,104, 91, 52, 93, 0,115,101,108,101, 99,116,101,100, 95,104,105,103,104,108,105,103,
+104,116, 91, 52, 93, 0,115,111,108,105,100, 91, 52, 93, 0,116,117,105, 0,116, 98,117,116,115, 0,116,118, 51,100, 0,116,102,
+105,108,101, 0,116,105,112,111, 0,116,105,110,102,111, 0,116, 97, 99,116, 0,116,110,108, 97, 0,116,115,101,113, 0,116,105,
+109, 97, 0,116,101,120,116, 0,116,111,111,112,115, 0,116,116,105,109,101, 0,116,110,111,100,101, 0,116,108,111,103,105, 99,
+ 0,116,117,115,101,114,112,114,101,102, 0,116, 99,111,110,115,111,108,101, 0,116, 99,108,105,112, 0,116, 97,114,109, 91, 50,
+ 48, 93, 0, 97, 99,116,105,118,101, 95,116,104,101,109,101, 95, 97,114,101, 97, 0,109,111,100,117,108,101, 91, 54, 52, 93, 0,
+115,112,101, 99, 91, 52, 93, 0,100,117,112,102,108, 97,103, 0,115, 97,118,101,116,105,109,101, 0,116,101,109,112,100,105,114,
+ 91, 55, 54, 56, 93, 0,102,111,110,116,100,105,114, 91, 55, 54, 56, 93, 0,114,101,110,100,101,114,100,105,114, 91, 49, 48, 50,
+ 52, 93, 0,116,101,120,116,117,100,105,114, 91, 55, 54, 56, 93, 0,112,108,117,103,116,101,120,100,105,114, 91, 55, 54, 56, 93,
+ 0,112,108,117,103,115,101,113,100,105,114, 91, 55, 54, 56, 93, 0,112,121,116,104,111,110,100,105,114, 91, 55, 54, 56, 93, 0,
+115,111,117,110,100,100,105,114, 91, 55, 54, 56, 93, 0,105,109, 97,103,101, 95,101,100,105,116,111,114, 91, 49, 48, 50, 52, 93,
+ 0, 97,110,105,109, 95,112,108, 97,121,101,114, 91, 49, 48, 50, 52, 93, 0, 97,110,105,109, 95,112,108, 97,121,101,114, 95,112,
+114,101,115,101,116, 0,118, 50,100, 95,109,105,110, 95,103,114,105,100,115,105,122,101, 0,116,105,109,101, 99,111,100,101, 95,
+115,116,121,108,101, 0,118,101,114,115,105,111,110,115, 0,100, 98,108, 95, 99,108,105, 99,107, 95,116,105,109,101, 0,103, 97,
+109,101,102,108, 97,103,115, 0,119,104,101,101,108,108,105,110,101,115, 99,114,111,108,108, 0,117,105,102,108, 97,103, 0,108,
+ 97,110,103,117, 97,103,101, 0,117,115,101,114,112,114,101,102, 0,118,105,101,119,122,111,111,109, 0,109,105,120, 98,117,102,
+115,105,122,101, 0, 97,117,100,105,111,100,101,118,105, 99,101, 0, 97,117,100,105,111,114, 97,116,101, 0, 97,117,100,105,111,
+102,111,114,109, 97,116, 0, 97,117,100,105,111, 99,104, 97,110,110,101,108,115, 0,100,112,105, 0,101,110, 99,111,100,105,110,
+103, 0,116,114, 97,110,115,111,112,116,115, 0,109,101,110,117,116,104,114,101,115,104,111,108,100, 49, 0,109,101,110,117,116,
+104,114,101,115,104,111,108,100, 50, 0,116,104,101,109,101,115, 0,117,105,102,111,110,116,115, 0,117,105,115,116,121,108,101,
+115, 0,107,101,121,109, 97,112,115, 0,117,115,101,114, 95,107,101,121,109, 97,112,115, 0, 97,100,100,111,110,115, 0,107,101,
+121, 99,111,110,102,105,103,115,116,114, 91, 54, 52, 93, 0,117,110,100,111,115,116,101,112,115, 0,117,110,100,111,109,101,109,
+111,114,121, 0,103,112, 95,109, 97,110,104, 97,116,116,101,110,100,105,115,116, 0,103,112, 95,101,117, 99,108,105,100,101, 97,
+110,100,105,115,116, 0,103,112, 95,101,114, 97,115,101,114, 0,103,112, 95,115,101,116,116,105,110,103,115, 0,116, 98, 95,108,
+101,102,116,109,111,117,115,101, 0,116, 98, 95,114,105,103,104,116,109,111,117,115,101, 0,108,105,103,104,116, 91, 51, 93, 0,
+116,119, 95,104,111,116,115,112,111,116, 0,116,119, 95,102,108, 97,103, 0,116,119, 95,104, 97,110,100,108,101,115,105,122,101,
+ 0,116,119, 95,115,105,122,101, 0,116,101,120,116,105,109,101,111,117,116, 0,116,101,120, 99,111,108,108,101, 99,116,114, 97,
+116,101, 0,119,109,100,114, 97,119,109,101,116,104,111,100, 0,100,114, 97,103,116,104,114,101,115,104,111,108,100, 0,109,101,
+109, 99, 97, 99,104,101,108,105,109,105,116, 0,112,114,101,102,101,116, 99,104,102,114, 97,109,101,115, 0,102,114, 97,109,101,
+115,101,114,118,101,114,112,111,114,116, 0,112, 97,100, 95,114,111,116, 95, 97,110,103,108,101, 0,111, 98, 99,101,110,116,101,
+114, 95,100,105, 97, 0,114,118,105,115,105,122,101, 0,114,118,105, 98,114,105,103,104,116, 0,114,101, 99,101,110,116, 95,102,
+105,108,101,115, 0,115,109,111,111,116,104, 95,118,105,101,119,116,120, 0,103,108,114,101,115,108,105,109,105,116, 0, 99,117,
+114,115,115,105,122,101, 0, 99,111,108,111,114, 95,112,105, 99,107,101,114, 95,116,121,112,101, 0,105,112,111, 95,110,101,119,
+ 0,107,101,121,104, 97,110,100,108,101,115, 95,110,101,119, 0,115, 99,114, 99, 97,115,116,102,112,115, 0,115, 99,114, 99, 97,
+115,116,119, 97,105,116, 0,119,105,100,103,101,116, 95,117,110,105,116, 0, 97,110,105,115,111,116,114,111,112,105, 99, 95,102,
+105,108,116,101,114, 0,117,115,101, 95, 49, 54, 98,105,116, 95,116,101,120,116,117,114,101,115, 0,112, 97,100, 56, 0,110,100,
+111,102, 95,115,101,110,115,105,116,105,118,105,116,121, 0,110,100,111,102, 95,102,108, 97,103, 0,103,108, 97,108,112,104, 97,
+ 99,108,105,112, 0,116,101,120,116, 95,114,101,110,100,101,114, 0,112, 97,100, 57, 0, 99,111, 98, 97, 95,119,101,105,103,104,
+116, 0,115, 99,117,108,112,116, 95,112, 97,105,110,116, 95,111,118,101,114,108, 97,121, 95, 99,111,108, 91, 51, 93, 0,116,119,
+101, 97,107, 95,116,104,114,101,115,104,111,108,100, 0, 97,117,116,104,111,114, 91, 56, 48, 93, 0, 99,111,109,112,117,116,101,
+ 95,100,101,118,105, 99,101, 95,116,121,112,101, 0, 99,111,109,112,117,116,101, 95,100,101,118,105, 99,101, 95,105,100, 0,102,
+ 99,117, 95,105,110, 97, 99,116,105,118,101, 95, 97,108,112,104, 97, 0,118,101,114,116, 98, 97,115,101, 0,101,100,103,101, 98,
+ 97,115,101, 0, 97,114,101, 97, 98, 97,115,101, 0, 42,110,101,119,115, 99,101,110,101, 0,114,101,100,114, 97,119,115, 95,102,
+108, 97,103, 0,102,117,108,108, 0,116,101,109,112, 0,119,105,110,105,100, 0,100,111, 95,100,114, 97,119, 0,100,111, 95,114,
+101,102,114,101,115,104, 0,100,111, 95,100,114, 97,119, 95,103,101,115,116,117,114,101, 0,100,111, 95,100,114, 97,119, 95,112,
+ 97,105,110,116, 99,117,114,115,111,114, 0,100,111, 95,100,114, 97,119, 95,100,114, 97,103, 0,115,119, 97,112, 0,109, 97,105,
+110,119,105,110, 0,115,117, 98,119,105,110, 97, 99,116,105,118,101, 0, 42, 97,110,105,109,116,105,109,101,114, 0, 42, 99,111,
+110,116,101,120,116, 0,104, 97,110,100,108,101,114, 91, 56, 93, 0, 42,110,101,119,118, 0,118,101, 99, 0, 42,118, 49, 0, 42,
+118, 50, 0, 42,116,121,112,101, 0,112, 97,110,101,108,110, 97,109,101, 91, 54, 52, 93, 0,116, 97, 98,110, 97,109,101, 91, 54,
+ 52, 93, 0,100,114, 97,119,110, 97,109,101, 91, 54, 52, 93, 0,111,102,115,120, 0,111,102,115,121, 0,115,105,122,101,120, 0,
+115,105,122,101,121, 0,108, 97, 98,101,108,111,102,115, 0,114,117,110,116,105,109,101, 95,102,108, 97,103, 0, 99,111,110,116,
+114,111,108, 0,115,110, 97,112, 0,115,111,114,116,111,114,100,101,114, 0, 42,112, 97,110,101,108,116, 97, 98, 0, 42, 97, 99,
+116,105,118,101,100, 97,116, 97, 0,108,105,115,116, 95,115, 99,114,111,108,108, 0,108,105,115,116, 95,115,105,122,101, 0,108,
+105,115,116, 95,108, 97,115,116, 95,108,101,110, 0,108,105,115,116, 95,103,114,105,112, 95,115,105,122,101, 0,108,105,115,116,
+ 95,115,101, 97,114, 99,104, 91, 54, 52, 93, 0, 42,118, 51, 0, 42,118, 52, 0, 42,102,117,108,108, 0, 98,117,116,115,112, 97,
+ 99,101,116,121,112,101, 0,104,101, 97,100,101,114,116,121,112,101, 0,115,112, 97, 99,101,100, 97,116, 97, 0,104, 97,110,100,
+108,101,114,115, 0, 97, 99,116,105,111,110,122,111,110,101,115, 0,119,105,110,114, 99,116, 0,100,114, 97,119,114, 99,116, 0,
+115,119,105,110,105,100, 0,114,101,103,105,111,110,116,121,112,101, 0, 97,108,105,103,110,109,101,110,116, 0,100,111, 95,100,
+114, 97,119, 95,111,118,101,114,108, 97,121, 0,117,105, 98,108,111, 99,107,115, 0,112, 97,110,101,108,115, 0, 42,104,101, 97,
+100,101,114,115,116,114, 0, 42,114,101,103,105,111,110,100, 97,116, 97, 0,115,117, 98,118,115,116,114, 91, 52, 93, 0,115,117,
+ 98,118,101,114,115,105,111,110, 0,112, 97,100,115, 0,109,105,110,118,101,114,115,105,111,110, 0,109,105,110,115,117, 98,118,
+101,114,115,105,111,110, 0,119,105,110,112,111,115, 0, 42, 99,117,114,115, 99,114,101,101,110, 0, 42, 99,117,114,115, 99,101,
+110,101, 0,102,105,108,101,102,108, 97,103,115, 0,103,108,111, 98, 97,108,102, 0,114,101,118,105,115,105,111,110, 0,110, 97,
+109,101, 91, 50, 53, 54, 93, 0,111,114,105,103, 95,119,105,100,116,104, 0,111,114,105,103, 95,104,101,105,103,104,116, 0, 98,
+111,116,116,111,109, 0,114,105,103,104,116, 0,120,111,102,115, 0,121,111,102,115, 0,108,105,102,116, 91, 51, 93, 0,103, 97,
+109,109, 97, 91, 51, 93, 0,103, 97,105,110, 91, 51, 93, 0,100,105,114, 91, 55, 54, 56, 93, 0,116, 99, 0, 98,117,105,108,100,
+ 95,115,105,122,101, 95,102,108, 97,103,115, 0, 98,117,105,108,100, 95,116, 99, 95,102,108, 97,103,115, 0,100,111,110,101, 0,
+115,116, 97,114,116,115,116,105,108,108, 0,101,110,100,115,116,105,108,108, 0, 42,115,116,114,105,112,100, 97,116, 97, 0, 42,
+ 99,114,111,112, 0, 42,116,114, 97,110,115,102,111,114,109, 0, 42, 99,111,108,111,114, 95, 98, 97,108, 97,110, 99,101, 0, 42,
+105,110,115,116, 97,110, 99,101, 95,112,114,105,118, 97,116,101, 95,100, 97,116, 97, 0, 42, 42, 99,117,114,114,101,110,116, 95,
+112,114,105,118, 97,116,101, 95,100, 97,116, 97, 0, 42,116,109,112, 0,115,116, 97,114,116,111,102,115, 0,101,110,100,111,102,
+115, 0,109, 97, 99,104,105,110,101, 0,115,116, 97,114,116,100,105,115,112, 0,101,110,100,100,105,115,112, 0,115, 97,116, 0,
+109,117,108, 0,104, 97,110,100,115,105,122,101, 0, 97,110,105,109, 95,112,114,101,115,101,101,107, 0,115,116,114,101, 97,109,
+105,110,100,101,120, 0,109,117,108,116,105, 99, 97,109, 95,115,111,117,114, 99,101, 0, 99,108,105,112, 95,102,108, 97,103, 0,
+ 42,115,116,114,105,112, 0, 42,115, 99,101,110,101, 95, 99, 97,109,101,114, 97, 0,101,102,102,101, 99,116, 95,102, 97,100,101,
+114, 0,115,112,101,101,100, 95,102, 97,100,101,114, 0, 42,115,101,113, 49, 0, 42,115,101,113, 50, 0, 42,115,101,113, 51, 0,
+115,101,113, 98, 97,115,101, 0, 42,115,111,117,110,100, 0, 42,115, 99,101,110,101, 95,115,111,117,110,100, 0,112,105,116, 99,
+104, 0,112, 97,110, 0,115,116,114,111, 98,101, 0, 42,101,102,102,101, 99,116,100, 97,116, 97, 0, 97,110,105,109, 95,115,116,
+ 97,114,116,111,102,115, 0, 97,110,105,109, 95,101,110,100,111,102,115, 0, 98,108,101,110,100, 95,109,111,100,101, 0, 98,108,
+101,110,100, 95,111,112, 97, 99,105,116,121, 0, 42,111,108,100, 98, 97,115,101,112, 0, 42,112, 97,114,115,101,113, 0, 42,115,
+101,113, 98, 97,115,101,112, 0,109,101,116, 97,115,116, 97, 99,107, 0, 42, 97, 99,116, 95,115,101,113, 0, 97, 99,116, 95,105,
+109, 97,103,101,100,105,114, 91, 49, 48, 50, 52, 93, 0, 97, 99,116, 95,115,111,117,110,100,100,105,114, 91, 49, 48, 50, 52, 93,
+ 0,111,118,101,114, 95,111,102,115, 0,111,118,101,114, 95, 99,102,114, 97, 0,111,118,101,114, 95,102,108, 97,103, 0,111,118,
+101,114, 95, 98,111,114,100,101,114, 0,101,100,103,101, 87,105,100,116,104, 0,102,111,114,119, 97,114,100, 0,119,105,112,101,
+116,121,112,101, 0,102, 77,105,110,105, 0,102, 67,108, 97,109,112, 0,102, 66,111,111,115,116, 0,100, 68,105,115,116, 0,100,
+ 81,117, 97,108,105,116,121, 0, 98, 78,111, 67,111,109,112, 0, 83, 99, 97,108,101,120, 73,110,105, 0, 83, 99, 97,108,101,121,
+ 73,110,105, 0,120, 73,110,105, 0,121, 73,110,105, 0,114,111,116, 73,110,105, 0,105,110,116,101,114,112,111,108, 97,116,105,
+111,110, 0,117,110,105,102,111,114,109, 95,115, 99, 97,108,101, 0, 42,102,114, 97,109,101, 77, 97,112, 0,103,108,111, 98, 97,
+108, 83,112,101,101,100, 0,108, 97,115,116, 86, 97,108,105,100, 70,114, 97,109,101, 0, 98,117,116,116,121,112,101, 0,117,115,
+101,114,106,105,116, 0,115,116, 97, 0,116,111,116,112, 97,114,116, 0,110,111,114,109,102, 97, 99, 0,111, 98,102, 97, 99, 0,
+114, 97,110,100,102, 97, 99, 0,116,101,120,102, 97, 99, 0,114, 97,110,100,108,105,102,101, 0,102,111,114, 99,101, 91, 51, 93,
+ 0,118,101, 99,116,115,105,122,101, 0,109, 97,120,108,101,110, 0,100,101,102,118,101, 99, 91, 51, 93, 0,109,117,108,116, 91,
+ 52, 93, 0,108,105,102,101, 91, 52, 93, 0, 99,104,105,108,100, 91, 52, 93, 0,109, 97,116, 91, 52, 93, 0,116,101,120,109, 97,
+112, 0, 99,117,114,109,117,108,116, 0,115,116, 97,116,105, 99,115,116,101,112, 0,111,109, 97,116, 0,116,105,109,101,116,101,
+120, 0,115,112,101,101,100,116,101,120, 0,102,108, 97,103, 50,110,101,103, 0,118,101,114,116,103,114,111,117,112, 95,118, 0,
+118,103,114,111,117,112,110, 97,109,101, 91, 54, 52, 93, 0,118,103,114,111,117,112,110, 97,109,101, 95,118, 91, 54, 52, 93, 0,
+ 42,107,101,121,115, 0,109,105,110,102, 97, 99, 0,110,114, 0,117,115,101,100, 0,117,115,101,100,101,108,101,109, 0, 42,112,
+111,105,110, 0,114,101,115,101,116,100,105,115,116, 0,108, 97,115,116,118, 97,108, 0, 42,109, 97, 0,107,101,121, 0,113,117,
+ 97,108, 0,113,117, 97,108, 50, 0,116, 97,114,103,101,116, 78, 97,109,101, 91, 54, 52, 93, 0,116,111,103,103,108,101, 78, 97,
+109,101, 91, 54, 52, 93, 0,118, 97,108,117,101, 91, 54, 52, 93, 0,109, 97,120,118, 97,108,117,101, 91, 54, 52, 93, 0,100,101,
+108, 97,121, 0,100,117,114, 97,116,105,111,110, 0,109, 97,116,101,114,105, 97,108, 78, 97,109,101, 91, 54, 52, 93, 0,100, 97,
+109,112,116,105,109,101,114, 0,112,114,111,112,110, 97,109,101, 91, 54, 52, 93, 0,109, 97,116,110, 97,109,101, 91, 54, 52, 93,
+ 0, 97,120,105,115,102,108, 97,103, 0,112,111,115,101, 99,104, 97,110,110,101,108, 91, 54, 52, 93, 0, 99,111,110,115,116,114,
+ 97,105,110,116, 91, 54, 52, 93, 0, 42,102,114,111,109, 79, 98,106,101, 99,116, 0,115,117, 98,106,101, 99,116, 91, 54, 52, 93,
+ 0, 98,111,100,121, 91, 54, 52, 93, 0,111,116,121,112,101, 0,112,117,108,115,101, 0,102,114,101,113, 0,116,111,116,108,105,
+110,107,115, 0, 42, 42,108,105,110,107,115, 0,116, 97,112, 0,106,111,121,105,110,100,101,120, 0, 97,120,105,115, 95,115,105,
+110,103,108,101, 0, 97,120,105,115,102, 0, 98,117,116,116,111,110, 0,104, 97,116, 0,104, 97,116,102, 0,112,114,101, 99,105,
+115,105,111,110, 0,115,116,114, 91, 49, 50, 56, 93, 0, 42,109,121,110,101,119, 0,105,110,112,117,116,115, 0,116,111,116,115,
+108,105,110,107,115, 0, 42, 42,115,108,105,110,107,115, 0,118, 97,108,111, 0,115,116, 97,116,101, 95,109, 97,115,107, 0, 42,
+ 97, 99,116, 0,102,114, 97,109,101, 80,114,111,112, 91, 54, 52, 93, 0, 98,108,101,110,100,105,110, 0,112,114,105,111,114,105,
+116,121, 0,101,110,100, 95,114,101,115,101,116, 0,115,116,114,105,100,101, 97,120,105,115, 0,115,116,114,105,100,101,108,101,
+110,103,116,104, 0,108, 97,121,101,114, 95,119,101,105,103,104,116, 0,109,105,110, 95,103, 97,105,110, 0,109, 97,120, 95,103,
+ 97,105,110, 0,114,101,102,101,114,101,110, 99,101, 95,100,105,115,116, 97,110, 99,101, 0,109, 97,120, 95,100,105,115,116, 97,
+110, 99,101, 0,114,111,108,108,111,102,102, 95,102, 97, 99,116,111,114, 0, 99,111,110,101, 95,105,110,110,101,114, 95, 97,110,
+103,108,101, 0, 99,111,110,101, 95,111,117,116,101,114, 95, 97,110,103,108,101, 0, 99,111,110,101, 95,111,117,116,101,114, 95,
+103, 97,105,110, 0,115,110,100,110,114, 0,115,111,117,110,100, 51, 68, 0,112, 97,100, 54, 91, 49, 93, 0, 42,109,101, 0,108,
+105,110, 86,101,108,111, 99,105,116,121, 91, 51, 93, 0, 97,110,103, 86,101,108,111, 99,105,116,121, 91, 51, 93, 0,108,111, 99,
+ 97,108,102,108, 97,103, 0,100,121,110, 95,111,112,101,114, 97,116,105,111,110, 0,102,111,114, 99,101,108,111, 99, 91, 51, 93,
+ 0,102,111,114, 99,101,114,111,116, 91, 51, 93, 0,112, 97,100, 49, 91, 51, 93, 0,108,105,110,101, 97,114,118,101,108,111, 99,
+105,116,121, 91, 51, 93, 0, 97,110,103,117,108, 97,114,118,101,108,111, 99,105,116,121, 91, 51, 93, 0, 42,114,101,102,101,114,
+101,110, 99,101, 0,109,105,110, 0,109, 97,120, 0,114,111,116,100, 97,109,112, 0,109,105,110,108,111, 99, 91, 51, 93, 0,109,
+ 97,120,108,111, 99, 91, 51, 93, 0,109,105,110,114,111,116, 91, 51, 93, 0,109, 97,120,114,111,116, 91, 51, 93, 0,109, 97,116,
+112,114,111,112, 91, 54, 52, 93, 0, 98,117,116,115,116, 97, 0, 98,117,116,101,110,100, 0,100,105,115,116,114,105, 98,117,116,
+105,111,110, 0,105,110,116, 95, 97,114,103, 95, 49, 0,105,110,116, 95, 97,114,103, 95, 50, 0,102,108,111, 97,116, 95, 97,114,
+103, 95, 49, 0,102,108,111, 97,116, 95, 97,114,103, 95, 50, 0,116,111, 80,114,111,112, 78, 97,109,101, 91, 54, 52, 93, 0, 42,
+116,111, 79, 98,106,101, 99,116, 0, 98,111,100,121, 84,121,112,101, 0,102,105,108,101,110, 97,109,101, 91, 54, 52, 93, 0,108,
+111, 97,100, 97,110,105,110, 97,109,101, 91, 54, 52, 93, 0,105,110,116, 95, 97,114,103, 0,102,108,111, 97,116, 95, 97,114,103,
+ 0,105,110,102,108,117,101,110, 99,101, 0, 42,115,117, 98,116, 97,114,103,101,116, 0,102, 97, 99,105,110,103, 97,120,105,115,
+ 0,118,101,108,111, 99,105,116,121, 0, 97, 99, 99,101,108,101,114, 97,116,105,111,110, 0,116,117,114,110,115,112,101,101,100,
+ 0,117,112,100, 97,116,101, 84,105,109,101, 0, 42,110, 97,118,109,101,115,104, 0,103,111, 0, 42,110,101,119,112, 97, 99,107,
+101,100,102,105,108,101, 0, 97,116,116,101,110,117, 97,116,105,111,110, 0,100,105,115,116, 97,110, 99,101, 0, 42, 99, 97, 99,
+104,101, 0, 42,119, 97,118,101,102,111,114,109, 0, 42,112,108, 97,121, 98, 97, 99,107, 95,104, 97,110,100,108,101, 0, 42,108,
+ 97,109,112,114,101,110, 0,103,111, 98,106,101, 99,116, 0,100,117,112,108,105, 95,111,102,115, 91, 51, 93, 0, 42,112,114,111,
+112, 0, 99,104,105,108,100, 98, 97,115,101, 0,114,111,108,108, 0,104,101, 97,100, 91, 51, 93, 0,116, 97,105,108, 91, 51, 93,
+ 0, 98,111,110,101, 95,109, 97,116, 91, 51, 93, 91, 51, 93, 0, 97,114,109, 95,104,101, 97,100, 91, 51, 93, 0, 97,114,109, 95,
+116, 97,105,108, 91, 51, 93, 0, 97,114,109, 95,109, 97,116, 91, 52, 93, 91, 52, 93, 0, 97,114,109, 95,114,111,108,108, 0,120,
+119,105,100,116,104, 0,122,119,105,100,116,104, 0,101, 97,115,101, 49, 0,101, 97,115,101, 50, 0,114, 97,100, 95,104,101, 97,
+100, 0,114, 97,100, 95,116, 97,105,108, 0,112, 97,100, 91, 49, 93, 0, 98,111,110,101, 98, 97,115,101, 0, 99,104, 97,105,110,
+ 98, 97,115,101, 0, 42,101,100, 98,111, 0, 42, 97, 99,116, 95, 98,111,110,101, 0, 42, 97, 99,116, 95,101,100, 98,111,110,101,
+ 0, 42,115,107,101,116, 99,104, 0,103,101,118,101,114,116,100,101,102,111,114,109,101,114, 0,108, 97,121,101,114, 95,117,115,
+101,100, 0,108, 97,121,101,114, 95,112,114,111,116,101, 99,116,101,100, 0,103,104,111,115,116,101,112, 0,103,104,111,115,116,
+115,105,122,101, 0,103,104,111,115,116,116,121,112,101, 0,112, 97,116,104,115,105,122,101, 0,103,104,111,115,116,115,102, 0,
+103,104,111,115,116,101,102, 0,112, 97,116,104,115,102, 0,112, 97,116,104,101,102, 0,112, 97,116,104, 98, 99, 0,112, 97,116,
+104, 97, 99, 0, 42,112,111,105,110,116,115, 0,115,116, 97,114,116, 95,102,114, 97,109,101, 0,101,110,100, 95,102,114, 97,109,
+101, 0,103,104,111,115,116, 95,115,102, 0,103,104,111,115,116, 95,101,102, 0,103,104,111,115,116, 95, 98, 99, 0,103,104,111,
+115,116, 95, 97, 99, 0,103,104,111,115,116, 95,116,121,112,101, 0,103,104,111,115,116, 95,115,116,101,112, 0,103,104,111,115,
+116, 95,102,108, 97,103, 0,112, 97,116,104, 95,116,121,112,101, 0,112, 97,116,104, 95,115,116,101,112, 0,112, 97,116,104, 95,
+118,105,101,119,102,108, 97,103, 0,112, 97,116,104, 95, 98, 97,107,101,102,108, 97,103, 0,112, 97,116,104, 95,115,102, 0,112,
+ 97,116,104, 95,101,102, 0,112, 97,116,104, 95, 98, 99, 0,112, 97,116,104, 95, 97, 99, 0,105,107,102,108, 97,103, 0, 97,103,
+114,112, 95,105,110,100,101,120, 0, 99,111,110,115,116,102,108, 97,103, 0,115,101,108,101, 99,116,102,108, 97,103, 0,112, 97,
+100, 48, 91, 54, 93, 0, 42, 98,111,110,101, 0, 42, 99,104,105,108,100, 0,105,107,116,114,101,101, 0,115,105,107,116,114,101,
+101, 0, 42, 99,117,115,116,111,109, 0, 42, 99,117,115,116,111,109, 95,116,120, 0,101,117,108, 91, 51, 93, 0, 99,104, 97,110,
+ 95,109, 97,116, 91, 52, 93, 91, 52, 93, 0,112,111,115,101, 95,109, 97,116, 91, 52, 93, 91, 52, 93, 0,112,111,115,101, 95,104,
+101, 97,100, 91, 51, 93, 0,112,111,115,101, 95,116, 97,105,108, 91, 51, 93, 0,108,105,109,105,116,109,105,110, 91, 51, 93, 0,
+108,105,109,105,116,109, 97,120, 91, 51, 93, 0,115,116,105,102,102,110,101,115,115, 91, 51, 93, 0,105,107,115,116,114,101,116,
+ 99,104, 0,105,107,114,111,116,119,101,105,103,104,116, 0,105,107,108,105,110,119,101,105,103,104,116, 0, 42,116,101,109,112,
+ 0, 99,104, 97,110, 98, 97,115,101, 0, 42, 99,104, 97,110,104, 97,115,104, 0,112,114,111,120,121, 95,108, 97,121,101,114, 0,
+115,116,114,105,100,101, 95,111,102,102,115,101,116, 91, 51, 93, 0, 99,121, 99,108,105, 99, 95,111,102,102,115,101,116, 91, 51,
+ 93, 0, 97,103,114,111,117,112,115, 0, 97, 99,116,105,118,101, 95,103,114,111,117,112, 0,105,107,115,111,108,118,101,114, 0,
+ 42,105,107,100, 97,116, 97, 0, 42,105,107,112, 97,114, 97,109, 0,112,114,111,120,121, 95, 97, 99,116, 95, 98,111,110,101, 91,
+ 54, 52, 93, 0,110,117,109,105,116,101,114, 0,110,117,109,115,116,101,112, 0,109,105,110,115,116,101,112, 0,109, 97,120,115,
+116,101,112, 0,115,111,108,118,101,114, 0,102,101,101,100, 98, 97, 99,107, 0,109, 97,120,118,101,108, 0,100, 97,109,112,109,
+ 97,120, 0,100, 97,109,112,101,112,115, 0, 99,104, 97,110,110,101,108,115, 0, 99,117,115,116,111,109, 67,111,108, 0, 99,115,
+ 0, 99,117,114,118,101,115, 0,103,114,111,117,112,115, 0, 97, 99,116,105,118,101, 95,109, 97,114,107,101,114, 0,105,100,114,
+111,111,116, 0, 42,115,111,117,114, 99,101, 0, 42,102,105,108,116,101,114, 95,103,114,112, 0,115,101, 97,114, 99,104,115,116,
+114, 91, 54, 52, 93, 0,102,105,108,116,101,114,102,108, 97,103, 0,114,101,110, 97,109,101, 73,110,100,101,120, 0, 97,100,115,
+ 0,116,105,109,101,115,108,105,100,101, 0, 42,103,114,112, 0,110, 97,109,101, 91, 51, 48, 93, 0,111,119,110,115,112, 97, 99,
+101, 0,116, 97,114,115,112, 97, 99,101, 0,101,110,102,111,114, 99,101, 0,104,101, 97,100,116, 97,105,108, 0,108,105,110, 95,
+101,114,114,111,114, 0,114,111,116, 95,101,114,114,111,114, 0, 42,116, 97,114, 0,109, 97,116,114,105,120, 91, 52, 93, 91, 52,
+ 93, 0,115,112, 97, 99,101, 0,114,111,116, 79,114,100,101,114, 0,116, 97,114,110,117,109, 0,116, 97,114,103,101,116,115, 0,
+105,116,101,114, 97,116,105,111,110,115, 0,114,111,111,116, 98,111,110,101, 0,109, 97,120, 95,114,111,111,116, 98,111,110,101,
+ 0, 42,112,111,108,101,116, 97,114, 0,112,111,108,101,115,117, 98,116, 97,114,103,101,116, 91, 54, 52, 93, 0,112,111,108,101,
+ 97,110,103,108,101, 0,111,114,105,101,110,116,119,101,105,103,104,116, 0,103,114, 97, 98,116, 97,114,103,101,116, 91, 51, 93,
+ 0,110,117,109,112,111,105,110,116,115, 0, 99,104, 97,105,110,108,101,110, 0,120,122, 83, 99, 97,108,101, 77,111,100,101, 0,
+114,101,115,101,114,118,101,100, 49, 0,114,101,115,101,114,118,101,100, 50, 0,109,105,110,109, 97,120,102,108, 97,103, 0,115,
+116,117, 99,107, 0, 99, 97, 99,104,101, 91, 51, 93, 0,108,111, 99,107,102,108, 97,103, 0,102,111,108,108,111,119,102,108, 97,
+103, 0,118,111,108,109,111,100,101, 0,112,108, 97,110,101, 0,111,114,103,108,101,110,103,116,104, 0, 98,117,108,103,101, 0,
+112,105,118, 88, 0,112,105,118, 89, 0,112,105,118, 90, 0, 97,120, 88, 0, 97,120, 89, 0, 97,120, 90, 0,109,105,110, 76,105,
+109,105,116, 91, 54, 93, 0,109, 97,120, 76,105,109,105,116, 91, 54, 93, 0,101,120,116,114, 97, 70,122, 0,105,110,118,109, 97,
+116, 91, 52, 93, 91, 52, 93, 0,102,114,111,109, 0,116,111, 0,109, 97,112, 91, 51, 93, 0,101,120,112,111, 0,102,114,111,109,
+ 95,109,105,110, 91, 51, 93, 0,102,114,111,109, 95,109, 97,120, 91, 51, 93, 0,116,111, 95,109,105,110, 91, 51, 93, 0,116,111,
+ 95,109, 97,120, 91, 51, 93, 0,114,111,116, 65,120,105,115, 0,122,109,105,110, 0,122,109, 97,120, 0,112, 97,100, 91, 57, 93,
+ 0,116,114, 97, 99,107, 91, 54, 52, 93, 0,111, 98,106,101, 99,116, 91, 54, 52, 93, 0, 42,100,101,112,116,104, 95,111, 98, 0,
+ 99,104, 97,110,110,101,108, 91, 51, 50, 93, 0,110,111, 95,114,111,116, 95, 97,120,105,115, 0,115,116,114,105,100,101, 95, 97,
+120,105,115, 0, 99,117,114,109,111,100, 0, 97, 99,116,115,116, 97,114,116, 0, 97, 99,116,101,110,100, 0, 97, 99,116,111,102,
+102,115, 0,115,116,114,105,100,101,108,101,110, 0, 98,108,101,110,100,111,117,116, 0,115,116,114,105,100,101, 99,104, 97,110,
+110,101,108, 91, 51, 50, 93, 0,111,102,102,115, 95, 98,111,110,101, 91, 51, 50, 93, 0,104, 97,115,105,110,112,117,116, 0,104,
+ 97,115,111,117,116,112,117,116, 0,100, 97,116, 97,116,121,112,101, 0,115,111, 99,107,101,116,116,121,112,101, 0,105,115, 95,
+ 99,111,112,121, 0,101,120,116,101,114,110, 97,108, 0, 42,110,101,119, 95,115,111, 99,107, 0, 42,115,116,111,114, 97,103,101,
+ 0,108,105,109,105,116, 0,115,116,114,117, 99,116, 95,116,121,112,101, 0,108,111, 99,120, 0,108,111, 99,121, 0, 42,100,101,
+102, 97,117,108,116, 95,118, 97,108,117,101, 0,115,116, 97, 99,107, 95,105,110,100,101,120, 0,115,116, 97, 99,107, 95,116,121,
+112,101, 0,111,119,110, 95,105,110,100,101,120, 0,116,111, 95,105,110,100,101,120, 0, 42,103,114,111,117,112,115,111, 99,107,
+ 0, 42,108,105,110,107, 0,110,115, 0, 42,114,101, 99,116, 0,120,115,105,122,101, 0,121,115,105,122,101, 0, 42,110,101,119,
+ 95,110,111,100,101, 0,108, 97,115,116,121, 0,111,117,116,112,117,116,115, 0,109,105,110,105,119,105,100,116,104, 0,117,112,
+100, 97,116,101, 0,108, 97, 98,101,108, 91, 54, 52, 93, 0, 99,117,115,116,111,109, 49, 0, 99,117,115,116,111,109, 50, 0, 99,
+117,115,116,111,109, 51, 0, 99,117,115,116,111,109, 52, 0,110,101,101,100, 95,101,120,101, 99, 0,101,120,101, 99, 0, 42,116,
+104,114,101, 97,100,100, 97,116, 97, 0,116,111,116,114, 0, 98,117,116,114, 0,112,114,118,114, 0, 42, 98,108,111, 99,107, 0,
+ 42,116,121,112,101,105,110,102,111, 0, 42,102,114,111,109,110,111,100,101, 0, 42,116,111,110,111,100,101, 0, 42,102,114,111,
+109,115,111, 99,107, 0, 42,116,111,115,111, 99,107, 0,110,111,100,101,115, 0,108,105,110,107,115, 0,105,110,105,116, 0, 99,
+117,114, 95,105,110,100,101,120, 0,110,111,100,101,116,121,112,101, 0, 42,101,120,101, 99,100, 97,116, 97, 0, 40, 42,112,114,
+111,103,114,101,115,115, 41, 40, 41, 0, 40, 42,115,116, 97,116,115, 95,100,114, 97,119, 41, 40, 41, 0, 40, 42,116,101,115,116,
+ 95, 98,114,101, 97,107, 41, 40, 41, 0, 42,116, 98,104, 0, 42,112,114,104, 0, 42,115,100,104, 0,118, 97,108,117,101, 91, 51,
+ 93, 0,118, 97,108,117,101, 91, 52, 93, 0, 99,121, 99,108,105, 99, 0,109,111,118,105,101, 0,109, 97,120,115,112,101,101,100,
+ 0,109,105,110,115,112,101,101,100, 0, 99,117,114,118,101,100, 0,112,101,114, 99,101,110,116,120, 0,112,101,114, 99,101,110,
+116,121, 0, 98,111,107,101,104, 0,103, 97,109,109, 97, 0,105,109, 97,103,101, 95,105,110, 95,119,105,100,116,104, 0,105,109,
+ 97,103,101, 95,105,110, 95,104,101,105,103,104,116, 0, 99,101,110,116,101,114, 95,120, 0, 99,101,110,116,101,114, 95,121, 0,
+115,112,105,110, 0,119,114, 97,112, 0,115,105,103,109, 97, 95, 99,111,108,111,114, 0,115,105,103,109, 97, 95,115,112, 97, 99,
+101, 0,104,117,101, 0, 98, 97,115,101, 95,112, 97,116,104, 91, 49, 48, 50, 52, 93, 0,102,111,114,109, 97,116, 0, 97, 99,116,
+105,118,101, 95,105,110,112,117,116, 0,117,115,101, 95,114,101,110,100,101,114, 95,102,111,114,109, 97,116, 0,117,115,101, 95,
+110,111,100,101, 95,102,111,114,109, 97,116, 0,116, 49, 0,116, 50, 0,116, 51, 0,102,115,116,114,101,110,103,116,104, 0,102,
+ 97,108,112,104, 97, 0,107,101,121, 91, 52, 93, 0, 97,108,103,111,114,105,116,104,109, 0, 99,104, 97,110,110,101,108, 0,120,
+ 49, 0,120, 50, 0,121, 49, 0,121, 50, 0,102, 97, 99, 95,120, 49, 0,102, 97, 99, 95,120, 50, 0,102, 97, 99, 95,121, 49, 0,
+102, 97, 99, 95,121, 50, 0, 99,111,108,110, 97,109,101, 91, 54, 52, 93, 0, 98,107,116,121,112,101, 0,112, 97,100, 95, 99, 49,
+ 0,103, 97,109, 99,111, 0,110,111, 95,122, 98,117,102, 0,102,115,116,111,112, 0,109, 97,120, 98,108,117,114, 0, 98,116,104,
+114,101,115,104, 0,114,111,116, 97,116,105,111,110, 0,112, 97,100, 95,102, 49, 0, 42,100,105, 99,116, 0, 42,110,111,100,101,
+ 0, 99,111,108,109,111,100, 0,109,105,120, 0,102, 97,100,101, 0, 97,110,103,108,101, 95,111,102,115, 0,109, 0, 99, 0,106,
+105,116, 0,112,114,111,106, 0,102,105,116, 0,115,108,111,112,101, 91, 51, 93, 0,112,111,119,101,114, 91, 51, 93, 0,108,105,
+102,116, 95,108,103,103, 91, 51, 93, 0,103, 97,109,109, 97, 95,105,110,118, 91, 51, 93, 0,108,105,109, 99,104, 97,110, 0,117,
+110,115,112,105,108,108, 0,108,105,109,115, 99, 97,108,101, 0,117,115,112,105,108,108,114, 0,117,115,112,105,108,108,103, 0,
+117,115,112,105,108,108, 98, 0,116,101,120, 95,109, 97,112,112,105,110,103, 0, 99,111,108,111,114, 95,109, 97,112,112,105,110,
+103, 0,115,117,110, 95,100,105,114,101, 99,116,105,111,110, 91, 51, 93, 0,116,117,114, 98,105,100,105,116,121, 0, 99,111,108,
+111,114, 95,115,112, 97, 99,101, 0,112,114,111,106,101, 99,116,105,111,110, 0,103,114, 97,100,105,101,110,116, 95,116,121,112,
+101, 0, 99,111,108,111,114,105,110,103, 0,109,117,115,103,114, 97,118,101, 95,116,121,112,101, 0,119, 97,118,101, 95,116,121,
+112,101, 0,115,104,111,114,116,121, 0,109,105,110,116, 97, 98,108,101, 0,109, 97,120,116, 97, 98,108,101, 0,101,120,116, 95,
+105,110, 91, 50, 93, 0,101,120,116, 95,111,117,116, 91, 50, 93, 0, 42, 99,117,114,118,101, 0, 42,116, 97, 98,108,101, 0, 42,
+112,114,101,109,117,108,116, 97, 98,108,101, 0,112,114,101,115,101,116, 0, 99,104, 97,110,103,101,100, 95,116,105,109,101,115,
+116, 97,109,112, 0, 99,117,114,114, 0, 99,108,105,112,114, 0, 99,109, 91, 52, 93, 0, 98,108, 97, 99,107, 91, 51, 93, 0,119,
+104,105,116,101, 91, 51, 93, 0, 98,119,109,117,108, 91, 51, 93, 0,115, 97,109,112,108,101, 91, 51, 93, 0,120, 95,114,101,115,
+111,108,117,116,105,111,110, 0,100, 97,116, 97, 95,114, 91, 50, 53, 54, 93, 0,100, 97,116, 97, 95,103, 91, 50, 53, 54, 93, 0,
+100, 97,116, 97, 95, 98, 91, 50, 53, 54, 93, 0,100, 97,116, 97, 95,108,117,109, 97, 91, 50, 53, 54, 93, 0,115, 97,109,112,108,
+101, 95,102,117,108,108, 0,115, 97,109,112,108,101, 95,108,105,110,101,115, 0, 97, 99, 99,117,114, 97, 99,121, 0,119, 97,118,
+101,102,114,109, 95,109,111,100,101, 0,119, 97,118,101,102,114,109, 95, 97,108,112,104, 97, 0,119, 97,118,101,102,114,109, 95,
+121,102, 97, 99, 0,119, 97,118,101,102,114,109, 95,104,101,105,103,104,116, 0,118,101, 99,115, 99,111,112,101, 95, 97,108,112,
+104, 97, 0,118,101, 99,115, 99,111,112,101, 95,104,101,105,103,104,116, 0,109,105,110,109, 97,120, 91, 51, 93, 91, 50, 93, 0,
+104,105,115,116, 0, 42,119, 97,118,101,102,111,114,109, 95, 49, 0, 42,119, 97,118,101,102,111,114,109, 95, 50, 0, 42,119, 97,
+118,101,102,111,114,109, 95, 51, 0, 42,118,101, 99,115, 99,111,112,101, 0,119, 97,118,101,102,111,114,109, 95,116,111,116, 0,
+111,102,102,115,101,116, 91, 50, 93, 0, 99,108,111,110,101, 0,109,116,101,120, 0, 42,105, 99,111,110, 95,105,109, 98,117,102,
+ 0,105, 99,111,110, 95,102,105,108,101,112, 97,116,104, 91, 49, 48, 50, 52, 93, 0,110,111,114,109, 97,108, 95,119,101,105,103,
+104,116, 0,111, 98, 95,109,111,100,101, 0,106,105,116,116,101,114, 0,115,109,111,111,116,104, 95,115,116,114,111,107,101, 95,
+114, 97,100,105,117,115, 0,115,109,111,111,116,104, 95,115,116,114,111,107,101, 95,102, 97, 99,116,111,114, 0,114, 97,116,101,
+ 0,114,103, 98, 91, 51, 93, 0,115, 99,117,108,112,116, 95,112,108, 97,110,101, 0,112,108, 97,110,101, 95,111,102,102,115,101,
+116, 0,115, 99,117,108,112,116, 95,116,111,111,108, 0,118,101,114,116,101,120,112, 97,105,110,116, 95,116,111,111,108, 0,105,
+109, 97,103,101,112, 97,105,110,116, 95,116,111,111,108, 0, 97,117,116,111,115,109,111,111,116,104, 95,102, 97, 99,116,111,114,
+ 0, 99,114,101, 97,115,101, 95,112,105,110, 99,104, 95,102, 97, 99,116,111,114, 0,112,108, 97,110,101, 95,116,114,105,109, 0,
+116,101,120,116,117,114,101, 95,115, 97,109,112,108,101, 95, 98,105, 97,115, 0,116,101,120,116,117,114,101, 95,111,118,101,114,
+108, 97,121, 95, 97,108,112,104, 97, 0, 97,100,100, 95, 99,111,108, 91, 51, 93, 0,115,117, 98, 95, 99,111,108, 91, 51, 93, 0,
+ 97, 99,116,105,118,101, 95,114,110,100, 0, 97, 99,116,105,118,101, 95, 99,108,111,110,101, 0, 97, 99,116,105,118,101, 95,109,
+ 97,115,107, 0, 42,108, 97,121,101,114,115, 0,116,121,112,101,109, 97,112, 91, 51, 52, 93, 0,116,111,116,108, 97,121,101,114,
+ 0,109, 97,120,108, 97,121,101,114, 0,116,111,116,115,105,122,101, 0, 42,112,111,111,108, 0, 42,101,120,116,101,114,110, 97,
+108, 0,114,111,116, 91, 52, 93, 0, 97,118,101, 91, 51, 93, 0, 42,103,114,111,117,110,100, 0,119, 97,110,100,101,114, 91, 51,
+ 93, 0,114,101,115,116, 95,108,101,110,103,116,104, 0,112, 97,114,116,105, 99,108,101, 95,105,110,100,101,120, 91, 50, 93, 0,
+100,101,108,101,116,101, 95,102,108, 97,103, 0,110,117,109, 0,112, 97,114,101,110,116, 0,112, 97, 91, 52, 93, 0,119, 91, 52,
+ 93, 0,102,117,118, 91, 52, 93, 0,102,111,102,102,115,101,116, 0,112,114,101,118, 95,115,116, 97,116,101, 0, 42,104, 97,105,
+114, 0, 42, 98,111,105,100, 0,100,105,101,116,105,109,101, 0,110,117,109, 95,100,109, 99, 97, 99,104,101, 0,104, 97,105,114,
+ 95,105,110,100,101,120, 0, 97,108,105,118,101, 0,115,112,114,105,110,103, 95,107, 0,112,108, 97,115,116,105, 99,105,116,121,
+ 95, 99,111,110,115,116, 97,110,116, 0,121,105,101,108,100, 95,114, 97,116,105,111, 0,112,108, 97,115,116,105, 99,105,116,121,
+ 95, 98, 97,108, 97,110, 99,101, 0,121,105,101,108,100, 95, 98, 97,108, 97,110, 99,101, 0,118,105,115, 99,111,115,105,116,121,
+ 95,111,109,101,103, 97, 0,118,105,115, 99,111,115,105,116,121, 95, 98,101,116, 97, 0,115,116,105,102,102,110,101,115,115, 95,
+107, 0,115,116,105,102,102,110,101,115,115, 95,107,110,101, 97,114, 0,114,101,115,116, 95,100,101,110,115,105,116,121, 0, 98,
+117,111,121, 97,110, 99,121, 0,115,112,114,105,110,103, 95,102,114, 97,109,101,115, 0, 42, 98,111,105,100,115, 0, 42,102,108,
+117,105,100, 0,100,105,115,116,114, 0,112,104,121,115,116,121,112,101, 0, 97,118,101,109,111,100,101, 0,114,101, 97, 99,116,
+101,118,101,110,116, 0,100,114, 97,119, 0,100,114, 97,119, 95, 97,115, 0,100,114, 97,119, 95,115,105,122,101, 0, 99,104,105,
+108,100,116,121,112,101, 0,114,101,110, 95, 97,115, 0,115,117, 98,102,114, 97,109,101,115, 0,100,114, 97,119, 95, 99,111,108,
+ 0,114,101,110, 95,115,116,101,112, 0,104, 97,105,114, 95,115,116,101,112, 0,107,101,121,115, 95,115,116,101,112, 0, 97,100,
+ 97,112,116, 95, 97,110,103,108,101, 0, 97,100, 97,112,116, 95,112,105,120, 0,114,111,116,102,114,111,109, 0,105,110,116,101,
+103,114, 97,116,111,114, 0, 98, 98, 95, 97,108,105,103,110, 0, 98, 98, 95,117,118, 95,115,112,108,105,116, 0, 98, 98, 95, 97,
+110,105,109, 0, 98, 98, 95,115,112,108,105,116, 95,111,102,102,115,101,116, 0, 98, 98, 95,116,105,108,116, 0, 98, 98, 95,114,
+ 97,110,100, 95,116,105,108,116, 0, 98, 98, 95,111,102,102,115,101,116, 91, 50, 93, 0, 98, 98, 95,115,105,122,101, 91, 50, 93,
+ 0, 98, 98, 95,118,101,108, 95,104,101, 97,100, 0, 98, 98, 95,118,101,108, 95,116, 97,105,108, 0, 99,111,108,111,114, 95,118,
+101, 99, 95,109, 97,120, 0,115,105,109,112,108,105,102,121, 95,114,101,102,115,105,122,101, 0,115,105,109,112,108,105,102,121,
+ 95,114, 97,116,101, 0,115,105,109,112,108,105,102,121, 95,116,114, 97,110,115,105,116,105,111,110, 0,115,105,109,112,108,105,
+102,121, 95,118,105,101,119,112,111,114,116, 0,116,105,109,101,116,119,101, 97,107, 0, 99,111,117,114, 97,110,116, 95,116, 97,
+114,103,101,116, 0,106,105,116,102, 97, 99, 0,101,102,102, 95,104, 97,105,114, 0,103,114,105,100, 95,114, 97,110,100, 0,112,
+115, 95,111,102,102,115,101,116, 91, 49, 93, 0,103,114,105,100, 95,114,101,115, 0,101,102,102,101, 99,116,111,114, 95, 97,109,
+111,117,110,116, 0,116,105,109,101, 95,102,108, 97,103, 0,116,105,109,101, 95,112, 97,100, 91, 51, 93, 0,112, 97,114,116,102,
+ 97, 99, 0,116, 97,110,102, 97, 99, 0,116, 97,110,112,104, 97,115,101, 0,114,101, 97, 99,116,102, 97, 99, 0,111, 98, 95,118,
+101,108, 91, 51, 93, 0, 97,118,101,102, 97, 99, 0,112,104, 97,115,101,102, 97, 99, 0,114, 97,110,100,114,111,116,102, 97, 99,
+ 0,114, 97,110,100,112,104, 97,115,101,102, 97, 99, 0,114, 97,110,100,115,105,122,101, 0, 97, 99, 99, 91, 51, 93, 0,100,114,
+ 97,103,102, 97, 99, 0, 98,114,111,119,110,102, 97, 99, 0,114, 97,110,100,108,101,110,103,116,104, 0, 99,104,105,108,100, 95,
+110, 98,114, 0,114,101,110, 95, 99,104,105,108,100, 95,110, 98,114, 0,112, 97,114,101,110,116,115, 0, 99,104,105,108,100,115,
+105,122,101, 0, 99,104,105,108,100,114, 97,110,100,115,105,122,101, 0, 99,104,105,108,100,114, 97,100, 0, 99,104,105,108,100,
+102,108, 97,116, 0, 99,108,117,109,112,112,111,119, 0,107,105,110,107, 95,102,108, 97,116, 0,107,105,110,107, 95, 97,109,112,
+ 95, 99,108,117,109,112, 0,114,111,117,103,104, 49, 0,114,111,117,103,104, 49, 95,115,105,122,101, 0,114,111,117,103,104, 50,
+ 0,114,111,117,103,104, 50, 95,115,105,122,101, 0,114,111,117,103,104, 50, 95,116,104,114,101,115, 0,114,111,117,103,104, 95,
+101,110,100, 0,114,111,117,103,104, 95,101,110,100, 95,115,104, 97,112,101, 0, 99,108,101,110,103,116,104, 0, 99,108,101,110,
+103,116,104, 95,116,104,114,101,115, 0,112, 97,114,116,105,110,103, 95,102, 97, 99, 0,112, 97,114,116,105,110,103, 95,109,105,
+110, 0,112, 97,114,116,105,110,103, 95,109, 97,120, 0, 98,114, 97,110, 99,104, 95,116,104,114,101,115, 0,100,114, 97,119, 95,
+108,105,110,101, 91, 50, 93, 0,112, 97,116,104, 95,115,116, 97,114,116, 0,112, 97,116,104, 95,101,110,100, 0,116,114, 97,105,
+108, 95, 99,111,117,110,116, 0,107,101,121,101,100, 95,108,111,111,112,115, 0,100,117,112,108,105,119,101,105,103,104,116,115,
+ 0, 42,101,102,102, 95,103,114,111,117,112, 0, 42,100,117,112, 95,111, 98, 0, 42, 98, 98, 95,111, 98, 0, 42,112,100, 50, 0,
+ 42,112, 97,114,116, 0, 42,112, 97,114,116,105, 99,108,101,115, 0, 42, 42,112, 97,116,104, 99, 97, 99,104,101, 0, 42, 42, 99,
+104,105,108,100, 99, 97, 99,104,101, 0,112, 97,116,104, 99, 97, 99,104,101, 98,117,102,115, 0, 99,104,105,108,100, 99, 97, 99,
+104,101, 98,117,102,115, 0, 42, 99,108,109,100, 0, 42,104, 97,105,114, 95,105,110, 95,100,109, 0, 42,104, 97,105,114, 95,111,
+117,116, 95,100,109, 0, 42,116, 97,114,103,101,116, 95,111, 98, 0, 42,108, 97,116,116,105, 99,101, 0,116,114,101,101, 95,102,
+114, 97,109,101, 0, 98,118,104,116,114,101,101, 95,102,114, 97,109,101, 0, 99,104,105,108,100, 95,115,101,101,100, 0,116,111,
+116,117,110,101,120,105,115,116, 0,116,111,116, 99,104,105,108,100, 0,116,111,116, 99, 97, 99,104,101,100, 0,116,111,116, 99,
+104,105,108,100, 99, 97, 99,104,101, 0,116, 97,114,103,101,116, 95,112,115,121,115, 0,116,111,116,107,101,121,101,100, 0, 98,
+ 97,107,101,115,112, 97, 99,101, 0, 98, 98, 95,117,118,110, 97,109,101, 91, 51, 93, 91, 54, 52, 93, 0,118,103,114,111,117,112,
+ 91, 49, 50, 93, 0,118,103, 95,110,101,103, 0,114,116, 51, 0, 42,114,101,110,100,101,114,100, 97,116, 97, 0, 42,101,102,102,
+101, 99,116,111,114,115, 0, 42,102,108,117,105,100, 95,115,112,114,105,110,103,115, 0,116,111,116, 95,102,108,117,105,100,115,
+112,114,105,110,103,115, 0, 97,108,108,111, 99, 95,102,108,117,105,100,115,112,114,105,110,103,115, 0, 42,116,114,101,101, 0,
+ 42,112,100,100, 0, 42,102,114, 97,110,100, 0,100,116, 95,102,114, 97, 99, 0, 95,112, 97,100, 0, 67,100,105,115, 0, 67,118,
+105, 0,115,116,114,117, 99,116,117,114, 97,108, 0, 98,101,110,100,105,110,103, 0,109, 97,120, 95, 98,101,110,100, 0,109, 97,
+120, 95,115,116,114,117, 99,116, 0,109, 97,120, 95,115,104,101, 97,114, 0, 97,118,103, 95,115,112,114,105,110,103, 95,108,101,
+110, 0,116,105,109,101,115, 99, 97,108,101, 0,101,102,102, 95,102,111,114, 99,101, 95,115, 99, 97,108,101, 0,101,102,102, 95,
+119,105,110,100, 95,115, 99, 97,108,101, 0,115,105,109, 95,116,105,109,101, 95,111,108,100, 0,118,101,108,111, 99,105,116,121,
+ 95,115,109,111,111,116,104, 0, 99,111,108,108,105,100,101,114, 95,102,114,105, 99,116,105,111,110, 0,118,101,108, 95,100, 97,
+109,112,105,110,103, 0,115,116,101,112,115, 80,101,114, 70,114, 97,109,101, 0,112,114,101,114,111,108,108, 0,109, 97,120,115,
+112,114,105,110,103,108,101,110, 0,115,111,108,118,101,114, 95,116,121,112,101, 0,118,103,114,111,117,112, 95, 98,101,110,100,
+ 0,118,103,114,111,117,112, 95,109, 97,115,115, 0,118,103,114,111,117,112, 95,115,116,114,117, 99,116, 0,115,104, 97,112,101,
+107,101,121, 95,114,101,115,116, 0,112,114,101,115,101,116,115, 0,114,101,115,101,116, 0, 42, 99,111,108,108,105,115,105,111,
+110, 95,108,105,115,116, 0,101,112,115,105,108,111,110, 0,115,101,108,102, 95,102,114,105, 99,116,105,111,110, 0,115,101,108,
+102,101,112,115,105,108,111,110, 0,114,101,112,101,108, 95,102,111,114, 99,101, 0,100,105,115,116, 97,110, 99,101, 95,114,101,
+112,101,108, 0,115,101,108,102, 95,108,111,111,112, 95, 99,111,117,110,116, 0,108,111,111,112, 95, 99,111,117,110,116, 0,112,
+114,101,115,115,117,114,101, 0,116,104,105, 99,107,110,101,115,115, 0,115,116,114,111,107,101,115, 0,102,114, 97,109,101,110,
+117,109, 0, 42, 97, 99,116,102,114, 97,109,101, 0,103,115,116,101,112, 0,105,110,102,111, 91, 49, 50, 56, 93, 0,115, 98,117,
+102,102,101,114, 95,115,105,122,101, 0,115, 98,117,102,102,101,114, 95,115,102,108, 97,103, 0, 42,115, 98,117,102,102,101,114,
+ 0,108,105,115,116, 0,112,114,105,110,116,108,101,118,101,108, 0,115,116,111,114,101,108,101,118,101,108, 0, 42,114,101,112,
+111,114,116,116,105,109,101,114, 0, 42,119,105,110,100,114, 97,119, 97, 98,108,101, 0, 42,119,105,110, 97, 99,116,105,118,101,
+ 0,119,105,110,100,111,119,115, 0,105,110,105,116,105, 97,108,105,122,101,100, 0,102,105,108,101, 95,115, 97,118,101,100, 0,
+111,112, 95,117,110,100,111, 95,100,101,112,116,104, 0,111,112,101,114, 97,116,111,114,115, 0,113,117,101,117,101, 0,114,101,
+112,111,114,116,115, 0,106,111, 98,115, 0,112, 97,105,110,116, 99,117,114,115,111,114,115, 0,100,114, 97,103,115, 0,107,101,
+121, 99,111,110,102,105,103,115, 0, 42,100,101,102, 97,117,108,116, 99,111,110,102, 0, 42, 97,100,100,111,110, 99,111,110,102,
+ 0, 42,117,115,101,114, 99,111,110,102, 0,116,105,109,101,114,115, 0, 42, 97,117,116,111,115, 97,118,101,116,105,109,101,114,
+ 0, 42,103,104,111,115,116,119,105,110, 0,103,114, 97, 98, 99,117,114,115,111,114, 0, 42,115, 99,114,101,101,110, 0, 42,110,
+101,119,115, 99,114,101,101,110, 0,115, 99,114,101,101,110,110, 97,109,101, 91, 54, 52, 93, 0,112,111,115,120, 0,112,111,115,
+121, 0,119,105,110,100,111,119,115,116, 97,116,101, 0,109,111,110,105,116,111,114, 0,108, 97,115,116, 99,117,114,115,111,114,
+ 0,109,111,100, 97,108, 99,117,114,115,111,114, 0, 97,100,100,109,111,117,115,101,109,111,118,101, 0, 42,101,118,101,110,116,
+115,116, 97,116,101, 0, 42, 99,117,114,115,119,105,110, 0, 42,116,119,101, 97,107, 0,100,114, 97,119,109,101,116,104,111,100,
+ 0,100,114, 97,119,102, 97,105,108, 0, 42,100,114, 97,119,100, 97,116, 97, 0,109,111,100, 97,108,104, 97,110,100,108,101,114,
+115, 0,115,117, 98,119,105,110,100,111,119,115, 0,103,101,115,116,117,114,101, 0,105,100,110, 97,109,101, 91, 54, 52, 93, 0,
+112,114,111,112,118, 97,108,117,101, 95,115,116,114, 91, 54, 52, 93, 0,112,114,111,112,118, 97,108,117,101, 0,115,104,105,102,
+116, 0, 99,116,114,108, 0, 97,108,116, 0,111,115,107,101,121, 0,107,101,121,109,111,100,105,102,105,101,114, 0,109, 97,112,
+116,121,112,101, 0, 42,112,116,114, 0, 42,114,101,109,111,118,101, 95,105,116,101,109, 0, 42, 97,100,100, 95,105,116,101,109,
+ 0,105,116,101,109,115, 0,100,105,102,102, 95,105,116,101,109,115, 0,115,112, 97, 99,101,105,100, 0,114,101,103,105,111,110,
+105,100, 0,107,109,105, 95,105,100, 0, 40, 42,112,111,108,108, 41, 40, 41, 0, 42,109,111,100, 97,108, 95,105,116,101,109,115,
+ 0, 98, 97,115,101,110, 97,109,101, 91, 54, 52, 93, 0, 97, 99,116,107,101,121,109, 97,112, 0, 42, 99,117,115,116,111,109,100,
+ 97,116, 97, 0, 42,112,121, 95,105,110,115,116, 97,110, 99,101, 0, 42,114,101,112,111,114,116,115, 0,109, 97, 99,114,111, 0,
+ 42,111,112,109, 0, 42,101,100, 97,116, 97, 0, 42, 99,111,101,102,102,105, 99,105,101,110,116,115, 0, 97,114,114, 97,121,115,
+105,122,101, 0,112,111,108,121, 95,111,114,100,101,114, 0, 97,109,112,108,105,116,117,100,101, 0,112,104, 97,115,101, 95,109,
+117,108,116,105,112,108,105,101,114, 0,112,104, 97,115,101, 95,111,102,102,115,101,116, 0,118, 97,108,117,101, 95,111,102,102,
+115,101,116, 0,109,105,100,118, 97,108, 0, 98,101,102,111,114,101, 95,109,111,100,101, 0, 97,102,116,101,114, 95,109,111,100,
+101, 0, 98,101,102,111,114,101, 95, 99,121, 99,108,101,115, 0, 97,102,116,101,114, 95, 99,121, 99,108,101,115, 0,114,101, 99,
+116, 0,112,104, 97,115,101, 0,109,111,100,105,102,105, 99, 97,116,105,111,110, 0,115,116,101,112, 95,115,105,122,101, 0, 42,
+114,110, 97, 95,112, 97,116,104, 0,112, 99,104, 97,110, 95,110, 97,109,101, 91, 51, 50, 93, 0,116,114, 97,110,115, 67,104, 97,
+110, 0,105,100,116,121,112,101, 0,116, 97,114,103,101,116,115, 91, 56, 93, 0,110,117,109, 95,116, 97,114,103,101,116,115, 0,
+118, 97,114,105, 97, 98,108,101,115, 0,101,120,112,114,101,115,115,105,111,110, 91, 50, 53, 54, 93, 0, 42,101,120,112,114, 95,
+ 99,111,109,112, 0,118,101, 99, 91, 50, 93, 0, 42,102,112,116, 0, 97,114,114, 97,121, 95,105,110,100,101,120, 0, 99,111,108,
+111,114, 95,109,111,100,101, 0, 99,111,108,111,114, 91, 51, 93, 0,102,114,111,109, 91, 49, 50, 56, 93, 0,116,111, 91, 49, 50,
+ 56, 93, 0,109, 97,112,112,105,110,103,115, 0,115,116,114,105,112,115, 0, 42,114,101,109, 97,112, 0,102, 99,117,114,118,101,
+115, 0,115,116,114,105,112, 95,116,105,109,101, 0, 98,108,101,110,100,109,111,100,101, 0,101,120,116,101,110,100,109,111,100,
+101, 0, 42,115,112,101, 97,107,101,114, 95,104, 97,110,100,108,101, 0,103,114,111,117,112, 91, 54, 52, 93, 0,103,114,111,117,
+112,109,111,100,101, 0,107,101,121,105,110,103,102,108, 97,103, 0,112, 97,116,104,115, 0,100,101,115, 99,114,105,112,116,105,
+111,110, 91, 50, 52, 48, 93, 0,116,121,112,101,105,110,102,111, 91, 54, 52, 93, 0, 97, 99,116,105,118,101, 95,112, 97,116,104,
+ 0, 42,116,109,112, 97, 99,116, 0,110,108, 97, 95,116,114, 97, 99,107,115, 0, 42, 97, 99,116,115,116,114,105,112, 0,100,114,
+105,118,101,114,115, 0,111,118,101,114,114,105,100,101,115, 0, 97, 99,116, 95, 98,108,101,110,100,109,111,100,101, 0, 97, 99,
+116, 95,101,120,116,101,110,100,109,111,100,101, 0, 97, 99,116, 95,105,110,102,108,117,101,110, 99,101, 0,114,117,108,101, 0,
+111,112,116,105,111,110,115, 0,102,101, 97,114, 95,102, 97, 99,116,111,114, 0,115,105,103,110, 97,108, 95,105,100, 0,108,111,
+111,107, 95, 97,104,101, 97,100, 0,111,108,111, 99, 91, 51, 93, 0,113,117,101,117,101, 95,115,105,122,101, 0,119, 97,110,100,
+101,114, 0,102,108,101,101, 95,100,105,115,116, 97,110, 99,101, 0,104,101, 97,108,116,104, 0,115,116, 97,116,101, 95,105,100,
+ 0,114,117,108,101,115, 0, 99,111,110,100,105,116,105,111,110,115, 0, 97, 99,116,105,111,110,115, 0,114,117,108,101,115,101,
+116, 95,116,121,112,101, 0,114,117,108,101, 95,102,117,122,122,105,110,101,115,115, 0,108, 97,115,116, 95,115,116, 97,116,101,
+ 95,105,100, 0,108, 97,110,100,105,110,103, 95,115,109,111,111,116,104,110,101,115,115, 0, 98, 97,110,107,105,110,103, 0, 97,
+103,103,114,101,115,115,105,111,110, 0, 97,105,114, 95,109,105,110, 95,115,112,101,101,100, 0, 97,105,114, 95,109, 97,120, 95,
+115,112,101,101,100, 0, 97,105,114, 95,109, 97,120, 95, 97, 99, 99, 0, 97,105,114, 95,109, 97,120, 95, 97,118,101, 0, 97,105,
+114, 95,112,101,114,115,111,110, 97,108, 95,115,112, 97, 99,101, 0,108, 97,110,100, 95,106,117,109,112, 95,115,112,101,101,100,
+ 0,108, 97,110,100, 95,109, 97,120, 95,115,112,101,101,100, 0,108, 97,110,100, 95,109, 97,120, 95, 97, 99, 99, 0,108, 97,110,
+100, 95,109, 97,120, 95, 97,118,101, 0,108, 97,110,100, 95,112,101,114,115,111,110, 97,108, 95,115,112, 97, 99,101, 0,108, 97,
+110,100, 95,115,116,105, 99,107, 95,102,111,114, 99,101, 0,115,116, 97,116,101,115, 0, 42,115,109,100, 0, 42,102,108,117,105,
+100, 95,103,114,111,117,112, 0, 42, 99,111,108,108, 95,103,114,111,117,112, 0, 42,119,116, 0, 42,116,101,120, 95,119,116, 0,
+ 42,116,101,120, 95,115,104, 97,100,111,119, 0, 42,115,104, 97,100,111,119, 0,112, 48, 91, 51, 93, 0,112, 49, 91, 51, 93, 0,
+100,120, 0,111,109,101,103, 97, 0,116,101,109,112, 65,109, 98, 0, 98,101,116, 97, 0,114,101,115, 91, 51, 93, 0, 97,109,112,
+108,105,102,121, 0,109, 97,120,114,101,115, 0,118,105,101,119,115,101,116,116,105,110,103,115, 0,110,111,105,115,101, 0,100,
+105,115,115, 95,112,101,114, 99,101,110,116, 0,100,105,115,115, 95,115,112,101,101,100, 0,114,101,115, 95,119,116, 91, 51, 93,
+ 0,100,120, 95,119,116, 0,118, 51,100,110,117,109, 0, 99, 97, 99,104,101, 95, 99,111,109,112, 0, 99, 97, 99,104,101, 95,104,
+105,103,104, 95, 99,111,109,112, 0, 42,112,111,105,110,116, 95, 99, 97, 99,104,101, 91, 50, 93, 0,112,116, 99, 97, 99,104,101,
+115, 91, 50, 93, 0, 98,111,114,100,101,114, 95, 99,111,108,108,105,115,105,111,110,115, 0,116,105,109,101, 95,115, 99, 97,108,
+101, 0,118,111,114,116,105, 99,105,116,121, 0,118,101,108,111, 99,105,116,121, 91, 50, 93, 0,118,101,108, 95,109,117,108,116,
+105, 0,118,103,114,112, 95,104,101, 97,116, 95,115, 99, 97,108,101, 91, 50, 93, 0,118,103,114,111,117,112, 95,102,108,111,119,
+ 0,118,103,114,111,117,112, 95,100,101,110,115,105,116,121, 0,118,103,114,111,117,112, 95,104,101, 97,116, 0, 42,112,111,105,
+110,116,115, 95,111,108,100, 0, 42,118,101,108, 0, 42,116,114,105,100,105,118,115, 0,109, 97,116, 95,111,108,100, 91, 52, 93,
+ 91, 52, 93, 0,110,117,109,116,114,105,115, 0,118,111,108,117,109,101, 95,109, 97,120, 0,118,111,108,117,109,101, 95,109,105,
+110, 0,100,105,115,116, 97,110, 99,101, 95,109, 97,120, 0,100,105,115,116, 97,110, 99,101, 95,114,101,102,101,114,101,110, 99,
+101, 0, 99,111,110,101, 95, 97,110,103,108,101, 95,111,117,116,101,114, 0, 99,111,110,101, 95, 97,110,103,108,101, 95,105,110,
+110,101,114, 0, 99,111,110,101, 95,118,111,108,117,109,101, 95,111,117,116,101,114, 0,114,101,110,100,101,114, 95,102,108, 97,
+103, 0, 98,117,105,108,100, 95,115,105,122,101, 95,102,108, 97,103, 0, 98,117,105,108,100, 95,116, 99, 95,102,108, 97,103, 0,
+108, 97,115,116,115,105,122,101, 91, 50, 93, 0,116,114, 97, 99,107,105,110,103, 0, 42,116,114, 97, 99,107,105,110,103, 95, 99,
+111,110,116,101,120,116, 0,112,114,111,120,121, 0,116,114, 97, 99,107, 95,112,114,101,118,105,101,119, 95,104,101,105,103,104,
+116, 0, 42,116,114, 97, 99,107, 95,112,114,101,118,105,101,119, 0,116,114, 97, 99,107, 95,112,111,115, 91, 50, 93, 0,116,114,
+ 97, 99,107, 95,100,105,115, 97, 98,108,101,100, 0, 42,109, 97,114,107,101,114, 0,115,108,105,100,101, 95,115, 99, 97,108,101,
+ 91, 50, 93, 0,101,114,114,111,114, 0, 42,105,110,116,114,105,110,115,105, 99,115, 0,115,101,110,115,111,114, 95,119,105,100,
+116,104, 0,112,105,120,101,108, 95, 97,115,112,101, 99,116, 0,102,111, 99, 97,108, 0,117,110,105,116,115, 0,112,114,105,110,
+ 99,105,112, 97,108, 91, 50, 93, 0,107, 49, 0,107, 50, 0,107, 51, 0,112,111,115, 91, 50, 93, 0,112, 97,116, 95,109,105,110,
+ 91, 50, 93, 0,112, 97,116, 95,109, 97,120, 91, 50, 93, 0,115,101, 97,114, 99,104, 95,109,105,110, 91, 50, 93, 0,115,101, 97,
+114, 99,104, 95,109, 97,120, 91, 50, 93, 0,109, 97,114,107,101,114,115,110,114, 0,108, 97,115,116, 95,109, 97,114,107,101,114,
+ 0, 42,109, 97,114,107,101,114,115, 0, 98,117,110,100,108,101, 95,112,111,115, 91, 51, 93, 0,112, 97,116, 95,102,108, 97,103,
+ 0,115,101, 97,114, 99,104, 95,102,108, 97,103, 0,102,114, 97,109,101,115, 95,108,105,109,105,116, 0,112, 97,116,116,101,114,
+110, 95,109, 97,116, 99,104, 0,116,114, 97, 99,107,101,114, 0,112,121,114, 97,109,105,100, 95,108,101,118,101,108,115, 0,109,
+105,110,105,109,117,109, 95, 99,111,114,114,101,108, 97,116,105,111,110, 0,100,101,102, 97,117,108,116, 95,116,114, 97, 99,107,
+101,114, 0,100,101,102, 97,117,108,116, 95,112,121,114, 97,109,105,100, 95,108,101,118,101,108,115, 0,100,101,102, 97,117,108,
+116, 95,109,105,110,105,109,117,109, 95, 99,111,114,114,101,108, 97,116,105,111,110, 0,100,101,102, 97,117,108,116, 95,112, 97,
+116,116,101,114,110, 95,115,105,122,101, 0,100,101,102, 97,117,108,116, 95,115,101, 97,114, 99,104, 95,115,105,122,101, 0,100,
+101,102, 97,117,108,116, 95,102,114, 97,109,101,115, 95,108,105,109,105,116, 0,100,101,102, 97,117,108,116, 95,109, 97,114,103,
+105,110, 0,100,101,102, 97,117,108,116, 95,112, 97,116,116,101,114,110, 95,109, 97,116, 99,104, 0,100,101,102, 97,117,108,116,
+ 95,102,108, 97,103, 0,109,111,116,105,111,110, 95,102,108, 97,103, 0,107,101,121,102,114, 97,109,101, 49, 0,107,101,121,102,
+114, 97,109,101, 50, 0,114,101,102,105,110,101, 95, 99, 97,109,101,114, 97, 95,105,110,116,114,105,110,115,105, 99,115, 0, 99,
+108,101, 97,110, 95,102,114, 97,109,101,115, 0, 99,108,101, 97,110, 95, 97, 99,116,105,111,110, 0, 99,108,101, 97,110, 95,101,
+114,114,111,114, 0,111, 98,106,101, 99,116, 95,100,105,115,116, 97,110, 99,101, 0,116,111,116, 95,116,114, 97, 99,107, 0, 97,
+ 99,116, 95,116,114, 97, 99,107, 0,109, 97,120,115, 99, 97,108,101, 0, 42,114,111,116, 95,116,114, 97, 99,107, 0,108,111, 99,
+105,110,102, 0,115, 99, 97,108,101,105,110,102, 0,114,111,116,105,110,102, 0, 42,115, 99, 97,108,101,105, 98,117,102, 0,108,
+ 97,115,116, 95, 99, 97,109,101,114, 97, 0, 99, 97,109,110,114, 0, 42, 99, 97,109,101,114, 97,115, 0,116,114, 97, 99,107,115,
+ 0,114,101, 99,111,110,115,116,114,117, 99,116,105,111,110, 0,109,101,115,115, 97,103,101, 91, 50, 53, 54, 93, 0,116,111,116,
+ 95, 99,104, 97,110,110,101,108, 0,115,101,116,116,105,110,103,115, 0, 99, 97,109,101,114, 97, 0,115,116, 97, 98,105,108,105,
+122, 97,116,105,111,110, 0, 42, 97, 99,116, 95,116,114, 97, 99,107, 0,111, 98,106,101, 99,116,115, 0,111, 98,106,101, 99,116,
+110,114, 0,116,111,116, 95,111, 98,106,101, 99,116, 0,100,111,112,101,115,104,101,101,116, 0, 42, 98,114,117,115,104, 95,103,
+114,111,117,112, 0, 99,117,114,114,101,110,116, 95,102,114, 97,109,101, 0,100,105,115,112, 95,116,121,112,101, 0,105,109, 97,
+103,101, 95,102,105,108,101,102,111,114,109, 97,116, 0,101,102,102,101, 99,116, 95,117,105, 0,112,114,101,118,105,101,119, 95,
+105,100, 0,105,110,105,116, 95, 99,111,108,111,114, 95,116,121,112,101, 0,112, 97,100, 95,115, 0,105,109, 97,103,101, 95,114,
+101,115,111,108,117,116,105,111,110, 0,115,117, 98,115,116,101,112,115, 0,105,110,105,116, 95, 99,111,108,111,114, 91, 52, 93,
+ 0, 42,105,110,105,116, 95,116,101,120,116,117,114,101, 0,105,110,105,116, 95,108, 97,121,101,114,110, 97,109,101, 91, 54, 52,
+ 93, 0,100,114,121, 95,115,112,101,101,100, 0, 99,111,108,111,114, 95,100,114,121, 95,116,104,114,101,115,104,111,108,100, 0,
+100,101,112,116,104, 95, 99,108, 97,109,112, 0,100,105,115,112, 95,102, 97, 99,116,111,114, 0,115,112,114,101, 97,100, 95,115,
+112,101,101,100, 0, 99,111,108,111,114, 95,115,112,114,101, 97,100, 95,115,112,101,101,100, 0,115,104,114,105,110,107, 95,115,
+112,101,101,100, 0,100,114,105,112, 95,118,101,108, 0,100,114,105,112, 95, 97, 99, 99, 0,105,110,102,108,117,101,110, 99,101,
+ 95,115, 99, 97,108,101, 0,114, 97,100,105,117,115, 95,115, 99, 97,108,101, 0,119, 97,118,101, 95,100, 97,109,112,105,110,103,
+ 0,119, 97,118,101, 95,115,112,101,101,100, 0,119, 97,118,101, 95,116,105,109,101,115, 99, 97,108,101, 0,119, 97,118,101, 95,
+115,112,114,105,110,103, 0,105,109, 97,103,101, 95,111,117,116,112,117,116, 95,112, 97,116,104, 91, 49, 48, 50, 52, 93, 0,111,
+117,116,112,117,116, 95,110, 97,109,101, 91, 54, 52, 93, 0,111,117,116,112,117,116, 95,110, 97,109,101, 50, 91, 54, 52, 93, 0,
+ 42,112,109,100, 0,115,117,114,102, 97, 99,101,115, 0, 97, 99,116,105,118,101, 95,115,117,114, 0,101,114,114,111,114, 91, 54,
+ 52, 93, 0, 99,111,108,108,105,115,105,111,110, 0,119,101,116,110,101,115,115, 0,112, 97,114,116,105, 99,108,101, 95,114, 97,
+100,105,117,115, 0,112, 97,114,116,105, 99,108,101, 95,115,109,111,111,116,104, 0,112, 97,105,110,116, 95,100,105,115,116, 97,
+110, 99,101, 0, 42,112, 97,105,110,116, 95,114, 97,109,112, 0, 42,118,101,108, 95,114, 97,109,112, 0,112,114,111,120,105,109,
+105,116,121, 95,102, 97,108,108,111,102,102, 0,114, 97,121, 95,100,105,114, 0,119, 97,118,101, 95,102, 97, 99,116,111,114, 0,
+119, 97,118,101, 95, 99,108, 97,109,112, 0,109, 97,120, 95,118,101,108,111, 99,105,116,121, 0,115,109,117,100,103,101, 95,115,
+116,114,101,110,103,116,104, 0, 84, 89, 80, 69, 18, 2, 0, 0, 99,104, 97,114, 0,117, 99,104, 97,114, 0,115,104,111,114,116,
+ 0,117,115,104,111,114,116, 0,105,110,116, 0,108,111,110,103, 0,117,108,111,110,103, 0,102,108,111, 97,116, 0,100,111,117,
+ 98,108,101, 0,105,110,116, 54, 52, 95,116, 0,117,105,110,116, 54, 52, 95,116, 0,118,111,105,100, 0, 76,105,110,107, 0, 76,
+105,110,107, 68, 97,116, 97, 0, 76,105,115,116, 66, 97,115,101, 0,118,101, 99, 50,115, 0,118,101, 99, 50,102, 0,118,101, 99,
+ 51,102, 0,114, 99,116,105, 0,114, 99,116,102, 0, 73, 68, 80,114,111,112,101,114,116,121, 68, 97,116, 97, 0, 73, 68, 80,114,
+111,112,101,114,116,121, 0, 73, 68, 0, 76,105, 98,114, 97,114,121, 0, 70,105,108,101, 68, 97,116, 97, 0, 80,114,101,118,105,
+101,119, 73,109, 97,103,101, 0, 73,112,111, 68,114,105,118,101,114, 0, 79, 98,106,101, 99,116, 0, 73,112,111, 67,117,114,118,
+101, 0, 66, 80,111,105,110,116, 0, 66,101,122, 84,114,105,112,108,101, 0, 73,112,111, 0, 75,101,121, 66,108,111, 99,107, 0,
+ 75,101,121, 0, 65,110,105,109, 68, 97,116, 97, 0, 84,101,120,116, 76,105,110,101, 0, 84,101,120,116, 77, 97,114,107,101,114,
+ 0, 84,101,120,116, 0, 80, 97, 99,107,101,100, 70,105,108,101, 0, 67, 97,109,101,114, 97, 0, 73,109, 97,103,101, 85,115,101,
+114, 0, 83, 99,101,110,101, 0, 73,109, 97,103,101, 0, 71, 80, 85, 84,101,120,116,117,114,101, 0, 97,110,105,109, 0, 82,101,
+110,100,101,114, 82,101,115,117,108,116, 0, 77, 84,101,120, 0, 84,101,120, 0, 80,108,117,103,105,110, 84,101,120, 0, 67, 66,
+ 68, 97,116, 97, 0, 67,111,108,111,114, 66, 97,110,100, 0, 69,110,118, 77, 97,112, 0, 73,109, 66,117,102, 0, 80,111,105,110,
+116, 68,101,110,115,105,116,121, 0, 67,117,114,118,101, 77, 97,112,112,105,110,103, 0, 86,111,120,101,108, 68, 97,116, 97, 0,
+ 79, 99,101, 97,110, 84,101,120, 0, 98, 78,111,100,101, 84,114,101,101, 0, 84,101,120, 77, 97,112,112,105,110,103, 0, 67,111,
+108,111,114, 77, 97,112,112,105,110,103, 0, 76, 97,109,112, 0, 86,111,108,117,109,101, 83,101,116,116,105,110,103,115, 0, 71,
+ 97,109,101, 83,101,116,116,105,110,103,115, 0, 77, 97,116,101,114,105, 97,108, 0, 71,114,111,117,112, 0, 86, 70,111,110,116,
+ 0, 86, 70,111,110,116, 68, 97,116, 97, 0, 77,101,116, 97, 69,108,101,109, 0, 66,111,117,110,100, 66,111,120, 0, 77,101,116,
+ 97, 66, 97,108,108, 0, 78,117,114, 98, 0, 67,104, 97,114, 73,110,102,111, 0, 84,101,120,116, 66,111,120, 0, 69,100,105,116,
+ 78,117,114, 98, 0, 71, 72, 97,115,104, 0, 67,117,114,118,101, 0, 80, 97,116,104, 0, 83,101,108, 66,111,120, 0, 69,100,105,
+116, 70,111,110,116, 0, 77,101,115,104, 0, 77, 83,101,108,101, 99,116, 0, 77, 80,111,108,121, 0, 77, 84,101,120, 80,111,108,
+121, 0, 77, 76,111,111,112, 0, 77, 76,111,111,112, 85, 86, 0, 77, 76,111,111,112, 67,111,108, 0, 77, 70, 97, 99,101, 0, 77,
+ 84, 70, 97, 99,101, 0, 84, 70, 97, 99,101, 0, 77, 86,101,114,116, 0, 77, 69,100,103,101, 0, 77, 68,101,102,111,114,109, 86,
+101,114,116, 0, 77, 67,111,108, 0, 77, 83,116,105, 99,107,121, 0, 66, 77, 69,100,105,116, 77,101,115,104, 0, 67,117,115,116,
+111,109, 68, 97,116, 97, 0, 77,117,108,116,105,114,101,115, 0, 77, 68,101,102,111,114,109, 87,101,105,103,104,116, 0, 77, 70,
+108,111, 97,116, 80,114,111,112,101,114,116,121, 0, 77, 73,110,116, 80,114,111,112,101,114,116,121, 0, 77, 83,116,114,105,110,
+103, 80,114,111,112,101,114,116,121, 0, 79,114,105,103, 83,112, 97, 99,101, 70, 97, 99,101, 0, 79,114,105,103, 83,112, 97, 99,
+101, 76,111,111,112, 0, 77, 68,105,115,112,115, 0, 77,117,108,116,105,114,101,115, 67,111,108, 0, 77,117,108,116,105,114,101,
+115, 67,111,108, 70, 97, 99,101, 0, 77,117,108,116,105,114,101,115, 70, 97, 99,101, 0, 77,117,108,116,105,114,101,115, 69,100,
+103,101, 0, 77,117,108,116,105,114,101,115, 76,101,118,101,108, 0, 77, 82,101, 99, 97,115,116, 0, 77,111,100,105,102,105,101,
+114, 68, 97,116, 97, 0, 77, 97,112,112,105,110,103, 73,110,102,111, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 83,117,
+ 98,115,117,114,102, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 76, 97,116,116,105, 99,101, 77,111,100,105,102,105,101,
+114, 68, 97,116, 97, 0, 67,117,114,118,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 66,117,105,108,100, 77,111,100,
+105,102,105,101,114, 68, 97,116, 97, 0, 77, 97,115,107, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 65,114,114, 97,121,
+ 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 77,105,114,114,111,114, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0,
+ 69,100,103,101, 83,112,108,105,116, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 66,101,118,101,108, 77,111,100,105,102,
+105,101,114, 68, 97,116, 97, 0, 66, 77,101,115,104, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 83,109,111,107,101, 77,
+111,100,105,102,105,101,114, 68, 97,116, 97, 0, 83,109,111,107,101, 68,111,109, 97,105,110, 83,101,116,116,105,110,103,115, 0,
+ 83,109,111,107,101, 70,108,111,119, 83,101,116,116,105,110,103,115, 0, 83,109,111,107,101, 67,111,108,108, 83,101,116,116,105,
+110,103,115, 0, 68,105,115,112,108, 97, 99,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 85, 86, 80,114,111,106,101,
+ 99,116, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 68,101, 99,105,109, 97,116,101, 77,111,100,105,102,105,101,114, 68,
+ 97,116, 97, 0, 83,109,111,111,116,104, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 67, 97,115,116, 77,111,100,105,102,
+105,101,114, 68, 97,116, 97, 0, 87, 97,118,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 65,114,109, 97,116,117,114,
+101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 72,111,111,107, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 83,
+111,102,116, 98,111,100,121, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 67,108,111,116,104, 77,111,100,105,102,105,101,
+114, 68, 97,116, 97, 0, 67,108,111,116,104, 0, 67,108,111,116,104, 83,105,109, 83,101,116,116,105,110,103,115, 0, 67,108,111,
+116,104, 67,111,108,108, 83,101,116,116,105,110,103,115, 0, 80,111,105,110,116, 67, 97, 99,104,101, 0, 67,111,108,108,105,115,
+105,111,110, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 66, 86, 72, 84,114,101,101, 0, 83,117,114,102, 97, 99,101, 77,
+111,100,105,102,105,101,114, 68, 97,116, 97, 0, 68,101,114,105,118,101,100, 77,101,115,104, 0, 66, 86, 72, 84,114,101,101, 70,
+114,111,109, 77,101,115,104, 0, 66,111,111,108,101, 97,110, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 77, 68,101,102,
+ 73,110,102,108,117,101,110, 99,101, 0, 77, 68,101,102, 67,101,108,108, 0, 77,101,115,104, 68,101,102,111,114,109, 77,111,100,
+105,102,105,101,114, 68, 97,116, 97, 0, 80, 97,114,116,105, 99,108,101, 83,121,115,116,101,109, 77,111,100,105,102,105,101,114,
+ 68, 97,116, 97, 0, 80, 97,114,116,105, 99,108,101, 83,121,115,116,101,109, 0, 80, 97,114,116,105, 99,108,101, 73,110,115,116,
+ 97,110, 99,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 69,120,112,108,111,100,101, 77,111,100,105,102,105,101,114,
+ 68, 97,116, 97, 0, 77,117,108,116,105,114,101,115, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 70,108,117,105,100,115,
+105,109, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 70,108,117,105,100,115,105,109, 83,101,116,116,105,110,103,115, 0,
+ 83,104,114,105,110,107,119,114, 97,112, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 83,105,109,112,108,101, 68,101,102,
+111,114,109, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 83,104, 97,112,101, 75,101,121, 77,111,100,105,102,105,101,114,
+ 68, 97,116, 97, 0, 83,111,108,105,100,105,102,121, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 83, 99,114,101,119, 77,
+111,100,105,102,105,101,114, 68, 97,116, 97, 0, 79, 99,101, 97,110, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 79, 99,
+101, 97,110, 0, 79, 99,101, 97,110, 67, 97, 99,104,101, 0, 87, 97,114,112, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0,
+ 87,101,105,103,104,116, 86, 71, 69,100,105,116, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 87,101,105,103,104,116, 86,
+ 71, 77,105,120, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 87,101,105,103,104,116, 86, 71, 80,114,111,120,105,109,105,
+116,121, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 68,121,110, 97,109,105, 99, 80, 97,105,110,116, 77,111,100,105,102,
+105,101,114, 68, 97,116, 97, 0, 68,121,110, 97,109,105, 99, 80, 97,105,110,116, 67, 97,110,118, 97,115, 83,101,116,116,105,110,
+103,115, 0, 68,121,110, 97,109,105, 99, 80, 97,105,110,116, 66,114,117,115,104, 83,101,116,116,105,110,103,115, 0, 82,101,109,
+101,115,104, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 69,100,105,116, 76, 97,116,116, 0, 76, 97,116,116,105, 99,101,
+ 0, 98, 68,101,102,111,114,109, 71,114,111,117,112, 0, 83, 99,117,108,112,116, 83,101,115,115,105,111,110, 0, 98, 65, 99,116,
+105,111,110, 0, 98, 80,111,115,101, 0, 98, 71, 80,100, 97,116, 97, 0, 98, 65,110,105,109, 86,105,122, 83,101,116,116,105,110,
+103,115, 0, 98, 77,111,116,105,111,110, 80, 97,116,104, 0, 66,117,108,108,101,116, 83,111,102,116, 66,111,100,121, 0, 80, 97,
+114,116, 68,101,102,108,101, 99,116, 0, 83,111,102,116, 66,111,100,121, 0, 79, 98, 72,111,111,107, 0, 68,117,112,108,105, 79,
+ 98,106,101, 99,116, 0, 82, 78, 71, 0, 69,102,102,101, 99,116,111,114, 87,101,105,103,104,116,115, 0, 80, 84, 67, 97, 99,104,
+101, 69,120,116,114, 97, 0, 80, 84, 67, 97, 99,104,101, 77,101,109, 0, 80, 84, 67, 97, 99,104,101, 69,100,105,116, 0, 83, 66,
+ 86,101,114,116,101,120, 0, 66,111,100,121, 80,111,105,110,116, 0, 66,111,100,121, 83,112,114,105,110,103, 0, 83, 66, 83, 99,
+114, 97,116, 99,104, 0, 70,108,117,105,100, 86,101,114,116,101,120, 86,101,108,111, 99,105,116,121, 0, 87,111,114,108,100, 0,
+ 66, 97,115,101, 0, 65,118,105, 67,111,100,101, 99, 68, 97,116, 97, 0, 81,117,105, 99,107,116,105,109,101, 67,111,100,101, 99,
+ 68, 97,116, 97, 0, 81,117,105, 99,107,116,105,109,101, 67,111,100,101, 99, 83,101,116,116,105,110,103,115, 0, 70, 70, 77,112,
+101,103, 67,111,100,101, 99, 68, 97,116, 97, 0, 65,117,100,105,111, 68, 97,116, 97, 0, 83, 99,101,110,101, 82,101,110,100,101,
+114, 76, 97,121,101,114, 0, 73,109, 97,103,101, 70,111,114,109, 97,116, 68, 97,116, 97, 0, 82,101,110,100,101,114, 68, 97,116,
+ 97, 0, 82,101,110,100,101,114, 80,114,111,102,105,108,101, 0, 71, 97,109,101, 68,111,109,101, 0, 71, 97,109,101, 70,114, 97,
+109,105,110,103, 0, 82,101, 99, 97,115,116, 68, 97,116, 97, 0, 71, 97,109,101, 68, 97,116, 97, 0, 84,105,109,101, 77, 97,114,
+107,101,114, 0, 80, 97,105,110,116, 0, 66,114,117,115,104, 0, 73,109, 97,103,101, 80, 97,105,110,116, 83,101,116,116,105,110,
+103,115, 0, 80, 97,114,116,105, 99,108,101, 66,114,117,115,104, 68, 97,116, 97, 0, 80, 97,114,116,105, 99,108,101, 69,100,105,
+116, 83,101,116,116,105,110,103,115, 0, 83, 99,117,108,112,116, 0, 85,118, 83, 99,117,108,112,116, 0, 86, 80, 97,105,110,116,
+ 0, 84,114, 97,110,115,102,111,114,109, 79,114,105,101,110,116, 97,116,105,111,110, 0, 85,110,105,102,105,101,100, 80, 97,105,
+110,116, 83,101,116,116,105,110,103,115, 0, 84,111,111,108, 83,101,116,116,105,110,103,115, 0, 98, 83,116, 97,116,115, 0, 85,
+110,105,116, 83,101,116,116,105,110,103,115, 0, 80,104,121,115,105, 99,115, 83,101,116,116,105,110,103,115, 0, 69,100,105,116,
+105,110,103, 0, 83, 99,101,110,101, 83,116, 97,116,115, 0, 68, 97,103, 70,111,114,101,115,116, 0, 77,111,118,105,101, 67,108,
+105,112, 0, 66, 71,112,105, 99, 0, 77,111,118,105,101, 67,108,105,112, 85,115,101,114, 0, 82,101,103,105,111,110, 86,105,101,
+119, 51, 68, 0, 82,101,110,100,101,114, 73,110,102,111, 0, 82,101,110,100,101,114, 69,110,103,105,110,101, 0, 86,105,101,119,
+ 68,101,112,116,104,115, 0, 83,109,111,111,116,104, 86,105,101,119, 83,116,111,114,101, 0,119,109, 84,105,109,101,114, 0, 86,
+105,101,119, 51, 68, 0, 83,112, 97, 99,101, 76,105,110,107, 0, 86,105,101,119, 50, 68, 0, 83,112, 97, 99,101, 73,110,102,111,
+ 0, 83,112, 97, 99,101, 73,112,111, 0, 98, 68,111,112,101, 83,104,101,101,116, 0, 83,112, 97, 99,101, 66,117,116,115, 0, 83,
+112, 97, 99,101, 83,101,113, 0, 70,105,108,101, 83,101,108,101, 99,116, 80, 97,114, 97,109,115, 0, 83,112, 97, 99,101, 70,105,
+108,101, 0, 70,105,108,101, 76,105,115,116, 0,119,109, 79,112,101,114, 97,116,111,114, 0, 70,105,108,101, 76, 97,121,111,117,
+116, 0, 83,112, 97, 99,101, 79,111,112,115, 0, 84,114,101,101, 83,116,111,114,101, 0, 84,114,101,101, 83,116,111,114,101, 69,
+108,101,109, 0, 83,112, 97, 99,101, 73,109, 97,103,101, 0, 83, 99,111,112,101,115, 0, 72,105,115,116,111,103,114, 97,109, 0,
+ 83,112, 97, 99,101, 78,108, 97, 0, 83,112, 97, 99,101, 84,101,120,116, 0, 83, 99,114,105,112,116, 0, 83,112, 97, 99,101, 83,
+ 99,114,105,112,116, 0, 83,112, 97, 99,101, 84,105,109,101, 67, 97, 99,104,101, 0, 83,112, 97, 99,101, 84,105,109,101, 0, 83,
+112, 97, 99,101, 78,111,100,101, 0, 83,112, 97, 99,101, 76,111,103,105, 99, 0, 67,111,110,115,111,108,101, 76,105,110,101, 0,
+ 83,112, 97, 99,101, 67,111,110,115,111,108,101, 0, 83,112, 97, 99,101, 85,115,101,114, 80,114,101,102, 0, 83,112, 97, 99,101,
+ 67,108,105,112, 0, 77,111,118,105,101, 67,108,105,112, 83, 99,111,112,101,115, 0,117,105, 70,111,110,116, 0,117,105, 70,111,
+110,116, 83,116,121,108,101, 0,117,105, 83,116,121,108,101, 0,117,105, 87,105,100,103,101,116, 67,111,108,111,114,115, 0,117,
+105, 87,105,100,103,101,116, 83,116, 97,116,101, 67,111,108,111,114,115, 0,117,105, 80, 97,110,101,108, 67,111,108,111,114,115,
+ 0, 84,104,101,109,101, 85, 73, 0, 84,104,101,109,101, 83,112, 97, 99,101, 0, 84,104,101,109,101, 87,105,114,101, 67,111,108,
+111,114, 0, 98, 84,104,101,109,101, 0, 98, 65,100,100,111,110, 0, 83,111,108,105,100, 76,105,103,104,116, 0, 85,115,101,114,
+ 68,101,102, 0, 98, 83, 99,114,101,101,110, 0, 83, 99,114, 86,101,114,116, 0, 83, 99,114, 69,100,103,101, 0, 80, 97,110,101,
+108, 0, 80, 97,110,101,108, 84,121,112,101, 0,117,105, 76, 97,121,111,117,116, 0, 83, 99,114, 65,114,101, 97, 0, 83,112, 97,
+ 99,101, 84,121,112,101, 0, 65, 82,101,103,105,111,110, 0, 65, 82,101,103,105,111,110, 84,121,112,101, 0, 70,105,108,101, 71,
+108,111, 98, 97,108, 0, 83,116,114,105,112, 69,108,101,109, 0, 83,116,114,105,112, 67,114,111,112, 0, 83,116,114,105,112, 84,
+114, 97,110,115,102,111,114,109, 0, 83,116,114,105,112, 67,111,108,111,114, 66, 97,108, 97,110, 99,101, 0, 83,116,114,105,112,
+ 80,114,111,120,121, 0, 83,116,114,105,112, 0, 80,108,117,103,105,110, 83,101,113, 0, 83,101,113,117,101,110, 99,101, 0, 98,
+ 83,111,117,110,100, 0, 77,101,116, 97, 83,116, 97, 99,107, 0, 87,105,112,101, 86, 97,114,115, 0, 71,108,111,119, 86, 97,114,
+115, 0, 84,114, 97,110,115,102,111,114,109, 86, 97,114,115, 0, 83,111,108,105,100, 67,111,108,111,114, 86, 97,114,115, 0, 83,
+112,101,101,100, 67,111,110,116,114,111,108, 86, 97,114,115, 0, 69,102,102,101, 99,116, 0, 66,117,105,108,100, 69,102,102, 0,
+ 80, 97,114,116, 69,102,102, 0, 80, 97,114,116,105, 99,108,101, 0, 87, 97,118,101, 69,102,102, 0, 98, 80,114,111,112,101,114,
+116,121, 0, 98, 78,101, 97,114, 83,101,110,115,111,114, 0, 98, 77,111,117,115,101, 83,101,110,115,111,114, 0, 98, 84,111,117,
+ 99,104, 83,101,110,115,111,114, 0, 98, 75,101,121, 98,111, 97,114,100, 83,101,110,115,111,114, 0, 98, 80,114,111,112,101,114,
+116,121, 83,101,110,115,111,114, 0, 98, 65, 99,116,117, 97,116,111,114, 83,101,110,115,111,114, 0, 98, 68,101,108, 97,121, 83,
+101,110,115,111,114, 0, 98, 67,111,108,108,105,115,105,111,110, 83,101,110,115,111,114, 0, 98, 82, 97,100, 97,114, 83,101,110,
+115,111,114, 0, 98, 82, 97,110,100,111,109, 83,101,110,115,111,114, 0, 98, 82, 97,121, 83,101,110,115,111,114, 0, 98, 65,114,
+109, 97,116,117,114,101, 83,101,110,115,111,114, 0, 98, 77,101,115,115, 97,103,101, 83,101,110,115,111,114, 0, 98, 83,101,110,
+115,111,114, 0, 98, 67,111,110,116,114,111,108,108,101,114, 0, 98, 74,111,121,115,116,105, 99,107, 83,101,110,115,111,114, 0,
+ 98, 69,120,112,114,101,115,115,105,111,110, 67,111,110,116, 0, 98, 80,121,116,104,111,110, 67,111,110,116, 0, 98, 65, 99,116,
+117, 97,116,111,114, 0, 98, 65,100,100, 79, 98,106,101, 99,116, 65, 99,116,117, 97,116,111,114, 0, 98, 65, 99,116,105,111,110,
+ 65, 99,116,117, 97,116,111,114, 0, 83,111,117,110,100, 51, 68, 0, 98, 83,111,117,110,100, 65, 99,116,117, 97,116,111,114, 0,
+ 98, 69,100,105,116, 79, 98,106,101, 99,116, 65, 99,116,117, 97,116,111,114, 0, 98, 83, 99,101,110,101, 65, 99,116,117, 97,116,
+111,114, 0, 98, 80,114,111,112,101,114,116,121, 65, 99,116,117, 97,116,111,114, 0, 98, 79, 98,106,101, 99,116, 65, 99,116,117,
+ 97,116,111,114, 0, 98, 73,112,111, 65, 99,116,117, 97,116,111,114, 0, 98, 67, 97,109,101,114, 97, 65, 99,116,117, 97,116,111,
+114, 0, 98, 67,111,110,115,116,114, 97,105,110,116, 65, 99,116,117, 97,116,111,114, 0, 98, 71,114,111,117,112, 65, 99,116,117,
+ 97,116,111,114, 0, 98, 82, 97,110,100,111,109, 65, 99,116,117, 97,116,111,114, 0, 98, 77,101,115,115, 97,103,101, 65, 99,116,
+117, 97,116,111,114, 0, 98, 71, 97,109,101, 65, 99,116,117, 97,116,111,114, 0, 98, 86,105,115,105, 98,105,108,105,116,121, 65,
+ 99,116,117, 97,116,111,114, 0, 98, 84,119,111, 68, 70,105,108,116,101,114, 65, 99,116,117, 97,116,111,114, 0, 98, 80, 97,114,
+101,110,116, 65, 99,116,117, 97,116,111,114, 0, 98, 83,116, 97,116,101, 65, 99,116,117, 97,116,111,114, 0, 98, 65,114,109, 97,
+116,117,114,101, 65, 99,116,117, 97,116,111,114, 0, 98, 83,116,101,101,114,105,110,103, 65, 99,116,117, 97,116,111,114, 0, 71,
+114,111,117,112, 79, 98,106,101, 99,116, 0, 66,111,110,101, 0, 98, 65,114,109, 97,116,117,114,101, 0, 98, 77,111,116,105,111,
+110, 80, 97,116,104, 86,101,114,116, 0, 98, 80,111,115,101, 67,104, 97,110,110,101,108, 0, 98, 73, 75, 80, 97,114, 97,109, 0,
+ 98, 73,116, 97,115, 99, 0, 98, 65, 99,116,105,111,110, 71,114,111,117,112, 0, 83,112, 97, 99,101, 65, 99,116,105,111,110, 0,
+ 98, 65, 99,116,105,111,110, 67,104, 97,110,110,101,108, 0, 98, 67,111,110,115,116,114, 97,105,110,116, 67,104, 97,110,110,101,
+108, 0, 98, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 67,111,110,115,116,114, 97,105,110,116, 84, 97,114,103,101,116, 0,
+ 98, 80,121,116,104,111,110, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 75,105,110,101,109, 97,116,105, 99, 67,111,110,115,
+116,114, 97,105,110,116, 0, 98, 83,112,108,105,110,101, 73, 75, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 84,114, 97, 99,
+107, 84,111, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 82,111,116, 97,116,101, 76,105,107,101, 67,111,110,115,116,114, 97,
+105,110,116, 0, 98, 76,111, 99, 97,116,101, 76,105,107,101, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 83,105,122,101, 76,
+105,107,101, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 83, 97,109,101, 86,111,108,117,109,101, 67,111,110,115,116,114, 97,
+105,110,116, 0, 98, 84,114, 97,110,115, 76,105,107,101, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 77,105,110, 77, 97,120,
+ 67,111,110,115,116,114, 97,105,110,116, 0, 98, 65, 99,116,105,111,110, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 76,111,
+ 99,107, 84,114, 97, 99,107, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 68, 97,109,112, 84,114, 97, 99,107, 67,111,110,115,
+116,114, 97,105,110,116, 0, 98, 70,111,108,108,111,119, 80, 97,116,104, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 83,116,
+114,101,116, 99,104, 84,111, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 82,105,103,105,100, 66,111,100,121, 74,111,105,110,
+116, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 67,108, 97,109,112, 84,111, 67,111,110,115,116,114, 97,105,110,116, 0, 98,
+ 67,104,105,108,100, 79,102, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 84,114, 97,110,115,102,111,114,109, 67,111,110,115,
+116,114, 97,105,110,116, 0, 98, 80,105,118,111,116, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 76,111, 99, 76,105,109,105,
+116, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 82,111,116, 76,105,109,105,116, 67,111,110,115,116,114, 97,105,110,116, 0,
+ 98, 83,105,122,101, 76,105,109,105,116, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 68,105,115,116, 76,105,109,105,116, 67,
+111,110,115,116,114, 97,105,110,116, 0, 98, 83,104,114,105,110,107,119,114, 97,112, 67,111,110,115,116,114, 97,105,110,116, 0,
+ 98, 70,111,108,108,111,119, 84,114, 97, 99,107, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 67, 97,109,101,114, 97, 83,111,
+108,118,101,114, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 79, 98,106,101, 99,116, 83,111,108,118,101,114, 67,111,110,115,
+116,114, 97,105,110,116, 0, 98, 65, 99,116,105,111,110, 77,111,100,105,102,105,101,114, 0, 98, 65, 99,116,105,111,110, 83,116,
+114,105,112, 0, 98, 78,111,100,101, 83,116, 97, 99,107, 0, 98, 78,111,100,101, 83,111, 99,107,101,116, 0, 98, 78,111,100,101,
+ 76,105,110,107, 0, 98, 78,111,100,101, 80,114,101,118,105,101,119, 0, 98, 78,111,100,101, 0,117,105, 66,108,111, 99,107, 0,
+ 98, 78,111,100,101, 84,121,112,101, 0, 98, 78,111,100,101, 84,114,101,101, 69,120,101, 99, 0, 98, 78,111,100,101, 83,111, 99,
+107,101,116, 86, 97,108,117,101, 73,110,116, 0, 98, 78,111,100,101, 83,111, 99,107,101,116, 86, 97,108,117,101, 70,108,111, 97,
+116, 0, 98, 78,111,100,101, 83,111, 99,107,101,116, 86, 97,108,117,101, 66,111,111,108,101, 97,110, 0, 98, 78,111,100,101, 83,
+111, 99,107,101,116, 86, 97,108,117,101, 86,101, 99,116,111,114, 0, 98, 78,111,100,101, 83,111, 99,107,101,116, 86, 97,108,117,
+101, 82, 71, 66, 65, 0, 78,111,100,101, 73,109, 97,103,101, 65,110,105,109, 0, 78,111,100,101, 66,108,117,114, 68, 97,116, 97,
+ 0, 78,111,100,101, 68, 66,108,117,114, 68, 97,116, 97, 0, 78,111,100,101, 66,105,108, 97,116,101,114, 97,108, 66,108,117,114,
+ 68, 97,116, 97, 0, 78,111,100,101, 72,117,101, 83, 97,116, 0, 78,111,100,101, 73,109, 97,103,101, 70,105,108,101, 0, 78,111,
+100,101, 73,109, 97,103,101, 77,117,108,116,105, 70,105,108,101, 0, 78,111,100,101, 73,109, 97,103,101, 77,117,108,116,105, 70,
+105,108,101, 83,111, 99,107,101,116, 0, 78,111,100,101, 67,104,114,111,109, 97, 0, 78,111,100,101, 84,119,111, 88, 89,115, 0,
+ 78,111,100,101, 84,119,111, 70,108,111, 97,116,115, 0, 78,111,100,101, 71,101,111,109,101,116,114,121, 0, 78,111,100,101, 86,
+101,114,116,101,120, 67,111,108, 0, 78,111,100,101, 68,101,102,111, 99,117,115, 0, 78,111,100,101, 83, 99,114,105,112,116, 68,
+105, 99,116, 0, 78,111,100,101, 71,108, 97,114,101, 0, 78,111,100,101, 84,111,110,101,109, 97,112, 0, 78,111,100,101, 76,101,
+110,115, 68,105,115,116, 0, 78,111,100,101, 67,111,108,111,114, 66, 97,108, 97,110, 99,101, 0, 78,111,100,101, 67,111,108,111,
+114,115,112,105,108,108, 0, 78,111,100,101, 84,101,120, 66, 97,115,101, 0, 78,111,100,101, 84,101,120, 83,107,121, 0, 78,111,
+100,101, 84,101,120, 73,109, 97,103,101, 0, 78,111,100,101, 84,101,120, 67,104,101, 99,107,101,114, 0, 78,111,100,101, 84,101,
+120, 69,110,118,105,114,111,110,109,101,110,116, 0, 78,111,100,101, 84,101,120, 71,114, 97,100,105,101,110,116, 0, 78,111,100,
+101, 84,101,120, 78,111,105,115,101, 0, 78,111,100,101, 84,101,120, 86,111,114,111,110,111,105, 0, 78,111,100,101, 84,101,120,
+ 77,117,115,103,114, 97,118,101, 0, 78,111,100,101, 84,101,120, 87, 97,118,101, 0, 78,111,100,101, 84,101,120, 77, 97,103,105,
+ 99, 0, 78,111,100,101, 83,104, 97,100,101,114, 65,116,116,114,105, 98,117,116,101, 0, 84,101,120, 78,111,100,101, 79,117,116,
+112,117,116, 0, 67,117,114,118,101, 77, 97,112, 80,111,105,110,116, 0, 67,117,114,118,101, 77, 97,112, 0, 66,114,117,115,104,
+ 67,108,111,110,101, 0, 67,117,115,116,111,109, 68, 97,116, 97, 76, 97,121,101,114, 0, 67,117,115,116,111,109, 68, 97,116, 97,
+ 69,120,116,101,114,110, 97,108, 0, 72, 97,105,114, 75,101,121, 0, 80, 97,114,116,105, 99,108,101, 75,101,121, 0, 66,111,105,
+100, 80, 97,114,116,105, 99,108,101, 0, 66,111,105,100, 68, 97,116, 97, 0, 80, 97,114,116,105, 99,108,101, 83,112,114,105,110,
+103, 0, 67,104,105,108,100, 80, 97,114,116,105, 99,108,101, 0, 80, 97,114,116,105, 99,108,101, 84, 97,114,103,101,116, 0, 80,
+ 97,114,116,105, 99,108,101, 68,117,112,108,105, 87,101,105,103,104,116, 0, 80, 97,114,116,105, 99,108,101, 68, 97,116, 97, 0,
+ 83, 80, 72, 70,108,117,105,100, 83,101,116,116,105,110,103,115, 0, 80, 97,114,116,105, 99,108,101, 83,101,116,116,105,110,103,
+115, 0, 66,111,105,100, 83,101,116,116,105,110,103,115, 0, 80, 97,114,116,105, 99,108,101, 67, 97, 99,104,101, 75,101,121, 0,
+ 75, 68, 84,114,101,101, 0, 80, 97,114,116,105, 99,108,101, 68,114, 97,119, 68, 97,116, 97, 0, 76,105,110,107, 78,111,100,101,
+ 0, 98, 71, 80, 68,115,112,111,105,110,116, 0, 98, 71, 80, 68,115,116,114,111,107,101, 0, 98, 71, 80, 68,102,114, 97,109,101,
+ 0, 98, 71, 80, 68,108, 97,121,101,114, 0, 82,101,112,111,114,116, 76,105,115,116, 0,119,109, 87,105,110,100,111,119, 77, 97,
+110, 97,103,101,114, 0,119,109, 87,105,110,100,111,119, 0,119,109, 75,101,121, 67,111,110,102,105,103, 0,119,109, 69,118,101,
+110,116, 0,119,109, 83,117, 98, 87,105,110,100,111,119, 0,119,109, 71,101,115,116,117,114,101, 0,119,109, 75,101,121, 77, 97,
+112, 73,116,101,109, 0, 80,111,105,110,116,101,114, 82, 78, 65, 0,119,109, 75,101,121, 77, 97,112, 68,105,102,102, 73,116,101,
+109, 0,119,109, 75,101,121, 77, 97,112, 0,119,109, 79,112,101,114, 97,116,111,114, 84,121,112,101, 0, 70, 77,111,100,105,102,
+105,101,114, 0, 70, 77,111,100, 95, 71,101,110,101,114, 97,116,111,114, 0, 70, 77,111,100, 95, 70,117,110, 99,116,105,111,110,
+ 71,101,110,101,114, 97,116,111,114, 0, 70, 67, 77, 95, 69,110,118,101,108,111,112,101, 68, 97,116, 97, 0, 70, 77,111,100, 95,
+ 69,110,118,101,108,111,112,101, 0, 70, 77,111,100, 95, 67,121, 99,108,101,115, 0, 70, 77,111,100, 95, 80,121,116,104,111,110,
+ 0, 70, 77,111,100, 95, 76,105,109,105,116,115, 0, 70, 77,111,100, 95, 78,111,105,115,101, 0, 70, 77,111,100, 95, 83,116,101,
+112,112,101,100, 0, 68,114,105,118,101,114, 84, 97,114,103,101,116, 0, 68,114,105,118,101,114, 86, 97,114, 0, 67,104, 97,110,
+110,101,108, 68,114,105,118,101,114, 0, 70, 80,111,105,110,116, 0, 70, 67,117,114,118,101, 0, 65,110,105,109, 77, 97,112, 80,
+ 97,105,114, 0, 65,110,105,109, 77, 97,112,112,101,114, 0, 78,108, 97, 83,116,114,105,112, 0, 78,108, 97, 84,114, 97, 99,107,
+ 0, 75, 83, 95, 80, 97,116,104, 0, 75,101,121,105,110,103, 83,101,116, 0, 65,110,105,109, 79,118,101,114,114,105,100,101, 0,
+ 73,100, 65,100,116, 84,101,109,112,108, 97,116,101, 0, 66,111,105,100, 82,117,108,101, 0, 66,111,105,100, 82,117,108,101, 71,
+111, 97,108, 65,118,111,105,100, 0, 66,111,105,100, 82,117,108,101, 65,118,111,105,100, 67,111,108,108,105,115,105,111,110, 0,
+ 66,111,105,100, 82,117,108,101, 70,111,108,108,111,119, 76,101, 97,100,101,114, 0, 66,111,105,100, 82,117,108,101, 65,118,101,
+114, 97,103,101, 83,112,101,101,100, 0, 66,111,105,100, 82,117,108,101, 70,105,103,104,116, 0, 66,111,105,100, 83,116, 97,116,
+101, 0, 70, 76, 85, 73, 68, 95, 51, 68, 0, 87, 84, 85, 82, 66, 85, 76, 69, 78, 67, 69, 0, 83,112,101, 97,107,101,114, 0, 77,
+111,118,105,101, 67,108,105,112, 80,114,111,120,121, 0, 77,111,118,105,101, 67,108,105,112, 67, 97, 99,104,101, 0, 77,111,118,
+105,101, 84,114, 97, 99,107,105,110,103, 0, 77,111,118,105,101, 84,114, 97, 99,107,105,110,103, 84,114, 97, 99,107, 0, 77,111,
+118,105,101, 84,114, 97, 99,107,105,110,103, 77, 97,114,107,101,114, 0, 77,111,118,105,101, 82,101, 99,111,110,115,116,114,117,
+ 99,116,101,100, 67, 97,109,101,114, 97, 0, 77,111,118,105,101, 84,114, 97, 99,107,105,110,103, 67, 97,109,101,114, 97, 0, 77,
+111,118,105,101, 84,114, 97, 99,107,105,110,103, 83,101,116,116,105,110,103,115, 0, 77,111,118,105,101, 84,114, 97, 99,107,105,
+110,103, 83,116, 97, 98,105,108,105,122, 97,116,105,111,110, 0, 77,111,118,105,101, 84,114, 97, 99,107,105,110,103, 82,101, 99,
+111,110,115,116,114,117, 99,116,105,111,110, 0, 77,111,118,105,101, 84,114, 97, 99,107,105,110,103, 79, 98,106,101, 99,116, 0,
+ 77,111,118,105,101, 84,114, 97, 99,107,105,110,103, 83,116, 97,116,115, 0, 77,111,118,105,101, 84,114, 97, 99,107,105,110,103,
+ 68,111,112,101,115,104,101,101,116, 67,104, 97,110,110,101,108, 0, 77,111,118,105,101, 84,114, 97, 99,107,105,110,103, 68,111,
+112,101,115,104,101,101,116, 0, 68,121,110, 97,109,105, 99, 80, 97,105,110,116, 83,117,114,102, 97, 99,101, 0, 80, 97,105,110,
+116, 83,117,114,102, 97, 99,101, 68, 97,116, 97, 0, 0, 0, 0, 84, 76, 69, 78, 1, 0, 1, 0, 2, 0, 2, 0, 4, 0, 4, 0,
+ 4, 0, 4, 0, 8, 0, 8, 0, 8, 0, 0, 0, 16, 0, 24, 0, 16, 0, 4, 0, 8, 0, 12, 0, 16, 0, 16, 0, 32, 0,128, 0,
+120, 0,152, 8, 0, 0, 40, 0,144, 0,112, 5,112, 0, 36, 0, 56, 0,160, 0,192, 0,224, 0, 96, 0, 40, 0, 48, 0,224, 0,
+ 16, 0,200, 0, 40, 0,216, 11, 48, 5, 0, 0, 0, 0, 0, 0, 56, 1,168, 1,216, 4, 24, 0, 8, 3,200, 0, 0, 0,104, 0,
+ 64, 1, 56, 4, 80, 0, 24, 1,144, 0, 56, 3, 16, 2, 88, 0, 16, 0,128, 3,152, 0,136, 4, 0, 0,104, 0,104, 0, 0, 1,
+ 80, 0, 8, 0, 16, 0, 32, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 0,232, 4, 8, 0, 12, 0, 16, 0, 8, 0, 12, 0, 4, 0,
+ 20, 0, 48, 0, 64, 0, 20, 0, 12, 0, 16, 0, 4, 0, 8, 0, 0, 0,176, 0,144, 1, 8, 0, 4, 0, 4, 0, 0, 1, 32, 0,
+ 8, 0, 24, 0, 16, 0, 64, 0, 24, 0, 12, 0, 64, 0, 4, 0,112, 0,200, 0,136, 0,192, 0,192, 0,128, 0,192, 0,192, 0,
+128, 0,120, 0,200, 0,120, 0,144, 0, 16, 1, 56, 0,200, 0, 24, 1, 40, 1,120, 0,184, 0,200, 0, 64, 1,200, 0, 88, 1,
+112, 0,168, 0, 0, 0,152, 0, 48, 0, 40, 5,192, 0, 0, 0,152, 0, 0, 0, 0, 0,128, 0, 8, 0, 8, 0,112, 1,144, 0,
+152, 2,136, 0,192, 0,120, 0,128, 0,224, 4,208, 0,200, 0,112, 0,208, 0,144, 0, 16, 5, 0, 0, 0, 0, 48, 1,104, 1,
+160, 1,104, 1,136, 0,104, 0,112, 0,128, 0, 16, 0, 96, 1, 88, 0, 0, 0,200, 0,216, 0,152, 0, 48, 0, 24, 0,120, 0,
+152, 0,216, 1, 0, 1,184, 0, 0, 0, 72, 0, 32, 0,176, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 12, 0, 24, 2, 40, 0,
+184, 0,152, 0, 64, 0, 72, 0, 32, 0,128, 0, 24, 0, 56, 9, 64, 0, 24, 0, 16, 0, 56, 0,168, 0, 96, 0, 24, 0, 88, 6,
+ 48, 0, 16, 0,168, 0, 96, 0, 24, 0, 56, 0,120, 0, 24, 0,240, 1, 32, 0, 8, 0, 24, 0, 80, 8, 0, 0, 0, 0,216, 8,
+104, 0, 8, 0,112, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 1, 56, 0,144, 0, 64, 0,240, 0,112, 0,248, 0,240, 0,
+160, 7,104, 0, 0, 0,168, 0, 0, 0, 24, 1, 16, 0, 16, 0, 40, 33,128, 16, 24, 16,216, 0,160, 2,168, 5, 64, 0, 24, 0,
+208, 0, 48, 1, 72, 0, 40, 0,136, 1,104, 0, 48, 1, 56, 0, 24, 4, 32, 0,232, 0, 32, 0, 32, 0, 8, 0, 80, 3,224, 1,
+ 16, 0,168, 36, 80, 0, 56, 0,112, 38, 8, 1, 32, 0, 40, 0, 88, 1, 0, 0, 0, 0,160, 0, 0, 0, 40, 1, 0, 0, 48, 4,
+ 8, 1, 16, 0, 8, 0, 44, 0, 16, 4, 72, 3,200, 4, 80, 1,208, 4, 32, 0, 12, 0, 24, 0, 32, 0, 16, 0, 24, 0, 24, 0,
+ 32, 0,136, 1, 0, 0, 64, 0, 96, 0, 80, 0, 8, 0, 80, 0,136, 0,200, 0, 72, 0, 8, 0,136, 0, 76, 0, 72, 0,204, 0,
+136, 0,136, 0,128, 0,136, 0, 92, 0,128, 0, 80, 0,112, 0, 16, 0,168, 0, 32, 0, 72, 0,120, 0, 24, 0,144, 0,112, 0,
+148, 0, 32, 0,128, 0, 88, 0, 88, 0,208, 0,140, 0, 4, 0, 24, 0, 16, 0, 8, 0,160, 0, 48, 0, 40, 0, 72, 1, 0, 1,
+ 16, 0, 32, 2, 4, 0, 40, 0,120, 0, 72, 1,120, 0, 56, 0,120, 0,160, 0,112, 0,184, 0, 24, 0, 88, 0, 80, 0, 80, 0,
+ 80, 0, 8, 0, 72, 0,104, 0,104, 0, 80, 0, 80, 0, 24, 0, 88, 0,104, 0, 16, 0,144, 0,128, 0, 88, 0, 28, 0, 28, 0,
+ 28, 0, 88, 0, 24, 0,160, 0, 16, 0,152, 0, 72, 0,168, 0, 48, 0,208, 0, 56, 0, 16, 0, 88, 1, 0, 0, 0, 0, 0, 0,
+ 16, 0, 16, 0, 4, 0, 24, 0, 16, 0, 16, 0, 40, 0, 28, 0, 12, 0, 12, 0, 32, 4, 40, 4, 32, 0, 44, 0, 24, 0, 8, 0,
+128, 0, 64, 0, 32, 0, 16, 0, 32, 0, 32, 0, 8, 0, 96, 0, 20, 0,200, 3,216, 3,208, 3,200, 3,208, 3,208, 3,200, 3,
+208, 3,208, 3,208, 3,208, 3, 64, 0, 64, 0, 12, 0, 56, 0, 24, 0,104, 0, 0, 4, 24, 0, 56, 0, 56, 0, 20, 0, 16, 0,
+ 64, 0, 40, 0, 32, 0,192, 0, 60, 0, 16, 3,104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 32, 0, 40, 0,192, 0, 40, 0,
+ 88, 1, 0, 1,168, 0, 0, 0, 0, 0, 0, 0,184, 0, 0, 0, 32, 0,136, 0, 0, 0,120, 0, 24, 0, 24, 0, 16, 0, 24, 0,
+ 8, 0, 16, 0, 24, 0, 20, 0, 20, 0, 56, 0, 24, 2, 40, 1, 16, 0,104, 0, 0, 1, 40, 0,208, 0,104, 0,112, 0,216, 1,
+ 32, 0,128, 0, 56, 0, 80, 0, 64, 0,104, 0, 72, 0, 64, 0,128, 0, 0, 0, 0, 0,184, 0, 8, 3, 0, 0, 16, 1,192, 0,
+ 16, 0, 72, 0, 48, 0, 64, 0, 56, 0, 24, 0,128, 0, 0, 1, 32, 0, 24, 0, 16, 6, 0, 0, 83, 84, 82, 67,209, 1, 0, 0,
+ 12, 0, 2, 0, 12, 0, 0, 0, 12, 0, 1, 0, 13, 0, 3, 0, 13, 0, 0, 0, 13, 0, 1, 0, 11, 0, 2, 0, 14, 0, 2, 0,
+ 11, 0, 3, 0, 11, 0, 4, 0, 15, 0, 2, 0, 2, 0, 5, 0, 2, 0, 6, 0, 16, 0, 2, 0, 7, 0, 5, 0, 7, 0, 6, 0,
+ 17, 0, 3, 0, 7, 0, 5, 0, 7, 0, 6, 0, 7, 0, 7, 0, 18, 0, 4, 0, 4, 0, 8, 0, 4, 0, 9, 0, 4, 0, 10, 0,
+ 4, 0, 11, 0, 19, 0, 4, 0, 7, 0, 8, 0, 7, 0, 9, 0, 7, 0, 10, 0, 7, 0, 11, 0, 20, 0, 4, 0, 11, 0, 12, 0,
+ 14, 0, 13, 0, 4, 0, 14, 0, 4, 0, 15, 0, 21, 0, 10, 0, 21, 0, 0, 0, 21, 0, 1, 0, 0, 0, 16, 0, 0, 0, 17, 0,
+ 2, 0, 18, 0, 0, 0, 19, 0, 4, 0, 20, 0, 20, 0, 21, 0, 4, 0, 22, 0, 4, 0, 23, 0, 22, 0, 11, 0, 11, 0, 0, 0,
+ 11, 0, 1, 0, 22, 0, 24, 0, 23, 0, 25, 0, 0, 0, 26, 0, 2, 0, 27, 0, 2, 0, 28, 0, 2, 0, 18, 0, 4, 0, 29, 0,
+ 4, 0, 30, 0, 21, 0, 31, 0, 23, 0, 8, 0, 22, 0, 32, 0, 22, 0, 33, 0, 24, 0, 34, 0, 0, 0, 35, 0, 0, 0, 36, 0,
+ 4, 0, 37, 0, 4, 0, 27, 0, 23, 0, 38, 0, 25, 0, 5, 0, 4, 0, 39, 0, 4, 0, 40, 0, 2, 0, 41, 0, 2, 0, 42, 0,
+ 4, 0, 43, 0, 26, 0, 6, 0, 27, 0, 44, 0, 2, 0, 45, 0, 2, 0, 46, 0, 2, 0, 16, 0, 2, 0, 18, 0, 0, 0, 47, 0,
+ 28, 0, 21, 0, 28, 0, 0, 0, 28, 0, 1, 0, 29, 0, 48, 0, 30, 0, 49, 0, 19, 0, 50, 0, 19, 0, 51, 0, 2, 0, 45, 0,
+ 2, 0, 46, 0, 2, 0, 52, 0, 2, 0, 53, 0, 2, 0, 54, 0, 2, 0, 55, 0, 2, 0, 18, 0, 2, 0, 56, 0, 7, 0, 10, 0,
+ 7, 0, 11, 0, 4, 0, 57, 0, 7, 0, 58, 0, 7, 0, 59, 0, 7, 0, 60, 0, 26, 0, 61, 0, 31, 0, 7, 0, 22, 0, 32, 0,
+ 14, 0, 62, 0, 19, 0, 63, 0, 2, 0, 45, 0, 2, 0, 64, 0, 2, 0, 65, 0, 2, 0, 27, 0, 32, 0, 16, 0, 32, 0, 0, 0,
+ 32, 0, 1, 0, 7, 0, 66, 0, 7, 0, 60, 0, 2, 0, 16, 0, 2, 0, 67, 0, 2, 0, 68, 0, 2, 0, 18, 0, 4, 0, 69, 0,
+ 4, 0, 70, 0, 11, 0, 2, 0, 7, 0, 71, 0, 0, 0, 19, 0, 0, 0, 72, 0, 7, 0, 73, 0, 7, 0, 74, 0, 33, 0, 15, 0,
+ 22, 0, 32, 0, 34, 0, 75, 0, 32, 0, 76, 0, 0, 0, 77, 0, 4, 0, 78, 0, 4, 0, 27, 0, 14, 0, 79, 0, 31, 0, 80, 0,
+ 22, 0, 81, 0, 2, 0, 16, 0, 2, 0, 82, 0, 2, 0, 83, 0, 2, 0, 18, 0, 7, 0, 84, 0, 4, 0, 85, 0, 35, 0, 6, 0,
+ 35, 0, 0, 0, 35, 0, 1, 0, 0, 0, 86, 0, 0, 0, 87, 0, 4, 0, 22, 0, 4, 0, 88, 0, 36, 0, 10, 0, 36, 0, 0, 0,
+ 36, 0, 1, 0, 4, 0, 89, 0, 4, 0, 90, 0, 4, 0, 91, 0, 4, 0, 67, 0, 4, 0, 13, 0, 4, 0, 92, 0, 0, 0, 93, 0,
+ 0, 0, 94, 0, 37, 0, 15, 0, 22, 0, 32, 0, 0, 0, 95, 0, 4, 0, 92, 0, 4, 0, 96, 0, 14, 0, 97, 0, 35, 0, 98, 0,
+ 35, 0, 99, 0, 4, 0,100, 0, 4, 0,101, 0, 14, 0,102, 0, 0, 0,103, 0, 4, 0,104, 0, 4, 0,105, 0, 11, 0,106, 0,
+ 8, 0,107, 0, 38, 0, 3, 0, 4, 0,108, 0, 4, 0,109, 0, 11, 0, 2, 0, 39, 0, 20, 0, 22, 0, 32, 0, 34, 0, 75, 0,
+ 0, 0, 16, 0, 0, 0,110, 0, 2, 0, 18, 0, 7, 0,111, 0, 7, 0,112, 0, 7, 0,113, 0, 7, 0,114, 0, 7, 0,115, 0,
+ 7, 0,116, 0, 7, 0,117, 0, 7, 0,118, 0, 7, 0,119, 0, 7, 0,120, 0, 7, 0,121, 0, 31, 0, 80, 0, 27, 0,122, 0,
+ 0, 0,123, 0, 0, 0,124, 0, 40, 0, 14, 0, 41, 0,125, 0, 4, 0,126, 0, 4, 0,127, 0, 4, 0,128, 0, 4, 0,129, 0,
+ 0, 0,130, 0, 0, 0,131, 0, 0, 0,132, 0, 0, 0, 27, 0, 2, 0,133, 0, 2, 0,134, 0, 2, 0,135, 0, 2, 0, 18, 0,
+ 4, 0, 30, 0, 42, 0, 33, 0, 22, 0, 32, 0, 0, 0, 35, 0, 14, 0,136, 0, 43, 0,137, 0, 44, 0,138, 0, 45, 0,139, 0,
+ 45, 0,140, 0, 2, 0,141, 0, 2, 0,142, 0, 2, 0,132, 0, 2, 0, 18, 0, 2, 0,143, 0, 2, 0, 16, 0, 4, 0,144, 0,
+ 2, 0,145, 0, 2, 0,146, 0, 2, 0,147, 0, 2, 0,148, 0, 2, 0,149, 0, 2, 0,150, 0, 4, 0,151, 0, 4, 0,152, 0,
+ 38, 0,153, 0, 25, 0,154, 0, 7, 0,155, 0, 4, 0,156, 0, 2, 0,157, 0, 2, 0,158, 0, 2, 0,159, 0, 0, 0,160, 0,
+ 0, 0,161, 0, 7, 0,162, 0, 7, 0,163, 0, 46, 0, 65, 0, 2, 0,164, 0, 2, 0,165, 0, 2, 0,166, 0, 2, 0,167, 0,
+ 27, 0,168, 0, 47, 0,169, 0, 0, 0,170, 0, 0, 0,171, 0, 0, 0,172, 0, 0, 0,173, 0, 0, 0,174, 0, 7, 0,175, 0,
+ 7, 0,176, 0, 7, 0,177, 0, 2, 0,178, 0, 2, 0,179, 0, 2, 0,180, 0, 2, 0,181, 0, 2, 0,182, 0, 2, 0,183, 0,
+ 0, 0,184, 0, 0, 0,124, 0, 7, 0,185, 0, 7, 0,186, 0, 7, 0,187, 0, 7, 0,188, 0, 7, 0,189, 0, 7, 0, 56, 0,
+ 7, 0,190, 0, 7, 0,191, 0, 7, 0,192, 0, 7, 0,193, 0, 7, 0,194, 0, 7, 0,195, 0, 7, 0,196, 0, 7, 0,197, 0,
+ 7, 0,198, 0, 7, 0,199, 0, 7, 0,200, 0, 7, 0,201, 0, 7, 0,202, 0, 7, 0,203, 0, 7, 0,204, 0, 7, 0,205, 0,
+ 7, 0,206, 0, 7, 0,207, 0, 7, 0,208, 0, 7, 0,209, 0, 7, 0,210, 0, 7, 0,211, 0, 7, 0,212, 0, 7, 0,213, 0,
+ 7, 0,214, 0, 7, 0,215, 0, 7, 0,216, 0, 7, 0,217, 0, 7, 0,218, 0, 7, 0,219, 0, 7, 0,220, 0, 7, 0,221, 0,
+ 7, 0,222, 0, 7, 0,223, 0, 7, 0,224, 0, 7, 0,225, 0, 7, 0,226, 0, 48, 0, 15, 0, 0, 0, 35, 0, 11, 0,227, 0,
+ 0, 0,228, 0, 0, 0,229, 0, 4, 0,230, 0, 4, 0,231, 0, 11, 0,232, 0, 7, 0,233, 0, 7, 0,234, 0, 7, 0,235, 0,
+ 4, 0,236, 0, 11, 0,237, 0, 11, 0,238, 0, 4, 0,239, 0, 4, 0, 27, 0, 49, 0, 6, 0, 7, 0,185, 0, 7, 0,186, 0,
+ 7, 0,187, 0, 7, 0,240, 0, 7, 0, 66, 0, 4, 0, 63, 0, 50, 0, 5, 0, 2, 0, 18, 0, 2, 0, 37, 0, 2, 0, 63, 0,
+ 2, 0,241, 0, 49, 0,235, 0, 51, 0, 17, 0, 27, 0,168, 0, 42, 0,242, 0, 52, 0,243, 0, 7, 0,244, 0, 7, 0,245, 0,
+ 2, 0, 16, 0, 2, 0,246, 0, 7, 0,112, 0, 7, 0,113, 0, 7, 0,247, 0, 4, 0,248, 0, 2, 0,249, 0, 2, 0,250, 0,
+ 4, 0,132, 0, 4, 0,144, 0, 2, 0,251, 0, 2, 0,252, 0, 53, 0, 25, 0, 2, 0, 18, 0, 2, 0,253, 0, 7, 0,254, 0,
+ 7, 0,255, 0, 2, 0,143, 0, 2, 0, 0, 1, 4, 0, 1, 1, 4, 0, 2, 1, 27, 0,168, 0, 4, 0, 3, 1, 2, 0, 4, 1,
+ 2, 0, 5, 1, 11, 0, 6, 1, 7, 0, 7, 1, 7, 0, 8, 1, 2, 0, 9, 1, 2, 0, 10, 1, 2, 0, 11, 1, 2, 0, 12, 1,
+ 7, 0, 13, 1, 7, 0, 14, 1, 7, 0, 15, 1, 7, 0, 16, 1, 50, 0, 17, 1, 54, 0, 18, 1, 55, 0, 13, 0, 4, 0, 19, 1,
+ 4, 0, 20, 1, 2, 0, 21, 1, 2, 0, 18, 0, 2, 0, 22, 1, 2, 0, 23, 1, 27, 0,168, 0, 7, 0, 24, 1, 4, 0, 25, 1,
+ 0, 0, 26, 1, 7, 0, 27, 1, 4, 0, 28, 1, 4, 0,132, 0, 56, 0, 4, 0, 27, 0,168, 0, 0, 0, 29, 1, 4, 0, 30, 1,
+ 4, 0, 27, 0, 47, 0, 64, 0, 22, 0, 32, 0, 34, 0, 75, 0, 7, 0, 31, 1, 7, 0, 32, 1, 7, 0, 33, 1, 7, 0, 34, 1,
+ 7, 0, 35, 1, 7, 0, 36, 1, 7, 0, 37, 1, 7, 0, 38, 1, 7, 0, 39, 1, 7, 0, 30, 0, 7, 0, 40, 1, 7, 0, 41, 1,
+ 7, 0, 42, 1, 7, 0, 43, 1, 7, 0, 44, 1, 7, 0, 45, 1, 7, 0, 46, 1, 7, 0, 47, 1, 7, 0, 48, 1, 7, 0, 49, 1,
+ 7, 0, 50, 1, 7, 0, 51, 1, 2, 0, 52, 1, 2, 0, 53, 1, 2, 0, 54, 1, 2, 0, 55, 1, 2, 0, 56, 1, 2, 0, 57, 1,
+ 2, 0, 58, 1, 2, 0, 18, 0, 2, 0, 16, 0, 2, 0,246, 0, 7, 0, 59, 1, 7, 0, 60, 1, 7, 0, 61, 1, 7, 0, 62, 1,
+ 4, 0, 63, 1, 4, 0, 64, 1, 2, 0, 65, 1, 2, 0, 66, 1, 2, 0, 22, 1, 2, 0,130, 0, 4, 0, 22, 0, 4, 0,127, 0,
+ 4, 0,128, 0, 4, 0,129, 0, 7, 0, 67, 1, 7, 0, 68, 1, 7, 0, 67, 0, 40, 0, 69, 1, 57, 0, 70, 1, 31, 0, 80, 0,
+ 42, 0,242, 0, 48, 0, 71, 1, 50, 0, 17, 1, 51, 0, 72, 1, 25, 0,154, 0, 53, 0, 73, 1, 55, 0, 74, 1, 56, 0, 75, 1,
+ 0, 0, 76, 1, 0, 0,124, 0, 58, 0, 13, 0, 7, 0, 77, 1, 7, 0, 78, 1, 7, 0,176, 0, 4, 0, 18, 0, 0, 0,171, 0,
+ 0, 0,172, 0, 0, 0,173, 0, 0, 0,174, 0, 4, 0, 27, 0, 7, 0, 79, 1, 7, 0, 80, 1, 7, 0, 81, 1, 27, 0, 44, 0,
+ 59, 0, 9, 0, 50, 0, 82, 1, 7, 0, 33, 1, 7, 0, 34, 1, 7, 0, 35, 1, 4, 0, 18, 0, 7, 0, 83, 1, 7, 0, 84, 1,
+ 4, 0, 85, 1, 4, 0, 86, 1, 60, 0, 74, 0, 22, 0, 32, 0, 34, 0, 75, 0, 2, 0, 16, 0, 2, 0, 18, 0, 4, 0, 87, 1,
+ 2, 0,179, 0, 2, 0, 88, 1, 7, 0,185, 0, 7, 0,186, 0, 7, 0,187, 0, 7, 0,188, 0, 7, 0, 89, 1, 7, 0, 90, 1,
+ 7, 0, 91, 1, 7, 0, 92, 1, 7, 0, 93, 1, 7, 0, 94, 1, 7, 0, 95, 1, 7, 0, 96, 1, 7, 0, 97, 1, 7, 0, 98, 1,
+ 7, 0, 99, 1, 54, 0,100, 1, 2, 0,253, 0, 2, 0, 30, 0, 7, 0,112, 0, 7, 0,113, 0, 7, 0,101, 1, 7, 0,102, 1,
+ 7, 0,103, 1, 7, 0,104, 1, 7, 0,105, 1, 2, 0,106, 1, 2, 0,107, 1, 2, 0,108, 1, 2, 0,109, 1, 0, 0,110, 1,
+ 0, 0,111, 1, 2, 0,112, 1, 2, 0,113, 1, 2, 0,114, 1, 2, 0,115, 1, 2, 0,116, 1, 7, 0,117, 1, 7, 0,118, 1,
+ 7, 0,119, 1, 7, 0,120, 1, 2, 0,121, 1, 2, 0, 67, 0, 2, 0,122, 1, 2, 0,123, 1, 2, 0,124, 1, 2, 0,125, 1,
+ 7, 0,126, 1, 7, 0,127, 1, 7, 0,128, 1, 7, 0,129, 1, 7, 0,130, 1, 7, 0,131, 1, 7, 0,132, 1, 7, 0,133, 1,
+ 7, 0,134, 1, 7, 0,135, 1, 7, 0,136, 1, 7, 0,137, 1, 2, 0,138, 1, 0, 0,139, 1, 31, 0, 80, 0, 46, 0,140, 1,
+ 2, 0,141, 1, 2, 0, 76, 1, 0, 0,142, 1, 25, 0,154, 0, 57, 0, 70, 1, 61, 0, 18, 0, 7, 0,143, 1, 7, 0,144, 1,
+ 7, 0,145, 1, 7, 0,146, 1, 7, 0,147, 1, 7, 0,148, 1, 7, 0,149, 1, 7, 0,150, 1, 7, 0,151, 1, 7, 0,152, 1,
+ 2, 0,153, 1, 2, 0,154, 1, 2, 0,155, 1, 2, 0,156, 1, 7, 0,157, 1, 7, 0,158, 1, 7, 0,159, 1, 7, 0,160, 1,
+ 62, 0, 4, 0, 4, 0, 18, 0, 4, 0,161, 1, 4, 0,162, 1, 4, 0, 67, 0, 63, 0,126, 0, 22, 0, 32, 0, 34, 0, 75, 0,
+ 2, 0,163, 1, 2, 0, 18, 0, 7, 0,185, 0, 7, 0,186, 0, 7, 0,187, 0, 7, 0,164, 1, 7, 0,165, 1, 7, 0,166, 1,
+ 7, 0,167, 1, 7, 0,168, 1, 7, 0,169, 1, 7, 0,170, 1, 7, 0,171, 1, 7, 0,172, 1, 7, 0,173, 1, 7, 0,174, 1,
+ 7, 0,175, 1, 7, 0,176, 1, 7, 0,177, 1, 7, 0,178, 1, 7, 0,179, 1, 7, 0,180, 1, 7, 0,181, 1, 7, 0,182, 1,
+ 7, 0,183, 1, 61, 0,184, 1, 62, 0,185, 1, 7, 0,186, 1, 7, 0,187, 1, 7, 0,188, 1, 7, 0,189, 1, 7, 0,190, 1,
+ 7, 0,191, 1, 7, 0,192, 1, 2, 0,193, 1, 2, 0,194, 1, 2, 0,195, 1, 0, 0,196, 1, 0, 0,197, 1, 7, 0,198, 1,
+ 7, 0,199, 1, 2, 0,200, 1, 2, 0,201, 1, 7, 0,202, 1, 7, 0,203, 1, 7, 0,204, 1, 7, 0,205, 1, 2, 0,206, 1,
+ 2, 0,207, 1, 4, 0, 87, 1, 4, 0,208, 1, 2, 0,209, 1, 2, 0,210, 1, 2, 0,211, 1, 2, 0,212, 1, 7, 0,213, 1,
+ 7, 0,214, 1, 7, 0,215, 1, 7, 0,216, 1, 7, 0,217, 1, 7, 0,218, 1, 7, 0,219, 1, 7, 0,220, 1, 7, 0,221, 1,
+ 7, 0,222, 1, 0, 0,223, 1, 7, 0,224, 1, 7, 0,225, 1, 7, 0,226, 1, 4, 0,227, 1, 0, 0,228, 1, 0, 0,122, 1,
+ 0, 0,229, 1, 0, 0, 76, 1, 2, 0,230, 1, 2, 0,231, 1, 2, 0,141, 1, 2, 0,232, 1, 2, 0,233, 1, 2, 0,234, 1,
+ 7, 0,235, 1, 7, 0,236, 1, 7, 0,237, 1, 7, 0,238, 1, 7, 0,239, 1, 2, 0,164, 0, 2, 0,165, 0, 50, 0,240, 1,
+ 50, 0,241, 1, 0, 0,242, 1, 0, 0,243, 1, 0, 0,244, 1, 0, 0,245, 1, 2, 0,246, 1, 2, 0,247, 1, 7, 0,248, 1,
+ 7, 0,249, 1, 46, 0,140, 1, 57, 0, 70, 1, 31, 0, 80, 0, 64, 0,250, 1, 25, 0,154, 0, 7, 0,251, 1, 7, 0,252, 1,
+ 7, 0,253, 1, 7, 0,254, 1, 7, 0,255, 1, 2, 0, 0, 2, 2, 0, 30, 0, 7, 0, 1, 2, 7, 0, 2, 2, 7, 0, 3, 2,
+ 7, 0, 4, 2, 7, 0, 5, 2, 7, 0, 6, 2, 7, 0, 7, 2, 7, 0, 8, 2, 7, 0, 9, 2, 2, 0, 10, 2, 2, 0, 11, 2,
+ 4, 0, 12, 2, 2, 0, 13, 2, 2, 0, 14, 2, 14, 0, 15, 2, 65, 0, 4, 0, 22, 0, 32, 0, 0, 0, 35, 0, 66, 0, 2, 0,
+ 38, 0,153, 0, 67, 0, 20, 0, 67, 0, 0, 0, 67, 0, 1, 0, 68, 0, 16, 2, 2, 0, 16, 0, 2, 0, 18, 0, 2, 0, 17, 2,
+ 2, 0, 18, 2, 7, 0, 5, 0, 7, 0, 6, 0, 7, 0, 7, 0, 7, 0, 19, 2, 7, 0, 20, 2, 7, 0, 21, 2, 7, 0, 22, 2,
+ 7, 0, 23, 2, 7, 0, 24, 2, 7, 0, 25, 2, 7, 0, 22, 0, 7, 0, 26, 2, 7, 0, 27, 2, 69, 0, 20, 0, 22, 0, 32, 0,
+ 34, 0, 75, 0, 68, 0, 16, 2, 14, 0, 28, 2, 14, 0, 29, 2, 14, 0, 30, 2, 31, 0, 80, 0, 63, 0, 31, 2, 0, 0, 18, 0,
+ 0, 0, 32, 2, 2, 0, 33, 2, 2, 0,178, 0, 2, 0, 27, 0, 7, 0, 77, 1, 7, 0,176, 0, 7, 0, 78, 1, 7, 0, 34, 2,
+ 7, 0, 35, 2, 7, 0, 36, 2, 67, 0, 37, 2, 30, 0, 11, 0, 7, 0, 38, 2, 7, 0, 39, 2, 7, 0, 40, 2, 7, 0,255, 0,
+ 2, 0, 54, 0, 0, 0, 41, 2, 0, 0, 42, 2, 0, 0, 43, 2, 0, 0, 44, 2, 0, 0, 45, 2, 0, 0, 46, 2, 29, 0, 7, 0,
+ 7, 0, 47, 2, 7, 0, 39, 2, 7, 0, 40, 2, 2, 0, 43, 2, 2, 0, 46, 2, 7, 0,255, 0, 7, 0, 27, 0, 70, 0, 21, 0,
+ 70, 0, 0, 0, 70, 0, 1, 0, 2, 0, 16, 0, 2, 0, 48, 2, 2, 0, 46, 2, 2, 0, 18, 0, 2, 0, 49, 2, 2, 0, 50, 2,
+ 2, 0, 51, 2, 2, 0, 52, 2, 2, 0, 53, 2, 2, 0, 54, 2, 2, 0, 55, 2, 2, 0, 56, 2, 7, 0, 57, 2, 7, 0, 58, 2,
+ 29, 0, 48, 0, 30, 0, 49, 0, 2, 0, 59, 2, 2, 0, 60, 2, 4, 0, 61, 2, 71, 0, 5, 0, 2, 0, 62, 2, 2, 0, 48, 2,
+ 0, 0, 18, 0, 0, 0, 27, 0, 2, 0, 30, 0, 72, 0, 4, 0, 7, 0, 5, 0, 7, 0, 6, 0, 7, 0, 63, 2, 7, 0, 64, 2,
+ 73, 0, 4, 0, 14, 0, 65, 2, 74, 0, 66, 2, 4, 0, 67, 2, 0, 0, 94, 0, 75, 0, 68, 0, 22, 0, 32, 0, 34, 0, 75, 0,
+ 68, 0, 16, 2, 14, 0, 68, 2, 14, 0, 29, 2, 73, 0, 69, 2, 27, 0, 70, 2, 27, 0, 71, 2, 27, 0, 72, 2, 31, 0, 80, 0,
+ 76, 0, 73, 2, 33, 0, 74, 2, 63, 0, 31, 2, 14, 0, 75, 2, 7, 0, 77, 1, 7, 0,176, 0, 7, 0, 78, 1, 2, 0, 16, 0,
+ 2, 0,178, 0, 2, 0, 76, 2, 2, 0, 77, 2, 7, 0, 78, 2, 7, 0, 79, 2, 4, 0, 80, 2, 2, 0, 27, 0, 2, 0, 33, 2,
+ 2, 0, 18, 0, 2, 0, 81, 2, 7, 0, 82, 2, 7, 0, 83, 2, 7, 0, 84, 2, 2, 0, 51, 2, 2, 0, 52, 2, 2, 0, 85, 2,
+ 2, 0, 86, 2, 4, 0, 87, 2, 11, 0, 88, 2, 2, 0, 22, 0, 2, 0, 97, 0, 2, 0, 66, 0, 2, 0, 89, 2, 7, 0, 90, 2,
+ 7, 0, 91, 2, 7, 0, 92, 2, 7, 0, 93, 2, 7, 0, 94, 2, 7, 0, 95, 2, 7, 0, 96, 2, 7, 0, 97, 2, 7, 0, 98, 2,
+ 7, 0, 99, 2, 0, 0,100, 2, 77, 0,101, 2, 78, 0,102, 2, 0, 0,103, 2, 65, 0,104, 2, 65, 0,105, 2, 65, 0,106, 2,
+ 65, 0,107, 2, 4, 0,108, 2, 7, 0, 84, 0, 4, 0,109, 2, 4, 0,110, 2, 72, 0,111, 2, 4, 0,112, 2, 4, 0,113, 2,
+ 71, 0,114, 2, 71, 0,115, 2, 79, 0, 47, 0, 22, 0, 32, 0, 34, 0, 75, 0, 68, 0, 16, 2, 31, 0, 80, 0, 33, 0, 74, 2,
+ 63, 0, 31, 2, 80, 0,116, 2, 81, 0,117, 2, 82, 0,118, 2, 83, 0,119, 2, 84, 0,120, 2, 85, 0,121, 2, 86, 0,122, 2,
+ 87, 0,123, 2, 88, 0,124, 2, 89, 0,125, 2, 90, 0,126, 2, 91, 0,127, 2, 92, 0,128, 2, 93, 0,129, 2, 79, 0,130, 2,
+ 94, 0,131, 2, 95, 0,132, 2, 95, 0,133, 2, 95, 0,134, 2, 95, 0,135, 2, 95, 0,136, 2, 4, 0, 53, 0, 4, 0,137, 2,
+ 4, 0,138, 2, 4, 0,139, 2, 4, 0,140, 2, 4, 0,141, 2, 4, 0,142, 2, 7, 0, 77, 1, 7, 0,176, 0, 7, 0, 78, 1,
+ 2, 0,178, 0, 2, 0, 76, 2, 2, 0,143, 2, 2, 0, 18, 0, 2, 0,144, 2, 2, 0,145, 2, 0, 0,146, 2, 0, 0,147, 2,
+ 2, 0, 33, 2, 96, 0,148, 2, 88, 0, 8, 0, 11, 0,149, 2, 7, 0,150, 2, 4, 0,151, 2, 0, 0, 18, 0, 0, 0,152, 2,
+ 2, 0, 87, 1, 2, 0,153, 2, 2, 0,154, 2, 86, 0, 7, 0, 4, 0,155, 2, 4, 0,156, 2, 4, 0,157, 2, 4, 0,158, 2,
+ 2, 0, 48, 2, 0, 0,159, 2, 0, 0, 18, 0, 90, 0, 5, 0, 4, 0,155, 2, 4, 0,156, 2, 0, 0,160, 2, 0, 0,161, 2,
+ 2, 0, 18, 0, 97, 0, 2, 0, 4, 0,162, 2, 7, 0, 40, 2, 91, 0, 3, 0, 97, 0,163, 2, 4, 0,164, 2, 4, 0, 18, 0,
+ 89, 0, 4, 0, 7, 0,165, 2, 2, 0,166, 2, 0, 0, 18, 0, 0, 0,161, 2, 92, 0, 4, 0, 0, 0,240, 0, 0, 0,185, 0,
+ 0, 0,186, 0, 0, 0,187, 0, 81, 0, 5, 0, 4, 0,167, 2, 4, 0,141, 2, 2, 0, 48, 2, 0, 0, 18, 0, 0, 0, 27, 0,
+ 83, 0, 2, 0, 4, 0,168, 2, 4, 0,169, 2, 82, 0, 6, 0, 42, 0,149, 2, 0, 0, 18, 0, 0, 0,152, 2, 2, 0, 87, 1,
+ 2, 0,153, 2, 2, 0,154, 2, 84, 0, 2, 0, 7, 0,170, 2, 4, 0, 18, 0, 85, 0, 4, 0, 0, 0,185, 0, 0, 0,186, 0,
+ 0, 0,187, 0, 0, 0,240, 0, 93, 0, 1, 0, 7, 0,171, 2, 80, 0, 2, 0, 4, 0, 14, 2, 4, 0, 16, 0, 87, 0, 7, 0,
+ 7, 0,150, 2, 42, 0,149, 2, 0, 0, 18, 0, 0, 0,152, 2, 2, 0, 87, 1, 2, 0,153, 2, 2, 0,154, 2, 98, 0, 1, 0,
+ 7, 0,172, 2, 99, 0, 1, 0, 4, 0,173, 2,100, 0, 1, 0, 0, 0,174, 2,101, 0, 1, 0, 7, 0,150, 2,102, 0, 1, 0,
+ 7, 0,170, 2,103, 0, 4, 0, 4, 0,175, 2, 4, 0,176, 2, 7, 0,177, 2, 4, 0,178, 2,104, 0, 4, 0, 7, 0,240, 0,
+ 7, 0,185, 0, 7, 0,186, 0, 7, 0,187, 0,105, 0, 1, 0,104, 0,151, 2,106, 0, 5, 0, 4, 0,179, 2, 4, 0,180, 2,
+ 0, 0, 18, 0, 0, 0, 48, 2, 0, 0,181, 2,107, 0, 2, 0, 4, 0,182, 2, 4, 0,180, 2,108, 0, 10, 0,108, 0, 0, 0,
+108, 0, 1, 0,106, 0,183, 2,105, 0,184, 2,107, 0,185, 2, 4, 0, 53, 0, 4, 0,138, 2, 4, 0,137, 2, 4, 0, 27, 0,
+ 89, 0,186, 2, 96, 0, 14, 0, 14, 0,187, 2, 89, 0,186, 2, 0, 0,188, 2, 0, 0,189, 2, 0, 0,190, 2, 0, 0,191, 2,
+ 0, 0,192, 2, 0, 0,193, 2, 0, 0,194, 2, 0, 0, 18, 0, 95, 0,132, 2, 95, 0,134, 2, 2, 0,195, 2, 0, 0,196, 2,
+109, 0, 1, 0, 4, 0,173, 2,110, 0, 9, 0,110, 0, 0, 0,110, 0, 1, 0, 4, 0, 16, 0, 4, 0, 87, 1, 4, 0,197, 2,
+ 4, 0, 27, 0, 0, 0, 19, 0, 41, 0,125, 0, 0, 0,198, 2,111, 0, 6, 0,110, 0,199, 2, 47, 0,200, 2, 27, 0,201, 2,
+ 0, 0,202, 2, 4, 0,203, 2, 4, 0,204, 2,112, 0, 7, 0,110, 0,199, 2, 2, 0,205, 2, 2, 0,187, 2, 2, 0,206, 2,
+ 2, 0, 92, 0, 11, 0,207, 2, 11, 0,208, 2,113, 0, 5, 0,110, 0,199, 2, 27, 0,168, 0, 0, 0, 19, 0, 7, 0,209, 2,
+ 0, 0, 94, 0,114, 0, 5, 0,110, 0,199, 2, 27, 0,168, 0, 0, 0, 19, 0, 2, 0,210, 2, 0, 0,211, 2,115, 0, 5, 0,
+110, 0,199, 2, 7, 0, 90, 0, 7, 0,212, 2, 4, 0,213, 2, 4, 0,214, 2,116, 0, 5, 0,110, 0,199, 2, 27, 0,215, 2,
+ 0, 0, 72, 0, 4, 0, 87, 1, 4, 0, 18, 0,117, 0, 13, 0,110, 0,199, 2, 27, 0,216, 2, 27, 0,217, 2, 27, 0,218, 2,
+ 27, 0,219, 2, 7, 0,220, 2, 7, 0,221, 2, 7, 0,212, 2, 7, 0,222, 2, 4, 0,223, 2, 4, 0,224, 2, 4, 0, 92, 0,
+ 4, 0,225, 2,118, 0, 5, 0,110, 0,199, 2, 2, 0,226, 2, 2, 0, 18, 0, 7, 0,227, 2, 27, 0,228, 2,119, 0, 3, 0,
+110, 0,199, 2, 7, 0,229, 2, 4, 0, 92, 0,120, 0, 10, 0,110, 0,199, 2, 7, 0,230, 2, 4, 0,231, 2, 4, 0, 27, 0,
+ 2, 0, 92, 0, 2, 0,232, 2, 2, 0,233, 2, 2, 0,234, 2, 7, 0,235, 2, 0, 0,236, 2,121, 0, 3, 0,110, 0,199, 2,
+ 7, 0, 27, 0, 4, 0, 16, 0,122, 0, 6, 0,110, 0,199, 2,123, 0,237, 2,124, 0,238, 2,125, 0,239, 2, 7, 0,240, 2,
+ 4, 0, 16, 0,126, 0, 11, 0,110, 0,199, 2, 47, 0,200, 2, 27, 0,201, 2, 0, 0,202, 2, 4, 0,203, 2, 4, 0,204, 2,
+ 7, 0,209, 2, 4, 0,241, 2, 0, 0,236, 2, 7, 0,242, 2, 4, 0, 27, 0,127, 0, 12, 0,110, 0,199, 2, 27, 0,243, 2,
+ 42, 0,244, 2, 4, 0, 92, 0, 4, 0,245, 2, 7, 0,246, 2, 7, 0,247, 2, 7, 0,248, 2, 7, 0,249, 2, 0, 0,202, 2,
+ 4, 0,203, 2, 4, 0, 27, 0,128, 0, 3, 0,110, 0,199, 2, 7, 0,250, 2, 4, 0,251, 2,129, 0, 5, 0,110, 0,199, 2,
+ 7, 0,252, 2, 0, 0,236, 2, 2, 0, 18, 0, 2, 0,253, 2,130, 0, 8, 0,110, 0,199, 2, 27, 0,168, 0, 7, 0,252, 2,
+ 7, 0,255, 0, 7, 0,108, 0, 0, 0,236, 2, 2, 0, 18, 0, 2, 0, 16, 0,131, 0, 21, 0,110, 0,199, 2, 47, 0,200, 2,
+ 27, 0,201, 2, 0, 0,202, 2, 4, 0,203, 2, 4, 0,204, 2, 27, 0,254, 2, 0, 0,236, 2, 2, 0, 18, 0, 2, 0, 27, 0,
+ 7, 0,255, 2, 7, 0, 0, 3, 7, 0, 1, 3, 7, 0, 82, 2, 7, 0, 2, 3, 7, 0, 3, 3, 7, 0, 4, 3, 7, 0, 5, 3,
+ 7, 0, 6, 3, 7, 0, 7, 3, 7, 0, 67, 0,132, 0, 7, 0,110, 0,199, 2, 2, 0, 8, 3, 2, 0, 9, 3, 4, 0, 30, 0,
+ 27, 0,168, 0, 7, 0, 10, 3, 0, 0,236, 2,133, 0, 10, 0,110, 0,199, 2, 27, 0,168, 0, 0, 0, 11, 3, 7, 0, 12, 3,
+ 7, 0, 13, 3, 7, 0, 5, 3, 4, 0, 14, 3, 4, 0, 15, 3, 7, 0, 16, 3, 0, 0, 19, 0,134, 0, 1, 0,110, 0,199, 2,
+135, 0, 7, 0,110, 0,199, 2, 41, 0,125, 0,136, 0, 17, 3,137, 0, 18, 3,138, 0, 19, 3,139, 0, 20, 3, 14, 0, 21, 3,
+140, 0, 13, 0,110, 0,199, 2, 89, 0, 22, 3, 89, 0, 23, 3, 89, 0, 24, 3, 89, 0, 25, 3, 89, 0, 26, 3, 89, 0, 27, 3,
+ 86, 0, 28, 3, 4, 0, 29, 3, 4, 0, 30, 3, 7, 0, 31, 3, 7, 0, 32, 3,141, 0, 33, 3,142, 0, 7, 0,110, 0,199, 2,
+ 89, 0, 22, 3, 89, 0, 34, 3,143, 0, 35, 3,144, 0, 33, 3, 4, 0, 36, 3, 4, 0, 29, 3,145, 0, 4, 0,110, 0,199, 2,
+ 27, 0,168, 0, 4, 0, 37, 3, 4, 0, 27, 0,146, 0, 2, 0, 4, 0, 38, 3, 7, 0, 40, 2,147, 0, 2, 0, 4, 0,128, 0,
+ 4, 0, 39, 3,148, 0, 24, 0,110, 0,199, 2, 27, 0,168, 0, 0, 0,236, 2, 2, 0, 40, 3, 2, 0, 18, 0, 2, 0, 87, 1,
+ 2, 0, 27, 0,146, 0, 41, 3, 4, 0, 42, 3, 7, 0, 43, 3, 4, 0, 53, 0, 4, 0, 44, 3,147, 0, 45, 3,146, 0, 46, 3,
+ 4, 0, 47, 3, 4, 0, 48, 3, 4, 0, 49, 3, 4, 0, 39, 3, 7, 0, 50, 3, 7, 0, 51, 3, 7, 0, 52, 3, 7, 0, 53, 3,
+ 7, 0, 54, 3, 11, 0, 55, 3,149, 0, 8, 0,110, 0,199, 2,150, 0, 56, 3,143, 0, 35, 3, 4, 0, 57, 3, 4, 0, 58, 3,
+ 4, 0, 59, 3, 2, 0, 18, 0, 2, 0, 56, 0,151, 0, 8, 0,110, 0,199, 2, 27, 0, 44, 0, 2, 0, 3, 1, 2, 0, 18, 0,
+ 2, 0,226, 2, 2, 0, 56, 0, 7, 0, 60, 3, 7, 0, 61, 3,152, 0, 6, 0,110, 0,199, 2, 4, 0, 62, 3, 2, 0, 18, 0,
+ 2, 0, 63, 3, 7, 0, 64, 3, 0, 0,170, 0,153, 0, 8, 0,110, 0,199, 2, 0, 0, 65, 3, 0, 0, 66, 3, 0, 0,193, 2,
+ 0, 0, 67, 3, 0, 0, 68, 3, 0, 0, 92, 0, 0, 0,181, 2,154, 0, 3, 0,110, 0,199, 2,155, 0, 69, 3,139, 0, 20, 3,
+156, 0, 10, 0,110, 0,199, 2, 27, 0, 70, 3, 27, 0, 71, 3, 0, 0, 72, 3, 7, 0, 73, 3, 2, 0, 74, 3, 2, 0, 75, 3,
+ 0, 0, 76, 3, 0, 0, 77, 3, 0, 0,211, 2,157, 0, 9, 0,110, 0,199, 2, 27, 0, 78, 3, 0, 0, 72, 3, 7, 0, 79, 3,
+ 7, 0, 80, 3, 0, 0, 87, 1, 0, 0,226, 2, 0, 0, 81, 3, 0, 0, 27, 0,158, 0, 1, 0,110, 0,199, 2,159, 0, 11, 0,
+110, 0,199, 2, 0, 0,236, 2, 7, 0,128, 0, 7, 0, 82, 3, 7, 0, 83, 3, 7, 0, 84, 3, 7, 0, 85, 3, 7, 0, 86, 3,
+ 4, 0, 18, 0, 2, 0, 87, 3, 2, 0, 88, 3,160, 0, 9, 0,110, 0,199, 2, 27, 0, 89, 3, 4, 0, 90, 3, 4, 0, 91, 3,
+ 4, 0, 92, 3, 7, 0, 93, 3, 7, 0, 94, 3, 2, 0,226, 2, 2, 0, 18, 0,161, 0, 29, 0,110, 0,199, 2,162, 0, 95, 3,
+163, 0, 96, 3, 4, 0, 97, 3, 4, 0, 98, 3, 7, 0, 99, 3, 7, 0, 4, 3, 7, 0,100, 3, 7, 0,250, 0, 7, 0,101, 3,
+ 7, 0,102, 3, 7, 0,103, 3, 7, 0,104, 3, 7, 0,105, 3, 7, 0,240, 2, 4, 0,106, 3, 4, 0,107, 3, 0, 0,108, 3,
+ 0, 0,109, 3, 0, 0,110, 3, 0, 0,111, 3, 0, 0, 18, 0, 0, 0,112, 3, 2, 0,113, 3, 2, 0,114, 3, 4, 0,214, 2,
+ 7, 0,108, 0, 7, 0,115, 3, 4, 0, 27, 0,164, 0, 15, 0,110, 0,199, 2, 47, 0,200, 2, 27, 0,201, 2, 0, 0,202, 2,
+ 4, 0,203, 2, 4, 0,204, 2, 27, 0,116, 3, 27, 0,117, 3, 54, 0,100, 1, 0, 0,236, 2, 7, 0,209, 2, 7, 0,118, 3,
+ 0, 0, 18, 0, 0, 0,253, 0, 0, 0,211, 2,165, 0, 16, 0,110, 0,199, 2, 0, 0,236, 2, 2, 0,119, 3, 2, 0,253, 0,
+ 7, 0,120, 3, 54, 0,121, 3, 7, 0,122, 3, 7, 0,123, 3, 7, 0,124, 3, 0, 0,125, 3, 4, 0,126, 3, 47, 0,127, 3,
+ 27, 0,128, 3, 4, 0,129, 3, 0, 0,130, 3, 4, 0,131, 3,166, 0, 16, 0,110, 0,199, 2, 0, 0,132, 3, 0, 0,133, 3,
+ 7, 0,134, 3, 7, 0,135, 3, 0, 0,136, 3, 0, 0,137, 3, 0, 0,138, 3, 7, 0,124, 3, 0, 0,125, 3, 4, 0,126, 3,
+ 47, 0,127, 3, 27, 0,128, 3, 4, 0,129, 3, 0, 0,130, 3, 4, 0,131, 3,167, 0, 16, 0,110, 0,199, 2, 0, 0,236, 2,
+ 4, 0,139, 3, 4, 0,140, 3, 27, 0,141, 3, 7, 0,124, 3, 0, 0,125, 3, 4, 0,126, 3, 47, 0,127, 3, 27, 0,128, 3,
+ 4, 0,129, 3, 0, 0,130, 3, 7, 0,142, 3, 7, 0,143, 3, 2, 0,253, 0, 2, 0,144, 3,168, 0, 5, 0,110, 0,199, 2,
+169, 0,145, 3,170, 0,146, 3, 4, 0, 16, 0, 4, 0, 27, 0,171, 0, 8, 0,110, 0,199, 2, 7, 0,147, 3, 7, 0,148, 3,
+ 7, 0,149, 3, 0, 0,250, 0, 0, 0, 18, 0, 0, 0, 87, 1, 0, 0, 27, 0,172, 0, 3, 0,173, 0,150, 3, 4, 0, 67, 2,
+ 0, 0, 94, 0,173, 0, 29, 0, 22, 0, 32, 0, 34, 0, 75, 0, 2, 0, 49, 2, 2, 0, 50, 2, 2, 0,151, 3, 2, 0, 18, 0,
+ 2, 0,152, 3, 2, 0,153, 3, 2, 0,154, 3, 2, 0, 30, 0, 0, 0,155, 3, 0, 0,156, 3, 0, 0,157, 3, 0, 0,247, 1,
+ 4, 0, 27, 0, 7, 0,158, 3, 7, 0,159, 3, 7, 0,160, 3, 7, 0,161, 3, 7, 0,162, 3, 7, 0,163, 3, 29, 0,164, 3,
+ 31, 0, 80, 0, 33, 0, 74, 2, 91, 0,127, 2, 0, 0, 72, 0, 7, 0,165, 3, 7, 0,166, 3,172, 0,167, 3,174, 0, 5, 0,
+174, 0, 0, 0,174, 0, 1, 0, 0, 0, 19, 0, 0, 0, 18, 0, 0, 0,124, 0, 68, 0, 3, 0, 7, 0,168, 3, 4, 0, 18, 0,
+ 4, 0, 27, 0, 27, 0,128, 0, 22, 0, 32, 0, 34, 0, 75, 0,175, 0,169, 3, 2, 0, 16, 0, 2, 0,170, 3, 4, 0,171, 3,
+ 4, 0,172, 3, 4, 0,173, 3, 0, 0,174, 3, 27, 0, 38, 0, 27, 0,175, 3, 27, 0,176, 3, 27, 0,177, 3, 27, 0,178, 3,
+ 31, 0, 80, 0, 68, 0, 16, 2,176, 0,179, 3,176, 0,180, 3,177, 0,181, 3, 11, 0, 2, 0,178, 0,182, 3,179, 0,183, 3,
+180, 0,184, 3, 14, 0,185, 3, 14, 0,186, 3, 14, 0, 29, 2, 14, 0,187, 3, 14, 0,188, 3, 4, 0, 87, 1, 4, 0,189, 3,
+ 63, 0, 31, 2, 0, 0,190, 3, 4, 0, 33, 2, 4, 0,191, 3, 7, 0, 77, 1, 7, 0,192, 3, 7, 0,193, 3, 7, 0,176, 0,
+ 7, 0,194, 3, 7, 0,195, 3, 7, 0, 78, 1, 7, 0,196, 3, 7, 0, 19, 2, 7, 0,197, 3, 7, 0,198, 3, 7, 0,199, 3,
+ 7, 0,200, 3, 7, 0,201, 3, 7, 0,202, 3, 7, 0, 12, 3, 7, 0,203, 3, 7, 0,244, 0, 7, 0,204, 3, 4, 0,205, 3,
+ 4, 0,206, 3, 2, 0, 18, 0, 2, 0,207, 3, 2, 0,208, 3, 2, 0,209, 3, 2, 0,210, 3, 2, 0,211, 3, 2, 0,212, 3,
+ 2, 0,213, 3, 2, 0,214, 3, 0, 0,215, 3, 0, 0,216, 3, 4, 0,217, 3, 4, 0,218, 3, 4, 0,219, 3, 4, 0,220, 3,
+ 7, 0,221, 3, 7, 0, 84, 0, 7, 0,222, 3, 7, 0,223, 3, 7, 0,224, 3, 7, 0,225, 3, 7, 0,226, 3, 7, 0,220, 0,
+ 7, 0,227, 3, 7, 0,228, 3, 7, 0,229, 3, 7, 0,230, 3, 7, 0,231, 3, 2, 0,232, 3, 0, 0,233, 3, 0, 0,234, 3,
+ 0, 0,235, 3, 0, 0,236, 3, 0, 0,110, 0, 0, 0,237, 3, 7, 0,238, 3, 7, 0,239, 3, 14, 0,240, 3, 14, 0,241, 3,
+ 14, 0,242, 3, 14, 0,243, 3, 7, 0,244, 3, 2, 0, 14, 2, 2, 0,245, 3, 7, 0,151, 2, 4, 0,246, 3, 4, 0,247, 3,
+181, 0,248, 3, 2, 0,249, 3, 2, 0,251, 0, 7, 0,250, 3, 14, 0,251, 3, 14, 0,252, 3, 14, 0,253, 3, 14, 0,254, 3,
+182, 0, 73, 1,183, 0,255, 3, 64, 0, 0, 4, 0, 0, 1, 4, 0, 0, 2, 4, 2, 0, 67, 2, 7, 0,143, 2,155, 0, 3, 4,
+143, 0, 4, 4,143, 0, 5, 4, 10, 0, 6, 4, 10, 0, 7, 4, 4, 0, 8, 4, 4, 0, 9, 4, 14, 0, 10, 4, 14, 0, 11, 4,
+ 14, 0, 12, 4, 7, 0, 13, 4,184, 0, 14, 0,184, 0, 0, 0,184, 0, 1, 0, 27, 0, 38, 0, 7, 0, 12, 3, 7, 0, 79, 1,
+ 7, 0, 13, 3, 7, 0, 5, 3, 0, 0, 19, 0, 4, 0, 14, 3, 4, 0, 15, 3, 4, 0, 14, 4, 2, 0, 16, 0, 2, 0, 15, 4,
+ 7, 0, 16, 3,185, 0, 12, 0,185, 0, 0, 0,185, 0, 1, 0, 27, 0, 44, 0, 4, 0, 16, 4, 4, 0, 14, 2, 7, 0, 79, 1,
+ 7, 0, 17, 4, 7, 0, 18, 4, 7, 0,170, 2, 2, 0, 16, 0, 0, 0, 19, 4, 0, 0, 20, 4,182, 0, 40, 0, 4, 0, 18, 0,
+ 2, 0, 21, 4, 2, 0, 22, 4, 2, 0, 5, 3, 2, 0, 23, 4, 2, 0, 24, 4, 2, 0, 25, 4, 2, 0, 26, 4, 2, 0, 27, 4,
+ 7, 0, 28, 4, 7, 0, 29, 4, 7, 0, 30, 4, 7, 0, 31, 4, 7, 0, 32, 4, 7, 0, 33, 4, 7, 0, 34, 4, 7, 0, 35, 4,
+ 7, 0, 36, 4, 7, 0, 37, 4, 7, 0, 38, 4, 7, 0, 39, 4, 7, 0, 40, 4, 7, 0, 41, 4, 7, 0, 42, 4, 7, 0, 43, 4,
+ 7, 0, 44, 4, 7, 0, 45, 4, 7, 0, 46, 4, 7, 0, 47, 4, 7, 0, 48, 4, 7, 0, 49, 4, 7, 0, 50, 4, 7, 0, 51, 4,
+ 7, 0, 52, 4, 7, 0, 53, 4, 7, 0, 54, 4, 47, 0,169, 0,186, 0, 55, 4, 7, 0, 56, 4, 4, 0,214, 2,187, 0, 5, 0,
+ 64, 0,250, 1, 7, 0, 57, 4, 7, 0, 58, 4, 2, 0, 18, 0, 2, 0, 59, 4,188, 0, 5, 0,188, 0, 0, 0,188, 0, 1, 0,
+ 4, 0, 16, 0, 4, 0, 60, 4, 11, 0, 2, 0,189, 0, 9, 0,189, 0, 0, 0,189, 0, 1, 0, 4, 0, 61, 4, 4, 0, 62, 4,
+ 4, 0, 63, 4, 4, 0, 18, 0, 11, 0, 64, 4, 11, 0, 65, 4, 14, 0, 66, 4,139, 0, 23, 0,139, 0, 0, 0,139, 0, 1, 0,
+ 4, 0, 18, 0, 4, 0, 67, 4, 4, 0, 68, 4, 4, 0, 69, 4, 4, 0, 70, 4, 4, 0, 71, 4, 4, 0, 72, 4, 4, 0, 73, 4,
+ 4, 0, 27, 0, 4, 0, 62, 4, 4, 0, 14, 2, 2, 0, 74, 4, 2, 0, 56, 0, 0, 0, 19, 0, 0, 0, 75, 4, 0, 0, 76, 4,
+ 0, 0, 77, 4, 0, 0, 78, 4, 14, 0, 79, 4,190, 0, 80, 4, 11, 0, 81, 4,191, 0, 1, 0, 7, 0, 47, 2,181, 0, 30, 0,
+ 4, 0, 18, 0, 7, 0, 82, 4, 7, 0, 83, 4, 7, 0, 84, 4, 4, 0, 85, 4, 4, 0, 86, 4, 4, 0, 87, 4, 4, 0, 88, 4,
+ 7, 0, 89, 4, 7, 0, 90, 4, 7, 0, 91, 4, 7, 0, 92, 4, 7, 0, 93, 4, 7, 0, 94, 4, 7, 0, 95, 4, 7, 0, 96, 4,
+ 7, 0, 97, 4, 7, 0, 98, 4, 7, 0, 99, 4, 7, 0,100, 4, 7, 0,101, 4, 7, 0,102, 4, 7, 0,103, 4, 7, 0,104, 4,
+ 7, 0,105, 4, 7, 0,106, 4, 4, 0,107, 4, 4, 0,108, 4, 7, 0,109, 4, 7, 0,227, 3,183, 0, 54, 0, 4, 0, 62, 4,
+ 4, 0,110, 4,192, 0,111, 4,193, 0,112, 4, 0, 0, 27, 0, 0, 0,113, 4, 2, 0,114, 4, 7, 0,115, 4, 0, 0,116, 4,
+ 7, 0,117, 4, 7, 0,118, 4, 7, 0,119, 4, 7, 0,120, 4, 7, 0,121, 4, 7, 0,122, 4, 7, 0,123, 4, 7, 0,124, 4,
+ 7, 0,125, 4, 2, 0,126, 4, 0, 0,127, 4, 2, 0,128, 4, 7, 0,129, 4, 7, 0,130, 4, 0, 0,131, 4, 4, 0,129, 0,
+ 4, 0,132, 4, 4, 0,133, 4, 2, 0,134, 4, 2, 0,135, 4,191, 0,136, 4, 4, 0,137, 4, 4, 0, 82, 0, 7, 0,138, 4,
+ 7, 0,139, 4, 7, 0,140, 4, 7, 0,141, 4, 2, 0,142, 4, 2, 0,143, 4, 2, 0,144, 4, 2, 0,145, 4, 2, 0,146, 4,
+ 2, 0,147, 4, 2, 0,148, 4, 2, 0,149, 4,194, 0,150, 4, 7, 0,151, 4, 7, 0,152, 4,139, 0,153, 4, 14, 0, 21, 3,
+187, 0,154, 4, 7, 0,155, 4, 7, 0,156, 4, 7, 0,157, 4, 4, 0,158, 4,195, 0, 1, 0, 7, 0,159, 4,155, 0, 52, 0,
+154, 0,160, 4, 2, 0, 16, 0, 2, 0,161, 4, 2, 0,162, 4, 2, 0,163, 4, 7, 0,164, 4, 2, 0,165, 4, 2, 0,166, 4,
+ 7, 0,167, 4, 2, 0,168, 4, 2, 0,169, 4, 7, 0,170, 4, 7, 0,171, 4, 7, 0,172, 4, 4, 0,173, 4, 4, 0,174, 4,
+ 4, 0,175, 4, 4, 0, 27, 0, 7, 0,176, 4, 4, 0,177, 4, 7, 0,178, 4, 7, 0,179, 4, 7, 0,180, 4, 79, 0,181, 4,
+ 79, 0,182, 4, 0, 0,183, 4, 7, 0,184, 4, 7, 0,185, 4, 31, 0, 80, 0, 2, 0,186, 4, 0, 0,187, 4, 0, 0,188, 4,
+ 7, 0,189, 4, 4, 0,190, 4, 7, 0,191, 4, 7, 0,192, 4, 4, 0,193, 4, 4, 0, 18, 0, 7, 0,194, 4, 7, 0,195, 4,
+ 7, 0,196, 4,195, 0,197, 4, 4, 0, 53, 0, 7, 0,198, 4, 7, 0,199, 4, 7, 0,200, 4, 7, 0,201, 4, 7, 0,202, 4,
+ 7, 0,203, 4, 7, 0,204, 4, 4, 0,205, 4, 7, 0,206, 4,196, 0, 78, 0, 22, 0, 32, 0, 34, 0, 75, 0, 2, 0,179, 0,
+ 2, 0, 88, 1, 2, 0,122, 1, 2, 0,207, 4, 7, 0,208, 4, 7, 0,209, 4, 7, 0,210, 4, 7, 0,211, 4, 7, 0,212, 4,
+ 7, 0,213, 4, 7, 0,170, 1, 7, 0,172, 1, 7, 0,171, 1, 7, 0, 30, 0, 4, 0,214, 4, 7, 0,215, 4, 7, 0,216, 4,
+ 7, 0,217, 4, 7, 0,218, 4, 7, 0,219, 4, 7, 0,220, 4, 7, 0,221, 4, 2, 0,222, 4, 2, 0, 87, 1, 2, 0,223, 4,
+ 2, 0,224, 4, 2, 0,225, 4, 2, 0,226, 4, 2, 0,227, 4, 2, 0,228, 4, 7, 0,229, 4, 7, 0,230, 4, 7, 0,231, 4,
+ 7, 0,232, 4, 7, 0,233, 4, 7, 0,234, 4, 7, 0,235, 4, 7, 0,236, 4, 7, 0,237, 4, 7, 0,238, 4, 7, 0,239, 4,
+ 7, 0,240, 4, 2, 0,241, 4, 2, 0,242, 4, 2, 0,243, 4, 2, 0,244, 4, 7, 0,245, 4, 7, 0,246, 4, 7, 0,247, 4,
+ 7, 0,248, 4, 2, 0,249, 4, 2, 0,250, 4, 2, 0,251, 4, 2, 0,252, 4, 7, 0,253, 4, 7, 0,254, 4, 7, 0,255, 4,
+ 7, 0, 0, 5, 7, 0, 1, 5, 7, 0, 2, 5, 7, 0, 3, 5, 2, 0, 4, 5, 2, 0, 5, 5, 2, 0, 6, 5, 2, 0, 7, 5,
+ 2, 0, 8, 5, 2, 0, 18, 0, 7, 0, 9, 5, 7, 0, 10, 5, 31, 0, 80, 0, 46, 0,140, 1, 2, 0,141, 1, 2, 0, 76, 1,
+ 2, 0,181, 2, 25, 0,154, 0, 57, 0, 70, 1,197, 0, 8, 0,197, 0, 0, 0,197, 0, 1, 0, 4, 0,205, 3, 4, 0, 11, 5,
+ 4, 0, 18, 0, 2, 0, 12, 5, 2, 0, 13, 5, 27, 0,168, 0,198, 0, 13, 0, 11, 0, 14, 5, 11, 0, 15, 5, 4, 0, 16, 5,
+ 4, 0, 17, 5, 4, 0, 18, 5, 4, 0, 19, 5, 4, 0, 20, 5, 4, 0, 21, 5, 4, 0, 22, 5, 4, 0, 23, 5, 4, 0, 24, 5,
+ 4, 0, 27, 0, 0, 0, 25, 5,199, 0, 5, 0, 11, 0, 26, 5, 11, 0, 27, 5, 4, 0, 28, 5, 4, 0, 30, 0, 0, 0, 29, 5,
+200, 0, 17, 0, 4, 0, 30, 5, 4, 0, 31, 5, 4, 0, 32, 5, 4, 0, 33, 5, 4, 0, 34, 5, 4, 0, 35, 5, 4, 0, 36, 5,
+ 4, 0, 37, 5, 4, 0, 38, 5, 4, 0, 39, 5, 4, 0, 40, 5, 4, 0, 41, 5, 2, 0, 42, 5, 2, 0, 43, 5, 4, 0, 44, 5,
+ 4, 0, 45, 5, 4, 0, 67, 0,201, 0, 17, 0, 4, 0, 16, 0, 4, 0, 32, 5, 4, 0, 46, 5, 4, 0, 47, 5, 4, 0, 48, 5,
+ 4, 0, 49, 5, 4, 0, 50, 5, 4, 0, 51, 5, 7, 0, 52, 5, 4, 0, 53, 5, 4, 0, 92, 0, 4, 0, 54, 5, 4, 0, 55, 5,
+ 4, 0, 56, 5, 4, 0, 57, 5, 4, 0, 58, 5, 21, 0, 31, 0,202, 0, 9, 0, 4, 0, 59, 5, 7, 0, 60, 5, 7, 0, 61, 5,
+ 7, 0, 62, 5, 4, 0, 63, 5, 2, 0, 18, 0, 2, 0, 27, 0, 7, 0, 84, 4, 7, 0, 30, 0,203, 0, 13, 0,203, 0, 0, 0,
+203, 0, 1, 0, 0, 0, 19, 0, 63, 0, 64, 5, 64, 0, 65, 5, 4, 0,205, 3, 4, 0, 66, 5, 4, 0, 67, 5, 4, 0, 68, 5,
+ 4, 0, 69, 5, 4, 0, 70, 5, 4, 0, 71, 5, 4, 0, 27, 0,204, 0, 13, 0, 0, 0, 72, 5, 0, 0,250, 0, 0, 0, 73, 5,
+ 0, 0, 18, 0, 0, 0, 74, 5, 0, 0, 75, 5, 0, 0, 76, 5, 0, 0, 77, 5, 2, 0, 78, 5, 2, 0, 79, 5, 7, 0, 80, 5,
+ 0, 0, 81, 5, 0, 0,124, 0,205, 0,106, 0,204, 0, 82, 5,198, 0, 83, 5,199, 0, 84, 5,200, 0, 85, 5,201, 0, 86, 5,
+ 4, 0, 36, 3, 4, 0,129, 0, 4, 0,132, 4, 7, 0, 87, 5, 4, 0, 88, 5, 4, 0, 89, 5, 4, 0, 90, 5, 4, 0, 91, 5,
+ 2, 0, 18, 0, 2, 0, 92, 5, 7, 0, 93, 5, 7, 0, 94, 5, 7, 0, 95, 5, 7, 0, 96, 5, 7, 0, 97, 5, 2, 0, 98, 5,
+ 2, 0, 99, 5, 2, 0,100, 5, 2, 0,101, 5, 2, 0,250, 0, 2, 0,102, 5, 4, 0,103, 5, 2, 0,104, 5, 2, 0,105, 5,
+ 2, 0,109, 1, 2, 0,108, 0, 2, 0,106, 5, 2, 0,107, 5, 2, 0,108, 5, 2, 0,109, 5, 2, 0,110, 5, 2, 0, 73, 5,
+ 2, 0, 72, 5, 2, 0,111, 5, 2, 0, 74, 5, 2, 0,112, 5, 4, 0,113, 5, 4, 0, 87, 1, 4, 0,114, 5, 2, 0,115, 5,
+ 2, 0, 67, 0, 2, 0,116, 5, 2, 0,117, 5, 2, 0,118, 5, 2, 0,119, 5, 2, 0,120, 5, 2, 0,121, 5, 19, 0,122, 5,
+ 19, 0,123, 5, 18, 0,124, 5, 14, 0,125, 5, 2, 0,126, 5, 2, 0,127, 5, 7, 0,128, 5, 7, 0,129, 5, 7, 0,130, 5,
+ 7, 0,131, 5, 4, 0,132, 5, 7, 0,133, 5, 7, 0,134, 5, 7, 0,135, 5, 7, 0,136, 5, 2, 0,137, 5, 2, 0,138, 5,
+ 2, 0,139, 5, 2, 0,140, 5, 2, 0,141, 5, 2, 0,142, 5, 7, 0,143, 5, 7, 0,144, 5, 7, 0,145, 5, 0, 0,146, 5,
+ 4, 0,147, 5, 2, 0,148, 5, 2, 0,247, 1, 0, 0,149, 5, 7, 0,150, 5, 7, 0,151, 5, 0, 0,152, 5, 0, 0,153, 5,
+ 0, 0,154, 5, 0, 0,155, 5, 4, 0,156, 5, 2, 0,157, 5, 2, 0,158, 5, 7, 0,159, 5, 7, 0,160, 5, 2, 0,161, 5,
+ 2, 0,162, 5, 7, 0,163, 5, 2, 0,164, 5, 2, 0,165, 5, 4, 0,166, 5, 2, 0,167, 5, 2, 0,168, 5, 2, 0,169, 5,
+ 2, 0,170, 5, 7, 0,171, 5, 7, 0, 30, 0, 37, 0,172, 5, 0, 0,173, 5,206, 0, 9, 0,206, 0, 0, 0,206, 0, 1, 0,
+ 0, 0,174, 5, 2, 0,175, 5, 2, 0,176, 5, 2, 0,177, 5, 2, 0, 67, 0, 7, 0,178, 5, 7, 0, 30, 0,207, 0, 7, 0,
+ 2, 0,231, 2, 2, 0, 87, 1, 2, 0, 94, 3, 2, 0,179, 5, 7, 0,180, 5, 7, 0, 30, 0, 37, 0,181, 5,208, 0, 5, 0,
+ 7, 0,182, 5, 0, 0, 16, 0, 0, 0, 67, 0, 0, 0, 30, 0, 0, 0,247, 1,209, 0, 15, 0, 7, 0,183, 5, 7, 0,184, 5,
+ 7, 0,185, 5, 7, 0,186, 5, 7, 0,187, 5, 7, 0,188, 5, 7, 0,189, 5, 7, 0,190, 5, 7, 0,191, 5, 7, 0,192, 5,
+ 4, 0,193, 5, 7, 0,194, 5, 7, 0,195, 5, 2, 0, 67, 0, 2, 0, 30, 0,210, 0, 32, 0,208, 0,196, 5, 2, 0,197, 5,
+ 2, 0, 99, 5, 2, 0,100, 5, 2, 0,101, 5, 2, 0,250, 0, 2, 0,102, 5, 2, 0,198, 5, 2, 0,199, 5, 2, 0,200, 5,
+ 2, 0,201, 5,207, 0,202, 5, 2, 0,203, 5, 2, 0,104, 5, 7, 0,204, 5,209, 0,205, 5, 7, 0,220, 4, 7, 0,221, 4,
+ 4, 0, 18, 0, 2, 0, 87, 1, 2, 0,206, 5, 2, 0,223, 4, 2, 0,224, 4, 2, 0,207, 5, 2, 0, 27, 0, 2, 0,225, 4,
+ 2, 0,226, 4, 2, 0,227, 4, 2, 0,228, 4, 2, 0,208, 5, 2, 0, 67, 0, 7, 0,209, 5,211, 0, 6, 0,211, 0, 0, 0,
+211, 0, 1, 0, 4, 0, 61, 4, 0, 0, 19, 0, 4, 0, 18, 0, 27, 0,210, 5,212, 0, 4, 0,213, 0,146, 3, 11, 0,211, 5,
+ 0, 0,212, 5, 4, 0, 92, 0,214, 0, 8, 0,212, 0,213, 5, 2, 0, 18, 0, 2, 0, 27, 0, 2, 0,214, 5, 2, 0,215, 5,
+ 2, 0,216, 5, 4, 0, 67, 0, 11, 0,217, 5,215, 0, 6, 0, 2, 0,108, 0, 2, 0, 67, 4, 2, 0,218, 5, 2, 0,225, 2,
+ 4, 0, 18, 0, 7, 0,209, 2,216, 0, 14, 0, 2, 0, 18, 0, 2, 0,219, 5, 2, 0,220, 5, 2, 0,221, 5,215, 0,222, 5,
+ 11, 0,217, 5, 7, 0,223, 5, 7, 0, 56, 0, 4, 0,224, 5, 4, 0,225, 5, 4, 0,226, 5, 4, 0,227, 5, 41, 0,125, 0,
+ 27, 0,168, 0,217, 0, 14, 0,212, 0,213, 5, 4, 0, 92, 0, 4, 0,228, 5, 7, 0,229, 5, 7, 0,230, 5, 7, 0,231, 5,
+ 4, 0,232, 5, 4, 0,233, 5, 7, 0,234, 5, 7, 0,235, 5, 4, 0,236, 5, 7, 0,237, 5, 7, 0,238, 5, 4, 0, 27, 0,
+218, 0, 1, 0,212, 0,213, 5,219, 0, 7, 0,212, 0,213, 5, 2, 0, 18, 0, 2, 0, 27, 0, 4, 0, 37, 0, 4, 0,239, 5,
+ 91, 0,240, 5, 11, 0,217, 5,220, 0, 5, 0,220, 0, 0, 0,220, 0, 1, 0, 0, 0, 19, 0, 7, 0,241, 5, 4, 0, 27, 0,
+221, 0, 6, 0, 4, 0,108, 0, 7, 0,242, 5, 7, 0,178, 1, 7, 0, 40, 2, 4, 0, 18, 0, 4, 0, 27, 0,222, 0, 85, 0,
+219, 0,243, 5,219, 0,244, 5,217, 0,169, 3,218, 0,245, 5, 7, 0,246, 5, 2, 0,247, 5, 2, 0,247, 1, 7, 0,248, 5,
+ 7, 0,249, 5, 2, 0, 67, 4, 2, 0,250, 5, 7, 0,251, 5, 7, 0,252, 5, 7, 0,253, 5, 2, 0,254, 5, 2, 0,224, 5,
+ 2, 0,255, 5, 2, 0, 0, 6, 2, 0, 1, 6, 2, 0, 2, 6, 7, 0, 3, 6, 7, 0, 4, 6, 7, 0, 5, 6, 2, 0, 6, 6,
+ 2, 0, 7, 6, 2, 0, 8, 6, 2, 0, 9, 6, 2, 0, 10, 6, 2, 0, 11, 6, 2, 0, 12, 6, 2, 0, 13, 6,214, 0, 14, 6,
+216, 0, 15, 6, 7, 0, 16, 6, 7, 0, 17, 6, 7, 0, 18, 6, 2, 0, 19, 6, 2, 0, 20, 6, 0, 0, 21, 6, 0, 0, 22, 6,
+ 2, 0, 23, 6, 7, 0, 24, 6, 7, 0, 25, 6, 7, 0, 26, 6, 7, 0, 27, 6, 7, 0, 28, 6, 7, 0, 29, 6, 7, 0, 30, 6,
+ 7, 0, 31, 6, 7, 0, 32, 6, 7, 0, 33, 6, 2, 0, 34, 6, 0, 0, 35, 6, 0, 0, 36, 6, 0, 0, 37, 6, 0, 0, 38, 6,
+ 27, 0, 39, 6, 0, 0, 40, 6, 0, 0, 41, 6, 0, 0, 42, 6, 0, 0, 43, 6, 0, 0, 44, 6, 0, 0, 45, 6, 0, 0, 46, 6,
+ 0, 0, 47, 6, 0, 0, 48, 6, 0, 0, 49, 6, 2, 0, 50, 6, 2, 0, 51, 6, 2, 0, 52, 6, 2, 0, 53, 6, 0, 0, 54, 6,
+ 0, 0, 55, 6, 0, 0, 56, 6, 0, 0, 57, 6, 4, 0, 58, 6, 4, 0, 59, 6, 4, 0, 60, 6, 4, 0, 61, 6, 2, 0, 62, 6,
+ 2, 0, 67, 0, 4, 0, 63, 6, 7, 0, 64, 6, 7, 0, 65, 6,221, 0, 66, 6,223, 0, 8, 0, 4, 0, 67, 6, 4, 0, 68, 6,
+ 4, 0, 69, 6, 4, 0, 70, 6, 4, 0, 71, 6, 4, 0, 72, 6, 4, 0, 53, 0, 4, 0,138, 2,224, 0, 4, 0, 7, 0, 73, 6,
+ 0, 0, 74, 6, 0, 0, 75, 6, 2, 0, 18, 0,225, 0, 4, 0, 7, 0, 76, 6, 4, 0, 18, 0, 4, 0, 77, 6, 4, 0, 56, 0,
+ 41, 0, 46, 0, 22, 0, 32, 0, 34, 0, 75, 0, 27, 0,210, 5,196, 0, 78, 6, 41, 0, 79, 6, 14, 0, 80, 6,197, 0, 81, 6,
+ 27, 0, 82, 6, 7, 0, 83, 6, 7, 0, 84, 6, 7, 0, 85, 6, 7, 0, 86, 6, 4, 0,205, 3, 4, 0, 87, 6, 4, 0, 88, 6,
+ 2, 0, 18, 0, 2, 0, 76, 1, 57, 0, 70, 1,226, 0, 89, 6,222, 0, 90, 6,227, 0, 91, 6,205, 0,185, 0,202, 0, 92, 6,
+ 14, 0,102, 0, 14, 0, 93, 6, 11, 0, 94, 6, 11, 0, 95, 6, 11, 0, 96, 6, 11, 0, 97, 6, 11, 0, 98, 6,228, 0, 99, 6,
+ 2, 0,100, 6, 2, 0,101, 6, 2, 0,251, 0, 2, 0,206, 3, 4, 0,216, 3, 4, 0,102, 6, 14, 0,103, 6,208, 0,196, 5,
+210, 0,104, 6,224, 0,105, 6,178, 0,182, 3,225, 0,106, 6,229, 0,107, 6, 10, 0, 7, 4, 10, 0,108, 6,230, 0, 14, 0,
+230, 0, 0, 0,230, 0, 1, 0, 42, 0,242, 0, 40, 0, 69, 1,229, 0,107, 6,231, 0,109, 6, 7, 0, 97, 2, 7, 0, 98, 2,
+ 7, 0,108, 0, 7, 0,110, 6, 2, 0,111, 6, 2, 0, 18, 0, 2, 0,143, 0, 2, 0, 27, 0,232, 0, 39, 0, 7, 0,112, 6,
+ 7, 0,113, 6, 7, 0,114, 6, 7, 0,115, 6, 7, 0,116, 6, 7, 0,117, 6, 7, 0,118, 6, 7, 0,119, 6, 7, 0,120, 6,
+ 68, 0,121, 6,178, 0,182, 3,232, 0,122, 6,233, 0,123, 6,234, 0,124, 6,235, 0,125, 6,236, 0,126, 6,237, 0,127, 6,
+ 7, 0,128, 6, 7, 0,129, 6, 7, 0, 94, 1, 7, 0,130, 6, 7, 0,131, 6, 7, 0,132, 6, 7, 0,133, 6, 7, 0,175, 0,
+ 7, 0,134, 6, 0, 0,135, 6, 0, 0,136, 6, 0, 0,111, 6, 0, 0,137, 6, 2, 0,138, 6, 2, 0,139, 6, 7, 0,140, 6,
+ 2, 0,141, 6, 2, 0,142, 6, 7, 0,143, 6, 7, 0,144, 6, 7, 0,145, 6, 7, 0,146, 6,238, 0, 51, 0,239, 0, 0, 0,
+239, 0, 1, 0, 14, 0,147, 6, 4, 0,148, 6, 7, 0,149, 6, 2, 0,150, 6, 7, 0,129, 6, 7, 0, 94, 1, 7, 0,151, 6,
+ 2, 0,152, 6, 0, 0,211, 2, 4, 0,153, 6, 2, 0,136, 6, 2, 0,111, 6, 27, 0,210, 5, 27, 0,154, 6, 14, 0,155, 6,
+230, 0,156, 6,238, 0,122, 6, 0, 0,157, 6, 4, 0,205, 3, 4, 0, 87, 6, 2, 0,158, 6, 2, 0,159, 6, 2, 0,160, 6,
+ 2, 0,161, 6, 2, 0, 18, 0, 2, 0, 32, 2, 7, 0,114, 0, 7, 0,162, 6, 7, 0,163, 6, 7, 0,164, 6, 7, 0,175, 0,
+ 7, 0, 83, 6, 2, 0,165, 6, 2, 0,166, 6, 2, 0,167, 6, 0, 0,168, 6, 0, 0,169, 6, 0, 0,170, 6, 0, 0,171, 6,
+ 0, 0,172, 6, 14, 0,173, 6, 14, 0,174, 6, 14, 0,175, 6, 2, 0,176, 6, 2, 0,152, 2, 2, 0,177, 6, 0, 0,178, 6,
+ 11, 0,179, 6,178, 0,182, 3,240, 0, 24, 0, 19, 0, 37, 0, 19, 0, 63, 0, 18, 0,180, 6, 18, 0,181, 6, 18, 0,182, 6,
+ 7, 0,183, 6, 7, 0,184, 6, 7, 0,185, 6, 7, 0,186, 6, 2, 0,187, 6, 2, 0,188, 6, 2, 0,189, 6, 2, 0,190, 6,
+ 2, 0,191, 6, 2, 0, 18, 0, 2, 0,192, 6, 2, 0,193, 6, 2, 0,194, 6, 2, 0,195, 6, 2, 0,196, 6, 2, 0,161, 6,
+ 7, 0,197, 6, 4, 0,198, 6, 4, 0,199, 6,239, 0, 6, 0,239, 0, 0, 0,239, 0, 1, 0, 14, 0,147, 6, 4, 0,148, 6,
+ 7, 0,149, 6, 2, 0,150, 6,241, 0, 8, 0,239, 0, 0, 0,239, 0, 1, 0, 14, 0,147, 6, 4, 0,148, 6, 7, 0,149, 6,
+ 2, 0,150, 6, 0, 0,200, 6, 0, 0,124, 0,242, 0, 14, 0,239, 0, 0, 0,239, 0, 1, 0, 14, 0,147, 6, 4, 0,148, 6,
+ 7, 0,149, 6, 2, 0,150, 6,240, 0,201, 6,243, 0,202, 6, 14, 0,203, 6, 2, 0, 87, 1, 2, 0,204, 6, 4, 0, 18, 0,
+ 7, 0,205, 6, 4, 0,161, 6,244, 0, 21, 0,239, 0, 0, 0,239, 0, 1, 0, 14, 0,147, 6, 4, 0,148, 6, 7, 0,149, 6,
+ 2, 0,150, 6,240, 0,201, 6, 2, 0,206, 6, 2, 0,207, 6, 2, 0,208, 6, 2, 0,209, 6, 2, 0,192, 6, 2, 0,210, 6,
+ 2, 0,211, 6, 0, 0, 18, 0, 0, 0, 27, 0, 11, 0, 73, 2, 4, 0,212, 6, 4, 0,213, 6, 22, 0,214, 6, 11, 0,215, 6,
+245, 0, 18, 0,239, 0, 0, 0,239, 0, 1, 0, 14, 0,147, 6, 4, 0,148, 6, 7, 0,149, 6, 2, 0,150, 6,240, 0,201, 6,
+ 7, 0, 97, 2, 7, 0, 98, 2, 2, 0,206, 6, 2, 0,216, 6, 2, 0,217, 6, 2, 0,218, 6, 4, 0, 18, 0, 7, 0,219, 6,
+ 4, 0,111, 6, 4, 0, 27, 0,178, 0,182, 3,246, 0, 16, 0, 0, 0,220, 6, 0, 0,221, 6, 0, 0,222, 6, 0, 0,223, 6,
+ 0, 0,224, 6, 0, 0,225, 6, 4, 0,226, 6, 4, 0,227, 6, 4, 0,228, 6, 2, 0, 16, 0, 2, 0, 18, 0, 2, 0,229, 6,
+ 2, 0,230, 6, 2, 0,190, 1, 2, 0,231, 6, 0, 0,232, 6,247, 0, 16, 0,239, 0, 0, 0,239, 0, 1, 0, 14, 0,147, 6,
+ 4, 0,148, 6, 4, 0,233, 6,246, 0,234, 6,248, 0,235, 6, 14, 0,236, 6, 14, 0,237, 6,249, 0,238, 6,237, 0,239, 6,
+250, 0,240, 6, 2, 0,241, 6, 2, 0,242, 6, 2, 0,243, 6, 2, 0, 30, 0,251, 0, 15, 0,239, 0, 0, 0,239, 0, 1, 0,
+ 14, 0,147, 6, 4, 0,148, 6, 7, 0,149, 6, 2, 0,150, 6,240, 0,201, 6, 14, 0,244, 6,252, 0,245, 6, 0, 0,246, 6,
+253, 0,247, 6, 2, 0, 18, 0, 2, 0,248, 6, 2, 0,249, 6, 2, 0,250, 6,254, 0, 25, 0,239, 0, 0, 0,239, 0, 1, 0,
+ 14, 0,147, 6, 4, 0,148, 6, 4, 0, 18, 0, 42, 0,244, 2, 40, 0, 69, 1, 54, 0,251, 6,255, 0,252, 6, 0, 1,253, 6,
+178, 0,182, 3, 7, 0,254, 6, 7, 0, 97, 2, 7, 0, 98, 2, 7, 0,219, 6, 7, 0,255, 6, 7, 0, 0, 7, 2, 0, 1, 7,
+ 2, 0, 27, 0, 2, 0, 2, 7, 2, 0, 3, 7, 0, 0, 4, 7, 0, 0, 5, 7, 0, 0, 6, 7, 0, 0,161, 6, 1, 1, 11, 0,
+239, 0, 0, 0,239, 0, 1, 0, 14, 0,147, 6, 4, 0,148, 6, 7, 0,149, 6, 2, 0,150, 6, 2, 0,204, 6, 2, 0, 18, 0,
+ 4, 0, 27, 0,243, 0,202, 6,240, 0,201, 6, 2, 1, 31, 0,239, 0, 0, 0,239, 0, 1, 0, 14, 0,147, 6, 4, 0,148, 6,
+ 7, 0,149, 6, 2, 0,150, 6, 37, 0, 7, 7, 4, 0, 8, 7, 4, 0, 9, 7, 2, 0, 92, 0, 2, 0, 10, 7, 2, 0, 11, 7,
+ 0, 0, 12, 7, 0, 0, 13, 7, 4, 0, 14, 7, 4, 0, 15, 7, 4, 0, 16, 7, 2, 0, 17, 7, 2, 0, 18, 7, 2, 0, 19, 7,
+ 2, 0, 20, 7, 7, 0, 21, 7, 18, 0, 22, 7, 18, 0, 23, 7, 4, 0, 24, 7, 4, 0, 25, 7, 0, 0, 26, 7, 0, 0, 27, 7,
+ 2, 0, 28, 7, 0, 0,211, 2, 11, 0, 29, 7, 3, 1, 10, 0, 22, 0, 32, 0, 11, 0, 30, 7, 11, 0, 31, 7, 11, 0, 32, 7,
+ 11, 0, 33, 7, 11, 0, 34, 7, 4, 0, 92, 0, 4, 0, 35, 7, 0, 0, 36, 7, 0, 0, 37, 7, 4, 1, 10, 0,239, 0, 0, 0,
+239, 0, 1, 0, 14, 0,147, 6, 4, 0,148, 6, 7, 0,149, 6, 3, 1, 38, 7, 2, 0, 92, 0, 2, 0, 10, 7, 4, 0, 67, 0,
+ 11, 0, 39, 7, 5, 1, 3, 0, 5, 1, 0, 0, 5, 1, 1, 0, 7, 0, 40, 7, 6, 1, 9, 0,239, 0, 0, 0,239, 0, 1, 0,
+ 14, 0,147, 6, 4, 0,148, 6, 7, 0,149, 6,240, 0,201, 6, 14, 0, 41, 7, 4, 0, 42, 7, 4, 0, 18, 0, 7, 1, 27, 0,
+239, 0, 0, 0,239, 0, 1, 0, 14, 0,147, 6, 4, 0,148, 6, 7, 0,149, 6, 2, 0,150, 6,240, 0,201, 6, 22, 0, 43, 7,
+ 22, 0, 81, 0, 2, 0, 18, 0, 2, 0, 67, 0, 7, 0, 44, 7, 7, 0, 97, 2, 7, 0, 98, 2, 7, 0,219, 6, 7, 0, 45, 7,
+ 7, 0, 46, 7, 7, 0, 47, 7, 57, 0, 70, 1, 57, 0, 48, 7, 4, 0, 49, 7, 2, 0, 50, 7, 2, 0, 51, 7, 2, 0,251, 0,
+ 2, 0, 86, 1, 14, 0, 52, 7,178, 0,182, 3, 8, 1, 10, 0,239, 0, 0, 0,239, 0, 1, 0, 14, 0,147, 6, 4, 0,148, 6,
+ 7, 0,149, 6, 2, 0,150, 6, 2, 0, 18, 0, 2, 0,214, 3, 4, 0, 27, 0,178, 0,182, 3, 9, 1, 7, 0, 9, 1, 0, 0,
+ 9, 1, 1, 0, 4, 0, 53, 7, 4, 0, 22, 0, 0, 0, 86, 0, 4, 0, 54, 7, 4, 0, 16, 0, 10, 1, 14, 0,239, 0, 0, 0,
+239, 0, 1, 0, 14, 0,147, 6, 4, 0,148, 6, 7, 0,149, 6, 2, 0,150, 6, 4, 0, 11, 7, 4, 0, 27, 0, 14, 0, 55, 7,
+ 14, 0, 56, 7, 0, 0, 57, 7, 0, 0, 58, 7, 4, 0, 59, 7, 4, 0, 60, 7, 11, 1, 6, 0,239, 0, 0, 0,239, 0, 1, 0,
+ 14, 0,147, 6, 4, 0,148, 6, 4, 0, 27, 0, 0, 0, 61, 7, 12, 1, 25, 0,239, 0, 0, 0,239, 0, 1, 0, 14, 0,147, 6,
+ 4, 0,148, 6, 7, 0, 97, 2, 7, 0, 98, 2, 7, 0, 62, 7, 7, 0, 63, 7, 7, 0,219, 6,231, 0, 64, 7,229, 0,107, 6,
+ 13, 1,252, 6, 4, 0, 18, 0, 2, 0, 87, 1, 2, 0,111, 6, 4, 0, 65, 7, 7, 0, 66, 7, 7, 0,148, 3, 7, 0, 94, 3,
+ 4, 0, 27, 0, 7, 0, 67, 7, 7, 0, 68, 7, 4, 0, 69, 7, 4, 0, 30, 0, 11, 0, 70, 7, 14, 1, 7, 0, 14, 1, 0, 0,
+ 14, 1, 1, 0, 0, 0, 71, 7, 2, 0, 72, 7, 2, 0, 73, 7, 2, 0, 74, 7, 2, 0, 27, 0, 15, 1, 12, 0, 2, 0, 73, 7,
+ 2, 0, 75, 7, 2, 0, 76, 7, 0, 0,211, 2, 2, 0, 77, 7, 2, 0, 78, 7, 2, 0, 79, 7, 2, 0, 80, 7, 2, 0, 81, 7,
+ 2, 0,192, 6, 7, 0, 82, 7, 7, 0, 83, 7, 16, 1, 18, 0, 16, 1, 0, 0, 16, 1, 1, 0, 0, 0, 19, 0, 15, 1, 84, 7,
+ 15, 1, 85, 7, 15, 1, 86, 7, 15, 1, 87, 7, 7, 0, 88, 7, 2, 0, 89, 7, 2, 0, 90, 7, 2, 0, 91, 7, 2, 0, 92, 7,
+ 2, 0, 93, 7, 2, 0, 94, 7, 2, 0, 95, 7, 2, 0, 96, 7, 2, 0, 97, 7, 2, 0, 27, 0, 17, 1, 10, 0, 0, 0, 98, 7,
+ 0, 0, 99, 7, 0, 0,100, 7, 0, 0,101, 7, 0, 0,102, 7, 0, 0,103, 7, 2, 0,104, 7, 2, 0,105, 7, 2, 0,106, 7,
+ 2, 0,107, 7, 18, 1, 8, 0, 0, 0,108, 7, 0, 0,109, 7, 0, 0,110, 7, 0, 0,111, 7, 0, 0,112, 7, 0, 0,113, 7,
+ 7, 0,110, 6, 7, 0, 27, 0, 19, 1, 3, 0, 0, 0,114, 7, 2, 0,115, 7, 2, 0, 27, 0, 20, 1, 22, 0, 17, 1,116, 7,
+ 17, 1,117, 7, 17, 1,118, 7, 17, 1,119, 7, 17, 1,120, 7, 17, 1,121, 7, 17, 1,122, 7, 17, 1,123, 7, 17, 1,124, 7,
+ 17, 1,125, 7, 17, 1,126, 7, 17, 1,127, 7, 17, 1,128, 7, 17, 1,129, 7, 17, 1,130, 7, 17, 1,131, 7, 17, 1,132, 7,
+ 18, 1,133, 7, 19, 1,134, 7, 0, 0,135, 7, 7, 0,136, 7, 7, 0, 27, 0, 21, 1,122, 0, 0, 0,137, 7, 0, 0,138, 7,
+ 0, 0,102, 7, 0, 0,139, 7, 0, 0,114, 7, 0, 0,140, 7, 0, 0,141, 7, 0, 0,142, 7, 0, 0,143, 7, 0, 0,144, 7,
+ 0, 0,145, 7, 0, 0,146, 7, 0, 0,147, 7, 0, 0,148, 7, 0, 0,149, 7, 0, 0,150, 7, 0, 0,151, 7, 0, 0,152, 7,
+ 0, 0,153, 7, 0, 0,154, 7, 0, 0,155, 7, 0, 0,156, 7, 0, 0,157, 7, 0, 0,158, 7, 0, 0,159, 7, 0, 0,160, 7,
+ 0, 0,161, 7, 0, 0,162, 7, 0, 0,163, 7, 0, 0,164, 7, 0, 0,165, 7, 0, 0,166, 7, 0, 0,167, 7, 0, 0,168, 7,
+ 0, 0,169, 7, 0, 0,170, 7, 0, 0,171, 7, 0, 0,172, 7, 0, 0,173, 7, 0, 0,174, 7, 0, 0,175, 7, 0, 0,176, 7,
+ 0, 0,177, 7, 0, 0,178, 7, 0, 0,179, 7, 0, 0,180, 7, 0, 0,181, 7, 0, 0,182, 7, 0, 0,183, 7, 0, 0,184, 7,
+ 0, 0,185, 7, 0, 0,186, 7, 0, 0,187, 7, 0, 0,188, 7, 0, 0,189, 7, 0, 0,190, 7, 0, 0,191, 7, 0, 0,192, 7,
+ 0, 0,193, 7, 0, 0,194, 7, 0, 0,195, 7, 0, 0,196, 7, 0, 0,197, 7, 0, 0,198, 7, 0, 0,199, 7, 0, 0,200, 7,
+ 0, 0,201, 7, 0, 0,202, 7, 0, 0,203, 7, 0, 0,204, 7, 0, 0,205, 7, 0, 0,206, 7, 0, 0,207, 7, 0, 0,208, 7,
+ 0, 0,209, 7, 0, 0,210, 7, 0, 0,211, 7, 0, 0,212, 7, 0, 0,213, 7, 0, 0,214, 7, 0, 0,215, 7, 0, 0,216, 7,
+ 0, 0,217, 7, 0, 0,218, 7, 0, 0,219, 7, 0, 0,220, 7, 0, 0,221, 7, 0, 0,222, 7, 0, 0,223, 7, 0, 0,224, 7,
+ 0, 0,225, 7, 0, 0,226, 7, 0, 0,227, 7, 0, 0,228, 7, 0, 0,229, 7, 0, 0,230, 7, 0, 0,231, 7, 0, 0,232, 7,
+ 0, 0,233, 7, 0, 0,234, 7, 0, 0,235, 7, 0, 0,236, 7, 0, 0,237, 7, 0, 0,238, 7, 0, 0,239, 7, 0, 0,240, 7,
+ 0, 0,241, 7, 0, 0,242, 7, 0, 0,243, 7, 0, 0,244, 7, 0, 0,245, 7, 0, 0,246, 7, 0, 0,247, 7, 0, 0,248, 7,
+ 0, 0,249, 7, 0, 0,250, 7, 0, 0,251, 7, 0, 0,252, 7, 0, 0,253, 7, 0, 0,254, 7, 0, 0,255, 7, 0, 0, 0, 8,
+ 22, 1, 5, 0, 0, 0, 1, 8, 0, 0,160, 7, 0, 0,166, 7, 2, 0, 18, 0, 2, 0, 27, 0, 23, 1, 24, 0, 23, 1, 0, 0,
+ 23, 1, 1, 0, 0, 0,174, 5, 20, 1, 2, 8, 21, 1, 3, 8, 21, 1, 4, 8, 21, 1, 5, 8, 21, 1, 6, 8, 21, 1, 7, 8,
+ 21, 1, 8, 8, 21, 1, 9, 8, 21, 1, 10, 8, 21, 1, 11, 8, 21, 1, 12, 8, 21, 1, 13, 8, 21, 1, 14, 8, 21, 1, 15, 8,
+ 21, 1, 16, 8, 21, 1, 17, 8, 21, 1, 18, 8, 21, 1, 19, 8, 22, 1, 20, 8, 4, 0, 21, 8, 4, 0, 27, 0, 24, 1, 3, 0,
+ 24, 1, 0, 0, 24, 1, 1, 0, 0, 0, 22, 8, 25, 1, 5, 0, 4, 0, 18, 0, 4, 0, 27, 0, 7, 0,151, 2, 7, 0, 23, 8,
+ 7, 0, 47, 2, 26, 1, 95, 0, 4, 0, 18, 0, 4, 0, 24, 8, 4, 0, 25, 8, 0, 0, 26, 8, 0, 0, 27, 8, 0, 0, 28, 8,
+ 0, 0, 29, 8, 0, 0, 30, 8, 0, 0, 31, 8, 0, 0, 32, 8, 0, 0, 33, 8, 0, 0, 34, 8, 0, 0, 35, 8, 4, 0, 36, 8,
+ 2, 0, 37, 8, 2, 0, 38, 8, 2, 0, 39, 8, 2, 0, 40, 8, 4, 0, 41, 8, 4, 0, 42, 8, 4, 0, 43, 8, 4, 0, 44, 8,
+ 2, 0, 45, 8, 2, 0, 46, 8, 4, 0, 47, 8, 4, 0, 48, 8, 4, 0, 49, 8, 4, 0, 50, 8, 4, 0, 51, 8, 4, 0, 55, 7,
+ 4, 0, 52, 8, 2, 0, 53, 8, 2, 0, 54, 8, 2, 0, 55, 8, 2, 0, 56, 8, 14, 0, 57, 8, 14, 0, 58, 8, 14, 0, 59, 8,
+ 14, 0, 60, 8, 14, 0, 61, 8, 14, 0, 62, 8, 0, 0, 63, 8, 2, 0, 64, 8, 2, 0, 65, 8, 2, 0, 66, 8, 2, 0, 67, 8,
+ 2, 0, 68, 8, 2, 0, 69, 8, 2, 0, 70, 8, 2, 0, 71, 8, 25, 1, 72, 8, 2, 0, 73, 8, 2, 0, 74, 8, 2, 0, 75, 8,
+ 2, 0, 76, 8, 2, 0, 77, 8, 2, 0, 78, 8, 2, 0, 79, 8, 2, 0, 80, 8, 4, 0, 81, 8, 4, 0, 82, 8, 2, 0, 83, 8,
+ 2, 0, 84, 8, 2, 0, 85, 8, 2, 0, 86, 8, 2, 0, 87, 8, 2, 0, 88, 8, 2, 0, 89, 8, 2, 0, 90, 8, 2, 0, 91, 8,
+ 2, 0, 92, 8, 2, 0, 93, 8, 2, 0, 94, 8, 2, 0, 95, 8, 2, 0, 96, 8, 2, 0, 97, 8, 2, 0, 98, 8, 2, 0, 99, 8,
+ 2, 0,100, 8, 7, 0,101, 8, 4, 0,102, 8, 7, 0,103, 8, 2, 0, 19, 6, 2, 0, 20, 6, 2, 0,104, 8, 2, 0,105, 8,
+ 50, 0,106, 8, 7, 0,107, 8, 2, 0,108, 8, 2, 0,247, 1, 0, 0,109, 8, 4, 0,110, 8, 4, 0,111, 8, 7, 0,112, 8,
+ 7, 0, 27, 0, 27, 1, 24, 0, 22, 0, 32, 0, 14, 0,113, 8, 14, 0,114, 8, 14, 0,115, 8, 14, 0,147, 6, 41, 0,125, 0,
+ 41, 0,116, 8, 4, 0,117, 8, 4, 0, 67, 0, 2, 0,118, 8, 2, 0,119, 8, 2, 0,120, 8, 2, 0,121, 8, 2, 0,122, 8,
+ 2, 0,123, 8, 2, 0,124, 8, 2, 0,125, 8, 2, 0,126, 8, 2, 0,127, 8, 2, 0,128, 8, 2, 0, 27, 0,237, 0,129, 8,
+ 11, 0,130, 8, 2, 0,131, 8, 28, 1, 5, 0, 28, 1, 0, 0, 28, 1, 1, 0, 28, 1,132, 8, 15, 0,133, 8, 4, 0, 18, 0,
+ 29, 1, 7, 0, 29, 1, 0, 0, 29, 1, 1, 0, 28, 1,134, 8, 28, 1,135, 8, 2, 0,123, 5, 2, 0, 18, 0, 4, 0, 27, 0,
+ 30, 1, 25, 0, 30, 1, 0, 0, 30, 1, 1, 0, 31, 1,136, 8, 32, 1,240, 6, 0, 0,137, 8, 0, 0,138, 8, 0, 0,139, 8,
+ 2, 0,140, 8, 2, 0,141, 8, 2, 0,142, 8, 2, 0,143, 8, 2, 0,144, 8, 2, 0, 27, 0, 2, 0, 18, 0, 2, 0,145, 8,
+ 2, 0,146, 8, 2, 0,147, 8, 4, 0,148, 8, 30, 1,149, 8, 11, 0,150, 8, 4, 0,151, 8, 4, 0,152, 8, 4, 0,153, 8,
+ 4, 0,154, 8, 0, 0,155, 8, 33, 1, 22, 0, 33, 1, 0, 0, 33, 1, 1, 0, 28, 1,134, 8, 28, 1,135, 8, 28, 1,156, 8,
+ 28, 1,157, 8, 27, 1,158, 8, 18, 0, 51, 0, 0, 0,148, 6, 0, 0,159, 8, 2, 0,193, 6, 2, 0,194, 6, 2, 0,160, 8,
+ 2, 0, 27, 0, 2, 0,122, 8, 2, 0, 54, 7, 2, 0, 18, 0, 34, 1,136, 8, 14, 0,161, 8, 14, 0,147, 6, 14, 0,162, 8,
+ 14, 0,163, 8, 35, 1, 24, 0, 35, 1, 0, 0, 35, 1, 1, 0,240, 0,201, 6, 18, 0,164, 8, 18, 0,165, 8, 2, 0,193, 6,
+ 2, 0,194, 6, 2, 0,166, 8, 2, 0,167, 8, 2, 0,168, 8, 2, 0, 18, 0, 7, 0, 93, 2, 2, 0,142, 8, 2, 0,143, 8,
+ 2, 0,121, 8, 2, 0,169, 8, 2, 0,126, 8, 2, 0, 86, 1, 36, 1,136, 8, 14, 0,170, 8, 14, 0,171, 8, 14, 0,162, 8,
+ 0, 0,172, 8, 11, 0,173, 8, 37, 1, 14, 0, 0, 0,174, 8, 2, 0,175, 8, 2, 0,176, 8, 2, 0,177, 8, 2, 0,178, 8,
+ 2, 0,112, 5, 2, 0,179, 8, 27, 1,180, 8, 41, 0,181, 8, 4, 0,182, 8, 4, 0,183, 8, 4, 0,184, 8, 4, 0, 27, 0,
+ 0, 0, 71, 7, 38, 1, 3, 0, 0, 0,185, 8, 4, 0,186, 8, 4, 0,187, 8, 39, 1, 4, 0, 4, 0, 8, 7, 4, 0,188, 8,
+ 4, 0, 14, 7, 4, 0,189, 8, 40, 1, 2, 0, 4, 0,190, 8, 4, 0,191, 8, 41, 1, 5, 0, 7, 0,192, 8, 7, 0,193, 8,
+ 7, 0,194, 8, 4, 0, 18, 0, 4, 0, 27, 0, 42, 1, 7, 0, 0, 0,195, 8, 0, 0,222, 6, 44, 0,138, 0, 2, 0,196, 8,
+ 2, 0, 74, 5, 2, 0,197, 8, 2, 0,198, 8, 43, 1, 12, 0, 43, 1, 0, 0, 43, 1, 1, 0, 4, 0, 28, 0, 4, 0,199, 8,
+ 4, 0,200, 8, 4, 0,201, 8, 38, 1,202, 8, 0, 0,195, 8, 42, 1,176, 3, 39, 1,203, 8, 40, 1,204, 8, 41, 1,205, 8,
+ 44, 1, 12, 0, 0, 0, 35, 0, 11, 0,227, 0, 0, 0,228, 0, 4, 0,231, 0, 4, 0,239, 0, 11, 0,232, 0, 7, 0,234, 0,
+ 7, 0,235, 0, 11, 0,206, 8, 11, 0,207, 8, 11, 0,236, 0, 11, 0,238, 0, 45, 1, 50, 0, 45, 1, 0, 0, 45, 1, 1, 0,
+ 11, 0,208, 8, 11, 0, 25, 0, 0, 0, 19, 0, 4, 0, 18, 0, 4, 0, 16, 0, 4, 0, 22, 0, 4, 0, 90, 0, 4, 0,209, 8,
+ 4, 0,210, 8, 4, 0,200, 8, 4, 0,201, 8, 4, 0,211, 8, 4, 0,250, 0, 4, 0,212, 8, 4, 0,213, 8, 7, 0,214, 8,
+ 7, 0,215, 8, 7, 0,216, 8, 2, 0,217, 8, 2, 0,218, 8, 4, 0,219, 8, 4, 0,220, 8, 43, 1,221, 8, 31, 0, 80, 0,
+ 41, 0,125, 0, 27, 0,222, 8, 44, 0,138, 0,229, 0,107, 6, 7, 0,223, 8, 7, 0,224, 8, 44, 1, 71, 1, 45, 1,225, 8,
+ 45, 1,226, 8, 45, 1,227, 8, 14, 0,228, 8, 46, 1,229, 8, 11, 0,230, 8, 7, 0, 84, 4, 7, 0,231, 8, 7, 0,232, 8,
+ 7, 0,233, 8, 11, 0,234, 8, 4, 0,235, 8, 4, 0,236, 8, 4, 0,237, 8, 7, 0,238, 8, 4, 0,129, 0, 4, 0, 27, 0,
+ 47, 1, 4, 0, 47, 1, 0, 0, 47, 1, 1, 0, 14, 0,239, 8, 45, 1,240, 8,226, 0, 11, 0, 14, 0,241, 8, 14, 0,228, 8,
+ 14, 0,242, 8, 45, 1,243, 8, 0, 0,244, 8, 0, 0,245, 8, 4, 0,246, 8, 4, 0,247, 8, 4, 0,248, 8, 4, 0, 27, 0,
+ 19, 0,249, 8, 48, 1, 4, 0, 7, 0,250, 8, 7, 0, 94, 3, 2, 0,251, 8, 2, 0,252, 8, 49, 1, 6, 0, 7, 0,253, 8,
+ 7, 0,254, 8, 7, 0,255, 8, 7, 0, 0, 9, 4, 0, 1, 9, 4, 0, 2, 9, 50, 1, 8, 0, 7, 0, 3, 9, 7, 0, 4, 9,
+ 7, 0, 5, 9, 7, 0, 6, 9, 7, 0, 7, 9, 4, 0,250, 2, 4, 0, 8, 9, 4, 0, 9, 9, 51, 1, 2, 0, 7, 0,182, 5,
+ 7, 0, 27, 0, 52, 1, 5, 0, 7, 0, 10, 9, 7, 0, 11, 9, 4, 0, 92, 0, 4, 0,212, 2, 4, 0, 12, 9, 53, 1, 6, 0,
+ 53, 1, 0, 0, 53, 1, 1, 0, 2, 0, 16, 0, 2, 0, 18, 0, 2, 0, 13, 9, 2, 0, 56, 0, 54, 1, 8, 0, 54, 1, 0, 0,
+ 54, 1, 1, 0, 2, 0, 16, 0, 2, 0, 18, 0, 2, 0, 13, 9, 2, 0, 56, 0, 7, 0, 22, 0, 7, 0,129, 0, 55, 1, 45, 0,
+ 55, 1, 0, 0, 55, 1, 1, 0, 2, 0, 16, 0, 2, 0, 18, 0, 2, 0, 13, 9, 2, 0,246, 0, 2, 0,126, 4, 2, 0, 14, 9,
+ 7, 0, 15, 9, 7, 0, 91, 0, 7, 0, 7, 3, 4, 0, 16, 9, 4, 0, 82, 0, 4, 0,214, 2, 7, 0, 17, 9, 7, 0, 18, 9,
+ 7, 0, 19, 9, 7, 0, 20, 9, 7, 0, 21, 9, 7, 0, 22, 9, 7, 0, 4, 3, 7, 0, 68, 1, 7, 0, 23, 9, 7, 0, 24, 9,
+ 7, 0, 27, 0, 7, 0, 25, 9, 7, 0, 26, 9, 7, 0, 27, 9, 2, 0, 28, 9, 2, 0, 29, 9, 2, 0, 30, 9, 2, 0, 31, 9,
+ 2, 0, 32, 9, 2, 0, 33, 9, 2, 0, 34, 9, 2, 0, 35, 9, 2, 0, 32, 2, 2, 0, 36, 9, 2, 0, 29, 2, 2, 0, 37, 9,
+ 0, 0, 38, 9, 0, 0, 39, 9, 7, 0,244, 0, 56, 1, 40, 9, 64, 0,250, 1, 57, 1, 16, 0, 57, 1, 0, 0, 57, 1, 1, 0,
+ 2, 0, 16, 0, 2, 0, 18, 0, 2, 0, 13, 9, 2, 0,246, 0, 7, 0,255, 2, 7, 0, 0, 3, 7, 0, 1, 3, 7, 0, 82, 2,
+ 7, 0, 2, 3, 7, 0, 3, 3, 7, 0, 41, 9, 7, 0, 4, 3, 7, 0, 6, 3, 7, 0, 7, 3,253, 0, 5, 0, 2, 0, 16, 0,
+ 2, 0, 42, 9, 2, 0, 18, 0, 2, 0, 43, 9, 22, 0, 43, 7,252, 0, 3, 0, 4, 0, 69, 0, 4, 0, 44, 9,253, 0, 2, 0,
+ 58, 1, 7, 0, 58, 1, 0, 0, 58, 1, 1, 0, 0, 0, 19, 0, 2, 0, 16, 0, 2, 0, 18, 0, 4, 0, 21, 0, 11, 0, 45, 9,
+ 59, 1, 5, 0, 0, 0, 19, 0, 7, 0, 94, 1, 7, 0, 46, 9, 4, 0, 47, 9, 4, 0, 27, 0, 60, 1, 4, 0, 2, 0, 16, 0,
+ 2, 0, 18, 0, 2, 0, 67, 0, 2, 0, 30, 0, 61, 1, 4, 0, 0, 0, 19, 0, 63, 0, 48, 9, 7, 0, 94, 1, 7, 0, 27, 0,
+ 62, 1, 6, 0, 2, 0, 49, 9, 2, 0, 50, 9, 2, 0, 16, 0, 2, 0, 51, 9, 0, 0, 52, 9, 0, 0, 53, 9, 63, 1, 5, 0,
+ 4, 0, 16, 0, 4, 0, 27, 0, 0, 0, 19, 0, 0, 0, 54, 9, 0, 0, 55, 9, 64, 1, 3, 0, 4, 0, 16, 0, 4, 0, 27, 0,
+ 0, 0, 19, 0, 65, 1, 4, 0, 2, 0, 56, 9, 2, 0, 57, 9, 2, 0, 18, 0, 2, 0, 27, 0, 66, 1, 6, 0, 0, 0, 19, 0,
+ 0, 0, 58, 9, 2, 0, 59, 9, 2, 0, 4, 3, 2, 0, 87, 1, 2, 0, 30, 0, 67, 1, 5, 0, 0, 0, 19, 0, 7, 0, 94, 3,
+ 7, 0,217, 4, 2, 0, 18, 0, 2, 0,226, 2, 68, 1, 3, 0, 0, 0, 19, 0, 4, 0,214, 2, 4, 0, 56, 9, 69, 1, 7, 0,
+ 0, 0, 19, 0, 7, 0,217, 4, 0, 0, 60, 9, 0, 0, 61, 9, 2, 0, 87, 1, 2, 0, 67, 0, 4, 0, 62, 9, 70, 1, 4, 0,
+ 0, 0, 63, 9, 0, 0, 64, 9, 4, 0, 16, 0, 7, 0,230, 2, 71, 1, 3, 0, 27, 0, 65, 9, 0, 0, 66, 9, 0, 0, 67, 9,
+ 72, 1, 18, 0, 72, 1, 0, 0, 72, 1, 1, 0, 2, 0, 16, 0, 2, 0, 68, 9, 2, 0, 18, 0, 2, 0, 69, 9, 2, 0, 70, 9,
+ 2, 0, 71, 9, 2, 0, 67, 0, 2, 0, 30, 0, 0, 0, 19, 0, 11, 0, 2, 0, 73, 1, 72, 9, 27, 0, 44, 0, 2, 0,218, 5,
+ 2, 0,176, 2, 2, 0, 73, 9, 2, 0, 27, 0, 74, 1, 11, 0, 0, 0, 19, 0, 0, 0, 16, 0, 0, 0, 74, 9, 2, 0, 18, 0,
+ 2, 0,226, 2, 2, 0, 75, 9, 4, 0, 76, 9, 4, 0, 77, 9, 4, 0, 78, 9, 4, 0, 79, 9, 4, 0, 80, 9, 75, 1, 1, 0,
+ 0, 0, 81, 9, 76, 1, 4, 0, 37, 0, 7, 7, 0, 0, 22, 8, 4, 0, 87, 1, 4, 0, 18, 0, 73, 1, 18, 0, 73, 1, 0, 0,
+ 73, 1, 1, 0, 73, 1, 82, 9, 2, 0, 16, 0, 2, 0, 18, 0, 2, 0, 83, 9, 2, 0, 71, 9, 2, 0, 68, 9, 2, 0, 84, 9,
+ 2, 0, 30, 0, 2, 0,247, 1, 0, 0, 19, 0, 11, 0, 2, 0, 77, 1, 72, 9, 72, 1, 85, 9, 2, 0, 14, 0, 2, 0, 86, 9,
+ 4, 0, 87, 9, 78, 1, 3, 0, 4, 0,240, 2, 4, 0, 27, 0, 27, 0, 44, 0, 79, 1, 15, 0,176, 0, 88, 9, 2, 0, 16, 0,
+ 2, 0, 18, 0, 7, 0, 15, 9, 7, 0, 91, 0, 0, 0, 19, 0, 0, 0, 89, 9, 2, 0, 90, 9, 2, 0, 91, 9, 2, 0,134, 0,
+ 2, 0, 92, 9, 2, 0, 93, 9, 2, 0, 27, 0, 7, 0, 94, 9, 7, 0, 95, 9, 80, 1, 8, 0, 7, 0, 96, 9, 7, 0, 97, 9,
+ 7, 0, 98, 9, 7, 0, 99, 9, 7, 0,100, 9, 7, 0,101, 9, 7, 0,102, 9, 7, 0,103, 9, 81, 1, 13, 0, 2, 0, 18, 0,
+ 2, 0,104, 9, 4, 0, 67, 0, 4, 0, 30, 0, 2, 0,178, 6, 7, 0, 84, 4, 7, 0,231, 8, 46, 1,229, 8, 80, 1,105, 9,
+ 2, 0, 16, 0, 2, 0,117, 5, 2, 0,216, 3, 2, 0,106, 9, 82, 1, 11, 0, 4, 0,240, 2, 2, 0, 16, 0, 2, 0, 18, 0,
+ 27, 0, 44, 0, 79, 0,107, 9, 0, 0, 19, 0, 7, 0,108, 9, 7, 0,109, 9, 7, 0,222, 3, 2, 0,110, 9, 2, 0,111, 9,
+ 83, 1, 5, 0, 2, 0, 16, 0, 2, 0, 67, 0, 4, 0, 27, 0, 41, 0,125, 0, 27, 0,210, 5, 84, 1, 5, 0, 4, 0, 27, 0,
+ 4, 0, 16, 0, 0, 0, 19, 0, 0, 0, 54, 9, 27, 0, 44, 0, 85, 1, 13, 0, 2, 0, 18, 0, 2, 0, 16, 0, 2, 0, 68, 9,
+ 2, 0,223, 3, 7, 0,112, 9, 7, 0,113, 9, 7, 0, 86, 1, 7, 0,114, 9, 7, 0,192, 3, 7, 0,196, 3, 7, 0,115, 9,
+ 7, 0,116, 9, 27, 0,117, 9, 86, 1, 10, 0, 2, 0, 18, 0, 2, 0, 16, 0, 7, 0, 15, 9, 7, 0, 91, 0, 0, 0, 19, 0,
+ 0, 0, 89, 9, 2, 0, 67, 0, 2, 0, 30, 0, 2, 0,247, 1, 2, 0,117, 5, 87, 1, 8, 0, 27, 0, 44, 0, 7, 0, 1, 3,
+ 7, 0,118, 9, 7, 0,119, 9, 7, 0,223, 3, 2, 0, 67, 0, 2, 0,226, 2, 7, 0, 30, 0, 88, 1, 12, 0, 2, 0, 16, 0,
+ 2, 0, 87, 1, 2, 0, 18, 0, 2, 0, 4, 3, 2, 0,240, 2, 2, 0,120, 9, 4, 0, 27, 0, 7, 0,121, 9, 7, 0,122, 9,
+ 7, 0,123, 9, 7, 0,124, 9, 0, 0,125, 9, 89, 1, 9, 0, 2, 0, 18, 0, 2, 0, 16, 0, 4, 0, 15, 9, 4, 0, 91, 0,
+ 0, 0, 19, 0, 2, 0, 86, 1, 2, 0, 63, 0, 2, 0,126, 9, 2, 0,127, 9, 90, 1, 7, 0, 4, 0,214, 2, 4, 0,128, 9,
+ 4, 0,129, 9, 4, 0,130, 9, 7, 0,131, 9, 7, 0,132, 9, 0, 0, 60, 9, 91, 1, 7, 0, 0, 0,133, 9, 27, 0,134, 9,
+ 0, 0, 66, 9, 2, 0,135, 9, 2, 0, 67, 0, 4, 0, 30, 0, 0, 0, 67, 9, 92, 1, 6, 0, 2, 0, 18, 0, 2, 0, 16, 0,
+ 4, 0, 15, 9, 4, 0, 91, 0, 0, 0,136, 9, 0, 0,137, 9, 93, 1, 1, 0, 4, 0, 18, 0, 94, 1, 6, 0, 0, 0, 94, 0,
+ 2, 0, 16, 0, 2, 0, 18, 0, 4, 0,138, 9, 7, 0,139, 9, 37, 0, 7, 7, 95, 1, 4, 0, 0, 0,181, 2, 2, 0, 18, 0,
+ 4, 0, 16, 0, 27, 0, 44, 0, 96, 1, 2, 0, 4, 0, 16, 0, 4, 0,182, 6, 97, 1, 8, 0, 0, 0, 63, 9, 0, 0, 64, 9,
+ 4, 0, 16, 0, 7, 0, 40, 2, 7, 0,140, 9, 7, 0, 27, 0, 27, 0, 70, 3, 27, 0,141, 9, 98, 1, 11, 0, 0, 0, 55, 6,
+ 0, 0, 18, 0, 2, 0,142, 9, 4, 0, 16, 0, 7, 0, 94, 1, 7, 0,143, 9, 7, 0,144, 9, 7, 0,145, 9, 4, 0,146, 9,
+ 27, 0, 70, 3, 27, 0,147, 9, 77, 1, 10, 0, 77, 1, 0, 0, 77, 1, 1, 0, 77, 1, 82, 9, 2, 0, 16, 0, 2, 0, 18, 0,
+ 2, 0, 68, 9, 2, 0,148, 9, 0, 0, 19, 0, 11, 0, 2, 0, 27, 0, 44, 0, 46, 1, 17, 0, 22, 0, 32, 0, 0, 0, 35, 0,
+ 38, 0,153, 0, 11, 0,227, 0, 38, 0,149, 9, 31, 0, 80, 0, 7, 0, 84, 4, 7, 0,150, 9, 7, 0,231, 8, 7, 0, 96, 9,
+ 7, 0, 97, 9, 7, 0,151, 9, 4, 0, 92, 0, 4, 0, 27, 0, 11, 0,152, 9, 11, 0,153, 9, 11, 0,154, 9, 99, 1, 6, 0,
+ 99, 1, 0, 0, 99, 1, 1, 0, 27, 0, 44, 0, 11, 0,155, 9, 2, 0,251, 0, 0, 0,211, 2, 64, 0, 4, 0, 22, 0, 32, 0,
+ 14, 0,156, 9, 4, 0,134, 0, 7, 0,157, 9,100, 1, 28, 0,100, 1, 0, 0,100, 1, 1, 0, 21, 0,158, 9,100, 1, 38, 0,
+ 14, 0,159, 9, 0, 0, 19, 0, 7, 0,160, 9, 7, 0,161, 9, 7, 0,162, 9, 7, 0,163, 9, 4, 0, 18, 0, 7, 0,164, 9,
+ 7, 0,165, 9, 7, 0,166, 9, 7, 0,167, 9, 7, 0, 94, 1, 7, 0, 40, 2, 7, 0,168, 9, 7, 0,212, 2, 7, 0,169, 9,
+ 7, 0,170, 9, 7, 0,171, 9, 7, 0,172, 9, 7, 0,173, 9, 7, 0,176, 0, 4, 0,134, 0, 2, 0,255, 5, 2, 0,174, 9,
+101, 1, 27, 0, 22, 0, 32, 0, 34, 0, 75, 0, 14, 0,175, 9, 14, 0,176, 9, 14, 0,177, 9,100, 1,178, 9, 11, 0,179, 9,
+ 11, 0,180, 9, 4, 0, 18, 0, 4, 0,158, 6, 4, 0,181, 9, 4, 0, 27, 0, 2, 0, 8, 3, 2, 0,212, 6, 4, 0,182, 9,
+ 4, 0,134, 0, 4, 0,183, 9, 2, 0,184, 9, 2, 0,185, 9, 2, 0,186, 9, 2, 0,187, 9, 4, 0,188, 9, 4, 0,189, 9,
+ 4, 0,190, 9, 4, 0,191, 9, 4, 0,192, 9, 4, 0,193, 9,102, 1, 2, 0, 7, 0,165, 2, 4, 0, 18, 0,180, 0, 5, 0,
+102, 1,194, 9, 4, 0,212, 2, 4, 0,195, 9, 4, 0,196, 9, 4, 0, 18, 0,179, 0, 16, 0, 4, 0,197, 9, 4, 0,198, 9,
+ 4, 0,199, 9, 4, 0,200, 9, 2, 0,201, 9, 2, 0,202, 9, 2, 0,203, 9, 2, 0,251, 0, 2, 0,204, 9, 2, 0,205, 9,
+ 2, 0,206, 9, 2, 0,207, 9, 4, 0,208, 9, 4, 0,209, 9, 4, 0,210, 9, 4, 0,211, 9,103, 1, 40, 0,103, 1, 0, 0,
+103, 1, 1, 0, 21, 0,158, 9, 14, 0,251, 3, 0, 0, 19, 0, 2, 0, 18, 0, 2, 0,212, 9, 2, 0,209, 3, 2, 0,213, 9,
+ 0, 0,214, 9, 0, 0,215, 9, 0, 0,216, 9,100, 1,217, 9,103, 1, 38, 0,103, 1,218, 9, 14, 0,219, 9, 14, 0,220, 9,
+180, 0,184, 3, 27, 0,221, 9,103, 1,222, 9, 7, 0, 77, 1, 7, 0,176, 0, 7, 0,223, 9, 7, 0, 19, 2, 7, 0,198, 3,
+ 7, 0,200, 3, 2, 0,232, 3, 2, 0, 27, 0, 7, 0,224, 9, 7, 0,225, 9, 7, 0,203, 3, 7, 0,226, 9, 7, 0,227, 9,
+ 7, 0,228, 9, 7, 0,229, 9, 7, 0,230, 9, 7, 0,231, 9, 7, 0,232, 9, 7, 0,233, 9, 11, 0,234, 9,177, 0, 16, 0,
+ 14, 0,235, 9, 74, 0,236, 9, 2, 0, 18, 0, 2, 0, 27, 0, 4, 0,237, 9, 4, 0, 67, 0, 7, 0, 84, 0, 7, 0,238, 9,
+ 7, 0,239, 9, 14, 0,240, 9, 4, 0,241, 9, 4, 0,242, 9, 11, 0,243, 9, 11, 0,244, 9,179, 0,183, 3, 0, 0,245, 9,
+104, 1, 1, 0, 4, 0,242, 9,105, 1, 12, 0, 4, 0,242, 9, 7, 0, 80, 9, 2, 0,246, 9, 2, 0,247, 9, 7, 0,248, 9,
+ 7, 0,249, 9, 2, 0,250, 9, 2, 0, 18, 0, 7, 0,251, 9, 7, 0,252, 9, 7, 0,253, 9, 7, 0,254, 9,106, 1, 7, 0,
+106, 1, 0, 0,106, 1, 1, 0, 14, 0,255, 9, 4, 0, 18, 0, 4, 0, 0, 10, 0, 0, 19, 0, 22, 1, 1, 10,176, 0, 9, 0,
+ 22, 0, 32, 0, 14, 0, 2, 10, 14, 0,235, 9, 14, 0, 3, 10, 14, 0,102, 0, 4, 0, 18, 0, 4, 0, 4, 10, 4, 0, 5, 10,
+ 4, 0, 27, 0,243, 0, 8, 0, 22, 0, 6, 10, 14, 0,235, 9, 64, 0, 7, 10, 0, 0, 8, 10, 4, 0, 9, 10, 4, 0, 18, 0,
+ 4, 0, 10, 10, 4, 0, 27, 0,107, 1, 13, 0,239, 0, 0, 0,239, 0, 1, 0, 14, 0,147, 6, 4, 0,148, 6, 7, 0,149, 6,
+ 2, 0,150, 6,240, 0,201, 6,176, 0,179, 3,243, 0, 11, 10, 0, 0, 87, 1, 0, 0,204, 6, 2, 0, 18, 0, 7, 0, 12, 10,
+108, 1, 8, 0,108, 1, 0, 0,108, 1, 1, 0,106, 1, 13, 10, 31, 0, 80, 0, 14, 0,185, 3, 4, 0, 18, 0, 0, 0, 19, 0,
+ 4, 0,119, 8,109, 1, 5, 0,109, 1, 0, 0,109, 1, 1, 0, 31, 0, 80, 0, 2, 0, 18, 0, 0, 0, 14, 10,110, 1, 14, 0,
+110, 1, 0, 0,110, 1, 1, 0, 11, 0, 2, 0, 2, 0, 16, 0, 2, 0, 18, 0, 0, 0, 15, 10, 0, 0, 16, 10, 0, 0, 19, 0,
+ 2, 0, 27, 0, 7, 0, 17, 10, 7, 0, 18, 10, 31, 0, 80, 0, 7, 0, 19, 10, 7, 0, 20, 10,111, 1, 9, 0,111, 1, 0, 0,
+111, 1, 1, 0, 27, 0, 21, 10, 0, 0, 11, 3, 7, 0, 22, 10, 2, 0, 23, 10, 2, 0, 18, 0, 2, 0, 16, 0, 2, 0, 24, 10,
+112, 1, 7, 0, 37, 0, 7, 7, 21, 0,158, 9, 4, 0, 18, 0, 4, 0, 25, 10, 14, 0, 26, 10, 27, 0, 21, 10, 0, 0, 11, 3,
+113, 1, 15, 0, 27, 0, 21, 10, 2, 0, 27, 10, 2, 0, 18, 0, 2, 0, 28, 10, 2, 0, 29, 10, 0, 0, 11, 3, 27, 0, 30, 10,
+ 0, 0, 31, 10, 7, 0, 32, 10, 7, 0, 40, 2, 7, 0, 33, 10, 7, 0, 34, 10, 2, 0, 16, 0, 2, 0, 87, 1, 7, 0, 94, 1,
+114, 1, 6, 0, 27, 0, 21, 10, 7, 0,194, 9, 2, 0, 35, 10, 2, 0, 36, 10, 2, 0, 18, 0, 2, 0, 37, 10,115, 1, 6, 0,
+ 27, 0, 21, 10, 4, 0, 38, 10, 4, 0, 39, 10, 4, 0, 92, 0, 4, 0, 27, 0, 0, 0, 11, 3,116, 1, 4, 0, 27, 0, 21, 10,
+ 4, 0, 18, 0, 4, 0, 38, 10, 0, 0, 11, 3,117, 1, 4, 0, 27, 0, 21, 10, 4, 0, 18, 0, 4, 0, 38, 10, 0, 0, 11, 3,
+118, 1, 4, 0, 27, 0, 21, 10, 4, 0, 18, 0, 4, 0, 38, 10, 0, 0, 11, 3,119, 1, 2, 0, 4, 0, 18, 0, 7, 0, 84, 4,
+120, 1, 2, 0, 27, 0, 21, 10, 0, 0, 11, 3,121, 1, 10, 0, 27, 0, 21, 10, 4, 0, 40, 10, 7, 0,128, 0, 4, 0, 18, 0,
+ 2, 0, 5, 7, 2, 0, 41, 10, 2, 0, 67, 0, 2, 0, 30, 0, 7, 0, 42, 10, 0, 0, 11, 3,122, 1, 10, 0, 27, 0, 21, 10,
+ 2, 0, 16, 0, 2, 0,134, 4, 4, 0, 90, 0, 4, 0, 91, 0, 7, 0,118, 9, 7, 0,119, 9, 4, 0, 27, 0,176, 0, 88, 9,
+ 0, 0, 11, 3,123, 1, 4, 0, 27, 0, 21, 10, 4, 0,210, 3, 4, 0, 43, 10, 0, 0, 11, 3,124, 1, 4, 0, 27, 0, 21, 10,
+ 4, 0,210, 3, 4, 0, 27, 0, 0, 0, 11, 3,125, 1, 6, 0, 27, 0, 21, 10, 7, 0,128, 0, 7, 0, 82, 3, 4, 0, 44, 10,
+ 2, 0,210, 3, 2, 0,211, 3,126, 1, 6, 0, 27, 0, 21, 10, 4, 0, 45, 10, 4, 0, 46, 10, 7, 0, 47, 10, 7, 0, 48, 10,
+ 0, 0, 11, 3,127, 1, 16, 0, 27, 0, 21, 10, 27, 0,218, 9, 4, 0, 16, 0, 7, 0, 49, 10, 7, 0, 50, 10, 7, 0, 51, 10,
+ 7, 0, 52, 10, 7, 0, 53, 10, 7, 0, 54, 10, 7, 0, 55, 10, 7, 0, 56, 10, 7, 0, 57, 10, 2, 0, 18, 0, 2, 0, 27, 0,
+ 2, 0, 67, 0, 2, 0, 30, 0,128, 1, 3, 0, 27, 0, 21, 10, 4, 0, 18, 0, 4, 0, 32, 2,129, 1, 5, 0, 27, 0, 21, 10,
+ 4, 0, 18, 0, 4, 0, 27, 0, 7, 0, 58, 10, 0, 0, 11, 3,130, 1, 10, 0, 27, 0, 21, 10, 0, 0, 11, 3, 2, 0, 59, 10,
+ 2, 0, 60, 10, 0, 0, 61, 10, 0, 0, 62, 10, 7, 0, 63, 10, 7, 0, 64, 10, 7, 0, 65, 10, 7, 0, 66, 10,131, 1, 5, 0,
+ 27, 0, 21, 10, 0, 0, 11, 3, 7, 0,220, 2, 2, 0, 67, 10, 2, 0, 18, 0,132, 1, 8, 0, 7, 0, 8, 0, 7, 0, 9, 0,
+ 7, 0, 10, 0, 7, 0, 11, 0, 7, 0, 68, 10, 7, 0, 69, 10, 2, 0, 18, 0, 2, 0, 32, 2,133, 1, 8, 0, 7, 0, 8, 0,
+ 7, 0, 9, 0, 7, 0, 10, 0, 7, 0, 11, 0, 7, 0, 68, 10, 7, 0, 69, 10, 2, 0, 18, 0, 2, 0, 32, 2,134, 1, 8, 0,
+ 7, 0, 8, 0, 7, 0, 9, 0, 7, 0, 10, 0, 7, 0, 11, 0, 7, 0, 68, 10, 7, 0, 69, 10, 2, 0, 18, 0, 2, 0, 32, 2,
+135, 1, 7, 0, 27, 0, 21, 10, 0, 0, 11, 3, 7, 0, 94, 1, 7, 0,103, 1, 2, 0, 18, 0, 2, 0, 87, 1, 4, 0, 27, 0,
+136, 1, 5, 0, 27, 0, 70, 3, 7, 0, 94, 1, 2, 0, 74, 3, 0, 0, 76, 3, 0, 0, 70, 10,137, 1, 7, 0,229, 0,107, 6,
+ 0, 0, 71, 10, 4, 0, 18, 0, 4, 0, 27, 0, 0, 0, 72, 10, 27, 0,210, 5, 27, 0, 73, 10,138, 1, 3, 0,229, 0,107, 6,
+ 4, 0, 18, 0, 4, 0, 27, 0,139, 1, 6, 0,229, 0,107, 6, 4, 0, 18, 0, 4, 0, 27, 0, 0, 0, 72, 10, 7, 0, 58, 10,
+ 27, 0,210, 5,140, 1, 10, 0,140, 1, 0, 0,140, 1, 1, 0, 2, 0, 16, 0, 2, 0, 18, 0, 0, 0, 74, 10, 7, 0, 31, 1,
+ 7, 0, 32, 1, 2, 0,255, 9, 2, 0, 75, 10, 27, 0, 44, 0,141, 1, 22, 0,141, 1, 0, 0,141, 1, 1, 0, 2, 0, 18, 0,
+ 2, 0, 87, 1, 2, 0, 76, 10, 2, 0, 77, 10, 31, 0, 80, 0,176, 0, 88, 9, 27, 0,168, 0, 7, 0, 90, 0, 7, 0, 91, 0,
+ 7, 0, 78, 10, 7, 0, 79, 10, 7, 0, 80, 10, 7, 0, 81, 10, 7, 0,253, 2, 7, 0,148, 3, 7, 0, 90, 9, 7, 0, 82, 10,
+ 0, 0, 83, 10, 0, 0, 84, 10, 14, 0,188, 3,142, 1, 11, 0, 7, 0, 47, 2, 7, 0,118, 9, 7, 0,119, 9, 11, 0, 2, 0,
+ 2, 0, 85, 10, 2, 0, 86, 10, 2, 0, 87, 10, 2, 0, 88, 10, 2, 0, 89, 10, 2, 0, 90, 10, 2, 0,181, 2,143, 1, 21, 0,
+143, 1, 0, 0,143, 1, 1, 0,143, 1, 91, 10, 0, 0, 19, 0, 11, 0, 92, 10, 2, 0, 16, 0, 2, 0, 18, 0, 2, 0, 93, 10,
+ 2, 0, 94, 10, 7, 0, 95, 10, 7, 0, 96, 10, 11, 0, 97, 10, 2, 0, 98, 10, 2, 0, 99, 10, 4, 0,247, 1, 11, 0,152, 9,
+ 4, 0,100, 10, 4, 0,101, 10,143, 1,102, 10,144, 1,103, 10,142, 1,104, 10,145, 1, 4, 0, 0, 0,105, 10, 2, 0,106, 10,
+ 2, 0,107, 10, 4, 0, 27, 0,146, 1, 37, 0,146, 1, 0, 0,146, 1, 1, 0,146, 1,108, 10, 0, 0, 19, 0, 2, 0, 16, 0,
+ 2, 0, 18, 0, 2, 0,199, 8, 2, 0,176, 2, 2, 0,109, 10, 2, 0, 10, 7, 2, 0, 98, 10, 2, 0, 42, 9, 14, 0, 83, 9,
+ 14, 0,110, 10,146, 1, 38, 0, 22, 0, 43, 7, 11, 0, 92, 10, 7, 0, 95, 10, 7, 0, 96, 10, 7, 0, 82, 2, 7, 0, 1, 3,
+ 7, 0,111, 10, 4, 0,112, 10, 0, 0,113, 10, 2, 0,114, 10, 2, 0,115, 10, 7, 0,116, 10, 7, 0,117, 10, 2, 0,118, 10,
+ 2, 0,119, 10, 11, 0,120, 10, 19, 0,121, 10, 19, 0,122, 10, 19, 0,123, 10,145, 1,154, 0,147, 1,124, 10,148, 1,125, 10,
+144, 1, 8, 0,144, 1, 0, 0,144, 1, 1, 0,146, 1,126, 10,146, 1,127, 10,143, 1,128, 10,143, 1,129, 10, 4, 0, 18, 0,
+ 4, 0, 27, 0, 57, 0, 20, 0, 22, 0, 32, 0, 34, 0, 75, 0,178, 0,182, 3, 14, 0,130, 10, 14, 0,131, 10, 4, 0, 16, 0,
+ 4, 0,132, 10, 4, 0,133, 10, 4, 0, 18, 0, 4, 0,112, 10, 4, 0,134, 10, 14, 0, 83, 9, 14, 0,110, 10,149, 1,135, 10,
+ 11, 0,136, 10, 11, 0,137, 10, 4, 0,138, 10, 11, 0,139, 10, 11, 0,140, 10, 11, 0,141, 10,150, 1, 4, 0, 4, 0, 17, 0,
+ 4, 0,230, 2, 4, 0,118, 9, 4, 0,119, 9,151, 1, 4, 0, 4, 0, 17, 0, 7, 0,230, 2, 7, 0,118, 9, 7, 0,119, 9,
+152, 1, 2, 0, 0, 0,230, 2, 0, 0, 86, 1,153, 1, 4, 0, 4, 0, 17, 0, 7, 0,142, 10, 7, 0,118, 9, 7, 0,119, 9,
+154, 1, 1, 0, 7, 0,143, 10,155, 1, 6, 0, 4, 0,127, 0, 4, 0,129, 0, 4, 0, 42, 9, 0, 0,144, 10, 0, 0,145, 10,
+ 2, 0, 27, 0,156, 1, 16, 0, 2, 0,142, 8, 2, 0,143, 8, 2, 0, 71, 5, 2, 0,146, 10, 2, 0,147, 10, 2, 0, 68, 0,
+ 2, 0, 44, 7, 2, 0,148, 10, 7, 0,252, 2, 7, 0,149, 10, 7, 0,150, 10, 2, 0,109, 1, 0, 0,151, 10, 0, 0,152, 10,
+ 4, 0,153, 10, 4, 0,154, 10,157, 1, 9, 0, 7, 0,155, 10, 7, 0,156, 10, 7, 0,151, 9, 7, 0, 94, 3, 7, 0,157, 10,
+ 7, 0,219, 6, 2, 0, 92, 3, 0, 0,158, 10, 0, 0, 27, 0,158, 1, 4, 0, 7, 0,159, 10, 7, 0,160, 10, 2, 0, 92, 3,
+ 2, 0, 27, 0,159, 1, 3, 0, 7, 0,161, 10, 7, 0,214, 8, 7, 0, 14, 0,160, 1, 4, 0, 0, 0, 35, 0,204, 0, 82, 5,
+ 4, 0,129, 0, 4, 0,132, 4,161, 1, 6, 0, 0, 0,162, 10,204, 0,163, 10, 4, 0,129, 0, 4, 0,132, 4, 4, 0,164, 10,
+ 4, 0, 27, 0,162, 1, 4, 0, 2, 0,165, 10, 2, 0,166, 10, 4, 0, 30, 0,204, 0,163, 10,163, 1, 9, 0, 7, 0,167, 10,
+ 7, 0,168, 10, 7, 0,169, 10, 7, 0, 93, 2, 7, 0,170, 10, 7, 0,171, 10, 7, 0,172, 10, 2, 0,173, 10, 2, 0,174, 10,
+164, 1, 8, 0, 2, 0,175, 10, 2, 0,176, 10, 2, 0,177, 10, 2, 0,178, 10, 7, 0,179, 10, 7, 0,180, 10, 7, 0,181, 10,
+ 7, 0,182, 10,165, 1, 2, 0, 7, 0, 5, 0, 7, 0, 6, 0,166, 1, 2, 0, 0, 0,170, 0, 0, 0,183, 10,167, 1, 1, 0,
+ 0, 0, 19, 0,168, 1, 12, 0, 0, 0,184, 10, 0, 0,185, 10, 0, 0,210, 6, 0, 0,186, 10, 2, 0, 71, 5, 2, 0,187, 10,
+ 7, 0,188, 10, 7, 0,189, 10, 7, 0,190, 10, 7, 0,148, 3, 7, 0,191, 10, 7, 0,192, 10,169, 1, 2, 0, 11, 0,193, 10,
+ 11, 0,194, 10,170, 1, 13, 0, 0, 0, 74, 5, 0, 0, 16, 0, 0, 0, 92, 3, 0, 0, 94, 3, 0, 0,185, 10, 0, 0,108, 0,
+ 0, 0,181, 2, 7, 0,195, 10, 7, 0,196, 10, 7, 0,147, 3, 7, 0,197, 10, 7, 0,198, 10, 7, 0,192, 10,171, 1, 8, 0,
+ 7, 0, 49, 9, 7, 0,128, 0, 7, 0,152, 10, 7, 0,172, 2, 7, 0,199, 10, 7, 0,240, 0, 7, 0,200, 10, 4, 0, 16, 0,
+172, 1, 4, 0, 2, 0,201, 10, 2, 0,202, 10, 2, 0,203, 10, 2, 0, 27, 0,173, 1, 8, 0, 7, 0,204, 10, 7, 0,220, 2,
+ 7, 0,205, 10, 7, 0,192, 8, 7, 0,193, 8, 7, 0,194, 8, 7, 0,206, 10, 7, 0,207, 10,174, 1, 6, 0, 2, 0,208, 10,
+ 2, 0,209, 10, 7, 0,210, 10, 7, 0,211, 10, 7, 0,212, 10, 7, 0,213, 10,175, 1, 2, 0, 58, 0,214, 10, 59, 0,215, 10,
+176, 1, 3, 0,175, 1, 80, 6, 7, 0,216, 10, 7, 0,217, 10,177, 1, 3, 0,175, 1, 80, 6, 4, 0,218, 10, 4, 0, 27, 0,
+178, 1, 1, 0,175, 1, 80, 6,179, 1, 3, 0,175, 1, 80, 6, 4, 0,218, 10, 4, 0,219, 10,180, 1, 3, 0,175, 1, 80, 6,
+ 4, 0,220, 10, 4, 0, 27, 0,181, 1, 1, 0,175, 1, 80, 6,182, 1, 3, 0,175, 1, 80, 6, 4, 0,221, 10, 4, 0, 27, 0,
+183, 1, 3, 0,175, 1, 80, 6, 4, 0,222, 10, 4, 0, 27, 0,184, 1, 3, 0,175, 1, 80, 6, 4, 0,223, 10, 4, 0, 27, 0,
+185, 1, 3, 0,175, 1, 80, 6, 4, 0,250, 0, 4, 0, 27, 0,186, 1, 1, 0, 0, 0, 19, 0,187, 1, 1, 0, 0, 0, 19, 0,
+188, 1, 4, 0, 7, 0, 5, 0, 7, 0, 6, 0, 2, 0, 18, 0, 2, 0,224, 10,189, 1, 10, 0, 2, 0, 62, 4, 2, 0, 18, 0,
+ 7, 0,217, 4, 7, 0,225, 10, 7, 0,226, 10, 7, 0,227, 10, 7, 0,228, 10,188, 1,229, 10,188, 1,230, 10,188, 1,231, 10,
+ 54, 0, 11, 0, 4, 0, 18, 0, 4, 0, 63, 0, 4, 0,232, 10, 4, 0,233, 10, 19, 0,234, 10, 19, 0,235, 10,189, 1,236, 10,
+ 7, 0,237, 10, 7, 0,238, 10, 7, 0,239, 10, 7, 0,240, 10, 0, 1, 10, 0, 4, 0,255, 9, 4, 0,241, 10, 7, 0,242, 10,
+ 7, 0,243, 10, 7, 0,244, 10, 7, 0,245, 10, 7, 0, 9, 0, 7, 0, 11, 0, 4, 0, 87, 1, 4, 0, 1, 3,255, 0, 18, 0,
+ 4, 0,132, 0, 4, 0,246, 10, 4, 0,247, 10, 7, 0,248, 10, 4, 0,249, 10, 7, 0,250, 10, 7, 0,251, 10, 4, 0,252, 10,
+ 7, 0,253, 10, 4, 0,254, 10, 7, 0,255, 10, 0, 1, 0, 11, 7, 0, 1, 11, 7, 0, 2, 11, 7, 0, 3, 11, 7, 0, 4, 11,
+ 4, 0, 5, 11, 4, 0, 27, 0,190, 1, 4, 0, 42, 0,244, 2, 7, 0, 6, 11, 7, 0,178, 1, 7, 0, 27, 0,213, 0, 35, 0,
+ 22, 0, 32, 0,190, 1, 7, 11, 54, 0,229, 10, 46, 0, 8, 11, 52, 0, 9, 11, 25, 0,154, 0, 0, 0, 10, 11, 7, 0, 11, 11,
+ 2, 0,110, 6, 2, 0, 12, 11, 7, 0, 40, 2, 4, 0,108, 0, 4, 0, 18, 0, 7, 0, 13, 11, 4, 0, 90, 2, 4, 0, 14, 11,
+ 7, 0, 15, 11, 7, 0, 16, 11, 7, 0, 17, 11, 7, 0,178, 1, 4, 0, 18, 11, 7, 0, 19, 11, 0, 0, 20, 11, 0, 0, 21, 11,
+ 0, 0, 22, 11, 0, 0, 27, 0, 7, 0, 23, 11, 7, 0, 24, 11, 7, 0, 25, 11, 7, 0, 1, 3, 7, 0, 26, 11, 4, 0, 27, 11,
+ 7, 0,242, 5, 7, 0, 28, 11, 7, 0, 29, 11,191, 1, 10, 0, 4, 0, 16, 0, 4, 0,128, 0, 4, 0, 18, 0, 4, 0, 15, 4,
+ 4, 0, 30, 11, 4, 0, 31, 11, 4, 0, 32, 11, 4, 0, 70, 0, 0, 0, 19, 0, 11, 0, 2, 0,192, 1, 1, 0, 0, 0, 71, 7,
+ 95, 0, 8, 0,191, 1, 33, 11, 4, 0, 34, 11, 4, 0, 35, 11, 4, 0, 36, 11, 4, 0, 37, 11, 4, 0, 30, 0, 11, 0, 38, 11,
+192, 1, 39, 11,193, 1, 5, 0, 7, 0,165, 2, 7, 0,240, 2, 7, 0, 40, 2, 2, 0,147, 2, 2, 0, 27, 0,194, 1, 5, 0,
+ 7, 0,165, 2, 7, 0,159, 4, 7, 0, 40, 11, 7, 0, 41, 11, 7, 0,240, 2,195, 1, 5, 0, 27, 0, 42, 11,196, 1, 21, 0,
+ 7, 0, 76, 6, 7, 0, 43, 11, 7, 0, 56, 0,197, 1, 3, 0, 7, 0, 44, 11, 4, 0, 45, 11, 4, 0, 46, 11,198, 1, 7, 0,
+ 4, 0, 47, 11, 4, 0, 48, 11, 4, 0, 49, 11, 7, 0, 50, 11, 7, 0, 51, 11, 7, 0, 52, 11, 7, 0, 56, 0,199, 1, 8, 0,
+199, 1, 0, 0,199, 1, 1, 0, 27, 0, 44, 0, 4, 0, 3, 1, 2, 0, 18, 0, 2, 0, 87, 1, 7, 0,240, 2, 7, 0, 57, 9,
+200, 1, 7, 0,200, 1, 0, 0,200, 1, 1, 0, 27, 0, 44, 0, 2, 0,225, 2, 2, 0, 18, 0, 2, 0, 14, 2, 2, 0, 56, 0,
+201, 1, 17, 0,194, 1, 8, 4,194, 1, 53, 11,193, 1, 54, 11,194, 1, 40, 9,195, 1, 55, 11, 4, 0, 82, 0, 7, 0,240, 2,
+ 7, 0, 7, 3, 7, 0, 56, 11, 4, 0, 47, 11, 4, 0, 57, 11, 7, 0, 51, 11, 7, 0, 52, 11, 7, 0,108, 0, 4, 0, 58, 11,
+ 2, 0, 18, 0, 2, 0, 59, 11,202, 1, 15, 0, 7, 0,255, 0, 7, 0, 60, 11, 7, 0, 44, 11, 7, 0, 61, 11, 7, 0, 62, 11,
+ 7, 0, 63, 11, 7, 0, 64, 11, 7, 0, 65, 11, 7, 0, 66, 11, 7, 0, 67, 11, 7, 0, 68, 11, 7, 0, 69, 11, 7, 0, 70, 11,
+ 4, 0, 18, 0, 4, 0, 71, 11,203, 1,128, 0, 22, 0, 32, 0, 34, 0, 75, 0,204, 1, 72, 11,202, 1, 73, 11,187, 0,154, 4,
+ 4, 0, 18, 0, 4, 0, 56, 0, 2, 0, 16, 0, 2, 0, 59, 10, 2, 0, 74, 11, 2, 0,122, 1, 2, 0, 75, 11, 2, 0,232, 3,
+ 2, 0, 76, 11, 2, 0, 77, 11, 2, 0, 78, 11, 2, 0, 79, 11, 2, 0, 80, 11, 2, 0, 81, 11, 2, 0, 82, 11, 2, 0, 83, 11,
+ 2, 0, 84, 11, 2, 0,226, 5, 2, 0, 85, 11, 2, 0, 86, 11, 2, 0, 87, 11, 2, 0, 88, 11, 2, 0, 89, 11, 2, 0, 29, 2,
+ 2, 0, 33, 9, 2, 0, 8, 9, 2, 0, 90, 11, 2, 0, 91, 11, 2, 0, 25, 4, 2, 0, 26, 4, 2, 0, 92, 11, 2, 0, 93, 11,
+ 2, 0, 94, 11, 2, 0, 95, 11, 7, 0, 96, 11, 7, 0, 97, 11, 7, 0, 98, 11, 7, 0, 99, 11, 7, 0,100, 11, 7, 0,101, 11,
+ 7, 0,102, 11, 2, 0,156, 5, 2, 0,103, 11, 7, 0,104, 11, 7, 0,105, 11, 7, 0,106, 11, 7, 0, 15, 9, 7, 0, 91, 0,
+ 7, 0, 7, 3, 7, 0, 21, 9, 7, 0,107, 11, 7, 0,108, 11, 7, 0,109, 11, 7, 0,110, 11, 7, 0,111, 11, 7, 0,112, 11,
+ 4, 0, 16, 9, 4, 0, 14, 9, 4, 0,113, 11, 4, 0,114, 11, 2, 0,115, 11, 2, 0,116, 11, 7, 0, 17, 9, 7, 0, 18, 9,
+ 7, 0, 19, 9, 7, 0,117, 11, 7, 0,118, 11, 7, 0,119, 11, 7, 0,120, 11, 7, 0,121, 11, 7, 0,122, 11, 7, 0,123, 11,
+ 7, 0,124, 11, 7, 0,125, 11, 7, 0,222, 3, 7, 0,108, 0, 7, 0,126, 11, 7, 0,127, 11, 7, 0,128, 11, 7, 0,129, 11,
+ 7, 0,214, 0, 7, 0,130, 11, 4, 0,131, 11, 4, 0,132, 11, 7, 0,133, 11, 7, 0,134, 11, 7, 0,135, 11, 7, 0,136, 11,
+ 7, 0,137, 11, 7, 0,213, 0, 7, 0,138, 11, 7, 0, 52, 4, 7, 0, 50, 4, 7, 0, 51, 4, 7, 0,139, 11, 7, 0,140, 11,
+ 7, 0,141, 11, 7, 0,142, 11, 7, 0,143, 11, 7, 0,144, 11, 7, 0,145, 11, 7, 0,146, 11, 7, 0,147, 11, 7, 0,148, 11,
+ 7, 0,149, 11, 7, 0,150, 11, 7, 0,151, 11, 7, 0,152, 11, 7, 0,153, 11, 7, 0,154, 11, 7, 0,155, 11, 7, 0,156, 11,
+ 4, 0,157, 11, 4, 0,158, 11, 46, 0,140, 1, 64, 0, 0, 4, 14, 0,159, 11, 64, 0,160, 11, 27, 0,161, 11, 27, 0,162, 11,
+ 31, 0, 80, 0,182, 0, 73, 1,182, 0,163, 11,150, 0, 52, 0,150, 0, 0, 0,150, 0, 1, 0,203, 1,164, 11,201, 1,165, 11,
+198, 1,218, 9,190, 0, 80, 4, 11, 0, 81, 4,205, 1,166, 11,205, 1,167, 11, 14, 0,168, 11, 14, 0,169, 11,135, 0,170, 11,
+143, 0,171, 11,143, 0,172, 11, 27, 0,173, 11, 27, 0,174, 11, 27, 0, 38, 0, 14, 0, 26, 10, 0, 0, 19, 0, 7, 0,244, 0,
+ 7, 0, 36, 3, 7, 0,175, 11, 7, 0,176, 11, 4, 0,214, 2, 4, 0,177, 11, 4, 0, 18, 0, 4, 0, 16, 9, 4, 0,178, 11,
+ 4, 0,179, 11, 4, 0,180, 11, 4, 0,181, 11, 2, 0,251, 0, 2, 0,182, 11, 2, 0,183, 11, 2, 0,184, 11, 0, 0,185, 11,
+ 2, 0,186, 11, 2, 0,187, 11, 2, 0,188, 11, 11, 0,189, 11,139, 0,153, 4, 14, 0, 21, 3, 14, 0,190, 11,197, 1,191, 11,
+ 4, 0,192, 11, 4, 0,193, 11,206, 1,194, 11,141, 0, 33, 3,207, 1,195, 11, 7, 0,196, 11, 7, 0,197, 11, 7, 0,198, 11,
+137, 0, 38, 0,208, 1,152, 9, 7, 0,123, 4, 7, 0,199, 11, 7, 0,200, 11, 7, 0, 76, 6, 7, 0,236, 3, 7, 0,222, 3,
+ 7, 0,201, 11, 7, 0, 92, 2, 7, 0,202, 11, 7, 0,203, 11, 7, 0,204, 11, 7, 0,205, 11, 7, 0,206, 11, 7, 0,207, 11,
+ 7, 0,124, 4, 7, 0,208, 11, 7, 0,209, 11, 7, 0,210, 11, 7, 0,125, 4, 7, 0,121, 4, 7, 0,122, 4, 7, 0,211, 11,
+ 7, 0,212, 11, 7, 0,213, 11, 4, 0,214, 11, 4, 0, 92, 0, 4, 0,215, 11, 4, 0,216, 11, 2, 0,217, 11, 2, 0,218, 11,
+ 2, 0,219, 11, 2, 0,220, 11, 2, 0,221, 11, 2, 0,222, 11, 2, 0,223, 11, 2, 0, 27, 0,187, 0,154, 4,138, 0, 11, 0,
+208, 1,224, 11, 7, 0,225, 11, 7, 0,226, 11, 7, 0,251, 1, 7, 0,227, 11, 7, 0,228, 11, 7, 0,229, 11, 4, 0, 92, 0,
+ 2, 0,230, 11, 2, 0,231, 11, 64, 0,250, 1,209, 1, 4, 0, 7, 0, 5, 0, 7, 0, 6, 0, 7, 0, 7, 0, 7, 0,232, 11,
+210, 1, 6, 0,210, 1, 0, 0,210, 1, 1, 0,209, 1,194, 9, 4, 0, 1, 1, 2, 0,233, 11, 2, 0, 18, 0,211, 1, 5, 0,
+211, 1, 0, 0,211, 1, 1, 0, 14, 0,234, 11, 4, 0,235, 11, 4, 0, 18, 0,212, 1, 9, 0,212, 1, 0, 0,212, 1, 1, 0,
+ 14, 0,127, 0,211, 1,236, 11, 4, 0, 18, 0, 2, 0,233, 11, 2, 0,237, 11, 7, 0, 93, 0, 0, 0,238, 11,178, 0, 6, 0,
+ 22, 0, 32, 0, 14, 0,125, 5, 4, 0, 18, 0, 2, 0,239, 11, 2, 0,240, 11, 11, 0,241, 11,213, 1, 6, 0, 14, 0,242, 11,
+ 4, 0,243, 11, 4, 0,244, 11, 4, 0, 18, 0, 4, 0, 27, 0,237, 0,245, 11,214, 1, 19, 0, 22, 0, 32, 0,215, 1,246, 11,
+215, 1,247, 11, 14, 0,248, 11, 4, 0,249, 11, 2, 0,250, 11, 2, 0,251, 11, 14, 0,252, 11, 14, 0,253, 11,213, 1,254, 11,
+ 14, 0,255, 11, 14, 0, 0, 12, 14, 0, 1, 12, 14, 0, 2, 12,216, 1, 3, 12,216, 1, 4, 12,216, 1, 5, 12, 14, 0, 6, 12,
+237, 0, 7, 12,215, 1, 32, 0,215, 1, 0, 0,215, 1, 1, 0, 11, 0, 8, 12, 4, 0,120, 8, 2, 0, 9, 12, 2, 0, 27, 0,
+ 27, 1, 10, 12, 27, 1, 11, 12, 0, 0, 12, 12, 2, 0, 13, 12, 2, 0, 14, 12, 2, 0,142, 8, 2, 0,143, 8, 2, 0, 15, 12,
+ 2, 0, 16, 12, 2, 0, 15, 4, 2, 0, 54, 7, 2, 0, 17, 12, 2, 0, 18, 12, 2, 0, 19, 12, 2, 0, 30, 0,217, 1, 20, 12,
+218, 1, 21, 12,219, 1, 22, 12, 4, 0, 23, 12, 4, 0, 24, 12, 11, 0, 25, 12, 14, 0,253, 11, 14, 0,162, 8, 14, 0, 26, 12,
+ 14, 0, 27, 12, 14, 0, 28, 12,220, 1, 18, 0,220, 1, 0, 0,220, 1, 1, 0, 0, 0, 29, 12, 21, 0, 31, 0, 0, 0, 30, 12,
+ 2, 0, 31, 12, 2, 0, 16, 0, 2, 0, 14, 0, 2, 0, 32, 12, 2, 0, 33, 12, 2, 0, 34, 12, 2, 0, 35, 12, 2, 0, 36, 12,
+ 2, 0, 18, 0, 2, 0, 37, 12, 2, 0, 32, 0, 2, 0, 27, 0,221, 1, 38, 12,222, 1, 4, 0,222, 1, 0, 0,222, 1, 1, 0,
+220, 1, 39, 12,220, 1, 40, 12,223, 1, 11, 0,223, 1, 0, 0,223, 1, 1, 0, 14, 0, 41, 12, 14, 0, 42, 12, 0, 0, 29, 12,
+ 2, 0, 43, 12, 2, 0, 44, 12, 2, 0, 18, 0, 2, 0, 45, 12, 4, 0, 46, 12, 11, 0, 47, 12,216, 1, 7, 0,216, 1, 0, 0,
+216, 1, 1, 0, 0, 0, 29, 12, 0, 0, 48, 12, 14, 0, 60, 8, 4, 0, 49, 12, 4, 0, 18, 0,249, 0, 14, 0,249, 0, 0, 0,
+249, 0, 1, 0, 0, 0, 29, 12, 21, 0, 31, 0,224, 1,136, 8, 11, 0, 50, 12, 11, 0, 51, 12,221, 1, 38, 12,213, 1, 52, 12,
+ 14, 0, 53, 12,249, 0, 54, 12, 32, 1,240, 6, 2, 0, 18, 0, 2, 0, 86, 1,225, 1, 12, 0,225, 1, 0, 0,225, 1, 1, 0,
+ 11, 0, 2, 0, 11, 0, 55, 12, 0, 0, 19, 0, 2, 0, 16, 0, 2, 0, 18, 0, 7, 0,140, 9, 7, 0,129, 0, 7, 0,132, 4,
+ 7, 0, 90, 9, 7, 0, 82, 10,226, 1, 5, 0, 7, 0, 56, 12, 4, 0, 57, 12, 4, 0, 58, 12, 4, 0, 87, 1, 4, 0, 18, 0,
+227, 1, 6, 0, 7, 0, 59, 12, 7, 0, 60, 12, 7, 0, 61, 12, 7, 0, 62, 12, 4, 0, 16, 0, 4, 0, 18, 0,228, 1, 5, 0,
+ 7, 0,118, 9, 7, 0,119, 9, 7, 0,240, 2, 2, 0, 43, 2, 2, 0, 44, 2,229, 1, 5, 0,228, 1, 2, 0, 4, 0, 53, 0,
+ 7, 0, 63, 12, 7, 0,118, 9, 7, 0,119, 9,230, 1, 4, 0, 2, 0, 64, 12, 2, 0, 65, 12, 2, 0, 66, 12, 2, 0, 67, 12,
+231, 1, 2, 0, 37, 0, 38, 7, 21, 0,158, 9,232, 1, 3, 0, 19, 0, 68, 12, 4, 0, 18, 0, 4, 0, 27, 0,233, 1, 6, 0,
+ 7, 0,108, 0, 7, 0,209, 2, 7, 0, 69, 12, 7, 0, 27, 0, 2, 0,250, 0, 2, 0, 70, 12,234, 1, 5, 0, 7, 0, 71, 12,
+ 7, 0,128, 0, 7, 0,195, 9, 7, 0,196, 9, 4, 0, 18, 0,235, 1, 6, 0, 22, 0, 43, 7, 0, 0, 72, 12, 0, 0, 73, 12,
+ 2, 0, 74, 12, 2, 0, 18, 0, 4, 0, 75, 12,236, 1, 7, 0,236, 1, 0, 0,236, 1, 1, 0, 0, 0, 19, 0,235, 1, 76, 12,
+ 2, 0, 77, 12, 2, 0, 16, 0, 7, 0, 60, 0,237, 1, 7, 0, 14, 0, 78, 12, 0, 0, 79, 12, 11, 0, 80, 12, 7, 0, 60, 0,
+ 7, 0,140, 9, 4, 0, 16, 0, 4, 0, 18, 0,238, 1, 3, 0, 7, 0, 81, 12, 4, 0, 18, 0, 4, 0, 27, 0,239, 1, 15, 0,
+239, 1, 0, 0,239, 1, 1, 0,106, 1, 13, 10,237, 1, 61, 0, 14, 0,188, 3, 30, 0, 49, 0,238, 1, 82, 12, 4, 0, 53, 0,
+ 7, 0, 60, 0, 2, 0, 18, 0, 2, 0, 22, 1, 4, 0, 83, 12, 0, 0, 72, 12, 4, 0, 84, 12, 7, 0, 85, 12,240, 1, 2, 0,
+ 0, 0, 86, 12, 0, 0, 87, 12,241, 1, 4, 0,241, 1, 0, 0,241, 1, 1, 0,176, 0, 70, 3, 14, 0, 88, 12,242, 1, 25, 0,
+242, 1, 0, 0,242, 1, 1, 0, 14, 0, 89, 12,176, 0, 88, 9,241, 1, 90, 12, 14, 0, 91, 12, 14, 0,188, 3, 0, 0, 19, 0,
+ 7, 0,140, 9, 7, 0, 92, 12, 7, 0, 90, 0, 7, 0, 91, 0, 7, 0, 78, 10, 7, 0, 79, 10, 7, 0,253, 2, 7, 0,148, 3,
+ 7, 0, 90, 9, 7, 0, 82, 10, 2, 0, 93, 12, 2, 0, 94, 12, 2, 0, 67, 0, 2, 0, 16, 0, 11, 0, 95, 12, 4, 0, 18, 0,
+ 4, 0, 30, 0,243, 1, 6, 0,243, 1, 0, 0,243, 1, 1, 0, 14, 0, 89, 12, 4, 0, 18, 0, 4, 0, 14, 2, 0, 0, 19, 0,
+244, 1, 11, 0,244, 1, 0, 0,244, 1, 1, 0, 22, 0, 43, 7, 0, 0, 96, 12, 4, 0, 75, 12, 2, 0, 97, 12, 2, 0, 27, 0,
+ 0, 0, 72, 12, 4, 0, 83, 12, 2, 0, 18, 0, 2, 0, 98, 12,245, 1, 10, 0,245, 1, 0, 0,245, 1, 1, 0, 14, 0, 99, 12,
+ 0, 0, 29, 12, 0, 0, 19, 0, 0, 0,100, 12, 0, 0,101, 12, 2, 0, 18, 0, 2, 0, 98, 12, 4, 0,102, 12,246, 1, 5, 0,
+246, 1, 0, 0,246, 1, 1, 0, 0, 0, 72, 12, 4, 0, 83, 12, 7, 0,230, 2, 34, 0, 12, 0,176, 0,179, 3,176, 0,103, 12,
+241, 1, 90, 12, 14, 0,104, 12,242, 1,105, 12, 14, 0,106, 12, 14, 0,107, 12, 4, 0, 18, 0, 4, 0,251, 0, 2, 0,108, 12,
+ 2, 0,109, 12, 7, 0,110, 12,247, 1, 2, 0, 22, 0, 32, 0, 34, 0, 75, 0,248, 1, 5, 0,248, 1, 0, 0,248, 1, 1, 0,
+ 4, 0, 16, 0, 4, 0, 18, 0, 0, 0,174, 5,249, 1, 6, 0,248, 1,111, 12, 27, 0, 44, 0, 4, 0,112, 12, 7, 0,113, 12,
+ 4, 0,114, 12, 4, 0,255, 9,250, 1, 3, 0,248, 1,111, 12, 4, 0,112, 12, 7, 0,115, 12,251, 1, 8, 0,248, 1,111, 12,
+ 27, 0, 44, 0, 7, 0, 77, 1, 7, 0,116, 12, 7, 0, 36, 3, 7, 0,151, 9, 4, 0,112, 12, 4, 0,117, 12,252, 1, 5, 0,
+248, 1,111, 12, 7, 0,118, 12, 7, 0,176, 2, 7, 0, 3, 3, 7, 0, 56, 0,253, 1, 3, 0,248, 1,111, 12, 7, 0,151, 9,
+ 7, 0,119, 12,196, 1, 4, 0, 7, 0,120, 12, 7, 0,127, 11, 2, 0,121, 12, 2, 0, 87, 1,254, 1, 14, 0,254, 1, 0, 0,
+254, 1, 1, 0, 14, 0,122, 12, 14, 0,123, 12, 14, 0,124, 12, 0, 0,174, 5, 4, 0, 32, 0, 4, 0, 18, 0, 4, 0,125, 12,
+ 7, 0,126, 12, 4, 0,114, 12, 4, 0,255, 9, 7, 0, 84, 4, 7, 0, 5, 3,204, 1, 23, 0, 4, 0,112, 12, 4, 0,127, 12,
+ 7, 0,128, 12, 7, 0, 1, 3, 7, 0,129, 12, 7, 0,231, 8, 7, 0,120, 12, 7, 0,130, 12, 7, 0,209, 2, 7, 0,248, 10,
+ 7, 0,217, 4, 7, 0,131, 12, 7, 0,132, 12, 7, 0,133, 12, 7, 0,134, 12, 7, 0,135, 12, 7, 0,136, 12, 7, 0,137, 12,
+ 7, 0,138, 12, 7, 0,139, 12, 7, 0,140, 12, 7, 0,141, 12, 14, 0,142, 12,123, 0, 40, 0,122, 0,143, 12,255, 1, 73, 11,
+ 64, 0,144, 12, 64, 0,160, 11, 64, 0,145, 12, 0, 2,146, 12, 43, 0,169, 0, 43, 0,147, 12, 43, 0,148, 12, 7, 0,149, 12,
+ 7, 0,150, 12, 7, 0,151, 12, 7, 0,152, 12, 7, 0,153, 12, 7, 0,119, 8, 7, 0,154, 12, 7, 0,178, 1, 7, 0,155, 12,
+ 4, 0,156, 12, 4, 0,157, 12, 4, 0,158, 12, 4, 0, 92, 0, 4, 0, 27, 0, 4, 0,159, 12, 2, 0,160, 12, 2, 0,161, 12,
+ 4, 0,162, 12, 7, 0,209, 2, 4, 0,163, 12, 7, 0,164, 12, 4, 0,165, 12, 4, 0,166, 12, 4, 0,167, 12,139, 0,168, 12,
+ 14, 0,169, 12,187, 0,154, 4, 4, 0,170, 12, 7, 0,171, 12, 7, 0,172, 12, 4, 0, 30, 0,124, 0, 12, 0,122, 0,143, 12,
+150, 0, 56, 3, 7, 0,143, 1, 7, 0,119, 8, 7, 0,173, 12, 7, 0,174, 12, 7, 0,175, 12, 2, 0,176, 12, 2, 0,177, 12,
+ 2, 0,178, 12, 2, 0, 16, 0, 4, 0, 92, 0,125, 0, 15, 0,122, 0,143, 12,141, 0, 33, 3, 7, 0,194, 9, 7, 0,179, 12,
+ 7, 0,180, 12, 4, 0,181, 12, 7, 0, 79, 1, 7, 0,182, 12, 4, 0, 35, 10, 4, 0, 29, 3, 4, 0,183, 12, 7, 0,152, 12,
+ 2, 0, 16, 0, 2, 0, 27, 0, 4, 0, 30, 0, 1, 2, 15, 0, 22, 0, 32, 0, 34, 0, 75, 0, 46, 1,229, 8, 7, 0,184, 12,
+ 7, 0,185, 12, 7, 0,186, 12, 7, 0,187, 12, 7, 0,150, 9, 7, 0,188, 12, 7, 0,189, 12, 7, 0,190, 12, 7, 0, 84, 4,
+ 7, 0,231, 8, 2, 0, 18, 0, 2, 0,114, 9,231, 0, 3, 0, 4, 0,126, 0, 2, 0,216, 6, 2, 0,191, 12, 2, 2, 5, 0,
+ 0, 0,195, 8, 2, 0,196, 8, 2, 0, 74, 5, 2, 0,192, 12, 2, 0,193, 12,229, 0, 16, 0, 22, 0, 32, 0, 34, 0, 75, 0,
+ 0, 0, 35, 0, 4, 0,143, 0, 4, 0,144, 0, 4, 0,194, 12, 7, 0,162, 0, 7, 0,163, 0, 44, 0,138, 0, 3, 2,152, 9,
+178, 0,182, 3, 4, 2,195, 12, 11, 0,196, 12, 2, 2,197, 12, 4, 0, 18, 0, 4, 0, 22, 0, 13, 1, 10, 0, 4, 0,132, 0,
+ 4, 0,198, 12, 52, 0,199, 12, 7, 0,200, 12, 2, 0,201, 12, 0, 0,181, 2, 4, 0,126, 0, 5, 2,175, 3, 6, 2,202, 12,
+ 7, 0,203, 12, 7, 2, 3, 0, 4, 0,126, 0, 7, 0,204, 12, 7, 0, 79, 1, 8, 2, 11, 0, 11, 0,205, 12, 7, 0,206, 12,
+ 7, 0,207, 12, 7, 0, 27, 0, 7, 0,208, 12, 2, 0,209, 12, 2, 0, 67, 0, 7, 0,210, 12, 7, 0,211, 12, 7, 0,212, 12,
+ 7, 0,213, 12, 6, 2, 3, 0, 7, 0,214, 12, 4, 0,126, 0, 4, 0, 18, 0, 5, 2, 24, 0, 5, 2, 0, 0, 5, 2, 1, 0,
+ 0, 0, 19, 0, 7, 0,215, 12, 7, 0,216, 12, 7, 0,217, 12, 7, 0,218, 12, 7, 0, 6, 11, 4, 0,219, 12, 4, 0,220, 12,
+ 6, 2,221, 12, 7, 0,222, 12, 7, 0,204, 12, 4, 0, 18, 0, 4, 0,223, 12, 4, 0,224, 12, 7, 0, 85, 12, 2, 0,225, 12,
+ 2, 0,227, 3, 2, 0,226, 12, 2, 0,227, 12, 2, 0,228, 12, 2, 0, 30, 0, 7, 0,229, 12, 9, 2, 22, 0, 4, 0, 18, 0,
+ 2, 0,230, 12, 2, 0,231, 12, 7, 0,232, 12, 2, 0,233, 12, 2, 0,234, 12, 2, 0,235, 12, 2, 0,236, 12, 2, 0,237, 12,
+ 2, 0,238, 12, 2, 0,239, 12, 2, 0, 3, 3, 4, 0,240, 12, 4, 0,241, 12, 2, 0,242, 12, 2, 0, 30, 0, 7, 0, 94, 1,
+ 4, 0,243, 12, 4, 0,244, 12, 7, 0,245, 12, 7, 0,246, 12, 4, 0,247, 1, 10, 2, 12, 0, 4, 0, 18, 0, 4, 0,247, 12,
+ 4, 0,248, 12, 7, 0,249, 12, 5, 2,250, 12, 7, 0,251, 12, 7, 0,252, 12, 7, 0,253, 12, 4, 0,190, 1, 4, 0,132, 0,
+ 7, 0,148, 3, 52, 0,254, 12, 11, 2, 5, 0, 4, 0, 18, 0, 7, 0,204, 12, 4, 0,255, 12, 4, 0, 0, 13, 7, 2, 1, 13,
+ 12, 2, 7, 0, 12, 2, 0, 0, 12, 2, 1, 0, 0, 0, 19, 0, 4, 0, 18, 0, 7, 0,148, 3, 14, 0, 2, 13, 11, 2, 3, 13,
+ 13, 2, 1, 0, 0, 0, 4, 13, 14, 2, 5, 0, 14, 2, 0, 0, 14, 2, 1, 0, 5, 2,175, 3, 4, 0, 18, 0, 4, 0, 27, 0,
+ 15, 2, 3, 0, 14, 0,255, 9, 4, 0, 5, 13, 4, 0, 27, 0, 4, 2, 11, 0, 9, 2, 6, 13, 8, 2, 7, 13, 14, 0, 2, 13,
+ 11, 2, 3, 13, 10, 2, 8, 13, 5, 2, 9, 13, 14, 0, 10, 13, 4, 0, 11, 13, 4, 0, 12, 13, 13, 2, 91, 6, 15, 2, 13, 13,
+ 16, 2, 48, 0, 16, 2, 0, 0, 16, 2, 1, 0,169, 0,145, 3, 17, 2, 2, 0, 64, 0, 14, 13,187, 0,154, 4,139, 0,153, 4,
+ 14, 0, 21, 3, 4, 0, 15, 13, 0, 0, 19, 0, 2, 0,163, 10, 2, 0, 16, 0, 2, 0, 16, 13, 2, 0, 17, 13, 2, 0, 18, 13,
+ 2, 0, 19, 13, 2, 0, 20, 13, 2, 0, 21, 13, 4, 0, 92, 0, 4, 0,186, 3, 4, 0, 22, 13, 4, 0, 23, 13, 4, 0,195, 9,
+ 4, 0,196, 9, 4, 0, 27, 0, 7, 0, 24, 13, 47, 0, 25, 13, 0, 0, 26, 13, 4, 0, 27, 13, 4, 0,162, 12, 7, 0, 28, 13,
+ 7, 0, 29, 13, 7, 0, 30, 13, 7, 0, 31, 13, 7, 0, 32, 13, 7, 0, 33, 13, 7, 0, 34, 13, 7, 0, 35, 13, 7, 0, 36, 13,
+ 7, 0, 37, 13, 7, 0, 38, 13, 7, 0, 39, 13, 7, 0, 40, 13, 7, 0, 41, 13, 0, 0,202, 2, 0, 0, 42, 13, 0, 0, 43, 13,
+ 0, 0, 44, 13,169, 0, 7, 0,168, 0, 45, 13,143, 0, 35, 3, 14, 0, 46, 13, 2, 0, 47, 13, 2, 0, 92, 0, 4, 0, 27, 0,
+ 0, 0, 48, 13,170, 0, 24, 0,168, 0, 45, 13,143, 0, 35, 3,150, 0, 56, 3, 63, 0, 26, 2, 4, 0, 92, 0, 4, 0, 49, 13,
+ 7, 0,185, 0, 7, 0,186, 0, 7, 0,187, 0, 7, 0,178, 1, 7, 0, 50, 13, 7, 0, 51, 13, 7, 0, 52, 13, 7, 0, 53, 13,
+ 50, 0, 54, 13, 50, 0, 55, 13, 2, 0, 56, 13, 2, 0,223, 10, 2, 0, 57, 13, 2, 0, 27, 0, 7, 0, 58, 13, 7, 0, 59, 13,
+ 7, 0, 60, 13, 7, 0, 61, 13, 69, 78, 68, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0};
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index 7726e707f08..8d771f0dc58 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -74,23 +74,23 @@
/* flags for sflag */
typedef enum eDrawStrokeFlags {
- GP_DRAWDATA_NOSTATUS = (1<<0), /* don't draw status info */
- GP_DRAWDATA_ONLY3D = (1<<1), /* only draw 3d-strokes */
- GP_DRAWDATA_ONLYV2D = (1<<2), /* only draw 'canvas' strokes */
- GP_DRAWDATA_ONLYI2D = (1<<3), /* only draw 'image' strokes */
- GP_DRAWDATA_IEDITHACK = (1<<4), /* special hack for drawing strokes in Image Editor (weird coordinates) */
- GP_DRAWDATA_NO_XRAY = (1<<5), /* don't draw xray in 3D view (which is default) */
+ GP_DRAWDATA_NOSTATUS = (1 << 0), /* don't draw status info */
+ GP_DRAWDATA_ONLY3D = (1 << 1), /* only draw 3d-strokes */
+ GP_DRAWDATA_ONLYV2D = (1 << 2), /* only draw 'canvas' strokes */
+ GP_DRAWDATA_ONLYI2D = (1 << 3), /* only draw 'image' strokes */
+ GP_DRAWDATA_IEDITHACK = (1 << 4), /* special hack for drawing strokes in Image Editor (weird coordinates) */
+ GP_DRAWDATA_NO_XRAY = (1 << 5), /* don't draw xray in 3D view (which is default) */
} eDrawStrokeFlags;
/* thickness above which we should use special drawing */
-#define GP_DRAWTHICKNESS_SPECIAL 3
+#define GP_DRAWTHICKNESS_SPECIAL 3
/* ----- Tool Buffer Drawing ------ */
/* draw stroke defined in buffer (simple ogl lines/points for now, as dotted lines) */
-static void gp_draw_stroke_buffer (tGPspoint *points, int totpoints, short thickness, short dflag, short sflag)
+static void gp_draw_stroke_buffer(tGPspoint *points, int totpoints, short thickness, short dflag, short sflag)
{
tGPspoint *pt;
int i;
@@ -100,14 +100,14 @@ static void gp_draw_stroke_buffer (tGPspoint *points, int totpoints, short thick
return;
/* check if buffer can be drawn */
- if (dflag & (GP_DRAWDATA_ONLY3D|GP_DRAWDATA_ONLYV2D))
+ if (dflag & (GP_DRAWDATA_ONLY3D | GP_DRAWDATA_ONLYV2D))
return;
/* if drawing a single point, draw it larger */
if (totpoints == 1) {
/* draw point */
glBegin(GL_POINTS);
- glVertex2iv(&points->x);
+ glVertex2iv(&points->x);
glEnd();
}
else if (sflag & GP_STROKE_ERASER) {
@@ -122,7 +122,7 @@ static void gp_draw_stroke_buffer (tGPspoint *points, int totpoints, short thick
glLineWidth(oldpressure * thickness);
glBegin(GL_LINE_STRIP);
- for (i=0, pt=points; i < totpoints && pt; i++, pt++) {
+ for (i = 0, pt = points; i < totpoints && pt; i++, pt++) {
/* if there was a significant pressure change, stop the curve, change the thickness of the stroke,
* and continue drawing again (since line-width cannot change in middle of GL_LINE_STRIP)
*/
@@ -154,12 +154,12 @@ static void gp_draw_stroke_buffer (tGPspoint *points, int totpoints, short thick
/* ----- Existing Strokes Drawing (3D and Point) ------ */
/* draw a given stroke - just a single dot (only one point) */
-static void gp_draw_stroke_point (bGPDspoint *points, short thickness, short dflag, short sflag, int offsx, int offsy, int winx, int winy)
+static void gp_draw_stroke_point(bGPDspoint *points, short thickness, short dflag, short sflag, int offsx, int offsy, int winx, int winy)
{
/* draw point */
if (sflag & GP_STROKE_3DSPACE) {
glBegin(GL_POINTS);
- glVertex3fv(&points->x);
+ glVertex3fv(&points->x);
glEnd();
}
else {
@@ -167,26 +167,26 @@ static void gp_draw_stroke_point (bGPDspoint *points, short thickness, short dfl
/* get coordinates of point */
if (sflag & GP_STROKE_2DSPACE) {
- co[0]= points->x;
- co[1]= points->y;
+ co[0] = points->x;
+ co[1] = points->y;
}
else if (sflag & GP_STROKE_2DIMAGE) {
- co[0]= (points->x * winx) + offsx;
- co[1]= (points->y * winy) + offsy;
+ co[0] = (points->x * winx) + offsx;
+ co[1] = (points->y * winy) + offsy;
}
else {
- co[0]= (points->x / 100 * winx) + offsx;
- co[1]= (points->y / 100 * winy) + offsy;
+ co[0] = (points->x / 100 * winx) + offsx;
+ co[1] = (points->y / 100 * winy) + offsy;
}
/* if thickness is less than GP_DRAWTHICKNESS_SPECIAL, simple dot looks ok
- * - also mandatory in if Image Editor 'image-based' dot
+ * - also mandatory in if Image Editor 'image-based' dot
*/
if ( (thickness < GP_DRAWTHICKNESS_SPECIAL) ||
- ((dflag & GP_DRAWDATA_IEDITHACK) && (sflag & GP_STROKE_2DSPACE)) )
+ ((dflag & GP_DRAWDATA_IEDITHACK) && (sflag & GP_STROKE_2DSPACE)) )
{
glBegin(GL_POINTS);
- glVertex2fv(co);
+ glVertex2fv(co);
glEnd();
}
else {
@@ -206,7 +206,7 @@ static void gp_draw_stroke_point (bGPDspoint *points, short thickness, short dfl
}
/* draw a given stroke in 3d (i.e. in 3d-space), using simple ogl lines */
-static void gp_draw_stroke_3d (bGPDspoint *points, int totpoints, short thickness, short debug)
+static void gp_draw_stroke_3d(bGPDspoint *points, int totpoints, short thickness, short debug)
{
bGPDspoint *pt;
float oldpressure = 0.0f;
@@ -214,7 +214,7 @@ static void gp_draw_stroke_3d (bGPDspoint *points, int totpoints, short thicknes
/* draw stroke curve */
glBegin(GL_LINE_STRIP);
- for (i=0, pt=points; i < totpoints && pt; i++, pt++) {
+ for (i = 0, pt = points; i < totpoints && pt; i++, pt++) {
/* if there was a significant pressure change, stop the curve, change the thickness of the stroke,
* and continue drawing again (since line-width cannot change in middle of GL_LINE_STRIP)
*/
@@ -240,7 +240,7 @@ static void gp_draw_stroke_3d (bGPDspoint *points, int totpoints, short thicknes
/* draw debug points of curve on top? */
if (debug) {
glBegin(GL_POINTS);
- for (i=0, pt=points; i < totpoints && pt; i++, pt++)
+ for (i = 0, pt = points; i < totpoints && pt; i++, pt++)
glVertex3fv(&pt->x);
glEnd();
}
@@ -249,35 +249,35 @@ static void gp_draw_stroke_3d (bGPDspoint *points, int totpoints, short thicknes
/* ----- Fancy 2D-Stroke Drawing ------ */
/* draw a given stroke in 2d */
-static void gp_draw_stroke (bGPDspoint *points, int totpoints, short thickness_s, short dflag, short sflag,
- short debug, int offsx, int offsy, int winx, int winy)
+static void gp_draw_stroke(bGPDspoint *points, int totpoints, short thickness_s, short dflag, short sflag,
+ short debug, int offsx, int offsy, int winx, int winy)
{
/* otherwise thickness is twice that of the 3D view */
- float thickness= (float)thickness_s * 0.5f;
+ float thickness = (float)thickness_s * 0.5f;
/* if thickness is less than GP_DRAWTHICKNESS_SPECIAL, 'smooth' opengl lines look better
- * - 'smooth' opengl lines are also required if Image Editor 'image-based' stroke
+ * - 'smooth' opengl lines are also required if Image Editor 'image-based' stroke
*/
if ( (thickness < GP_DRAWTHICKNESS_SPECIAL) ||
- ((dflag & GP_DRAWDATA_IEDITHACK) && (dflag & GP_DRAWDATA_ONLYV2D)) )
+ ((dflag & GP_DRAWDATA_IEDITHACK) && (dflag & GP_DRAWDATA_ONLYV2D)) )
{
bGPDspoint *pt;
int i;
glBegin(GL_LINE_STRIP);
- for (i=0, pt=points; i < totpoints && pt; i++, pt++) {
+ for (i = 0, pt = points; i < totpoints && pt; i++, pt++) {
if (sflag & GP_STROKE_2DSPACE) {
glVertex2f(pt->x, pt->y);
}
else if (sflag & GP_STROKE_2DIMAGE) {
- const float x= (pt->x * winx) + offsx;
- const float y= (pt->y * winy) + offsy;
+ const float x = (pt->x * winx) + offsx;
+ const float y = (pt->y * winy) + offsy;
glVertex2f(x, y);
}
else {
- const float x= (pt->x / 100 * winx) + offsx;
- const float y= (pt->y / 100 * winy) + offsy;
+ const float x = (pt->x / 100 * winx) + offsx;
+ const float y = (pt->y / 100 * winy) + offsy;
glVertex2f(x, y);
}
@@ -296,67 +296,67 @@ static void gp_draw_stroke (bGPDspoint *points, int totpoints, short thickness_s
glShadeModel(GL_FLAT);
glBegin(GL_QUADS);
- for (i=0, pt1=points, pt2=points+1; i < (totpoints-1); i++, pt1++, pt2++) {
- float s0[2], s1[2]; /* segment 'center' points */
- float t0[2], t1[2]; /* tessellated coordinates */
- float m1[2], m2[2]; /* gradient and normal */
- float mt[2], sc[2]; /* gradient for thickness, point for end-cap */
- float pthick; /* thickness at segment point */
+ for (i = 0, pt1 = points, pt2 = points + 1; i < (totpoints - 1); i++, pt1++, pt2++) {
+ float s0[2], s1[2]; /* segment 'center' points */
+ float t0[2], t1[2]; /* tessellated coordinates */
+ float m1[2], m2[2]; /* gradient and normal */
+ float mt[2], sc[2]; /* gradient for thickness, point for end-cap */
+ float pthick; /* thickness at segment point */
/* get x and y coordinates from points */
if (sflag & GP_STROKE_2DSPACE) {
- s0[0]= pt1->x; s0[1]= pt1->y;
- s1[0]= pt2->x; s1[1]= pt2->y;
+ s0[0] = pt1->x; s0[1] = pt1->y;
+ s1[0] = pt2->x; s1[1] = pt2->y;
}
else if (sflag & GP_STROKE_2DIMAGE) {
- s0[0]= (pt1->x * winx) + offsx;
- s0[1]= (pt1->y * winy) + offsy;
- s1[0]= (pt2->x * winx) + offsx;
- s1[1]= (pt2->y * winy) + offsy;
+ s0[0] = (pt1->x * winx) + offsx;
+ s0[1] = (pt1->y * winy) + offsy;
+ s1[0] = (pt2->x * winx) + offsx;
+ s1[1] = (pt2->y * winy) + offsy;
}
else {
- s0[0]= (pt1->x / 100 * winx) + offsx;
- s0[1]= (pt1->y / 100 * winy) + offsy;
- s1[0]= (pt2->x / 100 * winx) + offsx;
- s1[1]= (pt2->y / 100 * winy) + offsy;
+ s0[0] = (pt1->x / 100 * winx) + offsx;
+ s0[1] = (pt1->y / 100 * winy) + offsy;
+ s1[0] = (pt2->x / 100 * winx) + offsx;
+ s1[1] = (pt2->y / 100 * winy) + offsy;
}
/* calculate gradient and normal - 'angle'=(ny/nx) */
- m1[1]= s1[1] - s0[1];
- m1[0]= s1[0] - s0[0];
+ m1[1] = s1[1] - s0[1];
+ m1[0] = s1[0] - s0[0];
normalize_v2(m1);
- m2[1]= -m1[0];
- m2[0]= m1[1];
+ m2[1] = -m1[0];
+ m2[0] = m1[1];
/* always use pressure from first point here */
- pthick= (pt1->pressure * thickness);
+ pthick = (pt1->pressure * thickness);
/* if the first segment, start of segment is segment's normal */
if (i == 0) {
/* draw start cap first
* - make points slightly closer to center (about halfway across)
*/
- mt[0]= m2[0] * pthick * 0.5f;
- mt[1]= m2[1] * pthick * 0.5f;
- sc[0]= s0[0] - (m1[0] * pthick * 0.75f);
- sc[1]= s0[1] - (m1[1] * pthick * 0.75f);
-
- t0[0]= sc[0] - mt[0];
- t0[1]= sc[1] - mt[1];
- t1[0]= sc[0] + mt[0];
- t1[1]= sc[1] + mt[1];
+ mt[0] = m2[0] * pthick * 0.5f;
+ mt[1] = m2[1] * pthick * 0.5f;
+ sc[0] = s0[0] - (m1[0] * pthick * 0.75f);
+ sc[1] = s0[1] - (m1[1] * pthick * 0.75f);
+
+ t0[0] = sc[0] - mt[0];
+ t0[1] = sc[1] - mt[1];
+ t1[0] = sc[0] + mt[0];
+ t1[1] = sc[1] + mt[1];
glVertex2fv(t0);
glVertex2fv(t1);
/* calculate points for start of segment */
- mt[0]= m2[0] * pthick;
- mt[1]= m2[1] * pthick;
+ mt[0] = m2[0] * pthick;
+ mt[1] = m2[1] * pthick;
- t0[0]= s0[0] - mt[0];
- t0[1]= s0[1] - mt[1];
- t1[0]= s0[0] + mt[0];
- t1[1]= s0[1] + mt[1];
+ t0[0] = s0[0] - mt[0];
+ t0[1] = s0[1] - mt[1];
+ t1[0] = s0[0] + mt[0];
+ t1[1] = s0[1] + mt[1];
/* draw this line twice (first to finish off start cap, then for stroke) */
glVertex2fv(t1);
@@ -366,33 +366,33 @@ static void gp_draw_stroke (bGPDspoint *points, int totpoints, short thickness_s
}
/* if not the first segment, use bisector of angle between segments */
else {
- float mb[2]; /* bisector normal */
- float athick, dfac; /* actual thickness, difference between thicknesses */
+ float mb[2]; /* bisector normal */
+ float athick, dfac; /* actual thickness, difference between thicknesses */
/* calculate gradient of bisector (as average of normals) */
- mb[0]= (pm[0] + m2[0]) / 2;
- mb[1]= (pm[1] + m2[1]) / 2;
+ mb[0] = (pm[0] + m2[0]) / 2;
+ mb[1] = (pm[1] + m2[1]) / 2;
normalize_v2(mb);
/* calculate gradient to apply
- * - as basis, use just pthick * bisector gradient
+ * - as basis, use just pthick * bisector gradient
* - if cross-section not as thick as it should be, add extra padding to fix it
*/
- mt[0]= mb[0] * pthick;
- mt[1]= mb[1] * pthick;
- athick= len_v2(mt);
- dfac= pthick - (athick * 2);
+ mt[0] = mb[0] * pthick;
+ mt[1] = mb[1] * pthick;
+ athick = len_v2(mt);
+ dfac = pthick - (athick * 2);
- if (((athick * 2.0f) < pthick) && (IS_EQF(athick, pthick)==0)) {
+ if (((athick * 2.0f) < pthick) && (IS_EQF(athick, pthick) == 0)) {
mt[0] += (mb[0] * dfac);
mt[1] += (mb[1] * dfac);
}
/* calculate points for start of segment */
- t0[0]= s0[0] - mt[0];
- t0[1]= s0[1] - mt[1];
- t1[0]= s0[0] + mt[0];
- t1[1]= s0[1] + mt[1];
+ t0[0] = s0[0] - mt[0];
+ t0[1] = s0[1] - mt[1];
+ t1[0] = s0[0] + mt[0];
+ t1[1] = s0[1] + mt[1];
/* draw this line twice (once for end of current segment, and once for start of next) */
glVertex2fv(t1);
@@ -402,18 +402,18 @@ static void gp_draw_stroke (bGPDspoint *points, int totpoints, short thickness_s
}
/* if last segment, also draw end of segment (defined as segment's normal) */
- if (i == totpoints-2) {
+ if (i == totpoints - 2) {
/* for once, we use second point's pressure (otherwise it won't be drawn) */
- pthick= (pt2->pressure * thickness);
+ pthick = (pt2->pressure * thickness);
/* calculate points for end of segment */
- mt[0]= m2[0] * pthick;
- mt[1]= m2[1] * pthick;
+ mt[0] = m2[0] * pthick;
+ mt[1] = m2[1] * pthick;
- t0[0]= s1[0] - mt[0];
- t0[1]= s1[1] - mt[1];
- t1[0]= s1[0] + mt[0];
- t1[1]= s1[1] + mt[1];
+ t0[0] = s1[0] - mt[0];
+ t0[1] = s1[1] - mt[1];
+ t1[0] = s1[0] + mt[0];
+ t1[1] = s1[1] + mt[1];
/* draw this line twice (once for end of stroke, and once for endcap)*/
glVertex2fv(t1);
@@ -425,15 +425,15 @@ static void gp_draw_stroke (bGPDspoint *points, int totpoints, short thickness_s
/* draw end cap as last step
* - make points slightly closer to center (about halfway across)
*/
- mt[0]= m2[0] * pthick * 0.5f;
- mt[1]= m2[1] * pthick * 0.5f;
- sc[0]= s1[0] + (m1[0] * pthick * 0.75f);
- sc[1]= s1[1] + (m1[1] * pthick * 0.75f);
-
- t0[0]= sc[0] - mt[0];
- t0[1]= sc[1] - mt[1];
- t1[0]= sc[0] + mt[0];
- t1[1]= sc[1] + mt[1];
+ mt[0] = m2[0] * pthick * 0.5f;
+ mt[1] = m2[1] * pthick * 0.5f;
+ sc[0] = s1[0] + (m1[0] * pthick * 0.75f);
+ sc[1] = s1[1] + (m1[1] * pthick * 0.75f);
+
+ t0[0] = sc[0] - mt[0];
+ t0[1] = sc[1] - mt[1];
+ t1[0] = sc[0] + mt[0];
+ t1[1] = sc[1] + mt[1];
glVertex2fv(t1);
glVertex2fv(t0);
@@ -452,19 +452,19 @@ static void gp_draw_stroke (bGPDspoint *points, int totpoints, short thickness_s
int i;
glBegin(GL_POINTS);
- for (i=0, pt=points; i < totpoints && pt; i++, pt++) {
+ for (i = 0, pt = points; i < totpoints && pt; i++, pt++) {
if (sflag & GP_STROKE_2DSPACE) {
glVertex2fv(&pt->x);
}
else if (sflag & GP_STROKE_2DIMAGE) {
- const float x= (float)((pt->x * winx) + offsx);
- const float y= (float)((pt->y * winy) + offsy);
+ const float x = (float)((pt->x * winx) + offsx);
+ const float y = (float)((pt->y * winy) + offsy);
glVertex2f(x, y);
}
else {
- const float x= (float)(pt->x / 100 * winx) + offsx;
- const float y= (float)(pt->y / 100 * winy) + offsy;
+ const float x = (float)(pt->x / 100 * winx) + offsx;
+ const float y = (float)(pt->y / 100 * winy) + offsy;
glVertex2f(x, y);
}
@@ -476,15 +476,15 @@ static void gp_draw_stroke (bGPDspoint *points, int totpoints, short thickness_s
/* ----- General Drawing ------ */
/* draw a set of strokes */
-static void gp_draw_strokes (bGPDframe *gpf, int offsx, int offsy, int winx, int winy, int dflag,
- short debug, short lthick, float color[4])
+static void gp_draw_strokes(bGPDframe *gpf, int offsx, int offsy, int winx, int winy, int dflag,
+ short debug, short lthick, float color[4])
{
bGPDstroke *gps;
/* set color first (may need to reset it again later too) */
glColor4fv(color);
- for (gps= gpf->strokes.first; gps; gps= gps->next) {
+ for (gps = gpf->strokes.first; gps; gps = gps->next) {
/* check if stroke can be drawn - checks here generally fall into pairs */
if ((dflag & GP_DRAWDATA_ONLY3D) && !(gps->flag & GP_STROKE_3DSPACE))
continue;
@@ -505,7 +505,7 @@ static void gp_draw_strokes (bGPDframe *gpf, int offsx, int offsy, int winx, int
if (gps->totpoints == 1)
gp_draw_stroke_point(gps->points, lthick, dflag, gps->flag, offsx, offsy, winx, winy);
else if (dflag & GP_DRAWDATA_ONLY3D) {
- const int no_xray= (dflag & GP_DRAWDATA_NO_XRAY);
+ const int no_xray = (dflag & GP_DRAWDATA_NO_XRAY);
int mask_orig = 0;
if (no_xray) {
@@ -540,7 +540,7 @@ static void gp_draw_strokes (bGPDframe *gpf, int offsx, int offsy, int winx, int
}
/* draw grease-pencil datablock */
-static void gp_draw_data (bGPdata *gpd, int offsx, int offsy, int winx, int winy, int cfra, int dflag)
+static void gp_draw_data(bGPdata *gpd, int offsx, int offsy, int winx, int winy, int cfra, int dflag)
{
bGPDlayer *gpl;
@@ -555,11 +555,11 @@ static void gp_draw_data (bGPdata *gpd, int offsx, int offsy, int winx, int winy
glEnable(GL_BLEND);
/* loop over layers, drawing them */
- for (gpl= gpd->layers.first; gpl; gpl= gpl->next) {
+ for (gpl = gpd->layers.first; gpl; gpl = gpl->next) {
bGPDframe *gpf;
short debug = (gpl->flag & GP_LAYER_DRAWDEBUG) ? 1 : 0;
- short lthick= gpl->thickness;
+ short lthick = gpl->thickness;
float color[4], tcolor[4];
/* don't draw layer if hidden */
@@ -567,7 +567,7 @@ static void gp_draw_data (bGPdata *gpd, int offsx, int offsy, int winx, int winy
continue;
/* get frame to draw */
- gpf= gpencil_layer_getframe(gpl, cfra, 0);
+ gpf = gpencil_layer_getframe(gpl, cfra, 0);
if (gpf == NULL)
continue;
@@ -579,8 +579,8 @@ static void gp_draw_data (bGPdata *gpd, int offsx, int offsy, int winx, int winy
glPointSize((float)(gpl->thickness + 2));
/* apply xray layer setting */
- if (gpl->flag & GP_LAYER_NO_XRAY) dflag |= GP_DRAWDATA_NO_XRAY;
- else dflag &= ~GP_DRAWDATA_NO_XRAY;
+ if (gpl->flag & GP_LAYER_NO_XRAY) dflag |= GP_DRAWDATA_NO_XRAY;
+ else dflag &= ~GP_DRAWDATA_NO_XRAY;
/* draw 'onionskins' (frame left + right) */
if (gpl->flag & GP_LAYER_ONIONSKIN) {
@@ -590,11 +590,11 @@ static void gp_draw_data (bGPdata *gpd, int offsx, int offsy, int winx, int winy
float fac;
/* draw previous frames first */
- for (gf=gpf->prev; gf; gf=gf->prev) {
+ for (gf = gpf->prev; gf; gf = gf->prev) {
/* check if frame is drawable */
if ((gpf->framenum - gf->framenum) <= gpl->gstep) {
/* alpha decreases with distance from curframe index */
- fac= 1.0f - ((float)(gpf->framenum - gf->framenum) / (float)(gpl->gstep + 1));
+ fac = 1.0f - ((float)(gpf->framenum - gf->framenum) / (float)(gpl->gstep + 1));
tcolor[3] = color[3] * fac * 0.66f;
gp_draw_strokes(gf, offsx, offsy, winx, winy, dflag, debug, lthick, tcolor);
}
@@ -603,11 +603,11 @@ static void gp_draw_data (bGPdata *gpd, int offsx, int offsy, int winx, int winy
}
/* now draw next frames */
- for (gf= gpf->next; gf; gf=gf->next) {
+ for (gf = gpf->next; gf; gf = gf->next) {
/* check if frame is drawable */
if ((gf->framenum - gpf->framenum) <= gpl->gstep) {
/* alpha decreases with distance from curframe index */
- fac= 1.0f - ((float)(gf->framenum - gpf->framenum) / (float)(gpl->gstep + 1));
+ fac = 1.0f - ((float)(gf->framenum - gpf->framenum) / (float)(gpl->gstep + 1));
tcolor[3] = color[3] * fac * 0.66f;
gp_draw_strokes(gf, offsx, offsy, winx, winy, dflag, debug, lthick, tcolor);
}
@@ -636,14 +636,14 @@ static void gp_draw_data (bGPdata *gpd, int offsx, int offsy, int winx, int winy
}
/* draw the strokes already in active frame */
- tcolor[3]= color[3];
+ tcolor[3] = color[3];
gp_draw_strokes(gpf, offsx, offsy, winx, winy, dflag, debug, lthick, tcolor);
/* Check if may need to draw the active stroke cache, only if this layer is the active layer
* that is being edited. (Stroke buffer is currently stored in gp-data)
*/
if (ED_gpencil_session_active() && (gpl->flag & GP_LAYER_ACTIVE) &&
- (gpf->flag & GP_FRAME_PAINT))
+ (gpf->flag & GP_FRAME_PAINT))
{
/* Buffer stroke needs to be drawn with a different linestyle to help differentiate them from normal strokes. */
gp_draw_stroke_buffer(gpd->sbuffer, gpd->sbuffer_size, lthick, dflag, gpd->sbuffer_sflag);
@@ -669,18 +669,18 @@ static void gp_draw_data (bGPdata *gpd, int offsx, int offsy, int winx, int winy
// ............................
/* draw grease-pencil sketches to specified 2d-view that uses ibuf corrections */
-void draw_gpencil_2dimage (bContext *C, ImBuf *ibuf)
+void draw_gpencil_2dimage(bContext *C, ImBuf *ibuf)
{
- ScrArea *sa= CTX_wm_area(C);
- ARegion *ar= CTX_wm_region(C);
- Scene *scene= CTX_data_scene(C);
+ ScrArea *sa = CTX_wm_area(C);
+ ARegion *ar = CTX_wm_region(C);
+ Scene *scene = CTX_data_scene(C);
bGPdata *gpd;
int offsx, offsy, sizex, sizey;
int dflag = GP_DRAWDATA_NOSTATUS;
/* check that we have grease-pencil stuff to draw */
if (ELEM(NULL, sa, ibuf)) return;
- gpd= gpencil_data_get_active(C); // XXX
+ gpd = gpencil_data_get_active(C); // XXX
if (gpd == NULL) return;
/* calculate rect */
@@ -691,24 +691,24 @@ void draw_gpencil_2dimage (bContext *C, ImBuf *ibuf)
/* just draw using standard scaling (settings here are currently ignored anyways) */
// FIXME: the opengl poly-strokes don't draw at right thickness when done this way, so disabled
- offsx= 0;
- offsy= 0;
- sizex= ar->winx;
- sizey= ar->winy;
+ offsx = 0;
+ offsy = 0;
+ sizex = ar->winx;
+ sizey = ar->winy;
wmOrtho2(ar->v2d.cur.xmin, ar->v2d.cur.xmax, ar->v2d.cur.ymin, ar->v2d.cur.ymax);
- dflag |= GP_DRAWDATA_ONLYV2D|GP_DRAWDATA_IEDITHACK;
+ dflag |= GP_DRAWDATA_ONLYV2D | GP_DRAWDATA_IEDITHACK;
}
- break;
-#if 0 /* removed since 2.5x, needs to be added back */
+ break;
+#if 0 /* removed since 2.5x, needs to be added back */
case SPACE_SEQ: /* sequence */
{
- SpaceSeq *sseq= (SpaceSeq *)sa->spacedata.first;
+ SpaceSeq *sseq = (SpaceSeq *)sa->spacedata.first;
float zoom, zoomx, zoomy;
/* calculate accessory values */
- zoom= (float)(SEQ_ZOOM_FAC(sseq->zoom));
+ zoom = (float)(SEQ_ZOOM_FAC(sseq->zoom));
if (sseq->mainb == SEQ_DRAW_IMG_IMBUF) {
/* XXX sequencer zoom should store it? */
zoomx = zoom; // * (G.scene->r.xasp / G.scene->r.yasp);
@@ -718,20 +718,20 @@ void draw_gpencil_2dimage (bContext *C, ImBuf *ibuf)
zoomx = zoomy = zoom;
/* calculate transforms (Note: we use ibuf here, as we have it) */
- sizex= (int)(zoomx * ibuf->x);
- sizey= (int)(zoomy * ibuf->y);
- offsx= (int)( (ar->winx-sizex)/2 + sseq->xof );
- offsy= (int)( (ar->winy-sizey)/2 + sseq->yof );
+ sizex = (int)(zoomx * ibuf->x);
+ sizey = (int)(zoomy * ibuf->y);
+ offsx = (int)( (ar->winx - sizex) / 2 + sseq->xof);
+ offsy = (int)( (ar->winy - sizey) / 2 + sseq->yof);
dflag |= GP_DRAWDATA_ONLYI2D;
}
- break;
+ break;
#endif
default: /* for spacetype not yet handled */
- offsx= 0;
- offsy= 0;
- sizex= ar->winx;
- sizey= ar->winy;
+ offsx = 0;
+ offsy = 0;
+ sizex = ar->winx;
+ sizey = ar->winy;
dflag |= GP_DRAWDATA_ONLYI2D;
break;
@@ -745,17 +745,17 @@ void draw_gpencil_2dimage (bContext *C, ImBuf *ibuf)
/* draw grease-pencil sketches to specified 2d-view assuming that matrices are already set correctly
* Note: this gets called twice - first time with onlyv2d=1 to draw 'canvas' strokes, second time with onlyv2d=0 for screen-aligned strokes
*/
-void draw_gpencil_view2d (bContext *C, short onlyv2d)
+void draw_gpencil_view2d(bContext *C, short onlyv2d)
{
- ScrArea *sa= CTX_wm_area(C);
- ARegion *ar= CTX_wm_region(C);
- Scene *scene= CTX_data_scene(C);
+ ScrArea *sa = CTX_wm_area(C);
+ ARegion *ar = CTX_wm_region(C);
+ Scene *scene = CTX_data_scene(C);
bGPdata *gpd;
int dflag = 0;
/* check that we have grease-pencil stuff to draw */
if (sa == NULL) return;
- gpd= gpencil_data_get_active(C); // XXX
+ gpd = gpencil_data_get_active(C); // XXX
if (gpd == NULL) return;
/* special hack for Image Editor */
@@ -764,7 +764,7 @@ void draw_gpencil_view2d (bContext *C, short onlyv2d)
dflag |= GP_DRAWDATA_IEDITHACK;
/* draw it! */
- if (onlyv2d) dflag |= (GP_DRAWDATA_ONLYV2D|GP_DRAWDATA_NOSTATUS);
+ if (onlyv2d) dflag |= (GP_DRAWDATA_ONLYV2D | GP_DRAWDATA_NOSTATUS);
gp_draw_data(gpd, 0, 0, ar->winx, ar->winy, CFRA, dflag);
}
@@ -772,15 +772,15 @@ void draw_gpencil_view2d (bContext *C, short onlyv2d)
* Note: this gets called twice - first time with only3d=1 to draw 3d-strokes, second time with only3d=0 for screen-aligned strokes
*/
-void draw_gpencil_view3d (Scene *scene, View3D *v3d, ARegion *ar, short only3d)
+void draw_gpencil_view3d(Scene *scene, View3D *v3d, ARegion *ar, short only3d)
{
bGPdata *gpd;
int dflag = 0;
rcti rect;
- RegionView3D *rv3d= ar->regiondata;
+ RegionView3D *rv3d = ar->regiondata;
/* check that we have grease-pencil stuff to draw */
- gpd= gpencil_data_get_active_v3d(scene); // XXX
+ gpd = gpencil_data_get_active_v3d(scene); // XXX
if (gpd == NULL) return;
/* when rendering to the offscreen buffer we don't want to
@@ -798,7 +798,7 @@ void draw_gpencil_view3d (Scene *scene, View3D *v3d, ARegion *ar, short only3d)
}
/* draw it! */
- if (only3d) dflag |= (GP_DRAWDATA_ONLY3D|GP_DRAWDATA_NOSTATUS);
+ if (only3d) dflag |= (GP_DRAWDATA_ONLY3D | GP_DRAWDATA_NOSTATUS);
gp_draw_data(gpd, rect.xmin, rect.ymin, rect.xmax, rect.ymax, CFRA, dflag);
}
diff --git a/source/blender/editors/gpencil/editaction_gpencil.c b/source/blender/editors/gpencil/editaction_gpencil.c
index 3b0847c2e0f..9cc738b016e 100644
--- a/source/blender/editors/gpencil/editaction_gpencil.c
+++ b/source/blender/editors/gpencil/editaction_gpencil.c
@@ -54,15 +54,15 @@
/* ***************************************** */
/* NOTE ABOUT THIS FILE:
- * This file contains code for editing Grease Pencil data in the Action Editor
- * as a 'keyframes', so that a user can adjust the timing of Grease Pencil drawings.
- * Therefore, this file mostly contains functions for selecting Grease-Pencil frames.
+ * This file contains code for editing Grease Pencil data in the Action Editor
+ * as a 'keyframes', so that a user can adjust the timing of Grease Pencil drawings.
+ * Therefore, this file mostly contains functions for selecting Grease-Pencil frames.
*/
/* ***************************************** */
/* Generics - Loopers */
/* Loops over the gp-frames for a gp-layer, and applies the given callback */
-short gplayer_frames_looper (bGPDlayer *gpl, Scene *scene, short (*gpf_cb)(bGPDframe *, Scene *))
+short gplayer_frames_looper(bGPDlayer *gpl, Scene *scene, short (*gpf_cb)(bGPDframe *, Scene *))
{
bGPDframe *gpf;
@@ -71,7 +71,7 @@ short gplayer_frames_looper (bGPDlayer *gpl, Scene *scene, short (*gpf_cb)(bGPDf
return 0;
/* do loop */
- for (gpf= gpl->frames.first; gpf; gpf= gpf->next) {
+ for (gpf = gpl->frames.first; gpf; gpf = gpf->next) {
/* execute callback */
if (gpf_cb(gpf, scene))
return 1;
@@ -85,7 +85,7 @@ short gplayer_frames_looper (bGPDlayer *gpl, Scene *scene, short (*gpf_cb)(bGPDf
/* Data Conversion Tools */
/* make a listing all the gp-frames in a layer as cfraelems */
-void gplayer_make_cfra_list (bGPDlayer *gpl, ListBase *elems, short onlysel)
+void gplayer_make_cfra_list(bGPDlayer *gpl, ListBase *elems, short onlysel)
{
bGPDframe *gpf;
CfraElem *ce;
@@ -95,12 +95,12 @@ void gplayer_make_cfra_list (bGPDlayer *gpl, ListBase *elems, short onlysel)
return;
/* loop through gp-frames, adding */
- for (gpf= gpl->frames.first; gpf; gpf= gpf->next) {
+ for (gpf = gpl->frames.first; gpf; gpf = gpf->next) {
if ((onlysel == 0) || (gpf->flag & GP_FRAME_SELECT)) {
- ce= MEM_callocN(sizeof(CfraElem), "CfraElem");
+ ce = MEM_callocN(sizeof(CfraElem), "CfraElem");
- ce->cfra= (float)gpf->framenum;
- ce->sel= (gpf->flag & GP_FRAME_SELECT) ? 1 : 0;
+ ce->cfra = (float)gpf->framenum;
+ ce->sel = (gpf->flag & GP_FRAME_SELECT) ? 1 : 0;
BLI_addtail(elems, ce);
}
@@ -111,7 +111,7 @@ void gplayer_make_cfra_list (bGPDlayer *gpl, ListBase *elems, short onlysel)
/* Selection Tools */
/* check if one of the frames in this layer is selected */
-short is_gplayer_frame_selected (bGPDlayer *gpl)
+short is_gplayer_frame_selected(bGPDlayer *gpl)
{
bGPDframe *gpf;
@@ -120,7 +120,7 @@ short is_gplayer_frame_selected (bGPDlayer *gpl)
return 0;
/* stop at the first one found */
- for (gpf= gpl->frames.first; gpf; gpf= gpf->next) {
+ for (gpf = gpl->frames.first; gpf; gpf = gpf->next) {
if (gpf->flag & GP_FRAME_SELECT)
return 1;
}
@@ -130,7 +130,7 @@ short is_gplayer_frame_selected (bGPDlayer *gpl)
}
/* helper function - select gp-frame based on SELECT_* mode */
-static void gpframe_select (bGPDframe *gpf, short select_mode)
+static void gpframe_select(bGPDframe *gpf, short select_mode)
{
if (gpf == NULL)
return;
@@ -149,7 +149,7 @@ static void gpframe_select (bGPDframe *gpf, short select_mode)
}
/* set all/none/invert select (like above, but with SELECT_* modes) */
-void select_gpencil_frames (bGPDlayer *gpl, short select_mode)
+void select_gpencil_frames(bGPDlayer *gpl, short select_mode)
{
bGPDframe *gpf;
@@ -158,13 +158,13 @@ void select_gpencil_frames (bGPDlayer *gpl, short select_mode)
return;
/* handle according to mode */
- for (gpf= gpl->frames.first; gpf; gpf= gpf->next) {
+ for (gpf = gpl->frames.first; gpf; gpf = gpf->next) {
gpframe_select(gpf, select_mode);
}
}
/* set all/none/invert select */
-void set_gplayer_frame_selection (bGPDlayer *gpl, short mode)
+void set_gplayer_frame_selection(bGPDlayer *gpl, short mode)
{
/* error checking */
if (gpl == NULL)
@@ -175,7 +175,7 @@ void set_gplayer_frame_selection (bGPDlayer *gpl, short mode)
}
/* select the frame in this layer that occurs on this frame (there should only be one at most) */
-void select_gpencil_frame (bGPDlayer *gpl, int selx, short select_mode)
+void select_gpencil_frame(bGPDlayer *gpl, int selx, short select_mode)
{
bGPDframe *gpf;
@@ -183,7 +183,7 @@ void select_gpencil_frame (bGPDlayer *gpl, int selx, short select_mode)
return;
/* search through frames for a match */
- for (gpf= gpl->frames.first; gpf; gpf= gpf->next) {
+ for (gpf = gpl->frames.first; gpf; gpf = gpf->next) {
/* there should only be one frame with this frame-number */
if (gpf->framenum == selx) {
gpframe_select(gpf, select_mode);
@@ -193,7 +193,7 @@ void select_gpencil_frame (bGPDlayer *gpl, int selx, short select_mode)
}
/* select the frames in this layer that occur within the bounds specified */
-void borderselect_gplayer_frames (bGPDlayer *gpl, float min, float max, short select_mode)
+void borderselect_gplayer_frames(bGPDlayer *gpl, float min, float max, short select_mode)
{
bGPDframe *gpf;
@@ -201,7 +201,7 @@ void borderselect_gplayer_frames (bGPDlayer *gpl, float min, float max, short se
return;
/* only select those frames which are in bounds */
- for (gpf= gpl->frames.first; gpf; gpf= gpf->next) {
+ for (gpf = gpl->frames.first; gpf; gpf = gpf->next) {
if (IN_RANGE(gpf->framenum, min, max))
gpframe_select(gpf, select_mode);
}
@@ -211,7 +211,7 @@ void borderselect_gplayer_frames (bGPDlayer *gpl, float min, float max, short se
/* Frame Editing Tools */
/* Delete selected frames */
-void delete_gplayer_frames (bGPDlayer *gpl)
+void delete_gplayer_frames(bGPDlayer *gpl)
{
bGPDframe *gpf, *gpfn;
@@ -220,8 +220,8 @@ void delete_gplayer_frames (bGPDlayer *gpl)
return;
/* check for frames to delete */
- for (gpf= gpl->frames.first; gpf; gpf= gpfn) {
- gpfn= gpf->next;
+ for (gpf = gpl->frames.first; gpf; gpf = gpfn) {
+ gpfn = gpf->next;
if (gpf->flag & GP_FRAME_SELECT)
gpencil_layer_delframe(gpl, gpf);
@@ -229,7 +229,7 @@ void delete_gplayer_frames (bGPDlayer *gpl)
}
/* Duplicate selected frames from given gp-layer */
-void duplicate_gplayer_frames (bGPDlayer *gpl)
+void duplicate_gplayer_frames(bGPDlayer *gpl)
{
bGPDframe *gpf, *gpfn;
@@ -238,15 +238,15 @@ void duplicate_gplayer_frames (bGPDlayer *gpl)
return;
/* duplicate selected frames */
- for (gpf= gpl->frames.first; gpf; gpf= gpfn) {
- gpfn= gpf->next;
+ for (gpf = gpl->frames.first; gpf; gpf = gpfn) {
+ gpfn = gpf->next;
/* duplicate this frame */
if (gpf->flag & GP_FRAME_SELECT) {
bGPDframe *gpfd;
/* duplicate frame, and deselect self */
- gpfd= gpencil_frame_duplicate(gpf);
+ gpfd = gpencil_frame_duplicate(gpf);
gpf->flag &= ~GP_FRAME_SELECT;
BLI_insertlinkafter(&gpl->frames, gpf, gpfd);
@@ -267,21 +267,21 @@ void duplicate_gplayer_frames (bGPDlayer *gpl)
/* globals for copy/paste data (like for other copy/paste buffers) */
ListBase gpcopybuf = {NULL, NULL};
-static int gpcopy_firstframe= 999999999;
+static int gpcopy_firstframe = 999999999;
/* This function frees any MEM_calloc'ed copy/paste buffer data */
-void free_gpcopybuf ()
+void free_gpcopybuf()
{
free_gpencil_layers(&gpcopybuf);
- gpcopybuf.first= gpcopybuf.last= NULL;
- gpcopy_firstframe= 999999999;
+ gpcopybuf.first = gpcopybuf.last = NULL;
+ gpcopy_firstframe = 999999999;
}
/* This function adds data to the copy/paste buffer, freeing existing data first
* Only the selected GP-layers get their selected keyframes copied.
*/
-void copy_gpdata ()
+void copy_gpdata()
{
ListBase act_data = {NULL, NULL};
bActListElem *ale;
@@ -293,39 +293,39 @@ void copy_gpdata ()
free_gpcopybuf();
/* get data */
- data= get_action_context(&datatype);
+ data = get_action_context(&datatype);
if (data == NULL) return;
if (datatype != ACTCONT_GPENCIL) return;
/* filter data */
- filter= (ACTFILTER_VISIBLE | ACTFILTER_SEL);
+ filter = (ACTFILTER_VISIBLE | ACTFILTER_SEL);
actdata_filter(&act_data, filter, data, datatype);
/* assume that each of these is an ipo-block */
- for (ale= act_data.first; ale; ale= ale->next) {
+ for (ale = act_data.first; ale; ale = ale->next) {
bGPDlayer *gpls, *gpln;
bGPDframe *gpf, *gpfn;
/* get new layer to put into buffer */
- gpls= (bGPDlayer *)ale->data;
- gpln= MEM_callocN(sizeof(bGPDlayer), "GPCopyPasteLayer");
+ gpls = (bGPDlayer *)ale->data;
+ gpln = MEM_callocN(sizeof(bGPDlayer), "GPCopyPasteLayer");
- gpln->frames.first= gpln->frames.last= NULL;
+ gpln->frames.first = gpln->frames.last = NULL;
BLI_strncpy(gpln->info, gpls->info, sizeof(gpln->info));
BLI_addtail(&gpcopybuf, gpln);
/* loop over frames, and copy only selected frames */
- for (gpf= gpls->frames.first; gpf; gpf= gpf->next) {
+ for (gpf = gpls->frames.first; gpf; gpf = gpf->next) {
/* if frame is selected, make duplicate it and its strokes */
if (gpf->flag & GP_FRAME_SELECT) {
/* add frame to buffer */
- gpfn= gpencil_frame_duplicate(gpf);
+ gpfn = gpencil_frame_duplicate(gpf);
BLI_addtail(&gpln->frames, gpfn);
/* check if this is the earliest frame encountered so far */
if (gpf->framenum < gpcopy_firstframe)
- gpcopy_firstframe= gpf->framenum;
+ gpcopy_firstframe = gpf->framenum;
}
}
}
@@ -338,7 +338,7 @@ void copy_gpdata ()
BLI_freelistN(&act_data);
}
-void paste_gpdata (Scene *scene)
+void paste_gpdata(Scene *scene)
{
ListBase act_data = {NULL, NULL};
bActListElem *ale;
@@ -347,7 +347,7 @@ void paste_gpdata (Scene *scene)
short datatype;
const int offset = (CFRA - gpcopy_firstframe);
- short no_name= 0;
+ short no_name = 0;
/* check if buffer is empty */
if (ELEM(NULL, gpcopybuf.first, gpcopybuf.last)) {
@@ -356,27 +356,27 @@ void paste_gpdata (Scene *scene)
}
/* check if single channel in buffer (disregard names if so) */
if (gpcopybuf.first == gpcopybuf.last)
- no_name= 1;
+ no_name = 1;
/* get data */
- data= get_action_context(&datatype);
+ data = get_action_context(&datatype);
if (data == NULL) return;
if (datatype != ACTCONT_GPENCIL) return;
/* filter data */
- filter= (ACTFILTER_VISIBLE | ACTFILTER_SEL | ACTFILTER_FOREDIT);
+ filter = (ACTFILTER_VISIBLE | ACTFILTER_SEL | ACTFILTER_FOREDIT);
actdata_filter(&act_data, filter, data, datatype);
/* from selected channels */
- for (ale= act_data.first; ale; ale= ale->next) {
- bGPDlayer *gpld= (bGPDlayer *)ale->data;
- bGPDlayer *gpls= NULL;
+ for (ale = act_data.first; ale; ale = ale->next) {
+ bGPDlayer *gpld = (bGPDlayer *)ale->data;
+ bGPDlayer *gpls = NULL;
bGPDframe *gpfs, *gpf;
/* find suitable layer from buffer to use to paste from */
- for (gpls= gpcopybuf.first; gpls; gpls= gpls->next) {
+ for (gpls = gpcopybuf.first; gpls; gpls = gpls->next) {
/* check if layer name matches */
- if ((no_name) || (strcmp(gpls->info, gpld->info)==0))
+ if ((no_name) || (strcmp(gpls->info, gpld->info) == 0))
break;
}
@@ -385,12 +385,12 @@ void paste_gpdata (Scene *scene)
continue;
/* add frames from buffer */
- for (gpfs= gpls->frames.first; gpfs; gpfs= gpfs->next) {
+ for (gpfs = gpls->frames.first; gpfs; gpfs = gpfs->next) {
/* temporarily apply offset to buffer-frame while copying */
gpfs->framenum += offset;
/* get frame to copy data into (if no frame returned, then just ignore) */
- gpf= gpencil_layer_getframe(gpld, gpfs->framenum, 1);
+ gpf = gpencil_layer_getframe(gpld, gpfs->framenum, 1);
if (gpf) {
bGPDstroke *gps, *gpsn;
ScrArea *sa;
@@ -404,12 +404,12 @@ void paste_gpdata (Scene *scene)
* - we cannot just add a duplicate frame, as that would cause errors
* - need to check for compatible types to minimise memory usage (copying 'junk' over)
*/
- for (gps= gpfs->strokes.first; gps; gps= gps->next) {
+ for (gps = gpfs->strokes.first; gps; gps = gps->next) {
short stroke_ok;
/* if there's an area, check that it supports this type of stroke */
if (sa) {
- stroke_ok= 0;
+ stroke_ok = 0;
/* check if spacetype supports this type of stroke
* - NOTE: must sync this with gp_paint_initstroke() in gpencil.c
@@ -417,30 +417,30 @@ void paste_gpdata (Scene *scene)
switch (sa->spacetype) {
case SPACE_VIEW3D: /* 3D-View: either screen-aligned or 3d-space */
if ((gps->flag == 0) || (gps->flag & GP_STROKE_3DSPACE))
- stroke_ok= 1;
+ stroke_ok = 1;
break;
case SPACE_NODE: /* Nodes Editor: either screen-aligned or view-aligned */
case SPACE_IMAGE: /* Image Editor: either screen-aligned or view\image-aligned */
case SPACE_CLIP: /* Image Editor: either screen-aligned or view\image-aligned */
if ((gps->flag == 0) || (gps->flag & GP_STROKE_2DSPACE))
- stroke_ok= 1;
+ stroke_ok = 1;
break;
case SPACE_SEQ: /* Sequence Editor: either screen-aligned or view-aligned */
if ((gps->flag == 0) || (gps->flag & GP_STROKE_2DIMAGE))
- stroke_ok= 1;
+ stroke_ok = 1;
break;
}
}
else
- stroke_ok= 1;
+ stroke_ok = 1;
/* if stroke is ok, we make a copy of this stroke and add to frame */
if (stroke_ok) {
/* make a copy of stroke, then of its points array */
- gpsn= MEM_dupallocN(gps);
- gpsn->points= MEM_dupallocN(gps->points);
+ gpsn = MEM_dupallocN(gps);
+ gpsn->points = MEM_dupallocN(gps->points);
/* append stroke to frame */
BLI_addtail(&gpf->strokes, gpsn);
@@ -467,38 +467,38 @@ void paste_gpdata (Scene *scene)
/* -------------------------------------- */
/* Snap Tools */
-static short snap_gpf_nearest (bGPDframe *gpf, Scene *scene)
+static short snap_gpf_nearest(bGPDframe *gpf, Scene *scene)
{
if (gpf->flag & GP_FRAME_SELECT)
- gpf->framenum= (int)(floor(gpf->framenum+0.5));
+ gpf->framenum = (int)(floor(gpf->framenum + 0.5));
return 0;
}
-static short snap_gpf_nearestsec (bGPDframe *gpf, Scene *scene)
+static short snap_gpf_nearestsec(bGPDframe *gpf, Scene *scene)
{
float secf = (float)FPS;
if (gpf->flag & GP_FRAME_SELECT)
- gpf->framenum= (int)(floor(gpf->framenum/secf + 0.5f) * secf);
+ gpf->framenum = (int)(floor(gpf->framenum / secf + 0.5f) * secf);
return 0;
}
-static short snap_gpf_cframe (bGPDframe *gpf, Scene *scene)
+static short snap_gpf_cframe(bGPDframe *gpf, Scene *scene)
{
if (gpf->flag & GP_FRAME_SELECT)
- gpf->framenum= (int)CFRA;
+ gpf->framenum = (int)CFRA;
return 0;
}
-static short snap_gpf_nearmarker (bGPDframe *gpf, Scene *scene)
+static short snap_gpf_nearmarker(bGPDframe *gpf, Scene *scene)
{
if (gpf->flag & GP_FRAME_SELECT)
- gpf->framenum= (int)find_nearest_marker_time(&scene->markers, (float)gpf->framenum);
+ gpf->framenum = (int)find_nearest_marker_time(&scene->markers, (float)gpf->framenum);
return 0;
}
/* snap selected frames to ... */
-void snap_gplayer_frames (bGPDlayer *gpl, Scene *scene, short mode)
+void snap_gplayer_frames(bGPDlayer *gpl, Scene *scene, short mode)
{
switch (mode) {
case 1: /* snap to nearest frame */
@@ -522,43 +522,43 @@ void snap_gplayer_frames (bGPDlayer *gpl, Scene *scene, short mode)
/* -------------------------------------- */
/* Mirror Tools */
-static short mirror_gpf_cframe (bGPDframe *gpf, Scene *scene)
+static short mirror_gpf_cframe(bGPDframe *gpf, Scene *scene)
{
int diff;
if (gpf->flag & GP_FRAME_SELECT) {
- diff= CFRA - gpf->framenum;
- gpf->framenum= CFRA;
+ diff = CFRA - gpf->framenum;
+ gpf->framenum = CFRA;
}
return 0;
}
-static short mirror_gpf_yaxis (bGPDframe *gpf, Scene *scene)
+static short mirror_gpf_yaxis(bGPDframe *gpf, Scene *scene)
{
int diff;
if (gpf->flag & GP_FRAME_SELECT) {
- diff= -gpf->framenum;
- gpf->framenum= diff;
+ diff = -gpf->framenum;
+ gpf->framenum = diff;
}
return 0;
}
-static short mirror_gpf_xaxis (bGPDframe *gpf, Scene *scene)
+static short mirror_gpf_xaxis(bGPDframe *gpf, Scene *scene)
{
int diff;
if (gpf->flag & GP_FRAME_SELECT) {
- diff= -gpf->framenum;
- gpf->framenum= diff;
+ diff = -gpf->framenum;
+ gpf->framenum = diff;
}
return 0;
}
-static short mirror_gpf_marker (bGPDframe *gpf, Scene *scene)
+static short mirror_gpf_marker(bGPDframe *gpf, Scene *scene)
{
static TimeMarker *marker;
static short initialized = 0;
@@ -575,8 +575,8 @@ static short mirror_gpf_marker (bGPDframe *gpf, Scene *scene)
if (gpf) {
/* mirroring time */
if ((gpf->flag & GP_FRAME_SELECT) && (marker)) {
- diff= (marker->frame - gpf->framenum);
- gpf->framenum= (marker->frame + diff);
+ diff = (marker->frame - gpf->framenum);
+ gpf->framenum = (marker->frame + diff);
}
}
else {
@@ -588,9 +588,9 @@ static short mirror_gpf_marker (bGPDframe *gpf, Scene *scene)
}
else {
/* try to find a marker */
- marker= ED_markers_get_first_selected(&scene->markers);
+ marker = ED_markers_get_first_selected(&scene->markers);
if (marker) {
- initialized= 1;
+ initialized = 1;
}
}
}
@@ -600,7 +600,7 @@ static short mirror_gpf_marker (bGPDframe *gpf, Scene *scene)
/* mirror selected gp-frames on... */
-void mirror_gplayer_frames (bGPDlayer *gpl, Scene *scene, short mode)
+void mirror_gplayer_frames(bGPDlayer *gpl, Scene *scene, short mode)
{
switch (mode) {
case 1: /* mirror over current frame */
diff --git a/source/blender/editors/gpencil/gpencil_buttons.c b/source/blender/editors/gpencil/gpencil_buttons.c
index 263c842ed08..3a7e806c2ed 100644
--- a/source/blender/editors/gpencil/gpencil_buttons.c
+++ b/source/blender/editors/gpencil/gpencil_buttons.c
@@ -74,7 +74,7 @@ static void gp_ui_activelayer_cb(bContext *C, void *gpd, void *gpl)
/* make sure the layer we want to remove is the active one */
gpencil_layer_setactive(gpd, gpl);
- WM_event_add_notifier(C, NC_SCREEN|ND_GPENCIL|NA_EDITED, NULL); /* XXX please work! */
+ WM_event_add_notifier(C, NC_SCREEN | ND_GPENCIL | NA_EDITED, NULL); /* XXX please work! */
}
/* delete 'active' layer */
@@ -84,7 +84,7 @@ static void gp_ui_dellayer_cb(bContext *C, void *gpd, void *gpl)
gpencil_layer_setactive(gpd, gpl);
gpencil_layer_delactive(gpd);
- WM_event_add_notifier(C, NC_SCREEN|ND_GPENCIL|NA_EDITED, NULL); /* XXX please work! */
+ WM_event_add_notifier(C, NC_SCREEN | ND_GPENCIL | NA_EDITED, NULL); /* XXX please work! */
}
@@ -133,7 +133,7 @@ static void gp_drawui_layer(uiLayout *layout, bGPdata *gpd, bGPDlayer *gpl, cons
uiItemR(sub, &ptr, "lock", 0, "", icon);
/* when layer is locked or hidden, only draw header */
- if (gpl->flag & (GP_LAYER_LOCKED|GP_LAYER_HIDE)) {
+ if (gpl->flag & (GP_LAYER_LOCKED | GP_LAYER_HIDE)) {
char name[256]; /* gpl->info is 128, but we need space for 'locked/hidden' as well */
/* visibility button (only if hidden but not locked!) */
@@ -197,8 +197,8 @@ static void gp_drawui_layer(uiLayout *layout, bGPdata *gpd, bGPDlayer *gpl, cons
/* color */
sub = uiLayoutColumn(col, 1);
- uiItemR(sub, &ptr, "color", 0, "", ICON_NONE);
- uiItemR(sub, &ptr, "alpha", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
+ uiItemR(sub, &ptr, "color", 0, "", ICON_NONE);
+ uiItemR(sub, &ptr, "alpha", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
/* stroke thickness */
uiItemR(col, &ptr, "line_width", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
@@ -251,8 +251,8 @@ static void draw_gpencil_panel(bContext *C, uiLayout *layout, bGPdata *gpd, Poin
/* add new layer button - can be used even when no data, since it can add a new block too */
uiItemO(col, IFACE_("New Layer"), ICON_NONE, "GPENCIL_OT_layer_add");
row = uiLayoutRow(col, 1);
- uiItemO(row, IFACE_("Delete Frame"), ICON_NONE, "GPENCIL_OT_active_frame_delete");
- uiItemO(row, IFACE_("Convert"), ICON_NONE, "GPENCIL_OT_convert");
+ uiItemO(row, IFACE_("Delete Frame"), ICON_NONE, "GPENCIL_OT_active_frame_delete");
+ uiItemO(row, IFACE_("Convert"), ICON_NONE, "GPENCIL_OT_convert");
/* sanity checks... */
if (gpd == NULL)
@@ -266,29 +266,29 @@ static void draw_gpencil_panel(bContext *C, uiLayout *layout, bGPdata *gpd, Poin
/* draw gpd drawing settings first ------------------------------------- */
col = uiLayoutColumn(layout, 1);
- /* label */
- uiItemL(col, IFACE_("Drawing Settings:"), ICON_NONE);
+ /* label */
+ uiItemL(col, IFACE_("Drawing Settings:"), ICON_NONE);
- /* check whether advanced 3D-View drawing space options can be used */
- if (is_v3d) {
- if (gpd->flag & (GP_DATA_DEPTH_STROKE|GP_DATA_DEPTH_VIEW))
- v3d_stroke_opts = STROKE_OPTS_V3D_ON;
- else
- v3d_stroke_opts = STROKE_OPTS_V3D_OFF;
- }
-
- /* drawing space options */
- row= uiLayoutRow(col, 1);
- uiItemEnumR_string(row, &gpd_ptr, "draw_mode", "VIEW", NULL, ICON_NONE);
- uiItemEnumR_string(row, &gpd_ptr, "draw_mode", "CURSOR", NULL, ICON_NONE);
- row= uiLayoutRow(col, 1);
- uiLayoutSetActive(row, v3d_stroke_opts);
- uiItemEnumR_string(row, &gpd_ptr, "draw_mode", "SURFACE", NULL, ICON_NONE);
- uiItemEnumR_string(row, &gpd_ptr, "draw_mode", "STROKE", NULL, ICON_NONE);
+ /* check whether advanced 3D-View drawing space options can be used */
+ if (is_v3d) {
+ if (gpd->flag & (GP_DATA_DEPTH_STROKE | GP_DATA_DEPTH_VIEW))
+ v3d_stroke_opts = STROKE_OPTS_V3D_ON;
+ else
+ v3d_stroke_opts = STROKE_OPTS_V3D_OFF;
+ }
- row= uiLayoutRow(col, 0);
- uiLayoutSetActive(row, v3d_stroke_opts==STROKE_OPTS_V3D_ON);
- uiItemR(row, &gpd_ptr, "use_stroke_endpoints", 0, NULL, ICON_NONE);
+ /* drawing space options */
+ row = uiLayoutRow(col, 1);
+ uiItemEnumR_string(row, &gpd_ptr, "draw_mode", "VIEW", NULL, ICON_NONE);
+ uiItemEnumR_string(row, &gpd_ptr, "draw_mode", "CURSOR", NULL, ICON_NONE);
+ row = uiLayoutRow(col, 1);
+ uiLayoutSetActive(row, v3d_stroke_opts);
+ uiItemEnumR_string(row, &gpd_ptr, "draw_mode", "SURFACE", NULL, ICON_NONE);
+ uiItemEnumR_string(row, &gpd_ptr, "draw_mode", "STROKE", NULL, ICON_NONE);
+
+ row = uiLayoutRow(col, 0);
+ uiLayoutSetActive(row, v3d_stroke_opts == STROKE_OPTS_V3D_ON);
+ uiItemR(row, &gpd_ptr, "use_stroke_endpoints", 0, NULL, ICON_NONE);
}
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index d48cfaab63c..9250d48a20c 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -77,10 +77,10 @@
/* Context Wrangling... */
/* Get pointer to active Grease Pencil datablock, and an RNA-pointer to trace back to whatever owns it */
-bGPdata **gpencil_data_get_pointers (bContext *C, PointerRNA *ptr)
+bGPdata **gpencil_data_get_pointers(bContext *C, PointerRNA *ptr)
{
- Scene *scene= CTX_data_scene(C);
- ScrArea *sa= CTX_wm_area(C);
+ Scene *scene = CTX_data_scene(C);
+ ScrArea *sa = CTX_wm_area(C);
/* if there's an active area, check if the particular editor may
* have defined any special Grease Pencil context for editing...
@@ -89,7 +89,7 @@ bGPdata **gpencil_data_get_pointers (bContext *C, PointerRNA *ptr)
switch (sa->spacetype) {
case SPACE_VIEW3D: /* 3D-View */
{
- Object *ob= CTX_data_active_object(C);
+ Object *ob = CTX_data_active_object(C);
// TODO: we can include other data-types such as bones later if need be...
@@ -100,11 +100,11 @@ bGPdata **gpencil_data_get_pointers (bContext *C, PointerRNA *ptr)
return &ob->gpd;
}
}
- break;
+ break;
case SPACE_NODE: /* Nodes Editor */
{
- SpaceNode *snode= (SpaceNode *)CTX_wm_space_data(C);
+ SpaceNode *snode = (SpaceNode *)CTX_wm_space_data(C);
/* return the GP data for the active node block/node */
if (snode && snode->nodetree) {
@@ -117,7 +117,7 @@ bGPdata **gpencil_data_get_pointers (bContext *C, PointerRNA *ptr)
return NULL;
}
}
- break;
+ break;
case SPACE_SEQ: /* Sequencer */
{
@@ -125,23 +125,23 @@ bGPdata **gpencil_data_get_pointers (bContext *C, PointerRNA *ptr)
/* return the GP data for the active strips/image/etc. */
}
- break;
+ break;
case SPACE_IMAGE: /* Image/UV Editor */
{
- SpaceImage *sima= (SpaceImage *)CTX_wm_space_data(C);
+ SpaceImage *sima = (SpaceImage *)CTX_wm_space_data(C);
/* for now, Grease Pencil data is associated with the space... */
// XXX our convention for everything else is to link to data though...
if (ptr) RNA_pointer_create((ID *)CTX_wm_screen(C), &RNA_SpaceImageEditor, sima, ptr);
return &sima->gpd;
}
- break;
+ break;
case SPACE_CLIP: /* Nodes Editor */
{
- SpaceClip *sc= (SpaceClip *)CTX_wm_space_data(C);
- MovieClip *clip= ED_space_clip(sc);
+ SpaceClip *sc = (SpaceClip *)CTX_wm_space_data(C);
+ MovieClip *clip = ED_space_clip(sc);
if (clip) {
/* for now, as long as there's a clip, default to using that in Clip Editor */
@@ -149,7 +149,7 @@ bGPdata **gpencil_data_get_pointers (bContext *C, PointerRNA *ptr)
return &clip->gpd;
}
}
- break;
+ break;
default: /* unsupported space */
return NULL;
@@ -162,16 +162,16 @@ bGPdata **gpencil_data_get_pointers (bContext *C, PointerRNA *ptr)
}
/* Get the active Grease Pencil datablock */
-bGPdata *gpencil_data_get_active (bContext *C)
+bGPdata *gpencil_data_get_active(bContext *C)
{
- bGPdata **gpd_ptr= gpencil_data_get_pointers(C, NULL);
+ bGPdata **gpd_ptr = gpencil_data_get_pointers(C, NULL);
return (gpd_ptr) ? *(gpd_ptr) : NULL;
}
/* needed for offscreen rendering */
-bGPdata *gpencil_data_get_active_v3d (Scene *scene)
+bGPdata *gpencil_data_get_active_v3d(Scene *scene)
{
- bGPdata *gpd= scene->basact ? scene->basact->object->gpd : NULL;
+ bGPdata *gpd = scene->basact ? scene->basact->object->gpd : NULL;
return gpd ? gpd : scene->gpd;
}
@@ -179,7 +179,7 @@ bGPdata *gpencil_data_get_active_v3d (Scene *scene)
/* Panel Operators */
/* poll callback for adding data/layers - special */
-static int gp_add_poll (bContext *C)
+static int gp_add_poll(bContext *C)
{
/* the base line we have is that we have somewhere to add Grease Pencil data */
return gpencil_data_get_pointers(C, NULL) != NULL;
@@ -188,9 +188,9 @@ static int gp_add_poll (bContext *C)
/* ******************* Add New Data ************************ */
/* add new datablock - wrapper around API */
-static int gp_data_add_exec (bContext *C, wmOperator *op)
+static int gp_data_add_exec(bContext *C, wmOperator *op)
{
- bGPdata **gpd_ptr= gpencil_data_get_pointers(C, NULL);
+ bGPdata **gpd_ptr = gpencil_data_get_pointers(C, NULL);
if (gpd_ptr == NULL) {
BKE_report(op->reports, RPT_ERROR, "Nowhere for Grease Pencil data to go");
@@ -198,25 +198,25 @@ static int gp_data_add_exec (bContext *C, wmOperator *op)
}
else {
/* decrement user count and add new datablock */
- bGPdata *gpd= (*gpd_ptr);
+ bGPdata *gpd = (*gpd_ptr);
id_us_min(&gpd->id);
- *gpd_ptr= gpencil_data_addnew("GPencil");
+ *gpd_ptr = gpencil_data_addnew("GPencil");
}
/* notifiers */
- WM_event_add_notifier(C, NC_SCREEN|ND_GPENCIL|NA_EDITED, NULL); // XXX need a nicer one that will work
+ WM_event_add_notifier(C, NC_SCREEN | ND_GPENCIL | NA_EDITED, NULL); // XXX need a nicer one that will work
return OPERATOR_FINISHED;
}
-void GPENCIL_OT_data_add (wmOperatorType *ot)
+void GPENCIL_OT_data_add(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Grease Pencil Add New";
ot->idname = "GPENCIL_OT_data_add";
ot->description = "Add new Grease Pencil datablock";
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* callbacks */
ot->exec = gp_data_add_exec;
@@ -226,9 +226,9 @@ void GPENCIL_OT_data_add (wmOperatorType *ot)
/* ******************* Unlink Data ************************ */
/* poll callback for adding data/layers - special */
-static int gp_data_unlink_poll (bContext *C)
+static int gp_data_unlink_poll(bContext *C)
{
- bGPdata **gpd_ptr= gpencil_data_get_pointers(C, NULL);
+ bGPdata **gpd_ptr = gpencil_data_get_pointers(C, NULL);
/* if we have access to some active data, make sure there's a datablock before enabling this */
return (gpd_ptr && *gpd_ptr);
@@ -236,9 +236,9 @@ static int gp_data_unlink_poll (bContext *C)
/* unlink datablock - wrapper around API */
-static int gp_data_unlink_exec (bContext *C, wmOperator *op)
+static int gp_data_unlink_exec(bContext *C, wmOperator *op)
{
- bGPdata **gpd_ptr= gpencil_data_get_pointers(C, NULL);
+ bGPdata **gpd_ptr = gpencil_data_get_pointers(C, NULL);
if (gpd_ptr == NULL) {
BKE_report(op->reports, RPT_ERROR, "Nowhere for Grease Pencil data to go");
@@ -246,25 +246,25 @@ static int gp_data_unlink_exec (bContext *C, wmOperator *op)
}
else {
/* just unlink datablock now, decreasing its user count */
- bGPdata *gpd= (*gpd_ptr);
+ bGPdata *gpd = (*gpd_ptr);
id_us_min(&gpd->id);
- *gpd_ptr= NULL;
+ *gpd_ptr = NULL;
}
/* notifiers */
- WM_event_add_notifier(C, NC_SCREEN|ND_GPENCIL|NA_EDITED, NULL); // XXX need a nicer one that will work
+ WM_event_add_notifier(C, NC_SCREEN | ND_GPENCIL | NA_EDITED, NULL); // XXX need a nicer one that will work
return OPERATOR_FINISHED;
}
-void GPENCIL_OT_data_unlink (wmOperatorType *ot)
+void GPENCIL_OT_data_unlink(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Grease Pencil Unlink";
ot->idname = "GPENCIL_OT_data_unlink";
ot->description = "Unlink active Grease Pencil datablock";
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* callbacks */
ot->exec = gp_data_unlink_exec;
@@ -274,9 +274,9 @@ void GPENCIL_OT_data_unlink (wmOperatorType *ot)
/* ******************* Add New Layer ************************ */
/* add new layer - wrapper around API */
-static int gp_layer_add_exec (bContext *C, wmOperator *op)
+static int gp_layer_add_exec(bContext *C, wmOperator *op)
{
- bGPdata **gpd_ptr= gpencil_data_get_pointers(C, NULL);
+ bGPdata **gpd_ptr = gpencil_data_get_pointers(C, NULL);
/* if there's no existing Grease-Pencil data there, add some */
if (gpd_ptr == NULL) {
@@ -284,24 +284,24 @@ static int gp_layer_add_exec (bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
if (*gpd_ptr == NULL)
- *gpd_ptr= gpencil_data_addnew("GPencil");
+ *gpd_ptr = gpencil_data_addnew("GPencil");
/* add new layer now */
gpencil_layer_addnew(*gpd_ptr);
/* notifiers */
- WM_event_add_notifier(C, NC_SCREEN|ND_GPENCIL|NA_EDITED, NULL); // XXX please work!
+ WM_event_add_notifier(C, NC_SCREEN | ND_GPENCIL | NA_EDITED, NULL); // XXX please work!
return OPERATOR_FINISHED;
}
-void GPENCIL_OT_layer_add (wmOperatorType *ot)
+void GPENCIL_OT_layer_add(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Add New Layer";
ot->idname = "GPENCIL_OT_layer_add";
ot->description = "Add new Grease Pencil layer for the active Grease Pencil datablock";
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* callbacks */
ot->exec = gp_layer_add_exec;
@@ -310,22 +310,22 @@ void GPENCIL_OT_layer_add (wmOperatorType *ot)
/* ******************* Delete Active Frame ************************ */
-static int gp_actframe_delete_poll (bContext *C)
+static int gp_actframe_delete_poll(bContext *C)
{
- bGPdata *gpd= gpencil_data_get_active(C);
- bGPDlayer *gpl= gpencil_layer_getactive(gpd);
+ bGPdata *gpd = gpencil_data_get_active(C);
+ bGPDlayer *gpl = gpencil_layer_getactive(gpd);
/* only if there's an active layer with an active frame */
return (gpl && gpl->actframe);
}
/* delete active frame - wrapper around API calls */
-static int gp_actframe_delete_exec (bContext *C, wmOperator *op)
+static int gp_actframe_delete_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
- bGPdata *gpd= gpencil_data_get_active(C);
- bGPDlayer *gpl= gpencil_layer_getactive(gpd);
- bGPDframe *gpf= gpencil_layer_getframe(gpl, CFRA, 0);
+ Scene *scene = CTX_data_scene(C);
+ bGPdata *gpd = gpencil_data_get_active(C);
+ bGPDlayer *gpl = gpencil_layer_getactive(gpd);
+ bGPDframe *gpf = gpencil_layer_getframe(gpl, CFRA, 0);
/* if there's no existing Grease-Pencil data there, add some */
if (gpd == NULL) {
@@ -341,18 +341,18 @@ static int gp_actframe_delete_exec (bContext *C, wmOperator *op)
gpencil_layer_delframe(gpl, gpf);
/* notifiers */
- WM_event_add_notifier(C, NC_SCREEN|ND_GPENCIL|NA_EDITED, NULL); // XXX please work!
+ WM_event_add_notifier(C, NC_SCREEN | ND_GPENCIL | NA_EDITED, NULL); // XXX please work!
return OPERATOR_FINISHED;
}
-void GPENCIL_OT_active_frame_delete (wmOperatorType *ot)
+void GPENCIL_OT_active_frame_delete(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Delete Active Frame";
ot->idname = "GPENCIL_OT_active_frame_delete";
ot->description = "Delete the active frame for the active Grease Pencil datablock";
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* callbacks */
ot->exec = gp_actframe_delete_exec;
@@ -380,35 +380,35 @@ static EnumPropertyItem prop_gpencil_convertmodes[] = {
/* convert the coordinates from the given stroke point into 3d-coordinates
* - assumes that the active space is the 3D-View
*/
-static void gp_strokepoint_convertcoords (bContext *C, bGPDstroke *gps, bGPDspoint *pt, float p3d[3], rctf *subrect)
+static void gp_strokepoint_convertcoords(bContext *C, bGPDstroke *gps, bGPDspoint *pt, float p3d[3], rctf *subrect)
{
- Scene *scene= CTX_data_scene(C);
- View3D *v3d= CTX_wm_view3d(C);
- ARegion *ar= CTX_wm_region(C);
+ Scene *scene = CTX_data_scene(C);
+ View3D *v3d = CTX_wm_view3d(C);
+ ARegion *ar = CTX_wm_region(C);
if (gps->flag & GP_STROKE_3DSPACE) {
/* directly use 3d-coordinates */
copy_v3_v3(p3d, &pt->x);
}
else {
- float *fp= give_cursor(scene, v3d);
+ float *fp = give_cursor(scene, v3d);
float mvalf[2];
/* get screen coordinate */
if (gps->flag & GP_STROKE_2DSPACE) {
int mvali[2];
- View2D *v2d= &ar->v2d;
- UI_view2d_view_to_region(v2d, pt->x, pt->y, mvali, mvali+1);
+ View2D *v2d = &ar->v2d;
+ UI_view2d_view_to_region(v2d, pt->x, pt->y, mvali, mvali + 1);
VECCOPY2D(mvalf, mvali);
}
else {
if (subrect) {
- mvalf[0]= (((float)pt->x/100.0f) * (subrect->xmax - subrect->xmin)) + subrect->xmin;
- mvalf[1]= (((float)pt->y/100.0f) * (subrect->ymax - subrect->ymin)) + subrect->ymin;
+ mvalf[0] = (((float)pt->x / 100.0f) * (subrect->xmax - subrect->xmin)) + subrect->xmin;
+ mvalf[1] = (((float)pt->y / 100.0f) * (subrect->ymax - subrect->ymin)) + subrect->ymin;
}
else {
- mvalf[0]= (float)pt->x / 100.0f * ar->winx;
- mvalf[1]= (float)pt->y / 100.0f * ar->winy;
+ mvalf[0] = (float)pt->x / 100.0f * ar->winx;
+ mvalf[1] = (float)pt->y / 100.0f * ar->winy;
}
}
@@ -422,7 +422,7 @@ static void gp_strokepoint_convertcoords (bContext *C, bGPDstroke *gps, bGPDspoi
/* --- */
/* convert stroke to 3d path */
-static void gp_stroke_to_path (bContext *C, bGPDlayer *gpl, bGPDstroke *gps, Curve *cu, rctf *subrect)
+static void gp_stroke_to_path(bContext *C, bGPDlayer *gpl, bGPDstroke *gps, Curve *cu, rctf *subrect)
{
bGPDspoint *pt;
Nurb *nu;
@@ -432,16 +432,16 @@ static void gp_stroke_to_path (bContext *C, bGPDlayer *gpl, bGPDstroke *gps, Cur
/* create new 'nurb' within the curve */
nu = (Nurb *)MEM_callocN(sizeof(Nurb), "gpstroke_to_path(nurb)");
- nu->pntsu= gps->totpoints;
- nu->pntsv= 1;
- nu->orderu= gps->totpoints;
- nu->flagu= CU_NURB_ENDPOINT;
- nu->resolu= 32;
+ nu->pntsu = gps->totpoints;
+ nu->pntsv = 1;
+ nu->orderu = gps->totpoints;
+ nu->flagu = CU_NURB_ENDPOINT;
+ nu->resolu = 32;
- nu->bp= (BPoint *)MEM_callocN(sizeof(BPoint)*gps->totpoints, "bpoints");
+ nu->bp = (BPoint *)MEM_callocN(sizeof(BPoint) * gps->totpoints, "bpoints");
/* add points */
- for (i=0, pt=gps->points, bp=nu->bp; i < gps->totpoints; i++, pt++, bp++) {
+ for (i = 0, pt = gps->points, bp = nu->bp; i < gps->totpoints; i++, pt++, bp++) {
float p3d[3];
/* get coordinates to add at */
@@ -449,7 +449,7 @@ static void gp_stroke_to_path (bContext *C, bGPDlayer *gpl, bGPDstroke *gps, Cur
copy_v3_v3(bp->vec, p3d);
/* set settings */
- bp->f1= SELECT;
+ bp->f1 = SELECT;
bp->radius = bp->weight = pt->pressure * gpl->thickness;
}
@@ -459,15 +459,15 @@ static void gp_stroke_to_path (bContext *C, bGPDlayer *gpl, bGPDstroke *gps, Cur
static int gp_camera_view_subrect(bContext *C, rctf *subrect)
{
- View3D *v3d= CTX_wm_view3d(C);
- ARegion *ar= CTX_wm_region(C);
+ View3D *v3d = CTX_wm_view3d(C);
+ ARegion *ar = CTX_wm_region(C);
if (v3d) {
- RegionView3D *rv3d= ar->regiondata;
+ RegionView3D *rv3d = ar->regiondata;
/* for camera view set the subrect */
if (rv3d->persp == RV3D_CAMOB) {
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
ED_view3d_calc_camera_border(scene, ar, v3d, rv3d, subrect, TRUE); /* no shift */
return 1;
}
@@ -477,7 +477,7 @@ static int gp_camera_view_subrect(bContext *C, rctf *subrect)
}
/* convert stroke to 3d bezier */
-static void gp_stroke_to_bezier (bContext *C, bGPDlayer *gpl, bGPDstroke *gps, Curve *cu, rctf *subrect)
+static void gp_stroke_to_bezier(bContext *C, bGPDlayer *gpl, bGPDstroke *gps, Curve *cu, rctf *subrect)
{
bGPDspoint *pt;
Nurb *nu;
@@ -488,31 +488,31 @@ static void gp_stroke_to_bezier (bContext *C, bGPDlayer *gpl, bGPDstroke *gps, C
/* create new 'nurb' within the curve */
nu = (Nurb *)MEM_callocN(sizeof(Nurb), "gpstroke_to_bezier(nurb)");
- nu->pntsu= gps->totpoints;
- nu->resolu= 12;
- nu->resolv= 12;
- nu->type= CU_BEZIER;
- nu->bezt = (BezTriple *)MEM_callocN(gps->totpoints*sizeof(BezTriple), "bezts");
+ nu->pntsu = gps->totpoints;
+ nu->resolu = 12;
+ nu->resolv = 12;
+ nu->type = CU_BEZIER;
+ nu->bezt = (BezTriple *)MEM_callocN(gps->totpoints * sizeof(BezTriple), "bezts");
- tot= gps->totpoints;
+ tot = gps->totpoints;
/* get initial coordinates */
- pt=gps->points;
+ pt = gps->points;
if (tot) {
gp_strokepoint_convertcoords(C, gps, pt, p3d_cur, subrect);
if (tot > 1) {
- gp_strokepoint_convertcoords(C, gps, pt+1, p3d_next, subrect);
+ gp_strokepoint_convertcoords(C, gps, pt + 1, p3d_next, subrect);
}
}
/* add points */
- for (i=0, bezt=nu->bezt; i < tot; i++, pt++, bezt++) {
+ for (i = 0, bezt = nu->bezt; i < tot; i++, pt++, bezt++) {
float h1[3], h2[3];
if (i) interp_v3_v3v3(h1, p3d_cur, p3d_prev, 0.3);
else interp_v3_v3v3(h1, p3d_cur, p3d_next, -0.3);
- if (i < tot-1) interp_v3_v3v3(h2, p3d_cur, p3d_next, 0.3);
+ if (i < tot - 1) interp_v3_v3v3(h2, p3d_cur, p3d_next, 0.3);
else interp_v3_v3v3(h2, p3d_cur, p3d_prev, -0.3);
copy_v3_v3(bezt->vec[0], h1);
@@ -520,8 +520,8 @@ static void gp_stroke_to_bezier (bContext *C, bGPDlayer *gpl, bGPDstroke *gps, C
copy_v3_v3(bezt->vec[2], h2);
/* set settings */
- bezt->h1= bezt->h2= HD_FREE;
- bezt->f1= bezt->f2= bezt->f3= SELECT;
+ bezt->h1 = bezt->h2 = HD_FREE;
+ bezt->f1 = bezt->f2 = bezt->f3 = SELECT;
bezt->radius = bezt->weight = pt->pressure * gpl->thickness * 0.1f;
/* shift coord vects */
@@ -534,23 +534,23 @@ static void gp_stroke_to_bezier (bContext *C, bGPDlayer *gpl, bGPDstroke *gps, C
}
/* must calculate handles or else we crash */
- calchandlesNurb(nu);
+ BKE_nurb_handles_calc(nu);
/* add nurb to curve */
BLI_addtail(&cu->nurb, nu);
}
/* convert a given grease-pencil layer to a 3d-curve representation (using current view if appropriate) */
-static void gp_layer_to_curve (bContext *C, bGPdata *gpd, bGPDlayer *gpl, short mode)
+static void gp_layer_to_curve(bContext *C, bGPdata *gpd, bGPDlayer *gpl, short mode)
{
- Scene *scene= CTX_data_scene(C);
- bGPDframe *gpf= gpencil_layer_getframe(gpl, CFRA, 0);
+ Scene *scene = CTX_data_scene(C);
+ bGPDframe *gpf = gpencil_layer_getframe(gpl, CFRA, 0);
bGPDstroke *gps;
Object *ob;
Curve *cu;
/* camera framing */
- rctf subrect, *subrect_ptr= NULL;
+ rctf subrect, *subrect_ptr = NULL;
/* error checking */
if (ELEM3(NULL, gpd, gpl, gpf))
@@ -562,16 +562,16 @@ static void gp_layer_to_curve (bContext *C, bGPdata *gpd, bGPDlayer *gpl, short
/* initialize camera framing */
if (gp_camera_view_subrect(C, &subrect)) {
- subrect_ptr= &subrect;
+ subrect_ptr = &subrect;
}
/* init the curve object (remove rotation and get curve data from it)
* - must clear transforms set on object, as those skew our results
*/
- ob= add_object(scene, OB_CURVE);
+ ob = BKE_object_add(scene, OB_CURVE);
zero_v3(ob->loc);
zero_v3(ob->rot);
- cu= ob->data;
+ cu = ob->data;
cu->flag |= CU_3D;
/* rename object and curve to layer name */
@@ -579,7 +579,7 @@ static void gp_layer_to_curve (bContext *C, bGPdata *gpd, bGPDlayer *gpl, short
rename_id((ID *)cu, gpl->info);
/* add points to curve */
- for (gps= gpf->strokes.first; gps; gps= gps->next) {
+ for (gps = gpf->strokes.first; gps; gps = gps->next) {
switch (mode) {
case GP_STROKECONVERT_PATH:
gp_stroke_to_path(C, gpl, gps, cu, subrect_ptr);
@@ -596,22 +596,22 @@ static void gp_layer_to_curve (bContext *C, bGPdata *gpd, bGPDlayer *gpl, short
/* --- */
-static int gp_convert_poll (bContext *C)
+static int gp_convert_poll(bContext *C)
{
- bGPdata *gpd= gpencil_data_get_active(C);
- ScrArea *sa= CTX_wm_area(C);
- Scene *scene= CTX_data_scene(C);
+ bGPdata *gpd = gpencil_data_get_active(C);
+ ScrArea *sa = CTX_wm_area(C);
+ Scene *scene = CTX_data_scene(C);
/* only if there's valid data, and the current view is 3D View */
return ((sa && sa->spacetype == SPACE_VIEW3D) && gpencil_layer_getactive(gpd) && (scene->obedit == NULL));
}
-static int gp_convert_layer_exec (bContext *C, wmOperator *op)
+static int gp_convert_layer_exec(bContext *C, wmOperator *op)
{
- bGPdata *gpd= gpencil_data_get_active(C);
- bGPDlayer *gpl= gpencil_layer_getactive(gpd);
- Scene *scene= CTX_data_scene(C);
- int mode= RNA_enum_get(op->ptr, "type");
+ bGPdata *gpd = gpencil_data_get_active(C);
+ bGPDlayer *gpl = gpencil_layer_getactive(gpd);
+ Scene *scene = CTX_data_scene(C);
+ int mode = RNA_enum_get(op->ptr, "type");
/* check if there's data to work with */
if (gpd == NULL) {
@@ -622,20 +622,20 @@ static int gp_convert_layer_exec (bContext *C, wmOperator *op)
gp_layer_to_curve(C, gpd, gpl, mode);
/* notifiers */
- WM_event_add_notifier(C, NC_OBJECT|NA_ADDED, NULL);
- WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, scene);
+ WM_event_add_notifier(C, NC_OBJECT | NA_ADDED, NULL);
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene);
/* done */
return OPERATOR_FINISHED;
}
-void GPENCIL_OT_convert (wmOperatorType *ot)
+void GPENCIL_OT_convert(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Convert Grease Pencil";
ot->idname = "GPENCIL_OT_convert";
ot->description = "Convert the active Grease Pencil layer to a new Object";
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* callbacks */
ot->invoke = WM_menu_invoke;
@@ -643,7 +643,7 @@ void GPENCIL_OT_convert (wmOperatorType *ot)
ot->poll = gp_convert_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
ot->prop = RNA_def_enum(ot->srna, "type", prop_gpencil_convertmodes, 0, "Type", "");
diff --git a/source/blender/editors/gpencil/gpencil_intern.h b/source/blender/editors/gpencil/gpencil_intern.h
index b88723d8a3c..28eb1355caf 100644
--- a/source/blender/editors/gpencil/gpencil_intern.h
+++ b/source/blender/editors/gpencil/gpencil_intern.h
@@ -77,18 +77,18 @@ void gpencil_undo_finish(void);
typedef struct bActListElem {
struct bActListElem *next, *prev;
- void *data; /* source data this elem represents */
- int type; /* one of the ACTTYPE_* values */
- int flag; /* copy of elem's flags for quick access */
- int index; /* copy of adrcode where applicable */
+ void *data; /* source data this elem represents */
+ int type; /* one of the ACTTYPE_* values */
+ int flag; /* copy of elem's flags for quick access */
+ int index; /* copy of adrcode where applicable */
- void *key_data; /* motion data - ipo or ipo-curve */
- short datatype; /* type of motion data to expect */
+ void *key_data; /* motion data - ipo or ipo-curve */
+ short datatype; /* type of motion data to expect */
- struct bActionGroup *grp; /* action group that owns the channel */
+ struct bActionGroup *grp; /* action group that owns the channel */
- void *owner; /* will either be an action channel or fake ipo-channel (for keys) */
- short ownertype; /* type of owner */
+ void *owner; /* will either be an action channel or fake ipo-channel (for keys) */
+ short ownertype; /* type of owner */
} bActListElem;
/******************************************************* */
@@ -96,14 +96,14 @@ typedef struct bActListElem {
/* filtering flags - under what circumstances should a channel be added */
typedef enum ACTFILTER_FLAGS {
- ACTFILTER_VISIBLE = (1<<0), /* should channels be visible */
- ACTFILTER_SEL = (1<<1), /* should channels be selected */
- ACTFILTER_FOREDIT = (1<<2), /* does editable status matter */
- ACTFILTER_CHANNELS = (1<<3), /* do we only care that it is a channel */
- ACTFILTER_IPOKEYS = (1<<4), /* only channels referencing ipo's */
- ACTFILTER_ONLYICU = (1<<5), /* only reference ipo-curves */
- ACTFILTER_FORDRAWING = (1<<6), /* make list for interface drawing */
- ACTFILTER_ACTGROUPED = (1<<7) /* belongs to the active group */
+ ACTFILTER_VISIBLE = (1 << 0), /* should channels be visible */
+ ACTFILTER_SEL = (1 << 1), /* should channels be selected */
+ ACTFILTER_FOREDIT = (1 << 2), /* does editable status matter */
+ ACTFILTER_CHANNELS = (1 << 3), /* do we only care that it is a channel */
+ ACTFILTER_IPOKEYS = (1 << 4), /* only channels referencing ipo's */
+ ACTFILTER_ONLYICU = (1 << 5), /* only reference ipo-curves */
+ ACTFILTER_FORDRAWING = (1 << 6), /* make list for interface drawing */
+ ACTFILTER_ACTGROUPED = (1 << 7) /* belongs to the active group */
} ACTFILTER_FLAGS;
/* Action Editor - Main Data types */
diff --git a/source/blender/editors/gpencil/gpencil_ops.c b/source/blender/editors/gpencil/gpencil_ops.c
index 0afe791029f..7055eb3ee1b 100644
--- a/source/blender/editors/gpencil/gpencil_ops.c
+++ b/source/blender/editors/gpencil/gpencil_ops.c
@@ -54,23 +54,27 @@ void ED_keymap_gpencil(wmKeyConfig *keyconf)
wmKeyMapItem *kmi;
/* Draw */
- /* draw */
- kmi=WM_keymap_add_item(keymap, "GPENCIL_OT_draw", LEFTMOUSE, KM_PRESS, 0, DKEY);
- RNA_enum_set(kmi->ptr, "mode", GP_PAINTMODE_DRAW);
- /* draw - straight lines */
- kmi=WM_keymap_add_item(keymap, "GPENCIL_OT_draw", LEFTMOUSE, KM_PRESS, KM_CTRL, DKEY);
- RNA_enum_set(kmi->ptr, "mode", GP_PAINTMODE_DRAW_STRAIGHT);
- /* draw - poly lines */
- kmi=WM_keymap_add_item(keymap, "GPENCIL_OT_draw", RIGHTMOUSE, KM_PRESS, KM_CTRL, DKEY);
- RNA_enum_set(kmi->ptr, "mode", GP_PAINTMODE_DRAW_POLY);
- /* erase */
- kmi=WM_keymap_add_item(keymap, "GPENCIL_OT_draw", RIGHTMOUSE, KM_PRESS, 0, DKEY);
- RNA_enum_set(kmi->ptr, "mode", GP_PAINTMODE_ERASER);
+
+ /* draw */
+ kmi = WM_keymap_add_item(keymap, "GPENCIL_OT_draw", LEFTMOUSE, KM_PRESS, 0, DKEY);
+ RNA_enum_set(kmi->ptr, "mode", GP_PAINTMODE_DRAW);
+
+ /* draw - straight lines */
+ kmi = WM_keymap_add_item(keymap, "GPENCIL_OT_draw", LEFTMOUSE, KM_PRESS, KM_CTRL, DKEY);
+ RNA_enum_set(kmi->ptr, "mode", GP_PAINTMODE_DRAW_STRAIGHT);
+
+ /* draw - poly lines */
+ kmi = WM_keymap_add_item(keymap, "GPENCIL_OT_draw", RIGHTMOUSE, KM_PRESS, KM_CTRL, DKEY);
+ RNA_enum_set(kmi->ptr, "mode", GP_PAINTMODE_DRAW_POLY);
+
+ /* erase */
+ kmi = WM_keymap_add_item(keymap, "GPENCIL_OT_draw", RIGHTMOUSE, KM_PRESS, 0, DKEY);
+ RNA_enum_set(kmi->ptr, "mode", GP_PAINTMODE_ERASER);
}
/* ****************************************** */
-void ED_operatortypes_gpencil (void)
+void ED_operatortypes_gpencil(void)
{
/* Drawing ----------------------- */
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index c366de6fa43..b79c510efce 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -71,38 +71,38 @@
typedef struct tGPsdata {
Scene *scene; /* current scene from context */
- wmWindow *win; /* window where painting originated */
- ScrArea *sa; /* area where painting originated */
+ wmWindow *win; /* window where painting originated */
+ ScrArea *sa; /* area where painting originated */
ARegion *ar; /* region where painting originated */
- View2D *v2d; /* needed for GP_STROKE_2DSPACE */
- rctf *subrect; /* for using the camera rect within the 3d view */
+ View2D *v2d; /* needed for GP_STROKE_2DSPACE */
+ rctf *subrect; /* for using the camera rect within the 3d view */
rctf subrect_data;
#if 0 // XXX review this 2d image stuff...
- ImBuf *ibuf; /* needed for GP_STROKE_2DIMAGE */
+ ImBuf *ibuf; /* needed for GP_STROKE_2DIMAGE */
struct IBufViewSettings {
- int offsx, offsy; /* offsets */
- int sizex, sizey; /* dimensions to use as scale-factor */
- } im2d_settings; /* needed for GP_STROKE_2DIMAGE */
+ int offsx, offsy; /* offsets */
+ int sizex, sizey; /* dimensions to use as scale-factor */
+ } im2d_settings; /* needed for GP_STROKE_2DIMAGE */
#endif
- PointerRNA ownerPtr;/* pointer to owner of gp-datablock */
- bGPdata *gpd; /* gp-datablock layer comes from */
- bGPDlayer *gpl; /* layer we're working on */
- bGPDframe *gpf; /* frame we're working on */
-
- short status; /* current status of painting */
- short paintmode; /* mode for painting */
+ PointerRNA ownerPtr; /* pointer to owner of gp-datablock */
+ bGPdata *gpd; /* gp-datablock layer comes from */
+ bGPDlayer *gpl; /* layer we're working on */
+ bGPDframe *gpf; /* frame we're working on */
+
+ short status; /* current status of painting */
+ short paintmode; /* mode for painting */
- int mval[2]; /* current mouse-position */
- int mvalo[2]; /* previous recorded mouse-position */
+ int mval[2]; /* current mouse-position */
+ int mvalo[2]; /* previous recorded mouse-position */
- float pressure; /* current stylus pressure */
- float opressure; /* previous stylus pressure */
+ float pressure; /* current stylus pressure */
+ float opressure; /* previous stylus pressure */
- short radius; /* radius of influence for eraser */
- short flags; /* flags that can get set during runtime */
+ short radius; /* radius of influence for eraser */
+ short flags; /* flags that can get set during runtime */
float imat[4][4]; /* inverted transformation matrix applying when converting coords from screen-space
* to region space */
@@ -112,36 +112,36 @@ typedef struct tGPsdata {
/* values for tGPsdata->status */
enum {
- GP_STATUS_IDLING = 0, /* stroke isn't in progress yet */
- GP_STATUS_PAINTING, /* a stroke is in progress */
- GP_STATUS_ERROR, /* something wasn't correctly set up */
- GP_STATUS_DONE /* painting done */
+ GP_STATUS_IDLING = 0, /* stroke isn't in progress yet */
+ GP_STATUS_PAINTING, /* a stroke is in progress */
+ GP_STATUS_ERROR, /* something wasn't correctly set up */
+ GP_STATUS_DONE /* painting done */
};
/* Return flags for adding points to stroke buffer */
enum {
- GP_STROKEADD_INVALID = -2, /* error occurred - insufficient info to do so */
- GP_STROKEADD_OVERFLOW = -1, /* error occurred - cannot fit any more points */
- GP_STROKEADD_NORMAL, /* point was successfully added */
- GP_STROKEADD_FULL /* cannot add any more points to buffer */
+ GP_STROKEADD_INVALID = -2, /* error occurred - insufficient info to do so */
+ GP_STROKEADD_OVERFLOW = -1, /* error occurred - cannot fit any more points */
+ GP_STROKEADD_NORMAL, /* point was successfully added */
+ GP_STROKEADD_FULL /* cannot add any more points to buffer */
};
/* Runtime flags */
enum {
- GP_PAINTFLAG_FIRSTRUN = (1<<0), /* operator just started */
- GP_PAINTFLAG_STROKEADDED = (1<<1) /* stroke was already added during draw session */
+ GP_PAINTFLAG_FIRSTRUN = (1 << 0), /* operator just started */
+ GP_PAINTFLAG_STROKEADDED = (1 << 1) /* stroke was already added during draw session */
};
/* ------ */
/* maximum sizes of gp-session buffer */
-#define GP_STROKE_BUFFER_MAX 5000
+#define GP_STROKE_BUFFER_MAX 5000
/* Macros for accessing sensitivity thresholds... */
- /* minimum number of pixels mouse should move before new point created */
-#define MIN_MANHATTEN_PX (U.gp_manhattendist)
- /* minimum length of new segment before new point can be added */
-#define MIN_EUCLIDEAN_PX (U.gp_euclideandist)
+/* minimum number of pixels mouse should move before new point created */
+#define MIN_MANHATTEN_PX (U.gp_manhattendist)
+/* minimum length of new segment before new point can be added */
+#define MIN_EUCLIDEAN_PX (U.gp_euclideandist)
/* ------ */
/* Forward defines for some functions... */
@@ -152,7 +152,7 @@ static void gp_session_validatebuffer(tGPsdata *p);
/* Context Wrangling... */
/* check if context is suitable for drawing */
-static int gpencil_draw_poll (bContext *C)
+static int gpencil_draw_poll(bContext *C)
{
if (ED_operator_regionactive(C)) {
/* check if current context can support GPencil data */
@@ -175,9 +175,9 @@ static int gpencil_draw_poll (bContext *C)
}
/* check if projecting strokes into 3d-geometry in the 3D-View */
-static int gpencil_project_check (tGPsdata *p)
+static int gpencil_project_check(tGPsdata *p)
{
- bGPdata *gpd= p->gpd;
+ bGPdata *gpd = p->gpd;
return ((gpd->sbuffer_sflag & GP_STROKE_3DSPACE) && (p->gpd->flag & (GP_DATA_DEPTH_VIEW | GP_DATA_DEPTH_STROKE)));
}
@@ -187,18 +187,18 @@ static int gpencil_project_check (tGPsdata *p)
/* Utilities --------------------------------- */
/* get the reference point for stroke-point conversions */
-static void gp_get_3d_reference (tGPsdata *p, float vec[3])
+static void gp_get_3d_reference(tGPsdata *p, float vec[3])
{
- View3D *v3d= p->sa->spacedata.first;
- float *fp= give_cursor(p->scene, v3d);
+ View3D *v3d = p->sa->spacedata.first;
+ float *fp = give_cursor(p->scene, v3d);
/* the reference point used depends on the owner... */
#if 0 // XXX: disabled for now, since we can't draw relative to the owner yet
if (p->ownerPtr.type == &RNA_Object) {
- Object *ob= (Object *)p->ownerPtr.data;
+ Object *ob = (Object *)p->ownerPtr.data;
/* active Object
- * - use relative distance of 3D-cursor from object center
+ * - use relative distance of 3D-cursor from object center
*/
sub_v3_v3v3(vec, fp, ob->loc);
}
@@ -213,10 +213,10 @@ static void gp_get_3d_reference (tGPsdata *p, float vec[3])
/* Stroke Editing ---------------------------- */
/* check if the current mouse position is suitable for adding a new point */
-static short gp_stroke_filtermval (tGPsdata *p, const int mval[2], int pmval[2])
+static short gp_stroke_filtermval(tGPsdata *p, const int mval[2], int pmval[2])
{
- int dx= abs(mval[0] - pmval[0]);
- int dy= abs(mval[1] - pmval[1]);
+ int dx = abs(mval[0] - pmval[0]);
+ int dy = abs(mval[1] - pmval[1]);
/* if buffer is empty, just let this go through (i.e. so that dots will work) */
if (p->gpd->sbuffer_size == 0)
@@ -232,7 +232,7 @@ static short gp_stroke_filtermval (tGPsdata *p, const int mval[2], int pmval[2])
* - prevents points being added too densely
* - distance here doesn't use sqrt to prevent slowness... we should still be safe from overflows though
*/
- else if ((dx*dx + dy*dy) > MIN_EUCLIDEAN_PX*MIN_EUCLIDEAN_PX)
+ else if ((dx * dx + dy * dy) > MIN_EUCLIDEAN_PX * MIN_EUCLIDEAN_PX)
return 1;
/* mouse 'didn't move' */
@@ -242,9 +242,9 @@ static short gp_stroke_filtermval (tGPsdata *p, const int mval[2], int pmval[2])
/* convert screen-coordinates to buffer-coordinates */
// XXX this method needs a total overhaul!
-static void gp_stroke_convertcoords (tGPsdata *p, const int mval[2], float out[3], float *depth)
+static void gp_stroke_convertcoords(tGPsdata *p, const int mval[2], float out[3], float *depth)
{
- bGPdata *gpd= p->gpd;
+ bGPdata *gpd = p->gpd;
/* in 3d-space - pt->x/y/z are 3 side-by-side floats */
if (gpd->sbuffer_sflag & GP_STROKE_3DSPACE) {
@@ -292,14 +292,14 @@ static void gp_stroke_convertcoords (tGPsdata *p, const int mval[2], float out[3
/* get stored settings
* - assume that these have been set already (there are checks that set sane 'defaults' just in case)
*/
- sizex= p->im2d_settings.sizex;
- sizey= p->im2d_settings.sizey;
- offsx= p->im2d_settings.offsx;
- offsy= p->im2d_settings.offsy;
+ sizex = p->im2d_settings.sizex;
+ sizey = p->im2d_settings.sizey;
+ offsx = p->im2d_settings.offsx;
+ offsy = p->im2d_settings.offsy;
/* calculate new points */
- out[0]= (float)(mval[0] - offsx) / (float)sizex;
- out[1]= (float)(mval[1] - offsy) / (float)sizey;
+ out[0] = (float)(mval[0] - offsx) / (float)sizex;
+ out[1] = (float)(mval[1] - offsy) / (float)sizey;
}
#endif
@@ -310,16 +310,16 @@ static void gp_stroke_convertcoords (tGPsdata *p, const int mval[2], float out[3
out[1] = (float)(mval[1]) / (float)(p->ar->winy) * 100;
}
else { /* camera view, use subrect */
- out[0]= ((mval[0] - p->subrect->xmin) / ((p->subrect->xmax - p->subrect->xmin))) * 100;
- out[1]= ((mval[1] - p->subrect->ymin) / ((p->subrect->ymax - p->subrect->ymin))) * 100;
+ out[0] = ((mval[0] - p->subrect->xmin) / ((p->subrect->xmax - p->subrect->xmin))) * 100;
+ out[1] = ((mval[1] - p->subrect->ymin) / ((p->subrect->ymax - p->subrect->ymin))) * 100;
}
}
}
/* add current stroke-point to buffer (returns whether point was successfully added) */
-static short gp_stroke_addpoint (tGPsdata *p, const int mval[2], float pressure)
+static short gp_stroke_addpoint(tGPsdata *p, const int mval[2], float pressure)
{
- bGPdata *gpd= p->gpd;
+ bGPdata *gpd = p->gpd;
tGPspoint *pt;
/* check painting mode */
@@ -327,11 +327,11 @@ static short gp_stroke_addpoint (tGPsdata *p, const int mval[2], float pressure)
/* straight lines only - i.e. only store start and end point in buffer */
if (gpd->sbuffer_size == 0) {
/* first point in buffer (start point) */
- pt= (tGPspoint *)(gpd->sbuffer);
+ pt = (tGPspoint *)(gpd->sbuffer);
/* store settings */
copy_v2_v2_int(&pt->x, mval);
- pt->pressure= pressure;
+ pt->pressure = pressure;
/* increment buffer size */
gpd->sbuffer_size++;
@@ -340,18 +340,18 @@ static short gp_stroke_addpoint (tGPsdata *p, const int mval[2], float pressure)
/* normally, we just reset the endpoint to the latest value
* - assume that pointers for this are always valid...
*/
- pt= ((tGPspoint *)(gpd->sbuffer) + 1);
+ pt = ((tGPspoint *)(gpd->sbuffer) + 1);
/* store settings */
copy_v2_v2_int(&pt->x, mval);
- pt->pressure= pressure;
+ pt->pressure = pressure;
/* if this is just the second point we've added, increment the buffer size
* so that it will be drawn properly...
* otherwise, just leave it alone, otherwise we get problems
*/
if (gpd->sbuffer_size != 2)
- gpd->sbuffer_size= 2;
+ gpd->sbuffer_size = 2;
}
/* can keep carrying on this way :) */
@@ -363,11 +363,11 @@ static short gp_stroke_addpoint (tGPsdata *p, const int mval[2], float pressure)
return GP_STROKEADD_OVERFLOW;
/* get pointer to destination point */
- pt= ((tGPspoint *)(gpd->sbuffer) + gpd->sbuffer_size);
+ pt = ((tGPspoint *)(gpd->sbuffer) + gpd->sbuffer_size);
/* store settings */
copy_v2_v2_int(&pt->x, mval);
- pt->pressure= pressure;
+ pt->pressure = pressure;
/* increment counters */
gpd->sbuffer_size++;
@@ -380,43 +380,43 @@ static short gp_stroke_addpoint (tGPsdata *p, const int mval[2], float pressure)
}
else if (p->paintmode == GP_PAINTMODE_DRAW_POLY) {
/* get pointer to destination point */
- pt= (tGPspoint *)(gpd->sbuffer);
+ pt = (tGPspoint *)(gpd->sbuffer);
/* store settings */
copy_v2_v2_int(&pt->x, mval);
- pt->pressure= pressure;
+ pt->pressure = pressure;
/* if there's stroke for this poly line session add (or replace last) point
* to stroke. This allows to draw lines more interactively (see new segment
* during mouse slide, i.e.)
*/
if (p->flags & GP_PAINTFLAG_STROKEADDED) {
- bGPDstroke *gps= p->gpf->strokes.last;
+ bGPDstroke *gps = p->gpf->strokes.last;
bGPDspoint *pts;
/* first time point is adding to temporary buffer -- need to allocate new point in stroke */
if (gpd->sbuffer_size == 0) {
- gps->points = MEM_reallocN(gps->points, sizeof(bGPDspoint)*(gps->totpoints+1));
+ gps->points = MEM_reallocN(gps->points, sizeof(bGPDspoint) * (gps->totpoints + 1));
gps->totpoints++;
}
- pts = &gps->points[gps->totpoints-1];
+ pts = &gps->points[gps->totpoints - 1];
/* special case for poly lines: normally, depth is needed only when creating new stroke from buffer,
* but poly lines are converting to stroke instantly, so initialize depth buffer before converting coordinates
*/
if (gpencil_project_check(p)) {
- View3D *v3d= p->sa->spacedata.first;
+ View3D *v3d = p->sa->spacedata.first;
view3d_region_operator_needs_opengl(p->win, p->ar);
- ED_view3d_autodist_init(p->scene, p->ar, v3d, (p->gpd->flag & GP_DATA_DEPTH_STROKE) ? 1:0);
+ ED_view3d_autodist_init(p->scene, p->ar, v3d, (p->gpd->flag & GP_DATA_DEPTH_STROKE) ? 1 : 0);
}
/* convert screen-coordinates to appropriate coordinates (and store them) */
gp_stroke_convertcoords(p, &pt->x, &pts->x, NULL);
/* copy pressure */
- pts->pressure= pt->pressure;
+ pts->pressure = pt->pressure;
}
/* increment counters */
@@ -438,11 +438,11 @@ typedef struct tGpSmoothCo {
} tGpSmoothCo;
/* smooth a stroke (in buffer) before storing it */
-static void gp_stroke_smooth (tGPsdata *p)
+static void gp_stroke_smooth(tGPsdata *p)
{
- bGPdata *gpd= p->gpd;
+ bGPdata *gpd = p->gpd;
tGpSmoothCo *smoothArray, *spc;
- int i=0, cmx=gpd->sbuffer_size;
+ int i = 0, cmx = gpd->sbuffer_size;
/* only smooth if smoothing is enabled, and we're not doing a straight line */
if (!(U.gp_settings & GP_PAINT_DOSMOOTH) || ELEM(p->paintmode, GP_PAINTMODE_DRAW_STRAIGHT, GP_PAINTMODE_DRAW_POLY))
@@ -453,23 +453,23 @@ static void gp_stroke_smooth (tGPsdata *p)
return;
/* create a temporary smoothing coordinates buffer, use to store calculated values to prevent sequential error */
- smoothArray = MEM_callocN(sizeof(tGpSmoothCo)*cmx, "gp_stroke_smooth smoothArray");
+ smoothArray = MEM_callocN(sizeof(tGpSmoothCo) * cmx, "gp_stroke_smooth smoothArray");
/* first pass: calculate smoothing coordinates using weighted-averages */
- for (i=0, spc=smoothArray; i < gpd->sbuffer_size; i++, spc++) {
- const tGPspoint *pc= (((tGPspoint *)gpd->sbuffer) + i);
- const tGPspoint *pb= (i-1 > 0)?(pc-1):(pc);
- const tGPspoint *pa= (i-2 > 0)?(pc-2):(pb);
- const tGPspoint *pd= (i+1 < cmx)?(pc+1):(pc);
- const tGPspoint *pe= (i+2 < cmx)?(pc+2):(pd);
+ for (i = 0, spc = smoothArray; i < gpd->sbuffer_size; i++, spc++) {
+ const tGPspoint *pc = (((tGPspoint *)gpd->sbuffer) + i);
+ const tGPspoint *pb = (i - 1 > 0) ? (pc - 1) : (pc);
+ const tGPspoint *pa = (i - 2 > 0) ? (pc - 2) : (pb);
+ const tGPspoint *pd = (i + 1 < cmx) ? (pc + 1) : (pc);
+ const tGPspoint *pe = (i + 2 < cmx) ? (pc + 2) : (pd);
- spc->x= (int)(0.1*pa->x + 0.2*pb->x + 0.4*pc->x + 0.2*pd->x + 0.1*pe->x);
- spc->y= (int)(0.1*pa->y + 0.2*pb->y + 0.4*pc->y + 0.2*pd->y + 0.1*pe->y);
+ spc->x = (int)(0.1 * pa->x + 0.2 * pb->x + 0.4 * pc->x + 0.2 * pd->x + 0.1 * pe->x);
+ spc->y = (int)(0.1 * pa->y + 0.2 * pb->y + 0.4 * pc->y + 0.2 * pd->y + 0.1 * pe->y);
}
/* second pass: apply smoothed coordinates */
- for (i=0, spc=smoothArray; i < gpd->sbuffer_size; i++, spc++) {
- tGPspoint *pc= (((tGPspoint *)gpd->sbuffer) + i);
+ for (i = 0, spc = smoothArray; i < gpd->sbuffer_size; i++, spc++) {
+ tGPspoint *pc = (((tGPspoint *)gpd->sbuffer) + i);
copy_v2_v2_int(&pc->x, &spc->x);
}
@@ -482,12 +482,12 @@ static void gp_stroke_smooth (tGPsdata *p)
* - applies a reverse Chaikin filter
* - code adapted from etch-a-ton branch (editarmature_sketch.c)
*/
-static void gp_stroke_simplify (tGPsdata *p)
+static void gp_stroke_simplify(tGPsdata *p)
{
- bGPdata *gpd= p->gpd;
- tGPspoint *old_points= (tGPspoint *)gpd->sbuffer;
- short num_points= gpd->sbuffer_size;
- short flag= gpd->sbuffer_sflag;
+ bGPdata *gpd = p->gpd;
+ tGPspoint *old_points = (tGPspoint *)gpd->sbuffer;
+ short num_points = gpd->sbuffer_size;
+ short flag = gpd->sbuffer_sflag;
short i, j;
/* only simplify if simplification is enabled, and we're not doing a straight line */
@@ -502,7 +502,7 @@ static void gp_stroke_simplify (tGPsdata *p)
* - firstly set sbuffer to NULL, so a new one is allocated
* - secondly, reset flag after, as it gets cleared auto
*/
- gpd->sbuffer= NULL;
+ gpd->sbuffer = NULL;
gp_session_validatebuffer(p);
gpd->sbuffer_sflag = flag;
@@ -522,19 +522,19 @@ static void gp_stroke_simplify (tGPsdata *p)
int mco[2];
/* initialize values */
- co[0]= 0;
- co[1]= 0;
+ co[0] = 0;
+ co[1] = 0;
pressure = 0;
/* using macro, calculate new point */
GP_SIMPLIFY_AVPOINT(j, -0.25f);
- GP_SIMPLIFY_AVPOINT(j+1, 0.75f);
- GP_SIMPLIFY_AVPOINT(j+2, 0.75f);
- GP_SIMPLIFY_AVPOINT(j+3, -0.25f);
+ GP_SIMPLIFY_AVPOINT(j + 1, 0.75f);
+ GP_SIMPLIFY_AVPOINT(j + 2, 0.75f);
+ GP_SIMPLIFY_AVPOINT(j + 3, -0.25f);
/* set values for adding */
- mco[0]= (int)co[0];
- mco[1]= (int)co[1];
+ mco[0] = (int)co[0];
+ mco[1] = (int)co[1];
/* ignore return values on this... assume to be ok for now */
gp_stroke_addpoint(p, mco, pressure);
@@ -549,9 +549,9 @@ static void gp_stroke_simplify (tGPsdata *p)
/* make a new stroke from the buffer data */
-static void gp_stroke_newfrombuffer (tGPsdata *p)
+static void gp_stroke_newfrombuffer(tGPsdata *p)
{
- bGPdata *gpd= p->gpd;
+ bGPdata *gpd = p->gpd;
bGPDstroke *gps;
bGPDspoint *pt;
tGPspoint *ptc;
@@ -563,7 +563,7 @@ static void gp_stroke_newfrombuffer (tGPsdata *p)
* - drawing straight-lines only requires the endpoints
*/
if (p->paintmode == GP_PAINTMODE_DRAW_STRAIGHT)
- totelem = (gpd->sbuffer_size >= 2) ? 2: gpd->sbuffer_size;
+ totelem = (gpd->sbuffer_size >= 2) ? 2 : gpd->sbuffer_size;
else
totelem = gpd->sbuffer_size;
@@ -583,77 +583,77 @@ static void gp_stroke_newfrombuffer (tGPsdata *p)
}
/* allocate memory for a new stroke */
- gps= MEM_callocN(sizeof(bGPDstroke), "gp_stroke");
+ gps = MEM_callocN(sizeof(bGPDstroke), "gp_stroke");
/* copy appropriate settings for stroke */
- gps->totpoints= totelem;
- gps->thickness= p->gpl->thickness;
- gps->flag= gpd->sbuffer_sflag;
+ gps->totpoints = totelem;
+ gps->thickness = p->gpl->thickness;
+ gps->flag = gpd->sbuffer_sflag;
/* allocate enough memory for a continuous array for storage points */
- gps->points= MEM_callocN(sizeof(bGPDspoint)*gps->totpoints, "gp_stroke_points");
+ gps->points = MEM_callocN(sizeof(bGPDspoint) * gps->totpoints, "gp_stroke_points");
/* set pointer to first non-initialized point */
- pt= gps->points + (gps->totpoints - totelem);
+ pt = gps->points + (gps->totpoints - totelem);
/* copy points from the buffer to the stroke */
if (p->paintmode == GP_PAINTMODE_DRAW_STRAIGHT) {
/* straight lines only -> only endpoints */
{
/* first point */
- ptc= gpd->sbuffer;
+ ptc = gpd->sbuffer;
/* convert screen-coordinates to appropriate coordinates (and store them) */
gp_stroke_convertcoords(p, &ptc->x, &pt->x, NULL);
/* copy pressure */
- pt->pressure= ptc->pressure;
+ pt->pressure = ptc->pressure;
pt++;
}
if (totelem == 2) {
/* last point if applicable */
- ptc= ((tGPspoint *)gpd->sbuffer) + (gpd->sbuffer_size - 1);
+ ptc = ((tGPspoint *)gpd->sbuffer) + (gpd->sbuffer_size - 1);
/* convert screen-coordinates to appropriate coordinates (and store them) */
gp_stroke_convertcoords(p, &ptc->x, &pt->x, NULL);
/* copy pressure */
- pt->pressure= ptc->pressure;
+ pt->pressure = ptc->pressure;
}
}
else if (p->paintmode == GP_PAINTMODE_DRAW_POLY) {
/* first point */
- ptc= gpd->sbuffer;
+ ptc = gpd->sbuffer;
/* convert screen-coordinates to appropriate coordinates (and store them) */
gp_stroke_convertcoords(p, &ptc->x, &pt->x, NULL);
/* copy pressure */
- pt->pressure= ptc->pressure;
+ pt->pressure = ptc->pressure;
}
else {
- float *depth_arr= NULL;
+ float *depth_arr = NULL;
/* get an array of depths, far depths are blended */
if (gpencil_project_check(p)) {
- int mval[2], mval_prev[2]= {0};
+ int mval[2], mval_prev[2] = {0};
int interp_depth = 0;
int found_depth = 0;
- depth_arr= MEM_mallocN(sizeof(float) * gpd->sbuffer_size, "depth_points");
+ depth_arr = MEM_mallocN(sizeof(float) * gpd->sbuffer_size, "depth_points");
- for (i=0, ptc=gpd->sbuffer; i < gpd->sbuffer_size; i++, ptc++, pt++) {
+ for (i = 0, ptc = gpd->sbuffer; i < gpd->sbuffer_size; i++, ptc++, pt++) {
copy_v2_v2_int(mval, &ptc->x);
- if ((ED_view3d_autodist_depth(p->ar, mval, depth_margin, depth_arr+i) == 0) &&
- (i && (ED_view3d_autodist_depth_seg(p->ar, mval, mval_prev, depth_margin + 1, depth_arr+i) == 0))
- ) {
- interp_depth= TRUE;
+ if ((ED_view3d_autodist_depth(p->ar, mval, depth_margin, depth_arr + i) == 0) &&
+ (i && (ED_view3d_autodist_depth_seg(p->ar, mval, mval_prev, depth_margin + 1, depth_arr + i) == 0)))
+ {
+ interp_depth = TRUE;
}
else {
- found_depth= TRUE;
+ found_depth = TRUE;
}
copy_v2_v2_int(mval_prev, mval);
@@ -661,7 +661,7 @@ static void gp_stroke_newfrombuffer (tGPsdata *p)
if (found_depth == FALSE) {
/* eeh... not much we can do.. :/, ignore depth in this case, use the 3D cursor */
- for (i=gpd->sbuffer_size-1; i >= 0; i--)
+ for (i = gpd->sbuffer_size - 1; i >= 0; i--)
depth_arr[i] = 0.9999f;
}
else {
@@ -670,23 +670,23 @@ static void gp_stroke_newfrombuffer (tGPsdata *p)
int first_valid = 0;
int last_valid = 0;
- for (i=0; i < gpd->sbuffer_size; i++) {
+ for (i = 0; i < gpd->sbuffer_size; i++) {
if (depth_arr[i] != FLT_MAX)
break;
}
- first_valid= i;
+ first_valid = i;
- for (i=gpd->sbuffer_size-1; i >= 0; i--) {
+ for (i = gpd->sbuffer_size - 1; i >= 0; i--) {
if (depth_arr[i] != FLT_MAX)
break;
}
- last_valid= i;
+ last_valid = i;
/* invalidate non-endpoints, so only blend between first and last */
- for (i=first_valid+1; i < last_valid; i++)
- depth_arr[i]= FLT_MAX;
+ for (i = first_valid + 1; i < last_valid; i++)
+ depth_arr[i] = FLT_MAX;
- interp_depth= TRUE;
+ interp_depth = TRUE;
}
if (interp_depth) {
@@ -696,15 +696,15 @@ static void gp_stroke_newfrombuffer (tGPsdata *p)
}
- pt= gps->points;
+ pt = gps->points;
/* convert all points (normal behavior) */
- for (i=0, ptc=gpd->sbuffer; i < gpd->sbuffer_size && ptc; i++, ptc++, pt++) {
+ for (i = 0, ptc = gpd->sbuffer; i < gpd->sbuffer_size && ptc; i++, ptc++, pt++) {
/* convert screen-coordinates to appropriate coordinates (and store them) */
- gp_stroke_convertcoords(p, &ptc->x, &pt->x, depth_arr ? depth_arr+i:NULL);
+ gp_stroke_convertcoords(p, &ptc->x, &pt->x, depth_arr ? depth_arr + i : NULL);
/* copy pressure */
- pt->pressure= ptc->pressure;
+ pt->pressure = ptc->pressure;
}
if (depth_arr)
@@ -720,9 +720,9 @@ static void gp_stroke_newfrombuffer (tGPsdata *p)
/* --- 'Eraser' for 'Paint' Tool ------ */
/* eraser tool - remove segment from stroke/split stroke (after lasso inside) */
-static short gp_stroke_eraser_splitdel (bGPDframe *gpf, bGPDstroke *gps, int i)
+static short gp_stroke_eraser_splitdel(bGPDframe *gpf, bGPDstroke *gps, int i)
{
- bGPDspoint *pt_tmp= gps->points;
+ bGPDspoint *pt_tmp = gps->points;
bGPDstroke *gsn = NULL;
/* if stroke only had two points, get rid of stroke */
@@ -739,8 +739,8 @@ static short gp_stroke_eraser_splitdel (bGPDframe *gpf, bGPDstroke *gps, int i)
else if (i == gps->totpoints - 2) {
/* allocate new points array, and assign most of the old stroke there */
gps->totpoints--;
- gps->points= MEM_callocN(sizeof(bGPDspoint)*gps->totpoints, "gp_stroke_points");
- memcpy(gps->points, pt_tmp, sizeof(bGPDspoint)*gps->totpoints);
+ gps->points = MEM_callocN(sizeof(bGPDspoint) * gps->totpoints, "gp_stroke_points");
+ memcpy(gps->points, pt_tmp, sizeof(bGPDspoint) * gps->totpoints);
/* free temp buffer */
MEM_freeN(pt_tmp);
@@ -753,8 +753,8 @@ static short gp_stroke_eraser_splitdel (bGPDframe *gpf, bGPDstroke *gps, int i)
else if (i == 0) {
/* allocate new points array, and assign most of the old stroke there */
gps->totpoints--;
- gps->points= MEM_callocN(sizeof(bGPDspoint)*gps->totpoints, "gp_stroke_points");
- memcpy(gps->points, pt_tmp + 1, sizeof(bGPDspoint)*gps->totpoints);
+ gps->points = MEM_callocN(sizeof(bGPDspoint) * gps->totpoints, "gp_stroke_points");
+ memcpy(gps->points, pt_tmp + 1, sizeof(bGPDspoint) * gps->totpoints);
/* free temp buffer */
MEM_freeN(pt_tmp);
@@ -766,18 +766,18 @@ static short gp_stroke_eraser_splitdel (bGPDframe *gpf, bGPDstroke *gps, int i)
/* segment occurs in 'middle' of stroke, so split */
else {
/* duplicate stroke, and assign 'later' data to that stroke */
- gsn= MEM_dupallocN(gps);
- gsn->prev= gsn->next= NULL;
+ gsn = MEM_dupallocN(gps);
+ gsn->prev = gsn->next = NULL;
BLI_insertlinkafter(&gpf->strokes, gps, gsn);
- gsn->totpoints= gps->totpoints - i;
- gsn->points= MEM_callocN(sizeof(bGPDspoint)*gsn->totpoints, "gp_stroke_points");
- memcpy(gsn->points, pt_tmp + i, sizeof(bGPDspoint)*gsn->totpoints);
+ gsn->totpoints = gps->totpoints - i;
+ gsn->points = MEM_callocN(sizeof(bGPDspoint) * gsn->totpoints, "gp_stroke_points");
+ memcpy(gsn->points, pt_tmp + i, sizeof(bGPDspoint) * gsn->totpoints);
/* adjust existing stroke */
- gps->totpoints= i;
- gps->points= MEM_callocN(sizeof(bGPDspoint)*gps->totpoints, "gp_stroke_points");
- memcpy(gps->points, pt_tmp, sizeof(bGPDspoint)*i);
+ gps->totpoints = i;
+ gps->points = MEM_callocN(sizeof(bGPDspoint) * gps->totpoints, "gp_stroke_points");
+ memcpy(gps->points, pt_tmp, sizeof(bGPDspoint) * i);
/* free temp buffer */
MEM_freeN(pt_tmp);
@@ -788,7 +788,7 @@ static short gp_stroke_eraser_splitdel (bGPDframe *gpf, bGPDstroke *gps, int i)
}
/* eraser tool - check if part of stroke occurs within last segment drawn by eraser */
-static short gp_stroke_eraser_strokeinside (int mval[], int UNUSED(mvalo[]), short rad, short x0, short y0, short x1, short y1)
+static short gp_stroke_eraser_strokeinside(int mval[], int UNUSED(mvalo[]), short rad, short x0, short y0, short x1, short y1)
{
/* simple within-radius check for now */
if (edge_inside_circle(mval[0], mval[1], rad, x0, y0, x1, y1))
@@ -800,10 +800,10 @@ static short gp_stroke_eraser_strokeinside (int mval[], int UNUSED(mvalo[]), sho
/* eraser tool - evaluation per stroke */
// TODO: this could really do with some optimization (KD-Tree/BVH?)
-static void gp_stroke_eraser_dostroke (tGPsdata *p, int mval[], int mvalo[], short rad, rcti *rect, bGPDframe *gpf, bGPDstroke *gps)
+static void gp_stroke_eraser_dostroke(tGPsdata *p, int mval[], int mvalo[], short rad, rcti *rect, bGPDframe *gpf, bGPDstroke *gps)
{
bGPDspoint *pt1, *pt2;
- int x0=0, y0=0, x1=0, y1=0;
+ int x0 = 0, y0 = 0, x1 = 0, y1 = 0;
int xyval[2];
int i;
@@ -817,8 +817,8 @@ static void gp_stroke_eraser_dostroke (tGPsdata *p, int mval[], int mvalo[], sho
/* get coordinates */
if (gps->flag & GP_STROKE_3DSPACE) {
project_int(p->ar, &gps->points->x, xyval);
- x0= xyval[0];
- y0= xyval[1];
+ x0 = xyval[0];
+ y0 = xyval[1];
}
else if (gps->flag & GP_STROKE_2DSPACE) {
UI_view2d_view_to_region(p->v2d, gps->points->x, gps->points->y, &x0, &y0);
@@ -828,31 +828,31 @@ static void gp_stroke_eraser_dostroke (tGPsdata *p, int mval[], int mvalo[], sho
int offsx, offsy, sizex, sizey;
/* get stored settings */
- sizex= p->im2d_settings.sizex;
- sizey= p->im2d_settings.sizey;
- offsx= p->im2d_settings.offsx;
- offsy= p->im2d_settings.offsy;
+ sizex = p->im2d_settings.sizex;
+ sizey = p->im2d_settings.sizey;
+ offsx = p->im2d_settings.offsx;
+ offsy = p->im2d_settings.offsy;
/* calculate new points */
- x0= (int)((gps->points->x * sizex) + offsx);
- y0= (int)((gps->points->y * sizey) + offsy);
+ x0 = (int)((gps->points->x * sizex) + offsx);
+ y0 = (int)((gps->points->y * sizey) + offsy);
}
#endif
else {
if (p->subrect == NULL) { /* normal 3D view */
- x0= (int)(gps->points->x / 100 * p->ar->winx);
- y0= (int)(gps->points->y / 100 * p->ar->winy);
+ x0 = (int)(gps->points->x / 100 * p->ar->winx);
+ y0 = (int)(gps->points->y / 100 * p->ar->winy);
}
else { /* camera view, use subrect */
- x0= (int)((gps->points->x / 100) * (p->subrect->xmax - p->subrect->xmin)) + p->subrect->xmin;
- y0= (int)((gps->points->y / 100) * (p->subrect->ymax - p->subrect->ymin)) + p->subrect->ymin;
+ x0 = (int)((gps->points->x / 100) * (p->subrect->xmax - p->subrect->xmin)) + p->subrect->xmin;
+ y0 = (int)((gps->points->y / 100) * (p->subrect->ymax - p->subrect->ymin)) + p->subrect->ymin;
}
}
/* do boundbox check first */
if (BLI_in_rcti(rect, x0, y0)) {
/* only check if point is inside */
- if ( ((x0-mval[0])*(x0-mval[0]) + (y0-mval[1])*(y0-mval[1])) <= rad*rad ) {
+ if ( ((x0 - mval[0]) * (x0 - mval[0]) + (y0 - mval[1]) * (y0 - mval[1])) <= rad * rad) {
/* free stroke */
MEM_freeN(gps->points);
BLI_freelinkN(&gpf->strokes, gps);
@@ -861,22 +861,22 @@ static void gp_stroke_eraser_dostroke (tGPsdata *p, int mval[], int mvalo[], sho
}
else {
/* loop over the points in the stroke, checking for intersections
- * - an intersection will require the stroke to be split
+ * - an intersection will require the stroke to be split
*/
- for (i=0; (i+1) < gps->totpoints; i++) {
+ for (i = 0; (i + 1) < gps->totpoints; i++) {
/* get points to work with */
- pt1= gps->points + i;
- pt2= gps->points + i + 1;
+ pt1 = gps->points + i;
+ pt2 = gps->points + i + 1;
/* get coordinates */
if (gps->flag & GP_STROKE_3DSPACE) {
project_int(p->ar, &pt1->x, xyval);
- x0= xyval[0];
- y0= xyval[1];
+ x0 = xyval[0];
+ y0 = xyval[1];
project_int(p->ar, &pt2->x, xyval);
- x1= xyval[0];
- y1= xyval[1];
+ x1 = xyval[0];
+ y1 = xyval[1];
}
else if (gps->flag & GP_STROKE_2DSPACE) {
UI_view2d_view_to_region(p->v2d, pt1->x, pt1->y, &x0, &y0);
@@ -888,31 +888,31 @@ static void gp_stroke_eraser_dostroke (tGPsdata *p, int mval[], int mvalo[], sho
int offsx, offsy, sizex, sizey;
/* get stored settings */
- sizex= p->im2d_settings.sizex;
- sizey= p->im2d_settings.sizey;
- offsx= p->im2d_settings.offsx;
- offsy= p->im2d_settings.offsy;
+ sizex = p->im2d_settings.sizex;
+ sizey = p->im2d_settings.sizey;
+ offsx = p->im2d_settings.offsx;
+ offsy = p->im2d_settings.offsy;
/* calculate new points */
- x0= (int)((pt1->x * sizex) + offsx);
- y0= (int)((pt1->y * sizey) + offsy);
+ x0 = (int)((pt1->x * sizex) + offsx);
+ y0 = (int)((pt1->y * sizey) + offsy);
- x1= (int)((pt2->x * sizex) + offsx);
- y1= (int)((pt2->y * sizey) + offsy);
+ x1 = (int)((pt2->x * sizex) + offsx);
+ y1 = (int)((pt2->y * sizey) + offsy);
}
#endif
else {
if (p->subrect == NULL) { /* normal 3D view */
- x0= (int)(pt1->x / 100 * p->ar->winx);
- y0= (int)(pt1->y / 100 * p->ar->winy);
- x1= (int)(pt2->x / 100 * p->ar->winx);
- y1= (int)(pt2->y / 100 * p->ar->winy);
+ x0 = (int)(pt1->x / 100 * p->ar->winx);
+ y0 = (int)(pt1->y / 100 * p->ar->winy);
+ x1 = (int)(pt2->x / 100 * p->ar->winx);
+ y1 = (int)(pt2->y / 100 * p->ar->winy);
}
else { /* camera view, use subrect */
- x0= (int)((pt1->x / 100) * (p->subrect->xmax - p->subrect->xmin)) + p->subrect->xmin;
- y0= (int)((pt1->y / 100) * (p->subrect->ymax - p->subrect->ymin)) + p->subrect->ymin;
- x1= (int)((pt2->x / 100) * (p->subrect->xmax - p->subrect->xmin)) + p->subrect->xmin;
- y1= (int)((pt2->y / 100) * (p->subrect->ymax - p->subrect->ymin)) + p->subrect->ymin;
+ x0 = (int)((pt1->x / 100) * (p->subrect->xmax - p->subrect->xmin)) + p->subrect->xmin;
+ y0 = (int)((pt1->y / 100) * (p->subrect->ymax - p->subrect->ymin)) + p->subrect->ymin;
+ x1 = (int)((pt2->x / 100) * (p->subrect->xmax - p->subrect->xmin)) + p->subrect->xmin;
+ y1 = (int)((pt2->y / 100) * (p->subrect->ymax - p->subrect->ymin)) + p->subrect->ymin;
}
}
@@ -920,7 +920,7 @@ static void gp_stroke_eraser_dostroke (tGPsdata *p, int mval[], int mvalo[], sho
if (BLI_in_rcti(rect, x0, y0) || BLI_in_rcti(rect, x1, y1)) {
/* check if point segment of stroke had anything to do with
* eraser region (either within stroke painted, or on its lines)
- * - this assumes that linewidth is irrelevant
+ * - this assumes that linewidth is irrelevant
*/
if (gp_stroke_eraser_strokeinside(mval, mvalo, rad, x0, y0, x1, y1)) {
/* if function returns true, break this loop (as no more point to check) */
@@ -933,9 +933,9 @@ static void gp_stroke_eraser_dostroke (tGPsdata *p, int mval[], int mvalo[], sho
}
/* erase strokes which fall under the eraser strokes */
-static void gp_stroke_doeraser (tGPsdata *p)
+static void gp_stroke_doeraser(tGPsdata *p)
{
- bGPDframe *gpf= p->gpf;
+ bGPDframe *gpf = p->gpf;
bGPDstroke *gps, *gpn;
rcti rect;
@@ -946,8 +946,8 @@ static void gp_stroke_doeraser (tGPsdata *p)
rect.ymax = p->mval[1] + p->radius;
/* loop over strokes, checking segments for intersections */
- for (gps= gpf->strokes.first; gps; gps= gpn) {
- gpn= gps->next;
+ for (gps = gpf->strokes.first; gps; gps = gpn) {
+ gpn = gps->next;
gp_stroke_eraser_dostroke(p, p->mval, p->mvalo, p->radius, &rect, gpf, gps);
}
}
@@ -956,45 +956,45 @@ static void gp_stroke_doeraser (tGPsdata *p)
/* Sketching Operator */
/* clear the session buffers (call this before AND after a paint operation) */
-static void gp_session_validatebuffer (tGPsdata *p)
+static void gp_session_validatebuffer(tGPsdata *p)
{
- bGPdata *gpd= p->gpd;
+ bGPdata *gpd = p->gpd;
/* clear memory of buffer (or allocate it if starting a new session) */
if (gpd->sbuffer) {
//printf("\t\tGP - reset sbuffer\n");
- memset(gpd->sbuffer, 0, sizeof(tGPspoint)*GP_STROKE_BUFFER_MAX);
+ memset(gpd->sbuffer, 0, sizeof(tGPspoint) * GP_STROKE_BUFFER_MAX);
}
else {
//printf("\t\tGP - allocate sbuffer\n");
- gpd->sbuffer= MEM_callocN(sizeof(tGPspoint)*GP_STROKE_BUFFER_MAX, "gp_session_strokebuffer");
+ gpd->sbuffer = MEM_callocN(sizeof(tGPspoint) * GP_STROKE_BUFFER_MAX, "gp_session_strokebuffer");
}
/* reset indices */
gpd->sbuffer_size = 0;
/* reset flags */
- gpd->sbuffer_sflag= 0;
+ gpd->sbuffer_sflag = 0;
}
/* (re)init new painting data */
-static int gp_session_initdata (bContext *C, tGPsdata *p)
+static int gp_session_initdata(bContext *C, tGPsdata *p)
{
bGPdata **gpd_ptr = NULL;
- ScrArea *curarea= CTX_wm_area(C);
- ARegion *ar= CTX_wm_region(C);
+ ScrArea *curarea = CTX_wm_area(C);
+ ARegion *ar = CTX_wm_region(C);
/* make sure the active view (at the starting time) is a 3d-view */
if (curarea == NULL) {
- p->status= GP_STATUS_ERROR;
+ p->status = GP_STATUS_ERROR;
if (G.debug & G_DEBUG)
printf("Error: No active view for painting\n");
return 0;
}
/* pass on current scene and window */
- p->scene= CTX_data_scene(C);
- p->win= CTX_wm_window(C);
+ p->scene = CTX_data_scene(C);
+ p->win = CTX_wm_window(C);
unit_m4(p->imat);
@@ -1008,11 +1008,11 @@ static int gp_session_initdata (bContext *C, tGPsdata *p)
/* set current area
* - must verify that region data is 3D-view (and not something else)
*/
- p->sa= curarea;
- p->ar= ar;
+ p->sa = curarea;
+ p->ar = ar;
if (ar->regiondata == NULL) {
- p->status= GP_STATUS_ERROR;
+ p->status = GP_STATUS_ERROR;
if (G.debug & G_DEBUG)
printf("Error: 3D-View active region doesn't have any region data, so cannot be drawable\n");
return 0;
@@ -1020,118 +1020,118 @@ static int gp_session_initdata (bContext *C, tGPsdata *p)
#if 0 // XXX will this sort of antiquated stuff be restored?
/* check that gpencil data is allowed to be drawn */
- if ((v3d->flag2 & V3D_DISPGP)==0) {
- p->status= GP_STATUS_ERROR;
+ if ((v3d->flag2 & V3D_DISPGP) == 0) {
+ p->status = GP_STATUS_ERROR;
if (G.debug & G_DEBUG)
printf("Error: In active view, Grease Pencil not shown\n");
return 0;
}
#endif
}
- break;
+ break;
case SPACE_NODE:
{
//SpaceNode *snode= curarea->spacedata.first;
/* set current area */
- p->sa= curarea;
- p->ar= ar;
- p->v2d= &ar->v2d;
+ p->sa = curarea;
+ p->ar = ar;
+ p->v2d = &ar->v2d;
#if 0 // XXX will this sort of antiquated stuff be restored?
/* check that gpencil data is allowed to be drawn */
- if ((snode->flag & SNODE_DISPGP)==0) {
- p->status= GP_STATUS_ERROR;
+ if ((snode->flag & SNODE_DISPGP) == 0) {
+ p->status = GP_STATUS_ERROR;
if (G.debug & G_DEBUG)
printf("Error: In active view, Grease Pencil not shown\n");
return 0;
}
#endif
}
- break;
+ break;
#if 0 // XXX these other spaces will come over time...
case SPACE_SEQ:
{
- SpaceSeq *sseq= curarea->spacedata.first;
+ SpaceSeq *sseq = curarea->spacedata.first;
/* set current area */
- p->sa= curarea;
- p->ar= ar;
- p->v2d= &ar->v2d;
+ p->sa = curarea;
+ p->ar = ar;
+ p->v2d = &ar->v2d;
/* check that gpencil data is allowed to be drawn */
if (sseq->mainb == SEQ_DRAW_SEQUENCE) {
- p->status= GP_STATUS_ERROR;
+ p->status = GP_STATUS_ERROR;
if (G.debug & G_DEBUG)
printf("Error: In active view (sequencer), active mode doesn't support Grease Pencil\n");
return 0;
}
- if ((sseq->flag & SEQ_DRAW_GPENCIL)==0) {
- p->status= GP_STATUS_ERROR;
+ if ((sseq->flag & SEQ_DRAW_GPENCIL) == 0) {
+ p->status = GP_STATUS_ERROR;
if (G.debug & G_DEBUG)
printf("Error: In active view, Grease Pencil not shown\n");
return 0;
}
}
- break;
+ break;
#endif
case SPACE_IMAGE:
{
//SpaceImage *sima= curarea->spacedata.first;
/* set the current area */
- p->sa= curarea;
- p->ar= ar;
- p->v2d= &ar->v2d;
+ p->sa = curarea;
+ p->ar = ar;
+ p->v2d = &ar->v2d;
//p->ibuf= BKE_image_get_ibuf(sima->image, &sima->iuser);
#if 0 // XXX disabled for now
/* check that gpencil data is allowed to be drawn */
- if ((sima->flag & SI_DISPGP)==0) {
- p->status= GP_STATUS_ERROR;
+ if ((sima->flag & SI_DISPGP) == 0) {
+ p->status = GP_STATUS_ERROR;
if (G.debug & G_DEBUG)
printf("Error: In active view, Grease Pencil not shown\n");
return 0;
}
#endif
}
- break;
+ break;
case SPACE_CLIP:
{
- SpaceClip *sc= curarea->spacedata.first;
+ SpaceClip *sc = curarea->spacedata.first;
/* set the current area */
- p->sa= curarea;
- p->ar= ar;
- p->v2d= &ar->v2d;
+ p->sa = curarea;
+ p->ar = ar;
+ p->v2d = &ar->v2d;
//p->ibuf= BKE_image_get_ibuf(sima->image, &sima->iuser);
invert_m4_m4(p->imat, sc->unistabmat);
/* custom color for new layer */
- p->custom_color[0]= 1.0f;
- p->custom_color[1]= 0.0f;
- p->custom_color[2]= 0.5f;
- p->custom_color[3]= 0.9f;
+ p->custom_color[0] = 1.0f;
+ p->custom_color[1] = 0.0f;
+ p->custom_color[2] = 0.5f;
+ p->custom_color[3] = 0.9f;
}
- break;
+ break;
/* unsupported views */
default:
{
- p->status= GP_STATUS_ERROR;
+ p->status = GP_STATUS_ERROR;
if (G.debug & G_DEBUG)
printf("Error: Active view not appropriate for Grease Pencil drawing\n");
return 0;
}
- break;
+ break;
}
/* get gp-data */
- gpd_ptr= gpencil_data_get_pointers(C, &p->ownerPtr);
+ gpd_ptr = gpencil_data_get_pointers(C, &p->ownerPtr);
if (gpd_ptr == NULL) {
- p->status= GP_STATUS_ERROR;
+ p->status = GP_STATUS_ERROR;
if (G.debug & G_DEBUG)
printf("Error: Current context doesn't allow for any Grease Pencil data\n");
return 0;
@@ -1139,11 +1139,11 @@ static int gp_session_initdata (bContext *C, tGPsdata *p)
else {
/* if no existing GPencil block exists, add one */
if (*gpd_ptr == NULL)
- *gpd_ptr= gpencil_data_addnew("GPencil");
- p->gpd= *gpd_ptr;
+ *gpd_ptr = gpencil_data_addnew("GPencil");
+ p->gpd = *gpd_ptr;
}
- if (ED_gpencil_session_active()==0) {
+ if (ED_gpencil_session_active() == 0) {
/* initialize undo stack,
* also, existing undo stack would make buffer drawn */
gpencil_undo_init(p->gpd);
@@ -1154,20 +1154,20 @@ static int gp_session_initdata (bContext *C, tGPsdata *p)
#if 0
/* set 'default' im2d_settings just in case something that uses this doesn't set it */
- p->im2d_settings.sizex= 1;
- p->im2d_settings.sizey= 1;
+ p->im2d_settings.sizex = 1;
+ p->im2d_settings.sizey = 1;
#endif
return 1;
}
/* init new painting session */
-static tGPsdata *gp_session_initpaint (bContext *C)
+static tGPsdata *gp_session_initpaint(bContext *C)
{
tGPsdata *p = NULL;
/* create new context data */
- p= MEM_callocN(sizeof(tGPsdata), "GPencil Drawing Data");
+ p = MEM_callocN(sizeof(tGPsdata), "GPencil Drawing Data");
gp_session_initdata(C, p);
@@ -1176,9 +1176,9 @@ static tGPsdata *gp_session_initpaint (bContext *C)
}
/* cleanup after a painting session */
-static void gp_session_cleanup (tGPsdata *p)
+static void gp_session_cleanup(tGPsdata *p)
{
- bGPdata *gpd= (p) ? p->gpd : NULL;
+ bGPdata *gpd = (p) ? p->gpd : NULL;
/* error checking */
if (gpd == NULL)
@@ -1188,36 +1188,36 @@ static void gp_session_cleanup (tGPsdata *p)
if (gpd->sbuffer) {
//printf("\t\tGP - free sbuffer\n");
MEM_freeN(gpd->sbuffer);
- gpd->sbuffer= NULL;
+ gpd->sbuffer = NULL;
}
/* clear flags */
- gpd->sbuffer_size= 0;
- gpd->sbuffer_sflag= 0;
+ gpd->sbuffer_size = 0;
+ gpd->sbuffer_sflag = 0;
}
/* init new stroke */
-static void gp_paint_initstroke (tGPsdata *p, short paintmode)
+static void gp_paint_initstroke(tGPsdata *p, short paintmode)
{
/* get active layer (or add a new one if non-existent) */
- p->gpl= gpencil_layer_getactive(p->gpd);
+ p->gpl = gpencil_layer_getactive(p->gpd);
if (p->gpl == NULL) {
- p->gpl= gpencil_layer_addnew(p->gpd);
+ p->gpl = gpencil_layer_addnew(p->gpd);
if (p->custom_color[3])
copy_v3_v3(p->gpl->color, p->custom_color);
}
if (p->gpl->flag & GP_LAYER_LOCKED) {
- p->status= GP_STATUS_ERROR;
+ p->status = GP_STATUS_ERROR;
if (G.debug & G_DEBUG)
printf("Error: Cannot paint on locked layer\n");
return;
}
/* get active frame (add a new one if not matching frame) */
- p->gpf= gpencil_layer_getframe(p->gpl, p->scene->r.cfra, 1);
+ p->gpf = gpencil_layer_getframe(p->gpl, p->scene->r.cfra, 1);
if (p->gpf == NULL) {
- p->status= GP_STATUS_ERROR;
+ p->status = GP_STATUS_ERROR;
if (G.debug & G_DEBUG)
printf("Error: No frame created (gpencil_paint_init)\n");
return;
@@ -1226,7 +1226,7 @@ static void gp_paint_initstroke (tGPsdata *p, short paintmode)
p->gpf->flag |= GP_FRAME_PAINT;
/* set 'eraser' for this stroke if using eraser */
- p->paintmode= paintmode;
+ p->paintmode = paintmode;
if (p->paintmode == GP_PAINTMODE_ERASER)
p->gpd->sbuffer_sflag |= GP_STROKE_ERASER;
@@ -1237,13 +1237,13 @@ static void gp_paint_initstroke (tGPsdata *p, short paintmode)
/* when drawing in the camera view, in 2D space, set the subrect */
if (!(p->gpd->flag & GP_DATA_VIEWALIGN)) {
if (p->sa->spacetype == SPACE_VIEW3D) {
- View3D *v3d= p->sa->spacedata.first;
- RegionView3D *rv3d= p->ar->regiondata;
+ View3D *v3d = p->sa->spacedata.first;
+ RegionView3D *rv3d = p->ar->regiondata;
/* for camera view set the subrect */
if (rv3d->persp == RV3D_CAMOB) {
ED_view3d_calc_camera_border(p->scene, p->ar, v3d, rv3d, &p->subrect_data, TRUE); /* no shift */
- p->subrect= &p->subrect_data;
+ p->subrect = &p->subrect_data;
}
}
}
@@ -1253,7 +1253,7 @@ static void gp_paint_initstroke (tGPsdata *p, short paintmode)
switch (p->sa->spacetype) {
case SPACE_VIEW3D:
{
- RegionView3D *rv3d= p->ar->regiondata;
+ RegionView3D *rv3d = p->ar->regiondata;
float rvec[3];
/* get reference point for 3d space placement */
@@ -1262,17 +1262,17 @@ static void gp_paint_initstroke (tGPsdata *p, short paintmode)
p->gpd->sbuffer_sflag |= GP_STROKE_3DSPACE;
}
- break;
+ break;
case SPACE_NODE:
{
p->gpd->sbuffer_sflag |= GP_STROKE_2DSPACE;
}
- break;
+ break;
#if 0 // XXX other spacetypes to be restored in due course
case SPACE_SEQ:
{
- SpaceSeq *sseq= (SpaceSeq *)p->sa->spacedata.first;
+ SpaceSeq *sseq = (SpaceSeq *)p->sa->spacedata.first;
int rectx, recty;
float zoom, zoomx, zoomy;
@@ -1280,7 +1280,7 @@ static void gp_paint_initstroke (tGPsdata *p, short paintmode)
p->gpd->sbuffer_sflag |= GP_STROKE_2DIMAGE;
/* calculate zoom factor */
- zoom= (float)(SEQ_ZOOM_FAC(sseq->zoom));
+ zoom = (float)(SEQ_ZOOM_FAC(sseq->zoom));
if (sseq->mainb == SEQ_DRAW_IMG_IMBUF) {
zoomx = zoom * (p->scene->r.xasp / p->scene->r.yasp);
zoomy = zoom;
@@ -1293,20 +1293,20 @@ static void gp_paint_initstroke (tGPsdata *p, short paintmode)
* as it is too messy getting the ibuf (and could be too slow). This should be
* a reasonable for most cases anyway.
*/
- rectx= (p->scene->r.size * p->scene->r.xsch) / 100;
- recty= (p->scene->r.size * p->scene->r.ysch) / 100;
+ rectx = (p->scene->r.size * p->scene->r.xsch) / 100;
+ recty = (p->scene->r.size * p->scene->r.ysch) / 100;
/* set offset and scale values for opertations to use */
- p->im2d_settings.sizex= (int)(zoomx * rectx);
- p->im2d_settings.sizey= (int)(zoomy * recty);
- p->im2d_settings.offsx= (int)((p->sa->winx-p->im2d_settings.sizex)/2 + sseq->xof);
- p->im2d_settings.offsy= (int)((p->sa->winy-p->im2d_settings.sizey)/2 + sseq->yof);
+ p->im2d_settings.sizex = (int)(zoomx * rectx);
+ p->im2d_settings.sizey = (int)(zoomy * recty);
+ p->im2d_settings.offsx = (int)((p->sa->winx - p->im2d_settings.sizex) / 2 + sseq->xof);
+ p->im2d_settings.offsy = (int)((p->sa->winy - p->im2d_settings.sizey) / 2 + sseq->yof);
}
- break;
+ break;
#endif
case SPACE_IMAGE:
{
- SpaceImage *sima= (SpaceImage *)p->sa->spacedata.first;
+ SpaceImage *sima = (SpaceImage *)p->sa->spacedata.first;
/* only set these flags if the image editor doesn't have an image active,
* otherwise user will be confused by strokes not appearing after they're drawn
@@ -1321,29 +1321,29 @@ static void gp_paint_initstroke (tGPsdata *p, short paintmode)
else
p->gpd->sbuffer_sflag |= GP_STROKE_2DSPACE;
}
- break;
+ break;
case SPACE_CLIP:
{
p->gpd->sbuffer_sflag |= GP_STROKE_2DSPACE;
}
- break;
+ break;
}
}
}
/* finish off a stroke (clears buffer, but doesn't finish the paint operation) */
-static void gp_paint_strokeend (tGPsdata *p)
+static void gp_paint_strokeend(tGPsdata *p)
{
/* for surface sketching, need to set the right OpenGL context stuff so that
* the conversions will project the values correctly...
*/
if (gpencil_project_check(p)) {
- View3D *v3d= p->sa->spacedata.first;
+ View3D *v3d = p->sa->spacedata.first;
/* need to restore the original projection settings before packing up */
view3d_region_operator_needs_opengl(p->win, p->ar);
- ED_view3d_autodist_init(p->scene, p->ar, v3d, (p->gpd->flag & GP_DATA_DEPTH_STROKE) ? 1:0);
+ ED_view3d_autodist_init(p->scene, p->ar, v3d, (p->gpd->flag & GP_DATA_DEPTH_STROKE) ? 1 : 0);
}
/* check if doing eraser or not */
@@ -1363,7 +1363,7 @@ static void gp_paint_strokeend (tGPsdata *p)
}
/* finish off stroke painting operation */
-static void gp_paint_cleanup (tGPsdata *p)
+static void gp_paint_cleanup(tGPsdata *p)
{
/* p->gpd==NULL happens when stroke failed to initialize,
* for example. when GP is hidden in current space (sergey) */
@@ -1379,9 +1379,9 @@ static void gp_paint_cleanup (tGPsdata *p)
/* ------------------------------- */
-static void gpencil_draw_exit (bContext *C, wmOperator *op)
+static void gpencil_draw_exit(bContext *C, wmOperator *op)
{
- tGPsdata *p= op->customdata;
+ tGPsdata *p = op->customdata;
/* clear undo stack */
gpencil_undo_finish();
@@ -1405,10 +1405,10 @@ static void gpencil_draw_exit (bContext *C, wmOperator *op)
MEM_freeN(p);
}
- op->customdata= NULL;
+ op->customdata = NULL;
}
-static int gpencil_draw_cancel (bContext *C, wmOperator *op)
+static int gpencil_draw_cancel(bContext *C, wmOperator *op)
{
/* this is just a wrapper around exit() */
gpencil_draw_exit(C, op);
@@ -1418,13 +1418,13 @@ static int gpencil_draw_cancel (bContext *C, wmOperator *op)
/* ------------------------------- */
-static int gpencil_draw_init (bContext *C, wmOperator *op)
+static int gpencil_draw_init(bContext *C, wmOperator *op)
{
tGPsdata *p;
- int paintmode= RNA_enum_get(op->ptr, "mode");
+ int paintmode = RNA_enum_get(op->ptr, "mode");
/* check context */
- p= op->customdata= gp_session_initpaint(C);
+ p = op->customdata = gp_session_initpaint(C);
if ((p == NULL) || (p->status == GP_STATUS_ERROR)) {
/* something wasn't set correctly in context */
gpencil_draw_exit(C, op);
@@ -1439,7 +1439,7 @@ static int gpencil_draw_init (bContext *C, wmOperator *op)
}
/* radius for eraser circle is defined in userprefs now */
- p->radius= U.gp_eraser;
+ p->radius = U.gp_eraser;
/* everything is now setup ok */
return 1;
@@ -1448,7 +1448,7 @@ static int gpencil_draw_init (bContext *C, wmOperator *op)
/* ------------------------------- */
/* update UI indicators of status, including cursor and header prints */
-static void gpencil_draw_status_indicators (tGPsdata *p)
+static void gpencil_draw_status_indicators(tGPsdata *p)
{
/* header prints */
switch (p->status) {
@@ -1488,7 +1488,7 @@ static void gpencil_draw_status_indicators (tGPsdata *p)
/* ------------------------------- */
/* create a new stroke point at the point indicated by the painting context */
-static void gpencil_draw_apply (wmOperator *op, tGPsdata *p)
+static void gpencil_draw_apply(wmOperator *op, tGPsdata *p)
{
/* handle drawing/erasing -> test for erasing first */
if (p->paintmode == GP_PAINTMODE_ERASER) {
@@ -1496,14 +1496,14 @@ static void gpencil_draw_apply (wmOperator *op, tGPsdata *p)
gp_stroke_doeraser(p);
/* store used values */
- p->mvalo[0]= p->mval[0];
- p->mvalo[1]= p->mval[1];
- p->opressure= p->pressure;
+ p->mvalo[0] = p->mval[0];
+ p->mvalo[1] = p->mval[1];
+ p->opressure = p->pressure;
}
/* only add current point to buffer if mouse moved (even though we got an event, it might be just noise) */
else if (gp_stroke_filtermval(p, p->mval, p->mvalo)) {
/* try to add point */
- short ok= gp_stroke_addpoint(p, p->mval, p->pressure);
+ short ok = gp_stroke_addpoint(p, p->mval, p->pressure);
/* handle errors while adding point */
if ((ok == GP_STROKEADD_FULL) || (ok == GP_STROKEADD_OVERFLOW)) {
@@ -1525,43 +1525,43 @@ static void gpencil_draw_apply (wmOperator *op, tGPsdata *p)
}
/* store used values */
- p->mvalo[0]= p->mval[0];
- p->mvalo[1]= p->mval[1];
- p->opressure= p->pressure;
+ p->mvalo[0] = p->mval[0];
+ p->mvalo[1] = p->mval[1];
+ p->opressure = p->pressure;
}
}
/* handle draw event */
-static void gpencil_draw_apply_event (wmOperator *op, wmEvent *event)
+static void gpencil_draw_apply_event(wmOperator *op, wmEvent *event)
{
- tGPsdata *p= op->customdata;
+ tGPsdata *p = op->customdata;
PointerRNA itemptr;
float mousef[2];
- int tablet=0;
+ int tablet = 0;
/* convert from window-space to area-space mouse coordintes */
// NOTE: float to ints conversions, +1 factor is probably used to ensure a bit more accurate rounding...
- p->mval[0]= event->mval[0] + 1;
- p->mval[1]= event->mval[1] + 1;
+ p->mval[0] = event->mval[0] + 1;
+ p->mval[1] = event->mval[1] + 1;
/* handle pressure sensitivity (which is supplied by tablets) */
if (event->custom == EVT_DATA_TABLET) {
- wmTabletData *wmtab= event->customdata;
+ wmTabletData *wmtab = event->customdata;
- tablet= (wmtab->Active != EVT_TABLET_NONE);
- p->pressure= wmtab->Pressure;
+ tablet = (wmtab->Active != EVT_TABLET_NONE);
+ p->pressure = wmtab->Pressure;
//if (wmtab->Active == EVT_TABLET_ERASER)
- // TODO... this should get caught by the keymaps which call drawing in the first place
+ // TODO... this should get caught by the keymaps which call drawing in the first place
}
else
- p->pressure= 1.0f;
+ p->pressure = 1.0f;
/* fill in stroke data (not actually used directly by gpencil_draw_apply) */
RNA_collection_add(op->ptr, "stroke", &itemptr);
- mousef[0]= p->mval[0];
- mousef[1]= p->mval[1];
+ mousef[0] = p->mval[0];
+ mousef[1] = p->mval[1];
RNA_float_set_array(&itemptr, "mouse", mousef);
RNA_float_set(&itemptr, "pressure", p->pressure);
RNA_boolean_set(&itemptr, "is_start", (p->flags & GP_PAINTFLAG_FIRSTRUN));
@@ -1570,9 +1570,9 @@ static void gpencil_draw_apply_event (wmOperator *op, wmEvent *event)
if (p->flags & GP_PAINTFLAG_FIRSTRUN) {
p->flags &= ~GP_PAINTFLAG_FIRSTRUN;
- p->mvalo[0]= p->mval[0];
- p->mvalo[1]= p->mval[1];
- p->opressure= p->pressure;
+ p->mvalo[0] = p->mval[0];
+ p->mvalo[1] = p->mval[1];
+ p->opressure = p->pressure;
/* special exception here for too high pressure values on first touch in
* windows for some tablets, then we just skip first touch ..
@@ -1591,7 +1591,7 @@ static void gpencil_draw_apply_event (wmOperator *op, wmEvent *event)
/* ------------------------------- */
/* operator 'redo' (i.e. after changing some properties, but also for repeat last) */
-static int gpencil_draw_exec (bContext *C, wmOperator *op)
+static int gpencil_draw_exec(bContext *C, wmOperator *op)
{
tGPsdata *p = NULL;
@@ -1604,14 +1604,15 @@ static int gpencil_draw_exec (bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
else
- p= op->customdata;
+ p = op->customdata;
//printf("\tGP - Start redrawing stroke\n");
/* loop over the stroke RNA elements recorded (i.e. progress of mouse movement),
* setting the relevant values in context at each step, then applying
*/
- RNA_BEGIN(op->ptr, itemptr, "stroke") {
+ RNA_BEGIN(op->ptr, itemptr, "stroke")
+ {
float mousef[2];
//printf("\t\tGP - stroke elem\n");
@@ -1620,7 +1621,7 @@ static int gpencil_draw_exec (bContext *C, wmOperator *op)
RNA_float_get_array(&itemptr, "mouse", mousef);
p->mval[0] = (int)mousef[0];
p->mval[1] = (int)mousef[1];
- p->pressure= RNA_float_get(&itemptr, "pressure");
+ p->pressure = RNA_float_get(&itemptr, "pressure");
if (RNA_boolean_get(&itemptr, "is_start")) {
/* if first-run flag isn't set already (i.e. not true first stroke),
@@ -1637,9 +1638,9 @@ static int gpencil_draw_exec (bContext *C, wmOperator *op)
if (p->flags & GP_PAINTFLAG_FIRSTRUN) {
p->flags &= ~GP_PAINTFLAG_FIRSTRUN;
- p->mvalo[0]= p->mval[0];
- p->mvalo[1]= p->mval[1];
- p->opressure= p->pressure;
+ p->mvalo[0] = p->mval[0];
+ p->mvalo[1] = p->mval[1];
+ p->opressure = p->pressure;
}
/* apply this data as necessary now (as per usual) */
@@ -1653,7 +1654,7 @@ static int gpencil_draw_exec (bContext *C, wmOperator *op)
gpencil_draw_exit(C, op);
/* refreshes */
- WM_event_add_notifier(C, NC_SCREEN|ND_GPENCIL|NA_EDITED, NULL); // XXX need a nicer one that will work
+ WM_event_add_notifier(C, NC_SCREEN | ND_GPENCIL | NA_EDITED, NULL); // XXX need a nicer one that will work
/* done */
return OPERATOR_FINISHED;
@@ -1662,10 +1663,10 @@ static int gpencil_draw_exec (bContext *C, wmOperator *op)
/* ------------------------------- */
/* start of interactive drawing part of operator */
-static int gpencil_draw_invoke (bContext *C, wmOperator *op, wmEvent *event)
+static int gpencil_draw_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
tGPsdata *p = NULL;
- wmWindow *win= CTX_wm_window(C);
+ wmWindow *win = CTX_wm_window(C);
if (G.debug & G_DEBUG)
printf("GPencil - Starting Drawing\n");
@@ -1679,7 +1680,7 @@ static int gpencil_draw_invoke (bContext *C, wmOperator *op, wmEvent *event)
return OPERATOR_CANCELLED;
}
else
- p= op->customdata;
+ p = op->customdata;
// TODO: set any additional settings that we can take from the events?
// TODO? if tablet is erasing, force eraser to be on?
@@ -1693,7 +1694,7 @@ static int gpencil_draw_invoke (bContext *C, wmOperator *op, wmEvent *event)
/* set cursor */
if (p->paintmode == GP_PAINTMODE_ERASER)
- WM_cursor_modal(win, BC_CROSSCURSOR); // XXX need a better cursor
+ WM_cursor_modal(win, BC_CROSSCURSOR); // XXX need a better cursor
else
WM_cursor_modal(win, BC_PAINTBRUSHCURSOR);
@@ -1704,7 +1705,7 @@ static int gpencil_draw_invoke (bContext *C, wmOperator *op, wmEvent *event)
if (event->type) {
/* hotkey invoked - start drawing */
//printf("\tGP - set first spot\n");
- p->status= GP_STATUS_PAINTING;
+ p->status = GP_STATUS_PAINTING;
/* handle the initial drawing - i.e. for just doing a simple dot */
gpencil_draw_apply_event(op, event);
@@ -1714,7 +1715,7 @@ static int gpencil_draw_invoke (bContext *C, wmOperator *op, wmEvent *event)
//printf("\tGP - hotkey invoked... waiting for click-drag\n");
}
- WM_event_add_notifier(C, NC_SCREEN|ND_GPENCIL, NULL);
+ WM_event_add_notifier(C, NC_SCREEN | ND_GPENCIL, NULL);
/* add a modal handler for this operator, so that we can then draw continuous strokes */
WM_event_add_modal_handler(C, op);
return OPERATOR_RUNNING_MODAL;
@@ -1723,11 +1724,11 @@ static int gpencil_draw_invoke (bContext *C, wmOperator *op, wmEvent *event)
/* gpencil modal operator stores area, which can be removed while using it (like fullscreen) */
static int gpencil_area_exists(bContext *C, ScrArea *satest)
{
- bScreen *sc= CTX_wm_screen(C);
+ bScreen *sc = CTX_wm_screen(C);
ScrArea *sa;
- for (sa= sc->areabase.first; sa; sa= sa->next) {
- if (sa==satest)
+ for (sa = sc->areabase.first; sa; sa = sa->next) {
+ if (sa == satest)
return 1;
}
@@ -1736,14 +1737,14 @@ static int gpencil_area_exists(bContext *C, ScrArea *satest)
static tGPsdata *gpencil_stroke_begin(bContext *C, wmOperator *op)
{
- tGPsdata *p= op->customdata;
+ tGPsdata *p = op->customdata;
/* we must check that we're still within the area that we're set up to work from
* otherwise we could crash (see bug #20586)
*/
if (CTX_wm_area(C) != p->sa) {
printf("\t\t\tGP - wrong area execution abort!\n");
- p->status= GP_STATUS_ERROR;
+ p->status = GP_STATUS_ERROR;
}
//printf("\t\tGP - start stroke\n");
@@ -1756,14 +1757,14 @@ static tGPsdata *gpencil_stroke_begin(bContext *C, wmOperator *op)
gp_paint_initstroke(p, p->paintmode);
if (p->status != GP_STATUS_ERROR)
- p->status= GP_STATUS_PAINTING;
+ p->status = GP_STATUS_PAINTING;
return op->customdata;
}
static void gpencil_stroke_end(wmOperator *op)
{
- tGPsdata *p= op->customdata;
+ tGPsdata *p = op->customdata;
gp_paint_cleanup(p);
@@ -1771,17 +1772,17 @@ static void gpencil_stroke_end(wmOperator *op)
gp_session_cleanup(p);
- p->status= GP_STATUS_IDLING;
+ p->status = GP_STATUS_IDLING;
- p->gpd= NULL;
- p->gpl= NULL;
- p->gpf= NULL;
+ p->gpd = NULL;
+ p->gpl = NULL;
+ p->gpf = NULL;
}
/* events handling during interactive drawing part of operator */
-static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event)
+static int gpencil_draw_modal(bContext *C, wmOperator *op, wmEvent *event)
{
- tGPsdata *p= op->customdata;
+ tGPsdata *p = op->customdata;
int estate = OPERATOR_PASS_THROUGH; /* default exit state - not handled, so let others have a share of the pie */
// if (event->type == NDOF_MOTION)
@@ -1802,7 +1803,7 @@ static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event)
if (ELEM4(event->type, RETKEY, PADENTER, ESCKEY, SPACEKEY)) {
/* exit() ends the current stroke before cleaning up */
//printf("\t\tGP - end of paint op + end of stroke\n");
- p->status= GP_STATUS_DONE;
+ p->status = GP_STATUS_DONE;
estate = OPERATOR_FINISHED;
}
@@ -1810,7 +1811,7 @@ static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event)
if (ELEM(event->type, LEFTMOUSE, RIGHTMOUSE)) {
/* if painting, end stroke */
if (p->status == GP_STATUS_PAINTING) {
- int sketch= 0;
+ int sketch = 0;
/* basically, this should be mouse-button up = end stroke
* BUT what happens next depends on whether we 'painting sessions' is enabled
*/
@@ -1827,17 +1828,17 @@ static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event)
estate = OPERATOR_RUNNING_MODAL;
/* stroke could be smoothed, send notifier to refresh screen */
- WM_event_add_notifier(C, NC_SCREEN|ND_GPENCIL|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_SCREEN | ND_GPENCIL | NA_EDITED, NULL);
}
else {
//printf("\t\tGP - end of stroke + op\n");
- p->status= GP_STATUS_DONE;
+ p->status = GP_STATUS_DONE;
estate = OPERATOR_FINISHED;
}
}
else if (event->val == KM_PRESS) {
/* not painting, so start stroke (this should be mouse-button down) */
- p= gpencil_stroke_begin(C, op);
+ p = gpencil_stroke_begin(C, op);
if (p->status == GP_STATUS_ERROR) {
estate = OPERATOR_CANCELLED;
@@ -1877,8 +1878,8 @@ static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event)
}
/* gpencil modal operator stores area, which can be removed while using it (like fullscreen) */
- if (0==gpencil_area_exists(C, p->sa))
- estate= OPERATOR_CANCELLED;
+ if (0 == gpencil_area_exists(C, p->sa))
+ estate = OPERATOR_CANCELLED;
else
/* update status indicators - cursor, header, etc. */
gpencil_draw_status_indicators(p);
@@ -1888,14 +1889,14 @@ static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event)
case OPERATOR_FINISHED:
/* one last flush before we're done */
gpencil_draw_exit(C, op);
- WM_event_add_notifier(C, NC_SCREEN|ND_GPENCIL|NA_EDITED, NULL); // XXX need a nicer one that will work
+ WM_event_add_notifier(C, NC_SCREEN | ND_GPENCIL | NA_EDITED, NULL); // XXX need a nicer one that will work
break;
case OPERATOR_CANCELLED:
gpencil_draw_exit(C, op);
break;
- case OPERATOR_RUNNING_MODAL|OPERATOR_PASS_THROUGH:
+ case OPERATOR_RUNNING_MODAL | OPERATOR_PASS_THROUGH:
/* event doesn't need to be handled */
//printf("unhandled event -> %d (mmb? = %d | mmv? = %d)\n", event->type, event->type == MIDDLEMOUSE, event->type==MOUSEMOVE);
break;
@@ -1915,7 +1916,7 @@ static EnumPropertyItem prop_gpencil_drawmodes[] = {
{0, NULL, 0, NULL, NULL}
};
-void GPENCIL_OT_draw (wmOperatorType *ot)
+void GPENCIL_OT_draw(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Grease Pencil Draw";
@@ -1930,7 +1931,7 @@ void GPENCIL_OT_draw (wmOperatorType *ot)
ot->poll = gpencil_draw_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING;
/* settings for drawing */
RNA_def_enum(ot->srna, "mode", prop_gpencil_drawmodes, 0, "Mode", "Way to interpret mouse movements");
diff --git a/source/blender/editors/gpencil/gpencil_undo.c b/source/blender/editors/gpencil/gpencil_undo.c
index 36624b88a9f..61f7e1bb86f 100644
--- a/source/blender/editors/gpencil/gpencil_undo.c
+++ b/source/blender/editors/gpencil/gpencil_undo.c
@@ -46,7 +46,7 @@
#include "gpencil_intern.h"
-#define MAXUNDONAME 64
+#define MAXUNDONAME 64
typedef struct bGPundonode {
struct bGPundonode *next, *prev;
@@ -65,25 +65,25 @@ int ED_gpencil_session_active(void)
int ED_undo_gpencil_step(bContext *C, int step, const char *name)
{
- bGPdata **gpd_ptr= NULL, *new_gpd= NULL;
+ bGPdata **gpd_ptr = NULL, *new_gpd = NULL;
- gpd_ptr= gpencil_data_get_pointers(C, NULL);
+ gpd_ptr = gpencil_data_get_pointers(C, NULL);
- if (step==1) { /* undo */
+ if (step == 1) { /* undo */
//printf("\t\tGP - undo step\n");
if (cur_node->prev) {
if (!name || strcmp(cur_node->name, name) == 0) {
- cur_node= cur_node->prev;
- new_gpd= cur_node->gpd;
+ cur_node = cur_node->prev;
+ new_gpd = cur_node->gpd;
}
}
}
- else if (step==-1) {
+ else if (step == -1) {
//printf("\t\tGP - redo step\n");
if (cur_node->next) {
if (!name || strcmp(cur_node->name, name) == 0) {
- cur_node= cur_node->next;
- new_gpd= cur_node->gpd;
+ cur_node = cur_node->next;
+ new_gpd = cur_node->gpd;
}
}
}
@@ -91,24 +91,24 @@ int ED_undo_gpencil_step(bContext *C, int step, const char *name)
if (new_gpd) {
if (gpd_ptr) {
if (*gpd_ptr) {
- bGPdata *gpd= *gpd_ptr;
+ bGPdata *gpd = *gpd_ptr;
bGPDlayer *gpl, *gpld;
free_gpencil_layers(&gpd->layers);
/* copy layers */
- gpd->layers.first= gpd->layers.last= NULL;
+ gpd->layers.first = gpd->layers.last = NULL;
- for (gpl= new_gpd->layers.first; gpl; gpl= gpl->next) {
+ for (gpl = new_gpd->layers.first; gpl; gpl = gpl->next) {
/* make a copy of source layer and its data */
- gpld= gpencil_layer_duplicate(gpl);
+ gpld = gpencil_layer_duplicate(gpl);
BLI_addtail(&gpd->layers, gpld);
}
}
}
}
- WM_event_add_notifier(C, NC_SCREEN|ND_GPENCIL|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_SCREEN | ND_GPENCIL | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
@@ -126,41 +126,41 @@ void gpencil_undo_push(bGPdata *gpd)
if (cur_node) {
/* remove all un-done nodes from stack */
- undo_node= cur_node->next;
+ undo_node = cur_node->next;
while (undo_node) {
- bGPundonode *next_node= undo_node->next;
+ bGPundonode *next_node = undo_node->next;
- free_gpencil_data(undo_node->gpd);
+ BKE_gpencil_free(undo_node->gpd);
MEM_freeN(undo_node->gpd);
BLI_freelinkN(&undo_nodes, undo_node);
- undo_node= next_node;
+ undo_node = next_node;
}
}
/* create new undo node */
- undo_node= MEM_callocN(sizeof(bGPundonode), "gpencil undo node");
- undo_node->gpd= gpencil_data_duplicate(gpd);
+ undo_node = MEM_callocN(sizeof(bGPundonode), "gpencil undo node");
+ undo_node->gpd = gpencil_data_duplicate(gpd);
- cur_node= undo_node;
+ cur_node = undo_node;
BLI_addtail(&undo_nodes, undo_node);
}
void gpencil_undo_finish(void)
{
- bGPundonode *undo_node= undo_nodes.first;
+ bGPundonode *undo_node = undo_nodes.first;
while (undo_node) {
- free_gpencil_data(undo_node->gpd);
+ BKE_gpencil_free(undo_node->gpd);
MEM_freeN(undo_node->gpd);
- undo_node= undo_node->next;
+ undo_node = undo_node->next;
}
BLI_freelistN(&undo_nodes);
- cur_node= NULL;
+ cur_node = NULL;
}
diff --git a/source/blender/editors/include/BIF_glutil.h b/source/blender/editors/include/BIF_glutil.h
index 44195988c40..2172aa82acf 100644
--- a/source/blender/editors/include/BIF_glutil.h
+++ b/source/blender/editors/include/BIF_glutil.h
@@ -49,7 +49,8 @@ void fdrawXORcirc(float xofs, float yofs, float rad);
void fdrawcheckerboard(float x1, float y1, float x2, float y2);
-/* glStipple defines */
+/* OpenGL stipple defines */
+/* OpenGL stipple defines */
extern unsigned char stipple_halftone[128];
extern unsigned char stipple_quarttone[128];
extern unsigned char stipple_diag_stripes_pos[128];
@@ -147,13 +148,14 @@ void glaDrawPixelsTexScaled(float x, float y, int img_w, int img_h, int format,
/* 2D Drawing Assistance */
/** Define a 2D area (viewport, scissor, matrices) for OpenGL rendering.
- * This routine sets up an OpenGL state appropriate for drawing using
- * both vertice (glVertex, etc) and raster (glRasterPos, glRect) commands.
- * All coordinates should be at integer positions. There is little to
- * no reason to use glVertex2f etc. functions during 2D rendering, and
+ *
+ * glwDefine2DArea and glaBegin2DDraw set up an OpenGL state appropriate
+ * for drawing using both vertice (Vertex, etc) and raster (RasterPos, Rect)
+ * commands. All coordinates should be at integer positions. There is little
+ * to no reason to use glVertex2f etc. functions during 2D rendering, and
* thus no reason to +-0.5 the coordinates or perform other silly
* tricks.
- *
+ *
* \param screen_rect The screen rectangle to be defined for 2D drawing.
*/
void glaDefine2DArea (struct rcti *screen_rect);
@@ -165,13 +167,8 @@ typedef struct gla2DDrawInfo gla2DDrawInfo;
* to free it and to return OpenGL to its previous state. The
* scissor rectangle is set to match the viewport.
*
- * This routine sets up an OpenGL state appropriate for drawing using
- * both vertice (glVertex, etc) and raster (glRasterPos, glRect) commands.
- * All coordinates should be at integer positions. There is little to
- * no reason to use glVertex2f etc. functions during 2D rendering, and
- * thus no reason to +-0.5 the coordinates or perform other silly
- * tricks.
- *
+ * See glaDefine2DArea for an explanation of why this function uses integers.
+ *
* \param screen_rect The screen rectangle to be used for 2D drawing.
* \param world_rect The world rectangle that the 2D area represented
* by \a screen_rect is supposed to represent. If NULL it is assumed the
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h
index a9affbcd342..391286a2a88 100644
--- a/source/blender/editors/include/ED_anim_api.h
+++ b/source/blender/editors/include/ED_anim_api.h
@@ -366,7 +366,7 @@ typedef struct bAnimChannelType {
/* drawing */
/* get RGB color that is used to draw the majority of the backdrop */
- void (*get_backdrop_color)(bAnimContext *ac, bAnimListElem *ale, float *color);
+ void (*get_backdrop_color)(bAnimContext *ac, bAnimListElem *ale, float r_color[3]);
/* draw backdrop strip for channel */
void (*draw_backdrop)(bAnimContext *ac, bAnimListElem *ale, float yminc, float ymaxc);
/* get depth of indention (relative to the depth channel is nested at) */
diff --git a/source/blender/editors/include/ED_clip.h b/source/blender/editors/include/ED_clip.h
index 5e8ef618a42..302c2940fef 100644
--- a/source/blender/editors/include/ED_clip.h
+++ b/source/blender/editors/include/ED_clip.h
@@ -33,6 +33,7 @@
struct ARegion;
struct bContext;
+struct bScreen;
struct ImBuf;
struct Main;
struct MovieClip;
@@ -42,7 +43,13 @@ struct wmEvent;
/* clip_editor.c */
int ED_space_clip_poll(struct bContext *C);
-void ED_space_clip_set(struct bContext *C, struct SpaceClip *sc, struct MovieClip *clip);
+int ED_space_clip_view_clip_poll(struct bContext *C);
+
+int ED_space_clip_tracking_poll(struct bContext *C);
+int ED_space_clip_tracking_size_poll(struct bContext *C);
+int ED_space_clip_tracking_frame_poll(struct bContext *C);
+
+void ED_space_clip_set(struct bContext *C, struct bScreen *screen, struct SpaceClip *sc, struct MovieClip *clip);
struct MovieClip *ED_space_clip(struct SpaceClip *sc);
void ED_space_clip_size(struct SpaceClip *sc, int *width, int *height);
void ED_space_clip_zoom(struct SpaceClip *sc, ARegion *ar, float *zoomx, float *zoomy);
@@ -58,6 +65,13 @@ void ED_clip_point_undistorted_pos(SpaceClip *sc, float co[2], float nco[2]);
void ED_clip_point_stable_pos(struct bContext *C, float x, float y, float *xr, float *yr);
void ED_clip_mouse_pos(struct bContext *C, struct wmEvent *event, float co[2]);
+int ED_space_clip_texture_buffer_supported(struct SpaceClip *sc);
+int ED_space_clip_load_movieclip_buffer(struct SpaceClip *sc, struct ImBuf *ibuf);
+void ED_space_clip_unload_movieclip_buffer(struct SpaceClip *sc);
+void ED_space_clip_free_texture_buffer(struct SpaceClip *sc);
+
+int ED_space_clip_show_trackedit(struct SpaceClip *sc);
+
/* clip_ops.c */
void ED_operatormacros_clip(void);
diff --git a/source/blender/editors/include/ED_curve.h b/source/blender/editors/include/ED_curve.h
index 50e43c46de5..73ff8e9304d 100644
--- a/source/blender/editors/include/ED_curve.h
+++ b/source/blender/editors/include/ED_curve.h
@@ -63,7 +63,7 @@ void load_editNurb (struct Object *obedit);
void make_editNurb (struct Object *obedit);
void free_editNurb (struct Object *obedit);
-void free_curve_editNurb (struct Curve *cu);
+void BKE_curve_editNurb_free (struct Curve *cu);
int mouse_nurb (struct bContext *C, const int mval[2], int extend);
diff --git a/source/blender/editors/include/ED_fluidsim.h b/source/blender/editors/include/ED_fluidsim.h
index 54acf73aacd..1a0c90978e6 100644
--- a/source/blender/editors/include/ED_fluidsim.h
+++ b/source/blender/editors/include/ED_fluidsim.h
@@ -1,7 +1,4 @@
/*
- * BKE_fluidsim.h
- *
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h
index a70be6dfb54..490a8830d3a 100644
--- a/source/blender/editors/include/ED_keyframing.h
+++ b/source/blender/editors/include/ED_keyframing.h
@@ -190,7 +190,7 @@ int ANIM_apply_keyingset(struct bContext *C, ListBase *dsources, struct bAction
struct KeyingSet *ANIM_builtin_keyingset_get_named(struct KeyingSet *prevKS, const char name[]);
/* Find KeyingSet type info given a name */
-KeyingSetInfo *ANIM_keyingset_info_find_named(const char name[]);
+KeyingSetInfo *ANIM_keyingset_info_find_name(const char name[]);
/* for RNA type registrations... */
void ANIM_keyingset_info_register(KeyingSetInfo *ksi);
@@ -292,7 +292,7 @@ short fcurve_frame_has_keyframe(struct FCurve *fcu, float frame, short filter);
* Checks whether a keyframe exists for the given ID-block one the given frame.
* - It is recommended to call this method over the other keyframe-checkers directly,
* in case some detail of the implementation changes...
- * - frame: the value of this is quite often result of BKE_curframe()
+ * - frame: the value of this is quite often result of BKE_scene_frame_get()
*/
short id_frame_has_keyframe(struct ID *id, float frame, short filter);
@@ -323,7 +323,7 @@ int ED_autokeyframe_pchan(struct bContext *C, struct Scene *scene, struct Object
#define ANIM_KS_SCALING_ID "Scaling"
#define ANIM_KS_LOC_ROT_SCALE_ID "LocRotScale"
#define ANIM_KS_AVAILABLE_ID "Available"
-#define ANIM_KS_WHOLE_CHARACTER_ID "Whole Character"
+#define ANIM_KS_WHOLE_CHARACTER_ID "WholeCharacter"
#ifdef __cplusplus
}
diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h
index 10137a5a259..71d37d5c6ea 100644
--- a/source/blender/editors/include/ED_mesh.h
+++ b/source/blender/editors/include/ED_mesh.h
@@ -71,7 +71,7 @@ struct Material;
struct Object;
struct rcti;
-intptr_t mesh_octree_table(struct Object *ob, struct BMEditMesh *em, float *co, char mode);
+intptr_t mesh_octree_table(struct Object *ob, struct BMEditMesh *em, const float co[3], char mode);
int mesh_mirrtopo_table(struct Object *ob, char mode);
/* editmesh_utils.c */
@@ -114,12 +114,8 @@ void EDBM_selectmode_set(struct BMEditMesh *em);
void EDBM_selectmode_convert(struct BMEditMesh *em, short oldmode, short selectmode);
void undo_push_mesh(struct bContext *C, const char *name);
-int EDBM_editselection_active_get(struct BMEditMesh *em, struct BMEditSelection *ese);
-void EDBM_editselection_center(float *center, struct BMEditSelection *ese);
-void EDBM_editselection_plane(struct BMEditMesh *em, float *plane, struct BMEditSelection *ese);
-void EDBM_editselection_normal(float *normal, struct BMEditSelection *ese);
int EDBM_vert_color_check(struct BMEditMesh *em);
-void EDBM_editselection_validate(struct BMEditMesh *em);
+
void EDBM_mesh_hide(struct BMEditMesh *em, int swap);
void EDBM_mesh_reveal(struct BMEditMesh *em);
@@ -143,7 +139,7 @@ struct MTexPoly *EDBM_mtexpoly_active_get(struct BMEditMesh *em, struct BMFace *
void EDBM_uv_vert_map_free(struct UvVertMap *vmap);
struct UvMapVert *EDBM_uv_vert_map_at_index(struct UvVertMap *vmap, unsigned int v);
-struct UvVertMap *EDBM_uv_vert_map_create(struct BMEditMesh *em, int selected, int do_face_idx_array, float *limit);
+struct UvVertMap *EDBM_uv_vert_map_create(struct BMEditMesh *em, int selected, int do_face_idx_array, const float limit[2]);
void EDBM_data_layer_add(struct BMEditMesh *em, struct CustomData *data, int type, const char *name);
void EDBM_data_layer_free(struct BMEditMesh *em, struct CustomData *data, int type);
@@ -162,7 +158,7 @@ extern unsigned int bm_vertoffs, bm_solidoffs, bm_wireoffs;
int mouse_mesh(struct bContext *C, const int mval[2], short extend);
-struct BMVert *editbmesh_get_x_mirror_vert(struct Object *ob, struct BMEditMesh *em, struct BMVert *eve, float *co, int index);
+struct BMVert *editbmesh_get_x_mirror_vert(struct Object *ob, struct BMEditMesh *em, struct BMVert *eve, const float co[3], int index);
int mesh_get_x_mirror_vert(struct Object *ob, int index);
int *mesh_get_x_mirror_faces(struct Object *ob, struct BMEditMesh *em);
@@ -192,7 +188,7 @@ int paintface_mouse_select(struct bContext *C, struct Object *ob, const int mval
int do_paintface_box_select(struct ViewContext *vc, struct rcti *rect, int select, int extend);
void paintface_deselect_all_visible(struct Object *ob, int action, short flush_flags);
void paintface_select_linked(struct bContext *C, struct Object *ob, int mval[2], int mode);
-int paintface_minmax(struct Object *ob, float *min, float *max);
+int paintface_minmax(struct Object *ob, float r_min[3], float r_max[3]);
void paintface_hide(struct Object *ob, const int unselected);
void paintface_reveal(struct Object *ob);
diff --git a/source/blender/editors/include/ED_particle.h b/source/blender/editors/include/ED_particle.h
index 1c7f5cf0641..36e5ca5485f 100644
--- a/source/blender/editors/include/ED_particle.h
+++ b/source/blender/editors/include/ED_particle.h
@@ -1,5 +1,4 @@
-/*
- *
+/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/include/ED_physics.h b/source/blender/editors/include/ED_physics.h
index 6c885b9336f..cd9ddd3d7d1 100644
--- a/source/blender/editors/include/ED_physics.h
+++ b/source/blender/editors/include/ED_physics.h
@@ -1,5 +1,4 @@
-/*
- *
+/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/include/ED_render.h b/source/blender/editors/include/ED_render.h
index 73bbd5ffef8..5392ef86ba7 100644
--- a/source/blender/editors/include/ED_render.h
+++ b/source/blender/editors/include/ED_render.h
@@ -37,6 +37,7 @@ struct MTex;
struct Render;
struct RenderInfo;
struct Scene;
+struct ScrArea;
/* render_ops.c */
@@ -46,6 +47,7 @@ void ED_operatortypes_render(void);
void ED_render_id_flush_update(struct Main *bmain, struct ID *id);
void ED_render_engine_changed(struct Main *bmain);
+void ED_render_engine_area_exit(struct ScrArea *sa);
void ED_render_scene_update(struct Main *bmain, struct Scene *scene, int updated);
/* render_preview.c */
diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h
index f0fffb34b73..f62befdaa31 100644
--- a/source/blender/editors/include/ED_screen.h
+++ b/source/blender/editors/include/ED_screen.h
@@ -66,6 +66,7 @@ void ED_region_header(const struct bContext *C, struct ARegion *ar);
void ED_region_toggle_hidden(struct bContext *C, struct ARegion *ar);
void region_scissor_winrct(struct ARegion *ar, struct rcti *winrct);
void ED_region_info_draw(struct ARegion *ar, const char *text, int block, float alpha);
+void ED_region_grid_draw(struct ARegion *ar, float zoomx, float zoomy);
/* spaces */
void ED_spacetypes_init(void);
diff --git a/source/blender/editors/include/ED_sculpt.h b/source/blender/editors/include/ED_sculpt.h
index 9cb32c31f5b..2df699255be 100644
--- a/source/blender/editors/include/ED_sculpt.h
+++ b/source/blender/editors/include/ED_sculpt.h
@@ -42,6 +42,8 @@ void ED_operatortypes_sculpt(void);
void sculpt_get_redraw_planes(float planes[4][4], struct ARegion *ar,
struct RegionView3D *rv3d, struct Object *ob);
void ED_sculpt_force_update(struct bContext *C);
+float *ED_sculpt_get_last_stroke(struct Object *ob);
+int ED_sculpt_minmax(struct bContext *C, float *min, float *max);
/* paint_ops.c */
void ED_operatortypes_paint(void);
diff --git a/source/blender/editors/include/ED_uvedit.h b/source/blender/editors/include/ED_uvedit.h
index dfdbb1969cf..2427ed1a333 100644
--- a/source/blender/editors/include/ED_uvedit.h
+++ b/source/blender/editors/include/ED_uvedit.h
@@ -51,27 +51,28 @@ void ED_operatortypes_uvedit(void);
void ED_keymap_uvedit(struct wmKeyConfig *keyconf);
void ED_uvedit_assign_image(struct Main *bmain, struct Scene *scene, struct Object *obedit, struct Image *ima, struct Image *previma);
-int ED_uvedit_minmax(struct Scene *scene, struct Image *ima, struct Object *obedit, float *min, float *max);
+int ED_uvedit_minmax(struct Scene *scene, struct Image *ima, struct Object *obedit, float min[2], float max[2]);
-int ED_object_get_active_image(struct Object *ob, int mat_nr, struct Image **ima, struct ImageUser **iuser, struct bNode **node);
+int ED_object_get_active_image(struct Object *ob, int mat_nr, struct Image **ima, struct ImageUser **iuser, struct bNode **node);
void ED_object_assign_active_image(struct Main *bmain, struct Object *ob, int mat_nr, struct Image *ima);
int ED_uvedit_test(struct Object *obedit);
/* visibility and selection */
-int uvedit_face_visible(struct Scene *scene, struct Image *ima, struct BMFace *efa, struct MTexPoly *tf);
-int uvedit_face_selected(struct Scene *scene, struct BMEditMesh *em, struct BMFace *efa);
-int uvedit_edge_selected(struct BMEditMesh *em, struct Scene *scene, struct BMLoop *l);
-int uvedit_uv_selected(struct BMEditMesh *em, struct Scene *scene, struct BMLoop *l);
-
-int uvedit_face_select(struct Scene *scene, struct BMEditMesh *em, struct BMFace *efa);
-int uvedit_face_deselect(struct Scene *scene, struct BMEditMesh *em, struct BMFace *efa);
-void uvedit_edge_select(struct BMEditMesh *em, struct Scene *scene, struct BMLoop *l);
-void uvedit_edge_deselect(struct BMEditMesh *em, struct Scene *scene, struct BMLoop *l);
-void uvedit_uv_select(struct BMEditMesh *em, struct Scene *scene, struct BMLoop *l);
-void uvedit_uv_deselect(struct BMEditMesh *em, struct Scene *scene, struct BMLoop *l);
-
-int ED_uvedit_nearest_uv(struct Scene *scene, struct Object *obedit, struct Image *ima, float co[2], float uv[2]);
+int uvedit_face_visible_test(struct Scene *scene, struct Image *ima, struct BMFace *efa, struct MTexPoly *tf);
+int uvedit_face_select_test(struct Scene *scene, struct BMEditMesh *em, struct BMFace *efa);
+int uvedit_edge_select_test(struct BMEditMesh *em, struct Scene *scene, struct BMLoop *l);
+int uvedit_uv_select_test(struct BMEditMesh *em, struct Scene *scene, struct BMLoop *l);
+
+int uvedit_face_select_enable(struct Scene *scene, struct BMEditMesh *em, struct BMFace *efa, const short do_history);
+int uvedit_face_select_disable(struct Scene *scene, struct BMEditMesh *em, struct BMFace *efa);
+void uvedit_edge_select_enable(struct BMEditMesh *em, struct Scene *scene, struct BMLoop *l, const short do_history);
+void uvedit_edge_select_disable(struct BMEditMesh *em, struct Scene *scene, struct BMLoop *l);
+void uvedit_uv_select_enable(struct BMEditMesh *em, struct Scene *scene, struct BMLoop *l, const short do_history);
+void uvedit_uv_select_disable(struct BMEditMesh *em, struct Scene *scene, struct BMLoop *l);
+
+int ED_uvedit_nearest_uv(struct Scene *scene, struct Object *obedit, struct Image *ima,
+ const float co[2], float r_uv[2]);
/* uvedit_unwrap_ops.c */
void ED_uvedit_live_unwrap_begin(struct Scene *scene, struct Object *obedit);
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h
index f886c01039e..e3759ef5fde 100644
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@ -269,8 +269,6 @@ void view3d_get_transformation(const struct ARegion *ar, struct RegionView3D *rv
/* XXX should move to BLI_math */
int edge_inside_circle(short centx, short centy, short rad, short x1, short y1, short x2, short y2);
-int lasso_inside(int mcords[][2], short moves, int sx, int sy);
-int lasso_inside_edge(int mcords[][2], short moves, int x0, int y0, int x1, int y1);
/* get 3d region from context, also if mouse is in header or toolbar */
struct RegionView3D *ED_view3d_context_rv3d(struct bContext *C);
@@ -306,6 +304,8 @@ void ED_view3d_camera_lock_init(struct View3D *v3d, struct RegionView3D *rv3d);
/* copy the view to the camera, return TRUE if */
int ED_view3d_camera_lock_sync(struct View3D *v3d, struct RegionView3D *rv3d);
+void ED_view3D_lock_clear(struct View3D *v3d);
+
struct BGpic *ED_view3D_background_image_new(struct View3D *v3d);
void ED_view3D_background_image_remove(struct View3D *v3d, struct BGpic *bgpic);
void ED_view3D_background_image_clear(struct View3D *v3d);
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index cdb2472706c..d262c650e1c 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -322,10 +322,22 @@ uiPopupMenu *uiPupMenuBegin(struct bContext *C, const char *title, int icon);
void uiPupMenuEnd(struct bContext *C, struct uiPopupMenu *head);
struct uiLayout *uiPupMenuLayout(uiPopupMenu *head);
-void uiPupMenuOkee(struct bContext *C, const char *opname, const char *str, ...);
+void uiPupMenuOkee(struct bContext *C, const char *opname, const char *str, ...)
+#ifdef __GNUC__
+__attribute__ ((format (printf, 3, 4)))
+#endif
+;
void uiPupMenuSaveOver(struct bContext *C, struct wmOperator *op, const char *filename);
-void uiPupMenuNotice(struct bContext *C, const char *str, ...);
-void uiPupMenuError(struct bContext *C, const char *str, ...);
+void uiPupMenuNotice(struct bContext *C, const char *str, ...)
+#ifdef __GNUC__
+__attribute__ ((format (printf, 2, 3)))
+#endif
+;
+void uiPupMenuError(struct bContext *C, const char *str, ...)
+#ifdef __GNUC__
+__attribute__ ((format (printf, 2, 3)))
+#endif
+;
void uiPupMenuReports(struct bContext *C, struct ReportList *reports);
void uiPupMenuInvoke(struct bContext *C, const char *idname); /* popup registered menu */
diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h
index 1531ade5ba3..82c323a3daa 100644
--- a/source/blender/editors/include/UI_resources.h
+++ b/source/blender/editors/include/UI_resources.h
@@ -1,5 +1,4 @@
/*
- *
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 226d9a3d493..0c13b5de02e 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -498,7 +498,7 @@ static int ui_but_float_precision(uiBut *but, double value)
return prec;
}
-static void ui_draw_linkline(uiLinkLine *line)
+static void ui_draw_linkline(uiLinkLine *line, int hilightActiveLines)
{
rcti rect;
@@ -509,8 +509,10 @@ static void ui_draw_linkline(uiLinkLine *line)
rect.xmax = (line->to->x1 + line->to->x2) / 2.0f;
rect.ymax = (line->to->y1 + line->to->y2) / 2.0f;
- if (line->flag & UI_SELECT)
+ if (line->flag & UI_SELECT)
glColor3ub(100, 100, 100);
+ else if (hilightActiveLines && ((line->from->flag & UI_ACTIVE) || (line->to->flag & UI_ACTIVE)))
+ UI_ThemeColor(TH_TEXT_HI);
else
glColor3ub(0, 0, 0);
@@ -521,18 +523,37 @@ static void ui_draw_links(uiBlock *block)
{
uiBut *but;
uiLinkLine *line;
-
- but = block->buttons.first;
- while (but) {
+
+ // Draw the inactive lines (lines with neither button being hovered over).
+ // As we go, remember if we see any active or selected lines.
+ int foundselectline = 0;
+ int foundactiveline = 0;
+ for (but = block->buttons.first; but; but = but->next) {
if (but->type == LINK && but->link) {
- line = but->link->lines.first;
- while (line) {
- ui_draw_linkline(line);
- line = line->next;
+ for (line = but->link->lines.first; line; line = line->next) {
+ if (!(line->from->flag & UI_ACTIVE) && !(line->to->flag & UI_ACTIVE))
+ ui_draw_linkline(line, 0);
+ else
+ foundactiveline = 1;
+
+ if ((line->from->flag & UI_SELECT) || (line->to->flag & UI_SELECT))
+ foundselectline = 1;
}
}
- but = but->next;
}
+
+ // Draw any active lines (lines with either button being hovered over).
+ // Do this last so they appear on top of inactive lines.
+ if (foundactiveline) {
+ for (but = block->buttons.first; but; but = but->next) {
+ if (but->type == LINK && but->link) {
+ for (line = but->link->lines.first; line; line = line->next) {
+ if ((line->from->flag & UI_ACTIVE) || (line->to->flag & UI_ACTIVE))
+ ui_draw_linkline(line, !foundselectline);
+ }
+ }
+ }
+ }
}
/* ************** BLOCK ENDING FUNCTION ************* */
@@ -694,7 +715,7 @@ int uiButActiveOnly(const bContext *C, uiBlock *block, uiBut *but)
}
}
if (activate || found == 0) {
- ui_button_activate_do( (bContext *)C, CTX_wm_region(C), but);
+ ui_button_activate_do((bContext *)C, CTX_wm_region(C), but);
}
else if (found && isactive == 0) {
@@ -2644,9 +2665,9 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, const char *str,
*/
#define UI_DEF_BUT_RNA_DISABLE(but) \
- but->flag |= UI_BUT_DISABLED; \
- but->lock = 1; \
- but->lockstr = ""
+ but->flag |= UI_BUT_DISABLED; \
+ but->lock = 1; \
+ but->lockstr = ""
static uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, PointerRNA *ptr, PropertyRNA *prop, int index, float min, float max, float a1, float a2, const char *tip)
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index 91d3c890df3..8c5913e23fb 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -1196,7 +1196,7 @@ void ui_draw_but_NORMAL(uiBut *but, uiWidgetColors *wcol, rcti *rect)
ui_get_but_vectorf(but, dir);
- dir[3] = 0.0f; /* glLight needs 4 args, 0.0 is sun */
+ dir[3] = 0.0f; /* glLightfv needs 4 args, 0.0 is sun */
glLightfv(GL_LIGHT7, GL_POSITION, dir);
glLightfv(GL_LIGHT7, GL_DIFFUSE, diffn);
glLightfv(GL_LIGHT7, GL_SPECULAR, vec0);
@@ -1281,7 +1281,7 @@ static void ui_draw_but_curve_grid(rcti *rect, float zoomx, float zoomy, float o
}
-static void glColor3ubvShade(unsigned char *col, int shade)
+static void gl_shaded_color(unsigned char *col, int shade)
{
glColor3ub(col[0] - shade > 0 ? col[0] - shade : 0,
col[1] - shade > 0 ? col[1] - shade : 0,
@@ -1318,7 +1318,7 @@ void ui_draw_but_CURVE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *rect
/* backdrop */
if (cumap->flag & CUMA_DO_CLIP) {
- glColor3ubvShade((unsigned char *)wcol->inner, -20);
+ gl_shaded_color((unsigned char *)wcol->inner, -20);
glRectf(rect->xmin, rect->ymin, rect->xmax, rect->ymax);
glColor3ubv((unsigned char *)wcol->inner);
glRectf(rect->xmin + zoomx * (cumap->clipr.xmin - offsx),
@@ -1332,13 +1332,13 @@ void ui_draw_but_CURVE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *rect
}
/* grid, every .25 step */
- glColor3ubvShade((unsigned char *)wcol->inner, -16);
+ gl_shaded_color((unsigned char *)wcol->inner, -16);
ui_draw_but_curve_grid(rect, zoomx, zoomy, offsx, offsy, 0.25f);
/* grid, every 1.0 step */
- glColor3ubvShade((unsigned char *)wcol->inner, -24);
+ gl_shaded_color((unsigned char *)wcol->inner, -24);
ui_draw_but_curve_grid(rect, zoomx, zoomy, offsx, offsy, 1.0f);
/* axes */
- glColor3ubvShade((unsigned char *)wcol->inner, -50);
+ gl_shaded_color((unsigned char *)wcol->inner, -50);
glBegin(GL_LINES);
glVertex2f(rect->xmin, rect->ymin + zoomy * (-offsy));
glVertex2f(rect->xmax, rect->ymin + zoomy * (-offsy));
@@ -1469,8 +1469,11 @@ static ImBuf *scale_trackpreview_ibuf(ImBuf *ibuf, float track_pos[2], int width
ImBuf *scaleibuf;
const float scalex = ((float)ibuf->x - 2 * margin) / width;
const float scaley = ((float)ibuf->y - 2 * margin) / height;
- float off_x = (int)track_pos[0] - track_pos[0] + 0.5f;
- float off_y = (int)track_pos[1] - track_pos[1] + 0.5f;
+ /* NOTE: 1.0f = 0.5f for integer coordinate coorrection (center of pixel vs. left bottom corner of bixel)
+ * and 0.5f for centering image in preview (cross is draving at exact center of widget so image
+ * should be shifted by half of pixel for correct centering) - sergey */
+ float off_x = (int)track_pos[0] - track_pos[0] + 1.0f;
+ float off_y = (int)track_pos[1] - track_pos[1] + 1.0f;
int x, y;
scaleibuf = IMB_allocImBuf(width, height, 32, IB_rect);
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index a7ff1565c3d..4cc478aa7c4 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -781,9 +781,9 @@ static void ui_add_smart_controller(bContext *C, uiBut *from, uiBut *to)
act_to = (bActuator *)(to->poin);
/* (1) get the object */
- CTX_DATA_BEGIN(C, Object *, ob_iter, selected_editable_objects) {
- for (sens_iter = ob_iter->sensors.first; sens_iter; sens_iter = sens_iter->next)
- {
+ CTX_DATA_BEGIN (C, Object *, ob_iter, selected_editable_objects)
+ {
+ for (sens_iter = ob_iter->sensors.first; sens_iter; sens_iter = sens_iter->next) {
if (&(sens_iter->links) == sens_from_links) {
ob = ob_iter;
break;
@@ -1207,7 +1207,7 @@ static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data,
but->poin = MEM_callocN(sizeof(ColorBand), "colorband");
button_activate_state(C, but, BUTTON_STATE_NUM_EDITING);
- memcpy(data->coba, &but_copypaste_coba, sizeof(ColorBand) );
+ memcpy(data->coba, &but_copypaste_coba, sizeof(ColorBand));
button_activate_state(C, but, BUTTON_STATE_EXIT);
}
}
@@ -1564,8 +1564,7 @@ static int ui_textedit_copypaste(uiBut *but, uiHandleButtonData *data, int paste
len = strlen(str);
}
- for (y = 0; y < strlen(buf); y++)
- {
+ for (y = 0; y < strlen(buf); y++) {
/* add contents of buffer */
if (len + 1 < data->maxlen) {
for (x = data->maxlen; x > but->pos; x--)
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h
index a0935e7abdd..9e073055fc3 100644
--- a/source/blender/editors/interface/interface_intern.h
+++ b/source/blender/editors/interface/interface_intern.h
@@ -99,48 +99,48 @@ typedef enum {
} uiWidgetTypeEnum;
/* panel limits */
-#define UI_PANEL_MINX 100
-#define UI_PANEL_MINY 70
+#define UI_PANEL_MINX 100
+#define UI_PANEL_MINY 70
/* uiBut->flag */
-#define UI_SELECT 1 /* use when the button is pressed */
-#define UI_SCROLLED 2 /* temp hidden, scrolled away */
-#define UI_ACTIVE 4
-#define UI_HAS_ICON 8
-#define UI_TEXTINPUT 16
-#define UI_HIDDEN 32
+#define UI_SELECT 1 /* use when the button is pressed */
+#define UI_SCROLLED 2 /* temp hidden, scrolled away */
+#define UI_ACTIVE 4
+#define UI_HAS_ICON 8
+#define UI_TEXTINPUT 16
+#define UI_HIDDEN 32
/* warn: rest of uiBut->flag in UI_interface.h */
/* internal panel drawing defines */
-#define PNL_GRID (UI_UNIT_Y / 5) /* 4 default */
-#define PNL_HEADER (UI_UNIT_Y + 4) /* 24 default */
+#define PNL_GRID (UI_UNIT_Y / 5) /* 4 default */
+#define PNL_HEADER (UI_UNIT_Y + 4) /* 24 default */
/* panel->flag */
-#define PNL_SELECT 1
-#define PNL_CLOSEDX 2
-#define PNL_CLOSEDY 4
-#define PNL_CLOSED 6
+#define PNL_SELECT 1
+#define PNL_CLOSEDX 2
+#define PNL_CLOSEDY 4
+#define PNL_CLOSED 6
/*#define PNL_TABBED 8*/ /*UNUSED*/
-#define PNL_OVERLAP 16
+#define PNL_OVERLAP 16
/* Button text selection:
* extension direction, selextend, inside ui_do_but_TEX */
-#define EXTEND_LEFT 1
-#define EXTEND_RIGHT 2
+#define EXTEND_LEFT 1
+#define EXTEND_RIGHT 2
/* for scope resize zone */
-#define SCOPE_RESIZE_PAD 9
+#define SCOPE_RESIZE_PAD 9
-typedef struct uiLinkLine { /* only for draw/edit */
+typedef struct uiLinkLine { /* only for draw/edit */
struct uiLinkLine *next, *prev;
struct uiBut *from, *to;
short flag, pad;
} uiLinkLine;
typedef struct {
- void **poin; /* pointer to original pointer */
- void ***ppoin; /* pointer to original pointer-array */
- short *totlink; /* if pointer-array, here is the total */
+ void **poin; /* pointer to original pointer */
+ void ***ppoin; /* pointer to original pointer-array */
+ short *totlink; /* if pointer-array, here is the total */
short maxlink, pad;
short fromcode, tocode;
@@ -178,8 +178,8 @@ struct uiBut {
/* not ysed yet, was used in 2.4x for ui_draw_pulldown_round & friends */
#if 0
- void (*embossfunc)(int , int , float, float, float, float, float, int);
- void (*sliderfunc)(int , float, float, float, float, float, float, int);
+ void (*embossfunc)(int, int, float, float, float, float, float, int);
+ void (*sliderfunc)(int, float, float, float, float, float, float, int);
#endif
uiButCompleteFunc autocomplete_func;
@@ -245,7 +245,7 @@ struct uiBut {
void *editcoba;
void *editcumap;
- /* pointer back */
+ /* pointer back */
uiBlock *block;
};
@@ -268,7 +268,7 @@ struct uiBlock {
float minx, miny, maxx, maxy;
float aspect;
- int puphash; // popup menu hash for memory
+ int puphash; /* popup menu hash for memory */
uiButHandleFunc func;
void *func_arg1;
@@ -303,27 +303,27 @@ struct uiBlock {
const char *lockstr;
char lock;
- char active; // to keep blocks while drawing and free them afterwards
- char tooltipdisabled; // to avoid tooltip after click
- char endblock; // uiEndBlock done?
+ char active; // to keep blocks while drawing and free them afterwards
+ char tooltipdisabled; // to avoid tooltip after click
+ char endblock; // uiEndBlock done?
- float xofs, yofs; // offset to parent button
- int dobounds, mx, my; // for doing delayed
- int bounds, minbounds; // for doing delayed
+ float xofs, yofs; // offset to parent button
+ int dobounds, mx, my; // for doing delayed
+ int bounds, minbounds; // for doing delayed
- rctf safety; // pulldowns, to detect outside, can differ per case how it is created
- ListBase saferct; // uiSafetyRct list
+ rctf safety; // pulldowns, to detect outside, can differ per case how it is created
+ ListBase saferct; // uiSafetyRct list
- uiPopupBlockHandle *handle; // handle
+ uiPopupBlockHandle *handle; // handle
- struct wmOperator *ui_operator;// use so presets can find the operator,
- // across menus and from nested popups which fail for operator context.
+ struct wmOperator *ui_operator; // use so presets can find the operator,
+ // across menus and from nested popups which fail for operator context.
- void *evil_C; // XXX hack for dynamic operator enums
+ void *evil_C; // XXX hack for dynamic operator enums
- struct UnitSettings *unit; // unit system, used a lot for numeric buttons so include here rather then fetching through the scene every time.
- float _hsv[3]; // XXX, only access via ui_block_hsv_get()
- char color_profile; // color profile for correcting linear colors for display
+ struct UnitSettings *unit; // unit system, used a lot for numeric buttons so include here rather then fetching through the scene every time.
+ float _hsv[3]; // XXX, only access via ui_block_hsv_get()
+ char color_profile; // color profile for correcting linear colors for display
};
typedef struct uiSafetyRct {
@@ -425,12 +425,12 @@ void ui_searchbox_apply(uiBut *but, struct ARegion *ar);
void ui_searchbox_free(struct bContext *C, struct ARegion *ar);
void ui_but_search_test(uiBut *but);
-typedef uiBlock* (*uiBlockHandleCreateFunc)(struct bContext *C, struct uiPopupBlockHandle *handle, void *arg1);
+typedef uiBlock * (*uiBlockHandleCreateFunc)(struct bContext *C, struct uiPopupBlockHandle *handle, void *arg1);
uiPopupBlockHandle *ui_popup_block_create(struct bContext *C, struct ARegion *butregion, uiBut *but,
- uiBlockCreateFunc create_func, uiBlockHandleCreateFunc handle_create_func, void *arg);
+ uiBlockCreateFunc create_func, uiBlockHandleCreateFunc handle_create_func, void *arg);
uiPopupBlockHandle *ui_popup_menu_create(struct bContext *C, struct ARegion *butregion, uiBut *but,
- uiMenuCreateFunc create_func, void *arg, char *str);
+ uiMenuCreateFunc create_func, void *arg, char *str);
void ui_popup_block_free(struct bContext *C, uiPopupBlockHandle *handle);
@@ -466,14 +466,14 @@ extern int ui_button_is_active(struct ARegion *ar);
void ui_draw_anti_tria(float x1, float y1, float x2, float y2, float x3, float y3);
void ui_draw_anti_roundbox(int mode, float minx, float miny, float maxx, float maxy, float rad);
void ui_draw_menu_back(struct uiStyle *style, uiBlock *block, rcti *rect);
-uiWidgetColors* ui_tooltip_get_theme(void);
-void ui_draw_tooltip_background(uiStyle *UNUSED(style), uiBlock *block, rcti *rect);
+uiWidgetColors *ui_tooltip_get_theme(void);
+void ui_draw_tooltip_background(uiStyle *UNUSED(style), uiBlock * block, rcti * rect);
void ui_draw_search_back(struct uiStyle *style, uiBlock *block, rcti *rect);
-int ui_link_bezier_points(rcti *rect, float coord_array[][2], int resol);
+int ui_link_bezier_points(rcti * rect, float coord_array[][2], int resol);
void ui_draw_link_bezier(rcti *rect);
extern void ui_draw_but(const struct bContext *C, ARegion *ar, struct uiStyle *style, uiBut *but, rcti *rect);
- /* theme color init */
+/* theme color init */
struct ThemeUI;
void ui_widget_color_init(struct ThemeUI *tui);
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 67e295503c2..28ceabdd344 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -1265,7 +1265,8 @@ static void rna_search_cb(const struct bContext *C, void *arg_but, const char *s
const int skip_filter = !but->changed;
/* build a temporary list of relevant items first */
- RNA_PROP_BEGIN(&but->rnasearchpoin, itemptr, but->rnasearchprop) {
+ RNA_PROP_BEGIN (&but->rnasearchpoin, itemptr, but->rnasearchprop)
+ {
if (flag & PROP_ID_SELF_CHECK)
if (itemptr.data == but->rnapoin.id.data)
continue;
@@ -1333,7 +1334,8 @@ static void search_id_collection(StructRNA *ptype, PointerRNA *ptr, PropertyRNA
*prop = NULL;
- RNA_STRUCT_BEGIN(ptr, iprop) {
+ RNA_STRUCT_BEGIN (ptr, iprop)
+ {
/* if it's a collection and has same pointer type, we've got it */
if (RNA_property_type(iprop) == PROP_COLLECTION) {
srna = RNA_property_pointer_type(ptr, iprop);
@@ -2724,8 +2726,8 @@ void uiLayoutSetContextPointer(uiLayout *layout, const char *name, PointerRNA *p
void uiLayoutContextCopy(uiLayout *layout, bContextStore *context)
{
- uiBlock *block= layout->root->block;
- layout->context= CTX_store_add_all(&block->contexts, context);
+ uiBlock *block = layout->root->block;
+ layout->context = CTX_store_add_all(&block->contexts, context);
}
diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c
index 93546d74c1b..aaca5181531 100644
--- a/source/blender/editors/interface/interface_ops.c
+++ b/source/blender/editors/interface/interface_ops.c
@@ -507,7 +507,7 @@ static int reports_to_text_exec(bContext *C, wmOperator *UNUSED(op))
char *str;
/* create new text-block to write to */
- txt = add_empty_text("Recent Reports");
+ txt = BKE_text_add("Recent Reports");
/* convert entire list to a display string, and add this to the text-block
* - if commandline debug option enabled, show debug reports too
@@ -516,7 +516,7 @@ static int reports_to_text_exec(bContext *C, wmOperator *UNUSED(op))
str = BKE_reports_string(reports, (G.debug & G_DEBUG) ? RPT_DEBUG : RPT_INFO);
if (str) {
- write_text(txt, str);
+ BKE_text_write(txt, str);
MEM_freeN(str);
return OPERATOR_FINISHED;
@@ -652,7 +652,7 @@ static int editsource_text_edit(bContext *C, wmOperator *op,
}
if (text == NULL) {
- text = add_text(filepath, bmain->name);
+ text = BKE_text_load(filepath, bmain->name);
}
if (text == NULL) {
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index d0f760d16fb..1c0a98eda6e 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -835,7 +835,7 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob,
if (!ELEM(md->type, eModifierType_Collision, eModifierType_Surface)) {
/* only here obdata, the rest of modifiers is ob level */
- uiBlockSetButLock(block, object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
+ uiBlockSetButLock(block, BKE_object_obdata_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
if (md->type == eModifierType_ParticleSystem) {
ParticleSystem *psys = ((ParticleSystemModifierData *)md)->psys;
@@ -953,7 +953,7 @@ static void do_constraint_panels(bContext *C, void *ob_pt, int event)
// if there are problems because of this, then rna needs changed update functions.
//
// object_test_constraints(ob);
- // if (ob->pose) update_pose_constraint_flags(ob->pose);
+ // if (ob->pose) BKE_pose_update_constraint_flags(ob->pose);
if (ob->type == OB_ARMATURE) DAG_id_tag_update(&ob->id, OB_RECALC_DATA | OB_RECALC_OB);
else DAG_id_tag_update(&ob->id, OB_RECALC_OB);
@@ -969,7 +969,7 @@ static void constraint_active_func(bContext *UNUSED(C), void *ob_v, void *con_v)
/* draw panel showing settings for a constraint */
static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con)
{
- bPoseChannel *pchan = get_active_posechannel(ob);
+ bPoseChannel *pchan = BKE_pose_channel_active(ob);
bConstraintTypeInfo *cti;
uiBlock *block;
uiLayout *result = NULL, *col, *box, *row;
@@ -2150,7 +2150,7 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe
uiItemL(sub, name, icon);
ma = give_current_material(ob, index + 1);
- if (ma && !scene_use_new_shading_nodes(scene)) {
+ if (ma && !BKE_scene_use_new_shading_nodes(scene)) {
manode = give_node_material(ma);
if (manode) {
char str[MAX_ID_NAME + 12];
@@ -2362,7 +2362,8 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *
if (ptr->data && prop) {
/* create list items */
- RNA_PROP_BEGIN(ptr, itemptr, prop) {
+ RNA_PROP_BEGIN (ptr, itemptr, prop)
+ {
/* create button */
if (!(i % 9))
row = uiLayoutRow(col, 0);
@@ -2384,7 +2385,8 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *
if (ptr->data && prop) {
/* create list items */
- RNA_PROP_BEGIN(ptr, itemptr, prop) {
+ RNA_PROP_BEGIN (ptr, itemptr, prop)
+ {
found = (activei == i);
if (found) {
@@ -2446,7 +2448,8 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *
if (ptr->data && prop) {
/* create list items */
- RNA_PROP_BEGIN(ptr, itemptr, prop) {
+ RNA_PROP_BEGIN (ptr, itemptr, prop)
+ {
if (i >= pa->list_scroll && i < pa->list_scroll + items)
list_item_row(C, col, ptr, &itemptr, i, rnaicon, activeptr, activeprop, prop_list);
@@ -2703,7 +2706,8 @@ static void template_keymap_item_properties(uiLayout *layout, const char *title,
flow = uiLayoutColumnFlow(layout, 2, 0);
- RNA_STRUCT_BEGIN(ptr, prop) {
+ RNA_STRUCT_BEGIN (ptr, prop)
+ {
int flag = RNA_property_flag(prop);
if (flag & PROP_HIDDEN)
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c
index c903040a6b9..a0b83b5fef4 100644
--- a/source/blender/editors/interface/interface_utils.c
+++ b/source/blender/editors/interface/interface_utils.c
@@ -139,7 +139,8 @@ int uiDefAutoButsRNA(uiLayout *layout, PointerRNA *ptr, int (*check_prop)(Pointe
assert(ELEM3(label_align, '\0', 'H', 'V'));
- RNA_STRUCT_BEGIN(ptr, prop) {
+ RNA_STRUCT_BEGIN (ptr, prop)
+ {
flag = RNA_property_flag(prop);
if (flag & PROP_HIDDEN || (check_prop && check_prop(ptr, prop) == FALSE))
continue;
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 4c6819f44b1..fe7a4e85418 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -1047,9 +1047,8 @@ static void ui_text_label_rightclip(uiFontStyle *fstyle, uiBut *but, rcti *rect)
/* chop off the leading text, starting from the right */
while (but->strwidth > okwidth && cp2 > but->drawstr) {
- int bytes = BLI_str_utf8_size(cp2);
- if (bytes < 0)
- bytes = 1;
+ char *prev_utf8 = BLI_str_find_prev_char_utf8(but->drawstr, cp2);
+ int bytes = cp2 - prev_utf8;
/* shift the text after and including cp2 back by 1 char, +1 to include null terminator */
memmove(cp2 - bytes, cp2, strlen(cp2) + 1);
@@ -1061,8 +1060,7 @@ static void ui_text_label_rightclip(uiFontStyle *fstyle, uiBut *but, rcti *rect)
/* after the leading text is gone, chop off the : and following space, with ofs */
- while ((but->strwidth > okwidth) && (but->ofs < 2))
- {
+ while ((but->strwidth > okwidth) && (but->ofs < 2)) {
ui_text_clip_give_next_off(but);
but->strwidth = BLF_width(fstyle->uifont_id, but->drawstr + but->ofs);
if (but->strwidth < 10) break;
@@ -2233,8 +2231,8 @@ int ui_link_bezier_points(rcti *rect, float coord_array[][2], int resol)
vec[2][0] = vec[3][0] - dist;
vec[2][1] = vec[3][1];
- forward_diff_bezier(vec[0][0], vec[1][0], vec[2][0], vec[3][0], coord_array[0], resol, sizeof(float) * 2);
- forward_diff_bezier(vec[0][1], vec[1][1], vec[2][1], vec[3][1], coord_array[0] + 1, resol, sizeof(float) * 2);
+ BKE_curve_forward_diff_bezier(vec[0][0], vec[1][0], vec[2][0], vec[3][0], coord_array[0], resol, sizeof(float) * 2);
+ BKE_curve_forward_diff_bezier(vec[0][1], vec[1][1], vec[2][1], vec[3][1], coord_array[0] + 1, resol, sizeof(float) * 2);
return 1;
}
@@ -3264,7 +3262,8 @@ void ui_draw_menu_back(uiStyle *UNUSED(style), uiBlock *block, rcti *rect)
}
}
-uiWidgetColors *ui_tooltip_get_theme(void) {
+uiWidgetColors *ui_tooltip_get_theme(void)
+{
uiWidgetType *wt = widget_type(UI_WTYPE_TOOLTIP);
return wt->wcol_theme;
}
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index 9f4a351c66d..1589bbc123f 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -1,5 +1,5 @@
/*
- * ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
+ * ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -864,6 +864,9 @@ void ui_theme_init_default(void)
rgba_char_args_set(btheme->tclip.cframe, 0x60, 0xc0, 0x40, 255);
rgba_char_args_set(btheme->tclip.handle_vertex, 0x00, 0x00, 0x00, 0xff);
rgba_char_args_set(btheme->tclip.handle_vertex_select, 0xff, 0xff, 0, 0xff);
+ rgba_char_args_set(btheme->tclip.list, 0x66, 0x66, 0x66, 0xff);
+ rgba_char_args_set(btheme->tclip.strip, 0x0c, 0x0a, 0x0a, 0x80);
+ rgba_char_args_set(btheme->tclip.strip_select, 0xff, 0x8c, 0x00, 0xff);
btheme->tclip.handle_vertex_size = 4;
}
@@ -1151,8 +1154,7 @@ void UI_ThemeClearColor(int colorid)
void UI_make_axis_color(const unsigned char src_col[3], unsigned char dst_col[3], const char axis)
{
- switch (axis)
- {
+ switch (axis) {
case 'X':
dst_col[0] = src_col[0] > 219 ? 255 : src_col[0] + 36;
dst_col[1] = src_col[1] < 26 ? 0 : src_col[1] - 26;
@@ -1776,6 +1778,17 @@ void init_userdef_do_versions(void)
}
}
+ if (bmain->versionfile < 263 || (bmain->versionfile == 263 && bmain->subversionfile < 2)) {
+ bTheme *btheme;
+ for (btheme = U.themes.first; btheme; btheme = btheme->next) {
+ if (btheme->tclip.strip[0] == 0) {
+ rgba_char_args_set(btheme->tclip.list, 0x66, 0x66, 0x66, 0xff);
+ rgba_char_args_set(btheme->tclip.strip, 0x0c, 0x0a, 0x0a, 0x80);
+ rgba_char_args_set(btheme->tclip.strip_select, 0xff, 0x8c, 0x00, 0xff);
+ }
+ }
+ }
+
/* GL Texture Garbage Collection (variable abused above!) */
if (U.textimeout == 0) {
U.texcollectrate = 60;
diff --git a/source/blender/editors/mesh/editface.c b/source/blender/editors/mesh/editface.c
index 294a39eddf8..5f6384d6b24 100644
--- a/source/blender/editors/mesh/editface.c
+++ b/source/blender/editors/mesh/editface.c
@@ -67,7 +67,7 @@
* use in object mode when selecting faces (while painting) */
void paintface_flush_flags(Object *ob)
{
- Mesh *me = get_mesh(ob);
+ Mesh *me = BKE_mesh_from_object(ob);
DerivedMesh *dm = ob->derivedFinal;
MPoly *polys, *mp_orig;
MFace *faces;
@@ -166,7 +166,7 @@ void paintface_hide(Object *ob, const int unselected)
MPoly *mpoly;
int a;
- me = get_mesh(ob);
+ me = BKE_mesh_from_object(ob);
if (me == NULL || me->totpoly == 0) return;
mpoly = me->mpoly;
@@ -195,7 +195,7 @@ void paintface_reveal(Object *ob)
MPoly *mpoly;
int a;
- me = get_mesh(ob);
+ me = BKE_mesh_from_object(ob);
if (me == NULL || me->totpoly == 0) return;
mpoly = me->mpoly;
@@ -325,7 +325,7 @@ void paintface_select_linked(bContext *UNUSED(C), Object *ob, int UNUSED(mval[2]
Mesh *me;
unsigned int index = 0;
- me = get_mesh(ob);
+ me = BKE_mesh_from_object(ob);
if (me == NULL || me->totpoly == 0) return;
if (mode == 0 || mode == 1) {
@@ -347,7 +347,7 @@ void paintface_deselect_all_visible(Object *ob, int action, short flush_flags)
MPoly *mpoly;
int a;
- me = get_mesh(ob);
+ me = BKE_mesh_from_object(ob);
if (me == NULL) return;
if (action == SEL_INVERT) {
@@ -400,17 +400,17 @@ void paintface_deselect_all_visible(Object *ob, int action, short flush_flags)
}
}
-int paintface_minmax(Object *ob, float *min, float *max)
+int paintface_minmax(Object *ob, float r_min[3], float r_max[3])
{
Mesh *me;
MPoly *mp;
MTexPoly *tf;
MLoop *ml;
MVert *mvert;
- int a, b, ok = 0;
+ int a, b, ok = FALSE;
float vec[3], bmat[3][3];
- me = get_mesh(ob);
+ me = BKE_mesh_from_object(ob);
if (!me || !me->mtpoly) return ok;
copy_m3_m4(bmat, ob->obmat);
@@ -427,10 +427,10 @@ int paintface_minmax(Object *ob, float *min, float *max)
copy_v3_v3(vec, (mvert[ml->v].co));
mul_m3_v3(bmat, vec);
add_v3_v3v3(vec, vec, ob->obmat[3]);
- DO_MINMAX(vec, min, max);
+ DO_MINMAX(vec, r_min, r_max);
}
- ok = 1;
+ ok = TRUE;
}
return ok;
@@ -459,7 +459,7 @@ void seam_mark_clear_tface(Scene *scene, short mode)
MEdge *med;
int a, b;
- me = get_mesh(OBACT);
+ me = BKE_mesh_from_object(OBACT);
if (me == 0 || me->totpoly == 0) return;
if (mode == 0)
@@ -516,7 +516,7 @@ int paintface_mouse_select(struct bContext *C, Object *ob, const int mval[2], in
unsigned int a, index;
/* Get the face under the cursor */
- me = get_mesh(ob);
+ me = BKE_mesh_from_object(ob);
if (!facesel_face_pick(C, me, ob, mval, &index, 1))
return 0;
@@ -567,7 +567,7 @@ int do_paintface_box_select(ViewContext *vc, rcti *rect, int select, int extend)
int sx = rect->xmax - rect->xmin + 1;
int sy = rect->ymax - rect->ymin + 1;
- me = get_mesh(ob);
+ me = BKE_mesh_from_object(ob);
if (me == NULL || me->totpoly == 0 || sx * sy <= 0)
return OPERATOR_CANCELLED;
@@ -629,7 +629,7 @@ int do_paintface_box_select(ViewContext *vc, rcti *rect, int select, int extend)
* use in object mode when selecting vertices (while painting) */
void paintvert_flush_flags(Object *ob)
{
- Mesh *me = get_mesh(ob);
+ Mesh *me = BKE_mesh_from_object(ob);
DerivedMesh *dm = ob->derivedFinal;
MVert *dm_mvert, *dm_mv;
int *index_array = NULL;
@@ -668,7 +668,7 @@ void paintvert_deselect_all_visible(Object *ob, int action, short flush_flags)
MVert *mvert;
int a;
- me = get_mesh(ob);
+ me = BKE_mesh_from_object(ob);
if (me == NULL) return;
if (action == SEL_INVERT) {
diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c
index c2a97b3ea70..60c0ebbc7b3 100644
--- a/source/blender/editors/mesh/editmesh_add.c
+++ b/source/blender/editors/mesh/editmesh_add.c
@@ -475,7 +475,7 @@ static int add_primitive_monkey_exec(bContext *C, wmOperator *op)
ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, &view_aligned);
if (!view_aligned)
- rot[0] += M_PI / 2.0f;
+ rot[0] += (float)M_PI / 2.0f;
make_prim_init(C, "Monkey", &dia, mat, &state, loc, rot, layer);
diff --git a/source/blender/editors/mesh/editmesh_bvh.c b/source/blender/editors/mesh/editmesh_bvh.c
index 6155ad1be1c..6d740812f27 100644
--- a/source/blender/editors/mesh/editmesh_bvh.c
+++ b/source/blender/editors/mesh/editmesh_bvh.c
@@ -239,7 +239,8 @@ static void raycallback(void *userdata, int index, const BVHTreeRay *ray, BVHTre
}
}
-BMFace *BMBVH_RayCast(BMBVHTree *tree, float *co, float *dir, float *hitout, float *cagehit)
+BMFace *BMBVH_RayCast(BMBVHTree *tree, const float co[3], const float dir[3],
+ float r_hitout[3], float r_cagehit[3])
{
BVHTreeRayHit hit;
@@ -250,10 +251,9 @@ BMFace *BMBVH_RayCast(BMBVHTree *tree, float *co, float *dir, float *hitout, flo
BLI_bvhtree_ray_cast(tree->tree, co, dir, 0.0f, &hit, raycallback, tree);
if (hit.dist != FLT_MAX && hit.index != -1) {
- if (hitout) {
+ if (r_hitout) {
if (tree->flag & BMBVH_RETURN_ORIG) {
BMVert *v1, *v2, *v3;
- float co[3];
int i;
v1 = tree->em->looptris[hit.index][0]->v;
@@ -261,17 +261,17 @@ BMFace *BMBVH_RayCast(BMBVHTree *tree, float *co, float *dir, float *hitout, flo
v3 = tree->em->looptris[hit.index][2]->v;
for (i = 0; i < 3; i++) {
- co[i] = v1->co[i] + ((v2->co[i] - v1->co[i]) * tree->uv[0]) +
- ((v3->co[i] - v1->co[i]) * tree->uv[1]);
+ r_hitout[i] = v1->co[i] + ((v2->co[i] - v1->co[i]) * tree->uv[0]) +
+ ((v3->co[i] - v1->co[i]) * tree->uv[1]);
}
- copy_v3_v3(hitout, co);
}
else {
- copy_v3_v3(hitout, hit.co);
+ copy_v3_v3(r_hitout, hit.co);
}
- if (cagehit)
- copy_v3_v3(cagehit, hit.co);
+ if (r_cagehit) {
+ copy_v3_v3(r_cagehit, hit.co);
+ }
}
return tree->em->looptris[hit.index][0]->f;
diff --git a/source/blender/editors/mesh/editmesh_bvh.h b/source/blender/editors/mesh/editmesh_bvh.h
index e2b45062e41..6512f054c1b 100644
--- a/source/blender/editors/mesh/editmesh_bvh.h
+++ b/source/blender/editors/mesh/editmesh_bvh.h
@@ -50,13 +50,12 @@ struct BMBVHTree *BMBVH_NewBVH(struct BMEditMesh *em, int flag, struct Scene *sc
void BMBVH_FreeBVH(struct BMBVHTree *tree);
struct BVHTree *BMBVH_BVHTree(struct BMBVHTree *tree);
-struct BMFace *BMBVH_RayCast(struct BMBVHTree *tree, float *co, float *dir, float *hitout, float *cagehit);
+struct BMFace *BMBVH_RayCast(struct BMBVHTree *tree, const float co[3], const float dir[3],
+ float r_hitout[3], float r_cagehit[3]);
int BMBVH_EdgeVisible(struct BMBVHTree *tree, struct BMEdge *e,
struct ARegion *ar, struct View3D *v3d, struct Object *obedit);
-#define BM_SEARCH_MAXDIST 0.4f
-
/*find a vert closest to co in a sphere of radius maxdist*/
struct BMVert *BMBVH_FindClosestVert(struct BMBVHTree *tree, float *co, float maxdist);
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index 0ace06b1a1a..5a99ddb9332 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -277,7 +277,7 @@ static void knife_add_to_vert_edges(KnifeTool_OpData *kcd, KnifeEdge *kfe)
knife_append_list(kcd, &kfe->v2->edges, kfe);
}
-static KnifeVert *new_knife_vert(KnifeTool_OpData *kcd, float *co, float *cageco)
+static KnifeVert *new_knife_vert(KnifeTool_OpData *kcd, const float co[3], float *cageco)
{
KnifeVert *kfv = BLI_mempool_calloc(kcd->kverts);
@@ -1412,7 +1412,7 @@ static KnifeEdge *knife_find_closest_edge(KnifeTool_OpData *kcd, float p[3], flo
float co[3], cageco[3], sco[3], maxdist = knife_snap_size(kcd, kcd->ethresh);
if (kcd->ignore_vert_snapping)
- maxdist *= 0.5;
+ maxdist *= 0.5f;
f = knife_find_closest_face(kcd, co, cageco, NULL);
*is_space = !f;
@@ -1502,7 +1502,7 @@ static KnifeVert *knife_find_closest_vert(KnifeTool_OpData *kcd, float p[3], flo
float co[3], cageco[3], sco[3], maxdist = knife_snap_size(kcd, kcd->vthresh);
if (kcd->ignore_vert_snapping)
- maxdist *= 0.5;
+ maxdist *= 0.5f;
f = knife_find_closest_face(kcd, co, cageco, is_space);
@@ -1877,11 +1877,11 @@ static void knifenet_fill_faces(KnifeTool_OpData *kcd)
if (face_nets[i].first)
BMO_elem_flag_enable(bm, f, DEL);
- BLI_begin_edgefill(&sf_ctx);
+ BLI_scanfill_begin(&sf_ctx);
for (entry = face_nets[i].first; entry; entry = entry->next) {
if (!BLI_smallhash_haskey(hash, (intptr_t)entry->kfe->v1)) {
- eve = BLI_addfillvert(&sf_ctx, entry->kfe->v1->v->co);
+ eve = BLI_scanfill_vert_add(&sf_ctx, entry->kfe->v1->v->co);
eve->poly_nr = 0;
rnd_offset_co(eve->co, rndscale);
eve->tmp.p = entry->kfe->v1->v;
@@ -1889,7 +1889,7 @@ static void knifenet_fill_faces(KnifeTool_OpData *kcd)
}
if (!BLI_smallhash_haskey(hash, (intptr_t)entry->kfe->v2)) {
- eve = BLI_addfillvert(&sf_ctx, entry->kfe->v2->v->co);
+ eve = BLI_scanfill_vert_add(&sf_ctx, entry->kfe->v2->v->co);
eve->poly_nr = 0;
rnd_offset_co(eve->co, rndscale);
eve->tmp.p = entry->kfe->v2->v;
@@ -1911,7 +1911,7 @@ static void knifenet_fill_faces(KnifeTool_OpData *kcd)
if (eve->poly_nr > 1 && lasteve->poly_nr > 1) {
ScanFillEdge *eed;
- eed = BLI_addfilledge(&sf_ctx, lasteve, eve);
+ eed = BLI_scanfill_edge_add(&sf_ctx, lasteve, eve);
if (entry->kfe->oe)
eed->f = SF_EDGE_BOUNDARY; /* mark as original boundary edge */
@@ -1926,7 +1926,7 @@ static void knifenet_fill_faces(KnifeTool_OpData *kcd)
}
}
- BLI_edgefill(&sf_ctx, FALSE);
+ BLI_scanfill_calc(&sf_ctx, FALSE);
for (efa = sf_ctx.fillfacebase.first; efa; efa = efa->next) {
BMVert *v1 = efa->v3->tmp.p, *v2 = efa->v2->tmp.p, *v3 = efa->v1->tmp.p;
@@ -1959,7 +1959,7 @@ static void knifenet_fill_faces(KnifeTool_OpData *kcd)
}
}
- BLI_end_edgefill(&sf_ctx);
+ BLI_scanfill_end(&sf_ctx);
BLI_smallhash_release(hash);
}
bm->elem_index_dirty |= BM_FACE;
@@ -2684,6 +2684,7 @@ static void knifetool_finish(bContext *C, wmOperator *op)
knife_make_cuts(kcd);
#endif
+ EDBM_mesh_normals_update(kcd->em);
EDBM_update_generic(C, kcd->em, TRUE);
}
@@ -2721,10 +2722,6 @@ static void knifetool_exit(bContext *C, wmOperator *op)
WM_cursor_restore(CTX_wm_window(C));
- /* remember setting for later */
- RNA_boolean_set(op->ptr, "use_occlude_geometry", !kcd->cut_through);
- WM_operator_last_properties_store(op); /* XXX - this is clunky but modal ops wont do this automatic */
-
/* deactivate the extra drawing stuff in 3D-View */
ED_region_draw_cb_exit(kcd->ar->type, kcd->draw_handle);
@@ -2746,6 +2743,9 @@ static void knifetool_exit(bContext *C, wmOperator *op)
if (kcd->cagecos)
MEM_freeN(kcd->cagecos);
+ if (kcd->linehits)
+ MEM_freeN(kcd->linehits);
+
/* destroy kcd itself */
MEM_freeN(kcd);
op->customdata = NULL;
@@ -2785,7 +2785,7 @@ static int knifetool_init(bContext *C, wmOperator *op, int UNUSED(do_cut))
DerivedMesh *cage, *final;
SmallHash shash;
void *data[3];
- const short only_select = RNA_boolean_get(op->ptr, "only_select");
+ const short only_select = RNA_boolean_get(op->ptr, "only_selected");
/* alloc new customdata */
kcd = op->customdata = MEM_callocN(sizeof(KnifeTool_OpData), "knifetool Modal Op Data");
@@ -3086,5 +3086,5 @@ void MESH_OT_knife_tool(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING;
RNA_def_boolean(ot->srna, "use_occlude_geometry", TRUE, "Occlude Geometry", "Only cut the front most geometry");
- RNA_def_boolean(ot->srna, "only_select", FALSE, "Only Selected", "Only cut selected geometry");
+ RNA_def_boolean(ot->srna, "only_selected", FALSE, "Only Selected", "Only cut selected geometry");
}
diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c
index d7201394855..0b65cce20d7 100644
--- a/source/blender/editors/mesh/editmesh_loopcut.c
+++ b/source/blender/editors/mesh/editmesh_loopcut.c
@@ -240,7 +240,7 @@ static void edgering_sel(tringselOpData *lcd, int previewlines, int select)
edgering_find_order(lasteed, eed, lastv1, v);
lastv1 = v[0][0];
- BLI_array_growitems(edges, previewlines);
+ BLI_array_grow_items(edges, previewlines);
for (i = 1; i <= previewlines; i++) {
co[0][0] = (v[0][1]->co[0] - v[0][0]->co[0]) * (i / ((float)previewlines + 1)) + v[0][0]->co[0];
@@ -265,7 +265,7 @@ static void edgering_sel(tringselOpData *lcd, int previewlines, int select)
edgering_find_order(lasteed, startedge, lastv1, v);
- BLI_array_growitems(edges, previewlines);
+ BLI_array_grow_items(edges, previewlines);
for (i = 1; i <= previewlines; i++) {
if (!v[0][0] || !v[0][1] || !v[1][0] || !v[1][1])
@@ -314,7 +314,7 @@ static void ringsel_finish(bContext *C, wmOperator *op)
if (lcd->do_cut) {
BM_mesh_esubdivide(em->bm, BM_ELEM_SELECT,
- 0.0f, 0.0f,
+ 0.0f, 0.0f, 0.0f,
cuts,
SUBDIV_SELECT_LOOPCUT, SUBD_PATH, 0, FALSE, 0);
@@ -337,9 +337,9 @@ static void ringsel_finish(bContext *C, wmOperator *op)
/* sets as active, useful for other tools */
if (em->selectmode & SCE_SELECT_VERTEX)
- EDBM_editselection_store(em, &lcd->eed->v1->head); /* low priority TODO, get vertrex close to mouse */
+ BM_select_history_store(em->bm, lcd->eed->v1); /* low priority TODO, get vertrex close to mouse */
if (em->selectmode & SCE_SELECT_EDGE)
- EDBM_editselection_store(em, &lcd->eed->head);
+ BM_select_history_store(em->bm, lcd->eed);
EDBM_selectmode_flush(lcd->em);
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, lcd->ob->data);
diff --git a/source/blender/editors/mesh/editmesh_rip.c b/source/blender/editors/mesh/editmesh_rip.c
index 15e77458e5e..b74e8797d72 100644
--- a/source/blender/editors/mesh/editmesh_rip.c
+++ b/source/blender/editors/mesh/editmesh_rip.c
@@ -56,7 +56,8 @@
#include "mesh_intern.h"
/* helper to find edge for edge_rip */
-static float edbm_rip_rip_edgedist(ARegion *ar, float mat[][4], float *co1, float *co2, const float mvalf[2])
+static float edbm_rip_rip_edgedist(ARegion *ar, float mat[][4],
+ const float co1[3], const float co2[2], const float mvalf[2])
{
float vec1[3], vec2[3];
@@ -111,9 +112,9 @@ static float edbm_rip_edge_side_measure(BMEdge *e, BMLoop *e_l,
score = len_v2v2(e_v1_co, e_v2_co);
if (dist_to_line_segment_v2(fmval_tweak, e_v1_co, e_v2_co) >
- dist_to_line_segment_v2(fmval, e_v1_co, e_v2_co))
+ dist_to_line_segment_v2(fmval, e_v1_co, e_v2_co))
{
- return score;
+ return score;
}
else {
return -score;
@@ -262,7 +263,7 @@ static EdgeLoopPair *edbm_ripsel_looptag_helper(BMesh *bm)
uid_start = uid;
uid = uid_end + bm->totedge;
- BLI_array_growone(eloop_pairs);
+ BLI_array_grow_one(eloop_pairs);
lp = &eloop_pairs[BLI_array_count(eloop_pairs) - 1];
BM_edge_loop_pair(e_last, &lp->l_a, &lp->l_b); /* no need to check, we know this will be true */
@@ -276,7 +277,7 @@ static EdgeLoopPair *edbm_ripsel_looptag_helper(BMesh *bm)
}
/* null terminate */
- BLI_array_growone(eloop_pairs);
+ BLI_array_grow_one(eloop_pairs);
lp = &eloop_pairs[BLI_array_count(eloop_pairs) - 1];
lp->l_a = lp->l_b = NULL;
@@ -347,7 +348,7 @@ static int edbm_rip_call_edgesplit(BMEditMesh *em, wmOperator *op)
BMOperator bmop;
if (!EDBM_op_init(em, &bmop, op, "edgesplit edges=%he verts=%hv use_verts=%b",
- BM_ELEM_TAG, BM_ELEM_SELECT, TRUE)) {
+ BM_ELEM_TAG, BM_ELEM_SELECT, TRUE)) {
return FALSE;
}
BMO_op_exec(em->bm, &bmop);
@@ -384,7 +385,7 @@ static int edbm_rip_invoke__vert(bContext *C, wmOperator *op, wmEvent *event)
ED_view3d_ob_project_mat_get(rv3d, obedit, projectMat);
/* find selected vert - same some time and check history first */
- if (EDBM_editselection_active_get(em, &ese) && ese.htype == BM_VERT) {
+ if (BM_select_history_active_get(em->bm, &ese) && ese.htype == BM_VERT) {
v = (BMVert *)ese.ele;
}
else {
@@ -450,7 +451,7 @@ static int edbm_rip_invoke__vert(bContext *C, wmOperator *op, wmEvent *event)
int vi_best = 0;
if (ese.ele) {
- EDBM_editselection_remove(em, &ese.ele->head);
+ BM_select_history_remove(em->bm, ese.ele);
}
dist = FLT_MAX;
@@ -480,7 +481,7 @@ static int edbm_rip_invoke__vert(bContext *C, wmOperator *op, wmEvent *event)
BM_vert_select_set(bm, v, TRUE);
if (ese.ele) {
- EDBM_editselection_store(em, &v->head);
+ BM_select_history_store(em->bm, v);
}
/* splice all others back together */
@@ -573,7 +574,7 @@ static int edbm_rip_invoke__vert(bContext *C, wmOperator *op, wmEvent *event)
if (v_best) {
BM_vert_select_set(bm, v_best, TRUE);
if (ese.ele) {
- EDBM_editselection_store(em, &v_best->head);
+ BM_select_history_store(em->bm, v_best);
}
}
}
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c
index 6c3984f0979..2d403d03fb2 100644
--- a/source/blender/editors/mesh/editmesh_select.c
+++ b/source/blender/editors/mesh/editmesh_select.c
@@ -150,7 +150,7 @@ static void draw_triangulated(int mcords[][2], short tot)
}
/* do the fill */
- filldisplist(&lb, &lb, 0);
+ BKE_displist_fill(&lb, &lb, 0);
/* do the draw */
dl = lb.first; /* filldisplist adds in head of list */
@@ -170,7 +170,7 @@ static void draw_triangulated(int mcords[][2], short tot)
glEnd();
}
- freedisplist(&lb);
+ BKE_displist_free(&lb);
}
@@ -1049,10 +1049,10 @@ static void mouse_mesh_loop(bContext *C, int mval[2], short extend, short ring)
/* TODO: would be nice if the edge vertex chosen here
* was the one closer to the selection pointer, instead
* of arbitrarily selecting the first one */
- EDBM_editselection_store(em, &eed->v1->head);
+ BM_select_history_store(em->bm, eed->v1);
}
else if (em->selectmode & SCE_SELECT_EDGE) {
- EDBM_editselection_store(em, &eed->head);
+ BM_select_history_store(em->bm, eed);
}
/* TODO: would be nice if the nearest face that
* belongs to the selected edge could be set to
@@ -1129,7 +1129,7 @@ static float edgetag_cut_cost(BMEditMesh *UNUSED(em), BMEdge *e1, BMEdge *e2, BM
/* but is biased to give higher values to sharp turns, so that it will take
* paths with fewer "turns" when selecting between equal-weighted paths between
* the two edges */
- cost = cost + 0.5f * cost * (2.0f - sqrt(fabs(dot_v3v3(d1, d2))));
+ cost = cost + 0.5f * cost * (2.0f - sqrtf(fabsf(dot_v3v3(d1, d2))));
return cost;
}
@@ -1364,7 +1364,7 @@ static int mouse_mesh_shortest_path(bContext *C, int mval[2])
e_act = (BMEdge *)ese->ele;
if (e_act != e) {
if (edgetag_shortest_path(vc.scene, em, e_act, e)) {
- EDBM_editselection_remove(em, &e_act->head);
+ BM_select_history_remove(em->bm, e_act);
path = 1;
}
}
@@ -1379,9 +1379,9 @@ static int mouse_mesh_shortest_path(bContext *C, int mval[2])
/* even if this is selected it may not be in the selection list */
if (edgetag_context_check(vc.scene, em, e) == 0)
- EDBM_editselection_remove(em, &e->head);
+ BM_select_history_remove(em->bm, e);
else
- EDBM_editselection_store(em, &e->head);
+ BM_select_history_store(em->bm, e);
/* force drawmode for mesh */
switch (CTX_data_tool_settings(C)->edge_mode) {
@@ -1476,31 +1476,31 @@ int mouse_mesh(bContext *C, const int mval[2], short extend)
BM_active_face_set(vc.em->bm, efa);
if (!BM_elem_flag_test(efa, BM_ELEM_SELECT)) {
- EDBM_editselection_store(vc.em, &efa->head);
+ BM_select_history_store(vc.em->bm, efa);
BM_face_select_set(vc.em->bm, efa, TRUE);
}
else if (extend) {
- EDBM_editselection_remove(vc.em, &efa->head);
+ BM_select_history_remove(vc.em->bm, efa);
BM_face_select_set(vc.em->bm, efa, FALSE);
}
}
else if (eed) {
if (!BM_elem_flag_test(eed, BM_ELEM_SELECT)) {
- EDBM_editselection_store(vc.em, &eed->head);
+ BM_select_history_store(vc.em->bm, eed);
BM_edge_select_set(vc.em->bm, eed, TRUE);
}
else if (extend) {
- EDBM_editselection_remove(vc.em, &eed->head);
+ BM_select_history_remove(vc.em->bm, eed);
BM_edge_select_set(vc.em->bm, eed, FALSE);
}
}
else if (eve) {
if (!BM_elem_flag_test(eve, BM_ELEM_SELECT)) {
- EDBM_editselection_store(vc.em, &eve->head);
+ BM_select_history_store(vc.em->bm, eve);
BM_vert_select_set(vc.em->bm, eve, TRUE);
}
else if (extend) {
- EDBM_editselection_remove(vc.em, &eve->head);
+ BM_select_history_remove(vc.em->bm, eve);
BM_vert_select_set(vc.em->bm, eve, FALSE);
}
}
@@ -1512,7 +1512,7 @@ int mouse_mesh(bContext *C, const int mval[2], short extend)
vc.obedit->actcol = efa->mat_nr + 1;
vc.em->mat_nr = efa->mat_nr;
- WM_event_add_notifier(C, NC_MATERIAL|ND_SHADING, NULL);
+ WM_event_add_notifier(C, NC_MATERIAL | ND_SHADING, NULL);
}
@@ -2294,7 +2294,7 @@ static int edbm_select_linked_flat_faces_exec(bContext *C, wmOperator *op)
float sharp = RNA_float_get(op->ptr, "sharpness");
int i;
- sharp = (sharp * M_PI) / 180.0;
+ sharp = (sharp * (float)M_PI) / 180.0f;
BM_ITER_MESH (f, &iter, em->bm, BM_FACES_OF_MESH) {
BM_elem_flag_disable(f, BM_ELEM_TAG);
@@ -2307,7 +2307,7 @@ static int edbm_select_linked_flat_faces_exec(bContext *C, wmOperator *op)
BLI_array_empty(stack);
i = 1;
- BLI_array_growone(stack);
+ BLI_array_grow_one(stack);
stack[i - 1] = f;
while (i) {
@@ -2330,7 +2330,7 @@ static int edbm_select_linked_flat_faces_exec(bContext *C, wmOperator *op)
/* invalidate: edge too sharp */
if (angle < sharp) {
- BLI_array_growone(stack);
+ BLI_array_grow_one(stack);
stack[i] = l2->f;
i++;
}
diff --git a/source/blender/editors/mesh/editmesh_slide.c b/source/blender/editors/mesh/editmesh_slide.c
index 44f7c388a74..a86a274eb70 100644
--- a/source/blender/editors/mesh/editmesh_slide.c
+++ b/source/blender/editors/mesh/editmesh_slide.c
@@ -88,7 +88,7 @@ typedef struct VertexSlideOp {
int disk_edges;
/* Edges */
- BMEdge** edge_frame;
+ BMEdge **edge_frame;
/* Slide Frame Endpoints */
float (*vtx_frame)[3];
@@ -194,7 +194,7 @@ static void vtx_slide_confirm(bContext *C, wmOperator *op)
{
VertexSlideOp *vso = op->customdata;
BMEditMesh *em = BMEdit_FromObject(vso->obj);
- BMesh* bm = em->bm;
+ BMesh *bm = em->bm;
/* Select new edge */
BM_edge_select_set(bm, vso->sel_edge, TRUE);
@@ -204,7 +204,7 @@ static void vtx_slide_confirm(bContext *C, wmOperator *op)
if (vso->snap_n_merge) {
float other_d;
- BMVert* other = BM_edge_other_vert(vso->sel_edge, vso->start_vtx);
+ BMVert *other = BM_edge_other_vert(vso->sel_edge, vso->start_vtx);
other_d = len_v3v3(vso->interp, other->co);
/* Only snap if within threshold */
@@ -216,13 +216,13 @@ static void vtx_slide_confirm(bContext *C, wmOperator *op)
}
else {
/* Store in historty if not merging */
- EDBM_editselection_store(em, &vso->start_vtx->head);
+ BM_select_history_store(em->bm, vso->start_vtx);
}
}
else {
/* Store edit selection of the active vertex, allows other
* ops to run without reselecting */
- EDBM_editselection_store(em, &vso->start_vtx->head);
+ BM_select_history_store(em->bm, vso->start_vtx);
}
EDBM_selectmode_flush(em);
@@ -279,7 +279,7 @@ static void vtx_slide_draw(const bContext *C, ARegion *UNUSED(ar), void *arg)
/* Get 3d view */
View3D *view3d = CTX_wm_view3d(C);
const float outline_w = UI_GetThemeValuef(TH_OUTLINE_WIDTH) + 0.8f;
- const float pt_size = UI_GetThemeValuef(TH_FACEDOT_SIZE) + 1.5;
+ const float pt_size = UI_GetThemeValuef(TH_FACEDOT_SIZE) + 1.5f;
int i = 0;
@@ -339,12 +339,12 @@ static void vtx_slide_draw(const bContext *C, ARegion *UNUSED(ar), void *arg)
}
}
-static BMEdge* vtx_slide_nrst_in_frame(VertexSlideOp *vso, const float mval[2])
+static BMEdge *vtx_slide_nrst_in_frame(VertexSlideOp *vso, const float mval[2])
{
- BMEdge* cl_edge = NULL;
+ BMEdge *cl_edge = NULL;
if (vso->disk_edges > 0) {
int i = 0;
- BMEdge* edge = NULL;
+ BMEdge *edge = NULL;
float v1_proj[3], v2_proj[3];
float dist = 0;
@@ -481,7 +481,7 @@ static int vtx_slide_set_frame(VertexSlideOp *vso)
{
BMEdge *edge;
float (*vtx_frame)[3] = NULL;
- BMEdge** edge_frame = NULL;
+ BMEdge **edge_frame = NULL;
BMVert *curr_vert = NULL;
BLI_array_declare(vtx_frame);
BLI_array_declare(edge_frame);
@@ -505,7 +505,7 @@ static int vtx_slide_set_frame(VertexSlideOp *vso)
BM_ITER_ELEM_INDEX (edge, &iter, sel_vtx, BM_EDGES_OF_VERT, idx) {
curr_vert = BM_edge_other_vert(edge, sel_vtx);
if (curr_vert) {
- BLI_array_growone(vtx_frame);
+ BLI_array_grow_one(vtx_frame);
copy_v3_v3(vtx_frame[idx], curr_vert->co);
@@ -577,6 +577,7 @@ static int edbm_vertex_slide_modal(bContext *C, wmOperator *op, wmEvent *event)
break;
}
case RIGHTMOUSE:
+ case ESCKEY:
{
/* Enforce redraw */
ED_region_tag_redraw(vso->active_region);
@@ -664,8 +665,8 @@ static int edbm_vertex_slide_exec(bContext *C, wmOperator *op)
BM_edge_select_set(bm, vso->sel_edge, TRUE);
BM_vert_select_set(bm, vso->start_vtx, TRUE);
- EDBM_editselection_store(em, &vso->sel_edge->head);
- EDBM_editselection_store(em, &vso->start_vtx->head);
+ BM_select_history_store(em->bm, vso->sel_edge);
+ BM_select_history_store(em->bm, vso->start_vtx);
ese = (BMEditSelection *)em->bm->selected.last;
}
distance_t = vso->distance;
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 005947ce49b..2f317ed87c2 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -66,6 +66,8 @@
#include "RE_render_ext.h"
+#include "UI_interface.h"
+
#include "mesh_intern.h"
/* allow accumulated normals to form a new direction but don't
@@ -87,6 +89,7 @@ static int edbm_subdivide_exec(bContext *C, wmOperator *op)
int cuts = RNA_int_get(op->ptr, "number_cuts");
float smooth = 0.292f * RNA_float_get(op->ptr, "smoothness");
float fractal = RNA_float_get(op->ptr, "fractal") / 2.5f;
+ float along_normal = RNA_float_get(op->ptr, "fractal_along_normal");
if (RNA_boolean_get(op->ptr, "quadtri") &&
RNA_enum_get(op->ptr, "quadcorner") == SUBD_STRAIGHT_CUT)
@@ -95,7 +98,7 @@ static int edbm_subdivide_exec(bContext *C, wmOperator *op)
}
BM_mesh_esubdivide(em->bm, BM_ELEM_SELECT,
- smooth, fractal,
+ smooth, fractal, along_normal,
cuts,
SUBDIV_SELECT_ORIG, RNA_enum_get(op->ptr, "quadcorner"),
RNA_boolean_get(op->ptr, "quadtri"), TRUE,
@@ -143,6 +146,7 @@ void MESH_OT_subdivide(wmOperatorType *ot)
"Quad Corner Type", "How to subdivide quad corners (anything other than Straight Cut will prevent ngons)");
RNA_def_float(ot->srna, "fractal", 0.0f, 0.0f, FLT_MAX, "Fractal", "Fractal randomness factor", 0.0f, 1000.0f);
+ RNA_def_float(ot->srna, "fractal_along_normal", 0.0f, 0.0f, 1.0f, "Along Normal", "Apply fractal displacement along normal only", 0.0f, 1.0f);
RNA_def_int(ot->srna, "seed", 0, 0, 10000, "Random Seed", "Seed for the random number generator", 0, 50);
}
@@ -483,7 +487,7 @@ static int edbm_extrude_mesh(Scene *scene, Object *obedit, BMEditMesh *em, wmOpe
* automatically building this data if invalid. Or something.
*/
// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- object_handle_update(scene, obedit);
+ BKE_object_handle_update(scene, obedit);
/* individual faces? */
// BIF_TransformSetUndo("Extrude");
@@ -612,7 +616,7 @@ static int edbm_extrude_faces_exec(bContext *C, wmOperator *op)
edbm_extrude_face_indiv(em, op, BM_ELEM_SELECT, nor);
- WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit);
+ EDBM_update_generic(C, em, TRUE);
return OPERATOR_FINISHED;
}
@@ -896,7 +900,7 @@ static EnumPropertyItem prop_mesh_delete_types[] = {
{0, "VERT", 0, "Vertices", ""},
{1, "EDGE", 0, "Edges", ""},
{2, "FACE", 0, "Faces", ""},
- {3, "EDGE_FACE", 0, "Edges & Faces", ""},
+ {3, "EDGE_FACE", 0, "Only Edges & Faces", ""},
{4, "ONLY_FACE", 0, "Only Faces", ""},
{0, NULL, 0, NULL, NULL}
};
@@ -927,7 +931,9 @@ static int edbm_delete_exec(bContext *C, wmOperator *op)
//"Erase Only Faces";
if (!EDBM_op_callf(em, op, "del geom=%hf context=%i",
BM_ELEM_SELECT, DEL_ONLYFACES))
+ {
return OPERATOR_CANCELLED;
+ }
}
EDBM_flag_disable_all(em, BM_ELEM_SELECT);
@@ -1021,8 +1027,7 @@ static int edbm_add_edge_face__smooth_get(BMesh *bm)
unsigned int vote_on_smooth[2] = {0, 0};
BM_ITER_MESH (e, &iter, bm, BM_EDGES_OF_MESH) {
- if (BM_elem_flag_test(e, BM_ELEM_SELECT) && e->l)
- {
+ if (BM_elem_flag_test(e, BM_ELEM_SELECT) && e->l) {
vote_on_smooth[BM_elem_flag_test_bool(e->l->f, BM_ELEM_SMOOTH)]++;
}
}
@@ -1248,6 +1253,7 @@ void MESH_OT_edge_split(wmOperatorType *ot)
/* identifiers */
ot->name = "Edge Split";
ot->idname = "MESH_OT_edge_split";
+ ot->description = "Split selected edges so that each neighbor face gets its own copy";
/* api callbacks */
ot->exec = edbm_edge_split_exec;
@@ -2343,7 +2349,7 @@ static int edbm_select_axis_exec(bContext *C, wmOperator *op)
if (!BM_elem_flag_test(ev, BM_ELEM_HIDDEN)) {
switch (mode) {
case -1: /* aligned */
- if (fabs(ev->co[axis] - value) < limit)
+ if (fabsf(ev->co[axis] - value) < limit)
BM_vert_select_set(em->bm, ev, TRUE);
break;
case 0: /* neg */
@@ -2590,21 +2596,21 @@ static float bm_edge_seg_isect(BMEdge *e, CutCurve *c, int len, char mode,
m1 = MAXSLOPE;
b1 = x12;
}
- x2max = MAX2(x21, x22) + 0.001; /* prevent missed edges */
- x2min = MIN2(x21, x22) - 0.001; /* due to round off error */
- y2max = MAX2(y21, y22) + 0.001;
- y2min = MIN2(y21, y22) - 0.001;
+ x2max = MAX2(x21, x22) + 0.001f; /* prevent missed edges */
+ x2min = MIN2(x21, x22) - 0.001f; /* due to round off error */
+ y2max = MAX2(y21, y22) + 0.001f;
+ y2min = MIN2(y21, y22) - 0.001f;
/* Found an intersect, calc intersect point */
if (m1 == m2) { /* co-incident lines */
/* cut at 50% of overlap area */
x1max = MAX2(x11, x12);
x1min = MIN2(x11, x12);
- xi = (MIN2(x2max, x1max) + MAX2(x2min, x1min)) / 2.0;
+ xi = (MIN2(x2max, x1max) + MAX2(x2min, x1min)) / 2.0f;
y1max = MAX2(y11, y12);
y1min = MIN2(y11, y12);
- yi = (MIN2(y2max, y1max) + MAX2(y2min, y1min)) / 2.0;
+ yi = (MIN2(y2max, y1max) + MAX2(y2min, y1min)) / 2.0f;
}
else if (m2 == MAXSLOPE) {
xi = x22;
@@ -2679,7 +2685,8 @@ static int edbm_knife_cut_exec(bContext *C, wmOperator *op)
}
/* get the cut curve */
- RNA_BEGIN (op->ptr, itemptr, "path") {
+ RNA_BEGIN (op->ptr, itemptr, "path")
+ {
RNA_float_get_array(&itemptr, "loc", (float *)&curve[len]);
len++;
if (len >= MAX_CUTS) {
@@ -3056,6 +3063,7 @@ void MESH_OT_beautify_fill(wmOperatorType *ot)
/* identifiers */
ot->name = "Beautify Fill";
ot->idname = "MESH_OT_beautify_fill";
+ ot->description = "Rearrange some faces to try to get less degenerated geometry";
/* api callbacks */
ot->exec = edbm_beautify_fill_exec;
@@ -3122,10 +3130,22 @@ static int edbm_tris_convert_to_quads_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void MESH_OT_tris_convert_to_quads(wmOperatorType *ot)
+static void join_triangle_props(wmOperatorType *ot)
{
PropertyRNA *prop;
+ prop = RNA_def_float_rotation(ot->srna, "limit", 0, NULL, 0.0f, DEG2RADF(180.0f),
+ "Max Angle", "Angle Limit", 0.0f, DEG2RADF(180.0f));
+ RNA_def_property_float_default(prop, DEG2RADF(40.0f));
+
+ RNA_def_boolean(ot->srna, "uvs", 0, "Compare UVs", "");
+ RNA_def_boolean(ot->srna, "vcols", 0, "Compare VCols", "");
+ RNA_def_boolean(ot->srna, "sharp", 0, "Compare Sharp", "");
+ RNA_def_boolean(ot->srna, "materials", 0, "Compare Materials", "");
+}
+
+void MESH_OT_tris_convert_to_quads(wmOperatorType *ot)
+{
/* identifiers */
ot->name = "Tris to Quads";
ot->idname = "MESH_OT_tris_convert_to_quads";
@@ -3138,14 +3158,7 @@ void MESH_OT_tris_convert_to_quads(wmOperatorType *ot)
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
- prop = RNA_def_float_rotation(ot->srna, "limit", 0, NULL, 0.0f, DEG2RADF(180.0f),
- "Max Angle", "Angle Limit", 0.0f, DEG2RADF(180.0f));
- RNA_def_property_float_default(prop, DEG2RADF(40.0f));
-
- RNA_def_boolean(ot->srna, "uvs", 0, "Compare UVs", "");
- RNA_def_boolean(ot->srna, "vcols", 0, "Compare VCols", "");
- RNA_def_boolean(ot->srna, "sharp", 0, "Compare Sharp", "");
- RNA_def_boolean(ot->srna, "materials", 0, "Compare Materials", "");
+ join_triangle_props(ot);
}
static int edbm_dissolve_exec(bContext *C, wmOperator *op)
@@ -3196,11 +3209,45 @@ static int edbm_dissolve_limited_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
+ BMesh *bm = em->bm;
float angle_limit = RNA_float_get(op->ptr, "angle_limit");
+ char dissolve_flag;
+
+ if (em->selectmode == SCE_SELECT_FACE) {
+ /* flush selection to tags and untag edges/verts with partially selected faces */
+ BMIter iter;
+ BMIter liter;
+
+ BMElem *ele;
+ BMFace *f;
+ BMLoop *l;
+
+ BM_ITER_MESH (ele, &iter, bm, BM_VERTS_OF_MESH) {
+ BM_elem_flag_set(ele, BM_ELEM_TAG, BM_elem_flag_test(ele, BM_ELEM_SELECT));
+ }
+ BM_ITER_MESH (ele, &iter, bm, BM_EDGES_OF_MESH) {
+ BM_elem_flag_set(ele, BM_ELEM_TAG, BM_elem_flag_test(ele, BM_ELEM_SELECT));
+ }
+
+ BM_ITER_MESH (f, &iter, bm, BM_FACES_OF_MESH) {
+ if (!BM_elem_flag_test(f, BM_ELEM_SELECT)) {
+ BM_ITER_ELEM (l, &liter, f, BM_LOOPS_OF_FACE) {
+ BM_elem_flag_disable(l->v, BM_ELEM_TAG);
+ BM_elem_flag_disable(l->e, BM_ELEM_TAG);
+ }
+ }
+ }
+
+ dissolve_flag = BM_ELEM_TAG;
+ }
+ else {
+ dissolve_flag = BM_ELEM_SELECT;
+ }
+
if (!EDBM_op_callf(em, op,
"dissolve_limit edges=%he verts=%hv angle_limit=%f",
- BM_ELEM_SELECT, BM_ELEM_SELECT, angle_limit))
+ dissolve_flag, dissolve_flag, angle_limit))
{
return OPERATOR_CANCELLED;
}
@@ -3614,403 +3661,577 @@ void MESH_OT_select_mirror(wmOperatorType *ot)
RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend the existing selection");
}
-/* qsort routines. not sure how to make these
- * work, since we aren't using linked lists for
- * geometry anymore. might need a sort of "swap"
- * function for bmesh elements. */
+/******************************************************************************
+ * qsort routines.
+ * Now unified, for vertices/edges/faces. */
-/* TODO All this section could probably use a refresh...
- * face code works in object mode, does everything in one op, while vert uses several...
- */
-
-typedef struct xvertsort {
- int x; /* X screen-coordinate */
- int org_idx; /* Original index of this vertex _in the mempool_ */
-} xvertsort;
-
-
-static int vergxco(const void *v1, const void *v2)
-{
- const xvertsort *x1 = v1, *x2 = v2;
-
- /* We move unchanged vertices (org_idx < 0) at the begining of the sorted list. */
- if (x1->org_idx >= 0 && x2->org_idx >= 0)
- return (x1->x > x2->x) - (x1->x < x2->x);
- return (x2->org_idx < 0) - (x1->org_idx < 0);
-}
-
-#if 0 /* Unused */
-struct facesort {
- uintptr_t x;
- struct EditFace *efa;
+enum {
+ SRT_VIEW_ZAXIS = 1, /* Use view Z (deep) axis. */
+ SRT_VIEW_XAXIS, /* Use view X (left to right) axis. */
+ SRT_CURSOR_DISTANCE, /* Use distance from element to 3D cursor. */
+ SRT_MATERIAL, /* Face only: use mat number. */
+ SRT_SELECTED, /* Move selected elements in first, without modifying
+ * relative order of selected and unselected elements. */
+ SRT_RANDOMIZE, /* Randomize selected elements. */
+ SRT_REVERSE, /* Reverse current order of selected elements. */
};
-static int vergface(const void *v1, const void *v2)
-{
- const struct facesort *x1 = v1, *x2 = v2;
-
- if (x1->x > x2->x) return 1;
- else if (x1->x < x2->x) return -1;
- return 0;
-}
-#endif
+typedef struct bmelemsort {
+ float srt; /* Sort factor */
+ int org_idx; /* Original index of this element _in its mempool_ */
+} bmelemsort;
-static void xsortvert_flag__doSetX(void *userData, BMVert *UNUSED(eve), int x, int UNUSED(y), int index)
+static int bmelemsort_comp(const void *v1, const void *v2)
{
- xvertsort *sortblock = userData;
+ const bmelemsort *x1 = v1, *x2 = v2;
- sortblock[index].x = x;
+ return (x1->srt > x2->srt) - (x1->srt < x2->srt);
}
-/* all verts with (flag & 'flag') are sorted */
-static void xsortvert_flag(bContext *C, int flag)
+/* Reorders vertices/edges/faces using a given methods. Loops are not supported. */
+static void sort_bmelem_flag(bContext *C, const int types, const int flag, const int action,
+ const int reverse, const unsigned int seed)
{
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = CTX_data_edit_object(C);
ViewContext vc;
BMEditMesh *em;
BMVert *ve;
+ BMEdge *ed;
+ BMFace *fa;
BMIter iter;
- xvertsort *sortblock;
- int *unchangedblock, *vmap;
- int totvert, sorted = 0, unchanged = 0, i;
+
+ /* In all five elements below, 0 = vertices, 1 = edges, 2 = faces. */
+ /* Just to mark protected elements. */
+ char *pblock[3] = {NULL, NULL, NULL}, *pb;
+ bmelemsort *sblock[3] = {NULL, NULL, NULL}, *sb;
+ int *map[3] = {NULL, NULL, NULL}, *mp;
+ int totelem[3] = {0, 0, 0}, tot;
+ int affected[3] = {0, 0, 0}, aff;
+ int i, j;
+
+ if (!(types && flag && action))
+ return;
em_setup_viewcontext(C, &vc);
em = vc.em;
- totvert = em->bm->totvert;
+ if (types & BM_VERT)
+ totelem[0] = em->bm->totvert;
+ if (types & BM_EDGE)
+ totelem[1] = em->bm->totedge;
+ if (types & BM_FACE)
+ totelem[2] = em->bm->totface;
- sortblock = MEM_callocN(sizeof(xvertsort) * totvert, "xsort sorted");
- /* Stores unchanged verts, will be reused as final old2new vert mapping... */
- unchangedblock = MEM_callocN(sizeof(int) * totvert, "xsort unchanged");
- BM_ITER_MESH_INDEX (ve, &iter, em->bm, BM_VERTS_OF_MESH, i) {
- if (BM_elem_flag_test(ve, flag)) {
- sortblock[i].org_idx = i;
- sorted++;
+ if (ELEM(action, SRT_VIEW_ZAXIS, SRT_VIEW_XAXIS)) {
+ RegionView3D *rv3d = ED_view3d_context_rv3d(C);
+ float mat[4][4];
+ float fact = reverse ? -1.0 : 1.0;
+ int coidx = (action == SRT_VIEW_ZAXIS) ? 2 : 0;
+
+ mult_m4_m4m4(mat, rv3d->viewmat, ob->obmat); /* Apply the view matrix to the object matrix. */
+
+ if (totelem[0]) {
+ pb = pblock[0] = MEM_callocN(sizeof(char) * totelem[0], "sort_bmelem vert pblock");
+ sb = sblock[0] = MEM_callocN(sizeof(bmelemsort) * totelem[0], "sort_bmelem vert sblock");
+
+ BM_ITER_MESH_INDEX (ve, &iter, em->bm, BM_VERTS_OF_MESH, i) {
+ if (BM_elem_flag_test(ve, flag)) {
+ float co[3];
+ mul_v3_m4v3(co, mat, ve->co);
+
+ pb[i] = FALSE;
+ sb[affected[0]].org_idx = i;
+ sb[affected[0]++].srt = co[coidx] * fact;
+ }
+ else {
+ pb[i] = TRUE;
+ }
+ }
}
- else {
- unchangedblock[unchanged++] = i;
- sortblock[i].org_idx = -1;
+
+ if (totelem[1]) {
+ pb = pblock[1] = MEM_callocN(sizeof(char) * totelem[1], "sort_bmelem edge pblock");
+ sb = sblock[1] = MEM_callocN(sizeof(bmelemsort) * totelem[1], "sort_bmelem edge sblock");
+
+ BM_ITER_MESH_INDEX (ed, &iter, em->bm, BM_EDGES_OF_MESH, i) {
+ if (BM_elem_flag_test(ed, flag)) {
+ float co[3];
+ mid_v3_v3v3(co, ed->v1->co, ed->v2->co);
+ mul_m4_v3(mat, co);
+
+ pb[i] = FALSE;
+ sb[affected[1]].org_idx = i;
+ sb[affected[1]++].srt = co[coidx] * fact;
+ }
+ else {
+ pb[i] = TRUE;
+ }
+ }
}
- }
-/* printf("%d verts: %d to be sorted, %d unchanged…\n", totvert, sorted, unchanged);*/
- if (sorted == 0)
- return;
- ED_view3d_init_mats_rv3d(vc.obedit, vc.rv3d);
- mesh_foreachScreenVert(&vc, xsortvert_flag__doSetX, sortblock, V3D_CLIP_TEST_OFF);
+ if (totelem[2]) {
+ pb = pblock[2] = MEM_callocN(sizeof(char) * totelem[2], "sort_bmelem face pblock");
+ sb = sblock[2] = MEM_callocN(sizeof(bmelemsort) * totelem[2], "sort_bmelem face sblock");
- qsort(sortblock, totvert, sizeof(xvertsort), vergxco);
+ BM_ITER_MESH_INDEX (fa, &iter, em->bm, BM_FACES_OF_MESH, i) {
+ if (BM_elem_flag_test(fa, flag)) {
+ float co[3];
+ BM_face_calc_center_mean(fa, co);
+ mul_m4_v3(mat, co);
- /* Convert sortblock into an array mapping old idx to new. */
- vmap = unchangedblock;
- unchangedblock = NULL;
- if (unchanged) {
- unchangedblock = MEM_mallocN(sizeof(int) * unchanged, "xsort unchanged");
- memcpy(unchangedblock, vmap, unchanged * sizeof(int));
- }
- for (i = totvert; i--; ) {
- if (i < unchanged)
- vmap[unchangedblock[i]] = i;
- else
- vmap[sortblock[i].org_idx] = i;
+ pb[i] = FALSE;
+ sb[affected[2]].org_idx = i;
+ sb[affected[2]++].srt = co[coidx] * fact;
+ }
+ else {
+ pb[i] = TRUE;
+ }
+ }
+ }
}
- MEM_freeN(sortblock);
- if (unchangedblock)
- MEM_freeN(unchangedblock);
+ else if (action == SRT_CURSOR_DISTANCE) {
+ View3D *v3d = CTX_wm_view3d(C);
+ float cur[3];
+ float mat[4][4];
+ float fact = reverse ? -1.0 : 1.0;
- BM_mesh_remap(em->bm, vmap, NULL, NULL);
+ if (v3d && v3d->localvd)
+ copy_v3_v3(cur, v3d->cursor);
+ else
+ copy_v3_v3(cur, scene->cursor);
+ invert_m4_m4(mat, ob->obmat);
+ mul_m4_v3(mat, cur);
+
+ if (totelem[0]) {
+ pb = pblock[0] = MEM_callocN(sizeof(char) * totelem[0], "sort_bmelem vert pblock");
+ sb = sblock[0] = MEM_callocN(sizeof(bmelemsort) * totelem[0], "sort_bmelem vert sblock");
+
+ BM_ITER_MESH_INDEX (ve, &iter, em->bm, BM_VERTS_OF_MESH, i) {
+ if (BM_elem_flag_test(ve, flag)) {
+ pb[i] = FALSE;
+ sb[affected[0]].org_idx = i;
+ sb[affected[0]++].srt = len_squared_v3v3(cur, ve->co) * fact;
+ }
+ else {
+ pb[i] = TRUE;
+ }
+ }
+ }
- MEM_freeN(vmap);
-}
+ if (totelem[1]) {
+ pb = pblock[1] = MEM_callocN(sizeof(char) * totelem[1], "sort_bmelem edge pblock");
+ sb = sblock[1] = MEM_callocN(sizeof(bmelemsort) * totelem[1], "sort_bmelem edge sblock");
-static int edbm_vertices_sort_exec(bContext *C, wmOperator *UNUSED(op))
-{
- xsortvert_flag(C, BM_ELEM_SELECT);
- return OPERATOR_FINISHED;
-}
+ BM_ITER_MESH_INDEX (ed, &iter, em->bm, BM_EDGES_OF_MESH, i) {
+ if (BM_elem_flag_test(ed, flag)) {
+ float co[3];
+ mid_v3_v3v3(co, ed->v1->co, ed->v2->co);
-void MESH_OT_vertices_sort(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name = "Vertex Sort";
- ot->description = "Sort vertex order";
- ot->idname = "MESH_OT_vertices_sort";
+ pb[i] = FALSE;
+ sb[affected[1]].org_idx = i;
+ sb[affected[1]++].srt = len_squared_v3v3(cur, co) * fact;
+ }
+ else {
+ pb[i] = TRUE;
+ }
+ }
+ }
- /* api callbacks */
- ot->exec = edbm_vertices_sort_exec;
+ if (totelem[2]) {
+ pb = pblock[2] = MEM_callocN(sizeof(char) * totelem[2], "sort_bmelem face pblock");
+ sb = sblock[2] = MEM_callocN(sizeof(bmelemsort) * totelem[2], "sort_bmelem face sblock");
- ot->poll = EM_view3d_poll; /* uses view relative X axis to sort verts */
+ BM_ITER_MESH_INDEX (fa, &iter, em->bm, BM_FACES_OF_MESH, i) {
+ if (BM_elem_flag_test(fa, flag)) {
+ float co[3];
+ BM_face_calc_center_mean(fa, co);
- /* flags */
- ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
-}
+ pb[i] = FALSE;
+ sb[affected[2]].org_idx = i;
+ sb[affected[2]++].srt = len_squared_v3v3(cur, co) * fact;
+ }
+ else {
+ pb[i] = TRUE;
+ }
+ }
+ }
+ }
-/* ********************** SORT FACES ******************* */
+ /* Faces only! */
+ else if (action == SRT_MATERIAL && totelem[2]) {
+ pb = pblock[2] = MEM_callocN(sizeof(char) * totelem[2], "sort_bmelem face pblock");
+ sb = sblock[2] = MEM_callocN(sizeof(bmelemsort) * totelem[2], "sort_bmelem face sblock");
+
+ BM_ITER_MESH_INDEX (fa, &iter, em->bm, BM_FACES_OF_MESH, i) {
+ if (BM_elem_flag_test(fa, flag)) {
+ /* Reverse materials' order, not order of faces inside each mat! */
+ /* Note: cannot use totcol, as mat_nr may sometimes be greater... */
+ float srt = reverse ? (float)(MAXMAT - fa->mat_nr) : (float)fa->mat_nr;
+ pb[i] = FALSE;
+ sb[affected[2]].org_idx = i;
+ /* Multiplying with totface and adding i ensures us we keep current order for all faces of same mat. */
+ sb[affected[2]++].srt = srt * ((float)totelem[2]) + ((float)i);
+/* printf("e: %d; srt: %f; final: %f\n", i, srt, srt * ((float)totface) + ((float)i));*/
+ }
+ else {
+ pb[i] = TRUE;
+ }
+ }
+ }
-static void permutate(void *list, int num, int size, int *index)
-{
- void *buf;
- int len;
- int i;
+ else if (action == SRT_SELECTED) {
+ int *tbuf[3] = {NULL, NULL, NULL}, *tb;
- len = num * size;
+ if (totelem[0]) {
+ tb = tbuf[0] = MEM_callocN(sizeof(int) * totelem[0], "sort_bmelem vert tbuf");
+ mp = map[0] = MEM_callocN(sizeof(int) * totelem[0], "sort_bmelem vert map");
- buf = MEM_mallocN(len, "permutate");
- memcpy(buf, list, len);
-
- for (i = 0; i < num; i++) {
- memcpy((char *)list + (i * size), (char *)buf + (index[i] * size), size);
- }
- MEM_freeN(buf);
-}
+ BM_ITER_MESH_INDEX (ve, &iter, em->bm, BM_VERTS_OF_MESH, i) {
+ if (BM_elem_flag_test(ve, flag)) {
+ mp[affected[0]++] = i;
+ }
+ else {
+ *tb = i;
+ tb++;
+ }
+ }
+ }
-/* sort faces on view axis */
-static float *face_sort_floats;
-static int float_sort(const void *v1, const void *v2)
-{
- float x1, x2;
-
- x1 = face_sort_floats[((int *) v1)[0]];
- x2 = face_sort_floats[((int *) v2)[0]];
-
- if (x1 > x2) return 1;
- else if (x1 < x2) return -1;
- return 0;
-}
+ if (totelem[1]) {
+ tb = tbuf[1] = MEM_callocN(sizeof(int) * totelem[1], "sort_bmelem edge tbuf");
+ mp = map[1] = MEM_callocN(sizeof(int) * totelem[1], "sort_bmelem edge map");
-static int edbm_sort_faces_exec(bContext *C, wmOperator *op)
-{
- RegionView3D *rv3d = ED_view3d_context_rv3d(C);
- View3D *v3d = CTX_wm_view3d(C);
- Object *ob = CTX_data_edit_object(C);
- Scene *scene = CTX_data_scene(C);
- Mesh *me;
- CustomDataLayer *layer;
- int i, j, *index;
- int event;
- float reverse = 1;
- // XXX int ctrl = 0;
-
- if (!v3d) return OPERATOR_CANCELLED;
-
- /* This operator work in Object Mode, not in edit mode.
- * After talk with Campbell we agree that there is no point to port this to EditMesh right now.
- * so for now, we just exit_editmode and enter_editmode at the end of this function.
- */
- ED_object_exit_editmode(C, EM_FREEDATA);
+ BM_ITER_MESH_INDEX (ed, &iter, em->bm, BM_EDGES_OF_MESH, i) {
+ if (BM_elem_flag_test(ed, flag)) {
+ mp[affected[1]++] = i;
+ }
+ else {
+ *tb = i;
+ tb++;
+ }
+ }
+ }
- me = ob->data;
- if (me->totpoly == 0) {
- ED_object_enter_editmode(C, 0);
- return OPERATOR_FINISHED;
- }
+ if (totelem[2]) {
+ tb = tbuf[2] = MEM_callocN(sizeof(int) * totelem[2], "sort_bmelem face tbuf");
+ mp = map[2] = MEM_callocN(sizeof(int) * totelem[2], "sort_bmelem face map");
- event = RNA_enum_get(op->ptr, "type");
+ BM_ITER_MESH_INDEX (fa, &iter, em->bm, BM_FACES_OF_MESH, i) {
+ if (BM_elem_flag_test(fa, flag)) {
+ mp[affected[2]++] = i;
+ }
+ else {
+ *tb = i;
+ tb++;
+ }
+ }
+ }
- // XXX
- //if (ctrl)
- // reverse = -1;
-
- /* create index list */
- index = (int *)MEM_mallocN(sizeof(int) * me->totpoly, "sort faces");
- for (i = 0; i < me->totpoly; i++) {
- index[i] = i;
- }
-
- face_sort_floats = (float *) MEM_mallocN(sizeof(float) * me->totpoly, "sort faces float");
+ for (j = 3; j--;) {
+ int tot = totelem[j];
+ int aff = affected[j];
+ tb = tbuf[j];
+ mp = map[j];
+ if (!(tb && mp))
+ continue;
+ if (ELEM(aff, 0, tot)) {
+ MEM_freeN(tb);
+ MEM_freeN(mp);
+ map[j] = NULL;
+ continue;
+ }
+ if (reverse) {
+ memcpy(tb + (tot - aff), mp, aff * sizeof(int));
+ }
+ else {
+ memcpy(mp + aff, tb, (tot - aff) * sizeof(int));
+ tb = mp;
+ mp = map[j] = tbuf[j];
+ tbuf[j] = tb;
+ }
- /* sort index list instead of faces itself
- * and apply this permutation to all face layers
- */
- if (event == 5) {
- /* Random */
- for (i = 0; i < me->totpoly; i++) {
- face_sort_floats[i] = BLI_frand();
+ /* Reverse mapping, we want an org2new one! */
+ for (i = tot, tb = tbuf[j] + tot - 1; i--; tb--) {
+ mp[*tb] = i;
+ }
+ MEM_freeN(tbuf[j]);
}
- qsort(index, me->totpoly, sizeof(int), float_sort);
}
- else {
- MPoly *mp;
- MLoop *ml;
- MVert *mv;
- float vec[3];
- float mat[4][4];
- float cur[3];
-
- if (event == 1)
- mult_m4_m4m4(mat, rv3d->viewmat, OBACT->obmat); /* apply the view matrix to the object matrix */
- else if (event == 2) { /* sort from cursor */
- if (v3d && v3d->localvd) {
- copy_v3_v3(cur, v3d->cursor);
+
+ else if (action == SRT_RANDOMIZE) {
+ if (totelem[0]) {
+ /* Re-init random generator for each element type, to get consistant random when
+ * enabling/disabling an element type. */
+ BLI_srandom(seed);
+ pb = pblock[0] = MEM_callocN(sizeof(char) * totelem[0], "sort_bmelem vert pblock");
+ sb = sblock[0] = MEM_callocN(sizeof(bmelemsort) * totelem[0], "sort_bmelem vert sblock");
+
+ BM_ITER_MESH_INDEX (ve, &iter, em->bm, BM_VERTS_OF_MESH, i) {
+ if (BM_elem_flag_test(ve, flag)) {
+ pb[i] = FALSE;
+ sb[affected[0]].org_idx = i;
+ sb[affected[0]++].srt = BLI_frand();
+ }
+ else {
+ pb[i] = TRUE;
+ }
}
- else {
- copy_v3_v3(cur, scene->cursor);
+ }
+
+ if (totelem[1]) {
+ BLI_srandom(seed);
+ pb = pblock[1] = MEM_callocN(sizeof(char) * totelem[1], "sort_bmelem edge pblock");
+ sb = sblock[1] = MEM_callocN(sizeof(bmelemsort) * totelem[1], "sort_bmelem edge sblock");
+
+ BM_ITER_MESH_INDEX (ed, &iter, em->bm, BM_EDGES_OF_MESH, i) {
+ if (BM_elem_flag_test(ed, flag)) {
+ pb[i] = FALSE;
+ sb[affected[1]].org_idx = i;
+ sb[affected[1]++].srt = BLI_frand();
+ }
+ else {
+ pb[i] = TRUE;
+ }
}
- invert_m4_m4(mat, OBACT->obmat);
- mul_m4_v3(mat, cur);
}
-
- mp = me->mpoly;
- for (i = 0; i < me->totpoly; i++, mp++) {
- if (event == 3) {
- face_sort_floats[i] = ((float)mp->mat_nr) * reverse;
+ if (totelem[2]) {
+ BLI_srandom(seed);
+ pb = pblock[2] = MEM_callocN(sizeof(char) * totelem[2], "sort_bmelem face pblock");
+ sb = sblock[2] = MEM_callocN(sizeof(bmelemsort) * totelem[2], "sort_bmelem face sblock");
+
+ BM_ITER_MESH_INDEX (fa, &iter, em->bm, BM_FACES_OF_MESH, i) {
+ if (BM_elem_flag_test(fa, flag)) {
+ pb[i] = FALSE;
+ sb[affected[2]].org_idx = i;
+ sb[affected[2]++].srt = BLI_frand();
+ }
+ else {
+ pb[i] = TRUE;
+ }
}
- else if (event == 4) {
- /* selected first */
- if (mp->flag & ME_FACE_SEL)
- face_sort_floats[i] = 0.0;
- else
- face_sort_floats[i] = reverse;
+ }
+ }
+
+ else if (action == SRT_REVERSE) {
+ if (totelem[0]) {
+ pb = pblock[0] = MEM_callocN(sizeof(char) * totelem[0], "sort_bmelem vert pblock");
+ sb = sblock[0] = MEM_callocN(sizeof(bmelemsort) * totelem[0], "sort_bmelem vert sblock");
+
+ BM_ITER_MESH_INDEX (ve, &iter, em->bm, BM_VERTS_OF_MESH, i) {
+ if (BM_elem_flag_test(ve, flag)) {
+ pb[i] = FALSE;
+ sb[affected[0]].org_idx = i;
+ sb[affected[0]++].srt = (float)-i;
+ }
+ else {
+ pb[i] = TRUE;
+ }
}
- else {
- /* find the face's center */
- ml = me->mloop + mp->loopstart;
- zero_v3(vec);
- for (j = 0; j < mp->totloop; j++, ml++) {
- mv = me->mvert + ml->v;
- add_v3_v3(vec, mv->co);
+ }
+
+ if (totelem[1]) {
+ pb = pblock[1] = MEM_callocN(sizeof(char) * totelem[1], "sort_bmelem edge pblock");
+ sb = sblock[1] = MEM_callocN(sizeof(bmelemsort) * totelem[1], "sort_bmelem edge sblock");
+
+ BM_ITER_MESH_INDEX (ed, &iter, em->bm, BM_EDGES_OF_MESH, i) {
+ if (BM_elem_flag_test(ed, flag)) {
+ pb[i] = FALSE;
+ sb[affected[1]].org_idx = i;
+ sb[affected[1]++].srt = (float)-i;
}
- mul_v3_fl(vec, 1.0f / (float)mp->totloop);
-
- if (event == 1) { /* sort on view axis */
- mul_m4_v3(mat, vec);
- face_sort_floats[i] = vec[2] * reverse;
+ else {
+ pb[i] = TRUE;
}
- else if (event == 2) { /* distance from cursor */
- face_sort_floats[i] = len_v3v3(cur, vec) * reverse; /* back to front */
+ }
+ }
+
+ if (totelem[2]) {
+ pb = pblock[2] = MEM_callocN(sizeof(char) * totelem[2], "sort_bmelem face pblock");
+ sb = sblock[2] = MEM_callocN(sizeof(bmelemsort) * totelem[2], "sort_bmelem face sblock");
+
+ BM_ITER_MESH_INDEX (fa, &iter, em->bm, BM_FACES_OF_MESH, i) {
+ if (BM_elem_flag_test(fa, flag)) {
+ pb[i] = FALSE;
+ sb[affected[2]].org_idx = i;
+ sb[affected[2]++].srt = (float)-i;
+ }
+ else {
+ pb[i] = TRUE;
}
}
}
- qsort(index, me->totpoly, sizeof(int), float_sort);
}
-
- MEM_freeN(face_sort_floats);
- for (i = 0; i < me->pdata.totlayer; i++) {
- layer = &me->pdata.layers[i];
- permutate(layer->data, me->totpoly, CustomData_sizeof(layer->type), index);
+
+/* printf("%d vertices: %d to be affected…\n", totelem[0], affected[0]);*/
+/* printf("%d edges: %d to be affected…\n", totelem[1], affected[1]);*/
+/* printf("%d faces: %d to be affected…\n", totelem[2], affected[2]);*/
+ if (affected[0] == 0 && affected[1] == 0 && affected[2] == 0) {
+ for (j = 3; j--;) {
+ if (pblock[j])
+ MEM_freeN(pblock[j]);
+ if (sblock[j])
+ MEM_freeN(sblock[j]);
+ if (map[j])
+ MEM_freeN(map[j]);
+ }
+ return;
}
- MEM_freeN(index);
- DAG_id_tag_update(ob->data, 0);
+ /* Sort affected elements, and populate mapping arrays, if needed. */
+ for (j = 3; j--;) {
+ pb = pblock[j];
+ sb = sblock[j];
+ if (pb && sb && !map[j]) {
+ char *p_blk;
+ bmelemsort *s_blk;
+ tot = totelem[j];
+ aff = affected[j];
+
+ qsort(sb, aff, sizeof(bmelemsort), bmelemsort_comp);
+
+ mp = map[j] = MEM_mallocN(sizeof(int) * tot, "sort_bmelem map");
+ p_blk = pb + tot - 1;
+ s_blk = sb + aff - 1;
+ for (i = tot; i--; p_blk--) {
+ if (*p_blk) { /* Protected! */
+ mp[i] = i;
+ }
+ else {
+ mp[s_blk->org_idx] = i;
+ s_blk--;
+ }
+ }
+ }
+ if (pb)
+ MEM_freeN(pb);
+ if (sb)
+ MEM_freeN(sb);
+ }
- /* Return to editmode. */
- ED_object_enter_editmode(C, 0);
+ BM_mesh_remap(em->bm, map[0], map[1], map[2]);
+/* DAG_id_tag_update(ob->data, 0);*/
- return OPERATOR_FINISHED;
+ for (j = 3; j--;) {
+ if (map[j])
+ MEM_freeN(map[j]);
+ }
}
-void MESH_OT_sort_faces(wmOperatorType *ot)
+static int edbm_sort_elements_exec(bContext *C, wmOperator *op)
{
- static EnumPropertyItem type_items[] = {
- { 1, "VIEW_AXIS", 0, "View Axis", "" },
- { 2, "CURSOR_DISTANCE", 0, "Cursor Distance", "" },
- { 3, "MATERIAL", 0, "Material", "" },
- { 4, "SELECTED", 0, "Selected", "" },
- { 5, "RANDOMIZE", 0, "Randomize", "" },
- { 0, NULL, 0, NULL, NULL }};
-
- /* identifiers */
- ot->name = "Sort Faces"; // XXX (Ctrl to reverse)%t|
- ot->description = "The faces of the active Mesh Object are sorted, based on the current view";
- ot->idname = "MESH_OT_sort_faces";
-
- /* api callbacks */
- ot->invoke = WM_menu_invoke;
- ot->exec = edbm_sort_faces_exec;
- ot->poll = ED_operator_editmesh;
+ int action = RNA_enum_get(op->ptr, "type");
+ PropertyRNA *prop_elem_types = RNA_struct_find_property(op->ptr, "elements");
+ int elem_types = 0;
+ int reverse = RNA_boolean_get(op->ptr, "reverse");
+ unsigned int seed = RNA_int_get(op->ptr, "seed");
- /* flags */
- ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+ /* If no elem_types set, use current selection mode to set it! */
+ if (RNA_property_is_set(op->ptr, prop_elem_types)) {
+ elem_types = RNA_property_enum_get(op->ptr, prop_elem_types);
+ }
+ else {
+ BMEditMesh *em = BMEdit_FromObject(CTX_data_edit_object(C));
+ if (em->selectmode & SCE_SELECT_VERTEX)
+ elem_types |= BM_VERT;
+ if (em->selectmode & SCE_SELECT_EDGE)
+ elem_types |= BM_EDGE;
+ if (em->selectmode & SCE_SELECT_FACE)
+ elem_types |= BM_FACE;
+ RNA_enum_set(op->ptr, "elements", elem_types);
+ }
- /* properties */
- ot->prop = RNA_def_enum(ot->srna, "type", type_items, 0, "Type", "");
+ sort_bmelem_flag(C, elem_types, BM_ELEM_SELECT, action, reverse, seed);
+ return OPERATOR_FINISHED;
}
-/* ******************************* Randomize verts ************************* */
-static void hashvert_flag(BMEditMesh *em, int flag, unsigned int seed)
+static int edbm_sort_elements_draw_check_prop(PointerRNA *ptr, PropertyRNA *prop)
{
- BMVert *ve;
- BMIter iter;
- char *block /* Just to mark protected vertices */, *t_blk;
- int *randblock, *vmap, *t_idx, *r_idx;
- int totvert, randomized = 0, /*protected = 0, */ i;
-
- totvert = em->bm->totvert;
-
- block = MEM_callocN(sizeof(char) * totvert, "randvert block");
- randblock = MEM_callocN(sizeof(int) * totvert, "randvert randblock");
- BM_ITER_MESH_INDEX (ve, &iter, em->bm, BM_VERTS_OF_MESH, i) {
- if (BM_elem_flag_test(ve, flag)) {
- block[i] = FALSE;
- randblock[randomized++] = i;
- }
- else {
- block[i] = TRUE;
- }
- }
-/* protected = totvert - randomized;*/
-/* printf("%d verts: %d to be randomized, %d protected…\n", totvert, randomized, protected);*/
- if (randomized == 0)
- return;
+ const char *prop_id = RNA_property_identifier(prop);
+ int action = RNA_enum_get(ptr, "type");
-
- /* Randomize non-protected vertices indices, and create an array mapping old idx to new
- * from both blocks, keeping protected vertices at the same indices. */
- vmap = randblock;
- randblock = MEM_mallocN(sizeof(int) * randomized, "randvert randblock");
- memcpy(randblock, vmap, randomized * sizeof(int));
- BLI_array_randomize((void *)randblock, sizeof(int), randomized, seed);
- t_blk = block + totvert - 1;
- t_idx = vmap + totvert - 1;
- r_idx = randblock + randomized - 1;
- for (i = totvert; i--; t_blk--, t_idx--) {
- if (*t_blk) /* Protected! */
- *t_idx = i;
+ /* Only show seed for randomize action! */
+ if (strcmp(prop_id, "seed") == 0) {
+ if (action == SRT_RANDOMIZE)
+ return TRUE;
else
- *t_idx = *r_idx--;
+ return FALSE;
}
- MEM_freeN(randblock);
- MEM_freeN(block);
-
- BM_mesh_remap(em->bm, vmap, NULL, NULL);
+ /* Hide seed for reverse and randomize actions! */
+ if (strcmp(prop_id, "reverse") == 0) {
+ if (ELEM(action, SRT_RANDOMIZE, SRT_REVERSE))
+ return FALSE;
+ else
+ return TRUE;
+ }
- MEM_freeN(vmap);
+ return TRUE;
}
-static int edbm_vertices_randomize_exec(bContext *C, wmOperator *op)
+static void edbm_sort_elements_ui(bContext *C, wmOperator *op)
{
- Object *obedit = CTX_data_edit_object(C);
- BMEditMesh *em = BMEdit_FromObject(obedit);
- unsigned int seed = RNA_int_get(op->ptr, "seed");
+ uiLayout *layout = op->layout;
+ wmWindowManager *wm = CTX_wm_manager(C);
+ PointerRNA ptr;
- hashvert_flag(em, BM_ELEM_SELECT, seed);
+ RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr);
- return OPERATOR_FINISHED;
+ /* Main auto-draw call. */
+ uiDefAutoButsRNA(layout, &ptr, edbm_sort_elements_draw_check_prop, '\0');
}
-void MESH_OT_vertices_randomize(wmOperatorType *ot)
+void MESH_OT_sort_elements(wmOperatorType *ot)
{
+ static EnumPropertyItem type_items[] = {
+ {SRT_VIEW_ZAXIS, "VIEW_ZAXIS", 0, "View Z Axis",
+ "Sort selected elements from farest to nearest one in current view"},
+ {SRT_VIEW_XAXIS, "VIEW_XAXIS", 0, "View X Axis",
+ "Sort selected elements from left to right one in current view"},
+ {SRT_CURSOR_DISTANCE, "CURSOR_DISTANCE", 0, "Cursor Distance",
+ "Sort selected elements from nearest to farest from 3D cursor"},
+ {SRT_MATERIAL, "MATERIAL", 0, "Material",
+ "Sort selected elements from smallest to greatest material index (faces only!)"},
+ {SRT_SELECTED, "SELECTED", 0, "Selected",
+ "Move all selected elements in first places, preserving their relative order "
+ "(WARNING: this will affect unselected elements' indices as well!)"},
+ {SRT_RANDOMIZE, "RANDOMIZE", 0, "Randomize", "Randomize order of selected elements"},
+ {SRT_REVERSE, "REVERSE", 0, "Reverse", "Reverse current order of selected elements"},
+ {0, NULL, 0, NULL, NULL},
+ };
+
+ static EnumPropertyItem elem_items[] = {
+ {BM_VERT, "VERT", 0, "Vertices", ""},
+ {BM_EDGE, "EDGE", 0, "Edges", ""},
+ {BM_FACE, "FACE", 0, "Faces", ""},
+ {0, NULL, 0, NULL, NULL},
+ };
+
/* identifiers */
- ot->name = "Vertex Randomize";
- ot->description = "Randomize vertex order";
- ot->idname = "MESH_OT_vertices_randomize";
+ ot->name = "Sort Mesh Elements";
+ ot->description = "The order of selected vertices/edges/faces is modified, based on a given method";
+ ot->idname = "MESH_OT_sort_elements";
/* api callbacks */
- ot->exec = edbm_vertices_randomize_exec;
-
+ ot->invoke = WM_menu_invoke;
+ ot->exec = edbm_sort_elements_exec;
ot->poll = ED_operator_editmesh;
+ ot->ui = edbm_sort_elements_ui;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
- /* Properties */
- ot->prop = RNA_def_int(ot->srna, "seed", 0, 0, INT_MAX, "Seed", "Seed for the random generator", 0, 255);
+ /* properties */
+ ot->prop = RNA_def_enum(ot->srna, "type", type_items, 0, "Type", "Type of re-ordering operation to apply");
+ RNA_def_enum_flag(ot->srna, "elements", elem_items, 0, "Elements",
+ "Which elements to affect (vertices, edges and/or faces)");
+ RNA_def_boolean(ot->srna, "reverse", FALSE, "Reverse", "Reverse the sorting effect");
+ RNA_def_int(ot->srna, "seed", 0, 0, INT_MAX, "Seed", "Seed for random-based operations", 0, 255);
}
-/******end of qsort stuff ****/
-
+/****** end of qsort stuff ****/
static int edbm_noise_exec(bContext *C, wmOperator *op)
{
@@ -4035,7 +4256,7 @@ static int edbm_noise_exec(bContext *C, wmOperator *op)
if (tex->type == TEX_STUCCI) {
float b2, vec[3];
- float ofs = tex->turbul / 200.0;
+ float ofs = tex->turbul / 200.0f;
BM_ITER_MESH (eve, &iter, em->bm, BM_VERTS_OF_MESH) {
if (BM_elem_flag_test(eve, BM_ELEM_SELECT)) {
b2 = BLI_hnoise(tex->noisesize, eve->co[0], eve->co[1], eve->co[2]);
@@ -4091,7 +4312,7 @@ static int edbm_bevel_exec(bContext *C, wmOperator *op)
BMEdge *eed;
BMOperator bmop;
float factor = RNA_float_get(op->ptr, "percent") /*, dfac */ /* UNUSED */, df, s;
- int i, recursion = RNA_int_get(op->ptr, "recursion");
+ int i, recursion = 1; /* RNA_int_get(op->ptr, "recursion"); */ /* temp removed, see comment below */
const int use_even = RNA_boolean_get(op->ptr, "use_even");
const int use_dist = RNA_boolean_get(op->ptr, "use_dist");
float *w = NULL, ftot;
@@ -4122,7 +4343,7 @@ static int edbm_bevel_exec(bContext *C, wmOperator *op)
w[i] = s;
ftot += s;
- df *= 2.0;
+ df *= 2.0f;
}
mul_vn_fl(w, recursion, 1.0f / (float)ftot);
@@ -4168,7 +4389,8 @@ void MESH_OT_bevel(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_float(ot->srna, "percent", 0.5f, -FLT_MAX, FLT_MAX, "Percentage", "", 0.0f, 1.0f);
- RNA_def_int(ot->srna, "recursion", 1, 1, 50, "Recursion Level", "Recursion Level", 1, 8);
+// XXX, disabled for 2.63 release, needs to work much better without overlap before we can give to users.
+// RNA_def_int(ot->srna, "recursion", 1, 1, 50, "Recursion Level", "Recursion Level", 1, 8);
RNA_def_boolean(ot->srna, "use_even", FALSE, "Even", "Calculate evenly spaced bevel");
RNA_def_boolean(ot->srna, "use_dist", FALSE, "Distance", "Interpret the percent in blender units");
@@ -4279,3 +4501,166 @@ void MESH_OT_inset(wmOperatorType *ot)
RNA_def_boolean(ot->srna, "use_outset", FALSE, "Outset", "Outset rather than inset");
RNA_def_boolean(ot->srna, "use_select_inset", TRUE, "Select Outer", "Select the new inset faces");
}
+
+static int edbm_wireframe_exec(bContext *C, wmOperator *op)
+{
+ Object *obedit = CTX_data_edit_object(C);
+ BMEditMesh *em = BMEdit_FromObject(obedit);
+ BMOperator bmop;
+ const int use_boundary = RNA_boolean_get(op->ptr, "use_boundary");
+ const int use_even_offset = RNA_boolean_get(op->ptr, "use_even_offset");
+ const int use_replace = RNA_boolean_get(op->ptr, "use_replace");
+ const int use_relative_offset = RNA_boolean_get(op->ptr, "use_relative_offset");
+ const int use_crease = RNA_boolean_get(op->ptr, "use_crease");
+ const float thickness = RNA_float_get(op->ptr, "thickness");
+
+ EDBM_op_init(em, &bmop, op,
+ "wireframe faces=%hf use_boundary=%b use_even_offset=%b use_relative_offset=%b use_crease=%b "
+ "thickness=%f",
+ BM_ELEM_SELECT, use_boundary, use_even_offset, use_relative_offset, use_crease,
+ thickness);
+
+ BMO_op_exec(em->bm, &bmop);
+
+ if (use_replace) {
+ BM_mesh_elem_hflag_disable_all(em->bm, BM_FACE, BM_ELEM_TAG, FALSE);
+ BMO_slot_buffer_hflag_enable(em->bm, &bmop, "faces", BM_FACE, BM_ELEM_TAG, FALSE);
+
+ BMO_op_callf(em->bm, "del geom=%hvef context=%i", BM_ELEM_TAG, DEL_FACES);
+ }
+
+ BM_mesh_elem_hflag_disable_all(em->bm, BM_VERT | BM_EDGE | BM_FACE, BM_ELEM_SELECT, FALSE);
+ BMO_slot_buffer_hflag_enable(em->bm, &bmop, "faceout", BM_FACE, BM_ELEM_SELECT, TRUE);
+
+ if (!EDBM_op_finish(em, &bmop, op, TRUE)) {
+ return OPERATOR_CANCELLED;
+ }
+ else {
+ EDBM_update_generic(C, em, TRUE);
+ return OPERATOR_FINISHED;
+ }
+}
+
+void MESH_OT_wireframe(wmOperatorType *ot)
+{
+ PropertyRNA *prop;
+
+ /* identifiers */
+ ot->name = "Wire Frame";
+ ot->idname = "MESH_OT_wireframe";
+ ot->description = "Inset new faces into selected faces";
+
+ /* api callbacks */
+ ot->exec = edbm_wireframe_exec;
+ ot->poll = ED_operator_editmesh;
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+
+ /* properties */
+ RNA_def_boolean(ot->srna, "use_boundary", TRUE, "Boundary", "Inset face boundaries");
+ RNA_def_boolean(ot->srna, "use_even_offset", TRUE, "Offset Even", "Scale the offset to give more even thickness");
+ RNA_def_boolean(ot->srna, "use_relative_offset", FALSE, "Offset Relative", "Scale the offset by surrounding geometry");
+ RNA_def_boolean(ot->srna, "use_crease", FALSE, "Crease", "Crease hub edges for improved subsurf");
+
+ prop = RNA_def_float(ot->srna, "thickness", 0.01f, 0.0f, FLT_MAX, "Thickness", "", 0.0f, 10.0f);
+ /* use 1 rather then 10 for max else dragging the button moves too far */
+ RNA_def_property_ui_range(prop, 0.0, 1.0, 0.01, 4);
+
+
+ RNA_def_boolean(ot->srna, "use_replace", TRUE, "Replace", "Remove original faces");
+}
+
+static int edbm_convex_hull_exec(bContext *C, wmOperator *op)
+{
+ Object *obedit = CTX_data_edit_object(C);
+ BMEditMesh *em = BMEdit_FromObject(obedit);
+ BMOperator bmop;
+
+ EDBM_op_init(em, &bmop, op, "convex_hull input=%hvef "
+ "use_existing_faces=%b",
+ BM_ELEM_SELECT,
+ RNA_boolean_get(op->ptr, "use_existing_faces"));
+ BMO_op_exec(em->bm, &bmop);
+
+ /* Hull fails if input is coplanar */
+ if (BMO_error_occurred(em->bm)) {
+ EDBM_op_finish(em, &bmop, op, TRUE);
+ return OPERATOR_CANCELLED;
+ }
+
+
+ /* Delete unused vertices, edges, and faces */
+ if (RNA_boolean_get(op->ptr, "delete_unused")) {
+ if (!EDBM_op_callf(em, op, "del geom=%s context=%i",
+ &bmop, "unused_geom", DEL_ONLYTAGGED))
+ {
+ EDBM_op_finish(em, &bmop, op, TRUE);
+ return OPERATOR_CANCELLED;
+ }
+ }
+
+ /* Delete hole edges/faces */
+ if (RNA_boolean_get(op->ptr, "make_holes")) {
+ if (!EDBM_op_callf(em, op, "del geom=%s context=%i",
+ &bmop, "holes_geom", DEL_ONLYTAGGED))
+ {
+ EDBM_op_finish(em, &bmop, op, TRUE);
+ return OPERATOR_CANCELLED;
+ }
+ }
+
+ /* Merge adjacent triangles */
+ if (RNA_boolean_get(op->ptr, "join_triangles")) {
+ if (!EDBM_op_callf(em, op, "join_triangles faces=%s limit=%f",
+ &bmop, "geomout",
+ RNA_float_get(op->ptr, "limit")))
+ {
+ EDBM_op_finish(em, &bmop, op, TRUE);
+ return OPERATOR_CANCELLED;
+ }
+ }
+
+ if (!EDBM_op_finish(em, &bmop, op, TRUE)) {
+ return OPERATOR_CANCELLED;
+ }
+ else {
+ EDBM_update_generic(C, em, TRUE);
+ EDBM_selectmode_flush(em);
+ return OPERATOR_FINISHED;
+ }
+}
+
+void MESH_OT_convex_hull(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Convex Hull";
+ ot->description = "Enclose selected vertices in a convex polyhedron";
+ ot->idname = "MESH_OT_convex_hull";
+
+ /* api callbacks */
+ ot->exec = edbm_convex_hull_exec;
+ ot->poll = EM_view3d_poll;
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+
+ /* props */
+ RNA_def_boolean(ot->srna, "delete_unused", TRUE,
+ "Delete Unused",
+ "Delete selected elements that are not used by the hull");
+
+ RNA_def_boolean(ot->srna, "use_existing_faces", TRUE,
+ "Use Existing Faces",
+ "Skip hull triangles that are covered by a pre-existing face");
+
+ RNA_def_boolean(ot->srna, "make_holes", FALSE,
+ "Make Holes",
+ "Delete selected faces that are used by the hull");
+
+ RNA_def_boolean(ot->srna, "join_triangles", TRUE,
+ "Join Triangles",
+ "Merge adjacent triangles into quads");
+
+ join_triangle_props(ot);
+}
diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c
index 074c37850f7..533ead1ff29 100644
--- a/source/blender/editors/mesh/editmesh_utils.c
+++ b/source/blender/editors/mesh/editmesh_utils.c
@@ -465,39 +465,6 @@ void EDBM_select_less(BMEditMesh *em)
EDBM_selectmode_flush(em);
}
-int EDBM_editselection_active_get(BMEditMesh *em, BMEditSelection *ese)
-{
- BMEditSelection *ese_last = em->bm->selected.last;
- BMFace *efa = BM_active_face_get(em->bm, FALSE);
-
- ese->next = ese->prev = NULL;
-
- if (ese_last) {
- if (ese_last->htype == BM_FACE) { /* if there is an active face, use it over the last selected face */
- if (efa) {
- ese->ele = (BMElem *)efa;
- }
- else {
- ese->ele = ese_last->ele;
- }
- ese->htype = BM_FACE;
- }
- else {
- ese->ele = ese_last->ele;
- ese->htype = ese_last->htype;
- }
- }
- else if (efa) { /* no */
- ese->ele = (BMElem *)efa;
- ese->htype = BM_FACE;
- }
- else {
- ese->ele = NULL;
- return 0;
- }
- return 1;
-}
-
void EDBM_flag_disable_all(BMEditMesh *em, const char hflag)
{
BM_mesh_elem_hflag_disable_all(em->bm, BM_VERT | BM_EDGE | BM_FACE, hflag, FALSE);
@@ -578,11 +545,11 @@ static void free_undo(void *me_v)
{
Mesh *me = me_v;
if (me->key) {
- free_key(me->key);
+ BKE_key_free(me->key);
MEM_freeN(me->key);
}
- free_mesh(me, FALSE);
+ BKE_mesh_free(me, FALSE);
MEM_freeN(me);
}
@@ -600,7 +567,7 @@ void undo_push_mesh(bContext *C, const char *name)
}
/* write comment here */
-UvVertMap *EDBM_uv_vert_map_create(BMEditMesh *em, int selected, int do_face_idx_array, float *limit)
+UvVertMap *EDBM_uv_vert_map_create(BMEditMesh *em, int selected, int do_face_idx_array, const float limit[2])
{
BMVert *ev;
BMFace *efa;
@@ -644,7 +611,7 @@ UvVertMap *EDBM_uv_vert_map_create(BMEditMesh *em, int selected, int do_face_idx
buf = vmap->buf = (UvMapVert *)MEM_callocN(sizeof(*vmap->buf) * totuv, "UvMapVert");
if (!vmap->vert || !vmap->buf) {
- free_uv_vert_map(vmap);
+ BKE_mesh_uv_vert_map_free(vmap);
if (do_face_idx_array)
EDBM_index_arrays_free(em);
return NULL;
@@ -704,7 +671,7 @@ UvVertMap *EDBM_uv_vert_map_create(BMEditMesh *em, int selected, int do_face_idx
sub_v2_v2v2(uvdiff, uv2, uv);
- if (fabs(uvdiff[0]) < limit[0] && fabs(uvdiff[1]) < limit[1]) {
+ if (fabsf(uvdiff[0]) < limit[0] && fabsf(uvdiff[1]) < limit[1]) {
if (lastv) lastv->next = next;
else vlist = next;
iterv->next = newvlist;
@@ -1272,43 +1239,3 @@ void EDBM_update_generic(bContext *C, BMEditMesh *em, const short do_tessface)
BMEdit_RecalcTessellation(em);
}
}
-
-/* * Selection History ***************************************************** */
-/* these wrap equivalent bmesh functions. I'm in two minds of it we should
- * just use the bm functions directly; on the one hand, there's no real
- * need (at the moment) to wrap them, but on the other hand having these
- * wrapped avoids a confusing mess of mixing BM_ and EDBM_ namespaces. */
-
-void EDBM_editselection_center(float *center, BMEditSelection *ese)
-{
- BM_editselection_center(center, ese);
-}
-
-void EDBM_editselection_normal(float *normal, BMEditSelection *ese)
-{
- BM_editselection_normal(normal, ese);
-}
-
-/* Calculate a plane that is rightangles to the edge/vert/faces normal
- * also make the plane run along an axis that is related to the geometry,
- * because this is used for the manipulators Y axis. */
-void EDBM_editselection_plane(BMEditMesh *em, float *plane, BMEditSelection *ese)
-{
- BM_editselection_plane(em->bm, plane, ese);
-}
-
-void EDBM_editselection_remove(BMEditMesh *em, BMHeader *ele)
-{
- BM_select_history_remove(em->bm, (BMElem *)ele);
-}
-
-void EDBM_editselection_store(BMEditMesh *em, BMHeader *ele)
-{
- BM_select_history_store(em->bm, (BMElem *)ele);
-}
-
-void EDBM_editselection_validate(BMEditMesh *em)
-{
- BM_select_history_validate(em->bm);
-}
-/* end select history */
diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c
index 5aea6f8d1c3..bc11a627be6 100644
--- a/source/blender/editors/mesh/mesh_data.c
+++ b/source/blender/editors/mesh/mesh_data.c
@@ -189,42 +189,6 @@ static void delete_customdata_layer(bContext *C, Object *ob, CustomDataLayer *la
}
}
-/* copies from active to 'index' */
-static void editmesh_face_copy_customdata(BMEditMesh *em, int type, int index)
-{
- BMesh *bm = em->bm;
- CustomData *pdata = &bm->pdata;
- BMIter iter;
- BMFace *efa;
- const int n = CustomData_get_active_layer(pdata, type);
-
- /* ensure all current elements follow new customdata layout */
- BM_ITER_MESH (efa, &iter, bm, BM_FACES_OF_MESH) {
- void *data = CustomData_bmesh_get_n(pdata, efa->head.data, type, n);
- CustomData_bmesh_set_n(pdata, efa->head.data, type, index, data);
- }
-}
-
-/* copies from active to 'index' */
-static void editmesh_loop_copy_customdata(BMEditMesh *em, int type, int index)
-{
- BMesh *bm = em->bm;
- CustomData *ldata = &bm->ldata;
- BMIter iter;
- BMIter liter;
- BMFace *efa;
- BMLoop *loop;
- const int n = CustomData_get_active_layer(ldata, type);
-
- /* ensure all current elements follow new customdata layout */
- BM_ITER_MESH (efa, &iter, bm, BM_FACES_OF_MESH) {
- BM_ITER_ELEM (loop, &liter, efa, BM_LOOPS_OF_FACE) {
- void *data = CustomData_bmesh_get_n(ldata, loop->head.data, type, n);
- CustomData_bmesh_set_n(ldata, loop->head.data, type, index, data);
- }
- }
-}
-
int ED_mesh_uv_loop_reset_ex(struct bContext *C, struct Mesh *me, const int layernum)
{
BMEditMesh *em = me->edit_btmesh;
@@ -311,11 +275,11 @@ int ED_mesh_uv_loop_reset_ex(struct bContext *C, struct Mesh *me, const int laye
else if (len > 2) {
float fac = 0.0f, dfac = 1.0f / (float)len;
- dfac *= M_PI * 2;
+ dfac *= (float)M_PI * 2.0f;
for (i = 0; i < len; i++) {
- fuvs[i][0] = 0.5f * sin(fac) + 0.5f;
- fuvs[i][1] = 0.5f * cos(fac) + 0.5f;
+ fuvs[i][0] = 0.5f * sinf(fac) + 0.5f;
+ fuvs[i][1] = 0.5f * cosf(fac) + 0.5f;
fac += dfac;
}
@@ -360,7 +324,8 @@ int ED_mesh_uv_texture_add(bContext *C, Mesh *me, const char *name, int active_s
BM_data_layer_add_named(em->bm, &em->bm->pdata, CD_MTEXPOLY, name);
/* copy data from active UV */
if (layernum) {
- editmesh_face_copy_customdata(em, CD_MTEXPOLY, layernum);
+ const int layernum_dst = CustomData_get_active_layer(&em->bm->pdata, CD_MTEXPOLY);
+ BM_data_layer_copy(em->bm, &em->bm->pdata, CD_MTEXPOLY, layernum, layernum_dst);
}
if (active_set || layernum == 0) {
CustomData_set_layer_active(&em->bm->pdata, CD_MTEXPOLY, layernum);
@@ -370,7 +335,9 @@ int ED_mesh_uv_texture_add(bContext *C, Mesh *me, const char *name, int active_s
BM_data_layer_add_named(em->bm, &em->bm->ldata, CD_MLOOPUV, name);
/* copy data from active UV */
if (layernum) {
- editmesh_loop_copy_customdata(em, CD_MLOOPUV, layernum);
+ const int layernum_dst = CustomData_get_active_layer(&em->bm->ldata, CD_MLOOPUV);
+ BM_data_layer_copy(em->bm, &em->bm->ldata, CD_MLOOPUV, layernum, layernum_dst);
+
is_init = TRUE;
}
if (active_set || layernum == 0) {
@@ -457,7 +424,8 @@ int ED_mesh_color_add(bContext *C, Scene *UNUSED(scene), Object *UNUSED(ob), Mes
BM_data_layer_add_named(em->bm, &em->bm->ldata, CD_MLOOPCOL, name);
/* copy data from active vertex color layer */
if (layernum) {
- editmesh_loop_copy_customdata(em, CD_MLOOPCOL, layernum);
+ const int layernum_dst = CustomData_get_active_layer(&em->bm->ldata, CD_MLOOPCOL);
+ BM_data_layer_copy(em->bm, &em->bm->ldata, CD_MLOOPUV, layernum, layernum_dst);
}
if (active_set || layernum == 0) {
CustomData_set_layer_active(&em->bm->ldata, CD_MLOOPCOL, layernum);
@@ -588,11 +556,11 @@ static int drop_named_image_invoke(bContext *C, wmOperator *op, wmEvent *event)
char path[FILE_MAX];
RNA_string_get(op->ptr, "filepath", path);
- ima = BKE_add_image_file(path);
+ ima = BKE_image_load_exists(path);
}
else {
RNA_string_get(op->ptr, "name", name);
- ima = (Image *)find_id("IM", name);
+ ima = (Image *)BKE_libblock_find_name(ID_IM, name);
}
if (!ima) {
@@ -840,16 +808,16 @@ void ED_mesh_update(Mesh *mesh, bContext *C, int calc_edges, int calc_tessface)
* contain the normal of the poly the face was tessellated from. */
face_nors = CustomData_add_layer(&mesh->fdata, CD_NORMAL, CD_CALLOC, NULL, mesh->totface);
- mesh_calc_normals_mapping_ex(mesh->mvert, mesh->totvert,
- mesh->mloop, mesh->mpoly,
- mesh->totloop, mesh->totpoly,
- NULL /* polyNors_r */,
- mesh->mface, mesh->totface,
- polyindex, face_nors, FALSE);
+ BKE_mesh_calc_normals_mapping_ex(mesh->mvert, mesh->totvert,
+ mesh->mloop, mesh->mpoly,
+ mesh->totloop, mesh->totpoly,
+ NULL /* polyNors_r */,
+ mesh->mface, mesh->totface,
+ polyindex, face_nors, FALSE);
#else
- mesh_calc_normals(mesh->mvert, mesh->totvert,
- mesh->mloop, mesh->mpoly, mesh->totloop, mesh->totpoly,
- NULL);
+ BKE_mesh_calc_normals(mesh->mvert, mesh->totvert,
+ mesh->mloop, mesh->mpoly, mesh->totloop, mesh->totpoly,
+ NULL);
(void)polyindex;
(void)face_nors;
#endif
@@ -1170,13 +1138,13 @@ void ED_mesh_polys_add(Mesh *mesh, ReportList *reports, int count)
void ED_mesh_calc_normals(Mesh *mesh)
{
#ifdef USE_BMESH_MPOLY_NORMALS
- mesh_calc_normals_mapping_ex(mesh->mvert, mesh->totvert,
- mesh->mloop, mesh->mpoly, mesh->totloop, mesh->totpoly,
- NULL, NULL, 0, NULL, NULL, FALSE);
+ BKE_mesh_calc_normals_mapping_ex(mesh->mvert, mesh->totvert,
+ mesh->mloop, mesh->mpoly, mesh->totloop, mesh->totpoly,
+ NULL, NULL, 0, NULL, NULL, FALSE);
#else
- mesh_calc_normals(mesh->mvert, mesh->totvert,
- mesh->mloop, mesh->mpoly, mesh->totloop, mesh->totpoly,
- NULL);
+ BKE_mesh_calc_normals(mesh->mvert, mesh->totvert,
+ mesh->mloop, mesh->mpoly, mesh->totloop, mesh->totpoly,
+ NULL);
#endif
}
diff --git a/source/blender/editors/mesh/mesh_intern.h b/source/blender/editors/mesh/mesh_intern.h
index 27b1cb6ad54..cf17fce2971 100644
--- a/source/blender/editors/mesh/mesh_intern.h
+++ b/source/blender/editors/mesh/mesh_intern.h
@@ -78,9 +78,6 @@ int EDBM_op_finish(struct BMEditMesh *em, struct BMOperator *bmop,
struct wmOperator *op, const int report);
void EDBM_flag_disable_all(struct BMEditMesh *em, const char hflag);
-void EDBM_editselection_store(struct BMEditMesh *em, struct BMHeader *ele);
-void EDBM_editselection_validate(struct BMEditMesh *em);
-void EDBM_editselection_remove(struct BMEditMesh *em, struct BMHeader *ele);
void EDBM_stats_update(struct BMEditMesh *em);
/* TODO, move to math_geometry.c */
@@ -109,7 +106,7 @@ void MESH_OT_duplicate(struct wmOperatorType *ot);
extern int EM_view3d_poll(struct bContext *C);
-struct wmKeyMap* knifetool_modal_keymap(struct wmKeyConfig *keyconf);
+struct wmKeyMap *knifetool_modal_keymap(struct wmKeyConfig *keyconf);
/* ******************* knifetool.c */
@@ -150,8 +147,6 @@ extern struct EnumPropertyItem *corner_type_items;
void MESH_OT_merge(struct wmOperatorType *ot);
void MESH_OT_subdivide(struct wmOperatorType *ot);
void MESH_OT_remove_doubles(struct wmOperatorType *ot);
-void MESH_OT_vertices_randomize(struct wmOperatorType *ot);
-void MESH_OT_vertices_sort(struct wmOperatorType *ot);
void MESH_OT_spin(struct wmOperatorType *ot);
void MESH_OT_screw(struct wmOperatorType *ot);
@@ -186,7 +181,7 @@ void MESH_OT_rip(struct wmOperatorType *ot);
void MESH_OT_shape_propagate_to_all(struct wmOperatorType *ot);
void MESH_OT_blend_from_shape(struct wmOperatorType *ot);
-void MESH_OT_sort_faces(struct wmOperatorType *ot);
+void MESH_OT_sort_elements(struct wmOperatorType *ot);
/* ******************* mesh_data.c */
@@ -214,8 +209,11 @@ void MESH_OT_bevel(struct wmOperatorType *ot);
void MESH_OT_bridge_edge_loops(struct wmOperatorType *ot);
void MESH_OT_inset(struct wmOperatorType *ot);
+void MESH_OT_wireframe(struct wmOperatorType *ot);
void MESH_OT_vert_slide(struct wmOperatorType *ot);
+void MESH_OT_convex_hull(struct wmOperatorType *ot);
+
/* ******************* mesh_navmesh.c */
void MESH_OT_navmesh_make(struct wmOperatorType *ot);
void MESH_OT_navmesh_face_copy(struct wmOperatorType *ot);
diff --git a/source/blender/editors/mesh/mesh_navmesh.c b/source/blender/editors/mesh/mesh_navmesh.c
index 71aaacb7e49..14d20d68455 100644
--- a/source/blender/editors/mesh/mesh_navmesh.c
+++ b/source/blender/editors/mesh/mesh_navmesh.c
@@ -316,7 +316,8 @@ static Object *createRepresentation(bContext *C, struct recast_polyMesh *pmesh,
}
else {
obedit = base->object;
- scene_select_base(scene, base);
+ BKE_scene_base_deselect_all(scene);
+ BKE_scene_base_select(scene, base);
copy_v3_v3(obedit->loc, co);
copy_v3_v3(obedit->rot, rot);
}
@@ -430,7 +431,8 @@ static int navmesh_create_exec(bContext *C, wmOperator *op)
LinkNode *obs = NULL;
Base *navmeshBase = NULL;
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases)
+ {
if (base->object->type == OB_MESH) {
if (base->object->body_type == OB_BODY_TYPE_NAVMESH) {
if (!navmeshBase || base == scene->basact) {
diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c
index 4b4fef53275..98dce10779f 100644
--- a/source/blender/editors/mesh/mesh_ops.c
+++ b/source/blender/editors/mesh/mesh_ops.c
@@ -87,8 +87,6 @@ void ED_operatortypes_mesh(void)
WM_operatortype_append(MESH_OT_primitive_ico_sphere_add);
WM_operatortype_append(MESH_OT_duplicate);
WM_operatortype_append(MESH_OT_remove_doubles);
- WM_operatortype_append(MESH_OT_vertices_sort);
- WM_operatortype_append(MESH_OT_vertices_randomize);
WM_operatortype_append(MESH_OT_spin);
WM_operatortype_append(MESH_OT_screw);
@@ -118,7 +116,7 @@ void ED_operatortypes_mesh(void)
WM_operatortype_append(MESH_OT_dissolve_limited);
WM_operatortype_append(MESH_OT_faces_shade_smooth);
WM_operatortype_append(MESH_OT_faces_shade_flat);
- WM_operatortype_append(MESH_OT_sort_faces);
+ WM_operatortype_append(MESH_OT_sort_elements);
WM_operatortype_append(MESH_OT_delete);
WM_operatortype_append(MESH_OT_edge_collapse);
@@ -164,8 +162,11 @@ void ED_operatortypes_mesh(void)
WM_operatortype_append(MESH_OT_bridge_edge_loops);
WM_operatortype_append(MESH_OT_inset);
+ WM_operatortype_append(MESH_OT_wireframe);
WM_operatortype_append(MESH_OT_edge_split);
+ WM_operatortype_append(MESH_OT_convex_hull);
+
#ifdef WITH_GAMEENGINE
WM_operatortype_append(MESH_OT_navmesh_make);
WM_operatortype_append(MESH_OT_navmesh_face_copy);
@@ -194,49 +195,49 @@ void ED_operatormacros_mesh(void)
wmOperatorType *ot;
wmOperatorTypeMacro *otmacro;
- ot = WM_operatortype_append_macro("MESH_OT_loopcut_slide", "Loop Cut and Slide", OPTYPE_UNDO | OPTYPE_REGISTER);
- ot->description = "Cut mesh loop and slide it";
+ ot = WM_operatortype_append_macro("MESH_OT_loopcut_slide", "Loop Cut and Slide", "Cut mesh loop and slide it",
+ OPTYPE_UNDO | OPTYPE_REGISTER);
WM_operatortype_macro_define(ot, "MESH_OT_loopcut");
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_edge_slide");
RNA_struct_idprops_unset(otmacro->ptr, "release_confirm");
- ot = WM_operatortype_append_macro("MESH_OT_duplicate_move", "Add Duplicate", OPTYPE_UNDO | OPTYPE_REGISTER);
- ot->description = "Duplicate mesh and move";
+ ot = WM_operatortype_append_macro("MESH_OT_duplicate_move", "Add Duplicate", "Duplicate mesh and move",
+ OPTYPE_UNDO | OPTYPE_REGISTER);
WM_operatortype_macro_define(ot, "MESH_OT_duplicate");
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_enum_set(otmacro->ptr, "proportional", 0);
RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
- ot = WM_operatortype_append_macro("MESH_OT_rip_move", "Rip", OPTYPE_UNDO | OPTYPE_REGISTER);
- ot->description = "Rip polygons and move the result";
+ ot = WM_operatortype_append_macro("MESH_OT_rip_move", "Rip", "Rip polygons and move the result",
+ OPTYPE_UNDO | OPTYPE_REGISTER);
WM_operatortype_macro_define(ot, "MESH_OT_rip");
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_enum_set(otmacro->ptr, "proportional", 0);
RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
- ot = WM_operatortype_append_macro("MESH_OT_extrude_region_move", "Extrude Region and Move", OPTYPE_UNDO | OPTYPE_REGISTER);
- ot->description = "Extrude region and move result";
+ ot = WM_operatortype_append_macro("MESH_OT_extrude_region_move", "Extrude Region and Move",
+ "Extrude region and move result", OPTYPE_UNDO | OPTYPE_REGISTER);
otmacro = WM_operatortype_macro_define(ot, "MESH_OT_extrude_region");
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_enum_set(otmacro->ptr, "proportional", 0);
RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
- ot = WM_operatortype_append_macro("MESH_OT_extrude_faces_move", "Extrude Individual Faces and Move", OPTYPE_UNDO | OPTYPE_REGISTER);
- ot->description = "Extrude faces and move result";
+ ot = WM_operatortype_append_macro("MESH_OT_extrude_faces_move", "Extrude Individual Faces and Move",
+ "Extrude faces and move result", OPTYPE_UNDO | OPTYPE_REGISTER);
otmacro = WM_operatortype_macro_define(ot, "MESH_OT_extrude_faces_indiv");
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_shrink_fatten");
RNA_enum_set(otmacro->ptr, "proportional", 0);
RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
- ot = WM_operatortype_append_macro("MESH_OT_extrude_edges_move", "Extrude Only Edges and Move", OPTYPE_UNDO | OPTYPE_REGISTER);
- ot->description = "Extrude edges and move result";
+ ot = WM_operatortype_append_macro("MESH_OT_extrude_edges_move", "Extrude Only Edges and Move",
+ "Extrude edges and move result", OPTYPE_UNDO | OPTYPE_REGISTER);
otmacro = WM_operatortype_macro_define(ot, "MESH_OT_extrude_edges_indiv");
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_enum_set(otmacro->ptr, "proportional", 0);
RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
- ot = WM_operatortype_append_macro("MESH_OT_extrude_vertices_move", "Extrude Only Vertices and Move", OPTYPE_UNDO | OPTYPE_REGISTER);
- ot->description = "Extrude vertices and move result";
+ ot = WM_operatortype_append_macro("MESH_OT_extrude_vertices_move", "Extrude Only Vertices and Move",
+ "Extrude vertices and move result", OPTYPE_UNDO | OPTYPE_REGISTER);
otmacro = WM_operatortype_macro_define(ot, "MESH_OT_extrude_verts_indiv");
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_enum_set(otmacro->ptr, "proportional", 0);
@@ -350,11 +351,11 @@ void ED_keymap_mesh(wmKeyConfig *keyconf)
kmi = WM_keymap_add_item(keymap, "MESH_OT_knife_tool", KKEY, KM_PRESS, 0, 0);
RNA_boolean_set(kmi->ptr, "use_occlude_geometry", TRUE);
- RNA_boolean_set(kmi->ptr, "only_select", FALSE);
+ RNA_boolean_set(kmi->ptr, "only_selected", FALSE);
kmi = WM_keymap_add_item(keymap, "MESH_OT_knife_tool", KKEY, KM_PRESS, KM_SHIFT, 0);
RNA_boolean_set(kmi->ptr, "use_occlude_geometry", FALSE);
- RNA_boolean_set(kmi->ptr, "only_select", TRUE);
+ RNA_boolean_set(kmi->ptr, "only_selected", TRUE);
WM_keymap_add_item(keymap, "OBJECT_OT_vertex_parent_set", PKEY, KM_PRESS, KM_CTRL, 0);
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c
index 7c02f26dbdc..aa89eaa0c6d 100644
--- a/source/blender/editors/mesh/meshtools.c
+++ b/source/blender/editors/mesh/meshtools.c
@@ -122,7 +122,8 @@ int join_mesh_exec(bContext *C, wmOperator *op)
}
/* count & check */
- CTX_DATA_BEGIN(C, Base *, base, selected_editable_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases)
+ {
if (base->object->type == OB_MESH) {
me = base->object->data;
@@ -181,7 +182,7 @@ int join_mesh_exec(bContext *C, wmOperator *op)
*/
if (key) {
/* make a duplicate copy that will only be used here... (must remember to free it!) */
- nkey = copy_key(key);
+ nkey = BKE_key_copy(key);
/* for all keys in old block, clear data-arrays */
for (kb = key->block.first; kb; kb = kb->next) {
@@ -198,7 +199,7 @@ int join_mesh_exec(bContext *C, wmOperator *op)
}
/* first pass over objects - copying materials and vertexgroups across */
- CTX_DATA_BEGIN(C, Base *, base, selected_editable_bases)
+ CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases)
{
/* only act if a mesh, and not the one we're joining to */
if ((ob != base->object) && (base->object->type == OB_MESH)) {
@@ -299,7 +300,7 @@ int join_mesh_exec(bContext *C, wmOperator *op)
/* inverse transform for all selected meshes in this object */
invert_m4_m4(imat, ob->obmat);
- CTX_DATA_BEGIN(C, Base *, base, selected_editable_bases)
+ CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases)
{
/* only join if this is a mesh */
if (base->object->type == OB_MESH) {
@@ -523,13 +524,13 @@ int join_mesh_exec(bContext *C, wmOperator *op)
#if 0
/* free it's ipo too - both are not actually freed from memory yet as ID-blocks */
if (nkey->ipo) {
- free_ipo(nkey->ipo);
+ BKE_ipo_free(nkey->ipo);
BLI_remlink(&bmain->ipo, nkey->ipo);
MEM_freeN(nkey->ipo);
}
#endif
- free_key(nkey);
+ BKE_key_free(nkey);
BLI_remlink(&bmain->key, nkey);
MEM_freeN(nkey);
}
@@ -569,7 +570,8 @@ int join_mesh_shapes_exec(bContext *C, wmOperator *op)
KeyBlock *kb;
int ok = 0, nonequal_verts = 0;
- CTX_DATA_BEGIN(C, Base *, base, selected_editable_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases)
+ {
if (base->object == ob) continue;
if (base->object->type == OB_MESH) {
@@ -601,7 +603,7 @@ int join_mesh_shapes_exec(bContext *C, wmOperator *op)
}
/* now ready to add new keys from selected meshes */
- CTX_DATA_BEGIN(C, Base *, base, selected_editable_bases)
+ CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases)
{
if (base->object == ob) continue;
@@ -641,13 +643,13 @@ typedef struct MocNode {
intptr_t index[MOC_NODE_RES];
} MocNode;
-static int mesh_octree_get_base_offs(float *co, float *offs, float *div)
+static int mesh_octree_get_base_offs(const float co[3], const float offs[3], const float div[3])
{
int vx, vy, vz;
- vx = floor( (co[0] - offs[0]) / div[0]);
- vy = floor( (co[1] - offs[1]) / div[1]);
- vz = floor( (co[2] - offs[2]) / div[2]);
+ vx = floor((co[0] - offs[0]) / div[0]);
+ vy = floor((co[1] - offs[1]) / div[1]);
+ vz = floor((co[2] - offs[2]) / div[2]);
CLAMP(vx, 0, MOC_RES - 1);
CLAMP(vy, 0, MOC_RES - 1);
@@ -736,7 +738,7 @@ static void mesh_octree_add_nodes(MocNode **basetable, float *co, float *offs, f
}
-static intptr_t mesh_octree_find_index(MocNode **bt, MVert *mvert, float *co)
+static intptr_t mesh_octree_find_index(MocNode **bt, MVert *mvert, const float co[3])
{
float *vec;
int a;
@@ -773,7 +775,7 @@ static struct {
/* mode is 's' start, or 'e' end, or 'u' use */
/* if end, ob can be NULL */
-intptr_t mesh_octree_table(Object *ob, BMEditMesh *em, float *co, char mode)
+intptr_t mesh_octree_table(Object *ob, BMEditMesh *em, const float co[3], char mode)
{
MocNode **bt;
@@ -920,7 +922,7 @@ int mesh_get_x_mirror_vert(Object *ob, int index)
return 0;
}
-static BMVert *editbmesh_get_x_mirror_vert_spacial(Object *ob, BMEditMesh *em, float *co)
+static BMVert *editbmesh_get_x_mirror_vert_spacial(Object *ob, BMEditMesh *em, const float co[3])
{
float vec[3];
intptr_t poinval;
@@ -928,9 +930,10 @@ static BMVert *editbmesh_get_x_mirror_vert_spacial(Object *ob, BMEditMesh *em, f
/* ignore nan verts */
if (!finite(co[0]) ||
!finite(co[1]) ||
- !finite(co[2])
- )
+ !finite(co[2]))
+ {
return NULL;
+ }
vec[0] = -co[0];
vec[1] = co[1];
@@ -971,7 +974,7 @@ static BMVert *editbmesh_get_x_mirror_vert_topo(Object *ob, struct BMEditMesh *e
return NULL;
}
-BMVert *editbmesh_get_x_mirror_vert(Object *ob, struct BMEditMesh *em, BMVert *eve, float *co, int index)
+BMVert *editbmesh_get_x_mirror_vert(Object *ob, struct BMEditMesh *em, BMVert *eve, const float co[3], int index)
{
if (((Mesh *)ob->data)->editflag & ME_EDIT_MIRROR_TOPO) {
return editbmesh_get_x_mirror_vert_topo(ob, em, eve, index);
@@ -1016,7 +1019,7 @@ static float *editmesh_get_mirror_uv(BMEditMesh *em, int axis, float *uv, float
BMFace *efa;
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
- poly_uv_center(em, efa, cent);
+ uv_poly_center(em, efa, cent);
if ( (fabs(cent[0] - cent_vec[0]) < 0.001) && (fabs(cent[1] - cent_vec[1]) < 0.001) ) {
BMIter liter;
diff --git a/source/blender/editors/metaball/mball_edit.c b/source/blender/editors/metaball/mball_edit.c
index 713009d2a19..ed51f53eb03 100644
--- a/source/blender/editors/metaball/mball_edit.c
+++ b/source/blender/editors/metaball/mball_edit.c
@@ -67,24 +67,24 @@
/* This function is used to free all MetaElems from MetaBall */
void free_editMball(Object *obedit)
{
- MetaBall *mb = (MetaBall*)obedit->data;
+ MetaBall *mb = (MetaBall *)obedit->data;
- mb->editelems= NULL;
- mb->lastelem= NULL;
+ mb->editelems = NULL;
+ mb->lastelem = NULL;
}
/* This function is called, when MetaBall Object is
* switched from object mode to edit mode */
void make_editMball(Object *obedit)
{
- MetaBall *mb = (MetaBall*)obedit->data;
- MetaElem *ml;/*, *newml;*/
+ MetaBall *mb = (MetaBall *)obedit->data;
+ MetaElem *ml; /*, *newml;*/
- ml= mb->elems.first;
+ ml = mb->elems.first;
while (ml) {
if (ml->flag & SELECT) mb->lastelem = ml;
- ml= ml->next;
+ ml = ml->next;
}
mb->editelems = &mb->elems;
@@ -100,22 +100,22 @@ void load_editMball(Object *UNUSED(obedit))
/* Add metaelem primitive to metaball object (which is in edit mode) */
MetaElem *add_metaball_primitive(bContext *C, float mat[4][4], int type, int UNUSED(newname))
{
- Object *obedit= CTX_data_edit_object(C);
- MetaBall *mball = (MetaBall*)obedit->data;
+ Object *obedit = CTX_data_edit_object(C);
+ MetaBall *mball = (MetaBall *)obedit->data;
MetaElem *ml;
/* Deselect all existing metaelems */
- ml= mball->editelems->first;
+ ml = mball->editelems->first;
while (ml) {
ml->flag &= ~SELECT;
- ml= ml->next;
+ ml = ml->next;
}
- ml= add_metaball_element(mball, type);
+ ml = BKE_mball_element_add(mball, type);
copy_v3_v3(&ml->x, mat[3]);
ml->flag |= SELECT;
- mball->lastelem= ml;
+ mball->lastelem = ml;
return ml;
}
@@ -125,12 +125,12 @@ MetaElem *add_metaball_primitive(bContext *C, float mat[4][4], int type, int UNU
static int mball_select_all_exec(bContext *C, wmOperator *op)
{
//Scene *scene= CTX_data_scene(C);
- Object *obedit= CTX_data_edit_object(C);
- MetaBall *mb = (MetaBall*)obedit->data;
+ Object *obedit = CTX_data_edit_object(C);
+ MetaBall *mb = (MetaBall *)obedit->data;
MetaElem *ml;
int action = RNA_enum_get(op->ptr, "action");
- ml= mb->editelems->first;
+ ml = mb->editelems->first;
if (ml) {
if (action == SEL_TOGGLE) {
action = SEL_SELECT;
@@ -139,26 +139,26 @@ static int mball_select_all_exec(bContext *C, wmOperator *op)
action = SEL_DESELECT;
break;
}
- ml= ml->next;
+ ml = ml->next;
}
}
- ml= mb->editelems->first;
+ ml = mb->editelems->first;
while (ml) {
switch (action) {
- case SEL_SELECT:
- ml->flag |= SELECT;
- break;
- case SEL_DESELECT:
- ml->flag &= ~SELECT;
- break;
- case SEL_INVERT:
- ml->flag ^= SELECT;
- break;
+ case SEL_SELECT:
+ ml->flag |= SELECT;
+ break;
+ case SEL_DESELECT:
+ ml->flag &= ~SELECT;
+ break;
+ case SEL_INVERT:
+ ml->flag ^= SELECT;
+ break;
}
- ml= ml->next;
+ ml = ml->next;
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, mb);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, mb);
}
return OPERATOR_FINISHED;
@@ -176,7 +176,7 @@ void MBALL_OT_select_all(wmOperatorType *ot)
ot->poll = ED_operator_editmball;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
WM_operator_properties_select_all(ot);
}
@@ -186,16 +186,16 @@ void MBALL_OT_select_all(wmOperatorType *ot)
/* Random metaball selection */
static int select_random_metaelems_exec(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_edit_object(C);
- MetaBall *mb = (MetaBall*)obedit->data;
+ Object *obedit = CTX_data_edit_object(C);
+ MetaBall *mb = (MetaBall *)obedit->data;
MetaElem *ml;
- float percent= RNA_float_get(op->ptr, "percent");
+ float percent = RNA_float_get(op->ptr, "percent");
if (percent == 0.0f)
return OPERATOR_CANCELLED;
- ml= mb->editelems->first;
- BLI_srand( BLI_rand() ); /* Random seed */
+ ml = mb->editelems->first;
+ BLI_srand(BLI_rand()); /* Random seed */
/* Stupid version of random selection. Should be improved. */
while (ml) {
@@ -203,10 +203,10 @@ static int select_random_metaelems_exec(bContext *C, wmOperator *op)
ml->flag |= SELECT;
else
ml->flag &= ~SELECT;
- ml= ml->next;
+ ml = ml->next;
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, mb);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, mb);
return OPERATOR_FINISHED;
}
@@ -225,7 +225,7 @@ void MBALL_OT_select_random_metaelems(struct wmOperatorType *ot)
ot->poll = ED_operator_editmball;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_float_percentage(ot->srna, "percent", 0.5f, 0.0f, 1.0f, "Percent", "Percentage of metaelems to select randomly", 0.0001f, 1.0f);
@@ -236,22 +236,22 @@ void MBALL_OT_select_random_metaelems(struct wmOperatorType *ot)
/* Duplicate selected MetaElements */
static int duplicate_metaelems_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *obedit= CTX_data_edit_object(C);
- MetaBall *mb = (MetaBall*)obedit->data;
+ Object *obedit = CTX_data_edit_object(C);
+ MetaBall *mb = (MetaBall *)obedit->data;
MetaElem *ml, *newml;
- ml= mb->editelems->last;
+ ml = mb->editelems->last;
if (ml) {
while (ml) {
if (ml->flag & SELECT) {
- newml= MEM_dupallocN(ml);
+ newml = MEM_dupallocN(ml);
BLI_addtail(mb->editelems, newml);
- mb->lastelem= newml;
+ mb->lastelem = newml;
ml->flag &= ~SELECT;
}
- ml= ml->prev;
+ ml = ml->prev;
}
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, mb);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, mb);
DAG_id_tag_update(obedit->data, 0);
}
@@ -260,7 +260,7 @@ static int duplicate_metaelems_exec(bContext *C, wmOperator *UNUSED(op))
static int duplicate_metaelems_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
- int retv= duplicate_metaelems_exec(C, op);
+ int retv = duplicate_metaelems_exec(C, op);
if (retv == OPERATOR_FINISHED) {
RNA_enum_set(op->ptr, "mode", TFM_TRANSLATION);
@@ -284,7 +284,7 @@ void MBALL_OT_duplicate_metaelems(wmOperatorType *ot)
ot->poll = ED_operator_editmball;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* to give to transform */
RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, "Mode", "");
@@ -295,22 +295,22 @@ void MBALL_OT_duplicate_metaelems(wmOperatorType *ot)
/* Delete all selected MetaElems (not MetaBall) */
static int delete_metaelems_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *obedit= CTX_data_edit_object(C);
- MetaBall *mb= (MetaBall*)obedit->data;
+ Object *obedit = CTX_data_edit_object(C);
+ MetaBall *mb = (MetaBall *)obedit->data;
MetaElem *ml, *next;
- ml= mb->editelems->first;
+ ml = mb->editelems->first;
if (ml) {
while (ml) {
- next= ml->next;
+ next = ml->next;
if (ml->flag & SELECT) {
- if (mb->lastelem==ml) mb->lastelem= NULL;
+ if (mb->lastelem == ml) mb->lastelem = NULL;
BLI_remlink(mb->editelems, ml);
MEM_freeN(ml);
}
- ml= next;
+ ml = next;
}
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, mb);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, mb);
DAG_id_tag_update(obedit->data, 0);
}
@@ -329,7 +329,7 @@ void MBALL_OT_delete_metaelems(wmOperatorType *ot)
ot->poll = ED_operator_editmball;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/***************************** Hide operator *****************************/
@@ -337,20 +337,20 @@ void MBALL_OT_delete_metaelems(wmOperatorType *ot)
/* Hide selected MetaElems */
static int hide_metaelems_exec(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_edit_object(C);
- MetaBall *mb= (MetaBall*)obedit->data;
+ Object *obedit = CTX_data_edit_object(C);
+ MetaBall *mb = (MetaBall *)obedit->data;
MetaElem *ml;
- const int invert= RNA_boolean_get(op->ptr, "unselected") ? SELECT : 0;
+ const int invert = RNA_boolean_get(op->ptr, "unselected") ? SELECT : 0;
- ml= mb->editelems->first;
+ ml = mb->editelems->first;
if (ml) {
while (ml) {
if ((ml->flag & SELECT) != invert)
ml->flag |= MB_HIDE;
- ml= ml->next;
+ ml = ml->next;
}
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, mb);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, mb);
DAG_id_tag_update(obedit->data, 0);
}
@@ -369,7 +369,7 @@ void MBALL_OT_hide_metaelems(wmOperatorType *ot)
ot->poll = ED_operator_editmball;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* props */
RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected");
@@ -380,18 +380,18 @@ void MBALL_OT_hide_metaelems(wmOperatorType *ot)
/* Unhide all edited MetaElems */
static int reveal_metaelems_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *obedit= CTX_data_edit_object(C);
- MetaBall *mb= (MetaBall*)obedit->data;
+ Object *obedit = CTX_data_edit_object(C);
+ MetaBall *mb = (MetaBall *)obedit->data;
MetaElem *ml;
- ml= mb->editelems->first;
+ ml = mb->editelems->first;
if (ml) {
while (ml) {
ml->flag &= ~MB_HIDE;
- ml= ml->next;
+ ml = ml->next;
}
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, mb);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, mb);
DAG_id_tag_update(obedit->data, 0);
}
@@ -410,69 +410,69 @@ void MBALL_OT_reveal_metaelems(wmOperatorType *ot)
ot->poll = ED_operator_editmball;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* Select MetaElement with mouse click (user can select radius circle or
* stiffness circle) */
int mouse_mball(bContext *C, const int mval[2], int extend)
{
- static MetaElem *startelem=NULL;
- Object *obedit= CTX_data_edit_object(C);
+ static MetaElem *startelem = NULL;
+ Object *obedit = CTX_data_edit_object(C);
ViewContext vc;
- MetaBall *mb = (MetaBall*)obedit->data;
- MetaElem *ml, *act=NULL;
+ MetaBall *mb = (MetaBall *)obedit->data;
+ MetaElem *ml, *act = NULL;
int a, hits;
- unsigned int buffer[4*MAXPICKBUF];
+ unsigned int buffer[4 * MAXPICKBUF];
rcti rect;
view3d_set_viewcontext(C, &vc);
- rect.xmin = mval[0]-12;
- rect.xmax = mval[0]+12;
- rect.ymin = mval[1]-12;
- rect.ymax = mval[1]+12;
+ rect.xmin = mval[0] - 12;
+ rect.xmax = mval[0] + 12;
+ rect.ymin = mval[1] - 12;
+ rect.ymax = mval[1] + 12;
- hits= view3d_opengl_select(&vc, buffer, MAXPICKBUF, &rect);
+ hits = view3d_opengl_select(&vc, buffer, MAXPICKBUF, &rect);
/* does startelem exist? */
- ml= mb->editelems->first;
+ ml = mb->editelems->first;
while (ml) {
- if (ml==startelem) break;
- ml= ml->next;
+ if (ml == startelem) break;
+ ml = ml->next;
}
- if (ml==NULL) startelem= mb->editelems->first;
+ if (ml == NULL) startelem = mb->editelems->first;
- if (hits>0) {
- ml= startelem;
+ if (hits > 0) {
+ ml = startelem;
while (ml) {
- for (a=0; a<hits; a++) {
+ for (a = 0; a < hits; a++) {
/* index converted for gl stuff */
- if (ml->selcol1==buffer[ 4 * a + 3 ]) {
+ if (ml->selcol1 == buffer[4 * a + 3]) {
ml->flag |= MB_SCALE_RAD;
- act= ml;
+ act = ml;
}
- if (ml->selcol2==buffer[ 4 * a + 3 ]) {
+ if (ml->selcol2 == buffer[4 * a + 3]) {
ml->flag &= ~MB_SCALE_RAD;
- act= ml;
+ act = ml;
}
}
if (act) break;
- ml= ml->next;
- if (ml==NULL) ml= mb->editelems->first;
- if (ml==startelem) break;
+ ml = ml->next;
+ if (ml == NULL) ml = mb->editelems->first;
+ if (ml == startelem) break;
}
/* When some metaelem was found, then it is necessary to select or
* deselect it. */
if (act) {
- if (extend==0) {
+ if (extend == 0) {
/* Deselect all existing metaelems */
- ml= mb->editelems->first;
+ ml = mb->editelems->first;
while (ml) {
ml->flag &= ~SELECT;
- ml= ml->next;
+ ml = ml->next;
}
/* Select only metaelem clicked on */
act->flag |= SELECT;
@@ -483,9 +483,9 @@ int mouse_mball(bContext *C, const int mval[2], int extend)
else
act->flag |= SELECT;
}
- mb->lastelem= act;
+ mb->lastelem = act;
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, mb);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, mb);
return 1;
}
@@ -502,54 +502,54 @@ static void freeMetaElemlist(ListBase *lb)
{
MetaElem *ml, *next;
- if (lb==NULL) return;
+ if (lb == NULL) return;
- ml= lb->first;
+ ml = lb->first;
while (ml) {
- next= ml->next;
+ next = ml->next;
BLI_remlink(lb, ml);
MEM_freeN(ml);
- ml= next;
+ ml = next;
}
- lb->first= lb->last= NULL;
+ lb->first = lb->last = NULL;
}
static void undoMball_to_editMball(void *lbu, void *lbe, void *UNUSED(obe))
{
- ListBase *lb= lbu;
- ListBase *editelems= lbe;
+ ListBase *lb = lbu;
+ ListBase *editelems = lbe;
MetaElem *ml, *newml;
freeMetaElemlist(editelems);
/* copy 'undo' MetaElems to 'edit' MetaElems */
- ml= lb->first;
+ ml = lb->first;
while (ml) {
- newml= MEM_dupallocN(ml);
+ newml = MEM_dupallocN(ml);
BLI_addtail(editelems, newml);
- ml= ml->next;
+ ml = ml->next;
}
}
static void *editMball_to_undoMball(void *lbe, void *UNUSED(obe))
{
- ListBase *editelems= lbe;
+ ListBase *editelems = lbe;
ListBase *lb;
MetaElem *ml, *newml;
/* allocate memory for undo ListBase */
- lb= MEM_callocN(sizeof(ListBase), "listbase undo");
- lb->first= lb->last= NULL;
+ lb = MEM_callocN(sizeof(ListBase), "listbase undo");
+ lb->first = lb->last = NULL;
/* copy contents of current ListBase to the undo ListBase */
- ml= editelems->first;
+ ml = editelems->first;
while (ml) {
- newml= MEM_dupallocN(ml);
+ newml = MEM_dupallocN(ml);
BLI_addtail(lb, newml);
- ml= ml->next;
+ ml = ml->next;
}
return lb;
@@ -558,7 +558,7 @@ static void *editMball_to_undoMball(void *lbe, void *UNUSED(obe))
/* free undo ListBase of MetaElems */
static void free_undoMball(void *lbv)
{
- ListBase *lb= lbv;
+ ListBase *lb = lbv;
freeMetaElemlist(lb);
MEM_freeN(lb);
@@ -566,8 +566,8 @@ static void free_undoMball(void *lbv)
static ListBase *metaball_get_editelems(Object *ob)
{
- if (ob && ob->type==OB_MBALL) {
- struct MetaBall *mb= (struct MetaBall*)ob->data;
+ if (ob && ob->type == OB_MBALL) {
+ struct MetaBall *mb = (struct MetaBall *)ob->data;
return mb->editelems;
}
return NULL;
@@ -576,7 +576,7 @@ static ListBase *metaball_get_editelems(Object *ob)
static void *get_data(bContext *C)
{
- Object *obedit= CTX_data_edit_object(C);
+ Object *obedit = CTX_data_edit_object(C);
return metaball_get_editelems(obedit);
}
diff --git a/source/blender/editors/metaball/mball_ops.c b/source/blender/editors/metaball/mball_ops.c
index 5d019cc49d9..1c77eba2019 100644
--- a/source/blender/editors/metaball/mball_ops.c
+++ b/source/blender/editors/metaball/mball_ops.c
@@ -75,9 +75,9 @@ void ED_keymap_metaball(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "MBALL_OT_duplicate_metaelems", DKEY, KM_PRESS, KM_SHIFT, 0);
kmi = WM_keymap_add_item(keymap, "MBALL_OT_select_all", AKEY, KM_PRESS, 0, 0);
- RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE);
+ RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE);
kmi = WM_keymap_add_item(keymap, "MBALL_OT_select_all", IKEY, KM_PRESS, KM_CTRL, 0);
- RNA_enum_set(kmi->ptr, "action", SEL_INVERT);
+ RNA_enum_set(kmi->ptr, "action", SEL_INVERT);
ED_object_generic_keymap(keyconf, keymap, 3);
}
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index 3717591e412..466338a736f 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -111,8 +111,8 @@
void ED_object_location_from_view(bContext *C, float *loc)
{
- View3D *v3d= CTX_wm_view3d(C);
- Scene *scene= CTX_data_scene(C);
+ View3D *v3d = CTX_wm_view3d(C);
+ Scene *scene = CTX_data_scene(C);
float *cursor;
cursor = give_cursor(scene, v3d);
@@ -122,11 +122,11 @@ void ED_object_location_from_view(bContext *C, float *loc)
void ED_object_rotation_from_view(bContext *C, float *rot)
{
- RegionView3D *rv3d= CTX_wm_region_view3d(C);
+ RegionView3D *rv3d = CTX_wm_region_view3d(C);
if (rv3d) {
float quat[4];
copy_qt_qt(quat, rv3d->viewquat);
- quat[0]= -quat[0];
+ quat[0] = -quat[0];
quat_to_eul(rot, quat);
}
else {
@@ -136,8 +136,8 @@ void ED_object_rotation_from_view(bContext *C, float *rot)
void ED_object_base_init_transform(bContext *C, Base *base, float *loc, float *rot)
{
- Object *ob= base->object;
- Scene *scene= CTX_data_scene(C);
+ Object *ob = base->object;
+ Scene *scene = CTX_data_scene(C);
if (!scene) return;
@@ -147,7 +147,7 @@ void ED_object_base_init_transform(bContext *C, Base *base, float *loc, float *r
if (rot)
copy_v3_v3(ob->rot, rot);
- where_is_object(scene, ob);
+ BKE_object_where_is_calc(scene, ob);
}
/* uses context to figure out transform for primitive */
@@ -195,19 +195,19 @@ void ED_object_add_generic_props(wmOperatorType *ot, int do_editmode)
if (do_editmode) {
prop = RNA_def_boolean(ot->srna, "enter_editmode", 0, "Enter Editmode",
- "Enter editmode when adding this object");
- RNA_def_property_flag(prop, PROP_HIDDEN|PROP_SKIP_SAVE);
+ "Enter editmode when adding this object");
+ RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
}
prop = RNA_def_float_vector_xyz(ot->srna, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location",
- "Location for the newly added object", -FLT_MAX, FLT_MAX);
+ "Location for the newly added object", -FLT_MAX, FLT_MAX);
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
prop = RNA_def_float_rotation(ot->srna, "rotation", 3, NULL, -FLT_MAX, FLT_MAX, "Rotation",
- "Rotation for the newly added object", (float)-M_PI * 2.0f, (float)M_PI * 2.0f);
+ "Rotation for the newly added object", (float)-M_PI * 2.0f, (float)M_PI * 2.0f);
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
prop = RNA_def_boolean_layer_member(ot->srna, "layers", 20, NULL, "Layer", "");
- RNA_def_property_flag(prop, PROP_HIDDEN|PROP_SKIP_SAVE);
+ RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
}
static void object_add_generic_invoke_options(bContext *C, wmOperator *op)
@@ -229,14 +229,14 @@ static void object_add_generic_invoke_options(bContext *C, wmOperator *op)
int a, values[20], layer;
if (v3d) {
- layer = (v3d->scenelock && !v3d->localvd)? scene->layact: v3d->layact;
+ layer = (v3d->scenelock && !v3d->localvd) ? scene->layact : v3d->layact;
}
else {
layer = scene->layact;
}
- for (a=0; a<20; a++) {
- values[a]= (layer & (1<<a));
+ for (a = 0; a < 20; a++) {
+ values[a] = (layer & (1 << a));
}
RNA_boolean_set_array(op->ptr, "layers", values);
@@ -250,7 +250,7 @@ int ED_object_add_generic_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(ev
}
int ED_object_add_generic_get_opts(bContext *C, wmOperator *op, float *loc,
- float *rot, int *enter_editmode, unsigned int *layer, int *is_view_aligned)
+ float *rot, int *enter_editmode, unsigned int *layer, int *is_view_aligned)
{
View3D *v3d = CTX_wm_view3d(C);
int a, layer_values[20];
@@ -263,8 +263,8 @@ int ED_object_add_generic_get_opts(bContext *C, wmOperator *op, float *loc,
if (RNA_struct_property_is_set(op->ptr, "layers")) {
RNA_boolean_get_array(op->ptr, "layers", layer_values);
- *layer= 0;
- for (a=0; a<20; a++) {
+ *layer = 0;
+ for (a = 0; a < 20; a++) {
if (layer_values[a])
*layer |= (1 << a);
else
@@ -314,18 +314,18 @@ int ED_object_add_generic_get_opts(bContext *C, wmOperator *op, float *loc,
/* for object add primitive operators */
/* do not call undo push in this function (users of this function have to) */
Object *ED_object_add_type(bContext *C, int type, float *loc, float *rot,
- int enter_editmode, unsigned int layer)
+ int enter_editmode, unsigned int layer)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
Object *ob;
/* for as long scene has editmode... */
if (CTX_data_edit_object(C))
- ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR|EM_DO_UNDO); /* freedata, and undo */
+ ED_object_exit_editmode(C, EM_FREEDATA | EM_FREEUNDO | EM_WAITCURSOR | EM_DO_UNDO); /* freedata, and undo */
/* deselects all, sets scene->basact */
- ob= add_object(scene, type);
+ ob = BKE_object_add(scene, type);
BASACT->lay = ob->lay = layer;
/* editor level activate, notifiers */
ED_base_object_activate(C, BASACT);
@@ -342,7 +342,7 @@ Object *ED_object_add_type(bContext *C, int type, float *loc, float *rot,
if (enter_editmode)
ED_object_enter_editmode(C, EM_IGNORE_LAYER);
- WM_event_add_notifier(C, NC_SCENE|ND_LAYER_CONTENT, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_LAYER_CONTENT, scene);
return ob;
}
@@ -376,7 +376,7 @@ void OBJECT_OT_add(wmOperatorType *ot)
ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_enum(ot->srna, "type", object_type_items, 0, "Type", "");
@@ -414,23 +414,23 @@ static Object *effector_add_type(bContext *C, wmOperator *op, int type)
if (!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL))
return NULL;
- if (type==PFIELD_GUIDE) {
- ob= ED_object_add_type(C, OB_CURVE, loc, rot, FALSE, layer);
+ if (type == PFIELD_GUIDE) {
+ ob = ED_object_add_type(C, OB_CURVE, loc, rot, FALSE, layer);
rename_id(&ob->id, "CurveGuide");
- ((Curve*)ob->data)->flag |= CU_PATH|CU_3D;
+ ((Curve *)ob->data)->flag |= CU_PATH | CU_3D;
ED_object_enter_editmode(C, 0);
ED_object_new_primitive_matrix(C, ob, loc, rot, mat);
- BLI_addtail(object_editcurve_get(ob), add_nurbs_primitive(C, mat, CU_NURBS|CU_PRIM_PATH, 1));
+ BLI_addtail(object_editcurve_get(ob), add_nurbs_primitive(C, mat, CU_NURBS | CU_PRIM_PATH, 1));
if (!enter_editmode)
ED_object_exit_editmode(C, EM_FREEDATA);
}
else {
- ob= ED_object_add_type(C, OB_EMPTY, loc, rot, FALSE, layer);
+ ob = ED_object_add_type(C, OB_EMPTY, loc, rot, FALSE, layer);
rename_id(&ob->id, "Field");
- switch(type) {
+ switch (type) {
case PFIELD_WIND:
case PFIELD_VORTEX:
ob->empty_drawtype = OB_SINGLE_ARROW;
@@ -438,7 +438,7 @@ static Object *effector_add_type(bContext *C, wmOperator *op, int type)
}
}
- ob->pd= object_add_collision_fields(type);
+ ob->pd = object_add_collision_fields(type);
DAG_scene_sort(CTX_data_main(C), CTX_data_scene(C));
@@ -468,7 +468,7 @@ void OBJECT_OT_effector_add(wmOperatorType *ot)
ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
ot->prop = RNA_def_enum(ot->srna, "type", field_type_items, 0, "Type", "");
@@ -480,7 +480,7 @@ void OBJECT_OT_effector_add(wmOperatorType *ot)
static int object_camera_add_exec(bContext *C, wmOperator *op)
{
View3D *v3d = CTX_wm_view3d(C);
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
Object *ob;
int enter_editmode;
unsigned int layer;
@@ -494,12 +494,12 @@ static int object_camera_add_exec(bContext *C, wmOperator *op)
if (!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL))
return OPERATOR_CANCELLED;
- ob= ED_object_add_type(C, OB_CAMERA, loc, rot, FALSE, layer);
+ ob = ED_object_add_type(C, OB_CAMERA, loc, rot, FALSE, layer);
if (v3d) {
if (v3d->camera == NULL)
v3d->camera = ob;
- if (v3d->scenelock && scene->camera==NULL) {
+ if (v3d->scenelock && scene->camera == NULL) {
scene->camera = ob;
}
}
@@ -521,12 +521,12 @@ void OBJECT_OT_camera_add(wmOperatorType *ot)
ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
ED_object_add_generic_props(ot, TRUE);
/* hide this for cameras, default */
- prop= RNA_struct_type_find_property(ot->srna, "view_align");
+ prop = RNA_struct_type_find_property(ot->srna, "view_align");
RNA_def_property_flag(prop, PROP_HIDDEN);
}
@@ -535,9 +535,9 @@ void OBJECT_OT_camera_add(wmOperatorType *ot)
/* ***************** add primitives *************** */
static int object_metaball_add_exec(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_edit_object(C);
+ Object *obedit = CTX_data_edit_object(C);
/*MetaElem *elem;*/ /*UNUSED*/
- int newob= 0;
+ int newob = 0;
int enter_editmode;
unsigned int layer;
float loc[3], rot[3];
@@ -548,8 +548,8 @@ static int object_metaball_add_exec(bContext *C, wmOperator *op)
if (!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL))
return OPERATOR_CANCELLED;
- if (obedit==NULL || obedit->type!=OB_MBALL) {
- obedit= ED_object_add_type(C, OB_MBALL, loc, rot, TRUE, layer);
+ if (obedit == NULL || obedit->type != OB_MBALL) {
+ obedit = ED_object_add_type(C, OB_MBALL, loc, rot, TRUE, layer);
newob = 1;
}
else DAG_id_tag_update(&obedit->id, OB_RECALC_DATA);
@@ -563,21 +563,21 @@ static int object_metaball_add_exec(bContext *C, wmOperator *op)
ED_object_exit_editmode(C, EM_FREEDATA);
}
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, obedit);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, obedit);
return OPERATOR_FINISHED;
}
static int object_metaball_add_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
- Object *obedit= CTX_data_edit_object(C);
+ Object *obedit = CTX_data_edit_object(C);
uiPopupMenu *pup;
uiLayout *layout;
object_add_generic_invoke_options(C, op);
- pup= uiPupMenuBegin(C, op->type->name, ICON_NONE);
- layout= uiPupMenuLayout(pup);
+ pup = uiPupMenuBegin(C, op->type->name, ICON_NONE);
+ layout = uiPupMenuLayout(pup);
if (!obedit || obedit->type == OB_MBALL)
uiItemsEnumO(layout, op->type->idname, "type");
else
@@ -600,7 +600,7 @@ void OBJECT_OT_metaball_add(wmOperatorType *ot)
ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_enum(ot->srna, "type", metaelem_type_items, 0, "Primitive", "");
ED_object_add_generic_props(ot, TRUE);
@@ -608,7 +608,7 @@ void OBJECT_OT_metaball_add(wmOperatorType *ot)
static int object_add_text_exec(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_edit_object(C);
+ Object *obedit = CTX_data_edit_object(C);
int enter_editmode;
unsigned int layer;
float loc[3], rot[3];
@@ -617,12 +617,12 @@ static int object_add_text_exec(bContext *C, wmOperator *op)
if (!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL))
return OPERATOR_CANCELLED;
- if (obedit && obedit->type==OB_FONT)
+ if (obedit && obedit->type == OB_FONT)
return OPERATOR_CANCELLED;
- obedit= ED_object_add_type(C, OB_FONT, loc, rot, enter_editmode, layer);
+ obedit = ED_object_add_type(C, OB_FONT, loc, rot, enter_editmode, layer);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, obedit);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, obedit);
return OPERATOR_FINISHED;
}
@@ -640,16 +640,16 @@ void OBJECT_OT_text_add(wmOperatorType *ot)
ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
ED_object_add_generic_props(ot, TRUE);
}
static int object_armature_add_exec(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_edit_object(C);
- View3D *v3d= CTX_wm_view3d(C);
- RegionView3D *rv3d= CTX_wm_region_view3d(C);
- int newob= 0;
+ Object *obedit = CTX_data_edit_object(C);
+ View3D *v3d = CTX_wm_view3d(C);
+ RegionView3D *rv3d = CTX_wm_region_view3d(C);
+ int newob = 0;
int enter_editmode;
unsigned int layer;
float loc[3], rot[3];
@@ -658,14 +658,14 @@ static int object_armature_add_exec(bContext *C, wmOperator *op)
if (!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL))
return OPERATOR_CANCELLED;
- if ((obedit==NULL) || (obedit->type != OB_ARMATURE)) {
- obedit= ED_object_add_type(C, OB_ARMATURE, loc, rot, TRUE, layer);
+ if ((obedit == NULL) || (obedit->type != OB_ARMATURE)) {
+ obedit = ED_object_add_type(C, OB_ARMATURE, loc, rot, TRUE, layer);
ED_object_enter_editmode(C, 0);
newob = 1;
}
else DAG_id_tag_update(&obedit->id, OB_RECALC_DATA);
- if (obedit==NULL) {
+ if (obedit == NULL) {
BKE_report(op->reports, RPT_ERROR, "Cannot create editmode armature");
return OPERATOR_CANCELLED;
}
@@ -677,7 +677,7 @@ static int object_armature_add_exec(bContext *C, wmOperator *op)
if (newob && !enter_editmode)
ED_object_exit_editmode(C, EM_FREEDATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, obedit);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, obedit);
return OPERATOR_FINISHED;
}
@@ -695,7 +695,7 @@ void OBJECT_OT_armature_add(wmOperatorType *ot)
ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
ED_object_add_generic_props(ot, TRUE);
}
@@ -714,10 +714,10 @@ static const char *get_lamp_defname(int type)
static int object_lamp_add_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
Object *ob;
Lamp *la;
- int type= RNA_enum_get(op->ptr, "type");
+ int type = RNA_enum_get(op->ptr, "type");
int enter_editmode;
unsigned int layer;
float loc[3], rot[3];
@@ -726,16 +726,16 @@ static int object_lamp_add_exec(bContext *C, wmOperator *op)
if (!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL))
return OPERATOR_CANCELLED;
- ob= ED_object_add_type(C, OB_LAMP, loc, rot, FALSE, layer);
- la= (Lamp*)ob->data;
+ ob = ED_object_add_type(C, OB_LAMP, loc, rot, FALSE, layer);
+ la = (Lamp *)ob->data;
- la->type= type;
+ la->type = type;
rename_id(&ob->id, get_lamp_defname(type));
rename_id(&la->id, get_lamp_defname(type));
- if (scene_use_new_shading_nodes(scene)) {
+ if (BKE_scene_use_new_shading_nodes(scene)) {
ED_node_shader_default(scene, &la->id);
- la->use_nodes= 1;
+ la->use_nodes = 1;
}
return OPERATOR_FINISHED;
@@ -762,7 +762,7 @@ void OBJECT_OT_lamp_add(wmOperatorType *ot)
ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
ot->prop = RNA_def_enum(ot->srna, "type", lamp_type_items, 0, "Type", "");
@@ -772,7 +772,7 @@ void OBJECT_OT_lamp_add(wmOperatorType *ot)
static int group_instance_add_exec(bContext *C, wmOperator *op)
{
- Group *group= BLI_findlink(&CTX_data_main(C)->group, RNA_enum_get(op->ptr, "group"));
+ Group *group = BLI_findlink(&CTX_data_main(C)->group, RNA_enum_get(op->ptr, "group"));
int enter_editmode;
unsigned int layer;
@@ -783,18 +783,18 @@ static int group_instance_add_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
if (group) {
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- Object *ob= ED_object_add_type(C, OB_EMPTY, loc, rot, FALSE, layer);
- rename_id(&ob->id, group->id.name+2);
- ob->dup_group= group;
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = ED_object_add_type(C, OB_EMPTY, loc, rot, FALSE, layer);
+ rename_id(&ob->id, group->id.name + 2);
+ ob->dup_group = group;
ob->transflag |= OB_DUPLIGROUP;
id_lib_extern(&group->id);
/* works without this except if you try render right after, see: 22027 */
DAG_scene_sort(bmain, scene);
- WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, CTX_data_scene(C));
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, CTX_data_scene(C));
return OPERATOR_FINISHED;
}
@@ -814,7 +814,7 @@ static int object_speaker_add_exec(bContext *C, wmOperator *op)
if (!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL))
return OPERATOR_CANCELLED;
- ob= ED_object_add_type(C, OB_SPEAKER, loc, rot, FALSE, layer);
+ ob = ED_object_add_type(C, OB_SPEAKER, loc, rot, FALSE, layer);
/* to make it easier to start using this immediately in NLA, a default sound clip is created
* ready to be moved around to retime the sound and/or make new sound clips
@@ -834,7 +834,7 @@ static int object_speaker_add_exec(bContext *C, wmOperator *op)
strcpy(nlt->name, "SoundTrack");
BKE_nlastrip_validate_name(adt, strip);
- WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_EDITED, NULL);
}
return OPERATOR_FINISHED;
@@ -852,7 +852,7 @@ void OBJECT_OT_speaker_add(wmOperatorType *ot)
ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
ED_object_add_generic_props(ot, TRUE);
}
@@ -874,10 +874,10 @@ void OBJECT_OT_group_instance_add(wmOperatorType *ot)
ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
- prop= RNA_def_enum(ot->srna, "group", DummyRNA_NULL_items, 0, "Group", "");
+ prop = RNA_def_enum(ot->srna, "group", DummyRNA_NULL_items, 0, "Group", "");
RNA_def_enum_funcs(prop, RNA_group_itemf);
ot->prop = prop;
ED_object_add_generic_props(ot, FALSE);
@@ -891,22 +891,23 @@ void ED_base_object_free_and_unlink(Main *bmain, Scene *scene, Base *base)
{
DAG_id_type_tag(bmain, ID_OB);
BLI_remlink(&scene->base, base);
- free_libblock_us(&bmain->object, base->object);
- if (scene->basact==base) scene->basact= NULL;
+ BKE_libblock_free_us(&bmain->object, base->object);
+ if (scene->basact == base) scene->basact = NULL;
MEM_freeN(base);
}
static int object_delete_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- const short use_global= RNA_boolean_get(op->ptr, "use_global");
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ const short use_global = RNA_boolean_get(op->ptr, "use_global");
/* int islamp= 0; */ /* UNUSED */
if (CTX_data_edit_object(C))
return OPERATOR_CANCELLED;
- CTX_DATA_BEGIN(C, Base*, base, selected_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, selected_bases)
+ {
/* if (base->object->type==OB_LAMP) islamp= 1; */
@@ -920,9 +921,9 @@ static int object_delete_exec(bContext *C, wmOperator *op)
Scene *scene_iter;
Base *base_other;
- for (scene_iter= bmain->scene.first; scene_iter; scene_iter= scene_iter->id.next) {
+ for (scene_iter = bmain->scene.first; scene_iter; scene_iter = scene_iter->id.next) {
if (scene_iter != scene && !(scene_iter->id.lib)) {
- base_other= object_in_scene(base->object, scene_iter);
+ base_other = BKE_scene_base_find(scene_iter, base->object);
if (base_other) {
ED_base_object_free_and_unlink(bmain, scene_iter, base_other);
}
@@ -937,8 +938,8 @@ static int object_delete_exec(bContext *C, wmOperator *op)
DAG_scene_sort(bmain, scene);
DAG_ids_flush_update(bmain, 0);
- WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, scene);
- WM_event_add_notifier(C, NC_SCENE|ND_LAYER_CONTENT, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_LAYER_CONTENT, scene);
return OPERATOR_FINISHED;
}
@@ -956,7 +957,7 @@ void OBJECT_OT_delete(wmOperatorType *ot)
ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "use_global", 0, "Delete Globally", "Remove object from all scenes");
}
@@ -966,81 +967,82 @@ void OBJECT_OT_delete(wmOperatorType *ot)
/* after copying objects, copied data should get new pointers */
static void copy_object_set_idnew(bContext *C, int dupflag)
{
- Main *bmain= CTX_data_main(C);
+ Main *bmain = CTX_data_main(C);
Material *ma, *mao;
ID *id;
int a;
/* XXX check object pointers */
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
- object_relink(ob);
+ CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
+ {
+ BKE_object_relink(ob);
}
CTX_DATA_END;
/* materials */
- if ( dupflag & USER_DUP_MAT) {
- mao= bmain->mat.first;
+ if (dupflag & USER_DUP_MAT) {
+ mao = bmain->mat.first;
while (mao) {
if (mao->id.newid) {
- ma= (Material *)mao->id.newid;
+ ma = (Material *)mao->id.newid;
if (dupflag & USER_DUP_TEX) {
- for (a=0; a<MAX_MTEX; a++) {
+ for (a = 0; a < MAX_MTEX; a++) {
if (ma->mtex[a]) {
- id= (ID *)ma->mtex[a]->tex;
+ id = (ID *)ma->mtex[a]->tex;
if (id) {
ID_NEW_US(ma->mtex[a]->tex)
- else ma->mtex[a]->tex= copy_texture(ma->mtex[a]->tex);
+ else ma->mtex[a]->tex = BKE_texture_copy(ma->mtex[a]->tex);
id->us--;
}
}
}
}
#if 0 // XXX old animation system
- id= (ID *)ma->ipo;
+ id = (ID *)ma->ipo;
if (id) {
ID_NEW_US(ma->ipo)
- else ma->ipo= copy_ipo(ma->ipo);
+ else ma->ipo = copy_ipo(ma->ipo);
id->us--;
}
#endif // XXX old animation system
}
- mao= mao->id.next;
+ mao = mao->id.next;
}
}
#if 0 // XXX old animation system
- /* lamps */
- if ( dupflag & USER_DUP_IPO) {
- Lamp *la= bmain->lamp.first;
+ /* lamps */
+ if (dupflag & USER_DUP_IPO) {
+ Lamp *la = bmain->lamp.first;
while (la) {
if (la->id.newid) {
- Lamp *lan= (Lamp *)la->id.newid;
- id= (ID *)lan->ipo;
+ Lamp *lan = (Lamp *)la->id.newid;
+ id = (ID *)lan->ipo;
if (id) {
ID_NEW_US(lan->ipo)
- else lan->ipo= copy_ipo(lan->ipo);
+ else lan->ipo = copy_ipo(lan->ipo);
id->us--;
}
}
- la= la->id.next;
+ la = la->id.next;
}
}
/* ipos */
- ipo= bmain->ipo.first;
+ ipo = bmain->ipo.first;
while (ipo) {
- if (ipo->id.lib==NULL && ipo->id.newid) {
- Ipo *ipon= (Ipo *)ipo->id.newid;
+ if (ipo->id.lib == NULL && ipo->id.newid) {
+ Ipo *ipon = (Ipo *)ipo->id.newid;
IpoCurve *icu;
- for (icu= ipon->curve.first; icu; icu= icu->next) {
+ for (icu = ipon->curve.first; icu; icu = icu->next) {
if (icu->driver) {
ID_NEW(icu->driver->ob);
}
}
}
- ipo= ipo->id.next;
+ ipo = ipo->id.next;
}
#endif // XXX old animation system
@@ -1057,83 +1059,83 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base,
{
ListBase *lb;
DupliObject *dob;
- GHash *dupli_gh= NULL, *parent_gh= NULL;
+ GHash *dupli_gh = NULL, *parent_gh = NULL;
if (!(base->object->transflag & OB_DUPLI))
return;
- lb= object_duplilist(scene, base->object);
+ lb = object_duplilist(scene, base->object);
if (use_hierarchy || use_base_parent) {
- dupli_gh= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "make_object_duplilist_real dupli_gh");
- parent_gh= BLI_ghash_new(BLI_ghashutil_pairhash, BLI_ghashutil_paircmp, "make_object_duplilist_real parent_gh");
+ dupli_gh = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "make_object_duplilist_real dupli_gh");
+ parent_gh = BLI_ghash_new(BLI_ghashutil_pairhash, BLI_ghashutil_paircmp, "make_object_duplilist_real parent_gh");
}
- for (dob= lb->first; dob; dob= dob->next) {
+ for (dob = lb->first; dob; dob = dob->next) {
Base *basen;
- Object *ob= copy_object(dob->ob);
+ Object *ob = BKE_object_copy(dob->ob);
/* font duplis can have a totcol without material, we get them from parent
* should be implemented better...
*/
- if (ob->mat==NULL) ob->totcol= 0;
+ if (ob->mat == NULL) ob->totcol = 0;
- basen= MEM_dupallocN(base);
- basen->flag &= ~(OB_FROMDUPLI|OB_FROMGROUP);
- ob->flag= basen->flag;
- basen->lay= base->lay;
- BLI_addhead(&scene->base, basen); /* addhead: othwise eternal loop */
- basen->object= ob;
+ basen = MEM_dupallocN(base);
+ basen->flag &= ~(OB_FROMDUPLI | OB_FROMGROUP);
+ ob->flag = basen->flag;
+ basen->lay = base->lay;
+ BLI_addhead(&scene->base, basen); /* addhead: othwise eternal loop */
+ basen->object = ob;
/* make sure apply works */
BKE_free_animdata(&ob->id);
ob->adt = NULL;
- ob->parent= NULL;
- ob->constraints.first= ob->constraints.last= NULL;
- ob->disp.first= ob->disp.last= NULL;
+ ob->parent = NULL;
+ ob->constraints.first = ob->constraints.last = NULL;
+ ob->disp.first = ob->disp.last = NULL;
ob->transflag &= ~OB_DUPLI;
- ob->lay= base->lay;
+ ob->lay = base->lay;
copy_m4_m4(ob->obmat, dob->mat);
- object_apply_mat4(ob, ob->obmat, FALSE, FALSE);
+ BKE_object_apply_mat4(ob, ob->obmat, FALSE, FALSE);
if (dupli_gh)
BLI_ghash_insert(dupli_gh, dob, ob);
if (parent_gh)
- BLI_ghash_insert(parent_gh, BLI_ghashutil_pairalloc(dob->ob, dob->index), ob);
+ BLI_ghash_insert(parent_gh, BLI_ghashutil_pairalloc(dob->ob, SET_INT_IN_POINTER(dob->index)), ob);
}
if (use_hierarchy) {
- for (dob= lb->first; dob; dob= dob->next) {
+ for (dob = lb->first; dob; dob = dob->next) {
/* original parents */
- Object *ob_src= dob->ob;
- Object *ob_src_par= ob_src->parent;
+ Object *ob_src = dob->ob;
+ Object *ob_src_par = ob_src->parent;
- Object *ob_dst= BLI_ghash_lookup(dupli_gh, dob);
- Object *ob_dst_par= NULL;
+ Object *ob_dst = BLI_ghash_lookup(dupli_gh, dob);
+ Object *ob_dst_par = NULL;
/* find parent that was also made real */
if (ob_src_par) {
- GHashPair *pair = BLI_ghashutil_pairalloc(ob_src_par, dob->index);
+ GHashPair *pair = BLI_ghashutil_pairalloc(ob_src_par, SET_INT_IN_POINTER(dob->index));
ob_dst_par = BLI_ghash_lookup(parent_gh, pair);
BLI_ghashutil_pairfree(pair);
}
if (ob_dst_par) {
/* allow for all possible parent types */
- ob_dst->partype= ob_src->partype;
+ ob_dst->partype = ob_src->partype;
BLI_strncpy(ob_dst->parsubstr, ob_src->parsubstr, sizeof(ob_dst->parsubstr));
- ob_dst->par1= ob_src->par1;
- ob_dst->par2= ob_src->par2;
- ob_dst->par3= ob_src->par3;
+ ob_dst->par1 = ob_src->par1;
+ ob_dst->par2 = ob_src->par2;
+ ob_dst->par3 = ob_src->par3;
copy_m4_m4(ob_dst->parentinv, ob_src->parentinv);
- ob_dst->parent= ob_dst_par;
+ ob_dst->parent = ob_dst_par;
}
else if (use_base_parent) {
- ob_dst->parent= base->object;
- ob_dst->partype= PAROBJECT;
+ ob_dst->parent = base->object;
+ ob_dst->partype = PAROBJECT;
}
if (ob_dst->parent) {
@@ -1141,7 +1143,7 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base,
/* note, this may be the parent of other objects, but it should
* still work out ok */
- object_apply_mat4(ob_dst, dob->mat, FALSE, TRUE);
+ BKE_object_apply_mat4(ob_dst, dob->mat, FALSE, TRUE);
/* to set ob_dst->orig and in case theres any other discrepicies */
DAG_id_tag_update(&ob_dst->id, OB_RECALC_OB);
@@ -1151,16 +1153,16 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base,
else if (use_base_parent) {
/* since we are ignoring the internal hierarchy - parent all to the
* base object */
- for (dob= lb->first; dob; dob= dob->next) {
+ for (dob = lb->first; dob; dob = dob->next) {
/* original parents */
- Object *ob_dst= BLI_ghash_lookup(dupli_gh, dob);
+ Object *ob_dst = BLI_ghash_lookup(dupli_gh, dob);
- ob_dst->parent= base->object;
- ob_dst->partype= PAROBJECT;
+ ob_dst->parent = base->object;
+ ob_dst->partype = PAROBJECT;
/* similer to the code above, see comments */
invert_m4_m4(ob_dst->parentinv, dob->mat);
- object_apply_mat4(ob_dst, dob->mat, FALSE, TRUE);
+ BKE_object_apply_mat4(ob_dst, dob->mat, FALSE, TRUE);
DAG_id_tag_update(&ob_dst->id, OB_RECALC_OB);
@@ -1181,26 +1183,27 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base,
static int object_duplicates_make_real_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
- const short use_base_parent= RNA_boolean_get(op->ptr, "use_base_parent");
- const short use_hierarchy= RNA_boolean_get(op->ptr, "use_hierarchy");
+ const short use_base_parent = RNA_boolean_get(op->ptr, "use_base_parent");
+ const short use_hierarchy = RNA_boolean_get(op->ptr, "use_hierarchy");
clear_id_newpoins();
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases)
+ {
make_object_duplilist_real(C, scene, base, use_base_parent, use_hierarchy);
/* dependencies were changed */
- WM_event_add_notifier(C, NC_OBJECT|ND_PARENT, base->object);
+ WM_event_add_notifier(C, NC_OBJECT | ND_PARENT, base->object);
}
CTX_DATA_END;
DAG_scene_sort(bmain, scene);
DAG_ids_flush_update(bmain, 0);
WM_event_add_notifier(C, NC_SCENE, scene);
- WM_main_add_notifier(NC_OBJECT|ND_DRAW, NULL);
+ WM_main_add_notifier(NC_OBJECT | ND_DRAW, NULL);
return OPERATOR_FINISHED;
}
@@ -1219,7 +1222,7 @@ void OBJECT_OT_duplicates_make_real(wmOperatorType *ot)
ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "use_base_parent", 0, "Parent", "Parent newly created objects to the original duplicator");
RNA_def_boolean(ot->srna, "use_hierarchy", 0, "Keep Hierarchy", "Maintain parent child relationships");
@@ -1227,26 +1230,27 @@ void OBJECT_OT_duplicates_make_real(wmOperatorType *ot)
/**************************** Convert **************************/
-static EnumPropertyItem convert_target_items[]= {
+static EnumPropertyItem convert_target_items[] = {
{OB_CURVE, "CURVE", ICON_OUTLINER_OB_CURVE, "Curve from Mesh/Text", ""},
{OB_MESH, "MESH", ICON_OUTLINER_OB_MESH, "Mesh from Curve/Meta/Surf/Text", ""},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+};
static void curvetomesh(Scene *scene, Object *ob)
{
if (ob->disp.first == NULL)
- makeDispListCurveTypes(scene, ob, 0); /* force creation */
+ BKE_displist_make_curveTypes(scene, ob, 0); /* force creation */
- nurbs_to_mesh(ob); /* also does users */
+ BKE_mesh_from_nurbs(ob); /* also does users */
if (ob->type == OB_MESH)
- object_free_modifiers(ob);
+ BKE_object_free_modifiers(ob);
}
static int convert_poll(bContext *C)
{
- Object *obact= CTX_data_active_object(C);
- Scene *scene= CTX_data_scene(C);
+ Object *obact = CTX_data_active_object(C);
+ Scene *scene = CTX_data_scene(C);
return (!scene->id.lib && obact && scene->obedit != obact && (obact->flag & SELECT) && !(obact->id.lib));
}
@@ -1258,16 +1262,16 @@ static Base *duplibase_for_convert(Scene *scene, Base *base, Object *ob)
Base *basen;
if (ob == NULL) {
- ob= base->object;
+ ob = base->object;
}
- obn= copy_object(ob);
- obn->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
+ obn = BKE_object_copy(ob);
+ obn->recalc |= OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME;
- basen= MEM_mallocN(sizeof(Base), "duplibase");
- *basen= *base;
- BLI_addhead(&scene->base, basen); /* addhead: otherwise eternal loop */
- basen->object= obn;
+ basen = MEM_mallocN(sizeof(Base), "duplibase");
+ *basen = *base;
+ BLI_addhead(&scene->base, basen); /* addhead: otherwise eternal loop */
+ basen->object = obn;
basen->flag |= SELECT;
obn->flag |= SELECT;
base->flag &= ~SELECT;
@@ -1278,24 +1282,25 @@ static Base *duplibase_for_convert(Scene *scene, Base *base, Object *ob)
static int convert_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- Base *basen=NULL, *basact=NULL, *basedel=NULL;
- Object *ob, *ob1, *newob, *obact= CTX_data_active_object(C);
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ Base *basen = NULL, *basact = NULL, *basedel = NULL;
+ Object *ob, *ob1, *newob, *obact = CTX_data_active_object(C);
DerivedMesh *dm;
Curve *cu;
Nurb *nu;
MetaBall *mb;
Mesh *me;
- const short target= RNA_enum_get(op->ptr, "target");
- const short keep_original= RNA_boolean_get(op->ptr, "keep_original");
- int a, mballConverted= 0;
+ const short target = RNA_enum_get(op->ptr, "target");
+ const short keep_original = RNA_boolean_get(op->ptr, "keep_original");
+ int a, mballConverted = 0;
/* don't forget multiple users! */
/* reset flags */
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
- ob= base->object;
+ CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases)
+ {
+ ob = base->object;
ob->flag &= ~OB_DONE;
/* flag data thats not been edited (only needed for !keep_original) */
@@ -1305,8 +1310,9 @@ static int convert_exec(bContext *C, wmOperator *op)
}
CTX_DATA_END;
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
- ob= base->object;
+ CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases)
+ {
+ ob = base->object;
if (ob->flag & OB_DONE || !IS_TAGGED(ob->data)) {
if (ob->type != target) {
@@ -1319,57 +1325,57 @@ static int convert_exec(bContext *C, wmOperator *op)
/* When 2 objects with linked data are selected, converting both
* would keep modifiers on all but the converted object [#26003] */
if (ob->type == OB_MESH) {
- object_free_modifiers(ob); /* after derivedmesh calls! */
+ BKE_object_free_modifiers(ob); /* after derivedmesh calls! */
}
}
}
- else if (ob->type==OB_MESH && target == OB_CURVE) {
+ else if (ob->type == OB_MESH && target == OB_CURVE) {
ob->flag |= OB_DONE;
if (keep_original) {
- basen= duplibase_for_convert(scene, base, NULL);
- newob= basen->object;
+ basen = duplibase_for_convert(scene, base, NULL);
+ newob = basen->object;
/* decrement original mesh's usage count */
- me= newob->data;
+ me = newob->data;
me->id.us--;
/* make a new copy of the mesh */
- newob->data= copy_mesh(me);
+ newob->data = BKE_mesh_copy(me);
}
else {
newob = ob;
}
- mesh_to_curve(scene, newob);
+ BKE_mesh_from_curve(scene, newob);
- if (newob->type==OB_CURVE)
- object_free_modifiers(newob); /* after derivedmesh calls! */
+ if (newob->type == OB_CURVE)
+ BKE_object_free_modifiers(newob); /* after derivedmesh calls! */
}
- else if (ob->type==OB_MESH && ob->modifiers.first) { /* converting a mesh with no modifiers causes a segfault */
+ else if (ob->type == OB_MESH && ob->modifiers.first) { /* converting a mesh with no modifiers causes a segfault */
ob->flag |= OB_DONE;
if (keep_original) {
- basen= duplibase_for_convert(scene, base, NULL);
- newob= basen->object;
+ basen = duplibase_for_convert(scene, base, NULL);
+ newob = basen->object;
/* decrement original mesh's usage count */
- me= newob->data;
+ me = newob->data;
me->id.us--;
/* make a new copy of the mesh */
- newob->data= copy_mesh(me);
+ newob->data = BKE_mesh_copy(me);
}
else {
newob = ob;
- ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
+ ob->recalc |= OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME;
}
/* make new mesh data from the original copy */
/* note: get the mesh from the original, not from the copy in some
* cases this doesnt give correct results (when MDEF is used for eg)
*/
- dm= mesh_get_derived_final(scene, newob, CD_MASK_MESH);
+ dm = mesh_get_derived_final(scene, newob, CD_MASK_MESH);
/* dm= mesh_create_derived_no_deform(ob1, NULL); this was called original (instead of get_derived). man o man why! (ton) */
DM_to_mesh(dm, newob->data, newob);
@@ -1377,70 +1383,70 @@ static int convert_exec(bContext *C, wmOperator *op)
/* re-tessellation is called by DM_to_mesh */
dm->release(dm);
- object_free_modifiers(newob); /* after derivedmesh calls! */
+ BKE_object_free_modifiers(newob); /* after derivedmesh calls! */
}
- else if (ob->type==OB_FONT) {
+ else if (ob->type == OB_FONT) {
ob->flag |= OB_DONE;
if (keep_original) {
- basen= duplibase_for_convert(scene, base, NULL);
- newob= basen->object;
+ basen = duplibase_for_convert(scene, base, NULL);
+ newob = basen->object;
/* decrement original curve's usage count */
((Curve *)newob->data)->id.us--;
/* make a new copy of the curve */
- newob->data= copy_curve(ob->data);
+ newob->data = BKE_curve_copy(ob->data);
}
else {
- newob= ob;
+ newob = ob;
}
- cu= newob->data;
+ cu = newob->data;
if (!newob->disp.first)
- makeDispListCurveTypes(scene, newob, 0);
+ BKE_displist_make_curveTypes(scene, newob, 0);
- newob->type= OB_CURVE;
- cu->type= OB_CURVE;
+ newob->type = OB_CURVE;
+ cu->type = OB_CURVE;
if (cu->vfont) {
cu->vfont->id.us--;
- cu->vfont= NULL;
+ cu->vfont = NULL;
}
if (cu->vfontb) {
cu->vfontb->id.us--;
- cu->vfontb= NULL;
+ cu->vfontb = NULL;
}
if (cu->vfonti) {
cu->vfonti->id.us--;
- cu->vfonti= NULL;
+ cu->vfonti = NULL;
}
if (cu->vfontbi) {
cu->vfontbi->id.us--;
- cu->vfontbi= NULL;
+ cu->vfontbi = NULL;
}
if (!keep_original) {
/* other users */
- if (cu->id.us>1) {
- for (ob1= bmain->object.first; ob1; ob1=ob1->id.next) {
- if (ob1->data==ob->data) {
- ob1->type= OB_CURVE;
- ob1->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
+ if (cu->id.us > 1) {
+ for (ob1 = bmain->object.first; ob1; ob1 = ob1->id.next) {
+ if (ob1->data == ob->data) {
+ ob1->type = OB_CURVE;
+ ob1->recalc |= OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME;
}
}
}
}
- for (nu=cu->nurb.first; nu; nu=nu->next)
- nu->charidx= 0;
+ for (nu = cu->nurb.first; nu; nu = nu->next)
+ nu->charidx = 0;
if (target == OB_MESH) {
curvetomesh(scene, newob);
/* meshes doesn't use displist */
- freedisplist(&newob->disp);
+ BKE_displist_free(&newob->disp);
}
}
else if (ELEM(ob->type, OB_CURVE, OB_SURF)) {
@@ -1448,32 +1454,32 @@ static int convert_exec(bContext *C, wmOperator *op)
if (target == OB_MESH) {
if (keep_original) {
- basen= duplibase_for_convert(scene, base, NULL);
- newob= basen->object;
+ basen = duplibase_for_convert(scene, base, NULL);
+ newob = basen->object;
/* decrement original curve's usage count */
((Curve *)newob->data)->id.us--;
/* make a new copy of the curve */
- newob->data= copy_curve(ob->data);
+ newob->data = BKE_curve_copy(ob->data);
}
else {
- newob= ob;
+ newob = ob;
/* meshes doesn't use displist */
- freedisplist(&newob->disp);
+ BKE_displist_free(&newob->disp);
}
curvetomesh(scene, newob);
}
}
- else if (ob->type==OB_MBALL && target == OB_MESH) {
+ else if (ob->type == OB_MBALL && target == OB_MESH) {
Object *baseob;
base->flag &= ~SELECT;
ob->flag &= ~SELECT;
- baseob= find_basis_mball(scene, ob);
+ baseob = BKE_mball_basis_find(scene, ob);
if (ob != baseob) {
/* if motherball is converting it would be marked as done later */
@@ -1481,35 +1487,35 @@ static int convert_exec(bContext *C, wmOperator *op)
}
if (!baseob->disp.first) {
- makeDispListMBall(scene, baseob);
+ BKE_displist_make_mball(scene, baseob);
}
if (!(baseob->flag & OB_DONE)) {
baseob->flag |= OB_DONE;
- basen= duplibase_for_convert(scene, base, baseob);
- newob= basen->object;
+ basen = duplibase_for_convert(scene, base, baseob);
+ newob = basen->object;
- mb= newob->data;
+ mb = newob->data;
mb->id.us--;
- newob->data= add_mesh("Mesh");
- newob->type= OB_MESH;
+ newob->data = BKE_mesh_add("Mesh");
+ newob->type = OB_MESH;
- me= newob->data;
- me->totcol= mb->totcol;
+ me = newob->data;
+ me->totcol = mb->totcol;
if (newob->totcol) {
- me->mat= MEM_dupallocN(mb->mat);
- for (a=0; a<newob->totcol; a++) id_us_plus((ID *)me->mat[a]);
+ me->mat = MEM_dupallocN(mb->mat);
+ for (a = 0; a < newob->totcol; a++) id_us_plus((ID *)me->mat[a]);
}
- mball_to_mesh(&baseob->disp, newob->data);
+ BKE_mesh_from_metaball(&baseob->disp, newob->data);
if (obact->type == OB_MBALL) {
- basact= basen;
+ basact = basen;
}
- mballConverted= 1;
+ mballConverted = 1;
}
}
else {
@@ -1522,10 +1528,10 @@ static int convert_exec(bContext *C, wmOperator *op)
if (basen) {
if (ob == obact) {
/* store new active base to update BASACT */
- basact= basen;
+ basact = basen;
}
- basen= NULL;
+ basen = NULL;
}
if (!keep_original && (ob->flag & OB_DONE)) {
@@ -1545,11 +1551,11 @@ static int convert_exec(bContext *C, wmOperator *op)
if (!keep_original) {
if (mballConverted) {
- Base *base= scene->base.first, *tmpbase;
+ Base *base = scene->base.first, *tmpbase;
while (base) {
- ob= base->object;
- tmpbase= base;
- base= base->next;
+ ob = base->object;
+ tmpbase = base;
+ base = base->next;
if (ob->type == OB_MBALL) {
ED_base_object_free_and_unlink(bmain, scene, tmpbase);
@@ -1567,16 +1573,16 @@ static int convert_exec(bContext *C, wmOperator *op)
if (basact) {
/* active base was changed */
ED_base_object_activate(C, basact);
- BASACT= basact;
+ BASACT = basact;
}
else if (BASACT->object->flag & OB_DONE) {
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, BASACT->object);
- WM_event_add_notifier(C, NC_OBJECT|ND_DATA, BASACT->object);
+ WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, BASACT->object);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DATA, BASACT->object);
}
DAG_scene_sort(bmain, scene);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, scene);
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
return OPERATOR_FINISHED;
}
@@ -1595,7 +1601,7 @@ void OBJECT_OT_convert(wmOperatorType *ot)
ot->poll = convert_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
ot->prop = RNA_def_enum(ot->srna, "target", convert_target_items, OB_MESH, "Target", "Type of object to convert to");
@@ -1614,28 +1620,28 @@ void OBJECT_OT_convert(wmOperatorType *ot)
/* leaves selection of base/object unaltered */
static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base, int dupflag)
{
- Base *basen= NULL;
+ Base *basen = NULL;
Material ***matarar;
Object *ob, *obn;
ID *id;
int a, didit;
- ob= base->object;
+ ob = base->object;
if (ob->mode & OB_MODE_POSE) {
; /* nothing? */
}
else {
- obn= copy_object(ob);
- obn->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
+ obn = BKE_object_copy(ob);
+ obn->recalc |= OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME;
- basen= MEM_mallocN(sizeof(Base), "duplibase");
- *basen= *base;
- BLI_addhead(&scene->base, basen); /* addhead: prevent eternal loop */
- basen->object= obn;
+ basen = MEM_mallocN(sizeof(Base), "duplibase");
+ *basen = *base;
+ BLI_addhead(&scene->base, basen); /* addhead: prevent eternal loop */
+ basen->object = obn;
if (basen->flag & OB_FROMGROUP) {
Group *group;
- for (group= bmain->group.first; group; group= group->id.next) {
+ for (group = bmain->group.first; group; group = group->id.next) {
if (object_in_group(ob, group))
add_to_group(group, obn, scene, basen);
}
@@ -1647,11 +1653,11 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
}
if (dupflag & USER_DUP_MAT) {
- for (a=0; a<obn->totcol; a++) {
- id= (ID *)obn->mat[a];
+ for (a = 0; a < obn->totcol; a++) {
+ id = (ID *)obn->mat[a];
if (id) {
ID_NEW_US(obn->mat[a])
- else obn->mat[a]= copy_material(obn->mat[a]);
+ else obn->mat[a] = BKE_material_copy(obn->mat[a]);
id->us--;
if (dupflag & USER_DUP_ACT) {
@@ -1662,11 +1668,11 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
}
if (dupflag & USER_DUP_PSYS) {
ParticleSystem *psys;
- for (psys=obn->particlesystem.first; psys; psys=psys->next) {
- id= (ID*) psys->part;
+ for (psys = obn->particlesystem.first; psys; psys = psys->next) {
+ id = (ID *) psys->part;
if (id) {
ID_NEW_US(psys->part)
- else psys->part= psys_copy_settings(psys->part);
+ else psys->part = BKE_particlesettings_copy(psys->part);
if (dupflag & USER_DUP_ACT) {
BKE_copy_animdata_id_action(&psys->part->id);
@@ -1677,71 +1683,71 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
}
}
- id= obn->data;
- didit= 0;
+ id = obn->data;
+ didit = 0;
- switch(obn->type) {
+ switch (obn->type) {
case OB_MESH:
if (dupflag & USER_DUP_MESH) {
- ID_NEW_US2( obn->data )
+ ID_NEW_US2(obn->data)
else {
- obn->data= copy_mesh(obn->data);
+ obn->data = BKE_mesh_copy(obn->data);
if (obn->fluidsimSettings) {
obn->fluidsimSettings->orgMesh = (Mesh *)obn->data;
}
- didit= 1;
+ didit = 1;
}
id->us--;
}
break;
case OB_CURVE:
if (dupflag & USER_DUP_CURVE) {
- ID_NEW_US2(obn->data )
+ ID_NEW_US2(obn->data)
else {
- obn->data= copy_curve(obn->data);
- didit= 1;
+ obn->data = BKE_curve_copy(obn->data);
+ didit = 1;
}
id->us--;
}
break;
case OB_SURF:
if (dupflag & USER_DUP_SURF) {
- ID_NEW_US2( obn->data )
+ ID_NEW_US2(obn->data)
else {
- obn->data= copy_curve(obn->data);
- didit= 1;
+ obn->data = BKE_curve_copy(obn->data);
+ didit = 1;
}
id->us--;
}
break;
case OB_FONT:
if (dupflag & USER_DUP_FONT) {
- ID_NEW_US2( obn->data )
+ ID_NEW_US2(obn->data)
else {
- obn->data= copy_curve(obn->data);
- didit= 1;
+ obn->data = BKE_curve_copy(obn->data);
+ didit = 1;
}
id->us--;
}
break;
case OB_MBALL:
if (dupflag & USER_DUP_MBALL) {
- ID_NEW_US2(obn->data )
+ ID_NEW_US2(obn->data)
else {
- obn->data= copy_mball(obn->data);
- didit= 1;
+ obn->data = BKE_mball_copy(obn->data);
+ didit = 1;
}
id->us--;
}
break;
case OB_LAMP:
if (dupflag & USER_DUP_LAMP) {
- ID_NEW_US2(obn->data )
+ ID_NEW_US2(obn->data)
else {
- obn->data= copy_lamp(obn->data);
- didit= 1;
+ obn->data = BKE_lamp_copy(obn->data);
+ didit = 1;
}
id->us--;
}
@@ -1751,44 +1757,44 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
obn->recalc |= OB_RECALC_DATA;
if (obn->pose) obn->pose->flag |= POSE_RECALC;
- if (dupflag & USER_DUP_ARM) {
- ID_NEW_US2(obn->data )
- else {
- obn->data= copy_armature(obn->data);
- armature_rebuild_pose(obn, obn->data);
- didit= 1;
- }
- id->us--;
+ if (dupflag & USER_DUP_ARM) {
+ ID_NEW_US2(obn->data)
+ else {
+ obn->data = BKE_armature_copy(obn->data);
+ BKE_pose_rebuild(obn, obn->data);
+ didit = 1;
}
+ id->us--;
+ }
- break;
+ break;
case OB_LATTICE:
- if (dupflag!=0) {
- ID_NEW_US2(obn->data )
+ if (dupflag != 0) {
+ ID_NEW_US2(obn->data)
else {
- obn->data= copy_lattice(obn->data);
- didit= 1;
+ obn->data = BKE_lattice_copy(obn->data);
+ didit = 1;
}
id->us--;
}
break;
case OB_CAMERA:
- if (dupflag!=0) {
- ID_NEW_US2(obn->data )
+ if (dupflag != 0) {
+ ID_NEW_US2(obn->data)
else {
- obn->data= copy_camera(obn->data);
- didit= 1;
+ obn->data = BKE_camera_copy(obn->data);
+ didit = 1;
}
id->us--;
}
break;
case OB_SPEAKER:
- if (dupflag!=0) {
- ID_NEW_US2(obn->data )
+ if (dupflag != 0) {
+ ID_NEW_US2(obn->data)
else {
- obn->data= copy_speaker(obn->data);
- didit= 1;
+ obn->data = BKE_speaker_copy(obn->data);
+ didit = 1;
}
id->us--;
}
@@ -1805,13 +1811,13 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
BKE_copy_animdata_id_action((ID *)obn->data);
if (key) {
- BKE_copy_animdata_id_action((ID*)key);
+ BKE_copy_animdata_id_action((ID *)key);
}
/* Update the duplicated action in the action actuators */
for (act = obn->actuators.first; act; act = act->next) {
if (act->type == ACT_ACTION) {
- bActionActuator* actact = (bActionActuator*) act->data;
+ bActionActuator *actact = (bActionActuator *) act->data;
if (ob->adt && actact->act == ob->adt->action) {
actact->act = obn->adt->action;
}
@@ -1820,13 +1826,13 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
}
if (dupflag & USER_DUP_MAT) {
- matarar= give_matarar(obn);
+ matarar = give_matarar(obn);
if (matarar) {
- for (a=0; a<obn->totcol; a++) {
- id= (ID *)(*matarar)[a];
+ for (a = 0; a < obn->totcol; a++) {
+ id = (ID *)(*matarar)[a];
if (id) {
- ID_NEW_US( (*matarar)[a] )
- else (*matarar)[a]= copy_material((*matarar)[a]);
+ ID_NEW_US((*matarar)[a])
+ else (*matarar)[a] = BKE_material_copy((*matarar)[a]);
id->us--;
}
@@ -1847,17 +1853,17 @@ Base *ED_object_add_duplicate(Main *bmain, Scene *scene, Base *base, int dupflag
Object *ob;
clear_id_newpoins();
- clear_sca_new_poins(); /* sensor/contr/act */
+ clear_sca_new_poins(); /* sensor/contr/act */
- basen= object_add_duplicate_internal(bmain, scene, base, dupflag);
+ basen = object_add_duplicate_internal(bmain, scene, base, dupflag);
if (basen == NULL) {
return NULL;
}
- ob= basen->object;
+ ob = basen->object;
/* link own references to the newly duplicated data [#26816] */
- object_relink(ob);
+ BKE_object_relink(ob);
set_sca_new_poins_ob(ob);
DAG_scene_sort(bmain, scene);
@@ -1871,16 +1877,17 @@ Base *ED_object_add_duplicate(Main *bmain, Scene *scene, Base *base, int dupflag
/* contextual operator dupli */
static int duplicate_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- int linked= RNA_boolean_get(op->ptr, "linked");
- int dupflag= (linked)? 0: U.dupflag;
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ int linked = RNA_boolean_get(op->ptr, "linked");
+ int dupflag = (linked) ? 0 : U.dupflag;
clear_id_newpoins();
- clear_sca_new_poins(); /* sensor/contr/act */
+ clear_sca_new_poins(); /* sensor/contr/act */
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
- Base *basen= object_add_duplicate_internal(bmain, scene, base, dupflag);
+ CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases)
+ {
+ Base *basen = object_add_duplicate_internal(bmain, scene, base, dupflag);
/* note that this is safe to do with this context iterator,
* the list is made in advance */
@@ -1891,7 +1898,7 @@ static int duplicate_exec(bContext *C, wmOperator *op)
}
/* new object becomes active */
- if (BASACT==base)
+ if (BASACT == base)
ED_base_object_activate(C, basen);
if (basen->object->data) {
@@ -1905,7 +1912,7 @@ static int duplicate_exec(bContext *C, wmOperator *op)
DAG_scene_sort(bmain, scene);
DAG_ids_flush_update(bmain, 0);
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
return OPERATOR_FINISHED;
}
@@ -1924,11 +1931,11 @@ void OBJECT_OT_duplicate(wmOperatorType *ot)
ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* to give to transform */
RNA_def_boolean(ot->srna, "linked", 0, "Linked", "Duplicate object but not object data, linking to the original data");
- prop= RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, "Mode", "");
+ prop = RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, "Mode", "");
RNA_def_property_flag(prop, PROP_HIDDEN);
}
@@ -1937,36 +1944,36 @@ void OBJECT_OT_duplicate(wmOperatorType *ot)
static int add_named_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
Base *basen, *base;
Object *ob;
- int linked= RNA_boolean_get(op->ptr, "linked");
- int dupflag= (linked)? 0: U.dupflag;
- char name[MAX_ID_NAME-2];
+ int linked = RNA_boolean_get(op->ptr, "linked");
+ int dupflag = (linked) ? 0 : U.dupflag;
+ char name[MAX_ID_NAME - 2];
/* find object, create fake base */
RNA_string_get(op->ptr, "name", name);
- ob= (Object *)find_id("OB", name);
- if (ob==NULL)
+ ob = (Object *)BKE_libblock_find_name(ID_OB, name);
+ if (ob == NULL)
return OPERATOR_CANCELLED;
- base= MEM_callocN(sizeof(Base), "duplibase");
- base->object= ob;
- base->flag= ob->flag;
+ base = MEM_callocN(sizeof(Base), "duplibase");
+ base->object = ob;
+ base->flag = ob->flag;
/* prepare dupli */
clear_id_newpoins();
- clear_sca_new_poins(); /* sensor/contr/act */
+ clear_sca_new_poins(); /* sensor/contr/act */
- basen= object_add_duplicate_internal(bmain, scene, base, dupflag);
+ basen = object_add_duplicate_internal(bmain, scene, base, dupflag);
if (basen == NULL) {
MEM_freeN(base);
return OPERATOR_CANCELLED;
}
- basen->lay= basen->object->lay= scene->lay;
+ basen->lay = basen->object->lay = scene->lay;
ED_object_location_from_view(C, basen->object->loc);
ED_base_object_activate(C, basen);
@@ -1978,7 +1985,7 @@ static int add_named_exec(bContext *C, wmOperator *op)
MEM_freeN(base);
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
return OPERATOR_FINISHED;
}
@@ -1995,10 +2002,10 @@ void OBJECT_OT_add_named(wmOperatorType *ot)
ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "linked", 0, "Linked", "Duplicate object but not object data, linking to the original data");
- RNA_def_string(ot->srna, "name", "Cube", MAX_ID_NAME-2, "Name", "Object name to add");
+ RNA_def_string(ot->srna, "name", "Cube", MAX_ID_NAME - 2, "Name", "Object name to add");
}
@@ -2006,7 +2013,7 @@ void OBJECT_OT_add_named(wmOperatorType *ot)
/**************************** Join *************************/
static int join_poll(bContext *C)
{
- Object *ob= CTX_data_active_object(C);
+ Object *ob = CTX_data_active_object(C);
if (!ob || ob->id.lib) return 0;
@@ -2019,14 +2026,14 @@ static int join_poll(bContext *C)
static int join_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
- Object *ob= CTX_data_active_object(C);
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = CTX_data_active_object(C);
if (scene->obedit) {
BKE_report(op->reports, RPT_ERROR, "This data does not support joining in editmode");
return OPERATOR_CANCELLED;
}
- else if (object_data_is_libdata(ob)) {
+ else if (BKE_object_obdata_is_libdata(ob)) {
BKE_report(op->reports, RPT_ERROR, "Can't edit external libdata");
return OPERATOR_CANCELLED;
}
@@ -2053,13 +2060,13 @@ void OBJECT_OT_join(wmOperatorType *ot)
ot->poll = join_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/**************************** Join as Shape Key*************************/
static int join_shapes_poll(bContext *C)
{
- Object *ob= CTX_data_active_object(C);
+ Object *ob = CTX_data_active_object(C);
if (!ob || ob->id.lib) return 0;
@@ -2072,14 +2079,14 @@ static int join_shapes_poll(bContext *C)
static int join_shapes_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
- Object *ob= CTX_data_active_object(C);
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = CTX_data_active_object(C);
if (scene->obedit) {
BKE_report(op->reports, RPT_ERROR, "This data does not support joining in editmode");
return OPERATOR_CANCELLED;
}
- else if (object_data_is_libdata(ob)) {
+ else if (BKE_object_obdata_is_libdata(ob)) {
BKE_report(op->reports, RPT_ERROR, "Can't edit external libdata");
return OPERATOR_CANCELLED;
}
@@ -2102,5 +2109,5 @@ void OBJECT_OT_join_shapes(wmOperatorType *ot)
ot->poll = join_shapes_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c
index 1f012c6f0be..593a5b6f1fe 100644
--- a/source/blender/editors/object/object_bake.c
+++ b/source/blender/editors/object/object_bake.c
@@ -115,9 +115,9 @@ typedef void (*MPassKnownData)(DerivedMesh *lores_dm, DerivedMesh *hires_dm, con
const int face_index, const int lvl, const float st[2],
float tangmat[3][3], const int x, const int y);
-typedef void* (*MInitBakeData)(MultiresBakeRender *bkr, Image* ima);
-typedef void (*MApplyBakeData)(void *bake_data);
-typedef void (*MFreeBakeData)(void *bake_data);
+typedef void * (*MInitBakeData)(MultiresBakeRender *bkr, Image *ima);
+typedef void (*MApplyBakeData)(void *bake_data);
+typedef void (*MFreeBakeData)(void *bake_data);
typedef struct {
MVert *mvert;
@@ -157,25 +157,25 @@ typedef struct {
static void multiresbake_get_normal(const MResolvePixelData *data, float norm[], const int face_num, const int vert_index)
{
- unsigned int indices[]= {data->mface[face_num].v1, data->mface[face_num].v2,
- data->mface[face_num].v3, data->mface[face_num].v4};
- const int smoothnormal= (data->mface[face_num].flag & ME_SMOOTH);
+ unsigned int indices[] = {data->mface[face_num].v1, data->mface[face_num].v2,
+ data->mface[face_num].v3, data->mface[face_num].v4};
+ const int smoothnormal = (data->mface[face_num].flag & ME_SMOOTH);
if (!smoothnormal) { /* flat */
if (data->precomputed_normals) {
- copy_v3_v3(norm, &data->precomputed_normals[3*face_num]);
+ copy_v3_v3(norm, &data->precomputed_normals[3 * face_num]);
}
else {
float nor[3];
float *p0, *p1, *p2;
- const int iGetNrVerts= data->mface[face_num].v4!=0 ? 4 : 3;
+ const int iGetNrVerts = data->mface[face_num].v4 != 0 ? 4 : 3;
- p0= data->mvert[indices[0]].co;
- p1= data->mvert[indices[1]].co;
- p2= data->mvert[indices[2]].co;
+ p0 = data->mvert[indices[0]].co;
+ p1 = data->mvert[indices[1]].co;
+ p2 = data->mvert[indices[2]].co;
- if (iGetNrVerts==4) {
- float *p3= data->mvert[indices[3]].co;
+ if (iGetNrVerts == 4) {
+ float *p3 = data->mvert[indices[3]].co;
normal_quad_v3(nor, p0, p1, p2, p3);
}
else {
@@ -186,7 +186,7 @@ static void multiresbake_get_normal(const MResolvePixelData *data, float norm[],
}
}
else {
- short *no= data->mvert[indices[vert_index]].no;
+ short *no = data->mvert[indices[vert_index]].no;
normal_short_to_float_v3(norm, no);
normalize_v3(norm);
@@ -198,15 +198,15 @@ static void init_bake_rast(MBakeRast *bake_rast, const ImBuf *ibuf, const MResol
memset(bake_rast, 0, sizeof(MBakeRast));
bake_rast->texels = ibuf->userdata;
- bake_rast->w= ibuf->x;
- bake_rast->h= ibuf->y;
- bake_rast->data= data;
- bake_rast->flush_pixel= flush_pixel;
+ bake_rast->w = ibuf->x;
+ bake_rast->h = ibuf->y;
+ bake_rast->data = data;
+ bake_rast->flush_pixel = flush_pixel;
}
static void flush_pixel(const MResolvePixelData *data, const int x, const int y)
{
- float st[2]= {(x+0.5f)/data->w, (y+0.5f)/data->h};
+ float st[2] = {(x + 0.5f) / data->w, (y + 0.5f) / data->h};
float *st0, *st1, *st2;
float *tang0, *tang1, *tang2;
float no0[3], no1[3], no2[3];
@@ -214,37 +214,37 @@ static void flush_pixel(const MResolvePixelData *data, const int x, const int y)
float u, v, w, sign;
int r;
- const int i0= data->i0;
- const int i1= data->i1;
- const int i2= data->i2;
+ const int i0 = data->i0;
+ const int i1 = data->i1;
+ const int i2 = data->i2;
- st0= data->mtface[data->face_index].uv[i0];
- st1= data->mtface[data->face_index].uv[i1];
- st2= data->mtface[data->face_index].uv[i2];
+ st0 = data->mtface[data->face_index].uv[i0];
+ st1 = data->mtface[data->face_index].uv[i1];
+ st2 = data->mtface[data->face_index].uv[i2];
- tang0= data->pvtangent + data->face_index*16 + i0*4;
- tang1= data->pvtangent + data->face_index*16 + i1*4;
- tang2= data->pvtangent + data->face_index*16 + i2*4;
+ tang0 = data->pvtangent + data->face_index * 16 + i0 * 4;
+ tang1 = data->pvtangent + data->face_index * 16 + i1 * 4;
+ tang2 = data->pvtangent + data->face_index * 16 + i2 * 4;
- multiresbake_get_normal(data, no0, data->face_index, i0); /* can optimize these 3 into one call */
+ multiresbake_get_normal(data, no0, data->face_index, i0); /* can optimize these 3 into one call */
multiresbake_get_normal(data, no1, data->face_index, i1);
multiresbake_get_normal(data, no2, data->face_index, i2);
resolve_tri_uv(fUV, st, st0, st1, st2);
- u= fUV[0];
- v= fUV[1];
- w= 1-u-v;
+ u = fUV[0];
+ v = fUV[1];
+ w = 1 - u - v;
/* the sign is the same at all face vertices for any non degenerate face.
* Just in case we clamp the interpolated value though. */
- sign= (tang0[3]*u + tang1[3]*v + tang2[3]*w)<0 ? (-1.0f) : 1.0f;
+ sign = (tang0[3] * u + tang1[3] * v + tang2[3] * w) < 0 ? (-1.0f) : 1.0f;
/* this sequence of math is designed specifically as is with great care
* to be compatible with our shader. Please don't change without good reason. */
- for (r= 0; r<3; r++) {
- from_tang[0][r]= tang0[r]*u + tang1[r]*v + tang2[r]*w;
- from_tang[2][r]= no0[r]*u + no1[r]*v + no2[r]*w;
+ for (r = 0; r < 3; r++) {
+ from_tang[0][r] = tang0[r] * u + tang1[r] * v + tang2[r] * w;
+ from_tang[2][r] = no0[r] * u + no1[r] * v + no2[r] * w;
}
cross_v3_v3v3(from_tang[1], from_tang[2], from_tang[0]); /* B = sign * cross(N, T) */
@@ -258,13 +258,13 @@ static void flush_pixel(const MResolvePixelData *data, const int x, const int y)
static void set_rast_triangle(const MBakeRast *bake_rast, const int x, const int y)
{
- const int w= bake_rast->w;
- const int h= bake_rast->h;
+ const int w = bake_rast->w;
+ const int h = bake_rast->h;
- if (x>=0 && x<w && y>=0 && y<h) {
- if ((bake_rast->texels[y*w+x])==0) {
+ if (x >= 0 && x < w && y >= 0 && y < h) {
+ if ((bake_rast->texels[y * w + x]) == 0) {
flush_pixel(bake_rast->data, x, y);
- bake_rast->texels[y*w+x]= FILTER_MASK_USED;
+ bake_rast->texels[y * w + x] = FILTER_MASK_USED;
}
}
}
@@ -274,35 +274,35 @@ static void rasterize_half(const MBakeRast *bake_rast,
const float s0_l, const float t0_l, const float s1_l, const float t1_l,
const int y0_in, const int y1_in, const int is_mid_right)
{
- const int s_stable= fabsf(t1_s-t0_s)>FLT_EPSILON ? 1 : 0;
- const int l_stable= fabsf(t1_l-t0_l)>FLT_EPSILON ? 1 : 0;
- const int w= bake_rast->w;
- const int h= bake_rast->h;
+ const int s_stable = fabsf(t1_s - t0_s) > FLT_EPSILON ? 1 : 0;
+ const int l_stable = fabsf(t1_l - t0_l) > FLT_EPSILON ? 1 : 0;
+ const int w = bake_rast->w;
+ const int h = bake_rast->h;
int y, y0, y1;
- if (y1_in<=0 || y0_in>=h)
+ if (y1_in <= 0 || y0_in >= h)
return;
- y0= y0_in<0 ? 0 : y0_in;
- y1= y1_in>=h ? h : y1_in;
+ y0 = y0_in < 0 ? 0 : y0_in;
+ y1 = y1_in >= h ? h : y1_in;
- for (y= y0; y<y1; y++) {
+ for (y = y0; y < y1; y++) {
/*-b(x-x0) + a(y-y0) = 0 */
int iXl, iXr, x;
- float x_l= s_stable!=0 ? (s0_s + (((s1_s-s0_s)*(y-t0_s))/(t1_s-t0_s))) : s0_s;
- float x_r= l_stable!=0 ? (s0_l + (((s1_l-s0_l)*(y-t0_l))/(t1_l-t0_l))) : s0_l;
+ float x_l = s_stable != 0 ? (s0_s + (((s1_s - s0_s) * (y - t0_s)) / (t1_s - t0_s))) : s0_s;
+ float x_r = l_stable != 0 ? (s0_l + (((s1_l - s0_l) * (y - t0_l)) / (t1_l - t0_l))) : s0_l;
- if (is_mid_right!=0)
+ if (is_mid_right != 0)
SWAP(float, x_l, x_r);
- iXl= (int)ceilf(x_l);
- iXr= (int)ceilf(x_r);
+ iXl = (int)ceilf(x_l);
+ iXr = (int)ceilf(x_r);
- if (iXr>0 && iXl<w) {
- iXl= iXl<0?0:iXl;
- iXr= iXr>=w?w:iXr;
+ if (iXr > 0 && iXl < w) {
+ iXl = iXl < 0 ? 0 : iXl;
+ iXr = iXr >= w ? w : iXr;
- for (x= iXl; x<iXr; x++)
+ for (x = iXl; x < iXr; x++)
set_rast_triangle(bake_rast, x, y);
}
}
@@ -310,40 +310,40 @@ static void rasterize_half(const MBakeRast *bake_rast,
static void bake_rasterize(const MBakeRast *bake_rast, const float st0_in[2], const float st1_in[2], const float st2_in[2])
{
- const int w= bake_rast->w;
- const int h= bake_rast->h;
- float slo= st0_in[0]*w - 0.5f;
- float tlo= st0_in[1]*h - 0.5f;
- float smi= st1_in[0]*w - 0.5f;
- float tmi= st1_in[1]*h - 0.5f;
- float shi= st2_in[0]*w - 0.5f;
- float thi= st2_in[1]*h - 0.5f;
- int is_mid_right= 0, ylo, yhi, yhi_beg;
+ const int w = bake_rast->w;
+ const int h = bake_rast->h;
+ float slo = st0_in[0] * w - 0.5f;
+ float tlo = st0_in[1] * h - 0.5f;
+ float smi = st1_in[0] * w - 0.5f;
+ float tmi = st1_in[1] * h - 0.5f;
+ float shi = st2_in[0] * w - 0.5f;
+ float thi = st2_in[1] * h - 0.5f;
+ int is_mid_right = 0, ylo, yhi, yhi_beg;
/* skip degenerates */
- if ((slo==smi && tlo==tmi) || (slo==shi && tlo==thi) || (smi==shi && tmi==thi))
+ if ((slo == smi && tlo == tmi) || (slo == shi && tlo == thi) || (smi == shi && tmi == thi))
return;
/* sort by T */
- if (tlo>tmi && tlo>thi) {
+ if (tlo > tmi && tlo > thi) {
SWAP(float, shi, slo);
SWAP(float, thi, tlo);
}
- else if (tmi>thi) {
+ else if (tmi > thi) {
SWAP(float, shi, smi);
SWAP(float, thi, tmi);
}
- if (tlo>tmi) {
+ if (tlo > tmi) {
SWAP(float, slo, smi);
SWAP(float, tlo, tmi);
}
/* check if mid point is to the left or to the right of the lo-hi edge */
- is_mid_right= (-(shi-slo)*(tmi-thi) + (thi-tlo)*(smi-shi))>0 ? 1 : 0;
- ylo= (int) ceilf(tlo);
- yhi_beg= (int) ceilf(tmi);
- yhi= (int) ceilf(thi);
+ is_mid_right = (-(shi - slo) * (tmi - thi) + (thi - tlo) * (smi - shi)) > 0 ? 1 : 0;
+ ylo = (int) ceilf(tlo);
+ yhi_beg = (int) ceilf(tmi);
+ yhi = (int) ceilf(thi);
/*if (fTmi>ceilf(fTlo))*/
rasterize_half(bake_rast, slo, tlo, smi, tmi, slo, tlo, shi, thi, ylo, yhi_beg, is_mid_right);
@@ -360,69 +360,69 @@ static int multiresbake_test_break(MultiresBakeRender *bkr)
return G.afbreek;
}
-static void do_multires_bake(MultiresBakeRender *bkr, Image* ima, MPassKnownData passKnownData,
+static void do_multires_bake(MultiresBakeRender *bkr, Image *ima, MPassKnownData passKnownData,
MInitBakeData initBakeData, MApplyBakeData applyBakeData, MFreeBakeData freeBakeData)
{
- DerivedMesh *dm= bkr->lores_dm;
- ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL);
- const int lvl= bkr->lvl;
- const int tot_face= dm->getNumTessFaces(dm);
- MVert *mvert= dm->getVertArray(dm);
- MFace *mface= dm->getTessFaceArray(dm);
- MTFace *mtface= dm->getTessFaceDataArray(dm, CD_MTFACE);
- float *pvtangent= NULL;
+ DerivedMesh *dm = bkr->lores_dm;
+ ImBuf *ibuf = BKE_image_get_ibuf(ima, NULL);
+ const int lvl = bkr->lvl;
+ const int tot_face = dm->getNumTessFaces(dm);
+ MVert *mvert = dm->getVertArray(dm);
+ MFace *mface = dm->getTessFaceArray(dm);
+ MTFace *mtface = dm->getTessFaceDataArray(dm, CD_MTFACE);
+ float *pvtangent = NULL;
if (CustomData_get_layer_index(&dm->faceData, CD_TANGENT) == -1)
DM_add_tangent_layer(dm);
- pvtangent= DM_get_tessface_data_layer(dm, CD_TANGENT);
+ pvtangent = DM_get_tessface_data_layer(dm, CD_TANGENT);
if (tot_face > 0) { /* sanity check */
- int f= 0;
+ int f = 0;
MBakeRast bake_rast;
- MResolvePixelData data={NULL};
-
- data.mface= mface;
- data.mvert= mvert;
- data.mtface= mtface;
- data.pvtangent= pvtangent;
- data.precomputed_normals= dm->getTessFaceDataArray(dm, CD_NORMAL); /* don't strictly need this */
- data.w= ibuf->x;
- data.h= ibuf->y;
- data.lores_dm= dm;
- data.hires_dm= bkr->hires_dm;
- data.lvl= lvl;
- data.pass_data= passKnownData;
+ MResolvePixelData data = {NULL};
+
+ data.mface = mface;
+ data.mvert = mvert;
+ data.mtface = mtface;
+ data.pvtangent = pvtangent;
+ data.precomputed_normals = dm->getTessFaceDataArray(dm, CD_NORMAL); /* don't strictly need this */
+ data.w = ibuf->x;
+ data.h = ibuf->y;
+ data.lores_dm = dm;
+ data.hires_dm = bkr->hires_dm;
+ data.lvl = lvl;
+ data.pass_data = passKnownData;
if (initBakeData)
- data.bake_data= initBakeData(bkr, ima);
+ data.bake_data = initBakeData(bkr, ima);
init_bake_rast(&bake_rast, ibuf, &data, flush_pixel);
- for (f= 0; f<tot_face; f++) {
- MTFace *mtfate= &mtface[f];
+ for (f = 0; f < tot_face; f++) {
+ MTFace *mtfate = &mtface[f];
int verts[3][2], nr_tris, t;
if (multiresbake_test_break(bkr))
break;
- if (mtfate->tpage!=ima)
+ if (mtfate->tpage != ima)
continue;
- data.face_index= f;
+ data.face_index = f;
/* might support other forms of diagonal splits later on such as
* split by shortest diagonal.*/
- verts[0][0]=0;
- verts[1][0]=1;
- verts[2][0]=2;
+ verts[0][0] = 0;
+ verts[1][0] = 1;
+ verts[2][0] = 2;
- verts[0][1]=0;
- verts[1][1]=2;
- verts[2][1]=3;
+ verts[0][1] = 0;
+ verts[1][1] = 2;
+ verts[2][1] = 3;
- nr_tris= mface[f].v4!=0 ? 2 : 1;
- for (t= 0; t<nr_tris; t++) {
+ nr_tris = mface[f].v4 != 0 ? 2 : 1;
+ for (t = 0; t < nr_tris; t++) {
data.i0 = verts[0][t];
data.i1 = verts[1][t];
data.i2 = verts[2][t];
@@ -433,10 +433,10 @@ static void do_multires_bake(MultiresBakeRender *bkr, Image* ima, MPassKnownData
bkr->baked_faces++;
if (bkr->do_update)
- *bkr->do_update= 1;
+ *bkr->do_update = 1;
if (bkr->progress)
- *bkr->progress= ((float)bkr->baked_objects + (float)bkr->baked_faces / tot_face) / bkr->tot_obj;
+ *bkr->progress = ((float)bkr->baked_objects + (float)bkr->baked_faces / tot_face) / bkr->tot_obj;
}
if (applyBakeData)
@@ -452,13 +452,13 @@ static void interp_bilinear_quad_data(float data[4][3], float u, float v, float
float vec[3];
copy_v3_v3(res, data[0]);
- mul_v3_fl(res, (1-u)*(1-v));
+ mul_v3_fl(res, (1 - u) * (1 - v));
copy_v3_v3(vec, data[1]);
- mul_v3_fl(vec, u*(1-v)); add_v3_v3(res, vec);
+ mul_v3_fl(vec, u * (1 - v)); add_v3_v3(res, vec);
copy_v3_v3(vec, data[2]);
- mul_v3_fl(vec, u*v); add_v3_v3(res, vec);
+ mul_v3_fl(vec, u * v); add_v3_v3(res, vec);
copy_v3_v3(vec, data[3]);
- mul_v3_fl(vec, (1-u)*v); add_v3_v3(res, vec);
+ mul_v3_fl(vec, (1 - u) * v); add_v3_v3(res, vec);
}
static void interp_barycentric_tri_data(float data[3][3], float u, float v, float res[3])
@@ -470,7 +470,7 @@ static void interp_barycentric_tri_data(float data[3][3], float u, float v, floa
copy_v3_v3(vec, data[1]);
mul_v3_fl(vec, v); add_v3_v3(res, vec);
copy_v3_v3(vec, data[2]);
- mul_v3_fl(vec, 1.0f-u-v); add_v3_v3(res, vec);
+ mul_v3_fl(vec, 1.0f - u - v); add_v3_v3(res, vec);
}
/* mode = 0: interpolate normals,
@@ -481,14 +481,14 @@ static void interp_bilinear_grid(DMGridData *grid, int grid_size, float crn_x, f
float u, v;
float data[4][3];
- x0= (int) crn_x;
- x1= x0>=(grid_size-1) ? (grid_size-1) : (x0+1);
+ x0 = (int) crn_x;
+ x1 = x0 >= (grid_size - 1) ? (grid_size - 1) : (x0 + 1);
- y0= (int) crn_y;
- y1= y0>=(grid_size-1) ? (grid_size-1) : (y0+1);
+ y0 = (int) crn_y;
+ y1 = y0 >= (grid_size - 1) ? (grid_size - 1) : (y0 + 1);
- u= crn_x-x0;
- v= crn_y-y0;
+ u = crn_x - x0;
+ v = crn_y - y0;
if (mode == 0) {
copy_v3_v3(data[0], grid[y0 * grid_size + x0].no);
@@ -516,30 +516,30 @@ static void get_ccgdm_data(DerivedMesh *lodm, DerivedMesh *hidm, const int *orig
lodm->getTessFace(lodm, face_index, &mface);
- grid_size= hidm->getGridSize(hidm);
- grid_data= hidm->getGridData(hidm);
- grid_offset= hidm->getGridOffset(hidm);
+ grid_size = hidm->getGridSize(hidm);
+ grid_data = hidm->getGridData(hidm);
+ grid_offset = hidm->getGridOffset(hidm);
- face_side= (grid_size<<1)-1;
+ face_side = (grid_size << 1) - 1;
- if (lvl==0) {
- g_index= grid_offset[face_index];
- S= mdisp_rot_face_to_crn(mface.v4 ? 4 : 3, face_side, u*(face_side-1), v*(face_side-1), &crn_x, &crn_y);
+ if (lvl == 0) {
+ g_index = grid_offset[face_index];
+ S = mdisp_rot_face_to_crn(mface.v4 ? 4 : 3, face_side, u * (face_side - 1), v * (face_side - 1), &crn_x, &crn_y);
}
else {
- int side= (1 << (lvl-1)) + 1;
- int grid_index= origindex[face_index];
- int loc_offs= face_index % (1<<(2*lvl));
- int cell_index= loc_offs % ((side-1)*(side-1));
- int cell_side= grid_size / (side-1);
- int row= cell_index / (side-1);
- int col= cell_index % (side-1);
-
- S= face_index / (1<<(2*(lvl-1))) - grid_offset[grid_index];
- g_index= grid_offset[grid_index];
-
- crn_y= (row * cell_side) + u * cell_side;
- crn_x= (col * cell_side) + v * cell_side;
+ int side = (1 << (lvl - 1)) + 1;
+ int grid_index = origindex[face_index];
+ int loc_offs = face_index % (1 << (2 * lvl));
+ int cell_index = loc_offs % ((side - 1) * (side - 1));
+ int cell_side = grid_size / (side - 1);
+ int row = cell_index / (side - 1);
+ int col = cell_index % (side - 1);
+
+ S = face_index / (1 << (2 * (lvl - 1))) - grid_offset[grid_index];
+ g_index = grid_offset[grid_index];
+
+ crn_y = (row * cell_side) + u * cell_side;
+ crn_x = (col * cell_side) + v * cell_side;
}
CLAMP(crn_x, 0.0f, grid_size);
@@ -597,95 +597,95 @@ static void interp_barycentric_mface(DerivedMesh *dm, MFace *mface, const float
static void *init_heights_data(MultiresBakeRender *bkr, Image *ima)
{
MHeightBakeData *height_data;
- ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL);
- DerivedMesh *lodm= bkr->lores_dm;
+ ImBuf *ibuf = BKE_image_get_ibuf(ima, NULL);
+ DerivedMesh *lodm = bkr->lores_dm;
- height_data= MEM_callocN(sizeof(MHeightBakeData), "MultiresBake heightData");
+ height_data = MEM_callocN(sizeof(MHeightBakeData), "MultiresBake heightData");
- height_data->ima= ima;
- height_data->heights= MEM_callocN(sizeof(float)*ibuf->x*ibuf->y, "MultiresBake heights");
- height_data->height_max= -FLT_MAX;
- height_data->height_min= FLT_MAX;
+ height_data->ima = ima;
+ height_data->heights = MEM_callocN(sizeof(float) * ibuf->x * ibuf->y, "MultiresBake heights");
+ height_data->height_max = -FLT_MAX;
+ height_data->height_min = FLT_MAX;
if (!bkr->use_lores_mesh) {
- SubsurfModifierData smd= {{NULL}};
- int ss_lvl= bkr->tot_lvl - bkr->lvl;
+ SubsurfModifierData smd = {{NULL}};
+ int ss_lvl = bkr->tot_lvl - bkr->lvl;
CLAMP(ss_lvl, 0, 6);
- smd.levels= smd.renderLevels= ss_lvl;
- smd.flags|= eSubsurfModifierFlag_SubsurfUv;
+ smd.levels = smd.renderLevels = ss_lvl;
+ smd.flags |= eSubsurfModifierFlag_SubsurfUv;
if (bkr->simple)
- smd.subdivType= ME_SIMPLE_SUBSURF;
+ smd.subdivType = ME_SIMPLE_SUBSURF;
- height_data->ssdm= subsurf_make_derived_from_derived(bkr->lores_dm, &smd, 0, NULL, 0, 0, 0);
+ height_data->ssdm = subsurf_make_derived_from_derived(bkr->lores_dm, &smd, 0, NULL, 0, 0, 0);
}
- height_data->origindex= lodm->getTessFaceDataArray(lodm, CD_ORIGINDEX);
+ height_data->origindex = lodm->getTessFaceDataArray(lodm, CD_ORIGINDEX);
- return (void*)height_data;
+ return (void *)height_data;
}
static void *init_normal_data(MultiresBakeRender *bkr, Image *UNUSED(ima))
{
MNormalBakeData *normal_data;
- DerivedMesh *lodm= bkr->lores_dm;
+ DerivedMesh *lodm = bkr->lores_dm;
- normal_data= MEM_callocN(sizeof(MNormalBakeData), "MultiresBake normalData");
+ normal_data = MEM_callocN(sizeof(MNormalBakeData), "MultiresBake normalData");
- normal_data->origindex= lodm->getTessFaceDataArray(lodm, CD_ORIGINDEX);
+ normal_data->origindex = lodm->getTessFaceDataArray(lodm, CD_ORIGINDEX);
- return (void*)normal_data;
+ return (void *)normal_data;
}
static void free_normal_data(void *bake_data)
{
- MNormalBakeData *normal_data= (MNormalBakeData*)bake_data;
+ MNormalBakeData *normal_data = (MNormalBakeData *)bake_data;
MEM_freeN(normal_data);
}
static void apply_heights_data(void *bake_data)
{
- MHeightBakeData *height_data= (MHeightBakeData*)bake_data;
- ImBuf *ibuf= BKE_image_get_ibuf(height_data->ima, NULL);
+ MHeightBakeData *height_data = (MHeightBakeData *)bake_data;
+ ImBuf *ibuf = BKE_image_get_ibuf(height_data->ima, NULL);
int x, y, i;
- float height, *heights= height_data->heights;
- float min= height_data->height_min, max= height_data->height_max;
+ float height, *heights = height_data->heights;
+ float min = height_data->height_min, max = height_data->height_max;
- for (x= 0; x<ibuf->x; x++) {
- for (y =0; y<ibuf->y; y++) {
- i= ibuf->x*y + x;
+ for (x = 0; x < ibuf->x; x++) {
+ for (y = 0; y < ibuf->y; y++) {
+ i = ibuf->x * y + x;
- if (((char*)ibuf->userdata)[i] != FILTER_MASK_USED)
+ if (((char *)ibuf->userdata)[i] != FILTER_MASK_USED)
continue;
if (ibuf->rect_float) {
- float *rrgbf= ibuf->rect_float + i*4;
+ float *rrgbf = ibuf->rect_float + i * 4;
- if (max-min > 1e-5f) height= (heights[i]-min)/(max-min);
- else height= 0;
+ if (max - min > 1e-5f) height = (heights[i] - min) / (max - min);
+ else height = 0;
- rrgbf[0]=rrgbf[1]=rrgbf[2]= height;
+ rrgbf[0] = rrgbf[1] = rrgbf[2] = height;
}
else {
- char *rrgb= (char*)ibuf->rect + i*4;
+ char *rrgb = (char *)ibuf->rect + i * 4;
- if (max-min > 1e-5f) height= (heights[i]-min)/(max-min);
- else height= 0;
+ if (max - min > 1e-5f) height = (heights[i] - min) / (max - min);
+ else height = 0;
- rrgb[0]=rrgb[1]=rrgb[2]= FTOCHAR(height);
+ rrgb[0] = rrgb[1] = rrgb[2] = FTOCHAR(height);
}
}
}
- ibuf->userflags= IB_RECT_INVALID;
+ ibuf->userflags = IB_RECT_INVALID;
}
static void free_heights_data(void *bake_data)
{
- MHeightBakeData *height_data= (MHeightBakeData*)bake_data;
+ MHeightBakeData *height_data = (MHeightBakeData *)bake_data;
if (height_data->ssdm)
height_data->ssdm->release(height_data->ssdm);
@@ -704,23 +704,23 @@ static void apply_heights_callback(DerivedMesh *lores_dm, DerivedMesh *hires_dm,
const int face_index, const int lvl, const float st[2],
float UNUSED(tangmat[3][3]), const int x, const int y)
{
- MTFace *mtface= CustomData_get_layer(&lores_dm->faceData, CD_MTFACE);
+ MTFace *mtface = CustomData_get_layer(&lores_dm->faceData, CD_MTFACE);
MFace mface;
- Image *ima= mtface[face_index].tpage;
- ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL);
- MHeightBakeData *height_data= (MHeightBakeData*)bake_data;
+ Image *ima = mtface[face_index].tpage;
+ ImBuf *ibuf = BKE_image_get_ibuf(ima, NULL);
+ MHeightBakeData *height_data = (MHeightBakeData *)bake_data;
float uv[2], *st0, *st1, *st2, *st3;
- int pixel= ibuf->x*y + x;
+ int pixel = ibuf->x * y + x;
float vec[3], p0[3], p1[3], n[3], len;
lores_dm->getTessFace(lores_dm, face_index, &mface);
- st0= mtface[face_index].uv[0];
- st1= mtface[face_index].uv[1];
- st2= mtface[face_index].uv[2];
+ st0 = mtface[face_index].uv[0];
+ st1 = mtface[face_index].uv[1];
+ st2 = mtface[face_index].uv[2];
if (mface.v4) {
- st3= mtface[face_index].uv[3];
+ st3 = mtface[face_index].uv[3];
resolve_quad_uv(uv, st, st0, st1, st2, st3);
}
else
@@ -748,21 +748,21 @@ static void apply_heights_callback(DerivedMesh *lores_dm, DerivedMesh *hires_dm,
}
sub_v3_v3v3(vec, p1, p0);
- len= dot_v3v3(n, vec);
+ len = dot_v3v3(n, vec);
- height_data->heights[pixel]= len;
- if (len<height_data->height_min) height_data->height_min= len;
- if (len>height_data->height_max) height_data->height_max= len;
+ height_data->heights[pixel] = len;
+ if (len < height_data->height_min) height_data->height_min = len;
+ if (len > height_data->height_max) height_data->height_max = len;
if (ibuf->rect_float) {
- float *rrgbf= ibuf->rect_float + pixel*4;
- rrgbf[3]= 1.0f;
+ float *rrgbf = ibuf->rect_float + pixel * 4;
+ rrgbf[3] = 1.0f;
- ibuf->userflags= IB_RECT_INVALID;
+ ibuf->userflags = IB_RECT_INVALID;
}
else {
- char *rrgb= (char*)ibuf->rect + pixel*4;
- rrgb[3]= 255;
+ char *rrgb = (char *)ibuf->rect + pixel * 4;
+ rrgb[3] = 255;
}
}
@@ -775,23 +775,23 @@ static void apply_tangmat_callback(DerivedMesh *lores_dm, DerivedMesh *hires_dm,
const int face_index, const int lvl, const float st[2],
float tangmat[3][3], const int x, const int y)
{
- MTFace *mtface= CustomData_get_layer(&lores_dm->faceData, CD_MTFACE);
+ MTFace *mtface = CustomData_get_layer(&lores_dm->faceData, CD_MTFACE);
MFace mface;
- Image *ima= mtface[face_index].tpage;
- ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL);
- MNormalBakeData *normal_data= (MNormalBakeData*)bake_data;
+ Image *ima = mtface[face_index].tpage;
+ ImBuf *ibuf = BKE_image_get_ibuf(ima, NULL);
+ MNormalBakeData *normal_data = (MNormalBakeData *)bake_data;
float uv[2], *st0, *st1, *st2, *st3;
- int pixel= ibuf->x*y + x;
- float n[3], vec[3], tmp[3]= {0.5, 0.5, 0.5};
+ int pixel = ibuf->x * y + x;
+ float n[3], vec[3], tmp[3] = {0.5, 0.5, 0.5};
lores_dm->getTessFace(lores_dm, face_index, &mface);
- st0= mtface[face_index].uv[0];
- st1= mtface[face_index].uv[1];
- st2= mtface[face_index].uv[2];
+ st0 = mtface[face_index].uv[0];
+ st1 = mtface[face_index].uv[1];
+ st2 = mtface[face_index].uv[2];
if (mface.v4) {
- st3= mtface[face_index].uv[3];
+ st3 = mtface[face_index].uv[3];
resolve_quad_uv(uv, st, st0, st1, st2, st3);
}
else
@@ -808,61 +808,61 @@ static void apply_tangmat_callback(DerivedMesh *lores_dm, DerivedMesh *hires_dm,
add_v3_v3(vec, tmp);
if (ibuf->rect_float) {
- float *rrgbf= ibuf->rect_float + pixel*4;
- rrgbf[0]= vec[0];
- rrgbf[1]= vec[1];
- rrgbf[2]= vec[2];
- rrgbf[3]= 1.0f;
+ float *rrgbf = ibuf->rect_float + pixel * 4;
+ rrgbf[0] = vec[0];
+ rrgbf[1] = vec[1];
+ rrgbf[2] = vec[2];
+ rrgbf[3] = 1.0f;
- ibuf->userflags= IB_RECT_INVALID;
+ ibuf->userflags = IB_RECT_INVALID;
}
else {
- unsigned char *rrgb= (unsigned char *)ibuf->rect + pixel*4;
+ unsigned char *rrgb = (unsigned char *)ibuf->rect + pixel * 4;
rgb_float_to_uchar(rrgb, vec);
- rrgb[3]= 255;
+ rrgb[3] = 255;
}
}
static void count_images(MultiresBakeRender *bkr)
{
int a, totface;
- DerivedMesh *dm= bkr->lores_dm;
- MTFace *mtface= CustomData_get_layer(&dm->faceData, CD_MTFACE);
+ DerivedMesh *dm = bkr->lores_dm;
+ MTFace *mtface = CustomData_get_layer(&dm->faceData, CD_MTFACE);
- bkr->image.first= bkr->image.last= NULL;
- bkr->tot_image= 0;
+ bkr->image.first = bkr->image.last = NULL;
+ bkr->tot_image = 0;
- totface= dm->getNumTessFaces(dm);
+ totface = dm->getNumTessFaces(dm);
- for (a= 0; a<totface; a++)
- mtface[a].tpage->id.flag&= ~LIB_DOIT;
+ for (a = 0; a < totface; a++)
+ mtface[a].tpage->id.flag &= ~LIB_DOIT;
- for (a= 0; a<totface; a++) {
- Image *ima= mtface[a].tpage;
- if ((ima->id.flag&LIB_DOIT)==0) {
- LinkData *data= BLI_genericNodeN(ima);
+ for (a = 0; a < totface; a++) {
+ Image *ima = mtface[a].tpage;
+ if ((ima->id.flag & LIB_DOIT) == 0) {
+ LinkData *data = BLI_genericNodeN(ima);
BLI_addtail(&bkr->image, data);
bkr->tot_image++;
- ima->id.flag|= LIB_DOIT;
+ ima->id.flag |= LIB_DOIT;
}
}
- for (a= 0; a<totface; a++)
- mtface[a].tpage->id.flag&= ~LIB_DOIT;
+ for (a = 0; a < totface; a++)
+ mtface[a].tpage->id.flag &= ~LIB_DOIT;
}
static void bake_images(MultiresBakeRender *bkr)
{
LinkData *link;
- for (link= bkr->image.first; link; link= link->next) {
- Image *ima= (Image*)link->data;
- ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL);
+ for (link = bkr->image.first; link; link = link->next) {
+ Image *ima = (Image *)link->data;
+ ImBuf *ibuf = BKE_image_get_ibuf(ima, NULL);
- if (ibuf->x>0 && ibuf->y>0) {
- ibuf->userdata= MEM_callocN(ibuf->y*ibuf->x, "MultiresBake imbuf mask");
+ if (ibuf->x > 0 && ibuf->y > 0) {
+ ibuf->userdata = MEM_callocN(ibuf->y * ibuf->x, "MultiresBake imbuf mask");
- switch(bkr->mode) {
+ switch (bkr->mode) {
case RE_BAKE_NORMALS:
do_multires_bake(bkr, ima, apply_tangmat_callback, init_normal_data, NULL, free_normal_data);
break;
@@ -873,7 +873,7 @@ static void bake_images(MultiresBakeRender *bkr)
}
}
- ima->id.flag|= LIB_DOIT;
+ ima->id.flag |= LIB_DOIT;
}
}
@@ -881,28 +881,28 @@ static void finish_images(MultiresBakeRender *bkr)
{
LinkData *link;
- for (link= bkr->image.first; link; link= link->next) {
- Image *ima= (Image*)link->data;
- ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL);
+ for (link = bkr->image.first; link; link = link->next) {
+ Image *ima = (Image *)link->data;
+ ImBuf *ibuf = BKE_image_get_ibuf(ima, NULL);
- if (ibuf->x<=0 || ibuf->y<=0)
+ if (ibuf->x <= 0 || ibuf->y <= 0)
continue;
RE_bake_ibuf_filter(ibuf, (char *)ibuf->userdata, bkr->bake_filter);
- ibuf->userflags|= IB_BITMAPDIRTY;
+ ibuf->userflags |= IB_BITMAPDIRTY;
if (ibuf->rect_float)
- ibuf->userflags|= IB_RECT_INVALID;
+ ibuf->userflags |= IB_RECT_INVALID;
if (ibuf->mipmap[0]) {
- ibuf->userflags|= IB_MIPMAP_INVALID;
+ ibuf->userflags |= IB_MIPMAP_INVALID;
imb_freemipmapImBuf(ibuf);
}
if (ibuf->userdata) {
MEM_freeN(ibuf->userdata);
- ibuf->userdata= NULL;
+ ibuf->userdata = NULL;
}
}
}
@@ -916,38 +916,39 @@ static void multiresbake_start(MultiresBakeRender *bkr)
static int multiresbake_check(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
Object *ob;
Mesh *me;
MultiresModifierData *mmd;
- int ok= 1, a;
+ int ok = 1, a;
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
- ob= base->object;
+ CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases)
+ {
+ ob = base->object;
if (ob->type != OB_MESH) {
BKE_report(op->reports, RPT_ERROR, "Basking of multires data only works with active object which is a mesh");
- ok= 0;
+ ok = 0;
break;
}
- me= (Mesh*)ob->data;
- mmd= get_multires_modifier(scene, ob, 0);
+ me = (Mesh *)ob->data;
+ mmd = get_multires_modifier(scene, ob, 0);
/* Multi-resolution should be and be last in the stack */
if (ok && mmd) {
ModifierData *md;
- ok= mmd->totlvl>0;
+ ok = mmd->totlvl > 0;
- for (md = (ModifierData*)mmd->modifier.next; md && ok; md = md->next) {
+ for (md = (ModifierData *)mmd->modifier.next; md && ok; md = md->next) {
if (modifier_isEnabled(scene, md, eModifierMode_Realtime)) {
- ok= 0;
+ ok = 0;
}
}
}
- else ok= 0;
+ else ok = 0;
if (!ok) {
BKE_report(op->reports, RPT_ERROR, "Multires data baking requires multi-resolution object");
@@ -958,7 +959,7 @@ static int multiresbake_check(bContext *C, wmOperator *op)
if (!me->mtpoly) {
BKE_report(op->reports, RPT_ERROR, "Mesh should be unwrapped before multires data baking");
- ok= 0;
+ ok = 0;
}
else {
a = me->totpoly;
@@ -968,22 +969,22 @@ static int multiresbake_check(bContext *C, wmOperator *op)
if (!ima) {
BKE_report(op->reports, RPT_ERROR, "You should have active texture to use multires baker");
- ok= 0;
+ ok = 0;
}
else {
- ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL);
+ ImBuf *ibuf = BKE_image_get_ibuf(ima, NULL);
if (!ibuf) {
BKE_report(op->reports, RPT_ERROR, "Baking should happend to image with image buffer");
- ok= 0;
+ ok = 0;
}
else {
- if (ibuf->rect==NULL && ibuf->rect_float==NULL)
- ok= 0;
+ if (ibuf->rect == NULL && ibuf->rect_float == NULL)
+ ok = 0;
- if (ibuf->rect_float && !(ibuf->channels==0 || ibuf->channels==4))
- ok= 0;
+ if (ibuf->rect_float && !(ibuf->channels == 0 || ibuf->channels == 4))
+ ok = 0;
if (!ok)
BKE_report(op->reports, RPT_ERROR, "Baking to unsupported image type");
@@ -1003,23 +1004,23 @@ static int multiresbake_check(bContext *C, wmOperator *op)
static DerivedMesh *multiresbake_create_loresdm(Scene *scene, Object *ob, int *lvl)
{
DerivedMesh *dm;
- MultiresModifierData *mmd= get_multires_modifier(scene, ob, 0);
- Mesh *me= (Mesh*)ob->data;
+ MultiresModifierData *mmd = get_multires_modifier(scene, ob, 0);
+ Mesh *me = (Mesh *)ob->data;
- *lvl= mmd->lvl;
+ *lvl = mmd->lvl;
- if (*lvl==0) {
- DerivedMesh *tmp_dm= CDDM_from_mesh(me, ob);
- dm= CDDM_copy(tmp_dm);
+ if (*lvl == 0) {
+ DerivedMesh *tmp_dm = CDDM_from_mesh(me, ob);
+ dm = CDDM_copy(tmp_dm);
tmp_dm->release(tmp_dm);
}
else {
- MultiresModifierData tmp_mmd= *mmd;
- DerivedMesh *cddm= CDDM_from_mesh(me, ob);
+ MultiresModifierData tmp_mmd = *mmd;
+ DerivedMesh *cddm = CDDM_from_mesh(me, ob);
- tmp_mmd.lvl= *lvl;
- tmp_mmd.sculptlvl= *lvl;
- dm= multires_dm_create_from_derived(&tmp_mmd, 1, cddm, ob, 0);
+ tmp_mmd.lvl = *lvl;
+ tmp_mmd.sculptlvl = *lvl;
+ dm = multires_dm_create_from_derived(&tmp_mmd, 1, cddm, ob, 0);
cddm->release(cddm);
}
@@ -1028,18 +1029,18 @@ static DerivedMesh *multiresbake_create_loresdm(Scene *scene, Object *ob, int *l
static DerivedMesh *multiresbake_create_hiresdm(Scene *scene, Object *ob, int *lvl, int *simple)
{
- Mesh *me= (Mesh*)ob->data;
- MultiresModifierData *mmd= get_multires_modifier(scene, ob, 0);
- MultiresModifierData tmp_mmd= *mmd;
- DerivedMesh *cddm= CDDM_from_mesh(me, ob);
+ Mesh *me = (Mesh *)ob->data;
+ MultiresModifierData *mmd = get_multires_modifier(scene, ob, 0);
+ MultiresModifierData tmp_mmd = *mmd;
+ DerivedMesh *cddm = CDDM_from_mesh(me, ob);
DerivedMesh *dm;
- *lvl= mmd->totlvl;
- *simple= mmd->simple;
+ *lvl = mmd->totlvl;
+ *simple = mmd->simple;
- tmp_mmd.lvl= mmd->totlvl;
- tmp_mmd.sculptlvl= mmd->totlvl;
- dm= multires_dm_create_from_derived(&tmp_mmd, 1, cddm, ob, 0);
+ tmp_mmd.lvl = mmd->totlvl;
+ tmp_mmd.sculptlvl = mmd->totlvl;
+ dm = multires_dm_create_from_derived(&tmp_mmd, 1, cddm, ob, 0);
cddm->release(cddm);
return dm;
@@ -1048,67 +1049,69 @@ static DerivedMesh *multiresbake_create_hiresdm(Scene *scene, Object *ob, int *l
static void clear_images(MTFace *mtface, int totface)
{
int a;
- const float vec_alpha[4]= {0.0f, 0.0f, 0.0f, 0.0f};
- const float vec_solid[4]= {0.0f, 0.0f, 0.0f, 1.0f};
+ const float vec_alpha[4] = {0.0f, 0.0f, 0.0f, 0.0f};
+ const float vec_solid[4] = {0.0f, 0.0f, 0.0f, 1.0f};
- for (a= 0; a<totface; a++)
- mtface[a].tpage->id.flag&= ~LIB_DOIT;
+ for (a = 0; a < totface; a++)
+ mtface[a].tpage->id.flag &= ~LIB_DOIT;
- for (a= 0; a<totface; a++) {
- Image *ima= mtface[a].tpage;
+ for (a = 0; a < totface; a++) {
+ Image *ima = mtface[a].tpage;
- if ((ima->id.flag&LIB_DOIT)==0) {
- ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL);
+ if ((ima->id.flag & LIB_DOIT) == 0) {
+ ImBuf *ibuf = BKE_image_get_ibuf(ima, NULL);
IMB_rectfill(ibuf, (ibuf->planes == R_IMF_PLANES_RGBA) ? vec_alpha : vec_solid);
- ima->id.flag|= LIB_DOIT;
+ ima->id.flag |= LIB_DOIT;
}
}
- for (a= 0; a<totface; a++)
- mtface[a].tpage->id.flag&= ~LIB_DOIT;
+ for (a = 0; a < totface; a++)
+ mtface[a].tpage->id.flag &= ~LIB_DOIT;
}
static int multiresbake_image_exec_locked(bContext *C, wmOperator *op)
{
Object *ob;
- Scene *scene= CTX_data_scene(C);
- int objects_baked= 0;
+ Scene *scene = CTX_data_scene(C);
+ int objects_baked = 0;
if (!multiresbake_check(C, op))
return OPERATOR_CANCELLED;
- if (scene->r.bake_flag&R_BAKE_CLEAR) { /* clear images */
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ if (scene->r.bake_flag & R_BAKE_CLEAR) { /* clear images */
+ CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases)
+ {
Mesh *me;
- ob= base->object;
- me= (Mesh*)ob->data;
+ ob = base->object;
+ me = (Mesh *)ob->data;
clear_images(me->mtface, me->totface);
}
CTX_DATA_END;
}
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
- MultiresBakeRender bkr= {0};
+ CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases)
+ {
+ MultiresBakeRender bkr = {0};
- ob= base->object;
+ ob = base->object;
multires_force_update(ob);
/* copy data stored in job descriptor */
- bkr.bake_filter= scene->r.bake_filter;
- bkr.mode= scene->r.bake_mode;
- bkr.use_lores_mesh= scene->r.bake_flag&R_BAKE_LORES_MESH;
+ bkr.bake_filter = scene->r.bake_filter;
+ bkr.mode = scene->r.bake_mode;
+ bkr.use_lores_mesh = scene->r.bake_flag & R_BAKE_LORES_MESH;
/* create low-resolution DM (to bake to) and hi-resolution DM (to bake from) */
- bkr.lores_dm= multiresbake_create_loresdm(scene, ob, &bkr.lvl);
+ bkr.lores_dm = multiresbake_create_loresdm(scene, ob, &bkr.lvl);
if (!bkr.lores_dm)
continue;
- bkr.hires_dm= multiresbake_create_hiresdm(scene, ob, &bkr.tot_lvl, &bkr.simple);
+ bkr.hires_dm = multiresbake_create_hiresdm(scene, ob, &bkr.tot_lvl, &bkr.simple);
multiresbake_start(&bkr);
@@ -1130,20 +1133,21 @@ static int multiresbake_image_exec_locked(bContext *C, wmOperator *op)
/* Multiresbake adopted for job-system executing */
static void init_multiresbake_job(bContext *C, MultiresBakeJob *bkj)
{
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
Object *ob;
/* backup scene settings, so their changing in UI would take no effect on baker */
- bkj->bake_filter= scene->r.bake_filter;
- bkj->mode= scene->r.bake_mode;
- bkj->use_lores_mesh= scene->r.bake_flag&R_BAKE_LORES_MESH;
- bkj->bake_clear= scene->r.bake_flag&R_BAKE_CLEAR;
+ bkj->bake_filter = scene->r.bake_filter;
+ bkj->mode = scene->r.bake_mode;
+ bkj->use_lores_mesh = scene->r.bake_flag & R_BAKE_LORES_MESH;
+ bkj->bake_clear = scene->r.bake_flag & R_BAKE_CLEAR;
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases)
+ {
MultiresBakerJobData *data;
DerivedMesh *lores_dm;
int lvl;
- ob= base->object;
+ ob = base->object;
multires_force_update(ob);
@@ -1151,7 +1155,7 @@ static void init_multiresbake_job(bContext *C, MultiresBakeJob *bkj)
if (!lores_dm)
continue;
- data= MEM_callocN(sizeof(MultiresBakerJobData), "multiresBaker derivedMesh_data");
+ data = MEM_callocN(sizeof(MultiresBakerJobData), "multiresBaker derivedMesh_data");
data->lores_dm = lores_dm;
data->lvl = lvl;
data->hires_dm = multiresbake_create_hiresdm(scene, ob, &data->tot_lvl, &data->simple);
@@ -1164,42 +1168,42 @@ static void init_multiresbake_job(bContext *C, MultiresBakeJob *bkj)
static void multiresbake_startjob(void *bkv, short *stop, short *do_update, float *progress)
{
MultiresBakerJobData *data;
- MultiresBakeJob *bkj= bkv;
- int baked_objects= 0, tot_obj;
+ MultiresBakeJob *bkj = bkv;
+ int baked_objects = 0, tot_obj;
- tot_obj= BLI_countlist(&bkj->data);
+ tot_obj = BLI_countlist(&bkj->data);
if (bkj->bake_clear) { /* clear images */
- for (data= bkj->data.first; data; data= data->next) {
- DerivedMesh *dm= data->lores_dm;
- MTFace *mtface= CustomData_get_layer(&dm->faceData, CD_MTFACE);
+ for (data = bkj->data.first; data; data = data->next) {
+ DerivedMesh *dm = data->lores_dm;
+ MTFace *mtface = CustomData_get_layer(&dm->faceData, CD_MTFACE);
clear_images(mtface, dm->getNumTessFaces(dm));
}
}
- for (data= bkj->data.first; data; data= data->next) {
- MultiresBakeRender bkr= {0};
+ for (data = bkj->data.first; data; data = data->next) {
+ MultiresBakeRender bkr = {0};
/* copy data stored in job descriptor */
- bkr.bake_filter= bkj->bake_filter;
- bkr.mode= bkj->mode;
- bkr.use_lores_mesh= bkj->use_lores_mesh;
+ bkr.bake_filter = bkj->bake_filter;
+ bkr.mode = bkj->mode;
+ bkr.use_lores_mesh = bkj->use_lores_mesh;
/* create low-resolution DM (to bake to) and hi-resolution DM (to bake from) */
- bkr.lores_dm= data->lores_dm;
- bkr.hires_dm= data->hires_dm;
- bkr.tot_lvl= data->tot_lvl;
- bkr.lvl= data->lvl;
- bkr.simple= data->simple;
+ bkr.lores_dm = data->lores_dm;
+ bkr.hires_dm = data->hires_dm;
+ bkr.tot_lvl = data->tot_lvl;
+ bkr.lvl = data->lvl;
+ bkr.simple = data->simple;
/* needed for proper progress bar */
- bkr.tot_obj= tot_obj;
- bkr.baked_objects= baked_objects;
+ bkr.tot_obj = tot_obj;
+ bkr.baked_objects = baked_objects;
- bkr.stop= stop;
- bkr.do_update= do_update;
- bkr.progress= progress;
+ bkr.stop = stop;
+ bkr.do_update = do_update;
+ bkr.progress = progress;
multiresbake_start(&bkr);
@@ -1211,16 +1215,16 @@ static void multiresbake_startjob(void *bkv, short *stop, short *do_update, floa
static void multiresbake_freejob(void *bkv)
{
- MultiresBakeJob *bkj= bkv;
+ MultiresBakeJob *bkj = bkv;
MultiresBakerJobData *data, *next;
- data= bkj->data.first;
+ data = bkj->data.first;
while (data) {
- next= data->next;
+ next = data->next;
data->lores_dm->release(data->lores_dm);
data->hires_dm->release(data->hires_dm);
MEM_freeN(data);
- data= next;
+ data = next;
}
MEM_freeN(bkj);
@@ -1228,14 +1232,14 @@ static void multiresbake_freejob(void *bkv)
static int multiresbake_image_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
MultiresBakeJob *bkr;
wmJob *steve;
if (!multiresbake_check(C, op))
return OPERATOR_CANCELLED;
- bkr= MEM_callocN(sizeof(MultiresBakeJob), "MultiresBakeJob data");
+ bkr = MEM_callocN(sizeof(MultiresBakeJob), "MultiresBakeJob data");
init_multiresbake_job(C, bkr);
if (!bkr->data.first) {
@@ -1244,12 +1248,12 @@ static int multiresbake_image_exec(bContext *C, wmOperator *op)
}
/* setup job */
- steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene, "Multires Bake", WM_JOB_EXCL_RENDER|WM_JOB_PRIORITY|WM_JOB_PROGRESS);
+ steve = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene, "Multires Bake", WM_JOB_EXCL_RENDER | WM_JOB_PRIORITY | WM_JOB_PROGRESS);
WM_jobs_customdata(steve, bkr, multiresbake_freejob);
WM_jobs_timer(steve, 0.2, NC_IMAGE, 0); /* TODO - only draw bake image, can we enforce this */
WM_jobs_callbacks(steve, multiresbake_startjob, NULL, NULL, NULL);
- G.afbreek= 0;
+ G.afbreek = 0;
WM_jobs_start(CTX_wm_manager(C), steve);
WM_cursor_wait(0);
@@ -1294,12 +1298,12 @@ typedef struct BakeRender {
/* use by exec and invoke */
static int test_bake_internal(bContext *C, ReportList *reports)
{
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
- if ((scene->r.bake_flag & R_BAKE_TO_ACTIVE) && CTX_data_active_object(C)==NULL) {
+ if ((scene->r.bake_flag & R_BAKE_TO_ACTIVE) && CTX_data_active_object(C) == NULL) {
BKE_report(reports, RPT_ERROR, "No active object");
}
- else if (scene->r.bake_mode==RE_BAKE_AO && scene->world==NULL) {
+ else if (scene->r.bake_mode == RE_BAKE_AO && scene->world == NULL) {
BKE_report(reports, RPT_ERROR, "No world set up");
}
else {
@@ -1311,23 +1315,23 @@ static int test_bake_internal(bContext *C, ReportList *reports)
static void init_bake_internal(BakeRender *bkr, bContext *C)
{
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
/* get editmode results */
ED_object_exit_editmode(C, 0); /* 0 = does not exit editmode */
- bkr->sa= BKE_screen_find_big_area(CTX_wm_screen(C), SPACE_IMAGE, 10); /* can be NULL */
- bkr->main= CTX_data_main(C);
- bkr->scene= scene;
- bkr->actob= (scene->r.bake_flag & R_BAKE_TO_ACTIVE) ? OBACT : NULL;
- bkr->re= RE_NewRender("_Bake View_");
+ bkr->sa = BKE_screen_find_big_area(CTX_wm_screen(C), SPACE_IMAGE, 10); /* can be NULL */
+ bkr->main = CTX_data_main(C);
+ bkr->scene = scene;
+ bkr->actob = (scene->r.bake_flag & R_BAKE_TO_ACTIVE) ? OBACT : NULL;
+ bkr->re = RE_NewRender("_Bake View_");
- if (scene->r.bake_mode==RE_BAKE_AO) {
+ if (scene->r.bake_mode == RE_BAKE_AO) {
/* If raytracing or AO is disabled, switch it on temporarily for baking. */
bkr->prev_wo_amb_occ = (scene->world->mode & WO_AMB_OCC) != 0;
scene->world->mode |= WO_AMB_OCC;
}
- if (scene->r.bake_mode==RE_BAKE_AO || bkr->actob) {
+ if (scene->r.bake_mode == RE_BAKE_AO || bkr->actob) {
bkr->prev_r_raytrace = (scene->r.mode & R_RAYTRACE) != 0;
scene->r.mode |= R_RAYTRACE;
}
@@ -1338,20 +1342,20 @@ static void finish_bake_internal(BakeRender *bkr)
RE_Database_Free(bkr->re);
/* restore raytrace and AO */
- if (bkr->scene->r.bake_mode==RE_BAKE_AO)
+ if (bkr->scene->r.bake_mode == RE_BAKE_AO)
if (bkr->prev_wo_amb_occ == 0)
bkr->scene->world->mode &= ~WO_AMB_OCC;
- if (bkr->scene->r.bake_mode==RE_BAKE_AO || bkr->actob)
+ if (bkr->scene->r.bake_mode == RE_BAKE_AO || bkr->actob)
if (bkr->prev_r_raytrace == 0)
bkr->scene->r.mode &= ~R_RAYTRACE;
- if (bkr->result==BAKE_RESULT_OK) {
+ if (bkr->result == BAKE_RESULT_OK) {
Image *ima;
/* force OpenGL reload and mipmap recalc */
- for (ima= G.main->image.first; ima; ima= ima->id.next) {
- if (ima->ok==IMA_OK_LOADED) {
- ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL);
+ for (ima = G.main->image.first; ima; ima = ima->id.next) {
+ if (ima->ok == IMA_OK_LOADED) {
+ ImBuf *ibuf = BKE_image_get_ibuf(ima, NULL);
if (ibuf) {
if (ibuf->userflags & IB_BITMAPDIRTY) {
GPU_free_image(ima);
@@ -1361,7 +1365,7 @@ static void finish_bake_internal(BakeRender *bkr)
/* freed when baking is done, but if its canceled we need to free here */
if (ibuf->userdata) {
MEM_freeN(ibuf->userdata);
- ibuf->userdata= NULL;
+ ibuf->userdata = NULL;
}
}
}
@@ -1371,52 +1375,52 @@ static void finish_bake_internal(BakeRender *bkr)
static void *do_bake_render(void *bake_v)
{
- BakeRender *bkr= bake_v;
+ BakeRender *bkr = bake_v;
- bkr->result= RE_bake_shade_all_selected(bkr->re, bkr->scene->r.bake_mode, bkr->actob, NULL, bkr->progress);
- bkr->ready= 1;
+ bkr->result = RE_bake_shade_all_selected(bkr->re, bkr->scene->r.bake_mode, bkr->actob, NULL, bkr->progress);
+ bkr->ready = 1;
return NULL;
}
static void bake_startjob(void *bkv, short *stop, short *do_update, float *progress)
{
- BakeRender *bkr= bkv;
- Scene *scene= bkr->scene;
- Main *bmain= bkr->main;
+ BakeRender *bkr = bkv;
+ Scene *scene = bkr->scene;
+ Main *bmain = bkr->main;
- bkr->stop= stop;
- bkr->do_update= do_update;
- bkr->progress= progress;
+ bkr->stop = stop;
+ bkr->do_update = do_update;
+ bkr->progress = progress;
RE_test_break_cb(bkr->re, NULL, thread_break);
- G.afbreek= 0; /* blender_test_break uses this global */
+ G.afbreek = 0; /* blender_test_break uses this global */
RE_Database_Baking(bkr->re, bmain, scene, scene->lay, scene->r.bake_mode, bkr->actob);
/* baking itself is threaded, cannot use test_break in threads. we also update optional imagewindow */
- bkr->result= RE_bake_shade_all_selected(bkr->re, scene->r.bake_mode, bkr->actob, bkr->do_update, bkr->progress);
+ bkr->result = RE_bake_shade_all_selected(bkr->re, scene->r.bake_mode, bkr->actob, bkr->do_update, bkr->progress);
}
static void bake_update(void *bkv)
{
- BakeRender *bkr= bkv;
+ BakeRender *bkr = bkv;
- if (bkr->sa && bkr->sa->spacetype==SPACE_IMAGE) { /* in case the user changed while baking */
- SpaceImage *sima= bkr->sa->spacedata.first;
+ if (bkr->sa && bkr->sa->spacetype == SPACE_IMAGE) { /* in case the user changed while baking */
+ SpaceImage *sima = bkr->sa->spacedata.first;
if (sima)
- sima->image= RE_bake_shade_get_image();
+ sima->image = RE_bake_shade_get_image();
}
}
static void bake_freejob(void *bkv)
{
- BakeRender *bkr= bkv;
+ BakeRender *bkr = bkv;
finish_bake_internal(bkr);
- if (bkr->result==BAKE_RESULT_NO_OBJECTS)
+ if (bkr->result == BAKE_RESULT_NO_OBJECTS)
BKE_report(bkr->reports, RPT_ERROR, "No objects or images found to bake to");
- else if (bkr->result==BAKE_RESULT_FEEDBACK_LOOP)
+ else if (bkr->result == BAKE_RESULT_FEEDBACK_LOOP)
BKE_report(bkr->reports, RPT_WARNING, "Feedback loop detected");
MEM_freeN(bkr);
@@ -1427,8 +1431,8 @@ static void bake_freejob(void *bkv)
static int objects_bake_render_modal(bContext *C, wmOperator *UNUSED(op), wmEvent *event)
{
/* no running blender, remove handler and pass through */
- if (0==WM_jobs_test(CTX_wm_manager(C), CTX_data_scene(C)))
- return OPERATOR_FINISHED|OPERATOR_PASS_THROUGH;
+ if (0 == WM_jobs_test(CTX_wm_manager(C), CTX_data_scene(C)))
+ return OPERATOR_FINISHED | OPERATOR_PASS_THROUGH;
/* running render */
switch (event->type) {
@@ -1441,7 +1445,7 @@ static int objects_bake_render_modal(bContext *C, wmOperator *UNUSED(op), wmEven
static int is_multires_bake(Scene *scene)
{
- if ( ELEM(scene->r.bake_mode, RE_BAKE_NORMALS, RE_BAKE_DISPLACEMENT))
+ if (ELEM(scene->r.bake_mode, RE_BAKE_NORMALS, RE_BAKE_DISPLACEMENT))
return scene->r.bake_flag & R_BAKE_MULTIRES;
return 0;
@@ -1449,34 +1453,34 @@ static int is_multires_bake(Scene *scene)
static int objects_bake_render_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(_event))
{
- Scene *scene= CTX_data_scene(C);
- int result= OPERATOR_CANCELLED;
+ Scene *scene = CTX_data_scene(C);
+ int result = OPERATOR_CANCELLED;
if (is_multires_bake(scene)) {
- result= multiresbake_image_exec(C, op);
+ result = multiresbake_image_exec(C, op);
}
else {
/* only one render job at a time */
if (WM_jobs_test(CTX_wm_manager(C), scene))
return OPERATOR_CANCELLED;
- if (test_bake_internal(C, op->reports)==0) {
+ if (test_bake_internal(C, op->reports) == 0) {
return OPERATOR_CANCELLED;
}
else {
- BakeRender *bkr= MEM_callocN(sizeof(BakeRender), "render bake");
+ BakeRender *bkr = MEM_callocN(sizeof(BakeRender), "render bake");
wmJob *steve;
init_bake_internal(bkr, C);
- bkr->reports= op->reports;
+ bkr->reports = op->reports;
/* setup job */
- steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene, "Texture Bake", WM_JOB_EXCL_RENDER|WM_JOB_PRIORITY|WM_JOB_PROGRESS);
+ steve = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene, "Texture Bake", WM_JOB_EXCL_RENDER | WM_JOB_PRIORITY | WM_JOB_PROGRESS);
WM_jobs_customdata(steve, bkr, bake_freejob);
WM_jobs_timer(steve, 0.2, NC_IMAGE, 0); /* TODO - only draw bake image, can we enforce this */
WM_jobs_callbacks(steve, bake_startjob, NULL, bake_update, NULL);
- G.afbreek= 0;
+ G.afbreek = 0;
G.rendering = 1;
WM_jobs_start(CTX_wm_manager(C), steve);
@@ -1487,10 +1491,10 @@ static int objects_bake_render_invoke(bContext *C, wmOperator *op, wmEvent *UNUS
WM_event_add_modal_handler(C, op);
}
- result= OPERATOR_RUNNING_MODAL;
+ result = OPERATOR_RUNNING_MODAL;
}
- WM_event_add_notifier(C, NC_SCENE|ND_RENDER_RESULT, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_RENDER_RESULT, scene);
return result;
}
@@ -1498,35 +1502,35 @@ static int objects_bake_render_invoke(bContext *C, wmOperator *op, wmEvent *UNUS
static int bake_image_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- int result= OPERATOR_CANCELLED;
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ int result = OPERATOR_CANCELLED;
if (is_multires_bake(scene)) {
- result= multiresbake_image_exec_locked(C, op);
+ result = multiresbake_image_exec_locked(C, op);
}
else {
- if (test_bake_internal(C, op->reports)==0) {
+ if (test_bake_internal(C, op->reports) == 0) {
return OPERATOR_CANCELLED;
}
else {
ListBase threads;
- BakeRender bkr= {NULL};
+ BakeRender bkr = {NULL};
init_bake_internal(&bkr, C);
- bkr.reports= op->reports;
+ bkr.reports = op->reports;
RE_test_break_cb(bkr.re, NULL, thread_break);
- G.afbreek= 0; /* blender_test_break uses this global */
+ G.afbreek = 0; /* blender_test_break uses this global */
- RE_Database_Baking(bkr.re, bmain, scene, scene->lay, scene->r.bake_mode, (scene->r.bake_flag & R_BAKE_TO_ACTIVE)? OBACT: NULL);
+ RE_Database_Baking(bkr.re, bmain, scene, scene->lay, scene->r.bake_mode, (scene->r.bake_flag & R_BAKE_TO_ACTIVE) ? OBACT : NULL);
/* baking itself is threaded, cannot use test_break in threads */
BLI_init_threads(&threads, do_bake_render, 1);
- bkr.ready= 0;
+ bkr.ready = 0;
BLI_insert_thread(&threads, &bkr);
- while (bkr.ready==0) {
+ while (bkr.ready == 0) {
PIL_sleep_ms(50);
if (bkr.ready)
break;
@@ -1537,18 +1541,18 @@ static int bake_image_exec(bContext *C, wmOperator *op)
}
BLI_end_threads(&threads);
- if (bkr.result==BAKE_RESULT_NO_OBJECTS)
+ if (bkr.result == BAKE_RESULT_NO_OBJECTS)
BKE_report(op->reports, RPT_ERROR, "No valid images found to bake to");
- else if (bkr.result==BAKE_RESULT_FEEDBACK_LOOP)
+ else if (bkr.result == BAKE_RESULT_FEEDBACK_LOOP)
BKE_report(op->reports, RPT_ERROR, "Feedback loop detected");
finish_bake_internal(&bkr);
- result= OPERATOR_FINISHED;
+ result = OPERATOR_FINISHED;
}
}
- WM_event_add_notifier(C, NC_SCENE|ND_RENDER_RESULT, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_RENDER_RESULT, scene);
return result;
}
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index ec3567454df..d73b53deecc 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -81,7 +81,7 @@
/* -------------- Get Active Constraint Data ---------------------- */
/* if object in posemode, active bone constraints, else object constraints */
-ListBase *get_active_constraints (Object *ob)
+ListBase *get_active_constraints(Object *ob)
{
if (ob == NULL)
return NULL;
@@ -89,7 +89,7 @@ ListBase *get_active_constraints (Object *ob)
if (ob->mode & OB_MODE_POSE) {
bPoseChannel *pchan;
- pchan = get_active_posechannel(ob);
+ pchan = BKE_pose_channel_active(ob);
if (pchan)
return &pchan->constraints;
}
@@ -100,10 +100,10 @@ ListBase *get_active_constraints (Object *ob)
}
/* Find the list that a given constraint belongs to, and/or also get the posechannel this is from (if applicable) */
-ListBase *get_constraint_lb (Object *ob, bConstraint *con, bPoseChannel **pchan_r)
+ListBase *get_constraint_lb(Object *ob, bConstraint *con, bPoseChannel **pchan_r)
{
if (pchan_r)
- *pchan_r= NULL;
+ *pchan_r = NULL;
if (ELEM(NULL, ob, con))
return NULL;
@@ -120,11 +120,11 @@ ListBase *get_constraint_lb (Object *ob, bConstraint *con, bPoseChannel **pchan_
/* try each bone in order
* NOTE: it's not possible to directly look up the active bone yet, so this will have to do
*/
- for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
+ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
if ((BLI_findindex(&pchan->constraints, con) != -1)) {
if (pchan_r)
- *pchan_r= pchan;
+ *pchan_r = pchan;
return &pchan->constraints;
}
@@ -136,7 +136,7 @@ ListBase *get_constraint_lb (Object *ob, bConstraint *con, bPoseChannel **pchan_
}
/* single constraint */
-bConstraint *get_active_constraint (Object *ob)
+bConstraint *get_active_constraint(Object *ob)
{
return constraints_get_active(get_active_constraints(ob));
}
@@ -146,25 +146,25 @@ bConstraint *get_active_constraint (Object *ob)
/* ------------- PyConstraints ------------------ */
/* this callback sets the text-file to be used for selected menu item */
-static void validate_pyconstraint_cb (void *arg1, void *arg2)
+static void validate_pyconstraint_cb(void *arg1, void *arg2)
{
bPythonConstraint *data = arg1;
- Text *text= NULL;
+ Text *text = NULL;
int index = *((int *)arg2);
int i;
/* exception for no script */
if (index) {
/* innovative use of a for...loop to search */
- for (text=G.main->text.first, i=1; text && index!=i; i++, text=text->id.next);
+ for (text = G.main->text.first, i = 1; text && index != i; i++, text = text->id.next) ;
}
data->text = text;
}
/* this returns a string for the list of usable pyconstraint script names */
-static char *buildmenu_pyconstraints (Text *con_text, int *pyconindex)
+static char *buildmenu_pyconstraints(Text *con_text, int *pyconindex)
{
- DynStr *pupds= BLI_dynstr_new();
+ DynStr *pupds = BLI_dynstr_new();
Text *text;
char *str;
char buf[64];
@@ -176,16 +176,16 @@ static char *buildmenu_pyconstraints (Text *con_text, int *pyconindex)
/* init active-index first */
if (con_text == NULL)
- *pyconindex= 0;
+ *pyconindex = 0;
/* loop through markers, adding them */
- for (text=G.main->text.first, i=1; text; i++, text=text->id.next) {
+ for (text = G.main->text.first, i = 1; text; i++, text = text->id.next) {
/* this is important to ensure that right script is shown as active */
if (text == con_text) *pyconindex = i;
/* only include valid pyconstraint scripts */
if (BPY_is_pyconstraint(text)) {
- BLI_dynstr_append(pupds, text->id.name+2);
+ BLI_dynstr_append(pupds, text->id.name + 2);
sprintf(buf, "%%x%d", i);
BLI_dynstr_append(pupds, buf);
@@ -196,7 +196,7 @@ static char *buildmenu_pyconstraints (Text *con_text, int *pyconindex)
}
/* convert to normal MEM_malloc'd string */
- str= BLI_dynstr_get_cstring(pupds);
+ str = BLI_dynstr_get_cstring(pupds);
BLI_dynstr_free(pupds);
return str;
@@ -205,14 +205,14 @@ static char *buildmenu_pyconstraints (Text *con_text, int *pyconindex)
#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)
+static void update_pyconstraint_cb(void *arg1, void *arg2)
{
#ifndef WITH_PYTHON
(void)arg1; /* unused */
(void)arg2; /* unused */
#else
- Object *owner= (Object *)arg1;
- bConstraint *con= (bConstraint *)arg2;
+ Object *owner = (Object *)arg1;
+ bConstraint *con = (bConstraint *)arg2;
if (owner && con)
BPY_pyconstraint_update(owner, con);
#endif
@@ -220,30 +220,30 @@ static void update_pyconstraint_cb (void *arg1, void *arg2)
#endif // UNUSED
/* helper function for add_constriant - sets the last target for the active constraint */
-static void set_constraint_nth_target (bConstraint *con, Object *target, const char subtarget[], int index)
+static void set_constraint_nth_target(bConstraint *con, Object *target, const char subtarget[], int index)
{
- bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
+ bConstraintTypeInfo *cti = constraint_get_typeinfo(con);
ListBase targets = {NULL, NULL};
bConstraintTarget *ct;
int num_targets, i;
if (cti && cti->get_constraint_targets) {
cti->get_constraint_targets(con, &targets);
- num_targets= BLI_countlist(&targets);
+ num_targets = BLI_countlist(&targets);
if (index < 0) {
if (abs(index) < num_targets)
- index= num_targets - abs(index);
+ index = num_targets - abs(index);
else
- index= num_targets - 1;
+ index = num_targets - 1;
}
else if (index >= num_targets) {
- index= num_targets - 1;
+ index = num_targets - 1;
}
- for (ct=targets.first, i=0; ct; ct= ct->next, i++) {
+ for (ct = targets.first, i = 0; ct; ct = ct->next, i++) {
if (i == index) {
- ct->tar= target;
+ ct->tar = target;
BLI_strncpy(ct->subtarget, subtarget, sizeof(ct->subtarget));
break;
}
@@ -259,13 +259,13 @@ static void set_constraint_nth_target (bConstraint *con, Object *target, const c
/* checks validity of object pointers, and NULLs,
* if Bone doesnt exist it sets the CONSTRAINT_DISABLE flag.
*/
-static void test_constraints (Object *owner, bPoseChannel *pchan)
+static void test_constraints(Object *owner, bPoseChannel *pchan)
{
bConstraint *curcon;
- ListBase *conlist= NULL;
+ ListBase *conlist = NULL;
int type;
- if (owner==NULL) return;
+ if (owner == NULL) return;
/* Check parents */
if (pchan) {
@@ -293,8 +293,8 @@ static void test_constraints (Object *owner, bPoseChannel *pchan)
/* Check all constraints - is constraint valid? */
if (conlist) {
- for (curcon = conlist->first; curcon; curcon=curcon->next) {
- bConstraintTypeInfo *cti= constraint_get_typeinfo(curcon);
+ for (curcon = conlist->first; curcon; curcon = curcon->next) {
+ bConstraintTypeInfo *cti = constraint_get_typeinfo(curcon);
ListBase targets = {NULL, NULL};
bConstraintTarget *ct;
@@ -309,23 +309,23 @@ static void test_constraints (Object *owner, bPoseChannel *pchan)
* the constraint is deemed invalid
*/
/* default IK check ... */
- if (exist_object(data->tar) == 0) {
+ if (BKE_object_exists_check(data->tar) == 0) {
data->tar = NULL;
curcon->flag |= CONSTRAINT_DISABLE;
}
else if (data->tar == owner) {
- if (!get_named_bone(get_armature(owner), data->subtarget)) {
+ if (!BKE_armature_find_bone_name(BKE_armature_from_object(owner), data->subtarget)) {
curcon->flag |= CONSTRAINT_DISABLE;
}
}
if (data->poletar) {
- if (exist_object(data->poletar) == 0) {
+ if (BKE_object_exists_check(data->poletar) == 0) {
data->poletar = NULL;
curcon->flag |= CONSTRAINT_DISABLE;
}
else if (data->poletar == owner) {
- if (!get_named_bone(get_armature(owner), data->polesubtarget)) {
+ if (!BKE_armature_find_bone_name(BKE_armature_from_object(owner), data->polesubtarget)) {
curcon->flag |= CONSTRAINT_DISABLE;
}
}
@@ -339,12 +339,12 @@ static void test_constraints (Object *owner, bPoseChannel *pchan)
bPivotConstraint *data = curcon->data;
/* target doesn't have to exist, but if it is non-null, it must exist! */
- if (data->tar && exist_object(data->tar)==0) {
+ if (data->tar && BKE_object_exists_check(data->tar) == 0) {
data->tar = NULL;
curcon->flag |= CONSTRAINT_DISABLE;
}
else if (data->tar == owner) {
- if (!get_named_bone(get_armature(owner), data->subtarget)) {
+ if (!BKE_armature_find_bone_name(BKE_armature_from_object(owner), data->subtarget)) {
curcon->flag |= CONSTRAINT_DISABLE;
}
}
@@ -363,26 +363,26 @@ static void test_constraints (Object *owner, bPoseChannel *pchan)
bFollowPathConstraint *data = curcon->data;
/* don't allow track/up axes to be the same */
- if (data->upflag==data->trackflag)
+ if (data->upflag == data->trackflag)
curcon->flag |= CONSTRAINT_DISABLE;
- if (data->upflag+3==data->trackflag)
+ if (data->upflag + 3 == data->trackflag)
curcon->flag |= CONSTRAINT_DISABLE;
}
else if (curcon->type == CONSTRAINT_TYPE_TRACKTO) {
bTrackToConstraint *data = curcon->data;
/* don't allow track/up axes to be the same */
- if (data->reserved2==data->reserved1)
+ if (data->reserved2 == data->reserved1)
curcon->flag |= CONSTRAINT_DISABLE;
- if (data->reserved2+3==data->reserved1)
+ if (data->reserved2 + 3 == data->reserved1)
curcon->flag |= CONSTRAINT_DISABLE;
}
else if (curcon->type == CONSTRAINT_TYPE_LOCKTRACK) {
bLockTrackConstraint *data = curcon->data;
- if (data->lockflag==data->trackflag)
+ if (data->lockflag == data->trackflag)
curcon->flag |= CONSTRAINT_DISABLE;
- if (data->lockflag+3==data->trackflag)
+ if (data->lockflag + 3 == data->trackflag)
curcon->flag |= CONSTRAINT_DISABLE;
}
else if (curcon->type == CONSTRAINT_TYPE_SPLINEIK) {
@@ -391,7 +391,7 @@ static void test_constraints (Object *owner, bPoseChannel *pchan)
/* if the number of points does not match the amount required by the chain length,
* free the points array and request a rebind...
*/
- if ((data->points == NULL) || (data->numpoints != data->chainlen+1)) {
+ if ((data->points == NULL) || (data->numpoints != data->chainlen + 1)) {
/* free the points array */
if (data->points) {
MEM_freeN(data->points);
@@ -405,15 +405,15 @@ static void test_constraints (Object *owner, bPoseChannel *pchan)
else if (curcon->type == CONSTRAINT_TYPE_FOLLOWTRACK) {
bFollowTrackConstraint *data = curcon->data;
- if ((data->flag&CAMERASOLVER_ACTIVECLIP)==0) {
+ if ((data->flag & CAMERASOLVER_ACTIVECLIP) == 0) {
if (data->clip != NULL && data->track[0]) {
- MovieTracking *tracking= &data->clip->tracking;
+ MovieTracking *tracking = &data->clip->tracking;
MovieTrackingObject *tracking_object;
if (data->object[0])
- tracking_object= BKE_tracking_named_object(tracking, data->object);
+ tracking_object = BKE_tracking_named_object(tracking, data->object);
else
- tracking_object= BKE_tracking_get_camera_object(tracking);
+ tracking_object = BKE_tracking_get_camera_object(tracking);
if (!tracking_object) {
curcon->flag |= CONSTRAINT_DISABLE;
@@ -429,13 +429,13 @@ static void test_constraints (Object *owner, bPoseChannel *pchan)
else if (curcon->type == CONSTRAINT_TYPE_CAMERASOLVER) {
bCameraSolverConstraint *data = curcon->data;
- if ((data->flag&CAMERASOLVER_ACTIVECLIP)==0 && data->clip == NULL)
+ if ((data->flag & CAMERASOLVER_ACTIVECLIP) == 0 && data->clip == NULL)
curcon->flag |= CONSTRAINT_DISABLE;
}
else if (curcon->type == CONSTRAINT_TYPE_OBJECTSOLVER) {
bObjectSolverConstraint *data = curcon->data;
- if ((data->flag&CAMERASOLVER_ACTIVECLIP)==0 && data->clip == NULL)
+ if ((data->flag & CAMERASOLVER_ACTIVECLIP) == 0 && data->clip == NULL)
curcon->flag |= CONSTRAINT_DISABLE;
}
@@ -444,16 +444,16 @@ static void test_constraints (Object *owner, bPoseChannel *pchan)
cti->get_constraint_targets(curcon, &targets);
/* disable and clear constraints targets that are incorrect */
- for (ct= targets.first; ct; ct= ct->next) {
+ for (ct = targets.first; ct; ct = ct->next) {
/* general validity checks (for those constraints that need this) */
- if (exist_object(ct->tar) == 0) {
+ if (BKE_object_exists_check(ct->tar) == 0) {
/* object doesn't exist, but constraint requires target */
ct->tar = NULL;
curcon->flag |= CONSTRAINT_DISABLE;
}
else if (ct->tar == owner) {
if (type == CONSTRAINT_OBTYPE_BONE) {
- if (!get_named_bone(get_armature(owner), ct->subtarget)) {
+ if (!BKE_armature_find_bone_name(BKE_armature_from_object(owner), ct->subtarget)) {
/* bone must exist in armature... */
// TODO: clear subtarget?
curcon->flag |= CONSTRAINT_DISABLE;
@@ -475,11 +475,11 @@ static void test_constraints (Object *owner, bPoseChannel *pchan)
if (ELEM3(curcon->type, CONSTRAINT_TYPE_FOLLOWPATH, CONSTRAINT_TYPE_CLAMPTO, CONSTRAINT_TYPE_SPLINEIK)) {
if (ct->tar) {
if (ct->tar->type != OB_CURVE) {
- ct->tar= NULL;
+ ct->tar = NULL;
curcon->flag |= CONSTRAINT_DISABLE;
}
else {
- Curve *cu= ct->tar->data;
+ Curve *cu = ct->tar->data;
/* auto-set 'Path' setting on curve so this works */
cu->flag |= CU_PATH;
@@ -496,15 +496,15 @@ static void test_constraints (Object *owner, bPoseChannel *pchan)
}
}
-void object_test_constraints (Object *owner)
+void object_test_constraints(Object *owner)
{
if (owner->constraints.first)
test_constraints(owner, NULL);
- if (owner->type==OB_ARMATURE && owner->pose) {
+ if (owner->type == OB_ARMATURE && owner->pose) {
bPoseChannel *pchan;
- for (pchan= owner->pose->chanbase.first; pchan; pchan= pchan->next) {
+ for (pchan = owner->pose->chanbase.first; pchan; pchan = pchan->next) {
if (pchan->constraints.first)
test_constraints(owner, pchan);
}
@@ -514,8 +514,8 @@ void object_test_constraints (Object *owner)
/************************ generic functions for operators using constraint names and data context *********************/
-#define EDIT_CONSTRAINT_OWNER_OBJECT 0
-#define EDIT_CONSTRAINT_OWNER_BONE 1
+#define EDIT_CONSTRAINT_OWNER_OBJECT 0
+#define EDIT_CONSTRAINT_OWNER_BONE 1
static EnumPropertyItem constraint_owner_items[] = {
{EDIT_CONSTRAINT_OWNER_OBJECT, "OBJECT", 0, "Object", "Edit a constraint on the active object"},
@@ -525,11 +525,11 @@ static EnumPropertyItem constraint_owner_items[] = {
static int edit_constraint_poll_generic(bContext *C, StructRNA *rna_type)
{
- PointerRNA ptr= CTX_data_pointer_get_type(C, "constraint", rna_type);
- Object *ob= (ptr.id.data) ? ptr.id.data : ED_object_active_context(C);
+ PointerRNA ptr = CTX_data_pointer_get_type(C, "constraint", rna_type);
+ Object *ob = (ptr.id.data) ? ptr.id.data : ED_object_active_context(C);
if (!ob || ob->id.lib) return 0;
- if (ptr.id.data && ((ID*)ptr.id.data)->lib) return 0;
+ if (ptr.id.data && ((ID *)ptr.id.data)->lib) return 0;
return 1;
}
@@ -547,8 +547,8 @@ static void edit_constraint_properties(wmOperatorType *ot)
static int edit_constraint_invoke_properties(bContext *C, wmOperator *op)
{
- PointerRNA ptr= CTX_data_pointer_get_type(C, "constraint", &RNA_Constraint);
- Object *ob= (ptr.id.data)?ptr.id.data:ED_object_active_context(C);
+ PointerRNA ptr = CTX_data_pointer_get_type(C, "constraint", &RNA_Constraint);
+ Object *ob = (ptr.id.data) ? ptr.id.data : ED_object_active_context(C);
bConstraint *con;
ListBase *list;
@@ -577,7 +577,7 @@ static bConstraint *edit_constraint_property_get(wmOperator *op, Object *ob, int
char constraint_name[MAX_NAME];
int owner = RNA_enum_get(op->ptr, "owner");
bConstraint *con;
- ListBase *list=NULL;
+ ListBase *list = NULL;
RNA_string_get(op->ptr, "constraint", constraint_name);
@@ -585,7 +585,7 @@ static bConstraint *edit_constraint_property_get(wmOperator *op, Object *ob, int
list = &ob->constraints;
}
else if (owner == EDIT_CONSTRAINT_OWNER_BONE) {
- bPoseChannel *pchan= get_active_posechannel(ob);
+ bPoseChannel *pchan = BKE_pose_channel_active(ob);
if (pchan)
list = &pchan->constraints;
else {
@@ -615,11 +615,11 @@ static bConstraint *edit_constraint_property_get(wmOperator *op, Object *ob, int
/* ---------- Distance-Dependent Constraints ---------- */
/* StretchTo, Limit Distance */
-static int stretchto_reset_exec (bContext *C, wmOperator *op)
+static int stretchto_reset_exec(bContext *C, wmOperator *op)
{
Object *ob = ED_object_active_context(C);
bConstraint *con = edit_constraint_property_get(op, ob, CONSTRAINT_TYPE_STRETCHTO);
- bStretchToConstraint *data= (con) ? (bStretchToConstraint *)con->data : NULL;
+ bStretchToConstraint *data = (con) ? (bStretchToConstraint *)con->data : NULL;
/* despite 3 layers of checks, we may still not be able to find a constraint */
if (data == NULL)
@@ -629,7 +629,7 @@ static int stretchto_reset_exec (bContext *C, wmOperator *op)
data->orglength = 0.0f;
ED_object_constraint_update(ob);
- WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT, NULL);
return OPERATOR_FINISHED;
}
@@ -641,7 +641,7 @@ static int stretchto_reset_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(e
return OPERATOR_CANCELLED;
}
-void CONSTRAINT_OT_stretchto_reset (wmOperatorType *ot)
+void CONSTRAINT_OT_stretchto_reset(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Reset Original Length";
@@ -653,16 +653,16 @@ void CONSTRAINT_OT_stretchto_reset (wmOperatorType *ot)
ot->poll = edit_constraint_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
edit_constraint_properties(ot);
}
-static int limitdistance_reset_exec (bContext *C, wmOperator *op)
+static int limitdistance_reset_exec(bContext *C, wmOperator *op)
{
Object *ob = ED_object_active_context(C);
bConstraint *con = edit_constraint_property_get(op, ob, CONSTRAINT_TYPE_DISTLIMIT);
- bDistLimitConstraint *data= (con) ? (bDistLimitConstraint *)con->data : NULL;
+ bDistLimitConstraint *data = (con) ? (bDistLimitConstraint *)con->data : NULL;
/* despite 3 layers of checks, we may still not be able to find a constraint */
if (data == NULL)
@@ -672,7 +672,7 @@ static int limitdistance_reset_exec (bContext *C, wmOperator *op)
data->dist = 0.0f;
ED_object_constraint_update(ob);
- WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT, NULL);
return OPERATOR_FINISHED;
}
@@ -684,7 +684,7 @@ static int limitdistance_reset_invoke(bContext *C, wmOperator *op, wmEvent *UNUS
return OPERATOR_CANCELLED;
}
-void CONSTRAINT_OT_limitdistance_reset (wmOperatorType *ot)
+void CONSTRAINT_OT_limitdistance_reset(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Reset Distance";
@@ -696,16 +696,16 @@ void CONSTRAINT_OT_limitdistance_reset (wmOperatorType *ot)
ot->poll = edit_constraint_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
edit_constraint_properties(ot);
}
/* ------------- Child-Of Constraint ------------------ */
-static void child_get_inverse_matrix (Scene *scene, Object *ob, bConstraint *con, float invmat[4][4])
+static void child_get_inverse_matrix(Scene *scene, Object *ob, bConstraint *con, float invmat[4][4])
{
bConstraint *lastcon = NULL;
- bPoseChannel *pchan= NULL;
+ bPoseChannel *pchan = NULL;
/* nullify inverse matrix first */
unit_m4(invmat);
@@ -713,13 +713,13 @@ static void child_get_inverse_matrix (Scene *scene, Object *ob, bConstraint *con
/* try to find a pose channel - assume that this is the constraint owner */
// TODO: get from context instead?
if (ob && ob->pose)
- pchan= get_active_posechannel(ob);
+ pchan = BKE_pose_channel_active(ob);
/* calculate/set inverse matrix:
- * We just calculate all transform-stack eval up to but not including this constraint.
- * This is because inverse should just inverse correct for just the constraint's influence
- * when it gets applied; that is, at the time of application, we don't know anything about
- * what follows.
+ * We just calculate all transform-stack eval up to but not including this constraint.
+ * This is because inverse should just inverse correct for just the constraint's influence
+ * when it gets applied; that is, at the time of application, we don't know anything about
+ * what follows.
*/
if (pchan) {
float imat[4][4], tmat[4][4];
@@ -729,7 +729,7 @@ static void child_get_inverse_matrix (Scene *scene, Object *ob, bConstraint *con
* to use as baseline ("pmat") to derive delta from. This extra calc saves users
* from having pressing "Clear Inverse" first
*/
- where_is_pose(scene, ob);
+ BKE_pose_where_is(scene, ob);
copy_m4_m4(pmat, pchan->pose_mat);
/* 2. knock out constraints starting from this one */
@@ -746,7 +746,7 @@ static void child_get_inverse_matrix (Scene *scene, Object *ob, bConstraint *con
}
/* 3. solve pose without disabled constraints */
- where_is_pose(scene, ob);
+ BKE_pose_where_is(scene, ob);
/* 4. determine effect of constraint by removing the newly calculated
* pchan->pose_mat from the original pchan->pose_mat, thus determining
@@ -769,35 +769,35 @@ static void child_get_inverse_matrix (Scene *scene, Object *ob, bConstraint *con
}
/* 6. recalculate pose with new inv-mat applied */
- where_is_pose(scene, ob);
+ BKE_pose_where_is(scene, ob);
}
else if (ob) {
Object workob;
- /* use what_does_parent to find inverse - just like for normal parenting */
- what_does_parent(scene, ob, &workob);
+ /* use BKE_object_workob_calc_parent to find inverse - just like for normal parenting */
+ BKE_object_workob_calc_parent(scene, ob, &workob);
invert_m4_m4(invmat, workob.obmat);
}
}
/* ChildOf Constraint - set inverse callback */
-static int childof_set_inverse_exec (bContext *C, wmOperator *op)
+static int childof_set_inverse_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
Object *ob = ED_object_active_context(C);
bConstraint *con = edit_constraint_property_get(op, ob, CONSTRAINT_TYPE_CHILDOF);
- bChildOfConstraint *data= (con) ? (bChildOfConstraint *)con->data : NULL;
+ bChildOfConstraint *data = (con) ? (bChildOfConstraint *)con->data : NULL;
/* despite 3 layers of checks, we may still not be able to find a constraint */
if (data == NULL) {
- printf("DEBUG: Child-Of Set Inverse - object = '%s'\n", (ob)? ob->id.name+2 : "<None>");
+ printf("DEBUG: Child-Of Set Inverse - object = '%s'\n", (ob) ? ob->id.name + 2 : "<None>");
BKE_report(op->reports, RPT_ERROR, "Couldn't find constraint data for Child-Of Set Inverse");
return OPERATOR_CANCELLED;
}
child_get_inverse_matrix(scene, ob, con, data->invmat);
- WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT, ob);
return OPERATOR_FINISHED;
}
@@ -810,7 +810,7 @@ static int childof_set_inverse_invoke(bContext *C, wmOperator *op, wmEvent *UNUS
return OPERATOR_CANCELLED;
}
-void CONSTRAINT_OT_childof_set_inverse (wmOperatorType *ot)
+void CONSTRAINT_OT_childof_set_inverse(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Set Inverse";
@@ -822,18 +822,18 @@ void CONSTRAINT_OT_childof_set_inverse (wmOperatorType *ot)
ot->poll = edit_constraint_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
edit_constraint_properties(ot);
}
/* ChildOf Constraint - clear inverse callback */
-static int childof_clear_inverse_exec (bContext *C, wmOperator *op)
+static int childof_clear_inverse_exec(bContext *C, wmOperator *op)
{
Object *ob = ED_object_active_context(C);
bConstraint *con = edit_constraint_property_get(op, ob, CONSTRAINT_TYPE_CHILDOF);
- bChildOfConstraint *data= (con) ? (bChildOfConstraint *)con->data : NULL;
+ bChildOfConstraint *data = (con) ? (bChildOfConstraint *)con->data : NULL;
- if (data==NULL) {
+ if (data == NULL) {
BKE_report(op->reports, RPT_ERROR, "Childof constraint not found");
return OPERATOR_CANCELLED;
}
@@ -841,7 +841,7 @@ static int childof_clear_inverse_exec (bContext *C, wmOperator *op)
/* simply clear the matrix */
unit_m4(data->invmat);
- WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT, ob);
return OPERATOR_FINISHED;
}
@@ -854,7 +854,7 @@ static int childof_clear_inverse_invoke(bContext *C, wmOperator *op, wmEvent *UN
return OPERATOR_CANCELLED;
}
-void CONSTRAINT_OT_childof_clear_inverse (wmOperatorType *ot)
+void CONSTRAINT_OT_childof_clear_inverse(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Clear Inverse";
@@ -866,29 +866,29 @@ void CONSTRAINT_OT_childof_clear_inverse (wmOperatorType *ot)
ot->poll = edit_constraint_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
edit_constraint_properties(ot);
}
/* ------------- Object Solver Constraint ------------------ */
-static int objectsolver_set_inverse_exec (bContext *C, wmOperator *op)
+static int objectsolver_set_inverse_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
Object *ob = ED_object_active_context(C);
bConstraint *con = edit_constraint_property_get(op, ob, CONSTRAINT_TYPE_OBJECTSOLVER);
- bObjectSolverConstraint *data= (con) ? (bObjectSolverConstraint *)con->data : NULL;
+ bObjectSolverConstraint *data = (con) ? (bObjectSolverConstraint *)con->data : NULL;
/* despite 3 layers of checks, we may still not be able to find a constraint */
if (data == NULL) {
- printf("DEBUG: Child-Of Set Inverse - object = '%s'\n", (ob)? ob->id.name+2 : "<None>");
+ printf("DEBUG: Child-Of Set Inverse - object = '%s'\n", (ob) ? ob->id.name + 2 : "<None>");
BKE_report(op->reports, RPT_ERROR, "Couldn't find constraint data for Child-Of Set Inverse");
return OPERATOR_CANCELLED;
}
child_get_inverse_matrix(scene, ob, con, data->invmat);
- WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT, ob);
return OPERATOR_FINISHED;
}
@@ -901,7 +901,7 @@ static int objectsolver_set_inverse_invoke(bContext *C, wmOperator *op, wmEvent
return OPERATOR_CANCELLED;
}
-void CONSTRAINT_OT_objectsolver_set_inverse (wmOperatorType *ot)
+void CONSTRAINT_OT_objectsolver_set_inverse(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Set Inverse";
@@ -913,17 +913,17 @@ void CONSTRAINT_OT_objectsolver_set_inverse (wmOperatorType *ot)
ot->poll = edit_constraint_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
edit_constraint_properties(ot);
}
-static int objectsolver_clear_inverse_exec (bContext *C, wmOperator *op)
+static int objectsolver_clear_inverse_exec(bContext *C, wmOperator *op)
{
Object *ob = ED_object_active_context(C);
bConstraint *con = edit_constraint_property_get(op, ob, CONSTRAINT_TYPE_OBJECTSOLVER);
- bObjectSolverConstraint *data= (con) ? (bObjectSolverConstraint *)con->data : NULL;
+ bObjectSolverConstraint *data = (con) ? (bObjectSolverConstraint *)con->data : NULL;
- if (data==NULL) {
+ if (data == NULL) {
BKE_report(op->reports, RPT_ERROR, "Childof constraint not found");
return OPERATOR_CANCELLED;
}
@@ -931,7 +931,7 @@ static int objectsolver_clear_inverse_exec (bContext *C, wmOperator *op)
/* simply clear the matrix */
unit_m4(data->invmat);
- WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT, ob);
return OPERATOR_FINISHED;
}
@@ -944,7 +944,7 @@ static int objectsolver_clear_inverse_invoke(bContext *C, wmOperator *op, wmEven
return OPERATOR_CANCELLED;
}
-void CONSTRAINT_OT_objectsolver_clear_inverse (wmOperatorType *ot)
+void CONSTRAINT_OT_objectsolver_clear_inverse(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Clear Inverse";
@@ -956,7 +956,7 @@ void CONSTRAINT_OT_objectsolver_clear_inverse (wmOperatorType *ot)
ot->poll = edit_constraint_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
edit_constraint_properties(ot);
}
@@ -977,11 +977,11 @@ void ED_object_constraint_set_active(Object *ob, bConstraint *con)
void ED_object_constraint_update(Object *ob)
{
- if (ob->pose) update_pose_constraint_flags(ob->pose);
+ if (ob->pose) BKE_pose_update_constraint_flags(ob->pose);
object_test_constraints(ob);
- if (ob->type==OB_ARMATURE) DAG_id_tag_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB);
+ if (ob->type == OB_ARMATURE) DAG_id_tag_update(&ob->id, OB_RECALC_DATA | OB_RECALC_OB);
else DAG_id_tag_update(&ob->id, OB_RECALC_OB);
}
@@ -989,23 +989,23 @@ void ED_object_constraint_dependency_update(Main *bmain, Scene *scene, Object *o
{
ED_object_constraint_update(ob);
- if (ob->pose) ob->pose->flag |= POSE_RECALC; // checks & sorts pose channels
+ if (ob->pose) ob->pose->flag |= POSE_RECALC; // checks & sorts pose channels
DAG_scene_sort(bmain, scene);
}
static int constraint_poll(bContext *C)
{
- PointerRNA ptr= CTX_data_pointer_get_type(C, "constraint", &RNA_Constraint);
+ PointerRNA ptr = CTX_data_pointer_get_type(C, "constraint", &RNA_Constraint);
return (ptr.id.data && ptr.data);
}
-static int constraint_delete_exec (bContext *C, wmOperator *UNUSED(op))
+static int constraint_delete_exec(bContext *C, wmOperator *UNUSED(op))
{
- PointerRNA ptr= CTX_data_pointer_get_type(C, "constraint", &RNA_Constraint);
- Object *ob= ptr.id.data;
- bConstraint *con= ptr.data;
+ PointerRNA ptr = CTX_data_pointer_get_type(C, "constraint", &RNA_Constraint);
+ Object *ob = ptr.id.data;
+ bConstraint *con = ptr.data;
ListBase *lb = get_constraint_lb(ob, con, NULL);
- const short is_ik= ELEM(con->type, CONSTRAINT_TYPE_KINEMATIC, CONSTRAINT_TYPE_SPLINEIK);
+ const short is_ik = ELEM(con->type, CONSTRAINT_TYPE_KINEMATIC, CONSTRAINT_TYPE_SPLINEIK);
/* free the constraint */
if (remove_constraint(lb, con)) {
@@ -1020,7 +1020,7 @@ static int constraint_delete_exec (bContext *C, wmOperator *UNUSED(op))
}
/* notifiers */
- WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT|NA_REMOVED, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT | NA_REMOVED, ob);
return OPERATOR_FINISHED;
}
@@ -1030,7 +1030,7 @@ static int constraint_delete_exec (bContext *C, wmOperator *UNUSED(op))
}
}
-void CONSTRAINT_OT_delete (wmOperatorType *ot)
+void CONSTRAINT_OT_delete(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Delete Constraint";
@@ -1042,23 +1042,23 @@ void CONSTRAINT_OT_delete (wmOperatorType *ot)
ot->poll = constraint_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
-static int constraint_move_down_exec (bContext *C, wmOperator *op)
+static int constraint_move_down_exec(bContext *C, wmOperator *op)
{
Object *ob = ED_object_active_context(C);
bConstraint *con = edit_constraint_property_get(op, ob, 0);
if (con && con->next) {
- ListBase *conlist= get_constraint_lb(ob, con, NULL);
- bConstraint *nextCon= con->next;
+ ListBase *conlist = get_constraint_lb(ob, con, NULL);
+ bConstraint *nextCon = con->next;
/* insert the nominated constraint after the one that used to be after it */
BLI_remlink(conlist, con);
BLI_insertlinkafter(conlist, nextCon, con);
- WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT, ob);
return OPERATOR_FINISHED;
}
@@ -1075,7 +1075,7 @@ static int constraint_move_down_invoke(bContext *C, wmOperator *op, wmEvent *UNU
}
-void CONSTRAINT_OT_move_down (wmOperatorType *ot)
+void CONSTRAINT_OT_move_down(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Move Constraint Down";
@@ -1088,25 +1088,25 @@ void CONSTRAINT_OT_move_down (wmOperatorType *ot)
ot->poll = edit_constraint_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
edit_constraint_properties(ot);
}
-static int constraint_move_up_exec (bContext *C, wmOperator *op)
+static int constraint_move_up_exec(bContext *C, wmOperator *op)
{
Object *ob = ED_object_active_context(C);
bConstraint *con = edit_constraint_property_get(op, ob, 0);
if (con && con->prev) {
- ListBase *conlist= get_constraint_lb(ob, con, NULL);
- bConstraint *prevCon= con->prev;
+ ListBase *conlist = get_constraint_lb(ob, con, NULL);
+ bConstraint *prevCon = con->prev;
/* insert the nominated constraint before the one that used to be before it */
BLI_remlink(conlist, con);
BLI_insertlinkbefore(conlist, prevCon, con);
- WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT, ob);
return OPERATOR_FINISHED;
}
@@ -1122,7 +1122,7 @@ static int constraint_move_up_invoke(bContext *C, wmOperator *op, wmEvent *UNUSE
return OPERATOR_CANCELLED;
}
-void CONSTRAINT_OT_move_up (wmOperatorType *ot)
+void CONSTRAINT_OT_move_up(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Move Constraint Up";
@@ -1135,7 +1135,7 @@ void CONSTRAINT_OT_move_up (wmOperatorType *ot)
ot->poll = edit_constraint_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
edit_constraint_properties(ot);
}
@@ -1145,26 +1145,26 @@ void CONSTRAINT_OT_move_up (wmOperatorType *ot)
static int pose_constraints_clear_exec(bContext *C, wmOperator *UNUSED(op))
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- Object *ob= object_pose_armature_get(CTX_data_active_object(C));
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
/* free constraints for all selected bones */
- CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones)
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones)
{
free_constraints(&pchan->constraints);
- pchan->constflag &= ~(PCHAN_HAS_IK|PCHAN_HAS_SPLINEIK|PCHAN_HAS_CONST);
+ pchan->constflag &= ~(PCHAN_HAS_IK | PCHAN_HAS_SPLINEIK | PCHAN_HAS_CONST);
}
CTX_DATA_END;
/* force depsgraph to get recalculated since relationships removed */
- DAG_scene_sort(bmain, scene); /* sort order of objects */
+ DAG_scene_sort(bmain, scene); /* sort order of objects */
/* note, calling BIK_clear_data() isn't needed here */
/* do updates */
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT, ob);
return OPERATOR_FINISHED;
}
@@ -1184,11 +1184,11 @@ void POSE_OT_constraints_clear(wmOperatorType *ot)
static int object_constraints_clear_exec(bContext *C, wmOperator *UNUSED(op))
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
/* do freeing */
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects)
+ CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
{
free_constraints(&ob->constraints);
DAG_id_tag_update(&ob->id, OB_RECALC_OB);
@@ -1196,10 +1196,10 @@ static int object_constraints_clear_exec(bContext *C, wmOperator *UNUSED(op))
CTX_DATA_END;
/* force depsgraph to get recalculated since relationships removed */
- DAG_scene_sort(bmain, scene); /* sort order of objects */
+ DAG_scene_sort(bmain, scene); /* sort order of objects */
/* do updates */
- WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT, NULL);
return OPERATOR_FINISHED;
}
@@ -1220,7 +1220,7 @@ void OBJECT_OT_constraints_clear(wmOperatorType *ot)
static int pose_constraint_copy_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
+ Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
bPoseChannel *pchan = CTX_data_active_pose_bone(C);
@@ -1231,7 +1231,7 @@ static int pose_constraint_copy_exec(bContext *C, wmOperator *op)
}
/* copy all constraints from active posebone to all selected posebones */
- CTX_DATA_BEGIN(C, bPoseChannel*, chan, selected_pose_bones)
+ CTX_DATA_BEGIN (C, bPoseChannel *, chan, selected_pose_bones)
{
/* if we're not handling the object we're copying from, copy all constraints over */
if (pchan != chan) {
@@ -1243,9 +1243,9 @@ static int pose_constraint_copy_exec(bContext *C, wmOperator *op)
CTX_DATA_END;
/* force depsgraph to get recalculated since new relationships added */
- DAG_scene_sort(bmain, scene); /* sort order of objects/bones */
+ DAG_scene_sort(bmain, scene); /* sort order of objects/bones */
- WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT, NULL);
return OPERATOR_FINISHED;
}
@@ -1253,7 +1253,7 @@ static int pose_constraint_copy_exec(bContext *C, wmOperator *op)
void POSE_OT_constraints_copy(wmOperatorType *ot)
{
/* identifiers */
- ot->name = "Copy Constraints to Selected";
+ ot->name = "Copy Constraints to Selected Bones";
ot->idname = "POSE_OT_constraints_copy";
ot->description = "Copy constraints to other selected bones";
@@ -1262,17 +1262,17 @@ void POSE_OT_constraints_copy(wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int object_constraint_copy_exec(bContext *C, wmOperator *UNUSED(op))
{
- Main *bmain= CTX_data_main(C);
+ Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
Object *obact = ED_object_active_context(C);
/* copy all constraints from active object to all selected objects */
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects)
+ CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
{
/* if we're not handling the object we're copying from, copy all constraints over */
if (obact != ob) {
@@ -1283,10 +1283,10 @@ static int object_constraint_copy_exec(bContext *C, wmOperator *UNUSED(op))
CTX_DATA_END;
/* force depsgraph to get recalculated since new relationships added */
- DAG_scene_sort(bmain, scene); /* sort order of objects */
+ DAG_scene_sort(bmain, scene); /* sort order of objects */
/* notifiers for updates */
- WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT|NA_ADDED, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT | NA_ADDED, NULL);
return OPERATOR_FINISHED;
}
@@ -1294,7 +1294,7 @@ static int object_constraint_copy_exec(bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_constraints_copy(wmOperatorType *ot)
{
/* identifiers */
- ot->name = "Copy Constraints to Selected";
+ ot->name = "Copy Constraints to Selected Objects";
ot->idname = "OBJECT_OT_constraints_copy";
ot->description = "Copy constraints to other selected objects";
@@ -1303,7 +1303,7 @@ void OBJECT_OT_constraints_copy(wmOperatorType *ot)
ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/************************ add constraint operators *********************/
@@ -1311,25 +1311,25 @@ void OBJECT_OT_constraints_copy(wmOperatorType *ot)
/* get the Object and/or PoseChannel to use as target */
static short get_new_constraint_target(bContext *C, int con_type, Object **tar_ob, bPoseChannel **tar_pchan, short add)
{
- Object *obact= ED_object_active_context(C);
- bPoseChannel *pchanact= get_active_posechannel(obact);
- short only_curve= 0, only_mesh= 0, only_ob= 0;
- short found= 0;
+ Object *obact = ED_object_active_context(C);
+ bPoseChannel *pchanact = BKE_pose_channel_active(obact);
+ short only_curve = 0, only_mesh = 0, only_ob = 0;
+ short found = 0;
/* clear tar_ob and tar_pchan fields before use
* - assume for now that both always exist...
*/
- *tar_ob= NULL;
- *tar_pchan= NULL;
+ *tar_ob = NULL;
+ *tar_pchan = NULL;
/* check if constraint type doesn't requires a target
* - if so, no need to get any targets
*/
switch (con_type) {
/* no-target constraints --------------------------- */
- /* null constraint - shouldn't even be added! */
+ /* null constraint - shouldn't even be added! */
case CONSTRAINT_TYPE_NULL:
- /* limit constraints - no targets needed */
+ /* limit constraints - no targets needed */
case CONSTRAINT_TYPE_LOCLIMIT:
case CONSTRAINT_TYPE_ROTLIMIT:
case CONSTRAINT_TYPE_SIZELIMIT:
@@ -1338,38 +1338,38 @@ static short get_new_constraint_target(bContext *C, int con_type, Object **tar_o
/* restricted target-type constraints -------------- */
/* NOTE: for these, we cannot try to add a target object if no valid ones are found, since that doesn't work */
- /* curve-based constraints - set the only_curve and only_ob flags */
+ /* curve-based constraints - set the only_curve and only_ob flags */
case CONSTRAINT_TYPE_CLAMPTO:
case CONSTRAINT_TYPE_FOLLOWPATH:
case CONSTRAINT_TYPE_SPLINEIK:
- only_curve= 1;
- only_ob= 1;
- add= 0;
+ only_curve = 1;
+ only_ob = 1;
+ add = 0;
break;
- /* mesh only? */
+ /* mesh only? */
case CONSTRAINT_TYPE_SHRINKWRAP:
- only_mesh= 1;
- only_ob= 1;
- add= 0;
+ only_mesh = 1;
+ only_ob = 1;
+ add = 0;
break;
- /* object only - add here is ok? */
+ /* object only - add here is ok? */
case CONSTRAINT_TYPE_RIGIDBODYJOINT:
- only_ob= 1;
+ only_ob = 1;
break;
}
/* if the active Object is Armature, and we can search for bones, do so... */
if ((obact->type == OB_ARMATURE) && (only_ob == 0)) {
/* search in list of selected Pose-Channels for target */
- CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones)
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones)
{
/* just use the first one that we encounter, as long as it is not the active one */
if (pchan != pchanact) {
- *tar_ob= obact;
- *tar_pchan= pchan;
- found= 1;
+ *tar_ob = obact;
+ *tar_pchan = pchan;
+ found = 1;
break;
}
@@ -1380,23 +1380,23 @@ static short get_new_constraint_target(bContext *C, int con_type, Object **tar_o
/* if not yet found, try selected Objects... */
if (found == 0) {
/* search in selected objects context */
- CTX_DATA_BEGIN(C, Object*, ob, selected_objects)
+ CTX_DATA_BEGIN (C, Object *, ob, selected_objects)
{
/* just use the first object we encounter (that isn't the active object)
* and which fulfills the criteria for the object-target that we've got
*/
if ( (ob != obact) &&
- ((!only_curve) || (ob->type == OB_CURVE)) &&
- ((!only_mesh) || (ob->type == OB_MESH)) )
+ ((!only_curve) || (ob->type == OB_CURVE)) &&
+ ((!only_mesh) || (ob->type == OB_MESH)) )
{
/* set target */
- *tar_ob= ob;
- found= 1;
+ *tar_ob = ob;
+ found = 1;
/* perform some special operations on the target */
if (only_curve) {
/* Curve-Path option must be enabled for follow-path constraints to be able to work */
- Curve *cu= (Curve *)ob->data;
+ Curve *cu = (Curve *)ob->data;
cu->flag |= CU_PATH;
}
@@ -1408,17 +1408,17 @@ static short get_new_constraint_target(bContext *C, int con_type, Object **tar_o
/* if still not found, add a new empty to act as a target (if allowed) */
if ((found == 0) && (add)) {
- Scene *scene= CTX_data_scene(C);
- Base *base= BASACT, *newbase=NULL;
+ Scene *scene = CTX_data_scene(C);
+ Base *base = BASACT, *newbase = NULL;
Object *obt;
/* add new target object */
- obt= add_object(scene, OB_EMPTY);
+ obt = BKE_object_add(scene, OB_EMPTY);
/* set layers OK */
- newbase= BASACT;
- newbase->lay= base->lay;
- obt->lay= newbase->lay;
+ newbase = BASACT;
+ newbase->lay = base->lay;
+ obt->lay = newbase->lay;
/* transform cent to global coords for loc */
if (pchanact) {
@@ -1434,13 +1434,13 @@ static short get_new_constraint_target(bContext *C, int con_type, Object **tar_o
copy_v3_v3(obt->loc, obact->obmat[3]);
}
- /* restore, add_object sets active */
- BASACT= base;
+ /* restore, BKE_object_add sets active */
+ BASACT = base;
base->flag |= SELECT;
/* make our new target the new object */
- *tar_ob= obt;
- found= 1;
+ *tar_ob = obt;
+ found = 1;
}
/* return whether there's any target */
@@ -1450,16 +1450,16 @@ static short get_new_constraint_target(bContext *C, int con_type, Object **tar_o
/* used by add constraint operators to add the constraint required */
static int constraint_add_exec(bContext *C, wmOperator *op, Object *ob, ListBase *list, int type, short setTarget)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
bPoseChannel *pchan;
bConstraint *con;
if (list == &ob->constraints) {
- pchan= NULL;
+ pchan = NULL;
}
else {
- pchan= get_active_posechannel(ob);
+ pchan = BKE_pose_channel_active(ob);
/* ensure not to confuse object/pose adding */
if (pchan == NULL) {
@@ -1494,8 +1494,8 @@ static int constraint_add_exec(bContext *C, wmOperator *op, Object *ob, ListBase
* - apart from the buttons-window add buttons, we shouldn't add in this way
*/
if (setTarget) {
- Object *tar_ob= NULL;
- bPoseChannel *tar_pchan= NULL;
+ Object *tar_ob = NULL;
+ bPoseChannel *tar_pchan = NULL;
/* get the target objects, adding them as need be */
if (get_new_constraint_target(C, type, &tar_ob, &tar_pchan, 1)) {
@@ -1515,7 +1515,7 @@ static int constraint_add_exec(bContext *C, wmOperator *op, Object *ob, ListBase
{
#ifdef WITH_PYTHON
char *menustr;
- int scriptint= 0;
+ int scriptint = 0;
/* popup a list of usable scripts */
menustr = buildmenu_pyconstraints(NULL, &scriptint);
// XXX scriptint = pupmenu(menustr);
@@ -1541,21 +1541,21 @@ static int constraint_add_exec(bContext *C, wmOperator *op, Object *ob, ListBase
object_test_constraints(ob);
if (pchan)
- update_pose_constraint_flags(ob->pose);
+ BKE_pose_update_constraint_flags(ob->pose);
/* force depsgraph to get recalculated since new relationships added */
- DAG_scene_sort(bmain, scene); /* sort order of objects */
+ DAG_scene_sort(bmain, scene); /* sort order of objects */
- if ((ob->type==OB_ARMATURE) && (pchan)) {
- ob->pose->flag |= POSE_RECALC; /* sort pose channels */
- DAG_id_tag_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB);
+ if ((ob->type == OB_ARMATURE) && (pchan)) {
+ ob->pose->flag |= POSE_RECALC; /* sort pose channels */
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA | OB_RECALC_OB);
}
else
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
/* notifiers for updates */
- WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT|NA_ADDED, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT | NA_ADDED, ob);
return OPERATOR_FINISHED;
}
@@ -1565,9 +1565,9 @@ static int constraint_add_exec(bContext *C, wmOperator *op, Object *ob, ListBase
/* dummy operator callback */
static int object_constraint_add_exec(bContext *C, wmOperator *op)
{
- Object *ob=ED_object_active_context(C);
- int type= RNA_enum_get(op->ptr, "type");
- short with_targets= 0;
+ Object *ob = ED_object_active_context(C);
+ int type = RNA_enum_get(op->ptr, "type");
+ short with_targets = 0;
if (!ob) {
BKE_report(op->reports, RPT_ERROR, "No active object to add constraint to");
@@ -1578,7 +1578,7 @@ static int object_constraint_add_exec(bContext *C, wmOperator *op)
* operator name included 'with_targets', since the menu doesn't allow multiple properties
*/
if (strstr(op->idname, "with_targets"))
- with_targets= 1;
+ with_targets = 1;
return constraint_add_exec(C, op, ob, &ob->constraints, type, with_targets);
}
@@ -1586,9 +1586,9 @@ static int object_constraint_add_exec(bContext *C, wmOperator *op)
/* dummy operator callback */
static int pose_constraint_add_exec(bContext *C, wmOperator *op)
{
- Object *ob= object_pose_armature_get(ED_object_active_context(C));
- int type= RNA_enum_get(op->ptr, "type");
- short with_targets= 0;
+ Object *ob = BKE_object_pose_armature_get(ED_object_active_context(C));
+ int type = RNA_enum_get(op->ptr, "type");
+ short with_targets = 0;
if (!ob) {
BKE_report(op->reports, RPT_ERROR, "No active object to add constraint to");
@@ -1599,7 +1599,7 @@ static int pose_constraint_add_exec(bContext *C, wmOperator *op)
* operator name included 'with_targets', since the menu doesn't allow multiple properties
*/
if (strstr(op->idname, "with_targets"))
- with_targets= 1;
+ with_targets = 1;
return constraint_add_exec(C, op, ob, get_active_constraints(ob), type, with_targets);
}
@@ -1619,7 +1619,7 @@ void OBJECT_OT_constraint_add(wmOperatorType *ot)
ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
ot->prop = RNA_def_enum(ot->srna, "type", constraint_type_items, 0, "Type", "");
@@ -1638,7 +1638,7 @@ void OBJECT_OT_constraint_add_with_targets(wmOperatorType *ot)
ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
ot->prop = RNA_def_enum(ot->srna, "type", constraint_type_items, 0, "Type", "");
@@ -1657,7 +1657,7 @@ void POSE_OT_constraint_add(wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
ot->prop = RNA_def_enum(ot->srna, "type", constraint_type_items, 0, "Type", "");
@@ -1676,7 +1676,7 @@ void POSE_OT_constraint_add_with_targets(wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
ot->prop = RNA_def_enum(ot->srna, "type", constraint_type_items, 0, "Type", "");
@@ -1689,14 +1689,14 @@ void POSE_OT_constraint_add_with_targets(wmOperatorType *ot)
/* present menu with options + validation for targets to use */
static int pose_ik_add_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(evt))
{
- Object *ob= object_pose_armature_get(CTX_data_active_object(C));
- bPoseChannel *pchan= get_active_posechannel(ob);
- bConstraint *con= NULL;
+ Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
+ bPoseChannel *pchan = BKE_pose_channel_active(ob);
+ bConstraint *con = NULL;
uiPopupMenu *pup;
uiLayout *layout;
- Object *tar_ob= NULL;
- bPoseChannel *tar_pchan= NULL;
+ Object *tar_ob = NULL;
+ bPoseChannel *tar_pchan = NULL;
/* must have active bone */
if (ELEM(NULL, ob, pchan)) {
@@ -1705,8 +1705,8 @@ static int pose_ik_add_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(evt))
}
/* bone must not have any constraints already */
- for (con= pchan->constraints.first; con; con= con->next) {
- if (con->type==CONSTRAINT_TYPE_KINEMATIC) break;
+ for (con = pchan->constraints.first; con; con = con->next) {
+ if (con->type == CONSTRAINT_TYPE_KINEMATIC) break;
}
if (con) {
BKE_report(op->reports, RPT_ERROR, "Bone already has IK Constraint");
@@ -1714,8 +1714,8 @@ static int pose_ik_add_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(evt))
}
/* prepare popup menu to choose targetting options */
- pup= uiPupMenuBegin(C, "Add IK", ICON_NONE);
- layout= uiPupMenuLayout(pup);
+ pup = uiPupMenuBegin(C, "Add IK", ICON_NONE);
+ layout = uiPupMenuLayout(pup);
/* the type of targets we'll set determines the menu entries to show... */
if (get_new_constraint_target(C, CONSTRAINT_TYPE_KINEMATIC, &tar_ob, &tar_pchan, 0)) {
@@ -1742,8 +1742,8 @@ static int pose_ik_add_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(evt))
/* call constraint_add_exec() to add the IK constraint */
static int pose_ik_add_exec(bContext *C, wmOperator *op)
{
- Object *ob= CTX_data_active_object(C);
- int with_targets= RNA_boolean_get(op->ptr, "with_targets");
+ Object *ob = CTX_data_active_object(C);
+ int with_targets = RNA_boolean_get(op->ptr, "with_targets");
/* add the constraint - all necessary checks should have been done by the invoke() callback already... */
return constraint_add_exec(C, op, ob, get_active_constraints(ob), CONSTRAINT_TYPE_KINEMATIC, with_targets);
@@ -1762,7 +1762,7 @@ void POSE_OT_ik_add(wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "with_targets", 1, "With Targets", "Assign IK Constraint with targets derived from the select bones/objects");
@@ -1773,21 +1773,21 @@ void POSE_OT_ik_add(wmOperatorType *ot)
/* remove IK constraints from selected bones */
static int pose_ik_clear_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *ob= object_pose_armature_get(CTX_data_active_object(C));
+ Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
/* only remove IK Constraints */
- CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones)
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones)
{
bConstraint *con, *next;
// TODO: should we be checking if these contraints were local before we try and remove them?
- for (con= pchan->constraints.first; con; con= next) {
- next= con->next;
- if (con->type==CONSTRAINT_TYPE_KINEMATIC) {
+ for (con = pchan->constraints.first; con; con = next) {
+ next = con->next;
+ if (con->type == CONSTRAINT_TYPE_KINEMATIC) {
remove_constraint(&pchan->constraints, con);
}
}
- pchan->constflag &= ~(PCHAN_HAS_IK|PCHAN_HAS_TARGET);
+ pchan->constflag &= ~(PCHAN_HAS_IK | PCHAN_HAS_TARGET);
}
CTX_DATA_END;
@@ -1795,7 +1795,7 @@ static int pose_ik_clear_exec(bContext *C, wmOperator *UNUSED(op))
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
/* note, notifier might evolve */
- WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT|NA_REMOVED, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT | NA_REMOVED, ob);
return OPERATOR_FINISHED;
}
@@ -1812,6 +1812,6 @@ void POSE_OT_ik_clear(wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 2fbc2966bc8..c97ad9c62f9 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -101,7 +101,7 @@
#include "WM_api.h"
#include "WM_types.h"
-#include "object_intern.h" // own include
+#include "object_intern.h" // own include
/* ************* XXX **************** */
static void error(const char *UNUSED(arg)) {}
@@ -109,7 +109,8 @@ static void waitcursor(int UNUSED(val)) {}
static int pupmenu(const char *UNUSED(msg)) {return 0;}
/* port over here */
-static void error_libdata(void) {}
+static void error_libdata(void) {
+}
Object *ED_object_context(bContext *C)
{
@@ -120,10 +121,10 @@ Object *ED_object_context(bContext *C)
* note: context can be NULL when called from a enum with PROP_ENUM_NO_CONTEXT */
Object *ED_object_active_context(bContext *C)
{
- Object *ob= NULL;
+ Object *ob = NULL;
if (C) {
- ob= ED_object_context(C);
- if (!ob) ob= CTX_data_active_object(C);
+ ob = ED_object_context(C);
+ if (!ob) ob = CTX_data_active_object(C);
}
return ob;
}
@@ -132,15 +133,15 @@ Object *ED_object_active_context(bContext *C)
/* ********* clear/set restrict view *********/
static int object_hide_view_clear_exec(bContext *C, wmOperator *UNUSED(op))
{
- Main *bmain= CTX_data_main(C);
- ScrArea *sa= CTX_wm_area(C);
- View3D *v3d= sa->spacedata.first;
- Scene *scene= CTX_data_scene(C);
+ Main *bmain = CTX_data_main(C);
+ ScrArea *sa = CTX_wm_area(C);
+ View3D *v3d = sa->spacedata.first;
+ Scene *scene = CTX_data_scene(C);
Base *base;
int changed = 0;
/* XXX need a context loop to handle such cases */
- for (base = FIRSTBASE; base; base=base->next) {
+ for (base = FIRSTBASE; base; base = base->next) {
if ((base->lay & v3d->lay) && base->object->restrictflag & OB_RESTRICT_VIEW) {
base->flag |= SELECT;
base->object->flag = base->flag;
@@ -151,7 +152,7 @@ static int object_hide_view_clear_exec(bContext *C, wmOperator *UNUSED(op))
if (changed) {
DAG_id_type_tag(bmain, ID_OB);
DAG_scene_sort(bmain, scene);
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
}
return OPERATOR_FINISHED;
@@ -170,24 +171,25 @@ void OBJECT_OT_hide_view_clear(wmOperatorType *ot)
ot->poll = ED_operator_view3d_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int object_hide_view_set_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
short changed = 0;
- const int unselected= RNA_boolean_get(op->ptr, "unselected");
+ const int unselected = RNA_boolean_get(op->ptr, "unselected");
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, visible_bases)
+ {
if (!unselected) {
if (base->flag & SELECT) {
base->flag &= ~SELECT;
base->object->flag = base->flag;
base->object->restrictflag |= OB_RESTRICT_VIEW;
changed = 1;
- if (base==BASACT) {
+ if (base == BASACT) {
ED_base_object_activate(C, NULL);
}
}
@@ -205,7 +207,7 @@ static int object_hide_view_set_exec(bContext *C, wmOperator *op)
DAG_id_type_tag(bmain, ID_OB);
DAG_scene_sort(bmain, scene);
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, CTX_data_scene(C));
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, CTX_data_scene(C));
}
@@ -224,7 +226,7 @@ void OBJECT_OT_hide_view_set(wmOperatorType *ot)
ot->poll = ED_operator_view3d_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected objects");
@@ -233,19 +235,20 @@ void OBJECT_OT_hide_view_set(wmOperatorType *ot)
/* 99% same as above except no need for scene refreshing (TODO, update render preview) */
static int object_hide_render_clear_exec(bContext *C, wmOperator *UNUSED(op))
{
- short changed= 0;
+ short changed = 0;
/* XXX need a context loop to handle such cases */
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
+ {
if (ob->restrictflag & OB_RESTRICT_RENDER) {
ob->restrictflag &= ~OB_RESTRICT_RENDER;
- changed= 1;
+ changed = 1;
}
}
CTX_DATA_END;
if (changed)
- WM_event_add_notifier(C, NC_SPACE|ND_SPACE_OUTLINER, NULL);
+ WM_event_add_notifier(C, NC_SPACE | ND_SPACE_OUTLINER, NULL);
return OPERATOR_FINISHED;
}
@@ -263,14 +266,15 @@ void OBJECT_OT_hide_render_clear(wmOperatorType *ot)
ot->poll = ED_operator_view3d_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int object_hide_render_set_exec(bContext *C, wmOperator *op)
{
- const int unselected= RNA_boolean_get(op->ptr, "unselected");
+ const int unselected = RNA_boolean_get(op->ptr, "unselected");
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, visible_bases)
+ {
if (!unselected) {
if (base->flag & SELECT) {
base->object->restrictflag |= OB_RESTRICT_RENDER;
@@ -283,7 +287,7 @@ static int object_hide_render_set_exec(bContext *C, wmOperator *op)
}
}
CTX_DATA_END;
- WM_event_add_notifier(C, NC_SPACE|ND_SPACE_OUTLINER, NULL);
+ WM_event_add_notifier(C, NC_SPACE | ND_SPACE_OUTLINER, NULL);
return OPERATOR_FINISHED;
}
@@ -299,7 +303,7 @@ void OBJECT_OT_hide_render_set(wmOperatorType *ot)
ot->poll = ED_operator_view3d_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected objects");
}
@@ -310,19 +314,19 @@ void ED_object_exit_editmode(bContext *C, int flag)
{
/* Note! only in exceptional cases should 'EM_DO_UNDO' NOT be in the flag */
- Scene *scene= CTX_data_scene(C);
- Object *obedit= CTX_data_edit_object(C);
+ Scene *scene = CTX_data_scene(C);
+ Object *obedit = CTX_data_edit_object(C);
int freedata = flag & EM_FREEDATA;
- if (obedit==NULL) return;
+ if (obedit == NULL) return;
if (flag & EM_WAITCURSOR) waitcursor(1);
- if (obedit->type==OB_MESH) {
- Mesh *me= obedit->data;
+ if (obedit->type == OB_MESH) {
+ Mesh *me = obedit->data;
// if (EM_texFaceCheck())
- if (me->edit_btmesh->bm->totvert>MESH_MAX_VERTS) {
+ if (me->edit_btmesh->bm->totvert > MESH_MAX_VERTS) {
error("Too many vertices");
return;
}
@@ -332,14 +336,14 @@ void ED_object_exit_editmode(bContext *C, int flag)
if (freedata) {
EDBM_mesh_free(me->edit_btmesh);
MEM_freeN(me->edit_btmesh);
- me->edit_btmesh= NULL;
+ me->edit_btmesh = NULL;
}
if (obedit->restore_mode & OB_MODE_WEIGHT_PAINT) {
mesh_octree_table(NULL, NULL, NULL, 'e');
mesh_mirrtopo_table(NULL, 'e');
}
}
- else if (obedit->type==OB_ARMATURE) {
+ else if (obedit->type == OB_ARMATURE) {
ED_armature_from_edit(obedit);
if (freedata)
ED_armature_edit_free(obedit);
@@ -348,15 +352,15 @@ void ED_object_exit_editmode(bContext *C, int flag)
load_editNurb(obedit);
if (freedata) free_editNurb(obedit);
}
- else if (obedit->type==OB_FONT && freedata) {
+ else if (obedit->type == OB_FONT && freedata) {
load_editText(obedit);
if (freedata) free_editText(obedit);
}
- else if (obedit->type==OB_LATTICE) {
+ else if (obedit->type == OB_LATTICE) {
load_editLatt(obedit);
if (freedata) free_editLatt(obedit);
}
- else if (obedit->type==OB_MBALL) {
+ else if (obedit->type == OB_MBALL) {
load_editMball(obedit);
if (freedata) free_editMball(obedit);
}
@@ -367,11 +371,11 @@ void ED_object_exit_editmode(bContext *C, int flag)
PTCacheID *pid;
/* for example; displist make is different in editmode */
- scene->obedit= NULL; // XXX for context
+ scene->obedit = NULL; // XXX for context
/* flag object caches as outdated */
BKE_ptcache_ids_from_object(&pidlist, obedit, NULL, 0);
- for (pid=pidlist.first; pid; pid=pid->next) {
+ for (pid = pidlist.first; pid; pid = pid->next) {
if (pid->type != PTCACHE_TYPE_PARTICLES) /* particles don't need reset on geometry change */
pid->cache->flag |= PTCACHE_OUTDATED;
}
@@ -380,14 +384,14 @@ void ED_object_exit_editmode(bContext *C, int flag)
BKE_ptcache_object_reset(scene, obedit, PTCACHE_RESET_OUTDATED);
/* also flush ob recalc, doesn't take much overhead, but used for particles */
- DAG_id_tag_update(&obedit->id, OB_RECALC_OB|OB_RECALC_DATA);
+ DAG_id_tag_update(&obedit->id, OB_RECALC_OB | OB_RECALC_DATA);
if (flag & EM_DO_UNDO)
ED_undo_push(C, "Editmode");
if (flag & EM_WAITCURSOR) waitcursor(0);
- WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_OBJECT, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_MODE | NS_MODE_OBJECT, scene);
obedit->mode &= ~OB_MODE_EDIT;
}
@@ -396,34 +400,34 @@ void ED_object_exit_editmode(bContext *C, int flag)
void ED_object_enter_editmode(bContext *C, int flag)
{
- Scene *scene= CTX_data_scene(C);
- Base *base= NULL;
+ Scene *scene = CTX_data_scene(C);
+ Base *base = NULL;
Object *ob;
- ScrArea *sa= CTX_wm_area(C);
- View3D *v3d= NULL;
- int ok= 0;
+ ScrArea *sa = CTX_wm_area(C);
+ View3D *v3d = NULL;
+ int ok = 0;
if (scene->id.lib) return;
- if (sa && sa->spacetype==SPACE_VIEW3D)
- v3d= sa->spacedata.first;
+ if (sa && sa->spacetype == SPACE_VIEW3D)
+ v3d = sa->spacedata.first;
- if ((flag & EM_IGNORE_LAYER)==0) {
- base= CTX_data_active_base(C); /* active layer checked here for view3d */
+ if ((flag & EM_IGNORE_LAYER) == 0) {
+ base = CTX_data_active_base(C); /* active layer checked here for view3d */
- if (base==NULL) return;
- else if (v3d && (base->lay & v3d->lay)==0) return;
- else if (!v3d && (base->lay & scene->lay)==0) return;
+ if (base == NULL) return;
+ else if (v3d && (base->lay & v3d->lay) == 0) return;
+ else if (!v3d && (base->lay & scene->lay) == 0) return;
}
else {
- base= scene->basact;
+ base = scene->basact;
}
if (ELEM3(NULL, base, base->object, base->object->data)) return;
ob = base->object;
- if (object_data_is_libdata(ob)) {
+ if (BKE_object_obdata_is_libdata(ob)) {
error_libdata();
return;
}
@@ -434,14 +438,14 @@ void ED_object_enter_editmode(bContext *C, int flag)
/* note, when switching scenes the object can have editmode data but
* not be scene->obedit: bug 22954, this avoids calling self eternally */
- if ((ob->restore_mode & OB_MODE_EDIT)==0)
+ if ((ob->restore_mode & OB_MODE_EDIT) == 0)
ED_object_toggle_modes(C, ob->mode);
- ob->mode= OB_MODE_EDIT;
+ ob->mode = OB_MODE_EDIT;
- if (ob->type==OB_MESH) {
+ if (ob->type == OB_MESH) {
BMEditMesh *em;
- ok= 1;
+ ok = 1;
scene->obedit = ob; /* context sees this */
EDBM_mesh_make(CTX_data_tool_settings(C), scene, ob);
@@ -455,67 +459,67 @@ void ED_object_enter_editmode(bContext *C, int flag)
BM_mesh_select_mode_flush(em->bm);
}
- WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_EDITMODE_MESH, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_MODE | NS_EDITMODE_MESH, scene);
}
- else if (ob->type==OB_ARMATURE) {
- bArmature *arm= base->object->data;
+ else if (ob->type == OB_ARMATURE) {
+ bArmature *arm = base->object->data;
if (!arm) return;
/*
- * The function object_data_is_libdata make a problem here, the
+ * The function BKE_object_obdata_is_libdata make a problem here, the
* check for ob->proxy return 0 and let blender enter to edit mode
* this causes a crash when you try leave the edit mode.
* The problem is that i can't remove the ob->proxy check from
- * object_data_is_libdata that prevent the bugfix #6614, so
+ * BKE_object_obdata_is_libdata that prevent the bugfix #6614, so
* i add this little hack here.
*/
if (arm->id.lib) {
error_libdata();
return;
}
- ok=1;
- scene->obedit= ob;
+ ok = 1;
+ scene->obedit = ob;
ED_armature_to_edit(ob);
/* to ensure all goes in restposition and without striding */
- DAG_id_tag_update(&ob->id, OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME); // XXX: should this be OB_RECALC_DATA?
+ DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); // XXX: should this be OB_RECALC_DATA?
- WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_EDITMODE_ARMATURE, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_MODE | NS_EDITMODE_ARMATURE, scene);
}
- else if (ob->type==OB_FONT) {
- scene->obedit= ob; // XXX for context
- ok= 1;
+ else if (ob->type == OB_FONT) {
+ scene->obedit = ob; // XXX for context
+ ok = 1;
make_editText(ob);
- WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_EDITMODE_TEXT, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_MODE | NS_EDITMODE_TEXT, scene);
}
- else if (ob->type==OB_MBALL) {
- scene->obedit= ob; // XXX for context
- ok= 1;
+ else if (ob->type == OB_MBALL) {
+ scene->obedit = ob; // XXX for context
+ ok = 1;
make_editMball(ob);
- WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_EDITMODE_MBALL, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_MODE | NS_EDITMODE_MBALL, scene);
}
- else if (ob->type==OB_LATTICE) {
- scene->obedit= ob; // XXX for context
- ok= 1;
+ else if (ob->type == OB_LATTICE) {
+ scene->obedit = ob; // XXX for context
+ ok = 1;
make_editLatt(ob);
- WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_EDITMODE_LATTICE, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_MODE | NS_EDITMODE_LATTICE, scene);
}
- else if (ob->type==OB_SURF || ob->type==OB_CURVE) {
- ok= 1;
- scene->obedit= ob; // XXX for context
+ else if (ob->type == OB_SURF || ob->type == OB_CURVE) {
+ ok = 1;
+ scene->obedit = ob; // XXX for context
make_editNurb(ob);
- WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_EDITMODE_CURVE, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_MODE | NS_EDITMODE_CURVE, scene);
}
if (ok) {
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
}
else {
- scene->obedit= NULL; // XXX for context
+ scene->obedit = NULL; // XXX for context
ob->mode &= ~OB_MODE_EDIT;
- WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_OBJECT, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_MODE | NS_MODE_OBJECT, scene);
}
if (flag & EM_DO_UNDO) ED_undo_push(C, "Enter Editmode");
@@ -529,7 +533,7 @@ static int editmode_toggle_exec(bContext *C, wmOperator *UNUSED(op))
if (!CTX_data_edit_object(C))
ED_object_enter_editmode(C, EM_WAITCURSOR);
else
- ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); /* had EM_DO_UNDO but op flag calls undo too [#24685] */
+ ED_object_exit_editmode(C, EM_FREEDATA | EM_FREEUNDO | EM_WAITCURSOR); /* had EM_DO_UNDO but op flag calls undo too [#24685] */
ED_space_image_uv_sculpt_update(CTX_wm_manager(C), toolsettings);
@@ -567,18 +571,18 @@ void OBJECT_OT_editmode_toggle(wmOperatorType *ot)
ot->poll = editmode_toggle_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* *************************** */
static int posemode_exec(bContext *C, wmOperator *UNUSED(op))
{
- Base *base= CTX_data_active_base(C);
+ Base *base = CTX_data_active_base(C);
- if (base->object->type==OB_ARMATURE) {
- if (base->object==CTX_data_edit_object(C)) {
- ED_object_exit_editmode(C, EM_FREEDATA|EM_DO_UNDO);
+ if (base->object->type == OB_ARMATURE) {
+ if (base->object == CTX_data_edit_object(C)) {
+ ED_object_exit_editmode(C, EM_FREEDATA | EM_DO_UNDO);
ED_armature_enter_posemode(C, base);
}
else if (base->object->mode & OB_MODE_POSE)
@@ -604,7 +608,7 @@ void OBJECT_OT_posemode_toggle(wmOperatorType *ot)
ot->poll = ED_operator_object_active_editable;
/* flag */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static void copymenu_properties(Scene *scene, View3D *v3d, Object *ob)
@@ -612,53 +616,53 @@ static void copymenu_properties(Scene *scene, View3D *v3d, Object *ob)
//XXX no longer used - to be removed - replaced by game_properties_copy_exec
bProperty *prop;
Base *base;
- int nr, tot=0;
+ int nr, tot = 0;
char *str;
- prop= ob->prop.first;
+ prop = ob->prop.first;
while (prop) {
tot++;
- prop= prop->next;
+ prop = prop->next;
}
- str= MEM_callocN(50 + 33*tot, "copymenu prop");
+ str = MEM_callocN(50 + 33 * tot, "copymenu prop");
if (tot)
strcpy(str, "Copy Property %t|Replace All|Merge All|%l");
else
strcpy(str, "Copy Property %t|Clear All (no properties on active)");
- tot= 0;
- prop= ob->prop.first;
+ tot = 0;
+ prop = ob->prop.first;
while (prop) {
tot++;
strcat(str, "|");
strcat(str, prop->name);
- prop= prop->next;
+ prop = prop->next;
}
- nr= pupmenu(str);
+ nr = pupmenu(str);
- if ( nr==1 || nr==2 ) {
- for (base= FIRSTBASE; base; base= base->next) {
- if ((base != BASACT) &&(TESTBASELIB(v3d, base))) {
- if (nr==1) { /* replace */
- copy_properties( &base->object->prop, &ob->prop );
+ if (nr == 1 || nr == 2) {
+ for (base = FIRSTBASE; base; base = base->next) {
+ if ((base != BASACT) && (TESTBASELIB(v3d, base))) {
+ if (nr == 1) { /* replace */
+ copy_properties(&base->object->prop, &ob->prop);
}
else {
- for (prop = ob->prop.first; prop; prop= prop->next ) {
+ for (prop = ob->prop.first; prop; prop = prop->next) {
set_ob_property(base->object, prop);
}
}
}
}
}
- else if (nr>0) {
- prop = BLI_findlink(&ob->prop, nr-4); /* account for first 3 menu items & menu index starting at 1*/
+ else if (nr > 0) {
+ prop = BLI_findlink(&ob->prop, nr - 4); /* account for first 3 menu items & menu index starting at 1*/
if (prop) {
- for (base= FIRSTBASE; base; base= base->next) {
- if ((base != BASACT) &&(TESTBASELIB(v3d, base))) {
+ for (base = FIRSTBASE; base; base = base->next) {
+ if ((base != BASACT) && (TESTBASELIB(v3d, base))) {
set_ob_property(base->object, prop);
}
}
@@ -673,7 +677,7 @@ static void copymenu_logicbricks(Scene *scene, View3D *v3d, Object *ob)
//XXX no longer used - to be removed - replaced by logicbricks_copy_exec
Base *base;
- for (base= FIRSTBASE; base; base= base->next) {
+ for (base = FIRSTBASE; base; base = base->next) {
if (base->object != ob) {
if (TESTBASELIB(v3d, base)) {
@@ -692,12 +696,12 @@ static void copymenu_logicbricks(Scene *scene, View3D *v3d, Object *ob)
set_sca_new_poins_ob(base->object);
/* some menu settings */
- base->object->scavisflag= ob->scavisflag;
- base->object->scaflag= ob->scaflag;
+ base->object->scavisflag = ob->scavisflag;
+ base->object->scaflag = ob->scaflag;
/* set the initial state */
- base->object->state= ob->state;
- base->object->init_state= ob->init_state;
+ base->object->state = ob->state;
+ base->object->init_state = ob->init_state;
}
}
}
@@ -706,49 +710,49 @@ static void copymenu_logicbricks(Scene *scene, View3D *v3d, Object *ob)
/* both pointers should exist */
static void copy_texture_space(Object *to, Object *ob)
{
- float *poin1= NULL, *poin2= NULL;
- short texflag= 0;
+ float *poin1 = NULL, *poin2 = NULL;
+ short texflag = 0;
- if (ob->type==OB_MESH) {
- texflag= ((Mesh *)ob->data)->texflag;
- poin2= ((Mesh *)ob->data)->loc;
+ if (ob->type == OB_MESH) {
+ texflag = ((Mesh *)ob->data)->texflag;
+ poin2 = ((Mesh *)ob->data)->loc;
}
else if (ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT)) {
- texflag= ((Curve *)ob->data)->texflag;
- poin2= ((Curve *)ob->data)->loc;
+ texflag = ((Curve *)ob->data)->texflag;
+ poin2 = ((Curve *)ob->data)->loc;
}
- else if (ob->type==OB_MBALL) {
- texflag= ((MetaBall *)ob->data)->texflag;
- poin2= ((MetaBall *)ob->data)->loc;
+ else if (ob->type == OB_MBALL) {
+ texflag = ((MetaBall *)ob->data)->texflag;
+ poin2 = ((MetaBall *)ob->data)->loc;
}
else
return;
- if (to->type==OB_MESH) {
- ((Mesh *)to->data)->texflag= texflag;
- poin1= ((Mesh *)to->data)->loc;
+ if (to->type == OB_MESH) {
+ ((Mesh *)to->data)->texflag = texflag;
+ poin1 = ((Mesh *)to->data)->loc;
}
else if (ELEM3(to->type, OB_CURVE, OB_SURF, OB_FONT)) {
- ((Curve *)to->data)->texflag= texflag;
- poin1= ((Curve *)to->data)->loc;
+ ((Curve *)to->data)->texflag = texflag;
+ poin1 = ((Curve *)to->data)->loc;
}
- else if (to->type==OB_MBALL) {
- ((MetaBall *)to->data)->texflag= texflag;
- poin1= ((MetaBall *)to->data)->loc;
+ else if (to->type == OB_MBALL) {
+ ((MetaBall *)to->data)->texflag = texflag;
+ poin1 = ((MetaBall *)to->data)->loc;
}
else
return;
- memcpy(poin1, poin2, 9*sizeof(float)); /* this was noted in DNA_mesh, curve, mball */
+ memcpy(poin1, poin2, 9 * sizeof(float)); /* this was noted in DNA_mesh, curve, mball */
- if (to->type==OB_MESH) {
+ if (to->type == OB_MESH) {
/* pass */
}
else if (to->type == OB_MBALL) {
- tex_space_mball(to);
+ BKE_mball_texspace_calc(to);
}
else {
- tex_space_curve(to->data);
+ BKE_curve_texspace_calc(to->data);
}
}
@@ -760,128 +764,128 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event)
Base *base;
Curve *cu, *cu1;
Nurb *nu;
- int do_scene_sort= 0;
+ int do_scene_sort = 0;
if (scene->id.lib) return;
- if (!(ob=OBACT)) return;
+ if (!(ob = OBACT)) return;
if (scene->obedit) { // XXX get from context
/* obedit_copymenu(); */
return;
}
- if (event==9) {
+ if (event == 9) {
copymenu_properties(scene, v3d, ob);
return;
}
- else if (event==10) {
+ else if (event == 10) {
copymenu_logicbricks(scene, v3d, ob);
return;
}
- else if (event==24) {
- /* moved to object_link_modifiers */
+ else if (event == 24) {
+ /* moved to BKE_object_link_modifiers */
/* copymenu_modifiers(bmain, scene, v3d, ob); */
return;
}
- for (base= FIRSTBASE; base; base= base->next) {
+ for (base = FIRSTBASE; base; base = base->next) {
if (base != BASACT) {
if (TESTBASELIB(v3d, base)) {
base->object->recalc |= OB_RECALC_OB;
- if (event==1) { /* loc */
+ if (event == 1) { /* loc */
copy_v3_v3(base->object->loc, ob->loc);
copy_v3_v3(base->object->dloc, ob->dloc);
}
- else if (event==2) { /* rot */
+ else if (event == 2) { /* rot */
copy_v3_v3(base->object->rot, ob->rot);
copy_v3_v3(base->object->drot, ob->drot);
copy_qt_qt(base->object->quat, ob->quat);
copy_qt_qt(base->object->dquat, ob->dquat);
}
- else if (event==3) { /* size */
+ else if (event == 3) { /* size */
copy_v3_v3(base->object->size, ob->size);
copy_v3_v3(base->object->dscale, ob->dscale);
}
- else if (event==4) { /* drawtype */
- base->object->dt= ob->dt;
- base->object->dtx= ob->dtx;
- base->object->empty_drawtype= ob->empty_drawtype;
- base->object->empty_drawsize= ob->empty_drawsize;
+ else if (event == 4) { /* drawtype */
+ base->object->dt = ob->dt;
+ base->object->dtx = ob->dtx;
+ base->object->empty_drawtype = ob->empty_drawtype;
+ base->object->empty_drawsize = ob->empty_drawsize;
}
- else if (event==5) { /* time offs */
- base->object->sf= ob->sf;
+ else if (event == 5) { /* time offs */
+ base->object->sf = ob->sf;
}
- else if (event==6) { /* dupli */
- base->object->dupon= ob->dupon;
- base->object->dupoff= ob->dupoff;
- base->object->dupsta= ob->dupsta;
- base->object->dupend= ob->dupend;
+ else if (event == 6) { /* dupli */
+ base->object->dupon = ob->dupon;
+ base->object->dupoff = ob->dupoff;
+ base->object->dupsta = ob->dupsta;
+ base->object->dupend = ob->dupend;
base->object->transflag &= ~OB_DUPLI;
base->object->transflag |= (ob->transflag & OB_DUPLI);
- base->object->dup_group= ob->dup_group;
+ base->object->dup_group = ob->dup_group;
if (ob->dup_group)
id_lib_extern(&ob->dup_group->id);
}
- else if (event==7) { /* mass */
- base->object->mass= ob->mass;
+ else if (event == 7) { /* mass */
+ base->object->mass = ob->mass;
}
- else if (event==8) { /* damping */
- base->object->damping= ob->damping;
- base->object->rdamping= ob->rdamping;
+ else if (event == 8) { /* damping */
+ base->object->damping = ob->damping;
+ base->object->rdamping = ob->rdamping;
}
- else if (event==11) { /* all physical attributes */
+ else if (event == 11) { /* all physical attributes */
base->object->gameflag = ob->gameflag;
base->object->inertia = ob->inertia;
base->object->formfactor = ob->formfactor;
- base->object->damping= ob->damping;
- base->object->rdamping= ob->rdamping;
- base->object->min_vel= ob->min_vel;
- base->object->max_vel= ob->max_vel;
+ base->object->damping = ob->damping;
+ base->object->rdamping = ob->rdamping;
+ base->object->min_vel = ob->min_vel;
+ base->object->max_vel = ob->max_vel;
if (ob->gameflag & OB_BOUNDS) {
base->object->collision_boundtype = ob->collision_boundtype;
}
- base->object->margin= ob->margin;
- base->object->bsoft= copy_bulletsoftbody(ob->bsoft);
+ base->object->margin = ob->margin;
+ base->object->bsoft = copy_bulletsoftbody(ob->bsoft);
}
- else if (event==17) { /* tex space */
+ else if (event == 17) { /* tex space */
copy_texture_space(base->object, ob);
}
- else if (event==18) { /* font settings */
+ else if (event == 18) { /* font settings */
- if (base->object->type==ob->type) {
- cu= ob->data;
- cu1= base->object->data;
-
- cu1->spacemode= cu->spacemode;
- cu1->spacing= cu->spacing;
- cu1->linedist= cu->linedist;
- cu1->shear= cu->shear;
- cu1->fsize= cu->fsize;
- cu1->xof= cu->xof;
- cu1->yof= cu->yof;
- cu1->textoncurve= cu->textoncurve;
- cu1->wordspace= cu->wordspace;
- cu1->ulpos= cu->ulpos;
- cu1->ulheight= cu->ulheight;
+ if (base->object->type == ob->type) {
+ cu = ob->data;
+ cu1 = base->object->data;
+
+ cu1->spacemode = cu->spacemode;
+ cu1->spacing = cu->spacing;
+ cu1->linedist = cu->linedist;
+ cu1->shear = cu->shear;
+ cu1->fsize = cu->fsize;
+ cu1->xof = cu->xof;
+ cu1->yof = cu->yof;
+ cu1->textoncurve = cu->textoncurve;
+ cu1->wordspace = cu->wordspace;
+ cu1->ulpos = cu->ulpos;
+ cu1->ulheight = cu->ulheight;
if (cu1->vfont) cu1->vfont->id.us--;
- cu1->vfont= cu->vfont;
+ cu1->vfont = cu->vfont;
id_us_plus((ID *)cu1->vfont);
if (cu1->vfontb) cu1->vfontb->id.us--;
- cu1->vfontb= cu->vfontb;
+ cu1->vfontb = cu->vfontb;
id_us_plus((ID *)cu1->vfontb);
if (cu1->vfonti) cu1->vfonti->id.us--;
- cu1->vfonti= cu->vfonti;
+ cu1->vfonti = cu->vfonti;
id_us_plus((ID *)cu1->vfonti);
if (cu1->vfontbi) cu1->vfontbi->id.us--;
- cu1->vfontbi= cu->vfontbi;
+ cu1->vfontbi = cu->vfontbi;
id_us_plus((ID *)cu1->vfontbi);
- BKE_text_to_curve(bmain, scene, base->object, 0); /* needed? */
+ BKE_vfont_to_curve(bmain, scene, base->object, 0); /* needed? */
BLI_strncpy(cu1->family, cu->family, sizeof(cu1->family));
@@ -889,43 +893,43 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event)
base->object->recalc |= OB_RECALC_DATA;
}
}
- else if (event==19) { /* bevel settings */
+ else if (event == 19) { /* bevel settings */
if (ELEM(base->object->type, OB_CURVE, OB_FONT)) {
- cu= ob->data;
- cu1= base->object->data;
+ cu = ob->data;
+ cu1 = base->object->data;
- cu1->bevobj= cu->bevobj;
- cu1->taperobj= cu->taperobj;
- cu1->width= cu->width;
- cu1->bevresol= cu->bevresol;
- cu1->ext1= cu->ext1;
- cu1->ext2= cu->ext2;
+ cu1->bevobj = cu->bevobj;
+ cu1->taperobj = cu->taperobj;
+ cu1->width = cu->width;
+ cu1->bevresol = cu->bevresol;
+ cu1->ext1 = cu->ext1;
+ cu1->ext2 = cu->ext2;
base->object->recalc |= OB_RECALC_DATA;
}
}
- else if (event==25) { /* curve resolution */
+ else if (event == 25) { /* curve resolution */
if (ELEM(base->object->type, OB_CURVE, OB_FONT)) {
- cu= ob->data;
- cu1= base->object->data;
+ cu = ob->data;
+ cu1 = base->object->data;
- cu1->resolu= cu->resolu;
- cu1->resolu_ren= cu->resolu_ren;
+ cu1->resolu = cu->resolu;
+ cu1->resolu_ren = cu->resolu_ren;
- nu= cu1->nurb.first;
+ nu = cu1->nurb.first;
while (nu) {
- nu->resolu= cu1->resolu;
- nu= nu->next;
+ nu->resolu = cu1->resolu;
+ nu = nu->next;
}
base->object->recalc |= OB_RECALC_DATA;
}
}
- else if (event==21) {
- if (base->object->type==OB_MESH) {
+ else if (event == 21) {
+ if (base->object->type == OB_MESH) {
ModifierData *md = modifiers_findByType(ob, eModifierType_Subsurf);
if (md) {
@@ -941,42 +945,42 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event)
}
}
}
- else if (event==22) {
+ else if (event == 22) {
/* Copy the constraint channels over */
copy_constraints(&base->object->constraints, &ob->constraints, TRUE);
- do_scene_sort= 1;
+ do_scene_sort = 1;
}
- else if (event==23) {
- base->object->softflag= ob->softflag;
+ else if (event == 23) {
+ base->object->softflag = ob->softflag;
if (base->object->soft) sbFree(base->object->soft);
- base->object->soft= copy_softbody(ob->soft);
+ base->object->soft = copy_softbody(ob->soft);
if (!modifiers_findByType(base->object, eModifierType_Softbody)) {
BLI_addhead(&base->object->modifiers, modifier_new(eModifierType_Softbody));
}
}
- else if (event==26) {
+ else if (event == 26) {
#if 0 // XXX old animation system
copy_nlastrips(&base->object->nlastrips, &ob->nlastrips);
#endif // XXX old animation system
}
- else if (event==27) { /* autosmooth */
- if (base->object->type==OB_MESH) {
- Mesh *me= ob->data;
- Mesh *cme= base->object->data;
- cme->smoothresh= me->smoothresh;
+ else if (event == 27) { /* autosmooth */
+ if (base->object->type == OB_MESH) {
+ Mesh *me = ob->data;
+ Mesh *cme = base->object->data;
+ cme->smoothresh = me->smoothresh;
if (me->flag & ME_AUTOSMOOTH)
cme->flag |= ME_AUTOSMOOTH;
else
cme->flag &= ~ME_AUTOSMOOTH;
}
}
- else if (event==28) { /* UV orco */
+ else if (event == 28) { /* UV orco */
if (ELEM(base->object->type, OB_CURVE, OB_SURF)) {
- cu= ob->data;
- cu1= base->object->data;
+ cu = ob->data;
+ cu1 = base->object->data;
if (cu->flag & CU_UV_ORCO)
cu1->flag |= CU_UV_ORCO;
@@ -984,13 +988,13 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event)
cu1->flag &= ~CU_UV_ORCO;
}
}
- else if (event==29) { /* protected bits */
- base->object->protectflag= ob->protectflag;
+ else if (event == 29) { /* protected bits */
+ base->object->protectflag = ob->protectflag;
}
- else if (event==30) { /* index object */
- base->object->index= ob->index;
+ else if (event == 30) { /* index object */
+ base->object->index = ob->index;
}
- else if (event==31) { /* object color */
+ else if (event == 31) { /* object color */
copy_v4_v4(base->object->col, ob->col);
}
}
@@ -1003,13 +1007,13 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event)
DAG_ids_flush_update(bmain, 0);
}
-static void UNUSED_FUNCTION(copy_attr_menu)(Main *bmain, Scene *scene, View3D *v3d)
+static void UNUSED_FUNCTION(copy_attr_menu) (Main * bmain, Scene * scene, View3D * v3d)
{
Object *ob;
short event;
char str[512];
- if (!(ob=OBACT)) return;
+ if (!(ob = OBACT)) return;
if (scene->obedit) { // XXX get from context
// if (ob->type == OB_MESH)
@@ -1028,8 +1032,8 @@ static void UNUSED_FUNCTION(copy_attr_menu)(Main *bmain, Scene *scene, View3D *v
"Time Offset%x5|Dupli%x6|Object Color%x31|%l|Mass%x7|Damping%x8|All Physical Attributes%x11|Properties%x9|"
"Logic Bricks%x10|Protected Transform%x29|%l");
- strcat (str, "|Object Constraints%x22");
- strcat (str, "|NLA Strips%x26");
+ strcat(str, "|Object Constraints%x22");
+ strcat(str, "|NLA Strips%x26");
// XXX if (OB_TYPE_SUPPORT_MATERIAL(ob->type)) {
// strcat(str, "|Texture Space%x17");
@@ -1039,10 +1043,10 @@ static void UNUSED_FUNCTION(copy_attr_menu)(Main *bmain, Scene *scene, View3D *v
if (ob->type == OB_CURVE) strcat(str, "|Bevel Settings%x19|UV Orco%x28");
if ((ob->type == OB_FONT) || (ob->type == OB_CURVE)) {
- strcat(str, "|Curve Resolution%x25");
+ strcat(str, "|Curve Resolution%x25");
}
- if (ob->type==OB_MESH) {
+ if (ob->type == OB_MESH) {
strcat(str, "|Subsurf Settings%x21|AutoSmooth%x27");
}
@@ -1050,12 +1054,12 @@ static void UNUSED_FUNCTION(copy_attr_menu)(Main *bmain, Scene *scene, View3D *v
strcat(str, "|Pass Index%x30");
- if (ob->type==OB_MESH || ob->type==OB_CURVE || ob->type==OB_LATTICE || ob->type==OB_SURF) {
+ if (ob->type == OB_MESH || ob->type == OB_CURVE || ob->type == OB_LATTICE || ob->type == OB_SURF) {
strcat(str, "|Modifiers ...%x24");
}
- event= pupmenu(str);
- if (event<= 0) return;
+ event = pupmenu(str);
+ if (event <= 0) return;
copy_attr(bmain, scene, v3d, event);
}
@@ -1074,7 +1078,7 @@ static int forcefield_toggle_exec(bContext *C, wmOperator *UNUSED(op))
else
ob->pd->forcefield = 0;
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, NULL);
return OPERATOR_FINISHED;
}
@@ -1092,13 +1096,13 @@ void OBJECT_OT_forcefield_toggle(wmOperatorType *ot)
ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ********************************************** */
/* Motion Paths */
-/* For the object with pose/action: update paths for those that have got them
+/* For the objects with animation: update paths for those that have got them
* This should selectively update paths that exist...
*
* To be called from various tools that do incremental updates
@@ -1108,9 +1112,9 @@ void ED_objects_recalculate_paths(bContext *C, Scene *scene)
ListBase targets = {NULL, NULL};
/* loop over objects in scene */
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects)
+ CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
{
- /* set flag to force recalc, then grab the relevant bones to target */
+ /* set flag to force recalc, then grab path(s) from object */
ob->avs.recalc |= ANIMVIZ_RECALC_PATHS;
animviz_get_object_motionpaths(ob, &targets);
}
@@ -1121,57 +1125,124 @@ void ED_objects_recalculate_paths(bContext *C, Scene *scene)
BLI_freelistN(&targets);
}
-/* For the object with pose/action: create path curves for selected bones
- * This recalculates the WHOLE path within the pchan->pathsf and pchan->pathef range
- */
-static int object_calculate_paths_exec (bContext *C, wmOperator *op)
+
+/* show popup to determine settings */
+static int object_calculate_paths_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
- Scene *scene= CTX_data_scene(C);
+ Object *ob = CTX_data_active_object(C);
+
+ if (ob == NULL)
+ return OPERATOR_CANCELLED;
+
+ /* set default settings from existing/stored settings */
+ {
+ bAnimVizSettings *avs = &ob->avs;
+
+ RNA_int_set(op->ptr, "start_frame", avs->path_sf);
+ RNA_int_set(op->ptr, "end_frame", avs->path_ef);
+ }
+
+ /* show popup dialog to allow editing of range... */
+ // FIXME: hardcoded dimensions here are just arbitrary
+ return WM_operator_props_dialog_popup(C, op, 200, 200);
+}
+
+/* Calculate/recalculate whole paths (avs.path_sf to avs.path_ef) */
+static int object_calculate_paths_exec(bContext *C, wmOperator *op)
+{
+ Scene *scene = CTX_data_scene(C);
+ int start = RNA_int_get(op->ptr, "start_frame");
+ int end = RNA_int_get(op->ptr, "end_frame");
/* set up path data for bones being calculated */
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects)
+ CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
{
- /* verify makes sure that the selected bone has a bone with the appropriate settings */
+ bAnimVizSettings *avs = &ob->avs;
+
+ /* grab baking settings from operator settings */
+ avs->path_sf = start;
+ avs->path_ef = end;
+
+ /* verify that the selected object has the appropriate settings */
animviz_verify_motionpaths(op->reports, scene, ob, NULL);
}
CTX_DATA_END;
- /* calculate the bones that now have motionpaths... */
- // TODO: only make for the selected bones?
+ /* calculate the paths for objects that have them (and are tagged to get refreshed) */
ED_objects_recalculate_paths(C, scene);
/* notifiers for updates */
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
return OPERATOR_FINISHED;
}
-void OBJECT_OT_paths_calculate (wmOperatorType *ot)
+void OBJECT_OT_paths_calculate(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Calculate Object Paths";
ot->idname = "OBJECT_OT_paths_calculate";
- ot->description = "Calculate paths for the selected bones";
+ ot->description = "Calculate motion paths for the selected objects";
/* api callbacks */
+ ot->invoke = object_calculate_paths_invoke;
ot->exec = object_calculate_paths_exec;
ot->poll = ED_operator_object_active_editable;
/* flags */
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+
+ /* properties */
+ RNA_def_int(ot->srna, "start_frame", 1, MINAFRAME, MAXFRAME, "Start",
+ "First frame to calculate object paths on", MINFRAME, MAXFRAME/2.0);
+ RNA_def_int(ot->srna, "end_frame", 250, MINAFRAME, MAXFRAME, "End",
+ "Last frame to calculate object paths on", MINFRAME, MAXFRAME/2.0);
+}
+
+/* --------- */
+
+static int object_update_paths_exec(bContext *C, wmOperator *UNUSED(op))
+{
+ Scene *scene = CTX_data_scene(C);
+
+ if (scene == NULL)
+ return OPERATOR_CANCELLED;
+
+ /* calculate the paths for objects that have them (and are tagged to get refreshed) */
+ ED_objects_recalculate_paths(C, scene);
+
+ /* notifiers for updates */
+ WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_paths_update(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Update Object Paths";
+ ot->idname = "OBJECT_OT_paths_update";
+ ot->description = "Recalculate paths for selected objects";
+
+ /* api callbakcs */
+ ot->exec = object_update_paths_exec;
+ ot->poll = ED_operator_object_active_editable; /* TODO: this should probably check for existing paths */
+
+ /* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* --------- */
-/* for the object with pose/action: clear path curves for selected bones only */
+/* Clear motion paths for selected objects only */
void ED_objects_clear_paths(bContext *C)
{
/* loop over objects in scene */
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects)
+ CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
{
if (ob->mpath) {
animviz_free_motionpath(ob->mpath);
- ob->mpath= NULL;
+ ob->mpath = NULL;
ob->avs.path_bakeflag &= ~MOTIONPATH_BAKE_HAS_PATHS;
}
}
@@ -1179,30 +1250,30 @@ void ED_objects_clear_paths(bContext *C)
}
/* operator callback for this */
-static int object_clear_paths_exec (bContext *C, wmOperator *UNUSED(op))
+static int object_clear_paths_exec(bContext *C, wmOperator *UNUSED(op))
{
/* use the backend function for this */
ED_objects_clear_paths(C);
/* notifiers for updates */
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
return OPERATOR_FINISHED;
}
-void OBJECT_OT_paths_clear (wmOperatorType *ot)
+void OBJECT_OT_paths_clear(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Clear Object Paths";
ot->idname = "OBJECT_OT_paths_clear";
- ot->description = "Clear path caches for selected bones";
+ ot->description = "Clear path caches for selected objects";
/* api callbacks */
ot->exec = object_clear_paths_exec;
ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
@@ -1212,36 +1283,37 @@ static int shade_smooth_exec(bContext *C, wmOperator *op)
{
Curve *cu;
Nurb *nu;
- int clear= (strcmp(op->idname, "OBJECT_OT_shade_flat") == 0);
- int done= 0;
+ int clear = (strcmp(op->idname, "OBJECT_OT_shade_flat") == 0);
+ int done = 0;
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
+ {
- if (ob->type==OB_MESH) {
- mesh_set_smooth_flag(ob, !clear);
+ if (ob->type == OB_MESH) {
+ BKE_mesh_smooth_flag_set(ob, !clear);
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
- done= 1;
+ done = 1;
}
else if (ELEM(ob->type, OB_SURF, OB_CURVE)) {
- cu= ob->data;
+ cu = ob->data;
- for (nu=cu->nurb.first; nu; nu=nu->next) {
+ for (nu = cu->nurb.first; nu; nu = nu->next) {
if (!clear) nu->flag |= ME_SMOOTH;
else nu->flag &= ~ME_SMOOTH;
}
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
- done= 1;
+ done = 1;
}
}
CTX_DATA_END;
- return (done)? OPERATOR_FINISHED: OPERATOR_CANCELLED;
+ return (done) ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
}
static int shade_poll(bContext *C)
@@ -1261,7 +1333,7 @@ void OBJECT_OT_shade_flat(wmOperatorType *ot)
ot->exec = shade_smooth_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
void OBJECT_OT_shade_smooth(wmOperatorType *ot)
@@ -1276,12 +1348,12 @@ void OBJECT_OT_shade_smooth(wmOperatorType *ot)
ot->exec = shade_smooth_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ********************** */
-static void UNUSED_FUNCTION(image_aspect)(Scene *scene, View3D *v3d)
+static void UNUSED_FUNCTION(image_aspect) (Scene * scene, View3D * v3d)
{
/* all selected objects with an image map: scale in image aspect */
Base *base;
@@ -1291,42 +1363,42 @@ static void UNUSED_FUNCTION(image_aspect)(Scene *scene, View3D *v3d)
float x, y, space;
int a, b, done;
- if (scene->obedit) return; // XXX get from context
+ if (scene->obedit) return; // XXX get from context
if (scene->id.lib) return;
- for (base= FIRSTBASE; base; base= base->next) {
+ for (base = FIRSTBASE; base; base = base->next) {
if (TESTBASELIB(v3d, base)) {
- ob= base->object;
- done= 0;
+ ob = base->object;
+ done = 0;
- for (a=1; a<=ob->totcol; a++) {
- ma= give_current_material(ob, a);
+ for (a = 1; a <= ob->totcol; a++) {
+ ma = give_current_material(ob, a);
if (ma) {
- for (b=0; b<MAX_MTEX; b++) {
+ for (b = 0; b < MAX_MTEX; b++) {
if (ma->mtex[b] && ma->mtex[b]->tex) {
- tex= ma->mtex[b]->tex;
- if (tex->type==TEX_IMAGE && tex->ima) {
- ImBuf *ibuf= BKE_image_get_ibuf(tex->ima, NULL);
+ tex = ma->mtex[b]->tex;
+ if (tex->type == TEX_IMAGE && tex->ima) {
+ ImBuf *ibuf = BKE_image_get_ibuf(tex->ima, NULL);
/* texturespace */
- space= 1.0;
- if (ob->type==OB_MESH) {
+ space = 1.0;
+ if (ob->type == OB_MESH) {
float size[3];
- mesh_get_texspace(ob->data, NULL, NULL, size);
- space= size[0]/size[1];
+ BKE_mesh_texspace_get(ob->data, NULL, NULL, size);
+ space = size[0] / size[1];
}
else if (ELEM3(ob->type, OB_CURVE, OB_FONT, OB_SURF)) {
- Curve *cu= ob->data;
- space= cu->size[0]/cu->size[1];
+ Curve *cu = ob->data;
+ space = cu->size[0] / cu->size[1];
}
- x= ibuf->x/space;
- y= ibuf->y;
+ x = ibuf->x / space;
+ y = ibuf->y;
- if (x>y) ob->size[0]= ob->size[1]*x/y;
- else ob->size[1]= ob->size[0]*y/x;
+ if (x > y) ob->size[0] = ob->size[1] * x / y;
+ else ob->size[1] = ob->size[0] * y / x;
- done= 1;
+ done = 1;
DAG_id_tag_update(&ob->id, OB_RECALC_OB);
}
}
@@ -1344,30 +1416,32 @@ static void UNUSED_FUNCTION(image_aspect)(Scene *scene, View3D *v3d)
static EnumPropertyItem *object_mode_set_itemsf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
{
EnumPropertyItem *input = object_mode_items;
- EnumPropertyItem *item= NULL;
+ EnumPropertyItem *item = NULL;
Object *ob;
- int totitem= 0;
+ int totitem = 0;
if (!C) /* needed for docs */
return object_mode_items;
+
+
ob = CTX_data_active_object(C);
while (ob && input->identifier) {
- if ((input->value == OB_MODE_EDIT && ((ob->type == OB_MESH) || (ob->type == OB_ARMATURE) ||
- (ob->type == OB_CURVE) || (ob->type == OB_SURF) ||
- (ob->type == OB_FONT) || (ob->type == OB_MBALL) || (ob->type == OB_LATTICE))) ||
- (input->value == OB_MODE_POSE && (ob->type == OB_ARMATURE)) ||
- (input->value == OB_MODE_PARTICLE_EDIT && ob->particlesystem.first) ||
- ((input->value == OB_MODE_SCULPT || input->value == OB_MODE_VERTEX_PAINT ||
- input->value == OB_MODE_WEIGHT_PAINT || input->value == OB_MODE_TEXTURE_PAINT) && (ob->type == OB_MESH)) ||
- (input->value == OB_MODE_OBJECT))
+ if ((input->value == OB_MODE_EDIT && OB_TYPE_SUPPORT_EDITMODE(ob->type)) ||
+ (input->value == OB_MODE_POSE && (ob->type == OB_ARMATURE)) ||
+ (input->value == OB_MODE_PARTICLE_EDIT && ob->particlesystem.first) ||
+ ((input->value == OB_MODE_SCULPT || input->value == OB_MODE_VERTEX_PAINT ||
+ input->value == OB_MODE_WEIGHT_PAINT || input->value == OB_MODE_TEXTURE_PAINT) && (ob->type == OB_MESH)) ||
+ (input->value == OB_MODE_OBJECT))
+ {
RNA_enum_item_add(&item, &totitem, input);
- ++input;
+ }
+ input++;
}
RNA_enum_item_end(&item, &totitem);
- *free= 1;
+ *free = 1;
return item;
}
@@ -1401,24 +1475,24 @@ static int object_mode_set_compat(bContext *UNUSED(C), wmOperator *op, Object *o
if (mode == OB_MODE_OBJECT)
return 1;
- switch(ob->type) {
- case OB_MESH:
- if (mode & (OB_MODE_EDIT|OB_MODE_SCULPT|OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT|OB_MODE_PARTICLE_EDIT))
- return 1;
- return 0;
- case OB_CURVE:
- case OB_SURF:
- case OB_FONT:
- case OB_MBALL:
- if (mode & (OB_MODE_EDIT))
- return 1;
- return 0;
- case OB_LATTICE:
- if (mode & (OB_MODE_EDIT|OB_MODE_WEIGHT_PAINT))
- return 1;
- case OB_ARMATURE:
- if (mode & (OB_MODE_EDIT|OB_MODE_POSE))
- return 1;
+ switch (ob->type) {
+ case OB_MESH:
+ if (mode & (OB_MODE_EDIT | OB_MODE_SCULPT | OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT | OB_MODE_TEXTURE_PAINT | OB_MODE_PARTICLE_EDIT))
+ return 1;
+ return 0;
+ case OB_CURVE:
+ case OB_SURF:
+ case OB_FONT:
+ case OB_MBALL:
+ if (mode & (OB_MODE_EDIT))
+ return 1;
+ return 0;
+ case OB_LATTICE:
+ if (mode & (OB_MODE_EDIT | OB_MODE_WEIGHT_PAINT))
+ return 1;
+ case OB_ARMATURE:
+ if (mode & (OB_MODE_EDIT | OB_MODE_POSE))
+ return 1;
}
}
@@ -1427,7 +1501,7 @@ static int object_mode_set_compat(bContext *UNUSED(C), wmOperator *op, Object *o
static int object_mode_set_exec(bContext *C, wmOperator *op)
{
- Object *ob= CTX_data_active_object(C);
+ Object *ob = CTX_data_active_object(C);
ObjectMode mode = RNA_enum_get(op->ptr, "mode");
ObjectMode restore_mode = (ob) ? ob->mode : OB_MODE_OBJECT;
int toggle = RNA_boolean_get(op->ptr, "toggle");
@@ -1474,7 +1548,7 @@ void OBJECT_OT_mode_set(wmOperatorType *ot)
/* flags */
ot->flag = 0; /* no register/undo here, leave it to operators being called */
- prop= RNA_def_enum(ot->srna, "mode", object_mode_items, OB_MODE_OBJECT, "Mode", "");
+ prop = RNA_def_enum(ot->srna, "mode", object_mode_items, OB_MODE_OBJECT, "Mode", "");
RNA_def_enum_funcs(prop, object_mode_set_itemsf);
RNA_def_boolean(ot->srna, "toggle", 0, "Toggle", "");
@@ -1504,12 +1578,12 @@ void ED_object_toggle_modes(bContext *C, int mode)
static int game_property_new(bContext *C, wmOperator *op)
{
- Object *ob= CTX_data_active_object(C);
+ Object *ob = CTX_data_active_object(C);
bProperty *prop;
char name[MAX_NAME];
- int type= RNA_enum_get(op->ptr, "type");
+ int type = RNA_enum_get(op->ptr, "type");
- prop= new_property(type);
+ prop = new_property(type);
BLI_addtail(&ob->prop, prop);
RNA_string_get(op->ptr, "name", name);
@@ -1536,7 +1610,7 @@ void OBJECT_OT_game_property_new(wmOperatorType *ot)
ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_enum(ot->srna, "type", gameproperty_type_items, GPROP_FLOAT, "Type", "Type of game property to add");
RNA_def_string(ot->srna, "name", "", MAX_NAME, "Name", "Name of the game property to add");
@@ -1544,14 +1618,14 @@ void OBJECT_OT_game_property_new(wmOperatorType *ot)
static int game_property_remove(bContext *C, wmOperator *op)
{
- Object *ob= CTX_data_active_object(C);
+ Object *ob = CTX_data_active_object(C);
bProperty *prop;
- int index= RNA_int_get(op->ptr, "index");
+ int index = RNA_int_get(op->ptr, "index");
if (!ob)
return OPERATOR_CANCELLED;
- prop= BLI_findlink(&ob->prop, index);
+ prop = BLI_findlink(&ob->prop, index);
if (prop) {
BLI_remlink(&ob->prop, prop);
@@ -1577,16 +1651,16 @@ void OBJECT_OT_game_property_remove(wmOperatorType *ot)
ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Index", "Property index to remove ", 0, INT_MAX);
}
-#define COPY_PROPERTIES_REPLACE 1
-#define COPY_PROPERTIES_MERGE 2
-#define COPY_PROPERTIES_COPY 3
+#define COPY_PROPERTIES_REPLACE 1
+#define COPY_PROPERTIES_MERGE 2
+#define COPY_PROPERTIES_COPY 3
-static EnumPropertyItem game_properties_copy_operations[] ={
+static EnumPropertyItem game_properties_copy_operations[] = {
{COPY_PROPERTIES_REPLACE, "REPLACE", 0, "Replace Properties", ""},
{COPY_PROPERTIES_MERGE, "MERGE", 0, "Merge Properties", ""},
{COPY_PROPERTIES_COPY, "COPY", 0, "Copy a Property", ""},
@@ -1597,40 +1671,41 @@ static EnumPropertyItem gameprops_items[]= {
static EnumPropertyItem *gameprops_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
{
- Object *ob= ED_object_active_context(C);
+ Object *ob = ED_object_active_context(C);
EnumPropertyItem tmp = {0, "", 0, "", ""};
- EnumPropertyItem *item= NULL;
+ EnumPropertyItem *item = NULL;
bProperty *prop;
- int a, totitem= 0;
+ int a, totitem = 0;
if (!ob)
return gameprops_items;
- for (a=1, prop= ob->prop.first; prop; prop=prop->next, a++) {
- tmp.value= a;
- tmp.identifier= prop->name;
- tmp.name= prop->name;
+ for (a = 1, prop = ob->prop.first; prop; prop = prop->next, a++) {
+ tmp.value = a;
+ tmp.identifier = prop->name;
+ tmp.name = prop->name;
RNA_enum_item_add(&item, &totitem, &tmp);
}
RNA_enum_item_end(&item, &totitem);
- *free= 1;
+ *free = 1;
return item;
}
static int game_property_copy_exec(bContext *C, wmOperator *op)
{
- Object *ob=ED_object_active_context(C);
+ Object *ob = ED_object_active_context(C);
bProperty *prop;
int type = RNA_enum_get(op->ptr, "operation");
- int propid= RNA_enum_get(op->ptr, "property");
+ int propid = RNA_enum_get(op->ptr, "property");
if (propid > 0) { /* copy */
- prop = BLI_findlink(&ob->prop, propid-1);
+ prop = BLI_findlink(&ob->prop, propid - 1);
if (prop) {
- CTX_DATA_BEGIN(C, Object*, ob_iter, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object *, ob_iter, selected_editable_objects)
+ {
if (ob != ob_iter)
set_ob_property(ob_iter, prop);
} CTX_DATA_END;
@@ -1638,14 +1713,15 @@ static int game_property_copy_exec(bContext *C, wmOperator *op)
}
else {
- CTX_DATA_BEGIN(C, Object*, ob_iter, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object *, ob_iter, selected_editable_objects)
+ {
if (ob != ob_iter) {
if (type == COPY_PROPERTIES_REPLACE)
copy_properties(&ob_iter->prop, &ob->prop);
/* merge - the default when calling with no argument */
else
- for (prop = ob->prop.first; prop; prop= prop->next)
+ for (prop = ob->prop.first; prop; prop = prop->next)
set_ob_property(ob_iter, prop);
}
}
@@ -1661,23 +1737,25 @@ void OBJECT_OT_game_property_copy(wmOperatorType *ot)
/* identifiers */
ot->name = "Copy Game Property";
ot->idname = "OBJECT_OT_game_property_copy";
+ ot->description = "Copy/merge/replace a game property from active object to all selected objects";
/* api callbacks */
ot->exec = game_property_copy_exec;
ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_enum(ot->srna, "operation", game_properties_copy_operations, 3, "Operation", "");
- prop=RNA_def_enum(ot->srna, "property", gameprops_items, 0, "Property", "Properties to copy");
+ prop = RNA_def_enum(ot->srna, "property", gameprops_items, 0, "Property", "Properties to copy");
RNA_def_enum_funcs(prop, gameprops_itemf);
ot->prop = prop;
}
static int game_property_clear_exec(bContext *C, wmOperator *UNUSED(op))
{
- CTX_DATA_BEGIN(C, Object*, ob_iter, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object *, ob_iter, selected_editable_objects)
+ {
free_properties(&ob_iter->prop);
}
CTX_DATA_END;
@@ -1690,22 +1768,24 @@ void OBJECT_OT_game_property_clear(wmOperatorType *ot)
/* identifiers */
ot->name = "Clear Game Property";
ot->idname = "OBJECT_OT_game_property_clear";
+ ot->description = "Remove all game properties from all selected objects";
/* api callbacks */
ot->exec = game_property_clear_exec;
ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/************************ Copy Logic Bricks ***********************/
static int logicbricks_copy_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *ob=ED_object_active_context(C);
+ Object *ob = ED_object_active_context(C);
- CTX_DATA_BEGIN(C, Object*, ob_iter, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object *, ob_iter, selected_editable_objects)
+ {
if (ob != ob_iter) {
/* first: free all logic */
free_sensors(&ob_iter->sensors);
@@ -1722,16 +1802,16 @@ static int logicbricks_copy_exec(bContext *C, wmOperator *UNUSED(op))
set_sca_new_poins_ob(ob_iter);
/* some menu settings */
- ob_iter->scavisflag= ob->scavisflag;
- ob_iter->scaflag= ob->scaflag;
+ ob_iter->scavisflag = ob->scavisflag;
+ ob_iter->scaflag = ob->scaflag;
/* set the initial state */
- ob_iter->state= ob->state;
- ob_iter->init_state= ob->init_state;
+ ob_iter->state = ob->state;
+ ob_iter->init_state = ob->init_state;
- if (ob_iter->totcol==ob->totcol) {
- ob_iter->actcol= ob->actcol;
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob_iter);
+ if (ob_iter->totcol == ob->totcol) {
+ ob_iter->actcol = ob->actcol;
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob_iter);
}
}
}
@@ -1754,14 +1834,15 @@ void OBJECT_OT_logic_bricks_copy(wmOperatorType *ot)
ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int game_physics_copy_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *ob=ED_object_active_context(C);
+ Object *ob = ED_object_active_context(C);
- CTX_DATA_BEGIN(C, Object*, ob_iter, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object *, ob_iter, selected_editable_objects)
+ {
if (ob != ob_iter) {
ob_iter->gameflag = ob->gameflag;
ob_iter->gameflag2 = ob->gameflag2;
@@ -1781,7 +1862,7 @@ static int game_physics_copy_exec(bContext *C, wmOperator *UNUSED(op))
ob_iter->bsoft = copy_bulletsoftbody(ob->bsoft);
if (ob->restrictflag & OB_RESTRICT_RENDER)
ob_iter->restrictflag |= OB_RESTRICT_RENDER;
- else
+ else
ob_iter->restrictflag &= ~OB_RESTRICT_RENDER;
}
}
@@ -1802,5 +1883,5 @@ void OBJECT_OT_game_physics_copy(struct wmOperatorType *ot)
ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
diff --git a/source/blender/editors/object/object_group.c b/source/blender/editors/object/object_group.c
index 34410b87e79..b47591dddee 100644
--- a/source/blender/editors/object/object_group.c
+++ b/source/blender/editors/object/object_group.c
@@ -61,22 +61,26 @@
static int objects_add_active_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- Object *ob= OBACT;
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = OBACT;
Group *group;
- int ok = 0;
+ int ok = 0, cycle = 0;
if (!ob) return OPERATOR_CANCELLED;
/* linking to same group requires its own loop so we can avoid
* looking up the active objects groups each time */
- for (group= bmain->group.first; group; group=group->id.next) {
+ for (group = bmain->group.first; group; group = group->id.next) {
if (object_in_group(ob, group)) {
/* Assign groups to selected objects */
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
- add_to_group(group, base->object, scene, base);
+ CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases)
+ {
+ if (base->object->dup_group != group)
+ add_to_group(group, base->object, scene, base);
+ else
+ cycle = 1;
ok = 1;
}
CTX_DATA_END;
@@ -84,9 +88,11 @@ static int objects_add_active_exec(bContext *C, wmOperator *op)
}
if (!ok) BKE_report(op->reports, RPT_ERROR, "Active Object contains no groups");
+ if (cycle)
+ BKE_report(op->reports, RPT_WARNING, "Skipped some groups because of cycle detected");
DAG_scene_sort(bmain, scene);
- WM_event_add_notifier(C, NC_GROUP|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_GROUP | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
@@ -103,14 +109,14 @@ void GROUP_OT_objects_add_active(wmOperatorType *ot)
ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int objects_remove_active_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- Object *ob= OBACT;
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = OBACT;
Group *group;
int ok = 0;
@@ -119,10 +125,11 @@ static int objects_remove_active_exec(bContext *C, wmOperator *op)
/* linking to same group requires its own loop so we can avoid
* looking up the active objects groups each time */
- for (group= bmain->group.first; group; group=group->id.next) {
+ for (group = bmain->group.first; group; group = group->id.next) {
if (object_in_group(ob, group)) {
/* Assign groups to selected objects */
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases)
+ {
rem_from_group(group, base->object, scene, base);
ok = 1;
}
@@ -133,7 +140,7 @@ static int objects_remove_active_exec(bContext *C, wmOperator *op)
if (!ok) BKE_report(op->reports, RPT_ERROR, "Active Object contains no groups");
DAG_scene_sort(bmain, scene);
- WM_event_add_notifier(C, NC_GROUP|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_GROUP | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
@@ -150,16 +157,17 @@ void GROUP_OT_objects_remove_active(wmOperatorType *ot)
ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int group_objects_remove_exec(bContext *C, wmOperator *UNUSED(op))
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- Group *group= NULL;
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ Group *group = NULL;
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases)
+ {
group = NULL;
while ((group = find_group(base->object, group)))
rem_from_group(group, base->object, scene, base);
@@ -167,7 +175,7 @@ static int group_objects_remove_exec(bContext *C, wmOperator *UNUSED(op))
CTX_DATA_END;
DAG_scene_sort(bmain, scene);
- WM_event_add_notifier(C, NC_GROUP|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_GROUP | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
@@ -184,27 +192,28 @@ void GROUP_OT_objects_remove(wmOperatorType *ot)
ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int group_create_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- Group *group= NULL;
- char name[MAX_ID_NAME-2]; /* id name */
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ Group *group = NULL;
+ char name[MAX_ID_NAME - 2]; /* id name */
RNA_string_get(op->ptr, "name", name);
- group= add_group(name);
+ group = add_group(name);
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases)
+ {
add_to_group(group, base->object, scene, base);
}
CTX_DATA_END;
DAG_scene_sort(bmain, scene);
- WM_event_add_notifier(C, NC_GROUP|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_GROUP | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
@@ -221,26 +230,26 @@ void GROUP_OT_create(wmOperatorType *ot)
ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
- RNA_def_string(ot->srna, "name", "Group", MAX_ID_NAME-2, "Name", "Name of the new group");
+ RNA_def_string(ot->srna, "name", "Group", MAX_ID_NAME - 2, "Name", "Name of the new group");
}
/****************** properties window operators *********************/
static int group_add_exec(bContext *C, wmOperator *UNUSED(op))
{
- Scene *scene= CTX_data_scene(C);
- Object *ob= ED_object_context(C);
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = ED_object_context(C);
Group *group;
if (ob == NULL)
return OPERATOR_CANCELLED;
- group= add_group("Group");
+ group = add_group("Group");
add_to_group(group, ob, scene, NULL);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
return OPERATOR_FINISHED;
}
@@ -256,21 +265,21 @@ void OBJECT_OT_group_add(wmOperatorType *ot)
ot->exec = group_add_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int group_link_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
- Object *ob= ED_object_context(C);
- Group *group= BLI_findlink(&CTX_data_main(C)->group, RNA_enum_get(op->ptr, "group"));
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = ED_object_context(C);
+ Group *group = BLI_findlink(&CTX_data_main(C)->group, RNA_enum_get(op->ptr, "group"));
if (ELEM(NULL, ob, group))
return OPERATOR_CANCELLED;
add_to_group(group, ob, scene, NULL);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
return OPERATOR_FINISHED;
}
@@ -289,26 +298,26 @@ void OBJECT_OT_group_link(wmOperatorType *ot)
ot->invoke = WM_enum_search_invoke;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
- prop= RNA_def_enum(ot->srna, "group", DummyRNA_NULL_items, 0, "Group", "");
+ prop = RNA_def_enum(ot->srna, "group", DummyRNA_NULL_items, 0, "Group", "");
RNA_def_enum_funcs(prop, RNA_group_local_itemf);
ot->prop = prop;
}
static int group_remove_exec(bContext *C, wmOperator *UNUSED(op))
{
- Scene *scene= CTX_data_scene(C);
- Object *ob= ED_object_context(C);
- Group *group= CTX_data_pointer_get_type(C, "group", &RNA_Group).data;
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = ED_object_context(C);
+ Group *group = CTX_data_pointer_get_type(C, "group", &RNA_Group).data;
if (!ob || !group)
return OPERATOR_CANCELLED;
rem_from_group(group, ob, scene, NULL); /* base will be used if found */
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
return OPERATOR_FINISHED;
}
@@ -318,11 +327,12 @@ void OBJECT_OT_group_remove(wmOperatorType *ot)
/* identifiers */
ot->name = "Remove Group";
ot->idname = "OBJECT_OT_group_remove";
+ ot->description = "Remove the active object from this group";
/* api callbacks */
ot->exec = group_remove_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c
index ef428b5b1b7..e9341d90e86 100644
--- a/source/blender/editors/object/object_hook.c
+++ b/source/blender/editors/object/object_hook.c
@@ -76,27 +76,27 @@ static int return_editmesh_indexar(BMEditMesh *em, int *tot, int **indexar, floa
{
BMVert *eve;
BMIter iter;
- int *index, nr, totvert=0;
+ int *index, nr, totvert = 0;
BM_ITER_MESH (eve, &iter, em->bm, BM_VERTS_OF_MESH) {
if (BM_elem_flag_test(eve, BM_ELEM_SELECT)) totvert++;
}
- if (totvert==0) return 0;
+ if (totvert == 0) return 0;
- *indexar= index= MEM_mallocN(4*totvert, "hook indexar");
- *tot= totvert;
- nr= 0;
+ *indexar = index = MEM_mallocN(4 * totvert, "hook indexar");
+ *tot = totvert;
+ nr = 0;
zero_v3(cent);
BM_ITER_MESH (eve, &iter, em->bm, BM_VERTS_OF_MESH) {
if (BM_elem_flag_test(eve, BM_ELEM_SELECT)) {
- *index= nr; index++;
+ *index = nr; index++;
add_v3_v3(cent, eve->co);
}
nr++;
}
- mul_v3_fl(cent, 1.0f/(float)totvert);
+ mul_v3_fl(cent, 1.0f / (float)totvert);
return totvert;
}
@@ -106,8 +106,8 @@ static int return_editmesh_vgroup(Object *obedit, BMEditMesh *em, char *name, fl
zero_v3(cent);
if (obedit->actdef) {
- const int defgrp_index= obedit->actdef-1;
- int totvert=0;
+ const int defgrp_index = obedit->actdef - 1;
+ int totvert = 0;
MDeformVert *dvert;
BMVert *eve;
@@ -115,7 +115,7 @@ static int return_editmesh_vgroup(Object *obedit, BMEditMesh *em, char *name, fl
/* find the vertices */
BM_ITER_MESH (eve, &iter, em->bm, BM_VERTS_OF_MESH) {
- dvert= CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT);
+ dvert = CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT);
if (dvert) {
if (defvert_find_weight(dvert, defgrp_index) > 0.0f) {
@@ -127,7 +127,7 @@ static int return_editmesh_vgroup(Object *obedit, BMEditMesh *em, char *name, fl
if (totvert) {
bDeformGroup *dg = BLI_findlink(&obedit->defbase, defgrp_index);
BLI_strncpy(name, dg->name, sizeof(dg->name));
- mul_v3_fl(cent, 1.0f/(float)totvert);
+ mul_v3_fl(cent, 1.0f / (float)totvert);
return 1;
}
}
@@ -137,19 +137,19 @@ static int return_editmesh_vgroup(Object *obedit, BMEditMesh *em, char *name, fl
static void select_editbmesh_hook(Object *ob, HookModifierData *hmd)
{
- Mesh *me= ob->data;
- BMEditMesh *em= me->edit_btmesh;
+ Mesh *me = ob->data;
+ BMEditMesh *em = me->edit_btmesh;
BMVert *eve;
BMIter iter;
- int index=0, nr=0;
+ int index = 0, nr = 0;
if (hmd->indexar == NULL)
return;
BM_ITER_MESH (eve, &iter, em->bm, BM_VERTS_OF_MESH) {
- if (nr==hmd->indexar[index]) {
+ if (nr == hmd->indexar[index]) {
BM_vert_select_set(em->bm, eve, TRUE);
- if (index < hmd->totindex-1) index++;
+ if (index < hmd->totindex - 1) index++;
}
nr++;
@@ -161,31 +161,31 @@ static void select_editbmesh_hook(Object *ob, HookModifierData *hmd)
static int return_editlattice_indexar(Lattice *editlatt, int *tot, int **indexar, float *cent)
{
BPoint *bp;
- int *index, nr, totvert=0, a;
+ int *index, nr, totvert = 0, a;
/* count */
- a= editlatt->pntsu*editlatt->pntsv*editlatt->pntsw;
- bp= editlatt->def;
+ a = editlatt->pntsu * editlatt->pntsv * editlatt->pntsw;
+ bp = editlatt->def;
while (a--) {
if (bp->f1 & SELECT) {
- if (bp->hide==0) totvert++;
+ if (bp->hide == 0) totvert++;
}
bp++;
}
- if (totvert==0) return 0;
+ if (totvert == 0) return 0;
- *indexar= index= MEM_mallocN(4*totvert, "hook indexar");
- *tot= totvert;
- nr= 0;
+ *indexar = index = MEM_mallocN(4 * totvert, "hook indexar");
+ *tot = totvert;
+ nr = 0;
zero_v3(cent);
- a= editlatt->pntsu*editlatt->pntsv*editlatt->pntsw;
- bp= editlatt->def;
+ a = editlatt->pntsu * editlatt->pntsv * editlatt->pntsw;
+ bp = editlatt->def;
while (a--) {
if (bp->f1 & SELECT) {
- if (bp->hide==0) {
- *index= nr; index++;
+ if (bp->hide == 0) {
+ *index = nr; index++;
add_v3_v3(cent, bp->vec);
}
}
@@ -193,25 +193,25 @@ static int return_editlattice_indexar(Lattice *editlatt, int *tot, int **indexar
nr++;
}
- mul_v3_fl(cent, 1.0f/(float)totvert);
+ mul_v3_fl(cent, 1.0f / (float)totvert);
return totvert;
}
static void select_editlattice_hook(Object *obedit, HookModifierData *hmd)
{
- Lattice *lt= obedit->data, *editlt;
+ Lattice *lt = obedit->data, *editlt;
BPoint *bp;
- int index=0, nr=0, a;
+ int index = 0, nr = 0, a;
- editlt= lt->editlatt->latt;
+ editlt = lt->editlatt->latt;
/* count */
- a= editlt->pntsu*editlt->pntsv*editlt->pntsw;
- bp= editlt->def;
+ a = editlt->pntsu * editlt->pntsv * editlt->pntsw;
+ bp = editlt->def;
while (a--) {
- if (hmd->indexar[index]==nr) {
+ if (hmd->indexar[index] == nr) {
bp->f1 |= SELECT;
- if (index < hmd->totindex-1) index++;
+ if (index < hmd->totindex - 1) index++;
}
nr++;
bp++;
@@ -220,16 +220,16 @@ static void select_editlattice_hook(Object *obedit, HookModifierData *hmd)
static int return_editcurve_indexar(Object *obedit, int *tot, int **indexar, float *cent)
{
- ListBase *editnurb= object_editcurve_get(obedit);
+ ListBase *editnurb = object_editcurve_get(obedit);
Nurb *nu;
BPoint *bp;
BezTriple *bezt;
- int *index, a, nr, totvert=0;
+ int *index, a, nr, totvert = 0;
- for (nu= editnurb->first; nu; nu= nu->next) {
+ for (nu = editnurb->first; nu; nu = nu->next) {
if (nu->type == CU_BEZIER) {
- bezt= nu->bezt;
- a= nu->pntsu;
+ bezt = nu->bezt;
+ a = nu->pntsu;
while (a--) {
if (bezt->f1 & SELECT) totvert++;
if (bezt->f2 & SELECT) totvert++;
@@ -238,38 +238,38 @@ static int return_editcurve_indexar(Object *obedit, int *tot, int **indexar, flo
}
}
else {
- bp= nu->bp;
- a= nu->pntsu*nu->pntsv;
+ bp = nu->bp;
+ a = nu->pntsu * nu->pntsv;
while (a--) {
if (bp->f1 & SELECT) totvert++;
bp++;
}
}
}
- if (totvert==0) return 0;
+ if (totvert == 0) return 0;
- *indexar= index= MEM_mallocN(4*totvert, "hook indexar");
- *tot= totvert;
- nr= 0;
+ *indexar = index = MEM_mallocN(4 * totvert, "hook indexar");
+ *tot = totvert;
+ nr = 0;
zero_v3(cent);
- for (nu= editnurb->first; nu; nu= nu->next) {
+ for (nu = editnurb->first; nu; nu = nu->next) {
if (nu->type == CU_BEZIER) {
- bezt= nu->bezt;
- a= nu->pntsu;
+ bezt = nu->bezt;
+ a = nu->pntsu;
while (a--) {
if (bezt->f1 & SELECT) {
- *index= nr; index++;
+ *index = nr; index++;
add_v3_v3(cent, bezt->vec[0]);
}
nr++;
if (bezt->f2 & SELECT) {
- *index= nr; index++;
+ *index = nr; index++;
add_v3_v3(cent, bezt->vec[1]);
}
nr++;
if (bezt->f3 & SELECT) {
- *index= nr; index++;
+ *index = nr; index++;
add_v3_v3(cent, bezt->vec[2]);
}
nr++;
@@ -277,11 +277,11 @@ static int return_editcurve_indexar(Object *obedit, int *tot, int **indexar, flo
}
}
else {
- bp= nu->bp;
- a= nu->pntsu*nu->pntsv;
+ bp = nu->bp;
+ a = nu->pntsu * nu->pntsv;
while (a--) {
if (bp->f1 & SELECT) {
- *index= nr; index++;
+ *index = nr; index++;
add_v3_v3(cent, bp->vec);
}
nr++;
@@ -290,21 +290,21 @@ static int return_editcurve_indexar(Object *obedit, int *tot, int **indexar, flo
}
}
- mul_v3_fl(cent, 1.0f/(float)totvert);
+ mul_v3_fl(cent, 1.0f / (float)totvert);
return totvert;
}
static int object_hook_index_array(Scene *scene, Object *obedit, int *tot, int **indexar, char *name, float *cent_r)
{
- *indexar= NULL;
- *tot= 0;
- name[0]= 0;
+ *indexar = NULL;
+ *tot = 0;
+ name[0] = 0;
- switch(obedit->type) {
+ switch (obedit->type) {
case OB_MESH:
{
- Mesh *me= obedit->data;
+ Mesh *me = obedit->data;
BMEditMesh *em;
@@ -313,8 +313,11 @@ static int object_hook_index_array(Scene *scene, Object *obedit, int *tot, int *
em = me->edit_btmesh;
+ EDBM_mesh_normals_update(em);
+ BMEdit_RecalcTessellation(em);
+
/* check selected vertices first */
- if ( return_editmesh_indexar(em, tot, indexar, cent_r)) {
+ if (return_editmesh_indexar(em, tot, indexar, cent_r)) {
return 1;
}
else {
@@ -327,7 +330,7 @@ static int object_hook_index_array(Scene *scene, Object *obedit, int *tot, int *
return return_editcurve_indexar(obedit, tot, indexar, cent_r);
case OB_LATTICE:
{
- Lattice *lt= obedit->data;
+ Lattice *lt = obedit->data;
return return_editlattice_indexar(lt->editlatt->latt, tot, indexar, cent_r);
}
default:
@@ -337,30 +340,30 @@ static int object_hook_index_array(Scene *scene, Object *obedit, int *tot, int *
static void select_editcurve_hook(Object *obedit, HookModifierData *hmd)
{
- ListBase *editnurb= object_editcurve_get(obedit);
+ ListBase *editnurb = object_editcurve_get(obedit);
Nurb *nu;
BPoint *bp;
BezTriple *bezt;
- int index=0, a, nr=0;
+ int index = 0, a, nr = 0;
- for (nu= editnurb->first; nu; nu= nu->next) {
+ for (nu = editnurb->first; nu; nu = nu->next) {
if (nu->type == CU_BEZIER) {
- bezt= nu->bezt;
- a= nu->pntsu;
+ bezt = nu->bezt;
+ a = nu->pntsu;
while (a--) {
if (nr == hmd->indexar[index]) {
bezt->f1 |= SELECT;
- if (index<hmd->totindex-1) index++;
+ if (index < hmd->totindex - 1) index++;
}
nr++;
if (nr == hmd->indexar[index]) {
bezt->f2 |= SELECT;
- if (index<hmd->totindex-1) index++;
+ if (index < hmd->totindex - 1) index++;
}
nr++;
if (nr == hmd->indexar[index]) {
bezt->f3 |= SELECT;
- if (index<hmd->totindex-1) index++;
+ if (index < hmd->totindex - 1) index++;
}
nr++;
@@ -368,12 +371,12 @@ static void select_editcurve_hook(Object *obedit, HookModifierData *hmd)
}
}
else {
- bp= nu->bp;
- a= nu->pntsu*nu->pntsv;
+ bp = nu->bp;
+ a = nu->pntsu * nu->pntsv;
while (a--) {
if (nr == hmd->indexar[index]) {
bp->f1 |= SELECT;
- if (index<hmd->totindex-1) index++;
+ if (index < hmd->totindex - 1) index++;
}
nr++;
bp++;
@@ -387,17 +390,17 @@ static void object_hook_select(Object *ob, HookModifierData *hmd)
if (hmd->indexar == NULL)
return;
- if (ob->type==OB_MESH) select_editbmesh_hook(ob, hmd);
- else if (ob->type==OB_LATTICE) select_editlattice_hook(ob, hmd);
- else if (ob->type==OB_CURVE) select_editcurve_hook(ob, hmd);
- else if (ob->type==OB_SURF) select_editcurve_hook(ob, hmd);
+ if (ob->type == OB_MESH) select_editbmesh_hook(ob, hmd);
+ else if (ob->type == OB_LATTICE) select_editlattice_hook(ob, hmd);
+ else if (ob->type == OB_CURVE) select_editcurve_hook(ob, hmd);
+ else if (ob->type == OB_SURF) select_editcurve_hook(ob, hmd);
}
/* special poll operators for hook operators */
// TODO: check for properties window modifier context too as alternative?
static int hook_op_edit_poll(bContext *C)
{
- Object *obedit= CTX_data_edit_object(C);
+ Object *obedit = CTX_data_edit_object(C);
if (obedit) {
if (ED_operator_editmesh(C)) return 1;
@@ -414,13 +417,13 @@ static Object *add_hook_object_new(Scene *scene, Object *obedit)
Base *base, *basedit;
Object *ob;
- ob= add_object(scene, OB_EMPTY);
+ ob = BKE_object_add(scene, OB_EMPTY);
- basedit = object_in_scene(obedit, scene);
- base = object_in_scene(ob, scene);
+ basedit = BKE_scene_base_find(scene, obedit);
+ base = BKE_scene_base_find(scene, ob);
base->lay = ob->lay = obedit->lay;
- /* icky, add_object sets new base as active.
+ /* icky, BKE_object_add sets new base as active.
* so set it back to the original edit object */
scene->basact = basedit;
@@ -429,7 +432,7 @@ static Object *add_hook_object_new(Scene *scene, Object *obedit)
static void add_hook_object(Main *bmain, Scene *scene, Object *obedit, Object *ob, int mode)
{
- ModifierData *md=NULL;
+ ModifierData *md = NULL;
HookModifierData *hmd = NULL;
float cent[3];
int tot, ok, *indexar;
@@ -437,9 +440,9 @@ static void add_hook_object(Main *bmain, Scene *scene, Object *obedit, Object *o
ok = object_hook_index_array(scene, obedit, &tot, &indexar, name, cent);
- if (!ok) return; // XXX error("Requires selected vertices or active Vertex Group");
+ if (!ok) return; // XXX error("Requires selected vertices or active Vertex Group");
- if (mode==OBJECT_ADDHOOK_NEWOB && !ob) {
+ if (mode == OBJECT_ADDHOOK_NEWOB && !ob) {
ob = add_hook_object_new(scene, obedit);
@@ -448,25 +451,25 @@ static void add_hook_object(Main *bmain, Scene *scene, Object *obedit, Object *o
}
md = obedit->modifiers.first;
- while (md && modifierType_getInfo(md->type)->type==eModifierTypeType_OnlyDeform) {
+ while (md && modifierType_getInfo(md->type)->type == eModifierTypeType_OnlyDeform) {
md = md->next;
}
- hmd = (HookModifierData*) modifier_new(eModifierType_Hook);
+ hmd = (HookModifierData *) modifier_new(eModifierType_Hook);
BLI_insertlinkbefore(&obedit->modifiers, md, hmd);
- BLI_snprintf(hmd->modifier.name, sizeof(hmd->modifier.name), "Hook-%s", ob->id.name+2);
- modifier_unique_name(&obedit->modifiers, (ModifierData*)hmd);
+ BLI_snprintf(hmd->modifier.name, sizeof(hmd->modifier.name), "Hook-%s", ob->id.name + 2);
+ modifier_unique_name(&obedit->modifiers, (ModifierData *)hmd);
- hmd->object= ob;
- hmd->indexar= indexar;
+ hmd->object = ob;
+ hmd->indexar = indexar;
copy_v3_v3(hmd->cent, cent);
- hmd->totindex= tot;
+ hmd->totindex = tot;
BLI_strncpy(hmd->name, name, sizeof(hmd->name));
/* matrix calculus */
/* vert x (obmat x hook->imat) x hook->obmat x ob->imat */
/* (parentinv ) */
- where_is_object(scene, ob);
+ BKE_object_where_is_calc(scene, ob);
invert_m4_m4(ob->imat, ob->obmat);
/* apparently this call goes from right to left... */
@@ -478,12 +481,12 @@ static void add_hook_object(Main *bmain, Scene *scene, Object *obedit, Object *o
static int object_add_hook_selob_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
Object *obedit = CTX_data_edit_object(C);
- Object *obsel=NULL;
+ Object *obsel = NULL;
- CTX_DATA_BEGIN(C, Object*, ob, selected_objects)
+ CTX_DATA_BEGIN (C, Object *, ob, selected_objects)
{
if (ob != obedit) {
obsel = ob;
@@ -499,7 +502,7 @@ static int object_add_hook_selob_exec(bContext *C, wmOperator *op)
add_hook_object(bmain, scene, obedit, obsel, OBJECT_ADDHOOK_SELOB);
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, obedit);
+ WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, obedit);
return OPERATOR_FINISHED;
}
@@ -515,19 +518,19 @@ void OBJECT_OT_hook_add_selobj(wmOperatorType *ot)
ot->poll = hook_op_edit_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int object_add_hook_newob_exec(bContext *C, wmOperator *UNUSED(op))
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
Object *obedit = CTX_data_edit_object(C);
add_hook_object(bmain, scene, obedit, NULL, OBJECT_ADDHOOK_NEWOB);
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene);
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, obedit);
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
+ WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, obedit);
return OPERATOR_FINISHED;
}
@@ -543,14 +546,14 @@ void OBJECT_OT_hook_add_newobj(wmOperatorType *ot)
ot->poll = hook_op_edit_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int object_hook_remove_exec(bContext *C, wmOperator *op)
{
- int num= RNA_enum_get(op->ptr, "modifier");
- Object *ob=NULL;
- HookModifierData *hmd=NULL;
+ int num = RNA_enum_get(op->ptr, "modifier");
+ Object *ob = NULL;
+ HookModifierData *hmd = NULL;
ob = CTX_data_edit_object(C);
hmd = (HookModifierData *)BLI_findlink(&ob->modifiers, num);
@@ -566,7 +569,7 @@ static int object_hook_remove_exec(bContext *C, wmOperator *op)
modifier_free((ModifierData *)hmd);
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);
return OPERATOR_FINISHED;
}
@@ -575,25 +578,25 @@ static EnumPropertyItem *hook_mod_itemf(bContext *C, PointerRNA *UNUSED(ptr), Pr
{
Object *ob = CTX_data_edit_object(C);
EnumPropertyItem tmp = {0, "", 0, "", ""};
- EnumPropertyItem *item= NULL;
+ EnumPropertyItem *item = NULL;
ModifierData *md = NULL;
- int a, totitem= 0;
+ int a, totitem = 0;
if (!ob)
return DummyRNA_NULL_items;
- for (a=0, md=ob->modifiers.first; md; md= md->next, a++) {
- if (md->type==eModifierType_Hook) {
- tmp.value= a;
+ for (a = 0, md = ob->modifiers.first; md; md = md->next, a++) {
+ if (md->type == eModifierType_Hook) {
+ tmp.value = a;
tmp.icon = ICON_HOOK;
- tmp.identifier= md->name;
- tmp.name= md->name;
+ tmp.identifier = md->name;
+ tmp.name = md->name;
RNA_enum_item_add(&item, &totitem, &tmp);
}
}
RNA_enum_item_end(&item, &totitem);
- *free= 1;
+ *free = 1;
return item;
}
@@ -615,26 +618,26 @@ void OBJECT_OT_hook_remove(wmOperatorType *ot)
/* flags */
/* this operator removes modifier which isn't stored in local undo stack,
* so redoing it from redo panel gives totally weird results */
- ot->flag = /*OPTYPE_REGISTER|*/OPTYPE_UNDO;
+ ot->flag = /*OPTYPE_REGISTER|*/ OPTYPE_UNDO;
/* properties */
- prop= RNA_def_enum(ot->srna, "modifier", DummyRNA_NULL_items, 0, "Modifier", "Modifier number to remove");
+ prop = RNA_def_enum(ot->srna, "modifier", DummyRNA_NULL_items, 0, "Modifier", "Modifier number to remove");
RNA_def_enum_funcs(prop, hook_mod_itemf);
ot->prop = prop;
}
static int object_hook_reset_exec(bContext *C, wmOperator *op)
{
- PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_HookModifier);
- int num= RNA_enum_get(op->ptr, "modifier");
- Object *ob=NULL;
- HookModifierData *hmd=NULL;
+ PointerRNA ptr = CTX_data_pointer_get_type(C, "modifier", &RNA_HookModifier);
+ int num = RNA_enum_get(op->ptr, "modifier");
+ Object *ob = NULL;
+ HookModifierData *hmd = NULL;
- if (ptr.data) { /* if modifier context is available, use that */
+ if (ptr.data) { /* if modifier context is available, use that */
ob = ptr.id.data;
- hmd= ptr.data;
+ hmd = ptr.data;
}
- else { /* use the provided property */
+ else { /* use the provided property */
ob = CTX_data_edit_object(C);
hmd = (HookModifierData *)BLI_findlink(&ob->modifiers, num);
}
@@ -645,7 +648,7 @@ static int object_hook_reset_exec(bContext *C, wmOperator *op)
/* reset functionality */
if (hmd->object) {
- bPoseChannel *pchan= get_pose_channel(hmd->object->pose, hmd->subtarget);
+ bPoseChannel *pchan = BKE_pose_channel_find_name(hmd->object->pose, hmd->subtarget);
if (hmd->subtarget[0] && pchan) {
float imat[4][4], mat[4][4];
@@ -663,7 +666,7 @@ static int object_hook_reset_exec(bContext *C, wmOperator *op)
}
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);
return OPERATOR_FINISHED;
}
@@ -682,27 +685,27 @@ void OBJECT_OT_hook_reset(wmOperatorType *ot)
ot->poll = hook_op_edit_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
- prop= RNA_def_enum(ot->srna, "modifier", DummyRNA_NULL_items, 0, "Modifier", "Modifier number to assign to");
+ prop = RNA_def_enum(ot->srna, "modifier", DummyRNA_NULL_items, 0, "Modifier", "Modifier number to assign to");
RNA_def_enum_funcs(prop, hook_mod_itemf);
}
static int object_hook_recenter_exec(bContext *C, wmOperator *op)
{
- PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_HookModifier);
- int num= RNA_enum_get(op->ptr, "modifier");
- Object *ob=NULL;
- HookModifierData *hmd=NULL;
+ PointerRNA ptr = CTX_data_pointer_get_type(C, "modifier", &RNA_HookModifier);
+ int num = RNA_enum_get(op->ptr, "modifier");
+ Object *ob = NULL;
+ HookModifierData *hmd = NULL;
Scene *scene = CTX_data_scene(C);
float bmat[3][3], imat[3][3];
- if (ptr.data) { /* if modifier context is available, use that */
+ if (ptr.data) { /* if modifier context is available, use that */
ob = ptr.id.data;
- hmd= ptr.data;
+ hmd = ptr.data;
}
- else { /* use the provided property */
+ else { /* use the provided property */
ob = CTX_data_edit_object(C);
hmd = (HookModifierData *)BLI_findlink(&ob->modifiers, num);
}
@@ -719,7 +722,7 @@ static int object_hook_recenter_exec(bContext *C, wmOperator *op)
mul_m3_v3(imat, hmd->cent);
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);
return OPERATOR_FINISHED;
}
@@ -738,29 +741,29 @@ void OBJECT_OT_hook_recenter(wmOperatorType *ot)
ot->poll = hook_op_edit_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
- prop= RNA_def_enum(ot->srna, "modifier", DummyRNA_NULL_items, 0, "Modifier", "Modifier number to assign to");
+ prop = RNA_def_enum(ot->srna, "modifier", DummyRNA_NULL_items, 0, "Modifier", "Modifier number to assign to");
RNA_def_enum_funcs(prop, hook_mod_itemf);
}
static int object_hook_assign_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
- PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_HookModifier);
- int num= RNA_enum_get(op->ptr, "modifier");
- Object *ob=NULL;
- HookModifierData *hmd=NULL;
+ Scene *scene = CTX_data_scene(C);
+ PointerRNA ptr = CTX_data_pointer_get_type(C, "modifier", &RNA_HookModifier);
+ int num = RNA_enum_get(op->ptr, "modifier");
+ Object *ob = NULL;
+ HookModifierData *hmd = NULL;
float cent[3];
char name[MAX_NAME];
int *indexar, tot;
- if (ptr.data) { /* if modifier context is available, use that */
+ if (ptr.data) { /* if modifier context is available, use that */
ob = ptr.id.data;
- hmd= ptr.data;
+ hmd = ptr.data;
}
- else { /* use the provided property */
+ else { /* use the provided property */
ob = CTX_data_edit_object(C);
hmd = (HookModifierData *)BLI_findlink(&ob->modifiers, num);
}
@@ -779,11 +782,11 @@ static int object_hook_assign_exec(bContext *C, wmOperator *op)
MEM_freeN(hmd->indexar);
copy_v3_v3(hmd->cent, cent);
- hmd->indexar= indexar;
- hmd->totindex= tot;
+ hmd->indexar = indexar;
+ hmd->totindex = tot;
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);
return OPERATOR_FINISHED;
}
@@ -804,25 +807,25 @@ void OBJECT_OT_hook_assign(wmOperatorType *ot)
/* flags */
/* this operator changes data stored in modifier which doesn't get pushed to undo stack,
* so redoing it from redo panel gives totally weird results */
- ot->flag = /*OPTYPE_REGISTER|*/OPTYPE_UNDO;
+ ot->flag = /*OPTYPE_REGISTER|*/ OPTYPE_UNDO;
/* properties */
- prop= RNA_def_enum(ot->srna, "modifier", DummyRNA_NULL_items, 0, "Modifier", "Modifier number to assign to");
+ prop = RNA_def_enum(ot->srna, "modifier", DummyRNA_NULL_items, 0, "Modifier", "Modifier number to assign to");
RNA_def_enum_funcs(prop, hook_mod_itemf);
}
static int object_hook_select_exec(bContext *C, wmOperator *op)
{
- PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_HookModifier);
- int num= RNA_enum_get(op->ptr, "modifier");
- Object *ob=NULL;
- HookModifierData *hmd=NULL;
+ PointerRNA ptr = CTX_data_pointer_get_type(C, "modifier", &RNA_HookModifier);
+ int num = RNA_enum_get(op->ptr, "modifier");
+ Object *ob = NULL;
+ HookModifierData *hmd = NULL;
- if (ptr.data) { /* if modifier context is available, use that */
+ if (ptr.data) { /* if modifier context is available, use that */
ob = ptr.id.data;
- hmd= ptr.data;
+ hmd = ptr.data;
}
- else { /* use the provided property */
+ else { /* use the provided property */
ob = CTX_data_edit_object(C);
hmd = (HookModifierData *)BLI_findlink(&ob->modifiers, num);
}
@@ -834,7 +837,7 @@ static int object_hook_select_exec(bContext *C, wmOperator *op)
/* select functionality */
object_hook_select(ob, hmd);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, ob->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob->data);
return OPERATOR_FINISHED;
}
@@ -853,10 +856,10 @@ void OBJECT_OT_hook_select(wmOperatorType *ot)
ot->poll = hook_op_edit_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
- prop= RNA_def_enum(ot->srna, "modifier", DummyRNA_NULL_items, 0, "Modifier", "Modifier number to remove");
+ prop = RNA_def_enum(ot->srna, "modifier", DummyRNA_NULL_items, 0, "Modifier", "Modifier number to remove");
RNA_def_enum_funcs(prop, hook_mod_itemf);
}
diff --git a/source/blender/editors/object/object_intern.h b/source/blender/editors/object/object_intern.h
index 8ba64e66025..e29ab687fff 100644
--- a/source/blender/editors/object/object_intern.h
+++ b/source/blender/editors/object/object_intern.h
@@ -84,6 +84,7 @@ void OBJECT_OT_proxy_make(struct wmOperatorType *ot);
void OBJECT_OT_shade_smooth(struct wmOperatorType *ot);
void OBJECT_OT_shade_flat(struct wmOperatorType *ot);
void OBJECT_OT_paths_calculate(struct wmOperatorType *ot);
+void OBJECT_OT_paths_update(struct wmOperatorType *ot);
void OBJECT_OT_paths_clear(struct wmOperatorType *ot);
void OBJECT_OT_forcefield_toggle(struct wmOperatorType *ot);
@@ -185,7 +186,7 @@ void CONSTRAINT_OT_limitdistance_reset(struct wmOperatorType *ot);
void CONSTRAINT_OT_childof_set_inverse(struct wmOperatorType *ot);
void CONSTRAINT_OT_childof_clear_inverse(struct wmOperatorType *ot);
void CONSTRAINT_OT_objectsolver_set_inverse(struct wmOperatorType *ot);
-void CONSTRAINT_OT_objectsolver_clear_inverse (struct wmOperatorType *ot);
+void CONSTRAINT_OT_objectsolver_clear_inverse(struct wmOperatorType *ot);
/* object_vgroup.c */
void OBJECT_OT_vertex_group_add(struct wmOperatorType *ot);
diff --git a/source/blender/editors/object/object_lattice.c b/source/blender/editors/object/object_lattice.c
index 4ba62541c60..7b37ca8ab95 100644
--- a/source/blender/editors/object/object_lattice.c
+++ b/source/blender/editors/object/object_lattice.c
@@ -68,45 +68,45 @@
void free_editLatt(Object *ob)
{
- Lattice *lt= ob->data;
+ Lattice *lt = ob->data;
if (lt->editlatt) {
- Lattice *editlt= lt->editlatt->latt;
+ Lattice *editlt = lt->editlatt->latt;
if (editlt->def)
MEM_freeN(editlt->def);
if (editlt->dvert)
- free_dverts(editlt->dvert, editlt->pntsu*editlt->pntsv*editlt->pntsw);
+ free_dverts(editlt->dvert, editlt->pntsu * editlt->pntsv * editlt->pntsw);
MEM_freeN(editlt);
MEM_freeN(lt->editlatt);
- lt->editlatt= NULL;
+ lt->editlatt = NULL;
}
}
void make_editLatt(Object *obedit)
{
- Lattice *lt= obedit->data;
+ Lattice *lt = obedit->data;
KeyBlock *actkey;
free_editLatt(obedit);
- actkey= ob_get_keyblock(obedit);
+ actkey = ob_get_keyblock(obedit);
if (actkey)
key_to_latt(actkey, lt);
- lt->editlatt= MEM_callocN(sizeof(EditLatt), "editlatt");
- lt->editlatt->latt= MEM_dupallocN(lt);
- lt->editlatt->latt->def= MEM_dupallocN(lt->def);
+ lt->editlatt = MEM_callocN(sizeof(EditLatt), "editlatt");
+ lt->editlatt->latt = MEM_dupallocN(lt);
+ lt->editlatt->latt->def = MEM_dupallocN(lt->def);
if (lt->dvert) {
- int tot= lt->pntsu*lt->pntsv*lt->pntsw;
- lt->editlatt->latt->dvert = MEM_mallocN (sizeof (MDeformVert)*tot, "Lattice MDeformVert");
+ int tot = lt->pntsu * lt->pntsv * lt->pntsw;
+ lt->editlatt->latt->dvert = MEM_mallocN(sizeof (MDeformVert) * tot, "Lattice MDeformVert");
copy_dverts(lt->editlatt->latt->dvert, lt->dvert, tot);
}
- if (lt->key) lt->editlatt->shapenr= obedit->shapenr;
+ if (lt->key) lt->editlatt->shapenr = obedit->shapenr;
}
void load_editLatt(Object *obedit)
@@ -117,52 +117,52 @@ void load_editLatt(Object *obedit)
float *fp;
int tot;
- lt= obedit->data;
- editlt= lt->editlatt->latt;
+ lt = obedit->data;
+ editlt = lt->editlatt->latt;
if (lt->editlatt->shapenr) {
- actkey= BLI_findlink(&lt->key->block, lt->editlatt->shapenr-1);
+ actkey = BLI_findlink(&lt->key->block, lt->editlatt->shapenr - 1);
/* active key: vertices */
- tot= editlt->pntsu*editlt->pntsv*editlt->pntsw;
+ tot = editlt->pntsu * editlt->pntsv * editlt->pntsw;
if (actkey->data) MEM_freeN(actkey->data);
- fp=actkey->data= MEM_callocN(lt->key->elemsize*tot, "actkey->data");
- actkey->totelem= tot;
+ fp = actkey->data = MEM_callocN(lt->key->elemsize * tot, "actkey->data");
+ actkey->totelem = tot;
- bp= editlt->def;
+ bp = editlt->def;
while (tot--) {
copy_v3_v3(fp, bp->vec);
- fp+= 3;
+ fp += 3;
bp++;
}
}
else {
MEM_freeN(lt->def);
- lt->def= MEM_dupallocN(editlt->def);
+ lt->def = MEM_dupallocN(editlt->def);
- lt->flag= editlt->flag;
+ lt->flag = editlt->flag;
- lt->pntsu= editlt->pntsu;
- lt->pntsv= editlt->pntsv;
- lt->pntsw= editlt->pntsw;
+ lt->pntsu = editlt->pntsu;
+ lt->pntsv = editlt->pntsv;
+ lt->pntsw = editlt->pntsw;
- lt->typeu= editlt->typeu;
- lt->typev= editlt->typev;
- lt->typew= editlt->typew;
+ lt->typeu = editlt->typeu;
+ lt->typev = editlt->typev;
+ lt->typew = editlt->typew;
}
if (lt->dvert) {
- free_dverts(lt->dvert, lt->pntsu*lt->pntsv*lt->pntsw);
- lt->dvert= NULL;
+ free_dverts(lt->dvert, lt->pntsu * lt->pntsv * lt->pntsw);
+ lt->dvert = NULL;
}
if (editlt->dvert) {
- tot= lt->pntsu*lt->pntsv*lt->pntsw;
+ tot = lt->pntsu * lt->pntsv * lt->pntsw;
- lt->dvert = MEM_mallocN (sizeof (MDeformVert)*tot, "Lattice MDeformVert");
+ lt->dvert = MEM_mallocN(sizeof (MDeformVert) * tot, "Lattice MDeformVert");
copy_dverts(lt->dvert, editlt->dvert, tot);
}
}
@@ -171,17 +171,17 @@ void load_editLatt(Object *obedit)
void ED_setflagsLatt(Object *obedit, int flag)
{
- Lattice *lt= obedit->data;
+ Lattice *lt = obedit->data;
BPoint *bp;
int a;
- bp= lt->editlatt->latt->def;
+ bp = lt->editlatt->latt->def;
- a= lt->editlatt->latt->pntsu*lt->editlatt->latt->pntsv*lt->editlatt->latt->pntsw;
+ a = lt->editlatt->latt->pntsu * lt->editlatt->latt->pntsv * lt->editlatt->latt->pntsw;
while (a--) {
- if (bp->hide==0) {
- bp->f1= flag;
+ if (bp->hide == 0) {
+ bp->f1 = flag;
}
bp++;
}
@@ -189,8 +189,8 @@ void ED_setflagsLatt(Object *obedit, int flag)
static int lattice_select_all_exec(bContext *C, wmOperator *op)
{
- Object *obedit= CTX_data_edit_object(C);
- Lattice *lt= obedit->data;
+ Object *obedit = CTX_data_edit_object(C);
+ Lattice *lt = obedit->data;
BPoint *bp;
int a;
int action = RNA_enum_get(op->ptr, "action");
@@ -198,11 +198,11 @@ static int lattice_select_all_exec(bContext *C, wmOperator *op)
if (action == SEL_TOGGLE) {
action = SEL_SELECT;
- bp= lt->editlatt->latt->def;
- a= lt->editlatt->latt->pntsu*lt->editlatt->latt->pntsv*lt->editlatt->latt->pntsw;
+ bp = lt->editlatt->latt->def;
+ a = lt->editlatt->latt->pntsu * lt->editlatt->latt->pntsv * lt->editlatt->latt->pntsw;
while (a--) {
- if (bp->hide==0) {
+ if (bp->hide == 0) {
if (bp->f1) {
action = SEL_DESELECT;
break;
@@ -213,26 +213,26 @@ static int lattice_select_all_exec(bContext *C, wmOperator *op)
}
switch (action) {
- case SEL_SELECT:
- ED_setflagsLatt(obedit, 1);
- break;
- case SEL_DESELECT:
- ED_setflagsLatt(obedit, 0);
- break;
- case SEL_INVERT:
- bp= lt->editlatt->latt->def;
- a= lt->editlatt->latt->pntsu*lt->editlatt->latt->pntsv*lt->editlatt->latt->pntsw;
-
- while (a--) {
- if (bp->hide==0) {
- bp->f1 ^= 1;
+ case SEL_SELECT:
+ ED_setflagsLatt(obedit, 1);
+ break;
+ case SEL_DESELECT:
+ ED_setflagsLatt(obedit, 0);
+ break;
+ case SEL_INVERT:
+ bp = lt->editlatt->latt->def;
+ a = lt->editlatt->latt->pntsu * lt->editlatt->latt->pntsv * lt->editlatt->latt->pntsw;
+
+ while (a--) {
+ if (bp->hide == 0) {
+ bp->f1 ^= 1;
+ }
+ bp++;
}
- bp++;
- }
- break;
+ break;
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -249,7 +249,7 @@ void LATTICE_OT_select_all(wmOperatorType *ot)
ot->poll = ED_operator_editlattice;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
WM_operator_properties_select_all(ot);
}
@@ -260,27 +260,27 @@ static int make_regular_poll(bContext *C)
if (ED_operator_editlattice(C)) return 1;
- ob= CTX_data_active_object(C);
- return (ob && ob->type==OB_LATTICE);
+ ob = CTX_data_active_object(C);
+ return (ob && ob->type == OB_LATTICE);
}
static int make_regular_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *ob= CTX_data_edit_object(C);
+ Object *ob = CTX_data_edit_object(C);
Lattice *lt;
if (ob) {
- lt= ob->data;
- resizelattice(lt->editlatt->latt, lt->pntsu, lt->pntsv, lt->pntsw, NULL);
+ lt = ob->data;
+ BKE_lattice_resize(lt->editlatt->latt, lt->pntsu, lt->pntsv, lt->pntsw, NULL);
}
else {
- ob= CTX_data_active_object(C);
- lt= ob->data;
- resizelattice(lt, lt->pntsu, lt->pntsv, lt->pntsw, NULL);
+ ob = CTX_data_active_object(C);
+ lt = ob->data;
+ BKE_lattice_resize(lt, lt->pntsu, lt->pntsv, lt->pntsw, NULL);
}
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data);
return OPERATOR_FINISHED;
}
@@ -297,7 +297,7 @@ void LATTICE_OT_make_regular(wmOperatorType *ot)
ot->poll = make_regular_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/****************************** Mouse Selection *************************/
@@ -305,12 +305,12 @@ void LATTICE_OT_make_regular(wmOperatorType *ot)
static void findnearestLattvert__doClosest(void *userData, BPoint *bp, int x, int y)
{
struct { BPoint *bp; short dist, select; int mval[2]; } *data = userData;
- float temp = abs(data->mval[0]-x) + abs(data->mval[1]-y);
+ float temp = abs(data->mval[0] - x) + abs(data->mval[1] - y);
- if ((bp->f1 & SELECT)==data->select)
+ if ((bp->f1 & SELECT) == data->select)
temp += 5;
- if (temp<data->dist) {
+ if (temp < data->dist) {
data->dist = temp;
data->bp = bp;
@@ -319,15 +319,15 @@ static void findnearestLattvert__doClosest(void *userData, BPoint *bp, int x, in
static BPoint *findnearestLattvert(ViewContext *vc, const int mval[2], int sel)
{
- /* sel==1: selected gets a disadvantage */
- /* in nurb and bezt or bp the nearest is written */
- /* return 0 1 2: handlepunt */
+ /* sel==1: selected gets a disadvantage */
+ /* in nurb and bezt or bp the nearest is written */
+ /* return 0 1 2: handlepunt */
struct { BPoint *bp; short dist, select; int mval[2]; } data = {NULL};
data.dist = 100;
data.select = sel;
- data.mval[0]= mval[0];
- data.mval[1]= mval[1];
+ data.mval[0] = mval[0];
+ data.mval[1] = mval[1];
ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d);
lattice_foreachScreenVert(vc, findnearestLattvert__doClosest, &data);
@@ -338,20 +338,20 @@ static BPoint *findnearestLattvert(ViewContext *vc, const int mval[2], int sel)
int mouse_lattice(bContext *C, const int mval[2], int extend)
{
ViewContext vc;
- BPoint *bp= NULL;
+ BPoint *bp = NULL;
view3d_set_viewcontext(C, &vc);
- bp= findnearestLattvert(&vc, mval, 1);
+ bp = findnearestLattvert(&vc, mval, 1);
if (bp) {
- if (extend==0) {
+ if (extend == 0) {
ED_setflagsLatt(vc.obedit, 0);
bp->f1 |= SELECT;
}
else
- bp->f1 ^= SELECT; /* swap */
+ bp->f1 ^= SELECT; /* swap */
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, vc.obedit->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, vc.obedit->data);
return 1;
}
@@ -368,29 +368,29 @@ typedef struct UndoLattice {
static void undoLatt_to_editLatt(void *data, void *edata, void *UNUSED(obdata))
{
- UndoLattice *ult= (UndoLattice*)data;
- EditLatt *editlatt= (EditLatt *)edata;
- int a= editlatt->latt->pntsu*editlatt->latt->pntsv*editlatt->latt->pntsw;
+ UndoLattice *ult = (UndoLattice *)data;
+ EditLatt *editlatt = (EditLatt *)edata;
+ int a = editlatt->latt->pntsu * editlatt->latt->pntsv * editlatt->latt->pntsw;
- memcpy(editlatt->latt->def, ult->def, a*sizeof(BPoint));
+ memcpy(editlatt->latt->def, ult->def, a * sizeof(BPoint));
}
static void *editLatt_to_undoLatt(void *edata, void *UNUSED(obdata))
{
- UndoLattice *ult= MEM_callocN(sizeof(UndoLattice), "UndoLattice");
- EditLatt *editlatt= (EditLatt *)edata;
+ UndoLattice *ult = MEM_callocN(sizeof(UndoLattice), "UndoLattice");
+ EditLatt *editlatt = (EditLatt *)edata;
- ult->def= MEM_dupallocN(editlatt->latt->def);
- ult->pntsu= editlatt->latt->pntsu;
- ult->pntsv= editlatt->latt->pntsv;
- ult->pntsw= editlatt->latt->pntsw;
+ ult->def = MEM_dupallocN(editlatt->latt->def);
+ ult->pntsu = editlatt->latt->pntsu;
+ ult->pntsv = editlatt->latt->pntsv;
+ ult->pntsw = editlatt->latt->pntsw;
return ult;
}
static void free_undoLatt(void *data)
{
- UndoLattice *ult= (UndoLattice*)data;
+ UndoLattice *ult = (UndoLattice *)data;
if (ult->def) MEM_freeN(ult->def);
MEM_freeN(ult);
@@ -398,20 +398,20 @@ static void free_undoLatt(void *data)
static int validate_undoLatt(void *data, void *edata)
{
- UndoLattice *ult= (UndoLattice*)data;
- EditLatt *editlatt= (EditLatt *)edata;
+ UndoLattice *ult = (UndoLattice *)data;
+ EditLatt *editlatt = (EditLatt *)edata;
return (ult->pntsu == editlatt->latt->pntsu &&
- ult->pntsv == editlatt->latt->pntsv &&
- ult->pntsw == editlatt->latt->pntsw);
+ ult->pntsv == editlatt->latt->pntsv &&
+ ult->pntsw == editlatt->latt->pntsw);
}
static void *get_editlatt(bContext *C)
{
- Object *obedit= CTX_data_edit_object(C);
+ Object *obedit = CTX_data_edit_object(C);
- if (obedit && obedit->type==OB_LATTICE) {
- Lattice *lt= obedit->data;
+ if (obedit && obedit->type == OB_LATTICE) {
+ Lattice *lt = obedit->data;
return lt->editlatt;
}
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index cd2fa4f93b6..17f4ea73d6d 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -87,16 +87,16 @@
ModifierData *ED_object_modifier_add(ReportList *reports, Main *bmain, Scene *scene, Object *ob, const char *name, int type)
{
- ModifierData *md=NULL, *new_md=NULL;
+ ModifierData *md = NULL, *new_md = NULL;
ModifierTypeInfo *mti = modifierType_getInfo(type);
/* only geometry objects should be able to get modifiers [#25291] */
if (!ELEM5(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_LATTICE)) {
- BKE_reportf(reports, RPT_WARNING, "Modifiers cannot be added to Object '%s'", ob->id.name+2);
+ BKE_reportf(reports, RPT_WARNING, "Modifiers cannot be added to Object '%s'", ob->id.name + 2);
return NULL;
}
- if (mti->flags&eModifierTypeFlag_Single) {
+ if (mti->flags & eModifierTypeFlag_Single) {
if (modifiers_findByType(ob, type)) {
BKE_report(reports, RPT_WARNING, "Only one modifier of this type allowed");
return NULL;
@@ -111,12 +111,12 @@ ModifierData *ED_object_modifier_add(ReportList *reports, Main *bmain, Scene *sc
}
else {
/* get new modifier data to add */
- new_md= modifier_new(type);
+ new_md = modifier_new(type);
- if (mti->flags&eModifierTypeFlag_RequiresOriginalData) {
+ if (mti->flags & eModifierTypeFlag_RequiresOriginalData) {
md = ob->modifiers.first;
- while (md && modifierType_getInfo(md->type)->type==eModifierTypeType_OnlyDeform)
+ while (md && modifierType_getInfo(md->type)->type == eModifierTypeType_OnlyDeform)
md = md->next;
BLI_insertlinkbefore(&ob->modifiers, md, new_md);
@@ -134,15 +134,15 @@ ModifierData *ED_object_modifier_add(ReportList *reports, Main *bmain, Scene *sc
/* special cases */
if (type == eModifierType_Softbody) {
if (!ob->soft) {
- ob->soft= sbNew(scene);
- ob->softflag |= OB_SB_GOAL|OB_SB_EDGES;
+ ob->soft = sbNew(scene);
+ ob->softflag |= OB_SB_GOAL | OB_SB_EDGES;
}
}
else if (type == eModifierType_Collision) {
if (!ob->pd)
- ob->pd= object_add_collision_fields(0);
+ ob->pd = object_add_collision_fields(0);
- ob->pd->deflect= 1;
+ ob->pd->deflect = 1;
DAG_scene_sort(bmain, scene);
}
else if (type == eModifierType_Surface)
@@ -164,8 +164,8 @@ static int object_modifier_remove(Object *ob, ModifierData *md, int *sort_depsgr
/* It seems on rapid delete it is possible to
* get called twice on same modifier, so make
* sure it is in list. */
- for (obmd=ob->modifiers.first; obmd; obmd=obmd->next)
- if (obmd==md)
+ for (obmd = ob->modifiers.first; obmd; obmd = obmd->next)
+ if (obmd == md)
break;
if (!obmd)
@@ -173,22 +173,22 @@ static int object_modifier_remove(Object *ob, ModifierData *md, int *sort_depsgr
/* special cases */
if (md->type == eModifierType_ParticleSystem) {
- ParticleSystemModifierData *psmd=(ParticleSystemModifierData*)md;
+ ParticleSystemModifierData *psmd = (ParticleSystemModifierData *)md;
BLI_remlink(&ob->particlesystem, psmd->psys);
psys_free(ob, psmd->psys);
- psmd->psys= NULL;
+ psmd->psys = NULL;
}
else if (md->type == eModifierType_Softbody) {
if (ob->soft) {
sbFree(ob->soft);
- ob->soft= NULL;
- ob->softflag= 0;
+ ob->soft = NULL;
+ ob->softflag = 0;
}
}
else if (md->type == eModifierType_Collision) {
if (ob->pd)
- ob->pd->deflect= 0;
+ ob->pd->deflect = 0;
*sort_depsgraph = 1;
}
@@ -202,13 +202,13 @@ static int object_modifier_remove(Object *ob, ModifierData *md, int *sort_depsgr
ob->dt = OB_TEXTURE;
}
else if (md->type == eModifierType_Multires) {
- int ok= 1;
+ int ok = 1;
ModifierData *tmpmd;
/* ensure MDISPS CustomData layer isn't used by another multires modifiers */
- for (tmpmd= ob->modifiers.first; tmpmd; tmpmd= tmpmd->next)
- if (tmpmd!=md && tmpmd->type == eModifierType_Multires) {
- ok= 0;
+ for (tmpmd = ob->modifiers.first; tmpmd; tmpmd = tmpmd->next)
+ if (tmpmd != md && tmpmd->type == eModifierType_Multires) {
+ ok = 0;
break;
}
@@ -218,7 +218,7 @@ static int object_modifier_remove(Object *ob, ModifierData *md, int *sort_depsgr
}
if (ELEM(md->type, eModifierType_Softbody, eModifierType_Cloth) &&
- ob->particlesystem.first == NULL) {
+ ob->particlesystem.first == NULL) {
ob->mode &= ~OB_MODE_PARTICLE_EDIT;
}
@@ -233,7 +233,7 @@ int ED_object_modifier_remove(ReportList *reports, Main *bmain, Scene *scene, Ob
int sort_depsgraph = 0;
int ok;
- ok= object_modifier_remove(ob, md, &sort_depsgraph);
+ ok = object_modifier_remove(ob, md, &sort_depsgraph);
if (!ok) {
BKE_reportf(reports, RPT_ERROR, "Modifier '%s' not in object '%s'", ob->id.name, md->name);
@@ -260,11 +260,11 @@ void ED_object_modifier_clear(Main *bmain, Scene *scene, Object *ob)
while (md) {
ModifierData *next_md;
- next_md= md->next;
+ next_md = md->next;
object_modifier_remove(ob, md, &sort_depsgraph);
- md= next_md;
+ md = next_md;
}
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
@@ -279,10 +279,10 @@ int ED_object_modifier_move_up(ReportList *reports, Object *ob, ModifierData *md
if (md->prev) {
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
- if (mti->type!=eModifierTypeType_OnlyDeform) {
+ if (mti->type != eModifierTypeType_OnlyDeform) {
ModifierTypeInfo *nmti = modifierType_getInfo(md->prev->type);
- if (nmti->flags&eModifierTypeFlag_RequiresOriginalData) {
+ if (nmti->flags & eModifierTypeFlag_RequiresOriginalData) {
BKE_report(reports, RPT_WARNING, "Cannot move above a modifier requiring original data");
return 0;
}
@@ -300,10 +300,10 @@ int ED_object_modifier_move_down(ReportList *reports, Object *ob, ModifierData *
if (md->next) {
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
- if (mti->flags&eModifierTypeFlag_RequiresOriginalData) {
+ if (mti->flags & eModifierTypeFlag_RequiresOriginalData) {
ModifierTypeInfo *nmti = modifierType_getInfo(md->next->type);
- if (nmti->type!=eModifierTypeType_OnlyDeform) {
+ if (nmti->type != eModifierTypeType_OnlyDeform) {
BKE_report(reports, RPT_WARNING, "Cannot move beyond a non-deforming modifier");
return 0;
}
@@ -326,72 +326,72 @@ int ED_object_modifier_convert(ReportList *UNUSED(reports), Main *bmain, Scene *
MVert *mvert;
MEdge *medge;
int a, k, kmax;
- int totvert=0, totedge=0, cvert=0;
- int totpart=0, totchild=0;
+ int totvert = 0, totedge = 0, cvert = 0;
+ int totpart = 0, totchild = 0;
if (md->type != eModifierType_ParticleSystem) return 0;
if (ob && ob->mode & OB_MODE_PARTICLE_EDIT) return 0;
- psys=((ParticleSystemModifierData *)md)->psys;
- part= psys->part;
+ psys = ((ParticleSystemModifierData *)md)->psys;
+ part = psys->part;
if (part->ren_as != PART_DRAW_PATH || psys->pathcache == NULL)
return 0;
- totpart= psys->totcached;
- totchild= psys->totchildcache;
+ totpart = psys->totcached;
+ totchild = psys->totchildcache;
- if (totchild && (part->draw&PART_DRAW_PARENT)==0)
- totpart= 0;
+ if (totchild && (part->draw & PART_DRAW_PARENT) == 0)
+ totpart = 0;
/* count */
- cache= psys->pathcache;
- for (a=0; a<totpart; a++) {
- key= cache[a];
+ cache = psys->pathcache;
+ for (a = 0; a < totpart; a++) {
+ key = cache[a];
if (key->steps > 0) {
- totvert+= key->steps+1;
- totedge+= key->steps;
+ totvert += key->steps + 1;
+ totedge += key->steps;
}
}
- cache= psys->childcache;
- for (a=0; a<totchild; a++) {
- key= cache[a];
+ cache = psys->childcache;
+ for (a = 0; a < totchild; a++) {
+ key = cache[a];
if (key->steps > 0) {
- totvert+= key->steps+1;
- totedge+= key->steps;
+ totvert += key->steps + 1;
+ totedge += key->steps;
}
}
- if (totvert==0) return 0;
+ if (totvert == 0) return 0;
/* add new mesh */
- obn= add_object(scene, OB_MESH);
- me= obn->data;
+ obn = BKE_object_add(scene, OB_MESH);
+ me = obn->data;
- me->totvert= totvert;
- me->totedge= totedge;
+ me->totvert = totvert;
+ me->totedge = totedge;
- me->mvert= CustomData_add_layer(&me->vdata, CD_MVERT, CD_CALLOC, NULL, totvert);
- me->medge= CustomData_add_layer(&me->edata, CD_MEDGE, CD_CALLOC, NULL, totedge);
- me->mface= CustomData_add_layer(&me->fdata, CD_MFACE, CD_CALLOC, NULL, 0);
+ me->mvert = CustomData_add_layer(&me->vdata, CD_MVERT, CD_CALLOC, NULL, totvert);
+ me->medge = CustomData_add_layer(&me->edata, CD_MEDGE, CD_CALLOC, NULL, totedge);
+ me->mface = CustomData_add_layer(&me->fdata, CD_MFACE, CD_CALLOC, NULL, 0);
- mvert= me->mvert;
- medge= me->medge;
+ mvert = me->mvert;
+ medge = me->medge;
/* copy coordinates */
- cache= psys->pathcache;
- for (a=0; a<totpart; a++) {
- key= cache[a];
- kmax= key->steps;
- for (k=0; k<=kmax; k++,key++,cvert++,mvert++) {
- copy_v3_v3(mvert->co,key->co);
+ cache = psys->pathcache;
+ for (a = 0; a < totpart; a++) {
+ key = cache[a];
+ kmax = key->steps;
+ for (k = 0; k <= kmax; k++, key++, cvert++, mvert++) {
+ copy_v3_v3(mvert->co, key->co);
if (k) {
- medge->v1= cvert-1;
- medge->v2= cvert;
- medge->flag= ME_EDGEDRAW|ME_EDGERENDER|ME_LOOSEEDGE;
+ medge->v1 = cvert - 1;
+ medge->v2 = cvert;
+ medge->flag = ME_EDGEDRAW | ME_EDGERENDER | ME_LOOSEEDGE;
medge++;
}
else {
@@ -401,16 +401,16 @@ int ED_object_modifier_convert(ReportList *UNUSED(reports), Main *bmain, Scene *
}
}
- cache=psys->childcache;
- for (a=0; a<totchild; a++) {
- key=cache[a];
- kmax=key->steps;
- for (k=0; k<=kmax; k++,key++,cvert++,mvert++) {
- copy_v3_v3(mvert->co,key->co);
+ cache = psys->childcache;
+ for (a = 0; a < totchild; a++) {
+ key = cache[a];
+ kmax = key->steps;
+ for (k = 0; k <= kmax; k++, key++, cvert++, mvert++) {
+ copy_v3_v3(mvert->co, key->co);
if (k) {
- medge->v1=cvert-1;
- medge->v2=cvert;
- medge->flag= ME_EDGEDRAW|ME_EDGERENDER|ME_LOOSEEDGE;
+ medge->v1 = cvert - 1;
+ medge->v2 = cvert;
+ medge->flag = ME_EDGEDRAW | ME_EDGERENDER | ME_LOOSEEDGE;
medge++;
}
else {
@@ -427,9 +427,9 @@ int ED_object_modifier_convert(ReportList *UNUSED(reports), Main *bmain, Scene *
static int modifier_apply_shape(ReportList *reports, Scene *scene, Object *ob, ModifierData *md)
{
- ModifierTypeInfo *mti= modifierType_getInfo(md->type);
+ ModifierTypeInfo *mti = modifierType_getInfo(md->type);
- md->scene= scene;
+ md->scene = scene;
if (mti->isDisabled && mti->isDisabled(md, 0)) {
BKE_report(reports, RPT_ERROR, "Modifier is disabled, skipping apply");
@@ -447,10 +447,10 @@ static int modifier_apply_shape(ReportList *reports, Scene *scene, Object *ob, M
* and then predominantly stated in comments in a half dozen headers.
*/
- if (ob->type==OB_MESH) {
+ if (ob->type == OB_MESH) {
DerivedMesh *dm;
- Mesh *me= ob->data;
- Key *key=me->key;
+ Mesh *me = ob->data;
+ Key *key = me->key;
KeyBlock *kb;
if (!modifier_sameTopology(md) || mti->type == eModifierTypeType_NonGeometrical) {
@@ -465,15 +465,15 @@ static int modifier_apply_shape(ReportList *reports, Scene *scene, Object *ob, M
}
if (key == NULL) {
- key= me->key= add_key((ID *)me);
- key->type= KEY_RELATIVE;
+ key = me->key = add_key((ID *)me);
+ key->type = KEY_RELATIVE;
/* if that was the first key block added, then it was the basis.
* Initialize it with the mesh, and add another for the modifier */
- kb= add_keyblock(key, NULL);
+ kb = add_keyblock(key, NULL);
mesh_to_key(me, kb);
}
- kb= add_keyblock(key, md->name);
+ kb = add_keyblock(key, md->name);
DM_to_meshkey(dm, me, kb);
dm->release(dm);
@@ -487,19 +487,19 @@ static int modifier_apply_shape(ReportList *reports, Scene *scene, Object *ob, M
static int modifier_apply_obdata(ReportList *reports, Scene *scene, Object *ob, ModifierData *md)
{
- ModifierTypeInfo *mti= modifierType_getInfo(md->type);
+ ModifierTypeInfo *mti = modifierType_getInfo(md->type);
- md->scene= scene;
+ md->scene = scene;
if (mti->isDisabled && mti->isDisabled(md, 0)) {
BKE_report(reports, RPT_ERROR, "Modifier is disabled, skipping apply");
return 0;
}
- if (ob->type==OB_MESH) {
+ if (ob->type == OB_MESH) {
DerivedMesh *dm;
Mesh *me = ob->data;
- MultiresModifierData *mmd= find_multires_modifier_before(scene, md);
+ MultiresModifierData *mmd = find_multires_modifier_before(scene, md);
if (me->key && mti->type != eModifierTypeType_NonGeometrical) {
BKE_report(reports, RPT_ERROR, "Modifier cannot be applied to Mesh with Shape Keys");
@@ -510,8 +510,8 @@ static int modifier_apply_obdata(ReportList *reports, Scene *scene, Object *ob,
if (md->type == eModifierType_Multires)
multires_force_update(ob);
- if (mmd && mmd->totlvl && mti->type==eModifierTypeType_OnlyDeform) {
- if (!multiresModifier_reshapeFromDeformMod (scene, mmd, ob, md)) {
+ if (mmd && mmd->totlvl && mti->type == eModifierTypeType_OnlyDeform) {
+ if (!multiresModifier_reshapeFromDeformMod(scene, mmd, ob, md)) {
BKE_report(reports, RPT_ERROR, "Multires modifier returned error, skipping apply");
return 0;
}
@@ -544,9 +544,9 @@ static int modifier_apply_obdata(ReportList *reports, Scene *scene, Object *ob,
cu = ob->data;
BKE_report(reports, RPT_INFO, "Applied modifier only changed CV points, not tessellated/bevel vertices");
- vertexCos = curve_getVertexCos(cu, &cu->nurb, &numVerts);
+ vertexCos = BKE_curve_vertexCos_get(cu, &cu->nurb, &numVerts);
mti->deformVerts(md, ob, NULL, vertexCos, numVerts, 0, 0);
- curve_applyVertexCos(cu, &cu->nurb, vertexCos);
+ BK_curve_vertexCos_apply(cu, &cu->nurb, vertexCos);
MEM_freeN(vertexCos);
@@ -562,7 +562,7 @@ static int modifier_apply_obdata(ReportList *reports, Scene *scene, Object *ob,
ParticleSystem *psys = ob->particlesystem.first;
- for (; psys; psys=psys->next) {
+ for (; psys; psys = psys->next) {
if (psys->part->type != PART_HAIR)
continue;
@@ -582,27 +582,27 @@ int ED_object_modifier_apply(ReportList *reports, Scene *scene, Object *ob, Modi
BKE_report(reports, RPT_ERROR, "Modifiers cannot be applied in editmode");
return 0;
}
- else if (((ID*) ob->data)->us>1) {
+ else if (((ID *) ob->data)->us > 1) {
BKE_report(reports, RPT_ERROR, "Modifiers cannot be applied to multi-user data");
return 0;
}
- if (md!=ob->modifiers.first)
+ if (md != ob->modifiers.first)
BKE_report(reports, RPT_INFO, "Applied modifier was not first, result may not be as expected");
/* allow apply of a not-realtime modifier, by first re-enabling realtime. */
- prev_mode= md->mode;
+ prev_mode = md->mode;
md->mode |= eModifierMode_Realtime;
if (mode == MODIFIER_APPLY_SHAPE) {
if (!modifier_apply_shape(reports, scene, ob, md)) {
- md->mode= prev_mode;
+ md->mode = prev_mode;
return 0;
}
}
else {
if (!modifier_apply_obdata(reports, scene, ob, md)) {
- md->mode= prev_mode;
+ md->mode = prev_mode;
return 0;
}
}
@@ -629,58 +629,58 @@ int ED_object_modifier_copy(ReportList *UNUSED(reports), Object *ob, ModifierDat
static int modifier_add_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
Object *ob = ED_object_active_context(C);
- int type= RNA_enum_get(op->ptr, "type");
+ int type = RNA_enum_get(op->ptr, "type");
if (!ED_object_modifier_add(op->reports, bmain, scene, ob, NULL, type))
return OPERATOR_CANCELLED;
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);
return OPERATOR_FINISHED;
}
static EnumPropertyItem *modifier_add_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
{
- Object *ob= ED_object_active_context(C);
- EnumPropertyItem *item= NULL, *md_item, *group_item= NULL;
+ Object *ob = ED_object_active_context(C);
+ EnumPropertyItem *item = NULL, *md_item, *group_item = NULL;
ModifierTypeInfo *mti;
- int totitem= 0, a;
+ int totitem = 0, a;
if (!ob)
return modifier_type_items;
- for (a=0; modifier_type_items[a].identifier; a++) {
- md_item= &modifier_type_items[a];
+ for (a = 0; modifier_type_items[a].identifier; a++) {
+ md_item = &modifier_type_items[a];
if (md_item->identifier[0]) {
- mti= modifierType_getInfo(md_item->value);
+ mti = modifierType_getInfo(md_item->value);
if (mti->flags & eModifierTypeFlag_NoUserAdd)
continue;
- if (!object_support_modifier_type(ob, md_item->value))
+ if (!BKE_object_support_modifier_type_check(ob, md_item->value))
continue;
}
else {
- group_item= md_item;
- md_item= NULL;
+ group_item = md_item;
+ md_item = NULL;
continue;
}
if (group_item) {
RNA_enum_item_add(&item, &totitem, group_item);
- group_item= NULL;
+ group_item = NULL;
}
RNA_enum_item_add(&item, &totitem, md_item);
}
RNA_enum_item_end(&item, &totitem);
- *free= 1;
+ *free = 1;
return item;
}
@@ -700,10 +700,10 @@ void OBJECT_OT_modifier_add(wmOperatorType *ot)
ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
- prop= RNA_def_enum(ot->srna, "type", modifier_type_items, eModifierType_Subsurf, "Type", "");
+ prop = RNA_def_enum(ot->srna, "type", modifier_type_items, eModifierType_Subsurf, "Type", "");
RNA_def_enum_funcs(prop, modifier_add_itemf);
ot->prop = prop;
}
@@ -712,12 +712,12 @@ void OBJECT_OT_modifier_add(wmOperatorType *ot)
static int edit_modifier_poll_generic(bContext *C, StructRNA *rna_type, int obtype_flag)
{
- PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", rna_type);
- Object *ob= (ptr.id.data)?ptr.id.data:ED_object_active_context(C);
+ PointerRNA ptr = CTX_data_pointer_get_type(C, "modifier", rna_type);
+ Object *ob = (ptr.id.data) ? ptr.id.data : ED_object_active_context(C);
if (!ob || ob->id.lib) return 0;
- if (obtype_flag && ((1<<ob->type) & obtype_flag)==0) return 0;
- if (ptr.id.data && ((ID*)ptr.id.data)->lib) return 0;
+ if (obtype_flag && ((1 << ob->type) & obtype_flag) == 0) return 0;
+ if (ptr.id.data && ((ID *)ptr.id.data)->lib) return 0;
return 1;
}
@@ -734,7 +734,7 @@ static void edit_modifier_properties(wmOperatorType *ot)
static int edit_modifier_invoke_properties(bContext *C, wmOperator *op)
{
- PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_Modifier);
+ PointerRNA ptr = CTX_data_pointer_get_type(C, "modifier", &RNA_Modifier);
ModifierData *md;
if (RNA_struct_property_is_set(op->ptr, "modifier"))
@@ -767,8 +767,8 @@ static ModifierData *edit_modifier_property_get(wmOperator *op, Object *ob, int
static int modifier_remove_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
Object *ob = ED_object_active_context(C);
ModifierData *md = edit_modifier_property_get(op, ob, 0);
int mode_orig = ob ? ob->mode : 0;
@@ -776,13 +776,13 @@ static int modifier_remove_exec(bContext *C, wmOperator *op)
if (!ob || !md || !ED_object_modifier_remove(op->reports, bmain, scene, ob, md))
return OPERATOR_CANCELLED;
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);
/* if cloth/softbody was removed, particle mode could be cleared */
if (mode_orig & OB_MODE_PARTICLE_EDIT)
- if ((ob->mode & OB_MODE_PARTICLE_EDIT)==0)
- if (scene->basact && scene->basact->object==ob)
- WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_OBJECT, NULL);
+ if ((ob->mode & OB_MODE_PARTICLE_EDIT) == 0)
+ if (scene->basact && scene->basact->object == ob)
+ WM_event_add_notifier(C, NC_SCENE | ND_MODE | NS_MODE_OBJECT, NULL);
return OPERATOR_FINISHED;
}
@@ -806,7 +806,7 @@ void OBJECT_OT_modifier_remove(wmOperatorType *ot)
ot->poll = edit_modifier_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
edit_modifier_properties(ot);
}
@@ -821,7 +821,7 @@ static int modifier_move_up_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);
return OPERATOR_FINISHED;
}
@@ -845,7 +845,7 @@ void OBJECT_OT_modifier_move_up(wmOperatorType *ot)
ot->poll = edit_modifier_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
edit_modifier_properties(ot);
}
@@ -860,7 +860,7 @@ static int modifier_move_down_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);
return OPERATOR_FINISHED;
}
@@ -884,7 +884,7 @@ void OBJECT_OT_modifier_move_down(wmOperatorType *ot)
ot->poll = edit_modifier_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
edit_modifier_properties(ot);
}
@@ -892,17 +892,17 @@ void OBJECT_OT_modifier_move_down(wmOperatorType *ot)
static int modifier_apply_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
Object *ob = ED_object_active_context(C);
ModifierData *md = edit_modifier_property_get(op, ob, 0);
- int apply_as= RNA_enum_get(op->ptr, "apply_as");
+ int apply_as = RNA_enum_get(op->ptr, "apply_as");
if (!ob || !md || !ED_object_modifier_apply(op->reports, scene, ob, md, apply_as)) {
return OPERATOR_CANCELLED;
}
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);
return OPERATOR_FINISHED;
}
@@ -931,7 +931,7 @@ void OBJECT_OT_modifier_apply(wmOperatorType *ot)
ot->poll = edit_modifier_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_enum(ot->srna, "apply_as", modifier_apply_as_items, MODIFIER_APPLY_DATA, "Apply as", "How to apply the modifier to the geometry");
edit_modifier_properties(ot);
@@ -941,8 +941,8 @@ void OBJECT_OT_modifier_apply(wmOperatorType *ot)
static int modifier_convert_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
Object *ob = ED_object_active_context(C);
ModifierData *md = edit_modifier_property_get(op, ob, 0);
@@ -950,7 +950,7 @@ static int modifier_convert_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);
return OPERATOR_FINISHED;
}
@@ -974,7 +974,7 @@ void OBJECT_OT_modifier_convert(wmOperatorType *ot)
ot->poll = edit_modifier_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
edit_modifier_properties(ot);
}
@@ -989,7 +989,7 @@ static int modifier_copy_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);
return OPERATOR_FINISHED;
}
@@ -1013,7 +1013,7 @@ void OBJECT_OT_modifier_copy(wmOperatorType *ot)
ot->poll = edit_modifier_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
edit_modifier_properties(ot);
}
@@ -1021,7 +1021,7 @@ void OBJECT_OT_modifier_copy(wmOperatorType *ot)
static int multires_poll(bContext *C)
{
- return edit_modifier_poll_generic(C, &RNA_MultiresModifier, (1<<OB_MESH));
+ return edit_modifier_poll_generic(C, &RNA_MultiresModifier, (1 << OB_MESH));
}
static int multires_higher_levels_delete_exec(bContext *C, wmOperator *op)
@@ -1034,7 +1034,7 @@ static int multires_higher_levels_delete_exec(bContext *C, wmOperator *op)
multiresModifier_del_levels(mmd, ob, 1);
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);
return OPERATOR_FINISHED;
}
@@ -1058,7 +1058,7 @@ void OBJECT_OT_multires_higher_levels_delete(wmOperatorType *ot)
ot->exec = multires_higher_levels_delete_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
edit_modifier_properties(ot);
}
@@ -1075,7 +1075,7 @@ static int multires_subdivide_exec(bContext *C, wmOperator *op)
multiresModifier_subdivide(mmd, ob, 0, mmd->simple);
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);
return OPERATOR_FINISHED;
}
@@ -1099,7 +1099,7 @@ void OBJECT_OT_multires_subdivide(wmOperatorType *ot)
ot->exec = multires_subdivide_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
edit_modifier_properties(ot);
}
@@ -1107,21 +1107,22 @@ void OBJECT_OT_multires_subdivide(wmOperatorType *ot)
static int multires_reshape_exec(bContext *C, wmOperator *op)
{
- Object *ob= ED_object_active_context(C), *secondob= NULL;
- Scene *scene= CTX_data_scene(C);
+ Object *ob = ED_object_active_context(C), *secondob = NULL;
+ Scene *scene = CTX_data_scene(C);
MultiresModifierData *mmd = (MultiresModifierData *)edit_modifier_property_get(op, ob, eModifierType_Multires);
if (!mmd)
return OPERATOR_CANCELLED;
- if (mmd->lvl==0) {
+ if (mmd->lvl == 0) {
BKE_report(op->reports, RPT_ERROR, "Reshape can work only with higher levels of subdivisions");
return OPERATOR_CANCELLED;
}
- CTX_DATA_BEGIN(C, Object*, selob, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object *, selob, selected_editable_objects)
+ {
if (selob->type == OB_MESH && selob != ob) {
- secondob= selob;
+ secondob = selob;
break;
}
}
@@ -1138,7 +1139,7 @@ static int multires_reshape_exec(bContext *C, wmOperator *op)
}
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);
return OPERATOR_FINISHED;
}
@@ -1162,7 +1163,7 @@ void OBJECT_OT_multires_reshape(wmOperatorType *ot)
ot->exec = multires_reshape_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
edit_modifier_properties(ot);
}
@@ -1173,9 +1174,9 @@ void OBJECT_OT_multires_reshape(wmOperatorType *ot)
static int multires_external_save_exec(bContext *C, wmOperator *op)
{
Object *ob = ED_object_active_context(C);
- Mesh *me= (ob)? ob->data: op->customdata;
+ Mesh *me = (ob) ? ob->data : op->customdata;
char path[FILE_MAX];
- int relative= RNA_boolean_get(op->ptr, "relative_path");
+ int relative = RNA_boolean_get(op->ptr, "relative_path");
if (!me)
return OPERATOR_CANCELLED;
@@ -1198,7 +1199,7 @@ static int multires_external_save_invoke(bContext *C, wmOperator *op, wmEvent *U
{
Object *ob = ED_object_active_context(C);
MultiresModifierData *mmd;
- Mesh *me= ob->data;
+ Mesh *me = ob->data;
char path[FILE_MAX];
if (!edit_modifier_invoke_properties(C, op))
@@ -1215,9 +1216,9 @@ static int multires_external_save_invoke(bContext *C, wmOperator *op, wmEvent *U
if (RNA_struct_property_is_set(op->ptr, "filepath"))
return multires_external_save_exec(C, op);
- op->customdata= me;
+ op->customdata = me;
- BLI_snprintf(path, sizeof(path), "//%s.btx", me->id.name+2);
+ BLI_snprintf(path, sizeof(path), "//%s.btx", me->id.name + 2);
RNA_string_set(op->ptr, "filepath", path);
WM_event_add_fileselect(C, op);
@@ -1237,9 +1238,9 @@ void OBJECT_OT_multires_external_save(wmOperatorType *ot)
ot->poll = multires_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
- WM_operator_properties_filesel(ot, FOLDERFILE|BTXFILE, FILE_SPECIAL, FILE_SAVE, WM_FILESEL_FILEPATH|WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
+ WM_operator_properties_filesel(ot, FOLDERFILE | BTXFILE, FILE_SPECIAL, FILE_SAVE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
edit_modifier_properties(ot);
}
@@ -1248,7 +1249,7 @@ void OBJECT_OT_multires_external_save(wmOperatorType *ot)
static int multires_external_pack_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *ob = ED_object_active_context(C);
- Mesh *me= ob->data;
+ Mesh *me = ob->data;
if (!CustomData_external_test(&me->ldata, CD_MDISPS))
return OPERATOR_CANCELLED;
@@ -1269,7 +1270,7 @@ void OBJECT_OT_multires_external_pack(wmOperatorType *ot)
ot->exec = multires_external_pack_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/********************* multires apply base ***********************/
@@ -1284,7 +1285,7 @@ static int multires_base_apply_exec(bContext *C, wmOperator *op)
multiresModifier_base_apply(mmd, ob);
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);
return OPERATOR_FINISHED;
}
@@ -1309,7 +1310,7 @@ void OBJECT_OT_multires_base_apply(wmOperatorType *ot)
ot->exec = multires_base_apply_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
edit_modifier_properties(ot);
}
@@ -1318,12 +1319,12 @@ void OBJECT_OT_multires_base_apply(wmOperatorType *ot)
static int meshdeform_poll(bContext *C)
{
- return edit_modifier_poll_generic(C, &RNA_MeshDeformModifier, (1<<OB_MESH));
+ return edit_modifier_poll_generic(C, &RNA_MeshDeformModifier, (1 << OB_MESH));
}
static int meshdeform_bind_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
Object *ob = ED_object_active_context(C);
MeshDeformModifierData *mmd = (MeshDeformModifierData *)edit_modifier_property_get(op, ob, eModifierType_MeshDeform);
@@ -1337,47 +1338,48 @@ static int meshdeform_bind_exec(bContext *C, wmOperator *op)
if (mmd->bindinfluences) MEM_freeN(mmd->bindinfluences);
if (mmd->bindoffsets) MEM_freeN(mmd->bindoffsets);
if (mmd->dynverts) MEM_freeN(mmd->dynverts);
- if (mmd->bindweights) MEM_freeN(mmd->bindweights); /* deprecated */
- if (mmd->bindcos) MEM_freeN(mmd->bindcos); /* deprecated */
-
- mmd->bindcagecos= NULL;
- mmd->dyngrid= NULL;
- mmd->dyninfluences= NULL;
- mmd->bindoffsets= NULL;
- mmd->dynverts= NULL;
- mmd->bindweights= NULL; /* deprecated */
- mmd->bindcos= NULL; /* deprecated */
- mmd->totvert= 0;
- mmd->totcagevert= 0;
- mmd->totinfluence= 0;
+ if (mmd->bindweights) MEM_freeN(mmd->bindweights); /* deprecated */
+ if (mmd->bindcos) MEM_freeN(mmd->bindcos); /* deprecated */
+
+ mmd->bindcagecos = NULL;
+ mmd->dyngrid = NULL;
+ mmd->dyninfluences = NULL;
+ mmd->bindinfluences = NULL;
+ mmd->bindoffsets = NULL;
+ mmd->dynverts = NULL;
+ mmd->bindweights = NULL; /* deprecated */
+ mmd->bindcos = NULL; /* deprecated */
+ mmd->totvert = 0;
+ mmd->totcagevert = 0;
+ mmd->totinfluence = 0;
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);
}
else {
DerivedMesh *dm;
- int mode= mmd->modifier.mode;
+ int mode = mmd->modifier.mode;
/* force modifier to run, it will call binding routine */
- mmd->bindfunc= mesh_deform_bind;
+ mmd->bindfunc = mesh_deform_bind;
mmd->modifier.mode |= eModifierMode_Realtime;
if (ob->type == OB_MESH) {
- dm= mesh_create_derived_view(scene, ob, 0);
+ dm = mesh_create_derived_view(scene, ob, 0);
dm->release(dm);
}
else if (ob->type == OB_LATTICE) {
- lattice_calc_modifiers(scene, ob);
+ BKE_lattice_modifiers_calc(scene, ob);
}
- else if (ob->type==OB_MBALL) {
- makeDispListMBall(scene, ob);
+ else if (ob->type == OB_MBALL) {
+ BKE_displist_make_mball(scene, ob);
}
else if (ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT)) {
- makeDispListCurveTypes(scene, ob, 0);
+ BKE_displist_make_curveTypes(scene, ob, 0);
}
- mmd->bindfunc= NULL;
- mmd->modifier.mode= mode;
+ mmd->bindfunc = NULL;
+ mmd->modifier.mode = mode;
}
return OPERATOR_FINISHED;
@@ -1404,7 +1406,7 @@ void OBJECT_OT_meshdeform_bind(wmOperatorType *ot)
ot->exec = meshdeform_bind_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
edit_modifier_properties(ot);
}
@@ -1426,7 +1428,7 @@ static int explode_refresh_exec(bContext *C, wmOperator *op)
emd->flag |= eExplodeFlag_CalcFaces;
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);
return OPERATOR_FINISHED;
}
@@ -1451,7 +1453,7 @@ void OBJECT_OT_explode_refresh(wmOperatorType *ot)
ot->exec = explode_refresh_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
edit_modifier_properties(ot);
}
@@ -1475,11 +1477,11 @@ static void init_ocean_modifier_bake(struct Ocean *oc, struct OceanModifierData
do_normals = (omd->flag & MOD_OCEAN_GENERATE_NORMALS);
do_jacobian = (omd->flag & MOD_OCEAN_GENERATE_FOAM);
- BKE_init_ocean(oc, omd->resolution*omd->resolution, omd->resolution*omd->resolution, omd->spatial_size, omd->spatial_size,
- omd->wind_velocity, omd->smallest_wave, 1.0, omd->wave_direction, omd->damp, omd->wave_alignment,
- omd->depth, omd->time,
- do_heightfield, do_chop, do_normals, do_jacobian,
- omd->seed);
+ BKE_init_ocean(oc, omd->resolution * omd->resolution, omd->resolution * omd->resolution, omd->spatial_size, omd->spatial_size,
+ omd->wind_velocity, omd->smallest_wave, 1.0, omd->wave_direction, omd->damp, omd->wave_alignment,
+ omd->depth, omd->time,
+ do_heightfield, do_chop, do_normals, do_jacobian,
+ omd->seed);
}
typedef struct OceanBakeJob {
@@ -1495,7 +1497,7 @@ typedef struct OceanBakeJob {
static void oceanbake_free(void *customdata)
{
- OceanBakeJob *oj= customdata;
+ OceanBakeJob *oj = customdata;
MEM_freeN(oj);
}
@@ -1514,34 +1516,34 @@ static int oceanbake_breakjob(void *UNUSED(customdata))
/* called by oceanbake, wmJob sends notifier */
static void oceanbake_update(void *customdata, float progress, int *cancel)
{
- OceanBakeJob *oj= customdata;
+ OceanBakeJob *oj = customdata;
if (oceanbake_breakjob(oj))
*cancel = 1;
- *(oj->do_update)= 1;
- *(oj->progress)= progress;
+ *(oj->do_update) = 1;
+ *(oj->progress) = progress;
}
static void oceanbake_startjob(void *customdata, short *stop, short *do_update, float *progress)
{
- OceanBakeJob *oj= customdata;
+ OceanBakeJob *oj = customdata;
- oj->stop= stop;
+ oj->stop = stop;
oj->do_update = do_update;
oj->progress = progress;
- G.afbreek= 0; /* XXX shared with render - replace with job 'stop' switch */
+ G.afbreek = 0; /* XXX shared with render - replace with job 'stop' switch */
BKE_bake_ocean(oj->ocean, oj->och, oceanbake_update, (void *)oj);
- *do_update= 1;
+ *do_update = 1;
*stop = 0;
}
static void oceanbake_endjob(void *customdata)
{
- OceanBakeJob *oj= customdata;
+ OceanBakeJob *oj = customdata;
if (oj->ocean) {
BKE_free_ocean(oj->ocean);
@@ -1559,8 +1561,8 @@ static int ocean_bake_exec(bContext *C, wmOperator *op)
Scene *scene = CTX_data_scene(C);
OceanCache *och;
struct Ocean *ocean;
- int f, cfra, i=0;
- int free= RNA_boolean_get(op->ptr, "free");
+ int f, cfra, i = 0;
+ int free = RNA_boolean_get(op->ptr, "free");
wmJob *steve;
OceanBakeJob *oj;
@@ -1571,7 +1573,7 @@ static int ocean_bake_exec(bContext *C, wmOperator *op)
if (free) {
omd->refresh |= MOD_OCEAN_REFRESH_CLEAR_CACHE;
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);
return OPERATOR_FINISHED;
}
@@ -1579,12 +1581,12 @@ static int ocean_bake_exec(bContext *C, wmOperator *op)
omd->bakestart, omd->bakeend, omd->wave_scale,
omd->chop_amount, omd->foam_coverage, omd->foam_fade, omd->resolution);
- och->time = MEM_mallocN(och->duration*sizeof(float), "foam bake time");
+ och->time = MEM_mallocN(och->duration * sizeof(float), "foam bake time");
cfra = scene->r.cfra;
/* precalculate time variable before baking */
- for (f=omd->bakestart; f<=omd->bakeend; f++) {
+ for (f = omd->bakestart; f <= omd->bakeend; f++) {
/* from physics_fluid.c:
*
* XXX: This can't be used due to an anim sys optimization that ignores recalc object animation,
@@ -1613,7 +1615,7 @@ static int ocean_bake_exec(bContext *C, wmOperator *op)
init_ocean_modifier_bake(ocean, omd);
#if 0
- BKE_bake_ocean(ocean, och);
+ BKE_bake_ocean(ocean, och);
omd->oceancache = och;
omd->cached = TRUE;
@@ -1621,7 +1623,7 @@ static int ocean_bake_exec(bContext *C, wmOperator *op)
scene->r.cfra = cfra;
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);
#endif
/* job stuff */
@@ -1629,14 +1631,14 @@ static int ocean_bake_exec(bContext *C, wmOperator *op)
scene->r.cfra = cfra;
/* setup job */
- steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene, "Ocean Simulation", WM_JOB_PROGRESS);
- oj= MEM_callocN(sizeof(OceanBakeJob), "ocean bake job");
+ steve = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene, "Ocean Simulation", WM_JOB_PROGRESS);
+ oj = MEM_callocN(sizeof(OceanBakeJob), "ocean bake job");
oj->ocean = ocean;
oj->och = och;
oj->omd = omd;
WM_jobs_customdata(steve, oj, oceanbake_free);
- WM_jobs_timer(steve, 0.1, NC_OBJECT|ND_MODIFIER, NC_OBJECT|ND_MODIFIER);
+ WM_jobs_timer(steve, 0.1, NC_OBJECT | ND_MODIFIER, NC_OBJECT | ND_MODIFIER);
WM_jobs_callbacks(steve, oceanbake_startjob, NULL, NULL, oceanbake_endjob);
WM_jobs_start(CTX_wm_manager(C), steve);
@@ -1666,7 +1668,7 @@ void OBJECT_OT_ocean_bake(wmOperatorType *ot)
ot->exec = ocean_bake_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
edit_modifier_properties(ot);
RNA_def_boolean(ot->srna, "free", FALSE, "Free", "Free the bake, rather than generating it");
diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c
index 43385ea80a3..9f5ae7e255f 100644
--- a/source/blender/editors/object/object_ops.c
+++ b/source/blender/editors/object/object_ops.c
@@ -77,6 +77,7 @@ void ED_operatortypes_object(void)
WM_operatortype_append(OBJECT_OT_shade_smooth);
WM_operatortype_append(OBJECT_OT_shade_flat);
WM_operatortype_append(OBJECT_OT_paths_calculate);
+ WM_operatortype_append(OBJECT_OT_paths_update);
WM_operatortype_append(OBJECT_OT_paths_clear);
WM_operatortype_append(OBJECT_OT_forcefield_toggle);
@@ -223,18 +224,18 @@ void ED_operatormacros_object(void)
wmOperatorType *ot;
wmOperatorTypeMacro *otmacro;
- ot = WM_operatortype_append_macro("OBJECT_OT_duplicate_move", "Duplicate Objects", OPTYPE_UNDO|OPTYPE_REGISTER);
+ ot = WM_operatortype_append_macro("OBJECT_OT_duplicate_move", "Duplicate Objects",
+ "Duplicate selected objects and move them", OPTYPE_UNDO | OPTYPE_REGISTER);
if (ot) {
- ot->description = "Duplicate selected objects and move them";
WM_operatortype_macro_define(ot, "OBJECT_OT_duplicate");
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_enum_set(otmacro->ptr, "proportional", PROP_EDIT_OFF);
}
/* grr, should be able to pass options on... */
- ot = WM_operatortype_append_macro("OBJECT_OT_duplicate_move_linked", "Duplicate Linked", OPTYPE_UNDO|OPTYPE_REGISTER);
+ ot = WM_operatortype_append_macro("OBJECT_OT_duplicate_move_linked", "Duplicate Linked",
+ "Duplicate selected objects and move them", OPTYPE_UNDO | OPTYPE_REGISTER);
if (ot) {
- ot->description = "Duplicate selected objects and move them";
otmacro = WM_operatortype_macro_define(ot, "OBJECT_OT_duplicate");
RNA_boolean_set(otmacro->ptr, "linked", TRUE);
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
@@ -242,10 +243,10 @@ void ED_operatormacros_object(void)
}
/* XXX */
- ot = WM_operatortype_append_macro("OBJECT_OT_add_named_cursor", "Add named object at cursor", OPTYPE_UNDO|OPTYPE_REGISTER);
+ ot = WM_operatortype_append_macro("OBJECT_OT_add_named_cursor", "Add Named At Cursor",
+ "Add named object at cursor", OPTYPE_UNDO | OPTYPE_REGISTER);
if (ot) {
- ot->description = "Add named object at cursor";
- RNA_def_string(ot->srna, "name", "Cube", MAX_ID_NAME-2, "Name", "Object name to add");
+ RNA_def_string(ot->srna, "name", "Cube", MAX_ID_NAME - 2, "Name", "Object name to add");
WM_operatortype_macro_define(ot, "VIEW3D_OT_cursor3d");
WM_operatortype_macro_define(ot, "OBJECT_OT_add_named");
@@ -254,7 +255,7 @@ void ED_operatormacros_object(void)
static int object_mode_poll(bContext *C)
{
- Object *ob= CTX_data_active_object(C);
+ Object *ob = CTX_data_active_object(C);
return (!ob || ob->mode == OB_MODE_OBJECT);
}
@@ -284,7 +285,7 @@ void ED_keymap_object(wmKeyConfig *keyconf)
RNA_enum_set(kmi->ptr, "mode", OB_MODE_WEIGHT_PAINT);
RNA_boolean_set(kmi->ptr, "toggle", TRUE);
- WM_keymap_add_item(keymap, "OBJECT_OT_origin_set", CKEY, KM_PRESS, KM_ALT|KM_SHIFT|KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "OBJECT_OT_origin_set", CKEY, KM_PRESS, KM_ALT | KM_SHIFT | KM_CTRL, 0);
/* Object Mode ---------------------------------------------------------------- */
/* Note: this keymap gets disabled in non-objectmode, */
@@ -303,7 +304,7 @@ void ED_keymap_object(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "OBJECT_OT_select_linked", LKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "OBJECT_OT_select_grouped", GKEY, KM_PRESS, KM_SHIFT, 0);
- WM_keymap_add_item(keymap, "OBJECT_OT_select_mirror", MKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "OBJECT_OT_select_mirror", MKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
kmi = WM_keymap_add_item(keymap, "OBJECT_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, 0, 0);
RNA_enum_set_identifier(kmi->ptr, "direction", "PARENT");
@@ -322,13 +323,13 @@ void ED_keymap_object(wmKeyConfig *keyconf)
RNA_boolean_set(kmi->ptr, "extend", TRUE);
WM_keymap_verify_item(keymap, "OBJECT_OT_parent_set", PKEY, KM_PRESS, KM_CTRL, 0);
- WM_keymap_verify_item(keymap, "OBJECT_OT_parent_no_inverse_set", PKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
+ WM_keymap_verify_item(keymap, "OBJECT_OT_parent_no_inverse_set", PKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
WM_keymap_verify_item(keymap, "OBJECT_OT_parent_clear", PKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_verify_item(keymap, "OBJECT_OT_track_set", TKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_verify_item(keymap, "OBJECT_OT_track_clear", TKEY, KM_PRESS, KM_ALT, 0);
- WM_keymap_verify_item(keymap, "OBJECT_OT_constraint_add_with_targets", CKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
- WM_keymap_verify_item(keymap, "OBJECT_OT_constraints_clear", CKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
+ WM_keymap_verify_item(keymap, "OBJECT_OT_constraint_add_with_targets", CKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
+ WM_keymap_verify_item(keymap, "OBJECT_OT_constraints_clear", CKEY, KM_PRESS, KM_CTRL | KM_ALT, 0);
WM_keymap_verify_item(keymap, "OBJECT_OT_location_clear", GKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_verify_item(keymap, "OBJECT_OT_rotation_clear", RKEY, KM_PRESS, KM_ALT, 0);
@@ -343,13 +344,13 @@ void ED_keymap_object(wmKeyConfig *keyconf)
RNA_boolean_set(kmi->ptr, "unselected", TRUE);
/* same as above but for rendering */
- WM_keymap_add_item(keymap, "OBJECT_OT_hide_render_clear", HKEY, KM_PRESS, KM_ALT|KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "OBJECT_OT_hide_render_clear", HKEY, KM_PRESS, KM_ALT | KM_CTRL, 0);
WM_keymap_add_item(keymap, "OBJECT_OT_hide_render_set", HKEY, KM_PRESS, KM_CTRL, 0);
/* conflicts, removing */
#if 0
- kmi = WM_keymap_add_item(keymap, "OBJECT_OT_hide_render_set", HKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0)
- RNA_boolean_set(kmi->ptr, "unselected", TRUE);
+ kmi = WM_keymap_add_item(keymap, "OBJECT_OT_hide_render_set", HKEY, KM_PRESS, KM_SHIFT | KM_CTRL, 0)
+ RNA_boolean_set(kmi->ptr, "unselected", TRUE);
#endif
WM_keymap_add_item(keymap, "OBJECT_OT_move_to_layer", MKEY, KM_PRESS, 0, 0);
@@ -367,7 +368,7 @@ void ED_keymap_object(wmKeyConfig *keyconf)
WM_keymap_add_menu(keymap, "INFO_MT_add", AKEY, KM_PRESS, KM_SHIFT, 0);
- WM_keymap_add_item(keymap, "OBJECT_OT_duplicates_make_real", AKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "OBJECT_OT_duplicates_make_real", AKEY, KM_PRESS, KM_SHIFT | KM_CTRL, 0);
WM_keymap_add_menu(keymap, "VIEW3D_MT_object_apply", AKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_menu(keymap, "VIEW3D_MT_make_single_user", UKEY, KM_PRESS, 0, 0);
@@ -378,23 +379,23 @@ void ED_keymap_object(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "OBJECT_OT_join", JKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "OBJECT_OT_convert", CKEY, KM_PRESS, KM_ALT, 0);
- WM_keymap_add_item(keymap, "OBJECT_OT_proxy_make", PKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
+ WM_keymap_add_item(keymap, "OBJECT_OT_proxy_make", PKEY, KM_PRESS, KM_CTRL | KM_ALT, 0);
WM_keymap_add_item(keymap, "OBJECT_OT_make_local", LKEY, KM_PRESS, 0, 0);
// XXX this should probably be in screen instead... here for testing purposes in the meantime... - Aligorith
WM_keymap_verify_item(keymap, "ANIM_OT_keyframe_insert_menu", IKEY, KM_PRESS, 0, 0);
WM_keymap_verify_item(keymap, "ANIM_OT_keyframe_delete_v3d", IKEY, KM_PRESS, KM_ALT, 0);
- WM_keymap_verify_item(keymap, "ANIM_OT_keying_set_active_set", IKEY, KM_PRESS, KM_CTRL|KM_SHIFT|KM_ALT, 0);
+ WM_keymap_verify_item(keymap, "ANIM_OT_keying_set_active_set", IKEY, KM_PRESS, KM_CTRL | KM_SHIFT | KM_ALT, 0);
WM_keymap_verify_item(keymap, "GROUP_OT_create", GKEY, KM_PRESS, KM_CTRL, 0);
- WM_keymap_verify_item(keymap, "GROUP_OT_objects_remove", GKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
- WM_keymap_verify_item(keymap, "GROUP_OT_objects_add_active", GKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
- WM_keymap_verify_item(keymap, "GROUP_OT_objects_remove_active", GKEY, KM_PRESS, KM_SHIFT|KM_ALT, 0);
+ WM_keymap_verify_item(keymap, "GROUP_OT_objects_remove", GKEY, KM_PRESS, KM_CTRL | KM_ALT, 0);
+ WM_keymap_verify_item(keymap, "GROUP_OT_objects_add_active", GKEY, KM_PRESS, KM_SHIFT | KM_CTRL, 0);
+ WM_keymap_verify_item(keymap, "GROUP_OT_objects_remove_active", GKEY, KM_PRESS, KM_SHIFT | KM_ALT, 0);
WM_keymap_add_menu(keymap, "VIEW3D_MT_object_specials", WKEY, KM_PRESS, 0, 0);
- for (i=0; i<=5; i++) {
- kmi = WM_keymap_add_item(keymap, "OBJECT_OT_subdivision_set", ZEROKEY+i, KM_PRESS, KM_CTRL, 0);
+ for (i = 0; i <= 5; i++) {
+ kmi = WM_keymap_add_item(keymap, "OBJECT_OT_subdivision_set", ZEROKEY + i, KM_PRESS, KM_CTRL, 0);
RNA_int_set(kmi->ptr, "level", i);
}
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index a666f04034b..b3e16c8d4eb 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -110,9 +110,9 @@ static int vertex_parent_set_poll(bContext *C)
static int vertex_parent_set_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- Object *obedit= CTX_data_edit_object(C);
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ Object *obedit = CTX_data_edit_object(C);
BMVert *eve;
BMIter iter;
Curve *cu;
@@ -120,18 +120,18 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op)
BezTriple *bezt;
BPoint *bp;
Object *par;
- int a, v1=0, v2=0, v3=0, v4=0, nr=1;
+ int a, v1 = 0, v2 = 0, v3 = 0, v4 = 0, nr = 1;
/* we need 1 to 3 selected vertices */
- if (obedit->type==OB_MESH) {
- Mesh *me= obedit->data;
+ if (obedit->type == OB_MESH) {
+ Mesh *me = obedit->data;
BMEditMesh *em;
EDBM_mesh_load(obedit);
EDBM_mesh_make(scene->toolsettings, scene, obedit);
- em= me->edit_btmesh;
+ em = me->edit_btmesh;
/* derivedMesh might be needed for solving parenting,
* so re-create it here */
@@ -139,31 +139,31 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op)
BM_ITER_MESH (eve, &iter, em->bm, BM_VERTS_OF_MESH) {
if (BM_elem_flag_test(eve, BM_ELEM_SELECT)) {
- if (v1==0) v1= nr;
- else if (v2==0) v2= nr;
- else if (v3==0) v3= nr;
- else if (v4==0) v4= nr;
+ if (v1 == 0) v1 = nr;
+ else if (v2 == 0) v2 = nr;
+ else if (v3 == 0) v3 = nr;
+ else if (v4 == 0) v4 = nr;
else break;
}
nr++;
}
}
else if (ELEM(obedit->type, OB_SURF, OB_CURVE)) {
- ListBase *editnurb= object_editcurve_get(obedit);
+ ListBase *editnurb = object_editcurve_get(obedit);
- cu= obedit->data;
+ cu = obedit->data;
- nu= editnurb->first;
+ nu = editnurb->first;
while (nu) {
if (nu->type == CU_BEZIER) {
- bezt= nu->bezt;
- a= nu->pntsu;
+ bezt = nu->bezt;
+ a = nu->pntsu;
while (a--) {
if (BEZSELECTED_HIDDENHANDLES(cu, bezt)) {
- if (v1==0) v1= nr;
- else if (v2==0) v2= nr;
- else if (v3==0) v3= nr;
- else if (v4==0) v4= nr;
+ if (v1 == 0) v1 = nr;
+ else if (v2 == 0) v2 = nr;
+ else if (v3 == 0) v3 = nr;
+ else if (v4 == 0) v4 = nr;
else break;
}
nr++;
@@ -171,34 +171,34 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op)
}
}
else {
- bp= nu->bp;
- a= nu->pntsu*nu->pntsv;
+ bp = nu->bp;
+ a = nu->pntsu * nu->pntsv;
while (a--) {
if (bp->f1 & SELECT) {
- if (v1==0) v1= nr;
- else if (v2==0) v2= nr;
- else if (v3==0) v3= nr;
- else if (v4==0) v4= nr;
+ if (v1 == 0) v1 = nr;
+ else if (v2 == 0) v2 = nr;
+ else if (v3 == 0) v3 = nr;
+ else if (v4 == 0) v4 = nr;
else break;
}
nr++;
bp++;
}
}
- nu= nu->next;
+ nu = nu->next;
}
}
- else if (obedit->type==OB_LATTICE) {
- Lattice *lt= obedit->data;
+ else if (obedit->type == OB_LATTICE) {
+ Lattice *lt = obedit->data;
- a= lt->editlatt->latt->pntsu*lt->editlatt->latt->pntsv*lt->editlatt->latt->pntsw;
- bp= lt->editlatt->latt->def;
+ a = lt->editlatt->latt->pntsu * lt->editlatt->latt->pntsv * lt->editlatt->latt->pntsw;
+ bp = lt->editlatt->latt->def;
while (a--) {
if (bp->f1 & SELECT) {
- if (v1==0) v1= nr;
- else if (v2==0) v2= nr;
- else if (v3==0) v3= nr;
- else if (v4==0) v4= nr;
+ if (v1 == 0) v1 = nr;
+ else if (v2 == 0) v2 = nr;
+ else if (v3 == 0) v3 = nr;
+ else if (v4 == 0) v4 = nr;
else break;
}
nr++;
@@ -206,19 +206,20 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op)
}
}
- if (v4 || !((v1 && v2==0 && v3==0) || (v1 && v2 && v3)) ) {
+ if (v4 || !((v1 && v2 == 0 && v3 == 0) || (v1 && v2 && v3)) ) {
BKE_report(op->reports, RPT_ERROR, "Select either 1 or 3 vertices to parent to");
return OPERATOR_CANCELLED;
}
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
+ {
if (ob != obedit) {
- ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
- par= obedit->parent;
+ ob->recalc |= OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME;
+ par = obedit->parent;
while (par) {
- if (par==ob) break;
- par= par->parent;
+ if (par == ob) break;
+ par = par->parent;
}
if (par) {
BKE_report(op->reports, RPT_ERROR, "Loop in parents");
@@ -226,23 +227,23 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op)
else {
Object workob;
- ob->parent= BASACT->object;
+ ob->parent = BASACT->object;
if (v3) {
- ob->partype= PARVERT3;
- ob->par1= v1-1;
- ob->par2= v2-1;
- ob->par3= v3-1;
+ ob->partype = PARVERT3;
+ ob->par1 = v1 - 1;
+ ob->par2 = v2 - 1;
+ ob->par3 = v3 - 1;
/* inverse parent matrix */
- what_does_parent(scene, ob, &workob);
+ BKE_object_workob_calc_parent(scene, ob, &workob);
invert_m4_m4(ob->parentinv, workob.obmat);
}
else {
- ob->partype= PARVERT1;
- ob->par1= v1-1;
+ ob->partype = PARVERT1;
+ ob->par1 = v1 - 1;
/* inverse parent matrix */
- what_does_parent(scene, ob, &workob);
+ BKE_object_workob_calc_parent(scene, ob, &workob);
invert_m4_m4(ob->parentinv, workob.obmat);
}
}
@@ -270,16 +271,16 @@ void OBJECT_OT_vertex_parent_set(wmOperatorType *ot)
ot->exec = vertex_parent_set_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/********************** Make Proxy Operator *************************/
/* set the object to proxify */
-static int make_proxy_invoke (bContext *C, wmOperator *op, wmEvent *evt)
+static int make_proxy_invoke(bContext *C, wmOperator *op, wmEvent *evt)
{
- Scene *scene= CTX_data_scene(C);
- Object *ob= ED_object_active_context(C);
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = ED_object_active_context(C);
/* sanity checks */
if (!scene || scene->id.lib || !ob)
@@ -294,8 +295,8 @@ static int make_proxy_invoke (bContext *C, wmOperator *op, wmEvent *evt)
}
else if (ob->id.lib) {
- uiPopupMenu *pup= uiPupMenuBegin(C, "OK?", ICON_QUESTION);
- uiLayout *layout= uiPupMenuLayout(pup);
+ uiPopupMenu *pup = uiPupMenuBegin(C, "OK?", ICON_QUESTION);
+ uiLayout *layout = uiPupMenuLayout(pup);
/* create operator menu item with relevant properties filled in */
uiItemFullO_ptr(layout, op->type, op->type->name, ICON_NONE, NULL, WM_OP_EXEC_REGION_WIN, UI_ITEM_O_RETURN_PROPS);
@@ -312,51 +313,51 @@ static int make_proxy_invoke (bContext *C, wmOperator *op, wmEvent *evt)
return OPERATOR_CANCELLED;
}
-static int make_proxy_exec (bContext *C, wmOperator *op)
+static int make_proxy_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Object *ob, *gob= ED_object_active_context(C);
+ Main *bmain = CTX_data_main(C);
+ Object *ob, *gob = ED_object_active_context(C);
GroupObject *go;
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
if (gob->dup_group != NULL) {
- go= BLI_findlink(&gob->dup_group->gobject, RNA_enum_get(op->ptr, "object"));
- ob= go->ob;
+ go = BLI_findlink(&gob->dup_group->gobject, RNA_enum_get(op->ptr, "object"));
+ ob = go->ob;
}
else {
- ob= gob;
+ ob = gob;
gob = NULL;
}
if (ob) {
Object *newob;
- Base *newbase, *oldbase= BASACT;
- char name[MAX_ID_NAME+4];
+ Base *newbase, *oldbase = BASACT;
+ char name[MAX_ID_NAME + 4];
/* Add new object for the proxy */
- newob= add_object(scene, OB_EMPTY);
+ newob = BKE_object_add(scene, OB_EMPTY);
- BLI_snprintf(name, sizeof(name), "%s_proxy", ((ID *)(gob ? gob : ob))->name+2);
+ BLI_snprintf(name, sizeof(name), "%s_proxy", ((ID *)(gob ? gob : ob))->name + 2);
rename_id(&newob->id, name);
/* set layers OK */
- newbase= BASACT; /* add_object sets active... */
- newbase->lay= oldbase->lay;
- newob->lay= newbase->lay;
+ newbase = BASACT; /* BKE_object_add sets active... */
+ newbase->lay = oldbase->lay;
+ newob->lay = newbase->lay;
- /* remove base, leave user count of object, it gets linked in object_make_proxy */
- if (gob==NULL) {
+ /* remove base, leave user count of object, it gets linked in BKE_object_make_proxy */
+ if (gob == NULL) {
BLI_remlink(&scene->base, oldbase);
MEM_freeN(oldbase);
}
- object_make_proxy(newob, ob, gob);
+ BKE_object_make_proxy(newob, ob, gob);
/* depsgraph flushes are needed for the new data */
DAG_scene_sort(bmain, scene);
- DAG_id_tag_update(&newob->id, OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, newob);
+ DAG_id_tag_update(&newob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, newob);
}
else {
BKE_report(op->reports, RPT_ERROR, "No object to make proxy for");
@@ -369,29 +370,29 @@ static int make_proxy_exec (bContext *C, wmOperator *op)
/* Generic itemf's for operators that take library args */
static EnumPropertyItem *proxy_group_object_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
{
- EnumPropertyItem item_tmp= {0}, *item= NULL;
- int totitem= 0;
- int i= 0;
- Object *ob= ED_object_active_context(C);
+ EnumPropertyItem item_tmp = {0}, *item = NULL;
+ int totitem = 0;
+ int i = 0;
+ Object *ob = ED_object_active_context(C);
GroupObject *go;
if (!ob || !ob->dup_group)
return DummyRNA_DEFAULT_items;
/* find the object to affect */
- for (go= ob->dup_group->gobject.first; go; go= go->next) {
- item_tmp.identifier= item_tmp.name= go->ob->id.name+2;
- item_tmp.value= i++;
+ for (go = ob->dup_group->gobject.first; go; go = go->next) {
+ item_tmp.identifier = item_tmp.name = go->ob->id.name + 2;
+ item_tmp.value = i++;
RNA_enum_item_add(&item, &totitem, &item_tmp);
}
RNA_enum_item_end(&item, &totitem);
- *free= 1;
+ *free = 1;
return item;
}
-void OBJECT_OT_proxy_make (wmOperatorType *ot)
+void OBJECT_OT_proxy_make(wmOperatorType *ot)
{
PropertyRNA *prop;
@@ -406,10 +407,10 @@ void OBJECT_OT_proxy_make (wmOperatorType *ot)
ot->poll = ED_operator_object_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
- prop= RNA_def_enum(ot->srna, "object", DummyRNA_DEFAULT_items, 0, "Proxy Object", "Name of lib-linked/grouped object to make a proxy for"); /* XXX, relies on hard coded ID at the moment */
+ prop = RNA_def_enum(ot->srna, "object", DummyRNA_DEFAULT_items, 0, "Proxy Object", "Name of lib-linked/grouped object to make a proxy for"); /* XXX, relies on hard coded ID at the moment */
RNA_def_enum_funcs(prop, proxy_group_object_itemf);
ot->prop = prop;
}
@@ -425,32 +426,32 @@ EnumPropertyItem prop_clear_parent_types[] = {
void ED_object_parent_clear(bContext *C, int type)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects)
+ CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
{
if (ob->parent == NULL)
continue;
if (type == 0) {
- ob->parent= NULL;
+ ob->parent = NULL;
}
else if (type == 1) {
- ob->parent= NULL;
- object_apply_mat4(ob, ob->obmat, TRUE, FALSE);
+ ob->parent = NULL;
+ BKE_object_apply_mat4(ob, ob->obmat, TRUE, FALSE);
}
else if (type == 2)
unit_m4(ob->parentinv);
- ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
+ ob->recalc |= OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME;
}
CTX_DATA_END;
DAG_scene_sort(bmain, scene);
DAG_ids_flush_update(bmain, 0);
- WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARENT, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_PARENT, NULL);
}
/* note, poll should check for editable scene */
@@ -475,7 +476,7 @@ void OBJECT_OT_parent_clear(wmOperatorType *ot)
ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
ot->prop = RNA_def_enum(ot->srna, "type", prop_clear_parent_types, 0, "Type", "");
}
@@ -485,15 +486,15 @@ void OBJECT_OT_parent_clear(wmOperatorType *ot)
void ED_object_parent(Object *ob, Object *par, int type, const char *substr)
{
if (!par || BKE_object_parent_loop_check(par, ob)) {
- ob->parent= NULL;
- ob->partype= PAROBJECT;
- ob->parsubstr[0]= 0;
+ ob->parent = NULL;
+ ob->partype = PAROBJECT;
+ ob->parsubstr[0] = 0;
return;
}
/* this could use some more checks */
- ob->parent= par;
+ ob->parent = par;
ob->partype &= ~PARTYPE;
ob->partype |= type;
BLI_strncpy(ob->parsubstr, substr, sizeof(ob->parsubstr));
@@ -518,21 +519,21 @@ EnumPropertyItem prop_make_parent_types[] = {
int ED_object_parent_set(ReportList *reports, Main *bmain, Scene *scene, Object *ob, Object *par, int partype)
{
- bPoseChannel *pchan= NULL;
- int pararm= ELEM4(partype, PAR_ARMATURE, PAR_ARMATURE_NAME, PAR_ARMATURE_ENVELOPE, PAR_ARMATURE_AUTO);
+ bPoseChannel *pchan = NULL;
+ int pararm = ELEM4(partype, PAR_ARMATURE, PAR_ARMATURE_NAME, PAR_ARMATURE_ENVELOPE, PAR_ARMATURE_AUTO);
par->recalc |= OB_RECALC_OB;
/* preconditions */
- if (partype==PAR_FOLLOW || partype==PAR_PATH_CONST) {
- if (par->type!=OB_CURVE)
+ if (partype == PAR_FOLLOW || partype == PAR_PATH_CONST) {
+ if (par->type != OB_CURVE)
return 0;
else {
- Curve *cu= par->data;
+ Curve *cu = par->data;
- if ((cu->flag & CU_PATH)==0) {
- cu->flag |= CU_PATH|CU_FOLLOW;
- makeDispListCurveTypes(scene, par, 0); /* force creation of path data */
+ if ((cu->flag & CU_PATH) == 0) {
+ cu->flag |= CU_PATH | CU_FOLLOW;
+ BKE_displist_make_curveTypes(scene, par, 0); /* force creation of path data */
}
else cu->flag |= CU_FOLLOW;
@@ -549,19 +550,19 @@ int ED_object_parent_set(ReportList *reports, Main *bmain, Scene *scene, Object
/* fall back on regular parenting now (for follow only) */
if (partype == PAR_FOLLOW)
- partype= PAR_OBJECT;
+ partype = PAR_OBJECT;
}
}
- else if (partype==PAR_BONE) {
- pchan= get_active_posechannel(par);
+ else if (partype == PAR_BONE) {
+ pchan = BKE_pose_channel_active(par);
- if (pchan==NULL) {
+ if (pchan == NULL) {
BKE_report(reports, RPT_ERROR, "No active Bone");
return 0;
}
}
- if (ob!=par) {
+ if (ob != par) {
if (BKE_object_parent_loop_check(par, ob)) {
BKE_report(reports, RPT_ERROR, "Loop in parents");
return 0;
@@ -570,18 +571,18 @@ int ED_object_parent_set(ReportList *reports, Main *bmain, Scene *scene, Object
Object workob;
/* apply transformation of previous parenting */
- /* object_apply_mat4(ob, ob->obmat); */ /* removed because of bug [#23577] */
+ /* BKE_object_apply_mat4(ob, ob->obmat); */ /* removed because of bug [#23577] */
/* set the parent (except for follow-path constraint option) */
if (partype != PAR_PATH_CONST) {
- ob->parent= par;
+ ob->parent = par;
}
/* handle types */
if (pchan)
BLI_strncpy(ob->parsubstr, pchan->name, sizeof(ob->parsubstr));
else
- ob->parsubstr[0]= 0;
+ ob->parsubstr[0] = 0;
if (partype == PAR_PATH_CONST) {
/* don't do anything here, since this is not technically "parenting" */
@@ -590,7 +591,7 @@ int ED_object_parent_set(ReportList *reports, Main *bmain, Scene *scene, Object
/* partype is now set to PAROBJECT so that invisible 'virtual' modifiers don't need to be created
* NOTE: the old (2.4x) method was to set ob->partype = PARSKEL, creating the virtual modifiers
*/
- ob->partype= PAROBJECT; /* note, dna define, not operator property */
+ ob->partype = PAROBJECT; /* note, dna define, not operator property */
//ob->partype= PARSKEL; /* note, dna define, not operator property */
/* BUT, to keep the deforms, we need a modifier, and then we need to set the object that it uses */
@@ -599,25 +600,25 @@ int ED_object_parent_set(ReportList *reports, Main *bmain, Scene *scene, Object
ModifierData *md;
switch (partype) {
- case PAR_CURVE: /* curve deform */
- md= ED_object_modifier_add(reports, bmain, scene, ob, NULL, eModifierType_Curve);
- ((CurveModifierData *)md)->object= par;
- break;
- case PAR_LATTICE: /* lattice deform */
- md= ED_object_modifier_add(reports, bmain, scene, ob, NULL, eModifierType_Lattice);
- ((LatticeModifierData *)md)->object= par;
- break;
- default: /* armature deform */
- md= ED_object_modifier_add(reports, bmain, scene, ob, NULL, eModifierType_Armature);
- ((ArmatureModifierData *)md)->object= par;
- break;
+ case PAR_CURVE: /* curve deform */
+ md = ED_object_modifier_add(reports, bmain, scene, ob, NULL, eModifierType_Curve);
+ ((CurveModifierData *)md)->object = par;
+ break;
+ case PAR_LATTICE: /* lattice deform */
+ md = ED_object_modifier_add(reports, bmain, scene, ob, NULL, eModifierType_Lattice);
+ ((LatticeModifierData *)md)->object = par;
+ break;
+ default: /* armature deform */
+ md = ED_object_modifier_add(reports, bmain, scene, ob, NULL, eModifierType_Armature);
+ ((ArmatureModifierData *)md)->object = par;
+ break;
}
}
}
else if (partype == PAR_BONE)
- ob->partype= PARBONE; /* note, dna define, not operator property */
+ ob->partype = PARBONE; /* note, dna define, not operator property */
else
- ob->partype= PAROBJECT; /* note, dna define, not operator property */
+ ob->partype = PAROBJECT; /* note, dna define, not operator property */
/* constraint */
if (partype == PAR_PATH_CONST) {
@@ -637,7 +638,7 @@ int ED_object_parent_set(ReportList *reports, Main *bmain, Scene *scene, Object
ob->loc[1] = vec[1];
ob->loc[2] = vec[2];
}
- else if (pararm && ob->type==OB_MESH && par->type == OB_ARMATURE) {
+ else if (pararm && ob->type == OB_MESH && par->type == OB_ARMATURE) {
if (partype == PAR_ARMATURE_NAME)
create_vgroups_from_armature(reports, scene, ob, par, ARM_GROUPS_NAME, 0);
else if (partype == PAR_ARMATURE_ENVELOPE)
@@ -648,18 +649,18 @@ int ED_object_parent_set(ReportList *reports, Main *bmain, Scene *scene, Object
WM_cursor_wait(0);
}
/* get corrected inverse */
- ob->partype= PAROBJECT;
- what_does_parent(scene, ob, &workob);
+ ob->partype = PAROBJECT;
+ BKE_object_workob_calc_parent(scene, ob, &workob);
invert_m4_m4(ob->parentinv, workob.obmat);
}
else {
/* calculate inverse parent matrix */
- what_does_parent(scene, ob, &workob);
+ BKE_object_workob_calc_parent(scene, ob, &workob);
invert_m4_m4(ob->parentinv, workob.obmat);
}
- ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA;
+ ob->recalc |= OB_RECALC_OB | OB_RECALC_DATA;
}
}
@@ -668,13 +669,13 @@ int ED_object_parent_set(ReportList *reports, Main *bmain, Scene *scene, Object
static int parent_set_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- Object *par= ED_object_active_context(C);
- int partype= RNA_enum_get(op->ptr, "type");
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ Object *par = ED_object_active_context(C);
+ int partype = RNA_enum_get(op->ptr, "type");
int ok = 1;
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects)
+ CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
{
if (!ED_object_parent_set(op->reports, bmain, scene, ob, par, partype)) {
ok = 0;
@@ -688,8 +689,8 @@ static int parent_set_exec(bContext *C, wmOperator *op)
DAG_scene_sort(bmain, scene);
DAG_ids_flush_update(bmain, 0);
- WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARENT, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_PARENT, NULL);
return OPERATOR_FINISHED;
}
@@ -697,22 +698,22 @@ static int parent_set_exec(bContext *C, wmOperator *op)
static int parent_set_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(event))
{
- Object *ob= ED_object_active_context(C);
- uiPopupMenu *pup= uiPupMenuBegin(C, "Set Parent To", ICON_NONE);
- uiLayout *layout= uiPupMenuLayout(pup);
+ Object *ob = ED_object_active_context(C);
+ uiPopupMenu *pup = uiPupMenuBegin(C, "Set Parent To", ICON_NONE);
+ uiLayout *layout = uiPupMenuLayout(pup);
uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT);
uiItemEnumO(layout, "OBJECT_OT_parent_set", NULL, 0, "type", PAR_OBJECT);
/* ob becomes parent, make the associated menus */
- if (ob->type==OB_ARMATURE) {
+ if (ob->type == OB_ARMATURE) {
uiItemEnumO(layout, "OBJECT_OT_parent_set", NULL, 0, "type", PAR_ARMATURE);
uiItemEnumO(layout, "OBJECT_OT_parent_set", NULL, 0, "type", PAR_ARMATURE_NAME);
uiItemEnumO(layout, "OBJECT_OT_parent_set", NULL, 0, "type", PAR_ARMATURE_ENVELOPE);
uiItemEnumO(layout, "OBJECT_OT_parent_set", NULL, 0, "type", PAR_ARMATURE_AUTO);
uiItemEnumO(layout, "OBJECT_OT_parent_set", NULL, 0, "type", PAR_BONE);
}
- else if (ob->type==OB_CURVE) {
+ else if (ob->type == OB_CURVE) {
uiItemEnumO(layout, "OBJECT_OT_parent_set", NULL, 0, "type", PAR_CURVE);
uiItemEnumO(layout, "OBJECT_OT_parent_set", NULL, 0, "type", PAR_FOLLOW);
uiItemEnumO(layout, "OBJECT_OT_parent_set", NULL, 0, "type", PAR_PATH_CONST);
@@ -741,7 +742,7 @@ void OBJECT_OT_parent_set(wmOperatorType *ot)
ot->poll = ED_operator_object_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_enum(ot->srna, "type", prop_make_parent_types, 0, "Type", "");
}
@@ -750,13 +751,14 @@ void OBJECT_OT_parent_set(wmOperatorType *ot)
static int parent_noinv_set_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Object *par= ED_object_active_context(C);
+ Main *bmain = CTX_data_main(C);
+ Object *par = ED_object_active_context(C);
par->recalc |= OB_RECALC_OB;
/* context iterator */
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
+ {
if (ob != par) {
if (BKE_object_parent_loop_check(par, ob)) {
BKE_report(op->reports, RPT_ERROR, "Loop in parents");
@@ -764,14 +766,14 @@ static int parent_noinv_set_exec(bContext *C, wmOperator *op)
else {
/* clear inverse matrix and also the object location */
unit_m4(ob->parentinv);
- memset(ob->loc, 0, 3*sizeof(float));
+ memset(ob->loc, 0, 3 * sizeof(float));
/* set recalc flags */
- ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA;
+ ob->recalc |= OB_RECALC_OB | OB_RECALC_DATA;
/* set parenting type for object - object only... */
- ob->parent= par;
- ob->partype= PAROBJECT; /* note, dna define, not operator property */
+ ob->parent = par;
+ ob->partype = PAROBJECT; /* note, dna define, not operator property */
}
}
}
@@ -779,7 +781,7 @@ static int parent_noinv_set_exec(bContext *C, wmOperator *op)
DAG_scene_sort(bmain, CTX_data_scene(C));
DAG_ids_flush_update(bmain, 0);
- WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
return OPERATOR_FINISHED;
}
@@ -797,21 +799,22 @@ void OBJECT_OT_parent_no_inverse_set(wmOperatorType *ot)
ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/************************ Clear Slow Parent Operator *********************/
static int object_slow_parent_clear_exec(bContext *C, wmOperator *UNUSED(op))
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
+ {
if (ob->parent) {
if (ob->partype & PARSLOW) {
ob->partype -= PARSLOW;
- where_is_object(scene, ob);
+ BKE_object_where_is_calc(scene, ob);
ob->partype |= PARSLOW;
ob->recalc |= OB_RECALC_OB;
}
@@ -839,17 +842,18 @@ void OBJECT_OT_slow_parent_clear(wmOperatorType *ot)
ot->poll = ED_operator_view3d_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/********************** Make Slow Parent Operator *********************/
static int object_slow_parent_set_exec(bContext *C, wmOperator *UNUSED(op))
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
+ {
if (ob->parent)
ob->partype |= PARSLOW;
@@ -878,7 +882,7 @@ void OBJECT_OT_slow_parent_set(wmOperatorType *ot)
ot->poll = ED_operator_view3d_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ******************** Clear Track Operator ******************* */
@@ -892,36 +896,37 @@ static EnumPropertyItem prop_clear_track_types[] = {
/* note, poll should check for editable scene */
static int object_track_clear_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- int type= RNA_enum_get(op->ptr, "type");
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ int type = RNA_enum_get(op->ptr, "type");
if (CTX_data_edit_object(C)) {
BKE_report(op->reports, RPT_ERROR, "Operation cannot be performed in EditMode");
return OPERATOR_CANCELLED;
}
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
+ {
bConstraint *con, *pcon;
/* remove track-object for old track */
- ob->track= NULL;
- ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
+ ob->track = NULL;
+ ob->recalc |= OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME;
/* also remove all tracking constraints */
- for (con= ob->constraints.last; con; con= pcon) {
- pcon= con->prev;
+ for (con = ob->constraints.last; con; con = pcon) {
+ pcon = con->prev;
if (ELEM3(con->type, CONSTRAINT_TYPE_TRACKTO, CONSTRAINT_TYPE_LOCKTRACK, CONSTRAINT_TYPE_DAMPTRACK))
remove_constraint(&ob->constraints, con);
}
if (type == 1)
- object_apply_mat4(ob, ob->obmat, TRUE, TRUE);
+ BKE_object_apply_mat4(ob, ob->obmat, TRUE, TRUE);
}
CTX_DATA_END;
DAG_ids_flush_update(bmain, 0);
DAG_scene_sort(bmain, scene);
- WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
return OPERATOR_FINISHED;
}
@@ -940,7 +945,7 @@ void OBJECT_OT_track_clear(wmOperatorType *ot)
ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
ot->prop = RNA_def_enum(ot->srna, "type", prop_clear_track_types, 0, "Type", "");
}
@@ -956,23 +961,24 @@ static EnumPropertyItem prop_make_track_types[] = {
static int track_set_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- Object *obact= ED_object_active_context(C);
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ Object *obact = ED_object_active_context(C);
- int type= RNA_enum_get(op->ptr, "type");
+ int type = RNA_enum_get(op->ptr, "type");
if (type == 1) {
bConstraint *con;
bDampTrackConstraint *data;
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
- if (ob!=obact) {
+ CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
+ {
+ if (ob != obact) {
con = add_ob_constraint(ob, "AutoTrack", CONSTRAINT_TYPE_DAMPTRACK);
data = con->data;
data->tar = obact;
- ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
+ ob->recalc |= OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME;
/* Lamp, Camera and Speaker track differently by default */
if (ob->type == OB_LAMP || ob->type == OB_CAMERA || ob->type == OB_SPEAKER)
@@ -985,13 +991,14 @@ static int track_set_exec(bContext *C, wmOperator *op)
bConstraint *con;
bTrackToConstraint *data;
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
- if (ob!=obact) {
+ CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
+ {
+ if (ob != obact) {
con = add_ob_constraint(ob, "AutoTrack", CONSTRAINT_TYPE_TRACKTO);
data = con->data;
data->tar = obact;
- ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
+ ob->recalc |= OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME;
/* Lamp, Camera and Speaker track differently by default */
if (ob->type == OB_LAMP || ob->type == OB_CAMERA || ob->type == OB_SPEAKER) {
@@ -1006,13 +1013,14 @@ static int track_set_exec(bContext *C, wmOperator *op)
bConstraint *con;
bLockTrackConstraint *data;
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
- if (ob!=obact) {
+ CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
+ {
+ if (ob != obact) {
con = add_ob_constraint(ob, "AutoTrack", CONSTRAINT_TYPE_LOCKTRACK);
data = con->data;
data->tar = obact;
- ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
+ ob->recalc |= OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME;
/* Lamp, Camera and Speaker track differently by default */
if (ob->type == OB_LAMP || ob->type == OB_CAMERA || ob->type == OB_SPEAKER) {
@@ -1026,7 +1034,7 @@ static int track_set_exec(bContext *C, wmOperator *op)
DAG_scene_sort(bmain, scene);
DAG_ids_flush_update(bmain, 0);
- WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
return OPERATOR_FINISHED;
}
@@ -1045,7 +1053,7 @@ void OBJECT_OT_track_set(wmOperatorType *ot)
ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
ot->prop = RNA_def_enum(ot->srna, "type", prop_make_track_types, 0, "Type", "");
@@ -1056,24 +1064,25 @@ void OBJECT_OT_track_set(wmOperatorType *ot)
static unsigned int move_to_layer_init(bContext *C, wmOperator *op)
{
int values[20], a;
- unsigned int lay= 0;
+ unsigned int lay = 0;
if (!RNA_struct_property_is_set(op->ptr, "layers")) {
/* note: layers are set in bases, library objects work for this */
- CTX_DATA_BEGIN(C, Base*, base, selected_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, selected_bases)
+ {
lay |= base->lay;
}
CTX_DATA_END;
- for (a=0; a<20; a++)
- values[a]= (lay & (1<<a));
+ for (a = 0; a < 20; a++)
+ values[a] = (lay & (1 << a));
RNA_boolean_set_array(op->ptr, "layers", values);
}
else {
RNA_boolean_get_array(op->ptr, "layers", values);
- for (a=0; a<20; a++)
+ for (a = 0; a < 20; a++)
if (values[a])
lay |= (1 << a);
}
@@ -1083,7 +1092,7 @@ static unsigned int move_to_layer_init(bContext *C, wmOperator *op)
static int move_to_layer_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- View3D *v3d= CTX_wm_view3d(C);
+ View3D *v3d = CTX_wm_view3d(C);
if (v3d && v3d->localvd) {
return WM_operator_confirm_message(C, op, "Move from localview");
}
@@ -1095,24 +1104,25 @@ static int move_to_layer_invoke(bContext *C, wmOperator *op, wmEvent *event)
static int move_to_layer_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- View3D *v3d= CTX_wm_view3d(C);
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ View3D *v3d = CTX_wm_view3d(C);
unsigned int lay, local;
/* int islamp= 0; */ /* UNUSED */
- lay= move_to_layer_init(C, op);
+ lay = move_to_layer_init(C, op);
lay &= 0xFFFFFF;
- if (lay==0) return OPERATOR_CANCELLED;
+ if (lay == 0) return OPERATOR_CANCELLED;
if (v3d && v3d->localvd) {
/* now we can move out of localview. */
/* note: layers are set in bases, library objects work for this */
- CTX_DATA_BEGIN(C, Base*, base, selected_bases) {
- lay= base->lay & ~v3d->lay;
- base->lay= lay;
- base->object->lay= lay;
+ CTX_DATA_BEGIN (C, Base *, base, selected_bases)
+ {
+ lay = base->lay & ~v3d->lay;
+ base->lay = lay;
+ base->object->lay = lay;
base->object->flag &= ~SELECT;
base->flag &= ~SELECT;
/* if (base->object->type==OB_LAMP) islamp= 1; */
@@ -1122,11 +1132,12 @@ static int move_to_layer_exec(bContext *C, wmOperator *op)
else {
/* normal non localview operation */
/* note: layers are set in bases, library objects work for this */
- CTX_DATA_BEGIN(C, Base*, base, selected_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, selected_bases)
+ {
/* upper byte is used for local view */
- local= base->lay & 0xFF000000;
- base->lay= lay + local;
- base->object->lay= lay;
+ local = base->lay & 0xFF000000;
+ base->lay = lay + local;
+ base->object->lay = lay;
/* if (base->object->type==OB_LAMP) islamp= 1; */
}
CTX_DATA_END;
@@ -1134,8 +1145,8 @@ static int move_to_layer_exec(bContext *C, wmOperator *op)
/* warning, active object may be hidden now */
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, scene);
- WM_event_add_notifier(C, NC_SCENE|ND_LAYER_CONTENT, scene);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_LAYER_CONTENT, scene);
DAG_scene_sort(bmain, scene);
@@ -1155,7 +1166,7 @@ void OBJECT_OT_move_to_layer(wmOperatorType *ot)
ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_boolean_layer_member(ot->srna, "layers", 20, NULL, "Layer", "");
@@ -1166,18 +1177,18 @@ void OBJECT_OT_move_to_layer(wmOperatorType *ot)
#if 0
static void link_to_scene(Main *UNUSED(bmain), unsigned short UNUSED(nr))
{
- Scene *sce= (Scene*) BLI_findlink(&bmain->scene, G.curscreen->scenenr-1);
+ Scene *sce = (Scene *) BLI_findlink(&bmain->scene, G.curscreen->scenenr - 1);
Base *base, *nbase;
- if (sce==0) return;
+ if (sce == 0) return;
if (sce->id.lib) return;
- for (base= FIRSTBASE; base; base= base->next) {
+ for (base = FIRSTBASE; base; base = base->next) {
if (TESTBASE(v3d, base)) {
- nbase= MEM_mallocN( sizeof(Base), "newbase");
- *nbase= *base;
- BLI_addhead( &(sce->base), nbase);
+ nbase = MEM_mallocN(sizeof(Base), "newbase");
+ *nbase = *base;
+ BLI_addhead(&(sce->base), nbase);
id_us_plus((ID *)base->object);
}
}
@@ -1186,10 +1197,10 @@ static void link_to_scene(Main *UNUSED(bmain), unsigned short UNUSED(nr))
static int make_links_scene_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene_to= BLI_findlink(&CTX_data_main(C)->scene, RNA_enum_get(op->ptr, "scene"));
+ Main *bmain = CTX_data_main(C);
+ Scene *scene_to = BLI_findlink(&CTX_data_main(C)->scene, RNA_enum_get(op->ptr, "scene"));
- if (scene_to==NULL) {
+ if (scene_to == NULL) {
BKE_report(op->reports, RPT_ERROR, "Scene not found");
return OPERATOR_CANCELLED;
}
@@ -1204,12 +1215,12 @@ static int make_links_scene_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- CTX_DATA_BEGIN(C, Base*, base, selected_bases)
+ CTX_DATA_BEGIN (C, Base *, base, selected_bases)
{
- if (!object_in_scene(base->object, scene_to)) {
- Base *nbase= MEM_mallocN( sizeof(Base), "newbase");
- *nbase= *base;
- BLI_addhead( &(scene_to->base), nbase);
+ if (!BKE_scene_base_find(scene_to, base->object)) {
+ Base *nbase = MEM_mallocN(sizeof(Base), "newbase");
+ *nbase = *base;
+ BLI_addhead(&(scene_to->base), nbase);
id_us_plus((ID *)base->object);
}
}
@@ -1232,14 +1243,14 @@ enum {
/* Return 1 if make link data is allow, zero otherwise */
static int allow_make_links_data(int ev, Object *ob, Object *obt)
{
- switch(ev) {
+ switch (ev) {
case MAKE_LINKS_OBDATA:
if (ob->type == obt->type && ob->type != OB_EMPTY)
return 1;
break;
case MAKE_LINKS_MATERIALS:
if (OB_TYPE_SUPPORT_MATERIAL(ob->type) &&
- OB_TYPE_SUPPORT_MATERIAL(obt->type))
+ OB_TYPE_SUPPORT_MATERIAL(obt->type))
{
return 1;
}
@@ -1257,53 +1268,54 @@ static int allow_make_links_data(int ev, Object *ob, Object *obt)
static int make_links_data_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
+ Main *bmain = CTX_data_main(C);
int event = RNA_enum_get(op->ptr, "type");
Object *ob;
ID *id;
int a;
- ob= ED_object_active_context(C);
+ ob = ED_object_active_context(C);
- CTX_DATA_BEGIN(C, Object*, obt, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object *, obt, selected_editable_objects)
+ {
if (ob != obt) {
if (allow_make_links_data(event, ob, obt)) {
- switch(event) {
- case MAKE_LINKS_OBDATA: /* obdata */
- id= obt->data;
- id->us--;
-
- id= ob->data;
- id_us_plus(id);
- obt->data= id;
-
- /* if amount of material indices changed: */
- test_object_materials(obt->data);
-
- obt->recalc |= OB_RECALC_DATA;
- break;
- case MAKE_LINKS_MATERIALS:
- /* new approach, using functions from kernel */
- for (a=0; a<ob->totcol; a++) {
- Material *ma= give_current_material(ob, a+1);
- assign_material(obt, ma, a+1); /* also works with ma==NULL */
- }
- break;
- case MAKE_LINKS_ANIMDATA:
- BKE_copy_animdata_id((ID *)obt, (ID *)ob, FALSE);
- BKE_copy_animdata_id((ID *)obt->data, (ID *)ob->data, FALSE);
- break;
- case MAKE_LINKS_DUPLIGROUP:
- obt->dup_group= ob->dup_group;
- if (obt->dup_group) {
- id_lib_extern(&obt->dup_group->id);
- obt->transflag |= OB_DUPLIGROUP;
- }
- break;
- case MAKE_LINKS_MODIFIERS:
- object_link_modifiers(obt, ob);
- obt->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
- break;
+ switch (event) {
+ case MAKE_LINKS_OBDATA: /* obdata */
+ id = obt->data;
+ id->us--;
+
+ id = ob->data;
+ id_us_plus(id);
+ obt->data = id;
+
+ /* if amount of material indices changed: */
+ test_object_materials(obt->data);
+
+ obt->recalc |= OB_RECALC_DATA;
+ break;
+ case MAKE_LINKS_MATERIALS:
+ /* new approach, using functions from kernel */
+ for (a = 0; a < ob->totcol; a++) {
+ Material *ma = give_current_material(ob, a + 1);
+ assign_material(obt, ma, a + 1); /* also works with ma==NULL */
+ }
+ break;
+ case MAKE_LINKS_ANIMDATA:
+ BKE_copy_animdata_id((ID *)obt, (ID *)ob, FALSE);
+ BKE_copy_animdata_id((ID *)obt->data, (ID *)ob->data, FALSE);
+ break;
+ case MAKE_LINKS_DUPLIGROUP:
+ obt->dup_group = ob->dup_group;
+ if (obt->dup_group) {
+ id_lib_extern(&obt->dup_group->id);
+ obt->transflag |= OB_DUPLIGROUP;
+ }
+ break;
+ case MAKE_LINKS_MODIFIERS:
+ BKE_object_link_modifiers(obt, ob);
+ obt->recalc |= OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME;
+ break;
}
}
}
@@ -1313,7 +1325,7 @@ static int make_links_data_exec(bContext *C, wmOperator *op)
DAG_scene_sort(bmain, CTX_data_scene(C));
DAG_ids_flush_update(bmain, 0);
- WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, CTX_wm_view3d(C));
+ WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, CTX_wm_view3d(C));
return OPERATOR_FINISHED;
}
@@ -1333,22 +1345,22 @@ void OBJECT_OT_make_links_scene(wmOperatorType *ot)
/* better not run the poll check */
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
- prop= RNA_def_enum(ot->srna, "scene", DummyRNA_NULL_items, 0, "Scene", "");
+ prop = RNA_def_enum(ot->srna, "scene", DummyRNA_NULL_items, 0, "Scene", "");
RNA_def_enum_funcs(prop, RNA_scene_local_itemf);
ot->prop = prop;
}
void OBJECT_OT_make_links_data(wmOperatorType *ot)
{
- static EnumPropertyItem make_links_items[]= {
- {MAKE_LINKS_OBDATA, "OBDATA", 0, "Object Data", ""},
- {MAKE_LINKS_MATERIALS, "MATERIAL", 0, "Materials", ""},
- {MAKE_LINKS_ANIMDATA, "ANIMATION", 0, "Animation Data", ""},
- {MAKE_LINKS_DUPLIGROUP, "DUPLIGROUP", 0, "DupliGroup", ""},
- {MAKE_LINKS_MODIFIERS, "MODIFIERS", 0, "Modifiers", ""},
+ static EnumPropertyItem make_links_items[] = {
+ {MAKE_LINKS_OBDATA, "OBDATA", 0, "Object Data", ""},
+ {MAKE_LINKS_MATERIALS, "MATERIAL", 0, "Materials", ""},
+ {MAKE_LINKS_ANIMDATA, "ANIMATION", 0, "Animation Data", ""},
+ {MAKE_LINKS_DUPLIGROUP, "DUPLIGROUP", 0, "DupliGroup", ""},
+ {MAKE_LINKS_MODIFIERS, "MODIFIERS", 0, "Modifiers", ""},
{0, NULL, 0, NULL, NULL}};
/* identifiers */
@@ -1361,7 +1373,7 @@ void OBJECT_OT_make_links_data(wmOperatorType *ot)
ot->poll = ED_operator_object_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
ot->prop = RNA_def_enum(ot->srna, "type", make_links_items, 0, "Type", "");
@@ -1375,22 +1387,22 @@ static void single_object_users(Scene *scene, View3D *v3d, int flag)
Base *base;
Object *ob, *obn;
- clear_sca_new_poins(); /* sensor/contr/act */
+ clear_sca_new_poins(); /* sensor/contr/act */
/* duplicate (must set newid) */
- for (base= FIRSTBASE; base; base= base->next) {
- ob= base->object;
+ for (base = FIRSTBASE; base; base = base->next) {
+ ob = base->object;
/* newid may still have some trash from Outliner tree building,
* so clear that first to avoid errors [#26002]
*/
ob->id.newid = NULL;
- if ( (base->flag & flag)==flag ) {
- if (ob->id.lib==NULL && ob->id.us>1) {
+ if ( (base->flag & flag) == flag) {
+ if (ob->id.lib == NULL && ob->id.us > 1) {
/* base gets copy of object */
- obn= copy_object(ob);
- base->object= obn;
+ obn = BKE_object_copy(ob);
+ base->object = obn;
ob->id.us--;
}
}
@@ -1400,8 +1412,8 @@ static void single_object_users(Scene *scene, View3D *v3d, int flag)
if (v3d) ID_NEW(v3d->camera);
/* object pointers */
- for (base= FIRSTBASE; base; base= base->next) {
- object_relink(base->object);
+ for (base = FIRSTBASE; base; base = base->next) {
+ BKE_object_relink(base->object);
}
set_sca_new_poins();
@@ -1413,9 +1425,9 @@ void ED_object_single_user(Scene *scene, Object *ob)
{
Base *base;
- for (base= FIRSTBASE; base; base= base->next) {
- if (base->object == ob) base->flag |= OB_DONE;
- else base->flag &= ~OB_DONE;
+ for (base = FIRSTBASE; base; base = base->next) {
+ if (base->object == ob) base->flag |= OB_DONE;
+ else base->flag &= ~OB_DONE;
}
single_object_users(scene, NULL, OB_DONE);
@@ -1426,18 +1438,18 @@ static void new_id_matar(Material **matar, int totcol)
ID *id;
int a;
- for (a=0; a<totcol; a++) {
- id= (ID *)matar[a];
+ for (a = 0; a < totcol; a++) {
+ id = (ID *)matar[a];
if (id && id->lib == NULL) {
if (id->newid) {
- matar[a]= (Material *)id->newid;
+ matar[a] = (Material *)id->newid;
id_us_plus(id->newid);
id->us--;
}
- else if (id->us>1) {
- matar[a]= copy_material(matar[a]);
+ else if (id->us > 1) {
+ matar[a] = BKE_material_copy(matar[a]);
id->us--;
- id->newid= (ID *)matar[a];
+ id->newid = (ID *)matar[a];
}
}
}
@@ -1454,73 +1466,73 @@ static void single_obdata_users(Main *bmain, Scene *scene, int flag)
ID *id;
int a;
- for (base= FIRSTBASE; base; base= base->next) {
- ob= base->object;
- if (ob->id.lib==NULL && (base->flag & flag)==flag ) {
- id= ob->data;
+ for (base = FIRSTBASE; base; base = base->next) {
+ ob = base->object;
+ if (ob->id.lib == NULL && (base->flag & flag) == flag) {
+ id = ob->data;
- if (id && id->us>1 && id->lib==NULL) {
- ob->recalc= OB_RECALC_DATA;
+ if (id && id->us > 1 && id->lib == NULL) {
+ ob->recalc = OB_RECALC_DATA;
BKE_copy_animdata_id_action(id);
- switch(ob->type) {
- case OB_LAMP:
- ob->data= la= copy_lamp(ob->data);
- for (a=0; a<MAX_MTEX; a++) {
- if (la->mtex[a]) {
- ID_NEW(la->mtex[a]->object);
+ switch (ob->type) {
+ case OB_LAMP:
+ ob->data = la = BKE_lamp_copy(ob->data);
+ for (a = 0; a < MAX_MTEX; a++) {
+ if (la->mtex[a]) {
+ ID_NEW(la->mtex[a]->object);
+ }
}
- }
- break;
- case OB_CAMERA:
- ob->data= copy_camera(ob->data);
- break;
- case OB_MESH:
- ob->data= copy_mesh(ob->data);
- //me= ob->data;
- //if (me && me->key)
- // ipo_idnew(me->key->ipo); /* drivers */
- break;
- case OB_MBALL:
- ob->data= copy_mball(ob->data);
- break;
- case OB_CURVE:
- case OB_SURF:
- case OB_FONT:
- ob->data= cu= copy_curve(ob->data);
- ID_NEW(cu->bevobj);
- ID_NEW(cu->taperobj);
- break;
- case OB_LATTICE:
- ob->data= copy_lattice(ob->data);
- break;
- case OB_ARMATURE:
- ob->recalc |= OB_RECALC_DATA;
- ob->data= copy_armature(ob->data);
- armature_rebuild_pose(ob, ob->data);
- break;
- case OB_SPEAKER:
- ob->data= copy_speaker(ob->data);
- break;
- default:
- if (G.debug & G_DEBUG)
- printf("ERROR %s: can't copy %s\n", __func__, id->name);
- return;
+ break;
+ case OB_CAMERA:
+ ob->data = BKE_camera_copy(ob->data);
+ break;
+ case OB_MESH:
+ ob->data = BKE_mesh_copy(ob->data);
+ //me= ob->data;
+ //if (me && me->key)
+ // ipo_idnew(me->key->ipo); /* drivers */
+ break;
+ case OB_MBALL:
+ ob->data = BKE_mball_copy(ob->data);
+ break;
+ case OB_CURVE:
+ case OB_SURF:
+ case OB_FONT:
+ ob->data = cu = BKE_curve_copy(ob->data);
+ ID_NEW(cu->bevobj);
+ ID_NEW(cu->taperobj);
+ break;
+ case OB_LATTICE:
+ ob->data = BKE_lattice_copy(ob->data);
+ break;
+ case OB_ARMATURE:
+ ob->recalc |= OB_RECALC_DATA;
+ ob->data = BKE_armature_copy(ob->data);
+ BKE_pose_rebuild(ob, ob->data);
+ break;
+ case OB_SPEAKER:
+ ob->data = BKE_speaker_copy(ob->data);
+ break;
+ default:
+ if (G.debug & G_DEBUG)
+ printf("ERROR %s: can't copy %s\n", __func__, id->name);
+ return;
}
id->us--;
- id->newid= ob->data;
+ id->newid = ob->data;
}
}
}
- me= bmain->mesh.first;
+ me = bmain->mesh.first;
while (me) {
ID_NEW(me->texcomesh);
- me= me->id.next;
+ me = me->id.next;
}
}
@@ -1529,10 +1541,10 @@ static void single_object_action_users(Scene *scene, int flag)
Object *ob;
Base *base;
- for (base= FIRSTBASE; base; base= base->next) {
- ob= base->object;
- if (ob->id.lib==NULL && (flag==0 || (base->flag & SELECT)) ) {
- ob->recalc= OB_RECALC_DATA;
+ for (base = FIRSTBASE; base; base = base->next) {
+ ob = base->object;
+ if (ob->id.lib == NULL && (flag == 0 || (base->flag & SELECT)) ) {
+ ob->recalc = OB_RECALC_DATA;
BKE_copy_animdata_id_action(&ob->id);
}
}
@@ -1546,30 +1558,30 @@ static void single_mat_users(Scene *scene, int flag, int do_textures)
Tex *tex;
int a, b;
- for (base= FIRSTBASE; base; base= base->next) {
- ob= base->object;
- if (ob->id.lib==NULL && (flag==0 || (base->flag & SELECT)) ) {
+ for (base = FIRSTBASE; base; base = base->next) {
+ ob = base->object;
+ if (ob->id.lib == NULL && (flag == 0 || (base->flag & SELECT)) ) {
- for (a=1; a<=ob->totcol; a++) {
- ma= give_current_material(ob, a);
+ for (a = 1; a <= ob->totcol; a++) {
+ ma = give_current_material(ob, a);
if (ma) {
/* do not test for LIB_NEW: this functions guaranteed delivers single_users! */
- if (ma->id.us>1) {
- man= copy_material(ma);
+ if (ma->id.us > 1) {
+ man = BKE_material_copy(ma);
BKE_copy_animdata_id_action(&man->id);
- man->id.us= 0;
+ man->id.us = 0;
assign_material(ob, man, a);
if (do_textures) {
- for (b=0; b<MAX_MTEX; b++) {
- if (ma->mtex[b] && (tex= ma->mtex[b]->tex)) {
- if (tex->id.us>1) {
+ for (b = 0; b < MAX_MTEX; b++) {
+ if (ma->mtex[b] && (tex = ma->mtex[b]->tex)) {
+ if (tex->id.us > 1) {
tex->id.us--;
- tex= copy_texture(tex);
+ tex = BKE_texture_copy(tex);
BKE_copy_animdata_id_action(&tex->id);
- man->mtex[b]->tex= tex;
+ man->mtex[b]->tex = tex;
}
}
}
@@ -1585,20 +1597,20 @@ static void do_single_tex_user(Tex **from)
{
Tex *tex, *texn;
- tex= *from;
- if (tex==NULL) return;
+ tex = *from;
+ if (tex == NULL) return;
if (tex->id.newid) {
- *from= (Tex *)tex->id.newid;
+ *from = (Tex *)tex->id.newid;
id_us_plus(tex->id.newid);
tex->id.us--;
}
- else if (tex->id.us>1) {
- texn= copy_texture(tex);
+ else if (tex->id.us > 1) {
+ texn = BKE_texture_copy(tex);
BKE_copy_animdata_id_action(&texn->id);
- tex->id.newid= (ID *)texn;
+ tex->id.newid = (ID *)texn;
tex->id.us--;
- *from= texn;
+ *from = texn;
}
}
@@ -1610,31 +1622,31 @@ static void single_tex_users_expand(Main *bmain)
World *wo;
int b;
- for (ma= bmain->mat.first; ma; ma=ma->id.next) {
+ for (ma = bmain->mat.first; ma; ma = ma->id.next) {
if (ma->id.flag & LIB_NEW) {
- for (b=0; b<MAX_MTEX; b++) {
+ for (b = 0; b < MAX_MTEX; b++) {
if (ma->mtex[b] && ma->mtex[b]->tex) {
- do_single_tex_user( &(ma->mtex[b]->tex) );
+ do_single_tex_user(&(ma->mtex[b]->tex));
}
}
}
}
- for (la= bmain->lamp.first; la; la=la->id.next) {
+ for (la = bmain->lamp.first; la; la = la->id.next) {
if (la->id.flag & LIB_NEW) {
- for (b=0; b<MAX_MTEX; b++) {
+ for (b = 0; b < MAX_MTEX; b++) {
if (la->mtex[b] && la->mtex[b]->tex) {
- do_single_tex_user( &(la->mtex[b]->tex) );
+ do_single_tex_user(&(la->mtex[b]->tex));
}
}
}
}
- for (wo= bmain->world.first; wo; wo=wo->id.next) {
+ for (wo = bmain->world.first; wo; wo = wo->id.next) {
if (wo->id.flag & LIB_NEW) {
- for (b=0; b<MAX_MTEX; b++) {
+ for (b = 0; b < MAX_MTEX; b++) {
if (wo->mtex[b] && wo->mtex[b]->tex) {
- do_single_tex_user( &(wo->mtex[b]->tex) );
+ do_single_tex_user(&(wo->mtex[b]->tex));
}
}
}
@@ -1651,26 +1663,26 @@ static void single_mat_users_expand(Main *bmain)
Material *ma;
int a;
- for (ob=bmain->object.first; ob; ob=ob->id.next)
+ for (ob = bmain->object.first; ob; ob = ob->id.next)
if (ob->id.flag & LIB_NEW)
new_id_matar(ob->mat, ob->totcol);
- for (me=bmain->mesh.first; me; me=me->id.next)
+ for (me = bmain->mesh.first; me; me = me->id.next)
if (me->id.flag & LIB_NEW)
new_id_matar(me->mat, me->totcol);
- for (cu=bmain->curve.first; cu; cu=cu->id.next)
+ for (cu = bmain->curve.first; cu; cu = cu->id.next)
if (cu->id.flag & LIB_NEW)
new_id_matar(cu->mat, cu->totcol);
- for (mb=bmain->mball.first; mb; mb=mb->id.next)
+ for (mb = bmain->mball.first; mb; mb = mb->id.next)
if (mb->id.flag & LIB_NEW)
new_id_matar(mb->mat, mb->totcol);
/* material imats */
- for (ma=bmain->mat.first; ma; ma=ma->id.next)
+ for (ma = bmain->mat.first; ma; ma = ma->id.next)
if (ma->id.flag & LIB_NEW)
- for (a=0; a<MAX_MTEX; a++)
+ for (a = 0; a < MAX_MTEX; a++)
if (ma->mtex[a])
ID_NEW(ma->mtex[a]->object);
}
@@ -1700,11 +1712,11 @@ static void make_local_makelocalmaterial(Material *ma)
id_make_local(&ma->id, 0);
- for (b=0; b<MAX_MTEX; b++)
+ for (b = 0; b < MAX_MTEX; b++)
if (ma->mtex[b] && ma->mtex[b]->tex)
id_make_local(&ma->mtex[b]->tex->id, 0);
- adt= BKE_animdata_from_id(&ma->id);
+ adt = BKE_animdata_from_id(&ma->id);
if (adt) BKE_animdata_make_local(adt);
/* nodetree? XXX */
@@ -1712,83 +1724,87 @@ static void make_local_makelocalmaterial(Material *ma)
static int make_local_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
+ Main *bmain = CTX_data_main(C);
AnimData *adt;
ParticleSystem *psys;
Material *ma, ***matarar;
Lamp *la;
ID *id;
- int a, b, mode= RNA_enum_get(op->ptr, "type");
+ int a, b, mode = RNA_enum_get(op->ptr, "type");
- if (mode==3) {
- BKE_library_make_local(bmain, NULL, 0); /* NULL is all libs */
+ if (mode == 3) {
+ BKE_library_make_local(bmain, NULL, 0); /* NULL is all libs */
WM_event_add_notifier(C, NC_WINDOW, NULL);
return OPERATOR_FINISHED;
}
clear_id_newpoins();
- CTX_DATA_BEGIN(C, Object*, ob, selected_objects) {
+ CTX_DATA_BEGIN (C, Object *, ob, selected_objects)
+ {
if (ob->id.lib)
id_make_local(&ob->id, 0);
}
CTX_DATA_END;
/* maybe object pointers */
- CTX_DATA_BEGIN(C, Object*, ob, selected_objects) {
- if (ob->id.lib==NULL) {
+ CTX_DATA_BEGIN (C, Object *, ob, selected_objects)
+ {
+ if (ob->id.lib == NULL) {
ID_NEW(ob->parent);
}
}
CTX_DATA_END;
- CTX_DATA_BEGIN(C, Object*, ob, selected_objects) {
- id= ob->data;
+ CTX_DATA_BEGIN (C, Object *, ob, selected_objects)
+ {
+ id = ob->data;
- if (id && mode>1) {
+ if (id && mode > 1) {
id_make_local(id, 0);
- adt= BKE_animdata_from_id(id);
+ adt = BKE_animdata_from_id(id);
if (adt) BKE_animdata_make_local(adt);
/* tag indirect data direct */
- matarar= (Material ***)give_matarar(ob);
+ matarar = (Material ***)give_matarar(ob);
if (matarar) {
- for (a=0; a<ob->totcol; a++) {
- ma= (*matarar)[a];
+ for (a = 0; a < ob->totcol; a++) {
+ ma = (*matarar)[a];
if (ma)
id_lib_extern(&ma->id);
}
}
}
- for (psys=ob->particlesystem.first; psys; psys=psys->next)
+ for (psys = ob->particlesystem.first; psys; psys = psys->next)
id_make_local(&psys->part->id, 0);
- adt= BKE_animdata_from_id(&ob->id);
+ adt = BKE_animdata_from_id(&ob->id);
if (adt) BKE_animdata_make_local(adt);
}
CTX_DATA_END;
- if (mode>1) {
- CTX_DATA_BEGIN(C, Object*, ob, selected_objects) {
- if (ob->type==OB_LAMP) {
- la= ob->data;
+ if (mode > 1) {
+ CTX_DATA_BEGIN (C, Object *, ob, selected_objects)
+ {
+ if (ob->type == OB_LAMP) {
+ la = ob->data;
- for (b=0; b<MAX_MTEX; b++)
+ for (b = 0; b < MAX_MTEX; b++)
if (la->mtex[b] && la->mtex[b]->tex)
id_make_local(&la->mtex[b]->tex->id, 0);
}
else {
- for (a=0; a<ob->totcol; a++) {
- ma= ob->mat[a];
+ for (a = 0; a < ob->totcol; a++) {
+ ma = ob->mat[a];
if (ma)
make_local_makelocalmaterial(ma);
}
- matarar= (Material ***)give_matarar(ob);
+ matarar = (Material ***)give_matarar(ob);
if (matarar) {
- for (a=0; a<ob->totcol; a++) {
- ma= (*matarar)[a];
+ for (a = 0; a < ob->totcol; a++) {
+ ma = (*matarar)[a];
if (ma)
make_local_makelocalmaterial(ma);
}
@@ -1805,7 +1821,7 @@ static int make_local_exec(bContext *C, wmOperator *op)
void OBJECT_OT_make_local(wmOperatorType *ot)
{
- static EnumPropertyItem type_items[]= {
+ static EnumPropertyItem type_items[] = {
{1, "SELECTED_OBJECTS", 0, "Selected Objects", ""},
{2, "SELECTED_OBJECTS_DATA", 0, "Selected Objects and Data", ""},
{3, "ALL", 0, "All", ""},
@@ -1822,7 +1838,7 @@ void OBJECT_OT_make_local(wmOperatorType *ot)
ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
ot->prop = RNA_def_enum(ot->srna, "type", type_items, 0, "Type", "");
@@ -1830,10 +1846,10 @@ void OBJECT_OT_make_local(wmOperatorType *ot)
static int make_single_user_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- View3D *v3d= CTX_wm_view3d(C); /* ok if this is NULL */
- int flag= RNA_enum_get(op->ptr, "type"); /* 0==ALL, SELECTED==selected objecs */
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ View3D *v3d = CTX_wm_view3d(C); /* ok if this is NULL */
+ int flag = RNA_enum_get(op->ptr, "type"); /* 0==ALL, SELECTED==selected objecs */
if (RNA_boolean_get(op->ptr, "object"))
single_object_users(scene, v3d, flag);
@@ -1859,7 +1875,7 @@ static int make_single_user_exec(bContext *C, wmOperator *op)
void OBJECT_OT_make_single_user(wmOperatorType *ot)
{
- static EnumPropertyItem type_items[]= {
+ static EnumPropertyItem type_items[] = {
{SELECT, "SELECTED_OBJECTS", 0, "Selected Objects", ""},
{0, "ALL", 0, "All", ""},
{0, NULL, 0, NULL, NULL}};
@@ -1875,7 +1891,7 @@ void OBJECT_OT_make_single_user(wmOperatorType *ot)
ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
ot->prop = RNA_def_enum(ot->srna, "type", type_items, SELECT, "Type", "");
@@ -1889,20 +1905,20 @@ void OBJECT_OT_make_single_user(wmOperatorType *ot)
static int drop_named_material_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- Main *bmain= CTX_data_main(C);
- Base *base= ED_view3d_give_base_under_cursor(C, event->mval);
+ Main *bmain = CTX_data_main(C);
+ Base *base = ED_view3d_give_base_under_cursor(C, event->mval);
Material *ma;
- char name[MAX_ID_NAME-2];
+ char name[MAX_ID_NAME - 2];
RNA_string_get(op->ptr, "name", name);
- ma= (Material *)find_id("MA", name);
- if (base==NULL || ma==NULL)
+ ma = (Material *)BKE_libblock_find_name(ID_MA, name);
+ if (base == NULL || ma == NULL)
return OPERATOR_CANCELLED;
assign_material(base->object, ma, 1);
DAG_ids_flush_update(bmain, 0);
- WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, CTX_wm_view3d(C));
+ WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, CTX_wm_view3d(C));
return OPERATOR_FINISHED;
}
@@ -1925,5 +1941,5 @@ void OBJECT_OT_drop_named_material(wmOperatorType *ot)
ot->flag = OPTYPE_UNDO;
/* properties */
- RNA_def_string(ot->srna, "name", "Material", MAX_ID_NAME-2, "Name", "Material name to assign");
+ RNA_def_string(ot->srna, "name", "Material", MAX_ID_NAME - 2, "Name", "Material name to assign");
}
diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c
index 388766f5fa3..86823be09a4 100644
--- a/source/blender/editors/object/object_select.c
+++ b/source/blender/editors/object/object_select.c
@@ -79,8 +79,8 @@
/************************ Exported **************************/
/* simple API for object selection, rather than just using the flag
- * this takes into account the 'restrict selection in 3d view' flag.
- * deselect works always, the restriction just prevents selection */
+* this takes into account the 'restrict selection in 3d view' flag.
+* deselect works always, the restriction just prevents selection */
/* Note: send a NC_SCENE|ND_OB_SELECT notifier yourself! (or
* or a NC_SCENE|ND_OB_VISIBLE in case of visibility toggling */
@@ -88,34 +88,34 @@
void ED_base_object_select(Base *base, short mode)
{
if (base) {
- if (mode==BA_SELECT) {
+ if (mode == BA_SELECT) {
if (!(base->object->restrictflag & OB_RESTRICT_SELECT))
base->flag |= SELECT;
}
- else if (mode==BA_DESELECT) {
+ else if (mode == BA_DESELECT) {
base->flag &= ~SELECT;
}
- base->object->flag= base->flag;
+ base->object->flag = base->flag;
}
}
/* also to set active NULL */
void ED_base_object_activate(bContext *C, Base *base)
{
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
/* sets scene->basact */
- BASACT= base;
+ BASACT = base;
if (base) {
/* XXX old signals, remember to handle notifiers now! */
// select_actionchannel_by_name(base->object->action, "Object", 1);
- WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene);
}
else
- WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, NULL);
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, NULL);
}
/********************** Selection Operators **********************/
@@ -124,7 +124,7 @@ static int objects_selectable_poll(bContext *C)
{
/* we don't check for linked scenes here, selection is
* still allowed then for inspection of scene */
- Object *obact= CTX_data_active_object(C);
+ Object *obact = CTX_data_active_object(C);
if (CTX_data_edit_object(C))
return 0;
@@ -141,23 +141,25 @@ static int object_select_by_type_exec(bContext *C, wmOperator *op)
short obtype, extend;
obtype = RNA_enum_get(op->ptr, "type");
- extend= RNA_boolean_get(op->ptr, "extend");
+ extend = RNA_boolean_get(op->ptr, "extend");
if (extend == 0) {
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, visible_bases)
+ {
ED_base_object_select(base, BA_DESELECT);
}
CTX_DATA_END;
}
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
- if (base->object->type==obtype) {
+ CTX_DATA_BEGIN (C, Base *, base, visible_bases)
+ {
+ if (base->object->type == obtype) {
ED_base_object_select(base, BA_SELECT);
}
}
CTX_DATA_END;
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, CTX_data_scene(C));
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, CTX_data_scene(C));
return OPERATOR_FINISHED;
}
@@ -175,7 +177,7 @@ void OBJECT_OT_select_by_type(wmOperatorType *ot)
ot->poll = objects_selectable_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first");
@@ -198,11 +200,11 @@ static EnumPropertyItem prop_select_linked_types[] = {
static int object_select_linked_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
Object *ob;
void *obdata = NULL;
Material *mat = NULL, *mat1;
- Tex *tex= NULL;
+ Tex *tex = NULL;
int a, b;
int nr = RNA_enum_get(op->ptr, "type");
short changed = 0, extend;
@@ -215,77 +217,79 @@ static int object_select_linked_exec(bContext *C, wmOperator *op)
* PSys: 6
*/
- extend= RNA_boolean_get(op->ptr, "extend");
+ extend = RNA_boolean_get(op->ptr, "extend");
if (extend == 0) {
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, visible_bases)
+ {
ED_base_object_select(base, BA_DESELECT);
}
CTX_DATA_END;
}
- ob= OBACT;
- if (ob==NULL) {
+ ob = OBACT;
+ if (ob == NULL) {
BKE_report(op->reports, RPT_ERROR, "No Active Object");
return OPERATOR_CANCELLED;
}
- if (nr==1) {
- // XXX old animation system
+ if (nr == 1) {
+ // XXX old animation system
//ipo= ob->ipo;
//if (ipo==0) return OPERATOR_CANCELLED;
return OPERATOR_CANCELLED;
}
- else if (nr==2) {
- if (ob->data==NULL) return OPERATOR_CANCELLED;
- obdata= ob->data;
+ else if (nr == 2) {
+ if (ob->data == NULL) return OPERATOR_CANCELLED;
+ obdata = ob->data;
}
- else if (nr==3 || nr==4) {
- mat= give_current_material(ob, ob->actcol);
- if (mat==NULL) return OPERATOR_CANCELLED;
- if (nr==4) {
- if (mat->mtex[ (int)mat->texact ]) tex= mat->mtex[ (int)mat->texact ]->tex;
- if (tex==NULL) return OPERATOR_CANCELLED;
+ else if (nr == 3 || nr == 4) {
+ mat = give_current_material(ob, ob->actcol);
+ if (mat == NULL) return OPERATOR_CANCELLED;
+ if (nr == 4) {
+ if (mat->mtex[(int)mat->texact]) tex = mat->mtex[(int)mat->texact]->tex;
+ if (tex == NULL) return OPERATOR_CANCELLED;
}
}
- else if (nr==5) {
- if (ob->dup_group==NULL) return OPERATOR_CANCELLED;
+ else if (nr == 5) {
+ if (ob->dup_group == NULL) return OPERATOR_CANCELLED;
}
- else if (nr==6) {
- if (ob->particlesystem.first==NULL) return OPERATOR_CANCELLED;
+ else if (nr == 6) {
+ if (ob->particlesystem.first == NULL) return OPERATOR_CANCELLED;
}
- else if (nr==7) {
+ else if (nr == 7) {
/* do nothing */
}
- else if (nr==8) {
- if (ob->data==NULL) return OPERATOR_CANCELLED;
+ else if (nr == 8) {
+ if (ob->data == NULL) return OPERATOR_CANCELLED;
}
else
return OPERATOR_CANCELLED;
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
- if (nr==1) {
- // XXX old animation system
+ CTX_DATA_BEGIN (C, Base *, base, visible_bases)
+ {
+ if (nr == 1) {
+ // XXX old animation system
//if (base->object->ipo==ipo) base->flag |= SELECT;
//changed = 1;
}
- else if (nr==2) {
- if (base->object->data==obdata) base->flag |= SELECT;
+ else if (nr == 2) {
+ if (base->object->data == obdata) base->flag |= SELECT;
changed = 1;
}
- else if (nr==3 || nr==4) {
- ob= base->object;
+ else if (nr == 3 || nr == 4) {
+ ob = base->object;
- for (a=1; a<=ob->totcol; a++) {
- mat1= give_current_material(ob, a);
- if (nr==3) {
- if (mat1==mat) base->flag |= SELECT;
+ for (a = 1; a <= ob->totcol; a++) {
+ mat1 = give_current_material(ob, a);
+ if (nr == 3) {
+ if (mat1 == mat) base->flag |= SELECT;
changed = 1;
}
- else if (mat1 && nr==4) {
- for (b=0; b<MAX_MTEX; b++) {
+ else if (mat1 && nr == 4) {
+ for (b = 0; b < MAX_MTEX; b++) {
if (mat1->mtex[b]) {
- if (tex==mat1->mtex[b]->tex) {
+ if (tex == mat1->mtex[b]->tex) {
base->flag |= SELECT;
changed = 1;
break;
@@ -295,19 +299,19 @@ static int object_select_linked_exec(bContext *C, wmOperator *op)
}
}
}
- else if (nr==5) {
- if (base->object->dup_group==ob->dup_group) {
+ else if (nr == 5) {
+ if (base->object->dup_group == ob->dup_group) {
base->flag |= SELECT;
changed = 1;
}
}
- else if (nr==6) {
+ else if (nr == 6) {
/* loop through other, then actives particles*/
ParticleSystem *psys;
ParticleSystem *psys_act;
- for (psys=base->object->particlesystem.first; psys; psys=psys->next) {
- for (psys_act=ob->particlesystem.first; psys_act; psys_act=psys_act->next) {
+ for (psys = base->object->particlesystem.first; psys; psys = psys->next) {
+ for (psys_act = ob->particlesystem.first; psys_act; psys_act = psys_act->next) {
if (psys->part == psys_act->part) {
base->flag |= SELECT;
changed = 1;
@@ -320,24 +324,24 @@ static int object_select_linked_exec(bContext *C, wmOperator *op)
}
}
}
- else if (nr==7) {
+ else if (nr == 7) {
if (ob->id.lib == base->object->id.lib) {
base->flag |= SELECT;
- changed= 1;
+ changed = 1;
}
}
- else if (nr==8) {
+ else if (nr == 8) {
if (base->object->data && ((ID *)ob->data)->lib == ((ID *)base->object->data)->lib) {
base->flag |= SELECT;
- changed= 1;
+ changed = 1;
}
}
- base->object->flag= base->flag;
+ base->object->flag = base->flag;
}
CTX_DATA_END;
if (changed) {
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, CTX_data_scene(C));
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, CTX_data_scene(C));
return OPERATOR_FINISHED;
}
@@ -357,7 +361,7 @@ void OBJECT_OT_select_linked(wmOperatorType *ot)
ot->poll = objects_selectable_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first");
@@ -386,7 +390,8 @@ static short select_grouped_children(bContext *C, Object *ob, int recursive)
{
short changed = 0;
- CTX_DATA_BEGIN(C, Base*, base, selectable_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, selectable_bases)
+ {
if (ob == base->object->parent) {
if (!(base->flag & SELECT)) {
ED_base_object_select(base, BA_SELECT);
@@ -401,17 +406,17 @@ static short select_grouped_children(bContext *C, Object *ob, int recursive)
return changed;
}
-static short select_grouped_parent(bContext *C) /* Makes parent active and de-selected OBACT */
+static short select_grouped_parent(bContext *C) /* Makes parent active and de-selected OBACT */
{
- Scene *scene= CTX_data_scene(C);
- View3D *v3d= CTX_wm_view3d(C);
+ Scene *scene = CTX_data_scene(C);
+ View3D *v3d = CTX_wm_view3d(C);
short changed = 0;
- Base *baspar, *basact= CTX_data_active_base(C);
+ Base *baspar, *basact = CTX_data_active_base(C);
- if (!basact || !(basact->object->parent)) return 0; /* we know OBACT is valid */
+ if (!basact || !(basact->object->parent)) return 0; /* we know OBACT is valid */
- baspar= object_in_scene(basact->object->parent, scene);
+ baspar = BKE_scene_base_find(scene, basact->object->parent);
/* can be NULL if parent in other scene */
if (baspar && BASE_SELECTABLE(v3d, baspar)) {
@@ -424,17 +429,17 @@ static short select_grouped_parent(bContext *C) /* Makes parent active and de-se
}
-#define GROUP_MENU_MAX 24
-static short select_grouped_group(bContext *C, Object *ob) /* Select objects in the same group as the active */
+#define GROUP_MENU_MAX 24
+static short select_grouped_group(bContext *C, Object *ob) /* Select objects in the same group as the active */
{
short changed = 0;
Group *group, *ob_groups[GROUP_MENU_MAX];
- int group_count=0, i;
+ int group_count = 0, i;
uiPopupMenu *pup;
uiLayout *layout;
- for (group=CTX_data_main(C)->group.first; group && group_count < GROUP_MENU_MAX; group=group->id.next) {
- if (object_in_group (ob, group)) {
+ for (group = CTX_data_main(C)->group.first; group && group_count < GROUP_MENU_MAX; group = group->id.next) {
+ if (object_in_group(ob, group)) {
ob_groups[group_count] = group;
group_count++;
}
@@ -444,7 +449,8 @@ static short select_grouped_group(bContext *C, Object *ob) /* Select objects in
return 0;
else if (group_count == 1) {
group = ob_groups[0];
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, visible_bases)
+ {
if (!(base->flag & SELECT) && object_in_group(base->object, group)) {
ED_base_object_select(base, BA_SELECT);
changed = 1;
@@ -455,12 +461,12 @@ static short select_grouped_group(bContext *C, Object *ob) /* Select objects in
}
/* build the menu. */
- pup= uiPupMenuBegin(C, "Select Group", ICON_NONE);
- layout= uiPupMenuLayout(pup);
+ pup = uiPupMenuBegin(C, "Select Group", ICON_NONE);
+ layout = uiPupMenuLayout(pup);
- for (i=0; i<group_count; i++) {
+ for (i = 0; i < group_count; i++) {
group = ob_groups[i];
- uiItemStringO(layout, group->id.name+2, 0, "OBJECT_OT_select_same_group", "group", group->id.name);
+ uiItemStringO(layout, group->id.name + 2, 0, "OBJECT_OT_select_same_group", "group", group->id.name);
}
uiPupMenuEnd(C, pup);
@@ -469,19 +475,19 @@ static short select_grouped_group(bContext *C, Object *ob) /* Select objects in
static short select_grouped_object_hooks(bContext *C, Object *ob)
{
- Scene *scene= CTX_data_scene(C);
- View3D *v3d= CTX_wm_view3d(C);
+ Scene *scene = CTX_data_scene(C);
+ View3D *v3d = CTX_wm_view3d(C);
short changed = 0;
Base *base;
ModifierData *md;
HookModifierData *hmd;
- for (md = ob->modifiers.first; md; md=md->next) {
- if (md->type==eModifierType_Hook) {
- hmd= (HookModifierData*) md;
+ for (md = ob->modifiers.first; md; md = md->next) {
+ if (md->type == eModifierType_Hook) {
+ hmd = (HookModifierData *) md;
if (hmd->object && !(hmd->object->flag & SELECT)) {
- base= object_in_scene(hmd->object, scene);
+ base = BKE_scene_base_find(scene, hmd->object);
if (base && (BASE_SELECTABLE(v3d, base))) {
ED_base_object_select(base, BA_SELECT);
changed = 1;
@@ -498,8 +504,9 @@ static short select_grouped_siblings(bContext *C, Object *ob)
{
short changed = 0;
- CTX_DATA_BEGIN(C, Base*, base, selectable_bases) {
- if ((base->object->parent==ob->parent) && !(base->flag & SELECT)) {
+ CTX_DATA_BEGIN (C, Base *, base, selectable_bases)
+ {
+ if ((base->object->parent == ob->parent) && !(base->flag & SELECT)) {
ED_base_object_select(base, BA_SELECT);
changed = 1;
}
@@ -512,7 +519,8 @@ static short select_grouped_type(bContext *C, Object *ob)
{
short changed = 0;
- CTX_DATA_BEGIN(C, Base*, base, selectable_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, selectable_bases)
+ {
if ((base->object->type == ob->type) && !(base->flag & SELECT)) {
ED_base_object_select(base, BA_SELECT);
changed = 1;
@@ -526,7 +534,8 @@ static short select_grouped_layer(bContext *C, Object *ob)
{
char changed = 0;
- CTX_DATA_BEGIN(C, Base*, base, selectable_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, selectable_bases)
+ {
if ((base->lay & ob->lay) && !(base->flag & SELECT)) {
ED_base_object_select(base, BA_SELECT);
changed = 1;
@@ -540,7 +549,8 @@ static short select_grouped_index_object(bContext *C, Object *ob)
{
char changed = 0;
- CTX_DATA_BEGIN(C, Base*, base, selectable_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, selectable_bases)
+ {
if ((base->object->index == ob->index) && !(base->flag & SELECT)) {
ED_base_object_select(base, BA_SELECT);
changed = 1;
@@ -554,7 +564,8 @@ static short select_grouped_color(bContext *C, Object *ob)
{
char changed = 0;
- CTX_DATA_BEGIN(C, Base*, base, selectable_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, selectable_bases)
+ {
if (!(base->flag & SELECT) && (compare_v3v3(base->object->col, ob->col, 0.005f))) {
ED_base_object_select(base, BA_SELECT);
changed = 1;
@@ -569,8 +580,8 @@ static short objects_share_gameprop(Object *a, Object *b)
bProperty *prop;
/*make a copy of all its properties*/
- for ( prop= a->prop.first; prop; prop = prop->next ) {
- if ( get_ob_property(b, prop->name) )
+ for (prop = a->prop.first; prop; prop = prop->next) {
+ if (get_ob_property(b, prop->name) )
return 1;
}
return 0;
@@ -580,7 +591,8 @@ static short select_grouped_gameprops(bContext *C, Object *ob)
{
char changed = 0;
- CTX_DATA_BEGIN(C, Base*, base, selectable_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, selectable_bases)
+ {
if (!(base->flag & SELECT) && (objects_share_gameprop(base->object, ob))) {
ED_base_object_select(base, BA_SELECT);
changed = 1;
@@ -602,7 +614,7 @@ static short select_grouped_keyingset(bContext *C, Object *UNUSED(ob))
/* select each object that Keying Set refers to */
// TODO: perhaps to be more in line with the rest of these, we should only take objects
// if the passed in object is included in this too
- CTX_DATA_BEGIN(C, Base*, base, selectable_bases)
+ CTX_DATA_BEGIN (C, Base *, base, selectable_bases)
{
/* only check for this object if it isn't selected already, to limit time wasted */
if ((base->flag & SELECT) == 0) {
@@ -628,42 +640,43 @@ static short select_grouped_keyingset(bContext *C, Object *UNUSED(ob))
static int object_select_grouped_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
Object *ob;
int nr = RNA_enum_get(op->ptr, "type");
short changed = 0, extend;
- extend= RNA_boolean_get(op->ptr, "extend");
+ extend = RNA_boolean_get(op->ptr, "extend");
if (extend == 0) {
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, visible_bases)
+ {
ED_base_object_select(base, BA_DESELECT);
changed = 1;
}
CTX_DATA_END;
}
- ob= OBACT;
- if (ob==NULL) {
+ ob = OBACT;
+ if (ob == NULL) {
BKE_report(op->reports, RPT_ERROR, "No Active Object");
return OPERATOR_CANCELLED;
}
- if (nr==1) changed |= select_grouped_children(C, ob, 1);
- else if (nr==2) changed |= select_grouped_children(C, ob, 0);
- else if (nr==3) changed |= select_grouped_parent(C);
- else if (nr==4) changed |= select_grouped_siblings(C, ob);
- else if (nr==5) changed |= select_grouped_type(C, ob);
- else if (nr==6) changed |= select_grouped_layer(C, ob);
- else if (nr==7) changed |= select_grouped_group(C, ob);
- else if (nr==8) changed |= select_grouped_object_hooks(C, ob);
- else if (nr==9) changed |= select_grouped_index_object(C, ob);
- else if (nr==10) changed |= select_grouped_color(C, ob);
- else if (nr==11) changed |= select_grouped_gameprops(C, ob);
- else if (nr==12) changed |= select_grouped_keyingset(C, ob);
+ if (nr == 1) changed |= select_grouped_children(C, ob, 1);
+ else if (nr == 2) changed |= select_grouped_children(C, ob, 0);
+ else if (nr == 3) changed |= select_grouped_parent(C);
+ else if (nr == 4) changed |= select_grouped_siblings(C, ob);
+ else if (nr == 5) changed |= select_grouped_type(C, ob);
+ else if (nr == 6) changed |= select_grouped_layer(C, ob);
+ else if (nr == 7) changed |= select_grouped_group(C, ob);
+ else if (nr == 8) changed |= select_grouped_object_hooks(C, ob);
+ else if (nr == 9) changed |= select_grouped_index_object(C, ob);
+ else if (nr == 10) changed |= select_grouped_color(C, ob);
+ else if (nr == 11) changed |= select_grouped_gameprops(C, ob);
+ else if (nr == 12) changed |= select_grouped_keyingset(C, ob);
if (changed) {
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, CTX_data_scene(C));
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, CTX_data_scene(C));
return OPERATOR_FINISHED;
}
@@ -683,7 +696,7 @@ void OBJECT_OT_select_grouped(wmOperatorType *ot)
ot->poll = objects_selectable_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first");
@@ -697,24 +710,26 @@ static int object_select_by_layer_exec(bContext *C, wmOperator *op)
unsigned int layernum;
short extend;
- extend= RNA_boolean_get(op->ptr, "extend");
+ extend = RNA_boolean_get(op->ptr, "extend");
layernum = RNA_int_get(op->ptr, "layers");
if (extend == 0) {
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, visible_bases)
+ {
ED_base_object_select(base, BA_DESELECT);
}
CTX_DATA_END;
}
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
- if (base->lay == (1<< (layernum -1)))
+ CTX_DATA_BEGIN (C, Base *, base, visible_bases)
+ {
+ if (base->lay == (1 << (layernum - 1)))
ED_base_object_select(base, BA_SELECT);
}
CTX_DATA_END;
/* undo? */
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, CTX_data_scene(C));
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, CTX_data_scene(C));
return OPERATOR_FINISHED;
}
@@ -732,7 +747,7 @@ void OBJECT_OT_select_by_layer(wmOperatorType *ot)
ot->poll = objects_selectable_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first");
@@ -750,7 +765,8 @@ static int object_select_all_exec(bContext *C, wmOperator *op)
if (action == SEL_TOGGLE) {
action = SEL_SELECT;
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, visible_bases)
+ {
if (base->flag & SELECT) {
action = SEL_DESELECT;
break;
@@ -759,27 +775,28 @@ static int object_select_all_exec(bContext *C, wmOperator *op)
CTX_DATA_END;
}
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, visible_bases)
+ {
switch (action) {
- case SEL_SELECT:
- ED_base_object_select(base, BA_SELECT);
- break;
- case SEL_DESELECT:
- ED_base_object_select(base, BA_DESELECT);
- break;
- case SEL_INVERT:
- if (base->flag & SELECT) {
- ED_base_object_select(base, BA_DESELECT);
- }
- else {
+ case SEL_SELECT:
ED_base_object_select(base, BA_SELECT);
- }
- break;
+ break;
+ case SEL_DESELECT:
+ ED_base_object_select(base, BA_DESELECT);
+ break;
+ case SEL_INVERT:
+ if (base->flag & SELECT) {
+ ED_base_object_select(base, BA_DESELECT);
+ }
+ else {
+ ED_base_object_select(base, BA_SELECT);
+ }
+ break;
}
}
CTX_DATA_END;
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, CTX_data_scene(C));
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, CTX_data_scene(C));
return OPERATOR_FINISHED;
}
@@ -797,7 +814,7 @@ void OBJECT_OT_select_all(wmOperatorType *ot)
ot->poll = objects_selectable_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
WM_operator_properties_select_all(ot);
}
@@ -814,7 +831,7 @@ static int object_select_same_group_exec(bContext *C, wmOperator *op)
RNA_string_get(op->ptr, "group", group_name);
- for (group=CTX_data_main(C)->group.first; group; group=group->id.next) {
+ for (group = CTX_data_main(C)->group.first; group; group = group->id.next) {
if (!strcmp(group->id.name, group_name))
break;
}
@@ -822,13 +839,14 @@ static int object_select_same_group_exec(bContext *C, wmOperator *op)
if (!group)
return OPERATOR_PASS_THROUGH;
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, visible_bases)
+ {
if (!(base->flag & SELECT) && object_in_group(base->object, group))
ED_base_object_select(base, BA_SELECT);
}
CTX_DATA_END;
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, CTX_data_scene(C));
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, CTX_data_scene(C));
return OPERATOR_FINISHED;
}
@@ -846,7 +864,7 @@ void OBJECT_OT_select_same_group(wmOperatorType *ot)
ot->poll = objects_selectable_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_string(ot->srna, "group", "", MAX_ID_NAME, "Group", "Name of the group to select");
}
@@ -854,20 +872,21 @@ void OBJECT_OT_select_same_group(wmOperatorType *ot)
/**************************** Select Mirror ****************************/
static int object_select_mirror_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
short extend;
- extend= RNA_boolean_get(op->ptr, "extend");
+ extend = RNA_boolean_get(op->ptr, "extend");
- CTX_DATA_BEGIN(C, Base*, primbase, selected_bases) {
+ CTX_DATA_BEGIN (C, Base *, primbase, selected_bases)
+ {
char tmpname[MAXBONENAME];
- flip_side_name(tmpname, primbase->object->id.name+2, TRUE);
+ flip_side_name(tmpname, primbase->object->id.name + 2, TRUE);
- if (strcmp(tmpname, primbase->object->id.name+2)!=0) { /* names differ */
- Object *ob= (Object *)find_id("OB", tmpname);
+ if (strcmp(tmpname, primbase->object->id.name + 2) != 0) { /* names differ */
+ Object *ob = (Object *)BKE_libblock_find_name(ID_OB, tmpname);
if (ob) {
- Base *secbase= object_in_scene(ob, scene);
+ Base *secbase = BKE_scene_base_find(scene, ob);
if (secbase) {
ED_base_object_select(secbase, BA_SELECT);
@@ -881,7 +900,7 @@ static int object_select_mirror_exec(bContext *C, wmOperator *op)
CTX_DATA_END;
/* undo? */
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, CTX_data_scene(C));
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, CTX_data_scene(C));
return OPERATOR_FINISHED;
}
@@ -899,7 +918,7 @@ void OBJECT_OT_select_mirror(wmOperatorType *ot)
ot->poll = objects_selectable_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everything first");
}
@@ -912,24 +931,26 @@ static int object_select_random_exec(bContext *C, wmOperator *op)
float percent;
short extend;
- extend= RNA_boolean_get(op->ptr, "extend");
+ extend = RNA_boolean_get(op->ptr, "extend");
if (extend == 0) {
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, visible_bases)
+ {
ED_base_object_select(base, BA_DESELECT);
}
CTX_DATA_END;
}
- percent = RNA_float_get(op->ptr, "percent")/100.0f;
+ percent = RNA_float_get(op->ptr, "percent") / 100.0f;
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, visible_bases)
+ {
if (BLI_frand() < percent) {
ED_base_object_select(base, BA_SELECT);
}
}
CTX_DATA_END;
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, CTX_data_scene(C));
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, CTX_data_scene(C));
return OPERATOR_FINISHED;
}
@@ -947,7 +968,7 @@ void OBJECT_OT_select_random(wmOperatorType *ot)
ot->poll = objects_selectable_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_float_percentage(ot->srna, "percent", 50.f, 0.0f, 100.0f, "Percent", "Percentage of objects to select randomly", 0.f, 100.0f);
diff --git a/source/blender/editors/object/object_shapekey.c b/source/blender/editors/object/object_shapekey.c
index 79b1ca13c9e..19864ed58cf 100644
--- a/source/blender/editors/object/object_shapekey.c
+++ b/source/blender/editors/object/object_shapekey.c
@@ -77,12 +77,12 @@
static void ED_object_shape_key_add(bContext *C, Scene *scene, Object *ob, int from_mix)
{
KeyBlock *kb;
- if ((kb = object_insert_shape_key(scene, ob, NULL, from_mix))) {
- Key *key= ob_get_key(ob);
+ if ((kb = BKE_object_insert_shape_key(scene, ob, NULL, from_mix))) {
+ Key *key = ob_get_key(ob);
/* for absolute shape keys, new keys may not be added last */
ob->shapenr = BLI_findindex(&key->block, kb) + 1;
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
}
}
@@ -90,36 +90,36 @@ static void ED_object_shape_key_add(bContext *C, Scene *scene, Object *ob, int f
static int ED_object_shape_key_remove(bContext *C, Object *ob)
{
- Main *bmain= CTX_data_main(C);
+ Main *bmain = CTX_data_main(C);
KeyBlock *kb, *rkb;
Key *key;
//IpoCurve *icu;
- key= ob_get_key(ob);
- if (key==NULL)
+ key = ob_get_key(ob);
+ if (key == NULL)
return 0;
- kb= BLI_findlink(&key->block, ob->shapenr-1);
+ kb = BLI_findlink(&key->block, ob->shapenr - 1);
if (kb) {
- for (rkb= key->block.first; rkb; rkb= rkb->next)
- if (rkb->relative == ob->shapenr-1)
- rkb->relative= 0;
+ for (rkb = key->block.first; rkb; rkb = rkb->next)
+ if (rkb->relative == ob->shapenr - 1)
+ rkb->relative = 0;
BLI_remlink(&key->block, kb);
key->totkey--;
- if (key->refkey== kb) {
- key->refkey= key->block.first;
+ if (key->refkey == kb) {
+ key->refkey = key->block.first;
if (key->refkey) {
/* apply new basis key on original data */
- switch(ob->type) {
+ switch (ob->type) {
case OB_MESH:
key_to_mesh(key->refkey, ob->data);
break;
case OB_CURVE:
case OB_SURF:
- key_to_curve(key->refkey, ob->data, BKE_curve_nurbs(ob->data));
+ key_to_curve(key->refkey, ob->data, BKE_curve_nurbs_get(ob->data));
break;
case OB_LATTICE:
key_to_latt(key->refkey, ob->data);
@@ -136,16 +136,16 @@ static int ED_object_shape_key_remove(bContext *C, Object *ob)
}
}
- if (key->totkey==0) {
- if (GS(key->from->name)==ID_ME) ((Mesh *)key->from)->key= NULL;
- else if (GS(key->from->name)==ID_CU) ((Curve *)key->from)->key= NULL;
- else if (GS(key->from->name)==ID_LT) ((Lattice *)key->from)->key= NULL;
+ if (key->totkey == 0) {
+ if (GS(key->from->name) == ID_ME) ((Mesh *)key->from)->key = NULL;
+ else if (GS(key->from->name) == ID_CU) ((Curve *)key->from)->key = NULL;
+ else if (GS(key->from->name) == ID_LT) ((Lattice *)key->from)->key = NULL;
- free_libblock_us(&(bmain->key), key);
+ BKE_libblock_free_us(&(bmain->key), key);
}
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
return 1;
}
@@ -155,53 +155,53 @@ static int object_shape_key_mirror(bContext *C, Object *ob)
KeyBlock *kb;
Key *key;
- key= ob_get_key(ob);
- if (key==NULL)
+ key = ob_get_key(ob);
+ if (key == NULL)
return 0;
- kb= BLI_findlink(&key->block, ob->shapenr-1);
+ kb = BLI_findlink(&key->block, ob->shapenr - 1);
if (kb) {
int i1, i2;
float *fp1, *fp2;
float tvec[3];
- char *tag_elem= MEM_callocN(sizeof(char) * kb->totelem, "shape_key_mirror");
+ char *tag_elem = MEM_callocN(sizeof(char) * kb->totelem, "shape_key_mirror");
- if (ob->type==OB_MESH) {
- Mesh *me= ob->data;
+ if (ob->type == OB_MESH) {
+ Mesh *me = ob->data;
MVert *mv;
mesh_octree_table(ob, NULL, NULL, 's');
- for (i1=0, mv=me->mvert; i1<me->totvert; i1++, mv++) {
- i2= mesh_get_x_mirror_vert(ob, i1);
- if (i2==i1) {
- fp1= ((float *)kb->data) + i1*3;
+ for (i1 = 0, mv = me->mvert; i1 < me->totvert; i1++, mv++) {
+ i2 = mesh_get_x_mirror_vert(ob, i1);
+ if (i2 == i1) {
+ fp1 = ((float *)kb->data) + i1 * 3;
fp1[0] = -fp1[0];
- tag_elem[i1]= 1;
+ tag_elem[i1] = 1;
}
else if (i2 != -1) {
- if (tag_elem[i1]==0 && tag_elem[i2]==0) {
- fp1= ((float *)kb->data) + i1*3;
- fp2= ((float *)kb->data) + i2*3;
+ if (tag_elem[i1] == 0 && tag_elem[i2] == 0) {
+ fp1 = ((float *)kb->data) + i1 * 3;
+ fp2 = ((float *)kb->data) + i2 * 3;
- copy_v3_v3(tvec, fp1);
- copy_v3_v3(fp1, fp2);
- copy_v3_v3(fp2, tvec);
+ copy_v3_v3(tvec, fp1);
+ copy_v3_v3(fp1, fp2);
+ copy_v3_v3(fp2, tvec);
/* flip x axis */
fp1[0] = -fp1[0];
fp2[0] = -fp2[0];
}
- tag_elem[i1]= tag_elem[i2]= 1;
+ tag_elem[i1] = tag_elem[i2] = 1;
}
}
mesh_octree_table(ob, NULL, NULL, 'e');
}
else if (ob->type == OB_LATTICE) {
- Lattice *lt= ob->data;
+ Lattice *lt = ob->data;
int i1, i2;
float *fp1, *fp2;
int u, v, w;
@@ -213,28 +213,28 @@ static int object_shape_key_mirror(bContext *C, Object *ob)
/* if (lt->editlatt) lt= lt->editlatt->latt; */
- for (w=0; w<lt->pntsw; w++) {
- for (v=0; v<lt->pntsv; v++) {
- for (u=0; u<pntsu_half; u++) {
- int u_inv= (lt->pntsu - 1) - u;
+ for (w = 0; w < lt->pntsw; w++) {
+ for (v = 0; v < lt->pntsv; v++) {
+ for (u = 0; u < pntsu_half; u++) {
+ int u_inv = (lt->pntsu - 1) - u;
float tvec[3];
if (u == u_inv) {
- i1= LT_INDEX(lt, u, v, w);
- fp1= ((float *)kb->data) + i1*3;
- fp1[0]= -fp1[0];
+ i1 = LT_INDEX(lt, u, v, w);
+ fp1 = ((float *)kb->data) + i1 * 3;
+ fp1[0] = -fp1[0];
}
else {
- i1= LT_INDEX(lt, u, v, w);
- i2= LT_INDEX(lt, u_inv, v, w);
+ i1 = LT_INDEX(lt, u, v, w);
+ i2 = LT_INDEX(lt, u_inv, v, w);
- fp1= ((float *)kb->data) + i1*3;
- fp2= ((float *)kb->data) + i2*3;
+ fp1 = ((float *)kb->data) + i1 * 3;
+ fp2 = ((float *)kb->data) + i2 * 3;
copy_v3_v3(tvec, fp1);
copy_v3_v3(fp1, fp2);
copy_v3_v3(fp2, tvec);
- fp1[0]= -fp1[0];
- fp2[0]= -fp2[0];
+ fp1[0] = -fp1[0];
+ fp2[0] = -fp2[0];
}
}
}
@@ -245,7 +245,7 @@ static int object_shape_key_mirror(bContext *C, Object *ob)
}
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
return 1;
}
@@ -254,22 +254,22 @@ static int object_shape_key_mirror(bContext *C, Object *ob)
static int shape_key_mode_poll(bContext *C)
{
- Object *ob= ED_object_context(C);
- ID *data= (ob)? ob->data: NULL;
+ Object *ob = ED_object_context(C);
+ ID *data = (ob) ? ob->data : NULL;
return (ob && !ob->id.lib && data && !data->lib && ob->mode != OB_MODE_EDIT);
}
static int shape_key_poll(bContext *C)
{
- Object *ob= ED_object_context(C);
- ID *data= (ob)? ob->data: NULL;
+ Object *ob = ED_object_context(C);
+ ID *data = (ob) ? ob->data : NULL;
return (ob && !ob->id.lib && data && !data->lib);
}
static int shape_key_add_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
- Object *ob= ED_object_context(C);
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = ED_object_context(C);
int from_mix = RNA_boolean_get(op->ptr, "from_mix");
ED_object_shape_key_add(C, scene, ob, from_mix);
@@ -289,7 +289,7 @@ void OBJECT_OT_shape_key_add(wmOperatorType *ot)
ot->exec = shape_key_add_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "from_mix", 1, "From Mix", "Create the new shape key from the existing mix of keys");
@@ -297,7 +297,7 @@ void OBJECT_OT_shape_key_add(wmOperatorType *ot)
static int shape_key_remove_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *ob= ED_object_context(C);
+ Object *ob = ED_object_context(C);
if (!ED_object_shape_key_remove(C, ob))
return OPERATOR_CANCELLED;
@@ -317,23 +317,23 @@ void OBJECT_OT_shape_key_remove(wmOperatorType *ot)
ot->exec = shape_key_remove_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int shape_key_clear_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *ob= ED_object_context(C);
- Key *key= ob_get_key(ob);
- KeyBlock *kb= ob_get_keyblock(ob);
+ Object *ob = ED_object_context(C);
+ Key *key = ob_get_key(ob);
+ KeyBlock *kb = ob_get_keyblock(ob);
if (!key || !kb)
return OPERATOR_CANCELLED;
- for (kb=key->block.first; kb; kb=kb->next)
- kb->curval= 0.0f;
+ for (kb = key->block.first; kb; kb = kb->next)
+ kb->curval = 0.0f;
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
return OPERATOR_FINISHED;
}
@@ -350,7 +350,7 @@ void OBJECT_OT_shape_key_clear(wmOperatorType *ot)
ot->exec = shape_key_clear_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* starting point and step size could be optional */
@@ -364,11 +364,11 @@ static int shape_key_retime_exec(bContext *C, wmOperator *UNUSED(op))
if (!key || !kb)
return OPERATOR_CANCELLED;
- for (kb=key->block.first; kb; kb=kb->next)
+ for (kb = key->block.first; kb; kb = kb->next)
kb->pos = (cfra += 0.1f);
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
return OPERATOR_FINISHED;
}
@@ -385,12 +385,12 @@ void OBJECT_OT_shape_key_retime(wmOperatorType *ot)
ot->exec = shape_key_retime_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int shape_key_mirror_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *ob= ED_object_context(C);
+ Object *ob = ED_object_context(C);
if (!object_shape_key_mirror(C, ob))
return OPERATOR_CANCELLED;
@@ -403,34 +403,35 @@ void OBJECT_OT_shape_key_mirror(wmOperatorType *ot)
/* identifiers */
ot->name = "Mirror Shape Key";
ot->idname = "OBJECT_OT_shape_key_mirror";
+ ot->description = "Mirror the current shape key along the local X axis";
/* api callbacks */
ot->poll = shape_key_mode_poll;
ot->exec = shape_key_mirror_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int shape_key_move_exec(bContext *C, wmOperator *op)
{
- Object *ob= ED_object_context(C);
+ Object *ob = ED_object_context(C);
- int type= RNA_enum_get(op->ptr, "type");
- Key *key= ob_get_key(ob);
+ int type = RNA_enum_get(op->ptr, "type");
+ Key *key = ob_get_key(ob);
if (key) {
KeyBlock *kb, *kb_other;
- int shapenr_act= ob->shapenr-1;
- int shapenr_swap= shapenr_act + type;
- kb= BLI_findlink(&key->block, shapenr_act);
+ int shapenr_act = ob->shapenr - 1;
+ int shapenr_swap = shapenr_act + type;
+ kb = BLI_findlink(&key->block, shapenr_act);
- if ((type==-1 && kb->prev==NULL) || (type==1 && kb->next==NULL)) {
+ if ((type == -1 && kb->prev == NULL) || (type == 1 && kb->next == NULL)) {
return OPERATOR_CANCELLED;
}
- for (kb_other= key->block.first; kb_other; kb_other= kb_other->next) {
+ for (kb_other = key->block.first; kb_other; kb_other = kb_other->next) {
if (kb_other->relative == shapenr_act) {
kb_other->relative += type;
}
@@ -439,16 +440,16 @@ static int shape_key_move_exec(bContext *C, wmOperator *op)
}
}
- if (type==-1) {
+ if (type == -1) {
/* move back */
- kb_other= kb->prev;
+ kb_other = kb->prev;
BLI_remlink(&key->block, kb);
BLI_insertlinkbefore(&key->block, kb_other, kb);
ob->shapenr--;
}
else {
/* move next */
- kb_other= kb->next;
+ kb_other = kb->next;
BLI_remlink(&key->block, kb);
BLI_insertlinkafter(&key->block, kb_other, kb);
ob->shapenr++;
@@ -458,7 +459,7 @@ static int shape_key_move_exec(bContext *C, wmOperator *op)
}
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
return OPERATOR_FINISHED;
}
@@ -474,13 +475,14 @@ void OBJECT_OT_shape_key_move(wmOperatorType *ot)
/* identifiers */
ot->name = "Move Shape Key";
ot->idname = "OBJECT_OT_shape_key_move";
+ ot->description = "Move the active shape key up/down in the list";
/* api callbacks */
ot->poll = shape_key_mode_poll;
ot->exec = shape_key_move_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_enum(ot->srna, "type", slot_move, 0, "Type", "");
}
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index 55954790687..34395163ad3 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -78,57 +78,57 @@
static void object_clear_loc(Object *ob)
{
/* clear location if not locked */
- if ((ob->protectflag & OB_LOCK_LOCX)==0)
- ob->loc[0]= ob->dloc[0]= 0.0f;
- if ((ob->protectflag & OB_LOCK_LOCY)==0)
- ob->loc[1]= ob->dloc[1]= 0.0f;
- if ((ob->protectflag & OB_LOCK_LOCZ)==0)
- ob->loc[2]= ob->dloc[2]= 0.0f;
+ if ((ob->protectflag & OB_LOCK_LOCX) == 0)
+ ob->loc[0] = ob->dloc[0] = 0.0f;
+ if ((ob->protectflag & OB_LOCK_LOCY) == 0)
+ ob->loc[1] = ob->dloc[1] = 0.0f;
+ if ((ob->protectflag & OB_LOCK_LOCZ) == 0)
+ ob->loc[2] = ob->dloc[2] = 0.0f;
}
/* clear rotation of object */
static void object_clear_rot(Object *ob)
{
/* clear rotations that aren't locked */
- if (ob->protectflag & (OB_LOCK_ROTX|OB_LOCK_ROTY|OB_LOCK_ROTZ|OB_LOCK_ROTW)) {
+ if (ob->protectflag & (OB_LOCK_ROTX | OB_LOCK_ROTY | OB_LOCK_ROTZ | OB_LOCK_ROTW)) {
if (ob->protectflag & OB_LOCK_ROT4D) {
/* perform clamping on a component by component basis */
if (ob->rotmode == ROT_MODE_AXISANGLE) {
if ((ob->protectflag & OB_LOCK_ROTW) == 0)
- ob->rotAngle= ob->drotAngle= 0.0f;
+ ob->rotAngle = ob->drotAngle = 0.0f;
if ((ob->protectflag & OB_LOCK_ROTX) == 0)
- ob->rotAxis[0]= ob->drotAxis[0]= 0.0f;
+ ob->rotAxis[0] = ob->drotAxis[0] = 0.0f;
if ((ob->protectflag & OB_LOCK_ROTY) == 0)
- ob->rotAxis[1]= ob->drotAxis[1]= 0.0f;
+ ob->rotAxis[1] = ob->drotAxis[1] = 0.0f;
if ((ob->protectflag & OB_LOCK_ROTZ) == 0)
- ob->rotAxis[2]= ob->drotAxis[2]= 0.0f;
+ ob->rotAxis[2] = ob->drotAxis[2] = 0.0f;
/* check validity of axis - axis should never be 0,0,0 (if so, then we make it rotate about y) */
if (IS_EQF(ob->rotAxis[0], ob->rotAxis[1]) && IS_EQF(ob->rotAxis[1], ob->rotAxis[2]))
ob->rotAxis[1] = 1.0f;
if (IS_EQF(ob->drotAxis[0], ob->drotAxis[1]) && IS_EQF(ob->drotAxis[1], ob->drotAxis[2]))
- ob->drotAxis[1]= 1.0f;
+ ob->drotAxis[1] = 1.0f;
}
else if (ob->rotmode == ROT_MODE_QUAT) {
if ((ob->protectflag & OB_LOCK_ROTW) == 0)
- ob->quat[0]= ob->dquat[0]= 1.0f;
+ ob->quat[0] = ob->dquat[0] = 1.0f;
if ((ob->protectflag & OB_LOCK_ROTX) == 0)
- ob->quat[1]= ob->dquat[1]= 0.0f;
+ ob->quat[1] = ob->dquat[1] = 0.0f;
if ((ob->protectflag & OB_LOCK_ROTY) == 0)
- ob->quat[2]= ob->dquat[2]= 0.0f;
+ ob->quat[2] = ob->dquat[2] = 0.0f;
if ((ob->protectflag & OB_LOCK_ROTZ) == 0)
- ob->quat[3]= ob->dquat[3]= 0.0f;
+ ob->quat[3] = ob->dquat[3] = 0.0f;
// TODO: does this quat need normalizing now?
}
else {
/* the flag may have been set for the other modes, so just ignore the extra flag... */
if ((ob->protectflag & OB_LOCK_ROTX) == 0)
- ob->rot[0]= ob->drot[0]= 0.0f;
+ ob->rot[0] = ob->drot[0] = 0.0f;
if ((ob->protectflag & OB_LOCK_ROTY) == 0)
- ob->rot[1]= ob->drot[1]= 0.0f;
+ ob->rot[1] = ob->drot[1] = 0.0f;
if ((ob->protectflag & OB_LOCK_ROTZ) == 0)
- ob->rot[2]= ob->drot[2]= 0.0f;
+ ob->rot[2] = ob->drot[2] = 0.0f;
}
}
else {
@@ -147,30 +147,30 @@ static void object_clear_rot(Object *ob)
copy_v3_v3(oldeul, ob->rot);
}
- eul[0]= eul[1]= eul[2]= 0.0f;
+ eul[0] = eul[1] = eul[2] = 0.0f;
if (ob->protectflag & OB_LOCK_ROTX)
- eul[0]= oldeul[0];
+ eul[0] = oldeul[0];
if (ob->protectflag & OB_LOCK_ROTY)
- eul[1]= oldeul[1];
+ eul[1] = oldeul[1];
if (ob->protectflag & OB_LOCK_ROTZ)
- eul[2]= oldeul[2];
+ eul[2] = oldeul[2];
if (ob->rotmode == ROT_MODE_QUAT) {
eul_to_quat(ob->quat, eul);
/* quaternions flip w sign to accumulate rotations correctly */
- if ((quat1[0]<0.0f && ob->quat[0]>0.0f) || (quat1[0]>0.0f && ob->quat[0]<0.0f)) {
+ if ((quat1[0] < 0.0f && ob->quat[0] > 0.0f) || (quat1[0] > 0.0f && ob->quat[0] < 0.0f)) {
mul_qt_fl(ob->quat, -1.0f);
}
}
else if (ob->rotmode == ROT_MODE_AXISANGLE) {
- eulO_to_axis_angle(ob->rotAxis, &ob->rotAngle,eul, EULER_ORDER_DEFAULT);
+ eulO_to_axis_angle(ob->rotAxis, &ob->rotAngle, eul, EULER_ORDER_DEFAULT);
}
else {
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);
@@ -191,17 +191,17 @@ static void object_clear_rot(Object *ob)
static void object_clear_scale(Object *ob)
{
/* clear scale factors which are not locked */
- if ((ob->protectflag & OB_LOCK_SCALEX)==0) {
- ob->dscale[0]= 1.0f;
- ob->size[0]= 1.0f;
+ if ((ob->protectflag & OB_LOCK_SCALEX) == 0) {
+ ob->dscale[0] = 1.0f;
+ ob->size[0] = 1.0f;
}
- if ((ob->protectflag & OB_LOCK_SCALEY)==0) {
- ob->dscale[1]= 1.0f;
- ob->size[1]= 1.0f;
+ if ((ob->protectflag & OB_LOCK_SCALEY) == 0) {
+ ob->dscale[1] = 1.0f;
+ ob->size[1] = 1.0f;
}
- if ((ob->protectflag & OB_LOCK_SCALEZ)==0) {
- ob->dscale[2]= 1.0f;
- ob->size[2]= 1.0f;
+ if ((ob->protectflag & OB_LOCK_SCALEZ) == 0) {
+ ob->dscale[2] = 1.0f;
+ ob->size[2] = 1.0f;
}
}
@@ -209,10 +209,10 @@ static void object_clear_scale(Object *ob)
/* generic exec for clear-transform operators */
static int object_clear_transform_generic_exec(bContext *C, wmOperator *op,
- void (*clear_func)(Object*), const char default_ksName[])
+ void (*clear_func)(Object *), const char default_ksName[])
{
Main *bmain = CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
KeyingSet *ks;
/* sanity checks */
@@ -227,7 +227,7 @@ static int object_clear_transform_generic_exec(bContext *C, wmOperator *op,
/* operate on selected objects only if they aren't in weight-paint mode
* (so that object-transform clearing won't be applied at same time as bone-clearing)
*/
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects)
+ CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
{
if (!(ob->mode & OB_MODE_WEIGHT_PAINT)) {
/* run provided clearing function */
@@ -244,7 +244,7 @@ static int object_clear_transform_generic_exec(bContext *C, wmOperator *op,
/* this is needed so children are also updated */
DAG_ids_flush_update(bmain, 0);
- WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
return OPERATOR_FINISHED;
}
@@ -269,7 +269,7 @@ void OBJECT_OT_location_clear(wmOperatorType *ot)
ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int object_rotation_clear_exec(bContext *C, wmOperator *op)
@@ -289,7 +289,7 @@ void OBJECT_OT_rotation_clear(wmOperatorType *ot)
ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int object_scale_clear_exec(bContext *C, wmOperator *op)
@@ -309,23 +309,23 @@ void OBJECT_OT_scale_clear(wmOperatorType *ot)
ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* --------------- */
static int object_origin_clear_exec(bContext *C, wmOperator *UNUSED(op))
{
- Main *bmain= CTX_data_main(C);
+ Main *bmain = CTX_data_main(C);
float *v1, *v3;
float mat[3][3];
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects)
+ CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
{
if (ob->parent) {
/* vectors pointed to by v1 and v3 will get modified */
- v1= ob->loc;
- v3= ob->parentinv[3];
+ v1 = ob->loc;
+ v3 = ob->parentinv[3];
copy_m3_m4(mat, ob->parentinv);
negate_v3_v3(v3, v1);
@@ -338,7 +338,7 @@ static int object_origin_clear_exec(bContext *C, wmOperator *UNUSED(op))
DAG_ids_flush_update(bmain, 0);
- WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
return OPERATOR_FINISHED;
}
@@ -355,23 +355,23 @@ void OBJECT_OT_origin_clear(wmOperatorType *ot)
ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/*************************** Apply Transformation ****************************/
/* use this when the loc/size/rot of the parent has changed but the children
- * should stay in the same place, e.g. for apply-size-rot or object center */
-static void ignore_parent_tx(Main *bmain, Scene *scene, Object *ob )
+* should stay in the same place, e.g. for apply-size-rot or object center */
+static void ignore_parent_tx(Main *bmain, Scene *scene, Object *ob)
{
Object workob;
Object *ob_child;
/* a change was made, adjust the children to compensate */
- for (ob_child=bmain->object.first; ob_child; ob_child=ob_child->id.next) {
+ for (ob_child = bmain->object.first; ob_child; ob_child = ob_child->id.next) {
if (ob_child->parent == ob) {
- object_apply_mat4(ob_child, ob_child->obmat, TRUE, FALSE);
- what_does_parent(scene, ob_child, &workob);
+ BKE_object_apply_mat4(ob_child, ob_child->obmat, TRUE, FALSE);
+ BKE_object_workob_calc_parent(scene, ob_child, &workob);
invert_m4_m4(ob_child->parentinv, workob.obmat);
}
}
@@ -379,21 +379,22 @@ static void ignore_parent_tx(Main *bmain, Scene *scene, Object *ob )
static int apply_objects_internal(bContext *C, ReportList *reports, int apply_loc, int apply_rot, int apply_scale)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
float rsmat[3][3], tmat[3][3], obmat[3][3], iobmat[3][3], mat[4][4], scale;
int a, change = 0;
/* first check if we can execute */
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
+ {
- if (ob->type==OB_MESH) {
+ if (ob->type == OB_MESH) {
if (ID_REAL_USERS(ob->data) > 1) {
BKE_report(reports, RPT_ERROR, "Can't apply to a multi user mesh, doing nothing");
return OPERATOR_CANCELLED;
}
}
- else if (ob->type==OB_ARMATURE) {
+ else if (ob->type == OB_ARMATURE) {
if (ID_REAL_USERS(ob->data) > 1) {
BKE_report(reports, RPT_ERROR, "Can't apply to a multi user armature, doing nothing");
return OPERATOR_CANCELLED;
@@ -413,7 +414,7 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
return OPERATOR_CANCELLED;
}
- cu= ob->data;
+ cu = ob->data;
if (!(cu->flag & CU_3D) && (apply_rot || apply_loc)) {
BKE_report(reports, RPT_ERROR, "Neither rotation nor location could be applied to a 2d curve, doing nothing");
@@ -428,21 +429,22 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
CTX_DATA_END;
/* now execute */
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
+ {
/* calculate rotation/scale matrix */
if (apply_scale && apply_rot)
- object_to_mat3(ob, rsmat);
+ BKE_object_to_mat3(ob, rsmat);
else if (apply_scale)
- object_scale_to_mat3(ob, rsmat);
+ BKE_object_scale_to_mat3(ob, rsmat);
else if (apply_rot) {
float tmat[3][3], timat[3][3];
/* simple rotation matrix */
- object_rot_to_mat3(ob, rsmat);
+ BKE_object_rot_to_mat3(ob, rsmat);
/* correct for scale, note mul_m3_m3m3 has swapped args! */
- object_scale_to_mat3(ob, tmat);
+ BKE_object_scale_to_mat3(ob, tmat);
invert_m3_m3(timat, tmat);
mul_m3_m3m3(rsmat, timat, rsmat);
mul_m3_m3m3(rsmat, rsmat, tmat);
@@ -458,7 +460,7 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
if (!(apply_scale && apply_rot)) {
/* correct for scale and rotation that is still applied */
- object_to_mat3(ob, obmat);
+ BKE_object_to_mat3(ob, obmat);
invert_m3_m3(iobmat, obmat);
mul_m3_m3m3(tmat, rsmat, iobmat);
mul_m3_v3(tmat, mat[3]);
@@ -466,32 +468,32 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
}
/* apply to object data */
- if (ob->type==OB_MESH) {
- Mesh *me= ob->data;
+ if (ob->type == OB_MESH) {
+ Mesh *me = ob->data;
MVert *mvert;
multiresModifier_scale_disp(scene, ob);
/* adjust data */
- mvert= me->mvert;
- for (a=0; a<me->totvert; a++, mvert++)
+ mvert = me->mvert;
+ for (a = 0; a < me->totvert; a++, mvert++)
mul_m4_v3(mat, mvert->co);
if (me->key) {
KeyBlock *kb;
- for (kb=me->key->block.first; kb; kb=kb->next) {
- float *fp= kb->data;
+ for (kb = me->key->block.first; kb; kb = kb->next) {
+ float *fp = kb->data;
- for (a=0; a<kb->totelem; a++, fp+=3)
+ for (a = 0; a < kb->totelem; a++, fp += 3)
mul_m4_v3(mat, fp);
}
}
/* update normals */
- mesh_calc_normals_mapping(me->mvert, me->totvert, me->mloop, me->mpoly, me->totloop, me->totpoly, NULL, NULL, 0, NULL, NULL);
+ BKE_mesh_calc_normals_mapping(me->mvert, me->totvert, me->mloop, me->mpoly, me->totloop, me->totpoly, NULL, NULL, 0, NULL, NULL);
}
- else if (ob->type==OB_ARMATURE) {
+ else if (ob->type == OB_ARMATURE) {
ED_armature_apply_transform(ob, mat);
}
else if (ob->type == OB_LATTICE) {
@@ -505,7 +507,7 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
}
}
else if (ELEM(ob->type, OB_CURVE, OB_SURF)) {
- Curve *cu= ob->data;
+ Curve *cu = ob->data;
Nurb *nu;
BPoint *bp;
@@ -513,20 +515,20 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
scale = mat3_to_scale(rsmat);
- for (nu=cu->nurb.first; nu; nu=nu->next) {
+ for (nu = cu->nurb.first; nu; nu = nu->next) {
if (nu->type == CU_BEZIER) {
- a= nu->pntsu;
- for (bezt= nu->bezt; a--; bezt++) {
+ a = nu->pntsu;
+ for (bezt = nu->bezt; a--; bezt++) {
mul_m4_v3(mat, bezt->vec[0]);
mul_m4_v3(mat, bezt->vec[1]);
mul_m4_v3(mat, bezt->vec[2]);
bezt->radius *= scale;
}
- calchandlesNurb(nu);
+ BKE_nurb_handles_calc(nu);
}
else {
- a= nu->pntsu*nu->pntsv;
- for (bp= nu->bp; a--; bp++)
+ a = nu->pntsu * nu->pntsv;
+ for (bp = nu->bp; a--; bp++)
mul_m4_v3(mat, bp->vec);
}
}
@@ -537,21 +539,21 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
if (apply_loc)
zero_v3(ob->loc);
if (apply_scale)
- ob->size[0]= ob->size[1]= ob->size[2]= 1.0f;
+ ob->size[0] = ob->size[1] = ob->size[2] = 1.0f;
if (apply_rot) {
zero_v3(ob->rot);
unit_qt(ob->quat);
unit_axis_angle(ob->rotAxis, &ob->rotAngle);
}
- where_is_object(scene, ob);
- if (ob->type==OB_ARMATURE) {
- where_is_pose(scene, ob); /* needed for bone parents */
+ BKE_object_where_is_calc(scene, ob);
+ if (ob->type == OB_ARMATURE) {
+ BKE_pose_where_is(scene, ob); /* needed for bone parents */
}
ignore_parent_tx(bmain, scene, ob);
- DAG_id_tag_update(&ob->id, OB_RECALC_OB|OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA);
change = 1;
}
@@ -560,19 +562,20 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
if (!change)
return OPERATOR_CANCELLED;
- WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
return OPERATOR_FINISHED;
}
static int visual_transform_apply_exec(bContext *C, wmOperator *UNUSED(op))
{
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
int change = 0;
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
- where_is_object(scene, ob);
- object_apply_mat4(ob, ob->obmat, TRUE, TRUE);
- where_is_object(scene, ob);
+ CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
+ {
+ BKE_object_where_is_calc(scene, ob);
+ BKE_object_apply_mat4(ob, ob->obmat, TRUE, TRUE);
+ BKE_object_where_is_calc(scene, ob);
/* update for any children that may get moved */
DAG_id_tag_update(&ob->id, OB_RECALC_OB);
@@ -584,7 +587,7 @@ static int visual_transform_apply_exec(bContext *C, wmOperator *UNUSED(op))
if (!change)
return OPERATOR_CANCELLED;
- WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
return OPERATOR_FINISHED;
}
@@ -600,14 +603,14 @@ void OBJECT_OT_visual_transform_apply(wmOperatorType *ot)
ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int object_transform_apply_exec(bContext *C, wmOperator *op)
{
- const int loc= RNA_boolean_get(op->ptr, "location");
- const int rot= RNA_boolean_get(op->ptr, "rotation");
- const int sca= RNA_boolean_get(op->ptr, "scale");
+ const int loc = RNA_boolean_get(op->ptr, "location");
+ const int rot = RNA_boolean_get(op->ptr, "rotation");
+ const int sca = RNA_boolean_get(op->ptr, "scale");
if (loc || rot || sca) {
return apply_objects_internal(C, op->reports, loc, rot, sca);
@@ -629,7 +632,7 @@ void OBJECT_OT_transform_apply(wmOperatorType *ot)
ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "location", 0, "Location", "");
RNA_def_boolean(ot->srna, "rotation", 0, "Rotation", "");
@@ -639,23 +642,23 @@ void OBJECT_OT_transform_apply(wmOperatorType *ot)
/********************* Set Object Center ************************/
enum {
- GEOMETRY_TO_ORIGIN=0,
+ GEOMETRY_TO_ORIGIN = 0,
ORIGIN_TO_GEOMETRY,
ORIGIN_TO_CURSOR
};
static int object_origin_set_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- Object *obedit= CTX_data_edit_object(C);
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ Object *obedit = CTX_data_edit_object(C);
Object *tob;
float cursor[3], cent[3], cent_neg[3], centn[3], min[3], max[3];
int centermode = RNA_enum_get(op->ptr, "type");
int around = RNA_enum_get(op->ptr, "center"); /* initialized from v3d->around */
/* keep track of what is changed */
- int tot_change=0, tot_lib_error=0, tot_multiuser_arm_error=0;
+ int tot_change = 0, tot_lib_error = 0, tot_multiuser_arm_error = 0;
if (obedit && centermode != GEOMETRY_TO_ORIGIN) {
BKE_report(op->reports, RPT_ERROR, "Operation cannot be performed in EditMode");
@@ -663,10 +666,10 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
}
else {
/* get the view settings if 'around' isn't set and the view is available */
- View3D *v3d= CTX_wm_view3d(C);
+ View3D *v3d = CTX_wm_view3d(C);
copy_v3_v3(cursor, give_cursor(scene, v3d));
if (v3d && !RNA_struct_property_is_set(op->ptr, "center"))
- around= v3d->around;
+ around = v3d->around;
}
zero_v3(cent);
@@ -674,8 +677,8 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
if (obedit) {
INIT_MINMAX(min, max);
- if (obedit->type==OB_MESH) {
- Mesh *me= obedit->data;
+ if (obedit->type == OB_MESH) {
+ Mesh *me = obedit->data;
BMEditMesh *em = me->edit_btmesh;
BMVert *eve;
BMIter iter;
@@ -688,10 +691,10 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
}
else {
BM_ITER_MESH (eve, &iter, em->bm, BM_VERTS_OF_MESH) {
- if (around==V3D_CENTROID) {
+ if (around == V3D_CENTROID) {
total++;
add_v3_v3(cent, eve->co);
- mul_v3_fl(cent, 1.0f/(float)total);
+ mul_v3_fl(cent, 1.0f / (float)total);
}
else {
DO_MINMAX(eve->co, min, max);
@@ -707,24 +710,26 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
EDBM_mesh_normals_update(em);
tot_change++;
DAG_id_tag_update(&obedit->id, OB_RECALC_DATA);
- }
+ }
}
/* reset flags */
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
- ob->flag &= ~OB_DONE;
+ CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
+ {
+ ob->flag &= ~OB_DONE;
}
CTX_DATA_END;
- for (tob= bmain->object.first; tob; tob= tob->id.next) {
+ for (tob = bmain->object.first; tob; tob = tob->id.next) {
if (tob->data)
((ID *)tob->data)->flag &= ~LIB_DOIT;
if (tob->dup_group)
((ID *)tob->dup_group)->flag &= ~LIB_DOIT;
}
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
- if ((ob->flag & OB_DONE)==0) {
+ CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
+ {
+ if ((ob->flag & OB_DONE) == 0) {
int do_inverse_offset = FALSE;
ob->flag |= OB_DONE;
@@ -736,7 +741,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
if (ob->data == NULL) {
/* special support for dupligroups */
- if ((ob->transflag & OB_DUPLIGROUP) && ob->dup_group && (ob->dup_group->id.flag & LIB_DOIT)==0) {
+ if ((ob->transflag & OB_DUPLIGROUP) && ob->dup_group && (ob->dup_group->id.flag & LIB_DOIT) == 0) {
if (ob->dup_group->id.lib) {
tot_lib_error++;
}
@@ -745,7 +750,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
else {
/* only bounds support */
INIT_MINMAX(min, max);
- minmax_object_duplis(scene, ob, min, max);
+ BKE_object_minmax_dupli(scene, ob, min, max);
mid_v3_v3v3(cent, min, max);
invert_m4_m4(ob->imat, ob->obmat);
mul_m4_v3(ob->imat, cent);
@@ -755,7 +760,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
tot_change++;
ob->dup_group->id.flag |= LIB_DOIT;
- do_inverse_offset= TRUE;
+ do_inverse_offset = TRUE;
}
}
}
@@ -763,37 +768,37 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
tot_lib_error++;
}
- if (obedit==NULL && ob->type==OB_MESH) {
- Mesh *me= ob->data;
+ if (obedit == NULL && ob->type == OB_MESH) {
+ Mesh *me = ob->data;
if (centermode == ORIGIN_TO_CURSOR) { /* done */ }
- else if (around==V3D_CENTROID) { mesh_center_median(me, cent); }
- else { mesh_center_bounds(me, cent); }
+ else if (around == V3D_CENTROID) { BKE_mesh_center_median(me, cent); }
+ else { BKE_mesh_center_bounds(me, cent); }
negate_v3_v3(cent_neg, cent);
- mesh_translate(me, cent_neg, 1);
+ BKE_mesh_translate(me, cent_neg, 1);
tot_change++;
me->id.flag |= LIB_DOIT;
- do_inverse_offset= TRUE;
+ do_inverse_offset = TRUE;
}
else if (ELEM(ob->type, OB_CURVE, OB_SURF)) {
- Curve *cu= ob->data;
+ Curve *cu = ob->data;
if (centermode == ORIGIN_TO_CURSOR) { /* done */ }
- else if (around==V3D_CENTROID) { curve_center_median(cu, cent); }
- else { curve_center_bounds(cu, cent); }
+ else if (around == V3D_CENTROID) { BKE_curve_center_median(cu, cent); }
+ else { BKE_curve_center_bounds(cu, cent); }
/* don't allow Z change if curve is 2D */
if ((ob->type == OB_CURVE) && !(cu->flag & CU_3D))
cent[2] = 0.0;
negate_v3_v3(cent_neg, cent);
- curve_translate(cu, cent_neg, 1);
+ BKE_curve_translate(cu, cent_neg, 1);
tot_change++;
cu->id.flag |= LIB_DOIT;
- do_inverse_offset= TRUE;
+ do_inverse_offset = TRUE;
if (obedit) {
if (centermode == GEOMETRY_TO_ORIGIN) {
@@ -802,12 +807,12 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
break;
}
}
- else if (ob->type==OB_FONT) {
+ else if (ob->type == OB_FONT) {
/* get from bb */
- Curve *cu= ob->data;
+ Curve *cu = ob->data;
- if (cu->bb==NULL && (centermode != ORIGIN_TO_CURSOR)) {
+ if (cu->bb == NULL && (centermode != ORIGIN_TO_CURSOR)) {
/* do nothing*/
}
else {
@@ -815,21 +820,21 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
/* done */
}
else {
- cent[0]= 0.5f * ( cu->bb->vec[4][0] + cu->bb->vec[0][0]);
- cent[1]= 0.5f * ( cu->bb->vec[0][1] + cu->bb->vec[2][1]) - 0.5f; /* extra 0.5 is the height o above line */
+ cent[0] = 0.5f * (cu->bb->vec[4][0] + cu->bb->vec[0][0]);
+ cent[1] = 0.5f * (cu->bb->vec[0][1] + cu->bb->vec[2][1]) - 0.5f; /* extra 0.5 is the height o above line */
}
- cent[2]= 0.0f;
+ cent[2] = 0.0f;
- cu->xof= cu->xof - (cent[0] / cu->fsize);
- cu->yof= cu->yof - (cent[1] / cu->fsize);
+ cu->xof = cu->xof - (cent[0] / cu->fsize);
+ cu->yof = cu->yof - (cent[1] / cu->fsize);
tot_change++;
cu->id.flag |= LIB_DOIT;
- do_inverse_offset= TRUE;
+ do_inverse_offset = TRUE;
}
}
- else if (ob->type==OB_ARMATURE) {
+ else if (ob->type == OB_ARMATURE) {
bArmature *arm = ob->data;
if (ID_REAL_USERS(arm) > 1) {
@@ -849,8 +854,8 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
arm->id.flag |= LIB_DOIT;
/* do_inverse_offset= TRUE; */ /* docenter_armature() handles this */
- where_is_object(scene, ob);
- where_is_pose(scene, ob); /* needed for bone parents */
+ BKE_object_where_is_calc(scene, ob);
+ BKE_pose_where_is(scene, ob); /* needed for bone parents */
ignore_parent_tx(bmain, scene, ob);
@@ -862,15 +867,15 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
MetaBall *mb = ob->data;
if (centermode == ORIGIN_TO_CURSOR) { /* done */ }
- else if (around==V3D_CENTROID) { BKE_metaball_center_median(mb, cent); }
- else { BKE_metaball_center_bounds(mb, cent); }
+ else if (around == V3D_CENTROID) { BKE_mball_center_median(mb, cent); }
+ else { BKE_mball_center_bounds(mb, cent); }
negate_v3_v3(cent_neg, cent);
- BKE_metaball_translate(mb, cent_neg);
+ BKE_mball_translate(mb, cent_neg);
tot_change++;
mb->id.flag |= LIB_DOIT;
- do_inverse_offset= TRUE;
+ do_inverse_offset = TRUE;
if (obedit) {
if (centermode == GEOMETRY_TO_ORIGIN) {
@@ -888,29 +893,31 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
mul_mat3_m4_v3(ob->obmat, centn); /* ommit translation part */
add_v3_v3(ob->loc, centn);
- where_is_object(scene, ob);
- if (ob->type==OB_ARMATURE) {
- where_is_pose(scene, ob); /* needed for bone parents */
+ BKE_object_where_is_calc(scene, ob);
+ if (ob->type == OB_ARMATURE) {
+ BKE_pose_where_is(scene, ob); /* needed for bone parents */
}
ignore_parent_tx(bmain, scene, ob);
/* other users? */
- CTX_DATA_BEGIN(C, Object*, ob_other, selected_editable_objects) {
- if ( (ob_other->flag & OB_DONE)==0 &&
- ( (ob->data && (ob->data == ob_other->data)) ||
- (ob->dup_group==ob_other->dup_group && (ob->transflag|ob_other->transflag) & OB_DUPLIGROUP) )
- ) {
+ CTX_DATA_BEGIN (C, Object *, ob_other, selected_editable_objects)
+ {
+ if ((ob_other->flag & OB_DONE) == 0 &&
+ ((ob->data && (ob->data == ob_other->data)) ||
+ (ob->dup_group == ob_other->dup_group &&
+ (ob->transflag | ob_other->transflag) & OB_DUPLIGROUP)))
+ {
ob_other->flag |= OB_DONE;
- DAG_id_tag_update(&ob_other->id, OB_RECALC_OB|OB_RECALC_DATA);
+ DAG_id_tag_update(&ob_other->id, OB_RECALC_OB | OB_RECALC_DATA);
copy_v3_v3(centn, cent);
mul_mat3_m4_v3(ob_other->obmat, centn); /* ommit translation part */
add_v3_v3(ob_other->loc, centn);
- where_is_object(scene, ob_other);
- if (ob_other->type==OB_ARMATURE) {
- where_is_pose(scene, ob_other); /* needed for bone parents */
+ BKE_object_where_is_calc(scene, ob_other);
+ if (ob_other->type == OB_ARMATURE) {
+ BKE_pose_where_is(scene, ob_other); /* needed for bone parents */
}
ignore_parent_tx(bmain, scene, ob_other);
}
@@ -921,22 +928,22 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
}
CTX_DATA_END;
- for (tob= bmain->object.first; tob; tob= tob->id.next)
+ for (tob = bmain->object.first; tob; tob = tob->id.next)
if (tob->data && (((ID *)tob->data)->flag & LIB_DOIT))
- DAG_id_tag_update(&tob->id, OB_RECALC_OB|OB_RECALC_DATA);
+ DAG_id_tag_update(&tob->id, OB_RECALC_OB | OB_RECALC_DATA);
if (tot_change) {
DAG_ids_flush_update(bmain, 0);
- WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
}
/* Warn if any errors occurred */
- if (tot_lib_error+tot_multiuser_arm_error) {
- BKE_reportf(op->reports, RPT_WARNING, "%i Object(s) Not Centered, %i Changed:",tot_lib_error+tot_multiuser_arm_error, tot_change);
+ if (tot_lib_error + tot_multiuser_arm_error) {
+ BKE_reportf(op->reports, RPT_WARNING, "%i Object(s) Not Centered, %i Changed:", tot_lib_error + tot_multiuser_arm_error, tot_change);
if (tot_lib_error)
- BKE_reportf(op->reports, RPT_WARNING, "|%i linked library objects",tot_lib_error);
+ BKE_reportf(op->reports, RPT_WARNING, "|%i linked library objects", tot_lib_error);
if (tot_multiuser_arm_error)
- BKE_reportf(op->reports, RPT_WARNING, "|%i multiuser armature object(s)",tot_multiuser_arm_error);
+ BKE_reportf(op->reports, RPT_WARNING, "|%i multiuser armature object(s)", tot_multiuser_arm_error);
}
return OPERATOR_FINISHED;
@@ -969,7 +976,7 @@ void OBJECT_OT_origin_set(wmOperatorType *ot)
ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
ot->prop = RNA_def_enum(ot->srna, "type", prop_set_center_types, 0, "Type", "");
RNA_def_enum(ot->srna, "center", prop_set_bounds_types, V3D_CENTROID, "Center", "");
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c
index ea0b7542886..0c0611d3d33 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -20,7 +20,7 @@
*
* The Original Code is: all of this file.
*
- * Contributor(s): Ove M Henriksen
+ * Contributor(s): none yet.
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -75,7 +75,6 @@
#include "UI_resources.h"
#include "object_intern.h"
-#include <stdio.h> /*only for development purposes, remove*/
/************************ Exported Functions **********************/
static void vgroup_remap_update_users(Object *ob, int *map);
@@ -85,9 +84,9 @@ static void vgroup_delete_all(Object *ob);
static Lattice *vgroup_edit_lattice(Object *ob)
{
- Lattice *lt= ob->data;
- BLI_assert(ob->type==OB_LATTICE);
- return (lt->editlatt)? lt->editlatt->latt: lt;
+ Lattice *lt = ob->data;
+ BLI_assert(ob->type == OB_LATTICE);
+ return (lt->editlatt) ? lt->editlatt->latt : lt;
}
int ED_vgroup_object_is_edit_mode(Object *ob)
@@ -95,7 +94,7 @@ int ED_vgroup_object_is_edit_mode(Object *ob)
if (ob->type == OB_MESH)
return (BMEdit_FromObject(ob) != NULL);
else if (ob->type == OB_LATTICE)
- return (((Lattice*)ob->data)->editlatt != NULL);
+ return (((Lattice *)ob->data)->editlatt != NULL);
return 0;
}
@@ -145,18 +144,18 @@ void ED_vgroup_delete(Object *ob, bDeformGroup *defgroup)
void ED_vgroup_clear(Object *ob)
{
- bDeformGroup *dg= (bDeformGroup *)ob->defbase.first;
- int edit_mode= ED_vgroup_object_is_edit_mode(ob);
+ bDeformGroup *dg = (bDeformGroup *)ob->defbase.first;
+ int edit_mode = ED_vgroup_object_is_edit_mode(ob);
while (dg) {
- bDeformGroup *next_dg= dg->next;
+ bDeformGroup *next_dg = dg->next;
if (edit_mode)
vgroup_delete_edit_mode(ob, dg);
else
vgroup_delete_object_mode(ob, dg);
- dg= next_dg;
+ dg = next_dg;
}
}
@@ -164,14 +163,14 @@ int ED_vgroup_data_create(ID *id)
{
/* create deform verts */
- if (GS(id->name)==ID_ME) {
- Mesh *me= (Mesh *)id;
- me->dvert= CustomData_add_layer(&me->vdata, CD_MDEFORMVERT, CD_CALLOC, NULL, me->totvert);
+ if (GS(id->name) == ID_ME) {
+ Mesh *me = (Mesh *)id;
+ me->dvert = CustomData_add_layer(&me->vdata, CD_MDEFORMVERT, CD_CALLOC, NULL, me->totvert);
return TRUE;
}
- else if (GS(id->name)==ID_LT) {
- Lattice *lt= (Lattice *)id;
- lt->dvert= MEM_callocN(sizeof(MDeformVert)*lt->pntsu*lt->pntsv*lt->pntsw, "lattice deformVert");
+ else if (GS(id->name) == ID_LT) {
+ Lattice *lt = (Lattice *)id;
+ lt->dvert = MEM_callocN(sizeof(MDeformVert) * lt->pntsu * lt->pntsv * lt->pntsw, "lattice deformVert");
return TRUE;
}
else {
@@ -185,7 +184,7 @@ static int ED_vgroup_give_parray(ID *id, MDeformVert ***dvert_arr, int *dvert_to
*dvert_arr = NULL;
if (id) {
- switch(GS(id->name)) {
+ switch (GS(id->name)) {
case ID_ME:
{
Mesh *me = (Mesh *)id;
@@ -202,7 +201,7 @@ static int ED_vgroup_give_parray(ID *id, MDeformVert ***dvert_arr, int *dvert_to
i = em->bm->totvert;
- *dvert_arr= MEM_mallocN(sizeof(void*)*i, "vgroup parray from me");
+ *dvert_arr = MEM_mallocN(sizeof(void *) * i, "vgroup parray from me");
*dvert_tot = i;
i = 0;
@@ -223,21 +222,21 @@ static int ED_vgroup_give_parray(ID *id, MDeformVert ***dvert_arr, int *dvert_to
return 1;
}
else if (me->dvert) {
- MVert *mvert= me->mvert;
- MDeformVert *dvert= me->dvert;
+ MVert *mvert = me->mvert;
+ MDeformVert *dvert = me->dvert;
int i;
- *dvert_tot= me->totvert;
- *dvert_arr= MEM_mallocN(sizeof(void*)*me->totvert, "vgroup parray from me");
+ *dvert_tot = me->totvert;
+ *dvert_arr = MEM_mallocN(sizeof(void *) * me->totvert, "vgroup parray from me");
if (use_vert_sel) {
- for (i=0; i<me->totvert; i++) {
+ for (i = 0; i < me->totvert; i++) {
(*dvert_arr)[i] = (mvert[i].flag & SELECT) ?
- &dvert[i] : NULL;
+ &dvert[i] : NULL;
}
}
else {
- for (i=0; i<me->totvert; i++) {
+ for (i = 0; i < me->totvert; i++) {
(*dvert_arr)[i] = me->dvert + i;
}
}
@@ -250,24 +249,24 @@ static int ED_vgroup_give_parray(ID *id, MDeformVert ***dvert_arr, int *dvert_to
}
case ID_LT:
{
- int i=0;
+ int i = 0;
- Lattice *lt= (Lattice *)id;
- lt= (lt->editlatt)? lt->editlatt->latt: lt;
+ Lattice *lt = (Lattice *)id;
+ lt = (lt->editlatt) ? lt->editlatt->latt : lt;
if (lt->dvert) {
- BPoint *def= lt->def;
- *dvert_tot= lt->pntsu*lt->pntsv*lt->pntsw;
- *dvert_arr= MEM_mallocN(sizeof(void*)*(*dvert_tot), "vgroup parray from me");
+ BPoint *def = lt->def;
+ *dvert_tot = lt->pntsu * lt->pntsv * lt->pntsw;
+ *dvert_arr = MEM_mallocN(sizeof(void *) * (*dvert_tot), "vgroup parray from me");
if (use_vert_sel) {
- for (i=0; i<*dvert_tot; i++) {
+ for (i = 0; i < *dvert_tot; i++) {
(*dvert_arr)[i] = (def->f1 & SELECT) ?
&lt->dvert[i] : NULL;
}
}
else {
- for (i=0; i<*dvert_tot; i++) {
+ for (i = 0; i < *dvert_tot; i++) {
(*dvert_arr)[i] = lt->dvert + i;
}
}
@@ -288,50 +287,51 @@ static int ED_vgroup_give_parray(ID *id, MDeformVert ***dvert_arr, int *dvert_to
int ED_vgroup_give_array(ID *id, MDeformVert **dvert_arr, int *dvert_tot)
{
if (id) {
- switch(GS(id->name)) {
+ switch (GS(id->name)) {
case ID_ME:
{
Mesh *me = (Mesh *)id;
- *dvert_arr= me->dvert;
- *dvert_tot= me->totvert;
+ *dvert_arr = me->dvert;
+ *dvert_tot = me->totvert;
return TRUE;
}
case ID_LT:
{
- Lattice *lt= (Lattice *)id;
- lt= (lt->editlatt)? lt->editlatt->latt: lt;
- *dvert_arr= lt->dvert;
- *dvert_tot= lt->pntsu*lt->pntsv*lt->pntsw;
+ Lattice *lt = (Lattice *)id;
+ lt = (lt->editlatt) ? lt->editlatt->latt : lt;
+ *dvert_arr = lt->dvert;
+ *dvert_tot = lt->pntsu * lt->pntsv * lt->pntsw;
return TRUE;
}
}
}
- *dvert_arr= NULL;
- *dvert_tot= 0;
+ *dvert_arr = NULL;
+ *dvert_tot = 0;
return FALSE;
}
-/*Copy all vertex groups to target, overwriting existing. matching index only*/
+/* matching index only */
int ED_vgroup_copy_array(Object *ob, Object *ob_from)
{
MDeformVert **dvert_array_from, **dvf;
MDeformVert **dvert_array, **dv;
- int dvert_tot_from, dvert_tot, i;
- int defbase_tot_from= BLI_countlist(&ob_from->defbase);
- int defbase_tot= BLI_countlist(&ob->defbase);
- short new_vgroup= FALSE;
+ int dvert_tot_from;
+ int dvert_tot;
+ int i;
+ int defbase_tot_from = BLI_countlist(&ob_from->defbase);
+ int defbase_tot = BLI_countlist(&ob->defbase);
+ short new_vgroup = FALSE;
- /*get vertex groups arrays*/
ED_vgroup_give_parray(ob_from->data, &dvert_array_from, &dvert_tot_from, FALSE);
ED_vgroup_give_parray(ob->data, &dvert_array, &dvert_tot, FALSE);
if ((dvert_array == NULL) && (dvert_array_from != NULL) && ED_vgroup_data_create(ob->data)) {
ED_vgroup_give_parray(ob->data, &dvert_array, &dvert_tot, FALSE);
- new_vgroup= TRUE;
+ new_vgroup = TRUE;
}
- if (ob==ob_from || dvert_tot==0 || (dvert_tot != dvert_tot_from) || dvert_array_from==NULL || dvert_array==NULL) {
+ if (ob == ob_from || dvert_tot == 0 || (dvert_tot != dvert_tot_from) || dvert_array_from == NULL || dvert_array == NULL) {
if (dvert_array) MEM_freeN(dvert_array);
if (dvert_array_from) MEM_freeN(dvert_array_from);
@@ -345,29 +345,29 @@ int ED_vgroup_copy_array(Object *ob, Object *ob_from)
/* do the copy */
BLI_freelistN(&ob->defbase);
BLI_duplicatelist(&ob->defbase, &ob_from->defbase);
- ob->actdef= ob_from->actdef;
+ ob->actdef = ob_from->actdef;
if (defbase_tot_from < defbase_tot) {
/* correct vgroup indices because the number of vgroups is being reduced. */
- int *remap= MEM_mallocN(sizeof(int) * (defbase_tot + 1), __func__);
- for (i=0; i <= defbase_tot_from; i++) remap[i]= i;
- for (; i <= defbase_tot; i++) remap[i]= 0; /* can't use these, so disable */
+ int *remap = MEM_mallocN(sizeof(int) * (defbase_tot + 1), __func__);
+ for (i = 0; i <= defbase_tot_from; i++) remap[i] = i;
+ for (; i <= defbase_tot; i++) remap[i] = 0; /* can't use these, so disable */
vgroup_remap_update_users(ob, remap);
MEM_freeN(remap);
}
- dvf= dvert_array_from;
- dv= dvert_array;
+ dvf = dvert_array_from;
+ dv = dvert_array;
- for (i=0; i<dvert_tot; i++, dvf++, dv++) {
+ for (i = 0; i < dvert_tot; i++, dvf++, dv++) {
if ((*dv)->dw)
MEM_freeN((*dv)->dw);
- *(*dv)= *(*dvf);
+ *(*dv) = *(*dvf);
if ((*dv)->dw)
- (*dv)->dw= MEM_dupallocN((*dv)->dw);
+ (*dv)->dw = MEM_dupallocN((*dv)->dw);
}
MEM_freeN(dvert_array);
@@ -376,209 +376,6 @@ int ED_vgroup_copy_array(Object *ob, Object *ob_from)
return 1;
}
-/*Copy a single vertex group from source to destination with weights*/
-int ED_vgroup_copy_single(Object *ob_dst, const Object *ob_src)
-{
- MDeformVert **dv_array_src;
- MDeformVert **dv_array_dst;
- MDeformWeight *dw_dst, *dw_src;
- int dv_tot_src, dv_tot_dst;
- int i, index_src, index_dst;
- bDeformGroup *dg_src, *dg_dst;
-
- /*get source deform group*/
- dg_src= BLI_findlink(&ob_src->defbase, (ob_src->actdef-1));
-
- /*Create new and overwrite vertex group on destination without data*/
- ED_vgroup_delete(ob_dst, defgroup_find_name(ob_dst, dg_src->name));
- ED_vgroup_add_name(ob_dst, dg_src->name);
-
- /*get destination deformgroup*/
- dg_dst= defgroup_find_name(ob_dst, dg_src->name);
-
- /*get vertex group arrays*/
- ED_vgroup_give_parray(ob_src->data, &dv_array_src, &dv_tot_src, FALSE);
- ED_vgroup_give_parray(ob_dst->data, &dv_array_dst, &dv_tot_dst, FALSE);
-
- /*get indexes of vertex groups*/
- index_src= BLI_findindex(&ob_src->defbase, dg_src);
- index_dst= BLI_findindex(&ob_dst->defbase, dg_dst);
-
- /*Check if indices are matching, delete and return if not*/
- if (ob_dst == ob_src || dv_tot_dst == 0 || (dv_tot_dst != dv_tot_src) || dv_array_src == NULL || dv_array_dst == NULL) {
- ED_vgroup_delete(ob_dst, defgroup_find_name(ob_dst, dg_dst->name));
- return 0;
- }
-
- /* Loop through the vertices and copy weight*/
- for(i=0; i<dv_tot_dst; i++, dv_array_src++, dv_array_dst++) {
- dw_src= defvert_verify_index(*dv_array_src, index_src);
- dw_dst= defvert_verify_index(*dv_array_dst, index_dst);
- dw_dst->weight= dw_src->weight;
- }
-
- return 1;
-}
-
-/*Copy a single vertex group from source to destination with weights by nearest weight*/
-int ED_vgroup_copy_by_nearest_vertex_single(Object *ob_dst, Object *ob_src)
-{
- bDeformGroup *dg_src, *dg_dst;
- MDeformVert **dv_array_src, **dv_array_dst;
- MDeformWeight *dw_dst, *dw_src;
- MVert *mv_dst;
- Mesh *me_dst;
- BVHTreeFromMesh tree_mesh_src;
- BVHTreeNearest nearest;
- DerivedMesh *dmesh_src;
- int dv_tot_src, dv_tot_dst, i, index_dst, index_src;
- float tmp_co[3], tmp_mat[4][4];
-
- /*get source deform group*/
- dg_src= BLI_findlink(&ob_src->defbase, (ob_src->actdef-1));
-
- /*Create new and overwrite vertex group on destination without data*/
- ED_vgroup_delete(ob_dst, defgroup_find_name(ob_dst, dg_src->name));
- ED_vgroup_add_name(ob_dst, dg_src->name);
-
- /*get destination deformgroup*/
- dg_dst= defgroup_find_name(ob_dst, dg_src->name);
-
- /*get meshes*/
- me_dst= ob_dst->data;
- dmesh_src= ob_src->derivedDeform;
-
- /*make node tree*/
- bvhtree_from_mesh_verts(&tree_mesh_src, dmesh_src, 0.0, 2, 6);
-
- /*get vertex group arrays*/
- ED_vgroup_give_parray(ob_src->data, &dv_array_src, &dv_tot_src, FALSE);
- ED_vgroup_give_parray(ob_dst->data, &dv_array_dst, &dv_tot_dst, FALSE);
-
- /*get indexes of vertex groups*/
- index_src= BLI_findindex(&ob_src->defbase, dg_src);
- index_dst= BLI_findindex(&ob_dst->defbase, dg_dst);
-
- /*get vertices*/
- mv_dst= me_dst->mvert;
-
- /*Prepearing transformation matrix*/
- /*This can be excluded to make a lazy feature that works better when object centers relative to mesh is the same*/
- invert_m4_m4(ob_src->imat, ob_src->obmat);
- mult_m4_m4m4(tmp_mat, ob_src->imat, ob_dst->obmat);
-
- /* Loop through the vertices and copy weight from nearest weight*/
- for(i=0; i < me_dst->totvert; i++, mv_dst++, dv_array_dst++){
-
- /*Reset nearest*/
- nearest.index= -1;
- nearest.dist= FLT_MAX;
-
- /*Transforming into target space*/
- mul_v3_m4v3(tmp_co, tmp_mat, mv_dst->co);
-
- /*Node tree accelerated search for closest vetex*/
- BLI_bvhtree_find_nearest(tree_mesh_src.tree, tmp_co, &nearest, tree_mesh_src.nearest_callback, &tree_mesh_src);
-
- /*copy weight*/
- dw_src= defvert_verify_index(dv_array_src[nearest.index], index_src);
- dw_dst= defvert_verify_index(*dv_array_dst, index_dst);
- dw_dst->weight= dw_src->weight;
- }
-
- /*free memory and return*/
- free_bvhtree_from_mesh(&tree_mesh_src);
- return 1;
-}
-
-/*Copy a single vertex group from source to destination with weights by nearest weight*/
-/*TODO: transform into target space as in by_vertex function. postphoned due to easier testing during development*/
-int ED_vgroup_copy_by_nearest_face_single(Object *ob_dst, Object *ob_src)
-{
- bDeformGroup *dg_src, *dg_dst;
- MDeformVert **dv_array_src, **dv_array_dst;
- MDeformWeight *dw_dst, *dw_src;
- MVert *mv_dst;
- MFace *mface_src;
- Mesh *me_dst, *me_src;
- BVHTreeFromMesh tree_mesh_faces_src;
- BVHTreeNearest nearest;
- DerivedMesh *dmesh_src;
- int dv_tot_src, dv_tot_dst, i, index_dst, index_src;
- float weight/*, tot_dist*/;
-
- /*get source deform group*/
- dg_src= BLI_findlink(&ob_src->defbase, (ob_src->actdef-1));
-
- /*Create new and overwrite vertex group on destination without data*/
- ED_vgroup_delete(ob_dst, defgroup_find_name(ob_dst, dg_src->name));
- ED_vgroup_add_name(ob_dst, dg_src->name);
-
- /*get destination deformgroup*/
- dg_dst= defgroup_find_name(ob_dst, dg_src->name);
-
- /*get meshes*/
- me_dst= ob_dst->data;
- me_src= ob_src->data;
- dmesh_src= ob_src->derivedDeform; /*sergey- : this might easily be null?? (using ob_src.deriveddeform*/
-
- /*make node tree*/
- DM_ensure_tessface(dmesh_src);
- bvhtree_from_mesh_faces(&tree_mesh_faces_src, dmesh_src, 0.0, 2, 6);
-
-
- /*get vertex group arrays*/
- ED_vgroup_give_parray(ob_src->data, &dv_array_src, &dv_tot_src, FALSE);
- ED_vgroup_give_parray(ob_dst->data, &dv_array_dst, &dv_tot_dst, FALSE);
-
- /*get indexes of vertex groups*/
- index_src= BLI_findindex(&ob_src->defbase, dg_src);
- index_dst= BLI_findindex(&ob_dst->defbase, dg_dst);
-
- /*get vertices*/
- mv_dst= me_dst->mvert;
-
- /* Loop through the vertices and copy weight from nearest weight*/
- for(i=0; i < me_dst->totvert; i++, mv_dst++, dv_array_dst++){
-
- /*Reset nearest*/
- nearest.index= -1;
- nearest.dist= FLT_MAX;
-
- /*Node tree accelerated search for closest face*/
- BLI_bvhtree_find_nearest(tree_mesh_faces_src.tree, mv_dst->co, &nearest, tree_mesh_faces_src.nearest_callback, &tree_mesh_faces_src);
-
- /*get weight*/
- mface_src= me_src->mface + nearest.index;
- /*tot_dist= ()+()+(); use a comparable distance
- if(mface_src->v4){
- tot_dist+= ();
- }*/
- dw_src= defvert_verify_index(dv_array_src[mface_src->v1], index_src);
- weight= dw_src->weight;
- dw_src= defvert_verify_index(dv_array_src[mface_src->v2], index_src);
- weight+= dw_src->weight;
- dw_src= defvert_verify_index(dv_array_src[mface_src->v3], index_src);
- weight+= dw_src->weight;
- if(mface_src->v4){
- dw_src= defvert_verify_index(dv_array_src[mface_src->v4], index_src);
- weight+= dw_src->weight;
- weight/=4;
- }
- else{
- weight/=3;
- }
-
-
- /*copy weight*/
- dw_dst= defvert_verify_index(*dv_array_dst, index_dst);
- dw_dst->weight= weight;
- }
-
- /*free memory and return*/
- free_bvhtree_from_mesh(&tree_mesh_faces_src);
- return 1;
-}
/* for Mesh in Object mode */
/* allows editmode for Lattice */
@@ -589,13 +386,13 @@ static void ED_vgroup_nr_vert_add(Object *ob,
/* add the vert to the deform group with the
* specified number
*/
- MDeformVert *dvert= NULL;
- int tot;
+ MDeformVert *dvert = NULL;
+ int tot;
/* get the vert */
ED_vgroup_give_array(ob->data, &dvert, &tot);
- if (dvert==NULL)
+ if (dvert == NULL)
return;
/* check that vertnum is valid before trying to get the relevant dvert */
@@ -604,7 +401,7 @@ static void ED_vgroup_nr_vert_add(Object *ob,
if (dvert) {
- MDeformVert *dv= &dvert[vertnum];
+ MDeformVert *dv = &dvert[vertnum];
MDeformWeight *dw;
/* Lets first check to see if this vert is
@@ -612,27 +409,27 @@ static void ED_vgroup_nr_vert_add(Object *ob,
* lets update it
*/
- dw= defvert_find_index(dv, def_nr);
+ dw = defvert_find_index(dv, def_nr);
if (dw) {
- switch(assignmode) {
- case WEIGHT_REPLACE:
- dw->weight = weight;
- break;
- case WEIGHT_ADD:
- dw->weight += weight;
- if (dw->weight >= 1.0f)
- dw->weight = 1.0f;
- break;
- case WEIGHT_SUBTRACT:
- dw->weight -= weight;
- /* if the weight is zero or less then
- * remove the vert from the deform group
- */
- if (dw->weight <= 0.0f) {
- defvert_remove_group(dv, dw);
- }
- break;
+ switch (assignmode) {
+ case WEIGHT_REPLACE:
+ dw->weight = weight;
+ break;
+ case WEIGHT_ADD:
+ dw->weight += weight;
+ if (dw->weight >= 1.0f)
+ dw->weight = 1.0f;
+ break;
+ case WEIGHT_SUBTRACT:
+ dw->weight -= weight;
+ /* if the weight is zero or less then
+ * remove the vert from the deform group
+ */
+ if (dw->weight <= 0.0f) {
+ defvert_remove_group(dv, dw);
+ }
+ break;
}
}
else {
@@ -640,21 +437,21 @@ static void ED_vgroup_nr_vert_add(Object *ob,
* we must take a different form of action ...
*/
- switch(assignmode) {
- case WEIGHT_SUBTRACT:
- /* if we are subtracting then we don't
- * need to do anything
- */
- return;
+ switch (assignmode) {
+ case WEIGHT_SUBTRACT:
+ /* if we are subtracting then we don't
+ * need to do anything
+ */
+ return;
- case WEIGHT_REPLACE:
- case WEIGHT_ADD:
- /* if we are doing an additive assignment, then
- * we need to create the deform weight
- */
+ case WEIGHT_REPLACE:
+ case WEIGHT_ADD:
+ /* if we are doing an additive assignment, then
+ * we need to create the deform weight
+ */
- /* we checked if the vertex was added before so no need to test again, simply add */
- defvert_add_index_notest(dv, def_nr, weight);
+ /* we checked if the vertex was added before so no need to test again, simply add */
+ defvert_add_index_notest(dv, def_nr, weight);
}
}
}
@@ -666,9 +463,9 @@ void ED_vgroup_vert_add(Object *ob, bDeformGroup *dg, int vertnum, float weight,
/* add the vert to the deform group with the
* specified assign mode
*/
- const int def_nr= BLI_findindex(&ob->defbase, dg);
+ const int def_nr = BLI_findindex(&ob->defbase, dg);
- MDeformVert *dv= NULL;
+ MDeformVert *dv = NULL;
int tot;
/* get the deform group number, exit if
@@ -678,7 +475,7 @@ void ED_vgroup_vert_add(Object *ob, bDeformGroup *dg, int vertnum, float weight,
/* if there's no deform verts then create some,
*/
- if (ED_vgroup_give_array(ob->data, &dv, &tot) && dv==NULL)
+ if (ED_vgroup_give_array(ob->data, &dv, &tot) && dv == NULL)
ED_vgroup_data_create(ob->data);
/* call another function to do the work
@@ -687,17 +484,17 @@ void ED_vgroup_vert_add(Object *ob, bDeformGroup *dg, int vertnum, float weight,
}
/* mesh object mode, lattice can be in editmode */
-void ED_vgroup_vert_remove(Object *ob, bDeformGroup *dg, int vertnum)
+void ED_vgroup_vert_remove(Object *ob, bDeformGroup *dg, int vertnum)
{
/* This routine removes the vertex from the specified
* deform group.
*/
/* TODO, this is slow in a loop, better pass def_nr directly, but leave for later... - campbell */
- const int def_nr= BLI_findindex(&ob->defbase, dg);
+ const int def_nr = BLI_findindex(&ob->defbase, dg);
if (def_nr != -1) {
- MDeformVert *dvert= NULL;
+ MDeformVert *dvert = NULL;
int tot;
/* get the deform vertices corresponding to the
@@ -706,10 +503,10 @@ void ED_vgroup_vert_remove(Object *ob, bDeformGroup *dg, int vertnum)
ED_vgroup_give_array(ob->data, &dvert, &tot);
if (dvert) {
- MDeformVert *dv= &dvert[vertnum];
+ MDeformVert *dv = &dvert[vertnum];
MDeformWeight *dw;
- dw= defvert_find_index(dv, def_nr);
+ dw = defvert_find_index(dv, def_nr);
defvert_remove_group(dv, dw); /* dw can be NULL */
}
}
@@ -717,20 +514,20 @@ void ED_vgroup_vert_remove(Object *ob, bDeformGroup *dg, int vertnum)
static float get_vert_def_nr(Object *ob, const int def_nr, const int vertnum)
{
- MDeformVert *dv= NULL;
+ MDeformVert *dv = NULL;
BMVert *eve;
Mesh *me;
/* get the deform vertices corresponding to the vertnum */
- if (ob->type==OB_MESH) {
- me= ob->data;
+ if (ob->type == OB_MESH) {
+ me = ob->data;
if (me->edit_btmesh) {
- eve= BM_vert_at_index(me->edit_btmesh->bm, vertnum);
+ eve = BM_vert_at_index(me->edit_btmesh->bm, vertnum);
if (!eve) {
return 0.0f;
}
- dv= CustomData_bmesh_get(&me->edit_btmesh->bm->vdata, eve->head.data, CD_MDEFORMVERT);
+ dv = CustomData_bmesh_get(&me->edit_btmesh->bm->vdata, eve->head.data, CD_MDEFORMVERT);
}
else {
if (vertnum >= me->totvert) {
@@ -739,11 +536,11 @@ static float get_vert_def_nr(Object *ob, const int def_nr, const int vertnum)
dv = &me->dvert[vertnum];
}
}
- else if (ob->type==OB_LATTICE) {
- Lattice *lt= vgroup_edit_lattice(ob);
+ else if (ob->type == OB_LATTICE) {
+ Lattice *lt = vgroup_edit_lattice(ob);
if (lt->dvert) {
- if (vertnum >= lt->pntsu*lt->pntsv*lt->pntsw) {
+ if (vertnum >= lt->pntsu * lt->pntsv * lt->pntsw) {
return 0.0f;
}
dv = &lt->dvert[vertnum];
@@ -751,7 +548,7 @@ static float get_vert_def_nr(Object *ob, const int def_nr, const int vertnum)
}
if (dv) {
- MDeformWeight *dw= defvert_find_index(dv, def_nr);
+ MDeformWeight *dw = defvert_find_index(dv, def_nr);
if (dw) {
return dw->weight;
}
@@ -762,7 +559,7 @@ static float get_vert_def_nr(Object *ob, const int def_nr, const int vertnum)
float ED_vgroup_vert_weight(Object *ob, bDeformGroup *dg, int vertnum)
{
- const int def_nr= BLI_findindex(&ob->defbase, dg);
+ const int def_nr = BLI_findindex(&ob->defbase, dg);
if (def_nr == -1) {
return -1;
@@ -772,8 +569,8 @@ float ED_vgroup_vert_weight(Object *ob, bDeformGroup *dg, int vertnum)
}
void ED_vgroup_select_by_name(Object *ob, const char *name)
-{ /* note: ob->actdef==0 signals on painting to create a new one, if a bone in posemode is selected */
- ob->actdef= defgroup_name_index(ob, name) + 1;
+{ /* note: ob->actdef==0 signals on painting to create a new one, if a bone in posemode is selected */
+ ob->actdef = defgroup_name_index(ob, name) + 1;
}
/********************** Operator Implementations *********************/
@@ -781,7 +578,7 @@ void ED_vgroup_select_by_name(Object *ob, const char *name)
/* only in editmode */
static void vgroup_select_verts(Object *ob, int select)
{
- const int def_nr= ob->actdef-1;
+ const int def_nr = ob->actdef - 1;
MDeformVert *dv;
if (!BLI_findlink(&ob->defbase, def_nr)) {
@@ -789,7 +586,7 @@ static void vgroup_select_verts(Object *ob, int select)
}
if (ob->type == OB_MESH) {
- Mesh *me= ob->data;
+ Mesh *me = ob->data;
if (me->edit_btmesh) {
BMEditMesh *em = me->edit_btmesh;
@@ -798,7 +595,7 @@ static void vgroup_select_verts(Object *ob, int select)
BM_ITER_MESH (eve, &iter, em->bm, BM_VERTS_OF_MESH) {
if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) {
- dv= CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT);
+ dv = CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT);
if (defvert_find_index(dv, def_nr)) {
BM_vert_select_set(em->bm, eve, select);
}
@@ -806,7 +603,7 @@ static void vgroup_select_verts(Object *ob, int select)
}
/* this has to be called, because this function operates on vertices only */
- if (select) EDBM_select_flush(em); // vertices to edges/faces
+ if (select) EDBM_select_flush(em); // vertices to edges/faces
else EDBM_deselect_flush(em);
}
else {
@@ -818,11 +615,11 @@ static void vgroup_select_verts(Object *ob, int select)
mv = me->mvert;
dv = me->dvert;
- for (i=0; i<me->totvert; i++, mv++, dv++) {
+ for (i = 0; i < me->totvert; i++, mv++, dv++) {
if (!(mv->flag & ME_HIDE)) {
if (defvert_find_index(dv, def_nr)) {
- if (select) mv->flag |= SELECT;
- else mv->flag &= ~SELECT;
+ if (select) mv->flag |= SELECT;
+ else mv->flag &= ~SELECT;
}
}
}
@@ -832,19 +629,19 @@ static void vgroup_select_verts(Object *ob, int select)
}
}
else if (ob->type == OB_LATTICE) {
- Lattice *lt= vgroup_edit_lattice(ob);
+ Lattice *lt = vgroup_edit_lattice(ob);
if (lt->dvert) {
BPoint *bp;
int a, tot;
- dv= lt->dvert;
+ dv = lt->dvert;
- tot= lt->pntsu*lt->pntsv*lt->pntsw;
- for (a=0, bp= lt->def; a<tot; a++, bp++, dv++) {
+ tot = lt->pntsu * lt->pntsv * lt->pntsw;
+ for (a = 0, bp = lt->def; a < tot; a++, bp++, dv++) {
if (defvert_find_index(dv, def_nr)) {
- if (select) bp->f1 |= SELECT;
- else bp->f1 &= ~SELECT;
+ if (select) bp->f1 |= SELECT;
+ else bp->f1 &= ~SELECT;
}
}
}
@@ -856,10 +653,10 @@ static void vgroup_duplicate(Object *ob)
bDeformGroup *dg, *cdg;
char name[sizeof(dg->name)];
MDeformWeight *dw_org, *dw_cpy;
- MDeformVert **dvert_array=NULL;
- int i, idg, icdg, dvert_tot=0;
+ MDeformVert **dvert_array = NULL;
+ int i, idg, icdg, dvert_tot = 0;
- dg = BLI_findlink(&ob->defbase, (ob->actdef-1));
+ dg = BLI_findlink(&ob->defbase, (ob->actdef - 1));
if (!dg)
return;
@@ -876,16 +673,16 @@ static void vgroup_duplicate(Object *ob)
BLI_addtail(&ob->defbase, cdg);
- idg = (ob->actdef-1);
+ idg = (ob->actdef - 1);
ob->actdef = BLI_countlist(&ob->defbase);
- icdg = (ob->actdef-1);
+ icdg = (ob->actdef - 1);
/* TODO, we might want to allow only copy selected verts here? - campbell */
ED_vgroup_give_parray(ob->data, &dvert_array, &dvert_tot, FALSE);
if (dvert_array) {
for (i = 0; i < dvert_tot; i++) {
- MDeformVert *dv= dvert_array[i];
+ MDeformVert *dv = dvert_array[i];
dw_org = defvert_find_index(dv, idg);
if (dw_org) {
/* defvert_verify_index re-allocs org so need to store the weight first */
@@ -901,9 +698,9 @@ static void vgroup_duplicate(Object *ob)
static void vgroup_normalize(Object *ob)
{
MDeformWeight *dw;
- MDeformVert *dv, **dvert_array=NULL;
- int i, dvert_tot=0;
- const int def_nr= ob->actdef-1;
+ MDeformVert *dv, **dvert_array = NULL;
+ int i, dvert_tot = 0;
+ const int def_nr = ob->actdef - 1;
const int use_vert_sel = (ob->type == OB_MESH && ((Mesh *)ob->data)->editflag & ME_EDIT_VERT_SEL) != 0;
@@ -954,7 +751,7 @@ static void vgroup_normalize(Object *ob)
/* This finds all of the vertices face-connected to vert by an edge and returns a
* MEM_allocated array of indices of size count.
* count is an int passed by reference so it can be assigned the value of the length here. */
-static int* getSurroundingVerts(Mesh *me, int vert, int *count)
+static int *getSurroundingVerts(Mesh *me, int vert, int *count)
{
MPoly *mp = me->mpoly;
int i = me->totpoly;
@@ -981,12 +778,12 @@ static int* getSurroundingVerts(Mesh *me, int vert, int *count)
}
else if (!j) {
/* We are on the last corner. */
- a = (ml-1)->v;
+ a = (ml - 1)->v;
b = me->mloop[mp->loopstart].v;
}
else {
- a = (ml-1)->v;
- b = (ml+1)->v;
+ a = (ml - 1)->v;
+ b = (ml + 1)->v;
}
/* Append a and b verts to array, if not yet present. */
@@ -1026,7 +823,7 @@ static void getSingleCoordinate(MVert *points, int count, float coord[3])
for (i = 0; i < count; i++) {
add_v3_v3(coord, points[i].co);
}
- mul_v3_fl(coord, 1.0f/count);
+ mul_v3_fl(coord, 1.0f / count);
}
/* given a plane and a start and end position,
@@ -1056,7 +853,7 @@ static void getVerticalAndHorizontalChange(const float norm[3], float d, const f
// I need the derived mesh to be forgotten so the positions are recalculated with weight changes (see dm_deform_recalc)
static void dm_deform_clear(DerivedMesh *dm, Object *ob)
{
- if (ob->derivedDeform && (ob->derivedDeform)==dm) {
+ if (ob->derivedDeform && (ob->derivedDeform) == dm) {
ob->derivedDeform->needsFree = 1;
ob->derivedDeform->release(ob->derivedDeform);
ob->derivedDeform = NULL;
@@ -1068,7 +865,7 @@ static void dm_deform_clear(DerivedMesh *dm, Object *ob)
}
/* recalculate the deformation */
-static DerivedMesh* dm_deform_recalc(Scene *scene, Object *ob)
+static DerivedMesh *dm_deform_recalc(Scene *scene, Object *ob)
{
return mesh_get_derived_deform(scene, ob, CD_MASK_BAREMESH);
}
@@ -1088,19 +885,19 @@ static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, in
DerivedMesh *dm;
MDeformWeight *dw;
MVert m;
- MDeformVert *dvert = me->dvert+index;
+ MDeformVert *dvert = me->dvert + index;
int totweight = dvert->totweight;
float oldw = 0;
float oldPos[3] = {0};
float vc, hc, dist = 0.0f;
int i, k;
- float (*changes)[2] = MEM_mallocN(sizeof(float *)*totweight*2, "vertHorzChange");
- float *dists = MEM_mallocN(sizeof(float)*totweight, "distance");
+ float (*changes)[2] = MEM_mallocN(sizeof(float *) * totweight * 2, "vertHorzChange");
+ float *dists = MEM_mallocN(sizeof(float) * totweight, "distance");
/* track if up or down moved it closer for each bone */
- int *upDown = MEM_callocN(sizeof(int)*totweight, "upDownTracker");
+ int *upDown = MEM_callocN(sizeof(int) * totweight, "upDownTracker");
- int *dwIndices = MEM_callocN(sizeof(int)*totweight, "dwIndexTracker");
+ int *dwIndices = MEM_callocN(sizeof(int) * totweight, "dwIndexTracker");
float distToStart;
int bestIndex = 0;
char wasChange;
@@ -1115,11 +912,11 @@ static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, in
distToStart = dot_v3v3(norm, oldPos) + d;
if (distToBe == originalDistToBe) {
- distToBe += distToStart - distToStart*strength;
+ distToBe += distToStart - distToStart * strength;
}
for (i = 0; i < totweight; i++) {
dwIndices[i] = i;
- dw = (dvert->dw+i);
+ dw = (dvert->dw + i);
vc = hc = 0;
if (!dw->weight) {
changes[i][0] = 0;
@@ -1133,10 +930,10 @@ static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, in
}
oldw = dw->weight;
if (k) {
- dw->weight *= 1+cp;
+ dw->weight *= 1 + cp;
}
else {
- dw->weight /= 1+cp;
+ dw->weight /= 1 + cp;
}
if (dw->weight == oldw) {
changes[i][0] = 0;
@@ -1179,7 +976,7 @@ static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, in
float tf;
int ti;
bestIndex = k;
- for (i = k+1; i < totweight; i++) {
+ for (i = k + 1; i < totweight; i++) {
dist = dists[i];
if (fabs(dist) > fabs(dists[i])) {
@@ -1212,7 +1009,7 @@ static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, in
bestIndex = -1;
// find the best change with an acceptable horizontal change
for (i = 0; i < totweight; i++) {
- if (fabs(changes[i][0]) > fabs(changes[i][1]*2.0f)) {
+ if (fabs(changes[i][0]) > fabs(changes[i][1] * 2.0f)) {
bestIndex = i;
break;
}
@@ -1228,13 +1025,13 @@ static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, in
}
lastIndex = bestIndex;
wasUp = upDown[bestIndex];
- dw = (dvert->dw+dwIndices[bestIndex]);
+ dw = (dvert->dw + dwIndices[bestIndex]);
oldw = dw->weight;
if (upDown[bestIndex]) {
- dw->weight *= 1+cp;
+ dw->weight *= 1 + cp;
}
else {
- dw->weight /= 1+cp;
+ dw->weight /= 1 + cp;
}
if (dw->weight > 1) {
dw->weight = 1;
@@ -1246,8 +1043,9 @@ static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, in
dm_deform_clear(dm, ob); dm = NULL;
}
}
- } while (wasChange && (distToStart-distToBe)/fabsf(distToStart-distToBe) ==
- (dists[bestIndex]-distToBe)/fabsf(dists[bestIndex]-distToBe));
+ } while (wasChange && ((distToStart - distToBe) / fabsf(distToStart - distToBe) ==
+ (dists[bestIndex] - distToBe) / fabsf(dists[bestIndex] - distToBe)));
+
MEM_freeN(upDown);
MEM_freeN(changes);
MEM_freeN(dists);
@@ -1267,10 +1065,10 @@ static void vgroup_fix(Scene *scene, Object *ob, float distToBe, float strength,
return;
for (i = 0; i < me->totvert && mvert; i++, mvert++) {
if (mvert->flag & SELECT) {
- int count=0;
+ int count = 0;
if ((verts = getSurroundingVerts(me, i, &count))) {
MVert m;
- MVert *p = MEM_callocN(sizeof(MVert)*(count), "deformedPoints");
+ MVert *p = MEM_callocN(sizeof(MVert) * (count), "deformedPoints");
int k;
DerivedMesh *dm = mesh_get_derived_deform(scene, ob, CD_MASK_BAREMESH);
@@ -1287,7 +1085,7 @@ static void vgroup_fix(Scene *scene, Object *ob, float distToBe, float strength,
getSingleCoordinate(p, count, coord);
dm->getVert(dm, i, &m);
sub_v3_v3v3(norm, m.co, coord);
- mag= normalize_v3(norm);
+ mag = normalize_v3(norm);
if (mag) { /* zeros fix */
d = -dot_v3v3(norm, coord);
/* dist = (dot_v3v3(norm, m.co) + d); */ /* UNUSED */
@@ -1305,9 +1103,9 @@ static void vgroup_fix(Scene *scene, Object *ob, float distToBe, float strength,
static void vgroup_levels(Object *ob, float offset, float gain)
{
MDeformWeight *dw;
- MDeformVert *dv, **dvert_array=NULL;
- int i, dvert_tot=0;
- const int def_nr= ob->actdef-1;
+ MDeformVert *dv, **dvert_array = NULL;
+ int i, dvert_tot = 0;
+ const int def_nr = ob->actdef - 1;
const int use_vert_sel = (ob->type == OB_MESH && ((Mesh *)ob->data)->editflag & ME_EDIT_VERT_SEL) != 0;
@@ -1340,9 +1138,9 @@ static void vgroup_levels(Object *ob, float offset, float gain)
/* TODO - select between groups */
static void vgroup_normalize_all(Object *ob, int lock_active)
{
- MDeformVert *dv, **dvert_array=NULL;
- int i, dvert_tot=0;
- const int def_nr= ob->actdef-1;
+ MDeformVert *dv, **dvert_array = NULL;
+ int i, dvert_tot = 0;
+ const int def_nr = ob->actdef - 1;
const int use_vert_sel = (ob->type == OB_MESH && ((Mesh *)ob->data)->editflag & ME_EDIT_VERT_SEL) != 0;
@@ -1380,22 +1178,23 @@ static void vgroup_normalize_all(Object *ob, int lock_active)
}
}
+
static void vgroup_lock_all(Object *ob, int action)
{
bDeformGroup *dg;
if (action == SEL_TOGGLE) {
- action= SEL_SELECT;
- for (dg= ob->defbase.first; dg; dg= dg->next) {
+ action = SEL_SELECT;
+ for (dg = ob->defbase.first; dg; dg = dg->next) {
if (dg->flag & DG_LOCK_WEIGHT) {
- action= SEL_DESELECT;
+ action = SEL_DESELECT;
break;
}
}
}
- for (dg= ob->defbase.first; dg; dg= dg->next) {
- switch(action) {
+ for (dg = ob->defbase.first; dg; dg = dg->next) {
+ switch (action) {
case SEL_SELECT:
dg->flag |= DG_LOCK_WEIGHT;
break;
@@ -1412,9 +1211,9 @@ static void vgroup_lock_all(Object *ob, int action)
static void vgroup_invert(Object *ob, const short auto_assign, const short auto_remove)
{
MDeformWeight *dw;
- MDeformVert *dv, **dvert_array=NULL;
- int i, dvert_tot=0;
- const int def_nr= ob->actdef-1;
+ MDeformVert *dv, **dvert_array = NULL;
+ int i, dvert_tot = 0;
+ const int def_nr = ob->actdef - 1;
const int use_vert_sel = (ob->type == OB_MESH && ((Mesh *)ob->data)->editflag & ME_EDIT_VERT_SEL) != 0;
if (!BLI_findlink(&ob->defbase, def_nr)) {
@@ -1432,10 +1231,10 @@ static void vgroup_invert(Object *ob, const short auto_assign, const short auto_
}
if (auto_assign) {
- dw= defvert_verify_index(dv, def_nr);
+ dw = defvert_verify_index(dv, def_nr);
}
else {
- dw= defvert_find_index(dv, def_nr);
+ dw = defvert_find_index(dv, def_nr);
}
if (dw) {
@@ -1455,10 +1254,10 @@ static void vgroup_blend(Object *ob, const float fac)
{
MDeformVert *dv;
MDeformWeight *dw;
- int i, dvert_tot=0;
- const int def_nr= ob->actdef - 1;
+ int i, dvert_tot = 0;
+ const int def_nr = ob->actdef - 1;
- BLI_assert(fac >= 0.0 && fac <= 1.0f);
+ BLI_assert(fac >= 0.0f && fac <= 1.0f);
if (ob->type != OB_MESH) {
return;
@@ -1505,14 +1304,14 @@ static void vgroup_blend(Object *ob, const float fac)
int i1 /* , i2 */;
/* i1 is always the selected one */
if (sel1) {
- i1= BM_elem_index_get(eed->v1);
+ i1 = BM_elem_index_get(eed->v1);
/* i2= BM_elem_index_get(eed->v2); */ /* UNUSED */
- eve= eed->v2;
+ eve = eed->v2;
}
else {
/* i2= BM_elem_index_get(eed->v1); */ /* UNUSED */
- i1= BM_elem_index_get(eed->v2);
- eve= eed->v1;
+ i1 = BM_elem_index_get(eed->v2);
+ eve = eed->v1;
}
dv = CustomData_bmesh_get(&bm->vdata, eve->head.data, CD_MDEFORMVERT);
@@ -1586,9 +1385,9 @@ static void vgroup_blend(Object *ob, const float fac)
static void vgroup_clean(Object *ob, const float epsilon, int keep_single)
{
MDeformWeight *dw;
- MDeformVert *dv, **dvert_array=NULL;
- int i, dvert_tot=0;
- const int def_nr= ob->actdef-1;
+ MDeformVert *dv, **dvert_array = NULL;
+ int i, dvert_tot = 0;
+ const int def_nr = ob->actdef - 1;
const int use_vert_sel = (ob->type == OB_MESH && ((Mesh *)ob->data)->editflag & ME_EDIT_VERT_SEL) != 0;
if (!BLI_findlink(&ob->defbase, def_nr)) {
@@ -1606,11 +1405,11 @@ static void vgroup_clean(Object *ob, const float epsilon, int keep_single)
continue;
}
- dw= defvert_find_index(dv, def_nr);
+ dw = defvert_find_index(dv, def_nr);
if (dw) {
if (dw->weight <= epsilon) {
- if (keep_single==FALSE || dv->totweight > 1) {
+ if (keep_single == FALSE || dv->totweight > 1) {
defvert_remove_group(dv, dw); /* dw can be NULL */
}
}
@@ -1623,7 +1422,7 @@ static void vgroup_clean(Object *ob, const float epsilon, int keep_single)
static void vgroup_clean_all(Object *ob, const float epsilon, const int keep_single)
{
- MDeformVert **dvert_array=NULL;
+ MDeformVert **dvert_array = NULL;
int i, dvert_tot = 0;
const int use_vert_sel = (ob->type == OB_MESH && ((Mesh *)ob->data)->editflag & ME_EDIT_VERT_SEL) != 0;
@@ -1641,14 +1440,14 @@ static void vgroup_clean_all(Object *ob, const float epsilon, const int keep_sin
continue;
}
- j= dv->totweight;
+ j = dv->totweight;
while (j--) {
if (keep_single && dv->totweight == 1)
break;
- dw= dv->dw + j;
+ dw = dv->dw + j;
if (dw->weight <= epsilon) {
defvert_remove_group(dv, dw);
@@ -1676,14 +1475,14 @@ static void dvert_mirror_op(MDeformVert *dvert, MDeformVert *dvert_mirr,
SWAP(MDeformVert, *dvert, *dvert_mirr);
}
else {
- MDeformWeight *dw= defvert_find_index(dvert, act_vgroup);
- MDeformWeight *dw_mirr= defvert_find_index(dvert_mirr, act_vgroup);
+ MDeformWeight *dw = defvert_find_index(dvert, act_vgroup);
+ MDeformWeight *dw_mirr = defvert_find_index(dvert_mirr, act_vgroup);
if (dw || dw_mirr) {
if (dw_mirr == NULL)
- dw_mirr= defvert_verify_index(dvert_mirr, act_vgroup);
+ dw_mirr = defvert_verify_index(dvert_mirr, act_vgroup);
if (dw == NULL)
- dw= defvert_verify_index(dvert, act_vgroup);
+ dw = defvert_verify_index(dvert, act_vgroup);
SWAP(float, dw->weight, dw_mirr->weight);
}
@@ -1733,19 +1532,19 @@ void ED_vgroup_mirror(Object *ob, const short mirror_weights, const short flip_v
BMVert *eve, *eve_mirr;
MDeformVert *dvert, *dvert_mirr;
short sel, sel_mirr;
- int *flip_map, flip_map_len;
- const int def_nr= ob->actdef-1;
+ int *flip_map, flip_map_len;
+ const int def_nr = ob->actdef - 1;
- if ( (mirror_weights==0 && flip_vgroups==0) ||
+ if ( (mirror_weights == 0 && flip_vgroups == 0) ||
(BLI_findlink(&ob->defbase, def_nr) == NULL) )
{
return;
}
if (flip_vgroups) {
- flip_map= all_vgroups ?
- defgroup_flip_map(ob, &flip_map_len, FALSE) :
- defgroup_flip_map_single(ob, &flip_map_len, FALSE, def_nr);
+ flip_map = all_vgroups ?
+ defgroup_flip_map(ob, &flip_map_len, FALSE) :
+ defgroup_flip_map_single(ob, &flip_map_len, FALSE, def_nr);
BLI_assert(flip_map != NULL);
@@ -1755,13 +1554,13 @@ void ED_vgroup_mirror(Object *ob, const short mirror_weights, const short flip_v
}
}
else {
- flip_map= NULL;
- flip_map_len= 0;
+ flip_map = NULL;
+ flip_map_len = 0;
}
/* only the active group */
if (ob->type == OB_MESH) {
- Mesh *me= ob->data;
+ Mesh *me = ob->data;
BMEditMesh *em = me->edit_btmesh;
if (em) {
@@ -1775,13 +1574,13 @@ void ED_vgroup_mirror(Object *ob, const short mirror_weights, const short flip_v
/* Go through the list of editverts and assign them */
BM_ITER_MESH (eve, &iter, em->bm, BM_VERTS_OF_MESH) {
- if ((eve_mirr= EDBM_verts_mirror_get(em, eve))) {
- sel= BM_elem_flag_test(eve, BM_ELEM_SELECT);
- sel_mirr= BM_elem_flag_test(eve_mirr, BM_ELEM_SELECT);
+ if ((eve_mirr = EDBM_verts_mirror_get(em, eve))) {
+ sel = BM_elem_flag_test(eve, BM_ELEM_SELECT);
+ sel_mirr = BM_elem_flag_test(eve_mirr, BM_ELEM_SELECT);
if ((sel || sel_mirr) && (eve != eve_mirr)) {
- dvert= CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT);
- dvert_mirr= CustomData_bmesh_get(&em->bm->vdata, eve_mirr->head.data, CD_MDEFORMVERT);
+ dvert = CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT);
+ dvert_mirr = CustomData_bmesh_get(&em->bm->vdata, eve_mirr->head.data, CD_MDEFORMVERT);
if (dvert && dvert_mirr) {
VGROUP_MIRR_OP;
}
@@ -1805,29 +1604,29 @@ void ED_vgroup_mirror(Object *ob, const short mirror_weights, const short flip_v
}
if (!use_vert_sel) {
- sel= sel_mirr= TRUE;
+ sel = sel_mirr = TRUE;
}
/* tag verts we have used */
- for (vidx= 0, mv= me->mvert; vidx < me->totvert; vidx++, mv++) {
+ for (vidx = 0, mv = me->mvert; vidx < me->totvert; vidx++, mv++) {
mv->flag &= ~ME_VERT_TMP_TAG;
}
- for (vidx= 0, mv= me->mvert; vidx < me->totvert; vidx++, mv++) {
+ for (vidx = 0, mv = me->mvert; vidx < me->totvert; vidx++, mv++) {
if ( ((mv->flag & ME_VERT_TMP_TAG) == 0) &&
- ((vidx_mirr= mesh_get_x_mirror_vert(ob, vidx)) != -1) &&
+ ((vidx_mirr = mesh_get_x_mirror_vert(ob, vidx)) != -1) &&
(vidx != vidx_mirr) &&
- ((((mv_mirr= me->mvert + vidx_mirr)->flag) & ME_VERT_TMP_TAG) == 0))
+ ((((mv_mirr = me->mvert + vidx_mirr)->flag) & ME_VERT_TMP_TAG) == 0))
{
if (use_vert_sel) {
- sel= mv->flag & SELECT;
- sel_mirr= mv_mirr->flag & SELECT;
+ sel = mv->flag & SELECT;
+ sel_mirr = mv_mirr->flag & SELECT;
}
if (sel || sel_mirr) {
- dvert= &me->dvert[vidx];
- dvert_mirr= &me->dvert[vidx_mirr];
+ dvert = &me->dvert[vidx];
+ dvert_mirr = &me->dvert[vidx_mirr];
VGROUP_MIRR_OP;
}
@@ -1839,7 +1638,7 @@ void ED_vgroup_mirror(Object *ob, const short mirror_weights, const short flip_v
}
}
else if (ob->type == OB_LATTICE) {
- Lattice *lt= vgroup_edit_lattice(ob);
+ Lattice *lt = vgroup_edit_lattice(ob);
int i1, i2;
int u, v, w;
int pntsu_half;
@@ -1852,27 +1651,27 @@ void ED_vgroup_mirror(Object *ob, const short mirror_weights, const short flip_v
/* unlike editmesh we know that by only looping over the first half of
* the 'u' indices it will cover all points except the middle which is
* ok in this case */
- pntsu_half= lt->pntsu / 2;
+ pntsu_half = lt->pntsu / 2;
- for (w=0; w<lt->pntsw; w++) {
- for (v=0; v<lt->pntsv; v++) {
- for (u=0; u<pntsu_half; u++) {
- int u_inv= (lt->pntsu - 1) - u;
+ for (w = 0; w < lt->pntsw; w++) {
+ for (v = 0; v < lt->pntsv; v++) {
+ for (u = 0; u < pntsu_half; u++) {
+ int u_inv = (lt->pntsu - 1) - u;
if (u != u_inv) {
BPoint *bp, *bp_mirr;
- i1= LT_INDEX(lt, u, v, w);
- i2= LT_INDEX(lt, u_inv, v, w);
+ i1 = LT_INDEX(lt, u, v, w);
+ i2 = LT_INDEX(lt, u_inv, v, w);
- bp= &lt->def[i1];
- bp_mirr= &lt->def[i2];
+ bp = &lt->def[i1];
+ bp_mirr = &lt->def[i2];
- sel= bp->f1 & SELECT;
- sel_mirr= bp_mirr->f1 & SELECT;
+ sel = bp->f1 & SELECT;
+ sel_mirr = bp_mirr->f1 & SELECT;
if (sel || sel_mirr) {
- dvert= &lt->dvert[i1];
- dvert_mirr= &lt->dvert[i2];
+ dvert = &lt->dvert[i1];
+ dvert_mirr = &lt->dvert[i2];
VGROUP_MIRR_OP;
}
@@ -1902,40 +1701,40 @@ static void vgroup_remap_update_users(Object *ob, int *map)
* they get deleted the numbers get out of sync, this corrects that */
if (ob->soft)
- ob->soft->vertgroup= map[ob->soft->vertgroup];
+ ob->soft->vertgroup = map[ob->soft->vertgroup];
- for (md=ob->modifiers.first; md; md=md->next) {
+ for (md = ob->modifiers.first; md; md = md->next) {
if (md->type == eModifierType_Explode) {
- emd= (ExplodeModifierData*)md;
- emd->vgroup= map[emd->vgroup];
+ emd = (ExplodeModifierData *)md;
+ emd->vgroup = map[emd->vgroup];
}
else if (md->type == eModifierType_Cloth) {
- clmd= (ClothModifierData*)md;
- clsim= clmd->sim_parms;
+ clmd = (ClothModifierData *)md;
+ clsim = clmd->sim_parms;
if (clsim) {
- clsim->vgroup_mass= map[clsim->vgroup_mass];
- clsim->vgroup_bend= map[clsim->vgroup_bend];
- clsim->vgroup_struct= map[clsim->vgroup_struct];
+ clsim->vgroup_mass = map[clsim->vgroup_mass];
+ clsim->vgroup_bend = map[clsim->vgroup_bend];
+ clsim->vgroup_struct = map[clsim->vgroup_struct];
}
}
}
- for (psys=ob->particlesystem.first; psys; psys=psys->next) {
- for (a=0; a<PSYS_TOT_VG; a++)
- psys->vgroup[a]= map[psys->vgroup[a]];
+ for (psys = ob->particlesystem.first; psys; psys = psys->next) {
+ for (a = 0; a < PSYS_TOT_VG; a++)
+ psys->vgroup[a] = map[psys->vgroup[a]];
}
}
static void vgroup_delete_update_users(Object *ob, int id)
{
- int i, defbase_tot= BLI_countlist(&ob->defbase) + 1;
- int *map= MEM_mallocN(sizeof(int) * defbase_tot, "vgroup del");
+ int i, defbase_tot = BLI_countlist(&ob->defbase) + 1;
+ int *map = MEM_mallocN(sizeof(int) * defbase_tot, "vgroup del");
- map[id]= map[0]= 0;
- for (i=1; i<id; i++) map[i]=i;
- for (i=id+1; i<defbase_tot; i++) map[i]=i-1;
+ map[id] = map[0] = 0;
+ for (i = 1; i < id; i++) map[i] = i;
+ for (i = id + 1; i < defbase_tot; i++) map[i] = i - 1;
vgroup_remap_update_users(ob, map);
MEM_freeN(map);
@@ -1944,9 +1743,9 @@ static void vgroup_delete_update_users(Object *ob, int id)
static void vgroup_delete_object_mode(Object *ob, bDeformGroup *dg)
{
- MDeformVert *dvert_array=NULL;
- int dvert_tot=0;
- const int def_nr= BLI_findindex(&ob->defbase, dg);
+ MDeformVert *dvert_array = NULL;
+ int dvert_tot = 0;
+ const int def_nr = BLI_findindex(&ob->defbase, dg);
assert(def_nr > -1);
@@ -1955,10 +1754,10 @@ static void vgroup_delete_object_mode(Object *ob, bDeformGroup *dg)
if (dvert_array) {
int i, j;
MDeformVert *dv;
- for (i= 0, dv= dvert_array; i < dvert_tot; i++, dv++) {
+ for (i = 0, dv = dvert_array; i < dvert_tot; i++, dv++) {
MDeformWeight *dw;
- dw= defvert_find_index(dv, def_nr);
+ dw = defvert_find_index(dv, def_nr);
defvert_remove_group(dv, dw); /* dw can be NULL */
/* inline, make into a function if anything else needs to do this */
@@ -1980,7 +1779,7 @@ static void vgroup_delete_object_mode(Object *ob, bDeformGroup *dg)
if (ob->actdef > def_nr)
ob->actdef--;
if (ob->actdef < 1 && ob->defbase.first)
- ob->actdef= 1;
+ ob->actdef = 1;
}
@@ -1989,10 +1788,10 @@ static void vgroup_delete_object_mode(Object *ob, bDeformGroup *dg)
static void vgroup_active_remove_verts(Object *ob, const int allverts, bDeformGroup *dg)
{
MDeformVert *dv;
- const int def_nr= BLI_findindex(&ob->defbase, dg);
+ const int def_nr = BLI_findindex(&ob->defbase, dg);
if (ob->type == OB_MESH) {
- Mesh *me= ob->data;
+ Mesh *me = ob->data;
if (me->edit_btmesh) {
BMEditMesh *em = me->edit_btmesh;
@@ -2000,7 +1799,7 @@ static void vgroup_active_remove_verts(Object *ob, const int allverts, bDeformGr
BMIter iter;
BM_ITER_MESH (eve, &iter, em->bm, BM_VERTS_OF_MESH) {
- dv= CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT);
+ dv = CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT);
if (dv && dv->dw && (allverts || BM_elem_flag_test(eve, BM_ELEM_SELECT))) {
MDeformWeight *dw = defvert_find_index(dv, def_nr);
@@ -2020,7 +1819,7 @@ static void vgroup_active_remove_verts(Object *ob, const int allverts, bDeformGr
mv = me->mvert;
dv = me->dvert;
- for (i=0; i<me->totvert; i++, mv++, dv++) {
+ for (i = 0; i < me->totvert; i++, mv++, dv++) {
if (mv->flag & SELECT) {
if (dv->dw && (allverts || (mv->flag & SELECT))) {
MDeformWeight *dw = defvert_find_index(dv, def_nr);
@@ -2031,17 +1830,17 @@ static void vgroup_active_remove_verts(Object *ob, const int allverts, bDeformGr
}
}
else if (ob->type == OB_LATTICE) {
- Lattice *lt= vgroup_edit_lattice(ob);
+ Lattice *lt = vgroup_edit_lattice(ob);
if (lt->dvert) {
BPoint *bp;
- int i, tot= lt->pntsu*lt->pntsv*lt->pntsw;
+ int i, tot = lt->pntsu * lt->pntsv * lt->pntsw;
- for (i=0, bp= lt->def; i<tot; i++, bp++) {
+ for (i = 0, bp = lt->def; i < tot; i++, bp++) {
if (allverts || (bp->f1 & SELECT)) {
MDeformWeight *dw;
- dv= &lt->dvert[i];
+ dv = &lt->dvert[i];
dw = defvert_find_index(dv, def_nr);
defvert_remove_group(dv, dw); /* dw can be NULL */
@@ -2054,7 +1853,7 @@ static void vgroup_active_remove_verts(Object *ob, const int allverts, bDeformGr
static void vgroup_delete_edit_mode(Object *ob, bDeformGroup *dg)
{
int i;
- const int dg_index= BLI_findindex(&ob->defbase, dg);
+ const int dg_index = BLI_findindex(&ob->defbase, dg);
assert(dg_index > -1);
@@ -2062,32 +1861,32 @@ static void vgroup_delete_edit_mode(Object *ob, bDeformGroup *dg)
vgroup_active_remove_verts(ob, TRUE, dg);
/* Make sure that any verts with higher indices are adjusted accordingly */
- if (ob->type==OB_MESH) {
- Mesh *me= ob->data;
+ if (ob->type == OB_MESH) {
+ Mesh *me = ob->data;
BMEditMesh *em = me->edit_btmesh;
BMIter iter;
BMVert *eve;
MDeformVert *dvert;
BM_ITER_MESH (eve, &iter, em->bm, BM_VERTS_OF_MESH) {
- dvert= CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT);
+ dvert = CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT);
if (dvert)
- for (i=0; i<dvert->totweight; i++)
+ for (i = 0; i < dvert->totweight; i++)
if (dvert->dw[i].def_nr > dg_index)
dvert->dw[i].def_nr--;
}
}
- else if (ob->type==OB_LATTICE) {
- Lattice *lt= vgroup_edit_lattice(ob);
+ else if (ob->type == OB_LATTICE) {
+ Lattice *lt = vgroup_edit_lattice(ob);
BPoint *bp;
- MDeformVert *dvert= lt->dvert;
+ MDeformVert *dvert = lt->dvert;
int a, tot;
if (dvert) {
- tot= lt->pntsu*lt->pntsv*lt->pntsw;
- for (a=0, bp= lt->def; a<tot; a++, bp++, dvert++) {
- for (i=0; i<dvert->totweight; i++) {
+ tot = lt->pntsu * lt->pntsv * lt->pntsw;
+ for (a = 0, bp = lt->def; a < tot; a++, bp++, dvert++) {
+ for (i = 0; i < dvert->totweight; i++) {
if (dvert->dw[i].def_nr > dg_index)
dvert->dw[i].def_nr--;
}
@@ -2098,26 +1897,26 @@ static void vgroup_delete_edit_mode(Object *ob, bDeformGroup *dg)
vgroup_delete_update_users(ob, dg_index + 1);
/* Remove the group */
- BLI_freelinkN (&ob->defbase, dg);
+ BLI_freelinkN(&ob->defbase, dg);
/* Update the active deform index if necessary */
if (ob->actdef > dg_index)
ob->actdef--;
if (ob->actdef < 1 && ob->defbase.first)
- ob->actdef= 1;
+ ob->actdef = 1;
/* remove all dverts */
if (ob->defbase.first == NULL) {
- if (ob->type==OB_MESH) {
- Mesh *me= ob->data;
+ if (ob->type == OB_MESH) {
+ Mesh *me = ob->data;
CustomData_free_layer_active(&me->vdata, CD_MDEFORMVERT, me->totvert);
- me->dvert= NULL;
+ me->dvert = NULL;
}
- else if (ob->type==OB_LATTICE) {
- Lattice *lt= vgroup_edit_lattice(ob);
+ else if (ob->type == OB_LATTICE) {
+ Lattice *lt = vgroup_edit_lattice(ob);
if (lt->dvert) {
MEM_freeN(lt->dvert);
- lt->dvert= NULL;
+ lt->dvert = NULL;
}
}
}
@@ -2128,7 +1927,7 @@ static int vgroup_object_in_edit_mode(Object *ob)
if (ob->type == OB_MESH)
return (BMEdit_FromObject(ob) != NULL);
else if (ob->type == OB_LATTICE)
- return (((Lattice*)ob->data)->editlatt != NULL);
+ return (((Lattice *)ob->data)->editlatt != NULL);
return 0;
}
@@ -2147,7 +1946,7 @@ static int vgroup_object_in_wpaint_vert_select(Object *ob)
static void vgroup_delete(Object *ob)
{
- bDeformGroup *dg = BLI_findlink(&ob->defbase, ob->actdef-1);
+ bDeformGroup *dg = BLI_findlink(&ob->defbase, ob->actdef - 1);
if (!dg)
return;
@@ -2160,16 +1959,16 @@ static void vgroup_delete(Object *ob)
static void vgroup_delete_all(Object *ob)
{
/* Remove all DVerts */
- if (ob->type==OB_MESH) {
- Mesh *me= ob->data;
+ if (ob->type == OB_MESH) {
+ Mesh *me = ob->data;
CustomData_free_layer_active(&me->vdata, CD_MDEFORMVERT, me->totvert);
- me->dvert= NULL;
+ me->dvert = NULL;
}
- else if (ob->type==OB_LATTICE) {
- Lattice *lt= vgroup_edit_lattice(ob);
+ else if (ob->type == OB_LATTICE) {
+ Lattice *lt = vgroup_edit_lattice(ob);
if (lt->dvert) {
MEM_freeN(lt->dvert);
- lt->dvert= NULL;
+ lt->dvert = NULL;
}
}
@@ -2177,20 +1976,20 @@ static void vgroup_delete_all(Object *ob)
BLI_freelistN(&ob->defbase);
/* Fix counters/indices */
- ob->actdef= 0;
+ ob->actdef = 0;
}
/* only in editmode */
static void vgroup_assign_verts(Object *ob, const float weight)
{
MDeformVert *dv;
- const int def_nr= ob->actdef-1;
+ const int def_nr = ob->actdef - 1;
if (!BLI_findlink(&ob->defbase, def_nr))
return;
if (ob->type == OB_MESH) {
- Mesh *me= ob->data;
+ Mesh *me = ob->data;
if (me->edit_btmesh) {
BMEditMesh *em = me->edit_btmesh;
@@ -2204,10 +2003,10 @@ static void vgroup_assign_verts(Object *ob, const float weight)
BM_ITER_MESH (eve, &iter, em->bm, BM_VERTS_OF_MESH) {
if (BM_elem_flag_test(eve, BM_ELEM_SELECT)) {
MDeformWeight *dw;
- dv= CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT); /* can be NULL */
- dw= defvert_verify_index(dv, def_nr);
+ dv = CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT); /* can be NULL */
+ dw = defvert_verify_index(dv, def_nr);
if (dw) {
- dw->weight= weight;
+ dw->weight = weight;
}
}
}
@@ -2224,35 +2023,35 @@ static void vgroup_assign_verts(Object *ob, const float weight)
mv = me->mvert;
dv = me->dvert;
- for (i=0; i<me->totvert; i++, mv++, dv++) {
+ for (i = 0; i < me->totvert; i++, mv++, dv++) {
if (mv->flag & SELECT) {
MDeformWeight *dw;
- dw= defvert_verify_index(dv, def_nr);
+ dw = defvert_verify_index(dv, def_nr);
if (dw) {
- dw->weight= weight;
+ dw->weight = weight;
}
}
}
}
}
else if (ob->type == OB_LATTICE) {
- Lattice *lt= vgroup_edit_lattice(ob);
+ Lattice *lt = vgroup_edit_lattice(ob);
BPoint *bp;
int a, tot;
- if (lt->dvert==NULL)
+ if (lt->dvert == NULL)
ED_vgroup_data_create(&lt->id);
- dv= lt->dvert;
+ dv = lt->dvert;
- tot= lt->pntsu*lt->pntsv*lt->pntsw;
- for (a=0, bp= lt->def; a<tot; a++, bp++, dv++) {
+ tot = lt->pntsu * lt->pntsv * lt->pntsw;
+ for (a = 0, bp = lt->def; a < tot; a++, bp++, dv++) {
if (bp->f1 & SELECT) {
MDeformWeight *dw;
- dw= defvert_verify_index(dv, def_nr);
+ dw = defvert_verify_index(dv, def_nr);
if (dw) {
- dw->weight= weight;
+ dw->weight = weight;
}
}
}
@@ -2268,7 +2067,7 @@ static void vgroup_remove_verts(Object *ob, int allverts)
* active group index
*/
bDeformGroup *dg;
- for (dg= ob->defbase.first; dg; dg= dg->next) {
+ for (dg = ob->defbase.first; dg; dg = dg->next) {
vgroup_active_remove_verts(ob, allverts, dg);
}
}
@@ -2277,15 +2076,15 @@ static void vgroup_remove_verts(Object *ob, int allverts)
static int vertex_group_poll(bContext *C)
{
- Object *ob= ED_object_context(C);
- ID *data= (ob)? ob->data: NULL;
+ Object *ob = ED_object_context(C);
+ ID *data = (ob) ? ob->data : NULL;
return (ob && !ob->id.lib && OB_TYPE_SUPPORT_VGROUP(ob->type) && data && !data->lib);
}
-static int UNUSED_FUNCTION(vertex_group_poll_edit)(bContext *C)
+static int UNUSED_FUNCTION(vertex_group_poll_edit) (bContext * C)
{
- Object *ob= ED_object_context(C);
- ID *data= (ob)? ob->data: NULL;
+ Object *ob = ED_object_context(C);
+ ID *data = (ob) ? ob->data : NULL;
if (!(ob && !ob->id.lib && data && !data->lib))
return 0;
@@ -2296,24 +2095,24 @@ static int UNUSED_FUNCTION(vertex_group_poll_edit)(bContext *C)
/* editmode _or_ weight paint vertex sel */
static int vertex_group_poll_edit_or_wpaint_vert_select(bContext *C)
{
- Object *ob= ED_object_context(C);
- ID *data= (ob)? ob->data: NULL;
+ Object *ob = ED_object_context(C);
+ ID *data = (ob) ? ob->data : NULL;
if (!(ob && !ob->id.lib && data && !data->lib))
return 0;
- return ( vgroup_object_in_edit_mode(ob) ||
- vgroup_object_in_wpaint_vert_select(ob) );
+ return (vgroup_object_in_edit_mode(ob) ||
+ vgroup_object_in_wpaint_vert_select(ob));
}
static int vertex_group_add_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *ob= ED_object_context(C);
+ Object *ob = ED_object_context(C);
ED_vgroup_add(ob);
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
return OPERATOR_FINISHED;
}
@@ -2323,18 +2122,19 @@ void OBJECT_OT_vertex_group_add(wmOperatorType *ot)
/* identifiers */
ot->name = "Add Vertex Group";
ot->idname = "OBJECT_OT_vertex_group_add";
+ ot->description = "Add a new vertex group to the active object";
/* api callbacks */
ot->poll = vertex_group_poll;
ot->exec = vertex_group_add_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int vertex_group_remove_exec(bContext *C, wmOperator *op)
{
- Object *ob= ED_object_context(C);
+ Object *ob = ED_object_context(C);
if (RNA_boolean_get(op->ptr, "all"))
vgroup_delete_all(ob);
@@ -2342,8 +2142,8 @@ static int vertex_group_remove_exec(bContext *C, wmOperator *op)
vgroup_delete(ob);
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
return OPERATOR_FINISHED;
}
@@ -2353,6 +2153,7 @@ void OBJECT_OT_vertex_group_remove(wmOperatorType *ot)
/* identifiers */
ot->name = "Remove Vertex Group";
ot->idname = "OBJECT_OT_vertex_group_remove";
+ ot->description = "Delete the active vertex group";
/* api callbacks */
ot->poll = vertex_group_poll;
@@ -2362,7 +2163,7 @@ void OBJECT_OT_vertex_group_remove(wmOperatorType *ot)
/* redo operator will fail in this case because vertex groups aren't stored
* in local edit mode stack and toggling "all" property will lead to
* all groups deleted without way to restore them (see [#29527], sergey) */
- ot->flag = /*OPTYPE_REGISTER|*/OPTYPE_UNDO;
+ ot->flag = /*OPTYPE_REGISTER|*/ OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "all", 0, "All", "Remove from all vertex groups");
@@ -2370,15 +2171,15 @@ void OBJECT_OT_vertex_group_remove(wmOperatorType *ot)
static int vertex_group_assign_exec(bContext *C, wmOperator *op)
{
- ToolSettings *ts= CTX_data_tool_settings(C);
- Object *ob= ED_object_context(C);
+ ToolSettings *ts = CTX_data_tool_settings(C);
+ Object *ob = ED_object_context(C);
if (RNA_boolean_get(op->ptr, "new"))
ED_vgroup_add(ob);
vgroup_assign_verts(ob, ts->vgroup_weight);
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data);
return OPERATOR_FINISHED;
}
@@ -2388,6 +2189,7 @@ void OBJECT_OT_vertex_group_assign(wmOperatorType *ot)
/* identifiers */
ot->name = "Assign Vertex Group";
ot->idname = "OBJECT_OT_vertex_group_assign";
+ ot->description = "Assign the selected vertices to the current (or a new) vertex group";
/* api callbacks */
ot->poll = vertex_group_poll_edit_or_wpaint_vert_select;
@@ -2397,7 +2199,7 @@ void OBJECT_OT_vertex_group_assign(wmOperatorType *ot)
/* redo operator will fail in this case because vertex group assignment
* isn't stored in local edit mode stack and toggling "new" property will
* lead to creating plenty of new vertex groups (see [#29527], sergey) */
- ot->flag = /*OPTYPE_REGISTER|*/OPTYPE_UNDO;
+ ot->flag = /*OPTYPE_REGISTER|*/ OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "new", 0, "New", "Assign vertex to new vertex group");
@@ -2405,12 +2207,12 @@ void OBJECT_OT_vertex_group_assign(wmOperatorType *ot)
static int vertex_group_remove_from_exec(bContext *C, wmOperator *op)
{
- Object *ob= ED_object_context(C);
+ Object *ob = ED_object_context(C);
if (RNA_boolean_get(op->ptr, "all"))
vgroup_remove_verts(ob, 0);
else {
- bDeformGroup *dg= BLI_findlink(&ob->defbase, ob->actdef - 1);
+ bDeformGroup *dg = BLI_findlink(&ob->defbase, ob->actdef - 1);
if (dg == NULL) {
return OPERATOR_CANCELLED;
@@ -2420,7 +2222,7 @@ static int vertex_group_remove_from_exec(bContext *C, wmOperator *op)
}
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data);
return OPERATOR_FINISHED;
}
@@ -2430,6 +2232,7 @@ void OBJECT_OT_vertex_group_remove_from(wmOperatorType *ot)
/* identifiers */
ot->name = "Remove from Vertex Group";
ot->idname = "OBJECT_OT_vertex_group_remove_from";
+ ot->description = "Remove the selected vertices from the active vertex group";
/* api callbacks */
ot->poll = vertex_group_poll_edit_or_wpaint_vert_select;
@@ -2439,7 +2242,7 @@ void OBJECT_OT_vertex_group_remove_from(wmOperatorType *ot)
/* redo operator will fail in this case because vertex groups assignment
* isn't stored in local edit mode stack and toggling "all" property will lead to
* removing vertices from all groups (see [#29527], sergey) */
- ot->flag = /*OPTYPE_REGISTER|*/OPTYPE_UNDO;
+ ot->flag = /*OPTYPE_REGISTER|*/ OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "all", 0, "All", "Remove from all vertex groups");
@@ -2447,13 +2250,13 @@ void OBJECT_OT_vertex_group_remove_from(wmOperatorType *ot)
static int vertex_group_select_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *ob= ED_object_context(C);
+ Object *ob = ED_object_context(C);
if (!ob || ob->id.lib)
return OPERATOR_CANCELLED;
vgroup_select_verts(ob, 1);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, ob->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob->data);
return OPERATOR_FINISHED;
}
@@ -2463,21 +2266,22 @@ void OBJECT_OT_vertex_group_select(wmOperatorType *ot)
/* identifiers */
ot->name = "Select Vertex Group";
ot->idname = "OBJECT_OT_vertex_group_select";
+ ot->description = "Select all the vertices assigned to the active vertex group";
/* api callbacks */
ot->poll = vertex_group_poll_edit_or_wpaint_vert_select;
ot->exec = vertex_group_select_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int vertex_group_deselect_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *ob= ED_object_context(C);
+ Object *ob = ED_object_context(C);
vgroup_select_verts(ob, 0);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, ob->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob->data);
return OPERATOR_FINISHED;
}
@@ -2487,24 +2291,24 @@ void OBJECT_OT_vertex_group_deselect(wmOperatorType *ot)
/* identifiers */
ot->name = "Deselect Vertex Group";
ot->idname = "OBJECT_OT_vertex_group_deselect";
+ ot->description = "Deselect all selected vertices assigned to the active vertex group";
/* api callbacks */
ot->poll = vertex_group_poll_edit_or_wpaint_vert_select;
ot->exec = vertex_group_deselect_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
-/*Adds a copy of selected vertex group from source object to source object*/
static int vertex_group_copy_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *ob= ED_object_context(C);
+ Object *ob = ED_object_context(C);
vgroup_duplicate(ob);
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data);
return OPERATOR_FINISHED;
}
@@ -2514,27 +2318,28 @@ void OBJECT_OT_vertex_group_copy(wmOperatorType *ot)
/* identifiers */
ot->name = "Copy Vertex Group";
ot->idname = "OBJECT_OT_vertex_group_copy";
+ ot->description = "Make a copy of the active vertex group";
/* api callbacks */
ot->poll = vertex_group_poll;
ot->exec = vertex_group_copy_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int vertex_group_levels_exec(bContext *C, wmOperator *op)
{
- Object *ob= ED_object_context(C);
+ Object *ob = ED_object_context(C);
- float offset= RNA_float_get(op->ptr,"offset");
- float gain= RNA_float_get(op->ptr,"gain");
+ float offset = RNA_float_get(op->ptr, "offset");
+ float gain = RNA_float_get(op->ptr, "gain");
vgroup_levels(ob, offset, gain);
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data);
return OPERATOR_FINISHED;
}
@@ -2544,13 +2349,14 @@ void OBJECT_OT_vertex_group_levels(wmOperatorType *ot)
/* identifiers */
ot->name = "Vertex Group Levels";
ot->idname = "OBJECT_OT_vertex_group_levels";
+ ot->description = "Add some offset and multiply with some gain the weights of the active vertex group";
/* api callbacks */
ot->poll = vertex_group_poll;
ot->exec = vertex_group_levels_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_float(ot->srna, "offset", 0.f, -1.0, 1.0, "Offset", "Value to add to weights", -1.0f, 1.f);
RNA_def_float(ot->srna, "gain", 1.f, 0.f, FLT_MAX, "Gain", "Value to multiply weights by", 0.0f, 10.f);
@@ -2558,13 +2364,13 @@ void OBJECT_OT_vertex_group_levels(wmOperatorType *ot)
static int vertex_group_normalize_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *ob= ED_object_context(C);
+ Object *ob = ED_object_context(C);
vgroup_normalize(ob);
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data);
return OPERATOR_FINISHED;
}
@@ -2574,25 +2380,26 @@ void OBJECT_OT_vertex_group_normalize(wmOperatorType *ot)
/* identifiers */
ot->name = "Normalize Vertex Group";
ot->idname = "OBJECT_OT_vertex_group_normalize";
+ ot->description = "Normalize weights of the active vertex group, so that the highest ones are now 1.0";
/* api callbacks */
ot->poll = vertex_group_poll;
ot->exec = vertex_group_normalize_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int vertex_group_normalize_all_exec(bContext *C, wmOperator *op)
{
- Object *ob= ED_object_context(C);
- int lock_active= RNA_boolean_get(op->ptr,"lock_active");
+ Object *ob = ED_object_context(C);
+ int lock_active = RNA_boolean_get(op->ptr, "lock_active");
vgroup_normalize_all(ob, lock_active);
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data);
return OPERATOR_FINISHED;
}
@@ -2602,13 +2409,15 @@ void OBJECT_OT_vertex_group_normalize_all(wmOperatorType *ot)
/* identifiers */
ot->name = "Normalize All Vertex Groups";
ot->idname = "OBJECT_OT_vertex_group_normalize_all";
+ ot->description = "Normalize all weights of all vertex groups, "
+ "so that for each vertex, the sum of all weights is 1.0";
/* api callbacks */
ot->poll = vertex_group_poll;
ot->exec = vertex_group_normalize_all_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "lock_active", TRUE, "Lock Active",
"Keep the values of the active group while normalizing others");
@@ -2616,16 +2425,16 @@ void OBJECT_OT_vertex_group_normalize_all(wmOperatorType *ot)
static int vertex_group_fix_exec(bContext *C, wmOperator *op)
{
- Object *ob= CTX_data_active_object(C);
- Scene *scene= CTX_data_scene(C);
+ Object *ob = CTX_data_active_object(C);
+ Scene *scene = CTX_data_scene(C);
- float distToBe= RNA_float_get(op->ptr, "dist");
- float strength= RNA_float_get(op->ptr, "strength");
- float cp= RNA_float_get(op->ptr, "accuracy");
- ModifierData *md= ob->modifiers.first;
+ float distToBe = RNA_float_get(op->ptr, "dist");
+ float strength = RNA_float_get(op->ptr, "strength");
+ float cp = RNA_float_get(op->ptr, "accuracy");
+ ModifierData *md = ob->modifiers.first;
while (md) {
- if (md->type == eModifierType_Mirror && (md->mode&eModifierMode_Realtime)) {
+ if (md->type == eModifierType_Mirror && (md->mode & eModifierMode_Realtime)) {
break;
}
md = md->next;
@@ -2638,8 +2447,8 @@ static int vertex_group_fix_exec(bContext *C, wmOperator *op)
vgroup_fix(scene, ob, distToBe, strength, cp);
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data);
return OPERATOR_FINISHED;
}
@@ -2650,14 +2459,14 @@ void OBJECT_OT_vertex_group_fix(wmOperatorType *ot)
ot->name = "Fix Vertex Group Deform";
ot->idname = "OBJECT_OT_vertex_group_fix";
ot->description = "Modify the position of selected vertices by changing only their respective "
- "groups' weights (this tool may be slow for many vertices)";
+ "groups' weights (this tool may be slow for many vertices)";
/* api callbacks */
ot->poll = vertex_group_poll;
ot->exec = vertex_group_fix_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_float(ot->srna, "dist", 0.0f, -FLT_MAX, FLT_MAX, "Distance", "The distance to move to", -10.0f, 10.0f);
RNA_def_float(ot->srna, "strength", 1.f, -2.0f, FLT_MAX, "Strength",
"The distance moved can be changed by this multiplier", -2.0f, 2.0f);
@@ -2668,7 +2477,7 @@ void OBJECT_OT_vertex_group_fix(wmOperatorType *ot)
static int vertex_group_lock_exec(bContext *C, wmOperator *op)
{
- Object *ob= CTX_data_active_object(C);
+ Object *ob = CTX_data_active_object(C);
int action = RNA_enum_get(op->ptr, "action");
@@ -2682,27 +2491,28 @@ void OBJECT_OT_vertex_group_lock(wmOperatorType *ot)
/* identifiers */
ot->name = "Change the Lock On Vertex Groups";
ot->idname = "OBJECT_OT_vertex_group_lock";
+ ot->description = "Change the lock state of all vertex groups of active object";
/* api callbacks */
ot->poll = vertex_group_poll;
ot->exec = vertex_group_lock_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
WM_operator_properties_select_all(ot);
}
static int vertex_group_invert_exec(bContext *C, wmOperator *op)
{
- Object *ob= ED_object_context(C);
- int auto_assign= RNA_boolean_get(op->ptr,"auto_assign");
- int auto_remove= RNA_boolean_get(op->ptr,"auto_remove");
+ Object *ob = ED_object_context(C);
+ int auto_assign = RNA_boolean_get(op->ptr, "auto_assign");
+ int auto_remove = RNA_boolean_get(op->ptr, "auto_remove");
vgroup_invert(ob, auto_assign, auto_remove);
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data);
return OPERATOR_FINISHED;
}
@@ -2712,13 +2522,14 @@ void OBJECT_OT_vertex_group_invert(wmOperatorType *ot)
/* identifiers */
ot->name = "Invert Vertex Group";
ot->idname = "OBJECT_OT_vertex_group_invert";
+ ot->description = "Invert active vertex group's weights";
/* api callbacks */
ot->poll = vertex_group_poll;
ot->exec = vertex_group_invert_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "auto_assign", TRUE, "Add Weights",
"Add verts from groups that have zero weight before inverting");
@@ -2735,8 +2546,8 @@ static int vertex_group_blend_exec(bContext *C, wmOperator *op)
vgroup_blend(ob, fac);
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data);
return OPERATOR_FINISHED;
}
@@ -2745,7 +2556,7 @@ static int vertex_group_blend_exec(bContext *C, wmOperator *op)
static int vertex_group_blend_poll(bContext *C)
{
Object *ob = ED_object_context(C);
- ID *data = (ob) ? ob->data: NULL;
+ ID *data = (ob) ? ob->data : NULL;
if (!(ob && !ob->id.lib && data && !data->lib))
return FALSE;
@@ -2782,7 +2593,7 @@ void OBJECT_OT_vertex_group_blend(wmOperatorType *ot)
ot->exec = vertex_group_blend_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
prop = RNA_def_property(ot->srna, "factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_ui_text(prop, "Factor", "");
@@ -2793,18 +2604,18 @@ void OBJECT_OT_vertex_group_blend(wmOperatorType *ot)
static int vertex_group_clean_exec(bContext *C, wmOperator *op)
{
- Object *ob= ED_object_context(C);
+ Object *ob = ED_object_context(C);
- float limit= RNA_float_get(op->ptr,"limit");
- int all_groups= RNA_boolean_get(op->ptr,"all_groups");
- int keep_single= RNA_boolean_get(op->ptr,"keep_single");
+ float limit = RNA_float_get(op->ptr, "limit");
+ int all_groups = RNA_boolean_get(op->ptr, "all_groups");
+ int keep_single = RNA_boolean_get(op->ptr, "keep_single");
- if (all_groups) vgroup_clean_all(ob, limit, keep_single);
- else vgroup_clean(ob, limit, keep_single);
+ if (all_groups) vgroup_clean_all(ob, limit, keep_single);
+ else vgroup_clean(ob, limit, keep_single);
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data);
return OPERATOR_FINISHED;
}
@@ -2821,7 +2632,7 @@ void OBJECT_OT_vertex_group_clean(wmOperatorType *ot)
ot->exec = vertex_group_clean_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_float(ot->srna, "limit", 0.01f, 0.0f, 1.0, "Limit", "Remove weights under this limit", 0.001f, 0.99f);
RNA_def_boolean(ot->srna, "all_groups", FALSE, "All Groups", "Clean all vertex groups");
@@ -2832,16 +2643,16 @@ void OBJECT_OT_vertex_group_clean(wmOperatorType *ot)
static int vertex_group_mirror_exec(bContext *C, wmOperator *op)
{
- Object *ob= ED_object_context(C);
+ Object *ob = ED_object_context(C);
ED_vgroup_mirror(ob,
- RNA_boolean_get(op->ptr,"mirror_weights"),
- RNA_boolean_get(op->ptr,"flip_group_names"),
- RNA_boolean_get(op->ptr,"all_groups"));
+ RNA_boolean_get(op->ptr, "mirror_weights"),
+ RNA_boolean_get(op->ptr, "flip_group_names"),
+ RNA_boolean_get(op->ptr, "all_groups"));
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data);
return OPERATOR_FINISHED;
}
@@ -2852,14 +2663,14 @@ void OBJECT_OT_vertex_group_mirror(wmOperatorType *ot)
ot->name = "Mirror Vertex Group";
ot->idname = "OBJECT_OT_vertex_group_mirror";
ot->description = "Mirror all vertex groups, flip weights and/or names, editing only selected vertices, "
- "flipping when both sides are selected otherwise copy from unselected";
+ "flipping when both sides are selected otherwise copy from unselected";
/* api callbacks */
ot->poll = vertex_group_poll;
ot->exec = vertex_group_mirror_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "mirror_weights", TRUE, "Mirror Weights", "Mirror weights");
@@ -2870,21 +2681,21 @@ void OBJECT_OT_vertex_group_mirror(wmOperatorType *ot)
static int vertex_group_copy_to_linked_exec(bContext *C, wmOperator *UNUSED(op))
{
- Scene *scene= CTX_data_scene(C);
- Object *ob= ED_object_context(C);
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = ED_object_context(C);
Base *base;
- int retval= OPERATOR_CANCELLED;
+ int retval = OPERATOR_CANCELLED;
- for (base=scene->base.first; base; base= base->next) {
- if (base->object->type==ob->type) {
- if (base->object!=ob && base->object->data==ob->data) {
+ for (base = scene->base.first; base; base = base->next) {
+ if (base->object->type == ob->type) {
+ if (base->object != ob && base->object->data == ob->data) {
BLI_freelistN(&base->object->defbase);
BLI_duplicatelist(&base->object->defbase, &ob->defbase);
- base->object->actdef= ob->actdef;
+ base->object->actdef = ob->actdef;
DAG_id_tag_update(&base->object->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, base->object);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, base->object->data);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, base->object);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, base->object->data);
retval = OPERATOR_FINISHED;
}
@@ -2906,21 +2717,20 @@ void OBJECT_OT_vertex_group_copy_to_linked(wmOperatorType *ot)
ot->exec = vertex_group_copy_to_linked_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
-/*Copy vertex groups from source to target*/ /*warning! overwrites list*/
static int vertex_group_copy_to_selected_exec(bContext *C, wmOperator *op)
{
- Object *obact= ED_object_context(C);
- int change= 0;
- int fail= 0;
+ Object *obact = ED_object_context(C);
+ int change = 0;
+ int fail = 0;
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects)
+ CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
{
if (obact != ob) {
if (ED_vgroup_copy_array(ob, obact)) change++;
- else fail++;
+ else fail++;
}
}
CTX_DATA_END;
@@ -2934,112 +2744,61 @@ static int vertex_group_copy_to_selected_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-/* Transfer all vertex groups with weight to selected*/
-void OBJECT_OT_vertex_group_copy_to_selected(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Copy Vertex Group to Selected";
- ot->idname= "OBJECT_OT_vertex_group_copy_to_selected";
- ot->description= "Copy Vertex Groups to other selected objects with matching indices";
-
- /* api callbacks */
- ot->poll= vertex_group_poll;
- ot->exec= vertex_group_copy_to_selected_exec;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
-static int vertex_group_copy_to_selected_single_exec(bContext *C, wmOperator *op)
-{
- Object *obact= CTX_data_active_object(C);
- int change= 0;
- int fail= 0;
-
- /*Macro to loop through selected objects and perform operation*/
- CTX_DATA_BEGIN(C, Object*, obslc, selected_editable_objects)
- {
- if(obact != obslc) {
- /*Try function for matching number of vertices*/
- if(ED_vgroup_copy_single(obslc, obact)) change++;
- /*Try function for get weight from closest vertex*/
- /*TODO: try this function*/
- /*Try function for get weight from closest face*/
- else if(ED_vgroup_copy_by_nearest_face_single(obslc, obact)) change++;
- /*Trigger error message*/
- else fail++;
- /*Event notifiers for correct display of data*/
- DAG_id_tag_update(&obslc->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, obslc);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obslc->data);
- }
- }
- CTX_DATA_END;
-
- /*Report error when task can not be completed with available functions.*/
- if((change == 0 && fail == 0) || fail) {
- BKE_reportf(op->reports, RPT_ERROR,
- "Copy to VGroups to Selected warning done %d, failed %d, All functions failed!",
- change, fail);
- }
- return OPERATOR_FINISHED;
-}
-
-/*Transfer vertex group with weight to selected*/
-void OBJECT_OT_vertex_group_copy_to_selected_single(wmOperatorType *ot)
+void OBJECT_OT_vertex_group_copy_to_selected(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Copy a Vertex Group to Selected";
- ot->idname= "OBJECT_OT_vertex_group_copy_to_selected_single";
- ot->description= "Copy a vertex group to other selected objects with matching indices";
+ ot->name = "Copy Vertex Group to Selected";
+ ot->idname = "OBJECT_OT_vertex_group_copy_to_selected";
+ ot->description = "Copy Vertex Groups to other selected objects with matching indices";
/* api callbacks */
- ot->poll= vertex_group_poll;
- ot->exec= vertex_group_copy_to_selected_single_exec;
+ ot->poll = vertex_group_poll;
+ ot->exec = vertex_group_copy_to_selected_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
-static EnumPropertyItem vgroup_items[]= {
- {0, NULL, 0, NULL, NULL}};
+static EnumPropertyItem vgroup_items[] = {
+ {0, NULL, 0, NULL, NULL}
+};
static int set_active_group_exec(bContext *C, wmOperator *op)
{
- Object *ob= ED_object_context(C);
- int nr= RNA_enum_get(op->ptr, "group");
+ Object *ob = ED_object_context(C);
+ int nr = RNA_enum_get(op->ptr, "group");
- BLI_assert(nr+1 >= 0);
- ob->actdef= nr+1;
+ BLI_assert(nr + 1 >= 0);
+ ob->actdef = nr + 1;
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob);
return OPERATOR_FINISHED;
}
static EnumPropertyItem *vgroup_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
{
- Object *ob= ED_object_context(C);
+ Object *ob = ED_object_context(C);
EnumPropertyItem tmp = {0, "", 0, "", ""};
- EnumPropertyItem *item= NULL;
+ EnumPropertyItem *item = NULL;
bDeformGroup *def;
- int a, totitem= 0;
+ int a, totitem = 0;
if (!ob)
return vgroup_items;
- for (a=0, def=ob->defbase.first; def; def=def->next, a++) {
- tmp.value= a;
- tmp.icon= ICON_GROUP_VERTEX;
- tmp.identifier= def->name;
- tmp.name= def->name;
+ for (a = 0, def = ob->defbase.first; def; def = def->next, a++) {
+ tmp.value = a;
+ tmp.icon = ICON_GROUP_VERTEX;
+ tmp.identifier = def->name;
+ tmp.name = def->name;
RNA_enum_item_add(&item, &totitem, &tmp);
}
RNA_enum_item_end(&item, &totitem);
- *free= 1;
+ *free = 1;
return item;
}
@@ -3059,10 +2818,10 @@ void OBJECT_OT_vertex_group_set_active(wmOperatorType *ot)
ot->invoke = WM_menu_invoke;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
- prop= RNA_def_enum(ot->srna, "group", vgroup_items, 0, "Group", "Vertex group to set as active");
+ prop = RNA_def_enum(ot->srna, "group", vgroup_items, 0, "Group", "Vertex group to set as active");
RNA_def_enum_funcs(prop, vgroup_itemf);
ot->prop = prop;
}
@@ -3073,11 +2832,11 @@ static char *vgroup_init_remap(Object *ob)
{
bDeformGroup *def;
int defbase_tot = BLI_countlist(&ob->defbase);
- char *name_array= MEM_mallocN(MAX_VGROUP_NAME * sizeof(char) * defbase_tot, "sort vgroups");
+ char *name_array = MEM_mallocN(MAX_VGROUP_NAME * sizeof(char) * defbase_tot, "sort vgroups");
char *name;
- name= name_array;
- for (def = ob->defbase.first; def; def=def->next) {
+ name = name_array;
+ for (def = ob->defbase.first; def; def = def->next) {
BLI_strncpy(name, def->name, MAX_VGROUP_NAME);
name += MAX_VGROUP_NAME;
}
@@ -3087,33 +2846,33 @@ static char *vgroup_init_remap(Object *ob)
static int vgroup_do_remap(Object *ob, char *name_array, wmOperator *op)
{
- MDeformVert *dvert= NULL;
+ MDeformVert *dvert = NULL;
bDeformGroup *def;
int defbase_tot = BLI_countlist(&ob->defbase);
/* needs a dummy index at the start*/
- int *sort_map_update= MEM_mallocN(sizeof(int) * (defbase_tot + 1), "sort vgroups");
- int *sort_map= sort_map_update + 1;
+ int *sort_map_update = MEM_mallocN(sizeof(int) * (defbase_tot + 1), "sort vgroups");
+ int *sort_map = sort_map_update + 1;
char *name;
int i;
- name= name_array;
- for (def= ob->defbase.first, i=0; def; def=def->next, i++) {
- sort_map[i]= BLI_findstringindex(&ob->defbase, name, offsetof(bDeformGroup, name));
+ name = name_array;
+ for (def = ob->defbase.first, i = 0; def; def = def->next, i++) {
+ sort_map[i] = BLI_findstringindex(&ob->defbase, name, offsetof(bDeformGroup, name));
name += MAX_VGROUP_NAME;
BLI_assert(sort_map[i] != -1);
}
if (ob->mode == OB_MODE_EDIT) {
- if (ob->type==OB_MESH) {
+ if (ob->type == OB_MESH) {
BMEditMesh *em = BMEdit_FromObject(ob);
BMIter iter;
BMVert *eve;
BM_ITER_MESH (eve, &iter, em->bm, BM_VERTS_OF_MESH) {
- dvert= CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT);
+ dvert = CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT);
if (dvert && dvert->totweight) {
defvert_remap(dvert, sort_map, defbase_tot);
}
@@ -3126,7 +2885,7 @@ static int vgroup_do_remap(Object *ob, char *name_array, wmOperator *op)
}
}
else {
- int dvert_tot=0;
+ int dvert_tot = 0;
ED_vgroup_give_array(ob->data, &dvert, &dvert_tot);
@@ -3139,14 +2898,14 @@ static int vgroup_do_remap(Object *ob, char *name_array, wmOperator *op)
}
/* update users */
- for (i=0; i<defbase_tot; i++)
+ for (i = 0; i < defbase_tot; i++)
sort_map[i]++;
- sort_map_update[0]= 0;
+ sort_map_update[0] = 0;
vgroup_remap_update_users(ob, sort_map_update);
BLI_assert(sort_map_update[ob->actdef] >= 0);
- ob->actdef= sort_map_update[ob->actdef];
+ ob->actdef = sort_map_update[ob->actdef];
MEM_freeN(sort_map_update);
@@ -3155,15 +2914,15 @@ static int vgroup_do_remap(Object *ob, char *name_array, wmOperator *op)
static int vgroup_sort(void *def_a_ptr, void *def_b_ptr)
{
- bDeformGroup *def_a= (bDeformGroup *)def_a_ptr;
- bDeformGroup *def_b= (bDeformGroup *)def_b_ptr;
+ bDeformGroup *def_a = (bDeformGroup *)def_a_ptr;
+ bDeformGroup *def_b = (bDeformGroup *)def_b_ptr;
return BLI_natstrcmp(def_a->name, def_b->name);
}
static int vertex_group_sort_exec(bContext *C, wmOperator *op)
{
- Object *ob= ED_object_context(C);
+ Object *ob = ED_object_context(C);
char *name_array;
int ret;
@@ -3178,7 +2937,7 @@ static int vertex_group_sort_exec(bContext *C, wmOperator *op)
if (ret != OPERATOR_CANCELLED) {
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob);
}
if (name_array) MEM_freeN(name_array);
@@ -3197,15 +2956,15 @@ void OBJECT_OT_vertex_group_sort(wmOperatorType *ot)
ot->exec = vertex_group_sort_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int vgroup_move_exec(bContext *C, wmOperator *op)
{
- Object *ob= ED_object_context(C);
+ Object *ob = ED_object_context(C);
bDeformGroup *def;
char *name_array;
- int dir= RNA_enum_get(op->ptr, "direction"), ret;
+ int dir = RNA_enum_get(op->ptr, "direction"), ret;
def = BLI_findlink(&ob->defbase, ob->actdef - 1);
if (!def) {
@@ -3233,7 +2992,7 @@ static int vgroup_move_exec(bContext *C, wmOperator *op)
if (ret != OPERATOR_CANCELLED) {
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob);
}
return ret;
@@ -3250,13 +3009,14 @@ void OBJECT_OT_vertex_group_move(wmOperatorType *ot)
/* identifiers */
ot->name = "Move Vertex Group";
ot->idname = "OBJECT_OT_vertex_group_move";
+ ot->description = "Move the active vertex group up/down in the list";
/* api callbacks */
ot->poll = vertex_group_poll;
ot->exec = vgroup_move_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_enum(ot->srna, "direction", vgroup_slot_move, 0, "Direction", "Direction to move, UP or DOWN");
}
diff --git a/source/blender/editors/physics/dynamicpaint_ops.c b/source/blender/editors/physics/dynamicpaint_ops.c
index 417cddb74fe..c82e0459218 100644
--- a/source/blender/editors/physics/dynamicpaint_ops.c
+++ b/source/blender/editors/physics/dynamicpaint_ops.c
@@ -291,8 +291,7 @@ static int dynamicPaint_bakeImageSequence(bContext *C, DynamicPaintSurface *surf
if (!dynamicPaint_createUVSurface(surface)) return 0;
/* Loop through selected frames */
- for (frame=surface->start_frame; frame<=surface->end_frame; frame++)
- {
+ for (frame=surface->start_frame; frame<=surface->end_frame; frame++) {
float progress = (frame - surface->start_frame) / (float)frames * 100;
surface->current_frame = frame;
diff --git a/source/blender/editors/physics/particle_boids.c b/source/blender/editors/physics/particle_boids.c
index 7a7c16b23ff..23ce4776b73 100644
--- a/source/blender/editors/physics/particle_boids.c
+++ b/source/blender/editors/physics/particle_boids.c
@@ -145,6 +145,7 @@ void BOID_OT_rule_del(wmOperatorType *ot)
/* identifiers */
ot->name = "Remove Boid Rule";
ot->idname = "BOID_OT_rule_del";
+ ot->description = "Delete current boid rule";
/* api callbacks */
ot->exec = rule_del_exec;
@@ -318,6 +319,7 @@ void BOID_OT_state_del(wmOperatorType *ot)
/* identifiers */
ot->name = "Remove Boid State";
ot->idname = "BOID_OT_state_del";
+ ot->description = "Delete current boid state";
/* api callbacks */
ot->exec = state_del_exec;
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index 5f22165176b..64f4ffe4881 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -45,7 +45,9 @@
#include "DNA_space_types.h"
#include "BLI_math.h"
-#include "BLI_blenlib.h"
+#include "BLI_lasso.h"
+#include "BLI_listbase.h"
+#include "BLI_string.h"
#include "BLI_dynstr.h"
#include "BLI_kdtree.h"
#include "BLI_rand.h"
@@ -213,7 +215,7 @@ static PTCacheEdit *pe_get_current(Scene *scene, Object *ob, int create)
/* in the case of only one editable thing, set pset->edittype accordingly */
if (pidlist.first && pidlist.first == pidlist.last) {
pid = pidlist.first;
- switch(pid->type) {
+ switch (pid->type) {
case PTCACHE_TYPE_PARTICLES:
pset->edittype = PE_TYPE_PARTICLES;
break;
@@ -401,7 +403,7 @@ static int key_test_depth(PEData *data, const float co[3])
View3D *v3d= data->vc.v3d;
double ux, uy, uz;
float depth;
- short wco[3], x,y;
+ short wco[3], x, y;
/* nothing to do */
if ((v3d->drawtype<=OB_WIRE) || (v3d->flag & V3D_ZBUF_SELECT)==0)
@@ -412,7 +414,7 @@ static int key_test_depth(PEData *data, const float co[3])
if (wco[0] == IS_CLIPPED)
return 0;
- gluProject(co[0],co[1],co[2], data->mats.modelview, data->mats.projection,
+ gluProject(co[0], co[1], co[2], data->mats.modelview, data->mats.projection,
(GLint *)data->mats.viewport, &ux, &uy, &uz);
x=wco[0];
@@ -471,14 +473,16 @@ static int key_inside_rect(PEData *data, const float co[3])
{
int sco[2];
- project_int(data->vc.ar, co,sco);
+ project_int(data->vc.ar, co, sco);
if (sco[0] == IS_CLIPPED)
return 0;
-
+
if (sco[0] > data->rect->xmin && sco[0] < data->rect->xmax &&
- sco[1] > data->rect->ymin && sco[1] < data->rect->ymax)
+ sco[1] > data->rect->ymin && sco[1] < data->rect->ymax)
+ {
return key_test_depth(data, co);
+ }
return 0;
}
@@ -618,7 +622,7 @@ static void foreach_mouse_hit_key(PEData *data, ForKeyMatFunc func, int selected
if (key_inside_circle(data, data->rad, KEY_WCO, &data->dist)) {
if (edit->psys && !(edit->psys->flag & PSYS_GLOBAL_HAIR)) {
psys_mat_hair_to_global(data->ob, psmd->dm, psys->part->from, psys->particles + p, mat);
- invert_m4_m4(imat,mat);
+ invert_m4_m4(imat, mat);
}
func(data, mat, imat, p, point->totkey-1, key);
@@ -632,7 +636,7 @@ static void foreach_mouse_hit_key(PEData *data, ForKeyMatFunc func, int selected
if (key_inside_circle(data, data->rad, KEY_WCO, &data->dist)) {
if (edit->psys && !(edit->psys->flag & PSYS_GLOBAL_HAIR)) {
psys_mat_hair_to_global(data->ob, psmd->dm, psys->part->from, psys->particles + p, mat);
- invert_m4_m4(imat,mat);
+ invert_m4_m4(imat, mat);
}
func(data, mat, imat, p, k, key);
@@ -898,7 +902,7 @@ static void pe_deflect_emitter(Scene *scene, Object *ob, PTCacheEdit *edit)
return;
psys = edit->psys;
- psmd = psys_get_modifier(ob,psys);
+ psmd = psys_get_modifier(ob, psys);
if (!psmd->dm)
return;
@@ -916,26 +920,26 @@ static void pe_deflect_emitter(Scene *scene, Object *ob, PTCacheEdit *edit)
dist_1st *= 0.75f * pset->emitterdist;
}
else {
- index= BLI_kdtree_find_nearest(edit->emitter_field,key->co,NULL,NULL);
+ index= BLI_kdtree_find_nearest(edit->emitter_field, key->co, NULL, NULL);
vec=edit->emitter_cosnos +index*6;
nor=vec+3;
sub_v3_v3v3(dvec, key->co, vec);
- dot=dot_v3v3(dvec,nor);
- copy_v3_v3(dvec,nor);
+ dot=dot_v3v3(dvec, nor);
+ copy_v3_v3(dvec, nor);
if (dot>0.0f) {
if (dot<dist_1st) {
normalize_v3(dvec);
- mul_v3_fl(dvec,dist_1st-dot);
+ mul_v3_fl(dvec, dist_1st-dot);
add_v3_v3(key->co, dvec);
}
}
else {
normalize_v3(dvec);
- mul_v3_fl(dvec,dist_1st-dot);
+ mul_v3_fl(dvec, dist_1st-dot);
add_v3_v3(key->co, dvec);
}
if (k==1)
@@ -943,7 +947,7 @@ static void pe_deflect_emitter(Scene *scene, Object *ob, PTCacheEdit *edit)
}
}
- invert_m4_m4(hairimat,hairmat);
+ invert_m4_m4(hairimat, hairmat);
LOOP_KEYS {
mul_m4_v3(hairimat, key->co);
@@ -1049,7 +1053,7 @@ static void recalc_lengths(PTCacheEdit *edit)
/* calculate a tree for finding nearest emitter's vertice */
static void recalc_emitter_field(Object *ob, ParticleSystem *psys)
{
- DerivedMesh *dm=psys_get_modifier(ob,psys)->dm;
+ DerivedMesh *dm=psys_get_modifier(ob, psys)->dm;
PTCacheEdit *edit= psys->edit;
float *vec, *nor;
int i, totface /*, totvert*/;
@@ -1065,7 +1069,7 @@ static void recalc_emitter_field(Object *ob, ParticleSystem *psys)
totface=dm->getNumTessFaces(dm);
/*totvert=dm->getNumVerts(dm);*/ /*UNSUED*/
- edit->emitter_cosnos=MEM_callocN(totface*6*sizeof(float),"emitter cosnos");
+ edit->emitter_cosnos=MEM_callocN(totface*6*sizeof(float), "emitter cosnos");
edit->emitter_field= BLI_kdtree_new(totface);
@@ -1073,30 +1077,30 @@ static void recalc_emitter_field(Object *ob, ParticleSystem *psys)
nor=vec+3;
for (i=0; i<totface; i++, vec+=6, nor+=6) {
- MFace *mface=dm->getTessFaceData(dm,i,CD_MFACE);
+ MFace *mface=dm->getTessFaceData(dm, i, CD_MFACE);
MVert *mvert;
- mvert=dm->getVertData(dm,mface->v1,CD_MVERT);
- copy_v3_v3(vec,mvert->co);
- VECCOPY(nor,mvert->no);
+ mvert=dm->getVertData(dm, mface->v1, CD_MVERT);
+ copy_v3_v3(vec, mvert->co);
+ VECCOPY(nor, mvert->no);
- mvert=dm->getVertData(dm,mface->v2,CD_MVERT);
- add_v3_v3v3(vec,vec,mvert->co);
- VECADD(nor,nor,mvert->no);
+ mvert=dm->getVertData(dm, mface->v2, CD_MVERT);
+ add_v3_v3v3(vec, vec, mvert->co);
+ VECADD(nor, nor, mvert->no);
- mvert=dm->getVertData(dm,mface->v3,CD_MVERT);
- add_v3_v3v3(vec,vec,mvert->co);
- VECADD(nor,nor,mvert->no);
+ mvert=dm->getVertData(dm, mface->v3, CD_MVERT);
+ add_v3_v3v3(vec, vec, mvert->co);
+ VECADD(nor, nor, mvert->no);
if (mface->v4) {
- mvert=dm->getVertData(dm,mface->v4,CD_MVERT);
- add_v3_v3v3(vec,vec,mvert->co);
- VECADD(nor,nor,mvert->no);
+ mvert=dm->getVertData(dm, mface->v4, CD_MVERT);
+ add_v3_v3v3(vec, vec, mvert->co);
+ VECADD(nor, nor, mvert->no);
- mul_v3_fl(vec,0.25);
+ mul_v3_fl(vec, 0.25);
}
else
- mul_v3_fl(vec,0.3333f);
+ mul_v3_fl(vec, 0.3333f);
normalize_v3(nor);
@@ -1150,7 +1154,7 @@ static void update_world_cos(Object *ob, PTCacheEdit *edit)
psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, psys->particles+p, hairmat);
LOOP_KEYS {
- copy_v3_v3(key->world_co,key->co);
+ copy_v3_v3(key->world_co, key->co);
if (!(psys->flag & PSYS_GLOBAL_HAIR))
mul_m4_v3(hairmat, key->world_co);
}
@@ -1235,7 +1239,7 @@ void PE_update_object(Scene *scene, Object *ob, int useflag)
pe_deflect_emitter(scene, ob, edit);
PE_apply_lengths(scene, edit);
if (pe_x_mirror(ob))
- PE_apply_mirror(ob,edit->psys);
+ PE_apply_mirror(ob, edit->psys);
if (edit->psys)
update_world_cos(ob, edit);
if (pset->flag & PE_AUTO_VELOCITY)
@@ -1363,6 +1367,7 @@ void PARTICLE_OT_select_all(wmOperatorType *ot)
/* identifiers */
ot->name = "(De)select All";
ot->idname = "PARTICLE_OT_select_all";
+ ot->description = "(De)select all particles' keys";
/* api callbacks */
ot->exec = pe_select_all_exec;
@@ -1437,6 +1442,7 @@ void PARTICLE_OT_select_roots(wmOperatorType *ot)
/* identifiers */
ot->name = "Select Roots";
ot->idname = "PARTICLE_OT_select_roots";
+ ot->description = "Select roots of all visible particles";
/* api callbacks */
ot->exec = select_roots_exec;
@@ -1477,7 +1483,8 @@ void PARTICLE_OT_select_tips(wmOperatorType *ot)
/* identifiers */
ot->name = "Select Tips";
ot->idname = "PARTICLE_OT_select_tips";
-
+ ot->description = "Select tips of all visible particles";
+
/* api callbacks */
ot->exec = select_tips_exec;
ot->poll = PE_poll;
@@ -1521,6 +1528,7 @@ void PARTICLE_OT_select_linked(wmOperatorType *ot)
/* identifiers */
ot->name = "Select Linked";
ot->idname = "PARTICLE_OT_select_linked";
+ ot->description = "Select nearest particle from mouse pointer";
/* api callbacks */
ot->exec = select_linked_exec;
@@ -1633,7 +1641,9 @@ int PE_lasso_select(bContext *C, int mcords[][2], short moves, short extend, sho
copy_v3_v3(co, key->co);
mul_m4_v3(mat, co);
project_int(ar, co, vertco);
- if ((vertco[0] != IS_CLIPPED) && lasso_inside(mcords,moves,vertco[0],vertco[1]) && key_test_depth(&data, co)) {
+ if (BLI_lasso_is_point_inside(mcords, moves, vertco[0], vertco[1], IS_CLIPPED) &&
+ key_test_depth(&data, co))
+ {
if (select && !(key->flag & PEK_SELECT)) {
key->flag |= PEK_SELECT;
point->flag |= PEP_EDIT_RECALC;
@@ -1650,8 +1660,10 @@ int PE_lasso_select(bContext *C, int mcords[][2], short moves, short extend, sho
copy_v3_v3(co, key->co);
mul_m4_v3(mat, co);
- project_int(ar, co,vertco);
- if ((vertco[0] != IS_CLIPPED) && lasso_inside(mcords,moves,vertco[0],vertco[1]) && key_test_depth(&data, co)) {
+ project_int(ar, co, vertco);
+ if (BLI_lasso_is_point_inside(mcords, moves, vertco[0], vertco[1], IS_CLIPPED) &&
+ key_test_depth(&data, co))
+ {
if (select && !(key->flag & PEK_SELECT)) {
key->flag |= PEK_SELECT;
point->flag |= PEP_EDIT_RECALC;
@@ -1709,6 +1721,7 @@ void PARTICLE_OT_hide(wmOperatorType *ot)
/* identifiers */
ot->name = "Hide Selected";
ot->idname = "PARTICLE_OT_hide";
+ ot->description = "Hide selected particles";
/* api callbacks */
ot->exec = hide_exec;
@@ -1751,6 +1764,7 @@ void PARTICLE_OT_reveal(wmOperatorType *ot)
/* identifiers */
ot->name = "Reveal";
ot->idname = "PARTICLE_OT_reveal";
+ ot->description = "Show hidden particles";
/* api callbacks */
ot->exec = reveal_exec;
@@ -1809,6 +1823,7 @@ void PARTICLE_OT_select_less(wmOperatorType *ot)
/* identifiers */
ot->name = "Select Less";
ot->idname = "PARTICLE_OT_select_less";
+ ot->description = "Deselect boundary selected keys of each particle";
/* api callbacks */
ot->exec = select_less_exec;
@@ -1870,6 +1885,7 @@ void PARTICLE_OT_select_more(wmOperatorType *ot)
/* identifiers */
ot->name = "Select More";
ot->idname = "PARTICLE_OT_select_more";
+ ot->description = "Select keys linked to boundary selected keys of each particle";
/* api callbacks */
ot->exec = select_more_exec;
@@ -1900,7 +1916,7 @@ static void rekey_particle(PEData *data, int pa_index)
pa->flag |= PARS_REKEY;
- key= new_keys= MEM_callocN(data->totrekey * sizeof(HairKey),"Hair re-key keys");
+ key= new_keys= MEM_callocN(data->totrekey * sizeof(HairKey), "Hair re-key keys");
okey = pa->hair;
/* root and tip stay the same */
@@ -1912,7 +1928,7 @@ static void rekey_particle(PEData *data, int pa_index)
dval= (end - sta) / (float)(data->totrekey - 1);
/* interpolate new keys from old ones */
- for (k=1,key++; k<data->totrekey-1; k++,key++) {
+ for (k=1, key++; k<data->totrekey-1; k++, key++) {
state.time= (float)k / (float)(data->totrekey-1);
psys_get_particle_on_path(&sim, pa_index, &state, 0);
copy_v3_v3(key->co, state.co);
@@ -1929,7 +1945,7 @@ static void rekey_particle(PEData *data, int pa_index)
if (point->keys)
MEM_freeN(point->keys);
- ekey= point->keys= MEM_callocN(pa->totkey * sizeof(PTCacheEditKey),"Hair re-key edit keys");
+ ekey= point->keys= MEM_callocN(pa->totkey * sizeof(PTCacheEditKey), "Hair re-key edit keys");
for (k=0, key=pa->hair; k<pa->totkey; k++, key++, ekey++) {
ekey->co= key->co;
@@ -1966,6 +1982,7 @@ void PARTICLE_OT_rekey(wmOperatorType *ot)
/* identifiers */
ot->name = "Rekey";
ot->idname = "PARTICLE_OT_rekey";
+ ot->description = "Change the number of keys of selected particles (root and tip keys included)";
/* api callbacks */
ot->exec = rekey_exec;
@@ -2215,7 +2232,7 @@ static void subdivide_particle(PEData *data, int pa_index)
sim.ob= data->ob;
sim.psys= edit->psys;
- for (k=0, ekey=point->keys; k<pa->totkey-1; k++,ekey++) {
+ for (k=0, ekey=point->keys; k<pa->totkey-1; k++, ekey++) {
if (ekey->flag&PEK_SELECT && (ekey+1)->flag&PEK_SELECT)
totnewkey++;
}
@@ -2224,16 +2241,16 @@ static void subdivide_particle(PEData *data, int pa_index)
pa->flag |= PARS_REKEY;
- nkey= new_keys= MEM_callocN((pa->totkey+totnewkey)*(sizeof(HairKey)),"Hair subdivide keys");
- nekey= new_ekeys= MEM_callocN((pa->totkey+totnewkey)*(sizeof(PTCacheEditKey)),"Hair subdivide edit keys");
+ nkey= new_keys= MEM_callocN((pa->totkey+totnewkey)*(sizeof(HairKey)), "Hair subdivide keys");
+ nekey= new_ekeys= MEM_callocN((pa->totkey+totnewkey)*(sizeof(PTCacheEditKey)), "Hair subdivide edit keys");
key = pa->hair;
endtime= key[pa->totkey-1].time;
for (k=0, ekey=point->keys; k<pa->totkey-1; k++, key++, ekey++) {
- memcpy(nkey,key,sizeof(HairKey));
- memcpy(nekey,ekey,sizeof(PTCacheEditKey));
+ memcpy(nkey, key, sizeof(HairKey));
+ memcpy(nekey, ekey, sizeof(PTCacheEditKey));
nekey->co= nkey->co;
nekey->time= &nkey->time;
@@ -2258,8 +2275,8 @@ static void subdivide_particle(PEData *data, int pa_index)
}
}
/*tip still not copied*/
- memcpy(nkey,key,sizeof(HairKey));
- memcpy(nekey,ekey,sizeof(PTCacheEditKey));
+ memcpy(nkey, key, sizeof(HairKey));
+ memcpy(nekey, ekey, sizeof(PTCacheEditKey));
nekey->co= nkey->co;
nekey->time= &nkey->time;
@@ -2296,6 +2313,7 @@ void PARTICLE_OT_subdivide(wmOperatorType *ot)
/* identifiers */
ot->name = "Subdivide";
ot->idname = "PARTICLE_OT_subdivide";
+ ot->description = "Subdivide selected particles segments (adds keys)";
/* api callbacks */
ot->exec = subdivide_exec;
@@ -2348,7 +2366,7 @@ static int remove_doubles_exec(bContext *C, wmOperator *op)
copy_v3_v3(co, point->keys->co);
mul_m4_v3(mat, co);
- totn= BLI_kdtree_find_n_nearest(tree,10,co,NULL,nearest);
+ totn= BLI_kdtree_find_n_nearest(tree, 10, co, NULL, nearest);
for (n=0; n<totn; n++) {
/* this needs a custom threshold still */
@@ -2384,6 +2402,7 @@ void PARTICLE_OT_remove_doubles(wmOperatorType *ot)
/* identifiers */
ot->name = "Remove Doubles";
ot->idname = "PARTICLE_OT_remove_doubles";
+ ot->description = "Remove selected particles close enough of others";
/* api callbacks */
ot->exec = remove_doubles_exec;
@@ -2434,6 +2453,7 @@ void PARTICLE_OT_weight_set(wmOperatorType *ot)
/* identifiers */
ot->name = "Weight Set";
ot->idname = "PARTICLE_OT_weight_set";
+ ot->description = "Set the weight of selected keys";
/* api callbacks */
ot->exec = weight_set_exec;
@@ -2442,7 +2462,8 @@ void PARTICLE_OT_weight_set(wmOperatorType *ot)
/* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
- RNA_def_float(ot->srna, "factor", 1, 0, 1, "Factor", "", 0, 1);
+ RNA_def_float(ot->srna, "factor", 1, 0, 1, "Factor",
+ "Interpolation factor between current brush weight, and keys' weights", 0, 1);
}
/************************ cursor drawing *******************************/
@@ -2463,11 +2484,11 @@ static void brush_drawcursor(bContext *C, int x, int y, void *UNUSED(customdata)
glTranslatef((float)x, (float)y, 0.0f);
glColor4ub(255, 255, 255, 128);
- glEnable(GL_LINE_SMOOTH );
+ glEnable(GL_LINE_SMOOTH);
glEnable(GL_BLEND);
glutil_draw_lined_arc(0.0, M_PI*2.0, brush->size, 40);
glDisable(GL_BLEND);
- glDisable(GL_LINE_SMOOTH );
+ glDisable(GL_LINE_SMOOTH);
glPopMatrix();
}
@@ -2537,6 +2558,7 @@ void PARTICLE_OT_delete(wmOperatorType *ot)
/* identifiers */
ot->name = "Delete";
ot->idname = "PARTICLE_OT_delete";
+ ot->description = "Delete selected particles or keys";
/* api callbacks */
ot->exec = delete_exec;
@@ -2658,7 +2680,7 @@ static void PE_mirror_x(Scene *scene, Object *ob, int tagged)
/* assign face inddex */
newpa->num= mirrorfaces[pa->num*2];
- newpa->num_dmcache= psys_particle_dm_face_lookup(ob,psmd->dm,newpa->num,newpa->fuv, NULL);
+ newpa->num_dmcache= psys_particle_dm_face_lookup(ob, psmd->dm, newpa->num, newpa->fuv, NULL);
/* update edit key pointers */
key= newpoint->keys;
@@ -2702,6 +2724,7 @@ void PARTICLE_OT_mirror(wmOperatorType *ot)
/* identifiers */
ot->name = "Mirror";
ot->idname = "PARTICLE_OT_mirror";
+ ot->description = "Duplicate and mirror the selected particles along the local X axis";
/* api callbacks */
ot->exec = mirror_exec;
@@ -2722,8 +2745,8 @@ static void brush_comb(PEData *data, float UNUSED(mat[][4]), float imat[][4], in
fac= (float)pow((double)(1.0f - data->dist / data->rad), (double)data->combfac);
- copy_v3_v3(cvec,data->dvec);
- mul_mat3_m4_v3(imat,cvec);
+ copy_v3_v3(cvec, data->dvec);
+ mul_mat3_m4_v3(imat, cvec);
mul_v3_fl(cvec, fac);
add_v3_v3(key->co, cvec);
@@ -2832,17 +2855,17 @@ static void brush_length(PEData *data, int point_index)
PTCacheEdit *edit= data->edit;
PTCacheEditPoint *point = edit->points + point_index;
KEY_K;
- float dvec[3],pvec[3] = {0.0f, 0.0f, 0.0f};
+ float dvec[3], pvec[3] = {0.0f, 0.0f, 0.0f};
LOOP_KEYS {
if (k==0) {
- copy_v3_v3(pvec,key->co);
+ copy_v3_v3(pvec, key->co);
}
else {
- sub_v3_v3v3(dvec,key->co,pvec);
- copy_v3_v3(pvec,key->co);
- mul_v3_fl(dvec,data->growfac);
- add_v3_v3v3(key->co,(key-1)->co,dvec);
+ sub_v3_v3v3(dvec, key->co, pvec);
+ copy_v3_v3(pvec, key->co);
+ mul_v3_fl(dvec, data->growfac);
+ add_v3_v3v3(key->co, (key-1)->co, dvec);
}
}
@@ -2869,7 +2892,7 @@ static void brush_puff(PEData *data, int point_index)
if (psys && !(psys->flag & PSYS_GLOBAL_HAIR)) {
psys_mat_hair_to_global(data->ob, data->dm, psys->part->from, psys->particles + point_index, mat);
- invert_m4_m4(imat,mat);
+ invert_m4_m4(imat, mat);
}
else {
unit_m4(mat);
@@ -2982,7 +3005,7 @@ static void brush_puff(PEData *data, int point_index)
}
-static void brush_weight(PEData *data, float UNUSED(mat[][4]), float UNUSED(imat[][4]), int point_index, int key_index, PTCacheEditKey *UNUSED(key))
+static void BKE_brush_weight_get(PEData *data, float UNUSED(mat[][4]), float UNUSED(imat[][4]), int point_index, int key_index, PTCacheEditKey *UNUSED(key))
{
/* roots have full weight allways */
if (key_index) {
@@ -3001,8 +3024,8 @@ static void brush_smooth_get(PEData *data, float mat[][4], float UNUSED(imat[][4
if (key_index) {
float dvec[3];
- sub_v3_v3v3(dvec,key->co,(key-1)->co);
- mul_mat3_m4_v3(mat,dvec);
+ sub_v3_v3v3(dvec, key->co, (key-1)->co);
+ mul_mat3_m4_v3(mat, dvec);
add_v3_v3(data->vec, dvec);
data->tot++;
}
@@ -3014,12 +3037,12 @@ static void brush_smooth_do(PEData *data, float UNUSED(mat[][4]), float imat[][4
if (key_index) {
copy_v3_v3(vec, data->vec);
- mul_mat3_m4_v3(imat,vec);
+ mul_mat3_m4_v3(imat, vec);
- sub_v3_v3v3(dvec,key->co,(key-1)->co);
+ sub_v3_v3v3(dvec, key->co, (key-1)->co);
- sub_v3_v3v3(dvec,vec,dvec);
- mul_v3_fl(dvec,data->smoothfac);
+ sub_v3_v3v3(dvec, vec, dvec);
+ mul_v3_fl(dvec, data->smoothfac);
add_v3_v3(key->co, dvec);
}
@@ -3055,7 +3078,7 @@ static int particle_intersect_dm(Scene *scene, Object *ob, DerivedMesh *dm,
MFace *mface= NULL;
MVert *mvert= NULL;
int i, totface, intersect=0;
- float cur_d, cur_uv[2], v1[3], v2[3], v3[3], v4[3], min[3], max[3], p_min[3],p_max[3];
+ float cur_d, cur_uv[2], v1[3], v2[3], v3[3], v4[3], min[3], max[3], p_min[3], p_max[3];
float cur_ipoint[3];
if (dm == NULL) {
@@ -3076,50 +3099,50 @@ static int particle_intersect_dm(Scene *scene, Object *ob, DerivedMesh *dm,
if (pa_minmax==0) {
- INIT_MINMAX(p_min,p_max);
- DO_MINMAX(co1,p_min,p_max);
- DO_MINMAX(co2,p_min,p_max);
+ INIT_MINMAX(p_min, p_max);
+ DO_MINMAX(co1, p_min, p_max);
+ DO_MINMAX(co2, p_min, p_max);
}
else {
- copy_v3_v3(p_min,pa_minmax);
- copy_v3_v3(p_max,pa_minmax+3);
+ copy_v3_v3(p_min, pa_minmax);
+ copy_v3_v3(p_max, pa_minmax+3);
}
totface=dm->getNumTessFaces(dm);
- mface=dm->getTessFaceDataArray(dm,CD_MFACE);
- mvert=dm->getVertDataArray(dm,CD_MVERT);
+ mface=dm->getTessFaceDataArray(dm, CD_MFACE);
+ mvert=dm->getVertDataArray(dm, CD_MVERT);
/* lets intersect the faces */
- for (i=0; i<totface; i++,mface++) {
+ for (i=0; i<totface; i++, mface++) {
if (vert_cos) {
- copy_v3_v3(v1,vert_cos+3*mface->v1);
- copy_v3_v3(v2,vert_cos+3*mface->v2);
- copy_v3_v3(v3,vert_cos+3*mface->v3);
+ copy_v3_v3(v1, vert_cos+3*mface->v1);
+ copy_v3_v3(v2, vert_cos+3*mface->v2);
+ copy_v3_v3(v3, vert_cos+3*mface->v3);
if (mface->v4)
- copy_v3_v3(v4,vert_cos+3*mface->v4);
+ copy_v3_v3(v4, vert_cos+3*mface->v4);
}
else {
- copy_v3_v3(v1,mvert[mface->v1].co);
- copy_v3_v3(v2,mvert[mface->v2].co);
- copy_v3_v3(v3,mvert[mface->v3].co);
+ copy_v3_v3(v1, mvert[mface->v1].co);
+ copy_v3_v3(v2, mvert[mface->v2].co);
+ copy_v3_v3(v3, mvert[mface->v3].co);
if (mface->v4)
- copy_v3_v3(v4,mvert[mface->v4].co);
+ copy_v3_v3(v4, mvert[mface->v4].co);
}
if (face_minmax==0) {
- INIT_MINMAX(min,max);
- DO_MINMAX(v1,min,max);
- DO_MINMAX(v2,min,max);
- DO_MINMAX(v3,min,max);
+ INIT_MINMAX(min, max);
+ DO_MINMAX(v1, min, max);
+ DO_MINMAX(v2, min, max);
+ DO_MINMAX(v3, min, max);
if (mface->v4)
DO_MINMAX(v4, min, max);
- if (isect_aabb_aabb_v3(min,max,p_min,p_max)==0)
+ if (isect_aabb_aabb_v3(min, max, p_min, p_max)==0)
continue;
}
else {
copy_v3_v3(min, face_minmax+6*i);
copy_v3_v3(max, face_minmax+6*i+3);
- if (isect_aabb_aabb_v3(min,max,p_min,p_max)==0)
+ if (isect_aabb_aabb_v3(min, max, p_min, p_max)==0)
continue;
}
@@ -3127,7 +3150,7 @@ static int particle_intersect_dm(Scene *scene, Object *ob, DerivedMesh *dm,
if (isect_sweeping_sphere_tri_v3(co1, co2, radius, v2, v3, v1, &cur_d, cur_ipoint)) {
if (cur_d<*min_d) {
*min_d=cur_d;
- copy_v3_v3(ipoint,cur_ipoint);
+ copy_v3_v3(ipoint, cur_ipoint);
*min_face=i;
intersect=1;
}
@@ -3136,7 +3159,7 @@ static int particle_intersect_dm(Scene *scene, Object *ob, DerivedMesh *dm,
if (isect_sweeping_sphere_tri_v3(co1, co2, radius, v4, v1, v3, &cur_d, cur_ipoint)) {
if (cur_d<*min_d) {
*min_d=cur_d;
- copy_v3_v3(ipoint,cur_ipoint);
+ copy_v3_v3(ipoint, cur_ipoint);
*min_face=i;
intersect=1;
}
@@ -3182,8 +3205,8 @@ static int brush_add(PEData *data, short number)
Object *ob= data->ob;
PTCacheEdit *edit = data->edit;
ParticleSystem *psys= edit->psys;
- ParticleData *add_pars= MEM_callocN(number*sizeof(ParticleData),"ParticleData add");
- ParticleSystemModifierData *psmd= psys_get_modifier(ob,psys);
+ ParticleData *add_pars= MEM_callocN(number*sizeof(ParticleData), "ParticleData add");
+ ParticleSystemModifierData *psmd= psys_get_modifier(ob, psys);
ParticleSimulationData sim= {0};
ParticleEditSettings *pset= PE_settings(scene);
int i, k, n= 0, totpart= psys->totpart;
@@ -3194,7 +3217,7 @@ static int brush_add(PEData *data, short number)
short size= pset->brush[PE_BRUSH_ADD].size;
short size2= size*size;
DerivedMesh *dm=0;
- invert_m4_m4(imat,ob->obmat);
+ invert_m4_m4(imat, ob->obmat);
if (psys->flag & PSYS_GLOBAL_HAIR)
return 0;
@@ -3227,13 +3250,13 @@ static int brush_add(PEData *data, short number)
mco[1]= data->mval[1] + dmy;
ED_view3d_win_to_segment_clip(data->vc.ar, data->vc.v3d, mco, co1, co2);
- mul_m4_v3(imat,co1);
- mul_m4_v3(imat,co2);
+ mul_m4_v3(imat, co1);
+ mul_m4_v3(imat, co2);
min_d=2.0;
/* warning, returns the derived mesh face */
- if (particle_intersect_dm(scene, ob,dm,0,co1,co2,&min_d,&add_pars[n].num,add_pars[n].fuv,0,0,0,0)) {
- add_pars[n].num_dmcache= psys_particle_dm_face_lookup(ob,psmd->dm,add_pars[n].num,add_pars[n].fuv,NULL);
+ if (particle_intersect_dm(scene, ob, dm, 0, co1, co2, &min_d, &add_pars[n].num, add_pars[n].fuv, 0, 0, 0, 0)) {
+ add_pars[n].num_dmcache= psys_particle_dm_face_lookup(ob, psmd->dm, add_pars[n].num, add_pars[n].fuv, NULL);
n++;
}
}
@@ -3241,8 +3264,8 @@ static int brush_add(PEData *data, short number)
int newtotpart=totpart+n;
float hairmat[4][4], cur_co[3];
KDTree *tree=0;
- ParticleData *pa, *new_pars= MEM_callocN(newtotpart*sizeof(ParticleData),"ParticleData new");
- PTCacheEditPoint *point, *new_points= MEM_callocN(newtotpart*sizeof(PTCacheEditPoint),"PTCacheEditPoint array new");
+ ParticleData *pa, *new_pars= MEM_callocN(newtotpart*sizeof(ParticleData), "ParticleData new");
+ PTCacheEditPoint *point, *new_points= MEM_callocN(newtotpart*sizeof(PTCacheEditPoint), "PTCacheEditPoint array new");
PTCacheEditKey *key;
HairKey *hkey;
@@ -3267,7 +3290,7 @@ static int brush_add(PEData *data, short number)
tree=BLI_kdtree_new(psys->totpart);
for (i=0, pa=psys->particles; i<totpart; i++, pa++) {
- psys_particle_on_dm(psmd->dm,psys->part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,cur_co,0,0,0,0,0);
+ psys_particle_on_dm(psmd->dm, psys->part->from, pa->num, pa->num_dmcache, pa->fuv, pa->foffset, cur_co, 0, 0, 0, 0, 0);
BLI_kdtree_insert(tree, i, cur_co, NULL);
}
@@ -3295,7 +3318,7 @@ static int brush_add(PEData *data, short number)
}
pa->size= 1.0f;
- initialize_particle(&sim, pa,i);
+ initialize_particle(&sim, pa, i);
reset_particle(&sim, pa, 0.0, 1.0);
point->flag |= PEP_EDIT_RECALC;
if (pe_x_mirror(ob))
@@ -3311,8 +3334,8 @@ static int brush_add(PEData *data, short number)
int w, maxw;
float maxd, totw=0.0, weight[3];
- psys_particle_on_dm(psmd->dm,psys->part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,co1,0,0,0,0,0);
- maxw= BLI_kdtree_find_n_nearest(tree,3,co1,NULL,ptn);
+ psys_particle_on_dm(psmd->dm, psys->part->from, pa->num, pa->num_dmcache, pa->fuv, pa->foffset, co1, 0, 0, 0, 0, 0);
+ maxw= BLI_kdtree_find_n_nearest(tree, 3, co1, NULL, ptn);
maxd= ptn[maxw-1].dist;
@@ -3371,7 +3394,7 @@ static int brush_add(PEData *data, short number)
}
for (k=0, hkey=pa->hair; k<pset->totaddkey; k++, hkey++) {
psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, hairmat);
- invert_m4_m4(imat,hairmat);
+ invert_m4_m4(imat, hairmat);
mul_m4_v3(imat, hkey->co);
}
}
@@ -3487,7 +3510,7 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
mval[0] = bedit->lastmouse[0] + step*dx;
mval[1] = bedit->lastmouse[1] + step*dy;
- switch(pset->brushtype) {
+ switch (pset->brushtype) {
case PE_BRUSH_COMB:
{
float mval_f[2];
@@ -3614,7 +3637,7 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
data.weightfac = brush->strength; /* note that this will never be zero */
- foreach_mouse_hit_key(&data, brush_weight, selected);
+ foreach_mouse_hit_key(&data, BKE_brush_weight_get, selected);
}
break;
@@ -3627,7 +3650,7 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
if (pset->brushtype == PE_BRUSH_ADD && pe_x_mirror(ob))
PE_mirror_x(scene, ob, 1);
- update_world_cos(ob,edit);
+ update_world_cos(ob, edit);
psys_free_path_cache(NULL, edit);
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
}
@@ -3663,7 +3686,8 @@ static int brush_edit_exec(bContext *C, wmOperator *op)
if (!brush_edit_init(C, op))
return OPERATOR_CANCELLED;
- RNA_BEGIN(op->ptr, itemptr, "stroke") {
+ RNA_BEGIN (op->ptr, itemptr, "stroke")
+ {
brush_edit_apply(C, op, &itemptr);
}
RNA_END;
@@ -3704,7 +3728,7 @@ static int brush_edit_invoke(bContext *C, wmOperator *op, wmEvent *event)
static int brush_edit_modal(bContext *C, wmOperator *op, wmEvent *event)
{
- switch(event->type) {
+ switch (event->type) {
case LEFTMOUSE:
case MIDDLEMOUSE:
case RIGHTMOUSE: // XXX hardcoded
@@ -3730,6 +3754,7 @@ void PARTICLE_OT_brush_edit(wmOperatorType *ot)
/* identifiers */
ot->name = "Brush Edit";
ot->idname = "PARTICLE_OT_brush_edit";
+ ot->description = "Apply a stroke of brush to the particles";
/* api callbacks */
ot->exec = brush_edit_exec;
@@ -3923,7 +3948,7 @@ void PE_undo_push(Scene *scene, const char *str)
}
/* copy */
- make_PTCacheUndo(edit,edit->curundo);
+ make_PTCacheUndo(edit, edit->curundo);
}
void PE_undo_step(Scene *scene, int step)
@@ -3933,7 +3958,7 @@ void PE_undo_step(Scene *scene, int step)
if (!edit) return;
if (step==0) {
- get_PTCacheUndo(edit,edit->curundo);
+ get_PTCacheUndo(edit, edit->curundo);
}
else if (step==1) {
@@ -4059,7 +4084,7 @@ int PE_minmax(Scene *scene, float min[3], float max[3])
}
if (!ok) {
- minmax_object(ob, min, max);
+ BKE_object_minmax(ob, min, max);
ok= 1;
}
@@ -4092,7 +4117,7 @@ static void PE_create_particle_edit(Scene *scene, Object *ob, PointCache *cache,
totpoint = psys ? psys->totpart : (int)((PTCacheMem*)cache->mem_cache.first)->totpoint;
edit= MEM_callocN(sizeof(PTCacheEdit), "PE_create_particle_edit");
- edit->points=MEM_callocN(totpoint*sizeof(PTCacheEditPoint),"PTCacheEditPoints");
+ edit->points=MEM_callocN(totpoint*sizeof(PTCacheEditPoint), "PTCacheEditPoints");
edit->totpoint = totpoint;
if (psys && !cache) {
@@ -4107,7 +4132,7 @@ static void PE_create_particle_edit(Scene *scene, Object *ob, PointCache *cache,
pa = psys->particles;
LOOP_POINTS {
point->totkey = pa->totkey;
- point->keys= MEM_callocN(point->totkey*sizeof(PTCacheEditKey),"ParticleEditKeys");
+ point->keys= MEM_callocN(point->totkey*sizeof(PTCacheEditKey), "ParticleEditKeys");
point->flag |= PEP_EDIT_RECALC;
hkey = pa->hair;
@@ -4143,7 +4168,7 @@ static void PE_create_particle_edit(Scene *scene, Object *ob, PointCache *cache,
continue;
if (!point->totkey) {
- key = point->keys = MEM_callocN(totframe*sizeof(PTCacheEditKey),"ParticleEditKeys");
+ key = point->keys = MEM_callocN(totframe*sizeof(PTCacheEditKey), "ParticleEditKeys");
point->flag |= PEP_EDIT_RECALC;
}
else
@@ -4220,6 +4245,7 @@ void PARTICLE_OT_particle_edit_toggle(wmOperatorType *ot)
/* identifiers */
ot->name = "Particle Edit Toggle";
ot->idname = "PARTICLE_OT_particle_edit_toggle";
+ ot->description = "Toggle particle edit mode";
/* api callbacks */
ot->exec = particle_edit_toggle_exec;
@@ -4269,6 +4295,7 @@ void PARTICLE_OT_edited_clear(wmOperatorType *ot)
/* identifiers */
ot->name = "Clear Edited";
ot->idname = "PARTICLE_OT_edited_clear";
+ ot->description = "Undo all edition performed on the particle system";
/* api callbacks */
ot->exec = clear_edited_exec;
diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c
index 3d50ec26a40..b57500df719 100644
--- a/source/blender/editors/physics/particle_object.c
+++ b/source/blender/editors/physics/particle_object.c
@@ -158,7 +158,7 @@ static int new_particle_settings_exec(bContext *C, wmOperator *UNUSED(op))
/* add or copy particle setting */
if (psys->part)
- part= psys_copy_settings(psys->part);
+ part= BKE_particlesettings_copy(psys->part);
else
part= psys_new_settings("ParticleSettings", bmain);
@@ -532,7 +532,7 @@ void PARTICLE_OT_dupliob_move_down(wmOperatorType *ot)
static void disconnect_hair(Scene *scene, Object *ob, ParticleSystem *psys)
{
- ParticleSystemModifierData *psmd = psys_get_modifier(ob,psys);
+ ParticleSystemModifierData *psmd = psys_get_modifier(ob, psys);
ParticleEditSettings *pset= PE_settings(scene);
ParticleData *pa;
PTCacheEdit *edit;
@@ -551,7 +551,7 @@ static void disconnect_hair(Scene *scene, Object *ob, ParticleSystem *psys)
edit = psys->edit;
point= edit ? edit->points : NULL;
- for (i=0, pa=psys->particles; i<psys->totpart; i++,pa++) {
+ for (i=0, pa=psys->particles; i<psys->totpart; i++, pa++) {
if (point) {
ekey = point->keys;
point++;
@@ -559,8 +559,8 @@ static void disconnect_hair(Scene *scene, Object *ob, ParticleSystem *psys)
psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, hairmat);
- for (k=0,key=pa->hair; k<pa->totkey; k++,key++) {
- mul_m4_v3(hairmat,key->co);
+ for (k=0, key=pa->hair; k<pa->totkey; k++, key++) {
+ mul_m4_v3(hairmat, key->co);
if (ekey) {
ekey->flag &= ~PEK_USE_WCO;
@@ -622,7 +622,7 @@ void PARTICLE_OT_disconnect_hair(wmOperatorType *ot)
static void connect_hair(Scene *scene, Object *ob, ParticleSystem *psys)
{
- ParticleSystemModifierData *psmd = psys_get_modifier(ob,psys);
+ ParticleSystemModifierData *psmd = psys_get_modifier(ob, psys);
ParticleData *pa;
PTCacheEdit *edit;
PTCacheEditPoint *point;
@@ -661,7 +661,7 @@ static void connect_hair(Scene *scene, Object *ob, ParticleSystem *psys)
bvhtree_from_mesh_faces(&bvhtree, dm, 0.0, 2, 6);
- for (i=0, pa= psys->particles; i<psys->totpart; i++,pa++) {
+ for (i=0, pa= psys->particles; i<psys->totpart; i++, pa++) {
key = pa->hair;
nearest.index = -1;
@@ -675,23 +675,23 @@ static void connect_hair(Scene *scene, Object *ob, ParticleSystem *psys)
continue;
}
- mface = CDDM_get_tessface(dm,nearest.index);
+ mface = CDDM_get_tessface(dm, nearest.index);
- copy_v3_v3(v[0], CDDM_get_vert(dm,mface->v1)->co);
- copy_v3_v3(v[1], CDDM_get_vert(dm,mface->v2)->co);
- copy_v3_v3(v[2], CDDM_get_vert(dm,mface->v3)->co);
+ copy_v3_v3(v[0], CDDM_get_vert(dm, mface->v1)->co);
+ copy_v3_v3(v[1], CDDM_get_vert(dm, mface->v2)->co);
+ copy_v3_v3(v[2], CDDM_get_vert(dm, mface->v3)->co);
if (mface->v4) {
- copy_v3_v3(v[3], CDDM_get_vert(dm,mface->v4)->co);
- interp_weights_poly_v3( pa->fuv,v, 4, nearest.co);
+ copy_v3_v3(v[3], CDDM_get_vert(dm, mface->v4)->co);
+ interp_weights_poly_v3(pa->fuv, v, 4, nearest.co);
}
else
- interp_weights_poly_v3( pa->fuv,v, 3, nearest.co);
+ interp_weights_poly_v3(pa->fuv, v, 3, nearest.co);
pa->num = nearest.index;
- pa->num_dmcache = psys_particle_dm_face_lookup(ob,psmd->dm,pa->num,pa->fuv,NULL);
+ pa->num_dmcache = psys_particle_dm_face_lookup(ob, psmd->dm, pa->num, pa->fuv, NULL);
psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, hairmat);
- invert_m4_m4(imat,hairmat);
+ invert_m4_m4(imat, hairmat);
sub_v3_v3v3(vec, nearest.co, key->co);
@@ -700,9 +700,9 @@ static void connect_hair(Scene *scene, Object *ob, ParticleSystem *psys)
point++;
}
- for (k=0,key=pa->hair; k<pa->totkey; k++,key++) {
+ for (k=0, key=pa->hair; k<pa->totkey; k++, key++) {
add_v3_v3(key->co, vec);
- mul_m4_v3(imat,key->co);
+ mul_m4_v3(imat, key->co);
if (ekey) {
ekey->flag |= PEK_USE_WCO;
diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c
index 20fa4c5753f..5a56672f766 100644
--- a/source/blender/editors/physics/physics_fluid.c
+++ b/source/blender/editors/physics/physics_fluid.c
@@ -1,7 +1,4 @@
/*
- * fluidsim.c
- *
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -32,9 +29,6 @@
* \ingroup edphys
*/
-
-
-
#include <math.h>
#include <stdlib.h>
#include <string.h>
@@ -132,7 +126,7 @@ static float get_fluid_size_m(Scene *scene, Object *domainob, FluidsimSettings *
float dim[3];
float longest_axis;
- object_get_dimensions(domainob, dim);
+ BKE_object_dimensions_get(domainob, dim);
longest_axis = MAX3(dim[0], dim[1], dim[2]);
return longest_axis * scene->unit.scale_length;
@@ -150,8 +144,8 @@ static int fluid_is_animated_mesh(FluidsimSettings *fss)
/* helper function */
void fluidsimGetGeometryObjFilename(Object *ob, char *dst) { //, char *srcname)
{
- //BLI_snprintf(dst,FILE_MAXFILE, "%s_cfgdata_%s.bobj.gz", srcname, ob->id.name);
- BLI_snprintf(dst,FILE_MAXFILE, "fluidcfgdata_%s.bobj.gz", ob->id.name);
+ //BLI_snprintf(dst, FILE_MAXFILE, "%s_cfgdata_%s.bobj.gz", srcname, ob->id.name);
+ BLI_snprintf(dst, FILE_MAXFILE, "fluidcfgdata_%s.bobj.gz", ob->id.name);
}
#endif
@@ -199,30 +193,30 @@ typedef struct FluidObject {
#if 0
static void fluidsimPrintChannel(FILE *file, float *channel, int paramsize, char *str, int entries)
{
- int i,j;
+ int i, j;
int channelSize = paramsize;
if (entries==3) {
- elbeemSimplifyChannelVec3( channel, &channelSize);
+ elbeemSimplifyChannelVec3(channel, &channelSize);
}
else if (entries==1) {
- elbeemSimplifyChannelFloat( channel, &channelSize);
+ elbeemSimplifyChannelFloat(channel, &channelSize);
}
else {
// invalid, cant happen?
}
fprintf(file, " CHANNEL %s =\n", str);
- for (i=0; i<channelSize;i++) {
- fprintf(file," ");
- for (j=0;j<=entries;j++) { // also print time value
- fprintf(file," %f ", channel[i*(entries+1)+j] );
- if (j==entries-1) { fprintf(file," "); }
+ for (i=0; i < channelSize; i++) {
+ fprintf(file, " ");
+ for (j=0;j <= entries;j++) { // also print time value
+ fprintf(file, " %f ", channel[i*(entries + 1) + j]);
+ if (j==entries-1) { fprintf(file, " "); }
}
- fprintf(file,"\n");
+ fprintf(file, "\n");
}
- fprintf(file, " ;\n" );
+ fprintf(file, " ;\n");
}
#endif
@@ -243,7 +237,7 @@ static void init_time(FluidsimSettings *domainSettings, FluidAnimChannels *chann
{
int i;
- channels->timeAtFrame = MEM_callocN( (channels->length+1)*sizeof(float), "timeAtFrame channel");
+ channels->timeAtFrame = MEM_callocN((channels->length+1)*sizeof(float), "timeAtFrame channel");
channels->timeAtFrame[0] = channels->timeAtFrame[1] = domainSettings->animStart; // start at index 1
@@ -361,9 +355,9 @@ static void fluid_init_all_channels(bContext *C, Object *UNUSED(fsDomain), Fluid
init_time(domainSettings, channels);
/* allocate domain animation channels */
- channels->DomainGravity = MEM_callocN( length * (CHANNEL_VEC+1) * sizeof(float), "channel DomainGravity");
- channels->DomainViscosity = MEM_callocN( length * (CHANNEL_FLOAT+1) * sizeof(float), "channel DomainViscosity");
- channels->DomainTime = MEM_callocN( length * (CHANNEL_FLOAT+1) * sizeof(float), "channel DomainTime");
+ channels->DomainGravity = MEM_callocN(length * (CHANNEL_VEC+1) * sizeof(float), "channel DomainGravity");
+ channels->DomainViscosity = MEM_callocN(length * (CHANNEL_FLOAT+1) * sizeof(float), "channel DomainViscosity");
+ channels->DomainTime = MEM_callocN(length * (CHANNEL_FLOAT+1) * sizeof(float), "channel DomainTime");
/* allocate fluid objects */
for (base=scene->base.first; base; base= base->next) {
@@ -379,17 +373,17 @@ static void fluid_init_all_channels(bContext *C, Object *UNUSED(fsDomain), Fluid
continue;
}
- fobj->Translation = MEM_callocN( length * (CHANNEL_VEC+1) * sizeof(float), "fluidobject Translation");
- fobj->Rotation = MEM_callocN( length * (CHANNEL_VEC+1) * sizeof(float), "fluidobject Rotation");
- fobj->Scale = MEM_callocN( length * (CHANNEL_VEC+1) * sizeof(float), "fluidobject Scale");
- fobj->Active = MEM_callocN( length * (CHANNEL_FLOAT+1) * sizeof(float), "fluidobject Active");
- fobj->InitialVelocity = MEM_callocN( length * (CHANNEL_VEC+1) * sizeof(float), "fluidobject InitialVelocity");
+ fobj->Translation = MEM_callocN(length * (CHANNEL_VEC+1) * sizeof(float), "fluidobject Translation");
+ fobj->Rotation = MEM_callocN(length * (CHANNEL_VEC+1) * sizeof(float), "fluidobject Rotation");
+ fobj->Scale = MEM_callocN(length * (CHANNEL_VEC+1) * sizeof(float), "fluidobject Scale");
+ fobj->Active = MEM_callocN(length * (CHANNEL_FLOAT+1) * sizeof(float), "fluidobject Active");
+ fobj->InitialVelocity = MEM_callocN(length * (CHANNEL_VEC+1) * sizeof(float), "fluidobject InitialVelocity");
if (fluidmd->fss->type == OB_FLUIDSIM_CONTROL) {
- fobj->AttractforceStrength = MEM_callocN( length * (CHANNEL_FLOAT+1) * sizeof(float), "fluidobject AttractforceStrength");
- fobj->AttractforceRadius = MEM_callocN( length * (CHANNEL_FLOAT+1) * sizeof(float), "fluidobject AttractforceRadius");
- fobj->VelocityforceStrength = MEM_callocN( length * (CHANNEL_FLOAT+1) * sizeof(float), "fluidobject VelocityforceStrength");
- fobj->VelocityforceRadius = MEM_callocN( length * (CHANNEL_FLOAT+1) * sizeof(float), "fluidobject VelocityforceRadius");
+ fobj->AttractforceStrength = MEM_callocN(length * (CHANNEL_FLOAT+1) * sizeof(float), "fluidobject AttractforceStrength");
+ fobj->AttractforceRadius = MEM_callocN(length * (CHANNEL_FLOAT+1) * sizeof(float), "fluidobject AttractforceRadius");
+ fobj->VelocityforceStrength = MEM_callocN(length * (CHANNEL_FLOAT+1) * sizeof(float), "fluidobject VelocityforceStrength");
+ fobj->VelocityforceRadius = MEM_callocN(length * (CHANNEL_FLOAT+1) * sizeof(float), "fluidobject VelocityforceRadius");
}
if (fluid_is_animated_mesh(fluidmd->fss)) {
@@ -397,7 +391,7 @@ static void fluid_init_all_channels(bContext *C, Object *UNUSED(fsDomain), Fluid
int *tris=NULL, modifierIndex = modifiers_indexInObject(ob, (ModifierData *)fluidmd);
initElbeemMesh(scene, ob, &fobj->numVerts, &verts, &fobj->numTris, &tris, 0, modifierIndex);
- fobj->VertexCache = MEM_callocN( length *((fobj->numVerts*CHANNEL_VEC)+1) * sizeof(float), "fluidobject VertexCache");
+ fobj->VertexCache = MEM_callocN(length *((fobj->numVerts*CHANNEL_VEC)+1) * sizeof(float), "fluidobject VertexCache");
MEM_freeN(verts);
MEM_freeN(tris);
@@ -507,7 +501,7 @@ static void export_fluid_objects(ListBase *fobjects, Scene *scene, int length)
if (ELEM(fluidmd->fss->type, OB_FLUIDSIM_DOMAIN, OB_FLUIDSIM_PARTICLE))
continue;
- elbeemResetMesh( &fsmesh );
+ elbeemResetMesh(&fsmesh);
fsmesh.type = fluidmd->fss->type;
fsmesh.name = ob->id.name;
@@ -594,8 +588,7 @@ static int fluid_validate_scene(ReportList *reports, Scene *scene, Object *fsDom
int channelObjCount = 0;
int fluidInputCount = 0;
- for (base=scene->base.first; base; base= base->next)
- {
+ for (base=scene->base.first; base; base= base->next) {
Object *ob = base->object;
FluidsimModifierData *fluidmdtmp = (FluidsimModifierData *)modifiers_findByType(ob, eModifierType_Fluidsim);
@@ -680,7 +673,7 @@ static int fluid_init_filepaths(Object *fsDomain, char *targetDir, char *targetF
if (fileCfg) {
dirExist = 1; fclose(fileCfg);
// remove cfg dummy from directory test
- BLI_delete(targetFile, 0,0);
+ BLI_delete(targetFile, 0, 0);
}
if (targetDir[0] == '\0' || (!dirExist)) {
@@ -692,7 +685,7 @@ static int fluid_init_filepaths(Object *fsDomain, char *targetDir, char *targetF
BLI_splitdirstring(blendDir, blendFile);
BLI_replace_extension(blendFile, FILE_MAX, ""); /* strip .blend */
- BLI_snprintf(newSurfdataPath, FILE_MAX ,"//fluidsimdata/%s_%s_", blendFile, fsDomain->id.name);
+ BLI_snprintf(newSurfdataPath, FILE_MAX, "//fluidsimdata/%s_%s_", blendFile, fsDomain->id.name);
BLI_snprintf(debugStrBuffer, 256, "fluidsimBake::error - warning resetting output dir to '%s'\n", newSurfdataPath);
elbeemDebugOut(debugStrBuffer);
@@ -704,7 +697,7 @@ static int fluid_init_filepaths(Object *fsDomain, char *targetDir, char *targetF
if (outStringsChanged) {
char dispmsg[FILE_MAX+256];
int selection=0;
- BLI_strncpy(dispmsg,"Output settings set to: '", sizeof(dispmsg));
+ BLI_strncpy(dispmsg, "Output settings set to: '", sizeof(dispmsg));
strcat(dispmsg, newSurfdataPath);
strcat(dispmsg, "'%t|Continue with changed settings%x1|Discard and abort%x0");
@@ -793,7 +786,7 @@ int runSimulationCallback(void *data, int status, int frame)
if (status == FLUIDSIM_CBSTATUS_NEWFRAME) {
fluidbake_updatejob(fb, frame / (float)settings->noOfFrames);
- //printf("elbeem blender cb s%d, f%d, domainid:%d noOfFrames: %d\n", status,frame, settings->domainId, settings->noOfFrames ); // DEBUG
+ //printf("elbeem blender cb s%d, f%d, domainid:%d noOfFrames: %d\n", status, frame, settings->domainId, settings->noOfFrames ); // DEBUG
}
if (fluidbake_breakjob(fb)) {
@@ -899,7 +892,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor
if (getenv(strEnvName)) {
int dlevel = atoi(getenv(strEnvName));
elbeemSetDebugLevel(dlevel);
- BLI_snprintf(debugStrBuffer, sizeof(debugStrBuffer),"fluidsimBake::msg: Debug messages activated due to envvar '%s'\n",strEnvName);
+ BLI_snprintf(debugStrBuffer, sizeof(debugStrBuffer), "fluidsimBake::msg: Debug messages activated due to envvar '%s'\n", strEnvName);
elbeemDebugOut(debugStrBuffer);
}
@@ -936,7 +929,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor
/* rough check of settings... */
if (domainSettings->previewresxyz > domainSettings->resolutionxyz) {
- BLI_snprintf(debugStrBuffer,sizeof(debugStrBuffer),"fluidsimBake::warning - Preview (%d) >= Resolution (%d)... setting equal.\n", domainSettings->previewresxyz , domainSettings->resolutionxyz);
+ BLI_snprintf(debugStrBuffer, sizeof(debugStrBuffer), "fluidsimBake::warning - Preview (%d) >= Resolution (%d)... setting equal.\n", domainSettings->previewresxyz, domainSettings->resolutionxyz);
elbeemDebugOut(debugStrBuffer);
domainSettings->previewresxyz = domainSettings->resolutionxyz;
}
@@ -959,7 +952,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor
else {
gridlevels = domainSettings->maxRefine;
}
- BLI_snprintf(debugStrBuffer,sizeof(debugStrBuffer),"fluidsimBake::msg: Baking %s, refine: %d\n", fsDomain->id.name , gridlevels );
+ BLI_snprintf(debugStrBuffer, sizeof(debugStrBuffer), "fluidsimBake::msg: Baking %s, refine: %d\n", fsDomain->id.name, gridlevels);
elbeemDebugOut(debugStrBuffer);
@@ -979,7 +972,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor
/* ******** init domain object's matrix ******** */
copy_m4_m4(domainMat, fsDomain->obmat);
if (!invert_m4_m4(invDomMat, domainMat)) {
- BLI_snprintf(debugStrBuffer,sizeof(debugStrBuffer),"fluidsimBake::error - Invalid obj matrix?\n");
+ BLI_snprintf(debugStrBuffer, sizeof(debugStrBuffer), "fluidsimBake::error - Invalid obj matrix?\n");
elbeemDebugOut(debugStrBuffer);
BKE_report(reports, RPT_ERROR, "Invalid object matrix");
diff --git a/source/blender/editors/physics/physics_pointcache.c b/source/blender/editors/physics/physics_pointcache.c
index 6573647aaee..c935cb7da82 100644
--- a/source/blender/editors/physics/physics_pointcache.c
+++ b/source/blender/editors/physics/physics_pointcache.c
@@ -173,6 +173,7 @@ void PTCACHE_OT_free_bake_all(wmOperatorType *ot)
/* identifiers */
ot->name = "Free All Physics Bakes";
ot->idname = "PTCACHE_OT_free_bake_all";
+ ot->description = "Free all baked caches of all objects in the current scene";
/* api callbacks */
ot->exec = ptcache_free_bake_all_exec;
diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c
index 1a2e42d691a..595b51d22c4 100644
--- a/source/blender/editors/render/render_internal.c
+++ b/source/blender/editors/render/render_internal.c
@@ -170,7 +170,7 @@ static void screen_render_scene_layer_set(wmOperator *op, Main *mainp, Scene **s
if (scn) {
/* camera switch wont have updated */
scn->r.cfra = (*scene)->r.cfra;
- scene_camera_switch_update(scn);
+ BKE_scene_camera_switch_update(scn);
*scene = scn;
}
diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c
index f9737b02a01..de3d2d4e871 100644
--- a/source/blender/editors/render/render_opengl.c
+++ b/source/blender/editors/render/render_opengl.c
@@ -146,6 +146,13 @@ static void screen_opengl_render_apply(OGLRender *oglrender)
BLI_assert((oglrender->sizex == ibuf->x) && (oglrender->sizey == ibuf->y));
if (ibuf->rect_float == NULL) {
+ /* internally sequencer working in sRGB space and stores both bytes and float
+ * buffers in sRGB space, but if byte->float onversion doesn't happen in sequencer
+ * (e.g. when adding image sequence/movie into sequencer) there'll be only
+ * byte buffer and profile will still indicate sRGB->linear space conversion is needed
+ * here we're ensure there'll be no conversion happen and float buffer would store
+ * linear frame (sergey) */
+ ibuf->profile = IB_PROFILE_NONE;
IMB_float_from_rect(ibuf);
}
@@ -185,7 +192,7 @@ static void screen_opengl_render_apply(OGLRender *oglrender)
float *accum_tmp = MEM_mallocN(sizex * sizey * sizeof(float) * 4, "accum2");
int j;
- BLI_initjit(jit_ofs[0], scene->r.osa);
+ BLI_jitter_init(jit_ofs[0], scene->r.osa);
/* first sample buffer, also initializes 'rv3d->persmat' */
ED_view3d_draw_offscreen(scene, v3d, ar, sizex, sizey, NULL, winmat, TRUE);
@@ -264,7 +271,7 @@ static void screen_opengl_render_apply(OGLRender *oglrender)
}
BKE_makepicstring(name, scene->r.pic, oglrender->bmain->name, scene->r.cfra, scene->r.im_format.imtype, scene->r.scemode & R_EXTENSION, FALSE);
- ok = BKE_write_ibuf_as(ibuf, name, &scene->r.im_format, TRUE); /* no need to stamp here */
+ ok = BKE_imbuf_write_as(ibuf, name, &scene->r.im_format, TRUE); /* no need to stamp here */
if (ok) printf("OpenGL Render written to '%s'\n", name);
else printf("OpenGL Render failed to write '%s'\n", name);
}
@@ -348,7 +355,7 @@ static int screen_opengl_render_init(bContext *C, wmOperator *op)
oglrender->is_sequencer = is_sequencer;
if (is_sequencer) {
- oglrender->sseq = CTX_wm_space_seq(C);;
+ oglrender->sseq = CTX_wm_space_seq(C);
}
@@ -364,7 +371,7 @@ static int screen_opengl_render_init(bContext *C, wmOperator *op)
/* MUST be cleared on exit */
oglrender->scene->customdata_mask_modal = (ED_view3d_datamask(oglrender->scene, oglrender->v3d) |
- ED_view3d_object_datamask(oglrender->scene) );
+ ED_view3d_object_datamask(oglrender->scene));
/* apply immediately in case we're rendering from a script,
* running notifiers again will overwrite */
@@ -406,7 +413,7 @@ static void screen_opengl_render_end(bContext *C, OGLRender *oglrender)
if (oglrender->timer) { /* exec will not have a timer */
scene->r.cfra = oglrender->cfrao;
- scene_update_for_newframe(bmain, scene, screen_opengl_layers(oglrender));
+ BKE_scene_update_for_newframe(bmain, scene, screen_opengl_layers(oglrender));
WM_event_remove_timer(CTX_wm_manager(C), CTX_wm_window(C), oglrender->timer);
}
@@ -444,7 +451,7 @@ static int screen_opengl_render_anim_initialize(bContext *C, wmOperator *op)
scene = oglrender->scene;
oglrender->reports = op->reports;
- oglrender->mh = BKE_get_movie_handle(scene->r.im_format.imtype);
+ oglrender->mh = BKE_movie_handle_get(scene->r.im_format.imtype);
if (BKE_imtype_is_movie(scene->r.im_format.imtype)) {
if (!oglrender->mh->start_movie(scene, &scene->r, oglrender->sizex, oglrender->sizey, oglrender->reports)) {
screen_opengl_render_end(C, oglrender);
@@ -471,7 +478,7 @@ static int screen_opengl_render_anim_step(bContext *C, wmOperator *op)
Object *camera = NULL;
/* update animated image textures for gpu, etc,
- * call before scene_update_for_newframe so modifiers with textures don't lag 1 frame */
+ * call before BKE_scene_update_for_newframe so modifiers with textures don't lag 1 frame */
ED_image_update_frame(bmain, scene->r.cfra);
/* go to next frame */
@@ -481,17 +488,17 @@ static int screen_opengl_render_anim_step(bContext *C, wmOperator *op)
if (lay & 0xFF000000)
lay &= 0xFF000000;
- scene_update_for_newframe(bmain, scene, lay);
+ BKE_scene_update_for_newframe(bmain, scene, lay);
CFRA++;
}
- scene_update_for_newframe(bmain, scene, screen_opengl_layers(oglrender));
+ BKE_scene_update_for_newframe(bmain, scene, screen_opengl_layers(oglrender));
if (view_context) {
if (oglrender->rv3d->persp == RV3D_CAMOB && oglrender->v3d->camera && oglrender->v3d->scenelock) {
- /* since scene_update_for_newframe() is used rather
+ /* since BKE_scene_update_for_newframe() is used rather
* then ED_update_for_newframe() the camera needs to be set */
- if (scene_camera_switch_update(scene)) {
+ if (BKE_scene_camera_switch_update(scene)) {
oglrender->v3d->camera = scene->camera;
}
@@ -499,7 +506,7 @@ static int screen_opengl_render_anim_step(bContext *C, wmOperator *op)
}
}
else {
- scene_camera_switch_update(scene);
+ BKE_scene_camera_switch_update(scene);
camera = scene->camera;
}
@@ -539,7 +546,7 @@ static int screen_opengl_render_anim_step(bContext *C, wmOperator *op)
}
else {
BKE_makepicstring(name, scene->r.pic, oglrender->bmain->name, scene->r.cfra, scene->r.im_format.imtype, scene->r.scemode & R_EXTENSION, TRUE);
- ok = BKE_write_ibuf_stamp(scene, camera, ibuf, name, &scene->r.im_format);
+ ok = BKE_imbuf_write_stamp(scene, camera, ibuf, name, &scene->r.im_format);
if (ok == 0) {
printf("Write error: cannot save %s\n", name);
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c
index 9899f39de75..f7024444e86 100644
--- a/source/blender/editors/render/render_preview.c
+++ b/source/blender/editors/render/render_preview.c
@@ -1,5 +1,4 @@
-/*
- *
+/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -755,13 +754,13 @@ static void shader_preview_free(void *customdata)
/* get rid of copied material */
BLI_remlink(&pr_main->mat, sp->matcopy);
- /* free_material decrements texture, prevent this. hack alert! */
+ /* BKE_material_free decrements texture, prevent this. hack alert! */
for (a = 0; a < MAX_MTEX; a++) {
MTex *mtex = sp->matcopy->mtex[a];
if (mtex && mtex->tex) mtex->tex = NULL;
}
- free_material(sp->matcopy);
+ BKE_material_free(sp->matcopy);
properties = IDP_GetProperties((ID *)sp->matcopy, FALSE);
if (properties) {
@@ -777,7 +776,7 @@ static void shader_preview_free(void *customdata)
/* get rid of copied texture */
BLI_remlink(&pr_main->tex, sp->texcopy);
- free_texture(sp->texcopy);
+ BKE_texture_free(sp->texcopy);
properties = IDP_GetProperties((ID *)sp->texcopy, FALSE);
if (properties) {
@@ -793,7 +792,7 @@ static void shader_preview_free(void *customdata)
/* get rid of copied world */
BLI_remlink(&pr_main->world, sp->worldcopy);
- free_world(sp->worldcopy);
+ BKE_world_free(sp->worldcopy);
properties = IDP_GetProperties((ID *)sp->worldcopy, FALSE);
if (properties) {
@@ -809,7 +808,7 @@ static void shader_preview_free(void *customdata)
/* get rid of copied lamp */
BLI_remlink(&pr_main->lamp, sp->lampcopy);
- free_lamp(sp->lampcopy);
+ BKE_lamp_free(sp->lampcopy);
properties = IDP_GetProperties((ID *)sp->lampcopy, FALSE);
if (properties) {
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c
index 6722ac5e686..ca4683b864c 100644
--- a/source/blender/editors/render/render_shading.c
+++ b/source/blender/editors/render/render_shading.c
@@ -178,7 +178,7 @@ static int material_slot_assign_exec(bContext *C, wmOperator *UNUSED(op))
}
else if (ELEM(ob->type, OB_CURVE, OB_SURF)) {
Nurb *nu;
- ListBase *nurbs = curve_editnurbs((Curve *)ob->data);
+ ListBase *nurbs = BKE_curve_editNurbs_get((Curve *)ob->data);
if (nurbs) {
for (nu = nurbs->first; nu; nu = nu->next)
@@ -190,7 +190,7 @@ static int material_slot_assign_exec(bContext *C, wmOperator *UNUSED(op))
EditFont *ef = ((Curve *)ob->data)->editfont;
int i, selstart, selend;
- if (ef && BKE_font_getselection(ob, &selstart, &selend)) {
+ if (ef && BKE_vfont_select_get(ob, &selstart, &selend)) {
for (i = selstart; i <= selend; i++)
ef->textbufinfo[i].mat_nr = ob->actcol;
}
@@ -233,7 +233,7 @@ static int material_slot_de_select(bContext *C, int select)
}
}
else if (ELEM(ob->type, OB_CURVE, OB_SURF)) {
- ListBase *nurbs = curve_editnurbs((Curve *)ob->data);
+ ListBase *nurbs = BKE_curve_editNurbs_get((Curve *)ob->data);
Nurb *nu;
BPoint *bp;
BezTriple *bezt;
@@ -329,7 +329,8 @@ static int material_slot_copy_exec(bContext *C, wmOperator *UNUSED(op))
if (!ob || !(matar = give_matarar(ob)))
return OPERATOR_CANCELLED;
- CTX_DATA_BEGIN(C, Object *, ob_iter, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object *, ob_iter, selected_editable_objects)
+ {
if (ob != ob_iter && give_matarar(ob_iter)) {
if (ob->data != ob_iter->data)
assign_matarar(ob_iter, matar, ob->totcol);
@@ -371,12 +372,12 @@ static int new_material_exec(bContext *C, wmOperator *UNUSED(op))
/* add or copy material */
if (ma) {
- ma = copy_material(ma);
+ ma = BKE_material_copy(ma);
}
else {
- ma = add_material("Material");
+ ma = BKE_material_add("Material");
- if (scene_use_new_shading_nodes(scene)) {
+ if (BKE_scene_use_new_shading_nodes(scene)) {
ED_node_shader_default(scene, &ma->id);
ma->use_nodes = 1;
}
@@ -424,7 +425,7 @@ static int new_texture_exec(bContext *C, wmOperator *UNUSED(op))
/* add or copy texture */
if (tex)
- tex = copy_texture(tex);
+ tex = BKE_texture_copy(tex);
else
tex = add_texture("Texture");
@@ -471,12 +472,12 @@ static int new_world_exec(bContext *C, wmOperator *UNUSED(op))
/* add or copy world */
if (wo) {
- wo = copy_world(wo);
+ wo = BKE_world_copy(wo);
}
else {
wo = add_world("World");
- if (scene_use_new_shading_nodes(scene)) {
+ if (BKE_scene_use_new_shading_nodes(scene)) {
ED_node_shader_default(scene, &wo->id);
wo->use_nodes = 1;
}
@@ -520,7 +521,7 @@ static int render_layer_add_exec(bContext *C, wmOperator *UNUSED(op))
{
Scene *scene = CTX_data_scene(C);
- scene_add_render_layer(scene, NULL);
+ BKE_scene_add_render_layer(scene, NULL);
scene->r.actlay = BLI_countlist(&scene->r.layers) - 1;
WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
@@ -547,7 +548,7 @@ static int render_layer_remove_exec(bContext *C, wmOperator *UNUSED(op))
Scene *scene = CTX_data_scene(C);
SceneRenderLayer *rl = BLI_findlink(&scene->r.layers, scene->r.actlay);
- if (!scene_remove_render_layer(CTX_data_main(C), scene, rl))
+ if (!BKE_scene_remove_render_layer(CTX_data_main(C), scene, rl))
return OPERATOR_CANCELLED;
WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
diff --git a/source/blender/editors/render/render_update.c b/source/blender/editors/render/render_update.c
index 35b4126339e..48c35873304 100644
--- a/source/blender/editors/render/render_update.c
+++ b/source/blender/editors/render/render_update.c
@@ -116,35 +116,40 @@ void ED_render_scene_update(Main *bmain, Scene *scene, int updated)
CTX_free(C);
}
-void ED_render_engine_changed(Main *bmain)
+void ED_render_engine_area_exit(ScrArea *sa)
{
- /* on changing the render engine type, clear all running render engines */
- bScreen *sc;
- ScrArea *sa;
+ /* clear all render engines in this area */
ARegion *ar;
- for (sc = bmain->screen.first; sc; sc = sc->id.next) {
- for (sa = sc->areabase.first; sa; sa = sa->next) {
- if (sa->spacetype != SPACE_VIEW3D)
- continue;
+ if (sa->spacetype != SPACE_VIEW3D)
+ return;
- for (ar = sa->regionbase.first; ar; ar = ar->next) {
- RegionView3D *rv3d;
+ for (ar = sa->regionbase.first; ar; ar = ar->next) {
+ RegionView3D *rv3d;
- if (ar->regiontype != RGN_TYPE_WINDOW)
- continue;
-
- rv3d = ar->regiondata;
+ if (ar->regiontype != RGN_TYPE_WINDOW)
+ continue;
+
+ rv3d = ar->regiondata;
- if (rv3d->render_engine) {
- RE_engine_free(rv3d->render_engine);
- rv3d->render_engine = NULL;
- }
- }
+ if (rv3d->render_engine) {
+ RE_engine_free(rv3d->render_engine);
+ rv3d->render_engine = NULL;
}
}
}
+void ED_render_engine_changed(Main *bmain)
+{
+ /* on changing the render engine type, clear all running render engines */
+ bScreen *sc;
+ ScrArea *sa;
+
+ for (sc = bmain->screen.first; sc; sc = sc->id.next)
+ for (sa = sc->areabase.first; sa; sa = sa->next)
+ ED_render_engine_area_exit(sa);
+}
+
/***************************** Updates ***********************************
* ED_render_id_flush_update gets called from DAG_id_tag_update, to do *
* editor level updates when the ID changes. when these ID blocks are in *
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index bed17048ea1..0f286d91613 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -80,34 +80,34 @@ static void region_draw_emboss(ARegion *ar, rcti *scirct)
rect.ymax = scirct->ymax - ar->winrct.ymin;
/* set transp line */
- glEnable( GL_BLEND );
- glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
+ glEnable(GL_BLEND);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
/* right */
- glColor4ub(0,0,0, 30);
+ glColor4ub(0, 0, 0, 30);
sdrawline(rect.xmax, rect.ymin, rect.xmax, rect.ymax);
/* bottom */
- glColor4ub(0,0,0, 30);
+ glColor4ub(0, 0, 0, 30);
sdrawline(rect.xmin, rect.ymin, rect.xmax, rect.ymin);
/* top */
- glColor4ub(255,255,255, 30);
+ glColor4ub(255, 255, 255, 30);
sdrawline(rect.xmin, rect.ymax, rect.xmax, rect.ymax);
/* left */
- glColor4ub(255,255,255, 30);
+ glColor4ub(255, 255, 255, 30);
sdrawline(rect.xmin, rect.ymin, rect.xmin, rect.ymax);
- glDisable( GL_BLEND );
+ glDisable(GL_BLEND);
}
void ED_region_pixelspace(ARegion *ar)
{
- int width= ar->winrct.xmax-ar->winrct.xmin+1;
- int height= ar->winrct.ymax-ar->winrct.ymin+1;
+ int width = ar->winrct.xmax - ar->winrct.xmin + 1;
+ int height = ar->winrct.ymax - ar->winrct.ymin + 1;
- wmOrtho2(-0.375f, (float)width-0.375f, -0.375f, (float)height-0.375f);
+ wmOrtho2(-0.375f, (float)width - 0.375f, -0.375f, (float)height - 0.375f);
glLoadIdentity();
}
@@ -115,9 +115,9 @@ void ED_region_pixelspace(ARegion *ar)
void ED_region_do_listen(ARegion *ar, wmNotifier *note)
{
/* generic notes first */
- switch(note->category) {
+ switch (note->category) {
case NC_WM:
- if (note->data==ND_FILEREAD)
+ if (note->data == ND_FILEREAD)
ED_region_tag_redraw(ar);
break;
case NC_WINDOW:
@@ -145,7 +145,7 @@ void ED_area_do_refresh(bContext *C, ScrArea *sa)
if (sa->type && sa->type->refresh) {
sa->type->refresh(C, sa);
}
- sa->do_refresh= 0;
+ sa->do_refresh = 0;
}
/* based on screen region draw tags, set draw tags in azones, and future region tabs etc */
@@ -154,15 +154,15 @@ void ED_area_overdraw_flush(ScrArea *sa, ARegion *ar)
{
AZone *az;
- for (az= sa->actionzones.first; az; az= az->next) {
+ for (az = sa->actionzones.first; az; az = az->next) {
int xs, ys;
- xs= (az->x1+az->x2)/2;
- ys= (az->y1+az->y2)/2;
+ xs = (az->x1 + az->x2) / 2;
+ ys = (az->y1 + az->y2) / 2;
/* test if inside */
if (BLI_in_rcti(&ar->winrct, xs, ys)) {
- az->do_draw= 1;
+ az->do_draw = 1;
}
}
}
@@ -172,8 +172,8 @@ static void area_draw_azone(short x1, short y1, short x2, short y2)
int dx = x2 - x1;
int dy = y2 - y1;
- dx= copysign(ceil(0.3f*fabs(dx)), dx);
- dy= copysign(ceil(0.3f*fabs(dy)), dy);
+ dx = copysign(ceilf(0.3f * fabsf(dx)), dx);
+ dy = copysign(ceilf(0.3f * fabsf(dy)), dy);
glEnable(GL_BLEND);
glEnable(GL_LINE_SMOOTH);
@@ -181,16 +181,16 @@ static void area_draw_azone(short x1, short y1, short x2, short y2)
glColor4ub(255, 255, 255, 180);
fdrawline(x1, y2, x2, y1);
glColor4ub(255, 255, 255, 130);
- fdrawline(x1, y2-dy, x2-dx, y1);
+ fdrawline(x1, y2 - dy, x2 - dx, y1);
glColor4ub(255, 255, 255, 80);
- fdrawline(x1, y2-2*dy, x2-2*dx, y1);
+ fdrawline(x1, y2 - 2 * dy, x2 - 2 * dx, y1);
glColor4ub(0, 0, 0, 210);
- fdrawline(x1, y2+1, x2+1, y1);
+ fdrawline(x1, y2 + 1, x2 + 1, y1);
glColor4ub(0, 0, 0, 180);
- fdrawline(x1, y2-dy+1, x2-dx+1, y1);
+ fdrawline(x1, y2 - dy + 1, x2 - dx + 1, y1);
glColor4ub(0, 0, 0, 150);
- fdrawline(x1, y2-2*dy+1, x2-2*dx+1, y1);
+ fdrawline(x1, y2 - 2 * dy + 1, x2 - 2 * dx + 1, y1);
glDisable(GL_LINE_SMOOTH);
glDisable(GL_BLEND);
@@ -199,8 +199,8 @@ static void area_draw_azone(short x1, short y1, short x2, short y2)
static void region_draw_azone_icon(AZone *az)
{
GLUquadricObj *qobj = NULL;
- short midx = az->x1 + (az->x2 - az->x1)/2;
- short midy = az->y1 + (az->y2 - az->y1)/2;
+ short midx = az->x1 + (az->x2 - az->x1) / 2;
+ short midy = az->y1 + (az->y2 - az->y1) / 2;
qobj = gluNewQuadric();
@@ -213,12 +213,12 @@ static void region_draw_azone_icon(AZone *az)
glColor4f(1.f, 1.f, 1.f, 0.8f);
gluQuadricDrawStyle(qobj, GLU_FILL);
- gluDisk( qobj, 0.0, 4.25f, 16, 1);
+ gluDisk(qobj, 0.0, 4.25f, 16, 1);
glColor4f(0.2f, 0.2f, 0.2f, 0.9f);
gluQuadricDrawStyle(qobj, GLU_SILHOUETTE);
- gluDisk( qobj, 0.0, 4.25f, 16, 1);
+ gluDisk(qobj, 0.0, 4.25f, 16, 1);
glDisable(GL_LINE_SMOOTH);
@@ -226,8 +226,8 @@ static void region_draw_azone_icon(AZone *az)
gluDeleteQuadric(qobj);
/* + */
- sdrawline(midx, midy-2, midx, midy+3);
- sdrawline(midx-2, midy, midx+3, midy);
+ sdrawline(midx, midy - 2, midx, midy + 3);
+ sdrawline(midx - 2, midy, midx + 3, midy);
}
static void draw_azone_plus(float x1, float y1, float x2, float y2)
@@ -235,9 +235,9 @@ static void draw_azone_plus(float x1, float y1, float x2, float y2)
float width = 2.0f;
float pad = 4.0f;
- glRectf((x1 + x2 - width)*0.5f, y1 + pad, (x1 + x2 + width)*0.5f, y2 - pad);
- glRectf(x1 + pad, (y1 + y2 - width)*0.5f, (x1 + x2 - width)*0.5f, (y1 + y2 + width)*0.5f);
- glRectf((x1 + x2 + width)*0.5f, (y1 + y2 - width)*0.5f, x2 - pad, (y1 + y2 + width)*0.5f);
+ glRectf((x1 + x2 - width) * 0.5f, y1 + pad, (x1 + x2 + width) * 0.5f, y2 - pad);
+ glRectf(x1 + pad, (y1 + y2 - width) * 0.5f, (x1 + x2 - width) * 0.5f, (y1 + y2 + width) * 0.5f);
+ glRectf((x1 + x2 + width) * 0.5f, (y1 + y2 - width) * 0.5f, x2 - pad, (y1 + y2 + width) * 0.5f);
}
static void region_draw_azone_tab_plus(AZone *az)
@@ -247,7 +247,7 @@ static void region_draw_azone_tab_plus(AZone *az)
glEnable(GL_BLEND);
/* add code to draw region hidden as 'too small' */
- switch(az->edge) {
+ switch (az->edge) {
case AE_TOP_TO_BOTTOMRIGHT:
uiSetRoundBox(UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT);
break;
@@ -282,20 +282,20 @@ static void region_draw_azone_tab(AZone *az)
glColor4f(col[0], col[1], col[2], 0.5f);
/* add code to draw region hidden as 'too small' */
- switch(az->edge) {
+ switch (az->edge) {
case AE_TOP_TO_BOTTOMRIGHT:
uiSetRoundBox(UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT | UI_RB_ALPHA);
uiDrawBoxShade(GL_POLYGON, (float)az->x1, (float)az->y1, (float)az->x2, (float)az->y2, 4.0f, -0.3f, 0.05f);
glColor4ub(0, 0, 0, 255);
- uiRoundRect((float)az->x1, 0.3f+(float)az->y1, (float)az->x2, 0.3f+(float)az->y2, 4.0f);
+ uiRoundRect((float)az->x1, 0.3f + (float)az->y1, (float)az->x2, 0.3f + (float)az->y2, 4.0f);
break;
case AE_BOTTOM_TO_TOPLEFT:
uiSetRoundBox(UI_CNR_BOTTOM_RIGHT | UI_CNR_BOTTOM_LEFT | UI_RB_ALPHA);
uiDrawBoxShade(GL_POLYGON, (float)az->x1, (float)az->y1, (float)az->x2, (float)az->y2, 4.0f, -0.3f, 0.05f);
glColor4ub(0, 0, 0, 255);
- uiRoundRect((float)az->x1, 0.3f+(float)az->y1, (float)az->x2, 0.3f+(float)az->y2, 4.0f);
+ uiRoundRect((float)az->x1, 0.3f + (float)az->y1, (float)az->x2, 0.3f + (float)az->y2, 4.0f);
break;
case AE_LEFT_TO_TOPRIGHT:
uiSetRoundBox(UI_CNR_TOP_LEFT | UI_CNR_BOTTOM_LEFT | UI_RB_ALPHA);
@@ -325,21 +325,21 @@ static void region_draw_azone_tria(AZone *az)
glColor4f(0.0f, 0.0f, 0.0f, 0.35f);
/* add code to draw region hidden as 'too small' */
- switch(az->edge) {
+ switch (az->edge) {
case AE_TOP_TO_BOTTOMRIGHT:
- ui_draw_anti_tria((float)az->x1, (float)az->y1, (float)az->x2, (float)az->y1, (float)(az->x1+az->x2)/2, (float)az->y2);
+ ui_draw_anti_tria((float)az->x1, (float)az->y1, (float)az->x2, (float)az->y1, (float)(az->x1 + az->x2) / 2, (float)az->y2);
break;
case AE_BOTTOM_TO_TOPLEFT:
- ui_draw_anti_tria((float)az->x1, (float)az->y2, (float)az->x2, (float)az->y2, (float)(az->x1+az->x2)/2, (float)az->y1);
+ ui_draw_anti_tria((float)az->x1, (float)az->y2, (float)az->x2, (float)az->y2, (float)(az->x1 + az->x2) / 2, (float)az->y1);
break;
case AE_LEFT_TO_TOPRIGHT:
- ui_draw_anti_tria((float)az->x2, (float)az->y1, (float)az->x2, (float)az->y2, (float)az->x1, (float)(az->y1+az->y2)/2);
+ ui_draw_anti_tria((float)az->x2, (float)az->y1, (float)az->x2, (float)az->y2, (float)az->x1, (float)(az->y1 + az->y2) / 2);
break;
case AE_RIGHT_TO_TOPLEFT:
- ui_draw_anti_tria((float)az->x1, (float)az->y1, (float)az->x1, (float)az->y2, (float)az->x2, (float)(az->y1+az->y2)/2);
+ ui_draw_anti_tria((float)az->x1, (float)az->y1, (float)az->x1, (float)az->y2, (float)az->x2, (float)(az->y1 + az->y2) / 2);
break;
}
@@ -350,33 +350,33 @@ static void region_draw_azone_tria(AZone *az)
/* only exported for WM */
void ED_area_overdraw(bContext *C)
{
- wmWindow *win= CTX_wm_window(C);
- bScreen *screen= CTX_wm_screen(C);
+ wmWindow *win = CTX_wm_window(C);
+ bScreen *screen = CTX_wm_screen(C);
ScrArea *sa;
/* Draw AZones, in screenspace */
wmSubWindowSet(win, screen->mainwin);
- glEnable( GL_BLEND );
- glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
+ glEnable(GL_BLEND);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- for (sa= screen->areabase.first; sa; sa= sa->next) {
+ for (sa = screen->areabase.first; sa; sa = sa->next) {
AZone *az;
- for (az= sa->actionzones.first; az; az= az->next) {
+ for (az = sa->actionzones.first; az; az = az->next) {
if (az->do_draw) {
- if (az->type==AZONE_AREA) {
+ if (az->type == AZONE_AREA) {
area_draw_azone(az->x1, az->y1, az->x2, az->y2);
}
- else if (az->type==AZONE_REGION) {
+ else if (az->type == AZONE_REGION) {
if (az->ar) {
/* only display tab or icons when the region is hidden */
- if (az->ar->flag & (RGN_FLAG_HIDDEN|RGN_FLAG_TOO_SMALL)) {
- if (G.rt==3)
+ if (az->ar->flag & (RGN_FLAG_HIDDEN | RGN_FLAG_TOO_SMALL)) {
+ if (G.rt == 3)
region_draw_azone_icon(az);
- else if (G.rt==2)
+ else if (G.rt == 2)
region_draw_azone_tria(az);
- else if (G.rt==1)
+ else if (G.rt == 1)
region_draw_azone_tab(az);
else
region_draw_azone_tab_plus(az);
@@ -384,32 +384,32 @@ void ED_area_overdraw(bContext *C)
}
}
- az->do_draw= 0;
+ az->do_draw = 0;
}
}
}
- glDisable( GL_BLEND );
+ glDisable(GL_BLEND);
}
/* get scissor rect, checking overlapping regions */
void region_scissor_winrct(ARegion *ar, rcti *winrct)
{
- *winrct= ar->winrct;
+ *winrct = ar->winrct;
if (ELEM(ar->alignment, RGN_OVERLAP_LEFT, RGN_OVERLAP_RIGHT))
return;
while (ar->prev) {
- ar= ar->prev;
+ ar = ar->prev;
if (BLI_isect_rcti(winrct, &ar->winrct, NULL)) {
- if (ar->flag & RGN_FLAG_HIDDEN);
- else if (ar->alignment & RGN_SPLIT_PREV);
- else if (ar->alignment==RGN_OVERLAP_LEFT) {
+ if (ar->flag & RGN_FLAG_HIDDEN) ;
+ else if (ar->alignment & RGN_SPLIT_PREV) ;
+ else if (ar->alignment == RGN_OVERLAP_LEFT) {
winrct->xmin = ar->winrct.xmax + 1;
}
- else if (ar->alignment==RGN_OVERLAP_RIGHT) {
+ else if (ar->alignment == RGN_OVERLAP_RIGHT) {
winrct->xmax = ar->winrct.xmin - 1;
}
else break;
@@ -421,19 +421,19 @@ void region_scissor_winrct(ARegion *ar, rcti *winrct)
/* makes region ready for drawing, sets pixelspace */
void ED_region_set(const bContext *C, ARegion *ar)
{
- wmWindow *win= CTX_wm_window(C);
- ScrArea *sa= CTX_wm_area(C);
+ wmWindow *win = CTX_wm_window(C);
+ ScrArea *sa = CTX_wm_area(C);
rcti winrct;
/* checks other overlapping regions */
region_scissor_winrct(ar, &winrct);
- ar->drawrct= winrct;
+ ar->drawrct = winrct;
/* note; this sets state, so we can use wmOrtho and friends */
wmSubWindowScissorSet(win, ar->swinid, &ar->drawrct);
- UI_SetTheme(sa?sa->spacetype:0, ar->type?ar->type->regionid:0);
+ UI_SetTheme(sa ? sa->spacetype : 0, ar->type ? ar->type->regionid : 0);
ED_region_pixelspace(ar);
}
@@ -442,9 +442,9 @@ void ED_region_set(const bContext *C, ARegion *ar)
/* only exported for WM */
void ED_region_do_draw(bContext *C, ARegion *ar)
{
- wmWindow *win= CTX_wm_window(C);
- ScrArea *sa= CTX_wm_area(C);
- ARegionType *at= ar->type;
+ wmWindow *win = CTX_wm_window(C);
+ ScrArea *sa = CTX_wm_area(C);
+ ARegionType *at = ar->type;
rcti winrct;
/* see BKE_spacedata_draw_locks() */
@@ -456,7 +456,7 @@ void ED_region_do_draw(bContext *C, ARegion *ar)
/* if no partial draw rect set, full rect */
if (ar->drawrct.xmin == ar->drawrct.xmax)
- ar->drawrct= winrct;
+ ar->drawrct = winrct;
else {
/* extra clip for safety */
ar->drawrct.xmin = MAX2(winrct.xmin, ar->drawrct.xmin);
@@ -468,7 +468,7 @@ void ED_region_do_draw(bContext *C, ARegion *ar)
/* note; this sets state, so we can use wmOrtho and friends */
wmSubWindowScissorSet(win, ar->swinid, &ar->drawrct);
- UI_SetTheme(sa?sa->spacetype:0, ar->type?ar->type->regionid:0);
+ UI_SetTheme(sa ? sa->spacetype : 0, ar->type ? ar->type->regionid : 0);
/* optional header info instead? */
if (ar->headerstr) {
@@ -487,7 +487,7 @@ void ED_region_do_draw(bContext *C, ARegion *ar)
ED_region_draw_cb_draw(C, ar, REGION_DRAW_POST_PIXEL);
- ar->do_draw= 0;
+ ar->do_draw = 0;
memset(&ar->drawrct, 0, sizeof(ar->drawrct));
uiFreeInactiveBlocks(C, &ar->uiblocks);
@@ -505,7 +505,7 @@ void ED_region_tag_redraw(ARegion *ar)
{
if (ar) {
/* zero region means full region redraw */
- ar->do_draw= RGN_DRAW;
+ ar->do_draw = RGN_DRAW;
memset(&ar->drawrct, 0, sizeof(ar->drawrct));
}
}
@@ -513,7 +513,7 @@ void ED_region_tag_redraw(ARegion *ar)
void ED_region_tag_redraw_overlay(ARegion *ar)
{
if (ar)
- ar->do_draw_overlay= RGN_DRAW;
+ ar->do_draw_overlay = RGN_DRAW;
}
void ED_region_tag_redraw_partial(ARegion *ar, rcti *rct)
@@ -521,8 +521,8 @@ void ED_region_tag_redraw_partial(ARegion *ar, rcti *rct)
if (ar) {
if (!ar->do_draw) {
/* no redraw set yet, set partial region */
- ar->do_draw= RGN_DRAW_PARTIAL;
- ar->drawrct= *rct;
+ ar->do_draw = RGN_DRAW_PARTIAL;
+ ar->drawrct = *rct;
}
else if (ar->drawrct.xmin != ar->drawrct.xmax) {
/* partial redraw already set, expand region */
@@ -539,7 +539,7 @@ void ED_area_tag_redraw(ScrArea *sa)
ARegion *ar;
if (sa)
- for (ar= sa->regionbase.first; ar; ar= ar->next)
+ for (ar = sa->regionbase.first; ar; ar = ar->next)
ED_region_tag_redraw(ar);
}
@@ -548,7 +548,7 @@ void ED_area_tag_redraw_regiontype(ScrArea *sa, int regiontype)
ARegion *ar;
if (sa) {
- for (ar= sa->regionbase.first; ar; ar= ar->next) {
+ for (ar = sa->regionbase.first; ar; ar = ar->next) {
if (ar->regiontype == regiontype) {
ED_region_tag_redraw(ar);
}
@@ -559,7 +559,7 @@ void ED_area_tag_redraw_regiontype(ScrArea *sa, int regiontype)
void ED_area_tag_refresh(ScrArea *sa)
{
if (sa)
- sa->do_refresh= 1;
+ sa->do_refresh = 1;
}
/* *************************************************************** */
@@ -573,16 +573,16 @@ void ED_area_headerprint(ScrArea *sa, const char *str)
if (sa == NULL)
return;
- for (ar= sa->regionbase.first; ar; ar= ar->next) {
- if (ar->regiontype==RGN_TYPE_HEADER) {
+ for (ar = sa->regionbase.first; ar; ar = ar->next) {
+ if (ar->regiontype == RGN_TYPE_HEADER) {
if (str) {
- if (ar->headerstr==NULL)
- ar->headerstr= MEM_mallocN(256, "headerprint");
+ if (ar->headerstr == NULL)
+ ar->headerstr = MEM_mallocN(256, "headerprint");
BLI_strncpy(ar->headerstr, str, 256);
}
else if (ar->headerstr) {
MEM_freeN(ar->headerstr);
- ar->headerstr= NULL;
+ ar->headerstr = NULL;
}
ED_region_tag_redraw(ar);
}
@@ -600,53 +600,53 @@ static void area_azone_initialize(ScrArea *sa)
BLI_freelistN(&sa->actionzones);
/* set area action zones */
- az= (AZone *)MEM_callocN(sizeof(AZone), "actionzone");
+ az = (AZone *)MEM_callocN(sizeof(AZone), "actionzone");
BLI_addtail(&(sa->actionzones), az);
- az->type= AZONE_AREA;
- az->x1= sa->totrct.xmin - 1;
- az->y1= sa->totrct.ymin - 1;
- az->x2= sa->totrct.xmin + (AZONESPOT-1);
- az->y2= sa->totrct.ymin + (AZONESPOT-1);
+ az->type = AZONE_AREA;
+ az->x1 = sa->totrct.xmin - 1;
+ az->y1 = sa->totrct.ymin - 1;
+ az->x2 = sa->totrct.xmin + (AZONESPOT - 1);
+ az->y2 = sa->totrct.ymin + (AZONESPOT - 1);
BLI_init_rcti(&az->rect, az->x1, az->x2, az->y1, az->y2);
- az= (AZone *)MEM_callocN(sizeof(AZone), "actionzone");
+ az = (AZone *)MEM_callocN(sizeof(AZone), "actionzone");
BLI_addtail(&(sa->actionzones), az);
- az->type= AZONE_AREA;
- az->x1= sa->totrct.xmax + 1;
- az->y1= sa->totrct.ymax + 1;
- az->x2= sa->totrct.xmax - (AZONESPOT-1);
- az->y2= sa->totrct.ymax - (AZONESPOT-1);
+ az->type = AZONE_AREA;
+ az->x1 = sa->totrct.xmax + 1;
+ az->y1 = sa->totrct.ymax + 1;
+ az->x2 = sa->totrct.xmax - (AZONESPOT - 1);
+ az->y2 = sa->totrct.ymax - (AZONESPOT - 1);
BLI_init_rcti(&az->rect, az->x1, az->x2, az->y1, az->y2);
}
-#define AZONEPAD_EDGE 4
-#define AZONEPAD_ICON 9
+#define AZONEPAD_EDGE 4
+#define AZONEPAD_ICON 9
static void region_azone_edge(AZone *az, ARegion *ar)
{
- switch(az->edge) {
+ switch (az->edge) {
case AE_TOP_TO_BOTTOMRIGHT:
- az->x1= ar->winrct.xmin;
- az->y1= ar->winrct.ymax - AZONEPAD_EDGE;
- az->x2= ar->winrct.xmax;
- az->y2= ar->winrct.ymax;
+ az->x1 = ar->winrct.xmin;
+ az->y1 = ar->winrct.ymax - AZONEPAD_EDGE;
+ az->x2 = ar->winrct.xmax;
+ az->y2 = ar->winrct.ymax;
break;
case AE_BOTTOM_TO_TOPLEFT:
- az->x1= ar->winrct.xmin;
- az->y1= ar->winrct.ymin + AZONEPAD_EDGE;
- az->x2= ar->winrct.xmax;
- az->y2= ar->winrct.ymin;
+ az->x1 = ar->winrct.xmin;
+ az->y1 = ar->winrct.ymin + AZONEPAD_EDGE;
+ az->x2 = ar->winrct.xmax;
+ az->y2 = ar->winrct.ymin;
break;
case AE_LEFT_TO_TOPRIGHT:
- az->x1= ar->winrct.xmin;
- az->y1= ar->winrct.ymin;
- az->x2= ar->winrct.xmin + AZONEPAD_EDGE;
- az->y2= ar->winrct.ymax;
+ az->x1 = ar->winrct.xmin;
+ az->y1 = ar->winrct.ymin;
+ az->x2 = ar->winrct.xmin + AZONEPAD_EDGE;
+ az->y2 = ar->winrct.ymax;
break;
case AE_RIGHT_TO_TOPLEFT:
- az->x1= ar->winrct.xmax;
- az->y1= ar->winrct.ymin;
- az->x2= ar->winrct.xmax - AZONEPAD_EDGE;
- az->y2= ar->winrct.ymax;
+ az->x1 = ar->winrct.xmax;
+ az->y1 = ar->winrct.ymin;
+ az->x2 = ar->winrct.xmax - AZONEPAD_EDGE;
+ az->y2 = ar->winrct.ymax;
break;
}
@@ -656,55 +656,55 @@ static void region_azone_edge(AZone *az, ARegion *ar)
static void region_azone_icon(ScrArea *sa, AZone *az, ARegion *ar)
{
AZone *azt;
- int tot=0;
+ int tot = 0;
/* count how many actionzones with along same edge are available.
* This allows for adding more action zones in the future without
* having to worry about correct offset */
- for (azt= sa->actionzones.first; azt; azt= azt->next) {
+ for (azt = sa->actionzones.first; azt; azt = azt->next) {
if (azt->edge == az->edge) tot++;
}
- switch(az->edge) {
+ switch (az->edge) {
case AE_TOP_TO_BOTTOMRIGHT:
- az->x1= ar->winrct.xmax - tot*2*AZONEPAD_ICON;
- az->y1= ar->winrct.ymax + AZONEPAD_ICON;
- az->x2= ar->winrct.xmax - tot*AZONEPAD_ICON;
- az->y2= ar->winrct.ymax + 2*AZONEPAD_ICON;
+ az->x1 = ar->winrct.xmax - tot * 2 * AZONEPAD_ICON;
+ az->y1 = ar->winrct.ymax + AZONEPAD_ICON;
+ az->x2 = ar->winrct.xmax - tot * AZONEPAD_ICON;
+ az->y2 = ar->winrct.ymax + 2 * AZONEPAD_ICON;
break;
case AE_BOTTOM_TO_TOPLEFT:
- az->x1= ar->winrct.xmin + AZONEPAD_ICON;
- az->y1= ar->winrct.ymin - 2*AZONEPAD_ICON;
- az->x2= ar->winrct.xmin + 2*AZONEPAD_ICON;
- az->y2= ar->winrct.ymin - AZONEPAD_ICON;
+ az->x1 = ar->winrct.xmin + AZONEPAD_ICON;
+ az->y1 = ar->winrct.ymin - 2 * AZONEPAD_ICON;
+ az->x2 = ar->winrct.xmin + 2 * AZONEPAD_ICON;
+ az->y2 = ar->winrct.ymin - AZONEPAD_ICON;
break;
case AE_LEFT_TO_TOPRIGHT:
- az->x1= ar->winrct.xmin - 2*AZONEPAD_ICON;
- az->y1= ar->winrct.ymax - tot*2*AZONEPAD_ICON;
- az->x2= ar->winrct.xmin - AZONEPAD_ICON;
- az->y2= ar->winrct.ymax - tot*AZONEPAD_ICON;
+ az->x1 = ar->winrct.xmin - 2 * AZONEPAD_ICON;
+ az->y1 = ar->winrct.ymax - tot * 2 * AZONEPAD_ICON;
+ az->x2 = ar->winrct.xmin - AZONEPAD_ICON;
+ az->y2 = ar->winrct.ymax - tot * AZONEPAD_ICON;
break;
case AE_RIGHT_TO_TOPLEFT:
- az->x1= ar->winrct.xmax + AZONEPAD_ICON;
- az->y1= ar->winrct.ymax - tot*2*AZONEPAD_ICON;
- az->x2= ar->winrct.xmax + 2*AZONEPAD_ICON;
- az->y2= ar->winrct.ymax - tot*AZONEPAD_ICON;
+ az->x1 = ar->winrct.xmax + AZONEPAD_ICON;
+ az->y1 = ar->winrct.ymax - tot * 2 * AZONEPAD_ICON;
+ az->x2 = ar->winrct.xmax + 2 * AZONEPAD_ICON;
+ az->y2 = ar->winrct.ymax - tot * AZONEPAD_ICON;
break;
}
BLI_init_rcti(&az->rect, az->x1, az->x2, az->y1, az->y2);
/* if more azones on 1 spot, set offset */
- for (azt= sa->actionzones.first; azt; azt= azt->next) {
- if (az!=azt) {
- if ( ABS(az->x1-azt->x1) < 2 && ABS(az->y1-azt->y1) < 2) {
- if (az->edge==AE_TOP_TO_BOTTOMRIGHT || az->edge==AE_BOTTOM_TO_TOPLEFT) {
- az->x1+= AZONESPOT;
- az->x2+= AZONESPOT;
+ for (azt = sa->actionzones.first; azt; azt = azt->next) {
+ if (az != azt) {
+ if (ABS(az->x1 - azt->x1) < 2 && ABS(az->y1 - azt->y1) < 2) {
+ if (az->edge == AE_TOP_TO_BOTTOMRIGHT || az->edge == AE_BOTTOM_TO_TOPLEFT) {
+ az->x1 += AZONESPOT;
+ az->x2 += AZONESPOT;
}
else {
- az->y1-= AZONESPOT;
- az->y2-= AZONESPOT;
+ az->y1 -= AZONESPOT;
+ az->y2 -= AZONESPOT;
}
BLI_init_rcti(&az->rect, az->x1, az->x2, az->y1, az->y2);
}
@@ -712,44 +712,44 @@ static void region_azone_icon(ScrArea *sa, AZone *az, ARegion *ar)
}
}
-#define AZONEPAD_TAB_PLUSW 14
-#define AZONEPAD_TAB_PLUSH 14
+#define AZONEPAD_TAB_PLUSW 14
+#define AZONEPAD_TAB_PLUSH 14
/* region already made zero sized, in shape of edge */
static void region_azone_tab_plus(ScrArea *sa, AZone *az, ARegion *ar)
{
AZone *azt;
- int tot= 0, add;
+ int tot = 0, add;
- for (azt= sa->actionzones.first; azt; azt= azt->next) {
+ for (azt = sa->actionzones.first; azt; azt = azt->next) {
if (azt->edge == az->edge) tot++;
}
- switch(az->edge) {
+ switch (az->edge) {
case AE_TOP_TO_BOTTOMRIGHT:
- if (ar->winrct.ymax == sa->totrct.ymin) add= 1; else add= 0;
- az->x1= ar->winrct.xmax - 2.5*AZONEPAD_TAB_PLUSW;
- az->y1= ar->winrct.ymax - add;
- az->x2= ar->winrct.xmax - 1.5*AZONEPAD_TAB_PLUSW;
- az->y2= ar->winrct.ymax - add + AZONEPAD_TAB_PLUSH;
+ if (ar->winrct.ymax == sa->totrct.ymin) add = 1; else add = 0;
+ az->x1 = ar->winrct.xmax - 2.5 * AZONEPAD_TAB_PLUSW;
+ az->y1 = ar->winrct.ymax - add;
+ az->x2 = ar->winrct.xmax - 1.5 * AZONEPAD_TAB_PLUSW;
+ az->y2 = ar->winrct.ymax - add + AZONEPAD_TAB_PLUSH;
break;
case AE_BOTTOM_TO_TOPLEFT:
- az->x1= ar->winrct.xmax - 2.5*AZONEPAD_TAB_PLUSW;
- az->y1= ar->winrct.ymin - AZONEPAD_TAB_PLUSH;
- az->x2= ar->winrct.xmax - 1.5*AZONEPAD_TAB_PLUSW;
- az->y2= ar->winrct.ymin;
+ az->x1 = ar->winrct.xmax - 2.5 * AZONEPAD_TAB_PLUSW;
+ az->y1 = ar->winrct.ymin - AZONEPAD_TAB_PLUSH;
+ az->x2 = ar->winrct.xmax - 1.5 * AZONEPAD_TAB_PLUSW;
+ az->y2 = ar->winrct.ymin;
break;
case AE_LEFT_TO_TOPRIGHT:
- az->x1= ar->winrct.xmin - AZONEPAD_TAB_PLUSH;
- az->y1= ar->winrct.ymax - 2.5*AZONEPAD_TAB_PLUSW;
- az->x2= ar->winrct.xmin;
- az->y2= ar->winrct.ymax - 1.5*AZONEPAD_TAB_PLUSW;
+ az->x1 = ar->winrct.xmin - AZONEPAD_TAB_PLUSH;
+ az->y1 = ar->winrct.ymax - 2.5 * AZONEPAD_TAB_PLUSW;
+ az->x2 = ar->winrct.xmin;
+ az->y2 = ar->winrct.ymax - 1.5 * AZONEPAD_TAB_PLUSW;
break;
case AE_RIGHT_TO_TOPLEFT:
- az->x1= ar->winrct.xmax - 1;
- az->y1= ar->winrct.ymax - 2.5*AZONEPAD_TAB_PLUSW;
- az->x2= ar->winrct.xmax - 1 + AZONEPAD_TAB_PLUSH;
- az->y2= ar->winrct.ymax - 1.5*AZONEPAD_TAB_PLUSW;
+ az->x1 = ar->winrct.xmax - 1;
+ az->y1 = ar->winrct.ymax - 2.5 * AZONEPAD_TAB_PLUSW;
+ az->x2 = ar->winrct.xmax - 1 + AZONEPAD_TAB_PLUSH;
+ az->y2 = ar->winrct.ymax - 1.5 * AZONEPAD_TAB_PLUSW;
break;
}
/* rect needed for mouse pointer test */
@@ -757,89 +757,89 @@ static void region_azone_tab_plus(ScrArea *sa, AZone *az, ARegion *ar)
}
-#define AZONEPAD_TABW 18
-#define AZONEPAD_TABH 7
+#define AZONEPAD_TABW 18
+#define AZONEPAD_TABH 7
/* region already made zero sized, in shape of edge */
static void region_azone_tab(ScrArea *sa, AZone *az, ARegion *ar)
{
AZone *azt;
- int tot= 0, add;
+ int tot = 0, add;
- for (azt= sa->actionzones.first; azt; azt= azt->next) {
+ for (azt = sa->actionzones.first; azt; azt = azt->next) {
if (azt->edge == az->edge) tot++;
}
- switch(az->edge) {
+ switch (az->edge) {
case AE_TOP_TO_BOTTOMRIGHT:
- if (ar->winrct.ymax == sa->totrct.ymin) add= 1; else add= 0;
- az->x1= ar->winrct.xmax - 2*AZONEPAD_TABW;
- az->y1= ar->winrct.ymax - add;
- az->x2= ar->winrct.xmax - AZONEPAD_TABW;
- az->y2= ar->winrct.ymax - add + AZONEPAD_TABH;
+ if (ar->winrct.ymax == sa->totrct.ymin) add = 1; else add = 0;
+ az->x1 = ar->winrct.xmax - 2 * AZONEPAD_TABW;
+ az->y1 = ar->winrct.ymax - add;
+ az->x2 = ar->winrct.xmax - AZONEPAD_TABW;
+ az->y2 = ar->winrct.ymax - add + AZONEPAD_TABH;
break;
case AE_BOTTOM_TO_TOPLEFT:
- az->x1= ar->winrct.xmin + AZONEPAD_TABW;
- az->y1= ar->winrct.ymin - AZONEPAD_TABH;
- az->x2= ar->winrct.xmin + 2*AZONEPAD_TABW;
- az->y2= ar->winrct.ymin;
+ az->x1 = ar->winrct.xmin + AZONEPAD_TABW;
+ az->y1 = ar->winrct.ymin - AZONEPAD_TABH;
+ az->x2 = ar->winrct.xmin + 2 * AZONEPAD_TABW;
+ az->y2 = ar->winrct.ymin;
break;
case AE_LEFT_TO_TOPRIGHT:
- az->x1= ar->winrct.xmin + 1 - AZONEPAD_TABH;
- az->y1= ar->winrct.ymax - 2*AZONEPAD_TABW;
- az->x2= ar->winrct.xmin + 1;
- az->y2= ar->winrct.ymax - AZONEPAD_TABW;
+ az->x1 = ar->winrct.xmin + 1 - AZONEPAD_TABH;
+ az->y1 = ar->winrct.ymax - 2 * AZONEPAD_TABW;
+ az->x2 = ar->winrct.xmin + 1;
+ az->y2 = ar->winrct.ymax - AZONEPAD_TABW;
break;
case AE_RIGHT_TO_TOPLEFT:
- az->x1= ar->winrct.xmax - 1;
- az->y1= ar->winrct.ymax - 2*AZONEPAD_TABW;
- az->x2= ar->winrct.xmax - 1 + AZONEPAD_TABH;
- az->y2= ar->winrct.ymax - AZONEPAD_TABW;
+ az->x1 = ar->winrct.xmax - 1;
+ az->y1 = ar->winrct.ymax - 2 * AZONEPAD_TABW;
+ az->x2 = ar->winrct.xmax - 1 + AZONEPAD_TABH;
+ az->y2 = ar->winrct.ymax - AZONEPAD_TABW;
break;
}
/* rect needed for mouse pointer test */
BLI_init_rcti(&az->rect, az->x1, az->x2, az->y1, az->y2);
}
-#define AZONEPAD_TRIAW 16
-#define AZONEPAD_TRIAH 9
+#define AZONEPAD_TRIAW 16
+#define AZONEPAD_TRIAH 9
/* region already made zero sized, in shape of edge */
static void region_azone_tria(ScrArea *sa, AZone *az, ARegion *ar)
{
AZone *azt;
- int tot= 0, add;
+ int tot = 0, add;
- for (azt= sa->actionzones.first; azt; azt= azt->next) {
+ for (azt = sa->actionzones.first; azt; azt = azt->next) {
if (azt->edge == az->edge) tot++;
}
- switch(az->edge) {
+ switch (az->edge) {
case AE_TOP_TO_BOTTOMRIGHT:
- if (ar->winrct.ymax == sa->totrct.ymin) add= 1; else add= 0;
- az->x1= ar->winrct.xmax - 2*AZONEPAD_TRIAW;
- az->y1= ar->winrct.ymax - add;
- az->x2= ar->winrct.xmax - AZONEPAD_TRIAW;
- az->y2= ar->winrct.ymax - add + AZONEPAD_TRIAH;
+ if (ar->winrct.ymax == sa->totrct.ymin) add = 1; else add = 0;
+ az->x1 = ar->winrct.xmax - 2 * AZONEPAD_TRIAW;
+ az->y1 = ar->winrct.ymax - add;
+ az->x2 = ar->winrct.xmax - AZONEPAD_TRIAW;
+ az->y2 = ar->winrct.ymax - add + AZONEPAD_TRIAH;
break;
- case AE_BOTTOM_TO_TOPLEFT:
- az->x1= ar->winrct.xmin + AZONEPAD_TRIAW;
- az->y1= ar->winrct.ymin - AZONEPAD_TRIAH;
- az->x2= ar->winrct.xmin + 2*AZONEPAD_TRIAW;
- az->y2= ar->winrct.ymin;
+ case AE_BOTTOM_TO_TOPLEFT:
+ az->x1 = ar->winrct.xmin + AZONEPAD_TRIAW;
+ az->y1 = ar->winrct.ymin - AZONEPAD_TRIAH;
+ az->x2 = ar->winrct.xmin + 2 * AZONEPAD_TRIAW;
+ az->y2 = ar->winrct.ymin;
break;
- case AE_LEFT_TO_TOPRIGHT:
- az->x1= ar->winrct.xmin + 1 - AZONEPAD_TRIAH;
- az->y1= ar->winrct.ymax - 2*AZONEPAD_TRIAW;
- az->x2= ar->winrct.xmin + 1;
- az->y2= ar->winrct.ymax - AZONEPAD_TRIAW;
+ case AE_LEFT_TO_TOPRIGHT:
+ az->x1 = ar->winrct.xmin + 1 - AZONEPAD_TRIAH;
+ az->y1 = ar->winrct.ymax - 2 * AZONEPAD_TRIAW;
+ az->x2 = ar->winrct.xmin + 1;
+ az->y2 = ar->winrct.ymax - AZONEPAD_TRIAW;
break;
- case AE_RIGHT_TO_TOPLEFT:
- az->x1= ar->winrct.xmax - 1;
- az->y1= ar->winrct.ymax - 2*AZONEPAD_TRIAW;
- az->x2= ar->winrct.xmax - 1 + AZONEPAD_TRIAH;
- az->y2= ar->winrct.ymax - AZONEPAD_TRIAW;
+ case AE_RIGHT_TO_TOPLEFT:
+ az->x1 = ar->winrct.xmax - 1;
+ az->y1 = ar->winrct.ymax - 2 * AZONEPAD_TRIAW;
+ az->x2 = ar->winrct.xmax - 1 + AZONEPAD_TRIAH;
+ az->y2 = ar->winrct.ymax - AZONEPAD_TRIAW;
break;
}
/* rect needed for mouse pointer test */
@@ -851,18 +851,18 @@ static void region_azone_initialize(ScrArea *sa, ARegion *ar, AZEdge edge)
{
AZone *az;
- az= (AZone *)MEM_callocN(sizeof(AZone), "actionzone");
+ az = (AZone *)MEM_callocN(sizeof(AZone), "actionzone");
BLI_addtail(&(sa->actionzones), az);
- az->type= AZONE_REGION;
- az->ar= ar;
- az->edge= edge;
+ az->type = AZONE_REGION;
+ az->ar = ar;
+ az->edge = edge;
- if (ar->flag & (RGN_FLAG_HIDDEN|RGN_FLAG_TOO_SMALL)) {
- if (G.rt==3)
+ if (ar->flag & (RGN_FLAG_HIDDEN | RGN_FLAG_TOO_SMALL)) {
+ if (G.rt == 3)
region_azone_icon(sa, az, ar);
- else if (G.rt==2)
+ else if (G.rt == 2)
region_azone_tria(sa, az, ar);
- else if (G.rt==1)
+ else if (G.rt == 1)
region_azone_tab(sa, az, ar);
else
region_azone_tab_plus(sa, az, ar);
@@ -878,11 +878,11 @@ static void region_azone_initialize(ScrArea *sa, ARegion *ar, AZEdge edge)
static void region_azone_add(ScrArea *sa, ARegion *ar, int alignment)
{
- /* edge code (t b l r) is along which area edge azone will be drawn */
+ /* edge code (t b l r) is along which area edge azone will be drawn */
- if (alignment==RGN_ALIGN_TOP)
+ if (alignment == RGN_ALIGN_TOP)
region_azone_initialize(sa, ar, AE_BOTTOM_TO_TOPLEFT);
- else if (alignment==RGN_ALIGN_BOTTOM)
+ else if (alignment == RGN_ALIGN_BOTTOM)
region_azone_initialize(sa, ar, AE_TOP_TO_BOTTOMRIGHT);
else if (ELEM(alignment, RGN_ALIGN_RIGHT, RGN_OVERLAP_RIGHT))
region_azone_initialize(sa, ar, AE_LEFT_TO_TOPRIGHT);
@@ -893,21 +893,21 @@ static void region_azone_add(ScrArea *sa, ARegion *ar, int alignment)
/* dir is direction to check, not the splitting edge direction! */
static int rct_fits(rcti *rect, char dir, int size)
{
- if (dir=='h') {
- return rect->xmax-rect->xmin - size;
+ if (dir == 'h') {
+ return rect->xmax - rect->xmin - size;
}
else { // 'v'
- return rect->ymax-rect->ymin - size;
+ return rect->ymax - rect->ymin - size;
}
}
static void region_rect_recursive(ScrArea *sa, ARegion *ar, rcti *remainder, int quad)
{
- rcti *remainder_prev= remainder;
+ rcti *remainder_prev = remainder;
int prefsizex, prefsizey;
int alignment;
- if (ar==NULL)
+ if (ar == NULL)
return;
/* no returns in function, winrct gets set in the end again */
@@ -916,53 +916,53 @@ static void region_rect_recursive(ScrArea *sa, ARegion *ar, rcti *remainder, int
/* for test; allow split of previously defined region */
if (ar->alignment & RGN_SPLIT_PREV)
if (ar->prev)
- remainder= &ar->prev->winrct;
+ remainder = &ar->prev->winrct;
alignment = ar->alignment & ~RGN_SPLIT_PREV;
/* clear state flags first */
ar->flag &= ~RGN_FLAG_TOO_SMALL;
/* user errors */
- if (ar->next==NULL && alignment!=RGN_ALIGN_QSPLIT)
- alignment= RGN_ALIGN_NONE;
+ if (ar->next == NULL && alignment != RGN_ALIGN_QSPLIT)
+ alignment = RGN_ALIGN_NONE;
/* prefsize, for header we stick to exception */
- prefsizex= ar->sizex?ar->sizex:ar->type->prefsizex;
- if (ar->regiontype==RGN_TYPE_HEADER)
- prefsizey= ar->type->prefsizey;
- else if (ar->regiontype==RGN_TYPE_UI && sa->spacetype == SPACE_FILE) {
- prefsizey= UI_UNIT_Y * 2 + (UI_UNIT_Y/2);
+ prefsizex = ar->sizex ? ar->sizex : ar->type->prefsizex;
+ if (ar->regiontype == RGN_TYPE_HEADER)
+ prefsizey = ar->type->prefsizey;
+ else if (ar->regiontype == RGN_TYPE_UI && sa->spacetype == SPACE_FILE) {
+ prefsizey = UI_UNIT_Y * 2 + (UI_UNIT_Y / 2);
}
else
- prefsizey= ar->sizey?ar->sizey:ar->type->prefsizey;
+ prefsizey = ar->sizey ? ar->sizey : ar->type->prefsizey;
/* hidden is user flag */
- if (ar->flag & RGN_FLAG_HIDDEN);
+ if (ar->flag & RGN_FLAG_HIDDEN) ;
/* XXX floating area region, not handled yet here */
- else if (alignment == RGN_ALIGN_FLOAT);
+ else if (alignment == RGN_ALIGN_FLOAT) ;
/* remainder is too small for any usage */
- else if ( rct_fits(remainder, 'v', 1)<0 || rct_fits(remainder, 'h', 1) < 0 ) {
+ else if (rct_fits(remainder, 'v', 1) < 0 || rct_fits(remainder, 'h', 1) < 0) {
ar->flag |= RGN_FLAG_TOO_SMALL;
}
- else if (alignment==RGN_ALIGN_NONE) {
+ else if (alignment == RGN_ALIGN_NONE) {
/* typically last region */
- ar->winrct= *remainder;
+ ar->winrct = *remainder;
BLI_init_rcti(remainder, 0, 0, 0, 0);
}
- else if (alignment==RGN_ALIGN_TOP || alignment==RGN_ALIGN_BOTTOM) {
+ else if (alignment == RGN_ALIGN_TOP || alignment == RGN_ALIGN_BOTTOM) {
- if ( rct_fits(remainder, 'v', prefsizey) < 0 ) {
+ if (rct_fits(remainder, 'v', prefsizey) < 0) {
ar->flag |= RGN_FLAG_TOO_SMALL;
}
else {
- int fac= rct_fits(remainder, 'v', prefsizey);
+ int fac = rct_fits(remainder, 'v', prefsizey);
- if (fac < 0 )
+ if (fac < 0)
prefsizey += fac;
- ar->winrct= *remainder;
+ ar->winrct = *remainder;
- if (alignment==RGN_ALIGN_TOP) {
+ if (alignment == RGN_ALIGN_TOP) {
ar->winrct.ymin = ar->winrct.ymax - prefsizey + 1;
remainder->ymax = ar->winrct.ymin - 1;
}
@@ -972,92 +972,92 @@ static void region_rect_recursive(ScrArea *sa, ARegion *ar, rcti *remainder, int
}
}
}
- else if ( ELEM4(alignment, RGN_ALIGN_LEFT, RGN_ALIGN_RIGHT, RGN_OVERLAP_LEFT, RGN_OVERLAP_RIGHT)) {
+ else if (ELEM4(alignment, RGN_ALIGN_LEFT, RGN_ALIGN_RIGHT, RGN_OVERLAP_LEFT, RGN_OVERLAP_RIGHT)) {
- if ( rct_fits(remainder, 'h', prefsizex) < 0 ) {
+ if (rct_fits(remainder, 'h', prefsizex) < 0) {
ar->flag |= RGN_FLAG_TOO_SMALL;
}
else {
- int fac= rct_fits(remainder, 'h', prefsizex);
+ int fac = rct_fits(remainder, 'h', prefsizex);
- if (fac < 0 )
+ if (fac < 0)
prefsizex += fac;
- ar->winrct= *remainder;
+ ar->winrct = *remainder;
if (ELEM(alignment, RGN_ALIGN_RIGHT, RGN_OVERLAP_RIGHT)) {
ar->winrct.xmin = ar->winrct.xmax - prefsizex + 1;
- if (alignment==RGN_ALIGN_RIGHT)
+ if (alignment == RGN_ALIGN_RIGHT)
remainder->xmax = ar->winrct.xmin - 1;
}
else {
ar->winrct.xmax = ar->winrct.xmin + prefsizex - 1;
- if (alignment==RGN_ALIGN_LEFT)
+ if (alignment == RGN_ALIGN_LEFT)
remainder->xmin = ar->winrct.xmax + 1;
}
}
}
- else if (alignment==RGN_ALIGN_VSPLIT || alignment==RGN_ALIGN_HSPLIT) {
+ else if (alignment == RGN_ALIGN_VSPLIT || alignment == RGN_ALIGN_HSPLIT) {
/* percentage subdiv*/
- ar->winrct= *remainder;
+ ar->winrct = *remainder;
- if (alignment==RGN_ALIGN_HSPLIT) {
- if ( rct_fits(remainder, 'h', prefsizex) > 4) {
- ar->winrct.xmax = (remainder->xmin+remainder->xmax)/2;
- remainder->xmin = ar->winrct.xmax+1;
+ if (alignment == RGN_ALIGN_HSPLIT) {
+ if (rct_fits(remainder, 'h', prefsizex) > 4) {
+ ar->winrct.xmax = (remainder->xmin + remainder->xmax) / 2;
+ remainder->xmin = ar->winrct.xmax + 1;
}
else {
BLI_init_rcti(remainder, 0, 0, 0, 0);
}
}
else {
- if ( rct_fits(remainder, 'v', prefsizey) > 4) {
- ar->winrct.ymax = (remainder->ymin+remainder->ymax)/2;
- remainder->ymin = ar->winrct.ymax+1;
+ if (rct_fits(remainder, 'v', prefsizey) > 4) {
+ ar->winrct.ymax = (remainder->ymin + remainder->ymax) / 2;
+ remainder->ymin = ar->winrct.ymax + 1;
}
else {
BLI_init_rcti(remainder, 0, 0, 0, 0);
}
}
}
- else if (alignment==RGN_ALIGN_QSPLIT) {
- ar->winrct= *remainder;
+ else if (alignment == RGN_ALIGN_QSPLIT) {
+ ar->winrct = *remainder;
/* test if there's still 4 regions left */
- if (quad==0) {
- ARegion *artest= ar->next;
- int count= 1;
+ if (quad == 0) {
+ ARegion *artest = ar->next;
+ int count = 1;
while (artest) {
- artest->alignment= RGN_ALIGN_QSPLIT;
- artest= artest->next;
+ artest->alignment = RGN_ALIGN_QSPLIT;
+ artest = artest->next;
count++;
}
- if (count!=4) {
+ if (count != 4) {
/* let's stop adding regions */
BLI_init_rcti(remainder, 0, 0, 0, 0);
if (G.debug & G_DEBUG)
printf("region quadsplit failed\n");
}
- else quad= 1;
+ else quad = 1;
}
if (quad) {
- if (quad==1) { /* left bottom */
- ar->winrct.xmax = (remainder->xmin + remainder->xmax)/2;
- ar->winrct.ymax = (remainder->ymin + remainder->ymax)/2;
+ if (quad == 1) { /* left bottom */
+ ar->winrct.xmax = (remainder->xmin + remainder->xmax) / 2;
+ ar->winrct.ymax = (remainder->ymin + remainder->ymax) / 2;
}
- else if (quad==2) { /* left top */
- ar->winrct.xmax = (remainder->xmin + remainder->xmax)/2;
- ar->winrct.ymin = 1 + (remainder->ymin + remainder->ymax)/2;
+ else if (quad == 2) { /* left top */
+ ar->winrct.xmax = (remainder->xmin + remainder->xmax) / 2;
+ ar->winrct.ymin = 1 + (remainder->ymin + remainder->ymax) / 2;
}
- else if (quad==3) { /* right bottom */
- ar->winrct.xmin = 1 + (remainder->xmin + remainder->xmax)/2;
- ar->winrct.ymax = (remainder->ymin + remainder->ymax)/2;
+ else if (quad == 3) { /* right bottom */
+ ar->winrct.xmin = 1 + (remainder->xmin + remainder->xmax) / 2;
+ ar->winrct.ymax = (remainder->ymin + remainder->ymax) / 2;
}
- else { /* right top */
- ar->winrct.xmin = 1 + (remainder->xmin + remainder->xmax)/2;
- ar->winrct.ymin = 1 + (remainder->ymin + remainder->ymax)/2;
+ else { /* right top */
+ ar->winrct.xmin = 1 + (remainder->xmin + remainder->xmax) / 2;
+ ar->winrct.ymin = 1 + (remainder->ymin + remainder->ymax) / 2;
BLI_init_rcti(remainder, 0, 0, 0, 0);
}
@@ -1066,16 +1066,16 @@ static void region_rect_recursive(ScrArea *sa, ARegion *ar, rcti *remainder, int
}
/* for speedup */
- ar->winx= ar->winrct.xmax - ar->winrct.xmin + 1;
- ar->winy= ar->winrct.ymax - ar->winrct.ymin + 1;
+ ar->winx = ar->winrct.xmax - ar->winrct.xmin + 1;
+ ar->winy = ar->winrct.ymax - ar->winrct.ymin + 1;
/* set winrect for azones */
- if (ar->flag & (RGN_FLAG_HIDDEN|RGN_FLAG_TOO_SMALL)) {
- ar->winrct= *remainder;
+ if (ar->flag & (RGN_FLAG_HIDDEN | RGN_FLAG_TOO_SMALL)) {
+ ar->winrct = *remainder;
- if (alignment==RGN_ALIGN_TOP)
+ if (alignment == RGN_ALIGN_TOP)
ar->winrct.ymin = ar->winrct.ymax;
- else if (alignment==RGN_ALIGN_BOTTOM)
+ else if (alignment == RGN_ALIGN_BOTTOM)
ar->winrct.ymax = ar->winrct.ymin;
else if (ELEM(alignment, RGN_ALIGN_RIGHT, RGN_OVERLAP_RIGHT))
ar->winrct.xmin = ar->winrct.xmax;
@@ -1088,9 +1088,9 @@ static void region_rect_recursive(ScrArea *sa, ARegion *ar, rcti *remainder, int
/* restore prev-split exception */
if (ar->alignment & RGN_SPLIT_PREV) {
if (ar->prev) {
- remainder= remainder_prev;
- ar->prev->winx= ar->prev->winrct.xmax - ar->prev->winrct.xmin + 1;
- ar->prev->winy= ar->prev->winrct.ymax - ar->prev->winrct.ymin + 1;
+ remainder = remainder_prev;
+ ar->prev->winx = ar->prev->winrct.xmax - ar->prev->winrct.xmin + 1;
+ ar->prev->winy = ar->prev->winrct.ymax - ar->prev->winrct.ymin + 1;
}
}
@@ -1113,34 +1113,34 @@ static void region_rect_recursive(ScrArea *sa, ARegion *ar, rcti *remainder, int
static void area_calc_totrct(ScrArea *sa, int sizex, int sizey)
{
- short rt= 0; // CLAMPIS(G.rt, 0, 16);
+ short rt = 0; // CLAMPIS(G.rt, 0, 16);
- if (sa->v1->vec.x>0) sa->totrct.xmin = sa->v1->vec.x+1+rt;
+ if (sa->v1->vec.x > 0) sa->totrct.xmin = sa->v1->vec.x + 1 + rt;
else sa->totrct.xmin = sa->v1->vec.x;
- if (sa->v4->vec.x<sizex-1) sa->totrct.xmax = sa->v4->vec.x-1-rt;
+ if (sa->v4->vec.x < sizex - 1) sa->totrct.xmax = sa->v4->vec.x - 1 - rt;
else sa->totrct.xmax = sa->v4->vec.x;
- if (sa->v1->vec.y>0) sa->totrct.ymin = sa->v1->vec.y+1+rt;
+ if (sa->v1->vec.y > 0) sa->totrct.ymin = sa->v1->vec.y + 1 + rt;
else sa->totrct.ymin = sa->v1->vec.y;
- if (sa->v2->vec.y<sizey-1) sa->totrct.ymax = sa->v2->vec.y-1-rt;
+ if (sa->v2->vec.y < sizey - 1) sa->totrct.ymax = sa->v2->vec.y - 1 - rt;
else sa->totrct.ymax = sa->v2->vec.y;
/* for speedup */
- sa->winx= sa->totrct.xmax-sa->totrct.xmin+1;
- sa->winy= sa->totrct.ymax-sa->totrct.ymin+1;
+ sa->winx = sa->totrct.xmax - sa->totrct.xmin + 1;
+ sa->winy = sa->totrct.ymax - sa->totrct.ymin + 1;
}
/* used for area initialize below */
static void region_subwindow(wmWindow *win, ARegion *ar)
{
- if (ar->flag & (RGN_FLAG_HIDDEN|RGN_FLAG_TOO_SMALL)) {
+ if (ar->flag & (RGN_FLAG_HIDDEN | RGN_FLAG_TOO_SMALL)) {
if (ar->swinid)
wm_subwindow_close(win, ar->swinid);
- ar->swinid= 0;
+ ar->swinid = 0;
}
- else if (ar->swinid==0)
- ar->swinid= wm_subwindow_open(win, &ar->winrct);
+ else if (ar->swinid == 0)
+ ar->swinid = wm_subwindow_open(win, &ar->winrct);
else
wm_subwindow_position(win, ar->swinid, &ar->winrct);
}
@@ -1164,10 +1164,10 @@ static void ed_default_handlers(wmWindowManager *wm, ScrArea *sa, ListBase *hand
wmKeyMap *keymap = WM_keymap_find(wm->defaultconf, "Markers", 0, 0);
/* time space only has this keymap, the others get a boundbox restricted map */
- if (sa->spacetype!=SPACE_TIME) {
+ if (sa->spacetype != SPACE_TIME) {
ARegion *ar;
- static rcti rect= {0, 10000, 0, 30}; /* same local check for all areas */
- ar= BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
+ static rcti rect = {0, 10000, 0, 30}; /* same local check for all areas */
+ ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
if (ar) {
WM_event_add_keymap_handler_bb(handlers, keymap, &rect, &ar->winrct);
}
@@ -1205,15 +1205,15 @@ void ED_area_initialize(wmWindowManager *wm, wmWindow *win, ScrArea *sa)
rcti rect;
/* set typedefinitions */
- sa->type= BKE_spacetype_from_id(sa->spacetype);
+ sa->type = BKE_spacetype_from_id(sa->spacetype);
- if (sa->type==NULL) {
- sa->butspacetype= sa->spacetype= SPACE_VIEW3D;
- sa->type= BKE_spacetype_from_id(sa->spacetype);
+ if (sa->type == NULL) {
+ sa->butspacetype = sa->spacetype = SPACE_VIEW3D;
+ sa->type = BKE_spacetype_from_id(sa->spacetype);
}
- for (ar= sa->regionbase.first; ar; ar= ar->next)
- ar->type= BKE_regiontype_from_id(sa->type, ar->regiontype);
+ for (ar = sa->regionbase.first; ar; ar = ar->next)
+ ar->type = BKE_regiontype_from_id(sa->type, ar->regiontype);
/* area sizes */
area_calc_totrct(sa, win->sizex, win->sizey);
@@ -1222,7 +1222,7 @@ void ED_area_initialize(wmWindowManager *wm, wmWindow *win, ScrArea *sa)
area_azone_initialize(sa);
/* region rect sizes */
- rect= sa->totrct;
+ rect = sa->totrct;
region_rect_recursive(sa, sa->regionbase.first, &rect, 0);
/* default area handlers */
@@ -1232,7 +1232,7 @@ void ED_area_initialize(wmWindowManager *wm, wmWindow *win, ScrArea *sa)
sa->type->init(wm, sa);
/* region windows, default and own handlers */
- for (ar= sa->regionbase.first; ar; ar= ar->next) {
+ for (ar = sa->regionbase.first; ar; ar = ar->next) {
region_subwindow(win, ar);
if (ar->swinid) {
@@ -1248,7 +1248,7 @@ void ED_area_initialize(wmWindowManager *wm, wmWindow *win, ScrArea *sa)
}
/* rechecks 2d matrix for header on dpi changing, do not do for other regions, it resets view && blocks view2d operator polls (ton) */
- if (ar->regiontype==RGN_TYPE_HEADER)
+ if (ar->regiontype == RGN_TYPE_HEADER)
ar->v2d.flag &= ~V2D_IS_INITIALISED;
}
}
@@ -1261,17 +1261,17 @@ void ED_region_init(bContext *C, ARegion *ar)
/* refresh can be called before window opened */
region_subwindow(CTX_wm_window(C), ar);
- ar->winx= ar->winrct.xmax - ar->winrct.xmin + 1;
- ar->winy= ar->winrct.ymax - ar->winrct.ymin + 1;
+ ar->winx = ar->winrct.xmax - ar->winrct.xmin + 1;
+ ar->winy = ar->winrct.ymax - ar->winrct.ymin + 1;
/* UI convention */
- wmOrtho2(-0.01f, ar->winx-0.01f, -0.01f, ar->winy-0.01f);
+ wmOrtho2(-0.01f, ar->winx - 0.01f, -0.01f, ar->winy - 0.01f);
glLoadIdentity();
}
void ED_region_toggle_hidden(bContext *C, ARegion *ar)
{
- ScrArea *sa= CTX_wm_area(C);
+ ScrArea *sa = CTX_wm_area(C);
ar->flag ^= RGN_FLAG_HIDDEN;
@@ -1288,11 +1288,11 @@ void area_copy_data(ScrArea *sa1, ScrArea *sa2, int swap_space)
{
SpaceType *st;
ARegion *ar;
- int spacetype= sa1->spacetype;
+ int spacetype = sa1->spacetype;
- sa1->headertype= sa2->headertype;
- sa1->spacetype= sa2->spacetype;
- sa1->butspacetype= sa2->butspacetype;
+ sa1->headertype = sa2->headertype;
+ sa1->spacetype = sa2->spacetype;
+ sa1->butspacetype = sa2->butspacetype;
if (swap_space == 1) {
SWAP(ListBase, sa1->spacedata, sa2->spacedata);
@@ -1315,16 +1315,16 @@ void area_copy_data(ScrArea *sa1, ScrArea *sa2, int swap_space)
SWAP(ListBase, sa1->regionbase, sa2->regionbase);
}
else {
- if (swap_space<2) {
- st= BKE_spacetype_from_id(spacetype);
- for (ar= sa1->regionbase.first; ar; ar= ar->next)
+ if (swap_space < 2) {
+ st = BKE_spacetype_from_id(spacetype);
+ for (ar = sa1->regionbase.first; ar; ar = ar->next)
BKE_area_region_free(st, ar);
BLI_freelistN(&sa1->regionbase);
}
- st= BKE_spacetype_from_id(sa2->spacetype);
- for (ar= sa2->regionbase.first; ar; ar= ar->next) {
- ARegion *newar= BKE_area_region_copy(st, ar);
+ st = BKE_spacetype_from_id(sa2->spacetype);
+ for (ar = sa2->regionbase.first; ar; ar = ar->next) {
+ ARegion *newar = BKE_area_region_copy(st, ar);
BLI_addtail(&sa1->regionbase, newar);
}
}
@@ -1334,7 +1334,7 @@ void area_copy_data(ScrArea *sa1, ScrArea *sa2, int swap_space)
void ED_area_swapspace(bContext *C, ScrArea *sa1, ScrArea *sa2)
{
- ScrArea *tmp= MEM_callocN(sizeof(ScrArea), "addscrarea");
+ ScrArea *tmp = MEM_callocN(sizeof(ScrArea), "addscrarea");
ED_area_exit(C, sa1);
ED_area_exit(C, sa2);
@@ -1366,34 +1366,34 @@ void ED_area_newspace(bContext *C, ScrArea *sa, int type)
ED_area_exit(C, sa);
- st= BKE_spacetype_from_id(type);
- slold= sa->spacedata.first;
+ st = BKE_spacetype_from_id(type);
+ slold = sa->spacedata.first;
- sa->spacetype= type;
- sa->butspacetype= type;
- sa->type= st;
+ sa->spacetype = type;
+ sa->butspacetype = type;
+ sa->type = st;
/* check previously stored space */
- for (sl= sa->spacedata.first; sl; sl= sl->next)
- if (sl->spacetype==type)
+ for (sl = sa->spacedata.first; sl; sl = sl->next)
+ if (sl->spacetype == type)
break;
/* old spacedata... happened during work on 2.50, remove */
- if (sl && sl->regionbase.first==NULL) {
+ if (sl && sl->regionbase.first == NULL) {
st->free(sl);
BLI_freelinkN(&sa->spacedata, sl);
if (slold == sl) {
- slold= NULL;
+ slold = NULL;
}
- sl= NULL;
+ sl = NULL;
}
if (sl) {
/* swap regions */
- slold->regionbase= sa->regionbase;
- sa->regionbase= sl->regionbase;
- sl->regionbase.first= sl->regionbase.last= NULL;
+ slold->regionbase = sa->regionbase;
+ sa->regionbase = sl->regionbase;
+ sl->regionbase.first = sl->regionbase.last = NULL;
/* put in front of list */
BLI_remlink(&sa->spacedata, sl);
@@ -1402,14 +1402,14 @@ void ED_area_newspace(bContext *C, ScrArea *sa, int type)
else {
/* new space */
if (st) {
- sl= st->new(C);
+ sl = st->new(C);
BLI_addhead(&sa->spacedata, sl);
/* swap regions */
if (slold)
- slold->regionbase= sa->regionbase;
- sa->regionbase= sl->regionbase;
- sl->regionbase.first= sl->regionbase.last= NULL;
+ slold->regionbase = sa->regionbase;
+ sa->regionbase = sl->regionbase;
+ sl->regionbase.first = sl->regionbase.last = NULL;
}
}
@@ -1419,7 +1419,7 @@ void ED_area_newspace(bContext *C, ScrArea *sa, int type)
WM_event_add_mousemove(C);
/*send space change notifier*/
- WM_event_add_notifier(C, NC_SPACE|ND_SPACE_CHANGED, sa);
+ WM_event_add_notifier(C, NC_SPACE | ND_SPACE_CHANGED, sa);
ED_area_tag_refresh(sa);
}
@@ -1446,47 +1446,47 @@ void ED_area_prevspace(bContext *C, ScrArea *sa)
ED_area_tag_redraw(sa);
/*send space change notifier*/
- WM_event_add_notifier(C, NC_SPACE|ND_SPACE_CHANGED, sa);
+ WM_event_add_notifier(C, NC_SPACE | ND_SPACE_CHANGED, sa);
}
static const char *editortype_pup(void)
{
- const char *types= N_(
- "Editor type:%t"
- "|3D View %x1"
+ const char *types = N_(
+ "Editor type:%t"
+ "|3D View %x1"
- "|%l"
+ "|%l"
- "|Timeline %x15"
- "|Graph Editor %x2"
- "|DopeSheet %x12"
- "|NLA Editor %x13"
+ "|Timeline %x15"
+ "|Graph Editor %x2"
+ "|DopeSheet %x12"
+ "|NLA Editor %x13"
- "|%l"
+ "|%l"
- "|UV/Image Editor %x6"
+ "|UV/Image Editor %x6"
- "|Video Sequence Editor %x8"
- "|Movie Clip Editor %x20"
- "|Text Editor %x9"
- "|Node Editor %x16"
- "|Logic Editor %x17"
+ "|Video Sequence Editor %x8"
+ "|Movie Clip Editor %x20"
+ "|Text Editor %x9"
+ "|Node Editor %x16"
+ "|Logic Editor %x17"
- "|%l"
+ "|%l"
- "|Properties %x4"
- "|Outliner %x3"
- "|User Preferences %x19"
- "|Info%x7"
+ "|Properties %x4"
+ "|Outliner %x3"
+ "|User Preferences %x19"
+ "|Info%x7"
- "|%l"
+ "|%l"
- "|File Browser %x5"
+ "|File Browser %x5"
- "|%l"
+ "|%l"
- "|Python Console %x18"
- );
+ "|Python Console %x18"
+ );
return IFACE_(types);
}
@@ -1497,20 +1497,20 @@ static void spacefunc(struct bContext *C, void *UNUSED(arg1), void *UNUSED(arg2)
ED_area_tag_redraw(CTX_wm_area(C));
/*send space change notifier*/
- WM_event_add_notifier(C, NC_SPACE|ND_SPACE_CHANGED, CTX_wm_area(C));
+ WM_event_add_notifier(C, NC_SPACE | ND_SPACE_CHANGED, CTX_wm_area(C));
}
/* returns offset for next button in header */
int ED_area_header_switchbutton(const bContext *C, uiBlock *block, int yco)
{
- ScrArea *sa= CTX_wm_area(C);
+ ScrArea *sa = CTX_wm_area(C);
uiBut *but;
- int xco= 8;
+ int xco = 8;
but = uiDefIconTextButC(block, ICONTEXTROW, 0, ICON_VIEW3D,
- editortype_pup(), xco, yco, UI_UNIT_X+10, UI_UNIT_Y,
- &(sa->butspacetype), 1.0, SPACEICONMAX, 0, 0,
- TIP_("Displays current editor type. Click for menu of available types"));
+ editortype_pup(), xco, yco, UI_UNIT_X + 10, UI_UNIT_Y,
+ &(sa->butspacetype), 1.0, SPACEICONMAX, 0, 0,
+ TIP_("Displays current editor type. Click for menu of available types"));
uiButSetFunc(but, spacefunc, NULL, NULL);
uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */
@@ -1519,28 +1519,28 @@ int ED_area_header_switchbutton(const bContext *C, uiBlock *block, int yco)
int ED_area_header_standardbuttons(const bContext *C, uiBlock *block, int yco)
{
- ScrArea *sa= CTX_wm_area(C);
- int xco= 8;
+ ScrArea *sa = CTX_wm_area(C);
+ int xco = 8;
uiBut *but;
if (!sa->full)
- xco= ED_area_header_switchbutton(C, block, yco);
+ xco = ED_area_header_switchbutton(C, block, yco);
uiBlockSetEmboss(block, UI_EMBOSSN);
if (sa->flag & HEADER_NO_PULLDOWN) {
but = uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, 0,
- ICON_DISCLOSURE_TRI_RIGHT,
- xco,yco,UI_UNIT_X,UI_UNIT_Y-2,
- &(sa->flag), 0, 0, 0, 0,
- "Show pulldown menus");
+ ICON_DISCLOSURE_TRI_RIGHT,
+ xco, yco, UI_UNIT_X, UI_UNIT_Y - 2,
+ &(sa->flag), 0, 0, 0, 0,
+ "Show pulldown menus");
}
else {
but = uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, 0,
- ICON_DISCLOSURE_TRI_DOWN,
- xco,yco,UI_UNIT_X,UI_UNIT_Y-2,
- &(sa->flag), 0, 0, 0, 0,
- "Hide pulldown menus");
+ ICON_DISCLOSURE_TRI_DOWN,
+ xco, yco, UI_UNIT_X, UI_UNIT_Y - 2,
+ &(sa->flag), 0, 0, 0, 0,
+ "Hide pulldown menus");
}
uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */
@@ -1554,25 +1554,25 @@ int ED_area_header_standardbuttons(const bContext *C, uiBlock *block, int yco)
void ED_region_panels(const bContext *C, ARegion *ar, int vertical, const char *context, int contextnr)
{
- ScrArea *sa= CTX_wm_area(C);
- uiStyle *style= UI_GetStyle();
+ ScrArea *sa = CTX_wm_area(C);
+ uiStyle *style = UI_GetStyle();
uiBlock *block;
PanelType *pt;
Panel *panel;
- View2D *v2d= &ar->v2d;
+ View2D *v2d = &ar->v2d;
View2DScrollers *scrollers;
- int x, y, xco, yco, w, em, triangle, open, newcontext= 0;
+ int x, y, xco, yco, w, em, triangle, open, newcontext = 0;
if (contextnr >= 0)
- newcontext= UI_view2d_tab_set(v2d, contextnr);
+ newcontext = UI_view2d_tab_set(v2d, contextnr);
if (vertical) {
- w= v2d->cur.xmax - v2d->cur.xmin;
- em= (ar->type->prefsizex)? UI_UNIT_Y/2: UI_UNIT_Y;
+ w = v2d->cur.xmax - v2d->cur.xmin;
+ em = (ar->type->prefsizex) ? UI_UNIT_Y / 2 : UI_UNIT_Y;
}
else {
- w= UI_PANEL_WIDTH;
- em= (ar->type->prefsizex)? UI_UNIT_Y/2: UI_UNIT_Y;
+ w = UI_PANEL_WIDTH;
+ em = (ar->type->prefsizex) ? UI_UNIT_Y / 2 : UI_UNIT_Y;
}
/* create panels */
@@ -1581,7 +1581,7 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, const char *
/* set view2d view matrix for scrolling (without scrollers) */
UI_view2d_view_ortho(v2d);
- for (pt= ar->type->paneltypes.first; pt; pt= pt->next) {
+ for (pt = ar->type->paneltypes.first; pt; pt = pt->next) {
/* verify context */
if (context)
if (pt->context[0] && strcmp(context, pt->context) != 0)
@@ -1589,25 +1589,25 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, const char *
/* draw panel */
if (pt->draw && (!pt->poll || pt->poll(C, pt))) {
- block= uiBeginBlock(C, ar, pt->idname, UI_EMBOSS);
- panel= uiBeginPanel(sa, ar, block, pt, &open);
+ block = uiBeginBlock(C, ar, pt->idname, UI_EMBOSS);
+ panel = uiBeginPanel(sa, ar, block, pt, &open);
/* bad fixed values */
- triangle= (int)(UI_UNIT_Y * 1.1f);
+ triangle = (int)(UI_UNIT_Y * 1.1f);
if (pt->draw_header && !(pt->flag & PNL_NO_HEADER) && (open || vertical)) {
/* for enabled buttons */
- panel->layout= uiBlockLayout(block, UI_LAYOUT_HORIZONTAL, UI_LAYOUT_HEADER,
- triangle, UI_UNIT_Y+style->panelspace+2, UI_UNIT_Y, 1, style);
+ panel->layout = uiBlockLayout(block, UI_LAYOUT_HORIZONTAL, UI_LAYOUT_HEADER,
+ triangle, UI_UNIT_Y + style->panelspace + 2, UI_UNIT_Y, 1, style);
pt->draw_header(C, panel);
uiBlockLayoutResolve(block, &xco, &yco);
- panel->labelofs= xco - triangle;
- panel->layout= NULL;
+ panel->labelofs = xco - triangle;
+ panel->layout = NULL;
}
else {
- panel->labelofs= 0;
+ panel->labelofs = 0;
}
if (open) {
@@ -1615,23 +1615,23 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, const char *
/* panel context can either be toolbar region or normal panels region */
if (ar->regiontype == RGN_TYPE_TOOLS)
- panelContext= UI_LAYOUT_TOOLBAR;
+ panelContext = UI_LAYOUT_TOOLBAR;
else
- panelContext= UI_LAYOUT_PANEL;
+ panelContext = UI_LAYOUT_PANEL;
- panel->layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, panelContext,
- style->panelspace, 0, w-2*style->panelspace, em, style);
+ panel->layout = uiBlockLayout(block, UI_LAYOUT_VERTICAL, panelContext,
+ style->panelspace, 0, w - 2 * style->panelspace, em, style);
pt->draw(C, panel);
uiBlockLayoutResolve(block, &xco, &yco);
- panel->layout= NULL;
+ panel->layout = NULL;
- yco -= 2*style->panelspace;
+ yco -= 2 * style->panelspace;
uiEndPanel(block, w, -yco);
}
else {
- yco= 0;
+ yco = 0;
uiEndPanel(block, w, 0);
}
@@ -1643,28 +1643,28 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, const char *
uiEndPanels(C, ar, &x, &y);
/* clear */
- UI_ThemeClearColor((ar->type->regionid == RGN_TYPE_PREVIEW)?TH_PREVIEW_BACK:TH_BACK);
+ UI_ThemeClearColor((ar->type->regionid == RGN_TYPE_PREVIEW) ? TH_PREVIEW_BACK : TH_BACK);
glClear(GL_COLOR_BUFFER_BIT);
/* before setting the view */
if (vertical) {
/* only allow scrolling in vertical direction */
- v2d->keepofs |= V2D_LOCKOFS_X|V2D_KEEPOFS_Y;
- v2d->keepofs &= ~(V2D_LOCKOFS_Y|V2D_KEEPOFS_X);
+ v2d->keepofs |= V2D_LOCKOFS_X | V2D_KEEPOFS_Y;
+ v2d->keepofs &= ~(V2D_LOCKOFS_Y | V2D_KEEPOFS_X);
v2d->scroll |= V2D_SCROLL_HORIZONTAL_HIDE;
v2d->scroll &= ~V2D_SCROLL_VERTICAL_HIDE;
// don't jump back when panels close or hide
if (!newcontext)
- y= MAX2(-y, -v2d->cur.ymin);
+ y = MAX2(-y, -v2d->cur.ymin);
else
- y= -y;
+ y = -y;
}
else {
/* for now, allow scrolling in both directions (since layouts are optimized for vertical,
* they often don't fit in horizontal layout)
*/
- v2d->keepofs &= ~(V2D_LOCKOFS_X|V2D_LOCKOFS_Y|V2D_KEEPOFS_X|V2D_KEEPOFS_Y);
+ v2d->keepofs &= ~(V2D_LOCKOFS_X | V2D_LOCKOFS_Y | V2D_KEEPOFS_X | V2D_KEEPOFS_Y);
//v2d->keepofs |= V2D_LOCKOFS_Y|V2D_KEEPOFS_X;
//v2d->keepofs &= ~(V2D_LOCKOFS_X|V2D_KEEPOFS_Y);
v2d->scroll |= V2D_SCROLL_VERTICAL_HIDE;
@@ -1672,12 +1672,12 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, const char *
// don't jump back when panels close or hide
if (!newcontext)
- x= MAX2(x, v2d->cur.xmax);
- y= -y;
+ x = MAX2(x, v2d->cur.xmax);
+ y = -y;
}
// +V2D_SCROLL_HEIGHT is workaround to set the actual height
- UI_view2d_totRect_set(v2d, x+V2D_SCROLL_WIDTH, y+V2D_SCROLL_HEIGHT);
+ UI_view2d_totRect_set(v2d, x + V2D_SCROLL_WIDTH, y + V2D_SCROLL_HEIGHT);
/* set the view */
UI_view2d_view_ortho(v2d);
@@ -1689,7 +1689,7 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, const char *
UI_view2d_view_restore(C);
/* scrollers */
- scrollers= UI_view2d_scrollers_calc(C, v2d, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY);
+ scrollers = UI_view2d_scrollers_calc(C, v2d, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY);
UI_view2d_scrollers_draw(C, v2d, scrollers);
UI_view2d_scrollers_free(scrollers);
}
@@ -1699,13 +1699,13 @@ void ED_region_panels_init(wmWindowManager *wm, ARegion *ar)
wmKeyMap *keymap;
// XXX quick hacks for files saved with 2.5 already (i.e. the builtin defaults file)
- // scrollbars for button regions
- ar->v2d.scroll |= (V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM);
+ // scrollbars for button regions
+ ar->v2d.scroll |= (V2D_SCROLL_RIGHT | V2D_SCROLL_BOTTOM);
ar->v2d.scroll |= V2D_SCROLL_HORIZONTAL_HIDE;
ar->v2d.scroll &= ~V2D_SCROLL_VERTICAL_HIDE;
ar->v2d.keepzoom |= V2D_KEEPZOOM;
- // correctly initialized User-Prefs?
+ // correctly initialized User-Prefs?
if (!(ar->v2d.align & V2D_ALIGN_NO_POS_Y))
ar->v2d.flag &= ~V2D_IS_INITIALISED;
@@ -1717,52 +1717,52 @@ void ED_region_panels_init(wmWindowManager *wm, ARegion *ar)
void ED_region_header(const bContext *C, ARegion *ar)
{
- uiStyle *style= UI_GetStyle();
+ uiStyle *style = UI_GetStyle();
uiBlock *block;
uiLayout *layout;
HeaderType *ht;
Header header = {NULL};
int maxco, xco, yco;
- int headery= ED_area_headersize();
+ int headery = ED_area_headersize();
/* clear */
- UI_ThemeClearColor((ED_screen_area_active(C))?TH_HEADER:TH_HEADERDESEL);
+ UI_ThemeClearColor((ED_screen_area_active(C)) ? TH_HEADER : TH_HEADERDESEL);
glClear(GL_COLOR_BUFFER_BIT);
/* set view2d view matrix for scrolling (without scrollers) */
UI_view2d_view_ortho(&ar->v2d);
- xco= maxco= 8;
- yco= headery-4;
+ xco = maxco = 8;
+ yco = headery - 4;
/* draw all headers types */
- for (ht= ar->type->headertypes.first; ht; ht= ht->next) {
- block= uiBeginBlock(C, ar, ht->idname, UI_EMBOSS);
- layout= uiBlockLayout(block, UI_LAYOUT_HORIZONTAL, UI_LAYOUT_HEADER, xco, yco, UI_UNIT_Y, 1, style);
+ for (ht = ar->type->headertypes.first; ht; ht = ht->next) {
+ block = uiBeginBlock(C, ar, ht->idname, UI_EMBOSS);
+ layout = uiBlockLayout(block, UI_LAYOUT_HORIZONTAL, UI_LAYOUT_HEADER, xco, yco, UI_UNIT_Y, 1, style);
if (ht->draw) {
- header.type= ht;
- header.layout= layout;
+ header.type = ht;
+ header.layout = layout;
ht->draw(C, &header);
/* for view2d */
- xco= uiLayoutGetWidth(layout);
+ xco = uiLayoutGetWidth(layout);
if (xco > maxco)
- maxco= xco;
+ maxco = xco;
}
uiBlockLayoutResolve(block, &xco, &yco);
/* for view2d */
if (xco > maxco)
- maxco= xco;
+ maxco = xco;
uiEndBlock(C, block);
uiDrawBlock(C, block);
}
/* always as last */
- UI_view2d_totRect_set(&ar->v2d, maxco+UI_UNIT_X+80, ar->v2d.tot.ymax-ar->v2d.tot.ymin);
+ UI_view2d_totRect_set(&ar->v2d, maxco + UI_UNIT_X + 80, ar->v2d.tot.ymax - ar->v2d.tot.ymin);
/* restore view matrix? */
UI_view2d_view_restore(C);
@@ -1776,20 +1776,20 @@ void ED_region_header_init(ARegion *ar)
/* UI_UNIT_Y is defined as U variable now, depending dpi */
int ED_area_headersize(void)
{
- return UI_UNIT_Y+6;
+ return UI_UNIT_Y + 6;
}
void ED_region_info_draw(ARegion *ar, const char *text, int block, float alpha)
{
const int header_height = 18;
- uiStyle *style= UI_GetStyle();
- int fontid= style->widget.uifont_id;
+ uiStyle *style = UI_GetStyle();
+ int fontid = style->widget.uifont_id;
rcti rect;
BLF_size(fontid, 11.0f, 72);
/* background box */
- rect= ar->winrct;
+ rect = ar->winrct;
rect.xmin = 0;
rect.ymin = ar->winrct.ymax - ar->winrct.ymin - header_height;
@@ -1803,9 +1803,9 @@ void ED_region_info_draw(ARegion *ar, const char *text, int block, float alpha)
rect.ymax = ar->winrct.ymax - ar->winrct.ymin;
glEnable(GL_BLEND);
- glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glColor4f(0.0f, 0.0f, 0.0f, alpha);
- glRecti(rect.xmin, rect.ymin, rect.xmax+1, rect.ymax+1);
+ glRecti(rect.xmin, rect.ymin, rect.xmax + 1, rect.ymax + 1);
glDisable(GL_BLEND);
/* text */
@@ -1813,3 +1813,63 @@ void ED_region_info_draw(ARegion *ar, const char *text, int block, float alpha)
BLF_position(fontid, 12, rect.ymin + 5, 0.0f);
BLF_draw(fontid, text, BLF_DRAW_STR_DUMMY_MAX);
}
+
+void ED_region_grid_draw(ARegion *ar, float zoomx, float zoomy)
+{
+ float gridsize, gridstep = 1.0f / 32.0f;
+ float fac, blendfac;
+ int x1, y1, x2, y2;
+
+ /* the image is located inside (0, 0), (1, 1) as set by view2d */
+ UI_ThemeColorShade(TH_BACK, 20);
+
+ UI_view2d_to_region_no_clip(&ar->v2d, 0.0f, 0.0f, &x1, &y1);
+ UI_view2d_to_region_no_clip(&ar->v2d, 1.0f, 1.0f, &x2, &y2);
+ glRectf(x1, y1, x2, y2);
+
+ /* gridsize adapted to zoom level */
+ gridsize = 0.5f * (zoomx + zoomy);
+ if (gridsize <= 0.0f)
+ return;
+
+ if (gridsize < 1.0f) {
+ while (gridsize < 1.0f) {
+ gridsize *= 4.0f;
+ gridstep *= 4.0f;
+ }
+ }
+ else {
+ while (gridsize >= 4.0f) {
+ gridsize /= 4.0f;
+ gridstep /= 4.0f;
+ }
+ }
+
+ /* the fine resolution level */
+ blendfac = 0.25f * gridsize - floorf(0.25f * gridsize);
+ CLAMP(blendfac, 0.0f, 1.0f);
+ UI_ThemeColorShade(TH_BACK, (int)(20.0f * (1.0f - blendfac)));
+
+ fac = 0.0f;
+ glBegin(GL_LINES);
+ while (fac < 1.0f) {
+ glVertex2f(x1, y1 * (1.0f - fac) + y2 * fac);
+ glVertex2f(x2, y1 * (1.0f - fac) + y2 * fac);
+ glVertex2f(x1 * (1.0f - fac) + x2 * fac, y1);
+ glVertex2f(x1 * (1.0f - fac) + x2 * fac, y2);
+ fac += gridstep;
+ }
+
+ /* the large resolution level */
+ UI_ThemeColor(TH_BACK);
+
+ fac = 0.0f;
+ while (fac < 1.0f) {
+ glVertex2f(x1, y1 * (1.0f - fac) + y2 * fac);
+ glVertex2f(x2, y1 * (1.0f - fac) + y2 * fac);
+ glVertex2f(x1 * (1.0f - fac) + x2 * fac, y1);
+ glVertex2f(x1 * (1.0f - fac) + x2 * fac, y2);
+ fac += 4.0f * gridstep;
+ }
+ glEnd();
+}
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c
index 5ba0e86e0c1..0f1ffb856e7 100644
--- a/source/blender/editors/screen/glutil.c
+++ b/source/blender/editors/screen/glutil.c
@@ -81,18 +81,18 @@ GLubyte stipple_halftone[128] = {
GLubyte stipple_quarttone[128] = {
- 136,136,136,136,0,0,0,0,34,34,34,34,0,0,0,0,
- 136,136,136,136,0,0,0,0,34,34,34,34,0,0,0,0,
- 136,136,136,136,0,0,0,0,34,34,34,34,0,0,0,0,
- 136,136,136,136,0,0,0,0,34,34,34,34,0,0,0,0,
- 136,136,136,136,0,0,0,0,34,34,34,34,0,0,0,0,
- 136,136,136,136,0,0,0,0,34,34,34,34,0,0,0,0,
- 136,136,136,136,0,0,0,0,34,34,34,34,0,0,0,0,
- 136,136,136,136,0,0,0,0,34,34,34,34,0,0,0,0};
+ 136, 136, 136, 136, 0, 0, 0, 0, 34, 34, 34, 34, 0, 0, 0, 0,
+ 136, 136, 136, 136, 0, 0, 0, 0, 34, 34, 34, 34, 0, 0, 0, 0,
+ 136, 136, 136, 136, 0, 0, 0, 0, 34, 34, 34, 34, 0, 0, 0, 0,
+ 136, 136, 136, 136, 0, 0, 0, 0, 34, 34, 34, 34, 0, 0, 0, 0,
+ 136, 136, 136, 136, 0, 0, 0, 0, 34, 34, 34, 34, 0, 0, 0, 0,
+ 136, 136, 136, 136, 0, 0, 0, 0, 34, 34, 34, 34, 0, 0, 0, 0,
+ 136, 136, 136, 136, 0, 0, 0, 0, 34, 34, 34, 34, 0, 0, 0, 0,
+ 136, 136, 136, 136, 0, 0, 0, 0, 34, 34, 34, 34, 0, 0, 0, 0};
GLubyte stipple_diag_stripes_pos[128] = {
- 0x00, 0xff, 0x00, 0xff, 0x01, 0xfe, 0x01, 0xfe,
+ 0x00, 0xff, 0x00, 0xff, 0x01, 0xfe, 0x01, 0xfe,
0x03, 0xfc, 0x03, 0xfc, 0x07, 0xf8, 0x07, 0xf8,
0x0f, 0xf0, 0x0f, 0xf0, 0x1f, 0xe0, 0x1f, 0xe0,
0x3f, 0xc0, 0x3f, 0xc0, 0x7f, 0x80, 0x7f, 0x80,
@@ -111,7 +111,7 @@ GLubyte stipple_diag_stripes_pos[128] = {
GLubyte stipple_diag_stripes_neg[128] = {
- 0xff, 0x00, 0xff, 0x00, 0xfe, 0x01, 0xfe, 0x01,
+ 0xff, 0x00, 0xff, 0x00, 0xfe, 0x01, 0xfe, 0x01,
0xfc, 0x03, 0xfc, 0x03, 0xf8, 0x07, 0xf8, 0x07,
0xf0, 0x0f, 0xf0, 0x0f, 0xe0, 0x1f, 0xe0, 0x1f,
0xc0, 0x3f, 0xc0, 0x3f, 0x80, 0x7f, 0x80, 0x7f,
@@ -134,16 +134,16 @@ void fdrawbezier(float vec[4][3])
float dist;
float curve_res = 24, spline_step = 0.0f;
- dist= 0.5f*ABS(vec[0][0] - vec[3][0]);
+ dist = 0.5f * ABS(vec[0][0] - vec[3][0]);
/* check direction later, for top sockets */
- vec[1][0]= vec[0][0]+dist;
- vec[1][1]= vec[0][1];
+ vec[1][0] = vec[0][0] + dist;
+ vec[1][1] = vec[0][1];
- vec[2][0]= vec[3][0]-dist;
- vec[2][1]= vec[3][1];
+ vec[2][0] = vec[3][0] - dist;
+ vec[2][1] = vec[3][1];
/* we can reuse the dist variable here to increment the GL curve eval amount*/
- dist = 1.0f/curve_res;
+ dist = 1.0f / curve_res;
cpack(0x0);
glMap1f(GL_MAP1_VERTEX_3, 0.0, 1.0, 3, 4, vec[0]);
@@ -193,18 +193,17 @@ void fdrawbox(float x1, float y1, float x2, float y2)
void fdrawcheckerboard(float x1, float y1, float x2, float y2)
{
- unsigned char col1[4]= {40, 40, 40}, col2[4]= {50, 50, 50};
+ unsigned char col1[4] = {40, 40, 40}, col2[4] = {50, 50, 50};
- GLubyte checker_stipple[32*32/8] = {
- 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,
- 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,
- 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,
- 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,
- 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,
- 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,
- 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,
- 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,
- };
+ GLubyte checker_stipple[32 * 32 / 8] = {
+ 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0,
+ 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0,
+ 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255,
+ 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255,
+ 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0,
+ 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0,
+ 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255,
+ 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255};
glColor3ubv(col1);
glRectf(x1, y1, x2, y2);
@@ -239,11 +238,11 @@ void sdrawline(short x1, short y1, short x2, short y2)
static void sdrawtripoints(short x1, short y1, short x2, short y2)
{
short v[2];
- v[0]= x1; v[1]= y1;
+ v[0] = x1; v[1] = y1;
glVertex2sv(v);
- v[0]= x1; v[1]= y2;
+ v[0] = x1; v[1] = y2;
glVertex2sv(v);
- v[0]= x2; v[1]= y1;
+ v[0] = x2; v[1] = y1;
glVertex2sv(v);
}
@@ -286,7 +285,7 @@ void sdrawbox(short x1, short y1, short x2, short y2)
void setlinestyle(int nr)
{
- if (nr==0) {
+ if (nr == 0) {
glDisable(GL_LINE_STIPPLE);
}
else {
@@ -296,20 +295,20 @@ void setlinestyle(int nr)
}
}
- /* Invert line handling */
+/* Invert line handling */
-#define glToggle(mode, onoff) (((onoff)?glEnable:glDisable)(mode))
+#define gl_toggle(mode, onoff) (((onoff) ? glEnable : glDisable)(mode))
void set_inverted_drawing(int enable)
{
- glLogicOp(enable?GL_INVERT:GL_COPY);
- glToggle(GL_COLOR_LOGIC_OP, enable);
- glToggle(GL_DITHER, !enable);
+ glLogicOp(enable ? GL_INVERT : GL_COPY);
+ gl_toggle(GL_COLOR_LOGIC_OP, enable);
+ gl_toggle(GL_DITHER, !enable);
}
void sdrawXORline(int x0, int y0, int x1, int y1)
{
- if (x0==x1 && y0==y1) return;
+ if (x0 == x1 && y0 == y1) return;
set_inverted_drawing(1);
@@ -324,35 +323,35 @@ void sdrawXORline(int x0, int y0, int x1, int y1)
void sdrawXORline4(int nr, int x0, int y0, int x1, int y1)
{
static short old[4][2][2];
- static char flags[4]= {0, 0, 0, 0};
+ static char flags[4] = {0, 0, 0, 0};
- /* with builtin memory, max 4 lines */
+ /* with builtin memory, max 4 lines */
set_inverted_drawing(1);
glBegin(GL_LINES);
- if (nr== -1) { /* flush */
- for (nr=0; nr<4; nr++) {
+ if (nr == -1) { /* flush */
+ for (nr = 0; nr < 4; nr++) {
if (flags[nr]) {
glVertex2sv(old[nr][0]);
glVertex2sv(old[nr][1]);
- flags[nr]= 0;
+ flags[nr] = 0;
}
}
}
else {
- if (nr>=0 && nr<4) {
+ if (nr >= 0 && nr < 4) {
if (flags[nr]) {
glVertex2sv(old[nr][0]);
glVertex2sv(old[nr][1]);
}
- old[nr][0][0]= x0;
- old[nr][0][1]= y0;
- old[nr][1][0]= x1;
- old[nr][1][1]= y1;
+ old[nr][0][0] = x0;
+ old[nr][0][1] = y0;
+ old[nr][1][0] = x1;
+ old[nr][1][1] = y1;
- flags[nr]= 1;
+ flags[nr] = 1;
}
glVertex2i(x0, y0);
@@ -365,14 +364,14 @@ void sdrawXORline4(int nr, int x0, int y0, int x1, int y1)
void fdrawXORellipse(float xofs, float yofs, float hw, float hh)
{
- if (hw==0) return;
+ if (hw == 0) return;
set_inverted_drawing(1);
glPushMatrix();
- glTranslatef(xofs, yofs, 0.0);
- glScalef(1,hh/hw,1);
- glutil_draw_lined_arc(0.0, M_PI*2.0, hw, 20);
+ glTranslatef(xofs, yofs, 0.0f);
+ glScalef(1.0f, hh / hw, 1.0f);
+ glutil_draw_lined_arc(0.0, M_PI * 2.0, hw, 20);
glPopMatrix();
set_inverted_drawing(0);
@@ -383,7 +382,7 @@ void fdrawXORcirc(float xofs, float yofs, float rad)
glPushMatrix();
glTranslatef(xofs, yofs, 0.0);
- glutil_draw_lined_arc(0.0, M_PI*2.0, rad, 20);
+ glutil_draw_lined_arc(0.0, M_PI * 2.0, rad, 20);
glPopMatrix();
set_inverted_drawing(0);
@@ -395,11 +394,11 @@ void glutil_draw_filled_arc(float start, float angle, float radius, int nsegment
glBegin(GL_TRIANGLE_FAN);
glVertex2f(0.0, 0.0);
- for (i=0; i<nsegments; i++) {
- float t= (float) i/(nsegments-1);
- float cur= start + t*angle;
+ for (i = 0; i < nsegments; i++) {
+ float t = (float) i / (nsegments - 1);
+ float cur = start + t * angle;
- glVertex2f(cosf(cur)*radius, sinf(cur)*radius);
+ glVertex2f(cosf(cur) * radius, sinf(cur) * radius);
}
glEnd();
}
@@ -409,11 +408,11 @@ void glutil_draw_lined_arc(float start, float angle, float radius, int nsegments
int i;
glBegin(GL_LINE_STRIP);
- for (i=0; i<nsegments; i++) {
- float t= (float) i/(nsegments-1);
- float cur= start + t*angle;
+ for (i = 0; i < nsegments; i++) {
+ float t = (float) i / (nsegments - 1);
+ float cur = start + t * angle;
- glVertex2f(cosf(cur)*radius, sinf(cur)*radius);
+ glVertex2f(cosf(cur) * radius, sinf(cur) * radius);
}
glEnd();
}
@@ -434,29 +433,29 @@ float glaGetOneFloat(int param)
void glaRasterPosSafe2f(float x, float y, float known_good_x, float known_good_y)
{
- GLubyte dummy= 0;
+ GLubyte dummy = 0;
- /* As long as known good coordinates are correct
- * this is guaranteed to generate an ok raster
- * position (ignoring potential (real) overflow
- * issues).
- */
+ /* As long as known good coordinates are correct
+ * this is guaranteed to generate an ok raster
+ * position (ignoring potential (real) overflow
+ * issues).
+ */
glRasterPos2f(known_good_x, known_good_y);
- /* Now shift the raster position to where we wanted
- * it in the first place using the glBitmap trick.
- */
+ /* Now shift the raster position to where we wanted
+ * it in the first place using the glBitmap trick.
+ */
glBitmap(0, 0, 0, 0, x - known_good_x, y - known_good_y, &dummy);
}
static int get_cached_work_texture(int *w_r, int *h_r)
{
- static GLint texid= -1;
- static int tex_w= 256;
- static int tex_h= 256;
+ static GLint texid = -1;
+ static int tex_w = 256;
+ static int tex_h = 256;
- if (texid==-1) {
- GLint ltexid= glaGetOneInteger(GL_TEXTURE_2D);
+ if (texid == -1) {
+ GLint ltexid = glaGetOneInteger(GL_TEXTURE_2D);
unsigned char *tbuf;
glGenTextures(1, (GLuint *)&texid);
@@ -466,28 +465,28 @@ static int get_cached_work_texture(int *w_r, int *h_r)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- tbuf= MEM_callocN(tex_w*tex_h*4, "tbuf");
+ tbuf = MEM_callocN(tex_w * tex_h * 4, "tbuf");
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, tex_w, tex_h, 0, GL_RGBA, GL_UNSIGNED_BYTE, tbuf);
MEM_freeN(tbuf);
glBindTexture(GL_TEXTURE_2D, ltexid);
}
- *w_r= tex_w;
- *h_r= tex_h;
+ *w_r = tex_w;
+ *h_r = tex_h;
return texid;
}
void glaDrawPixelsTexScaled(float x, float y, int img_w, int img_h, int format, void *rect, float scaleX, float scaleY)
{
- unsigned char *uc_rect= (unsigned char*) rect;
- float *f_rect= (float *)rect;
- float xzoom= glaGetOneFloat(GL_ZOOM_X), yzoom= glaGetOneFloat(GL_ZOOM_Y);
- int ltexid= glaGetOneInteger(GL_TEXTURE_2D);
- int lrowlength= glaGetOneInteger(GL_UNPACK_ROW_LENGTH);
+ unsigned char *uc_rect = (unsigned char *) rect;
+ float *f_rect = (float *)rect;
+ float xzoom = glaGetOneFloat(GL_ZOOM_X), yzoom = glaGetOneFloat(GL_ZOOM_Y);
+ int ltexid = glaGetOneInteger(GL_TEXTURE_2D);
+ int lrowlength = glaGetOneInteger(GL_UNPACK_ROW_LENGTH);
int subpart_x, subpart_y, tex_w, tex_h;
int seamless, offset_x, offset_y, nsubparts_x, nsubparts_y;
- int texid= get_cached_work_texture(&tex_w, &tex_h);
+ int texid = get_cached_work_texture(&tex_w, &tex_h);
/* Specify the color outside this function, and tex will modulate it.
* This is useful for changing alpha without using glPixelTransferf()
@@ -506,66 +505,66 @@ void glaDrawPixelsTexScaled(float x, float y, int img_w, int img_h, int format,
#endif
/* setup seamless 2=on, 0=off */
- seamless= ((tex_w<img_w || tex_h<img_h) && tex_w>2 && tex_h>2)? 2: 0;
-
- offset_x= tex_w - seamless;
- offset_y= tex_h - seamless;
-
- nsubparts_x= (img_w + (offset_x - 1))/(offset_x);
- nsubparts_y= (img_h + (offset_y - 1))/(offset_y);
-
- for (subpart_y=0; subpart_y<nsubparts_y; subpart_y++) {
- for (subpart_x=0; subpart_x<nsubparts_x; subpart_x++) {
- int remainder_x= img_w-subpart_x*offset_x;
- int remainder_y= img_h-subpart_y*offset_y;
- int subpart_w= (remainder_x<tex_w)? remainder_x: tex_w;
- int subpart_h= (remainder_y<tex_h)? remainder_y: tex_h;
- int offset_left= (seamless && subpart_x!=0)? 1: 0;
- int offset_bot= (seamless && subpart_y!=0)? 1: 0;
- int offset_right= (seamless && remainder_x>tex_w)? 1: 0;
- int offset_top= (seamless && remainder_y>tex_h)? 1: 0;
- float rast_x= x+subpart_x*offset_x*xzoom;
- float rast_y= y+subpart_y*offset_y*yzoom;
+ seamless = ((tex_w < img_w || tex_h < img_h) && tex_w > 2 && tex_h > 2) ? 2 : 0;
+
+ offset_x = tex_w - seamless;
+ offset_y = tex_h - seamless;
+
+ nsubparts_x = (img_w + (offset_x - 1)) / (offset_x);
+ nsubparts_y = (img_h + (offset_y - 1)) / (offset_y);
+
+ for (subpart_y = 0; subpart_y < nsubparts_y; subpart_y++) {
+ for (subpart_x = 0; subpart_x < nsubparts_x; subpart_x++) {
+ int remainder_x = img_w - subpart_x * offset_x;
+ int remainder_y = img_h - subpart_y * offset_y;
+ int subpart_w = (remainder_x < tex_w) ? remainder_x : tex_w;
+ int subpart_h = (remainder_y < tex_h) ? remainder_y : tex_h;
+ int offset_left = (seamless && subpart_x != 0) ? 1 : 0;
+ int offset_bot = (seamless && subpart_y != 0) ? 1 : 0;
+ int offset_right = (seamless && remainder_x > tex_w) ? 1 : 0;
+ int offset_top = (seamless && remainder_y > tex_h) ? 1 : 0;
+ float rast_x = x + subpart_x * offset_x * xzoom;
+ float rast_y = y + subpart_y * offset_y * yzoom;
/* check if we already got these because we always get 2 more when doing seamless*/
- if (subpart_w<=seamless || subpart_h<=seamless)
+ if (subpart_w <= seamless || subpart_h <= seamless)
continue;
- if (format==GL_FLOAT) {
- glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, subpart_w, subpart_h, GL_RGBA, GL_FLOAT, &f_rect[subpart_y*offset_y*img_w*4 + subpart_x*offset_x*4]);
+ if (format == GL_FLOAT) {
+ glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, subpart_w, subpart_h, GL_RGBA, GL_FLOAT, &f_rect[subpart_y * offset_y * img_w * 4 + subpart_x * offset_x * 4]);
/* add an extra border of pixels so linear looks ok at edges of full image. */
- if (subpart_w<tex_w)
- glTexSubImage2D(GL_TEXTURE_2D, 0, subpart_w, 0, 1, subpart_h, GL_RGBA, GL_FLOAT, &f_rect[subpart_y*offset_y*img_w*4 + (subpart_x*offset_x+subpart_w-1)*4]);
- if (subpart_h<tex_h)
- glTexSubImage2D(GL_TEXTURE_2D, 0, 0, subpart_h, subpart_w, 1, GL_RGBA, GL_FLOAT, &f_rect[(subpart_y*offset_y+subpart_h-1)*img_w*4 + subpart_x*offset_x*4]);
- if (subpart_w<tex_w && subpart_h<tex_h)
- glTexSubImage2D(GL_TEXTURE_2D, 0, subpart_w, subpart_h, 1, 1, GL_RGBA, GL_FLOAT, &f_rect[(subpart_y*offset_y+subpart_h-1)*img_w*4 + (subpart_x*offset_x+subpart_w-1)*4]);
+ if (subpart_w < tex_w)
+ glTexSubImage2D(GL_TEXTURE_2D, 0, subpart_w, 0, 1, subpart_h, GL_RGBA, GL_FLOAT, &f_rect[subpart_y * offset_y * img_w * 4 + (subpart_x * offset_x + subpart_w - 1) * 4]);
+ if (subpart_h < tex_h)
+ glTexSubImage2D(GL_TEXTURE_2D, 0, 0, subpart_h, subpart_w, 1, GL_RGBA, GL_FLOAT, &f_rect[(subpart_y * offset_y + subpart_h - 1) * img_w * 4 + subpart_x * offset_x * 4]);
+ if (subpart_w < tex_w && subpart_h < tex_h)
+ glTexSubImage2D(GL_TEXTURE_2D, 0, subpart_w, subpart_h, 1, 1, GL_RGBA, GL_FLOAT, &f_rect[(subpart_y * offset_y + subpart_h - 1) * img_w * 4 + (subpart_x * offset_x + subpart_w - 1) * 4]);
}
else {
- glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, subpart_w, subpart_h, GL_RGBA, GL_UNSIGNED_BYTE, &uc_rect[subpart_y*offset_y*img_w*4 + subpart_x*offset_x*4]);
+ glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, subpart_w, subpart_h, GL_RGBA, GL_UNSIGNED_BYTE, &uc_rect[subpart_y * offset_y * img_w * 4 + subpart_x * offset_x * 4]);
- if (subpart_w<tex_w)
- glTexSubImage2D(GL_TEXTURE_2D, 0, subpart_w, 0, 1, subpart_h, GL_RGBA, GL_UNSIGNED_BYTE, &uc_rect[subpart_y*offset_y*img_w*4 + (subpart_x*offset_x+subpart_w-1)*4]);
- if (subpart_h<tex_h)
- glTexSubImage2D(GL_TEXTURE_2D, 0, 0, subpart_h, subpart_w, 1, GL_RGBA, GL_UNSIGNED_BYTE, &uc_rect[(subpart_y*offset_y+subpart_h-1)*img_w*4 + subpart_x*offset_x*4]);
- if (subpart_w<tex_w && subpart_h<tex_h)
- glTexSubImage2D(GL_TEXTURE_2D, 0, subpart_w, subpart_h, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &uc_rect[(subpart_y*offset_y+subpart_h-1)*img_w*4 + (subpart_x*offset_x+subpart_w-1)*4]);
+ if (subpart_w < tex_w)
+ glTexSubImage2D(GL_TEXTURE_2D, 0, subpart_w, 0, 1, subpart_h, GL_RGBA, GL_UNSIGNED_BYTE, &uc_rect[subpart_y * offset_y * img_w * 4 + (subpart_x * offset_x + subpart_w - 1) * 4]);
+ if (subpart_h < tex_h)
+ glTexSubImage2D(GL_TEXTURE_2D, 0, 0, subpart_h, subpart_w, 1, GL_RGBA, GL_UNSIGNED_BYTE, &uc_rect[(subpart_y * offset_y + subpart_h - 1) * img_w * 4 + subpart_x * offset_x * 4]);
+ if (subpart_w < tex_w && subpart_h < tex_h)
+ glTexSubImage2D(GL_TEXTURE_2D, 0, subpart_w, subpart_h, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &uc_rect[(subpart_y * offset_y + subpart_h - 1) * img_w * 4 + (subpart_x * offset_x + subpart_w - 1) * 4]);
}
glEnable(GL_TEXTURE_2D);
glBegin(GL_QUADS);
- glTexCoord2f((float)(0 + offset_left)/tex_w, (float)(0 + offset_bot)/tex_h);
- glVertex2f(rast_x + (float)offset_left*xzoom, rast_y + (float)offset_bot*xzoom);
+ glTexCoord2f((float)(0 + offset_left) / tex_w, (float)(0 + offset_bot) / tex_h);
+ glVertex2f(rast_x + (float)offset_left * xzoom, rast_y + (float)offset_bot * xzoom);
- glTexCoord2f((float)(subpart_w - offset_right)/tex_w, (float)(0 + offset_bot)/tex_h);
- glVertex2f(rast_x + (float)(subpart_w - offset_right)*xzoom*scaleX, rast_y + (float)offset_bot*xzoom);
+ glTexCoord2f((float)(subpart_w - offset_right) / tex_w, (float)(0 + offset_bot) / tex_h);
+ glVertex2f(rast_x + (float)(subpart_w - offset_right) * xzoom * scaleX, rast_y + (float)offset_bot * xzoom);
- glTexCoord2f((float)(subpart_w - offset_right)/tex_w, (float)(subpart_h - offset_top)/tex_h);
- glVertex2f(rast_x + (float)(subpart_w - offset_right)*xzoom*scaleX, rast_y + (float)(subpart_h - offset_top)*yzoom*scaleY);
+ glTexCoord2f((float)(subpart_w - offset_right) / tex_w, (float)(subpart_h - offset_top) / tex_h);
+ glVertex2f(rast_x + (float)(subpart_w - offset_right) * xzoom * scaleX, rast_y + (float)(subpart_h - offset_top) * yzoom * scaleY);
- glTexCoord2f((float)(0 + offset_left)/tex_w, (float)(subpart_h - offset_top)/tex_h);
- glVertex2f(rast_x + (float)offset_left*xzoom, rast_y + (float)(subpart_h - offset_top)*yzoom*scaleY);
+ glTexCoord2f((float)(0 + offset_left) / tex_w, (float)(subpart_h - offset_top) / tex_h);
+ glVertex2f(rast_x + (float)offset_left * xzoom, rast_y + (float)(subpart_h - offset_top) * yzoom * scaleY);
glEnd();
glDisable(GL_TEXTURE_2D);
}
@@ -588,51 +587,51 @@ void glaDrawPixelsTex(float x, float y, int img_w, int img_h, int format, void *
void glaDrawPixelsSafe(float x, float y, int img_w, int img_h, int row_w, int format, int type, void *rect)
{
- float xzoom= glaGetOneFloat(GL_ZOOM_X);
- float yzoom= glaGetOneFloat(GL_ZOOM_Y);
-
- /* The pixel space coordinate of the intersection of
- * the [zoomed] image with the origin.
- */
- float ix= -x/xzoom;
- float iy= -y/yzoom;
-
- /* The maximum pixel amounts the image can be cropped
- * at the lower left without exceeding the origin.
- */
- int off_x= floor(MAX2(ix, 0));
- int off_y= floor(MAX2(iy, 0));
+ float xzoom = glaGetOneFloat(GL_ZOOM_X);
+ float yzoom = glaGetOneFloat(GL_ZOOM_Y);
+
+ /* The pixel space coordinate of the intersection of
+ * the [zoomed] image with the origin.
+ */
+ float ix = -x / xzoom;
+ float iy = -y / yzoom;
- /* The zoomed space coordinate of the raster position
- * (starting at the lower left most unclipped pixel).
- */
- float rast_x= x + off_x*xzoom;
- float rast_y= y + off_y*yzoom;
+ /* The maximum pixel amounts the image can be cropped
+ * at the lower left without exceeding the origin.
+ */
+ int off_x = floor(MAX2(ix, 0));
+ int off_y = floor(MAX2(iy, 0));
+
+ /* The zoomed space coordinate of the raster position
+ * (starting at the lower left most unclipped pixel).
+ */
+ float rast_x = x + off_x * xzoom;
+ float rast_y = y + off_y * yzoom;
GLfloat scissor[4];
int draw_w, draw_h;
- /* Determine the smallest number of pixels we need to draw
- * before the image would go off the upper right corner.
- *
- * It may seem this is just an optimization but some graphics
- * cards (ATI) freak out if there is a large zoom factor and
- * a large number of pixels off the screen (probably at some
- * level the number of image pixels to draw is getting multiplied
- * by the zoom and then clamped). Making sure we draw the
- * fewest pixels possible keeps everyone mostly happy (still
- * fails if we zoom in on one really huge pixel so that it
- * covers the entire screen).
- */
+ /* Determine the smallest number of pixels we need to draw
+ * before the image would go off the upper right corner.
+ *
+ * It may seem this is just an optimization but some graphics
+ * cards (ATI) freak out if there is a large zoom factor and
+ * a large number of pixels off the screen (probably at some
+ * level the number of image pixels to draw is getting multiplied
+ * by the zoom and then clamped). Making sure we draw the
+ * fewest pixels possible keeps everyone mostly happy (still
+ * fails if we zoom in on one really huge pixel so that it
+ * covers the entire screen).
+ */
glGetFloatv(GL_SCISSOR_BOX, scissor);
- draw_w = MIN2(img_w-off_x, ceil((scissor[2]-rast_x)/xzoom));
- draw_h = MIN2(img_h-off_y, ceil((scissor[3]-rast_y)/yzoom));
+ draw_w = MIN2(img_w - off_x, ceil((scissor[2] - rast_x) / xzoom));
+ draw_h = MIN2(img_h - off_y, ceil((scissor[3] - rast_y) / yzoom));
- if (draw_w>0 && draw_h>0) {
+ if (draw_w > 0 && draw_h > 0) {
int old_row_length = glaGetOneInteger(GL_UNPACK_ROW_LENGTH);
- /* Don't use safe RasterPos (slower) if we can avoid it. */
- if (rast_x>=0 && rast_y>=0) {
+ /* Don't use safe RasterPos (slower) if we can avoid it. */
+ if (rast_x >= 0 && rast_y >= 0) {
glRasterPos2f(rast_x, rast_y);
}
else {
@@ -640,24 +639,24 @@ void glaDrawPixelsSafe(float x, float y, int img_w, int img_h, int row_w, int fo
}
glPixelStorei(GL_UNPACK_ROW_LENGTH, row_w);
- if (format==GL_LUMINANCE || format==GL_RED) {
- if (type==GL_FLOAT) {
- float *f_rect= (float *)rect;
- glDrawPixels(draw_w, draw_h, format, type, f_rect + (off_y*row_w + off_x));
+ if (format == GL_LUMINANCE || format == GL_RED) {
+ if (type == GL_FLOAT) {
+ float *f_rect = (float *)rect;
+ glDrawPixels(draw_w, draw_h, format, type, f_rect + (off_y * row_w + off_x));
}
- else if (type==GL_INT || type==GL_UNSIGNED_INT) {
- int *i_rect= (int *)rect;
- glDrawPixels(draw_w, draw_h, format, type, i_rect + (off_y*row_w + off_x));
+ else if (type == GL_INT || type == GL_UNSIGNED_INT) {
+ int *i_rect = (int *)rect;
+ glDrawPixels(draw_w, draw_h, format, type, i_rect + (off_y * row_w + off_x));
}
}
else { /* RGBA */
- if (type==GL_FLOAT) {
- float *f_rect= (float *)rect;
- glDrawPixels(draw_w, draw_h, format, type, f_rect + (off_y*row_w + off_x)*4);
+ if (type == GL_FLOAT) {
+ float *f_rect = (float *)rect;
+ glDrawPixels(draw_w, draw_h, format, type, f_rect + (off_y * row_w + off_x) * 4);
}
- else if (type==GL_UNSIGNED_BYTE) {
- unsigned char *uc_rect= (unsigned char *) rect;
- glDrawPixels(draw_w, draw_h, format, type, uc_rect + (off_y*row_w + off_x)*4);
+ else if (type == GL_UNSIGNED_BYTE) {
+ unsigned char *uc_rect = (unsigned char *) rect;
+ glDrawPixels(draw_w, draw_h, format, type, uc_rect + (off_y * row_w + off_x) * 4);
}
}
@@ -669,17 +668,17 @@ void glaDrawPixelsSafe(float x, float y, int img_w, int img_h, int row_w, int fo
void glaDefine2DArea(rcti *screen_rect)
{
- int sc_w= screen_rect->xmax - screen_rect->xmin + 1;
- int sc_h= screen_rect->ymax - screen_rect->ymin + 1;
+ int sc_w = screen_rect->xmax - screen_rect->xmin + 1;
+ int sc_h = screen_rect->ymax - screen_rect->ymin + 1;
glViewport(screen_rect->xmin, screen_rect->ymin, sc_w, sc_h);
glScissor(screen_rect->xmin, screen_rect->ymin, sc_w, sc_h);
- /* The 0.375 magic number is to shift the matrix so that
- * both raster and vertex integer coordinates fall at pixel
- * centers properly. For a longer discussion see the OpenGL
- * Programming Guide, Appendix H, Correctness Tips.
- */
+ /* The 0.375 magic number is to shift the matrix so that
+ * both raster and vertex integer coordinates fall at pixel
+ * centers properly. For a longer discussion see the OpenGL
+ * Programming Guide, Appendix H, Correctness Tips.
+ */
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
@@ -704,7 +703,7 @@ struct gla2DDrawInfo {
void gla2DGetMap(gla2DDrawInfo *di, rctf *rect)
{
- *rect= di->world_rect;
+ *rect = di->world_rect;
}
void gla2DSetMap(gla2DDrawInfo *di, rctf *rect)
@@ -712,20 +711,20 @@ void gla2DSetMap(gla2DDrawInfo *di, rctf *rect)
int sc_w, sc_h;
float wo_w, wo_h;
- di->world_rect= *rect;
+ di->world_rect = *rect;
- sc_w= (di->screen_rect.xmax-di->screen_rect.xmin);
- sc_h= (di->screen_rect.ymax-di->screen_rect.ymin);
- wo_w= (di->world_rect.xmax-di->world_rect.xmin);
- wo_h= (di->world_rect.ymax-di->world_rect.ymin);
+ sc_w = (di->screen_rect.xmax - di->screen_rect.xmin);
+ sc_h = (di->screen_rect.ymax - di->screen_rect.ymin);
+ wo_w = (di->world_rect.xmax - di->world_rect.xmin);
+ wo_h = (di->world_rect.ymax - di->world_rect.ymin);
- di->wo_to_sc[0]= sc_w/wo_w;
- di->wo_to_sc[1]= sc_h/wo_h;
+ di->wo_to_sc[0] = sc_w / wo_w;
+ di->wo_to_sc[1] = sc_h / wo_h;
}
gla2DDrawInfo *glaBegin2DDraw(rcti *screen_rect, rctf *world_rect)
{
- gla2DDrawInfo *di= MEM_mallocN(sizeof(*di), "gla2DDrawInfo");
+ gla2DDrawInfo *di = MEM_mallocN(sizeof(*di), "gla2DDrawInfo");
int sc_w, sc_h;
float wo_w, wo_h;
@@ -734,9 +733,9 @@ gla2DDrawInfo *glaBegin2DDraw(rcti *screen_rect, rctf *world_rect)
glGetFloatv(GL_PROJECTION_MATRIX, (GLfloat *)di->orig_projmat);
glGetFloatv(GL_MODELVIEW_MATRIX, (GLfloat *)di->orig_viewmat);
- di->screen_rect= *screen_rect;
+ di->screen_rect = *screen_rect;
if (world_rect) {
- di->world_rect= *world_rect;
+ di->world_rect = *world_rect;
}
else {
di->world_rect.xmin = di->screen_rect.xmin;
@@ -745,13 +744,13 @@ gla2DDrawInfo *glaBegin2DDraw(rcti *screen_rect, rctf *world_rect)
di->world_rect.ymax = di->screen_rect.ymax;
}
- sc_w= (di->screen_rect.xmax-di->screen_rect.xmin);
- sc_h= (di->screen_rect.ymax-di->screen_rect.ymin);
- wo_w= (di->world_rect.xmax-di->world_rect.xmin);
- wo_h= (di->world_rect.ymax-di->world_rect.ymin);
+ sc_w = (di->screen_rect.xmax - di->screen_rect.xmin);
+ sc_h = (di->screen_rect.ymax - di->screen_rect.ymin);
+ wo_w = (di->world_rect.xmax - di->world_rect.xmin);
+ wo_h = (di->world_rect.ymax - di->world_rect.ymin);
- di->wo_to_sc[0]= sc_w/wo_w;
- di->wo_to_sc[1]= sc_h/wo_h;
+ di->wo_to_sc[0] = sc_w / wo_w;
+ di->wo_to_sc[1] = sc_h / wo_h;
glaDefine2DArea(&di->screen_rect);
@@ -760,13 +759,13 @@ gla2DDrawInfo *glaBegin2DDraw(rcti *screen_rect, rctf *world_rect)
void gla2DDrawTranslatePt(gla2DDrawInfo *di, float wo_x, float wo_y, int *sc_x_r, int *sc_y_r)
{
- *sc_x_r= (wo_x - di->world_rect.xmin)*di->wo_to_sc[0];
- *sc_y_r= (wo_y - di->world_rect.ymin)*di->wo_to_sc[1];
+ *sc_x_r = (wo_x - di->world_rect.xmin) * di->wo_to_sc[0];
+ *sc_y_r = (wo_y - di->world_rect.ymin) * di->wo_to_sc[1];
}
void gla2DDrawTranslatePtv(gla2DDrawInfo *di, float world[2], int screen_r[2])
{
- screen_r[0]= (world[0] - di->world_rect.xmin)*di->wo_to_sc[0];
- screen_r[1]= (world[1] - di->world_rect.ymin)*di->wo_to_sc[1];
+ screen_r[0] = (world[0] - di->world_rect.xmin) * di->wo_to_sc[0];
+ screen_r[1] = (world[1] - di->world_rect.ymin) * di->wo_to_sc[1];
}
void glaEnd2DDraw(gla2DDrawInfo *di)
@@ -782,26 +781,26 @@ void glaEnd2DDraw(gla2DDrawInfo *di)
}
#endif
-/* **************** glPoint hack ************************ */
+/* **************** GL_POINT hack ************************ */
-static int curmode=0;
-static int pointhack=0;
-static GLubyte Squaredot[16] = { 0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff};
+static int curmode = 0;
+static int pointhack = 0;
+static GLubyte Squaredot[16] = {0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff};
void bglBegin(int mode)
{
- curmode= mode;
+ curmode = mode;
- if (mode==GL_POINTS) {
+ if (mode == GL_POINTS) {
float value[4];
glGetFloatv(GL_POINT_SIZE_RANGE, value);
if (value[1] < 2.0f) {
glGetFloatv(GL_POINT_SIZE, value);
- pointhack= floor(value[0] + 0.5f);
- if (pointhack>4) pointhack= 4;
+ pointhack = floor(value[0] + 0.5f);
+ if (pointhack > 4) pointhack = 4;
}
else glBegin(mode);
}
@@ -815,8 +814,8 @@ int bglPointHack(void)
glGetFloatv(GL_POINT_SIZE_RANGE, value);
if (value[1] < 2.0f) {
glGetFloatv(GL_POINT_SIZE, value);
- pointhack_px= floorf(value[0]+0.5f);
- if (pointhack_px>4) pointhack_px= 4;
+ pointhack_px = floorf(value[0] + 0.5f);
+ if (pointhack_px > 4) pointhack_px = 4;
return pointhack_px;
}
return 0;
@@ -825,47 +824,47 @@ int bglPointHack(void)
void bglVertex3fv(const float vec[3])
{
- switch(curmode) {
- case GL_POINTS:
- if (pointhack) {
- glRasterPos3fv(vec);
- glBitmap(pointhack, pointhack, (float)pointhack/2.0f, (float)pointhack/2.0f, 0.0, 0.0, Squaredot);
- }
- else glVertex3fv(vec);
- break;
+ switch (curmode) {
+ case GL_POINTS:
+ if (pointhack) {
+ glRasterPos3fv(vec);
+ glBitmap(pointhack, pointhack, (float)pointhack / 2.0f, (float)pointhack / 2.0f, 0.0, 0.0, Squaredot);
+ }
+ else glVertex3fv(vec);
+ break;
}
}
void bglVertex3f(float x, float y, float z)
{
- switch(curmode) {
- case GL_POINTS:
- if (pointhack) {
- glRasterPos3f(x, y, z);
- glBitmap(pointhack, pointhack, (float)pointhack/2.0f, (float)pointhack/2.0f, 0.0, 0.0, Squaredot);
- }
- else glVertex3f(x, y, z);
- break;
+ switch (curmode) {
+ case GL_POINTS:
+ if (pointhack) {
+ glRasterPos3f(x, y, z);
+ glBitmap(pointhack, pointhack, (float)pointhack / 2.0f, (float)pointhack / 2.0f, 0.0, 0.0, Squaredot);
+ }
+ else glVertex3f(x, y, z);
+ break;
}
}
void bglVertex2fv(const float vec[2])
{
- switch(curmode) {
- case GL_POINTS:
- if (pointhack) {
- glRasterPos2fv(vec);
- glBitmap(pointhack, pointhack, (float)pointhack/2, pointhack/2, 0.0, 0.0, Squaredot);
- }
- else glVertex2fv(vec);
- break;
+ switch (curmode) {
+ case GL_POINTS:
+ if (pointhack) {
+ glRasterPos2fv(vec);
+ glBitmap(pointhack, pointhack, (float)pointhack / 2, pointhack / 2, 0.0, 0.0, Squaredot);
+ }
+ else glVertex2fv(vec);
+ break;
}
}
void bglEnd(void)
{
- if (pointhack) pointhack= 0;
+ if (pointhack) pointhack = 0;
else glEnd();
}
@@ -873,7 +872,7 @@ void bglEnd(void)
/* Uses current OpenGL state to get view matrices for gluProject/gluUnProject */
void bgl_get_mats(bglMats *mats)
{
- const double badvalue= 1.0e-6;
+ const double badvalue = 1.0e-6;
glGetDoublev(GL_MODELVIEW_MATRIX, mats->modelview);
glGetDoublev(GL_PROJECTION_MATRIX, mats->projection);
@@ -882,11 +881,15 @@ void bgl_get_mats(bglMats *mats)
/* Very strange code here - it seems that certain bad values in the
* modelview matrix can cause gluUnProject to give bad results. */
if (mats->modelview[0] < badvalue &&
- mats->modelview[0] > -badvalue)
- mats->modelview[0]= 0;
+ mats->modelview[0] > -badvalue)
+ {
+ mats->modelview[0] = 0;
+ }
if (mats->modelview[5] < badvalue &&
- mats->modelview[5] > -badvalue)
- mats->modelview[5]= 0;
+ mats->modelview[5] > -badvalue)
+ {
+ mats->modelview[5] = 0;
+ }
/* Set up viewport so that gluUnProject will give correct values */
mats->viewport[0] = 0;
@@ -898,7 +901,7 @@ void bgl_get_mats(bglMats *mats)
/* dist is only for ortho now... */
void bglPolygonOffset(float viewdist, float dist)
{
- static float winmat[16], offset=0.0;
+ static float winmat[16], offset = 0.0;
if (dist != 0.0f) {
float offs;
@@ -912,11 +915,11 @@ void bglPolygonOffset(float viewdist, float dist)
/* dist is from camera to center point */
- if (winmat[15]>0.5f) offs= 0.00001f*dist*viewdist; // ortho tweaking
- else offs= 0.0005f*dist; // should be clipping value or so...
+ if (winmat[15] > 0.5f) offs = 0.00001f * dist * viewdist; // ortho tweaking
+ else offs = 0.0005f * dist; // should be clipping value or so...
- winmat[14]-= offs;
- offset+= offs;
+ winmat[14] -= offs;
+ offset += offs;
glLoadMatrixf(winmat);
glMatrixMode(GL_MODELVIEW);
@@ -924,8 +927,8 @@ void bglPolygonOffset(float viewdist, float dist)
else {
glMatrixMode(GL_PROJECTION);
- winmat[14]+= offset;
- offset= 0.0;
+ winmat[14] += offset;
+ offset = 0.0;
glLoadMatrixf(winmat);
glMatrixMode(GL_MODELVIEW);
}
diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c
index 9e044068468..ccc54a554e6 100644
--- a/source/blender/editors/screen/screen_context.c
+++ b/source/blender/editors/screen/screen_context.c
@@ -72,19 +72,19 @@ const char *screen_context_dir[] = {
int ed_screen_context(const bContext *C, const char *member, bContextDataResult *result)
{
- bScreen *sc= CTX_wm_screen(C);
- Scene *scene= sc->scene;
+ bScreen *sc = CTX_wm_screen(C);
+ Scene *scene = sc->scene;
Base *base;
unsigned int lay = scene->lay;
-#if 0 /* Using the context breaks adding objects in the UI. Need to find out why - campbell */
- Object *obact= CTX_data_active_object(C);
- Object *obedit= CTX_data_edit_object(C);
- base= CTX_data_active_base(C);
+#if 0 /* Using the context breaks adding objects in the UI. Need to find out why - campbell */
+ Object *obact = CTX_data_active_object(C);
+ Object *obedit = CTX_data_edit_object(C);
+ base = CTX_data_active_base(C);
#else
- Object *obedit= scene->obedit;
- Object *obact= OBACT;
- base= BASACT;
+ Object *obedit = scene->obedit;
+ Object *obact = OBACT;
+ base = BASACT;
#endif
if (CTX_data_dir(member)) {
@@ -96,9 +96,9 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
return 1;
}
else if (CTX_data_equals(member, "visible_objects") || CTX_data_equals(member, "visible_bases")) {
- int visible_objects= CTX_data_equals(member, "visible_objects");
+ int visible_objects = CTX_data_equals(member, "visible_objects");
- for (base=scene->base.first; base; base=base->next) {
+ for (base = scene->base.first; base; base = base->next) {
if (((base->object->restrictflag & OB_RESTRICT_VIEW) == 0) && (base->lay & scene->lay)) {
if (visible_objects)
CTX_data_id_list_add(result, &base->object->id);
@@ -110,11 +110,11 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
return 1;
}
else if (CTX_data_equals(member, "selectable_objects") || CTX_data_equals(member, "selectable_bases")) {
- int selectable_objects= CTX_data_equals(member, "selectable_objects");
+ int selectable_objects = CTX_data_equals(member, "selectable_objects");
- for (base=scene->base.first; base; base=base->next) {
+ for (base = scene->base.first; base; base = base->next) {
if (base->lay & lay) {
- if ((base->object->restrictflag & OB_RESTRICT_VIEW)==0 && (base->object->restrictflag & OB_RESTRICT_SELECT)==0) {
+ if ((base->object->restrictflag & OB_RESTRICT_VIEW) == 0 && (base->object->restrictflag & OB_RESTRICT_SELECT) == 0) {
if (selectable_objects)
CTX_data_id_list_add(result, &base->object->id);
else
@@ -126,9 +126,9 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
return 1;
}
else if (CTX_data_equals(member, "selected_objects") || CTX_data_equals(member, "selected_bases")) {
- int selected_objects= CTX_data_equals(member, "selected_objects");
+ int selected_objects = CTX_data_equals(member, "selected_objects");
- for (base=scene->base.first; base; base=base->next) {
+ for (base = scene->base.first; base; base = base->next) {
if ((base->flag & SELECT) && (base->lay & scene->lay)) {
if (selected_objects)
CTX_data_id_list_add(result, &base->object->id);
@@ -140,12 +140,12 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
return 1;
}
else if (CTX_data_equals(member, "selected_editable_objects") || CTX_data_equals(member, "selected_editable_bases")) {
- int selected_editable_objects= CTX_data_equals(member, "selected_editable_objects");
+ int selected_editable_objects = CTX_data_equals(member, "selected_editable_objects");
- for (base=scene->base.first; base; base=base->next) {
+ for (base = scene->base.first; base; base = base->next) {
if ((base->flag & SELECT) && (base->lay & scene->lay)) {
- if ((base->object->restrictflag & OB_RESTRICT_VIEW)==0) {
- if (0==object_is_libdata(base->object)) {
+ if ((base->object->restrictflag & OB_RESTRICT_VIEW) == 0) {
+ if (0 == BKE_object_is_libdata(base->object)) {
if (selected_editable_objects)
CTX_data_id_list_add(result, &base->object->id);
else
@@ -158,13 +158,13 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
return 1;
}
else if (CTX_data_equals(member, "visible_bones") || CTX_data_equals(member, "editable_bones")) {
- bArmature *arm= (obedit && obedit->type == OB_ARMATURE) ? obedit->data : NULL;
- EditBone *ebone, *flipbone=NULL;
- int editable_bones= CTX_data_equals(member, "editable_bones");
+ bArmature *arm = (obedit && obedit->type == OB_ARMATURE) ? obedit->data : NULL;
+ EditBone *ebone, *flipbone = NULL;
+ int editable_bones = CTX_data_equals(member, "editable_bones");
if (arm && arm->edbo) {
/* Attention: X-Axis Mirroring is also handled here... */
- for (ebone= arm->edbo->first; ebone; ebone= ebone->next) {
+ for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
/* first and foremost, bone must be visible and selected */
if (EBONE_VISIBLE(arm, ebone)) {
/* Get 'x-axis mirror equivalent' bone if the X-Axis Mirroring option is enabled
@@ -190,7 +190,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
/* only include bones if visible */
CTX_data_list_add(result, &arm->id, &RNA_EditBone, ebone);
- if ((flipbone) && EBONE_VISIBLE(arm, flipbone)==0)
+ if ((flipbone) && EBONE_VISIBLE(arm, flipbone) == 0)
CTX_data_list_add(result, &arm->id, &RNA_EditBone, flipbone);
}
}
@@ -200,13 +200,13 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
}
}
else if (CTX_data_equals(member, "selected_bones") || CTX_data_equals(member, "selected_editable_bones")) {
- bArmature *arm= (obedit && obedit->type == OB_ARMATURE) ? obedit->data : NULL;
- EditBone *ebone, *flipbone=NULL;
- int selected_editable_bones= CTX_data_equals(member, "selected_editable_bones");
+ bArmature *arm = (obedit && obedit->type == OB_ARMATURE) ? obedit->data : NULL;
+ EditBone *ebone, *flipbone = NULL;
+ int selected_editable_bones = CTX_data_equals(member, "selected_editable_bones");
if (arm && arm->edbo) {
/* Attention: X-Axis Mirroring is also handled here... */
- for (ebone= arm->edbo->first; ebone; ebone= ebone->next) {
+ for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
/* first and foremost, bone must be visible and selected */
if (EBONE_VISIBLE(arm, ebone) && (ebone->flag & BONE_SELECTED)) {
/* Get 'x-axis mirror equivalent' bone if the X-Axis Mirroring option is enabled
@@ -242,12 +242,12 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
}
}
else if (CTX_data_equals(member, "visible_pose_bones")) {
- Object *obpose= object_pose_armature_get(obact);
- bArmature *arm= (obpose) ? obpose->data : NULL;
+ Object *obpose = BKE_object_pose_armature_get(obact);
+ bArmature *arm = (obpose) ? obpose->data : NULL;
bPoseChannel *pchan;
if (obpose && obpose->pose && arm) {
- for (pchan= obpose->pose->chanbase.first; pchan; pchan= pchan->next) {
+ for (pchan = obpose->pose->chanbase.first; pchan; pchan = pchan->next) {
/* ensure that PoseChannel is on visible layer and is not hidden in PoseMode */
if (PBONE_VISIBLE(arm, pchan->bone)) {
CTX_data_list_add(result, &obpose->id, &RNA_PoseBone, pchan);
@@ -258,12 +258,12 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
}
}
else if (CTX_data_equals(member, "selected_pose_bones")) {
- Object *obpose= object_pose_armature_get(obact);
- bArmature *arm= (obpose) ? obpose->data : NULL;
+ Object *obpose = BKE_object_pose_armature_get(obact);
+ bArmature *arm = (obpose) ? obpose->data : NULL;
bPoseChannel *pchan;
if (obpose && obpose->pose && arm) {
- for (pchan= obpose->pose->chanbase.first; pchan; pchan= pchan->next) {
+ for (pchan = obpose->pose->chanbase.first; pchan; pchan = pchan->next) {
/* ensure that PoseChannel is on visible layer and is not hidden in PoseMode */
if (PBONE_VISIBLE(arm, pchan->bone)) {
if (pchan->bone->flag & BONE_SELECTED)
@@ -276,7 +276,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
}
else if (CTX_data_equals(member, "active_bone")) {
if (obact && obact->type == OB_ARMATURE) {
- bArmature *arm= obact->data;
+ bArmature *arm = obact->data;
if (arm->edbo) {
if (arm->act_edbone) {
CTX_data_pointer_set(result, &arm->id, &RNA_EditBone, arm->act_edbone);
@@ -293,9 +293,9 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
}
else if (CTX_data_equals(member, "active_pose_bone")) {
bPoseChannel *pchan;
- Object *obpose= object_pose_armature_get(obact);
+ Object *obpose = BKE_object_pose_armature_get(obact);
- pchan= get_active_posechannel(obpose);
+ pchan = BKE_pose_channel_active(obpose);
if (pchan) {
CTX_data_pointer_set(result, &obpose->id, &RNA_PoseBone, pchan);
return 1;
@@ -357,10 +357,10 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
return 1;
}
else if (CTX_data_equals(member, "sequences")) {
- Editing *ed= seq_give_editing(scene, FALSE);
+ Editing *ed = seq_give_editing(scene, FALSE);
if (ed) {
Sequence *seq;
- for (seq= ed->seqbasep->first; seq; seq= seq->next) {
+ for (seq = ed->seqbasep->first; seq; seq = seq->next) {
CTX_data_list_add(result, &scene->id, &RNA_Sequence, seq);
}
CTX_data_type_set(result, CTX_DATA_TYPE_COLLECTION);
@@ -368,10 +368,10 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
}
}
else if (CTX_data_equals(member, "selected_sequences")) {
- Editing *ed= seq_give_editing(scene, FALSE);
+ Editing *ed = seq_give_editing(scene, FALSE);
if (ed) {
Sequence *seq;
- for (seq= ed->seqbasep->first; seq; seq= seq->next) {
+ for (seq = ed->seqbasep->first; seq; seq = seq->next) {
if (seq->flag & SELECT) {
CTX_data_list_add(result, &scene->id, &RNA_Sequence, seq);
}
@@ -381,10 +381,10 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
}
}
else if (CTX_data_equals(member, "selected_editable_sequences")) {
- Editing *ed= seq_give_editing(scene, FALSE);
+ Editing *ed = seq_give_editing(scene, FALSE);
if (ed) {
Sequence *seq;
- for (seq= ed->seqbasep->first; seq; seq= seq->next) {
+ for (seq = ed->seqbasep->first; seq; seq = seq->next) {
if (seq->flag & SELECT && !(seq->flag & SEQ_LOCK)) {
CTX_data_list_add(result, &scene->id, &RNA_Sequence, seq);
}
@@ -394,19 +394,19 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
}
}
else if (CTX_data_equals(member, "active_operator")) {
- wmOperator *op= NULL;
+ wmOperator *op = NULL;
- SpaceFile *sfile= CTX_wm_space_file(C);
+ SpaceFile *sfile = CTX_wm_space_file(C);
if (sfile) {
- op= sfile->op;
+ op = sfile->op;
}
- else if ((op= uiContextActiveOperator(C))) {
+ else if ((op = uiContextActiveOperator(C))) {
/* do nothign */
}
else {
/* note, this checks poll, could be a problem, but this also
* happens for the toolbar */
- op= WM_operator_last_redo(C);
+ op = WM_operator_last_redo(C);
}
/* TODO, get the operator from popup's */
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index 03d8b3d3e9c..d714f82b58b 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -66,16 +66,16 @@
/* XXX actually should be not here... solve later */
#include "wm_subwindow.h"
-#include "screen_intern.h" /* own module include */
+#include "screen_intern.h" /* own module include */
/* ******************* screen vert, edge, area managing *********************** */
static ScrVert *screen_addvert(bScreen *sc, short x, short y)
{
- ScrVert *sv= MEM_callocN(sizeof(ScrVert), "addscrvert");
- sv->vec.x= x;
- sv->vec.y= y;
+ ScrVert *sv = MEM_callocN(sizeof(ScrVert), "addscrvert");
+ sv->vec.x = x;
+ sv->vec.y = y;
BLI_addtail(&sc->vertbase, sv);
return sv;
@@ -86,19 +86,19 @@ static void sortscrvert(ScrVert **v1, ScrVert **v2)
ScrVert *tmp;
if (*v1 > *v2) {
- tmp= *v1;
- *v1= *v2;
- *v2= tmp;
+ tmp = *v1;
+ *v1 = *v2;
+ *v2 = tmp;
}
}
static ScrEdge *screen_addedge(bScreen *sc, ScrVert *v1, ScrVert *v2)
{
- ScrEdge *se= MEM_callocN(sizeof(ScrEdge), "addscredge");
+ ScrEdge *se = MEM_callocN(sizeof(ScrEdge), "addscredge");
sortscrvert(&v1, &v2);
- se->v1= v1;
- se->v2= v2;
+ se->v1 = v1;
+ se->v2 = v2;
BLI_addtail(&sc->edgebase, se);
return se;
@@ -110,8 +110,8 @@ ScrEdge *screen_findedge(bScreen *sc, ScrVert *v1, ScrVert *v2)
ScrEdge *se;
sortscrvert(&v1, &v2);
- for (se= sc->edgebase.first; se; se= se->next)
- if (se->v1==v1 && se->v2==v2)
+ for (se = sc->edgebase.first; se; se = se->next)
+ if (se->v1 == v1 && se->v2 == v2)
return se;
return NULL;
@@ -123,50 +123,50 @@ void removedouble_scrverts(bScreen *sc)
ScrEdge *se;
ScrArea *sa;
- verg= sc->vertbase.first;
+ verg = sc->vertbase.first;
while (verg) {
- if (verg->newv==NULL) { /* !!! */
- v1= verg->next;
+ if (verg->newv == NULL) { /* !!! */
+ v1 = verg->next;
while (v1) {
- if (v1->newv==NULL) { /* !?! */
- if (v1->vec.x==verg->vec.x && v1->vec.y==verg->vec.y) {
+ if (v1->newv == NULL) { /* !?! */
+ if (v1->vec.x == verg->vec.x && v1->vec.y == verg->vec.y) {
/* printf("doublevert\n"); */
- v1->newv= verg;
+ v1->newv = verg;
}
}
- v1= v1->next;
+ v1 = v1->next;
}
}
- verg= verg->next;
+ verg = verg->next;
}
/* replace pointers in edges and faces */
- se= sc->edgebase.first;
+ se = sc->edgebase.first;
while (se) {
- if (se->v1->newv) se->v1= se->v1->newv;
- if (se->v2->newv) se->v2= se->v2->newv;
+ if (se->v1->newv) se->v1 = se->v1->newv;
+ if (se->v2->newv) se->v2 = se->v2->newv;
/* edges changed: so.... */
sortscrvert(&(se->v1), &(se->v2));
- se= se->next;
+ se = se->next;
}
- sa= sc->areabase.first;
+ sa = sc->areabase.first;
while (sa) {
- if (sa->v1->newv) sa->v1= sa->v1->newv;
- if (sa->v2->newv) sa->v2= sa->v2->newv;
- if (sa->v3->newv) sa->v3= sa->v3->newv;
- if (sa->v4->newv) sa->v4= sa->v4->newv;
- sa= sa->next;
+ if (sa->v1->newv) sa->v1 = sa->v1->newv;
+ if (sa->v2->newv) sa->v2 = sa->v2->newv;
+ if (sa->v3->newv) sa->v3 = sa->v3->newv;
+ if (sa->v4->newv) sa->v4 = sa->v4->newv;
+ sa = sa->next;
}
/* remove */
- verg= sc->vertbase.first;
+ verg = sc->vertbase.first;
while (verg) {
- v1= verg->next;
+ v1 = verg->next;
if (verg->newv) {
BLI_remlink(&sc->vertbase, verg);
MEM_freeN(verg);
}
- verg= v1;
+ verg = v1;
}
}
@@ -178,22 +178,22 @@ void removenotused_scrverts(bScreen *sc)
/* we assume edges are ok */
- se= sc->edgebase.first;
+ se = sc->edgebase.first;
while (se) {
- se->v1->flag= 1;
- se->v2->flag= 1;
- se= se->next;
+ se->v1->flag = 1;
+ se->v2->flag = 1;
+ se = se->next;
}
- sv= sc->vertbase.first;
+ sv = sc->vertbase.first;
while (sv) {
- svn= sv->next;
- if (sv->flag==0) {
+ svn = sv->next;
+ if (sv->flag == 0) {
BLI_remlink(&sc->vertbase, sv);
MEM_freeN(sv);
}
- else sv->flag= 0;
- sv= svn;
+ else sv->flag = 0;
+ sv = svn;
}
}
@@ -202,18 +202,18 @@ void removedouble_scredges(bScreen *sc)
ScrEdge *verg, *se, *sn;
/* compare */
- verg= sc->edgebase.first;
+ verg = sc->edgebase.first;
while (verg) {
- se= verg->next;
+ se = verg->next;
while (se) {
- sn= se->next;
- if (verg->v1==se->v1 && verg->v2==se->v2) {
+ sn = se->next;
+ if (verg->v1 == se->v1 && verg->v2 == se->v2) {
BLI_remlink(&sc->edgebase, se);
MEM_freeN(se);
}
- se= sn;
+ se = sn;
}
- verg= verg->next;
+ verg = verg->next;
}
}
@@ -221,35 +221,35 @@ void removenotused_scredges(bScreen *sc)
{
ScrEdge *se, *sen;
ScrArea *sa;
- int a=0;
+ int a = 0;
/* sets flags when edge is used in area */
- sa= sc->areabase.first;
+ sa = sc->areabase.first;
while (sa) {
- se= screen_findedge(sc, sa->v1, sa->v2);
- if (se==NULL) printf("error: area %d edge 1 doesn't exist\n", a);
- else se->flag= 1;
- se= screen_findedge(sc, sa->v2, sa->v3);
- if (se==NULL) printf("error: area %d edge 2 doesn't exist\n", a);
- else se->flag= 1;
- se= screen_findedge(sc, sa->v3, sa->v4);
- if (se==NULL) printf("error: area %d edge 3 doesn't exist\n", a);
- else se->flag= 1;
- se= screen_findedge(sc, sa->v4, sa->v1);
- if (se==NULL) printf("error: area %d edge 4 doesn't exist\n", a);
- else se->flag= 1;
- sa= sa->next;
+ se = screen_findedge(sc, sa->v1, sa->v2);
+ if (se == NULL) printf("error: area %d edge 1 doesn't exist\n", a);
+ else se->flag = 1;
+ se = screen_findedge(sc, sa->v2, sa->v3);
+ if (se == NULL) printf("error: area %d edge 2 doesn't exist\n", a);
+ else se->flag = 1;
+ se = screen_findedge(sc, sa->v3, sa->v4);
+ if (se == NULL) printf("error: area %d edge 3 doesn't exist\n", a);
+ else se->flag = 1;
+ se = screen_findedge(sc, sa->v4, sa->v1);
+ if (se == NULL) printf("error: area %d edge 4 doesn't exist\n", a);
+ else se->flag = 1;
+ sa = sa->next;
a++;
}
- se= sc->edgebase.first;
+ se = sc->edgebase.first;
while (se) {
- sen= se->next;
- if (se->flag==0) {
+ sen = se->next;
+ if (se->flag == 0) {
BLI_remlink(&sc->edgebase, se);
MEM_freeN(se);
}
- else se->flag= 0;
- se= sen;
+ else se->flag = 0;
+ se = sen;
}
}
@@ -262,21 +262,21 @@ ScrEdge *screen_find_active_scredge(bScreen *sc, int mx, int my)
{
ScrEdge *se;
- for (se= sc->edgebase.first; se; se= se->next) {
+ for (se = sc->edgebase.first; se; se = se->next) {
if (scredge_is_horizontal(se)) {
short min, max;
- min= MIN2(se->v1->vec.x, se->v2->vec.x);
- max= MAX2(se->v1->vec.x, se->v2->vec.x);
+ min = MIN2(se->v1->vec.x, se->v2->vec.x);
+ max = MAX2(se->v1->vec.x, se->v2->vec.x);
- if (abs(my-se->v1->vec.y)<=2 && mx>=min && mx<=max)
+ if (abs(my - se->v1->vec.y) <= 2 && mx >= min && mx <= max)
return se;
}
else {
short min, max;
- min= MIN2(se->v1->vec.y, se->v2->vec.y);
- max= MAX2(se->v1->vec.y, se->v2->vec.y);
+ min = MIN2(se->v1->vec.y, se->v2->vec.y);
+ max = MAX2(se->v1->vec.y, se->v2->vec.y);
- if (abs(mx-se->v1->vec.x)<=2 && my>=min && my<=max)
+ if (abs(mx - se->v1->vec.x) <= 2 && my >= min && my <= max)
return se;
}
}
@@ -289,13 +289,13 @@ ScrEdge *screen_find_active_scredge(bScreen *sc, int mx, int my)
/* adds no space data */
static ScrArea *screen_addarea(bScreen *sc, ScrVert *v1, ScrVert *v2, ScrVert *v3, ScrVert *v4, short headertype, short spacetype)
{
- ScrArea *sa= MEM_callocN(sizeof(ScrArea), "addscrarea");
- sa->v1= v1;
- sa->v2= v2;
- sa->v3= v3;
- sa->v4= v4;
- sa->headertype= headertype;
- sa->spacetype= sa->butspacetype= spacetype;
+ ScrArea *sa = MEM_callocN(sizeof(ScrArea), "addscrarea");
+ sa->v1 = v1;
+ sa->v2 = v2;
+ sa->v3 = v3;
+ sa->v4 = v4;
+ sa->headertype = headertype;
+ sa->spacetype = sa->butspacetype = spacetype;
BLI_addtail(&sc->areabase, sa);
@@ -320,31 +320,31 @@ static short testsplitpoint(ScrArea *sa, char dir, float fac)
short x, y;
// area big enough?
- if (dir=='v' && (sa->v4->vec.x- sa->v1->vec.x <= 2*AREAMINX)) return 0;
- if (dir=='h' && (sa->v2->vec.y- sa->v1->vec.y <= 2*AREAMINY)) return 0;
+ if (dir == 'v' && (sa->v4->vec.x - sa->v1->vec.x <= 2 * AREAMINX)) return 0;
+ if (dir == 'h' && (sa->v2->vec.y - sa->v1->vec.y <= 2 * AREAMINY)) return 0;
// to be sure
CLAMP(fac, 0.0f, 1.0f);
- if (dir=='h') {
- y= sa->v1->vec.y+ fac*(sa->v2->vec.y- sa->v1->vec.y);
+ if (dir == 'h') {
+ y = sa->v1->vec.y + fac * (sa->v2->vec.y - sa->v1->vec.y);
- if (y- sa->v1->vec.y < AREAMINY)
- y= sa->v1->vec.y+ AREAMINY;
- else if (sa->v2->vec.y- y < AREAMINY)
- y= sa->v2->vec.y- AREAMINY;
- else y-= (y % AREAGRID);
+ if (y - sa->v1->vec.y < AREAMINY)
+ y = sa->v1->vec.y + AREAMINY;
+ else if (sa->v2->vec.y - y < AREAMINY)
+ y = sa->v2->vec.y - AREAMINY;
+ else y -= (y % AREAGRID);
return y;
}
else {
- x= sa->v1->vec.x+ fac*(sa->v4->vec.x- sa->v1->vec.x);
+ x = sa->v1->vec.x + fac * (sa->v4->vec.x - sa->v1->vec.x);
- if (x- sa->v1->vec.x < AREAMINX)
- x= sa->v1->vec.x+ AREAMINX;
- else if (sa->v4->vec.x- x < AREAMINX)
- x= sa->v4->vec.x- AREAMINX;
- else x-= (x % AREAGRID);
+ if (x - sa->v1->vec.x < AREAMINX)
+ x = sa->v1->vec.x + AREAMINX;
+ else if (sa->v4->vec.x - x < AREAMINX)
+ x = sa->v4->vec.x - AREAMINX;
+ else x -= (x % AREAGRID);
return x;
}
@@ -352,19 +352,19 @@ static short testsplitpoint(ScrArea *sa, char dir, float fac)
ScrArea *area_split(bScreen *sc, ScrArea *sa, char dir, float fac, int merge)
{
- ScrArea *newa=NULL;
+ ScrArea *newa = NULL;
ScrVert *sv1, *sv2;
short split;
- if (sa==NULL) return NULL;
+ if (sa == NULL) return NULL;
- split= testsplitpoint(sa, dir, fac);
- if (split==0) return NULL;
+ split = testsplitpoint(sa, dir, fac);
+ if (split == 0) return NULL;
- if (dir=='h') {
+ if (dir == 'h') {
/* new vertices */
- sv1= screen_addvert(sc, sa->v1->vec.x, split);
- sv2= screen_addvert(sc, sa->v4->vec.x, split);
+ sv1 = screen_addvert(sc, sa->v1->vec.x, split);
+ sv2 = screen_addvert(sc, sa->v4->vec.x, split);
/* new edges */
screen_addedge(sc, sa->v1, sv1);
@@ -374,18 +374,18 @@ ScrArea *area_split(bScreen *sc, ScrArea *sa, char dir, float fac, int merge)
screen_addedge(sc, sv1, sv2);
/* new areas: top */
- newa= screen_addarea(sc, sv1, sa->v2, sa->v3, sv2, sa->headertype, sa->spacetype);
+ newa = screen_addarea(sc, sv1, sa->v2, sa->v3, sv2, sa->headertype, sa->spacetype);
area_copy_data(newa, sa, 0);
/* area below */
- sa->v2= sv1;
- sa->v3= sv2;
+ sa->v2 = sv1;
+ sa->v3 = sv2;
}
else {
/* new vertices */
- sv1= screen_addvert(sc, split, sa->v1->vec.y);
- sv2= screen_addvert(sc, split, sa->v2->vec.y);
+ sv1 = screen_addvert(sc, split, sa->v1->vec.y);
+ sv2 = screen_addvert(sc, split, sa->v2->vec.y);
/* new edges */
screen_addedge(sc, sa->v1, sv1);
@@ -395,12 +395,12 @@ ScrArea *area_split(bScreen *sc, ScrArea *sa, char dir, float fac, int merge)
screen_addedge(sc, sv1, sv2);
/* new areas: left */
- newa= screen_addarea(sc, sa->v1, sa->v2, sv2, sv1, sa->headertype, sa->spacetype);
+ newa = screen_addarea(sc, sa->v1, sa->v2, sv2, sv1, sa->headertype, sa->spacetype);
area_copy_data(newa, sa, 0);
/* area right */
- sa->v1= sv1;
- sa->v2= sv2;
+ sa->v1 = sv1;
+ sa->v2 = sv2;
}
/* remove double vertices en edges */
@@ -419,16 +419,16 @@ bScreen *ED_screen_add(wmWindow *win, Scene *scene, const char *name)
bScreen *sc;
ScrVert *sv1, *sv2, *sv3, *sv4;
- sc= alloc_libblock(&G.main->screen, ID_SCR, name);
- sc->scene= scene;
- sc->do_refresh= 1;
- sc->redraws_flag= TIME_ALL_3D_WIN|TIME_ALL_ANIM_WIN;
- sc->winid= win->winid;
-
- sv1= screen_addvert(sc, 0, 0);
- sv2= screen_addvert(sc, 0, win->sizey-1);
- sv3= screen_addvert(sc, win->sizex-1, win->sizey-1);
- sv4= screen_addvert(sc, win->sizex-1, 0);
+ sc = BKE_libblock_alloc(&G.main->screen, ID_SCR, name);
+ sc->scene = scene;
+ sc->do_refresh = 1;
+ sc->redraws_flag = TIME_ALL_3D_WIN | TIME_ALL_ANIM_WIN;
+ sc->winid = win->winid;
+
+ sv1 = screen_addvert(sc, 0, 0);
+ sv2 = screen_addvert(sc, 0, win->sizey - 1);
+ sv3 = screen_addvert(sc, win->sizex - 1, win->sizey - 1);
+ sv4 = screen_addvert(sc, win->sizex - 1, 0);
screen_addedge(sc, sv1, sv2);
screen_addedge(sc, sv2, sv3);
@@ -448,42 +448,42 @@ static void screen_copy(bScreen *to, bScreen *from)
ScrArea *sa, *saf;
/* free contents of 'to', is from blenkernel screen.c */
- free_screen(to);
+ BKE_screen_free(to);
BLI_duplicatelist(&to->vertbase, &from->vertbase);
BLI_duplicatelist(&to->edgebase, &from->edgebase);
BLI_duplicatelist(&to->areabase, &from->areabase);
- to->regionbase.first= to->regionbase.last= NULL;
+ to->regionbase.first = to->regionbase.last = NULL;
- s2= to->vertbase.first;
- for (s1= from->vertbase.first; s1; s1= s1->next, s2= s2->next) {
- s1->newv= s2;
+ s2 = to->vertbase.first;
+ for (s1 = from->vertbase.first; s1; s1 = s1->next, s2 = s2->next) {
+ s1->newv = s2;
}
- for (se= to->edgebase.first; se; se= se->next) {
- se->v1= se->v1->newv;
- se->v2= se->v2->newv;
+ for (se = to->edgebase.first; se; se = se->next) {
+ se->v1 = se->v1->newv;
+ se->v2 = se->v2->newv;
sortscrvert(&(se->v1), &(se->v2));
}
- saf= from->areabase.first;
- for (sa= to->areabase.first; sa; sa= sa->next, saf= saf->next) {
- sa->v1= sa->v1->newv;
- sa->v2= sa->v2->newv;
- sa->v3= sa->v3->newv;
- sa->v4= sa->v4->newv;
-
- sa->spacedata.first= sa->spacedata.last= NULL;
- sa->regionbase.first= sa->regionbase.last= NULL;
- sa->actionzones.first= sa->actionzones.last= NULL;
- sa->handlers.first= sa->handlers.last= NULL;
+ saf = from->areabase.first;
+ for (sa = to->areabase.first; sa; sa = sa->next, saf = saf->next) {
+ sa->v1 = sa->v1->newv;
+ sa->v2 = sa->v2->newv;
+ sa->v3 = sa->v3->newv;
+ sa->v4 = sa->v4->newv;
+
+ sa->spacedata.first = sa->spacedata.last = NULL;
+ sa->regionbase.first = sa->regionbase.last = NULL;
+ sa->actionzones.first = sa->actionzones.last = NULL;
+ sa->handlers.first = sa->handlers.last = NULL;
area_copy_data(sa, saf, 0);
}
/* put at zero (needed?) */
- for (s1= from->vertbase.first; s1; s1= s1->next)
- s1->newv= NULL;
+ for (s1 = from->vertbase.first; s1; s1 = s1->next)
+ s1->newv = NULL;
}
@@ -496,27 +496,27 @@ int area_getorientation(ScrArea *sa, ScrArea *sb)
ScrVert *sav1, *sav2, *sav3, *sav4;
ScrVert *sbv1, *sbv2, *sbv3, *sbv4;
- if (sa==NULL || sb==NULL) return -1;
+ if (sa == NULL || sb == NULL) return -1;
- sav1= sa->v1;
- sav2= sa->v2;
- sav3= sa->v3;
- sav4= sa->v4;
- sbv1= sb->v1;
- sbv2= sb->v2;
- sbv3= sb->v3;
- sbv4= sb->v4;
+ sav1 = sa->v1;
+ sav2 = sa->v2;
+ sav3 = sa->v3;
+ sav4 = sa->v4;
+ sbv1 = sb->v1;
+ sbv2 = sb->v2;
+ sbv3 = sb->v3;
+ sbv4 = sb->v4;
- if (sav1==sbv4 && sav2==sbv3) { /* sa to right of sb = W */
+ if (sav1 == sbv4 && sav2 == sbv3) { /* sa to right of sb = W */
return 0;
}
- else if (sav2==sbv1 && sav3==sbv4) { /* sa to bottom of sb = N */
+ else if (sav2 == sbv1 && sav3 == sbv4) { /* sa to bottom of sb = N */
return 1;
}
- else if (sav3==sbv2 && sav4==sbv1) { /* sa to left of sb = E */
+ else if (sav3 == sbv2 && sav4 == sbv1) { /* sa to left of sb = E */
return 2;
}
- else if (sav1==sbv2 && sav4==sbv3) { /* sa on top of sb = S*/
+ else if (sav1 == sbv2 && sav4 == sbv3) { /* sa on top of sb = S*/
return 3;
}
@@ -524,9 +524,9 @@ int area_getorientation(ScrArea *sa, ScrArea *sb)
}
/* Helper function to join 2 areas, it has a return value, 0=failed 1=success
- * used by the split, join operators
+ * used by the split, join operators
*/
-int screen_area_join(bContext *C, bScreen* scr, ScrArea *sa1, ScrArea *sa2)
+int screen_area_join(bContext *C, bScreen *scr, ScrArea *sa1, ScrArea *sa2)
{
int dir;
@@ -534,32 +534,32 @@ int screen_area_join(bContext *C, bScreen* scr, ScrArea *sa1, ScrArea *sa2)
/*printf("dir is : %i\n", dir);*/
if (dir < 0) {
- if (sa1 ) sa1->flag &= ~AREA_FLAG_DRAWJOINFROM;
- if (sa2 ) sa2->flag &= ~AREA_FLAG_DRAWJOINTO;
+ if (sa1) sa1->flag &= ~AREA_FLAG_DRAWJOINFROM;
+ if (sa2) sa2->flag &= ~AREA_FLAG_DRAWJOINTO;
return 0;
}
if (dir == 0) {
- sa1->v1= sa2->v1;
- sa1->v2= sa2->v2;
+ sa1->v1 = sa2->v1;
+ sa1->v2 = sa2->v2;
screen_addedge(scr, sa1->v2, sa1->v3);
screen_addedge(scr, sa1->v1, sa1->v4);
}
else if (dir == 1) {
- sa1->v2= sa2->v2;
- sa1->v3= sa2->v3;
+ sa1->v2 = sa2->v2;
+ sa1->v3 = sa2->v3;
screen_addedge(scr, sa1->v1, sa1->v2);
screen_addedge(scr, sa1->v3, sa1->v4);
}
else if (dir == 2) {
- sa1->v3= sa2->v3;
- sa1->v4= sa2->v4;
+ sa1->v3 = sa2->v3;
+ sa1->v4 = sa2->v4;
screen_addedge(scr, sa1->v2, sa1->v3);
screen_addedge(scr, sa1->v1, sa1->v4);
}
else if (dir == 3) {
- sa1->v1= sa2->v1;
- sa1->v4= sa2->v4;
+ sa1->v1 = sa2->v1;
+ sa1->v4 = sa2->v4;
screen_addedge(scr, sa1->v1, sa1->v2);
screen_addedge(scr, sa1->v3, sa1->v4);
}
@@ -581,34 +581,38 @@ void select_connected_scredge(bScreen *sc, ScrEdge *edge)
/* select connected, only in the right direction */
/* 'dir' is the direction of EDGE */
- if (edge->v1->vec.x==edge->v2->vec.x) dir= 'v';
- else dir= 'h';
+ if (edge->v1->vec.x == edge->v2->vec.x) dir = 'v';
+ else dir = 'h';
- sv= sc->vertbase.first;
+ sv = sc->vertbase.first;
while (sv) {
sv->flag = 0;
- sv= sv->next;
+ sv = sv->next;
}
- edge->v1->flag= 1;
- edge->v2->flag= 1;
+ edge->v1->flag = 1;
+ edge->v2->flag = 1;
- oneselected= 1;
+ oneselected = 1;
while (oneselected) {
- se= sc->edgebase.first;
- oneselected= 0;
+ se = sc->edgebase.first;
+ oneselected = 0;
while (se) {
- if (se->v1->flag + se->v2->flag==1) {
- if (dir=='h') if (se->v1->vec.y==se->v2->vec.y) {
- se->v1->flag= se->v2->flag= 1;
- oneselected= 1;
+ if (se->v1->flag + se->v2->flag == 1) {
+ if (dir == 'h') {
+ if (se->v1->vec.y == se->v2->vec.y) {
+ se->v1->flag = se->v2->flag = 1;
+ oneselected = 1;
+ }
}
- if (dir=='v') if (se->v1->vec.x==se->v2->vec.x) {
- se->v1->flag= se->v2->flag= 1;
- oneselected= 1;
+ if (dir == 'v') {
+ if (se->v1->vec.x == se->v2->vec.x) {
+ se->v1->flag = se->v2->flag = 1;
+ oneselected = 1;
}
+ }
}
- se= se->next;
+ se = se->next;
}
}
}
@@ -616,52 +620,52 @@ void select_connected_scredge(bScreen *sc, ScrEdge *edge)
/* test if screen vertices should be scaled */
static void screen_test_scale(bScreen *sc, int winsizex, int winsizey)
{
- ScrVert *sv=NULL;
+ ScrVert *sv = NULL;
ScrArea *sa;
int sizex, sizey;
float facx, facy, tempf, min[2], max[2];
/* calculate size */
- min[0]= min[1]= 10000.0f;
- max[0]= max[1]= 0.0f;
+ min[0] = min[1] = 10000.0f;
+ max[0] = max[1] = 0.0f;
- for (sv= sc->vertbase.first; sv; sv= sv->next) {
- min[0]= MIN2(min[0], sv->vec.x);
- min[1]= MIN2(min[1], sv->vec.y);
- max[0]= MAX2(max[0], sv->vec.x);
- max[1]= MAX2(max[1], sv->vec.y);
+ for (sv = sc->vertbase.first; sv; sv = sv->next) {
+ min[0] = MIN2(min[0], sv->vec.x);
+ min[1] = MIN2(min[1], sv->vec.y);
+ max[0] = MAX2(max[0], sv->vec.x);
+ max[1] = MAX2(max[1], sv->vec.y);
}
/* always make 0.0 left under */
- for (sv= sc->vertbase.first; sv; sv= sv->next) {
+ for (sv = sc->vertbase.first; sv; sv = sv->next) {
sv->vec.x -= min[0];
sv->vec.y -= min[1];
}
- sizex= max[0]-min[0];
- sizey= max[1]-min[1];
+ sizex = max[0] - min[0];
+ sizey = max[1] - min[1];
- if (sizex!= winsizex || sizey!= winsizey) {
- facx= winsizex;
- facx/= (float)sizex;
- facy= winsizey;
- facy/= (float)sizey;
+ if (sizex != winsizex || sizey != winsizey) {
+ facx = winsizex;
+ facx /= (float)sizex;
+ facy = winsizey;
+ facy /= (float)sizey;
/* make sure it fits! */
- for (sv= sc->vertbase.first; sv; sv= sv->next) {
+ for (sv = sc->vertbase.first; sv; sv = sv->next) {
/* FIXME, this re-sizing logic is no good when re-sizing the window + redrawing [#24428]
* need some way to store these as floats internally and re-apply from there. */
- tempf= ((float)sv->vec.x)*facx;
- sv->vec.x= (short)(tempf+0.5f);
- sv->vec.x+= AREAGRID-1;
- sv->vec.x-= (sv->vec.x % AREAGRID);
+ tempf = ((float)sv->vec.x) * facx;
+ sv->vec.x = (short)(tempf + 0.5f);
+ sv->vec.x += AREAGRID - 1;
+ sv->vec.x -= (sv->vec.x % AREAGRID);
CLAMP(sv->vec.x, 0, winsizex);
- tempf= ((float)sv->vec.y)*facy;
- sv->vec.y= (short)(tempf+0.5f);
- sv->vec.y+= AREAGRID-1;
- sv->vec.y-= (sv->vec.y % AREAGRID);
+ tempf = ((float)sv->vec.y) * facy;
+ sv->vec.y = (short)(tempf + 0.5f);
+ sv->vec.y += AREAGRID - 1;
+ sv->vec.y -= (sv->vec.y % AREAGRID);
CLAMP(sv->vec.y, 0, winsizey);
}
@@ -671,26 +675,26 @@ static void screen_test_scale(bScreen *sc, int winsizex, int winsizey)
/* ton: removed option now, it needs Context... */
/* make each window at least ED_area_headersize() high */
- for (sa= sc->areabase.first; sa; sa= sa->next) {
- int headery= ED_area_headersize()+1;
+ for (sa = sc->areabase.first; sa; sa = sa->next) {
+ int headery = ED_area_headersize() + 1;
- if (sa->v1->vec.y+headery > sa->v2->vec.y) {
+ if (sa->v1->vec.y + headery > sa->v2->vec.y) {
/* lower edge */
- ScrEdge *se= screen_findedge(sc, sa->v4, sa->v1);
- if (se && sa->v1!=sa->v2 ) {
+ ScrEdge *se = screen_findedge(sc, sa->v4, sa->v1);
+ if (se && sa->v1 != sa->v2) {
int yval;
select_connected_scredge(sc, se);
/* all selected vertices get the right offset */
- yval= sa->v2->vec.y-headery;
- sv= sc->vertbase.first;
+ yval = sa->v2->vec.y - headery;
+ sv = sc->vertbase.first;
while (sv) {
/* if is a collapsed area */
- if (sv!=sa->v2 && sv!=sa->v3) {
- if (sv->flag) sv->vec.y= yval;
+ if (sv != sa->v2 && sv != sa->v3) {
+ if (sv->flag) sv->vec.y = yval;
}
- sv= sv->next;
+ sv = sv->next;
}
}
}
@@ -714,17 +718,17 @@ static void draw_horizontal_join_shape(ScrArea *sa, char dir)
float width = sa->v3->vec.x - sa->v1->vec.x;
float height = sa->v3->vec.y - sa->v1->vec.y;
- if (height<width) {
- h = height/8;
- w = height/4;
+ if (height < width) {
+ h = height / 8;
+ w = height / 4;
}
else {
- h = width/8;
- w = width/4;
+ h = width / 8;
+ w = width / 4;
}
points[0].x = sa->v1->vec.x;
- points[0].y = sa->v1->vec.y + height/2;
+ points[0].y = sa->v1->vec.y + height / 2;
points[1].x = sa->v1->vec.x;
points[1].y = sa->v1->vec.y;
@@ -733,13 +737,13 @@ static void draw_horizontal_join_shape(ScrArea *sa, char dir)
points[2].y = sa->v4->vec.y;
points[3].x = sa->v4->vec.x - w;
- points[3].y = sa->v4->vec.y + height/2 - 2*h;
+ points[3].y = sa->v4->vec.y + height / 2 - 2 * h;
- points[4].x = sa->v4->vec.x - 2*w;
- points[4].y = sa->v4->vec.y + height/2;
+ points[4].x = sa->v4->vec.x - 2 * w;
+ points[4].y = sa->v4->vec.y + height / 2;
points[5].x = sa->v4->vec.x - w;
- points[5].y = sa->v4->vec.y + height/2 + 2*h;
+ points[5].y = sa->v4->vec.y + height / 2 + 2 * h;
points[6].x = sa->v3->vec.x - w;
points[6].y = sa->v3->vec.y;
@@ -748,15 +752,15 @@ static void draw_horizontal_join_shape(ScrArea *sa, char dir)
points[7].y = sa->v2->vec.y;
points[8].x = sa->v4->vec.x;
- points[8].y = sa->v4->vec.y + height/2 - h;
+ points[8].y = sa->v4->vec.y + height / 2 - h;
points[9].x = sa->v4->vec.x;
- points[9].y = sa->v4->vec.y + height/2 + h;
+ points[9].y = sa->v4->vec.y + height / 2 + h;
- if (dir=='l') {
+ if (dir == 'l') {
/* when direction is left, then we flip direction of arrow */
float cx = sa->v1->vec.x + width;
- for (i=0;i<10;i++) {
+ for (i = 0; i < 10; i++) {
points[i].x -= cx;
points[i].x = -points[i].x;
points[i].x += sa->v1->vec.x;
@@ -764,11 +768,11 @@ static void draw_horizontal_join_shape(ScrArea *sa, char dir)
}
glBegin(GL_POLYGON);
- for (i=0;i<5;i++)
+ for (i = 0; i < 5; i++)
glVertex2f(points[i].x, points[i].y);
glEnd();
glBegin(GL_POLYGON);
- for (i=4;i<8;i++)
+ for (i = 4; i < 8; i++)
glVertex2f(points[i].x, points[i].y);
glVertex2f(points[0].x, points[0].y);
glEnd();
@@ -786,16 +790,16 @@ static void draw_vertical_join_shape(ScrArea *sa, char dir)
float width = sa->v3->vec.x - sa->v1->vec.x;
float height = sa->v3->vec.y - sa->v1->vec.y;
- if (height<width) {
- h = height/4;
- w = height/8;
+ if (height < width) {
+ h = height / 4;
+ w = height / 8;
}
else {
- h = width/4;
- w = width/8;
+ h = width / 4;
+ w = width / 8;
}
- points[0].x = sa->v1->vec.x + width/2;
+ points[0].x = sa->v1->vec.x + width / 2;
points[0].y = sa->v3->vec.y;
points[1].x = sa->v2->vec.x;
@@ -804,13 +808,13 @@ static void draw_vertical_join_shape(ScrArea *sa, char dir)
points[2].x = sa->v1->vec.x;
points[2].y = sa->v1->vec.y + h;
- points[3].x = sa->v1->vec.x + width/2 - 2*w;
+ points[3].x = sa->v1->vec.x + width / 2 - 2 * w;
points[3].y = sa->v1->vec.y + h;
- points[4].x = sa->v1->vec.x + width/2;
- points[4].y = sa->v1->vec.y + 2*h;
+ points[4].x = sa->v1->vec.x + width / 2;
+ points[4].y = sa->v1->vec.y + 2 * h;
- points[5].x = sa->v1->vec.x + width/2 + 2*w;
+ points[5].x = sa->v1->vec.x + width / 2 + 2 * w;
points[5].y = sa->v1->vec.y + h;
points[6].x = sa->v4->vec.x;
@@ -819,16 +823,16 @@ static void draw_vertical_join_shape(ScrArea *sa, char dir)
points[7].x = sa->v3->vec.x;
points[7].y = sa->v3->vec.y;
- points[8].x = sa->v1->vec.x + width/2 - w;
+ points[8].x = sa->v1->vec.x + width / 2 - w;
points[8].y = sa->v1->vec.y;
- points[9].x = sa->v1->vec.x + width/2 + w;
+ points[9].x = sa->v1->vec.x + width / 2 + w;
points[9].y = sa->v1->vec.y;
- if (dir=='u') {
+ if (dir == 'u') {
/* when direction is up, then we flip direction of arrow */
float cy = sa->v1->vec.y + height;
- for (i=0;i<10;i++) {
+ for (i = 0; i < 10; i++) {
points[i].y -= cy;
points[i].y = -points[i].y;
points[i].y += sa->v1->vec.y;
@@ -836,11 +840,11 @@ static void draw_vertical_join_shape(ScrArea *sa, char dir)
}
glBegin(GL_POLYGON);
- for (i=0;i<5;i++)
+ for (i = 0; i < 5; i++)
glVertex2f(points[i].x, points[i].y);
glEnd();
glBegin(GL_POLYGON);
- for (i=4;i<8;i++)
+ for (i = 4; i < 8; i++)
glVertex2f(points[i].x, points[i].y);
glVertex2f(points[0].x, points[0].y);
glEnd();
@@ -852,7 +856,7 @@ static void draw_vertical_join_shape(ScrArea *sa, char dir)
/* draw join shape due to direction of joining */
static void draw_join_shape(ScrArea *sa, char dir)
{
- if (dir=='u' || dir=='d')
+ if (dir == 'u' || dir == 'd')
draw_vertical_join_shape(sa, dir);
else
draw_horizontal_join_shape(sa, dir);
@@ -883,38 +887,38 @@ static void scrarea_draw_shape_light(ScrArea *sa, char UNUSED(dir))
static void drawscredge_area_draw(int sizex, int sizey, short x1, short y1, short x2, short y2, short a)
{
/* right border area */
- if (x2<sizex-1)
- sdrawline(x2+a, y1, x2+a, y2);
+ if (x2 < sizex - 1)
+ sdrawline(x2 + a, y1, x2 + a, y2);
/* left border area */
- if (x1>0) /* otherwise it draws the emboss of window over */
- sdrawline(x1+a, y1, x1+a, y2);
+ if (x1 > 0) /* otherwise it draws the emboss of window over */
+ sdrawline(x1 + a, y1, x1 + a, y2);
/* top border area */
- if (y2<sizey-1)
- sdrawline(x1, y2+a, x2, y2+a);
+ if (y2 < sizey - 1)
+ sdrawline(x1, y2 + a, x2, y2 + a);
/* bottom border area */
- if (y1>0)
- sdrawline(x1, y1+a, x2, y1+a);
+ if (y1 > 0)
+ sdrawline(x1, y1 + a, x2, y1 + a);
}
/** screen edges drawing **/
static void drawscredge_area(ScrArea *sa, int sizex, int sizey, int center)
{
- short x1= sa->v1->vec.x;
- short y1= sa->v1->vec.y;
- short x2= sa->v3->vec.x;
- short y2= sa->v3->vec.y;
+ short x1 = sa->v1->vec.x;
+ short y1 = sa->v1->vec.y;
+ short x2 = sa->v3->vec.x;
+ short y2 = sa->v3->vec.y;
short a, rt;
- rt= 0; // CLAMPIS(G.rt, 0, 16);
+ rt = 0; // CLAMPIS(G.rt, 0, 16);
- if (center==0) {
+ if (center == 0) {
cpack(0x505050);
- for (a=-rt; a<=rt; a++)
- if (a!=0)
+ for (a = -rt; a <= rt; a++)
+ if (a != 0)
drawscredge_area_draw(sizex, sizey, x1, y1, x2, y2, a);
}
else {
@@ -929,10 +933,10 @@ bScreen *ED_screen_duplicate(wmWindow *win, bScreen *sc)
{
bScreen *newsc;
- if (sc->full != SCREENNORMAL) return NULL; /* XXX handle this case! */
+ if (sc->full != SCREENNORMAL) return NULL; /* XXX handle this case! */
/* make new empty screen: */
- newsc= ED_screen_add(win, sc->scene, sc->id.name+2);
+ newsc = ED_screen_add(win, sc->scene, sc->id.name + 2);
/* copy all data */
screen_copy(newsc, sc);
@@ -942,11 +946,11 @@ bScreen *ED_screen_duplicate(wmWindow *win, bScreen *sc)
/* screen sets cursor based on swinid */
static void region_cursor_set(wmWindow *win, int swinid)
{
- ScrArea *sa= win->screen->areabase.first;
+ ScrArea *sa = win->screen->areabase.first;
- for (;sa; sa= sa->next) {
- ARegion *ar= sa->regionbase.first;
- for (;ar; ar= ar->next) {
+ for (; sa; sa = sa->next) {
+ ARegion *ar = sa->regionbase.first;
+ for (; ar; ar = ar->next) {
if (ar->swinid == swinid) {
if (ar->type && ar->type->cursor)
ar->type->cursor(win, sa, ar);
@@ -960,25 +964,25 @@ static void region_cursor_set(wmWindow *win, int swinid)
void ED_screen_do_listen(bContext *C, wmNotifier *note)
{
- wmWindow *win= CTX_wm_window(C);
+ wmWindow *win = CTX_wm_window(C);
/* generic notes */
- switch(note->category) {
+ switch (note->category) {
case NC_WM:
- if (note->data==ND_FILEREAD)
- win->screen->do_draw= 1;
+ if (note->data == ND_FILEREAD)
+ win->screen->do_draw = 1;
break;
case NC_WINDOW:
- win->screen->do_draw= 1;
+ win->screen->do_draw = 1;
break;
case NC_SCREEN:
- if (note->data==ND_SUBWINACTIVE)
+ if (note->data == ND_SUBWINACTIVE)
uiFreeActiveButtons(C, win->screen);
- if (note->action==NA_EDITED)
- win->screen->do_draw= win->screen->do_refresh= 1;
+ if (note->action == NA_EDITED)
+ win->screen->do_draw = win->screen->do_refresh = 1;
break;
case NC_SCENE:
- if (note->data==ND_MODE)
+ if (note->data == ND_MODE)
region_cursor_set(win, note->swinid);
break;
}
@@ -988,28 +992,28 @@ void ED_screen_do_listen(bContext *C, wmNotifier *note)
void ED_screen_draw(wmWindow *win)
{
ScrArea *sa;
- ScrArea *sa1= NULL;
- ScrArea *sa2= NULL;
- ScrArea *sa3= NULL;
+ ScrArea *sa1 = NULL;
+ ScrArea *sa2 = NULL;
+ ScrArea *sa3 = NULL;
int dir = -1;
int dira = -1;
wmSubWindowSet(win, win->screen->mainwin);
- for (sa= win->screen->areabase.first; sa; sa= sa->next) {
+ for (sa = win->screen->areabase.first; sa; sa = sa->next) {
if (sa->flag & AREA_FLAG_DRAWJOINFROM) sa1 = sa;
if (sa->flag & AREA_FLAG_DRAWJOINTO) sa2 = sa;
- if (sa->flag & (AREA_FLAG_DRAWSPLIT_H|AREA_FLAG_DRAWSPLIT_V)) sa3 = sa;
+ if (sa->flag & (AREA_FLAG_DRAWSPLIT_H | AREA_FLAG_DRAWSPLIT_V)) sa3 = sa;
drawscredge_area(sa, win->sizex, win->sizey, 0);
}
- for (sa= win->screen->areabase.first; sa; sa= sa->next)
+ for (sa = win->screen->areabase.first; sa; sa = sa->next)
drawscredge_area(sa, win->sizex, win->sizey, 1);
/* blended join arrow */
if (sa1 && sa2) {
dir = area_getorientation(sa1, sa2);
if (dir >= 0) {
- switch(dir) {
+ switch (dir) {
case 0: /* W */
dir = 'r';
dira = 'l';
@@ -1040,29 +1044,29 @@ void ED_screen_draw(wmWindow *win)
if (sa3->flag & AREA_FLAG_DRAWSPLIT_H) {
sdrawline(sa3->totrct.xmin, win->eventstate->y, sa3->totrct.xmax, win->eventstate->y);
glColor4ub(0, 0, 0, 100);
- sdrawline(sa3->totrct.xmin, win->eventstate->y+1, sa3->totrct.xmax, win->eventstate->y+1);
+ sdrawline(sa3->totrct.xmin, win->eventstate->y + 1, sa3->totrct.xmax, win->eventstate->y + 1);
}
else {
sdrawline(win->eventstate->x, sa3->totrct.ymin, win->eventstate->x, sa3->totrct.ymax);
glColor4ub(0, 0, 0, 100);
- sdrawline(win->eventstate->x+1, sa3->totrct.ymin, win->eventstate->x+1, sa3->totrct.ymax);
+ sdrawline(win->eventstate->x + 1, sa3->totrct.ymin, win->eventstate->x + 1, sa3->totrct.ymax);
}
glDisable(GL_BLEND);
}
- win->screen->do_draw= 0;
+ win->screen->do_draw = 0;
}
/* helper call for below, dpi changes headers */
static void screen_refresh_headersizes(void)
{
- const ListBase *lb= BKE_spacetypes_list();
+ const ListBase *lb = BKE_spacetypes_list();
SpaceType *st;
- for (st= lb->first; st; st= st->next) {
- ARegionType *art= BKE_regiontype_from_id(st, RGN_TYPE_HEADER);
- if (art) art->prefsizey= ED_area_headersize();
+ for (st = lb->first; st; st = st->next) {
+ ARegionType *art = BKE_regiontype_from_id(st, RGN_TYPE_HEADER);
+ if (art) art->prefsizey = ED_area_headersize();
}
}
@@ -1076,21 +1080,21 @@ void ED_screen_refresh(wmWindowManager *wm, wmWindow *win)
rcti winrct;
winrct.xmin = 0;
- winrct.xmax = win->sizex-1;
+ winrct.xmax = win->sizex - 1;
winrct.ymin = 0;
- winrct.ymax = win->sizey-1;
+ winrct.ymax = win->sizey - 1;
screen_test_scale(win->screen, win->sizex, win->sizey);
- if (win->screen->mainwin==0)
- win->screen->mainwin= wm_subwindow_open(win, &winrct);
+ if (win->screen->mainwin == 0)
+ win->screen->mainwin = wm_subwindow_open(win, &winrct);
else
wm_subwindow_position(win, win->screen->mainwin, &winrct);
/* header size depends on DPI, let's verify */
screen_refresh_headersizes();
- for (sa= win->screen->areabase.first; sa; sa= sa->next) {
+ for (sa = win->screen->areabase.first; sa; sa = sa->next) {
/* set spacetype and region callbacks, calls init() */
/* sets subwindows for regions, adds handlers */
ED_area_initialize(wm, win, sa);
@@ -1104,9 +1108,9 @@ void ED_screen_refresh(wmWindowManager *wm, wmWindow *win)
if (G.debug & G_DEBUG_EVENTS) {
printf("%s: set screen\n", __func__);
}
- win->screen->do_refresh= 0;
+ win->screen->do_refresh = 0;
- win->screen->context= ed_screen_context;
+ win->screen->context = ed_screen_context;
}
/* file read, set all screens, ... */
@@ -1114,10 +1118,10 @@ void ED_screens_initialize(wmWindowManager *wm)
{
wmWindow *win;
- for (win= wm->windows.first; win; win= win->next) {
+ for (win = wm->windows.first; win; win = win->next) {
- if (win->screen==NULL)
- win->screen= G.main->screen.first;
+ if (win->screen == NULL)
+ win->screen = G.main->screen.first;
ED_screen_refresh(wm, win);
}
@@ -1128,35 +1132,38 @@ void ED_screens_initialize(wmWindowManager *wm)
void ED_region_exit(bContext *C, ARegion *ar)
{
- ARegion *prevar= CTX_wm_region(C);
+ ARegion *prevar = CTX_wm_region(C);
CTX_wm_region_set(C, ar);
WM_event_remove_handlers(C, &ar->handlers);
if (ar->swinid)
wm_subwindow_close(CTX_wm_window(C), ar->swinid);
- ar->swinid= 0;
+ ar->swinid = 0;
if (ar->headerstr)
MEM_freeN(ar->headerstr);
- ar->headerstr= NULL;
+ ar->headerstr = NULL;
CTX_wm_region_set(C, prevar);
}
void ED_area_exit(bContext *C, ScrArea *sa)
{
- ScrArea *prevsa= CTX_wm_area(C);
+ ScrArea *prevsa = CTX_wm_area(C);
ARegion *ar;
if (sa->spacetype == SPACE_FILE) {
- SpaceLink *sl= sa->spacedata.first;
+ SpaceLink *sl = sa->spacedata.first;
if (sl && sl->spacetype == SPACE_FILE) {
ED_fileselect_exit(C, (SpaceFile *)sl);
}
}
+ else if (sa->spacetype == SPACE_VIEW3D) {
+ ED_render_engine_area_exit(sa);
+ }
CTX_wm_area_set(C, sa);
- for (ar= sa->regionbase.first; ar; ar= ar->next)
+ for (ar = sa->regionbase.first; ar; ar = ar->next)
ED_region_exit(C, ar);
WM_event_remove_handlers(C, &sa->handlers);
@@ -1165,8 +1172,8 @@ void ED_area_exit(bContext *C, ScrArea *sa)
void ED_screen_exit(bContext *C, wmWindow *window, bScreen *screen)
{
- wmWindowManager *wm= CTX_wm_manager(C);
- wmWindow *prevwin= CTX_wm_window(C);
+ wmWindowManager *wm = CTX_wm_manager(C);
+ wmWindow *prevwin = CTX_wm_window(C);
ScrArea *sa;
ARegion *ar;
@@ -1174,21 +1181,21 @@ void ED_screen_exit(bContext *C, wmWindow *window, bScreen *screen)
if (screen->animtimer)
WM_event_remove_timer(wm, window, screen->animtimer);
- screen->animtimer= NULL;
+ screen->animtimer = NULL;
if (screen->mainwin)
wm_subwindow_close(window, screen->mainwin);
- screen->mainwin= 0;
- screen->subwinactive= 0;
+ screen->mainwin = 0;
+ screen->subwinactive = 0;
- for (ar= screen->regionbase.first; ar; ar= ar->next)
+ for (ar = screen->regionbase.first; ar; ar = ar->next)
ED_region_exit(C, ar);
- for (sa= screen->areabase.first; sa; sa= sa->next)
+ for (sa = screen->areabase.first; sa; sa = sa->next)
ED_area_exit(C, sa);
/* mark it available for use for other windows */
- screen->winid= 0;
+ screen->winid = 0;
if (prevwin->screen->temp == 0) {
/* use previous window if possible */
@@ -1206,17 +1213,17 @@ void ED_screen_exit(bContext *C, wmWindow *window, bScreen *screen)
/* case when on area-edge or in azones, or outside window */
static void screen_cursor_set(wmWindow *win, wmEvent *event)
{
- AZone *az= NULL;
+ AZone *az = NULL;
ScrArea *sa;
- for (sa= win->screen->areabase.first; sa; sa= sa->next)
- if ((az=is_in_area_actionzone(sa, event->x, event->y)))
+ for (sa = win->screen->areabase.first; sa; sa = sa->next)
+ if ((az = is_in_area_actionzone(sa, event->x, event->y)))
break;
if (sa) {
- if (az->type==AZONE_AREA)
+ if (az->type == AZONE_AREA)
WM_cursor_set(win, CURSOR_EDIT);
- else if (az->type==AZONE_REGION) {
+ else if (az->type == AZONE_REGION) {
if (az->edge == AE_LEFT_TO_TOPRIGHT || az->edge == AE_RIGHT_TO_TOPLEFT)
WM_cursor_set(win, CURSOR_X_MOVE);
else
@@ -1224,7 +1231,7 @@ static void screen_cursor_set(wmWindow *win, wmEvent *event)
}
}
else {
- ScrEdge *actedge= screen_find_active_scredge(win->screen, event->x, event->y);
+ ScrEdge *actedge = screen_find_active_scredge(win->screen, event->x, event->y);
if (actedge) {
if (scredge_is_horizontal(actedge))
@@ -1242,72 +1249,72 @@ static void screen_cursor_set(wmWindow *win, wmEvent *event)
/* event type is mouse move */
void ED_screen_set_subwinactive(bContext *C, wmEvent *event)
{
- wmWindow *win= CTX_wm_window(C);
+ wmWindow *win = CTX_wm_window(C);
if (win->screen) {
- bScreen *scr= win->screen;
+ bScreen *scr = win->screen;
ScrArea *sa;
ARegion *ar;
- int oldswin= scr->subwinactive;
+ int oldswin = scr->subwinactive;
- for (sa= scr->areabase.first; sa; sa= sa->next) {
+ for (sa = scr->areabase.first; sa; sa = sa->next) {
if (event->x > sa->totrct.xmin && event->x < sa->totrct.xmax)
if (event->y > sa->totrct.ymin && event->y < sa->totrct.ymax)
- if (NULL==is_in_area_actionzone(sa, event->x, event->y))
+ if (NULL == is_in_area_actionzone(sa, event->x, event->y))
break;
}
if (sa) {
- for (ar= sa->regionbase.first; ar; ar= ar->next) {
+ for (ar = sa->regionbase.first; ar; ar = ar->next) {
if (BLI_in_rcti(&ar->winrct, event->x, event->y))
- scr->subwinactive= ar->swinid;
+ scr->subwinactive = ar->swinid;
}
}
else
- scr->subwinactive= scr->mainwin;
+ scr->subwinactive = scr->mainwin;
/* check for redraw headers */
- if (oldswin!=scr->subwinactive) {
+ if (oldswin != scr->subwinactive) {
- for (sa= scr->areabase.first; sa; sa= sa->next) {
- int do_draw= 0;
+ for (sa = scr->areabase.first; sa; sa = sa->next) {
+ int do_draw = 0;
- for (ar= sa->regionbase.first; ar; ar= ar->next)
- if (ar->swinid==oldswin || ar->swinid==scr->subwinactive)
- do_draw= 1;
+ for (ar = sa->regionbase.first; ar; ar = ar->next)
+ if (ar->swinid == oldswin || ar->swinid == scr->subwinactive)
+ do_draw = 1;
if (do_draw) {
- for (ar= sa->regionbase.first; ar; ar= ar->next)
- if (ar->regiontype==RGN_TYPE_HEADER)
+ for (ar = sa->regionbase.first; ar; ar = ar->next)
+ if (ar->regiontype == RGN_TYPE_HEADER)
ED_region_tag_redraw(ar);
}
}
}
/* cursors, for time being set always on edges, otherwise aregion doesnt switch */
- if (scr->subwinactive==scr->mainwin) {
+ if (scr->subwinactive == scr->mainwin) {
screen_cursor_set(win, event);
}
- else if (oldswin!=scr->subwinactive) {
+ else if (oldswin != scr->subwinactive) {
region_cursor_set(win, scr->subwinactive);
- WM_event_add_notifier(C, NC_SCREEN|ND_SUBWINACTIVE, scr);
+ WM_event_add_notifier(C, NC_SCREEN | ND_SUBWINACTIVE, scr);
}
}
}
int ED_screen_area_active(const bContext *C)
{
- wmWindow *win= CTX_wm_window(C);
- bScreen *sc= CTX_wm_screen(C);
- ScrArea *sa= CTX_wm_area(C);
+ wmWindow *win = CTX_wm_window(C);
+ bScreen *sc = CTX_wm_screen(C);
+ ScrArea *sa = CTX_wm_area(C);
if (win && sc && sa) {
- AZone *az= is_in_area_actionzone(sa, win->eventstate->x, win->eventstate->y);
+ AZone *az = is_in_area_actionzone(sa, win->eventstate->x, win->eventstate->y);
ARegion *ar;
if (az && az->type == AZONE_REGION)
return 1;
- for (ar= sa->regionbase.first; ar; ar= ar->next)
+ for (ar = sa->regionbase.first; ar; ar = ar->next)
if (ar->swinid == sc->subwinactive)
return 1;
}
@@ -1318,35 +1325,35 @@ int ED_screen_area_active(const bContext *C)
/* Do NOT call in area/region queues! */
void ED_screen_set(bContext *C, bScreen *sc)
{
- wmWindowManager *wm= CTX_wm_manager(C);
- wmWindow *win= CTX_wm_window(C);
- bScreen *oldscreen= CTX_wm_screen(C);
+ wmWindowManager *wm = CTX_wm_manager(C);
+ wmWindow *win = CTX_wm_window(C);
+ bScreen *oldscreen = CTX_wm_screen(C);
ID *id;
/* validate screen, it's called with notifier reference */
- for (id= CTX_data_main(C)->screen.first; id; id= id->next)
+ for (id = CTX_data_main(C)->screen.first; id; id = id->next)
if (sc == (bScreen *)id)
break;
- if (id==NULL)
+ if (id == NULL)
return;
/* check for valid winid */
- if (sc->winid!=0 && sc->winid!=win->winid)
+ if (sc->winid != 0 && sc->winid != win->winid)
return;
- if (sc->full) { /* find associated full */
+ if (sc->full) { /* find associated full */
bScreen *sc1;
- for (sc1= CTX_data_main(C)->screen.first; sc1; sc1= sc1->id.next) {
- ScrArea *sa= sc1->areabase.first;
- if (sa->full==sc) {
- sc= sc1;
+ for (sc1 = CTX_data_main(C)->screen.first; sc1; sc1 = sc1->id.next) {
+ ScrArea *sa = sc1->areabase.first;
+ if (sa->full == sc) {
+ sc = sc1;
break;
}
}
}
if (oldscreen != sc) {
- wmTimer *wt= oldscreen->animtimer;
+ wmTimer *wt = oldscreen->animtimer;
ScrArea *sa;
/* remove handlers referencing areas in old screen */
@@ -1355,22 +1362,22 @@ void ED_screen_set(bContext *C, bScreen *sc)
}
/* we put timer to sleep, so screen_exit has to think there's no timer */
- oldscreen->animtimer= NULL;
+ oldscreen->animtimer = NULL;
if (wt)
WM_event_timer_sleep(wm, win, wt, 1);
ED_screen_exit(C, win, oldscreen);
- oldscreen->animtimer= wt;
+ oldscreen->animtimer = wt;
- win->screen= sc;
- CTX_wm_window_set(C, win); // stores C->wm.screen... hrmf
+ win->screen = sc;
+ CTX_wm_window_set(C, win); // stores C->wm.screen... hrmf
/* prevent multiwin errors */
- sc->winid= win->winid;
+ sc->winid = win->winid;
ED_screen_refresh(CTX_wm_manager(C), CTX_wm_window(C));
WM_event_add_notifier(C, NC_WINDOW, NULL);
- WM_event_add_notifier(C, NC_SCREEN|ND_SCREENSET, sc);
+ WM_event_add_notifier(C, NC_SCREEN | ND_SCREENSET, sc);
/* makes button hilites work */
WM_event_add_mousemove(C);
@@ -1381,7 +1388,7 @@ static int ed_screen_used(wmWindowManager *wm, bScreen *sc)
{
wmWindow *win;
- for (win=wm->windows.first; win; win=win->next)
+ for (win = wm->windows.first; win; win = win->next)
if (win->screen == sc)
return 1;
@@ -1391,11 +1398,11 @@ static int ed_screen_used(wmWindowManager *wm, bScreen *sc)
/* only call outside of area/region loops */
void ED_screen_delete(bContext *C, bScreen *sc)
{
- Main *bmain= CTX_data_main(C);
- wmWindowManager *wm= CTX_wm_manager(C);
- wmWindow *win= CTX_wm_window(C);
+ Main *bmain = CTX_data_main(C);
+ wmWindowManager *wm = CTX_wm_manager(C);
+ wmWindow *win = CTX_wm_window(C);
bScreen *newsc;
- int delete= 1;
+ int delete = 1;
/* don't allow deleting temp fullscreens for now */
if (sc->full == SCREENFULL) {
@@ -1407,12 +1414,12 @@ void ED_screen_delete(bContext *C, bScreen *sc)
* long as we are able to find a screen that is unused, we
* can safely assume ours is not in use anywhere an delete it */
- for (newsc= sc->id.prev; newsc; newsc=newsc->id.prev)
+ for (newsc = sc->id.prev; newsc; newsc = newsc->id.prev)
if (!ed_screen_used(wm, newsc))
break;
if (!newsc) {
- for (newsc= sc->id.next; newsc; newsc=newsc->id.next)
+ for (newsc = sc->id.next; newsc; newsc = newsc->id.next)
if (!ed_screen_used(wm, newsc))
break;
}
@@ -1423,32 +1430,32 @@ void ED_screen_delete(bContext *C, bScreen *sc)
ED_screen_set(C, newsc);
if (delete && win->screen != sc)
- free_libblock(&bmain->screen, sc);
+ BKE_libblock_free(&bmain->screen, sc);
}
/* only call outside of area/region loops */
void ED_screen_set_scene(bContext *C, bScreen *screen, Scene *scene)
{
- Main *bmain= CTX_data_main(C);
+ Main *bmain = CTX_data_main(C);
bScreen *sc;
if (screen == NULL)
return;
if (ed_screen_used(CTX_wm_manager(C), screen))
- ED_object_exit_editmode(C, EM_FREEDATA|EM_DO_UNDO);
+ ED_object_exit_editmode(C, EM_FREEDATA | EM_DO_UNDO);
- for (sc= CTX_data_main(C)->screen.first; sc; sc= sc->id.next) {
- if ((U.flag & USER_SCENEGLOBAL) || sc==screen) {
+ for (sc = CTX_data_main(C)->screen.first; sc; sc = sc->id.next) {
+ if ((U.flag & USER_SCENEGLOBAL) || sc == screen) {
if (scene != sc->scene) {
/* all areas endlocalview */
- // XXX ScrArea *sa= sc->areabase.first;
- // while (sa) {
- // endlocalview(sa);
- // sa= sa->next;
- // }
- sc->scene= scene;
+ // XXX ScrArea *sa= sc->areabase.first;
+ // while (sa) {
+ // endlocalview(sa);
+ // sa= sa->next;
+ // }
+ sc->scene = scene;
}
}
@@ -1457,42 +1464,42 @@ void ED_screen_set_scene(bContext *C, bScreen *screen, Scene *scene)
// copy_view3d_lock(0); /* space.c */
/* are there cameras in the views that are not in the scene? */
- for (sc= CTX_data_main(C)->screen.first; sc; sc= sc->id.next) {
- if ( (U.flag & USER_SCENEGLOBAL) || sc==screen) {
- ScrArea *sa= sc->areabase.first;
+ for (sc = CTX_data_main(C)->screen.first; sc; sc = sc->id.next) {
+ if ( (U.flag & USER_SCENEGLOBAL) || sc == screen) {
+ ScrArea *sa = sc->areabase.first;
while (sa) {
- SpaceLink *sl= sa->spacedata.first;
+ SpaceLink *sl = sa->spacedata.first;
while (sl) {
- if (sl->spacetype==SPACE_VIEW3D) {
- View3D *v3d= (View3D*) sl;
+ if (sl->spacetype == SPACE_VIEW3D) {
+ View3D *v3d = (View3D *) sl;
BKE_screen_view3d_sync(v3d, scene);
- if (!v3d->camera || !object_in_scene(v3d->camera, scene)) {
- v3d->camera= scene_find_camera(sc->scene);
+ if (!v3d->camera || !BKE_scene_base_find(scene, v3d->camera)) {
+ v3d->camera = BKE_scene_camera_find(sc->scene);
// XXX if (sc==curscreen) handle_view3d_lock();
if (!v3d->camera) {
ARegion *ar;
- for (ar=v3d->regionbase.first; ar; ar= ar->next) {
+ for (ar = v3d->regionbase.first; ar; ar = ar->next) {
if (ar->regiontype == RGN_TYPE_WINDOW) {
- RegionView3D *rv3d= ar->regiondata;
+ RegionView3D *rv3d = ar->regiondata;
- if (rv3d->persp==RV3D_CAMOB)
- rv3d->persp= RV3D_PERSP;
+ if (rv3d->persp == RV3D_CAMOB)
+ rv3d->persp = RV3D_PERSP;
}
}
}
}
}
- sl= sl->next;
+ sl = sl->next;
}
- sa= sa->next;
+ sa = sa->next;
}
}
}
CTX_data_scene_set(C, scene);
- set_scene_bg(bmain, scene);
+ BKE_scene_set_background(bmain, scene);
ED_render_engine_changed(bmain);
ED_update_for_newframe(bmain, scene, screen, 1);
@@ -1505,29 +1512,29 @@ void ED_screen_set_scene(bContext *C, bScreen *screen, Scene *scene)
/* only call outside of area/region loops */
void ED_screen_delete_scene(bContext *C, Scene *scene)
{
- Main *bmain= CTX_data_main(C);
+ Main *bmain = CTX_data_main(C);
Scene *newscene;
if (scene->id.prev)
- newscene= scene->id.prev;
+ newscene = scene->id.prev;
else if (scene->id.next)
- newscene= scene->id.next;
+ newscene = scene->id.next;
else
return;
ED_screen_set_scene(C, CTX_wm_screen(C), newscene);
- unlink_scene(bmain, scene, newscene);
+ BKE_scene_unlink(bmain, scene, newscene);
}
ScrArea *ED_screen_full_newspace(bContext *C, ScrArea *sa, int type)
{
- wmWindow *win= CTX_wm_window(C);
- bScreen *screen= CTX_wm_screen(C);
- ScrArea *newsa= NULL;
+ wmWindow *win = CTX_wm_window(C);
+ bScreen *screen = CTX_wm_screen(C);
+ ScrArea *newsa = NULL;
- if (!sa || sa->full==NULL) {
- newsa= ED_screen_full_toggle(C, win, sa);
+ if (!sa || sa->full == NULL) {
+ newsa = ED_screen_full_toggle(C, win, sa);
}
if (!newsa) {
@@ -1535,7 +1542,7 @@ ScrArea *ED_screen_full_newspace(bContext *C, ScrArea *sa, int type)
/* if this has been called from the temporary info header generated in
* temp fullscreen layouts, find the correct fullscreen area to change
* to create a new space inside */
- for (newsa = screen->areabase.first; newsa; newsa=newsa->next) {
+ for (newsa = screen->areabase.first; newsa; newsa = newsa->next) {
if (!(sa->flag & AREA_TEMP_INFO))
break;
}
@@ -1552,7 +1559,7 @@ ScrArea *ED_screen_full_newspace(bContext *C, ScrArea *sa, int type)
void ED_screen_full_prevspace(bContext *C, ScrArea *sa)
{
- wmWindow *win= CTX_wm_window(C);
+ wmWindow *win = CTX_wm_window(C);
ED_area_prevspace(C, sa);
@@ -1563,7 +1570,7 @@ void ED_screen_full_prevspace(bContext *C, ScrArea *sa)
/* restore a screen / area back to default operation, after temp fullscreen modes */
void ED_screen_full_restore(bContext *C, ScrArea *sa)
{
- wmWindow *win= CTX_wm_window(C);
+ wmWindow *win = CTX_wm_window(C);
SpaceLink *sl = sa->spacedata.first;
/* if fullscreen area has a secondary space (such as a file browser or fullscreen render
@@ -1576,13 +1583,13 @@ void ED_screen_full_restore(bContext *C, ScrArea *sa)
/* Special check added for non-render image window (back from fullscreen through "Back to Previous" button) */
if (sl->spacetype == SPACE_IMAGE) {
- SpaceImage *sima= sa->spacedata.first;
+ SpaceImage *sima = sa->spacedata.first;
if (!(sima->flag & SI_PREVSPACE) && !(sima->flag & SI_FULLWINDOW))
sima_restore = 1;
}
if (sl->spacetype == SPACE_IMAGE && !sima_restore) {
- SpaceImage *sima= sa->spacedata.first;
+ SpaceImage *sima = sa->spacedata.first;
if (sima->flag & SI_PREVSPACE)
sima->flag &= ~SI_PREVSPACE;
if (sima->flag & SI_FULLWINDOW) {
@@ -1613,7 +1620,7 @@ ScrArea *ED_screen_full_toggle(bContext *C, wmWindow *win, ScrArea *sa)
/* ensure we don't have a button active anymore, can crash when
* switching screens with tooltip open because region and tooltip
* are no longer in the same screen */
- for (ar=sa->regionbase.first; ar; ar=ar->next)
+ for (ar = sa->regionbase.first; ar; ar = ar->next)
uiFreeBlocks(C, &ar->uiblocks);
/* prevent hanging header prints */
@@ -1624,76 +1631,76 @@ ScrArea *ED_screen_full_toggle(bContext *C, wmWindow *win, ScrArea *sa)
ScrArea *old;
/*short fulltype;*/ /*UNUSED*/
- sc= sa->full; /* the old screen to restore */
- oldscreen= win->screen; /* the one disappearing */
+ sc = sa->full; /* the old screen to restore */
+ oldscreen = win->screen; /* the one disappearing */
/*fulltype = sc->full;*/
- sc->full= 0;
+ sc->full = 0;
/* removed: SCREENAUTOPLAY exception here */
/* find old area */
- for (old= sc->areabase.first; old; old= old->next)
+ for (old = sc->areabase.first; old; old = old->next)
if (old->full) break;
- if (old==NULL) {
+ if (old == NULL) {
if (G.debug & G_DEBUG)
printf("%s: something wrong in areafullscreen\n", __func__);
return NULL;
}
- area_copy_data(old, sa, 1); /* 1 = swap spacelist */
+ area_copy_data(old, sa, 1); /* 1 = swap spacelist */
if (sa->flag & AREA_TEMP_INFO) sa->flag &= ~AREA_TEMP_INFO;
- old->full= NULL;
+ old->full = NULL;
/* animtimer back */
- sc->animtimer= oldscreen->animtimer;
- oldscreen->animtimer= NULL;
+ sc->animtimer = oldscreen->animtimer;
+ oldscreen->animtimer = NULL;
ED_screen_set(C, sc);
- free_screen(oldscreen);
- free_libblock(&CTX_data_main(C)->screen, oldscreen);
+ BKE_screen_free(oldscreen);
+ BKE_libblock_free(&CTX_data_main(C)->screen, oldscreen);
}
else {
ScrArea *newa;
- char newname[MAX_ID_NAME-2];
+ char newname[MAX_ID_NAME - 2];
- oldscreen= win->screen;
+ oldscreen = win->screen;
/* nothing wrong with having only 1 area, as far as I can see...
* is there only 1 area? */
#if 0
- if (oldscreen->areabase.first==oldscreen->areabase.last)
+ if (oldscreen->areabase.first == oldscreen->areabase.last)
return NULL;
#endif
oldscreen->full = SCREENFULL;
- BLI_snprintf(newname, sizeof(newname), "%s-%s", oldscreen->id.name+2, "full");
- sc= ED_screen_add(win, oldscreen->scene, newname);
+ BLI_snprintf(newname, sizeof(newname), "%s-%s", oldscreen->id.name + 2, "full");
+ sc = ED_screen_add(win, oldscreen->scene, newname);
sc->full = SCREENFULL; // XXX
/* timer */
- sc->animtimer= oldscreen->animtimer;
- oldscreen->animtimer= NULL;
+ sc->animtimer = oldscreen->animtimer;
+ oldscreen->animtimer = NULL;
/* returns the top small area */
- newa= area_split(sc, (ScrArea *)sc->areabase.first, 'h', 0.99f, 1);
+ newa = area_split(sc, (ScrArea *)sc->areabase.first, 'h', 0.99f, 1);
ED_area_newspace(C, newa, SPACE_INFO);
/* use random area when we have no active one, e.g. when the
* mouse is outside of the window and we open a file browser */
if (!sa)
- sa= oldscreen->areabase.first;
+ sa = oldscreen->areabase.first;
/* copy area */
- newa= newa->prev;
- area_copy_data(newa, sa, 1); /* 1 = swap spacelist */
+ newa = newa->prev;
+ area_copy_data(newa, sa, 1); /* 1 = swap spacelist */
sa->flag |= AREA_TEMP_INFO;
- sa->full= oldscreen;
- newa->full= oldscreen;
- newa->next->full= oldscreen; // XXX
+ sa->full = oldscreen;
+ newa->full = oldscreen;
+ newa->next->full = oldscreen; // XXX
ED_screen_set(C, sc);
}
@@ -1707,26 +1714,26 @@ ScrArea *ED_screen_full_toggle(bContext *C, wmWindow *win, ScrArea *sa)
/* update frame rate info for viewport drawing */
void ED_refresh_viewport_fps(bContext *C)
{
- wmTimer *animtimer= CTX_wm_screen(C)->animtimer;
- Scene *scene= CTX_data_scene(C);
+ wmTimer *animtimer = CTX_wm_screen(C)->animtimer;
+ Scene *scene = CTX_data_scene(C);
/* is anim playback running? */
if (animtimer && (U.uiflag & USER_SHOW_FPS)) {
- ScreenFrameRateInfo *fpsi= scene->fps_info;
+ ScreenFrameRateInfo *fpsi = scene->fps_info;
/* if there isn't any info, init it first */
if (fpsi == NULL)
- fpsi= scene->fps_info= MEM_callocN(sizeof(ScreenFrameRateInfo), "refresh_viewport_fps fps_info");
+ fpsi = scene->fps_info = MEM_callocN(sizeof(ScreenFrameRateInfo), "refresh_viewport_fps fps_info");
/* update the values */
- fpsi->redrawtime= fpsi->lredrawtime;
- fpsi->lredrawtime= animtimer->ltime;
+ fpsi->redrawtime = fpsi->lredrawtime;
+ fpsi->lredrawtime = animtimer->ltime;
}
else {
/* playback stopped or shouldn't be running */
if (scene->fps_info)
MEM_freeN(scene->fps_info);
- scene->fps_info= NULL;
+ scene->fps_info = NULL;
}
}
@@ -1735,56 +1742,56 @@ void ED_refresh_viewport_fps(bContext *C)
*/
void ED_screen_animation_timer(bContext *C, int redraws, int refresh, int sync, int enable)
{
- bScreen *screen= CTX_wm_screen(C);
- wmWindowManager *wm= CTX_wm_manager(C);
- wmWindow *win= CTX_wm_window(C);
- Scene *scene= CTX_data_scene(C);
+ bScreen *screen = CTX_wm_screen(C);
+ wmWindowManager *wm = CTX_wm_manager(C);
+ wmWindow *win = CTX_wm_window(C);
+ Scene *scene = CTX_data_scene(C);
if (screen->animtimer)
WM_event_remove_timer(wm, win, screen->animtimer);
- screen->animtimer= NULL;
+ screen->animtimer = NULL;
if (enable) {
- ScreenAnimData *sad= MEM_callocN(sizeof(ScreenAnimData), "ScreenAnimData");
+ ScreenAnimData *sad = MEM_callocN(sizeof(ScreenAnimData), "ScreenAnimData");
- screen->animtimer= WM_event_add_timer(wm, win, TIMER0, (1.0/FPS));
+ screen->animtimer = WM_event_add_timer(wm, win, TIMER0, (1.0 / FPS));
- sad->ar= CTX_wm_region(C);
+ sad->ar = CTX_wm_region(C);
/* if startframe is larger than current frame, we put currentframe on startframe.
* note: first frame then is not drawn! (ton) */
if (scene->r.sfra > scene->r.cfra) {
- sad->sfra= scene->r.cfra;
- scene->r.cfra= scene->r.sfra;
+ sad->sfra = scene->r.cfra;
+ scene->r.cfra = scene->r.sfra;
}
else
sad->sfra = scene->r.cfra;
- sad->redraws= redraws;
- sad->refresh= refresh;
- sad->flag |= (enable < 0)? ANIMPLAY_FLAG_REVERSE: 0;
- sad->flag |= (sync == 0)? ANIMPLAY_FLAG_NO_SYNC: (sync == 1)? ANIMPLAY_FLAG_SYNC: 0;
+ sad->redraws = redraws;
+ sad->refresh = refresh;
+ sad->flag |= (enable < 0) ? ANIMPLAY_FLAG_REVERSE : 0;
+ sad->flag |= (sync == 0) ? ANIMPLAY_FLAG_NO_SYNC : (sync == 1) ? ANIMPLAY_FLAG_SYNC : 0;
- screen->animtimer->customdata= sad;
+ screen->animtimer->customdata = sad;
}
/* notifier catched by top header, for button */
- WM_event_add_notifier(C, NC_SCREEN|ND_ANIMPLAY, screen);
+ WM_event_add_notifier(C, NC_SCREEN | ND_ANIMPLAY, screen);
}
/* helper for screen_animation_play() - only to be used for TimeLine */
static ARegion *time_top_left_3dwindow(bScreen *screen)
{
- ARegion *aret= NULL;
+ ARegion *aret = NULL;
ScrArea *sa;
- int min= 10000;
+ int min = 10000;
- for (sa= screen->areabase.first; sa; sa= sa->next) {
- if (sa->spacetype==SPACE_VIEW3D) {
+ for (sa = screen->areabase.first; sa; sa = sa->next) {
+ if (sa->spacetype == SPACE_VIEW3D) {
ARegion *ar;
- for (ar= sa->regionbase.first; ar; ar= ar->next) {
- if (ar->regiontype==RGN_TYPE_WINDOW) {
+ for (ar = sa->regionbase.first; ar; ar = ar->next) {
+ if (ar->regiontype == RGN_TYPE_WINDOW) {
if (ar->winrct.xmin - ar->winrct.ymin < min) {
- aret= ar;
- min= ar->winrct.xmin - ar->winrct.ymin;
+ aret = ar;
+ min = ar->winrct.xmin - ar->winrct.ymin;
}
}
}
@@ -1797,14 +1804,14 @@ static ARegion *time_top_left_3dwindow(bScreen *screen)
void ED_screen_animation_timer_update(bScreen *screen, int redraws, int refresh)
{
if (screen && screen->animtimer) {
- wmTimer *wt= screen->animtimer;
- ScreenAnimData *sad= wt->customdata;
+ wmTimer *wt = screen->animtimer;
+ ScreenAnimData *sad = wt->customdata;
- sad->redraws= redraws;
- sad->refresh= refresh;
- sad->ar= NULL;
+ sad->redraws = redraws;
+ sad->refresh = refresh;
+ sad->ar = NULL;
if (redraws & TIME_REGION)
- sad->ar= time_top_left_3dwindow(screen);
+ sad->ar = time_top_left_3dwindow(screen);
}
}
@@ -1813,12 +1820,12 @@ void ED_screen_animation_timer_update(bScreen *screen, int redraws, int refresh)
void ED_update_for_newframe(Main *bmain, Scene *scene, bScreen *screen, int UNUSED(mute))
{
#ifdef DURIAN_CAMERA_SWITCH
- void *camera= scene_camera_switch_find(scene);
+ void *camera = BKE_scene_camera_switch_find(scene);
if (camera && scene->camera != camera) {
bScreen *sc;
- scene->camera= camera;
+ scene->camera = camera;
/* are there cameras in the views that are not in the scene? */
- for (sc= bmain->screen.first; sc; sc= sc->id.next) {
+ for (sc = bmain->screen.first; sc; sc = sc->id.next) {
BKE_screen_view3d_scene_sync(sc);
}
}
@@ -1827,14 +1834,14 @@ void ED_update_for_newframe(Main *bmain, Scene *scene, bScreen *screen, int UNUS
//extern void audiostream_scrub(unsigned int frame); /* seqaudio.c */
/* update animated image textures for gpu, etc,
- * call before scene_update_for_newframe so modifiers with textures don't lag 1 frame */
+ * call before BKE_scene_update_for_newframe so modifiers with textures don't lag 1 frame */
ED_image_update_frame(bmain, scene->r.cfra);
ED_clip_update_frame(bmain, scene->r.cfra);
/* this function applies the changes too */
/* XXX future: do all windows */
- scene_update_for_newframe(bmain, scene, BKE_screen_visible_layers(screen, scene)); /* BKE_scene.h */
+ BKE_scene_update_for_newframe(bmain, scene, BKE_screen_visible_layers(screen, scene)); /* BKE_scene.h */
//if ( (CFRA>1) && (!mute) && (scene->r.audio.flag & AUDIO_SCRUB))
// audiostream_scrub( CFRA );
@@ -1852,7 +1859,7 @@ void ED_update_for_newframe(Main *bmain, Scene *scene, bScreen *screen, int UNUS
/* update animated texture nodes */
{
Tex *tex;
- for (tex= bmain->tex.first; tex; tex= tex->id.next)
+ for (tex = bmain->tex.first; tex; tex = tex->id.next)
if (tex->use_nodes && tex->nodetree) {
ntreeTexTagAnimated(tex->nodetree);
}
diff --git a/source/blender/editors/screen/screen_intern.h b/source/blender/editors/screen/screen_intern.h
index 90533fd3a12..aa11c3eecdd 100644
--- a/source/blender/editors/screen/screen_intern.h
+++ b/source/blender/editors/screen/screen_intern.h
@@ -35,24 +35,24 @@
struct wmWindow;
struct Scene;
-#define AZONESPOT 12
+#define AZONESPOT 12
/* area.c */
-void area_copy_data (ScrArea *sa1, ScrArea *sa2, int swap_space);
+void area_copy_data(ScrArea *sa1, ScrArea *sa2, int swap_space);
/* screen_edit.c */
-ScrEdge *screen_findedge(bScreen *sc, ScrVert *v1, ScrVert *v2);
-ScrArea *area_split(bScreen *sc, ScrArea *sa, char dir, float fac, int merge);
-int screen_area_join(bContext *C, bScreen* scr, ScrArea *sa1, ScrArea *sa2);
-int area_getorientation(ScrArea *sa, ScrArea *sb);
-void select_connected_scredge(bScreen *sc, ScrEdge *edge);
-
-void removenotused_scrverts(bScreen *sc);
-void removedouble_scrverts(bScreen *sc);
-void removedouble_scredges(bScreen *sc);
-void removenotused_scredges(bScreen *sc);
-int scredge_is_horizontal(ScrEdge *se);
-ScrEdge *screen_find_active_scredge(bScreen *sc, int mx, int my);
+ScrEdge *screen_findedge(bScreen *sc, ScrVert *v1, ScrVert *v2);
+ScrArea *area_split(bScreen *sc, ScrArea *sa, char dir, float fac, int merge);
+int screen_area_join(bContext *C, bScreen *scr, ScrArea *sa1, ScrArea *sa2);
+int area_getorientation(ScrArea *sa, ScrArea *sb);
+void select_connected_scredge(bScreen *sc, ScrEdge *edge);
+
+void removenotused_scrverts(bScreen *sc);
+void removedouble_scrverts(bScreen *sc);
+void removedouble_scredges(bScreen *sc);
+void removenotused_scredges(bScreen *sc);
+int scredge_is_horizontal(ScrEdge *se);
+ScrEdge *screen_find_active_scredge(bScreen *sc, int mx, int my);
struct AZone *is_in_area_actionzone(ScrArea *sa, int x, int y);
@@ -66,7 +66,3 @@ void SCREEN_OT_screenshot(struct wmOperatorType *ot);
void SCREEN_OT_screencast(struct wmOperatorType *ot);
#endif /* __SCREEN_INTERN_H__ */
-
-
-
-
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index e427e1e21cf..52e1f90606f 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -78,35 +78,35 @@
#include "wm_window.h"
-#include "screen_intern.h" /* own module include */
+#include "screen_intern.h" /* own module include */
-#define KM_MODAL_CANCEL 1
-#define KM_MODAL_APPLY 2
-#define KM_MODAL_STEP10 3
-#define KM_MODAL_STEP10_OFF 4
+#define KM_MODAL_CANCEL 1
+#define KM_MODAL_APPLY 2
+#define KM_MODAL_STEP10 3
+#define KM_MODAL_STEP10_OFF 4
/* ************** Exported Poll tests ********************** */
int ED_operator_regionactive(bContext *C)
{
- if (CTX_wm_window(C)==NULL) return 0;
- if (CTX_wm_screen(C)==NULL) return 0;
- if (CTX_wm_region(C)==NULL) return 0;
+ if (CTX_wm_window(C) == NULL) return 0;
+ if (CTX_wm_screen(C) == NULL) return 0;
+ if (CTX_wm_region(C) == NULL) return 0;
return 1;
}
int ED_operator_areaactive(bContext *C)
{
- if (CTX_wm_window(C)==NULL) return 0;
- if (CTX_wm_screen(C)==NULL) return 0;
- if (CTX_wm_area(C)==NULL) return 0;
+ if (CTX_wm_window(C) == NULL) return 0;
+ if (CTX_wm_screen(C) == NULL) return 0;
+ if (CTX_wm_area(C) == NULL) return 0;
return 1;
}
int ED_operator_screenactive(bContext *C)
{
- if (CTX_wm_window(C)==NULL) return 0;
- if (CTX_wm_screen(C)==NULL) return 0;
+ if (CTX_wm_window(C) == NULL) return 0;
+ if (CTX_wm_screen(C) == NULL) return 0;
return 1;
}
@@ -114,8 +114,8 @@ int ED_operator_screenactive(bContext *C)
static int ED_operator_screenactive_norender(bContext *C)
{
if (G.rendering) return 0;
- if (CTX_wm_window(C)==NULL) return 0;
- if (CTX_wm_screen(C)==NULL) return 0;
+ if (CTX_wm_window(C) == NULL) return 0;
+ if (CTX_wm_screen(C) == NULL) return 0;
return 1;
}
@@ -134,28 +134,28 @@ static int screen_active_editable(bContext *C)
/* when mouse is over area-edge */
int ED_operator_screen_mainwinactive(bContext *C)
{
- if (CTX_wm_window(C)==NULL) return 0;
- if (CTX_wm_screen(C)==NULL) return 0;
- if (CTX_wm_screen(C)->subwinactive!=CTX_wm_screen(C)->mainwin) return 0;
+ if (CTX_wm_window(C) == NULL) return 0;
+ if (CTX_wm_screen(C) == NULL) return 0;
+ if (CTX_wm_screen(C)->subwinactive != CTX_wm_screen(C)->mainwin) return 0;
return 1;
}
int ED_operator_scene_editable(bContext *C)
{
- Scene *scene= CTX_data_scene(C);
- if (scene && scene->id.lib==NULL)
+ Scene *scene = CTX_data_scene(C);
+ if (scene && scene->id.lib == NULL)
return 1;
return 0;
}
int ED_operator_objectmode(bContext *C)
{
- Scene *scene= CTX_data_scene(C);
- Object *obact= CTX_data_active_object(C);
+ Scene *scene = CTX_data_scene(C);
+ Object *obact = CTX_data_active_object(C);
- if (scene==NULL || scene->id.lib)
+ if (scene == NULL || scene->id.lib)
return 0;
- if ( CTX_data_edit_object(C) )
+ if (CTX_data_edit_object(C) )
return 0;
/* add a check for ob->mode too? */
@@ -169,7 +169,7 @@ int ED_operator_objectmode(bContext *C)
static int ed_spacetype_test(bContext *C, int type)
{
if (ED_operator_areaactive(C)) {
- SpaceLink *sl= (SpaceLink *)CTX_wm_space_data(C);
+ SpaceLink *sl = (SpaceLink *)CTX_wm_space_data(C);
return sl && (sl->spacetype == type);
}
return 0;
@@ -193,7 +193,7 @@ int ED_operator_region_view3d_active(bContext *C)
int ED_operator_animview_active(bContext *C)
{
if (ED_operator_areaactive(C)) {
- SpaceLink *sl= (SpaceLink *)CTX_wm_space_data(C);
+ SpaceLink *sl = (SpaceLink *)CTX_wm_space_data(C);
if (sl && (ELEM5(sl->spacetype, SPACE_SEQ, SPACE_ACTION, SPACE_NLA, SPACE_IPO, SPACE_TIME)))
return TRUE;
}
@@ -216,7 +216,7 @@ int ED_operator_outliner_active_no_editobject(bContext *C)
{
if (ed_spacetype_test(C, SPACE_OUTLINER)) {
Object *ob = ED_object_active_context(C);
- Object *obedit= CTX_data_edit_object(C);
+ Object *obedit = CTX_data_edit_object(C);
if (ob && ob == obedit)
return 0;
else
@@ -242,7 +242,7 @@ int ED_operator_buttons_active(bContext *C)
int ED_operator_node_active(bContext *C)
{
- SpaceNode *snode= CTX_wm_space_node(C);
+ SpaceNode *snode = CTX_wm_space_node(C);
if (snode && snode->edittree)
return 1;
@@ -313,8 +313,8 @@ int ED_operator_object_active_editable_font(bContext *C)
int ED_operator_editmesh(bContext *C)
{
- Object *obedit= CTX_data_edit_object(C);
- if (obedit && obedit->type==OB_MESH)
+ Object *obedit = CTX_data_edit_object(C);
+ if (obedit && obedit->type == OB_MESH)
return NULL != BMEdit_FromObject(obedit);
return 0;
}
@@ -335,19 +335,19 @@ int ED_operator_editmesh_region_view3d(bContext *C)
int ED_operator_editarmature(bContext *C)
{
- Object *obedit= CTX_data_edit_object(C);
- if (obedit && obedit->type==OB_ARMATURE)
+ Object *obedit = CTX_data_edit_object(C);
+ if (obedit && obedit->type == OB_ARMATURE)
return NULL != ((bArmature *)obedit->data)->edbo;
return 0;
}
int ED_operator_posemode(bContext *C)
{
- Object *obact= CTX_data_active_object(C);
+ Object *obact = CTX_data_active_object(C);
if (obact && !(obact->mode & OB_MODE_EDIT)) {
Object *obpose;
- if ((obpose= object_pose_armature_get(obact))) {
+ if ((obpose = BKE_object_pose_armature_get(obact))) {
if ((obact == obpose) || (obact->mode & OB_MODE_WEIGHT_PAINT)) {
return 1;
}
@@ -360,8 +360,8 @@ int ED_operator_posemode(bContext *C)
/* wrapper for ED_space_image_show_uvedit */
int ED_operator_uvedit(bContext *C)
{
- SpaceImage *sima= CTX_wm_space_image(C);
- Object *obedit= CTX_data_edit_object(C);
+ SpaceImage *sima = CTX_wm_space_image(C);
+ Object *obedit = CTX_data_edit_object(C);
return ED_space_image_show_uvedit(sima, obedit);
}
@@ -383,7 +383,7 @@ int ED_operator_uvmap(bContext *C)
int ED_operator_editsurfcurve(bContext *C)
{
- Object *obedit= CTX_data_edit_object(C);
+ Object *obedit = CTX_data_edit_object(C);
if (obedit && ELEM(obedit->type, OB_CURVE, OB_SURF))
return NULL != ((Curve *)obedit->data)->editnurb;
return 0;
@@ -400,51 +400,51 @@ int ED_operator_editsurfcurve_region_view3d(bContext *C)
int ED_operator_editcurve(bContext *C)
{
- Object *obedit= CTX_data_edit_object(C);
- if (obedit && obedit->type==OB_CURVE)
+ Object *obedit = CTX_data_edit_object(C);
+ if (obedit && obedit->type == OB_CURVE)
return NULL != ((Curve *)obedit->data)->editnurb;
return 0;
}
int ED_operator_editcurve_3d(bContext *C)
{
- Object *obedit= CTX_data_edit_object(C);
- if (obedit && obedit->type==OB_CURVE) {
- Curve *cu= (Curve *)obedit->data;
+ Object *obedit = CTX_data_edit_object(C);
+ if (obedit && obedit->type == OB_CURVE) {
+ Curve *cu = (Curve *)obedit->data;
- return (cu->flag&CU_3D) && (NULL != cu->editnurb);
+ return (cu->flag & CU_3D) && (NULL != cu->editnurb);
}
return 0;
}
int ED_operator_editsurf(bContext *C)
{
- Object *obedit= CTX_data_edit_object(C);
- if (obedit && obedit->type==OB_SURF)
+ Object *obedit = CTX_data_edit_object(C);
+ if (obedit && obedit->type == OB_SURF)
return NULL != ((Curve *)obedit->data)->editnurb;
return 0;
}
int ED_operator_editfont(bContext *C)
{
- Object *obedit= CTX_data_edit_object(C);
- if (obedit && obedit->type==OB_FONT)
+ Object *obedit = CTX_data_edit_object(C);
+ if (obedit && obedit->type == OB_FONT)
return NULL != ((Curve *)obedit->data)->editfont;
return 0;
}
int ED_operator_editlattice(bContext *C)
{
- Object *obedit= CTX_data_edit_object(C);
- if (obedit && obedit->type==OB_LATTICE)
+ Object *obedit = CTX_data_edit_object(C);
+ if (obedit && obedit->type == OB_LATTICE)
return NULL != ((Lattice *)obedit->data)->editlatt;
return 0;
}
int ED_operator_editmball(bContext *C)
{
- Object *obedit= CTX_data_edit_object(C);
- if (obedit && obedit->type==OB_MBALL)
+ Object *obedit = CTX_data_edit_object(C);
+ if (obedit && obedit->type == OB_MBALL)
return NULL != ((MetaBall *)obedit->data)->editelems;
return 0;
}
@@ -482,11 +482,11 @@ typedef struct sActionzoneData {
/* used by other operators too */
static ScrArea *screen_areahascursor(bScreen *scr, int x, int y)
{
- ScrArea *sa= NULL;
- sa= scr->areabase.first;
+ ScrArea *sa = NULL;
+ sa = scr->areabase.first;
while (sa) {
if (BLI_in_rcti(&sa->totrct, x, y)) break;
- sa= sa->next;
+ sa = sa->next;
}
return sa;
@@ -495,15 +495,15 @@ static ScrArea *screen_areahascursor(bScreen *scr, int x, int y)
/* quick poll to save operators to be created and handled */
static int actionzone_area_poll(bContext *C)
{
- wmWindow *win= CTX_wm_window(C);
- ScrArea *sa= CTX_wm_area(C);
+ wmWindow *win = CTX_wm_window(C);
+ ScrArea *sa = CTX_wm_area(C);
if (sa && win) {
AZone *az;
- int x= win->eventstate->x;
- int y= win->eventstate->y;
+ int x = win->eventstate->x;
+ int y = win->eventstate->y;
- for (az= sa->actionzones.first; az; az= az->next)
+ for (az = sa->actionzones.first; az; az = az->next)
if (BLI_in_rcti(&az->rect, x, y))
return 1;
}
@@ -512,15 +512,15 @@ static int actionzone_area_poll(bContext *C)
AZone *is_in_area_actionzone(ScrArea *sa, int x, int y)
{
- AZone *az= NULL;
+ AZone *az = NULL;
- for (az= sa->actionzones.first; az; az= az->next) {
+ for (az = sa->actionzones.first; az; az = az->next) {
if (BLI_in_rcti(&az->rect, x, y)) {
if (az->type == AZONE_AREA) {
/* no triangle intersect but a hotspot circle based on corner */
- int radius= (x-az->x1)*(x-az->x1) + (y-az->y1)*(y-az->y1);
+ int radius = (x - az->x1) * (x - az->x1) + (y - az->y1) * (y - az->y1);
- if (radius <= AZONESPOT*AZONESPOT)
+ if (radius <= AZONESPOT * AZONESPOT)
break;
}
else if (az->type == AZONE_REGION) {
@@ -537,47 +537,47 @@ static void actionzone_exit(wmOperator *op)
{
if (op->customdata)
MEM_freeN(op->customdata);
- op->customdata= NULL;
+ op->customdata = NULL;
}
/* send EVT_ACTIONZONE event */
static void actionzone_apply(bContext *C, wmOperator *op, int type)
{
wmEvent event;
- wmWindow *win= CTX_wm_window(C);
- sActionzoneData *sad= op->customdata;
+ wmWindow *win = CTX_wm_window(C);
+ sActionzoneData *sad = op->customdata;
- sad->modifier= RNA_int_get(op->ptr, "modifier");
+ sad->modifier = RNA_int_get(op->ptr, "modifier");
- event= *(win->eventstate); /* XXX huh huh? make api call */
- if (type==AZONE_AREA)
- event.type= EVT_ACTIONZONE_AREA;
+ event = *(win->eventstate); /* XXX huh huh? make api call */
+ if (type == AZONE_AREA)
+ event.type = EVT_ACTIONZONE_AREA;
else
- event.type= EVT_ACTIONZONE_REGION;
- event.customdata= op->customdata;
- event.customdatafree= TRUE;
- op->customdata= NULL;
+ event.type = EVT_ACTIONZONE_REGION;
+ event.customdata = op->customdata;
+ event.customdatafree = TRUE;
+ op->customdata = NULL;
wm_event_add(win, &event);
}
static int actionzone_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- AZone *az= is_in_area_actionzone(CTX_wm_area(C), event->x, event->y);
+ AZone *az = is_in_area_actionzone(CTX_wm_area(C), event->x, event->y);
sActionzoneData *sad;
/* quick escape */
- if (az==NULL)
+ if (az == NULL)
return OPERATOR_PASS_THROUGH;
/* ok we do the actionzone */
- sad= op->customdata= MEM_callocN(sizeof(sActionzoneData), "sActionzoneData");
- sad->sa1= CTX_wm_area(C);
- sad->az= az;
- sad->x= event->x; sad->y= event->y;
+ sad = op->customdata = MEM_callocN(sizeof(sActionzoneData), "sActionzoneData");
+ sad->sa1 = CTX_wm_area(C);
+ sad->az = az;
+ sad->x = event->x; sad->y = event->y;
/* region azone directly reacts on mouse clicks */
- if (sad->az->type==AZONE_REGION) {
+ if (sad->az->type == AZONE_REGION) {
actionzone_apply(C, op, AZONE_REGION);
actionzone_exit(op);
return OPERATOR_FINISHED;
@@ -593,30 +593,30 @@ static int actionzone_invoke(bContext *C, wmOperator *op, wmEvent *event)
static int actionzone_modal(bContext *C, wmOperator *op, wmEvent *event)
{
- sActionzoneData *sad= op->customdata;
+ sActionzoneData *sad = op->customdata;
int deltax, deltay;
- int mindelta= sad->az->type==AZONE_REGION?1:12;
+ int mindelta = sad->az->type == AZONE_REGION ? 1 : 12;
- switch(event->type) {
+ switch (event->type) {
case MOUSEMOVE:
/* calculate gesture direction */
- deltax= (event->x - sad->x);
- deltay= (event->y - sad->y);
+ deltax = (event->x - sad->x);
+ deltay = (event->y - sad->y);
if (deltay > ABS(deltax))
- sad->gesture_dir= 'n';
+ sad->gesture_dir = 'n';
else if (deltax > ABS(deltay))
- sad->gesture_dir= 'e';
+ sad->gesture_dir = 'e';
else if (deltay < -ABS(deltax))
- sad->gesture_dir= 's';
+ sad->gesture_dir = 's';
else
- sad->gesture_dir= 'w';
+ sad->gesture_dir = 'w';
/* gesture is large enough? */
if (ABS(deltax) > mindelta || ABS(deltay) > mindelta) {
/* second area, for join */
- sad->sa2= screen_areahascursor(CTX_wm_screen(C), event->x, event->y);
+ sad->sa2 = screen_areahascursor(CTX_wm_screen(C), event->x, event->y);
/* apply sends event */
actionzone_apply(C, op, sad->az->type);
actionzone_exit(op);
@@ -688,16 +688,16 @@ typedef struct sAreaSwapData {
static int area_swap_init(wmOperator *op, wmEvent *event)
{
- sAreaSwapData *sd= NULL;
- sActionzoneData *sad= event->customdata;
+ sAreaSwapData *sd = NULL;
+ sActionzoneData *sad = event->customdata;
- if (sad==NULL || sad->sa1==NULL)
+ if (sad == NULL || sad->sa1 == NULL)
return 0;
- sd= MEM_callocN(sizeof(sAreaSwapData), "sAreaSwapData");
- sd->sa1= sad->sa1;
- sd->sa2= sad->sa2;
- op->customdata= sd;
+ sd = MEM_callocN(sizeof(sAreaSwapData), "sAreaSwapData");
+ sd->sa1 = sad->sa1;
+ sd->sa2 = sad->sa2;
+ op->customdata = sd;
return 1;
}
@@ -708,7 +708,7 @@ static void area_swap_exit(bContext *C, wmOperator *op)
WM_cursor_restore(CTX_wm_window(C));
if (op->customdata)
MEM_freeN(op->customdata);
- op->customdata= NULL;
+ op->customdata = NULL;
}
static int area_swap_cancel(bContext *C, wmOperator *op)
@@ -733,15 +733,15 @@ static int area_swap_invoke(bContext *C, wmOperator *op, wmEvent *event)
static int area_swap_modal(bContext *C, wmOperator *op, wmEvent *event)
{
- sActionzoneData *sad= op->customdata;
+ sActionzoneData *sad = op->customdata;
- switch(event->type) {
+ switch (event->type) {
case MOUSEMOVE:
/* second area, for join */
- sad->sa2= screen_areahascursor(CTX_wm_screen(C), event->x, event->y);
+ sad->sa2 = screen_areahascursor(CTX_wm_screen(C), event->x, event->y);
break;
case LEFTMOUSE: /* release LMB */
- if (event->val==KM_RELEASE) {
+ if (event->val == KM_RELEASE) {
if (!sad->sa2 || sad->sa1 == sad->sa2) {
return area_swap_cancel(C, op);
@@ -754,7 +754,7 @@ static int area_swap_modal(bContext *C, wmOperator *op, wmEvent *event)
area_swap_exit(C, op);
- WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_SCREEN | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
@@ -790,35 +790,35 @@ static int area_dupli_invoke(bContext *C, wmOperator *op, wmEvent *event)
ScrArea *sa;
rcti rect;
- win= CTX_wm_window(C);
- sc= CTX_wm_screen(C);
- sa= CTX_wm_area(C);
+ win = CTX_wm_window(C);
+ sc = CTX_wm_screen(C);
+ sa = CTX_wm_area(C);
/* XXX hrmf! */
- if (event->type==EVT_ACTIONZONE_AREA) {
- sActionzoneData *sad= event->customdata;
+ if (event->type == EVT_ACTIONZONE_AREA) {
+ sActionzoneData *sad = event->customdata;
- if (sad==NULL)
+ if (sad == NULL)
return OPERATOR_PASS_THROUGH;
- sa= sad->sa1;
+ sa = sad->sa1;
}
/* poll() checks area context, but we don't accept full-area windows */
if (sc->full != SCREENNORMAL) {
- if (event->type==EVT_ACTIONZONE_AREA)
+ if (event->type == EVT_ACTIONZONE_AREA)
actionzone_exit(op);
return OPERATOR_CANCELLED;
}
/* adds window to WM */
- rect= sa->totrct;
+ rect = sa->totrct;
BLI_translate_rcti(&rect, win->posx, win->posy);
- newwin= WM_window_open(C, &rect);
+ newwin = WM_window_open(C, &rect);
/* allocs new screen and adds to newly created window, using window size */
- newsc= ED_screen_add(newwin, CTX_data_scene(C), sc->id.name+2);
- newwin->screen= newsc;
+ newsc = ED_screen_add(newwin, CTX_data_scene(C), sc->id.name + 2);
+ newwin->screen = newsc;
/* copy area to new screen */
area_copy_data((ScrArea *)newsc->areabase.first, sa, 0);
@@ -826,9 +826,9 @@ static int area_dupli_invoke(bContext *C, wmOperator *op, wmEvent *event)
ED_area_tag_redraw((ScrArea *)newsc->areabase.first);
/* screen, areas init */
- WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_SCREEN | NA_EDITED, NULL);
- if (event->type==EVT_ACTIONZONE_AREA)
+ if (event->type == EVT_ACTIONZONE_AREA)
actionzone_exit(op);
return OPERATOR_FINISHED;
@@ -848,7 +848,7 @@ static void SCREEN_OT_area_dupli(wmOperatorType *ot)
/* ************** move area edge operator *********************************** */
/* operator state vars used:
- * x, y mouse coord near edge
+ * x, y mouse coord near edge
* delta movement of edge
*
* functions:
@@ -884,56 +884,56 @@ typedef struct sAreaMoveData {
static void area_move_set_limits(bScreen *sc, int dir, int *bigger, int *smaller)
{
ScrArea *sa;
- int areaminy= ED_area_headersize()+1;
+ int areaminy = ED_area_headersize() + 1;
/* we check all areas and test for free space with MINSIZE */
- *bigger= *smaller= 100000;
+ *bigger = *smaller = 100000;
- for (sa= sc->areabase.first; sa; sa= sa->next) {
- if (dir=='h') {
- int y1= sa->v2->vec.y - sa->v1->vec.y-areaminy;
+ for (sa = sc->areabase.first; sa; sa = sa->next) {
+ if (dir == 'h') {
+ int y1 = sa->v2->vec.y - sa->v1->vec.y - areaminy;
/* if top or down edge selected, test height */
if (sa->v1->flag && sa->v4->flag)
- *bigger= MIN2(*bigger, y1);
+ *bigger = MIN2(*bigger, y1);
else if (sa->v2->flag && sa->v3->flag)
- *smaller= MIN2(*smaller, y1);
+ *smaller = MIN2(*smaller, y1);
}
else {
- int x1= sa->v4->vec.x - sa->v1->vec.x-AREAMINX;
+ int x1 = sa->v4->vec.x - sa->v1->vec.x - AREAMINX;
/* if left or right edge selected, test width */
if (sa->v1->flag && sa->v2->flag)
- *bigger= MIN2(*bigger, x1);
+ *bigger = MIN2(*bigger, x1);
else if (sa->v3->flag && sa->v4->flag)
- *smaller= MIN2(*smaller, x1);
+ *smaller = MIN2(*smaller, x1);
}
}
}
/* validate selection inside screen, set variables OK */
/* return 0: init failed */
-static int area_move_init (bContext *C, wmOperator *op)
+static int area_move_init(bContext *C, wmOperator *op)
{
- bScreen *sc= CTX_wm_screen(C);
+ bScreen *sc = CTX_wm_screen(C);
ScrEdge *actedge;
sAreaMoveData *md;
int x, y;
/* required properties */
- x= RNA_int_get(op->ptr, "x");
- y= RNA_int_get(op->ptr, "y");
+ x = RNA_int_get(op->ptr, "x");
+ y = RNA_int_get(op->ptr, "y");
/* setup */
- actedge= screen_find_active_scredge(sc, x, y);
- if (actedge==NULL) return 0;
+ actedge = screen_find_active_scredge(sc, x, y);
+ if (actedge == NULL) return 0;
- md= MEM_callocN(sizeof(sAreaMoveData), "sAreaMoveData");
- op->customdata= md;
+ md = MEM_callocN(sizeof(sAreaMoveData), "sAreaMoveData");
+ op->customdata = md;
- md->dir= scredge_is_horizontal(actedge)?'h':'v';
- if (md->dir=='h') md->origval= actedge->v1->vec.y;
- else md->origval= actedge->v1->vec.x;
+ md->dir = scredge_is_horizontal(actedge) ? 'h' : 'v';
+ if (md->dir == 'h') md->origval = actedge->v1->vec.y;
+ else md->origval = actedge->v1->vec.x;
select_connected_scredge(sc, actedge);
/* now all vertices with 'flag==1' are the ones that can be moved. */
@@ -946,48 +946,48 @@ static int area_move_init (bContext *C, wmOperator *op)
/* moves selected screen edge amount of delta, used by split & move */
static void area_move_apply_do(bContext *C, int origval, int delta, int dir, int bigger, int smaller)
{
- wmWindow *win= CTX_wm_window(C);
- bScreen *sc= CTX_wm_screen(C);
+ wmWindow *win = CTX_wm_window(C);
+ bScreen *sc = CTX_wm_screen(C);
ScrVert *v1;
ScrArea *sa;
- int areaminy= ED_area_headersize()+1;
+ int areaminy = ED_area_headersize() + 1;
- delta= CLAMPIS(delta, -smaller, bigger);
+ delta = CLAMPIS(delta, -smaller, bigger);
- for (v1= sc->vertbase.first; v1; v1= v1->next) {
+ for (v1 = sc->vertbase.first; v1; v1 = v1->next) {
if (v1->flag) {
/* that way a nice AREAGRID */
- if ((dir=='v') && v1->vec.x>0 && v1->vec.x<win->sizex-1) {
- v1->vec.x= origval + delta;
- if (delta != bigger && delta != -smaller) v1->vec.x-= (v1->vec.x % AREAGRID);
+ if ((dir == 'v') && v1->vec.x > 0 && v1->vec.x < win->sizex - 1) {
+ v1->vec.x = origval + delta;
+ if (delta != bigger && delta != -smaller) v1->vec.x -= (v1->vec.x % AREAGRID);
}
- if ((dir=='h') && v1->vec.y>0 && v1->vec.y<win->sizey-1) {
- v1->vec.y= origval + delta;
+ if ((dir == 'h') && v1->vec.y > 0 && v1->vec.y < win->sizey - 1) {
+ v1->vec.y = origval + delta;
- v1->vec.y+= AREAGRID-1;
- v1->vec.y-= (v1->vec.y % AREAGRID);
+ v1->vec.y += AREAGRID - 1;
+ v1->vec.y -= (v1->vec.y % AREAGRID);
/* prevent too small top header */
- if (v1->vec.y > win->sizey-areaminy)
- v1->vec.y= win->sizey-areaminy;
+ if (v1->vec.y > win->sizey - areaminy)
+ v1->vec.y = win->sizey - areaminy;
}
}
}
- for (sa= sc->areabase.first; sa; sa= sa->next) {
+ for (sa = sc->areabase.first; sa; sa = sa->next) {
if (sa->v1->flag || sa->v2->flag || sa->v3->flag || sa->v4->flag)
ED_area_tag_redraw(sa);
}
- WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL); /* redraw everything */
+ WM_event_add_notifier(C, NC_SCREEN | NA_EDITED, NULL); /* redraw everything */
}
static void area_move_apply(bContext *C, wmOperator *op)
{
- sAreaMoveData *md= op->customdata;
+ sAreaMoveData *md = op->customdata;
int delta;
- delta= RNA_int_get(op->ptr, "delta");
+ delta = RNA_int_get(op->ptr, "delta");
area_move_apply_do(C, md->origval, delta, md->dir, md->bigger, md->smaller);
}
@@ -995,7 +995,7 @@ static void area_move_exit(bContext *C, wmOperator *op)
{
if (op->customdata)
MEM_freeN(op->customdata);
- op->customdata= NULL;
+ op->customdata = NULL;
/* this makes sure aligned edges will result in aligned grabbing */
removedouble_scrverts(CTX_wm_screen(C));
@@ -1041,18 +1041,18 @@ static int area_move_cancel(bContext *C, wmOperator *op)
/* modal callback for while moving edges */
static int area_move_modal(bContext *C, wmOperator *op, wmEvent *event)
{
- sAreaMoveData *md= op->customdata;
+ sAreaMoveData *md = op->customdata;
int delta, x, y;
/* execute the events */
- switch(event->type) {
+ switch (event->type) {
case MOUSEMOVE:
- x= RNA_int_get(op->ptr, "x");
- y= RNA_int_get(op->ptr, "y");
+ x = RNA_int_get(op->ptr, "x");
+ y = RNA_int_get(op->ptr, "y");
- delta= (md->dir == 'v')? event->x - x: event->y - y;
- if (md->step) delta= delta - (delta % md->step);
+ delta = (md->dir == 'v') ? event->x - x : event->y - y;
+ if (md->step) delta = delta - (delta % md->step);
RNA_int_set(op->ptr, "delta", delta);
area_move_apply(C, op);
@@ -1069,10 +1069,10 @@ static int area_move_modal(bContext *C, wmOperator *op, wmEvent *event)
return area_move_cancel(C, op);
case KM_MODAL_STEP10:
- md->step= 10;
+ md->step = 10;
break;
case KM_MODAL_STEP10_OFF:
- md->step= 0;
+ md->step = 0;
break;
}
}
@@ -1109,7 +1109,7 @@ static void SCREEN_OT_area_move(wmOperatorType *ot)
* dir direction 'v' or 'h'
*
* operator customdata:
- * area pointer to (active) area
+ * area pointer to (active) area
* x, y last used mouse pos
* (more, see below)
*
@@ -1137,21 +1137,21 @@ static void SCREEN_OT_area_move(wmOperatorType *ot)
* call exit() or cancel() and remove handler
*/
-#define SPLIT_STARTED 1
-#define SPLIT_PROGRESS 2
+#define SPLIT_STARTED 1
+#define SPLIT_PROGRESS 2
typedef struct sAreaSplitData {
- int x, y; /* last used mouse position */
-
- int origval; /* for move areas */
- int bigger, smaller; /* constraints for moving new edge */
- int delta; /* delta move edge */
- int origmin, origsize; /* to calculate fac, for property storage */
- int previewmode; /* draw previewline, then split */
+ int x, y; /* last used mouse position */
- ScrEdge *nedge; /* new edge */
- ScrArea *sarea; /* start area */
- ScrArea *narea; /* new area */
+ int origval; /* for move areas */
+ int bigger, smaller; /* constraints for moving new edge */
+ int delta; /* delta move edge */
+ int origmin, origsize; /* to calculate fac, for property storage */
+ int previewmode; /* draw previewline, then split */
+
+ ScrEdge *nedge; /* new edge */
+ ScrArea *sarea; /* start area */
+ ScrArea *narea; /* new area */
} sAreaSplitData;
@@ -1161,15 +1161,15 @@ static int area_split_menu_init(bContext *C, wmOperator *op)
sAreaSplitData *sd;
/* custom data */
- sd= (sAreaSplitData*)MEM_callocN(sizeof (sAreaSplitData), "op_area_split");
- op->customdata= sd;
+ sd = (sAreaSplitData *)MEM_callocN(sizeof (sAreaSplitData), "op_area_split");
+ op->customdata = sd;
- sd->sarea= CTX_wm_area(C);
+ sd->sarea = CTX_wm_area(C);
if (sd->sarea) {
- int dir= RNA_enum_get(op->ptr, "direction");
+ int dir = RNA_enum_get(op->ptr, "direction");
- if (dir=='h')
+ if (dir == 'h')
sd->sarea->flag |= AREA_FLAG_DRAWSPLIT_H;
else
sd->sarea->flag |= AREA_FLAG_DRAWSPLIT_V;
@@ -1180,28 +1180,28 @@ static int area_split_menu_init(bContext *C, wmOperator *op)
/* generic init, no UI stuff here, assumes active area */
static int area_split_init(bContext *C, wmOperator *op)
{
- ScrArea *sa= CTX_wm_area(C);
+ ScrArea *sa = CTX_wm_area(C);
sAreaSplitData *sd;
- int areaminy= ED_area_headersize()+1;
+ int areaminy = ED_area_headersize() + 1;
int dir;
/* required context */
- if (sa==NULL) return 0;
+ if (sa == NULL) return 0;
/* required properties */
- dir= RNA_enum_get(op->ptr, "direction");
+ dir = RNA_enum_get(op->ptr, "direction");
/* minimal size */
- if (dir=='v' && sa->winx < 2*AREAMINX) return 0;
- if (dir=='h' && sa->winy < 2*areaminy) return 0;
+ if (dir == 'v' && sa->winx < 2 * AREAMINX) return 0;
+ if (dir == 'h' && sa->winy < 2 * areaminy) return 0;
/* custom data */
- sd= (sAreaSplitData*)MEM_callocN(sizeof (sAreaSplitData), "op_area_split");
- op->customdata= sd;
+ sd = (sAreaSplitData *)MEM_callocN(sizeof (sAreaSplitData), "op_area_split");
+ op->customdata = sd;
- sd->sarea= sa;
- sd->origsize= dir=='v' ? sa->winx:sa->winy;
- sd->origmin = dir=='v' ? sa->totrct.xmin:sa->totrct.ymin;
+ sd->sarea = sa;
+ sd->origsize = dir == 'v' ? sa->winx : sa->winy;
+ sd->origmin = dir == 'v' ? sa->totrct.xmin : sa->totrct.ymin;
return 1;
}
@@ -1210,25 +1210,25 @@ static int area_split_init(bContext *C, wmOperator *op)
/* used with split operator */
static ScrEdge *area_findsharededge(bScreen *screen, ScrArea *sa, ScrArea *sb)
{
- ScrVert *sav1= sa->v1;
- ScrVert *sav2= sa->v2;
- ScrVert *sav3= sa->v3;
- ScrVert *sav4= sa->v4;
- ScrVert *sbv1= sb->v1;
- ScrVert *sbv2= sb->v2;
- ScrVert *sbv3= sb->v3;
- ScrVert *sbv4= sb->v4;
+ ScrVert *sav1 = sa->v1;
+ ScrVert *sav2 = sa->v2;
+ ScrVert *sav3 = sa->v3;
+ ScrVert *sav4 = sa->v4;
+ ScrVert *sbv1 = sb->v1;
+ ScrVert *sbv2 = sb->v2;
+ ScrVert *sbv3 = sb->v3;
+ ScrVert *sbv4 = sb->v4;
- if (sav1==sbv4 && sav2==sbv3) { /* sa to right of sb = W */
+ if (sav1 == sbv4 && sav2 == sbv3) { /* sa to right of sb = W */
return screen_findedge(screen, sav1, sav2);
}
- else if (sav2==sbv1 && sav3==sbv4) { /* sa to bottom of sb = N */
+ else if (sav2 == sbv1 && sav3 == sbv4) { /* sa to bottom of sb = N */
return screen_findedge(screen, sav2, sav3);
}
- else if (sav3==sbv2 && sav4==sbv1) { /* sa to left of sb = E */
+ else if (sav3 == sbv2 && sav4 == sbv1) { /* sa to left of sb = E */
return screen_findedge(screen, sav3, sav4);
}
- else if (sav1==sbv2 && sav4==sbv3) { /* sa on top of sb = S*/
+ else if (sav1 == sbv2 && sav4 == sbv3) { /* sa on top of sb = S*/
return screen_findedge(screen, sav1, sav4);
}
@@ -1239,35 +1239,35 @@ static ScrEdge *area_findsharededge(bScreen *screen, ScrArea *sa, ScrArea *sb)
/* do the split, return success */
static int area_split_apply(bContext *C, wmOperator *op)
{
- bScreen *sc= CTX_wm_screen(C);
- sAreaSplitData *sd= (sAreaSplitData *)op->customdata;
+ bScreen *sc = CTX_wm_screen(C);
+ sAreaSplitData *sd = (sAreaSplitData *)op->customdata;
float fac;
int dir;
- fac= RNA_float_get(op->ptr, "factor");
- dir= RNA_enum_get(op->ptr, "direction");
+ fac = RNA_float_get(op->ptr, "factor");
+ dir = RNA_enum_get(op->ptr, "direction");
- sd->narea= area_split(sc, sd->sarea, dir, fac, 0); /* 0 = no merge */
+ sd->narea = area_split(sc, sd->sarea, dir, fac, 0); /* 0 = no merge */
if (sd->narea) {
ScrVert *sv;
- sd->nedge= area_findsharededge(sc, sd->sarea, sd->narea);
+ sd->nedge = area_findsharededge(sc, sd->sarea, sd->narea);
/* select newly created edge, prepare for moving edge */
- for (sv= sc->vertbase.first; sv; sv= sv->next)
+ for (sv = sc->vertbase.first; sv; sv = sv->next)
sv->flag = 0;
- sd->nedge->v1->flag= 1;
- sd->nedge->v2->flag= 1;
+ sd->nedge->v1->flag = 1;
+ sd->nedge->v2->flag = 1;
- if (dir=='h') sd->origval= sd->nedge->v1->vec.y;
- else sd->origval= sd->nedge->v1->vec.x;
+ if (dir == 'h') sd->origval = sd->nedge->v1->vec.y;
+ else sd->origval = sd->nedge->v1->vec.x;
ED_area_tag_redraw(sd->sarea);
ED_area_tag_redraw(sd->narea);
- WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_SCREEN | NA_EDITED, NULL);
return 1;
}
@@ -1278,19 +1278,19 @@ static int area_split_apply(bContext *C, wmOperator *op)
static void area_split_exit(bContext *C, wmOperator *op)
{
if (op->customdata) {
- sAreaSplitData *sd= (sAreaSplitData *)op->customdata;
+ sAreaSplitData *sd = (sAreaSplitData *)op->customdata;
if (sd->sarea) ED_area_tag_redraw(sd->sarea);
if (sd->narea) ED_area_tag_redraw(sd->narea);
if (sd->sarea)
- sd->sarea->flag &= ~(AREA_FLAG_DRAWSPLIT_H|AREA_FLAG_DRAWSPLIT_V);
+ sd->sarea->flag &= ~(AREA_FLAG_DRAWSPLIT_H | AREA_FLAG_DRAWSPLIT_V);
MEM_freeN(op->customdata);
op->customdata = NULL;
}
WM_cursor_restore(CTX_wm_window(C));
- WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_SCREEN | NA_EDITED, NULL);
/* this makes sure aligned edges will result in aligned grabbing */
removedouble_scrverts(CTX_wm_screen(C));
@@ -1308,28 +1308,28 @@ static int area_split_invoke(bContext *C, wmOperator *op, wmEvent *event)
if (CTX_wm_screen(C)->full != SCREENNORMAL)
return OPERATOR_CANCELLED;
- if (event->type==EVT_ACTIONZONE_AREA) {
- sActionzoneData *sad= event->customdata;
+ if (event->type == EVT_ACTIONZONE_AREA) {
+ sActionzoneData *sad = event->customdata;
- if (sad->modifier>0) {
+ if (sad->modifier > 0) {
return OPERATOR_PASS_THROUGH;
}
/* verify *sad itself */
- if (sad==NULL || sad->sa1==NULL || sad->az==NULL)
+ if (sad == NULL || sad->sa1 == NULL || sad->az == NULL)
return OPERATOR_PASS_THROUGH;
/* is this our *sad? if areas not equal it should be passed on */
- if (CTX_wm_area(C)!=sad->sa1 || sad->sa1!=sad->sa2)
+ if (CTX_wm_area(C) != sad->sa1 || sad->sa1 != sad->sa2)
return OPERATOR_PASS_THROUGH;
/* prepare operator state vars */
- if (sad->gesture_dir=='n' || sad->gesture_dir=='s') {
- dir= 'h';
+ if (sad->gesture_dir == 'n' || sad->gesture_dir == 's') {
+ dir = 'h';
RNA_float_set(op->ptr, "factor", ((float)(event->x - sad->sa1->v1->vec.x)) / (float)sad->sa1->winx);
}
else {
- dir= 'v';
+ dir = 'v';
RNA_float_set(op->ptr, "factor", ((float)(event->y - sad->sa1->v1->vec.y)) / (float)sad->sa1->winy);
}
RNA_enum_set(op->ptr, "direction", dir);
@@ -1345,20 +1345,20 @@ static int area_split_invoke(bContext *C, wmOperator *op, wmEvent *event)
/* retrieve initial mouse coord, so we can find the active edge */
if (RNA_struct_property_is_set(op->ptr, "mouse_x"))
- x= RNA_int_get(op->ptr, "mouse_x");
+ x = RNA_int_get(op->ptr, "mouse_x");
else
- x= event->x;
+ x = event->x;
if (RNA_struct_property_is_set(op->ptr, "mouse_y"))
- y= RNA_int_get(op->ptr, "mouse_y");
+ y = RNA_int_get(op->ptr, "mouse_y");
else
- y= event->x;
+ y = event->x;
- actedge= screen_find_active_scredge(CTX_wm_screen(C), x, y);
- if (actedge==NULL)
+ actedge = screen_find_active_scredge(CTX_wm_screen(C), x, y);
+ if (actedge == NULL)
return OPERATOR_CANCELLED;
- dir= scredge_is_horizontal(actedge)?'v':'h';
+ dir = scredge_is_horizontal(actedge) ? 'v' : 'h';
RNA_enum_set(op->ptr, "direction", dir);
@@ -1368,12 +1368,12 @@ static int area_split_invoke(bContext *C, wmOperator *op, wmEvent *event)
}
- sd= (sAreaSplitData *)op->customdata;
+ sd = (sAreaSplitData *)op->customdata;
- sd->x= event->x;
- sd->y= event->y;
+ sd->x = event->x;
+ sd->y = event->y;
- if (event->type==EVT_ACTIONZONE_AREA) {
+ if (event->type == EVT_ACTIONZONE_AREA) {
/* do the split */
if (area_split_apply(C, op)) {
@@ -1386,7 +1386,7 @@ static int area_split_invoke(bContext *C, wmOperator *op, wmEvent *event)
}
}
else {
- sd->previewmode= 1;
+ sd->previewmode = 1;
/* add temp handler for edge move or cancel */
WM_event_add_modal_handler(C, op);
@@ -1413,7 +1413,7 @@ static int area_split_exec(bContext *C, wmOperator *op)
static int area_split_cancel(bContext *C, wmOperator *op)
{
- sAreaSplitData *sd= (sAreaSplitData *)op->customdata;
+ sAreaSplitData *sd = (sAreaSplitData *)op->customdata;
if (sd->previewmode) {
}
@@ -1433,44 +1433,44 @@ static int area_split_cancel(bContext *C, wmOperator *op)
static int area_split_modal(bContext *C, wmOperator *op, wmEvent *event)
{
- sAreaSplitData *sd= (sAreaSplitData *)op->customdata;
+ sAreaSplitData *sd = (sAreaSplitData *)op->customdata;
float fac;
int dir;
/* execute the events */
- switch(event->type) {
+ switch (event->type) {
case MOUSEMOVE:
- dir= RNA_enum_get(op->ptr, "direction");
+ dir = RNA_enum_get(op->ptr, "direction");
- sd->delta= (dir == 'v')? event->x - sd->origval: event->y - sd->origval;
- if (sd->previewmode==0)
+ sd->delta = (dir == 'v') ? event->x - sd->origval : event->y - sd->origval;
+ if (sd->previewmode == 0)
area_move_apply_do(C, sd->origval, sd->delta, dir, sd->bigger, sd->smaller);
else {
if (sd->sarea) {
- sd->sarea->flag &= ~(AREA_FLAG_DRAWSPLIT_H|AREA_FLAG_DRAWSPLIT_V);
+ sd->sarea->flag &= ~(AREA_FLAG_DRAWSPLIT_H | AREA_FLAG_DRAWSPLIT_V);
ED_area_tag_redraw(sd->sarea);
}
- sd->sarea= screen_areahascursor(CTX_wm_screen(C), event->x, event->y); /* area context not set */
+ sd->sarea = screen_areahascursor(CTX_wm_screen(C), event->x, event->y); /* area context not set */
if (sd->sarea) {
ED_area_tag_redraw(sd->sarea);
- if (dir=='v') {
- sd->origsize= sd->sarea->winx;
- sd->origmin= sd->sarea->totrct.xmin;
+ if (dir == 'v') {
+ sd->origsize = sd->sarea->winx;
+ sd->origmin = sd->sarea->totrct.xmin;
sd->sarea->flag |= AREA_FLAG_DRAWSPLIT_V;
}
else {
- sd->origsize= sd->sarea->winy;
- sd->origmin= sd->sarea->totrct.ymin;
+ sd->origsize = sd->sarea->winy;
+ sd->origmin = sd->sarea->totrct.ymin;
sd->sarea->flag |= AREA_FLAG_DRAWSPLIT_H;
}
}
- CTX_wm_window(C)->screen->do_draw= 1;
+ CTX_wm_window(C)->screen->do_draw = 1;
}
- fac= (dir == 'v') ? event->x-sd->origmin : event->y-sd->origmin;
+ fac = (dir == 'v') ? event->x - sd->origmin : event->y - sd->origmin;
RNA_float_set(op->ptr, "factor", fac / (float)sd->origsize);
break;
@@ -1482,7 +1482,7 @@ static int area_split_modal(bContext *C, wmOperator *op, wmEvent *event)
return OPERATOR_FINISHED;
}
else {
- if (event->val==KM_RELEASE) { /* mouse up */
+ if (event->val == KM_RELEASE) { /* mouse up */
area_split_exit(C, op);
return OPERATOR_FINISHED;
}
@@ -1491,27 +1491,27 @@ static int area_split_modal(bContext *C, wmOperator *op, wmEvent *event)
case MIDDLEMOUSE:
case TABKEY:
- if (sd->previewmode==0) {
+ if (sd->previewmode == 0) {
}
else {
dir = RNA_enum_get(op->ptr, "direction");
- if (event->val==KM_PRESS) {
+ if (event->val == KM_PRESS) {
if (sd->sarea) {
- sd->sarea->flag &= ~(AREA_FLAG_DRAWSPLIT_H|AREA_FLAG_DRAWSPLIT_V);
+ sd->sarea->flag &= ~(AREA_FLAG_DRAWSPLIT_H | AREA_FLAG_DRAWSPLIT_V);
ED_area_tag_redraw(sd->sarea);
- if (dir=='v') {
+ if (dir == 'v') {
RNA_enum_set(op->ptr, "direction", 'h');
sd->sarea->flag |= AREA_FLAG_DRAWSPLIT_H;
- WM_cursor_set(CTX_wm_window(C),CURSOR_X_MOVE);
+ WM_cursor_set(CTX_wm_window(C), CURSOR_X_MOVE);
}
else {
RNA_enum_set(op->ptr, "direction", 'v');
sd->sarea->flag |= AREA_FLAG_DRAWSPLIT_V;
- WM_cursor_set(CTX_wm_window(C),CURSOR_Y_MOVE);
+ WM_cursor_set(CTX_wm_window(C), CURSOR_Y_MOVE);
}
}
}
@@ -1528,9 +1528,10 @@ static int area_split_modal(bContext *C, wmOperator *op, wmEvent *event)
}
static EnumPropertyItem prop_direction_items[] = {
-{'h', "HORIZONTAL", 0, "Horizontal", ""},
-{'v', "VERTICAL", 0, "Vertical", ""},
-{0, NULL, 0, NULL, NULL}};
+ {'h', "HORIZONTAL", 0, "Horizontal", ""},
+ {'v', "VERTICAL", 0, "Vertical", ""},
+ {0, NULL, 0, NULL, NULL}
+};
static void SCREEN_OT_area_split(wmOperatorType *ot)
{
@@ -1574,16 +1575,16 @@ static int area_max_regionsize(ScrArea *sa, ARegion *scalear, AZEdge edge)
ARegion *ar;
int dist;
- if (edge==AE_RIGHT_TO_TOPLEFT || edge==AE_LEFT_TO_TOPRIGHT) {
+ if (edge == AE_RIGHT_TO_TOPLEFT || edge == AE_LEFT_TO_TOPRIGHT) {
dist = sa->totrct.xmax - sa->totrct.xmin;
}
- else { /* AE_BOTTOM_TO_TOPLEFT, AE_TOP_TO_BOTTOMRIGHT */
+ else { /* AE_BOTTOM_TO_TOPLEFT, AE_TOP_TO_BOTTOMRIGHT */
dist = sa->totrct.ymax - sa->totrct.ymin;
}
/* subtractwidth of regions on opposite side
* prevents dragging regions into other opposite regions */
- for (ar=sa->regionbase.first; ar; ar=ar->next) {
+ for (ar = sa->regionbase.first; ar; ar = ar->next) {
if (ar == scalear)
continue;
@@ -1609,10 +1610,10 @@ static int area_max_regionsize(ScrArea *sa, ARegion *scalear, AZEdge edge)
static int region_scale_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- sActionzoneData *sad= event->customdata;
+ sActionzoneData *sad = event->customdata;
AZone *az;
- if (event->type!=EVT_ACTIONZONE_REGION) {
+ if (event->type != EVT_ACTIONZONE_REGION) {
BKE_report(op->reports, RPT_ERROR, "Can only scale region size from an action zone");
return OPERATOR_CANCELLED;
}
@@ -1620,31 +1621,31 @@ static int region_scale_invoke(bContext *C, wmOperator *op, wmEvent *event)
az = sad->az;
if (az->ar) {
- RegionMoveData *rmd= MEM_callocN(sizeof(RegionMoveData), "RegionMoveData");
+ RegionMoveData *rmd = MEM_callocN(sizeof(RegionMoveData), "RegionMoveData");
int maxsize;
- op->customdata= rmd;
+ op->customdata = rmd;
rmd->az = az;
- rmd->ar= az->ar;
+ rmd->ar = az->ar;
rmd->sa = sad->sa1;
- rmd->edge= az->edge;
- rmd->origx= event->x;
- rmd->origy= event->y;
+ rmd->edge = az->edge;
+ rmd->origx = event->x;
+ rmd->origy = event->y;
rmd->maxsize = area_max_regionsize(rmd->sa, rmd->ar, rmd->edge);
/* if not set we do now, otherwise it uses type */
- if (rmd->ar->sizex==0)
- rmd->ar->sizex= rmd->ar->type->prefsizex;
- if (rmd->ar->sizey==0)
- rmd->ar->sizey= rmd->ar->type->prefsizey;
+ if (rmd->ar->sizex == 0)
+ rmd->ar->sizex = rmd->ar->type->prefsizex;
+ if (rmd->ar->sizey == 0)
+ rmd->ar->sizey = rmd->ar->type->prefsizey;
/* now copy to regionmovedata */
- if (rmd->edge==AE_LEFT_TO_TOPRIGHT || rmd->edge==AE_RIGHT_TO_TOPLEFT) {
- rmd->origval= rmd->ar->sizex;
+ if (rmd->edge == AE_LEFT_TO_TOPRIGHT || rmd->edge == AE_RIGHT_TO_TOPLEFT) {
+ rmd->origval = rmd->ar->sizex;
}
else {
- rmd->origval= rmd->ar->sizey;
+ rmd->origval = rmd->ar->sizey;
}
/* limit headers to standard height for now */
@@ -1666,16 +1667,16 @@ static int region_scale_invoke(bContext *C, wmOperator *op, wmEvent *event)
static int region_scale_get_maxsize(RegionMoveData *rmd)
{
- int maxsize= 0;
+ int maxsize = 0;
- if (rmd->edge==AE_LEFT_TO_TOPRIGHT || rmd->edge==AE_RIGHT_TO_TOPLEFT) {
+ if (rmd->edge == AE_LEFT_TO_TOPRIGHT || rmd->edge == AE_RIGHT_TO_TOPLEFT) {
return rmd->sa->winx - UI_UNIT_X;
}
if (rmd->ar->regiontype == RGN_TYPE_TOOL_PROPS) {
/* this calculation seems overly verbose
* can someone explain why this method is necessary? - campbell */
- maxsize = rmd->maxsize - ((rmd->sa->headertype==HEADERTOP)?UI_UNIT_Y*2:UI_UNIT_Y) - (UI_UNIT_Y/4);
+ maxsize = rmd->maxsize - ((rmd->sa->headertype == HEADERTOP) ? UI_UNIT_Y * 2 : UI_UNIT_Y) - (UI_UNIT_Y / 4);
}
return maxsize;
@@ -1683,19 +1684,19 @@ static int region_scale_get_maxsize(RegionMoveData *rmd)
static void region_scale_validate_size(RegionMoveData *rmd)
{
- if ((rmd->ar->flag & RGN_FLAG_HIDDEN)==0) {
- short *size, maxsize= -1;
+ if ((rmd->ar->flag & RGN_FLAG_HIDDEN) == 0) {
+ short *size, maxsize = -1;
- if (rmd->edge==AE_LEFT_TO_TOPRIGHT || rmd->edge==AE_RIGHT_TO_TOPLEFT)
- size= &rmd->ar->sizex;
+ if (rmd->edge == AE_LEFT_TO_TOPRIGHT || rmd->edge == AE_RIGHT_TO_TOPLEFT)
+ size = &rmd->ar->sizex;
else
- size= &rmd->ar->sizey;
+ size = &rmd->ar->sizey;
- maxsize= region_scale_get_maxsize(rmd);
+ maxsize = region_scale_get_maxsize(rmd);
if (*size > maxsize && maxsize > 0)
- *size= maxsize;
+ *size = maxsize;
}
}
@@ -1707,22 +1708,22 @@ static void region_scale_toggle_hidden(bContext *C, RegionMoveData *rmd)
static int region_scale_modal(bContext *C, wmOperator *op, wmEvent *event)
{
- RegionMoveData *rmd= op->customdata;
+ RegionMoveData *rmd = op->customdata;
int delta;
/* execute the events */
- switch(event->type) {
+ switch (event->type) {
case MOUSEMOVE:
- if (rmd->edge==AE_LEFT_TO_TOPRIGHT || rmd->edge==AE_RIGHT_TO_TOPLEFT) {
- delta= event->x - rmd->origx;
- if (rmd->edge==AE_LEFT_TO_TOPRIGHT) delta= -delta;
+ if (rmd->edge == AE_LEFT_TO_TOPRIGHT || rmd->edge == AE_RIGHT_TO_TOPLEFT) {
+ delta = event->x - rmd->origx;
+ if (rmd->edge == AE_LEFT_TO_TOPRIGHT) delta = -delta;
- rmd->ar->sizex= rmd->origval + delta;
+ rmd->ar->sizex = rmd->origval + delta;
CLAMP(rmd->ar->sizex, 0, rmd->maxsize);
if (rmd->ar->sizex < UI_UNIT_X) {
- rmd->ar->sizex= rmd->origval;
+ rmd->ar->sizex = rmd->origval;
if (!(rmd->ar->flag & RGN_FLAG_HIDDEN))
region_scale_toggle_hidden(C, rmd);
}
@@ -1730,33 +1731,33 @@ static int region_scale_modal(bContext *C, wmOperator *op, wmEvent *event)
region_scale_toggle_hidden(C, rmd);
}
else {
- int maxsize= region_scale_get_maxsize(rmd);
- delta= event->y - rmd->origy;
- if (rmd->edge==AE_BOTTOM_TO_TOPLEFT) delta= -delta;
+ int maxsize = region_scale_get_maxsize(rmd);
+ delta = event->y - rmd->origy;
+ if (rmd->edge == AE_BOTTOM_TO_TOPLEFT) delta = -delta;
- rmd->ar->sizey= rmd->origval + delta;
+ rmd->ar->sizey = rmd->origval + delta;
CLAMP(rmd->ar->sizey, 0, rmd->maxsize);
/* note, 'UI_UNIT_Y/4' means you need to drag the header almost
* all the way down for it to become hidden, this is done
* otherwise its too easy to do this by accident */
- if (rmd->ar->sizey < UI_UNIT_Y/4) {
- rmd->ar->sizey= rmd->origval;
+ if (rmd->ar->sizey < UI_UNIT_Y / 4) {
+ rmd->ar->sizey = rmd->origval;
if (!(rmd->ar->flag & RGN_FLAG_HIDDEN))
region_scale_toggle_hidden(C, rmd);
}
else if (maxsize > 0 && (rmd->ar->sizey > maxsize))
- rmd->ar->sizey= maxsize;
+ rmd->ar->sizey = maxsize;
else if (rmd->ar->flag & RGN_FLAG_HIDDEN)
region_scale_toggle_hidden(C, rmd);
}
ED_area_tag_redraw(rmd->sa);
- WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_SCREEN | NA_EDITED, NULL);
break;
case LEFTMOUSE:
- if (event->val==KM_RELEASE) {
+ if (event->val == KM_RELEASE) {
if (ABS(event->x - rmd->origx) < 2 && ABS(event->y - rmd->origy) < 2) {
if (rmd->ar->flag & RGN_FLAG_HIDDEN) {
@@ -1767,7 +1768,7 @@ static int region_scale_modal(bContext *C, wmOperator *op, wmEvent *event)
}
ED_area_tag_redraw(rmd->sa);
- WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_SCREEN | NA_EDITED, NULL);
}
MEM_freeN(op->customdata);
op->customdata = NULL;
@@ -1813,8 +1814,8 @@ static void SCREEN_OT_region_scale(wmOperatorType *ot)
/* function to be called outside UI context, or for redo */
static int frame_offset_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
int delta;
delta = RNA_int_get(op->ptr, "delta");
@@ -1825,7 +1826,7 @@ static int frame_offset_exec(bContext *C, wmOperator *op)
sound_seek_scene(bmain, scene);
- WM_event_add_notifier(C, NC_SCENE|ND_FRAME, CTX_data_scene(C));
+ WM_event_add_notifier(C, NC_SCENE | ND_FRAME, CTX_data_scene(C));
return OPERATOR_FINISHED;
}
@@ -1834,6 +1835,7 @@ static void SCREEN_OT_frame_offset(wmOperatorType *ot)
{
ot->name = "Frame Offset";
ot->idname = "SCREEN_OT_frame_offset";
+ ot->description = "Move current frame forward/backward by a given number";
ot->exec = frame_offset_exec;
@@ -1848,9 +1850,9 @@ static void SCREEN_OT_frame_offset(wmOperatorType *ot)
/* function to be called outside UI context, or for redo */
static int frame_jump_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- wmTimer *animtimer= CTX_wm_screen(C)->animtimer;
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ wmTimer *animtimer = CTX_wm_screen(C)->animtimer;
/* Don't change CFRA directly if animtimer is running as this can cause
* first/last frame not to be actually shown (bad since for example physics
@@ -1862,19 +1864,19 @@ static int frame_jump_exec(bContext *C, wmOperator *op)
sad->flag |= ANIMPLAY_FLAG_USE_NEXT_FRAME;
if (RNA_boolean_get(op->ptr, "end"))
- sad->nextfra= PEFRA;
+ sad->nextfra = PEFRA;
else
- sad->nextfra= PSFRA;
+ sad->nextfra = PSFRA;
}
else {
if (RNA_boolean_get(op->ptr, "end"))
- CFRA= PEFRA;
+ CFRA = PEFRA;
else
- CFRA= PSFRA;
+ CFRA = PSFRA;
sound_seek_scene(bmain, scene);
- WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene);
}
return OPERATOR_FINISHED;
@@ -1901,21 +1903,21 @@ static void SCREEN_OT_frame_jump(wmOperatorType *ot)
/* function to be called outside UI context, or for redo */
static int keyframe_jump_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- Object *ob= CTX_data_active_object(C);
- bDopeSheet ads= {NULL};
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = CTX_data_active_object(C);
+ bDopeSheet ads = {NULL};
DLRBT_Tree keys;
ActKeyColumn *ak;
float cfra;
- short next= RNA_boolean_get(op->ptr, "next");
+ short next = RNA_boolean_get(op->ptr, "next");
short done = 0;
/* sanity checks */
if (scene == NULL)
return OPERATOR_CANCELLED;
- cfra= (float)(CFRA);
+ cfra = (float)(CFRA);
/* init binarytree-list for getting keyframes */
BLI_dlrbTree_init(&keys);
@@ -1932,14 +1934,14 @@ static int keyframe_jump_exec(bContext *C, wmOperator *op)
/* find matching keyframe in the right direction */
do {
if (next)
- ak= (ActKeyColumn *)BLI_dlrbTree_search_next(&keys, compare_ak_cfraPtr, &cfra);
+ ak = (ActKeyColumn *)BLI_dlrbTree_search_next(&keys, compare_ak_cfraPtr, &cfra);
else
- ak= (ActKeyColumn *)BLI_dlrbTree_search_prev(&keys, compare_ak_cfraPtr, &cfra);
+ ak = (ActKeyColumn *)BLI_dlrbTree_search_prev(&keys, compare_ak_cfraPtr, &cfra);
if (ak) {
if (CFRA != (int)ak->cfra) {
/* this changes the frame, so set the frame and we're done */
- CFRA= (int)ak->cfra;
+ CFRA = (int)ak->cfra;
done = 1;
}
else {
@@ -1958,7 +1960,7 @@ static int keyframe_jump_exec(bContext *C, wmOperator *op)
sound_seek_scene(bmain, scene);
- WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene);
return OPERATOR_FINISHED;
}
@@ -1984,35 +1986,35 @@ static void SCREEN_OT_keyframe_jump(wmOperatorType *ot)
/* function to be called outside UI context, or for redo */
static int screen_set_exec(bContext *C, wmOperator *op)
{
- bScreen *screen= CTX_wm_screen(C);
- bScreen *screen_prev= screen;
+ bScreen *screen = CTX_wm_screen(C);
+ bScreen *screen_prev = screen;
- ScrArea *sa= CTX_wm_area(C);
- int tot= BLI_countlist(&CTX_data_main(C)->screen);
- int delta= RNA_int_get(op->ptr, "delta");
+ ScrArea *sa = CTX_wm_area(C);
+ int tot = BLI_countlist(&CTX_data_main(C)->screen);
+ int delta = RNA_int_get(op->ptr, "delta");
/* temp screens are for userpref or render display */
if (screen->temp)
return OPERATOR_CANCELLED;
- if (delta==1) {
+ if (delta == 1) {
while (tot--) {
- screen= screen->id.next;
- if (screen==NULL) screen= CTX_data_main(C)->screen.first;
- if (screen->winid==0 && screen->full==0 && screen != screen_prev)
+ screen = screen->id.next;
+ if (screen == NULL) screen = CTX_data_main(C)->screen.first;
+ if (screen->winid == 0 && screen->full == 0 && screen != screen_prev)
break;
}
}
- else if (delta== -1) {
+ else if (delta == -1) {
while (tot--) {
- screen= screen->id.prev;
- if (screen==NULL) screen= CTX_data_main(C)->screen.last;
- if (screen->winid==0 && screen->full==0 && screen != screen_prev)
+ screen = screen->id.prev;
+ if (screen == NULL) screen = CTX_data_main(C)->screen.last;
+ if (screen->winid == 0 && screen->full == 0 && screen != screen_prev)
break;
}
}
else {
- screen= NULL;
+ screen = NULL;
}
if (screen && screen_prev != screen) {
@@ -2047,15 +2049,15 @@ static void SCREEN_OT_screen_set(wmOperatorType *ot)
static int screen_full_area_exec(bContext *C, wmOperator *UNUSED(op))
{
bScreen *screen = CTX_wm_screen(C);
- ScrArea *sa=NULL;
+ ScrArea *sa = NULL;
/* search current screen for 'fullscreen' areas */
/* prevents restoring info header, when mouse is over it */
- for (sa=screen->areabase.first; sa; sa=sa->next) {
+ for (sa = screen->areabase.first; sa; sa = sa->next) {
if (sa->full) break;
}
- if (sa==NULL) sa= CTX_wm_area(C);
+ if (sa == NULL) sa = CTX_wm_area(C);
ED_screen_full_toggle(C, CTX_wm_window(C), sa);
return OPERATOR_FINISHED;
@@ -2104,11 +2106,10 @@ static void SCREEN_OT_screen_full_area(wmOperatorType *ot)
* call exit() and remove handler when LMB confirm
*/
-typedef struct sAreaJoinData
-{
- ScrArea *sa1; /* first area to be considered */
- ScrArea *sa2; /* second area to be considered */
- ScrArea *scr; /* designed for removal */
+typedef struct sAreaJoinData {
+ ScrArea *sa1; /* first area to be considered */
+ ScrArea *sa2; /* second area to be considered */
+ ScrArea *scr; /* designed for removal */
} sAreaJoinData;
@@ -2119,40 +2120,40 @@ typedef struct sAreaJoinData
static int area_join_init(bContext *C, wmOperator *op)
{
ScrArea *sa1, *sa2;
- sAreaJoinData* jd= NULL;
+ sAreaJoinData *jd = NULL;
int x1, y1;
int x2, y2;
- int shared= 0;
+ int shared = 0;
/* required properties, make negative to get return 0 if not set by caller */
- x1= RNA_int_get(op->ptr, "min_x");
- y1= RNA_int_get(op->ptr, "min_y");
- x2= RNA_int_get(op->ptr, "max_x");
- y2= RNA_int_get(op->ptr, "max_y");
+ x1 = RNA_int_get(op->ptr, "min_x");
+ y1 = RNA_int_get(op->ptr, "min_y");
+ x2 = RNA_int_get(op->ptr, "max_x");
+ y2 = RNA_int_get(op->ptr, "max_y");
sa1 = screen_areahascursor(CTX_wm_screen(C), x1, y1);
sa2 = screen_areahascursor(CTX_wm_screen(C), x2, y2);
- if (sa1==NULL || sa2==NULL || sa1==sa2)
+ if (sa1 == NULL || sa2 == NULL || sa1 == sa2)
return 0;
/* do areas share an edge? */
- if (sa1->v1==sa2->v1 || sa1->v1==sa2->v2 || sa1->v1==sa2->v3 || sa1->v1==sa2->v4) shared++;
- if (sa1->v2==sa2->v1 || sa1->v2==sa2->v2 || sa1->v2==sa2->v3 || sa1->v2==sa2->v4) shared++;
- if (sa1->v3==sa2->v1 || sa1->v3==sa2->v2 || sa1->v3==sa2->v3 || sa1->v3==sa2->v4) shared++;
- if (sa1->v4==sa2->v1 || sa1->v4==sa2->v2 || sa1->v4==sa2->v3 || sa1->v4==sa2->v4) shared++;
- if (shared!=2) {
+ if (sa1->v1 == sa2->v1 || sa1->v1 == sa2->v2 || sa1->v1 == sa2->v3 || sa1->v1 == sa2->v4) shared++;
+ if (sa1->v2 == sa2->v1 || sa1->v2 == sa2->v2 || sa1->v2 == sa2->v3 || sa1->v2 == sa2->v4) shared++;
+ if (sa1->v3 == sa2->v1 || sa1->v3 == sa2->v2 || sa1->v3 == sa2->v3 || sa1->v3 == sa2->v4) shared++;
+ if (sa1->v4 == sa2->v1 || sa1->v4 == sa2->v2 || sa1->v4 == sa2->v3 || sa1->v4 == sa2->v4) shared++;
+ if (shared != 2) {
printf("areas don't share edge\n");
return 0;
}
- jd = (sAreaJoinData*)MEM_callocN(sizeof (sAreaJoinData), "op_area_join");
+ jd = (sAreaJoinData *)MEM_callocN(sizeof (sAreaJoinData), "op_area_join");
jd->sa1 = sa1;
jd->sa1->flag |= AREA_FLAG_DRAWJOINFROM;
jd->sa2 = sa2;
jd->sa2->flag |= AREA_FLAG_DRAWJOINTO;
- op->customdata= jd;
+ op->customdata = jd;
return 1;
}
@@ -2203,19 +2204,19 @@ static int area_join_exec(bContext *C, wmOperator *op)
static int area_join_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- if (event->type==EVT_ACTIONZONE_AREA) {
- sActionzoneData *sad= event->customdata;
+ if (event->type == EVT_ACTIONZONE_AREA) {
+ sActionzoneData *sad = event->customdata;
- if (sad->modifier>0) {
+ if (sad->modifier > 0) {
return OPERATOR_PASS_THROUGH;
}
/* verify *sad itself */
- if (sad==NULL || sad->sa1==NULL || sad->sa2==NULL)
+ if (sad == NULL || sad->sa1 == NULL || sad->sa2 == NULL)
return OPERATOR_PASS_THROUGH;
/* is this our *sad? if areas equal it should be passed on */
- if (sad->sa1==sad->sa2)
+ if (sad->sa1 == sad->sa2)
return OPERATOR_PASS_THROUGH;
/* prepare operator state vars */
@@ -2258,11 +2259,11 @@ static int area_join_cancel(bContext *C, wmOperator *op)
/* modal callback while selecting area (space) that will be removed */
static int area_join_modal(bContext *C, wmOperator *op, wmEvent *event)
{
- bScreen *sc= CTX_wm_screen(C);
+ bScreen *sc = CTX_wm_screen(C);
sAreaJoinData *jd = (sAreaJoinData *)op->customdata;
/* execute the events */
- switch(event->type) {
+ switch (event->type) {
case MOUSEMOVE:
{
@@ -2300,7 +2301,7 @@ static int area_join_modal(bContext *C, wmOperator *op, wmEvent *event)
}
else {
/* we are back in the area previously selected for keeping
- * we swap the areas if possible to allow user to choose */
+ * we swap the areas if possible to allow user to choose */
if (jd->sa2 != NULL) {
if (jd->sa1) jd->sa1->flag &= ~AREA_FLAG_DRAWJOINFROM;
if (jd->sa2) jd->sa2->flag &= ~AREA_FLAG_DRAWJOINTO;
@@ -2325,14 +2326,14 @@ static int area_join_modal(bContext *C, wmOperator *op, wmEvent *event)
}
}
}
- break;
+ break;
case LEFTMOUSE:
- if (event->val==KM_RELEASE) {
+ if (event->val == KM_RELEASE) {
ED_area_tag_redraw(jd->sa1);
ED_area_tag_redraw(jd->sa2);
area_join_apply(C, op);
- WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_SCREEN | NA_EDITED, NULL);
area_join_exit(C, op);
return OPERATOR_FINISHED;
}
@@ -2361,7 +2362,7 @@ static void SCREEN_OT_area_join(wmOperatorType *ot)
ot->poll = screen_active_editable;
ot->cancel = area_join_cancel;
- ot->flag = OPTYPE_BLOCKING|OPTYPE_INTERNAL;
+ ot->flag = OPTYPE_BLOCKING | OPTYPE_INTERNAL;
/* rna */
RNA_def_int(ot->srna, "min_x", -100, INT_MIN, INT_MAX, "X 1", "", INT_MIN, INT_MAX);
@@ -2377,20 +2378,20 @@ static int screen_area_options_invoke(bContext *C, wmOperator *op, wmEvent *even
uiPopupMenu *pup;
uiLayout *layout;
PointerRNA ptr1, ptr2;
- ScrEdge *actedge= screen_find_active_scredge(CTX_wm_screen(C), event->x, event->y);
+ ScrEdge *actedge = screen_find_active_scredge(CTX_wm_screen(C), event->x, event->y);
- if (actedge==NULL) return OPERATOR_CANCELLED;
+ if (actedge == NULL) return OPERATOR_CANCELLED;
- pup= uiPupMenuBegin(C, op->type->name, ICON_NONE);
- layout= uiPupMenuLayout(pup);
+ pup = uiPupMenuBegin(C, op->type->name, ICON_NONE);
+ layout = uiPupMenuLayout(pup);
WM_operator_properties_create(&ptr1, "SCREEN_OT_area_join");
/* mouse cursor on edge, '4' can fail on wide edges... */
- RNA_int_set(&ptr1, "min_x", event->x+4);
- RNA_int_set(&ptr1, "min_y", event->y+4);
- RNA_int_set(&ptr1, "max_x", event->x-4);
- RNA_int_set(&ptr1, "max_y", event->y-4);
+ RNA_int_set(&ptr1, "min_x", event->x + 4);
+ RNA_int_set(&ptr1, "min_y", event->y + 4);
+ RNA_int_set(&ptr1, "max_x", event->x - 4);
+ RNA_int_set(&ptr1, "max_y", event->y - 4);
WM_operator_properties_create(&ptr2, "SCREEN_OT_area_split");
@@ -2425,18 +2426,18 @@ static void SCREEN_OT_area_options(wmOperatorType *ot)
static int spacedata_cleanup(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
+ Main *bmain = CTX_data_main(C);
bScreen *screen;
ScrArea *sa;
- int tot= 0;
+ int tot = 0;
- for (screen= bmain->screen.first; screen; screen= screen->id.next) {
- for (sa= screen->areabase.first; sa; sa= sa->next) {
+ for (screen = bmain->screen.first; screen; screen = screen->id.next) {
+ for (sa = screen->areabase.first; sa; sa = sa->next) {
if (sa->spacedata.first != sa->spacedata.last) {
- SpaceLink *sl= sa->spacedata.first;
+ SpaceLink *sl = sa->spacedata.first;
BLI_remlink(&sa->spacedata, sl);
- tot+= BLI_countlist(&sa->spacedata);
+ tot += BLI_countlist(&sa->spacedata);
BKE_spacedata_freelist(&sa->spacedata);
BLI_addtail(&sa->spacedata, sl);
}
@@ -2464,7 +2465,7 @@ static void SCREEN_OT_spacedata_cleanup(wmOperatorType *ot)
static int repeat_last_exec(bContext *C, wmOperator *UNUSED(op))
{
- wmOperator *lastop= CTX_wm_manager(C)->operators.last;
+ wmOperator *lastop = CTX_wm_manager(C)->operators.last;
if (lastop)
WM_operator_repeat(C, lastop);
@@ -2488,20 +2489,20 @@ static void SCREEN_OT_repeat_last(wmOperatorType *ot)
static int repeat_history_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
- wmWindowManager *wm= CTX_wm_manager(C);
+ wmWindowManager *wm = CTX_wm_manager(C);
wmOperator *lastop;
uiPopupMenu *pup;
uiLayout *layout;
int items, i;
- items= BLI_countlist(&wm->operators);
- if (items==0)
+ items = BLI_countlist(&wm->operators);
+ if (items == 0)
return OPERATOR_CANCELLED;
- pup= uiPupMenuBegin(C, op->type->name, ICON_NONE);
- layout= uiPupMenuLayout(pup);
+ pup = uiPupMenuBegin(C, op->type->name, ICON_NONE);
+ layout = uiPupMenuLayout(pup);
- for (i=items-1, lastop= wm->operators.last; lastop; lastop= lastop->prev, i--)
+ for (i = items - 1, lastop = wm->operators.last; lastop; lastop = lastop->prev, i--)
uiItemIntO(layout, lastop->type->name, ICON_NONE, op->type->idname, "index", i);
uiPupMenuEnd(C, pup);
@@ -2511,9 +2512,9 @@ static int repeat_history_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(ev
static int repeat_history_exec(bContext *C, wmOperator *op)
{
- wmWindowManager *wm= CTX_wm_manager(C);
+ wmWindowManager *wm = CTX_wm_manager(C);
- op= BLI_findlink(&wm->operators, RNA_int_get(op->ptr, "index"));
+ op = BLI_findlink(&wm->operators, RNA_int_get(op->ptr, "index"));
if (op) {
/* let's put it as last operator in list */
BLI_remlink(&wm->operators, op);
@@ -2545,7 +2546,7 @@ static void SCREEN_OT_repeat_history(wmOperatorType *ot)
static int redo_last_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(event))
{
- wmOperator *lastop= WM_operator_last_redo(C);
+ wmOperator *lastop = WM_operator_last_redo(C);
if (lastop)
WM_operator_redo_popup(C, lastop);
@@ -2571,27 +2572,27 @@ static void SCREEN_OT_redo_last(wmOperatorType *ot)
/* insert a region in the area region list */
static int region_quadview_exec(bContext *C, wmOperator *op)
{
- ARegion *ar= CTX_wm_region(C);
+ ARegion *ar = CTX_wm_region(C);
/* some rules... */
- if (ar->regiontype!=RGN_TYPE_WINDOW)
+ if (ar->regiontype != RGN_TYPE_WINDOW)
BKE_report(op->reports, RPT_ERROR, "Only window region can be 4-splitted");
- else if (ar->alignment==RGN_ALIGN_QSPLIT) {
- ScrArea *sa= CTX_wm_area(C);
+ else if (ar->alignment == RGN_ALIGN_QSPLIT) {
+ ScrArea *sa = CTX_wm_area(C);
ARegion *arn;
/* keep current region */
- ar->alignment= 0;
+ ar->alignment = 0;
- if (sa->spacetype==SPACE_VIEW3D) {
- RegionView3D *rv3d= ar->regiondata;
- rv3d->viewlock= 0;
+ if (sa->spacetype == SPACE_VIEW3D) {
+ RegionView3D *rv3d = ar->regiondata;
+ rv3d->viewlock = 0;
rv3d->rflag &= ~RV3D_CLIPPING;
}
- for (ar= sa->regionbase.first; ar; ar= arn) {
- arn= ar->next;
- if (ar->alignment==RGN_ALIGN_QSPLIT) {
+ for (ar = sa->regionbase.first; ar; ar = arn) {
+ arn = ar->next;
+ if (ar->alignment == RGN_ALIGN_QSPLIT) {
ED_region_exit(C, ar);
BKE_area_region_free(sa->type, ar);
BLI_remlink(&sa->regionbase, ar);
@@ -2599,24 +2600,24 @@ static int region_quadview_exec(bContext *C, wmOperator *op)
}
}
ED_area_tag_redraw(sa);
- WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_SCREEN | NA_EDITED, NULL);
}
else if (ar->next)
BKE_report(op->reports, RPT_ERROR, "Only last region can be 4-splitted");
else {
- ScrArea *sa= CTX_wm_area(C);
+ ScrArea *sa = CTX_wm_area(C);
ARegion *newar;
int count;
- ar->alignment= RGN_ALIGN_QSPLIT;
+ ar->alignment = RGN_ALIGN_QSPLIT;
- for (count=0; count<3; count++) {
- newar= BKE_area_region_copy(sa->type, ar);
+ for (count = 0; count < 3; count++) {
+ newar = BKE_area_region_copy(sa->type, ar);
BLI_addtail(&sa->regionbase, newar);
}
/* lock views and set them */
- if (sa->spacetype==SPACE_VIEW3D) {
+ if (sa->spacetype == SPACE_VIEW3D) {
/* run ED_view3d_lock() so the correct 'rv3d->viewquat' is set,
* otherwise when restoring rv3d->localvd the 'viewquat' won't
* match the 'view', set on entering localview See: [#26315],
@@ -2625,31 +2626,31 @@ static int region_quadview_exec(bContext *C, wmOperator *op)
* localview with a 4-split would assign these view locks */
RegionView3D *rv3d;
- rv3d= ar->regiondata;
- rv3d->viewlock= RV3D_LOCKED; rv3d->view= RV3D_VIEW_FRONT; rv3d->persp= RV3D_ORTHO;
+ rv3d = ar->regiondata;
+ rv3d->viewlock = RV3D_LOCKED; rv3d->view = RV3D_VIEW_FRONT; rv3d->persp = RV3D_ORTHO;
ED_view3d_lock(rv3d);
- if (rv3d->localvd) { rv3d->localvd->view = rv3d->view; rv3d->localvd->persp = rv3d->persp; copy_qt_qt(rv3d->localvd->viewquat, rv3d->viewquat);}
+ if (rv3d->localvd) { rv3d->localvd->view = rv3d->view; rv3d->localvd->persp = rv3d->persp; copy_qt_qt(rv3d->localvd->viewquat, rv3d->viewquat); }
- ar= ar->next;
- rv3d= ar->regiondata;
- rv3d->viewlock= RV3D_LOCKED; rv3d->view= RV3D_VIEW_TOP; rv3d->persp= RV3D_ORTHO;
+ ar = ar->next;
+ rv3d = ar->regiondata;
+ rv3d->viewlock = RV3D_LOCKED; rv3d->view = RV3D_VIEW_TOP; rv3d->persp = RV3D_ORTHO;
ED_view3d_lock(rv3d);
- if (rv3d->localvd) { rv3d->localvd->view = rv3d->view; rv3d->localvd->persp = rv3d->persp; copy_qt_qt(rv3d->localvd->viewquat, rv3d->viewquat);}
+ if (rv3d->localvd) { rv3d->localvd->view = rv3d->view; rv3d->localvd->persp = rv3d->persp; copy_qt_qt(rv3d->localvd->viewquat, rv3d->viewquat); }
- ar= ar->next;
- rv3d= ar->regiondata;
- rv3d->viewlock= RV3D_LOCKED; rv3d->view= RV3D_VIEW_RIGHT; rv3d->persp= RV3D_ORTHO;
+ ar = ar->next;
+ rv3d = ar->regiondata;
+ rv3d->viewlock = RV3D_LOCKED; rv3d->view = RV3D_VIEW_RIGHT; rv3d->persp = RV3D_ORTHO;
ED_view3d_lock(rv3d);
- if (rv3d->localvd) { rv3d->localvd->view = rv3d->view; rv3d->localvd->persp = rv3d->persp; copy_qt_qt(rv3d->localvd->viewquat, rv3d->viewquat);}
+ if (rv3d->localvd) { rv3d->localvd->view = rv3d->view; rv3d->localvd->persp = rv3d->persp; copy_qt_qt(rv3d->localvd->viewquat, rv3d->viewquat); }
- ar= ar->next;
- rv3d= ar->regiondata;
- rv3d->view= RV3D_VIEW_CAMERA; rv3d->persp= RV3D_CAMOB;
+ ar = ar->next;
+ rv3d = ar->regiondata;
+ rv3d->view = RV3D_VIEW_CAMERA; rv3d->persp = RV3D_CAMOB;
ED_view3d_lock(rv3d);
- if (rv3d->localvd) {rv3d->localvd->view = rv3d->view; rv3d->localvd->persp = rv3d->persp; copy_qt_qt(rv3d->localvd->viewquat, rv3d->viewquat);}
+ if (rv3d->localvd) {rv3d->localvd->view = rv3d->view; rv3d->localvd->persp = rv3d->persp; copy_qt_qt(rv3d->localvd->viewquat, rv3d->viewquat); }
}
ED_area_tag_redraw(sa);
- WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_SCREEN | NA_EDITED, NULL);
}
@@ -2677,22 +2678,22 @@ static void SCREEN_OT_region_quadview(wmOperatorType *ot)
/* flip a region alignment */
static int region_flip_exec(bContext *C, wmOperator *UNUSED(op))
{
- ARegion *ar= CTX_wm_region(C);
+ ARegion *ar = CTX_wm_region(C);
if (!ar)
return OPERATOR_CANCELLED;
- if (ar->alignment==RGN_ALIGN_TOP)
- ar->alignment= RGN_ALIGN_BOTTOM;
- else if (ar->alignment==RGN_ALIGN_BOTTOM)
- ar->alignment= RGN_ALIGN_TOP;
- else if (ar->alignment==RGN_ALIGN_LEFT)
- ar->alignment= RGN_ALIGN_RIGHT;
- else if (ar->alignment==RGN_ALIGN_RIGHT)
- ar->alignment= RGN_ALIGN_LEFT;
+ if (ar->alignment == RGN_ALIGN_TOP)
+ ar->alignment = RGN_ALIGN_BOTTOM;
+ else if (ar->alignment == RGN_ALIGN_BOTTOM)
+ ar->alignment = RGN_ALIGN_TOP;
+ else if (ar->alignment == RGN_ALIGN_LEFT)
+ ar->alignment = RGN_ALIGN_RIGHT;
+ else if (ar->alignment == RGN_ALIGN_RIGHT)
+ ar->alignment = RGN_ALIGN_LEFT;
ED_area_tag_redraw(CTX_wm_area(C));
- WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_SCREEN | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
@@ -2703,6 +2704,7 @@ static void SCREEN_OT_region_flip(wmOperatorType *ot)
/* identifiers */
ot->name = "Flip Region";
ot->idname = "SCREEN_OT_region_flip";
+ ot->description = "Toggle the region's alignment (left/right or top/bottom)";
/* api callbacks */
ot->exec = region_flip_exec;
@@ -2715,14 +2717,14 @@ static void SCREEN_OT_region_flip(wmOperatorType *ot)
/* flip a header region alignment */
static int header_flip_exec(bContext *C, wmOperator *UNUSED(op))
{
- ARegion *ar= CTX_wm_region(C);
+ ARegion *ar = CTX_wm_region(C);
/* find the header region
* - try context first, but upon failing, search all regions in area...
*/
if ((ar == NULL) || (ar->regiontype != RGN_TYPE_HEADER)) {
- ScrArea *sa= CTX_wm_area(C);
- ar= BKE_area_find_region_type(sa, RGN_TYPE_HEADER);
+ ScrArea *sa = CTX_wm_area(C);
+ ar = BKE_area_find_region_type(sa, RGN_TYPE_HEADER);
/* don't do anything if no region */
if (ar == NULL)
@@ -2730,18 +2732,18 @@ static int header_flip_exec(bContext *C, wmOperator *UNUSED(op))
}
/* copied from SCREEN_OT_region_flip */
- if (ar->alignment==RGN_ALIGN_TOP)
- ar->alignment= RGN_ALIGN_BOTTOM;
- else if (ar->alignment==RGN_ALIGN_BOTTOM)
- ar->alignment= RGN_ALIGN_TOP;
- else if (ar->alignment==RGN_ALIGN_LEFT)
- ar->alignment= RGN_ALIGN_RIGHT;
- else if (ar->alignment==RGN_ALIGN_RIGHT)
- ar->alignment= RGN_ALIGN_LEFT;
+ if (ar->alignment == RGN_ALIGN_TOP)
+ ar->alignment = RGN_ALIGN_BOTTOM;
+ else if (ar->alignment == RGN_ALIGN_BOTTOM)
+ ar->alignment = RGN_ALIGN_TOP;
+ else if (ar->alignment == RGN_ALIGN_LEFT)
+ ar->alignment = RGN_ALIGN_RIGHT;
+ else if (ar->alignment == RGN_ALIGN_RIGHT)
+ ar->alignment = RGN_ALIGN_LEFT;
ED_area_tag_redraw(CTX_wm_area(C));
- WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_SCREEN | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
@@ -2752,6 +2754,7 @@ static void SCREEN_OT_header_flip(wmOperatorType *ot)
/* identifiers */
ot->name = "Flip Header Region";
ot->idname = "SCREEN_OT_header_flip";
+ ot->description = "Toggle the header over/below the main window area";
/* api callbacks */
ot->exec = header_flip_exec;
@@ -2764,13 +2767,13 @@ static void SCREEN_OT_header_flip(wmOperatorType *ot)
static int header_toolbox_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(event))
{
- ScrArea *sa= CTX_wm_area(C);
- ARegion *ar= CTX_wm_region(C);
+ ScrArea *sa = CTX_wm_area(C);
+ ARegion *ar = CTX_wm_region(C);
uiPopupMenu *pup;
uiLayout *layout;
- pup= uiPupMenuBegin(C, "Header", ICON_NONE);
- layout= uiPupMenuLayout(pup);
+ pup = uiPupMenuBegin(C, "Header", ICON_NONE);
+ layout = uiPupMenuLayout(pup);
// XXX SCREEN_OT_region_flip doesn't work - gets wrong context for active region, so added custom operator
if (ar->alignment == RGN_ALIGN_TOP)
@@ -2820,7 +2823,7 @@ static int match_area_with_refresh(int spacetype, int refresh)
static int match_region_with_redraws(int spacetype, int regiontype, int redraws)
{
- if (regiontype==RGN_TYPE_WINDOW) {
+ if (regiontype == RGN_TYPE_WINDOW) {
switch (spacetype) {
case SPACE_VIEW3D:
@@ -2835,7 +2838,7 @@ static int match_region_with_redraws(int spacetype, int regiontype, int redraws)
break;
case SPACE_TIME:
/* if only 1 window or 3d windows, we do timeline too */
- if (redraws & (TIME_ALL_ANIM_WIN|TIME_REGION|TIME_ALL_3D_WIN))
+ if (redraws & (TIME_ALL_ANIM_WIN | TIME_REGION | TIME_ALL_3D_WIN))
return 1;
break;
case SPACE_BUTS:
@@ -2843,7 +2846,7 @@ static int match_region_with_redraws(int spacetype, int regiontype, int redraws)
return 1;
break;
case SPACE_SEQ:
- if (redraws & (TIME_SEQ|TIME_ALL_ANIM_WIN))
+ if (redraws & (TIME_SEQ | TIME_ALL_ANIM_WIN))
return 1;
break;
case SPACE_NODE:
@@ -2861,8 +2864,8 @@ static int match_region_with_redraws(int spacetype, int regiontype, int redraws)
}
}
- else if (regiontype==RGN_TYPE_UI) {
- if (spacetype==SPACE_CLIP) {
+ else if (regiontype == RGN_TYPE_UI) {
+ if (spacetype == SPACE_CLIP) {
/* Track Preview button is on Properties Editor in SpaceClip,
* and it's very common case when users want it be refreshing
* during playback, so asking people to enable special option
@@ -2874,14 +2877,14 @@ static int match_region_with_redraws(int spacetype, int regiontype, int redraws)
if (redraws & TIME_ALL_BUTS_WIN)
return 1;
}
- else if (regiontype==RGN_TYPE_HEADER) {
- if (spacetype==SPACE_TIME)
+ else if (regiontype == RGN_TYPE_HEADER) {
+ if (spacetype == SPACE_TIME)
return 1;
}
- else if (regiontype==RGN_TYPE_PREVIEW) {
+ else if (regiontype == RGN_TYPE_PREVIEW) {
switch (spacetype) {
case SPACE_SEQ:
- if (redraws & (TIME_SEQ|TIME_ALL_ANIM_WIN))
+ if (redraws & (TIME_SEQ | TIME_ALL_ANIM_WIN))
return 1;
break;
case SPACE_CLIP:
@@ -2893,21 +2896,21 @@ static int match_region_with_redraws(int spacetype, int regiontype, int redraws)
static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), wmEvent *event)
{
- bScreen *screen= CTX_wm_screen(C);
+ bScreen *screen = CTX_wm_screen(C);
- if (screen->animtimer && screen->animtimer==event->customdata) {
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- wmTimer *wt= screen->animtimer;
- ScreenAnimData *sad= wt->customdata;
+ if (screen->animtimer && screen->animtimer == event->customdata) {
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ wmTimer *wt = screen->animtimer;
+ ScreenAnimData *sad = wt->customdata;
ScrArea *sa;
int sync;
float time;
/* sync, don't sync, or follow scene setting */
- if (sad->flag & ANIMPLAY_FLAG_SYNC) sync= 1;
- else if (sad->flag & ANIMPLAY_FLAG_NO_SYNC) sync= 0;
- else sync= (scene->flag & SCE_FRAME_DROP);
+ if (sad->flag & ANIMPLAY_FLAG_SYNC) sync = 1;
+ else if (sad->flag & ANIMPLAY_FLAG_NO_SYNC) sync = 0;
+ else sync = (scene->flag & SCE_FRAME_DROP);
if ((scene->audio.flag & AUDIO_SYNC) &&
(sad->flag & ANIMPLAY_FLAG_REVERSE) == FALSE &&
@@ -2942,13 +2945,13 @@ static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), wmEvent *e
/* jump back to end? */
if (PRVRANGEON) {
if (scene->r.cfra < scene->r.psfra) {
- scene->r.cfra= scene->r.pefra;
+ scene->r.cfra = scene->r.pefra;
sad->flag |= ANIMPLAY_FLAG_JUMPED;
}
}
else {
if (scene->r.cfra < scene->r.sfra) {
- scene->r.cfra= scene->r.efra;
+ scene->r.cfra = scene->r.efra;
sad->flag |= ANIMPLAY_FLAG_JUMPED;
}
}
@@ -2957,13 +2960,13 @@ static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), wmEvent *e
/* jump back to start? */
if (PRVRANGEON) {
if (scene->r.cfra > scene->r.pefra) {
- scene->r.cfra= scene->r.psfra;
+ scene->r.cfra = scene->r.psfra;
sad->flag |= ANIMPLAY_FLAG_JUMPED;
}
}
else {
if (scene->r.cfra > scene->r.efra) {
- scene->r.cfra= scene->r.sfra;
+ scene->r.cfra = scene->r.sfra;
sad->flag |= ANIMPLAY_FLAG_JUMPED;
}
}
@@ -2982,14 +2985,14 @@ static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), wmEvent *e
/* since we follow drawflags, we can't send notifier but tag regions ourselves */
ED_update_for_newframe(CTX_data_main(C), scene, screen, 1);
- for (sa= screen->areabase.first; sa; sa= sa->next) {
+ for (sa = screen->areabase.first; sa; sa = sa->next) {
ARegion *ar;
- for (ar= sa->regionbase.first; ar; ar= ar->next) {
- if (ar==sad->ar)
+ for (ar = sa->regionbase.first; ar; ar = ar->next) {
+ if (ar == sad->ar)
ED_region_tag_redraw(ar);
else
- if (match_region_with_redraws(sa->spacetype, ar->regiontype, sad->redraws))
- ED_region_tag_redraw(ar);
+ if (match_region_with_redraws(sa->spacetype, ar->regiontype, sad->redraws))
+ ED_region_tag_redraw(ar);
}
if (match_area_with_refresh(sa->spacetype, sad->refresh))
@@ -3006,7 +3009,7 @@ static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), wmEvent *e
* since the frames-per-second value may have been changed
*/
// TODO: this may make evaluation a bit slower if the value doesn't change... any way to avoid this?
- wt->timestep= (1.0/FPS);
+ wt->timestep = (1.0 / FPS);
return OPERATOR_FINISHED;
}
@@ -3032,7 +3035,7 @@ static void SCREEN_OT_animation_step(wmOperatorType *ot)
/* toggle operator */
int ED_screen_animation_play(bContext *C, int sync, int mode)
{
- bScreen *screen= CTX_wm_screen(C);
+ bScreen *screen = CTX_wm_screen(C);
Scene *scene = CTX_data_scene(C);
if (screen->animtimer) {
@@ -3041,7 +3044,7 @@ int ED_screen_animation_play(bContext *C, int sync, int mode)
sound_stop_scene(scene);
}
else {
- int refresh= SPACE_TIME; /* these settings are currently only available from a menu in the TimeLine */
+ int refresh = SPACE_TIME; /* these settings are currently only available from a menu in the TimeLine */
if (mode == 1) // XXX only play audio forwards!?
sound_play_scene(scene);
@@ -3049,10 +3052,10 @@ int ED_screen_animation_play(bContext *C, int sync, int mode)
ED_screen_animation_timer(C, screen->redraws_flag, refresh, sync, mode);
if (screen->animtimer) {
- wmTimer *wt= screen->animtimer;
- ScreenAnimData *sad= wt->customdata;
+ wmTimer *wt = screen->animtimer;
+ ScreenAnimData *sad = wt->customdata;
- sad->ar= CTX_wm_region(C);
+ sad->ar = CTX_wm_region(C);
}
}
@@ -3061,11 +3064,11 @@ int ED_screen_animation_play(bContext *C, int sync, int mode)
static int screen_animation_play_exec(bContext *C, wmOperator *op)
{
- int mode= (RNA_boolean_get(op->ptr, "reverse")) ? -1 : 1;
- int sync= -1;
+ int mode = (RNA_boolean_get(op->ptr, "reverse")) ? -1 : 1;
+ int sync = -1;
if (RNA_struct_property_is_set(op->ptr, "sync"))
- sync= (RNA_boolean_get(op->ptr, "sync"));
+ sync = (RNA_boolean_get(op->ptr, "sync"));
return ED_screen_animation_play(C, sync, mode);
}
@@ -3092,19 +3095,19 @@ static void SCREEN_OT_animation_play(wmOperatorType *ot)
static int screen_animation_cancel_exec(bContext *C, wmOperator *op)
{
- bScreen *screen= CTX_wm_screen(C);
+ bScreen *screen = CTX_wm_screen(C);
if (screen->animtimer) {
if (RNA_boolean_get(op->ptr, "restore_frame")) {
- ScreenAnimData *sad= screen->animtimer->customdata;
- Scene *scene= CTX_data_scene(C);
+ ScreenAnimData *sad = screen->animtimer->customdata;
+ Scene *scene = CTX_data_scene(C);
/* reset current frame before stopping, and just send a notifier to deal with the rest
* (since playback still needs to be stopped)
*/
- scene->r.cfra= sad->sfra;
+ scene->r.cfra = sad->sfra;
- WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene);
}
/* call the other "toggling" operator to clean up now */
@@ -3152,11 +3155,11 @@ static void SCREEN_OT_animation_cancel(wmOperatorType *ot)
#if 0
static int border_select_do(bContext *C, wmOperator *op)
{
- int event_type= RNA_int_get(op->ptr, "event_type");
+ int event_type = RNA_int_get(op->ptr, "event_type");
- if (event_type==LEFTMOUSE)
+ if (event_type == LEFTMOUSE)
printf("border select do select\n");
- else if (event_type==RIGHTMOUSE)
+ else if (event_type == RIGHTMOUSE)
printf("border select deselect\n");
else
printf("border select do something\n");
@@ -3194,10 +3197,10 @@ static void SCREEN_OT_border_select(wmOperatorType *ot)
static int fullscreen_back_exec(bContext *C, wmOperator *op)
{
bScreen *screen = CTX_wm_screen(C);
- ScrArea *sa=NULL;
+ ScrArea *sa = NULL;
/* search current screen for 'fullscreen' areas */
- for (sa=screen->areabase.first; sa; sa=sa->next) {
+ for (sa = screen->areabase.first; sa; sa = sa->next) {
if (sa->full) break;
}
if (!sa) {
@@ -3229,12 +3232,12 @@ static int userpref_show_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *ev
rcti rect;
int sizex, sizey;
- sizex= 800;
- sizey= 480;
+ sizex = 800;
+ sizey = 480;
/* some magic to calculate postition */
- rect.xmin = event->x + CTX_wm_window(C)->posx - sizex/2;
- rect.ymin = event->y + CTX_wm_window(C)->posy - sizey/2;
+ rect.xmin = event->x + CTX_wm_window(C)->posx - sizex / 2;
+ rect.ymin = event->y + CTX_wm_window(C)->posy - sizey / 2;
rect.xmax = rect.xmin + sizex;
rect.ymax = rect.ymin + sizey;
@@ -3261,11 +3264,11 @@ static void SCREEN_OT_userpref_show(struct wmOperatorType *ot)
static int screen_new_exec(bContext *C, wmOperator *UNUSED(op))
{
- wmWindow *win= CTX_wm_window(C);
- bScreen *sc= CTX_wm_screen(C);
+ wmWindow *win = CTX_wm_window(C);
+ bScreen *sc = CTX_wm_screen(C);
- sc= ED_screen_duplicate(win, sc);
- WM_event_add_notifier(C, NC_SCREEN|ND_SCREENBROWSE, sc);
+ sc = ED_screen_duplicate(win, sc);
+ WM_event_add_notifier(C, NC_SCREEN | ND_SCREENBROWSE, sc);
return OPERATOR_FINISHED;
}
@@ -3282,16 +3285,16 @@ static void SCREEN_OT_new(wmOperatorType *ot)
ot->poll = WM_operator_winactive;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/********************* delete screen operator *********************/
static int screen_delete_exec(bContext *C, wmOperator *UNUSED(op))
{
- bScreen *sc= CTX_wm_screen(C);
+ bScreen *sc = CTX_wm_screen(C);
- WM_event_add_notifier(C, NC_SCREEN|ND_SCREENDELETE, sc);
+ WM_event_add_notifier(C, NC_SCREEN | ND_SCREENDELETE, sc);
return OPERATOR_FINISHED;
}
@@ -3307,22 +3310,22 @@ static void SCREEN_OT_delete(wmOperatorType *ot)
ot->exec = screen_delete_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/********************* new scene operator *********************/
static int scene_new_exec(bContext *C, wmOperator *op)
{
- Scene *newscene, *scene= CTX_data_scene(C);
- Main *bmain= CTX_data_main(C);
- int type= RNA_enum_get(op->ptr, "type");
+ Scene *newscene, *scene = CTX_data_scene(C);
+ Main *bmain = CTX_data_main(C);
+ int type = RNA_enum_get(op->ptr, "type");
if (type == SCE_COPY_NEW) {
- newscene= add_scene("Scene");
+ newscene = BKE_scene_add("Scene");
}
else { /* different kinds of copying */
- newscene= copy_scene(scene, type);
+ newscene = BKE_scene_copy(scene, type);
/* these can't be handled in blenkernel curently, so do them here */
if (type == SCE_COPY_LINK_DATA) {
@@ -3335,14 +3338,14 @@ static int scene_new_exec(bContext *C, wmOperator *op)
ED_screen_set_scene(C, CTX_wm_screen(C), newscene);
- WM_event_add_notifier(C, NC_SCENE|ND_SCENEBROWSE, newscene);
+ WM_event_add_notifier(C, NC_SCENE | ND_SCENEBROWSE, newscene);
return OPERATOR_FINISHED;
}
static void SCENE_OT_new(wmOperatorType *ot)
{
- static EnumPropertyItem type_items[]= {
+ static EnumPropertyItem type_items[] = {
{SCE_COPY_NEW, "NEW", 0, "New", "Add new scene"},
{SCE_COPY_EMPTY, "EMPTY", 0, "Copy Settings", "Make a copy without any objects"},
{SCE_COPY_LINK_OB, "LINK_OBJECTS", 0, "Link Objects", "Link to the objects from the current scene"},
@@ -3360,7 +3363,7 @@ static void SCENE_OT_new(wmOperatorType *ot)
ot->invoke = WM_menu_invoke;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
ot->prop = RNA_def_enum(ot->srna, "type", type_items, 0, "Type", "");
@@ -3370,14 +3373,14 @@ static void SCENE_OT_new(wmOperatorType *ot)
static int scene_delete_exec(bContext *C, wmOperator *UNUSED(op))
{
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
ED_screen_delete_scene(C, scene);
if (G.debug & G_DEBUG)
printf("scene delete %p\n", scene);
- WM_event_add_notifier(C, NC_SCENE|NA_REMOVED, scene);
+ WM_event_add_notifier(C, NC_SCENE | NA_REMOVED, scene);
return OPERATOR_FINISHED;
}
@@ -3393,7 +3396,7 @@ static void SCENE_OT_delete(wmOperatorType *ot)
ot->exec = scene_delete_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* **************** Assigning operatortypes to global list, adding handlers **************** */
@@ -3462,7 +3465,7 @@ static void keymap_modal_set(wmKeyConfig *keyconf)
wmKeyMap *keymap;
/* Standard Modal keymap ------------------------------------------------ */
- keymap= WM_modalkeymap_add(keyconf, "Standard Modal Map", modal_items);
+ keymap = WM_modalkeymap_add(keyconf, "Standard Modal Map", modal_items);
WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, KM_MODAL_CANCEL);
WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_ANY, KM_ANY, 0, KM_MODAL_APPLY);
@@ -3478,8 +3481,8 @@ static void keymap_modal_set(wmKeyConfig *keyconf)
static int open_file_drop_poll(bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUSED(event))
{
- if (drag->type==WM_DRAG_PATH) {
- if (drag->icon==ICON_FILE_BLEND)
+ if (drag->type == WM_DRAG_PATH) {
+ if (drag->icon == ICON_FILE_BLEND)
return 1;
}
return 0;
@@ -3489,7 +3492,7 @@ static void open_file_drop_copy(wmDrag *drag, wmDropBox *drop)
{
/* copy drag path to properties */
RNA_string_set(drop->ptr, "filepath", drag->path);
- drop->opcontext= WM_OP_EXEC_DEFAULT;
+ drop->opcontext = WM_OP_EXEC_DEFAULT;
}
@@ -3540,7 +3543,7 @@ void ED_keymap_screen(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "SCREEN_OT_screencast", F3KEY, KM_PRESS, KM_ALT, 0);
/* tests */
- WM_keymap_add_item(keymap, "SCREEN_OT_region_quadview", QKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
+ WM_keymap_add_item(keymap, "SCREEN_OT_region_quadview", QKEY, KM_PRESS, KM_CTRL | KM_ALT, 0);
WM_keymap_verify_item(keymap, "SCREEN_OT_repeat_history", F3KEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "SCREEN_OT_repeat_last", RKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_verify_item(keymap, "SCREEN_OT_region_flip", F5KEY, KM_PRESS, 0, 0);
@@ -3555,12 +3558,12 @@ void ED_keymap_screen(wmKeyConfig *keyconf)
/* undo */
#ifdef __APPLE__
WM_keymap_add_item(keymap, "ED_OT_undo", ZKEY, KM_PRESS, KM_OSKEY, 0);
- WM_keymap_add_item(keymap, "ED_OT_redo", ZKEY, KM_PRESS, KM_SHIFT|KM_OSKEY, 0);
- WM_keymap_add_item(keymap, "ED_OT_undo_history", ZKEY, KM_PRESS, KM_ALT|KM_OSKEY, 0);
+ WM_keymap_add_item(keymap, "ED_OT_redo", ZKEY, KM_PRESS, KM_SHIFT | KM_OSKEY, 0);
+ WM_keymap_add_item(keymap, "ED_OT_undo_history", ZKEY, KM_PRESS, KM_ALT | KM_OSKEY, 0);
#endif
WM_keymap_add_item(keymap, "ED_OT_undo", ZKEY, KM_PRESS, KM_CTRL, 0);
- WM_keymap_add_item(keymap, "ED_OT_redo", ZKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
- WM_keymap_add_item(keymap, "ED_OT_undo_history", ZKEY, KM_PRESS, KM_ALT|KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "ED_OT_redo", ZKEY, KM_PRESS, KM_SHIFT | KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "ED_OT_undo_history", ZKEY, KM_PRESS, KM_ALT | KM_CTRL, 0);
/* render */
@@ -3575,7 +3578,7 @@ void ED_keymap_screen(wmKeyConfig *keyconf)
#ifdef __APPLE__
WM_keymap_add_item(keymap, "SCREEN_OT_userpref_show", COMMAKEY, KM_PRESS, KM_OSKEY, 0);
#endif
- WM_keymap_add_item(keymap, "SCREEN_OT_userpref_show", UKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
+ WM_keymap_add_item(keymap, "SCREEN_OT_userpref_show", UKEY, KM_PRESS, KM_CTRL | KM_ALT, 0);
/* Anim Playback ------------------------------------------------ */
@@ -3590,8 +3593,8 @@ void ED_keymap_screen(wmKeyConfig *keyconf)
RNA_int_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_offset", WHEELDOWNMOUSE, KM_PRESS, KM_ALT, 0)->ptr, "delta", 1);
RNA_int_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_offset", WHEELUPMOUSE, KM_PRESS, KM_ALT, 0)->ptr, "delta", -1);
- RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", UPARROWKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0)->ptr, "end", TRUE);
- RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", DOWNARROWKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0)->ptr, "end", FALSE);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", UPARROWKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0)->ptr, "end", TRUE);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", DOWNARROWKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0)->ptr, "end", FALSE);
RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", RIGHTARROWKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "end", TRUE);
RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", LEFTARROWKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "end", FALSE);
@@ -3609,7 +3612,7 @@ void ED_keymap_screen(wmKeyConfig *keyconf)
/* play (forward and backwards) */
WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", AKEY, KM_PRESS, KM_ALT, 0);
- RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", AKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0)->ptr, "reverse", TRUE);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", AKEY, KM_PRESS, KM_ALT | KM_SHIFT, 0)->ptr, "reverse", TRUE);
WM_keymap_add_item(keymap, "SCREEN_OT_animation_cancel", ESCKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", MEDIAPLAY, KM_PRESS, 0, 0);
@@ -3619,17 +3622,17 @@ void ED_keymap_screen(wmKeyConfig *keyconf)
#if 0 // XXX: disabled for restoring later... bad implementation
keymap = WM_keymap_find(keyconf, "Frames", 0, 0);
kmi = WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", RIGHTARROWKEY, KM_PRESS, KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "cycle_speed", TRUE);
+ RNA_boolean_set(kmi->ptr, "cycle_speed", TRUE);
kmi = WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", LEFTARROWKEY, KM_PRESS, KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "reverse", TRUE);
- RNA_boolean_set(kmi->ptr, "cycle_speed", TRUE);
+ RNA_boolean_set(kmi->ptr, "reverse", TRUE);
+ RNA_boolean_set(kmi->ptr, "cycle_speed", TRUE);
WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", DOWNARROWKEY, KM_PRESS, KM_ALT, 0);
#endif
/* dropbox for entire window */
- lb= WM_dropboxmap_find("Window", 0, 0);
+ lb = WM_dropboxmap_find("Window", 0, 0);
WM_dropbox_add(lb, "WM_OT_open_mainfile", open_file_drop_poll, open_file_drop_copy);
keymap_modal_set(keyconf);
diff --git a/source/blender/editors/screen/screendump.c b/source/blender/editors/screen/screendump.c
index 22a1770412f..256df21b79a 100644
--- a/source/blender/editors/screen/screendump.c
+++ b/source/blender/editors/screen/screendump.c
@@ -78,18 +78,18 @@ typedef struct ScreenshotData {
/* get shot from frontbuffer */
static unsigned int *screenshot(bContext *C, int *dumpsx, int *dumpsy)
{
- wmWindow *win= CTX_wm_window(C);
- int x=0, y=0;
- unsigned int *dumprect= NULL;
-
- x= 0;
- y= 0;
- *dumpsx= win->sizex;
- *dumpsy= win->sizey;
+ wmWindow *win = CTX_wm_window(C);
+ int x = 0, y = 0;
+ unsigned int *dumprect = NULL;
+
+ x = 0;
+ y = 0;
+ *dumpsx = win->sizex;
+ *dumpsy = win->sizey;
if (*dumpsx && *dumpsy) {
- dumprect= MEM_mallocN(sizeof(int) * (*dumpsx) * (*dumpsy), "dumprect");
+ dumprect = MEM_mallocN(sizeof(int) * (*dumpsx) * (*dumpsy), "dumprect");
glReadBuffer(GL_FRONT);
glReadPixels(x, y, *dumpsx, *dumpsy, GL_RGBA, GL_UNSIGNED_BYTE, dumprect);
glFinish();
@@ -108,17 +108,17 @@ static int screenshot_data_create(bContext *C, wmOperator *op)
/* do redraw so we don't show popups/menus */
WM_redraw_windows(C);
- dumprect= screenshot(C, &dumpsx, &dumpsy);
+ dumprect = screenshot(C, &dumpsx, &dumpsy);
if (dumprect) {
- ScreenshotData *scd= MEM_callocN(sizeof(ScreenshotData), "screenshot");
- ScrArea *sa= CTX_wm_area(C);
+ ScreenshotData *scd = MEM_callocN(sizeof(ScreenshotData), "screenshot");
+ ScrArea *sa = CTX_wm_area(C);
- scd->dumpsx= dumpsx;
- scd->dumpsy= dumpsy;
- scd->dumprect= dumprect;
+ scd->dumpsx = dumpsx;
+ scd->dumpsy = dumpsy;
+ scd->dumprect = dumprect;
if (sa) {
- scd->crop= sa->totrct;
+ scd->crop = sa->totrct;
}
BKE_imformat_defaults(&scd->im_format);
@@ -128,46 +128,46 @@ static int screenshot_data_create(bContext *C, wmOperator *op)
return TRUE;
}
else {
- op->customdata= NULL;
+ op->customdata = NULL;
return FALSE;
}
}
static void screenshot_data_free(wmOperator *op)
{
- ScreenshotData *scd= op->customdata;
+ ScreenshotData *scd = op->customdata;
if (scd) {
if (scd->dumprect)
MEM_freeN(scd->dumprect);
MEM_freeN(scd);
- op->customdata= NULL;
+ op->customdata = NULL;
}
}
static void screenshot_crop(ImBuf *ibuf, rcti crop)
{
- unsigned int *to= ibuf->rect;
- unsigned int *from= ibuf->rect + crop.ymin*ibuf->x + crop.xmin;
- int y, cropw= crop.xmax - crop.xmin, croph = crop.ymax - crop.ymin;
+ unsigned int *to = ibuf->rect;
+ unsigned int *from = ibuf->rect + crop.ymin * ibuf->x + crop.xmin;
+ int y, cropw = crop.xmax - crop.xmin, croph = crop.ymax - crop.ymin;
if (cropw > 0 && croph > 0) {
- for (y=0; y<croph; y++, to+=cropw, from+=ibuf->x)
- memmove(to, from, sizeof(unsigned int)*cropw);
+ for (y = 0; y < croph; y++, to += cropw, from += ibuf->x)
+ memmove(to, from, sizeof(unsigned int) * cropw);
- ibuf->x= cropw;
- ibuf->y= croph;
+ ibuf->x = cropw;
+ ibuf->y = croph;
}
}
static int screenshot_exec(bContext *C, wmOperator *op)
{
- ScreenshotData *scd= op->customdata;
+ ScreenshotData *scd = op->customdata;
if (scd == NULL) {
/* when running exec directly */
screenshot_data_create(C, op);
- scd= op->customdata;
+ scd = op->customdata;
}
if (scd) {
@@ -179,8 +179,8 @@ static int screenshot_exec(bContext *C, wmOperator *op)
BLI_path_abs(path, G.main->name);
/* operator ensures the extension */
- ibuf= IMB_allocImBuf(scd->dumpsx, scd->dumpsy, 24, 0);
- ibuf->rect= scd->dumprect;
+ ibuf = IMB_allocImBuf(scd->dumpsx, scd->dumpsy, 24, 0);
+ ibuf->rect = scd->dumprect;
/* crop to show only single editor */
if (!RNA_boolean_get(op->ptr, "full"))
@@ -190,7 +190,7 @@ static int screenshot_exec(bContext *C, wmOperator *op)
/* bw screenshot? - users will notice if it fails! */
IMB_color_to_bw(ibuf);
}
- BKE_write_ibuf(ibuf, path, &scd->im_format);
+ BKE_imbuf_write(ibuf, path, &scd->im_format);
IMB_freeImBuf(ibuf);
}
@@ -255,6 +255,7 @@ void SCREEN_OT_screenshot(wmOperatorType *ot)
{
ot->name = "Save Screenshot"; /* weak: opname starting with 'save' makes filewindow give save-over */
ot->idname = "SCREEN_OT_screenshot";
+ ot->description = "Capture a picture of the active area or whole Blender window";
ot->invoke = screenshot_invoke;
ot->check = screenshot_check;
@@ -265,8 +266,8 @@ void SCREEN_OT_screenshot(wmOperatorType *ot)
ot->flag = 0;
- WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE, FILE_SPECIAL, FILE_SAVE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
- RNA_def_boolean(ot->srna, "full", 1, "Full Screen", "");
+ WM_operator_properties_filesel(ot, FOLDERFILE | IMAGEFILE, FILE_SPECIAL, FILE_SAVE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
+ RNA_def_boolean(ot->srna, "full", 1, "Full Screen", "Screenshot the whole Blender window");
}
/* *************** screenshot movie job ************************* */
@@ -284,7 +285,7 @@ typedef struct ScreenshotJob {
static void screenshot_freejob(void *sjv)
{
- ScreenshotJob *sj= sjv;
+ ScreenshotJob *sj = sjv;
if (sj->dumprect)
MEM_freeN(sj->dumprect);
@@ -296,15 +297,15 @@ static void screenshot_freejob(void *sjv)
/* called before redraw notifiers, copies a new dumprect */
static void screenshot_updatejob(void *sjv)
{
- ScreenshotJob *sj= sjv;
+ ScreenshotJob *sj = sjv;
unsigned int *dumprect;
- if (sj->dumprect==NULL) {
- dumprect= MEM_mallocN(sizeof(int) * sj->dumpsx * sj->dumpsy, "dumprect");
+ if (sj->dumprect == NULL) {
+ dumprect = MEM_mallocN(sizeof(int) * sj->dumpsx * sj->dumpsy, "dumprect");
glReadPixels(sj->x, sj->y, sj->dumpsx, sj->dumpsy, GL_RGBA, GL_UNSIGNED_BYTE, dumprect);
glFinish();
- sj->dumprect= dumprect;
+ sj->dumprect = dumprect;
}
}
@@ -312,13 +313,13 @@ static void screenshot_updatejob(void *sjv)
/* only this runs inside thread */
static void screenshot_startjob(void *sjv, short *stop, short *do_update, float *UNUSED(progress))
{
- ScreenshotJob *sj= sjv;
- RenderData rd= sj->scene->r;
- bMovieHandle *mh= BKE_get_movie_handle(sj->scene->r.im_format.imtype);
+ ScreenshotJob *sj = sjv;
+ RenderData rd = sj->scene->r;
+ bMovieHandle *mh = BKE_movie_handle_get(sj->scene->r.im_format.imtype);
/* we need this as local variables for renderdata */
- rd.frs_sec= U.scrcastfps;
- rd.frs_sec_base= 1.0f;
+ rd.frs_sec = U.scrcastfps;
+ rd.frs_sec_base = 1.0f;
if (BKE_imtype_is_movie(rd.im_format.imtype)) {
if (!mh->start_movie(sj->scene, &rd, sj->dumpsx, sj->dumpsy, &sj->reports)) {
@@ -327,20 +328,20 @@ static void screenshot_startjob(void *sjv, short *stop, short *do_update, float
}
}
else
- mh= NULL;
+ mh = NULL;
- sj->stop= stop;
- sj->do_update= do_update;
+ sj->stop = stop;
+ sj->do_update = do_update;
- *do_update= 1; // wait for opengl rect
+ *do_update = 1; // wait for opengl rect
- while (*stop==0) {
+ while (*stop == 0) {
if (sj->dumprect) {
if (mh) {
if (mh->append_movie(&rd, rd.sfra, rd.cfra, (int *)sj->dumprect,
- sj->dumpsx, sj->dumpsy, &sj->reports))
+ sj->dumpsx, sj->dumpsy, &sj->reports))
{
BKE_reportf(&sj->reports, RPT_INFO, "Appended frame: %d", rd.cfra);
printf("Appended frame %d\n", rd.cfra);
@@ -350,16 +351,16 @@ static void screenshot_startjob(void *sjv, short *stop, short *do_update, float
}
}
else {
- ImBuf *ibuf= IMB_allocImBuf(sj->dumpsx, sj->dumpsy, rd.im_format.planes, 0);
+ ImBuf *ibuf = IMB_allocImBuf(sj->dumpsx, sj->dumpsy, rd.im_format.planes, 0);
char name[FILE_MAX];
int ok;
BKE_makepicstring(name, rd.pic, sj->bmain->name, rd.cfra, rd.im_format.imtype, rd.scemode & R_EXTENSION, TRUE);
- ibuf->rect= sj->dumprect;
- ok= BKE_write_ibuf(ibuf, name, &rd.im_format);
+ ibuf->rect = sj->dumprect;
+ ok = BKE_imbuf_write(ibuf, name, &rd.im_format);
- if (ok==0) {
+ if (ok == 0) {
printf("Write error: cannot save %s\n", name);
BKE_reportf(&sj->reports, RPT_INFO, "Write error: cannot save %s\n", name);
break;
@@ -374,9 +375,9 @@ static void screenshot_startjob(void *sjv, short *stop, short *do_update, float
}
MEM_freeN(sj->dumprect);
- sj->dumprect= NULL;
+ sj->dumprect = NULL;
- *do_update= 1;
+ *do_update = 1;
rd.cfra++;
@@ -393,38 +394,38 @@ static void screenshot_startjob(void *sjv, short *stop, short *do_update, float
static int screencast_exec(bContext *C, wmOperator *op)
{
- bScreen *screen= CTX_wm_screen(C);
- wmJob *steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), screen, "Screencast", 0);
- ScreenshotJob *sj= MEM_callocN(sizeof(ScreenshotJob), "screenshot job");
+ bScreen *screen = CTX_wm_screen(C);
+ wmJob *steve = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), screen, "Screencast", 0);
+ ScreenshotJob *sj = MEM_callocN(sizeof(ScreenshotJob), "screenshot job");
/* setup sj */
if (RNA_boolean_get(op->ptr, "full")) {
- wmWindow *win= CTX_wm_window(C);
- sj->x= 0;
- sj->y= 0;
- sj->dumpsx= win->sizex;
- sj->dumpsy= win->sizey;
+ wmWindow *win = CTX_wm_window(C);
+ sj->x = 0;
+ sj->y = 0;
+ sj->dumpsx = win->sizex;
+ sj->dumpsy = win->sizey;
}
else {
- ScrArea *curarea= CTX_wm_area(C);
- sj->x= curarea->totrct.xmin;
- sj->y= curarea->totrct.ymin;
- sj->dumpsx= curarea->totrct.xmax - sj->x;
- sj->dumpsy= curarea->totrct.ymax - sj->y;
+ ScrArea *curarea = CTX_wm_area(C);
+ sj->x = curarea->totrct.xmin;
+ sj->y = curarea->totrct.ymin;
+ sj->dumpsx = curarea->totrct.xmax - sj->x;
+ sj->dumpsy = curarea->totrct.ymax - sj->y;
}
- sj->bmain= CTX_data_main(C);
- sj->scene= CTX_data_scene(C);
+ sj->bmain = CTX_data_main(C);
+ sj->scene = CTX_data_scene(C);
BKE_reports_init(&sj->reports, RPT_PRINT);
/* setup job */
WM_jobs_customdata(steve, sj, screenshot_freejob);
- WM_jobs_timer(steve, 0.1, 0, NC_SCREEN|ND_SCREENCAST);
+ WM_jobs_timer(steve, 0.1, 0, NC_SCREEN | ND_SCREENCAST);
WM_jobs_callbacks(steve, screenshot_startjob, NULL, screenshot_updatejob, NULL);
WM_jobs_start(CTX_wm_manager(C), steve);
- WM_event_add_notifier(C, NC_SCREEN|ND_SCREENCAST, screen);
+ WM_event_add_notifier(C, NC_SCREEN | ND_SCREENCAST, screen);
return OPERATOR_FINISHED;
}
@@ -433,6 +434,7 @@ void SCREEN_OT_screencast(wmOperatorType *ot)
{
ot->name = "Make Screencast";
ot->idname = "SCREEN_OT_screencast";
+ ot->description = "Capture a video of the active area or whole Blender window";
ot->invoke = WM_operator_confirm;
ot->exec = screencast_exec;
@@ -441,8 +443,5 @@ void SCREEN_OT_screencast(wmOperatorType *ot)
ot->flag = 0;
RNA_def_property(ot->srna, "filepath", PROP_STRING, PROP_FILEPATH);
- RNA_def_boolean(ot->srna, "full", 1, "Full Screen", "");
+ RNA_def_boolean(ot->srna, "full", 1, "Full Screen", "Screencast the whole Blender window");
}
-
-
-
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index 5d4710accad..c681f8ddb75 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -69,7 +69,7 @@ typedef struct Snapshot {
float size[3];
float ofs[3];
float rot;
- int brush_size;
+ int BKE_brush_size_get;
int winx;
int winy;
int brush_map_mode;
@@ -87,8 +87,8 @@ static int same_snap(Snapshot *snap, Brush *brush, ViewContext *vc)
/* make brush smaller shouldn't cause a resample */
((mtex->brush_map_mode == MTEX_MAP_MODE_FIXED &&
- (brush_size(vc->scene, brush) <= snap->brush_size)) ||
- (brush_size(vc->scene, brush) == snap->brush_size)) &&
+ (BKE_brush_size_get(vc->scene, brush) <= snap->BKE_brush_size_get)) ||
+ (BKE_brush_size_get(vc->scene, brush) == snap->BKE_brush_size_get)) &&
(mtex->brush_map_mode == snap->brush_map_mode) &&
(vc->ar->winx == snap->winx) &&
@@ -110,7 +110,7 @@ static void make_snap(Snapshot *snap, Brush *brush, ViewContext *vc)
snap->rot = -1;
}
- snap->brush_size = brush_size(vc->scene, brush);
+ snap->BKE_brush_size_get = BKE_brush_size_get(vc->scene, brush);
snap->winx = vc->ar->winx;
snap->winy = vc->ar->winy;
}
@@ -155,7 +155,7 @@ static int load_tex(Sculpt *sd, Brush *br, ViewContext *vc)
make_snap(&snap, br, vc);
if (br->mtex.brush_map_mode == MTEX_MAP_MODE_FIXED) {
- int s = brush_size(vc->scene, br);
+ int s = BKE_brush_size_get(vc->scene, br);
int r = 1;
for (s >>= 1; s > 0; s >>= 1)
@@ -196,7 +196,7 @@ static int load_tex(Sculpt *sd, Brush *br, ViewContext *vc)
// largely duplicated from tex_strength
const float rotation = -br->mtex.rot;
- float radius = brush_size(vc->scene, br);
+ float radius = BKE_brush_size_get(vc->scene, br);
int index = j * size + i;
float x;
float avg;
@@ -240,7 +240,7 @@ static int load_tex(Sculpt *sd, Brush *br, ViewContext *vc)
avg += br->texture_sample_bias;
if (br->mtex.brush_map_mode == MTEX_MAP_MODE_FIXED)
- avg *= brush_curve_strength(br, len, 1); /* Falloff curve */
+ avg *= BKE_brush_curve_strength(br, len, 1); /* Falloff curve */
buffer[index] = 255 - (GLubyte)(255 * avg);
}
@@ -345,11 +345,11 @@ static int sculpt_get_brush_geometry(bContext *C, ViewContext *vc,
sculpt_stroke_get_location(C, location, window)) {
*pixel_radius =
project_brush_radius(vc,
- brush_unprojected_radius(scene, brush),
+ BKE_brush_unprojected_radius_get(scene, brush),
location);
if (*pixel_radius == 0)
- *pixel_radius = brush_size(scene, brush);
+ *pixel_radius = BKE_brush_size_get(scene, brush);
mul_m4_v3(vc->obact->obmat, location);
@@ -359,7 +359,7 @@ static int sculpt_get_brush_geometry(bContext *C, ViewContext *vc,
Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
Brush *brush = paint_brush(&sd->paint);
- *pixel_radius = brush_size(scene, brush);
+ *pixel_radius = BKE_brush_size_get(scene, brush);
hit = 0;
}
@@ -377,7 +377,9 @@ static void paint_draw_alpha_overlay(Sculpt *sd, Brush *brush,
/* check for overlay mode */
if (!(brush->flag & BRUSH_TEXTURE_OVERLAY) ||
!(ELEM(brush->mtex.brush_map_mode, MTEX_MAP_MODE_FIXED, MTEX_MAP_MODE_TILED)))
+ {
return;
+ }
/* save lots of GL state
* TODO: check on whether all of these are needed? */
@@ -412,7 +414,7 @@ static void paint_draw_alpha_overlay(Sculpt *sd, Brush *brush,
glTranslatef(-0.5f, -0.5f, 0);
/* scale based on tablet pressure */
- if (sd->draw_pressure && brush_use_size_pressure(vc->scene, brush)) {
+ if (sd->draw_pressure && BKE_brush_use_size_pressure(vc->scene, brush)) {
glTranslatef(0.5f, 0.5f, 0);
glScalef(1.0f / sd->pressure_value, 1.0f / sd->pressure_value, 1);
glTranslatef(-0.5f, -0.5f, 0);
@@ -427,7 +429,7 @@ static void paint_draw_alpha_overlay(Sculpt *sd, Brush *brush,
quad.ymax = aim[1] + sd->anchored_size - win->ymin;
}
else {
- const int radius = brush_size(vc->scene, brush);
+ const int radius = BKE_brush_size_get(vc->scene, brush);
quad.xmin = x - radius;
quad.ymin = y - radius;
quad.xmax = x + radius;
@@ -473,7 +475,7 @@ static void paint_cursor_on_hit(Sculpt *sd, Brush *brush, ViewContext *vc,
float unprojected_radius, projected_radius;
/* update the brush's cached 3D radius */
- if (!brush_use_locked_size(vc->scene, brush)) {
+ if (!BKE_brush_use_locked_size(vc->scene, brush)) {
/* get 2D brush radius */
if (sd->draw_anchored)
projected_radius = sd->anchored_size;
@@ -481,7 +483,7 @@ static void paint_cursor_on_hit(Sculpt *sd, Brush *brush, ViewContext *vc,
if (brush->flag & BRUSH_ANCHORED)
projected_radius = 8;
else
- projected_radius = brush_size(vc->scene, brush);
+ projected_radius = BKE_brush_size_get(vc->scene, brush);
}
/* convert brush radius from 2D to 3D */
@@ -489,11 +491,11 @@ static void paint_cursor_on_hit(Sculpt *sd, Brush *brush, ViewContext *vc,
projected_radius);
/* scale 3D brush radius by pressure */
- if (sd->draw_pressure && brush_use_size_pressure(vc->scene, brush))
+ if (sd->draw_pressure && BKE_brush_use_size_pressure(vc->scene, brush))
unprojected_radius *= sd->pressure_value;
/* set cached value in either Brush or UnifiedPaintSettings */
- brush_set_unprojected_radius(vc->scene, brush, unprojected_radius);
+ BKE_brush_unprojected_radius_set(vc->scene, brush, unprojected_radius);
}
}
@@ -512,7 +514,7 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused))
translation[1] = y;
outline_alpha = 0.5;
outline_col = brush->add_col;
- final_radius = brush_size(scene, brush);
+ final_radius = BKE_brush_size_get(scene, brush);
/* check that brush drawing is enabled */
if (!(paint->flags & PAINT_SHOW_BRUSH))
@@ -555,8 +557,8 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused))
/* draw overlay */
paint_draw_alpha_overlay(sd, brush, &vc, x, y);
- if (brush_use_locked_size(scene, brush))
- brush_set_size(scene, brush, pixel_radius);
+ if (BKE_brush_use_locked_size(scene, brush))
+ BKE_brush_size_set(scene, brush, pixel_radius);
/* check if brush is subtracting, use different color then */
/* TODO: no way currently to know state of pen flip or
@@ -566,7 +568,9 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused))
ELEM5(brush->sculpt_tool, SCULPT_TOOL_DRAW,
SCULPT_TOOL_INFLATE, SCULPT_TOOL_CLAY,
SCULPT_TOOL_PINCH, SCULPT_TOOL_CREASE))
+ {
outline_col = brush->sub_col;
+ }
/* only do if brush is over the mesh */
if (hit)
diff --git a/source/blender/editors/sculpt_paint/paint_hide.c b/source/blender/editors/sculpt_paint/paint_hide.c
index c75c1be36f5..a3c74b33f9e 100644
--- a/source/blender/editors/sculpt_paint/paint_hide.c
+++ b/source/blender/editors/sculpt_paint/paint_hide.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -330,9 +328,9 @@ static int hide_show_exec(bContext *C, wmOperator *op)
/* ensure that edges and faces get hidden as well (not used by
* sculpt but it looks wrong when entering editmode otherwise) */
if (pbvh_type == PBVH_FACES) {
- mesh_flush_hidden_from_verts(me->mvert, me->mloop,
- me->medge, me->totedge,
- me->mpoly, me->totpoly);
+ BKE_mesh_flush_hidden_from_verts(me->mvert, me->mloop,
+ me->medge, me->totedge,
+ me->mpoly, me->totpoly);
}
ED_region_tag_redraw(ar);
@@ -366,6 +364,7 @@ void PAINT_OT_hide_show(struct wmOperatorType *ot)
/* identifiers */
ot->name = "Hide/Show";
ot->idname = "PAINT_OT_hide_show";
+ ot->description = "Hide/show some vertices";
/* api callbacks */
ot->invoke = hide_show_invoke;
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 3b6e21cb3f2..c46c153aa70 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -1,8 +1,4 @@
/*
- * imagepaint.c
- *
- * Functions to paint images in 2D and 3D.
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -30,9 +26,9 @@
/** \file blender/editors/sculpt_paint/paint_image.c
* \ingroup edsculpt
+ * \brief Functions to paint images in 2D and 3D.
*/
-
#include <float.h>
#include <string.h>
#include <stdio.h>
@@ -314,7 +310,7 @@ typedef struct ProjPaintState {
short do_occlude; /* Use raytraced occlusion? - ortherwise will paint right through to the back*/
short do_backfacecull; /* ignore faces with normals pointing away, skips a lot of raycasts if your normals are correctly flipped */
short do_mask_normal; /* mask out pixels based on their normals */
- short do_new_shading_nodes; /* cache scene_use_new_shading_nodes value */
+ short do_new_shading_nodes; /* cache BKE_scene_use_new_shading_nodes value */
float normal_angle; /* what angle to mask at*/
float normal_angle_inner;
float normal_angle_range; /* difference between normal_angle and normal_angle_inner, for easy access */
@@ -530,7 +526,7 @@ static Image *imapaint_face_image(const ImagePaintState *s, int face_index)
{
Image *ima;
- if (scene_use_new_shading_nodes(s->scene)) {
+ if (BKE_scene_use_new_shading_nodes(s->scene)) {
MFace *mf = &s->dm_mface[face_index];
ED_object_get_active_image(s->ob, mf->mat_nr + 1, &ima, NULL, NULL);
}
@@ -546,7 +542,7 @@ static Image *project_paint_face_image(const ProjPaintState *ps, MTFace *dm_mtfa
{
Image *ima;
- if (ps->do_new_shading_nodes) { /* cached scene_use_new_shading_nodes result */
+ if (ps->do_new_shading_nodes) { /* cached BKE_scene_use_new_shading_nodes result */
MFace *mf = ps->dm_mface + face_index;
ED_object_get_active_image(ps->ob, mf->mat_nr + 1, &ima, NULL, NULL);
}
@@ -1461,7 +1457,7 @@ static float project_paint_uvpixel_mask(
// This only works when the opacity dosnt change while painting, stylus pressure messes with this
// so don't use it.
- // if (ps->is_airbrush==0) mask *= brush_alpha(ps->brush);
+ // if (ps->is_airbrush==0) mask *= BKE_brush_alpha_get(ps->brush);
return mask;
}
@@ -2621,7 +2617,7 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i
//fac = line_point_factor_v2(uv, uv_seam_quad[0], uv_seam_quad[1]);
fac = line_point_factor_v2(uv, seam_subsection[0], seam_subsection[1]);
- if (fac < 0.0f) { copy_v3_v3(pixelScreenCo, edge_verts_inset_clip[0]); }
+ if (fac < 0.0f) { copy_v3_v3(pixelScreenCo, edge_verts_inset_clip[0]); }
else if (fac > 1.0f) { copy_v3_v3(pixelScreenCo, edge_verts_inset_clip[1]); }
else { interp_v3_v3v3(pixelScreenCo, edge_verts_inset_clip[0], edge_verts_inset_clip[1], fac); }
@@ -2957,7 +2953,7 @@ static void project_paint_begin(ProjPaintState *ps)
MemArena *arena; /* at the moment this is just ps->arena_mt[0], but use this to show were not multithreading */
- const int diameter = 2 * brush_size(ps->scene, ps->brush);
+ const int diameter = 2 * BKE_brush_size_get(ps->scene, ps->brush);
/* ---- end defines ---- */
@@ -3095,10 +3091,10 @@ static void project_paint_begin(ProjPaintState *ps)
invert_m4_m4(viewmat, viewinv);
/* window matrix, clipping and ortho */
- camera_params_init(&params);
- camera_params_from_object(&params, cam_ob);
- camera_params_compute_viewplane(&params, ps->winx, ps->winy, 1.0f, 1.0f);
- camera_params_compute_matrix(&params);
+ BKE_camera_params_init(&params);
+ BKE_camera_params_from_object(&params, cam_ob);
+ BKE_camera_params_compute_viewplane(&params, ps->winx, ps->winy, 1.0f, 1.0f);
+ BKE_camera_params_compute_matrix(&params);
copy_m4_m4(winmat, params.winmat);
ps->clipsta = params.clipsta;
@@ -3601,7 +3597,7 @@ static int project_bucket_iter_init(ProjPaintState *ps, const float mval_f[2])
{
if (ps->source == PROJ_SRC_VIEW) {
float min_brush[2], max_brush[2];
- const float radius = (float)brush_size(ps->scene, ps->brush);
+ const float radius = (float)BKE_brush_size_get(ps->scene, ps->brush);
/* 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 :/
@@ -3639,7 +3635,7 @@ static int project_bucket_iter_init(ProjPaintState *ps, const float mval_f[2])
static int project_bucket_iter_next(ProjPaintState *ps, int *bucket_index, rctf *bucket_bounds, const float mval[2])
{
- const int diameter = 2 * brush_size(ps->scene, ps->brush);
+ const int diameter = 2 * BKE_brush_size_get(ps->scene, ps->brush);
if (ps->thread_tot > 1)
BLI_lock_thread(LOCK_CUSTOM1);
@@ -3863,7 +3859,7 @@ static void *do_projectpaint_thread(void *ph_v)
float co[2];
float mask = 1.0f; /* airbrush wont use mask */
unsigned short mask_short;
- const float radius = (float)brush_size(ps->scene, ps->brush);
+ const float radius = (float)BKE_brush_size_get(ps->scene, ps->brush);
const float radius_squared = radius * radius; /* avoid a square root with every dist comparison */
short lock_alpha = ELEM(ps->brush->blend, IMB_BLEND_ERASE_ALPHA, IMB_BLEND_ADD_ALPHA) ? 0 : ps->brush->flag & BRUSH_LOCK_ALPHA;
@@ -3917,12 +3913,12 @@ static void *do_projectpaint_thread(void *ph_v)
if (dist_nosqrt <= radius_squared) {
dist = sqrtf(dist_nosqrt);
- falloff = brush_curve_strength_clamp(ps->brush, dist, radius);
+ falloff = BKE_brush_curve_strength_clamp(ps->brush, dist, radius);
if (falloff > 0.0f) {
if (ps->is_texbrush) {
/* note, for clone and smear, we only use the alpha, could be a special function */
- brush_sample_tex(ps->scene, ps->brush, projPixel->projCoSS, rgba, thread_index);
+ BKE_brush_sample_tex(ps->scene, ps->brush, projPixel->projCoSS, rgba, thread_index);
alpha = rgba[3];
}
else {
@@ -3931,7 +3927,7 @@ static void *do_projectpaint_thread(void *ph_v)
if (ps->is_airbrush) {
/* for an aurbrush there is no real mask, so just multiply the alpha by it */
- alpha *= falloff * brush_alpha(ps->scene, ps->brush);
+ alpha *= falloff * BKE_brush_alpha_get(ps->scene, ps->brush);
mask = ((float)projPixel->mask) / 65535.0f;
}
else {
@@ -3939,7 +3935,7 @@ static void *do_projectpaint_thread(void *ph_v)
falloff = 1.0f - falloff;
falloff = 1.0f - (falloff * falloff);
- mask_short = (unsigned short)(projPixel->mask * (brush_alpha(ps->scene, ps->brush) * falloff));
+ mask_short = (unsigned short)(projPixel->mask * (BKE_brush_alpha_get(ps->scene, ps->brush) * falloff));
if (mask_short > projPixel->mask_max) {
mask = ((float)mask_short) / 65535.0f;
projPixel->mask_max = mask_short;
@@ -4105,9 +4101,9 @@ static int project_paint_sub_stroke(ProjPaintState *ps, BrushPainter *painter, c
pos[1] = (float)(mval_i[1]);
// we may want to use this later
- // brush_painter_require_imbuf(painter, ((ibuf->rect_float)? 1: 0), 0, 0);
+ // BKE_brush_painter_require_imbuf(painter, ((ibuf->rect_float)? 1: 0), 0, 0);
- if (brush_painter_paint(painter, project_paint_op, pos, time, pressure, ps, 0)) {
+ if (BKE_brush_painter_paint(painter, project_paint_op, pos, time, pressure, ps, 0)) {
return 1;
}
else return 0;
@@ -4529,9 +4525,9 @@ static int imapaint_paint_sub_stroke(ImagePaintState *s, BrushPainter *painter,
pos[0] = uv[0] * ibuf->x;
pos[1] = uv[1] * ibuf->y;
- brush_painter_require_imbuf(painter, ((ibuf->rect_float) ? 1 : 0), 0, 0);
+ BKE_brush_painter_require_imbuf(painter, ((ibuf->rect_float) ? 1 : 0), 0, 0);
- if (brush_painter_paint(painter, imapaint_paint_op, pos, time, pressure, s, ibuf->profile == IB_PROFILE_LINEAR_RGB)) {
+ if (BKE_brush_painter_paint(painter, imapaint_paint_op, pos, time, pressure, s, ibuf->profile == IB_PROFILE_LINEAR_RGB)) {
if (update)
imapaint_image_update(s->sima, image, ibuf, texpaint);
return 1;
@@ -4584,7 +4580,7 @@ static int imapaint_paint_stroke(ViewContext *vc, ImagePaintState *s, BrushPaint
redraw |= imapaint_paint_sub_stroke(s, painter, s->image, texpaint,
fwuv, time, 1, pressure);
imapaint_clear_partial_redraw();
- brush_painter_break_stroke(painter);
+ BKE_brush_painter_break_stroke(painter);
}
/* set new canvas */
@@ -4779,7 +4775,7 @@ static void project_state_init(bContext *C, Object *ob, ProjPaintState *ps)
ps->do_backfacecull = (settings->imapaint.flag & IMAGEPAINT_PROJECT_BACKFACE) ? 0 : 1;
ps->do_occlude = (settings->imapaint.flag & IMAGEPAINT_PROJECT_XRAY) ? 0 : 1;
ps->do_mask_normal = (settings->imapaint.flag & IMAGEPAINT_PROJECT_FLAT) ? 0 : 1;
- ps->do_new_shading_nodes = scene_use_new_shading_nodes(scene); /* only cache the value */
+ ps->do_new_shading_nodes = BKE_scene_use_new_shading_nodes(scene); /* only cache the value */
if (ps->tool == PAINT_TOOL_CLONE)
ps->do_layer_clone = (settings->imapaint.flag & IMAGEPAINT_PROJECT_LAYER_CLONE);
@@ -4858,11 +4854,11 @@ static int texture_paint_init(bContext *C, wmOperator *op)
if (pop->mode == PAINT_MODE_3D && (pop->s.tool == PAINT_TOOL_CLONE))
pop->s.tool = PAINT_TOOL_DRAW;
pop->s.blend = brush->blend;
- pop->orig_brush_size = brush_size(scene, brush);
+ pop->orig_brush_size = BKE_brush_size_get(scene, brush);
if (pop->mode != PAINT_MODE_2D) {
Object *ob = OBACT;
- Mesh *me = get_mesh(ob);
+ Mesh *me = BKE_mesh_from_object(ob);
if (!me) {
return 0;
@@ -4924,8 +4920,8 @@ static int texture_paint_init(bContext *C, wmOperator *op)
return 0;
/* Don't allow brush size below 2 */
- if (brush_size(scene, brush) < 2)
- brush_set_size(scene, brush, 2);
+ if (BKE_brush_size_get(scene, brush) < 2)
+ BKE_brush_size_set(scene, brush, 2);
/* allocate and initialize spacial data structures */
project_paint_begin(&pop->ps);
@@ -4939,7 +4935,7 @@ static int texture_paint_init(bContext *C, wmOperator *op)
image_undo_restore, image_undo_free);
/* create painter */
- pop->painter = brush_painter_new(scene, pop->s.brush);
+ pop->painter = BKE_brush_painter_new(scene, pop->s.brush);
return 1;
}
@@ -5006,10 +5002,10 @@ static void paint_exit(bContext *C, wmOperator *op)
settings->imapaint.flag &= ~IMAGEPAINT_DRAWING;
imapaint_canvas_free(&pop->s);
- brush_painter_free(pop->painter);
+ BKE_brush_painter_free(pop->painter);
if (pop->mode == PAINT_MODE_3D_PROJECT) {
- brush_set_size(scene, pop->ps.brush, pop->orig_brush_size);
+ BKE_brush_size_set(scene, pop->ps.brush, pop->orig_brush_size);
paint_brush_exit_tex(pop->ps.brush);
project_paint_end(&pop->ps);
@@ -5038,7 +5034,8 @@ static int paint_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- RNA_BEGIN(op->ptr, itemptr, "stroke") {
+ RNA_BEGIN (op->ptr, itemptr, "stroke")
+ {
paint_apply(C, op, &itemptr);
}
RNA_END;
@@ -5082,13 +5079,13 @@ static void paint_apply_event(bContext *C, wmOperator *op, wmEvent *event)
/* special exception here for too high pressure values on first touch in
* windows for some tablets, then we just skip first touch .. */
- if (tablet && (pressure >= 0.99f) && ((pop->s.brush->flag & BRUSH_SPACING_PRESSURE) || brush_use_alpha_pressure(scene, pop->s.brush) || brush_use_size_pressure(scene, pop->s.brush)))
+ if (tablet && (pressure >= 0.99f) && ((pop->s.brush->flag & BRUSH_SPACING_PRESSURE) || BKE_brush_use_alpha_pressure(scene, pop->s.brush) || BKE_brush_use_size_pressure(scene, pop->s.brush)))
return;
/* This can be removed once fixed properly in
- * brush_painter_paint(BrushPainter *painter, BrushFunc func, float *pos, double time, float pressure, void *user)
+ * BKE_brush_painter_paint(BrushPainter *painter, BrushFunc func, float *pos, double time, float pressure, void *user)
* at zero pressure we should do nothing 1/2^12 is .0002 which is the sensitivity of the most sensitive pen tablet available */
- if (tablet && (pressure < .0002f) && ((pop->s.brush->flag & BRUSH_SPACING_PRESSURE) || brush_use_alpha_pressure(scene, pop->s.brush) || brush_use_size_pressure(scene, pop->s.brush)))
+ if (tablet && (pressure < .0002f) && ((pop->s.brush->flag & BRUSH_SPACING_PRESSURE) || BKE_brush_use_alpha_pressure(scene, pop->s.brush) || BKE_brush_use_size_pressure(scene, pop->s.brush)))
return;
}
@@ -5163,6 +5160,7 @@ void PAINT_OT_image_paint(wmOperatorType *ot)
/* identifiers */
ot->name = "Image Paint";
ot->idname = "PAINT_OT_image_paint";
+ ot->description = "Paint a stroke into the image";
/* api callbacks */
ot->exec = paint_exec;
@@ -5211,7 +5209,7 @@ static void brush_drawcursor(bContext *C, int x, int y, void *UNUSED(customdata)
if (paint && brush && paint->flags & PAINT_SHOW_BRUSH) {
ToolSettings *ts;
float zoomx, zoomy;
- const float size = (float)brush_size(scene, brush);
+ const float size = (float)BKE_brush_size_get(scene, brush);
short use_zoom;
float pixel_size;
float alpha = 0.5f;
@@ -5390,6 +5388,7 @@ void PAINT_OT_grab_clone(wmOperatorType *ot)
/* identifiers */
ot->name = "Grab Clone";
ot->idname = "PAINT_OT_grab_clone";
+ ot->description = "Move the clone source image";
/* api callbacks */
ot->exec = grab_clone_exec;
@@ -5454,7 +5453,7 @@ static int image_paint_sample_color_poll(bContext *C)
if (CTX_wm_view3d(C)) {
Object *obact = CTX_data_active_object(C);
if (obact && obact->mode & OB_MODE_TEXTURE_PAINT) {
- Mesh *me = get_mesh(obact);
+ Mesh *me = BKE_mesh_from_object(obact);
if (me) {
return !(me->editflag & ME_EDIT_PAINT_MASK);
}
@@ -5472,6 +5471,7 @@ void PAINT_OT_sample_color(wmOperatorType *ot)
/* identifiers */
ot->name = "Sample Color";
ot->idname = "PAINT_OT_sample_color";
+ ot->description = "Use the mouse to sample a color in the image";
/* api callbacks */
ot->exec = sample_color_exec;
@@ -5523,6 +5523,7 @@ void PAINT_OT_clone_cursor_set(wmOperatorType *ot)
/* identifiers */
ot->name = "Set Clone Cursor";
ot->idname = "PAINT_OT_clone_cursor_set";
+ ot->description = "Set the location of the clone cursor";
/* api callbacks */
ot->exec = set_clone_cursor_exec;
@@ -5557,12 +5558,12 @@ static int texture_paint_toggle_exec(bContext *C, wmOperator *op)
if (ob == NULL)
return OPERATOR_CANCELLED;
- if (object_data_is_libdata(ob)) {
+ if (BKE_object_obdata_is_libdata(ob)) {
BKE_report(op->reports, RPT_ERROR, "Can't edit external libdata");
return OPERATOR_CANCELLED;
}
- me = get_mesh(ob);
+ me = BKE_mesh_from_object(ob);
if (!(ob->mode & OB_MODE_TEXTURE_PAINT) && !me) {
BKE_report(op->reports, RPT_ERROR, "Can only enter texture paint mode for mesh objects");
@@ -5605,6 +5606,7 @@ void PAINT_OT_texture_paint_toggle(wmOperatorType *ot)
/* identifiers */
ot->name = "Texture Paint Toggle";
ot->idname = "PAINT_OT_texture_paint_toggle";
+ ot->description = "Toggle texture paint mode in 3D view";
/* api callbacks */
ot->exec = texture_paint_toggle_exec;
@@ -5705,8 +5707,8 @@ static int texture_paint_camera_project_exec(bContext *C, wmOperator *op)
/* override */
ps.is_texbrush = 0;
ps.is_airbrush = 1;
- orig_brush_size = brush_size(scene, ps.brush);
- brush_set_size(scene, ps.brush, 32); /* cover the whole image */
+ orig_brush_size = BKE_brush_size_get(scene, ps.brush);
+ BKE_brush_size_set(scene, ps.brush, 32); /* cover the whole image */
ps.tool = PAINT_TOOL_DRAW; /* so pixels are initialized with minimal info */
@@ -5719,7 +5721,7 @@ static int texture_paint_camera_project_exec(bContext *C, wmOperator *op)
project_paint_begin(&ps);
if (ps.dm == NULL) {
- brush_set_size(scene, ps.brush, orig_brush_size);
+ BKE_brush_size_set(scene, ps.brush, orig_brush_size);
return OPERATOR_CANCELLED;
}
else {
@@ -5743,7 +5745,7 @@ static int texture_paint_camera_project_exec(bContext *C, wmOperator *op)
project_paint_end(&ps);
scene->toolsettings->imapaint.flag &= ~IMAGEPAINT_DRAWING;
- brush_set_size(scene, ps.brush, orig_brush_size);
+ BKE_brush_size_set(scene, ps.brush, orig_brush_size);
return OPERATOR_FINISHED;
}
@@ -5797,7 +5799,7 @@ static int texture_paint_image_from_view_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- image = BKE_add_image_imbuf(ibuf);
+ image = BKE_image_add_from_imbuf(ibuf);
if (image) {
/* now for the trickyness. store the view projection here!
diff --git a/source/blender/editors/sculpt_paint/paint_intern.h b/source/blender/editors/sculpt_paint/paint_intern.h
index 200fd8e65c7..65fb65c1553 100644
--- a/source/blender/editors/sculpt_paint/paint_intern.h
+++ b/source/blender/editors/sculpt_paint/paint_intern.h
@@ -53,15 +53,16 @@ struct wmOperatorType;
typedef int (*StrokeGetLocation)(struct bContext *C, float location[3], float mouse[2]);
typedef int (*StrokeTestStart)(struct bContext *C, struct wmOperator *op, struct wmEvent *event);
typedef void (*StrokeUpdateStep)(struct bContext *C, struct PaintStroke *stroke, struct PointerRNA *itemptr);
-typedef void (*StrokeDone)(struct bContext *C, struct PaintStroke *stroke);
+typedef void (*StrokeDone)(const struct bContext *C, struct PaintStroke *stroke);
struct PaintStroke *paint_stroke_new(struct bContext *C,
StrokeGetLocation get_location, StrokeTestStart test_start,
StrokeUpdateStep update_step, StrokeDone done, int event_type);
-void paint_stroke_free(struct PaintStroke *stroke);
+void paint_stroke_data_free(struct wmOperator *op);
int paint_space_stroke_enabled(struct Brush *br);
+struct wmKeyMap *paint_stroke_modal_keymap(struct wmKeyConfig *keyconf);
int paint_stroke_modal(struct bContext *C, struct wmOperator *op, struct wmEvent *event);
int paint_stroke_exec(struct bContext *C, struct wmOperator *op);
int paint_stroke_cancel(struct bContext *C, struct wmOperator *op);
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c
index b5d6f20aa79..c42f0e03d79 100644
--- a/source/blender/editors/sculpt_paint/paint_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_ops.c
@@ -63,9 +63,9 @@ static int brush_add_exec(bContext *C, wmOperator *UNUSED(op))
struct Brush *br = paint_brush(paint);
if (br)
- br = copy_brush(br);
+ br = BKE_brush_copy(br);
else
- br = add_brush("Brush");
+ br = BKE_brush_add("Brush");
paint_brush_set(paint_get_active(CTX_data_scene(C)), br);
@@ -98,7 +98,7 @@ static int brush_scale_size_exec(bContext *C, wmOperator *op)
if (brush) {
// pixel radius
{
- const int old_size = brush_size(scene, brush);
+ const int old_size = BKE_brush_size_get(scene, brush);
int size = (int)(scalar * old_size);
if (old_size == size) {
@@ -111,17 +111,17 @@ static int brush_scale_size_exec(bContext *C, wmOperator *op)
}
CLAMP(size, 1, 2000); // XXX magic number
- brush_set_size(scene, brush, size);
+ BKE_brush_size_set(scene, brush, size);
}
// unprojected radius
{
- float unprojected_radius = scalar * brush_unprojected_radius(scene, brush);
+ float unprojected_radius = scalar * BKE_brush_unprojected_radius_get(scene, brush);
if (unprojected_radius < 0.001f) // XXX magic number
unprojected_radius = 0.001f;
- brush_set_unprojected_radius(scene, brush, unprojected_radius);
+ BKE_brush_unprojected_radius_set(scene, brush, unprojected_radius);
}
}
@@ -160,6 +160,7 @@ static void PAINT_OT_vertex_color_set(wmOperatorType *ot)
/* identifiers */
ot->name = "Set Vertex Colors";
ot->idname = "PAINT_OT_vertex_color_set";
+ ot->description = "Fill the active vertex color layer with the current paint color";
/* api callbacks */
ot->exec = vertex_color_set_exec;
@@ -178,7 +179,7 @@ static int brush_reset_exec(bContext *C, wmOperator *UNUSED(op))
if (!ob) return OPERATOR_CANCELLED;
if (ob->mode & OB_MODE_SCULPT)
- brush_reset_sculpt(brush);
+ BKE_brush_sculpt_reset(brush);
/* TODO: other modes */
return OPERATOR_FINISHED;
@@ -530,6 +531,9 @@ static void ed_keymap_paint_brush_radial_control(wmKeyMap *keymap, const char *p
kmi = WM_keymap_add_item(keymap, "WM_OT_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0);
set_brush_rc_props(kmi->ptr, paint, "strength", "use_unified_strength", flags);
+ kmi = WM_keymap_add_item(keymap, "WM_OT_radial_control", WKEY, KM_PRESS, 0, 0);
+ set_brush_rc_props(kmi->ptr, paint, "weight", "use_unified_weight", flags);
+
if (flags & RC_ROTATION) {
kmi = WM_keymap_add_item(keymap, "WM_OT_radial_control", FKEY, KM_PRESS, KM_CTRL, 0);
set_brush_rc_props(kmi->ptr, paint, "texture_slot.angle", NULL, flags);
@@ -709,4 +713,7 @@ void ED_keymap_paint(wmKeyConfig *keyconf)
RNA_enum_set(WM_keymap_add_item(keymap, "BRUSH_OT_uv_sculpt_tool_set", PKEY, KM_PRESS, 0, 0)->ptr, "tool", UV_SCULPT_TOOL_PINCH);
RNA_enum_set(WM_keymap_add_item(keymap, "BRUSH_OT_uv_sculpt_tool_set", GKEY, KM_PRESS, 0, 0)->ptr, "tool", UV_SCULPT_TOOL_GRAB);
+ /* paint stroke */
+ keymap = paint_stroke_modal_keymap(keyconf);
+ WM_modalkeymap_assign(keymap, "SCULPT_OT_brush_stroke");
}
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index fb640346a99..9832bcf1528 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -146,10 +146,10 @@ static void paint_brush_stroke_add_step(bContext *C, wmOperator *op, wmEvent *ev
if (stroke->vc.obact->sculpt) {
float delta[2];
- brush_jitter_pos(scene, brush, mouse_in, mouse);
+ BKE_brush_jitter_pos(scene, brush, mouse_in, mouse);
/* XXX: meh, this is round about because
- * brush_jitter_pos isn't written in the best way to
+ * BKE_brush_jitter_pos isn't written in the best way to
* be reused here */
if (brush->flag & BRUSH_JITTER_PRESSURE) {
sub_v2_v2v2(delta, mouse, mouse_in);
@@ -188,7 +188,11 @@ static int paint_smooth_stroke(PaintStroke *stroke, float output[2], wmEvent *ev
output[1] = event->y;
if ((stroke->brush->flag & BRUSH_SMOOTH_STROKE) &&
- !ELEM4(stroke->brush->sculpt_tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_THUMB, SCULPT_TOOL_ROTATE, SCULPT_TOOL_SNAKE_HOOK) &&
+ !ELEM4(stroke->brush->sculpt_tool,
+ SCULPT_TOOL_GRAB,
+ SCULPT_TOOL_THUMB,
+ SCULPT_TOOL_ROTATE,
+ SCULPT_TOOL_SNAKE_HOOK) &&
!(stroke->brush->flag & BRUSH_ANCHORED) &&
!(stroke->brush->flag & BRUSH_RESTORE_MESH))
{
@@ -231,11 +235,11 @@ static int paint_space_stroke(bContext *C, wmOperator *op, wmEvent *event, const
float pressure = 1.0f;
/* XXX mysterious :) what has 'use size' do with this here... if you don't check for it, pressure fails */
- if (brush_use_size_pressure(scene, stroke->brush))
+ if (BKE_brush_use_size_pressure(scene, stroke->brush))
pressure = event_tablet_data(event, NULL);
if (pressure > FLT_EPSILON) {
- scale = (brush_size(scene, stroke->brush) * pressure * stroke->brush->spacing / 50.0f) / length;
+ scale = (BKE_brush_size_get(scene, stroke->brush) * pressure * stroke->brush->spacing / 50.0f) / length;
if (scale > FLT_EPSILON) {
mul_v2_fl(vec, scale);
@@ -276,9 +280,30 @@ PaintStroke *paint_stroke_new(bContext *C,
return stroke;
}
-void paint_stroke_free(PaintStroke *stroke)
+void paint_stroke_data_free(struct wmOperator *op)
{
- MEM_freeN(stroke);
+ MEM_freeN(op->customdata);
+ op->customdata = NULL;
+}
+
+static void stroke_done(struct bContext *C, struct wmOperator *op)
+{
+ struct PaintStroke *stroke = op->customdata;
+
+ if (stroke->stroke_started && stroke->done)
+ stroke->done(C, stroke);
+
+ if (stroke->timer) {
+ WM_event_remove_timer(
+ CTX_wm_manager(C),
+ CTX_wm_window(C),
+ stroke->timer);
+ }
+
+ if (stroke->smooth_stroke_cursor)
+ WM_paint_cursor_end(CTX_wm_manager(C), stroke->smooth_stroke_cursor);
+
+ paint_stroke_data_free(op);
}
/* Returns zero if the stroke dots should not be spaced, non-zero otherwise */
@@ -289,6 +314,35 @@ int paint_space_stroke_enabled(Brush *br)
!ELEM4(br->sculpt_tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_THUMB, SCULPT_TOOL_ROTATE, SCULPT_TOOL_SNAKE_HOOK);
}
+#define PAINT_STROKE_MODAL_CANCEL 1
+
+/* called in paint_ops.c, on each regeneration of keymaps */
+struct wmKeyMap *paint_stroke_modal_keymap(struct wmKeyConfig *keyconf)
+{
+ static struct EnumPropertyItem modal_items[] = {
+ {PAINT_STROKE_MODAL_CANCEL, "CANCEL", 0,
+ "Cancel",
+ "Cancel and undo a stroke in progress"},
+
+ { 0 }
+ };
+
+ static const char *name = "Paint Stroke Modal";
+
+ struct wmKeyMap *keymap = WM_modalkeymap_get(keyconf, name);
+
+ /* this function is called for each spacetype, only needs to add map once */
+ if (!keymap) {
+ keymap = WM_modalkeymap_add(keyconf, name, modal_items);
+
+ /* items for modal map */
+ WM_modalkeymap_add_item(
+ keymap, ESCKEY, KM_PRESS, KM_ANY, 0, PAINT_STROKE_MODAL_CANCEL);
+ }
+
+ return keymap;
+}
+
int paint_stroke_modal(bContext *C, wmOperator *op, wmEvent *event)
{
PaintStroke *stroke = op->customdata;
@@ -319,16 +373,16 @@ int paint_stroke_modal(bContext *C, wmOperator *op, wmEvent *event)
//ED_region_tag_redraw(ar);
}
- if (event->type == stroke->event_type && event->val == KM_RELEASE) {
- /* exit stroke, free data */
- if (stroke->smooth_stroke_cursor)
- WM_paint_cursor_end(CTX_wm_manager(C), stroke->smooth_stroke_cursor);
-
- if (stroke->timer)
- WM_event_remove_timer(CTX_wm_manager(C), CTX_wm_window(C), stroke->timer);
+ /* Cancel */
+ if (event->type == EVT_MODAL_MAP && event->val == PAINT_STROKE_MODAL_CANCEL) {
+ if (op->type->cancel)
+ return op->type->cancel(C, op);
+ else
+ return paint_stroke_cancel(C, op);
+ }
- stroke->done(C, stroke);
- MEM_freeN(stroke);
+ if (event->type == stroke->event_type && event->val == KM_RELEASE) {
+ stroke_done(C, op);
return OPERATOR_FINISHED;
}
else if ((first) ||
@@ -377,29 +431,20 @@ int paint_stroke_exec(bContext *C, wmOperator *op)
stroke->stroke_started = 1;
}
- RNA_BEGIN(op->ptr, itemptr, "stroke") {
+ RNA_BEGIN (op->ptr, itemptr, "stroke")
+ {
stroke->update_step(C, stroke, &itemptr);
}
RNA_END;
- stroke->done(C, stroke);
-
- MEM_freeN(stroke);
- op->customdata = NULL;
+ stroke_done(C, op);
return OPERATOR_FINISHED;
}
int paint_stroke_cancel(bContext *C, wmOperator *op)
{
- PaintStroke *stroke = op->customdata;
-
- if (stroke->done)
- stroke->done(C, stroke);
-
- MEM_freeN(stroke);
- op->customdata = NULL;
-
+ stroke_done(C, op);
return OPERATOR_CANCELLED;
}
diff --git a/source/blender/editors/sculpt_paint/paint_undo.c b/source/blender/editors/sculpt_paint/paint_undo.c
index 65bcfcb7024..8e6c87c1510 100644
--- a/source/blender/editors/sculpt_paint/paint_undo.c
+++ b/source/blender/editors/sculpt_paint/paint_undo.c
@@ -1,7 +1,4 @@
/*
- *
- * Undo system for painting and sculpting.
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -23,6 +20,7 @@
/** \file blender/editors/sculpt_paint/paint_undo.c
* \ingroup edsculpt
+ * \brief Undo system for painting and sculpting.
*/
diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c
index 89a46272a8f..4c374674c9a 100644
--- a/source/blender/editors/sculpt_paint/paint_utils.c
+++ b/source/blender/editors/sculpt_paint/paint_utils.c
@@ -186,7 +186,7 @@ float paint_get_tex_pixel(Brush *br, float u, float v)
hasrgb = multitex_ext(br->mtex.tex, co, NULL, NULL, 0, &texres);
if (hasrgb & TEX_RGB)
- texres.tin = (0.35f * texres.tr + 0.45f * texres.tg + 0.2f * texres.tb) * texres.ta;
+ texres.tin = rgb_to_grayscale(&texres.tr) * texres.ta;
return texres.tin;
}
@@ -358,7 +358,7 @@ void paint_sample_color(Scene *scene, ARegion *ar, int x, int y) /* frontbuf
static int brush_curve_preset_exec(bContext *C, wmOperator *op)
{
Brush *br = paint_brush(paint_get_active(CTX_data_scene(C)));
- brush_curve_preset(br, RNA_enum_get(op->ptr, "shape"));
+ BKE_brush_curve_preset(br, RNA_enum_get(op->ptr, "shape"));
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index bd448cc8288..c01da3a816f 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -93,7 +93,7 @@ static int vertex_paint_use_fast_update_check(Object *ob)
DerivedMesh *dm = ob->derivedFinal;
if (dm) {
- Mesh *me = get_mesh(ob);
+ Mesh *me = BKE_mesh_from_object(ob);
if (me && me->mcol) {
return (me->mcol == CustomData_get_layer(&dm->faceData, CD_MCOL));
}
@@ -110,7 +110,7 @@ static int vertex_paint_use_tessface_check(Object *ob)
DerivedMesh *dm = ob->derivedFinal;
if (dm) {
- Mesh *me = get_mesh(ob);
+ Mesh *me = BKE_mesh_from_object(ob);
return (me->mpoly == CustomData_get_layer(&dm->faceData, CD_MPOLY));
}
@@ -198,8 +198,8 @@ static void do_shared_vertex_tesscol(Mesh *me)
{
/* if no mcol: do not do */
/* if tface: only the involved faces, otherwise all */
+ const int use_face_sel = (me->editflag & ME_EDIT_PAINT_MASK);
MFace *mface;
- MTFace *tface;
int a;
short *scolmain, *scol;
char *mcol;
@@ -208,11 +208,10 @@ static void do_shared_vertex_tesscol(Mesh *me)
scolmain = MEM_callocN(4 * sizeof(short) * me->totvert, "colmain");
- tface = me->mtface;
mface = me->mface;
mcol = (char *)me->mcol;
for (a = me->totface; a > 0; a--, mface++, mcol += 16) {
- if ((tface && tface->mode & TF_SHAREDCOL) || (me->editflag & ME_EDIT_PAINT_MASK) == 0) {
+ if ((use_face_sel == FALSE) || (mface->flag & ME_FACE_SEL)) {
scol = scolmain + 4 * mface->v1;
scol[0]++; scol[1] += mcol[1]; scol[2] += mcol[2]; scol[3] += mcol[3];
scol = scolmain + 4 * mface->v2;
@@ -224,7 +223,6 @@ static void do_shared_vertex_tesscol(Mesh *me)
scol[0]++; scol[1] += mcol[13]; scol[2] += mcol[14]; scol[3] += mcol[15];
}
}
- if (tface) tface++;
}
a = me->totvert;
@@ -237,12 +235,11 @@ static void do_shared_vertex_tesscol(Mesh *me)
}
scol += 4;
}
-
- tface = me->mtface;
+
mface = me->mface;
mcol = (char *)me->mcol;
for (a = me->totface; a > 0; a--, mface++, mcol += 16) {
- if ((tface && tface->mode & TF_SHAREDCOL) || (me->editflag & ME_EDIT_PAINT_MASK) == 0) {
+ if ((use_face_sel == FALSE) || (mface->flag & ME_FACE_SEL)) {
scol = scolmain + 4 * mface->v1;
mcol[1] = scol[1]; mcol[2] = scol[2]; mcol[3] = scol[3];
scol = scolmain + 4 * mface->v2;
@@ -254,7 +251,6 @@ static void do_shared_vertex_tesscol(Mesh *me)
mcol[13] = scol[1]; mcol[14] = scol[2]; mcol[15] = scol[3];
}
}
- if (tface) tface++;
}
MEM_freeN(scolmain);
@@ -262,12 +258,12 @@ static void do_shared_vertex_tesscol(Mesh *me)
void do_shared_vertexcol(Mesh *me, int do_tessface)
{
+ const int use_face_sel = (me->editflag & ME_EDIT_PAINT_MASK);
MLoop *ml = me->mloop;
MLoopCol *lcol = me->mloopcol;
- MTexPoly *mtp = me->mtpoly;
- MPoly *mp = me->mpoly;
- float (*scol)[5];
- int i, has_shared = 0;
+ MPoly *mp;
+ float (*scol)[4];
+ int i, j, has_shared = 0;
/* if no mloopcol: do not do */
/* if mtexpoly: only the involved faces, otherwise all */
@@ -276,42 +272,37 @@ void do_shared_vertexcol(Mesh *me, int do_tessface)
scol = MEM_callocN(sizeof(float) * me->totvert * 5, "scol");
- for (i = 0; i < me->totloop; i++, ml++, lcol++) {
- if (i >= mp->loopstart + mp->totloop) {
- mp++;
- if (mtp) mtp++;
+ for (i = 0, mp = me->mpoly; i < me->totpoly; i++, mp++) {
+ if ((use_face_sel == FALSE) || (mp->flag & ME_FACE_SEL)) {
+ ml = me->mloop + mp->loopstart;
+ lcol = me->mloopcol + mp->loopstart;
+ for (j = 0; j < mp->totloop; j++, ml++, lcol++) {
+ scol[ml->v][0] += lcol->r;
+ scol[ml->v][1] += lcol->g;
+ scol[ml->v][2] += lcol->b;
+ scol[ml->v][3] += 1.0f;
+ has_shared = 1;
+ }
}
-
- if (!(mtp && (mtp->mode & TF_SHAREDCOL)) && (me->editflag & ME_EDIT_PAINT_MASK) != 0)
- continue;
-
- scol[ml->v][0] += lcol->r;
- scol[ml->v][1] += lcol->g;
- scol[ml->v][2] += lcol->b;
- scol[ml->v][3] += lcol->a;
- scol[ml->v][4] += 1.0;
- has_shared = 1;
}
-
+
if (has_shared) {
for (i = 0; i < me->totvert; i++) {
- if (!scol[i][4]) continue;
-
- scol[i][0] /= scol[i][4];
- scol[i][1] /= scol[i][4];
- scol[i][2] /= scol[i][4];
- scol[i][3] /= scol[i][4];
+ if (scol[i][3] != 0.0f) {
+ mul_v3_fl(scol[i], 1.0f / scol[i][3]);
+ }
}
-
- ml = me->mloop;
- lcol = me->mloopcol;
- for (i = 0; i < me->totloop; i++, ml++, lcol++) {
- if (!scol[ml->v][4]) continue;
- lcol->r = scol[ml->v][0];
- lcol->g = scol[ml->v][1];
- lcol->b = scol[ml->v][2];
- lcol->a = scol[ml->v][3];
+ for (i = 0, mp = me->mpoly; i < me->totpoly; i++, mp++) {
+ if ((use_face_sel == FALSE) || (mp->flag & ME_FACE_SEL)) {
+ ml = me->mloop + mp->loopstart;
+ lcol = me->mloopcol + mp->loopstart;
+ for (j = 0; j < mp->totloop; j++, ml++, lcol++) {
+ lcol->r = scol[ml->v][0];
+ lcol->g = scol[ml->v][1];
+ lcol->b = scol[ml->v][2];
+ }
+ }
}
}
@@ -326,7 +317,7 @@ static void make_vertexcol(Object *ob) /* single ob */
{
Mesh *me;
if (!ob || ob->id.lib) return;
- me = get_mesh(ob);
+ me = BKE_mesh_from_object(ob);
if (me == NULL) return;
if (me->edit_btmesh) return;
@@ -442,7 +433,7 @@ void vpaint_fill(Object *ob, unsigned int paintcol)
MLoopCol *lcol;
int i, j, selected;
- me = get_mesh(ob);
+ me = BKE_mesh_from_object(ob);
if (me == NULL || me->totpoly == 0) return;
if (!me->mloopcol) make_vertexcol(ob);
@@ -560,7 +551,7 @@ void vpaint_dogamma(Scene *scene)
unsigned char *cp, gamtab[256];
ob = OBACT;
- me = get_mesh(ob);
+ me = BKE_mesh_from_object(ob);
if (!(ob->mode & OB_MODE_VERTEX_PAINT)) return;
if (me == 0 || me->mcol == 0 || me->totface == 0) return;
@@ -868,7 +859,7 @@ static float calc_vp_strength_dl(VPaint *vp, ViewContext *vc, const float *vert_
}
else {
const float dist = sqrtf(dist_squared);
- return brush_curve_strength_clamp(brush, dist, brush_size_pressure);
+ return BKE_brush_curve_strength_clamp(brush, dist, brush_size_pressure);
}
}
@@ -1016,7 +1007,7 @@ static int weight_sample_invoke(bContext *C, wmOperator *op, wmEvent *event)
short change = FALSE;
view3d_set_viewcontext(C, &vc);
- me = get_mesh(vc.obact);
+ me = BKE_mesh_from_object(vc.obact);
if (me && me->dvert && vc.v3d && vc.rv3d) {
int index;
@@ -1034,7 +1025,9 @@ static int weight_sample_invoke(bContext *C, wmOperator *op, wmEvent *event)
else {
MPoly *mp = ((MPoly *)me->mpoly) + (index - 1);
const int vgroup_active = vc.obact->actdef - 1;
+ Scene *scene = vc.scene;
ToolSettings *ts = vc.scene->toolsettings;
+ Brush *brush = paint_brush(&ts->wpaint->paint);
float mval_f[2];
int v_idx_best = -1;
int fidx;
@@ -1057,7 +1050,8 @@ static int weight_sample_invoke(bContext *C, wmOperator *op, wmEvent *event)
} while (fidx--);
if (v_idx_best != -1) { /* should always be valid */
- ts->vgroup_weight = defvert_find_weight(&me->dvert[v_idx_best], vgroup_active);
+ float vgroup_weight = defvert_find_weight(&me->dvert[v_idx_best], vgroup_active);
+ BKE_brush_weight_set(scene, brush, vgroup_weight);
change = TRUE;
}
}
@@ -1081,6 +1075,7 @@ void PAINT_OT_weight_sample(wmOperatorType *ot)
/* identifiers */
ot->name = "Weight Paint Sample Weight";
ot->idname = "PAINT_OT_weight_sample";
+ ot->description = "Use the mouse to sample a weight in the 3D view";
/* api callbacks */
ot->invoke = weight_sample_invoke;
@@ -1100,7 +1095,7 @@ static EnumPropertyItem *weight_paint_sample_enum_itemf(bContext *C, PointerRNA
Mesh *me;
view3d_set_viewcontext(C, &vc);
- me = get_mesh(vc.obact);
+ me = BKE_mesh_from_object(vc.obact);
if (me && me->dvert && vc.v3d && vc.rv3d) {
int index;
@@ -1182,6 +1177,7 @@ void PAINT_OT_weight_sample_group(wmOperatorType *ot)
/* identifiers */
ot->name = "Weight Paint Sample Group";
ot->idname = "PAINT_OT_weight_sample_group";
+ ot->description = "Select one of the vertex groups available under current mouse position";
/* api callbacks */
ot->exec = weight_sample_group_exec;
@@ -1647,7 +1643,7 @@ typedef struct WeightPaintInfo {
char do_multipaint;
char do_auto_normalize;
- float brush_alpha_value; /* result of brush_alpha() */
+ float brush_alpha_value; /* result of BKE_brush_alpha_get() */
} WeightPaintInfo;
/* fresh start to make multi-paint and locking modular */
@@ -1981,7 +1977,7 @@ static int set_wpaint(bContext *C, wmOperator *UNUSED(op)) /* toggle */
VPaint *wp = scene->toolsettings->wpaint;
Mesh *me;
- me = get_mesh(ob);
+ me = BKE_mesh_from_object(ob);
if (ob->id.lib || me == NULL) return OPERATOR_PASS_THROUGH;
if (ob->mode & OB_MODE_WEIGHT_PAINT) ob->mode &= ~OB_MODE_WEIGHT_PAINT;
@@ -2044,6 +2040,7 @@ void PAINT_OT_weight_paint_toggle(wmOperatorType *ot)
/* identifiers */
ot->name = "Weight Paint Mode";
ot->idname = "PAINT_OT_weight_paint_toggle";
+ ot->description = "Toggle weight paint mode in 3D view";
/* api callbacks */
ot->exec = set_wpaint;
@@ -2145,7 +2142,7 @@ static int wpaint_stroke_test_start(bContext *C, wmOperator *op, wmEvent *UNUSED
return FALSE;
}
- me = get_mesh(ob);
+ me = BKE_mesh_from_object(ob);
if (me == NULL || me->totpoly == 0) return OPERATOR_PASS_THROUGH;
/* if nothing was added yet, we make dverts and a vertex deform group */
@@ -2160,7 +2157,7 @@ static int wpaint_stroke_test_start(bContext *C, wmOperator *op, wmEvent *UNUSED
if ((modob = modifiers_isDeformedByArmature(ob))) {
Bone *actbone = ((bArmature *)modob->data)->act_bone;
if (actbone) {
- bPoseChannel *pchan = get_pose_channel(modob->pose, actbone->name);
+ bPoseChannel *pchan = BKE_pose_channel_find_name(modob->pose, actbone->name);
if (pchan) {
bDeformGroup *dg = defgroup_find_name(ob, pchan->name);
@@ -2250,9 +2247,9 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
char *defbase_sel;
const float pressure = RNA_float_get(itemptr, "pressure");
- const float brush_size_pressure = brush_size(scene, brush) * (brush_use_size_pressure(scene, brush) ? pressure : 1.0f);
- const float brush_alpha_value = brush_alpha(scene, brush);
- const float brush_alpha_pressure = brush_alpha_value * (brush_use_alpha_pressure(scene, brush) ? pressure : 1.0f);
+ const float brush_size_pressure = BKE_brush_size_get(scene, brush) * (BKE_brush_use_size_pressure(scene, brush) ? pressure : 1.0f);
+ const float brush_alpha_value = BKE_brush_alpha_get(scene, brush);
+ const float brush_alpha_pressure = brush_alpha_value * (BKE_brush_use_alpha_pressure(scene, brush) ? pressure : 1.0f);
/* intentionally don't initialize as NULL, make sure we initialize all members below */
WeightPaintInfo wpi;
@@ -2348,7 +2345,7 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
if (brush->vertexpaint_tool == PAINT_BLEND_BLUR)
paintweight = 0.0f;
else
- paintweight = ts->vgroup_weight;
+ paintweight = BKE_brush_weight_get(scene, brush);
for (index = 0; index < totindex; index++) {
if (indexar[index] && indexar[index] <= me->totpoly) {
@@ -2427,7 +2424,7 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
ED_region_tag_redraw(vc->ar);
}
-static void wpaint_stroke_done(bContext *C, struct PaintStroke *stroke)
+static void wpaint_stroke_done(const bContext *C, struct PaintStroke *stroke)
{
ToolSettings *ts = CTX_data_tool_settings(C);
Object *ob = CTX_data_active_object(C);
@@ -2496,6 +2493,7 @@ void PAINT_OT_weight_paint(wmOperatorType *ot)
/* identifiers */
ot->name = "Weight Paint";
ot->idname = "PAINT_OT_weight_paint";
+ ot->description = "Paint a stroke in the current vertex group's weights";
/* api callbacks */
ot->invoke = wpaint_invoke;
@@ -2514,8 +2512,11 @@ static int weight_paint_set_exec(bContext *C, wmOperator *UNUSED(op))
{
struct Scene *scene = CTX_data_scene(C);
Object *obact = CTX_data_active_object(C);
+ ToolSettings *ts = CTX_data_tool_settings(C);
+ Brush *brush = paint_brush(&ts->wpaint->paint);
+ float vgroup_weight = BKE_brush_weight_get(scene, brush);
- wpaint_fill(scene->toolsettings->wpaint, obact, scene->toolsettings->vgroup_weight);
+ wpaint_fill(scene->toolsettings->wpaint, obact, vgroup_weight);
ED_region_tag_redraw(CTX_wm_region(C)); /* XXX - should redraw all 3D views */
return OPERATOR_FINISHED;
}
@@ -2525,6 +2526,7 @@ void PAINT_OT_weight_set(wmOperatorType *ot)
/* identifiers */
ot->name = "Set Weight";
ot->idname = "PAINT_OT_weight_set";
+ ot->description = "Fill the active vertex group with the current paint weight";
/* api callbacks */
ot->exec = weight_paint_set_exec;
@@ -2544,9 +2546,9 @@ static int set_vpaint(bContext *C, wmOperator *op) /* toggle */
VPaint *vp = scene->toolsettings->vpaint;
Mesh *me;
- me = get_mesh(ob);
+ me = BKE_mesh_from_object(ob);
- if (me == NULL || object_data_is_libdata(ob)) {
+ if (me == NULL || BKE_object_obdata_is_libdata(ob)) {
ob->mode &= ~OB_MODE_VERTEX_PAINT;
return OPERATOR_PASS_THROUGH;
}
@@ -2589,6 +2591,7 @@ void PAINT_OT_vertex_paint_toggle(wmOperatorType *ot)
/* identifiers */
ot->name = "Vertex Paint Mode";
ot->idname = "PAINT_OT_vertex_paint_toggle";
+ ot->description = "Toggle the vertex paint mode in 3D view";
/* api callbacks */
ot->exec = set_vpaint;
@@ -2681,7 +2684,7 @@ static int vpaint_stroke_test_start(bContext *C, struct wmOperator *op, wmEvent
float mat[4][4], imat[4][4];
/* context checks could be a poll() */
- me = get_mesh(ob);
+ me = BKE_mesh_from_object(ob);
if (me == NULL || me->totpoly == 0)
return OPERATOR_PASS_THROUGH;
@@ -2729,7 +2732,7 @@ static void vpaint_paint_face(VPaint *vp, VPaintData *vpd, Object *ob,
{
ViewContext *vc = &vpd->vc;
Brush *brush = paint_brush(&vp->paint);
- Mesh *me = get_mesh(ob);
+ Mesh *me = BKE_mesh_from_object(ob);
MFace *mface = &me->mface[index];
unsigned int *mcol = ((unsigned int *)me->mcol) + 4 * index;
unsigned int *mcolorig = ((unsigned int *)vp->vpaint_prev) + 4 * index;
@@ -2774,7 +2777,7 @@ static void vpaint_paint_poly(VPaint *vp, VPaintData *vpd, Object *ob,
{
ViewContext *vc = &vpd->vc;
Brush *brush = paint_brush(&vp->paint);
- Mesh *me = get_mesh(ob);
+ Mesh *me = BKE_mesh_from_object(ob);
MPoly *mpoly = &me->mpoly[index];
MFace *mf;
MCol *mc;
@@ -2873,8 +2876,8 @@ static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
float mval[2];
const float pressure = RNA_float_get(itemptr, "pressure");
- const float brush_size_pressure = brush_size(scene, brush) * (brush_use_size_pressure(scene, brush) ? pressure : 1.0f);
- const float brush_alpha_pressure = brush_alpha(scene, brush) * (brush_use_alpha_pressure(scene, brush) ? pressure : 1.0f);
+ const float brush_size_pressure = BKE_brush_size_get(scene, brush) * (BKE_brush_use_size_pressure(scene, brush) ? pressure : 1.0f);
+ const float brush_alpha_pressure = BKE_brush_alpha_get(scene, brush) * (BKE_brush_use_alpha_pressure(scene, brush) ? pressure : 1.0f);
RNA_float_get_array(itemptr, "mouse", mval);
@@ -2948,7 +2951,7 @@ static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
}
}
-static void vpaint_stroke_done(bContext *C, struct PaintStroke *stroke)
+static void vpaint_stroke_done(const bContext *C, struct PaintStroke *stroke)
{
ToolSettings *ts = CTX_data_tool_settings(C);
struct VPaintData *vpd = paint_stroke_mode_data(stroke);
@@ -2994,6 +2997,7 @@ void PAINT_OT_vertex_paint(wmOperatorType *ot)
/* identifiers */
ot->name = "Vertex Paint";
ot->idname = "PAINT_OT_vertex_paint";
+ ot->description = "Paint a stroke in the active vertex color layer";
/* api callbacks */
ot->invoke = vpaint_invoke;
@@ -3043,6 +3047,8 @@ void PAINT_OT_weight_from_bones(wmOperatorType *ot)
/* identifiers */
ot->name = "Weight from Bones";
ot->idname = "PAINT_OT_weight_from_bones";
+ ot->description = "Set the weights of the groups matching the attached armature's selected bones, "
+ "using the distance between the vertices and the bones";
/* api callbacks */
ot->exec = weight_from_bones_exec;
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 157be337823..3edda91e4e4 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -101,6 +101,26 @@ void ED_sculpt_force_update(bContext *C)
multires_force_update(ob);
}
+float *ED_sculpt_get_last_stroke(struct Object *ob)
+{
+ return (ob && ob->sculpt && ob->sculpt->last_stroke_valid) ? ob->sculpt->last_stroke : NULL;
+}
+
+int ED_sculpt_minmax(bContext *C, float *min, float *max)
+{
+ Object *ob = CTX_data_active_object(C);
+
+ if (ob && ob->sculpt && ob->sculpt->last_stroke_valid) {
+ copy_v3_v3(min, ob->sculpt->last_stroke);
+ copy_v3_v3(max, ob->sculpt->last_stroke);
+
+ return 1;
+ }
+ else {
+ return 0;
+ }
+}
+
/* Sculpt mode handles multires differently from regular meshes, but only if
* it's the last modifier on the stack and it is not on the first level */
struct MultiresModifierData *sculpt_multires_active(Scene *scene, Object *ob)
@@ -244,6 +264,54 @@ typedef struct StrokeCache {
rcti previous_r; /* previous redraw rectangle */
} StrokeCache;
+
+/*** paint mesh ***/
+
+static void paint_mesh_restore_co(Sculpt *sd, SculptSession *ss)
+{
+ StrokeCache *cache = ss->cache;
+ int i;
+
+ PBVHNode **nodes;
+ int n, totnode;
+
+#ifndef _OPENMP
+ (void)sd; /* quied unused warning */
+#endif
+
+ BLI_pbvh_search_gather(ss->pbvh, NULL, NULL, &nodes, &totnode);
+
+ #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP)
+ for (n = 0; n < totnode; n++) {
+ SculptUndoNode *unode;
+
+ unode = sculpt_undo_get_node(nodes[n]);
+ if (unode) {
+ PBVHVertexIter vd;
+
+ BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
+ copy_v3_v3(vd.co, unode->co[vd.i]);
+ if (vd.no) copy_v3_v3_short(vd.no, unode->no[vd.i]);
+ else normal_short_to_float_v3(vd.fno, unode->no[vd.i]);
+
+ if (vd.mvert) vd.mvert->flag |= ME_VERT_PBVH_UPDATE;
+ }
+ BLI_pbvh_vertex_iter_end;
+
+ BLI_pbvh_node_mark_update(nodes[n]);
+ }
+ }
+
+ if (ss->face_normals) {
+ float *fn = ss->face_normals;
+ for (i = 0; i < ss->totpoly; ++i, fn += 3)
+ copy_v3_v3(fn, cache->face_norms[i]);
+ }
+
+ if (nodes)
+ MEM_freeN(nodes);
+}
+
/*** BVH Tree ***/
/* Get a screen-space rectangle of the modified area */
@@ -357,11 +425,11 @@ static int sculpt_brush_test_cube(SculptBrushTest *test, float co[3], float loca
local_co[2] = fabs(local_co[2]);
if (local_co[0] <= side && local_co[1] <= side && local_co[2] <= side) {
- float p = 4;
+ float p = 4.0f;
test->dist = ((powf(local_co[0], p) +
powf(local_co[1], p) +
- powf(local_co[2], p)) / pow(side, p));
+ powf(local_co[2], p)) / powf(side, p));
return 1;
}
@@ -437,7 +505,7 @@ static float overlapped_curve(Brush *br, float x)
xx = fabs(x0 + i * h);
if (xx < 1.0f)
- sum += brush_curve_strength(br, xx, 1);
+ sum += BKE_brush_curve_strength(br, xx, 1);
}
return sum;
@@ -550,10 +618,10 @@ static float brush_strength(Sculpt *sd, StrokeCache *cache, float feather)
Brush *brush = paint_brush(&sd->paint);
/* Primary strength input; square it to make lower values more sensitive */
- const float root_alpha = brush_alpha(scene, brush);
+ const float root_alpha = BKE_brush_alpha_get(scene, brush);
float alpha = root_alpha * root_alpha;
float dir = brush->flag & BRUSH_DIR_IN ? -1 : 1;
- float pressure = brush_use_alpha_pressure(scene, brush) ? cache->pressure : 1;
+ float pressure = BKE_brush_use_alpha_pressure(scene, brush) ? cache->pressure : 1;
float pen_flip = cache->pen_flip ? -1 : 1;
float invert = cache->invert ? -1 : 1;
float accum = integrate_overlap(brush);
@@ -684,7 +752,7 @@ static float tex_strength(SculptSession *ss, Brush *br, float point[3],
/* leave the coordinates relative to the screen */
/* use unadjusted size for tiled mode */
- radius = brush_size(ss->cache->vc->scene, br);
+ radius = BKE_brush_size_get(ss->cache->vc->scene, br);
x = point_2d[0];
y = point_2d[1];
@@ -724,7 +792,7 @@ static float tex_strength(SculptSession *ss, Brush *br, float point[3],
avg += br->texture_sample_bias;
/* Falloff curve */
- avg *= brush_curve_strength(br, len, ss->cache->radius);
+ avg *= BKE_brush_curve_strength(br, len, ss->cache->radius);
avg *= frontface(br, sculpt_normal, vno, fno);
@@ -766,7 +834,7 @@ static int sculpt_search_sphere_cb(PBVHNode *node, void *data_v)
}
/* Handles clipping against a mirror modifier and SCULPT_LOCK axis flags */
-static void sculpt_clip(Sculpt *sd, SculptSession *ss, float *co, const float val[3])
+static void sculpt_clip(Sculpt *sd, SculptSession *ss, float co[3], const float val[3])
{
int i;
@@ -1171,6 +1239,7 @@ static void do_crease_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod
float offset[3], area_normal[3];
float bstrength = ss->cache->bstrength;
float flippedbstrength, crease_correction;
+ float brush_alpha;
int n;
calc_sculpt_normal(sd, ob, area_normal, nodes, totnode);
@@ -1181,11 +1250,10 @@ static void do_crease_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod
mul_v3_fl(offset, bstrength);
/* we divide out the squared alpha and multiply by the squared crease to give us the pinch strength */
-
- if (brush_alpha(scene, brush) > 0.0f)
- crease_correction = brush->crease_pinch_factor * brush->crease_pinch_factor / (brush_alpha(scene, brush) * brush_alpha(scene, brush));
- else
- crease_correction = brush->crease_pinch_factor * brush->crease_pinch_factor;
+ crease_correction = brush->crease_pinch_factor * brush->crease_pinch_factor;
+ brush_alpha = BKE_brush_alpha_get(scene, brush);
+ if (brush_alpha > 0.0f)
+ crease_correction /= brush_alpha * brush_alpha;
/* we always want crease to pinch or blob to relax even when draw is negative */
flippedbstrength = (bstrength < 0) ? -crease_correction * bstrength : crease_correction * bstrength;
@@ -1860,7 +1928,8 @@ static void point_plane_project(float intr[3], float co[3], float plane_normal[3
static int plane_trim(StrokeCache *cache, Brush *brush, float val[3])
{
- return !(brush->flag & BRUSH_PLANE_TRIM) || (dot_v3v3(val, val) <= cache->radius_squared * cache->plane_trim_squared);
+ return (!(brush->flag & BRUSH_PLANE_TRIM) ||
+ ((dot_v3v3(val, val) <= cache->radius_squared * cache->plane_trim_squared)));
}
static int plane_point_side_flip(float co[3], float plane_normal[3], float plane_center[3], int flip)
@@ -2303,7 +2372,9 @@ void sculpt_vertcos_to_key(Object *ob, KeyBlock *kb, float (*vertCos)[3])
for (a = 0; a < me->totvert; a++, mvert++)
copy_v3_v3(mvert->co, vertCos[a]);
- mesh_calc_normals_mapping(me->mvert, me->totvert, me->mloop, me->mpoly, me->totloop, me->totpoly, NULL, NULL, 0, NULL, NULL);
+ BKE_mesh_calc_normals_mapping(me->mvert, me->totvert, me->mloop,
+ me->mpoly, me->totloop, me->totpoly,
+ NULL, NULL, 0, NULL, NULL);
}
/* apply new coords on active key block */
@@ -2321,7 +2392,11 @@ static void do_brush_action(Sculpt *sd, Object *ob, Brush *brush)
data.ss = ss;
data.sd = sd;
data.radius_squared = ss->cache->radius_squared;
- data.original = ELEM4(brush->sculpt_tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_ROTATE, SCULPT_TOOL_THUMB, SCULPT_TOOL_LAYER);
+ data.original = ELEM4(brush->sculpt_tool,
+ SCULPT_TOOL_GRAB,
+ SCULPT_TOOL_ROTATE,
+ SCULPT_TOOL_THUMB,
+ SCULPT_TOOL_LAYER);
BLI_pbvh_search_gather(ss->pbvh, sculpt_search_sphere_cb, &data, &nodes, &totnode);
/* Only act if some verts are inside the brush area */
@@ -2536,7 +2611,7 @@ static void sculpt_flush_stroke_deform(Sculpt *sd, Object *ob)
/* Modifiers could depend on mesh normals, so we should update them/
* Note, then if sculpting happens on locked key, normals should be re-calculated
* after applying coords from keyblock on base mesh */
- mesh_calc_normals(me->mvert, me->totvert, me->mloop, me->mpoly, me->totloop, me->totpoly, NULL);
+ BKE_mesh_calc_normals(me->mvert, me->totvert, me->mloop, me->mpoly, me->totloop, me->totpoly, NULL);
}
else if (ss->kb) {
sculpt_update_keyblock(ob);
@@ -2652,7 +2727,7 @@ static void do_symmetrical_brush_actions(Sculpt *sd, Object *ob)
static void sculpt_update_tex(const Scene *scene, Sculpt *sd, SculptSession *ss)
{
Brush *brush = paint_brush(&sd->paint);
- const int radius = brush_size(scene, brush);
+ const int radius = BKE_brush_size_get(scene, brush);
if (ss->texcache) {
MEM_freeN(ss->texcache);
@@ -2662,7 +2737,7 @@ static void sculpt_update_tex(const Scene *scene, Sculpt *sd, SculptSession *ss)
/* Need to allocate a bigger buffer for bigger brush size */
ss->texcache_side = 2 * radius;
if (!ss->texcache || ss->texcache_side > ss->texcache_actual) {
- ss->texcache = brush_gen_texture_cache(brush, radius);
+ ss->texcache = BKE_brush_gen_texture_cache(brush, radius);
ss->texcache_actual = ss->texcache_side;
}
}
@@ -2688,7 +2763,7 @@ void sculpt_update_mesh_elements(Scene *scene, Sculpt *sd, Object *ob, int need_
ss->face_normals = NULL;
}
else {
- Mesh *me = get_mesh(ob);
+ Mesh *me = BKE_mesh_from_object(ob);
ss->totvert = me->totvert;
ss->totpoly = me->totpoly;
ss->mvert = me->mvert;
@@ -2817,8 +2892,10 @@ static void sculpt_init_mirror_clipping(Object *ob, SculptSession *ss)
/* update the clip tolerance */
if (mmd->tolerance >
ss->cache->clip_tolerance[i])
+ {
ss->cache->clip_tolerance[i] =
- mmd->tolerance;
+ mmd->tolerance;
+ }
}
}
}
@@ -2875,7 +2952,7 @@ static void sculpt_update_cache_invariants(bContext *C, Sculpt *sd, SculptSessio
BLI_strncpy(cache->saved_active_brush_name, brush->id.name + 2, sizeof(cache->saved_active_brush_name));
- br = (Brush *)find_id("BR", "Smooth");
+ br = (Brush *)BKE_libblock_find_name(ID_BR, "Smooth");
if (br) {
paint_brush_set(p, br);
brush = br;
@@ -2928,8 +3005,11 @@ static void sculpt_update_cache_invariants(bContext *C, Sculpt *sd, SculptSessio
SCULPT_TOOL_DRAW, SCULPT_TOOL_CREASE, SCULPT_TOOL_BLOB,
SCULPT_TOOL_LAYER, SCULPT_TOOL_INFLATE, SCULPT_TOOL_CLAY,
SCULPT_TOOL_CLAY_STRIPS, SCULPT_TOOL_ROTATE))
- if (!(brush->flag & BRUSH_ACCUMULATE))
+ {
+ if (!(brush->flag & BRUSH_ACCUMULATE)) {
cache->original = 1;
+ }
+ }
cache->special_rotation = (brush->flag & BRUSH_RAKE) ? sd->last_angle : 0;
@@ -3057,19 +3137,21 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob,
sd->pressure_value = cache->pressure;
cache->previous_pixel_radius = cache->pixel_radius;
- cache->pixel_radius = brush_size(scene, brush);
+ cache->pixel_radius = BKE_brush_size_get(scene, brush);
if (cache->first_time) {
- if (!brush_use_locked_size(scene, brush)) {
- cache->initial_radius = paint_calc_object_space_radius(cache->vc, cache->true_location, brush_size(scene, brush));
- brush_set_unprojected_radius(scene, brush, cache->initial_radius);
+ if (!BKE_brush_use_locked_size(scene, brush)) {
+ cache->initial_radius = paint_calc_object_space_radius(cache->vc,
+ cache->true_location,
+ BKE_brush_size_get(scene, brush));
+ BKE_brush_unprojected_radius_set(scene, brush, cache->initial_radius);
}
else {
- cache->initial_radius = brush_unprojected_radius(scene, brush);
+ cache->initial_radius = BKE_brush_unprojected_radius_get(scene, brush);
}
}
- if (brush_use_size_pressure(scene, brush)) {
+ if (BKE_brush_use_size_pressure(scene, brush)) {
cache->pixel_radius *= cache->pressure;
cache->radius = cache->initial_radius * cache->pressure;
}
@@ -3168,7 +3250,7 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob,
sd->special_rotation = cache->special_rotation;
}
-static void sculpt_stroke_modifiers_check(bContext *C, Object *ob)
+static void sculpt_stroke_modifiers_check(const bContext *C, Object *ob)
{
SculptSession *ss = ob->sculpt;
@@ -3301,46 +3383,10 @@ static void sculpt_restore_mesh(Sculpt *sd, SculptSession *ss)
/* Restore the mesh before continuing with anchored stroke */
if ((brush->flag & BRUSH_ANCHORED) ||
(brush->sculpt_tool == SCULPT_TOOL_GRAB &&
- brush_use_size_pressure(ss->cache->vc->scene, brush)) ||
+ BKE_brush_use_size_pressure(ss->cache->vc->scene, brush)) ||
(brush->flag & BRUSH_RESTORE_MESH))
{
- StrokeCache *cache = ss->cache;
- int i;
-
- PBVHNode **nodes;
- int n, totnode;
-
- BLI_pbvh_search_gather(ss->pbvh, NULL, NULL, &nodes, &totnode);
-
- #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP)
- for (n = 0; n < totnode; n++) {
- SculptUndoNode *unode;
-
- unode = sculpt_undo_get_node(nodes[n]);
- if (unode) {
- PBVHVertexIter vd;
-
- BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
- copy_v3_v3(vd.co, unode->co[vd.i]);
- if (vd.no) copy_v3_v3_short(vd.no, unode->no[vd.i]);
- else normal_short_to_float_v3(vd.fno, unode->no[vd.i]);
-
- if (vd.mvert) vd.mvert->flag |= ME_VERT_PBVH_UPDATE;
- }
- BLI_pbvh_vertex_iter_end;
-
- BLI_pbvh_node_mark_update(nodes[n]);
- }
- }
-
- if (ss->face_normals) {
- float *fn = ss->face_normals;
- for (i = 0; i < ss->totpoly; ++i, fn += 3)
- copy_v3_v3(fn, cache->face_norms[i]);
- }
-
- if (nodes)
- MEM_freeN(nodes);
+ paint_mesh_restore_co(sd, ss);
}
}
@@ -3450,7 +3496,7 @@ static void sculpt_brush_exit_tex(Sculpt *sd)
ntreeTexEndExecTree(mtex->tex->nodetree->execdata, 1);
}
-static void sculpt_stroke_done(bContext *C, struct PaintStroke *UNUSED(stroke))
+static void sculpt_stroke_done(const bContext *C, struct PaintStroke *UNUSED(stroke))
{
Object *ob = CTX_data_active_object(C);
SculptSession *ss = ob->sculpt;
@@ -3471,12 +3517,17 @@ static void sculpt_stroke_done(bContext *C, struct PaintStroke *UNUSED(stroke))
/* Alt-Smooth */
if (ss->cache->alt_smooth) {
Paint *p = &sd->paint;
- brush = (Brush *)find_id("BR", ss->cache->saved_active_brush_name);
+ brush = (Brush *)BKE_libblock_find_name(ID_BR, ss->cache->saved_active_brush_name);
if (brush) {
paint_brush_set(p, brush);
}
}
+ /* update last stroke position */
+ ob->sculpt->last_stroke_valid = 1;
+ copy_v3_v3(ob->sculpt->last_stroke, ss->cache->true_location);
+ mul_m4_v3(ob->obmat, ob->sculpt->last_stroke);
+
sculpt_cache_free(ss->cache);
ss->cache = NULL;
@@ -3521,7 +3572,7 @@ static int sculpt_brush_stroke_invoke(bContext *C, wmOperator *op, wmEvent *even
"ignore_background_click");
if (ignore_background_click && !over_mesh(C, op, event->x, event->y)) {
- paint_stroke_free(stroke);
+ paint_stroke_data_free(op);
return OPERATOR_PASS_THROUGH;
}
@@ -3553,6 +3604,10 @@ static int sculpt_brush_stroke_cancel(bContext *C, wmOperator *op)
SculptSession *ss = ob->sculpt;
Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
+ if (ss->cache) {
+ paint_mesh_restore_co(sd, ss);
+ }
+
paint_stroke_cancel(C, op);
if (ss->cache) {
@@ -3575,8 +3630,9 @@ static void SCULPT_OT_brush_stroke(wmOperatorType *ot)
};
/* identifiers */
- ot->name = "Sculpt Mode";
+ ot->name = "Sculpt";
ot->idname = "SCULPT_OT_brush_stroke";
+ ot->description = "Sculpt a stroke into the geometry";
/* api callbacks */
ot->invoke = sculpt_brush_stroke_invoke;
@@ -3622,6 +3678,7 @@ static void SCULPT_OT_set_persistent_base(wmOperatorType *ot)
/* identifiers */
ot->name = "Set Persistent Base";
ot->idname = "SCULPT_OT_set_persistent_base";
+ ot->description = "Reset the copy of the mesh that is being sculpted on";
/* api callbacks */
ot->exec = sculpt_set_persistent_base;
@@ -3700,6 +3757,7 @@ static void SCULPT_OT_sculptmode_toggle(wmOperatorType *ot)
/* identifiers */
ot->name = "Sculpt Mode";
ot->idname = "SCULPT_OT_sculptmode_toggle";
+ ot->description = "Toggle sculpt mode in 3D view";
/* api callbacks */
ot->exec = sculpt_toggle_mode;
diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c
index 89a786d02a9..801bfabc748 100644
--- a/source/blender/editors/sculpt_paint/sculpt_undo.c
+++ b/source/blender/editors/sculpt_paint/sculpt_undo.c
@@ -76,7 +76,10 @@ static void update_cb(PBVHNode *node, void *rebuild)
BLI_pbvh_node_fully_hidden_set(node, 0);
}
-static void sculpt_undo_restore_deformed(SculptSession *ss, SculptUndoNode *unode, int uindex, int oindex, float coord[3])
+static void sculpt_undo_restore_deformed(const SculptSession *ss,
+ SculptUndoNode *unode,
+ int uindex, int oindex,
+ float coord[3])
{
if (unode->orig_co) {
swap_v3_v3(coord, unode->orig_co[uindex]);
@@ -237,7 +240,9 @@ static void sculpt_undo_restore(bContext *C, ListBase *lb)
else if (unode->maxgrid && dm->getGridData) {
if ((dm->getNumGrids(dm) != unode->maxgrid) ||
(dm->getGridSize(dm) != unode->gridsize))
+ {
continue;
+ }
}
else {
continue;
@@ -274,8 +279,8 @@ static void sculpt_undo_restore(bContext *C, ListBase *lb)
if (ss->modifiers_active) {
Mesh *mesh = ob->data;
- mesh_calc_normals_tessface(mesh->mvert, mesh->totvert,
- mesh->mface, mesh->totface, NULL);
+ BKE_mesh_calc_normals_tessface(mesh->mvert, mesh->totvert,
+ mesh->mface, mesh->totface, NULL);
free_sculptsession_deformMats(ss);
tag_update |= 1;
@@ -383,7 +388,10 @@ static SculptUndoNode *sculpt_undo_alloc_node(Object *ob, PBVHNode *node,
case SCULPT_UNDO_COORDS:
unode->co = MEM_mapallocN(sizeof(float) * 3 * allvert, "SculptUndoNode.co");
unode->no = MEM_mapallocN(sizeof(short) * 3 * allvert, "SculptUndoNode.no");
- undo_paint_push_count_alloc(UNDO_PAINT_MESH, (sizeof(float) * 3 + sizeof(short) * 3 + sizeof(int)) * allvert);
+ undo_paint_push_count_alloc(UNDO_PAINT_MESH,
+ (sizeof(float) * 3 +
+ sizeof(short) * 3 +
+ sizeof(int)) * allvert);
break;
case SCULPT_UNDO_HIDDEN:
if (maxgrid)
diff --git a/source/blender/editors/sculpt_paint/sculpt_uv.c b/source/blender/editors/sculpt_paint/sculpt_uv.c
index 4545c498fed..95441600d77 100644
--- a/source/blender/editors/sculpt_paint/sculpt_uv.c
+++ b/source/blender/editors/sculpt_paint/sculpt_uv.c
@@ -205,10 +205,10 @@ void HC_relaxation_iteration_uv(BMEditMesh *em, UvSculptData *sculptdata, float
if ((dist = dot_v2v2(diff, diff)) <= radius) {
UvElement *element;
float strength;
- strength = alpha * brush_curve_strength(brush, sqrt(dist), radius_root);
+ strength = alpha * BKE_brush_curve_strength(brush, sqrt(dist), radius_root);
- sculptdata->uv[i].uv[0] = (1.0 - strength) * sculptdata->uv[i].uv[0] + strength * (tmp_uvdata[i].p[0] - 0.5f * (tmp_uvdata[i].b[0] + tmp_uvdata[i].sum_b[0] / tmp_uvdata[i].ncounter));
- sculptdata->uv[i].uv[1] = (1.0 - strength) * sculptdata->uv[i].uv[1] + strength * (tmp_uvdata[i].p[1] - 0.5f * (tmp_uvdata[i].b[1] + tmp_uvdata[i].sum_b[1] / tmp_uvdata[i].ncounter));
+ sculptdata->uv[i].uv[0] = (1.0f - strength) * sculptdata->uv[i].uv[0] + strength * (tmp_uvdata[i].p[0] - 0.5f * (tmp_uvdata[i].b[0] + tmp_uvdata[i].sum_b[0] / tmp_uvdata[i].ncounter));
+ sculptdata->uv[i].uv[1] = (1.0f - strength) * sculptdata->uv[i].uv[1] + strength * (tmp_uvdata[i].p[1] - 0.5f * (tmp_uvdata[i].b[1] + tmp_uvdata[i].sum_b[1] / tmp_uvdata[i].ncounter));
for (element = sculptdata->uv[i].element; element; element = element->next) {
MLoopUV *luv;
@@ -269,10 +269,10 @@ static void laplacian_relaxation_iteration_uv(BMEditMesh *em, UvSculptData *scul
if ((dist = dot_v2v2(diff, diff)) <= radius) {
UvElement *element;
float strength;
- strength = alpha * brush_curve_strength(brush, sqrt(dist), radius_root);
+ strength = alpha * BKE_brush_curve_strength(brush, sqrt(dist), radius_root);
- sculptdata->uv[i].uv[0] = (1.0 - strength) * sculptdata->uv[i].uv[0] + strength * tmp_uvdata[i].p[0];
- sculptdata->uv[i].uv[1] = (1.0 - strength) * sculptdata->uv[i].uv[1] + strength * tmp_uvdata[i].p[1];
+ sculptdata->uv[i].uv[0] = (1.0f - strength) * sculptdata->uv[i].uv[0] + strength * tmp_uvdata[i].p[0];
+ sculptdata->uv[i].uv[1] = (1.0f - strength) * sculptdata->uv[i].uv[1] + strength * tmp_uvdata[i].p[1];
for (element = sculptdata->uv[i].element; element; element = element->next) {
MLoopUV *luv;
@@ -311,14 +311,14 @@ static void uv_sculpt_stroke_apply(bContext *C, wmOperator *op, wmEvent *event,
ToolSettings *toolsettings = CTX_data_tool_settings(C);
tool = sculptdata->tool;
invert = sculptdata->invert ? -1 : 1;
- alpha = brush_alpha(scene, brush);
+ alpha = BKE_brush_alpha_get(scene, brush);
UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &co[0], &co[1]);
sima = CTX_wm_space_image(C);
ED_space_image_size(sima, &width, &height);
ED_space_image_zoom(sima, ar, &zoomx, &zoomy);
- radius = brush_size(scene, brush) / (width * zoomx);
+ radius = BKE_brush_size_get(scene, brush) / (width * zoomx);
aspectRatio = width / (float)height;
/* We will compare squares to save some computation */
@@ -344,11 +344,11 @@ static void uv_sculpt_stroke_apply(bContext *C, wmOperator *op, wmEvent *event,
if ((dist = dot_v2v2(diff, diff)) <= radius) {
UvElement *element;
float strength;
- strength = alpha * brush_curve_strength(brush, sqrt(dist), radius_root);
+ strength = alpha * BKE_brush_curve_strength(brush, sqrt(dist), radius_root);
normalize_v2(diff);
- sculptdata->uv[i].uv[0] -= strength * diff[0] * 0.001;
- sculptdata->uv[i].uv[1] -= strength * diff[1] * 0.001;
+ sculptdata->uv[i].uv[0] -= strength * diff[0] * 0.001f;
+ sculptdata->uv[i].uv[1] -= strength * diff[1] * 0.001f;
for (element = sculptdata->uv[i].element; element; element = element->next) {
MLoopUV *luv;
@@ -679,9 +679,9 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, wmEvent
float alpha, zoomx, zoomy;
Brush *brush = paint_brush(sculptdata->uvsculpt);
- alpha = brush_alpha(scene, brush);
+ alpha = BKE_brush_alpha_get(scene, brush);
- radius = brush_size(scene, brush);
+ radius = BKE_brush_size_get(scene, brush);
sima = CTX_wm_space_image(C);
ED_space_image_size(sima, &width, &height);
ED_space_image_zoom(sima, ar, &zoomx, &zoomy);
@@ -715,7 +715,7 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, wmEvent
diff[1] /= aspectRatio;
if ((dist = dot_v2v2(diff, diff)) <= radius) {
float strength;
- strength = alpha * brush_curve_strength(brush, sqrt(dist), radius_root);
+ strength = alpha * BKE_brush_curve_strength(brush, sqrt(dist), radius_root);
data->initial_stroke->initialSelection[counter].uv = i;
data->initial_stroke->initialSelection[counter].strength = strength;
diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c
index b50c3f11534..e91b29ff0c1 100644
--- a/source/blender/editors/sound/sound_ops.c
+++ b/source/blender/editors/sound/sound_ops.c
@@ -221,7 +221,8 @@ static int sound_update_animation_flags_exec(bContext *C, wmOperator *UNUSED(op)
struct FCurve* fcu;
char driven;
- SEQ_BEGIN(scene->ed, seq) {
+ SEQ_BEGIN (scene->ed, seq)
+ {
fcu = id_data_find_fcurve(&scene->id, seq, &RNA_Sequence, "volume", 0, &driven);
if (fcu || driven)
seq->flag |= SEQ_AUDIO_VOLUME_ANIMATED;
@@ -285,11 +286,11 @@ static int sound_bake_animation_exec(bContext *C, wmOperator *UNUSED(op))
for (cfra = (scene->r.sfra > 0) ? (scene->r.sfra - 1) : 0; cfra <= scene->r.efra + 1; cfra++) {
scene->r.cfra = cfra;
- scene_update_for_newframe(bmain, scene, scene->lay);
+ BKE_scene_update_for_newframe(bmain, scene, scene->lay);
}
scene->r.cfra = oldfra;
- scene_update_for_newframe(bmain, scene, scene->lay);
+ BKE_scene_update_for_newframe(bmain, scene, scene->lay);
return OPERATOR_FINISHED;
}
@@ -318,6 +319,7 @@ static int sound_mixdown_exec(bContext *C, wmOperator *op)
char filename[FILE_MAX];
Scene *scene;
Main *bmain;
+ int split;
int bitrate, accuracy;
AUD_DeviceSpecs specs;
@@ -333,6 +335,7 @@ static int sound_mixdown_exec(bContext *C, wmOperator *op)
specs.format = RNA_enum_get(op->ptr, "format");
container = RNA_enum_get(op->ptr, "container");
codec = RNA_enum_get(op->ptr, "codec");
+ split = RNA_boolean_get(op->ptr, "split_channels");
scene = CTX_data_scene(C);
bmain = CTX_data_main(C);
specs.channels = scene->r.ffcodecdata.audio_channels;
@@ -341,8 +344,12 @@ static int sound_mixdown_exec(bContext *C, wmOperator *op)
BLI_strncpy(filename, path, sizeof(filename));
BLI_path_abs(filename, bmain->name);
- result = AUD_mixdown(scene->sound_scene, SFRA * specs.rate / FPS, (EFRA - SFRA) * specs.rate / FPS,
- accuracy, filename, specs, container, codec, bitrate);
+ if (split)
+ result = AUD_mixdown_per_channel(scene->sound_scene, SFRA * specs.rate / FPS, (EFRA - SFRA) * specs.rate / FPS,
+ accuracy, filename, specs, container, codec, bitrate);
+ else
+ result = AUD_mixdown(scene->sound_scene, SFRA * specs.rate / FPS, (EFRA - SFRA) * specs.rate / FPS,
+ accuracy, filename, specs, container, codec, bitrate);
if (result) {
BKE_report(op->reports, RPT_ERROR, result);
@@ -437,8 +444,7 @@ static void sound_mixdown_draw(bContext *C, wmOperator *op)
RNA_def_property_flag(prop_codec, PROP_HIDDEN);
RNA_def_property_flag(prop_format, PROP_HIDDEN);
- switch(container)
- {
+ switch (container) {
case AUD_CONTAINER_AC3:
RNA_def_property_clear_flag(prop_format, PROP_HIDDEN);
RNA_def_property_enum_items(prop_format, ac3_format_items);
@@ -460,8 +466,7 @@ static void sound_mixdown_draw(bContext *C, wmOperator *op)
RNA_def_property_clear_flag(prop_codec, PROP_HIDDEN);
RNA_def_property_enum_items(prop_codec, all_codec_items);
- switch(codec)
- {
+ switch (codec) {
case AUD_CODEC_AAC:
RNA_enum_set(op->ptr, "format", AUD_FORMAT_S16);
break;
@@ -592,6 +597,7 @@ static void SOUND_OT_mixdown(wmOperatorType *ot)
RNA_def_enum(ot->srna, "codec", codec_items, AUD_CODEC_FLAC, "Codec", "Audio Codec");
RNA_def_enum(ot->srna, "format", format_items, AUD_FORMAT_S16, "Format", "Sample format");
RNA_def_int(ot->srna, "bitrate", 192, 32, 512, "Bitrate", "Bitrate in kbit/s", 32, 512);
+ RNA_def_boolean(ot->srna, "split_channels", 0, "Split channels", "Each channel will be rendered into a mono file");
#endif // WITH_AUDASPACE
}
diff --git a/source/blender/editors/space_action/action_draw.c b/source/blender/editors/space_action/action_draw.c
index 024a9ffb57d..3961e566f80 100644
--- a/source/blender/editors/space_action/action_draw.c
+++ b/source/blender/editors/space_action/action_draw.c
@@ -73,22 +73,22 @@ void draw_channel_names(bContext *C, bAnimContext *ac, ARegion *ar)
bAnimListElem *ale;
int filter;
- View2D *v2d= &ar->v2d;
- float y= 0.0f;
+ View2D *v2d = &ar->v2d;
+ float y = 0.0f;
size_t items;
int height;
/* build list of channels to draw */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS);
- items= ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS);
+ items = ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* Update max-extent of channels here (taking into account scrollers):
- * - this is done to allow the channel list to be scrollable, but must be done here
- * to avoid regenerating the list again and/or also because channels list is drawn first
+ * - this is done to allow the channel list to be scrollable, but must be done here
+ * to avoid regenerating the list again and/or also because channels list is drawn first
* - offset of ACHANNEL_HEIGHT*2 is added to the height of the channels, as first is for
* start of list offset, and the second is as a correction for the scrollers.
*/
- height= ((items*ACHANNEL_STEP) + (ACHANNEL_HEIGHT*2));
+ height = ((items * ACHANNEL_STEP) + (ACHANNEL_HEIGHT * 2));
if (height > (v2d->mask.ymax - v2d->mask.ymin)) {
/* don't use totrect set, as the width stays the same
* (NOTE: this is ok here, the configuration is pretty straightforward)
@@ -99,16 +99,16 @@ void draw_channel_names(bContext *C, bAnimContext *ac, ARegion *ar)
UI_view2d_sync(NULL, ac->sa, v2d, V2D_LOCK_COPY);
/* loop through channels, and set up drawing depending on their type */
- { /* first pass: just the standard GL-drawing for backdrop + text */
- y= (float)ACHANNEL_FIRST;
+ { /* first pass: just the standard GL-drawing for backdrop + text */
+ y = (float)ACHANNEL_FIRST;
- for (ale= anim_data.first; ale; ale= ale->next) {
- float yminc= (float)(y - ACHANNEL_HEIGHT_HALF);
- float ymaxc= (float)(y + ACHANNEL_HEIGHT_HALF);
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ float yminc = (float)(y - ACHANNEL_HEIGHT_HALF);
+ float ymaxc = (float)(y + ACHANNEL_HEIGHT_HALF);
/* check if visible */
- if ( IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
- IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax) )
+ if (IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
+ IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax) )
{
/* draw all channels using standard channel-drawing API */
ANIM_channel_draw(ac, ale, yminc, ymaxc);
@@ -118,19 +118,19 @@ void draw_channel_names(bContext *C, bAnimContext *ac, ARegion *ar)
y -= ACHANNEL_STEP;
}
}
- { /* second pass: widgets */
- uiBlock *block= uiBeginBlock(C, ar, __func__, UI_EMBOSS);
+ { /* second pass: widgets */
+ uiBlock *block = uiBeginBlock(C, ar, __func__, UI_EMBOSS);
size_t channel_index = 0;
- y= (float)ACHANNEL_FIRST;
+ y = (float)ACHANNEL_FIRST;
- for (ale= anim_data.first; ale; ale= ale->next) {
- float yminc= (float)(y - ACHANNEL_HEIGHT_HALF);
- float ymaxc= (float)(y + ACHANNEL_HEIGHT_HALF);
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ float yminc = (float)(y - ACHANNEL_HEIGHT_HALF);
+ float ymaxc = (float)(y + ACHANNEL_HEIGHT_HALF);
/* check if visible */
- if ( IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
- IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax) )
+ if (IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
+ IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax) )
{
/* draw all channels using standard channel-drawing API */
ANIM_channel_draw_widgets(C, ac, ale, block, yminc, ymaxc, channel_index);
@@ -153,7 +153,7 @@ void draw_channel_names(bContext *C, bAnimContext *ac, ARegion *ar)
/* Keyframes */
/* extra padding for lengths (to go under scrollers) */
-#define EXTRA_SCROLL_PAD 100.0f
+#define EXTRA_SCROLL_PAD 100.0f
/* draw keyframes in each channel */
void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
@@ -162,9 +162,9 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
bAnimListElem *ale;
int filter;
- View2D *v2d= &ar->v2d;
- bDopeSheet *ads= &saction->ads;
- AnimData *adt= NULL;
+ View2D *v2d = &ar->v2d;
+ bDopeSheet *ads = &saction->ads;
+ AnimData *adt = NULL;
float act_start, act_end, y;
size_t items;
@@ -196,41 +196,41 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
}
/* build list of channels to draw */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS);
- items= ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS);
+ items = ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* Update max-extent of channels here (taking into account scrollers):
- * - this is done to allow the channel list to be scrollable, but must be done here
- * to avoid regenerating the list again and/or also because channels list is drawn first
+ * - this is done to allow the channel list to be scrollable, but must be done here
+ * to avoid regenerating the list again and/or also because channels list is drawn first
* - offset of ACHANNEL_HEIGHT*2 is added to the height of the channels, as first is for
* start of list offset, and the second is as a correction for the scrollers.
*/
- height= ((items*ACHANNEL_STEP) + (ACHANNEL_HEIGHT*2));
+ height = ((items * ACHANNEL_STEP) + (ACHANNEL_HEIGHT * 2));
/* don't use totrect set, as the width stays the same
* (NOTE: this is ok here, the configuration is pretty straightforward)
*/
v2d->tot.ymin = (float)(-height);
/* first backdrop strips */
- y= (float)(-ACHANNEL_HEIGHT);
+ y = (float)(-ACHANNEL_HEIGHT);
glEnable(GL_BLEND);
- for (ale= anim_data.first; ale; ale= ale->next) {
- const float yminc= (float)(y - ACHANNEL_HEIGHT_HALF);
- const float ymaxc= (float)(y + ACHANNEL_HEIGHT_HALF);
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ const float yminc = (float)(y - ACHANNEL_HEIGHT_HALF);
+ const float ymaxc = (float)(y + ACHANNEL_HEIGHT_HALF);
/* check if visible */
- if ( IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
- IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax) )
+ if (IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
+ IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax) )
{
- bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale);
- int sel=0;
+ bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale);
+ int sel = 0;
/* determine if any need to draw channel */
if (ale->datatype != ALE_NONE) {
/* determine if channel is selected */
if (acf->has_setting(ac, ale, ACHANNEL_SETTING_SELECT))
- sel= ANIM_channel_setting_get(ac, ale, ACHANNEL_SETTING_SELECT);
+ sel = ANIM_channel_setting_get(ac, ale, ACHANNEL_SETTING_SELECT);
if (ELEM3(ac->datatype, ANIMCONT_ACTION, ANIMCONT_DOPESHEET, ANIMCONT_SHAPEKEY)) {
switch (ale->type) {
@@ -239,7 +239,7 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
// FIXME: hardcoded colors - reddish color from NLA
glColor4f(0.8f, 0.2f, 0.0f, 0.4f);
}
- break;
+ break;
case ANIMTYPE_SCENE:
case ANIMTYPE_OBJECT:
@@ -247,7 +247,7 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
if (sel) glColor4ub(col1b[0], col1b[1], col1b[2], 0x45);
else glColor4ub(col1b[0], col1b[1], col1b[2], 0x22);
}
- break;
+ break;
case ANIMTYPE_FILLACTD:
case ANIMTYPE_DSSKEY:
@@ -256,39 +256,39 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
if (sel) glColor4ub(col2b[0], col2b[1], col2b[2], 0x45);
else glColor4ub(col2b[0], col2b[1], col2b[2], 0x22);
}
- break;
+ break;
case ANIMTYPE_GROUP:
{
if (sel) glColor4ub(col1a[0], col1a[1], col1a[2], 0x22);
else glColor4ub(col2a[0], col2a[1], col2a[2], 0x22);
}
- break;
+ break;
default:
{
if (sel) glColor4ub(col1[0], col1[1], col1[2], 0x22);
else glColor4ub(col2[0], col2[1], col2[2], 0x22);
}
- break;
+ break;
}
/* draw region twice: firstly backdrop, then the current range */
- glRectf(v2d->cur.xmin, (float)y-ACHANNEL_HEIGHT_HALF, v2d->cur.xmax+EXTRA_SCROLL_PAD, (float)y+ACHANNEL_HEIGHT_HALF);
+ glRectf(v2d->cur.xmin, (float)y - ACHANNEL_HEIGHT_HALF, v2d->cur.xmax + EXTRA_SCROLL_PAD, (float)y + ACHANNEL_HEIGHT_HALF);
if (ac->datatype == ANIMCONT_ACTION)
- glRectf(act_start, (float)y-ACHANNEL_HEIGHT_HALF, act_end, (float)y+ACHANNEL_HEIGHT_HALF);
+ glRectf(act_start, (float)y - ACHANNEL_HEIGHT_HALF, act_end, (float)y + ACHANNEL_HEIGHT_HALF);
}
else if (ac->datatype == ANIMCONT_GPENCIL) {
/* frames less than one get less saturated background */
if (sel) glColor4ub(col1[0], col1[1], col1[2], 0x22);
else glColor4ub(col2[0], col2[1], col2[2], 0x22);
- glRectf(0.0f, (float)y-ACHANNEL_HEIGHT_HALF, v2d->cur.xmin, (float)y+ACHANNEL_HEIGHT_HALF);
+ glRectf(0.0f, (float)y - ACHANNEL_HEIGHT_HALF, v2d->cur.xmin, (float)y + ACHANNEL_HEIGHT_HALF);
/* frames one and higher get a saturated background */
if (sel) glColor4ub(col1[0], col1[1], col1[2], 0x44);
else glColor4ub(col2[0], col2[1], col2[2], 0x44);
- glRectf(v2d->cur.xmin, (float)y-ACHANNEL_HEIGHT_HALF, v2d->cur.xmax+EXTRA_SCROLL_PAD, (float)y+ACHANNEL_HEIGHT_HALF);
+ glRectf(v2d->cur.xmin, (float)y - ACHANNEL_HEIGHT_HALF, v2d->cur.xmax + EXTRA_SCROLL_PAD, (float)y + ACHANNEL_HEIGHT_HALF);
}
}
}
@@ -303,19 +303,19 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
* This is to try to optimize this for heavier data sets
* 2) Keyframes which are out of view horizontally are disregarded
*/
- y= (float)(-ACHANNEL_HEIGHT);
+ y = (float)(-ACHANNEL_HEIGHT);
- for (ale= anim_data.first; ale; ale= ale->next) {
- const float yminc= (float)(y - ACHANNEL_HEIGHT_HALF);
- const float ymaxc= (float)(y + ACHANNEL_HEIGHT_HALF);
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ const float yminc = (float)(y - ACHANNEL_HEIGHT_HALF);
+ const float ymaxc = (float)(y + ACHANNEL_HEIGHT_HALF);
/* check if visible */
- if ( IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
- IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax) )
+ if (IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
+ IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax) )
{
/* check if anything to show for this channel */
if (ale->datatype != ALE_NONE) {
- adt= ANIM_nla_mapping_get(ac, ale);
+ adt = ANIM_nla_mapping_get(ac, ale);
/* draw 'keyframes' for each specific datatype */
switch (ale->datatype) {
@@ -344,7 +344,7 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
}
}
- y-= ACHANNEL_STEP;
+ y -= ACHANNEL_STEP;
}
/* free tempolary channels used for drawing */
@@ -355,8 +355,8 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
glColor3f(0.0f, 0.0f, 0.0f);
glBegin(GL_LINES);
- glVertex2f(saction->timeslide, v2d->cur.ymin-EXTRA_SCROLL_PAD);
- glVertex2f(saction->timeslide, v2d->cur.ymax);
+ glVertex2f(saction->timeslide, v2d->cur.ymin - EXTRA_SCROLL_PAD);
+ glVertex2f(saction->timeslide, v2d->cur.ymax);
glEnd();
}
}
diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c
index b8c310f8477..73c36fd8086 100644
--- a/source/blender/editors/space_action/action_edit.c
+++ b/source/blender/editors/space_action/action_edit.c
@@ -86,7 +86,7 @@ static int act_new_exec(bContext *C, wmOperator *UNUSED(op))
uiIDContextProperty(C, &ptr, &prop);
if (prop) {
- bAction *action=NULL, *oldact=NULL;
+ bAction *action = NULL, *oldact = NULL;
PointerRNA oldptr;
/* create action - the way to do this depends on whether we've got an
@@ -96,13 +96,13 @@ static int act_new_exec(bContext *C, wmOperator *UNUSED(op))
oldptr = RNA_property_pointer_get(&ptr, prop);
oldact = (bAction *)oldptr.id.data;
- if (oldact && GS(oldact->id.name)==ID_AC) {
+ if (oldact && GS(oldact->id.name) == ID_AC) {
/* make a copy of the existing action */
- action= copy_action(oldact);
+ action = BKE_action_copy(oldact);
}
else {
/* just make a new (empty) action */
- action= add_empty_action("Action");
+ action = add_empty_action("Action");
}
/* when creating new ID blocks, use is already 1 (fake user),
@@ -116,12 +116,12 @@ static int act_new_exec(bContext *C, wmOperator *UNUSED(op))
}
/* set notifier that keyframes have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
-void ACTION_OT_new (wmOperatorType *ot)
+void ACTION_OT_new(wmOperatorType *ot)
{
/* identifiers */
ot->name = "New Action";
@@ -130,11 +130,11 @@ void ACTION_OT_new (wmOperatorType *ot)
/* api callbacks */
ot->exec = act_new_exec;
- // NOTE: this is used in the NLA too...
+ // NOTE: this is used in the NLA too...
//ot->poll = ED_operator_action_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ************************************************************************** */
@@ -143,9 +143,9 @@ void ACTION_OT_new (wmOperatorType *ot)
/* *************************** Localise Markers ***************************** */
/* ensure that there is:
- * 1) an active action editor
- * 2) that the mode will have an active action available
- * 3) that the set of markers being shown are the scene markers, not the list we're merging
+ * 1) an active action editor
+ * 2) that the mode will have an active action available
+ * 3) that the set of markers being shown are the scene markers, not the list we're merging
* 4) that there are some selected markers
*/
static int act_markers_make_local_poll(bContext *C)
@@ -170,14 +170,14 @@ static int act_markers_make_local_poll(bContext *C)
return ED_markers_get_first_selected(ED_context_get_markers(C)) != NULL;
}
-static int act_markers_make_local_exec (bContext *C, wmOperator *UNUSED(op))
+static int act_markers_make_local_exec(bContext *C, wmOperator *UNUSED(op))
{
ListBase *markers = ED_context_get_markers(C);
SpaceAction *sact = CTX_wm_space_action(C);
- bAction *act = (sact)? sact->action : NULL;
+ bAction *act = (sact) ? sact->action : NULL;
- TimeMarker *marker, *markern=NULL;
+ TimeMarker *marker, *markern = NULL;
/* sanity checks */
if (ELEM(NULL, markers, act))
@@ -198,13 +198,13 @@ static int act_markers_make_local_exec (bContext *C, wmOperator *UNUSED(op))
sact->flag |= SACTION_POSEMARKERS_SHOW;
/* notifiers - both sets, as this change affects both */
- WM_event_add_notifier(C, NC_SCENE|ND_MARKERS, NULL);
- WM_event_add_notifier(C, NC_ANIMATION|ND_MARKERS, NULL);
+ WM_event_add_notifier(C, NC_SCENE | ND_MARKERS, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_MARKERS, NULL);
return OPERATOR_FINISHED;
}
-void ACTION_OT_markers_make_local (wmOperatorType *ot)
+void ACTION_OT_markers_make_local(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Make Markers Local";
@@ -216,7 +216,7 @@ void ACTION_OT_markers_make_local (wmOperatorType *ot)
ot->poll = act_markers_make_local_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ************************************************************************** */
@@ -225,7 +225,7 @@ void ACTION_OT_markers_make_local (wmOperatorType *ot)
/* *************************** Calculate Range ************************** */
/* Get the min/max keyframes*/
-static void get_keyframe_extents (bAnimContext *ac, float *min, float *max, const short onlySel)
+static void get_keyframe_extents(bAnimContext *ac, float *min, float *max, const short onlySel)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
@@ -234,43 +234,43 @@ static void get_keyframe_extents (bAnimContext *ac, float *min, float *max, cons
/* get data to filter, from Action or Dopesheet */
// XXX: what is sel doing here?!
// Commented it, was breaking things (eg. the "auto preview range" tool).
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE /*| ANIMFILTER_SEL *//*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE /*| ANIMFILTER_SEL *//*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* set large values to try to override */
- *min= 999999999.0f;
- *max= -999999999.0f;
+ *min = 999999999.0f;
+ *max = -999999999.0f;
/* check if any channels to set range with */
if (anim_data.first) {
/* go through channels, finding max extents */
- for (ale= anim_data.first; ale; ale= ale->next) {
- AnimData *adt= ANIM_nla_mapping_get(ac, ale);
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ AnimData *adt = ANIM_nla_mapping_get(ac, ale);
if (ale->datatype == ALE_GPFRAME) {
- bGPDlayer *gpl= ale->data;
+ bGPDlayer *gpl = ale->data;
bGPDframe *gpf;
/* find gp-frame which is less than or equal to cframe */
- for (gpf= gpl->frames.first; gpf; gpf= gpf->next) {
- *min= MIN2(*min, gpf->framenum);
- *max= MAX2(*max, gpf->framenum);
+ for (gpf = gpl->frames.first; gpf; gpf = gpf->next) {
+ *min = MIN2(*min, gpf->framenum);
+ *max = MAX2(*max, gpf->framenum);
}
}
else {
- FCurve *fcu= (FCurve *)ale->key_data;
+ FCurve *fcu = (FCurve *)ale->key_data;
float tmin, tmax;
/* get range and apply necessary scaling before processing */
calc_fcurve_range(fcu, &tmin, &tmax, onlySel, TRUE);
if (adt) {
- tmin= BKE_nla_tweakedit_remap(adt, tmin, NLATIME_CONVERT_MAP);
- tmax= BKE_nla_tweakedit_remap(adt, tmax, NLATIME_CONVERT_MAP);
+ tmin = BKE_nla_tweakedit_remap(adt, tmin, NLATIME_CONVERT_MAP);
+ tmax = BKE_nla_tweakedit_remap(adt, tmax, NLATIME_CONVERT_MAP);
}
/* try to set cur using these values, if they're more extreme than previously set values */
- *min= MIN2(*min, tmin);
- *max= MAX2(*max, tmax);
+ *min = MIN2(*min, tmin);
+ *max = MAX2(*max, tmax);
}
}
@@ -280,12 +280,12 @@ static void get_keyframe_extents (bAnimContext *ac, float *min, float *max, cons
else {
/* set default range */
if (ac->scene) {
- *min= (float)ac->scene->r.sfra;
- *max= (float)ac->scene->r.efra;
+ *min = (float)ac->scene->r.sfra;
+ *max = (float)ac->scene->r.efra;
}
else {
- *min= -5;
- *max= 100;
+ *min = -5;
+ *max = 100;
}
}
}
@@ -304,22 +304,22 @@ static int actkeys_previewrange_exec(bContext *C, wmOperator *UNUSED(op))
if (ac.scene == NULL)
return OPERATOR_CANCELLED;
else
- scene= ac.scene;
+ scene = ac.scene;
/* set the range directly */
get_keyframe_extents(&ac, &min, &max, FALSE);
scene->r.flag |= SCER_PRV_RANGE;
- scene->r.psfra= (int)floor(min + 0.5f);
- scene->r.pefra= (int)floor(max + 0.5f);
+ scene->r.psfra = (int)floor(min + 0.5f);
+ scene->r.pefra = (int)floor(max + 0.5f);
/* set notifier that things have changed */
// 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);
+ WM_event_add_notifier(C, NC_SCENE | ND_FRAME, ac.scene);
return OPERATOR_FINISHED;
}
-void ACTION_OT_previewrange_set (wmOperatorType *ot)
+void ACTION_OT_previewrange_set(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Auto-Set Preview Range";
@@ -331,7 +331,7 @@ void ACTION_OT_previewrange_set (wmOperatorType *ot)
ot->poll = ED_operator_action_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ****************** View-All Operator ****************** */
@@ -345,12 +345,12 @@ static int actkeys_viewall(bContext *C, const short onlySel)
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
return OPERATOR_CANCELLED;
- v2d= &ac.ar->v2d;
+ v2d = &ac.ar->v2d;
/* set the horizontal range, with an extra offset so that the extreme keys will be in view */
get_keyframe_extents(&ac, &v2d->cur.xmin, &v2d->cur.xmax, onlySel);
- extra= 0.1f * (v2d->cur.xmax - v2d->cur.xmin);
+ extra = 0.1f * (v2d->cur.xmax - v2d->cur.xmin);
v2d->cur.xmin -= extra;
v2d->cur.xmax += extra;
@@ -381,7 +381,7 @@ static int actkeys_viewsel_exec(bContext *C, wmOperator *UNUSED(op))
return actkeys_viewall(C, TRUE);
}
-void ACTION_OT_view_all (wmOperatorType *ot)
+void ACTION_OT_view_all(wmOperatorType *ot)
{
/* identifiers */
ot->name = "View All";
@@ -393,10 +393,10 @@ void ACTION_OT_view_all (wmOperatorType *ot)
ot->poll = ED_operator_action_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
-void ACTION_OT_view_selected (wmOperatorType *ot)
+void ACTION_OT_view_selected(wmOperatorType *ot)
{
/* identifiers */
ot->name = "View Selected";
@@ -408,7 +408,7 @@ void ACTION_OT_view_selected (wmOperatorType *ot)
ot->poll = ED_operator_action_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ************************************************************************** */
@@ -417,20 +417,20 @@ void ACTION_OT_view_selected (wmOperatorType *ot)
/* ******************** Copy/Paste Keyframes Operator ************************* */
/* NOTE: the backend code for this is shared with the graph editor */
-static short copy_action_keys (bAnimContext *ac)
+static short copy_action_keys(bAnimContext *ac)
{
ListBase anim_data = {NULL, NULL};
- int filter, ok=0;
+ int filter, ok = 0;
/* clear buffer first */
free_anim_copybuf();
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* copy keyframes */
- ok= copy_animedit_keys(ac, &anim_data);
+ ok = copy_animedit_keys(ac, &anim_data);
/* clean up */
BLI_freelistN(&anim_data);
@@ -439,18 +439,18 @@ static short copy_action_keys (bAnimContext *ac)
}
-static short paste_action_keys (bAnimContext *ac,
- const eKeyPasteOffset offset_mode, const eKeyMergeMode merge_mode)
+static short paste_action_keys(bAnimContext *ac,
+ const eKeyPasteOffset offset_mode, const eKeyMergeMode merge_mode)
{
ListBase anim_data = {NULL, NULL};
- int filter, ok=0;
+ int filter, ok = 0;
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* paste keyframes */
- ok= paste_animedit_keys(ac, &anim_data, offset_mode, merge_mode);
+ ok = paste_animedit_keys(ac, &anim_data, offset_mode, merge_mode);
/* clean up */
BLI_freelistN(&anim_data);
@@ -484,7 +484,7 @@ static int actkeys_copy_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void ACTION_OT_copy (wmOperatorType *ot)
+void ACTION_OT_copy(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Copy Keyframes";
@@ -496,22 +496,22 @@ void ACTION_OT_copy (wmOperatorType *ot)
ot->poll = ED_operator_action_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int actkeys_paste_exec(bContext *C, wmOperator *op)
{
bAnimContext ac;
- const eKeyPasteOffset offset_mode= RNA_enum_get(op->ptr, "offset");
- const eKeyMergeMode merge_mode= RNA_enum_get(op->ptr, "merge");
+ const eKeyPasteOffset offset_mode = RNA_enum_get(op->ptr, "offset");
+ const eKeyMergeMode merge_mode = RNA_enum_get(op->ptr, "merge");
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
return OPERATOR_CANCELLED;
/* ac.reports by default will be the global reports list, which won't show warnings */
- ac.reports= op->reports;
+ ac.reports = op->reports;
/* paste keyframes */
if (ac.datatype == ANIMCONT_GPENCIL) {
@@ -530,12 +530,12 @@ static int actkeys_paste_exec(bContext *C, wmOperator *op)
ANIM_editkeyframes_refresh(&ac);
/* set notifier that keyframes have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
-void ACTION_OT_paste (wmOperatorType *ot)
+void ACTION_OT_paste(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Paste Keyframes";
@@ -548,7 +548,7 @@ void ACTION_OT_paste (wmOperatorType *ot)
ot->poll = ED_operator_action_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* props */
RNA_def_enum(ot->srna, "offset", keyframe_paste_offset_items, KEYFRAME_PASTE_OFFSET_CFRA_START, "Offset", "Paste time offset of keys");
@@ -573,13 +573,13 @@ static void insert_action_keys(bAnimContext *ac, short mode)
int filter;
ReportList *reports = ac->reports;
- Scene *scene= ac->scene;
+ Scene *scene = ac->scene;
short flag = 0;
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
- if (mode == 2) filter |= ANIMFILTER_SEL;
- else if (mode == 3) filter |= ANIMFILTER_ACTGROUPED;
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
+ if (mode == 2) filter |= ANIMFILTER_SEL;
+ else if (mode == 3) filter |= ANIMFILTER_ACTGROUPED;
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
@@ -587,20 +587,20 @@ static void insert_action_keys(bAnimContext *ac, short mode)
flag = ANIM_get_keyframing_flags(scene, 1);
/* insert keyframes */
- for (ale= anim_data.first; ale; ale= ale->next) {
- AnimData *adt= ANIM_nla_mapping_get(ac, ale);
- FCurve *fcu= (FCurve *)ale->key_data;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ AnimData *adt = ANIM_nla_mapping_get(ac, ale);
+ FCurve *fcu = (FCurve *)ale->key_data;
float cfra;
/* adjust current frame for NLA-scaling */
if (adt)
- cfra= BKE_nla_tweakedit_remap(adt, (float)CFRA, NLATIME_CONVERT_UNMAP);
+ cfra = BKE_nla_tweakedit_remap(adt, (float)CFRA, NLATIME_CONVERT_UNMAP);
else
- cfra= (float)CFRA;
+ cfra = (float)CFRA;
/* if there's an id */
if (ale->id)
- insert_keyframe(reports, ale->id, NULL, ((fcu->grp)?(fcu->grp->name):(NULL)), fcu->rna_path, fcu->array_index, cfra, flag);
+ insert_keyframe(reports, ale->id, NULL, ((fcu->grp) ? (fcu->grp->name) : (NULL)), fcu->rna_path, fcu->array_index, cfra, flag);
else
insert_vert_fcurve(fcu, cfra, fcu->curval, 0);
}
@@ -622,7 +622,7 @@ static int actkeys_insertkey_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* what channels to affect? */
- mode= RNA_enum_get(op->ptr, "type");
+ mode = RNA_enum_get(op->ptr, "type");
/* insert keyframes */
insert_action_keys(&ac, mode);
@@ -631,12 +631,12 @@ static int actkeys_insertkey_exec(bContext *C, wmOperator *op)
ANIM_editkeyframes_refresh(&ac);
/* set notifier that keyframes have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
-void ACTION_OT_keyframe_insert (wmOperatorType *ot)
+void ACTION_OT_keyframe_insert(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Insert Keyframes";
@@ -649,7 +649,7 @@ void ACTION_OT_keyframe_insert (wmOperatorType *ot)
ot->poll = ED_operator_action_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* id-props */
ot->prop = RNA_def_enum(ot->srna, "type", prop_actkeys_insertkey_types, 0, "Type", "");
@@ -657,7 +657,7 @@ void ACTION_OT_keyframe_insert (wmOperatorType *ot)
/* ******************** Duplicate Keyframes Operator ************************* */
-static void duplicate_action_keys (bAnimContext *ac)
+static void duplicate_action_keys(bAnimContext *ac)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
@@ -665,13 +665,13 @@ static void duplicate_action_keys (bAnimContext *ac)
/* filter data */
if (ac->datatype == ANIMCONT_GPENCIL)
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
else
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through filtered data and delete selected keys */
- for (ale= anim_data.first; ale; ale= ale->next) {
+ for (ale = anim_data.first; ale; ale = ale->next) {
if (ale->type == ANIMTYPE_FCURVE)
duplicate_fcurve_keys((FCurve *)ale->key_data);
else
@@ -700,7 +700,7 @@ static int actkeys_duplicate_exec(bContext *C, wmOperator *UNUSED(op))
ANIM_editkeyframes_refresh(&ac);
/* set notifier that keyframes have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
@@ -712,7 +712,7 @@ static int actkeys_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED
return OPERATOR_FINISHED;
}
-void ACTION_OT_duplicate (wmOperatorType *ot)
+void ACTION_OT_duplicate(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Duplicate Keyframes";
@@ -725,12 +725,12 @@ void ACTION_OT_duplicate (wmOperatorType *ot)
ot->poll = ED_operator_action_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ******************** Delete Keyframes Operator ************************* */
-static void delete_action_keys (bAnimContext *ac)
+static void delete_action_keys(bAnimContext *ac)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
@@ -738,16 +738,16 @@ static void delete_action_keys (bAnimContext *ac)
/* filter data */
if (ac->datatype == ANIMCONT_GPENCIL)
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
else
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through filtered data and delete selected keys */
- for (ale= anim_data.first; ale; ale= ale->next) {
+ for (ale = anim_data.first; ale; ale = ale->next) {
if (ale->type != ANIMTYPE_GPLAYER) {
- FCurve *fcu= (FCurve *)ale->key_data;
- AnimData *adt= ale->adt;
+ FCurve *fcu = (FCurve *)ale->key_data;
+ AnimData *adt = ale->adt;
/* delete selected keyframes only */
delete_fcurve_keys(fcu);
@@ -782,12 +782,12 @@ static int actkeys_delete_exec(bContext *C, wmOperator *UNUSED(op))
ANIM_editkeyframes_refresh(&ac);
/* set notifier that keyframes have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
-void ACTION_OT_delete (wmOperatorType *ot)
+void ACTION_OT_delete(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Delete Keyframes";
@@ -800,23 +800,23 @@ void ACTION_OT_delete (wmOperatorType *ot)
ot->poll = ED_operator_action_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ******************** Clean Keyframes Operator ************************* */
-static void clean_action_keys (bAnimContext *ac, float thresh)
+static void clean_action_keys(bAnimContext *ac, float thresh)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_SEL /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_SEL /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through filtered data and clean curves */
- for (ale= anim_data.first; ale; ale= ale->next)
+ for (ale = anim_data.first; ale; ale = ale->next)
clean_fcurve((FCurve *)ale->key_data, thresh);
/* free temp data */
@@ -837,7 +837,7 @@ static int actkeys_clean_exec(bContext *C, wmOperator *op)
return OPERATOR_PASS_THROUGH;
/* get cleaning threshold */
- thresh= RNA_float_get(op->ptr, "threshold");
+ thresh = RNA_float_get(op->ptr, "threshold");
/* clean keyframes */
clean_action_keys(&ac, thresh);
@@ -846,12 +846,12 @@ static int actkeys_clean_exec(bContext *C, wmOperator *op)
ANIM_editkeyframes_refresh(&ac);
/* set notifier that keyframes have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
-void ACTION_OT_clean (wmOperatorType *ot)
+void ACTION_OT_clean(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Clean Keyframes";
@@ -864,7 +864,7 @@ void ACTION_OT_clean (wmOperatorType *ot)
ot->poll = ED_operator_action_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
ot->prop = RNA_def_float(ot->srna, "threshold", 0.001f, 0.0f, FLT_MAX, "Threshold", "", 0.0f, 1000.0f);
@@ -873,18 +873,18 @@ void ACTION_OT_clean (wmOperatorType *ot)
/* ******************** Sample Keyframes Operator *********************** */
/* Evaluates the curves between each selected keyframe on each frame, and keys the value */
-static void sample_action_keys (bAnimContext *ac)
+static void sample_action_keys(bAnimContext *ac)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through filtered data and add keys between selected keyframes on every frame */
- for (ale= anim_data.first; ale; ale= ale->next)
+ for (ale = anim_data.first; ale; ale = ale->next)
sample_fcurve((FCurve *)ale->key_data);
/* admin and redraws */
@@ -910,12 +910,12 @@ static int actkeys_sample_exec(bContext *C, wmOperator *UNUSED(op))
ANIM_editkeyframes_refresh(&ac);
/* set notifier that keyframes have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
-void ACTION_OT_sample (wmOperatorType *ot)
+void ACTION_OT_sample(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Sample Keyframes";
@@ -927,7 +927,7 @@ void ACTION_OT_sample (wmOperatorType *ot)
ot->poll = ED_operator_action_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ************************************************************************** */
@@ -936,8 +936,8 @@ void ACTION_OT_sample (wmOperatorType *ot)
/* ******************** Set Extrapolation-Type Operator *********************** */
/* defines for make/clear cyclic extrapolation tools */
-#define MAKE_CYCLIC_EXPO -1
-#define CLEAR_CYCLIC_EXPO -2
+#define MAKE_CYCLIC_EXPO -1
+#define CLEAR_CYCLIC_EXPO -2
/* defines for set extrapolation-type for selected keyframes tool */
static EnumPropertyItem prop_actkeys_expo_types[] = {
@@ -957,16 +957,16 @@ static void setexpo_action_keys(bAnimContext *ac, short mode)
int filter;
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_SEL /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_SEL /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through setting mode per F-Curve */
- for (ale= anim_data.first; ale; ale= ale->next) {
- FCurve *fcu= (FCurve *)ale->data;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ FCurve *fcu = (FCurve *)ale->data;
if (mode >= 0) {
/* just set mode setting */
- fcu->extend= mode;
+ fcu->extend = mode;
}
else {
/* shortcuts for managing Cycles F-Modifiers to make it easier to toggle cyclic animation
@@ -981,7 +981,7 @@ static void setexpo_action_keys(bAnimContext *ac, short mode)
}
else if (mode == CLEAR_CYCLIC_EXPO) {
/* remove all the modifiers fitting this description */
- FModifier *fcm, *fcn=NULL;
+ FModifier *fcm, *fcn = NULL;
for (fcm = fcu->modifiers.first; fcm; fcm = fcn) {
fcn = fcm->next;
@@ -1011,7 +1011,7 @@ static int actkeys_expo_exec(bContext *C, wmOperator *op)
return OPERATOR_PASS_THROUGH;
/* get handle setting mode */
- mode= RNA_enum_get(op->ptr, "type");
+ mode = RNA_enum_get(op->ptr, "type");
/* set handle type */
setexpo_action_keys(&ac, mode);
@@ -1020,12 +1020,12 @@ static int actkeys_expo_exec(bContext *C, wmOperator *op)
ANIM_editkeyframes_refresh(&ac);
/* set notifier that keyframe properties have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME_PROP, NULL);
return OPERATOR_FINISHED;
}
-void ACTION_OT_extrapolation_type (wmOperatorType *ot)
+void ACTION_OT_extrapolation_type(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Set Keyframe Extrapolation";
@@ -1038,7 +1038,7 @@ void ACTION_OT_extrapolation_type (wmOperatorType *ot)
ot->poll = ED_operator_action_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* id-props */
ot->prop = RNA_def_enum(ot->srna, "type", prop_actkeys_expo_types, 0, "Type", "");
@@ -1052,16 +1052,16 @@ static void setipo_action_keys(bAnimContext *ac, short mode)
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
- KeyframeEditFunc set_cb= ANIM_editkeyframes_ipo(mode);
+ KeyframeEditFunc set_cb = ANIM_editkeyframes_ipo(mode);
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through setting BezTriple interpolation
* Note: we do not supply KeyframeEditData to the looper yet. Currently that's not necessary here...
*/
- for (ale= anim_data.first; ale; ale= ale->next)
+ for (ale = anim_data.first; ale; ale = ale->next)
ANIM_fcurve_keyframes_loop(NULL, ale->key_data, NULL, set_cb, calchandles_fcurve);
/* cleanup */
@@ -1082,7 +1082,7 @@ static int actkeys_ipo_exec(bContext *C, wmOperator *op)
return OPERATOR_PASS_THROUGH;
/* get handle setting mode */
- mode= RNA_enum_get(op->ptr, "type");
+ mode = RNA_enum_get(op->ptr, "type");
/* set handle type */
setipo_action_keys(&ac, mode);
@@ -1091,12 +1091,12 @@ static int actkeys_ipo_exec(bContext *C, wmOperator *op)
ANIM_editkeyframes_refresh(&ac);
/* set notifier that keyframe properties have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME_PROP, NULL);
return OPERATOR_FINISHED;
}
-void ACTION_OT_interpolation_type (wmOperatorType *ot)
+void ACTION_OT_interpolation_type(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Set Keyframe Interpolation";
@@ -1109,7 +1109,7 @@ void ACTION_OT_interpolation_type (wmOperatorType *ot)
ot->poll = ED_operator_action_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* id-props */
ot->prop = RNA_def_enum(ot->srna, "type", beztriple_interpolation_mode_items, 0, "Type", "");
@@ -1124,18 +1124,18 @@ static void sethandles_action_keys(bAnimContext *ac, short mode)
bAnimListElem *ale;
int filter;
- KeyframeEditFunc edit_cb= ANIM_editkeyframes_handles(mode);
- KeyframeEditFunc sel_cb= ANIM_editkeyframes_ok(BEZT_OK_SELECTED);
+ KeyframeEditFunc edit_cb = ANIM_editkeyframes_handles(mode);
+ KeyframeEditFunc sel_cb = ANIM_editkeyframes_ok(BEZT_OK_SELECTED);
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through setting flags for handles
* Note: we do not supply KeyframeEditData to the looper yet. Currently that's not necessary here...
*/
- for (ale= anim_data.first; ale; ale= ale->next) {
- FCurve *fcu= (FCurve *)ale->key_data;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ FCurve *fcu = (FCurve *)ale->key_data;
/* any selected keyframes for editing? */
if (ANIM_fcurve_keyframes_loop(NULL, fcu, NULL, sel_cb, NULL)) {
@@ -1162,7 +1162,7 @@ static int actkeys_handletype_exec(bContext *C, wmOperator *op)
return OPERATOR_PASS_THROUGH;
/* get handle setting mode */
- mode= RNA_enum_get(op->ptr, "type");
+ mode = RNA_enum_get(op->ptr, "type");
/* set handle type */
sethandles_action_keys(&ac, mode);
@@ -1171,12 +1171,12 @@ static int actkeys_handletype_exec(bContext *C, wmOperator *op)
ANIM_editkeyframes_refresh(&ac);
/* set notifier that keyframe properties have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME_PROP, NULL);
return OPERATOR_FINISHED;
}
-void ACTION_OT_handle_type (wmOperatorType *ot)
+void ACTION_OT_handle_type(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Set Keyframe Handle Type";
@@ -1189,7 +1189,7 @@ void ACTION_OT_handle_type (wmOperatorType *ot)
ot->poll = ED_operator_action_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* id-props */
ot->prop = RNA_def_enum(ot->srna, "type", keyframe_handle_type_items, 0, "Type", "");
@@ -1203,16 +1203,16 @@ static void setkeytype_action_keys(bAnimContext *ac, short mode)
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
- KeyframeEditFunc set_cb= ANIM_editkeyframes_keytype(mode);
+ KeyframeEditFunc set_cb = ANIM_editkeyframes_keytype(mode);
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through setting BezTriple interpolation
* Note: we do not supply KeyframeEditData to the looper yet. Currently that's not necessary here...
*/
- for (ale= anim_data.first; ale; ale= ale->next)
+ for (ale = anim_data.first; ale; ale = ale->next)
ANIM_fcurve_keyframes_loop(NULL, ale->key_data, NULL, set_cb, NULL);
/* cleanup */
@@ -1233,7 +1233,7 @@ static int actkeys_keytype_exec(bContext *C, wmOperator *op)
return OPERATOR_PASS_THROUGH;
/* get handle setting mode */
- mode= RNA_enum_get(op->ptr, "type");
+ mode = RNA_enum_get(op->ptr, "type");
/* set handle type */
setkeytype_action_keys(&ac, mode);
@@ -1242,12 +1242,12 @@ static int actkeys_keytype_exec(bContext *C, wmOperator *op)
ANIM_editkeyframes_refresh(&ac);
/* set notifier that keyframe properties have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME_PROP, NULL);
return OPERATOR_FINISHED;
}
-void ACTION_OT_keyframe_type (wmOperatorType *ot)
+void ACTION_OT_keyframe_type(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Set Keyframe Type";
@@ -1260,7 +1260,7 @@ void ACTION_OT_keyframe_type (wmOperatorType *ot)
ot->poll = ED_operator_action_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* id-props */
ot->prop = RNA_def_enum(ot->srna, "type", beztriple_keyframe_type_items, 0, "Type", "");
@@ -1275,10 +1275,10 @@ void ACTION_OT_keyframe_type (wmOperatorType *ot)
static int actkeys_framejump_exec(bContext *C, wmOperator *UNUSED(op))
{
bAnimContext ac;
- ListBase anim_data= {NULL, NULL};
+ ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
- KeyframeEditData ked= {{NULL}};
+ KeyframeEditData ked = {{NULL}};
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
@@ -1286,11 +1286,11 @@ static int actkeys_framejump_exec(bContext *C, wmOperator *UNUSED(op))
/* init edit data */
/* loop over action data, averaging values */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE /*| ANIMFILTER_CURVESONLY */ | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE /*| ANIMFILTER_CURVESONLY */ | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
- for (ale= anim_data.first; ale; ale= ale->next) {
- AnimData *adt= ANIM_nla_mapping_get(&ac, ale);
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ AnimData *adt = ANIM_nla_mapping_get(&ac, ale);
if (adt) {
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
ANIM_fcurve_keyframes_loop(&ked, ale->key_data, NULL, bezt_calc_average, NULL);
@@ -1304,18 +1304,18 @@ static int actkeys_framejump_exec(bContext *C, wmOperator *UNUSED(op))
/* set the new current frame value, based on the average time */
if (ked.i1) {
- Scene *scene= ac.scene;
- CFRA= (int)floor((ked.f1 / ked.i1) + 0.5f);
- SUBFRA= 0.f;
+ Scene *scene = ac.scene;
+ CFRA = (int)floor((ked.f1 / ked.i1) + 0.5f);
+ SUBFRA = 0.f;
}
/* set notifier that things have changed */
- WM_event_add_notifier(C, NC_SCENE|ND_FRAME, ac.scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_FRAME, ac.scene);
return OPERATOR_FINISHED;
}
-void ACTION_OT_frame_jump (wmOperatorType *ot)
+void ACTION_OT_frame_jump(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Jump to Frame";
@@ -1327,7 +1327,7 @@ void ACTION_OT_frame_jump (wmOperatorType *ot)
ot->poll = ED_operator_action_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ******************** Snap Keyframes Operator *********************** */
@@ -1348,28 +1348,28 @@ static void snap_action_keys(bAnimContext *ac, short mode)
bAnimListElem *ale;
int filter;
- KeyframeEditData ked= {{NULL}};
+ KeyframeEditData ked = {{NULL}};
KeyframeEditFunc edit_cb;
/* filter data */
if (ac->datatype == ANIMCONT_GPENCIL)
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT);
else
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* get beztriple editing callbacks */
- edit_cb= ANIM_editkeyframes_snap(mode);
+ edit_cb = ANIM_editkeyframes_snap(mode);
- ked.scene= ac->scene;
+ ked.scene = ac->scene;
if (mode == ACTKEYS_SNAP_NEAREST_MARKER) {
- ked.list.first= (ac->markers) ? ac->markers->first : NULL;
- ked.list.last= (ac->markers) ? ac->markers->last : NULL;
+ ked.list.first = (ac->markers) ? ac->markers->first : NULL;
+ ked.list.last = (ac->markers) ? ac->markers->last : NULL;
}
/* snap keyframes */
- for (ale= anim_data.first; ale; ale= ale->next) {
- AnimData *adt= ANIM_nla_mapping_get(ac, ale);
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ AnimData *adt = ANIM_nla_mapping_get(ac, ale);
if (adt) {
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
@@ -1401,7 +1401,7 @@ static int actkeys_snap_exec(bContext *C, wmOperator *op)
return OPERATOR_PASS_THROUGH;
/* get snapping mode */
- mode= RNA_enum_get(op->ptr, "type");
+ mode = RNA_enum_get(op->ptr, "type");
/* snap keyframes */
snap_action_keys(&ac, mode);
@@ -1410,12 +1410,12 @@ static int actkeys_snap_exec(bContext *C, wmOperator *op)
ANIM_editkeyframes_refresh(&ac);
/* set notifier that keyframes have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
-void ACTION_OT_snap (wmOperatorType *ot)
+void ACTION_OT_snap(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Snap Keys";
@@ -1428,7 +1428,7 @@ void ACTION_OT_snap (wmOperatorType *ot)
ot->poll = ED_operator_action_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* id-props */
ot->prop = RNA_def_enum(ot->srna, "type", prop_actkeys_snap_types, 0, "Type", "");
@@ -1451,39 +1451,39 @@ static void mirror_action_keys(bAnimContext *ac, short mode)
bAnimListElem *ale;
int filter;
- KeyframeEditData ked= {{NULL}};
+ KeyframeEditData ked = {{NULL}};
KeyframeEditFunc edit_cb;
/* get beztriple editing callbacks */
- edit_cb= ANIM_editkeyframes_mirror(mode);
+ edit_cb = ANIM_editkeyframes_mirror(mode);
- ked.scene= ac->scene;
+ ked.scene = ac->scene;
/* for 'first selected marker' mode, need to find first selected marker first! */
// XXX should this be made into a helper func in the API?
if (mode == ACTKEYS_MIRROR_MARKER) {
- TimeMarker *marker= NULL;
+ TimeMarker *marker = NULL;
/* find first selected marker */
- marker= ED_markers_get_first_selected(ac->markers);
+ marker = ED_markers_get_first_selected(ac->markers);
/* store marker's time (if available) */
if (marker)
- ked.f1= (float)marker->frame;
+ ked.f1 = (float)marker->frame;
else
return;
}
/* filter data */
if (ac->datatype == ANIMCONT_GPENCIL)
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
else
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* mirror keyframes */
- for (ale= anim_data.first; ale; ale= ale->next) {
- AnimData *adt= ANIM_nla_mapping_get(ac, ale);
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ AnimData *adt = ANIM_nla_mapping_get(ac, ale);
if (adt) {
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
@@ -1515,7 +1515,7 @@ static int actkeys_mirror_exec(bContext *C, wmOperator *op)
return OPERATOR_PASS_THROUGH;
/* get mirroring mode */
- mode= RNA_enum_get(op->ptr, "type");
+ mode = RNA_enum_get(op->ptr, "type");
/* mirror keyframes */
mirror_action_keys(&ac, mode);
@@ -1524,12 +1524,12 @@ static int actkeys_mirror_exec(bContext *C, wmOperator *op)
ANIM_editkeyframes_refresh(&ac);
/* set notifier that keyframes have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
-void ACTION_OT_mirror (wmOperatorType *ot)
+void ACTION_OT_mirror(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Mirror Keys";
@@ -1542,7 +1542,7 @@ void ACTION_OT_mirror (wmOperatorType *ot)
ot->poll = ED_operator_action_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* id-props */
ot->prop = RNA_def_enum(ot->srna, "type", prop_actkeys_mirror_types, 0, "Type", "");
diff --git a/source/blender/editors/space_action/action_intern.h b/source/blender/editors/space_action/action_intern.h
index 7074a109228..c684ae1de51 100644
--- a/source/blender/editors/space_action/action_intern.h
+++ b/source/blender/editors/space_action/action_intern.h
@@ -61,14 +61,14 @@ void ACTION_OT_clickselect(struct wmOperatorType *ot);
/* defines for left-right select tool */
enum {
- ACTKEYS_LRSEL_TEST = 0,
+ ACTKEYS_LRSEL_TEST = 0,
ACTKEYS_LRSEL_LEFT,
ACTKEYS_LRSEL_RIGHT
} eActKeys_LeftRightSelect_Mode;
/* defines for column-select mode */
enum {
- ACTKEYS_COLUMNSEL_KEYS = 0,
+ ACTKEYS_COLUMNSEL_KEYS = 0,
ACTKEYS_COLUMNSEL_CFRA,
ACTKEYS_COLUMNSEL_MARKERS_COLUMN,
ACTKEYS_COLUMNSEL_MARKERS_BETWEEN,
diff --git a/source/blender/editors/space_action/action_ops.c b/source/blender/editors/space_action/action_ops.c
index f502a97967f..e4a161e3e22 100644
--- a/source/blender/editors/space_action/action_ops.c
+++ b/source/blender/editors/space_action/action_ops.c
@@ -45,6 +45,7 @@
#include "action_intern.h"
#include "RNA_access.h"
+#include "RNA_define.h"
#include "WM_api.h"
#include "WM_types.h"
@@ -54,7 +55,7 @@
void action_operatortypes(void)
{
/* keyframes */
- /* selection */
+ /* selection */
WM_operatortype_append(ACTION_OT_clickselect);
WM_operatortype_append(ACTION_OT_select_all_toggle);
WM_operatortype_append(ACTION_OT_select_border);
@@ -64,7 +65,7 @@ void action_operatortypes(void)
WM_operatortype_append(ACTION_OT_select_less);
WM_operatortype_append(ACTION_OT_select_leftright);
- /* editing */
+ /* editing */
WM_operatortype_append(ACTION_OT_snap);
WM_operatortype_append(ACTION_OT_mirror);
WM_operatortype_append(ACTION_OT_frame_jump);
@@ -93,9 +94,10 @@ void ED_operatormacros_action(void)
wmOperatorType *ot;
wmOperatorTypeMacro *otmacro;
- ot = WM_operatortype_append_macro("ACTION_OT_duplicate_move", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
+ ot = WM_operatortype_append_macro("ACTION_OT_duplicate_move", "Duplicate",
+ "Make a copy of all selected keyframes and move them",
+ OPTYPE_UNDO | OPTYPE_REGISTER);
if (ot) {
- ot->description = "Make a copy of all selected keyframes and move them";
WM_operatortype_macro_define(ot, "ACTION_OT_duplicate");
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_transform");
RNA_enum_set(otmacro->ptr, "mode", TFM_TIME_DUPLICATE);
@@ -105,82 +107,82 @@ void ED_operatormacros_action(void)
/* ************************** registration - keymaps **********************************/
-static void action_keymap_keyframes (wmKeyConfig *keyconf, wmKeyMap *keymap)
+static void action_keymap_keyframes(wmKeyConfig *keyconf, wmKeyMap *keymap)
{
wmKeyMapItem *kmi;
/* action_select.c - selection tools */
- /* click-select */
+ /* click-select */
kmi = WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
- RNA_boolean_set(kmi->ptr, "column", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "column", FALSE);
kmi = WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
- RNA_boolean_set(kmi->ptr, "column", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "column", TRUE);
kmi = WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
- RNA_boolean_set(kmi->ptr, "column", FALSE);
- kmi = WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT|KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
- RNA_boolean_set(kmi->ptr, "column", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_boolean_set(kmi->ptr, "column", FALSE);
+ kmi = WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT | KM_SHIFT, 0);
+ RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_boolean_set(kmi->ptr, "column", TRUE);
- /* select left/right */
+ /* select left/right */
kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
- RNA_enum_set(kmi->ptr, "mode", ACTKEYS_LRSEL_TEST);
- kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
- RNA_enum_set(kmi->ptr, "mode", ACTKEYS_LRSEL_TEST);
+ RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_enum_set(kmi->ptr, "mode", ACTKEYS_LRSEL_TEST);
+ kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
+ RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_enum_set(kmi->ptr, "mode", ACTKEYS_LRSEL_TEST);
kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", LEFTBRACKETKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
- RNA_enum_set(kmi->ptr, "mode", ACTKEYS_LRSEL_LEFT);
+ RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_enum_set(kmi->ptr, "mode", ACTKEYS_LRSEL_LEFT);
kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", RIGHTBRACKETKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
- RNA_enum_set(kmi->ptr, "mode", ACTKEYS_LRSEL_RIGHT);
+ RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_enum_set(kmi->ptr, "mode", ACTKEYS_LRSEL_RIGHT);
- /* deselect all */
+ /* deselect all */
kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "invert", FALSE);
+ RNA_boolean_set(kmi->ptr, "invert", FALSE);
kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "invert", TRUE);
+ RNA_boolean_set(kmi->ptr, "invert", TRUE);
- /* borderselect */
+ /* borderselect */
kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_border", BKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "axis_range", FALSE);
+ RNA_boolean_set(kmi->ptr, "axis_range", FALSE);
kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_border", BKEY, KM_PRESS, KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "axis_range", TRUE);
+ RNA_boolean_set(kmi->ptr, "axis_range", TRUE);
- /* column select */
+ /* column select */
RNA_enum_set(WM_keymap_add_item(keymap, "ACTION_OT_select_column", KKEY, KM_PRESS, 0, 0)->ptr, "mode", ACTKEYS_COLUMNSEL_KEYS);
RNA_enum_set(WM_keymap_add_item(keymap, "ACTION_OT_select_column", KKEY, KM_PRESS, KM_CTRL, 0)->ptr, "mode", ACTKEYS_COLUMNSEL_CFRA);
RNA_enum_set(WM_keymap_add_item(keymap, "ACTION_OT_select_column", KKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", ACTKEYS_COLUMNSEL_MARKERS_COLUMN);
RNA_enum_set(WM_keymap_add_item(keymap, "ACTION_OT_select_column", KKEY, KM_PRESS, KM_ALT, 0)->ptr, "mode", ACTKEYS_COLUMNSEL_MARKERS_BETWEEN);
- /* select more/less */
+ /* select more/less */
WM_keymap_add_item(keymap, "ACTION_OT_select_more", PADPLUSKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "ACTION_OT_select_less", PADMINUS, KM_PRESS, KM_CTRL, 0);
- /* select linekd */
+ /* select linekd */
WM_keymap_add_item(keymap, "ACTION_OT_select_linked", LKEY, KM_PRESS, 0, 0);
/* action_edit.c */
- /* snap - current frame to selected keys */
- // TODO: maybe since this is called jump, we're better to have it on <something>-J?
- WM_keymap_add_item(keymap, "ACTION_OT_frame_jump", SKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
+ /* snap - current frame to selected keys */
+ // TODO: maybe since this is called jump, we're better to have it on <something>-J?
+ WM_keymap_add_item(keymap, "ACTION_OT_frame_jump", SKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
- /* menu + single-step transform */
+ /* menu + single-step transform */
WM_keymap_add_item(keymap, "ACTION_OT_snap", SKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "ACTION_OT_mirror", MKEY, KM_PRESS, KM_SHIFT, 0);
- /* menu + set setting */
+ /* menu + set setting */
WM_keymap_add_item(keymap, "ACTION_OT_handle_type", VKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "ACTION_OT_interpolation_type", TKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "ACTION_OT_extrapolation_type", EKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "ACTION_OT_keyframe_type", RKEY, KM_PRESS, 0, 0);
- /* destructive */
+ /* destructive */
WM_keymap_add_item(keymap, "ACTION_OT_clean", OKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "ACTION_OT_sample", OKEY, KM_PRESS, KM_SHIFT, 0);
@@ -190,19 +192,19 @@ static void action_keymap_keyframes (wmKeyConfig *keyconf, wmKeyMap *keymap)
WM_keymap_add_item(keymap, "ACTION_OT_duplicate_move", DKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "ACTION_OT_keyframe_insert", IKEY, KM_PRESS, 0, 0);
- /* copy/paste */
+ /* copy/paste */
WM_keymap_add_item(keymap, "ACTION_OT_copy", CKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "ACTION_OT_paste", VKEY, KM_PRESS, KM_CTRL, 0);
- /* auto-set range */
- WM_keymap_add_item(keymap, "ACTION_OT_previewrange_set", PKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
+ /* auto-set range */
+ WM_keymap_add_item(keymap, "ACTION_OT_previewrange_set", PKEY, KM_PRESS, KM_CTRL | KM_ALT, 0);
WM_keymap_add_item(keymap, "ACTION_OT_view_all", HOMEKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "ACTION_OT_view_selected", PADPERIOD, KM_PRESS, 0, 0);
/* animation module */
- /* channels list
- * NOTE: these operators were originally for the channels list, but are added here too for convenience...
- */
+ /* channels list
+ * NOTE: these operators were originally for the channels list, but are added here too for convenience...
+ */
WM_keymap_add_item(keymap, "ANIM_OT_channels_editable_toggle", TABKEY, KM_PRESS, 0, 0);
/* transform system */
diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c
index f76f5f6523e..0c6b0f5eb3d 100644
--- a/source/blender/editors/space_action/action_select.c
+++ b/source/blender/editors/space_action/action_select.c
@@ -79,42 +79,42 @@
/* Deselects keyframes in the action editor
* - This is called by the deselect all operator, as well as other ones!
*
- * - test: check if select or deselect all
+ * - test: check if select or deselect all
* - sel: how to select keyframes (SELECT_*)
*/
-static void deselect_action_keys (bAnimContext *ac, short test, short sel)
+static void deselect_action_keys(bAnimContext *ac, short test, short sel)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
- KeyframeEditData ked= {{NULL}};
+ KeyframeEditData ked = {{NULL}};
KeyframeEditFunc test_cb, sel_cb;
/* determine type-based settings */
if (ac->datatype == ANIMCONT_GPENCIL)
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_NODUPLIS);
else
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
/* filter data */
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* init BezTriple looping data */
- test_cb= ANIM_editkeyframes_ok(BEZT_OK_SELECTED);
+ test_cb = ANIM_editkeyframes_ok(BEZT_OK_SELECTED);
/* See if we should be selecting or deselecting */
if (test) {
- for (ale= anim_data.first; ale; ale= ale->next) {
+ for (ale = anim_data.first; ale; ale = ale->next) {
if (ale->type == ANIMTYPE_GPLAYER) {
if (is_gplayer_frame_selected(ale->data)) {
- sel= SELECT_SUBTRACT;
+ sel = SELECT_SUBTRACT;
break;
}
}
else {
if (ANIM_fcurve_keyframes_loop(&ked, ale->key_data, NULL, test_cb, NULL)) {
- sel= SELECT_SUBTRACT;
+ sel = SELECT_SUBTRACT;
break;
}
}
@@ -122,10 +122,10 @@ static void deselect_action_keys (bAnimContext *ac, short test, short sel)
}
/* convert sel to selectmode, and use that to get editor */
- sel_cb= ANIM_editkeyframes_select(sel);
+ sel_cb = ANIM_editkeyframes_select(sel);
/* Now set the flags */
- for (ale= anim_data.first; ale; ale= ale->next) {
+ for (ale = anim_data.first; ale; ale = ale->next) {
if (ale->type == ANIMTYPE_GPLAYER)
set_gplayer_frame_selection(ale->data, sel);
else
@@ -153,12 +153,12 @@ static int actkeys_deselectall_exec(bContext *C, wmOperator *op)
deselect_action_keys(&ac, 1, SELECT_ADD);
/* set notifier that keyframe selection have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_SELECTED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_SELECTED, NULL);
return OPERATOR_FINISHED;
}
-void ACTION_OT_select_all_toggle (wmOperatorType *ot)
+void ACTION_OT_select_all_toggle(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Select All";
@@ -170,7 +170,7 @@ void ACTION_OT_select_all_toggle (wmOperatorType *ot)
ot->poll = ED_operator_action_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* props */
ot->prop = RNA_def_boolean(ot->srna, "invert", 0, "Invert", "");
@@ -178,7 +178,7 @@ void ACTION_OT_select_all_toggle (wmOperatorType *ot)
/* ******************** Border Select Operator **************************** */
/* This operator currently works in one of three ways:
- * -> BKEY - 1) all keyframes within region are selected (ACTKEYS_BORDERSEL_ALLKEYS)
+ * -> BKEY - 1) all keyframes within region are selected (ACTKEYS_BORDERSEL_ALLKEYS)
* -> ALT-BKEY - depending on which axis of the region was larger...
* -> 2) x-axis, so select all frames within frame range (ACTKEYS_BORDERSEL_FRAMERANGE)
* -> 3) y-axis, so select all frames within channels that region included (ACTKEYS_BORDERSEL_CHANNELS)
@@ -186,13 +186,13 @@ void ACTION_OT_select_all_toggle (wmOperatorType *ot)
/* defines for borderselect mode */
enum {
- ACTKEYS_BORDERSEL_ALLKEYS = 0,
+ ACTKEYS_BORDERSEL_ALLKEYS = 0,
ACTKEYS_BORDERSEL_FRAMERANGE,
ACTKEYS_BORDERSEL_CHANNELS,
} /*eActKeys_BorderSelect_Mode*/;
-static void borderselect_action (bAnimContext *ac, rcti rect, short mode, short selectmode)
+static void borderselect_action(bAnimContext *ac, rcti rect, short mode, short selectmode)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
@@ -200,52 +200,52 @@ static void borderselect_action (bAnimContext *ac, rcti rect, short mode, short
KeyframeEditData ked;
KeyframeEditFunc ok_cb, select_cb;
- View2D *v2d= &ac->ar->v2d;
+ View2D *v2d = &ac->ar->v2d;
rctf rectf;
- float ymin=0, ymax=(float)(-ACHANNEL_HEIGHT_HALF);
+ float ymin = 0, ymax = (float)(-ACHANNEL_HEIGHT_HALF);
/* convert mouse coordinates to frame ranges and channel coordinates corrected for view pan/zoom */
- UI_view2d_region_to_view(v2d, rect.xmin, rect.ymin+2, &rectf.xmin, &rectf.ymin);
- UI_view2d_region_to_view(v2d, rect.xmax, rect.ymax-2, &rectf.xmax, &rectf.ymax);
+ UI_view2d_region_to_view(v2d, rect.xmin, rect.ymin + 2, &rectf.xmin, &rectf.ymin);
+ UI_view2d_region_to_view(v2d, rect.xmax, rect.ymax - 2, &rectf.xmax, &rectf.ymax);
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* get beztriple editing/validation funcs */
- select_cb= ANIM_editkeyframes_select(selectmode);
+ select_cb = ANIM_editkeyframes_select(selectmode);
if (ELEM(mode, ACTKEYS_BORDERSEL_FRAMERANGE, ACTKEYS_BORDERSEL_ALLKEYS))
- ok_cb= ANIM_editkeyframes_ok(BEZT_OK_FRAMERANGE);
+ ok_cb = ANIM_editkeyframes_ok(BEZT_OK_FRAMERANGE);
else
- ok_cb= NULL;
+ ok_cb = NULL;
/* init editing data */
memset(&ked, 0, sizeof(KeyframeEditData));
/* loop over data, doing border select */
- for (ale= anim_data.first; ale; ale= ale->next) {
- AnimData *adt= ANIM_nla_mapping_get(ac, ale);
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ AnimData *adt = ANIM_nla_mapping_get(ac, ale);
/* get new vertical minimum extent of channel */
- ymin= ymax - ACHANNEL_STEP;
+ ymin = ymax - ACHANNEL_STEP;
/* set horizontal range (if applicable) */
if (ELEM(mode, ACTKEYS_BORDERSEL_FRAMERANGE, ACTKEYS_BORDERSEL_ALLKEYS)) {
/* if channel is mapped in NLA, apply correction */
if (adt) {
- ked.f1= BKE_nla_tweakedit_remap(adt, rectf.xmin, NLATIME_CONVERT_UNMAP);
- ked.f2= BKE_nla_tweakedit_remap(adt, rectf.xmax, NLATIME_CONVERT_UNMAP);
+ ked.f1 = BKE_nla_tweakedit_remap(adt, rectf.xmin, NLATIME_CONVERT_UNMAP);
+ ked.f2 = BKE_nla_tweakedit_remap(adt, rectf.xmax, NLATIME_CONVERT_UNMAP);
}
else {
- ked.f1= rectf.xmin;
- ked.f2= rectf.xmax;
+ ked.f1 = rectf.xmin;
+ ked.f2 = rectf.xmax;
}
}
/* perform vertical suitability check (if applicable) */
if ( (mode == ACTKEYS_BORDERSEL_FRAMERANGE) ||
- !((ymax < rectf.ymin) || (ymin > rectf.ymax)) )
+ !((ymax < rectf.ymin) || (ymin > rectf.ymax)) )
{
/* loop over data selecting */
if (ale->type == ANIMTYPE_GPLAYER)
@@ -255,7 +255,7 @@ static void borderselect_action (bAnimContext *ac, rcti rect, short mode, short
}
/* set minimum extent to be the maximum of the next channel */
- ymax=ymin;
+ ymax = ymin;
}
/* cleanup */
@@ -268,7 +268,7 @@ static int actkeys_borderselect_exec(bContext *C, wmOperator *op)
{
bAnimContext ac;
rcti rect;
- short mode=0, selectmode=0;
+ short mode = 0, selectmode = 0;
int gesture_mode, extend;
/* get editor data */
@@ -276,7 +276,7 @@ static int actkeys_borderselect_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* clear all selection if not extending selection */
- extend= RNA_boolean_get(op->ptr, "extend");
+ extend = RNA_boolean_get(op->ptr, "extend");
if (!extend)
deselect_action_keys(&ac, 1, SELECT_SUBTRACT);
@@ -286,7 +286,7 @@ static int actkeys_borderselect_exec(bContext *C, wmOperator *op)
rect.xmax = RNA_int_get(op->ptr, "xmax");
rect.ymax = RNA_int_get(op->ptr, "ymax");
- gesture_mode= RNA_int_get(op->ptr, "gesture_mode");
+ gesture_mode = RNA_int_get(op->ptr, "gesture_mode");
if (gesture_mode == GESTURE_MODAL_SELECT)
selectmode = SELECT_ADD;
else
@@ -300,18 +300,18 @@ static int actkeys_borderselect_exec(bContext *C, wmOperator *op)
* used for tweaking timing when "blocking", while channels is not that useful...
*/
if ((rect.xmax - rect.xmin) >= (rect.ymax - rect.ymin))
- mode= ACTKEYS_BORDERSEL_FRAMERANGE;
+ mode = ACTKEYS_BORDERSEL_FRAMERANGE;
else
- mode= ACTKEYS_BORDERSEL_CHANNELS;
+ mode = ACTKEYS_BORDERSEL_CHANNELS;
}
else
- mode= ACTKEYS_BORDERSEL_ALLKEYS;
+ mode = ACTKEYS_BORDERSEL_ALLKEYS;
/* apply borderselect action */
borderselect_action(&ac, rect, mode, selectmode);
/* set notifier that keyframe selection have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_SELECTED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_SELECTED, NULL);
return OPERATOR_FINISHED;
}
@@ -332,7 +332,7 @@ void ACTION_OT_select_border(wmOperatorType *ot)
ot->poll = ED_operator_action_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* rna */
WM_operator_properties_gesture_border(ot, TRUE);
@@ -362,14 +362,14 @@ static EnumPropertyItem prop_column_select_types[] = {
/* Selects all visible keyframes between the specified markers */
/* TODO, this is almost an _exact_ duplicate of a function of the same name in graph_select.c
* should de-duplicate - campbell */
-static void markers_selectkeys_between (bAnimContext *ac)
+static void markers_selectkeys_between(bAnimContext *ac)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
KeyframeEditFunc ok_cb, select_cb;
- KeyframeEditData ked= {{NULL}};
+ KeyframeEditData ked = {{NULL}};
float min, max;
/* get extreme markers */
@@ -378,19 +378,19 @@ static void markers_selectkeys_between (bAnimContext *ac)
max += 0.5f;
/* get editing funcs + data */
- ok_cb= ANIM_editkeyframes_ok(BEZT_OK_FRAMERANGE);
- select_cb= ANIM_editkeyframes_select(SELECT_ADD);
+ ok_cb = ANIM_editkeyframes_ok(BEZT_OK_FRAMERANGE);
+ select_cb = ANIM_editkeyframes_select(SELECT_ADD);
- ked.f1= min;
- ked.f2= max;
+ ked.f1 = min;
+ ked.f2 = max;
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE /*| ANIMFILTER_CURVESONLY */ | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE /*| ANIMFILTER_CURVESONLY */ | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* select keys in-between */
- for (ale= anim_data.first; ale; ale= ale->next) {
- AnimData *adt= ANIM_nla_mapping_get(ac, ale);
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ AnimData *adt = ANIM_nla_mapping_get(ac, ale);
if (adt) {
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
@@ -411,16 +411,16 @@ static void markers_selectkeys_between (bAnimContext *ac)
/* Selects all visible keyframes in the same frames as the specified elements */
-static void columnselect_action_keys (bAnimContext *ac, short mode)
+static void columnselect_action_keys(bAnimContext *ac, short mode)
{
- ListBase anim_data= {NULL, NULL};
+ ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
- Scene *scene= ac->scene;
+ Scene *scene = ac->scene;
CfraElem *ce;
KeyframeEditFunc select_cb, ok_cb;
- KeyframeEditData ked= {{NULL}};
+ KeyframeEditData ked = {{NULL}};
/* initialize keyframe editing data */
@@ -428,17 +428,17 @@ static void columnselect_action_keys (bAnimContext *ac, short mode)
switch (mode) {
case ACTKEYS_COLUMNSEL_KEYS: /* list of selected keys */
if (ac->datatype == ANIMCONT_GPENCIL) {
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
- for (ale= anim_data.first; ale; ale= ale->next)
+ for (ale = anim_data.first; ale; ale = ale->next)
gplayer_make_cfra_list(ale->data, &ked.list, 1);
}
else {
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE /*| ANIMFILTER_CURVESONLY*/);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE /*| ANIMFILTER_CURVESONLY*/);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
- for (ale= anim_data.first; ale; ale= ale->next)
+ for (ale = anim_data.first; ale; ale = ale->next)
ANIM_fcurve_keyframes_loop(&ked, ale->key_data, NULL, bezt_to_cfraelem, NULL);
}
BLI_freelistN(&anim_data);
@@ -446,10 +446,10 @@ static void columnselect_action_keys (bAnimContext *ac, short mode)
case ACTKEYS_COLUMNSEL_CFRA: /* current frame */
/* make a single CfraElem for storing this */
- ce= MEM_callocN(sizeof(CfraElem), "cfraElem");
+ ce = MEM_callocN(sizeof(CfraElem), "cfraElem");
BLI_addtail(&ked.list, ce);
- ce->cfra= (float)CFRA;
+ ce->cfra = (float)CFRA;
break;
case ACTKEYS_COLUMNSEL_MARKERS_COLUMN: /* list of selected markers */
@@ -461,30 +461,30 @@ static void columnselect_action_keys (bAnimContext *ac, short mode)
}
/* set up BezTriple edit callbacks */
- select_cb= ANIM_editkeyframes_select(SELECT_ADD);
- ok_cb= ANIM_editkeyframes_ok(BEZT_OK_FRAME);
+ select_cb = ANIM_editkeyframes_select(SELECT_ADD);
+ ok_cb = ANIM_editkeyframes_ok(BEZT_OK_FRAME);
/* loop through all of the keys and select additional keyframes
* based on the keys found to be selected above
*/
if (ac->datatype == ANIMCONT_GPENCIL)
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE);
else
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE /*| ANIMFILTER_CURVESONLY*/);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE /*| ANIMFILTER_CURVESONLY*/);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
- for (ale= anim_data.first; ale; ale= ale->next) {
- AnimData *adt= ANIM_nla_mapping_get(ac, ale);
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ AnimData *adt = ANIM_nla_mapping_get(ac, ale);
/* loop over cfraelems (stored in the KeyframeEditData->list)
* - we need to do this here, as we can apply fewer NLA-mapping conversions
*/
- for (ce= ked.list.first; ce; ce= ce->next) {
+ for (ce = ked.list.first; ce; ce = ce->next) {
/* set frame for validation callback to refer to */
if (adt)
- ked.f1= BKE_nla_tweakedit_remap(adt, ce->cfra, NLATIME_CONVERT_UNMAP);
+ ked.f1 = BKE_nla_tweakedit_remap(adt, ce->cfra, NLATIME_CONVERT_UNMAP);
else
- ked.f1= ce->cfra;
+ ked.f1 = ce->cfra;
/* select elements with frame number matching cfraelem */
if (ale->type == ANIMTYPE_GPLAYER)
@@ -511,7 +511,7 @@ static int actkeys_columnselect_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* action to take depends on the mode */
- mode= RNA_enum_get(op->ptr, "mode");
+ mode = RNA_enum_get(op->ptr, "mode");
if (mode == ACTKEYS_COLUMNSEL_MARKERS_BETWEEN)
markers_selectkeys_between(&ac);
@@ -519,12 +519,12 @@ static int actkeys_columnselect_exec(bContext *C, wmOperator *op)
columnselect_action_keys(&ac, mode);
/* set notifier that keyframe selection have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_SELECTED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_SELECTED, NULL);
return OPERATOR_FINISHED;
}
-void ACTION_OT_select_column (wmOperatorType *ot)
+void ACTION_OT_select_column(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Select All";
@@ -536,7 +536,7 @@ void ACTION_OT_select_column (wmOperatorType *ot)
ot->poll = ED_operator_action_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* props */
ot->prop = RNA_def_enum(ot->srna, "mode", prop_column_select_types, 0, "Mode", "");
@@ -544,11 +544,11 @@ void ACTION_OT_select_column (wmOperatorType *ot)
/* ******************** Select Linked Operator *********************** */
-static int actkeys_select_linked_exec (bContext *C, wmOperator *UNUSED(op))
+static int actkeys_select_linked_exec(bContext *C, wmOperator *UNUSED(op))
{
bAnimContext ac;
- ListBase anim_data= {NULL, NULL};
+ ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
@@ -560,11 +560,11 @@ static int actkeys_select_linked_exec (bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
/* loop through all of the keys and select additional keyframes based on these */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
- for (ale= anim_data.first; ale; ale= ale->next) {
- FCurve *fcu= (FCurve *)ale->key_data;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ FCurve *fcu = (FCurve *)ale->key_data;
/* check if anything selected? */
if (ANIM_fcurve_keyframes_loop(NULL, fcu, NULL, ok_cb, NULL)) {
@@ -577,12 +577,12 @@ static int actkeys_select_linked_exec (bContext *C, wmOperator *UNUSED(op))
BLI_freelistN(&anim_data);
/* set notifier that keyframe selection has changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_SELECTED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_SELECTED, NULL);
return OPERATOR_FINISHED;
}
-void ACTION_OT_select_linked (wmOperatorType *ot)
+void ACTION_OT_select_linked(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Select Linked";
@@ -594,38 +594,38 @@ void ACTION_OT_select_linked (wmOperatorType *ot)
ot->poll = ED_operator_action_active;
/* flags */
- ot->flag = OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
+ ot->flag = OPTYPE_REGISTER /*|OPTYPE_UNDO*/;
}
/* ******************** Select More/Less Operators *********************** */
/* Common code to perform selection */
-static void select_moreless_action_keys (bAnimContext *ac, short mode)
+static void select_moreless_action_keys(bAnimContext *ac, short mode)
{
- ListBase anim_data= {NULL, NULL};
+ ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
- KeyframeEditData ked= {{NULL}};
+ KeyframeEditData ked = {{NULL}};
KeyframeEditFunc build_cb;
/* init selmap building data */
- build_cb= ANIM_editkeyframes_buildselmap(mode);
+ build_cb = ANIM_editkeyframes_buildselmap(mode);
/* loop through all of the keys and select additional keyframes based on these */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
- for (ale= anim_data.first; ale; ale= ale->next) {
- FCurve *fcu= (FCurve *)ale->key_data;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ FCurve *fcu = (FCurve *)ale->key_data;
/* only continue if F-Curve has keyframes */
if (fcu->bezt == NULL)
continue;
/* build up map of whether F-Curve's keyframes should be selected or not */
- ked.data= MEM_callocN(fcu->totvert, "selmap actEdit more");
+ ked.data = MEM_callocN(fcu->totvert, "selmap actEdit more");
ANIM_fcurve_keyframes_loop(&ked, fcu, NULL, build_cb, NULL);
/* based on this map, adjust the selection status of the keyframes */
@@ -633,7 +633,7 @@ static void select_moreless_action_keys (bAnimContext *ac, short mode)
/* free the selmap used here */
MEM_freeN(ked.data);
- ked.data= NULL;
+ ked.data = NULL;
}
/* Cleanup */
@@ -642,7 +642,7 @@ static void select_moreless_action_keys (bAnimContext *ac, short mode)
/* ----------------- */
-static int actkeys_select_more_exec (bContext *C, wmOperator *UNUSED(op))
+static int actkeys_select_more_exec(bContext *C, wmOperator *UNUSED(op))
{
bAnimContext ac;
@@ -654,12 +654,12 @@ static int actkeys_select_more_exec (bContext *C, wmOperator *UNUSED(op))
select_moreless_action_keys(&ac, SELMAP_MORE);
/* set notifier that keyframe selection has changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_SELECTED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_SELECTED, NULL);
return OPERATOR_FINISHED;
}
-void ACTION_OT_select_more (wmOperatorType *ot)
+void ACTION_OT_select_more(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Select More";
@@ -671,12 +671,12 @@ void ACTION_OT_select_more (wmOperatorType *ot)
ot->poll = ED_operator_action_active;
/* flags */
- ot->flag = OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
+ ot->flag = OPTYPE_REGISTER /*|OPTYPE_UNDO*/;
}
/* ----------------- */
-static int actkeys_select_less_exec (bContext *C, wmOperator *UNUSED(op))
+static int actkeys_select_less_exec(bContext *C, wmOperator *UNUSED(op))
{
bAnimContext ac;
@@ -688,12 +688,12 @@ static int actkeys_select_less_exec (bContext *C, wmOperator *UNUSED(op))
select_moreless_action_keys(&ac, SELMAP_LESS);
/* set notifier that keyframe selection has changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_SELECTED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_SELECTED, NULL);
return OPERATOR_FINISHED;
}
-void ACTION_OT_select_less (wmOperatorType *ot)
+void ACTION_OT_select_less(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Select Less";
@@ -705,7 +705,7 @@ void ACTION_OT_select_less (wmOperatorType *ot)
ot->poll = ED_operator_action_active;
/* flags */
- ot->flag = OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
+ ot->flag = OPTYPE_REGISTER /*|OPTYPE_UNDO*/;
}
/* ******************** Select Left/Right Operator ************************* */
@@ -721,19 +721,19 @@ static EnumPropertyItem prop_actkeys_leftright_select_types[] = {
/* --------------------------------- */
-static void actkeys_select_leftright (bAnimContext *ac, short leftright, short select_mode)
+static void actkeys_select_leftright(bAnimContext *ac, short leftright, short select_mode)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
KeyframeEditFunc ok_cb, select_cb;
- KeyframeEditData ked= {{NULL}};
- Scene *scene= ac->scene;
+ KeyframeEditData ked = {{NULL}};
+ Scene *scene = ac->scene;
/* if select mode is replace, deselect all keyframes (and channels) first */
- if (select_mode==SELECT_REPLACE) {
- select_mode= SELECT_ADD;
+ if (select_mode == SELECT_REPLACE) {
+ select_mode = SELECT_ADD;
/* - deselect all other keyframes, so that just the newly selected remain
* - channels aren't deselected, since we don't re-select any as a consequence
@@ -742,8 +742,8 @@ static void actkeys_select_leftright (bAnimContext *ac, short leftright, short s
}
/* set callbacks and editing data */
- ok_cb= ANIM_editkeyframes_ok(BEZT_OK_FRAMERANGE);
- select_cb= ANIM_editkeyframes_select(select_mode);
+ ok_cb = ANIM_editkeyframes_ok(BEZT_OK_FRAMERANGE);
+ select_cb = ANIM_editkeyframes_select(select_mode);
if (leftright == ACTKEYS_LRSEL_LEFT) {
ked.f1 = MINAFRAMEF;
@@ -756,14 +756,14 @@ static void actkeys_select_leftright (bAnimContext *ac, short leftright, short s
/* filter data */
if (ac->datatype == ANIMCONT_GPENCIL)
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_NODUPLIS);
else
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* select keys */
- for (ale= anim_data.first; ale; ale= ale->next) {
- AnimData *adt= ANIM_nla_mapping_get(ac, ale);
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ AnimData *adt = ANIM_nla_mapping_get(ac, ale);
if (adt) {
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
@@ -777,16 +777,16 @@ static void actkeys_select_leftright (bAnimContext *ac, short leftright, short s
}
/* Sync marker support */
- if (select_mode==SELECT_ADD) {
- SpaceAction *saction= (SpaceAction *)ac->sl;
+ if (select_mode == SELECT_ADD) {
+ SpaceAction *saction = (SpaceAction *)ac->sl;
if ((saction) && (saction->flag & SACTION_MARKERS_MOVE)) {
ListBase *markers = ED_animcontext_get_markers(ac);
TimeMarker *marker;
- for (marker= markers->first; marker; marker= marker->next) {
- if ( ((leftright == ACTKEYS_LRSEL_LEFT) && (marker->frame < CFRA)) ||
- ((leftright == ACTKEYS_LRSEL_RIGHT) && (marker->frame >= CFRA)) )
+ for (marker = markers->first; marker; marker = marker->next) {
+ if ( ((leftright == ACTKEYS_LRSEL_LEFT) && (marker->frame < CFRA)) ||
+ ((leftright == ACTKEYS_LRSEL_RIGHT) && (marker->frame >= CFRA)) )
{
marker->flag |= SELECT;
}
@@ -803,7 +803,7 @@ static void actkeys_select_leftright (bAnimContext *ac, short leftright, short s
/* ----------------- */
-static int actkeys_select_leftright_exec (bContext *C, wmOperator *op)
+static int actkeys_select_leftright_exec(bContext *C, wmOperator *op)
{
bAnimContext ac;
short leftright = RNA_enum_get(op->ptr, "mode");
@@ -815,9 +815,9 @@ static int actkeys_select_leftright_exec (bContext *C, wmOperator *op)
/* select mode is either replace (deselect all, then add) or add/extend */
if (RNA_boolean_get(op->ptr, "extend"))
- selectmode= SELECT_INVERT;
+ selectmode = SELECT_INVERT;
else
- selectmode= SELECT_REPLACE;
+ selectmode = SELECT_REPLACE;
/* if "test" mode is set, we don't have any info to set this with */
if (leftright == ACTKEYS_LRSEL_TEST)
@@ -827,12 +827,12 @@ static int actkeys_select_leftright_exec (bContext *C, wmOperator *op)
actkeys_select_leftright(&ac, leftright, selectmode);
/* set notifier that keyframe selection (and channels too) have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|ND_ANIMCHAN|NA_SELECTED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | ND_ANIMCHAN | NA_SELECTED, NULL);
return OPERATOR_FINISHED;
}
-static int actkeys_select_leftright_invoke (bContext *C, wmOperator *op, wmEvent *event)
+static int actkeys_select_leftright_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
bAnimContext ac;
short leftright = RNA_enum_get(op->ptr, "mode");
@@ -843,9 +843,9 @@ static int actkeys_select_leftright_invoke (bContext *C, wmOperator *op, wmEvent
/* handle mode-based testing */
if (leftright == ACTKEYS_LRSEL_TEST) {
- Scene *scene= ac.scene;
- ARegion *ar= ac.ar;
- View2D *v2d= &ar->v2d;
+ Scene *scene = ac.scene;
+ ARegion *ar = ac.ar;
+ View2D *v2d = &ar->v2d;
float x;
/* determine which side of the current frame mouse is on */
@@ -860,7 +860,7 @@ static int actkeys_select_leftright_invoke (bContext *C, wmOperator *op, wmEvent
return actkeys_select_leftright_exec(C, op);
}
-void ACTION_OT_select_leftright (wmOperatorType *ot)
+void ACTION_OT_select_leftright(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Select Left/Right";
@@ -873,7 +873,7 @@ void ACTION_OT_select_leftright (wmOperatorType *ot)
ot->poll = ED_operator_action_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* id-props */
ot->prop = RNA_def_enum(ot->srna, "mode", prop_actkeys_leftright_select_types, ACTKEYS_LRSEL_TEST, "Mode", "");
@@ -891,20 +891,20 @@ void ACTION_OT_select_leftright (wmOperatorType *ot)
*/
/* sensitivity factor for frame-selections */
-#define FRAME_CLICK_THRESH 0.1f
+#define FRAME_CLICK_THRESH 0.1f
/* ------------------- */
/* option 1) select keyframe directly under mouse */
-static void actkeys_mselect_single (bAnimContext *ac, bAnimListElem *ale, short select_mode, float selx)
+static void actkeys_mselect_single(bAnimContext *ac, bAnimListElem *ale, short select_mode, float selx)
{
- KeyframeEditData ked= {{NULL}};
+ KeyframeEditData ked = {{NULL}};
KeyframeEditFunc select_cb, ok_cb;
/* get functions for selecting keyframes */
- select_cb= ANIM_editkeyframes_select(select_mode);
- ok_cb= ANIM_editkeyframes_ok(BEZT_OK_FRAME);
- ked.f1= selx;
+ select_cb = ANIM_editkeyframes_select(select_mode);
+ ok_cb = ANIM_editkeyframes_ok(BEZT_OK_FRAME);
+ ked.f1 = selx;
/* select the nominated keyframe on the given frame */
if (ale->type == ANIMTYPE_GPLAYER)
@@ -919,34 +919,34 @@ static void actkeys_mselect_single (bAnimContext *ac, bAnimListElem *ale, short
/* Option 3) Selects all visible keyframes in the same frame as the mouse click */
static void actkeys_mselect_column(bAnimContext *ac, short select_mode, float selx)
{
- ListBase anim_data= {NULL, NULL};
+ ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
KeyframeEditFunc select_cb, ok_cb;
- KeyframeEditData ked= {{NULL}};
+ KeyframeEditData ked = {{NULL}};
/* set up BezTriple edit callbacks */
- select_cb= ANIM_editkeyframes_select(select_mode);
- ok_cb= ANIM_editkeyframes_ok(BEZT_OK_FRAME);
+ select_cb = ANIM_editkeyframes_select(select_mode);
+ ok_cb = ANIM_editkeyframes_ok(BEZT_OK_FRAME);
/* loop through all of the keys and select additional keyframes
* based on the keys found to be selected above
*/
if (ac->datatype == ANIMCONT_GPENCIL)
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE /*| ANIMFILTER_CURVESONLY */ | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE /*| ANIMFILTER_CURVESONLY */ | ANIMFILTER_NODUPLIS);
else
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
- for (ale= anim_data.first; ale; ale= ale->next) {
- AnimData *adt= ANIM_nla_mapping_get(ac, ale);
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ AnimData *adt = ANIM_nla_mapping_get(ac, ale);
/* set frame for validation callback to refer to */
if (adt)
- ked.f1= BKE_nla_tweakedit_remap(adt, selx, NLATIME_CONVERT_UNMAP);
+ ked.f1 = BKE_nla_tweakedit_remap(adt, selx, NLATIME_CONVERT_UNMAP);
else
- ked.f1= selx;
+ ked.f1 = selx;
/* select elements with frame number matching cfra */
if (ale->type == ANIMTYPE_GPLAYER)
@@ -962,14 +962,14 @@ static void actkeys_mselect_column(bAnimContext *ac, short select_mode, float se
/* ------------------- */
-static void mouse_action_keys (bAnimContext *ac, const int mval[2], short select_mode, short column)
+static void mouse_action_keys(bAnimContext *ac, const int mval[2], short select_mode, short column)
{
ListBase anim_data = {NULL, NULL};
DLRBT_Tree anim_keys;
bAnimListElem *ale;
int filter;
- View2D *v2d= &ac->ar->v2d;
+ View2D *v2d = &ac->ar->v2d;
bDopeSheet *ads = NULL;
int channel_index;
short found = 0;
@@ -979,22 +979,22 @@ static void mouse_action_keys (bAnimContext *ac, const int mval[2], short select
/* get dopesheet info */
if (ac->datatype == ANIMCONT_DOPESHEET)
- ads= ac->data;
+ ads = ac->data;
/* use View2D to determine the index of the channel (i.e a row in the list) where keyframe was */
UI_view2d_region_to_view(v2d, mval[0], mval[1], &x, &y);
UI_view2d_listview_view_to_cell(v2d, 0, ACHANNEL_STEP, 0, (float)ACHANNEL_HEIGHT_HALF, x, y, NULL, &channel_index);
/* x-range to check is +/- 7 (in screen/region-space) on either side of mouse click (size of keyframe icon) */
- UI_view2d_region_to_view(v2d, mval[0]-7, mval[1], &rectf.xmin, &rectf.ymin);
- UI_view2d_region_to_view(v2d, mval[0]+7, mval[1], &rectf.xmax, &rectf.ymax);
+ UI_view2d_region_to_view(v2d, mval[0] - 7, mval[1], &rectf.xmin, &rectf.ymin);
+ UI_view2d_region_to_view(v2d, mval[0] + 7, mval[1], &rectf.xmax, &rectf.ymax);
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* try to get channel */
- ale= BLI_findlink(&anim_data, channel_index);
+ ale = BLI_findlink(&anim_data, channel_index);
if (ale == NULL) {
/* channel not found */
printf("Error: animation channel (index = %d) not found in mouse_action_keys()\n", channel_index);
@@ -1003,8 +1003,8 @@ static void mouse_action_keys (bAnimContext *ac, const int mval[2], short select
}
else {
/* found match - must return here... */
- AnimData *adt= ANIM_nla_mapping_get(ac, ale);
- ActKeyColumn *ak, *akn=NULL;
+ AnimData *adt = ANIM_nla_mapping_get(ac, ale);
+ ActKeyColumn *ak, *akn = NULL;
/* make list of keyframes */
BLI_dlrbTree_init(&anim_keys);
@@ -1013,28 +1013,28 @@ static void mouse_action_keys (bAnimContext *ac, const int mval[2], short select
switch (ale->datatype) {
case ALE_SCE:
{
- Scene *scene= (Scene *)ale->key_data;
+ Scene *scene = (Scene *)ale->key_data;
scene_to_keylist(ads, scene, &anim_keys, NULL);
}
- break;
+ break;
case ALE_OB:
{
- Object *ob= (Object *)ale->key_data;
+ Object *ob = (Object *)ale->key_data;
ob_to_keylist(ads, ob, &anim_keys, NULL);
}
- break;
+ break;
case ALE_ACT:
{
- bAction *act= (bAction *)ale->key_data;
+ bAction *act = (bAction *)ale->key_data;
action_to_keylist(adt, act, &anim_keys, NULL);
}
- break;
+ break;
case ALE_FCURVE:
{
- FCurve *fcu= (FCurve *)ale->key_data;
+ FCurve *fcu = (FCurve *)ale->key_data;
fcurve_to_keylist(adt, fcu, &anim_keys, NULL);
}
- break;
+ break;
}
}
else if (ale->type == ANIMTYPE_SUMMARY) {
@@ -1043,7 +1043,7 @@ static void mouse_action_keys (bAnimContext *ac, const int mval[2], short select
}
else if (ale->type == ANIMTYPE_GROUP) {
// TODO: why don't we just give groups key_data too?
- bActionGroup *agrp= (bActionGroup *)ale->data;
+ bActionGroup *agrp = (bActionGroup *)ale->data;
agroup_to_keylist(adt, agrp, &anim_keys, NULL);
}
else if (ale->type == ANIMTYPE_GPLAYER) {
@@ -1053,20 +1053,20 @@ static void mouse_action_keys (bAnimContext *ac, const int mval[2], short select
}
/* start from keyframe at root of BST, traversing until we find one within the range that was clicked on */
- for (ak= anim_keys.root; ak; ak= akn) {
+ for (ak = anim_keys.root; ak; ak = akn) {
if (IN_RANGE(ak->cfra, rectf.xmin, rectf.xmax)) {
/* set the frame to use, and apply inverse-correction for NLA-mapping
* so that the frame will get selected by the selection functions without
* requiring to map each frame once again...
*/
- selx= BKE_nla_tweakedit_remap(adt, ak->cfra, NLATIME_CONVERT_UNMAP);
- found= 1;
+ selx = BKE_nla_tweakedit_remap(adt, ak->cfra, NLATIME_CONVERT_UNMAP);
+ found = 1;
break;
}
else if (ak->cfra < rectf.xmin)
- akn= ak->right;
+ akn = ak->right;
else
- akn= ak->left;
+ akn = ak->left;
}
/* remove active channel from list of channels for separate treatment (since it's needed later on) */
@@ -1095,13 +1095,13 @@ static void mouse_action_keys (bAnimContext *ac, const int mval[2], short select
/* Highlight Action-Group or F-Curve? */
if (ale && ale->data) {
if (ale->type == ANIMTYPE_GROUP) {
- bActionGroup *agrp= ale->data;
+ bActionGroup *agrp = ale->data;
agrp->flag |= AGRP_SELECTED;
ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, agrp, ANIMTYPE_GROUP);
}
else if (ale->type == ANIMTYPE_FCURVE) {
- FCurve *fcu= ale->data;
+ FCurve *fcu = ale->data;
fcu->flag |= FCURVE_SELECTED;
ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, fcu, ANIMTYPE_FCURVE);
@@ -1157,24 +1157,24 @@ static int actkeys_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *even
/* select mode is either replace (deselect all, then add) or add/extend */
if (RNA_boolean_get(op->ptr, "extend"))
- selectmode= SELECT_INVERT;
+ selectmode = SELECT_INVERT;
else
- selectmode= SELECT_REPLACE;
+ selectmode = SELECT_REPLACE;
/* column selection */
- column= RNA_boolean_get(op->ptr, "column");
+ column = RNA_boolean_get(op->ptr, "column");
/* select keyframe(s) based upon mouse position*/
mouse_action_keys(&ac, event->mval, selectmode, column);
/* set notifier that keyframe selection (and channels too) have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|ND_ANIMCHAN|NA_SELECTED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | ND_ANIMCHAN | NA_SELECTED, NULL);
/* for tweak grab to work */
- return OPERATOR_FINISHED|OPERATOR_PASS_THROUGH;
+ return OPERATOR_FINISHED | OPERATOR_PASS_THROUGH;
}
-void ACTION_OT_clickselect (wmOperatorType *ot)
+void ACTION_OT_clickselect(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Mouse Select Keys";
@@ -1186,7 +1186,7 @@ void ACTION_OT_clickselect (wmOperatorType *ot)
ot->poll = ED_operator_action_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* id-props */
RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); // SHIFTKEY
diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c
index 9d0dab7d34e..ae4020aaaba 100644
--- a/source/blender/editors/space_action/space_action.c
+++ b/source/blender/editors/space_action/space_action.c
@@ -60,67 +60,67 @@
#include "ED_anim_api.h"
#include "ED_markers.h"
-#include "action_intern.h" // own include
+#include "action_intern.h" /* own include */
/* ******************** default callbacks for action space ***************** */
static SpaceLink *action_new(const bContext *C)
{
- ScrArea *sa= CTX_wm_area(C);
+ ScrArea *sa = CTX_wm_area(C);
SpaceAction *saction;
ARegion *ar;
- saction= MEM_callocN(sizeof(SpaceAction), "initaction");
- saction->spacetype= SPACE_ACTION;
+ saction = MEM_callocN(sizeof(SpaceAction), "initaction");
+ saction->spacetype = SPACE_ACTION;
saction->autosnap = SACTSNAP_FRAME;
- saction->mode= SACTCONT_DOPESHEET;
+ saction->mode = SACTCONT_DOPESHEET;
saction->ads.filterflag |= ADS_FILTER_SUMMARY;
/* header */
- ar= MEM_callocN(sizeof(ARegion), "header for action");
+ ar = MEM_callocN(sizeof(ARegion), "header for action");
BLI_addtail(&saction->regionbase, ar);
- ar->regiontype= RGN_TYPE_HEADER;
- ar->alignment= RGN_ALIGN_BOTTOM;
+ ar->regiontype = RGN_TYPE_HEADER;
+ ar->alignment = RGN_ALIGN_BOTTOM;
/* channel list region */
- ar= MEM_callocN(sizeof(ARegion), "channel area for action");
+ ar = MEM_callocN(sizeof(ARegion), "channel area for action");
BLI_addtail(&saction->regionbase, ar);
- ar->regiontype= RGN_TYPE_CHANNELS;
- ar->alignment= RGN_ALIGN_LEFT;
+ ar->regiontype = RGN_TYPE_CHANNELS;
+ ar->alignment = RGN_ALIGN_LEFT;
- /* only need to set scroll settings, as this will use 'listview' v2d configuration */
+ /* only need to set scroll settings, as this will use 'listview' v2d configuration */
ar->v2d.scroll = V2D_SCROLL_BOTTOM;
ar->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL;
/* main area */
- ar= MEM_callocN(sizeof(ARegion), "main area for action");
+ ar = MEM_callocN(sizeof(ARegion), "main area for action");
BLI_addtail(&saction->regionbase, ar);
- ar->regiontype= RGN_TYPE_WINDOW;
+ ar->regiontype = RGN_TYPE_WINDOW;
ar->v2d.tot.xmin = -10.0f;
- ar->v2d.tot.ymin = (float)(-sa->winy)/3.0f;
+ ar->v2d.tot.ymin = (float)(-sa->winy) / 3.0f;
ar->v2d.tot.xmax = (float)(sa->winx);
ar->v2d.tot.ymax = 0.0f;
ar->v2d.cur = ar->v2d.tot;
- ar->v2d.min[0]= 0.0f;
- ar->v2d.min[1]= 0.0f;
+ ar->v2d.min[0] = 0.0f;
+ ar->v2d.min[1] = 0.0f;
- ar->v2d.max[0]= MAXFRAMEF;
- ar->v2d.max[1]= FLT_MAX;
+ ar->v2d.max[0] = MAXFRAMEF;
+ ar->v2d.max[1] = FLT_MAX;
- ar->v2d.minzoom= 0.01f;
- ar->v2d.maxzoom= 50;
- ar->v2d.scroll = (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL);
+ ar->v2d.minzoom = 0.01f;
+ ar->v2d.maxzoom = 50;
+ ar->v2d.scroll = (V2D_SCROLL_BOTTOM | V2D_SCROLL_SCALE_HORIZONTAL);
ar->v2d.scroll |= (V2D_SCROLL_RIGHT);
- ar->v2d.keepzoom= V2D_LOCKZOOM_Y;
- ar->v2d.keepofs= V2D_KEEPOFS_Y;
- ar->v2d.align= V2D_ALIGN_NO_POS_Y;
+ ar->v2d.keepzoom = V2D_LOCKZOOM_Y;
+ ar->v2d.keepofs = V2D_KEEPOFS_Y;
+ ar->v2d.align = V2D_ALIGN_NO_POS_Y;
ar->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL;
return (SpaceLink *)saction;
@@ -143,7 +143,7 @@ static void action_init(struct wmWindowManager *UNUSED(wm), ScrArea *sa)
static SpaceLink *action_duplicate(SpaceLink *sl)
{
- SpaceAction *sactionn= MEM_dupallocN(sl);
+ SpaceAction *sactionn = MEM_dupallocN(sl);
/* clear or remove stuff from old */
@@ -167,12 +167,12 @@ static void action_main_area_init(wmWindowManager *wm, ARegion *ar)
static void action_main_area_draw(const bContext *C, ARegion *ar)
{
/* draw entirely, view changes should be handled here */
- SpaceAction *saction= CTX_wm_space_action(C);
+ SpaceAction *saction = CTX_wm_space_action(C);
bAnimContext ac;
- View2D *v2d= &ar->v2d;
+ View2D *v2d = &ar->v2d;
View2DGrid *grid;
View2DScrollers *scrollers;
- short unit=0, flag=0;
+ short unit = 0, flag = 0;
/* clear and setup matrix */
UI_ThemeClearColor(TH_BACK);
@@ -181,8 +181,8 @@ static void action_main_area_draw(const bContext *C, ARegion *ar)
UI_view2d_view_ortho(v2d);
/* time grid */
- unit= (saction->flag & SACTION_DRAWTIME)? V2D_UNIT_SECONDS : V2D_UNIT_FRAMES;
- grid= UI_view2d_grid_calc(CTX_data_scene(C), v2d, unit, V2D_GRID_CLAMP, V2D_ARG_DUMMY, V2D_ARG_DUMMY, ar->winx, ar->winy);
+ unit = (saction->flag & SACTION_DRAWTIME) ? V2D_UNIT_SECONDS : V2D_UNIT_FRAMES;
+ grid = UI_view2d_grid_calc(CTX_data_scene(C), v2d, unit, V2D_GRID_CLAMP, V2D_ARG_DUMMY, V2D_ARG_DUMMY, ar->winx, ar->winy);
UI_view2d_grid_draw(v2d, grid, V2D_GRIDLINES_ALL);
UI_view2d_grid_free(grid);
@@ -192,14 +192,14 @@ static void action_main_area_draw(const bContext *C, ARegion *ar)
}
/* current frame */
- if (saction->flag & SACTION_DRAWTIME) flag |= DRAWCFRA_UNIT_SECONDS;
- if ((saction->flag & SACTION_NODRAWCFRANUM)==0) flag |= DRAWCFRA_SHOW_NUMBOX;
+ if (saction->flag & SACTION_DRAWTIME) flag |= DRAWCFRA_UNIT_SECONDS;
+ if ((saction->flag & SACTION_NODRAWCFRANUM) == 0) flag |= DRAWCFRA_SHOW_NUMBOX;
ANIM_draw_cfra(C, v2d, flag);
/* markers */
UI_view2d_view_orthoSpecial(ar, v2d, 1);
- flag = (ac.markers && (ac.markers != &ac.scene->markers))? DRAW_MARKERS_LOCAL : 0;
+ flag = (ac.markers && (ac.markers != &ac.scene->markers)) ? DRAW_MARKERS_LOCAL : 0;
draw_markers_time(C, flag);
/* preview range */
@@ -210,7 +210,7 @@ static void action_main_area_draw(const bContext *C, ARegion *ar)
UI_view2d_view_restore(C);
/* scrollers */
- scrollers= UI_view2d_scrollers_calc(C, v2d, unit, V2D_GRID_CLAMP, V2D_ARG_DUMMY, V2D_ARG_DUMMY);
+ scrollers = UI_view2d_scrollers_calc(C, v2d, unit, V2D_GRID_CLAMP, V2D_ARG_DUMMY, V2D_ARG_DUMMY);
UI_view2d_scrollers_draw(C, v2d, scrollers);
UI_view2d_scrollers_free(scrollers);
}
@@ -231,7 +231,7 @@ static void action_channel_area_draw(const bContext *C, ARegion *ar)
{
/* draw entirely, view changes should be handled here */
bAnimContext ac;
- View2D *v2d= &ar->v2d;
+ View2D *v2d = &ar->v2d;
View2DScrollers *scrollers;
/* clear and setup matrix */
@@ -249,7 +249,7 @@ static void action_channel_area_draw(const bContext *C, ARegion *ar)
UI_view2d_view_restore(C);
/* scrollers */
- scrollers= UI_view2d_scrollers_calc(C, v2d, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY);
+ scrollers = UI_view2d_scrollers_calc(C, v2d, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY);
UI_view2d_scrollers_draw(C, v2d, scrollers);
UI_view2d_scrollers_free(scrollers);
}
@@ -269,12 +269,12 @@ static void action_header_area_draw(const bContext *C, ARegion *ar)
static void action_channel_area_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
- switch(wmn->category) {
+ switch (wmn->category) {
case NC_ANIMATION:
ED_region_tag_redraw(ar);
break;
case NC_SCENE:
- switch(wmn->data) {
+ switch (wmn->data) {
case ND_OB_ACTIVE:
case ND_FRAME:
ED_region_tag_redraw(ar);
@@ -282,7 +282,7 @@ static void action_channel_area_listener(ARegion *ar, wmNotifier *wmn)
}
break;
case NC_OBJECT:
- switch(wmn->data) {
+ switch (wmn->data) {
case ND_BONE_ACTIVE:
case ND_BONE_SELECT:
case ND_KEYS:
@@ -299,7 +299,7 @@ static void action_channel_area_listener(ARegion *ar, wmNotifier *wmn)
ED_region_tag_redraw(ar);
break;
default:
- if (wmn->data==ND_KEYS)
+ if (wmn->data == ND_KEYS)
ED_region_tag_redraw(ar);
}
}
@@ -307,12 +307,12 @@ static void action_channel_area_listener(ARegion *ar, wmNotifier *wmn)
static void action_main_area_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
- switch(wmn->category) {
+ switch (wmn->category) {
case NC_ANIMATION:
ED_region_tag_redraw(ar);
break;
case NC_SCENE:
- switch(wmn->data) {
+ switch (wmn->data) {
case ND_RENDER_OPTIONS:
case ND_OB_ACTIVE:
case ND_FRAME:
@@ -322,7 +322,7 @@ static void action_main_area_listener(ARegion *ar, wmNotifier *wmn)
}
break;
case NC_OBJECT:
- switch(wmn->data) {
+ switch (wmn->data) {
case ND_TRANSFORM:
/* moving object shouldn't need to redraw action */
break;
@@ -334,7 +334,7 @@ static void action_main_area_listener(ARegion *ar, wmNotifier *wmn)
}
break;
case NC_NODE:
- switch(wmn->action) {
+ switch (wmn->action) {
case NA_EDITED:
ED_region_tag_redraw(ar);
break;
@@ -346,7 +346,7 @@ static void action_main_area_listener(ARegion *ar, wmNotifier *wmn)
break;
default:
- if (wmn->data==ND_KEYS)
+ if (wmn->data == ND_KEYS)
ED_region_tag_redraw(ar);
}
}
@@ -354,7 +354,7 @@ static void action_main_area_listener(ARegion *ar, wmNotifier *wmn)
/* editor level listener */
static void action_listener(ScrArea *sa, wmNotifier *wmn)
{
- SpaceAction *saction= (SpaceAction *)sa->spacedata.first;
+ SpaceAction *saction = (SpaceAction *)sa->spacedata.first;
/* context changes */
switch (wmn->category) {
@@ -379,7 +379,7 @@ static void action_listener(ScrArea *sa, wmNotifier *wmn)
break;
case NC_SCENE:
switch (wmn->data) {
- case ND_OB_ACTIVE: /* selection changed, so force refresh to flush (needs flag set to do syncing) */
+ case ND_OB_ACTIVE: /* selection changed, so force refresh to flush (needs flag set to do syncing) */
case ND_OB_SELECT:
saction->flag |= SACTION_TEMP_NEEDCHANSYNC;
ED_area_tag_refresh(sa);
@@ -392,7 +392,7 @@ static void action_listener(ScrArea *sa, wmNotifier *wmn)
break;
case NC_OBJECT:
switch (wmn->data) {
- case ND_BONE_SELECT: /* selection changed, so force refresh to flush (needs flag set to do syncing) */
+ case ND_BONE_SELECT: /* selection changed, so force refresh to flush (needs flag set to do syncing) */
case ND_BONE_ACTIVE:
saction->flag |= SACTION_TEMP_NEEDCHANSYNC;
ED_area_tag_refresh(sa);
@@ -446,7 +446,7 @@ static void action_header_area_listener(ARegion *ar, wmNotifier *wmn)
static void action_refresh(const bContext *C, ScrArea *sa)
{
- SpaceAction *saction= (SpaceAction *)sa->spacedata.first;
+ SpaceAction *saction = (SpaceAction *)sa->spacedata.first;
/* 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, and will be cleared once handled
@@ -464,52 +464,52 @@ static void action_refresh(const bContext *C, ScrArea *sa)
/* only called once, from space/spacetypes.c */
void ED_spacetype_action(void)
{
- SpaceType *st= MEM_callocN(sizeof(SpaceType), "spacetype action");
+ SpaceType *st = MEM_callocN(sizeof(SpaceType), "spacetype action");
ARegionType *art;
- st->spaceid= SPACE_ACTION;
+ st->spaceid = SPACE_ACTION;
strncpy(st->name, "Action", BKE_ST_MAXNAME);
- st->new= action_new;
- st->free= action_free;
- st->init= action_init;
- st->duplicate= action_duplicate;
- st->operatortypes= action_operatortypes;
- st->keymap= action_keymap;
- st->listener= action_listener;
- st->refresh= action_refresh;
+ st->new = action_new;
+ st->free = action_free;
+ st->init = action_init;
+ st->duplicate = action_duplicate;
+ st->operatortypes = action_operatortypes;
+ st->keymap = action_keymap;
+ st->listener = action_listener;
+ st->refresh = action_refresh;
/* regions: main window */
- art= MEM_callocN(sizeof(ARegionType), "spacetype action region");
+ art = MEM_callocN(sizeof(ARegionType), "spacetype action region");
art->regionid = RGN_TYPE_WINDOW;
- art->init= action_main_area_init;
- art->draw= action_main_area_draw;
- art->listener= action_main_area_listener;
- art->keymapflag= ED_KEYMAP_VIEW2D|ED_KEYMAP_MARKERS|ED_KEYMAP_ANIMATION|ED_KEYMAP_FRAMES;
+ art->init = action_main_area_init;
+ art->draw = action_main_area_draw;
+ art->listener = action_main_area_listener;
+ art->keymapflag = ED_KEYMAP_VIEW2D | ED_KEYMAP_MARKERS | ED_KEYMAP_ANIMATION | ED_KEYMAP_FRAMES;
BLI_addhead(&st->regiontypes, art);
/* regions: header */
- art= MEM_callocN(sizeof(ARegionType), "spacetype action region");
+ art = MEM_callocN(sizeof(ARegionType), "spacetype action region");
art->regionid = RGN_TYPE_HEADER;
- art->prefsizey= HEADERY;
- art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D|ED_KEYMAP_FRAMES|ED_KEYMAP_HEADER;
+ art->prefsizey = HEADERY;
+ art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_HEADER;
- art->init= action_header_area_init;
- art->draw= action_header_area_draw;
- art->listener= action_header_area_listener;
+ art->init = action_header_area_init;
+ art->draw = action_header_area_draw;
+ art->listener = action_header_area_listener;
BLI_addhead(&st->regiontypes, art);
/* regions: channels */
- art= MEM_callocN(sizeof(ARegionType), "spacetype action region");
+ art = MEM_callocN(sizeof(ARegionType), "spacetype action region");
art->regionid = RGN_TYPE_CHANNELS;
- art->prefsizex= 200;
- art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D;
+ art->prefsizex = 200;
+ art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D;
- art->init= action_channel_area_init;
- art->draw= action_channel_area_draw;
- art->listener= action_channel_area_listener;
+ art->init = action_channel_area_init;
+ art->draw = action_channel_area_draw;
+ art->listener = action_channel_area_listener;
BLI_addhead(&st->regiontypes, art);
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index b698ec03668..d1c2c1e092f 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -63,15 +63,15 @@
#include "UI_interface.h"
#include "UI_resources.h"
-#include "buttons_intern.h" // own include
+#include "buttons_intern.h" // own include
static int set_pointer_type(ButsContextPath *path, bContextDataResult *result, StructRNA *type)
{
PointerRNA *ptr;
int a;
- for (a=0; a<path->len; a++) {
- ptr= &path->ptr[a];
+ for (a = 0; a < path->len; a++) {
+ ptr = &path->ptr[a];
if (RNA_struct_is_a(ptr->type, type)) {
CTX_data_pointer_set(result, ptr->id.data, ptr->type, ptr->data);
@@ -87,8 +87,8 @@ static PointerRNA *get_pointer_type(ButsContextPath *path, StructRNA *type)
PointerRNA *ptr;
int a;
- for (a=0; a<path->len; a++) {
- ptr= &path->ptr[a];
+ for (a = 0; a < path->len; a++) {
+ ptr = &path->ptr[a];
if (RNA_struct_is_a(ptr->type, type))
return ptr;
@@ -101,7 +101,7 @@ static PointerRNA *get_pointer_type(ButsContextPath *path, StructRNA *type)
static int buttons_context_path_scene(ButsContextPath *path)
{
- PointerRNA *ptr= &path->ptr[path->len-1];
+ PointerRNA *ptr = &path->ptr[path->len - 1];
/* this one just verifies */
return RNA_struct_is_a(ptr->type, &RNA_Scene);
@@ -113,7 +113,7 @@ static int buttons_context_path_world(ButsContextPath *path)
{
Scene *scene;
World *world;
- PointerRNA *ptr= &path->ptr[path->len-1];
+ PointerRNA *ptr = &path->ptr[path->len - 1];
/* if we already have a (pinned) world, we're done */
if (RNA_struct_is_a(ptr->type, &RNA_World)) {
@@ -121,8 +121,8 @@ static int buttons_context_path_world(ButsContextPath *path)
}
/* if we have a scene, use the scene's world */
else if (buttons_context_path_scene(path)) {
- scene= path->ptr[path->len-1].data;
- world= scene->world;
+ scene = path->ptr[path->len - 1].data;
+ world = scene->world;
if (world) {
RNA_id_pointer_create(&scene->world->id, &path->ptr[path->len]);
@@ -143,7 +143,7 @@ static int buttons_context_path_object(ButsContextPath *path)
{
Scene *scene;
Object *ob;
- PointerRNA *ptr= &path->ptr[path->len-1];
+ PointerRNA *ptr = &path->ptr[path->len - 1];
/* if we already have a (pinned) object, we're done */
if (RNA_struct_is_a(ptr->type, &RNA_Object)) {
@@ -151,8 +151,8 @@ static int buttons_context_path_object(ButsContextPath *path)
}
/* if we have a scene, use the scene's active object */
else if (buttons_context_path_scene(path)) {
- scene= path->ptr[path->len-1].data;
- ob= (scene->basact)? scene->basact->object: NULL;
+ scene = path->ptr[path->len - 1].data;
+ ob = (scene->basact) ? scene->basact->object : NULL;
if (ob) {
RNA_id_pointer_create(&ob->id, &path->ptr[path->len]);
@@ -169,7 +169,7 @@ static int buttons_context_path_object(ButsContextPath *path)
static int buttons_context_path_data(ButsContextPath *path, int type)
{
Object *ob;
- PointerRNA *ptr= &path->ptr[path->len-1];
+ PointerRNA *ptr = &path->ptr[path->len - 1];
/* if we already have a data, we're done */
if (RNA_struct_is_a(ptr->type, &RNA_Mesh) && (type == -1 || type == OB_MESH)) return 1;
@@ -182,7 +182,7 @@ static int buttons_context_path_data(ButsContextPath *path, int type)
else if (RNA_struct_is_a(ptr->type, &RNA_Speaker) && (type == -1 || type == OB_SPEAKER)) return 1;
/* try to get an object in the path, no pinning supported here */
else if (buttons_context_path_object(path)) {
- ob= path->ptr[path->len-1].data;
+ ob = path->ptr[path->len - 1].data;
if (ob && (type == -1 || type == ob->type)) {
RNA_id_pointer_create(ob->data, &path->ptr[path->len]);
@@ -201,7 +201,7 @@ static int buttons_context_path_modifier(ButsContextPath *path)
Object *ob;
if (buttons_context_path_object(path)) {
- ob= path->ptr[path->len-1].data;
+ ob = path->ptr[path->len - 1].data;
if (ob && ELEM5(ob->type, OB_MESH, OB_CURVE, OB_FONT, OB_SURF, OB_LATTICE))
return 1;
@@ -213,7 +213,7 @@ static int buttons_context_path_modifier(ButsContextPath *path)
static int buttons_context_path_material(ButsContextPath *path, int for_texture)
{
Object *ob;
- PointerRNA *ptr= &path->ptr[path->len-1];
+ PointerRNA *ptr = &path->ptr[path->len - 1];
Material *ma;
/* if we already have a (pinned) material, we're done */
@@ -222,17 +222,17 @@ static int buttons_context_path_material(ButsContextPath *path, int for_texture)
}
/* if we have an object, use the object material slot */
else if (buttons_context_path_object(path)) {
- ob= path->ptr[path->len-1].data;
+ ob = path->ptr[path->len - 1].data;
if (ob && OB_TYPE_SUPPORT_MATERIAL(ob->type)) {
- ma= give_current_material(ob, ob->actcol);
+ ma = give_current_material(ob, ob->actcol);
RNA_id_pointer_create(&ma->id, &path->ptr[path->len]);
path->len++;
if (for_texture && give_current_material_texture_node(ma))
return 1;
- ma= give_node_material(ma);
+ ma = give_node_material(ma);
if (ma) {
RNA_id_pointer_create(&ma->id, &path->ptr[path->len]);
path->len++;
@@ -252,11 +252,11 @@ static int buttons_context_path_bone(ButsContextPath *path)
/* if we have an armature, get the active bone */
if (buttons_context_path_data(path, OB_ARMATURE)) {
- arm= path->ptr[path->len-1].data;
+ arm = path->ptr[path->len - 1].data;
if (arm->edbo) {
if (arm->act_edbone) {
- edbo= arm->act_edbone;
+ edbo = arm->act_edbone;
RNA_pointer_create(&arm->id, &RNA_EditBone, edbo, &path->ptr[path->len]);
path->len++;
return 1;
@@ -277,7 +277,7 @@ static int buttons_context_path_bone(ButsContextPath *path)
static int buttons_context_path_pose_bone(ButsContextPath *path)
{
- PointerRNA *ptr= &path->ptr[path->len-1];
+ PointerRNA *ptr = &path->ptr[path->len - 1];
/* if we already have a (pinned) PoseBone, we're done */
if (RNA_struct_is_a(ptr->type, &RNA_PoseBone)) {
@@ -286,15 +286,15 @@ static int buttons_context_path_pose_bone(ButsContextPath *path)
/* if we have an armature, get the active bone */
if (buttons_context_path_object(path)) {
- Object *ob= path->ptr[path->len-1].data;
- bArmature *arm= ob->data; /* path->ptr[path->len-1].data - works too */
+ Object *ob = path->ptr[path->len - 1].data;
+ bArmature *arm = ob->data; /* path->ptr[path->len-1].data - works too */
if (ob->type != OB_ARMATURE || arm->edbo) {
return 0;
}
else {
if (arm->act_bone) {
- bPoseChannel *pchan= get_pose_channel(ob->pose, arm->act_bone->name);
+ bPoseChannel *pchan = BKE_pose_channel_find_name(ob->pose, arm->act_bone->name);
if (pchan) {
RNA_pointer_create(&ob->id, &RNA_PoseBone, pchan, &path->ptr[path->len]);
path->len++;
@@ -313,7 +313,7 @@ static int buttons_context_path_particle(ButsContextPath *path)
{
Object *ob;
ParticleSystem *psys;
- PointerRNA *ptr= &path->ptr[path->len-1];
+ PointerRNA *ptr = &path->ptr[path->len - 1];
/* if we already have (pinned) particle settings, we're done */
if (RNA_struct_is_a(ptr->type, &RNA_ParticleSettings)) {
@@ -321,10 +321,10 @@ static int buttons_context_path_particle(ButsContextPath *path)
}
/* if we have an object, get the active particle system */
if (buttons_context_path_object(path)) {
- ob= path->ptr[path->len-1].data;
+ ob = path->ptr[path->len - 1].data;
if (ob && ob->type == OB_MESH) {
- psys= psys_get_current(ob);
+ psys = psys_get_current(ob);
RNA_pointer_create(&ob->id, &RNA_ParticleSystem, psys, &path->ptr[path->len]);
path->len++;
@@ -339,8 +339,8 @@ static int buttons_context_path_particle(ButsContextPath *path)
static int buttons_context_path_brush(ButsContextPath *path)
{
Scene *scene;
- Brush *br= NULL;
- PointerRNA *ptr= &path->ptr[path->len-1];
+ Brush *br = NULL;
+ PointerRNA *ptr = &path->ptr[path->len - 1];
/* if we already have a (pinned) brush, we're done */
if (RNA_struct_is_a(ptr->type, &RNA_Brush)) {
@@ -348,10 +348,10 @@ static int buttons_context_path_brush(ButsContextPath *path)
}
/* if we have a scene, use the toolsettings brushes */
else if (buttons_context_path_scene(path)) {
- scene= path->ptr[path->len-1].data;
+ scene = path->ptr[path->len - 1].data;
if (scene)
- br= paint_brush(paint_get_active(scene));
+ br = paint_brush(paint_get_active(scene));
if (br) {
RNA_id_pointer_create((ID *)br, &path->ptr[path->len]);
@@ -369,7 +369,7 @@ static int buttons_context_path_texture(ButsContextPath *path, ButsContextTextur
{
if (ct) {
/* new shading system */
- PointerRNA *ptr= &path->ptr[path->len-1];
+ PointerRNA *ptr = &path->ptr[path->len - 1];
ID *id;
/* if we already have a (pinned) texture, we're done */
@@ -379,7 +379,7 @@ static int buttons_context_path_texture(ButsContextPath *path, ButsContextTextur
if (!ct->user)
return 0;
- id= ct->user->id;
+ id = ct->user->id;
if (id) {
if (GS(id->name) == ID_BR)
@@ -411,7 +411,7 @@ static int buttons_context_path_texture(ButsContextPath *path, ButsContextTextur
World *wo;
ParticleSystem *psys;
Tex *tex;
- PointerRNA *ptr= &path->ptr[path->len-1];
+ PointerRNA *ptr = &path->ptr[path->len - 1];
int orig_len = path->len;
/* if we already have a (pinned) texture, we're done */
@@ -420,10 +420,10 @@ static int buttons_context_path_texture(ButsContextPath *path, ButsContextTextur
}
/* try brush */
if ((path->tex_ctx == SB_TEXC_BRUSH) && buttons_context_path_brush(path)) {
- br= path->ptr[path->len-1].data;
+ br = path->ptr[path->len - 1].data;
if (br) {
- tex= give_current_brush_texture(br);
+ tex = give_current_brush_texture(br);
RNA_id_pointer_create(&tex->id, &path->ptr[path->len]);
path->len++;
@@ -432,10 +432,10 @@ static int buttons_context_path_texture(ButsContextPath *path, ButsContextTextur
}
/* try world */
if ((path->tex_ctx == SB_TEXC_WORLD) && buttons_context_path_world(path)) {
- wo= path->ptr[path->len-1].data;
+ wo = path->ptr[path->len - 1].data;
- if (wo && GS(wo->id.name)==ID_WO) {
- tex= give_current_world_texture(wo);
+ if (wo && GS(wo->id.name) == ID_WO) {
+ tex = give_current_world_texture(wo);
RNA_id_pointer_create(&tex->id, &path->ptr[path->len]);
path->len++;
@@ -444,19 +444,19 @@ static int buttons_context_path_texture(ButsContextPath *path, ButsContextTextur
}
/* try particles */
if ((path->tex_ctx == SB_TEXC_PARTICLES) && buttons_context_path_particle(path)) {
- if (path->ptr[path->len-1].type == &RNA_ParticleSettings) {
- ParticleSettings *part = path->ptr[path->len-1].data;
+ if (path->ptr[path->len - 1].type == &RNA_ParticleSettings) {
+ ParticleSettings *part = path->ptr[path->len - 1].data;
- tex= give_current_particle_texture(part);
+ tex = give_current_particle_texture(part);
RNA_id_pointer_create(&tex->id, &path->ptr[path->len]);
path->len++;
return 1;
}
else {
- psys= path->ptr[path->len-1].data;
+ psys = path->ptr[path->len - 1].data;
- if (psys && psys->part && GS(psys->part->id.name)==ID_PA) {
- tex= give_current_particle_texture(psys->part);
+ if (psys && psys->part && GS(psys->part->id.name) == ID_PA) {
+ tex = give_current_particle_texture(psys->part);
RNA_id_pointer_create(&tex->id, &path->ptr[path->len]);
path->len++;
@@ -466,10 +466,10 @@ static int buttons_context_path_texture(ButsContextPath *path, ButsContextTextur
}
/* try material */
if (buttons_context_path_material(path, 1)) {
- ma= path->ptr[path->len-1].data;
+ ma = path->ptr[path->len - 1].data;
if (ma) {
- tex= give_current_material_texture(ma);
+ tex = give_current_material_texture(ma);
RNA_id_pointer_create(&tex->id, &path->ptr[path->len]);
path->len++;
@@ -478,10 +478,10 @@ static int buttons_context_path_texture(ButsContextPath *path, ButsContextTextur
}
/* try lamp */
if (buttons_context_path_data(path, OB_LAMP)) {
- la= path->ptr[path->len-1].data;
+ la = path->ptr[path->len - 1].data;
if (la) {
- tex= give_current_lamp_texture(la);
+ tex = give_current_lamp_texture(la);
RNA_id_pointer_create(&tex->id, &path->ptr[path->len]);
path->len++;
@@ -491,10 +491,10 @@ static int buttons_context_path_texture(ButsContextPath *path, ButsContextTextur
/* try brushes again in case of no material, lamp, etc */
path->len = orig_len;
if (buttons_context_path_brush(path)) {
- br= path->ptr[path->len-1].data;
+ br = path->ptr[path->len - 1].data;
if (br) {
- tex= give_current_brush_texture(br);
+ tex = give_current_brush_texture(br);
RNA_id_pointer_create(&tex->id, &path->ptr[path->len]);
path->len++;
@@ -510,17 +510,17 @@ static int buttons_context_path_texture(ButsContextPath *path, ButsContextTextur
static int buttons_context_path(const bContext *C, ButsContextPath *path, int mainb, int flag)
{
- SpaceButs *sbuts= CTX_wm_space_buts(C);
+ SpaceButs *sbuts = CTX_wm_space_buts(C);
ID *id;
int found;
memset(path, 0, sizeof(*path));
- path->flag= flag;
+ path->flag = flag;
path->tex_ctx = sbuts->texture_context;
/* if some ID datablock is pinned, set the root pointer */
if (sbuts->pinid) {
- id= sbuts->pinid;
+ id = sbuts->pinid;
RNA_id_pointer_create(id, &path->ptr[0]);
path->len++;
@@ -528,51 +528,51 @@ static int buttons_context_path(const bContext *C, ButsContextPath *path, int ma
/* no pinned root, use scene as root */
if (path->len == 0) {
- id= (ID*)CTX_data_scene(C);
+ id = (ID *)CTX_data_scene(C);
RNA_id_pointer_create(id, &path->ptr[0]);
path->len++;
}
/* now for each buttons context type, we try to construct a path,
* tracing back recursively */
- switch(mainb) {
+ switch (mainb) {
case BCONTEXT_SCENE:
case BCONTEXT_RENDER:
- found= buttons_context_path_scene(path);
+ found = buttons_context_path_scene(path);
break;
case BCONTEXT_WORLD:
- found= buttons_context_path_world(path);
+ found = buttons_context_path_world(path);
break;
case BCONTEXT_OBJECT:
case BCONTEXT_PHYSICS:
case BCONTEXT_CONSTRAINT:
- found= buttons_context_path_object(path);
+ found = buttons_context_path_object(path);
break;
case BCONTEXT_MODIFIER:
- found= buttons_context_path_modifier(path);
+ found = buttons_context_path_modifier(path);
break;
case BCONTEXT_DATA:
- found= buttons_context_path_data(path, -1);
+ found = buttons_context_path_data(path, -1);
break;
case BCONTEXT_PARTICLE:
- found= buttons_context_path_particle(path);
+ found = buttons_context_path_particle(path);
break;
case BCONTEXT_MATERIAL:
- found= buttons_context_path_material(path, 0);
+ found = buttons_context_path_material(path, 0);
break;
case BCONTEXT_TEXTURE:
- found= buttons_context_path_texture(path, sbuts->texuser);
+ found = buttons_context_path_texture(path, sbuts->texuser);
break;
case BCONTEXT_BONE:
- found= buttons_context_path_bone(path);
+ found = buttons_context_path_bone(path);
if (!found)
- found= buttons_context_path_data(path, OB_ARMATURE);
+ found = buttons_context_path_data(path, OB_ARMATURE);
break;
case BCONTEXT_BONE_CONSTRAINT:
- found= buttons_context_path_pose_bone(path);
+ found = buttons_context_path_pose_bone(path);
break;
default:
- found= 0;
+ found = 0;
break;
}
@@ -581,7 +581,7 @@ static int buttons_context_path(const bContext *C, ButsContextPath *path, int ma
static int buttons_shading_context(const bContext *C, int mainb)
{
- Object *ob= CTX_data_active_object(C);
+ Object *ob = CTX_data_active_object(C);
if (ELEM3(mainb, BCONTEXT_MATERIAL, BCONTEXT_WORLD, BCONTEXT_TEXTURE))
return 1;
@@ -593,7 +593,7 @@ static int buttons_shading_context(const bContext *C, int mainb)
static int buttons_shading_new_context(const bContext *C, int flag)
{
- Object *ob= CTX_data_active_object(C);
+ Object *ob = CTX_data_active_object(C);
if (flag & (1 << BCONTEXT_MATERIAL))
return BCONTEXT_MATERIAL;
@@ -609,29 +609,29 @@ void buttons_context_compute(const bContext *C, SpaceButs *sbuts)
{
ButsContextPath *path;
PointerRNA *ptr;
- int a, pflag= 0, flag= 0;
+ int a, pflag = 0, flag = 0;
buttons_texture_context_compute(C, sbuts);
if (!sbuts->path)
- sbuts->path= MEM_callocN(sizeof(ButsContextPath), "ButsContextPath");
+ sbuts->path = MEM_callocN(sizeof(ButsContextPath), "ButsContextPath");
- path= sbuts->path;
+ path = sbuts->path;
/* for each context, see if we can compute a valid path to it, if
* this is the case, we know we have to display the button */
- for (a=0; a<BCONTEXT_TOT; a++) {
+ for (a = 0; a < BCONTEXT_TOT; a++) {
if (buttons_context_path(C, path, a, pflag)) {
- flag |= (1<<a);
+ flag |= (1 << a);
/* setting icon for data context */
if (a == BCONTEXT_DATA) {
- ptr= &path->ptr[path->len-1];
+ ptr = &path->ptr[path->len - 1];
if (ptr->type)
- sbuts->dataicon= RNA_struct_ui_icon(ptr->type);
+ sbuts->dataicon = RNA_struct_ui_icon(ptr->type);
else
- sbuts->dataicon= ICON_EMPTY_DATA;
+ sbuts->dataicon = ICON_EMPTY_DATA;
}
}
}
@@ -639,21 +639,21 @@ void buttons_context_compute(const bContext *C, SpaceButs *sbuts)
/* always try to use the tab that was explicitly
* set to the user, so that once that context comes
* back, the tab is activated again */
- sbuts->mainb= sbuts->mainbuser;
+ sbuts->mainb = sbuts->mainbuser;
/* in case something becomes invalid, change */
if ((flag & (1 << sbuts->mainb)) == 0) {
if (sbuts->flag & SB_SHADING_CONTEXT) {
/* try to keep showing shading related buttons */
- sbuts->mainb= buttons_shading_new_context(C, flag);
+ sbuts->mainb = buttons_shading_new_context(C, flag);
}
else if (flag & BCONTEXT_OBJECT) {
- sbuts->mainb= BCONTEXT_OBJECT;
+ sbuts->mainb = BCONTEXT_OBJECT;
}
else {
- for (a=0; a<BCONTEXT_TOT; a++) {
+ for (a = 0; a < BCONTEXT_TOT; a++) {
if (flag & (1 << a)) {
- sbuts->mainb= a;
+ sbuts->mainb = a;
break;
}
}
@@ -664,9 +664,9 @@ void buttons_context_compute(const bContext *C, SpaceButs *sbuts)
if (!(flag & (1 << sbuts->mainb))) {
if (flag & (1 << BCONTEXT_OBJECT))
- sbuts->mainb= BCONTEXT_OBJECT;
+ sbuts->mainb = BCONTEXT_OBJECT;
else
- sbuts->mainb= BCONTEXT_SCENE;
+ sbuts->mainb = BCONTEXT_SCENE;
}
if (buttons_shading_context(C, sbuts->mainb))
@@ -674,7 +674,7 @@ void buttons_context_compute(const bContext *C, SpaceButs *sbuts)
else
sbuts->flag &= ~SB_SHADING_CONTEXT;
- sbuts->pathflag= flag;
+ sbuts->pathflag = flag;
}
/************************* Context Callback ************************/
@@ -684,12 +684,13 @@ const char *buttons_context_dir[] = {
"meta_ball", "lamp", "speaker", "camera", "material", "material_slot",
"texture", "texture_slot", "texture_user", "bone", "edit_bone",
"pose_bone", "particle_system", "particle_system_editable",
- "cloth", "soft_body", "fluid", "smoke", "collision", "brush", "dynamic_paint", NULL};
+ "cloth", "soft_body", "fluid", "smoke", "collision", "brush", "dynamic_paint", NULL
+};
int buttons_context(const bContext *C, const char *member, bContextDataResult *result)
{
- SpaceButs *sbuts= CTX_wm_space_buts(C);
- ButsContextPath *path= sbuts?sbuts->path:NULL;
+ SpaceButs *sbuts = CTX_wm_space_buts(C);
+ ButsContextPath *path = sbuts ? sbuts->path : NULL;
if (!path)
return 0;
@@ -744,7 +745,7 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
return 1;
}
else if (CTX_data_equals(member, "texture")) {
- ButsContextTexture *ct= sbuts->texuser;
+ ButsContextTexture *ct = sbuts->texuser;
if (ct) {
/* new shading system */
@@ -758,15 +759,15 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
return 1;
}
else if (CTX_data_equals(member, "material_slot")) {
- PointerRNA *ptr= get_pointer_type(path, &RNA_Object);
+ PointerRNA *ptr = get_pointer_type(path, &RNA_Object);
if (ptr) {
- Object *ob= ptr->data;
+ Object *ob = ptr->data;
if (ob && OB_TYPE_SUPPORT_MATERIAL(ob->type) && ob->totcol) {
/* a valid actcol isn't ensured [#27526] */
- int matnr= ob->actcol-1;
- if (matnr < 0) matnr= 0;
+ int matnr = ob->actcol - 1;
+ if (matnr < 0) matnr = 0;
CTX_data_pointer_set(result, &ob->id, &RNA_MaterialSlot, &ob->mat[matnr]);
}
}
@@ -774,20 +775,20 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
return 1;
}
else if (CTX_data_equals(member, "texture_user")) {
- ButsContextTexture *ct= sbuts->texuser;
+ ButsContextTexture *ct = sbuts->texuser;
if (!ct)
- return -1; /* old shading system (found but not available) */
+ return -1; /* old shading system (found but not available) */
if (ct->user && ct->user->ptr.data) {
- ButsTextureUser *user= ct->user;
+ ButsTextureUser *user = ct->user;
CTX_data_pointer_set(result, user->ptr.id.data, user->ptr.type, user->ptr.data);
}
return 1;
}
else if (CTX_data_equals(member, "texture_node")) {
- ButsContextTexture *ct= sbuts->texuser;
+ ButsContextTexture *ct = sbuts->texuser;
if (ct) {
/* new shading system */
@@ -800,11 +801,11 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
/* old shading system */
PointerRNA *ptr;
- if ((ptr=get_pointer_type(path, &RNA_Material))) {
- Material *ma= ptr->data;
+ if ((ptr = get_pointer_type(path, &RNA_Material))) {
+ Material *ma = ptr->data;
if (ma) {
- bNode *node= give_current_material_texture_node(ma);
+ bNode *node = give_current_material_texture_node(ma);
CTX_data_pointer_set(result, &ma->nodetree->id, &RNA_Node, node);
}
}
@@ -813,14 +814,14 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
}
}
else if (CTX_data_equals(member, "texture_slot")) {
- ButsContextTexture *ct= sbuts->texuser;
+ ButsContextTexture *ct = sbuts->texuser;
PointerRNA *ptr;
if (ct)
- return 0; /* new shading system */
+ return 0; /* new shading system */
- if ((ptr=get_pointer_type(path, &RNA_Material))) {
- Material *ma= ptr->data;
+ if ((ptr = get_pointer_type(path, &RNA_Material))) {
+ Material *ma = ptr->data;
/* if we have a node material, get slot from material in material node */
if (ma && ma->use_nodes && ma->nodetree) {
@@ -829,7 +830,7 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
if (give_current_material_texture_node(ma))
return 0;
- ma= give_node_material(ma);
+ ma = give_node_material(ma);
if (ma)
CTX_data_pointer_set(result, &ma->id, &RNA_MaterialTextureSlot, ma->mtex[(int)ma->texact]);
else
@@ -839,26 +840,26 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
CTX_data_pointer_set(result, &ma->id, &RNA_MaterialTextureSlot, ma->mtex[(int)ma->texact]);
}
}
- else if ((ptr=get_pointer_type(path, &RNA_Lamp))) {
- Lamp *la= ptr->data;
+ else if ((ptr = get_pointer_type(path, &RNA_Lamp))) {
+ Lamp *la = ptr->data;
if (la)
CTX_data_pointer_set(result, &la->id, &RNA_LampTextureSlot, la->mtex[(int)la->texact]);
}
- else if ((ptr=get_pointer_type(path, &RNA_World))) {
- World *wo= ptr->data;
+ else if ((ptr = get_pointer_type(path, &RNA_World))) {
+ World *wo = ptr->data;
if (wo)
CTX_data_pointer_set(result, &wo->id, &RNA_WorldTextureSlot, wo->mtex[(int)wo->texact]);
}
- else if ((ptr=get_pointer_type(path, &RNA_Brush))) { /* how to get this into context? */
- Brush *br= ptr->data;
+ else if ((ptr = get_pointer_type(path, &RNA_Brush))) { /* how to get this into context? */
+ Brush *br = ptr->data;
if (br)
CTX_data_pointer_set(result, &br->id, &RNA_BrushTextureSlot, &br->mtex);
}
- else if ((ptr=get_pointer_type(path, &RNA_ParticleSystem))) {
- ParticleSettings *part= ((ParticleSystem *)ptr->data)->part;
+ else if ((ptr = get_pointer_type(path, &RNA_ParticleSystem))) {
+ ParticleSettings *part = ((ParticleSystem *)ptr->data)->part;
if (part)
CTX_data_pointer_set(result, &part->id, &RNA_ParticleSettingsTextureSlot, part->mtex[(int)part->texact]);
@@ -883,59 +884,59 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
return 1;
}
else if (CTX_data_equals(member, "particle_system_editable")) {
- if (PE_poll((bContext*)C))
+ if (PE_poll((bContext *)C))
set_pointer_type(path, result, &RNA_ParticleSystem);
else
CTX_data_pointer_set(result, NULL, &RNA_ParticleSystem, NULL);
return 1;
}
else if (CTX_data_equals(member, "cloth")) {
- PointerRNA *ptr= get_pointer_type(path, &RNA_Object);
+ PointerRNA *ptr = get_pointer_type(path, &RNA_Object);
if (ptr && ptr->data) {
- Object *ob= ptr->data;
- ModifierData *md= modifiers_findByType(ob, eModifierType_Cloth);
+ Object *ob = ptr->data;
+ ModifierData *md = modifiers_findByType(ob, eModifierType_Cloth);
CTX_data_pointer_set(result, &ob->id, &RNA_ClothModifier, md);
return 1;
}
}
else if (CTX_data_equals(member, "soft_body")) {
- PointerRNA *ptr= get_pointer_type(path, &RNA_Object);
+ PointerRNA *ptr = get_pointer_type(path, &RNA_Object);
if (ptr && ptr->data) {
- Object *ob= ptr->data;
- ModifierData *md= modifiers_findByType(ob, eModifierType_Softbody);
+ Object *ob = ptr->data;
+ ModifierData *md = modifiers_findByType(ob, eModifierType_Softbody);
CTX_data_pointer_set(result, &ob->id, &RNA_SoftBodyModifier, md);
return 1;
}
}
else if (CTX_data_equals(member, "fluid")) {
- PointerRNA *ptr= get_pointer_type(path, &RNA_Object);
+ PointerRNA *ptr = get_pointer_type(path, &RNA_Object);
if (ptr && ptr->data) {
- Object *ob= ptr->data;
- ModifierData *md= modifiers_findByType(ob, eModifierType_Fluidsim);
+ Object *ob = ptr->data;
+ ModifierData *md = modifiers_findByType(ob, eModifierType_Fluidsim);
CTX_data_pointer_set(result, &ob->id, &RNA_FluidSimulationModifier, md);
return 1;
}
}
else if (CTX_data_equals(member, "smoke")) {
- PointerRNA *ptr= get_pointer_type(path, &RNA_Object);
+ PointerRNA *ptr = get_pointer_type(path, &RNA_Object);
if (ptr && ptr->data) {
- Object *ob= ptr->data;
- ModifierData *md= modifiers_findByType(ob, eModifierType_Smoke);
+ Object *ob = ptr->data;
+ ModifierData *md = modifiers_findByType(ob, eModifierType_Smoke);
CTX_data_pointer_set(result, &ob->id, &RNA_SmokeModifier, md);
return 1;
}
}
else if (CTX_data_equals(member, "collision")) {
- PointerRNA *ptr= get_pointer_type(path, &RNA_Object);
+ PointerRNA *ptr = get_pointer_type(path, &RNA_Object);
if (ptr && ptr->data) {
- Object *ob= ptr->data;
- ModifierData *md= modifiers_findByType(ob, eModifierType_Collision);
+ Object *ob = ptr->data;
+ ModifierData *md = modifiers_findByType(ob, eModifierType_Collision);
CTX_data_pointer_set(result, &ob->id, &RNA_CollisionModifier, md);
return 1;
}
@@ -945,11 +946,11 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
return 1;
}
else if (CTX_data_equals(member, "dynamic_paint")) {
- PointerRNA *ptr= get_pointer_type(path, &RNA_Object);
+ PointerRNA *ptr = get_pointer_type(path, &RNA_Object);
if (ptr && ptr->data) {
- Object *ob= ptr->data;
- ModifierData *md= modifiers_findByType(ob, eModifierType_DynamicPaint);
+ Object *ob = ptr->data;
+ ModifierData *md = modifiers_findByType(ob, eModifierType_DynamicPaint);
CTX_data_pointer_set(result, &ob->id, &RNA_DynamicPaintModifier, md);
return 1;
}
@@ -965,21 +966,21 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
static void pin_cb(bContext *C, void *UNUSED(arg1), void *UNUSED(arg2))
{
- SpaceButs *sbuts= CTX_wm_space_buts(C);
+ SpaceButs *sbuts = CTX_wm_space_buts(C);
if (sbuts->flag & SB_PIN_CONTEXT) {
- sbuts->pinid= buttons_context_id_path(C);
+ sbuts->pinid = buttons_context_id_path(C);
}
else
- sbuts->pinid= NULL;
+ sbuts->pinid = NULL;
ED_area_tag_redraw(CTX_wm_area(C));
}
void buttons_context_draw(const bContext *C, uiLayout *layout)
{
- SpaceButs *sbuts= CTX_wm_space_buts(C);
- ButsContextPath *path= sbuts->path;
+ SpaceButs *sbuts = CTX_wm_space_buts(C);
+ ButsContextPath *path = sbuts->path;
uiLayout *row;
uiBlock *block;
uiBut *but;
@@ -990,28 +991,28 @@ void buttons_context_draw(const bContext *C, uiLayout *layout)
if (!path)
return;
- row= uiLayoutRow(layout, 1);
+ row = uiLayoutRow(layout, 1);
uiLayoutSetAlignment(row, UI_LAYOUT_ALIGN_LEFT);
- block= uiLayoutGetBlock(row);
+ block = uiLayoutGetBlock(row);
uiBlockSetEmboss(block, UI_EMBOSSN);
but = uiDefIconButBitC(block, ICONTOG, SB_PIN_CONTEXT, 0, ICON_UNPINNED, 0, 0, UI_UNIT_X, UI_UNIT_Y, &sbuts->flag, 0, 0, 0, 0, "Follow context or keep fixed datablock displayed");
uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */
uiButSetFunc(but, pin_cb, NULL, NULL);
- for (a=0; a<path->len; a++) {
- ptr= &path->ptr[a];
+ for (a = 0; a < path->len; a++) {
+ ptr = &path->ptr[a];
if (a != 0)
uiItemL(row, "", VICO_SMALL_TRI_RIGHT_VEC);
if (ptr->data) {
- icon= RNA_struct_ui_icon(ptr->type);
- name= RNA_struct_name_get_alloc(ptr, namebuf, sizeof(namebuf), NULL);
+ icon = RNA_struct_ui_icon(ptr->type);
+ name = RNA_struct_name_get_alloc(ptr, namebuf, sizeof(namebuf), NULL);
if (name) {
if (!ELEM(sbuts->mainb, BCONTEXT_RENDER, BCONTEXT_SCENE) && ptr->type == &RNA_Scene)
- uiItemLDrag(row, ptr, "", icon); /* save some space */
+ uiItemLDrag(row, ptr, "", icon); /* save some space */
else
uiItemLDrag(row, ptr, name, icon);
@@ -1033,24 +1034,24 @@ void buttons_context_register(ARegionType *art)
{
PanelType *pt;
- pt= MEM_callocN(sizeof(PanelType), "spacetype buttons panel context");
+ pt = MEM_callocN(sizeof(PanelType), "spacetype buttons panel context");
strcpy(pt->idname, "BUTTONS_PT_context");
strcpy(pt->label, "Context");
- pt->draw= buttons_panel_context;
- pt->flag= PNL_NO_HEADER;
+ pt->draw = buttons_panel_context;
+ pt->flag = PNL_NO_HEADER;
BLI_addtail(&art->paneltypes, pt);
}
ID *buttons_context_id_path(const bContext *C)
{
- SpaceButs *sbuts= CTX_wm_space_buts(C);
- ButsContextPath *path= sbuts->path;
+ SpaceButs *sbuts = CTX_wm_space_buts(C);
+ ButsContextPath *path = sbuts->path;
PointerRNA *ptr;
int a;
if (path->len) {
- for (a=path->len-1; a>=0; a--) {
- ptr= &path->ptr[a];
+ for (a = path->len - 1; a >= 0; a--) {
+ ptr = &path->ptr[a];
/* pin particle settings instead of system, since only settings are an idblock*/
if (sbuts->mainb == BCONTEXT_PARTICLE && sbuts->flag & SB_PIN_CONTEXT) {
diff --git a/source/blender/editors/space_buttons/buttons_header.c b/source/blender/editors/space_buttons/buttons_header.c
index fcc5b488ca9..661f7ad7d0f 100644
--- a/source/blender/editors/space_buttons/buttons_header.c
+++ b/source/blender/editors/space_buttons/buttons_header.c
@@ -51,19 +51,19 @@
#include "buttons_intern.h"
-#define B_CONTEXT_SWITCH 101
-#define B_BUTSPREVIEW 102
+#define B_CONTEXT_SWITCH 101
+#define B_BUTSPREVIEW 102
static void set_texture_context(bContext *C, SpaceButs *sbuts)
{
- switch(sbuts->mainb) {
+ switch (sbuts->mainb) {
case BCONTEXT_MATERIAL:
sbuts->texture_context = SB_TEXC_MAT_OR_LAMP;
break;
case BCONTEXT_DATA:
{
Object *ob = CTX_data_active_object(C);
- if (ob && ob->type==OB_LAMP)
+ if (ob && ob->type == OB_LAMP)
sbuts->texture_context = SB_TEXC_MAT_OR_LAMP;
break;
}
@@ -78,40 +78,40 @@ static void set_texture_context(bContext *C, SpaceButs *sbuts)
static void do_buttons_buttons(bContext *C, void *UNUSED(arg), int event)
{
- SpaceButs *sbuts= CTX_wm_space_buts(C);
+ SpaceButs *sbuts = CTX_wm_space_buts(C);
if (!sbuts) /* editor type switch */
return;
- switch(event) {
+ switch (event) {
case B_CONTEXT_SWITCH:
case B_BUTSPREVIEW:
ED_area_tag_redraw(CTX_wm_area(C));
set_texture_context(C, sbuts);
- sbuts->preview= 1;
+ sbuts->preview = 1;
break;
}
- sbuts->mainbuser= sbuts->mainb;
+ sbuts->mainbuser = sbuts->mainb;
}
-#define BUT_UNIT_X (UI_UNIT_X+2)
+#define BUT_UNIT_X (UI_UNIT_X + 2)
void buttons_header_buttons(const bContext *C, ARegion *ar)
{
- SpaceButs *sbuts= CTX_wm_space_buts(C);
+ SpaceButs *sbuts = CTX_wm_space_buts(C);
uiBlock *block;
uiBut *but;
- int xco, yco= 2;
+ int xco, yco = 2;
buttons_context_compute(C, sbuts);
- block= uiBeginBlock(C, ar, __func__, UI_EMBOSS);
+ block = uiBeginBlock(C, ar, __func__, UI_EMBOSS);
uiBlockSetHandleFunc(block, do_buttons_buttons, NULL);
- xco= ED_area_header_switchbutton(C, block, yco);
+ xco = ED_area_header_switchbutton(C, block, yco);
uiBlockSetEmboss(block, UI_EMBOSS);
@@ -122,8 +122,8 @@ void buttons_header_buttons(const bContext *C, ARegion *ar)
uiBlockBeginAlign(block);
#define BUTTON_HEADER_CTX(_ctx, _icon, _tip) \
- if (sbuts->pathflag & (1<<_ctx)) { \
- but = uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, _icon, xco+=BUT_UNIT_X, yco, BUT_UNIT_X, UI_UNIT_Y, &(sbuts->mainb), 0.0, (float)_ctx, 0, 0, TIP_(_tip)); \
+ if (sbuts->pathflag & (1 << _ctx)) { \
+ but = uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, _icon, xco += BUT_UNIT_X, yco, BUT_UNIT_X, UI_UNIT_Y, &(sbuts->mainb), 0.0, (float)_ctx, 0, 0, TIP_(_tip)); \
uiButClearFlag(but, UI_BUT_UNDO); \
} \
@@ -143,12 +143,12 @@ void buttons_header_buttons(const bContext *C, ARegion *ar)
#undef BUTTON_HEADER_CTX
- xco+= BUT_UNIT_X;
+ xco += BUT_UNIT_X;
uiBlockEndAlign(block);
/* always as last */
- UI_view2d_totRect_set(&ar->v2d, xco+(UI_UNIT_X/2), ar->v2d.tot.ymax-ar->v2d.tot.ymin);
+ UI_view2d_totRect_set(&ar->v2d, xco + (UI_UNIT_X / 2), ar->v2d.tot.ymax - ar->v2d.tot.ymin);
uiEndBlock(C, block);
uiDrawBlock(C, block);
diff --git a/source/blender/editors/space_buttons/buttons_intern.h b/source/blender/editors/space_buttons/buttons_intern.h
index 8d0f84cf70f..5700d361e15 100644
--- a/source/blender/editors/space_buttons/buttons_intern.h
+++ b/source/blender/editors/space_buttons/buttons_intern.h
@@ -47,17 +47,17 @@ struct uiLayout;
struct wmOperatorType;
/* buts->scaflag */
-#define BUTS_SENS_SEL 1
-#define BUTS_SENS_ACT 2
-#define BUTS_SENS_LINK 4
-#define BUTS_CONT_SEL 8
-#define BUTS_CONT_ACT 16
-#define BUTS_CONT_LINK 32
-#define BUTS_ACT_SEL 64
-#define BUTS_ACT_ACT 128
-#define BUTS_ACT_LINK 256
-#define BUTS_SENS_STATE 512
-#define BUTS_ACT_STATE 1024
+#define BUTS_SENS_SEL 1
+#define BUTS_SENS_ACT 2
+#define BUTS_SENS_LINK 4
+#define BUTS_CONT_SEL 8
+#define BUTS_CONT_ACT 16
+#define BUTS_CONT_LINK 32
+#define BUTS_ACT_SEL 64
+#define BUTS_ACT_ACT 128
+#define BUTS_ACT_LINK 256
+#define BUTS_SENS_STATE 512
+#define BUTS_ACT_STATE 1024
/* context data */
diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c
index ec1c74013e0..c29a8c3934e 100644
--- a/source/blender/editors/space_buttons/buttons_ops.c
+++ b/source/blender/editors/space_buttons/buttons_ops.c
@@ -56,22 +56,22 @@
#include "UI_interface.h"
#include "UI_resources.h"
-#include "buttons_intern.h" // own include
+#include "buttons_intern.h" /* own include */
/********************** toolbox operator *********************/
static int toolbox_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(event))
{
- bScreen *sc= CTX_wm_screen(C);
- SpaceButs *sbuts= CTX_wm_space_buts(C);
+ bScreen *sc = CTX_wm_screen(C);
+ SpaceButs *sbuts = CTX_wm_space_buts(C);
PointerRNA ptr;
uiPopupMenu *pup;
uiLayout *layout;
RNA_pointer_create(&sc->id, &RNA_SpaceProperties, sbuts, &ptr);
- pup= uiPupMenuBegin(C, "Align", ICON_NONE);
- layout= uiPupMenuLayout(pup);
+ pup = uiPupMenuBegin(C, "Align", ICON_NONE);
+ layout = uiPupMenuLayout(pup);
uiItemsEnumR(layout, &ptr, "align");
uiPupMenuEnd(C, pup);
@@ -99,15 +99,15 @@ typedef struct FileBrowseOp {
static int file_browse_exec(bContext *C, wmOperator *op)
{
- FileBrowseOp *fbo= op->customdata;
+ FileBrowseOp *fbo = op->customdata;
ID *id;
char *str, path[FILE_MAX];
- const char *path_prop= RNA_struct_find_property(op->ptr, "directory") ? "directory" : "filepath";
+ const char *path_prop = RNA_struct_find_property(op->ptr, "directory") ? "directory" : "filepath";
- if (RNA_struct_property_is_set(op->ptr, path_prop)==0 || fbo==NULL)
+ if (RNA_struct_property_is_set(op->ptr, path_prop) == 0 || fbo == NULL)
return OPERATOR_CANCELLED;
- str= RNA_string_get_alloc(op->ptr, path_prop, NULL, 0);
+ str = RNA_string_get_alloc(op->ptr, path_prop, NULL, 0);
/* add slash for directories, important for some properties */
if (RNA_property_subtype(fbo->prop) == PROP_DIRPATH) {
@@ -119,7 +119,7 @@ static int file_browse_exec(bContext *C, wmOperator *op)
BLI_path_abs(path, id ? ID_BLEND_PATH(G.main, id) : G.main->name);
if (BLI_is_dir(path)) {
- str = MEM_reallocN(str, strlen(str)+2);
+ str = MEM_reallocN(str, strlen(str) + 2);
BLI_add_slash(str);
}
else
@@ -133,7 +133,7 @@ static int file_browse_exec(bContext *C, wmOperator *op)
/* special, annoying exception, filesel on redo panel [#26618] */
{
- wmOperator *redo_op= WM_operator_last_redo(C);
+ wmOperator *redo_op = WM_operator_last_redo(C);
if (redo_op) {
if (fbo->ptr.data == redo_op->ptr->data) {
ED_undo_operator_repeat(C, redo_op);
@@ -149,7 +149,7 @@ static int file_browse_exec(bContext *C, wmOperator *op)
static int file_browse_cancel(bContext *UNUSED(C), wmOperator *op)
{
MEM_freeN(op->customdata);
- op->customdata= NULL;
+ op->customdata = NULL;
return OPERATOR_CANCELLED;
}
@@ -171,7 +171,7 @@ static int file_browse_invoke(bContext *C, wmOperator *op, wmEvent *event)
if (!prop)
return OPERATOR_CANCELLED;
- str= RNA_property_string_get_alloc(&ptr, prop, NULL, 0, NULL);
+ str = RNA_property_string_get_alloc(&ptr, prop, NULL, 0, NULL);
/* useful yet irritating feature, Shift+Click to open the file
* Alt+Click to browse a folder in the OS's browser */
@@ -179,9 +179,9 @@ static int file_browse_invoke(bContext *C, wmOperator *op, wmEvent *event)
PointerRNA props_ptr;
if (event->alt) {
- char *lslash= BLI_last_slash(str);
+ char *lslash = BLI_last_slash(str);
if (lslash)
- *lslash= '\0';
+ *lslash = '\0';
}
@@ -194,11 +194,11 @@ static int file_browse_invoke(bContext *C, wmOperator *op, wmEvent *event)
return OPERATOR_CANCELLED;
}
else {
- const char *path_prop= RNA_struct_find_property(op->ptr, "directory") ? "directory" : "filepath";
- fbo= MEM_callocN(sizeof(FileBrowseOp), "FileBrowseOp");
- fbo->ptr= ptr;
- fbo->prop= prop;
- op->customdata= fbo;
+ const char *path_prop = RNA_struct_find_property(op->ptr, "directory") ? "directory" : "filepath";
+ fbo = MEM_callocN(sizeof(FileBrowseOp), "FileBrowseOp");
+ fbo->ptr = ptr;
+ fbo->prop = prop;
+ op->customdata = fbo;
RNA_string_set(op->ptr, path_prop, str);
MEM_freeN(str);
@@ -230,7 +230,7 @@ void BUTTONS_OT_file_browse(wmOperatorType *ot)
ot->cancel = file_browse_cancel;
/* properties */
- WM_operator_properties_filesel(ot, 0, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH|WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
+ WM_operator_properties_filesel(ot, 0, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
}
/* second operator, only difference from BUTTONS_OT_file_browse is WM_FILESEL_DIRECTORY */
@@ -247,5 +247,5 @@ void BUTTONS_OT_directory_browse(wmOperatorType *ot)
ot->cancel = file_browse_cancel;
/* properties */
- WM_operator_properties_filesel(ot, 0, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_DIRECTORY|WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
+ WM_operator_properties_filesel(ot, 0, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_DIRECTORY | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
}
diff --git a/source/blender/editors/space_buttons/buttons_texture.c b/source/blender/editors/space_buttons/buttons_texture.c
index ba37cb8a892..5c5c24f7bc1 100644
--- a/source/blender/editors/space_buttons/buttons_texture.c
+++ b/source/blender/editors/space_buttons/buttons_texture.c
@@ -68,17 +68,17 @@
#include "../interface/interface_intern.h"
-#include "buttons_intern.h" // own include
+#include "buttons_intern.h" // own include
/************************* Texture User **************************/
static void buttons_texture_user_property_add(ListBase *users, ID *id,
- PointerRNA ptr, PropertyRNA *prop,
- const char *category, int icon, const char *name)
+ PointerRNA ptr, PropertyRNA *prop,
+ const char *category, int icon, const char *name)
{
ButsTextureUser *user = MEM_callocN(sizeof(ButsTextureUser), "ButsTextureUser");
- user->id= id;
+ user->id = id;
user->ptr = ptr;
user->prop = prop;
user->category = category;
@@ -90,12 +90,12 @@ static void buttons_texture_user_property_add(ListBase *users, ID *id,
}
static void buttons_texture_user_node_add(ListBase *users, ID *id,
- bNodeTree *ntree, bNode *node,
- const char *category, int icon, const char *name)
+ bNodeTree *ntree, bNode *node,
+ const char *category, int icon, const char *name)
{
ButsTextureUser *user = MEM_callocN(sizeof(ButsTextureUser), "ButsTextureUser");
- user->id= id;
+ user->id = id;
user->ntree = ntree;
user->node = node;
user->category = category;
@@ -107,12 +107,12 @@ static void buttons_texture_user_node_add(ListBase *users, ID *id,
}
static void buttons_texture_users_find_nodetree(ListBase *users, ID *id,
- bNodeTree *ntree, const char *category)
+ bNodeTree *ntree, const char *category)
{
bNode *node;
if (ntree) {
- for (node=ntree->nodes.first; node; node=node->next) {
+ for (node = ntree->nodes.first; node; node = node->next) {
if (node->typeinfo->nclass == NODE_CLASS_TEXTURE) {
PointerRNA ptr;
/* PropertyRNA *prop; */ /* UNUSED */
@@ -121,10 +121,10 @@ static void buttons_texture_users_find_nodetree(ListBase *users, ID *id,
/* prop = RNA_struct_find_property(&ptr, "texture"); */ /* UNUSED */
buttons_texture_user_node_add(users, id, ntree, node,
- category, RNA_struct_ui_icon(ptr.type), node->name);
+ category, RNA_struct_ui_icon(ptr.type), node->name);
}
else if (node->type == NODE_GROUP && node->id) {
- buttons_texture_users_find_nodetree(users, id, (bNodeTree*)node->id, category);
+ buttons_texture_users_find_nodetree(users, id, (bNodeTree *)node->id, category);
}
}
}
@@ -140,48 +140,48 @@ static void buttons_texture_modifier_foreach(void *userData, Object *ob, Modifie
prop = RNA_struct_find_property(&ptr, propname);
buttons_texture_user_property_add(users, &ob->id, ptr, prop,
- "Modifiers", RNA_struct_ui_icon(ptr.type), md->name);
+ "Modifiers", RNA_struct_ui_icon(ptr.type), md->name);
}
static void buttons_texture_users_from_context(ListBase *users, const bContext *C, SpaceButs *sbuts)
{
- Scene *scene= NULL;
- Object *ob= NULL;
- Material *ma= NULL;
- Lamp *la= NULL;
- World *wrld= NULL;
- Brush *brush= NULL;
+ Scene *scene = NULL;
+ Object *ob = NULL;
+ Material *ma = NULL;
+ Lamp *la = NULL;
+ World *wrld = NULL;
+ Brush *brush = NULL;
ID *pinid = sbuts->pinid;
/* get data from context */
if (pinid) {
if (GS(pinid->name) == ID_SCE)
- scene= (Scene*)pinid;
+ scene = (Scene *)pinid;
else if (GS(pinid->name) == ID_OB)
- ob= (Object*)pinid;
+ ob = (Object *)pinid;
else if (GS(pinid->name) == ID_LA)
- la= (Lamp*)pinid;
+ la = (Lamp *)pinid;
else if (GS(pinid->name) == ID_WO)
- wrld= (World*)pinid;
+ wrld = (World *)pinid;
else if (GS(pinid->name) == ID_MA)
- ma= (Material*)pinid;
+ ma = (Material *)pinid;
else if (GS(pinid->name) == ID_BR)
- brush= (Brush*)pinid;
+ brush = (Brush *)pinid;
}
if (!scene)
- scene= CTX_data_scene(C);
+ scene = CTX_data_scene(C);
if (!(pinid || pinid == &scene->id)) {
- ob= (scene->basact)? scene->basact->object: NULL;
- wrld= scene->world;
- brush= paint_brush(paint_get_active(scene));
+ ob = (scene->basact) ? scene->basact->object : NULL;
+ wrld = scene->world;
+ brush = paint_brush(paint_get_active(scene));
}
if (ob && ob->type == OB_LAMP && !la)
- la= ob->data;
+ la = ob->data;
if (ob && !ma)
- ma= give_current_material(ob, ob->actcol);
+ ma = give_current_material(ob, ob->actcol);
/* fill users */
users->first = users->last = NULL;
@@ -194,7 +194,7 @@ static void buttons_texture_users_from_context(ListBase *users, const bContext *
buttons_texture_users_find_nodetree(users, &wrld->id, wrld->nodetree, "World");
if (ob) {
- ParticleSystem *psys= psys_get_current(ob);
+ ParticleSystem *psys = psys_get_current(ob);
MTex *mtex;
int a;
@@ -204,7 +204,7 @@ static void buttons_texture_users_from_context(ListBase *users, const bContext *
/* particle systems */
if (psys) {
/* todo: these slots are not in the UI */
- for (a=0; a<MAX_MTEX; a++) {
+ for (a = 0; a < MAX_MTEX; a++) {
mtex = psys->part->mtex[a];
if (mtex) {
@@ -215,7 +215,7 @@ static void buttons_texture_users_from_context(ListBase *users, const bContext *
prop = RNA_struct_find_property(&ptr, "texture");
buttons_texture_user_property_add(users, &psys->part->id, ptr, prop,
- "Particles", RNA_struct_ui_icon(&RNA_ParticleSettings), psys->name);
+ "Particles", RNA_struct_ui_icon(&RNA_ParticleSettings), psys->name);
}
}
}
@@ -229,7 +229,7 @@ static void buttons_texture_users_from_context(ListBase *users, const bContext *
prop = RNA_struct_find_property(&ptr, "texture");
buttons_texture_user_property_add(users, &ob->id, ptr, prop,
- "Fields", ICON_FORCE_TEXTURE, "Texture Field");
+ "Fields", ICON_FORCE_TEXTURE, "Texture Field");
}
}
@@ -239,10 +239,10 @@ static void buttons_texture_users_from_context(ListBase *users, const bContext *
PropertyRNA *prop;
RNA_pointer_create(&brush->id, &RNA_BrushTextureSlot, &brush->mtex, &ptr);
- prop= RNA_struct_find_property(&ptr, "texture");
+ prop = RNA_struct_find_property(&ptr, "texture");
buttons_texture_user_property_add(users, &brush->id, ptr, prop,
- "Brush", ICON_BRUSH_DATA, brush->id.name+2);
+ "Brush", ICON_BRUSH_DATA, brush->id.name + 2);
}
}
@@ -250,22 +250,22 @@ void buttons_texture_context_compute(const bContext *C, SpaceButs *sbuts)
{
/* gatheravailable texture users in context. runs on every draw of
* properties editor, before the buttons are created. */
- ButsContextTexture *ct= sbuts->texuser;
- Scene *scene= CTX_data_scene(C);
+ ButsContextTexture *ct = sbuts->texuser;
+ Scene *scene = CTX_data_scene(C);
- if (!scene_use_new_shading_nodes(scene)) {
+ if (!BKE_scene_use_new_shading_nodes(scene)) {
if (ct) {
BLI_freelistN(&ct->users);
MEM_freeN(ct);
- sbuts->texuser= NULL;
+ sbuts->texuser = NULL;
}
return;
}
if (!ct) {
- ct= MEM_callocN(sizeof(ButsContextTexture), "ButsContextTexture");
- sbuts->texuser= ct;
+ ct = MEM_callocN(sizeof(ButsContextTexture), "ButsContextTexture");
+ sbuts->texuser = ct;
}
else {
BLI_freelistN(&ct->users);
@@ -275,7 +275,7 @@ void buttons_texture_context_compute(const bContext *C, SpaceButs *sbuts)
/* set one user as active based on active index */
if (ct->index >= BLI_countlist(&ct->users))
- ct->index= 0;
+ ct->index = 0;
ct->user = BLI_findlink(&ct->users, ct->index);
ct->texture = NULL;
@@ -287,7 +287,7 @@ void buttons_texture_context_compute(const bContext *C, SpaceButs *sbuts)
/* get texture datablock pointer if it's a property */
texptr = RNA_property_pointer_get(&ct->user->ptr, ct->user->prop);
- tex = (RNA_struct_is_a(texptr.type, &RNA_Texture))? texptr.data: NULL;
+ tex = (RNA_struct_is_a(texptr.type, &RNA_Texture)) ? texptr.data : NULL;
ct->texture = tex;
}
@@ -296,7 +296,7 @@ void buttons_texture_context_compute(const bContext *C, SpaceButs *sbuts)
/* detect change of active texture node in same node tree, in that
* case we also automatically switch to the other node */
- for (user=ct->users.first; user; user=user->next) {
+ for (user = ct->users.first; user; user = user->next) {
if (user->ntree == ct->user->ntree && user->node != ct->user->node) {
if (user->node->flag & NODE_ACTIVE_TEXTURE) {
ct->user = user;
@@ -313,8 +313,8 @@ static void template_texture_select(bContext *C, void *user_p, void *UNUSED(arg)
{
/* callback when selecting a texture user in the menu */
SpaceButs *sbuts = CTX_wm_space_buts(C);
- ButsContextTexture *ct= (sbuts)? sbuts->texuser: NULL;
- ButsTextureUser *user = (ButsTextureUser*)user_p;
+ ButsContextTexture *ct = (sbuts) ? sbuts->texuser : NULL;
+ ButsTextureUser *user = (ButsTextureUser *)user_p;
PointerRNA texptr;
Tex *tex;
@@ -328,7 +328,7 @@ static void template_texture_select(bContext *C, void *user_p, void *UNUSED(arg)
}
else {
texptr = RNA_property_pointer_get(&user->ptr, user->prop);
- tex = (RNA_struct_is_a(texptr.type, &RNA_Texture))? texptr.data: NULL;
+ tex = (RNA_struct_is_a(texptr.type, &RNA_Texture)) ? texptr.data : NULL;
ct->texture = tex;
}
@@ -341,27 +341,27 @@ static void template_texture_user_menu(bContext *C, uiLayout *layout, void *UNUS
{
/* callback when opening texture user selection menu, to create buttons. */
SpaceButs *sbuts = CTX_wm_space_buts(C);
- ButsContextTexture *ct= (sbuts)? sbuts->texuser: NULL;
+ ButsContextTexture *ct = (sbuts) ? sbuts->texuser : NULL;
ButsTextureUser *user;
uiBlock *block = uiLayoutGetBlock(layout);
const char *last_category = NULL;
- for (user=ct->users.first; user; user=user->next) {
+ for (user = ct->users.first; user; user = user->next) {
uiBut *but;
char name[UI_MAX_NAME_STR];
/* add label per category */
if (!last_category || strcmp(last_category, user->category) != 0) {
uiItemL(layout, user->category, ICON_NONE);
- but= block->buttons.last;
- but->flag= UI_TEXT_LEFT;
+ but = block->buttons.last;
+ but->flag = UI_TEXT_LEFT;
}
/* create button */
BLI_snprintf(name, UI_MAX_NAME_STR, " %s", user->name);
- but = uiDefIconTextBut(block, BUT, 0, user->icon, name, 0, 0, UI_UNIT_X*4, UI_UNIT_Y,
- NULL, 0.0, 0.0, 0.0, 0.0, "");
+ but = uiDefIconTextBut(block, BUT, 0, user->icon, name, 0, 0, UI_UNIT_X * 4, UI_UNIT_Y,
+ NULL, 0.0, 0.0, 0.0, 0.0, "");
uiButSetNFunc(but, template_texture_select, MEM_dupallocN(user), NULL);
last_category = user->category;
@@ -374,7 +374,7 @@ void uiTemplateTextureUser(uiLayout *layout, bContext *C)
* gathered before drawing in ButsContextTexture, we merely need to
* display the current item. */
SpaceButs *sbuts = CTX_wm_space_buts(C);
- ButsContextTexture *ct= (sbuts)? sbuts->texuser: NULL;
+ ButsContextTexture *ct = (sbuts) ? sbuts->texuser : NULL;
uiBlock *block = uiLayoutGetBlock(layout);
uiBut *but;
ButsTextureUser *user;
@@ -384,7 +384,7 @@ void uiTemplateTextureUser(uiLayout *layout, bContext *C)
return;
/* get current user */
- user= ct->user;
+ user = ct->user;
if (!user) {
uiItemL(layout, "No textures in context.", ICON_NONE);
@@ -396,15 +396,15 @@ void uiTemplateTextureUser(uiLayout *layout, bContext *C)
if (user->icon) {
but = uiDefIconTextMenuBut(block, template_texture_user_menu, NULL,
- user->icon, name, 0, 0, UI_UNIT_X*4, UI_UNIT_Y, "");
+ user->icon, name, 0, 0, UI_UNIT_X * 4, UI_UNIT_Y, "");
}
else {
but = uiDefMenuBut(block, template_texture_user_menu, NULL,
- name, 0, 0, UI_UNIT_X*4, UI_UNIT_Y, "");
+ name, 0, 0, UI_UNIT_X * 4, UI_UNIT_Y, "");
}
/* some cosmetic tweaks */
- but->type= MENU;
+ but->type = MENU;
but->flag |= UI_TEXT_LEFT;
but->flag &= ~UI_ICON_SUBMENU;
}
@@ -414,13 +414,13 @@ void uiTemplateTextureUser(uiLayout *layout, bContext *C)
static void template_texture_show(bContext *C, void *data_p, void *prop_p)
{
SpaceButs *sbuts = CTX_wm_space_buts(C);
- ButsContextTexture *ct= (sbuts)? sbuts->texuser: NULL;
+ ButsContextTexture *ct = (sbuts) ? sbuts->texuser : NULL;
ButsTextureUser *user;
if (!ct)
return;
- for (user=ct->users.first; user; user=user->next)
+ for (user = ct->users.first; user; user = user->next)
if (user->ptr.data == data_p && user->prop == prop_p)
break;
@@ -429,9 +429,9 @@ static void template_texture_show(bContext *C, void *data_p, void *prop_p)
template_texture_select(C, user, NULL);
/* change context */
- sbuts->mainb= BCONTEXT_TEXTURE;
- sbuts->mainbuser= sbuts->mainb;
- sbuts->preview= 1;
+ sbuts->mainb = BCONTEXT_TEXTURE;
+ sbuts->mainbuser = sbuts->mainb;
+ sbuts->preview = 1;
/* redraw editor */
ED_area_tag_redraw(CTX_wm_area(C));
@@ -442,7 +442,7 @@ void uiTemplateTextureShow(uiLayout *layout, bContext *C, PointerRNA *ptr, Prope
{
/* button to quickly show texture in texture tab */
SpaceButs *sbuts = CTX_wm_space_buts(C);
- ButsContextTexture *ct= (sbuts)? sbuts->texuser: NULL;
+ ButsContextTexture *ct = (sbuts) ? sbuts->texuser : NULL;
ButsTextureUser *user;
/* only show button in other tabs in properties editor */
@@ -450,7 +450,7 @@ void uiTemplateTextureShow(uiLayout *layout, bContext *C, PointerRNA *ptr, Prope
return;
/* find corresponding texture user */
- for (user=ct->users.first; user; user=user->next)
+ for (user = ct->users.first; user; user = user->next)
if (user->ptr.data == ptr->data && user->prop == prop)
break;
@@ -460,7 +460,7 @@ void uiTemplateTextureShow(uiLayout *layout, bContext *C, PointerRNA *ptr, Prope
uiBut *but;
but = uiDefIconBut(block, BUT, 0, ICON_BUTS, 0, 0, UI_UNIT_X, UI_UNIT_Y,
- NULL, 0.0, 0.0, 0.0, 0.0, "Show texture in texture tab");
+ NULL, 0.0, 0.0, 0.0, 0.0, "Show texture in texture tab");
uiButSetFunc(but, template_texture_show, user->ptr.data, user->prop);
}
}
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c
index f1f4fb37b6e..e102abeecf0 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -55,7 +55,7 @@
#include "ED_render.h"
-#include "buttons_intern.h" // own include
+#include "buttons_intern.h" /* own include */
/* ******************** default callbacks for buttons space ***************** */
@@ -64,30 +64,30 @@ static SpaceLink *buttons_new(const bContext *UNUSED(C))
ARegion *ar;
SpaceButs *sbuts;
- sbuts= MEM_callocN(sizeof(SpaceButs), "initbuts");
- sbuts->spacetype= SPACE_BUTS;
- sbuts->align= BUT_VERTICAL;
+ sbuts = MEM_callocN(sizeof(SpaceButs), "initbuts");
+ sbuts->spacetype = SPACE_BUTS;
+ sbuts->align = BUT_VERTICAL;
/* header */
- ar= MEM_callocN(sizeof(ARegion), "header for buts");
+ ar = MEM_callocN(sizeof(ARegion), "header for buts");
BLI_addtail(&sbuts->regionbase, ar);
- ar->regiontype= RGN_TYPE_HEADER;
- ar->alignment= RGN_ALIGN_TOP;
+ ar->regiontype = RGN_TYPE_HEADER;
+ ar->alignment = RGN_ALIGN_TOP;
#if 0
/* context area */
- ar= MEM_callocN(sizeof(ARegion), "context area for buts");
+ ar = MEM_callocN(sizeof(ARegion), "context area for buts");
BLI_addtail(&sbuts->regionbase, ar);
- ar->regiontype= RGN_TYPE_CHANNELS;
- ar->alignment= RGN_ALIGN_TOP;
+ ar->regiontype = RGN_TYPE_CHANNELS;
+ ar->alignment = RGN_ALIGN_TOP;
#endif
/* main area */
- ar= MEM_callocN(sizeof(ARegion), "main area for buts");
+ ar = MEM_callocN(sizeof(ARegion), "main area for buts");
BLI_addtail(&sbuts->regionbase, ar);
- ar->regiontype= RGN_TYPE_WINDOW;
+ ar->regiontype = RGN_TYPE_WINDOW;
return (SpaceLink *)sbuts;
}
@@ -95,13 +95,13 @@ static SpaceLink *buttons_new(const bContext *UNUSED(C))
/* not spacelink itself */
static void buttons_free(SpaceLink *sl)
{
- SpaceButs *sbuts= (SpaceButs*) sl;
+ SpaceButs *sbuts = (SpaceButs *) sl;
if (sbuts->path)
MEM_freeN(sbuts->path);
if (sbuts->texuser) {
- ButsContextTexture *ct= sbuts->texuser;
+ ButsContextTexture *ct = sbuts->texuser;
BLI_freelistN(&ct->users);
MEM_freeN(ct);
}
@@ -110,24 +110,24 @@ static void buttons_free(SpaceLink *sl)
/* spacetype; init callback */
static void buttons_init(struct wmWindowManager *UNUSED(wm), ScrArea *sa)
{
- SpaceButs *sbuts= sa->spacedata.first;
+ SpaceButs *sbuts = sa->spacedata.first;
/* auto-align based on size */
if (sbuts->align == BUT_AUTO || !sbuts->align) {
if (sa->winx > sa->winy)
- sbuts->align= BUT_HORIZONTAL;
+ sbuts->align = BUT_HORIZONTAL;
else
- sbuts->align= BUT_VERTICAL;
+ sbuts->align = BUT_VERTICAL;
}
}
static SpaceLink *buttons_duplicate(SpaceLink *sl)
{
- SpaceButs *sbutsn= MEM_dupallocN(sl);
+ SpaceButs *sbutsn = MEM_dupallocN(sl);
/* clear or remove stuff from old */
- sbutsn->path= NULL;
- sbutsn->texuser= NULL;
+ sbutsn->path = NULL;
+ sbutsn->texuser = NULL;
return (SpaceLink *)sbutsn;
}
@@ -146,8 +146,8 @@ static void buttons_main_area_init(wmWindowManager *wm, ARegion *ar)
static void buttons_main_area_draw(const bContext *C, ARegion *ar)
{
/* draw entirely, view changes should be handled here */
- SpaceButs *sbuts= CTX_wm_space_buts(C);
- int vertical= (sbuts->align == BUT_VERTICAL);
+ SpaceButs *sbuts = CTX_wm_space_buts(C);
+ int vertical = (sbuts->align == BUT_VERTICAL);
buttons_context_compute(C, sbuts);
@@ -178,8 +178,8 @@ static void buttons_main_area_draw(const bContext *C, ARegion *ar)
else if (sbuts->mainb == BCONTEXT_BONE_CONSTRAINT)
ED_region_panels(C, ar, vertical, "bone_constraint", sbuts->mainb);
- sbuts->re_align= 0;
- sbuts->mainbo= sbuts->mainb;
+ sbuts->re_align = 0;
+ sbuts->mainbo = sbuts->mainb;
}
static void buttons_operatortypes(void)
@@ -205,7 +205,7 @@ static void buttons_header_area_init(wmWindowManager *UNUSED(wm), ARegion *ar)
static void buttons_header_area_draw(const bContext *C, ARegion *ar)
{
/* clear */
- UI_ThemeClearColor(ED_screen_area_active(C)?TH_HEADER:TH_HEADERDESEL);
+ UI_ThemeClearColor(ED_screen_area_active(C) ? TH_HEADER : TH_HEADERDESEL);
glClear(GL_COLOR_BUFFER_BIT);
/* set view2d view matrix for scrolling (without scrollers) */
@@ -221,7 +221,7 @@ static void buttons_header_area_draw(const bContext *C, ARegion *ar)
* showing that button set, to reduce unnecessary drawing. */
static void buttons_area_redraw(ScrArea *sa, short buttons)
{
- SpaceButs *sbuts= sa->spacedata.first;
+ SpaceButs *sbuts = sa->spacedata.first;
/* if the area's current button set is equal to the one to redraw */
if (sbuts->mainb == buttons)
@@ -231,23 +231,23 @@ static void buttons_area_redraw(ScrArea *sa, short buttons)
/* reused! */
static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn)
{
- SpaceButs *sbuts= sa->spacedata.first;
+ SpaceButs *sbuts = sa->spacedata.first;
/* context changes */
- switch(wmn->category) {
+ switch (wmn->category) {
case NC_SCENE:
- switch(wmn->data) {
+ switch (wmn->data) {
case ND_RENDER_OPTIONS:
buttons_area_redraw(sa, BCONTEXT_RENDER);
break;
case ND_FRAME:
/* any buttons area can have animated properties so redraw all */
ED_area_tag_redraw(sa);
- sbuts->preview= 1;
+ sbuts->preview = 1;
break;
case ND_OB_ACTIVE:
ED_area_tag_redraw(sa);
- sbuts->preview= 1;
+ sbuts->preview = 1;
break;
case ND_KEYINGSET:
buttons_area_redraw(sa, BCONTEXT_SCENE);
@@ -262,10 +262,10 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn)
}
break;
case NC_OBJECT:
- switch(wmn->data) {
+ switch (wmn->data) {
case ND_TRANSFORM:
buttons_area_redraw(sa, BCONTEXT_OBJECT);
- buttons_area_redraw(sa, BCONTEXT_DATA); /* autotexpace flag */
+ buttons_area_redraw(sa, BCONTEXT_DATA); /* autotexpace flag */
break;
case ND_POSE:
buttons_area_redraw(sa, BCONTEXT_DATA);
@@ -280,7 +280,7 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn)
ED_area_tag_redraw(sa);
else
buttons_area_redraw(sa, BCONTEXT_MODIFIER);
- buttons_area_redraw(sa, BCONTEXT_PHYSICS);
+ buttons_area_redraw(sa, BCONTEXT_PHYSICS);
break;
case ND_CONSTRAINT:
buttons_area_redraw(sa, BCONTEXT_CONSTRAINT);
@@ -289,7 +289,7 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn)
case ND_PARTICLE:
if (wmn->action == NA_EDITED)
buttons_area_redraw(sa, BCONTEXT_PARTICLE);
- sbuts->preview= 1;
+ sbuts->preview = 1;
break;
case ND_DRAW:
buttons_area_redraw(sa, BCONTEXT_OBJECT);
@@ -298,7 +298,7 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn)
case ND_SHADING:
case ND_SHADING_DRAW:
/* currently works by redraws... if preview is set, it (re)starts job */
- sbuts->preview= 1;
+ sbuts->preview = 1;
break;
default:
/* Not all object RNA props have a ND_ notifier (yet) */
@@ -307,7 +307,7 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn)
}
break;
case NC_GEOM:
- switch(wmn->data) {
+ switch (wmn->data) {
case ND_SELECT:
case ND_DATA:
ED_area_tag_redraw(sa);
@@ -316,22 +316,22 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn)
break;
case NC_MATERIAL:
ED_area_tag_redraw(sa);
- switch(wmn->data) {
+ switch (wmn->data) {
case ND_SHADING:
case ND_SHADING_DRAW:
case ND_NODES:
/* currently works by redraws... if preview is set, it (re)starts job */
- sbuts->preview= 1;
+ sbuts->preview = 1;
break;
}
break;
case NC_WORLD:
buttons_area_redraw(sa, BCONTEXT_WORLD);
- sbuts->preview= 1;
+ sbuts->preview = 1;
break;
case NC_LAMP:
buttons_area_redraw(sa, BCONTEXT_DATA);
- sbuts->preview= 1;
+ sbuts->preview = 1;
break;
case NC_BRUSH:
buttons_area_redraw(sa, BCONTEXT_TEXTURE);
@@ -339,7 +339,7 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn)
case NC_TEXTURE:
case NC_IMAGE:
ED_area_tag_redraw(sa);
- sbuts->preview= 1;
+ sbuts->preview = 1;
break;
case NC_SPACE:
if (wmn->data == ND_SPACE_PROPERTIES)
@@ -350,7 +350,7 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn)
ED_area_tag_redraw(sa);
break;
case NC_ANIMATION:
- switch(wmn->data) {
+ switch (wmn->data) {
case ND_KEYFRAME:
if (wmn->action == NA_EDITED)
ED_area_tag_redraw(sa);
@@ -358,17 +358,17 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn)
}
break;
case NC_NODE:
- if (wmn->action==NA_SELECTED) {
+ if (wmn->action == NA_SELECTED) {
ED_area_tag_redraw(sa);
/* new active node, update texture preview */
if (sbuts->mainb == BCONTEXT_TEXTURE)
- sbuts->preview= 1;
+ sbuts->preview = 1;
}
break;
/* Listener for preview render, when doing an global undo. */
case NC_WINDOW:
ED_area_tag_redraw(sa);
- sbuts->preview= 1;
+ sbuts->preview = 1;
break;
}
@@ -379,39 +379,39 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn)
/* only called once, from space/spacetypes.c */
void ED_spacetype_buttons(void)
{
- SpaceType *st= MEM_callocN(sizeof(SpaceType), "spacetype buttons");
+ SpaceType *st = MEM_callocN(sizeof(SpaceType), "spacetype buttons");
ARegionType *art;
- st->spaceid= SPACE_BUTS;
+ st->spaceid = SPACE_BUTS;
strncpy(st->name, "Buttons", BKE_ST_MAXNAME);
- st->new= buttons_new;
- st->free= buttons_free;
- st->init= buttons_init;
- st->duplicate= buttons_duplicate;
- st->operatortypes= buttons_operatortypes;
- st->keymap= buttons_keymap;
- st->listener= buttons_area_listener;
- st->context= buttons_context;
+ st->new = buttons_new;
+ st->free = buttons_free;
+ st->init = buttons_init;
+ st->duplicate = buttons_duplicate;
+ st->operatortypes = buttons_operatortypes;
+ st->keymap = buttons_keymap;
+ st->listener = buttons_area_listener;
+ st->context = buttons_context;
/* regions: main window */
- art= MEM_callocN(sizeof(ARegionType), "spacetype buttons region");
+ art = MEM_callocN(sizeof(ARegionType), "spacetype buttons region");
art->regionid = RGN_TYPE_WINDOW;
- art->init= buttons_main_area_init;
- art->draw= buttons_main_area_draw;
- art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_FRAMES;
+ art->init = buttons_main_area_init;
+ art->draw = buttons_main_area_draw;
+ art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_FRAMES;
BLI_addhead(&st->regiontypes, art);
buttons_context_register(art);
/* regions: header */
- art= MEM_callocN(sizeof(ARegionType), "spacetype buttons region");
+ art = MEM_callocN(sizeof(ARegionType), "spacetype buttons region");
art->regionid = RGN_TYPE_HEADER;
- art->prefsizey= HEADERY;
- art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D|ED_KEYMAP_FRAMES|ED_KEYMAP_HEADER;
+ art->prefsizey = HEADERY;
+ art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_HEADER;
- art->init= buttons_header_area_init;
- art->draw= buttons_header_area_draw;
+ art->init = buttons_header_area_init;
+ art->draw = buttons_header_area_draw;
BLI_addhead(&st->regiontypes, art);
BKE_spacetype_register(st);
diff --git a/source/blender/editors/space_clip/CMakeLists.txt b/source/blender/editors/space_clip/CMakeLists.txt
index 4f9819e8e77..ec5e81e4b2c 100644
--- a/source/blender/editors/space_clip/CMakeLists.txt
+++ b/source/blender/editors/space_clip/CMakeLists.txt
@@ -31,6 +31,7 @@ set(INC
../../makesdna
../../makesrna
../../windowmanager
+ ../../gpu
../../../../intern/guardedalloc
${GLEW_INCLUDE_PATH}
)
@@ -39,15 +40,17 @@ set(INC_SYS
)
set(SRC
- space_clip.c
+ clip_buttons.c
+ clip_dopesheet_draw.c
+ clip_dopesheet_ops.c
clip_draw.c
- clip_toolbar.c
- clip_ops.c
- clip_graph_ops.c
- clip_graph_draw.c
clip_editor.c
- clip_buttons.c
+ clip_graph_draw.c
+ clip_graph_ops.c
+ clip_ops.c
+ clip_toolbar.c
clip_utils.c
+ space_clip.c
tracking_ops.c
clip_intern.h
diff --git a/source/blender/editors/space_clip/SConscript b/source/blender/editors/space_clip/SConscript
index 70331b0ec4a..c9c82aea68e 100644
--- a/source/blender/editors/space_clip/SConscript
+++ b/source/blender/editors/space_clip/SConscript
@@ -4,6 +4,6 @@ Import ('env')
sources = env.Glob('*.c')
defs = []
incs = '../include ../../blenkernel ../../blenloader ../../blenfont ../../blenlib ../../imbuf ../../makesdna'
-incs += ' ../../makesrna ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
+incs += ' ../../makesrna ../../windowmanager #/intern/guardedalloc #/extern/glew/include ../../gpu'
env.BlenderLib ( 'bf_editors_space_clip', sources, Split(incs), defs, libtype=['core'], priority=[95] )
diff --git a/source/blender/editors/space_clip/clip_buttons.c b/source/blender/editors/space_clip/clip_buttons.c
index eabd64bdc4f..18f191a46a6 100644
--- a/source/blender/editors/space_clip/clip_buttons.c
+++ b/source/blender/editors/space_clip/clip_buttons.c
@@ -63,6 +63,13 @@
/* Panels */
+static int clip_grease_pencil_panel_poll(const bContext *C, PanelType *UNUSED(pt))
+{
+ SpaceClip *sc = CTX_wm_space_clip(C);
+
+ return sc->view == SC_VIEW_CLIP;
+}
+
void ED_clip_buttons_register(ARegionType *art)
{
PanelType *pt;
@@ -72,6 +79,7 @@ void ED_clip_buttons_register(ARegionType *art)
strcpy(pt->label, "Grease Pencil");
pt->draw = gpencil_panel_standard;
pt->flag |= PNL_DEFAULT_CLOSED;
+ pt->poll = clip_grease_pencil_panel_poll;
BLI_addtail(&art->paneltypes, pt);
}
@@ -157,9 +165,10 @@ void uiTemplateTrack(uiLayout *layout, PointerRNA *ptr, const char *propname)
block = uiLayoutAbsoluteBlock(layout);
- scopes->track_preview_height = (scopes->track_preview_height<=UI_UNIT_Y)?UI_UNIT_Y:scopes->track_preview_height;
+ scopes->track_preview_height = (scopes->track_preview_height <= UI_UNIT_Y)?UI_UNIT_Y : scopes->track_preview_height;
- uiDefBut(block, TRACKPREVIEW, 0, "", rect.xmin, rect.ymin, rect.xmax-rect.xmin, scopes->track_preview_height, scopes, 0, 0, 0, 0, "");
+ uiDefBut(block, TRACKPREVIEW, 0, "", rect.xmin, rect.ymin, rect.xmax - rect.xmin,
+ scopes->track_preview_height, scopes, 0, 0, 0, 0, "");
}
/********************* Marker Template ************************/
@@ -205,7 +214,7 @@ static void marker_update_cb(bContext *C, void *arg_cb, void *UNUSED(arg))
marker->flag = cb->marker_flag;
- WM_event_add_notifier(C, NC_MOVIECLIP|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_MOVIECLIP | NA_EDITED, NULL);
}
static void marker_block_handler(bContext *C, void *arg_cb, int event)
@@ -219,12 +228,12 @@ static void marker_block_handler(bContext *C, void *arg_cb, int event)
marker = BKE_tracking_ensure_marker(cb->track, cb->framenr);
if (event == B_MARKER_POS) {
- marker->pos[0] = cb->marker_pos[0]/width;
- marker->pos[1] = cb->marker_pos[1]/height;
+ marker->pos[0] = cb->marker_pos[0] / width;
+ marker->pos[1] = cb->marker_pos[1] / height;
/* to update position of "parented" objects */
DAG_id_tag_update(&cb->clip->id, 0);
- WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, NULL);
ok = TRUE;
}
@@ -270,17 +279,17 @@ static void marker_block_handler(bContext *C, void *arg_cb, int event)
sub_v2_v2v2(search_dim, cb->track->search_max, cb->track->search_min);
- dim[0] = cb->track_search[0]/width;
- dim[1] = cb->track_search[1]/height;
+ dim[0] = cb->track_search[0] / width;
+ dim[1] = cb->track_search[1] / height;
sub_v2_v2(dim, search_dim);
mul_v2_fl(dim, 0.5f);
- cb->track->search_min[0]-= dim[0];
- cb->track->search_min[1]-= dim[1];
+ cb->track->search_min[0] -= dim[0];
+ cb->track->search_min[1] -= dim[1];
- cb->track->search_max[0]+= dim[0];
- cb->track->search_max[1]+= dim[1];
+ cb->track->search_max[0] += dim[0];
+ cb->track->search_max[1] += dim[1];
BKE_tracking_clamp_track(cb->track, CLAMP_SEARCH_DIM);
@@ -306,16 +315,17 @@ static void marker_block_handler(bContext *C, void *arg_cb, int event)
/* to update position of "parented" objects */
DAG_id_tag_update(&cb->clip->id, 0);
- WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, NULL);
ok = TRUE;
}
if (ok)
- WM_event_add_notifier(C, NC_MOVIECLIP|NA_EDITED, cb->clip);
+ WM_event_add_notifier(C, NC_MOVIECLIP | NA_EDITED, cb->clip);
}
-void uiTemplateMarker(uiLayout *layout, PointerRNA *ptr, const char *propname, PointerRNA *userptr, PointerRNA *trackptr, int compact)
+void uiTemplateMarker(uiLayout *layout, PointerRNA *ptr, const char *propname, PointerRNA *userptr,
+ PointerRNA *trackptr, int compact)
{
PropertyRNA *prop;
uiBlock *block;
@@ -363,11 +373,12 @@ void uiTemplateMarker(uiLayout *layout, PointerRNA *ptr, const char *propname, P
block = uiLayoutGetBlock(layout);
if (cb->marker_flag & MARKER_DISABLED)
- tip= "Marker is disabled at current frame";
+ tip = "Marker is disabled at current frame";
else
- tip= "Marker is enabled at current frame";
+ tip = "Marker is enabled at current frame";
- bt = uiDefIconButBitI(block, TOGN, MARKER_DISABLED, 0, ICON_RESTRICT_VIEW_OFF, 0, 0, 20, 20, &cb->marker_flag, 0, 0, 1, 0, tip);
+ bt = uiDefIconButBitI(block, TOGN, MARKER_DISABLED, 0, ICON_RESTRICT_VIEW_OFF, 0, 0, 20, 20,
+ &cb->marker_flag, 0, 0, 1, 0, tip);
uiButSetNFunc(bt, marker_update_cb, cb, NULL);
}
else {
@@ -385,7 +396,7 @@ void uiTemplateMarker(uiLayout *layout, PointerRNA *ptr, const char *propname, P
return;
}
- step= 100;
+ step = 100;
digits = 2;
sub_v2_v2v2(pat_dim, track->pat_max, track->pat_min);
@@ -405,20 +416,20 @@ void uiTemplateMarker(uiLayout *layout, PointerRNA *ptr, const char *propname, P
cb->marker_flag = marker->flag;
- block= uiLayoutAbsoluteBlock(layout);
+ block = uiLayoutAbsoluteBlock(layout);
uiBlockSetHandleFunc(block, marker_block_handler, cb);
uiBlockSetNFunc(block, marker_update_cb, cb, NULL);
if (cb->marker_flag & MARKER_DISABLED)
- tip= "Marker is disabled at current frame";
+ tip = "Marker is disabled at current frame";
else
- tip= "Marker is enabled at current frame";
+ tip = "Marker is enabled at current frame";
uiDefButBitI(block, OPTIONN, MARKER_DISABLED, B_MARKER_FLAG, "Enabled", 10, 190, 145, 19, &cb->marker_flag,
0, 0, 0, 0, tip);
col = uiLayoutColumn(layout, 1);
- uiLayoutSetActive(col, (cb->marker_flag&MARKER_DISABLED)==0);
+ uiLayoutSetActive(col, (cb->marker_flag & MARKER_DISABLED) == 0);
block = uiLayoutAbsoluteBlock(col);
uiBlockBeginAlign(block);
diff --git a/source/blender/editors/space_clip/clip_dopesheet_draw.c b/source/blender/editors/space_clip/clip_dopesheet_draw.c
new file mode 100644
index 00000000000..84209f7b744
--- /dev/null
+++ b/source/blender/editors/space_clip/clip_dopesheet_draw.c
@@ -0,0 +1,356 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2012 Blender Foundation.
+ * All rights reserved.
+ *
+ *
+ * Contributor(s): Blender Foundation,
+ * Sergey Sharybin
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/editors/space_clip/clip_graph_draw.c
+ * \ingroup spclip
+ */
+
+#include "DNA_movieclip_types.h"
+#include "DNA_object_types.h" /* SELECT */
+#include "DNA_scene_types.h"
+
+#include "MEM_guardedalloc.h"
+
+#include "BKE_context.h"
+#include "BKE_movieclip.h"
+#include "BKE_tracking.h"
+
+#include "BLI_utildefines.h"
+#include "BLI_math.h"
+#include "BLI_string.h"
+#include "BLI_listbase.h"
+#include "BLI_math.h"
+
+#include "ED_screen.h"
+#include "ED_clip.h"
+
+#include "BIF_gl.h"
+#include "BIF_glutil.h"
+
+#include "WM_types.h"
+
+#include "UI_interface.h"
+#include "UI_resources.h"
+#include "UI_view2d.h"
+
+#include "BLF_api.h"
+
+#include "RNA_access.h"
+
+#include "clip_intern.h" // own include
+
+static void track_channel_color(MovieTrackingTrack *track, float default_color[3], float color[3])
+{
+ if (track->flag & TRACK_CUSTOMCOLOR) {
+ float bg[3];
+ UI_GetThemeColor3fv(TH_HEADER, bg);
+
+ interp_v3_v3v3(color, track->color, bg, 0.5);
+ }
+ else {
+ if (default_color)
+ copy_v3_v3(color, default_color);
+ else
+ UI_GetThemeColor3fv(TH_HEADER, color);
+ }
+}
+
+static void draw_keyframe_shape(float x, float y, float xscale, float yscale, short sel, float alpha)
+{
+ /* coordinates for diamond shape */
+ static const float _unit_diamond_shape[4][2] = {
+ {0.0f, 1.0f}, /* top vert */
+ {1.0f, 0.0f}, /* mid-right */
+ {0.0f, -1.0f}, /* bottom vert */
+ {-1.0f, 0.0f} /* mid-left */
+ };
+ static GLuint displist1 = 0;
+ static GLuint displist2 = 0;
+ int hsize = STRIP_HEIGHT_HALF;
+
+ /* initialize 2 display lists for diamond shape - one empty, one filled */
+ if (displist1 == 0) {
+ displist1 = glGenLists(1);
+ glNewList(displist1, GL_COMPILE);
+
+ glBegin(GL_LINE_LOOP);
+ glVertex2fv(_unit_diamond_shape[0]);
+ glVertex2fv(_unit_diamond_shape[1]);
+ glVertex2fv(_unit_diamond_shape[2]);
+ glVertex2fv(_unit_diamond_shape[3]);
+ glEnd();
+ glEndList();
+ }
+ if (displist2 == 0) {
+ displist2 = glGenLists(1);
+ glNewList(displist2, GL_COMPILE);
+
+ glBegin(GL_QUADS);
+ glVertex2fv(_unit_diamond_shape[0]);
+ glVertex2fv(_unit_diamond_shape[1]);
+ glVertex2fv(_unit_diamond_shape[2]);
+ glVertex2fv(_unit_diamond_shape[3]);
+ glEnd();
+ glEndList();
+ }
+
+ glPushMatrix();
+
+ /* adjust view transform before starting */
+ glTranslatef(x, y, 0.0f);
+ glScalef(1.0f / xscale * hsize, 1.0f / yscale * hsize, 1.0f);
+
+ /* anti-aliased lines for more consistent appearance */
+ glEnable(GL_LINE_SMOOTH);
+
+ if (sel)
+ UI_ThemeColorShadeAlpha(TH_STRIP_SELECT, 50, -255 * (1.0f - alpha));
+ else
+ glColor4f(0.91f, 0.91f, 0.91f, alpha);
+
+ glCallList(displist2);
+
+ /* exterior - black frame */
+ glColor4f(0.0f, 0.0f, 0.0f, alpha);
+ glCallList(displist1);
+
+ glDisable(GL_LINE_SMOOTH);
+
+ /* restore view transform */
+ glPopMatrix();
+}
+
+void clip_draw_dopesheet_main(SpaceClip *sc, ARegion *ar, Scene *scene)
+{
+ MovieClip *clip = ED_space_clip(sc);
+ View2D *v2d = &ar->v2d;
+
+ /* frame range */
+ clip_draw_sfra_efra(v2d, scene);
+
+ if (clip) {
+ MovieTracking *tracking = &clip->tracking;
+ MovieTrackingDopesheet *dopesheet = &tracking->dopesheet;
+ MovieTrackingDopesheetChannel *channel;
+ float y, xscale, yscale;
+ float strip[4], selected_strip[4];
+
+ y = (float) CHANNEL_FIRST;
+
+ UI_view2d_getscale(v2d, &xscale, &yscale);
+
+ /* setup colors for regular and selected strips */
+ UI_GetThemeColor3fv(TH_STRIP, strip);
+ UI_GetThemeColor3fv(TH_STRIP_SELECT, selected_strip);
+
+ strip[3] = 0.5f;
+ selected_strip[3] = 1.0f;
+
+ glEnable(GL_BLEND);
+
+ for (channel = dopesheet->channels.first; channel; channel = channel->next) {
+ float yminc = (float) (y - CHANNEL_HEIGHT_HALF);
+ float ymaxc = (float) (y + CHANNEL_HEIGHT_HALF);
+
+ /* check if visible */
+ if (IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
+ IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax))
+ {
+ MovieTrackingTrack *track = channel->track;
+ float alpha;
+ int i, sel = track->flag & TRACK_DOPE_SEL;
+
+ /* selection background */
+ if (sel) {
+ float color[4] = {0.0f, 0.0f, 0.0f, 0.3f};
+ float default_color[4] = {0.8f, 0.93f, 0.8f, 0.3f};
+
+ track_channel_color(track, default_color, color);
+ glColor4fv(color);
+
+ glRectf(v2d->cur.xmin, (float) y - CHANNEL_HEIGHT_HALF,
+ v2d->cur.xmax + EXTRA_SCROLL_PAD, (float) y + CHANNEL_HEIGHT_HALF);
+ }
+
+ alpha = (track->flag & TRACK_LOCKED) ? 0.5f : 1.0f;
+
+ /* tracked segments */
+ for (i = 0; i < channel->tot_segment; i++) {
+ int start_frame = channel->segments[2 * i];
+ int end_frame = channel->segments[2 * i + 1];
+
+ if (sel)
+ glColor4fv(selected_strip);
+ else
+ glColor4fv(strip);
+
+ if (start_frame != end_frame) {
+ glRectf(start_frame, (float) y - STRIP_HEIGHT_HALF,
+ end_frame, (float) y + STRIP_HEIGHT_HALF);
+ draw_keyframe_shape(start_frame, y, xscale, yscale, sel, alpha);
+ draw_keyframe_shape(end_frame, y, xscale, yscale, sel, alpha);
+ }
+ else {
+ draw_keyframe_shape(start_frame, y, xscale, yscale, sel, alpha);
+ }
+ }
+
+ /* keyframes */
+ i = 0;
+ while (i < track->markersnr) {
+ MovieTrackingMarker *marker = &track->markers[i];
+
+ if ((marker->flag & (MARKER_DISABLED | MARKER_TRACKED)) == 0)
+ draw_keyframe_shape(marker->framenr, y, xscale, yscale, sel, alpha);
+
+ i++;
+ }
+ }
+
+ /* adjust y-position for next one */
+ y -= CHANNEL_STEP;
+ }
+
+ glDisable(GL_BLEND);
+ }
+
+ /* current frame */
+ clip_draw_cfra(sc, ar, scene);
+}
+
+void clip_draw_dopesheet_channels(const bContext *C, ARegion *ar)
+{
+ ScrArea *sa = CTX_wm_area(C);
+ SpaceClip *sc = CTX_wm_space_clip(C);
+ View2D *v2d = &ar->v2d;
+ MovieClip *clip = ED_space_clip(sc);
+ MovieTracking *tracking;
+ MovieTrackingDopesheet *dopesheet;
+ MovieTrackingDopesheetChannel *channel;
+ uiStyle *style = UI_GetStyle();
+ uiBlock *block;
+ int fontid = style->widget.uifont_id;
+ int height;
+ float y;
+
+ if (!clip)
+ return;
+
+ tracking = &clip->tracking;
+ dopesheet = &tracking->dopesheet;
+ height = (dopesheet->tot_channel * CHANNEL_STEP) + (CHANNEL_HEIGHT * 2);
+
+ if (height > (v2d->mask.ymax - v2d->mask.ymin)) {
+ /* don't use totrect set, as the width stays the same
+ * (NOTE: this is ok here, the configuration is pretty straightforward)
+ */
+ v2d->tot.ymin = (float)(-height);
+ }
+
+ /* need to do a view-sync here, so that the keys area doesn't jump around (it must copy this) */
+ UI_view2d_sync(NULL, sa, v2d, V2D_LOCK_COPY);
+
+ /* loop through channels, and set up drawing depending on their type
+ * first pass: just the standard GL-drawing for backdrop + text
+ */
+ y = (float) CHANNEL_FIRST;
+
+ BLF_size(fontid, 11.0f, U.dpi);
+
+ for (channel = dopesheet->channels.first; channel; channel = channel->next) {
+ float yminc = (float) (y - CHANNEL_HEIGHT_HALF);
+ float ymaxc = (float) (y + CHANNEL_HEIGHT_HALF);
+
+ /* check if visible */
+ if (IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
+ IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax))
+ {
+ MovieTrackingTrack *track = channel->track;
+ float font_height, color[3];
+ int sel = track->flag & TRACK_DOPE_SEL;
+
+ track_channel_color(track, NULL, color);
+ glColor3fv(color);
+
+ glRectf(v2d->cur.xmin, (float) y - CHANNEL_HEIGHT_HALF,
+ v2d->cur.xmax + EXTRA_SCROLL_PAD, (float) y + CHANNEL_HEIGHT_HALF);
+
+ if (sel)
+ UI_ThemeColor(TH_TEXT_HI);
+ else
+ UI_ThemeColor(TH_TEXT);
+
+ font_height = BLF_height(fontid, track->name);
+ BLF_position(fontid, v2d->cur.xmin + CHANNEL_PAD,
+ y - font_height / 2.0f, 0.0f);
+ BLF_draw(fontid, track->name, strlen(track->name));
+ }
+
+ /* adjust y-position for next one */
+ y -= CHANNEL_STEP;
+ }
+
+ /* second pass: widgets */
+ block = uiBeginBlock(C, ar, __func__, UI_EMBOSS);
+ y = (float) CHANNEL_FIRST;
+
+ glEnable(GL_BLEND);
+ for (channel = dopesheet->channels.first; channel; channel = channel->next) {
+ float yminc = (float)(y - CHANNEL_HEIGHT_HALF);
+ float ymaxc = (float)(y + CHANNEL_HEIGHT_HALF);
+
+ /* check if visible */
+ if (IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
+ IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax))
+ {
+ MovieTrackingTrack *track = channel->track;
+ uiBut *but;
+ PointerRNA ptr;
+ int icon;
+
+ RNA_pointer_create(&clip->id, &RNA_MovieTrackingTrack, track, &ptr);
+
+ if (track->flag & TRACK_LOCKED)
+ icon = ICON_LOCKED;
+ else
+ icon = ICON_UNLOCKED;
+
+ uiBlockSetEmboss(block, UI_EMBOSSN);
+ but = uiDefIconButR(block, ICONTOG, 1, icon,
+ v2d->cur.xmax - UI_UNIT_X - CHANNEL_PAD, y - UI_UNIT_Y / 2.0f,
+ UI_UNIT_X, UI_UNIT_Y, &ptr, "lock", 0, 0, 0, 0, 0, NULL);
+ uiBlockSetEmboss(block, UI_EMBOSS);
+ }
+
+ /* adjust y-position for next one */
+ y -= CHANNEL_STEP;
+ }
+ glDisable(GL_BLEND);
+
+ uiEndBlock(C, block);
+ uiDrawBlock(C, block);
+}
diff --git a/source/blender/editors/space_clip/clip_dopesheet_ops.c b/source/blender/editors/space_clip/clip_dopesheet_ops.c
new file mode 100644
index 00000000000..0fd17523425
--- /dev/null
+++ b/source/blender/editors/space_clip/clip_dopesheet_ops.c
@@ -0,0 +1,139 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2012 Blender Foundation.
+ * All rights reserved.
+ *
+ *
+ * Contributor(s): Blender Foundation,
+ * Sergey Sharybin
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/editors/space_clip/clip_graph_ops.c
+ * \ingroup spclip
+ */
+
+#include "DNA_object_types.h" /* SELECT */
+#include "DNA_scene_types.h"
+
+#include "MEM_guardedalloc.h"
+
+#include "BLI_utildefines.h"
+#include "BLI_math.h"
+#include "BLI_listbase.h"
+#include "BLI_rect.h"
+
+#include "BKE_context.h"
+#include "BKE_movieclip.h"
+#include "BKE_tracking.h"
+#include "BKE_depsgraph.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
+
+#include "ED_screen.h"
+#include "ED_clip.h"
+
+#include "UI_interface.h"
+
+#include "RNA_access.h"
+#include "RNA_define.h"
+
+#include "UI_view2d.h"
+
+#include "clip_intern.h" // own include
+
+/********************** select channel operator *********************/
+
+static int dopesheet_select_channel_poll(bContext *C)
+{
+ SpaceClip *sc = CTX_wm_space_clip(C);
+
+ if (sc && sc->clip)
+ return sc->view == SC_VIEW_DOPESHEET;
+
+ return FALSE;
+}
+
+static int dopesheet_select_channel_exec(bContext *C, wmOperator *op)
+{
+ SpaceClip *sc = CTX_wm_space_clip(C);
+ MovieClip *clip = ED_space_clip(sc);
+ MovieTracking *tracking = &clip->tracking;
+ MovieTrackingDopesheet *dopesheet = &tracking->dopesheet;
+ MovieTrackingDopesheetChannel *channel;
+ float location[2];
+ int extend = RNA_boolean_get(op->ptr, "extend");
+ int current_channel_index = 0, channel_index;
+
+ RNA_float_get_array(op->ptr, "location", location);
+ channel_index = -(location[1] - (CHANNEL_FIRST + CHANNEL_HEIGHT_HALF)) / CHANNEL_STEP;
+
+ for (channel = dopesheet->channels.first; channel; channel = channel->next) {
+ MovieTrackingTrack *track = channel->track;
+
+ if (current_channel_index == channel_index) {
+ if (extend)
+ track->flag ^= TRACK_DOPE_SEL;
+ else
+ track->flag |= TRACK_DOPE_SEL;
+ }
+ else if (!extend)
+ track->flag &= ~TRACK_DOPE_SEL;
+
+ current_channel_index++;
+ }
+
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, NULL);
+
+ return OPERATOR_FINISHED;
+}
+
+static int dopesheet_select_channel_invoke(bContext *C, wmOperator *op, wmEvent *event)
+{
+ ARegion *ar = CTX_wm_region(C);
+ float location[2];
+
+ UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &location[0], &location[1]);
+ RNA_float_set_array(op->ptr, "location", location);
+
+ return dopesheet_select_channel_exec(C, op);
+}
+
+void CLIP_OT_dopesheet_select_channel(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Select Channel";
+ ot->description = "Select movie tracking channel";
+ ot->idname = "CLIP_OT_dopesheet_select_channel";
+
+ /* api callbacks */
+ ot->invoke = dopesheet_select_channel_invoke;
+ ot->exec = dopesheet_select_channel_exec;
+ ot->poll = dopesheet_select_channel_poll;
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+
+ /* properties */
+ RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX,
+ "Location", "Mouse location to select channel", -100.0f, 100.0f);
+ RNA_def_boolean(ot->srna, "extend", 0,
+ "Extend", "Extend selection rather than clearing the existing selection");
+}
diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c
index bf8976035a8..f92f639586d 100644
--- a/source/blender/editors/space_clip/clip_draw.c
+++ b/source/blender/editors/space_clip/clip_draw.c
@@ -87,7 +87,7 @@ void clip_draw_curfra_label(SpaceClip *sc, float x, float y)
glRecti(x, y, x + font_dims[0] + 6.0f, y + font_dims[1] + 4.0f);
UI_ThemeColor(TH_TEXT);
- BLF_position(fontid, x+2.0f, y+2.0f, 0.0f);
+ BLF_position(fontid, x + 2.0f, y + 2.0f, 0.0f);
BLF_draw(fontid, numstr, sizeof(numstr));
}
@@ -128,7 +128,7 @@ static void draw_movieclip_cache(SpaceClip *sc, ARegion *ar, MovieClip *clip, Sc
int framenr;
MovieTrackingMarker *marker;
- while (a<track->markersnr) {
+ while (a < track->markersnr) {
if (track->markers[a].framenr >= i)
break;
@@ -191,7 +191,7 @@ static void draw_movieclip_cache(SpaceClip *sc, ARegion *ar, MovieClip *clip, Sc
x = (sc->user.framenr - sfra) / (efra - sfra + 1) * ar->winx;
UI_ThemeColor(TH_CFRAME);
- glRecti(x, 0, x+framelen, 8);
+ glRecti(x, 0, x + framelen, 8);
clip_draw_curfra_label(sc, x, 8.0f);
}
@@ -229,9 +229,6 @@ static void draw_movieclip_buffer(SpaceClip *sc, ARegion *ar, ImBuf *ibuf,
int x, y;
MovieClip *clip = ED_space_clip(sc);
- /* set zoom */
- glPixelZoom(zoomx*width/ibuf->x, zoomy*height/ibuf->y);
-
/* find window pixel coordinates of origin */
UI_view2d_to_region_no_clip(&ar->v2d, 0.0f, 0.0f, &x, &y);
@@ -242,8 +239,42 @@ static void draw_movieclip_buffer(SpaceClip *sc, ARegion *ar, ImBuf *ibuf,
else {
verify_buffer_float(ibuf);
- if (ibuf->rect)
- glaDrawPixelsSafe(x, y, ibuf->x, ibuf->y, ibuf->x, GL_RGBA, GL_UNSIGNED_BYTE, ibuf->rect);
+ if (ibuf->rect) {
+ int need_fallback = 1;
+
+ if (ED_space_clip_texture_buffer_supported(sc)) {
+ if (ED_space_clip_load_movieclip_buffer(sc, ibuf)) {
+ glPushMatrix();
+ glTranslatef(x, y, 0.0f);
+ glScalef(zoomx, zoomy, 1.0f);
+
+ glBegin(GL_QUADS);
+ glTexCoord2f(0.0f, 0.0f); glVertex2f(0.0f, 0.0f);
+ glTexCoord2f(1.0f, 0.0f); glVertex2f(width, 0.0f);
+ glTexCoord2f(1.0f, 1.0f); glVertex2f(width, height);
+ glTexCoord2f(0.0f, 1.0f); glVertex2f(0.0f, height);
+ glEnd();
+
+ glPopMatrix();
+
+ ED_space_clip_unload_movieclip_buffer(sc);
+
+ need_fallback = 0;
+ }
+ }
+
+ /* if texture buffers aren't efifciently supported or texture is too large to
+ * be binder fallback to simple draw pixels solution */
+ if (need_fallback) {
+ /* set zoom */
+ glPixelZoom(zoomx * width / ibuf->x, zoomy * height / ibuf->y);
+
+ glaDrawPixelsSafe(x, y, ibuf->x, ibuf->y, ibuf->x, GL_RGBA, GL_UNSIGNED_BYTE, ibuf->rect);
+
+ /* reset zoom */
+ glPixelZoom(1.0f, 1.0f);
+ }
+ }
}
/* draw boundary border for frame if stabilization is enabled */
@@ -255,9 +286,9 @@ static void draw_movieclip_buffer(SpaceClip *sc, ARegion *ar, ImBuf *ibuf,
glLogicOp(GL_NOR);
glPushMatrix();
- glTranslatef(x, y, 0);
+ glTranslatef(x, y, 0.0f);
- glScalef(zoomx, zoomy, 0);
+ glScalef(zoomx, zoomy, 1.0f);
glMultMatrixf(sc->stabmat);
glBegin(GL_LINE_LOOP);
@@ -272,10 +303,6 @@ static void draw_movieclip_buffer(SpaceClip *sc, ARegion *ar, ImBuf *ibuf,
glDisable(GL_COLOR_LOGIC_OP);
glDisable(GL_LINE_STIPPLE);
}
-
-
- /* reset zoom */
- glPixelZoom(1.0f, 1.0f);
}
static void draw_track_path(SpaceClip *sc, MovieClip *UNUSED(clip), MovieTrackingTrack *track)
@@ -283,7 +310,7 @@ static void draw_track_path(SpaceClip *sc, MovieClip *UNUSED(clip), MovieTrackin
int count = sc->path_length;
int i, a, b, curindex = -1;
float path[102][2];
- int tiny = sc->flag&SC_SHOW_TINY_MARKER, framenr;
+ int tiny = sc->flag & SC_SHOW_TINY_MARKER, framenr;
MovieTrackingMarker *marker;
if (count == 0)
@@ -319,7 +346,7 @@ static void draw_track_path(SpaceClip *sc, MovieClip *UNUSED(clip), MovieTrackin
b = count;
i = framenr;
- while (i <= framenr+count) {
+ while (i <= framenr + count) {
marker = BKE_tracking_get_marker(track, i);
if (!marker || marker->flag & MARKER_DISABLED)
@@ -327,10 +354,10 @@ static void draw_track_path(SpaceClip *sc, MovieClip *UNUSED(clip), MovieTrackin
if (marker->framenr == i) {
if (marker->framenr == sc->user.framenr)
- curindex= b;
+ curindex = b;
add_v2_v2v2(path[b++], marker->pos, track->offset);
- ED_clip_point_undistorted_pos(sc, path[b-1], path[b-1]);
+ ED_clip_point_undistorted_pos(sc, path[b - 1], path[b - 1]);
}
else
break;
@@ -387,9 +414,10 @@ static void draw_track_path(SpaceClip *sc, MovieClip *UNUSED(clip), MovieTrackin
glPointSize(1.0f);
}
-static void draw_marker_outline(SpaceClip *sc, MovieTrackingTrack *track, MovieTrackingMarker *marker, float marker_pos[2], int width, int height)
+static void draw_marker_outline(SpaceClip *sc, MovieTrackingTrack *track, MovieTrackingMarker *marker,
+ float marker_pos[2], int width, int height)
{
- int tiny = sc->flag&SC_SHOW_TINY_MARKER;
+ int tiny = sc->flag & SC_SHOW_TINY_MARKER;
int show_search = FALSE;
float px[2];
@@ -407,7 +435,7 @@ static void draw_marker_outline(SpaceClip *sc, MovieTrackingTrack *track, MovieT
ED_clip_point_undistorted_pos(sc, pos, pos);
- if (BLI_in_rctf(&r, pos[0]-marker_pos[0], pos[1]-marker_pos[1])) {
+ if (BLI_in_rctf(&r, pos[0] - marker_pos[0], pos[1] - marker_pos[1])) {
if (tiny) glPointSize(3.0f);
else glPointSize(4.0f);
glBegin(GL_POINTS);
@@ -486,19 +514,20 @@ static void track_colors(MovieTrackingTrack *track, int act, float col[3], float
}
}
-static void draw_marker_areas(SpaceClip *sc, MovieTrackingTrack *track, MovieTrackingMarker *marker, float marker_pos[2], int width, int height, int act, int sel)
+static void draw_marker_areas(SpaceClip *sc, MovieTrackingTrack *track, MovieTrackingMarker *marker,
+ float marker_pos[2], int width, int height, int act, int sel)
{
- int tiny= sc->flag&SC_SHOW_TINY_MARKER;
- int show_search= 0;
+ int tiny = sc->flag & SC_SHOW_TINY_MARKER;
+ int show_search = 0;
float col[3], scol[3], px[2];
track_colors(track, act, col, scol);
- px[0]= 1.0f / width / sc->zoom;
- px[1]= 1.0f / height / sc->zoom;
+ px[0] = 1.0f / width / sc->zoom;
+ px[1] = 1.0f / height / sc->zoom;
/* marker position and offset position */
- if ((track->flag&SELECT) == sel && (marker->flag & MARKER_DISABLED) == 0) {
+ if ((track->flag & SELECT) == sel && (marker->flag & MARKER_DISABLED) == 0) {
float pos[2];
rctf r;
@@ -521,7 +550,7 @@ static void draw_marker_areas(SpaceClip *sc, MovieTrackingTrack *track, MovieTra
add_v2_v2v2(pos, marker->pos, track->offset);
ED_clip_point_undistorted_pos(sc, pos, pos);
- if (BLI_in_rctf(&r, pos[0]-marker_pos[0], pos[1]-marker_pos[1])) {
+ if (BLI_in_rctf(&r, pos[0] - marker_pos[0], pos[1] - marker_pos[1])) {
if (!tiny)
glPointSize(2.0f);
@@ -689,7 +718,7 @@ static void draw_marker_slide_zones(SpaceClip *sc, MovieTrackingTrack *track, Mo
float marker_pos[2], int outline, int sel, int act, int width, int height)
{
float x, y, dx, dy, patdx, patdy, searchdx, searchdy, tdx, tdy;
- int tiny = sc->flag&SC_SHOW_TINY_MARKER;
+ int tiny = sc->flag & SC_SHOW_TINY_MARKER;
float col[3], scol[3], px[2];
if ((tiny && outline) || (marker->flag & MARKER_DISABLED))
@@ -741,18 +770,18 @@ static void draw_marker_slide_zones(SpaceClip *sc, MovieTrackingTrack *track, Mo
}
glBegin(GL_QUADS);
- glVertex3f(x-tdx, y+tdy, 0);
- glVertex3f(x+tdx, y+tdy, 0);
- glVertex3f(x+tdx, y-tdy, 0);
- glVertex3f(x-tdx, y-tdy, 0);
+ glVertex3f(x - tdx, y + tdy, 0);
+ glVertex3f(x + tdx, y + tdy, 0);
+ glVertex3f(x + tdx, y - tdy, 0);
+ glVertex3f(x - tdx, y - tdy, 0);
glEnd();
/* search re-sizing triangle */
x = track->search_max[0];
y = track->search_min[1];
- tdx = searchdx*2.0f;
- tdy = searchdy*2.0f;
+ tdx = searchdx * 2.0f;
+ tdy = searchdy * 2.0f;
if (outline) {
tdx += px[0];
@@ -761,12 +790,12 @@ static void draw_marker_slide_zones(SpaceClip *sc, MovieTrackingTrack *track, Mo
glBegin(GL_TRIANGLES);
glVertex3f(x, y, 0);
- glVertex3f(x-tdx, y, 0);
- glVertex3f(x, y+tdy, 0);
+ glVertex3f(x - tdx, y, 0);
+ glVertex3f(x, y + tdy, 0);
glEnd();
}
- if ((sc->flag & SC_SHOW_MARKER_PATTERN) && ((track->pat_flag & SELECT)==sel || outline)) {
+ if ((sc->flag & SC_SHOW_MARKER_PATTERN) && ((track->pat_flag & SELECT) == sel || outline)) {
if (!outline) {
if (track->pat_flag & SELECT)
glColor3fv(scol);
@@ -787,10 +816,10 @@ static void draw_marker_slide_zones(SpaceClip *sc, MovieTrackingTrack *track, Mo
}
glBegin(GL_QUADS);
- glVertex3f(x-tdx, y+tdy, 0);
- glVertex3f(x+tdx, y+tdy, 0);
- glVertex3f(x+tdx, y-tdy, 0);
- glVertex3f(x-tdx, y-tdy, 0);
+ glVertex3f(x - tdx, y + tdy, 0);
+ glVertex3f(x + tdx, y + tdy, 0);
+ glVertex3f(x + tdx, y - tdy, 0);
+ glVertex3f(x - tdx, y - tdy, 0);
glEnd();
/* pattern re-sizing triangle */
@@ -807,8 +836,8 @@ static void draw_marker_slide_zones(SpaceClip *sc, MovieTrackingTrack *track, Mo
glBegin(GL_TRIANGLES);
glVertex3f(x, y, 0);
- glVertex3f(x-tdx, y, 0);
- glVertex3f(x, y+tdy, 0);
+ glVertex3f(x - tdx, y, 0);
+ glVertex3f(x, y + tdy, 0);
glEnd();
}
@@ -818,11 +847,11 @@ static void draw_marker_slide_zones(SpaceClip *sc, MovieTrackingTrack *track, Mo
glLineWidth(1.0f);
}
-static void draw_marker_texts(SpaceClip *sc, MovieTrackingTrack *track, MovieTrackingMarker *marker, float marker_pos[2], int act,
- int width, int height, float zoomx, float zoomy)
+static void draw_marker_texts(SpaceClip *sc, MovieTrackingTrack *track, MovieTrackingMarker *marker,
+ float marker_pos[2], int act, int width, int height, float zoomx, float zoomy)
{
char str[128] = {0}, state[64] = {0};
- float dx= 0.0f, dy = 0.0f, fontsize, pos[3];
+ float dx = 0.0f, dy = 0.0f, fontsize, pos[3];
uiStyle *style = U.uistyles.first;
int fontid = style->widget.uifont_id;
@@ -944,10 +973,10 @@ static void draw_tracking_tracks(SpaceClip *sc, ARegion *ar, MovieClip *clip,
/* count */
track = tracksbase->first;
while (track) {
- if ((track->flag & TRACK_HIDDEN)==0) {
+ if ((track->flag & TRACK_HIDDEN) == 0) {
marker = BKE_tracking_get_marker(track, framenr);
- if (MARKER_VISIBLE(sc, marker))
+ if (MARKER_VISIBLE(sc, track, marker))
count++;
}
@@ -961,10 +990,10 @@ static void draw_tracking_tracks(SpaceClip *sc, ARegion *ar, MovieClip *clip,
track = tracksbase->first;
fp = marker_pos;
while (track) {
- if ((track->flag & TRACK_HIDDEN)==0) {
+ if ((track->flag & TRACK_HIDDEN) == 0) {
marker = BKE_tracking_get_marker(track, framenr);
- if (MARKER_VISIBLE(sc, marker)) {
+ if (MARKER_VISIBLE(sc, track, marker)) {
ED_clip_point_undistorted_pos(sc, marker->pos, fp);
if (track == act_track)
@@ -982,7 +1011,7 @@ static void draw_tracking_tracks(SpaceClip *sc, ARegion *ar, MovieClip *clip,
if (sc->flag & SC_SHOW_TRACK_PATH) {
track = tracksbase->first;
while (track) {
- if ((track->flag & TRACK_HIDDEN)==0)
+ if ((track->flag & TRACK_HIDDEN) == 0)
draw_track_path(sc, clip, track);
track = track->next;
@@ -993,10 +1022,10 @@ static void draw_tracking_tracks(SpaceClip *sc, ARegion *ar, MovieClip *clip,
track = tracksbase->first;
fp = marker_pos;
while (track) {
- if ((track->flag & TRACK_HIDDEN)==0) {
+ if ((track->flag & TRACK_HIDDEN) == 0) {
marker = BKE_tracking_get_marker(track, framenr);
- if (MARKER_VISIBLE(sc, marker)) {
+ if (MARKER_VISIBLE(sc, track, marker)) {
copy_v2_v2(cur_pos, fp ? fp : marker->pos);
draw_marker_outline(sc, track, marker, cur_pos, width, height);
@@ -1017,11 +1046,11 @@ static void draw_tracking_tracks(SpaceClip *sc, ARegion *ar, MovieClip *clip,
track = tracksbase->first;
fp = marker_pos;
while (track) {
- if ((track->flag & TRACK_HIDDEN)==0) {
+ if ((track->flag & TRACK_HIDDEN) == 0) {
int act = track == act_track;
marker = BKE_tracking_get_marker(track, framenr);
- if (MARKER_VISIBLE(sc, marker)) {
+ if (MARKER_VISIBLE(sc, track, marker)) {
if (!act) {
copy_v2_v2(cur_pos, fp ? fp : marker->pos);
@@ -1039,10 +1068,10 @@ static void draw_tracking_tracks(SpaceClip *sc, ARegion *ar, MovieClip *clip,
/* active marker would be displayed on top of everything else */
if (act_track) {
- if ((act_track->flag & TRACK_HIDDEN)==0) {
+ if ((act_track->flag & TRACK_HIDDEN) == 0) {
marker = BKE_tracking_get_marker(act_track, framenr);
- if (MARKER_VISIBLE(sc, marker)) {
+ if (MARKER_VISIBLE(sc, act_track, marker)) {
copy_v2_v2(cur_pos, active_pos ? active_pos : marker->pos);
draw_marker_areas(sc, act_track, marker, cur_pos, width, height, 1, 1);
@@ -1064,12 +1093,12 @@ static void draw_tracking_tracks(SpaceClip *sc, ARegion *ar, MovieClip *clip,
track = tracksbase->first;
while (track) {
if ((track->flag & TRACK_HIDDEN) == 0 && track->flag & TRACK_HAS_BUNDLE) {
- marker= BKE_tracking_get_marker(track, framenr);
+ marker = BKE_tracking_get_marker(track, framenr);
- if (MARKER_VISIBLE(sc, marker)) {
+ if (MARKER_VISIBLE(sc, track, marker)) {
float npos[2];
copy_v4_v4(vec, track->bundle_pos);
- vec[3]=1;
+ vec[3] = 1;
mul_v4_m4v4(pos, mat, vec);
@@ -1084,7 +1113,7 @@ static void draw_tracking_tracks(SpaceClip *sc, ARegion *ar, MovieClip *clip,
sub_v2_v2(vec, npos);
- if (len_v2(vec)< 3.0f)
+ if (len_v2(vec) < 3.0f)
glColor3f(0.0f, 1.0f, 0.0f);
else
glColor3f(1.0f, 0.0f, 0.0f);
@@ -1116,7 +1145,7 @@ static void draw_tracking_tracks(SpaceClip *sc, ARegion *ar, MovieClip *clip,
if ((track->flag & TRACK_HIDDEN) == 0) {
marker = BKE_tracking_get_marker(track, framenr);
- if (MARKER_VISIBLE(sc, marker)) {
+ if (MARKER_VISIBLE(sc, track, marker)) {
int act = track == act_track;
copy_v2_v2(cur_pos, fp ? fp : marker->pos);
@@ -1138,7 +1167,8 @@ static void draw_tracking_tracks(SpaceClip *sc, ARegion *ar, MovieClip *clip,
MEM_freeN(marker_pos);
}
-static void draw_distortion(SpaceClip *sc, ARegion *ar, MovieClip *clip, int width, int height, float zoomx, float zoomy)
+static void draw_distortion(SpaceClip *sc, ARegion *ar, MovieClip *clip,
+ int width, int height, float zoomx, float zoomy)
{
float x, y;
const int n = 10;
@@ -1172,9 +1202,9 @@ static void draw_distortion(SpaceClip *sc, ARegion *ar, MovieClip *clip, int wid
for (a = 0; a < 4; a++) {
if (a < 2)
- val[a][a%2] = FLT_MAX;
+ val[a][a % 2] = FLT_MAX;
else
- val[a][a%2] = -FLT_MAX;
+ val[a][a % 2] = -FLT_MAX;
}
zero_v2(pos);
@@ -1186,10 +1216,10 @@ static void draw_distortion(SpaceClip *sc, ARegion *ar, MovieClip *clip, int wid
for (a = 0; a < 4; a++) {
int ok;
- if (a<2)
- ok = tpos[a%2] < val[a][a%2];
+ if (a < 2)
+ ok = tpos[a % 2] < val[a][a % 2];
else
- ok= tpos[a%2] > val[a][a%2];
+ ok = tpos[a % 2] > val[a][a % 2];
if (ok) {
copy_v2_v2(val[a], tpos);
@@ -1255,7 +1285,7 @@ static void draw_distortion(SpaceClip *sc, ARegion *ar, MovieClip *clip, int wid
}
if (sc->flag & SC_MANUAL_CALIBRATION && clip->gpd) {
- bGPDlayer *layer= clip->gpd->layers.first;
+ bGPDlayer *layer = clip->gpd->layers.first;
while (layer) {
bGPDframe *frame = layer->frames.first;
@@ -1283,11 +1313,11 @@ static void draw_distortion(SpaceClip *sc, ARegion *ar, MovieClip *clip, int wid
pos[0] = stroke->points[i].x * width;
pos[1] = stroke->points[i].y * height * aspy;
- npos[0] = stroke->points[i+1].x * width;
- npos[1] = stroke->points[i+1].y * height * aspy;
+ npos[0] = stroke->points[i + 1].x * width;
+ npos[1] = stroke->points[i + 1].y * height * aspy;
len = len_v2v2(pos, npos);
- steps= ceil(len/5.0f);
+ steps = ceil(len / 5.0f);
/* we want to distort only long straight lines */
if (stroke->totpoints == 2) {
@@ -1296,11 +1326,11 @@ static void draw_distortion(SpaceClip *sc, ARegion *ar, MovieClip *clip, int wid
}
sub_v2_v2v2(dpos, npos, pos);
- mul_v2_fl(dpos, 1.0f/steps);
+ mul_v2_fl(dpos, 1.0f / steps);
for (j = 0; j <= steps; j++) {
BKE_tracking_apply_intrinsics(tracking, pos, tpos);
- glVertex2f(tpos[0]/width, tpos[1]/(height*aspy));
+ glVertex2f(tpos[0] / width, tpos[1] / (height*aspy));
add_v2_v2(pos, dpos);
}
@@ -1332,7 +1362,7 @@ static void draw_distortion(SpaceClip *sc, ARegion *ar, MovieClip *clip, int wid
void clip_draw_main(SpaceClip *sc, ARegion *ar, Scene *scene)
{
- MovieClip *clip= ED_space_clip(sc);
+ MovieClip *clip = ED_space_clip(sc);
ImBuf *ibuf;
int width, height;
float zoomx, zoomy;
@@ -1380,7 +1410,12 @@ void clip_draw_main(SpaceClip *sc, ARegion *ar, Scene *scene)
if (ibuf) {
draw_movieclip_buffer(sc, ar, ibuf, width, height, zoomx, zoomy);
IMB_freeImBuf(ibuf);
+ }
+ else {
+ ED_region_grid_draw(ar, zoomx, zoomy);
+ }
+ if (width && height) {
draw_tracking_tracks(sc, ar, clip, width, height, zoomx, zoomy);
draw_distortion(sc, ar, clip, width, height, zoomx, zoomy);
}
@@ -1402,7 +1437,7 @@ void clip_draw_grease_pencil(bContext *C, int onlyv2d)
if (onlyv2d) {
/* if manual calibration is used then grease pencil data is already
* drawed in draw_distortion */
- if ((sc->flag & SC_MANUAL_CALIBRATION)==0 || sc->mode != SC_MODE_DISTORTION) {
+ if ((sc->flag & SC_MANUAL_CALIBRATION) == 0 || sc->mode != SC_MODE_DISTORTION) {
ibuf = ED_space_clip_get_buffer(sc);
if (ibuf) {
diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c
index 3946d4cc36d..94422e51891 100644
--- a/source/blender/editors/space_clip/clip_editor.c
+++ b/source/blender/editors/space_clip/clip_editor.c
@@ -31,15 +31,20 @@
#include <stddef.h>
+#include "MEM_guardedalloc.h"
+
#include "BKE_main.h"
#include "BKE_movieclip.h"
#include "BKE_context.h"
#include "BKE_tracking.h"
+
#include "DNA_object_types.h" /* SELECT */
#include "BLI_utildefines.h"
#include "BLI_math.h"
+#include "GPU_extensions.h"
+
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
@@ -47,6 +52,7 @@
#include "ED_clip.h"
#include "BIF_gl.h"
+#include "BIF_glutil.h"
#include "WM_api.h"
#include "WM_types.h"
@@ -55,6 +61,8 @@
#include "clip_intern.h" // own include
+/* ******** operactor poll functions ******** */
+
int ED_space_clip_poll(bContext *C)
{
SpaceClip *sc = CTX_wm_space_clip(C);
@@ -65,15 +73,96 @@ int ED_space_clip_poll(bContext *C)
return FALSE;
}
-void ED_space_clip_set(bContext *C, SpaceClip *sc, MovieClip *clip)
+int ED_space_clip_view_clip_poll(bContext *C)
+{
+ SpaceClip *sc = CTX_wm_space_clip(C);
+
+ if (sc && sc->clip) {
+ return sc->view == SC_VIEW_CLIP;
+ }
+
+ return FALSE;
+}
+
+int ED_space_clip_tracking_poll(bContext *C)
+{
+ SpaceClip *sc = CTX_wm_space_clip(C);
+
+ if (sc && sc->clip)
+ return ED_space_clip_show_trackedit(sc);
+
+ return FALSE;
+}
+
+int ED_space_clip_tracking_size_poll(bContext *C)
+{
+ if (ED_space_clip_tracking_poll(C)) {
+ MovieClip *clip = CTX_data_edit_movieclip(C);
+
+ if (clip) {
+ SpaceClip *sc = CTX_wm_space_clip(C);
+ int width, height;
+
+ BKE_movieclip_get_size(clip, &sc->user, &width, &height);
+
+ return width > 0 && height > 0;
+ }
+ }
+
+ return FALSE;
+}
+
+int ED_space_clip_tracking_frame_poll(bContext *C)
+{
+ if (ED_space_clip_tracking_poll(C)) {
+ MovieClip *clip = CTX_data_edit_movieclip(C);
+
+ if (clip) {
+ SpaceClip *sc = CTX_wm_space_clip(C);
+
+ return BKE_movieclip_has_frame(clip, &sc->user);
+ }
+ }
+
+ return FALSE;
+}
+
+/* ******** editing functions ******** */
+
+void ED_space_clip_set(bContext *C, bScreen *screen, SpaceClip *sc, MovieClip *clip)
{
+ MovieClip *old_clip;
+
+ if (!screen && C)
+ screen = CTX_wm_screen(C);
+
+ old_clip = sc->clip;
sc->clip = clip;
- if (sc->clip && sc->clip->id.us==0)
+ if (sc->clip && sc->clip->id.us == 0)
sc->clip->id.us = 1;
+ if (screen) {
+ ScrArea *area;
+ SpaceLink *sl;
+
+ for (area = screen->areabase.first; area; area = area->next) {
+ for (sl = area->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_CLIP) {
+ SpaceClip *cur_sc = (SpaceClip *) sl;
+
+ if (cur_sc != sc) {
+ if (cur_sc->clip == old_clip || cur_sc->clip == NULL) {
+ cur_sc->clip = clip;
+ }
+ }
+ }
+ }
+ }
+ }
+
if (C)
- WM_event_add_notifier(C, NC_MOVIECLIP|NA_SELECTED, sc->clip);
+ WM_event_add_notifier(C, NC_MOVIECLIP | NA_SELECTED, sc->clip);
}
MovieClip *ED_space_clip(SpaceClip *sc)
@@ -131,8 +220,8 @@ void ED_space_clip_zoom(SpaceClip *sc, ARegion *ar, float *zoomx, float *zoomy)
ED_space_clip_size(sc, &width, &height);
- *zoomx = (float)(ar->winrct.xmax - ar->winrct.xmin + 1)/(float)((ar->v2d.cur.xmax - ar->v2d.cur.xmin)*width);
- *zoomy = (float)(ar->winrct.ymax - ar->winrct.ymin + 1)/(float)((ar->v2d.cur.ymax - ar->v2d.cur.ymin)*height);
+ *zoomx = (float)(ar->winrct.xmax - ar->winrct.xmin + 1) / (float)((ar->v2d.cur.xmax - ar->v2d.cur.xmin) * width);
+ *zoomy = (float)(ar->winrct.ymax - ar->winrct.ymin + 1) / (float)((ar->v2d.cur.ymax - ar->v2d.cur.ymin) * height);
}
void ED_space_clip_aspect(SpaceClip *sc, float *aspx, float *aspy)
@@ -173,7 +262,7 @@ static int selected_boundbox(SpaceClip *sc, float min[2], float max[2])
MovieClip *clip = ED_space_clip(sc);
MovieTrackingTrack *track;
int width, height, ok = FALSE;
- ListBase *tracksbase= BKE_tracking_get_tracks(&clip->tracking);
+ ListBase *tracksbase = BKE_tracking_get_tracks(&clip->tracking);
INIT_MINMAX2(min, max);
@@ -228,7 +317,8 @@ int ED_clip_view_selection(SpaceClip *sc, ARegion *ar, int fit)
return FALSE;
/* center view */
- clip_view_center_to_point(sc, (max[0]+min[0])/(2*frame_width), (max[1]+min[1])/(2*frame_height));
+ clip_view_center_to_point(sc, (max[0] + min[0]) / (2 * frame_width),
+ (max[1] + min[1]) / (2 * frame_height));
w = max[0] - min[0];
h = max[1] - min[1];
@@ -248,7 +338,7 @@ int ED_clip_view_selection(SpaceClip *sc, ARegion *ar, int fit)
newzoom = 1.0f / power_of_2(1.0f / MIN2(zoomx, zoomy));
- if (fit || sc->zoom>newzoom)
+ if (fit || sc->zoom > newzoom)
sc->zoom = newzoom;
}
@@ -314,3 +404,152 @@ void ED_clip_mouse_pos(bContext *C, wmEvent *event, float co[2])
{
ED_clip_point_stable_pos(C, event->mval[0], event->mval[1], &co[0], &co[1]);
}
+
+/* OpenGL draw context */
+
+typedef struct SpaceClipDrawContext {
+ int support_checked, buffers_supported;
+
+ GLuint texture; /* OGL texture ID */
+ short texture_allocated; /* flag if texture was allocated by glGenTextures */
+ struct ImBuf *texture_ibuf; /* image buffer for which texture was created */
+ int image_width, image_height; /* image width and height for which texture was created */
+ unsigned last_texture; /* ID of previously used texture, so it'll be restored after clip drawing */
+ int framenr;
+} SpaceClipDrawContext;
+
+int ED_space_clip_texture_buffer_supported(SpaceClip *sc)
+{
+ SpaceClipDrawContext *context = sc->draw_context;
+
+ if (!context) {
+ context = MEM_callocN(sizeof(SpaceClipDrawContext), "SpaceClipDrawContext");
+ sc->draw_context = context;
+ }
+
+ if (!context->support_checked) {
+ context->support_checked = TRUE;
+ if (GPU_type_matches(GPU_DEVICE_INTEL, GPU_OS_ANY, GPU_DRIVER_ANY)) {
+ context->buffers_supported = FALSE;
+ }
+ else {
+ context->buffers_supported = GPU_non_power_of_two_support();
+ }
+ }
+
+ return context->buffers_supported;
+}
+
+int ED_space_clip_load_movieclip_buffer(SpaceClip *sc, ImBuf *ibuf)
+{
+ SpaceClipDrawContext *context = sc->draw_context;
+ MovieClip *clip = ED_space_clip(sc);
+ int need_rebind = 0;
+
+ context->last_texture = glaGetOneInteger(GL_TEXTURE_2D);
+
+ /* image texture need to be rebinded if displaying another image buffer
+ * assuming displaying happens of footage frames only on which painting doesn't heppen.
+ * so not changed image buffer pointer means unchanged image content */
+ need_rebind |= context->texture_ibuf != ibuf;
+ need_rebind |= context->framenr != sc->user.framenr;
+
+ if (need_rebind) {
+ int width = ibuf->x, height = ibuf->y;
+ float *frect = NULL, *fscalerect = NULL;
+ unsigned int *rect = NULL, *scalerect = NULL;
+ int need_recreate = 0;
+
+ if (width > GL_MAX_TEXTURE_SIZE || height > GL_MAX_TEXTURE_SIZE)
+ return 0;
+
+ rect = ibuf->rect;
+ frect = ibuf->rect_float;
+
+ /* if image resolution changed (e.g. switched to proxy display) texture need to be recreated */
+ need_recreate = context->image_width != ibuf->x || context->image_height != ibuf->y;
+
+ if (context->texture_ibuf && need_recreate) {
+ glDeleteTextures(1, &context->texture);
+ context->texture_allocated = 0;
+ }
+
+ if (need_recreate || !context->texture_allocated) {
+ /* texture doesn't exist yet or need to be re-allocated because of changed dimensions */
+ int filter = GL_LINEAR;
+
+ /* non-scaled proxy shouldn;t use diltering */
+ if ((clip->flag & MCLIP_USE_PROXY) == 0 ||
+ ELEM(sc->user.render_size, MCLIP_PROXY_RENDER_SIZE_FULL, MCLIP_PROXY_RENDER_SIZE_100))
+ {
+ filter = GL_NEAREST;
+ }
+
+ glGenTextures(1, &context->texture);
+ glBindTexture(GL_TEXTURE_2D, context->texture);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filter);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filter);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
+ }
+ else {
+ /* if texture doesn't need to be reallocated itself, just bind it so
+ * loading of image will happen to a proper texture */
+ glBindTexture(GL_TEXTURE_2D, context->texture);
+ }
+
+ if (frect)
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16, width, height, 0, GL_RGBA, GL_FLOAT, frect);
+ else
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, rect);
+
+ /* store settings */
+ context->texture_allocated = 1;
+ context->texture_ibuf = ibuf;
+ context->image_width = ibuf->x;
+ context->image_height = ibuf->y;
+ context->framenr = sc->user.framenr;
+
+ if (fscalerect)
+ MEM_freeN(fscalerect);
+ if (scalerect)
+ MEM_freeN(scalerect);
+ }
+ else {
+ /* displaying exactly the same image which was loaded t oa texture,
+ * just bint texture in this case */
+ glBindTexture(GL_TEXTURE_2D, context->texture);
+ }
+
+ glEnable(GL_TEXTURE_2D);
+
+ return TRUE;
+}
+
+void ED_space_clip_unload_movieclip_buffer(SpaceClip *sc)
+{
+ SpaceClipDrawContext *context = sc->draw_context;
+
+ glBindTexture(GL_TEXTURE_2D, context->last_texture);
+ glDisable(GL_TEXTURE_2D);
+}
+
+void ED_space_clip_free_texture_buffer(SpaceClip *sc)
+{
+ SpaceClipDrawContext *context = sc->draw_context;
+
+ if (context) {
+ glDeleteTextures(1, &context->texture);
+
+ MEM_freeN(context);
+ }
+}
+
+int ED_space_clip_show_trackedit(SpaceClip *sc)
+{
+ if (sc) {
+ return ELEM3(sc->mode, SC_MODE_TRACKING, SC_MODE_RECONSTRUCTION, SC_MODE_DISTORTION);
+ }
+
+ return FALSE;
+}
diff --git a/source/blender/editors/space_clip/clip_graph_draw.c b/source/blender/editors/space_clip/clip_graph_draw.c
index df14491c9c9..853a7d7cad1 100644
--- a/source/blender/editors/space_clip/clip_graph_draw.c
+++ b/source/blender/editors/space_clip/clip_graph_draw.c
@@ -61,7 +61,7 @@
static void draw_curve_knot(float x, float y, float xscale, float yscale, float hsize)
{
- static GLuint displist=0;
+ static GLuint displist = 0;
/* initialize round circle shape */
if (displist == 0) {
@@ -81,66 +81,12 @@ static void draw_curve_knot(float x, float y, float xscale, float yscale, float
glPushMatrix();
glTranslatef(x, y, 0.0f);
- glScalef(1.0f/xscale*hsize, 1.0f/yscale*hsize, 1.0f);
+ glScalef(1.0f / xscale * hsize, 1.0f / yscale * hsize, 1.0f);
glCallList(displist);
glPopMatrix();
}
-static void draw_graph_cfra(SpaceClip *sc, ARegion *ar, Scene *scene)
-{
- View2D *v2d = &ar->v2d;
- float xscale, yscale;
- float vec[2];
-
- /* Draw a light green line to indicate current frame */
- vec[0] = (float)(sc->user.framenr * scene->r.framelen);
-
- UI_ThemeColor(TH_CFRAME);
- glLineWidth(2.0);
-
- glBegin(GL_LINE_STRIP);
- vec[1] = v2d->cur.ymin;
- glVertex2fv(vec);
-
- vec[1] = v2d->cur.ymax;
- glVertex2fv(vec);
- glEnd();
-
- glLineWidth(1.0);
-
- UI_view2d_view_orthoSpecial(ar, v2d, 1);
-
- /* because the frame number text is subject to the same scaling as the contents of the view */
- UI_view2d_getscale(v2d, &xscale, &yscale);
- glScalef(1.0f/xscale, 1.0f, 1.0f);
-
- clip_draw_curfra_label(sc, (float)sc->user.framenr * xscale, 18);
-
- /* restore view transform */
- glScalef(xscale, 1.0, 1.0);
-}
-
-static void draw_graph_sfra_efra(Scene *scene, View2D *v2d)
-{
- UI_view2d_view_ortho(v2d);
-
- /* currently clip editor supposes that editing clip length is equal to scene frame range */
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- glEnable(GL_BLEND);
- glColor4f(0.0f, 0.0f, 0.0f, 0.4f);
-
- glRectf(v2d->cur.xmin, v2d->cur.ymin, (float)SFRA, v2d->cur.ymax);
- glRectf((float)EFRA, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax);
- glDisable(GL_BLEND);
-
- UI_ThemeColorShade(TH_BACK, -60);
-
- /* thin lines where the actual frames are */
- fdrawline((float)SFRA, v2d->cur.ymin, (float)SFRA, v2d->cur.ymax);
- fdrawline((float)EFRA, v2d->cur.ymin, (float)EFRA, v2d->cur.ymax);
-}
-
static void tracking_segment_point_cb(void *UNUSED(userdata), MovieTrackingTrack *UNUSED(track),
MovieTrackingMarker *marker, int UNUSED(coord), float val)
{
@@ -155,7 +101,7 @@ void tracking_segment_start_cb(void *userdata, MovieTrackingTrack *track, int co
copy_v3_v3(col, colors[coord]);
- if (track==userdata) {
+ if (track == userdata) {
col[3] = 1.0f;
glLineWidth(2.0f);
}
@@ -180,7 +126,7 @@ static void tracking_segment_knot_cb(void *userdata, MovieTrackingTrack *track,
MovieTrackingMarker *marker, int coord, float val)
{
struct { MovieTrackingTrack *act_track; int sel; float xscale, yscale, hsize; } *data = userdata;
- int sel= 0, sel_flag;
+ int sel = 0, sel_flag;
if (track != data->act_track)
return;
@@ -220,11 +166,12 @@ static void draw_tracks_curves(View2D *v2d, SpaceClip *sc)
/* draw graph lines */
glEnable(GL_BLEND);
- clip_graph_tracking_values_iterate(sc, act_track, tracking_segment_point_cb, tracking_segment_start_cb, tracking_segment_end_cb);
+ clip_graph_tracking_values_iterate(sc, act_track, tracking_segment_point_cb,
+ tracking_segment_start_cb, tracking_segment_end_cb);
glDisable(GL_BLEND);
/* selected knot handles on top of curves */
- userdata.sel= TRUE;
+ userdata.sel = TRUE;
clip_graph_tracking_values_iterate(sc, &userdata, tracking_segment_knot_cb, NULL, NULL);
}
@@ -237,10 +184,10 @@ static void draw_frame_curves(SpaceClip *sc)
glColor3f(0.0f, 0.0f, 1.0f);
- for (i = 0; i<reconstruction->camnr; i++) {
+ for (i = 0; i < reconstruction->camnr; i++) {
MovieReconstructedCamera *camera = &reconstruction->cameras[i];
- if (lines && camera->framenr!=prevfra+1) {
+ if (lines && camera->framenr != prevfra + 1) {
glEnd();
lines = 0;
}
@@ -280,8 +227,8 @@ void clip_draw_graph(SpaceClip *sc, ARegion *ar, Scene *scene)
}
/* frame range */
- draw_graph_sfra_efra(scene, v2d);
+ clip_draw_sfra_efra(v2d, scene);
/* current frame */
- draw_graph_cfra(sc, ar, scene);
+ clip_draw_cfra(sc, ar, scene);
}
diff --git a/source/blender/editors/space_clip/clip_graph_ops.c b/source/blender/editors/space_clip/clip_graph_ops.c
index f8c81c2944a..10692ada5d9 100644
--- a/source/blender/editors/space_clip/clip_graph_ops.c
+++ b/source/blender/editors/space_clip/clip_graph_ops.c
@@ -63,15 +63,13 @@
static int ED_space_clip_graph_poll(bContext *C)
{
- SpaceClip *sc = CTX_wm_space_clip(C);
-
- if (sc && sc->clip) {
- ARegion *ar = CTX_wm_region(C);
+ if (ED_space_clip_tracking_poll(C)) {
+ SpaceClip *sc = CTX_wm_space_clip(C);
- return ar->regiontype == RGN_TYPE_PREVIEW;
+ return sc->view == SC_VIEW_GRAPH;
}
- return 0;
+ return FALSE;
}
typedef struct {
@@ -82,7 +80,7 @@ static void toggle_selection_cb(void *userdata, MovieTrackingMarker *marker)
{
SelectUserData *data = (SelectUserData *)userdata;
- switch(data->action) {
+ switch (data->action) {
case SEL_SELECT:
marker->flag |= MARKER_GRAPH_SEL;
break;
@@ -146,7 +144,7 @@ static void find_nearest_tracking_knot_cb(void *userdata, MovieTrackingTrack *tr
float d = dx * dx + dy * dy;
if (data->marker == NULL || d < data->min_dist) {
- float co[2]= {marker->framenr, val};
+ float co[2] = {marker->framenr, val};
data->track = track;
data->marker = marker;
@@ -167,7 +165,7 @@ static void mouse_select_init_data(MouseSelectUserData *userdata, float *co)
static int mouse_select_knot(bContext *C, float co[2], int extend)
{
SpaceClip *sc = CTX_wm_space_clip(C);
- MovieClip *clip= ED_space_clip(sc);
+ MovieClip *clip = ED_space_clip(sc);
ARegion *ar = CTX_wm_region(C);
View2D *v2d = &ar->v2d;
MovieTracking *tracking = &clip->tracking;
@@ -227,16 +225,10 @@ static int mouse_select_curve(bContext *C, float co[2], int extend)
}
}
else if (act_track != userdata.track) {
- MovieTrackingMarker *marker;
SelectUserData selectdata = {SEL_DESELECT};
tracking->act_track = userdata.track;
- /* make active track be centered to screen */
- marker = BKE_tracking_get_marker(userdata.track, sc->user.framenr);
-
- clip_view_center_to_point(sc, marker->pos[0], marker->pos[1]);
-
/* deselect all knots on newly selected curve */
clip_graph_tracking_iterate(sc, &selectdata, toggle_selection_cb);
}
@@ -260,7 +252,7 @@ static int mouse_select(bContext *C, float co[2], int extend)
}
if (sel)
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, NULL);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, NULL);
return OPERATOR_FINISHED;
}
@@ -336,7 +328,7 @@ static void border_select_cb(void *userdata, MovieTrackingTrack *UNUSED(track),
data->change = TRUE;
}
else if (!data->extend) {
- marker->flag&= ~MARKER_GRAPH_SEL;
+ marker->flag &= ~MARKER_GRAPH_SEL;
}
}
@@ -366,7 +358,7 @@ static int border_select_graph_exec(bContext *C, wmOperator *op)
clip_graph_tracking_values_iterate_track(sc, act_track, &userdata, border_select_cb, NULL, NULL);
if (userdata.change) {
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, NULL);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, NULL);
return OPERATOR_FINISHED;
}
@@ -438,7 +430,7 @@ static int graph_select_all_markers_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, NULL);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, NULL);
return OPERATOR_FINISHED;
}
@@ -455,7 +447,7 @@ void CLIP_OT_graph_select_all_markers(wmOperatorType *ot)
ot->poll = ED_space_clip_graph_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
WM_operator_properties_select_all(ot);
}
@@ -486,10 +478,10 @@ void CLIP_OT_graph_delete_curve(wmOperatorType *ot)
/* api callbacks */
ot->invoke = WM_operator_confirm;
ot->exec = delete_curve_exec;
- ot->poll = ED_space_clip_poll;
+ ot->poll = ED_space_clip_tracking_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/******************** delete knot operator ********************/
@@ -497,7 +489,7 @@ void CLIP_OT_graph_delete_curve(wmOperatorType *ot)
static int delete_knot_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceClip *sc = CTX_wm_space_clip(C);
- MovieClip *clip= ED_space_clip(sc);
+ MovieClip *clip = ED_space_clip(sc);
MovieTracking *tracking = &clip->tracking;
ListBase *tracksbase = BKE_tracking_get_tracks(tracking);
MovieTrackingTrack *act_track = BKE_tracking_active_track(tracking);
@@ -530,7 +522,7 @@ void CLIP_OT_graph_delete_knot(wmOperatorType *ot)
ot->poll = ED_space_clip_graph_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/******************** view all operator ********************/
@@ -659,9 +651,9 @@ static int graph_disable_markers_exec(bContext *C, wmOperator *op)
marker = &act_track->markers[a];
if (marker->flag & MARKER_GRAPH_SEL) {
- if (action==0)
+ if (action == 0)
marker->flag |= MARKER_DISABLED;
- else if (action==1)
+ else if (action == 1)
marker->flag &= ~MARKER_DISABLED;
else
marker->flag ^= MARKER_DISABLED;
@@ -670,7 +662,7 @@ static int graph_disable_markers_exec(bContext *C, wmOperator *op)
DAG_id_tag_update(&clip->id, 0);
- WM_event_add_notifier(C, NC_MOVIECLIP|NA_EVALUATED, clip);
+ WM_event_add_notifier(C, NC_MOVIECLIP | NA_EVALUATED, clip);
return OPERATOR_FINISHED;
}
@@ -694,7 +686,7 @@ void CLIP_OT_graph_disable_markers(wmOperatorType *ot)
ot->poll = ED_space_clip_graph_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "action", actions_items, 0, "Action", "Disable action to execute");
diff --git a/source/blender/editors/space_clip/clip_intern.h b/source/blender/editors/space_clip/clip_intern.h
index 425a1da9ec5..f32cb1651a1 100644
--- a/source/blender/editors/space_clip/clip_intern.h
+++ b/source/blender/editors/space_clip/clip_intern.h
@@ -38,14 +38,36 @@ struct MovieClip;
struct MovieTrackingMarker;
struct MovieTrackingTrack;
struct Scene;
+struct ScrArea;
struct SpaceClip;
struct wmOperatorType;
+/* channel heights */
+#define CHANNEL_FIRST -UI_UNIT_Y
+#define CHANNEL_HEIGHT UI_UNIT_Y
+#define CHANNEL_HEIGHT_HALF (UI_UNIT_Y / 2.0f)
+#define CHANNEL_SKIP 2
+#define CHANNEL_STEP (CHANNEL_HEIGHT + CHANNEL_SKIP)
+
+#define CHANNEL_PAD 4
+
+/* extra padding for lengths (to go under scrollers) */
+#define EXTRA_SCROLL_PAD 100.0f
+
+#define STRIP_HEIGHT_HALF 5
+
/* internal exports only */
/* clip_buttons.c */
void ED_clip_buttons_register(struct ARegionType *art);
+/* clip_dopesheet_draw.c */
+void clip_draw_dopesheet_main(struct SpaceClip *sc, struct ARegion *ar, struct Scene *scene);
+void clip_draw_dopesheet_channels(const struct bContext *C, struct ARegion *ar);
+
+/* clip_dopesheet_ops.c */
+void CLIP_OT_dopesheet_select_channel(struct wmOperatorType *ot);
+
/* clip_draw.c */
void clip_draw_main(struct SpaceClip *sc, struct ARegion *ar, struct Scene *scene);
void clip_draw_grease_pencil(struct bContext *C, int onlyv2d);
@@ -81,6 +103,7 @@ void CLIP_OT_rebuild_proxy(struct wmOperatorType *ot);
void CLIP_OT_mode_set(struct wmOperatorType *ot);
/* clip_toolbar.c */
+struct ARegion *ED_clip_has_properties_region(struct ScrArea *sa);
void CLIP_OT_tools(struct wmOperatorType *ot);
void CLIP_OT_properties(struct wmOperatorType *ot);
void ED_clip_tool_props_register(struct ARegionType *art);
@@ -104,6 +127,9 @@ void clip_delete_marker(struct bContext *C, struct MovieClip *clip, struct ListB
void clip_view_center_to_point(struct SpaceClip *sc, float x, float y);
+void clip_draw_cfra(struct SpaceClip *sc, struct ARegion *ar, struct Scene *scene);
+void clip_draw_sfra_efra(struct View2D *v2d, struct Scene *scene);
+
/* tracking_ops.c */
void CLIP_OT_select(struct wmOperatorType *ot);
void CLIP_OT_select_all(struct wmOperatorType *ot);
diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c
index 7e1bbc254e9..117e599cbbb 100644
--- a/source/blender/editors/space_clip/clip_ops.c
+++ b/source/blender/editors/space_clip/clip_ops.c
@@ -93,8 +93,8 @@ static void sclip_zoom_set(SpaceClip *sc, ARegion *ar, float zoom, float locatio
if ((U.uiflag & USER_ZOOM_TO_MOUSEPOS) && location) {
ED_space_clip_size(sc, &width, &height);
- sc->xof += ((location[0] - 0.5f) * width-sc->xof) * (sc->zoom-oldzoom) / sc->zoom;
- sc->yof += ((location[1] - 0.5f) * height-sc->yof) * (sc->zoom-oldzoom) / sc->zoom;
+ sc->xof += ((location[0] - 0.5f) * width - sc->xof) * (sc->zoom - oldzoom) / sc->zoom;
+ sc->yof += ((location[1] - 0.5f) * height - sc->yof) * (sc->zoom - oldzoom) / sc->zoom;
}
}
@@ -147,6 +147,7 @@ static int open_cancel(bContext *UNUSED(C), wmOperator *op)
static int open_exec(bContext *C, wmOperator *op)
{
SpaceClip *sc = CTX_wm_space_clip(C);
+ bScreen *screen = CTX_wm_screen(C);
PropertyPointerRNA *pprop;
PointerRNA idptr;
MovieClip *clip = NULL;
@@ -157,13 +158,14 @@ static int open_exec(bContext *C, wmOperator *op)
errno = 0;
- clip = BKE_add_movieclip_file(str);
+ clip = BKE_movieclip_file_add(str);
if (!clip) {
if (op->customdata)
MEM_freeN(op->customdata);
- BKE_reportf(op->reports, RPT_ERROR, "Can't read: \"%s\", %s.", str, errno ? strerror(errno) : "Unsupported movie clip format");
+ BKE_reportf(op->reports, RPT_ERROR, "Can't read: \"%s\", %s.", str,
+ errno ? strerror(errno) : "Unsupported movie clip format");
return OPERATOR_CANCELLED;
}
@@ -184,10 +186,10 @@ static int open_exec(bContext *C, wmOperator *op)
RNA_property_update(C, &pprop->ptr, pprop->prop);
}
else if (sc) {
- ED_space_clip_set(C, sc, clip);
+ ED_space_clip_set(C, screen, sc, clip);
}
- WM_event_add_notifier(C, NC_MOVIECLIP|NA_ADDED, clip);
+ WM_event_add_notifier(C, NC_MOVIECLIP | NA_ADDED, clip);
MEM_freeN(op->customdata);
@@ -232,10 +234,11 @@ void CLIP_OT_open(wmOperatorType *ot)
ot->cancel = open_cancel;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
- WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH|WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
+ WM_operator_properties_filesel(ot, FOLDERFILE | IMAGEFILE | MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE,
+ WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
}
/******************* reload clip operator *********************/
@@ -249,7 +252,7 @@ static int reload_exec(bContext *C, wmOperator *UNUSED(op))
BKE_movieclip_reload(clip);
- WM_event_add_notifier(C, NC_MOVIECLIP|NA_EDITED, clip);
+ WM_event_add_notifier(C, NC_MOVIECLIP | NA_EDITED, clip);
return OPERATOR_FINISHED;
}
@@ -286,14 +289,14 @@ static void view_pan_init(bContext *C, wmOperator *op, wmEvent *event)
vpd->y = event->y;
if (sc->flag & SC_LOCK_SELECTION)
- vpd->vec= &sc->xlockof;
+ vpd->vec = &sc->xlockof;
else
- vpd->vec= &sc->xof;
+ vpd->vec = &sc->xof;
copy_v2_v2(&vpd->xof, vpd->vec);
copy_v2_v2(&vpd->xorig, &vpd->xof);
- vpd->event_type= event->type;
+ vpd->event_type = event->type;
WM_event_add_modal_handler(C, op);
}
@@ -361,7 +364,7 @@ static int view_pan_modal(bContext *C, wmOperator *op, wmEvent *event)
ViewPanData *vpd = op->customdata;
float offset[2];
- switch(event->type) {
+ switch (event->type) {
case MOUSEMOVE:
copy_v2_v2(vpd->vec, &vpd->xorig);
offset[0] = (vpd->x - event->x) / sc->zoom;
@@ -401,13 +404,14 @@ void CLIP_OT_view_pan(wmOperatorType *ot)
/* identifiers */
ot->name = "View Pan";
ot->idname = "CLIP_OT_view_pan";
+ ot->description = "Pan the view";
/* api callbacks */
ot->exec = view_pan_exec;
ot->invoke = view_pan_invoke;
ot->modal = view_pan_modal;
ot->cancel = view_pan_cancel;
- ot->poll = ED_space_clip_poll;
+ ot->poll = ED_space_clip_view_clip_poll;
/* flags */
ot->flag = OPTYPE_BLOCKING;
@@ -431,7 +435,7 @@ static void view_zoom_init(bContext *C, wmOperator *op, wmEvent *event)
SpaceClip *sc = CTX_wm_space_clip(C);
ViewZoomData *vpd;
- op->customdata= vpd= MEM_callocN(sizeof(ViewZoomData), "ClipViewZoomData");
+ op->customdata = vpd = MEM_callocN(sizeof(ViewZoomData), "ClipViewZoomData");
WM_cursor_modal(CTX_wm_window(C), BC_NSEW_SCROLLCURSOR);
vpd->x = event->x;
@@ -496,9 +500,9 @@ static int view_zoom_modal(bContext *C, wmOperator *op, wmEvent *event)
ViewZoomData *vpd = op->customdata;
float factor;
- switch(event->type) {
+ switch (event->type) {
case MOUSEMOVE:
- factor = 1.0f + (vpd->x-event->x + vpd->y - event->y) / 300.0f;
+ factor = 1.0f + (vpd->x - event->x + vpd->y - event->y) / 300.0f;
RNA_float_set(op->ptr, "factor", factor);
sclip_zoom_set(sc, ar, vpd->zoom * factor, vpd->location);
ED_region_tag_redraw(CTX_wm_region(C));
@@ -527,16 +531,17 @@ void CLIP_OT_view_zoom(wmOperatorType *ot)
/* identifiers */
ot->name = "View Zoom";
ot->idname = "CLIP_OT_view_zoom";
+ ot->description = "Zoom in/out the view";
/* api callbacks */
ot->exec = view_zoom_exec;
ot->invoke = view_zoom_invoke;
ot->modal = view_zoom_modal;
ot->cancel = view_zoom_cancel;
- ot->poll = ED_space_clip_poll;
+ ot->poll = ED_space_clip_view_clip_poll;
/* flags */
- ot->flag = OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER;
+ ot->flag = OPTYPE_BLOCKING | OPTYPE_GRAB_POINTER;
/* properties */
RNA_def_float(ot->srna, "factor", 0.0f, 0.0f, FLT_MAX,
@@ -575,14 +580,16 @@ void CLIP_OT_view_zoom_in(wmOperatorType *ot)
/* identifiers */
ot->name = "View Zoom In";
ot->idname = "CLIP_OT_view_zoom_in";
+ ot->description = "Zoom in the view";
/* api callbacks */
ot->exec = view_zoom_in_exec;
ot->invoke = view_zoom_in_invoke;
- ot->poll = ED_space_clip_poll;
+ ot->poll = ED_space_clip_view_clip_poll;
/* properties */
- RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX, "Location", "Cursor location in screen coordinates", -10.0f, 10.0f);
+ RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX, "Location",
+ "Cursor location in screen coordinates", -10.0f, 10.0f);
}
static int view_zoom_out_exec(bContext *C, wmOperator *op)
@@ -615,14 +622,16 @@ void CLIP_OT_view_zoom_out(wmOperatorType *ot)
/* identifiers */
ot->name = "View Zoom Out";
ot->idname = "CLIP_OT_view_zoom_out";
+ ot->description = "Zoom out the view";
/* api callbacks */
ot->exec = view_zoom_out_exec;
ot->invoke = view_zoom_out_invoke;
- ot->poll = ED_space_clip_poll;
+ ot->poll = ED_space_clip_view_clip_poll;
/* properties */
- RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX, "Location", "Cursor location in normalised (0.0-1.0) coordinates", -10.0f, 10.0f);
+ RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX, "Location",
+ "Cursor location in normalised (0.0-1.0) coordinates", -10.0f, 10.0f);
}
/********************** view zoom ratio operator *********************/
@@ -635,8 +644,8 @@ static int view_zoom_ratio_exec(bContext *C, wmOperator *op)
sclip_zoom_set(sc, ar, RNA_float_get(op->ptr, "ratio"), NULL);
/* ensure pixel exact locations for draw */
- sc->xof= (int) sc->xof;
- sc->yof= (int) sc->yof;
+ sc->xof = (int) sc->xof;
+ sc->yof = (int) sc->yof;
ED_region_tag_redraw(CTX_wm_region(C));
@@ -648,10 +657,11 @@ void CLIP_OT_view_zoom_ratio(wmOperatorType *ot)
/* identifiers */
ot->name = "View Zoom Ratio";
ot->idname = "CLIP_OT_view_zoom_ratio";
+ ot->description = "Set the zoom ratio (based on clip size)";
/* api callbacks */
ot->exec = view_zoom_ratio_exec;
- ot->poll = ED_space_clip_poll;
+ ot->poll = ED_space_clip_view_clip_poll;
/* properties */
RNA_def_float(ot->srna, "ratio", 0.0f, 0.0f, FLT_MAX,
@@ -666,7 +676,7 @@ static int view_all_exec(bContext *C, wmOperator *op)
ARegion *ar;
int w, h, width, height;
float aspx, aspy;
- int fit_view= RNA_boolean_get(op->ptr, "fit_view");
+ int fit_view = RNA_boolean_get(op->ptr, "fit_view");
float zoomx, zoomy;
/* retrieve state */
@@ -679,25 +689,25 @@ static int view_all_exec(bContext *C, wmOperator *op)
w = w * aspx;
h = h * aspy;
- /* check if the image will fit in the image with zoom==1 */
+ /* check if the image will fit in the image with zoom == 1 */
width = ar->winrct.xmax - ar->winrct.xmin + 1;
height = ar->winrct.ymax - ar->winrct.ymin + 1;
if (fit_view) {
const int margin = 5; /* margin from border */
- zoomx= (float) width / (w + 2 * margin);
- zoomy= (float) height / (h + 2 * margin);
+ zoomx = (float) width / (w + 2 * margin);
+ zoomy = (float) height / (h + 2 * margin);
sclip_zoom_set(sc, ar, MIN2(zoomx, zoomy), NULL);
}
else {
if ((w >= width || h >= height) && (width > 0 && height > 0)) {
- zoomx= (float) width / w;
- zoomy= (float) height / h;
+ zoomx = (float) width / w;
+ zoomy = (float) height / h;
/* find the zoom value that will fit the image in the image space */
- sclip_zoom_set(sc, ar, 1.0f/power_of_2(1/MIN2(zoomx, zoomy)), NULL);
+ sclip_zoom_set(sc, ar, 1.0f / power_of_2(1.0f / MIN2(zoomx, zoomy)), NULL);
}
else
sclip_zoom_set(sc, ar, 1.0f, NULL);
@@ -715,10 +725,11 @@ void CLIP_OT_view_all(wmOperatorType *ot)
/* identifiers */
ot->name = "View All";
ot->idname = "CLIP_OT_view_all";
+ ot->description = "View whole image with markers";
/* api callbacks */
ot->exec = view_all_exec;
- ot->poll = ED_space_clip_poll;
+ ot->poll = ED_space_clip_view_clip_poll;
/* properties */
RNA_def_boolean(ot->srna, "fit_view", 0, "Fit View", "Fit frame to the viewport");
@@ -745,10 +756,11 @@ void CLIP_OT_view_selected(wmOperatorType *ot)
/* identifiers */
ot->name = "View Selected";
ot->idname = "CLIP_OT_view_selected";
+ ot->description = "View all selected elements";
/* api callbacks */
ot->exec = view_selected_exec;
- ot->poll = ED_space_clip_poll;
+ ot->poll = ED_space_clip_view_clip_poll;
}
/********************** change frame operator *********************/
@@ -773,7 +785,7 @@ static void change_frame_apply(bContext *C, wmOperator *op)
/* do updates */
sound_seek_scene(CTX_data_main(C), CTX_data_scene(C));
- WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene);
}
static int change_frame_exec(bContext *C, wmOperator *op)
@@ -799,7 +811,7 @@ static int frame_from_event(bContext *C, wmEvent *event)
UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &viewx, &viewy);
- framenr= (int) floor(viewx + 0.5f);
+ framenr = (int) floor(viewx + 0.5f);
}
return framenr;
@@ -859,7 +871,7 @@ void CLIP_OT_change_frame(wmOperatorType *ot)
ot->poll = change_frame_poll;
/* flags */
- ot->flag = OPTYPE_BLOCKING|OPTYPE_UNDO;
+ ot->flag = OPTYPE_BLOCKING | OPTYPE_UNDO;
/* rna */
RNA_def_int(ot->srna, "frame", 0, MINAFRAME, MAXFRAME, "Frame", "", MINAFRAME, MAXFRAME);
@@ -877,7 +889,7 @@ typedef struct ProxyBuildJob {
static void proxy_freejob(void *pjv)
{
- ProxyJob *pj= pjv;
+ ProxyJob *pj = pjv;
MEM_freeN(pj);
}
@@ -896,16 +908,16 @@ static int proxy_bitflag_to_array(int size_flag, int build_sizes[4], int undisto
int size_nr = undistort ? 1 : 0;
if (size_flag & size_flags[size_nr][0])
- build_sizes[build_count++]= MCLIP_PROXY_RENDER_SIZE_25;
+ build_sizes[build_count++] = MCLIP_PROXY_RENDER_SIZE_25;
if (size_flag & size_flags[size_nr][1])
- build_sizes[build_count++]= MCLIP_PROXY_RENDER_SIZE_50;
+ build_sizes[build_count++] = MCLIP_PROXY_RENDER_SIZE_50;
if (size_flag & size_flags[size_nr][2])
- build_sizes[build_count++]= MCLIP_PROXY_RENDER_SIZE_75;
+ build_sizes[build_count++] = MCLIP_PROXY_RENDER_SIZE_75;
if (size_flag & size_flags[size_nr][3])
- build_sizes[build_count++]= MCLIP_PROXY_RENDER_SIZE_100;
+ build_sizes[build_count++] = MCLIP_PROXY_RENDER_SIZE_100;
return build_count;
}
@@ -950,13 +962,14 @@ static void proxy_startjob(void *pjv, short *stop, short *do_update, float *prog
if (clip->source != MCLIP_SRC_MOVIE)
BKE_movieclip_build_proxy_frame(clip, pj->clip_flag, NULL, cfra, build_sizes, build_count, 0);
- BKE_movieclip_build_proxy_frame(clip, pj->clip_flag, distortion, cfra, build_undistort_sizes, build_undistort_count, 1);
+ BKE_movieclip_build_proxy_frame(clip, pj->clip_flag, distortion, cfra,
+ build_undistort_sizes, build_undistort_count, 1);
if (*stop || G.afbreek)
break;
*do_update = TRUE;
- *progress= ((float) cfra) / (efra - sfra);
+ *progress = ((float) cfra) / (efra - sfra);
}
if (distortion)
@@ -978,7 +991,7 @@ static void proxy_endjob(void *pjv)
BKE_movieclip_reload(pj->clip);
- WM_main_add_notifier(NC_MOVIECLIP|ND_DISPLAY, pj->clip);
+ WM_main_add_notifier(NC_MOVIECLIP | ND_DISPLAY, pj->clip);
}
static int clip_rebuild_proxy_exec(bContext *C, wmOperator *UNUSED(op))
@@ -1007,7 +1020,7 @@ static int clip_rebuild_proxy_exec(bContext *C, wmOperator *UNUSED(op))
}
WM_jobs_customdata(steve, pj, proxy_freejob);
- WM_jobs_timer(steve, 0.2, NC_MOVIECLIP|ND_DISPLAY, 0);
+ WM_jobs_timer(steve, 0.2, NC_MOVIECLIP | ND_DISPLAY, 0);
WM_jobs_callbacks(steve, proxy_startjob, NULL, NULL, proxy_endjob);
G.afbreek = 0;
@@ -1049,7 +1062,7 @@ static int mode_set_exec(bContext *C, wmOperator *op)
sc->mode = mode;
}
- WM_event_add_notifier(C, NC_SPACE|ND_SPACE_CLIP, NULL);
+ WM_event_add_notifier(C, NC_SPACE | ND_SPACE_CLIP, NULL);
return OPERATOR_FINISHED;
}
@@ -1085,14 +1098,15 @@ void ED_operatormacros_clip(void)
wmOperatorType *ot;
wmOperatorTypeMacro *otmacro;
- ot = WM_operatortype_append_macro("CLIP_OT_add_marker_move", "Add Marker and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
- ot->description = "Add new marker and move it on movie";
+ ot = WM_operatortype_append_macro("CLIP_OT_add_marker_move", "Add Marker and Move",
+ "Add new marker and move it on movie", OPTYPE_UNDO | OPTYPE_REGISTER);
WM_operatortype_macro_define(ot, "CLIP_OT_add_marker");
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_struct_idprops_unset(otmacro->ptr, "release_confirm");
- ot = WM_operatortype_append_macro("CLIP_OT_add_marker_slide", "Add Marker and Slide", OPTYPE_UNDO|OPTYPE_REGISTER);
- ot->description = "Add new marker and slide it with mouse until mouse button release";
+ ot = WM_operatortype_append_macro("CLIP_OT_add_marker_slide", "Add Marker and Slide",
+ "Add new marker and slide it with mouse until mouse button release",
+ OPTYPE_UNDO | OPTYPE_REGISTER);
WM_operatortype_macro_define(ot, "CLIP_OT_add_marker");
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_boolean_set(otmacro->ptr, "release_confirm", TRUE);
diff --git a/source/blender/editors/space_clip/clip_toolbar.c b/source/blender/editors/space_clip/clip_toolbar.c
index b80deb8260a..3ffba75f2ef 100644
--- a/source/blender/editors/space_clip/clip_toolbar.c
+++ b/source/blender/editors/space_clip/clip_toolbar.c
@@ -56,7 +56,7 @@
/************************** properties ******************************/
-static ARegion *clip_has_properties_region(ScrArea *sa)
+ARegion *ED_clip_has_properties_region(ScrArea *sa)
{
ARegion *ar, *arnew;
@@ -90,9 +90,9 @@ static int properties_poll(bContext *C)
static int properties_exec(bContext *C, wmOperator *UNUSED(op))
{
ScrArea *sa = CTX_wm_area(C);
- ARegion *ar = clip_has_properties_region(sa);
+ ARegion *ar = ED_clip_has_properties_region(sa);
- if (ar)
+ if (ar && ar->alignment != RGN_ALIGN_NONE)
ED_region_toggle_hidden(C, ar);
return OPERATOR_FINISHED;
@@ -151,7 +151,7 @@ static ARegion *clip_has_tools_region(ScrArea *sa)
BLI_insertlinkafter(&sa->regionbase, artool, arprops);
arprops->regiontype = RGN_TYPE_TOOL_PROPS;
- arprops->alignment = RGN_ALIGN_BOTTOM|RGN_SPLIT_PREV;
+ arprops->alignment = RGN_ALIGN_BOTTOM | RGN_SPLIT_PREV;
}
return artool;
@@ -167,7 +167,7 @@ static int tools_exec(bContext *C, wmOperator *UNUSED(op))
ScrArea *sa = CTX_wm_area(C);
ARegion *ar = clip_has_tools_region(sa);
- if (ar)
+ if (ar && ar->alignment != RGN_ALIGN_NONE)
ED_region_toggle_hidden(C, ar);
return OPERATOR_FINISHED;
diff --git a/source/blender/editors/space_clip/clip_utils.c b/source/blender/editors/space_clip/clip_utils.c
index 443a1d0cdd3..4142c30d825 100644
--- a/source/blender/editors/space_clip/clip_utils.c
+++ b/source/blender/editors/space_clip/clip_utils.c
@@ -29,6 +29,7 @@
* \ingroup spclip
*/
+#include "DNA_scene_types.h"
#include "DNA_object_types.h" /* SELECT */
#include "MEM_guardedalloc.h"
@@ -42,6 +43,9 @@
#include "BKE_tracking.h"
#include "BKE_depsgraph.h"
+#include "BIF_gl.h"
+#include "BIF_glutil.h"
+
#include "WM_api.h"
#include "WM_types.h"
@@ -53,6 +57,8 @@
#include "RNA_access.h"
#include "RNA_define.h"
+#include "UI_interface.h"
+#include "UI_resources.h"
#include "UI_view2d.h"
#include "clip_intern.h" // own include
@@ -168,7 +174,7 @@ void clip_delete_track(bContext *C, MovieClip *clip, ListBase *tracksbase, Movie
int has_bundle = FALSE, update_stab = FALSE;
- if (track==act_track)
+ if (track == act_track)
tracking->act_track = NULL;
if (track == stab->rot_track) {
@@ -184,20 +190,21 @@ void clip_delete_track(bContext *C, MovieClip *clip, ListBase *tracksbase, Movie
BKE_tracking_free_track(track);
BLI_freelinkN(tracksbase, track);
- WM_event_add_notifier(C, NC_MOVIECLIP|NA_EDITED, clip);
+ WM_event_add_notifier(C, NC_MOVIECLIP | NA_EDITED, clip);
if (update_stab) {
tracking->stabilization.ok = FALSE;
-
- DAG_id_tag_update(&clip->id, 0);
- WM_event_add_notifier(C, NC_MOVIECLIP|ND_DISPLAY, clip);
+ WM_event_add_notifier(C, NC_MOVIECLIP | ND_DISPLAY, clip);
}
+ DAG_id_tag_update(&clip->id, 0);
+
if (has_bundle)
- WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, NULL);
}
-void clip_delete_marker(bContext *C, MovieClip *clip, ListBase *tracksbase, MovieTrackingTrack *track, MovieTrackingMarker *marker)
+void clip_delete_marker(bContext *C, MovieClip *clip, ListBase *tracksbase,
+ MovieTrackingTrack *track, MovieTrackingMarker *marker)
{
if (track->markersnr == 1) {
clip_delete_track(C, clip, tracksbase, track);
@@ -205,7 +212,7 @@ void clip_delete_marker(bContext *C, MovieClip *clip, ListBase *tracksbase, Movi
else {
BKE_tracking_delete_marker(track, marker->framenr);
- WM_event_add_notifier(C, NC_MOVIECLIP|NA_EDITED, clip);
+ WM_event_add_notifier(C, NC_MOVIECLIP | NA_EDITED, clip);
}
}
@@ -220,3 +227,57 @@ void clip_view_center_to_point(SpaceClip *sc, float x, float y)
sc->xof = (x - 0.5f) * width * aspx;
sc->yof = (y - 0.5f) * height * aspy;
}
+
+void clip_draw_cfra(SpaceClip *sc, ARegion *ar, Scene *scene)
+{
+ View2D *v2d = &ar->v2d;
+ float xscale, yscale;
+ float vec[2];
+
+ /* Draw a light green line to indicate current frame */
+ vec[0] = (float)(sc->user.framenr * scene->r.framelen);
+
+ UI_ThemeColor(TH_CFRAME);
+ glLineWidth(2.0);
+
+ glBegin(GL_LINE_STRIP);
+ vec[1] = v2d->cur.ymin;
+ glVertex2fv(vec);
+
+ vec[1] = v2d->cur.ymax;
+ glVertex2fv(vec);
+ glEnd();
+
+ glLineWidth(1.0);
+
+ UI_view2d_view_orthoSpecial(ar, v2d, 1);
+
+ /* because the frame number text is subject to the same scaling as the contents of the view */
+ UI_view2d_getscale(v2d, &xscale, &yscale);
+ glScalef(1.0f / xscale, 1.0f, 1.0f);
+
+ clip_draw_curfra_label(sc, (float)sc->user.framenr * xscale, 18);
+
+ /* restore view transform */
+ glScalef(xscale, 1.0, 1.0);
+}
+
+void clip_draw_sfra_efra(View2D *v2d, Scene *scene)
+{
+ UI_view2d_view_ortho(v2d);
+
+ /* currently clip editor supposes that editing clip length is equal to scene frame range */
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glEnable(GL_BLEND);
+ glColor4f(0.0f, 0.0f, 0.0f, 0.4f);
+
+ glRectf(v2d->cur.xmin, v2d->cur.ymin, (float)SFRA, v2d->cur.ymax);
+ glRectf((float)EFRA, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax);
+ glDisable(GL_BLEND);
+
+ UI_ThemeColorShade(TH_BACK, -60);
+
+ /* thin lines where the actual frames are */
+ fdrawline((float)SFRA, v2d->cur.ymin, (float)SFRA, v2d->cur.ymax);
+ fdrawline((float)EFRA, v2d->cur.ymin, (float)EFRA, v2d->cur.ymax);
+}
diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c
index 228c716e3b6..a3e17d420b3 100644
--- a/source/blender/editors/space_clip/space_clip.c
+++ b/source/blender/editors/space_clip/space_clip.c
@@ -72,31 +72,79 @@
static void init_preview_region(const bContext *C, ARegion *ar)
{
Scene *scene = CTX_data_scene(C);
+ ScrArea *sa = CTX_wm_area(C);
+ SpaceClip *sc = CTX_wm_space_clip(C);
ar->regiontype = RGN_TYPE_PREVIEW;
ar->alignment = RGN_ALIGN_TOP;
ar->flag |= RGN_FLAG_HIDDEN;
- ar->v2d.tot.xmin = 0.0f;
- ar->v2d.tot.ymin = -10.0f;
- ar->v2d.tot.xmax = (float)scene->r.efra;
- ar->v2d.tot.ymax = 10.0f;
+ if (sc->view == SC_VIEW_DOPESHEET) {
+ ar->v2d.tot.xmin = -10.0f;
+ ar->v2d.tot.ymin = (float)(-sa->winy) / 3.0f;
+ ar->v2d.tot.xmax = (float)(sa->winx);
+ ar->v2d.tot.ymax = 0.0f;
+
+ ar->v2d.cur = ar->v2d.tot;
+
+ ar->v2d.min[0] = 0.0f;
+ ar->v2d.min[1] = 0.0f;
+
+ ar->v2d.max[0] = MAXFRAMEF;
+ ar->v2d.max[1] = FLT_MAX;
+
+ ar->v2d.minzoom = 0.01f;
+ ar->v2d.maxzoom = 50;
+ ar->v2d.scroll = (V2D_SCROLL_BOTTOM | V2D_SCROLL_SCALE_HORIZONTAL);
+ ar->v2d.scroll |= (V2D_SCROLL_RIGHT);
+ ar->v2d.keepzoom = V2D_LOCKZOOM_Y;
+ ar->v2d.keepofs = V2D_KEEPOFS_Y;
+ ar->v2d.align = V2D_ALIGN_NO_POS_Y;
+ ar->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL;
+ }
+ else {
+ ar->v2d.tot.xmin = 0.0f;
+ ar->v2d.tot.ymin = -10.0f;
+ ar->v2d.tot.xmax = (float)scene->r.efra;
+ ar->v2d.tot.ymax = 10.0f;
+
+ ar->v2d.cur = ar->v2d.tot;
+
+ ar->v2d.min[0] = FLT_MIN;
+ ar->v2d.min[1] = FLT_MIN;
+
+ ar->v2d.max[0] = MAXFRAMEF;
+ ar->v2d.max[1] = FLT_MAX;
- ar->v2d.cur = ar->v2d.tot;
+ ar->v2d.scroll = (V2D_SCROLL_BOTTOM | V2D_SCROLL_SCALE_HORIZONTAL);
+ ar->v2d.scroll |= (V2D_SCROLL_LEFT | V2D_SCROLL_SCALE_VERTICAL);
- ar->v2d.min[0] = FLT_MIN;
- ar->v2d.min[1] = FLT_MIN;
+ ar->v2d.minzoom = 0.0f;
+ ar->v2d.maxzoom = 0.0f;
+ ar->v2d.keepzoom = 0;
+ ar->v2d.keepofs = 0;
+ ar->v2d.align = 0;
+ ar->v2d.flag = 0;
- ar->v2d.max[0] = MAXFRAMEF;
- ar->v2d.max[1] = FLT_MAX;
+ ar->v2d.keeptot = 0;
+ }
+}
- ar->v2d.scroll = (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL);
- ar->v2d.scroll |= (V2D_SCROLL_LEFT|V2D_SCROLL_SCALE_VERTICAL);
+static void reinit_preview_region(const bContext *C, ARegion *ar)
+{
+ SpaceClip *sc = CTX_wm_space_clip(C);
- ar->v2d.keeptot = 0;
+ if (sc->view == SC_VIEW_DOPESHEET) {
+ if ((ar->v2d.flag & V2D_VIEWSYNC_AREA_VERTICAL) == 0)
+ init_preview_region(C, ar);
+ }
+ else {
+ if (ar->v2d.flag & V2D_VIEWSYNC_AREA_VERTICAL)
+ init_preview_region(C, ar);
+ }
}
-static ARegion *clip_has_preview_region(const bContext *C, ScrArea *sa)
+static ARegion *ED_clip_has_preview_region(const bContext *C, ScrArea *sa)
{
ARegion *ar, *arnew;
@@ -119,6 +167,33 @@ static ARegion *clip_has_preview_region(const bContext *C, ScrArea *sa)
return arnew;
}
+static ARegion *ED_clip_has_channels_region(ScrArea *sa)
+{
+ ARegion *ar, *arnew;
+
+ ar = BKE_area_find_region_type(sa, RGN_TYPE_CHANNELS);
+ if (ar)
+ return ar;
+
+ /* add subdiv level; after header */
+ ar = BKE_area_find_region_type(sa, RGN_TYPE_PREVIEW);
+
+ /* is error! */
+ if (ar == NULL)
+ return NULL;
+
+ arnew = MEM_callocN(sizeof(ARegion), "clip channels region");
+
+ BLI_insertlinkbefore(&sa->regionbase, ar, arnew);
+ arnew->regiontype = RGN_TYPE_CHANNELS;
+ arnew->alignment = RGN_ALIGN_LEFT;
+
+ arnew->v2d.scroll = V2D_SCROLL_BOTTOM;
+ arnew->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL;
+
+ return arnew;
+}
+
static void clip_scopes_tag_refresh(ScrArea *sa)
{
SpaceClip *sc = (SpaceClip *)sa->spacedata.first;
@@ -157,7 +232,8 @@ static SpaceLink *clip_new(const bContext *C)
sc = MEM_callocN(sizeof(SpaceClip), "initclip");
sc->spacetype = SPACE_CLIP;
- sc->flag = SC_SHOW_MARKER_PATTERN|SC_SHOW_TRACK_PATH|SC_MANUAL_CALIBRATION|SC_SHOW_GRAPH_TRACKS|SC_SHOW_GRAPH_FRAMES;
+ sc->flag = SC_SHOW_MARKER_PATTERN | SC_SHOW_TRACK_PATH | SC_MANUAL_CALIBRATION |
+ SC_SHOW_GRAPH_TRACKS | SC_SHOW_GRAPH_FRAMES;
sc->zoom = 1.0f;
sc->path_length = 20;
sc->scopes.track_preview_height = 120;
@@ -181,7 +257,7 @@ static SpaceLink *clip_new(const bContext *C)
BLI_addtail(&sc->regionbase, ar);
ar->regiontype = RGN_TYPE_TOOL_PROPS;
- ar->alignment = RGN_ALIGN_BOTTOM|RGN_SPLIT_PREV;
+ ar->alignment = RGN_ALIGN_BOTTOM | RGN_SPLIT_PREV;
/* properties view */
ar = MEM_callocN(sizeof(ARegion), "properties for clip");
@@ -190,6 +266,16 @@ static SpaceLink *clip_new(const bContext *C)
ar->regiontype = RGN_TYPE_UI;
ar->alignment = RGN_ALIGN_RIGHT;
+ /* channels view */
+ ar = MEM_callocN(sizeof(ARegion), "channels for clip");
+
+ BLI_addtail(&sc->regionbase, ar);
+ ar->regiontype = RGN_TYPE_CHANNELS;
+ ar->alignment = RGN_ALIGN_LEFT;
+
+ ar->v2d.scroll = V2D_SCROLL_BOTTOM;
+ ar->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL;
+
/* preview view */
ar = MEM_callocN(sizeof(ARegion), "preview for clip");
@@ -214,12 +300,17 @@ static void clip_free(SpaceLink *sl)
if (sc->scopes.track_preview)
IMB_freeImBuf(sc->scopes.track_preview);
+
+ ED_space_clip_free_texture_buffer(sc);
}
/* spacetype; init callback */
-static void clip_init(struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(sa))
+static void clip_init(struct wmWindowManager *UNUSED(wm), ScrArea *sa)
{
+ ListBase *lb = WM_dropboxmap_find("Clip", SPACE_CLIP, 0);
+ /* add drop boxes */
+ WM_event_add_dropbox_handler(&sa->handlers, lb);
}
static SpaceLink *clip_duplicate(SpaceLink *sl)
@@ -229,6 +320,7 @@ static SpaceLink *clip_duplicate(SpaceLink *sl)
/* clear or remove stuff from old */
scn->scopes.track_preview = NULL;
scn->scopes.ok = FALSE;
+ scn->draw_context = NULL;
return (SpaceLink *)scn;
}
@@ -236,9 +328,9 @@ static SpaceLink *clip_duplicate(SpaceLink *sl)
static void clip_listener(ScrArea *sa, wmNotifier *wmn)
{
/* context changes */
- switch(wmn->category) {
+ switch (wmn->category) {
case NC_SCENE:
- switch(wmn->data) {
+ switch (wmn->data) {
case ND_FRAME:
clip_scopes_tag_refresh(sa);
/* no break! */
@@ -249,14 +341,14 @@ static void clip_listener(ScrArea *sa, wmNotifier *wmn)
}
break;
case NC_MOVIECLIP:
- switch(wmn->data) {
+ switch (wmn->data) {
case ND_DISPLAY:
case ND_SELECT:
clip_scopes_tag_refresh(sa);
ED_area_tag_redraw(sa);
break;
}
- switch(wmn->action) {
+ switch (wmn->action) {
case NA_REMOVED:
case NA_EDITED:
case NA_EVALUATED:
@@ -270,7 +362,7 @@ static void clip_listener(ScrArea *sa, wmNotifier *wmn)
}
break;
case NC_GEOM:
- switch(wmn->data) {
+ switch (wmn->data) {
case ND_SELECT:
clip_scopes_tag_refresh(sa);
ED_area_tag_redraw(sa);
@@ -278,12 +370,12 @@ static void clip_listener(ScrArea *sa, wmNotifier *wmn)
}
break;
case NC_SCREEN:
- if (wmn->data ==ND_ANIMPLAY) {
+ if (wmn->data == ND_ANIMPLAY) {
ED_area_tag_redraw(sa);
}
break;
case NC_SPACE:
- if (wmn->data ==ND_SPACE_CLIP) {
+ if (wmn->data == ND_SPACE_CLIP) {
clip_scopes_tag_refresh(sa);
clip_stabilization_tag_refresh(sa);
ED_area_tag_redraw(sa);
@@ -391,6 +483,10 @@ static void clip_operatortypes(void)
WM_operatortype_append(CLIP_OT_graph_center_current_frame);
WM_operatortype_append(CLIP_OT_graph_disable_markers);
+
+ /* ** clip_dopesheet_ops.c ** */
+
+ WM_operatortype_append(CLIP_OT_dopesheet_select_channel);
}
static void clip_keymap(struct wmKeyConfig *keyconf)
@@ -417,7 +513,7 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
kmi = WM_keymap_add_item(keymap, "CLIP_OT_track_markers", TKEY, KM_PRESS, KM_CTRL, 0);
RNA_boolean_set(kmi->ptr, "backwards", FALSE);
RNA_boolean_set(kmi->ptr, "sequence", TRUE);
- kmi = WM_keymap_add_item(keymap, "CLIP_OT_track_markers", TKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
+ kmi = WM_keymap_add_item(keymap, "CLIP_OT_track_markers", TKEY, KM_PRESS, KM_SHIFT | KM_CTRL, 0);
RNA_boolean_set(kmi->ptr, "backwards", TRUE);
RNA_boolean_set(kmi->ptr, "sequence", TRUE);
@@ -430,11 +526,6 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
RNA_enum_set(kmi->ptr, "mode", SC_MODE_DISTORTION);
RNA_boolean_set(kmi->ptr, "toggle", TRUE);
- kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle_enum", ZKEY, KM_PRESS, 0, 0);
- RNA_string_set(kmi->ptr, "data_path", "space_data.view");
- RNA_string_set(kmi->ptr, "value_1", "CLIP");
- RNA_string_set(kmi->ptr, "value_2", "GRAPH");
-
WM_keymap_add_item(keymap, "CLIP_OT_solve_camera", SKEY, KM_PRESS, KM_SHIFT, 0);
/* ******** Hotkeys avalaible for main region only ******** */
@@ -470,16 +561,16 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "CLIP_OT_view_selected", PADPERIOD, KM_PRESS, 0, 0);
/* jump to special frame */
- kmi = WM_keymap_add_item(keymap, "CLIP_OT_frame_jump", LEFTARROWKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
+ kmi = WM_keymap_add_item(keymap, "CLIP_OT_frame_jump", LEFTARROWKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "position", 0);
- kmi = WM_keymap_add_item(keymap, "CLIP_OT_frame_jump", RIGHTARROWKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
+ kmi = WM_keymap_add_item(keymap, "CLIP_OT_frame_jump", RIGHTARROWKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "position", 1);
- kmi = WM_keymap_add_item(keymap, "CLIP_OT_frame_jump", LEFTARROWKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0);
+ kmi = WM_keymap_add_item(keymap, "CLIP_OT_frame_jump", LEFTARROWKEY, KM_PRESS, KM_ALT | KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "position", 2);
- kmi = WM_keymap_add_item(keymap, "CLIP_OT_frame_jump", RIGHTARROWKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0);
+ kmi = WM_keymap_add_item(keymap, "CLIP_OT_frame_jump", RIGHTARROWKEY, KM_PRESS, KM_ALT | KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "position", 3);
/* "timeline" */
@@ -555,7 +646,7 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
kmi = WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "action", TRACK_CLEAR_UPTO);
RNA_boolean_set(kmi->ptr, "clear_active", FALSE);
- kmi = WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0);
+ kmi = WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_ALT | KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "action", TRACK_CLEAR_ALL);
RNA_boolean_set(kmi->ptr, "clear_active", FALSE);
@@ -600,7 +691,7 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
kmi = WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "action", TRACK_CLEAR_UPTO);
RNA_boolean_set(kmi->ptr, "clear_active", TRUE);
- kmi = WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0);
+ kmi = WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_ALT | KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "action", TRACK_CLEAR_ALL);
RNA_boolean_set(kmi->ptr, "clear_active", TRUE);
@@ -609,9 +700,16 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
RNA_enum_set(kmi->ptr, "action", 2); /* toggle */
transform_keymap_for_space(keyconf, keymap, SPACE_CLIP);
+
+ /* ******** Hotkeys avalaible for channels region only ******** */
+
+ keymap = WM_keymap_find(keyconf, "Clip Dopesheet Editor", SPACE_CLIP, 0);
+
+ kmi = WM_keymap_add_item(keymap, "CLIP_OT_dopesheet_select_channel", ACTIONMOUSE, KM_PRESS, 0, 0);
+ RNA_boolean_set(kmi->ptr, "extend", TRUE); /* toggle */
}
-const char *clip_context_dir[]= {"edit_movieclip", NULL};
+const char *clip_context_dir[] = {"edit_movieclip", NULL};
static int clip_context(const bContext *C, const char *member, bContextDataResult *result)
{
@@ -619,16 +717,43 @@ static int clip_context(const bContext *C, const char *member, bContextDataResul
if (CTX_data_dir(member)) {
CTX_data_dir_set(result, clip_context_dir);
+
return TRUE;
}
else if (CTX_data_equals(member, "edit_movieclip")) {
- CTX_data_id_pointer_set(result, &sc->clip->id);
+ if (sc->clip)
+ CTX_data_id_pointer_set(result, &sc->clip->id);
+
return TRUE;
}
return FALSE;
}
+/* dropboxes */
+static int clip_drop_poll(bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUSED(event))
+{
+ if (drag->type == WM_DRAG_PATH)
+ if (ELEM3(drag->icon, 0, ICON_FILE_IMAGE, ICON_FILE_BLANK)) /* rule might not work? */
+ return TRUE;
+
+ return FALSE;
+}
+
+static void clip_drop_copy(wmDrag *drag, wmDropBox *drop)
+{
+ /* copy drag path to properties */
+ RNA_string_set(drop->ptr, "filepath", drag->path);
+}
+
+/* area+region dropbox definition */
+static void clip_dropboxes(void)
+{
+ ListBase *lb = WM_dropboxmap_find("Clip", SPACE_CLIP, 0);
+
+ WM_dropbox_add(lb, "CLIP_OT_open", clip_drop_poll, clip_drop_copy);
+}
+
static void clip_refresh(const bContext *C, ScrArea *sa)
{
wmWindowManager *wm = CTX_wm_manager(C);
@@ -636,52 +761,190 @@ static void clip_refresh(const bContext *C, ScrArea *sa)
Scene *scene = CTX_data_scene(C);
SpaceClip *sc = (SpaceClip *)sa->spacedata.first;
ARegion *ar_main = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
- ARegion *ar_preview = clip_has_preview_region(C, sa);
+ ARegion *ar_tools = BKE_area_find_region_type(sa, RGN_TYPE_TOOLS);
+ ARegion *ar_tool_props = BKE_area_find_region_type(sa, RGN_TYPE_TOOL_PROPS);
+ ARegion *ar_preview = ED_clip_has_preview_region(C, sa);
+ ARegion *ar_properties = ED_clip_has_properties_region(sa);
+ ARegion *ar_channels = ED_clip_has_channels_region(sa);
+ int main_visible = FALSE, preview_visible = FALSE, tools_visible = FALSE;
+ int tool_props_visible = FALSE, properties_visible = FALSE, channels_visible = FALSE;
int view_changed = FALSE;
switch (sc->view) {
case SC_VIEW_CLIP:
- if (ar_preview && !(ar_preview->flag & RGN_FLAG_HIDDEN)) {
- ar_preview->flag |= RGN_FLAG_HIDDEN;
- ar_preview->v2d.flag &= ~V2D_IS_INITIALISED;
- WM_event_remove_handlers((bContext*)C, &ar_preview->handlers);
- view_changed = TRUE;
- }
- if (ar_main && ar_main->alignment != RGN_ALIGN_NONE) {
- ar_main->alignment = RGN_ALIGN_NONE;
- view_changed = TRUE;
- }
- if (ar_preview && ar_preview->alignment != RGN_ALIGN_NONE) {
- /* store graph region align */
- if (ar_preview->alignment == RGN_ALIGN_TOP)
- sc->runtime_flag &= ~SC_GRAPH_BOTTOM;
- else
- sc->runtime_flag |= SC_GRAPH_BOTTOM;
-
- ar_preview->alignment = RGN_ALIGN_NONE;
- view_changed = TRUE;
- }
+ main_visible = TRUE;
+ preview_visible = FALSE;
+ tools_visible = TRUE;
+ tool_props_visible = TRUE;
+ properties_visible = TRUE;
+ channels_visible = FALSE;
break;
case SC_VIEW_GRAPH:
- if (ar_preview && (ar_preview->flag & RGN_FLAG_HIDDEN)) {
- ar_preview->flag &= ~RGN_FLAG_HIDDEN;
- ar_preview->v2d.flag &= ~V2D_IS_INITIALISED;
- ar_preview->v2d.cur = ar_preview->v2d.tot;
- view_changed = TRUE;
- }
- if (ar_main && ar_main->alignment != RGN_ALIGN_NONE) {
- ar_main->alignment = RGN_ALIGN_NONE;
- view_changed = TRUE;
- }
- if (ar_preview && !ELEM(ar_preview->alignment, RGN_ALIGN_TOP, RGN_ALIGN_BOTTOM)) {
- if (sc->runtime_flag & SC_GRAPH_BOTTOM)
- ar_preview->alignment = RGN_ALIGN_BOTTOM;
- else
- ar_preview->alignment = RGN_ALIGN_TOP;
-
- view_changed = TRUE;
- }
+ main_visible = FALSE;
+ preview_visible = TRUE;
+ tools_visible = FALSE;
+ tool_props_visible = FALSE;
+ properties_visible = FALSE;
+ channels_visible = FALSE;
+
+ reinit_preview_region(C, ar_preview);
break;
+ case SC_VIEW_DOPESHEET:
+ main_visible = FALSE;
+ preview_visible = TRUE;
+ tools_visible = FALSE;
+ tool_props_visible = FALSE;
+ properties_visible = FALSE;
+ channels_visible = TRUE;
+
+ reinit_preview_region(C, ar_preview);
+ break;
+ }
+
+ if (main_visible) {
+ if (ar_main && (ar_main->flag & RGN_FLAG_HIDDEN)) {
+ ar_main->flag &= ~RGN_FLAG_HIDDEN;
+ ar_main->v2d.flag &= ~V2D_IS_INITIALISED;
+ view_changed = TRUE;
+ }
+
+ if (ar_main && ar_main->alignment != RGN_ALIGN_NONE) {
+ ar_main->alignment = RGN_ALIGN_NONE;
+ view_changed = TRUE;
+ }
+ }
+ else {
+ if (ar_main && !(ar_main->flag & RGN_FLAG_HIDDEN)) {
+ ar_main->flag |= RGN_FLAG_HIDDEN;
+ ar_main->v2d.flag &= ~V2D_IS_INITIALISED;
+ WM_event_remove_handlers((bContext *)C, &ar_main->handlers);
+ view_changed = TRUE;
+ }
+ if (ar_main && ar_main->alignment != RGN_ALIGN_NONE) {
+ ar_main->alignment = RGN_ALIGN_NONE;
+ view_changed = TRUE;
+ }
+ }
+
+ if (properties_visible) {
+ if (ar_properties && (ar_properties->flag & RGN_FLAG_HIDDEN)) {
+ ar_properties->flag &= ~RGN_FLAG_HIDDEN;
+ ar_properties->v2d.flag &= ~V2D_IS_INITIALISED;
+ view_changed = TRUE;
+ }
+ if (ar_properties && ar_properties->alignment != RGN_ALIGN_RIGHT) {
+ ar_properties->alignment = RGN_ALIGN_RIGHT;
+ view_changed = TRUE;
+ }
+ }
+ else {
+ if (ar_properties && !(ar_properties->flag & RGN_FLAG_HIDDEN)) {
+ ar_properties->flag |= RGN_FLAG_HIDDEN;
+ ar_properties->v2d.flag &= ~V2D_IS_INITIALISED;
+ WM_event_remove_handlers((bContext *)C, &ar_properties->handlers);
+ view_changed = TRUE;
+ }
+ if (ar_properties && ar_properties->alignment != RGN_ALIGN_NONE) {
+ ar_properties->alignment = RGN_ALIGN_NONE;
+ view_changed = TRUE;
+ }
+ }
+
+ if (tools_visible) {
+ if (ar_tools && (ar_tools->flag & RGN_FLAG_HIDDEN)) {
+ ar_tools->flag &= ~RGN_FLAG_HIDDEN;
+ ar_tools->v2d.flag &= ~V2D_IS_INITIALISED;
+ view_changed = TRUE;
+ }
+ if (ar_tools && ar_tools->alignment != RGN_ALIGN_LEFT) {
+ ar_tools->alignment = RGN_ALIGN_LEFT;
+ view_changed = TRUE;
+ }
+ }
+ else {
+ if (ar_tools && !(ar_tools->flag & RGN_FLAG_HIDDEN)) {
+ ar_tools->flag |= RGN_FLAG_HIDDEN;
+ ar_tools->v2d.flag &= ~V2D_IS_INITIALISED;
+ WM_event_remove_handlers((bContext *)C, &ar_tools->handlers);
+ view_changed = TRUE;
+ }
+ if (ar_tools && ar_tools->alignment != RGN_ALIGN_NONE) {
+ ar_tools->alignment = RGN_ALIGN_NONE;
+ view_changed = TRUE;
+ }
+ }
+
+ if (tool_props_visible) {
+ if (ar_tool_props && (ar_tool_props->flag & RGN_FLAG_HIDDEN)) {
+ ar_tool_props->flag &= ~RGN_FLAG_HIDDEN;
+ ar_tool_props->v2d.flag &= ~V2D_IS_INITIALISED;
+ view_changed = TRUE;
+ }
+ if (ar_tool_props && (ar_tool_props->alignment != (RGN_ALIGN_BOTTOM | RGN_SPLIT_PREV))) {
+ ar_tool_props->alignment = RGN_ALIGN_BOTTOM | RGN_SPLIT_PREV;
+ view_changed = TRUE;
+ }
+ }
+ else {
+ if (ar_tool_props && !(ar_tool_props->flag & RGN_FLAG_HIDDEN)) {
+ ar_tool_props->flag |= RGN_FLAG_HIDDEN;
+ ar_tool_props->v2d.flag &= ~V2D_IS_INITIALISED;
+ WM_event_remove_handlers((bContext *)C, &ar_tool_props->handlers);
+ view_changed = TRUE;
+ }
+ if (ar_tool_props && ar_tool_props->alignment != RGN_ALIGN_NONE) {
+ ar_tool_props->alignment = RGN_ALIGN_NONE;
+ view_changed = TRUE;
+ }
+ }
+
+ if (preview_visible) {
+ if (ar_preview && (ar_preview->flag & RGN_FLAG_HIDDEN)) {
+ ar_preview->flag &= ~RGN_FLAG_HIDDEN;
+ ar_preview->v2d.flag &= ~V2D_IS_INITIALISED;
+ ar_preview->v2d.cur = ar_preview->v2d.tot;
+ view_changed = TRUE;
+ }
+ if (ar_preview && ar_preview->alignment != RGN_ALIGN_NONE) {
+ ar_preview->alignment = RGN_ALIGN_NONE;
+ view_changed = TRUE;
+ }
+ }
+ else {
+ if (ar_preview && !(ar_preview->flag & RGN_FLAG_HIDDEN)) {
+ ar_preview->flag |= RGN_FLAG_HIDDEN;
+ ar_preview->v2d.flag &= ~V2D_IS_INITIALISED;
+ WM_event_remove_handlers((bContext *)C, &ar_preview->handlers);
+ view_changed = TRUE;
+ }
+ if (ar_preview && ar_preview->alignment != RGN_ALIGN_NONE) {
+ ar_preview->alignment = RGN_ALIGN_NONE;
+ view_changed = TRUE;
+ }
+ }
+
+ if (channels_visible) {
+ if (ar_channels && (ar_channels->flag & RGN_FLAG_HIDDEN)) {
+ ar_channels->flag &= ~RGN_FLAG_HIDDEN;
+ ar_channels->v2d.flag &= ~V2D_IS_INITIALISED;
+ view_changed = TRUE;
+ }
+ if (ar_channels && ar_channels->alignment != RGN_ALIGN_LEFT) {
+ ar_channels->alignment = RGN_ALIGN_LEFT;
+ view_changed = TRUE;
+ }
+ }
+ else {
+ if (ar_channels && !(ar_channels->flag & RGN_FLAG_HIDDEN)) {
+ ar_channels->flag |= RGN_FLAG_HIDDEN;
+ ar_channels->v2d.flag &= ~V2D_IS_INITIALISED;
+ WM_event_remove_handlers((bContext *)C, &ar_tools->handlers);
+ view_changed = TRUE;
+ }
+ if (ar_channels && ar_channels->alignment != RGN_ALIGN_NONE) {
+ ar_channels->alignment = RGN_ALIGN_NONE;
+ view_changed = TRUE;
+ }
}
if (view_changed) {
@@ -722,11 +985,11 @@ static void movieclip_main_area_set_view2d(SpaceClip *sc, ARegion *ar)
ar->v2d.mask.ymax = winy;
/* which part of the image space do we see? */
- x1= ar->winrct.xmin + (winx-sc->zoom * w) / 2.0f;
- y1= ar->winrct.ymin + (winy-sc->zoom * h) / 2.0f;
+ x1 = ar->winrct.xmin + (winx - sc->zoom * w) / 2.0f;
+ y1 = ar->winrct.ymin + (winy - sc->zoom * h) / 2.0f;
- x1-= sc->zoom * sc->xof;
- y1-= sc->zoom * sc->yof;
+ x1 -= sc->zoom * sc->xof;
+ y1 -= sc->zoom * sc->yof;
/* relative display right */
ar->v2d.cur.xmin = (ar->winrct.xmin - (float)x1) / sc->zoom;
@@ -808,7 +1071,7 @@ static void clip_main_area_draw(const bContext *C, ARegion *ar)
static void clip_main_area_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
- switch(wmn->category) {
+ switch (wmn->category) {
case NC_SCREEN:
if (wmn->data == ND_GPENCIL)
ED_region_tag_redraw(ar);
@@ -832,13 +1095,13 @@ static void clip_preview_area_init(wmWindowManager *wm, ARegion *ar)
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
-static void clip_preview_area_draw(const bContext *C, ARegion *ar)
+static void graph_area_draw(const bContext *C, ARegion *ar)
{
View2D *v2d = &ar->v2d;
View2DScrollers *scrollers;
SpaceClip *sc = CTX_wm_space_clip(C);
Scene *scene = CTX_data_scene(C);
- short unitx = V2D_UNIT_FRAMESCALE, unity = V2D_UNIT_VALUES;
+ short unitx, unity;
if (sc->flag & SC_LOCK_TIMECURSOR)
ED_clip_graph_center_current_frame(scene, ar);
@@ -856,15 +1119,109 @@ static void clip_preview_area_draw(const bContext *C, ARegion *ar)
UI_view2d_view_restore(C);
/* scrollers */
+ unitx = (sc->flag & SC_SHOW_SECONDS)? V2D_UNIT_SECONDS : V2D_UNIT_FRAMES;
+ unity = V2D_UNIT_VALUES;
scrollers = UI_view2d_scrollers_calc(C, v2d, unitx, V2D_GRID_NOCLAMP, unity, V2D_GRID_NOCLAMP);
UI_view2d_scrollers_draw(C, v2d, scrollers);
UI_view2d_scrollers_free(scrollers);
}
+static void dopesheet_area_draw(const bContext *C, ARegion *ar)
+{
+ Scene *scene = CTX_data_scene(C);
+ SpaceClip *sc = CTX_wm_space_clip(C);
+ MovieClip *clip = ED_space_clip(sc);
+ View2D *v2d = &ar->v2d;
+ View2DGrid *grid;
+ View2DScrollers *scrollers;
+ short unit = 0;
+
+ if (clip)
+ BKE_tracking_dopesheet_update(&clip->tracking, sc->dope_sort, sc->dope_flag & SC_DOPE_SORT_INVERSE);
+
+ /* clear and setup matrix */
+ UI_ThemeClearColor(TH_BACK);
+ glClear(GL_COLOR_BUFFER_BIT);
+
+ UI_view2d_view_ortho(v2d);
+
+ /* time grid */
+ unit = (sc->flag & SC_SHOW_SECONDS)? V2D_UNIT_SECONDS : V2D_UNIT_FRAMES;
+ grid = UI_view2d_grid_calc(CTX_data_scene(C), v2d, unit, V2D_GRID_CLAMP,
+ V2D_ARG_DUMMY, V2D_ARG_DUMMY, ar->winx, ar->winy);
+ UI_view2d_grid_draw(v2d, grid, V2D_GRIDLINES_ALL);
+ UI_view2d_grid_free(grid);
+
+ /* data... */
+ clip_draw_dopesheet_main(sc, ar, scene);
+
+ /* reset view matrix */
+ UI_view2d_view_restore(C);
+
+ /* scrollers */
+ scrollers = UI_view2d_scrollers_calc(C, v2d, unit, V2D_GRID_CLAMP, V2D_ARG_DUMMY, V2D_ARG_DUMMY);
+ UI_view2d_scrollers_draw(C, v2d, scrollers);
+ UI_view2d_scrollers_free(scrollers);
+}
+
+static void clip_preview_area_draw(const bContext *C, ARegion *ar)
+{
+ SpaceClip *sc = CTX_wm_space_clip(C);
+
+ if (sc->view == SC_VIEW_GRAPH)
+ graph_area_draw(C, ar);
+ else if (sc->view == SC_VIEW_DOPESHEET)
+ dopesheet_area_draw(C, ar);
+}
+
static void clip_preview_area_listener(ARegion *UNUSED(ar), wmNotifier *UNUSED(wmn))
{
}
+/****************** channels region ******************/
+
+static void clip_channels_area_init(wmWindowManager *wm, ARegion *ar)
+{
+ wmKeyMap *keymap;
+
+ UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_LIST, ar->winx, ar->winy);
+
+ keymap = WM_keymap_find(wm->defaultconf, "Clip Dopesheet Editor", SPACE_CLIP, 0);
+ WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
+}
+
+static void clip_channels_area_draw(const bContext *C, ARegion *ar)
+{
+ SpaceClip *sc = CTX_wm_space_clip(C);
+ MovieClip *clip = ED_space_clip(sc);
+ View2D *v2d = &ar->v2d;
+ View2DScrollers *scrollers;
+
+ if (clip)
+ BKE_tracking_dopesheet_update(&clip->tracking, sc->dope_sort, sc->dope_flag & SC_DOPE_SORT_INVERSE);
+
+ /* clear and setup matrix */
+ UI_ThemeClearColor(TH_BACK);
+ glClear(GL_COLOR_BUFFER_BIT);
+
+ UI_view2d_view_ortho(v2d);
+
+ /* data... */
+ clip_draw_dopesheet_channels(C, ar);
+
+ /* reset view matrix */
+ UI_view2d_view_restore(C);
+
+ /* scrollers */
+ scrollers = UI_view2d_scrollers_calc(C, v2d, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY);
+ UI_view2d_scrollers_draw(C, v2d, scrollers);
+ UI_view2d_scrollers_free(scrollers);
+}
+
+static void clip_channels_area_listener(ARegion *UNUSED(ar), wmNotifier *UNUSED(wmn))
+{
+}
+
/****************** header region ******************/
/* add handlers, stuff you only do once or on area/region changes */
@@ -896,7 +1253,7 @@ static void clip_tools_area_draw(const bContext *C, ARegion *ar)
static void clip_props_area_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
- switch(wmn->category) {
+ switch (wmn->category) {
case NC_WM:
if (wmn->data == ND_HISTORY)
ED_region_tag_redraw(ar);
@@ -941,13 +1298,13 @@ static void clip_properties_area_draw(const bContext *C, ARegion *ar)
static void clip_properties_area_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
- switch(wmn->category) {
+ switch (wmn->category) {
case NC_SCREEN:
- if (wmn->data ==ND_GPENCIL)
+ if (wmn->data == ND_GPENCIL)
ED_region_tag_redraw(ar);
break;
case NC_BRUSH:
- if (wmn->action ==NA_EDITED)
+ if (wmn->action == NA_EDITED)
ED_region_tag_redraw(ar);
break;
}
@@ -972,6 +1329,7 @@ void ED_spacetype_clip(void)
st->keymap = clip_keymap;
st->listener = clip_listener;
st->context = clip_context;
+ st->dropboxes = clip_dropboxes;
st->refresh = clip_refresh;
/* regions: main window */
@@ -980,7 +1338,7 @@ void ED_spacetype_clip(void)
art->init = clip_main_area_init;
art->draw = clip_main_area_draw;
art->listener = clip_main_area_listener;
- art->keymapflag = ED_KEYMAP_FRAMES|ED_KEYMAP_UI|ED_KEYMAP_GPENCIL;
+ art->keymapflag = ED_KEYMAP_FRAMES | ED_KEYMAP_UI | ED_KEYMAP_GPENCIL;
BLI_addhead(&st->regiontypes, art);
@@ -991,7 +1349,7 @@ void ED_spacetype_clip(void)
art->init = clip_preview_area_init;
art->draw = clip_preview_area_draw;
art->listener = clip_preview_area_listener;
- art->keymapflag = ED_KEYMAP_FRAMES|ED_KEYMAP_UI|ED_KEYMAP_VIEW2D;
+ art->keymapflag = ED_KEYMAP_FRAMES | ED_KEYMAP_UI | ED_KEYMAP_VIEW2D;
BLI_addhead(&st->regiontypes, art);
@@ -999,7 +1357,7 @@ void ED_spacetype_clip(void)
art = MEM_callocN(sizeof(ARegionType), "spacetype clip region properties");
art->regionid = RGN_TYPE_UI;
art->prefsizex = UI_COMPACT_PANEL_WIDTH;
- art->keymapflag = ED_KEYMAP_FRAMES|ED_KEYMAP_UI;
+ art->keymapflag = ED_KEYMAP_FRAMES | ED_KEYMAP_UI;
art->init = clip_properties_area_init;
art->draw = clip_properties_area_draw;
art->listener = clip_properties_area_listener;
@@ -1010,7 +1368,7 @@ void ED_spacetype_clip(void)
art = MEM_callocN(sizeof(ARegionType), "spacetype clip region tools");
art->regionid = RGN_TYPE_TOOLS;
art->prefsizex = UI_COMPACT_PANEL_WIDTH;
- art->keymapflag = ED_KEYMAP_FRAMES|ED_KEYMAP_UI;
+ art->keymapflag = ED_KEYMAP_FRAMES | ED_KEYMAP_UI;
art->listener = clip_props_area_listener;
art->init = clip_tools_area_init;
art->draw = clip_tools_area_draw;
@@ -1022,7 +1380,7 @@ void ED_spacetype_clip(void)
art->regionid = RGN_TYPE_TOOL_PROPS;
art->prefsizex = 0;
art->prefsizey = 120;
- art->keymapflag = ED_KEYMAP_FRAMES|ED_KEYMAP_UI;
+ art->keymapflag = ED_KEYMAP_FRAMES | ED_KEYMAP_UI;
art->listener = clip_props_area_listener;
art->init = clip_tools_area_init;
art->draw = clip_tools_area_draw;
@@ -1034,7 +1392,7 @@ void ED_spacetype_clip(void)
art = MEM_callocN(sizeof(ARegionType), "spacetype clip region");
art->regionid = RGN_TYPE_HEADER;
art->prefsizey = HEADERY;
- art->keymapflag = ED_KEYMAP_FRAMES|ED_KEYMAP_UI|ED_KEYMAP_VIEW2D|ED_KEYMAP_HEADER;
+ art->keymapflag = ED_KEYMAP_FRAMES | ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_HEADER;
art->init = clip_header_area_init;
art->draw = clip_header_area_draw;
@@ -1042,4 +1400,15 @@ void ED_spacetype_clip(void)
BLI_addhead(&st->regiontypes, art);
BKE_spacetype_register(st);
+
+ /* channels */
+ art = MEM_callocN(sizeof(ARegionType), "spacetype clip channels region");
+ art->regionid = RGN_TYPE_CHANNELS;
+ art->prefsizex = UI_COMPACT_PANEL_WIDTH;
+ art->keymapflag = ED_KEYMAP_FRAMES | ED_KEYMAP_UI;
+ art->listener = clip_channels_area_listener;
+ art->init = clip_channels_area_init;
+ art->draw = clip_channels_area_draw;
+
+ BLI_addhead(&st->regiontypes, art);
}
diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c
index 35986fa2700..fc93bcc0409 100644
--- a/source/blender/editors/space_clip/tracking_ops.c
+++ b/source/blender/editors/space_clip/tracking_ops.c
@@ -78,20 +78,6 @@
#include "clip_intern.h" // own include
-static int space_clip_frame_poll(bContext *C)
-{
- SpaceClip *sc = CTX_wm_space_clip(C);
-
- if (sc) {
- MovieClip *clip = ED_space_clip(sc);
-
- if (clip)
- return BKE_movieclip_has_frame(clip, &sc->user);
- }
-
- return FALSE;
-}
-
/********************** add marker operator *********************/
static void add_marker(SpaceClip *sc, float x, float y)
@@ -130,7 +116,7 @@ static int add_marker_exec(bContext *C, wmOperator *op)
sc->xlockof = 0;
sc->ylockof = 0;
- WM_event_add_notifier(C, NC_MOVIECLIP|NA_EDITED, clip);
+ WM_event_add_notifier(C, NC_MOVIECLIP | NA_EDITED, clip);
return OPERATOR_FINISHED;
}
@@ -156,10 +142,10 @@ void CLIP_OT_add_marker(wmOperatorType *ot)
/* api callbacks */
ot->invoke = add_marker_invoke;
ot->exec = add_marker_exec;
- ot->poll = space_clip_frame_poll;
+ ot->poll = ED_space_clip_tracking_size_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MIN, FLT_MAX,
@@ -201,10 +187,10 @@ void CLIP_OT_delete_track(wmOperatorType *ot)
/* api callbacks */
ot->invoke = WM_operator_confirm;
ot->exec = delete_track_exec;
- ot->poll = ED_space_clip_poll;
+ ot->poll = ED_space_clip_tracking_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/********************** delete marker operator *********************/
@@ -225,7 +211,7 @@ static int delete_marker_exec(bContext *C, wmOperator *UNUSED(op))
MovieTrackingMarker *marker = BKE_tracking_exact_marker(track, framenr);
if (marker) {
- has_selection |= track->markersnr>1;
+ has_selection |= track->markersnr > 1;
clip_delete_marker(C, clip, tracksbase, track, marker);
}
@@ -252,10 +238,10 @@ void CLIP_OT_delete_marker(wmOperatorType *ot)
/* api callbacks */
ot->invoke = WM_operator_confirm;
ot->exec = delete_marker_exec;
- ot->poll = ED_space_clip_poll;
+ ot->poll = ED_space_clip_tracking_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/********************** slide marker operator *********************/
@@ -371,8 +357,8 @@ static int mouse_on_corner(SpaceClip *sc, MovieTrackingTrack *track, MovieTracki
inside = co[0] >= crn[0] - dx && co[0] <= crn[0] + tdx && co[1] >= crn[1] - tdy && co[1] <= crn[1] + dy;
}
else {
- crn[0] = marker->pos[0]+min[0];
- crn[1] = marker->pos[1]+max[1];
+ crn[0] = marker->pos[0] + min[0];
+ crn[1] = marker->pos[1] + max[1];
inside = co[0] >= crn[0] - dx && co[0] <= crn[0] + dx && co[1] >= crn[1] - dy && co[1] <= crn[1] + dy;
}
@@ -388,7 +374,7 @@ static int mouse_on_offset(SpaceClip *sc, MovieTrackingTrack *track, MovieTracki
add_v2_v2v2(pos, marker->pos, track->offset);
dx = 12.0f / width / sc->zoom;
- dy = 12.0f / height /sc->zoom;
+ dy = 12.0f / height / sc->zoom;
dx = MIN2(dx, (track->pat_max[0] - track->pat_min[0]) / 2.0f);
dy = MIN2(dy, (track->pat_max[1] - track->pat_min[1]) / 2.0f);
@@ -435,21 +421,26 @@ static void *slide_marker_customdata(bContext *C, wmEvent *event)
if ((marker->flag & MARKER_DISABLED) == 0) {
if (!customdata)
if (mouse_on_offset(sc, track, marker, co, width, height))
- customdata = create_slide_marker_data(sc, track, marker, event, TRACK_AREA_POINT, SLIDE_ACTION_POS, width, height);
+ customdata = create_slide_marker_data(sc, track, marker, event, TRACK_AREA_POINT,
+ SLIDE_ACTION_POS, width, height);
if (sc->flag & SC_SHOW_MARKER_SEARCH) {
if (mouse_on_corner(sc, track, marker, TRACK_AREA_SEARCH, co, 1, width, height))
- customdata = create_slide_marker_data(sc, track, marker, event, TRACK_AREA_SEARCH, SLIDE_ACTION_OFFSET, width, height);
+ customdata = create_slide_marker_data(sc, track, marker, event, TRACK_AREA_SEARCH,
+ SLIDE_ACTION_OFFSET, width, height);
else if (mouse_on_corner(sc, track, marker, TRACK_AREA_SEARCH, co, 0, width, height))
- customdata = create_slide_marker_data(sc, track, marker, event, TRACK_AREA_SEARCH, SLIDE_ACTION_SIZE, width, height);
+ customdata = create_slide_marker_data(sc, track, marker, event, TRACK_AREA_SEARCH,
+ SLIDE_ACTION_SIZE, width, height);
}
if (!customdata && (sc->flag & SC_SHOW_MARKER_PATTERN)) {
if (mouse_on_corner(sc, track, marker, TRACK_AREA_PAT, co, 1, width, height))
- customdata = create_slide_marker_data(sc, track, marker, event, TRACK_AREA_PAT, SLIDE_ACTION_OFFSET, width, height);
+ customdata = create_slide_marker_data(sc, track, marker, event, TRACK_AREA_PAT,
+ SLIDE_ACTION_OFFSET, width, height);
if (!customdata && mouse_on_corner(sc, track, marker, TRACK_AREA_PAT, co, 0, width, height))
- customdata = create_slide_marker_data(sc, track, marker, event, TRACK_AREA_PAT, SLIDE_ACTION_SIZE, width, height);
+ customdata = create_slide_marker_data(sc, track, marker, event, TRACK_AREA_PAT,
+ SLIDE_ACTION_SIZE, width, height);
}
if (customdata)
@@ -479,7 +470,7 @@ static int slide_marker_invoke(bContext *C, wmOperator *op, wmEvent *event)
hide_cursor(C);
WM_event_add_modal_handler(C, op);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, NULL);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, NULL);
return OPERATOR_RUNNING_MODAL;
}
@@ -504,7 +495,7 @@ static void cancel_mouse_slide(SlideMarkerData *data)
else {
int a;
- for (a = 0; a<data->track->markersnr; a++)
+ for (a = 0; a < data->track->markersnr; a++)
copy_v2_v2(data->track->markers[a].pos, data->smarkers[a]);
copy_v2_v2(data->offset, data->soff);
@@ -526,7 +517,7 @@ static int slide_marker_modal(bContext *C, wmOperator *op, wmEvent *event)
SlideMarkerData *data = (SlideMarkerData *)op->customdata;
float dx, dy, mdelta[2];
- switch(event->type) {
+ switch (event->type) {
case LEFTCTRLKEY:
case RIGHTCTRLKEY:
case LEFTSHIFTKEY:
@@ -541,8 +532,8 @@ static int slide_marker_modal(bContext *C, wmOperator *op, wmEvent *event)
/* no break! update area size */
case MOUSEMOVE:
- mdelta[0] = event->mval[0]-data->mval[0];
- mdelta[1] = event->mval[1]-data->mval[1];
+ mdelta[0] = event->mval[0] - data->mval[0];
+ mdelta[1] = event->mval[1] - data->mval[1];
dx = mdelta[0] / data->width / sc->zoom;
@@ -568,7 +559,7 @@ static int slide_marker_modal(bContext *C, wmOperator *op, wmEvent *event)
data->marker->flag &= ~MARKER_TRACKED;
}
- WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
DAG_id_tag_update(&sc->clip->id, 0);
}
else {
@@ -594,7 +585,7 @@ static int slide_marker_modal(bContext *C, wmOperator *op, wmEvent *event)
else {
int a;
- for (a = 0; a<data->track->markersnr; a++)
+ for (a = 0; a < data->track->markersnr; a++)
add_v2_v2v2(data->track->markers[a].pos, data->smarkers[a], d);
sub_v2_v2v2(data->offset, data->soff, d);
@@ -605,7 +596,7 @@ static int slide_marker_modal(bContext *C, wmOperator *op, wmEvent *event)
}
}
- WM_event_add_notifier(C, NC_MOVIECLIP|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_MOVIECLIP | NA_EDITED, NULL);
break;
@@ -627,7 +618,7 @@ static int slide_marker_modal(bContext *C, wmOperator *op, wmEvent *event)
show_cursor(C);
- WM_event_add_notifier(C, NC_MOVIECLIP|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_MOVIECLIP | NA_EDITED, NULL);
return OPERATOR_CANCELLED;
}
@@ -643,12 +634,12 @@ void CLIP_OT_slide_marker(wmOperatorType *ot)
ot->idname = "CLIP_OT_slide_marker";
/* api callbacks */
- ot->poll = space_clip_frame_poll;
+ ot->poll = ED_space_clip_tracking_size_poll;
ot->invoke = slide_marker_invoke;
ot->modal = slide_marker_modal;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_GRAB_POINTER|OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_GRAB_POINTER | OPTYPE_BLOCKING;
/* properties */
RNA_def_float_vector(ot->srna, "offset", 2, NULL, -FLT_MAX, FLT_MAX,
@@ -671,10 +662,10 @@ static int mouse_on_side(float co[2], float x1, float y1, float x2, float y2, fl
static int mouse_on_rect(float co[2], float pos[2], float min[2], float max[2], float epsx, float epsy)
{
- return mouse_on_side(co, pos[0]+min[0], pos[1]+min[1], pos[0]+max[0], pos[1]+min[1], epsx, epsy) ||
- mouse_on_side(co, pos[0]+min[0], pos[1]+min[1], pos[0]+min[0], pos[1]+max[1], epsx, epsy) ||
- mouse_on_side(co, pos[0]+min[0], pos[1]+max[1], pos[0]+max[0], pos[1]+max[1], epsx, epsy) ||
- mouse_on_side(co, pos[0]+max[0], pos[1]+min[1], pos[0]+max[0], pos[1]+max[1], epsx, epsy);
+ return mouse_on_side(co, pos[0] + min[0], pos[1] + min[1], pos[0] + max[0], pos[1] + min[1], epsx, epsy) ||
+ mouse_on_side(co, pos[0] + min[0], pos[1] + min[1], pos[0] + min[0], pos[1] + max[1], epsx, epsy) ||
+ mouse_on_side(co, pos[0] + min[0], pos[1] + max[1], pos[0] + max[0], pos[1] + max[1], epsx, epsy) ||
+ mouse_on_side(co, pos[0] + max[0], pos[1] + min[1], pos[0] + max[0], pos[1] + max[1], epsx, epsy);
}
static int track_mouse_area(SpaceClip *sc, float co[2], MovieTrackingTrack *track)
@@ -685,9 +676,9 @@ static int track_mouse_area(SpaceClip *sc, float co[2], MovieTrackingTrack *trac
ED_space_clip_size(sc, &width, &height);
- epsx = MIN4(track->pat_min[0]-track->search_min[0], track->search_max[0]-track->pat_max[0],
+ epsx = MIN4(track->pat_min[0] - track->search_min[0], track->search_max[0] - track->pat_max[0],
fabsf(track->pat_min[0]), fabsf(track->pat_max[0])) / 2;
- epsy = MIN4(track->pat_min[1]-track->search_min[1], track->search_max[1]-track->pat_max[1],
+ epsy = MIN4(track->pat_min[1] - track->search_min[1], track->search_max[1] - track->pat_max[1],
fabsf(track->pat_min[1]), fabsf(track->pat_max[1])) / 2;
epsx = MAX2(epsx, 2.0f / width);
@@ -698,7 +689,7 @@ static int track_mouse_area(SpaceClip *sc, float co[2], MovieTrackingTrack *trac
return TRACK_AREA_SEARCH;
}
- if ((marker->flag & MARKER_DISABLED)== 0) {
+ if ((marker->flag & MARKER_DISABLED) == 0) {
if (sc->flag & SC_SHOW_MARKER_PATTERN)
if (mouse_on_rect(co, marker->pos, track->pat_min, track->pat_max, epsx, epsy))
return TRACK_AREA_PAT;
@@ -706,8 +697,11 @@ static int track_mouse_area(SpaceClip *sc, float co[2], MovieTrackingTrack *trac
epsx = 12.0f / width;
epsy = 12.0f / height;
- if (fabsf(co[0]-marker->pos[0]-track->offset[0])< epsx && fabsf(co[1]-marker->pos[1]-track->offset[1])<=epsy)
+ if (fabsf(co[0] - marker->pos[0] - track->offset[0]) < epsx &&
+ fabsf(co[1] - marker->pos[1] - track->offset[1]) <= epsy)
+ {
return TRACK_AREA_POINT;
+ }
}
return TRACK_AREA_NONE;
@@ -716,7 +710,7 @@ static int track_mouse_area(SpaceClip *sc, float co[2], MovieTrackingTrack *trac
static float dist_to_rect(float co[2], float pos[2], float min[2], float max[2])
{
float d1, d2, d3, d4;
- float p[2] = {co[0]-pos[0], co[1]-pos[1]};
+ float p[2] = {co[0] - pos[0], co[1] - pos[1]};
float v1[2] = {min[0], min[1]}, v2[2] = {max[0], min[1]},
v3[2] = {max[0], max[1]}, v4[2] = {min[0], max[1]};
@@ -737,24 +731,25 @@ static MovieTrackingTrack *find_nearest_track(SpaceClip *sc, ListBase *tracksbas
while (cur) {
MovieTrackingMarker *marker = BKE_tracking_get_marker(cur, sc->user.framenr);
- if (((cur->flag & TRACK_HIDDEN) == 0) && MARKER_VISIBLE(sc, marker)) {
+ if (((cur->flag & TRACK_HIDDEN) == 0) && MARKER_VISIBLE(sc, cur, marker)) {
float dist, d1, d2 = FLT_MAX, d3 = FLT_MAX;
- d1= sqrtf((co[0]-marker->pos[0]-cur->offset[0])*(co[0]-marker->pos[0]-cur->offset[0])+
- (co[1]-marker->pos[1]-cur->offset[1])*(co[1]-marker->pos[1]-cur->offset[1])); /* distance to marker point */
+ /* distance to marker point */
+ d1 = sqrtf((co[0] - marker->pos[0] - cur->offset[0]) * (co[0] - marker->pos[0] - cur->offset[0]) +
+ (co[1] - marker->pos[1] - cur->offset[1]) * (co[1] - marker->pos[1] - cur->offset[1]));
/* distance to pattern boundbox */
if (sc->flag & SC_SHOW_MARKER_PATTERN)
- d2= dist_to_rect(co, marker->pos, cur->pat_min, cur->pat_max);
+ d2 = dist_to_rect(co, marker->pos, cur->pat_min, cur->pat_max);
/* distance to search boundbox */
if (sc->flag & SC_SHOW_MARKER_SEARCH && TRACK_VIEW_SELECTED(sc, cur))
- d3= dist_to_rect(co, marker->pos, cur->search_min, cur->search_max);
+ d3 = dist_to_rect(co, marker->pos, cur->search_min, cur->search_max);
/* choose minimal distance. useful for cases of overlapped markers. */
dist = MIN3(d1, d2, d3);
- if (track == NULL || dist<mindist) {
+ if (track == NULL || dist < mindist) {
track = cur;
mindist = dist;
}
@@ -803,7 +798,9 @@ static int mouse_select(bContext *C, float co[2], int extend)
sc->ylockof = 0.0f;
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, NULL);
+ BKE_tracking_dopesheet_tag_update(tracking);
+
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, NULL);
return OPERATOR_FINISHED;
}
@@ -833,7 +830,7 @@ static int select_invoke(bContext *C, wmOperator *op, wmEvent *event)
clip->tracking.act_track = slidedata->track;
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, NULL);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, NULL);
MEM_freeN(slidedata);
@@ -857,7 +854,7 @@ void CLIP_OT_select(wmOperatorType *ot)
/* api callbacks */
ot->exec = select_exec;
ot->invoke = select_invoke;
- ot->poll = ED_space_clip_poll;
+ ot->poll = ED_space_clip_tracking_poll;
/* flags */
ot->flag = OPTYPE_UNDO;
@@ -875,8 +872,9 @@ static int border_select_exec(bContext *C, wmOperator *op)
{
SpaceClip *sc = CTX_wm_space_clip(C);
MovieClip *clip = ED_space_clip(sc);
+ MovieTracking *tracking = &clip->tracking;
MovieTrackingTrack *track;
- ListBase *tracksbase = BKE_tracking_get_tracks(&clip->tracking);
+ ListBase *tracksbase = BKE_tracking_get_tracks(tracking);
rcti rect;
rctf rectf;
int change = FALSE, mode, extend;
@@ -899,9 +897,9 @@ static int border_select_exec(bContext *C, wmOperator *op)
if ((track->flag & TRACK_HIDDEN) == 0) {
MovieTrackingMarker *marker = BKE_tracking_get_marker(track, sc->user.framenr);
- if (MARKER_VISIBLE(sc, marker)) {
+ if (MARKER_VISIBLE(sc, track, marker)) {
if (BLI_in_rctf(&rectf, marker->pos[0], marker->pos[1])) {
- BKE_tracking_track_flag(track, TRACK_AREA_ALL, SELECT, mode!=GESTURE_MODAL_SELECT);
+ BKE_tracking_track_flag(track, TRACK_AREA_ALL, SELECT, mode != GESTURE_MODAL_SELECT);
}
else if (!extend) {
BKE_tracking_track_flag(track, TRACK_AREA_ALL, SELECT, 1);
@@ -915,7 +913,9 @@ static int border_select_exec(bContext *C, wmOperator *op)
}
if (change) {
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, NULL);
+ BKE_tracking_dopesheet_tag_update(tracking);
+
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, NULL);
return OPERATOR_FINISHED;
}
@@ -934,7 +934,7 @@ void CLIP_OT_select_border(wmOperatorType *ot)
ot->invoke = WM_border_select_invoke;
ot->exec = border_select_exec;
ot->modal = WM_border_select_modal;
- ot->poll = ED_space_clip_poll;
+ ot->poll = ED_space_clip_tracking_poll;
/* flags */
ot->flag = OPTYPE_UNDO;
@@ -961,8 +961,9 @@ static int circle_select_exec(bContext *C, wmOperator *op)
SpaceClip *sc = CTX_wm_space_clip(C);
MovieClip *clip = ED_space_clip(sc);
ARegion *ar = CTX_wm_region(C);
+ MovieTracking *tracking = &clip->tracking;
MovieTrackingTrack *track;
- ListBase *tracksbase = BKE_tracking_get_tracks(&clip->tracking);
+ ListBase *tracksbase = BKE_tracking_get_tracks(tracking);
int x, y, radius, width, height, mode, change = FALSE;
float zoomx, zoomy, offset[2], ellipse[2];
@@ -988,8 +989,8 @@ static int circle_select_exec(bContext *C, wmOperator *op)
if ((track->flag & TRACK_HIDDEN) == 0) {
MovieTrackingMarker *marker = BKE_tracking_get_marker(track, sc->user.framenr);
- if (MARKER_VISIBLE(sc, marker) && marker_inside_ellipse(marker, offset, ellipse)) {
- BKE_tracking_track_flag(track, TRACK_AREA_ALL, SELECT, mode!=GESTURE_MODAL_SELECT);
+ if (MARKER_VISIBLE(sc, track, marker) && marker_inside_ellipse(marker, offset, ellipse)) {
+ BKE_tracking_track_flag(track, TRACK_AREA_ALL, SELECT, mode != GESTURE_MODAL_SELECT);
change = TRUE;
}
@@ -999,7 +1000,9 @@ static int circle_select_exec(bContext *C, wmOperator *op)
}
if (change) {
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, NULL);
+ BKE_tracking_dopesheet_tag_update(tracking);
+
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, NULL);
return OPERATOR_FINISHED;
}
@@ -1018,10 +1021,10 @@ void CLIP_OT_select_circle(wmOperatorType *ot)
ot->invoke = WM_gesture_circle_invoke;
ot->modal = WM_gesture_circle_modal;
ot->exec = circle_select_exec;
- ot->poll = ED_space_clip_poll;
+ ot->poll = ED_space_clip_tracking_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_int(ot->srna, "x", 0, INT_MIN, INT_MAX, "X", "", INT_MIN, INT_MAX);
@@ -1036,9 +1039,10 @@ static int select_all_exec(bContext *C, wmOperator *op)
{
SpaceClip *sc = CTX_wm_space_clip(C);
MovieClip *clip = ED_space_clip(sc);
+ MovieTracking *tracking = &clip->tracking;
MovieTrackingTrack *track = NULL; /* selected track */
MovieTrackingMarker *marker;
- ListBase *tracksbase = BKE_tracking_get_tracks(&clip->tracking);
+ ListBase *tracksbase = BKE_tracking_get_tracks(tracking);
int action = RNA_enum_get(op->ptr, "action");
int framenr = sc->user.framenr;
int has_selection = FALSE;
@@ -1050,7 +1054,7 @@ static int select_all_exec(bContext *C, wmOperator *op)
if (TRACK_VIEW_SELECTED(sc, track)) {
marker = BKE_tracking_get_marker(track, framenr);
- if (MARKER_VISIBLE(sc, marker)) {
+ if (MARKER_VISIBLE(sc, track, marker)) {
action = SEL_DESELECT;
break;
}
@@ -1062,10 +1066,10 @@ static int select_all_exec(bContext *C, wmOperator *op)
track = tracksbase->first;
while (track) {
- if ((track->flag & TRACK_HIDDEN)==0) {
+ if ((track->flag & TRACK_HIDDEN) == 0) {
marker = BKE_tracking_get_marker(track, framenr);
- if (MARKER_VISIBLE(sc, marker)) {
+ if (MARKER_VISIBLE(sc, track, marker)) {
switch (action) {
case SEL_SELECT:
track->flag |= SELECT;
@@ -1095,7 +1099,9 @@ static int select_all_exec(bContext *C, wmOperator *op)
if (!has_selection)
sc->flag &= ~SC_LOCK_SELECTION;
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, NULL);
+ BKE_tracking_dopesheet_tag_update(tracking);
+
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, NULL);
return OPERATOR_FINISHED;
}
@@ -1109,10 +1115,10 @@ void CLIP_OT_select_all(wmOperatorType *ot)
/* api callbacks */
ot->exec = select_all_exec;
- ot->poll = ED_space_clip_poll;
+ ot->poll = ED_space_clip_tracking_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
WM_operator_properties_select_all(ot);
}
@@ -1136,7 +1142,7 @@ static int select_groped_exec(bContext *C, wmOperator *op)
marker = BKE_tracking_get_marker(track, sc->user.framenr);
if (group == 0) { /* Keyframed */
- ok = marker->framenr == sc->user.framenr && (marker->flag & MARKER_TRACKED)==0;
+ ok = marker->framenr == sc->user.framenr && (marker->flag & MARKER_TRACKED) == 0;
}
else if (group == 1) { /* Estimated */
ok = marker->framenr != sc->user.framenr;
@@ -1175,7 +1181,9 @@ static int select_groped_exec(bContext *C, wmOperator *op)
track = track->next;
}
- WM_event_add_notifier(C, NC_MOVIECLIP|ND_DISPLAY, clip);
+ BKE_tracking_dopesheet_tag_update(tracking);
+
+ WM_event_add_notifier(C, NC_MOVIECLIP | ND_DISPLAY, clip);
return OPERATOR_FINISHED;
}
@@ -1200,10 +1208,10 @@ void CLIP_OT_select_grouped(wmOperatorType *ot)
/* api callbacks */
ot->exec = select_groped_exec;
- ot->poll = space_clip_frame_poll;
+ ot->poll = ED_space_clip_tracking_size_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* proeprties */
RNA_def_enum(ot->srna, "group", select_group_items, TRACK_CLEAR_REMAINED, "Action", "Clear action to execute");
@@ -1255,10 +1263,10 @@ static void clear_invisible_track_selection(SpaceClip *sc, MovieClip *clip)
ListBase *tracksbase = BKE_tracking_get_tracks(&clip->tracking);
int hidden = 0;
- if ((sc->flag & SC_SHOW_MARKER_PATTERN)==0)
+ if ((sc->flag & SC_SHOW_MARKER_PATTERN) == 0)
hidden |= TRACK_AREA_PAT;
- if ((sc->flag & SC_SHOW_MARKER_SEARCH)==0)
+ if ((sc->flag & SC_SHOW_MARKER_SEARCH) == 0)
hidden |= TRACK_AREA_SEARCH;
if (hidden) {
@@ -1285,7 +1293,7 @@ static void track_init_markers(SpaceClip *sc, MovieClip *clip, int *frames_limit
track = tracksbase->first;
while (track) {
if (TRACK_VIEW_SELECTED(sc, track)) {
- if ((track->flag & TRACK_HIDDEN)==0 && (track->flag & TRACK_LOCKED)==0) {
+ if ((track->flag & TRACK_HIDDEN) == 0 && (track->flag & TRACK_LOCKED) == 0) {
BKE_tracking_ensure_marker(track, framenr);
if (track->frames_limit) {
@@ -1392,15 +1400,15 @@ static void track_markers_startjob(void *tmv, short *stop, short *do_update, flo
if (!BKE_tracking_next(tmj->context))
break;
- exec_time = PIL_check_seconds_timer()-start_time;
+ exec_time = PIL_check_seconds_timer() - start_time;
if (tmj->delay > (float)exec_time)
- PIL_sleep_ms(tmj->delay-(float)exec_time);
+ PIL_sleep_ms(tmj->delay - (float)exec_time);
}
else if (!BKE_tracking_next(tmj->context))
break;
*do_update = TRUE;
- *progress = (float)(framenr-tmj->sfra) / (tmj->efra-tmj->sfra);
+ *progress = (float)(framenr - tmj->sfra) / (tmj->efra - tmj->sfra);
if (tmj->backwards)
framenr--;
@@ -1436,7 +1444,7 @@ static void track_markers_freejob(void *tmv)
MEM_freeN(tmj);
- WM_main_add_notifier(NC_SCENE|ND_FRAME, tmj->scene);
+ WM_main_add_notifier(NC_SCENE | ND_FRAME, tmj->scene);
}
static int track_markers_exec(bContext *C, wmOperator *op)
@@ -1451,7 +1459,7 @@ static int track_markers_exec(bContext *C, wmOperator *op)
int sequence = RNA_boolean_get(op->ptr, "sequence");
int frames_limit;
- if (track_count_markers(sc, clip)==0)
+ if (track_count_markers(sc, clip) == 0)
return OPERATOR_CANCELLED;
track_init_markers(sc, clip, &frames_limit);
@@ -1463,8 +1471,10 @@ static int track_markers_exec(bContext *C, wmOperator *op)
/* limit frames to be tracked by user setting */
if (frames_limit) {
- if (backwards) efra = MAX2(efra, sfra-frames_limit);
- else efra = MIN2(efra, sfra+frames_limit);
+ if (backwards)
+ efra = MAX2(efra, sfra - frames_limit);
+ else
+ efra = MIN2(efra, sfra + frames_limit);
}
if (!track_markers_check_direction(backwards, framenr, efra))
@@ -1490,8 +1500,8 @@ static int track_markers_exec(bContext *C, wmOperator *op)
/* update scene current frame to the lastes tracked frame */
scene->r.cfra = framenr;
- WM_event_add_notifier(C, NC_MOVIECLIP|NA_EVALUATED, clip);
- WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene);
+ WM_event_add_notifier(C, NC_MOVIECLIP | NA_EVALUATED, clip);
+ WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene);
return OPERATOR_FINISHED;
}
@@ -1514,7 +1524,7 @@ static int track_markers_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve
if (clip->tracking_context)
return OPERATOR_CANCELLED;
- if (track_count_markers(sc, clip)==0)
+ if (track_count_markers(sc, clip) == 0)
return OPERATOR_CANCELLED;
if (!sequence)
@@ -1535,8 +1545,10 @@ static int track_markers_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve
* with fixed FPS. To deal with editor refresh we have to synchronize
* tracks from job and tracks in clip. Do this in timer callback
* to prevent threading conflicts. */
- if (tmj->delay>0) WM_jobs_timer(steve, tmj->delay/1000.0f, NC_MOVIECLIP|NA_EVALUATED, 0);
- else WM_jobs_timer(steve, 0.2, NC_MOVIECLIP|NA_EVALUATED, 0);
+ if (tmj->delay > 0)
+ WM_jobs_timer(steve, tmj->delay / 1000.0f, NC_MOVIECLIP | NA_EVALUATED, 0);
+ else
+ WM_jobs_timer(steve, 0.2, NC_MOVIECLIP | NA_EVALUATED, 0);
WM_jobs_callbacks(steve, track_markers_startjob, NULL, track_markers_updatejob, NULL);
@@ -1554,8 +1566,8 @@ static int track_markers_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve
static int track_markers_modal(bContext *C, wmOperator *UNUSED(op), wmEvent *event)
{
/* no running tracking, remove handler and pass through */
- if (0==WM_jobs_test(CTX_wm_manager(C), CTX_wm_area(C)))
- return OPERATOR_FINISHED|OPERATOR_PASS_THROUGH;
+ if (0 == WM_jobs_test(CTX_wm_manager(C), CTX_wm_area(C)))
+ return OPERATOR_FINISHED | OPERATOR_PASS_THROUGH;
/* running tracking */
switch (event->type) {
@@ -1577,7 +1589,7 @@ void CLIP_OT_track_markers(wmOperatorType *ot)
/* api callbacks */
ot->exec = track_markers_exec;
ot->invoke = track_markers_invoke;
- ot->poll = space_clip_frame_poll;
+ ot->poll = ED_space_clip_tracking_frame_poll;
ot->modal = track_markers_modal;
/* flags */
@@ -1692,8 +1704,8 @@ static void solve_camera_freejob(void *scv)
DAG_id_tag_update(&clip->id, 0);
- WM_main_add_notifier(NC_MOVIECLIP|NA_EVALUATED, clip);
- WM_main_add_notifier(NC_OBJECT|ND_TRANSFORM, NULL);
+ WM_main_add_notifier(NC_MOVIECLIP | NA_EVALUATED, clip);
+ WM_main_add_notifier(NC_OBJECT | ND_TRANSFORM, NULL);
/* update active clip displayed in scene buttons */
WM_main_add_notifier(NC_SCENE, scene);
@@ -1754,12 +1766,12 @@ static int solve_camera_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even
/* hide reconstruction statistics from previous solve */
reconstruction->flag &= ~TRACKING_RECONSTRUCTED;
- WM_event_add_notifier(C, NC_MOVIECLIP|NA_EVALUATED, clip);
+ WM_event_add_notifier(C, NC_MOVIECLIP | NA_EVALUATED, clip);
/* setup job */
steve = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), sa, "Solve Camera", WM_JOB_PROGRESS);
WM_jobs_customdata(steve, scj, solve_camera_freejob);
- WM_jobs_timer(steve, 0.1, NC_MOVIECLIP|NA_EVALUATED, 0);
+ WM_jobs_timer(steve, 0.1, NC_MOVIECLIP | NA_EVALUATED, 0);
WM_jobs_callbacks(steve, solve_camera_startjob, NULL, solve_camera_updatejob, NULL);
G.afbreek = 0;
@@ -1777,7 +1789,7 @@ static int solve_camera_modal(bContext *C, wmOperator *UNUSED(op), wmEvent *even
{
/* no running solver, remove handler and pass through */
if (0 == WM_jobs_test(CTX_wm_manager(C), CTX_wm_area(C)))
- return OPERATOR_FINISHED|OPERATOR_PASS_THROUGH;
+ return OPERATOR_FINISHED | OPERATOR_PASS_THROUGH;
/* running tracking */
switch (event->type) {
@@ -1800,10 +1812,10 @@ void CLIP_OT_solve_camera(wmOperatorType *ot)
ot->exec = solve_camera_exec;
ot->invoke = solve_camera_invoke;
ot->modal = solve_camera_modal;
- ot->poll = ED_space_clip_poll;
+ ot->poll = ED_space_clip_tracking_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/********************** clear solution operator *********************/
@@ -1833,8 +1845,8 @@ static int clear_solution_exec(bContext *C, wmOperator *UNUSED(op))
DAG_id_tag_update(&clip->id, 0);
- WM_event_add_notifier(C, NC_MOVIECLIP|NA_EVALUATED, clip);
- WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ WM_event_add_notifier(C, NC_MOVIECLIP | NA_EVALUATED, clip);
+ WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, NULL);
return OPERATOR_FINISHED;
}
@@ -1848,10 +1860,10 @@ void CLIP_OT_clear_solution(wmOperatorType *ot)
/* api callbacks */
ot->exec = clear_solution_exec;
- ot->poll = ED_space_clip_poll;
+ ot->poll = ED_space_clip_tracking_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/********************** clear track operator *********************/
@@ -1879,7 +1891,7 @@ static int clear_track_path_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_MOVIECLIP|NA_EVALUATED, clip);
+ WM_event_add_notifier(C, NC_MOVIECLIP | NA_EVALUATED, clip);
return OPERATOR_FINISHED;
}
@@ -1900,10 +1912,10 @@ void CLIP_OT_clear_track_path(wmOperatorType *ot)
/* api callbacks */
ot->exec = clear_track_path_exec;
- ot->poll = ED_space_clip_poll;
+ ot->poll = ED_space_clip_tracking_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* proeprties */
RNA_def_enum(ot->srna, "action", clear_path_actions, TRACK_CLEAR_REMAINED, "Action", "Clear action to execute");
@@ -1922,7 +1934,7 @@ static int disable_markers_exec(bContext *C, wmOperator *op)
int action = RNA_enum_get(op->ptr, "action");
while (track) {
- if (TRACK_VIEW_SELECTED(sc, track) && (track->flag & TRACK_LOCKED)==0) {
+ if (TRACK_VIEW_SELECTED(sc, track) && (track->flag & TRACK_LOCKED) == 0) {
MovieTrackingMarker *marker = BKE_tracking_ensure_marker(track, sc->user.framenr);
if (action == 0)
@@ -1937,7 +1949,7 @@ static int disable_markers_exec(bContext *C, wmOperator *op)
DAG_id_tag_update(&clip->id, 0);
- WM_event_add_notifier(C, NC_MOVIECLIP|NA_EVALUATED, clip);
+ WM_event_add_notifier(C, NC_MOVIECLIP | NA_EVALUATED, clip);
return OPERATOR_FINISHED;
}
@@ -1958,10 +1970,10 @@ void CLIP_OT_disable_markers(wmOperatorType *ot)
/* api callbacks */
ot->exec = disable_markers_exec;
- ot->poll = ED_space_clip_poll;
+ ot->poll = ED_space_clip_tracking_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "action", actions_items, 0, "Action", "Disable action to execute");
@@ -1974,13 +1986,13 @@ static Object *get_camera_with_movieclip(Scene *scene, MovieClip *clip)
Object *camera = scene->camera;
Base *base;
- if (camera && object_get_movieclip(scene, camera, 0)==clip)
+ if (camera && BKE_object_movieclip_get(scene, camera, 0) == clip)
return camera;
base = scene->base.first;
while (base) {
if (base->object->type == OB_CAMERA) {
- if (object_get_movieclip(scene, base->object, 0)==clip) {
+ if (BKE_object_movieclip_get(scene, base->object, 0) == clip) {
camera = base->object;
break;
}
@@ -2016,7 +2028,7 @@ static Object *get_orientation_object(bContext *C)
static int set_orientation_poll(bContext *C)
{
- if (space_clip_frame_poll(C)) {
+ if (ED_space_clip_tracking_size_poll(C)) {
Scene *scene = CTX_data_scene(C);
SpaceClip *sc = CTX_wm_space_clip(C);
MovieClip *clip = ED_space_clip(sc);
@@ -2070,7 +2082,7 @@ static void object_solver_inverted_matrix(Scene *scene, Object *ob, float invmat
if (!found) {
Object *cam = data->camera ? data->camera : scene->camera;
- where_is_object_mat(scene, cam, invmat);
+ BKE_object_where_is_calc_mat4(scene, cam, invmat);
}
mult_m4_m4m4(invmat, invmat, data->invmat);
@@ -2145,7 +2157,7 @@ static int set_origin_exec(bContext *C, wmOperator *op)
track = track->next;
}
- mul_v3_fl(median, 1.0f/selected_count);
+ mul_v3_fl(median, 1.0f / selected_count);
BKE_get_tracking_mat(scene, camera, mat);
@@ -2163,8 +2175,8 @@ static int set_origin_exec(bContext *C, wmOperator *op)
DAG_id_tag_update(&clip->id, 0);
DAG_id_tag_update(&object->id, OB_RECALC_OB);
- WM_event_add_notifier(C, NC_MOVIECLIP|NA_EVALUATED, clip);
- WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
+ WM_event_add_notifier(C, NC_MOVIECLIP | NA_EVALUATED, clip);
+ WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
return OPERATOR_FINISHED;
}
@@ -2181,7 +2193,7 @@ void CLIP_OT_set_origin(wmOperatorType *ot)
ot->poll = set_orientation_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "use_median", 0, "Use Median", "Set origin to median point of selected bundles");
@@ -2197,7 +2209,7 @@ static void set_axis(Scene *scene, Object *ob, MovieClip *clip, MovieTrackingOb
int flip = FALSE;
float mat[4][4], vec[3], obmat[4][4], dvec[3];
- object_to_mat4(ob, obmat);
+ BKE_object_to_mat4(ob, obmat);
BKE_get_tracking_mat(scene, camera, mat);
mul_v3_m4v3(vec, mat, track->bundle_pos);
@@ -2255,7 +2267,7 @@ static void set_axis(Scene *scene, Object *ob, MovieClip *clip, MovieTrackingOb
else {
copy_v3_v3(mat[1], vec);
- if (is_camera || fabsf(vec[2])<1e-3f) {
+ if (is_camera || fabsf(vec[2]) < 1e-3f) {
mat[1][2] = 0.0f;
mat[2][0] = 0.0f; mat[2][1] = 0.0f; mat[2][2] = 1.0f;
cross_v3_v3v3(mat[0], mat[1], mat[2]);
@@ -2282,7 +2294,7 @@ static void set_axis(Scene *scene, Object *ob, MovieClip *clip, MovieTrackingOb
if (!flip) {
float lmat[4][4], ilmat[4][4], rmat[3][3];
- object_rot_to_mat3(ob, rmat);
+ BKE_object_rot_to_mat3(ob, rmat);
invert_m3(rmat);
mul_m4_m4m3(mat, mat, rmat);
@@ -2297,7 +2309,7 @@ static void set_axis(Scene *scene, Object *ob, MovieClip *clip, MovieTrackingOb
}
}
- object_apply_mat4(ob, mat, 0, 0);
+ BKE_object_apply_mat4(ob, mat, 0, 0);
}
static int set_plane_exec(bContext *C, wmOperator *op)
@@ -2319,7 +2331,7 @@ static int set_plane_exec(bContext *C, wmOperator *op)
{1.0f, 0.0f, 0.0f, 0.0f},
{0.0f, 0.0f, 0.0f, 1.0f}}; /* 90 degrees Y-axis rotation matrix */
- if (count_selected_bundles(C)!=3) {
+ if (count_selected_bundles(C) != 3) {
BKE_report(op->reports, RPT_ERROR, "Three tracks with bundles are needed to orient the floor");
return OPERATOR_CANCELLED;
@@ -2340,7 +2352,7 @@ static int set_plane_exec(bContext *C, wmOperator *op)
/* get 3 bundles to use as reference */
track = tracksbase->first;
- while (track && tot<3) {
+ while (track && tot < 3) {
if (track->flag & TRACK_HAS_BUNDLE && TRACK_VIEW_SELECTED(sc, track)) {
mul_v3_m4v3(vec[tot], mat, track->bundle_pos);
@@ -2384,30 +2396,30 @@ static int set_plane_exec(bContext *C, wmOperator *op)
if (tracking_object->flag & TRACKING_OBJECT_CAMERA) {
invert_m4(mat);
- object_to_mat4(object, obmat);
+ BKE_object_to_mat4(object, obmat);
mult_m4_m4m4(mat, mat, obmat);
mult_m4_m4m4(newmat, rot, mat);
- object_apply_mat4(object, newmat, 0, 0);
+ BKE_object_apply_mat4(object, newmat, 0, 0);
/* make camera have positive z-coordinate */
- if (object->loc[2]<0) {
+ if (object->loc[2] < 0) {
invert_m4(rot);
mult_m4_m4m4(newmat, rot, mat);
- object_apply_mat4(object, newmat, 0, 0);
+ BKE_object_apply_mat4(object, newmat, 0, 0);
}
}
else {
- object_apply_mat4(object, mat, 0, 0);
+ BKE_object_apply_mat4(object, mat, 0, 0);
}
- where_is_object(scene, object);
+ BKE_object_where_is_calc(scene, object);
set_axis(scene, object, clip, tracking_object, axis_track, 'X');
DAG_id_tag_update(&clip->id, 0);
DAG_id_tag_update(&object->id, OB_RECALC_OB);
- WM_event_add_notifier(C, NC_MOVIECLIP|NA_EVALUATED, clip);
- WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
+ WM_event_add_notifier(C, NC_MOVIECLIP | NA_EVALUATED, clip);
+ WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
return OPERATOR_FINISHED;
}
@@ -2430,7 +2442,7 @@ void CLIP_OT_set_plane(wmOperatorType *ot)
ot->poll = set_orientation_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "plane", plane_items, 0, "Plane", "Plane to be used for orientation");
@@ -2450,7 +2462,7 @@ static int set_axis_exec(bContext *C, wmOperator *op)
ListBase *tracksbase;
int axis = RNA_enum_get(op->ptr, "axis");
- if (count_selected_bundles(C)!=1) {
+ if (count_selected_bundles(C) != 1) {
BKE_report(op->reports, RPT_ERROR, "Single track with bundle should be selected to define axis");
return OPERATOR_CANCELLED;
@@ -2478,8 +2490,8 @@ static int set_axis_exec(bContext *C, wmOperator *op)
DAG_id_tag_update(&clip->id, 0);
DAG_id_tag_update(&object->id, OB_RECALC_OB);
- WM_event_add_notifier(C, NC_MOVIECLIP|NA_EVALUATED, clip);
- WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
+ WM_event_add_notifier(C, NC_MOVIECLIP | NA_EVALUATED, clip);
+ WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
return OPERATOR_FINISHED;
}
@@ -2502,7 +2514,7 @@ void CLIP_OT_set_axis(wmOperatorType *ot)
ot->poll = set_orientation_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "axis", axis_actions, 0, "Axis", "Axis to use to align bundle along");
@@ -2552,7 +2564,7 @@ static int do_set_scale(bContext *C, wmOperator *op, int scale_solution)
sub_v3_v3(vec[0], vec[1]);
- if (len_v3(vec[0])>1e-5f) {
+ if (len_v3(vec[0]) > 1e-5f) {
scale = dist / len_v3(vec[0]);
if (tracking_object->flag & TRACKING_OBJECT_CAMERA) {
@@ -2562,7 +2574,7 @@ static int do_set_scale(bContext *C, wmOperator *op, int scale_solution)
else if (!scale_solution) {
Object *solver_camera = object_solver_camera(scene, object);
- object->size[0] = object->size[1] = object->size[2] = 1.0f/scale;
+ object->size[0] = object->size[1] = object->size[2] = 1.0f / scale;
if (solver_camera) {
object->size[0] /= solver_camera->size[0];
@@ -2579,8 +2591,8 @@ static int do_set_scale(bContext *C, wmOperator *op, int scale_solution)
if (object)
DAG_id_tag_update(&object->id, OB_RECALC_OB);
- WM_event_add_notifier(C, NC_MOVIECLIP|NA_EVALUATED, clip);
- WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
+ WM_event_add_notifier(C, NC_MOVIECLIP | NA_EVALUATED, clip);
+ WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
}
return OPERATOR_FINISHED;
@@ -2615,7 +2627,7 @@ void CLIP_OT_set_scale(wmOperatorType *ot)
ot->poll = set_orientation_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_float(ot->srna, "distance", 0.0f, -FLT_MAX, FLT_MAX,
@@ -2626,7 +2638,7 @@ void CLIP_OT_set_scale(wmOperatorType *ot)
static int set_solution_scale_poll(bContext *C)
{
- if (space_clip_frame_poll(C)) {
+ if (ED_space_clip_tracking_size_poll(C)) {
SpaceClip *sc = CTX_wm_space_clip(C);
MovieClip *clip = ED_space_clip(sc);
MovieTracking *tracking = &clip->tracking;
@@ -2667,7 +2679,7 @@ void CLIP_OT_set_solution_scale(wmOperatorType *ot)
ot->poll = set_solution_scale_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_float(ot->srna, "distance", 0.0f, -FLT_MAX, FLT_MAX,
@@ -2687,10 +2699,10 @@ static int set_center_principal_exec(bContext *C, wmOperator *UNUSED(op))
if (width == 0 || height == 0)
return OPERATOR_CANCELLED;
- clip->tracking.camera.principal[0] = ((float)width)/2.0f;
- clip->tracking.camera.principal[1] = ((float)height)/2.0f;
+ clip->tracking.camera.principal[0] = ((float)width) / 2.0f;
+ clip->tracking.camera.principal[1] = ((float)height) / 2.0f;
- WM_event_add_notifier(C, NC_MOVIECLIP|NA_EDITED, clip);
+ WM_event_add_notifier(C, NC_MOVIECLIP | NA_EDITED, clip);
return OPERATOR_FINISHED;
}
@@ -2704,10 +2716,10 @@ void CLIP_OT_set_center_principal(wmOperatorType *ot)
/* api callbacks */
ot->exec = set_center_principal_exec;
- ot->poll = ED_space_clip_poll;
+ ot->poll = ED_space_clip_tracking_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/********************** hide tracks operator *********************/
@@ -2744,7 +2756,9 @@ static int hide_tracks_exec(bContext *C, wmOperator *op)
sc->flag &= ~SC_LOCK_SELECTION;
}
- WM_event_add_notifier(C, NC_MOVIECLIP|ND_DISPLAY, NULL);
+ BKE_tracking_dopesheet_tag_update(tracking);
+
+ WM_event_add_notifier(C, NC_MOVIECLIP | ND_DISPLAY, NULL);
return OPERATOR_FINISHED;
}
@@ -2758,10 +2772,10 @@ void CLIP_OT_hide_tracks(wmOperatorType *ot)
/* api callbacks */
ot->exec = hide_tracks_exec;
- ot->poll = ED_space_clip_poll;
+ ot->poll = ED_space_clip_tracking_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected tracks");
@@ -2773,7 +2787,8 @@ static int hide_tracks_clear_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceClip *sc = CTX_wm_space_clip(C);
MovieClip *clip = ED_space_clip(sc);
- ListBase *tracksbase = BKE_tracking_get_tracks(&clip->tracking);
+ MovieTracking *tracking = &clip->tracking;
+ ListBase *tracksbase = BKE_tracking_get_tracks(tracking);
MovieTrackingTrack *track;
track = tracksbase->first;
@@ -2783,7 +2798,9 @@ static int hide_tracks_clear_exec(bContext *C, wmOperator *UNUSED(op))
track = track->next;
}
- WM_event_add_notifier(C, NC_MOVIECLIP|ND_DISPLAY, NULL);
+ BKE_tracking_dopesheet_tag_update(tracking);
+
+ WM_event_add_notifier(C, NC_MOVIECLIP | ND_DISPLAY, NULL);
return OPERATOR_FINISHED;
}
@@ -2797,10 +2814,10 @@ void CLIP_OT_hide_tracks_clear(wmOperatorType *ot)
/* api callbacks */
ot->exec = hide_tracks_clear_exec;
- ot->poll = ED_space_clip_poll;
+ ot->poll = ED_space_clip_tracking_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/********************** detect features operator *********************/
@@ -2858,7 +2875,7 @@ static int detect_features_exec(bContext *C, wmOperator *op)
IMB_freeImBuf(ibuf);
- WM_event_add_notifier(C, NC_MOVIECLIP|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_MOVIECLIP | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
@@ -2879,10 +2896,10 @@ void CLIP_OT_detect_features(wmOperatorType *ot)
/* api callbacks */
ot->exec = detect_features_exec;
- ot->poll = space_clip_frame_poll;
+ ot->poll = ED_space_clip_tracking_frame_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "placement", placement_items, 0, "Placement", "Placement for detected features");
@@ -2910,8 +2927,8 @@ static int frame_jump_exec(bContext *C, wmOperator *op)
delta = pos == 1 ? 1 : -1;
- while (sc->user.framenr+delta >= SFRA && sc->user.framenr+delta <= EFRA) {
- MovieTrackingMarker *marker = BKE_tracking_exact_marker(track, sc->user.framenr+delta);
+ while (sc->user.framenr + delta >= SFRA && sc->user.framenr + delta <= EFRA) {
+ MovieTrackingMarker *marker = BKE_tracking_exact_marker(track, sc->user.framenr + delta);
if (!marker || marker->flag & MARKER_DISABLED)
break;
@@ -2929,7 +2946,7 @@ static int frame_jump_exec(bContext *C, wmOperator *op)
a += delta;
- while (a+delta >= SFRA && a+delta <= EFRA) {
+ while (a + delta >= SFRA && a + delta <= EFRA) {
MovieReconstructedCamera *cam;
cam = BKE_tracking_get_reconstructed_camera(tracking, object, a);
@@ -2949,10 +2966,10 @@ static int frame_jump_exec(bContext *C, wmOperator *op)
CFRA = sc->user.framenr;
sound_seek_scene(CTX_data_main(C), CTX_data_scene(C));
- WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene);
}
- WM_event_add_notifier(C, NC_MOVIECLIP|ND_DISPLAY, NULL);
+ WM_event_add_notifier(C, NC_MOVIECLIP | ND_DISPLAY, NULL);
return OPERATOR_FINISHED;
}
@@ -2974,10 +2991,10 @@ void CLIP_OT_frame_jump(wmOperatorType *ot)
/* api callbacks */
ot->exec = frame_jump_exec;
- ot->poll = space_clip_frame_poll;
+ ot->poll = ED_space_clip_tracking_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "position", position_items, 0, "Position", "Position to jump to");
@@ -3017,7 +3034,7 @@ static int join_tracks_exec(bContext *C, wmOperator *op)
track = next;
}
- WM_event_add_notifier(C, NC_MOVIECLIP|NA_EDITED, clip);
+ WM_event_add_notifier(C, NC_MOVIECLIP | NA_EDITED, clip);
return OPERATOR_FINISHED;
}
@@ -3031,10 +3048,10 @@ void CLIP_OT_join_tracks(wmOperatorType *ot)
/* api callbacks */
ot->exec = join_tracks_exec;
- ot->poll = space_clip_frame_poll;
+ ot->poll = ED_space_clip_tracking_size_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/********************** lock tracks operator *********************/
@@ -3060,7 +3077,7 @@ static int lock_tracks_exec(bContext *C, wmOperator *op)
track = track->next;
}
- WM_event_add_notifier(C, NC_MOVIECLIP|NA_EVALUATED, clip);
+ WM_event_add_notifier(C, NC_MOVIECLIP | NA_EVALUATED, clip);
return OPERATOR_FINISHED;
}
@@ -3081,10 +3098,10 @@ void CLIP_OT_lock_tracks(wmOperatorType *ot)
/* api callbacks */
ot->exec = lock_tracks_exec;
- ot->poll = ED_space_clip_poll;
+ ot->poll = ED_space_clip_tracking_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "action", actions_items, 0, "Action", "Lock action to execute");
@@ -3117,7 +3134,7 @@ static int track_copy_color_exec(bContext *C, wmOperator *UNUSED(op))
track = track->next;
}
- WM_event_add_notifier(C, NC_MOVIECLIP|ND_DISPLAY, clip);
+ WM_event_add_notifier(C, NC_MOVIECLIP | ND_DISPLAY, clip);
return OPERATOR_FINISHED;
}
@@ -3131,10 +3148,10 @@ void CLIP_OT_track_copy_color(wmOperatorType *ot)
/* api callbacks */
ot->exec = track_copy_color_exec;
- ot->poll = ED_space_clip_poll;
+ ot->poll = ED_space_clip_tracking_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/********************** add 2d stabilization tracks operator *********************/
@@ -3151,7 +3168,7 @@ static int stabilize_2d_add_exec(bContext *C, wmOperator *UNUSED(op))
track = tracksbase->first;
while (track) {
- if (TRACK_VIEW_SELECTED(sc, track) && (track->flag & TRACK_USE_2D_STAB)==0) {
+ if (TRACK_VIEW_SELECTED(sc, track) && (track->flag & TRACK_USE_2D_STAB) == 0) {
track->flag |= TRACK_USE_2D_STAB;
stab->tot_track++;
@@ -3165,7 +3182,7 @@ static int stabilize_2d_add_exec(bContext *C, wmOperator *UNUSED(op))
stab->ok = 0;
DAG_id_tag_update(&clip->id, 0);
- WM_event_add_notifier(C, NC_MOVIECLIP|ND_DISPLAY, clip);
+ WM_event_add_notifier(C, NC_MOVIECLIP | ND_DISPLAY, clip);
}
return OPERATOR_FINISHED;
@@ -3180,10 +3197,10 @@ void CLIP_OT_stabilize_2d_add(wmOperatorType *ot)
/* api callbacks */
ot->exec = stabilize_2d_add_exec;
- ot->poll = ED_space_clip_poll;
+ ot->poll = ED_space_clip_tracking_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/********************** remove 2d stabilization tracks operator *********************/
@@ -3207,7 +3224,7 @@ static int stabilize_2d_remove_exec(bContext *C, wmOperator *UNUSED(op))
stab->act_track--;
stab->tot_track--;
- if (stab->act_track<0)
+ if (stab->act_track < 0)
stab->act_track = 0;
update = 1;
@@ -3225,7 +3242,7 @@ static int stabilize_2d_remove_exec(bContext *C, wmOperator *UNUSED(op))
stab->ok = 0;
DAG_id_tag_update(&clip->id, 0);
- WM_event_add_notifier(C, NC_MOVIECLIP|ND_DISPLAY, clip);
+ WM_event_add_notifier(C, NC_MOVIECLIP | ND_DISPLAY, clip);
}
return OPERATOR_FINISHED;
@@ -3240,10 +3257,10 @@ void CLIP_OT_stabilize_2d_remove(wmOperatorType *ot)
/* api callbacks */
ot->exec = stabilize_2d_remove_exec;
- ot->poll = ED_space_clip_poll;
+ ot->poll = ED_space_clip_tracking_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/********************** select 2d stabilization tracks operator *********************/
@@ -3269,7 +3286,7 @@ static int stabilize_2d_select_exec(bContext *C, wmOperator *UNUSED(op))
}
if (update)
- WM_event_add_notifier(C, NC_MOVIECLIP|ND_SELECT, clip);
+ WM_event_add_notifier(C, NC_MOVIECLIP | ND_SELECT, clip);
return OPERATOR_FINISHED;
}
@@ -3283,10 +3300,10 @@ void CLIP_OT_stabilize_2d_select(wmOperatorType *ot)
/* api callbacks */
ot->exec = stabilize_2d_select_exec;
- ot->poll = ED_space_clip_poll;
+ ot->poll = ED_space_clip_tracking_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/********************** set 2d stabilization rotation track operator *********************/
@@ -3305,7 +3322,7 @@ static int stabilize_2d_set_rotation_exec(bContext *C, wmOperator *UNUSED(op))
stab->ok = 0;
DAG_id_tag_update(&clip->id, 0);
- WM_event_add_notifier(C, NC_MOVIECLIP|ND_DISPLAY, clip);
+ WM_event_add_notifier(C, NC_MOVIECLIP | ND_DISPLAY, clip);
}
return OPERATOR_FINISHED;
@@ -3320,10 +3337,10 @@ void CLIP_OT_stabilize_2d_set_rotation(wmOperatorType *ot)
/* api callbacks */
ot->exec = stabilize_2d_set_rotation_exec;
- ot->poll = ED_space_clip_poll;
+ ot->poll = ED_space_clip_tracking_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/********************** clean tracks operator *********************/
@@ -3338,30 +3355,30 @@ static int is_track_clean(MovieTrackingTrack *track, int frames, int del)
if (del)
new_markers = MEM_callocN(markersnr*sizeof(MovieTrackingMarker), "track cleaned markers");
- for (a = 0; a<markersnr; a++) {
+ for (a = 0; a < markersnr; a++) {
int end = 0;
if (prev == -1) {
- if ((markers[a].flag & MARKER_DISABLED)==0)
+ if ((markers[a].flag & MARKER_DISABLED) == 0)
prev = a;
else
start_disabled = 1;
}
if (prev >= 0) {
- end = a == markersnr-1;
- end |= (a < markersnr-1) && (markers[a].framenr != markers[a+1].framenr-1 ||
- markers[a].flag & MARKER_DISABLED);
+ end = a == markersnr - 1;
+ end |= (a < markersnr - 1) && (markers[a].framenr != markers[a + 1].framenr - 1 ||
+ markers[a].flag & MARKER_DISABLED);
}
if (end) {
int segok = 1, len = 0;
- if (a != prev && markers[a].framenr != markers[a-1].framenr+1)
- len = a-prev;
+ if (a != prev && markers[a].framenr != markers[a - 1].framenr + 1)
+ len = a - prev;
else if (markers[a].flag & MARKER_DISABLED)
- len = a-prev;
- else len = a-prev+1;
+ len = a - prev;
+ else len = a - prev + 1;
if (frames) {
if (len < frames) {
@@ -3382,7 +3399,7 @@ static int is_track_clean(MovieTrackingTrack *track, int frames, int del)
/* place disabled marker in front of current segment */
if (start_disabled) {
- memcpy(new_markers+count, markers+prev, sizeof(MovieTrackingMarker));
+ memcpy(new_markers + count, markers + prev, sizeof(MovieTrackingMarker));
new_markers[count].framenr--;
new_markers[count].flag |= MARKER_DISABLED;
@@ -3390,7 +3407,7 @@ static int is_track_clean(MovieTrackingTrack *track, int frames, int del)
start_disabled = 0;
}
- memcpy(new_markers+count, markers+prev, t*sizeof(MovieTrackingMarker));
+ memcpy(new_markers + count, markers + prev, t * sizeof(MovieTrackingMarker));
count += t;
}
else if (markers[a].flag & MARKER_DISABLED) {
@@ -3439,11 +3456,11 @@ static int clean_tracks_exec(bContext *C, wmOperator *op)
while (track) {
next = track->next;
- if ((track->flag & TRACK_HIDDEN)==0 && (track->flag & TRACK_LOCKED)==0) {
+ if ((track->flag & TRACK_HIDDEN) == 0 && (track->flag & TRACK_LOCKED) == 0) {
int ok = 1;
ok = (is_track_clean(track, frames, action == TRACKING_CLEAN_DELETE_SEGMENT)) &&
- (error == 0.0f || (track->flag & TRACK_HAS_BUNDLE)==0 || track->error < error);
+ (error == 0.0f || (track->flag & TRACK_HAS_BUNDLE) == 0 || track->error < error);
if (!ok) {
if (action == TRACKING_CLEAN_SELECT) {
@@ -3472,7 +3489,7 @@ static int clean_tracks_exec(bContext *C, wmOperator *op)
track = next;
}
- WM_event_add_notifier(C, NC_MOVIECLIP|ND_SELECT, clip);
+ WM_event_add_notifier(C, NC_MOVIECLIP | ND_SELECT, clip);
return OPERATOR_FINISHED;
}
@@ -3511,10 +3528,10 @@ void CLIP_OT_clean_tracks(wmOperatorType *ot)
/* api callbacks */
ot->exec = clean_tracks_exec;
ot->invoke = clean_tracks_invoke;
- ot->poll = ED_space_clip_poll;
+ ot->poll = ED_space_clip_tracking_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_int(ot->srna, "frames", 0, 0, INT_MAX, "Tracked Frames",
@@ -3534,7 +3551,7 @@ static int tracking_object_new_exec(bContext *C, wmOperator *UNUSED(op))
BKE_tracking_new_object(tracking, "Object");
- WM_event_add_notifier(C, NC_MOVIECLIP|NA_EDITED, clip);
+ WM_event_add_notifier(C, NC_MOVIECLIP | NA_EDITED, clip);
return OPERATOR_FINISHED;
}
@@ -3548,10 +3565,10 @@ void CLIP_OT_tracking_object_new(wmOperatorType *ot)
/* api callbacks */
ot->exec = tracking_object_new_exec;
- ot->poll = ED_space_clip_poll;
+ ot->poll = ED_space_clip_tracking_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/********************** remove tracking object *********************/
@@ -3572,7 +3589,7 @@ static int tracking_object_remove_exec(bContext *C, wmOperator *op)
BKE_tracking_remove_object(tracking, object);
- WM_event_add_notifier(C, NC_MOVIECLIP|NA_EDITED, clip);
+ WM_event_add_notifier(C, NC_MOVIECLIP | NA_EDITED, clip);
return OPERATOR_FINISHED;
}
@@ -3586,10 +3603,10 @@ void CLIP_OT_tracking_object_remove(wmOperatorType *ot)
/* api callbacks */
ot->exec = tracking_object_remove_exec;
- ot->poll = ED_space_clip_poll;
+ ot->poll = ED_space_clip_tracking_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/********************** copy tracks to clipboard operator *********************/
@@ -3617,7 +3634,7 @@ void CLIP_OT_copy_tracks(wmOperatorType *ot)
/* api callbacks */
ot->exec = copy_tracks_exec;
- ot->poll = ED_space_clip_poll;
+ ot->poll = ED_space_clip_tracking_poll;
/* flags */
ot->flag = OPTYPE_REGISTER;
@@ -3627,7 +3644,7 @@ void CLIP_OT_copy_tracks(wmOperatorType *ot)
static int paste_tracks_poll(bContext *C)
{
- if (ED_space_clip_poll(C)) {
+ if (ED_space_clip_tracking_poll(C)) {
return BKE_tracking_clipboard_has_tracks();
}
@@ -3643,7 +3660,7 @@ static int paste_tracks_exec(bContext *C, wmOperator *UNUSED(op))
BKE_tracking_clipboard_paste_tracks(tracking, object);
- WM_event_add_notifier(C, NC_MOVIECLIP|NA_EDITED, clip);
+ WM_event_add_notifier(C, NC_MOVIECLIP | NA_EDITED, clip);
return OPERATOR_FINISHED;
}
@@ -3660,5 +3677,5 @@ void CLIP_OT_paste_tracks(wmOperatorType *ot)
ot->poll = paste_tracks_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index 193fa2d2c65..10db1bb1f12 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -82,7 +82,7 @@ enum {
static void do_file_buttons(bContext *C, void *UNUSED(arg), int event)
{
- switch(event) {
+ switch (event) {
case B_FS_FILENAME:
file_filename_exec(C, NULL);
break;
@@ -279,7 +279,7 @@ static int get_file_icon(struct direntry *file)
static void file_draw_icon(uiBlock *block, char *path, int sx, int sy, int icon, int width, int height)
{
uiBut *but;
- int x,y;
+ int x, y;
/*float alpha=1.0f;*/
x = sx;
@@ -301,7 +301,7 @@ static void file_draw_string(int sx, int sy, const char* string, float width, in
fs.align = align;
- BLI_strncpy(fname,string, FILE_MAXFILE);
+ BLI_strncpy(fname, string, FILE_MAXFILE);
file_shorten_string(fname, width + 1.0f, 0);
/* no text clipping needed, uiStyleFontDraw does it but is a bit too strict (for buttons it works) */
@@ -417,8 +417,7 @@ static void draw_background(FileLayout *layout, View2D *v2d)
int sy;
/* alternating flat shade background */
- for (i=0; (i <= layout->rows); i+=2)
- {
+ for (i=0; (i <= layout->rows); i+=2) {
sy = (int)v2d->cur.ymax - i*(layout->tile_h+2*layout->tile_border_y) - layout->tile_border_y;
UI_ThemeColorShade(TH_BACK, -7);
@@ -490,8 +489,7 @@ void file_draw_list(const bContext *C, ARegion *ar)
align = ( FILE_IMGDISPLAY == params->display) ? UI_STYLE_TEXT_CENTER : UI_STYLE_TEXT_LEFT;
- for (i=offset; (i < numfiles) && (i<offset+numfiles_layout); ++i)
- {
+ for (i = offset; (i < numfiles) && (i<offset+numfiles_layout); i++) {
ED_fileselect_layout_tilepos(layout, i, &sx, &sy);
sx += (int)(v2d->tot.xmin+2.0f);
sy = (int)(v2d->tot.ymax - sy);
@@ -514,7 +512,7 @@ void file_draw_list(const bContext *C, ARegion *ar)
is_icon = 0;
imb = filelist_getimage(files, i);
if (!imb) {
- imb = filelist_geticon(files,i);
+ imb = filelist_geticon(files, i);
is_icon = 1;
}
@@ -528,8 +526,8 @@ void file_draw_list(const bContext *C, ARegion *ar)
UI_ThemeColor4(TH_TEXT);
if (file->selflag & EDITING_FILE) {
- uiBut *but = uiDefBut(block, TEX, 1, "", sx , sy-layout->tile_h-3,
- textwidth, textheight, sfile->params->renameedit, 1.0f, (float)sizeof(sfile->params->renameedit),0,0,"");
+ uiBut *but = uiDefBut(block, TEX, 1, "", sx, sy-layout->tile_h-3,
+ textwidth, textheight, sfile->params->renameedit, 1.0f, (float)sizeof(sfile->params->renameedit), 0, 0, "");
uiButSetRenameFunc(but, renamebutton_cb, file);
uiButSetFlag(but, UI_BUT_NO_UTF8); /* allow non utf8 names */
uiButClearFlag(but, UI_BUT_UNDO);
@@ -564,14 +562,14 @@ void file_draw_list(const bContext *C, ARegion *ar)
file_draw_string(sx, sy, file->mode3, layout->column_widths[COLUMN_MODE3], layout->tile_h, align);
sx += layout->column_widths[COLUMN_MODE3] + 12;
- file_draw_string(sx, sy, file->owner, layout->column_widths[COLUMN_OWNER] , layout->tile_h, align);
+ file_draw_string(sx, sy, file->owner, layout->column_widths[COLUMN_OWNER], layout->tile_h, align);
sx += layout->column_widths[COLUMN_OWNER] + 12;
#endif
file_draw_string(sx, sy, file->date, layout->column_widths[COLUMN_DATE], layout->tile_h, align);
sx += (int)layout->column_widths[COLUMN_DATE] + 12;
- file_draw_string(sx, sy, file->time, layout->column_widths[COLUMN_TIME] , layout->tile_h, align);
+ file_draw_string(sx, sy, file->time, layout->column_widths[COLUMN_TIME], layout->tile_h, align);
sx += (int)layout->column_widths[COLUMN_TIME] + 12;
if (!(file->type & S_IFDIR)) {
diff --git a/source/blender/editors/space_file/file_intern.h b/source/blender/editors/space_file/file_intern.h
index 9455f6390f7..d3598ffd4e7 100644
--- a/source/blender/editors/space_file/file_intern.h
+++ b/source/blender/editors/space_file/file_intern.h
@@ -88,7 +88,7 @@ int file_previous_exec(bContext *C, struct wmOperator *unused);
int file_next_exec(bContext *C, struct wmOperator *unused);
int file_filename_exec(bContext *C, struct wmOperator *unused);
int file_directory_exec(bContext *C, struct wmOperator *unused);
-int file_directory_new_exec(bContext *C,struct wmOperator *unused);
+int file_directory_new_exec(bContext *C, struct wmOperator *unused);
int file_delete_exec(bContext *C, struct wmOperator *unused);
int file_hilight_set(struct SpaceFile *sfile, struct ARegion *ar, int mx, int my);
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index 7d1981a5a3b..f340c53f528 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -73,7 +73,7 @@
static FileSelection find_file_mouse_rect(SpaceFile *sfile, struct ARegion* ar, const rcti* rect)
{
FileSelection sel;
- float fxmin,fymin,fxmax, fymax;
+ float fxmin, fymin, fxmax, fymax;
View2D* v2d = &ar->v2d;
rcti rect_view;
@@ -911,8 +911,7 @@ static int file_smoothscroll_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent
numfiles = filelist_numfiles(sfile->files);
/* check if we are editing a name */
- for (i=0; i < numfiles; ++i)
- {
+ for (i=0; i < numfiles; ++i) {
if (filelist_is_selected(sfile->files, i, CHECK_ALL) ) {
edit_idx=i;
break;
@@ -1036,7 +1035,7 @@ int file_directory_new_exec(bContext *C, wmOperator *op)
SpaceFile *sfile= CTX_wm_space_file(C);
if (!sfile->params) {
- BKE_report(op->reports,RPT_WARNING, "No parent directory given");
+ BKE_report(op->reports, RPT_WARNING, "No parent directory given");
return OPERATOR_CANCELLED;
}
@@ -1050,7 +1049,7 @@ int file_directory_new_exec(bContext *C, wmOperator *op)
if (generate_name) {
/* create a new, non-existing folder name */
if (!new_folder_path(sfile->params->dir, path, name)) {
- BKE_report(op->reports,RPT_ERROR, "Couldn't create new folder name");
+ BKE_report(op->reports, RPT_ERROR, "Couldn't create new folder name");
return OPERATOR_CANCELLED;
}
}
@@ -1059,7 +1058,7 @@ int file_directory_new_exec(bContext *C, wmOperator *op)
BLI_dir_create_recursive(path);
if (!BLI_exists(path)) {
- BKE_report(op->reports,RPT_ERROR, "Couldn't create new folder");
+ BKE_report(op->reports, RPT_ERROR, "Couldn't create new folder");
return OPERATOR_CANCELLED;
}
@@ -1331,7 +1330,7 @@ void FILE_OT_filenum(struct wmOperatorType *ot)
ot->poll = ED_operator_file_active; /* <- important, handler is on window level */
/* props */
- RNA_def_int(ot->srna, "increment", 1, -100, 100, "Increment", "", -100,100);
+ RNA_def_int(ot->srna, "increment", 1, -100, 100, "Increment", "", -100, 100);
}
static int file_rename_exec(bContext *C, wmOperator *UNUSED(op))
diff --git a/source/blender/editors/space_file/file_panels.c b/source/blender/editors/space_file/file_panels.c
index 596721bff07..9fe1940e87b 100644
--- a/source/blender/editors/space_file/file_panels.c
+++ b/source/blender/editors/space_file/file_panels.c
@@ -116,7 +116,7 @@ static void file_panel_category(const bContext *C, Panel *pa, FSMenuCategory cat
BLI_strncpy(dir, entry, FILE_MAX);
/* create list item */
- but = uiDefIconTextButS(block, LISTROW, 0, icon, dir, 0,0,UI_UNIT_X*10,UI_UNIT_Y, nr, 0, i, 0, 0, entry);
+ but = uiDefIconTextButS(block, LISTROW, 0, icon, dir, 0, 0, UI_UNIT_X * 10, UI_UNIT_Y, nr, 0, i, 0, 0, entry);
uiButSetFunc(but, file_panel_cb, entry, NULL);
uiButSetFlag(but, UI_ICON_LEFT|UI_TEXT_LEFT);
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 45a271cc7e9..107acbf49b1 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -179,7 +179,7 @@ static int compare_name(const void *a1, const void *a2)
if ( strcmp(entry1->relname, "..")==0 ) return (-1);
if ( strcmp(entry2->relname, "..")==0 ) return (1);
- return (BLI_natstrcmp(entry1->relname,entry2->relname));
+ return (BLI_natstrcmp(entry1->relname, entry2->relname));
}
static int compare_date(const void *a1, const void *a2)
@@ -212,7 +212,7 @@ static int compare_date(const void *a1, const void *a2)
if ( entry1->s.st_mtime < entry2->s.st_mtime) return 1;
if ( entry1->s.st_mtime > entry2->s.st_mtime) return -1;
- else return BLI_natstrcmp(entry1->relname,entry2->relname);
+ else return BLI_natstrcmp(entry1->relname, entry2->relname);
}
static int compare_size(const void *a1, const void *a2)
@@ -244,7 +244,7 @@ static int compare_size(const void *a1, const void *a2)
if ( entry1->s.st_size < entry2->s.st_size) return 1;
if ( entry1->s.st_size > entry2->s.st_size) return -1;
- else return BLI_natstrcmp(entry1->relname,entry2->relname);
+ else return BLI_natstrcmp(entry1->relname, entry2->relname);
}
static int compare_extension(const void *a1, const void *a2)
@@ -419,7 +419,7 @@ void filelist_free_icons(void)
//-----------------FOLDERLIST (previous/next) --------------//
struct ListBase* folderlist_new(void)
{
- ListBase* p = MEM_callocN( sizeof(ListBase), "folderlist" );
+ ListBase* p = MEM_callocN(sizeof(ListBase), "folderlist" );
return p;
}
@@ -456,7 +456,7 @@ void folderlist_pushdir(ListBase* folderlist, const char *dir)
}
// create next folder element
- folder = (FolderList*)MEM_mallocN(sizeof(FolderList),"FolderList");
+ folder = (FolderList*)MEM_mallocN(sizeof(FolderList), "FolderList");
folder->foldername = (char*)MEM_mallocN(sizeof(char)*(strlen(dir)+1), "foldername");
folder->foldername[0] = '\0';
@@ -519,8 +519,8 @@ static void filelist_read_dir(struct FileList* filelist);
//------------------FILELIST------------------------//
struct FileList* filelist_new(short type)
{
- FileList* p = MEM_callocN( sizeof(FileList), "filelist" );
- switch(type) {
+ FileList* p = MEM_callocN(sizeof(FileList), "filelist" );
+ switch (type) {
case FILE_MAIN:
p->readf = filelist_read_main;
p->filterf = is_filtered_main;
@@ -982,7 +982,7 @@ int filelist_is_selected(struct FileList* filelist, int index, FileCheckType che
void filelist_sort(struct FileList* filelist, short sort)
{
- switch(sort) {
+ switch (sort) {
case FILE_SORT_ALPHA:
qsort(filelist->filelist, filelist->numfiles, sizeof(struct direntry), compare_name);
break;
@@ -1144,7 +1144,7 @@ void filelist_from_main(struct FileList *filelist)
filelist->filelist= (struct direntry *)malloc(filelist->numfiles * sizeof(struct direntry));
for (a=0; a<filelist->numfiles; a++) {
- memset( &(filelist->filelist[a]), 0 , sizeof(struct direntry));
+ memset(&(filelist->filelist[a]), 0, sizeof(struct direntry));
filelist->filelist[a].type |= S_IFDIR;
}
@@ -1198,7 +1198,7 @@ void filelist_from_main(struct FileList *filelist)
files = filelist->filelist;
if (!filelist->hide_parent) {
- memset( &(filelist->filelist[0]), 0 , sizeof(struct direntry));
+ memset(&(filelist->filelist[0]), 0, sizeof(struct direntry));
filelist->filelist[0].relname= BLI_strdup("..");
filelist->filelist[0].type |= S_IFDIR;
@@ -1212,7 +1212,7 @@ void filelist_from_main(struct FileList *filelist)
ok = 1;
if (ok) {
if (!filelist->hide_dot || id->name[2] != '.') {
- memset( files, 0 , sizeof(struct direntry));
+ memset(files, 0, sizeof(struct direntry));
if (id->lib==NULL)
files->relname= BLI_strdup(id->name+2);
else {
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index 31695ddd776..b17ca5ee319 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -447,8 +447,7 @@ static void column_widths(struct FileList* files, struct FileLayout* layout)
layout->column_widths[i] = 0;
}
- for (i=0; (i < numfiles); ++i)
- {
+ for (i=0; (i < numfiles); ++i) {
struct direntry* file = filelist_file(files, i);
if (file) {
float len;
diff --git a/source/blender/editors/space_file/fsmenu.c b/source/blender/editors/space_file/fsmenu.c
index 48449ac8870..28ac674f079 100644
--- a/source/blender/editors/space_file/fsmenu.c
+++ b/source/blender/editors/space_file/fsmenu.c
@@ -99,7 +99,7 @@ static FSMenuEntry *fsmenu_get_category(struct FSMenu* fsmenu, FSMenuCategory ca
{
FSMenuEntry *fsms = NULL;
- switch(category) {
+ switch (category) {
case FS_CATEGORY_SYSTEM:
fsms = fsmenu->fsmenu_system;
break;
@@ -115,7 +115,7 @@ static FSMenuEntry *fsmenu_get_category(struct FSMenu* fsmenu, FSMenuCategory ca
static void fsmenu_set_category(struct FSMenu* fsmenu, FSMenuCategory category, FSMenuEntry *fsms)
{
- switch(category) {
+ switch (category) {
case FS_CATEGORY_SYSTEM:
fsmenu->fsmenu_system = fsms;
break;
@@ -268,8 +268,7 @@ void fsmenu_read_bookmarks(struct FSMenu* fsmenu, const char *filename)
fp = BLI_fopen(filename, "r");
if (!fp) return;
- while ( fgets ( line, 256, fp ) != NULL ) /* read a line */
- {
+ while ( fgets ( line, 256, fp ) != NULL ) { /* read a line */
if (strncmp(line, "[Bookmarks]", 11)==0) {
category = FS_CATEGORY_BOOKMARKS;
}
@@ -316,7 +315,7 @@ void fsmenu_read_system(struct FSMenu* fsmenu)
/* Adding Desktop and My Documents */
SHGetSpecialFolderPath(0, line, CSIDL_PERSONAL, 0);
- fsmenu_insert_entry(fsmenu,FS_CATEGORY_BOOKMARKS, line, 1, 0);
+ fsmenu_insert_entry(fsmenu, FS_CATEGORY_BOOKMARKS, line, 1, 0);
SHGetSpecialFolderPath(0, line, CSIDL_DESKTOPDIRECTORY, 0);
fsmenu_insert_entry(fsmenu, FS_CATEGORY_BOOKMARKS, line, 1, 0);
}
@@ -329,8 +328,7 @@ void fsmenu_read_system(struct FSMenu* fsmenu)
const char *home;
/* loop through all the OS X Volumes, and add them to the SYSTEM section */
- for (i=1; err!=nsvErr; i++)
- {
+ for (i = 1; err != nsvErr; i++) {
FSRef dir;
unsigned char path[FILE_MAX];
@@ -389,20 +387,19 @@ void fsmenu_read_system(struct FSMenu* fsmenu)
pathesArray = LSSharedFileListCopySnapshot(list, &seed);
pathesCount = CFArrayGetCount(pathesArray);
- for (i=0; i<pathesCount; i++)
- {
+ for (i=0; i<pathesCount; i++) {
itemRef = (LSSharedFileListItemRef)CFArrayGetValueAtIndex(pathesArray, i);
err = LSSharedFileListItemResolve(itemRef,
- kLSSharedFileListNoUserInteraction
- | kLSSharedFileListDoNotMountVolumes,
+ kLSSharedFileListNoUserInteraction |
+ kLSSharedFileListDoNotMountVolumes,
&cfURL, NULL);
if (err != noErr)
continue;
pathString = CFURLCopyFileSystemPath(cfURL, kCFURLPOSIXPathStyle);
- if (!CFStringGetCString(pathString,line,256,kCFStringEncodingASCII))
+ if (!CFStringGetCString(pathString, line, 256, kCFStringEncodingASCII))
continue;
fsmenu_insert_entry(fsmenu, FS_CATEGORY_SYSTEM, line, 1, 0);
@@ -415,8 +412,7 @@ void fsmenu_read_system(struct FSMenu* fsmenu)
/* Then get network volumes */
err = noErr;
- for (i=1; err!=nsvErr; i++)
- {
+ for (i=1; err!=nsvErr; i++) {
FSRef dir;
FSVolumeRefNum volRefNum;
struct GetVolParmsInfoBuffer volParmsBuffer;
@@ -440,20 +436,19 @@ void fsmenu_read_system(struct FSMenu* fsmenu)
pathesArray = LSSharedFileListCopySnapshot(list, &seed);
pathesCount = CFArrayGetCount(pathesArray);
- for (i=0; i<pathesCount; i++)
- {
+ for (i=0; i<pathesCount; i++) {
itemRef = (LSSharedFileListItemRef)CFArrayGetValueAtIndex(pathesArray, i);
err = LSSharedFileListItemResolve(itemRef,
- kLSSharedFileListNoUserInteraction
- | kLSSharedFileListDoNotMountVolumes,
+ kLSSharedFileListNoUserInteraction |
+ kLSSharedFileListDoNotMountVolumes,
&cfURL, NULL);
if (err != noErr)
continue;
pathString = CFURLCopyFileSystemPath(cfURL, kCFURLPOSIXPathStyle);
- if (!CFStringGetCString(pathString,line,256,kCFStringEncodingASCII))
+ if (!CFStringGetCString(pathString, line, 256, kCFStringEncodingASCII))
continue;
fsmenu_insert_entry(fsmenu, FS_CATEGORY_BOOKMARKS, line, 1, 0);
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c
index 0cf15c22efa..dac5d1e1347 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -218,7 +218,7 @@ static void file_refresh(const bContext *C, ScrArea *UNUSED(sa))
}
else {
if (params->display == FILE_IMGDISPLAY) {
- if (!thumbnails_running(sfile->files,C)) {
+ if (!thumbnails_running(sfile->files, C)) {
thumbnails_start(sfile->files, C);
}
}
@@ -251,7 +251,7 @@ static void file_listener(ScrArea *sa, wmNotifier *wmn)
/* SpaceFile* sfile = (SpaceFile*)sa->spacedata.first; */
/* context changes */
- switch(wmn->category) {
+ switch (wmn->category) {
case NC_SPACE:
switch (wmn->data) {
case ND_SPACE_FILE_LIST:
@@ -287,7 +287,7 @@ static void file_main_area_init(wmWindowManager *wm, ARegion *ar)
static void file_main_area_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
- switch(wmn->category) {
+ switch (wmn->category) {
case NC_SPACE:
switch (wmn->data) {
case ND_SPACE_FILE_LIST:
@@ -432,12 +432,12 @@ static void file_keymap(struct wmKeyConfig *keyconf)
RNA_int_set(kmi->ptr, "increment", 10);
kmi = WM_keymap_add_item(keymap, "FILE_OT_filenum", PADPLUSKEY, KM_PRESS, KM_CTRL, 0);
RNA_int_set(kmi->ptr, "increment", 100);
- kmi = WM_keymap_add_item(keymap, "FILE_OT_filenum", PADMINUS, KM_PRESS, 0,0);
+ kmi = WM_keymap_add_item(keymap, "FILE_OT_filenum", PADMINUS, KM_PRESS, 0, 0);
RNA_int_set(kmi->ptr, "increment", -1);
kmi = WM_keymap_add_item(keymap, "FILE_OT_filenum", PADMINUS, KM_PRESS, KM_SHIFT, 0);
RNA_int_set(kmi->ptr, "increment", -10);
kmi = WM_keymap_add_item(keymap, "FILE_OT_filenum", PADMINUS, KM_PRESS, KM_CTRL, 0);
- RNA_int_set(kmi->ptr, "increment",-100);
+ RNA_int_set(kmi->ptr, "increment", -100);
/* keys for button area (top) */
@@ -450,10 +450,10 @@ static void file_keymap(struct wmKeyConfig *keyconf)
RNA_int_set(kmi->ptr, "increment", 100);
kmi = WM_keymap_add_item(keymap, "FILE_OT_filenum", PADMINUS, KM_PRESS, 0, 0);
RNA_int_set(kmi->ptr, "increment", -1);
- kmi = WM_keymap_add_item(keymap, "FILE_OT_filenum", PADMINUS, KM_PRESS, KM_SHIFT,0);
+ kmi = WM_keymap_add_item(keymap, "FILE_OT_filenum", PADMINUS, KM_PRESS, KM_SHIFT, 0);
RNA_int_set(kmi->ptr, "increment", -10);
- kmi = WM_keymap_add_item(keymap, "FILE_OT_filenum", PADMINUS, KM_PRESS, KM_CTRL,0);
- RNA_int_set(kmi->ptr, "increment",-100);
+ kmi = WM_keymap_add_item(keymap, "FILE_OT_filenum", PADMINUS, KM_PRESS, KM_CTRL, 0);
+ RNA_int_set(kmi->ptr, "increment", -100);
}
@@ -476,7 +476,7 @@ static void file_channel_area_draw(const bContext *C, ARegion *ar)
static void file_channel_area_listener(ARegion *UNUSED(ar), wmNotifier *wmn)
{
/* context changes */
- switch(wmn->category) {
+ switch (wmn->category) {
}
}
@@ -536,7 +536,7 @@ static void file_ui_area_draw(const bContext *C, ARegion *ar)
static void file_ui_area_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
- switch(wmn->category) {
+ switch (wmn->category) {
case NC_SPACE:
switch (wmn->data) {
case ND_SPACE_FILE_LIST:
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c
index 4d2fe2cd568..ddcd46ba817 100644
--- a/source/blender/editors/space_graph/graph_buttons.c
+++ b/source/blender/editors/space_graph/graph_buttons.c
@@ -67,12 +67,12 @@
#include "UI_interface.h"
#include "UI_resources.h"
-#include "graph_intern.h" // own include
+#include "graph_intern.h" // own include
/* XXX */
/* temporary definition for limits of float number buttons (FLT_MAX tends to infinity with old system) */
-#define UI_FLT_MAX 10000.0f
+#define UI_FLT_MAX 10000.0f
/* ******************* graph editor space & buttons ************** */
@@ -85,7 +85,7 @@ static void do_graph_region_buttons(bContext *UNUSED(C), void *UNUSED(arg), int
{
//Scene *scene= CTX_data_scene(C);
- switch(event) {
+ switch (event) {
}
@@ -98,7 +98,7 @@ static void do_graph_region_buttons(bContext *UNUSED(C), void *UNUSED(arg), int
static int graph_panel_context(const bContext *C, bAnimListElem **ale, FCurve **fcu)
{
bAnimContext ac;
- bAnimListElem *elem= NULL;
+ bAnimListElem *elem = NULL;
/* for now, only draw if we could init the anim-context info (necessary for all animation-related tools)
* to work correctly is able to be correctly retrieved. There's no point showing empty panels?
@@ -107,14 +107,14 @@ static int graph_panel_context(const bContext *C, bAnimListElem **ale, FCurve **
return 0;
/* try to find 'active' F-Curve */
- elem= get_active_fcurve_channel(&ac);
+ elem = get_active_fcurve_channel(&ac);
if (elem == NULL)
return 0;
if (fcu)
- *fcu= (FCurve*)elem->data;
+ *fcu = (FCurve *)elem->data;
if (ale)
- *ale= elem;
+ *ale = elem;
else
MEM_freeN(elem);
@@ -131,9 +131,9 @@ static int graph_panel_poll(const bContext *C, PanelType *UNUSED(pt))
/* Graph Editor View Settings */
static void graph_panel_view(const bContext *C, Panel *pa)
{
- bScreen *sc= CTX_wm_screen(C);
- SpaceIpo *sipo= CTX_wm_space_graph(C);
- Scene *scene= CTX_data_scene(C);
+ bScreen *sc = CTX_wm_screen(C);
+ SpaceIpo *sipo = CTX_wm_space_graph(C);
+ Scene *scene = CTX_data_scene(C);
PointerRNA spaceptr, sceneptr;
uiLayout *col, *sub, *row;
@@ -142,21 +142,21 @@ static void graph_panel_view(const bContext *C, Panel *pa)
RNA_pointer_create(&sc->id, &RNA_SpaceGraphEditor, sipo, &spaceptr);
/* 2D-Cursor */
- col= uiLayoutColumn(pa->layout, 0);
- uiItemR(col, &spaceptr, "show_cursor", 0, NULL, ICON_NONE);
-
- sub= uiLayoutColumn(col, 1);
- uiLayoutSetActive(sub, RNA_boolean_get(&spaceptr, "show_cursor"));
- uiItemO(sub, IFACE_("Cursor from Selection"), ICON_NONE, "GRAPH_OT_frame_jump");
+ col = uiLayoutColumn(pa->layout, 0);
+ uiItemR(col, &spaceptr, "show_cursor", 0, NULL, ICON_NONE);
- sub= uiLayoutColumn(col, 1);
- uiLayoutSetActive(sub, RNA_boolean_get(&spaceptr, "show_cursor"));
- row= uiLayoutSplit(sub, 0.7, 1);
- uiItemR(row, &sceneptr, "frame_current", 0, IFACE_("Cursor X"), ICON_NONE);
- uiItemEnumO(row, "GRAPH_OT_snap", IFACE_("To Keys"), 0, "type", GRAPHKEYS_SNAP_CFRA);
- row= uiLayoutSplit(sub, 0.7, 1);
- uiItemR(row, &spaceptr, "cursor_position_y", 0, IFACE_("Cursor Y"), ICON_NONE);
- uiItemEnumO(row, "GRAPH_OT_snap", IFACE_("To Keys"), 0, "type", GRAPHKEYS_SNAP_VALUE);
+ sub = uiLayoutColumn(col, 1);
+ uiLayoutSetActive(sub, RNA_boolean_get(&spaceptr, "show_cursor"));
+ uiItemO(sub, IFACE_("Cursor from Selection"), ICON_NONE, "GRAPH_OT_frame_jump");
+
+ sub = uiLayoutColumn(col, 1);
+ uiLayoutSetActive(sub, RNA_boolean_get(&spaceptr, "show_cursor"));
+ row = uiLayoutSplit(sub, 0.7, 1);
+ uiItemR(row, &sceneptr, "frame_current", 0, IFACE_("Cursor X"), ICON_NONE);
+ uiItemEnumO(row, "GRAPH_OT_snap", IFACE_("To Keys"), 0, "type", GRAPHKEYS_SNAP_CFRA);
+ row = uiLayoutSplit(sub, 0.7, 1);
+ uiItemR(row, &spaceptr, "cursor_position_y", 0, IFACE_("Cursor Y"), ICON_NONE);
+ uiItemEnumO(row, "GRAPH_OT_snap", IFACE_("To Keys"), 0, "type", GRAPHKEYS_SNAP_VALUE);
}
/* ******************* active F-Curve ************** */
@@ -175,7 +175,7 @@ static void graph_panel_properties(const bContext *C, Panel *pa)
if (!graph_panel_context(C, &ale, &fcu))
return;
- block= uiLayoutGetBlock(layout);
+ block = uiLayoutGetBlock(layout);
uiBlockSetHandleFunc(block, do_graph_region_buttons, NULL);
/* F-Curve pointer */
@@ -183,26 +183,26 @@ static void graph_panel_properties(const bContext *C, Panel *pa)
/* user-friendly 'name' for F-Curve */
/* TODO: only show the path if this is invalid? */
- col= uiLayoutColumn(layout, 0);
- icon= getname_anim_fcurve(name, ale->id, fcu);
- uiItemL(col, name, icon);
+ col = uiLayoutColumn(layout, 0);
+ icon = getname_anim_fcurve(name, ale->id, fcu);
+ uiItemL(col, name, icon);
/* RNA-Path Editing - only really should be enabled when things aren't working */
- col= uiLayoutColumn(layout, 1);
- uiLayoutSetEnabled(col, (fcu->flag & FCURVE_DISABLED)!=0);
- uiItemR(col, &fcu_ptr, "data_path", 0, "", ICON_RNA);
- uiItemR(col, &fcu_ptr, "array_index", 0, NULL, ICON_NONE);
+ col = uiLayoutColumn(layout, 1);
+ uiLayoutSetEnabled(col, (fcu->flag & FCURVE_DISABLED) != 0);
+ uiItemR(col, &fcu_ptr, "data_path", 0, "", ICON_RNA);
+ uiItemR(col, &fcu_ptr, "array_index", 0, NULL, ICON_NONE);
/* color settings */
- col= uiLayoutColumn(layout, 1);
- uiItemL(col, IFACE_("Display Color:"), ICON_NONE);
+ col = uiLayoutColumn(layout, 1);
+ uiItemL(col, IFACE_("Display Color:"), ICON_NONE);
- row= uiLayoutRow(col, 1);
- uiItemR(row, &fcu_ptr, "color_mode", 0, "", ICON_NONE);
+ row = uiLayoutRow(col, 1);
+ uiItemR(row, &fcu_ptr, "color_mode", 0, "", ICON_NONE);
- sub= uiLayoutRow(row, 1);
- uiLayoutSetEnabled(sub, (fcu->color_mode==FCURVE_COLOR_CUSTOM));
- uiItemR(sub, &fcu_ptr, "color", 0, "", ICON_NONE);
+ sub = uiLayoutRow(row, 1);
+ uiLayoutSetEnabled(sub, (fcu->color_mode == FCURVE_COLOR_CUSTOM));
+ uiItemR(sub, &fcu_ptr, "color", 0, "", ICON_NONE);
MEM_freeN(ale);
}
@@ -226,13 +226,13 @@ static short get_active_fcurve_keyframe_edit(FCurve *fcu, BezTriple **bezt, BezT
* - this is a reasonable assumption, given that whenever anyone
* wants to edit numerically, there is likely to only be 1 vert selected
*/
- for (i=0, b=fcu->bezt; i < fcu->totvert; i++, b++) {
+ for (i = 0, b = fcu->bezt; i < fcu->totvert; i++, b++) {
if (BEZSELECTED(b)) {
/* found
* - 'previous' is either the one before, of the keyframe itself (which is still fine)
* XXX: we can just make this null instead if needed
*/
- *prevbezt = (i > 0) ? b-1 : b;
+ *prevbezt = (i > 0) ? b - 1 : b;
*bezt = b;
return 1;
@@ -246,7 +246,7 @@ static short get_active_fcurve_keyframe_edit(FCurve *fcu, BezTriple **bezt, BezT
/* update callback for active keyframe properties - base updates stuff */
static void graphedit_activekey_update_cb(bContext *C, void *fcu_ptr, void *UNUSED(bezt_ptr))
{
- SpaceIpo *sipo= CTX_wm_space_graph(C);
+ SpaceIpo *sipo = CTX_wm_space_graph(C);
const short use_handle = !(sipo->flag & SIPO_NOHANDLES);
FCurve *fcu = (FCurve *)fcu_ptr;
@@ -265,8 +265,8 @@ static void graphedit_activekey_handles_cb(bContext *C, void *fcu_ptr, void *bez
*/
if (ELEM(bezt->h1, HD_AUTO, HD_AUTO_ANIM) && ELEM(bezt->h2, HD_AUTO, HD_AUTO_ANIM)) {
/* by changing to aligned handles, these can now be moved... */
- bezt->h1= HD_ALIGN;
- bezt->h2= HD_ALIGN;
+ bezt->h1 = HD_ALIGN;
+ bezt->h2 = HD_ALIGN;
}
/* now call standard updates */
@@ -307,56 +307,56 @@ static void graph_panel_key_properties(const bContext *C, Panel *pa)
}
/* interpolation */
- col= uiLayoutColumn(layout, 0);
- uiItemR(col, &bezt_ptr, "interpolation", 0, NULL, ICON_NONE);
+ col = uiLayoutColumn(layout, 0);
+ uiItemR(col, &bezt_ptr, "interpolation", 0, NULL, ICON_NONE);
/* numerical coordinate editing
- * - we use the button-versions of the calls so that we can attach special update handlers
- * and unit conversion magic that cannot be achieved using a purely RNA-approach
+ * - we use the button-versions of the calls so that we can attach special update handlers
+ * and unit conversion magic that cannot be achieved using a purely RNA-approach
*/
// XXX:
- col= uiLayoutColumn(layout, 1);
- /* keyframe itself */
- {
- uiItemL(col, IFACE_("Key:"), ICON_NONE);
-
- but = uiDefButR(block, NUM, B_REDR, IFACE_("Frame"), 0, 0, UI_UNIT_X, UI_UNIT_Y,
- &bezt_ptr, "co", 0, 0, 0, -1, -1, NULL);
- uiButSetFunc(but, graphedit_activekey_update_cb, fcu, bezt);
-
- but = uiDefButR(block, NUM, B_REDR, IFACE_("Value"), 0, 0, UI_UNIT_X, UI_UNIT_Y,
- &bezt_ptr, "co", 1, 0, 0, -1, -1, NULL);
- uiButSetFunc(but, graphedit_activekey_update_cb, fcu, bezt);
- uiButSetUnitType(but, unit);
- }
-
- /* previous handle - only if previous was Bezier interpolation */
- if ((prevbezt) && (prevbezt->ipo == BEZT_IPO_BEZ)) {
- uiItemL(col, IFACE_("Left Handle:"), ICON_NONE);
-
- but = uiDefButR(block, NUM, B_REDR, "X", 0, 0, UI_UNIT_X, UI_UNIT_Y,
- &bezt_ptr, "handle_left", 0, 0, 0, -1, -1, NULL);
- uiButSetFunc(but, graphedit_activekey_handles_cb, fcu, bezt);
-
- but = uiDefButR(block, NUM, B_REDR, "Y", 0, 0, UI_UNIT_X, UI_UNIT_Y,
- &bezt_ptr, "handle_left", 1, 0, 0, -1, -1, NULL);
- uiButSetFunc(but, graphedit_activekey_handles_cb, fcu, bezt);
- uiButSetUnitType(but, unit);
- }
-
- /* next handle - only if current is Bezier interpolation */
- if (bezt->ipo == BEZT_IPO_BEZ) {
- uiItemL(col, IFACE_("Right Handle:"), ICON_NONE);
-
- but = uiDefButR(block, NUM, B_REDR, "X", 0, 0, UI_UNIT_X, UI_UNIT_Y,
- &bezt_ptr, "handle_right", 0, 0, 0, -1, -1, NULL);
- uiButSetFunc(but, graphedit_activekey_handles_cb, fcu, bezt);
-
- but = uiDefButR(block, NUM, B_REDR, "Y", 0, 0, UI_UNIT_X, UI_UNIT_Y,
- &bezt_ptr, "handle_right", 1, 0, 0, -1, -1, NULL);
- uiButSetFunc(but, graphedit_activekey_handles_cb, fcu, bezt);
- uiButSetUnitType(but, unit);
- }
+ col = uiLayoutColumn(layout, 1);
+ /* keyframe itself */
+ {
+ uiItemL(col, IFACE_("Key:"), ICON_NONE);
+
+ but = uiDefButR(block, NUM, B_REDR, IFACE_("Frame"), 0, 0, UI_UNIT_X, UI_UNIT_Y,
+ &bezt_ptr, "co", 0, 0, 0, -1, -1, NULL);
+ uiButSetFunc(but, graphedit_activekey_update_cb, fcu, bezt);
+
+ but = uiDefButR(block, NUM, B_REDR, IFACE_("Value"), 0, 0, UI_UNIT_X, UI_UNIT_Y,
+ &bezt_ptr, "co", 1, 0, 0, -1, -1, NULL);
+ uiButSetFunc(but, graphedit_activekey_update_cb, fcu, bezt);
+ uiButSetUnitType(but, unit);
+ }
+
+ /* previous handle - only if previous was Bezier interpolation */
+ if ((prevbezt) && (prevbezt->ipo == BEZT_IPO_BEZ)) {
+ uiItemL(col, IFACE_("Left Handle:"), ICON_NONE);
+
+ but = uiDefButR(block, NUM, B_REDR, "X", 0, 0, UI_UNIT_X, UI_UNIT_Y,
+ &bezt_ptr, "handle_left", 0, 0, 0, -1, -1, NULL);
+ uiButSetFunc(but, graphedit_activekey_handles_cb, fcu, bezt);
+
+ but = uiDefButR(block, NUM, B_REDR, "Y", 0, 0, UI_UNIT_X, UI_UNIT_Y,
+ &bezt_ptr, "handle_left", 1, 0, 0, -1, -1, NULL);
+ uiButSetFunc(but, graphedit_activekey_handles_cb, fcu, bezt);
+ uiButSetUnitType(but, unit);
+ }
+
+ /* next handle - only if current is Bezier interpolation */
+ if (bezt->ipo == BEZT_IPO_BEZ) {
+ uiItemL(col, IFACE_("Right Handle:"), ICON_NONE);
+
+ but = uiDefButR(block, NUM, B_REDR, "X", 0, 0, UI_UNIT_X, UI_UNIT_Y,
+ &bezt_ptr, "handle_right", 0, 0, 0, -1, -1, NULL);
+ uiButSetFunc(but, graphedit_activekey_handles_cb, fcu, bezt);
+
+ but = uiDefButR(block, NUM, B_REDR, "Y", 0, 0, UI_UNIT_X, UI_UNIT_Y,
+ &bezt_ptr, "handle_right", 1, 0, 0, -1, -1, NULL);
+ uiButSetFunc(but, graphedit_activekey_handles_cb, fcu, bezt);
+ uiButSetUnitType(but, unit);
+ }
}
else {
if ((fcu->bezt == NULL) && (fcu->modifiers.first)) {
@@ -378,12 +378,12 @@ static void graph_panel_key_properties(const bContext *C, Panel *pa)
/* ******************* drivers ******************************** */
-#define B_IPO_DEPCHANGE 10
+#define B_IPO_DEPCHANGE 10
static void do_graph_region_driver_buttons(bContext *C, void *UNUSED(arg), int event)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
switch (event) {
case B_IPO_DEPCHANGE:
@@ -394,19 +394,19 @@ static void do_graph_region_driver_buttons(bContext *C, void *UNUSED(arg), int e
/* force an update of depsgraph */
DAG_ids_flush_update(bmain, 0);
}
- break;
+ break;
}
/* 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 remove the active driver */
-static void driver_remove_cb (bContext *C, void *ale_v, void *UNUSED(arg))
+static void driver_remove_cb(bContext *C, void *ale_v, void *UNUSED(arg))
{
- bAnimListElem *ale= (bAnimListElem *)ale_v;
- ID *id= ale->id;
- FCurve *fcu= ale->data;
+ bAnimListElem *ale = (bAnimListElem *)ale_v;
+ ID *id = ale->id;
+ FCurve *fcu = ale->data;
ReportList *reports = CTX_wm_reports(C);
/* try to get F-Curve that driver lives on, and ID block which has this AnimData */
@@ -418,29 +418,29 @@ static void driver_remove_cb (bContext *C, void *ale_v, void *UNUSED(arg))
}
/* callback to add a target variable to the active driver */
-static void driver_add_var_cb (bContext *UNUSED(C), void *driver_v, void *UNUSED(arg))
+static void driver_add_var_cb(bContext *UNUSED(C), void *driver_v, void *UNUSED(arg))
{
- ChannelDriver *driver= (ChannelDriver *)driver_v;
+ ChannelDriver *driver = (ChannelDriver *)driver_v;
/* add a new variable */
driver_add_new_variable(driver);
}
/* callback to remove target variable from active driver */
-static void driver_delete_var_cb (bContext *UNUSED(C), void *driver_v, void *dvar_v)
+static void driver_delete_var_cb(bContext *UNUSED(C), void *driver_v, void *dvar_v)
{
- ChannelDriver *driver= (ChannelDriver *)driver_v;
- DriverVar *dvar= (DriverVar *)dvar_v;
+ ChannelDriver *driver = (ChannelDriver *)driver_v;
+ DriverVar *dvar = (DriverVar *)dvar_v;
/* remove the active variable */
driver_free_variable(driver, dvar);
}
/* callback to reset the driver's flags */
-static void driver_update_flags_cb (bContext *UNUSED(C), void *fcu_v, void *UNUSED(arg))
+static void driver_update_flags_cb(bContext *UNUSED(C), void *fcu_v, void *UNUSED(arg))
{
- FCurve *fcu= (FCurve *)fcu_v;
- ChannelDriver *driver= fcu->driver;
+ FCurve *fcu = (FCurve *)fcu_v;
+ ChannelDriver *driver = fcu->driver;
/* clear invalid flags */
fcu->flag &= ~FCURVE_DISABLED; // XXX?
@@ -450,7 +450,7 @@ static void driver_update_flags_cb (bContext *UNUSED(C), void *fcu_v, void *UNUS
/* drivers panel poll */
static int graph_panel_drivers_poll(const bContext *C, PanelType *UNUSED(pt))
{
- SpaceIpo *sipo= CTX_wm_space_graph(C);
+ SpaceIpo *sipo = CTX_wm_space_graph(C);
if (sipo->mode != SIPO_MODE_DRIVERS)
return 0;
@@ -461,7 +461,7 @@ static int graph_panel_drivers_poll(const bContext *C, PanelType *UNUSED(pt))
/* settings for 'single property' driver variable type */
static void graph_panel_driverVar__singleProp(uiLayout *layout, ID *id, DriverVar *dvar)
{
- DriverTarget *dtar= &dvar->targets[0];
+ DriverTarget *dtar = &dvar->targets[0];
PointerRNA dtar_ptr;
uiLayout *row, *col;
@@ -469,8 +469,8 @@ static void graph_panel_driverVar__singleProp(uiLayout *layout, ID *id, DriverVa
RNA_pointer_create(id, &RNA_DriverTarget, dtar, &dtar_ptr);
/* Target ID */
- row= uiLayoutRow(layout, 0);
- uiTemplateAnyID(row, &dtar_ptr, "id", "id_type", IFACE_("Prop:"));
+ row = uiLayoutRow(layout, 0);
+ uiTemplateAnyID(row, &dtar_ptr, "id", "id_type", IFACE_("Prop:"));
/* Target Property */
// TODO: make this less technical...
@@ -480,7 +480,7 @@ static void graph_panel_driverVar__singleProp(uiLayout *layout, ID *id, DriverVa
/* get pointer for resolving the property selected */
RNA_id_pointer_create(dtar->id, &root_ptr);
- col= uiLayoutColumn(layout, 1);
+ col = uiLayoutColumn(layout, 1);
/* rna path */
uiTemplatePathBuilder(col, &dtar_ptr, "data_path", &root_ptr, IFACE_("Path"));
}
@@ -489,8 +489,8 @@ static void graph_panel_driverVar__singleProp(uiLayout *layout, ID *id, DriverVa
/* settings for 'rotation difference' driver variable type */
static void graph_panel_driverVar__rotDiff(uiLayout *layout, ID *id, DriverVar *dvar)
{
- DriverTarget *dtar= &dvar->targets[0];
- DriverTarget *dtar2= &dvar->targets[1];
+ DriverTarget *dtar = &dvar->targets[0];
+ DriverTarget *dtar2 = &dvar->targets[1];
Object *ob1 = (Object *)dtar->id;
Object *ob2 = (Object *)dtar2->id;
PointerRNA dtar_ptr, dtar2_ptr;
@@ -501,32 +501,32 @@ static void graph_panel_driverVar__rotDiff(uiLayout *layout, ID *id, DriverVar *
RNA_pointer_create(id, &RNA_DriverTarget, dtar2, &dtar2_ptr);
/* Bone 1 */
- col= uiLayoutColumn(layout, 1);
- uiTemplateAnyID(col, &dtar_ptr, "id", "id_type", IFACE_("Bone 1:"));
+ col = uiLayoutColumn(layout, 1);
+ uiTemplateAnyID(col, &dtar_ptr, "id", "id_type", IFACE_("Bone 1:"));
- if (dtar->id && ob1->pose) {
- PointerRNA tar_ptr;
+ if (dtar->id && ob1->pose) {
+ PointerRNA tar_ptr;
- RNA_pointer_create(dtar->id, &RNA_Pose, ob1->pose, &tar_ptr);
- uiItemPointerR(col, &dtar_ptr, "bone_target", &tar_ptr, "bones", "", ICON_BONE_DATA);
- }
+ RNA_pointer_create(dtar->id, &RNA_Pose, ob1->pose, &tar_ptr);
+ uiItemPointerR(col, &dtar_ptr, "bone_target", &tar_ptr, "bones", "", ICON_BONE_DATA);
+ }
- col= uiLayoutColumn(layout, 1);
- uiTemplateAnyID(col, &dtar2_ptr, "id", "id_type", IFACE_("Bone 2:"));
+ col = uiLayoutColumn(layout, 1);
+ uiTemplateAnyID(col, &dtar2_ptr, "id", "id_type", IFACE_("Bone 2:"));
- if (dtar2->id && ob2->pose) {
- PointerRNA tar_ptr;
+ if (dtar2->id && ob2->pose) {
+ PointerRNA tar_ptr;
- RNA_pointer_create(dtar2->id, &RNA_Pose, ob2->pose, &tar_ptr);
- uiItemPointerR(col, &dtar2_ptr, "bone_target", &tar_ptr, "bones", "", ICON_BONE_DATA);
- }
+ RNA_pointer_create(dtar2->id, &RNA_Pose, ob2->pose, &tar_ptr);
+ uiItemPointerR(col, &dtar2_ptr, "bone_target", &tar_ptr, "bones", "", ICON_BONE_DATA);
+ }
}
/* settings for 'location difference' driver variable type */
static void graph_panel_driverVar__locDiff(uiLayout *layout, ID *id, DriverVar *dvar)
{
- DriverTarget *dtar= &dvar->targets[0];
- DriverTarget *dtar2= &dvar->targets[1];
+ DriverTarget *dtar = &dvar->targets[0];
+ DriverTarget *dtar2 = &dvar->targets[1];
Object *ob1 = (Object *)dtar->id;
Object *ob2 = (Object *)dtar2->id;
PointerRNA dtar_ptr, dtar2_ptr;
@@ -537,35 +537,35 @@ static void graph_panel_driverVar__locDiff(uiLayout *layout, ID *id, DriverVar *
RNA_pointer_create(id, &RNA_DriverTarget, dtar2, &dtar2_ptr);
/* Bone 1 */
- col= uiLayoutColumn(layout, 1);
- uiTemplateAnyID(col, &dtar_ptr, "id", "id_type", IFACE_("Ob/Bone 1:"));
+ col = uiLayoutColumn(layout, 1);
+ uiTemplateAnyID(col, &dtar_ptr, "id", "id_type", IFACE_("Ob/Bone 1:"));
- if (dtar->id && ob1->pose) {
- PointerRNA tar_ptr;
+ if (dtar->id && ob1->pose) {
+ PointerRNA tar_ptr;
- RNA_pointer_create(dtar->id, &RNA_Pose, ob1->pose, &tar_ptr);
- uiItemPointerR(col, &dtar_ptr, "bone_target", &tar_ptr, "bones", "", ICON_BONE_DATA);
- }
+ RNA_pointer_create(dtar->id, &RNA_Pose, ob1->pose, &tar_ptr);
+ uiItemPointerR(col, &dtar_ptr, "bone_target", &tar_ptr, "bones", "", ICON_BONE_DATA);
+ }
- uiItemR(col, &dtar_ptr, "transform_space", 0, NULL, ICON_NONE);
+ uiItemR(col, &dtar_ptr, "transform_space", 0, NULL, ICON_NONE);
- col= uiLayoutColumn(layout, 1);
- uiTemplateAnyID(col, &dtar2_ptr, "id", "id_type", IFACE_("Ob/Bone 2:"));
+ col = uiLayoutColumn(layout, 1);
+ uiTemplateAnyID(col, &dtar2_ptr, "id", "id_type", IFACE_("Ob/Bone 2:"));
- if (dtar2->id && ob2->pose) {
- PointerRNA tar_ptr;
+ if (dtar2->id && ob2->pose) {
+ PointerRNA tar_ptr;
- RNA_pointer_create(dtar2->id, &RNA_Pose, ob2->pose, &tar_ptr);
- uiItemPointerR(col, &dtar2_ptr, "bone_target", &tar_ptr, "bones", "", ICON_BONE_DATA);
- }
+ RNA_pointer_create(dtar2->id, &RNA_Pose, ob2->pose, &tar_ptr);
+ uiItemPointerR(col, &dtar2_ptr, "bone_target", &tar_ptr, "bones", "", ICON_BONE_DATA);
+ }
- uiItemR(col, &dtar2_ptr, "transform_space", 0, NULL, ICON_NONE);
+ uiItemR(col, &dtar2_ptr, "transform_space", 0, NULL, ICON_NONE);
}
/* settings for 'transform channel' driver variable type */
static void graph_panel_driverVar__transChan(uiLayout *layout, ID *id, DriverVar *dvar)
{
- DriverTarget *dtar= &dvar->targets[0];
+ DriverTarget *dtar = &dvar->targets[0];
Object *ob = (Object *)dtar->id;
PointerRNA dtar_ptr;
uiLayout *col, *sub;
@@ -574,19 +574,19 @@ static void graph_panel_driverVar__transChan(uiLayout *layout, ID *id, DriverVar
RNA_pointer_create(id, &RNA_DriverTarget, dtar, &dtar_ptr);
/* properties */
- col= uiLayoutColumn(layout, 1);
- uiTemplateAnyID(col, &dtar_ptr, "id", "id_type", IFACE_("Ob/Bone:"));
+ col = uiLayoutColumn(layout, 1);
+ uiTemplateAnyID(col, &dtar_ptr, "id", "id_type", IFACE_("Ob/Bone:"));
- if (dtar->id && ob->pose) {
- PointerRNA tar_ptr;
+ if (dtar->id && ob->pose) {
+ PointerRNA tar_ptr;
- RNA_pointer_create(dtar->id, &RNA_Pose, ob->pose, &tar_ptr);
- uiItemPointerR(col, &dtar_ptr, "bone_target", &tar_ptr, "bones", "", ICON_BONE_DATA);
- }
+ RNA_pointer_create(dtar->id, &RNA_Pose, ob->pose, &tar_ptr);
+ uiItemPointerR(col, &dtar_ptr, "bone_target", &tar_ptr, "bones", "", ICON_BONE_DATA);
+ }
- sub= uiLayoutColumn(layout, 1);
- uiItemR(sub, &dtar_ptr, "transform_type", 0, NULL, ICON_NONE);
- uiItemR(sub, &dtar_ptr, "transform_space", 0, IFACE_("Space"), ICON_NONE);
+ sub = uiLayoutColumn(layout, 1);
+ uiItemR(sub, &dtar_ptr, "transform_type", 0, NULL, ICON_NONE);
+ uiItemR(sub, &dtar_ptr, "transform_space", 0, IFACE_("Space"), ICON_NONE);
}
/* driver settings for active F-Curve (only for 'Drivers' mode) */
@@ -605,125 +605,125 @@ static void graph_panel_drivers(const bContext *C, Panel *pa)
/* Get settings from context */
if (!graph_panel_context(C, &ale, &fcu))
return;
- driver= fcu->driver;
+ driver = fcu->driver;
/* set event handler for panel */
- block= uiLayoutGetBlock(pa->layout); // xxx?
+ block = uiLayoutGetBlock(pa->layout); // xxx?
uiBlockSetHandleFunc(block, do_graph_region_driver_buttons, NULL);
/* general actions - management */
- col= uiLayoutColumn(pa->layout, 0);
- block= uiLayoutGetBlock(col);
- but = uiDefBut(block, BUT, B_IPO_DEPCHANGE, IFACE_("Update Dependencies"), 0, 0, 10*UI_UNIT_X, 22,
- NULL, 0.0, 0.0, 0, 0, TIP_("Force updates of dependencies"));
- uiButSetFunc(but, driver_update_flags_cb, fcu, NULL);
-
- but = uiDefBut(block, BUT, B_IPO_DEPCHANGE, IFACE_("Remove Driver"), 0, 0, 10*UI_UNIT_X, 18,
- NULL, 0.0, 0.0, 0, 0, TIP_("Remove this driver"));
- uiButSetNFunc(but, driver_remove_cb, MEM_dupallocN(ale), NULL);
+ col = uiLayoutColumn(pa->layout, 0);
+ block = uiLayoutGetBlock(col);
+ but = uiDefBut(block, BUT, B_IPO_DEPCHANGE, IFACE_("Update Dependencies"), 0, 0, 10 * UI_UNIT_X, 22,
+ NULL, 0.0, 0.0, 0, 0, TIP_("Force updates of dependencies"));
+ uiButSetFunc(but, driver_update_flags_cb, fcu, NULL);
+
+ but = uiDefBut(block, BUT, B_IPO_DEPCHANGE, IFACE_("Remove Driver"), 0, 0, 10 * UI_UNIT_X, 18,
+ NULL, 0.0, 0.0, 0, 0, TIP_("Remove this driver"));
+ uiButSetNFunc(but, driver_remove_cb, MEM_dupallocN(ale), NULL);
/* driver-level settings - type, expressions, and errors */
RNA_pointer_create(ale->id, &RNA_Driver, driver, &driver_ptr);
- col= uiLayoutColumn(pa->layout, 1);
- block= uiLayoutGetBlock(col);
- uiItemR(col, &driver_ptr, "type", 0, NULL, ICON_NONE);
-
- /* show expression box if doing scripted drivers, and/or error messages when invalid drivers exist */
- if (driver->type == DRIVER_TYPE_PYTHON) {
- /* expression */
- uiItemR(col, &driver_ptr, "expression", 0, IFACE_("Expr"), ICON_NONE);
-
- /* errors? */
- if (driver->flag & DRIVER_FLAG_INVALID)
- uiItemL(col, IFACE_("ERROR: invalid Python expression"), ICON_ERROR);
- }
- else {
- /* errors? */
- if (driver->flag & DRIVER_FLAG_INVALID)
- uiItemL(col, IFACE_("ERROR: invalid target channel(s)"), ICON_ERROR);
- }
+ col = uiLayoutColumn(pa->layout, 1);
+ block = uiLayoutGetBlock(col);
+ uiItemR(col, &driver_ptr, "type", 0, NULL, ICON_NONE);
+
+ /* show expression box if doing scripted drivers, and/or error messages when invalid drivers exist */
+ if (driver->type == DRIVER_TYPE_PYTHON) {
+ /* expression */
+ uiItemR(col, &driver_ptr, "expression", 0, IFACE_("Expr"), ICON_NONE);
+
+ /* errors? */
+ if (driver->flag & DRIVER_FLAG_INVALID)
+ uiItemL(col, IFACE_("ERROR: invalid Python expression"), ICON_ERROR);
+ }
+ else {
+ /* errors? */
+ if (driver->flag & DRIVER_FLAG_INVALID)
+ uiItemL(col, IFACE_("ERROR: invalid target channel(s)"), ICON_ERROR);
+ }
- col= uiLayoutColumn(pa->layout, 1);
- /* debug setting */
- uiItemR(col, &driver_ptr, "show_debug_info", 0, NULL, ICON_NONE);
+ col = uiLayoutColumn(pa->layout, 1);
+ /* debug setting */
+ uiItemR(col, &driver_ptr, "show_debug_info", 0, NULL, ICON_NONE);
- /* value of driver */
- if (driver->flag & DRIVER_FLAG_SHOWDEBUG) {
- uiLayout *row= uiLayoutRow(col, 1);
- char valBuf[32];
+ /* value of driver */
+ if (driver->flag & DRIVER_FLAG_SHOWDEBUG) {
+ uiLayout *row = uiLayoutRow(col, 1);
+ char valBuf[32];
- uiItemL(row, IFACE_("Driver Value:"), ICON_NONE);
+ uiItemL(row, IFACE_("Driver Value:"), ICON_NONE);
- BLI_snprintf(valBuf, sizeof(valBuf), "%.3f", driver->curval);
- uiItemL(row, valBuf, ICON_NONE);
- }
+ BLI_snprintf(valBuf, sizeof(valBuf), "%.3f", driver->curval);
+ uiItemL(row, valBuf, ICON_NONE);
+ }
/* add driver variables */
- col= uiLayoutColumn(pa->layout, 0);
- block= uiLayoutGetBlock(col);
- but = uiDefBut(block, BUT, B_IPO_DEPCHANGE, IFACE_("Add Variable"), 0, 0, 10*UI_UNIT_X, UI_UNIT_Y,
- NULL, 0.0, 0.0, 0, 0, TIP_("Add a new target variable for this Driver"));
- uiButSetFunc(but, driver_add_var_cb, driver, NULL);
+ col = uiLayoutColumn(pa->layout, 0);
+ block = uiLayoutGetBlock(col);
+ but = uiDefBut(block, BUT, B_IPO_DEPCHANGE, IFACE_("Add Variable"), 0, 0, 10 * UI_UNIT_X, UI_UNIT_Y,
+ NULL, 0.0, 0.0, 0, 0, TIP_("Add a new target variable for this Driver"));
+ uiButSetFunc(but, driver_add_var_cb, driver, NULL);
/* loop over targets, drawing them */
- for (dvar= driver->variables.first; dvar; dvar= dvar->next) {
+ for (dvar = driver->variables.first; dvar; dvar = dvar->next) {
PointerRNA dvar_ptr;
uiLayout *box, *row;
/* sub-layout column for this variable's settings */
- col= uiLayoutColumn(pa->layout, 1);
+ col = uiLayoutColumn(pa->layout, 1);
/* header panel */
- box= uiLayoutBox(col);
- /* first row context info for driver */
- RNA_pointer_create(ale->id, &RNA_DriverVariable, dvar, &dvar_ptr);
-
- row= uiLayoutRow(box, 0);
- block= uiLayoutGetBlock(row);
- /* variable name */
- uiItemR(row, &dvar_ptr, "name", 0, "", ICON_NONE);
-
- /* remove button */
- uiBlockSetEmboss(block, UI_EMBOSSN);
- but = uiDefIconBut(block, BUT, B_IPO_DEPCHANGE, ICON_X, 290, 0, UI_UNIT_X, UI_UNIT_Y,
- NULL, 0.0, 0.0, 0.0, 0.0, IFACE_("Delete target variable"));
- uiButSetFunc(but, driver_delete_var_cb, driver, dvar);
- uiBlockSetEmboss(block, UI_EMBOSS);
-
- /* variable type */
- row= uiLayoutRow(box, 0);
- uiItemR(row, &dvar_ptr, "type", 0, "", ICON_NONE);
+ box = uiLayoutBox(col);
+ /* first row context info for driver */
+ RNA_pointer_create(ale->id, &RNA_DriverVariable, dvar, &dvar_ptr);
+
+ row = uiLayoutRow(box, 0);
+ block = uiLayoutGetBlock(row);
+ /* variable name */
+ uiItemR(row, &dvar_ptr, "name", 0, "", ICON_NONE);
+
+ /* remove button */
+ uiBlockSetEmboss(block, UI_EMBOSSN);
+ but = uiDefIconBut(block, BUT, B_IPO_DEPCHANGE, ICON_X, 290, 0, UI_UNIT_X, UI_UNIT_Y,
+ NULL, 0.0, 0.0, 0.0, 0.0, IFACE_("Delete target variable"));
+ uiButSetFunc(but, driver_delete_var_cb, driver, dvar);
+ uiBlockSetEmboss(block, UI_EMBOSS);
+
+ /* variable type */
+ row = uiLayoutRow(box, 0);
+ uiItemR(row, &dvar_ptr, "type", 0, "", ICON_NONE);
/* variable type settings */
- box= uiLayoutBox(col);
- /* controls to draw depends on the type of variable */
- switch (dvar->type) {
- case DVAR_TYPE_SINGLE_PROP: /* single property */
- graph_panel_driverVar__singleProp(box, ale->id, dvar);
- break;
- case DVAR_TYPE_ROT_DIFF: /* rotational difference */
- graph_panel_driverVar__rotDiff(box, ale->id, dvar);
- break;
- case DVAR_TYPE_LOC_DIFF: /* location difference */
- graph_panel_driverVar__locDiff(box, ale->id, dvar);
- break;
- case DVAR_TYPE_TRANSFORM_CHAN: /* transform channel */
- graph_panel_driverVar__transChan(box, ale->id, dvar);
- break;
- }
-
- /* value of variable */
- if (driver->flag & DRIVER_FLAG_SHOWDEBUG) {
- char valBuf[32];
-
- box= uiLayoutBox(col);
- row= uiLayoutRow(box, 1);
- uiItemL(row, IFACE_("Value:"), ICON_NONE);
-
- BLI_snprintf(valBuf, sizeof(valBuf), "%.3f", dvar->curval);
- uiItemL(row, valBuf, ICON_NONE);
- }
+ box = uiLayoutBox(col);
+ /* controls to draw depends on the type of variable */
+ switch (dvar->type) {
+ case DVAR_TYPE_SINGLE_PROP: /* single property */
+ graph_panel_driverVar__singleProp(box, ale->id, dvar);
+ break;
+ case DVAR_TYPE_ROT_DIFF: /* rotational difference */
+ graph_panel_driverVar__rotDiff(box, ale->id, dvar);
+ break;
+ case DVAR_TYPE_LOC_DIFF: /* location difference */
+ graph_panel_driverVar__locDiff(box, ale->id, dvar);
+ break;
+ case DVAR_TYPE_TRANSFORM_CHAN: /* transform channel */
+ graph_panel_driverVar__transChan(box, ale->id, dvar);
+ break;
+ }
+
+ /* value of variable */
+ if (driver->flag & DRIVER_FLAG_SHOWDEBUG) {
+ char valBuf[32];
+
+ box = uiLayoutBox(col);
+ row = uiLayoutRow(box, 1);
+ uiItemL(row, IFACE_("Value:"), ICON_NONE);
+
+ BLI_snprintf(valBuf, sizeof(valBuf), "%.3f", dvar->curval);
+ uiItemL(row, valBuf, ICON_NONE);
+ }
}
/* cleanup */
@@ -733,7 +733,7 @@ static void graph_panel_drivers(const bContext *C, Panel *pa)
/* ******************* f-modifiers ******************************** */
/* all the drawing code is in editors/animation/fmodifier_ui.c */
-#define B_FMODIFIER_REDRAW 20
+#define B_FMODIFIER_REDRAW 20
static void do_graph_region_modifier_buttons(bContext *C, void *UNUSED(arg), int event)
{
@@ -755,27 +755,27 @@ static void graph_panel_modifiers(const bContext *C, Panel *pa)
if (!graph_panel_context(C, &ale, &fcu))
return;
- block= uiLayoutGetBlock(pa->layout);
+ block = uiLayoutGetBlock(pa->layout);
uiBlockSetHandleFunc(block, do_graph_region_modifier_buttons, NULL);
/* 'add modifier' button at top of panel */
{
- row= uiLayoutRow(pa->layout, 0);
- block= uiLayoutGetBlock(row);
+ row = uiLayoutRow(pa->layout, 0);
+ block = uiLayoutGetBlock(row);
// XXX for now, this will be a operator button which calls a 'add modifier' operator
uiDefButO(block, BUT, "GRAPH_OT_fmodifier_add", WM_OP_INVOKE_REGION_WIN, IFACE_("Add Modifier"),
10, 0, 150, 20, TIP_("Adds a new F-Curve Modifier for the active F-Curve"));
/* copy/paste (as sub-row)*/
- row= uiLayoutRow(row, 1);
- uiItemO(row, "", ICON_COPYDOWN, "GRAPH_OT_fmodifier_copy");
- uiItemO(row, "", ICON_PASTEDOWN, "GRAPH_OT_fmodifier_paste");
+ row = uiLayoutRow(row, 1);
+ uiItemO(row, "", ICON_COPYDOWN, "GRAPH_OT_fmodifier_copy");
+ uiItemO(row, "", ICON_PASTEDOWN, "GRAPH_OT_fmodifier_paste");
}
/* draw each modifier */
- for (fcm= fcu->modifiers.first; fcm; fcm= fcm->next) {
- col= uiLayoutColumn(pa->layout, 1);
+ for (fcm = fcu->modifiers.first; fcm; fcm = fcm->next) {
+ col = uiLayoutColumn(pa->layout, 1);
ANIM_uiTemplate_fmodifier_draw(col, ale->id, &fcu->modifiers, fcm);
}
@@ -789,47 +789,47 @@ void graph_buttons_register(ARegionType *art)
{
PanelType *pt;
- pt= MEM_callocN(sizeof(PanelType), "spacetype graph panel view");
+ pt = MEM_callocN(sizeof(PanelType), "spacetype graph panel view");
strcpy(pt->idname, "GRAPH_PT_view");
strcpy(pt->label, N_("View Properties"));
- pt->draw= graph_panel_view;
+ pt->draw = graph_panel_view;
pt->flag |= PNL_DEFAULT_CLOSED;
BLI_addtail(&art->paneltypes, pt);
- pt= MEM_callocN(sizeof(PanelType), "spacetype graph panel properties");
+ pt = MEM_callocN(sizeof(PanelType), "spacetype graph panel properties");
strcpy(pt->idname, "GRAPH_PT_properties");
strcpy(pt->label, N_("Active F-Curve"));
- pt->draw= graph_panel_properties;
- pt->poll= graph_panel_poll;
+ pt->draw = graph_panel_properties;
+ pt->poll = graph_panel_poll;
BLI_addtail(&art->paneltypes, pt);
- pt= MEM_callocN(sizeof(PanelType), "spacetype graph panel properties");
+ pt = MEM_callocN(sizeof(PanelType), "spacetype graph panel properties");
strcpy(pt->idname, "GRAPH_PT_key_properties");
strcpy(pt->label, N_("Active Keyframe"));
- pt->draw= graph_panel_key_properties;
- pt->poll= graph_panel_poll;
+ pt->draw = graph_panel_key_properties;
+ pt->poll = graph_panel_poll;
BLI_addtail(&art->paneltypes, pt);
- pt= MEM_callocN(sizeof(PanelType), "spacetype graph panel drivers");
+ pt = MEM_callocN(sizeof(PanelType), "spacetype graph panel drivers");
strcpy(pt->idname, "GRAPH_PT_drivers");
strcpy(pt->label, N_("Drivers"));
- pt->draw= graph_panel_drivers;
- pt->poll= graph_panel_drivers_poll;
+ pt->draw = graph_panel_drivers;
+ pt->poll = graph_panel_drivers_poll;
BLI_addtail(&art->paneltypes, pt);
- pt= MEM_callocN(sizeof(PanelType), "spacetype graph panel modifiers");
+ pt = MEM_callocN(sizeof(PanelType), "spacetype graph panel modifiers");
strcpy(pt->idname, "GRAPH_PT_modifiers");
strcpy(pt->label, N_("Modifiers"));
- pt->draw= graph_panel_modifiers;
- pt->poll= graph_panel_poll;
+ pt->draw = graph_panel_modifiers;
+ pt->poll = graph_panel_poll;
BLI_addtail(&art->paneltypes, pt);
}
static int graph_properties(bContext *C, wmOperator *UNUSED(op))
{
- ScrArea *sa= CTX_wm_area(C);
- ARegion *ar= graph_has_buttons_region(sa);
+ ScrArea *sa = CTX_wm_area(C);
+ ARegion *ar = graph_has_buttons_region(sa);
if (ar)
ED_region_toggle_hidden(C, ar);
diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c
index fc84cfc46a2..ddca0030cf5 100644
--- a/source/blender/editors/space_graph/graph_draw.c
+++ b/source/blender/editors/space_graph/graph_draw.c
@@ -84,11 +84,11 @@ static float fcurve_display_alpha(FCurve *fcu)
/* Envelope -------------- */
// TODO: draw a shaded poly showing the region of influence too!!!
-static void draw_fcurve_modifier_controls_envelope (FModifier *fcm, View2D *v2d)
+static void draw_fcurve_modifier_controls_envelope(FModifier *fcm, View2D *v2d)
{
- FMod_Envelope *env= (FMod_Envelope *)fcm->data;
+ FMod_Envelope *env = (FMod_Envelope *)fcm->data;
FCM_EnvelopeData *fed;
- const float fac= 0.05f * (v2d->cur.xmax - v2d->cur.xmin);
+ const float fac = 0.05f * (v2d->cur.xmax - v2d->cur.xmin);
int i;
/* draw two black lines showing the standard reference levels */
@@ -96,11 +96,11 @@ static void draw_fcurve_modifier_controls_envelope (FModifier *fcm, View2D *v2d)
setlinestyle(5);
glBegin(GL_LINES);
- glVertex2f(v2d->cur.xmin, env->midval+env->min);
- glVertex2f(v2d->cur.xmax, env->midval+env->min);
+ glVertex2f(v2d->cur.xmin, env->midval + env->min);
+ glVertex2f(v2d->cur.xmax, env->midval + env->min);
- glVertex2f(v2d->cur.xmin, env->midval+env->max);
- glVertex2f(v2d->cur.xmax, env->midval+env->max);
+ glVertex2f(v2d->cur.xmin, env->midval + env->max);
+ glVertex2f(v2d->cur.xmax, env->midval + env->max);
glEnd(); // GL_LINES
setlinestyle(0);
@@ -114,7 +114,7 @@ static void draw_fcurve_modifier_controls_envelope (FModifier *fcm, View2D *v2d)
* drawing bugs that some drivers have (probably legacy ones only though)
*/
bglBegin(GL_POINTS);
- for (i=0, fed=env->data; i < env->totvert; i++, fed++) {
+ for (i = 0, fed = env->data; i < env->totvert; i++, fed++) {
/* only draw if visible
* - min/max here are fixed, not relative
*/
@@ -134,10 +134,10 @@ static void draw_fcurve_modifier_controls_envelope (FModifier *fcm, View2D *v2d)
/* Points ---------------- */
/* helper func - draw keyframe vertices only for an F-Curve */
-static void draw_fcurve_vertices_keyframes (FCurve *fcu, SpaceIpo *UNUSED(sipo), View2D *v2d, short edit, short sel)
+static void draw_fcurve_vertices_keyframes(FCurve *fcu, SpaceIpo *UNUSED(sipo), View2D *v2d, short edit, short sel)
{
- BezTriple *bezt= fcu->bezt;
- const float fac= 0.05f * (v2d->cur.xmax - v2d->cur.xmin);
+ BezTriple *bezt = fcu->bezt;
+ const float fac = 0.05f * (v2d->cur.xmax - v2d->cur.xmin);
int i;
/* we use bgl points not standard gl points, to workaround vertex
@@ -174,18 +174,18 @@ static void draw_fcurve_vertices_keyframes (FCurve *fcu, SpaceIpo *UNUSED(sipo),
* NOTE: the caller MUST HAVE GL_LINE_SMOOTH & GL_BLEND ENABLED, otherwise, the controls don't
* have a consistent appearance (due to off-pixel alignments)...
*/
-static void draw_fcurve_handle_control (float x, float y, float xscale, float yscale, float hsize)
+static void draw_fcurve_handle_control(float x, float y, float xscale, float yscale, float hsize)
{
- static GLuint displist=0;
+ static GLuint displist = 0;
/* initialize round circle shape */
if (displist == 0) {
GLUquadricObj *qobj;
- displist= glGenLists(1);
+ displist = glGenLists(1);
glNewList(displist, GL_COMPILE);
- qobj = gluNewQuadric();
+ qobj = gluNewQuadric();
gluQuadricDrawStyle(qobj, GLU_SILHOUETTE);
gluDisk(qobj, 0, 0.7, 8, 1);
gluDeleteQuadric(qobj);
@@ -195,26 +195,26 @@ static void draw_fcurve_handle_control (float x, float y, float xscale, float ys
/* adjust view transform before starting */
glTranslatef(x, y, 0.0f);
- glScalef(1.0f/xscale*hsize, 1.0f/yscale*hsize, 1.0f);
+ glScalef(1.0f / xscale * hsize, 1.0f / yscale * hsize, 1.0f);
/* draw! */
glCallList(displist);
/* restore view transform */
- glScalef(xscale/hsize, yscale/hsize, 1.0);
+ glScalef(xscale / hsize, yscale / hsize, 1.0);
glTranslatef(-x, -y, 0.0f);
}
/* helper func - draw handle vertices only for an F-Curve (if it is not protected) */
-static void draw_fcurve_vertices_handles (FCurve *fcu, SpaceIpo *sipo, View2D *v2d, short sel, short sel_handle_only)
+static void draw_fcurve_vertices_handles(FCurve *fcu, SpaceIpo *sipo, View2D *v2d, short sel, short sel_handle_only)
{
- BezTriple *bezt= fcu->bezt;
+ BezTriple *bezt = fcu->bezt;
BezTriple *prevbezt = NULL;
float hsize, xscale, yscale;
int i;
/* get view settings */
- hsize= UI_GetThemeValuef(TH_HANDLE_VERTEX_SIZE);
+ hsize = UI_GetThemeValuef(TH_HANDLE_VERTEX_SIZE);
UI_view2d_getscale(v2d, &xscale, &yscale);
/* set handle color */
@@ -222,10 +222,10 @@ static void draw_fcurve_vertices_handles (FCurve *fcu, SpaceIpo *sipo, View2D *v
else UI_ThemeColor(TH_HANDLE_VERTEX);
/* anti-aliased lines for more consistent appearance */
- if ((sipo->flag & SIPO_BEAUTYDRAW_OFF)==0) glEnable(GL_LINE_SMOOTH);
+ if ((sipo->flag & SIPO_BEAUTYDRAW_OFF) == 0) glEnable(GL_LINE_SMOOTH);
glEnable(GL_BLEND);
- for (i=0; i < fcu->totvert; i++, prevbezt=bezt, bezt++) {
+ for (i = 0; i < fcu->totvert; i++, prevbezt = bezt, bezt++) {
/* Draw the editmode handles for a bezier curve (others don't have handles)
* if their selection status matches the selection status we're drawing for
* - first handle only if previous beztriple was bezier-mode
@@ -234,31 +234,31 @@ static void draw_fcurve_vertices_handles (FCurve *fcu, SpaceIpo *sipo, View2D *v
* Also, need to take into account whether the keyframe was selected
* if a Graph Editor option to only show handles of selected keys is on.
*/
- if ( !sel_handle_only || BEZSELECTED(bezt) ) {
- if ( (!prevbezt && (bezt->ipo==BEZT_IPO_BEZ)) || (prevbezt && (prevbezt->ipo==BEZT_IPO_BEZ)) ) {
- if ((bezt->f1 & SELECT) == sel)/* && v2d->cur.xmin < bezt->vec[0][0] < v2d->cur.xmax)*/
+ if (!sel_handle_only || BEZSELECTED(bezt) ) {
+ if ( (!prevbezt && (bezt->ipo == BEZT_IPO_BEZ)) || (prevbezt && (prevbezt->ipo == BEZT_IPO_BEZ)) ) {
+ if ((bezt->f1 & SELECT) == sel) /* && v2d->cur.xmin < bezt->vec[0][0] < v2d->cur.xmax)*/
draw_fcurve_handle_control(bezt->vec[0][0], bezt->vec[0][1], xscale, yscale, hsize);
}
- if (bezt->ipo==BEZT_IPO_BEZ) {
- if ((bezt->f3 & SELECT) == sel)/* && v2d->cur.xmin < bezt->vec[2][0] < v2d->cur.xmax)*/
+ if (bezt->ipo == BEZT_IPO_BEZ) {
+ if ((bezt->f3 & SELECT) == sel) /* && v2d->cur.xmin < bezt->vec[2][0] < v2d->cur.xmax)*/
draw_fcurve_handle_control(bezt->vec[2][0], bezt->vec[2][1], xscale, yscale, hsize);
}
}
}
- if ((sipo->flag & SIPO_BEAUTYDRAW_OFF)==0) glDisable(GL_LINE_SMOOTH);
+ if ((sipo->flag & SIPO_BEAUTYDRAW_OFF) == 0) glDisable(GL_LINE_SMOOTH);
glDisable(GL_BLEND);
}
/* helper func - set color to draw F-Curve data with */
-static void set_fcurve_vertex_color (FCurve *fcu, short sel)
+static void set_fcurve_vertex_color(FCurve *fcu, short sel)
{
/* Fade the 'intensity' of the vertices based on the selection of the curves too */
- int alphaOffset= (int)((fcurve_display_alpha(fcu) - 1.0f) * 255);
+ int alphaOffset = (int)((fcurve_display_alpha(fcu) - 1.0f) * 255);
/* Set color of curve vertex based on state of curve (i.e. 'Edit' Mode) */
- if ((fcu->flag & FCURVE_PROTECTED)==0) {
+ if ((fcu->flag & FCURVE_PROTECTED) == 0) {
/* Curve's points ARE BEING edited */
if (sel) UI_ThemeColorShadeAlpha(TH_VERTEX_SELECT, 0, alphaOffset);
else UI_ThemeColorShadeAlpha(TH_VERTEX, 0, alphaOffset);
@@ -271,14 +271,14 @@ static void set_fcurve_vertex_color (FCurve *fcu, short sel)
}
-static void draw_fcurve_vertices (SpaceIpo *sipo, ARegion *ar, FCurve *fcu, short do_handles, short sel_handle_only)
+static void draw_fcurve_vertices(SpaceIpo *sipo, ARegion *ar, FCurve *fcu, short do_handles, short sel_handle_only)
{
- View2D *v2d= &ar->v2d;
+ View2D *v2d = &ar->v2d;
/* only draw points if curve is visible
- * - draw unselected points before selected points as separate passes to minimise color-changing overhead
+ * - draw unselected points before selected points as separate passes to minimise color-changing overhead
* (XXX dunno if this is faster than drawing all in one pass though)
- * and also to make sure in the case of overlapping points that the selected is always visible
+ * and also to make sure in the case of overlapping points that the selected is always visible
* - draw handles before keyframes, so that keyframes will overlap handles (keyframes are more important for users)
*/
@@ -308,14 +308,14 @@ static void draw_fcurve_vertices (SpaceIpo *sipo, ARegion *ar, FCurve *fcu, shor
static int draw_fcurve_handles_check(SpaceIpo *sipo, FCurve *fcu)
{
/* don't draw handle lines if handles are not to be shown */
- if ( (sipo->flag & SIPO_NOHANDLES) || /* handles shouldn't be shown anywhere */
- (fcu->flag & FCURVE_PROTECTED) || /* keyframes aren't editable */
-#if 0 /* handles can still be selected and handle types set, better draw - campbell */
- (fcu->flag & FCURVE_INT_VALUES) || /* editing the handles here will cause weird/incorrect interpolation issues */
+ if ( (sipo->flag & SIPO_NOHANDLES) || /* handles shouldn't be shown anywhere */
+ (fcu->flag & FCURVE_PROTECTED) || /* keyframes aren't editable */
+#if 0 /* handles can still be selected and handle types set, better draw - campbell */
+ (fcu->flag & FCURVE_INT_VALUES) || /* editing the handles here will cause weird/incorrect interpolation issues */
#endif
- ((fcu->grp) && (fcu->grp->flag & AGRP_PROTECTED)) || /* group that curve belongs to is not editable */
- (fcu->totvert <= 1) /* do not show handles if there is only 1 keyframe, otherwise they all clump together in an ugly ball */
- )
+ ((fcu->grp) && (fcu->grp->flag & AGRP_PROTECTED)) || /* group that curve belongs to is not editable */
+ (fcu->totvert <= 1) /* do not show handles if there is only 1 keyframe, otherwise they all clump together in an ugly ball */
+ )
{
return 0;
}
@@ -326,7 +326,7 @@ static int draw_fcurve_handles_check(SpaceIpo *sipo, FCurve *fcu)
/* draw lines for F-Curve handles only (this is only done in EditMode)
* note: draw_fcurve_handles_check must be checked before running this. */
-static void draw_fcurve_handles (SpaceIpo *sipo, FCurve *fcu)
+static void draw_fcurve_handles(SpaceIpo *sipo, FCurve *fcu)
{
int sel, b;
@@ -339,13 +339,13 @@ static void draw_fcurve_handles (SpaceIpo *sipo, FCurve *fcu)
/* slightly hacky, but we want to draw unselected points before selected ones
* so that selected points are clearly visible
*/
- for (sel= 0; sel < 2; sel++) {
- BezTriple *bezt=fcu->bezt, *prevbezt=NULL;
- int basecol= (sel)? TH_HANDLE_SEL_FREE : TH_HANDLE_FREE;
+ for (sel = 0; sel < 2; sel++) {
+ BezTriple *bezt = fcu->bezt, *prevbezt = NULL;
+ int basecol = (sel) ? TH_HANDLE_SEL_FREE : TH_HANDLE_FREE;
float *fp;
unsigned char col[4];
- for (b= 0; b < fcu->totvert; b++, prevbezt=bezt, bezt++) {
+ for (b = 0; b < fcu->totvert; b++, prevbezt = bezt, bezt++) {
/* if only selected keyframes can get their handles shown,
* check that keyframe is selected
*/
@@ -355,50 +355,50 @@ static void draw_fcurve_handles (SpaceIpo *sipo, FCurve *fcu)
}
/* draw handle with appropriate set of colors if selection is ok */
- if ((bezt->f2 & SELECT)==sel) {
- fp= bezt->vec[0];
+ if ((bezt->f2 & SELECT) == sel) {
+ fp = bezt->vec[0];
/* only draw first handle if previous segment had handles */
- if ((!prevbezt && (bezt->ipo==BEZT_IPO_BEZ)) || (prevbezt && (prevbezt->ipo==BEZT_IPO_BEZ))) {
+ if ((!prevbezt && (bezt->ipo == BEZT_IPO_BEZ)) || (prevbezt && (prevbezt->ipo == BEZT_IPO_BEZ))) {
UI_GetThemeColor3ubv(basecol + bezt->h1, col);
- col[3]= fcurve_display_alpha(fcu) * 255;
+ col[3] = fcurve_display_alpha(fcu) * 255;
glColor4ubv((GLubyte *)col);
- glVertex2fv(fp); glVertex2fv(fp+3);
+ glVertex2fv(fp); glVertex2fv(fp + 3);
}
/* only draw second handle if this segment is bezier */
if (bezt->ipo == BEZT_IPO_BEZ) {
UI_GetThemeColor3ubv(basecol + bezt->h2, col);
- col[3]= fcurve_display_alpha(fcu) * 255;
+ col[3] = fcurve_display_alpha(fcu) * 255;
glColor4ubv((GLubyte *)col);
- glVertex2fv(fp+3); glVertex2fv(fp+6);
+ glVertex2fv(fp + 3); glVertex2fv(fp + 6);
}
}
else {
/* only draw first handle if previous segment was had handles, and selection is ok */
- if ( ((bezt->f1 & SELECT)==sel) &&
- ( (!prevbezt && (bezt->ipo==BEZT_IPO_BEZ)) || (prevbezt && (prevbezt->ipo==BEZT_IPO_BEZ)) ) )
+ if ( ((bezt->f1 & SELECT) == sel) &&
+ ( (!prevbezt && (bezt->ipo == BEZT_IPO_BEZ)) || (prevbezt && (prevbezt->ipo == BEZT_IPO_BEZ)) ) )
{
- fp= bezt->vec[0];
+ fp = bezt->vec[0];
UI_GetThemeColor3ubv(basecol + bezt->h1, col);
- col[3]= fcurve_display_alpha(fcu) * 255;
+ col[3] = fcurve_display_alpha(fcu) * 255;
glColor4ubv((GLubyte *)col);
- glVertex2fv(fp); glVertex2fv(fp+3);
+ glVertex2fv(fp); glVertex2fv(fp + 3);
}
/* only draw second handle if this segment is bezier, and selection is ok */
- if ( ((bezt->f3 & SELECT)==sel) &&
- (bezt->ipo == BEZT_IPO_BEZ) )
+ if ( ((bezt->f3 & SELECT) == sel) &&
+ (bezt->ipo == BEZT_IPO_BEZ) )
{
- fp= bezt->vec[1];
+ fp = bezt->vec[1];
UI_GetThemeColor3ubv(basecol + bezt->h2, col);
- col[3]= fcurve_display_alpha(fcu) * 255;
+ col[3] = fcurve_display_alpha(fcu) * 255;
glColor4ubv((GLubyte *)col);
- glVertex2fv(fp); glVertex2fv(fp+3);
+ glVertex2fv(fp); glVertex2fv(fp + 3);
}
}
}
@@ -413,21 +413,21 @@ static void draw_fcurve_handles (SpaceIpo *sipo, FCurve *fcu)
* NOTE: the caller MUST HAVE GL_LINE_SMOOTH & GL_BLEND ENABLED, otherwise, the controls don't
* have a consistent appearance (due to off-pixel alignments)...
*/
-static void draw_fcurve_sample_control (float x, float y, float xscale, float yscale, float hsize)
+static void draw_fcurve_sample_control(float x, float y, float xscale, float yscale, float hsize)
{
- static GLuint displist=0;
+ static GLuint displist = 0;
/* initialize X shape */
if (displist == 0) {
- displist= glGenLists(1);
+ displist = glGenLists(1);
glNewList(displist, GL_COMPILE);
glBegin(GL_LINES);
- glVertex2f(-0.7f, -0.7f);
- glVertex2f(+0.7f, +0.7f);
+ glVertex2f(-0.7f, -0.7f);
+ glVertex2f(+0.7f, +0.7f);
- glVertex2f(-0.7f, +0.7f);
- glVertex2f(+0.7f, -0.7f);
+ glVertex2f(-0.7f, +0.7f);
+ glVertex2f(+0.7f, -0.7f);
glEnd(); // GL_LINES
glEndList();
@@ -435,52 +435,52 @@ static void draw_fcurve_sample_control (float x, float y, float xscale, float ys
/* adjust view transform before starting */
glTranslatef(x, y, 0.0f);
- glScalef(1.0f/xscale*hsize, 1.0f/yscale*hsize, 1.0f);
+ glScalef(1.0f / xscale * hsize, 1.0f / yscale * hsize, 1.0f);
/* draw! */
glCallList(displist);
/* restore view transform */
- glScalef(xscale/hsize, yscale/hsize, 1.0);
+ glScalef(xscale / hsize, yscale / hsize, 1.0);
glTranslatef(-x, -y, 0.0f);
}
/* helper func - draw keyframe vertices only for an F-Curve */
-static void draw_fcurve_samples (SpaceIpo *sipo, ARegion *ar, FCurve *fcu)
+static void draw_fcurve_samples(SpaceIpo *sipo, ARegion *ar, FCurve *fcu)
{
FPoint *first, *last;
float hsize, xscale, yscale;
/* get view settings */
- hsize= UI_GetThemeValuef(TH_VERTEX_SIZE);
+ hsize = UI_GetThemeValuef(TH_VERTEX_SIZE);
UI_view2d_getscale(&ar->v2d, &xscale, &yscale);
/* set vertex color */
- if (fcu->flag & (FCURVE_ACTIVE|FCURVE_SELECTED)) UI_ThemeColor(TH_TEXT_HI);
+ if (fcu->flag & (FCURVE_ACTIVE | FCURVE_SELECTED)) UI_ThemeColor(TH_TEXT_HI);
else UI_ThemeColor(TH_TEXT);
/* get verts */
- first= fcu->fpt;
- last= (first) ? (first + (fcu->totvert-1)) : (NULL);
+ first = fcu->fpt;
+ last = (first) ? (first + (fcu->totvert - 1)) : (NULL);
/* draw */
if (first && last) {
/* anti-aliased lines for more consistent appearance */
- if ((sipo->flag & SIPO_BEAUTYDRAW_OFF)==0) glEnable(GL_LINE_SMOOTH);
+ if ((sipo->flag & SIPO_BEAUTYDRAW_OFF) == 0) glEnable(GL_LINE_SMOOTH);
glEnable(GL_BLEND);
draw_fcurve_sample_control(first->vec[0], first->vec[1], xscale, yscale, hsize);
draw_fcurve_sample_control(last->vec[0], last->vec[1], xscale, yscale, hsize);
glDisable(GL_BLEND);
- if ((sipo->flag & SIPO_BEAUTYDRAW_OFF)==0) glDisable(GL_LINE_SMOOTH);
+ if ((sipo->flag & SIPO_BEAUTYDRAW_OFF) == 0) glDisable(GL_LINE_SMOOTH);
}
}
/* Curve ---------------- */
/* helper func - just draw the F-Curve by sampling the visible region (for drawing curves with modifiers) */
-static void draw_fcurve_curve (bAnimContext *ac, ID *id, FCurve *fcu, View2D *v2d, View2DGrid *grid)
+static void draw_fcurve_curve(bAnimContext *ac, ID *id, FCurve *fcu, View2D *v2d, View2DGrid *grid)
{
ChannelDriver *driver;
float samplefreq, ctime;
@@ -496,33 +496,33 @@ static void draw_fcurve_curve (bAnimContext *ac, ID *id, FCurve *fcu, View2D *v2
/* disable any drivers temporarily */
- driver= fcu->driver;
- fcu->driver= NULL;
+ driver = fcu->driver;
+ fcu->driver = NULL;
/* compute unit correction factor */
- unitFac= ANIM_unit_mapping_get_factor(ac->scene, id, fcu, 0);
+ unitFac = ANIM_unit_mapping_get_factor(ac->scene, id, fcu, 0);
/* Note about sampling frequency:
- * Ideally, this is chosen such that we have 1-2 pixels = 1 segment
+ * Ideally, this is chosen such that we have 1-2 pixels = 1 segment
* which means that our curves can be as smooth as possible. However,
- * this does mean that curves may not be fully accurate (i.e. if they have
- * sudden spikes which happen at the sampling point, we may have problems).
- * Also, this may introduce lower performance on less densely detailed curves,'
+ * this does mean that curves may not be fully accurate (i.e. if they have
+ * sudden spikes which happen at the sampling point, we may have problems).
+ * Also, this may introduce lower performance on less densely detailed curves,'
* though it is impossible to predict this from the modifiers!
*
* If the automatically determined sampling frequency is likely to cause an infinite
* loop (i.e. too close to 0), then clamp it to a determined "safe" value. The value
- * chosen here is just the coarsest value which still looks reasonable...
+ * chosen here is just the coarsest value which still looks reasonable...
*/
- /* grid->dx represents the number of 'frames' between gridlines, but we divide by U.v2d_min_gridsize to get pixels-steps */
- // TODO: perhaps we should have 1.0 frames as upper limit so that curves don't get too distorted?
- samplefreq= dx / U.v2d_min_gridsize;
- if (samplefreq < 0.00001f) samplefreq= 0.00001f;
+ /* grid->dx represents the number of 'frames' between gridlines, but we divide by U.v2d_min_gridsize to get pixels-steps */
+ // TODO: perhaps we should have 1.0 frames as upper limit so that curves don't get too distorted?
+ samplefreq = dx / U.v2d_min_gridsize;
+ if (samplefreq < 0.00001f) samplefreq = 0.00001f;
/* the start/end times are simply the horizontal extents of the 'cur' rect */
- stime= v2d->cur.xmin;
- etime= v2d->cur.xmax + samplefreq; /* + samplefreq here so that last item gets included... */
+ stime = v2d->cur.xmin;
+ etime = v2d->cur.xmax + samplefreq; /* + samplefreq here so that last item gets included... */
/* at each sampling interval, add a new vertex
@@ -531,22 +531,22 @@ static void draw_fcurve_curve (bAnimContext *ac, ID *id, FCurve *fcu, View2D *v2
*/
glBegin(GL_LINE_STRIP);
- for (ctime= stime; ctime <= etime; ctime += samplefreq)
- glVertex2f( ctime, evaluate_fcurve(fcu, ctime)*unitFac );
+ for (ctime = stime; ctime <= etime; ctime += samplefreq)
+ glVertex2f(ctime, evaluate_fcurve(fcu, ctime) * unitFac);
glEnd();
/* restore driver */
- fcu->driver= driver;
+ fcu->driver = driver;
}
/* helper func - draw a samples-based F-Curve */
-static void draw_fcurve_curve_samples (bAnimContext *ac, ID *id, FCurve *fcu, View2D *v2d)
+static void draw_fcurve_curve_samples(bAnimContext *ac, ID *id, FCurve *fcu, View2D *v2d)
{
- FPoint *prevfpt= fcu->fpt;
- FPoint *fpt= prevfpt + 1;
+ FPoint *prevfpt = fcu->fpt;
+ FPoint *fpt = prevfpt + 1;
float fac, v[2];
- int b= fcu->totvert-1;
+ int b = fcu->totvert - 1;
glBegin(GL_LINE_STRIP);
@@ -555,18 +555,18 @@ static void draw_fcurve_curve_samples (bAnimContext *ac, ID *id, FCurve *fcu, Vi
/* extrapolate to left? - left-side of view comes before first keyframe? */
if (prevfpt->vec[0] > v2d->cur.xmin) {
- v[0]= v2d->cur.xmin;
+ v[0] = v2d->cur.xmin;
/* y-value depends on the interpolation */
- if ((fcu->extend==FCURVE_EXTRAPOLATE_CONSTANT) || (fcu->flag & FCURVE_INT_VALUES) || (fcu->totvert==1)) {
+ if ((fcu->extend == FCURVE_EXTRAPOLATE_CONSTANT) || (fcu->flag & FCURVE_INT_VALUES) || (fcu->totvert == 1)) {
/* just extend across the first keyframe's value */
- v[1]= prevfpt->vec[1];
+ v[1] = prevfpt->vec[1];
}
else {
/* extrapolate linear dosnt use the handle, use the next points center instead */
- fac= (prevfpt->vec[0]-fpt->vec[0])/(prevfpt->vec[0]-v[0]);
- if (fac) fac= 1.0f/fac;
- v[1]= prevfpt->vec[1]-fac*(prevfpt->vec[1]-fpt->vec[1]);
+ fac = (prevfpt->vec[0] - fpt->vec[0]) / (prevfpt->vec[0] - v[0]);
+ if (fac) fac = 1.0f / fac;
+ v[1] = prevfpt->vec[1] - fac * (prevfpt->vec[1] - fpt->vec[1]);
}
glVertex2fv(v);
@@ -583,7 +583,7 @@ static void draw_fcurve_curve_samples (bAnimContext *ac, ID *id, FCurve *fcu, Vi
glVertex2fv(prevfpt->vec);
/* get next pointers */
- prevfpt= fpt;
+ prevfpt = fpt;
fpt++;
/* last point? */
@@ -593,19 +593,19 @@ static void draw_fcurve_curve_samples (bAnimContext *ac, ID *id, FCurve *fcu, Vi
/* extrapolate to right? (see code for left-extrapolation above too) */
if (prevfpt->vec[0] < v2d->cur.xmax) {
- v[0]= v2d->cur.xmax;
+ v[0] = v2d->cur.xmax;
/* y-value depends on the interpolation */
- if ((fcu->extend==FCURVE_EXTRAPOLATE_CONSTANT) || (fcu->flag & FCURVE_INT_VALUES) || (fcu->totvert==1)) {
+ if ((fcu->extend == FCURVE_EXTRAPOLATE_CONSTANT) || (fcu->flag & FCURVE_INT_VALUES) || (fcu->totvert == 1)) {
/* based on last keyframe's value */
- v[1]= prevfpt->vec[1];
+ v[1] = prevfpt->vec[1];
}
else {
/* extrapolate linear dosnt use the handle, use the previous points center instead */
- fpt = prevfpt-1;
- fac= (prevfpt->vec[0]-fpt->vec[0])/(prevfpt->vec[0]-v[0]);
- if (fac) fac= 1.0f/fac;
- v[1]= prevfpt->vec[1]-fac*(prevfpt->vec[1]-fpt->vec[1]);
+ fpt = prevfpt - 1;
+ fac = (prevfpt->vec[0] - fpt->vec[0]) / (prevfpt->vec[0] - v[0]);
+ if (fac) fac = 1.0f / fac;
+ v[1] = prevfpt->vec[1] - fac * (prevfpt->vec[1] - fpt->vec[1]);
}
glVertex2fv(v);
@@ -618,14 +618,14 @@ static void draw_fcurve_curve_samples (bAnimContext *ac, ID *id, FCurve *fcu, Vi
}
/* helper func - draw one repeat of an F-Curve */
-static void draw_fcurve_curve_bezts (bAnimContext *ac, ID *id, FCurve *fcu, View2D *v2d)
+static void draw_fcurve_curve_bezts(bAnimContext *ac, ID *id, FCurve *fcu, View2D *v2d)
{
- BezTriple *prevbezt= fcu->bezt;
- BezTriple *bezt= prevbezt+1;
+ BezTriple *prevbezt = fcu->bezt;
+ BezTriple *bezt = prevbezt + 1;
float v1[2], v2[2], v3[2], v4[2];
float *fp, data[120];
- float fac= 0.0f;
- int b= fcu->totvert-1;
+ float fac = 0.0f;
+ int b = fcu->totvert - 1;
int resol;
glBegin(GL_LINE_STRIP);
@@ -636,24 +636,24 @@ static void draw_fcurve_curve_bezts (bAnimContext *ac, ID *id, FCurve *fcu, View
/* extrapolate to left? */
if (prevbezt->vec[1][0] > v2d->cur.xmin) {
/* left-side of view comes before first keyframe, so need to extend as not cyclic */
- v1[0]= v2d->cur.xmin;
+ v1[0] = v2d->cur.xmin;
/* y-value depends on the interpolation */
- if ((fcu->extend==FCURVE_EXTRAPOLATE_CONSTANT) || (prevbezt->ipo==BEZT_IPO_CONST) || (fcu->totvert==1)) {
+ if ((fcu->extend == FCURVE_EXTRAPOLATE_CONSTANT) || (prevbezt->ipo == BEZT_IPO_CONST) || (fcu->totvert == 1)) {
/* just extend across the first keyframe's value */
- v1[1]= prevbezt->vec[1][1];
+ v1[1] = prevbezt->vec[1][1];
}
- else if (prevbezt->ipo==BEZT_IPO_LIN) {
+ else if (prevbezt->ipo == BEZT_IPO_LIN) {
/* extrapolate linear dosnt use the handle, use the next points center instead */
- fac= (prevbezt->vec[1][0]-bezt->vec[1][0])/(prevbezt->vec[1][0]-v1[0]);
- if (fac) fac= 1.0f/fac;
- v1[1]= prevbezt->vec[1][1]-fac*(prevbezt->vec[1][1]-bezt->vec[1][1]);
+ fac = (prevbezt->vec[1][0] - bezt->vec[1][0]) / (prevbezt->vec[1][0] - v1[0]);
+ if (fac) fac = 1.0f / fac;
+ v1[1] = prevbezt->vec[1][1] - fac * (prevbezt->vec[1][1] - bezt->vec[1][1]);
}
else {
/* based on angle of handle 1 (relative to keyframe) */
- fac= (prevbezt->vec[0][0]-prevbezt->vec[1][0])/(prevbezt->vec[1][0]-v1[0]);
- if (fac) fac= 1.0f/fac;
- v1[1]= prevbezt->vec[1][1]-fac*(prevbezt->vec[0][1]-prevbezt->vec[1][1]);
+ fac = (prevbezt->vec[0][0] - prevbezt->vec[1][0]) / (prevbezt->vec[1][0] - v1[0]);
+ if (fac) fac = 1.0f / fac;
+ v1[1] = prevbezt->vec[1][1] - fac * (prevbezt->vec[0][1] - prevbezt->vec[1][1]);
}
glVertex2fv(v1);
@@ -661,28 +661,28 @@ static void draw_fcurve_curve_bezts (bAnimContext *ac, ID *id, FCurve *fcu, View
/* if only one keyframe, add it now */
if (fcu->totvert == 1) {
- v1[0]= prevbezt->vec[1][0];
- v1[1]= prevbezt->vec[1][1];
+ v1[0] = prevbezt->vec[1][0];
+ v1[1] = prevbezt->vec[1][1];
glVertex2fv(v1);
}
/* draw curve between first and last keyframe (if there are enough to do so) */
// TODO: optimize this to not have to calc stuff out of view too?
while (b--) {
- if (prevbezt->ipo==BEZT_IPO_CONST) {
+ if (prevbezt->ipo == BEZT_IPO_CONST) {
/* Constant-Interpolation: draw segment between previous keyframe and next, but holding same value */
- v1[0]= prevbezt->vec[1][0];
- v1[1]= prevbezt->vec[1][1];
+ v1[0] = prevbezt->vec[1][0];
+ v1[1] = prevbezt->vec[1][1];
glVertex2fv(v1);
- v1[0]= bezt->vec[1][0];
- v1[1]= prevbezt->vec[1][1];
+ v1[0] = bezt->vec[1][0];
+ v1[1] = prevbezt->vec[1][1];
glVertex2fv(v1);
}
- else if (prevbezt->ipo==BEZT_IPO_LIN) {
+ else if (prevbezt->ipo == BEZT_IPO_LIN) {
/* Linear interpolation: just add one point (which should add a new line segment) */
- v1[0]= prevbezt->vec[1][0];
- v1[1]= prevbezt->vec[1][1];
+ v1[0] = prevbezt->vec[1][0];
+ v1[1] = prevbezt->vec[1][1];
glVertex2fv(v1);
}
else {
@@ -693,74 +693,74 @@ static void draw_fcurve_curve_bezts (bAnimContext *ac, ID *id, FCurve *fcu, View
/* resol depends on distance between points (not just horizontal) OR is a fixed high res */
// TODO: view scale should factor into this someday too...
if (fcu->driver)
- resol= 32;
+ resol = 32;
else
- resol= (int)(5.0f*len_v2v2(bezt->vec[1], prevbezt->vec[1]));
+ resol = (int)(5.0f * len_v2v2(bezt->vec[1], prevbezt->vec[1]));
if (resol < 2) {
/* only draw one */
- v1[0]= prevbezt->vec[1][0];
- v1[1]= prevbezt->vec[1][1];
+ v1[0] = prevbezt->vec[1][0];
+ v1[1] = prevbezt->vec[1][1];
glVertex2fv(v1);
}
else {
/* clamp resolution to max of 32 */
// NOTE: higher values will crash
- if (resol > 32) resol= 32;
+ if (resol > 32) resol = 32;
- v1[0]= prevbezt->vec[1][0];
- v1[1]= prevbezt->vec[1][1];
- v2[0]= prevbezt->vec[2][0];
- v2[1]= prevbezt->vec[2][1];
-
- v3[0]= bezt->vec[0][0];
- v3[1]= bezt->vec[0][1];
- v4[0]= bezt->vec[1][0];
- v4[1]= bezt->vec[1][1];
+ v1[0] = prevbezt->vec[1][0];
+ v1[1] = prevbezt->vec[1][1];
+ v2[0] = prevbezt->vec[2][0];
+ v2[1] = prevbezt->vec[2][1];
+
+ v3[0] = bezt->vec[0][0];
+ v3[1] = bezt->vec[0][1];
+ v4[0] = bezt->vec[1][0];
+ v4[1] = bezt->vec[1][1];
correct_bezpart(v1, v2, v3, v4);
- forward_diff_bezier(v1[0], v2[0], v3[0], v4[0], data, resol, sizeof(float)*3);
- forward_diff_bezier(v1[1], v2[1], v3[1], v4[1], data+1, resol, sizeof(float)*3);
+ BKE_curve_forward_diff_bezier(v1[0], v2[0], v3[0], v4[0], data, resol, sizeof(float) * 3);
+ BKE_curve_forward_diff_bezier(v1[1], v2[1], v3[1], v4[1], data + 1, resol, sizeof(float) * 3);
- for (fp= data; resol; resol--, fp+= 3)
+ for (fp = data; resol; resol--, fp += 3)
glVertex2fv(fp);
}
}
/* get next pointers */
- prevbezt= bezt;
+ prevbezt = bezt;
bezt++;
/* last point? */
if (b == 0) {
- v1[0]= prevbezt->vec[1][0];
- v1[1]= prevbezt->vec[1][1];
+ v1[0] = prevbezt->vec[1][0];
+ v1[1] = prevbezt->vec[1][1];
glVertex2fv(v1);
}
}
/* extrapolate to right? (see code for left-extrapolation above too) */
if (prevbezt->vec[1][0] < v2d->cur.xmax) {
- v1[0]= v2d->cur.xmax;
+ v1[0] = v2d->cur.xmax;
/* y-value depends on the interpolation */
- if ((fcu->extend==FCURVE_EXTRAPOLATE_CONSTANT) || (fcu->flag & FCURVE_INT_VALUES) || (prevbezt->ipo==BEZT_IPO_CONST) || (fcu->totvert==1)) {
+ if ((fcu->extend == FCURVE_EXTRAPOLATE_CONSTANT) || (fcu->flag & FCURVE_INT_VALUES) || (prevbezt->ipo == BEZT_IPO_CONST) || (fcu->totvert == 1)) {
/* based on last keyframe's value */
- v1[1]= prevbezt->vec[1][1];
+ v1[1] = prevbezt->vec[1][1];
}
- else if (prevbezt->ipo==BEZT_IPO_LIN) {
+ else if (prevbezt->ipo == BEZT_IPO_LIN) {
/* extrapolate linear dosnt use the handle, use the previous points center instead */
- bezt = prevbezt-1;
- fac= (prevbezt->vec[1][0]-bezt->vec[1][0])/(prevbezt->vec[1][0]-v1[0]);
- if (fac) fac= 1.0f/fac;
- v1[1]= prevbezt->vec[1][1]-fac*(prevbezt->vec[1][1]-bezt->vec[1][1]);
+ bezt = prevbezt - 1;
+ fac = (prevbezt->vec[1][0] - bezt->vec[1][0]) / (prevbezt->vec[1][0] - v1[0]);
+ if (fac) fac = 1.0f / fac;
+ v1[1] = prevbezt->vec[1][1] - fac * (prevbezt->vec[1][1] - bezt->vec[1][1]);
}
else {
/* based on angle of handle 1 (relative to keyframe) */
- fac= (prevbezt->vec[2][0]-prevbezt->vec[1][0])/(prevbezt->vec[1][0]-v1[0]);
- if (fac) fac= 1.0f/fac;
- v1[1]= prevbezt->vec[1][1]-fac*(prevbezt->vec[2][1]-prevbezt->vec[1][1]);
+ fac = (prevbezt->vec[2][0] - prevbezt->vec[1][0]) / (prevbezt->vec[1][0] - v1[0]);
+ if (fac) fac = 1.0f / fac;
+ v1[1] = prevbezt->vec[1][1] - fac * (prevbezt->vec[2][1] - prevbezt->vec[1][1]);
}
glVertex2fv(v1);
@@ -777,7 +777,7 @@ static void draw_fcurve_curve_bezts (bAnimContext *ac, ID *id, FCurve *fcu, View
/* Draw the 'ghost' F-Curves (i.e. snapshots of the curve)
* NOTE: unit mapping has already been applied to the values, so do not try and apply again
*/
-void graph_draw_ghost_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar)
+void graph_draw_ghost_curves(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar)
{
FCurve *fcu;
@@ -786,13 +786,13 @@ void graph_draw_ghost_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar)
glLineWidth(3.0f);
/* anti-aliased lines for less jagged appearance */
- if ((sipo->flag & SIPO_BEAUTYDRAW_OFF)==0) glEnable(GL_LINE_SMOOTH);
+ if ((sipo->flag & SIPO_BEAUTYDRAW_OFF) == 0) glEnable(GL_LINE_SMOOTH);
glEnable(GL_BLEND);
/* the ghost curves are simply sampled F-Curves stored in sipo->ghostCurves */
- for (fcu= sipo->ghostCurves.first; fcu; fcu= fcu->next) {
+ for (fcu = sipo->ghostCurves.first; fcu; fcu = fcu->next) {
/* set whatever color the curve has set
- * - this is set by the function which creates these
+ * - this is set by the function which creates these
* - draw with a fixed opacity of 2
*/
glColor4f(fcu->color[0], fcu->color[1], fcu->color[2], 0.5f);
@@ -805,32 +805,32 @@ void graph_draw_ghost_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar)
setlinestyle(0);
glLineWidth(1.0f);
- if ((sipo->flag & SIPO_BEAUTYDRAW_OFF)==0) glDisable(GL_LINE_SMOOTH);
+ if ((sipo->flag & SIPO_BEAUTYDRAW_OFF) == 0) glDisable(GL_LINE_SMOOTH);
glDisable(GL_BLEND);
}
/* This is called twice from space_graph.c -> graph_main_area_draw()
* Unselected then selected F-Curves are drawn so that they do not occlude each other.
*/
-void graph_draw_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGrid *grid, short sel)
+void graph_draw_curves(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGrid *grid, short sel)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
/* build list of curves to draw */
- filter= (ANIMFILTER_DATA_VISIBLE|ANIMFILTER_CURVE_VISIBLE);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE);
filter |= ((sel) ? (ANIMFILTER_SEL) : (ANIMFILTER_UNSEL));
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* for each curve:
* draw curve, then handle-lines, and finally vertices in this order so that
- * the data will be layered correctly
+ * the data will be layered correctly
*/
- for (ale=anim_data.first; ale; ale=ale->next) {
- FCurve *fcu= (FCurve *)ale->key_data;
- FModifier *fcm= find_active_fmodifier(&fcu->modifiers);
- AnimData *adt= ANIM_nla_mapping_get(ac, ale);
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ FCurve *fcu = (FCurve *)ale->key_data;
+ FModifier *fcm = find_active_fmodifier(&fcu->modifiers);
+ AnimData *adt = ANIM_nla_mapping_get(ac, ale);
/* map keyframes for drawing if scaled F-Curve */
if (adt)
@@ -868,7 +868,7 @@ void graph_draw_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGri
}
/* anti-aliased lines for less jagged appearance */
- if ((sipo->flag & SIPO_BEAUTYDRAW_OFF)==0) glEnable(GL_LINE_SMOOTH);
+ if ((sipo->flag & SIPO_BEAUTYDRAW_OFF) == 0) glEnable(GL_LINE_SMOOTH);
glEnable(GL_BLEND);
/* draw F-Curve */
@@ -890,7 +890,7 @@ void graph_draw_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGri
setlinestyle(0);
glLineWidth(1.0);
- if ((sipo->flag & SIPO_BEAUTYDRAW_OFF)==0) glDisable(GL_LINE_SMOOTH);
+ if ((sipo->flag & SIPO_BEAUTYDRAW_OFF) == 0) glDisable(GL_LINE_SMOOTH);
glDisable(GL_BLEND);
}
@@ -953,35 +953,35 @@ void graph_draw_channel_names(bContext *C, bAnimContext *ac, ARegion *ar)
bAnimListElem *ale;
int filter;
- View2D *v2d= &ar->v2d;
- float y= 0.0f, height;
+ View2D *v2d = &ar->v2d;
+ float y = 0.0f, height;
size_t items;
- int i=0;
+ int i = 0;
/* build list of channels to draw */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS);
- items= ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS);
+ items = ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* Update max-extent of channels here (taking into account scrollers):
- * - this is done to allow the channel list to be scrollable, but must be done here
- * to avoid regenerating the list again and/or also because channels list is drawn first
+ * - this is done to allow the channel list to be scrollable, but must be done here
+ * to avoid regenerating the list again and/or also because channels list is drawn first
* - offset of ACHANNEL_HEIGHT*2 is added to the height of the channels, as first is for
* start of list offset, and the second is as a correction for the scrollers.
*/
- height= (float)((items*ACHANNEL_STEP) + (ACHANNEL_HEIGHT*2));
+ height = (float)((items * ACHANNEL_STEP) + (ACHANNEL_HEIGHT * 2));
UI_view2d_totRect_set(v2d, ar->winx, height);
/* loop through channels, and set up drawing depending on their type */
- { /* first pass: just the standard GL-drawing for backdrop + text */
- y= (float)ACHANNEL_FIRST;
+ { /* first pass: just the standard GL-drawing for backdrop + text */
+ y = (float)ACHANNEL_FIRST;
- for (ale= anim_data.first, i=0; ale; ale= ale->next, i++) {
- const float yminc= (float)(y - ACHANNEL_HEIGHT_HALF);
- const float ymaxc= (float)(y + ACHANNEL_HEIGHT_HALF);
+ for (ale = anim_data.first, i = 0; ale; ale = ale->next, i++) {
+ const float yminc = (float)(y - ACHANNEL_HEIGHT_HALF);
+ const float ymaxc = (float)(y + ACHANNEL_HEIGHT_HALF);
/* check if visible */
- if ( IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
- IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax) )
+ if (IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
+ IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax) )
{
/* draw all channels using standard channel-drawing API */
ANIM_channel_draw(ac, ale, yminc, ymaxc);
@@ -991,23 +991,23 @@ void graph_draw_channel_names(bContext *C, bAnimContext *ac, ARegion *ar)
y -= ACHANNEL_STEP;
}
}
- { /* second pass: widgets */
- uiBlock *block= uiBeginBlock(C, ar, __func__, UI_EMBOSS);
+ { /* second pass: widgets */
+ uiBlock *block = uiBeginBlock(C, ar, __func__, UI_EMBOSS);
size_t channel_index = 0;
- y= (float)ACHANNEL_FIRST;
+ y = (float)ACHANNEL_FIRST;
/* set blending again, as may not be set in previous step */
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
- for (ale= anim_data.first, i=0; ale; ale= ale->next, i++) {
- const float yminc= (float)(y - ACHANNEL_HEIGHT_HALF);
- const float ymaxc= (float)(y + ACHANNEL_HEIGHT_HALF);
+ for (ale = anim_data.first, i = 0; ale; ale = ale->next, i++) {
+ const float yminc = (float)(y - ACHANNEL_HEIGHT_HALF);
+ const float ymaxc = (float)(y + ACHANNEL_HEIGHT_HALF);
/* check if visible */
- if ( IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
- IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax) )
+ if (IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
+ IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax) )
{
/* draw all channels using standard channel-drawing API */
ANIM_channel_draw_widgets(C, ac, ale, block, yminc, ymaxc, channel_index);
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index 76a2c926522..7371202b4fb 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -83,28 +83,28 @@
/* Get the min/max keyframes*/
/* note: it should return total boundbox, filter for selection only can be argument... */
-void get_graph_keyframe_extents (bAnimContext *ac, float *xmin, float *xmax, float *ymin, float *ymax, const short selOnly)
+void get_graph_keyframe_extents(bAnimContext *ac, float *xmin, float *xmax, float *ymin, float *ymax, const short selOnly)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
/* get data to filter, from Dopesheet */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* set large values to try to override */
- if (xmin) *xmin= 999999999.0f;
- if (xmax) *xmax= -999999999.0f;
- if (ymin) *ymin= 999999999.0f;
- if (ymax) *ymax= -999999999.0f;
+ if (xmin) *xmin = 999999999.0f;
+ if (xmax) *xmax = -999999999.0f;
+ if (ymin) *ymin = 999999999.0f;
+ if (ymax) *ymax = -999999999.0f;
/* check if any channels to set range with */
if (anim_data.first) {
/* go through channels, finding max extents */
- for (ale= anim_data.first; ale; ale= ale->next) {
- AnimData *adt= ANIM_nla_mapping_get(ac, ale);
- FCurve *fcu= (FCurve *)ale->key_data;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ AnimData *adt = ANIM_nla_mapping_get(ac, ale);
+ FCurve *fcu = (FCurve *)ale->key_data;
float txmin, txmax, tymin, tymax;
float unitFac;
@@ -113,20 +113,20 @@ void get_graph_keyframe_extents (bAnimContext *ac, float *xmin, float *xmax, flo
/* apply NLA scaling */
if (adt) {
- txmin= BKE_nla_tweakedit_remap(adt, txmin, NLATIME_CONVERT_MAP);
- txmax= BKE_nla_tweakedit_remap(adt, txmax, NLATIME_CONVERT_MAP);
+ txmin = BKE_nla_tweakedit_remap(adt, txmin, NLATIME_CONVERT_MAP);
+ txmax = BKE_nla_tweakedit_remap(adt, txmax, NLATIME_CONVERT_MAP);
}
/* apply unit corrections */
- unitFac= ANIM_unit_mapping_get_factor(ac->scene, ale->id, fcu, 0);
+ unitFac = ANIM_unit_mapping_get_factor(ac->scene, ale->id, fcu, 0);
tymin *= unitFac;
tymax *= unitFac;
/* try to set cur using these values, if they're more extreme than previously set values */
- if ((xmin) && (txmin < *xmin)) *xmin= txmin;
- if ((xmax) && (txmax > *xmax)) *xmax= txmax;
- if ((ymin) && (tymin < *ymin)) *ymin= tymin;
- if ((ymax) && (tymax > *ymax)) *ymax= tymax;
+ if ((xmin) && (txmin < *xmin)) *xmin = txmin;
+ if ((xmax) && (txmax > *xmax)) *xmax = txmax;
+ if ((ymin) && (tymin < *ymin)) *ymin = tymin;
+ if ((ymax) && (tymax > *ymax)) *ymax = tymax;
}
/* ensure that the extents are not too extreme that view implodes...*/
@@ -139,16 +139,16 @@ void get_graph_keyframe_extents (bAnimContext *ac, float *xmin, float *xmax, flo
else {
/* set default range */
if (ac->scene) {
- if (xmin) *xmin= (float)ac->scene->r.sfra;
- if (xmax) *xmax= (float)ac->scene->r.efra;
+ if (xmin) *xmin = (float)ac->scene->r.sfra;
+ if (xmax) *xmax = (float)ac->scene->r.efra;
}
else {
- if (xmin) *xmin= -5;
- if (xmax) *xmax= 100;
+ if (xmin) *xmin = -5;
+ if (xmax) *xmax = 100;
}
- if (ymin) *ymin= -5;
- if (ymax) *ymax= 5;
+ if (ymin) *ymin = -5;
+ if (ymax) *ymax = 5;
}
}
@@ -166,22 +166,22 @@ static int graphkeys_previewrange_exec(bContext *C, wmOperator *UNUSED(op))
if (ac.scene == NULL)
return OPERATOR_CANCELLED;
else
- scene= ac.scene;
+ scene = ac.scene;
/* set the range directly */
get_graph_keyframe_extents(&ac, &min, &max, NULL, NULL, FALSE);
scene->r.flag |= SCER_PRV_RANGE;
- scene->r.psfra= (int)floor(min + 0.5f);
- scene->r.pefra= (int)floor(max + 0.5f);
+ scene->r.psfra = (int)floor(min + 0.5f);
+ scene->r.pefra = (int)floor(max + 0.5f);
/* set notifier that things have changed */
// 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);
+ WM_event_add_notifier(C, NC_SCENE | ND_FRAME, ac.scene);
return OPERATOR_FINISHED;
}
-void GRAPH_OT_previewrange_set (wmOperatorType *ot)
+void GRAPH_OT_previewrange_set(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Auto-Set Preview Range";
@@ -193,7 +193,7 @@ void GRAPH_OT_previewrange_set (wmOperatorType *ot)
ot->poll = ED_operator_graphedit_active; // XXX: unchecked poll to get fsamples working too, but makes modifier damage trickier...
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ****************** View-All Operator ****************** */
@@ -207,16 +207,16 @@ static int graphkeys_viewall(bContext *C, const short selOnly)
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
return OPERATOR_CANCELLED;
- v2d= &ac.ar->v2d;
+ v2d = &ac.ar->v2d;
/* set the horizontal range, with an extra offset so that the extreme keys will be in view */
get_graph_keyframe_extents(&ac, &v2d->cur.xmin, &v2d->cur.xmax, &v2d->cur.ymin, &v2d->cur.ymax, selOnly);
- extra= 0.1f * (v2d->cur.xmax - v2d->cur.xmin);
+ extra = 0.1f * (v2d->cur.xmax - v2d->cur.xmin);
v2d->cur.xmin -= extra;
v2d->cur.xmax += extra;
- extra= 0.1f * (v2d->cur.ymax - v2d->cur.ymin);
+ extra = 0.1f * (v2d->cur.ymax - v2d->cur.ymin);
v2d->cur.ymin -= extra;
v2d->cur.ymax += extra;
@@ -243,7 +243,7 @@ static int graphkeys_view_selected_exec(bContext *C, wmOperator *UNUSED(op))
return graphkeys_viewall(C, TRUE);
}
-void GRAPH_OT_view_all (wmOperatorType *ot)
+void GRAPH_OT_view_all(wmOperatorType *ot)
{
/* identifiers */
ot->name = "View All";
@@ -255,10 +255,10 @@ void GRAPH_OT_view_all (wmOperatorType *ot)
ot->poll = ED_operator_graphedit_active; // XXX: unchecked poll to get fsamples working too, but makes modifier damage trickier...
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
-void GRAPH_OT_view_selected (wmOperatorType *ot)
+void GRAPH_OT_view_selected(wmOperatorType *ot)
{
/* identifiers */
ot->name = "View Selected";
@@ -270,7 +270,7 @@ void GRAPH_OT_view_selected (wmOperatorType *ot)
ot->poll = ED_operator_graphedit_active; // XXX: unchecked poll to get fsamples working too, but makes modifier damage trickier...
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ******************** Create Ghost-Curves Operator *********************** */
@@ -279,9 +279,9 @@ void GRAPH_OT_view_selected (wmOperatorType *ot)
*/
/* Bake each F-Curve into a set of samples, and store as a ghost curve */
-static void create_ghost_curves (bAnimContext *ac, int start, int end)
+static void create_ghost_curves(bAnimContext *ac, int start, int end)
{
- SpaceIpo *sipo= (SpaceIpo *)ac->sl;
+ SpaceIpo *sipo = (SpaceIpo *)ac->sl;
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
@@ -296,51 +296,51 @@ static void create_ghost_curves (bAnimContext *ac, int start, int end)
}
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through filtered data and add keys between selected keyframes on every frame */
- for (ale= anim_data.first; ale; ale= ale->next) {
- FCurve *fcu= (FCurve *)ale->key_data;
- FCurve *gcu= MEM_callocN(sizeof(FCurve), "Ghost FCurve");
- AnimData *adt= ANIM_nla_mapping_get(ac, ale);
- ChannelDriver *driver= fcu->driver;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ FCurve *fcu = (FCurve *)ale->key_data;
+ FCurve *gcu = MEM_callocN(sizeof(FCurve), "Ghost FCurve");
+ AnimData *adt = ANIM_nla_mapping_get(ac, ale);
+ ChannelDriver *driver = fcu->driver;
FPoint *fpt;
float unitFac;
int cfra;
/* disable driver so that it don't muck up the sampling process */
- fcu->driver= NULL;
+ fcu->driver = NULL;
/* calculate unit-mapping factor */
- unitFac= ANIM_unit_mapping_get_factor(ac->scene, ale->id, fcu, 0);
+ unitFac = ANIM_unit_mapping_get_factor(ac->scene, ale->id, fcu, 0);
/* create samples, but store them in a new curve
* - we cannot use fcurve_store_samples() as that will only overwrite the original curve
*/
- gcu->fpt= fpt= MEM_callocN(sizeof(FPoint)*(end-start+1), "Ghost FPoint Samples");
- gcu->totvert= end - start + 1;
+ gcu->fpt = fpt = MEM_callocN(sizeof(FPoint) * (end - start + 1), "Ghost FPoint Samples");
+ gcu->totvert = end - start + 1;
/* use the sampling callback at 1-frame intervals from start to end frames */
- for (cfra= start; cfra <= end; cfra++, fpt++) {
- float cfrae= BKE_nla_tweakedit_remap(adt, cfra, NLATIME_CONVERT_UNMAP);
+ for (cfra = start; cfra <= end; cfra++, fpt++) {
+ float cfrae = BKE_nla_tweakedit_remap(adt, cfra, NLATIME_CONVERT_UNMAP);
- fpt->vec[0]= cfrae;
- fpt->vec[1]= fcurve_samplingcb_evalcurve(fcu, NULL, cfrae) * unitFac;
+ fpt->vec[0] = cfrae;
+ fpt->vec[1] = fcurve_samplingcb_evalcurve(fcu, NULL, cfrae) * unitFac;
}
/* set color of ghost curve
* - make the color slightly darker
*/
- gcu->color[0]= fcu->color[0] - 0.07f;
- gcu->color[1]= fcu->color[1] - 0.07f;
- gcu->color[2]= fcu->color[2] - 0.07f;
+ gcu->color[0] = fcu->color[0] - 0.07f;
+ gcu->color[1] = fcu->color[1] - 0.07f;
+ gcu->color[2] = fcu->color[2] - 0.07f;
/* store new ghost curve */
BLI_addtail(&sipo->ghostCurves, gcu);
/* restore driver */
- fcu->driver= driver;
+ fcu->driver = driver;
}
/* admin and redraws */
@@ -360,9 +360,9 @@ static int graphkeys_create_ghostcurves_exec(bContext *C, wmOperator *UNUSED(op)
return OPERATOR_CANCELLED;
/* ghost curves are snapshots of the visible portions of the curves, so set range to be the visible range */
- v2d= &ac.ar->v2d;
- start= (int)v2d->cur.xmin;
- end= (int)v2d->cur.xmax;
+ v2d = &ac.ar->v2d;
+ start = (int)v2d->cur.xmin;
+ end = (int)v2d->cur.xmax;
/* bake selected curves into a ghost curve */
create_ghost_curves(&ac, start, end);
@@ -373,7 +373,7 @@ static int graphkeys_create_ghostcurves_exec(bContext *C, wmOperator *UNUSED(op)
return OPERATOR_FINISHED;
}
-void GRAPH_OT_ghost_curves_create (wmOperatorType *ot)
+void GRAPH_OT_ghost_curves_create(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Create Ghost Curves";
@@ -385,7 +385,7 @@ void GRAPH_OT_ghost_curves_create (wmOperatorType *ot)
ot->poll = graphop_visible_keyframes_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
// todo: add props for start/end frames
}
@@ -401,7 +401,7 @@ static int graphkeys_clear_ghostcurves_exec(bContext *C, wmOperator *UNUSED(op))
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
return OPERATOR_CANCELLED;
- sipo= (SpaceIpo *)ac.sl;
+ sipo = (SpaceIpo *)ac.sl;
/* if no ghost curves, don't do anything */
if (sipo->ghostCurves.first == NULL)
@@ -416,7 +416,7 @@ static int graphkeys_clear_ghostcurves_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_FINISHED;
}
-void GRAPH_OT_ghost_curves_clear (wmOperatorType *ot)
+void GRAPH_OT_ghost_curves_clear(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Clear Ghost Curves";
@@ -428,7 +428,7 @@ void GRAPH_OT_ghost_curves_clear (wmOperatorType *ot)
ot->poll = ED_operator_graphedit_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ************************************************************************** */
@@ -451,11 +451,11 @@ static void insert_graph_keys(bAnimContext *ac, short mode)
int filter;
ReportList *reports = ac->reports;
- Scene *scene= ac->scene;
+ Scene *scene = ac->scene;
short flag = 0;
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
if (mode == 2) filter |= ANIMFILTER_SEL;
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
@@ -464,20 +464,20 @@ static void insert_graph_keys(bAnimContext *ac, short mode)
flag = ANIM_get_keyframing_flags(scene, 1);
/* insert keyframes */
- for (ale= anim_data.first; ale; ale= ale->next) {
- AnimData *adt= ANIM_nla_mapping_get(ac, ale);
- FCurve *fcu= (FCurve *)ale->key_data;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ AnimData *adt = ANIM_nla_mapping_get(ac, ale);
+ FCurve *fcu = (FCurve *)ale->key_data;
float cfra;
/* adjust current frame for NLA-mapping */
if (adt)
- cfra= BKE_nla_tweakedit_remap(adt, (float)CFRA, NLATIME_CONVERT_UNMAP);
+ cfra = BKE_nla_tweakedit_remap(adt, (float)CFRA, NLATIME_CONVERT_UNMAP);
else
- cfra= (float)CFRA;
+ cfra = (float)CFRA;
/* if there's an id */
if (ale->id)
- insert_keyframe(reports, ale->id, NULL, ((fcu->grp)?(fcu->grp->name):(NULL)), fcu->rna_path, fcu->array_index, cfra, flag);
+ insert_keyframe(reports, ale->id, NULL, ((fcu->grp) ? (fcu->grp->name) : (NULL)), fcu->rna_path, fcu->array_index, cfra, flag);
else
insert_vert_fcurve(fcu, cfra, fcu->curval, 0);
}
@@ -497,7 +497,7 @@ static int graphkeys_insertkey_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* which channels to affect? */
- mode= RNA_enum_get(op->ptr, "type");
+ mode = RNA_enum_get(op->ptr, "type");
/* insert keyframes */
insert_graph_keys(&ac, mode);
@@ -506,12 +506,12 @@ static int graphkeys_insertkey_exec(bContext *C, wmOperator *op)
ANIM_editkeyframes_refresh(&ac);
/* set notifier that keyframes have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
-void GRAPH_OT_keyframe_insert (wmOperatorType *ot)
+void GRAPH_OT_keyframe_insert(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Insert Keyframes";
@@ -524,7 +524,7 @@ void GRAPH_OT_keyframe_insert (wmOperatorType *ot)
ot->poll = graphop_editable_keyframes_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* id-props */
ot->prop = RNA_def_enum(ot->srna, "type", prop_graphkeys_insertkey_types, 0, "Type", "");
@@ -532,7 +532,7 @@ void GRAPH_OT_keyframe_insert (wmOperatorType *ot)
/* ******************** Click-Insert Keyframes Operator ************************* */
-static int graphkeys_click_insert_exec (bContext *C, wmOperator *op)
+static int graphkeys_click_insert_exec(bContext *C, wmOperator *op)
{
bAnimContext ac;
bAnimListElem *ale;
@@ -545,7 +545,7 @@ static int graphkeys_click_insert_exec (bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* get active F-Curve 'anim-list-element' */
- ale= get_active_fcurve_channel(&ac);
+ ale = get_active_fcurve_channel(&ac);
if (ELEM(NULL, ale, ale->data)) {
if (ale) MEM_freeN(ale);
return OPERATOR_CANCELLED;
@@ -557,12 +557,12 @@ static int graphkeys_click_insert_exec (bContext *C, wmOperator *op)
*/
if (fcurve_is_keyframable(fcu)) {
/* get frame and value from props */
- frame= RNA_float_get(op->ptr, "frame");
- val= RNA_float_get(op->ptr, "value");
+ frame = RNA_float_get(op->ptr, "frame");
+ val = RNA_float_get(op->ptr, "value");
/* apply inverse NLA-mapping to frame to get correct time in un-scaled action */
- adt= ANIM_nla_mapping_get(&ac, ale);
- frame= BKE_nla_tweakedit_remap(adt, frame, NLATIME_CONVERT_UNMAP);
+ adt = ANIM_nla_mapping_get(&ac, ale);
+ frame = BKE_nla_tweakedit_remap(adt, frame, NLATIME_CONVERT_UNMAP);
/* apply inverse unit-mapping to value to get correct value for F-Curves */
val *= ANIM_unit_mapping_get_factor(ac.scene, ale->id, fcu, 1);
@@ -584,13 +584,13 @@ static int graphkeys_click_insert_exec (bContext *C, wmOperator *op)
MEM_freeN(ale);
/* set notifier that keyframes have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
/* done */
return OPERATOR_FINISHED;
}
-static int graphkeys_click_insert_invoke (bContext *C, wmOperator *op, wmEvent *evt)
+static int graphkeys_click_insert_invoke(bContext *C, wmOperator *op, wmEvent *evt)
{
bAnimContext ac;
ARegion *ar;
@@ -603,11 +603,11 @@ static int graphkeys_click_insert_invoke (bContext *C, wmOperator *op, wmEvent *
return OPERATOR_CANCELLED;
/* store mouse coordinates in View2D space, into the operator's properties */
- ar= ac.ar;
- v2d= &ar->v2d;
+ ar = ac.ar;
+ v2d = &ar->v2d;
- mval[0]= (evt->x - ar->winrct.xmin);
- mval[1]= (evt->y - ar->winrct.ymin);
+ mval[0] = (evt->x - ar->winrct.xmin);
+ mval[1] = (evt->y - ar->winrct.ymin);
UI_view2d_region_to_view(v2d, mval[0], mval[1], &x, &y);
@@ -618,7 +618,7 @@ static int graphkeys_click_insert_invoke (bContext *C, wmOperator *op, wmEvent *
return graphkeys_click_insert_exec(C, op);
}
-void GRAPH_OT_click_insert (wmOperatorType *ot)
+void GRAPH_OT_click_insert(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Click-Insert Keyframes";
@@ -631,7 +631,7 @@ void GRAPH_OT_click_insert (wmOperatorType *ot)
ot->poll = graphop_active_fcurve_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_float(ot->srna, "frame", 1.0f, -FLT_MAX, FLT_MAX, "Frame Number", "Frame to insert keyframe on", 0, 100);
@@ -641,20 +641,20 @@ void GRAPH_OT_click_insert (wmOperatorType *ot)
/* ******************** Copy/Paste Keyframes Operator ************************* */
/* NOTE: the backend code for this is shared with the dopesheet editor */
-static short copy_graph_keys (bAnimContext *ac)
+static short copy_graph_keys(bAnimContext *ac)
{
ListBase anim_data = {NULL, NULL};
- int filter, ok=0;
+ int filter, ok = 0;
/* clear buffer first */
free_anim_copybuf();
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* copy keyframes */
- ok= copy_animedit_keys(ac, &anim_data);
+ ok = copy_animedit_keys(ac, &anim_data);
/* clean up */
BLI_freelistN(&anim_data);
@@ -662,18 +662,18 @@ static short copy_graph_keys (bAnimContext *ac)
return ok;
}
-static short paste_graph_keys (bAnimContext *ac,
- const eKeyPasteOffset offset_mode, const eKeyMergeMode merge_mode)
+static short paste_graph_keys(bAnimContext *ac,
+ const eKeyPasteOffset offset_mode, const eKeyMergeMode merge_mode)
{
ListBase anim_data = {NULL, NULL};
- int filter, ok=0;
+ int filter, ok = 0;
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* paste keyframes */
- ok= paste_animedit_keys(ac, &anim_data, offset_mode, merge_mode);
+ ok = paste_animedit_keys(ac, &anim_data, offset_mode, merge_mode);
/* clean up */
BLI_freelistN(&anim_data);
@@ -701,7 +701,7 @@ static int graphkeys_copy_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void GRAPH_OT_copy (wmOperatorType *ot)
+void GRAPH_OT_copy(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Copy Keyframes";
@@ -713,7 +713,7 @@ void GRAPH_OT_copy (wmOperatorType *ot)
ot->poll = graphop_editable_keyframes_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
@@ -722,15 +722,15 @@ static int graphkeys_paste_exec(bContext *C, wmOperator *op)
{
bAnimContext ac;
- const eKeyPasteOffset offset_mode= RNA_enum_get(op->ptr, "offset");
- const eKeyMergeMode merge_mode= RNA_enum_get(op->ptr, "merge");
+ const eKeyPasteOffset offset_mode = RNA_enum_get(op->ptr, "offset");
+ const eKeyMergeMode merge_mode = RNA_enum_get(op->ptr, "merge");
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
return OPERATOR_CANCELLED;
/* ac.reports by default will be the global reports list, which won't show warnings */
- ac.reports= op->reports;
+ ac.reports = op->reports;
/* paste keyframes - non-zero return means an error occurred while trying to paste */
if (paste_graph_keys(&ac, offset_mode, merge_mode)) {
@@ -741,12 +741,12 @@ static int graphkeys_paste_exec(bContext *C, wmOperator *op)
ANIM_editkeyframes_refresh(&ac);
/* set notifier that keyframes have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
-void GRAPH_OT_paste (wmOperatorType *ot)
+void GRAPH_OT_paste(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Paste Keyframes";
@@ -759,7 +759,7 @@ void GRAPH_OT_paste (wmOperatorType *ot)
ot->poll = graphop_editable_keyframes_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_enum(ot->srna, "offset", keyframe_paste_offset_items, KEYFRAME_PASTE_OFFSET_CFRA_START, "Offset", "Paste time offset of keys");
RNA_def_enum(ot->srna, "merge", keyframe_paste_merge_items, KEYFRAME_PASTE_MERGE_MIX, "Type", "Method of merging pasted keys and existing");
@@ -767,18 +767,18 @@ void GRAPH_OT_paste (wmOperatorType *ot)
/* ******************** Duplicate Keyframes Operator ************************* */
-static void duplicate_graph_keys (bAnimContext *ac)
+static void duplicate_graph_keys(bAnimContext *ac)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through filtered data and delete selected keys */
- for (ale= anim_data.first; ale; ale= ale->next) {
+ for (ale = anim_data.first; ale; ale = ale->next) {
duplicate_fcurve_keys((FCurve *)ale->key_data);
}
@@ -803,7 +803,7 @@ static int graphkeys_duplicate_exec(bContext *C, wmOperator *UNUSED(op))
ANIM_editkeyframes_refresh(&ac);
/* set notifier that keyframes have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
@@ -815,7 +815,7 @@ static int graphkeys_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *UNUS
return OPERATOR_FINISHED;
}
-void GRAPH_OT_duplicate (wmOperatorType *ot)
+void GRAPH_OT_duplicate(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Duplicate Keyframes";
@@ -828,7 +828,7 @@ void GRAPH_OT_duplicate (wmOperatorType *ot)
ot->poll = graphop_editable_keyframes_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* to give to transform */
RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, "Mode", "");
@@ -836,20 +836,20 @@ void GRAPH_OT_duplicate (wmOperatorType *ot)
/* ******************** Delete Keyframes Operator ************************* */
-static void delete_graph_keys (bAnimContext *ac)
+static void delete_graph_keys(bAnimContext *ac)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through filtered data and delete selected keys */
- for (ale= anim_data.first; ale; ale= ale->next) {
- FCurve *fcu= (FCurve *)ale->key_data;
- AnimData *adt= ale->adt;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ FCurve *fcu = (FCurve *)ale->key_data;
+ AnimData *adt = ale->adt;
/* delete selected keyframes only */
delete_fcurve_keys(fcu);
@@ -880,12 +880,12 @@ static int graphkeys_delete_exec(bContext *C, wmOperator *UNUSED(op))
ANIM_editkeyframes_refresh(&ac);
/* set notifier that keyframes have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
-void GRAPH_OT_delete (wmOperatorType *ot)
+void GRAPH_OT_delete(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Delete Keyframes";
@@ -898,23 +898,23 @@ void GRAPH_OT_delete (wmOperatorType *ot)
ot->poll = graphop_editable_keyframes_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ******************** Clean Keyframes Operator ************************* */
-static void clean_graph_keys (bAnimContext *ac, float thresh)
+static void clean_graph_keys(bAnimContext *ac, float thresh)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_SEL | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_SEL | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through filtered data and clean curves */
- for (ale= anim_data.first; ale; ale= ale->next)
+ for (ale = anim_data.first; ale; ale = ale->next)
clean_fcurve((FCurve *)ale->key_data, thresh);
/* free temp data */
@@ -933,7 +933,7 @@ static int graphkeys_clean_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* get cleaning threshold */
- thresh= RNA_float_get(op->ptr, "threshold");
+ thresh = RNA_float_get(op->ptr, "threshold");
/* clean keyframes */
clean_graph_keys(&ac, thresh);
@@ -942,12 +942,12 @@ static int graphkeys_clean_exec(bContext *C, wmOperator *op)
ANIM_editkeyframes_refresh(&ac);
/* set notifier that keyframes have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
-void GRAPH_OT_clean (wmOperatorType *ot)
+void GRAPH_OT_clean(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Clean Keyframes";
@@ -960,7 +960,7 @@ void GRAPH_OT_clean (wmOperatorType *ot)
ot->poll = graphop_editable_keyframes_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
ot->prop = RNA_def_float(ot->srna, "threshold", 0.001f, 0.0f, FLT_MAX, "Threshold", "", 0.0f, 1000.0f);
@@ -970,29 +970,29 @@ void GRAPH_OT_clean (wmOperatorType *ot)
/* This operator bakes the data of the selected F-Curves to F-Points */
/* Bake each F-Curve into a set of samples */
-static void bake_graph_curves (bAnimContext *ac, int start, int end)
+static void bake_graph_curves(bAnimContext *ac, int start, int end)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through filtered data and add keys between selected keyframes on every frame */
- for (ale= anim_data.first; ale; ale= ale->next) {
- FCurve *fcu= (FCurve *)ale->key_data;
- ChannelDriver *driver= fcu->driver;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ FCurve *fcu = (FCurve *)ale->key_data;
+ ChannelDriver *driver = fcu->driver;
/* disable driver so that it don't muck up the sampling process */
- fcu->driver= NULL;
+ fcu->driver = NULL;
/* create samples */
fcurve_store_samples(fcu, NULL, start, end, fcurve_samplingcb_evalcurve);
/* restore driver */
- fcu->driver= driver;
+ fcu->driver = driver;
}
/* admin and redraws */
@@ -1004,7 +1004,7 @@ static void bake_graph_curves (bAnimContext *ac, int start, int end)
static int graphkeys_bake_exec(bContext *C, wmOperator *UNUSED(op))
{
bAnimContext ac;
- Scene *scene= NULL;
+ Scene *scene = NULL;
int start, end;
/* get editor data */
@@ -1013,9 +1013,9 @@ static int graphkeys_bake_exec(bContext *C, wmOperator *UNUSED(op))
/* for now, init start/end from preview-range extents */
// TODO: add properties for this
- scene= ac.scene;
- start= PSFRA;
- end= PEFRA;
+ scene = ac.scene;
+ start = PSFRA;
+ end = PEFRA;
/* bake keyframes */
bake_graph_curves(&ac, start, end);
@@ -1025,12 +1025,12 @@ static int graphkeys_bake_exec(bContext *C, wmOperator *UNUSED(op))
/* set notifier that keyframes have changed */
// 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);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
-void GRAPH_OT_bake (wmOperatorType *ot)
+void GRAPH_OT_bake(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Bake Curve";
@@ -1043,7 +1043,7 @@ void GRAPH_OT_bake (wmOperatorType *ot)
ot->poll = graphop_selected_fcurve_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
// todo: add props for start/end frames
}
@@ -1069,9 +1069,9 @@ typedef struct tSoundBakeInfo {
/* Sampling callback used to determine the value from the sound to
* save in the F-Curve at the specified frame
*/
-static float fcurve_samplingcb_sound (FCurve *UNUSED(fcu), void *data, float evaltime)
+static float fcurve_samplingcb_sound(FCurve *UNUSED(fcu), void *data, float evaltime)
{
- tSoundBakeInfo *sbi= (tSoundBakeInfo *)data;
+ tSoundBakeInfo *sbi = (tSoundBakeInfo *)data;
int position = evaltime - sbi->cfra;
if ((position < 0) || (position >= sbi->length))
@@ -1090,7 +1090,7 @@ static int graphkeys_sound_bake_exec(bContext *C, wmOperator *op)
int filter;
tSoundBakeInfo sbi;
- Scene *scene= NULL;
+ Scene *scene = NULL;
int start, end;
char path[FILE_MAX];
@@ -1101,20 +1101,20 @@ static int graphkeys_sound_bake_exec(bContext *C, wmOperator *op)
RNA_string_get(op->ptr, "filepath", path);
- scene= ac.scene; /* current scene */
+ scene = ac.scene; /* current scene */
/* store necessary data for the baking steps */
sbi.samples = AUD_readSoundBuffer(path,
- RNA_float_get(op->ptr, "low"),
- RNA_float_get(op->ptr, "high"),
- RNA_float_get(op->ptr, "attack"),
- RNA_float_get(op->ptr, "release"),
- RNA_float_get(op->ptr, "threshold"),
- RNA_boolean_get(op->ptr, "accumulate"),
- RNA_boolean_get(op->ptr, "use_additive"),
- RNA_boolean_get(op->ptr, "square"),
- RNA_float_get(op->ptr, "sthreshold"),
- FPS, &sbi.length);
+ RNA_float_get(op->ptr, "low"),
+ RNA_float_get(op->ptr, "high"),
+ RNA_float_get(op->ptr, "attack"),
+ RNA_float_get(op->ptr, "release"),
+ RNA_float_get(op->ptr, "threshold"),
+ RNA_boolean_get(op->ptr, "accumulate"),
+ RNA_boolean_get(op->ptr, "use_additive"),
+ RNA_boolean_get(op->ptr, "square"),
+ RNA_float_get(op->ptr, "sthreshold"),
+ FPS, &sbi.length);
if (sbi.samples == NULL) {
BKE_report(op->reports, RPT_ERROR, "Unsupported audio format");
@@ -1126,12 +1126,12 @@ static int graphkeys_sound_bake_exec(bContext *C, wmOperator *op)
end = CFRA + sbi.length - 1;
/* filter anim channels */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* loop through all selected F-Curves, replacing its data with the sound samples */
- for (ale= anim_data.first; ale; ale= ale->next) {
- FCurve *fcu= (FCurve *)ale->key_data;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ FCurve *fcu = (FCurve *)ale->key_data;
/* sample the sound */
fcurve_store_samples(fcu, &sbi, start, end, fcurve_samplingcb_sound);
@@ -1147,7 +1147,7 @@ static int graphkeys_sound_bake_exec(bContext *C, wmOperator *op)
ANIM_editkeyframes_refresh(&ac);
/* set notifier that 'keyframes' have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
@@ -1163,7 +1163,7 @@ static int graphkeys_sound_bake_exec(bContext *UNUSED(C), wmOperator *op)
#endif //WITH_AUDASPACE
-static int graphkeys_sound_bake_invoke (bContext *C, wmOperator *op, wmEvent *event)
+static int graphkeys_sound_bake_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
bAnimContext ac;
@@ -1174,7 +1174,7 @@ static int graphkeys_sound_bake_invoke (bContext *C, wmOperator *op, wmEvent *ev
return WM_operator_filesel(C, op, event);
}
-void GRAPH_OT_sound_bake (wmOperatorType *ot)
+void GRAPH_OT_sound_bake(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Bake Sound to F-Curves";
@@ -1187,10 +1187,10 @@ void GRAPH_OT_sound_bake (wmOperatorType *ot)
ot->poll = graphop_selected_fcurve_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
- WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
+ WM_operator_properties_filesel(ot, FOLDERFILE | SOUNDFILE | MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
RNA_def_float(ot->srna, "low", 0.0f, 0.0, 100000.0, "Lowest frequency", "", 0.1, 1000.00);
RNA_def_float(ot->srna, "high", 100000.0, 0.0, 100000.0, "Highest frequency", "", 0.1, 1000.00);
RNA_def_float(ot->srna, "attack", 0.005, 0.0, 2.0, "Attack time", "", 0.01, 0.1);
@@ -1208,18 +1208,18 @@ void GRAPH_OT_sound_bake (wmOperatorType *ot)
*/
/* Evaluates the curves between each selected keyframe on each frame, and keys the value */
-static void sample_graph_keys (bAnimContext *ac)
+static void sample_graph_keys(bAnimContext *ac)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through filtered data and add keys between selected keyframes on every frame */
- for (ale= anim_data.first; ale; ale= ale->next)
+ for (ale = anim_data.first; ale; ale = ale->next)
sample_fcurve((FCurve *)ale->key_data);
/* admin and redraws */
@@ -1243,12 +1243,12 @@ static int graphkeys_sample_exec(bContext *C, wmOperator *UNUSED(op))
ANIM_editkeyframes_refresh(&ac);
/* set notifier that keyframes have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
-void GRAPH_OT_sample (wmOperatorType *ot)
+void GRAPH_OT_sample(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Sample Keyframes";
@@ -1260,7 +1260,7 @@ void GRAPH_OT_sample (wmOperatorType *ot)
ot->poll = graphop_editable_keyframes_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
@@ -1270,8 +1270,8 @@ void GRAPH_OT_sample (wmOperatorType *ot)
/* ******************** Set Extrapolation-Type Operator *********************** */
/* defines for make/clear cyclic extrapolation tools */
-#define MAKE_CYCLIC_EXPO -1
-#define CLEAR_CYCLIC_EXPO -2
+#define MAKE_CYCLIC_EXPO -1
+#define CLEAR_CYCLIC_EXPO -2
/* defines for set extrapolation-type for selected keyframes tool */
static EnumPropertyItem prop_graphkeys_expo_types[] = {
@@ -1291,16 +1291,16 @@ static void setexpo_graph_keys(bAnimContext *ac, short mode)
int filter;
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through setting mode per F-Curve */
- for (ale= anim_data.first; ale; ale= ale->next) {
- FCurve *fcu= (FCurve *)ale->data;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ FCurve *fcu = (FCurve *)ale->data;
if (mode >= 0) {
/* just set mode setting */
- fcu->extend= mode;
+ fcu->extend = mode;
}
else {
/* shortcuts for managing Cycles F-Modifiers to make it easier to toggle cyclic animation
@@ -1315,7 +1315,7 @@ static void setexpo_graph_keys(bAnimContext *ac, short mode)
}
else if (mode == CLEAR_CYCLIC_EXPO) {
/* remove all the modifiers fitting this description */
- FModifier *fcm, *fcn=NULL;
+ FModifier *fcm, *fcn = NULL;
for (fcm = fcu->modifiers.first; fcm; fcm = fcn) {
fcn = fcm->next;
@@ -1343,7 +1343,7 @@ static int graphkeys_expo_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* get handle setting mode */
- mode= RNA_enum_get(op->ptr, "type");
+ mode = RNA_enum_get(op->ptr, "type");
/* set handle type */
setexpo_graph_keys(&ac, mode);
@@ -1352,12 +1352,12 @@ static int graphkeys_expo_exec(bContext *C, wmOperator *op)
ANIM_editkeyframes_refresh(&ac);
/* set notifier that keyframe properties have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME_PROP, NULL);
return OPERATOR_FINISHED;
}
-void GRAPH_OT_extrapolation_type (wmOperatorType *ot)
+void GRAPH_OT_extrapolation_type(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Set Keyframe Extrapolation";
@@ -1370,7 +1370,7 @@ void GRAPH_OT_extrapolation_type (wmOperatorType *ot)
ot->poll = graphop_editable_keyframes_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* id-props */
ot->prop = RNA_def_enum(ot->srna, "type", prop_graphkeys_expo_types, 0, "Type", "");
@@ -1384,16 +1384,16 @@ static void setipo_graph_keys(bAnimContext *ac, short mode)
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
- KeyframeEditFunc set_cb= ANIM_editkeyframes_ipo(mode);
+ KeyframeEditFunc set_cb = ANIM_editkeyframes_ipo(mode);
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through setting BezTriple interpolation
* Note: we do not supply KeyframeEditData to the looper yet. Currently that's not necessary here...
*/
- for (ale= anim_data.first; ale; ale= ale->next)
+ for (ale = anim_data.first; ale; ale = ale->next)
ANIM_fcurve_keyframes_loop(NULL, ale->key_data, NULL, set_cb, calchandles_fcurve);
/* cleanup */
@@ -1412,7 +1412,7 @@ static int graphkeys_ipo_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* get handle setting mode */
- mode= RNA_enum_get(op->ptr, "type");
+ mode = RNA_enum_get(op->ptr, "type");
/* set handle type */
setipo_graph_keys(&ac, mode);
@@ -1421,12 +1421,12 @@ static int graphkeys_ipo_exec(bContext *C, wmOperator *op)
ANIM_editkeyframes_refresh(&ac);
/* set notifier that keyframe properties have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME_PROP, NULL);
return OPERATOR_FINISHED;
}
-void GRAPH_OT_interpolation_type (wmOperatorType *ot)
+void GRAPH_OT_interpolation_type(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Set Keyframe Interpolation";
@@ -1439,7 +1439,7 @@ void GRAPH_OT_interpolation_type (wmOperatorType *ot)
ot->poll = graphop_editable_keyframes_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* id-props */
ot->prop = RNA_def_enum(ot->srna, "type", beztriple_interpolation_mode_items, 0, "Type", "");
@@ -1454,18 +1454,18 @@ static void sethandles_graph_keys(bAnimContext *ac, short mode)
bAnimListElem *ale;
int filter;
- KeyframeEditFunc edit_cb= ANIM_editkeyframes_handles(mode);
- KeyframeEditFunc sel_cb= ANIM_editkeyframes_ok(BEZT_OK_SELECTED);
+ KeyframeEditFunc edit_cb = ANIM_editkeyframes_handles(mode);
+ KeyframeEditFunc sel_cb = ANIM_editkeyframes_ok(BEZT_OK_SELECTED);
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through setting flags for handles
* Note: we do not supply KeyframeEditData to the looper yet. Currently that's not necessary here...
*/
- for (ale= anim_data.first; ale; ale= ale->next) {
- FCurve *fcu= (FCurve *)ale->key_data;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ FCurve *fcu = (FCurve *)ale->key_data;
/* any selected keyframes for editing? */
if (ANIM_fcurve_keyframes_loop(NULL, fcu, NULL, sel_cb, NULL)) {
@@ -1489,7 +1489,7 @@ static int graphkeys_handletype_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* get handle setting mode */
- mode= RNA_enum_get(op->ptr, "type");
+ mode = RNA_enum_get(op->ptr, "type");
/* set handle type */
sethandles_graph_keys(&ac, mode);
@@ -1498,12 +1498,12 @@ static int graphkeys_handletype_exec(bContext *C, wmOperator *op)
ANIM_editkeyframes_refresh(&ac);
/* set notifier that keyframe properties have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME_PROP, NULL);
return OPERATOR_FINISHED;
}
- void GRAPH_OT_handle_type (wmOperatorType *ot)
+void GRAPH_OT_handle_type(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Set Keyframe Handle Type";
@@ -1516,7 +1516,7 @@ static int graphkeys_handletype_exec(bContext *C, wmOperator *op)
ot->poll = graphop_editable_keyframes_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* id-props */
ot->prop = RNA_def_enum(ot->srna, "type", keyframe_handle_type_items, 0, "Type", "");
@@ -1536,39 +1536,39 @@ static int graphkeys_handletype_exec(bContext *C, wmOperator *op)
typedef struct tEulerFilter {
struct tEulerFilter *next, *prev;
- ID *id; /* ID-block which owns the channels */
- FCurve *(fcurves[3]); /* 3 Pointers to F-Curves */
- char *rna_path; /* Pointer to one of the RNA Path's used by one of the F-Curves */
+ ID *id; /* ID-block which owns the channels */
+ FCurve *(fcurves[3]); /* 3 Pointers to F-Curves */
+ char *rna_path; /* Pointer to one of the RNA Path's used by one of the F-Curves */
} tEulerFilter;
-static int graphkeys_euler_filter_exec (bContext *C, wmOperator *op)
+static int graphkeys_euler_filter_exec(bContext *C, wmOperator *op)
{
bAnimContext ac;
- ListBase anim_data= {NULL, NULL};
+ ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
ListBase eulers = {NULL, NULL};
- tEulerFilter *euf= NULL;
- int groups=0, failed=0;
+ tEulerFilter *euf = NULL;
+ int groups = 0, failed = 0;
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
return OPERATOR_CANCELLED;
/* The process is done in two passes:
- * 1) Sets of three related rotation curves are identified from the selected channels,
+ * 1) Sets of three related rotation curves are identified from the selected channels,
* and are stored as a single 'operation unit' for the next step
* 2) Each set of three F-Curves is processed for each keyframe, with the values being
- * processed as necessary
+ * processed as necessary
*/
/* step 1: extract only the rotation f-curves */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
- for (ale= anim_data.first; ale; ale= ale->next) {
+ for (ale = anim_data.first; ale; ale = ale->next) {
FCurve *fcu = (FCurve *)ale->data;
/* check if this is an appropriate F-Curve
@@ -1579,8 +1579,8 @@ static int graphkeys_euler_filter_exec (bContext *C, wmOperator *op)
continue;
else if (ELEM3(fcu->array_index, 0, 1, 2) == 0) {
BKE_reportf(op->reports, RPT_WARNING,
- "Euler Rotation F-Curve has invalid index (ID='%s', Path='%s', Index=%d)",
- (ale->id)? ale->id->name:"<No ID>", fcu->rna_path, fcu->array_index);
+ "Euler Rotation F-Curve has invalid index (ID='%s', Path='%s', Index=%d)",
+ (ale->id) ? ale->id->name : "<No ID>", fcu->rna_path, fcu->array_index);
continue;
}
@@ -1588,19 +1588,19 @@ static int graphkeys_euler_filter_exec (bContext *C, wmOperator *op)
* so if the paths or the ID's don't match up, then a curve needs to be added
* to a new group
*/
- if ((euf) && (euf->id == ale->id) && (strcmp(euf->rna_path, fcu->rna_path)==0)) {
+ if ((euf) && (euf->id == ale->id) && (strcmp(euf->rna_path, fcu->rna_path) == 0)) {
/* this should be fine to add to the existing group then */
- euf->fcurves[fcu->array_index]= fcu;
+ euf->fcurves[fcu->array_index] = fcu;
}
else {
/* just add to a new block */
- euf= MEM_callocN(sizeof(tEulerFilter), "tEulerFilter");
+ euf = MEM_callocN(sizeof(tEulerFilter), "tEulerFilter");
BLI_addtail(&eulers, euf);
groups++;
- euf->id= ale->id;
+ euf->id = ale->id;
euf->rna_path = fcu->rna_path; /* this should be safe, since we're only using it for a short time */
- euf->fcurves[fcu->array_index]= fcu;
+ euf->fcurves[fcu->array_index] = fcu;
}
}
BLI_freelistN(&anim_data);
@@ -1613,7 +1613,7 @@ static int graphkeys_euler_filter_exec (bContext *C, wmOperator *op)
/* step 2: go through each set of curves, processing the values at each keyframe
* - it is assumed that there must be a full set of keyframes at each keyframe position
*/
- for (euf= eulers.first; euf; euf= euf->next) {
+ for (euf = eulers.first; euf; euf = euf->next) {
int f;
/* sanity check: ensure that there are enough F-Curves to work on in this group */
@@ -1621,11 +1621,11 @@ static int graphkeys_euler_filter_exec (bContext *C, wmOperator *op)
if (ELEM3(NULL, euf->fcurves[0], euf->fcurves[1], euf->fcurves[2])) {
/* report which components are missing */
BKE_reportf(op->reports, RPT_WARNING,
- "Missing %s%s%s component(s) of euler rotation for ID='%s' and RNA-Path='%s'",
- (euf->fcurves[0]==NULL)? "X":"",
- (euf->fcurves[1]==NULL)? "Y":"",
- (euf->fcurves[2]==NULL)? "Z":"",
- euf->id->name, euf->rna_path);
+ "Missing %s%s%s component(s) of euler rotation for ID='%s' and RNA-Path='%s'",
+ (euf->fcurves[0] == NULL) ? "X" : "",
+ (euf->fcurves[1] == NULL) ? "Y" : "",
+ (euf->fcurves[2] == NULL) ? "Z" : "",
+ euf->id->name, euf->rna_path);
/* keep track of number of failed sets, and carry on to next group */
failed++;
@@ -1636,7 +1636,7 @@ static int graphkeys_euler_filter_exec (bContext *C, wmOperator *op)
// FIXME: there are more complicated methods that will be needed to fix more cases than just some
for (f = 0; f < 3; f++) {
FCurve *fcu = euf->fcurves[f];
- BezTriple *bezt, *prev=NULL;
+ BezTriple *bezt, *prev = NULL;
unsigned int i;
/* skip if not enough vets to do a decent analysis of... */
@@ -1644,7 +1644,7 @@ static int graphkeys_euler_filter_exec (bContext *C, wmOperator *op)
continue;
/* prev follows bezt, bezt = "current" point to be fixed */
- for (i=0, bezt=fcu->bezt; i < fcu->totvert; i++, prev=bezt, bezt++) {
+ for (i = 0, bezt = fcu->bezt; i < fcu->totvert; i++, prev = bezt, bezt++) {
/* our method depends on determining a "difference" from the previous vert */
if (prev == NULL)
continue;
@@ -1661,7 +1661,7 @@ static int graphkeys_euler_filter_exec (bContext *C, wmOperator *op)
bezt->vec[2][1] += fac;
}
}
- else /* if (prev->vec[1][1] < bezt->vec[1][1]) */ {
+ else { /* if (prev->vec[1][1] < bezt->vec[1][1]) */
while (fabsf(bezt->vec[1][1] - prev->vec[1][1]) >= (float)M_PI) {
bezt->vec[0][1] -= fac;
bezt->vec[1][1] -= fac;
@@ -1677,27 +1677,27 @@ static int graphkeys_euler_filter_exec (bContext *C, wmOperator *op)
/* updates + finishing warnings */
if (failed == groups) {
BKE_report(op->reports, RPT_ERROR,
- "No Euler Rotations could be corrected, ensure each rotation has keys for all components, and that F-Curves for these are in consecutive XYZ order and selected");
+ "No Euler Rotations could be corrected, ensure each rotation has keys for all components, and that F-Curves for these are in consecutive XYZ order and selected");
return OPERATOR_CANCELLED;
}
else {
if (failed) {
BKE_report(op->reports, RPT_ERROR,
- "Some Euler Rotations couldn't be corrected due to missing/unselected/out-of-order F-Curves, ensure each rotation has keys for all components, and that F-Curves for these are in consecutive XYZ order and selected");
+ "Some Euler Rotations couldn't be corrected due to missing/unselected/out-of-order F-Curves, ensure each rotation has keys for all components, and that F-Curves for these are in consecutive XYZ order and selected");
}
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
/* set notifier that keyframes have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
/* done at last */
return OPERATOR_FINISHED;
}
}
-void GRAPH_OT_euler_filter (wmOperatorType *ot)
+void GRAPH_OT_euler_filter(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Euler Discontinuity Filter";
@@ -1709,7 +1709,7 @@ void GRAPH_OT_euler_filter (wmOperatorType *ot)
ot->poll = graphop_editable_keyframes_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ***************** Jump to Selected Frames Operator *********************** */
@@ -1718,7 +1718,7 @@ void GRAPH_OT_euler_filter (wmOperatorType *ot)
static int graphkeys_framejump_exec(bContext *C, wmOperator *UNUSED(op))
{
bAnimContext ac;
- ListBase anim_data= {NULL, NULL};
+ ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
KeyframeEditData ked;
@@ -1731,11 +1731,11 @@ static int graphkeys_framejump_exec(bContext *C, wmOperator *UNUSED(op))
memset(&ked, 0, sizeof(KeyframeEditData));
/* loop over action data, averaging values */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
- for (ale= anim_data.first; ale; ale= ale->next) {
- AnimData *adt= ANIM_nla_mapping_get(&ac, ale);
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ AnimData *adt = ANIM_nla_mapping_get(&ac, ale);
/* apply unit corrections */
ANIM_unit_mapping_apply_fcurve(ac.scene, ale->id, ale->key_data, ANIM_UNITCONV_ONLYKEYS);
@@ -1749,29 +1749,29 @@ static int graphkeys_framejump_exec(bContext *C, wmOperator *UNUSED(op))
ANIM_fcurve_keyframes_loop(&ked, ale->key_data, NULL, bezt_calc_average, NULL);
/* unapply unit corrections */
- ANIM_unit_mapping_apply_fcurve(ac.scene, ale->id, ale->key_data, ANIM_UNITCONV_RESTORE|ANIM_UNITCONV_ONLYKEYS);
+ ANIM_unit_mapping_apply_fcurve(ac.scene, ale->id, ale->key_data, ANIM_UNITCONV_RESTORE | ANIM_UNITCONV_ONLYKEYS);
}
BLI_freelistN(&anim_data);
/* set the new current frame and cursor values, based on the average time and value */
if (ked.i1) {
- SpaceIpo *sipo= (SpaceIpo *)ac.sl;
- Scene *scene= ac.scene;
+ SpaceIpo *sipo = (SpaceIpo *)ac.sl;
+ Scene *scene = ac.scene;
/* take the average values, rounding to the nearest int for the current frame */
- CFRA= (int)floor((ked.f1 / ked.i1) + 0.5f);
- SUBFRA= 0.f;
- sipo->cursorVal= ked.f2 / (float)ked.i1;
+ CFRA = (int)floor((ked.f1 / ked.i1) + 0.5f);
+ SUBFRA = 0.f;
+ sipo->cursorVal = ked.f2 / (float)ked.i1;
}
/* set notifier that things have changed */
- WM_event_add_notifier(C, NC_SCENE|ND_FRAME, ac.scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_FRAME, ac.scene);
return OPERATOR_FINISHED;
}
-void GRAPH_OT_frame_jump (wmOperatorType *ot)
+void GRAPH_OT_frame_jump(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Jump to Frame";
@@ -1783,7 +1783,7 @@ void GRAPH_OT_frame_jump (wmOperatorType *ot)
ot->poll = graphop_visible_keyframes_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ******************** Snap Keyframes Operator *********************** */
@@ -1810,26 +1810,26 @@ static void snap_graph_keys(bAnimContext *ac, short mode)
KeyframeEditFunc edit_cb;
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* get beztriple editing callbacks */
- edit_cb= ANIM_editkeyframes_snap(mode);
+ edit_cb = ANIM_editkeyframes_snap(mode);
memset(&ked, 0, sizeof(KeyframeEditData));
- ked.scene= ac->scene;
+ ked.scene = ac->scene;
if (mode == GRAPHKEYS_SNAP_NEAREST_MARKER) {
- ked.list.first= (ac->markers) ? ac->markers->first : NULL;
- ked.list.last= (ac->markers) ? ac->markers->last : NULL;
+ ked.list.first = (ac->markers) ? ac->markers->first : NULL;
+ ked.list.last = (ac->markers) ? ac->markers->last : NULL;
}
else if (mode == GRAPHKEYS_SNAP_VALUE) {
- SpaceIpo *sipo= (SpaceIpo *)ac->sl;
- ked.f1= (sipo) ? sipo->cursorVal : 0.0f;
+ SpaceIpo *sipo = (SpaceIpo *)ac->sl;
+ ked.f1 = (sipo) ? sipo->cursorVal : 0.0f;
}
/* snap keyframes */
- for (ale= anim_data.first; ale; ale= ale->next) {
- AnimData *adt= ANIM_nla_mapping_get(ac, ale);
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ AnimData *adt = ANIM_nla_mapping_get(ac, ale);
/* apply unit corrections */
ANIM_unit_mapping_apply_fcurve(ac->scene, ale->id, ale->key_data, 0);
@@ -1861,7 +1861,7 @@ static int graphkeys_snap_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* get snapping mode */
- mode= RNA_enum_get(op->ptr, "type");
+ mode = RNA_enum_get(op->ptr, "type");
/* snap keyframes */
snap_graph_keys(&ac, mode);
@@ -1870,12 +1870,12 @@ static int graphkeys_snap_exec(bContext *C, wmOperator *op)
ANIM_editkeyframes_refresh(&ac);
/* set notifier that keyframes have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
-void GRAPH_OT_snap (wmOperatorType *ot)
+void GRAPH_OT_snap(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Snap Keys";
@@ -1888,7 +1888,7 @@ void GRAPH_OT_snap (wmOperatorType *ot)
ot->poll = graphop_editable_keyframes_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* id-props */
ot->prop = RNA_def_enum(ot->srna, "type", prop_graphkeys_snap_types, 0, "Type", "");
@@ -1917,37 +1917,37 @@ static void mirror_graph_keys(bAnimContext *ac, short mode)
KeyframeEditFunc edit_cb;
/* get beztriple editing callbacks */
- edit_cb= ANIM_editkeyframes_mirror(mode);
+ edit_cb = ANIM_editkeyframes_mirror(mode);
memset(&ked, 0, sizeof(KeyframeEditData));
- ked.scene= ac->scene;
+ ked.scene = ac->scene;
/* for 'first selected marker' mode, need to find first selected marker first! */
// XXX should this be made into a helper func in the API?
if (mode == GRAPHKEYS_MIRROR_MARKER) {
- TimeMarker *marker= NULL;
+ TimeMarker *marker = NULL;
/* find first selected marker */
- marker= ED_markers_get_first_selected(ac->markers);
+ marker = ED_markers_get_first_selected(ac->markers);
/* store marker's time (if available) */
if (marker)
- ked.f1= (float)marker->frame;
+ ked.f1 = (float)marker->frame;
else
return;
}
else if (mode == GRAPHKEYS_MIRROR_VALUE) {
- SpaceIpo *sipo= (SpaceIpo *)ac->sl;
- ked.f1= (sipo) ? sipo->cursorVal : 0.0f;
+ SpaceIpo *sipo = (SpaceIpo *)ac->sl;
+ ked.f1 = (sipo) ? sipo->cursorVal : 0.0f;
}
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* mirror keyframes */
- for (ale= anim_data.first; ale; ale= ale->next) {
- AnimData *adt= ANIM_nla_mapping_get(ac, ale);
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ AnimData *adt = ANIM_nla_mapping_get(ac, ale);
/* apply unit corrections */
ANIM_unit_mapping_apply_fcurve(ac->scene, ale->id, ale->key_data, ANIM_UNITCONV_ONLYKEYS);
@@ -1961,7 +1961,7 @@ static void mirror_graph_keys(bAnimContext *ac, short mode)
ANIM_fcurve_keyframes_loop(&ked, ale->key_data, NULL, edit_cb, calchandles_fcurve);
/* unapply unit corrections */
- ANIM_unit_mapping_apply_fcurve(ac->scene, ale->id, ale->key_data, ANIM_UNITCONV_ONLYKEYS|ANIM_UNITCONV_RESTORE);
+ ANIM_unit_mapping_apply_fcurve(ac->scene, ale->id, ale->key_data, ANIM_UNITCONV_ONLYKEYS | ANIM_UNITCONV_RESTORE);
}
BLI_freelistN(&anim_data);
@@ -1979,7 +1979,7 @@ static int graphkeys_mirror_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* get mirroring mode */
- mode= RNA_enum_get(op->ptr, "type");
+ mode = RNA_enum_get(op->ptr, "type");
/* mirror keyframes */
mirror_graph_keys(&ac, mode);
@@ -1988,12 +1988,12 @@ static int graphkeys_mirror_exec(bContext *C, wmOperator *op)
ANIM_editkeyframes_refresh(&ac);
/* set notifier that keyframes have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
-void GRAPH_OT_mirror (wmOperatorType *ot)
+void GRAPH_OT_mirror(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Mirror Keys";
@@ -2006,7 +2006,7 @@ void GRAPH_OT_mirror (wmOperatorType *ot)
ot->poll = graphop_editable_keyframes_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* id-props */
ot->prop = RNA_def_enum(ot->srna, "type", prop_graphkeys_mirror_types, 0, "Type", "");
@@ -2026,11 +2026,11 @@ static int graphkeys_smooth_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* smooth keyframes */
- for (ale= anim_data.first; ale; ale= ale->next) {
+ for (ale = anim_data.first; ale; ale = ale->next) {
/* For now, we can only smooth by flattening handles AND smoothing curve values.
* Perhaps the mode argument could be removed, as that functionality is offerred through
* Snap->Flatten Handles anyway.
@@ -2043,12 +2043,12 @@ static int graphkeys_smooth_exec(bContext *C, wmOperator *UNUSED(op))
ANIM_editkeyframes_refresh(&ac);
/* set notifier that keyframes have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
-void GRAPH_OT_smooth (wmOperatorType *ot)
+void GRAPH_OT_smooth(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Smooth Keys";
@@ -2060,7 +2060,7 @@ void GRAPH_OT_smooth (wmOperatorType *ot)
ot->poll = graphop_editable_keyframes_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ************************************************************************** */
@@ -2069,19 +2069,19 @@ void GRAPH_OT_smooth (wmOperatorType *ot)
/* ******************** Add F-Modifier Operator *********************** */
/* present a special customised popup menu for this, with some filtering */
-static int graph_fmodifier_add_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(event))
+static int graph_fmodifier_add_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
wmOperatorType *ot = WM_operatortype_find("GRAPH_OT_fmodifier_add", 1);
uiPopupMenu *pup;
uiLayout *layout;
int i;
- pup= uiPupMenuBegin(C, IFACE_("Add F-Curve Modifier"), ICON_NONE);
- layout= uiPupMenuLayout(pup);
+ pup = uiPupMenuBegin(C, IFACE_("Add F-Curve Modifier"), ICON_NONE);
+ layout = uiPupMenuLayout(pup);
/* start from 1 to skip the 'Invalid' modifier type */
for (i = 1; i < FMODIFIER_NUM_TYPES; i++) {
- FModifierTypeInfo *fmi= get_fmodifier_typeinfo(i);
+ FModifierTypeInfo *fmi = get_fmodifier_typeinfo(i);
PointerRNA props_ptr;
/* check if modifier is valid for this context */
@@ -2089,11 +2089,11 @@ static int graph_fmodifier_add_invoke (bContext *C, wmOperator *op, wmEvent *UNU
continue;
/* create operator menu item with relevant properties filled in */
- props_ptr= uiItemFullO_ptr(layout, ot, IFACE_(fmi->name), ICON_NONE,
- NULL, WM_OP_EXEC_REGION_WIN, UI_ITEM_O_RETURN_PROPS);
- /* the only thing that gets set from the menu is the type of F-Modifier to add */
+ props_ptr = uiItemFullO_ptr(layout, ot, IFACE_(fmi->name), ICON_NONE,
+ NULL, WM_OP_EXEC_REGION_WIN, UI_ITEM_O_RETURN_PROPS);
+ /* the only thing that gets set from the menu is the type of F-Modifier to add */
RNA_enum_set(&props_ptr, "type", i);
- /* the following properties are just repeats of existing ones... */
+ /* the following properties are just repeats of existing ones... */
RNA_boolean_set(&props_ptr, "only_active", RNA_boolean_get(op->ptr, "only_active"));
}
uiItemS(layout);
@@ -2116,23 +2116,23 @@ static int graph_fmodifier_add_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* get type of modifier to add */
- type= RNA_enum_get(op->ptr, "type");
+ type = RNA_enum_get(op->ptr, "type");
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
+ 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?
+ filter |= ANIMFILTER_ACTIVE; // FIXME: enforce in this case only a single channel to get handled?
else
- filter |= (ANIMFILTER_SEL|ANIMFILTER_CURVE_VISIBLE);
+ filter |= (ANIMFILTER_SEL | ANIMFILTER_CURVE_VISIBLE);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* add f-modifier to each curve */
- for (ale= anim_data.first; ale; ale= ale->next) {
- FCurve *fcu= (FCurve *)ale->data;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ FCurve *fcu = (FCurve *)ale->data;
FModifier *fcm;
/* add F-Modifier of specified type to active F-Curve, and make it the active one */
- fcm= add_fmodifier(&fcu->modifiers, type);
+ fcm = add_fmodifier(&fcu->modifiers, type);
if (fcm)
set_active_fmodifier(&fcu->modifiers, fcm);
else {
@@ -2152,7 +2152,7 @@ static int graph_fmodifier_add_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void GRAPH_OT_fmodifier_add (wmOperatorType *ot)
+void GRAPH_OT_fmodifier_add(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Add F-Curve Modifier";
@@ -2165,7 +2165,7 @@ void GRAPH_OT_fmodifier_add (wmOperatorType *ot)
ot->poll = graphop_selected_fcurve_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* id-props */
ot->prop = RNA_def_enum(ot->srna, "type", fmodifier_type_items, 0, "Type", "");
@@ -2188,14 +2188,14 @@ static int graph_fmodifier_copy_exec(bContext *C, wmOperator *op)
free_fmodifiers_copybuf();
/* get the active F-Curve */
- ale= get_active_fcurve_channel(&ac);
+ ale = get_active_fcurve_channel(&ac);
/* if this exists, call the copy F-Modifiers API function */
if (ale && ale->data) {
- FCurve *fcu= (FCurve *)ale->data;
+ FCurve *fcu = (FCurve *)ale->data;
// TODO: when 'active' vs 'all' boolean is added, change last param!
- ok= ANIM_fmodifiers_copy_to_buf(&fcu->modifiers, 0);
+ ok = ANIM_fmodifiers_copy_to_buf(&fcu->modifiers, 0);
/* free temp data now */
MEM_freeN(ale);
@@ -2210,7 +2210,7 @@ static int graph_fmodifier_copy_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void GRAPH_OT_fmodifier_copy (wmOperatorType *ot)
+void GRAPH_OT_fmodifier_copy(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Copy F-Modifiers";
@@ -2222,7 +2222,7 @@ void GRAPH_OT_fmodifier_copy (wmOperatorType *ot)
ot->poll = graphop_active_fcurve_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* id-props */
//ot->prop = RNA_def_boolean(ot->srna, "all", 1, "All F-Modifiers", "Copy all the F-Modifiers, instead of just the active one");
@@ -2235,19 +2235,19 @@ static int graph_fmodifier_paste_exec(bContext *C, wmOperator *op)
bAnimContext ac;
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
- int filter, ok=0;
+ int filter, ok = 0;
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
return OPERATOR_CANCELLED;
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* paste modifiers */
for (ale = anim_data.first; ale; ale = ale->next) {
- FCurve *fcu= (FCurve *)ale->data;
+ FCurve *fcu = (FCurve *)ale->data;
// TODO: do we want to replace existing modifiers? add user pref for that!
ok += ANIM_fmodifiers_paste_from_buf(&fcu->modifiers, 0);
@@ -2262,7 +2262,7 @@ static int graph_fmodifier_paste_exec(bContext *C, wmOperator *op)
ANIM_editkeyframes_refresh(&ac);
/* set notifier that keyframes have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
@@ -2272,7 +2272,7 @@ static int graph_fmodifier_paste_exec(bContext *C, wmOperator *op)
}
}
-void GRAPH_OT_fmodifier_paste (wmOperatorType *ot)
+void GRAPH_OT_fmodifier_paste(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Paste F-Modifiers";
@@ -2284,7 +2284,7 @@ void GRAPH_OT_fmodifier_paste (wmOperatorType *ot)
ot->poll = graphop_active_fcurve_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ************************************************************************** */
diff --git a/source/blender/editors/space_graph/graph_intern.h b/source/blender/editors/space_graph/graph_intern.h
index d7274b07985..47b55ae90ab 100644
--- a/source/blender/editors/space_graph/graph_intern.h
+++ b/source/blender/editors/space_graph/graph_intern.h
@@ -70,14 +70,14 @@ void GRAPH_OT_clickselect(struct wmOperatorType *ot);
/* defines for left-right select tool */
enum {
- GRAPHKEYS_LRSEL_TEST = 0,
+ GRAPHKEYS_LRSEL_TEST = 0,
GRAPHKEYS_LRSEL_LEFT,
GRAPHKEYS_LRSEL_RIGHT
} eGraphKeys_LeftRightSelect_Mode;
/* defines for column-select mode */
enum {
- GRAPHKEYS_COLUMNSEL_KEYS = 0,
+ GRAPHKEYS_COLUMNSEL_KEYS = 0,
GRAPHKEYS_COLUMNSEL_CFRA,
GRAPHKEYS_COLUMNSEL_MARKERS_COLUMN,
GRAPHKEYS_COLUMNSEL_MARKERS_BETWEEN,
@@ -86,7 +86,7 @@ enum {
/* ***************************************** */
/* graph_edit.c */
-void get_graph_keyframe_extents (struct bAnimContext *ac, float *xmin, float *xmax, float *ymin, float *ymax, const short do_selected);
+void get_graph_keyframe_extents(struct bAnimContext *ac, float *xmin, float *xmax, float *ymin, float *ymax, const short do_selected);
void GRAPH_OT_previewrange_set(struct wmOperatorType *ot);
void GRAPH_OT_view_all(struct wmOperatorType *ot);
@@ -172,4 +172,3 @@ void graphedit_operatortypes(void);
#endif /* __GRAPH_INTERN_H__ */
-
diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c
index 2887fa1c881..62aebcb4edc 100644
--- a/source/blender/editors/space_graph/graph_ops.c
+++ b/source/blender/editors/space_graph/graph_ops.c
@@ -69,22 +69,22 @@
/* Set the new frame number */
static void graphview_cursor_apply(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- SpaceIpo *sipo= CTX_wm_space_graph(C);
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ SpaceIpo *sipo = CTX_wm_space_graph(C);
/* adjust the frame
* NOTE: sync this part of the code with ANIM_OT_change_frame
*/
- CFRA= RNA_int_get(op->ptr, "frame");
- SUBFRA=0.f;
+ CFRA = RNA_int_get(op->ptr, "frame");
+ SUBFRA = 0.f;
sound_seek_scene(bmain, scene);
/* set the cursor value */
- sipo->cursorVal= RNA_float_get(op->ptr, "value");
+ sipo->cursorVal = RNA_float_get(op->ptr, "value");
/* send notifiers - notifiers for frame should force an update for both vars ok... */
- WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene);
}
/* ... */
@@ -101,7 +101,7 @@ static int graphview_cursor_exec(bContext *C, wmOperator *op)
/* set the operator properties from the initial event */
static void graphview_cursor_setprops(bContext *C, wmOperator *op, wmEvent *event)
{
- ARegion *ar= CTX_wm_region(C);
+ ARegion *ar = CTX_wm_region(C);
float viewx, viewy;
/* abort if not active region (should not really be possible) */
@@ -112,8 +112,8 @@ static void graphview_cursor_setprops(bContext *C, wmOperator *op, wmEvent *even
UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &viewx, &viewy);
/* store the values in the operator properties */
- /* frame is rounded to the nearest int, since frames are ints */
- RNA_int_set(op->ptr, "frame", (int)floor(viewx+0.5f));
+ /* frame is rounded to the nearest int, since frames are ints */
+ RNA_int_set(op->ptr, "frame", (int)floor(viewx + 0.5f));
RNA_float_set(op->ptr, "value", viewy);
}
@@ -153,7 +153,7 @@ static int graphview_cursor_modal(bContext *C, wmOperator *op, wmEvent *event)
/* we check for either mouse-button to end, as checking for ACTIONMOUSE (which is used to init
* the modal op) doesn't work for some reason
*/
- if (event->val==KM_RELEASE)
+ if (event->val == KM_RELEASE)
return OPERATOR_FINISHED;
break;
}
@@ -175,7 +175,7 @@ static void GRAPH_OT_cursor_set(wmOperatorType *ot)
ot->poll = ED_operator_graphedit_active;
/* flags */
- ot->flag = OPTYPE_BLOCKING|OPTYPE_UNDO;
+ ot->flag = OPTYPE_BLOCKING | OPTYPE_UNDO;
/* rna */
RNA_def_int(ot->srna, "frame", 0, MINAFRAME, MAXFRAME, "Frame", "", MINAFRAME, MAXFRAME);
@@ -198,7 +198,7 @@ void graphedit_operatortypes(void)
WM_operatortype_append(GRAPH_OT_ghost_curves_clear);
/* keyframes */
- /* selection */
+ /* selection */
WM_operatortype_append(GRAPH_OT_clickselect);
WM_operatortype_append(GRAPH_OT_select_all_toggle);
WM_operatortype_append(GRAPH_OT_select_border);
@@ -208,7 +208,7 @@ void graphedit_operatortypes(void)
WM_operatortype_append(GRAPH_OT_select_less);
WM_operatortype_append(GRAPH_OT_select_leftright);
- /* editing */
+ /* editing */
WM_operatortype_append(GRAPH_OT_snap);
WM_operatortype_append(GRAPH_OT_mirror);
WM_operatortype_append(GRAPH_OT_frame_jump);
@@ -241,9 +241,10 @@ void ED_operatormacros_graph(void)
wmOperatorType *ot;
wmOperatorTypeMacro *otmacro;
- ot = WM_operatortype_append_macro("GRAPH_OT_duplicate_move", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
+ ot = WM_operatortype_append_macro("GRAPH_OT_duplicate_move", "Duplicate",
+ "Make a copy of all selected keyframes and move them",
+ OPTYPE_UNDO | OPTYPE_REGISTER);
if (ot) {
- ot->description = "Make a copy of all selected keyframes and move them";
WM_operatortype_macro_define(ot, "GRAPH_OT_duplicate");
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_transform");
RNA_enum_set(otmacro->ptr, "mode", TFM_TIME_DUPLICATE);
@@ -253,7 +254,7 @@ void ED_operatormacros_graph(void)
/* ************************** registration - keymaps **********************************/
-static void graphedit_keymap_keyframes (wmKeyConfig *keyconf, wmKeyMap *keymap)
+static void graphedit_keymap_keyframes(wmKeyConfig *keyconf, wmKeyMap *keymap)
{
wmKeyMapItem *kmi;
@@ -261,95 +262,95 @@ static void graphedit_keymap_keyframes (wmKeyConfig *keyconf, wmKeyMap *keymap)
kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", HKEY, KM_PRESS, KM_CTRL, 0);
RNA_string_set(kmi->ptr, "data_path", "space_data.show_handles");
- /* NOTE: 'ACTIONMOUSE' not 'LEFTMOUSE', as user may have swapped mouse-buttons
- * This keymap is supposed to override ANIM_OT_change_frame, which does the same except it doesn't do y-values
- */
+ /* NOTE: 'ACTIONMOUSE' not 'LEFTMOUSE', as user may have swapped mouse-buttons
+ * This keymap is supposed to override ANIM_OT_change_frame, which does the same except it doesn't do y-values
+ */
WM_keymap_add_item(keymap, "GRAPH_OT_cursor_set", ACTIONMOUSE, KM_PRESS, 0, 0);
/* graph_select.c - selection tools */
- /* click-select */
+ /* click-select */
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
- RNA_boolean_set(kmi->ptr, "curves", FALSE);
- RNA_boolean_set(kmi->ptr, "column", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "curves", FALSE);
+ RNA_boolean_set(kmi->ptr, "column", FALSE);
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
- RNA_boolean_set(kmi->ptr, "curves", FALSE);
- RNA_boolean_set(kmi->ptr, "column", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "curves", FALSE);
+ RNA_boolean_set(kmi->ptr, "column", TRUE);
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
- RNA_boolean_set(kmi->ptr, "curves", FALSE);
- RNA_boolean_set(kmi->ptr, "column", FALSE);
- kmi = WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT|KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
- RNA_boolean_set(kmi->ptr, "curves", FALSE);
- RNA_boolean_set(kmi->ptr, "column", TRUE);
- kmi = WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
- RNA_boolean_set(kmi->ptr, "curves", TRUE);
- RNA_boolean_set(kmi->ptr, "column", FALSE);
- kmi = WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_ALT|KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
- RNA_boolean_set(kmi->ptr, "curves", TRUE);
- RNA_boolean_set(kmi->ptr, "column", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_boolean_set(kmi->ptr, "curves", FALSE);
+ RNA_boolean_set(kmi->ptr, "column", FALSE);
+ kmi = WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT | KM_SHIFT, 0);
+ RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_boolean_set(kmi->ptr, "curves", FALSE);
+ RNA_boolean_set(kmi->ptr, "column", TRUE);
+ kmi = WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL | KM_ALT, 0);
+ RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "curves", TRUE);
+ RNA_boolean_set(kmi->ptr, "column", FALSE);
+ kmi = WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL | KM_ALT | KM_SHIFT, 0);
+ RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_boolean_set(kmi->ptr, "curves", TRUE);
+ RNA_boolean_set(kmi->ptr, "column", FALSE);
/* select left/right */
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
- RNA_enum_set(kmi->ptr, "mode", GRAPHKEYS_LRSEL_TEST);
- kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
- RNA_enum_set(kmi->ptr, "mode", GRAPHKEYS_LRSEL_TEST);
+ RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_enum_set(kmi->ptr, "mode", GRAPHKEYS_LRSEL_TEST);
+ kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
+ RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_enum_set(kmi->ptr, "mode", GRAPHKEYS_LRSEL_TEST);
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_leftright", LEFTBRACKETKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
- RNA_enum_set(kmi->ptr, "mode", GRAPHKEYS_LRSEL_LEFT);
+ RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_enum_set(kmi->ptr, "mode", GRAPHKEYS_LRSEL_LEFT);
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_leftright", RIGHTBRACKETKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
- RNA_enum_set(kmi->ptr, "mode", GRAPHKEYS_LRSEL_RIGHT);
+ RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_enum_set(kmi->ptr, "mode", GRAPHKEYS_LRSEL_RIGHT);
- /* deselect all */
+ /* deselect all */
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "invert", FALSE);
+ RNA_boolean_set(kmi->ptr, "invert", FALSE);
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "invert", TRUE);
+ RNA_boolean_set(kmi->ptr, "invert", TRUE);
- /* borderselect */
+ /* borderselect */
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "axis_range", FALSE);
- RNA_boolean_set(kmi->ptr, "include_handles", FALSE);
+ RNA_boolean_set(kmi->ptr, "axis_range", FALSE);
+ RNA_boolean_set(kmi->ptr, "include_handles", FALSE);
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "axis_range", TRUE);
- RNA_boolean_set(kmi->ptr, "include_handles", FALSE);
+ RNA_boolean_set(kmi->ptr, "axis_range", TRUE);
+ RNA_boolean_set(kmi->ptr, "include_handles", FALSE);
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "axis_range", FALSE);
- RNA_boolean_set(kmi->ptr, "include_handles", TRUE);
- kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "axis_range", TRUE);
- RNA_boolean_set(kmi->ptr, "include_handles", TRUE);
+ RNA_boolean_set(kmi->ptr, "axis_range", FALSE);
+ RNA_boolean_set(kmi->ptr, "include_handles", TRUE);
+ kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, KM_CTRL | KM_ALT, 0);
+ RNA_boolean_set(kmi->ptr, "axis_range", TRUE);
+ RNA_boolean_set(kmi->ptr, "include_handles", TRUE);
- /* column select */
+ /* column select */
RNA_enum_set(WM_keymap_add_item(keymap, "GRAPH_OT_select_column", KKEY, KM_PRESS, 0, 0)->ptr, "mode", GRAPHKEYS_COLUMNSEL_KEYS);
RNA_enum_set(WM_keymap_add_item(keymap, "GRAPH_OT_select_column", KKEY, KM_PRESS, KM_CTRL, 0)->ptr, "mode", GRAPHKEYS_COLUMNSEL_CFRA);
RNA_enum_set(WM_keymap_add_item(keymap, "GRAPH_OT_select_column", KKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", GRAPHKEYS_COLUMNSEL_MARKERS_COLUMN);
RNA_enum_set(WM_keymap_add_item(keymap, "GRAPH_OT_select_column", KKEY, KM_PRESS, KM_ALT, 0)->ptr, "mode", GRAPHKEYS_COLUMNSEL_MARKERS_BETWEEN);
- /* select more/less */
+ /* select more/less */
WM_keymap_add_item(keymap, "GRAPH_OT_select_more", PADPLUSKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "GRAPH_OT_select_less", PADMINUS, KM_PRESS, KM_CTRL, 0);
- /* select linked */
+ /* select linked */
WM_keymap_add_item(keymap, "GRAPH_OT_select_linked", LKEY, KM_PRESS, 0, 0);
/* graph_edit.c */
- /* snap - current frame to selected keys */
- // TODO: maybe since this is called jump, we're better to have it on <something>-J?
- WM_keymap_add_item(keymap, "GRAPH_OT_frame_jump", SKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
+ /* snap - current frame to selected keys */
+ // TODO: maybe since this is called jump, we're better to have it on <something>-J?
+ WM_keymap_add_item(keymap, "GRAPH_OT_frame_jump", SKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
- /* menu + single-step transform */
+ /* menu + single-step transform */
WM_keymap_add_item(keymap, "GRAPH_OT_snap", SKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "GRAPH_OT_mirror", MKEY, KM_PRESS, KM_SHIFT, 0);
@@ -357,7 +358,7 @@ static void graphedit_keymap_keyframes (wmKeyConfig *keyconf, wmKeyMap *keymap)
WM_keymap_add_item(keymap, "GRAPH_OT_interpolation_type", TKEY, KM_PRESS, 0, 0);
- /* destructive */
+ /* destructive */
WM_keymap_add_item(keymap, "GRAPH_OT_clean", OKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "GRAPH_OT_smooth", OKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "GRAPH_OT_sample", OKEY, KM_PRESS, KM_SHIFT, 0);
@@ -369,27 +370,27 @@ static void graphedit_keymap_keyframes (wmKeyConfig *keyconf, wmKeyMap *keymap)
WM_keymap_add_item(keymap, "GRAPH_OT_duplicate_move", DKEY, KM_PRESS, KM_SHIFT, 0);
- /* insertkey */
+ /* insertkey */
WM_keymap_add_item(keymap, "GRAPH_OT_keyframe_insert", IKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "GRAPH_OT_click_insert", LEFTMOUSE, KM_CLICK, KM_CTRL, 0);
- /* copy/paste */
+ /* copy/paste */
WM_keymap_add_item(keymap, "GRAPH_OT_copy", CKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "GRAPH_OT_paste", VKEY, KM_PRESS, KM_CTRL, 0);
- /* auto-set range */
- WM_keymap_add_item(keymap, "GRAPH_OT_previewrange_set", PKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
+ /* auto-set range */
+ WM_keymap_add_item(keymap, "GRAPH_OT_previewrange_set", PKEY, KM_PRESS, KM_CTRL | KM_ALT, 0);
WM_keymap_add_item(keymap, "GRAPH_OT_view_all", HOMEKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "GRAPH_OT_view_selected", PADPERIOD, KM_PRESS, 0, 0);
- /* F-Modifiers */
- kmi = WM_keymap_add_item(keymap, "GRAPH_OT_fmodifier_add", MKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
+ /* F-Modifiers */
+ kmi = WM_keymap_add_item(keymap, "GRAPH_OT_fmodifier_add", MKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
RNA_boolean_set(kmi->ptr, "only_active", FALSE);
/* animation module */
- /* channels list
- * NOTE: these operators were originally for the channels list, but are added here too for convenience...
- */
+ /* channels list
+ * NOTE: these operators were originally for the channels list, but are added here too for convenience...
+ */
WM_keymap_add_item(keymap, "ANIM_OT_channels_editable_toggle", TABKEY, KM_PRESS, 0, 0);
/* transform system */
@@ -408,7 +409,7 @@ void graphedit_keymap(wmKeyConfig *keyconf)
/* keymap for all regions */
keymap = WM_keymap_find(keyconf, "Graph Editor Generic", SPACE_IPO, 0);
WM_keymap_add_item(keymap, "GRAPH_OT_properties", NKEY, KM_PRESS, 0, 0);
- /* extrapolation works on channels, not keys */
+ /* extrapolation works on channels, not keys */
WM_keymap_add_item(keymap, "GRAPH_OT_extrapolation_type", EKEY, KM_PRESS, KM_SHIFT, 0);
/* channels */
diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c
index 864708a873a..33e32363cf5 100644
--- a/source/blender/editors/space_graph/graph_select.c
+++ b/source/blender/editors/space_graph/graph_select.c
@@ -76,48 +76,48 @@
/* Deselects keyframes in the Graph Editor
* - This is called by the deselect all operator, as well as other ones!
*
- * - test: check if select or deselect all
+ * - test: check if select or deselect all
* - sel: how to select keyframes
* 0 = deselect
* 1 = select
* 2 = invert
* - do_channels: whether to affect selection status of channels
*/
-static void deselect_graph_keys (bAnimContext *ac, short test, short sel, short do_channels)
+static void deselect_graph_keys(bAnimContext *ac, short test, short sel, short do_channels)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
- SpaceIpo *sipo= (SpaceIpo *)ac->sl;
- KeyframeEditData ked= {{NULL}};
+ SpaceIpo *sipo = (SpaceIpo *)ac->sl;
+ KeyframeEditData ked = {{NULL}};
KeyframeEditFunc test_cb, sel_cb;
/* determine type-based settings */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS);
/* filter data */
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* init BezTriple looping data */
- test_cb= ANIM_editkeyframes_ok(BEZT_OK_SELECTED);
+ test_cb = ANIM_editkeyframes_ok(BEZT_OK_SELECTED);
/* See if we should be selecting or deselecting */
if (test) {
- for (ale= anim_data.first; ale; ale= ale->next) {
+ for (ale = anim_data.first; ale; ale = ale->next) {
if (ANIM_fcurve_keyframes_loop(&ked, ale->key_data, NULL, test_cb, NULL)) {
- sel= SELECT_SUBTRACT;
+ sel = SELECT_SUBTRACT;
break;
}
}
}
/* convert sel to selectmode, and use that to get editor */
- sel_cb= ANIM_editkeyframes_select(sel);
+ sel_cb = ANIM_editkeyframes_select(sel);
/* Now set the flags */
- for (ale= anim_data.first; ale; ale= ale->next) {
- FCurve *fcu= (FCurve *)ale->key_data;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ FCurve *fcu = (FCurve *)ale->key_data;
/* Keyframes First */
ANIM_fcurve_keyframes_loop(&ked, ale->key_data, NULL, sel_cb, NULL);
@@ -161,12 +161,12 @@ static int graphkeys_deselectall_exec(bContext *C, wmOperator *op)
deselect_graph_keys(&ac, 1, SELECT_ADD, TRUE);
/* set notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_SELECTED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_SELECTED, NULL);
return OPERATOR_FINISHED;
}
-void GRAPH_OT_select_all_toggle (wmOperatorType *ot)
+void GRAPH_OT_select_all_toggle(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Select All";
@@ -178,7 +178,7 @@ void GRAPH_OT_select_all_toggle (wmOperatorType *ot)
ot->poll = graphop_visible_keyframes_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
+ ot->flag = OPTYPE_REGISTER /*|OPTYPE_UNDO*/;
/* props */
ot->prop = RNA_def_boolean(ot->srna, "invert", 0, "Invert", "");
@@ -186,7 +186,7 @@ void GRAPH_OT_select_all_toggle (wmOperatorType *ot)
/* ******************** Border Select Operator **************************** */
/* This operator currently works in one of three ways:
- * -> BKEY - 1) all keyframes within region are selected (validation with BEZT_OK_REGION)
+ * -> BKEY - 1) all keyframes within region are selected (validation with BEZT_OK_REGION)
* -> ALT-BKEY - depending on which axis of the region was larger...
* -> 2) x-axis, so select all frames within frame range (validation with BEZT_OK_FRAMERANGE)
* -> 3) y-axis, so select all frames within channels that region included (validation with BEZT_OK_VALUERANGE)
@@ -197,16 +197,16 @@ void GRAPH_OT_select_all_toggle (wmOperatorType *ot)
* this, and allow handles to be considered independently too.
* Also, for convenience, handles should get same status as keyframe (if it was within bounds).
*/
-static void borderselect_graphkeys (bAnimContext *ac, rcti rect, short mode, short selectmode, short incl_handles)
+static void borderselect_graphkeys(bAnimContext *ac, rcti rect, short mode, short selectmode, short incl_handles)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter, mapping_flag;
- SpaceIpo *sipo= (SpaceIpo *)ac->sl;
+ SpaceIpo *sipo = (SpaceIpo *)ac->sl;
KeyframeEditData ked;
KeyframeEditFunc ok_cb, select_cb;
- View2D *v2d= &ac->ar->v2d;
+ View2D *v2d = &ac->ar->v2d;
rctf rectf;
/* convert mouse coordinates to frame ranges and channel coordinates corrected for view pan/zoom */
@@ -214,29 +214,29 @@ static void borderselect_graphkeys (bAnimContext *ac, rcti rect, short mode, sho
UI_view2d_region_to_view(v2d, rect.xmax, rect.ymax, &rectf.xmax, &rectf.ymax);
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* get beztriple editing/validation funcs */
- select_cb= ANIM_editkeyframes_select(selectmode);
- ok_cb= ANIM_editkeyframes_ok(mode);
+ select_cb = ANIM_editkeyframes_select(selectmode);
+ ok_cb = ANIM_editkeyframes_ok(mode);
/* init editing data */
memset(&ked, 0, sizeof(KeyframeEditData));
- ked.data= &rectf;
+ ked.data = &rectf;
/* treat handles separately? */
if (incl_handles) {
ked.iterflags |= KEYFRAME_ITER_INCL_HANDLES;
- mapping_flag= 0;
+ mapping_flag = 0;
}
else
- mapping_flag= ANIM_UNITCONV_ONLYKEYS;
+ mapping_flag = ANIM_UNITCONV_ONLYKEYS;
/* loop over data, doing border select */
- for (ale= anim_data.first; ale; ale= ale->next) {
- AnimData *adt= ANIM_nla_mapping_get(ac, ale);
- FCurve *fcu= (FCurve *)ale->key_data;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ AnimData *adt = ANIM_nla_mapping_get(ac, ale);
+ FCurve *fcu = (FCurve *)ale->key_data;
/* apply unit corrections */
ANIM_unit_mapping_apply_fcurve(ac->scene, ale->id, ale->key_data, mapping_flag);
@@ -245,19 +245,19 @@ static void borderselect_graphkeys (bAnimContext *ac, rcti rect, short mode, sho
* guess when a callback might use something different
*/
if (adt)
- ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, incl_handles==0);
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, incl_handles == 0);
/* set horizontal range (if applicable)
* NOTE: these values are only used for x-range and y-range but not region
- * (which uses ked.data, i.e. rectf)
+ * (which uses ked.data, i.e. rectf)
*/
if (mode != BEZT_OK_VALUERANGE) {
- ked.f1= rectf.xmin;
- ked.f2= rectf.xmax;
+ ked.f1 = rectf.xmin;
+ ked.f2 = rectf.xmax;
}
else {
- ked.f1= rectf.ymin;
- ked.f2= rectf.ymax;
+ ked.f1 = rectf.ymin;
+ ked.f2 = rectf.ymax;
}
/* firstly, check if any keyframes will be hit by this */
@@ -275,10 +275,10 @@ static void borderselect_graphkeys (bAnimContext *ac, rcti rect, short mode, sho
/* un-apply NLA mapping from all the keyframes */
if (adt)
- ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, incl_handles==0);
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, incl_handles == 0);
/* unapply unit corrections */
- ANIM_unit_mapping_apply_fcurve(ac->scene, ale->id, ale->key_data, ANIM_UNITCONV_RESTORE|mapping_flag);
+ ANIM_unit_mapping_apply_fcurve(ac->scene, ale->id, ale->key_data, ANIM_UNITCONV_RESTORE | mapping_flag);
}
/* cleanup */
@@ -291,7 +291,7 @@ static int graphkeys_borderselect_exec(bContext *C, wmOperator *op)
{
bAnimContext ac;
rcti rect;
- short mode=0, selectmode=0;
+ short mode = 0, selectmode = 0;
short incl_handles;
int extend;
@@ -300,7 +300,7 @@ static int graphkeys_borderselect_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* clear all selection if not extending selection */
- extend= RNA_boolean_get(op->ptr, "extend");
+ extend = RNA_boolean_get(op->ptr, "extend");
if (!extend)
deselect_graph_keys(&ac, 1, SELECT_SUBTRACT, TRUE);
@@ -308,10 +308,10 @@ static int graphkeys_borderselect_exec(bContext *C, wmOperator *op)
* - 'gesture_mode' from the operator specifies how to select
* - 'include_handles' from the operator specifies whether to include handles in the selection
*/
- if (RNA_int_get(op->ptr, "gesture_mode")==GESTURE_MODAL_SELECT)
- selectmode= SELECT_ADD;
+ if (RNA_int_get(op->ptr, "gesture_mode") == GESTURE_MODAL_SELECT)
+ selectmode = SELECT_ADD;
else
- selectmode= SELECT_SUBTRACT;
+ selectmode = SELECT_SUBTRACT;
incl_handles = RNA_boolean_get(op->ptr, "include_handles");
@@ -329,18 +329,18 @@ static int graphkeys_borderselect_exec(bContext *C, wmOperator *op)
* used for tweaking timing when "blocking", while channels is not that useful...
*/
if ((rect.xmax - rect.xmin) >= (rect.ymax - rect.ymin))
- mode= BEZT_OK_FRAMERANGE;
+ mode = BEZT_OK_FRAMERANGE;
else
- mode= BEZT_OK_VALUERANGE;
+ mode = BEZT_OK_VALUERANGE;
}
else
- mode= BEZT_OK_REGION;
+ mode = BEZT_OK_REGION;
/* apply borderselect action */
borderselect_graphkeys(&ac, rect, mode, selectmode, incl_handles);
/* send notifier that keyframe selection has changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_SELECTED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_SELECTED, NULL);
return OPERATOR_FINISHED;
}
@@ -361,7 +361,7 @@ void GRAPH_OT_select_border(wmOperatorType *ot)
ot->poll = graphop_visible_keyframes_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
+ ot->flag = OPTYPE_REGISTER /*|OPTYPE_UNDO*/;
/* rna */
WM_operator_properties_gesture_border(ot, TRUE);
@@ -392,14 +392,14 @@ static EnumPropertyItem prop_column_select_types[] = {
/* Selects all visible keyframes between the specified markers */
/* TODO, this is almost an _exact_ duplicate of a function of the same name in action_select.c
* should de-duplicate - campbell */
-static void markers_selectkeys_between (bAnimContext *ac)
+static void markers_selectkeys_between(bAnimContext *ac)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
KeyframeEditFunc ok_cb, select_cb;
- KeyframeEditData ked= {{NULL}};
+ KeyframeEditData ked = {{NULL}};
float min, max;
/* get extreme markers */
@@ -408,19 +408,19 @@ static void markers_selectkeys_between (bAnimContext *ac)
max += 0.5f;
/* get editing funcs + data */
- ok_cb= ANIM_editkeyframes_ok(BEZT_OK_FRAMERANGE);
- select_cb= ANIM_editkeyframes_select(SELECT_ADD);
+ ok_cb = ANIM_editkeyframes_ok(BEZT_OK_FRAMERANGE);
+ select_cb = ANIM_editkeyframes_select(SELECT_ADD);
- ked.f1= min;
- ked.f2= max;
+ ked.f1 = min;
+ ked.f2 = max;
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* select keys in-between */
- for (ale= anim_data.first; ale; ale= ale->next) {
- AnimData *adt= ANIM_nla_mapping_get(ac, ale);
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ AnimData *adt = ANIM_nla_mapping_get(ac, ale);
if (adt) {
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
@@ -438,13 +438,13 @@ static void markers_selectkeys_between (bAnimContext *ac)
/* Selects all visible keyframes in the same frames as the specified elements */
-static void columnselect_graph_keys (bAnimContext *ac, short mode)
+static void columnselect_graph_keys(bAnimContext *ac, short mode)
{
- ListBase anim_data= {NULL, NULL};
+ ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
- Scene *scene= ac->scene;
+ Scene *scene = ac->scene;
CfraElem *ce;
KeyframeEditFunc select_cb, ok_cb;
KeyframeEditData ked;
@@ -455,10 +455,10 @@ static void columnselect_graph_keys (bAnimContext *ac, short mode)
/* build list of columns */
switch (mode) {
case GRAPHKEYS_COLUMNSEL_KEYS: /* list of selected keys */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
- for (ale= anim_data.first; ale; ale= ale->next)
+ for (ale = anim_data.first; ale; ale = ale->next)
ANIM_fcurve_keyframes_loop(&ked, ale->key_data, NULL, bezt_to_cfraelem, NULL);
BLI_freelistN(&anim_data);
@@ -466,10 +466,10 @@ static void columnselect_graph_keys (bAnimContext *ac, short mode)
case GRAPHKEYS_COLUMNSEL_CFRA: /* current frame */
/* make a single CfraElem for storing this */
- ce= MEM_callocN(sizeof(CfraElem), "cfraElem");
+ ce = MEM_callocN(sizeof(CfraElem), "cfraElem");
BLI_addtail(&ked.list, ce);
- ce->cfra= (float)CFRA;
+ ce->cfra = (float)CFRA;
break;
case GRAPHKEYS_COLUMNSEL_MARKERS_COLUMN: /* list of selected markers */
@@ -481,24 +481,24 @@ static void columnselect_graph_keys (bAnimContext *ac, short mode)
}
/* set up BezTriple edit callbacks */
- select_cb= ANIM_editkeyframes_select(SELECT_ADD);
- ok_cb= ANIM_editkeyframes_ok(BEZT_OK_FRAME);
+ select_cb = ANIM_editkeyframes_select(SELECT_ADD);
+ ok_cb = ANIM_editkeyframes_ok(BEZT_OK_FRAME);
/* loop through all of the keys and select additional keyframes
* based on the keys found to be selected above
*/
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
- for (ale= anim_data.first; ale; ale= ale->next) {
- AnimData *adt= ANIM_nla_mapping_get(ac, ale);
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ AnimData *adt = ANIM_nla_mapping_get(ac, ale);
/* loop over cfraelems (stored in the KeyframeEditData->list)
* - we need to do this here, as we can apply fewer NLA-mapping conversions
*/
- for (ce= ked.list.first; ce; ce= ce->next) {
+ for (ce = ked.list.first; ce; ce = ce->next) {
/* set frame for validation callback to refer to */
- ked.f1= BKE_nla_tweakedit_remap(adt, ce->cfra, NLATIME_CONVERT_UNMAP);
+ ked.f1 = BKE_nla_tweakedit_remap(adt, ce->cfra, NLATIME_CONVERT_UNMAP);
/* select elements with frame number matching cfraelem */
ANIM_fcurve_keyframes_loop(&ked, ale->key_data, ok_cb, select_cb, NULL);
@@ -522,7 +522,7 @@ static int graphkeys_columnselect_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* action to take depends on the mode */
- mode= RNA_enum_get(op->ptr, "mode");
+ mode = RNA_enum_get(op->ptr, "mode");
if (mode == GRAPHKEYS_COLUMNSEL_MARKERS_BETWEEN)
markers_selectkeys_between(&ac);
@@ -530,12 +530,12 @@ static int graphkeys_columnselect_exec(bContext *C, wmOperator *op)
columnselect_graph_keys(&ac, mode);
/* set notifier that keyframe selection has changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_SELECTED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_SELECTED, NULL);
return OPERATOR_FINISHED;
}
-void GRAPH_OT_select_column (wmOperatorType *ot)
+void GRAPH_OT_select_column(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Select All";
@@ -547,7 +547,7 @@ void GRAPH_OT_select_column (wmOperatorType *ot)
ot->poll = graphop_visible_keyframes_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
+ ot->flag = OPTYPE_REGISTER /*|OPTYPE_UNDO*/;
/* props */
ot->prop = RNA_def_enum(ot->srna, "mode", prop_column_select_types, 0, "Mode", "");
@@ -555,11 +555,11 @@ void GRAPH_OT_select_column (wmOperatorType *ot)
/* ******************** Select Linked Operator *********************** */
-static int graphkeys_select_linked_exec (bContext *C, wmOperator *UNUSED(op))
+static int graphkeys_select_linked_exec(bContext *C, wmOperator *UNUSED(op))
{
bAnimContext ac;
- ListBase anim_data= {NULL, NULL};
+ ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
@@ -571,11 +571,11 @@ static int graphkeys_select_linked_exec (bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
/* loop through all of the keys and select additional keyframes based on these */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
- for (ale= anim_data.first; ale; ale= ale->next) {
- FCurve *fcu= (FCurve *)ale->key_data;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ FCurve *fcu = (FCurve *)ale->key_data;
/* check if anything selected? */
if (ANIM_fcurve_keyframes_loop(NULL, fcu, NULL, ok_cb, NULL)) {
@@ -588,12 +588,12 @@ static int graphkeys_select_linked_exec (bContext *C, wmOperator *UNUSED(op))
BLI_freelistN(&anim_data);
/* set notifier that keyframe selection has changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_SELECTED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_SELECTED, NULL);
return OPERATOR_FINISHED;
}
-void GRAPH_OT_select_linked (wmOperatorType *ot)
+void GRAPH_OT_select_linked(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Select Linked";
@@ -605,15 +605,15 @@ void GRAPH_OT_select_linked (wmOperatorType *ot)
ot->poll = graphop_visible_keyframes_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
+ ot->flag = OPTYPE_REGISTER /*|OPTYPE_UNDO*/;
}
/* ******************** Select More/Less Operators *********************** */
/* Common code to perform selection */
-static void select_moreless_graph_keys (bAnimContext *ac, short mode)
+static void select_moreless_graph_keys(bAnimContext *ac, short mode)
{
- ListBase anim_data= {NULL, NULL};
+ ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
@@ -622,22 +622,22 @@ static void select_moreless_graph_keys (bAnimContext *ac, short mode)
/* init selmap building data */
- build_cb= ANIM_editkeyframes_buildselmap(mode);
+ build_cb = ANIM_editkeyframes_buildselmap(mode);
memset(&ked, 0, sizeof(KeyframeEditData));
/* loop through all of the keys and select additional keyframes based on these */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
- for (ale= anim_data.first; ale; ale= ale->next) {
- FCurve *fcu= (FCurve *)ale->key_data;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ FCurve *fcu = (FCurve *)ale->key_data;
/* only continue if F-Curve has keyframes */
if (fcu->bezt == NULL)
continue;
/* build up map of whether F-Curve's keyframes should be selected or not */
- ked.data= MEM_callocN(fcu->totvert, "selmap graphEdit");
+ ked.data = MEM_callocN(fcu->totvert, "selmap graphEdit");
ANIM_fcurve_keyframes_loop(&ked, fcu, NULL, build_cb, NULL);
/* based on this map, adjust the selection status of the keyframes */
@@ -645,7 +645,7 @@ static void select_moreless_graph_keys (bAnimContext *ac, short mode)
/* free the selmap used here */
MEM_freeN(ked.data);
- ked.data= NULL;
+ ked.data = NULL;
}
/* Cleanup */
@@ -654,7 +654,7 @@ static void select_moreless_graph_keys (bAnimContext *ac, short mode)
/* ----------------- */
-static int graphkeys_select_more_exec (bContext *C, wmOperator *UNUSED(op))
+static int graphkeys_select_more_exec(bContext *C, wmOperator *UNUSED(op))
{
bAnimContext ac;
@@ -666,12 +666,12 @@ static int graphkeys_select_more_exec (bContext *C, wmOperator *UNUSED(op))
select_moreless_graph_keys(&ac, SELMAP_MORE);
/* set notifier that keyframe selection has changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_SELECTED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_SELECTED, NULL);
return OPERATOR_FINISHED;
}
-void GRAPH_OT_select_more (wmOperatorType *ot)
+void GRAPH_OT_select_more(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Select More";
@@ -683,12 +683,12 @@ void GRAPH_OT_select_more (wmOperatorType *ot)
ot->poll = graphop_visible_keyframes_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
+ ot->flag = OPTYPE_REGISTER /*|OPTYPE_UNDO*/;
}
/* ----------------- */
-static int graphkeys_select_less_exec (bContext *C, wmOperator *UNUSED(op))
+static int graphkeys_select_less_exec(bContext *C, wmOperator *UNUSED(op))
{
bAnimContext ac;
@@ -700,12 +700,12 @@ static int graphkeys_select_less_exec (bContext *C, wmOperator *UNUSED(op))
select_moreless_graph_keys(&ac, SELMAP_LESS);
/* set notifier that keyframe selection has changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_SELECTED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_SELECTED, NULL);
return OPERATOR_FINISHED;
}
-void GRAPH_OT_select_less (wmOperatorType *ot)
+void GRAPH_OT_select_less(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Select Less";
@@ -717,7 +717,7 @@ void GRAPH_OT_select_less (wmOperatorType *ot)
ot->poll = graphop_visible_keyframes_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
+ ot->flag = OPTYPE_REGISTER /*|OPTYPE_UNDO*/;
}
/* ******************** Select Left/Right Operator ************************* */
@@ -733,19 +733,19 @@ static EnumPropertyItem prop_graphkeys_leftright_select_types[] = {
/* --------------------------------- */
-static void graphkeys_select_leftright (bAnimContext *ac, short leftright, short select_mode)
+static void graphkeys_select_leftright(bAnimContext *ac, short leftright, short select_mode)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
KeyframeEditFunc ok_cb, select_cb;
- KeyframeEditData ked= {{NULL}};
- Scene *scene= ac->scene;
+ KeyframeEditData ked = {{NULL}};
+ Scene *scene = ac->scene;
/* if select mode is replace, deselect all keyframes (and channels) first */
- if (select_mode==SELECT_REPLACE) {
- select_mode= SELECT_ADD;
+ if (select_mode == SELECT_REPLACE) {
+ select_mode = SELECT_ADD;
/* - deselect all other keyframes, so that just the newly selected remain
* - channels aren't deselected, since we don't re-select any as a consequence
@@ -754,8 +754,8 @@ static void graphkeys_select_leftright (bAnimContext *ac, short leftright, short
}
/* set callbacks and editing data */
- ok_cb= ANIM_editkeyframes_ok(BEZT_OK_FRAMERANGE);
- select_cb= ANIM_editkeyframes_select(select_mode);
+ ok_cb = ANIM_editkeyframes_ok(BEZT_OK_FRAMERANGE);
+ select_cb = ANIM_editkeyframes_select(select_mode);
if (leftright == GRAPHKEYS_LRSEL_LEFT) {
ked.f1 = MINAFRAMEF;
@@ -767,12 +767,12 @@ static void graphkeys_select_leftright (bAnimContext *ac, short leftright, short
}
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* select keys */
- for (ale= anim_data.first; ale; ale= ale->next) {
- AnimData *adt= ANIM_nla_mapping_get(ac, ale);
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ AnimData *adt = ANIM_nla_mapping_get(ac, ale);
if (adt) {
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
@@ -789,7 +789,7 @@ static void graphkeys_select_leftright (bAnimContext *ac, short leftright, short
/* ----------------- */
-static int graphkeys_select_leftright_exec (bContext *C, wmOperator *op)
+static int graphkeys_select_leftright_exec(bContext *C, wmOperator *op)
{
bAnimContext ac;
short leftright = RNA_enum_get(op->ptr, "mode");
@@ -801,9 +801,9 @@ static int graphkeys_select_leftright_exec (bContext *C, wmOperator *op)
/* select mode is either replace (deselect all, then add) or add/extend */
if (RNA_boolean_get(op->ptr, "extend"))
- selectmode= SELECT_INVERT;
+ selectmode = SELECT_INVERT;
else
- selectmode= SELECT_REPLACE;
+ selectmode = SELECT_REPLACE;
/* if "test" mode is set, we don't have any info to set this with */
if (leftright == GRAPHKEYS_LRSEL_TEST)
@@ -813,12 +813,12 @@ static int graphkeys_select_leftright_exec (bContext *C, wmOperator *op)
graphkeys_select_leftright(&ac, leftright, selectmode);
/* set notifier that keyframe selection (and channels too) have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|ND_ANIMCHAN|NA_SELECTED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | ND_ANIMCHAN | NA_SELECTED, NULL);
return OPERATOR_FINISHED;
}
-static int graphkeys_select_leftright_invoke (bContext *C, wmOperator *op, wmEvent *event)
+static int graphkeys_select_leftright_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
bAnimContext ac;
short leftright = RNA_enum_get(op->ptr, "mode");
@@ -829,9 +829,9 @@ static int graphkeys_select_leftright_invoke (bContext *C, wmOperator *op, wmEve
/* handle mode-based testing */
if (leftright == GRAPHKEYS_LRSEL_TEST) {
- Scene *scene= ac.scene;
- ARegion *ar= ac.ar;
- View2D *v2d= &ar->v2d;
+ Scene *scene = ac.scene;
+ ARegion *ar = ac.ar;
+ View2D *v2d = &ar->v2d;
float x;
/* determine which side of the current frame mouse is on */
@@ -846,7 +846,7 @@ static int graphkeys_select_leftright_invoke (bContext *C, wmOperator *op, wmEve
return graphkeys_select_leftright_exec(C, op);
}
-void GRAPH_OT_select_leftright (wmOperatorType *ot)
+void GRAPH_OT_select_leftright(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Select Left/Right";
@@ -854,12 +854,12 @@ void GRAPH_OT_select_leftright (wmOperatorType *ot)
ot->description = "Select keyframes to the left or the right of the current frame";
/* api callbacks */
- ot->invoke= graphkeys_select_leftright_invoke;
+ ot->invoke = graphkeys_select_leftright_invoke;
ot->exec = graphkeys_select_leftright_exec;
ot->poll = graphop_visible_keyframes_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* id-props */
ot->prop = RNA_def_enum(ot->srna, "mode", prop_graphkeys_leftright_select_types, GRAPHKEYS_LRSEL_TEST, "Mode", "");
@@ -880,26 +880,26 @@ void GRAPH_OT_select_leftright (wmOperatorType *ot)
typedef struct tNearestVertInfo {
struct tNearestVertInfo *next, *prev;
- FCurve *fcu; /* F-Curve that keyframe comes from */
+ FCurve *fcu; /* F-Curve that keyframe comes from */
- BezTriple *bezt; /* keyframe to consider */
- FPoint *fpt; /* sample point to consider */
+ BezTriple *bezt; /* keyframe to consider */
+ FPoint *fpt; /* sample point to consider */
- short hpoint; /* the handle index that we hit (eHandleIndex) */
- short sel; /* whether the handle is selected or not */
- int dist; /* distance from mouse to vert */
+ short hpoint; /* the handle index that we hit (eHandleIndex) */
+ short sel; /* whether the handle is selected or not */
+ int dist; /* distance from mouse to vert */
} tNearestVertInfo;
/* Tags for the type of graph vert that we have */
typedef enum eGraphVertIndex {
- NEAREST_HANDLE_LEFT = -1,
+ NEAREST_HANDLE_LEFT = -1,
NEAREST_HANDLE_KEY,
NEAREST_HANDLE_RIGHT
} 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?
-#define GVERTSEL_TOL 10
+#define GVERTSEL_TOL 10
/* ....... */
@@ -908,13 +908,13 @@ typedef enum eGraphVertIndex {
static int fcurve_handle_sel_check(SpaceIpo *sipo, BezTriple *bezt)
{
if (sipo->flag & SIPO_NOHANDLES) return 0;
- if ((sipo->flag & SIPO_SELVHANDLESONLY) && BEZSELECTED(bezt)==0) return 0;
+ if ((sipo->flag & SIPO_SELVHANDLESONLY) && BEZSELECTED(bezt) == 0) return 0;
return 1;
}
/* check if the given vertex is within bounds or not */
// TODO: should we return if we hit something?
-static void nearest_fcurve_vert_store (ListBase *matches, View2D *v2d, FCurve *fcu, BezTriple *bezt, FPoint *fpt, short hpoint, const int mval[2])
+static void nearest_fcurve_vert_store(ListBase *matches, View2D *v2d, FCurve *fcu, BezTriple *bezt, FPoint *fpt, short hpoint, const int mval[2])
{
/* Keyframes or Samples? */
if (bezt) {
@@ -922,16 +922,16 @@ static void nearest_fcurve_vert_store (ListBase *matches, View2D *v2d, FCurve *f
/* convert from data-space to screen coordinates
* NOTE: hpoint+1 gives us 0,1,2 respectively for each handle,
- * needed to access the relevant vertex coordinates in the 3x3
- * 'vec' matrix
+ * needed to access the relevant vertex coordinates in the 3x3
+ * 'vec' matrix
*/
- UI_view2d_view_to_region(v2d, bezt->vec[hpoint+1][0], bezt->vec[hpoint+1][1], &screen_co[0], &screen_co[1]);
+ UI_view2d_view_to_region(v2d, bezt->vec[hpoint + 1][0], bezt->vec[hpoint + 1][1], &screen_co[0], &screen_co[1]);
/* check if distance from mouse cursor to vert in screen space is within tolerance */
- // XXX: inlined distance calculation, since we cannot do this on ints using the math lib...
+ // XXX: inlined distance calculation, since we cannot do this on ints using the math lib...
//dist = len_v2v2(mval, screen_co);
- dist = sqrt((mval[0] - screen_co[0])*(mval[0] - screen_co[0]) +
- (mval[1] - screen_co[1])*(mval[1] - screen_co[1]));
+ dist = sqrt((mval[0] - screen_co[0]) * (mval[0] - screen_co[0]) +
+ (mval[1] - screen_co[1]) * (mval[1] - screen_co[1]));
if (dist <= GVERTSEL_TOL) {
tNearestVertInfo *nvi = (tNearestVertInfo *)matches->last;
@@ -941,7 +941,7 @@ static void nearest_fcurve_vert_store (ListBase *matches, View2D *v2d, FCurve *f
if ((nvi) && (nvi->fcu == fcu)) {
/* replace if we are closer, or if equal and that one wasn't selected but we are... */
if ( (nvi->dist > dist) || ((nvi->sel == 0) && BEZSELECTED(bezt)) )
- replace= 1;
+ replace = 1;
}
/* add new if not replacing... */
if (replace == 0)
@@ -953,7 +953,7 @@ static void nearest_fcurve_vert_store (ListBase *matches, View2D *v2d, FCurve *f
nvi->hpoint = hpoint;
nvi->dist = dist;
- nvi->sel= BEZSELECTED(bezt); // XXX... should this use the individual verts instead?
+ nvi->sel = BEZSELECTED(bezt); // XXX... should this use the individual verts instead?
/* add to list of matches if appropriate... */
if (replace == 0)
@@ -966,27 +966,27 @@ static void nearest_fcurve_vert_store (ListBase *matches, View2D *v2d, FCurve *f
}
/* helper for find_nearest_fcurve_vert() - build the list of nearest matches */
-static void get_nearest_fcurve_verts_list (bAnimContext *ac, const int mval[2], ListBase *matches)
+static void get_nearest_fcurve_verts_list(bAnimContext *ac, const int mval[2], ListBase *matches)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
- SpaceIpo *sipo= (SpaceIpo *)ac->sl;
- View2D *v2d= &ac->ar->v2d;
+ SpaceIpo *sipo = (SpaceIpo *)ac->sl;
+ View2D *v2d = &ac->ar->v2d;
/* get curves to search through
* - if the option to only show keyframes that belong to selected F-Curves is enabled,
* include the 'only selected' flag...
*/
- 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...
+ 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...
filter |= ANIMFILTER_SEL;
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
- for (ale= anim_data.first; ale; ale= ale->next) {
- FCurve *fcu= (FCurve *)ale->key_data;
- AnimData *adt= ANIM_nla_mapping_get(ac, ale);
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ FCurve *fcu = (FCurve *)ale->key_data;
+ AnimData *adt = ANIM_nla_mapping_get(ac, ale);
/* apply unit corrections */
ANIM_unit_mapping_apply_fcurve(ac->scene, ale->id, ale->key_data, 0);
@@ -996,17 +996,17 @@ static void get_nearest_fcurve_verts_list (bAnimContext *ac, const int mval[2],
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 0);
if (fcu->bezt) {
- BezTriple *bezt1=fcu->bezt, *prevbezt=NULL;
+ BezTriple *bezt1 = fcu->bezt, *prevbezt = NULL;
int i;
- for (i=0; i < fcu->totvert; i++, prevbezt=bezt1, bezt1++) {
+ for (i = 0; i < fcu->totvert; i++, prevbezt = bezt1, bezt1++) {
/* keyframe */
nearest_fcurve_vert_store(matches, v2d, fcu, bezt1, NULL, NEAREST_HANDLE_KEY, mval);
/* handles - only do them if they're visible */
if (fcurve_handle_sel_check(sipo, bezt1) && (fcu->totvert > 1)) {
/* first handle only visible if previous segment had handles */
- if ((!prevbezt && (bezt1->ipo==BEZT_IPO_BEZ)) || (prevbezt && (prevbezt->ipo==BEZT_IPO_BEZ))) {
+ if ((!prevbezt && (bezt1->ipo == BEZT_IPO_BEZ)) || (prevbezt && (prevbezt->ipo == BEZT_IPO_BEZ))) {
nearest_fcurve_vert_store(matches, v2d, fcu, bezt1, NULL, NEAREST_HANDLE_LEFT, mval);
}
@@ -1035,7 +1035,7 @@ static void get_nearest_fcurve_verts_list (bAnimContext *ac, const int mval[2],
}
/* helper for find_nearest_fcurve_vert() - get the best match to use */
-static tNearestVertInfo *get_best_nearest_fcurve_vert (ListBase *matches)
+static tNearestVertInfo *get_best_nearest_fcurve_vert(ListBase *matches)
{
tNearestVertInfo *nvi = NULL;
short found = 0;
@@ -1047,7 +1047,7 @@ static tNearestVertInfo *get_best_nearest_fcurve_vert (ListBase *matches)
/* if list only has 1 item, remove it from the list and return */
if (matches->first == matches->last) {
/* need to remove from the list, otherwise it gets freed and then we can't return it */
- nvi= matches->first;
+ nvi = matches->first;
BLI_remlink(matches, nvi);
return nvi;
@@ -1066,7 +1066,7 @@ static tNearestVertInfo *get_best_nearest_fcurve_vert (ListBase *matches)
else {
/* if vert is selected, we've got what we want... */
if (nvi->sel)
- found= 1;
+ found = 1;
}
}
@@ -1081,7 +1081,7 @@ static tNearestVertInfo *get_best_nearest_fcurve_vert (ListBase *matches)
/* Find the nearest vertices (either a handle or the keyframe) that are nearest to the mouse cursor (in area coordinates)
* NOTE: the match info found must still be freed
*/
-static tNearestVertInfo *find_nearest_fcurve_vert (bAnimContext *ac, const int mval[2])
+static tNearestVertInfo *find_nearest_fcurve_vert(bAnimContext *ac, const int mval[2])
{
ListBase matches = {NULL, NULL};
tNearestVertInfo *nvi;
@@ -1090,7 +1090,7 @@ static tNearestVertInfo *find_nearest_fcurve_vert (bAnimContext *ac, const int m
get_nearest_fcurve_verts_list(ac, mval, &matches);
/* step 2: find the best vert */
- nvi= get_best_nearest_fcurve_vert(&matches);
+ nvi = get_best_nearest_fcurve_vert(&matches);
BLI_freelistN(&matches);
@@ -1101,11 +1101,11 @@ static tNearestVertInfo *find_nearest_fcurve_vert (bAnimContext *ac, const int m
/* ------------------- */
/* option 1) select keyframe directly under mouse */
-static void mouse_graph_keys (bAnimContext *ac, const int mval[2], short select_mode, short curves_only)
+static void mouse_graph_keys(bAnimContext *ac, const int mval[2], short select_mode, short curves_only)
{
- SpaceIpo *sipo= (SpaceIpo *)ac->sl;
+ SpaceIpo *sipo = (SpaceIpo *)ac->sl;
tNearestVertInfo *nvi;
- BezTriple *bezt= NULL;
+ BezTriple *bezt = NULL;
/* find the beztriple that we're selecting, and the handle that was clicked on */
nvi = find_nearest_fcurve_vert(ac, mval);
@@ -1117,7 +1117,7 @@ static void mouse_graph_keys (bAnimContext *ac, const int mval[2], short select_
/* deselect all other curves? */
if (select_mode == SELECT_REPLACE) {
/* reset selection mode */
- select_mode= SELECT_ADD;
+ select_mode = SELECT_ADD;
/* deselect all other keyframes (+ F-Curves too) */
deselect_graph_keys(ac, 0, SELECT_SUBTRACT, TRUE);
@@ -1132,10 +1132,10 @@ static void mouse_graph_keys (bAnimContext *ac, const int mval[2], short select_
/* if points can be selected on this F-Curve */
// TODO: what about those with no keyframes?
- if ((curves_only == 0) && ((nvi->fcu->flag & FCURVE_PROTECTED)==0)) {
+ if ((curves_only == 0) && ((nvi->fcu->flag & FCURVE_PROTECTED) == 0)) {
/* only if there's keyframe */
if (nvi->bezt) {
- bezt= nvi->bezt; /* used to check bezt seletion is set */
+ bezt = nvi->bezt; /* used to check bezt seletion is set */
/* depends on selection mode */
if (select_mode == SELECT_INVERT) {
/* keyframe - invert select of all */
@@ -1182,7 +1182,7 @@ static void mouse_graph_keys (bAnimContext *ac, const int mval[2], short select_
memset(&ked, 0, sizeof(KeyframeEditData));
/* set up BezTriple edit callbacks */
- select_cb= ANIM_editkeyframes_select(select_mode);
+ select_cb = ANIM_editkeyframes_select(select_mode);
/* select all keyframes */
ANIM_fcurve_keyframes_loop(&ked, nvi->fcu, NULL, select_cb, NULL);
@@ -1212,7 +1212,7 @@ static void mouse_graph_keys (bAnimContext *ac, const int mval[2], short select_
/* set active F-Curve (NOTE: sync the filter flags with findnearest_fcurve_vert) */
/* needs to be called with (sipo->flag & SIPO_SELCUVERTSONLY) otherwise the active flag won't be set [#26452] */
if (nvi->fcu->flag & FCURVE_SELECTED) {
- int filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS);
+ int filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS);
ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, nvi->fcu, ANIMTYPE_FCURVE);
}
@@ -1224,9 +1224,9 @@ static void mouse_graph_keys (bAnimContext *ac, const int mval[2], short select_
/* (see graphkeys_select_leftright) */
/* Option 3) Selects all visible keyframes in the same frame as the mouse click */
-static void graphkeys_mselect_column (bAnimContext *ac, const int mval[2], short select_mode)
+static void graphkeys_mselect_column(bAnimContext *ac, const int mval[2], short select_mode)
{
- ListBase anim_data= {NULL, NULL};
+ ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
@@ -1245,14 +1245,14 @@ static void graphkeys_mselect_column (bAnimContext *ac, const int mval[2], short
/* get frame number on which elements should be selected */
// TODO: should we restrict to integer frames only?
if (nvi->bezt)
- selx= nvi->bezt->vec[1][0];
+ selx = nvi->bezt->vec[1][0];
else if (nvi->fpt)
- selx= nvi->fpt->vec[0];
+ selx = nvi->fpt->vec[0];
/* if select mode is replace, deselect all keyframes first */
- if (select_mode==SELECT_REPLACE) {
+ if (select_mode == SELECT_REPLACE) {
/* reset selection mode to add to selection */
- select_mode= SELECT_ADD;
+ select_mode = SELECT_ADD;
/* - deselect all other keyframes, so that just the newly selected remain
* - channels aren't deselected, since we don't re-select any as a consequence
@@ -1264,23 +1264,23 @@ static void graphkeys_mselect_column (bAnimContext *ac, const int mval[2], short
memset(&ked, 0, sizeof(KeyframeEditData));
/* set up BezTriple edit callbacks */
- select_cb= ANIM_editkeyframes_select(select_mode);
- ok_cb= ANIM_editkeyframes_ok(BEZT_OK_FRAME);
+ select_cb = ANIM_editkeyframes_select(select_mode);
+ ok_cb = ANIM_editkeyframes_ok(BEZT_OK_FRAME);
/* loop through all of the keys and select additional keyframes
* based on the keys found to be selected above
*/
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
- for (ale= anim_data.first; ale; ale= ale->next) {
- AnimData *adt= ANIM_nla_mapping_get(ac, ale);
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ AnimData *adt = ANIM_nla_mapping_get(ac, ale);
/* set frame for validation callback to refer to */
if (adt)
- ked.f1= BKE_nla_tweakedit_remap(adt, selx, NLATIME_CONVERT_UNMAP);
+ ked.f1 = BKE_nla_tweakedit_remap(adt, selx, NLATIME_CONVERT_UNMAP);
else
- ked.f1= selx;
+ ked.f1 = selx;
/* select elements with frame number matching cfra */
ANIM_fcurve_keyframes_loop(&ked, ale->key_data, ok_cb, select_cb, NULL);
@@ -1306,9 +1306,9 @@ static int graphkeys_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *ev
/* select mode is either replace (deselect all, then add) or add/extend */
if (RNA_boolean_get(op->ptr, "extend"))
- selectmode= SELECT_INVERT;
+ selectmode = SELECT_INVERT;
else
- selectmode= SELECT_REPLACE;
+ selectmode = SELECT_REPLACE;
/* figure out action to take */
if (RNA_boolean_get(op->ptr, "column")) {
@@ -1325,13 +1325,13 @@ static int graphkeys_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *ev
}
/* set notifier that keyframe selection (and also channel selection in some cases) has changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|ND_ANIMCHAN|NA_SELECTED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | ND_ANIMCHAN | NA_SELECTED, NULL);
/* for tweak grab to work */
- return OPERATOR_FINISHED|OPERATOR_PASS_THROUGH;
+ return OPERATOR_FINISHED | OPERATOR_PASS_THROUGH;
}
-void GRAPH_OT_clickselect (wmOperatorType *ot)
+void GRAPH_OT_clickselect(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Mouse Select Keys";
diff --git a/source/blender/editors/space_graph/graph_utils.c b/source/blender/editors/space_graph/graph_utils.c
index 8c2afe8a242..93dfd3644dd 100644
--- a/source/blender/editors/space_graph/graph_utils.c
+++ b/source/blender/editors/space_graph/graph_utils.c
@@ -54,7 +54,7 @@
#include "ED_anim_api.h"
-#include "graph_intern.h" // own include
+#include "graph_intern.h" // own include
/* ************************************************************** */
/* Active F-Curve */
@@ -65,17 +65,17 @@
*
* NOTE: curve-visible flag isn't included, otherwise selecting a curve via list to edit is too cumbersome
*/
-bAnimListElem *get_active_fcurve_channel (bAnimContext *ac)
+bAnimListElem *get_active_fcurve_channel(bAnimContext *ac)
{
ListBase anim_data = {NULL, NULL};
- int filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_ACTIVE);
+ int filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_ACTIVE);
size_t items = ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* We take the first F-Curve only, since some other ones may have had 'active' flag set
* if they were from linked data.
*/
if (items) {
- bAnimListElem *ale= (bAnimListElem *)anim_data.first;
+ bAnimListElem *ale = (bAnimListElem *)anim_data.first;
/* remove first item from list, then free the rest of the list and return the stored one */
BLI_remlink(&anim_data, ale);
@@ -92,12 +92,12 @@ bAnimListElem *get_active_fcurve_channel (bAnimContext *ac)
/* Operator Polling Callbacks */
/* Check if there are any visible keyframes (for selection tools) */
-int graphop_visible_keyframes_poll (bContext *C)
+int graphop_visible_keyframes_poll(bContext *C)
{
bAnimContext ac;
bAnimListElem *ale;
ListBase anim_data = {NULL, NULL};
- ScrArea *sa= CTX_wm_area(C);
+ ScrArea *sa = CTX_wm_area(C);
size_t items;
int filter;
short found = 0;
@@ -114,13 +114,13 @@ int graphop_visible_keyframes_poll (bContext *C)
/* loop over the visible (selection doesn't matter) F-Curves, and see if they're suitable
* stopping on the first successful match
*/
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE);
items = ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
if (items == 0)
return 0;
- for (ale = anim_data.first; ale; ale= ale->next) {
- FCurve *fcu= (FCurve *)ale->data;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ FCurve *fcu = (FCurve *)ale->data;
/* visible curves for selection must fulfill the following criteria:
* - it has bezier keyframes
@@ -141,12 +141,12 @@ int graphop_visible_keyframes_poll (bContext *C)
}
/* Check if there are any visible + editable keyframes (for editing tools) */
-int graphop_editable_keyframes_poll (bContext *C)
+int graphop_editable_keyframes_poll(bContext *C)
{
bAnimContext ac;
bAnimListElem *ale;
ListBase anim_data = {NULL, NULL};
- ScrArea *sa= CTX_wm_area(C);
+ ScrArea *sa = CTX_wm_area(C);
size_t items;
int filter;
short found = 0;
@@ -163,13 +163,13 @@ int graphop_editable_keyframes_poll (bContext *C)
/* loop over the editable F-Curves, and see if they're suitable
* stopping on the first successful match
*/
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVE_VISIBLE);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVE_VISIBLE);
items = ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
if (items == 0)
return 0;
- for (ale = anim_data.first; ale; ale= ale->next) {
- FCurve *fcu= (FCurve *)ale->data;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ FCurve *fcu = (FCurve *)ale->data;
/* editable curves must fulfill the following criteria:
* - it has bezier keyframes
@@ -191,12 +191,12 @@ int graphop_editable_keyframes_poll (bContext *C)
}
/* has active F-Curve that's editable */
-int graphop_active_fcurve_poll (bContext *C)
+int graphop_active_fcurve_poll(bContext *C)
{
bAnimContext ac;
bAnimListElem *ale;
- ScrArea *sa= CTX_wm_area(C);
- short has_fcurve= 0;
+ ScrArea *sa = CTX_wm_area(C);
+ short has_fcurve = 0;
/* firstly, check if in Graph Editor */
// TODO: also check for region?
@@ -208,15 +208,15 @@ int graphop_active_fcurve_poll (bContext *C)
return 0;
/* try to get the Active F-Curve */
- ale= get_active_fcurve_channel(&ac);
+ ale = get_active_fcurve_channel(&ac);
if (ale == NULL)
return 0;
/* free temp data... */
- has_fcurve= ((ale->data) && (ale->type == ANIMTYPE_FCURVE));
+ has_fcurve = ((ale->data) && (ale->type == ANIMTYPE_FCURVE));
if (has_fcurve) {
- FCurve *fcu= (FCurve *)ale->data;
- has_fcurve= (fcu->flag & FCURVE_VISIBLE)!=0;
+ FCurve *fcu = (FCurve *)ale->data;
+ has_fcurve = (fcu->flag & FCURVE_VISIBLE) != 0;
}
MEM_freeN(ale);
@@ -226,11 +226,11 @@ int graphop_active_fcurve_poll (bContext *C)
}
/* has selected F-Curve that's editable */
-int graphop_selected_fcurve_poll (bContext *C)
+int graphop_selected_fcurve_poll(bContext *C)
{
bAnimContext ac;
ListBase anim_data = {NULL, NULL};
- ScrArea *sa= CTX_wm_area(C);
+ ScrArea *sa = CTX_wm_area(C);
size_t items;
int filter;
@@ -246,7 +246,7 @@ int graphop_selected_fcurve_poll (bContext *C)
/* get the editable + selected F-Curves, and as long as we got some, we can return
* NOTE: curve-visible flag isn't included, otherwise selecting a curve via list to edit is too cumbersome
*/
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT);
items = ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
if (items == 0)
return 0;
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c
index 37cdbd4963a..ffff86df4eb 100644
--- a/source/blender/editors/space_graph/space_graph.c
+++ b/source/blender/editors/space_graph/space_graph.c
@@ -61,7 +61,7 @@
#include "UI_resources.h"
#include "UI_view2d.h"
-#include "graph_intern.h" // own include
+#include "graph_intern.h" // own include
/* ******************** manage regions ********************* */
@@ -69,20 +69,20 @@ ARegion *graph_has_buttons_region(ScrArea *sa)
{
ARegion *ar, *arnew;
- ar= BKE_area_find_region_type(sa, RGN_TYPE_UI);
+ ar = BKE_area_find_region_type(sa, RGN_TYPE_UI);
if (ar) return ar;
/* add subdiv level; after main */
- ar= BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
+ ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
/* is error! */
- if (ar==NULL) return NULL;
+ if (ar == NULL) return NULL;
- arnew= MEM_callocN(sizeof(ARegion), "buttons for graph");
+ arnew = MEM_callocN(sizeof(ARegion), "buttons for graph");
BLI_insertlinkafter(&sa->regionbase, ar, arnew);
- arnew->regiontype= RGN_TYPE_UI;
- arnew->alignment= RGN_ALIGN_RIGHT;
+ arnew->regiontype = RGN_TYPE_UI;
+ arnew->alignment = RGN_ALIGN_RIGHT;
arnew->flag = RGN_FLAG_HIDDEN;
@@ -94,71 +94,71 @@ ARegion *graph_has_buttons_region(ScrArea *sa)
static SpaceLink *graph_new(const bContext *C)
{
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
ARegion *ar;
SpaceIpo *sipo;
/* Graph Editor - general stuff */
- sipo= MEM_callocN(sizeof(SpaceIpo), "init graphedit");
- sipo->spacetype= SPACE_IPO;
+ sipo = MEM_callocN(sizeof(SpaceIpo), "init graphedit");
+ sipo->spacetype = SPACE_IPO;
- sipo->autosnap= SACTSNAP_FRAME;
+ sipo->autosnap = SACTSNAP_FRAME;
/* allocate DopeSheet data for Graph Editor */
- sipo->ads= MEM_callocN(sizeof(bDopeSheet), "GraphEdit DopeSheet");
- sipo->ads->source= (ID *)scene;
+ sipo->ads = MEM_callocN(sizeof(bDopeSheet), "GraphEdit DopeSheet");
+ sipo->ads->source = (ID *)scene;
/* settings for making it easier by default to just see what you're interested in tweaking */
sipo->ads->filterflag |= ADS_FILTER_ONLYSEL;
sipo->flag |= SIPO_SELVHANDLESONLY;
/* header */
- ar= MEM_callocN(sizeof(ARegion), "header for graphedit");
+ ar = MEM_callocN(sizeof(ARegion), "header for graphedit");
BLI_addtail(&sipo->regionbase, ar);
- ar->regiontype= RGN_TYPE_HEADER;
- ar->alignment= RGN_ALIGN_BOTTOM;
+ ar->regiontype = RGN_TYPE_HEADER;
+ ar->alignment = RGN_ALIGN_BOTTOM;
/* channels */
- ar= MEM_callocN(sizeof(ARegion), "channels area for graphedit");
+ ar = MEM_callocN(sizeof(ARegion), "channels area for graphedit");
BLI_addtail(&sipo->regionbase, ar);
- ar->regiontype= RGN_TYPE_CHANNELS;
- ar->alignment= RGN_ALIGN_LEFT;
+ ar->regiontype = RGN_TYPE_CHANNELS;
+ ar->alignment = RGN_ALIGN_LEFT;
- ar->v2d.scroll = (V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM);
+ ar->v2d.scroll = (V2D_SCROLL_RIGHT | V2D_SCROLL_BOTTOM);
/* ui buttons */
- ar= MEM_callocN(sizeof(ARegion), "buttons area for graphedit");
+ ar = MEM_callocN(sizeof(ARegion), "buttons area for graphedit");
BLI_addtail(&sipo->regionbase, ar);
- ar->regiontype= RGN_TYPE_UI;
- ar->alignment= RGN_ALIGN_RIGHT;
+ ar->regiontype = RGN_TYPE_UI;
+ ar->alignment = RGN_ALIGN_RIGHT;
ar->flag = RGN_FLAG_HIDDEN;
/* main area */
- ar= MEM_callocN(sizeof(ARegion), "main area for graphedit");
+ ar = MEM_callocN(sizeof(ARegion), "main area for graphedit");
BLI_addtail(&sipo->regionbase, ar);
- ar->regiontype= RGN_TYPE_WINDOW;
+ ar->regiontype = RGN_TYPE_WINDOW;
ar->v2d.tot.xmin = 0.0f;
ar->v2d.tot.ymin = (float)scene->r.sfra - 10.0f;
ar->v2d.tot.xmax = (float)scene->r.efra;
ar->v2d.tot.ymax = 10.0f;
- ar->v2d.cur= ar->v2d.tot;
+ ar->v2d.cur = ar->v2d.tot;
- ar->v2d.min[0]= FLT_MIN;
- ar->v2d.min[1]= FLT_MIN;
+ ar->v2d.min[0] = FLT_MIN;
+ ar->v2d.min[1] = FLT_MIN;
- ar->v2d.max[0]= MAXFRAMEF;
- ar->v2d.max[1]= FLT_MAX;
+ ar->v2d.max[0] = MAXFRAMEF;
+ ar->v2d.max[1] = FLT_MAX;
- ar->v2d.scroll= (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL);
- ar->v2d.scroll |= (V2D_SCROLL_LEFT|V2D_SCROLL_SCALE_VERTICAL);
+ ar->v2d.scroll = (V2D_SCROLL_BOTTOM | V2D_SCROLL_SCALE_HORIZONTAL);
+ ar->v2d.scroll |= (V2D_SCROLL_LEFT | V2D_SCROLL_SCALE_VERTICAL);
- ar->v2d.keeptot= 0;
+ ar->v2d.keeptot = 0;
return (SpaceLink *)sipo;
}
@@ -166,7 +166,7 @@ static SpaceLink *graph_new(const bContext *C)
/* not spacelink itself */
static void graph_free(SpaceLink *sl)
{
- SpaceIpo *si= (SpaceIpo *)sl;
+ SpaceIpo *si = (SpaceIpo *)sl;
if (si->ads) {
BLI_freelistN(&si->ads->chanbase);
@@ -181,12 +181,12 @@ static void graph_free(SpaceLink *sl)
/* spacetype; init callback */
static void graph_init(struct wmWindowManager *UNUSED(wm), ScrArea *sa)
{
- SpaceIpo *sipo= (SpaceIpo *)sa->spacedata.first;
+ SpaceIpo *sipo = (SpaceIpo *)sa->spacedata.first;
/* init dopesheet data if non-existant (i.e. for old files) */
if (sipo->ads == NULL) {
- sipo->ads= MEM_callocN(sizeof(bDopeSheet), "GraphEdit DopeSheet");
- sipo->ads->source= (ID *)(G.main->scene.first); // FIXME: this is a really nasty hack here for now...
+ sipo->ads = MEM_callocN(sizeof(bDopeSheet), "GraphEdit DopeSheet");
+ sipo->ads->source = (ID *)(G.main->scene.first); // FIXME: this is a really nasty hack here for now...
}
ED_area_tag_refresh(sa);
@@ -194,11 +194,11 @@ static void graph_init(struct wmWindowManager *UNUSED(wm), ScrArea *sa)
static SpaceLink *graph_duplicate(SpaceLink *sl)
{
- SpaceIpo *sipon= MEM_dupallocN(sl);
+ SpaceIpo *sipon = MEM_dupallocN(sl);
/* clear or remove stuff from old */
BLI_duplicatelist(&sipon->ghostCurves, &((SpaceIpo *)sl)->ghostCurves);
- sipon->ads= MEM_dupallocN(sipon->ads);
+ sipon->ads = MEM_dupallocN(sipon->ads);
return (SpaceLink *)sipon;
}
@@ -220,13 +220,13 @@ static void graph_main_area_init(wmWindowManager *wm, ARegion *ar)
static void graph_main_area_draw(const bContext *C, ARegion *ar)
{
/* draw entirely, view changes should be handled here */
- SpaceIpo *sipo= CTX_wm_space_graph(C);
+ SpaceIpo *sipo = CTX_wm_space_graph(C);
bAnimContext ac;
- View2D *v2d= &ar->v2d;
+ View2D *v2d = &ar->v2d;
View2DGrid *grid;
View2DScrollers *scrollers;
float col[3];
- short unitx=0, unity=V2D_UNIT_VALUES, flag=0;
+ short unitx = 0, unity = V2D_UNIT_VALUES, flag = 0;
/* clear and setup matrix */
UI_GetThemeColor3fv(TH_BACK, col);
@@ -236,8 +236,8 @@ static void graph_main_area_draw(const bContext *C, ARegion *ar)
UI_view2d_view_ortho(v2d);
/* grid */
- unitx= (sipo->flag & SIPO_DRAWTIME)? V2D_UNIT_SECONDS : V2D_UNIT_FRAMESCALE;
- grid= UI_view2d_grid_calc(CTX_data_scene(C), v2d, unitx, V2D_GRID_NOCLAMP, unity, V2D_GRID_NOCLAMP, ar->winx, ar->winy);
+ unitx = (sipo->flag & SIPO_DRAWTIME) ? V2D_UNIT_SECONDS : V2D_UNIT_FRAMESCALE;
+ grid = UI_view2d_grid_calc(CTX_data_scene(C), v2d, unitx, V2D_GRID_NOCLAMP, unity, V2D_GRID_NOCLAMP, ar->winx, ar->winy);
UI_view2d_grid_draw(v2d, grid, V2D_GRIDLINES_ALL);
/* draw data */
@@ -260,29 +260,29 @@ static void graph_main_area_draw(const bContext *C, ARegion *ar)
UI_view2d_grid_free(grid);
/* horizontal component of value-cursor (value line before the current frame line) */
- if ((sipo->flag & SIPO_NODRAWCURSOR)==0) {
+ if ((sipo->flag & SIPO_NODRAWCURSOR) == 0) {
float vec[2];
/* Draw a green line to indicate the cursor value */
- vec[1]= sipo->cursorVal;
+ vec[1] = sipo->cursorVal;
UI_ThemeColorShadeAlpha(TH_CFRAME, -10, -50);
glLineWidth(2.0);
glEnable(GL_BLEND);
glBegin(GL_LINE_STRIP);
- vec[0]= v2d->cur.xmin;
- glVertex2fv(vec);
+ vec[0] = v2d->cur.xmin;
+ glVertex2fv(vec);
- vec[0]= v2d->cur.xmax;
- glVertex2fv(vec);
+ vec[0] = v2d->cur.xmax;
+ glVertex2fv(vec);
glEnd(); // GL_LINE_STRIP
glDisable(GL_BLEND);
}
/* current frame */
- if (sipo->flag & SIPO_DRAWTIME) flag |= DRAWCFRA_UNIT_SECONDS;
- if ((sipo->flag & SIPO_NODRAWCFRANUM)==0) flag |= DRAWCFRA_SHOW_NUMBOX;
+ if (sipo->flag & SIPO_DRAWTIME) flag |= DRAWCFRA_UNIT_SECONDS;
+ if ((sipo->flag & SIPO_NODRAWCFRANUM) == 0) flag |= DRAWCFRA_SHOW_NUMBOX;
ANIM_draw_cfra(C, v2d, flag);
/* markers */
@@ -297,8 +297,8 @@ static void graph_main_area_draw(const bContext *C, ARegion *ar)
UI_view2d_view_restore(C);
/* scrollers */
- // FIXME: args for scrollers depend on the type of data being shown...
- scrollers= UI_view2d_scrollers_calc(C, v2d, unitx, V2D_GRID_NOCLAMP, unity, V2D_GRID_NOCLAMP);
+ // FIXME: args for scrollers depend on the type of data being shown...
+ scrollers = UI_view2d_scrollers_calc(C, v2d, unitx, V2D_GRID_NOCLAMP, unity, V2D_GRID_NOCLAMP);
UI_view2d_scrollers_draw(C, v2d, scrollers);
UI_view2d_scrollers_free(scrollers);
}
@@ -319,7 +319,7 @@ static void graph_channel_area_init(wmWindowManager *wm, ARegion *ar)
static void graph_channel_area_draw(const bContext *C, ARegion *ar)
{
bAnimContext ac;
- View2D *v2d= &ar->v2d;
+ View2D *v2d = &ar->v2d;
View2DScrollers *scrollers;
float col[3];
@@ -332,14 +332,14 @@ static void graph_channel_area_draw(const bContext *C, ARegion *ar)
/* draw channels */
if (ANIM_animdata_get_context(C, &ac)) {
- graph_draw_channel_names((bContext*)C, &ac, ar);
+ graph_draw_channel_names((bContext *)C, &ac, ar);
}
/* reset view matrix */
UI_view2d_view_restore(C);
/* scrollers */
- scrollers= UI_view2d_scrollers_calc(C, v2d, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY);
+ scrollers = UI_view2d_scrollers_calc(C, v2d, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY);
UI_view2d_scrollers_draw(C, v2d, scrollers);
UI_view2d_scrollers_free(scrollers);
}
@@ -374,12 +374,12 @@ static void graph_buttons_area_draw(const bContext *C, ARegion *ar)
static void graph_region_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
- switch(wmn->category) {
+ switch (wmn->category) {
case NC_ANIMATION:
ED_region_tag_redraw(ar);
break;
case NC_SCENE:
- switch(wmn->data) {
+ switch (wmn->data) {
case ND_RENDER_OPTIONS:
case ND_OB_ACTIVE:
case ND_FRAME:
@@ -393,7 +393,7 @@ static void graph_region_listener(ARegion *ar, wmNotifier *wmn)
}
break;
case NC_OBJECT:
- switch(wmn->data) {
+ switch (wmn->data) {
case ND_BONE_ACTIVE:
case ND_BONE_SELECT:
case ND_KEYS:
@@ -406,7 +406,7 @@ static void graph_region_listener(ARegion *ar, wmNotifier *wmn)
}
break;
case NC_NODE:
- switch(wmn->action) {
+ switch (wmn->action) {
case NA_EDITED:
case NA_SELECTED:
ED_region_tag_redraw(ar);
@@ -418,7 +418,7 @@ static void graph_region_listener(ARegion *ar, wmNotifier *wmn)
ED_region_tag_redraw(ar);
break;
default:
- if (wmn->data==ND_KEYS)
+ if (wmn->data == ND_KEYS)
ED_region_tag_redraw(ar);
}
@@ -427,7 +427,7 @@ static void graph_region_listener(ARegion *ar, wmNotifier *wmn)
/* editor level listener */
static void graph_listener(ScrArea *sa, wmNotifier *wmn)
{
- SpaceIpo *sipo= (SpaceIpo *)sa->spacedata.first;
+ SpaceIpo *sipo = (SpaceIpo *)sa->spacedata.first;
/* context changes */
switch (wmn->category) {
@@ -440,7 +440,7 @@ static void graph_listener(ScrArea *sa, wmNotifier *wmn)
break;
case NC_SCENE:
switch (wmn->data) {
- case ND_OB_ACTIVE: /* selection changed, so force refresh to flush (needs flag set to do syncing) */
+ case ND_OB_ACTIVE: /* selection changed, so force refresh to flush (needs flag set to do syncing) */
case ND_OB_SELECT:
sipo->flag |= SIPO_TEMP_NEEDCHANSYNC;
ED_area_tag_refresh(sa);
@@ -453,7 +453,7 @@ static void graph_listener(ScrArea *sa, wmNotifier *wmn)
break;
case NC_OBJECT:
switch (wmn->data) {
- case ND_BONE_SELECT: /* selection changed, so force refresh to flush (needs flag set to do syncing) */
+ case ND_BONE_SELECT: /* selection changed, so force refresh to flush (needs flag set to do syncing) */
case ND_BONE_ACTIVE:
sipo->flag |= SIPO_TEMP_NEEDCHANSYNC;
ED_area_tag_refresh(sa);
@@ -472,16 +472,16 @@ static void graph_listener(ScrArea *sa, wmNotifier *wmn)
sipo->flag |= SIPO_TEMP_NEEDCHANSYNC;
ED_area_tag_refresh(sa);
}
- break;
+ break;
case NC_SPACE:
if (wmn->data == ND_SPACE_GRAPH)
ED_area_tag_redraw(sa);
break;
- // XXX: restore the case below if not enough updates occur...
- //default:
- // if (wmn->data==ND_KEYS)
- // ED_area_tag_redraw(sa);
+ // XXX: restore the case below if not enough updates occur...
+ //default:
+ // if (wmn->data==ND_KEYS)
+ // ED_area_tag_redraw(sa);
}
}
@@ -498,13 +498,13 @@ static void graph_refresh(const bContext *C, ScrArea *sa)
{
}
- break;
+ break;
case SIPO_MODE_DRIVERS: /* drivers only */
{
}
- break;
+ break;
}
/* region updates? */
@@ -516,6 +516,7 @@ static void graph_refresh(const bContext *C, ScrArea *sa)
if (sipo->flag & SIPO_TEMP_NEEDCHANSYNC) {
ANIM_sync_animchannels_to_data(C);
sipo->flag &= ~SIPO_TEMP_NEEDCHANSYNC;
+ ED_area_tag_redraw(sa);
}
/* init/adjust F-Curve colors */
@@ -527,15 +528,15 @@ static void graph_refresh(const bContext *C, ScrArea *sa)
int i;
/* build list of F-Curves which will be visible as channels in channel-region
- * - we don't include ANIMFILTER_CURVEVISIBLE filter, as that will result in a
- * mismatch between channel-colors and the drawn curves
+ * - we don't include ANIMFILTER_CURVEVISIBLE filter, as that will result in a
+ * mismatch between channel-colors and the drawn curves
*/
- filter= (ANIMFILTER_DATA_VISIBLE|ANIMFILTER_NODUPLIS);
- items= ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_NODUPLIS);
+ items = ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* loop over F-Curves, assigning colors */
- for (ale=anim_data.first, i=0; ale; ale= ale->next, i++) {
- FCurve *fcu= (FCurve *)ale->data;
+ for (ale = anim_data.first, i = 0; ale; ale = ale->next, i++) {
+ FCurve *fcu = (FCurve *)ale->data;
/* set color of curve here */
switch (fcu->color_mode) {
@@ -550,25 +551,25 @@ static void graph_refresh(const bContext *C, ScrArea *sa)
/* F-Curve's array index is automatically mapped to RGB values. This works best of 3-value vectors.
* TODO: find a way to module the hue so that not all curves have same color...
*/
- float *col= fcu->color;
-
- switch(fcu->array_index) {
- case 0:
- col[0]= 1.0f; col[1]= 0.0f; col[2]= 0.0f;
- break;
- case 1:
- col[0]= 0.0f; col[1]= 1.0f; col[2]= 0.0f;
- break;
- case 2:
- col[0]= 0.0f; col[1]= 0.0f; col[2]= 1.0f;
- break;
- default:
- /* 'unknown' color - bluish so as to not conflict with handles */
- col[0]= 0.3f; col[1]= 0.8f; col[2]= 1.0f;
- break;
+ float *col = fcu->color;
+
+ switch (fcu->array_index) {
+ case 0:
+ col[0] = 1.0f; col[1] = 0.0f; col[2] = 0.0f;
+ break;
+ case 1:
+ col[0] = 0.0f; col[1] = 1.0f; col[2] = 0.0f;
+ break;
+ case 2:
+ col[0] = 0.0f; col[1] = 0.0f; col[2] = 1.0f;
+ break;
+ default:
+ /* 'unknown' color - bluish so as to not conflict with handles */
+ col[0] = 0.3f; col[1] = 0.8f; col[2] = 1.0f;
+ break;
}
}
- break;
+ break;
case FCURVE_COLOR_AUTO_RAINBOW:
default:
@@ -578,7 +579,7 @@ static void graph_refresh(const bContext *C, ScrArea *sa)
*/
getcolor_fcurve_rainbow(i, items, fcu->color);
}
- break;
+ break;
}
}
@@ -590,61 +591,61 @@ static void graph_refresh(const bContext *C, ScrArea *sa)
/* only called once, from space/spacetypes.c */
void ED_spacetype_ipo(void)
{
- SpaceType *st= MEM_callocN(sizeof(SpaceType), "spacetype ipo");
+ SpaceType *st = MEM_callocN(sizeof(SpaceType), "spacetype ipo");
ARegionType *art;
- st->spaceid= SPACE_IPO;
+ st->spaceid = SPACE_IPO;
strncpy(st->name, "Graph", BKE_ST_MAXNAME);
- st->new= graph_new;
- st->free= graph_free;
- st->init= graph_init;
- st->duplicate= graph_duplicate;
- st->operatortypes= graphedit_operatortypes;
- st->keymap= graphedit_keymap;
- st->listener= graph_listener;
- st->refresh= graph_refresh;
+ st->new = graph_new;
+ st->free = graph_free;
+ st->init = graph_init;
+ st->duplicate = graph_duplicate;
+ st->operatortypes = graphedit_operatortypes;
+ st->keymap = graphedit_keymap;
+ st->listener = graph_listener;
+ st->refresh = graph_refresh;
/* regions: main window */
- art= MEM_callocN(sizeof(ARegionType), "spacetype graphedit region");
+ art = MEM_callocN(sizeof(ARegionType), "spacetype graphedit region");
art->regionid = RGN_TYPE_WINDOW;
- art->init= graph_main_area_init;
- art->draw= graph_main_area_draw;
- art->listener= graph_region_listener;
- art->keymapflag= ED_KEYMAP_VIEW2D|ED_KEYMAP_MARKERS|ED_KEYMAP_ANIMATION|ED_KEYMAP_FRAMES;
+ art->init = graph_main_area_init;
+ art->draw = graph_main_area_draw;
+ art->listener = graph_region_listener;
+ art->keymapflag = ED_KEYMAP_VIEW2D | ED_KEYMAP_MARKERS | ED_KEYMAP_ANIMATION | ED_KEYMAP_FRAMES;
BLI_addhead(&st->regiontypes, art);
/* regions: header */
- art= MEM_callocN(sizeof(ARegionType), "spacetype graphedit region");
+ art = MEM_callocN(sizeof(ARegionType), "spacetype graphedit region");
art->regionid = RGN_TYPE_HEADER;
- art->prefsizey= HEADERY;
- art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D|ED_KEYMAP_FRAMES|ED_KEYMAP_HEADER;
- art->listener= graph_region_listener;
- art->init= graph_header_area_init;
- art->draw= graph_header_area_draw;
+ art->prefsizey = HEADERY;
+ art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_HEADER;
+ art->listener = graph_region_listener;
+ art->init = graph_header_area_init;
+ art->draw = graph_header_area_draw;
BLI_addhead(&st->regiontypes, art);
/* regions: channels */
- art= MEM_callocN(sizeof(ARegionType), "spacetype graphedit region");
+ art = MEM_callocN(sizeof(ARegionType), "spacetype graphedit region");
art->regionid = RGN_TYPE_CHANNELS;
- art->prefsizex= 200+V2D_SCROLL_WIDTH; /* 200 is the 'standard', but due to scrollers, we want a bit more to fit the lock icons in */
- art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D|ED_KEYMAP_FRAMES;
- art->listener= graph_region_listener;
- art->init= graph_channel_area_init;
- art->draw= graph_channel_area_draw;
+ art->prefsizex = 200 + V2D_SCROLL_WIDTH; /* 200 is the 'standard', but due to scrollers, we want a bit more to fit the lock icons in */
+ art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES;
+ art->listener = graph_region_listener;
+ art->init = graph_channel_area_init;
+ art->draw = graph_channel_area_draw;
BLI_addhead(&st->regiontypes, art);
/* regions: UI buttons */
- art= MEM_callocN(sizeof(ARegionType), "spacetype graphedit region");
+ art = MEM_callocN(sizeof(ARegionType), "spacetype graphedit region");
art->regionid = RGN_TYPE_UI;
- art->prefsizex= 200;
- art->keymapflag= ED_KEYMAP_UI;
- art->listener= graph_region_listener;
- art->init= graph_buttons_area_init;
- art->draw= graph_buttons_area_draw;
+ art->prefsizex = 200;
+ art->keymapflag = ED_KEYMAP_UI;
+ art->listener = graph_region_listener;
+ art->init = graph_buttons_area_init;
+ art->draw = graph_buttons_area_draw;
BLI_addhead(&st->regiontypes, art);
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c
index ecbd9a4033a..de171bc45f8 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -146,7 +146,7 @@ static void image_info(Scene *scene, ImageUser *iuser, Image *ima, ImBuf *ibuf,
/* the frame number, even if we cant */
if (ima->source == IMA_SRC_SEQUENCE) {
/* don't use iuser->framenr directly because it may not be updated if auto-refresh is off */
- const int framenr = BKE_image_user_get_frame(iuser, CFRA, 0);
+ const int framenr = BKE_image_user_frame_get(iuser, CFRA, 0);
ofs += sprintf(str + ofs, ", Frame: %d", framenr);
}
@@ -430,7 +430,7 @@ static void set_frames_cb(bContext *C, void *ima_v, void *iuser_v)
if (ima->anim) {
iuser->frames = IMB_anim_get_duration(ima->anim, IMB_TC_RECORD_RUN);
- BKE_image_user_calc_frame(iuser, scene->r.cfra, 0);
+ BKE_image_user_frame_calc(iuser, scene->r.cfra, 0);
}
}
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c
index 29bd5f5117d..aab628180c8 100644
--- a/source/blender/editors/space_image/image_draw.c
+++ b/source/blender/editors/space_image/image_draw.c
@@ -334,65 +334,6 @@ void ED_image_draw_info(ARegion *ar, int color_manage, int channels, int x, int
/* image drawing */
-static void draw_image_grid(ARegion *ar, float zoomx, float zoomy)
-{
- float gridsize, gridstep = 1.0f / 32.0f;
- float fac, blendfac;
- int x1, y1, x2, y2;
-
- /* the image is located inside (0,0),(1, 1) as set by view2d */
- UI_ThemeColorShade(TH_BACK, 20);
-
- UI_view2d_to_region_no_clip(&ar->v2d, 0.0f, 0.0f, &x1, &y1);
- UI_view2d_to_region_no_clip(&ar->v2d, 1.0f, 1.0f, &x2, &y2);
- glRectf(x1, y1, x2, y2);
-
- /* gridsize adapted to zoom level */
- gridsize = 0.5f * (zoomx + zoomy);
- if (gridsize <= 0.0f) return;
-
- if (gridsize < 1.0f) {
- while (gridsize < 1.0f) {
- gridsize *= 4.0f;
- gridstep *= 4.0f;
- }
- }
- else {
- while (gridsize >= 4.0f) {
- gridsize /= 4.0f;
- gridstep /= 4.0f;
- }
- }
-
- /* the fine resolution level */
- blendfac = 0.25f * gridsize - floorf(0.25f * gridsize);
- CLAMP(blendfac, 0.0f, 1.0f);
- UI_ThemeColorShade(TH_BACK, (int)(20.0f * (1.0f - blendfac)));
-
- fac = 0.0f;
- glBegin(GL_LINES);
- while (fac < 1.0f) {
- glVertex2f(x1, y1 * (1.0f - fac) + y2 * fac);
- glVertex2f(x2, y1 * (1.0f - fac) + y2 * fac);
- glVertex2f(x1 * (1.0f - fac) + x2 * fac, y1);
- glVertex2f(x1 * (1.0f - fac) + x2 * fac, y2);
- fac += gridstep;
- }
-
- /* the large resolution level */
- UI_ThemeColor(TH_BACK);
-
- fac = 0.0f;
- while (fac < 1.0f) {
- glVertex2f(x1, y1 * (1.0f - fac) + y2 * fac);
- glVertex2f(x2, y1 * (1.0f - fac) + y2 * fac);
- glVertex2f(x1 * (1.0f - fac) + x2 * fac, y1);
- glVertex2f(x1 * (1.0f - fac) + x2 * fac, y2);
- fac += 4.0f * gridstep;
- }
- glEnd();
-}
-
static void sima_draw_alpha_pixels(float x1, float y1, int rectx, int recty, unsigned int *recti)
{
@@ -665,7 +606,7 @@ static void draw_image_view_tool(Scene *scene)
if (draw) {
getmouseco_areawin(mval);
- radius = brush_size(brush) * G.sima->zoom;
+ radius = BKE_brush_size_get(brush) * G.sima->zoom;
fdrawXORcirc(mval[0], mval[1], radius);
if (brush->innerradius != 1.0) {
@@ -781,7 +722,7 @@ void draw_image_main(SpaceImage *sima, ARegion *ar, Scene *scene)
/* draw the image or grid */
if (ibuf == NULL)
- draw_image_grid(ar, zoomx, zoomy);
+ ED_region_grid_draw(ar, zoomx, zoomy);
else if (sima->flag & SI_DRAW_TILE)
draw_image_buffer_repeated(sima, ar, scene, ima, ibuf, zoomx, zoomy);
else if (ima && (ima->tpageflag & IMA_TILES))
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 2c688990a8f..58fbceb999d 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -190,13 +190,14 @@ int space_image_main_area_poll(bContext *C)
return 0;
}
-/* For IMAGE_OT_curves_point_set to avoid sampling when in uv smooth mode */
+/* For IMAGE_OT_curves_point_set to avoid sampling when in uv smooth mode or editmode */
int space_image_main_area_not_uv_brush_poll(bContext *C)
{
SpaceImage *sima = CTX_wm_space_image(C);
+ Scene *scene = CTX_data_scene(C);
+ ToolSettings *toolsettings = scene->toolsettings;
- ToolSettings *toolsettings = CTX_data_scene(C)->toolsettings;
- if (sima && !toolsettings->uvsculpt)
+ if (sima && !toolsettings->uvsculpt && !scene->obedit)
return 1;
return 0;
@@ -333,6 +334,7 @@ void IMAGE_OT_view_pan(wmOperatorType *ot)
/* identifiers */
ot->name = "View Pan";
ot->idname = "IMAGE_OT_view_pan";
+ ot->description = "Pan the view";
/* api callbacks */
ot->exec = image_view_pan_exec;
@@ -470,6 +472,7 @@ void IMAGE_OT_view_zoom(wmOperatorType *ot)
/* identifiers */
ot->name = "View Zoom";
ot->idname = "IMAGE_OT_view_zoom";
+ ot->description = "Zoom in/out the image";
/* api callbacks */
ot->exec = image_view_zoom_exec;
@@ -538,6 +541,7 @@ void IMAGE_OT_view_ndof(wmOperatorType *ot)
/* identifiers */
ot->name = "NDOF Pan/Zoom";
ot->idname = "IMAGE_OT_view_ndof";
+ ot->description = "Use a 3D mouse device to pan/zoom the view";
/* api callbacks */
ot->invoke = image_view_ndof_invoke;
@@ -591,6 +595,7 @@ void IMAGE_OT_view_all(wmOperatorType *ot)
/* identifiers */
ot->name = "View All";
ot->idname = "IMAGE_OT_view_all";
+ ot->description = "View the whole picture";
/* api callbacks */
ot->exec = image_view_all_exec;
@@ -652,6 +657,7 @@ void IMAGE_OT_view_selected(wmOperatorType *ot)
/* identifiers */
ot->name = "View Center";
ot->idname = "IMAGE_OT_view_selected";
+ ot->description = "View all selected UVs";
/* api callbacks */
ot->exec = image_view_selected_exec;
@@ -691,6 +697,7 @@ void IMAGE_OT_view_zoom_in(wmOperatorType *ot)
/* identifiers */
ot->name = "View Zoom In";
ot->idname = "IMAGE_OT_view_zoom_in";
+ ot->description = "Zoom in the image (centered around 2D cursor)";
/* api callbacks */
ot->invoke = image_view_zoom_in_invoke;
@@ -732,6 +739,7 @@ void IMAGE_OT_view_zoom_out(wmOperatorType *ot)
/* identifiers */
ot->name = "View Zoom Out";
ot->idname = "IMAGE_OT_view_zoom_out";
+ ot->description = "Zoom out the image (centered around 2D cursor)";
/* api callbacks */
ot->invoke = image_view_zoom_out_invoke;
@@ -774,6 +782,7 @@ void IMAGE_OT_view_zoom_ratio(wmOperatorType *ot)
/* identifiers */
ot->name = "View Zoom Ratio";
ot->idname = "IMAGE_OT_view_zoom_ratio";
+ ot->description = "Set zoom ration of the view";
/* api callbacks */
ot->exec = image_view_zoom_ratio_exec;
@@ -824,7 +833,7 @@ static int image_open_exec(bContext *C, wmOperator *op)
errno = 0;
- ima = BKE_add_image_file(str);
+ ima = BKE_image_load_exists(str);
if (!ima) {
if (op->customdata) MEM_freeN(op->customdata);
@@ -977,6 +986,7 @@ void IMAGE_OT_replace(wmOperatorType *ot)
/* identifiers */
ot->name = "Replace Image";
ot->idname = "IMAGE_OT_replace";
+ ot->description = "Replace current image by another one from disk";
/* api callbacks */
ot->exec = image_replace_exec;
@@ -1140,7 +1150,7 @@ static void save_image_doit(bContext *C, SpaceImage *sima, wmOperator *op, SaveI
/* TODO, better solution, if a 24bit image is painted onto it may contain alpha */
if (ibuf->userflags & IB_BITMAPDIRTY) { /* it has been painted onto */
/* checks each pixel, not ideal */
- ibuf->planes = BKE_alphatest_ibuf(ibuf) ? 32 : 24;
+ ibuf->planes = BKE_imbuf_alpha_test(ibuf) ? 32 : 24;
}
}
@@ -1157,7 +1167,7 @@ static void save_image_doit(bContext *C, SpaceImage *sima, wmOperator *op, SaveI
BKE_image_release_renderresult(scene, ima);
}
else {
- if (BKE_write_ibuf_as(ibuf, simopts->filepath, &simopts->im_format, save_copy)) {
+ if (BKE_imbuf_write_as(ibuf, simopts->filepath, &simopts->im_format, save_copy)) {
ok = TRUE;
}
}
@@ -1315,6 +1325,7 @@ void IMAGE_OT_save_as(wmOperatorType *ot)
/* identifiers */
ot->name = "Save As Image";
ot->idname = "IMAGE_OT_save_as";
+ ot->description = "Save the image with another name and/or settings";
/* api callbacks */
ot->exec = image_save_as_exec;
@@ -1361,6 +1372,7 @@ void IMAGE_OT_save(wmOperatorType *ot)
/* identifiers */
ot->name = "Save Image";
ot->idname = "IMAGE_OT_save";
+ ot->description = "Save the image with current name and settings";
/* api callbacks */
ot->exec = image_save_exec;
@@ -1438,6 +1450,7 @@ void IMAGE_OT_save_sequence(wmOperatorType *ot)
/* identifiers */
ot->name = "Save Sequence";
ot->idname = "IMAGE_OT_save_sequence";
+ ot->description = "Save a sequence of images";
/* api callbacks */
ot->exec = image_save_sequence_exec;
@@ -1473,6 +1486,7 @@ void IMAGE_OT_reload(wmOperatorType *ot)
/* identifiers */
ot->name = "Reload Image";
ot->idname = "IMAGE_OT_reload";
+ ot->description = "Reload current image from disk";
/* api callbacks */
ot->exec = image_reload_exec;
@@ -1514,7 +1528,7 @@ static int image_new_exec(bContext *C, wmOperator *op)
if (!alpha)
color[3] = 1.0f;
- ima = BKE_add_image_size(width, height, name, alpha ? 32 : 24, floatbuf, uvtestgrid, color);
+ ima = BKE_image_add_generated(width, height, name, alpha ? 32 : 24, floatbuf, uvtestgrid, color);
if (!ima)
return OPERATOR_CANCELLED;
@@ -1645,6 +1659,7 @@ void IMAGE_OT_invert(wmOperatorType *ot)
/* identifiers */
ot->name = "Invert Channels";
ot->idname = "IMAGE_OT_invert";
+ ot->description = "Invert image's channels";
/* api callbacks */
ot->exec = image_invert_exec;
@@ -2020,6 +2035,7 @@ void IMAGE_OT_sample(wmOperatorType *ot)
/* identifiers */
ot->name = "Sample Color";
ot->idname = "IMAGE_OT_sample";
+ ot->description = "Use mouse to sample a color in current image";
/* api callbacks */
ot->invoke = image_sample_invoke;
@@ -2129,6 +2145,7 @@ void IMAGE_OT_sample_line(wmOperatorType *ot)
/* identifiers */
ot->name = "Sample Line";
ot->idname = "IMAGE_OT_sample_line";
+ ot->description = "Sample a line and show it in Scope panels";
/* api callbacks */
ot->invoke = image_sample_line_invoke;
@@ -2156,6 +2173,7 @@ void IMAGE_OT_curves_point_set(wmOperatorType *ot)
/* identifiers */
ot->name = "Set Curves Point";
ot->idname = "IMAGE_OT_curves_point_set";
+ ot->description = "Set black point or white point for curves";
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@@ -2361,6 +2379,7 @@ void IMAGE_OT_cycle_render_slot(wmOperatorType *ot)
/* identifiers */
ot->name = "Cycle Render Slot";
ot->idname = "IMAGE_OT_cycle_render_slot";
+ ot->description = "Cycle through all non-void render slots";
/* api callbacks */
ot->exec = image_cycle_render_slot_exec;
@@ -2389,7 +2408,7 @@ void ED_image_update_frame(const Main *mainp, int cfra)
if (tex->type == TEX_IMAGE && tex->ima) {
if (ELEM(tex->ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) {
if (tex->iuser.flag & IMA_ANIM_ALWAYS)
- BKE_image_user_calc_frame(&tex->iuser, cfra, 0);
+ BKE_image_user_frame_calc(&tex->iuser, cfra, 0);
}
}
}
@@ -2404,12 +2423,12 @@ void ED_image_update_frame(const Main *mainp, int cfra)
BGpic *bgpic;
for (bgpic = v3d->bgpicbase.first; bgpic; bgpic = bgpic->next)
if (bgpic->iuser.flag & IMA_ANIM_ALWAYS)
- BKE_image_user_calc_frame(&bgpic->iuser, cfra, 0);
+ BKE_image_user_frame_calc(&bgpic->iuser, cfra, 0);
}
else if (sa->spacetype == SPACE_IMAGE) {
SpaceImage *sima = sa->spacedata.first;
if (sima->iuser.flag & IMA_ANIM_ALWAYS)
- BKE_image_user_calc_frame(&sima->iuser, cfra, 0);
+ BKE_image_user_frame_calc(&sima->iuser, cfra, 0);
}
else if (sa->spacetype == SPACE_NODE) {
SpaceNode *snode = sa->spacedata.first;
@@ -2421,7 +2440,7 @@ void ED_image_update_frame(const Main *mainp, int cfra)
ImageUser *iuser = node->storage;
if (ELEM(ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE))
if (iuser->flag & IMA_ANIM_ALWAYS)
- BKE_image_user_calc_frame(iuser, cfra, 0);
+ BKE_image_user_frame_calc(iuser, cfra, 0);
}
}
}
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index 6d0f0c9323f..9e0f538056c 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -88,7 +88,7 @@ void ED_space_image_set(SpaceImage *sima, Scene *scene, Object *obedit, Image *i
/* context may be NULL, so use global */
ED_uvedit_assign_image(G.main, scene, obedit, ima, sima->image);
- /* change the space ima after because uvedit_face_visible uses the space ima
+ /* change the space ima after because uvedit_face_visible_test uses the space ima
* to check if the face is displayed in UV-localview */
sima->image = ima;
@@ -205,7 +205,9 @@ void ED_image_aspect(Image *ima, float *aspx, float *aspy)
if ((ima == NULL) || (ima->type == IMA_TYPE_R_RESULT) || (ima->type == IMA_TYPE_COMPOSITE) ||
(ima->aspx == 0.0f || ima->aspy == 0.0f))
+ {
return;
+ }
/* x is always 1 */
*aspy = ima->aspy / ima->aspx;
@@ -588,7 +590,7 @@ static void image_refresh(const bContext *C, ScrArea *UNUSED(sa))
ima = ED_space_image(sima);
if (sima->iuser.flag & IMA_ANIM_ALWAYS)
- BKE_image_user_calc_frame(&sima->iuser, scene->r.cfra, 0);
+ BKE_image_user_frame_calc(&sima->iuser, scene->r.cfra, 0);
/* check if we have to set the image from the editmesh */
if (ima && (ima->source == IMA_SRC_VIEWER || sima->pin)) ;
@@ -597,7 +599,7 @@ static void image_refresh(const bContext *C, ScrArea *UNUSED(sa))
struct BMEditMesh *em = me->edit_btmesh;
int sloppy = 1; /* partially selected face is ok */
- if (scene_use_new_shading_nodes(scene)) {
+ if (BKE_scene_use_new_shading_nodes(scene)) {
/* new shading system, get image from material */
BMFace *efa = BM_active_face_get(em->bm, sloppy);
diff --git a/source/blender/editors/space_info/info_ops.c b/source/blender/editors/space_info/info_ops.c
index 5256fc8f044..080f12bf35b 100644
--- a/source/blender/editors/space_info/info_ops.c
+++ b/source/blender/editors/space_info/info_ops.c
@@ -107,6 +107,7 @@ void FILE_OT_pack_all(wmOperatorType *ot)
/* identifiers */
ot->name = "Pack All";
ot->idname = "FILE_OT_pack_all";
+ ot->description = "Pack all used external files into the .blend";
/* api callbacks */
ot->exec = pack_all_exec;
@@ -175,6 +176,7 @@ void FILE_OT_unpack_all(wmOperatorType *ot)
/* identifiers */
ot->name = "Unpack All";
ot->idname = "FILE_OT_unpack_all";
+ ot->description = "Unpack all files packed into this .blend to external ones";
/* api callbacks */
ot->exec = unpack_all_exec;
@@ -198,7 +200,7 @@ static int make_paths_relative_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- makeFilesRelative(bmain, bmain->name, op->reports);
+ BLI_bpath_relative_convert(bmain, bmain->name, op->reports);
/* redraw everything so any changed paths register */
WM_main_add_notifier(NC_WINDOW, NULL);
@@ -211,6 +213,7 @@ void FILE_OT_make_paths_relative(wmOperatorType *ot)
/* identifiers */
ot->name = "Make All Paths Relative";
ot->idname = "FILE_OT_make_paths_relative";
+ ot->description = "Make all paths to external files relative to current .blend";
/* api callbacks */
ot->exec = make_paths_relative_exec;
@@ -230,7 +233,7 @@ static int make_paths_absolute_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- makeFilesAbsolute(bmain, bmain->name, op->reports);
+ BLI_bpath_absolute_convert(bmain, bmain->name, op->reports);
/* redraw everything so any changed paths register */
WM_main_add_notifier(NC_WINDOW, NULL);
@@ -243,6 +246,7 @@ void FILE_OT_make_paths_absolute(wmOperatorType *ot)
/* identifiers */
ot->name = "Make All Paths Absolute";
ot->idname = "FILE_OT_make_paths_absolute";
+ ot->description = "Make all paths to external files absolute";
/* api callbacks */
ot->exec = make_paths_absolute_exec;
@@ -258,7 +262,7 @@ static int report_missing_files_exec(bContext *C, wmOperator *op)
Main *bmain = CTX_data_main(C);
/* run the missing file check */
- checkMissingFiles(bmain, op->reports);
+ BLI_bpath_missing_files_check(bmain, op->reports);
return OPERATOR_FINISHED;
}
@@ -268,6 +272,7 @@ void FILE_OT_report_missing_files(wmOperatorType *ot)
/* identifiers */
ot->name = "Report Missing Files";
ot->idname = "FILE_OT_report_missing_files";
+ ot->description = "Report all missing external files";
/* api callbacks */
ot->exec = report_missing_files_exec;
@@ -282,7 +287,7 @@ static int find_missing_files_exec(bContext *C, wmOperator *op)
{
Main *bmain = CTX_data_main(C);
const char *searchpath = RNA_string_get_alloc(op->ptr, "filepath", NULL, 0);
- findMissingFiles(bmain, searchpath, op->reports);
+ BLI_bpath_missing_files_find(bmain, searchpath, op->reports);
MEM_freeN((void *)searchpath);
return OPERATOR_FINISHED;
@@ -300,6 +305,7 @@ void FILE_OT_find_missing_files(wmOperatorType *ot)
/* identifiers */
ot->name = "Find Missing Files";
ot->idname = "FILE_OT_find_missing_files";
+ ot->description = "Try to find missing external files";
/* api callbacks */
ot->exec = find_missing_files_exec;
@@ -414,6 +420,7 @@ void INFO_OT_reports_display_update(wmOperatorType *ot)
/* identifiers */
ot->name = "Update Reports Display";
ot->idname = "INFO_OT_reports_display_update";
+ ot->description = "Update the display of reports in Blender UI (internal use)";
/* api callbacks */
ot->invoke = update_reports_display_invoke;
diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c
index 1c2f43f67a4..7870e64228a 100644
--- a/source/blender/editors/space_info/info_stats.c
+++ b/source/blender/editors/space_info/info_stats.c
@@ -60,8 +60,9 @@ typedef struct SceneStats {
int totedge, totedgesel;
int totface, totfacesel;
int totbone, totbonesel;
- int totobj, totobjsel;
- int totmesh, totlamp, totcurve;
+ int totobj, totobjsel;
+ int totlamp, totlampsel;
+ int tottri, totmesh, totcurve;
char infostr[512];
} SceneStats;
@@ -94,6 +95,9 @@ static void stats_object(Object *ob, int sel, int totob, SceneStats *stats)
}
case OB_LAMP:
stats->totlamp += totob;
+ if (sel) {
+ stats->totlampsel += totob;
+ }
break;
case OB_SURF:
case OB_CURVE:
@@ -103,7 +107,7 @@ static void stats_object(Object *ob, int sel, int totob, SceneStats *stats)
stats->totcurve += totob;
if (ob->disp.first)
- count_displist(&ob->disp, &tot, &totf);
+ BKE_displist_count(&ob->disp, &tot, &totf);
tot *= totob;
totf *= totob;
@@ -120,7 +124,7 @@ static void stats_object(Object *ob, int sel, int totob, SceneStats *stats)
case OB_MBALL: {
int tot = 0, totf = 0;
- count_displist(&ob->disp, &tot, &totf);
+ BKE_displist_count(&ob->disp, &tot, &totf);
tot *= totob;
totf *= totob;
@@ -150,6 +154,8 @@ static void stats_object_edit(Object *obedit, SceneStats *stats)
stats->totface = em->bm->totface;
stats->totfacesel = em->bm->totfacesel;
+
+ stats->tottri = em->tottri;
}
else if (obedit->type == OB_ARMATURE) {
/* Armature Edit */
@@ -183,7 +189,7 @@ static void stats_object_edit(Object *obedit, SceneStats *stats)
BezTriple *bezt;
BPoint *bp;
int a;
- ListBase *nurbs = curve_editnurbs(cu);
+ ListBase *nurbs = BKE_curve_editNurbs_get(cu);
for (nu = nurbs->first; nu; nu = nu->next) {
if (nu->type == CU_BEZIER) {
@@ -363,31 +369,25 @@ static void stats_string(Scene *scene)
s += sprintf(s, "(Key) ");
if (scene->obedit->type == OB_MESH) {
- if (scene->toolsettings->selectmode & SCE_SELECT_VERTEX)
- s += sprintf(s, "Ve:%d-%d | Ed:%d-%d | Fa:%d-%d",
- stats->totvertsel, stats->totvert, stats->totedgesel, stats->totedge, stats->totfacesel, stats->totface);
- else if (scene->toolsettings->selectmode & SCE_SELECT_EDGE)
- s += sprintf(s, "Ed:%d-%d | Fa:%d-%d",
- stats->totedgesel, stats->totedge, stats->totfacesel, stats->totface);
- else
- s += sprintf(s, "Fa:%d-%d", stats->totfacesel, stats->totface);
+ s += sprintf(s, "Verts:%d/%d | Edges:%d/%d | Faces:%d/%d | Tris:%d",
+ stats->totvertsel, stats->totvert, stats->totedgesel, stats->totedge, stats->totfacesel, stats->totface, stats->tottri);
}
else if (scene->obedit->type == OB_ARMATURE) {
- s += sprintf(s, "Ve:%d-%d | Bo:%d-%d", stats->totvertsel, stats->totvert, stats->totbonesel, stats->totbone);
+ s += sprintf(s, "Verts:%d/%d | Bones:%d/%d", stats->totvertsel, stats->totvert, stats->totbonesel, stats->totbone);
}
else {
- s += sprintf(s, "Ve:%d-%d", stats->totvertsel, stats->totvert);
+ s += sprintf(s, "Verts:%d/%d", stats->totvertsel, stats->totvert);
}
strcat(s, memstr);
}
else if (ob && (ob->mode & OB_MODE_POSE)) {
- s += sprintf(s, "Bo:%d-%d %s",
+ s += sprintf(s, "Bones:%d/%d %s",
stats->totbonesel, stats->totbone, memstr);
}
else {
- s += sprintf(s, "Ve:%d | Fa:%d | Ob:%d-%d | La:%d%s",
- stats->totvert, stats->totface, stats->totobjsel, stats->totobj, stats->totlamp, memstr);
+ s += sprintf(s, "Verts:%d | Faces:%d | Objects:%d/%d | Lamps:%d/%d%s",
+ stats->totvert, stats->totface, stats->totobjsel, stats->totobj, stats->totlampsel, stats->totlamp, memstr);
}
if (ob)
diff --git a/source/blender/editors/space_logic/logic_buttons.c b/source/blender/editors/space_logic/logic_buttons.c
index dcead6c01db..71aef18666b 100644
--- a/source/blender/editors/space_logic/logic_buttons.c
+++ b/source/blender/editors/space_logic/logic_buttons.c
@@ -104,7 +104,8 @@ static int cut_links_exec(bContext *C, wmOperator *op)
float mcoords[256][2];
int i= 0;
- RNA_BEGIN(op->ptr, itemptr, "path") {
+ RNA_BEGIN (op->ptr, itemptr, "path")
+ {
float loc[2];
RNA_float_get_array(&itemptr, "loc", loc);
@@ -119,8 +120,7 @@ static int cut_links_exec(bContext *C, wmOperator *op)
uiBlock *block;
uiLinkLine *line, *nline;
uiBut *but;
- for (block= ar->uiblocks.first; block; block= block->next)
- {
+ for (block= ar->uiblocks.first; block; block= block->next) {
but= block->buttons.first;
while (but) {
if (but->type==LINK && but->link) {
diff --git a/source/blender/editors/space_logic/logic_ops.c b/source/blender/editors/space_logic/logic_ops.c
index cac4fe04765..1e976cebafd 100644
--- a/source/blender/editors/space_logic/logic_ops.c
+++ b/source/blender/editors/space_logic/logic_ops.c
@@ -198,7 +198,7 @@ static int edit_actuator_invoke_properties(bContext *C, wmOperator *op)
bActuator *act = ptr.data;
Object *ob = ptr.id.data;
- RNA_string_set(op->ptr, "actuator",act->name);
+ RNA_string_set(op->ptr, "actuator", act->name);
RNA_string_set(op->ptr, "object", ob->id.name+2);
return 1;
}
diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c
index f7c69c80067..97b6c32d81d 100644
--- a/source/blender/editors/space_logic/logic_window.c
+++ b/source/blender/editors/space_logic/logic_window.c
@@ -371,7 +371,7 @@ static void do_logic_buts(bContext *C, void *UNUSED(arg), int event)
ob= CTX_data_active_object(C);
if (ob==NULL) return;
- switch(event) {
+ switch (event) {
case B_SETPROP:
/* check for inconsistent types */
@@ -551,13 +551,10 @@ static void do_logic_buts(bContext *C, void *UNUSED(arg), int event)
didit= 0;
for (ob=bmain->object.first; ob; ob=ob->id.next) {
act= ob->actuators.first;
- while (act)
- {
- if (act->type==ACT_SOUND)
- {
+ while (act) {
+ if (act->type==ACT_SOUND) {
bSoundActuator *sa= act->data;
- if (sa->sndnr)
- {
+ if (sa->sndnr) {
ID *sound= bmain->sound.first;
int nr= 1;
@@ -567,8 +564,7 @@ static void do_logic_buts(bContext *C, void *UNUSED(arg), int event)
break;
}
- while (sound)
- {
+ while (sound) {
if (nr==sa->sndnr)
break;
nr++;
@@ -727,8 +723,7 @@ static const char *actuator_name(int type)
static const char *actuator_pup(Object *owner)
{
- switch (owner->type)
- {
+ switch (owner->type) {
case OB_ARMATURE:
return "Actuators %t|Action %x15|Armature %x23|Motion %x0|Constraint %x9|Ipo %x1"
"|Camera %x3|Sound %x5|Property %x6|Edit Object %x10"
@@ -914,7 +909,7 @@ static ID **get_selected_and_linked_obs(bContext *C, short *count, short scavisf
if (*count==0) return NULL;
if (*count>24) *count= 24; /* temporal */
- idar= MEM_callocN( (*count)*sizeof(void *), "idar");
+ idar= MEM_callocN((*count)*sizeof(void *), "idar");
ob= bmain->object.first;
nr= 0;
@@ -945,7 +940,7 @@ static int get_col_sensor(int type)
{
/* XXX themecolors not here */
- switch(type) {
+ switch (type) {
case SENS_ALWAYS: return TH_PANEL;
case SENS_DELAY: return TH_PANEL;
case SENS_TOUCH: return TH_PANEL;
@@ -1089,7 +1084,7 @@ static void get_armature_bone_constraint(Object *ob, const char *posechannel, co
{
/* check that bone exist in the active object */
if (ob->type == OB_ARMATURE && ob->pose) {
- bPoseChannel *pchan= get_pose_channel(ob->pose, posechannel);
+ bPoseChannel *pchan= BKE_pose_channel_find_name(ob->pose, posechannel);
if (pchan) {
bConstraint *con= BLI_findstring(&pchan->constraints, constraint_name, offsetof(bConstraint, name));
if (con) {
@@ -1161,8 +1156,7 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short
set_col_sensor(sens->type, 0);
- switch (sens->type)
- {
+ switch (sens->type) {
case SENS_ALWAYS:
{
ysize= 24;
@@ -1187,9 +1181,9 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short
ts= sens->data;
- // uiDefBut(block, TEX, 1, "Property:", xco,yco-22,width, 19, &ts->name, 0, MAX_NAME, 0, 0, "Only look for Objects with this property");
- uiDefIDPoinBut(block, test_matpoin_but, ID_MA, 1, "MA:",(short)(xco + 10),(short)(yco-44), (short)(width - 20), 19, &ts->ma, "Only look for floors with this Material");
- // uiDefButF(block, NUM, 1, "Margin:", xco+width/2,yco-44,width/2, 19, &ts->dist, 0.0, 10.0, 100, 0, "Extra margin (distance) for larger sensitivity");
+ // uiDefBut(block, TEX, 1, "Property:", xco, yco-22, width, 19, &ts->name, 0, MAX_NAME, 0, 0, "Only look for Objects with this property");
+ uiDefIDPoinBut(block, test_matpoin_but, ID_MA, 1, "MA:", (short)(xco + 10), (short)(yco-44), (short)(width - 20), 19, &ts->ma, "Only look for floors with this Material");
+ // uiDefButF(block, NUM, 1, "Margin:", xco+width/2, yco-44, width/2, 19, &ts->dist, 0.0, 10.0, 100, 0, "Extra margin (distance) for larger sensitivity");
yco-= ysize;
break;
}
@@ -1206,11 +1200,11 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short
/* The collision sensor will become a generic collision (i.e. it */
/* absorb the old touch sensor). */
- uiDefButBitS(block, TOG, SENS_COLLISION_PULSE, B_REDR, "Pulse",(short)(xco + 10),(short)(yco - 44),
+ uiDefButBitS(block, TOG, SENS_COLLISION_PULSE, B_REDR, "Pulse", (short)(xco + 10), (short)(yco - 44),
(short)(0.20 * (width-20)), 19, &cs->mode, 0.0, 0.0, 0, 0,
"Changes to the set of colliding objects generated pulses");
- uiDefButBitS(block, TOG, SENS_COLLISION_MATERIAL, B_REDR, "M/P",(short)(xco + 10 + (0.20 * (width-20))),(short)(yco - 44),
+ uiDefButBitS(block, TOG, SENS_COLLISION_MATERIAL, B_REDR, "M/P", (short)(xco + 10 + (0.20 * (width-20))), (short)(yco - 44),
(short)(0.20 * (width-20)), 19, &cs->mode, 0.0, 0.0, 0, 0,
"Toggle collision on material or property");
@@ -1225,7 +1219,7 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short
"Only look for Objects with this property");
}
- /* uiDefButS(block, NUM, 1, "Damp:", xco+10+width-90,yco-24, 70, 19, &cs->damp, 0, 250, 0, 0, "For 'damp' time don't detect another collision"); */
+ /* uiDefButS(block, NUM, 1, "Damp:", xco+10+width-90, yco-24, 70, 19, &cs->damp, 0, 250, 0, 0, "For 'damp' time don't detect another collision"); */
yco-= ysize;
break;
@@ -1240,11 +1234,11 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short
draw_default_sensor_header(sens, block, xco, yco, width);
ns= sens->data;
- uiDefBut(block, TEX, 1, "Property:",(short)(10+xco),(short)(yco-44), (short)(width-20), 19,
+ uiDefBut(block, TEX, 1, "Property:", (short)(10+xco), (short)(yco-44), (short)(width-20), 19,
&ns->name, 0, MAX_NAME, 0, 0, "Only look for Objects with this property");
- uiDefButF(block, NUM, 1, "Dist",(short)(10+xco),(short)(yco-68),(short)((width-22)/2), 19,
+ uiDefButF(block, NUM, 1, "Dist", (short)(10+xco), (short)(yco-68), (short)((width-22)/2), 19,
&ns->dist, 0.0, 1000.0, 1000, 0, "Trigger distance");
- uiDefButF(block, NUM, 1, "Reset",(short)(10+xco+(width-22)/2), (short)(yco-68), (short)((width-22)/2), 19,
+ uiDefButF(block, NUM, 1, "Reset", (short)(10+xco+(width-22)/2), (short)(yco-68), (short)((width-22)/2), 19,
&ns->resetdist, 0.0, 1000.0, 1000, 0, "Reset distance");
yco-= ysize;
break;
@@ -1261,7 +1255,7 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short
rs= sens->data;
uiDefBut(block, TEX, 1, "Prop:",
- (short)(10+xco),(short)(yco-44), (short)(0.7 * (width-20)), 19,
+ (short)(10+xco), (short)(yco-44), (short)(0.7 * (width-20)), 19,
&rs->name, 0, MAX_NAME, 0, 0,
"Only look for Objects with this property");
@@ -1344,27 +1338,25 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short
str= "Type %t|Equal %x0|Not Equal %x1|Interval %x2|Changed %x3";
/* str= "Type %t|Equal %x0|Not Equal %x1"; */
- uiDefButI(block, MENU, B_REDR, str, xco+30,yco-44,width-60, 19,
+ uiDefButI(block, MENU, B_REDR, str, xco+30, yco-44, width-60, 19,
&ps->type, 0, 31, 0, 0, "Type");
- if (ps->type != SENS_PROP_EXPRESSION)
- {
- uiDefBut(block, TEX, 1, "Prop: ", xco+30,yco-68,width-60, 19,
+ if (ps->type != SENS_PROP_EXPRESSION) {
+ uiDefBut(block, TEX, 1, "Prop: ", xco+30, yco-68, width-60, 19,
ps->name, 0, MAX_NAME, 0, 0, "Property name");
}
- if (ps->type == SENS_PROP_INTERVAL)
- {
- uiDefBut(block, TEX, 1, "Min: ", xco,yco-92,width/2, 19,
+ if (ps->type == SENS_PROP_INTERVAL) {
+ uiDefBut(block, TEX, 1, "Min: ", xco, yco-92, width/2, 19,
ps->value, 0, MAX_NAME, 0, 0, "check for min value");
- uiDefBut(block, TEX, 1, "Max: ", xco+width/2,yco-92,width/2, 19,
+ uiDefBut(block, TEX, 1, "Max: ", xco+width/2, yco-92, width/2, 19,
ps->maxvalue, 0, MAX_NAME, 0, 0, "check for max value");
}
else if (ps->type == SENS_PROP_CHANGED) {
/* pass */
}
else {
- uiDefBut(block, TEX, 1, "Value: ", xco+30,yco-92,width-60, 19,
+ uiDefBut(block, TEX, 1, "Value: ", xco+30, yco-92, width-60, 19,
ps->value, 0, MAX_NAME, 0, 0, "check for value");
}
@@ -1398,12 +1390,11 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short
str= "Type %t|State changed %x0|Lin error below %x1|Lin error above %x2|Rot error below %x3|Rot error above %x4";
- uiDefButI(block, MENU, B_REDR, str, xco+10,yco-66,0.4*(width-20), 19,
+ uiDefButI(block, MENU, B_REDR, str, xco+10, yco-66, 0.4*(width-20), 19,
&arm->type, 0, 31, 0, 0, "Type");
- if (arm->type != SENS_ARM_STATE_CHANGED)
- {
- uiDefButF(block, NUM, 1, "Value: ", xco+10+0.4*(width-20),yco-66,0.6*(width-20), 19,
+ if (arm->type != SENS_ARM_STATE_CHANGED) {
+ uiDefButF(block, NUM, 1, "Value: ", xco+10+0.4*(width-20), yco-66, 0.6*(width-20), 19,
&arm->value, -10000.0, 10000.0, 100, 0, "Test the error against this value");
}
}
@@ -1421,7 +1412,7 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short
draw_default_sensor_header(sens, block, xco, yco, width);
as= sens->data;
- uiDefBut(block, TEX, 1, "Act: ", xco+30,yco-44,width-60, 19,
+ uiDefBut(block, TEX, 1, "Act: ", xco+30, yco-44, width-60, 19,
as->name, 0, MAX_NAME, 0, 0, "Actuator name, actuator active state modifications will be detected");
yco-= ysize;
break;
@@ -1437,11 +1428,11 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short
draw_default_sensor_header(sens, block, xco, yco, width);
ds = sens->data;
- uiDefButS(block, NUM, 0, "Delay",(short)(10+xco),(short)(yco-44),(short)((width-22)*0.4+10), 19,
+ uiDefButS(block, NUM, 0, "Delay", (short)(10+xco), (short)(yco-44), (short)((width-22)*0.4+10), 19,
&ds->delay, 0.0, 5000.0, 0, 0, "Delay in number of logic tics before the positive trigger (default 60 per second)");
- uiDefButS(block, NUM, 0, "Dur",(short)(10+xco+(width-22)*0.4+10),(short)(yco-44),(short)((width-22)*0.4-10), 19,
+ uiDefButS(block, NUM, 0, "Dur", (short)(10+xco+(width-22)*0.4+10), (short)(yco-44), (short)((width-22)*0.4-10), 19,
&ds->duration, 0.0, 5000.0, 0, 0, "If >0, delay in number of logic tics before the negative trigger following the positive trigger");
- uiDefButBitS(block, TOG, SENS_DELAY_REPEAT, 0, "REP",(short)(xco + 10 + (width-22)*0.8),(short)(yco - 44),
+ uiDefButBitS(block, TOG, SENS_DELAY_REPEAT, 0, "REP", (short)(xco + 10 + (width-22)*0.8), (short)(yco - 44),
(short)(0.20 * (width-22)), 19, &ds->flag, 0.0, 0.0, 0, 0,
"Toggle repeat option. If selected, the sensor restarts after Delay+Dur logic tics");
yco-= ysize;
@@ -1471,7 +1462,7 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short
"Specify the type of event this mouse sensor should trigger on");
if (ms->type==32) {
- uiDefButBitS(block, TOG, SENS_MOUSE_FOCUS_PULSE, B_REDR, "Pulse",(short)(xco + 10) + (width*0.8f)-20,(short)(yco - 44),
+ uiDefButBitS(block, TOG, SENS_MOUSE_FOCUS_PULSE, B_REDR, "Pulse", (short)(xco + 10) + (width*0.8f)-20, (short)(yco - 44),
(short)(0.20 * (width-20)), 19, &ms->flag, 0.0, 0.0, 0, 0,
"Moving the mouse over a different object generates a pulse");
}
@@ -1489,9 +1480,8 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short
draw_default_sensor_header(sens, block, xco, yco, width);
randomSensor = sens->data;
/* some files were wrongly written, avoid crash now */
- if (randomSensor)
- {
- uiDefButI(block, NUM, 1, "Seed: ", xco+10,yco-44,(width-20), 19,
+ if (randomSensor) {
+ uiDefButI(block, NUM, 1, "Seed: ", xco+10, yco-44, (width-20), 19,
&randomSensor->seed, 0, 1000, 0, 0,
"Initial seed of the generator. (Choose 0 for not random)");
}
@@ -1509,7 +1499,7 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short
/* 1. property or material */
uiDefButBitS(block, TOG, SENS_COLLISION_MATERIAL, B_REDR, "M/P",
- xco + 10,yco - 44, 0.20 * (width-20), 19,
+ xco + 10, yco - 44, 0.20 * (width-20), 19,
&raySens->mode, 0.0, 0.0, 0, 0,
"Toggle collision on material or property");
@@ -1526,7 +1516,7 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short
/* X-Ray option */
uiDefButBitS(block, TOG, SENS_RAY_XRAY, 1, "X",
- xco + 10,yco - 68, 0.10 * (width-20), 19,
+ xco + 10, yco - 68, 0.10 * (width-20), 19,
&raySens->mode, 0.0, 0.0, 0, 0,
"Toggle X-Ray option (see through objects that don't have the property)");
/* 2. sensing range */
@@ -1610,8 +1600,7 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short
&joy->flag, 0, 0, 0, 0,
"Triggered by all events on this joysticks current type (axis/button/hat)");
}
- if (joy->type == SENS_JOY_BUTTON)
- {
+ if (joy->type == SENS_JOY_BUTTON) {
if ((joy->flag & SENS_JOY_ANY_EVENT)==0) {
uiDefButI(block, NUM, 1, "Number:", xco+10 + 0.6 * (width-20), yco-68, 0.4 * (width-20), 19,
&joy->button, 0, 18, 100, 0,
@@ -1623,7 +1612,7 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short
&joy->axis, 1, 8.0, 100, 0,
"Specify which axis pair to use, 1 is useually the main direction input");
- uiDefButI(block, NUM, 1, "Threshold:", xco+10 + 0.6 * (width-20),yco-44, 0.4 * (width-20), 19,
+ uiDefButI(block, NUM, 1, "Threshold:", xco+10 + 0.6 * (width-20), yco-44, 0.4 * (width-20), 19,
&joy->precision, 0, 32768.0, 100, 0,
"Specify the precision of the axis");
@@ -1651,7 +1640,7 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short
&joy->axis_single, 1, 16.0, 100, 0,
"Specify a single axis (verticle/horizontal/other) to detect");
- uiDefButI(block, NUM, 1, "Threshold:", xco+10 + 0.6 * (width-20),yco-44, 0.4 * (width-20), 19,
+ uiDefButI(block, NUM, 1, "Threshold:", xco+10 + 0.6 * (width-20), yco-44, 0.4 * (width-20), 19,
&joy->precision, 0, 32768.0, 100, 0,
"Specify the precision of the axis");
}
@@ -1679,10 +1668,10 @@ static short draw_controllerbuttons(bController *cont, uiBlock *block, short xco
glRects(xco, yco-ysize, xco+width, yco);
uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
- /* uiDefBut(block, LABEL, 1, "Not yet...", xco,yco-24,80, 19, NULL, 0, 0, 0, 0, ""); */
+ /* uiDefBut(block, LABEL, 1, "Not yet...", xco, yco-24, 80, 19, NULL, 0, 0, 0, 0, ""); */
ec= cont->data;
- /* uiDefBut(block, BUT, 1, "Variables", xco,yco-24,80, 19, NULL, 0, 0, 0, 0, "Available variables for expression"); */
- uiDefBut(block, TEX, 1, "Exp:", xco + 10 , yco-21, width-20, 19,
+ /* uiDefBut(block, BUT, 1, "Variables", xco, yco-24, 80, 19, NULL, 0, 0, 0, 0, "Available variables for expression"); */
+ uiDefBut(block, TEX, 1, "Exp:", xco + 10, yco-21, width-20, 19,
ec->str, 0, sizeof(ec->str), 0, 0,
"Expression");
@@ -1700,11 +1689,11 @@ static short draw_controllerbuttons(bController *cont, uiBlock *block, short xco
uiBlockBeginAlign(block);
- uiDefButI(block, MENU, B_REDR, "Execution Method%t|Script%x0|Module%x1", xco+4,yco-23, 66, 19, &pc->mode, 0, 0, 0, 0, "Python script type (textblock or module - faster)");
+ uiDefButI(block, MENU, B_REDR, "Execution Method%t|Script%x0|Module%x1", xco+4, yco-23, 66, 19, &pc->mode, 0, 0, 0, 0, "Python script type (textblock or module - faster)");
if (pc->mode==0)
- uiDefIDPoinBut(block, test_scriptpoin_but, ID_TXT, 1, "", xco+70,yco-23,width-74, 19, &pc->text, "Blender textblock to run as a script");
+ uiDefIDPoinBut(block, test_scriptpoin_but, ID_TXT, 1, "", xco+70, yco-23, width-74, 19, &pc->text, "Blender textblock to run as a script");
else {
- uiDefBut(block, TEX, 1, "", xco+70,yco-23,(width-70)-25, 19, pc->module, 0, sizeof(pc->module), 0, 0, "Module name and function to run e.g. \"someModule.main\". Internal texts and external python files can be used");
+ uiDefBut(block, TEX, 1, "", xco+70, yco-23, (width-70)-25, 19, pc->module, 0, sizeof(pc->module), 0, 0, "Module name and function to run e.g. \"someModule.main\". Internal texts and external python files can be used");
uiDefButBitI(block, TOG, CONT_PY_DEBUG, B_REDR, "D", (xco+width)-25, yco-23, 19, 19, &pc->flag, 0, 0, 0, 0, "Continuously reload the module from disk for editing external modules without restarting");
}
uiBlockEndAlign(block);
@@ -1727,7 +1716,7 @@ static short draw_controllerbuttons(bController *cont, uiBlock *block, short xco
static int get_col_actuator(int type)
{
- switch(type) {
+ switch (type) {
case ACT_ACTION: return TH_PANEL;
case ACT_SHAPEACTION: return TH_PANEL;
case ACT_OBJECT: return TH_PANEL;
@@ -1869,14 +1858,12 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
/* yco is at the top of the rect, draw downwards */
set_col_actuator(act->type, 0);
- switch (act->type)
- {
+ switch (act->type) {
case ACT_OBJECT:
{
oa = act->data;
wval = (width-100)/3;
- if (oa->type == ACT_OBJECT_NORMAL)
- {
+ if (oa->type == ACT_OBJECT_NORMAL) {
if (ob->gameflag & OB_DYNAMIC) {
ysize= 175;
}
@@ -1904,8 +1891,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
uiDefButBitS(block, TOG, ACT_DLOC_LOCAL, 0, "L", xco+45+3*wval, yco-45, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation");
uiDefButBitS(block, TOG, ACT_DROT_LOCAL, 0, "L", xco+45+3*wval, yco-64, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation");
- if ( ob->gameflag & OB_DYNAMIC )
- {
+ if (ob->gameflag & OB_DYNAMIC) {
uiDefBut(block, LABEL, 0, "Force", xco, yco-87, 55, 19, NULL, 0, 0, 0, 0, "Sets the force");
uiBlockBeginAlign(block);
uiDefButF(block, NUM, 0, "", xco+45, yco-87, wval, 19, oa->forceloc, -10000.0, 10000.0, 10, 0, "");
@@ -1921,8 +1907,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
uiBlockEndAlign(block);
}
- if ( ob->gameflag & OB_DYNAMIC )
- {
+ if (ob->gameflag & OB_DYNAMIC) {
uiDefBut(block, LABEL, 0, "LinV", xco, yco-129, 45, 19, NULL, 0, 0, 0, 0, "Sets the linear velocity");
uiBlockBeginAlign(block);
uiDefButF(block, NUM, 0, "", xco+45, yco-129, wval, 19, oa->linearvelocity, -10000.0, 10000.0, 10, 0, "");
@@ -1945,11 +1930,10 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
uiDefButBitS(block, TOG, ACT_LIN_VEL_LOCAL, 0, "L", xco+45+3*wval, yco-129, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation");
uiDefButBitS(block, TOG, ACT_ANG_VEL_LOCAL, 0, "L", xco+45+3*wval, yco-148, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation");
- uiDefButBitS(block, TOG, ACT_ADD_LIN_VEL, 0, "use_additive",xco+45+3*wval+15, yco-129, 35, 19, &oa->flag, 0.0, 0.0, 0, 0, "Toggles between ADD and SET linV");
+ uiDefButBitS(block, TOG, ACT_ADD_LIN_VEL, 0, "use_additive", xco+45+3*wval+15, yco-129, 35, 19, &oa->flag, 0.0, 0.0, 0, 0, "Toggles between ADD and SET linV");
}
}
- else if (oa->type == ACT_OBJECT_SERVO)
- {
+ else if (oa->type == ACT_OBJECT_SERVO) {
ysize= 195;
glRects(xco, yco-ysize, xco+width, yco);
@@ -2030,22 +2014,22 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
if (aa->type == ACT_ACTION_FROM_PROP) {
- uiDefBut(block, TEX, 0, "Prop: ",xco+10, yco-44, width-20, 19, aa->name, 0.0, MAX_NAME, 0, 0, "Use this property to define the Action position");
+ uiDefBut(block, TEX, 0, "Prop: ", xco+10, yco-44, width-20, 19, aa->name, 0.0, MAX_NAME, 0, 0, "Use this property to define the Action position");
}
else {
- uiDefButF(block, NUM, 0, "Sta: ",xco+10, yco-44, (width-20)/2, 19, &aa->sta, 1.0, MAXFRAMEF, 0, 0, "Start frame");
- uiDefButF(block, NUM, 0, "End: ",xco+10+(width-20)/2, yco-44, (width-20)/2, 19, &aa->end, 1.0, MAXFRAMEF, 0, 0, "End frame");
+ uiDefButF(block, NUM, 0, "Sta: ", xco+10, yco-44, (width-20)/2, 19, &aa->sta, 1.0, MAXFRAMEF, 0, 0, "Start frame");
+ uiDefButF(block, NUM, 0, "End: ", xco+10+(width-20)/2, yco-44, (width-20)/2, 19, &aa->end, 1.0, MAXFRAMEF, 0, 0, "End frame");
}
uiDefButS(block, NUM, 0, "Blendin: ", xco+10, yco-64, (width-20)/2, 19, &aa->blendin, 0.0, 32767, 0.0, 0.0, "Number of frames of motion blending");
uiDefButS(block, NUM, 0, "Priority: ", xco+10+(width-20)/2, yco-64, (width-20)/2, 19, &aa->priority, 0.0, 100.0, 0.0, 0.0, "Execution priority - lower numbers will override actions with higher numbers, With 2 or more actions at once, the overriding channels must be lower in the stack");
- uiDefBut(block, TEX, 0, "FrameProp: ",xco+10, yco-84, width-20, 19, aa->frameProp, 0.0, MAX_NAME, 0, 0, "Assign the action's current frame number to this property");
+ uiDefBut(block, TEX, 0, "FrameProp: ", xco+10, yco-84, width-20, 19, aa->frameProp, 0.0, MAX_NAME, 0, 0, "Assign the action's current frame number to this property");
#ifdef __NLA_ACTION_BY_MOTION_ACTUATOR
if (aa->type == ACT_ACTION_MOTION) {
- uiDefButF(block, NUM, 0, "Cycle: ",xco+30, yco-84, (width-60)/2, 19, &aa->stridelength, 0.0, 2500.0, 0, 0, "Distance covered by a single cycle of the action");
+ uiDefButF(block, NUM, 0, "Cycle: ", xco+30, yco-84, (width-60)/2, 19, &aa->stridelength, 0.0, 2500.0, 0, 0, "Distance covered by a single cycle of the action");
}
#endif
@@ -2125,9 +2109,9 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
pa= act->data;
str= "Type%t|Assign%x0|Add %x1|Copy %x2|Toggle (bool/int/float/timer)%x3";
- uiDefButI(block, MENU, B_REDR, str, xco+30,yco-24,width-60, 19, &pa->type, 0, 31, 0, 0, "Type");
+ uiDefButI(block, MENU, B_REDR, str, xco+30, yco-24, width-60, 19, &pa->type, 0, 31, 0, 0, "Type");
- uiDefBut(block, TEX, 1, "Prop: ", xco+30,yco-44,width-60, 19, pa->name, 0, MAX_NAME, 0, 0, "Property name");
+ uiDefBut(block, TEX, 1, "Prop: ", xco+30, yco-44, width-60, 19, pa->name, 0, MAX_NAME, 0, 0, "Property name");
if (pa->type==ACT_PROP_TOGGLE) {
@@ -2139,7 +2123,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
uiDefBut(block, TEX, 1, "Prop: ", xco+10+(width-20)/2, yco-64, (width-20)/2, 19, pa->value, 0, MAX_NAME, 0, 0, "Copy this property");
}
else {
- uiDefBut(block, TEX, 1, "Value: ", xco+30,yco-64,width-60, 19, pa->value, 0, MAX_NAME, 0, 0, "change with this value, use \"\" around strings");
+ uiDefBut(block, TEX, 1, "Value: ", xco+30, yco-64, width-60, 19, pa->value, 0, MAX_NAME, 0, 0, "change with this value, use \"\" around strings");
}
yco-= ysize;
@@ -2163,20 +2147,20 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
IDnames_to_pupstring(&str, "Sound files", NULL, &(bmain->sound), (ID *)sa->sound, &(sa->sndnr));
/* reset this value, it is for handling the event */
sa->sndnr = 0;
- uiDefButS(block, MENU, B_SOUNDACT_BROWSE, str, xco+10,yco-22,20,19, &(sa->sndnr), 0, 0, 0, 0, "");
+ uiDefButS(block, MENU, B_SOUNDACT_BROWSE, str, xco+10, yco-22, 20, 19, &(sa->sndnr), 0, 0, 0, 0, "");
uiDefButO(block, BUT, "sound.open", 0, "Load Sound", xco+wval+10, yco-22, wval, 19,
"Load a sound file (remember to set caching on for small sounds that are played often)");
if (sa->sound) {
char dummy_str[] = "Sound mode %t|Play Stop %x0|Play End %x1|Loop Stop %x2|"
"Loop End %x3|Loop Ping Pong Stop %x5|Loop Ping Pong %x4";
- uiDefBut(block, TEX, B_IDNAME, "SO:",xco+30,yco-22,wval-20,19,
+ uiDefBut(block, TEX, B_IDNAME, "SO:", xco+30, yco-22, wval-20, 19,
((ID *)sa->sound)->name+2, 0.0, MAX_ID_NAME-2, 0, 0, "");
- uiDefButS(block, MENU, 1, dummy_str,xco+10,yco-44,width-20, 19,
+ uiDefButS(block, MENU, 1, dummy_str, xco+10, yco-44, width-20, 19,
&sa->type, 0.0, 0.0, 0, 0, "");
- uiDefButF(block, NUM, 0, "Volume:", xco+10,yco-66,wval, 19, &sa->volume,
+ uiDefButF(block, NUM, 0, "Volume:", xco+10, yco-66, wval, 19, &sa->volume,
0.0, 1.0, 0, 0, "Sets the volume of this sound");
- uiDefButF(block, NUM, 0, "Pitch:",xco+wval+10,yco-66,wval, 19, &sa->pitch,-12.0,
+ uiDefButF(block, NUM, 0, "Pitch:", xco+wval+10, yco-66, wval, 19, &sa->pitch, -12.0,
12.0, 0, 0, "Sets the pitch of this sound");
uiDefButS(block, TOG | BIT, 0, "3D Sound", xco+10, yco-88, width-20, 19,
&sa->flag, 0.0, 1.0, 0.0, 0.0, "Plays the sound positioned in 3D space");
@@ -2547,8 +2531,8 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
ysize = 48;
glRects(xco, yco-ysize, xco+width, yco);
uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
- uiDefBut(block, TEX, 1, "File: ", xco+10, yco-44,width-20,19, &(gma->filename), 0, sizeof(gma->filename), 0, 0, "Load this blend file, use the \"//\" prefix for a path relative to the current blend file");
-// uiDefBut(block, TEX, 1, "Anim: ", xco+10, yco-64,width-20,19, &(gma->loadaniname), 0, sizeof(gma->loadaniname), 0, 0, "Use this loadinganimation");
+ uiDefBut(block, TEX, 1, "File: ", xco+10, yco-44, width-20, 19, &(gma->filename), 0, sizeof(gma->filename), 0, 0, "Load this blend file, use the \"//\" prefix for a path relative to the current blend file");
+// uiDefBut(block, TEX, 1, "Anim: ", xco+10, yco-64, width-20, 19, &(gma->loadaniname), 0, sizeof(gma->loadaniname), 0, 0, "Use this loadinganimation");
}
#if 0
else if (gma->type == ACT_GAME_START) {
@@ -2556,8 +2540,8 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
glRects(xco, yco-ysize, xco+width, yco);
uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
- uiDefBut(block, TEX, 1, "File: ", xco+10, yco-44,width-20,19, &(gma->filename), 0, sizeof(gma->filename), 0, 0, "Load this file");
- uiDefBut(block, TEX, 1, "Anim: ", xco+10, yco-64,width-20,19, &(gma->loadaniname), 0, sizeof(gma->loadaniname), 0, 0, "Use this loadinganimation");
+ uiDefBut(block, TEX, 1, "File: ", xco+10, yco-44, width-20, 19, &(gma->filename), 0, sizeof(gma->filename), 0, 0, "Load this file");
+ uiDefBut(block, TEX, 1, "Anim: ", xco+10, yco-64, width-20, 19, &(gma->loadaniname), 0, sizeof(gma->loadaniname), 0, 0, "Use this loadinganimation");
}
#endif
else if (ELEM4(gma->type, ACT_GAME_RESTART, ACT_GAME_QUIT, ACT_GAME_SAVECFG, ACT_GAME_LOADCFG)) {
@@ -2673,7 +2657,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
randAct = act->data;
/* 1. seed */
- uiDefButI(block, NUM, 1, "Seed: ", (xco+10),yco-24, 0.4 *(width-20), 19,
+ uiDefButI(block, NUM, 1, "Seed: ", (xco+10), yco-24, 0.4 *(width-20), 19,
&randAct->seed, 0, 1000, 0, 0,
"Initial seed of the random generator. Use Python for more freedom. "
" (Choose 0 for not random)");
@@ -2793,21 +2777,21 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
/* line 3: Text/Property */
uiDefButBitS(block, TOG, 1, B_REDR, "T/P",
- (xco+10),(yco-(myline*24)), (0.20 * (width-20)), 19,
+ (xco+10), (yco-(myline*24)), (0.20 * (width-20)), 19,
&ma->bodyType, 0.0, 0.0, 0, 0,
"Toggle message type: either Text or a PropertyName");
if (ma->bodyType == ACT_MESG_MESG) {
/* line 3: Message Body */
uiDefBut(block, TEX, 1, "Body: ",
- (xco+10+(0.20*(width-20))),(yco-(myline++*24)),(0.8*(width-20)),19,
+ (xco+10+(0.20*(width-20))), (yco-(myline++*24)), (0.8*(width-20)), 19,
&ma->body, 0, MAX_NAME, 0, 0,
"Optional message body Text");
}
else {
/* line 3: Property body (set by property) */
uiDefBut(block, TEX, 1, "Propname: ",
- (xco+10+(0.20*(width-20))),(yco-(myline++*24)),(0.8*(width-20)),19,
+ (xco+10+(0.20*(width-20))), (yco-(myline++*24)), (0.8*(width-20)), 19,
&ma->body, 0, MAX_NAME, 0, 0,
"The message body will be set by the Property Value");
}
@@ -2821,18 +2805,17 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
if (tdfa->type == ACT_2DFILTER_CUSTOMFILTER) {
ysize +=20;
}
- glRects( xco, yco-ysize, xco+width, yco );
- uiEmboss( (float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1 );
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
- switch(tdfa->type)
- {
+ switch (tdfa->type) {
case ACT_2DFILTER_MOTIONBLUR:
if (!tdfa->flag) {
- uiDefButS(block, TOG, B_REDR, "D", xco+30,yco-44,19, 19, &tdfa->flag, 0.0, 0.0, 0.0, 0.0, "Disable Motion Blur");
- uiDefButF(block, NUM, B_REDR, "Value:", xco+52,yco-44,width-82,19,&tdfa->float_arg,0.0,1.0,0.0,0.0,"Set motion blur value");
+ uiDefButS(block, TOG, B_REDR, "D", xco+30, yco-44, 19, 19, &tdfa->flag, 0.0, 0.0, 0.0, 0.0, "Disable Motion Blur");
+ uiDefButF(block, NUM, B_REDR, "Value:", xco+52, yco-44, width-82, 19, &tdfa->float_arg, 0.0, 1.0, 0.0, 0.0, "Set motion blur value");
}
else {
- uiDefButS(block, TOG, B_REDR, "Disabled", xco+30,yco-44,width-60, 19, &tdfa->flag, 0.0, 0.0, 0.0, 0.0, "Enable Motion Blur");
+ uiDefButS(block, TOG, B_REDR, "Disabled", xco+30, yco-44, width-60, 19, &tdfa->flag, 0.0, 0.0, 0.0, 0.0, "Enable Motion Blur");
}
break;
case ACT_2DFILTER_BLUR:
@@ -2848,18 +2831,18 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
case ACT_2DFILTER_NOFILTER:
case ACT_2DFILTER_DISABLED:
case ACT_2DFILTER_ENABLED:
- uiDefButI(block, NUM, B_REDR, "Pass Number:", xco+30,yco-44,width-60,19,&tdfa->int_arg,0.0,MAX_RENDER_PASS-1,0.0,0.0,"Set filter order");
+ uiDefButI(block, NUM, B_REDR, "Pass Number:", xco+30, yco-44, width-60, 19, &tdfa->int_arg, 0.0, MAX_RENDER_PASS-1, 0.0, 0.0, "Set filter order");
break;
case ACT_2DFILTER_CUSTOMFILTER:
- uiDefButI(block, NUM, B_REDR, "Pass Number:", xco+30,yco-44,width-60,19,&tdfa->int_arg,0.0,MAX_RENDER_PASS-1,0.0,0.0,"Set filter order");
- uiDefIDPoinBut(block, test_scriptpoin_but, ID_SCRIPT, 1, "Script: ", xco+30,yco-64,width-60, 19, &tdfa->text, "");
+ uiDefButI(block, NUM, B_REDR, "Pass Number:", xco+30, yco-44, width-60, 19, &tdfa->int_arg, 0.0, MAX_RENDER_PASS-1, 0.0, 0.0, "Set filter order");
+ uiDefIDPoinBut(block, test_scriptpoin_but, ID_SCRIPT, 1, "Script: ", xco+30, yco-64, width-60, 19, &tdfa->text, "");
break;
}
str= "2D Filter %t|Motion Blur %x1|Blur %x2|Sharpen %x3|Dilation %x4|Erosion %x5|"
"Laplacian %x6|Sobel %x7|Prewitt %x8|Gray Scale %x9|Sepia %x10|Invert %x11|Custom Filter %x12|"
"Enable Filter %x-2|Disable Filter %x-1|Remove Filter %x0|";
- uiDefButS(block, MENU, B_REDR, str, xco+30,yco-24,width-60, 19, &tdfa->type, 0.0, 0.0, 0.0, 0.0, "2D filter type");
+ uiDefButS(block, MENU, B_REDR, str, xco+30, yco-24, width-60, 19, &tdfa->type, 0.0, 0.0, 0.0, 0.0, "2D filter type");
yco -= ysize;
break;
@@ -2929,7 +2912,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
ysize += 40;
break;
case ACT_ARM_SETWEIGHT:
- uiDefButF(block, NUM, B_REDR, "Weight:", xco+5+(width-10)*0.35,yco-24,(width-10)*0.65,19,&armAct->weight,0.0,1.0,0.0,0.0,"Set weight of this constraint");
+ uiDefButF(block, NUM, B_REDR, "Weight:", xco+5+(width-10)*0.35, yco-24, (width-10)*0.65, 19, &armAct->weight, 0.0, 1.0, 0.0, 0.0, "Set weight of this constraint");
break;
}
}
@@ -3041,7 +3024,7 @@ static uiBlock *controller_menu(bContext *C, ARegion *ar, void *UNUSED(arg))
uiBlockSetButmFunc(block, do_controller_menu, NULL);
uiDefBut(block, BUTM, 1, "Show Objects", 0, (short)(yco-=20), 160, 19, NULL, 0.0, 0.0, 1, 0, "");
- uiDefBut(block, BUTM, 1, "Hide Objects", 0,(short)(yco-=20), 160, 19, NULL, 0.0, 0.0, 1, 1, "");
+ uiDefBut(block, BUTM, 1, "Hide Objects", 0, (short)(yco-=20), 160, 19, NULL, 0.0, 0.0, 1, 1, "");
uiDefBut(block, SEPR, 0, "", 0, (short)(yco-=6), 160, 6, NULL, 0.0, 0.0, 0, 0, "");
uiDefBut(block, BUTM, 1, "Show Controllers", 0, (short)(yco-=20), 160, 19, NULL, 0.0, 0.0, 2, 2, "");
uiDefBut(block, BUTM, 1, "Hide Controllers", 0, (short)(yco-=20), 160, 19, NULL, 0.0, 0.0, 3, 3, "");
@@ -3759,8 +3742,7 @@ static void draw_actuator_armature(uiLayout *layout, PointerRNA *ptr)
uiItemR(layout, ptr, "mode", 0, NULL, ICON_NONE);
- switch (RNA_enum_get(ptr, "mode"))
- {
+ switch (RNA_enum_get(ptr, "mode")) {
case ACT_ARM_RUN:
break;
case ACT_ARM_ENABLE:
@@ -3835,8 +3817,7 @@ static void draw_actuator_constraint(uiLayout *layout, PointerRNA *ptr, bContext
RNA_main_pointer_create(CTX_data_main(C), &main_ptr);
uiItemR(layout, ptr, "mode", 0, NULL, ICON_NONE);
- switch (RNA_enum_get(ptr, "mode"))
- {
+ switch (RNA_enum_get(ptr, "mode")) {
case ACT_CONST_TYPE_LOC:
uiItemR(layout, ptr, "limit", 0, NULL, ICON_NONE);
@@ -3865,7 +3846,7 @@ static void draw_actuator_constraint(uiLayout *layout, PointerRNA *ptr, bContext
uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_force_distance")==1);
uiItemR(sub, ptr, "distance", 0, "", ICON_NONE);
- uiItemR(layout, ptr, "damping", UI_ITEM_R_SLIDER , NULL, ICON_NONE);
+ uiItemR(layout, ptr, "damping", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
split = uiLayoutSplit(layout, 0.15, 0);
uiItemR(split, ptr, "use_material_detect", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
@@ -3886,7 +3867,7 @@ static void draw_actuator_constraint(uiLayout *layout, PointerRNA *ptr, bContext
uiItemR(layout, ptr, "direction_axis_pos", 0, NULL, ICON_NONE);
row=uiLayoutRow(layout, 1);
- uiItemR(row, ptr, "damping", UI_ITEM_R_SLIDER , NULL, ICON_NONE);
+ uiItemR(row, ptr, "damping", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(row, ptr, "time", 0, NULL, ICON_NONE);
row=uiLayoutRow(layout, 0);
@@ -3900,16 +3881,16 @@ static void draw_actuator_constraint(uiLayout *layout, PointerRNA *ptr, bContext
case ACT_CONST_TYPE_FH:
split=uiLayoutSplit(layout, 0.75, 0);
row= uiLayoutRow(split, 0);
- uiItemR(row, ptr, "fh_damping", UI_ITEM_R_SLIDER , NULL, ICON_NONE);
+ uiItemR(row, ptr, "fh_damping", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(row, ptr, "fh_height", 0, NULL, ICON_NONE);
- uiItemR(split, ptr, "use_fh_paralel_axis", UI_ITEM_R_TOGGLE , NULL, ICON_NONE);
+ uiItemR(split, ptr, "use_fh_paralel_axis", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
row = uiLayoutRow(layout, 0);
uiItemR(row, ptr, "direction_axis", 0, NULL, ICON_NONE);
split = uiLayoutSplit(row, 0.9, 0);
uiItemR(split, ptr, "fh_force", 0, NULL, ICON_NONE);
- uiItemR(split, ptr, "use_fh_normal", UI_ITEM_R_TOGGLE , NULL, ICON_NONE);
+ uiItemR(split, ptr, "use_fh_normal", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
split = uiLayoutSplit(layout, 0.15, 0);
uiItemR(split, ptr, "use_material_detect", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
@@ -3934,8 +3915,7 @@ static void draw_actuator_edit_object(uiLayout *layout, PointerRNA *ptr)
uiLayout *row, *split, *sub;
uiItemR(layout, ptr, "mode", 0, NULL, ICON_NONE);
- switch (RNA_enum_get(ptr, "mode"))
- {
+ switch (RNA_enum_get(ptr, "mode")) {
case ACT_EDOB_ADD_OBJECT:
row = uiLayoutRow(layout, 0);
uiItemR(row, ptr, "object", 0, NULL, ICON_NONE);
@@ -3988,8 +3968,7 @@ static void draw_actuator_filter_2d(uiLayout *layout, PointerRNA *ptr)
uiLayout *row, *split;
uiItemR(layout, ptr, "mode", 0, NULL, ICON_NONE);
- switch (RNA_enum_get(ptr, "mode"))
- {
+ switch (RNA_enum_get(ptr, "mode")) {
case ACT_2DFILTER_CUSTOMFILTER:
uiItemR(layout, ptr, "filter_pass", 0, NULL, ICON_NONE);
uiItemR(layout, ptr, "glsl_shader", 0, NULL, ICON_NONE);
@@ -4163,8 +4142,7 @@ static void draw_actuator_property(uiLayout *layout, PointerRNA *ptr)
uiItemR(layout, ptr, "mode", 0, NULL, ICON_NONE);
uiItemPointerR(layout, ptr, "property", &settings_ptr, "properties", NULL, ICON_NONE);
- switch(RNA_enum_get(ptr, "mode"))
- {
+ switch (RNA_enum_get(ptr, "mode")) {
case ACT_PROP_TOGGLE:
break;
case ACT_PROP_ADD:
@@ -4571,7 +4549,7 @@ static void logic_buttons_new(bContext *C, ARegion *ar)
uiItemR(split, &settings_ptr, "show_state_panel", UI_ITEM_R_NO_BG, "", ICON_DISCLOSURE_TRI_RIGHT);
row = uiLayoutRow(split, 1);
- uiDefButBitS(block, TOG, OB_SHOWCONT, B_REDR, ob->id.name+2,(short)(xco-10), yco, (short)(width-30), UI_UNIT_Y, &ob->scaflag, 0, 31, 0, 0, "Object name, click to show/hide controllers");
+ uiDefButBitS(block, TOG, OB_SHOWCONT, B_REDR, ob->id.name+2, (short)(xco-10), yco, (short)(width-30), UI_UNIT_Y, &ob->scaflag, 0, 31, 0, 0, "Object name, click to show/hide controllers");
if (ob == act_ob)
uiItemMenuEnumO(row, "LOGIC_OT_controller_add", "type", "Add Controller", ICON_NONE);
@@ -4666,7 +4644,7 @@ static void logic_buttons_new(bContext *C, ARegion *ar)
if ((ob->scavisflag & OB_VIS_SENS) == 0) continue;
row = uiLayoutRow(layout, 1);
- uiDefButBitS(block, TOG, OB_SHOWSENS, B_REDR, ob->id.name+2,(short)(xco-10), yco, (short)(width-30), UI_UNIT_Y, &ob->scaflag, 0, 31, 0, 0, "Object name, click to show/hide sensors");
+ uiDefButBitS(block, TOG, OB_SHOWSENS, B_REDR, ob->id.name+2, (short)(xco-10), yco, (short)(width-30), UI_UNIT_Y, &ob->scaflag, 0, 31, 0, 0, "Object name, click to show/hide sensors");
if (ob == act_ob)
uiItemMenuEnumO(row, "LOGIC_OT_sensor_add", "type", "Add Sensor", ICON_NONE);
@@ -4732,7 +4710,7 @@ static void logic_buttons_new(bContext *C, ARegion *ar)
if ( (ob->scavisflag & OB_VIS_ACT) == 0) continue;
row = uiLayoutRow(layout, 1);
- uiDefButBitS(block, TOG, OB_SHOWACT, B_REDR, ob->id.name+2,(short)(xco-10), yco, (short)(width-30), UI_UNIT_Y, &ob->scaflag, 0, 31, 0, 0, "Object name, click to show/hide actuators");
+ uiDefButBitS(block, TOG, OB_SHOWACT, B_REDR, ob->id.name+2, (short)(xco-10), yco, (short)(width-30), UI_UNIT_Y, &ob->scaflag, 0, 31, 0, 0, "Object name, click to show/hide actuators");
if (ob == act_ob)
uiItemMenuEnumO(row, "LOGIC_OT_actuator_add", "type", "Add Actuator", ICON_NONE);
@@ -4811,7 +4789,7 @@ void logic_buttons(bContext *C, ARegion *ar)
}
if (ob==NULL) return;
-// uiSetButLock(object_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
+// uiSetButLock(BKE_object_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
BLI_snprintf(numstr, sizeof(numstr), "buttonswin %p", (void *)ar);
block= uiBeginBlock(C, ar, numstr, UI_EMBOSS);
@@ -4855,15 +4833,15 @@ void logic_buttons(bContext *C, ARegion *ar)
ob= (Object *)idar[a];
// uiClearButLock();
-// uiSetButLock(object_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
+// uiSetButLock(BKE_object_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
if ( (ob->scavisflag & OB_VIS_CONT) == 0) continue;
/* presume it is only objects for now */
uiBlockBeginAlign(block);
// if (ob->controllers.first) uiSetCurFont(block, UI_HELVB);
- uiDefButBitS(block, TOG, OB_SHOWCONT, B_REDR, ob->id.name+2,(short)(xco-10), yco, (short)(width-30), UI_UNIT_Y, &ob->scaflag, 0, 0, 0, 0, "Active Object name");
+ uiDefButBitS(block, TOG, OB_SHOWCONT, B_REDR, ob->id.name+2, (short)(xco-10), yco, (short)(width-30), UI_UNIT_Y, &ob->scaflag, 0, 0, 0, 0, "Active Object name");
// if (ob->controllers.first) uiSetCurFont(block, UI_HELV);
- uiDefButBitS(block, TOG, OB_ADDCONT, B_ADD_CONT, "Add",(short)(xco+width-40), yco, 50, UI_UNIT_Y, &ob->scaflag, 0, 0, 0, 0, "Add a new Controller");
+ uiDefButBitS(block, TOG, OB_ADDCONT, B_ADD_CONT, "Add", (short)(xco+width-40), yco, 50, UI_UNIT_Y, &ob->scaflag, 0, 0, 0, 0, "Add a new Controller");
uiBlockEndAlign(block);
yco-=20;
@@ -4900,9 +4878,9 @@ void logic_buttons(bContext *C, ARegion *ar)
}
}
uiBlockBeginAlign(block);
- uiDefButBitS(block, TOG, OB_ALLSTATE, B_SET_STATE_BIT, "All",(short)(xco+226), yco-10, 22, UI_UNIT_Y, &ob->scaflag, 0, 0, 0, 0, "Set all state bits");
- uiDefButBitS(block, TOG, OB_INITSTBIT, B_INIT_STATE_BIT, "Ini",(short)(xco+248), yco-10, 22, UI_UNIT_Y, &ob->scaflag, 0, 0, 0, 0, "Set the initial state");
- uiDefButBitS(block, TOG, OB_DEBUGSTATE, 0, "D",(short)(xco+270), yco-10, 15, UI_UNIT_Y, &ob->scaflag, 0, 0, 0, 0, "Print state debug info");
+ uiDefButBitS(block, TOG, OB_ALLSTATE, B_SET_STATE_BIT, "All", (short)(xco+226), yco-10, 22, UI_UNIT_Y, &ob->scaflag, 0, 0, 0, 0, "Set all state bits");
+ uiDefButBitS(block, TOG, OB_INITSTBIT, B_INIT_STATE_BIT, "Ini", (short)(xco+248), yco-10, 22, UI_UNIT_Y, &ob->scaflag, 0, 0, 0, 0, "Set the initial state");
+ uiDefButBitS(block, TOG, OB_DEBUGSTATE, 0, "D", (short)(xco+270), yco-10, 15, UI_UNIT_Y, &ob->scaflag, 0, 0, 0, 0, "Print state debug info");
uiBlockEndAlign(block);
yco-=35;
@@ -4935,7 +4913,7 @@ void logic_buttons(bContext *C, ARegion *ar)
if (cont->flag & CONT_SHOW) {
cont->otype= cont->type;
- uiDefButS(block, MENU, B_CHANGE_CONT, controller_pup(),(short)(xco+22), yco, 70, UI_UNIT_Y, &cont->type, 0, 0, 0, 0, "Controller type");
+ uiDefButS(block, MENU, B_CHANGE_CONT, controller_pup(), (short)(xco+22), yco, 70, UI_UNIT_Y, &cont->type, 0, 0, 0, 0, "Controller type");
but = uiDefBut(block, TEX, 1, "", (short)(xco+92), yco, (short)(width-158), UI_UNIT_Y, cont->name, 0, MAX_NAME, 0, 0, "Controller name");
uiButSetFunc(but, make_unique_prop_names_cb, cont->name, (void*) 0);
@@ -4945,10 +4923,10 @@ void logic_buttons(bContext *C, ARegion *ar)
}
else {
cpack(0x999999);
- glRecti(xco+22, yco, xco+width-22,yco+19);
+ glRecti(xco+22, yco, xco+width-22, yco+19);
but = uiDefBut(block, LABEL, 0, controller_name(cont->type), (short)(xco+22), yco, 70, UI_UNIT_Y, cont, 0, 0, 0, 0, "Controller type");
//uiButSetFunc(but, old_sca_move_controller, cont, NULL);
- but = uiDefBut(block, LABEL, 0, cont->name,(short)(xco+92), yco,(short)(width-158), UI_UNIT_Y, cont, 0, 0, 0, 0, "Controller name");
+ but = uiDefBut(block, LABEL, 0, cont->name, (short)(xco+92), yco, (short)(width-158), UI_UNIT_Y, cont, 0, 0, 0, 0, "Controller name");
//uiButSetFunc(but, old_sca_move_controller, cont, NULL);
uiBlockBeginAlign(block);
@@ -4964,7 +4942,7 @@ void logic_buttons(bContext *C, ARegion *ar)
but = uiDefIconBut(block, LINK, 0, ICON_LINK, (short)(xco+width), ycoo, UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, "");
uiSetButLink(but, NULL, (void ***)&(cont->links), &cont->totlinks, LINK_CONTROLLER, LINK_ACTUATOR);
- uiDefIconBut(block, INLINK, 0, ICON_INLINK,(short)(xco-19), ycoo, UI_UNIT_X, UI_UNIT_Y, cont, LINK_CONTROLLER, 0, 0, 0, "");
+ uiDefIconBut(block, INLINK, 0, ICON_INLINK, (short)(xco-19), ycoo, UI_UNIT_X, UI_UNIT_Y, cont, LINK_CONTROLLER, 0, 0, 0, "");
/* offset is >0 if at least one controller was displayed */
offset++;
yco-=20;
@@ -4992,16 +4970,16 @@ void logic_buttons(bContext *C, ARegion *ar)
for (a=0; a<count; a++) {
ob= (Object *)idar[a];
// uiClearButLock();
-// uiSetButLock(object_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
+// uiSetButLock(BKE_object_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
if ( (ob->scavisflag & OB_VIS_SENS) == 0) continue;
/* presume it is only objects for now */
uiBlockBeginAlign(block);
// if (ob->sensors.first) uiSetCurFont(block, UI_HELVB);
- uiDefButBitS(block, TOG, OB_SHOWSENS, B_REDR, ob->id.name+2,(short)(xco-10), yco, (short)(width-30), UI_UNIT_Y, &ob->scaflag, 0, 31, 0, 0, "Object name, click to show/hide sensors");
+ uiDefButBitS(block, TOG, OB_SHOWSENS, B_REDR, ob->id.name+2, (short)(xco-10), yco, (short)(width-30), UI_UNIT_Y, &ob->scaflag, 0, 31, 0, 0, "Object name, click to show/hide sensors");
// if (ob->sensors.first) uiSetCurFont(block, UI_HELV);
- uiDefButBitS(block, TOG, OB_ADDSENS, B_ADD_SENS, "Add",(short)(xco+width-40), yco, 50, UI_UNIT_Y, &ob->scaflag, 0, 0, 0, 0, "Add a new Sensor");
+ uiDefButBitS(block, TOG, OB_ADDSENS, B_ADD_SENS, "Add", (short)(xco+width-40), yco, 50, UI_UNIT_Y, &ob->scaflag, 0, 0, 0, 0, "Add a new Sensor");
uiBlockEndAlign(block);
yco-=20;
@@ -5036,7 +5014,7 @@ void logic_buttons(bContext *C, ARegion *ar)
}
else {
set_col_sensor(sens->type, 1);
- glRecti(xco+22, yco, xco+width-22,yco+19);
+ glRecti(xco + 22, yco, xco + width - 22, yco + 19);
but = uiDefBut(block, LABEL, 0, sensor_name(sens->type), (short)(xco+22), yco, 80, UI_UNIT_Y, sens, 0, 0, 0, 0, "");
//uiButSetFunc(but, old_sca_move_sensor, sens, NULL);
but = uiDefBut(block, LABEL, 0, sens->name, (short)(xco+102), yco, (short)(width-(pin?146:124)), UI_UNIT_Y, sens, 0, MAX_NAME, 0, 0, "");
@@ -5073,15 +5051,15 @@ void logic_buttons(bContext *C, ARegion *ar)
for (a=0; a<count; a++) {
ob= (Object *)idar[a];
// uiClearButLock();
-// uiSetButLock(object_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
+// uiSetButLock(BKE_object_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
if ( (ob->scavisflag & OB_VIS_ACT) == 0) continue;
/* presume it is only objects for now */
uiBlockBeginAlign(block);
// if (ob->actuators.first) uiSetCurFont(block, UI_HELVB);
- uiDefButBitS(block, TOG, OB_SHOWACT, B_REDR, ob->id.name+2,(short)(xco-10), yco,(short)(width-30), UI_UNIT_Y, &ob->scaflag, 0, 31, 0, 0, "Object name, click to show/hide actuators");
+ uiDefButBitS(block, TOG, OB_SHOWACT, B_REDR, ob->id.name+2, (short)(xco-10), yco, (short)(width-30), UI_UNIT_Y, &ob->scaflag, 0, 31, 0, 0, "Object name, click to show/hide actuators");
// if (ob->actuators.first) uiSetCurFont(block, UI_HELV);
- uiDefButBitS(block, TOG, OB_ADDACT, B_ADD_ACT, "Add",(short)(xco+width-40), yco, 50, UI_UNIT_Y, &ob->scaflag, 0, 0, 0, 0, "Add a new Actuator");
+ uiDefButBitS(block, TOG, OB_ADDACT, B_ADD_ACT, "Add", (short)(xco+width-40), yco, 50, UI_UNIT_Y, &ob->scaflag, 0, 0, 0, 0, "Add a new Actuator");
uiBlockEndAlign(block);
yco-=20;
@@ -5114,7 +5092,7 @@ void logic_buttons(bContext *C, ARegion *ar)
}
else {
set_col_actuator(act->type, 1);
- glRecti((short)(xco+22), yco, (short)(xco+width-22),(short)(yco+19));
+ glRecti((short)(xco+22), yco, (short)(xco+width-22), (short)(yco+19));
/* but= */ uiDefBut(block, LABEL, 0, actuator_name(act->type), (short)(xco+22), yco, 90, UI_UNIT_Y, act, 0, 0, 0, 0, "Actuator type");
// uiButSetFunc(but, old_sca_move_actuator, act, NULL);
/* but= */ uiDefBut(block, LABEL, 0, act->name, (short)(xco+112), yco, (short)(width-(pin?156:134)), UI_UNIT_Y, act, 0, 0, 0, 0, "Actuator name");
@@ -5130,7 +5108,7 @@ void logic_buttons(bContext *C, ARegion *ar)
ycoo= yco;
}
- uiDefIconBut(block, INLINK, 0, ICON_INLINK,(short)(xco-19), ycoo, UI_UNIT_X, UI_UNIT_Y, act, LINK_ACTUATOR, 0, 0, 0, "");
+ uiDefIconBut(block, INLINK, 0, ICON_INLINK, (short)(xco - 19), ycoo, UI_UNIT_X, UI_UNIT_Y, act, LINK_ACTUATOR, 0, 0, 0, "");
yco-=20;
}
diff --git a/source/blender/editors/space_logic/space_logic.c b/source/blender/editors/space_logic/space_logic.c
index 82175f83d39..1caf1075ae6 100644
--- a/source/blender/editors/space_logic/space_logic.c
+++ b/source/blender/editors/space_logic/space_logic.c
@@ -152,7 +152,7 @@ static void logic_free(SpaceLink *UNUSED(sl))
// Spacelogic *slogic= (SpaceLogic*) sl;
// if (slogic->gpd)
-// XXX free_gpencil_data(slogic->gpd);
+// XXX BKE_gpencil_free(slogic->gpd);
}
@@ -195,12 +195,12 @@ static void logic_refresh(const bContext *UNUSED(C), ScrArea *UNUSED(sa))
static void logic_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
- switch(wmn->category) {
+ switch (wmn->category) {
case NC_LOGIC:
ED_region_tag_redraw(ar);
break;
case NC_SCENE:
- switch(wmn->data) {
+ switch (wmn->data) {
case ND_FRAME:
ED_region_tag_redraw(ar);
break;
diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c
index de42e4a783d..95a56176523 100644
--- a/source/blender/editors/space_nla/nla_buttons.c
+++ b/source/blender/editors/space_nla/nla_buttons.c
@@ -62,13 +62,13 @@
#include "UI_interface.h"
#include "UI_resources.h"
-#include "nla_intern.h" // own include
+#include "nla_intern.h" // own include
/* ******************* nla editor space & buttons ************** */
-#define B_NOP 1
-#define B_REDR 2
+#define B_NOP 1
+#define B_REDR 2
/* -------------- */
@@ -76,21 +76,21 @@ static void do_nla_region_buttons(bContext *C, void *UNUSED(arg), int event)
{
//Scene *scene= CTX_data_scene(C);
- switch(event) {
+ switch (event) {
}
/* default for now */
- WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
- WM_event_add_notifier(C, NC_SCENE|ND_TRANSFORM, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
+ WM_event_add_notifier(C, NC_SCENE | ND_TRANSFORM, NULL);
}
static int nla_panel_context(const bContext *C, PointerRNA *adt_ptr, PointerRNA *nlt_ptr, PointerRNA *strip_ptr)
{
bAnimContext ac;
- bAnimListElem *ale= NULL;
+ bAnimListElem *ale = NULL;
ListBase anim_data = {NULL, NULL};
- short found=0;
+ short found = 0;
int filter;
/* for now, only draw if we could init the anim-context info (necessary for all animation-related tools)
@@ -103,15 +103,15 @@ static int nla_panel_context(const bContext *C, PointerRNA *adt_ptr, PointerRNA
* - we need the channels flag to get the active AnimData block when there are no NLA Tracks
*/
// XXX: double-check active!
- filter= (ANIMFILTER_DATA_VISIBLE|ANIMFILTER_LIST_VISIBLE|ANIMFILTER_ACTIVE|ANIMFILTER_LIST_CHANNELS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_ACTIVE | ANIMFILTER_LIST_CHANNELS);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
- for (ale= anim_data.first; ale; ale= ale->next) {
+ for (ale = anim_data.first; ale; ale = ale->next) {
switch (ale->type) {
case ANIMTYPE_NLATRACK: /* NLA Track - The primary data type which should get caught */
{
- NlaTrack *nlt= (NlaTrack *)ale->data;
- AnimData *adt= ale->adt;
+ NlaTrack *nlt = (NlaTrack *)ale->data;
+ AnimData *adt = ale->adt;
/* found it, now set the pointers */
if (adt_ptr) {
@@ -124,18 +124,18 @@ static int nla_panel_context(const bContext *C, PointerRNA *adt_ptr, PointerRNA
}
if (strip_ptr) {
/* NLA-Strip pointer */
- NlaStrip *strip= BKE_nlastrip_find_active(nlt);
+ NlaStrip *strip = BKE_nlastrip_find_active(nlt);
RNA_pointer_create(ale->id, &RNA_NlaStrip, strip, strip_ptr);
}
- found= 1;
+ found = 1;
}
- break;
+ break;
- case ANIMTYPE_SCENE: /* Top-Level Widgets doubling up as datablocks */
+ case ANIMTYPE_SCENE: /* Top-Level Widgets doubling up as datablocks */
case ANIMTYPE_OBJECT:
case ANIMTYPE_FILLACTD: /* Action Expander */
- case ANIMTYPE_DSMAT: /* Datablock AnimData Expanders */
+ case ANIMTYPE_DSMAT: /* Datablock AnimData Expanders */
case ANIMTYPE_DSLAM:
case ANIMTYPE_DSCAM:
case ANIMTYPE_DSCUR:
@@ -156,11 +156,11 @@ static int nla_panel_context(const bContext *C, PointerRNA *adt_ptr, PointerRNA
/* set found status to -1, since setting to 1 would break the loop
* and potentially skip an active NLA-Track in some cases...
*/
- found= -1;
+ found = -1;
}
}
}
- break;
+ break;
}
if (found > 0)
@@ -208,7 +208,7 @@ static int nla_strip_actclip_panel_poll(const bContext *C, PanelType *UNUSED(pt)
if (ptr.data == NULL)
return 0;
- strip= ptr.data;
+ strip = ptr.data;
return (strip->type == NLASTRIP_TYPE_CLIP);
}
@@ -222,7 +222,7 @@ static int nla_strip_eval_panel_poll(const bContext *C, PanelType *UNUSED(pt))
if (ptr.data == NULL)
return 0;
- strip= ptr.data;
+ strip = ptr.data;
if (strip->type == NLASTRIP_TYPE_SOUND)
return 0;
@@ -233,11 +233,11 @@ static int nla_strip_eval_panel_poll(const bContext *C, PanelType *UNUSED(pt))
/* -------------- */
/* active AnimData */
-static void nla_panel_animdata (const bContext *C, Panel *pa)
+static void nla_panel_animdata(const bContext *C, Panel *pa)
{
PointerRNA adt_ptr;
/* AnimData *adt; */
- uiLayout *layout= pa->layout;
+ uiLayout *layout = pa->layout;
uiLayout *row;
uiBlock *block;
@@ -247,32 +247,32 @@ static void nla_panel_animdata (const bContext *C, Panel *pa)
/* adt= adt_ptr.data; */
- block= uiLayoutGetBlock(layout);
+ block = uiLayoutGetBlock(layout);
uiBlockSetHandleFunc(block, do_nla_region_buttons, NULL);
/* Active Action Properties ------------------------------------- */
/* action */
- row= uiLayoutRow(layout, 1);
- uiTemplateID(row, (bContext *)C, &adt_ptr, "action", "ACTION_OT_new", NULL, NULL /*"ACTION_OT_unlink"*/); // XXX: need to make these operators
+ row = uiLayoutRow(layout, 1);
+ uiTemplateID(row, (bContext *)C, &adt_ptr, "action", "ACTION_OT_new", NULL, NULL /*"ACTION_OT_unlink"*/); // XXX: need to make these operators
/* extrapolation */
- row= uiLayoutRow(layout, 1);
- uiItemR(row, &adt_ptr, "action_extrapolation", 0, NULL, ICON_NONE);
+ row = uiLayoutRow(layout, 1);
+ uiItemR(row, &adt_ptr, "action_extrapolation", 0, NULL, ICON_NONE);
/* blending */
- row= uiLayoutRow(layout, 1);
- uiItemR(row, &adt_ptr, "action_blend_type", 0, NULL, ICON_NONE);
+ row = uiLayoutRow(layout, 1);
+ uiItemR(row, &adt_ptr, "action_blend_type", 0, NULL, ICON_NONE);
/* influence */
- row= uiLayoutRow(layout, 1);
- uiItemR(row, &adt_ptr, "action_influence", 0, NULL, ICON_NONE);
+ row = uiLayoutRow(layout, 1);
+ uiItemR(row, &adt_ptr, "action_influence", 0, NULL, ICON_NONE);
}
/* active NLA-Track */
-static void nla_panel_track (const bContext *C, Panel *pa)
+static void nla_panel_track(const bContext *C, Panel *pa)
{
PointerRNA nlt_ptr;
- uiLayout *layout= pa->layout;
+ uiLayout *layout = pa->layout;
uiLayout *row;
uiBlock *block;
@@ -280,19 +280,19 @@ static void nla_panel_track (const bContext *C, Panel *pa)
if (!nla_panel_context(C, NULL, &nlt_ptr, NULL))
return;
- block= uiLayoutGetBlock(layout);
+ block = uiLayoutGetBlock(layout);
uiBlockSetHandleFunc(block, do_nla_region_buttons, NULL);
/* Info - Active NLA-Context:Track ---------------------- */
- row= uiLayoutRow(layout, 1);
- uiItemR(row, &nlt_ptr, "name", 0, NULL, ICON_NLA);
+ row = uiLayoutRow(layout, 1);
+ uiItemR(row, &nlt_ptr, "name", 0, NULL, ICON_NLA);
}
/* generic settings for active NLA-Strip */
static void nla_panel_properties(const bContext *C, Panel *pa)
{
PointerRNA strip_ptr;
- uiLayout *layout= pa->layout;
+ uiLayout *layout = pa->layout;
uiLayout *column, *row, *sub;
uiBlock *block;
short showEvalProps = 1;
@@ -300,20 +300,20 @@ static void nla_panel_properties(const bContext *C, Panel *pa)
if (!nla_panel_context(C, NULL, NULL, &strip_ptr))
return;
- block= uiLayoutGetBlock(layout);
+ block = uiLayoutGetBlock(layout);
uiBlockSetHandleFunc(block, do_nla_region_buttons, NULL);
/* Strip Properties ------------------------------------- */
/* strip type */
- row= uiLayoutColumn(layout, 1);
- uiItemR(row, &strip_ptr, "name", 0, NULL, ICON_NLA); // XXX icon?
- uiItemR(row, &strip_ptr, "type", 0, NULL, ICON_NONE);
+ row = uiLayoutColumn(layout, 1);
+ uiItemR(row, &strip_ptr, "name", 0, NULL, ICON_NLA); // XXX icon?
+ uiItemR(row, &strip_ptr, "type", 0, NULL, ICON_NONE);
/* strip extents */
- column= uiLayoutColumn(layout, 1);
- uiItemL(column, "Strip Extents:", ICON_NONE);
- uiItemR(column, &strip_ptr, "frame_start", 0, NULL, ICON_NONE);
- uiItemR(column, &strip_ptr, "frame_end", 0, NULL, ICON_NONE);
+ column = uiLayoutColumn(layout, 1);
+ uiItemL(column, "Strip Extents:", ICON_NONE);
+ uiItemR(column, &strip_ptr, "frame_start", 0, NULL, ICON_NONE);
+ uiItemR(column, &strip_ptr, "frame_end", 0, NULL, ICON_NONE);
/* Evaluation-Related Strip Properties ------------------ */
@@ -324,31 +324,31 @@ static void nla_panel_properties(const bContext *C, Panel *pa)
/* only show if allowed to... */
if (showEvalProps) {
/* extrapolation */
- row= uiLayoutRow(layout, 1);
- uiItemR(row, &strip_ptr, "extrapolation", 0, NULL, ICON_NONE);
+ row = uiLayoutRow(layout, 1);
+ uiItemR(row, &strip_ptr, "extrapolation", 0, NULL, ICON_NONE);
/* blending */
- row= uiLayoutRow(layout, 1);
- uiItemR(row, &strip_ptr, "blend_type", 0, NULL, ICON_NONE);
+ row = uiLayoutRow(layout, 1);
+ uiItemR(row, &strip_ptr, "blend_type", 0, NULL, ICON_NONE);
/* blend in/out + autoblending
* - blend in/out can only be set when autoblending is off
*/
- column= uiLayoutColumn(layout, 1);
- uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_influence")==0);
- uiItemR(column, &strip_ptr, "use_auto_blend", 0, NULL, ICON_NONE); // XXX as toggle?
-
- sub= uiLayoutColumn(column, 1);
- uiLayoutSetActive(sub, RNA_boolean_get(&strip_ptr, "use_auto_blend")==0);
- uiItemR(sub, &strip_ptr, "blend_in", 0, NULL, ICON_NONE);
- uiItemR(sub, &strip_ptr, "blend_out", 0, NULL, ICON_NONE);
+ column = uiLayoutColumn(layout, 1);
+ uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_influence") == 0);
+ uiItemR(column, &strip_ptr, "use_auto_blend", 0, NULL, ICON_NONE); // XXX as toggle?
+
+ sub = uiLayoutColumn(column, 1);
+ uiLayoutSetActive(sub, RNA_boolean_get(&strip_ptr, "use_auto_blend") == 0);
+ uiItemR(sub, &strip_ptr, "blend_in", 0, NULL, ICON_NONE);
+ uiItemR(sub, &strip_ptr, "blend_out", 0, NULL, ICON_NONE);
/* settings */
- column= uiLayoutColumn(layout, 1);
- uiLayoutSetActive(column, !(RNA_boolean_get(&strip_ptr, "use_animated_influence") || RNA_boolean_get(&strip_ptr, "use_animated_time")));
- uiItemL(column, "Playback Settings:", ICON_NONE);
- uiItemR(column, &strip_ptr, "mute", 0, NULL, ICON_NONE);
- uiItemR(column, &strip_ptr, "use_reverse", 0, NULL, ICON_NONE);
+ column = uiLayoutColumn(layout, 1);
+ uiLayoutSetActive(column, !(RNA_boolean_get(&strip_ptr, "use_animated_influence") || RNA_boolean_get(&strip_ptr, "use_animated_time")));
+ uiItemL(column, "Playback Settings:", ICON_NONE);
+ uiItemR(column, &strip_ptr, "mute", 0, NULL, ICON_NONE);
+ uiItemR(column, &strip_ptr, "use_reverse", 0, NULL, ICON_NONE);
}
}
@@ -357,7 +357,7 @@ static void nla_panel_properties(const bContext *C, Panel *pa)
static void nla_panel_actclip(const bContext *C, Panel *pa)
{
PointerRNA strip_ptr;
- uiLayout *layout= pa->layout;
+ uiLayout *layout = pa->layout;
uiLayout *column, *row;
uiBlock *block;
@@ -365,35 +365,35 @@ static void nla_panel_actclip(const bContext *C, Panel *pa)
if (!nla_panel_context(C, NULL, NULL, &strip_ptr))
return;
- block= uiLayoutGetBlock(layout);
+ block = uiLayoutGetBlock(layout);
uiBlockSetHandleFunc(block, do_nla_region_buttons, NULL);
/* Strip Properties ------------------------------------- */
/* action pointer */
- row= uiLayoutRow(layout, 1);
- uiItemR(row, &strip_ptr, "action", 0, NULL, ICON_ACTION);
+ row = uiLayoutRow(layout, 1);
+ uiItemR(row, &strip_ptr, "action", 0, NULL, ICON_ACTION);
/* action extents */
// XXX custom names were used here (to avoid the prefixes)... probably not necessary in future?
- column= uiLayoutColumn(layout, 1);
- uiItemL(column, "Action Extents:", ICON_NONE);
- uiItemR(column, &strip_ptr, "action_frame_start", 0, "Start Frame", ICON_NONE);
- uiItemR(column, &strip_ptr, "action_frame_end", 0, "End Frame", ICON_NONE);
- uiItemO(column, NULL, ICON_NONE, "NLA_OT_action_sync_length");
+ column = uiLayoutColumn(layout, 1);
+ uiItemL(column, "Action Extents:", ICON_NONE);
+ uiItemR(column, &strip_ptr, "action_frame_start", 0, "Start Frame", ICON_NONE);
+ uiItemR(column, &strip_ptr, "action_frame_end", 0, "End Frame", ICON_NONE);
+ uiItemO(column, NULL, ICON_NONE, "NLA_OT_action_sync_length");
/* action usage */
- column= uiLayoutColumn(layout, 1);
- uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_time")==0);
- uiItemL(column, "Playback Settings:", ICON_NONE);
- uiItemR(column, &strip_ptr, "scale", 0, NULL, ICON_NONE);
- uiItemR(column, &strip_ptr, "repeat", 0, NULL, ICON_NONE);
+ column = uiLayoutColumn(layout, 1);
+ uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_time") == 0);
+ uiItemL(column, "Playback Settings:", ICON_NONE);
+ uiItemR(column, &strip_ptr, "scale", 0, NULL, ICON_NONE);
+ uiItemR(column, &strip_ptr, "repeat", 0, NULL, ICON_NONE);
}
/* evaluation settings for active NLA-Strip */
static void nla_panel_evaluation(const bContext *C, Panel *pa)
{
PointerRNA strip_ptr;
- uiLayout *layout= pa->layout;
+ uiLayout *layout = pa->layout;
uiLayout *col, *sub;
uiBlock *block;
@@ -401,22 +401,22 @@ static void nla_panel_evaluation(const bContext *C, Panel *pa)
if (!nla_panel_context(C, NULL, NULL, &strip_ptr))
return;
- block= uiLayoutGetBlock(layout);
+ block = uiLayoutGetBlock(layout);
uiBlockSetHandleFunc(block, do_nla_region_buttons, NULL);
- col= uiLayoutColumn(layout, 1);
+ col = uiLayoutColumn(layout, 1);
uiItemR(col, &strip_ptr, "use_animated_influence", 0, NULL, ICON_NONE);
- sub= uiLayoutColumn(col, 1);
+ sub = uiLayoutColumn(col, 1);
uiLayoutSetEnabled(sub, RNA_boolean_get(&strip_ptr, "use_animated_influence"));
uiItemR(sub, &strip_ptr, "influence", 0, NULL, ICON_NONE);
- col= uiLayoutColumn(layout, 1);
- sub= uiLayoutRow(col, 0);
+ col = uiLayoutColumn(layout, 1);
+ sub = uiLayoutRow(col, 0);
uiItemR(sub, &strip_ptr, "use_animated_time", 0, NULL, ICON_NONE);
uiItemR(sub, &strip_ptr, "use_animated_time_cyclic", 0, NULL, ICON_NONE);
- sub= uiLayoutRow(col, 0);
+ sub = uiLayoutRow(col, 0);
uiLayoutSetEnabled(sub, RNA_boolean_get(&strip_ptr, "use_animated_time"));
uiItemR(sub, &strip_ptr, "strip_time", 0, NULL, ICON_NONE);
}
@@ -433,30 +433,30 @@ static void nla_panel_modifiers(const bContext *C, Panel *pa)
/* check context and also validity of pointer */
if (!nla_panel_context(C, NULL, NULL, &strip_ptr))
return;
- strip= strip_ptr.data;
+ strip = strip_ptr.data;
- block= uiLayoutGetBlock(pa->layout);
+ block = uiLayoutGetBlock(pa->layout);
uiBlockSetHandleFunc(block, do_nla_region_buttons, NULL);
/* 'add modifier' button at top of panel */
{
- row= uiLayoutRow(pa->layout, 0);
- block= uiLayoutGetBlock(row);
+ row = uiLayoutRow(pa->layout, 0);
+ block = uiLayoutGetBlock(row);
// XXX for now, this will be a operator button which calls a temporary 'add modifier' operator
// FIXME: we need to set the only-active property so that this will only add modifiers for the active strip (not all selected)
uiDefButO(block, BUT, "NLA_OT_fmodifier_add", WM_OP_INVOKE_REGION_WIN, IFACE_("Add Modifier"), 10, 0, 150, 20,
- TIP_("Adds a new F-Modifier for the active NLA Strip"));
+ TIP_("Adds a new F-Modifier for the active NLA Strip"));
/* copy/paste (as sub-row)*/
- row= uiLayoutRow(row, 1);
- uiItemO(row, "", ICON_COPYDOWN, "NLA_OT_fmodifier_copy");
- uiItemO(row, "", ICON_PASTEDOWN, "NLA_OT_fmodifier_paste");
+ row = uiLayoutRow(row, 1);
+ uiItemO(row, "", ICON_COPYDOWN, "NLA_OT_fmodifier_copy");
+ uiItemO(row, "", ICON_PASTEDOWN, "NLA_OT_fmodifier_paste");
}
/* draw each modifier */
- for (fcm= strip->modifiers.first; fcm; fcm= fcm->next) {
- col= uiLayoutColumn(pa->layout, 1);
+ for (fcm = strip->modifiers.first; fcm; fcm = fcm->next) {
+ col = uiLayoutColumn(pa->layout, 1);
ANIM_uiTemplate_fmodifier_draw(col, strip_ptr.id.data, &strip->modifiers, fcm);
}
@@ -469,54 +469,54 @@ void nla_buttons_register(ARegionType *art)
{
PanelType *pt;
- pt= MEM_callocN(sizeof(PanelType), "spacetype nla panel animdata");
+ pt = MEM_callocN(sizeof(PanelType), "spacetype nla panel animdata");
strcpy(pt->idname, "NLA_PT_animdata");
strcpy(pt->label, "Animation Data");
- pt->draw= nla_panel_animdata;
- pt->poll= nla_animdata_panel_poll;
- pt->flag= PNL_DEFAULT_CLOSED;
+ pt->draw = nla_panel_animdata;
+ pt->poll = nla_animdata_panel_poll;
+ pt->flag = PNL_DEFAULT_CLOSED;
BLI_addtail(&art->paneltypes, pt);
- pt= MEM_callocN(sizeof(PanelType), "spacetype nla panel track");
+ pt = MEM_callocN(sizeof(PanelType), "spacetype nla panel track");
strcpy(pt->idname, "NLA_PT_track");
strcpy(pt->label, "Active Track");
- pt->draw= nla_panel_track;
- pt->poll= nla_track_panel_poll;
+ pt->draw = nla_panel_track;
+ pt->poll = nla_track_panel_poll;
BLI_addtail(&art->paneltypes, pt);
- pt= MEM_callocN(sizeof(PanelType), "spacetype nla panel properties");
+ pt = MEM_callocN(sizeof(PanelType), "spacetype nla panel properties");
strcpy(pt->idname, "NLA_PT_properties");
strcpy(pt->label, "Active Strip");
- pt->draw= nla_panel_properties;
- pt->poll= nla_strip_panel_poll;
+ pt->draw = nla_panel_properties;
+ pt->poll = nla_strip_panel_poll;
BLI_addtail(&art->paneltypes, pt);
- pt= MEM_callocN(sizeof(PanelType), "spacetype nla panel properties");
+ pt = MEM_callocN(sizeof(PanelType), "spacetype nla panel properties");
strcpy(pt->idname, "NLA_PT_actionclip");
strcpy(pt->label, "Action Clip");
- pt->draw= nla_panel_actclip;
- pt->poll= nla_strip_actclip_panel_poll;
+ pt->draw = nla_panel_actclip;
+ pt->poll = nla_strip_actclip_panel_poll;
BLI_addtail(&art->paneltypes, pt);
- pt= MEM_callocN(sizeof(PanelType), "spacetype nla panel evaluation");
+ pt = MEM_callocN(sizeof(PanelType), "spacetype nla panel evaluation");
strcpy(pt->idname, "NLA_PT_evaluation");
strcpy(pt->label, "Evaluation");
- pt->draw= nla_panel_evaluation;
- pt->poll= nla_strip_eval_panel_poll;
+ pt->draw = nla_panel_evaluation;
+ pt->poll = nla_strip_eval_panel_poll;
BLI_addtail(&art->paneltypes, pt);
- pt= MEM_callocN(sizeof(PanelType), "spacetype nla panel modifiers");
+ pt = MEM_callocN(sizeof(PanelType), "spacetype nla panel modifiers");
strcpy(pt->idname, "NLA_PT_modifiers");
strcpy(pt->label, "Modifiers");
- pt->draw= nla_panel_modifiers;
- pt->poll= nla_strip_eval_panel_poll;
+ pt->draw = nla_panel_modifiers;
+ pt->poll = nla_strip_eval_panel_poll;
BLI_addtail(&art->paneltypes, pt);
}
static int nla_properties(bContext *C, wmOperator *UNUSED(op))
{
- ScrArea *sa= CTX_wm_area(C);
- ARegion *ar= nla_has_buttons_region(sa);
+ ScrArea *sa = CTX_wm_area(C);
+ ARegion *ar = nla_has_buttons_region(sa);
if (ar)
ED_region_toggle_hidden(C, ar);
diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c
index 1d323cb6a4f..e3c831824f1 100644
--- a/source/blender/editors/space_nla/nla_channels.c
+++ b/source/blender/editors/space_nla/nla_channels.c
@@ -61,7 +61,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 from the standard Animation Editor ones */
@@ -74,22 +74,22 @@
* --> Most channels are now selection only...
*/
-static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, short selectmode)
+static int mouse_nla_channels(bAnimContext *ac, float x, int channel_index, short selectmode)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
- View2D *v2d= &ac->ar->v2d;
+ View2D *v2d = &ac->ar->v2d;
int notifierFlags = 0;
/* get the channel that was clicked on */
- /* filter channels */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS);
+ /* filter channels */
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
- /* get channel from index */
- ale= BLI_findlink(&anim_data, channel_index);
+ /* get channel from index */
+ ale = BLI_findlink(&anim_data, channel_index);
if (ale == NULL) {
/* channel not found */
if (G.debug & G_DEBUG)
@@ -104,8 +104,8 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho
switch (ale->type) {
case ANIMTYPE_SCENE:
{
- Scene *sce= (Scene *)ale->data;
- AnimData *adt= sce->adt;
+ Scene *sce = (Scene *)ale->data;
+ AnimData *adt = sce->adt;
/* set selection status */
if (selectmode == SELECT_INVERT) {
@@ -118,23 +118,23 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho
if (adt) adt->flag |= ADT_UI_SELECTED;
}
- notifierFlags |= (ND_ANIMCHAN|NA_SELECTED);
+ notifierFlags |= (ND_ANIMCHAN | NA_SELECTED);
}
- break;
+ break;
case ANIMTYPE_OBJECT:
{
- bDopeSheet *ads= (bDopeSheet *)ac->data;
- Scene *sce= (Scene *)ads->source;
- Base *base= (Base *)ale->data;
- Object *ob= base->object;
- AnimData *adt= ob->adt;
+ bDopeSheet *ads = (bDopeSheet *)ac->data;
+ Scene *sce = (Scene *)ads->source;
+ Base *base = (Base *)ale->data;
+ Object *ob = base->object;
+ AnimData *adt = ob->adt;
if (nlaedit_is_tweakmode_on(ac) == 0) {
/* set selection status */
if (selectmode == SELECT_INVERT) {
/* swap select */
base->flag ^= SELECT;
- ob->flag= base->flag;
+ ob->flag = base->flag;
if (adt) adt->flag ^= ADT_UI_SELECTED;
}
@@ -143,10 +143,10 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho
/* deselect all */
// TODO: should this deselect all other types of channels too?
- for (b= sce->base.first; b; b= b->next) {
+ for (b = sce->base.first; b; b = b->next) {
b->flag &= ~SELECT;
- b->object->flag= b->flag;
- if (b->object->adt) b->object->adt->flag &= ~(ADT_UI_SELECTED|ADT_UI_ACTIVE);
+ b->object->flag = b->flag;
+ if (b->object->adt) b->object->adt->flag &= ~(ADT_UI_SELECTED | ADT_UI_ACTIVE);
}
/* select object now */
@@ -159,13 +159,13 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho
adt->flag |= ADT_UI_ACTIVE;
/* notifiers - channel was selected */
- notifierFlags |= (ND_ANIMCHAN|NA_SELECTED);
+ notifierFlags |= (ND_ANIMCHAN | NA_SELECTED);
}
}
- break;
+ break;
case ANIMTYPE_FILLACTD: /* Action Expander */
- case ANIMTYPE_DSMAT: /* Datablock AnimData Expanders */
+ case ANIMTYPE_DSMAT: /* Datablock AnimData Expanders */
case ANIMTYPE_DSLAM:
case ANIMTYPE_DSCAM:
case ANIMTYPE_DSCUR:
@@ -198,47 +198,47 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho
ale->adt->flag |= ADT_UI_ACTIVE;
}
- notifierFlags |= (ND_ANIMCHAN|NA_SELECTED);
+ notifierFlags |= (ND_ANIMCHAN | NA_SELECTED);
}
- break;
+ break;
case ANIMTYPE_NLATRACK:
{
- NlaTrack *nlt= (NlaTrack *)ale->data;
- AnimData *adt= ale->adt;
+ NlaTrack *nlt = (NlaTrack *)ale->data;
+ AnimData *adt = ale->adt;
short offset;
/* offset for start of channel (on LHS of channel-list) */
if (ale->id) {
/* special exception for materials and particles */
- if (ELEM(GS(ale->id->name),ID_MA,ID_PA))
- offset= 21 + NLACHANNEL_BUTTON_WIDTH;
+ if (ELEM(GS(ale->id->name), ID_MA, ID_PA))
+ offset = 21 + NLACHANNEL_BUTTON_WIDTH;
else
- offset= 14;
+ offset = 14;
}
else
- offset= 0;
+ offset = 0;
- if (x >= (v2d->cur.xmax-NLACHANNEL_BUTTON_WIDTH)) {
+ if (x >= (v2d->cur.xmax - NLACHANNEL_BUTTON_WIDTH)) {
/* toggle protection (only if there's a toggle there) */
nlt->flag ^= NLATRACK_PROTECTED;
/* notifier flags - channel was edited */
- notifierFlags |= (ND_ANIMCHAN|NA_EDITED);
+ notifierFlags |= (ND_ANIMCHAN | NA_EDITED);
}
- else if (x >= (v2d->cur.xmax-2*NLACHANNEL_BUTTON_WIDTH)) {
+ else if (x >= (v2d->cur.xmax - 2 * NLACHANNEL_BUTTON_WIDTH)) {
/* toggle mute */
nlt->flag ^= NLATRACK_MUTED;
/* notifier flags - channel was edited */
- notifierFlags |= (ND_ANIMCHAN|NA_EDITED);
+ notifierFlags |= (ND_ANIMCHAN | NA_EDITED);
}
- else if (x <= ((NLACHANNEL_BUTTON_WIDTH*2)+offset)) {
+ else if (x <= ((NLACHANNEL_BUTTON_WIDTH * 2) + offset)) {
/* toggle 'solo' */
BKE_nlatrack_solo_toggle(adt, nlt);
/* notifier flags - channel was edited */
- notifierFlags |= (ND_ANIMCHAN|NA_EDITED);
+ notifierFlags |= (ND_ANIMCHAN | NA_EDITED);
}
else if (nlaedit_is_tweakmode_on(ac) == 0) {
/* set selection */
@@ -257,19 +257,19 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho
ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, nlt, ANIMTYPE_NLATRACK);
/* notifier flags - channel was selected */
- notifierFlags |= (ND_ANIMCHAN|NA_SELECTED);
+ notifierFlags |= (ND_ANIMCHAN | NA_SELECTED);
}
}
- break;
+ break;
case ANIMTYPE_NLAACTION:
{
- AnimData *adt= BKE_animdata_from_id(ale->id);
+ AnimData *adt = BKE_animdata_from_id(ale->id);
- if (x >= (v2d->cur.xmax-NLACHANNEL_BUTTON_WIDTH)) {
+ if (x >= (v2d->cur.xmax - NLACHANNEL_BUTTON_WIDTH)) {
if (nlaedit_is_tweakmode_on(ac) == 0) {
/* 'push-down' action - only usable when not in TweakMode */
// TODO: make this use the operator instead of calling the function directly
- // however, calling the operator requires that we supply the args, and that works with proper buttons only
+ // however, calling the operator requires that we supply the args, and that works with proper buttons only
BKE_nla_action_pushdown(adt);
}
else {
@@ -281,7 +281,7 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho
notifierFlags |= ND_NLA_ACTCHANGE;
}
}
- break;
+ break;
default:
if (G.debug & G_DEBUG)
@@ -314,15 +314,15 @@ static int nlachannels_mouseclick_invoke(bContext *C, wmOperator *op, wmEvent *e
return OPERATOR_CANCELLED;
/* get useful pointers from animation context data */
- snla= (SpaceNla *)ac.sl;
- ar= ac.ar;
- v2d= &ar->v2d;
+ snla = (SpaceNla *)ac.sl;
+ ar = ac.ar;
+ v2d = &ar->v2d;
/* select mode is either replace (deselect all, then add) or add/extend */
if (RNA_boolean_get(op->ptr, "extend"))
- selectmode= SELECT_INVERT;
+ selectmode = SELECT_INVERT;
else
- selectmode= SELECT_REPLACE;
+ selectmode = SELECT_REPLACE;
/* figure out which channel user clicked in
* Note: although channels technically start at y= NLACHANNEL_FIRST, we need to adjust by half a channel's height
@@ -333,15 +333,15 @@ static int nlachannels_mouseclick_invoke(bContext *C, wmOperator *op, wmEvent *e
UI_view2d_listview_view_to_cell(v2d, NLACHANNEL_NAMEWIDTH, NLACHANNEL_STEP(snla), 0, (float)NLACHANNEL_HEIGHT_HALF(snla), x, y, NULL, &channel_index);
/* handle mouse-click in the relevant channel then */
- notifierFlags= mouse_nla_channels(&ac, x, channel_index, selectmode);
+ notifierFlags = mouse_nla_channels(&ac, x, channel_index, selectmode);
/* set notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|notifierFlags, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | notifierFlags, NULL);
return OPERATOR_FINISHED;
}
-void NLA_OT_channels_click (wmOperatorType *ot)
+void NLA_OT_channels_click(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Mouse Click on NLA Channels";
@@ -353,7 +353,7 @@ void NLA_OT_channels_click (wmOperatorType *ot)
ot->poll = ED_operator_nla_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* id-props */
RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); // SHIFTKEY
@@ -365,7 +365,7 @@ void NLA_OT_channels_click (wmOperatorType *ot)
/* ******************** Add Tracks Operator ***************************** */
/* Add NLA Tracks to the same AnimData block as a selected track, or above the selected tracks */
-static int nlaedit_add_tracks_exec (bContext *C, wmOperator *op)
+static int nlaedit_add_tracks_exec(bContext *C, wmOperator *op)
{
bAnimContext ac;
@@ -374,21 +374,21 @@ static int nlaedit_add_tracks_exec (bContext *C, wmOperator *op)
int filter;
AnimData *lastAdt = NULL;
- short above_sel= RNA_boolean_get(op->ptr, "above_selected");
+ short above_sel = RNA_boolean_get(op->ptr, "above_selected");
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
return OPERATOR_CANCELLED;
/* get a list of the AnimData blocks being shown in the NLA */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_SEL);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_SEL);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* add tracks... */
- for (ale= anim_data.first; ale; ale= ale->next) {
+ for (ale = anim_data.first; ale; ale = ale->next) {
if (ale->type == ANIMTYPE_NLATRACK) {
- NlaTrack *nlt= (NlaTrack *)ale->data;
- AnimData *adt= ale->adt;
+ NlaTrack *nlt = (NlaTrack *)ale->data;
+ AnimData *adt = ale->adt;
/* check if just adding a new track above this one,
* or whether we're adding a new one to the top of the stack that this one belongs to
@@ -400,7 +400,7 @@ static int nlaedit_add_tracks_exec (bContext *C, wmOperator *op)
else if ((lastAdt == NULL) || (adt != lastAdt)) {
/* add one track to the top of the owning AnimData's stack, then don't add anymore to this stack */
add_nlatrack(adt, NULL);
- lastAdt= adt;
+ lastAdt = adt;
}
}
}
@@ -409,13 +409,13 @@ static int nlaedit_add_tracks_exec (bContext *C, wmOperator *op)
BLI_freelistN(&anim_data);
/* set notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_EDITED, NULL);
/* done */
return OPERATOR_FINISHED;
}
-void NLA_OT_tracks_add (wmOperatorType *ot)
+void NLA_OT_tracks_add(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Add Track(s)";
@@ -427,7 +427,7 @@ void NLA_OT_tracks_add (wmOperatorType *ot)
ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "above_selected", 0, "Above Selected", "Add a new NLA Track above every existing selected one");
@@ -436,7 +436,7 @@ void NLA_OT_tracks_add (wmOperatorType *ot)
/* ******************** Delete Tracks Operator ***************************** */
/* Delete selected NLA Tracks */
-static int nlaedit_delete_tracks_exec (bContext *C, wmOperator *UNUSED(op))
+static int nlaedit_delete_tracks_exec(bContext *C, wmOperator *UNUSED(op))
{
bAnimContext ac;
@@ -449,14 +449,14 @@ static int nlaedit_delete_tracks_exec (bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
/* get a list of the AnimData blocks being shown in the NLA */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_SEL);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_SEL);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* delete tracks */
- for (ale= anim_data.first; ale; ale= ale->next) {
+ for (ale = anim_data.first; ale; ale = ale->next) {
if (ale->type == ANIMTYPE_NLATRACK) {
- NlaTrack *nlt= (NlaTrack *)ale->data;
- AnimData *adt= ale->adt;
+ NlaTrack *nlt = (NlaTrack *)ale->data;
+ AnimData *adt = ale->adt;
/* if track is currently 'solo', then AnimData should have its
* 'has solo' flag disabled
@@ -473,13 +473,13 @@ static int nlaedit_delete_tracks_exec (bContext *C, wmOperator *UNUSED(op))
BLI_freelistN(&anim_data);
/* set notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_EDITED, NULL);
/* done */
return OPERATOR_FINISHED;
}
-void NLA_OT_delete_tracks (wmOperatorType *ot)
+void NLA_OT_delete_tracks(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Delete Tracks";
@@ -491,7 +491,7 @@ void NLA_OT_delete_tracks (wmOperatorType *ot)
ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* *********************************************** */
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
index 7ed49025814..c12cd6f2d39 100644
--- a/source/blender/editors/space_nla/nla_draw.c
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -66,7 +66,7 @@
#include "UI_view2d.h"
-#include "nla_intern.h" // own include
+#include "nla_intern.h" /* own include */
/* *********************************************** */
@@ -77,29 +77,29 @@
/* get colors for drawing Action-Line
* NOTE: color returned includes fine-tuned alpha!
*/
-static void nla_action_get_color (AnimData *adt, bAction *act, float color[4])
+static void nla_action_get_color(AnimData *adt, bAction *act, float color[4])
{
if (adt && (adt->flag & ADT_NLA_EDIT_ON)) {
// greenish color (same as tweaking strip) - hardcoded for now
- color[0]= 0.30f;
- color[1]= 0.95f;
- color[2]= 0.10f;
- color[3]= 0.30f;
+ color[0] = 0.30f;
+ color[1] = 0.95f;
+ color[2] = 0.10f;
+ color[3] = 0.30f;
}
else {
if (act) {
// reddish color - hardcoded for now
- color[0]= 0.8f;
- color[1]= 0.2f;
- color[2]= 0.0f;
- color[3]= 0.4f;
+ color[0] = 0.8f;
+ color[1] = 0.2f;
+ color[2] = 0.0f;
+ color[3] = 0.4f;
}
else {
// greyish-red color - hardcoded for now
- color[0]= 0.6f;
- color[1]= 0.5f;
- color[2]= 0.5f;
- color[3]= 0.3f;
+ color[0] = 0.6f;
+ color[1] = 0.5f;
+ color[2] = 0.5f;
+ color[3] = 0.3f;
}
}
@@ -109,7 +109,7 @@ static void nla_action_get_color (AnimData *adt, bAction *act, float color[4])
}
/* draw the keyframes in the specified Action */
-static void nla_action_draw_keyframes (AnimData *adt, bAction *act, View2D *v2d, float y, float ymin, float ymax)
+static void nla_action_draw_keyframes(AnimData *adt, bAction *act, View2D *v2d, float y, float ymin, float ymax)
{
DLRBT_Tree keys;
ActKeyColumn *ak;
@@ -132,13 +132,13 @@ static void nla_action_draw_keyframes (AnimData *adt, bAction *act, View2D *v2d,
color[3] *= 2.5f;
glColor4fv(color);
- /* - draw a rect from the first to the last frame (no extra overlaps for now)
+ /* - draw a rect from the first to the last frame (no extra overlaps for now)
* that is slightly stumpier than the track background (hardcoded 2-units here)
*/
- f1= ((ActKeyColumn *)keys.first)->cfra;
- f2= ((ActKeyColumn *)keys.last)->cfra;
+ f1 = ((ActKeyColumn *)keys.first)->cfra;
+ f2 = ((ActKeyColumn *)keys.last)->cfra;
- glRectf(f1, ymin+2, f2, ymax-2);
+ glRectf(f1, ymin + 2, f2, ymax - 2);
/* get View2D scaling factor */
@@ -150,7 +150,7 @@ static void nla_action_draw_keyframes (AnimData *adt, bAction *act, View2D *v2d,
/* just draw each keyframe as a simple dot (regardless of the selection status)
* - size is 3.0f which is smaller than the editable keyframes, so that there is a distinction
*/
- for (ak= keys.first; ak; ak= ak->next)
+ for (ak = keys.first; ak; ak = ak->next)
draw_keyframe_shape(ak->cfra, y, xscale, 3.0f, 0, ak->key_type, KEYFRAME_SHAPE_FRAME, 1.0f);
/* free icons */
@@ -160,23 +160,23 @@ static void nla_action_draw_keyframes (AnimData *adt, bAction *act, View2D *v2d,
/* Strips (Proper) ---------------------- */
/* get colors for drawing NLA-Strips */
-static void nla_strip_get_color_inside (AnimData *adt, NlaStrip *strip, float color[3])
+static void nla_strip_get_color_inside(AnimData *adt, NlaStrip *strip, float color[3])
{
if (strip->type == NLASTRIP_TYPE_TRANSITION) {
/* Transition Clip */
if (strip->flag & NLASTRIP_FLAG_SELECT) {
/* selected - use a bright blue color */
// FIXME: hardcoded temp-hack colors
- color[0]= 0.18f;
- color[1]= 0.46f;
- color[2]= 0.86f;
+ color[0] = 0.18f;
+ color[1] = 0.46f;
+ color[2] = 0.86f;
}
else {
/* normal, unselected strip - use (hardly noticeable) blue tinge */
// FIXME: hardcoded temp-hack colors
- color[0]= 0.11f;
- color[1]= 0.15f;
- color[2]= 0.19f;
+ color[0] = 0.11f;
+ color[1] = 0.15f;
+ color[2] = 0.19f;
}
}
else if (strip->type == NLASTRIP_TYPE_META) {
@@ -185,16 +185,16 @@ static void nla_strip_get_color_inside (AnimData *adt, NlaStrip *strip, float co
if (strip->flag & NLASTRIP_FLAG_SELECT) {
/* selected - use a bold purple color */
// FIXME: hardcoded temp-hack colors
- color[0]= 0.41f;
- color[1]= 0.13f;
- color[2]= 0.59f;
+ color[0] = 0.41f;
+ color[1] = 0.13f;
+ color[2] = 0.59f;
}
else {
/* normal, unselected strip - use (hardly noticeable) dark purple tinge */
// FIXME: hardcoded temp-hack colors
- color[0]= 0.20f;
- color[1]= 0.15f;
- color[2]= 0.26f;
+ color[0] = 0.20f;
+ color[1] = 0.15f;
+ color[2] = 0.26f;
}
}
else if (strip->type == NLASTRIP_TYPE_SOUND) {
@@ -202,16 +202,16 @@ static void nla_strip_get_color_inside (AnimData *adt, NlaStrip *strip, float co
if (strip->flag & NLASTRIP_FLAG_SELECT) {
/* selected - use a bright teal color */
// FIXME: hardcoded temp-hack colors
- color[0]= 0.12f;
- color[1]= 0.48f;
- color[2]= 0.48f;
+ color[0] = 0.12f;
+ color[1] = 0.48f;
+ color[2] = 0.48f;
}
else {
/* normal, unselected strip - use (hardly noticeable) teal tinge */
// FIXME: hardcoded temp-hack colors
- color[0]= 0.17f;
- color[1]= 0.24f;
- color[2]= 0.24f;
+ color[0] = 0.17f;
+ color[1] = 0.24f;
+ color[2] = 0.24f;
}
}
else {
@@ -221,18 +221,18 @@ static void nla_strip_get_color_inside (AnimData *adt, NlaStrip *strip, float co
* however, this case should be skipped for when not in EditMode...
*/
// FIXME: hardcoded temp-hack colors
- color[0]= 0.3f;
- color[1]= 0.95f;
- color[2]= 0.1f;
+ color[0] = 0.3f;
+ color[1] = 0.95f;
+ color[2] = 0.1f;
}
else if (strip->flag & NLASTRIP_FLAG_TWEAKUSER) {
/* alert user that this strip is also used by the tweaking track (this is set when going into
* 'editmode' for that strip), since the edits made here may not be what the user anticipated
*/
// FIXME: hardcoded temp-hack colors
- color[0]= 0.85f;
- color[1]= 0.0f;
- color[2]= 0.0f;
+ color[0] = 0.85f;
+ color[1] = 0.0f;
+ color[2] = 0.0f;
}
else if (strip->flag & NLASTRIP_FLAG_SELECT) {
/* selected strip - use theme color for selected */
@@ -246,7 +246,7 @@ static void nla_strip_get_color_inside (AnimData *adt, NlaStrip *strip, float co
}
/* helper call for drawing influence/time control curves for a given NLA-strip */
-static void nla_draw_strip_curves (NlaStrip *strip, float yminc, float ymaxc)
+static void nla_draw_strip_curves(NlaStrip *strip, float yminc, float ymaxc)
{
const float yheight = ymaxc - yminc;
@@ -261,39 +261,39 @@ static void nla_draw_strip_curves (NlaStrip *strip, float yminc, float ymaxc)
/* influence -------------------------- */
if (strip->flag & NLASTRIP_FLAG_USR_INFLUENCE) {
- FCurve *fcu= list_find_fcurve(&strip->fcurves, "influence", 0);
+ FCurve *fcu = list_find_fcurve(&strip->fcurves, "influence", 0);
float cfra;
/* plot the curve (over the strip's main region) */
glBegin(GL_LINE_STRIP);
- /* sample at 1 frame intervals, and draw
- * - min y-val is yminc, max is y-maxc, so clamp in those regions
- */
- for (cfra= strip->start; cfra <= strip->end; cfra += 1.0f) {
- float y= evaluate_fcurve(fcu, cfra); // assume this to be in 0-1 range
- glVertex2f(cfra, ((y*yheight)+yminc));
- }
+ /* sample at 1 frame intervals, and draw
+ * - min y-val is yminc, max is y-maxc, so clamp in those regions
+ */
+ for (cfra = strip->start; cfra <= strip->end; cfra += 1.0f) {
+ float y = evaluate_fcurve(fcu, cfra); // assume this to be in 0-1 range
+ glVertex2f(cfra, ((y * yheight) + yminc));
+ }
glEnd(); // GL_LINE_STRIP
}
else {
/* use blend in/out values only if both aren't zero */
- if ((IS_EQF(strip->blendin, 0.0f) && IS_EQF(strip->blendout, 0.0f))==0) {
+ if ((IS_EQF(strip->blendin, 0.0f) && IS_EQF(strip->blendout, 0.0f)) == 0) {
glBegin(GL_LINE_STRIP);
- /* start of strip - if no blendin, start straight at 1, otherwise from 0 to 1 over blendin frames */
- if (IS_EQF(strip->blendin, 0.0f) == 0) {
- glVertex2f(strip->start, yminc);
- glVertex2f(strip->start + strip->blendin, ymaxc);
- }
- else
- glVertex2f(strip->start, ymaxc);
+ /* start of strip - if no blendin, start straight at 1, otherwise from 0 to 1 over blendin frames */
+ if (IS_EQF(strip->blendin, 0.0f) == 0) {
+ glVertex2f(strip->start, yminc);
+ glVertex2f(strip->start + strip->blendin, ymaxc);
+ }
+ else
+ glVertex2f(strip->start, ymaxc);
- /* end of strip */
- if (IS_EQF(strip->blendout, 0.0f) == 0) {
- glVertex2f(strip->end - strip->blendout, ymaxc);
- glVertex2f(strip->end, yminc);
- }
- else
- glVertex2f(strip->end, ymaxc);
+ /* end of strip */
+ if (IS_EQF(strip->blendout, 0.0f) == 0) {
+ glVertex2f(strip->end - strip->blendout, ymaxc);
+ glVertex2f(strip->end, yminc);
+ }
+ else
+ glVertex2f(strip->end, ymaxc);
glEnd(); // GL_LINE_STRIP
}
}
@@ -307,9 +307,9 @@ static void nla_draw_strip_curves (NlaStrip *strip, float yminc, float ymaxc)
}
/* main call for drawing a single NLA-strip */
-static void nla_draw_strip (SpaceNla *snla, AnimData *adt, NlaTrack *nlt, NlaStrip *strip, View2D *v2d, float yminc, float ymaxc)
+static void nla_draw_strip(SpaceNla *snla, AnimData *adt, NlaTrack *nlt, NlaStrip *strip, View2D *v2d, float yminc, float ymaxc)
{
- short nonSolo = ((adt && (adt->flag & ADT_NLA_SOLO_TRACK)) && (nlt->flag & NLATRACK_SOLO)==0);
+ short nonSolo = ((adt && (adt->flag & ADT_NLA_SOLO_TRACK)) && (nlt->flag & NLATRACK_SOLO) == 0);
float color[3];
/* get color of strip */
@@ -335,34 +335,34 @@ static void nla_draw_strip (SpaceNla *snla, AnimData *adt, NlaTrack *nlt, NlaStr
/* draw the rect to the edge of the screen */
glBegin(GL_QUADS);
- glVertex2f(v2d->cur.xmin, yminc);
- glVertex2f(v2d->cur.xmin, ymaxc);
- glVertex2f(strip->start, ymaxc);
- glVertex2f(strip->start, yminc);
+ glVertex2f(v2d->cur.xmin, yminc);
+ glVertex2f(v2d->cur.xmin, ymaxc);
+ glVertex2f(strip->start, ymaxc);
+ glVertex2f(strip->start, yminc);
glEnd();
}
- /* no break needed... */
+ /* no break needed... */
/* this only draws after the strip */
case NLASTRIP_EXTEND_HOLD_FORWARD:
/* only need to try and draw if the next strip doesn't occur immediately after */
- if ((strip->next == NULL) || (IS_EQF(strip->next->start, strip->end)==0)) {
+ if ((strip->next == NULL) || (IS_EQF(strip->next->start, strip->end) == 0)) {
/* set the drawing color to the color of the strip, but this time less faint */
glColor4f(color[0], color[1], color[2], 0.3f);
/* draw the rect to the next strip or the edge of the screen */
glBegin(GL_QUADS);
- glVertex2f(strip->end, yminc);
- glVertex2f(strip->end, ymaxc);
+ glVertex2f(strip->end, yminc);
+ glVertex2f(strip->end, ymaxc);
- if (strip->next) {
- glVertex2f(strip->next->start, ymaxc);
- glVertex2f(strip->next->start, yminc);
- }
- else {
- glVertex2f(v2d->cur.xmax, ymaxc);
- glVertex2f(v2d->cur.xmax, yminc);
- }
+ if (strip->next) {
+ glVertex2f(strip->next->start, ymaxc);
+ glVertex2f(strip->next->start, yminc);
+ }
+ else {
+ glVertex2f(v2d->cur.xmax, ymaxc);
+ glVertex2f(v2d->cur.xmax, yminc);
+ }
glEnd();
}
break;
@@ -385,7 +385,7 @@ static void nla_draw_strip (SpaceNla *snla, AnimData *adt, NlaTrack *nlt, NlaStr
glColor4f(color[0], color[1], color[2], 0.1f);
glEnable(GL_BLEND);
- glRectf(strip->start, yminc, strip->end, ymaxc);
+ glRectf(strip->start, yminc, strip->end, ymaxc);
glDisable(GL_BLEND);
}
@@ -417,7 +417,7 @@ static void nla_draw_strip (SpaceNla *snla, AnimData *adt, NlaTrack *nlt, NlaStr
uiDrawBoxShade(GL_LINE_LOOP, strip->start, yminc, strip->end, ymaxc, 0.0, 0.0, 0.1);
/* if action-clip strip, draw lines delimiting repeats too (in the same color as outline) */
- if ((strip->type == NLASTRIP_TYPE_CLIP) && IS_EQF(strip->repeat, 1.0f)==0) {
+ if ((strip->type == NLASTRIP_TYPE_CLIP) && IS_EQF(strip->repeat, 1.0f) == 0) {
float repeatLen = (strip->actend - strip->actstart) * strip->scale;
int i;
@@ -429,20 +429,20 @@ static void nla_draw_strip (SpaceNla *snla, AnimData *adt, NlaTrack *nlt, NlaStr
/* don't draw if line would end up on or after the end of the strip */
if (repeatPos < strip->end)
- fdrawline(repeatPos, yminc+4, repeatPos, ymaxc-4);
+ fdrawline(repeatPos, yminc + 4, repeatPos, ymaxc - 4);
}
}
/* or if meta-strip, draw lines delimiting extents of sub-strips (in same color as outline, if more than 1 exists) */
else if ((strip->type == NLASTRIP_TYPE_META) && (strip->strips.first != strip->strips.last)) {
NlaStrip *cs;
- float y= (ymaxc-yminc)/2.0f + yminc;
+ float y = (ymaxc - yminc) / 2.0f + yminc;
/* only draw first-level of child-strips, but don't draw any lines on the endpoints */
- for (cs= strip->strips.first; cs; cs= cs->next) {
+ for (cs = strip->strips.first; cs; cs = cs->next) {
/* draw start-line if not same as end of previous (and only if not the first strip)
* - on upper half of strip
*/
- if ((cs->prev) && IS_EQF(cs->prev->end, cs->start)==0)
+ if ((cs->prev) && IS_EQF(cs->prev->end, cs->start) == 0)
fdrawline(cs->start, y, cs->start, ymaxc);
/* draw end-line if not the last strip
@@ -458,9 +458,9 @@ static void nla_draw_strip (SpaceNla *snla, AnimData *adt, NlaTrack *nlt, NlaStr
}
/* add the relevant text to the cache of text-strings to draw in pixelspace */
-static void nla_draw_strip_text (AnimData *adt, NlaTrack *nlt, NlaStrip *strip, int index, View2D *v2d, float yminc, float ymaxc)
+static void nla_draw_strip_text(AnimData *adt, NlaTrack *nlt, NlaStrip *strip, int index, View2D *v2d, float yminc, float ymaxc)
{
- short notSolo = ((adt && (adt->flag & ADT_NLA_SOLO_TRACK)) && (nlt->flag & NLATRACK_SOLO)==0);
+ short notSolo = ((adt && (adt->flag & ADT_NLA_SOLO_TRACK)) && (nlt->flag & NLATRACK_SOLO) == 0);
char str[256];
char col[4];
float xofs;
@@ -475,18 +475,18 @@ static void nla_draw_strip_text (AnimData *adt, NlaTrack *nlt, NlaStrip *strip,
}
/* set text color - if colors (see above) are light, draw black text, otherwise draw white */
- if (strip->flag & (NLASTRIP_FLAG_ACTIVE|NLASTRIP_FLAG_SELECT|NLASTRIP_FLAG_TWEAKUSER)) {
- col[0]= col[1]= col[2]= 0;
+ if (strip->flag & (NLASTRIP_FLAG_ACTIVE | NLASTRIP_FLAG_SELECT | NLASTRIP_FLAG_TWEAKUSER)) {
+ col[0] = col[1] = col[2] = 0;
}
else {
- col[0]= col[1]= col[2]= 255;
+ col[0] = col[1] = col[2] = 255;
}
/* text opacity depends on whether if there's a solo'd track, this isn't it */
if (notSolo == 0)
- col[3]= 255;
+ col[3] = 255;
else
- col[3]= 128;
+ col[3] = 128;
/* determine the amount of padding required - cannot be constant otherwise looks weird in some cases */
if ((strip->end - strip->start) <= 5.0f)
@@ -523,66 +523,66 @@ static void nla_draw_strip_frames_text(NlaTrack *UNUSED(nlt), NlaStrip *strip, V
* - 1 dp is compromise between lack of precision (ints only, as per sequencer)
* while also preserving some accuracy, since we do use floats
*/
- /* start frame */
+ /* start frame */
BLI_snprintf(numstr, sizeof(numstr), "%.1f", strip->start);
- UI_view2d_text_cache_add(v2d, strip->start-1.0f, ymaxc+ytol, numstr, col);
+ UI_view2d_text_cache_add(v2d, strip->start - 1.0f, ymaxc + ytol, numstr, col);
- /* end frame */
+ /* end frame */
BLI_snprintf(numstr, sizeof(numstr), "%.1f", strip->end);
- UI_view2d_text_cache_add(v2d, strip->end, ymaxc+ytol, numstr, col);
+ UI_view2d_text_cache_add(v2d, strip->end, ymaxc + ytol, numstr, col);
}
/* ---------------------- */
-void draw_nla_main_data (bAnimContext *ac, SpaceNla *snla, ARegion *ar)
+void draw_nla_main_data(bAnimContext *ac, SpaceNla *snla, ARegion *ar)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
- View2D *v2d= &ar->v2d;
- float y= 0.0f;
+ View2D *v2d = &ar->v2d;
+ float y = 0.0f;
size_t items;
int height;
/* build list of channels to draw */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS);
- items= ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS);
+ items = ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* Update max-extent of channels here (taking into account scrollers):
- * - this is done to allow the channel list to be scrollable, but must be done here
- * to avoid regenerating the list again and/or also because channels list is drawn first
+ * - this is done to allow the channel list to be scrollable, but must be done here
+ * to avoid regenerating the list again and/or also because channels list is drawn first
* - offset of NLACHANNEL_HEIGHT*2 is added to the height of the channels, as first is for
* start of list offset, and the second is as a correction for the scrollers.
*/
- height= ((items*NLACHANNEL_STEP(snla)) + (NLACHANNEL_HEIGHT(snla)*2));
+ height = ((items * NLACHANNEL_STEP(snla)) + (NLACHANNEL_HEIGHT(snla) * 2));
/* don't use totrect set, as the width stays the same
* (NOTE: this is ok here, the configuration is pretty straightforward)
*/
v2d->tot.ymin = (float)(-height);
/* loop through channels, and set up drawing depending on their type */
- y= (float)(-NLACHANNEL_HEIGHT(snla));
+ y = (float)(-NLACHANNEL_HEIGHT(snla));
- for (ale= anim_data.first; ale; ale= ale->next) {
- const float yminc= (float)(y - NLACHANNEL_HEIGHT_HALF(snla));
- const float ymaxc= (float)(y + NLACHANNEL_HEIGHT_HALF(snla));
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ const float yminc = (float)(y - NLACHANNEL_HEIGHT_HALF(snla));
+ const float ymaxc = (float)(y + NLACHANNEL_HEIGHT_HALF(snla));
/* check if visible */
- if ( IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
- IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax) )
+ if (IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
+ IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax) )
{
/* data to draw depends on the type of channel */
switch (ale->type) {
case ANIMTYPE_NLATRACK:
{
- AnimData *adt= ale->adt;
- NlaTrack *nlt= (NlaTrack *)ale->data;
+ AnimData *adt = ale->adt;
+ NlaTrack *nlt = (NlaTrack *)ale->data;
NlaStrip *strip;
int index;
/* draw each strip in the track (if visible) */
- for (strip=nlt->strips.first, index=1; strip; strip=strip->next, index++) {
+ for (strip = nlt->strips.first, index = 1; strip; strip = strip->next, index++) {
if (BKE_nlastrip_within_bounds(strip, v2d->cur.xmin, v2d->cur.xmax)) {
/* draw the visualisation of the strip */
nla_draw_strip(snla, adt, nlt, strip, v2d, yminc, ymaxc);
@@ -598,11 +598,11 @@ void draw_nla_main_data (bAnimContext *ac, SpaceNla *snla, ARegion *ar)
}
}
}
- break;
+ break;
case ANIMTYPE_NLAACTION:
{
- AnimData *adt= ale->adt;
+ AnimData *adt = ale->adt;
float color[4];
/* just draw a semi-shaded rect spanning the width of the viewable area if there's data,
@@ -618,27 +618,27 @@ void draw_nla_main_data (bAnimContext *ac, SpaceNla *snla, ARegion *ar)
/* draw slightly shifted up for greater separation from standard channels,
* but also slightly shorter for some more contrast when viewing the strips
*/
- glRectf(v2d->cur.xmin, yminc+NLACHANNEL_SKIP, v2d->cur.xmax, ymaxc-NLACHANNEL_SKIP);
+ glRectf(v2d->cur.xmin, yminc + NLACHANNEL_SKIP, v2d->cur.xmax, ymaxc - NLACHANNEL_SKIP);
/* draw keyframes in the action */
- nla_action_draw_keyframes(adt, ale->data, v2d, y, yminc+NLACHANNEL_SKIP, ymaxc-NLACHANNEL_SKIP);
+ nla_action_draw_keyframes(adt, ale->data, v2d, y, yminc + NLACHANNEL_SKIP, ymaxc - NLACHANNEL_SKIP);
/* draw 'embossed' lines above and below the strip for effect */
- /* white base-lines */
+ /* white base-lines */
glLineWidth(2.0f);
glColor4f(1.0f, 1.0f, 1.0f, 0.3);
- fdrawline(v2d->cur.xmin, yminc+NLACHANNEL_SKIP, v2d->cur.xmax, yminc+NLACHANNEL_SKIP);
- fdrawline(v2d->cur.xmin, ymaxc-NLACHANNEL_SKIP, v2d->cur.xmax, ymaxc-NLACHANNEL_SKIP);
+ fdrawline(v2d->cur.xmin, yminc + NLACHANNEL_SKIP, v2d->cur.xmax, yminc + NLACHANNEL_SKIP);
+ fdrawline(v2d->cur.xmin, ymaxc - NLACHANNEL_SKIP, v2d->cur.xmax, ymaxc - NLACHANNEL_SKIP);
- /* black top-lines */
+ /* black top-lines */
glLineWidth(1.0f);
glColor3f(0.0f, 0.0f, 0.0f);
- fdrawline(v2d->cur.xmin, yminc+NLACHANNEL_SKIP, v2d->cur.xmax, yminc+NLACHANNEL_SKIP);
- fdrawline(v2d->cur.xmin, ymaxc-NLACHANNEL_SKIP, v2d->cur.xmax, ymaxc-NLACHANNEL_SKIP);
+ fdrawline(v2d->cur.xmin, yminc + NLACHANNEL_SKIP, v2d->cur.xmax, yminc + NLACHANNEL_SKIP);
+ fdrawline(v2d->cur.xmin, ymaxc - NLACHANNEL_SKIP, v2d->cur.xmax, ymaxc - NLACHANNEL_SKIP);
glDisable(GL_BLEND);
}
- break;
+ break;
}
}
@@ -655,40 +655,40 @@ void draw_nla_main_data (bAnimContext *ac, SpaceNla *snla, ARegion *ar)
/* old code for drawing NLA channels using GL only */
// TODO: depreceate this code...
-static void draw_nla_channel_list_gl (bAnimContext *ac, ListBase *anim_data, View2D *v2d, float y)
+static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View2D *v2d, float y)
{
SpaceNla *snla = (SpaceNla *)ac->sl;
bAnimListElem *ale;
float x = 0.0f;
/* loop through channels, and set up drawing depending on their type */
- for (ale= anim_data->first; ale; ale= ale->next) {
- const float yminc= (float)(y - NLACHANNEL_HEIGHT_HALF(snla));
- const float ymaxc= (float)(y + NLACHANNEL_HEIGHT_HALF(snla));
- const float ydatac= (float)(y - 7);
+ for (ale = anim_data->first; ale; ale = ale->next) {
+ const float yminc = (float)(y - NLACHANNEL_HEIGHT_HALF(snla));
+ const float ymaxc = (float)(y + NLACHANNEL_HEIGHT_HALF(snla));
+ const float ydatac = (float)(y - 7);
/* check if visible */
- if ( IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
- IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax) )
+ if (IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
+ IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax) )
{
AnimData *adt = ale->adt;
- short indent= 0, offset= 0, sel= 0, group= 0, nonSolo= 0;
- int expand= -1, protect = -1, special= -1, mute = -1;
+ short indent = 0, offset = 0, sel = 0, group = 0, nonSolo = 0;
+ int expand = -1, protect = -1, special = -1, mute = -1;
char name[128];
- short doDraw=0;
+ short doDraw = 0;
/* determine what needs to be drawn */
switch (ale->type) {
case ANIMTYPE_NLATRACK: /* NLA Track */
{
- NlaTrack *nlt= (NlaTrack *)ale->data;
+ NlaTrack *nlt = (NlaTrack *)ale->data;
/* 'solo' as the 'special' button? */
if (nlt->flag & NLATRACK_SOLO)
- special= ICON_SOLO_ON;
+ special = ICON_SOLO_ON;
else
- special= ICON_SOLO_OFF;
+ special = ICON_SOLO_OFF;
/* if this track is active and we're tweaking it, don't draw these toggles */
// TODO: need a special macro for this...
@@ -708,7 +708,7 @@ static void draw_nla_channel_list_gl (bAnimContext *ac, ListBase *anim_data, Vie
if ((adt) && (adt->flag & ADT_NLA_SOLO_TRACK)) {
if ((nlt->flag & NLATRACK_SOLO) == 0) {
/* tag for special non-solo handling; also hide the mute toggles */
- nonSolo= 1;
+ nonSolo = 1;
mute = 0;
}
}
@@ -717,26 +717,26 @@ static void draw_nla_channel_list_gl (bAnimContext *ac, ListBase *anim_data, Vie
BLI_strncpy(name, nlt->name, sizeof(name));
// draw manually still
- doDraw= 1;
+ doDraw = 1;
}
- break;
+ break;
case ANIMTYPE_NLAACTION: /* NLA Action-Line */
{
- bAction *act= (bAction *)ale->data;
+ bAction *act = (bAction *)ale->data;
group = 5;
special = ICON_ACTION;
if (act)
- BLI_snprintf(name, sizeof(name), "%s", act->id.name+2);
+ BLI_snprintf(name, sizeof(name), "%s", act->id.name + 2);
else
BLI_strncpy(name, "<No Action>", sizeof(name));
// draw manually still
- doDraw= 1;
+ doDraw = 1;
}
- break;
+ break;
default: /* handled by standard channel-drawing API */
// draw backdrops only...
@@ -749,8 +749,8 @@ static void draw_nla_channel_list_gl (bAnimContext *ac, ListBase *anim_data, Vie
if (ale->id) {
/* special exception for textures */
if (GS(ale->id->name) == ID_TE) {
- offset= 14;
- indent= 1;
+ offset = 14;
+ indent = 1;
}
/* special exception for nodetrees */
else if (GS(ale->id->name) == ID_NT) {
@@ -760,30 +760,32 @@ static void draw_nla_channel_list_gl (bAnimContext *ac, ListBase *anim_data, Vie
case NTREE_SHADER:
{
/* same as for textures */
- offset= 14;
- indent= 1;
+ offset = 14;
+ indent = 1;
}
- break;
+ break;
case NTREE_TEXTURE:
{
/* even more */
- offset= 21;
- indent= 1;
+ offset = 21;
+ indent = 1;
}
- break;
+ break;
default:
/* normal will do */
- offset= 14;
+ offset = 14;
break;
}
}
- else
- offset= 14;
+ else {
+ offset = 14;
+ }
+ }
+ else {
+ offset = 0;
}
- else
- offset= 0;
/* now, start drawing based on this information */
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
@@ -799,12 +801,12 @@ static void draw_nla_channel_list_gl (bAnimContext *ac, ListBase *anim_data, Vie
}
else {
/* if a track is being solo'd, action is ignored, so draw less boldly (alpha lower) */
- float alpha = (adt && (adt->flag & ADT_NLA_SOLO_TRACK))? 0.3f : 1.0f;
+ float alpha = (adt && (adt->flag & ADT_NLA_SOLO_TRACK)) ? 0.3f : 1.0f;
if (ale->data)
- glColor4f(0.8f, 0.2f, 0.0f, alpha); // reddish color - hardcoded for now
+ glColor4f(0.8f, 0.2f, 0.0f, alpha); // reddish color - hardcoded for now
else
- glColor4f(0.6f, 0.5f, 0.5f, alpha); // greyish-red color - hardcoded for now
+ glColor4f(0.6f, 0.5f, 0.5f, alpha); // greyish-red color - hardcoded for now
}
offset += 7 * indent;
@@ -815,35 +817,35 @@ static void draw_nla_channel_list_gl (bAnimContext *ac, ListBase *anim_data, Vie
/* draw slightly shifted up vertically to look like it has more separation from other channels,
* but we then need to slightly shorten it so that it doesn't look like it overlaps
*/
- uiDrawBox(GL_POLYGON, x+offset, yminc+NLACHANNEL_SKIP, (float)v2d->cur.xmax, ymaxc+NLACHANNEL_SKIP-1, 8);
+ uiDrawBox(GL_POLYGON, x + offset, yminc + NLACHANNEL_SKIP, (float)v2d->cur.xmax, ymaxc + NLACHANNEL_SKIP - 1, 8);
/* clear group value, otherwise we cause errors... */
group = 0;
}
else {
/* NLA tracks - darker color if not solo track when we're showing solo */
- UI_ThemeColorShade(TH_HEADER, ((nonSolo == 0)? 20 : -20));
+ UI_ThemeColorShade(TH_HEADER, ((nonSolo == 0) ? 20 : -20));
indent += group;
offset += 7 * indent;
glBegin(GL_QUADS);
- glVertex2f(x+offset, yminc);
- glVertex2f(x+offset, ymaxc);
- glVertex2f((float)v2d->cur.xmax, ymaxc);
- glVertex2f((float)v2d->cur.xmax, yminc);
+ glVertex2f(x + offset, yminc);
+ glVertex2f(x + offset, ymaxc);
+ glVertex2f((float)v2d->cur.xmax, ymaxc);
+ glVertex2f((float)v2d->cur.xmax, yminc);
glEnd();
}
/* draw expand/collapse triangle */
if (expand > 0) {
- UI_icon_draw(x+offset, ydatac, expand);
+ UI_icon_draw(x + offset, ydatac, expand);
offset += 17;
}
/* draw special icon indicating certain data-types */
if (special > -1) {
/* for normal channels */
- UI_icon_draw(x+offset, ydatac, special);
+ UI_icon_draw(x + offset, ydatac, special);
offset += 17;
}
glDisable(GL_BLEND);
@@ -854,7 +856,7 @@ static void draw_nla_channel_list_gl (bAnimContext *ac, ListBase *anim_data, Vie
else
UI_ThemeColor(TH_TEXT);
offset += 3;
- UI_DrawString(x+offset, y-4, name);
+ UI_DrawString(x + offset, y - 4, name);
/* reset offset - for RHS of panel */
offset = 0;
@@ -866,18 +868,18 @@ static void draw_nla_channel_list_gl (bAnimContext *ac, ListBase *anim_data, Vie
/* draw protect 'lock' */
if (protect > -1) {
offset = 16;
- UI_icon_draw((float)(v2d->cur.xmax-offset), ydatac, protect);
+ UI_icon_draw((float)(v2d->cur.xmax - offset), ydatac, protect);
}
/* draw mute 'eye' */
if (mute > -1) {
offset += 16;
- UI_icon_draw((float)(v2d->cur.xmax-offset), ydatac, mute);
+ UI_icon_draw((float)(v2d->cur.xmax - offset), ydatac, mute);
}
/* draw NLA-action line 'status-icons' - only when there's an action */
if ((ale->type == ANIMTYPE_NLAACTION) && (ale->data)) {
- AnimData *adt= ale->adt;
+ AnimData *adt = ale->adt;
offset += 16;
@@ -886,28 +888,28 @@ static void draw_nla_channel_list_gl (bAnimContext *ac, ListBase *anim_data, Vie
/* toggle for tweaking with mapping/no-mapping (i.e. 'in place editing' toggle) */
// for now, use pin icon to symbolise this
if (adt->flag & ADT_NLA_EDIT_NOMAP)
- UI_icon_draw((float)(v2d->cur.xmax-offset), ydatac, ICON_PINNED);
+ UI_icon_draw((float)(v2d->cur.xmax - offset), ydatac, ICON_PINNED);
else
- UI_icon_draw((float)(v2d->cur.xmax-offset), ydatac, ICON_UNPINNED);
+ UI_icon_draw((float)(v2d->cur.xmax - offset), ydatac, ICON_UNPINNED);
- fdrawline((float)(v2d->cur.xmax-offset), yminc,
- (float)(v2d->cur.xmax-offset), ymaxc);
+ fdrawline((float)(v2d->cur.xmax - offset), yminc,
+ (float)(v2d->cur.xmax - offset), ymaxc);
offset += 16;
/* 'tweaking action' indicator - not a button */
- UI_icon_draw((float)(v2d->cur.xmax-offset), ydatac, ICON_EDIT);
+ UI_icon_draw((float)(v2d->cur.xmax - offset), ydatac, ICON_EDIT);
}
else {
/* XXX firstly draw a little rect to help identify that it's different from the toggles */
glBegin(GL_LINE_LOOP);
- glVertex2f((float)v2d->cur.xmax-offset-1, y-7);
- glVertex2f((float)v2d->cur.xmax-offset-1, y+9);
- glVertex2f((float)v2d->cur.xmax-1, y+9);
- glVertex2f((float)v2d->cur.xmax-1, y-7);
+ glVertex2f((float)v2d->cur.xmax - offset - 1, y - 7);
+ glVertex2f((float)v2d->cur.xmax - offset - 1, y + 9);
+ glVertex2f((float)v2d->cur.xmax - 1, y + 9);
+ glVertex2f((float)v2d->cur.xmax - 1, y - 7);
glEnd(); // GL_LINES
/* 'push down' icon for normal active-actions */
- UI_icon_draw((float)v2d->cur.xmax-offset, ydatac, ICON_FREEZE);
+ UI_icon_draw((float)v2d->cur.xmax - offset, ydatac, ICON_FREEZE);
}
}
@@ -920,29 +922,29 @@ static void draw_nla_channel_list_gl (bAnimContext *ac, ListBase *anim_data, Vie
}
}
-void draw_nla_channel_list (bContext *C, bAnimContext *ac, ARegion *ar)
+void draw_nla_channel_list(bContext *C, bAnimContext *ac, ARegion *ar)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
SpaceNla *snla = (SpaceNla *)ac->sl;
- View2D *v2d= &ar->v2d;
- float y= 0.0f;
+ View2D *v2d = &ar->v2d;
+ float y = 0.0f;
size_t items;
int height;
/* build list of channels to draw */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS);
- items= ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS);
+ items = ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* Update max-extent of channels here (taking into account scrollers):
- * - this is done to allow the channel list to be scrollable, but must be done here
- * to avoid regenerating the list again and/or also because channels list is drawn first
+ * - this is done to allow the channel list to be scrollable, but must be done here
+ * to avoid regenerating the list again and/or also because channels list is drawn first
* - offset of NLACHANNEL_HEIGHT*2 is added to the height of the channels, as first is for
* start of list offset, and the second is as a correction for the scrollers.
*/
- height= ((items*NLACHANNEL_STEP(snla)) + (NLACHANNEL_HEIGHT(snla)*2));
+ height = ((items * NLACHANNEL_STEP(snla)) + (NLACHANNEL_HEIGHT(snla) * 2));
/* don't use totrect set, as the width stays the same
* (NOTE: this is ok here, the configuration is pretty straightforward)
*/
@@ -951,29 +953,29 @@ void draw_nla_channel_list (bContext *C, bAnimContext *ac, ARegion *ar)
UI_view2d_sync(NULL, ac->sa, v2d, V2D_LOCK_COPY);
/* draw channels */
- { /* first pass: backdrops + oldstyle drawing */
- y= (float)(-NLACHANNEL_HEIGHT(snla));
+ { /* first pass: backdrops + oldstyle drawing */
+ y = (float)(-NLACHANNEL_HEIGHT(snla));
draw_nla_channel_list_gl(ac, &anim_data, v2d, y);
}
- { /* second pass: UI widgets */
- uiBlock *block= uiBeginBlock(C, ar, __func__, UI_EMBOSS);
+ { /* second pass: UI widgets */
+ uiBlock *block = uiBeginBlock(C, ar, __func__, UI_EMBOSS);
size_t channel_index = 0;
- y= (float)(-NLACHANNEL_HEIGHT(snla));
+ y = (float)(-NLACHANNEL_HEIGHT(snla));
/* set blending again, as may not be set in previous step */
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
/* loop through channels, and set up drawing depending on their type */
- for (ale= anim_data.first; ale; ale= ale->next) {
- const float yminc= (float)(y - NLACHANNEL_HEIGHT_HALF(snla));
- const float ymaxc= (float)(y + NLACHANNEL_HEIGHT_HALF(snla));
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ const float yminc = (float)(y - NLACHANNEL_HEIGHT_HALF(snla));
+ const float ymaxc = (float)(y + NLACHANNEL_HEIGHT_HALF(snla));
/* check if visible */
- if ( IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
- IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax) )
+ if (IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
+ IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax) )
{
/* draw all channels using standard channel-drawing API */
ANIM_channel_draw_widgets(C, ac, ale, block, yminc, ymaxc, channel_index);
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c
index 1a94b1160be..8a7e2a8a904 100644
--- a/source/blender/editors/space_nla/nla_edit.c
+++ b/source/blender/editors/space_nla/nla_edit.c
@@ -69,23 +69,23 @@
#include "UI_resources.h"
#include "UI_view2d.h"
-#include "nla_intern.h" // own include
+#include "nla_intern.h" // own include
#include "nla_private.h" // FIXME... maybe this shouldn't be included?
/* *********************************************** */
/* Utilities exported to other places... */
/* Perform validation for blending/extend settings */
-void ED_nla_postop_refresh (bAnimContext *ac)
+void ED_nla_postop_refresh(bAnimContext *ac)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
- short filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_ANIMDATA | ANIMFILTER_FOREDIT);
+ short filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_ANIMDATA | ANIMFILTER_FOREDIT);
/* get blocks to work on */
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
- for (ale= anim_data.first; ale; ale= ale->next) {
+ for (ale = anim_data.first; ale; ale = ale->next) {
/* performing auto-blending, extend-mode validation, etc. */
BKE_nla_validate_state(ale->data);
}
@@ -102,21 +102,21 @@ void ED_nla_postop_refresh (bAnimContext *ac)
* as if it were the normal Active-Action of its AnimData block.
*/
-static int nlaedit_enable_tweakmode_exec (bContext *C, wmOperator *op)
+static int nlaedit_enable_tweakmode_exec(bContext *C, wmOperator *op)
{
bAnimContext ac;
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
- int ok=0;
+ int ok = 0;
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
return OPERATOR_CANCELLED;
/* get a list of the AnimData blocks being shown in the NLA */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_ANIMDATA);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_ANIMDATA);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* if no blocks, popup error? */
@@ -126,8 +126,8 @@ static int nlaedit_enable_tweakmode_exec (bContext *C, wmOperator *op)
}
/* for each AnimData block with NLA-data, try setting it in tweak-mode */
- for (ale= anim_data.first; ale; ale= ale->next) {
- AnimData *adt= ale->data;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ AnimData *adt = ale->data;
/* try entering tweakmode if valid */
ok += BKE_nla_tweakmode_enter(adt);
@@ -144,7 +144,7 @@ static int nlaedit_enable_tweakmode_exec (bContext *C, wmOperator *op)
ac.scene->flag |= SCE_NLA_EDIT_ON;
/* set notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_ACTCHANGE, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_NLA_ACTCHANGE, NULL);
}
else {
BKE_report(op->reports, RPT_ERROR, "No active strip(s) to enter tweakmode on");
@@ -155,7 +155,7 @@ static int nlaedit_enable_tweakmode_exec (bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void NLA_OT_tweakmode_enter (wmOperatorType *ot)
+void NLA_OT_tweakmode_enter(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Enter Tweak Mode";
@@ -167,12 +167,12 @@ void NLA_OT_tweakmode_enter (wmOperatorType *ot)
ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ------------- */
-static int nlaedit_disable_tweakmode_exec (bContext *C, wmOperator *op)
+static int nlaedit_disable_tweakmode_exec(bContext *C, wmOperator *op)
{
bAnimContext ac;
@@ -185,7 +185,7 @@ static int nlaedit_disable_tweakmode_exec (bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* get a list of the AnimData blocks being shown in the NLA */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_ANIMDATA);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_ANIMDATA);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* if no blocks, popup error? */
@@ -195,8 +195,8 @@ static int nlaedit_disable_tweakmode_exec (bContext *C, wmOperator *op)
}
/* for each AnimData block with NLA-data, try exitting tweak-mode */
- for (ale= anim_data.first; ale; ale= ale->next) {
- AnimData *adt= ale->data;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ AnimData *adt = ale->data;
/* try entering tweakmode if valid */
BKE_nla_tweakmode_exit(adt);
@@ -213,14 +213,14 @@ static int nlaedit_disable_tweakmode_exec (bContext *C, wmOperator *op)
ac.scene->flag &= ~SCE_NLA_EDIT_ON;
/* set notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_ACTCHANGE, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_NLA_ACTCHANGE, NULL);
}
/* done */
return OPERATOR_FINISHED;
}
-void NLA_OT_tweakmode_exit (wmOperatorType *ot)
+void NLA_OT_tweakmode_exit(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Exit Tweak Mode";
@@ -232,7 +232,7 @@ void NLA_OT_tweakmode_exit (wmOperatorType *ot)
ot->poll = nlaop_poll_tweakmode_on;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* *********************************************** */
@@ -241,24 +241,24 @@ void NLA_OT_tweakmode_exit (wmOperatorType *ot)
/* *************************** Calculate Range ************************** */
/* Get the min/max strip extents */
-static void get_nlastrip_extents (bAnimContext *ac, float *min, float *max, const short onlySel)
+static void get_nlastrip_extents(bAnimContext *ac, float *min, float *max, const short onlySel)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
/* get data to filter */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_NODUPLIS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* set large values to try to override */
- *min= 999999999.0f;
- *max= -999999999.0f;
+ *min = 999999999.0f;
+ *max = -999999999.0f;
/* check if any channels to set range with */
if (anim_data.first) {
/* go through channels, finding max extents */
- for (ale= anim_data.first; ale; ale= ale->next) {
+ for (ale = anim_data.first; ale; ale = ale->next) {
NlaTrack *nlt = (NlaTrack *)ale->data;
NlaStrip *strip;
@@ -278,12 +278,12 @@ static void get_nlastrip_extents (bAnimContext *ac, float *min, float *max, cons
else {
/* set default range */
if (ac->scene) {
- *min= (float)ac->scene->r.sfra;
- *max= (float)ac->scene->r.efra;
+ *min = (float)ac->scene->r.sfra;
+ *max = (float)ac->scene->r.efra;
}
else {
- *min= -5;
- *max= 100;
+ *min = -5;
+ *max = 100;
}
}
}
@@ -299,12 +299,12 @@ static int nlaedit_viewall(bContext *C, const short onlySel)
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
return OPERATOR_CANCELLED;
- v2d= &ac.ar->v2d;
+ v2d = &ac.ar->v2d;
/* set the horizontal range, with an extra offset so that the extreme keys will be in view */
get_nlastrip_extents(&ac, &v2d->cur.xmin, &v2d->cur.xmax, onlySel);
- extra= 0.1f * (v2d->cur.xmax - v2d->cur.xmin);
+ extra = 0.1f * (v2d->cur.xmax - v2d->cur.xmin);
v2d->cur.xmin -= extra;
v2d->cur.xmax += extra;
@@ -335,7 +335,7 @@ static int nlaedit_viewsel_exec(bContext *C, wmOperator *UNUSED(op))
return nlaedit_viewall(C, TRUE);
}
-void NLA_OT_view_all (wmOperatorType *ot)
+void NLA_OT_view_all(wmOperatorType *ot)
{
/* identifiers */
ot->name = "View All";
@@ -347,10 +347,10 @@ void NLA_OT_view_all (wmOperatorType *ot)
ot->poll = ED_operator_nla_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
-void NLA_OT_view_selected (wmOperatorType *ot)
+void NLA_OT_view_selected(wmOperatorType *ot)
{
/* identifiers */
ot->name = "View Selected";
@@ -362,7 +362,7 @@ void NLA_OT_view_selected (wmOperatorType *ot)
ot->poll = ED_operator_nla_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* *********************************************** */
@@ -373,7 +373,7 @@ void NLA_OT_view_selected (wmOperatorType *ot)
/* add the specified action as new strip */
-static int nlaedit_add_actionclip_exec (bContext *C, wmOperator *op)
+static int nlaedit_add_actionclip_exec(bContext *C, wmOperator *op)
{
bAnimContext ac;
Scene *scene;
@@ -391,11 +391,11 @@ static int nlaedit_add_actionclip_exec (bContext *C, wmOperator *op)
if (ANIM_animdata_get_context(C, &ac) == 0)
return OPERATOR_CANCELLED;
- scene= ac.scene;
- cfra= (float)CFRA;
+ scene = ac.scene;
+ cfra = (float)CFRA;
/* get action to use */
- act= BLI_findlink(&CTX_data_main(C)->action, RNA_enum_get(op->ptr, "action"));
+ act = BLI_findlink(&CTX_data_main(C)->action, RNA_enum_get(op->ptr, "action"));
if (act == NULL) {
BKE_report(op->reports, RPT_ERROR, "No valid Action to add");
@@ -405,15 +405,15 @@ static int nlaedit_add_actionclip_exec (bContext *C, wmOperator *op)
else if (act->idroot == 0) {
/* hopefully in this case (i.e. library of userless actions), the user knows what they're doing... */
BKE_reportf(op->reports, RPT_WARNING,
- "Action '%s' does not specify what datablocks it can be used on. Try setting the 'ID Root Type' setting from the Datablocks Editor for this Action to avoid future problems",
- act->id.name+2);
+ "Action '%s' does not specify what datablocks it can be used on. Try setting the 'ID Root Type' setting from the Datablocks Editor for this Action to avoid future problems",
+ act->id.name + 2);
}
/* get a list of the editable tracks being shown in the NLA
* - this is limited to active ones for now, but could be expanded to
*/
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_ACTIVE | ANIMFILTER_FOREDIT);
- items= ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_ACTIVE | ANIMFILTER_FOREDIT);
+ items = ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
if (items == 0) {
BKE_report(op->reports, RPT_ERROR, "No active track(s) to add strip to");
@@ -421,33 +421,33 @@ static int nlaedit_add_actionclip_exec (bContext *C, wmOperator *op)
}
/* for every active track, try to add strip to free space in track or to the top of the stack if no space */
- for (ale= anim_data.first; ale; ale= ale->next) {
- NlaTrack *nlt= (NlaTrack *)ale->data;
- AnimData *adt= ale->adt;
- NlaStrip *strip= NULL;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ NlaTrack *nlt = (NlaTrack *)ale->data;
+ AnimData *adt = ale->adt;
+ NlaStrip *strip = NULL;
/* sanity check: only apply actions of the right type for this ID
* NOTE: in the case that this hasn't been set, we've already warned the user about this already
*/
if ((act->idroot) && (act->idroot != GS(ale->id->name))) {
BKE_reportf(op->reports, RPT_ERROR,
- "Couldn't add action '%s' as it cannot be used relative to ID-blocks of type '%s'",
- act->id.name+2, ale->id->name);
+ "Couldn't add action '%s' as it cannot be used relative to ID-blocks of type '%s'",
+ act->id.name + 2, ale->id->name);
continue;
}
/* create a new strip, and offset it to start on the current frame */
- strip= add_nlastrip(act);
+ strip = add_nlastrip(act);
- strip->end += (cfra - strip->start);
- strip->start = cfra;
+ strip->end += (cfra - strip->start);
+ strip->start = cfra;
/* firstly try adding strip to our current track, but if that fails, add to a new track */
if (BKE_nlatrack_add_strip(nlt, strip) == 0) {
/* trying to add to the current failed (no space),
* so add a new track to the stack, and add to that...
*/
- nlt= add_nlatrack(adt, NULL);
+ nlt = add_nlatrack(adt, NULL);
BKE_nlatrack_add_strip(nlt, strip);
}
@@ -462,13 +462,13 @@ static int nlaedit_add_actionclip_exec (bContext *C, wmOperator *op)
ED_nla_postop_refresh(&ac);
/* set notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_EDITED, NULL);
/* done */
return OPERATOR_FINISHED;
}
-void NLA_OT_actionclip_add (wmOperatorType *ot)
+void NLA_OT_actionclip_add(wmOperatorType *ot)
{
PropertyRNA *prop;
@@ -483,11 +483,11 @@ void NLA_OT_actionclip_add (wmOperatorType *ot)
ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* props */
- // TODO: this would be nicer as an ID-pointer...
- prop= RNA_def_enum(ot->srna, "action", DummyRNA_NULL_items, 0, "Action", "");
+ // 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);
ot->prop = prop;
}
@@ -495,7 +495,7 @@ void NLA_OT_actionclip_add (wmOperatorType *ot)
/* ******************** Add Transition Operator ***************************** */
/* Add a new transition strip between selected strips */
-static int nlaedit_add_transition_exec (bContext *C, wmOperator *op)
+static int nlaedit_add_transition_exec(bContext *C, wmOperator *op)
{
bAnimContext ac;
@@ -510,23 +510,23 @@ static int nlaedit_add_transition_exec (bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* get a list of the editable tracks being shown in the NLA */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* for each track, find pairs of strips to add transitions to */
- for (ale= anim_data.first; ale; ale= ale->next) {
- NlaTrack *nlt= (NlaTrack *)ale->data;
- AnimData *adt= ale->adt;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ NlaTrack *nlt = (NlaTrack *)ale->data;
+ AnimData *adt = ale->adt;
NlaStrip *s1, *s2;
/* get initial pair of strips */
if (ELEM(nlt->strips.first, NULL, nlt->strips.last))
continue;
- s1= nlt->strips.first;
- s2= s1->next;
+ s1 = nlt->strips.first;
+ s2 = s1->next;
/* loop over strips */
- for (; s1 && s2; s1=s2, s2=s2->next) {
+ for (; s1 && s2; s1 = s2, s2 = s2->next) {
NlaStrip *strip;
/* check if both are selected */
@@ -537,7 +537,7 @@ static int nlaedit_add_transition_exec (bContext *C, wmOperator *op)
continue;
/* make sure neither one is a transition
* - although this is impossible to create with the standard tools,
- * the user may have altered the settings
+ * the user may have altered the settings
*/
if (ELEM(NLASTRIP_TYPE_TRANSITION, s1->type, s2->type))
continue;
@@ -546,25 +546,25 @@ static int nlaedit_add_transition_exec (bContext *C, wmOperator *op)
continue;
/* allocate new strip */
- strip= MEM_callocN(sizeof(NlaStrip), "NlaStrip");
+ strip = MEM_callocN(sizeof(NlaStrip), "NlaStrip");
BLI_insertlinkafter(&nlt->strips, s1, strip);
/* set the type */
- strip->type= NLASTRIP_TYPE_TRANSITION;
+ strip->type = NLASTRIP_TYPE_TRANSITION;
/* generic settings
* - selected flag to highlight this to the user
* - auto-blends to ensure that blend in/out values are automatically
* determined by overlaps of strips
*/
- strip->flag = NLASTRIP_FLAG_SELECT|NLASTRIP_FLAG_AUTO_BLENDS;
+ strip->flag = NLASTRIP_FLAG_SELECT | NLASTRIP_FLAG_AUTO_BLENDS;
/* range is simply defined as the endpoints of the adjacent strips */
- strip->start = s1->end;
- strip->end = s2->start;
+ strip->start = s1->end;
+ strip->end = s2->start;
/* scale and repeat aren't of any use, but shouldn't ever be 0 */
- strip->scale= 1.0f;
+ strip->scale = 1.0f;
strip->repeat = 1.0f;
/* auto-name it */
@@ -584,7 +584,7 @@ static int nlaedit_add_transition_exec (bContext *C, wmOperator *op)
ED_nla_postop_refresh(&ac);
/* set notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_EDITED, NULL);
/* done */
return OPERATOR_FINISHED;
@@ -595,7 +595,7 @@ static int nlaedit_add_transition_exec (bContext *C, wmOperator *op)
}
}
-void NLA_OT_transition_add (wmOperatorType *ot)
+void NLA_OT_transition_add(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Add Transition";
@@ -607,13 +607,13 @@ void NLA_OT_transition_add (wmOperatorType *ot)
ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ******************** Add Sound Clip Operator ***************************** */
/* Add a new sound clip */
-static int nlaedit_add_sound_exec (bContext *C, wmOperator *UNUSED(op))
+static int nlaedit_add_sound_exec(bContext *C, wmOperator *UNUSED(op))
{
bAnimContext ac;
@@ -632,16 +632,16 @@ static int nlaedit_add_sound_exec (bContext *C, wmOperator *UNUSED(op))
cfra = CFRA;
/* get a list of the editable tracks being shown in the NLA */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT);
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
- for (ale= anim_data.first; ale; ale= ale->next) {
+ for (ale = anim_data.first; ale; ale = ale->next) {
Object *ob = (Object *)ale->id; /* may not be object until we actually check! */
AnimData *adt = ale->adt;
- NlaTrack *nlt= (NlaTrack *)ale->data;
+ NlaTrack *nlt = (NlaTrack *)ale->data;
NlaStrip *strip;
/* does this belong to speaker - assumed to live on Object level only */
@@ -649,17 +649,17 @@ static int nlaedit_add_sound_exec (bContext *C, wmOperator *UNUSED(op))
continue;
/* create a new strip, and offset it to start on the current frame */
- strip= add_nla_soundstrip(ac.scene, ob->data);
+ strip = add_nla_soundstrip(ac.scene, ob->data);
- strip->start += cfra;
- strip->end += cfra;
+ strip->start += cfra;
+ strip->end += cfra;
/* firstly try adding strip to our current track, but if that fails, add to a new track */
if (BKE_nlatrack_add_strip(nlt, strip) == 0) {
/* trying to add to the current failed (no space),
* so add a new track to the stack, and add to that...
*/
- nlt= add_nlatrack(adt, NULL);
+ nlt = add_nlatrack(adt, NULL);
BKE_nlatrack_add_strip(nlt, strip);
}
@@ -674,13 +674,13 @@ static int nlaedit_add_sound_exec (bContext *C, wmOperator *UNUSED(op))
ED_nla_postop_refresh(&ac);
/* set notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_EDITED, NULL);
/* done */
return OPERATOR_FINISHED;
}
-void NLA_OT_soundclip_add (wmOperatorType *ot)
+void NLA_OT_soundclip_add(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Add Sound Clip";
@@ -692,14 +692,14 @@ void NLA_OT_soundclip_add (wmOperatorType *ot)
ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ******************** Add Meta-Strip Operator ***************************** */
/* Add new meta-strips incorporating the selected strips */
/* add the specified action as new strip */
-static int nlaedit_add_meta_exec (bContext *C, wmOperator *UNUSED(op))
+static int nlaedit_add_meta_exec(bContext *C, wmOperator *UNUSED(op))
{
bAnimContext ac;
@@ -712,20 +712,20 @@ static int nlaedit_add_meta_exec (bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
/* get a list of the editable tracks being shown in the NLA */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* for each track, find pairs of strips to add transitions to */
- for (ale= anim_data.first; ale; ale= ale->next) {
- NlaTrack *nlt= (NlaTrack *)ale->data;
- AnimData *adt= ale->adt;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ NlaTrack *nlt = (NlaTrack *)ale->data;
+ AnimData *adt = ale->adt;
NlaStrip *strip;
/* create meta-strips from the continuous chains of selected strips */
BKE_nlastrips_make_metas(&nlt->strips, 0);
/* name the metas */
- for (strip= nlt->strips.first; strip; strip= strip->next) {
+ for (strip = nlt->strips.first; strip; strip = strip->next) {
/* auto-name this strip if selected (that means it is a meta) */
if (strip->flag & NLASTRIP_FLAG_SELECT)
BKE_nlastrip_validate_name(adt, strip);
@@ -736,13 +736,13 @@ static int nlaedit_add_meta_exec (bContext *C, wmOperator *UNUSED(op))
BLI_freelistN(&anim_data);
/* set notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_EDITED, NULL);
/* done */
return OPERATOR_FINISHED;
}
-void NLA_OT_meta_add (wmOperatorType *ot)
+void NLA_OT_meta_add(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Add Meta-Strips";
@@ -754,13 +754,13 @@ void NLA_OT_meta_add (wmOperatorType *ot)
ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ******************** Remove Meta-Strip Operator ***************************** */
/* Separate out the strips held by the selected meta-strips */
-static int nlaedit_remove_meta_exec (bContext *C, wmOperator *UNUSED(op))
+static int nlaedit_remove_meta_exec(bContext *C, wmOperator *UNUSED(op))
{
bAnimContext ac;
@@ -773,12 +773,12 @@ static int nlaedit_remove_meta_exec (bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
/* get a list of the editable tracks being shown in the NLA */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* for each track, find pairs of strips to add transitions to */
- for (ale= anim_data.first; ale; ale= ale->next) {
- NlaTrack *nlt= (NlaTrack *)ale->data;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ NlaTrack *nlt = (NlaTrack *)ale->data;
/* clear all selected meta-strips, regardless of whether they are temporary or not */
BKE_nlastrips_clear_metas(&nlt->strips, 1, 0);
@@ -788,13 +788,13 @@ static int nlaedit_remove_meta_exec (bContext *C, wmOperator *UNUSED(op))
BLI_freelistN(&anim_data);
/* set notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_EDITED, NULL);
/* done */
return OPERATOR_FINISHED;
}
-void NLA_OT_meta_remove (wmOperatorType *ot)
+void NLA_OT_meta_remove(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Remove Meta-Strips";
@@ -806,7 +806,7 @@ void NLA_OT_meta_remove (wmOperatorType *ot)
ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ******************** Duplicate Strips Operator ************************** */
@@ -814,7 +814,7 @@ void NLA_OT_meta_remove (wmOperatorType *ot)
* the originals were housed in.
*/
-static int nlaedit_duplicate_exec (bContext *C, wmOperator *UNUSED(op))
+static int nlaedit_duplicate_exec(bContext *C, wmOperator *UNUSED(op))
{
bAnimContext ac;
@@ -829,25 +829,25 @@ static int nlaedit_duplicate_exec (bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
/* get a list of editable tracks being shown in the NLA */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* duplicate strips in tracks starting from the last one so that we're
* less likely to duplicate strips we just duplicated...
*/
- for (ale= anim_data.last; ale; ale= ale->prev) {
- NlaTrack *nlt= (NlaTrack *)ale->data;
- AnimData *adt= ale->adt;
+ for (ale = anim_data.last; ale; ale = ale->prev) {
+ NlaTrack *nlt = (NlaTrack *)ale->data;
+ AnimData *adt = ale->adt;
NlaStrip *strip, *nstrip, *next;
NlaTrack *track;
- for (strip= nlt->strips.first; strip; strip= next) {
- next= strip->next;
+ for (strip = nlt->strips.first; strip; strip = next) {
+ next = strip->next;
/* if selected, split the strip at its midpoint */
if (strip->flag & NLASTRIP_FLAG_SELECT) {
/* make a copy (assume that this is possible) */
- nstrip= copy_nlastrip(strip);
+ nstrip = copy_nlastrip(strip);
/* in case there's no space in the track above, or we haven't got a reference to it yet, try adding */
if (BKE_nlatrack_add_strip(nlt->next, nstrip) == 0) {
@@ -855,12 +855,12 @@ static int nlaedit_duplicate_exec (bContext *C, wmOperator *UNUSED(op))
* - if the current one is the last one, nlt->next will be NULL, which defaults to adding
* at the top of the stack anyway...
*/
- track= add_nlatrack(adt, nlt->next);
+ track = add_nlatrack(adt, nlt->next);
BKE_nlatrack_add_strip(track, nstrip);
}
/* deselect the original and the active flag */
- strip->flag &= ~(NLASTRIP_FLAG_SELECT|NLASTRIP_FLAG_ACTIVE);
+ strip->flag &= ~(NLASTRIP_FLAG_SELECT | NLASTRIP_FLAG_ACTIVE);
/* auto-name newly created strip */
BKE_nlastrip_validate_name(adt, nstrip);
@@ -878,7 +878,7 @@ static int nlaedit_duplicate_exec (bContext *C, wmOperator *UNUSED(op))
ED_nla_postop_refresh(&ac);
/* set notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_EDITED, NULL);
/* done */
return OPERATOR_FINISHED;
@@ -897,7 +897,7 @@ static int nlaedit_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED
return OPERATOR_FINISHED;
}
-void NLA_OT_duplicate (wmOperatorType *ot)
+void NLA_OT_duplicate(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Duplicate Strips";
@@ -910,7 +910,7 @@ void NLA_OT_duplicate (wmOperatorType *ot)
ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* to give to transform */
RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, "Mode", "");
@@ -919,7 +919,7 @@ void NLA_OT_duplicate (wmOperatorType *ot)
/* ******************** Delete Strips Operator ***************************** */
/* Deletes the selected NLA-Strips */
-static int nlaedit_delete_exec (bContext *C, wmOperator *UNUSED(op))
+static int nlaedit_delete_exec(bContext *C, wmOperator *UNUSED(op))
{
bAnimContext ac;
@@ -932,16 +932,16 @@ static int nlaedit_delete_exec (bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
/* get a list of the editable tracks being shown in the NLA */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* for each NLA-Track, delete all selected strips */
- for (ale= anim_data.first; ale; ale= ale->next) {
- NlaTrack *nlt= (NlaTrack *)ale->data;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ NlaTrack *nlt = (NlaTrack *)ale->data;
NlaStrip *strip, *nstrip;
- for (strip= nlt->strips.first; strip; strip= nstrip) {
- nstrip= strip->next;
+ for (strip = nlt->strips.first; strip; strip = nstrip) {
+ nstrip = strip->next;
/* if selected, delete */
if (strip->flag & NLASTRIP_FLAG_SELECT) {
@@ -949,7 +949,7 @@ static int nlaedit_delete_exec (bContext *C, wmOperator *UNUSED(op))
if ((strip->prev) && (strip->prev->type == NLASTRIP_TYPE_TRANSITION))
free_nlastrip(&nlt->strips, strip->prev);
if ((nstrip) && (nstrip->type == NLASTRIP_TYPE_TRANSITION)) {
- nstrip= nstrip->next;
+ nstrip = nstrip->next;
free_nlastrip(&nlt->strips, strip->next);
}
@@ -966,13 +966,13 @@ static int nlaedit_delete_exec (bContext *C, wmOperator *UNUSED(op))
ED_nla_postop_refresh(&ac);
/* set notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_EDITED, NULL);
/* done */
return OPERATOR_FINISHED;
}
-void NLA_OT_delete (wmOperatorType *ot)
+void NLA_OT_delete(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Delete Strips";
@@ -984,17 +984,17 @@ void NLA_OT_delete (wmOperatorType *ot)
ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ******************** Split Strips Operator ***************************** */
/* Splits the selected NLA-Strips into two strips at the midpoint of the strip */
// TODO's?
-// - multiple splits
-// - variable-length splits?
+// - multiple splits
+// - variable-length splits?
/* split a given Action-Clip strip */
-static void nlaedit_split_strip_actclip (AnimData *adt, NlaTrack *nlt, NlaStrip *strip, float cfra)
+static void nlaedit_split_strip_actclip(AnimData *adt, NlaTrack *nlt, NlaStrip *strip, float cfra)
{
NlaStrip *nstrip;
float splitframe, splitaframe;
@@ -1004,44 +1004,44 @@ static void nlaedit_split_strip_actclip (AnimData *adt, NlaTrack *nlt, NlaStrip
*/
if ((cfra > strip->start) && (cfra < strip->end)) {
/* use the current frame */
- splitframe= cfra;
- splitaframe= nlastrip_get_frame(strip, cfra, NLATIME_CONVERT_UNMAP);
+ splitframe = cfra;
+ splitaframe = nlastrip_get_frame(strip, cfra, NLATIME_CONVERT_UNMAP);
}
else {
/* split in the middle */
float len;
- /* strip extents */
- len= strip->end - strip->start;
+ /* strip extents */
+ len = strip->end - strip->start;
if (IS_EQF(len, 0.0f))
return;
else
- splitframe= strip->start + (len / 2.0f);
+ splitframe = strip->start + (len / 2.0f);
- /* action range */
- len= strip->actend - strip->actstart;
+ /* action range */
+ len = strip->actend - strip->actstart;
if (IS_EQF(len, 0.0f))
- splitaframe= strip->actend;
+ splitaframe = strip->actend;
else
- splitaframe= strip->actstart + (len / 2.0f);
+ splitaframe = strip->actstart + (len / 2.0f);
}
/* make a copy (assume that this is possible) and append
* it immediately after the current strip
*/
- nstrip= copy_nlastrip(strip);
+ nstrip = copy_nlastrip(strip);
BLI_insertlinkafter(&nlt->strips, strip, nstrip);
/* set the endpoint of the first strip and the start of the new strip
* to the splitframe values calculated above
*/
- strip->end= splitframe;
- nstrip->start= splitframe;
+ strip->end = splitframe;
+ nstrip->start = splitframe;
if ((splitaframe > strip->actstart) && (splitaframe < strip->actend)) {
/* only do this if we're splitting down the middle... */
- strip->actend= splitaframe;
- nstrip->actstart= splitaframe;
+ strip->actend = splitaframe;
+ nstrip->actstart = splitaframe;
}
/* clear the active flag from the copy */
@@ -1052,7 +1052,7 @@ static void nlaedit_split_strip_actclip (AnimData *adt, NlaTrack *nlt, NlaStrip
}
/* split a given Meta strip */
-static void nlaedit_split_strip_meta (NlaTrack *nlt, NlaStrip *strip)
+static void nlaedit_split_strip_meta(NlaTrack *nlt, NlaStrip *strip)
{
/* simply ungroup it for now... */
BKE_nlastrips_clear_metastrip(&nlt->strips, strip);
@@ -1060,7 +1060,7 @@ static void nlaedit_split_strip_meta (NlaTrack *nlt, NlaStrip *strip)
/* ----- */
-static int nlaedit_split_exec (bContext *C, wmOperator *UNUSED(op))
+static int nlaedit_split_exec(bContext *C, wmOperator *UNUSED(op))
{
bAnimContext ac;
@@ -1073,17 +1073,17 @@ static int nlaedit_split_exec (bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
/* get a list of editable tracks being shown in the NLA */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* for each NLA-Track, split all selected strips into two strips */
- for (ale= anim_data.first; ale; ale= ale->next) {
- NlaTrack *nlt= (NlaTrack *)ale->data;
- AnimData *adt= ale->adt;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ NlaTrack *nlt = (NlaTrack *)ale->data;
+ AnimData *adt = ale->adt;
NlaStrip *strip, *next;
- for (strip= nlt->strips.first; strip; strip= next) {
- next= strip->next;
+ for (strip = nlt->strips.first; strip; strip = next) {
+ next = strip->next;
/* if selected, split the strip at its midpoint */
if (strip->flag & NLASTRIP_FLAG_SELECT) {
@@ -1111,13 +1111,13 @@ static int nlaedit_split_exec (bContext *C, wmOperator *UNUSED(op))
ED_nla_postop_refresh(&ac);
/* set notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_EDITED, NULL);
/* done */
return OPERATOR_FINISHED;
}
-void NLA_OT_split (wmOperatorType *ot)
+void NLA_OT_split(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Split Strips";
@@ -1129,13 +1129,13 @@ void NLA_OT_split (wmOperatorType *ot)
ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ******************** Bake Strips Operator ***************************** */
/* Bakes the NLA Strips for the active AnimData blocks */
-static int nlaedit_bake_exec (bContext *C, wmOperator *UNUSED(op))
+static int nlaedit_bake_exec(bContext *C, wmOperator *UNUSED(op))
{
bAnimContext ac;
@@ -1149,11 +1149,11 @@ static int nlaedit_bake_exec (bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
/* get a list of the editable tracks being shown in the NLA */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_ANIMDATA | ANIMFILTER_FOREDIT);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_ANIMDATA | ANIMFILTER_FOREDIT);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* for each AnimData block, bake strips to animdata... */
- for (ale= anim_data.first; ale; ale= ale->next) {
+ for (ale = anim_data.first; ale; ale = ale->next) {
//BKE_nla_bake(ac.scene, ale->id, ale->data, flag);
}
@@ -1164,13 +1164,13 @@ static int nlaedit_bake_exec (bContext *C, wmOperator *UNUSED(op))
ED_nla_postop_refresh(&ac);
/* set notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_EDITED, NULL);
/* done */
return OPERATOR_FINISHED;
}
-void NLA_OT_bake (wmOperatorType *ot)
+void NLA_OT_bake(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Bake Strips";
@@ -1182,7 +1182,7 @@ void NLA_OT_bake (wmOperatorType *ot)
ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* *********************************************** */
@@ -1191,7 +1191,7 @@ void NLA_OT_bake (wmOperatorType *ot)
/* ******************** Toggle Muting Operator ************************** */
/* Toggles whether strips are muted or not */
-static int nlaedit_toggle_mute_exec (bContext *C, wmOperator *UNUSED(op))
+static int nlaedit_toggle_mute_exec(bContext *C, wmOperator *UNUSED(op))
{
bAnimContext ac;
@@ -1204,16 +1204,16 @@ static int nlaedit_toggle_mute_exec (bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
/* get a list of the editable tracks being shown in the NLA */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* go over all selected strips */
- for (ale= anim_data.first; ale; ale= ale->next) {
- NlaTrack *nlt= (NlaTrack *)ale->data;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ NlaTrack *nlt = (NlaTrack *)ale->data;
NlaStrip *strip;
/* for every selected strip, toggle muting */
- for (strip= nlt->strips.first; strip; strip= strip->next) {
+ 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?
@@ -1226,13 +1226,13 @@ static int nlaedit_toggle_mute_exec (bContext *C, wmOperator *UNUSED(op))
BLI_freelistN(&anim_data);
/* set notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_EDITED, NULL);
/* done */
return OPERATOR_FINISHED;
}
-void NLA_OT_mute_toggle (wmOperatorType *ot)
+void NLA_OT_mute_toggle(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Toggle Muting";
@@ -1244,13 +1244,13 @@ void NLA_OT_mute_toggle (wmOperatorType *ot)
ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ******************** Swap Strips Operator ************************** */
/* Tries to exchange strips within their owner tracks */
-static int nlaedit_swap_exec (bContext *C, wmOperator *op)
+static int nlaedit_swap_exec(bContext *C, wmOperator *op)
{
bAnimContext ac;
@@ -1263,15 +1263,15 @@ static int nlaedit_swap_exec (bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* get a list of the editable tracks being shown in the NLA */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* consider each track in turn */
- for (ale= anim_data.first; ale; ale= ale->next) {
- NlaTrack *nlt= (NlaTrack *)ale->data;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ NlaTrack *nlt = (NlaTrack *)ale->data;
- NlaStrip *strip, *stripN=NULL;
- NlaStrip *sa=NULL, *sb=NULL;
+ NlaStrip *strip, *stripN = NULL;
+ NlaStrip *sa = NULL, *sb = NULL;
/* make temporary metastrips so that entire islands of selections can be moved around */
BKE_nlastrips_make_metas(&nlt->strips, 1);
@@ -1289,7 +1289,7 @@ static int nlaedit_swap_exec (bContext *C, wmOperator *op)
}
/* get two selected strips only (these will be metas due to prev step) to operate on
- * - only allow swapping 2, as with more the context becomes unclear
+ * - only allow swapping 2, as with more the context becomes unclear
*/
for (strip = nlt->strips.first; strip; strip = stripN) {
stripN = strip->next;
@@ -1314,8 +1314,8 @@ static int nlaedit_swap_exec (bContext *C, wmOperator *op)
if (strip) {
/* too many selected warning */
BKE_reportf(op->reports, RPT_WARNING,
- "Too many clusters of strips selected in NLA Track (%s): needs exactly 2 to be selected",
- nlt->name);
+ "Too many clusters of strips selected in NLA Track (%s): needs exactly 2 to be selected",
+ nlt->name);
}
else if (sa == NULL) {
/* no warning as this is just a common case, and it may get annoying when doing multiple tracks */
@@ -1323,8 +1323,8 @@ static int nlaedit_swap_exec (bContext *C, wmOperator *op)
else if (sb == NULL) {
/* too few selected warning */
BKE_reportf(op->reports, RPT_WARNING,
- "Too few clusters of strips selected in NLA Track (%s): needs exactly 2 to be selected",
- nlt->name);
+ "Too few clusters of strips selected in NLA Track (%s): needs exactly 2 to be selected",
+ nlt->name);
}
else {
float nsa[2], nsb[2];
@@ -1334,16 +1334,16 @@ static int nlaedit_swap_exec (bContext *C, wmOperator *op)
BLI_remlink(&nlt->strips, sb);
/* calculate new extents for strips */
- /* a --> b */
+ /* a --> b */
nsa[0] = sb->start;
nsa[1] = sb->start + (sa->end - sa->start);
- /* b --> a */
+ /* b --> a */
nsb[0] = sa->start;
nsb[1] = sa->start + (sb->end - sb->start);
/* check if the track has room for the strips to be swapped */
if (BKE_nlastrips_has_space(&nlt->strips, nsa[0], nsa[1]) &&
- BKE_nlastrips_has_space(&nlt->strips, nsb[0], nsb[1]))
+ BKE_nlastrips_has_space(&nlt->strips, nsb[0], nsb[1]))
{
/* set new extents for strips then */
sa->start = nsa[0];
@@ -1358,12 +1358,12 @@ static int nlaedit_swap_exec (bContext *C, wmOperator *op)
/* not enough room to swap, so show message */
if ((sa->flag & NLASTRIP_FLAG_TEMP_META) || (sb->flag & NLASTRIP_FLAG_TEMP_META)) {
BKE_report(op->reports, RPT_WARNING,
- "Cannot swap selected strips as they will not be able to fit in their new places");
+ "Cannot swap selected strips as they will not be able to fit in their new places");
}
else {
BKE_reportf(op->reports, RPT_WARNING,
- "Cannot swap '%s' and '%s' as one or both will not be able to fit in their new places",
- sa->name, sb->name);
+ "Cannot swap '%s' and '%s' as one or both will not be able to fit in their new places",
+ sa->name, sb->name);
}
}
@@ -1383,13 +1383,13 @@ static int nlaedit_swap_exec (bContext *C, wmOperator *op)
ED_nla_postop_refresh(&ac);
/* set notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_EDITED, NULL);
/* done */
return OPERATOR_FINISHED;
}
-void NLA_OT_swap (wmOperatorType *ot)
+void NLA_OT_swap(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Swap Strips";
@@ -1401,13 +1401,13 @@ void NLA_OT_swap (wmOperatorType *ot)
ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ******************** Move Strips Up Operator ************************** */
/* Tries to move the selected strips into the track above if possible. */
-static int nlaedit_move_up_exec (bContext *C, wmOperator *UNUSED(op))
+static int nlaedit_move_up_exec(bContext *C, wmOperator *UNUSED(op))
{
bAnimContext ac;
@@ -1420,15 +1420,15 @@ static int nlaedit_move_up_exec (bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
/* get a list of the editable tracks being shown in the NLA */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* since we're potentially moving strips from lower tracks to higher tracks, we should
* loop over the tracks in reverse order to avoid moving earlier strips up multiple tracks
*/
- for (ale= anim_data.last; ale; ale= ale->prev) {
- NlaTrack *nlt= (NlaTrack *)ale->data;
- NlaTrack *nltn= nlt->next;
+ for (ale = anim_data.last; ale; ale = ale->prev) {
+ NlaTrack *nlt = (NlaTrack *)ale->data;
+ NlaTrack *nltn = nlt->next;
NlaStrip *strip, *stripn;
/* if this track has no tracks after it, skip for now... */
@@ -1436,8 +1436,8 @@ static int nlaedit_move_up_exec (bContext *C, wmOperator *UNUSED(op))
continue;
/* for every selected strip, try to move */
- for (strip= nlt->strips.first; strip; strip= stripn) {
- stripn= strip->next;
+ for (strip = nlt->strips.first; strip; strip = stripn) {
+ stripn = strip->next;
if (strip->flag & NLASTRIP_FLAG_SELECT) {
/* check if the track above has room for this strip */
@@ -1457,13 +1457,13 @@ static int nlaedit_move_up_exec (bContext *C, wmOperator *UNUSED(op))
ED_nla_postop_refresh(&ac);
/* set notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_EDITED, NULL);
/* done */
return OPERATOR_FINISHED;
}
-void NLA_OT_move_up (wmOperatorType *ot)
+void NLA_OT_move_up(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Move Strips Up";
@@ -1475,13 +1475,13 @@ void NLA_OT_move_up (wmOperatorType *ot)
ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ******************** Move Strips Down Operator ************************** */
/* Tries to move the selected strips into the track above if possible. */
-static int nlaedit_move_down_exec (bContext *C, wmOperator *UNUSED(op))
+static int nlaedit_move_down_exec(bContext *C, wmOperator *UNUSED(op))
{
bAnimContext ac;
@@ -1494,15 +1494,15 @@ static int nlaedit_move_down_exec (bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
/* get a list of the editable tracks being shown in the NLA */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* loop through the tracks in normal order, since we're pushing strips down,
* strips won't get operated on twice
*/
- for (ale= anim_data.first; ale; ale= ale->next) {
- NlaTrack *nlt= (NlaTrack *)ale->data;
- NlaTrack *nltp= nlt->prev;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ NlaTrack *nlt = (NlaTrack *)ale->data;
+ NlaTrack *nltp = nlt->prev;
NlaStrip *strip, *stripn;
/* if this track has no tracks before it, skip for now... */
@@ -1510,8 +1510,8 @@ static int nlaedit_move_down_exec (bContext *C, wmOperator *UNUSED(op))
continue;
/* for every selected strip, try to move */
- for (strip= nlt->strips.first; strip; strip= stripn) {
- stripn= strip->next;
+ for (strip = nlt->strips.first; strip; strip = stripn) {
+ stripn = strip->next;
if (strip->flag & NLASTRIP_FLAG_SELECT) {
/* check if the track below has room for this strip */
@@ -1531,13 +1531,13 @@ static int nlaedit_move_down_exec (bContext *C, wmOperator *UNUSED(op))
ED_nla_postop_refresh(&ac);
/* set notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_EDITED, NULL);
/* done */
return OPERATOR_FINISHED;
}
-void NLA_OT_move_down (wmOperatorType *ot)
+void NLA_OT_move_down(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Move Strips Down";
@@ -1549,36 +1549,36 @@ void NLA_OT_move_down (wmOperatorType *ot)
ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ******************** Sync Action Length Operator ***************************** */
/* Recalculate the extents of the action ranges used for the selected strips */
-static int nlaedit_sync_actlen_exec (bContext *C, wmOperator *op)
+static int nlaedit_sync_actlen_exec(bContext *C, wmOperator *op)
{
bAnimContext ac;
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
- short active_only= RNA_boolean_get(op->ptr, "active");
+ short active_only = RNA_boolean_get(op->ptr, "active");
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
return OPERATOR_CANCELLED;
/* get a list of the editable tracks being shown in the NLA */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT);
if (active_only) filter |= ANIMFILTER_ACTIVE;
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* for each NLA-Track, apply scale of all selected strips */
- for (ale= anim_data.first; ale; ale= ale->next) {
- NlaTrack *nlt= (NlaTrack *)ale->data;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ NlaTrack *nlt = (NlaTrack *)ale->data;
NlaStrip *strip;
- for (strip= nlt->strips.first; strip; strip= strip->next) {
+ for (strip = nlt->strips.first; strip; strip = strip->next) {
/* strip selection/active status check */
if (active_only) {
if ((strip->flag & NLASTRIP_FLAG_ACTIVE) == 0)
@@ -1607,13 +1607,13 @@ static int nlaedit_sync_actlen_exec (bContext *C, wmOperator *op)
BLI_freelistN(&anim_data);
/* set notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_EDITED, NULL);
/* done */
return OPERATOR_FINISHED;
}
-void NLA_OT_action_sync_length (wmOperatorType *ot)
+void NLA_OT_action_sync_length(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Sync Action Length";
@@ -1625,7 +1625,7 @@ void NLA_OT_action_sync_length (wmOperatorType *ot)
ot->poll = ED_operator_nla_active; // XXX: is this satisfactory... probably requires a check for active strip...
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
ot->prop = RNA_def_boolean(ot->srna, "active", 1, "Active Strip Only", "Only sync the active length for the active strip");
@@ -1635,21 +1635,21 @@ void NLA_OT_action_sync_length (wmOperatorType *ot)
/* Reset the scaling of the selected strips to 1.0f */
/* apply scaling to keyframe */
-static short bezt_apply_nlamapping (KeyframeEditData *ked, BezTriple *bezt)
+static short bezt_apply_nlamapping(KeyframeEditData *ked, BezTriple *bezt)
{
/* NLA-strip which has this scaling is stored in ked->data */
- NlaStrip *strip= (NlaStrip *)ked->data;
+ NlaStrip *strip = (NlaStrip *)ked->data;
/* adjust all the times */
- bezt->vec[0][0]= nlastrip_get_frame(strip, bezt->vec[0][0], NLATIME_CONVERT_MAP);
- bezt->vec[1][0]= nlastrip_get_frame(strip, bezt->vec[1][0], NLATIME_CONVERT_MAP);
- bezt->vec[2][0]= nlastrip_get_frame(strip, bezt->vec[2][0], NLATIME_CONVERT_MAP);
+ bezt->vec[0][0] = nlastrip_get_frame(strip, bezt->vec[0][0], NLATIME_CONVERT_MAP);
+ bezt->vec[1][0] = nlastrip_get_frame(strip, bezt->vec[1][0], NLATIME_CONVERT_MAP);
+ bezt->vec[2][0] = nlastrip_get_frame(strip, bezt->vec[2][0], NLATIME_CONVERT_MAP);
/* nothing to return or else we exit */
return 0;
}
-static int nlaedit_apply_scale_exec (bContext *C, wmOperator *UNUSED(op))
+static int nlaedit_apply_scale_exec(bContext *C, wmOperator *UNUSED(op))
{
bAnimContext ac;
@@ -1657,24 +1657,24 @@ static int nlaedit_apply_scale_exec (bContext *C, wmOperator *UNUSED(op))
bAnimListElem *ale;
int filter;
- KeyframeEditData ked= {{NULL}};
+ KeyframeEditData ked = {{NULL}};
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
return OPERATOR_CANCELLED;
/* get a list of the editable tracks being shown in the NLA */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* init the editing data */
/* for each NLA-Track, apply scale of all selected strips */
- for (ale= anim_data.first; ale; ale= ale->next) {
- NlaTrack *nlt= (NlaTrack *)ale->data;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ NlaTrack *nlt = (NlaTrack *)ale->data;
NlaStrip *strip;
- for (strip= nlt->strips.first; strip; strip= strip->next) {
+ for (strip = nlt->strips.first; strip; strip = strip->next) {
/* strip must be selected, and must be action-clip only (transitions don't have scale) */
if ((strip->flag & NLASTRIP_FLAG_SELECT) && (strip->type == NLASTRIP_TYPE_CLIP)) {
/* if the referenced action is used by other strips, make this strip use its own copy */
@@ -1682,22 +1682,22 @@ static int nlaedit_apply_scale_exec (bContext *C, wmOperator *UNUSED(op))
continue;
if (strip->act->id.us > 1) {
/* make a copy of the Action to work on */
- bAction *act= copy_action(strip->act);
+ bAction *act = BKE_action_copy(strip->act);
/* set this as the new referenced action, decrementing the users of the old one */
strip->act->id.us--;
- strip->act= act;
+ strip->act = act;
}
/* setup iterator, and iterate over all the keyframes in the action, applying this scaling */
- ked.data= strip;
+ ked.data = strip;
ANIM_animchanneldata_keyframes_loop(&ked, ac.ads, strip->act, ALE_ACT, NULL, bezt_apply_nlamapping, calchandles_fcurve);
/* clear scale of strip now that it has been applied,
* and recalculate the extents of the action now that it has been scaled
* but leave everything else alone
*/
- strip->scale= 1.0f;
+ strip->scale = 1.0f;
calc_action_range(strip->act, &strip->actstart, &strip->actend, 0);
}
}
@@ -1707,13 +1707,13 @@ static int nlaedit_apply_scale_exec (bContext *C, wmOperator *UNUSED(op))
BLI_freelistN(&anim_data);
/* set notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_EDITED, NULL);
/* done */
return OPERATOR_FINISHED;
}
-void NLA_OT_apply_scale (wmOperatorType *ot)
+void NLA_OT_apply_scale(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Apply Scale";
@@ -1725,13 +1725,13 @@ void NLA_OT_apply_scale (wmOperatorType *ot)
ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ******************** Clear Scale Operator ***************************** */
/* Reset the scaling of the selected strips to 1.0f */
-static int nlaedit_clear_scale_exec (bContext *C, wmOperator *UNUSED(op))
+static int nlaedit_clear_scale_exec(bContext *C, wmOperator *UNUSED(op))
{
bAnimContext ac;
@@ -1744,15 +1744,15 @@ static int nlaedit_clear_scale_exec (bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
/* get a list of the editable tracks being shown in the NLA */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* for each NLA-Track, reset scale of all selected strips */
- for (ale= anim_data.first; ale; ale= ale->next) {
- NlaTrack *nlt= (NlaTrack *)ale->data;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ NlaTrack *nlt = (NlaTrack *)ale->data;
NlaStrip *strip;
- for (strip= nlt->strips.first; strip; strip= strip->next) {
+ for (strip = nlt->strips.first; strip; strip = strip->next) {
/* strip must be selected, and must be action-clip only (transitions don't have scale) */
if ((strip->flag & NLASTRIP_FLAG_SELECT) && (strip->type == NLASTRIP_TYPE_CLIP)) {
PointerRNA strip_ptr;
@@ -1770,13 +1770,13 @@ static int nlaedit_clear_scale_exec (bContext *C, wmOperator *UNUSED(op))
ED_nla_postop_refresh(&ac);
/* set notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_EDITED, NULL);
/* done */
return OPERATOR_FINISHED;
}
-void NLA_OT_clear_scale (wmOperatorType *ot)
+void NLA_OT_clear_scale(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Clear Scale";
@@ -1788,7 +1788,7 @@ void NLA_OT_clear_scale (wmOperatorType *ot)
ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ******************** Snap Strips Operator ************************** */
@@ -1803,7 +1803,7 @@ static EnumPropertyItem prop_nlaedit_snap_types[] = {
{0, NULL, 0, NULL, NULL}
};
-static int nlaedit_snap_exec (bContext *C, wmOperator *op)
+static int nlaedit_snap_exec(bContext *C, wmOperator *op)
{
bAnimContext ac;
@@ -1820,18 +1820,18 @@ static int nlaedit_snap_exec (bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* get a list of the editable tracks being shown in the NLA */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* get some necessary vars */
- scene= ac.scene;
- secf= (float)FPS;
+ scene = ac.scene;
+ secf = (float)FPS;
/* since we may add tracks, perform this in reverse order */
- for (ale= anim_data.last; ale; ale= ale->prev) {
+ for (ale = anim_data.last; ale; ale = ale->prev) {
ListBase tmp_strips = {NULL, NULL};
- AnimData *adt= ale->adt;
- NlaTrack *nlt= (NlaTrack *)ale->data;
+ AnimData *adt = ale->adt;
+ NlaTrack *nlt = (NlaTrack *)ale->data;
NlaStrip *strip, *stripn;
NlaTrack *track;
@@ -1841,37 +1841,37 @@ static int nlaedit_snap_exec (bContext *C, wmOperator *op)
/* apply the snapping to all the temp meta-strips, then put them in a separate list to be added
* back to the original only if they still fit
*/
- for (strip= nlt->strips.first; strip; strip= stripn) {
- stripn= strip->next;
+ for (strip = nlt->strips.first; strip; strip = stripn) {
+ stripn = strip->next;
if (strip->flag & NLASTRIP_FLAG_TEMP_META) {
float start, end;
/* get the existing end-points */
- start= strip->start;
- end= strip->end;
+ start = strip->start;
+ end = strip->end;
/* calculate new start position based on snapping mode */
switch (mode) {
case NLAEDIT_SNAP_CFRA: /* to current frame */
- strip->start= (float)CFRA;
+ strip->start = (float)CFRA;
break;
case NLAEDIT_SNAP_NEAREST_FRAME: /* to nearest frame */
- strip->start= floorf(start+0.5f);
+ strip->start = floorf(start + 0.5f);
break;
case NLAEDIT_SNAP_NEAREST_SECOND: /* to nearest second */
- strip->start= floorf(start/secf + 0.5f) * secf;
+ strip->start = floorf(start / secf + 0.5f) * secf;
break;
case NLAEDIT_SNAP_NEAREST_MARKER: /* to nearest marker */
- strip->start= (float)ED_markers_find_nearest_marker_time(ac.markers, start);
+ strip->start = (float)ED_markers_find_nearest_marker_time(ac.markers, start);
break;
default: /* just in case... no snapping */
- strip->start= start;
+ strip->start = start;
break;
}
/* get new endpoint based on start-point (and old length) */
- strip->end= strip->start + (end - start);
+ strip->end = strip->start + (end - start);
/* apply transforms to meta-strip to its children */
BKE_nlameta_flush_transforms(strip);
@@ -1883,8 +1883,8 @@ static int nlaedit_snap_exec (bContext *C, wmOperator *op)
}
/* try adding each meta-strip back to the track one at a time, to make sure they'll fit */
- for (strip= tmp_strips.first; strip; strip= stripn) {
- stripn= strip->next;
+ for (strip = tmp_strips.first; strip; strip = stripn) {
+ stripn = strip->next;
/* remove from temp-strips list */
BLI_remlink(&tmp_strips, strip);
@@ -1892,7 +1892,7 @@ static int nlaedit_snap_exec (bContext *C, wmOperator *op)
/* in case there's no space in the current track, try adding */
if (BKE_nlatrack_add_strip(nlt, strip) == 0) {
/* need to add a new track above the current one */
- track= add_nlatrack(adt, nlt);
+ track = add_nlatrack(adt, nlt);
BKE_nlatrack_add_strip(track, strip);
/* clear temp meta-strips on this new track, as we may not be able to get back to it */
@@ -1911,13 +1911,13 @@ static int nlaedit_snap_exec (bContext *C, wmOperator *op)
ED_nla_postop_refresh(&ac);
/* set notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_EDITED, NULL);
/* done */
return OPERATOR_FINISHED;
}
-void NLA_OT_snap (wmOperatorType *ot)
+void NLA_OT_snap(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Snap Strips";
@@ -1930,7 +1930,7 @@ void NLA_OT_snap (wmOperatorType *ot)
ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
ot->prop = RNA_def_enum(ot->srna, "type", prop_nlaedit_snap_types, 0, "Type", "");
@@ -1942,18 +1942,18 @@ void NLA_OT_snap (wmOperatorType *ot)
/* ******************** Add F-Modifier Operator *********************** */
/* present a special customised popup menu for this, with some filtering */
-static int nla_fmodifier_add_invoke (bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(event))
+static int nla_fmodifier_add_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(event))
{
uiPopupMenu *pup;
uiLayout *layout;
int i;
- pup= uiPupMenuBegin(C, "Add F-Modifier", ICON_NONE);
- layout= uiPupMenuLayout(pup);
+ pup = uiPupMenuBegin(C, "Add F-Modifier", ICON_NONE);
+ layout = uiPupMenuLayout(pup);
/* start from 1 to skip the 'Invalid' modifier type */
for (i = 1; i < FMODIFIER_NUM_TYPES; i++) {
- FModifierTypeInfo *fmi= get_fmodifier_typeinfo(i);
+ FModifierTypeInfo *fmi = get_fmodifier_typeinfo(i);
/* check if modifier is valid for this context */
if (fmi == NULL)
@@ -1980,7 +1980,7 @@ static int nla_fmodifier_add_exec(bContext *C, wmOperator *op)
int filter;
FModifier *fcm;
- int type= RNA_enum_get(op->ptr, "type");
+ int type = RNA_enum_get(op->ptr, "type");
short onlyActive = RNA_boolean_get(op->ptr, "only_active");
/* get editor data */
@@ -1988,24 +1988,24 @@ static int nla_fmodifier_add_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* get a list of the editable tracks being shown in the NLA */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* for each NLA-Track, add the specified modifier to all selected strips */
- for (ale= anim_data.first; ale; ale= ale->next) {
- NlaTrack *nlt= (NlaTrack *)ale->data;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ NlaTrack *nlt = (NlaTrack *)ale->data;
NlaStrip *strip;
- for (strip= nlt->strips.first; strip; strip=strip->next) {
+ for (strip = nlt->strips.first; strip; strip = strip->next) {
/* can F-Modifier be added to the current strip? */
if (onlyActive) {
/* if not active, cannot add since we're only adding to active strip */
- if ((strip->flag & NLASTRIP_FLAG_ACTIVE)==0)
+ if ((strip->flag & NLASTRIP_FLAG_ACTIVE) == 0)
continue;
}
else {
/* strip must be selected, since we're not just doing active */
- if ((strip->flag & NLASTRIP_FLAG_SELECT)==0)
+ if ((strip->flag & NLASTRIP_FLAG_SELECT) == 0)
continue;
}
@@ -2014,14 +2014,14 @@ static int nla_fmodifier_add_exec(bContext *C, wmOperator *op)
continue;
/* add F-Modifier of specified type to selected, and make it the active one */
- fcm= add_fmodifier(&strip->modifiers, type);
+ fcm = add_fmodifier(&strip->modifiers, type);
if (fcm)
set_active_fmodifier(&strip->modifiers, fcm);
else {
BKE_reportf(op->reports, RPT_ERROR,
- "Modifier couldn't be added to (%s : %s) (see console for details)",
- nlt->name, strip->name);
+ "Modifier couldn't be added to (%s : %s) (see console for details)",
+ nlt->name, strip->name);
}
}
}
@@ -2030,13 +2030,13 @@ static int nla_fmodifier_add_exec(bContext *C, wmOperator *op)
BLI_freelistN(&anim_data);
/* set notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_EDITED, NULL);
/* done */
return OPERATOR_FINISHED;
}
-void NLA_OT_fmodifier_add (wmOperatorType *ot)
+void NLA_OT_fmodifier_add(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Add F-Modifier";
@@ -2049,7 +2049,7 @@ void NLA_OT_fmodifier_add (wmOperatorType *ot)
ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* id-props */
ot->prop = RNA_def_enum(ot->srna, "type", fmodifier_type_items, 0, "Type", "");
@@ -2063,7 +2063,7 @@ static int nla_fmodifier_copy_exec(bContext *C, wmOperator *op)
bAnimContext ac;
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
- int filter, ok=0;
+ int filter, ok = 0;
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
@@ -2073,17 +2073,17 @@ static int nla_fmodifier_copy_exec(bContext *C, wmOperator *op)
free_fmodifiers_copybuf();
/* get a list of the editable tracks being shown in the NLA */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* for each NLA-Track, add the specified modifier to all selected strips */
- for (ale= anim_data.first; ale; ale= ale->next) {
- NlaTrack *nlt= (NlaTrack *)ale->data;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ NlaTrack *nlt = (NlaTrack *)ale->data;
NlaStrip *strip;
- for (strip= nlt->strips.first; strip; strip=strip->next) {
+ for (strip = nlt->strips.first; strip; strip = strip->next) {
/* only add F-Modifier if on active strip? */
- if ((strip->flag & NLASTRIP_FLAG_ACTIVE)==0)
+ if ((strip->flag & NLASTRIP_FLAG_ACTIVE) == 0)
continue;
// TODO: when 'active' vs 'all' boolean is added, change last param!
@@ -2100,7 +2100,7 @@ static int nla_fmodifier_copy_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void NLA_OT_fmodifier_copy (wmOperatorType *ot)
+void NLA_OT_fmodifier_copy(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Copy F-Modifiers";
@@ -2112,7 +2112,7 @@ void NLA_OT_fmodifier_copy (wmOperatorType *ot)
ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* id-props */
//ot->prop = RNA_def_boolean(ot->srna, "all", 1, "All F-Modifiers", "Copy all the F-Modifiers, instead of just the active one");
@@ -2125,22 +2125,22 @@ static int nla_fmodifier_paste_exec(bContext *C, wmOperator *op)
bAnimContext ac;
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
- int filter, ok=0;
+ int filter, ok = 0;
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
return OPERATOR_CANCELLED;
/* get a list of the editable tracks being shown in the NLA */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* for each NLA-Track, add the specified modifier to all selected strips */
- for (ale= anim_data.first; ale; ale= ale->next) {
- NlaTrack *nlt= (NlaTrack *)ale->data;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ NlaTrack *nlt = (NlaTrack *)ale->data;
NlaStrip *strip;
- for (strip= nlt->strips.first; strip; strip=strip->next) {
+ for (strip = nlt->strips.first; strip; strip = strip->next) {
// TODO: do we want to replace existing modifiers? add user pref for that!
ok += ANIM_fmodifiers_paste_from_buf(&strip->modifiers, 0);
}
@@ -2153,7 +2153,7 @@ static int nla_fmodifier_paste_exec(bContext *C, wmOperator *op)
if (ok) {
/* set notifier that things have changed */
/* set notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
else {
@@ -2162,7 +2162,7 @@ static int nla_fmodifier_paste_exec(bContext *C, wmOperator *op)
}
}
-void NLA_OT_fmodifier_paste (wmOperatorType *ot)
+void NLA_OT_fmodifier_paste(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Paste F-Modifiers";
@@ -2174,7 +2174,7 @@ void NLA_OT_fmodifier_paste (wmOperatorType *ot)
ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* *********************************************** */
diff --git a/source/blender/editors/space_nla/nla_intern.h b/source/blender/editors/space_nla/nla_intern.h
index 9d0762ce108..398d2d5f1f4 100644
--- a/source/blender/editors/space_nla/nla_intern.h
+++ b/source/blender/editors/space_nla/nla_intern.h
@@ -55,7 +55,7 @@ void draw_nla_channel_list(bContext *C, bAnimContext *ac, ARegion *ar);
/* defines for left-right select tool */
enum {
- NLAEDIT_LRSEL_TEST = -1,
+ NLAEDIT_LRSEL_TEST = -1,
NLAEDIT_LRSEL_NONE,
NLAEDIT_LRSEL_LEFT,
NLAEDIT_LRSEL_RIGHT
@@ -131,7 +131,7 @@ void NLA_OT_delete_tracks(wmOperatorType *ot);
/* nla_ops.c */
int nlaop_poll_tweakmode_off(bContext *C);
-int nlaop_poll_tweakmode_on (bContext *C);
+int nlaop_poll_tweakmode_on(bContext *C);
short nlaedit_is_tweakmode_on(bAnimContext *ac);
diff --git a/source/blender/editors/space_nla/nla_ops.c b/source/blender/editors/space_nla/nla_ops.c
index 78fb92f2ee4..3a74d0b4c9c 100644
--- a/source/blender/editors/space_nla/nla_ops.c
+++ b/source/blender/editors/space_nla/nla_ops.c
@@ -53,17 +53,17 @@
#include "RNA_access.h"
-#include "nla_intern.h" // own include
+#include "nla_intern.h" /* own include */
/* ************************** poll callbacks for operators **********************************/
/* tweakmode is NOT enabled */
-int nlaop_poll_tweakmode_off (bContext *C)
+int nlaop_poll_tweakmode_off(bContext *C)
{
Scene *scene;
/* for now, we check 2 things:
- * 1) active editor must be NLA
+ * 1) active editor must be NLA
* 2) tweakmode is currently set as a 'per-scene' flag
* so that it will affect entire NLA data-sets,
* but not all AnimData blocks will be in tweakmode for
@@ -72,7 +72,7 @@ int nlaop_poll_tweakmode_off (bContext *C)
if (ED_operator_nla_active(C) == 0)
return 0;
- scene= CTX_data_scene(C);
+ scene = CTX_data_scene(C);
if ((scene == NULL) || (scene->flag & SCE_NLA_EDIT_ON))
return 0;
@@ -80,12 +80,12 @@ int nlaop_poll_tweakmode_off (bContext *C)
}
/* tweakmode IS enabled */
-int nlaop_poll_tweakmode_on (bContext *C)
+int nlaop_poll_tweakmode_on(bContext *C)
{
Scene *scene;
/* for now, we check 2 things:
- * 1) active editor must be NLA
+ * 1) active editor must be NLA
* 2) tweakmode is currently set as a 'per-scene' flag
* so that it will affect entire NLA data-sets,
* but not all AnimData blocks will be in tweakmode for
@@ -94,7 +94,7 @@ int nlaop_poll_tweakmode_on (bContext *C)
if (ED_operator_nla_active(C) == 0)
return 0;
- scene= CTX_data_scene(C);
+ scene = CTX_data_scene(C);
if ((scene == NULL) || !(scene->flag & SCE_NLA_EDIT_ON))
return 0;
@@ -102,7 +102,7 @@ int nlaop_poll_tweakmode_on (bContext *C)
}
/* is tweakmode enabled - for use in NLA operator code */
-short nlaedit_is_tweakmode_on (bAnimContext *ac)
+short nlaedit_is_tweakmode_on(bAnimContext *ac)
{
if (ac && ac->scene)
return (ac->scene->flag & SCE_NLA_EDIT_ON);
@@ -173,119 +173,119 @@ static void nla_keymap_channels(wmKeyMap *keymap)
/* NLA-specific (different to standard channels keymap) -------------------------- */
/* selection */
- /* click-select */
- // XXX for now, only leftmouse....
+ /* click-select */
+ // XXX for now, only leftmouse....
kmi = WM_keymap_add_item(keymap, "NLA_OT_channels_click", LEFTMOUSE, KM_PRESS, 0, 0);
RNA_boolean_set(kmi->ptr, "extend", FALSE);
kmi = WM_keymap_add_item(keymap, "NLA_OT_channels_click", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0);
RNA_boolean_set(kmi->ptr, "extend", TRUE);
/* channel operations */
- /* add tracks */
+ /* add tracks */
kmi = WM_keymap_add_item(keymap, "NLA_OT_tracks_add", AKEY, KM_PRESS, KM_SHIFT, 0);
RNA_boolean_set(kmi->ptr, "above_selected", FALSE);
- kmi = WM_keymap_add_item(keymap, "NLA_OT_tracks_add", AKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
+ kmi = WM_keymap_add_item(keymap, "NLA_OT_tracks_add", AKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
RNA_boolean_set(kmi->ptr, "above_selected", TRUE);
- /* delete tracks */
+ /* delete tracks */
WM_keymap_add_item(keymap, "NLA_OT_delete_tracks", XKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "NLA_OT_delete_tracks", DELKEY, KM_PRESS, 0, 0);
}
-static void nla_keymap_main (wmKeyConfig *keyconf, wmKeyMap *keymap)
+static void nla_keymap_main(wmKeyConfig *keyconf, wmKeyMap *keymap)
{
wmKeyMapItem *kmi;
/* selection */
- /* click select */
+ /* click select */
kmi = WM_keymap_add_item(keymap, "NLA_OT_click_select", SELECTMOUSE, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", FALSE);
kmi = WM_keymap_add_item(keymap, "NLA_OT_click_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", TRUE);
- /* select left/right */
+ /* select left/right */
kmi = WM_keymap_add_item(keymap, "NLA_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
- RNA_enum_set(kmi->ptr, "mode", NLAEDIT_LRSEL_TEST);
- kmi = WM_keymap_add_item(keymap, "NLA_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
- RNA_enum_set(kmi->ptr, "mode", NLAEDIT_LRSEL_TEST);
+ RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_enum_set(kmi->ptr, "mode", NLAEDIT_LRSEL_TEST);
+ kmi = WM_keymap_add_item(keymap, "NLA_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
+ RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_enum_set(kmi->ptr, "mode", NLAEDIT_LRSEL_TEST);
kmi = WM_keymap_add_item(keymap, "NLA_OT_select_leftright", LEFTBRACKETKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
- RNA_enum_set(kmi->ptr, "mode", NLAEDIT_LRSEL_LEFT);
+ RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_enum_set(kmi->ptr, "mode", NLAEDIT_LRSEL_LEFT);
kmi = WM_keymap_add_item(keymap, "NLA_OT_select_leftright", RIGHTBRACKETKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
- RNA_enum_set(kmi->ptr, "mode", NLAEDIT_LRSEL_RIGHT);
+ RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_enum_set(kmi->ptr, "mode", NLAEDIT_LRSEL_RIGHT);
- /* deselect all */
- /* TODO: uniformize with other select_all ops? */
+ /* deselect all */
+ /* TODO: uniformize with other select_all ops? */
kmi = WM_keymap_add_item(keymap, "NLA_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "invert", FALSE);
+ RNA_boolean_set(kmi->ptr, "invert", FALSE);
kmi = WM_keymap_add_item(keymap, "NLA_OT_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "invert", TRUE);
+ RNA_boolean_set(kmi->ptr, "invert", TRUE);
- /* borderselect */
+ /* borderselect */
kmi = WM_keymap_add_item(keymap, "NLA_OT_select_border", BKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "axis_range", FALSE);
+ RNA_boolean_set(kmi->ptr, "axis_range", FALSE);
kmi = WM_keymap_add_item(keymap, "NLA_OT_select_border", BKEY, KM_PRESS, KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "axis_range", TRUE);
+ RNA_boolean_set(kmi->ptr, "axis_range", TRUE);
/* view*/
- /* auto-set range */
+ /* auto-set range */
//WM_keymap_add_item(keymap, "NLA_OT_previewrange_set", PKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
WM_keymap_add_item(keymap, "NLA_OT_view_all", HOMEKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "NLA_OT_view_selected", PADPERIOD, KM_PRESS, 0, 0);
/* editing */
- /* tweakmode
- * - enter and exit are separate operators with the same hotkey...
- * This works as they use different poll()'s
- */
+ /* tweakmode
+ * - enter and exit are separate operators with the same hotkey...
+ * This works as they use different poll()'s
+ */
WM_keymap_add_item(keymap, "NLA_OT_tweakmode_enter", TABKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "NLA_OT_tweakmode_exit", TABKEY, KM_PRESS, 0, 0);
- /* add strips */
+ /* add strips */
WM_keymap_add_item(keymap, "NLA_OT_actionclip_add", AKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "NLA_OT_transition_add", TKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "NLA_OT_soundclip_add", KKEY, KM_PRESS, KM_SHIFT, 0);
- /* meta-strips */
+ /* meta-strips */
WM_keymap_add_item(keymap, "NLA_OT_meta_add", GKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "NLA_OT_meta_remove", GKEY, KM_PRESS, KM_ALT, 0);
- /* duplicate */
+ /* duplicate */
WM_keymap_add_item(keymap, "NLA_OT_duplicate", DKEY, KM_PRESS, KM_SHIFT, 0);
- /* delete */
+ /* delete */
WM_keymap_add_item(keymap, "NLA_OT_delete", XKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "NLA_OT_delete", DELKEY, KM_PRESS, 0, 0);
- /* split */
+ /* split */
WM_keymap_add_item(keymap, "NLA_OT_split", YKEY, KM_PRESS, 0, 0);
- /* toggles */
+ /* toggles */
WM_keymap_add_item(keymap, "NLA_OT_mute_toggle", HKEY, KM_PRESS, 0, 0);
- /* swap */
+ /* swap */
WM_keymap_add_item(keymap, "NLA_OT_swap", FKEY, KM_PRESS, KM_ALT, 0);
- /* move up */
+ /* move up */
WM_keymap_add_item(keymap, "NLA_OT_move_up", PAGEUPKEY, KM_PRESS, 0, 0);
- /* move down */
+ /* move down */
WM_keymap_add_item(keymap, "NLA_OT_move_down", PAGEDOWNKEY, KM_PRESS, 0, 0);
- /* apply scale */
+ /* apply scale */
WM_keymap_add_item(keymap, "NLA_OT_apply_scale", AKEY, KM_PRESS, KM_CTRL, 0);
- /* clear scale */
+ /* clear scale */
WM_keymap_add_item(keymap, "NLA_OT_clear_scale", SKEY, KM_PRESS, KM_ALT, 0);
- /* snap */
+ /* snap */
WM_keymap_add_item(keymap, "NLA_OT_snap", SKEY, KM_PRESS, KM_SHIFT, 0);
- /* add f-modifier */
- WM_keymap_add_item(keymap, "NLA_OT_fmodifier_add", MKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
+ /* add f-modifier */
+ WM_keymap_add_item(keymap, "NLA_OT_fmodifier_add", MKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
/* transform system */
transform_keymap_for_space(keyconf, keymap, SPACE_NLA);
@@ -318,4 +318,3 @@ void nla_keymap(wmKeyConfig *keyconf)
keymap = WM_keymap_find(keyconf, "NLA Editor", SPACE_NLA, 0);
nla_keymap_main(keyconf, keymap);
}
-
diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c
index b0cd59ea7ad..1ba15d529e8 100644
--- a/source/blender/editors/space_nla/nla_select.c
+++ b/source/blender/editors/space_nla/nla_select.c
@@ -57,12 +57,12 @@
#include "UI_view2d.h"
-#include "nla_intern.h" // own include
+#include "nla_intern.h" // own include
/* ******************** Utilities ***************************************** */
/* Convert SELECT_* flags to ACHANNEL_SETFLAG_* flags */
-static short selmodes_to_flagmodes (short sel)
+static short selmodes_to_flagmodes(short sel)
{
/* convert selection modes to selection modes */
switch (sel) {
@@ -98,13 +98,13 @@ enum {
/* Deselects strips in the NLA Editor
* - This is called by the deselect all operator, as well as other ones!
*
- * - test: check if select or deselect all (1) or clear all active (2)
+ * - test: check if select or deselect all (1) or clear all active (2)
* - sel: how to select keyframes
* 0 = deselect
* 1 = select
* 2 = invert
*/
-static void deselect_nla_strips (bAnimContext *ac, short test, short sel)
+static void deselect_nla_strips(bAnimContext *ac, short test, short sel)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
@@ -113,21 +113,21 @@ static void deselect_nla_strips (bAnimContext *ac, short test, short sel)
/* determine type-based settings */
// FIXME: double check whether ANIMFILTER_LIST_VISIBLE is needed!
- filter= (ANIMFILTER_DATA_VISIBLE);
+ filter = (ANIMFILTER_DATA_VISIBLE);
/* filter data */
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* See if we should be selecting or deselecting */
if (test == DESELECT_STRIPS_TEST) {
- for (ale= anim_data.first; ale; ale= ale->next) {
- NlaTrack *nlt= (NlaTrack *)ale->data;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ NlaTrack *nlt = (NlaTrack *)ale->data;
NlaStrip *strip;
/* if any strip is selected, break out, since we should now be deselecting */
- for (strip= nlt->strips.first; strip; strip= strip->next) {
+ for (strip = nlt->strips.first; strip; strip = strip->next) {
if (strip->flag & NLASTRIP_FLAG_SELECT) {
- sel= SELECT_SUBTRACT;
+ sel = SELECT_SUBTRACT;
break;
}
}
@@ -138,15 +138,15 @@ static void deselect_nla_strips (bAnimContext *ac, short test, short sel)
}
/* convert selection modes to selection modes */
- smode= selmodes_to_flagmodes(sel);
+ smode = selmodes_to_flagmodes(sel);
/* Now set the flags */
- for (ale= anim_data.first; ale; ale= ale->next) {
- NlaTrack *nlt= (NlaTrack *)ale->data;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ NlaTrack *nlt = (NlaTrack *)ale->data;
NlaStrip *strip;
/* apply same selection to all strips */
- for (strip= nlt->strips.first; strip; strip= strip->next) {
+ for (strip = nlt->strips.first; strip; strip = strip->next) {
/* set selection */
if (test != DESELECT_STRIPS_CLEARACTIVE)
ACHANNEL_SET_FLAG(strip, smode, NLASTRIP_FLAG_SELECT);
@@ -178,12 +178,12 @@ static int nlaedit_deselectall_exec(bContext *C, wmOperator *op)
deselect_nla_strips(&ac, DESELECT_STRIPS_TEST, SELECT_ADD);
/* set notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_SELECTED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_SELECTED, NULL);
return OPERATOR_FINISHED;
}
-void NLA_OT_select_all_toggle (wmOperatorType *ot)
+void NLA_OT_select_all_toggle(wmOperatorType *ot)
{
/* identifiers */
ot->name = "(De)select All";
@@ -195,7 +195,7 @@ void NLA_OT_select_all_toggle (wmOperatorType *ot)
ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag = OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
+ ot->flag = OPTYPE_REGISTER /*|OPTYPE_UNDO*/;
/* props */
RNA_def_boolean(ot->srna, "invert", 0, "Invert", "");
@@ -203,59 +203,59 @@ void NLA_OT_select_all_toggle (wmOperatorType *ot)
/* ******************** Border Select Operator **************************** */
/* This operator currently works in one of three ways:
- * -> BKEY - 1) all strips within region are selected (NLAEDIT_BORDERSEL_ALLSTRIPS)
- * -> ALT-BKEY - depending on which axis of the region was larger...
- * -> 2) x-axis, so select all frames within frame range (NLAEDIT_BORDERSEL_FRAMERANGE)
- * -> 3) y-axis, so select all frames within channels that region included (NLAEDIT_BORDERSEL_CHANNELS)
+ * -> BKEY - 1) all strips within region are selected (NLAEDIT_BORDERSEL_ALLSTRIPS)
+ * -> ALT-BKEY - depending on which axis of the region was larger...
+ * -> 2) x-axis, so select all frames within frame range (NLAEDIT_BORDERSEL_FRAMERANGE)
+ * -> 3) y-axis, so select all frames within channels that region included (NLAEDIT_BORDERSEL_CHANNELS)
*/
/* defines for borderselect mode */
enum {
- NLA_BORDERSEL_ALLSTRIPS = 0,
+ NLA_BORDERSEL_ALLSTRIPS = 0,
NLA_BORDERSEL_FRAMERANGE,
NLA_BORDERSEL_CHANNELS,
} /* eNLAEDIT_BorderSelect_Mode */;
-static void borderselect_nla_strips (bAnimContext *ac, rcti rect, short mode, short selectmode)
+static void borderselect_nla_strips(bAnimContext *ac, rcti rect, short mode, short selectmode)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
SpaceNla *snla = (SpaceNla *)ac->sl;
- View2D *v2d= &ac->ar->v2d;
+ View2D *v2d = &ac->ar->v2d;
rctf rectf;
- float ymin /* =(float)(-NLACHANNEL_HEIGHT(snla)) */ /* UNUSED */, ymax=0;
+ float ymin /* =(float)(-NLACHANNEL_HEIGHT(snla)) */ /* UNUSED */, ymax = 0;
/* convert border-region to view coordinates */
- UI_view2d_region_to_view(v2d, rect.xmin, rect.ymin+2, &rectf.xmin, &rectf.ymin);
- UI_view2d_region_to_view(v2d, rect.xmax, rect.ymax-2, &rectf.xmax, &rectf.ymax);
+ UI_view2d_region_to_view(v2d, rect.xmin, rect.ymin + 2, &rectf.xmin, &rectf.ymin);
+ UI_view2d_region_to_view(v2d, rect.xmax, rect.ymax - 2, &rectf.xmax, &rectf.ymax);
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* convert selection modes to selection modes */
- selectmode= selmodes_to_flagmodes(selectmode);
+ selectmode = selmodes_to_flagmodes(selectmode);
/* loop over data, doing border select */
- for (ale= anim_data.first; ale; ale= ale->next) {
- ymin= ymax - NLACHANNEL_STEP(snla);
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ ymin = ymax - NLACHANNEL_STEP(snla);
/* perform vertical suitability check (if applicable) */
if ( (mode == NLA_BORDERSEL_FRAMERANGE) ||
- !((ymax < rectf.ymin) || (ymin > rectf.ymax)) )
+ !((ymax < rectf.ymin) || (ymin > rectf.ymax)) )
{
/* loop over data selecting (only if NLA-Track) */
if (ale->type == ANIMTYPE_NLATRACK) {
- NlaTrack *nlt= (NlaTrack *)ale->data;
+ NlaTrack *nlt = (NlaTrack *)ale->data;
NlaStrip *strip;
/* only select strips if they fall within the required ranges (if applicable) */
- for (strip= nlt->strips.first; strip; strip= strip->next) {
- if ( (mode == NLA_BORDERSEL_CHANNELS) ||
- BKE_nlastrip_within_bounds(strip, rectf.xmin, rectf.xmax) )
+ for (strip = nlt->strips.first; strip; strip = strip->next) {
+ if ( (mode == NLA_BORDERSEL_CHANNELS) ||
+ BKE_nlastrip_within_bounds(strip, rectf.xmin, rectf.xmax))
{
/* set selection */
ACHANNEL_SET_FLAG(strip, selectmode, NLASTRIP_FLAG_SELECT);
@@ -268,7 +268,7 @@ static void borderselect_nla_strips (bAnimContext *ac, rcti rect, short mode, sh
}
/* set minimum extent to be the maximum of the next channel */
- ymax= ymin;
+ ymax = ymin;
}
/* cleanup */
@@ -281,7 +281,7 @@ static int nlaedit_borderselect_exec(bContext *C, wmOperator *op)
{
bAnimContext ac;
rcti rect;
- short mode=0, selectmode=0;
+ short mode = 0, selectmode = 0;
int extend;
/* get editor data */
@@ -289,7 +289,7 @@ static int nlaedit_borderselect_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* clear all selection if not extending selection */
- extend= RNA_boolean_get(op->ptr, "extend");
+ extend = RNA_boolean_get(op->ptr, "extend");
if (!extend)
deselect_nla_strips(&ac, DESELECT_STRIPS_TEST, SELECT_SUBTRACT);
@@ -312,18 +312,18 @@ static int nlaedit_borderselect_exec(bContext *C, wmOperator *op)
* used for tweaking timing when "blocking", while channels is not that useful...
*/
if ((rect.xmax - rect.xmin) >= (rect.ymax - rect.ymin))
- mode= NLA_BORDERSEL_FRAMERANGE;
+ mode = NLA_BORDERSEL_FRAMERANGE;
else
- mode= NLA_BORDERSEL_CHANNELS;
+ mode = NLA_BORDERSEL_CHANNELS;
}
else
- mode= NLA_BORDERSEL_ALLSTRIPS;
+ mode = NLA_BORDERSEL_ALLSTRIPS;
/* apply borderselect action */
borderselect_nla_strips(&ac, rect, mode, selectmode);
/* set notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_SELECTED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_SELECTED, NULL);
return OPERATOR_FINISHED;
}
@@ -344,7 +344,7 @@ void NLA_OT_select_border(wmOperatorType *ot)
ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* rna */
WM_operator_properties_gesture_border(ot, 1);
@@ -365,13 +365,13 @@ static EnumPropertyItem prop_nlaedit_leftright_select_types[] = {
/* ------------------- */
-static void nlaedit_select_leftright (bContext *C, bAnimContext *ac, short leftright, short select_mode)
+static void nlaedit_select_leftright(bContext *C, bAnimContext *ac, short leftright, short select_mode)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
- Scene *scene= ac->scene;
+ Scene *scene = ac->scene;
float xmin, xmax;
/* if currently in tweakmode, exit tweakmode first */
@@ -379,8 +379,8 @@ static void nlaedit_select_leftright (bContext *C, bAnimContext *ac, short leftr
WM_operator_name_call(C, "NLA_OT_tweakmode_exit", WM_OP_EXEC_DEFAULT, NULL);
/* if select mode is replace, deselect all keyframes (and channels) first */
- if (select_mode==SELECT_REPLACE) {
- select_mode= SELECT_ADD;
+ if (select_mode == SELECT_REPLACE) {
+ select_mode = SELECT_ADD;
/* - deselect all other keyframes, so that just the newly selected remain
* - channels aren't deselected, since we don't re-select any as a consequence
@@ -398,20 +398,20 @@ static void nlaedit_select_leftright (bContext *C, bAnimContext *ac, short leftr
xmax = MAXFRAMEF;
}
- select_mode= selmodes_to_flagmodes(select_mode);
+ select_mode = selmodes_to_flagmodes(select_mode);
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* select strips on the side where most data occurs */
- for (ale= anim_data.first; ale; ale= ale->next) {
- NlaTrack *nlt= (NlaTrack *)ale->data;
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ NlaTrack *nlt = (NlaTrack *)ale->data;
NlaStrip *strip;
/* check each strip to see if it is appropriate */
- for (strip= nlt->strips.first; strip; strip= strip->next) {
+ for (strip = nlt->strips.first; strip; strip = strip->next) {
if (BKE_nlastrip_within_bounds(strip, xmin, xmax)) {
ACHANNEL_SET_FLAG(strip, select_mode, NLASTRIP_FLAG_SELECT);
}
@@ -424,7 +424,7 @@ static void nlaedit_select_leftright (bContext *C, bAnimContext *ac, short leftr
/* ------------------- */
-static int nlaedit_select_leftright_exec (bContext *C, wmOperator *op)
+static int nlaedit_select_leftright_exec(bContext *C, wmOperator *op)
{
bAnimContext ac;
short leftright = RNA_enum_get(op->ptr, "mode");
@@ -436,9 +436,9 @@ static int nlaedit_select_leftright_exec (bContext *C, wmOperator *op)
/* select mode is either replace (deselect all, then add) or add/extend */
if (RNA_boolean_get(op->ptr, "extend"))
- selectmode= SELECT_INVERT;
+ selectmode = SELECT_INVERT;
else
- selectmode= SELECT_REPLACE;
+ selectmode = SELECT_REPLACE;
/* if "test" mode is set, we don't have any info to set this with */
if (leftright == NLAEDIT_LRSEL_TEST)
@@ -448,12 +448,12 @@ static int nlaedit_select_leftright_exec (bContext *C, wmOperator *op)
nlaedit_select_leftright(C, &ac, leftright, selectmode);
/* set notifier that keyframe selection (and channels too) have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|ND_ANIMCHAN|NA_SELECTED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | ND_ANIMCHAN | NA_SELECTED, NULL);
return OPERATOR_FINISHED;
}
-static int nlaedit_select_leftright_invoke (bContext *C, wmOperator *op, wmEvent *event)
+static int nlaedit_select_leftright_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
bAnimContext ac;
short leftright = RNA_enum_get(op->ptr, "mode");
@@ -464,9 +464,9 @@ static int nlaedit_select_leftright_invoke (bContext *C, wmOperator *op, wmEvent
/* handle mode-based testing */
if (leftright == NLAEDIT_LRSEL_TEST) {
- Scene *scene= ac.scene;
- ARegion *ar= ac.ar;
- View2D *v2d= &ar->v2d;
+ Scene *scene = ac.scene;
+ ARegion *ar = ac.ar;
+ View2D *v2d = &ar->v2d;
float x;
/* determine which side of the current frame mouse is on */
@@ -481,7 +481,7 @@ static int nlaedit_select_leftright_invoke (bContext *C, wmOperator *op, wmEvent
return nlaedit_select_leftright_exec(C, op);
}
-void NLA_OT_select_leftright (wmOperatorType *ot)
+void NLA_OT_select_leftright(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Select Left/Right";
@@ -494,7 +494,7 @@ void NLA_OT_select_leftright (wmOperatorType *ot)
ot->poll = ED_operator_nla_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* id-props */
ot->prop = RNA_def_enum(ot->srna, "mode", prop_nlaedit_leftright_select_types, NLAEDIT_LRSEL_TEST, "Mode", "");
@@ -505,15 +505,15 @@ void NLA_OT_select_leftright (wmOperatorType *ot)
/* ******************** Mouse-Click Select Operator *********************** */
/* select strip directly under mouse */
-static void mouse_nla_strips (bContext *C, bAnimContext *ac, const int mval[2], short select_mode)
+static void mouse_nla_strips(bContext *C, bAnimContext *ac, const int mval[2], short select_mode)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale = NULL;
int filter;
SpaceNla *snla = (SpaceNla *)ac->sl;
- View2D *v2d= &ac->ar->v2d;
- Scene *scene= ac->scene;
+ View2D *v2d = &ac->ar->v2d;
+ Scene *scene = ac->scene;
NlaStrip *strip = NULL;
int channel_index;
float xmin, xmax, dummy;
@@ -527,15 +527,15 @@ static void mouse_nla_strips (bContext *C, bAnimContext *ac, const int mval[2],
/* x-range to check is +/- 7 (in screen/region-space) on either side of mouse click
* (that is the size of keyframe icons, so user should be expecting similar tolerances)
*/
- UI_view2d_region_to_view(v2d, mval[0]-7, mval[1], &xmin, &dummy);
- UI_view2d_region_to_view(v2d, mval[0]+7, mval[1], &xmax, &dummy);
+ UI_view2d_region_to_view(v2d, mval[0] - 7, mval[1], &xmin, &dummy);
+ UI_view2d_region_to_view(v2d, mval[0] + 7, mval[1], &xmax, &dummy);
/* filter data */
- filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS);
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* try to get channel */
- ale= BLI_findlink(&anim_data, channel_index);
+ ale = BLI_findlink(&anim_data, channel_index);
if (ale == NULL) {
/* channel not found */
printf("Error: animation channel (index = %d) not found in mouse_nla_strips()\n", channel_index);
@@ -545,10 +545,10 @@ static void mouse_nla_strips (bContext *C, bAnimContext *ac, const int mval[2],
else {
/* found some channel - we only really should do somethign when its an Nla-Track */
if (ale->type == ANIMTYPE_NLATRACK) {
- NlaTrack *nlt= (NlaTrack *)ale->data;
+ NlaTrack *nlt = (NlaTrack *)ale->data;
/* loop over NLA-strips in this track, trying to find one which occurs in the necessary bounds */
- for (strip= nlt->strips.first; strip; strip= strip->next) {
+ for (strip = nlt->strips.first; strip; strip = strip->next) {
if (BKE_nlastrip_within_bounds(strip, xmin, xmax))
break;
}
@@ -580,7 +580,7 @@ static void mouse_nla_strips (bContext *C, bAnimContext *ac, const int mval[2],
/* Highlight NLA-Track */
if (ale->type == ANIMTYPE_NLATRACK) {
- NlaTrack *nlt= (NlaTrack *)ale->data;
+ NlaTrack *nlt = (NlaTrack *)ale->data;
nlt->flag |= NLATRACK_SELECTED;
ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, nlt, ANIMTYPE_NLATRACK);
@@ -591,7 +591,7 @@ static void mouse_nla_strips (bContext *C, bAnimContext *ac, const int mval[2],
if (ale) {
/* select the strip accordingly (if a matching one was found) */
if (strip) {
- select_mode= selmodes_to_flagmodes(select_mode);
+ select_mode = selmodes_to_flagmodes(select_mode);
ACHANNEL_SET_FLAG(strip, select_mode, NLASTRIP_FLAG_SELECT);
/* if we selected it, we can make it active too
@@ -629,21 +629,21 @@ static int nlaedit_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *even
/* select mode is either replace (deselect all, then add) or add/extend */
if (RNA_boolean_get(op->ptr, "extend"))
- selectmode= SELECT_INVERT;
+ selectmode = SELECT_INVERT;
else
- selectmode= SELECT_REPLACE;
+ selectmode = SELECT_REPLACE;
/* select strips based upon mouse position */
mouse_nla_strips(C, &ac, event->mval, selectmode);
/* set notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_SELECTED, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_SELECTED, NULL);
/* for tweak grab to work */
- return OPERATOR_FINISHED|OPERATOR_PASS_THROUGH;
+ return OPERATOR_FINISHED | OPERATOR_PASS_THROUGH;
}
-void NLA_OT_click_select (wmOperatorType *ot)
+void NLA_OT_click_select(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Mouse Select";
@@ -655,7 +655,7 @@ void NLA_OT_click_select (wmOperatorType *ot)
ot->poll = ED_operator_nla_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* id-props */
RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); // SHIFTKEY
diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c
index 4dc3aef7d2c..7c9014bd45f 100644
--- a/source/blender/editors/space_nla/space_nla.c
+++ b/source/blender/editors/space_nla/space_nla.c
@@ -60,7 +60,7 @@
#include "UI_resources.h"
#include "UI_view2d.h"
-#include "nla_intern.h" // own include
+#include "nla_intern.h" /* own include */
/* ******************** manage regions ********************* */
@@ -68,20 +68,20 @@ ARegion *nla_has_buttons_region(ScrArea *sa)
{
ARegion *ar, *arnew;
- ar= BKE_area_find_region_type(sa, RGN_TYPE_UI);
+ ar = BKE_area_find_region_type(sa, RGN_TYPE_UI);
if (ar) return ar;
/* add subdiv level; after main */
- ar= BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
+ ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
/* is error! */
- if (ar==NULL) return NULL;
+ if (ar == NULL) return NULL;
- arnew= MEM_callocN(sizeof(ARegion), "buttons for nla");
+ arnew = MEM_callocN(sizeof(ARegion), "buttons for nla");
BLI_insertlinkafter(&sa->regionbase, ar, arnew);
- arnew->regiontype= RGN_TYPE_UI;
- arnew->alignment= RGN_ALIGN_RIGHT;
+ arnew->regiontype = RGN_TYPE_UI;
+ arnew->alignment = RGN_ALIGN_RIGHT;
arnew->flag = RGN_FLAG_HIDDEN;
@@ -94,72 +94,72 @@ ARegion *nla_has_buttons_region(ScrArea *sa)
static SpaceLink *nla_new(const bContext *C)
{
- Scene *scene= CTX_data_scene(C);
- ScrArea *sa= CTX_wm_area(C);
+ Scene *scene = CTX_data_scene(C);
+ ScrArea *sa = CTX_wm_area(C);
ARegion *ar;
SpaceNla *snla;
- snla= MEM_callocN(sizeof(SpaceNla), "initnla");
- snla->spacetype= SPACE_NLA;
+ snla = MEM_callocN(sizeof(SpaceNla), "initnla");
+ snla->spacetype = SPACE_NLA;
/* allocate DopeSheet data for NLA Editor */
- snla->ads= MEM_callocN(sizeof(bDopeSheet), "NlaEdit DopeSheet");
- snla->ads->source= (ID *)scene;
+ snla->ads = MEM_callocN(sizeof(bDopeSheet), "NlaEdit DopeSheet");
+ snla->ads->source = (ID *)scene;
/* set auto-snapping settings */
snla->autosnap = SACTSNAP_FRAME;
/* header */
- ar= MEM_callocN(sizeof(ARegion), "header for nla");
+ ar = MEM_callocN(sizeof(ARegion), "header for nla");
BLI_addtail(&snla->regionbase, ar);
- ar->regiontype= RGN_TYPE_HEADER;
- ar->alignment= RGN_ALIGN_BOTTOM;
+ ar->regiontype = RGN_TYPE_HEADER;
+ ar->alignment = RGN_ALIGN_BOTTOM;
/* channel list region */
- ar= MEM_callocN(sizeof(ARegion), "channel list for nla");
+ ar = MEM_callocN(sizeof(ARegion), "channel list for nla");
BLI_addtail(&snla->regionbase, ar);
- ar->regiontype= RGN_TYPE_CHANNELS;
- ar->alignment= RGN_ALIGN_LEFT;
+ ar->regiontype = RGN_TYPE_CHANNELS;
+ ar->alignment = RGN_ALIGN_LEFT;
- /* only need to set these settings since this will use the 'stack' configuration */
+ /* only need to set these settings since this will use the 'stack' configuration */
ar->v2d.scroll = V2D_SCROLL_BOTTOM;
ar->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL;
/* ui buttons */
- ar= MEM_callocN(sizeof(ARegion), "buttons area for nla");
+ ar = MEM_callocN(sizeof(ARegion), "buttons area for nla");
BLI_addtail(&snla->regionbase, ar);
- ar->regiontype= RGN_TYPE_UI;
- ar->alignment= RGN_ALIGN_RIGHT;
+ ar->regiontype = RGN_TYPE_UI;
+ ar->alignment = RGN_ALIGN_RIGHT;
ar->flag = RGN_FLAG_HIDDEN;
/* main area */
- ar= MEM_callocN(sizeof(ARegion), "main area for nla");
+ ar = MEM_callocN(sizeof(ARegion), "main area for nla");
BLI_addtail(&snla->regionbase, ar);
- ar->regiontype= RGN_TYPE_WINDOW;
+ ar->regiontype = RGN_TYPE_WINDOW;
- ar->v2d.tot.xmin = (float)(SFRA-10);
- ar->v2d.tot.ymin = (float)(-sa->winy)/3.0f;
- ar->v2d.tot.xmax = (float)(EFRA+10);
+ ar->v2d.tot.xmin = (float)(SFRA - 10);
+ ar->v2d.tot.ymin = (float)(-sa->winy) / 3.0f;
+ ar->v2d.tot.xmax = (float)(EFRA + 10);
ar->v2d.tot.ymax = 0.0f;
ar->v2d.cur = ar->v2d.tot;
- ar->v2d.min[0]= 0.0f;
- ar->v2d.min[1]= 0.0f;
+ ar->v2d.min[0] = 0.0f;
+ ar->v2d.min[1] = 0.0f;
- ar->v2d.max[0]= MAXFRAMEF;
- ar->v2d.max[1]= 10000.0f;
+ ar->v2d.max[0] = MAXFRAMEF;
+ ar->v2d.max[1] = 10000.0f;
- ar->v2d.minzoom= 0.01f;
- ar->v2d.maxzoom= 50;
- ar->v2d.scroll = (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL);
+ ar->v2d.minzoom = 0.01f;
+ ar->v2d.maxzoom = 50;
+ ar->v2d.scroll = (V2D_SCROLL_BOTTOM | V2D_SCROLL_SCALE_HORIZONTAL);
ar->v2d.scroll |= (V2D_SCROLL_RIGHT);
- ar->v2d.keepzoom= V2D_LOCKZOOM_Y;
- ar->v2d.keepofs= V2D_KEEPOFS_Y;
- ar->v2d.align= V2D_ALIGN_NO_POS_Y;
+ ar->v2d.keepzoom = V2D_LOCKZOOM_Y;
+ ar->v2d.keepofs = V2D_KEEPOFS_Y;
+ ar->v2d.align = V2D_ALIGN_NO_POS_Y;
ar->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL;
return (SpaceLink *)snla;
@@ -168,7 +168,7 @@ static SpaceLink *nla_new(const bContext *C)
/* not spacelink itself */
static void nla_free(SpaceLink *sl)
{
- SpaceNla *snla= (SpaceNla*) sl;
+ SpaceNla *snla = (SpaceNla *) sl;
if (snla->ads) {
BLI_freelistN(&snla->ads->chanbase);
@@ -180,12 +180,12 @@ static void nla_free(SpaceLink *sl)
/* spacetype; init callback */
static void nla_init(struct wmWindowManager *UNUSED(wm), ScrArea *sa)
{
- SpaceNla *snla= (SpaceNla *)sa->spacedata.first;
+ SpaceNla *snla = (SpaceNla *)sa->spacedata.first;
/* init dopesheet data if non-existant (i.e. for old files) */
if (snla->ads == NULL) {
- snla->ads= MEM_callocN(sizeof(bDopeSheet), "NlaEdit DopeSheet");
- snla->ads->source= (ID *)G.main->scene.first; // XXX this is bad, but we need this to be set correct
+ snla->ads = MEM_callocN(sizeof(bDopeSheet), "NlaEdit DopeSheet");
+ snla->ads->source = (ID *)G.main->scene.first; // XXX this is bad, but we need this to be set correct
}
ED_area_tag_refresh(sa);
@@ -193,10 +193,10 @@ static void nla_init(struct wmWindowManager *UNUSED(wm), ScrArea *sa)
static SpaceLink *nla_duplicate(SpaceLink *sl)
{
- SpaceNla *snlan= MEM_dupallocN(sl);
+ SpaceNla *snlan = MEM_dupallocN(sl);
/* clear or remove stuff from old */
- snlan->ads= MEM_dupallocN(snlan->ads);
+ snlan->ads = MEM_dupallocN(snlan->ads);
return (SpaceLink *)snlan;
}
@@ -209,10 +209,10 @@ static void nla_channel_area_init(wmWindowManager *wm, ARegion *ar)
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_LIST, ar->winx, ar->winy);
/* own keymap */
- /* own channels map first to override some channel keymaps */
+ /* own channels map first to override some channel keymaps */
keymap = WM_keymap_find(wm->defaultconf, "NLA Channels", SPACE_NLA, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
- /* now generic channels map for everything else that can apply */
+ /* now generic channels map for everything else that can apply */
keymap = WM_keymap_find(wm->defaultconf, "Animation Channels", 0, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
@@ -224,7 +224,7 @@ static void nla_channel_area_init(wmWindowManager *wm, ARegion *ar)
static void nla_channel_area_draw(const bContext *C, ARegion *ar)
{
bAnimContext ac;
- View2D *v2d= &ar->v2d;
+ View2D *v2d = &ar->v2d;
View2DScrollers *scrollers;
/* clear and setup matrix */
@@ -242,7 +242,7 @@ static void nla_channel_area_draw(const bContext *C, ARegion *ar)
UI_view2d_view_restore(C);
/* scrollers */
- scrollers= UI_view2d_scrollers_calc(C, v2d, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY);
+ scrollers = UI_view2d_scrollers_calc(C, v2d, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY);
UI_view2d_scrollers_draw(C, v2d, scrollers);
UI_view2d_scrollers_free(scrollers);
}
@@ -265,12 +265,12 @@ static void nla_main_area_init(wmWindowManager *wm, ARegion *ar)
static void nla_main_area_draw(const bContext *C, ARegion *ar)
{
/* draw entirely, view changes should be handled here */
- SpaceNla *snla= CTX_wm_space_nla(C);
+ SpaceNla *snla = CTX_wm_space_nla(C);
bAnimContext ac;
- View2D *v2d= &ar->v2d;
+ View2D *v2d = &ar->v2d;
View2DGrid *grid;
View2DScrollers *scrollers;
- short unit=0, flag=0;
+ short unit = 0, flag = 0;
/* clear and setup matrix */
UI_ThemeClearColor(TH_BACK);
@@ -279,8 +279,8 @@ static void nla_main_area_draw(const bContext *C, ARegion *ar)
UI_view2d_view_ortho(v2d);
/* time grid */
- unit= (snla->flag & SNLA_DRAWTIME)? V2D_UNIT_SECONDS : V2D_UNIT_FRAMES;
- grid= UI_view2d_grid_calc(CTX_data_scene(C), v2d, unit, V2D_GRID_CLAMP, V2D_ARG_DUMMY, V2D_ARG_DUMMY, ar->winx, ar->winy);
+ unit = (snla->flag & SNLA_DRAWTIME) ? V2D_UNIT_SECONDS : V2D_UNIT_FRAMES;
+ grid = UI_view2d_grid_calc(CTX_data_scene(C), v2d, unit, V2D_GRID_CLAMP, V2D_ARG_DUMMY, V2D_ARG_DUMMY, ar->winx, ar->winy);
UI_view2d_grid_draw(v2d, grid, V2D_GRIDLINES_ALL);
UI_view2d_grid_free(grid);
@@ -296,8 +296,8 @@ static void nla_main_area_draw(const bContext *C, ARegion *ar)
UI_view2d_view_ortho(v2d);
/* current frame */
- if (snla->flag & SNLA_DRAWTIME) flag |= DRAWCFRA_UNIT_SECONDS;
- if ((snla->flag & SNLA_NODRAWCFRANUM)==0) flag |= DRAWCFRA_SHOW_NUMBOX;
+ if (snla->flag & SNLA_DRAWTIME) flag |= DRAWCFRA_UNIT_SECONDS;
+ if ((snla->flag & SNLA_NODRAWCFRANUM) == 0) flag |= DRAWCFRA_SHOW_NUMBOX;
ANIM_draw_cfra(C, v2d, flag);
/* markers */
@@ -312,7 +312,7 @@ static void nla_main_area_draw(const bContext *C, ARegion *ar)
UI_view2d_view_restore(C);
/* scrollers */
- scrollers= UI_view2d_scrollers_calc(C, v2d, unit, V2D_GRID_CLAMP, V2D_ARG_DUMMY, V2D_ARG_DUMMY);
+ scrollers = UI_view2d_scrollers_calc(C, v2d, unit, V2D_GRID_CLAMP, V2D_ARG_DUMMY, V2D_ARG_DUMMY);
UI_view2d_scrollers_draw(C, v2d, scrollers);
UI_view2d_scrollers_free(scrollers);
}
@@ -348,12 +348,12 @@ static void nla_buttons_area_draw(const bContext *C, ARegion *ar)
static void nla_region_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
- switch(wmn->category) {
+ switch (wmn->category) {
case NC_ANIMATION:
ED_region_tag_redraw(ar);
break;
case NC_SCENE:
- switch(wmn->data) {
+ switch (wmn->data) {
case ND_OB_ACTIVE:
case ND_FRAME:
case ND_MARKERS:
@@ -362,7 +362,7 @@ static void nla_region_listener(ARegion *ar, wmNotifier *wmn)
}
break;
case NC_OBJECT:
- switch(wmn->data) {
+ switch (wmn->data) {
case ND_BONE_ACTIVE:
case ND_BONE_SELECT:
case ND_KEYS:
@@ -371,7 +371,7 @@ static void nla_region_listener(ARegion *ar, wmNotifier *wmn)
}
break;
default:
- if (wmn->data==ND_KEYS)
+ if (wmn->data == ND_KEYS)
ED_region_tag_redraw(ar);
break;
}
@@ -381,12 +381,12 @@ static void nla_region_listener(ARegion *ar, wmNotifier *wmn)
static void nla_main_area_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
- switch(wmn->category) {
+ switch (wmn->category) {
case NC_ANIMATION:
ED_region_tag_redraw(ar);
break;
case NC_SCENE:
- switch(wmn->data) {
+ switch (wmn->data) {
case ND_RENDER_OPTIONS:
case ND_OB_ACTIVE:
case ND_FRAME:
@@ -396,7 +396,7 @@ static void nla_main_area_listener(ARegion *ar, wmNotifier *wmn)
}
break;
case NC_OBJECT:
- switch(wmn->data) {
+ switch (wmn->data) {
case ND_BONE_ACTIVE:
case ND_BONE_SELECT:
case ND_KEYS:
@@ -406,7 +406,7 @@ static void nla_main_area_listener(ARegion *ar, wmNotifier *wmn)
}
break;
case NC_NODE:
- switch(wmn->action) {
+ switch (wmn->action) {
case NA_EDITED:
ED_region_tag_redraw(ar);
break;
@@ -417,7 +417,7 @@ static void nla_main_area_listener(ARegion *ar, wmNotifier *wmn)
ED_region_tag_redraw(ar);
break;
default:
- if (wmn->data==ND_KEYS)
+ if (wmn->data == ND_KEYS)
ED_region_tag_redraw(ar);
}
}
@@ -425,19 +425,19 @@ static void nla_main_area_listener(ARegion *ar, wmNotifier *wmn)
static void nla_channel_area_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
- switch(wmn->category) {
+ switch (wmn->category) {
case NC_ANIMATION:
ED_region_tag_redraw(ar);
break;
case NC_SCENE:
- switch(wmn->data) {
+ switch (wmn->data) {
case ND_OB_ACTIVE:
ED_region_tag_redraw(ar);
break;
}
break;
case NC_OBJECT:
- switch(wmn->data) {
+ switch (wmn->data) {
case ND_BONE_ACTIVE:
case ND_BONE_SELECT:
case ND_KEYS:
@@ -451,7 +451,7 @@ static void nla_channel_area_listener(ARegion *ar, wmNotifier *wmn)
break;
default:
- if (wmn->data==ND_KEYS)
+ if (wmn->data == ND_KEYS)
ED_region_tag_redraw(ar);
}
}
@@ -496,61 +496,61 @@ static void nla_listener(ScrArea *sa, wmNotifier *wmn)
/* only called once, from space/spacetypes.c */
void ED_spacetype_nla(void)
{
- SpaceType *st= MEM_callocN(sizeof(SpaceType), "spacetype nla");
+ SpaceType *st = MEM_callocN(sizeof(SpaceType), "spacetype nla");
ARegionType *art;
- st->spaceid= SPACE_NLA;
+ st->spaceid = SPACE_NLA;
strncpy(st->name, "NLA", BKE_ST_MAXNAME);
- st->new= nla_new;
- st->free= nla_free;
- st->init= nla_init;
- st->duplicate= nla_duplicate;
- st->operatortypes= nla_operatortypes;
- st->listener= nla_listener;
- st->keymap= nla_keymap;
+ st->new = nla_new;
+ st->free = nla_free;
+ st->init = nla_init;
+ st->duplicate = nla_duplicate;
+ st->operatortypes = nla_operatortypes;
+ st->listener = nla_listener;
+ st->keymap = nla_keymap;
/* regions: main window */
- art= MEM_callocN(sizeof(ARegionType), "spacetype nla region");
+ art = MEM_callocN(sizeof(ARegionType), "spacetype nla region");
art->regionid = RGN_TYPE_WINDOW;
- art->init= nla_main_area_init;
- art->draw= nla_main_area_draw;
- art->listener= nla_main_area_listener;
- art->keymapflag= ED_KEYMAP_VIEW2D|ED_KEYMAP_MARKERS|ED_KEYMAP_ANIMATION|ED_KEYMAP_FRAMES;
+ art->init = nla_main_area_init;
+ art->draw = nla_main_area_draw;
+ art->listener = nla_main_area_listener;
+ art->keymapflag = ED_KEYMAP_VIEW2D | ED_KEYMAP_MARKERS | ED_KEYMAP_ANIMATION | ED_KEYMAP_FRAMES;
BLI_addhead(&st->regiontypes, art);
/* regions: header */
- art= MEM_callocN(sizeof(ARegionType), "spacetype nla region");
+ art = MEM_callocN(sizeof(ARegionType), "spacetype nla region");
art->regionid = RGN_TYPE_HEADER;
- art->prefsizey= HEADERY;
- art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D|ED_KEYMAP_FRAMES|ED_KEYMAP_HEADER;
+ art->prefsizey = HEADERY;
+ art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_HEADER;
- art->init= nla_header_area_init;
- art->draw= nla_header_area_draw;
+ art->init = nla_header_area_init;
+ art->draw = nla_header_area_draw;
BLI_addhead(&st->regiontypes, art);
/* regions: channels */
- art= MEM_callocN(sizeof(ARegionType), "spacetype nla region");
+ art = MEM_callocN(sizeof(ARegionType), "spacetype nla region");
art->regionid = RGN_TYPE_CHANNELS;
- art->prefsizex= 200;
- art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D;
+ art->prefsizex = 200;
+ art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D;
- art->init= nla_channel_area_init;
- art->draw= nla_channel_area_draw;
- art->listener= nla_channel_area_listener;
+ art->init = nla_channel_area_init;
+ art->draw = nla_channel_area_draw;
+ art->listener = nla_channel_area_listener;
BLI_addhead(&st->regiontypes, art);
/* regions: UI buttons */
- art= MEM_callocN(sizeof(ARegionType), "spacetype nla region");
+ art = MEM_callocN(sizeof(ARegionType), "spacetype nla region");
art->regionid = RGN_TYPE_UI;
- art->prefsizex= 200;
- art->keymapflag= ED_KEYMAP_UI;
- art->listener= nla_region_listener;
- art->init= nla_buttons_area_init;
- art->draw= nla_buttons_area_draw;
+ art->prefsizex = 200;
+ art->keymapflag = ED_KEYMAP_UI;
+ art->listener = nla_region_listener;
+ art->init = nla_buttons_area_init;
+ art->draw = nla_buttons_area_draw;
BLI_addhead(&st->regiontypes, art);
@@ -559,4 +559,3 @@ void ED_spacetype_nla(void)
BKE_spacetype_register(st);
}
-
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 42aea32b7f6..c2b7a1d6a7f 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -98,71 +98,23 @@ static void node_socket_button_label(const bContext *UNUSED(C), uiBlock *block,
uiDefBut(block, LABEL, 0, sock->name, x, y, width, NODE_DY, NULL, 0, 0, 0, 0, "");
}
-/* draw function for file output node sockets.
- * XXX a bit ugly use atm, called from datatype button functions,
- * since all node types and callbacks only use data type without struct_type.
- */
-static void node_socket_button_output_file(const bContext *C, uiBlock *block,
- bNodeTree *ntree, bNode *node, bNodeSocket *sock,
- const char *UNUSED(name), int x, int y, int width)
-{
- uiLayout *layout, *row;
- PointerRNA nodeptr, sockptr, imfptr;
- int imtype;
- int rx, ry;
- RNA_pointer_create(&ntree->id, &RNA_Node, node, &nodeptr);
- RNA_pointer_create(&ntree->id, &RNA_NodeSocket, sock, &sockptr);
-
- layout = uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, x, y+NODE_DY, width, 20, UI_GetStyle());
- row = uiLayoutRow(layout, 0);
-
- uiItemL(row, sock->name, 0);
-
- imfptr = RNA_pointer_get(&nodeptr, "format");
- imtype = RNA_enum_get(&imfptr, "file_format");
- /* in multilayer format all socket format details are ignored */
- if (imtype != R_IMF_IMTYPE_MULTILAYER) {
- PropertyRNA *imtype_prop;
- const char *imtype_name;
-
- if (!RNA_boolean_get(&sockptr, "use_node_format"))
- imfptr = RNA_pointer_get(&sockptr, "format");
-
- imtype_prop = RNA_struct_find_property(&imfptr, "file_format");
- RNA_property_enum_name((bContext*)C, &imfptr, imtype_prop, RNA_property_enum_get(&imfptr, imtype_prop), &imtype_name);
- uiBlockSetEmboss(block, UI_EMBOSSP);
- uiItemL(row, imtype_name, 0);
- uiBlockSetEmboss(block, UI_EMBOSSN);
- }
-
- uiBlockLayoutResolve(block, &rx, &ry);
-}
-
static void node_socket_button_default(const bContext *C, uiBlock *block,
bNodeTree *ntree, bNode *node, bNodeSocket *sock,
const char *name, int x, int y, int width)
{
- switch (sock->struct_type) {
- case SOCK_STRUCT_NONE: {
- if (sock->link || (sock->flag & SOCK_HIDE_VALUE))
- node_socket_button_label(C, block, ntree, node, sock, name, x, y, width);
- else {
- PointerRNA ptr;
- uiBut *bt;
-
- RNA_pointer_create(&ntree->id, &RNA_NodeSocket, sock, &ptr);
-
- bt = uiDefButR(block, NUM, B_NODE_EXEC, name,
- x, y+1, width, NODE_DY-2,
- &ptr, "default_value", 0, 0, 0, -1, -1, NULL);
- if (node)
- uiButSetFunc(bt, node_sync_cb, CTX_wm_space_node(C), node);
- }
- break;
- }
- case SOCK_STRUCT_OUTPUT_FILE:
- node_socket_button_output_file(C, block, ntree, node, sock, name, x, y, width);
- break;
+ if (sock->link || (sock->flag & SOCK_HIDE_VALUE))
+ node_socket_button_label(C, block, ntree, node, sock, name, x, y, width);
+ else {
+ PointerRNA ptr;
+ uiBut *bt;
+
+ RNA_pointer_create(&ntree->id, &RNA_NodeSocket, sock, &ptr);
+
+ bt = uiDefButR(block, NUM, B_NODE_EXEC, name,
+ x, y+1, width, NODE_DY-2,
+ &ptr, "default_value", 0, 0, 0, -1, -1, NULL);
+ if (node)
+ uiButSetFunc(bt, node_sync_cb, CTX_wm_space_node(C), node);
}
}
@@ -192,33 +144,25 @@ static void node_socket_button_components(const bContext *C, uiBlock *block,
bNodeTree *ntree, bNode *node, bNodeSocket *sock,
const char *name, int x, int y, int width)
{
- switch (sock->struct_type) {
- case SOCK_STRUCT_NONE: {
- if (sock->link || (sock->flag & SOCK_HIDE_VALUE))
- node_socket_button_label(C, block, ntree, node, sock, name, x, y, width);
- else {
- PointerRNA ptr;
- SocketComponentMenuArgs *args;
-
- RNA_pointer_create(&ntree->id, &RNA_NodeSocket, sock, &ptr);
-
- args= MEM_callocN(sizeof(SocketComponentMenuArgs), "SocketComponentMenuArgs");
-
- args->ptr = ptr;
- args->x = x;
- args->y = y;
- args->width = width;
- args->cb = node_sync_cb;
- args->arg1 = CTX_wm_space_node(C);
- args->arg2 = node;
-
- uiDefBlockButN(block, socket_component_menu, args, name, x, y+1, width, NODE_DY-2, "");
- }
- break;
- }
- case SOCK_STRUCT_OUTPUT_FILE:
- node_socket_button_output_file(C, block, ntree, node, sock, name, x, y, width);
- break;
+ if (sock->link || (sock->flag & SOCK_HIDE_VALUE))
+ node_socket_button_label(C, block, ntree, node, sock, name, x, y, width);
+ else {
+ PointerRNA ptr;
+ SocketComponentMenuArgs *args;
+
+ RNA_pointer_create(&ntree->id, &RNA_NodeSocket, sock, &ptr);
+
+ args= MEM_callocN(sizeof(SocketComponentMenuArgs), "SocketComponentMenuArgs");
+
+ args->ptr = ptr;
+ args->x = x;
+ args->y = y;
+ args->width = width;
+ args->cb = node_sync_cb;
+ args->arg1 = CTX_wm_space_node(C);
+ args->arg2 = node;
+
+ uiDefBlockButN(block, socket_component_menu, args, name, x, y+1, width, NODE_DY-2, "");
}
}
@@ -226,35 +170,52 @@ static void node_socket_button_color(const bContext *C, uiBlock *block,
bNodeTree *ntree, bNode *node, bNodeSocket *sock,
const char *name, int x, int y, int width)
{
- /* XXX would be nicer to have draw function based on sock->struct_type as well,
- * but currently socket types are completely identified by data type only.
- */
-
- switch (sock->struct_type) {
- case SOCK_STRUCT_NONE: {
- if (sock->link || (sock->flag & SOCK_HIDE_VALUE))
- node_socket_button_label(C, block, ntree, node, sock, name, x, y, width);
- else {
- PointerRNA ptr;
- uiBut *bt;
- int labelw= width - 40;
- RNA_pointer_create(&ntree->id, &RNA_NodeSocket, sock, &ptr);
-
- bt=uiDefButR(block, COL, B_NODE_EXEC, "",
- x, y+2, (labelw>0 ? 40 : width), NODE_DY-2,
- &ptr, "default_value", 0, 0, 0, -1, -1, NULL);
- if (node)
- uiButSetFunc(bt, node_sync_cb, CTX_wm_space_node(C), node);
-
- if (name[0]!='\0' && labelw>0)
- uiDefBut(block, LABEL, 0, name, x + 40, y+2, labelw, NODE_DY-2, NULL, 0, 0, 0, 0, "");
- }
- break;
+ if (sock->link || (sock->flag & SOCK_HIDE_VALUE))
+ node_socket_button_label(C, block, ntree, node, sock, name, x, y, width);
+ else {
+ PointerRNA ptr;
+ uiBut *bt;
+ int labelw= width - 40;
+ RNA_pointer_create(&ntree->id, &RNA_NodeSocket, sock, &ptr);
+
+ bt=uiDefButR(block, COL, B_NODE_EXEC, "",
+ x, y+2, (labelw>0 ? 40 : width), NODE_DY-2,
+ &ptr, "default_value", 0, 0, 0, -1, -1, NULL);
+ if (node)
+ uiButSetFunc(bt, node_sync_cb, CTX_wm_space_node(C), node);
+
+ if (name[0]!='\0' && labelw>0)
+ uiDefBut(block, LABEL, 0, name, x + 40, y+2, labelw, NODE_DY-2, NULL, 0, 0, 0, 0, "");
}
- case SOCK_STRUCT_OUTPUT_FILE:
- node_socket_button_output_file(C, block, ntree, node, sock, name, x, y, width);
- break;
+}
+
+/* standard draw function, display the default input value */
+static void node_draw_input_default(const bContext *C, uiBlock *block,
+ bNodeTree *ntree, bNode *node, bNodeSocket *sock,
+ const char *name, int x, int y, int width)
+{
+ bNodeSocketType *stype = ntreeGetSocketType(sock->type);
+ if (stype->buttonfunc)
+ stype->buttonfunc(C, block, ntree, node, sock, name, x, y, width);
+ else
+ node_socket_button_label(C, block, ntree, node, sock, name, x, y, width);
+}
+
+static void node_draw_output_default(const bContext *C, uiBlock *block,
+ bNodeTree *UNUSED(ntree), bNode *node, bNodeSocket *sock,
+ const char *name, int UNUSED(x), int UNUSED(y), int UNUSED(width))
+{
+ SpaceNode *snode = CTX_wm_space_node(C);
+ float slen;
+ int ofs = 0;
+ UI_ThemeColor(TH_TEXT);
+ slen= snode->aspect*UI_GetStringWidth(name);
+ while (slen > node->width) {
+ ofs++;
+ slen= snode->aspect*UI_GetStringWidth(name+ofs);
}
+ uiDefBut(block, LABEL, 0, name+ofs, (short)(sock->locx-15.0f-slen), (short)(sock->locy-9.0f),
+ (short)(node->width-NODE_DY), NODE_DY, NULL, 0, 0, 0, 0, "");
}
/* ****************** BASE DRAW FUNCTIONS FOR NEW OPERATOR NODES ***************** */
@@ -266,7 +227,7 @@ static void node_draw_socket_new(bNodeSocket *sock, float size)
/* 16 values of sin function */
static float si[16] = {
- 0.00000000f, 0.39435585f,0.72479278f,0.93775213f,
+ 0.00000000f, 0.39435585f, 0.72479278f,0.93775213f,
0.99871650f,0.89780453f,0.65137248f,0.29936312f,
-0.10116832f,-0.48530196f,-0.79077573f,-0.96807711f,
-0.98846832f,-0.84864425f,-0.57126821f,-0.20129852f
@@ -289,12 +250,12 @@ static void node_draw_socket_new(bNodeSocket *sock, float size)
glColor4ub(0, 0, 0, 150);
glEnable(GL_BLEND);
- glEnable( GL_LINE_SMOOTH );
+ glEnable(GL_LINE_SMOOTH);
glBegin(GL_LINE_LOOP);
for (a=0; a<16; a++)
glVertex2f(x+size*si[a], y+size*co[a]);
glEnd();
- glDisable( GL_LINE_SMOOTH );
+ glDisable(GL_LINE_SMOOTH);
glDisable(GL_BLEND);
}
#endif
@@ -442,7 +403,7 @@ static void node_browse_tex_cb(bContext *C, void *ntree_v, void *node_v)
nodeSetActive(ntree, node);
if ( ntree->type == NTREE_TEXTURE )
- ntreeTexCheckCyclics( ntree );
+ ntreeTexCheckCyclics(ntree);
// allqueue(REDRAWBUTSSHADING, 0);
// allqueue(REDRAWNODE, 0);
@@ -870,16 +831,16 @@ static void node_draw_group(const bContext *C, ARegion *ar, SpaceNode *snode, bN
/* group node outline */
uiSetRoundBox(UI_CNR_ALL);
glColor4ub(200, 200, 200, 140);
- glEnable( GL_LINE_SMOOTH );
+ glEnable(GL_LINE_SMOOTH);
uiDrawBox(GL_LINE_LOOP, rect.xmin-node_group_frame, rect.ymin, rect.xmax+node_group_frame, rect.ymax+group_header, BASIS_RAD);
- glDisable( GL_LINE_SMOOTH );
+ glDisable(GL_LINE_SMOOTH);
glDisable(GL_BLEND);
/* backdrop title */
UI_ThemeColor(TH_TEXT_HI);
layout = uiBlockLayout(gnode->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, (short)(rect.xmin+15), (short)(rect.ymax+group_header),
- MIN2((int)(rect.xmax - rect.xmin-18.0f), node_group_frame+20), group_header, UI_GetStyle());
+ MIN2((int)(rect.xmax - rect.xmin-18.0f), node_group_frame+20), group_header, UI_GetStyle());
RNA_pointer_create(&ntree->id, &RNA_Node, gnode, &ptr);
uiTemplateIDBrowse(layout, (bContext*)C, &ptr, "node_tree", NULL, NULL, NULL);
uiBlockLayoutResolve(gnode->block, NULL, NULL);
@@ -963,7 +924,7 @@ static void node_update_frame(const bContext *UNUSED(C), bNodeTree *UNUSED(ntree
static void node_common_set_butfunc(bNodeType *ntype)
{
- switch(ntype->type) {
+ switch (ntype->type) {
case NODE_GROUP:
ntype->uifunc= node_uifunc_group;
ntype->drawfunc= node_draw_group;
@@ -1176,7 +1137,7 @@ static void node_shader_buts_dynamic(uiLayout *layout, bContext *C, PointerRNA *
static void node_shader_set_butfunc(bNodeType *ntype)
{
ntype->uifuncbut = NULL;
- switch(ntype->type) {
+ switch (ntype->type) {
/* case NODE_GROUP: note, typeinfo for group is generated... see "XXX ugly hack" */
case SH_NODE_MATERIAL:
@@ -1286,7 +1247,7 @@ static void node_composit_buts_image(uiLayout *layout, bContext *C, PointerRNA *
Scene *scene= CTX_data_scene(C);
ImageUser *iuser= node->storage;
char numstr[32];
- const int framenr= BKE_image_user_get_frame(iuser, CFRA, 0);
+ const int framenr= BKE_image_user_frame_get(iuser, CFRA, 0);
BLI_snprintf(numstr, sizeof(numstr), "Frame: %d", framenr);
uiItemL(layout, numstr, ICON_NONE);
}
@@ -1635,9 +1596,14 @@ static void node_composit_buts_diff_matte(uiLayout *layout, bContext *UNUSED(C),
static void node_composit_buts_distance_matte(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
- uiLayout *col;
+ uiLayout *col, *row;
col = uiLayoutColumn(layout, 1);
+
+ uiItemL(layout, "Color Space:", ICON_NONE);
+ row= uiLayoutRow(layout, 0);
+ uiItemR(row, ptr, "channel", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
+
uiItemR(col, ptr, "tolerance", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(col, ptr, "falloff", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
}
@@ -1647,7 +1613,7 @@ static void node_composit_buts_color_spill(uiLayout *layout, bContext *UNUSED(C)
uiLayout *row, *col;
uiItemL(layout, "Despill Channel:", ICON_NONE);
- row = uiLayoutRow(layout,0);
+ row = uiLayoutRow(layout, 0);
uiItemR(row, ptr, "channel", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
col= uiLayoutColumn(layout, 0);
@@ -1655,7 +1621,7 @@ static void node_composit_buts_color_spill(uiLayout *layout, bContext *UNUSED(C)
if (RNA_enum_get(ptr, "limit_method")==0) {
uiItemL(col, "Limiting Channel:", ICON_NONE);
- row=uiLayoutRow(col,0);
+ row=uiLayoutRow(col, 0);
uiItemR(row, ptr, "limit_channel", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
}
@@ -1710,7 +1676,7 @@ static void node_composit_buts_channel_matte(uiLayout *layout, bContext *UNUSED(
uiItemR(col, ptr, "limit_method", 0, NULL, ICON_NONE);
if (RNA_enum_get(ptr, "limit_method")==0) {
uiItemL(col, "Limiting Channel:", ICON_NONE);
- row=uiLayoutRow(col,0);
+ row=uiLayoutRow(col, 0);
uiItemR(row, ptr, "limit_channel", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
}
@@ -1738,6 +1704,43 @@ static void node_composit_buts_id_mask(uiLayout *layout, bContext *UNUSED(C), Po
uiItemR(layout, ptr, "use_smooth_mask", 0, NULL, ICON_NONE);
}
+/* draw function for file output node sockets, displays only sub-path and format, no value button */
+static void node_draw_input_file_output(const bContext *C, uiBlock *block,
+ bNodeTree *ntree, bNode *node, bNodeSocket *sock,
+ const char *UNUSED(name), int x, int y, int width)
+{
+ NodeImageMultiFileSocket *input = sock->storage;
+ uiLayout *layout, *row;
+ PointerRNA nodeptr, inputptr, imfptr;
+ int imtype;
+ int rx, ry;
+ RNA_pointer_create(&ntree->id, &RNA_Node, node, &nodeptr);
+ RNA_pointer_create(&ntree->id, &RNA_NodeImageFileSocket, input, &inputptr);
+
+ layout = uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, x, y+NODE_DY, width, 20, UI_GetStyle());
+ row = uiLayoutRow(layout, 0);
+
+ uiItemL(row, input->path, 0);
+
+ imfptr = RNA_pointer_get(&nodeptr, "format");
+ imtype = RNA_enum_get(&imfptr, "file_format");
+ /* in multilayer format all socket format details are ignored */
+ if (imtype != R_IMF_IMTYPE_MULTILAYER) {
+ PropertyRNA *imtype_prop;
+ const char *imtype_name;
+
+ if (!RNA_boolean_get(&inputptr, "use_node_format"))
+ imfptr = RNA_pointer_get(&inputptr, "format");
+
+ imtype_prop = RNA_struct_find_property(&imfptr, "file_format");
+ RNA_property_enum_name((bContext*)C, &imfptr, imtype_prop, RNA_property_enum_get(&imfptr, imtype_prop), &imtype_name);
+ uiBlockSetEmboss(block, UI_EMBOSSP);
+ uiItemL(row, imtype_name, 0);
+ uiBlockSetEmboss(block, UI_EMBOSSN);
+ }
+
+ uiBlockLayoutResolve(block, &rx, &ry);
+}
static void node_composit_buts_file_output(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
PointerRNA imfptr = RNA_pointer_get(ptr, "format");
@@ -1752,7 +1755,9 @@ static void node_composit_buts_file_output(uiLayout *layout, bContext *UNUSED(C)
static void node_composit_buts_file_output_details(uiLayout *layout, bContext *C, PointerRNA *ptr)
{
PointerRNA imfptr = RNA_pointer_get(ptr, "format");
- PointerRNA active_input_ptr = RNA_pointer_get(ptr, "active_input");
+ PointerRNA active_input_ptr, op_ptr;
+ uiLayout *row;
+ int active_index;
int multilayer = (RNA_enum_get(&imfptr, "file_format") == R_IMF_IMTYPE_MULTILAYER);
node_composit_buts_file_output(layout, C, ptr);
@@ -1762,7 +1767,16 @@ static void node_composit_buts_file_output_details(uiLayout *layout, bContext *C
uiItemO(layout, "Add Input", ICON_ZOOMIN, "NODE_OT_output_file_add_socket");
- uiTemplateList(layout, C, ptr, "inputs", ptr, "active_input_index", NULL, 0, 0, 0);
+ uiTemplateList(layout, C, ptr, "file_inputs", ptr, "active_input_index", NULL, 0, 0, 0);
+
+ active_index = RNA_int_get(ptr, "active_input_index");
+ RNA_property_collection_lookup_int(ptr, RNA_struct_find_property(ptr, "file_inputs"), active_index, &active_input_ptr);
+
+ row = uiLayoutRow(layout, 1);
+ op_ptr = uiItemFullO(row, "NODE_OT_output_file_move_active_socket", "", ICON_TRIA_UP, NULL, WM_OP_INVOKE_DEFAULT, UI_ITEM_O_RETURN_PROPS);
+ RNA_enum_set(&op_ptr, "direction", 1);
+ op_ptr = uiItemFullO(row, "NODE_OT_output_file_move_active_socket", "", ICON_TRIA_DOWN, NULL, WM_OP_INVOKE_DEFAULT, UI_ITEM_O_RETURN_PROPS);
+ RNA_enum_set(&op_ptr, "direction", 2);
if (active_input_ptr.data) {
uiLayout *row, *col;
@@ -1773,7 +1787,7 @@ static void node_composit_buts_file_output_details(uiLayout *layout, bContext *C
else
uiItemL(col, "File Path:", 0);
row = uiLayoutRow(col, 0);
- uiItemR(row, &active_input_ptr, "name", 0, "", 0);
+ uiItemR(row, &active_input_ptr, "path", 0, "", 0);
uiItemFullO(row, "NODE_OT_output_file_remove_active_socket", "", ICON_X, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_R_ICON_ONLY);
/* in multilayer format all socket format details are ignored */
@@ -1941,7 +1955,7 @@ static void node_composit_buts_moviedistortion(uiLayout *layout, bContext *C, Po
static void node_composit_set_butfunc(bNodeType *ntype)
{
ntype->uifuncbut = NULL;
- switch(ntype->type) {
+ switch (ntype->type) {
/* case NODE_GROUP: note, typeinfo for group is generated... see "XXX ugly hack" */
case CMP_NODE_IMAGE:
@@ -2028,6 +2042,7 @@ static void node_composit_set_butfunc(bNodeType *ntype)
case CMP_NODE_OUTPUT_FILE:
ntype->uifunc= node_composit_buts_file_output;
ntype->uifuncbut= node_composit_buts_file_output_details;
+ ntype->drawinputfunc = node_draw_input_file_output;
break;
case CMP_NODE_DIFF_MATTE:
ntype->uifunc=node_composit_buts_diff_matte;
@@ -2137,7 +2152,7 @@ static void node_texture_buts_proc(uiLayout *layout, bContext *UNUSED(C), Pointe
col= uiLayoutColumn(layout, 0);
- switch( tex->type ) {
+ switch ( tex->type ) {
case TEX_BLEND:
uiItemR(col, &tex_ptr, "progression", 0, "", ICON_NONE);
row= uiLayoutRow(col, 0);
@@ -2222,45 +2237,50 @@ static void node_texture_set_butfunc(bNodeType *ntype)
if ( ntype->type >= TEX_NODE_PROC && ntype->type < TEX_NODE_PROC_MAX ) {
ntype->uifunc = node_texture_buts_proc;
}
- else switch(ntype->type) {
-
+ else {
+ switch (ntype->type) {
+
case TEX_NODE_MATH:
ntype->uifunc = node_buts_math;
break;
-
+
case TEX_NODE_MIX_RGB:
ntype->uifunc = node_buts_mix_rgb;
break;
-
+
case TEX_NODE_VALTORGB:
ntype->uifunc = node_buts_colorramp;
break;
-
+
case TEX_NODE_CURVE_RGB:
ntype->uifunc= node_buts_curvecol;
break;
-
+
case TEX_NODE_CURVE_TIME:
ntype->uifunc = node_buts_time;
break;
-
+
case TEX_NODE_TEXTURE:
ntype->uifunc = node_buts_texture;
break;
-
+
case TEX_NODE_BRICKS:
ntype->uifunc = node_texture_buts_bricks;
break;
-
+
case TEX_NODE_IMAGE:
ntype->uifunc = node_texture_buts_image;
break;
-
+
case TEX_NODE_OUTPUT:
ntype->uifunc = node_texture_buts_output;
break;
+ }
+ }
+
+ if (ntype->uifuncbut == NULL) {
+ ntype->uifuncbut = ntype->uifunc;
}
- if (ntype->uifuncbut == NULL) ntype->uifuncbut = ntype->uifunc;
}
/* ******* init draw callbacks for all tree types, only called in usiblender.c, once ************* */
@@ -2282,6 +2302,8 @@ void ED_init_node_butfuncs(void)
ntype->drawupdatefunc = node_update_default;
ntype->uifunc = NULL;
ntype->uifuncbut = NULL;
+ ntype->drawinputfunc = node_draw_input_default;
+ ntype->drawoutputfunc = node_draw_output_default;
ntype->resize_area_func = node_resize_area_default;
node_common_set_butfunc(ntype);
@@ -2305,7 +2327,7 @@ void ED_init_node_butfuncs(void)
for (i=0; i < NUM_SOCKET_TYPES; ++i) {
stype = ntreeGetSocketType(i);
if (stype) {
- switch(stype->type) {
+ switch (stype->type) {
case SOCK_FLOAT:
case SOCK_INT:
case SOCK_BOOLEAN:
@@ -2494,8 +2516,8 @@ int node_link_bezier_points(View2D *v2d, SpaceNode *snode, bNodeLink *link, floa
else {
/* always do all three, to prevent data hanging around */
- forward_diff_bezier(vec[0][0], vec[1][0], vec[2][0], vec[3][0], coord_array[0], resol, sizeof(float)*2);
- forward_diff_bezier(vec[0][1], vec[1][1], vec[2][1], vec[3][1], coord_array[0]+1, resol, sizeof(float)*2);
+ BKE_curve_forward_diff_bezier(vec[0][0], vec[1][0], vec[2][0], vec[3][0], coord_array[0], resol, sizeof(float)*2);
+ BKE_curve_forward_diff_bezier(vec[0][1], vec[1][1], vec[2][1], vec[3][1], coord_array[0]+1, resol, sizeof(float)*2);
return 1;
}
diff --git a/source/blender/editors/space_node/node_buttons.c b/source/blender/editors/space_node/node_buttons.c
index f7d517915da..c92abf116c4 100644
--- a/source/blender/editors/space_node/node_buttons.c
+++ b/source/blender/editors/space_node/node_buttons.c
@@ -89,7 +89,7 @@ static void active_node_panel(const bContext *C, Panel *pa)
SpaceNode *snode= CTX_wm_space_node(C);
bNodeTree *ntree= (snode) ? snode->edittree : NULL;
bNode *node = (ntree) ? nodeGetActive(ntree) : NULL; // xxx... for editing group nodes
- uiLayout *layout= pa->layout;
+ uiLayout *layout;
PointerRNA ptr;
/* verify pointers, and create RNA pointer for the node */
@@ -100,6 +100,10 @@ static void active_node_panel(const bContext *C, Panel *pa)
//else
RNA_pointer_create(&ntree->id, &RNA_Node, node, &ptr);
+ /* XXX nicer way to make sub-layout? */
+ layout = uiLayoutColumn(pa->layout, 0);
+ uiLayoutSetContextPointer(layout, "node", &ptr);
+
/* draw this node's name, etc. */
uiItemR(layout, &ptr, "label", 0, NULL, ICON_NODE);
uiItemS(layout);
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index 040f921b6ac..3a920e16f8a 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -303,6 +303,7 @@ static void node_update_basis(const bContext *C, bNodeTree *ntree, bNode *node)
layout= uiBlockLayout(node->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL,
locx+NODE_DYS, dy, node->butr.xmax, NODE_DY, UI_GetStyle());
+ uiLayoutSetContextPointer(layout, "node", &ptr);
node->typeinfo->uifunc(layout, (bContext *)C, &ptr);
@@ -459,17 +460,17 @@ static void node_circle_draw(float x, float y, float size, char *col, int highli
{
/* 16 values of sin function */
static float si[16] = {
- 0.00000000f, 0.39435585f,0.72479278f,0.93775213f,
- 0.99871650f,0.89780453f,0.65137248f,0.29936312f,
- -0.10116832f,-0.48530196f,-0.79077573f,-0.96807711f,
- -0.98846832f,-0.84864425f,-0.57126821f,-0.20129852f
+ 0.00000000f, 0.39435585f, 0.72479278f, 0.93775213f,
+ 0.99871650f, 0.89780453f, 0.65137248f, 0.29936312f,
+ -0.10116832f, -0.48530196f, -0.79077573f, -0.96807711f,
+ -0.98846832f, -0.84864425f, -0.57126821f, -0.20129852f
};
/* 16 values of cos function */
static float co[16] ={
- 1.00000000f,0.91895781f,0.68896691f,0.34730525f,
- -0.05064916f,-0.44039415f,-0.75875812f,-0.95413925f,
- -0.99486932f,-0.87434661f,-0.61210598f,-0.25065253f,
- 0.15142777f,0.52896401f,0.82076344f,0.97952994f,
+ 1.00000000f, 0.91895781f, 0.68896691f, 0.34730525f,
+ -0.05064916f, -0.44039415f, -0.75875812f, -0.95413925f,
+ -0.99486932f, -0.87434661f, -0.61210598f, -0.25065253f,
+ 0.15142777f, 0.52896401f, 0.82076344f, 0.97952994f,
};
int a;
@@ -488,12 +489,12 @@ static void node_circle_draw(float x, float y, float size, char *col, int highli
glColor4ub(0, 0, 0, 150);
}
glEnable(GL_BLEND);
- glEnable( GL_LINE_SMOOTH );
+ glEnable(GL_LINE_SMOOTH);
glBegin(GL_LINE_LOOP);
for (a=0; a<16; a++)
glVertex2f(x+size*si[a], y+size*co[a]);
glEnd();
- glDisable( GL_LINE_SMOOTH );
+ glDisable(GL_LINE_SMOOTH);
glDisable(GL_BLEND);
glLineWidth(1.0f);
}
@@ -547,7 +548,7 @@ static void node_draw_preview(bNodePreview *preview, rctf *prv)
glPixelZoom(xscale, yscale);
glEnable(GL_BLEND);
- glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); /* premul graphics */
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); /* premul graphics */
glColor4f(1.0, 1.0, 1.0, 1.0);
glaDrawPixelsTex(prv->xmin, prv->ymin, preview->xsize, preview->ysize, GL_UNSIGNED_BYTE, preview->rect);
@@ -691,7 +692,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
/* outline active and selected emphasis */
if ( node->flag & (NODE_ACTIVE|SELECT) ) {
glEnable(GL_BLEND);
- glEnable( GL_LINE_SMOOTH );
+ glEnable(GL_LINE_SMOOTH);
/* using different shades of TH_TEXT_HI for the empasis, like triangle */
if ( node->flag & NODE_ACTIVE )
UI_ThemeColorShadeAlpha(TH_TEXT_HI, 0, -40);
@@ -700,7 +701,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
uiSetRoundBox(UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT | UI_CNR_BOTTOM_LEFT); // round all corners except lower right
uiDrawBox(GL_LINE_LOOP, rct->xmin, rct->ymin, rct->xmax, rct->ymax, BASIS_RAD);
- glDisable( GL_LINE_SMOOTH );
+ glDisable(GL_LINE_SMOOTH);
glDisable(GL_BLEND);
}
@@ -711,41 +712,24 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
/* socket inputs, buttons */
for (sock= node->inputs.first; sock; sock= sock->next) {
- bNodeSocketType *stype= ntreeGetSocketType(sock->type);
-
if (nodeSocketIsHidden(sock))
continue;
node_socket_circle_draw(ntree, sock, NODE_SOCKSIZE);
- if (stype->buttonfunc)
- stype->buttonfunc(C, node->block, ntree, node, sock, IFACE_(sock->name), sock->locx+NODE_DYS, sock->locy-NODE_DYS, node->width-NODE_DY);
+ node->typeinfo->drawinputfunc(C, node->block, ntree, node, sock, IFACE_(sock->name),
+ sock->locx+NODE_DYS, sock->locy-NODE_DYS, node->width-NODE_DY);
}
/* socket outputs */
for (sock= node->outputs.first; sock; sock= sock->next) {
- PointerRNA sockptr;
-
- RNA_pointer_create((ID*)ntree, &RNA_NodeSocket, sock, &sockptr);
-
if (nodeSocketIsHidden(sock))
continue;
node_socket_circle_draw(ntree, sock, NODE_SOCKSIZE);
- {
- const char *name = IFACE_(sock->name);
- float slen;
- int ofs = 0;
- UI_ThemeColor(TH_TEXT);
- slen= snode->aspect*UI_GetStringWidth(name);
- while (slen > node->width) {
- ofs++;
- slen= snode->aspect*UI_GetStringWidth(name+ofs);
- }
- uiDefBut(node->block, LABEL, 0, name+ofs, (short)(sock->locx-15.0f-slen), (short)(sock->locy-9.0f),
- (short)(node->width-NODE_DY), NODE_DY, NULL, 0, 0, 0, 0, "");
- }
+ node->typeinfo->drawoutputfunc(C, node->block, ntree, node, sock, IFACE_(sock->name),
+ sock->locx-node->width+NODE_DYS, sock->locy-NODE_DYS, node->width-NODE_DY);
}
/* preview */
@@ -786,14 +770,14 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b
/* outline active and selected emphasis */
if ( node->flag & (NODE_ACTIVE|SELECT) ) {
glEnable(GL_BLEND);
- glEnable( GL_LINE_SMOOTH );
+ glEnable(GL_LINE_SMOOTH);
/* using different shades of TH_TEXT_HI for the empasis, like triangle */
if ( node->flag & NODE_ACTIVE )
UI_ThemeColorShadeAlpha(TH_TEXT_HI, 0, -40);
else
UI_ThemeColorShadeAlpha(TH_TEXT_HI, -20, -120);
uiDrawBox(GL_LINE_LOOP, rct->xmin, rct->ymin, rct->xmax, rct->ymax, hiddenrad);
- glDisable( GL_LINE_SMOOTH );
+ glDisable(GL_LINE_SMOOTH);
glDisable(GL_BLEND);
}
@@ -939,7 +923,7 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d)
//uiFreeBlocksWin(&sa->uiblocks, sa->win);
/* only set once */
- glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_MAP1_VERTEX_3);
/* aspect+font, set each time */
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index dda06267237..9e59b3372cb 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -243,8 +243,37 @@ static bNode *editnode_get_active(bNodeTree *ntree)
return nodeGetActive(ntree);
}
-void snode_dag_update(bContext *UNUSED(C), SpaceNode *snode)
+static int has_nodetree(bNodeTree *ntree, bNodeTree *lookup)
+{
+ bNode *node;
+
+ if (ntree == lookup)
+ return 1;
+
+ for (node=ntree->nodes.first; node; node=node->next)
+ if (node->type == NODE_GROUP && node->id)
+ if (has_nodetree((bNodeTree*)node->id, lookup))
+ return 1;
+
+ return 0;
+}
+
+static void snode_dag_update_group(void *calldata, ID *owner_id, bNodeTree *ntree)
{
+ if (has_nodetree(ntree, calldata))
+ DAG_id_tag_update(owner_id, 0);
+}
+
+void snode_dag_update(bContext *C, SpaceNode *snode)
+{
+ Main *bmain = CTX_data_main(C);
+
+ /* for groups, update all ID's using this */
+ if (snode->edittree!=snode->nodetree) {
+ bNodeTreeType *tti= ntreeGetType(snode->edittree->type);
+ tti->foreach_nodetree(bmain, snode->edittree, snode_dag_update_group);
+ }
+
DAG_id_tag_update(snode->id, 0);
}
@@ -284,12 +313,12 @@ void ED_node_shader_default(Scene *scene, ID *id)
ntree= ntreeAddTree("Shader Nodetree", NTREE_SHADER, 0);
- switch(GS(id->name)) {
+ switch (GS(id->name)) {
case ID_MA: {
Material *ma= (Material*)id;
ma->nodetree = ntree;
- if (scene_use_new_shading_nodes(scene)) {
+ if (BKE_scene_use_new_shading_nodes(scene)) {
output_type = SH_NODE_OUTPUT_MATERIAL;
shader_type = SH_NODE_BSDF_DIFFUSE;
}
@@ -347,7 +376,7 @@ void ED_node_shader_default(Scene *scene, ID *id)
nodeAddLink(ntree, in, fromsock, out, tosock);
/* default values */
- if (scene_use_new_shading_nodes(scene)) {
+ if (BKE_scene_use_new_shading_nodes(scene)) {
sock= in->inputs.first;
copy_v3_v3(((bNodeSocketValueRGBA*)sock->default_value)->value, color);
@@ -585,21 +614,6 @@ static void snode_update(SpaceNode *snode, bNode *node)
nodeUpdateID(snode->nodetree, gnode->id);
}
-static int has_nodetree(bNodeTree *ntree, bNodeTree *lookup)
-{
- bNode *node;
-
- if (ntree == lookup)
- return 1;
-
- for (node=ntree->nodes.first; node; node=node->next)
- if (node->type == NODE_GROUP && node->id)
- if (has_nodetree((bNodeTree*)node->id, lookup))
- return 1;
-
- return 0;
-}
-
void ED_node_set_active(Main *bmain, bNodeTree *ntree, bNode *node)
{
int was_active_texture = (node->flag & NODE_ACTIVE_TEXTURE);
@@ -1316,6 +1330,7 @@ void NODE_OT_backimage_zoom(wmOperatorType *ot)
/* identifiers */
ot->name = "Background Image Zoom";
ot->idname = "NODE_OT_backimage_zoom";
+ ot->description = "Zoom in/out the brackground image";
/* api callbacks */
ot->exec = backimage_zoom;
@@ -1458,7 +1473,7 @@ static int sample_invoke(bContext *C, wmOperator *op, wmEvent *event)
static int sample_modal(bContext *C, wmOperator *op, wmEvent *event)
{
- switch(event->type) {
+ switch (event->type) {
case LEFTMOUSE:
case RIGHTMOUSE: // XXX hardcoded
sample_exit(C, op);
@@ -1482,6 +1497,7 @@ void NODE_OT_backimage_sample(wmOperatorType *ot)
/* identifiers */
ot->name = "Backimage Sample";
ot->idname = "NODE_OT_backimage_sample";
+ ot->description = "Use mouse to sample background image";
/* api callbacks */
ot->invoke = sample_invoke;
@@ -1593,6 +1609,7 @@ void NODE_OT_resize(wmOperatorType *ot)
/* identifiers */
ot->name = "Resize Node";
ot->idname = "NODE_OT_resize";
+ ot->description = "Resize a node";
/* api callbacks */
ot->invoke = node_resize_invoke;
@@ -2324,9 +2341,6 @@ static int node_link_modal(bContext *C, wmOperator *op, wmEvent *event)
case MOUSEMOVE:
if (in_out==SOCK_OUT) {
- /* only target socket becomes hilighted */
- node_deselect_all_input_sockets(snode, 0);
-
if (node_find_indicated_socket(snode, &tnode, &tsock, SOCK_IN)) {
if (nodeFindLink(snode->edittree, sock, tsock)==NULL) {
if ( link->tosock!= tsock && (!tnode || (tnode!=node && link->tonode!=tnode)) ) {
@@ -2340,9 +2354,6 @@ static int node_link_modal(bContext *C, wmOperator *op, wmEvent *event)
ntreeUpdateTree(snode->edittree);
}
}
-
- /* hilight target socket */
- node_socket_select(tnode, tsock);
}
else {
if (link->tonode || link->tosock) {
@@ -2357,9 +2368,6 @@ static int node_link_modal(bContext *C, wmOperator *op, wmEvent *event)
}
}
else {
- /* only target socket becomes hilighted */
- node_deselect_all_output_sockets(snode, 0);
-
if (node_find_indicated_socket(snode, &tnode, &tsock, SOCK_OUT)) {
if (nodeFindLink(snode->edittree, sock, tsock)==NULL) {
if (nodeCountSocketLinks(snode->edittree, tsock) < tsock->limit) {
@@ -2375,9 +2383,6 @@ static int node_link_modal(bContext *C, wmOperator *op, wmEvent *event)
}
}
}
-
- /* hilight target socket */
- node_socket_select(tnode, tsock);
}
else {
if (link->tonode || link->tosock) {
@@ -2405,14 +2410,11 @@ static int node_link_modal(bContext *C, wmOperator *op, wmEvent *event)
if (in_out==SOCK_OUT)
node_remove_extra_links(snode, link->tosock, link);
- /* deselect sockets after successful linking */
- node_deselect_all_input_sockets(snode, 0);
- node_deselect_all_output_sockets(snode, 0);
-
/* when linking to group outputs, update the socket type */
/* XXX this should all be part of a generic update system */
if (!link->tonode) {
- link->tosock->type = link->fromsock->type;
+ if(link->tosock->type != link->fromsock->type)
+ nodeSocketSetType(link->tosock, link->fromsock->type);
}
}
else if (outside_group_rect(snode) && (link->tonode || link->fromnode)) {
@@ -2433,10 +2435,6 @@ static int node_link_modal(bContext *C, wmOperator *op, wmEvent *event)
}
snode->edittree->update |= NTREE_UPDATE_GROUP_OUT | NTREE_UPDATE_LINKS;
}
-
- /* deselect sockets after successful linking */
- node_deselect_all_input_sockets(snode, 0);
- node_deselect_all_output_sockets(snode, 0);
}
else
nodeRemLink(snode->edittree, link);
@@ -2477,10 +2475,6 @@ static int node_link_init(SpaceNode *snode, bNodeLinkDrag *nldrag)
in_out = SOCK_IN;
}
}
-
- /* hilight source socket only */
- node_deselect_all_output_sockets(snode, 0);
- node_socket_select(nldrag->node, nldrag->sock);
}
/* or an input? */
else if (node_find_indicated_socket(snode, &nldrag->node, &nldrag->sock, SOCK_IN)) {
@@ -2503,10 +2497,6 @@ static int node_link_init(SpaceNode *snode, bNodeLinkDrag *nldrag)
in_out = SOCK_OUT;
}
}
-
- /* hilight source socket only */
- node_deselect_all_input_sockets(snode, 0);
- node_socket_select(nldrag->node, nldrag->sock);
}
return in_out;
@@ -2574,6 +2564,7 @@ void NODE_OT_link(wmOperatorType *ot)
/* identifiers */
ot->name = "Link Nodes";
ot->idname = "NODE_OT_link";
+ ot->description = "Use the mouse to create a link between two nodes";
/* api callbacks */
ot->invoke = node_link_invoke;
@@ -2651,7 +2642,8 @@ static int cut_links_exec(bContext *C, wmOperator *op)
float mcoords[256][2];
int i= 0;
- RNA_BEGIN(op->ptr, itemptr, "path") {
+ RNA_BEGIN (op->ptr, itemptr, "path")
+ {
float loc[2];
RNA_float_get_array(&itemptr, "loc", loc);
@@ -2692,6 +2684,7 @@ void NODE_OT_links_cut(wmOperatorType *ot)
ot->name = "Cut links";
ot->idname = "NODE_OT_links_cut";
+ ot->description = "Use the mouse to cut (remove) some links";
ot->invoke = WM_gesture_lines_invoke;
ot->modal = WM_gesture_lines_modal;
@@ -2737,6 +2730,7 @@ void NODE_OT_links_detach(wmOperatorType *ot)
{
ot->name = "Detach Links";
ot->idname = "NODE_OT_links_detach";
+ ot->description = "Remove all links to selected nodes, and try to connect neighbor nodes together";
ot->exec = detach_links_exec;
ot->poll = ED_operator_node_active;
@@ -2931,6 +2925,7 @@ void NODE_OT_read_renderlayers(wmOperatorType *ot)
ot->name = "Read Render Layers";
ot->idname = "NODE_OT_read_renderlayers";
+ ot->description = "Read all render layers of all used scenes";
ot->exec = node_read_renderlayers_exec;
@@ -2964,6 +2959,7 @@ void NODE_OT_read_fullsamplelayers(wmOperatorType *ot)
ot->name = "Read Full Sample Layers";
ot->idname = "NODE_OT_read_fullsamplelayers";
+ ot->description = "Read all render layers of current scene, in full sample";
ot->exec = node_read_fullsamplelayers_exec;
@@ -3012,6 +3008,7 @@ void NODE_OT_render_changed(wmOperatorType *ot)
ot->name = "Render Changed Layer";
ot->idname = "NODE_OT_render_changed";
+ ot->description = "Render current scene, when input node's layer has been changed";
ot->exec = node_render_changed_exec;
@@ -3434,7 +3431,7 @@ static int node_add_file_exec(bContext *C, wmOperator *op)
errno= 0;
- ima= BKE_add_image_file(path);
+ ima= BKE_image_load_exists(path);
if (!ima) {
BKE_reportf(op->reports, RPT_ERROR, "Can't read: \"%s\", %s", path, errno ? strerror(errno) : "Unsupported image format");
@@ -3444,7 +3441,7 @@ static int node_add_file_exec(bContext *C, wmOperator *op)
else if (RNA_struct_property_is_set(op->ptr, "name")) {
char name[MAX_ID_NAME-2];
RNA_string_get(op->ptr, "name", name);
- ima= (Image *)find_id("IM", name);
+ ima= (Image *)BKE_libblock_find_name(ID_IM, name);
if (!ima) {
BKE_reportf(op->reports, RPT_ERROR, "Image named \"%s\", not found", name);
@@ -3570,8 +3567,9 @@ static int new_node_tree_exec(bContext *C, wmOperator *op)
void NODE_OT_new_node_tree(wmOperatorType *ot)
{
/* identifiers */
- ot->name = "New node tree";
+ ot->name = "New Node Tree";
ot->idname = "NODE_OT_new_node_tree";
+ ot->description = "Create a new node tree";
/* api callbacks */
ot->exec = new_node_tree_exec;
@@ -3590,12 +3588,16 @@ static int node_output_file_add_socket_exec(bContext *C, wmOperator *op)
{
Scene *scene= CTX_data_scene(C);
SpaceNode *snode= CTX_wm_space_node(C);
- bNodeTree *ntree = snode->edittree;
- bNode *node = nodeGetActive(ntree);
+ PointerRNA ptr;
+ bNodeTree *ntree;
+ bNode *node;
char file_path[MAX_NAME];
- if (!node)
+ ptr = CTX_data_pointer_get(C, "node");
+ if (!ptr.data)
return OPERATOR_CANCELLED;
+ node = ptr.data;
+ ntree = ptr.id.data;
RNA_string_get(op->ptr, "file_path", file_path);
ntreeCompositOutputFileAddSocket(ntree, node, file_path, &scene->r.im_format);
@@ -3627,11 +3629,14 @@ void NODE_OT_output_file_add_socket(wmOperatorType *ot)
static int node_output_file_remove_active_socket_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceNode *snode= CTX_wm_space_node(C);
- bNodeTree *ntree = snode->edittree;
- bNode *node = nodeGetActive(ntree);
+ PointerRNA ptr = CTX_data_pointer_get(C, "node");
+ bNodeTree *ntree;
+ bNode *node;
- if (!node)
+ if (!ptr.data)
return OPERATOR_CANCELLED;
+ node = ptr.data;
+ ntree = ptr.id.data;
if (!ntreeCompositOutputFileRemoveActiveSocket(ntree, node))
return OPERATOR_CANCELLED;
@@ -3655,3 +3660,69 @@ void NODE_OT_output_file_remove_active_socket(wmOperatorType *ot)
/* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
+
+/* ****************** Multi File Output Move Socket ******************* */
+
+static int node_output_file_move_active_socket_exec(bContext *C, wmOperator *op)
+{
+ SpaceNode *snode= CTX_wm_space_node(C);
+ PointerRNA ptr = CTX_data_pointer_get(C, "node");
+ bNode *node;
+ NodeImageMultiFile *nimf;
+ bNodeSocket *sock;
+ int direction;
+
+ if (!ptr.data)
+ return OPERATOR_CANCELLED;
+ node = ptr.data;
+ nimf = node->storage;
+
+ sock = BLI_findlink(&node->inputs, nimf->active_input);
+ if (!sock)
+ return OPERATOR_CANCELLED;
+
+ direction = RNA_enum_get(op->ptr, "direction");
+
+ if (direction==1) {
+ bNodeSocket *before = sock->prev;
+ if (!before)
+ return OPERATOR_CANCELLED;
+ BLI_remlink(&node->inputs, sock);
+ BLI_insertlinkbefore(&node->inputs, before, sock);
+ --nimf->active_input;
+ }
+ else {
+ bNodeSocket *after = sock->next;
+ if (!after)
+ return OPERATOR_CANCELLED;
+ BLI_remlink(&node->inputs, sock);
+ BLI_insertlinkafter(&node->inputs, after, sock);
+ ++nimf->active_input;
+ }
+
+ snode_notify(C, snode);
+
+ return OPERATOR_FINISHED;
+}
+
+void NODE_OT_output_file_move_active_socket(wmOperatorType *ot)
+{
+ static EnumPropertyItem direction_items[] = {
+ {1, "UP", 0, "Up", ""},
+ {2, "DOWN", 0, "Down", ""},
+ { 0, NULL, 0, NULL, NULL }};
+
+ /* identifiers */
+ ot->name = "Move File Node Socket";
+ ot->description = "Move the active input of a file output node up or down the list";
+ ot->idname = "NODE_OT_output_file_move_active_socket";
+
+ /* callbacks */
+ ot->exec = node_output_file_move_active_socket_exec;
+ ot->poll = composite_node_active;
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ RNA_def_enum(ot->srna, "direction", direction_items, 2, "Direction", "");
+}
diff --git a/source/blender/editors/space_node/node_header.c b/source/blender/editors/space_node/node_header.c
index 7ddc4bdf857..bb52c1570aa 100644
--- a/source/blender/editors/space_node/node_header.c
+++ b/source/blender/editors/space_node/node_header.c
@@ -201,7 +201,7 @@ static void node_add_menu(bContext *C, uiLayout *layout, void *arg_nodeclass)
}
if (ntree->type == NTREE_SHADER) {
- if (scene_use_new_shading_nodes(scene))
+ if (BKE_scene_use_new_shading_nodes(scene))
compatibility= NODE_NEW_SHADING;
else
compatibility= NODE_OLD_SHADING;
diff --git a/source/blender/editors/space_node/node_intern.h b/source/blender/editors/space_node/node_intern.h
index aa80f729343..17078443987 100644
--- a/source/blender/editors/space_node/node_intern.h
+++ b/source/blender/editors/space_node/node_intern.h
@@ -166,6 +166,7 @@ void NODE_OT_new_node_tree(struct wmOperatorType *ot);
void NODE_OT_output_file_add_socket(struct wmOperatorType *ot);
void NODE_OT_output_file_remove_active_socket(struct wmOperatorType *ot);
+void NODE_OT_output_file_move_active_socket(struct wmOperatorType *ot);
extern const char *node_context_dir[];
diff --git a/source/blender/editors/space_node/node_ops.c b/source/blender/editors/space_node/node_ops.c
index e1493b5b1a5..7d9d7d736f6 100644
--- a/source/blender/editors/space_node/node_ops.c
+++ b/source/blender/editors/space_node/node_ops.c
@@ -103,6 +103,7 @@ void node_operatortypes(void)
WM_operatortype_append(NODE_OT_output_file_add_socket);
WM_operatortype_append(NODE_OT_output_file_remove_active_socket);
+ WM_operatortype_append(NODE_OT_output_file_move_active_socket);
}
void ED_operatormacros_node(void)
@@ -110,25 +111,31 @@ void ED_operatormacros_node(void)
wmOperatorType *ot;
wmOperatorTypeMacro *mot;
- ot = WM_operatortype_append_macro("NODE_OT_duplicate_move", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
- ot->description = "Duplicate selected nodes and move them";
+ ot = WM_operatortype_append_macro("NODE_OT_duplicate_move", "Duplicate", "Duplicate selected nodes and move them",
+ OPTYPE_UNDO|OPTYPE_REGISTER);
WM_operatortype_macro_define(ot, "NODE_OT_duplicate");
WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
/* modified operator call for duplicating with input links */
- ot = WM_operatortype_append_macro("NODE_OT_duplicate_move_keep_inputs", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
- ot->description = "Duplicate selected nodes keeping input links and move them";
+ ot = WM_operatortype_append_macro("NODE_OT_duplicate_move_keep_inputs", "Duplicate",
+ "Duplicate selected nodes keeping input links and move them",
+ OPTYPE_UNDO|OPTYPE_REGISTER);
mot = WM_operatortype_macro_define(ot, "NODE_OT_duplicate");
RNA_boolean_set(mot->ptr, "keep_inputs", TRUE);
WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
- ot = WM_operatortype_append_macro("NODE_OT_select_link_viewer", "Link Viewer", OPTYPE_UNDO);
- ot->description = "Select node and link it to a viewer node";
+ ot = WM_operatortype_append_macro("NODE_OT_select_link_viewer", "Link Viewer",
+ "Select node and link it to a viewer node", OPTYPE_UNDO);
WM_operatortype_macro_define(ot, "NODE_OT_select");
WM_operatortype_macro_define(ot, "NODE_OT_link_viewer");
- ot = WM_operatortype_append_macro("NODE_OT_move_detach_links", "Detach", OPTYPE_UNDO|OPTYPE_REGISTER);
- ot->description = "Move a node to detach links";
+ ot = WM_operatortype_append_macro("NODE_OT_move_detach_links", "Detach", "Move a node to detach links",
+ OPTYPE_UNDO|OPTYPE_REGISTER);
+ WM_operatortype_macro_define(ot, "NODE_OT_links_detach");
+ WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
+
+ ot = WM_operatortype_append_macro("NODE_OT_move_detach_links_release", "Detach", "Move a node to detach links",
+ OPTYPE_UNDO|OPTYPE_REGISTER);
WM_operatortype_macro_define(ot, "NODE_OT_links_detach");
mot = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_boolean_set(mot->ptr, "release_confirm", TRUE);
diff --git a/source/blender/editors/space_node/node_select.c b/source/blender/editors/space_node/node_select.c
index 4df60e6eede..a540f18b3a5 100644
--- a/source/blender/editors/space_node/node_select.c
+++ b/source/blender/editors/space_node/node_select.c
@@ -517,7 +517,7 @@ static int node_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
RNA_int_set(op->ptr, "mouse_x", event->mval[0]);
RNA_int_set(op->ptr, "mouse_y", event->mval[1]);
- return node_select_exec(C,op);
+ return node_select_exec(C, op);
}
diff --git a/source/blender/editors/space_node/node_templates.c b/source/blender/editors/space_node/node_templates.c
index 049886b1d66..785eafeb7c9 100644
--- a/source/blender/editors/space_node/node_templates.c
+++ b/source/blender/editors/space_node/node_templates.c
@@ -220,8 +220,10 @@ static void node_socket_add_replace(Main *bmain, bNodeTree *ntree, bNode *node_t
/* also preserve mapping for texture nodes */
if (node_from->typeinfo->nclass == NODE_CLASS_TEXTURE &&
- node_prev->typeinfo->nclass == NODE_CLASS_TEXTURE)
+ node_prev->typeinfo->nclass == NODE_CLASS_TEXTURE)
+ {
memcpy(node_from->storage, node_prev->storage, sizeof(NodeTexBase));
+ }
/* remove node */
node_remove_linked(ntree, node_prev);
@@ -295,11 +297,14 @@ static void ui_node_sock_name(bNodeSocket *sock, char name[UI_MAX_NAME_STR])
BLI_strncpy(node_name, node->typeinfo->name, UI_MAX_NAME_STR);
if (node->inputs.first == NULL &&
- node->outputs.first != node->outputs.last &&
- !(node->typeinfo->flag & NODE_OPTIONS))
+ node->outputs.first != node->outputs.last &&
+ !(node->typeinfo->flag & NODE_OPTIONS))
+ {
BLI_snprintf(name, UI_MAX_NAME_STR, "%s | %s", node_name, sock->link->fromsock->name);
- else
+ }
+ else {
BLI_strncpy(name, node_name, UI_MAX_NAME_STR);
+ }
}
else if (sock->type == SOCK_SHADER)
BLI_strncpy(name, "None", UI_MAX_NAME_STR);
@@ -328,7 +333,7 @@ static void ui_node_menu_column(NodeLinkArg *arg, int nclass, const char *cname)
int compatibility= 0;
if (ntree->type == NTREE_SHADER) {
- if (scene_use_new_shading_nodes(arg->scene))
+ if (BKE_scene_use_new_shading_nodes(arg->scene))
compatibility= NODE_NEW_SHADING;
else
compatibility= NODE_OLD_SHADING;
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c
index fca9927b0f5..3540c20e515 100644
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@ -172,7 +172,7 @@ static void node_area_listener(ScrArea *sa, wmNotifier *wmn)
short shader_type = snode->shaderfrom;
/* preview renders */
- switch(wmn->category) {
+ switch (wmn->category) {
case NC_SCENE:
switch (wmn->data) {
case ND_NODES:
@@ -244,7 +244,7 @@ static void node_area_listener(ScrArea *sa, wmNotifier *wmn)
ED_area_tag_redraw(sa);
break;
case NC_SCREEN:
- switch(wmn->data) {
+ switch (wmn->data) {
case ND_ANIMPLAY:
ED_area_tag_refresh(sa);
break;
@@ -429,7 +429,7 @@ static void node_header_area_draw(const bContext *C, ARegion *ar)
static void node_region_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
- switch(wmn->category) {
+ switch (wmn->category) {
case NC_SPACE:
if (wmn->data==ND_SPACE_NODE)
ED_region_tag_redraw(ar);
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index 73289dce968..7813bbcd9a6 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -29,49 +29,30 @@
* \ingroup spoutliner
*/
-#include <string.h>
-#include <stdlib.h>
-
-#include "MEM_guardedalloc.h"
-
-#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
-#include "DNA_camera_types.h"
#include "DNA_group_types.h"
-#include "DNA_key_types.h"
#include "DNA_lamp_types.h"
-#include "DNA_material_types.h"
-#include "DNA_mesh_types.h"
-#include "DNA_meta_types.h"
-#include "DNA_particle_types.h"
+#include "DNA_object_types.h"
#include "DNA_scene_types.h"
-#include "DNA_world_types.h"
#include "DNA_sequence_types.h"
-#include "DNA_object_types.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
+#include "BLI_ghash.h"
-#include "BKE_animsys.h"
#include "BKE_context.h"
#include "BKE_deform.h"
#include "BKE_depsgraph.h"
-#include "BKE_fcurve.h"
#include "BKE_global.h"
-#include "BKE_group.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_modifier.h"
#include "BKE_report.h"
#include "BKE_scene.h"
-#include "BKE_sequencer.h"
-
-#include "BLI_ghash.h"
#include "ED_armature.h"
#include "ED_object.h"
#include "ED_screen.h"
-#include "ED_util.h"
#include "WM_api.h"
#include "WM_types.h"
@@ -85,7 +66,6 @@
#include "UI_view2d.h"
#include "RNA_access.h"
-#include "RNA_define.h"
#include "outliner_intern.h"
@@ -94,39 +74,39 @@
static void outliner_height(SpaceOops *soops, ListBase *lb, int *h)
{
- TreeElement *te= lb->first;
+ TreeElement *te = lb->first;
while (te) {
- TreeStoreElem *tselem= TREESTORE(te);
- if (TSELEM_OPEN(tselem,soops))
+ TreeStoreElem *tselem = TREESTORE(te);
+ if (TSELEM_OPEN(tselem, soops))
outliner_height(soops, &te->subtree, h);
(*h) += UI_UNIT_Y;
- te= te->next;
+ te = te->next;
}
}
#if 0 // XXX this is currently disabled until te->xend is set correctly
static void outliner_width(SpaceOops *soops, ListBase *lb, int *w)
{
- TreeElement *te= lb->first;
+ TreeElement *te = lb->first;
while (te) {
// TreeStoreElem *tselem= TREESTORE(te);
// XXX fixme... te->xend is not set yet
- if (!TSELEM_OPEN(tselem,soops)) {
+ if (!TSELEM_OPEN(tselem, soops)) {
if (te->xend > *w)
*w = te->xend;
}
outliner_width(soops, &te->subtree, w);
- te= te->next;
+ te = te->next;
}
}
#endif
static void outliner_rna_width(SpaceOops *soops, ListBase *lb, int *w, int startx)
{
- TreeElement *te= lb->first;
+ TreeElement *te = lb->first;
while (te) {
- TreeStoreElem *tselem= TREESTORE(te);
+ TreeStoreElem *tselem = TREESTORE(te);
// XXX fixme... (currently, we're using a fixed length of 100)!
#if 0
if (te->xend) {
@@ -134,12 +114,12 @@ static void outliner_rna_width(SpaceOops *soops, ListBase *lb, int *w, int start
*w = te->xend;
}
#endif
- if (startx+100 > *w)
- *w = startx+100;
+ if (startx + 100 > *w)
+ *w = startx + 100;
- if (TSELEM_OPEN(tselem,soops))
- outliner_rna_width(soops, &te->subtree, w, startx+UI_UNIT_X);
- te= te->next;
+ if (TSELEM_OPEN(tselem, soops))
+ outliner_rna_width(soops, &te->subtree, w, startx + UI_UNIT_X);
+ te = te->next;
}
}
@@ -156,9 +136,9 @@ static void restrictbutton_view_cb(bContext *C, void *poin, void *poin2)
if (ob->restrictflag & OB_RESTRICT_VIEW) {
/* Ouch! There is no backwards pointer from Object to Base,
* so have to do loop to find it. */
- ED_base_object_select(object_in_scene(ob, scene), BA_DESELECT);
+ ED_base_object_select(BKE_scene_base_find(scene, ob), BA_DESELECT);
}
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
}
@@ -173,20 +153,20 @@ static void restrictbutton_sel_cb(bContext *C, void *poin, void *poin2)
if (ob->restrictflag & OB_RESTRICT_SELECT) {
/* Ouch! There is no backwards pointer from Object to Base,
* so have to do loop to find it. */
- ED_base_object_select(object_in_scene(ob, scene), BA_DESELECT);
+ ED_base_object_select(BKE_scene_base_find(scene, ob), BA_DESELECT);
}
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
}
static void restrictbutton_rend_cb(bContext *C, void *poin, void *UNUSED(poin2))
{
- WM_event_add_notifier(C, NC_SCENE|ND_OB_RENDER, poin);
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_RENDER, poin);
}
static void restrictbutton_r_lay_cb(bContext *C, void *poin, void *UNUSED(poin2))
{
- WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, poin);
+ WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, poin);
}
static void restrictbutton_modifier_cb(bContext *C, void *UNUSED(poin), void *poin2)
@@ -195,31 +175,31 @@ static void restrictbutton_modifier_cb(bContext *C, void *UNUSED(poin), void *po
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
}
static void restrictbutton_bone_cb(bContext *C, void *UNUSED(poin), void *poin2)
{
- Bone *bone= (Bone *)poin2;
+ Bone *bone = (Bone *)poin2;
if (bone && (bone->flag & BONE_HIDDEN_P))
bone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, NULL);
}
static void restrictbutton_ebone_cb(bContext *C, void *UNUSED(poin), void *poin2)
{
- EditBone *ebone= (EditBone *)poin2;
+ EditBone *ebone = (EditBone *)poin2;
if (ebone && (ebone->flag & BONE_HIDDEN_A))
ebone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, NULL);
}
static int group_restrict_flag(Group *gr, int flag)
{
GroupObject *gob;
- for (gob= gr->gobject.first; gob; gob= gob->next) {
+ for (gob = gr->gobject.first; gob; gob = gob->next) {
if ((gob->ob->restrictflag & flag) == 0)
return 0;
}
@@ -231,7 +211,7 @@ static int group_select_flag(Group *gr)
{
GroupObject *gob;
- for (gob= gr->gobject.first; gob; gob= gob->next)
+ for (gob = gr->gobject.first; gob; gob = gob->next)
if ((gob->ob->flag & SELECT))
return 1;
@@ -245,23 +225,23 @@ void restrictbutton_gr_restrict_flag(void *poin, void *poin2, int flag)
Group *gr = (Group *)poin2;
if (group_restrict_flag(gr, flag)) {
- for (gob= gr->gobject.first; gob; gob= gob->next) {
+ for (gob = gr->gobject.first; gob; gob = gob->next) {
gob->ob->restrictflag &= ~flag;
- if (flag==OB_RESTRICT_VIEW)
+ if (flag == OB_RESTRICT_VIEW)
if (gob->ob->flag & SELECT)
- ED_base_object_select(object_in_scene(gob->ob, scene), BA_DESELECT);
+ ED_base_object_select(BKE_scene_base_find(scene, gob->ob), BA_DESELECT);
}
}
else {
- for (gob= gr->gobject.first; gob; gob= gob->next) {
+ for (gob = gr->gobject.first; gob; gob = gob->next) {
/* not in editmode */
- if (scene->obedit!=gob->ob) {
+ if (scene->obedit != gob->ob) {
gob->ob->restrictflag |= flag;
- if (flag==OB_RESTRICT_VIEW)
+ if (flag == OB_RESTRICT_VIEW)
if ((gob->ob->flag & SELECT) == 0)
- ED_base_object_select(object_in_scene(gob->ob, scene), BA_SELECT);
+ ED_base_object_select(BKE_scene_base_find(scene, gob->ob), BA_SELECT);
}
}
}
@@ -286,19 +266,19 @@ static void restrictbutton_gr_restrict_render(bContext *C, void *poin, void *poi
static void namebutton_cb(bContext *C, void *tsep, char *oldname)
{
- SpaceOops *soops= CTX_wm_space_outliner(C);
- Scene *scene= CTX_data_scene(C);
- Object *obedit= CTX_data_edit_object(C);
- TreeStore *ts= soops->treestore;
- TreeStoreElem *tselem= tsep;
+ SpaceOops *soops = CTX_wm_space_outliner(C);
+ Scene *scene = CTX_data_scene(C);
+ Object *obedit = CTX_data_edit_object(C);
+ TreeStore *ts = soops->treestore;
+ TreeStoreElem *tselem = tsep;
if (ts && tselem) {
- TreeElement *te= outliner_find_tse(soops, tselem);
+ TreeElement *te = outliner_find_tse(soops, tselem);
- if (tselem->type==0) {
- test_idbutton(tselem->id->name+2); // library.c, unique name and alpha sort
+ if (tselem->type == 0) {
+ test_idbutton(tselem->id->name + 2); // library.c, unique name and alpha sort
- switch(GS(tselem->id->name)) {
+ switch (GS(tselem->id->name)) {
case ID_MA:
WM_event_add_notifier(C, NC_MATERIAL, NULL); break;
case ID_TE:
@@ -308,11 +288,11 @@ static void namebutton_cb(bContext *C, void *tsep, char *oldname)
case ID_SCE:
WM_event_add_notifier(C, NC_SCENE, NULL); break;
default:
- WM_event_add_notifier(C, NC_ID|NA_RENAME, NULL); break;
+ WM_event_add_notifier(C, NC_ID | NA_RENAME, NULL); break;
}
/* Check the library target exists */
if (te->idcode == ID_LI) {
- Library *lib= (Library *)tselem->id;
+ Library *lib = (Library *)tselem->id;
char expanded[FILE_MAX];
BKE_library_filepath_set(lib, lib->name);
@@ -325,74 +305,74 @@ static void namebutton_cb(bContext *C, void *tsep, char *oldname)
}
}
else {
- switch(tselem->type) {
- case TSE_DEFGROUP:
- defgroup_unique_name(te->directdata, (Object *)tselem->id); // id = object
- break;
- case TSE_NLA_ACTION:
- test_idbutton(tselem->id->name+2);
- break;
- case TSE_EBONE:
- {
- bArmature *arm= (bArmature *)tselem->id;
- if (arm->edbo) {
- EditBone *ebone= te->directdata;
- char newname[sizeof(ebone->name)];
-
- /* restore bone name */
- BLI_strncpy(newname, ebone->name, sizeof(ebone->name));
- BLI_strncpy(ebone->name, oldname, sizeof(ebone->name));
- ED_armature_bone_rename(obedit->data, oldname, newname);
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, OBACT);
+ switch (tselem->type) {
+ case TSE_DEFGROUP:
+ defgroup_unique_name(te->directdata, (Object *)tselem->id); // id = object
+ break;
+ case TSE_NLA_ACTION:
+ test_idbutton(tselem->id->name + 2);
+ break;
+ case TSE_EBONE:
+ {
+ bArmature *arm = (bArmature *)tselem->id;
+ if (arm->edbo) {
+ EditBone *ebone = te->directdata;
+ char newname[sizeof(ebone->name)];
+
+ /* restore bone name */
+ BLI_strncpy(newname, ebone->name, sizeof(ebone->name));
+ BLI_strncpy(ebone->name, oldname, sizeof(ebone->name));
+ ED_armature_bone_rename(obedit->data, oldname, newname);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, OBACT);
+ }
}
- }
break;
- case TSE_BONE:
+ case TSE_BONE:
{
- Bone *bone= te->directdata;
+ Bone *bone = te->directdata;
Object *ob;
char newname[sizeof(bone->name)];
// always make current object active
tree_element_active(C, scene, soops, te, 1); // was set_active_object()
- ob= OBACT;
+ ob = OBACT;
/* restore bone name */
BLI_strncpy(newname, bone->name, sizeof(bone->name));
BLI_strncpy(bone->name, oldname, sizeof(bone->name));
ED_armature_bone_rename(ob->data, oldname, newname);
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
}
break;
- case TSE_POSE_CHANNEL:
+ case TSE_POSE_CHANNEL:
{
- bPoseChannel *pchan= te->directdata;
+ bPoseChannel *pchan = te->directdata;
Object *ob;
char newname[sizeof(pchan->name)];
// always make current object active
tree_element_active(C, scene, soops, te, 1); // was set_active_object()
- ob= OBACT;
+ ob = OBACT;
/* restore bone name */
BLI_strncpy(newname, pchan->name, sizeof(pchan->name));
BLI_strncpy(pchan->name, oldname, sizeof(pchan->name));
ED_armature_bone_rename(ob->data, oldname, newname);
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
}
break;
- case TSE_POSEGRP:
+ case TSE_POSEGRP:
{
- Object *ob= (Object *)tselem->id; // id = object
- bActionGroup *grp= te->directdata;
+ Object *ob = (Object *)tselem->id; // id = object
+ bActionGroup *grp = te->directdata;
BLI_uniquename(&ob->pose->agroups, grp, "Group", '.', offsetof(bActionGroup, name), sizeof(grp->name));
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
}
break;
- case TSE_R_LAYER:
- break;
+ case TSE_R_LAYER:
+ break;
}
}
tselem->flag &= ~TSE_TEXTBUT;
@@ -407,147 +387,147 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar
Object *ob = NULL;
Group *gr = NULL;
- for (te= lb->first; te; te= te->next) {
- tselem= TREESTORE(te);
- if (te->ys+2*UI_UNIT_Y >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) {
+ for (te = lb->first; te; te = te->next) {
+ tselem = TREESTORE(te);
+ if (te->ys + 2 * UI_UNIT_Y >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) {
/* objects have toggle-able restriction flags */
- if (tselem->type==0 && te->idcode==ID_OB) {
+ if (tselem->type == 0 && te->idcode == ID_OB) {
PointerRNA ptr;
ob = (Object *)tselem->id;
RNA_pointer_create((ID *)ob, &RNA_Object, ob, &ptr);
uiBlockSetEmboss(block, UI_EMBOSSN);
- bt= uiDefIconButR(block, ICONTOG, 0, ICON_RESTRICT_VIEW_OFF,
- (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (int)te->ys, UI_UNIT_X-1, UI_UNIT_Y-1,
- &ptr, "hide", -1, 0, 0, -1, -1, NULL);
+ bt = uiDefIconButR(block, ICONTOG, 0, ICON_RESTRICT_VIEW_OFF,
+ (int)ar->v2d.cur.xmax - OL_TOG_RESTRICT_VIEWX, (int)te->ys, UI_UNIT_X - 1, UI_UNIT_Y - 1,
+ &ptr, "hide", -1, 0, 0, -1, -1, NULL);
uiButSetFunc(bt, restrictbutton_view_cb, scene, ob);
- bt= uiDefIconButR(block, ICONTOG, 0, ICON_RESTRICT_SELECT_OFF,
- (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, (int)te->ys, UI_UNIT_X-1, UI_UNIT_Y-1,
- &ptr, "hide_select", -1, 0, 0, -1, -1, NULL);
+ bt = uiDefIconButR(block, ICONTOG, 0, ICON_RESTRICT_SELECT_OFF,
+ (int)ar->v2d.cur.xmax - OL_TOG_RESTRICT_SELECTX, (int)te->ys, UI_UNIT_X - 1, UI_UNIT_Y - 1,
+ &ptr, "hide_select", -1, 0, 0, -1, -1, NULL);
uiButSetFunc(bt, restrictbutton_sel_cb, scene, ob);
- bt= uiDefIconButR(block, ICONTOG, 0, ICON_RESTRICT_RENDER_OFF,
- (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_RENDERX, (int)te->ys, UI_UNIT_X-1, UI_UNIT_Y-1,
- &ptr, "hide_render", -1, 0, 0, -1, -1, NULL);
+ bt = uiDefIconButR(block, ICONTOG, 0, ICON_RESTRICT_RENDER_OFF,
+ (int)ar->v2d.cur.xmax - OL_TOG_RESTRICT_RENDERX, (int)te->ys, UI_UNIT_X - 1, UI_UNIT_Y - 1,
+ &ptr, "hide_render", -1, 0, 0, -1, -1, NULL);
uiButSetFunc(bt, restrictbutton_rend_cb, scene, ob);
uiBlockSetEmboss(block, UI_EMBOSS);
}
- if (tselem->type==0 && te->idcode==ID_GR) {
+ if (tselem->type == 0 && te->idcode == ID_GR) {
int restrict_bool;
gr = (Group *)tselem->id;
uiBlockSetEmboss(block, UI_EMBOSSN);
- restrict_bool= group_restrict_flag(gr, OB_RESTRICT_VIEW);
- bt = uiDefIconBut(block, ICONTOG, 0, restrict_bool ? ICON_RESTRICT_VIEW_ON : ICON_RESTRICT_VIEW_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (int)te->ys, UI_UNIT_X-1, UI_UNIT_Y-1, NULL, 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
+ restrict_bool = group_restrict_flag(gr, OB_RESTRICT_VIEW);
+ bt = uiDefIconBut(block, ICONTOG, 0, restrict_bool ? ICON_RESTRICT_VIEW_ON : ICON_RESTRICT_VIEW_OFF, (int)ar->v2d.cur.xmax - OL_TOG_RESTRICT_VIEWX, (int)te->ys, UI_UNIT_X - 1, UI_UNIT_Y - 1, NULL, 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
uiButSetFunc(bt, restrictbutton_gr_restrict_view, scene, gr);
- restrict_bool= group_restrict_flag(gr, OB_RESTRICT_SELECT);
- bt = uiDefIconBut(block, ICONTOG, 0, restrict_bool ? ICON_RESTRICT_SELECT_ON : ICON_RESTRICT_SELECT_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, (int)te->ys, UI_UNIT_X-1, UI_UNIT_Y-1, NULL, 0, 0, 0, 0, "Restrict/Allow selection in the 3D View");
+ restrict_bool = group_restrict_flag(gr, OB_RESTRICT_SELECT);
+ bt = uiDefIconBut(block, ICONTOG, 0, restrict_bool ? ICON_RESTRICT_SELECT_ON : ICON_RESTRICT_SELECT_OFF, (int)ar->v2d.cur.xmax - OL_TOG_RESTRICT_SELECTX, (int)te->ys, UI_UNIT_X - 1, UI_UNIT_Y - 1, NULL, 0, 0, 0, 0, "Restrict/Allow selection in the 3D View");
uiButSetFunc(bt, restrictbutton_gr_restrict_select, scene, gr);
- restrict_bool= group_restrict_flag(gr, OB_RESTRICT_RENDER);
- bt = uiDefIconBut(block, ICONTOG, 0, restrict_bool ? ICON_RESTRICT_RENDER_ON : ICON_RESTRICT_RENDER_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_RENDERX, (int)te->ys, UI_UNIT_X-1, UI_UNIT_Y-1, NULL, 0, 0, 0, 0, "Restrict/Allow renderability");
+ restrict_bool = group_restrict_flag(gr, OB_RESTRICT_RENDER);
+ bt = uiDefIconBut(block, ICONTOG, 0, restrict_bool ? ICON_RESTRICT_RENDER_ON : ICON_RESTRICT_RENDER_OFF, (int)ar->v2d.cur.xmax - OL_TOG_RESTRICT_RENDERX, (int)te->ys, UI_UNIT_X - 1, UI_UNIT_Y - 1, NULL, 0, 0, 0, 0, "Restrict/Allow renderability");
uiButSetFunc(bt, restrictbutton_gr_restrict_render, scene, gr);
uiBlockSetEmboss(block, UI_EMBOSS);
}
/* scene render layers and passes have toggle-able flags too! */
- else if (tselem->type==TSE_R_LAYER) {
+ else if (tselem->type == TSE_R_LAYER) {
uiBlockSetEmboss(block, UI_EMBOSSN);
- bt= uiDefIconButBitI(block, ICONTOGN, SCE_LAY_DISABLE, 0, ICON_CHECKBOX_HLT-1,
- (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (int)te->ys, UI_UNIT_X-1, UI_UNIT_Y-1, te->directdata, 0, 0, 0, 0, "Render this RenderLayer");
+ bt = uiDefIconButBitI(block, ICONTOGN, SCE_LAY_DISABLE, 0, ICON_CHECKBOX_HLT - 1,
+ (int)ar->v2d.cur.xmax - OL_TOG_RESTRICT_VIEWX, (int)te->ys, UI_UNIT_X - 1, UI_UNIT_Y - 1, te->directdata, 0, 0, 0, 0, "Render this RenderLayer");
uiButSetFunc(bt, restrictbutton_r_lay_cb, tselem->id, NULL);
uiBlockSetEmboss(block, UI_EMBOSS);
}
- else if (tselem->type==TSE_R_PASS) {
- int *layflag= te->directdata;
- int passflag= 1<<tselem->nr;
+ else if (tselem->type == TSE_R_PASS) {
+ int *layflag = te->directdata;
+ int passflag = 1 << tselem->nr;
uiBlockSetEmboss(block, UI_EMBOSSN);
- bt= uiDefIconButBitI(block, ICONTOG, passflag, 0, ICON_CHECKBOX_HLT-1,
- (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (int)te->ys, UI_UNIT_X-1, UI_UNIT_Y-1, layflag, 0, 0, 0, 0, "Render this Pass");
+ bt = uiDefIconButBitI(block, ICONTOG, passflag, 0, ICON_CHECKBOX_HLT - 1,
+ (int)ar->v2d.cur.xmax - OL_TOG_RESTRICT_VIEWX, (int)te->ys, UI_UNIT_X - 1, UI_UNIT_Y - 1, layflag, 0, 0, 0, 0, "Render this Pass");
uiButSetFunc(bt, restrictbutton_r_lay_cb, tselem->id, NULL);
- layflag++; /* is lay_xor */
+ layflag++; /* is lay_xor */
if (ELEM8(passflag, SCE_PASS_SPEC, SCE_PASS_SHADOW, SCE_PASS_AO, SCE_PASS_REFLECT, SCE_PASS_REFRACT, SCE_PASS_INDIRECT, SCE_PASS_EMIT, SCE_PASS_ENVIRONMENT))
- bt= uiDefIconButBitI(block, TOG, passflag, 0, (*layflag & passflag)?ICON_DOT:ICON_BLANK1,
- (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, (int)te->ys, UI_UNIT_X-1, UI_UNIT_Y-1, layflag, 0, 0, 0, 0, "Exclude this Pass from Combined");
+ bt = uiDefIconButBitI(block, TOG, passflag, 0, (*layflag & passflag) ? ICON_DOT : ICON_BLANK1,
+ (int)ar->v2d.cur.xmax - OL_TOG_RESTRICT_SELECTX, (int)te->ys, UI_UNIT_X - 1, UI_UNIT_Y - 1, layflag, 0, 0, 0, 0, "Exclude this Pass from Combined");
uiButSetFunc(bt, restrictbutton_r_lay_cb, tselem->id, NULL);
uiBlockSetEmboss(block, UI_EMBOSS);
}
- else if (tselem->type==TSE_MODIFIER) {
- ModifierData *md= (ModifierData *)te->directdata;
+ else if (tselem->type == TSE_MODIFIER) {
+ ModifierData *md = (ModifierData *)te->directdata;
ob = (Object *)tselem->id;
uiBlockSetEmboss(block, UI_EMBOSSN);
- bt= uiDefIconButBitI(block, ICONTOGN, eModifierMode_Realtime, 0, ICON_RESTRICT_VIEW_OFF,
- (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (int)te->ys, UI_UNIT_X-1, UI_UNIT_Y-1, &(md->mode), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
+ bt = uiDefIconButBitI(block, ICONTOGN, eModifierMode_Realtime, 0, ICON_RESTRICT_VIEW_OFF,
+ (int)ar->v2d.cur.xmax - OL_TOG_RESTRICT_VIEWX, (int)te->ys, UI_UNIT_X - 1, UI_UNIT_Y - 1, &(md->mode), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
uiButSetFunc(bt, restrictbutton_modifier_cb, scene, ob);
- bt= uiDefIconButBitI(block, ICONTOGN, eModifierMode_Render, 0, ICON_RESTRICT_RENDER_OFF,
- (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_RENDERX, (int)te->ys, UI_UNIT_X-1, UI_UNIT_Y-1, &(md->mode), 0, 0, 0, 0, "Restrict/Allow renderability");
+ bt = uiDefIconButBitI(block, ICONTOGN, eModifierMode_Render, 0, ICON_RESTRICT_RENDER_OFF,
+ (int)ar->v2d.cur.xmax - OL_TOG_RESTRICT_RENDERX, (int)te->ys, UI_UNIT_X - 1, UI_UNIT_Y - 1, &(md->mode), 0, 0, 0, 0, "Restrict/Allow renderability");
uiButSetFunc(bt, restrictbutton_modifier_cb, scene, ob);
}
- else if (tselem->type==TSE_POSE_CHANNEL) {
- bPoseChannel *pchan= (bPoseChannel *)te->directdata;
+ else if (tselem->type == TSE_POSE_CHANNEL) {
+ bPoseChannel *pchan = (bPoseChannel *)te->directdata;
Bone *bone = pchan->bone;
uiBlockSetEmboss(block, UI_EMBOSSN);
- bt= uiDefIconButBitI(block, ICONTOG, BONE_HIDDEN_P, 0, ICON_RESTRICT_VIEW_OFF,
- (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (int)te->ys, UI_UNIT_X-1, UI_UNIT_Y-1, &(bone->flag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
+ bt = uiDefIconButBitI(block, ICONTOG, BONE_HIDDEN_P, 0, ICON_RESTRICT_VIEW_OFF,
+ (int)ar->v2d.cur.xmax - OL_TOG_RESTRICT_VIEWX, (int)te->ys, UI_UNIT_X - 1, UI_UNIT_Y - 1, &(bone->flag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
uiButSetFunc(bt, restrictbutton_bone_cb, NULL, bone);
- bt= uiDefIconButBitI(block, ICONTOG, BONE_UNSELECTABLE, 0, ICON_RESTRICT_SELECT_OFF,
- (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, (int)te->ys, UI_UNIT_X-1, UI_UNIT_Y-1, &(bone->flag), 0, 0, 0, 0, "Restrict/Allow selection in the 3D View");
+ bt = uiDefIconButBitI(block, ICONTOG, BONE_UNSELECTABLE, 0, ICON_RESTRICT_SELECT_OFF,
+ (int)ar->v2d.cur.xmax - OL_TOG_RESTRICT_SELECTX, (int)te->ys, UI_UNIT_X - 1, UI_UNIT_Y - 1, &(bone->flag), 0, 0, 0, 0, "Restrict/Allow selection in the 3D View");
uiButSetFunc(bt, restrictbutton_bone_cb, NULL, NULL);
}
- else if (tselem->type==TSE_EBONE) {
- EditBone *ebone= (EditBone *)te->directdata;
+ else if (tselem->type == TSE_EBONE) {
+ EditBone *ebone = (EditBone *)te->directdata;
uiBlockSetEmboss(block, UI_EMBOSSN);
- bt= uiDefIconButBitI(block, ICONTOG, BONE_HIDDEN_A, 0, ICON_RESTRICT_VIEW_OFF,
- (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (int)te->ys, UI_UNIT_X-1, UI_UNIT_Y-1, &(ebone->flag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
+ bt = uiDefIconButBitI(block, ICONTOG, BONE_HIDDEN_A, 0, ICON_RESTRICT_VIEW_OFF,
+ (int)ar->v2d.cur.xmax - OL_TOG_RESTRICT_VIEWX, (int)te->ys, UI_UNIT_X - 1, UI_UNIT_Y - 1, &(ebone->flag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
uiButSetFunc(bt, restrictbutton_ebone_cb, NULL, ebone);
- bt= uiDefIconButBitI(block, ICONTOG, BONE_UNSELECTABLE, 0, ICON_RESTRICT_SELECT_OFF,
- (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, (int)te->ys, UI_UNIT_X-1, UI_UNIT_Y-1, &(ebone->flag), 0, 0, 0, 0, "Restrict/Allow selection in the 3D View");
+ bt = uiDefIconButBitI(block, ICONTOG, BONE_UNSELECTABLE, 0, ICON_RESTRICT_SELECT_OFF,
+ (int)ar->v2d.cur.xmax - OL_TOG_RESTRICT_SELECTX, (int)te->ys, UI_UNIT_X - 1, UI_UNIT_Y - 1, &(ebone->flag), 0, 0, 0, 0, "Restrict/Allow selection in the 3D View");
uiButSetFunc(bt, restrictbutton_ebone_cb, NULL, NULL);
}
}
- if (TSELEM_OPEN(tselem,soops)) outliner_draw_restrictbuts(block, scene, ar, soops, &te->subtree);
+ if (TSELEM_OPEN(tselem, soops)) outliner_draw_restrictbuts(block, scene, ar, soops, &te->subtree);
}
}
static void outliner_draw_rnacols(ARegion *ar, int sizex)
{
- View2D *v2d= &ar->v2d;
+ View2D *v2d = &ar->v2d;
- float miny = v2d->cur.ymin-V2D_SCROLL_HEIGHT;
- if (miny<v2d->tot.ymin) miny = v2d->tot.ymin;
+ float miny = v2d->cur.ymin - V2D_SCROLL_HEIGHT;
+ if (miny < v2d->tot.ymin) miny = v2d->tot.ymin;
UI_ThemeColorShadeAlpha(TH_BACK, -15, -200);
/* draw column separator lines */
fdrawline((float)sizex,
- v2d->cur.ymax,
- (float)sizex,
- miny);
-
- fdrawline((float)sizex+OL_RNA_COL_SIZEX,
- v2d->cur.ymax,
- (float)sizex+OL_RNA_COL_SIZEX,
- miny);
+ v2d->cur.ymax,
+ (float)sizex,
+ miny);
+
+ fdrawline((float)sizex + OL_RNA_COL_SIZEX,
+ v2d->cur.ymax,
+ (float)sizex + OL_RNA_COL_SIZEX,
+ miny);
}
static void outliner_draw_rnabuts(uiBlock *block, Scene *scene, ARegion *ar, SpaceOops *soops, int sizex, ListBase *lb)
@@ -559,31 +539,31 @@ static void outliner_draw_rnabuts(uiBlock *block, Scene *scene, ARegion *ar, Spa
uiBlockSetEmboss(block, UI_EMBOSST);
- for (te= lb->first; te; te= te->next) {
- tselem= TREESTORE(te);
- if (te->ys+2*UI_UNIT_Y >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) {
+ for (te = lb->first; te; te = te->next) {
+ tselem = TREESTORE(te);
+ if (te->ys + 2 * UI_UNIT_Y >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) {
if (tselem->type == TSE_RNA_PROPERTY) {
- ptr= &te->rnaptr;
- prop= te->directdata;
+ ptr = &te->rnaptr;
+ prop = te->directdata;
- if (!(RNA_property_type(prop) == PROP_POINTER && (TSELEM_OPEN(tselem,soops))) )
- uiDefAutoButR(block, ptr, prop, -1, "", ICON_NONE, sizex, (int)te->ys, OL_RNA_COL_SIZEX, UI_UNIT_Y-1);
+ if (!(RNA_property_type(prop) == PROP_POINTER && (TSELEM_OPEN(tselem, soops))) )
+ uiDefAutoButR(block, ptr, prop, -1, "", ICON_NONE, sizex, (int)te->ys, OL_RNA_COL_SIZEX, UI_UNIT_Y - 1);
}
else if (tselem->type == TSE_RNA_ARRAY_ELEM) {
- ptr= &te->rnaptr;
- prop= te->directdata;
+ ptr = &te->rnaptr;
+ prop = te->directdata;
- uiDefAutoButR(block, ptr, prop, te->index, "", ICON_NONE, sizex, (int)te->ys, OL_RNA_COL_SIZEX, UI_UNIT_Y-1);
+ uiDefAutoButR(block, ptr, prop, te->index, "", ICON_NONE, sizex, (int)te->ys, OL_RNA_COL_SIZEX, UI_UNIT_Y - 1);
}
}
- if (TSELEM_OPEN(tselem,soops)) outliner_draw_rnabuts(block, scene, ar, soops, sizex, &te->subtree);
+ if (TSELEM_OPEN(tselem, soops)) outliner_draw_rnabuts(block, scene, ar, soops, sizex, &te->subtree);
}
}
static void operator_call_cb(struct bContext *UNUSED(C), void *arg_kmi, void *arg2)
{
- wmOperatorType *ot= arg2;
+ wmOperatorType *ot = arg2;
wmKeyMapItem *kmi = arg_kmi;
if (ot)
@@ -592,10 +572,10 @@ static void operator_call_cb(struct bContext *UNUSED(C), void *arg_kmi, void *ar
static void operator_search_cb(const struct bContext *UNUSED(C), void *UNUSED(arg_kmi), const char *str, uiSearchItems *items)
{
- GHashIterator *iter= WM_operatortype_iter();
+ GHashIterator *iter = WM_operatortype_iter();
- for ( ; !BLI_ghashIterator_isDone(iter); BLI_ghashIterator_step(iter)) {
- wmOperatorType *ot= BLI_ghashIterator_getValue(iter);
+ for (; !BLI_ghashIterator_isDone(iter); BLI_ghashIterator_step(iter)) {
+ wmOperatorType *ot = BLI_ghashIterator_getValue(iter);
if (BLI_strcasestr(ot->idname, str)) {
char name[OP_MAX_TYPENAME];
@@ -603,7 +583,7 @@ static void operator_search_cb(const struct bContext *UNUSED(C), void *UNUSED(ar
/* display name for menu */
WM_operator_py_idname(name, ot->idname);
- if (0==uiSearchItemAdd(items, name, ot, 0))
+ if (0 == uiSearchItemAdd(items, name, ot, 0))
break;
}
}
@@ -615,17 +595,17 @@ static uiBlock *operator_search_menu(bContext *C, ARegion *ar, void *arg_kmi)
{
static char search[OP_MAX_TYPENAME];
wmEvent event;
- wmWindow *win= CTX_wm_window(C);
+ wmWindow *win = CTX_wm_window(C);
wmKeyMapItem *kmi = arg_kmi;
- wmOperatorType *ot= WM_operatortype_find(kmi->idname, 0);
+ wmOperatorType *ot = WM_operatortype_find(kmi->idname, 0);
uiBlock *block;
uiBut *but;
/* clear initial search string, then all items show */
- search[0]= 0;
+ search[0] = 0;
- block= uiBeginBlock(C, ar, "_popup", UI_EMBOSS);
- uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_RET_1);
+ block = uiBeginBlock(C, ar, "_popup", UI_EMBOSS);
+ uiBlockSetFlag(block, UI_BLOCK_LOOP | UI_BLOCK_REDRAW | UI_BLOCK_RET_1);
/* fake button, it holds space for search items */
uiDefBut(block, LABEL, 0, "", 10, 15, 150, uiSearchBoxhHeight(), NULL, 0, 0, 0, 0, NULL);
@@ -637,20 +617,20 @@ static uiBlock *operator_search_menu(bContext *C, ARegion *ar, void *arg_kmi)
uiBlockSetDirection(block, UI_DOWN);
uiEndBlock(C, block);
- event= *(win->eventstate); /* XXX huh huh? make api call */
- event.type= EVT_BUT_OPEN;
- event.val= KM_PRESS;
- event.customdata= but;
- event.customdatafree= FALSE;
+ event = *(win->eventstate); /* XXX huh huh? make api call */
+ event.type = EVT_BUT_OPEN;
+ event.val = KM_PRESS;
+ event.customdata = but;
+ event.customdatafree = FALSE;
wm_event_add(win, &event);
return block;
}
-#define OL_KM_KEYBOARD 0
-#define OL_KM_MOUSE 1
-#define OL_KM_TWEAK 2
-#define OL_KM_SPECIALS 3
+#define OL_KM_KEYBOARD 0
+#define OL_KM_MOUSE 1
+#define OL_KM_TWEAK 2
+#define OL_KM_SPECIALS 3
static short keymap_menu_type(short type)
{
@@ -663,11 +643,11 @@ static short keymap_menu_type(short type)
static const char *keymap_type_menu(void)
{
- static const char string[]=
- "Event Type%t"
- "|Keyboard%x" STRINGIFY(OL_KM_KEYBOARD)
- "|Mouse%x" STRINGIFY(OL_KM_MOUSE)
- "|Tweak%x" STRINGIFY(OL_KM_TWEAK)
+ static const char string[] =
+ "Event Type%t"
+ "|Keyboard%x" STRINGIFY(OL_KM_KEYBOARD)
+ "|Mouse%x" STRINGIFY(OL_KM_MOUSE)
+ "|Tweak%x" STRINGIFY(OL_KM_TWEAK)
// "|Specials%x" STRINGIFY(OL_KM_SPECIALS)
;
@@ -676,25 +656,25 @@ static const char *keymap_type_menu(void)
static const char *keymap_mouse_menu(void)
{
- static const char string[]=
- "Mouse Event%t"
- "|Left Mouse%x" STRINGIFY(LEFTMOUSE)
- "|Middle Mouse%x" STRINGIFY(MIDDLEMOUSE)
- "|Right Mouse%x" STRINGIFY(RIGHTMOUSE)
- "|Middle Mouse%x" STRINGIFY(MIDDLEMOUSE)
- "|Right Mouse%x" STRINGIFY(RIGHTMOUSE)
- "|Button4 Mouse%x" STRINGIFY(BUTTON4MOUSE)
- "|Button5 Mouse%x" STRINGIFY(BUTTON5MOUSE)
- "|Action Mouse%x" STRINGIFY(ACTIONMOUSE)
- "|Select Mouse%x" STRINGIFY(SELECTMOUSE)
- "|Mouse Move%x" STRINGIFY(MOUSEMOVE)
- "|Wheel Up%x" STRINGIFY(WHEELUPMOUSE)
- "|Wheel Down%x" STRINGIFY(WHEELDOWNMOUSE)
- "|Wheel In%x" STRINGIFY(WHEELINMOUSE)
- "|Wheel Out%x" STRINGIFY(WHEELOUTMOUSE)
- "|Mouse/Trackpad Pan%x" STRINGIFY(MOUSEPAN)
- "|Mouse/Trackpad Zoom%x" STRINGIFY(MOUSEZOOM)
- "|Mouse/Trackpad Rotate%x" STRINGIFY(MOUSEROTATE)
+ static const char string[] =
+ "Mouse Event%t"
+ "|Left Mouse%x" STRINGIFY(LEFTMOUSE)
+ "|Middle Mouse%x" STRINGIFY(MIDDLEMOUSE)
+ "|Right Mouse%x" STRINGIFY(RIGHTMOUSE)
+ "|Middle Mouse%x" STRINGIFY(MIDDLEMOUSE)
+ "|Right Mouse%x" STRINGIFY(RIGHTMOUSE)
+ "|Button4 Mouse%x" STRINGIFY(BUTTON4MOUSE)
+ "|Button5 Mouse%x" STRINGIFY(BUTTON5MOUSE)
+ "|Action Mouse%x" STRINGIFY(ACTIONMOUSE)
+ "|Select Mouse%x" STRINGIFY(SELECTMOUSE)
+ "|Mouse Move%x" STRINGIFY(MOUSEMOVE)
+ "|Wheel Up%x" STRINGIFY(WHEELUPMOUSE)
+ "|Wheel Down%x" STRINGIFY(WHEELDOWNMOUSE)
+ "|Wheel In%x" STRINGIFY(WHEELINMOUSE)
+ "|Wheel Out%x" STRINGIFY(WHEELOUTMOUSE)
+ "|Mouse/Trackpad Pan%x" STRINGIFY(MOUSEPAN)
+ "|Mouse/Trackpad Zoom%x" STRINGIFY(MOUSEZOOM)
+ "|Mouse/Trackpad Rotate%x" STRINGIFY(MOUSEROTATE)
;
return string;
@@ -702,13 +682,13 @@ static const char *keymap_mouse_menu(void)
static const char *keymap_tweak_menu(void)
{
- static const char string[]=
- "Tweak Event%t"
- "|Left Mouse%x" STRINGIFY(EVT_TWEAK_L)
- "|Middle Mouse%x" STRINGIFY(EVT_TWEAK_M)
- "|Right Mouse%x" STRINGIFY(EVT_TWEAK_R)
- "|Action Mouse%x" STRINGIFY(EVT_TWEAK_A)
- "|Select Mouse%x" STRINGIFY(EVT_TWEAK_S)
+ static const char string[] =
+ "Tweak Event%t"
+ "|Left Mouse%x" STRINGIFY(EVT_TWEAK_L)
+ "|Middle Mouse%x" STRINGIFY(EVT_TWEAK_M)
+ "|Right Mouse%x" STRINGIFY(EVT_TWEAK_R)
+ "|Action Mouse%x" STRINGIFY(EVT_TWEAK_A)
+ "|Select Mouse%x" STRINGIFY(EVT_TWEAK_S)
;
return string;
@@ -716,17 +696,17 @@ static const char *keymap_tweak_menu(void)
static const char *keymap_tweak_dir_menu(void)
{
- static const char string[]=
- "Tweak Direction%t"
- "|Any%x" STRINGIFY(KM_ANY)
- "|North%x" STRINGIFY(EVT_GESTURE_N)
- "|North-East%x" STRINGIFY(EVT_GESTURE_NE)
- "|East%x" STRINGIFY(EVT_GESTURE_E)
- "|Sout-East%x" STRINGIFY(EVT_GESTURE_SE)
- "|South%x" STRINGIFY(EVT_GESTURE_S)
- "|South-West%x" STRINGIFY(EVT_GESTURE_SW)
- "|West%x" STRINGIFY(EVT_GESTURE_W)
- "|North-West%x" STRINGIFY(EVT_GESTURE_NW)
+ static const char string[] =
+ "Tweak Direction%t"
+ "|Any%x" STRINGIFY(KM_ANY)
+ "|North%x" STRINGIFY(EVT_GESTURE_N)
+ "|North-East%x" STRINGIFY(EVT_GESTURE_NE)
+ "|East%x" STRINGIFY(EVT_GESTURE_E)
+ "|Sout-East%x" STRINGIFY(EVT_GESTURE_SE)
+ "|South%x" STRINGIFY(EVT_GESTURE_S)
+ "|South-West%x" STRINGIFY(EVT_GESTURE_SW)
+ "|West%x" STRINGIFY(EVT_GESTURE_W)
+ "|North-West%x" STRINGIFY(EVT_GESTURE_NW)
;
return string;
@@ -736,25 +716,25 @@ static const char *keymap_tweak_dir_menu(void)
static void keymap_type_cb(bContext *C, void *kmi_v, void *UNUSED(arg_v))
{
wmKeyMapItem *kmi = kmi_v;
- short maptype= keymap_menu_type(kmi->type);
+ short maptype = keymap_menu_type(kmi->type);
- if (maptype!=kmi->maptype) {
- switch(kmi->maptype) {
+ if (maptype != kmi->maptype) {
+ switch (kmi->maptype) {
case OL_KM_KEYBOARD:
- kmi->type= AKEY;
- kmi->val= KM_PRESS;
+ kmi->type = AKEY;
+ kmi->val = KM_PRESS;
break;
case OL_KM_MOUSE:
- kmi->type= LEFTMOUSE;
- kmi->val= KM_PRESS;
+ kmi->type = LEFTMOUSE;
+ kmi->val = KM_PRESS;
break;
case OL_KM_TWEAK:
- kmi->type= EVT_TWEAK_L;
- kmi->val= KM_ANY;
+ kmi->type = EVT_TWEAK_L;
+ kmi->val = KM_ANY;
break;
case OL_KM_SPECIALS:
- kmi->type= AKEY;
- kmi->val= KM_PRESS;
+ kmi->type = AKEY;
+ kmi->val = KM_PRESS;
}
ED_region_tag_redraw(CTX_wm_region(C));
}
@@ -767,74 +747,74 @@ static void outliner_draw_keymapbuts(uiBlock *block, ARegion *ar, SpaceOops *soo
uiBlockSetEmboss(block, UI_EMBOSST);
- for (te= lb->first; te; te= te->next) {
- tselem= TREESTORE(te);
- if (te->ys+2*UI_UNIT_Y >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) {
+ for (te = lb->first; te; te = te->next) {
+ tselem = TREESTORE(te);
+ if (te->ys + 2 * UI_UNIT_Y >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) {
uiBut *but;
const char *str;
- int xstart= 240;
- int butw1= UI_UNIT_X; /* operator */
- int butw2= 90; /* event type, menus */
- int butw3= 43; /* modifiers */
+ int xstart = 240;
+ int butw1 = UI_UNIT_X; /* operator */
+ int butw2 = 90; /* event type, menus */
+ int butw3 = 43; /* modifiers */
if (tselem->type == TSE_KEYMAP_ITEM) {
wmKeyMapItem *kmi = te->directdata;
/* modal map? */
- if (kmi->propvalue);
+ if (kmi->propvalue) ;
else {
- uiDefBlockBut(block, operator_search_menu, kmi, "", xstart, (int)te->ys+1, butw1, UI_UNIT_Y-1, "Assign new Operator");
+ uiDefBlockBut(block, operator_search_menu, kmi, "", xstart, (int)te->ys + 1, butw1, UI_UNIT_Y - 1, "Assign new Operator");
}
- xstart+= butw1+10;
+ xstart += butw1 + 10;
/* map type button */
- kmi->maptype= keymap_menu_type(kmi->type);
+ kmi->maptype = keymap_menu_type(kmi->type);
- str= keymap_type_menu();
- but = uiDefButS(block, MENU, 0, str, xstart, (int)te->ys+1, butw2, UI_UNIT_Y-1, &kmi->maptype, 0, 0, 0, 0, "Event type");
+ str = keymap_type_menu();
+ but = uiDefButS(block, MENU, 0, str, xstart, (int)te->ys + 1, butw2, UI_UNIT_Y - 1, &kmi->maptype, 0, 0, 0, 0, "Event type");
uiButSetFunc(but, keymap_type_cb, kmi, NULL);
- xstart+= butw2+5;
+ xstart += butw2 + 5;
/* edit actual event */
- switch(kmi->maptype) {
+ switch (kmi->maptype) {
case OL_KM_KEYBOARD:
- uiDefKeyevtButS(block, 0, "", xstart, (int)te->ys+1, butw2, UI_UNIT_Y-1, &kmi->type, "Key code");
- xstart+= butw2+5;
+ uiDefKeyevtButS(block, 0, "", xstart, (int)te->ys + 1, butw2, UI_UNIT_Y - 1, &kmi->type, "Key code");
+ xstart += butw2 + 5;
break;
case OL_KM_MOUSE:
- str= keymap_mouse_menu();
- uiDefButS(block, MENU, 0, str, xstart,(int)te->ys+1, butw2, UI_UNIT_Y-1, &kmi->type, 0, 0, 0, 0, "Mouse button");
- xstart+= butw2+5;
+ str = keymap_mouse_menu();
+ uiDefButS(block, MENU, 0, str, xstart, (int)te->ys + 1, butw2, UI_UNIT_Y - 1, &kmi->type, 0, 0, 0, 0, "Mouse button");
+ xstart += butw2 + 5;
break;
case OL_KM_TWEAK:
- str= keymap_tweak_menu();
- uiDefButS(block, MENU, 0, str, xstart, (int)te->ys+1, butw2, UI_UNIT_Y-1, &kmi->type, 0, 0, 0, 0, "Tweak gesture");
- xstart+= butw2+5;
- str= keymap_tweak_dir_menu();
- uiDefButS(block, MENU, 0, str, xstart, (int)te->ys+1, butw2, UI_UNIT_Y-1, &kmi->val, 0, 0, 0, 0, "Tweak gesture direction");
- xstart+= butw2+5;
+ str = keymap_tweak_menu();
+ uiDefButS(block, MENU, 0, str, xstart, (int)te->ys + 1, butw2, UI_UNIT_Y - 1, &kmi->type, 0, 0, 0, 0, "Tweak gesture");
+ xstart += butw2 + 5;
+ str = keymap_tweak_dir_menu();
+ uiDefButS(block, MENU, 0, str, xstart, (int)te->ys + 1, butw2, UI_UNIT_Y - 1, &kmi->val, 0, 0, 0, 0, "Tweak gesture direction");
+ xstart += butw2 + 5;
break;
}
/* modifiers */
- uiDefButS(block, OPTION, 0, "Shift", xstart, (int)te->ys+1, butw3+5, UI_UNIT_Y-1, &kmi->shift, 0, 0, 0, 0, "Modifier"); xstart+= butw3+5;
- uiDefButS(block, OPTION, 0, "Ctrl", xstart, (int)te->ys+1, butw3, UI_UNIT_Y-1, &kmi->ctrl, 0, 0, 0, 0, "Modifier"); xstart+= butw3;
- uiDefButS(block, OPTION, 0, "Alt", xstart, (int)te->ys+1, butw3, UI_UNIT_Y-1, &kmi->alt, 0, 0, 0, 0, "Modifier"); xstart+= butw3;
- uiDefButS(block, OPTION, 0, "OS", xstart, (int)te->ys+1, butw3, UI_UNIT_Y-1, &kmi->oskey, 0, 0, 0, 0, "Modifier"); xstart+= butw3;
- xstart+= 5;
- uiDefKeyevtButS(block, 0, "", xstart, (int)te->ys+1, butw3, UI_UNIT_Y-1, &kmi->keymodifier, "Key Modifier code");
- xstart+= butw3+5;
+ uiDefButS(block, OPTION, 0, "Shift", xstart, (int)te->ys + 1, butw3 + 5, UI_UNIT_Y - 1, &kmi->shift, 0, 0, 0, 0, "Modifier"); xstart += butw3 + 5;
+ uiDefButS(block, OPTION, 0, "Ctrl", xstart, (int)te->ys + 1, butw3, UI_UNIT_Y - 1, &kmi->ctrl, 0, 0, 0, 0, "Modifier"); xstart += butw3;
+ uiDefButS(block, OPTION, 0, "Alt", xstart, (int)te->ys + 1, butw3, UI_UNIT_Y - 1, &kmi->alt, 0, 0, 0, 0, "Modifier"); xstart += butw3;
+ uiDefButS(block, OPTION, 0, "OS", xstart, (int)te->ys + 1, butw3, UI_UNIT_Y - 1, &kmi->oskey, 0, 0, 0, 0, "Modifier"); xstart += butw3;
+ xstart += 5;
+ uiDefKeyevtButS(block, 0, "", xstart, (int)te->ys + 1, butw3, UI_UNIT_Y - 1, &kmi->keymodifier, "Key Modifier code");
+ xstart += butw3 + 5;
/* rna property */
if (kmi->ptr && kmi->ptr->data) {
- uiDefBut(block, LABEL, 0, "(RNA property)", xstart, (int)te->ys+1, butw2, UI_UNIT_Y-1, &kmi->oskey, 0, 0, 0, 0, ""); xstart+= butw2;
+ uiDefBut(block, LABEL, 0, "(RNA property)", xstart, (int)te->ys + 1, butw2, UI_UNIT_Y - 1, &kmi->oskey, 0, 0, 0, 0, ""); xstart += butw2;
}
(void)xstart;
}
}
- if (TSELEM_OPEN(tselem,soops)) outliner_draw_keymapbuts(block, ar, soops, &te->subtree);
+ if (TSELEM_OPEN(tselem, soops)) outliner_draw_keymapbuts(block, ar, soops, &te->subtree);
}
}
@@ -846,38 +826,38 @@ static void outliner_buttons(const bContext *C, uiBlock *block, ARegion *ar, Spa
TreeStoreElem *tselem;
int spx, dx, len;
- for (te= lb->first; te; te= te->next) {
- tselem= TREESTORE(te);
- if (te->ys+2*UI_UNIT_Y >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) {
+ for (te = lb->first; te; te = te->next) {
+ tselem = TREESTORE(te);
+ if (te->ys + 2 * UI_UNIT_Y >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) {
if (tselem->flag & TSE_TEXTBUT) {
/* If we add support to rename Sequence.
* need change this.
*/
- if (tselem->type == TSE_POSE_BASE) continue; // prevent crash when trying to rename 'pose' entry of armature
+ if (tselem->type == TSE_POSE_BASE) continue; // prevent crash when trying to rename 'pose' entry of armature
- if (tselem->type==TSE_EBONE) len = sizeof(((EditBone*) 0)->name);
- else if (tselem->type==TSE_MODIFIER) len = sizeof(((ModifierData*) 0)->name);
- else if (tselem->id && GS(tselem->id->name)==ID_LI) len = sizeof(((Library*) 0)->name);
- else len= MAX_ID_NAME-2;
+ if (tselem->type == TSE_EBONE) len = sizeof(((EditBone *) 0)->name);
+ else if (tselem->type == TSE_MODIFIER) len = sizeof(((ModifierData *) 0)->name);
+ else if (tselem->id && GS(tselem->id->name) == ID_LI) len = sizeof(((Library *) 0)->name);
+ else len = MAX_ID_NAME - 2;
- dx= (int)UI_GetStringWidth(te->name);
- if (dx<100) dx= 100;
- spx=te->xs+2*UI_UNIT_X-4;
- if (spx+dx+10>ar->v2d.cur.xmax) dx = ar->v2d.cur.xmax-spx-10;
+ dx = (int)UI_GetStringWidth(te->name);
+ if (dx < 100) dx = 100;
+ spx = te->xs + 2 * UI_UNIT_X - 4;
+ if (spx + dx + 10 > ar->v2d.cur.xmax) dx = ar->v2d.cur.xmax - spx - 10;
- bt= uiDefBut(block, TEX, OL_NAMEBUTTON, "", spx, (int)te->ys, dx+10, UI_UNIT_Y-1, (void *)te->name, 1.0, (float)len, 0, 0, "");
+ bt = uiDefBut(block, TEX, OL_NAMEBUTTON, "", spx, (int)te->ys, dx + 10, UI_UNIT_Y - 1, (void *)te->name, 1.0, (float)len, 0, 0, "");
uiButSetRenameFunc(bt, namebutton_cb, tselem);
/* returns false if button got removed */
- if ( 0 == uiButActiveOnly(C, block, bt) )
+ if (0 == uiButActiveOnly(C, block, bt) )
tselem->flag &= ~TSE_TEXTBUT;
}
}
- if (TSELEM_OPEN(tselem,soops)) outliner_buttons(C, block, ar, soops, &te->subtree);
+ if (TSELEM_OPEN(tselem, soops)) outliner_buttons(C, block, ar, soops, &te->subtree);
}
}
@@ -902,8 +882,8 @@ static void tselem_draw_icon_uibut(struct DrawIconArg *arg, int icon)
}
else {
/* XXX investigate: button placement of icons is way different than UI_icon_draw? */
- float ufac= UI_UNIT_X/20.0f;
- uiBut *but = uiDefIconBut(arg->block, LABEL, 0, icon, arg->x-3.0f*ufac, arg->y, UI_UNIT_X-4.0f*ufac, UI_UNIT_Y-4.0f*ufac, NULL, 0.0, 0.0, 1.0, arg->alpha, (arg->id && arg->id->lib) ? arg->id->lib->name : "");
+ float ufac = UI_UNIT_X / 20.0f;
+ uiBut *but = uiDefIconBut(arg->block, LABEL, 0, icon, arg->x - 3.0f * ufac, arg->y, UI_UNIT_X - 4.0f * ufac, UI_UNIT_Y - 4.0f * ufac, NULL, 0.0, 0.0, 1.0, arg->alpha, (arg->id && arg->id->lib) ? arg->id->lib->name : "");
if (arg->id)
uiButSetDragID(but, arg->id);
@@ -916,15 +896,15 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto
struct DrawIconArg arg;
/* make function calls a bit compacter */
- arg.block= block;
- arg.id= tselem->id;
+ arg.block = block;
+ arg.id = tselem->id;
arg.xmax = xmax;
- arg.x= x;
- arg.y= y;
- arg.alpha= alpha;
+ arg.x = x;
+ arg.y = y;
+ arg.alpha = alpha;
if (tselem->type) {
- switch( tselem->type) {
+ switch (tselem->type) {
case TSE_ANIM_DATA:
UI_icon_draw(x, y, ICON_ANIM_DATA); break; // xxx
case TSE_NLA:
@@ -950,9 +930,9 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto
UI_icon_draw(x, y, ICON_PARTICLES); break;
case TSE_MODIFIER:
{
- Object *ob= (Object *)tselem->id;
- ModifierData *md= BLI_findlink(&ob->modifiers, tselem->nr);
- switch(md->type) {
+ Object *ob = (Object *)tselem->id;
+ ModifierData *md = BLI_findlink(&ob->modifiers, tselem->nr);
+ switch (md->type) {
case eModifierType_Subsurf:
UI_icon_draw(x, y, ICON_MOD_SUBSURF); break;
case eModifierType_Armature:
@@ -1053,15 +1033,15 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto
case TSE_POSEGRP_BASE:
UI_icon_draw(x, y, ICON_VERTEXSEL); break;
case TSE_SEQUENCE:
- if (te->idcode==SEQ_MOVIE)
+ if (te->idcode == SEQ_MOVIE)
UI_icon_draw(x, y, ICON_SEQUENCE);
- else if (te->idcode==SEQ_META)
+ else if (te->idcode == SEQ_META)
UI_icon_draw(x, y, ICON_DOT);
- else if (te->idcode==SEQ_SCENE)
+ else if (te->idcode == SEQ_SCENE)
UI_icon_draw(x, y, ICON_SCENE);
- else if (te->idcode==SEQ_SOUND)
+ else if (te->idcode == SEQ_SOUND)
UI_icon_draw(x, y, ICON_SOUND);
- else if (te->idcode==SEQ_IMAGE)
+ else if (te->idcode == SEQ_IMAGE)
UI_icon_draw(x, y, ICON_IMAGE_COL);
else
UI_icon_draw(x, y, ICON_PARTICLES);
@@ -1074,7 +1054,7 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto
break;
case TSE_RNA_STRUCT:
if (RNA_struct_is_ID(te->rnaptr.type)) {
- arg.id= (ID *)te->rnaptr.data;
+ arg.id = (ID *)te->rnaptr.data;
tselem_draw_icon_uibut(&arg, RNA_struct_ui_icon(te->rnaptr.type));
}
else
@@ -1085,7 +1065,7 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto
}
}
else if (GS(tselem->id->name) == ID_OB) {
- Object *ob= (Object *)tselem->id;
+ Object *ob = (Object *)tselem->id;
switch (ob->type) {
case OB_LAMP:
tselem_draw_icon_uibut(&arg, ICON_OUTLINER_OB_LAMP); break;
@@ -1113,7 +1093,7 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto
}
}
else {
- switch( GS(tselem->id->name)) {
+ switch (GS(tselem->id->name)) {
case ID_SCE:
tselem_draw_icon_uibut(&arg, ICON_SCENE_DATA); break;
case ID_ME:
@@ -1126,9 +1106,9 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto
tselem_draw_icon_uibut(&arg, ICON_OUTLINER_DATA_LATTICE); break;
case ID_LA:
{
- Lamp *la= (Lamp *)tselem->id;
+ Lamp *la = (Lamp *)tselem->id;
- switch(la->type) {
+ switch (la->type) {
case LA_LOCAL:
tselem_draw_icon_uibut(&arg, ICON_LAMP_POINT); break;
case LA_SUN:
@@ -1181,46 +1161,46 @@ static void outliner_draw_iconrow(bContext *C, uiBlock *block, Scene *scene, Spa
TreeStoreElem *tselem;
int active;
- for (te= lb->first; te; te= te->next) {
+ for (te = lb->first; te; te = te->next) {
/* exit drawing early */
if ((*offsx) - UI_UNIT_X > xmax)
break;
- tselem= TREESTORE(te);
+ tselem = TREESTORE(te);
/* object hierarchy always, further constrained on level */
- if (level<1 || (tselem->type==0 && te->idcode==ID_OB)) {
+ if (level < 1 || (tselem->type == 0 && te->idcode == ID_OB)) {
/* active blocks get white circle */
- if (tselem->type==0) {
- if (te->idcode==ID_OB) active= (OBACT==(Object *)tselem->id);
- else if (scene->obedit && scene->obedit->data==tselem->id) active= 1; // XXX use context?
- else active= tree_element_active(C, scene, soops, te, 0);
+ if (tselem->type == 0) {
+ if (te->idcode == ID_OB) active = (OBACT == (Object *)tselem->id);
+ else if (scene->obedit && scene->obedit->data == tselem->id) active = 1; // XXX use context?
+ else active = tree_element_active(C, scene, soops, te, 0);
}
- else active= tree_element_type_active(NULL, scene, soops, te, tselem, 0);
+ else active = tree_element_type_active(NULL, scene, soops, te, tselem, 0);
if (active) {
- float ufac= UI_UNIT_X/20.0f;
+ float ufac = UI_UNIT_X / 20.0f;
uiSetRoundBox(UI_CNR_ALL);
glColor4ub(255, 255, 255, 100);
- uiRoundBox( (float)*offsx-0.5f*ufac, (float)ys-1.0f*ufac, (float)*offsx+UI_UNIT_Y-3.0f*ufac, (float)ys+UI_UNIT_Y-3.0f*ufac, UI_UNIT_Y/2.0f-2.0f*ufac);
+ uiRoundBox((float) *offsx - 0.5f * ufac, (float)ys - 1.0f * ufac, (float)*offsx + UI_UNIT_Y - 3.0f * ufac, (float)ys + UI_UNIT_Y - 3.0f * ufac, UI_UNIT_Y / 2.0f - 2.0f * ufac);
glEnable(GL_BLEND); /* roundbox disables */
}
tselem_draw_icon(block, xmax, (float)*offsx, (float)ys, tselem, te, 0.5f);
- te->xs= (float)*offsx;
- te->ys= (float)ys;
- te->xend= (short)*offsx+UI_UNIT_X;
- te->flag |= TE_ICONROW; // for click
+ te->xs = (float)*offsx;
+ te->ys = (float)ys;
+ te->xend = (short)*offsx + UI_UNIT_X;
+ te->flag |= TE_ICONROW; // for click
(*offsx) += UI_UNIT_X;
}
/* this tree element always has same amount of branches, so don't draw */
- if (tselem->type!=TSE_R_LAYER)
- outliner_draw_iconrow(C, block, scene, soops, &te->subtree, level+1, xmax, offsx, ys);
+ if (tselem->type != TSE_R_LAYER)
+ outliner_draw_iconrow(C, block, scene, soops, &te->subtree, level + 1, xmax, offsx, ys);
}
}
@@ -1231,11 +1211,11 @@ static void outliner_set_coord_tree_element(SpaceOops *soops, TreeElement *te, i
TreeElement *ten;
/* store coord and continue, we need coordinates for elements outside view too */
- te->xs= (float)startx;
- te->ys= (float)(*starty);
+ te->xs = (float)startx;
+ te->ys = (float)(*starty);
- for (ten= te->subtree.first; ten; ten= ten->next) {
- outliner_set_coord_tree_element(soops, ten, startx+UI_UNIT_X, starty);
+ for (ten = te->subtree.first; ten; ten = ten->next) {
+ outliner_set_coord_tree_element(soops, ten, startx + UI_UNIT_X, starty);
}
}
@@ -1244,17 +1224,17 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene
{
TreeElement *ten;
TreeStoreElem *tselem;
- float ufac= UI_UNIT_X/20.0f;
- int offsx= 0, active=0; // active=1 active obj, else active data
+ float ufac = UI_UNIT_X / 20.0f;
+ int offsx = 0, active = 0; // active=1 active obj, else active data
- tselem= TREESTORE(te);
+ tselem = TREESTORE(te);
- if (*starty+2*UI_UNIT_Y >= ar->v2d.cur.ymin && *starty<= ar->v2d.cur.ymax) {
- int xmax= ar->v2d.cur.xmax;
+ if (*starty + 2 * UI_UNIT_Y >= ar->v2d.cur.ymin && *starty <= ar->v2d.cur.ymax) {
+ int xmax = ar->v2d.cur.xmax;
/* icons can be ui buts, we don't want it to overlap with restrict */
- if ((soops->flag & SO_HIDE_RESTRICTCOLS)==0)
- xmax-= OL_TOGW+UI_UNIT_X;
+ if ((soops->flag & SO_HIDE_RESTRICTCOLS) == 0)
+ xmax -= OL_TOGW + UI_UNIT_X;
glEnable(GL_BLEND);
@@ -1262,149 +1242,149 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene
* we don't expand items when searching in the datablocks but we
* still want to highlight any filter matches.
*/
- if ( (SEARCHING_OUTLINER(soops) || (soops->outlinevis==SO_DATABLOCKS && soops->search_string[0]!=0)) &&
- (tselem->flag & TSE_SEARCHMATCH))
+ if ( (SEARCHING_OUTLINER(soops) || (soops->outlinevis == SO_DATABLOCKS && soops->search_string[0] != 0)) &&
+ (tselem->flag & TSE_SEARCHMATCH))
{
char col[4];
UI_GetThemeColorType4ubv(TH_MATCH, SPACE_OUTLINER, col);
- col[3]=100;
+ col[3] = 100;
glColor4ubv((GLubyte *)col);
- glRecti(startx, *starty+1, ar->v2d.cur.xmax, *starty+UI_UNIT_Y-1);
+ glRecti(startx, *starty + 1, ar->v2d.cur.xmax, *starty + UI_UNIT_Y - 1);
}
/* colors for active/selected data */
- if (tselem->type==0) {
- if (te->idcode==ID_SCE) {
+ if (tselem->type == 0) {
+ if (te->idcode == ID_SCE) {
if (tselem->id == (ID *)scene) {
glColor4ub(255, 255, 255, 100);
- active= 2;
+ active = 2;
}
}
- else if (te->idcode==ID_GR) {
+ else if (te->idcode == ID_GR) {
Group *gr = (Group *)tselem->id;
if (group_select_flag(gr)) {
char col[4];
UI_GetThemeColorType4ubv(TH_SELECT, SPACE_VIEW3D, col);
- col[3]= 100;
+ col[3] = 100;
glColor4ubv((GLubyte *)col);
- active= 2;
+ active = 2;
}
}
- else if (te->idcode==ID_OB) {
- Object *ob= (Object *)tselem->id;
+ else if (te->idcode == ID_OB) {
+ Object *ob = (Object *)tselem->id;
- if (ob==OBACT || (ob->flag & SELECT)) {
- char col[4]= {0, 0, 0, 0};
+ if (ob == OBACT || (ob->flag & SELECT)) {
+ char col[4] = {0, 0, 0, 0};
/* outliner active ob: always white text, circle color now similar to view3d */
- active= 2; /* means it draws a color circle */
- if (ob==OBACT) {
+ active = 2; /* means it draws a color circle */
+ if (ob == OBACT) {
if (ob->flag & SELECT) {
UI_GetThemeColorType4ubv(TH_ACTIVE, SPACE_VIEW3D, col);
- col[3]= 100;
+ col[3] = 100;
}
- active= 1; /* means it draws white text */
+ active = 1; /* means it draws white text */
}
else if (ob->flag & SELECT) {
UI_GetThemeColorType4ubv(TH_SELECT, SPACE_VIEW3D, col);
- col[3]= 100;
+ col[3] = 100;
}
glColor4ubv((GLubyte *)col);
}
}
- else if (scene->obedit && scene->obedit->data==tselem->id) {
+ else if (scene->obedit && scene->obedit->data == tselem->id) {
glColor4ub(255, 255, 255, 100);
- active= 2;
+ active = 2;
}
else {
if (tree_element_active(C, scene, soops, te, 0)) {
glColor4ub(220, 220, 255, 100);
- active= 2;
+ active = 2;
}
}
}
else {
- if ( tree_element_type_active(NULL, scene, soops, te, tselem, 0) ) active= 2;
+ if (tree_element_type_active(NULL, scene, soops, te, tselem, 0) ) active = 2;
glColor4ub(220, 220, 255, 100);
}
/* active circle */
if (active) {
uiSetRoundBox(UI_CNR_ALL);
- uiRoundBox( (float)startx+UI_UNIT_Y-1.5f*ufac, (float)*starty+2.0f*ufac, (float)startx+2.0f*UI_UNIT_Y-4.0f*ufac, (float)*starty+UI_UNIT_Y-1.0f*ufac, UI_UNIT_Y/2.0f-2.0f*ufac);
- glEnable(GL_BLEND); /* roundbox disables it */
+ uiRoundBox((float)startx + UI_UNIT_Y - 1.5f * ufac, (float)*starty + 2.0f * ufac, (float)startx + 2.0f * UI_UNIT_Y - 4.0f * ufac, (float)*starty + UI_UNIT_Y - 1.0f * ufac, UI_UNIT_Y / 2.0f - 2.0f * ufac);
+ glEnable(GL_BLEND); /* roundbox disables it */
te->flag |= TE_ACTIVE; // for lookup in display hierarchies
}
/* open/close icon, only when sublevels, except for scene */
- if (te->subtree.first || (tselem->type==0 && te->idcode==ID_SCE) || (te->flag & TE_LAZY_CLOSED)) {
+ if (te->subtree.first || (tselem->type == 0 && te->idcode == ID_SCE) || (te->flag & TE_LAZY_CLOSED)) {
int icon_x;
- if (tselem->type==0 && ELEM(te->idcode, ID_OB, ID_SCE))
+ if (tselem->type == 0 && ELEM(te->idcode, ID_OB, ID_SCE))
icon_x = startx;
else
- icon_x = startx+5*ufac;
+ icon_x = startx + 5 * ufac;
- // icons a bit higher
- if (TSELEM_OPEN(tselem,soops))
- UI_icon_draw((float)icon_x, (float)*starty+2*ufac, ICON_DISCLOSURE_TRI_DOWN);
+ // icons a bit higher
+ if (TSELEM_OPEN(tselem, soops))
+ UI_icon_draw((float)icon_x, (float)*starty + 2 * ufac, ICON_DISCLOSURE_TRI_DOWN);
else
- UI_icon_draw((float)icon_x, (float)*starty+2*ufac, ICON_DISCLOSURE_TRI_RIGHT);
+ UI_icon_draw((float)icon_x, (float)*starty + 2 * ufac, ICON_DISCLOSURE_TRI_RIGHT);
}
- offsx+= UI_UNIT_X;
+ offsx += UI_UNIT_X;
/* datatype icon */
if (!(ELEM(tselem->type, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM))) {
// icons a bit higher
- tselem_draw_icon(block, xmax, (float)startx+offsx - 0.5f*ufac, (float)*starty+2.0f*ufac, tselem, te, 1.0f);
+ tselem_draw_icon(block, xmax, (float)startx + offsx - 0.5f * ufac, (float)*starty + 2.0f * ufac, tselem, te, 1.0f);
- offsx+= UI_UNIT_X;
+ offsx += UI_UNIT_X;
}
else
- offsx+= 2*ufac;
+ offsx += 2 * ufac;
- if (tselem->type==0 && tselem->id->lib) {
+ if (tselem->type == 0 && tselem->id->lib) {
glPixelTransferf(GL_ALPHA_SCALE, 0.5f);
if (tselem->id->flag & LIB_INDIRECT)
- UI_icon_draw((float)startx+offsx, (float)*starty+2*ufac, ICON_LIBRARY_DATA_INDIRECT);
+ UI_icon_draw((float)startx + offsx, (float)*starty + 2 * ufac, ICON_LIBRARY_DATA_INDIRECT);
else
- UI_icon_draw((float)startx+offsx, (float)*starty+2*ufac, ICON_LIBRARY_DATA_DIRECT);
+ UI_icon_draw((float)startx + offsx, (float)*starty + 2 * ufac, ICON_LIBRARY_DATA_DIRECT);
glPixelTransferf(GL_ALPHA_SCALE, 1.0f);
- offsx+= UI_UNIT_X;
+ offsx += UI_UNIT_X;
}
glDisable(GL_BLEND);
/* name */
- if (active==1) UI_ThemeColor(TH_TEXT_HI);
+ if (active == 1) UI_ThemeColor(TH_TEXT_HI);
else if (ELEM(tselem->type, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM)) UI_ThemeColorBlend(TH_BACK, TH_TEXT, 0.75f);
else UI_ThemeColor(TH_TEXT);
- UI_DrawString(startx+offsx, *starty+5*ufac, te->name);
+ UI_DrawString(startx + offsx, *starty + 5 * ufac, te->name);
- offsx+= (int)(UI_UNIT_X + UI_GetStringWidth(te->name));
+ offsx += (int)(UI_UNIT_X + UI_GetStringWidth(te->name));
/* closed item, we draw the icons, not when it's a scene, or master-server list though */
- if (!TSELEM_OPEN(tselem,soops)) {
+ if (!TSELEM_OPEN(tselem, soops)) {
if (te->subtree.first) {
- if (tselem->type==0 && te->idcode==ID_SCE);
- else if (tselem->type!=TSE_R_LAYER) { /* this tree element always has same amount of branches, so don't draw */
- int tempx= startx+offsx;
+ if (tselem->type == 0 && te->idcode == ID_SCE) ;
+ else if (tselem->type != TSE_R_LAYER) { /* this tree element always has same amount of branches, so don't draw */
+ int tempx = startx + offsx;
// divider
UI_ThemeColorShade(TH_BACK, -40);
- glRecti(tempx -10, *starty+4, tempx -8, *starty+UI_UNIT_Y-4);
+ glRecti(tempx - 10, *starty + 4, tempx - 8, *starty + UI_UNIT_Y - 4);
glEnable(GL_BLEND);
glPixelTransferf(GL_ALPHA_SCALE, 0.5);
- outliner_draw_iconrow(C, block, scene, soops, &te->subtree, 0, xmax, &tempx, *starty+2);
+ outliner_draw_iconrow(C, block, scene, soops, &te->subtree, 0, xmax, &tempx, *starty + 2);
glPixelTransferf(GL_ALPHA_SCALE, 1.0);
glDisable(GL_BLEND);
@@ -1413,21 +1393,21 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene
}
}
/* store coord and continue, we need coordinates for elements outside view too */
- te->xs= (float)startx;
- te->ys= (float)*starty;
- te->xend= startx+offsx;
+ te->xs = (float)startx;
+ te->ys = (float)*starty;
+ te->xend = startx + offsx;
- if (TSELEM_OPEN(tselem,soops)) {
- *starty-= UI_UNIT_Y;
+ if (TSELEM_OPEN(tselem, soops)) {
+ *starty -= UI_UNIT_Y;
- for (ten= te->subtree.first; ten; ten= ten->next)
- outliner_draw_tree_element(C, block, scene, ar, soops, ten, startx+UI_UNIT_X, starty);
+ for (ten = te->subtree.first; ten; ten = ten->next)
+ outliner_draw_tree_element(C, block, scene, ar, soops, ten, startx + UI_UNIT_X, starty);
}
else {
- for (ten= te->subtree.first; ten; ten= ten->next)
+ for (ten = te->subtree.first; ten; ten = ten->next)
outliner_set_coord_tree_element(soops, te, startx, starty);
- *starty-= UI_UNIT_Y;
+ *starty -= UI_UNIT_Y;
}
}
@@ -1437,30 +1417,30 @@ static void outliner_draw_hierarchy(SpaceOops *soops, ListBase *lb, int startx,
TreeStoreElem *tselem;
int y1, y2;
- if (lb->first==NULL) return;
+ if (lb->first == NULL) return;
- y1=y2= *starty; /* for vertical lines between objects */
- for (te=lb->first; te; te= te->next) {
- y2= *starty;
- tselem= TREESTORE(te);
+ y1 = y2 = *starty; /* for vertical lines between objects */
+ for (te = lb->first; te; te = te->next) {
+ y2 = *starty;
+ tselem = TREESTORE(te);
/* horizontal line? */
- if (tselem->type==0 && (te->idcode==ID_OB || te->idcode==ID_SCE))
- glRecti(startx, *starty, startx+UI_UNIT_X, *starty-1);
+ if (tselem->type == 0 && (te->idcode == ID_OB || te->idcode == ID_SCE))
+ glRecti(startx, *starty, startx + UI_UNIT_X, *starty - 1);
- *starty-= UI_UNIT_Y;
+ *starty -= UI_UNIT_Y;
- if (TSELEM_OPEN(tselem,soops))
- outliner_draw_hierarchy(soops, &te->subtree, startx+UI_UNIT_X, starty);
+ if (TSELEM_OPEN(tselem, soops))
+ outliner_draw_hierarchy(soops, &te->subtree, startx + UI_UNIT_X, starty);
}
/* vertical line */
- te= lb->last;
- if (te->parent || lb->first!=lb->last) {
- tselem= TREESTORE(te);
- if (tselem->type==0 && te->idcode==ID_OB) {
+ te = lb->last;
+ if (te->parent || lb->first != lb->last) {
+ tselem = TREESTORE(te);
+ if (tselem->type == 0 && te->idcode == ID_OB) {
- glRecti(startx, y1+UI_UNIT_Y, startx+1, y2);
+ glRecti(startx, y1 + UI_UNIT_Y, startx + 1, y2);
}
}
}
@@ -1470,19 +1450,19 @@ static void outliner_draw_struct_marks(ARegion *ar, SpaceOops *soops, ListBase *
TreeElement *te;
TreeStoreElem *tselem;
- for (te= lb->first; te; te= te->next) {
- tselem= TREESTORE(te);
+ for (te = lb->first; te; te = te->next) {
+ tselem = TREESTORE(te);
/* selection status */
- if (TSELEM_OPEN(tselem,soops))
+ if (TSELEM_OPEN(tselem, soops))
if (tselem->type == TSE_RNA_STRUCT)
- glRecti(0, *starty+1, (int)ar->v2d.cur.xmax+V2D_SCROLL_WIDTH, *starty+UI_UNIT_Y-1);
+ glRecti(0, *starty + 1, (int)ar->v2d.cur.xmax + V2D_SCROLL_WIDTH, *starty + UI_UNIT_Y - 1);
- *starty-= UI_UNIT_Y;
- if (TSELEM_OPEN(tselem,soops)) {
+ *starty -= UI_UNIT_Y;
+ if (TSELEM_OPEN(tselem, soops)) {
outliner_draw_struct_marks(ar, soops, &te->subtree, starty);
if (tselem->type == TSE_RNA_STRUCT)
- fdrawline(0, (float)*starty+UI_UNIT_Y, ar->v2d.cur.xmax+V2D_SCROLL_WIDTH, (float)*starty+UI_UNIT_Y);
+ fdrawline(0, (float)*starty + UI_UNIT_Y, ar->v2d.cur.xmax + V2D_SCROLL_WIDTH, (float)*starty + UI_UNIT_Y);
}
}
}
@@ -1492,15 +1472,15 @@ static void outliner_draw_selection(ARegion *ar, SpaceOops *soops, ListBase *lb,
TreeElement *te;
TreeStoreElem *tselem;
- for (te= lb->first; te; te= te->next) {
- tselem= TREESTORE(te);
+ for (te = lb->first; te; te = te->next) {
+ tselem = TREESTORE(te);
/* selection status */
if (tselem->flag & TSE_SELECTED) {
- glRecti(0, *starty+1, (int)ar->v2d.cur.xmax, *starty+UI_UNIT_Y-1);
+ glRecti(0, *starty + 1, (int)ar->v2d.cur.xmax, *starty + UI_UNIT_Y - 1);
}
- *starty-= UI_UNIT_Y;
- if (TSELEM_OPEN(tselem,soops)) outliner_draw_selection(ar, soops, &te->subtree, starty);
+ *starty -= UI_UNIT_Y;
+ if (TSELEM_OPEN(tselem, soops)) outliner_draw_selection(ar, soops, &te->subtree, starty);
}
}
@@ -1517,26 +1497,26 @@ static void outliner_draw_tree(bContext *C, uiBlock *block, Scene *scene, ARegio
/* struct marks */
UI_ThemeColorShadeAlpha(TH_BACK, -15, -200);
//UI_ThemeColorShade(TH_BACK, -20);
- starty= (int)ar->v2d.tot.ymax-UI_UNIT_Y-OL_Y_OFFSET;
+ starty = (int)ar->v2d.tot.ymax - UI_UNIT_Y - OL_Y_OFFSET;
outliner_draw_struct_marks(ar, soops, &soops->tree, &starty);
}
/* always draw selection fill before hierarchy */
UI_GetThemeColor3fv(TH_SELECT_HIGHLIGHT, col);
glColor3fv(col);
- starty= (int)ar->v2d.tot.ymax-UI_UNIT_Y-OL_Y_OFFSET;
+ starty = (int)ar->v2d.tot.ymax - UI_UNIT_Y - OL_Y_OFFSET;
outliner_draw_selection(ar, soops, &soops->tree, &starty);
// grey hierarchy lines
UI_ThemeColorBlend(TH_BACK, TH_TEXT, 0.4f);
- starty= (int)ar->v2d.tot.ymax-UI_UNIT_Y/2-OL_Y_OFFSET;
- startx= 6;
+ starty = (int)ar->v2d.tot.ymax - UI_UNIT_Y / 2 - OL_Y_OFFSET;
+ startx = 6;
outliner_draw_hierarchy(soops, &soops->tree, startx, &starty);
// items themselves
- starty= (int)ar->v2d.tot.ymax-UI_UNIT_Y-OL_Y_OFFSET;
- startx= 0;
- for (te= soops->tree.first; te; te= te->next) {
+ starty = (int)ar->v2d.tot.ymax - UI_UNIT_Y - OL_Y_OFFSET;
+ startx = 0;
+ for (te = soops->tree.first; te; te = te->next) {
outliner_draw_tree_element(C, block, scene, ar, soops, te, startx, &starty);
}
}
@@ -1547,12 +1527,12 @@ static void outliner_back(ARegion *ar)
int ystart;
UI_ThemeColorShade(TH_BACK, 6);
- ystart= (int)ar->v2d.tot.ymax;
- ystart= UI_UNIT_Y*(ystart/(UI_UNIT_Y))-OL_Y_OFFSET;
+ ystart = (int)ar->v2d.tot.ymax;
+ ystart = UI_UNIT_Y * (ystart / (UI_UNIT_Y)) - OL_Y_OFFSET;
- while (ystart+2*UI_UNIT_Y > ar->v2d.cur.ymin) {
- glRecti(0, ystart, (int)ar->v2d.cur.xmax+V2D_SCROLL_WIDTH, ystart+UI_UNIT_Y);
- ystart-= 2*UI_UNIT_Y;
+ while (ystart + 2 * UI_UNIT_Y > ar->v2d.cur.ymin) {
+ glRecti(0, ystart, (int)ar->v2d.cur.xmax + V2D_SCROLL_WIDTH, ystart + UI_UNIT_Y);
+ ystart -= 2 * UI_UNIT_Y;
}
}
@@ -1562,36 +1542,36 @@ static void outliner_draw_restrictcols(ARegion *ar)
/* background underneath */
UI_ThemeColor(TH_BACK);
- glRecti((int)ar->v2d.cur.xmax-OL_TOGW, (int)ar->v2d.cur.ymin-V2D_SCROLL_HEIGHT-1, (int)ar->v2d.cur.xmax+V2D_SCROLL_WIDTH, (int)ar->v2d.cur.ymax);
+ glRecti((int)ar->v2d.cur.xmax - OL_TOGW, (int)ar->v2d.cur.ymin - V2D_SCROLL_HEIGHT - 1, (int)ar->v2d.cur.xmax + V2D_SCROLL_WIDTH, (int)ar->v2d.cur.ymax);
UI_ThemeColorShade(TH_BACK, 6);
- ystart= (int)ar->v2d.tot.ymax;
- ystart= UI_UNIT_Y*(ystart/(UI_UNIT_Y))-OL_Y_OFFSET;
+ ystart = (int)ar->v2d.tot.ymax;
+ ystart = UI_UNIT_Y * (ystart / (UI_UNIT_Y)) - OL_Y_OFFSET;
- while (ystart+2*UI_UNIT_Y > ar->v2d.cur.ymin) {
- glRecti((int)ar->v2d.cur.xmax-OL_TOGW, ystart, (int)ar->v2d.cur.xmax, ystart+UI_UNIT_Y);
- ystart-= 2*UI_UNIT_Y;
+ while (ystart + 2 * UI_UNIT_Y > ar->v2d.cur.ymin) {
+ glRecti((int)ar->v2d.cur.xmax - OL_TOGW, ystart, (int)ar->v2d.cur.xmax, ystart + UI_UNIT_Y);
+ ystart -= 2 * UI_UNIT_Y;
}
UI_ThemeColorShadeAlpha(TH_BACK, -15, -200);
/* view */
- fdrawline(ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX,
- ar->v2d.cur.ymax,
- ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX,
- ar->v2d.cur.ymin - V2D_SCROLL_HEIGHT);
+ fdrawline(ar->v2d.cur.xmax - OL_TOG_RESTRICT_VIEWX,
+ ar->v2d.cur.ymax,
+ ar->v2d.cur.xmax - OL_TOG_RESTRICT_VIEWX,
+ ar->v2d.cur.ymin - V2D_SCROLL_HEIGHT);
/* render */
- fdrawline(ar->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX,
- ar->v2d.cur.ymax,
- ar->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX,
- ar->v2d.cur.ymin - V2D_SCROLL_HEIGHT);
+ fdrawline(ar->v2d.cur.xmax - OL_TOG_RESTRICT_SELECTX,
+ ar->v2d.cur.ymax,
+ ar->v2d.cur.xmax - OL_TOG_RESTRICT_SELECTX,
+ ar->v2d.cur.ymin - V2D_SCROLL_HEIGHT);
/* render */
- fdrawline(ar->v2d.cur.xmax-OL_TOG_RESTRICT_RENDERX,
- ar->v2d.cur.ymax,
- ar->v2d.cur.xmax-OL_TOG_RESTRICT_RENDERX,
- ar->v2d.cur.ymin - V2D_SCROLL_HEIGHT);
+ fdrawline(ar->v2d.cur.xmax - OL_TOG_RESTRICT_RENDERX,
+ ar->v2d.cur.ymax,
+ ar->v2d.cur.xmax - OL_TOG_RESTRICT_RENDERX,
+ ar->v2d.cur.ymin - V2D_SCROLL_HEIGHT);
}
/* ****************************************************** */
@@ -1599,13 +1579,13 @@ static void outliner_draw_restrictcols(ARegion *ar)
void draw_outliner(const bContext *C)
{
- Main *mainvar= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- ARegion *ar= CTX_wm_region(C);
- View2D *v2d= &ar->v2d;
- SpaceOops *soops= CTX_wm_space_outliner(C);
+ Main *mainvar = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ ARegion *ar = CTX_wm_region(C);
+ View2D *v2d = &ar->v2d;
+ SpaceOops *soops = CTX_wm_space_outliner(C);
uiBlock *block;
- int sizey= 0, sizex= 0, sizex_rna= 0;
+ int sizey = 0, sizex = 0, sizex_rna = 0;
outliner_build_tree(mainvar, scene, soops); // always
@@ -1614,7 +1594,7 @@ void draw_outliner(const bContext *C)
if (ELEM3(soops->outlinevis, SO_DATABLOCKS, SO_USERDEF, SO_KEYMAP)) {
/* RNA has two columns:
- * - column 1 is (max_width + OL_RNA_COL_SPACEX) or
+ * - column 1 is (max_width + OL_RNA_COL_SPACEX) or
* (OL_RNA_COL_X), whichever is wider...
* - column 2 is fixed at OL_RNA_COL_SIZEX
*
@@ -1623,13 +1603,13 @@ void draw_outliner(const bContext *C)
/* get actual width of column 1 */
outliner_rna_width(soops, &soops->tree, &sizex_rna, 0);
- sizex_rna= MAX2(OL_RNA_COLX, sizex_rna+OL_RNA_COL_SPACEX);
+ sizex_rna = MAX2(OL_RNA_COLX, sizex_rna + OL_RNA_COL_SPACEX);
/* get width of data (for setting 'tot' rect, this is column 1 + column 2 + a bit extra) */
if (soops->outlinevis == SO_KEYMAP)
- sizex= sizex_rna + OL_RNA_COL_SIZEX*3 + 50; // XXX this is only really a quick hack to make this wide enough...
+ sizex = sizex_rna + OL_RNA_COL_SIZEX * 3 + 50; // XXX this is only really a quick hack to make this wide enough...
else
- sizex= sizex_rna + OL_RNA_COL_SIZEX + 50;
+ sizex = sizex_rna + OL_RNA_COL_SIZEX + 50;
}
else {
/* width must take into account restriction columns (if visible) so that entries will still be visible */
@@ -1638,8 +1618,8 @@ void draw_outliner(const bContext *C)
/* constant offset for restriction columns */
// XXX this isn't that great yet...
- if ((soops->flag & SO_HIDE_RESTRICTCOLS)==0)
- sizex += OL_TOGW*3;
+ if ((soops->flag & SO_HIDE_RESTRICTCOLS) == 0)
+ sizex += OL_TOGW * 3;
}
/* tweak to display last line (when list bigger than window) */
@@ -1652,13 +1632,13 @@ void draw_outliner(const bContext *C)
UI_view2d_totRect_set(v2d, sizex, sizey);
/* force display to pixel coords */
- v2d->flag |= (V2D_PIXELOFS_X|V2D_PIXELOFS_Y);
+ v2d->flag |= (V2D_PIXELOFS_X | V2D_PIXELOFS_Y);
/* set matrix for 2d-view controls */
UI_view2d_view_ortho(v2d);
/* draw outliner stuff (background, hierachy lines and names) */
outliner_back(ar);
- block= uiBeginBlock(C, ar, __func__, UI_EMBOSS);
+ block = uiBeginBlock(C, ar, __func__, UI_EMBOSS);
outliner_draw_tree((bContext *)C, block, scene, ar, soops);
if (ELEM(soops->outlinevis, SO_DATABLOCKS, SO_USERDEF)) {
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c
index 981c4a5d867..04e9cbf24c2 100644
--- a/source/blender/editors/space_outliner/outliner_edit.c
+++ b/source/blender/editors/space_outliner/outliner_edit.c
@@ -29,79 +29,39 @@
* \ingroup spoutliner
*/
-#include <math.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stddef.h>
-
#include "MEM_guardedalloc.h"
#include "DNA_anim_types.h"
-#include "DNA_armature_types.h"
-#include "DNA_constraint_types.h"
-#include "DNA_camera_types.h"
#include "DNA_group_types.h"
-#include "DNA_key_types.h"
-#include "DNA_lamp_types.h"
-#include "DNA_material_types.h"
-#include "DNA_mesh_types.h"
-#include "DNA_meta_types.h"
-#include "DNA_particle_types.h"
#include "DNA_scene_types.h"
-#include "DNA_world_types.h"
-#include "DNA_sequence_types.h"
#include "DNA_object_types.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
-#include "BLI_math_base.h"
-
-#if defined WIN32 && !defined _LIBC
-# include "BLI_fnmatch.h" /* use fnmatch included in blenlib */
-#else
-# ifndef _GNU_SOURCE
-# define _GNU_SOURCE
-# endif
-# include <fnmatch.h>
-#endif
#include "BLF_translation.h"
#include "BKE_animsys.h"
#include "BKE_context.h"
-#include "BKE_deform.h"
#include "BKE_depsgraph.h"
-#include "BKE_fcurve.h"
-#include "BKE_global.h"
-#include "BKE_group.h"
#include "BKE_library.h"
#include "BKE_main.h"
-#include "BKE_modifier.h"
#include "BKE_report.h"
#include "BKE_scene.h"
-#include "BKE_sequencer.h"
-#include "ED_armature.h"
#include "ED_object.h"
#include "ED_screen.h"
-#include "ED_util.h"
+#include "ED_keyframing.h"
#include "WM_api.h"
#include "WM_types.h"
-#include "BIF_gl.h"
-#include "BIF_glutil.h"
-
#include "UI_interface.h"
-#include "UI_interface_icons.h"
#include "UI_resources.h"
#include "UI_view2d.h"
#include "RNA_access.h"
#include "RNA_define.h"
-#include "RNA_enum_types.h"
-
-#include "ED_keyframing.h"
#include "outliner_intern.h"
@@ -115,13 +75,13 @@
static int outliner_open_back(SpaceOops *soops, TreeElement *te)
{
TreeStoreElem *tselem;
- int retval= 0;
+ int retval = 0;
- for (te= te->parent; te; te= te->parent) {
- tselem= TREESTORE(te);
+ for (te = te->parent; te; te = te->parent) {
+ tselem = TREESTORE(te);
if (tselem->flag & TSE_CLOSED) {
tselem->flag &= ~TSE_CLOSED;
- retval= 1;
+ retval = 1;
}
}
return retval;
@@ -132,17 +92,17 @@ static void outliner_open_reveal(SpaceOops *soops, ListBase *lb, TreeElement *te
TreeElement *te;
TreeStoreElem *tselem;
- for (te= lb->first; te; te= te->next) {
+ for (te = lb->first; te; te = te->next) {
/* check if this tree-element was the one we're seeking */
if (te == teFind) {
- *found= 1;
+ *found = 1;
return;
}
/* try to see if sub-tree contains it then */
outliner_open_reveal(soops, &te->subtree, teFind, found);
if (*found) {
- tselem= TREESTORE(te);
+ tselem = TREESTORE(te);
if (tselem->flag & TSE_CLOSED)
tselem->flag &= ~TSE_CLOSED;
return;
@@ -159,8 +119,8 @@ static void outliner_open_reveal(SpaceOops *soops, ListBase *lb, TreeElement *te
static int do_outliner_item_openclose(bContext *C, SpaceOops *soops, TreeElement *te, int all, const float mval[2])
{
- if (mval[1]>te->ys && mval[1]<te->ys+UI_UNIT_Y) {
- TreeStoreElem *tselem= TREESTORE(te);
+ if (mval[1] > te->ys && mval[1] < te->ys + UI_UNIT_Y) {
+ TreeStoreElem *tselem = TREESTORE(te);
/* all below close/open? */
if (all) {
@@ -175,7 +135,7 @@ static int do_outliner_item_openclose(bContext *C, SpaceOops *soops, TreeElement
return 1;
}
- for (te= te->subtree.first; te; te= te->next) {
+ for (te = te->subtree.first; te; te = te->next) {
if (do_outliner_item_openclose(C, soops, te, all, mval))
return 1;
}
@@ -186,15 +146,15 @@ static int do_outliner_item_openclose(bContext *C, SpaceOops *soops, TreeElement
/* event can enterkey, then it opens/closes */
static int outliner_item_openclose(bContext *C, wmOperator *op, wmEvent *event)
{
- ARegion *ar= CTX_wm_region(C);
- SpaceOops *soops= CTX_wm_space_outliner(C);
+ ARegion *ar = CTX_wm_region(C);
+ SpaceOops *soops = CTX_wm_space_outliner(C);
TreeElement *te;
float fmval[2];
- int all= RNA_boolean_get(op->ptr, "all");
+ int all = RNA_boolean_get(op->ptr, "all");
- UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], fmval, fmval+1);
+ UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], fmval, fmval + 1);
- for (te= soops->tree.first; te; te= te->next) {
+ for (te = soops->tree.first; te; te = te->next) {
if (do_outliner_item_openclose(C, soops, te, all, fmval))
break;
}
@@ -223,12 +183,12 @@ static void do_item_rename(ARegion *ar, TreeElement *te, TreeStoreElem *tselem,
{
/* can't rename rna datablocks entries */
if (ELEM3(tselem->type, TSE_RNA_STRUCT, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM)) {
- /* do nothing */;
+ /* do nothing */;
}
else if (ELEM10(tselem->type, TSE_ANIM_DATA, TSE_NLA, TSE_DEFGROUP_BASE, TSE_CONSTRAINT_BASE, TSE_MODIFIER_BASE,
- TSE_SCRIPT_BASE, TSE_POSE_BASE, TSE_POSEGRP_BASE, TSE_R_LAYER_BASE, TSE_R_PASS))
+ TSE_SCRIPT_BASE, TSE_POSE_BASE, TSE_POSEGRP_BASE, TSE_R_LAYER_BASE, TSE_R_PASS))
{
- BKE_report(reports, RPT_WARNING, "Cannot edit builtin name");
+ BKE_report(reports, RPT_WARNING, "Cannot edit builtin name");
}
else if (ELEM3(tselem->type, TSE_SEQUENCE, TSE_SEQ_STRIP, TSE_SEQUENCE_DUP)) {
BKE_report(reports, RPT_WARNING, "Cannot edit sequence name");
@@ -247,27 +207,27 @@ static void do_item_rename(ARegion *ar, TreeElement *te, TreeStoreElem *tselem,
void item_rename_cb(bContext *C, Scene *UNUSED(scene), TreeElement *te, TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem)
{
- ARegion *ar= CTX_wm_region(C);
- ReportList *reports= CTX_wm_reports(C); // XXX
+ ARegion *ar = CTX_wm_region(C);
+ ReportList *reports = CTX_wm_reports(C); // XXX
do_item_rename(ar, te, tselem, reports);
}
static int do_outliner_item_rename(bContext *C, ARegion *ar, SpaceOops *soops, TreeElement *te, const float mval[2])
{
- ReportList *reports= CTX_wm_reports(C); // XXX
+ ReportList *reports = CTX_wm_reports(C); // XXX
- if (mval[1]>te->ys && mval[1]<te->ys+UI_UNIT_Y) {
- TreeStoreElem *tselem= TREESTORE(te);
+ if (mval[1] > te->ys && mval[1] < te->ys + UI_UNIT_Y) {
+ TreeStoreElem *tselem = TREESTORE(te);
/* name and first icon */
- if (mval[0]>te->xs+UI_UNIT_X && mval[0]<te->xend) {
+ if (mval[0] > te->xs + UI_UNIT_X && mval[0] < te->xend) {
do_item_rename(ar, te, tselem, reports);
}
return 1;
}
- for (te= te->subtree.first; te; te= te->next) {
+ for (te = te->subtree.first; te; te = te->next) {
if (do_outliner_item_rename(C, ar, soops, te, mval)) return 1;
}
return 0;
@@ -275,14 +235,14 @@ static int do_outliner_item_rename(bContext *C, ARegion *ar, SpaceOops *soops, T
static int outliner_item_rename(bContext *C, wmOperator *UNUSED(op), wmEvent *event)
{
- ARegion *ar= CTX_wm_region(C);
- SpaceOops *soops= CTX_wm_space_outliner(C);
+ ARegion *ar = CTX_wm_region(C);
+ SpaceOops *soops = CTX_wm_space_outliner(C);
TreeElement *te;
float fmval[2];
- UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], fmval, fmval+1);
+ UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], fmval, fmval + 1);
- for (te= soops->tree.first; te; te= te->next) {
+ for (te = soops->tree.first; te; te = te->next) {
if (do_outliner_item_rename(C, ar, soops, te, fmval)) break;
}
@@ -312,12 +272,12 @@ void OUTLINER_OT_item_rename(wmOperatorType *ot)
static int outliner_count_levels(SpaceOops *soops, ListBase *lb, int curlevel)
{
TreeElement *te;
- int level=curlevel, lev;
+ int level = curlevel, lev;
- for (te= lb->first; te; te= te->next) {
+ for (te = lb->first; te; te = te->next) {
- lev= outliner_count_levels(soops, &te->subtree, curlevel+1);
- if (lev>level) level= lev;
+ lev = outliner_count_levels(soops, &te->subtree, curlevel + 1);
+ if (lev > level) level = lev;
}
return level;
}
@@ -328,11 +288,11 @@ int outliner_has_one_flag(SpaceOops *soops, ListBase *lb, short flag, short curl
TreeStoreElem *tselem;
int level;
- for (te= lb->first; te; te= te->next) {
- tselem= TREESTORE(te);
+ for (te = lb->first; te; te = te->next) {
+ tselem = TREESTORE(te);
if (tselem->flag & flag) return curlevel;
- level= outliner_has_one_flag(soops, &te->subtree, flag, curlevel+1);
+ level = outliner_has_one_flag(soops, &te->subtree, flag, curlevel + 1);
if (level) return level;
}
return 0;
@@ -343,9 +303,9 @@ void outliner_set_flag(SpaceOops *soops, ListBase *lb, short flag, short set)
TreeElement *te;
TreeStoreElem *tselem;
- for (te= lb->first; te; te= te->next) {
- tselem= TREESTORE(te);
- if (set==0) tselem->flag &= ~flag;
+ for (te = lb->first; te; te = te->next) {
+ tselem = TREESTORE(te);
+ if (set == 0) tselem->flag &= ~flag;
else tselem->flag |= flag;
outliner_set_flag(soops, &te->subtree, flag, set);
}
@@ -361,7 +321,7 @@ int common_restrict_check(bContext *C, Object *ob)
/* Don't allow hide an object in edit mode,
* check the bug #22153 and #21609, #23977
*/
- Object *obedit= CTX_data_edit_object(C);
+ Object *obedit = CTX_data_edit_object(C);
if (obedit && obedit == ob) {
/* found object is hidden, reset */
if (ob->restrictflag & OB_RESTRICT_VIEW)
@@ -382,13 +342,13 @@ int common_restrict_check(bContext *C, Object *ob)
void object_toggle_visibility_cb(bContext *C, Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem)
{
- Base *base= (Base *)te->directdata;
+ Base *base = (Base *)te->directdata;
Object *ob = (Object *)tselem->id;
/* add check for edit mode */
if (!common_restrict_check(C, ob)) return;
- if (base || (base= object_in_scene(ob, scene))) {
+ if (base || (base = BKE_scene_base_find(scene, ob))) {
if ((base->object->restrictflag ^= OB_RESTRICT_VIEW)) {
ED_base_object_select(base, BA_DESELECT);
}
@@ -397,19 +357,19 @@ void object_toggle_visibility_cb(bContext *C, Scene *scene, TreeElement *te, Tre
void group_toggle_visibility_cb(bContext *UNUSED(C), Scene *scene, TreeElement *UNUSED(te), TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem)
{
- Group *group= (Group *)tselem->id;
+ Group *group = (Group *)tselem->id;
restrictbutton_gr_restrict_flag(scene, group, OB_RESTRICT_VIEW);
}
static int outliner_toggle_visibility_exec(bContext *C, wmOperator *UNUSED(op))
{
- SpaceOops *soops= CTX_wm_space_outliner(C);
- Scene *scene= CTX_data_scene(C);
- ARegion *ar= CTX_wm_region(C);
+ SpaceOops *soops = CTX_wm_space_outliner(C);
+ Scene *scene = CTX_data_scene(C);
+ ARegion *ar = CTX_wm_region(C);
outliner_do_object_operation(C, scene, soops, &soops->tree, object_toggle_visibility_cb);
- WM_event_add_notifier(C, NC_SCENE|ND_OB_VISIBLE, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_VISIBLE, scene);
ED_region_tag_redraw(ar);
return OPERATOR_FINISHED;
@@ -426,36 +386,36 @@ void OUTLINER_OT_visibility_toggle(wmOperatorType *ot)
ot->exec = outliner_toggle_visibility_exec;
ot->poll = ED_operator_outliner_active_no_editobject;
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* Toggle Selectability ---------------------------------------- */
void object_toggle_selectability_cb(bContext *UNUSED(C), Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem)
{
- Base *base= (Base *)te->directdata;
+ Base *base = (Base *)te->directdata;
- if (base==NULL) base= object_in_scene((Object *)tselem->id, scene);
+ if (base == NULL) base = BKE_scene_base_find(scene, (Object *)tselem->id);
if (base) {
- base->object->restrictflag^=OB_RESTRICT_SELECT;
+ base->object->restrictflag ^= OB_RESTRICT_SELECT;
}
}
void group_toggle_selectability_cb(bContext *UNUSED(C), Scene *scene, TreeElement *UNUSED(te), TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem)
{
- Group *group= (Group *)tselem->id;
+ Group *group = (Group *)tselem->id;
restrictbutton_gr_restrict_flag(scene, group, OB_RESTRICT_SELECT);
}
static int outliner_toggle_selectability_exec(bContext *C, wmOperator *UNUSED(op))
{
- SpaceOops *soops= CTX_wm_space_outliner(C);
- Scene *scene= CTX_data_scene(C);
- ARegion *ar= CTX_wm_region(C);
+ SpaceOops *soops = CTX_wm_space_outliner(C);
+ Scene *scene = CTX_data_scene(C);
+ ARegion *ar = CTX_wm_region(C);
outliner_do_object_operation(C, scene, soops, &soops->tree, object_toggle_selectability_cb);
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
ED_region_tag_redraw(ar);
return OPERATOR_FINISHED;
@@ -472,35 +432,35 @@ void OUTLINER_OT_selectability_toggle(wmOperatorType *ot)
ot->exec = outliner_toggle_selectability_exec;
ot->poll = ED_operator_outliner_active_no_editobject;
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* Toggle Renderability ---------------------------------------- */
void object_toggle_renderability_cb(bContext *UNUSED(C), Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem)
{
- Base *base= (Base *)te->directdata;
+ Base *base = (Base *)te->directdata;
- if (base==NULL) base= object_in_scene((Object *)tselem->id, scene);
+ if (base == NULL) base = BKE_scene_base_find(scene, (Object *)tselem->id);
if (base) {
- base->object->restrictflag^=OB_RESTRICT_RENDER;
+ base->object->restrictflag ^= OB_RESTRICT_RENDER;
}
}
void group_toggle_renderability_cb(bContext *UNUSED(C), Scene *scene, TreeElement *UNUSED(te), TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem)
{
- Group *group= (Group *)tselem->id;
+ Group *group = (Group *)tselem->id;
restrictbutton_gr_restrict_flag(scene, group, OB_RESTRICT_RENDER);
}
static int outliner_toggle_renderability_exec(bContext *C, wmOperator *UNUSED(op))
{
- SpaceOops *soops= CTX_wm_space_outliner(C);
- Scene *scene= CTX_data_scene(C);
+ SpaceOops *soops = CTX_wm_space_outliner(C);
+ Scene *scene = CTX_data_scene(C);
outliner_do_object_operation(C, scene, soops, &soops->tree, object_toggle_renderability_cb);
- WM_event_add_notifier(C, NC_SCENE|ND_OB_RENDER, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_RENDER, scene);
return OPERATOR_FINISHED;
}
@@ -516,7 +476,7 @@ void OUTLINER_OT_renderability_toggle(wmOperatorType *ot)
ot->exec = outliner_toggle_renderability_exec;
ot->poll = ED_operator_outliner_active;
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* =============================================== */
@@ -526,8 +486,8 @@ void OUTLINER_OT_renderability_toggle(wmOperatorType *ot)
static int outliner_toggle_expanded_exec(bContext *C, wmOperator *UNUSED(op))
{
- SpaceOops *soops= CTX_wm_space_outliner(C);
- ARegion *ar= CTX_wm_region(C);
+ SpaceOops *soops = CTX_wm_space_outliner(C);
+ ARegion *ar = CTX_wm_region(C);
if (outliner_has_one_flag(soops, &soops->tree, TSE_CLOSED, 1))
outliner_set_flag(soops, &soops->tree, TSE_CLOSED, 0);
@@ -557,9 +517,9 @@ void OUTLINER_OT_expanded_toggle(wmOperatorType *ot)
static int outliner_toggle_selected_exec(bContext *C, wmOperator *UNUSED(op))
{
- SpaceOops *soops= CTX_wm_space_outliner(C);
- ARegion *ar= CTX_wm_region(C);
- Scene *scene= CTX_data_scene(C);
+ SpaceOops *soops = CTX_wm_space_outliner(C);
+ ARegion *ar = CTX_wm_region(C);
+ Scene *scene = CTX_data_scene(C);
if (outliner_has_one_flag(soops, &soops->tree, TSE_SELECTED, 1))
outliner_set_flag(soops, &soops->tree, TSE_SELECTED, 0);
@@ -568,7 +528,7 @@ static int outliner_toggle_selected_exec(bContext *C, wmOperator *UNUSED(op))
soops->storeflag |= SO_TREESTORE_REDRAW;
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
ED_region_tag_redraw(ar);
return OPERATOR_FINISHED;
@@ -595,10 +555,10 @@ void OUTLINER_OT_selected_toggle(wmOperatorType *ot)
static int outliner_show_active_exec(bContext *C, wmOperator *UNUSED(op))
{
- SpaceOops *so= CTX_wm_space_outliner(C);
- Scene *scene= CTX_data_scene(C);
- ARegion *ar= CTX_wm_region(C);
- View2D *v2d= &ar->v2d;
+ SpaceOops *so = CTX_wm_space_outliner(C);
+ Scene *scene = CTX_data_scene(C);
+ ARegion *ar = CTX_wm_region(C);
+ View2D *v2d = &ar->v2d;
TreeElement *te;
int xdelta, ytop;
@@ -607,14 +567,14 @@ static int outliner_show_active_exec(bContext *C, wmOperator *UNUSED(op))
if (OBACT == NULL)
return OPERATOR_CANCELLED;
- te= outliner_find_id(so, &so->tree, (ID *)OBACT);
+ te = outliner_find_id(so, &so->tree, (ID *)OBACT);
if (te) {
/* make te->ys center of view */
- ytop= (int)(te->ys + (v2d->mask.ymax - v2d->mask.ymin)/2);
- if (ytop>0) ytop= 0;
+ ytop = (int)(te->ys + (v2d->mask.ymax - v2d->mask.ymin) / 2);
+ if (ytop > 0) ytop = 0;
v2d->cur.ymax = (float)ytop;
- v2d->cur.ymin = (float)(ytop-(v2d->mask.ymax - v2d->mask.ymin));
+ v2d->cur.ymin = (float)(ytop - (v2d->mask.ymax - v2d->mask.ymin));
/* make te->xs ==> te->xend center of view */
xdelta = (int)(te->xs - v2d->cur.xmin);
@@ -645,16 +605,16 @@ void OUTLINER_OT_show_active(wmOperatorType *ot)
static int outliner_scroll_page_exec(bContext *C, wmOperator *op)
{
- ARegion *ar= CTX_wm_region(C);
- int dy= ar->v2d.mask.ymax - ar->v2d.mask.ymin;
- int up= 0;
+ ARegion *ar = CTX_wm_region(C);
+ int dy = ar->v2d.mask.ymax - ar->v2d.mask.ymin;
+ int up = 0;
if (RNA_boolean_get(op->ptr, "up"))
- up= 1;
+ up = 1;
- if (up == 0) dy= -dy;
- ar->v2d.cur.ymin+= dy;
- ar->v2d.cur.ymax+= dy;
+ if (up == 0) dy = -dy;
+ ar->v2d.cur.ymin += dy;
+ ar->v2d.cur.ymax += dy;
ED_region_tag_redraw(ar);
@@ -685,17 +645,17 @@ void OUTLINER_OT_scroll_page(wmOperatorType *ot)
/* recursive helper for function below */
static void outliner_set_coordinates_element(SpaceOops *soops, TreeElement *te, int startx, int *starty)
{
- TreeStoreElem *tselem= TREESTORE(te);
+ TreeStoreElem *tselem = TREESTORE(te);
/* store coord and continue, we need coordinates for elements outside view too */
- te->xs= (float)startx;
- te->ys= (float)(*starty);
- *starty-= UI_UNIT_Y;
+ te->xs = (float)startx;
+ te->ys = (float)(*starty);
+ *starty -= UI_UNIT_Y;
- if (TSELEM_OPEN(tselem,soops)) {
+ if (TSELEM_OPEN(tselem, soops)) {
TreeElement *ten;
- for (ten= te->subtree.first; ten; ten= ten->next) {
- outliner_set_coordinates_element(soops, ten, startx+UI_UNIT_X, starty);
+ for (ten = te->subtree.first; ten; ten = ten->next) {
+ outliner_set_coordinates_element(soops, ten, startx + UI_UNIT_X, starty);
}
}
@@ -705,20 +665,20 @@ static void outliner_set_coordinates_element(SpaceOops *soops, TreeElement *te,
static void outliner_set_coordinates(ARegion *ar, SpaceOops *soops)
{
TreeElement *te;
- int starty= (int)(ar->v2d.tot.ymax)-UI_UNIT_Y;
- int startx= 0;
+ int starty = (int)(ar->v2d.tot.ymax) - UI_UNIT_Y;
+ int startx = 0;
- for (te= soops->tree.first; te; te= te->next) {
+ for (te = soops->tree.first; te; te = te->next) {
outliner_set_coordinates_element(soops, te, startx, &starty);
}
}
/* find next element that has this name */
-static TreeElement *outliner_find_named(SpaceOops *soops, ListBase *lb, char *name, int flags, TreeElement *prev, int *prevFound)
+static TreeElement *outliner_find_name(SpaceOops *soops, ListBase *lb, char *name, int flags, TreeElement *prev, int *prevFound)
{
TreeElement *te, *tes;
- for (te= lb->first; te; te= te->next) {
+ for (te = lb->first; te; te = te->next) {
int found = outliner_filter_has_name(te, name, flags);
if (found) {
@@ -734,7 +694,7 @@ static TreeElement *outliner_find_named(SpaceOops *soops, ListBase *lb, char *na
return te;
}
- tes= outliner_find_named(soops, &te->subtree, name, flags, prev, prevFound);
+ tes = outliner_find_name(soops, &te->subtree, name, flags, prev, prevFound);
if (tes) return tes;
}
@@ -745,44 +705,44 @@ static TreeElement *outliner_find_named(SpaceOops *soops, ListBase *lb, char *na
static void outliner_find_panel(Scene *UNUSED(scene), ARegion *ar, SpaceOops *soops, int again, int flags)
{
ReportList *reports = NULL; // CTX_wm_reports(C);
- TreeElement *te= NULL;
+ TreeElement *te = NULL;
TreeElement *last_find;
TreeStoreElem *tselem;
- int ytop, xdelta, prevFound=0;
+ int ytop, xdelta, prevFound = 0;
char name[sizeof(soops->search_string)];
/* get last found tree-element based on stored search_tse */
- last_find= outliner_find_tse(soops, &soops->search_tse);
+ last_find = outliner_find_tse(soops, &soops->search_tse);
/* determine which type of search to do */
if (again && last_find) {
/* no popup panel - previous + user wanted to search for next after previous */
BLI_strncpy(name, soops->search_string, sizeof(name));
- flags= soops->search_flags;
+ flags = soops->search_flags;
/* try to find matching element */
- te= outliner_find_named(soops, &soops->tree, name, flags, last_find, &prevFound);
- if (te==NULL) {
+ te = outliner_find_name(soops, &soops->tree, name, flags, last_find, &prevFound);
+ if (te == NULL) {
/* no more matches after previous, start from beginning again */
- prevFound= 1;
- te= outliner_find_named(soops, &soops->tree, name, flags, last_find, &prevFound);
+ prevFound = 1;
+ te = outliner_find_name(soops, &soops->tree, name, flags, last_find, &prevFound);
}
}
else {
/* pop up panel - no previous, or user didn't want search after previous */
- name[0]= '\0';
+ name[0] = '\0';
// XXX if (sbutton(name, 0, sizeof(name)-1, "Find: ") && name[0]) {
-// te= outliner_find_named(soops, &soops->tree, name, flags, NULL, &prevFound);
+// te= outliner_find_name(soops, &soops->tree, name, flags, NULL, &prevFound);
// }
// else return; /* XXX RETURN! XXX */
}
/* do selection and reveal */
if (te) {
- tselem= TREESTORE(te);
+ tselem = TREESTORE(te);
if (tselem) {
/* expand branches so that it will be visible, we need to get correct coordinates */
- if ( outliner_open_back(soops, te))
+ if (outliner_open_back(soops, te))
outliner_set_coordinates(ar, soops);
/* deselect all visible, and select found element */
@@ -790,10 +750,10 @@ static void outliner_find_panel(Scene *UNUSED(scene), ARegion *ar, SpaceOops *so
tselem->flag |= TSE_SELECTED;
/* make te->ys center of view */
- ytop= (int)(te->ys + (ar->v2d.mask.ymax-ar->v2d.mask.ymin)/2);
- if (ytop>0) ytop= 0;
+ ytop = (int)(te->ys + (ar->v2d.mask.ymax - ar->v2d.mask.ymin) / 2);
+ if (ytop > 0) ytop = 0;
ar->v2d.cur.ymax = (float)ytop;
- ar->v2d.cur.ymin = (float)(ytop-(ar->v2d.mask.ymax-ar->v2d.mask.ymin));
+ ar->v2d.cur.ymin = (float)(ytop - (ar->v2d.mask.ymax - ar->v2d.mask.ymin));
/* make te->xs ==> te->xend center of view */
xdelta = (int)(te->xs - ar->v2d.cur.xmin);
@@ -801,10 +761,10 @@ static void outliner_find_panel(Scene *UNUSED(scene), ARegion *ar, SpaceOops *so
ar->v2d.cur.xmax += xdelta;
/* store selection */
- soops->search_tse= *tselem;
+ soops->search_tse = *tselem;
BLI_strncpy(soops->search_string, name, sizeof(soops->search_string));
- soops->search_flags= flags;
+ soops->search_flags = flags;
/* redraw */
soops->storeflag |= SO_TREESTORE_REDRAW;
@@ -825,34 +785,34 @@ static void outliner_openclose_level(SpaceOops *soops, ListBase *lb, int curleve
TreeElement *te;
TreeStoreElem *tselem;
- for (te= lb->first; te; te= te->next) {
- tselem= TREESTORE(te);
+ for (te = lb->first; te; te = te->next) {
+ tselem = TREESTORE(te);
if (open) {
- if (curlevel<=level) tselem->flag &= ~TSE_CLOSED;
+ if (curlevel <= level) tselem->flag &= ~TSE_CLOSED;
}
else {
- if (curlevel>=level) tselem->flag |= TSE_CLOSED;
+ if (curlevel >= level) tselem->flag |= TSE_CLOSED;
}
- outliner_openclose_level(soops, &te->subtree, curlevel+1, level, open);
+ outliner_openclose_level(soops, &te->subtree, curlevel + 1, level, open);
}
}
static int outliner_one_level_exec(bContext *C, wmOperator *op)
{
- SpaceOops *soops= CTX_wm_space_outliner(C);
- ARegion *ar= CTX_wm_region(C);
- int add= RNA_boolean_get(op->ptr, "open");
+ SpaceOops *soops = CTX_wm_space_outliner(C);
+ ARegion *ar = CTX_wm_region(C);
+ int add = RNA_boolean_get(op->ptr, "open");
int level;
- level= outliner_has_one_flag(soops, &soops->tree, TSE_CLOSED, 1);
- if (add==1) {
+ level = outliner_has_one_flag(soops, &soops->tree, TSE_CLOSED, 1);
+ if (add == 1) {
if (level) outliner_openclose_level(soops, &soops->tree, 1, level, 1);
}
else {
- if (level==0) level= outliner_count_levels(soops, &soops->tree, 0);
- if (level) outliner_openclose_level(soops, &soops->tree, 1, level-1, 0);
+ if (level == 0) level = outliner_count_levels(soops, &soops->tree, 0);
+ if (level) outliner_openclose_level(soops, &soops->tree, 1, level - 1, 0);
}
ED_region_tag_redraw(ar);
@@ -885,10 +845,10 @@ static int subtree_has_objects(SpaceOops *soops, ListBase *lb)
TreeElement *te;
TreeStoreElem *tselem;
- for (te= lb->first; te; te= te->next) {
- tselem= TREESTORE(te);
- if (tselem->type==0 && te->idcode==ID_OB) return 1;
- if ( subtree_has_objects(soops, &te->subtree)) return 1;
+ for (te = lb->first; te; te = te->next) {
+ tselem = TREESTORE(te);
+ if (tselem->type == 0 && te->idcode == ID_OB) return 1;
+ if (subtree_has_objects(soops, &te->subtree)) return 1;
}
return 0;
}
@@ -900,31 +860,31 @@ static void tree_element_show_hierarchy(Scene *scene, SpaceOops *soops, ListBase
TreeStoreElem *tselem;
/* open all object elems, close others */
- for (te= lb->first; te; te= te->next) {
- tselem= TREESTORE(te);
+ for (te = lb->first; te; te = te->next) {
+ tselem = TREESTORE(te);
- if (tselem->type==0) {
- if (te->idcode==ID_SCE) {
- if (tselem->id!=(ID *)scene) tselem->flag |= TSE_CLOSED;
- else tselem->flag &= ~TSE_CLOSED;
+ if (tselem->type == 0) {
+ if (te->idcode == ID_SCE) {
+ if (tselem->id != (ID *)scene) tselem->flag |= TSE_CLOSED;
+ else tselem->flag &= ~TSE_CLOSED;
}
- else if (te->idcode==ID_OB) {
+ else if (te->idcode == ID_OB) {
if (subtree_has_objects(soops, &te->subtree)) tselem->flag &= ~TSE_CLOSED;
else tselem->flag |= TSE_CLOSED;
}
}
else tselem->flag |= TSE_CLOSED;
- if (TSELEM_OPEN(tselem,soops)) tree_element_show_hierarchy(scene, soops, &te->subtree);
+ if (TSELEM_OPEN(tselem, soops)) tree_element_show_hierarchy(scene, soops, &te->subtree);
}
}
/* show entire object level hierarchy */
static int outliner_show_hierarchy_exec(bContext *C, wmOperator *UNUSED(op))
{
- SpaceOops *soops= CTX_wm_space_outliner(C);
- ARegion *ar= CTX_wm_region(C);
- Scene *scene= CTX_data_scene(C);
+ SpaceOops *soops = CTX_wm_space_outliner(C);
+ ARegion *ar = CTX_wm_region(C);
+ Scene *scene = CTX_data_scene(C);
/* recursively open/close levels */
tree_element_show_hierarchy(scene, soops, &soops->tree);
@@ -955,9 +915,9 @@ void OUTLINER_OT_show_hierarchy(wmOperatorType *ot)
/* specialized poll callback for these operators to work in Datablocks view only */
static int ed_operator_outliner_datablocks_active(bContext *C)
{
- ScrArea *sa= CTX_wm_area(C);
- if ((sa) && (sa->spacetype==SPACE_OUTLINER)) {
- SpaceOops *so= CTX_wm_space_outliner(C);
+ ScrArea *sa = CTX_wm_area(C);
+ if ((sa) && (sa->spacetype == SPACE_OUTLINER)) {
+ SpaceOops *so = CTX_wm_space_outliner(C);
return (so->outlinevis == SO_DATABLOCKS);
}
return 0;
@@ -969,7 +929,7 @@ static int ed_operator_outliner_datablocks_active(bContext *C)
* this function does not do that yet
*/
static void tree_element_to_path(SpaceOops *soops, TreeElement *te, TreeStoreElem *tselem,
- ID **id, char **path, int *array_index, short *flag, short *UNUSED(groupmode))
+ ID **id, char **path, int *array_index, short *flag, short *UNUSED(groupmode))
{
ListBase hierarchy = {NULL, NULL};
LinkData *ld;
@@ -977,7 +937,7 @@ static void tree_element_to_path(SpaceOops *soops, TreeElement *te, TreeStoreEle
TreeStoreElem *tse /* , *tsenext */ /* UNUSED */;
PointerRNA *ptr, *nextptr;
PropertyRNA *prop;
- char *newpath=NULL;
+ char *newpath = NULL;
/* optimize tricks:
* - Don't do anything if the selected item is a 'struct', but arrays are allowed
@@ -986,28 +946,28 @@ static void tree_element_to_path(SpaceOops *soops, TreeElement *te, TreeStoreEle
return;
/* Overview of Algorithm:
- * 1. Go up the chain of parents until we find the 'root', taking note of the
+ * 1. Go up the chain of parents until we find the 'root', taking note of the
* levels encountered in reverse-order (i.e. items are added to the start of the list
* for more convenient looping later)
- * 2. Walk down the chain, adding from the first ID encountered
+ * 2. Walk down the chain, adding from the first ID encountered
* (which will become the 'ID' for the KeyingSet Path), and build a
- * path as we step through the chain
+ * path as we step through the chain
*/
/* step 1: flatten out hierarchy of parents into a flat chain */
- for (tem= te->parent; tem; tem= tem->parent) {
- ld= MEM_callocN(sizeof(LinkData), "LinkData for tree_element_to_path()");
- ld->data= tem;
+ for (tem = te->parent; tem; tem = tem->parent) {
+ ld = MEM_callocN(sizeof(LinkData), "LinkData for tree_element_to_path()");
+ ld->data = tem;
BLI_addhead(&hierarchy, ld);
}
/* step 2: step down hierarchy building the path (NOTE: addhead in previous loop was needed so that we can loop like this) */
- for (ld= hierarchy.first; ld; ld= ld->next) {
+ for (ld = hierarchy.first; ld; ld = ld->next) {
/* get data */
- tem= (TreeElement *)ld->data;
- tse= TREESTORE(tem);
- ptr= &tem->rnaptr;
- prop= tem->directdata;
+ tem = (TreeElement *)ld->data;
+ tse = TREESTORE(tem);
+ ptr = &tem->rnaptr;
+ prop = tem->directdata;
/* check if we're looking for first ID, or appending to path */
if (*id) {
@@ -1017,43 +977,43 @@ static void tree_element_to_path(SpaceOops *soops, TreeElement *te, TreeStoreEle
if (tse->type == TSE_RNA_PROPERTY) {
if (RNA_property_type(prop) == PROP_POINTER) {
/* for pointer we just append property name */
- newpath= RNA_path_append(*path, ptr, prop, 0, NULL);
+ newpath = RNA_path_append(*path, ptr, prop, 0, NULL);
}
else if (RNA_property_type(prop) == PROP_COLLECTION) {
char buf[128], *name;
- temnext= (TreeElement*)(ld->next->data);
+ temnext = (TreeElement *)(ld->next->data);
/* tsenext= TREESTORE(temnext); */ /* UNUSED */
- nextptr= &temnext->rnaptr;
- name= RNA_struct_name_get_alloc(nextptr, buf, sizeof(buf), NULL);
+ nextptr = &temnext->rnaptr;
+ name = RNA_struct_name_get_alloc(nextptr, buf, sizeof(buf), NULL);
if (name) {
/* if possible, use name as a key in the path */
- newpath= RNA_path_append(*path, NULL, prop, 0, name);
+ newpath = RNA_path_append(*path, NULL, prop, 0, name);
if (name != buf)
MEM_freeN(name);
}
else {
/* otherwise use index */
- int index= 0;
+ int index = 0;
- for (temsub=tem->subtree.first; temsub; temsub=temsub->next, index++)
+ for (temsub = tem->subtree.first; temsub; temsub = temsub->next, index++)
if (temsub == temnext)
break;
- newpath= RNA_path_append(*path, NULL, prop, index, NULL);
+ newpath = RNA_path_append(*path, NULL, prop, index, NULL);
}
- ld= ld->next;
+ ld = ld->next;
}
}
if (newpath) {
if (*path) MEM_freeN(*path);
- *path= newpath;
- newpath= NULL;
+ *path = newpath;
+ newpath = NULL;
}
}
else {
@@ -1061,12 +1021,12 @@ static void tree_element_to_path(SpaceOops *soops, TreeElement *te, TreeStoreEle
if (tse->type == TSE_RNA_STRUCT) {
/* ptr->data not ptr->id.data seems to be the one we want, since ptr->data is sometimes the owner of this ID? */
if (RNA_struct_is_ID(ptr->type)) {
- *id= (ID *)ptr->data;
+ *id = (ID *)ptr->data;
/* clear path */
if (*path) {
MEM_freeN(*path);
- path= NULL;
+ path = NULL;
}
}
}
@@ -1076,13 +1036,13 @@ static void tree_element_to_path(SpaceOops *soops, TreeElement *te, TreeStoreEle
/* step 3: if we've got an ID, add the current item to the path */
if (*id) {
/* add the active property to the path */
- ptr= &te->rnaptr;
- prop= te->directdata;
+ ptr = &te->rnaptr;
+ prop = te->directdata;
/* array checks */
if (tselem->type == TSE_RNA_ARRAY_ELEM) {
/* item is part of an array, so must set the array_index */
- *array_index= te->index;
+ *array_index = te->index;
}
else if (RNA_property_array_length(ptr, prop)) {
/* entire array was selected, so keyframe all */
@@ -1090,9 +1050,9 @@ static void tree_element_to_path(SpaceOops *soops, TreeElement *te, TreeStoreEle
}
/* path */
- newpath= RNA_path_append(*path, NULL, prop, 0, NULL);
+ newpath = RNA_path_append(*path, NULL, prop, 0, NULL);
if (*path) MEM_freeN(*path);
- *path= newpath;
+ *path = newpath;
}
/* free temp data */
@@ -1106,7 +1066,7 @@ static void tree_element_to_path(SpaceOops *soops, TreeElement *te, TreeStoreEle
* they depend on having RNA paths and/or hierarchies available.
*/
enum {
- DRIVERS_EDITMODE_ADD = 0,
+ DRIVERS_EDITMODE_ADD = 0,
DRIVERS_EDITMODE_REMOVE,
} /*eDrivers_EditModes*/;
@@ -1118,22 +1078,22 @@ static void do_outliner_drivers_editop(SpaceOops *soops, ListBase *tree, ReportL
TreeElement *te;
TreeStoreElem *tselem;
- for (te= tree->first; te; te=te->next) {
- tselem= TREESTORE(te);
+ for (te = tree->first; te; te = te->next) {
+ tselem = TREESTORE(te);
/* if item is selected, perform operation */
if (tselem->flag & TSE_SELECTED) {
- ID *id= NULL;
- char *path= NULL;
- int array_index= 0;
- short flag= 0;
- short groupmode= KSP_GROUP_KSNAME;
+ ID *id = NULL;
+ char *path = NULL;
+ int array_index = 0;
+ short flag = 0;
+ short groupmode = KSP_GROUP_KSNAME;
/* check if RNA-property described by this selected element is an animatable prop */
if (ELEM(tselem->type, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM) && RNA_property_animateable(&te->rnaptr, te->directdata)) {
/* get id + path + index info from the selected element */
tree_element_to_path(soops, te, tselem,
- &id, &path, &array_index, &flag, &groupmode);
+ &id, &path, &array_index, &flag, &groupmode);
}
/* only if ID and path were set, should we perform any actions */
@@ -1144,10 +1104,10 @@ static void do_outliner_drivers_editop(SpaceOops *soops, ListBase *tree, ReportL
/* array checks */
if (flag & KSP_FLAG_WHOLE_ARRAY) {
/* entire array was selected, so add drivers for all */
- arraylen= RNA_property_array_length(&te->rnaptr, te->directdata);
+ arraylen = RNA_property_array_length(&te->rnaptr, te->directdata);
}
else
- arraylen= array_index;
+ arraylen = array_index;
/* we should do at least one step */
if (arraylen == array_index)
@@ -1162,13 +1122,13 @@ static void do_outliner_drivers_editop(SpaceOops *soops, ListBase *tree, ReportL
/* add a new driver with the information obtained (only if valid) */
ANIM_add_driver(reports, id, path, array_index, dflags, DRIVER_TYPE_PYTHON);
}
- break;
+ break;
case DRIVERS_EDITMODE_REMOVE:
{
/* remove driver matching the information obtained (only if valid) */
ANIM_remove_driver(reports, id, path, array_index, dflags);
}
- break;
+ break;
}
}
@@ -1180,7 +1140,7 @@ static void do_outliner_drivers_editop(SpaceOops *soops, ListBase *tree, ReportL
}
/* go over sub-tree */
- if (TSELEM_OPEN(tselem,soops))
+ if (TSELEM_OPEN(tselem, soops))
do_outliner_drivers_editop(soops, &te->subtree, reports, mode);
}
}
@@ -1189,7 +1149,7 @@ static void do_outliner_drivers_editop(SpaceOops *soops, ListBase *tree, ReportL
static int outliner_drivers_addsel_exec(bContext *C, wmOperator *op)
{
- SpaceOops *soutliner= CTX_wm_space_outliner(C);
+ SpaceOops *soutliner = CTX_wm_space_outliner(C);
/* check for invalid states */
if (soutliner == NULL)
@@ -1199,7 +1159,7 @@ static int outliner_drivers_addsel_exec(bContext *C, wmOperator *op)
do_outliner_drivers_editop(soutliner, &soutliner->tree, op->reports, DRIVERS_EDITMODE_ADD);
/* send notifiers */
- 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;
}
@@ -1216,7 +1176,7 @@ void OUTLINER_OT_drivers_add_selected(wmOperatorType *ot)
ot->poll = ed_operator_outliner_datablocks_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
@@ -1224,7 +1184,7 @@ void OUTLINER_OT_drivers_add_selected(wmOperatorType *ot)
static int outliner_drivers_deletesel_exec(bContext *C, wmOperator *op)
{
- SpaceOops *soutliner= CTX_wm_space_outliner(C);
+ SpaceOops *soutliner = CTX_wm_space_outliner(C);
/* check for invalid states */
if (soutliner == NULL)
@@ -1251,7 +1211,7 @@ void OUTLINER_OT_drivers_delete_selected(wmOperatorType *ot)
ot->poll = ed_operator_outliner_datablocks_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* =============================================== */
@@ -1261,7 +1221,7 @@ void OUTLINER_OT_drivers_delete_selected(wmOperatorType *ot)
* they depend on having RNA paths and/or hierarchies available.
*/
enum {
- KEYINGSET_EDITMODE_ADD = 0,
+ KEYINGSET_EDITMODE_ADD = 0,
KEYINGSET_EDITMODE_REMOVE,
} /*eKeyingSet_EditModes*/;
@@ -1271,7 +1231,7 @@ enum {
// TODO: should this be an API func?
static KeyingSet *verify_active_keyingset(Scene *scene, short add)
{
- KeyingSet *ks= NULL;
+ KeyingSet *ks = NULL;
/* sanity check */
if (scene == NULL)
@@ -1279,13 +1239,13 @@ static KeyingSet *verify_active_keyingset(Scene *scene, short add)
/* try to find one from scene */
if (scene->active_keyingset > 0)
- ks= BLI_findlink(&scene->keyingsets, scene->active_keyingset-1);
+ ks = BLI_findlink(&scene->keyingsets, scene->active_keyingset - 1);
/* add if none found */
// XXX the default settings have yet to evolve
- if ((add) && (ks==NULL)) {
- ks= BKE_keyingset_add(&scene->keyingsets, NULL, NULL, KEYINGSET_ABSOLUTE, 0);
- scene->active_keyingset= BLI_countlist(&scene->keyingsets);
+ if ((add) && (ks == NULL)) {
+ ks = BKE_keyingset_add(&scene->keyingsets, NULL, NULL, KEYINGSET_ABSOLUTE, 0);
+ scene->active_keyingset = BLI_countlist(&scene->keyingsets);
}
return ks;
@@ -1297,22 +1257,22 @@ static void do_outliner_keyingset_editop(SpaceOops *soops, KeyingSet *ks, ListBa
TreeElement *te;
TreeStoreElem *tselem;
- for (te= tree->first; te; te=te->next) {
- tselem= TREESTORE(te);
+ for (te = tree->first; te; te = te->next) {
+ tselem = TREESTORE(te);
/* if item is selected, perform operation */
if (tselem->flag & TSE_SELECTED) {
- ID *id= NULL;
- char *path= NULL;
- int array_index= 0;
- short flag= 0;
- short groupmode= KSP_GROUP_KSNAME;
+ ID *id = NULL;
+ char *path = NULL;
+ int array_index = 0;
+ short flag = 0;
+ short groupmode = KSP_GROUP_KSNAME;
/* check if RNA-property described by this selected element is an animatable prop */
if (ELEM(tselem->type, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM) && RNA_property_animateable(&te->rnaptr, te->directdata)) {
/* get id + path + index info from the selected element */
tree_element_to_path(soops, te, tselem,
- &id, &path, &array_index, &flag, &groupmode);
+ &id, &path, &array_index, &flag, &groupmode);
}
/* only if ID and path were set, should we perform any actions */
@@ -1324,22 +1284,22 @@ static void do_outliner_keyingset_editop(SpaceOops *soops, KeyingSet *ks, ListBa
/* add a new path with the information obtained (only if valid) */
// TODO: what do we do with group name? for now, we don't supply one, and just let this use the KeyingSet name
BKE_keyingset_add_path(ks, id, NULL, path, array_index, flag, groupmode);
- ks->active_path= BLI_countlist(&ks->paths);
+ ks->active_path = BLI_countlist(&ks->paths);
}
- break;
+ break;
case KEYINGSET_EDITMODE_REMOVE:
{
/* find the relevant path, then remove it from the KeyingSet */
- KS_Path *ksp= BKE_keyingset_find_path(ks, id, NULL, path, array_index, groupmode);
+ KS_Path *ksp = BKE_keyingset_find_path(ks, id, NULL, path, array_index, groupmode);
if (ksp) {
/* free path's data */
BKE_keyingset_free_path(ks, ksp);
- ks->active_path= 0;
+ ks->active_path = 0;
}
}
- break;
+ break;
}
/* free path, since it had to be generated */
@@ -1348,7 +1308,7 @@ static void do_outliner_keyingset_editop(SpaceOops *soops, KeyingSet *ks, ListBa
}
/* go over sub-tree */
- if (TSELEM_OPEN(tselem,soops))
+ if (TSELEM_OPEN(tselem, soops))
do_outliner_keyingset_editop(soops, ks, &te->subtree, mode);
}
}
@@ -1357,9 +1317,9 @@ static void do_outliner_keyingset_editop(SpaceOops *soops, KeyingSet *ks, ListBa
static int outliner_keyingset_additems_exec(bContext *C, wmOperator *op)
{
- SpaceOops *soutliner= CTX_wm_space_outliner(C);
- Scene *scene= CTX_data_scene(C);
- KeyingSet *ks= verify_active_keyingset(scene, 1);
+ SpaceOops *soutliner = CTX_wm_space_outliner(C);
+ Scene *scene = CTX_data_scene(C);
+ KeyingSet *ks = verify_active_keyingset(scene, 1);
/* check for invalid states */
if (ks == NULL) {
@@ -1373,7 +1333,7 @@ static int outliner_keyingset_additems_exec(bContext *C, wmOperator *op)
do_outliner_keyingset_editop(soutliner, ks, &soutliner->tree, KEYINGSET_EDITMODE_ADD);
/* send notifiers */
- WM_event_add_notifier(C, NC_SCENE|ND_KEYINGSET, NULL);
+ WM_event_add_notifier(C, NC_SCENE | ND_KEYINGSET, NULL);
return OPERATOR_FINISHED;
}
@@ -1390,7 +1350,7 @@ void OUTLINER_OT_keyingset_add_selected(wmOperatorType *ot)
ot->poll = ed_operator_outliner_datablocks_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
@@ -1398,9 +1358,9 @@ void OUTLINER_OT_keyingset_add_selected(wmOperatorType *ot)
static int outliner_keyingset_removeitems_exec(bContext *C, wmOperator *UNUSED(op))
{
- SpaceOops *soutliner= CTX_wm_space_outliner(C);
- Scene *scene= CTX_data_scene(C);
- KeyingSet *ks= verify_active_keyingset(scene, 1);
+ SpaceOops *soutliner = CTX_wm_space_outliner(C);
+ Scene *scene = CTX_data_scene(C);
+ KeyingSet *ks = verify_active_keyingset(scene, 1);
/* check for invalid states */
if (soutliner == NULL)
@@ -1410,7 +1370,7 @@ static int outliner_keyingset_removeitems_exec(bContext *C, wmOperator *UNUSED(o
do_outliner_keyingset_editop(soutliner, ks, &soutliner->tree, KEYINGSET_EDITMODE_REMOVE);
/* send notifiers */
- WM_event_add_notifier(C, NC_SCENE|ND_KEYINGSET, NULL);
+ WM_event_add_notifier(C, NC_SCENE | ND_KEYINGSET, NULL);
return OPERATOR_FINISHED;
}
@@ -1427,7 +1387,7 @@ void OUTLINER_OT_keyingset_remove_selected(wmOperatorType *ot)
ot->poll = ed_operator_outliner_datablocks_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ******************** Parent Drop Operator *********************** */
@@ -1435,23 +1395,23 @@ void OUTLINER_OT_keyingset_remove_selected(wmOperatorType *ot)
static int parent_drop_exec(bContext *C, wmOperator *op)
{
Object *par = NULL, *ob = NULL;
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
int partype = -1;
char parname[MAX_ID_NAME], childname[MAX_ID_NAME];
- partype= RNA_enum_get(op->ptr, "type");
+ partype = RNA_enum_get(op->ptr, "type");
RNA_string_get(op->ptr, "parent", parname);
- par= (Object *)find_id("OB", parname);
+ par = (Object *)BKE_libblock_find_name(ID_OB, parname);
RNA_string_get(op->ptr, "child", childname);
- ob= (Object *)find_id("OB", childname);
+ ob = (Object *)BKE_libblock_find_name(ID_OB, childname);
ED_object_parent_set(op->reports, bmain, scene, ob, par, partype);
DAG_scene_sort(bmain, scene);
DAG_ids_flush_update(bmain, 0);
- WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARENT, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_PARENT, NULL);
return OPERATOR_FINISHED;
}
@@ -1459,8 +1419,8 @@ static int parent_drop_exec(bContext *C, wmOperator *op)
/* Used for drag and drop parenting */
TreeElement *outliner_dropzone_parent(bContext *C, wmEvent *event, TreeElement *te, float *fmval)
{
- SpaceOops *soops= CTX_wm_space_outliner(C);
- TreeStoreElem *tselem= TREESTORE(te);
+ SpaceOops *soops = CTX_wm_space_outliner(C);
+ TreeStoreElem *tselem = TREESTORE(te);
if ((fmval[1] > te->ys) && (fmval[1] < (te->ys + UI_UNIT_Y))) {
/* name and first icon */
@@ -1476,10 +1436,10 @@ TreeElement *outliner_dropzone_parent(bContext *C, wmEvent *event, TreeElement *
}
/* Not it. Let's look at its children. */
- if ((tselem->flag & TSE_CLOSED)==0 && (te->subtree.first)) {
+ if ((tselem->flag & TSE_CLOSED) == 0 && (te->subtree.first)) {
for (te = te->subtree.first; te; te = te->next) {
TreeElement *te_valid;
- te_valid= outliner_dropzone_parent(C, event, te, fmval);
+ te_valid = outliner_dropzone_parent(C, event, te, fmval);
if (te_valid) return te_valid;
}
}
@@ -1488,24 +1448,24 @@ TreeElement *outliner_dropzone_parent(bContext *C, wmEvent *event, TreeElement *
static int parent_drop_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- Object *par= NULL;
- Object *ob= NULL;
- SpaceOops *soops= CTX_wm_space_outliner(C);
- ARegion *ar= CTX_wm_region(C);
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- TreeElement *te= NULL;
- TreeElement *te_found= NULL;
+ Object *par = NULL;
+ Object *ob = NULL;
+ SpaceOops *soops = CTX_wm_space_outliner(C);
+ ARegion *ar = CTX_wm_region(C);
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ TreeElement *te = NULL;
+ TreeElement *te_found = NULL;
char childname[MAX_ID_NAME];
char parname[MAX_ID_NAME];
- int partype= 0;
+ int partype = 0;
float fmval[2];
UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &fmval[0], &fmval[1]);
/* Find object hovered over */
- for (te= soops->tree.first; te; te= te->next) {
- te_found= outliner_dropzone_parent(C, event, te, fmval);
+ for (te = soops->tree.first; te; te = te->next) {
+ te_found = outliner_dropzone_parent(C, event, te, fmval);
if (te_found) break;
}
@@ -1513,9 +1473,9 @@ static int parent_drop_invoke(bContext *C, wmOperator *op, wmEvent *event)
RNA_string_set(op->ptr, "parent", te_found->name);
/* Identify parent and child */
RNA_string_get(op->ptr, "child", childname);
- ob= (Object *)find_id("OB", childname);
+ ob = (Object *)BKE_libblock_find_name(ID_OB, childname);
RNA_string_get(op->ptr, "parent", parname);
- par= (Object *)find_id("OB", parname);
+ par = (Object *)BKE_libblock_find_name(ID_OB, parname);
if (ELEM(NULL, ob, par)) {
if (par == NULL) printf("par==NULL\n");
@@ -1527,20 +1487,20 @@ static int parent_drop_invoke(bContext *C, wmOperator *op, wmEvent *event)
/* check dragged object (child) is active */
if (ob != CTX_data_active_object(C))
- ED_base_object_select(object_in_scene(ob, scene), BA_SELECT);
+ ED_base_object_select(BKE_scene_base_find(scene, ob), BA_SELECT);
if ((par->type != OB_ARMATURE) && (par->type != OB_CURVE) && (par->type != OB_LATTICE)) {
if (ED_object_parent_set(op->reports, bmain, scene, ob, par, partype)) {
DAG_scene_sort(bmain, scene);
DAG_ids_flush_update(bmain, 0);
- WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARENT, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_PARENT, NULL);
}
}
else {
/* Menu creation */
- uiPopupMenu *pup= uiPupMenuBegin(C, IFACE_("Set Parent To"), ICON_NONE);
- uiLayout *layout= uiPupMenuLayout(pup);
+ uiPopupMenu *pup = uiPupMenuBegin(C, IFACE_("Set Parent To"), ICON_NONE);
+ uiLayout *layout = uiPupMenuLayout(pup);
PointerRNA ptr;
@@ -1553,7 +1513,7 @@ static int parent_drop_invoke(bContext *C, wmOperator *op, wmEvent *event)
0, ptr.data, WM_OP_EXEC_DEFAULT, 0);
/* par becomes parent, make the associated menus */
- if (par->type==OB_ARMATURE) {
+ if (par->type == OB_ARMATURE) {
WM_operator_properties_create(&ptr, "OUTLINER_OT_parent_drop");
RNA_string_set(&ptr, "parent", parname);
RNA_string_set(&ptr, "child", childname);
@@ -1589,7 +1549,7 @@ static int parent_drop_invoke(bContext *C, wmOperator *op, wmEvent *event)
uiItemFullO(layout, "OUTLINER_OT_parent_drop", IFACE_("Bone"),
0, ptr.data, WM_OP_EXEC_DEFAULT, 0);
}
- else if (par->type==OB_CURVE) {
+ else if (par->type == OB_CURVE) {
WM_operator_properties_create(&ptr, "OUTLINER_OT_parent_drop");
RNA_string_set(&ptr, "parent", parname);
RNA_string_set(&ptr, "child", childname);
@@ -1646,7 +1606,7 @@ void OUTLINER_OT_parent_drop(wmOperatorType *ot)
ot->poll = ED_operator_outliner_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_string(ot->srna, "child", "Object", MAX_ID_NAME, "Child", "Child Object");
@@ -1656,15 +1616,15 @@ void OUTLINER_OT_parent_drop(wmOperatorType *ot)
int outliner_dropzone_parent_clear(bContext *C, wmEvent *event, TreeElement *te, float *fmval)
{
- SpaceOops *soops= CTX_wm_space_outliner(C);
- TreeStoreElem *tselem= TREESTORE(te);
+ SpaceOops *soops = CTX_wm_space_outliner(C);
+ TreeStoreElem *tselem = TREESTORE(te);
/* Check for row */
if ((fmval[1] > te->ys) && (fmval[1] < (te->ys + UI_UNIT_Y))) {
/* Ignore drop on scene tree elements */
if ((fmval[0] > te->xs + UI_UNIT_X) && (fmval[0] < te->xend)) {
if ((te->idcode == ID_SCE) &&
- !ELEM3(tselem->type, TSE_R_LAYER_BASE, TSE_R_LAYER, TSE_R_PASS))
+ !ELEM3(tselem->type, TSE_R_LAYER_BASE, TSE_R_LAYER, TSE_R_PASS))
{
return 0;
}
@@ -1679,11 +1639,11 @@ int outliner_dropzone_parent_clear(bContext *C, wmEvent *event, TreeElement *te,
return 1;
}
- return 0; // ID_OB, but mouse in undefined dropzone.
+ return 0; // ID_OB, but mouse in undefined dropzone.
}
/* Not this row. Let's look at its children. */
- if ((tselem->flag & TSE_CLOSED)==0 && (te->subtree.first)) {
+ if ((tselem->flag & TSE_CLOSED) == 0 && (te->subtree.first)) {
for (te = te->subtree.first; te; te = te->next) {
if (outliner_dropzone_parent_clear(C, event, te, fmval))
return 1;
@@ -1694,16 +1654,16 @@ int outliner_dropzone_parent_clear(bContext *C, wmEvent *event, TreeElement *te,
static int parent_clear_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
- Scene *scene= CTX_data_scene(C);
- Object *ob= NULL;
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = NULL;
char obname[MAX_ID_NAME];
RNA_string_get(op->ptr, "dragged_obj", obname);
- ob= (Object *)find_id("OB", obname);
+ ob = (Object *)BKE_libblock_find_name(ID_OB, obname);
/* check dragged object (child) is active */
if (ob != CTX_data_active_object(C))
- ED_base_object_select(object_in_scene(ob, scene), BA_SELECT);
+ ED_base_object_select(BKE_scene_base_find(scene, ob), BA_SELECT);
ED_object_parent_clear(C, RNA_enum_get(op->ptr, "type"));
@@ -1723,7 +1683,7 @@ void OUTLINER_OT_parent_clear(wmOperatorType *ot)
ot->poll = ED_operator_outliner_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_string(ot->srna, "dragged_obj", "Object", MAX_ID_NAME, "Child", "Child Object");
diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h
index b1990d3054e..d8d10519bd6 100644
--- a/source/blender/editors/space_outliner/outliner_intern.h
+++ b/source/blender/editors/space_outliner/outliner_intern.h
@@ -48,82 +48,82 @@ struct Object;
typedef struct TreeElement {
struct TreeElement *next, *prev, *parent;
ListBase subtree;
- float xs, ys; // do selection
- int store_index; // offset in tree store
- short flag; // flag for non-saved stuff
- short index; // index for data arrays
- short idcode; // from TreeStore id
- short xend; // width of item display, for select
+ float xs, ys; // do selection
+ int store_index; // offset in tree store
+ short flag; // flag for non-saved stuff
+ short index; // index for data arrays
+ short idcode; // from TreeStore id
+ short xend; // width of item display, for select
const char *name;
- void *directdata; // Armature Bones, Base, Sequence, Strip...
- PointerRNA rnaptr; // RNA Pointer
+ void *directdata; // Armature Bones, Base, Sequence, Strip...
+ PointerRNA rnaptr; // RNA Pointer
} TreeElement;
/* TreeElement->flag */
-#define TE_ACTIVE 1
-#define TE_ICONROW 2
-#define TE_LAZY_CLOSED 4
-#define TE_FREE_NAME 8
+#define TE_ACTIVE 1
+#define TE_ICONROW 2
+#define TE_LAZY_CLOSED 4
+#define TE_FREE_NAME 8
/* TreeStoreElem types */
-#define TSE_NLA 1
-#define TSE_NLA_ACTION 2
-#define TSE_DEFGROUP_BASE 3
-#define TSE_DEFGROUP 4
-#define TSE_BONE 5
-#define TSE_EBONE 6
-#define TSE_CONSTRAINT_BASE 7
-#define TSE_CONSTRAINT 8
-#define TSE_MODIFIER_BASE 9
-#define TSE_MODIFIER 10
-#define TSE_LINKED_OB 11
-#define TSE_SCRIPT_BASE 12
-#define TSE_POSE_BASE 13
-#define TSE_POSE_CHANNEL 14
-#define TSE_ANIM_DATA 15
-#define TSE_DRIVER_BASE 16
-#define TSE_DRIVER 17
-
-#define TSE_PROXY 18
-#define TSE_R_LAYER_BASE 19
-#define TSE_R_LAYER 20
-#define TSE_R_PASS 21
-#define TSE_LINKED_MAT 22
+#define TSE_NLA 1
+#define TSE_NLA_ACTION 2
+#define TSE_DEFGROUP_BASE 3
+#define TSE_DEFGROUP 4
+#define TSE_BONE 5
+#define TSE_EBONE 6
+#define TSE_CONSTRAINT_BASE 7
+#define TSE_CONSTRAINT 8
+#define TSE_MODIFIER_BASE 9
+#define TSE_MODIFIER 10
+#define TSE_LINKED_OB 11
+#define TSE_SCRIPT_BASE 12
+#define TSE_POSE_BASE 13
+#define TSE_POSE_CHANNEL 14
+#define TSE_ANIM_DATA 15
+#define TSE_DRIVER_BASE 16
+#define TSE_DRIVER 17
+
+#define TSE_PROXY 18
+#define TSE_R_LAYER_BASE 19
+#define TSE_R_LAYER 20
+#define TSE_R_PASS 21
+#define TSE_LINKED_MAT 22
/* NOTE, is used for light group */
-#define TSE_LINKED_LAMP 23
-#define TSE_POSEGRP_BASE 24
-#define TSE_POSEGRP 25
-#define TSE_SEQUENCE 26
-#define TSE_SEQ_STRIP 27
-#define TSE_SEQUENCE_DUP 28
+#define TSE_LINKED_LAMP 23
+#define TSE_POSEGRP_BASE 24
+#define TSE_POSEGRP 25
+#define TSE_SEQUENCE 26
+#define TSE_SEQ_STRIP 27
+#define TSE_SEQUENCE_DUP 28
#define TSE_LINKED_PSYS 29
-#define TSE_RNA_STRUCT 30
-#define TSE_RNA_PROPERTY 31
-#define TSE_RNA_ARRAY_ELEM 32
-#define TSE_NLA_TRACK 33
-#define TSE_KEYMAP 34
-#define TSE_KEYMAP_ITEM 35
+#define TSE_RNA_STRUCT 30
+#define TSE_RNA_PROPERTY 31
+#define TSE_RNA_ARRAY_ELEM 32
+#define TSE_NLA_TRACK 33
+#define TSE_KEYMAP 34
+#define TSE_KEYMAP_ITEM 35
/* button events */
-#define OL_NAMEBUTTON 1
+#define OL_NAMEBUTTON 1
/* get TreeStoreElem associated with a TreeElement
* < a: (TreeElement) tree element to find stored element for
*/
-#define TREESTORE(a) ((a)?soops->treestore->data+(a)->store_index:NULL)
+#define TREESTORE(a) ((a) ? soops->treestore->data + (a)->store_index : NULL)
/* size constants */
-#define OL_Y_OFFSET 2
+#define OL_Y_OFFSET 2
-#define OL_TOG_RESTRICT_VIEWX (UI_UNIT_X*3)
-#define OL_TOG_RESTRICT_SELECTX (UI_UNIT_X*2)
-#define OL_TOG_RESTRICT_RENDERX UI_UNIT_X
+#define OL_TOG_RESTRICT_VIEWX (UI_UNIT_X * 3)
+#define OL_TOG_RESTRICT_SELECTX (UI_UNIT_X * 2)
+#define OL_TOG_RESTRICT_RENDERX UI_UNIT_X
#define OL_TOGW OL_TOG_RESTRICT_VIEWX
-#define OL_RNA_COLX (UI_UNIT_X*15)
-#define OL_RNA_COL_SIZEX (UI_UNIT_X*7.5f)
-#define OL_RNA_COL_SPACEX (UI_UNIT_X*2.5f)
+#define OL_RNA_COLX (UI_UNIT_X * 15)
+#define OL_RNA_COL_SIZEX (UI_UNIT_X * 7.5f)
+#define OL_RNA_COL_SPACEX (UI_UNIT_X * 2.5f)
/* Outliner Searching --
@@ -145,7 +145,7 @@ typedef struct TreeElement {
#define SEARCHING_OUTLINER(sov) (sov->search_flags & SO_SEARCH_RECURSIVE)
/* is the currrent element open? if so we also show children */
-#define TSELEM_OPEN(telm,sv) ( (telm->flag & TSE_CLOSED)==0 || (SEARCHING_OUTLINER(sv) && (telm->flag & TSE_CHILDSEARCH)) )
+#define TSELEM_OPEN(telm, sv) ( (telm->flag & TSE_CLOSED) == 0 || (SEARCHING_OUTLINER(sv) && (telm->flag & TSE_CHILDSEARCH)) )
/* outliner_tree.c ----------------------------------------------- */
@@ -170,7 +170,7 @@ int tree_element_active(struct bContext *C, struct Scene *scene, SpaceOops *soop
/* outliner_edit.c ---------------------------------------------- */
void outliner_do_object_operation(struct bContext *C, struct Scene *scene, struct SpaceOops *soops, struct ListBase *lb,
- void (*operation_cb)(struct bContext *C, struct Scene *scene, struct TreeElement *, struct TreeStoreElem *, TreeStoreElem *));
+ void (*operation_cb)(struct bContext *C, struct Scene *scene, struct TreeElement *, struct TreeStoreElem *, TreeStoreElem *));
int common_restrict_check(struct bContext *C, struct Object *ob);
diff --git a/source/blender/editors/space_outliner/outliner_ops.c b/source/blender/editors/space_outliner/outliner_ops.c
index d2ef4573ccf..12f8f2cb38b 100644
--- a/source/blender/editors/space_outliner/outliner_ops.c
+++ b/source/blender/editors/space_outliner/outliner_ops.c
@@ -28,9 +28,6 @@
* \ingroup spoutliner
*/
-
-#include <stdlib.h>
-
#include "DNA_space_types.h"
#include "WM_api.h"
@@ -42,9 +39,8 @@
#include "outliner_intern.h"
-/* ************************** registration **********************************/
-
+/* ************************** registration **********************************/
void outliner_operatortypes(void)
{
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c
index c7aa4dc4e92..45687bf96a5 100644
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@ -29,54 +29,23 @@
* \ingroup spoutliner
*/
-#include <math.h>
-#include <string.h>
#include <stdlib.h>
-#include <stddef.h>
#include "MEM_guardedalloc.h"
-#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
-#include "DNA_constraint_types.h"
-#include "DNA_camera_types.h"
#include "DNA_group_types.h"
-#include "DNA_key_types.h"
#include "DNA_lamp_types.h"
#include "DNA_material_types.h"
-#include "DNA_mesh_types.h"
-#include "DNA_meta_types.h"
-#include "DNA_particle_types.h"
+#include "DNA_object_types.h"
#include "DNA_scene_types.h"
-#include "DNA_world_types.h"
#include "DNA_sequence_types.h"
-#include "DNA_object_types.h"
+#include "DNA_world_types.h"
-#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
-#include "BLI_math_base.h"
-
-#if defined WIN32 && !defined _LIBC
-# include "BLI_fnmatch.h" /* use fnmatch included in blenlib */
-#else
-# ifndef _GNU_SOURCE
-# define _GNU_SOURCE
-# endif
-# include <fnmatch.h>
-#endif
-
-#include "BKE_animsys.h"
#include "BKE_context.h"
-#include "BKE_deform.h"
#include "BKE_depsgraph.h"
-#include "BKE_fcurve.h"
-#include "BKE_global.h"
-#include "BKE_group.h"
-#include "BKE_library.h"
-#include "BKE_main.h"
-#include "BKE_modifier.h"
-#include "BKE_report.h"
#include "BKE_scene.h"
#include "BKE_sequencer.h"
@@ -88,12 +57,8 @@
#include "WM_api.h"
#include "WM_types.h"
-#include "BIF_gl.h"
-#include "BIF_glutil.h"
#include "UI_interface.h"
-#include "UI_interface_icons.h"
-#include "UI_resources.h"
#include "UI_view2d.h"
#include "RNA_access.h"
@@ -108,21 +73,21 @@ static int outliner_select(SpaceOops *soops, ListBase *lb, int *index, short *se
{
TreeElement *te;
TreeStoreElem *tselem;
- int change= 0;
+ int change = 0;
- for (te= lb->first; te && *index >= 0; te=te->next, (*index)--) {
- tselem= TREESTORE(te);
+ for (te = lb->first; te && *index >= 0; te = te->next, (*index)--) {
+ tselem = TREESTORE(te);
/* if we've encountered the right item, set its 'Outliner' selection status */
if (*index == 0) {
/* this should be the last one, so no need to do anything with index */
- if ((te->flag & TE_ICONROW)==0) {
+ if ((te->flag & TE_ICONROW) == 0) {
/* -1 value means toggle testing for now... */
if (*selecting == -1) {
if (tselem->flag & TSE_SELECTED)
- *selecting= 0;
+ *selecting = 0;
else
- *selecting= 1;
+ *selecting = 1;
}
/* set selection */
@@ -134,13 +99,13 @@ static int outliner_select(SpaceOops *soops, ListBase *lb, int *index, short *se
change |= 1;
}
}
- else if (TSELEM_OPEN(tselem,soops)) {
+ else if (TSELEM_OPEN(tselem, soops)) {
/* Only try selecting sub-elements if we haven't hit the right element yet
*
* Hack warning:
- * Index must be reduced before supplying it to the sub-tree to try to do
- * selection, however, we need to increment it again for the next loop to
- * function correctly
+ * Index must be reduced before supplying it to the sub-tree to try to do
+ * selection, however, we need to increment it again for the next loop to
+ * function correctly
*/
(*index)--;
change |= outliner_select(soops, &te->subtree, index, selecting);
@@ -159,45 +124,45 @@ static int tree_element_active_renderlayer(bContext *C, TreeElement *te, TreeSto
Scene *sce;
/* paranoia check */
- if (te->idcode!=ID_SCE)
+ if (te->idcode != ID_SCE)
return 0;
- sce= (Scene *)tselem->id;
+ sce = (Scene *)tselem->id;
if (set) {
- sce->r.actlay= tselem->nr;
- WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, sce);
+ sce->r.actlay = tselem->nr;
+ WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, sce);
}
else {
- return sce->r.actlay==tselem->nr;
+ return sce->r.actlay == tselem->nr;
}
return 0;
}
static int tree_element_set_active_object(bContext *C, Scene *scene, SpaceOops *soops, TreeElement *te, int set)
{
- TreeStoreElem *tselem= TREESTORE(te);
+ TreeStoreElem *tselem = TREESTORE(te);
Scene *sce;
Base *base;
- Object *ob= NULL;
+ Object *ob = NULL;
/* if id is not object, we search back */
- if (te->idcode==ID_OB) ob= (Object *)tselem->id;
+ if (te->idcode == ID_OB) ob = (Object *)tselem->id;
else {
- ob= (Object *)outliner_search_back(soops, te, ID_OB);
- if (ob==OBACT) return 0;
+ ob = (Object *)outliner_search_back(soops, te, ID_OB);
+ if (ob == OBACT) return 0;
}
- if (ob==NULL) return 0;
+ if (ob == NULL) return 0;
- sce= (Scene *)outliner_search_back(soops, te, ID_SCE);
+ sce = (Scene *)outliner_search_back(soops, te, ID_SCE);
if (sce && scene != sce) {
ED_screen_set_scene(C, CTX_wm_screen(C), sce);
}
/* find associated base in current scene */
- base= object_in_scene(ob, scene);
+ base = BKE_scene_base_find(scene, ob);
if (base) {
- if (set==2) {
+ if (set == 2) {
/* swap select */
if (base->flag & SELECT)
ED_base_object_select(base, BA_DESELECT);
@@ -206,17 +171,17 @@ static int tree_element_set_active_object(bContext *C, Scene *scene, SpaceOops
}
else {
/* deleselect all */
- scene_deselect_all(scene);
+ BKE_scene_base_deselect_all(scene);
ED_base_object_select(base, BA_SELECT);
}
if (C) {
ED_base_object_activate(C, base); /* adds notifier */
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
}
}
- if (ob!=scene->obedit)
- ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR|EM_DO_UNDO);
+ if (ob != scene->obedit)
+ ED_object_exit_editmode(C, EM_FREEDATA | EM_FREEUNDO | EM_WAITCURSOR | EM_DO_UNDO);
return 1;
}
@@ -227,35 +192,35 @@ static int tree_element_active_material(bContext *C, Scene *scene, SpaceOops *so
Object *ob;
/* we search for the object parent */
- ob= (Object *)outliner_search_back(soops, te, ID_OB);
+ ob = (Object *)outliner_search_back(soops, te, ID_OB);
// note: ob->matbits can be NULL when a local object points to a library mesh.
- if (ob==NULL || ob!=OBACT || ob->matbits==NULL) return 0; // just paranoia
+ if (ob == NULL || ob != OBACT || ob->matbits == NULL) return 0; // just paranoia
/* searching in ob mat array? */
- tes= te->parent;
- if (tes->idcode==ID_OB) {
+ tes = te->parent;
+ if (tes->idcode == ID_OB) {
if (set) {
- ob->actcol= te->index+1;
- ob->matbits[te->index]= 1; // make ob material active too
+ ob->actcol = te->index + 1;
+ ob->matbits[te->index] = 1; // make ob material active too
}
else {
- if (ob->actcol == te->index+1)
+ if (ob->actcol == te->index + 1)
if (ob->matbits[te->index]) return 1;
}
}
/* or we search for obdata material */
else {
if (set) {
- ob->actcol= te->index+1;
- ob->matbits[te->index]= 0; // make obdata material active too
+ ob->actcol = te->index + 1;
+ ob->matbits[te->index] = 0; // make obdata material active too
}
else {
- if (ob->actcol == te->index+1)
- if (ob->matbits[te->index]==0) return 1;
+ if (ob->actcol == te->index + 1)
+ if (ob->matbits[te->index] == 0) return 1;
}
}
if (set) {
- WM_event_add_notifier(C, NC_MATERIAL|ND_SHADING, NULL);
+ WM_event_add_notifier(C, NC_MATERIAL | ND_SHADING, NULL);
}
return 0;
}
@@ -264,10 +229,10 @@ static int tree_element_active_texture(bContext *C, Scene *scene, SpaceOops *soo
{
TreeElement *tep;
TreeStoreElem /* *tselem,*/ *tselemp;
- Object *ob=OBACT;
- SpaceButs *sbuts=NULL;
+ Object *ob = OBACT;
+ SpaceButs *sbuts = NULL;
- if (ob==NULL) return 0; // no active object
+ if (ob == NULL) return 0; // no active object
/*tselem= TREESTORE(te);*/ /*UNUSED*/
@@ -275,11 +240,11 @@ static int tree_element_active_texture(bContext *C, Scene *scene, SpaceOops *soo
/* XXX removed finding sbuts */
/* where is texture linked to? */
- tep= te->parent;
- tselemp= TREESTORE(tep);
+ tep = te->parent;
+ tselemp = TREESTORE(tep);
- if (tep->idcode==ID_WO) {
- World *wrld= (World *)tselemp->id;
+ if (tep->idcode == ID_WO) {
+ World *wrld = (World *)tselemp->id;
if (set) {
if (sbuts) {
@@ -287,43 +252,43 @@ static int tree_element_active_texture(bContext *C, Scene *scene, SpaceOops *soo
// XXX sbuts->texfrom= 1;
}
// XXX extern_set_butspace(F6KEY, 0); // force shading buttons texture
- wrld->texact= te->index;
+ wrld->texact = te->index;
}
else if (tselemp->id == (ID *)(scene->world)) {
- if (wrld->texact==te->index) return 1;
+ if (wrld->texact == te->index) return 1;
}
}
- else if (tep->idcode==ID_LA) {
- Lamp *la= (Lamp *)tselemp->id;
+ else if (tep->idcode == ID_LA) {
+ Lamp *la = (Lamp *)tselemp->id;
if (set) {
if (sbuts) {
// XXX sbuts->tabo= TAB_SHADING_TEX; // hack from header_buttonswin.c
// XXX sbuts->texfrom= 2;
}
// XXX extern_set_butspace(F6KEY, 0); // force shading buttons texture
- la->texact= te->index;
+ la->texact = te->index;
}
else {
if (tselemp->id == ob->data) {
- if (la->texact==te->index) return 1;
+ if (la->texact == te->index) return 1;
}
}
}
- else if (tep->idcode==ID_MA) {
- Material *ma= (Material *)tselemp->id;
+ else if (tep->idcode == ID_MA) {
+ Material *ma = (Material *)tselemp->id;
if (set) {
if (sbuts) {
//sbuts->tabo= TAB_SHADING_TEX; // hack from header_buttonswin.c
// XXX sbuts->texfrom= 0;
}
// XXX extern_set_butspace(F6KEY, 0); // force shading buttons texture
- ma->texact= (char)te->index;
+ ma->texact = (char)te->index;
/* also set active material */
- ob->actcol= tep->index+1;
+ ob->actcol = tep->index + 1;
}
- else if (tep->flag & TE_ACTIVE) { // this is active material
- if (ma->texact==te->index) return 1;
+ else if (tep->flag & TE_ACTIVE) { // this is active material
+ if (ma->texact == te->index) return 1;
}
}
@@ -339,8 +304,8 @@ static int tree_element_active_lamp(bContext *UNUSED(C), Scene *scene, SpaceOops
Object *ob;
/* we search for the object parent */
- ob= (Object *)outliner_search_back(soops, te, ID_OB);
- if (ob==NULL || ob!=OBACT) return 0; // just paranoia
+ ob = (Object *)outliner_search_back(soops, te, ID_OB);
+ if (ob == NULL || ob != OBACT) return 0; // just paranoia
if (set) {
// XXX extern_set_butspace(F5KEY, 0);
@@ -352,7 +317,7 @@ static int tree_element_active_lamp(bContext *UNUSED(C), Scene *scene, SpaceOops
static int tree_element_active_camera(bContext *UNUSED(C), Scene *scene, SpaceOops *soops, TreeElement *te, int set)
{
- Object *ob= (Object *)outliner_search_back(soops, te, ID_OB);
+ Object *ob = (Object *)outliner_search_back(soops, te, ID_OB);
if (set)
return 0;
@@ -363,22 +328,22 @@ static int tree_element_active_camera(bContext *UNUSED(C), Scene *scene, SpaceOo
static int tree_element_active_world(bContext *C, Scene *scene, SpaceOops *soops, TreeElement *te, int set)
{
TreeElement *tep;
- TreeStoreElem *tselem=NULL;
- Scene *sce=NULL;
+ TreeStoreElem *tselem = NULL;
+ Scene *sce = NULL;
- tep= te->parent;
+ tep = te->parent;
if (tep) {
- tselem= TREESTORE(tep);
- sce= (Scene *)tselem->id;
+ tselem = TREESTORE(tep);
+ sce = (Scene *)tselem->id;
}
- if (set) { // make new scene active
+ if (set) { // make new scene active
if (sce && scene != sce) {
ED_screen_set_scene(C, CTX_wm_screen(C), sce);
}
}
- if (tep==NULL || tselem->id == (ID *)scene) {
+ if (tep == NULL || tselem->id == (ID *)scene) {
if (set) {
// XXX extern_set_butspace(F8KEY, 0);
}
@@ -394,34 +359,34 @@ static int tree_element_active_defgroup(bContext *C, Scene *scene, TreeElement *
Object *ob;
/* id in tselem is object */
- ob= (Object *)tselem->id;
+ ob = (Object *)tselem->id;
if (set) {
- BLI_assert(te->index+1 >= 0);
- ob->actdef= te->index+1;
+ BLI_assert(te->index + 1 >= 0);
+ ob->actdef = te->index + 1;
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, ob);
}
else {
- if (ob==OBACT)
- if (ob->actdef== te->index+1) return 1;
+ if (ob == OBACT)
+ if (ob->actdef == te->index + 1) return 1;
}
return 0;
}
static int tree_element_active_posegroup(bContext *C, Scene *scene, TreeElement *te, TreeStoreElem *tselem, int set)
{
- Object *ob= (Object *)tselem->id;
+ Object *ob = (Object *)tselem->id;
if (set) {
if (ob->pose) {
- ob->pose->active_group= te->index+1;
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ ob->pose->active_group = te->index + 1;
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
}
}
else {
- if (ob==OBACT && ob->pose) {
- if (ob->pose->active_group== te->index+1) return 1;
+ if (ob == OBACT && ob->pose) {
+ if (ob->pose->active_group == te->index + 1) return 1;
}
}
return 0;
@@ -429,30 +394,30 @@ static int tree_element_active_posegroup(bContext *C, Scene *scene, TreeElement
static int tree_element_active_posechannel(bContext *C, Scene *scene, TreeElement *te, TreeStoreElem *tselem, int set)
{
- Object *ob= (Object *)tselem->id;
- bArmature *arm= ob->data;
- bPoseChannel *pchan= te->directdata;
+ Object *ob = (Object *)tselem->id;
+ bArmature *arm = ob->data;
+ bPoseChannel *pchan = te->directdata;
if (set) {
if (!(pchan->bone->flag & BONE_HIDDEN_P)) {
- if (set==2) ED_pose_deselectall(ob, 2); // 2 = clear active tag
- else ED_pose_deselectall(ob, 0); // 0 = deselect
+ if (set == 2) ED_pose_deselectall(ob, 2); // 2 = clear active tag
+ else ED_pose_deselectall(ob, 0); // 0 = deselect
- if (set==2 && (pchan->bone->flag & BONE_SELECTED)) {
+ if (set == 2 && (pchan->bone->flag & BONE_SELECTED)) {
pchan->bone->flag &= ~BONE_SELECTED;
}
else {
pchan->bone->flag |= BONE_SELECTED;
- arm->act_bone= pchan->bone;
+ arm->act_bone = pchan->bone;
}
- WM_event_add_notifier(C, NC_OBJECT|ND_BONE_ACTIVE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_BONE_ACTIVE, ob);
}
}
else {
- if (ob==OBACT && ob->pose) {
+ if (ob == OBACT && ob->pose) {
if (pchan->bone->flag & BONE_SELECTED) return 1;
}
}
@@ -461,29 +426,29 @@ static int tree_element_active_posechannel(bContext *C, Scene *scene, TreeElemen
static int tree_element_active_bone(bContext *C, Scene *scene, TreeElement *te, TreeStoreElem *tselem, int set)
{
- bArmature *arm= (bArmature *)tselem->id;
- Bone *bone= te->directdata;
+ bArmature *arm = (bArmature *)tselem->id;
+ Bone *bone = te->directdata;
if (set) {
if (!(bone->flag & BONE_HIDDEN_P)) {
- if (set==2) ED_pose_deselectall(OBACT, 2); // 2 is clear active tag
+ if (set == 2) ED_pose_deselectall(OBACT, 2); // 2 is clear active tag
else ED_pose_deselectall(OBACT, 0);
- if (set==2 && (bone->flag & BONE_SELECTED)) {
+ if (set == 2 && (bone->flag & BONE_SELECTED)) {
bone->flag &= ~BONE_SELECTED;
}
else {
bone->flag |= BONE_SELECTED;
- arm->act_bone= bone;
+ arm->act_bone = bone;
}
- WM_event_add_notifier(C, NC_OBJECT|ND_BONE_ACTIVE, OBACT);
+ WM_event_add_notifier(C, NC_OBJECT | ND_BONE_ACTIVE, OBACT);
}
}
else {
- Object *ob= OBACT;
+ Object *ob = OBACT;
- if (ob && ob->data==arm) {
+ if (ob && ob->data == arm) {
if (bone->flag & BONE_SELECTED) return 1;
}
}
@@ -495,32 +460,32 @@ static int tree_element_active_bone(bContext *C, Scene *scene, TreeElement *te,
static void tree_element_active_ebone__sel(bContext *C, Scene *scene, bArmature *arm, EditBone *ebone, short sel)
{
if (sel) {
- ebone->flag |= BONE_SELECTED|BONE_ROOTSEL|BONE_TIPSEL;
- arm->act_edbone= ebone;
+ ebone->flag |= BONE_SELECTED | BONE_ROOTSEL | BONE_TIPSEL;
+ arm->act_edbone = ebone;
// flush to parent?
if (ebone->parent && (ebone->flag & BONE_CONNECTED)) ebone->parent->flag |= BONE_TIPSEL;
}
else {
- ebone->flag &= ~(BONE_SELECTED|BONE_ROOTSEL|BONE_TIPSEL);
+ ebone->flag &= ~(BONE_SELECTED | BONE_ROOTSEL | BONE_TIPSEL);
// flush to parent?
if (ebone->parent && (ebone->flag & BONE_CONNECTED)) ebone->parent->flag &= ~BONE_TIPSEL;
}
- WM_event_add_notifier(C, NC_OBJECT|ND_BONE_ACTIVE, scene->obedit);
+ WM_event_add_notifier(C, NC_OBJECT | ND_BONE_ACTIVE, scene->obedit);
}
static int tree_element_active_ebone(bContext *C, Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tselem), int set)
{
- bArmature *arm= scene->obedit->data;
- EditBone *ebone= te->directdata;
+ bArmature *arm = scene->obedit->data;
+ EditBone *ebone = te->directdata;
- if (set==1) {
+ if (set == 1) {
if (!(ebone->flag & BONE_HIDDEN_A)) {
- ED_armature_deselect_all(scene->obedit, 0); // deselect
+ ED_armature_deselect_all(scene->obedit, 0); // deselect
tree_element_active_ebone__sel(C, scene, arm, ebone, TRUE);
return 1;
}
}
- else if (set==2) {
+ else if (set == 2) {
if (!(ebone->flag & BONE_HIDDEN_A)) {
if (!(ebone->flag & BONE_SELECTED)) {
tree_element_active_ebone__sel(C, scene, arm, ebone, TRUE);
@@ -542,9 +507,9 @@ static int tree_element_active_ebone(bContext *C, Scene *scene, TreeElement *te,
static int tree_element_active_modifier(bContext *C, TreeElement *UNUSED(te), TreeStoreElem *tselem, int set)
{
if (set) {
- Object *ob= (Object *)tselem->id;
+ Object *ob = (Object *)tselem->id;
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);
// XXX extern_set_butspace(F9KEY, 0);
}
@@ -555,9 +520,9 @@ static int tree_element_active_modifier(bContext *C, TreeElement *UNUSED(te), Tr
static int tree_element_active_psys(bContext *C, Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *tselem, int set)
{
if (set) {
- Object *ob= (Object *)tselem->id;
+ Object *ob = (Object *)tselem->id;
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE | NA_EDITED, ob);
// XXX extern_set_butspace(F7KEY, 0);
}
@@ -568,9 +533,9 @@ static int tree_element_active_psys(bContext *C, Scene *UNUSED(scene), TreeEleme
static int tree_element_active_constraint(bContext *C, TreeElement *UNUSED(te), TreeStoreElem *tselem, int set)
{
if (set) {
- Object *ob= (Object *)tselem->id;
+ Object *ob = (Object *)tselem->id;
- WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT, ob);
// XXX extern_set_butspace(F7KEY, 0);
}
@@ -585,12 +550,12 @@ static int tree_element_active_text(bContext *UNUSED(C), Scene *UNUSED(scene), S
static int tree_element_active_pose(bContext *C, Scene *scene, TreeElement *UNUSED(te), TreeStoreElem *tselem, int set)
{
- Object *ob= (Object *)tselem->id;
- Base *base= object_in_scene(ob, scene);
+ Object *ob = (Object *)tselem->id;
+ Base *base = BKE_scene_base_find(scene, ob);
if (set) {
if (scene->obedit)
- ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR|EM_DO_UNDO);
+ ED_object_exit_editmode(C, EM_FREEDATA | EM_FREEUNDO | EM_WAITCURSOR | EM_DO_UNDO);
if (ob->mode & OB_MODE_POSE)
ED_armature_exit_posemode(C, base);
@@ -605,7 +570,7 @@ static int tree_element_active_pose(bContext *C, Scene *scene, TreeElement *UNUS
static int tree_element_active_sequence(TreeElement *te, TreeStoreElem *UNUSED(tselem), int set)
{
- Sequence *seq= (Sequence*) te->directdata;
+ Sequence *seq = (Sequence *) te->directdata;
if (set) {
// XXX select_single_seq(seq, 1);
@@ -620,26 +585,26 @@ static int tree_element_active_sequence(TreeElement *te, TreeStoreElem *UNUSED(t
static int tree_element_active_sequence_dup(Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tselem), int set)
{
Sequence *seq, *p;
- Editing *ed= seq_give_editing(scene, FALSE);
+ Editing *ed = seq_give_editing(scene, FALSE);
- seq= (Sequence*)te->directdata;
- if (set==0) {
+ seq = (Sequence *)te->directdata;
+ if (set == 0) {
if (seq->flag & SELECT)
return(1);
return(0);
}
// XXX select_single_seq(seq, 1);
- p= ed->seqbasep->first;
+ p = ed->seqbasep->first;
while (p) {
if ((!p->strip) || (!p->strip->stripdata) || (!p->strip->stripdata->name)) {
- p= p->next;
+ p = p->next;
continue;
}
// if (!strcmp(p->strip->stripdata->name, seq->strip->stripdata->name))
// XXX select_single_seq(p, 0);
- p= p->next;
+ p = p->next;
}
return(0);
}
@@ -648,7 +613,7 @@ static int tree_element_active_keymap_item(bContext *UNUSED(C), TreeElement *te,
{
wmKeyMapItem *kmi = te->directdata;
- if (set==0) {
+ if (set == 0) {
if (kmi->flag & KMI_INACTIVE) return 0;
return 1;
}
@@ -664,7 +629,7 @@ static int tree_element_active_keymap_item(bContext *UNUSED(C), TreeElement *te,
int tree_element_active(bContext *C, Scene *scene, SpaceOops *soops, TreeElement *te, int set)
{
- switch(te->idcode) {
+ switch (te->idcode) {
/* Note: no ID_OB: objects are handled specially to allow multiple
* selection. See do_outliner_item_activate. */
case ID_MA:
@@ -687,7 +652,7 @@ int tree_element_active(bContext *C, Scene *scene, SpaceOops *soops, TreeElement
/* Context can be NULL when set==0 */
int tree_element_type_active(bContext *C, Scene *scene, SpaceOops *soops, TreeElement *te, TreeStoreElem *tselem, int set)
{
- switch(tselem->type) {
+ switch (tselem->type) {
case TSE_DEFGROUP:
return tree_element_active_defgroup(C, scene, te, tselem, set);
case TSE_BONE:
@@ -698,7 +663,7 @@ int tree_element_type_active(bContext *C, Scene *scene, SpaceOops *soops, TreeEl
return tree_element_active_modifier(C, te, tselem, set);
case TSE_LINKED_OB:
if (set) tree_element_set_active_object(C, scene, soops, te, set);
- else if (tselem->id==(ID *)OBACT) return 1;
+ else if (tselem->id == (ID *)OBACT) return 1;
break;
case TSE_LINKED_PSYS:
return tree_element_active_psys(C, scene, te, tselem, set);
@@ -728,14 +693,14 @@ int tree_element_type_active(bContext *C, Scene *scene, SpaceOops *soops, TreeEl
static int do_outliner_item_activate(bContext *C, Scene *scene, ARegion *ar, SpaceOops *soops, TreeElement *te, int extend, const float mval[2])
{
- if (mval[1]>te->ys && mval[1]<te->ys+UI_UNIT_Y) {
- TreeStoreElem *tselem= TREESTORE(te);
- int openclose= 0;
+ if (mval[1] > te->ys && mval[1] < te->ys + UI_UNIT_Y) {
+ TreeStoreElem *tselem = TREESTORE(te);
+ int openclose = 0;
/* open close icon */
- if ((te->flag & TE_ICONROW)==0) { // hidden icon, no open/close
- if ( mval[0]>te->xs && mval[0]<te->xs+UI_UNIT_X)
- openclose= 1;
+ if ((te->flag & TE_ICONROW) == 0) { // hidden icon, no open/close
+ if (mval[0] > te->xs && mval[0] < te->xs + UI_UNIT_X)
+ openclose = 1;
}
if (openclose) {
@@ -753,62 +718,62 @@ static int do_outliner_item_activate(bContext *C, Scene *scene, ARegion *ar, Spa
return 1;
}
/* name and first icon */
- else if (mval[0]>te->xs+UI_UNIT_X && mval[0]<te->xend) {
+ else if (mval[0] > te->xs + UI_UNIT_X && mval[0] < te->xend) {
/* always makes active object */
- if (tselem->type!=TSE_SEQUENCE && tselem->type!=TSE_SEQ_STRIP && tselem->type!=TSE_SEQUENCE_DUP)
- tree_element_set_active_object(C, scene, soops, te, 1 + (extend!=0 && tselem->type==0));
+ if (tselem->type != TSE_SEQUENCE && tselem->type != TSE_SEQ_STRIP && tselem->type != TSE_SEQUENCE_DUP)
+ tree_element_set_active_object(C, scene, soops, te, 1 + (extend != 0 && tselem->type == 0));
- if (tselem->type==0) { // the lib blocks
+ if (tselem->type == 0) { // the lib blocks
/* editmode? */
- if (te->idcode==ID_SCE) {
- if (scene!=(Scene *)tselem->id) {
+ if (te->idcode == ID_SCE) {
+ if (scene != (Scene *)tselem->id) {
ED_screen_set_scene(C, CTX_wm_screen(C), (Scene *)tselem->id);
}
}
- else if (te->idcode==ID_GR) {
- Group *gr= (Group *)tselem->id;
+ else if (te->idcode == ID_GR) {
+ Group *gr = (Group *)tselem->id;
GroupObject *gob;
if (extend) {
- int sel= BA_SELECT;
- for (gob= gr->gobject.first; gob; gob= gob->next) {
+ int sel = BA_SELECT;
+ for (gob = gr->gobject.first; gob; gob = gob->next) {
if (gob->ob->flag & SELECT) {
- sel= BA_DESELECT;
+ sel = BA_DESELECT;
break;
}
}
- for (gob= gr->gobject.first; gob; gob= gob->next) {
- ED_base_object_select(object_in_scene(gob->ob, scene), sel);
+ for (gob = gr->gobject.first; gob; gob = gob->next) {
+ ED_base_object_select(BKE_scene_base_find(scene, gob->ob), sel);
}
}
else {
- scene_deselect_all(scene);
+ BKE_scene_base_deselect_all(scene);
- for (gob= gr->gobject.first; gob; gob= gob->next) {
+ for (gob = gr->gobject.first; gob; gob = gob->next) {
if ((gob->ob->flag & SELECT) == 0)
- ED_base_object_select(object_in_scene(gob->ob, scene), BA_SELECT);
+ ED_base_object_select(BKE_scene_base_find(scene, gob->ob), BA_SELECT);
}
}
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
}
else if (ELEM5(te->idcode, ID_ME, ID_CU, ID_MB, ID_LT, ID_AR)) {
WM_operator_name_call(C, "OBJECT_OT_editmode_toggle", WM_OP_INVOKE_REGION_WIN, NULL);
}
- else { // rest of types
+ else { // rest of types
tree_element_active(C, scene, soops, te, 1);
}
}
- else tree_element_type_active(C, scene, soops, te, tselem, 1+(extend!=0));
+ else tree_element_type_active(C, scene, soops, te, tselem, 1 + (extend != 0));
return 1;
}
}
- for (te= te->subtree.first; te; te= te->next) {
+ for (te = te->subtree.first; te; te = te->next) {
if (do_outliner_item_activate(C, scene, ar, soops, te, extend, mval)) return 1;
}
return 0;
@@ -817,23 +782,23 @@ static int do_outliner_item_activate(bContext *C, Scene *scene, ARegion *ar, Spa
/* event can enterkey, then it opens/closes */
static int outliner_item_activate(bContext *C, wmOperator *op, wmEvent *event)
{
- Scene *scene= CTX_data_scene(C);
- ARegion *ar= CTX_wm_region(C);
- SpaceOops *soops= CTX_wm_space_outliner(C);
+ Scene *scene = CTX_data_scene(C);
+ ARegion *ar = CTX_wm_region(C);
+ SpaceOops *soops = CTX_wm_space_outliner(C);
TreeElement *te;
float fmval[2];
- int extend= RNA_boolean_get(op->ptr, "extend");
+ int extend = RNA_boolean_get(op->ptr, "extend");
- UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], fmval, fmval+1);
+ UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], fmval, fmval + 1);
- if ( !ELEM3(soops->outlinevis, SO_DATABLOCKS, SO_USERDEF, SO_KEYMAP) &&
- !(soops->flag & SO_HIDE_RESTRICTCOLS) &&
- (fmval[0] > ar->v2d.cur.xmax - OL_TOG_RESTRICT_VIEWX))
+ if (!ELEM3(soops->outlinevis, SO_DATABLOCKS, SO_USERDEF, SO_KEYMAP) &&
+ !(soops->flag & SO_HIDE_RESTRICTCOLS) &&
+ (fmval[0] > ar->v2d.cur.xmax - OL_TOG_RESTRICT_VIEWX))
{
return OPERATOR_CANCELLED;
}
- for (te= soops->tree.first; te; te= te->next) {
+ for (te = soops->tree.first; te; te = te->next) {
if (do_outliner_item_activate(C, scene, ar, soops, te, extend, fmval)) break;
}
@@ -841,12 +806,12 @@ static int outliner_item_activate(bContext *C, wmOperator *op, wmEvent *event)
ED_undo_push(C, "Outliner click event");
}
else {
- short selecting= -1;
+ short selecting = -1;
int row;
/* get row number - 100 here is just a dummy value since we don't need the column */
UI_view2d_listview_view_to_cell(&ar->v2d, 1000, UI_UNIT_Y, 0.0f, OL_Y_OFFSET,
- fmval[0], fmval[1], NULL, &row);
+ fmval[0], fmval[1], NULL, &row);
/* select relevant row */
if (outliner_select(soops, &soops->tree, &row, &selecting)) {
@@ -882,7 +847,7 @@ void OUTLINER_OT_item_activate(wmOperatorType *ot)
/* **************** Border Select Tool ****************** */
static void outliner_item_border_select(Scene *scene, SpaceOops *soops, rctf *rectf, TreeElement *te, int gesture_mode)
{
- TreeStoreElem *tselem= TREESTORE(te);
+ TreeStoreElem *tselem = TREESTORE(te);
if (te->ys <= rectf->ymax && te->ys + UI_UNIT_Y >= rectf->ymin) {
if (gesture_mode == GESTURE_MODAL_SELECT) {
@@ -904,13 +869,13 @@ static void outliner_item_border_select(Scene *scene, SpaceOops *soops, rctf *re
static int outliner_border_select_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
- SpaceOops *soops= CTX_wm_space_outliner(C);
- ARegion *ar= CTX_wm_region(C);
+ Scene *scene = CTX_data_scene(C);
+ SpaceOops *soops = CTX_wm_space_outliner(C);
+ ARegion *ar = CTX_wm_region(C);
TreeElement *te;
rcti rect;
rctf rectf;
- int gesture_mode= RNA_int_get(op->ptr, "gesture_mode");
+ int gesture_mode = RNA_int_get(op->ptr, "gesture_mode");
rect.xmin = RNA_int_get(op->ptr, "xmin");
rect.ymin = RNA_int_get(op->ptr, "ymin");
@@ -920,11 +885,11 @@ static int outliner_border_select_exec(bContext *C, wmOperator *op)
rect.ymax = RNA_int_get(op->ptr, "ymax");
UI_view2d_region_to_view(&ar->v2d, rect.xmax, rect.ymax, &rectf.xmax, &rectf.ymax);
- for (te= soops->tree.first; te; te= te->next) {
+ for (te = soops->tree.first; te; te = te->next) {
outliner_item_border_select(scene, soops, &rectf, te, gesture_mode);
}
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
ED_region_tag_redraw(ar);
return OPERATOR_FINISHED;
@@ -946,7 +911,7 @@ void OUTLINER_OT_select_border(wmOperatorType *ot)
ot->poll = ED_operator_outliner_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* rna */
WM_operator_properties_gesture_border(ot, FALSE);
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c
index ba3637a88af..a3ed2eac2d5 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -29,56 +29,31 @@
* \ingroup spoutliner
*/
-#include <math.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stddef.h>
-
#include "MEM_guardedalloc.h"
#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
-#include "DNA_constraint_types.h"
-#include "DNA_camera_types.h"
#include "DNA_group_types.h"
-#include "DNA_key_types.h"
#include "DNA_lamp_types.h"
#include "DNA_material_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meta_types.h"
-#include "DNA_particle_types.h"
#include "DNA_scene_types.h"
#include "DNA_world_types.h"
-#include "DNA_sequence_types.h"
#include "DNA_object_types.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
-#include "BLI_math_base.h"
-
-#if defined WIN32 && !defined _LIBC
-# include "BLI_fnmatch.h" /* use fnmatch included in blenlib */
-#else
-# ifndef _GNU_SOURCE
-# define _GNU_SOURCE
-# endif
-# include <fnmatch.h>
-#endif
-
#include "BKE_animsys.h"
#include "BKE_context.h"
-#include "BKE_deform.h"
#include "BKE_depsgraph.h"
#include "BKE_fcurve.h"
-#include "BKE_global.h"
#include "BKE_group.h"
#include "BKE_library.h"
#include "BKE_main.h"
-#include "BKE_modifier.h"
#include "BKE_report.h"
#include "BKE_scene.h"
-#include "BKE_sequencer.h"
#include "ED_armature.h"
#include "ED_object.h"
@@ -88,12 +63,7 @@
#include "WM_api.h"
#include "WM_types.h"
-#include "BIF_gl.h"
-#include "BIF_glutil.h"
-
#include "UI_interface.h"
-#include "UI_interface_icons.h"
-#include "UI_resources.h"
#include "UI_view2d.h"
#include "RNA_access.h"
@@ -107,31 +77,31 @@
/* ************ SELECTION OPERATIONS ********* */
static void set_operation_types(SpaceOops *soops, ListBase *lb,
- int *scenelevel,
- int *objectlevel,
- int *idlevel,
- int *datalevel)
+ int *scenelevel,
+ int *objectlevel,
+ int *idlevel,
+ int *datalevel)
{
TreeElement *te;
TreeStoreElem *tselem;
- for (te= lb->first; te; te= te->next) {
- tselem= TREESTORE(te);
+ for (te = lb->first; te; te = te->next) {
+ tselem = TREESTORE(te);
if (tselem->flag & TSE_SELECTED) {
if (tselem->type) {
- if (*datalevel==0)
- *datalevel= tselem->type;
- else if (*datalevel!=tselem->type)
- *datalevel= -1;
+ if (*datalevel == 0)
+ *datalevel = tselem->type;
+ else if (*datalevel != tselem->type)
+ *datalevel = -1;
}
else {
- int idcode= GS(tselem->id->name);
- switch(idcode) {
+ int idcode = GS(tselem->id->name);
+ switch (idcode) {
case ID_SCE:
- *scenelevel= 1;
+ *scenelevel = 1;
break;
case ID_OB:
- *objectlevel= 1;
+ *objectlevel = 1;
break;
case ID_ME: case ID_CU: case ID_MB: case ID_LT:
@@ -139,15 +109,15 @@ static void set_operation_types(SpaceOops *soops, ListBase *lb,
case ID_MA: case ID_TE: case ID_IP: case ID_IM:
case ID_SO: case ID_KE: case ID_WO: case ID_AC:
case ID_NLA: case ID_TXT: case ID_GR:
- if (*idlevel==0) *idlevel= idcode;
- else if (*idlevel!=idcode) *idlevel= -1;
- break;
+ if (*idlevel == 0) *idlevel = idcode;
+ else if (*idlevel != idcode) *idlevel = -1;
+ break;
}
}
}
- if (TSELEM_OPEN(tselem,soops)) {
+ if (TSELEM_OPEN(tselem, soops)) {
set_operation_types(soops, &te->subtree,
- scenelevel, objectlevel, idlevel, datalevel);
+ scenelevel, objectlevel, idlevel, datalevel);
}
}
}
@@ -160,62 +130,62 @@ static void unlink_action_cb(bContext *C, Scene *UNUSED(scene), TreeElement *UNU
static void unlink_material_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeElement *te, TreeStoreElem *tsep, TreeStoreElem *UNUSED(tselem))
{
- Material **matar=NULL;
- int a, totcol=0;
+ Material **matar = NULL;
+ int a, totcol = 0;
- if ( GS(tsep->id->name)==ID_OB) {
- Object *ob= (Object *)tsep->id;
- totcol= ob->totcol;
- matar= ob->mat;
+ if (GS(tsep->id->name) == ID_OB) {
+ Object *ob = (Object *)tsep->id;
+ totcol = ob->totcol;
+ matar = ob->mat;
}
- else if ( GS(tsep->id->name)==ID_ME) {
- Mesh *me= (Mesh *)tsep->id;
- totcol= me->totcol;
- matar= me->mat;
+ else if (GS(tsep->id->name) == ID_ME) {
+ Mesh *me = (Mesh *)tsep->id;
+ totcol = me->totcol;
+ matar = me->mat;
}
- else if ( GS(tsep->id->name)==ID_CU) {
- Curve *cu= (Curve *)tsep->id;
- totcol= cu->totcol;
- matar= cu->mat;
+ else if (GS(tsep->id->name) == ID_CU) {
+ Curve *cu = (Curve *)tsep->id;
+ totcol = cu->totcol;
+ matar = cu->mat;
}
- else if ( GS(tsep->id->name)==ID_MB) {
- MetaBall *mb= (MetaBall *)tsep->id;
- totcol= mb->totcol;
- matar= mb->mat;
+ else if (GS(tsep->id->name) == ID_MB) {
+ MetaBall *mb = (MetaBall *)tsep->id;
+ totcol = mb->totcol;
+ matar = mb->mat;
}
- for (a=0; a<totcol; a++) {
- if (a==te->index && matar[a]) {
+ for (a = 0; a < totcol; a++) {
+ if (a == te->index && matar[a]) {
matar[a]->id.us--;
- matar[a]= NULL;
+ matar[a] = NULL;
}
}
}
static void unlink_texture_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeElement *te, TreeStoreElem *tsep, TreeStoreElem *UNUSED(tselem))
{
- MTex **mtex= NULL;
+ MTex **mtex = NULL;
int a;
- if ( GS(tsep->id->name)==ID_MA) {
- Material *ma= (Material *)tsep->id;
- mtex= ma->mtex;
+ if (GS(tsep->id->name) == ID_MA) {
+ Material *ma = (Material *)tsep->id;
+ mtex = ma->mtex;
}
- else if ( GS(tsep->id->name)==ID_LA) {
- Lamp *la= (Lamp *)tsep->id;
- mtex= la->mtex;
+ else if (GS(tsep->id->name) == ID_LA) {
+ Lamp *la = (Lamp *)tsep->id;
+ mtex = la->mtex;
}
- else if ( GS(tsep->id->name)==ID_WO) {
- World *wrld= (World *)tsep->id;
- mtex= wrld->mtex;
+ else if (GS(tsep->id->name) == ID_WO) {
+ World *wrld = (World *)tsep->id;
+ mtex = wrld->mtex;
}
else return;
- for (a=0; a<MAX_MTEX; a++) {
- if (a==te->index && mtex[a]) {
+ for (a = 0; a < MAX_MTEX; a++) {
+ if (a == te->index && mtex[a]) {
if (mtex[a]->tex) {
mtex[a]->tex->id.us--;
- mtex[a]->tex= NULL;
+ mtex[a]->tex = NULL;
}
}
}
@@ -223,16 +193,16 @@ static void unlink_texture_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeEle
static void unlink_group_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *tsep, TreeStoreElem *tselem)
{
- Group *group= (Group *)tselem->id;
+ Group *group = (Group *)tselem->id;
if (tsep) {
- if ( GS(tsep->id->name)==ID_OB) {
- Object *ob= (Object *)tsep->id;
- ob->dup_group= NULL;
+ if (GS(tsep->id->name) == ID_OB) {
+ Object *ob = (Object *)tsep->id;
+ ob->dup_group = NULL;
}
}
else {
- unlink_group(group);
+ BKE_group_unlink(group);
}
}
@@ -247,20 +217,20 @@ static void unlink_world_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeEleme
}
static void outliner_do_libdata_operation(bContext *C, Scene *scene, SpaceOops *soops, ListBase *lb,
- void (*operation_cb)(bContext *C, Scene *scene, TreeElement *, TreeStoreElem *, TreeStoreElem *))
+ void (*operation_cb)(bContext *C, Scene *scene, TreeElement *, TreeStoreElem *, TreeStoreElem *))
{
TreeElement *te;
TreeStoreElem *tselem;
- for (te=lb->first; te; te= te->next) {
- tselem= TREESTORE(te);
+ for (te = lb->first; te; te = te->next) {
+ tselem = TREESTORE(te);
if (tselem->flag & TSE_SELECTED) {
- if (tselem->type==0) {
- TreeStoreElem *tsep= TREESTORE(te->parent);
+ if (tselem->type == 0) {
+ TreeStoreElem *tsep = TREESTORE(te->parent);
operation_cb(C, scene, te, tsep, tselem);
}
}
- if (TSELEM_OPEN(tselem,soops)) {
+ if (TSELEM_OPEN(tselem, soops)) {
outliner_do_libdata_operation(C, scene, soops, &te->subtree, operation_cb);
}
}
@@ -270,10 +240,10 @@ static void outliner_do_libdata_operation(bContext *C, Scene *scene, SpaceOops *
static void object_select_cb(bContext *UNUSED(C), Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem)
{
- Base *base= (Base *)te->directdata;
+ Base *base = (Base *)te->directdata;
- if (base==NULL) base= object_in_scene((Object *)tselem->id, scene);
- if (base && ((base->object->restrictflag & OB_RESTRICT_VIEW)==0)) {
+ if (base == NULL) base = BKE_scene_base_find(scene, (Object *)tselem->id);
+ if (base && ((base->object->restrictflag & OB_RESTRICT_VIEW) == 0)) {
base->flag |= SELECT;
base->object->flag |= SELECT;
}
@@ -281,9 +251,9 @@ static void object_select_cb(bContext *UNUSED(C), Scene *scene, TreeElement *te,
static void object_deselect_cb(bContext *UNUSED(C), Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem)
{
- Base *base= (Base *)te->directdata;
+ Base *base = (Base *)te->directdata;
- if (base==NULL) base= object_in_scene((Object *)tselem->id, scene);
+ if (base == NULL) base = BKE_scene_base_find(scene, (Object *)tselem->id);
if (base) {
base->flag &= ~SELECT;
base->object->flag &= ~SELECT;
@@ -292,18 +262,18 @@ static void object_deselect_cb(bContext *UNUSED(C), Scene *scene, TreeElement *t
static void object_delete_cb(bContext *C, Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem)
{
- Base *base= (Base *)te->directdata;
+ Base *base = (Base *)te->directdata;
- if (base==NULL)
- base= object_in_scene((Object *)tselem->id, scene);
+ if (base == NULL)
+ base = BKE_scene_base_find(scene, (Object *)tselem->id);
if (base) {
// check also library later
- if (scene->obedit==base->object)
- ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR|EM_DO_UNDO);
+ if (scene->obedit == base->object)
+ ED_object_exit_editmode(C, EM_FREEDATA | EM_FREEUNDO | EM_WAITCURSOR | EM_DO_UNDO);
ED_base_object_free_and_unlink(CTX_data_main(C), scene, base);
- te->directdata= NULL;
- tselem->id= NULL;
+ te->directdata = NULL;
+ tselem->id = NULL;
}
}
@@ -313,7 +283,7 @@ static void id_local_cb(bContext *C, Scene *UNUSED(scene), TreeElement *UNUSED(t
/* if the ID type has no special local function,
* just clear the lib */
if (id_make_local(tselem->id, FALSE) == FALSE) {
- Main *bmain= CTX_data_main(C);
+ Main *bmain = CTX_data_main(C);
id_clear_lib_data(bmain, tselem->id);
}
}
@@ -374,41 +344,41 @@ static void singleuser_world_cb(bContext *C, Scene *UNUSED(scene), TreeElement *
static void group_linkobs2scene_cb(bContext *UNUSED(C), Scene *scene, TreeElement *UNUSED(te), TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem)
{
- Group *group= (Group *)tselem->id;
+ Group *group = (Group *)tselem->id;
GroupObject *gob;
Base *base;
- for (gob=group->gobject.first; gob; gob=gob->next) {
- base= object_in_scene(gob->ob, scene);
+ for (gob = group->gobject.first; gob; gob = gob->next) {
+ base = BKE_scene_base_find(scene, gob->ob);
if (base) {
base->object->flag |= SELECT;
base->flag |= SELECT;
}
else {
/* link to scene */
- base= MEM_callocN( sizeof(Base), "add_base");
+ base = MEM_callocN(sizeof(Base), "add_base");
BLI_addhead(&scene->base, base);
- base->lay= (1<<20)-1; /*v3d->lay;*/ /* would be nice to use the 3d layer but the include's not here */
+ base->lay = (1 << 20) - 1; /*v3d->lay;*/ /* would be nice to use the 3d layer but the include's not here */
gob->ob->flag |= SELECT;
base->flag = gob->ob->flag;
- base->object= gob->ob;
+ base->object = gob->ob;
id_lib_extern((ID *)gob->ob); /* in case these are from a linked group */
}
}
}
void outliner_do_object_operation(bContext *C, Scene *scene_act, SpaceOops *soops, ListBase *lb,
- void (*operation_cb)(bContext *C, Scene *scene, TreeElement *, TreeStoreElem *, TreeStoreElem *))
+ void (*operation_cb)(bContext *C, Scene *scene, TreeElement *, TreeStoreElem *, TreeStoreElem *))
{
TreeElement *te;
TreeStoreElem *tselem;
- for (te=lb->first; te; te= te->next) {
- tselem= TREESTORE(te);
+ for (te = lb->first; te; te = te->next) {
+ tselem = TREESTORE(te);
if (tselem->flag & TSE_SELECTED) {
- if (tselem->type==0 && te->idcode==ID_OB) {
+ if (tselem->type == 0 && te->idcode == ID_OB) {
// when objects selected in other scenes... dunno if that should be allowed
- Scene *scene_owner= (Scene *)outliner_search_back(soops, te, ID_SCE);
+ Scene *scene_owner = (Scene *)outliner_search_back(soops, te, ID_SCE);
if (scene_owner && scene_act != scene_owner) {
ED_screen_set_scene(C, CTX_wm_screen(C), scene_owner);
}
@@ -418,7 +388,7 @@ void outliner_do_object_operation(bContext *C, Scene *scene_act, SpaceOops *soop
operation_cb(C, scene_owner ? scene_owner : scene_act, te, NULL, tselem);
}
}
- if (TSELEM_OPEN(tselem,soops)) {
+ if (TSELEM_OPEN(tselem, soops)) {
outliner_do_object_operation(C, scene_act, soops, &te->subtree, operation_cb);
}
}
@@ -446,7 +416,7 @@ static void refreshdrivers_animdata_cb(int UNUSED(event), TreeElement *UNUSED(te
FCurve *fcu;
/* loop over drivers, performing refresh (i.e. check graph_buttons.c and rna_fcurve.c for details) */
- for (fcu = iat->adt->drivers.first; fcu; fcu= fcu->next) {
+ for (fcu = iat->adt->drivers.first; fcu; fcu = fcu->next) {
fcu->flag &= ~FCURVE_DISABLED;
if (fcu->driver)
@@ -458,74 +428,74 @@ static void refreshdrivers_animdata_cb(int UNUSED(event), TreeElement *UNUSED(te
static void pchan_cb(int event, TreeElement *te, TreeStoreElem *UNUSED(tselem))
{
- bPoseChannel *pchan= (bPoseChannel *)te->directdata;
+ bPoseChannel *pchan = (bPoseChannel *)te->directdata;
- if (event==1)
+ if (event == 1)
pchan->bone->flag |= BONE_SELECTED;
- else if (event==2)
+ else if (event == 2)
pchan->bone->flag &= ~BONE_SELECTED;
- else if (event==3) {
+ else if (event == 3) {
pchan->bone->flag |= BONE_HIDDEN_P;
pchan->bone->flag &= ~BONE_SELECTED;
}
- else if (event==4)
+ else if (event == 4)
pchan->bone->flag &= ~BONE_HIDDEN_P;
}
static void bone_cb(int event, TreeElement *te, TreeStoreElem *UNUSED(tselem))
{
- Bone *bone= (Bone *)te->directdata;
+ Bone *bone = (Bone *)te->directdata;
- if (event==1)
+ if (event == 1)
bone->flag |= BONE_SELECTED;
- else if (event==2)
+ else if (event == 2)
bone->flag &= ~BONE_SELECTED;
- else if (event==3) {
+ else if (event == 3) {
bone->flag |= BONE_HIDDEN_P;
bone->flag &= ~BONE_SELECTED;
}
- else if (event==4)
+ else if (event == 4)
bone->flag &= ~BONE_HIDDEN_P;
}
static void ebone_cb(int event, TreeElement *te, TreeStoreElem *UNUSED(tselem))
{
- EditBone *ebone= (EditBone *)te->directdata;
+ EditBone *ebone = (EditBone *)te->directdata;
- if (event==1)
+ if (event == 1)
ebone->flag |= BONE_SELECTED;
- else if (event==2)
+ else if (event == 2)
ebone->flag &= ~BONE_SELECTED;
- else if (event==3) {
+ else if (event == 3) {
ebone->flag |= BONE_HIDDEN_A;
- ebone->flag &= ~BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL;
+ ebone->flag &= ~BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL;
}
- else if (event==4)
+ else if (event == 4)
ebone->flag &= ~BONE_HIDDEN_A;
}
static void sequence_cb(int event, TreeElement *UNUSED(te), TreeStoreElem *UNUSED(tselem))
{
// Sequence *seq= (Sequence*) te->directdata;
- if (event==1) {
+ if (event == 1) {
// XXX select_single_seq(seq, 1);
}
}
static void outliner_do_data_operation(SpaceOops *soops, int type, int event, ListBase *lb,
- void (*operation_cb)(int, TreeElement *, TreeStoreElem *))
+ void (*operation_cb)(int, TreeElement *, TreeStoreElem *))
{
TreeElement *te;
TreeStoreElem *tselem;
- for (te=lb->first; te; te= te->next) {
- tselem= TREESTORE(te);
+ for (te = lb->first; te; te = te->next) {
+ tselem = TREESTORE(te);
if (tselem->flag & TSE_SELECTED) {
- if (tselem->type==type) {
+ if (tselem->type == type) {
operation_cb(event, te, tselem);
}
}
- if (TSELEM_OPEN(tselem,soops)) {
+ if (TSELEM_OPEN(tselem, soops)) {
outliner_do_data_operation(soops, type, event, &te->subtree, operation_cb);
}
}
@@ -546,34 +516,34 @@ static EnumPropertyItem prop_object_op_types[] = {
static int outliner_object_operation_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- SpaceOops *soops= CTX_wm_space_outliner(C);
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ SpaceOops *soops = CTX_wm_space_outliner(C);
int event;
- const char *str= NULL;
+ const char *str = NULL;
/* check for invalid states */
if (soops == NULL)
return OPERATOR_CANCELLED;
- event= RNA_enum_get(op->ptr, "type");
+ event = RNA_enum_get(op->ptr, "type");
- if (event==1) {
- Scene *sce= scene; // to be able to delete, scenes are set...
+ if (event == 1) {
+ Scene *sce = scene; // to be able to delete, scenes are set...
outliner_do_object_operation(C, scene, soops, &soops->tree, object_select_cb);
if (scene != sce) {
ED_screen_set_scene(C, CTX_wm_screen(C), sce);
}
- str= "Select Objects";
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene);
+ str = "Select Objects";
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
}
- else if (event==2) {
+ else if (event == 2) {
outliner_do_object_operation(C, scene, soops, &soops->tree, object_deselect_cb);
- str= "Deselect Objects";
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene);
+ str = "Deselect Objects";
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
}
- else if (event==4) {
+ else if (event == 4) {
outliner_do_object_operation(C, scene, soops, &soops->tree, object_delete_cb);
/* XXX: tree management normally happens from draw_outliner(), but when
@@ -584,31 +554,31 @@ static int outliner_object_operation_exec(bContext *C, wmOperator *op)
outliner_cleanup_tree(soops);
DAG_scene_sort(bmain, scene);
- str= "Delete Objects";
- WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, scene);
+ str = "Delete Objects";
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene);
}
- else if (event==5) { /* disabled, see above enum (ton) */
+ else if (event == 5) { /* disabled, see above enum (ton) */
outliner_do_object_operation(C, scene, soops, &soops->tree, id_local_cb);
- str= "Localized Objects";
+ str = "Localized Objects";
}
- else if (event==6) {
+ else if (event == 6) {
outliner_do_object_operation(C, scene, soops, &soops->tree, object_toggle_visibility_cb);
- str= "Toggle Visibility";
- WM_event_add_notifier(C, NC_SCENE|ND_OB_VISIBLE, scene);
+ str = "Toggle Visibility";
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_VISIBLE, scene);
}
- else if (event==7) {
+ else if (event == 7) {
outliner_do_object_operation(C, scene, soops, &soops->tree, object_toggle_selectability_cb);
- str= "Toggle Selectability";
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene);
+ str = "Toggle Selectability";
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
}
- else if (event==8) {
+ else if (event == 8) {
outliner_do_object_operation(C, scene, soops, &soops->tree, object_toggle_renderability_cb);
- str= "Toggle Renderability";
- WM_event_add_notifier(C, NC_SCENE|ND_OB_RENDER, scene);
+ str = "Toggle Renderability";
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_RENDER, scene);
}
- else if (event==9) {
+ else if (event == 9) {
outliner_do_object_operation(C, scene, soops, &soops->tree, item_rename_cb);
- str= "Rename Object";
+ str = "Rename Object";
}
ED_undo_push(C, str);
@@ -649,44 +619,44 @@ static EnumPropertyItem prop_group_op_types[] = {
static int outliner_group_operation_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
- SpaceOops *soops= CTX_wm_space_outliner(C);
+ Scene *scene = CTX_data_scene(C);
+ SpaceOops *soops = CTX_wm_space_outliner(C);
int event;
- const char *str= NULL;
+ const char *str = NULL;
/* check for invalid states */
if (soops == NULL)
return OPERATOR_CANCELLED;
- event= RNA_enum_get(op->ptr, "type");
+ event = RNA_enum_get(op->ptr, "type");
- if (event==1) {
+ if (event == 1) {
outliner_do_libdata_operation(C, scene, soops, &soops->tree, unlink_group_cb);
- str= "Unlink group";
+ str = "Unlink group";
}
- else if (event==2) {
+ else if (event == 2) {
outliner_do_libdata_operation(C, scene, soops, &soops->tree, id_local_cb);
- str= "Localized Data";
+ str = "Localized Data";
}
- else if (event==3) {
+ else if (event == 3) {
outliner_do_libdata_operation(C, scene, soops, &soops->tree, group_linkobs2scene_cb);
- str= "Link Group Objects to Scene";
+ str = "Link Group Objects to Scene";
}
- else if (event==4) {
+ else if (event == 4) {
outliner_do_libdata_operation(C, scene, soops, &soops->tree, group_toggle_visibility_cb);
- str= "Toggle Visibility";
+ str = "Toggle Visibility";
}
- else if (event==5) {
+ else if (event == 5) {
outliner_do_libdata_operation(C, scene, soops, &soops->tree, group_toggle_selectability_cb);
- str= "Toggle Selectability";
+ str = "Toggle Selectability";
}
- else if (event==6) {
+ else if (event == 6) {
outliner_do_libdata_operation(C, scene, soops, &soops->tree, group_toggle_renderability_cb);
- str= "Toggle Renderability";
+ str = "Toggle Renderability";
}
- else if (event==7) {
+ else if (event == 7) {
outliner_do_libdata_operation(C, scene, soops, &soops->tree, item_rename_cb);
- str= "Rename";
+ str = "Rename";
}
@@ -741,9 +711,9 @@ static EnumPropertyItem prop_id_op_types[] = {
static int outliner_id_operation_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
- SpaceOops *soops= CTX_wm_space_outliner(C);
- int scenelevel=0, objectlevel=0, idlevel=0, datalevel=0;
+ Scene *scene = CTX_data_scene(C);
+ SpaceOops *soops = CTX_wm_space_outliner(C);
+ int scenelevel = 0, objectlevel = 0, idlevel = 0, datalevel = 0;
eOutlinerIdOpTypes event;
/* check for invalid states */
@@ -752,7 +722,7 @@ static int outliner_id_operation_exec(bContext *C, wmOperator *op)
set_operation_types(soops, &soops->tree, &scenelevel, &objectlevel, &idlevel, &datalevel);
- event= RNA_enum_get(op->ptr, "type");
+ event = RNA_enum_get(op->ptr, "type");
switch (event) {
case OUTLINER_IDOP_UNLINK:
@@ -762,25 +732,25 @@ static int outliner_id_operation_exec(bContext *C, wmOperator *op)
case ID_AC:
outliner_do_libdata_operation(C, scene, soops, &soops->tree, unlink_action_cb);
- WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_ACTCHANGE, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_NLA_ACTCHANGE, NULL);
ED_undo_push(C, "Unlink action");
break;
case ID_MA:
outliner_do_libdata_operation(C, scene, soops, &soops->tree, unlink_material_cb);
- WM_event_add_notifier(C, NC_OBJECT|ND_OB_SHADING, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_OB_SHADING, NULL);
ED_undo_push(C, "Unlink material");
break;
case ID_TE:
outliner_do_libdata_operation(C, scene, soops, &soops->tree, unlink_texture_cb);
- WM_event_add_notifier(C, NC_OBJECT|ND_OB_SHADING, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_OB_SHADING, NULL);
ED_undo_push(C, "Unlink texture");
break;
case ID_WO:
outliner_do_libdata_operation(C, scene, soops, &soops->tree, unlink_world_cb);
- WM_event_add_notifier(C, NC_SCENE|ND_WORLD, NULL);
+ WM_event_add_notifier(C, NC_SCENE | ND_WORLD, NULL);
ED_undo_push(C, "Unlink world");
break;
default:
@@ -788,7 +758,7 @@ static int outliner_id_operation_exec(bContext *C, wmOperator *op)
break;
}
}
- break;
+ break;
case OUTLINER_IDOP_LOCAL:
{
@@ -796,7 +766,7 @@ static int outliner_id_operation_exec(bContext *C, wmOperator *op)
outliner_do_libdata_operation(C, scene, soops, &soops->tree, id_local_cb);
ED_undo_push(C, "Localized Data");
}
- break;
+ break;
case OUTLINER_IDOP_SINGLE:
{
@@ -805,14 +775,14 @@ static int outliner_id_operation_exec(bContext *C, wmOperator *op)
case ID_AC:
outliner_do_libdata_operation(C, scene, soops, &soops->tree, singleuser_action_cb);
- WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_ACTCHANGE, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_NLA_ACTCHANGE, NULL);
ED_undo_push(C, "Single-User Action");
break;
case ID_WO:
outliner_do_libdata_operation(C, scene, soops, &soops->tree, singleuser_world_cb);
- WM_event_add_notifier(C, NC_SCENE|ND_WORLD, NULL);
+ WM_event_add_notifier(C, NC_SCENE | ND_WORLD, NULL);
ED_undo_push(C, "Single-User World");
break;
@@ -821,36 +791,36 @@ static int outliner_id_operation_exec(bContext *C, wmOperator *op)
break;
}
}
- break;
+ break;
case OUTLINER_IDOP_FAKE_ADD:
{
/* set fake user */
outliner_do_libdata_operation(C, scene, soops, &soops->tree, id_fake_user_set_cb);
- WM_event_add_notifier(C, NC_ID|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ID | NA_EDITED, NULL);
ED_undo_push(C, "Add Fake User");
}
- break;
+ break;
case OUTLINER_IDOP_FAKE_CLEAR:
{
/* clear fake user */
outliner_do_libdata_operation(C, scene, soops, &soops->tree, id_fake_user_clear_cb);
- WM_event_add_notifier(C, NC_ID|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ID | NA_EDITED, NULL);
ED_undo_push(C, "Clear Fake User");
}
- break;
+ break;
case OUTLINER_IDOP_RENAME:
{
/* rename */
outliner_do_libdata_operation(C, scene, soops, &soops->tree, item_rename_cb);
- WM_event_add_notifier(C, NC_ID|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ID | NA_EDITED, NULL);
ED_undo_push(C, "Rename");
}
- break;
+ break;
default:
// invalid - unhandled
@@ -858,10 +828,10 @@ static int outliner_id_operation_exec(bContext *C, wmOperator *op)
}
/* wrong notifier still... */
- WM_event_add_notifier(C, NC_ID|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_ID | NA_EDITED, NULL);
// XXX: this is just so that outliner is always up to date
- WM_event_add_notifier(C, NC_SPACE|ND_SPACE_OUTLINER, NULL);
+ WM_event_add_notifier(C, NC_SPACE | ND_SPACE_OUTLINER, NULL);
return OPERATOR_FINISHED;
}
@@ -887,20 +857,20 @@ void OUTLINER_OT_id_operation(wmOperatorType *ot)
/* **************************************** */
static void outliner_do_id_set_operation(SpaceOops *soops, int type, ListBase *lb, ID *newid,
- void (*operation_cb)(TreeElement *, TreeStoreElem *, TreeStoreElem *, ID *))
+ void (*operation_cb)(TreeElement *, TreeStoreElem *, TreeStoreElem *, ID *))
{
TreeElement *te;
TreeStoreElem *tselem;
- for (te=lb->first; te; te= te->next) {
- tselem= TREESTORE(te);
+ for (te = lb->first; te; te = te->next) {
+ tselem = TREESTORE(te);
if (tselem->flag & TSE_SELECTED) {
- if (tselem->type==type) {
+ if (tselem->type == type) {
TreeStoreElem *tsep = TREESTORE(te->parent);
operation_cb(te, tselem, tsep, newid);
}
}
- if (TSELEM_OPEN(tselem,soops)) {
+ if (TSELEM_OPEN(tselem, soops)) {
outliner_do_id_set_operation(soops, type, &te->subtree, newid, operation_cb);
}
}
@@ -928,8 +898,8 @@ static void actionset_id_cb(TreeElement *UNUSED(te), TreeStoreElem *tselem, Tree
static int outliner_action_set_exec(bContext *C, wmOperator *op)
{
- SpaceOops *soops= CTX_wm_space_outliner(C);
- int scenelevel=0, objectlevel=0, idlevel=0, datalevel=0;
+ SpaceOops *soops = CTX_wm_space_outliner(C);
+ int scenelevel = 0, objectlevel = 0, idlevel = 0, datalevel = 0;
bAction *act;
@@ -939,7 +909,7 @@ static int outliner_action_set_exec(bContext *C, wmOperator *op)
set_operation_types(soops, &soops->tree, &scenelevel, &objectlevel, &idlevel, &datalevel);
/* get action to use */
- act= BLI_findlink(&CTX_data_main(C)->action, RNA_enum_get(op->ptr, "action"));
+ act = BLI_findlink(&CTX_data_main(C)->action, RNA_enum_get(op->ptr, "action"));
if (act == NULL) {
BKE_report(op->reports, RPT_ERROR, "No valid Action to add");
@@ -948,20 +918,20 @@ static int outliner_action_set_exec(bContext *C, wmOperator *op)
else if (act->idroot == 0) {
/* hopefully in this case (i.e. library of userless actions), the user knows what they're doing... */
BKE_reportf(op->reports, RPT_WARNING,
- "Action '%s' does not specify what datablocks it can be used on. Try setting the 'ID Root Type' setting from the Datablocks Editor for this Action to avoid future problems",
- act->id.name+2);
+ "Action '%s' does not specify what datablocks it can be used on. Try setting the 'ID Root Type' setting from the Datablocks Editor for this Action to avoid future problems",
+ act->id.name + 2);
}
/* perform action if valid channel */
if (datalevel == TSE_ANIM_DATA)
- outliner_do_id_set_operation(soops, datalevel, &soops->tree, (ID*)act, actionset_id_cb);
+ outliner_do_id_set_operation(soops, datalevel, &soops->tree, (ID *)act, actionset_id_cb);
else if (idlevel == ID_AC)
- outliner_do_id_set_operation(soops, idlevel, &soops->tree, (ID*)act, actionset_id_cb);
+ outliner_do_id_set_operation(soops, idlevel, &soops->tree, (ID *)act, actionset_id_cb);
else
return OPERATOR_CANCELLED;
/* set notifier that things have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_ACTCHANGE, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_NLA_ACTCHANGE, NULL);
ED_undo_push(C, "Set action");
/* done */
@@ -986,8 +956,8 @@ void OUTLINER_OT_action_set(wmOperatorType *ot)
ot->flag = 0;
/* props */
- // TODO: this would be nicer as an ID-pointer...
- prop= RNA_def_enum(ot->srna, "action", DummyRNA_NULL_items, 0, "Action", "");
+ // 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);
ot->prop = prop;
}
@@ -1019,8 +989,8 @@ static EnumPropertyItem prop_animdata_op_types[] = {
static int outliner_animdata_operation_exec(bContext *C, wmOperator *op)
{
- SpaceOops *soops= CTX_wm_space_outliner(C);
- int scenelevel=0, objectlevel=0, idlevel=0, datalevel=0;
+ SpaceOops *soops = CTX_wm_space_outliner(C);
+ int scenelevel = 0, objectlevel = 0, idlevel = 0, datalevel = 0;
eOutliner_AnimDataOps event;
short updateDeps = 0;
@@ -1028,7 +998,7 @@ static int outliner_animdata_operation_exec(bContext *C, wmOperator *op)
if (soops == NULL)
return OPERATOR_CANCELLED;
- event= RNA_enum_get(op->ptr, "type");
+ event = RNA_enum_get(op->ptr, "type");
set_operation_types(soops, &soops->tree, &scenelevel, &objectlevel, &idlevel, &datalevel);
if (datalevel != TSE_ANIM_DATA)
@@ -1045,14 +1015,14 @@ static int outliner_animdata_operation_exec(bContext *C, wmOperator *op)
/* clear active action - using standard rules */
outliner_do_data_operation(soops, datalevel, event, &soops->tree, unlinkact_animdata_cb);
- WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_ACTCHANGE, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_NLA_ACTCHANGE, NULL);
ED_undo_push(C, "Unlink action");
break;
case OUTLINER_ANIMOP_REFRESH_DRV:
outliner_do_data_operation(soops, datalevel, event, &soops->tree, refreshdrivers_animdata_cb);
- WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN, NULL);
//ED_undo_push(C, "Refresh Drivers"); /* no undo needed - shouldn't have any impact? */
updateDeps = 1;
break;
@@ -1060,7 +1030,7 @@ static int outliner_animdata_operation_exec(bContext *C, wmOperator *op)
case OUTLINER_ANIMOP_CLEAR_DRV:
outliner_do_data_operation(soops, datalevel, event, &soops->tree, cleardrivers_animdata_cb);
- WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN, NULL);
ED_undo_push(C, "Clear Drivers");
updateDeps = 1;
break;
@@ -1114,40 +1084,40 @@ static EnumPropertyItem prop_data_op_types[] = {
static int outliner_data_operation_exec(bContext *C, wmOperator *op)
{
- SpaceOops *soops= CTX_wm_space_outliner(C);
- int scenelevel=0, objectlevel=0, idlevel=0, datalevel=0;
+ SpaceOops *soops = CTX_wm_space_outliner(C);
+ int scenelevel = 0, objectlevel = 0, idlevel = 0, datalevel = 0;
int event;
/* check for invalid states */
if (soops == NULL)
return OPERATOR_CANCELLED;
- event= RNA_enum_get(op->ptr, "type");
+ event = RNA_enum_get(op->ptr, "type");
set_operation_types(soops, &soops->tree, &scenelevel, &objectlevel, &idlevel, &datalevel);
- if (datalevel==TSE_POSE_CHANNEL) {
- if (event>0) {
+ if (datalevel == TSE_POSE_CHANNEL) {
+ if (event > 0) {
outliner_do_data_operation(soops, datalevel, event, &soops->tree, pchan_cb);
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, NULL);
ED_undo_push(C, "PoseChannel operation");
}
}
- else if (datalevel==TSE_BONE) {
- if (event>0) {
+ else if (datalevel == TSE_BONE) {
+ if (event > 0) {
outliner_do_data_operation(soops, datalevel, event, &soops->tree, bone_cb);
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, NULL);
ED_undo_push(C, "Bone operation");
}
}
- else if (datalevel==TSE_EBONE) {
- if (event>0) {
+ else if (datalevel == TSE_EBONE) {
+ if (event > 0) {
outliner_do_data_operation(soops, datalevel, event, &soops->tree, ebone_cb);
- WM_event_add_notifier(C, NC_OBJECT|ND_POSE, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, NULL);
ED_undo_push(C, "EditBone operation");
}
}
- else if (datalevel==TSE_SEQUENCE) {
- if (event>0) {
+ else if (datalevel == TSE_SEQUENCE) {
+ if (event > 0) {
outliner_do_data_operation(soops, datalevel, event, &soops->tree, sequence_cb);
}
}
@@ -1181,14 +1151,14 @@ static int do_outliner_operation_event(bContext *C, Scene *scene, ARegion *ar, S
{
ReportList *reports = CTX_wm_reports(C); // XXX...
- if (mval[1]>te->ys && mval[1]<te->ys+UI_UNIT_Y) {
- int scenelevel=0, objectlevel=0, idlevel=0, datalevel=0;
- TreeStoreElem *tselem= TREESTORE(te);
+ if (mval[1] > te->ys && mval[1] < te->ys + UI_UNIT_Y) {
+ int scenelevel = 0, objectlevel = 0, idlevel = 0, datalevel = 0;
+ TreeStoreElem *tselem = TREESTORE(te);
/* select object that's clicked on and popup context menu */
if (!(tselem->flag & TSE_SELECTED)) {
- if ( outliner_has_one_flag(soops, &soops->tree, TSE_SELECTED, 1) )
+ if (outliner_has_one_flag(soops, &soops->tree, TSE_SELECTED, 1) )
outliner_set_flag(soops, &soops->tree, TSE_SELECTED, 0);
tselem->flag |= TSE_SELECTED;
@@ -1207,16 +1177,16 @@ static int do_outliner_operation_event(bContext *C, Scene *scene, ARegion *ar, S
WM_operator_name_call(C, "OUTLINER_OT_object_operation", WM_OP_INVOKE_REGION_WIN, NULL);
}
else if (idlevel) {
- if (idlevel==-1 || datalevel) BKE_report(reports, RPT_WARNING, "Mixed selection");
+ if (idlevel == -1 || datalevel) BKE_report(reports, RPT_WARNING, "Mixed selection");
else {
- if (idlevel==ID_GR)
+ if (idlevel == ID_GR)
WM_operator_name_call(C, "OUTLINER_OT_group_operation", WM_OP_INVOKE_REGION_WIN, NULL);
else
WM_operator_name_call(C, "OUTLINER_OT_id_operation", WM_OP_INVOKE_REGION_WIN, NULL);
}
}
else if (datalevel) {
- if (datalevel==-1) BKE_report(reports, RPT_WARNING, "Mixed selection");
+ if (datalevel == -1) BKE_report(reports, RPT_WARNING, "Mixed selection");
else {
if (datalevel == TSE_ANIM_DATA)
WM_operator_name_call(C, "OUTLINER_OT_animdata_operation", WM_OP_INVOKE_REGION_WIN, NULL);
@@ -1232,7 +1202,7 @@ static int do_outliner_operation_event(bContext *C, Scene *scene, ARegion *ar, S
return 1;
}
- for (te= te->subtree.first; te; te= te->next) {
+ for (te = te->subtree.first; te; te = te->next) {
if (do_outliner_operation_event(C, scene, ar, soops, te, event, mval))
return 1;
}
@@ -1242,15 +1212,15 @@ static int do_outliner_operation_event(bContext *C, Scene *scene, ARegion *ar, S
static int outliner_operation(bContext *C, wmOperator *UNUSED(op), wmEvent *event)
{
- Scene *scene= CTX_data_scene(C);
- ARegion *ar= CTX_wm_region(C);
- SpaceOops *soops= CTX_wm_space_outliner(C);
+ Scene *scene = CTX_data_scene(C);
+ ARegion *ar = CTX_wm_region(C);
+ SpaceOops *soops = CTX_wm_space_outliner(C);
TreeElement *te;
float fmval[2];
- UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], fmval, fmval+1);
+ UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], fmval, fmval + 1);
- for (te= soops->tree.first; te; te= te->next) {
+ for (te = soops->tree.first; te; te = te->next) {
if (do_outliner_operation_event(C, scene, ar, soops, te, event, fmval)) break;
}
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index e83fce0cf05..099e210a658 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -31,8 +31,15 @@
#include <math.h>
#include <string.h>
-#include <stdlib.h>
-#include <stddef.h>
+
+#if defined WIN32 && !defined _LIBC || defined __sun
+# include "BLI_fnmatch.h" /* use fnmatch included in blenlib */
+#else
+# ifndef _GNU_SOURCE
+# define _GNU_SOURCE
+# endif
+# include <fnmatch.h>
+#endif
#include "MEM_guardedalloc.h"
@@ -55,101 +62,70 @@
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
-#include "BLI_math_base.h"
-
-#if defined WIN32 && !defined _LIBC || defined __sun
-# include "BLI_fnmatch.h" /* use fnmatch included in blenlib */
-#else
-# ifndef _GNU_SOURCE
-# define _GNU_SOURCE
-# endif
-# include <fnmatch.h>
-#endif
-
+#include "BLI_math.h"
-#include "BKE_animsys.h"
-#include "BKE_context.h"
-#include "BKE_deform.h"
-#include "BKE_depsgraph.h"
#include "BKE_fcurve.h"
-#include "BKE_global.h"
-#include "BKE_group.h"
-#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_modifier.h"
-#include "BKE_report.h"
-#include "BKE_scene.h"
#include "BKE_sequencer.h"
#include "ED_armature.h"
-#include "ED_object.h"
#include "ED_screen.h"
-#include "ED_util.h"
#include "WM_api.h"
#include "WM_types.h"
-#include "BIF_gl.h"
-#include "BIF_glutil.h"
-
-#include "UI_interface.h"
-#include "UI_interface_icons.h"
-#include "UI_resources.h"
-#include "UI_view2d.h"
-
#include "RNA_access.h"
-#include "RNA_define.h"
-#include "RNA_enum_types.h"
#include "outliner_intern.h"
/* ********************************************************* */
/* Defines */
-#define TS_CHUNK 128
+#define TS_CHUNK 128
/* ********************************************************* */
/* Persistent Data */
static void outliner_storage_cleanup(SpaceOops *soops)
{
- TreeStore *ts= soops->treestore;
+ TreeStore *ts = soops->treestore;
if (ts) {
TreeStoreElem *tselem;
- int a, unused= 0;
+ int a, unused = 0;
/* each element used once, for ID blocks with more users to have each a treestore */
- for (a=0, tselem= ts->data; a<ts->usedelem; a++, tselem++) tselem->used= 0;
+ for (a = 0, tselem = ts->data; a < ts->usedelem; a++, tselem++) tselem->used = 0;
/* cleanup only after reading file or undo step, and always for
* RNA datablocks view in order to save memory */
if (soops->storeflag & SO_TREESTORE_CLEANUP) {
- for (a=0, tselem= ts->data; a<ts->usedelem; a++, tselem++) {
- if (tselem->id==NULL) unused++;
+ for (a = 0, tselem = ts->data; a < ts->usedelem; a++, tselem++) {
+ if (tselem->id == NULL) unused++;
}
if (unused) {
if (ts->usedelem == unused) {
MEM_freeN(ts->data);
- ts->data= NULL;
- ts->usedelem= ts->totelem= 0;
+ ts->data = NULL;
+ ts->usedelem = ts->totelem = 0;
}
else {
TreeStoreElem *tsnewar, *tsnew;
- tsnew=tsnewar= MEM_mallocN((ts->usedelem-unused)*sizeof(TreeStoreElem), "new tselem");
- for (a=0, tselem= ts->data; a<ts->usedelem; a++, tselem++) {
+ tsnew = tsnewar = MEM_mallocN((ts->usedelem - unused) * sizeof(TreeStoreElem), "new tselem");
+ for (a = 0, tselem = ts->data; a < ts->usedelem; a++, tselem++) {
if (tselem->id) {
- *tsnew= *tselem;
+ *tsnew = *tselem;
tsnew++;
}
}
MEM_freeN(ts->data);
- ts->data= tsnewar;
- ts->usedelem-= unused;
- ts->totelem= ts->usedelem;
+ ts->data = tsnewar;
+ ts->usedelem -= unused;
+ ts->totelem = ts->usedelem;
}
}
}
@@ -163,45 +139,45 @@ static void check_persistent(SpaceOops *soops, TreeElement *te, ID *id, short ty
int a;
/* case 1; no TreeStore */
- if (soops->treestore==NULL) {
- soops->treestore= MEM_callocN(sizeof(TreeStore), "treestore");
+ if (soops->treestore == NULL) {
+ soops->treestore = MEM_callocN(sizeof(TreeStore), "treestore");
}
- ts= soops->treestore;
+ ts = soops->treestore;
/* check if 'te' is in treestore */
- tselem= ts->data;
- for (a=0; a<ts->usedelem; a++, tselem++) {
- if (tselem->id==id && tselem->used==0) {
- if ((type==0 && tselem->type==0) ||(tselem->type==type && tselem->nr==nr)) {
- te->store_index= a;
- tselem->used= 1;
+ tselem = ts->data;
+ for (a = 0; a < ts->usedelem; a++, tselem++) {
+ if (tselem->id == id && tselem->used == 0) {
+ if ((type == 0 && tselem->type == 0) || (tselem->type == type && tselem->nr == nr)) {
+ te->store_index = a;
+ tselem->used = 1;
return;
}
}
}
/* add 1 element to treestore */
- if (ts->usedelem==ts->totelem) {
+ if (ts->usedelem == ts->totelem) {
TreeStoreElem *tsnew;
- tsnew= MEM_mallocN((ts->totelem+TS_CHUNK)*sizeof(TreeStoreElem), "treestore data");
+ tsnew = MEM_mallocN((ts->totelem + TS_CHUNK) * sizeof(TreeStoreElem), "treestore data");
if (ts->data) {
- memcpy(tsnew, ts->data, ts->totelem*sizeof(TreeStoreElem));
+ memcpy(tsnew, ts->data, ts->totelem * sizeof(TreeStoreElem));
MEM_freeN(ts->data);
}
- ts->data= tsnew;
- ts->totelem+= TS_CHUNK;
+ ts->data = tsnew;
+ ts->totelem += TS_CHUNK;
}
- tselem= ts->data+ts->usedelem;
+ tselem = ts->data + ts->usedelem;
- tselem->type= type;
- if (type) tselem->nr= nr; // we're picky! :)
- else tselem->nr= 0;
- tselem->id= id;
+ tselem->type = type;
+ if (type) tselem->nr = nr; // we're picky! :)
+ else tselem->nr = 0;
+ tselem->id = id;
tselem->used = 0;
- tselem->flag= TSE_CLOSED;
- te->store_index= ts->usedelem;
+ tselem->flag = TSE_CLOSED;
+ te->store_index = ts->usedelem;
ts->usedelem++;
}
@@ -212,7 +188,7 @@ static void check_persistent(SpaceOops *soops, TreeElement *te, ID *id, short ty
void outliner_free_tree(ListBase *lb)
{
while (lb->first) {
- TreeElement *te= lb->first;
+ TreeElement *te = lb->first;
outliner_free_tree(&te->subtree);
BLI_remlink(lb, te);
@@ -231,12 +207,12 @@ void outliner_cleanup_tree(SpaceOops *soops)
/* Find ith item from the treestore */
static TreeElement *outliner_find_tree_element(ListBase *lb, int store_index)
{
- TreeElement *te= lb->first, *tes;
+ TreeElement *te = lb->first, *tes;
while (te) {
- if (te->store_index==store_index) return te;
- tes= outliner_find_tree_element(&te->subtree, store_index);
+ if (te->store_index == store_index) return te;
+ tes = outliner_find_tree_element(&te->subtree, store_index);
if (tes) return tes;
- te= te->next;
+ te = te->next;
}
return NULL;
}
@@ -244,17 +220,17 @@ static TreeElement *outliner_find_tree_element(ListBase *lb, int store_index)
/* tse is not in the treestore, we use its contents to find a match */
TreeElement *outliner_find_tse(SpaceOops *soops, TreeStoreElem *tse)
{
- TreeStore *ts= soops->treestore;
+ TreeStore *ts = soops->treestore;
TreeStoreElem *tselem;
int a;
- if (tse->id==NULL) return NULL;
+ if (tse->id == NULL) return NULL;
/* check if 'tse' is in treestore */
- tselem= ts->data;
- for (a=0; a<ts->usedelem; a++, tselem++) {
- if ((tse->type==0 && tselem->type==0) || (tselem->type==tse->type && tselem->nr==tse->nr)) {
- if (tselem->id==tse->id) {
+ tselem = ts->data;
+ for (a = 0; a < ts->usedelem; a++, tselem++) {
+ if ((tse->type == 0 && tselem->type == 0) || (tselem->type == tse->type && tselem->nr == tse->nr)) {
+ if (tselem->id == tse->id) {
break;
}
}
@@ -271,13 +247,13 @@ TreeElement *outliner_find_id(SpaceOops *soops, ListBase *lb, ID *id)
TreeElement *te, *tes;
TreeStoreElem *tselem;
- for (te= lb->first; te; te= te->next) {
- tselem= TREESTORE(te);
- if (tselem->type==0) {
- if (tselem->id==id) return te;
+ for (te = lb->first; te; te = te->next) {
+ tselem = TREESTORE(te);
+ if (tselem->type == 0) {
+ if (tselem->id == id) return te;
/* only deeper on scene or object */
- if ( te->idcode==ID_OB || te->idcode==ID_SCE || (soops->outlinevis == SO_GROUPS && te->idcode==ID_GR)) {
- tes= outliner_find_id(soops, &te->subtree, id);
+ if (te->idcode == ID_OB || te->idcode == ID_SCE || (soops->outlinevis == SO_GROUPS && te->idcode == ID_GR)) {
+ tes = outliner_find_id(soops, &te->subtree, id);
if (tes) return tes;
}
}
@@ -289,12 +265,12 @@ TreeElement *outliner_find_id(SpaceOops *soops, ListBase *lb, ID *id)
ID *outliner_search_back(SpaceOops *soops, TreeElement *te, short idcode)
{
TreeStoreElem *tselem;
- te= te->parent;
+ te = te->parent;
while (te) {
- tselem= TREESTORE(te);
- if (tselem->type==0 && te->idcode==idcode) return tselem->id;
- te= te->parent;
+ tselem = TREESTORE(te);
+ if (tselem->type == 0 && te->idcode == idcode) return tselem->id;
+ te = te->parent;
}
return NULL;
}
@@ -304,28 +280,28 @@ ID *outliner_search_back(SpaceOops *soops, TreeElement *te, short idcode)
/* Prototype, see functions below */
static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *idv,
- TreeElement *parent, short type, short index);
+ TreeElement *parent, short type, short index);
/* -------------------------------------------------------- */
/* special handling of hierarchical non-lib data */
static void outliner_add_bone(SpaceOops *soops, ListBase *lb, ID *id, Bone *curBone,
- TreeElement *parent, int *a)
+ TreeElement *parent, int *a)
{
- TreeElement *te= outliner_add_element(soops, lb, id, parent, TSE_BONE, *a);
+ TreeElement *te = outliner_add_element(soops, lb, id, parent, TSE_BONE, *a);
(*a)++;
- te->name= curBone->name;
- te->directdata= curBone;
+ te->name = curBone->name;
+ te->directdata = curBone;
- for (curBone= curBone->childbase.first; curBone; curBone=curBone->next) {
+ for (curBone = curBone->childbase.first; curBone; curBone = curBone->next) {
outliner_add_bone(soops, &te->subtree, id, curBone, te, a);
}
}
/* -------------------------------------------------------- */
-#define LOG2I(x) (int)(log(x)/M_LN2)
+#define LOG2I(x) (int)(log(x) / M_LN2)
static void outliner_add_passes(SpaceOops *soops, TreeElement *tenla, ID *id, SceneRenderLayer *srl)
{
@@ -335,82 +311,82 @@ static void outliner_add_passes(SpaceOops *soops, TreeElement *tenla, ID *id, Sc
/* log stuff is to convert bitflags (powers of 2) to small integers,
* in order to not overflow short tselem->nr */
- te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_COMBINED));
- te->name= "Combined";
- te->directdata= &srl->passflag;
+ te = outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_COMBINED));
+ te->name = "Combined";
+ te->directdata = &srl->passflag;
/* save cpu cycles, but we add the first to invoke an open/close triangle */
tselem = TREESTORE(tenla);
if (tselem->flag & TSE_CLOSED)
return;
- te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_Z));
- te->name= "Z";
- te->directdata= &srl->passflag;
-
- te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_VECTOR));
- te->name= "Vector";
- te->directdata= &srl->passflag;
-
- te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_NORMAL));
- te->name= "Normal";
- te->directdata= &srl->passflag;
-
- te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_UV));
- te->name= "UV";
- te->directdata= &srl->passflag;
-
- te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_MIST));
- te->name= "Mist";
- te->directdata= &srl->passflag;
-
- te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_INDEXOB));
- te->name= "Index Object";
- te->directdata= &srl->passflag;
-
- te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_INDEXMA));
- te->name= "Index Material";
- te->directdata= &srl->passflag;
+ te = outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_Z));
+ te->name = "Z";
+ te->directdata = &srl->passflag;
- te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_RGBA));
- te->name= "Color";
- te->directdata= &srl->passflag;
-
- te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_DIFFUSE));
- te->name= "Diffuse";
- te->directdata= &srl->passflag;
-
- te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_SPEC));
- te->name= "Specular";
- te->directdata= &srl->passflag;
-
- te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_SHADOW));
- te->name= "Shadow";
- te->directdata= &srl->passflag;
-
- te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_AO));
- te->name= "AO";
- te->directdata= &srl->passflag;
-
- te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_REFLECT));
- te->name= "Reflection";
- te->directdata= &srl->passflag;
-
- te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_REFRACT));
- te->name= "Refraction";
- te->directdata= &srl->passflag;
-
- te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_INDIRECT));
- te->name= "Indirect";
- te->directdata= &srl->passflag;
+ te = outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_VECTOR));
+ te->name = "Vector";
+ te->directdata = &srl->passflag;
+
+ te = outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_NORMAL));
+ te->name = "Normal";
+ te->directdata = &srl->passflag;
+
+ te = outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_UV));
+ te->name = "UV";
+ te->directdata = &srl->passflag;
+
+ te = outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_MIST));
+ te->name = "Mist";
+ te->directdata = &srl->passflag;
+
+ te = outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_INDEXOB));
+ te->name = "Index Object";
+ te->directdata = &srl->passflag;
+
+ te = outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_INDEXMA));
+ te->name = "Index Material";
+ te->directdata = &srl->passflag;
- te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_ENVIRONMENT));
- te->name= "Environment";
- te->directdata= &srl->passflag;
+ te = outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_RGBA));
+ te->name = "Color";
+ te->directdata = &srl->passflag;
- te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_EMIT));
- te->name= "Emit";
- te->directdata= &srl->passflag;
+ te = outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_DIFFUSE));
+ te->name = "Diffuse";
+ te->directdata = &srl->passflag;
+
+ te = outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_SPEC));
+ te->name = "Specular";
+ te->directdata = &srl->passflag;
+
+ te = outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_SHADOW));
+ te->name = "Shadow";
+ te->directdata = &srl->passflag;
+
+ te = outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_AO));
+ te->name = "AO";
+ te->directdata = &srl->passflag;
+
+ te = outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_REFLECT));
+ te->name = "Reflection";
+ te->directdata = &srl->passflag;
+
+ te = outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_REFRACT));
+ te->name = "Refraction";
+ te->directdata = &srl->passflag;
+
+ te = outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_INDIRECT));
+ te->name = "Indirect";
+ te->directdata = &srl->passflag;
+
+ te = outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_ENVIRONMENT));
+ te->name = "Environment";
+ te->directdata = &srl->passflag;
+
+ te = outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_EMIT));
+ te->name = "Emit";
+ te->directdata = &srl->passflag;
}
#undef LOG2I
@@ -418,14 +394,14 @@ static void outliner_add_passes(SpaceOops *soops, TreeElement *tenla, ID *id, Sc
static void outliner_add_scene_contents(SpaceOops *soops, ListBase *lb, Scene *sce, TreeElement *te)
{
SceneRenderLayer *srl;
- TreeElement *tenla= outliner_add_element(soops, lb, sce, te, TSE_R_LAYER_BASE, 0);
+ TreeElement *tenla = outliner_add_element(soops, lb, sce, te, TSE_R_LAYER_BASE, 0);
int a;
- tenla->name= "RenderLayers";
- for (a=0, srl= sce->r.layers.first; srl; srl= srl->next, a++) {
- TreeElement *tenlay= outliner_add_element(soops, &tenla->subtree, sce, te, TSE_R_LAYER, a);
- tenlay->name= srl->name;
- tenlay->directdata= &srl->passflag;
+ tenla->name = "RenderLayers";
+ for (a = 0, srl = sce->r.layers.first; srl; srl = srl->next, a++) {
+ TreeElement *tenlay = outliner_add_element(soops, &tenla->subtree, sce, te, TSE_R_LAYER, a);
+ tenlay->name = srl->name;
+ tenlay->directdata = &srl->passflag;
if (srl->light_override)
outliner_add_element(soops, &tenlay->subtree, srl->light_override, tenlay, TSE_LINKED_LAMP, 0);
@@ -452,66 +428,66 @@ static void outliner_add_object_contents(SpaceOops *soops, TreeElement *te, Tree
outliner_add_element(soops, &te->subtree, ob->poselib, te, 0, 0); // XXX FIXME.. add a special type for this
- if (ob->proxy && ob->id.lib==NULL)
+ if (ob->proxy && ob->id.lib == NULL)
outliner_add_element(soops, &te->subtree, ob->proxy, te, TSE_PROXY, 0);
outliner_add_element(soops, &te->subtree, ob->data, te, 0, 0);
if (ob->pose) {
- bArmature *arm= ob->data;
+ bArmature *arm = ob->data;
bPoseChannel *pchan;
TreeElement *ten;
- TreeElement *tenla= outliner_add_element(soops, &te->subtree, ob, te, TSE_POSE_BASE, 0);
+ TreeElement *tenla = outliner_add_element(soops, &te->subtree, ob, te, TSE_POSE_BASE, 0);
- tenla->name= "Pose";
+ tenla->name = "Pose";
/* channels undefined in editmode, but we want the 'tenla' pose icon itself */
if ((arm->edbo == NULL) && (ob->mode & OB_MODE_POSE)) {
- int a= 0, const_index= 1000; /* ensure unique id for bone constraints */
+ int a = 0, const_index = 1000; /* ensure unique id for bone constraints */
- for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next, a++) {
- ten= outliner_add_element(soops, &tenla->subtree, ob, tenla, TSE_POSE_CHANNEL, a);
- ten->name= pchan->name;
- ten->directdata= pchan;
- pchan->temp= (void *)ten;
+ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next, a++) {
+ ten = outliner_add_element(soops, &tenla->subtree, ob, tenla, TSE_POSE_CHANNEL, a);
+ ten->name = pchan->name;
+ ten->directdata = pchan;
+ pchan->temp = (void *)ten;
if (pchan->constraints.first) {
//Object *target;
bConstraint *con;
TreeElement *ten1;
- TreeElement *tenla1= outliner_add_element(soops, &ten->subtree, ob, ten, TSE_CONSTRAINT_BASE, 0);
+ TreeElement *tenla1 = outliner_add_element(soops, &ten->subtree, ob, ten, TSE_CONSTRAINT_BASE, 0);
//char *str;
- tenla1->name= "Constraints";
- for (con= pchan->constraints.first; con; con= con->next, const_index++) {
- ten1= outliner_add_element(soops, &tenla1->subtree, ob, tenla1, TSE_CONSTRAINT, const_index);
+ tenla1->name = "Constraints";
+ for (con = pchan->constraints.first; con; con = con->next, const_index++) {
+ ten1 = outliner_add_element(soops, &tenla1->subtree, ob, tenla1, TSE_CONSTRAINT, const_index);
#if 0 /* disabled as it needs to be reworked for recoded constraints system */
- target= get_constraint_target(con, &str);
- if (str && str[0]) ten1->name= str;
- else if (target) ten1->name= target->id.name+2;
- else ten1->name= con->name;
+ target = get_constraint_target(con, &str);
+ if (str && str[0]) ten1->name = str;
+ else if (target) ten1->name = target->id.name + 2;
+ else ten1->name = con->name;
#endif
- ten1->name= con->name;
- ten1->directdata= con;
+ ten1->name = con->name;
+ ten1->directdata = con;
/* possible add all other types links? */
}
}
}
/* make hierarchy */
- ten= tenla->subtree.first;
+ ten = tenla->subtree.first;
while (ten) {
- TreeElement *nten= ten->next, *par;
- tselem= TREESTORE(ten);
- if (tselem->type==TSE_POSE_CHANNEL) {
- pchan= (bPoseChannel *)ten->directdata;
+ TreeElement *nten = ten->next, *par;
+ tselem = TREESTORE(ten);
+ if (tselem->type == TSE_POSE_CHANNEL) {
+ pchan = (bPoseChannel *)ten->directdata;
if (pchan->parent) {
BLI_remlink(&tenla->subtree, ten);
- par= (TreeElement *)pchan->parent->temp;
+ par = (TreeElement *)pchan->parent->temp;
BLI_addtail(&par->subtree, ten);
- ten->parent= par;
+ ten->parent = par;
}
}
- ten= nten;
+ ten = nten;
}
}
@@ -519,39 +495,39 @@ static void outliner_add_object_contents(SpaceOops *soops, TreeElement *te, Tree
if (ob->pose->agroups.first) {
bActionGroup *agrp;
TreeElement *ten;
- TreeElement *tenla= outliner_add_element(soops, &te->subtree, ob, te, TSE_POSEGRP_BASE, 0);
- int a= 0;
+ TreeElement *tenla = outliner_add_element(soops, &te->subtree, ob, te, TSE_POSEGRP_BASE, 0);
+ int a = 0;
- tenla->name= "Bone Groups";
- for (agrp=ob->pose->agroups.first; agrp; agrp=agrp->next, a++) {
- ten= outliner_add_element(soops, &tenla->subtree, ob, tenla, TSE_POSEGRP, a);
- ten->name= agrp->name;
- ten->directdata= agrp;
+ tenla->name = "Bone Groups";
+ for (agrp = ob->pose->agroups.first; agrp; agrp = agrp->next, a++) {
+ ten = outliner_add_element(soops, &tenla->subtree, ob, tenla, TSE_POSEGRP, a);
+ ten->name = agrp->name;
+ ten->directdata = agrp;
}
}
}
- for (a=0; a<ob->totcol; a++)
+ for (a = 0; a < ob->totcol; a++)
outliner_add_element(soops, &te->subtree, ob->mat[a], te, 0, a);
if (ob->constraints.first) {
//Object *target;
bConstraint *con;
TreeElement *ten;
- TreeElement *tenla= outliner_add_element(soops, &te->subtree, ob, te, TSE_CONSTRAINT_BASE, 0);
+ TreeElement *tenla = outliner_add_element(soops, &te->subtree, ob, te, TSE_CONSTRAINT_BASE, 0);
//char *str;
- tenla->name= "Constraints";
- for (con=ob->constraints.first, a=0; con; con= con->next, a++) {
- ten= outliner_add_element(soops, &tenla->subtree, ob, tenla, TSE_CONSTRAINT, a);
+ tenla->name = "Constraints";
+ for (con = ob->constraints.first, a = 0; con; con = con->next, a++) {
+ ten = outliner_add_element(soops, &tenla->subtree, ob, tenla, TSE_CONSTRAINT, a);
#if 0 /* disabled due to constraints system targets recode... code here needs review */
- target= get_constraint_target(con, &str);
- if (str && str[0]) ten->name= str;
- else if (target) ten->name= target->id.name+2;
- else ten->name= con->name;
+ target = get_constraint_target(con, &str);
+ if (str && str[0]) ten->name = str;
+ else if (target) ten->name = target->id.name + 2;
+ else ten->name = con->name;
#endif
- ten->name= con->name;
- ten->directdata= con;
+ ten->name = con->name;
+ ten->directdata = con;
/* possible add all other types links? */
}
}
@@ -562,30 +538,30 @@ static void outliner_add_object_contents(SpaceOops *soops, TreeElement *te, Tree
int index;
temod->name = "Modifiers";
- for (index=0,md=ob->modifiers.first; md; index++,md=md->next) {
+ for (index = 0, md = ob->modifiers.first; md; index++, md = md->next) {
TreeElement *te = outliner_add_element(soops, &temod->subtree, ob, temod, TSE_MODIFIER, index);
- te->name= md->name;
+ te->name = md->name;
te->directdata = md;
- if (md->type==eModifierType_Lattice) {
- outliner_add_element(soops, &te->subtree, ((LatticeModifierData*) md)->object, te, TSE_LINKED_OB, 0);
+ if (md->type == eModifierType_Lattice) {
+ outliner_add_element(soops, &te->subtree, ((LatticeModifierData *) md)->object, te, TSE_LINKED_OB, 0);
}
- else if (md->type==eModifierType_Curve) {
- outliner_add_element(soops, &te->subtree, ((CurveModifierData*) md)->object, te, TSE_LINKED_OB, 0);
+ else if (md->type == eModifierType_Curve) {
+ outliner_add_element(soops, &te->subtree, ((CurveModifierData *) md)->object, te, TSE_LINKED_OB, 0);
}
- else if (md->type==eModifierType_Armature) {
- outliner_add_element(soops, &te->subtree, ((ArmatureModifierData*) md)->object, te, TSE_LINKED_OB, 0);
+ else if (md->type == eModifierType_Armature) {
+ outliner_add_element(soops, &te->subtree, ((ArmatureModifierData *) md)->object, te, TSE_LINKED_OB, 0);
}
- else if (md->type==eModifierType_Hook) {
- outliner_add_element(soops, &te->subtree, ((HookModifierData*) md)->object, te, TSE_LINKED_OB, 0);
+ else if (md->type == eModifierType_Hook) {
+ outliner_add_element(soops, &te->subtree, ((HookModifierData *) md)->object, te, TSE_LINKED_OB, 0);
}
- else if (md->type==eModifierType_ParticleSystem) {
+ else if (md->type == eModifierType_ParticleSystem) {
TreeElement *ten;
- ParticleSystem *psys= ((ParticleSystemModifierData*) md)->psys;
+ ParticleSystem *psys = ((ParticleSystemModifierData *) md)->psys;
ten = outliner_add_element(soops, &te->subtree, ob, te, TSE_LINKED_PSYS, 0);
ten->directdata = psys;
- ten->name = psys->part->id.name+2;
+ ten->name = psys->part->id.name + 2;
}
}
}
@@ -594,13 +570,13 @@ static void outliner_add_object_contents(SpaceOops *soops, TreeElement *te, Tree
if (ob->defbase.first) {
bDeformGroup *defgroup;
TreeElement *ten;
- TreeElement *tenla= outliner_add_element(soops, &te->subtree, ob, te, TSE_DEFGROUP_BASE, 0);
+ TreeElement *tenla = outliner_add_element(soops, &te->subtree, ob, te, TSE_DEFGROUP_BASE, 0);
- tenla->name= "Vertex Groups";
- for (defgroup=ob->defbase.first, a=0; defgroup; defgroup=defgroup->next, a++) {
- ten= outliner_add_element(soops, &tenla->subtree, ob, tenla, TSE_DEFGROUP, a);
- ten->name= defgroup->name;
- ten->directdata= defgroup;
+ tenla->name = "Vertex Groups";
+ for (defgroup = ob->defbase.first, a = 0; defgroup; defgroup = defgroup->next, a++) {
+ ten = outliner_add_element(soops, &tenla->subtree, ob, tenla, TSE_DEFGROUP, a);
+ ten->name = defgroup->name;
+ ten->directdata = defgroup;
}
}
@@ -613,147 +589,147 @@ static void outliner_add_object_contents(SpaceOops *soops, TreeElement *te, Tree
static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStoreElem *tselem, ID *id)
{
/* tuck pointer back in object, to construct hierarchy */
- if (GS(id->name)==ID_OB) id->newid= (ID *)te;
+ if (GS(id->name) == ID_OB) id->newid = (ID *)te;
/* expand specific data always */
switch (GS(id->name)) {
case ID_LI:
{
- te->name= ((Library *)id)->name;
+ te->name = ((Library *)id)->name;
}
- break;
+ break;
case ID_SCE:
{
outliner_add_scene_contents(soops, &te->subtree, (Scene *)id, te);
}
- break;
+ break;
case ID_OB:
{
outliner_add_object_contents(soops, te, tselem, (Object *)id);
}
- break;
+ break;
case ID_ME:
{
- Mesh *me= (Mesh *)id;
+ Mesh *me = (Mesh *)id;
int a;
if (me->adt)
outliner_add_element(soops, &te->subtree, me, te, TSE_ANIM_DATA, 0);
outliner_add_element(soops, &te->subtree, me->key, te, 0, 0);
- for (a=0; a<me->totcol; a++)
+ for (a = 0; a < me->totcol; a++)
outliner_add_element(soops, &te->subtree, me->mat[a], te, 0, a);
/* could do tfaces with image links, but the images are not grouped nicely.
* would require going over all tfaces, sort images in use. etc... */
}
- break;
+ break;
case ID_CU:
{
- Curve *cu= (Curve *)id;
+ Curve *cu = (Curve *)id;
int a;
if (cu->adt)
outliner_add_element(soops, &te->subtree, cu, te, TSE_ANIM_DATA, 0);
- for (a=0; a<cu->totcol; a++)
+ for (a = 0; a < cu->totcol; a++)
outliner_add_element(soops, &te->subtree, cu->mat[a], te, 0, a);
}
- break;
+ break;
case ID_MB:
{
- MetaBall *mb= (MetaBall *)id;
+ MetaBall *mb = (MetaBall *)id;
int a;
if (mb->adt)
outliner_add_element(soops, &te->subtree, mb, te, TSE_ANIM_DATA, 0);
- for (a=0; a<mb->totcol; a++)
+ for (a = 0; a < mb->totcol; a++)
outliner_add_element(soops, &te->subtree, mb->mat[a], te, 0, a);
}
- break;
+ break;
case ID_MA:
{
- Material *ma= (Material *)id;
+ Material *ma = (Material *)id;
int a;
if (ma->adt)
outliner_add_element(soops, &te->subtree, ma, te, TSE_ANIM_DATA, 0);
- for (a=0; a<MAX_MTEX; a++) {
+ for (a = 0; a < MAX_MTEX; a++) {
if (ma->mtex[a]) outliner_add_element(soops, &te->subtree, ma->mtex[a]->tex, te, 0, a);
}
}
- break;
+ break;
case ID_TE:
{
- Tex *tex= (Tex *)id;
+ Tex *tex = (Tex *)id;
if (tex->adt)
outliner_add_element(soops, &te->subtree, tex, te, TSE_ANIM_DATA, 0);
outliner_add_element(soops, &te->subtree, tex->ima, te, 0, 0);
}
- break;
+ break;
case ID_CA:
{
- Camera *ca= (Camera *)id;
+ Camera *ca = (Camera *)id;
if (ca->adt)
outliner_add_element(soops, &te->subtree, ca, te, TSE_ANIM_DATA, 0);
}
- break;
+ break;
case ID_LA:
{
- Lamp *la= (Lamp *)id;
+ Lamp *la = (Lamp *)id;
int a;
if (la->adt)
outliner_add_element(soops, &te->subtree, la, te, TSE_ANIM_DATA, 0);
- for (a=0; a<MAX_MTEX; a++) {
+ for (a = 0; a < MAX_MTEX; a++) {
if (la->mtex[a]) outliner_add_element(soops, &te->subtree, la->mtex[a]->tex, te, 0, a);
}
}
- break;
+ break;
case ID_SPK:
- {
- Speaker *spk= (Speaker *)id;
+ {
+ Speaker *spk = (Speaker *)id;
- if (spk->adt)
- outliner_add_element(soops, &te->subtree, spk, te, TSE_ANIM_DATA, 0);
- }
- break;
+ if (spk->adt)
+ outliner_add_element(soops, &te->subtree, spk, te, TSE_ANIM_DATA, 0);
+ }
+ break;
case ID_WO:
{
- World *wrld= (World *)id;
+ World *wrld = (World *)id;
int a;
if (wrld->adt)
outliner_add_element(soops, &te->subtree, wrld, te, TSE_ANIM_DATA, 0);
- for (a=0; a<MAX_MTEX; a++) {
+ for (a = 0; a < MAX_MTEX; a++) {
if (wrld->mtex[a]) outliner_add_element(soops, &te->subtree, wrld->mtex[a]->tex, te, 0, a);
}
}
- break;
+ break;
case ID_KE:
{
- Key *key= (Key *)id;
+ Key *key = (Key *)id;
if (key->adt)
outliner_add_element(soops, &te->subtree, key, te, TSE_ANIM_DATA, 0);
}
- break;
+ break;
case ID_AC:
{
// XXX do we want to be exposing the F-Curves here?
//bAction *act= (bAction *)id;
}
- break;
+ break;
case ID_AR:
{
- bArmature *arm= (bArmature *)id;
- int a= 0;
+ bArmature *arm = (bArmature *)id;
+ int a = 0;
if (arm->adt)
outliner_add_element(soops, &te->subtree, arm, te, TSE_ANIM_DATA, 0);
@@ -762,115 +738,115 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor
EditBone *ebone;
TreeElement *ten;
- for (ebone = arm->edbo->first; ebone; ebone=ebone->next, a++) {
- ten= outliner_add_element(soops, &te->subtree, id, te, TSE_EBONE, a);
- ten->directdata= ebone;
- ten->name= ebone->name;
- ebone->temp= ten;
+ for (ebone = arm->edbo->first; ebone; ebone = ebone->next, a++) {
+ ten = outliner_add_element(soops, &te->subtree, id, te, TSE_EBONE, a);
+ ten->directdata = ebone;
+ ten->name = ebone->name;
+ ebone->temp = ten;
}
/* make hierarchy */
- ten= arm->edbo->first ? ((EditBone *)arm->edbo->first)->temp : NULL;
+ ten = arm->edbo->first ? ((EditBone *)arm->edbo->first)->temp : NULL;
while (ten) {
- TreeElement *nten= ten->next, *par;
- ebone= (EditBone *)ten->directdata;
+ TreeElement *nten = ten->next, *par;
+ ebone = (EditBone *)ten->directdata;
if (ebone->parent) {
BLI_remlink(&te->subtree, ten);
- par= ebone->parent->temp;
+ par = ebone->parent->temp;
BLI_addtail(&par->subtree, ten);
- ten->parent= par;
+ ten->parent = par;
}
- ten= nten;
+ ten = nten;
}
}
else {
/* do not extend Armature when we have posemode */
- tselem= TREESTORE(te->parent);
- if ( GS(tselem->id->name)==ID_OB && ((Object *)tselem->id)->mode & OB_MODE_POSE);
+ tselem = TREESTORE(te->parent);
+ if (GS(tselem->id->name) == ID_OB && ((Object *)tselem->id)->mode & OB_MODE_POSE) ;
else {
Bone *curBone;
- for (curBone=arm->bonebase.first; curBone; curBone=curBone->next) {
+ for (curBone = arm->bonebase.first; curBone; curBone = curBone->next) {
outliner_add_bone(soops, &te->subtree, id, curBone, te, &a);
}
}
}
}
- break;
+ break;
}
}
// TODO: this function needs to be split up! It's getting a bit too large...
static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *idv,
- TreeElement *parent, short type, short index)
+ TreeElement *parent, short type, short index)
{
TreeElement *te;
TreeStoreElem *tselem;
- ID *id= idv;
+ ID *id = idv;
int a = 0;
if (ELEM3(type, TSE_RNA_STRUCT, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM)) {
- id= ((PointerRNA*)idv)->id.data;
- if (!id) id= ((PointerRNA*)idv)->data;
+ id = ((PointerRNA *)idv)->id.data;
+ if (!id) id = ((PointerRNA *)idv)->data;
}
- if (id==NULL) return NULL;
+ if (id == NULL) return NULL;
- te= MEM_callocN(sizeof(TreeElement), "tree elem");
+ te = MEM_callocN(sizeof(TreeElement), "tree elem");
/* add to the visual tree */
BLI_addtail(lb, te);
/* add to the storage */
check_persistent(soops, te, id, type, index);
- tselem= TREESTORE(te);
+ tselem = TREESTORE(te);
/* if we are searching for something expand to see child elements */
if (SEARCHING_OUTLINER(soops))
tselem->flag |= TSE_CHILDSEARCH;
- te->parent= parent;
- te->index= index; // for data arays
- if (ELEM3(type, TSE_SEQUENCE, TSE_SEQ_STRIP, TSE_SEQUENCE_DUP));
- else if (ELEM3(type, TSE_RNA_STRUCT, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM));
- else if (type==TSE_ANIM_DATA);
+ te->parent = parent;
+ te->index = index; // for data arays
+ if (ELEM3(type, TSE_SEQUENCE, TSE_SEQ_STRIP, TSE_SEQUENCE_DUP)) ;
+ else if (ELEM3(type, TSE_RNA_STRUCT, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM)) ;
+ else if (type == TSE_ANIM_DATA) ;
else {
- te->name= id->name+2; // default, can be overridden by Library or non-ID data
- te->idcode= GS(id->name);
+ te->name = id->name + 2; // default, can be overridden by Library or non-ID data
+ te->idcode = GS(id->name);
}
- if (type==0) {
+ if (type == 0) {
/* ID datablock */
outliner_add_id_contents(soops, te, tselem, id);
}
- else if (type==TSE_ANIM_DATA) {
+ else if (type == TSE_ANIM_DATA) {
IdAdtTemplate *iat = (IdAdtTemplate *)idv;
- AnimData *adt= (AnimData *)iat->adt;
+ AnimData *adt = (AnimData *)iat->adt;
/* this element's info */
- te->name= "Animation";
- te->directdata= adt;
+ te->name = "Animation";
+ te->directdata = adt;
/* Action */
outliner_add_element(soops, &te->subtree, adt->action, te, 0, 0);
/* Drivers */
if (adt->drivers.first) {
- TreeElement *ted= outliner_add_element(soops, &te->subtree, adt, te, TSE_DRIVER_BASE, 0);
- ID *lastadded= NULL;
+ TreeElement *ted = outliner_add_element(soops, &te->subtree, adt, te, TSE_DRIVER_BASE, 0);
+ ID *lastadded = NULL;
FCurve *fcu;
- ted->name= "Drivers";
+ ted->name = "Drivers";
- for (fcu= adt->drivers.first; fcu; fcu= fcu->next) {
+ for (fcu = adt->drivers.first; fcu; fcu = fcu->next) {
if (fcu->driver && fcu->driver->variables.first) {
- ChannelDriver *driver= fcu->driver;
+ ChannelDriver *driver = fcu->driver;
DriverVar *dvar;
- for (dvar= driver->variables.first; dvar; dvar= dvar->next) {
+ for (dvar = driver->variables.first; dvar; dvar = dvar->next) {
/* loop over all targets used here */
DRIVER_TARGETS_USED_LOOPER(dvar)
{
if (lastadded != dtar->id) {
// XXX this lastadded check is rather lame, and also fails quite badly...
outliner_add_element(soops, &ted->subtree, dtar->id, ted, TSE_LINKED_OB, 0);
- lastadded= dtar->id;
+ lastadded = dtar->id;
}
}
DRIVER_TARGETS_LOOPER_END
@@ -881,29 +857,29 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
/* NLA Data */
if (adt->nla_tracks.first) {
- TreeElement *tenla= outliner_add_element(soops, &te->subtree, adt, te, TSE_NLA, 0);
+ TreeElement *tenla = outliner_add_element(soops, &te->subtree, adt, te, TSE_NLA, 0);
NlaTrack *nlt;
- int a= 0;
+ int a = 0;
- tenla->name= "NLA Tracks";
+ tenla->name = "NLA Tracks";
- for (nlt= adt->nla_tracks.first; nlt; nlt= nlt->next) {
- TreeElement *tenlt= outliner_add_element(soops, &tenla->subtree, nlt, tenla, TSE_NLA_TRACK, a);
+ for (nlt = adt->nla_tracks.first; nlt; nlt = nlt->next) {
+ TreeElement *tenlt = outliner_add_element(soops, &tenla->subtree, nlt, tenla, TSE_NLA_TRACK, a);
NlaStrip *strip;
TreeElement *ten;
- int b= 0;
+ int b = 0;
- tenlt->name= nlt->name;
+ tenlt->name = nlt->name;
- for (strip=nlt->strips.first; strip; strip=strip->next, b++) {
- ten= outliner_add_element(soops, &tenlt->subtree, strip->act, tenlt, TSE_NLA_ACTION, b);
- if (ten) ten->directdata= strip;
+ for (strip = nlt->strips.first; strip; strip = strip->next, b++) {
+ ten = outliner_add_element(soops, &tenlt->subtree, strip->act, tenlt, TSE_NLA_ACTION, b);
+ if (ten) ten->directdata = strip;
}
}
}
}
- else if (type==TSE_SEQUENCE) {
- Sequence *seq= (Sequence*) idv;
+ else if (type == TSE_SEQUENCE) {
+ Sequence *seq = (Sequence *) idv;
Sequence *p;
/*
@@ -911,56 +887,56 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
* only check te->idcode if te->type is equal to zero,
* so this is "safe".
*/
- te->idcode= seq->type;
- te->directdata= seq;
+ te->idcode = seq->type;
+ te->directdata = seq;
- if (seq->type<7) {
+ if (seq->type < 7) {
/*
* This work like the sequence.
* If the sequence have a name (not default name)
* show it, in other case put the filename.
*/
if (strcmp(seq->name, "SQ"))
- te->name= seq->name;
+ te->name = seq->name;
else {
if ((seq->strip) && (seq->strip->stripdata))
- te->name= seq->strip->stripdata->name;
+ te->name = seq->strip->stripdata->name;
else
- te->name= "SQ None";
+ te->name = "SQ None";
}
- if (seq->type==SEQ_META) {
- te->name= "Meta Strip";
- p= seq->seqbase.first;
+ if (seq->type == SEQ_META) {
+ te->name = "Meta Strip";
+ p = seq->seqbase.first;
while (p) {
- outliner_add_element(soops, &te->subtree, (void*)p, te, TSE_SEQUENCE, index);
- p= p->next;
+ outliner_add_element(soops, &te->subtree, (void *)p, te, TSE_SEQUENCE, index);
+ p = p->next;
}
}
else
- outliner_add_element(soops, &te->subtree, (void*)seq->strip, te, TSE_SEQ_STRIP, index);
+ outliner_add_element(soops, &te->subtree, (void *)seq->strip, te, TSE_SEQ_STRIP, index);
}
else
- te->name= "Effect";
+ te->name = "Effect";
}
- else if (type==TSE_SEQ_STRIP) {
- Strip *strip= (Strip *)idv;
+ else if (type == TSE_SEQ_STRIP) {
+ Strip *strip = (Strip *)idv;
if (strip->dir)
- te->name= strip->dir;
+ te->name = strip->dir;
else
- te->name= "Strip None";
- te->directdata= strip;
+ te->name = "Strip None";
+ te->directdata = strip;
}
- else if (type==TSE_SEQUENCE_DUP) {
- Sequence *seq= (Sequence*)idv;
+ else if (type == TSE_SEQUENCE_DUP) {
+ Sequence *seq = (Sequence *)idv;
- te->idcode= seq->type;
- te->directdata= seq;
- te->name= seq->strip->stripdata->name;
+ te->idcode = seq->type;
+ te->directdata = seq;
+ te->name = seq->strip->stripdata->name;
}
else if (ELEM3(type, TSE_RNA_STRUCT, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM)) {
- PointerRNA pptr, propptr, *ptr= (PointerRNA*)idv;
+ PointerRNA pptr, propptr, *ptr = (PointerRNA *)idv;
PropertyRNA *prop, *iterprop;
PropertyType proptype;
int a, tot;
@@ -968,80 +944,80 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
/* we do lazy build, for speed and to avoid infinite recusion */
if (ptr->data == NULL) {
- te->name= "(empty)";
+ te->name = "(empty)";
}
else if (type == TSE_RNA_STRUCT) {
/* struct */
- te->name= RNA_struct_name_get_alloc(ptr, NULL, 0, NULL);
+ te->name = RNA_struct_name_get_alloc(ptr, NULL, 0, NULL);
if (te->name)
te->flag |= TE_FREE_NAME;
else
- te->name= RNA_struct_ui_name(ptr->type);
+ te->name = RNA_struct_ui_name(ptr->type);
/* If searching don't expand RNA entries */
- if (SEARCHING_OUTLINER(soops) && BLI_strcasecmp("RNA",te->name)==0) tselem->flag &= ~TSE_CHILDSEARCH;
+ if (SEARCHING_OUTLINER(soops) && BLI_strcasecmp("RNA", te->name) == 0) tselem->flag &= ~TSE_CHILDSEARCH;
- iterprop= RNA_struct_iterator_property(ptr->type);
- tot= RNA_property_collection_length(ptr, iterprop);
+ iterprop = RNA_struct_iterator_property(ptr->type);
+ tot = RNA_property_collection_length(ptr, iterprop);
/* auto open these cases */
if (!parent || (RNA_property_type(parent->directdata)) == PROP_POINTER)
if (!tselem->used)
tselem->flag &= ~TSE_CLOSED;
- if (TSELEM_OPEN(tselem,soops)) {
- for (a=0; a<tot; a++)
- outliner_add_element(soops, &te->subtree, (void*)ptr, te, TSE_RNA_PROPERTY, a);
+ if (TSELEM_OPEN(tselem, soops)) {
+ for (a = 0; a < tot; a++)
+ outliner_add_element(soops, &te->subtree, (void *)ptr, te, TSE_RNA_PROPERTY, a);
}
else if (tot)
te->flag |= TE_LAZY_CLOSED;
- te->rnaptr= *ptr;
+ te->rnaptr = *ptr;
}
else if (type == TSE_RNA_PROPERTY) {
/* property */
- iterprop= RNA_struct_iterator_property(ptr->type);
+ iterprop = RNA_struct_iterator_property(ptr->type);
RNA_property_collection_lookup_int(ptr, iterprop, index, &propptr);
- prop= propptr.data;
- proptype= RNA_property_type(prop);
+ prop = propptr.data;
+ proptype = RNA_property_type(prop);
- te->name= RNA_property_ui_name(prop);
- te->directdata= prop;
- te->rnaptr= *ptr;
+ te->name = RNA_property_ui_name(prop);
+ te->directdata = prop;
+ te->rnaptr = *ptr;
/* If searching don't expand RNA entries */
- if (SEARCHING_OUTLINER(soops) && BLI_strcasecmp("RNA",te->name)==0) tselem->flag &= ~TSE_CHILDSEARCH;
+ if (SEARCHING_OUTLINER(soops) && BLI_strcasecmp("RNA", te->name) == 0) tselem->flag &= ~TSE_CHILDSEARCH;
if (proptype == PROP_POINTER) {
- pptr= RNA_property_pointer_get(ptr, prop);
+ pptr = RNA_property_pointer_get(ptr, prop);
if (pptr.data) {
- if (TSELEM_OPEN(tselem,soops))
- outliner_add_element(soops, &te->subtree, (void*)&pptr, te, TSE_RNA_STRUCT, -1);
+ if (TSELEM_OPEN(tselem, soops))
+ outliner_add_element(soops, &te->subtree, (void *)&pptr, te, TSE_RNA_STRUCT, -1);
else
te->flag |= TE_LAZY_CLOSED;
}
}
else if (proptype == PROP_COLLECTION) {
- tot= RNA_property_collection_length(ptr, prop);
+ tot = RNA_property_collection_length(ptr, prop);
- if (TSELEM_OPEN(tselem,soops)) {
- for (a=0; a<tot; a++) {
+ if (TSELEM_OPEN(tselem, soops)) {
+ for (a = 0; a < tot; a++) {
RNA_property_collection_lookup_int(ptr, prop, a, &pptr);
- outliner_add_element(soops, &te->subtree, (void*)&pptr, te, TSE_RNA_STRUCT, a);
+ outliner_add_element(soops, &te->subtree, (void *)&pptr, te, TSE_RNA_STRUCT, a);
}
}
else if (tot)
te->flag |= TE_LAZY_CLOSED;
}
else if (ELEM3(proptype, PROP_BOOLEAN, PROP_INT, PROP_FLOAT)) {
- tot= RNA_property_array_length(ptr, prop);
+ tot = RNA_property_array_length(ptr, prop);
- if (TSELEM_OPEN(tselem,soops)) {
- for (a=0; a<tot; a++)
- outliner_add_element(soops, &te->subtree, (void*)ptr, te, TSE_RNA_ARRAY_ELEM, a);
+ if (TSELEM_OPEN(tselem, soops)) {
+ for (a = 0; a < tot; a++)
+ outliner_add_element(soops, &te->subtree, (void *)ptr, te, TSE_RNA_ARRAY_ELEM, a);
}
else if (tot)
te->flag |= TE_LAZY_CLOSED;
@@ -1050,51 +1026,51 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
else if (type == TSE_RNA_ARRAY_ELEM) {
char c;
- prop= parent->directdata;
+ prop = parent->directdata;
- te->directdata= prop;
- te->rnaptr= *ptr;
- te->index= index;
+ te->directdata = prop;
+ te->rnaptr = *ptr;
+ te->index = index;
- c= RNA_property_array_item_char(prop, index);
+ c = RNA_property_array_item_char(prop, index);
- te->name= MEM_callocN(sizeof(char)*20, "OutlinerRNAArrayName");
+ te->name = MEM_callocN(sizeof(char) * 20, "OutlinerRNAArrayName");
if (c) sprintf((char *)te->name, " %c", c);
- else sprintf((char *)te->name, " %d", index+1);
+ else sprintf((char *)te->name, " %d", index + 1);
te->flag |= TE_FREE_NAME;
}
}
else if (type == TSE_KEYMAP) {
- wmKeyMap *km= (wmKeyMap *)idv;
+ wmKeyMap *km = (wmKeyMap *)idv;
wmKeyMapItem *kmi;
char opname[OP_MAX_TYPENAME];
- te->directdata= idv;
- te->name= km->idname;
+ te->directdata = idv;
+ te->name = km->idname;
- if (TSELEM_OPEN(tselem,soops)) {
- a= 0;
+ if (TSELEM_OPEN(tselem, soops)) {
+ a = 0;
for (kmi = km->items.first; kmi; kmi = kmi->next, a++) {
- const char *key= WM_key_event_string(kmi->type);
+ const char *key = WM_key_event_string(kmi->type);
if (key[0]) {
- wmOperatorType *ot= NULL;
+ wmOperatorType *ot = NULL;
- if (kmi->propvalue);
- else ot= WM_operatortype_find(kmi->idname, 0);
+ if (kmi->propvalue) ;
+ else ot = WM_operatortype_find(kmi->idname, 0);
if (ot || kmi->propvalue) {
- TreeElement *ten= outliner_add_element(soops, &te->subtree, kmi, te, TSE_KEYMAP_ITEM, a);
+ TreeElement *ten = outliner_add_element(soops, &te->subtree, kmi, te, TSE_KEYMAP_ITEM, a);
- ten->directdata= kmi;
+ ten->directdata = kmi;
if (kmi->propvalue) {
- ten->name= "Modal map, not yet";
+ ten->name = "Modal map, not yet";
}
else {
WM_operator_py_idname(opname, ot->idname);
- ten->name= BLI_strdup(opname);
+ ten->name = BLI_strdup(opname);
ten->flag |= TE_FREE_NAME;
}
}
@@ -1123,28 +1099,28 @@ static int need_add_seq_dup(Sequence *seq)
* First check backward, if we found a duplicate
* sequence before this, don't need it, just return.
*/
- p= seq->prev;
+ p = seq->prev;
while (p) {
if ((!p->strip) || (!p->strip->stripdata) || (!p->strip->stripdata->name)) {
- p= p->prev;
+ p = p->prev;
continue;
}
if (!strcmp(p->strip->stripdata->name, seq->strip->stripdata->name))
return(2);
- p= p->prev;
+ p = p->prev;
}
- p= seq->next;
+ p = seq->next;
while (p) {
if ((!p->strip) || (!p->strip->stripdata) || (!p->strip->stripdata->name)) {
- p= p->next;
+ p = p->next;
continue;
}
if (!strcmp(p->strip->stripdata->name, seq->strip->stripdata->name))
return(0);
- p= p->next;
+ p = p->next;
}
return(1);
}
@@ -1154,16 +1130,16 @@ static void outliner_add_seq_dup(SpaceOops *soops, Sequence *seq, TreeElement *t
/* TreeElement *ch; */ /* UNUSED */
Sequence *p;
- p= seq;
+ p = seq;
while (p) {
if ((!p->strip) || (!p->strip->stripdata) || (!p->strip->stripdata->name)) {
- p= p->next;
+ p = p->next;
continue;
}
if (!strcmp(p->strip->stripdata->name, seq->strip->stripdata->name))
- /* ch= */ /* UNUSED */ outliner_add_element(soops, &te->subtree, (void*)p, te, TSE_SEQUENCE, index);
- p= p->next;
+ /* ch= */ /* UNUSED */ outliner_add_element(soops, &te->subtree, (void *)p, te, TSE_SEQUENCE, index);
+ p = p->next;
}
}
@@ -1180,22 +1156,22 @@ static void outliner_make_hierarchy(SpaceOops *soops, ListBase *lb)
/* build hierarchy */
// XXX also, set extents here...
- te= lb->first;
+ te = lb->first;
while (te) {
- ten= te->next;
- tselem= TREESTORE(te);
+ ten = te->next;
+ tselem = TREESTORE(te);
- if (tselem->type==0 && te->idcode==ID_OB) {
- Object *ob= (Object *)tselem->id;
+ if (tselem->type == 0 && te->idcode == ID_OB) {
+ Object *ob = (Object *)tselem->id;
if (ob->parent && ob->parent->id.newid) {
BLI_remlink(lb, te);
- tep= (TreeElement *)ob->parent->id.newid;
+ tep = (TreeElement *)ob->parent->id.newid;
BLI_addtail(&tep->subtree, te);
// set correct parent pointers
- for (te=tep->subtree.first; te; te= te->next) te->parent= tep;
+ for (te = tep->subtree.first; te; te = te->next) te->parent = tep;
}
}
- te= ten;
+ te = ten;
}
}
@@ -1211,20 +1187,20 @@ typedef struct tTreeSort {
/* alphabetical comparator */
static int treesort_alpha(const void *v1, const void *v2)
{
- const tTreeSort *x1= v1, *x2= v2;
+ const tTreeSort *x1 = v1, *x2 = v2;
int comp;
/* first put objects last (hierarchy) */
- comp= (x1->idcode==ID_OB);
- if (x2->idcode==ID_OB) comp+=2;
+ comp = (x1->idcode == ID_OB);
+ if (x2->idcode == ID_OB) comp += 2;
- if (comp==1) return 1;
- else if (comp==2) return -1;
- else if (comp==3) {
- comp= strcmp(x1->name, x2->name);
+ if (comp == 1) return 1;
+ else if (comp == 2) return -1;
+ else if (comp == 3) {
+ comp = strcmp(x1->name, x2->name);
- if ( comp>0 ) return 1;
- else if ( comp<0) return -1;
+ if (comp > 0) return 1;
+ else if (comp < 0) return -1;
return 0;
}
return 0;
@@ -1234,23 +1210,23 @@ static int treesort_alpha(const void *v1, const void *v2)
#if 0
static int treesort_obtype_alpha(const void *v1, const void *v2)
{
- const tTreeSort *x1= v1, *x2= v2;
+ const tTreeSort *x1 = v1, *x2 = v2;
/* first put objects last (hierarchy) */
- if (x1->idcode==ID_OB && x2->idcode!=ID_OB) return 1;
- else if (x2->idcode==ID_OB && x1->idcode!=ID_OB) return -1;
+ if (x1->idcode == ID_OB && x2->idcode != ID_OB) return 1;
+ else if (x2->idcode == ID_OB && x1->idcode != ID_OB) return -1;
else {
/* 2nd we check ob type */
- if (x1->idcode==ID_OB && x2->idcode==ID_OB) {
+ if (x1->idcode == ID_OB && x2->idcode == ID_OB) {
if ( ((Object *)x1->id)->type > ((Object *)x2->id)->type) return 1;
else if ( ((Object *)x1->id)->type > ((Object *)x2->id)->type) return -1;
else return 0;
}
else {
- int comp= strcmp(x1->name, x2->name);
+ int comp = strcmp(x1->name, x2->name);
- if ( comp>0 ) return 1;
- else if ( comp<0) return -1;
+ if (comp > 0) return 1;
+ else if (comp < 0) return -1;
return 0;
}
}
@@ -1262,40 +1238,40 @@ static void outliner_sort(SpaceOops *soops, ListBase *lb)
{
TreeElement *te;
TreeStoreElem *tselem;
- int totelem=0;
+ int totelem = 0;
- te= lb->last;
- if (te==NULL) return;
- tselem= TREESTORE(te);
+ te = lb->last;
+ if (te == NULL) return;
+ tselem = TREESTORE(te);
/* sorting rules; only object lists or deformgroups */
- if ( (tselem->type==TSE_DEFGROUP) || (tselem->type==0 && te->idcode==ID_OB)) {
+ if ( (tselem->type == TSE_DEFGROUP) || (tselem->type == 0 && te->idcode == ID_OB)) {
/* count first */
- for (te= lb->first; te; te= te->next) totelem++;
+ for (te = lb->first; te; te = te->next) totelem++;
- if (totelem>1) {
- tTreeSort *tear= MEM_mallocN(totelem*sizeof(tTreeSort), "tree sort array");
- tTreeSort *tp=tear;
- int skip= 0;
-
- for (te= lb->first; te; te= te->next, tp++) {
- tselem= TREESTORE(te);
- tp->te= te;
- tp->name= te->name;
- tp->idcode= te->idcode;
- if (tselem->type && tselem->type!=TSE_DEFGROUP) tp->idcode= 0; // don't sort this
- tp->id= tselem->id;
+ if (totelem > 1) {
+ tTreeSort *tear = MEM_mallocN(totelem * sizeof(tTreeSort), "tree sort array");
+ tTreeSort *tp = tear;
+ int skip = 0;
+
+ for (te = lb->first; te; te = te->next, tp++) {
+ tselem = TREESTORE(te);
+ tp->te = te;
+ tp->name = te->name;
+ tp->idcode = te->idcode;
+ if (tselem->type && tselem->type != TSE_DEFGROUP) tp->idcode = 0; // don't sort this
+ tp->id = tselem->id;
}
/* keep beginning of list */
- for (tp= tear, skip=0; skip<totelem; skip++, tp++)
+ for (tp = tear, skip = 0; skip < totelem; skip++, tp++)
if (tp->idcode) break;
- if (skip<totelem)
- qsort(tear+skip, totelem-skip, sizeof(tTreeSort), treesort_alpha);
+ if (skip < totelem)
+ qsort(tear + skip, totelem - skip, sizeof(tTreeSort), treesort_alpha);
- lb->first=lb->last= NULL;
- tp= tear;
+ lb->first = lb->last = NULL;
+ tp = tear;
while (totelem--) {
BLI_addtail(lb, tp->te);
tp++;
@@ -1304,7 +1280,7 @@ static void outliner_sort(SpaceOops *soops, ListBase *lb)
}
}
- for (te= lb->first; te; te= te->next) {
+ for (te = lb->first; te; te = te->next) {
outliner_sort(soops, &te->subtree);
}
}
@@ -1314,36 +1290,36 @@ static void outliner_sort(SpaceOops *soops, ListBase *lb)
static int outliner_filter_has_name(TreeElement *te, const char *name, int flags)
{
#if 0
- int found= 0;
+ int found = 0;
/* determine if match */
if (flags & SO_FIND_CASE_SENSITIVE) {
if (flags & SO_FIND_COMPLETE)
- found= strcmp(te->name, name) == 0;
+ found = strcmp(te->name, name) == 0;
else
- found= strstr(te->name, name) != NULL;
+ found = strstr(te->name, name) != NULL;
}
else {
if (flags & SO_FIND_COMPLETE)
- found= BLI_strcasecmp(te->name, name) == 0;
+ found = BLI_strcasecmp(te->name, name) == 0;
else
- found= BLI_strcasestr(te->name, name) != NULL;
+ found = BLI_strcasestr(te->name, name) != NULL;
}
#else
- int fn_flag= 0;
- int found= 0;
+ int fn_flag = 0;
+ int found = 0;
if ((flags & SO_FIND_CASE_SENSITIVE) == 0)
fn_flag |= FNM_CASEFOLD;
if (flags & SO_FIND_COMPLETE) {
- found= fnmatch(name, te->name, fn_flag)==0;
+ found = fnmatch(name, te->name, fn_flag) == 0;
}
else {
char fn_name[sizeof(((struct SpaceOops *)NULL)->search_string) + 2];
BLI_snprintf(fn_name, sizeof(fn_name), "*%s*", name);
- found= fnmatch(fn_name, te->name, fn_flag)==0;
+ found = fnmatch(fn_name, te->name, fn_flag) == 0;
}
return found;
#endif
@@ -1357,25 +1333,25 @@ static int outliner_filter_tree(SpaceOops *soops, ListBase *lb)
/* although we don't have any search string, we return TRUE
* since the entire tree is ok then...
*/
- if (soops->search_string[0]==0)
+ if (soops->search_string[0] == 0)
return 1;
- for (te= lb->first; te; te= ten) {
- ten= te->next;
+ for (te = lb->first; te; te = ten) {
+ ten = te->next;
- if (0==outliner_filter_has_name(te, soops->search_string, soops->search_flags)) {
+ if (0 == outliner_filter_has_name(te, soops->search_string, soops->search_flags)) {
/* item isn't something we're looking for, but...
- * - if the subtree is expanded, check if there are any matches that can be easily found
+ * - if the subtree is expanded, check if there are any matches that can be easily found
* so that searching for "cu" in the default scene will still match the Cube
* - otherwise, we can't see within the subtree and the item doesn't match,
* so these can be safely ignored (i.e. the subtree can get freed)
*/
- tselem= TREESTORE(te);
+ tselem = TREESTORE(te);
/* flag as not a found item */
tselem->flag &= ~TSE_SEARCHMATCH;
- if ((!TSELEM_OPEN(tselem,soops)) || outliner_filter_tree(soops, &te->subtree)==0) {
+ if ((!TSELEM_OPEN(tselem, soops)) || outliner_filter_tree(soops, &te->subtree) == 0) {
outliner_free_tree(&te->subtree);
BLI_remlink(lb, te);
@@ -1384,7 +1360,7 @@ static int outliner_filter_tree(SpaceOops *soops, ListBase *lb)
}
}
else {
- tselem= TREESTORE(te);
+ tselem = TREESTORE(te);
/* flag as a found item - we can then highlight it */
tselem->flag |= TSE_SEARCHMATCH;
@@ -1407,14 +1383,14 @@ void outliner_build_tree(Main *mainvar, Scene *scene, SpaceOops *soops)
{
Base *base;
Object *ob;
- TreeElement *te=NULL, *ten;
+ TreeElement *te = NULL, *ten;
TreeStoreElem *tselem;
- int show_opened= (soops->treestore==NULL); /* on first view, we open scenes */
+ int show_opened = (soops->treestore == NULL); /* on first view, we open scenes */
/* Are we looking for something - we want to tag parents to filter child matches
* - NOT in datablocks view - searching all datablocks takes way too long to be useful
* - this variable is only set once per tree build */
- if (soops->search_string[0]!=0 && soops->outlinevis!=SO_DATABLOCKS)
+ if (soops->search_string[0] != 0 && soops->outlinevis != SO_DATABLOCKS)
soops->search_flags |= SO_SEARCH_RECURSIVE;
else
soops->search_flags &= ~SO_SEARCH_RECURSIVE;
@@ -1426,64 +1402,64 @@ void outliner_build_tree(Main *mainvar, Scene *scene, SpaceOops *soops)
outliner_storage_cleanup(soops);
/* clear ob id.new flags */
- for (ob= mainvar->object.first; ob; ob= ob->id.next) ob->id.newid= NULL;
+ for (ob = mainvar->object.first; ob; ob = ob->id.next) ob->id.newid = NULL;
/* options */
if (soops->outlinevis == SO_LIBRARIES) {
Library *lib;
- for (lib= mainvar->library.first; lib; lib= lib->id.next) {
- ten= outliner_add_element(soops, &soops->tree, lib, NULL, 0, 0);
- lib->id.newid= (ID *)ten;
+ for (lib = mainvar->library.first; lib; lib = lib->id.next) {
+ ten = outliner_add_element(soops, &soops->tree, lib, NULL, 0, 0);
+ lib->id.newid = (ID *)ten;
}
/* make hierarchy */
- ten= soops->tree.first;
+ ten = soops->tree.first;
while (ten) {
- TreeElement *nten= ten->next, *par;
- tselem= TREESTORE(ten);
- lib= (Library *)tselem->id;
+ TreeElement *nten = ten->next, *par;
+ tselem = TREESTORE(ten);
+ lib = (Library *)tselem->id;
if (lib->parent) {
BLI_remlink(&soops->tree, ten);
- par= (TreeElement *)lib->parent->id.newid;
+ par = (TreeElement *)lib->parent->id.newid;
BLI_addtail(&par->subtree, ten);
- ten->parent= par;
+ ten->parent = par;
}
- ten= nten;
+ ten = nten;
}
/* restore newid pointers */
- for (lib= mainvar->library.first; lib; lib= lib->id.next)
- lib->id.newid= NULL;
+ for (lib = mainvar->library.first; lib; lib = lib->id.next)
+ lib->id.newid = NULL;
}
else if (soops->outlinevis == SO_ALL_SCENES) {
Scene *sce;
- for (sce= mainvar->scene.first; sce; sce= sce->id.next) {
- te= outliner_add_element(soops, &soops->tree, sce, NULL, 0, 0);
- tselem= TREESTORE(te);
- if (sce==scene && show_opened)
+ for (sce = mainvar->scene.first; sce; sce = sce->id.next) {
+ te = outliner_add_element(soops, &soops->tree, sce, NULL, 0, 0);
+ tselem = TREESTORE(te);
+ if (sce == scene && show_opened)
tselem->flag &= ~TSE_CLOSED;
- for (base= sce->base.first; base; base= base->next) {
- ten= outliner_add_element(soops, &te->subtree, base->object, te, 0, 0);
- ten->directdata= base;
+ for (base = sce->base.first; base; base = base->next) {
+ ten = outliner_add_element(soops, &te->subtree, base->object, te, 0, 0);
+ ten->directdata = base;
}
outliner_make_hierarchy(soops, &te->subtree);
/* clear id.newid, to prevent objects be inserted in wrong scenes (parent in other scene) */
- for (base= sce->base.first; base; base= base->next) base->object->id.newid= NULL;
+ for (base = sce->base.first; base; base = base->next) base->object->id.newid = NULL;
}
}
else if (soops->outlinevis == SO_CUR_SCENE) {
outliner_add_scene_contents(soops, &soops->tree, scene, NULL);
- for (base= scene->base.first; base; base= base->next) {
- ten= outliner_add_element(soops, &soops->tree, base->object, NULL, 0, 0);
- ten->directdata= base;
+ for (base = scene->base.first; base; base = base->next) {
+ ten = outliner_add_element(soops, &soops->tree, base->object, NULL, 0, 0);
+ ten->directdata = base;
}
outliner_make_hierarchy(soops, &soops->tree);
}
else if (soops->outlinevis == SO_VISIBLE) {
- for (base= scene->base.first; base; base= base->next) {
+ for (base = scene->base.first; base; base = base->next) {
if (base->lay & scene->lay)
outliner_add_element(soops, &soops->tree, base->object, NULL, 0, 0);
}
@@ -1493,102 +1469,102 @@ void outliner_build_tree(Main *mainvar, Scene *scene, SpaceOops *soops)
Group *group;
GroupObject *go;
- for (group= mainvar->group.first; group; group= group->id.next) {
+ for (group = mainvar->group.first; group; group = group->id.next) {
if (group->gobject.first) {
- te= outliner_add_element(soops, &soops->tree, group, NULL, 0, 0);
+ te = outliner_add_element(soops, &soops->tree, group, NULL, 0, 0);
- for (go= group->gobject.first; go; go= go->next) {
- ten= outliner_add_element(soops, &te->subtree, go->ob, te, 0, 0);
- ten->directdata= NULL; /* eh, why? */
+ for (go = group->gobject.first; go; go = go->next) {
+ ten = outliner_add_element(soops, &te->subtree, go->ob, te, 0, 0);
+ ten->directdata = NULL; /* eh, why? */
}
outliner_make_hierarchy(soops, &te->subtree);
/* clear id.newid, to prevent objects be inserted in wrong scenes (parent in other scene) */
- for (go= group->gobject.first; go; go= go->next) go->ob->id.newid= NULL;
+ for (go = group->gobject.first; go; go = go->next) go->ob->id.newid = NULL;
}
}
}
else if (soops->outlinevis == SO_SAME_TYPE) {
- Object *ob= OBACT;
+ Object *ob = OBACT;
if (ob) {
- for (base= scene->base.first; base; base= base->next) {
- if (base->object->type==ob->type) {
- ten= outliner_add_element(soops, &soops->tree, base->object, NULL, 0, 0);
- ten->directdata= base;
+ for (base = scene->base.first; base; base = base->next) {
+ if (base->object->type == ob->type) {
+ ten = outliner_add_element(soops, &soops->tree, base->object, NULL, 0, 0);
+ ten->directdata = base;
}
}
outliner_make_hierarchy(soops, &soops->tree);
}
}
else if (soops->outlinevis == SO_SELECTED) {
- for (base= scene->base.first; base; base= base->next) {
+ for (base = scene->base.first; base; base = base->next) {
if (base->lay & scene->lay) {
- if (base==BASACT || (base->flag & SELECT)) {
- ten= outliner_add_element(soops, &soops->tree, base->object, NULL, 0, 0);
- ten->directdata= base;
+ if (base == BASACT || (base->flag & SELECT)) {
+ ten = outliner_add_element(soops, &soops->tree, base->object, NULL, 0, 0);
+ ten->directdata = base;
}
}
}
outliner_make_hierarchy(soops, &soops->tree);
}
- else if (soops->outlinevis==SO_SEQUENCE) {
+ else if (soops->outlinevis == SO_SEQUENCE) {
Sequence *seq;
- Editing *ed= seq_give_editing(scene, FALSE);
+ Editing *ed = seq_give_editing(scene, FALSE);
int op;
- if (ed==NULL)
+ if (ed == NULL)
return;
- seq= ed->seqbasep->first;
+ seq = ed->seqbasep->first;
if (!seq)
return;
while (seq) {
- op= need_add_seq_dup(seq);
- if (op==1) {
- /* ten= */ outliner_add_element(soops, &soops->tree, (void*)seq, NULL, TSE_SEQUENCE, 0);
+ op = need_add_seq_dup(seq);
+ if (op == 1) {
+ /* ten= */ outliner_add_element(soops, &soops->tree, (void *)seq, NULL, TSE_SEQUENCE, 0);
}
- else if (op==0) {
- ten= outliner_add_element(soops, &soops->tree, (void*)seq, NULL, TSE_SEQUENCE_DUP, 0);
+ else if (op == 0) {
+ ten = outliner_add_element(soops, &soops->tree, (void *)seq, NULL, TSE_SEQUENCE_DUP, 0);
outliner_add_seq_dup(soops, seq, ten, 0);
}
- seq= seq->next;
+ seq = seq->next;
}
}
- else if (soops->outlinevis==SO_DATABLOCKS) {
+ else if (soops->outlinevis == SO_DATABLOCKS) {
PointerRNA mainptr;
RNA_main_pointer_create(mainvar, &mainptr);
- ten= outliner_add_element(soops, &soops->tree, (void*)&mainptr, NULL, TSE_RNA_STRUCT, -1);
+ ten = outliner_add_element(soops, &soops->tree, (void *)&mainptr, NULL, TSE_RNA_STRUCT, -1);
if (show_opened) {
- tselem= TREESTORE(ten);
+ tselem = TREESTORE(ten);
tselem->flag &= ~TSE_CLOSED;
}
}
- else if (soops->outlinevis==SO_USERDEF) {
+ else if (soops->outlinevis == SO_USERDEF) {
PointerRNA userdefptr;
RNA_pointer_create(NULL, &RNA_UserPreferences, &U, &userdefptr);
- ten= outliner_add_element(soops, &soops->tree, (void*)&userdefptr, NULL, TSE_RNA_STRUCT, -1);
+ ten = outliner_add_element(soops, &soops->tree, (void *)&userdefptr, NULL, TSE_RNA_STRUCT, -1);
if (show_opened) {
- tselem= TREESTORE(ten);
+ tselem = TREESTORE(ten);
tselem->flag &= ~TSE_CLOSED;
}
}
- else if (soops->outlinevis==SO_KEYMAP) {
- wmWindowManager *wm= mainvar->wm.first;
+ else if (soops->outlinevis == SO_KEYMAP) {
+ wmWindowManager *wm = mainvar->wm.first;
wmKeyMap *km;
- for (km= wm->defaultconf->keymaps.first; km; km= km->next) {
- /* ten= */ outliner_add_element(soops, &soops->tree, (void*)km, NULL, TSE_KEYMAP, 0);
+ for (km = wm->defaultconf->keymaps.first; km; km = km->next) {
+ /* ten= */ outliner_add_element(soops, &soops->tree, (void *)km, NULL, TSE_KEYMAP, 0);
}
}
else {
- ten= outliner_add_element(soops, &soops->tree, OBACT, NULL, 0, 0);
- if (ten) ten->directdata= BASACT;
+ ten = outliner_add_element(soops, &soops->tree, OBACT, NULL, 0, 0);
+ if (ten) ten->directdata = BASACT;
}
outliner_sort(soops, &soops->tree);
diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c
index ed050b7f93d..3110ff3e29e 100644
--- a/source/blender/editors/space_outliner/space_outliner.c
+++ b/source/blender/editors/space_outliner/space_outliner.c
@@ -77,20 +77,20 @@ static void outliner_main_area_init(wmWindowManager *wm, ARegion *ar)
static int outliner_parent_drop_poll(bContext *C, wmDrag *drag, wmEvent *event)
{
- ARegion *ar= CTX_wm_region(C);
- SpaceOops *soops= CTX_wm_space_outliner(C);
- TreeElement *te= NULL;
+ ARegion *ar = CTX_wm_region(C);
+ SpaceOops *soops = CTX_wm_space_outliner(C);
+ TreeElement *te = NULL;
float fmval[2];
UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &fmval[0], &fmval[1]);
if (drag->type == WM_DRAG_ID) {
ID *id = (ID *)drag->poin;
- if ( GS(id->name) == ID_OB ) {
+ if (GS(id->name) == ID_OB) {
/* Ensure item under cursor is valid drop target */
/* Find object hovered over */
- for (te= soops->tree.first; te; te= te->next) {
+ for (te = soops->tree.first; te; te = te->next) {
TreeElement *te_valid;
- te_valid= outliner_dropzone_parent(C, event, te, fmval);
+ te_valid = outliner_dropzone_parent(C, event, te, fmval);
if (te_valid) return 1;
}
}
@@ -102,30 +102,30 @@ static void outliner_parent_drop_copy(wmDrag *drag, wmDropBox *drop)
{
ID *id = (ID *)drag->poin;
- RNA_string_set(drop->ptr, "child", id->name+2);
+ RNA_string_set(drop->ptr, "child", id->name + 2);
}
static int outliner_parent_clear_poll(bContext *C, wmDrag *drag, wmEvent *event)
{
- ARegion *ar= CTX_wm_region(C);
- SpaceOops *soops= CTX_wm_space_outliner(C);
- TreeElement *te= NULL;
+ ARegion *ar = CTX_wm_region(C);
+ SpaceOops *soops = CTX_wm_space_outliner(C);
+ TreeElement *te = NULL;
float fmval[2];
UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &fmval[0], &fmval[1]);
if (drag->type == WM_DRAG_ID) {
ID *id = (ID *)drag->poin;
- if ( GS(id->name) == ID_OB ) {
+ if (GS(id->name) == ID_OB) {
//TODO: Check if no parent?
/* Ensure location under cursor is valid dropzone */
- for (te= soops->tree.first; te; te= te->next) {
+ for (te = soops->tree.first; te; te = te->next) {
if (outliner_dropzone_parent_clear(C, event, te, fmval)) return 1;
}
/* Check if mouse cursor is below the tree */
- te= soops->tree.last;
- while (((te->flag & TE_LAZY_CLOSED)==0) && (te->subtree.last)) {
- te= te->subtree.last;
+ te = soops->tree.last;
+ while (((te->flag & TE_LAZY_CLOSED) == 0) && (te->subtree.last)) {
+ te = te->subtree.last;
}
if (fmval[1] < te->ys) return 1;
}
@@ -136,7 +136,7 @@ static int outliner_parent_clear_poll(bContext *C, wmDrag *drag, wmEvent *event)
static void outliner_parent_clear_copy(wmDrag *drag, wmDropBox *drop)
{
ID *id = (ID *)drag->poin;
- RNA_string_set(drop->ptr, "dragged_obj", id->name+2);
+ RNA_string_set(drop->ptr, "dragged_obj", id->name + 2);
/* Set to simple parent clear type. Avoid menus for drag and drop if possible.
* If desired, user can toggle the different "Clear Parent" types in the operator
@@ -155,7 +155,7 @@ static void outliner_dropboxes(void)
static void outliner_main_area_draw(const bContext *C, ARegion *ar)
{
- View2D *v2d= &ar->v2d;
+ View2D *v2d = &ar->v2d;
View2DScrollers *scrollers;
/* clear */
@@ -168,7 +168,7 @@ static void outliner_main_area_draw(const bContext *C, ARegion *ar)
UI_view2d_view_restore(C);
/* scrollers */
- scrollers= UI_view2d_scrollers_calc(C, v2d, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY);
+ scrollers = UI_view2d_scrollers_calc(C, v2d, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY);
UI_view2d_scrollers_draw(C, v2d, scrollers);
UI_view2d_scrollers_free(scrollers);
}
@@ -182,9 +182,9 @@ static void outliner_main_area_free(ARegion *UNUSED(ar))
static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
- switch(wmn->category) {
+ switch (wmn->category) {
case NC_SCENE:
- switch(wmn->data) {
+ switch (wmn->data) {
case ND_OB_ACTIVE:
case ND_OB_SELECT:
case ND_OB_VISIBLE:
@@ -200,7 +200,7 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn)
}
break;
case NC_OBJECT:
- switch(wmn->data) {
+ switch (wmn->data) {
case ND_TRANSFORM:
/* transform doesn't change outliner data */
break;
@@ -212,7 +212,7 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn)
ED_region_tag_redraw(ar);
break;
case ND_CONSTRAINT:
- switch(wmn->action) {
+ switch (wmn->action) {
case NA_ADDED:
case NA_REMOVED:
case NA_RENAME:
@@ -234,17 +234,17 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn)
/* For updating lamp icons, when changing lamp type */
if (wmn->data == ND_LIGHTING_DRAW)
ED_region_tag_redraw(ar);
- break;
+ break;
case NC_SPACE:
if (wmn->data == ND_SPACE_OUTLINER)
ED_region_tag_redraw(ar);
- break;
+ break;
case NC_ID:
if (wmn->action == NA_RENAME)
ED_region_tag_redraw(ar);
break;
case NC_MATERIAL:
- switch(wmn->data) {
+ switch (wmn->data) {
case ND_SHADING:
case ND_SHADING_DRAW:
ED_region_tag_redraw(ar);
@@ -255,7 +255,7 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn)
ED_region_tag_redraw(ar);
break;
case NC_GEOM:
- switch(wmn->data) {
+ switch (wmn->data) {
case ND_DATA:
/* needed for vertex groups only, no special notifier atm so use NC_GEOM|ND_DATA */
ED_region_tag_redraw(ar);
@@ -263,13 +263,13 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn)
}
break;
case NC_ANIMATION:
- switch(wmn->data) {
+ switch (wmn->data) {
case ND_NLA_ACTCHANGE:
case ND_KEYFRAME:
ED_region_tag_redraw(ar);
break;
case ND_ANIMCHAN:
- if (wmn->action==NA_SELECTED)
+ if (wmn->action == NA_SELECTED)
ED_region_tag_redraw(ar);
break;
}
@@ -299,7 +299,7 @@ static void outliner_header_area_free(ARegion *UNUSED(ar))
static void outliner_header_area_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
- switch(wmn->category) {
+ switch (wmn->category) {
case NC_SCENE:
if (wmn->data == ND_KEYINGSET)
ED_region_tag_redraw(ar);
@@ -318,35 +318,35 @@ static SpaceLink *outliner_new(const bContext *UNUSED(C))
ARegion *ar;
SpaceOops *soutliner;
- soutliner= MEM_callocN(sizeof(SpaceOops), "initoutliner");
- soutliner->spacetype= SPACE_OUTLINER;
+ soutliner = MEM_callocN(sizeof(SpaceOops), "initoutliner");
+ soutliner->spacetype = SPACE_OUTLINER;
/* header */
- ar= MEM_callocN(sizeof(ARegion), "header for outliner");
+ ar = MEM_callocN(sizeof(ARegion), "header for outliner");
BLI_addtail(&soutliner->regionbase, ar);
- ar->regiontype= RGN_TYPE_HEADER;
- ar->alignment= RGN_ALIGN_BOTTOM;
+ ar->regiontype = RGN_TYPE_HEADER;
+ ar->alignment = RGN_ALIGN_BOTTOM;
/* main area */
- ar= MEM_callocN(sizeof(ARegion), "main area for outliner");
+ ar = MEM_callocN(sizeof(ARegion), "main area for outliner");
BLI_addtail(&soutliner->regionbase, ar);
- ar->regiontype= RGN_TYPE_WINDOW;
+ ar->regiontype = RGN_TYPE_WINDOW;
- ar->v2d.scroll = (V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM_O);
- ar->v2d.align = (V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_POS_Y);
- ar->v2d.keepzoom = (V2D_LOCKZOOM_X|V2D_LOCKZOOM_Y|V2D_LIMITZOOM|V2D_KEEPASPECT);
- ar->v2d.keeptot= V2D_KEEPTOT_STRICT;
- ar->v2d.minzoom= ar->v2d.maxzoom= 1.0f;
+ ar->v2d.scroll = (V2D_SCROLL_RIGHT | V2D_SCROLL_BOTTOM_O);
+ ar->v2d.align = (V2D_ALIGN_NO_NEG_X | V2D_ALIGN_NO_POS_Y);
+ ar->v2d.keepzoom = (V2D_LOCKZOOM_X | V2D_LOCKZOOM_Y | V2D_LIMITZOOM | V2D_KEEPASPECT);
+ ar->v2d.keeptot = V2D_KEEPTOT_STRICT;
+ ar->v2d.minzoom = ar->v2d.maxzoom = 1.0f;
- return (SpaceLink*)soutliner;
+ return (SpaceLink *)soutliner;
}
/* not spacelink itself */
static void outliner_free(SpaceLink *sl)
{
- SpaceOops *soutliner= (SpaceOops*)sl;
+ SpaceOops *soutliner = (SpaceOops *)sl;
outliner_free_tree(&soutliner->tree);
if (soutliner->treestore) {
@@ -364,11 +364,11 @@ static void outliner_init(wmWindowManager *UNUSED(wm), ScrArea *UNUSED(sa))
static SpaceLink *outliner_duplicate(SpaceLink *sl)
{
- SpaceOops *soutliner= (SpaceOops *)sl;
- SpaceOops *soutlinern= MEM_dupallocN(soutliner);
+ SpaceOops *soutliner = (SpaceOops *)sl;
+ SpaceOops *soutlinern = MEM_dupallocN(soutliner);
- soutlinern->tree.first= soutlinern->tree.last= NULL;
- soutlinern->treestore= NULL;
+ soutlinern->tree.first = soutlinern->tree.last = NULL;
+ soutlinern->treestore = NULL;
return (SpaceLink *)soutlinern;
}
@@ -376,41 +376,41 @@ static SpaceLink *outliner_duplicate(SpaceLink *sl)
/* only called once, from space_api/spacetypes.c */
void ED_spacetype_outliner(void)
{
- SpaceType *st= MEM_callocN(sizeof(SpaceType), "spacetype time");
+ SpaceType *st = MEM_callocN(sizeof(SpaceType), "spacetype time");
ARegionType *art;
- st->spaceid= SPACE_OUTLINER;
+ st->spaceid = SPACE_OUTLINER;
strncpy(st->name, "Outliner", BKE_ST_MAXNAME);
- st->new= outliner_new;
- st->free= outliner_free;
- st->init= outliner_init;
- st->duplicate= outliner_duplicate;
- st->operatortypes= outliner_operatortypes;
- st->keymap= outliner_keymap;
- st->dropboxes= outliner_dropboxes;
+ st->new = outliner_new;
+ st->free = outliner_free;
+ st->init = outliner_init;
+ st->duplicate = outliner_duplicate;
+ st->operatortypes = outliner_operatortypes;
+ st->keymap = outliner_keymap;
+ st->dropboxes = outliner_dropboxes;
/* regions: main window */
- art= MEM_callocN(sizeof(ARegionType), "spacetype time region");
+ art = MEM_callocN(sizeof(ARegionType), "spacetype time region");
art->regionid = RGN_TYPE_WINDOW;
- art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D;
+ art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D;
- art->init= outliner_main_area_init;
- art->draw= outliner_main_area_draw;
- art->free= outliner_main_area_free;
- art->listener= outliner_main_area_listener;
+ art->init = outliner_main_area_init;
+ art->draw = outliner_main_area_draw;
+ art->free = outliner_main_area_free;
+ art->listener = outliner_main_area_listener;
BLI_addhead(&st->regiontypes, art);
/* regions: header */
- art= MEM_callocN(sizeof(ARegionType), "spacetype time region");
+ art = MEM_callocN(sizeof(ARegionType), "spacetype time region");
art->regionid = RGN_TYPE_HEADER;
- art->prefsizey= HEADERY;
- art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D|ED_KEYMAP_FRAMES|ED_KEYMAP_HEADER;
+ art->prefsizey = HEADERY;
+ art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_HEADER;
- art->init= outliner_header_area_init;
- art->draw= outliner_header_area_draw;
- art->free= outliner_header_area_free;
- art->listener= outliner_header_area_listener;
+ art->init = outliner_header_area_init;
+ art->draw = outliner_header_area_draw;
+ art->free = outliner_header_area_free;
+ art->listener = outliner_header_area_listener;
BLI_addhead(&st->regiontypes, art);
BKE_spacetype_register(st);
diff --git a/source/blender/editors/space_script/script_edit.c b/source/blender/editors/space_script/script_edit.c
index 4ff0c7ba5b3..4e6783e1862 100644
--- a/source/blender/editors/space_script/script_edit.c
+++ b/source/blender/editors/space_script/script_edit.c
@@ -46,7 +46,7 @@
#include "ED_screen.h"
-#include "script_intern.h" // own include
+#include "script_intern.h" // own include
#ifdef WITH_PYTHON
#include "BPY_extern.h" /* BPY_script_exec */
@@ -58,7 +58,7 @@ static int run_pyfile_exec(bContext *C, wmOperator *op)
RNA_string_get(op->ptr, "filepath", path);
#ifdef WITH_PYTHON
if (BPY_filepath_exec(C, path, op->reports)) {
- ARegion *ar= CTX_wm_region(C);
+ ARegion *ar = CTX_wm_region(C);
ED_region_tag_redraw(ar);
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/space_script/script_ops.c b/source/blender/editors/space_script/script_ops.c
index 0c99d9b34c4..57a1112a832 100644
--- a/source/blender/editors/space_script/script_ops.c
+++ b/source/blender/editors/space_script/script_ops.c
@@ -63,6 +63,6 @@ void script_keymap(wmKeyConfig *keyconf)
wmKeyMap *keymap = WM_keymap_find(keyconf, "Script", SPACE_SCRIPT, 0);
/* TODO - this is just while we have no way to load a text datablock */
- RNA_string_set(WM_keymap_add_item(keymap, "SCRIPT_OT_python_file_run", PKEY, KM_PRESS, KM_CTRL|KM_SHIFT|KM_ALT, 0)->ptr, "filepath", "test.py");
+ RNA_string_set(WM_keymap_add_item(keymap, "SCRIPT_OT_python_file_run", PKEY, KM_PRESS, KM_CTRL | KM_SHIFT | KM_ALT, 0)->ptr, "filepath", "test.py");
}
diff --git a/source/blender/editors/space_script/space_script.c b/source/blender/editors/space_script/space_script.c
index bad9a01fbcf..1fbd6f08b34 100644
--- a/source/blender/editors/space_script/space_script.c
+++ b/source/blender/editors/space_script/space_script.c
@@ -57,7 +57,7 @@
#include "BPY_extern.h"
#endif
-#include "script_intern.h" // own include
+#include "script_intern.h" // own include
//static script_run_python(char *funcname, )
@@ -70,22 +70,22 @@ static SpaceLink *script_new(const bContext *UNUSED(C))
ARegion *ar;
SpaceScript *sscript;
- sscript= MEM_callocN(sizeof(SpaceScript), "initscript");
- sscript->spacetype= SPACE_SCRIPT;
+ sscript = MEM_callocN(sizeof(SpaceScript), "initscript");
+ sscript->spacetype = SPACE_SCRIPT;
/* header */
- ar= MEM_callocN(sizeof(ARegion), "header for script");
+ ar = MEM_callocN(sizeof(ARegion), "header for script");
BLI_addtail(&sscript->regionbase, ar);
- ar->regiontype= RGN_TYPE_HEADER;
- ar->alignment= RGN_ALIGN_BOTTOM;
+ ar->regiontype = RGN_TYPE_HEADER;
+ ar->alignment = RGN_ALIGN_BOTTOM;
/* main area */
- ar= MEM_callocN(sizeof(ARegion), "main area for script");
+ ar = MEM_callocN(sizeof(ARegion), "main area for script");
BLI_addtail(&sscript->regionbase, ar);
- ar->regiontype= RGN_TYPE_WINDOW;
+ ar->regiontype = RGN_TYPE_WINDOW;
/* channel list region XXX */
@@ -96,7 +96,7 @@ static SpaceLink *script_new(const bContext *UNUSED(C))
/* not spacelink itself */
static void script_free(SpaceLink *sl)
{
- SpaceScript *sscript= (SpaceScript*) sl;
+ SpaceScript *sscript = (SpaceScript *) sl;
#ifdef WITH_PYTHON
/*free buttons references*/
@@ -118,7 +118,7 @@ static void script_init(struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(sa))
static SpaceLink *script_duplicate(SpaceLink *sl)
{
- SpaceScript *sscriptn= MEM_dupallocN(sl);
+ SpaceScript *sscriptn = MEM_dupallocN(sl);
/* clear or remove stuff from old */
@@ -142,8 +142,8 @@ static void script_main_area_init(wmWindowManager *wm, ARegion *ar)
static void script_main_area_draw(const bContext *C, ARegion *ar)
{
/* draw entirely, view changes should be handled here */
- SpaceScript *sscript= (SpaceScript*)CTX_wm_space_data(C);
- View2D *v2d= &ar->v2d;
+ SpaceScript *sscript = (SpaceScript *)CTX_wm_space_data(C);
+ View2D *v2d = &ar->v2d;
/* clear and setup matrix */
UI_ThemeClearColor(TH_BACK);
@@ -189,37 +189,37 @@ static void script_main_area_listener(ARegion *UNUSED(ar), wmNotifier *UNUSED(wm
/* only called once, from space/spacetypes.c */
void ED_spacetype_script(void)
{
- SpaceType *st= MEM_callocN(sizeof(SpaceType), "spacetype script");
+ SpaceType *st = MEM_callocN(sizeof(SpaceType), "spacetype script");
ARegionType *art;
- st->spaceid= SPACE_SCRIPT;
+ st->spaceid = SPACE_SCRIPT;
strncpy(st->name, "Script", BKE_ST_MAXNAME);
- st->new= script_new;
- st->free= script_free;
- st->init= script_init;
- st->duplicate= script_duplicate;
- st->operatortypes= script_operatortypes;
- st->keymap= script_keymap;
+ st->new = script_new;
+ st->free = script_free;
+ st->init = script_init;
+ st->duplicate = script_duplicate;
+ st->operatortypes = script_operatortypes;
+ st->keymap = script_keymap;
/* regions: main window */
- art= MEM_callocN(sizeof(ARegionType), "spacetype script region");
+ art = MEM_callocN(sizeof(ARegionType), "spacetype script region");
art->regionid = RGN_TYPE_WINDOW;
- art->init= script_main_area_init;
- art->draw= script_main_area_draw;
- art->listener= script_main_area_listener;
- art->keymapflag= ED_KEYMAP_VIEW2D| ED_KEYMAP_UI|ED_KEYMAP_FRAMES; // XXX need to further test this ED_KEYMAP_UI is needed for button interaction
+ art->init = script_main_area_init;
+ art->draw = script_main_area_draw;
+ art->listener = script_main_area_listener;
+ art->keymapflag = ED_KEYMAP_VIEW2D | ED_KEYMAP_UI | ED_KEYMAP_FRAMES; // XXX need to further test this ED_KEYMAP_UI is needed for button interaction
BLI_addhead(&st->regiontypes, art);
/* regions: header */
- art= MEM_callocN(sizeof(ARegionType), "spacetype script region");
+ art = MEM_callocN(sizeof(ARegionType), "spacetype script region");
art->regionid = RGN_TYPE_HEADER;
- art->prefsizey= HEADERY;
- art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D|ED_KEYMAP_HEADER;
+ art->prefsizey = HEADERY;
+ art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_HEADER;
- art->init= script_header_area_init;
- art->draw= script_header_area_draw;
+ art->init = script_header_area_init;
+ art->draw = script_header_area_draw;
BLI_addhead(&st->regiontypes, art);
diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c
index dfa733deac6..6aa8d28bce2 100644
--- a/source/blender/editors/space_sequencer/sequencer_add.c
+++ b/source/blender/editors/space_sequencer/sequencer_add.c
@@ -188,7 +188,8 @@ static void seq_load_operator_info(SeqLoadInfo *seq_load, wmOperator *op)
else if (RNA_struct_find_property(op->ptr, "files")) {
/* used for image strip */
/* best guess, first images name */
- RNA_BEGIN(op->ptr, itemptr, "files") {
+ RNA_BEGIN (op->ptr, itemptr, "files")
+ {
char *name = RNA_string_get_alloc(&itemptr, "name", NULL, 0);
BLI_strncpy(seq_load->name, name, sizeof(seq_load->name));
MEM_freeN(name);
@@ -411,7 +412,10 @@ static int sequencer_add_generic_strip_exec(bContext *C, wmOperator *op, SeqLoad
if (seq_load.flag & SEQ_LOAD_REPLACE_SEL)
deselect_all_seq(scene);
- tot_files = RNA_property_collection_length(op->ptr, RNA_struct_find_property(op->ptr, "files"));
+ if (RNA_struct_property_is_set(op->ptr, "files"))
+ tot_files = RNA_property_collection_length(op->ptr, RNA_struct_find_property(op->ptr, "files"));
+ else
+ tot_files = 0;
if (tot_files) {
/* multiple files */
@@ -420,7 +424,7 @@ static int sequencer_add_generic_strip_exec(bContext *C, wmOperator *op, SeqLoad
BLI_split_dir_part(seq_load.path, dir_only, sizeof(dir_only));
- RNA_BEGIN(op->ptr, itemptr, "files")
+ RNA_BEGIN (op->ptr, itemptr, "files")
{
RNA_string_get(&itemptr, "name", file_only);
BLI_join_dirfile(seq_load.path, sizeof(seq_load.path), dir_only, file_only);
@@ -595,7 +599,8 @@ static int sequencer_add_image_strip_exec(bContext *C, wmOperator *op)
strip = seq->strip;
se = strip->stripdata;
- RNA_BEGIN(op->ptr, itemptr, "files") {
+ RNA_BEGIN (op->ptr, itemptr, "files")
+ {
char *filename = RNA_string_get_alloc(&itemptr, "name", NULL, 0);
BLI_strncpy(se->name, filename, sizeof(se->name));
MEM_freeN(filename);
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index cd0c8779c39..38a5151590e 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -206,14 +206,12 @@ static void drawseqwave(Scene *scene, Sequence *seq, float x1, float y1, float x
length = floor((waveform->length - startsample) / samplestep);
glBegin(GL_LINE_STRIP);
- for (i = 0; i < length; i++)
- {
+ for (i = 0; i < length; i++) {
pos = startsample + i * samplestep;
value = waveform->data[pos * 3];
- for (j = pos + 1; (j < waveform->length) && (j < pos + samplestep); j++)
- {
+ for (j = pos + 1; (j < waveform->length) && (j < pos + samplestep); j++) {
if (value > waveform->data[j * 3])
value = waveform->data[j * 3];
}
@@ -223,14 +221,12 @@ static void drawseqwave(Scene *scene, Sequence *seq, float x1, float y1, float x
glEnd();
glBegin(GL_LINE_STRIP);
- for (i = 0; i < length; i++)
- {
+ for (i = 0; i < length; i++) {
pos = startsample + i * samplestep;
value = waveform->data[pos * 3 + 1];
- for (j = pos + 1; (j < waveform->length) && (j < pos + samplestep); j++)
- {
+ for (j = pos + 1; (j < waveform->length) && (j < pos + samplestep); j++) {
if (value < waveform->data[j * 3 + 1])
value = waveform->data[j * 3 + 1];
}
@@ -930,7 +926,7 @@ void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq
glTexCoord2f(1.0f, 1.0f); glVertex2f(v2d->tot.xmax, v2d->tot.ymax);
glTexCoord2f(1.0f, 0.0f); glVertex2f(v2d->tot.xmax, v2d->tot.ymin);
}
- glEnd( );
+ glEnd();
glBindTexture(GL_TEXTURE_2D, last_texid);
glDisable(GL_TEXTURE_2D);
glDeleteTextures(1, &texid);
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index bd306f2d646..b021c233f8c 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -87,7 +87,6 @@ EnumPropertyItem sequencer_prop_effect_types[] = {
{SEQ_GAMCROSS, "GAMMA_CROSS", 0, "Gamma Cross", "Gamma Cross effect strip type"},
{SEQ_MUL, "MULTIPLY", 0, "Multiply", "Multiply effect strip type"},
{SEQ_OVERDROP, "OVER_DROP", 0, "Alpha Over Drop", "Alpha Over Drop effect strip type"},
- {SEQ_PLUGIN, "PLUGIN", 0, "Plugin", "Plugin effect strip type"},
{SEQ_WIPE, "WIPE", 0, "Wipe", "Wipe effect strip type"},
{SEQ_GLOW, "GLOW", 0, "Glow", "Glow effect strip type"},
{SEQ_TRANSFORM, "TRANSFORM", 0, "Transform", "Transform effect strip type"},
@@ -202,7 +201,8 @@ static void seq_proxy_build_job(const bContext *C)
WM_jobs_callbacks(steve, proxy_startjob, NULL, NULL, proxy_endjob);
}
- SEQP_BEGIN(ed, seq) {
+ SEQP_BEGIN (ed, seq)
+ {
if ((seq->flag & SELECT)) {
context = seq_proxy_rebuild_context(pj->main, pj->scene, seq);
link = BLI_genericNodeN(context);
@@ -462,7 +462,7 @@ void deselect_all_seq(Scene *scene)
if (ed == NULL) return;
- SEQP_BEGIN(ed, seq)
+ SEQP_BEGIN (ed, seq)
{
seq->flag &= ~SEQ_ALLSEL;
}
@@ -846,7 +846,8 @@ static int insert_gap(Scene *scene, int gap, int cfra)
if (ed == NULL) return 0;
- SEQP_BEGIN(ed, seq) {
+ SEQP_BEGIN (ed, seq)
+ {
if (seq->startdisp >= cfra) {
seq->start += gap;
calc_sequence(scene, seq);
@@ -872,7 +873,7 @@ static void UNUSED_FUNCTION(touch_seq_files) (Scene * scene)
WM_cursor_wait(1);
- SEQP_BEGIN(ed, seq)
+ SEQP_BEGIN (ed, seq)
{
if (seq->flag & SELECT) {
if (seq->type == SEQ_MOVIE) {
@@ -900,7 +901,7 @@ static void set_filter_seq(Scene *scene)
if (okee("Set Deinterlace") == 0) return;
- SEQP_BEGIN(ed, seq)
+ SEQP_BEGIN (ed, seq)
{
if (seq->flag & SELECT) {
if (seq->type == SEQ_MOVIE) {
@@ -936,7 +937,7 @@ static void UNUSED_FUNCTION(seq_remap_paths) (Scene * scene)
if (strcmp(to, from) == 0)
return;
- SEQP_BEGIN(ed, seq)
+ SEQP_BEGIN (ed, seq)
{
if (seq->flag & SELECT) {
if (strncmp(seq->strip->dir, from, strlen(from)) == 0) {
@@ -1482,7 +1483,8 @@ static int sequencer_cut_exec(bContext *C, wmOperator *op)
BLI_movelisttolist(ed->seqbasep, &newlist);
if (cut_side != SEQ_SIDE_BOTH) {
- SEQP_BEGIN(ed, seq) {
+ SEQP_BEGIN (ed, seq)
+ {
if (cut_side == SEQ_SIDE_LEFT) {
if (seq->startdisp >= cut_frame) {
seq->flag &= ~SEQ_ALLSEL;
@@ -2655,19 +2657,6 @@ void SEQUENCER_OT_copy(wmOperatorType *ot)
/* properties */
}
-static void seq_paste_add_sound(Scene *scene, Sequence *seq)
-{
- if (seq->type == SEQ_META) {
- Sequence *iseq;
- for (iseq = seq->seqbase.first; iseq; iseq = iseq->next) {
- seq_paste_add_sound(scene, iseq);
- }
- }
- else if (seq->type == SEQ_SOUND) {
- seq->scene_sound = sound_add_scene_sound_defaults(scene, seq);
- }
-}
-
static int sequencer_paste_exec(bContext *C, wmOperator *UNUSED(op))
{
Scene *scene = CTX_data_scene(C);
@@ -2696,9 +2685,6 @@ static int sequencer_paste_exec(bContext *C, wmOperator *UNUSED(op))
/* make sure the pasted strips have unique names between them */
for (; iseq; iseq = iseq->next) {
seq_recursive_apply(iseq, apply_unique_name_cb, scene);
-
- /* restore valid sound_scene for newly added strips */
- seq_paste_add_sound(scene, iseq);
}
WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene);
@@ -3015,7 +3001,8 @@ static int sequencer_change_path_exec(bContext *C, wmOperator *op)
}
seq->strip->stripdata = se = MEM_callocN(len * sizeof(StripElem), "stripelem");
- RNA_BEGIN(op->ptr, itemptr, "files") {
+ RNA_BEGIN (op->ptr, itemptr, "files")
+ {
char *filename = RNA_string_get_alloc(&itemptr, "name", NULL, 0);
BLI_strncpy(se->name, filename, sizeof(se->name));
MEM_freeN(filename);
diff --git a/source/blender/editors/space_sequencer/sequencer_intern.h b/source/blender/editors/space_sequencer/sequencer_intern.h
index c40a809e6af..fd536524c11 100644
--- a/source/blender/editors/space_sequencer/sequencer_intern.h
+++ b/source/blender/editors/space_sequencer/sequencer_intern.h
@@ -51,7 +51,7 @@ struct ARegion *sequencer_has_buttons_region(struct ScrArea *sa);
/* sequencer_draw.c */
void draw_timeline_seq(const struct bContext *C, struct ARegion *ar);
-void draw_image_seq(const struct bContext* C, struct Scene *scene,struct ARegion *ar, struct SpaceSeq *sseq, int cfra, int offset);
+void draw_image_seq(const struct bContext* C, struct Scene *scene, struct ARegion *ar, struct SpaceSeq *sseq, int cfra, int offset);
void seq_reset_imageofs(struct SpaceSeq *sseq);
@@ -145,18 +145,18 @@ void SEQUENCER_OT_effect_strip_add(struct wmOperatorType *ot);
/* RNA enums, just to be more readable */
enum {
- SEQ_SIDE_NONE=0,
+ SEQ_SIDE_NONE = 0,
SEQ_SIDE_LEFT,
SEQ_SIDE_RIGHT,
- SEQ_SIDE_BOTH,
+ SEQ_SIDE_BOTH
};
enum {
SEQ_CUT_SOFT,
- SEQ_CUT_HARD,
+ SEQ_CUT_HARD
};
enum {
SEQ_SELECTED,
- SEQ_UNSELECTED,
+ SEQ_UNSELECTED
};
/* defines used internally */
diff --git a/source/blender/editors/space_sequencer/sequencer_scopes.c b/source/blender/editors/space_sequencer/sequencer_scopes.c
index 6b71591c471..5debeaf79ae 100644
--- a/source/blender/editors/space_sequencer/sequencer_scopes.c
+++ b/source/blender/editors/space_sequencer/sequencer_scopes.c
@@ -87,7 +87,7 @@ static void wform_put_line(int w,
}
static void wform_put_line_single(
- int w, unsigned char *last_pos, unsigned char *new_pos, int col)
+ int w, unsigned char *last_pos, unsigned char *new_pos, int col)
{
if (last_pos > new_pos) {
unsigned char *temp = new_pos;
@@ -275,8 +275,8 @@ static ImBuf *make_sep_waveform_view_from_ibuf_byte(ImBuf *ibuf)
unsigned char *rgb = src + 4 * (ibuf->x * y + x);
for (c = 0; c < 3; c++) {
unsigned char *p = tgt;
- p += 4 * (w * ((rgb[c] * (h - 3)) / 255 + 1)
- + c * sw + x / 3 + 1);
+ p += 4 * (w * ((rgb[c] * (h - 3)) / 255 + 1) +
+ c * sw + x / 3 + 1);
scope_put_pixel_single(wtable, p, c);
p += 4 * w;
@@ -327,8 +327,8 @@ static ImBuf *make_sep_waveform_view_from_ibuf_float(ImBuf *ibuf)
CLAMP(v, 0.0f, 1.0f);
- p += 4 * (w * ((int) (v * (h - 3)) + 1)
- + c * sw + x / 3 + 1);
+ p += 4 * (w * ((int) (v * (h - 3)) + 1) +
+ c * sw + x / 3 + 1);
scope_put_pixel_single(wtable, p, c);
p += 4 * w;
@@ -581,8 +581,8 @@ static void vectorscope_put_cross(unsigned char r, unsigned char g,
rgb[2] = (float)b / 255.0f;
rgb_to_yuv_normalized(rgb, yuv);
- p = tgt + 4 * (w * (int) ((yuv[2] * (h - 3) + 1))
- + (int) ((yuv[1] * (w - 3) + 1)));
+ p = tgt + 4 * (w * (int) ((yuv[2] * (h - 3) + 1)) +
+ (int) ((yuv[1] * (w - 3) + 1)));
if (r == 0 && g == 0 && b == 0) {
r = 255;
@@ -632,8 +632,8 @@ static ImBuf *make_vectorscope_view_from_ibuf_byte(ImBuf *ibuf)
rgb[2] = (float)src1[2] / 255.0f;
rgb_to_yuv_normalized(rgb, yuv);
- p = tgt + 4 * (w * (int) ((yuv[2] * (h - 3) + 1))
- + (int) ((yuv[1] * (w - 3) + 1)));
+ p = tgt + 4 * (w * (int) ((yuv[2] * (h - 3) + 1)) +
+ (int) ((yuv[1] * (w - 3) + 1)));
scope_put_pixel(wtable, (unsigned char *)p);
}
}
@@ -682,8 +682,8 @@ static ImBuf *make_vectorscope_view_from_ibuf_float(ImBuf *ibuf)
rgb_to_yuv_normalized(rgb, yuv);
- p = tgt + 4 * (w * (int) ((yuv[2] * (h - 3) + 1))
- + (int) ((yuv[1] * (w - 3) + 1)));
+ p = tgt + 4 * (w * (int) ((yuv[2] * (h - 3) + 1)) +
+ (int) ((yuv[1] * (w - 3) + 1)));
scope_put_pixel(wtable, (unsigned char *)p);
}
}
diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c
index 2447ca6cfbe..be48b161737 100644
--- a/source/blender/editors/space_sequencer/sequencer_select.c
+++ b/source/blender/editors/space_sequencer/sequencer_select.c
@@ -362,7 +362,7 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
deselect_all_seq(scene);
UI_view2d_region_to_view(v2d, event->mval[0], event->mval[1], &x, NULL);
- SEQP_BEGIN(ed, seq)
+ SEQP_BEGIN (ed, seq)
{
if (x < CFRA) {
if (seq->enddisp < CFRA) {
@@ -940,7 +940,8 @@ static short select_grouped_type(Editing *ed, Sequence *actseq)
Sequence *seq;
short changed = FALSE;
- SEQP_BEGIN(ed, seq) {
+ SEQP_BEGIN (ed, seq)
+ {
if (seq->type == actseq->type) {
seq->flag |= SELECT;
changed = TRUE;
@@ -957,7 +958,8 @@ static short select_grouped_type_basic(Editing *ed, Sequence *actseq)
short changed = FALSE;
short is_sound = SEQ_IS_SOUND(actseq);
- SEQP_BEGIN(ed, seq) {
+ SEQP_BEGIN (ed, seq)
+ {
if (is_sound ? SEQ_IS_SOUND(seq) : !SEQ_IS_SOUND(seq)) {
seq->flag |= SELECT;
changed = TRUE;
@@ -974,7 +976,8 @@ static short select_grouped_type_effect(Editing *ed, Sequence *actseq)
short changed = FALSE;
short is_effect = SEQ_IS_EFFECT(actseq);
- SEQP_BEGIN(ed, seq) {
+ SEQP_BEGIN (ed, seq)
+ {
if (is_effect ? SEQ_IS_EFFECT(seq) : !SEQ_IS_EFFECT(seq)) {
seq->flag |= SELECT;
changed = TRUE;
@@ -995,7 +998,8 @@ static short select_grouped_data(Editing *ed, Sequence *actseq)
return changed;
if (SEQ_HAS_PATH(actseq) && dir) {
- SEQP_BEGIN(ed, seq) {
+ SEQP_BEGIN (ed, seq)
+ {
if (SEQ_HAS_PATH(seq) && seq->strip && strcmp(seq->strip->dir, dir) == 0) {
seq->flag |= SELECT;
changed = TRUE;
@@ -1005,7 +1009,8 @@ static short select_grouped_data(Editing *ed, Sequence *actseq)
}
else if (actseq->type == SEQ_SCENE) {
Scene *sce = actseq->scene;
- SEQP_BEGIN(ed, seq) {
+ SEQP_BEGIN (ed, seq)
+ {
if (seq->type == SEQ_SCENE && seq->scene == sce) {
seq->flag |= SELECT;
changed = TRUE;
@@ -1015,7 +1020,8 @@ static short select_grouped_data(Editing *ed, Sequence *actseq)
}
else if (actseq->type == SEQ_MOVIECLIP) {
MovieClip *clip = actseq->clip;
- SEQP_BEGIN(ed, seq) {
+ SEQP_BEGIN (ed, seq)
+ {
if (seq->type == SEQ_MOVIECLIP && seq->clip == clip) {
seq->flag |= SELECT;
changed = TRUE;
@@ -1037,14 +1043,16 @@ static short select_grouped_effect(Editing *ed, Sequence *actseq)
for (i = 0; i <= SEQ_EFFECT_MAX; i++)
effects[i] = FALSE;
- SEQP_BEGIN(ed, seq) {
+ SEQP_BEGIN (ed, seq)
+ {
if (ELEM3(actseq, seq->seq1, seq->seq2, seq->seq3)) {
effects[seq->type] = TRUE;
}
}
SEQ_END;
- SEQP_BEGIN(ed, seq) {
+ SEQP_BEGIN (ed, seq)
+ {
if (effects[seq->type]) {
if (seq->seq1) seq->seq1->flag |= SELECT;
if (seq->seq2) seq->seq2->flag |= SELECT;
@@ -1062,7 +1070,8 @@ static short select_grouped_time_overlap(Editing *ed, Sequence *actseq)
Sequence *seq;
short changed = FALSE;
- SEQP_BEGIN(ed, seq) {
+ SEQP_BEGIN (ed, seq)
+ {
if (!((seq->startdisp >= actseq->enddisp) || (seq->enddisp < actseq->startdisp))) {
seq->flag |= SELECT;
changed = TRUE;
@@ -1083,8 +1092,9 @@ static short select_grouped_effect_link(Editing *ed, Sequence *actseq)
int machine = actseq->machine;
SeqIterator iter;
- SEQP_BEGIN(ed, seq) {
- seq->tmp= NULL;
+ SEQP_BEGIN (ed, seq)
+ {
+ seq->tmp = NULL;
}
SEQ_END;
@@ -1153,7 +1163,8 @@ static int sequencer_select_grouped_exec(bContext *C, wmOperator *op)
}
if (extend == 0) {
- SEQP_BEGIN(ed, seq) {
+ SEQP_BEGIN (ed, seq)
+ {
seq->flag &= ~SELECT;
changed = TRUE;
}
diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c
index ec340dd323e..4168cb9ac77 100644
--- a/source/blender/editors/space_sequencer/space_sequencer.c
+++ b/source/blender/editors/space_sequencer/space_sequencer.c
@@ -186,7 +186,7 @@ static void sequencer_free(SpaceLink *UNUSED(sl))
{
// SpaceSeq *sseq= (SpaceSequencer*) sl;
-// XXX if (sseq->gpd) free_gpencil_data(sseq->gpd);
+// XXX if (sseq->gpd) BKE_gpencil_free(sseq->gpd);
}
@@ -466,6 +466,7 @@ static void sequencer_preview_area_listener(ARegion *ar, wmNotifier *wmn)
case ND_FRAME:
case ND_MARKERS:
case ND_SEQUENCER:
+ case ND_RENDER_OPTIONS:
ED_region_tag_redraw(ar);
break;
}
diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c
index beccca51265..85eda858d24 100644
--- a/source/blender/editors/space_text/space_text.c
+++ b/source/blender/editors/space_text/space_text.c
@@ -44,6 +44,7 @@
#include "BKE_context.h"
#include "BKE_screen.h"
+#include "BKE_text.h"
#include "ED_space_api.h"
#include "ED_screen.h"
@@ -187,6 +188,7 @@ static void text_operatortypes(void)
WM_operatortype_append(TEXT_OT_paste);
WM_operatortype_append(TEXT_OT_copy);
WM_operatortype_append(TEXT_OT_cut);
+ WM_operatortype_append(TEXT_OT_duplicate_line);
WM_operatortype_append(TEXT_OT_convert_whitespace);
WM_operatortype_append(TEXT_OT_uncomment);
@@ -201,6 +203,8 @@ static void text_operatortypes(void)
WM_operatortype_append(TEXT_OT_select_line);
WM_operatortype_append(TEXT_OT_select_all);
WM_operatortype_append(TEXT_OT_select_word);
+
+ WM_operatortype_append(TEXT_OT_move_lines);
WM_operatortype_append(TEXT_OT_jump);
WM_operatortype_append(TEXT_OT_move);
@@ -297,6 +301,8 @@ static void text_keymap(struct wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "TEXT_OT_cut", DELKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "TEXT_OT_copy", INSERTKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "TEXT_OT_paste", INSERTKEY, KM_PRESS, KM_SHIFT, 0);
+
+ WM_keymap_add_item(keymap, "TEXT_OT_duplicate_line", DKEY, KM_PRESS, KM_CTRL, 0);
if (U.uiflag & USER_MMB_PASTE) { // XXX not dynamic
kmi = WM_keymap_add_item(keymap, "TEXT_OT_paste", MIDDLEMOUSE, KM_PRESS, 0, 0);
@@ -317,8 +323,10 @@ static void text_keymap(struct wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "TEXT_OT_select_all", AKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "TEXT_OT_select_line", AKEY, KM_PRESS, KM_SHIFT | KM_CTRL, 0);
WM_keymap_add_item(keymap, "TEXT_OT_select_word", LEFTMOUSE, KM_DBL_CLICK, 0, 0);
-
+ RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_lines", UPARROWKEY, KM_PRESS, KM_SHIFT | KM_CTRL, 0)->ptr, "direction", TXT_MOVE_LINE_UP);
+ RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_lines", DOWNARROWKEY, KM_PRESS, KM_SHIFT | KM_CTRL, 0)->ptr, "direction", TXT_MOVE_LINE_DOWN);
+
WM_keymap_add_item(keymap, "TEXT_OT_indent", TABKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "TEXT_OT_unindent", TABKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "TEXT_OT_uncomment", DKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
@@ -353,7 +361,6 @@ static void text_keymap(struct wmKeyConfig *keyconf)
RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", ENDKEY, KM_PRESS, KM_SHIFT | KM_CTRL, 0)->ptr, "type", FILE_BOTTOM);
RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_delete", DELKEY, KM_PRESS, 0, 0)->ptr, "type", DEL_NEXT_CHAR);
- RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_delete", DKEY, KM_PRESS, KM_CTRL, 0)->ptr, "type", DEL_NEXT_CHAR);
RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_delete", BACKSPACEKEY, KM_PRESS, 0, 0)->ptr, "type", DEL_PREV_CHAR);
RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_delete", BACKSPACEKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", DEL_PREV_CHAR); /* same as above [#26623] */
RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_delete", DELKEY, KM_PRESS, KM_CTRL, 0)->ptr, "type", DEL_NEXT_WORD);
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c
index 84f960ecf2a..ffb686b6810 100644
--- a/source/blender/editors/space_text/text_draw.c
+++ b/source/blender/editors/space_text/text_draw.c
@@ -130,8 +130,7 @@ static void flatten_string_append(FlattenString *fs, const char *c, int accum, i
fs->accum = naccum;
}
- for (i = 0; i < len; i++)
- {
+ for (i = 0; i < len; i++) {
fs->buf[fs->pos + i] = c[i];
fs->accum[fs->pos + i] = accum;
}
diff --git a/source/blender/editors/space_text/text_intern.h b/source/blender/editors/space_text/text_intern.h
index 2d297dd20d7..4f973e7076b 100644
--- a/source/blender/editors/space_text/text_intern.h
+++ b/source/blender/editors/space_text/text_intern.h
@@ -118,6 +118,7 @@ void TEXT_OT_refresh_pyconstraints(struct wmOperatorType *ot);
void TEXT_OT_paste(struct wmOperatorType *ot);
void TEXT_OT_copy(struct wmOperatorType *ot);
void TEXT_OT_cut(struct wmOperatorType *ot);
+void TEXT_OT_duplicate_line(struct wmOperatorType *ot);
void TEXT_OT_convert_whitespace(struct wmOperatorType *ot);
void TEXT_OT_uncomment(struct wmOperatorType *ot);
@@ -136,6 +137,8 @@ void TEXT_OT_select_line(struct wmOperatorType *ot);
void TEXT_OT_select_all(struct wmOperatorType *ot);
void TEXT_OT_select_word(struct wmOperatorType *ot);
+void TEXT_OT_move_lines(struct wmOperatorType *ot);
+
void TEXT_OT_jump(struct wmOperatorType *ot);
void TEXT_OT_move(struct wmOperatorType *ot);
void TEXT_OT_move_select(struct wmOperatorType *ot);
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index 730dfb7d979..04408173928 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -167,7 +167,7 @@ static int text_new_exec(bContext *C, wmOperator *UNUSED(op))
PointerRNA ptr, idptr;
PropertyRNA *prop;
- text = add_empty_text("Text");
+ text = BKE_text_add("Text");
/* hook into UI */
uiIDContextProperty(C, &ptr, &prop);
@@ -236,7 +236,7 @@ static int text_open_exec(bContext *C, wmOperator *op)
RNA_string_get(op->ptr, "filepath", str);
- text = add_text(str, G.main->name);
+ text = BKE_text_load(str, G.main->name);
if (!text) {
if (op->customdata) MEM_freeN(op->customdata);
@@ -320,7 +320,7 @@ static int text_reload_exec(bContext *C, wmOperator *op)
{
Text *text = CTX_data_edit_text(C);
- if (!reopen_text(text)) {
+ if (!BKE_text_reload(text)) {
BKE_report(op->reports, RPT_ERROR, "Could not reopen file");
return OPERATOR_CANCELLED;
}
@@ -379,8 +379,8 @@ static int text_unlink_exec(bContext *C, wmOperator *UNUSED(op))
}
}
- unlink_text(bmain, text);
- free_libblock(&bmain->text, text);
+ BKE_text_unlink(bmain, text);
+ BKE_libblock_free(&bmain->text, text);
text_drawcache_tag_update(st, 1);
WM_event_add_notifier(C, NC_TEXT | NA_REMOVED, NULL);
@@ -826,6 +826,36 @@ void TEXT_OT_paste(wmOperatorType *ot)
RNA_def_boolean(ot->srna, "selection", 0, "Selection", "Paste text selected elsewhere rather than copied (X11 only)");
}
+/**************** duplicate operator *******************/
+
+static int text_duplicate_line_exec(bContext *C, wmOperator *UNUSED(op))
+{
+ Text *text= CTX_data_edit_text(C);
+
+ txt_duplicate_line(text);
+
+ WM_event_add_notifier(C, NC_TEXT | NA_EDITED, text);
+
+ /* run the script while editing, evil but useful */
+ if (CTX_wm_space_text(C)->live_edit) {
+ text_run_script(C, NULL);
+ }
+
+ return OPERATOR_FINISHED;
+}
+
+void TEXT_OT_duplicate_line(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Duplicate Line";
+ ot->idname = "TEXT_OT_duplicate_line";
+ ot->description = "Duplicate the current line";
+
+ /* api callbacks */
+ ot->exec = text_duplicate_line_exec;
+ ot->poll = text_edit_poll;
+}
+
/******************* copy operator *********************/
static void txt_copy_clipboard(Text *text)
@@ -1126,7 +1156,7 @@ static int text_convert_whitespace_exec(bContext *C, wmOperator *op)
}
else {
new_line[j] = text_check_line[a];
- ++j;
+ j++;
}
}
new_line[j] = '\0';
@@ -1178,12 +1208,12 @@ static int text_convert_whitespace_exec(bContext *C, wmOperator *op)
if (!number) { //found all number of space to equal a tab
new_line[extra] = '\t';
a = a + (st->tabnumber - 1);
- ++extra;
+ extra++;
}
else { //not adding a tab
new_line[extra] = text_check_line[a];
- ++extra;
+ extra++;
}
}
new_line[extra] = '\0';
@@ -1301,6 +1331,46 @@ void TEXT_OT_select_word(wmOperatorType *ot)
ot->poll = text_edit_poll;
}
+/********************* move lines operators ***********************/
+
+static int move_lines_exec(bContext *C, wmOperator *op)
+{
+ Text *text = CTX_data_edit_text(C);
+ const int direction = RNA_enum_get(op->ptr, "direction");
+
+ txt_move_lines(text, direction);
+
+ text_update_cursor_moved(C);
+ WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text);
+
+ /* run the script while editing, evil but useful */
+ if (CTX_wm_space_text(C)->live_edit)
+ text_run_script(C, NULL);
+
+ return OPERATOR_FINISHED;
+}
+
+void TEXT_OT_move_lines(wmOperatorType *ot)
+{
+ static EnumPropertyItem direction_items[]= {
+ {TXT_MOVE_LINE_UP, "UP", 0, "Up", ""},
+ {TXT_MOVE_LINE_DOWN, "DOWN", 0, "Down", ""},
+ {0, NULL, 0, NULL, NULL}
+ };
+
+ /* identifiers */
+ ot->name = "Move Lines";
+ ot->idname = "TEXT_OT_move_lines";
+ ot->description = "Move the currently selected line(s) up/down";
+
+ /* api callbacks */
+ ot->exec = move_lines_exec;
+ ot->poll = text_edit_poll;
+
+ /* properties */
+ RNA_def_enum(ot->srna, "direction", direction_items, 1, "Direction", "");
+}
+
/******************* previous marker operator *********************/
static int text_previous_marker_exec(bContext *C, wmOperator *UNUSED(op))
diff --git a/source/blender/editors/space_text/text_python.c b/source/blender/editors/space_text/text_python.c
index c24af998835..f980e19e9c8 100644
--- a/source/blender/editors/space_text/text_python.c
+++ b/source/blender/editors/space_text/text_python.c
@@ -364,19 +364,6 @@ static short UNUSED_FUNCTION(do_texttools) (SpaceText * st, char ascii, unsigned
return swallow;
}
-#if 0
-#ifdef WITH_PYTHON
-/* Run text plugin scripts if enabled */
-if (st->doplugins && event && val) {
- if (BPY_menu_do_shortcut(PYMENU_TEXTPLUGIN, event, qual)) {
- do_draw = 1;
- }
-}
-#endif
-if (do_draw)
- ; // XXX redraw_alltext();
-#endif
-
static short UNUSED_FUNCTION(do_textmarkers) (SpaceText * st, char ascii, unsigned short evnt, short val)
{
Text *text;
diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c
index 5e56dfa728e..9e44d5207c0 100644
--- a/source/blender/editors/space_time/space_time.c
+++ b/source/blender/editors/space_time/space_time.c
@@ -73,15 +73,15 @@ static void time_draw_sfra_efra(Scene *scene, View2D *v2d)
*/
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
- glColor4f(0.0f, 0.0f, 0.0f, 0.4f);
+ glColor4f(0.0f, 0.0f, 0.0f, 0.4f);
- if (PSFRA < PEFRA) {
- glRectf(v2d->cur.xmin, v2d->cur.ymin, (float)PSFRA, v2d->cur.ymax);
- glRectf((float)PEFRA, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax);
- }
- else {
- glRectf(v2d->cur.xmin, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax);
- }
+ if (PSFRA < PEFRA) {
+ glRectf(v2d->cur.xmin, v2d->cur.ymin, (float)PSFRA, v2d->cur.ymax);
+ glRectf((float)PEFRA, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax);
+ }
+ else {
+ glRectf(v2d->cur.xmin, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax);
+ }
glDisable(GL_BLEND);
UI_ThemeColorShade(TH_BACK, -60);
@@ -90,14 +90,14 @@ static void time_draw_sfra_efra(Scene *scene, View2D *v2d)
fdrawline((float)PEFRA, v2d->cur.ymin, (float)PEFRA, v2d->cur.ymax);
}
-#define CACHE_DRAW_HEIGHT 3.0f
+#define CACHE_DRAW_HEIGHT 3.0f
static void time_draw_cache(SpaceTime *stime, Object *ob)
{
PTCacheID *pid;
ListBase pidlist;
SpaceTimeCache *stc = stime->caches.first;
- float yoffs=0.f;
+ float yoffs = 0.f;
if (!(stime->cache_display & TIME_CACHE_DISPLAY) || (!ob))
return;
@@ -106,27 +106,27 @@ static void time_draw_cache(SpaceTime *stime, Object *ob)
/* iterate over pointcaches on the active object,
* add spacetimecache and vertex array for each */
- for (pid=pidlist.first; pid; pid=pid->next) {
+ for (pid = pidlist.first; pid; pid = pid->next) {
float col[4], *fp;
int i, sta = pid->cache->startframe, end = pid->cache->endframe;
- int len = (end - sta + 1)*4;
+ int len = (end - sta + 1) * 4;
- switch(pid->type) {
+ switch (pid->type) {
case PTCACHE_TYPE_SOFTBODY:
if (!(stime->cache_display & TIME_CACHE_SOFTBODY)) continue;
break;
case PTCACHE_TYPE_PARTICLES:
- if (!(stime->cache_display & TIME_CACHE_PARTICLES)) continue;
+ if (!(stime->cache_display & TIME_CACHE_PARTICLES)) continue;
break;
case PTCACHE_TYPE_CLOTH:
- if (!(stime->cache_display & TIME_CACHE_CLOTH)) continue;
+ if (!(stime->cache_display & TIME_CACHE_CLOTH)) continue;
break;
case PTCACHE_TYPE_SMOKE_DOMAIN:
case PTCACHE_TYPE_SMOKE_HIGHRES:
- if (!(stime->cache_display & TIME_CACHE_SMOKE)) continue;
+ if (!(stime->cache_display & TIME_CACHE_SMOKE)) continue;
break;
case PTCACHE_TYPE_DYNAMICPAINT:
- if (!(stime->cache_display & TIME_CACHE_DYNAMICPAINT)) continue;
+ if (!(stime->cache_display & TIME_CACHE_DYNAMICPAINT)) continue;
break;
}
@@ -134,7 +134,7 @@ static void time_draw_cache(SpaceTime *stime, Object *ob)
continue;
/* make sure we have stc with correct array length */
- if (stc == NULL || MEM_allocN_len(stc->array) != len*2*sizeof(float)) {
+ if (stc == NULL || MEM_allocN_len(stc->array) != len * 2 * sizeof(float)) {
if (stc) {
MEM_freeN(stc->array);
}
@@ -143,59 +143,59 @@ static void time_draw_cache(SpaceTime *stime, Object *ob)
BLI_addtail(&stime->caches, stc);
}
- stc->array = MEM_callocN(len*2*sizeof(float), "SpaceTimeCache array");
+ stc->array = MEM_callocN(len * 2 * sizeof(float), "SpaceTimeCache array");
}
/* fill the vertex array with a quad for each cached frame */
- for (i=sta, fp=stc->array; i<=end; i++) {
- if (pid->cache->cached_frames[i-sta]) {
- fp[0] = (float)i-0.5f;
+ for (i = sta, fp = stc->array; i <= end; i++) {
+ if (pid->cache->cached_frames[i - sta]) {
+ fp[0] = (float)i - 0.5f;
fp[1] = 0.0;
- fp+=2;
+ fp += 2;
- fp[0] = (float)i-0.5f;
+ fp[0] = (float)i - 0.5f;
fp[1] = 1.0;
- fp+=2;
+ fp += 2;
- fp[0] = (float)i+0.5f;
+ fp[0] = (float)i + 0.5f;
fp[1] = 1.0;
- fp+=2;
+ fp += 2;
- fp[0] = (float)i+0.5f;
+ fp[0] = (float)i + 0.5f;
fp[1] = 0.0;
- fp+=2;
+ fp += 2;
}
}
glPushMatrix();
- glTranslatef(0.0, (float)V2D_SCROLL_HEIGHT+yoffs, 0.0);
+ glTranslatef(0.0, (float)V2D_SCROLL_HEIGHT + yoffs, 0.0);
glScalef(1.0, CACHE_DRAW_HEIGHT, 0.0);
- switch(pid->type) {
+ switch (pid->type) {
case PTCACHE_TYPE_SOFTBODY:
- col[0] = 1.0; col[1] = 0.4; col[2] = 0.02;
+ col[0] = 1.0; col[1] = 0.4; col[2] = 0.02;
col[3] = 0.1;
break;
case PTCACHE_TYPE_PARTICLES:
- col[0] = 1.0; col[1] = 0.1; col[2] = 0.02;
+ col[0] = 1.0; col[1] = 0.1; col[2] = 0.02;
col[3] = 0.1;
break;
case PTCACHE_TYPE_CLOTH:
- col[0] = 0.1; col[1] = 0.1; col[2] = 0.75;
+ col[0] = 0.1; col[1] = 0.1; col[2] = 0.75;
col[3] = 0.1;
break;
case PTCACHE_TYPE_SMOKE_DOMAIN:
case PTCACHE_TYPE_SMOKE_HIGHRES:
- col[0] = 0.2; col[1] = 0.2; col[2] = 0.2;
+ col[0] = 0.2; col[1] = 0.2; col[2] = 0.2;
col[3] = 0.1;
break;
case PTCACHE_TYPE_DYNAMICPAINT:
- col[0] = 1.0; col[1] = 0.1; col[2] = 0.75;
+ col[0] = 1.0; col[1] = 0.1; col[2] = 0.75;
col[3] = 0.1;
break;
default:
BLI_assert(0);
- col[0] = 1.0; col[1] = 0.0; col[2] = 1.0;
+ col[0] = 1.0; col[1] = 0.0; col[2] = 1.0;
col[3] = 0.1;
}
glColor4fv(col);
@@ -206,13 +206,13 @@ static void time_draw_cache(SpaceTime *stime, Object *ob)
col[3] = 0.4f;
if (pid->cache->flag & PTCACHE_BAKED) {
- col[0] -= 0.4f; col[1] -= 0.4f; col[2] -= 0.4f;
+ col[0] -= 0.4f; col[1] -= 0.4f; col[2] -= 0.4f;
}
glColor4fv(col);
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(2, GL_FLOAT, 0, stc->array);
- glDrawArrays(GL_QUADS, 0, (fp-stc->array)/2);
+ glDrawArrays(GL_QUADS, 0, (fp - stc->array) / 2);
glDisableClientState(GL_VERTEX_ARRAY);
glDisable(GL_BLEND);
@@ -240,7 +240,7 @@ static void time_cache_free(SpaceTime *stime)
{
SpaceTimeCache *stc;
- for (stc= stime->caches.first; stc; stc=stc->next) {
+ for (stc = stime->caches.first; stc; stc = stc->next) {
if (stc->array) {
MEM_freeN(stc->array);
stc->array = NULL;
@@ -257,9 +257,9 @@ static void time_cache_refresh(SpaceTime *stime)
}
/* helper function - find actkeycolumn that occurs on cframe, or the nearest one if not found */
-static ActKeyColumn *time_cfra_find_ak (ActKeyColumn *ak, float cframe)
+static ActKeyColumn *time_cfra_find_ak(ActKeyColumn *ak, float cframe)
{
- ActKeyColumn *akn= NULL;
+ ActKeyColumn *akn = NULL;
/* sanity checks */
if (ak == NULL)
@@ -267,9 +267,9 @@ static ActKeyColumn *time_cfra_find_ak (ActKeyColumn *ak, float cframe)
/* check if this is a match, or whether it is in some subtree */
if (cframe < ak->cfra)
- akn= time_cfra_find_ak(ak->left, cframe);
+ akn = time_cfra_find_ak(ak->left, cframe);
else if (cframe > ak->cfra)
- akn= time_cfra_find_ak(ak->right, cframe);
+ akn = time_cfra_find_ak(ak->right, cframe);
/* if no match found (or found match), just use the current one */
if (akn == NULL)
@@ -281,7 +281,7 @@ static ActKeyColumn *time_cfra_find_ak (ActKeyColumn *ak, float cframe)
/* helper for time_draw_keyframes() */
static void time_draw_idblock_keyframes(View2D *v2d, ID *id, short onlysel)
{
- bDopeSheet ads= {NULL};
+ bDopeSheet ads = {NULL};
DLRBT_Tree keys;
ActKeyColumn *ak;
@@ -311,13 +311,13 @@ static void time_draw_idblock_keyframes(View2D *v2d, ID *id, short onlysel)
* - draw within a single GL block to be faster
*/
glBegin(GL_LINES);
- for ( ak=time_cfra_find_ak(keys.root, v2d->cur.xmin);
- (ak) && (ak->cfra <= v2d->cur.xmax);
- ak=ak->next )
- {
- glVertex2f(ak->cfra, v2d->tot.ymin);
- glVertex2f(ak->cfra, v2d->tot.ymax);
- }
+ for (ak = time_cfra_find_ak(keys.root, v2d->cur.xmin);
+ (ak) && (ak->cfra <= v2d->cur.xmax);
+ ak = ak->next)
+ {
+ glVertex2f(ak->cfra, v2d->tot.ymin);
+ glVertex2f(ak->cfra, v2d->tot.ymax);
+ }
glEnd(); // GL_LINES
/* free temp stuff */
@@ -327,25 +327,25 @@ static void time_draw_idblock_keyframes(View2D *v2d, ID *id, short onlysel)
/* draw keyframe lines for timeline */
static void time_draw_keyframes(const bContext *C, SpaceTime *stime, ARegion *ar)
{
- Scene *scene= CTX_data_scene(C);
- Object *ob= CTX_data_active_object(C);
- View2D *v2d= &ar->v2d;
- short onlysel= (stime->flag & TIME_ONLYACTSEL);
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = CTX_data_active_object(C);
+ View2D *v2d = &ar->v2d;
+ short onlysel = (stime->flag & TIME_ONLYACTSEL);
/* draw scene keyframes first
* - don't try to do this when only drawing active/selected data keyframes,
* since this can become quite slow
*/
- if (scene && onlysel==0) {
+ if (scene && onlysel == 0) {
/* set draw color */
glColor3ub(0xDD, 0xA7, 0x00);
time_draw_idblock_keyframes(v2d, (ID *)scene, onlysel);
}
/* draw keyframes from selected objects
- * - only do the active object if in posemode (i.e. showing only keyframes for the bones)
- * OR the onlysel flag was set, which means that only active object's keyframes should
- * be considered
+ * - only do the active object if in posemode (i.e. showing only keyframes for the bones)
+ * OR the onlysel flag was set, which means that only active object's keyframes should
+ * be considered
*/
glColor3ub(0xDD, 0xD7, 0x00);
@@ -357,14 +357,14 @@ static void time_draw_keyframes(const bContext *C, SpaceTime *stime, ARegion *ar
short active_done = 0;
/* draw keyframes from all selected objects */
- CTX_DATA_BEGIN(C, Object*, obsel, selected_objects)
+ CTX_DATA_BEGIN (C, Object *, obsel, selected_objects)
{
/* last arg is 0, since onlysel doesn't apply here... */
time_draw_idblock_keyframes(v2d, (ID *)obsel, 0);
/* if this object is the active one, set flag so that we don't draw again */
if (obsel == ob)
- active_done= 1;
+ active_done = 1;
}
CTX_DATA_END;
@@ -379,7 +379,7 @@ static void time_draw_keyframes(const bContext *C, SpaceTime *stime, ARegion *ar
static void time_refresh(const bContext *UNUSED(C), ScrArea *sa)
{
/* find the main timeline region and refresh cache display*/
- ARegion *ar= BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
+ ARegion *ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
if (ar) {
SpaceTime *stime = (SpaceTime *)sa->spacedata.first;
time_cache_refresh(stime);
@@ -410,19 +410,19 @@ static void time_listener(ScrArea *sa, wmNotifier *wmn)
ED_area_tag_refresh(sa);
break;
case ND_FRAME_RANGE:
- {
- ARegion *ar;
- Scene *scene = wmn->reference;
-
- for (ar= sa->regionbase.first; ar; ar= ar->next) {
- if (ar->regiontype==RGN_TYPE_WINDOW) {
- ar->v2d.tot.xmin = (float)(SFRA - 4);
- ar->v2d.tot.xmax = (float)(EFRA + 4);
- break;
- }
+ {
+ ARegion *ar;
+ Scene *scene = wmn->reference;
+
+ for (ar = sa->regionbase.first; ar; ar = ar->next) {
+ if (ar->regiontype == RGN_TYPE_WINDOW) {
+ ar->v2d.tot.xmin = (float)(SFRA - 4);
+ ar->v2d.tot.xmax = (float)(EFRA + 4);
+ break;
}
}
- break;
+ }
+ break;
}
case NC_SPACE:
switch (wmn->data) {
@@ -456,13 +456,13 @@ static void time_main_area_init(wmWindowManager *wm, ARegion *ar)
static void time_main_area_draw(const bContext *C, ARegion *ar)
{
/* draw entirely, view changes should be handled here */
- Scene *scene= CTX_data_scene(C);
- SpaceTime *stime= CTX_wm_space_time(C);
+ Scene *scene = CTX_data_scene(C);
+ SpaceTime *stime = CTX_wm_space_time(C);
Object *obact = CTX_data_active_object(C);
- View2D *v2d= &ar->v2d;
+ View2D *v2d = &ar->v2d;
View2DGrid *grid;
View2DScrollers *scrollers;
- int unit, flag=0;
+ int unit, flag = 0;
/* clear and setup matrix */
UI_ThemeClearColor(TH_BACK);
@@ -471,9 +471,9 @@ static void time_main_area_draw(const bContext *C, ARegion *ar)
UI_view2d_view_ortho(v2d);
/* grid */
- unit= (stime->flag & TIME_DRAWFRAMES)? V2D_UNIT_FRAMES: V2D_UNIT_SECONDS;
- grid= UI_view2d_grid_calc(scene, v2d, unit, V2D_GRID_CLAMP, V2D_ARG_DUMMY, V2D_ARG_DUMMY, ar->winx, ar->winy);
- UI_view2d_grid_draw(v2d, grid, (V2D_VERTICAL_LINES|V2D_VERTICAL_AXIS));
+ unit = (stime->flag & TIME_DRAWFRAMES) ? V2D_UNIT_FRAMES : V2D_UNIT_SECONDS;
+ grid = UI_view2d_grid_calc(scene, v2d, unit, V2D_GRID_CLAMP, V2D_ARG_DUMMY, V2D_ARG_DUMMY, ar->winx, ar->winy);
+ UI_view2d_grid_draw(v2d, grid, (V2D_VERTICAL_LINES | V2D_VERTICAL_AXIS));
UI_view2d_grid_free(grid);
/* start and end frame */
@@ -481,8 +481,8 @@ static void time_main_area_draw(const bContext *C, ARegion *ar)
/* current frame */
flag = DRAWCFRA_WIDE; /* this is only really needed on frames where there's a keyframe, but this will do... */
- if ((stime->flag & TIME_DRAWFRAMES)==0) flag |= DRAWCFRA_UNIT_SECONDS;
- if (stime->flag & TIME_CFRA_NUM) flag |= DRAWCFRA_SHOW_NUMBOX;
+ if ((stime->flag & TIME_DRAWFRAMES) == 0) flag |= DRAWCFRA_UNIT_SECONDS;
+ if (stime->flag & TIME_CFRA_NUM) flag |= DRAWCFRA_SHOW_NUMBOX;
ANIM_draw_cfra(C, v2d, flag);
UI_view2d_view_ortho(v2d);
@@ -501,7 +501,7 @@ static void time_main_area_draw(const bContext *C, ARegion *ar)
UI_view2d_view_restore(C);
/* scrollers */
- scrollers= UI_view2d_scrollers_calc(C, v2d, unit, V2D_GRID_CLAMP, V2D_ARG_DUMMY, V2D_ARG_DUMMY);
+ scrollers = UI_view2d_scrollers_calc(C, v2d, unit, V2D_GRID_CLAMP, V2D_ARG_DUMMY, V2D_ARG_DUMMY);
UI_view2d_scrollers_draw(C, v2d, scrollers);
UI_view2d_scrollers_free(scrollers);
}
@@ -509,7 +509,7 @@ static void time_main_area_draw(const bContext *C, ARegion *ar)
static void time_main_area_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
- switch(wmn->category) {
+ switch (wmn->category) {
case NC_SPACE:
if (wmn->data == ND_SPACE_TIME)
ED_region_tag_redraw(ar);
@@ -528,7 +528,7 @@ static void time_main_area_listener(ARegion *ar, wmNotifier *wmn)
case ND_KEYINGSET:
case ND_RENDER_OPTIONS:
ED_region_tag_redraw(ar);
- break;
+ break;
}
}
}
@@ -549,9 +549,9 @@ static void time_header_area_draw(const bContext *C, ARegion *ar)
static void time_header_area_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
- switch(wmn->category) {
+ switch (wmn->category) {
case NC_SCREEN:
- if (wmn->data==ND_ANIMPLAY)
+ if (wmn->data == ND_ANIMPLAY)
ED_region_tag_redraw(ar);
break;
@@ -563,7 +563,7 @@ static void time_header_area_listener(ARegion *ar, wmNotifier *wmn)
case ND_KEYINGSET:
case ND_RENDER_OPTIONS:
ED_region_tag_redraw(ar);
- break;
+ break;
}
case NC_SPACE:
@@ -577,57 +577,57 @@ static void time_header_area_listener(ARegion *ar, wmNotifier *wmn)
static SpaceLink *time_new(const bContext *C)
{
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
ARegion *ar;
SpaceTime *stime;
- stime= MEM_callocN(sizeof(SpaceTime), "inittime");
+ stime = MEM_callocN(sizeof(SpaceTime), "inittime");
- stime->spacetype= SPACE_TIME;
+ stime->spacetype = SPACE_TIME;
stime->flag |= TIME_DRAWFRAMES;
/* header */
- ar= MEM_callocN(sizeof(ARegion), "header for time");
+ ar = MEM_callocN(sizeof(ARegion), "header for time");
BLI_addtail(&stime->regionbase, ar);
- ar->regiontype= RGN_TYPE_HEADER;
- ar->alignment= RGN_ALIGN_BOTTOM;
+ ar->regiontype = RGN_TYPE_HEADER;
+ ar->alignment = RGN_ALIGN_BOTTOM;
/* main area */
- ar= MEM_callocN(sizeof(ARegion), "main area for time");
+ ar = MEM_callocN(sizeof(ARegion), "main area for time");
BLI_addtail(&stime->regionbase, ar);
- ar->regiontype= RGN_TYPE_WINDOW;
+ ar->regiontype = RGN_TYPE_WINDOW;
ar->v2d.tot.xmin = (float)(SFRA - 4);
ar->v2d.tot.ymin = 0.0f;
ar->v2d.tot.xmax = (float)(EFRA + 4);
ar->v2d.tot.ymax = 50.0f;
- ar->v2d.cur= ar->v2d.tot;
+ ar->v2d.cur = ar->v2d.tot;
- ar->v2d.min[0]= 1.0f;
- ar->v2d.min[1]= 50.0f;
+ ar->v2d.min[0] = 1.0f;
+ ar->v2d.min[1] = 50.0f;
- ar->v2d.max[0]= MAXFRAMEF;
- ar->v2d.max[1]= 50.0;
+ ar->v2d.max[0] = MAXFRAMEF;
+ ar->v2d.max[1] = 50.0;
- ar->v2d.minzoom= 0.1f;
- ar->v2d.maxzoom= 10.0;
+ ar->v2d.minzoom = 0.1f;
+ ar->v2d.maxzoom = 10.0;
- ar->v2d.scroll |= (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL);
+ ar->v2d.scroll |= (V2D_SCROLL_BOTTOM | V2D_SCROLL_SCALE_HORIZONTAL);
ar->v2d.align |= V2D_ALIGN_NO_NEG_Y;
ar->v2d.keepofs |= V2D_LOCKOFS_Y;
ar->v2d.keepzoom |= V2D_LOCKZOOM_Y;
- return (SpaceLink*)stime;
+ return (SpaceLink *)stime;
}
/* not spacelink itself */
static void time_free(SpaceLink *sl)
{
- SpaceTime *stime= (SpaceTime *)sl;
+ SpaceTime *stime = (SpaceTime *)sl;
time_cache_free(stime);
}
@@ -636,20 +636,20 @@ static void time_free(SpaceLink *sl)
/* validate spacedata, add own area level handlers */
static void time_init(wmWindowManager *UNUSED(wm), ScrArea *sa)
{
- SpaceTime *stime= (SpaceTime *)sa->spacedata.first;
+ SpaceTime *stime = (SpaceTime *)sa->spacedata.first;
time_cache_free(stime);
/* enable all cache display */
stime->cache_display |= TIME_CACHE_DISPLAY;
- stime->cache_display |= (TIME_CACHE_SOFTBODY|TIME_CACHE_PARTICLES);
- stime->cache_display |= (TIME_CACHE_CLOTH|TIME_CACHE_SMOKE|TIME_CACHE_DYNAMICPAINT);
+ stime->cache_display |= (TIME_CACHE_SOFTBODY | TIME_CACHE_PARTICLES);
+ stime->cache_display |= (TIME_CACHE_CLOTH | TIME_CACHE_SMOKE | TIME_CACHE_DYNAMICPAINT);
}
static SpaceLink *time_duplicate(SpaceLink *sl)
{
- SpaceTime *stime= (SpaceTime *)sl;
- SpaceTime *stimen= MEM_dupallocN(stime);
+ SpaceTime *stime = (SpaceTime *)sl;
+ SpaceTime *stimen = MEM_dupallocN(stime);
stimen->caches.first = stimen->caches.last = NULL;
@@ -660,41 +660,41 @@ static SpaceLink *time_duplicate(SpaceLink *sl)
/* it defines all callbacks to maintain spaces */
void ED_spacetype_time(void)
{
- SpaceType *st= MEM_callocN(sizeof(SpaceType), "spacetype time");
+ SpaceType *st = MEM_callocN(sizeof(SpaceType), "spacetype time");
ARegionType *art;
- st->spaceid= SPACE_TIME;
+ st->spaceid = SPACE_TIME;
strncpy(st->name, "Timeline", BKE_ST_MAXNAME);
- st->new= time_new;
- st->free= time_free;
- st->init= time_init;
- st->duplicate= time_duplicate;
- st->operatortypes= time_operatortypes;
- st->keymap= NULL;
- st->listener= time_listener;
- st->refresh= time_refresh;
+ st->new = time_new;
+ st->free = time_free;
+ st->init = time_init;
+ st->duplicate = time_duplicate;
+ st->operatortypes = time_operatortypes;
+ st->keymap = NULL;
+ st->listener = time_listener;
+ st->refresh = time_refresh;
/* regions: main window */
- art= MEM_callocN(sizeof(ARegionType), "spacetype time region");
+ art = MEM_callocN(sizeof(ARegionType), "spacetype time region");
art->regionid = RGN_TYPE_WINDOW;
- art->keymapflag= ED_KEYMAP_VIEW2D|ED_KEYMAP_MARKERS|ED_KEYMAP_ANIMATION|ED_KEYMAP_FRAMES;
+ art->keymapflag = ED_KEYMAP_VIEW2D | ED_KEYMAP_MARKERS | ED_KEYMAP_ANIMATION | ED_KEYMAP_FRAMES;
- art->init= time_main_area_init;
- art->draw= time_main_area_draw;
- art->listener= time_main_area_listener;
- art->keymap= time_keymap;
+ art->init = time_main_area_init;
+ art->draw = time_main_area_draw;
+ art->listener = time_main_area_listener;
+ art->keymap = time_keymap;
BLI_addhead(&st->regiontypes, art);
/* regions: header */
- art= MEM_callocN(sizeof(ARegionType), "spacetype time region");
+ art = MEM_callocN(sizeof(ARegionType), "spacetype time region");
art->regionid = RGN_TYPE_HEADER;
- art->prefsizey= HEADERY;
- art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D|ED_KEYMAP_FRAMES|ED_KEYMAP_HEADER;
+ art->prefsizey = HEADERY;
+ art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_HEADER;
- art->init= time_header_area_init;
- art->draw= time_header_area_draw;
- art->listener= time_header_area_listener;
+ art->init = time_header_area_init;
+ art->draw = time_header_area_draw;
+ art->listener = time_header_area_listener;
BLI_addhead(&st->regiontypes, art);
BKE_spacetype_register(st);
diff --git a/source/blender/editors/space_time/time_ops.c b/source/blender/editors/space_time/time_ops.c
index 1c1f7a69865..189c8bfc7d0 100644
--- a/source/blender/editors/space_time/time_ops.c
+++ b/source/blender/editors/space_time/time_ops.c
@@ -47,35 +47,35 @@
#include "time_intern.h"
/* ****************** Start/End Frame Operators *******************************/
-static int time_set_sfra_exec (bContext *C, wmOperator *UNUSED(op))
+static int time_set_sfra_exec(bContext *C, wmOperator *UNUSED(op))
{
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
int frame;
if (scene == NULL)
return OPERATOR_CANCELLED;
- frame= CFRA;
+ frame = CFRA;
/* if Preview Range is defined, set the 'start' frame for that */
if (PRVRANGEON)
- scene->r.psfra= frame;
+ scene->r.psfra = frame;
else
- scene->r.sfra= frame;
+ scene->r.sfra = frame;
if (PEFRA < frame) {
if (PRVRANGEON)
- scene->r.pefra= frame;
+ scene->r.pefra = frame;
else
- scene->r.efra= frame;
+ scene->r.efra = frame;
}
- WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene);
return OPERATOR_FINISHED;
}
-static void TIME_OT_start_frame_set (wmOperatorType *ot)
+static void TIME_OT_start_frame_set(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Set Start Frame";
@@ -87,39 +87,39 @@ static void TIME_OT_start_frame_set (wmOperatorType *ot)
ot->poll = ED_operator_timeline_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
-static int time_set_efra_exec (bContext *C, wmOperator *UNUSED(op))
+static int time_set_efra_exec(bContext *C, wmOperator *UNUSED(op))
{
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
int frame;
if (scene == NULL)
return OPERATOR_CANCELLED;
- frame= CFRA;
+ frame = CFRA;
/* if Preview Range is defined, set the 'end' frame for that */
if (PRVRANGEON)
- scene->r.pefra= frame;
+ scene->r.pefra = frame;
else
- scene->r.efra= frame;
+ scene->r.efra = frame;
if (PSFRA > frame) {
if (PRVRANGEON)
- scene->r.psfra= frame;
+ scene->r.psfra = frame;
else
- scene->r.sfra= frame;
+ scene->r.sfra = frame;
}
- WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene);
return OPERATOR_FINISHED;
}
-static void TIME_OT_end_frame_set (wmOperatorType *ot)
+static void TIME_OT_end_frame_set(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Set End Frame";
@@ -131,16 +131,16 @@ static void TIME_OT_end_frame_set (wmOperatorType *ot)
ot->poll = ED_operator_timeline_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ************************ View All Operator *******************************/
-static int time_view_all_exec (bContext *C, wmOperator *UNUSED(op))
+static int time_view_all_exec(bContext *C, wmOperator *UNUSED(op))
{
- Scene *scene= CTX_data_scene(C);
- ARegion *ar= CTX_wm_region(C);
- View2D *v2d= (ar) ? &ar->v2d : NULL;
+ Scene *scene = CTX_data_scene(C);
+ ARegion *ar = CTX_wm_region(C);
+ View2D *v2d = (ar) ? &ar->v2d : NULL;
float extra;
if (ELEM(NULL, scene, ar))
@@ -151,7 +151,7 @@ static int time_view_all_exec (bContext *C, wmOperator *UNUSED(op))
v2d->cur.xmax = (float)PEFRA;
/* we need an extra "buffer" factor on either side so that the endpoints are visible */
- extra= 0.01f * (v2d->cur.xmax - v2d->cur.xmin);
+ extra = 0.01f * (v2d->cur.xmax - v2d->cur.xmin);
v2d->cur.xmin -= extra;
v2d->cur.xmax += extra;
@@ -161,7 +161,7 @@ static int time_view_all_exec (bContext *C, wmOperator *UNUSED(op))
return OPERATOR_FINISHED;
}
-static void TIME_OT_view_all (wmOperatorType *ot)
+static void TIME_OT_view_all(wmOperatorType *ot)
{
/* identifiers */
ot->name = "View All";
@@ -173,7 +173,7 @@ static void TIME_OT_view_all (wmOperatorType *ot)
ot->poll = ED_operator_timeline_active;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ************************** registration **********************************/
diff --git a/source/blender/editors/space_userpref/space_userpref.c b/source/blender/editors/space_userpref/space_userpref.c
index e9bf9345b5c..6c683eba085 100644
--- a/source/blender/editors/space_userpref/space_userpref.c
+++ b/source/blender/editors/space_userpref/space_userpref.c
@@ -145,7 +145,7 @@ static void userpref_header_listener(ARegion *UNUSED(ar), wmNotifier *UNUSED(wmn
{
/* context changes */
#if 0
- switch(wmn->category) {
+ switch (wmn->category) {
default:
break;
}
diff --git a/source/blender/editors/space_view3d/drawanimviz.c b/source/blender/editors/space_view3d/drawanimviz.c
index d0e344ef0d5..f8d942b4fd1 100644
--- a/source/blender/editors/space_view3d/drawanimviz.c
+++ b/source/blender/editors/space_view3d/drawanimviz.c
@@ -88,38 +88,50 @@ void draw_motion_path_instance(Scene *scene,
//RegionView3D *rv3d= ar->regiondata;
bMotionPathVert *mpv, *mpv_start;
int i, stepsize = avs->path_step;
- int sfra, efra, len;
-
+ int sfra, efra, sind, len;
/* get frame ranges */
if (avs->path_type == MOTIONPATH_TYPE_ACFRA) {
- int sind;
-
/* With "Around Current", we only choose frames from around
- * the current frame to draw. However, this range is still
- * restricted by the limits of the original path.
+ * the current frame to draw.
*/
sfra = CFRA - avs->path_bc;
efra = CFRA + avs->path_ac;
- if (sfra < mpath->start_frame) sfra = mpath->start_frame;
- if (efra > mpath->end_frame) efra = mpath->end_frame;
-
- len = efra - sfra;
-
- sind = sfra - mpath->start_frame;
- mpv_start = (mpath->points + sind);
}
else {
+ /* Use the current display range */
+ sfra = avs->path_sf;
+ efra = avs->path_ef;
+ }
+
+ /* no matter what, we can only show what is in the cache and no more
+ * - abort if whole range is past ends of path
+ * - otherwise clamp endpoints to extents of path
+ */
+ if ((sfra > mpath->end_frame) || (efra < mpath->start_frame)) {
+ /* whole path is out of bounds */
+ return;
+ }
+
+ if (sfra < mpath->start_frame) {
+ /* start clamp */
sfra = mpath->start_frame;
- efra = sfra + mpath->length;
- len = mpath->length;
- mpv_start = mpath->points;
}
-
+ if (efra > mpath->end_frame) {
+ /* end clamp */
+ efra = mpath->end_frame;
+ }
+
+ len = efra - sfra;
+
if (len <= 0) {
return;
}
-
+
+ /* get pointers to parts of path */
+ sind = sfra - mpath->start_frame;
+ mpv_start = (mpath->points + sind);
+
/* draw curve-line of path */
glShadeModel(GL_SMOOTH);
@@ -193,8 +205,9 @@ void draw_motion_path_instance(Scene *scene,
glVertex3fv(mpv->co);
glEnd();
- /* Draw big green dot where the current frame is */
- // NOTE: only do this when drawing keyframes for now...
+ /* Draw big green dot where the current frame is
+ * NOTE: this is only done when keyframes are shown, since this adds similar types of clutter
+ */
if ((avs->path_viewflag & MOTIONPATH_VIEW_KFRAS) &&
(sfra < CFRA) && (CFRA <= efra))
{
@@ -245,7 +258,7 @@ void draw_motion_path_instance(Scene *scene,
/* Keyframes - dots and numbers */
if (avs->path_viewflag & MOTIONPATH_VIEW_KFRAS) {
unsigned char col[4];
-
+
AnimData *adt = BKE_animdata_from_id(&ob->id);
DLRBT_Tree keys;
@@ -257,7 +270,7 @@ void draw_motion_path_instance(Scene *scene,
* unless an option is set to always use the whole action
*/
if ((pchan) && (avs->path_viewflag & MOTIONPATH_VIEW_KFACT) == 0) {
- bActionGroup *agrp = action_groups_find_named(adt->action, pchan->name);
+ bActionGroup *agrp = BKE_action_group_find_name(adt->action, pchan->name);
if (agrp) {
agroup_to_keylist(adt, agrp, &keys, NULL);
@@ -273,7 +286,7 @@ void draw_motion_path_instance(Scene *scene,
/* Draw slightly-larger yellow dots at each keyframe */
UI_GetThemeColor3ubv(TH_VERTEX_SELECT, col);
col[3] = 255;
-
+
glPointSize(4.0f); // XXX perhaps a bit too big
glColor3ubv(col);
diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c
index fec93b3b9aa..2211b1ddb62 100644
--- a/source/blender/editors/space_view3d/drawarmature.c
+++ b/source/blender/editors/space_view3d/drawarmature.c
@@ -1297,7 +1297,7 @@ static void draw_bone(int dt, int armflag, int boneflag, short constflag, unsign
{
/* Draw a 3d octahedral bone, we use normalized space based on length,
- * for glDisplayLists */
+ * for display-lists */
glScalef(length, length, length);
@@ -1996,7 +1996,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
/* finally names and axes */
if ((arm->flag & (ARM_DRAWNAMES | ARM_DRAWAXES)) && (is_outline == 0)) {
- /* patch for several 3d cards (IBM mostly) that crash on glSelect with text drawing */
+ /* patch for several 3d cards (IBM mostly) that crash on GL_SELECT with text drawing */
if ((G.f & G_PICKSEL) == 0) {
float vec[3];
@@ -2208,7 +2208,7 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, int dt)
/* finally names and axes */
if (arm->flag & (ARM_DRAWNAMES | ARM_DRAWAXES)) {
- // patch for several 3d cards (IBM mostly) that crash on glSelect with text drawing
+ // patch for several 3d cards (IBM mostly) that crash on GL_SELECT with text drawing
if ((G.f & G_PICKSEL) == 0) {
float vec[3];
unsigned char col[4];
@@ -2338,9 +2338,9 @@ static void draw_ghost_poses_range(Scene *scene, View3D *v3d, ARegion *ar, Base
/* copy the pose */
poseo = ob->pose;
- copy_pose(&posen, ob->pose, 1);
+ BKE_pose_copy_data(&posen, ob->pose, 1);
ob->pose = posen;
- armature_rebuild_pose(ob, ob->data); /* child pointers for IK */
+ BKE_pose_rebuild(ob, ob->data); /* child pointers for IK */
ghost_poses_tag_unselected(ob, 0); /* hide unselected bones if need be */
glEnable(GL_BLEND);
@@ -2352,20 +2352,20 @@ static void draw_ghost_poses_range(Scene *scene, View3D *v3d, ARegion *ar, Base
UI_ThemeColorShadeAlpha(TH_WIRE, 0, -128 - (int)(120.0 * sqrt(colfac)));
BKE_animsys_evaluate_animdata(scene, &ob->id, adt, (float)CFRA, ADT_RECALC_ALL);
- where_is_pose(scene, ob);
+ BKE_pose_where_is(scene, ob);
draw_pose_bones(scene, v3d, ar, base, OB_WIRE, TRUE, FALSE);
}
glDisable(GL_BLEND);
if (v3d->zbuf) glEnable(GL_DEPTH_TEST);
ghost_poses_tag_unselected(ob, 1); /* unhide unselected bones if need be */
- free_pose(posen);
+ BKE_pose_free(posen);
/* restore */
CFRA = cfrao;
ob->pose = poseo;
arm->flag = flago;
- armature_rebuild_pose(ob, ob->data);
+ BKE_pose_rebuild(ob, ob->data);
ob->mode |= OB_MODE_POSE;
ob->ipoflag = ipoflago;
}
@@ -2415,9 +2415,9 @@ static void draw_ghost_poses_keys(Scene *scene, View3D *v3d, ARegion *ar, Base *
/* copy the pose */
poseo = ob->pose;
- copy_pose(&posen, ob->pose, 1);
+ BKE_pose_copy_data(&posen, ob->pose, 1);
ob->pose = posen;
- armature_rebuild_pose(ob, ob->data); /* child pointers for IK */
+ BKE_pose_rebuild(ob, ob->data); /* child pointers for IK */
ghost_poses_tag_unselected(ob, 0); /* hide unselected bones if need be */
glEnable(GL_BLEND);
@@ -2431,7 +2431,7 @@ static void draw_ghost_poses_keys(Scene *scene, View3D *v3d, ARegion *ar, Base *
CFRA = (int)ak->cfra;
BKE_animsys_evaluate_animdata(scene, &ob->id, adt, (float)CFRA, ADT_RECALC_ALL);
- where_is_pose(scene, ob);
+ BKE_pose_where_is(scene, ob);
draw_pose_bones(scene, v3d, ar, base, OB_WIRE, TRUE, FALSE);
}
glDisable(GL_BLEND);
@@ -2439,13 +2439,13 @@ static void draw_ghost_poses_keys(Scene *scene, View3D *v3d, ARegion *ar, Base *
ghost_poses_tag_unselected(ob, 1); /* unhide unselected bones if need be */
BLI_dlrbTree_free(&keys);
- free_pose(posen);
+ BKE_pose_free(posen);
/* restore */
CFRA = cfrao;
ob->pose = poseo;
arm->flag = flago;
- armature_rebuild_pose(ob, ob->data);
+ BKE_pose_rebuild(ob, ob->data);
ob->mode |= OB_MODE_POSE;
}
@@ -2481,9 +2481,9 @@ static void draw_ghost_poses(Scene *scene, View3D *v3d, ARegion *ar, Base *base)
/* copy the pose */
poseo = ob->pose;
- copy_pose(&posen, ob->pose, 1);
+ BKE_pose_copy_data(&posen, ob->pose, 1);
ob->pose = posen;
- armature_rebuild_pose(ob, ob->data); /* child pointers for IK */
+ BKE_pose_rebuild(ob, ob->data); /* child pointers for IK */
ghost_poses_tag_unselected(ob, 0); /* hide unselected bones if need be */
glEnable(GL_BLEND);
@@ -2501,7 +2501,7 @@ static void draw_ghost_poses(Scene *scene, View3D *v3d, ARegion *ar, Base *base)
if (CFRA != cfrao) {
BKE_animsys_evaluate_animdata(scene, &ob->id, adt, (float)CFRA, ADT_RECALC_ALL);
- where_is_pose(scene, ob);
+ BKE_pose_where_is(scene, ob);
draw_pose_bones(scene, v3d, ar, base, OB_WIRE, TRUE, FALSE);
}
}
@@ -2516,7 +2516,7 @@ static void draw_ghost_poses(Scene *scene, View3D *v3d, ARegion *ar, Base *base)
if (CFRA != cfrao) {
BKE_animsys_evaluate_animdata(scene, &ob->id, adt, (float)CFRA, ADT_RECALC_ALL);
- where_is_pose(scene, ob);
+ BKE_pose_where_is(scene, ob);
draw_pose_bones(scene, v3d, ar, base, OB_WIRE, TRUE, FALSE);
}
}
@@ -2525,13 +2525,13 @@ static void draw_ghost_poses(Scene *scene, View3D *v3d, ARegion *ar, Base *base)
if (v3d->zbuf) glEnable(GL_DEPTH_TEST);
ghost_poses_tag_unselected(ob, 1); /* unhide unselected bones if need be */
- free_pose(posen);
+ BKE_pose_free(posen);
/* restore */
CFRA = cfrao;
ob->pose = poseo;
arm->flag = flago;
- armature_rebuild_pose(ob, ob->data);
+ BKE_pose_rebuild(ob, ob->data);
ob->mode |= OB_MODE_POSE;
}
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c
index 3b5ebbee42a..837b02ace64 100644
--- a/source/blender/editors/space_view3d/drawmesh.c
+++ b/source/blender/editors/space_view3d/drawmesh.c
@@ -179,7 +179,7 @@ static DMDrawOption draw_mesh_face_select__drawFaceOptsInv(void *userData, int i
return DM_DRAW_OPTION_SKIP;
}
-static void draw_mesh_face_select(RegionView3D *rv3d, Mesh *me, DerivedMesh *dm)
+void draw_mesh_face_select(RegionView3D *rv3d, Mesh *me, DerivedMesh *dm)
{
drawMeshFaceSelect_userData data;
@@ -349,7 +349,7 @@ static void draw_textured_begin(Scene *scene, View3D *v3d, RegionView3D *rv3d, O
/* texture draw is abused for mask selection mode, do this so wire draw
* with face selection in weight paint is not lit. */
- if ((v3d->drawtype <= OB_WIRE) && (ob->mode & OB_MODE_WEIGHT_PAINT)) {
+ if ((v3d->drawtype <= OB_WIRE) && (ob->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT))) {
solidtex = FALSE;
Gtexdraw.islit = 0;
}
@@ -387,7 +387,7 @@ static void draw_textured_end(void)
glDisable(GL_CULL_FACE);
/* XXX, bad patch - GPU_default_lights() calls
- * glLightfv(GL_LIGHT_POSITION, ...) which
+ * glLightfv(GL_POSITION, ...) which
* is transformed by the current matrix... we
* need to make sure that matrix is identity.
*
@@ -593,20 +593,6 @@ static DMDrawOption draw_em_tf_mapped__set_draw(void *userData, int index)
}
}
-static DMDrawOption wpaint__setSolidDrawOptions_material(void *userData, int index)
-{
- Mesh *me = (Mesh *)userData;
-
- if (me->mat && me->mpoly) {
- Material *ma = me->mat[me->mpoly[index].mat_nr];
- if (ma && (ma->game.flag & GEMAT_INVISIBLE)) {
- return DM_DRAW_OPTION_SKIP;
- }
- }
-
- return DM_DRAW_OPTION_NORMAL;
-}
-
/* when face select is on, use face hidden flag */
static DMDrawOption wpaint__setSolidDrawOptions_facemask(void *userData, int index)
{
@@ -942,10 +928,14 @@ static int tex_mat_set_face_editmesh_cb(void *userData, int index)
void draw_mesh_textured(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob, DerivedMesh *dm, int draw_flags)
{
- if ((!scene_use_new_shading_nodes(scene)) || (draw_flags & DRAW_MODIFIERS_PREVIEW)) {
+ if ((!BKE_scene_use_new_shading_nodes(scene)) || (draw_flags & DRAW_MODIFIERS_PREVIEW)) {
draw_mesh_textured_old(scene, v3d, rv3d, ob, dm, draw_flags);
return;
}
+ else if (ob->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT)) {
+ draw_mesh_paint(rv3d, ob, dm, draw_flags);
+ return;
+ }
/* set opengl state for negative scale & color */
if (ob->transflag & OB_NEG_SCALE) glFrontFace(GL_CW);
@@ -953,12 +943,7 @@ void draw_mesh_textured(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *o
glEnable(GL_LIGHTING);
- if (ob->mode & OB_MODE_WEIGHT_PAINT) {
- /* weight paint mode exception */
- dm->drawMappedFaces(dm, wpaint__setSolidDrawOptions_material,
- GPU_enable_material, NULL, ob->data, DM_DRAW_USE_COLORS | DM_DRAW_ALWAYS_SMOOTH);
- }
- else {
+ {
Mesh *me = ob->data;
TexMatCallback data = {scene, ob, me, dm};
int (*set_face_cb)(void *, int);
@@ -1015,3 +1000,54 @@ void draw_mesh_textured(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *o
draw_mesh_face_select(rv3d, ob->data, dm);
}
+/* Vertex Paint and Weight Paint */
+
+void draw_mesh_paint(RegionView3D *rv3d, Object *ob, DerivedMesh *dm, int draw_flags)
+{
+ DMSetDrawOptions facemask = NULL;
+ Mesh *me = ob->data;
+
+ /* hide faces in face select mode */
+ if (draw_flags & DRAW_FACE_SELECT)
+ facemask = wpaint__setSolidDrawOptions_facemask;
+
+ if (ob && ob->mode & OB_MODE_WEIGHT_PAINT) {
+ /* enforce default material settings */
+ GPU_enable_material(0, NULL);
+
+ /* but set default spec */
+ glColorMaterial(GL_FRONT_AND_BACK, GL_SPECULAR);
+ glEnable(GL_COLOR_MATERIAL); /* according manpages needed */
+ glColor3ub(120, 120, 120);
+ glDisable(GL_COLOR_MATERIAL);
+
+ /* diffuse */
+ glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE);
+ glEnable(GL_LIGHTING);
+ glEnable(GL_COLOR_MATERIAL);
+
+ dm->drawMappedFaces(dm, facemask, GPU_enable_material, NULL, me,
+ DM_DRAW_USE_COLORS | DM_DRAW_ALWAYS_SMOOTH);
+
+ glDisable(GL_COLOR_MATERIAL);
+ glDisable(GL_LIGHTING);
+
+ GPU_disable_material();
+ }
+ else if (ob->mode & OB_MODE_VERTEX_PAINT) {
+ if (me->mloopcol) {
+ dm->drawMappedFaces(dm, facemask, GPU_enable_material, NULL, me,
+ DM_DRAW_USE_COLORS | DM_DRAW_ALWAYS_SMOOTH);
+ }
+ else {
+ glColor3f(1.0f, 1.0f, 1.0f);
+ dm->drawMappedFaces(dm, facemask, GPU_enable_material, NULL, me,
+ DM_DRAW_ALWAYS_SMOOTH);
+ }
+ }
+
+ /* draw face selection on top */
+ if (draw_flags & DRAW_FACE_SELECT)
+ draw_mesh_face_select(rv3d, me, dm);
+}
+
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index effaa405218..4a42fe9f981 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -47,6 +47,7 @@
#include "DNA_speaker_types.h"
#include "DNA_world_types.h"
#include "DNA_armature_types.h"
+#include "DNA_object_types.h"
#include "BLI_utildefines.h"
#include "BLI_blenlib.h"
@@ -163,7 +164,10 @@ typedef struct drawDMFacesSel_userData {
typedef struct drawDMNormal_userData {
BMEditMesh *em;
+ int uniform_scale;
float normalsize;
+ float tmat[3][3];
+ float imat[3][3];
} drawDMNormal_userData;
typedef struct bbsObmodeMeshVerts_userData {
@@ -186,7 +190,7 @@ static int check_object_draw_texture(Scene *scene, View3D *v3d, int drawtype)
return TRUE;
/* textured solid */
- if (v3d->drawtype == OB_SOLID && (v3d->flag2 & V3D_SOLID_TEX) && !scene_use_new_shading_nodes(scene))
+ if (v3d->drawtype == OB_SOLID && (v3d->flag2 & V3D_SOLID_TEX) && !BKE_scene_use_new_shading_nodes(scene))
return TRUE;
return FALSE;
@@ -328,7 +332,7 @@ int draw_glsl_material(Scene *scene, Object *ob, View3D *v3d, int dt)
return 0;
if (ob == OBACT && (ob && ob->mode & OB_MODE_WEIGHT_PAINT))
return 0;
- if (scene_use_new_shading_nodes(scene))
+ if (BKE_scene_use_new_shading_nodes(scene))
return 0;
return (scene->gm.matmode == GAME_MAT_GLSL) && (dt > OB_SOLID);
@@ -1736,7 +1740,7 @@ static void drawcamera(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base
int i;
float drawsize;
const short is_view = (rv3d->persp == RV3D_CAMOB && ob == v3d->camera);
- MovieClip *clip = object_get_movieclip(scene, base->object, 0);
+ MovieClip *clip = BKE_object_movieclip_get(scene, base->object, 0);
/* draw data for movie clip set as active for scene */
if (clip) {
@@ -1758,8 +1762,8 @@ static void drawcamera(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base
scale[1] = 1.0f / len_v3(ob->obmat[1]);
scale[2] = 1.0f / len_v3(ob->obmat[2]);
- camera_view_frame_ex(scene, cam, cam->drawsize, is_view, scale,
- asp, shift, &drawsize, vec);
+ BKE_camera_view_frame_ex(scene, cam, cam->drawsize, is_view, scale,
+ asp, shift, &drawsize, vec);
glDisable(GL_LIGHTING);
glDisable(GL_CULL_FACE);
@@ -1830,7 +1834,7 @@ static void drawcamera(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base
if (cam->flag & CAM_SHOWLIMITS) {
draw_limit_line(cam->clipsta, cam->clipend, 0x77FFFF);
/* qdn: was yafray only, now also enabled for Blender to be used with defocus composite node */
- draw_focus_cross(object_camera_dof_distance(ob), cam->drawsize);
+ draw_focus_cross(BKE_camera_object_dof_distance(ob), cam->drawsize);
}
wrld = scene->world;
@@ -1920,7 +1924,7 @@ void lattice_foreachScreenVert(ViewContext *vc, void (*func)(void *userData, BPo
Object *obedit = vc->obedit;
Lattice *lt = obedit->data;
BPoint *bp = lt->editlatt->latt->def;
- DispList *dl = find_displist(&obedit->disp, DL_VERTS);
+ DispList *dl = BKE_displist_find(&obedit->disp, DL_VERTS);
float *co = dl ? dl->verts : NULL;
int i, N = lt->editlatt->latt->pntsu * lt->editlatt->latt->pntsv * lt->editlatt->latt->pntsw;
short s[2] = {IS_CLIPPED, 0};
@@ -1967,8 +1971,8 @@ static void drawlattice(Scene *scene, View3D *v3d, Object *ob)
/* now we default make displist, this will modifiers work for non animated case */
if (ob->disp.first == NULL)
- lattice_calc_modifiers(scene, ob);
- dl = find_displist(&ob->disp, DL_VERTS);
+ BKE_lattice_modifiers_calc(scene, ob);
+ dl = BKE_displist_find(&ob->disp, DL_VERTS);
if (is_edit) {
lt = lt->editlatt->latt;
@@ -2050,9 +2054,9 @@ static void mesh_foreachScreenVert__mapFunc(void *userData, int index, const flo
}
void mesh_foreachScreenVert(
- ViewContext *vc,
- void (*func)(void *userData, BMVert *eve, int x, int y, int index),
- void *userData, eV3DClipTest clipVerts)
+ ViewContext *vc,
+ void (*func)(void *userData, BMVert *eve, int x, int y, int index),
+ void *userData, eV3DClipTest clipVerts)
{
foreachScreenVert_userData data;
DerivedMesh *dm = editbmesh_get_derived_cage(vc->scene, vc->obedit, vc->em, CD_MASK_BAREMESH);
@@ -2136,9 +2140,9 @@ static void mesh_foreachScreenEdge__mapFunc(void *userData, int index, const flo
}
void mesh_foreachScreenEdge(
- ViewContext *vc,
- void (*func)(void *userData, BMEdge *eed, int x0, int y0, int x1, int y1, int index),
- void *userData, eV3DClipTest clipVerts)
+ ViewContext *vc,
+ void (*func)(void *userData, BMEdge *eed, int x0, int y0, int x1, int y1, int index),
+ void *userData, eV3DClipTest clipVerts)
{
foreachScreenEdge_userData data;
DerivedMesh *dm = editbmesh_get_derived_cage(vc->scene, vc->obedit, vc->em, CD_MASK_BAREMESH);
@@ -2183,9 +2187,9 @@ static void mesh_foreachScreenFace__mapFunc(void *userData, int index, const flo
}
void mesh_foreachScreenFace(
- ViewContext *vc,
- void (*func)(void *userData, BMFace *efa, int x, int y, int index),
- void *userData)
+ ViewContext *vc,
+ void (*func)(void *userData, BMFace *efa, int x, int y, int index),
+ void *userData)
{
foreachScreenFace_userData data;
DerivedMesh *dm = editbmesh_get_derived_cage(vc->scene, vc->obedit, vc->em, CD_MASK_BAREMESH);
@@ -2213,7 +2217,7 @@ void nurbs_foreachScreenVert(
short s[2] = {IS_CLIPPED, 0};
Nurb *nu;
int i;
- ListBase *nurbs = curve_editnurbs(cu);
+ ListBase *nurbs = BKE_curve_editNurbs_get(cu);
ED_view3d_clipping_local(vc->rv3d, vc->obedit->obmat); /* for local clipping lookups */
@@ -2268,25 +2272,56 @@ void nurbs_foreachScreenVert(
* logic!!!
*/
+static void calcDrawDMNormalScale(Object *ob, drawDMNormal_userData *data)
+{
+ float obmat[3][3];
+
+ copy_m3_m4(obmat, ob->obmat);
+
+ data->uniform_scale = is_uniform_scaled_m3(obmat);
+
+ if (!data->uniform_scale) {
+ /* inverted matrix */
+ invert_m3_m3(data->imat, obmat);
+
+ /* transposed inverted matrix */
+ copy_m3_m3(data->tmat, data->imat);
+ transpose_m3(data->tmat);
+ }
+}
+
static void draw_dm_face_normals__mapFunc(void *userData, int index, const float cent[3], const float no[3])
{
drawDMNormal_userData *data = userData;
BMFace *efa = EDBM_face_at_index(data->em, index);
+ float n[3];
if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) {
+ if (!data->uniform_scale) {
+ mul_v3_m3v3(n, data->tmat, (float *) no);
+ normalize_v3(n);
+ mul_m3_v3(data->imat, n);
+ }
+ else {
+ copy_v3_v3(n, no);
+ }
+
glVertex3fv(cent);
- glVertex3f(cent[0] + no[0] * data->normalsize,
- cent[1] + no[1] * data->normalsize,
- cent[2] + no[2] * data->normalsize);
+ glVertex3f(cent[0] + n[0] * data->normalsize,
+ cent[1] + n[1] * data->normalsize,
+ cent[2] + n[2] * data->normalsize);
}
}
-static void draw_dm_face_normals(BMEditMesh *em, Scene *scene, DerivedMesh *dm)
+
+static void draw_dm_face_normals(BMEditMesh *em, Scene *scene, Object *ob, DerivedMesh *dm)
{
drawDMNormal_userData data;
data.em = em;
data.normalsize = scene->toolsettings->normalsize;
+ calcDrawDMNormalScale(ob, &data);
+
glBegin(GL_LINES);
dm->foreachMappedFaceCenter(dm, draw_dm_face_normals__mapFunc, &data);
glEnd();
@@ -2316,27 +2351,42 @@ static void draw_dm_vert_normals__mapFunc(void *userData, int index, const float
BMVert *eve = EDBM_vert_at_index(data->em, index);
if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) {
- glVertex3fv(co);
+ float no[3], n[3];
if (no_f) {
- glVertex3f(co[0] + no_f[0] * data->normalsize,
- co[1] + no_f[1] * data->normalsize,
- co[2] + no_f[2] * data->normalsize);
+ copy_v3_v3(no, no_f);
}
else {
- glVertex3f(co[0] + no_s[0] * (data->normalsize / 32767.0f),
- co[1] + no_s[1] * (data->normalsize / 32767.0f),
- co[2] + no_s[2] * (data->normalsize / 32767.0f));
+ no[0] = no_s[0] / 32767.0f;
+ no[1] = no_s[1] / 32767.0f;
+ no[2] = no_s[2] / 32767.0f;
}
+
+ if (!data->uniform_scale) {
+ mul_v3_m3v3(n, data->tmat, (float *) no);
+ normalize_v3(n);
+ mul_m3_v3(data->imat, n);
+ }
+ else {
+ copy_v3_v3(n, no);
+ }
+
+ glVertex3fv(co);
+ glVertex3f(co[0] + n[0] * data->normalsize,
+ co[1] + n[1] * data->normalsize,
+ co[2] + n[2] * data->normalsize);
}
}
-static void draw_dm_vert_normals(BMEditMesh *em, Scene *scene, DerivedMesh *dm)
+
+static void draw_dm_vert_normals(BMEditMesh *em, Scene *scene, Object *ob, DerivedMesh *dm)
{
drawDMNormal_userData data;
data.em = em;
data.normalsize = scene->toolsettings->normalsize;
+ calcDrawDMNormalScale(ob, &data);
+
glBegin(GL_LINES);
dm->foreachMappedVert(dm, draw_dm_vert_normals__mapFunc, &data);
glEnd();
@@ -2852,9 +2902,10 @@ static void draw_em_measure_stats(View3D *v3d, Object *ob, BMEditMesh *em, UnitS
#define DRAW_EM_MEASURE_STATS_FACEAREA() \
if (BM_elem_flag_test(f, BM_ELEM_SELECT)) { \
- mul_v3_fl(vmid, 1.0 / n); \
+ mul_v3_fl(vmid, 1.0f / (float)n); \
if (unit->system) \
- bUnit_AsString(numstr, sizeof(numstr), area * unit->scale_length, \
+ bUnit_AsString(numstr, sizeof(numstr), \
+ (double)(area * unit->scale_length), \
3, unit->system, B_UNIT_LENGTH, do_split, FALSE); \
else \
BLI_snprintf(numstr, sizeof(numstr), conv_float, area); \
@@ -3166,11 +3217,11 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d,
if (me->drawflag & ME_DRAWNORMALS) {
UI_ThemeColor(TH_NORMAL);
- draw_dm_face_normals(em, scene, cageDM);
+ draw_dm_face_normals(em, scene, ob, cageDM);
}
if (me->drawflag & ME_DRAW_VNORMALS) {
UI_ThemeColor(TH_VNORMAL);
- draw_dm_vert_normals(em, scene, cageDM);
+ draw_dm_vert_normals(em, scene, ob, cageDM);
}
if ( (me->drawflag & (ME_DRAWEXTRA_EDGELEN | ME_DRAWEXTRA_FACEAREA | ME_DRAWEXTRA_FACEANG)) &&
@@ -3269,7 +3320,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
else if (dt == OB_WIRE || totface == 0) {
draw_wire = OBDRAW_WIRE_ON; /* draw wire only, no depth buffer stuff */
}
- else if ( (draw_flags & DRAW_FACE_SELECT || (is_obact && ob->mode & OB_MODE_TEXTURE_PAINT)) ||
+ else if ( ((is_obact && ob->mode & OB_MODE_TEXTURE_PAINT)) ||
check_object_draw_texture(scene, v3d, dt))
{
if ( (v3d->flag & V3D_SELECT_OUTLINE) &&
@@ -3306,7 +3357,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
}
}
else if (dt == OB_SOLID) {
- if (is_obact && ob->mode & OB_MODE_WEIGHT_PAINT) {
+ if (is_obact && ob->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT)) {
/* weight paint in solid mode, special case. focus on making the weights clear
* rather than the shading, this is also forced in wire view */
GPU_enable_material(0, NULL);
@@ -3424,39 +3475,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
}
}
else if (dt == OB_PAINT) {
- if (is_obact) {
- if (ob && ob->mode & OB_MODE_WEIGHT_PAINT) {
- /* enforce default material settings */
- GPU_enable_material(0, NULL);
-
- /* but set default spec */
- glColorMaterial(GL_FRONT_AND_BACK, GL_SPECULAR);
- glEnable(GL_COLOR_MATERIAL); /* according manpages needed */
- glColor3ub(120, 120, 120);
- glDisable(GL_COLOR_MATERIAL);
- /* diffuse */
- glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE);
- glEnable(GL_LIGHTING);
- glEnable(GL_COLOR_MATERIAL);
-
- dm->drawMappedFaces(dm, NULL, GPU_enable_material, NULL, me->mpoly,
- DM_DRAW_USE_COLORS | DM_DRAW_ALWAYS_SMOOTH);
- glDisable(GL_COLOR_MATERIAL);
- glDisable(GL_LIGHTING);
-
- GPU_disable_material();
- }
- else if (ob->mode & OB_MODE_VERTEX_PAINT) {
- if (me->mloopcol)
- dm->drawMappedFaces(dm, NULL, GPU_enable_material, NULL, NULL,
- DM_DRAW_USE_COLORS | DM_DRAW_ALWAYS_SMOOTH);
- else {
- glColor3f(1.0f, 1.0f, 1.0f);
- dm->drawMappedFaces(dm, NULL, GPU_enable_material, NULL, NULL,
- DM_DRAW_ALWAYS_SMOOTH);
- }
- }
- }
+ draw_mesh_paint(rv3d, ob, dm, draw_flags);
}
/* set default draw color back for wire or for draw-extra later on */
@@ -3580,8 +3599,8 @@ static int draw_mesh_object(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
finalDM->release(finalDM);
}
else {
- /* don't create boundbox here with mesh_get_bb(), the derived system will make it, puts deformed bb's OK */
- if (me->totpoly <= 4 || ED_view3d_boundbox_clip(rv3d, ob->obmat, (ob->bb) ? ob->bb : me->bb)) {
+ /* ob->bb was set by derived mesh system, do NULL check just to be sure */
+ if (me->totpoly <= 4 || (ob->bb && ED_view3d_boundbox_clip(rv3d, ob->obmat, ob->bb))) {
glsl = draw_glsl_material(scene, ob, v3d, dt);
check_alpha = check_alpha_pass(base);
@@ -3898,10 +3917,10 @@ static int drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *bas
dl = lb->first;
if (dl == NULL) return 1;
- if (dl->nors == NULL) addnormalsDispList(lb);
+ if (dl->nors == NULL) BKE_displist_normals_add(lb);
index3_nors_incr = 0;
- if (displist_has_faces(lb) == 0) {
+ if (BKE_displist_has_faces(lb) == 0) {
if (!render_only) {
draw_index_wire = 0;
drawDispListwire(lb);
@@ -3929,7 +3948,7 @@ static int drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *bas
index3_nors_incr = 1;
}
else {
- if (!render_only || (render_only && displist_has_faces(lb))) {
+ if (!render_only || (render_only && BKE_displist_has_faces(lb))) {
draw_index_wire = 0;
retval = drawDispListwire(lb);
draw_index_wire = 1;
@@ -3944,7 +3963,7 @@ static int drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *bas
dl = lb->first;
if (dl == NULL) return 1;
- if (dl->nors == NULL) addnormalsDispList(lb);
+ if (dl->nors == NULL) BKE_displist_normals_add(lb);
if (draw_glsl_material(scene, ob, v3d, dt)) {
GPU_begin_object_materials(v3d, rv3d, scene, ob, 1, NULL);
@@ -3963,9 +3982,9 @@ static int drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *bas
break;
case OB_MBALL:
- if (is_basis_mball(ob)) {
+ if (BKE_mball_is_basis(ob)) {
lb = &ob->disp;
- if (lb->first == NULL) makeDispListMBall(scene, ob);
+ if (lb->first == NULL) BKE_displist_make_mball(scene, ob);
if (lb->first == NULL) return 1;
if (solid) {
@@ -4266,7 +4285,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
totpart = psys->totpart;
- cfra = BKE_curframe(scene);
+ cfra = BKE_scene_frame_get(scene);
if (draw_as == PART_DRAW_PATH && psys->pathcache == NULL && psys->childcache == NULL)
draw_as = PART_DRAW_DOT;
@@ -5481,7 +5500,7 @@ static void draw_editnurb(Object *ob, Nurb *nurb, int sel)
}
}
- ++index;
+ index++;
nu = nu->next;
}
}
@@ -5510,7 +5529,7 @@ static void drawnurb(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
tekenhandlesN_active(nu);
tekenhandlesN(nu, 0, hide_handles);
}
- ++index;
+ index++;
}
draw_editnurb(ob, nurb, 0);
draw_editnurb(ob, nurb, 1);
@@ -5648,7 +5667,7 @@ static void curve_draw_speed(Scene *scene, Object *ob)
if (icu == NULL || icu->totvert < 2)
return;
- glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE) );
+ glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE));
bglBegin(GL_POINTS);
for (a = 0, bezt = icu->bezt; a < icu->totvert; a++, bezt++) {
@@ -6073,7 +6092,7 @@ static void draw_box(float vec[8][3])
#if 0
static void get_local_bounds(Object *ob, float center[3], float size[3])
{
- BoundBox *bb = object_get_boundbox(ob);
+ BoundBox *bb = BKE_object_boundbox_get(ob);
if (bb == NULL) {
zero_v3(center);
@@ -6134,22 +6153,22 @@ static void draw_bounding_volume(Scene *scene, Object *ob, char type)
BoundBox *bb = NULL;
if (ob->type == OB_MESH) {
- bb = mesh_get_bb(ob);
+ bb = BKE_mesh_boundbox_get(ob);
}
else if (ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT)) {
bb = ob->bb ? ob->bb : ( (Curve *)ob->data)->bb;
}
else if (ob->type == OB_MBALL) {
- if (is_basis_mball(ob)) {
+ if (BKE_mball_is_basis(ob)) {
bb = ob->bb;
if (bb == NULL) {
- makeDispListMBall(scene, ob);
+ BKE_displist_make_mball(scene, ob);
bb = ob->bb;
}
}
}
else if (ob->type == OB_ARMATURE) {
- bb = BKE_armature_get_bb(ob);
+ bb = BKE_armature_boundbox_get(ob);
}
else {
drawcube();
@@ -6168,7 +6187,7 @@ static void drawtexspace(Object *ob)
float vec[8][3], loc[3], size[3];
if (ob->type == OB_MESH) {
- mesh_get_texspace(ob->data, loc, NULL, size);
+ BKE_mesh_texspace_get(ob->data, loc, NULL, size);
}
else if (ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT)) {
Curve *cu = ob->data;
@@ -6216,7 +6235,7 @@ static void drawObjectSelect(Scene *scene, View3D *v3d, ARegion *ar, Base *base)
hasfaces = dm->getNumTessFaces(dm);
}
else {
- hasfaces = displist_has_faces(&ob->disp);
+ hasfaces = BKE_displist_has_faces(&ob->disp);
}
if (hasfaces && ED_view3d_boundbox_clip(rv3d, ob->obmat, ob->bb ? ob->bb : cu->bb)) {
@@ -6231,7 +6250,7 @@ static void drawObjectSelect(Scene *scene, View3D *v3d, ARegion *ar, Base *base)
}
}
else if (ob->type == OB_MBALL) {
- if (is_basis_mball(ob)) {
+ if (BKE_mball_is_basis(ob)) {
if ((base->flag & OB_FROMDUPLI) == 0)
drawDispListwire(&ob->disp);
}
@@ -6291,7 +6310,7 @@ static void drawWireExtra(Scene *scene, RegionView3D *rv3d, Object *ob)
}
}
else if (ob->type == OB_MBALL) {
- if (is_basis_mball(ob)) {
+ if (BKE_mball_is_basis(ob)) {
drawDispListwire(&ob->disp);
}
}
@@ -6416,7 +6435,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
view3d_cached_text_draw_begin();
/* patch? children objects with a timeoffs change the parents. How to solve! */
- /* if ( ((int)ob->ctime) != F_(scene->r.cfra)) where_is_object(scene, ob); */
+ /* if ( ((int)ob->ctime) != F_(scene->r.cfra)) BKE_object_where_is_calc(scene, ob); */
/* draw motion paths (in view space) */
if (ob->mpath && (v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) {
@@ -6526,8 +6545,10 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
zbufoff = 1;
dt = OB_SOLID;
}
- else if (ob->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT))
+
+ if (ob->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT)) {
dt = OB_PAINT;
+ }
glEnable(GL_DEPTH_TEST);
}
@@ -6555,7 +6576,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
/* bad exception, solve this! otherwise outline shows too late */
if (ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT)) {
/* still needed for curves hidden in other layers. depgraph doesnt handle that yet */
- if (ob->disp.first == NULL) makeDispListCurveTypes(scene, ob, 0);
+ if (ob->disp.first == NULL) BKE_displist_make_curveTypes(scene, ob, 0);
}
/* draw outline for selected objects, mesh does itself */
@@ -6628,7 +6649,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
setlinestyle(0);
- if (BKE_font_getselection(ob, &selstart, &selend) && cu->selboxes) {
+ if (BKE_vfont_select_get(ob, &selstart, &selend) && cu->selboxes) {
float selboxw;
cpack(0xffffff);
@@ -6670,7 +6691,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
cu = ob->data;
if (cu->editnurb) {
- ListBase *nurbs = curve_editnurbs(cu);
+ ListBase *nurbs = BKE_curve_editNurbs_get(cu);
drawnurb(scene, v3d, rv3d, base, nurbs->first, dt);
}
else if (dt == OB_BOUNDBOX) {
@@ -6972,7 +6993,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
drawtexspace(ob);
}
if (dtx & OB_DRAWNAME) {
- /* patch for several 3d cards (IBM mostly) that crash on glSelect with text drawing */
+ /* patch for several 3d cards (IBM mostly) that crash on GL_SELECT with text drawing */
/* but, we also don't draw names for sets or duplicators */
if (flag == 0) {
float zero[3] = {0, 0, 0};
@@ -7122,7 +7143,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
for (ct = targets.first; ct; ct = ct->next) {
/* calculate target's matrix */
if (cti->get_target_matrix)
- cti->get_target_matrix(curcon, cob, ct, BKE_curframe(scene));
+ cti->get_target_matrix(curcon, cob, ct, BKE_scene_frame_get(scene));
else
unit_m4(ct->matrix);
@@ -7168,7 +7189,7 @@ static void bbs_obmode_mesh_verts(Object *ob, DerivedMesh *dm, int offset)
MVert *mvert = me->mvert;
data.mvert = mvert;
data.offset = (void *)(intptr_t) offset;
- glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE) );
+ glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE));
bglBegin(GL_POINTS);
dm->foreachMappedVert(dm, bbs_obmode_mesh_verts__mapFunc, &data);
bglEnd();
@@ -7191,7 +7212,7 @@ static void bbs_mesh_verts(BMEditMesh *em, DerivedMesh *dm, int offset)
{
void *ptrs[2] = {(void *)(intptr_t) offset, em};
- glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE) );
+ glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE));
bglBegin(GL_POINTS);
dm->foreachMappedVert(dm, bbs_mesh_verts__mapFunc, ptrs);
bglEnd();
diff --git a/source/blender/editors/space_view3d/drawvolume.c b/source/blender/editors/space_view3d/drawvolume.c
index 0e520a511fe..2bb08a4b9b4 100644
--- a/source/blender/editors/space_view3d/drawvolume.c
+++ b/source/blender/editors/space_view3d/drawvolume.c
@@ -47,7 +47,6 @@
#include "BKE_curve.h"
#include "BKE_constraint.h" // for the get_constraint_target function
#include "BKE_DerivedMesh.h"
-#include "BKE_deform.h"
#include "BKE_displist.h"
#include "BKE_effect.h"
#include "BKE_font.h"
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 72b67c2a716..28fd2c8bc74 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -1016,7 +1016,7 @@ static void space_view3d_listener(struct ScrArea *sa, struct wmNotifier *wmn)
break;
}
- // removed since BKE_image_user_calc_frame is now called in draw_bgpic because screen_ops doesnt call the notifier.
+ // removed since BKE_image_user_frame_calc is now called in draw_bgpic because screen_ops doesnt call the notifier.
#if 0
if (wmn->category == NC_SCENE && wmn->data == ND_FRAME) {
View3D *v3d = area->spacedata.first;
@@ -1025,7 +1025,7 @@ static void space_view3d_listener(struct ScrArea *sa, struct wmNotifier *wmn)
for (; bgpic; bgpic = bgpic->next) {
if (bgpic->ima) {
Scene *scene = wmn->reference;
- BKE_image_user_calc_frame(&bgpic->iuser, scene->r.cfra, 0);
+ BKE_image_user_frame_calc(&bgpic->iuser, scene->r.cfra, 0);
}
}
}
@@ -1071,7 +1071,7 @@ static int view3d_context(const bContext *C, const char *member, bContextDataRes
for (base = scene->base.first; base; base = base->next) {
if ((base->flag & SELECT) && (base->lay & lay)) {
if ((base->object->restrictflag & OB_RESTRICT_VIEW) == 0) {
- if (0 == object_is_libdata(base->object)) {
+ if (0 == BKE_object_is_libdata(base->object)) {
if (selected_editable_objects)
CTX_data_id_list_add(result, &base->object->id);
else
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index c3ff00e3c82..4a135f91d91 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -83,8 +83,8 @@
/* ******************* view3d space & buttons ************** */
-#define B_NOP 1
-#define B_REDR 2
+#define B_NOP 1
+#define B_REDR 2
#define B_OBJECTPANELMEDIAN 1008
/* temporary struct for storing transform properties */
@@ -211,7 +211,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
BPoint *bp;
BezTriple *bezt;
int a;
- ListBase *nurbs = curve_editnurbs(cu);
+ ListBase *nurbs = BKE_curve_editNurbs_get(cu);
StructRNA *seltype = NULL;
void *selp = NULL;
@@ -333,7 +333,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
but = uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Y:", 0, yi -= buth, 200, buth,
&(tfp->ve_median[1]), -lim, lim, 10, RNA_TRANSLATION_PREC_DEFAULT, "");
uiButSetUnitType(but, PROP_UNIT_LENGTH);
- but = uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Z:",0, yi -= buth, 200, buth,
+ but = uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Z:", 0, yi -= buth, 200, buth,
&(tfp->ve_median[2]), -lim, lim, 10, RNA_TRANSLATION_PREC_DEFAULT, "");
uiButSetUnitType(but, PROP_UNIT_LENGTH);
@@ -509,7 +509,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
BPoint *bp;
BezTriple *bezt;
int a;
- ListBase *nurbs = curve_editnurbs(cu);
+ ListBase *nurbs = BKE_curve_editNurbs_get(cu);
const float scale_w = compute_scale_factor(ve_median[4], median[4]);
nu = nurbs->first;
@@ -571,8 +571,8 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
bp++;
}
}
- test2DNurb(nu);
- testhandlesNurb(nu); /* test for bezier too */
+ BKE_nurb_test2D(nu);
+ BKE_nurb_handles_test(nu); /* test for bezier too */
nu = nu->next;
}
@@ -595,7 +595,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
}
else {
bp->weight = scale_w > 0.0f ? bp->weight * scale_w :
- 1.0f + ((1.0f - bp->weight) * scale_w);
+ 1.0f + ((1.0f - bp->weight) * scale_w);
CLAMP(bp->weight, 0.0f, 1.0f);
}
}
@@ -939,7 +939,7 @@ static void v3d_posearmature_buts(uiLayout *layout, Object *ob)
PointerRNA pchanptr;
uiLayout *col;
- pchan = get_active_posechannel(ob);
+ pchan = BKE_pose_channel_active(ob);
if (!pchan) {
uiItemL(layout, IFACE_("No Bone Active"), ICON_NONE);
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index ec383e1dbdb..682d8950440 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -102,7 +102,7 @@ static void star_stuff_init_func(void)
glPointSize(1.0);
glBegin(GL_POINTS);
}
-static void star_stuff_vertex_func(float*i)
+static void star_stuff_vertex_func(float *i)
{
glVertex3fv(i);
}
@@ -313,15 +313,15 @@ static void drawgrid(UnitSettings *unit, ARegion *ar, View3D *v3d, const char **
double scalar = bUnit_GetScaler(usys, i);
dx_scalar = dx * scalar / unit->scale_length;
- if (dx_scalar < (GRID_MIN_PX * 2))
+ if (dx_scalar < (GRID_MIN_PX * 2.0))
continue;
/* Store the smallest drawn grid size units name so users know how big each grid cell is */
if (*grid_unit == NULL) {
*grid_unit = bUnit_GetNameDisplay(usys, i);
- rv3d->gridview = (scalar * v3d->grid) / unit->scale_length;
+ rv3d->gridview = (float)((scalar * v3d->grid) / (double)unit->scale_length);
}
- blend_fac = 1 - ((GRID_MIN_PX * 2) / dx_scalar);
+ blend_fac = 1.0f - ((GRID_MIN_PX * 2.0f) / (float)dx_scalar);
/* tweak to have the fade a bit nicer */
blend_fac = (blend_fac * blend_fac) * 2.0f;
@@ -355,7 +355,7 @@ static void drawgrid(UnitSettings *unit, ARegion *ar, View3D *v3d, const char **
}
}
else { // start blending out
- UI_ThemeColorBlend(TH_BACK, TH_GRID, dx / (GRID_MIN_PX * 6));
+ UI_ThemeColorBlend(TH_BACK, TH_GRID, dx / (GRID_MIN_PX * 6.0f));
drawgrid_draw(ar, wx, wy, x, y, dx);
UI_ThemeColor(TH_GRID);
@@ -363,7 +363,7 @@ static void drawgrid(UnitSettings *unit, ARegion *ar, View3D *v3d, const char **
}
}
else { // start blending out (GRID_MIN_PX < dx < (GRID_MIN_PX*10))
- UI_ThemeColorBlend(TH_BACK, TH_GRID, dx / (GRID_MIN_PX * 6));
+ UI_ThemeColorBlend(TH_BACK, TH_GRID, dx / (GRID_MIN_PX * 6.0f));
drawgrid_draw(ar, wx, wy, x, y, dx);
UI_ThemeColor(TH_GRID);
@@ -716,7 +716,7 @@ static void draw_rotation_guide(RegionView3D *rv3d)
glColor4fv(color);
glBegin(GL_LINE_LOOP);
for (i = 0, angle = 0.f; i < ROT_AXIS_DETAIL; ++i, angle += step) {
- float p[3] = {s * cosf(angle), s * sinf(angle), 0.0f};
+ float p[3] = {s *cosf(angle), s * sinf(angle), 0.0f};
if (!upright) {
mul_qt_v3(q, p);
@@ -847,7 +847,7 @@ static void draw_selected_name(Scene *scene, Object *ob)
short offset = 30;
/* get name of marker on current frame (if available) */
- markern = scene_find_marker_name(scene, CFRA);
+ markern = BKE_scene_find_marker_name(scene, CFRA);
/* check if there is an object */
if (ob) {
@@ -910,7 +910,7 @@ static void draw_selected_name(Scene *scene, Object *ob)
}
/* color depends on whether there is a keyframe */
- if (id_frame_has_keyframe((ID *)ob, /*BKE_curframe(scene)*/ (float)(CFRA), ANIMFILTER_KEYS_LOCAL))
+ if (id_frame_has_keyframe((ID *)ob, /*BKE_scene_frame_get(scene)*/ (float)(CFRA), ANIMFILTER_KEYS_LOCAL))
UI_ThemeColor(TH_VERTEX_SELECT);
else
UI_ThemeColor(TH_TEXT_HI);
@@ -939,21 +939,21 @@ static void view3d_camera_border(Scene *scene, ARegion *ar, View3D *v3d, RegionV
rctf rect_view, rect_camera;
/* get viewport viewplane */
- camera_params_init(&params);
- camera_params_from_view3d(&params, v3d, rv3d);
+ BKE_camera_params_init(&params);
+ BKE_camera_params_from_view3d(&params, v3d, rv3d);
if (no_zoom)
params.zoom = 1.0f;
- camera_params_compute_viewplane(&params, ar->winx, ar->winy, 1.0f, 1.0f);
+ BKE_camera_params_compute_viewplane(&params, ar->winx, ar->winy, 1.0f, 1.0f);
rect_view = params.viewplane;
/* get camera viewplane */
- camera_params_init(&params);
- camera_params_from_object(&params, v3d->camera);
+ BKE_camera_params_init(&params);
+ BKE_camera_params_from_object(&params, v3d->camera);
if (no_shift) {
params.shiftx = 0.0f;
params.shifty = 0.0f;
}
- camera_params_compute_viewplane(&params, scene->r.xsch, scene->r.ysch, scene->r.xasp, scene->r.yasp);
+ BKE_camera_params_compute_viewplane(&params, scene->r.xsch, scene->r.ysch, scene->r.xasp, scene->r.yasp);
rect_camera = params.viewplane;
/* get camera border within viewport */
@@ -1226,7 +1226,7 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d)
* assume and square sensor and only use sensor_x */
float sizex = scene->r.xsch * scene->r.xasp;
float sizey = scene->r.ysch * scene->r.yasp;
- int sensor_fit = camera_sensor_fit(ca->sensor_fit, sizex, sizey);
+ int sensor_fit = BKE_camera_sensor_fit(ca->sensor_fit, sizex, sizey);
float sensor_x = ca->sensor_x;
float sensor_y = (ca->sensor_fit == CAMERA_SENSOR_FIT_AUTO) ? ca->sensor_x : ca->sensor_y;
@@ -1544,7 +1544,7 @@ static void draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d, int foreground)
ima = bgpic->ima;
if (ima == NULL)
continue;
- BKE_image_user_calc_frame(&bgpic->iuser, CFRA, 0);
+ BKE_image_user_frame_calc(&bgpic->iuser, CFRA, 0);
ibuf = BKE_image_get_ibuf(ima, &bgpic->iuser);
}
else {
@@ -1552,7 +1552,7 @@ static void draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d, int foreground)
if (bgpic->flag & V3D_BGPIC_CAMERACLIP) {
if (scene->camera)
- clip = object_get_movieclip(scene, scene->camera, 1);
+ clip = BKE_object_movieclip_get(scene, scene->camera, 1);
}
else clip = bgpic->clip;
@@ -1699,7 +1699,7 @@ static void draw_bgpics(Scene *scene, ARegion *ar, View3D *v3d, int foreground)
}
}
else {
- draw_bgpic(scene, ar, v3d, foreground);
+ draw_bgpic(scene, ar, v3d, foreground);
}
}
@@ -1861,12 +1861,12 @@ static void draw_dupli_objects_color(Scene *scene, ARegion *ar, View3D *v3d, Bas
* offset feature (used in group-duplicate.blend but no longer works in 2.5)
* so for now it should be ok to - campbell */
- if (/* if this is the last no need to make a displist */
+ if ( /* if this is the last no need to make a displist */
(dob_next == NULL || dob_next->ob != dob->ob) ||
/* lamp drawing messes with matrices, could be handled smarter... but this works */
(dob->ob->type == OB_LAMP) ||
(dob->type == OB_DUPLIGROUP && dob->animated) ||
- !(bb_tmp = object_get_boundbox(dob->ob)))
+ !(bb_tmp = BKE_object_boundbox_get(dob->ob)))
{
// printf("draw_dupli_objects_color: skipping displist for %s\n", dob->ob->id.name+2);
use_displist = 0;
@@ -1876,7 +1876,7 @@ static void draw_dupli_objects_color(Scene *scene, ARegion *ar, View3D *v3d, Bas
bb = *bb_tmp; /* must make a copy */
/* disable boundbox check for list creation */
- object_boundbox_flag(dob->ob, OB_BB_DISABLED, 1);
+ BKE_object_boundbox_flag(dob->ob, OB_BB_DISABLED, 1);
/* need this for next part of code */
unit_m4(dob->ob->obmat); /* obmat gets restored */
@@ -1886,7 +1886,7 @@ static void draw_dupli_objects_color(Scene *scene, ARegion *ar, View3D *v3d, Bas
glEndList();
use_displist = 1;
- object_boundbox_flag(dob->ob, OB_BB_DISABLED, 0);
+ BKE_object_boundbox_flag(dob->ob, OB_BB_DISABLED, 0);
}
}
if (use_displist) {
@@ -2043,7 +2043,7 @@ void draw_depth_gpencil(Scene *scene, ARegion *ar, View3D *v3d)
RegionView3D *rv3d = ar->regiondata;
setwinmatrixview3d(ar, v3d, NULL); /* 0= no pick rect */
- setviewmatrixview3d(scene, v3d, rv3d); /* note: calls where_is_object for camera... */
+ setviewmatrixview3d(scene, v3d, rv3d); /* note: calls BKE_object_where_is_calc for camera... */
mult_m4_m4m4(rv3d->persmat, rv3d->winmat, rv3d->viewmat);
invert_m4_m4(rv3d->persinv, rv3d->persmat);
@@ -2078,7 +2078,7 @@ void draw_depth(Scene *scene, ARegion *ar, View3D *v3d, int (*func)(void *))
U.obcenter_dia = 0;
setwinmatrixview3d(ar, v3d, NULL); /* 0= no pick rect */
- setviewmatrixview3d(scene, v3d, rv3d); /* note: calls where_is_object for camera... */
+ setviewmatrixview3d(scene, v3d, rv3d); /* note: calls BKE_object_where_is_calc for camera... */
mult_m4_m4m4(rv3d->persmat, rv3d->winmat, rv3d->viewmat);
invert_m4_m4(rv3d->persinv, rv3d->persmat);
@@ -2297,7 +2297,7 @@ CustomDataMask ED_view3d_datamask(Scene *scene, View3D *v3d)
{
mask |= CD_MASK_MTFACE | CD_MASK_MCOL;
- if (scene_use_new_shading_nodes(scene)) {
+ if (BKE_scene_use_new_shading_nodes(scene)) {
if (v3d->drawtype == OB_MATERIAL)
mask |= CD_MASK_ORCO;
}
@@ -2367,7 +2367,7 @@ void ED_view3d_update_viewmat(Scene *scene, View3D *v3d, ARegion *ar, float view
if (viewmat)
copy_m4_m4(rv3d->viewmat, viewmat);
else
- setviewmatrixview3d(scene, v3d, rv3d); /* note: calls where_is_object for camera... */
+ setviewmatrixview3d(scene, v3d, rv3d); /* note: calls BKE_object_where_is_calc for camera... */
/* update utilitity matrices */
mult_m4_m4m4(rv3d->persmat, rv3d->winmat, rv3d->viewmat);
@@ -2556,7 +2556,7 @@ void ED_view3d_draw_offscreen(Scene *scene, View3D *v3d, ARegion *ar,
/* transp and X-ray afterdraw stuff */
if (v3d->afterdraw_transp.first) view3d_draw_transp(scene, ar, v3d);
- if (v3d->afterdraw_xray.first) view3d_draw_xray(scene, ar, v3d, 1); // clears zbuffer if it is used!
+ if (v3d->afterdraw_xray.first) view3d_draw_xray(scene, ar, v3d, 1); /* clears zbuffer if it is used! */
if (v3d->afterdraw_xraytransp.first) view3d_draw_xraytransp(scene, ar, v3d, 1);
if (rv3d->rflag & RV3D_CLIPPING)
@@ -2612,10 +2612,10 @@ ImBuf *ED_view3d_draw_offscreen_imbuf(Scene *scene, View3D *v3d, ARegion *ar,
if (rv3d->persp == RV3D_CAMOB && v3d->camera) {
CameraParams params;
- camera_params_init(&params);
- camera_params_from_object(&params, v3d->camera);
- camera_params_compute_viewplane(&params, sizex, sizey, scene->r.xasp, scene->r.yasp);
- camera_params_compute_matrix(&params);
+ BKE_camera_params_init(&params);
+ BKE_camera_params_from_object(&params, v3d->camera);
+ BKE_camera_params_compute_viewplane(&params, sizex, sizey, scene->r.xasp, scene->r.yasp);
+ BKE_camera_params_compute_matrix(&params);
ED_view3d_draw_offscreen(scene, v3d, ar, sizex, sizey, NULL, params.winmat, draw_background);
}
@@ -2673,10 +2673,10 @@ ImBuf *ED_view3d_draw_offscreen_imbuf_simple(Scene *scene, Object *camera, int w
{
CameraParams params;
- camera_params_init(&params);
- camera_params_from_object(&params, v3d.camera);
- camera_params_compute_viewplane(&params, width, height, scene->r.xasp, scene->r.yasp);
- camera_params_compute_matrix(&params);
+ BKE_camera_params_init(&params);
+ BKE_camera_params_from_object(&params, v3d.camera);
+ BKE_camera_params_compute_viewplane(&params, width, height, scene->r.xasp, scene->r.yasp);
+ BKE_camera_params_compute_matrix(&params);
copy_m4_m4(rv3d.winmat, params.winmat);
v3d.near = params.clipsta;
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index 082e7676daa..60a0d3bf12b 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -56,6 +56,8 @@
#include "BKE_report.h"
#include "BKE_scene.h"
#include "BKE_screen.h"
+#include "BKE_action.h"
+#include "BKE_armature.h"
#include "BKE_depsgraph.h" /* for ED_view3d_camera_lock_sync */
@@ -68,11 +70,13 @@
#include "RNA_access.h"
#include "RNA_define.h"
+#include "ED_armature.h"
#include "ED_particle.h"
#include "ED_screen.h"
#include "ED_transform.h"
#include "ED_mesh.h"
#include "ED_view3d.h"
+#include "ED_sculpt.h"
#include "PIL_time.h" /* smoothview */
@@ -120,9 +124,9 @@ int ED_view3d_camera_lock_sync(View3D *v3d, RegionView3D *rv3d)
mult_m4_m4m4(parent_mat, diff_mat, root_parent->obmat);
- object_tfm_protected_backup(root_parent, &obtfm);
- object_apply_mat4(root_parent, parent_mat, TRUE, FALSE);
- object_tfm_protected_restore(root_parent, &obtfm, root_parent->protectflag);
+ BKE_object_tfm_protected_backup(root_parent, &obtfm);
+ BKE_object_apply_mat4(root_parent, parent_mat, TRUE, FALSE);
+ BKE_object_tfm_protected_restore(root_parent, &obtfm, root_parent->protectflag);
ob_update = v3d->camera;
while (ob_update) {
@@ -132,9 +136,9 @@ int ED_view3d_camera_lock_sync(View3D *v3d, RegionView3D *rv3d)
}
}
else {
- object_tfm_protected_backup(v3d->camera, &obtfm);
+ BKE_object_tfm_protected_backup(v3d->camera, &obtfm);
ED_view3d_to_object(v3d->camera, rv3d->ofs, rv3d->viewquat, rv3d->dist);
- object_tfm_protected_restore(v3d->camera, &obtfm, v3d->camera->protectflag);
+ BKE_object_tfm_protected_restore(v3d->camera, &obtfm, v3d->camera->protectflag);
DAG_id_tag_update(&v3d->camera->id, OB_RECALC_OB);
WM_main_add_notifier(NC_OBJECT | ND_TRANSFORM, v3d->camera);
@@ -695,16 +699,17 @@ static void viewrotate_apply(ViewOpsData *vod, int x, int y)
if (dot_v3v3(xaxis, m_inv[0]) < 0) {
negate_v3(xaxis);
}
- fac = angle_normalized_v3v3(zvec_global, m_inv[2]) / M_PI;
+ fac = angle_normalized_v3v3(zvec_global, m_inv[2]) / (float)M_PI;
fac = fabsf(fac - 0.5f) * 2;
fac = fac * fac;
interp_v3_v3v3(xaxis, xaxis, m_inv[0], fac);
}
- else
-#endif
- {
+ else {
copy_v3_v3(xaxis, m_inv[0]);
}
+#else
+ copy_v3_v3(xaxis, m_inv[0]);
+#endif
/* Determine the direction of the x vector (for rotating up and down) */
/* This can likely be computed directly from the quaternion. */
@@ -981,12 +986,12 @@ void VIEW3D_OT_rotate(wmOperatorType *ot)
/* NDOF utility functions
* (should these functions live in this file?)
*/
-float ndof_to_axis_angle(struct wmNDOFMotionData*ndof, float axis[3])
+float ndof_to_axis_angle(struct wmNDOFMotionData *ndof, float axis[3])
{
return ndof->dt * normalize_v3_v3(axis, ndof->rvec);
}
-void ndof_to_quat(struct wmNDOFMotionData*ndof, float q[4])
+void ndof_to_quat(struct wmNDOFMotionData *ndof, float q[4])
{
float axis[3];
float angle;
@@ -1005,8 +1010,8 @@ static int ndof_orbit_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event
return OPERATOR_CANCELLED;
else {
View3D *v3d = CTX_wm_view3d(C);
- RegionView3D*rv3d = CTX_wm_region_view3d(C);
- wmNDOFMotionData*ndof = (wmNDOFMotionData *) event->customdata;
+ RegionView3D *rv3d = CTX_wm_region_view3d(C);
+ wmNDOFMotionData *ndof = (wmNDOFMotionData *) event->customdata;
ED_view3d_camera_lock_init(v3d, rv3d);
@@ -1157,8 +1162,8 @@ static int ndof_pan_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event)
return OPERATOR_CANCELLED;
else {
View3D *v3d = CTX_wm_view3d(C);
- RegionView3D*rv3d = CTX_wm_region_view3d(C);
- wmNDOFMotionData*ndof = (wmNDOFMotionData *) event->customdata;
+ RegionView3D *rv3d = CTX_wm_region_view3d(C);
+ wmNDOFMotionData *ndof = (wmNDOFMotionData *) event->customdata;
ED_view3d_camera_lock_init(v3d, rv3d);
@@ -1554,7 +1559,9 @@ static void viewzoom_apply(ViewOpsData *vod, int x, int y, const short viewzoom,
if (!use_cam_zoom) {
if (zfac != 1.0f && zfac * vod->rv3d->dist > 0.001f * vod->grid &&
zfac * vod->rv3d->dist < 10.0f * vod->far)
+ {
view_zoom_mouseloc(vod->ar, zfac, vod->oldx, vod->oldy);
+ }
}
/* these limits were in old code too */
@@ -2064,7 +2071,7 @@ static int view3d_all_exec(bContext *C, wmOperator *op) /* was view3d_home() in
continue;
}
- minmax_object(base->object, min, max);
+ BKE_object_minmax(base->object, min, max);
}
}
if (!onedone) {
@@ -2196,6 +2203,10 @@ static int viewselected_exec(bContext *C, wmOperator *UNUSED(op))
else if (ob && (ob->mode & OB_MODE_PARTICLE_EDIT)) {
ok = PE_minmax(scene, min, max);
}
+ else if (ob && (ob->mode & OB_MODE_SCULPT)) {
+ ok = ED_sculpt_minmax(C, min, max);
+ ok_dist = 0; /* don't zoom */
+ }
else {
Base *base;
for (base = FIRSTBASE; base; base = base->next) {
@@ -2206,8 +2217,8 @@ static int viewselected_exec(bContext *C, wmOperator *UNUSED(op))
}
/* account for duplis */
- if (minmax_object_duplis(scene, base->object, min, max) == 0)
- minmax_object(base->object, min, max); /* use if duplis not found */
+ if (BKE_object_minmax_dupli(scene, base->object, min, max) == 0)
+ BKE_object_minmax(base->object, min, max); /* use if duplis not found */
ok = 1;
}
@@ -2219,18 +2230,24 @@ static int viewselected_exec(bContext *C, wmOperator *UNUSED(op))
sub_v3_v3v3(afm, max, min);
size = MAX3(afm[0], afm[1], afm[2]);
- if (!rv3d->is_persp) {
- if (size < 0.0001f) { /* if its a sinble point. don't even re-scale */
- ok_dist = 0;
- }
- else {
- /* perspective should be a bit farther away to look nice */
- size *= 0.7f;
+ if (ok_dist) {
+ /* fix up zoom distance if needed */
+
+ if (rv3d->is_persp) {
+ if (size <= v3d->near * 1.5f) {
+ /* do not zoom closer than the near clipping plane */
+ size = v3d->near * 1.5f;
+ }
}
- }
- else {
- if (size <= v3d->near * 1.5f) {
- size = v3d->near * 1.5f;
+ else { /* ortho */
+ if (size < 0.0001f) {
+ /* bounding box was a single point so do not zoom */
+ ok_dist = 0;
+ }
+ else {
+ /* adjust zoom so it looks nicer */
+ size *= 0.7f;
+ }
}
}
@@ -2248,7 +2265,7 @@ static int viewselected_exec(bContext *C, wmOperator *UNUSED(op))
if (rv3d->persp == RV3D_CAMOB && !ED_view3d_camera_lock_check(v3d, rv3d)) {
rv3d->persp = RV3D_PERSP;
- smooth_view(C, v3d, ar, v3d->camera, NULL, new_ofs, NULL, &new_dist, NULL);
+ smooth_view(C, v3d, ar, v3d->camera, NULL, new_ofs, NULL, ok_dist ? &new_dist : NULL, NULL);
}
else {
smooth_view(C, v3d, ar, NULL, NULL, new_ofs, NULL, ok_dist ? &new_dist : NULL, NULL);
@@ -2277,6 +2294,89 @@ void VIEW3D_OT_view_selected(wmOperatorType *ot)
ot->flag = 0;
}
+static int view_lock_clear_exec(bContext *C, wmOperator *UNUSED(op))
+{
+ View3D *v3d = CTX_wm_view3d(C);
+
+ if (v3d) {
+ ED_view3D_lock_clear(v3d);
+
+ WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d);
+
+ return OPERATOR_FINISHED;
+ }
+ else {
+ return OPERATOR_CANCELLED;
+ }
+}
+
+void VIEW3D_OT_view_lock_clear(wmOperatorType *ot)
+{
+
+ /* identifiers */
+ ot->name = "View Lock Clear";
+ ot->description = "Clear all view locking";
+ ot->idname = "VIEW3D_OT_view_lock_clear";
+
+ /* api callbacks */
+ ot->exec = view_lock_clear_exec;
+ ot->poll = ED_operator_region_view3d_active;
+
+ /* flags */
+ ot->flag = 0;
+}
+
+static int view_lock_to_active_exec(bContext *C, wmOperator *UNUSED(op))
+{
+ View3D *v3d = CTX_wm_view3d(C);
+ Object *obact = CTX_data_active_object(C);
+
+ if (v3d) {
+
+ ED_view3D_lock_clear(v3d);
+
+ v3d->ob_centre = obact; /* can be NULL */
+
+ if (obact && obact->type == OB_ARMATURE) {
+ if (obact->mode & OB_MODE_POSE) {
+ bPoseChannel *pcham_act = BKE_pose_channel_active(obact);
+ if (pcham_act) {
+ BLI_strncpy(v3d->ob_centre_bone, pcham_act->name, sizeof(v3d->ob_centre_bone));
+ }
+ }
+ else {
+ EditBone *ebone_act = ((bArmature *)obact->data)->act_edbone;
+ if (ebone_act) {
+ BLI_strncpy(v3d->ob_centre_bone, ebone_act->name, sizeof(v3d->ob_centre_bone));
+ }
+ }
+ }
+
+ WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d);
+
+ return OPERATOR_FINISHED;
+ }
+ else {
+ return OPERATOR_CANCELLED;
+ }
+}
+
+void VIEW3D_OT_view_lock_to_active(wmOperatorType *ot)
+{
+
+ /* identifiers */
+ ot->name = "View Lock to Active";
+ ot->description = "Lock the view to the active object/bone";
+ ot->idname = "VIEW3D_OT_view_lock_to_active";
+
+ /* api callbacks */
+ ot->exec = view_lock_to_active_exec;
+ ot->poll = ED_operator_region_view3d_active;
+
+ /* flags */
+ ot->flag = 0;
+}
+
static int viewcenter_cursor_exec(bContext *C, wmOperator *UNUSED(op))
{
View3D *v3d = CTX_wm_view3d(C);
@@ -2837,7 +2937,7 @@ static int viewnumpad_exec(bContext *C, wmOperator *op)
v3d->camera = ob;
if (v3d->camera == NULL)
- v3d->camera = scene_find_camera(scene);
+ v3d->camera = BKE_scene_camera_find(scene);
/* couldnt find any useful camera, bail out */
if (v3d->camera == NULL)
@@ -2985,10 +3085,10 @@ static int viewpan_exec(bContext *C, wmOperator *op)
pandir = RNA_enum_get(op->ptr, "type");
initgrabz(rv3d, 0.0, 0.0, 0.0);
- if (pandir == V3D_VIEW_PANRIGHT) { mval_f[0] = -32.0f; ED_view3d_win_to_delta(ar, mval_f, vec); }
- else if (pandir == V3D_VIEW_PANLEFT) { mval_f[0] = 32.0f; ED_view3d_win_to_delta(ar, mval_f, vec); }
- else if (pandir == V3D_VIEW_PANUP) { mval_f[1] = -25.0f; ED_view3d_win_to_delta(ar, mval_f, vec); }
- else if (pandir == V3D_VIEW_PANDOWN) { mval_f[1] = 25.0f; ED_view3d_win_to_delta(ar, mval_f, vec); }
+ if (pandir == V3D_VIEW_PANRIGHT) { mval_f[0] = -32.0f; ED_view3d_win_to_delta(ar, mval_f, vec); }
+ else if (pandir == V3D_VIEW_PANLEFT) { mval_f[0] = 32.0f; ED_view3d_win_to_delta(ar, mval_f, vec); }
+ else if (pandir == V3D_VIEW_PANUP) { mval_f[1] = -25.0f; ED_view3d_win_to_delta(ar, mval_f, vec); }
+ else if (pandir == V3D_VIEW_PANDOWN) { mval_f[1] = 25.0f; ED_view3d_win_to_delta(ar, mval_f, vec); }
add_v3_v3(rv3d->ofs, vec);
if (rv3d->viewlock & RV3D_BOXVIEW)
@@ -3080,11 +3180,11 @@ static int background_image_add_invoke(bContext *C, wmOperator *op, wmEvent *UNU
char path[FILE_MAX];
RNA_string_get(op->ptr, "filepath", path);
- ima = BKE_add_image_file(path);
+ ima = BKE_image_load_exists(path);
}
else if (RNA_struct_property_is_set(op->ptr, "name")) {
RNA_string_get(op->ptr, "name", name);
- ima = (Image *)find_id("IM", name);
+ ima = (Image *)BKE_libblock_find_name(ID_IM, name);
}
bgpic = background_image_add(C);
@@ -3646,8 +3746,8 @@ void ED_view3d_from_object(Object *ob, float ofs[3], float quat[4], float *dist,
if (lens) {
CameraParams params;
- camera_params_init(&params);
- camera_params_from_object(&params, ob);
+ BKE_camera_params_init(&params);
+ BKE_camera_params_from_object(&params, ob);
*lens = params.lens;
}
}
@@ -3657,7 +3757,7 @@ void ED_view3d_to_object(Object *ob, const float ofs[3], const float quat[4], co
{
float mat[4][4];
ED_view3d_to_m4(mat, ofs, quat, dist);
- object_apply_mat4(ob, mat, TRUE, TRUE);
+ BKE_object_apply_mat4(ob, mat, TRUE, TRUE);
}
BGpic *ED_view3D_background_image_new(View3D *v3d)
@@ -3695,3 +3795,11 @@ void ED_view3D_background_image_clear(View3D *v3d)
bgpic = next_bgpic;
}
}
+
+void ED_view3D_lock_clear(View3D *v3d)
+{
+ v3d->ob_centre = NULL;
+ v3d->ob_centre_bone[0] = '\0';
+ v3d->ob_centre_cursor = FALSE;
+ v3d->flag2 &= ~V3D_LOCK_CAMERA;
+}
diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c
index 5b6624889c8..2dab26e7781 100644
--- a/source/blender/editors/space_view3d/view3d_fly.c
+++ b/source/blender/editors/space_view3d/view3d_fly.c
@@ -174,7 +174,7 @@ typedef struct FlyInfo {
unsigned char use_freelook;
int mval[2]; /* latest 2D mouse values */
- wmNDOFMotionData*ndof; /* latest 3D mouse values */
+ wmNDOFMotionData *ndof; /* latest 3D mouse values */
/* fly state state */
float speed; /* the speed the view is moving per redraw */
@@ -366,9 +366,9 @@ static int initFlyInfo(bContext *C, FlyInfo *fly, wmOperator *op, wmEvent *event
/* store the original camera loc and rot */
/* TODO. axis angle etc */
- fly->obtfm = object_tfm_backup(ob_back);
+ fly->obtfm = BKE_object_tfm_backup(ob_back);
- where_is_object(fly->scene, fly->v3d->camera);
+ BKE_object_where_is_calc(fly->scene, fly->v3d->camera);
negate_v3_v3(fly->rv3d->ofs, fly->v3d->camera->obmat[3]);
fly->rv3d->dist = 0.0;
@@ -429,7 +429,7 @@ static int flyEnd(bContext *C, FlyInfo *fly)
ob_back = (fly->root_parent) ? fly->root_parent : fly->v3d->camera;
/* store the original camera loc and rot */
- object_tfm_restore(ob_back, fly->obtfm);
+ BKE_object_tfm_restore(ob_back, fly->obtfm);
DAG_id_tag_update(&ob_back->id, OB_RECALC_OB);
}
@@ -690,7 +690,7 @@ static void move_camera(bContext *C, RegionView3D *rv3d, FlyInfo *fly, int orien
{
/* we are in camera view so apply the view ofs and quat to the view matrix and set the camera to the view */
- View3D*v3d = fly->v3d;
+ View3D *v3d = fly->v3d;
Scene *scene = fly->scene;
ID *id_key;
@@ -709,9 +709,9 @@ static void move_camera(bContext *C, RegionView3D *rv3d, FlyInfo *fly, int orien
ED_view3d_to_m4(view_mat, rv3d->ofs, rv3d->viewquat, rv3d->dist);
mult_m4_m4m4(diff_mat, view_mat, prev_view_imat);
mult_m4_m4m4(parent_mat, diff_mat, fly->root_parent->obmat);
- object_apply_mat4(fly->root_parent, parent_mat, TRUE, FALSE);
+ BKE_object_apply_mat4(fly->root_parent, parent_mat, TRUE, FALSE);
- // where_is_object(scene, fly->root_parent);
+ // BKE_object_where_is_calc(scene, fly->root_parent);
ob_update = v3d->camera->parent;
while (ob_update) {
@@ -724,7 +724,7 @@ static void move_camera(bContext *C, RegionView3D *rv3d, FlyInfo *fly, int orien
else {
float view_mat[4][4];
ED_view3d_to_m4(view_mat, rv3d->ofs, rv3d->viewquat, rv3d->dist);
- object_apply_mat4(v3d->camera, view_mat, TRUE, FALSE);
+ BKE_object_apply_mat4(v3d->camera, view_mat, TRUE, FALSE);
id_key = &v3d->camera->id;
}
@@ -1031,7 +1031,7 @@ static int flyApply_ndof(bContext *C, FlyInfo *fly)
/* shorthand for oft-used variables */
wmNDOFMotionData *ndof = fly->ndof;
const float dt = ndof->dt;
- RegionView3D*rv3d = fly->rv3d;
+ RegionView3D *rv3d = fly->rv3d;
const int flag = U.ndof_flag;
#if 0
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c
index ab4eca2e303..a68caeb0719 100644
--- a/source/blender/editors/space_view3d/view3d_header.c
+++ b/source/blender/editors/space_view3d/view3d_header.c
@@ -294,15 +294,15 @@ static char *view3d_modeselect_pup(Scene *scene)
if (!((ID *)ob->data)->lib) {
/* if active object is editable */
- if (ELEM6(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_MBALL, OB_LATTICE)) {
- str += modeselect_addmode(str, N_("Edit Mode"), OB_MODE_EDIT, ICON_EDITMODE_HLT);
- }
- else if (ob->type == OB_ARMATURE) {
+ if (ob->type == OB_ARMATURE) {
if (ob->mode & OB_MODE_POSE)
str += modeselect_addmode(str, N_("Edit Mode"), OB_MODE_EDIT | OB_MODE_POSE, ICON_EDITMODE_HLT);
else
str += modeselect_addmode(str, N_("Edit Mode"), OB_MODE_EDIT, ICON_EDITMODE_HLT);
}
+ else if (OB_TYPE_SUPPORT_EDITMODE(ob->type)) {
+ str += modeselect_addmode(str, N_("Edit Mode"), OB_MODE_EDIT, ICON_EDITMODE_HLT);
+ }
if (ob->type == OB_MESH) {
@@ -431,9 +431,10 @@ static int object_mode_icon(int mode)
EnumPropertyItem *item = object_mode_items;
while (item->name != NULL) {
- if (item->value == mode)
+ if (item->value == mode) {
return item->icon;
- ++item;
+ }
+ item++;
}
return ICON_OBJECT_DATAMODE;
diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h
index 168775deae2..b7cb9161ef4 100644
--- a/source/blender/editors/space_view3d/view3d_intern.h
+++ b/source/blender/editors/space_view3d/view3d_intern.h
@@ -53,9 +53,9 @@ struct wmWindowManager;
#define BL_NEAR_CLIP 0.001
/* drawing flags: */
-#define DRAW_PICKING 1
-#define DRAW_CONSTCOLOR 2
-#define DRAW_SCENESET 4
+#define DRAW_PICKING 1
+#define DRAW_CONSTCOLOR 2
+#define DRAW_SCENESET 4
/* draw_mesh_fancy/draw_mesh_textured draw_flags */
#define DRAW_MODIFIERS_PREVIEW 1
@@ -78,6 +78,8 @@ void VIEW3D_OT_ndof_pan(struct wmOperatorType *ot);
void VIEW3D_OT_view_all(struct wmOperatorType *ot);
void VIEW3D_OT_viewnumpad(struct wmOperatorType *ot);
void VIEW3D_OT_view_selected(struct wmOperatorType *ot);
+void VIEW3D_OT_view_lock_clear(struct wmOperatorType *ot);
+void VIEW3D_OT_view_lock_to_active(struct wmOperatorType *ot);
void VIEW3D_OT_view_center_cursor(struct wmOperatorType *ot);
void VIEW3D_OT_view_center_camera(struct wmOperatorType *ot);
void VIEW3D_OT_view_pan(struct wmOperatorType *ot);
@@ -93,8 +95,8 @@ void VIEW3D_OT_render_border(struct wmOperatorType *ot);
void VIEW3D_OT_zoom_border(struct wmOperatorType *ot);
void view3d_boxview_copy(ScrArea *sa, ARegion *ar);
-void ndof_to_quat(struct wmNDOFMotionData* ndof, float q[4]);
-float ndof_to_axis_angle(struct wmNDOFMotionData* ndof, float axis[3]);
+void ndof_to_quat(struct wmNDOFMotionData *ndof, float q[4]);
+float ndof_to_axis_angle(struct wmNDOFMotionData *ndof, float axis[3]);
/* view3d_fly.c */
void view3d_keymap(struct wmKeyConfig *keyconf);
@@ -103,8 +105,8 @@ void VIEW3D_OT_fly(struct wmOperatorType *ot);
/* drawanim.c */
void draw_motion_paths_init(View3D *v3d, struct ARegion *ar);
void draw_motion_path_instance(Scene *scene,
- struct Object *ob, struct bPoseChannel *pchan,
- struct bAnimVizSettings *avs, struct bMotionPath *mpath);
+ struct Object *ob, struct bPoseChannel *pchan,
+ struct bAnimVizSettings *avs, struct bMotionPath *mpath);
void draw_motion_paths_cleanup(View3D *v3d);
@@ -118,22 +120,23 @@ void drawaxes(float size, char drawtype);
void view3d_cached_text_draw_begin(void);
void view3d_cached_text_draw_add(const float co[3], const char *str, short xoffs, short flag, const unsigned char col[4]);
-void view3d_cached_text_draw_end(View3D *v3d, ARegion *ar, int depth_write, float mat[][4]);
-#define V3D_CACHE_TEXT_ZBUF (1<<0)
-#define V3D_CACHE_TEXT_WORLDSPACE (1<<1)
-#define V3D_CACHE_TEXT_ASCII (1<<2)
-#define V3D_CACHE_TEXT_GLOBALSPACE (1<<3)
-#define V3D_CACHE_TEXT_LOCALCLIP (1<<4)
+void view3d_cached_text_draw_end(View3D * v3d, ARegion * ar, int depth_write, float mat[][4]);
+#define V3D_CACHE_TEXT_ZBUF (1 << 0)
+#define V3D_CACHE_TEXT_WORLDSPACE (1 << 1)
+#define V3D_CACHE_TEXT_ASCII (1 << 2)
+#define V3D_CACHE_TEXT_GLOBALSPACE (1 << 3)
+#define V3D_CACHE_TEXT_LOCALCLIP (1 << 4)
/* drawarmature.c */
int draw_armature(Scene *scene, View3D *v3d, ARegion *ar, Base *base, int dt, int flag, const short is_outline);
/* drawmesh.c */
void draw_mesh_textured(Scene *scene, View3D *v3d, RegionView3D *rv3d, struct Object *ob, struct DerivedMesh *dm, int faceselect);
+void draw_mesh_paint(RegionView3D *rv3d, struct Object *ob, struct DerivedMesh *dm, int faceselect);
/* view3d_draw.c */
void view3d_main_area_draw(const struct bContext *C, struct ARegion *ar);
-void draw_depth(Scene *scene, struct ARegion *ar, View3D *v3d, int (* func)(void *));
+void draw_depth(Scene *scene, struct ARegion *ar, View3D *v3d, int (*func)(void *));
void draw_depth_gpencil(Scene *scene, ARegion *ar, View3D *v3d);
void add_view3d_after(ListBase *lb, Base *base, int flag);
@@ -157,12 +160,12 @@ void VIEW3D_OT_localview(struct wmOperatorType *ot);
void VIEW3D_OT_game_start(struct wmOperatorType *ot);
-int ED_view3d_boundbox_clip(RegionView3D *rv3d, float obmat[][4], struct BoundBox *bb);
+int ED_view3d_boundbox_clip(RegionView3D * rv3d, float obmat[][4], struct BoundBox *bb);
void smooth_view(struct bContext *C, struct View3D *v3d, struct ARegion *ar, struct Object *, struct Object *,
float *ofs, float *quat, float *dist, float *lens);
-void setwinmatrixview3d(ARegion *ar, View3D *v3d, rctf *rect); /* rect: for picking */
+void setwinmatrixview3d(ARegion *ar, View3D *v3d, rctf *rect); /* rect: for picking */
void setviewmatrixview3d(Scene *scene, View3D *v3d, RegionView3D *rv3d);
void fly_modal_keymap(struct wmKeyConfig *keyconf);
diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c
index 99da487f923..f760254e8d2 100644
--- a/source/blender/editors/space_view3d/view3d_ops.c
+++ b/source/blender/editors/space_view3d/view3d_ops.c
@@ -72,6 +72,8 @@ void view3d_operatortypes(void)
WM_operatortype_append(VIEW3D_OT_background_image_add);
WM_operatortype_append(VIEW3D_OT_background_image_remove);
WM_operatortype_append(VIEW3D_OT_view_selected);
+ WM_operatortype_append(VIEW3D_OT_view_lock_clear);
+ WM_operatortype_append(VIEW3D_OT_view_lock_to_active);
WM_operatortype_append(VIEW3D_OT_view_center_cursor);
WM_operatortype_append(VIEW3D_OT_view_center_camera);
WM_operatortype_append(VIEW3D_OT_select);
@@ -135,7 +137,10 @@ void view3d_keymap(wmKeyConfig *keyconf)
WM_keymap_verify_item(keymap, "VIEW3D_OT_dolly", MIDDLEMOUSE, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
WM_keymap_verify_item(keymap, "VIEW3D_OT_view_selected", PADPERIOD, KM_PRESS, 0, 0);
WM_keymap_verify_item(keymap, "VIEW3D_OT_view_center_cursor", PADPERIOD, KM_PRESS, KM_CTRL, 0);
-
+
+ WM_keymap_verify_item(keymap, "VIEW3D_OT_view_lock_to_active", PADPERIOD, KM_PRESS, KM_SHIFT, 0);
+ WM_keymap_verify_item(keymap, "VIEW3D_OT_view_lock_clear", PADPERIOD, KM_PRESS, KM_ALT, 0);
+
WM_keymap_verify_item(keymap, "VIEW3D_OT_fly", FKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_verify_item(keymap, "VIEW3D_OT_smoothview", TIMER1, KM_ANY, KM_ANY, 0);
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index c6a93a80b2e..d7b03447d5b 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -48,9 +48,12 @@
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
-#include "BLI_blenlib.h"
+#include "BLI_lasso.h"
+#include "BLI_rect.h"
#include "BLI_rand.h"
#include "BLI_linklist.h"
+#include "BLI_listbase.h"
+#include "BLI_string.h"
#include "BLI_utildefines.h"
/* vertex box select */
@@ -319,79 +322,6 @@ static int edge_inside_rect(rcti *rect, short x1, short y1, short x2, short y2)
#define MOVES_GESTURE 50
#define MOVES_LASSO 500
-int lasso_inside(int mcords[][2], short moves, int sx, int sy)
-{
- /* we do the angle rule, define that all added angles should be about zero or 2*PI */
- float angletot = 0.0, len, dot, ang, cross, fp1[2], fp2[2];
- int a;
- int *p1, *p2;
-
- if (sx == IS_CLIPPED)
- return 0;
-
- p1 = mcords[moves - 1];
- p2 = mcords[0];
-
- /* first vector */
- fp1[0] = (float)(p1[0] - sx);
- fp1[1] = (float)(p1[1] - sy);
- len = sqrt(fp1[0] * fp1[0] + fp1[1] * fp1[1]);
- fp1[0] /= len;
- fp1[1] /= len;
-
- for (a = 0; a < moves; a++) {
- /* second vector */
- fp2[0] = (float)(p2[0] - sx);
- fp2[1] = (float)(p2[1] - sy);
- len = sqrt(fp2[0] * fp2[0] + fp2[1] * fp2[1]);
- fp2[0] /= len;
- fp2[1] /= len;
-
- /* dot and angle and cross */
- dot = fp1[0] * fp2[0] + fp1[1] * fp2[1];
- ang = fabs(saacos(dot));
-
- cross = (float)((p1[1] - p2[1]) * (p1[0] - sx) + (p2[0] - p1[0]) * (p1[1] - sy));
-
- if (cross < 0.0f) angletot -= ang;
- else angletot += ang;
-
- /* circulate */
- fp1[0] = fp2[0]; fp1[1] = fp2[1];
- p1 = p2;
- p2 = mcords[a + 1];
- }
-
- if (fabs(angletot) > 4.0) return 1;
- return 0;
-}
-
-/* edge version for lasso select. we assume boundbox check was done */
-int lasso_inside_edge(int mcords[][2], short moves, int x0, int y0, int x1, int y1)
-{
- int v1[2], v2[2];
- int a;
-
- if (x0 == IS_CLIPPED || x1 == IS_CLIPPED)
- return 0;
-
- v1[0] = x0, v1[1] = y0;
- v2[0] = x1, v2[1] = y1;
-
- /* check points in lasso */
- if (lasso_inside(mcords, moves, v1[0], v1[1])) return 1;
- if (lasso_inside(mcords, moves, v2[0], v2[1])) return 1;
-
- /* no points in lasso, so we have to intersect with lasso edge */
-
- if (isect_line_line_v2_int(mcords[0], mcords[moves - 1], v1, v2) > 0) return 1;
- for (a = 0; a < moves - 1; a++) {
- if (isect_line_line_v2_int(mcords[a], mcords[a + 1], v1, v2) > 0) return 1;
- }
-
- return 0;
-}
-
/* warning; lasso select with backbuffer-check draws in backbuf with persp(PERSP_WIN)
* and returns with persp(PERSP_VIEW). After lasso select backbuf is not OK
@@ -412,7 +342,7 @@ static void do_lasso_select_pose(ViewContext *vc, Object *ob, int mcords[][2], s
mul_v3_m4v3(vec, ob->obmat, pchan->pose_tail);
project_int(vc->ar, vec, sco2);
- if (lasso_inside_edge(mcords, moves, sco1[0], sco1[1], sco2[0], sco2[1])) {
+ if (BLI_lasso_is_edge_inside(mcords, moves, sco1[0], sco1[1], sco2[0], sco2[1], IS_CLIPPED)) {
if (select) pchan->bone->flag |= BONE_SELECTED;
else pchan->bone->flag &= ~BONE_SELECTED;
}
@@ -441,7 +371,7 @@ static void do_lasso_select_objects(ViewContext *vc, int mcords[][2], short move
for (base = vc->scene->base.first; base; base = base->next) {
if (BASE_SELECTABLE(vc->v3d, base)) { /* use this to avoid un-needed lasso lookups */
project_short(vc->ar, base->object->obmat[3], &base->sx);
- if (lasso_inside(mcords, moves, base->sx, base->sy)) {
+ if (BLI_lasso_is_point_inside(mcords, moves, base->sx, base->sy, IS_CLIPPED)) {
if (select) ED_base_object_select(base, BA_SELECT);
else ED_base_object_select(base, BA_DESELECT);
@@ -454,26 +384,13 @@ static void do_lasso_select_objects(ViewContext *vc, int mcords[][2], short move
}
}
-static void lasso_select_boundbox(rcti *rect, int mcords[][2], short moves)
-{
- short a;
-
- rect->xmin = rect->xmax = mcords[0][0];
- rect->ymin = rect->ymax = mcords[0][1];
-
- for (a = 1; a < moves; a++) {
- if (mcords[a][0] < rect->xmin) rect->xmin = mcords[a][0];
- else if (mcords[a][0] > rect->xmax) rect->xmax = mcords[a][0];
- if (mcords[a][1] < rect->ymin) rect->ymin = mcords[a][1];
- else if (mcords[a][1] > rect->ymax) rect->ymax = mcords[a][1];
- }
-}
-
static void do_lasso_select_mesh__doSelectVert(void *userData, BMVert *eve, int x, int y, int UNUSED(index))
{
LassoSelectUserData *data = userData;
- if (BLI_in_rcti(data->rect, x, y) && lasso_inside(data->mcords, data->moves, x, y)) {
+ if (BLI_in_rcti(data->rect, x, y) &&
+ BLI_lasso_is_point_inside(data->mcords, data->moves, x, y, IS_CLIPPED))
+ {
BM_vert_select_set(data->vc->em->bm, eve, data->select);
}
}
@@ -484,14 +401,15 @@ static void do_lasso_select_mesh__doSelectEdge(void *userData, BMEdge *eed, int
if (EDBM_backbuf_check(bm_solidoffs + index)) {
if (data->pass == 0) {
if (edge_fully_inside_rect(data->rect, x0, y0, x1, y1) &&
- lasso_inside(data->mcords, data->moves, x0, y0) &&
- lasso_inside(data->mcords, data->moves, x1, y1)) {
+ BLI_lasso_is_point_inside(data->mcords, data->moves, x0, y0, IS_CLIPPED) &&
+ BLI_lasso_is_point_inside(data->mcords, data->moves, x1, y1, IS_CLIPPED))
+ {
BM_edge_select_set(data->vc->em->bm, eed, data->select);
data->done = 1;
}
}
else {
- if (lasso_inside_edge(data->mcords, data->moves, x0, y0, x1, y1)) {
+ if (BLI_lasso_is_edge_inside(data->mcords, data->moves, x0, y0, x1, y1, IS_CLIPPED)) {
BM_edge_select_set(data->vc->em->bm, eed, data->select);
}
}
@@ -501,7 +419,9 @@ static void do_lasso_select_mesh__doSelectFace(void *userData, BMFace *efa, int
{
LassoSelectUserData *data = userData;
- if (BLI_in_rcti(data->rect, x, y) && lasso_inside(data->mcords, data->moves, x, y)) {
+ if (BLI_in_rcti(data->rect, x, y) &&
+ BLI_lasso_is_point_inside(data->mcords, data->moves, x, y, IS_CLIPPED))
+ {
BM_face_select_set(data->vc->em->bm, efa, data->select);
}
}
@@ -513,7 +433,7 @@ static void do_lasso_select_mesh(ViewContext *vc, int mcords[][2], short moves,
rcti rect;
int bbsel;
- lasso_select_boundbox(&rect, mcords, moves);
+ BLI_lasso_boundbox(&rect, mcords, moves);
/* set editmesh */
vc->em = BMEdit_FromObject(vc->obedit);
@@ -567,73 +487,13 @@ static void do_lasso_select_mesh(ViewContext *vc, int mcords[][2], short moves,
EDBM_selectmode_flush(vc->em);
}
-/* BMESH_TODO */
-#if 0
-/* this is an exception in that its the only lasso that dosnt use the 3d view (uses space image view) */
-static void do_lasso_select_mesh_uv(int mcords[][2], short moves, short select)
-{
- EditFace *efa;
- MTFace *tf;
- int screenUV[2], nverts, i, ok = 1;
- rcti rect;
-
- lasso_select_boundbox(&rect, mcords, moves);
-
- if (draw_uvs_face_check()) { /* Face Center Sel */
- float cent[2];
- ok = 0;
- for (efa = em->faces.first; efa; efa = efa->next) {
- /* assume not touched */
- efa->tmp.l = 0;
- tf = CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
- if ((select) != (simaFaceSel_Check(efa, tf))) {
- uv_center(tf->uv, cent, (void *)efa->v4);
- uvco_to_areaco_noclip(cent, screenUV);
- if (BLI_in_rcti(&rect, screenUV[0], screenUV[1]) && lasso_inside(mcords, moves, screenUV[0], screenUV[1])) {
- efa->tmp.l = ok = 1;
- }
- }
- }
- /* (de)selects all tagged faces and deals with sticky modes */
- if (ok)
- uvface_setsel__internal(select);
-
- }
- else { /* Vert Sel*/
- for (efa = em->faces.first; efa; efa = efa->next) {
- tf = CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
- if (uvedit_face_visible(scene, ima, efa, tf)) {
- nverts = efa->v4 ? 4 : 3;
- for (i = 0; i < nverts; i++) {
- if ((select) != (simaUVSel_Check(efa, tf, i))) {
- uvco_to_areaco_noclip(tf->uv[i], screenUV);
- if (BLI_in_rcti(&rect, screenUV[0], screenUV[1]) && lasso_inside(mcords, moves, screenUV[0], screenUV[1])) {
- if (select) {
- simaUVSel_Set(efa, tf, i);
- }
- else {
- simaUVSel_UnSet(efa, tf, i);
- }
- }
- }
- }
- }
- }
- }
- if (ok && G.sima->flag & SI_SYNC_UVSEL) {
- if (select) EM_select_flush(vc->em);
- else EM_deselect_flush(vc->em);
- }
-}
-#endif
-
static void do_lasso_select_curve__doSelect(void *userData, Nurb *UNUSED(nu), BPoint *bp, BezTriple *bezt, int beztindex, int x, int y)
{
LassoSelectUserData *data = userData;
Object *obedit = data->vc->obedit;
Curve *cu = (Curve *)obedit->data;
- if (lasso_inside(data->mcords, data->moves, x, y)) {
+ if (BLI_lasso_is_point_inside(data->mcords, data->moves, x, y, IS_CLIPPED)) {
if (bp) {
bp->f1 = data->select ? (bp->f1 | SELECT) : (bp->f1 & ~SELECT);
if (bp == cu->lastsel && !(bp->f1 & 1)) cu->lastsel = NULL;
@@ -681,7 +541,7 @@ static void do_lasso_select_lattice__doSelect(void *userData, BPoint *bp, int x,
{
LassoSelectUserData *data = userData;
- if (lasso_inside(data->mcords, data->moves, x, y)) {
+ if (BLI_lasso_is_point_inside(data->mcords, data->moves, x, y, IS_CLIPPED)) {
bp->f1 = data->select ? (bp->f1 | SELECT) : (bp->f1 & ~SELECT);
}
}
@@ -722,20 +582,22 @@ static void do_lasso_select_armature(ViewContext *vc, int mcords[][2], short mov
project_short(vc->ar, vec, sco2);
didpoint = 0;
- if (lasso_inside(mcords, moves, sco1[0], sco1[1])) {
+ if (BLI_lasso_is_point_inside(mcords, moves, sco1[0], sco1[1], IS_CLIPPED)) {
if (select) ebone->flag |= BONE_ROOTSEL;
else ebone->flag &= ~BONE_ROOTSEL;
didpoint = 1;
change = TRUE;
}
- if (lasso_inside(mcords, moves, sco2[0], sco2[1])) {
+ if (BLI_lasso_is_point_inside(mcords, moves, sco2[0], sco2[1], IS_CLIPPED)) {
if (select) ebone->flag |= BONE_TIPSEL;
else ebone->flag &= ~BONE_TIPSEL;
didpoint = 1;
change = TRUE;
}
/* if one of points selected, we skip the bone itself */
- if (didpoint == 0 && lasso_inside_edge(mcords, moves, sco1[0], sco1[1], sco2[0], sco2[1])) {
+ if (didpoint == 0 &&
+ BLI_lasso_is_edge_inside(mcords, moves, sco1[0], sco1[1], sco2[0], sco2[1], IS_CLIPPED))
+ {
if (select) ebone->flag |= BONE_TIPSEL | BONE_ROOTSEL | BONE_SELECTED;
else ebone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
change = TRUE;
@@ -771,7 +633,7 @@ static void do_lasso_select_meta(ViewContext *vc, int mcords[][2], short moves,
mul_v3_m4v3(vec, vc->obedit->obmat, &ml->x);
project_short(vc->ar, vec, sco);
- if (lasso_inside(mcords, moves, sco[0], sco[1])) {
+ if (BLI_lasso_is_point_inside(mcords, moves, sco[0], sco[1], IS_CLIPPED)) {
if (select) ml->flag |= SELECT;
else ml->flag &= ~SELECT;
}
@@ -850,7 +712,7 @@ static void do_lasso_select_paintvert(ViewContext *vc, int mcords[][2], short mo
paintvert_deselect_all_visible(ob, SEL_DESELECT, FALSE); /* flush selection at the end */
bm_vertoffs = me->totvert + 1; /* max index array */
- lasso_select_boundbox(&rect, mcords, moves);
+ BLI_lasso_boundbox(&rect, mcords, moves);
EDBM_backbuf_border_mask_init(vc, mcords, moves, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
edbm_backbuf_check_and_select_verts_obmode(me, select);
@@ -873,7 +735,7 @@ static void do_lasso_select_paintface(ViewContext *vc, int mcords[][2], short mo
bm_vertoffs = me->totpoly + 1; /* max index array */
- lasso_select_boundbox(&rect, mcords, moves);
+ BLI_lasso_boundbox(&rect, mcords, moves);
EDBM_backbuf_border_mask_init(vc, mcords, moves, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
edbm_backbuf_check_and_select_tfaces(me, select);
@@ -893,7 +755,7 @@ static void do_lasso_select_node(int mcords[][2], short moves, short select)
short node_cent[2];
float node_centf[2];
- lasso_select_boundbox(&rect, mcords, moves);
+ BLI_lasso_boundbox(&rect, mcords, moves);
/* store selection in temp test flag */
for (node = snode->edittree->nodes.first; node; node = node->next) {
@@ -902,7 +764,7 @@ static void do_lasso_select_node(int mcords[][2], short moves, short select)
node_centf[1] = (node->totr.ymin + node->totr.ymax) / 2;
ipoco_to_areaco_noclip(G.v2d, node_centf, node_cent);
- if (BLI_in_rcti(&rect, node_cent[0], node_cent[1]) && lasso_inside(mcords, moves, node_cent[0], node_cent[1])) {
+ if (BLI_in_rcti(&rect, node_cent[0], node_cent[1]) && BLI_lasso_is_point_inside(mcords, moves, node_cent[0], node_cent[1])) {
if (select) {
node->flag |= SELECT;
}
@@ -968,7 +830,8 @@ static int view3d_lasso_select_exec(bContext *C, wmOperator *op)
int i = 0;
int mcords[1024][2];
- RNA_BEGIN(op->ptr, itemptr, "path") {
+ RNA_BEGIN (op->ptr, itemptr, "path")
+ {
float loc[2];
RNA_float_get_array(&itemptr, "loc", loc);
@@ -1113,7 +976,8 @@ static int object_select_menu_exec(bContext *C, wmOperator *op)
const char *name = object_mouse_select_menu_data[name_index].idname;
if (!extend) {
- CTX_DATA_BEGIN(C, Base *, base, selectable_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, selectable_bases)
+ {
if (base->flag & SELECT) {
ED_base_object_select(base, BA_DESELECT);
changed = 1;
@@ -1122,7 +986,8 @@ static int object_select_menu_exec(bContext *C, wmOperator *op)
CTX_DATA_END;
}
- CTX_DATA_BEGIN(C, Base *, base, selectable_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, selectable_bases)
+ {
/* this is a bit dodjy, there should only be ONE object with this name, but library objects can mess this up */
if (strcmp(name, base->object->id.name + 2) == 0) {
ED_base_object_activate(C, base);
@@ -1189,7 +1054,8 @@ static Base *object_mouse_select_menu(bContext *C, ViewContext *vc, unsigned int
short ok;
LinkNode *linklist = NULL;
- CTX_DATA_BEGIN(C, Base *, base, selectable_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, selectable_bases)
+ {
ok = FALSE;
/* two selection methods, the CTRL select uses max dist of 15 */
@@ -1541,7 +1407,7 @@ static int mouse_select(bContext *C, const int mval[2], short extend, short obce
/* index of bundle is 1<<16-based. if there's no "bone" index
* in hight word, this buffer value belongs to camera,. not to bundle */
if (buffer[4 * i + 3] & 0xFFFF0000) {
- MovieClip *clip = object_get_movieclip(scene, basact->object, 0);
+ MovieClip *clip = BKE_object_movieclip_get(scene, basact->object, 0);
MovieTracking *tracking = &clip->tracking;
ListBase *tracksbase;
MovieTrackingTrack *track;
@@ -1967,7 +1833,8 @@ static int do_object_pose_box_select(bContext *C, ViewContext *vc, rcti *rect, i
if (extend == 0 && select) {
if (bone_only) {
- CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pose_bones) {
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, visible_pose_bones)
+ {
if ((pchan->bone->flag & BONE_UNSELECTABLE) == 0) {
pchan->bone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
}
@@ -2188,7 +2055,7 @@ static int vertsel_vert_pick(struct bContext *C, Mesh *me, const int mval[2], un
/* gets called via generic mouse select operator */
static int mouse_weight_paint_vertex_select(bContext *C, const int mval[2], short extend, Object *obact)
{
- Mesh*me = obact->data; /* already checked for NULL */
+ Mesh *me = obact->data; /* already checked for NULL */
unsigned int index = 0;
MVert *mv;
@@ -2332,7 +2199,7 @@ static void mesh_circle_select(ViewContext *vc, int select, const int mval[2], f
int bbsel;
CircleSelectUserData data;
- bbsel = EDBM_backbuf_circle_init(vc, mval[0], mval[1], (short)(rad + 1.0));
+ bbsel = EDBM_backbuf_circle_init(vc, mval[0], mval[1], (short)(rad + 1.0f));
ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d); /* for foreach's screen/vert projection */
vc->em = BMEdit_FromObject(vc->obedit);
@@ -2383,7 +2250,7 @@ static void paint_facesel_circle_select(ViewContext *vc, int select, const int m
if (me) {
bm_vertoffs = me->totpoly + 1; /* max index array */
- /* bbsel= */ /* UNUSED */ EDBM_backbuf_circle_init(vc, mval[0], mval[1], (short)(rad + 1.0));
+ /* bbsel= */ /* UNUSED */ EDBM_backbuf_circle_init(vc, mval[0], mval[1], (short)(rad + 1.0f));
edbm_backbuf_check_and_select_tfaces(me, select == LEFTMOUSE);
EDBM_backbuf_free();
}
diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c
index f19c8891f96..367b36db583 100644
--- a/source/blender/editors/space_view3d/view3d_snap.c
+++ b/source/blender/editors/space_view3d/view3d_snap.c
@@ -106,7 +106,7 @@ static void special_transvert_update(Object *obedit)
}
else if (ELEM(obedit->type, OB_CURVE, OB_SURF)) {
Curve *cu = obedit->data;
- ListBase *nurbs = curve_editnurbs(cu);
+ ListBase *nurbs = BKE_curve_editNurbs_get(cu);
Nurb *nu = nurbs->first;
while (nu) {
@@ -141,8 +141,8 @@ static void special_transvert_update(Object *obedit)
}
}
- test2DNurb(nu);
- testhandlesNurb(nu); /* test for bezier too */
+ BKE_nurb_test2D(nu);
+ BKE_nurb_handles_test(nu); /* test for bezier too */
nu = nu->next;
}
}
@@ -375,7 +375,7 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode)
else if (ELEM(obedit->type, OB_CURVE, OB_SURF)) {
Curve *cu = obedit->data;
int totmalloc = 0;
- ListBase *nurbs = curve_editnurbs(cu);
+ ListBase *nurbs = BKE_curve_editNurbs_get(cu);
for (nu = nurbs->first; nu; nu = nu->next) {
if (nu->type == CU_BEZIER)
@@ -557,7 +557,8 @@ static int snap_sel_to_grid(bContext *C, wmOperator *UNUSED(op))
else {
struct KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_LOCATION_ID);
- CTX_DATA_BEGIN(C, Object *, ob, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
+ {
if (ob->mode & OB_MODE_POSE) {
bPoseChannel *pchan;
bArmature *arm = ob->data;
@@ -581,7 +582,7 @@ static int snap_sel_to_grid(bContext *C, wmOperator *UNUSED(op))
mul_m4_v3(ob->imat, vec);
/* Get location of grid point in pose space. */
- armature_loc_pose_to_bone(pchan, vec, vec);
+ BKE_armature_loc_pose_to_bone(pchan, vec, vec);
/* adjust location */
if ((pchan->protectflag & OB_LOCK_LOCX) == 0)
@@ -612,7 +613,7 @@ static int snap_sel_to_grid(bContext *C, wmOperator *UNUSED(op))
vec[2] = -ob->obmat[3][2] + gridf *floorf(0.5f + ob->obmat[3][2] / gridf);
if (ob->parent) {
- where_is_object(scene, ob);
+ BKE_object_where_is_calc(scene, ob);
invert_m3_m3(imat, originmat);
mul_m3_v3(imat, vec);
@@ -691,7 +692,8 @@ static int snap_sel_to_curs(bContext *C, wmOperator *UNUSED(op))
else {
struct KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_LOCATION_ID);
- CTX_DATA_BEGIN(C, Object *, ob, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
+ {
if (ob->mode & OB_MODE_POSE) {
bPoseChannel *pchan;
bArmature *arm = ob->data;
@@ -705,7 +707,7 @@ static int snap_sel_to_curs(bContext *C, wmOperator *UNUSED(op))
if (pchan->bone->layer & arm->layer) {
if ((pchan->bone->flag & BONE_CONNECTED) == 0) {
/* Get position in pchan (pose) space. */
- armature_loc_pose_to_bone(pchan, vec, vec);
+ BKE_armature_loc_pose_to_bone(pchan, vec, vec);
/* copy new position */
if ((pchan->protectflag & OB_LOCK_LOCX) == 0)
@@ -736,7 +738,7 @@ static int snap_sel_to_curs(bContext *C, wmOperator *UNUSED(op))
vec[2] = -ob->obmat[3][2] + curs[2];
if (ob->parent) {
- where_is_object(scene, ob);
+ BKE_object_where_is_calc(scene, ob);
invert_m3_m3(imat, originmat);
mul_m3_v3(imat, vec);
@@ -816,7 +818,7 @@ void VIEW3D_OT_snap_cursor_to_grid(wmOperatorType *ot)
static void bundle_midpoint(Scene *scene, Object *ob, float vec[3])
{
- MovieClip *clip = object_get_movieclip(scene, ob, 0);
+ MovieClip *clip = BKE_object_movieclip_get(scene, ob, 0);
MovieTracking *tracking;
MovieTrackingObject *object;
int ok = 0;
@@ -928,7 +930,8 @@ static int snap_curs_to_sel(bContext *C, wmOperator *UNUSED(op))
}
}
else {
- CTX_DATA_BEGIN(C, Object *, ob, selected_objects) {
+ CTX_DATA_BEGIN (C, Object *, ob, selected_objects)
+ {
copy_v3_v3(vec, ob->obmat[3]);
/* special case for camera -- snap to bundles */
@@ -993,8 +996,8 @@ static int snap_curs_to_active(bContext *C, wmOperator *UNUSED(op))
Mesh *me = obedit->data;
BMEditSelection ese;
- if (EDBM_editselection_active_get(me->edit_btmesh, &ese)) {
- EDBM_editselection_center(curs, &ese);
+ if (BM_select_history_active_get(me->edit_btmesh->bm, &ese)) {
+ BM_editselection_center(&ese, curs);
}
mul_m4_v3(obedit->obmat, curs);
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index 8a0cb4b597b..95ae0ac971f 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -358,11 +358,11 @@ static int view3d_camera_to_view_exec(bContext *C, wmOperator *UNUSED(op))
rv3d->lpersp = rv3d->persp;
}
- object_tfm_protected_backup(v3d->camera, &obtfm);
+ BKE_object_tfm_protected_backup(v3d->camera, &obtfm);
ED_view3d_to_object(v3d->camera, rv3d->ofs, rv3d->viewquat, rv3d->dist);
- object_tfm_protected_restore(v3d->camera, &obtfm, v3d->camera->protectflag);
+ BKE_object_tfm_protected_restore(v3d->camera, &obtfm, v3d->camera->protectflag);
DAG_id_tag_update(&v3d->camera->id, OB_RECALC_OB);
rv3d->persp = RV3D_CAMOB;
@@ -412,7 +412,7 @@ static int view3d_camera_to_view_selected_exec(bContext *C, wmOperator *UNUSED(o
float r_co[3]; /* the new location to apply */
/* this function does all the important stuff */
- if (camera_view_frame_fit_to_scene(scene, v3d, camera_ob, r_co)) {
+ if (BKE_camera_view_frame_fit_to_scene(scene, v3d, camera_ob, r_co)) {
ObjectTfmProtectedChannels obtfm;
float obmat_new[4][4];
@@ -421,9 +421,9 @@ static int view3d_camera_to_view_selected_exec(bContext *C, wmOperator *UNUSED(o
copy_v3_v3(obmat_new[3], r_co);
/* only touch location */
- object_tfm_protected_backup(camera_ob, &obtfm);
- object_apply_mat4(camera_ob, obmat_new, TRUE, TRUE);
- object_tfm_protected_restore(camera_ob, &obtfm, OB_LOCK_SCALE | OB_LOCK_ROT4D);
+ BKE_object_tfm_protected_backup(camera_ob, &obtfm);
+ BKE_object_apply_mat4(camera_ob, obmat_new, TRUE, TRUE);
+ BKE_object_tfm_protected_restore(camera_ob, &obtfm, OB_LOCK_SCALE | OB_LOCK_ROT4D);
/* notifiers */
DAG_id_tag_update(&camera_ob->id, OB_RECALC_OB);
@@ -567,9 +567,9 @@ void ED_view3d_calc_clipping(BoundBox *bb, float planes[4][4], bglMats *mats, co
if (flip_sign)
negate_v3(planes[val]);
- planes[val][3] = -planes[val][0] * bb->vec[val][0]
- - planes[val][1] * bb->vec[val][1]
- - planes[val][2] * bb->vec[val][2];
+ planes[val][3] = -planes[val][0] * bb->vec[val][0] -
+ planes[val][1] * bb->vec[val][1] -
+ planes[val][2] * bb->vec[val][2];
}
}
@@ -1000,8 +1000,8 @@ int ED_view3d_clip_range_get(View3D *v3d, RegionView3D *rv3d, float *clipsta, fl
{
CameraParams params;
- camera_params_init(&params);
- camera_params_from_view3d(&params, v3d, rv3d);
+ BKE_camera_params_init(&params);
+ BKE_camera_params_from_view3d(&params, v3d, rv3d);
if (clipsta) *clipsta = params.clipsta;
if (clipend) *clipend = params.clipend;
@@ -1015,9 +1015,9 @@ int ED_view3d_viewplane_get(View3D *v3d, RegionView3D *rv3d, int winx, int winy,
{
CameraParams params;
- camera_params_init(&params);
- camera_params_from_view3d(&params, v3d, rv3d);
- camera_params_compute_viewplane(&params, winx, winy, 1.0f, 1.0f);
+ BKE_camera_params_init(&params);
+ BKE_camera_params_from_view3d(&params, v3d, rv3d);
+ BKE_camera_params_compute_viewplane(&params, winx, winy, 1.0f, 1.0f);
if (viewplane) *viewplane = params.viewplane;
if (clipsta) *clipsta = params.clipsta;
@@ -1155,7 +1155,7 @@ void setviewmatrixview3d(Scene *scene, View3D *v3d, RegionView3D *rv3d)
{
if (rv3d->persp == RV3D_CAMOB) { /* obs/camera */
if (v3d->camera) {
- where_is_object(scene, v3d->camera);
+ BKE_object_where_is_calc(scene, v3d->camera);
obmat_to_viewmat(v3d, rv3d, v3d->camera, 0);
}
else {
@@ -1176,7 +1176,7 @@ void setviewmatrixview3d(Scene *scene, View3D *v3d, RegionView3D *rv3d)
copy_v3_v3(vec, ob->obmat[3]);
if (ob->type == OB_ARMATURE && v3d->ob_centre_bone[0]) {
- bPoseChannel *pchan = get_pose_channel(ob->pose, v3d->ob_centre_bone);
+ bPoseChannel *pchan = BKE_pose_channel_find_name(ob->pose, v3d->ob_centre_bone);
if (pchan) {
copy_v3_v3(vec, pchan->pose_mat[3]);
mul_m4_v3(ob->obmat, vec);
@@ -1412,7 +1412,7 @@ static void initlocalview(Main *bmain, Scene *scene, ScrArea *sa)
}
else {
if (scene->obedit) {
- minmax_object(scene->obedit, min, max);
+ BKE_object_minmax(scene->obedit, min, max);
ok = 1;
@@ -1422,7 +1422,7 @@ static void initlocalview(Main *bmain, Scene *scene, ScrArea *sa)
else {
for (base = FIRSTBASE; base; base = base->next) {
if (TESTBASE(v3d, base)) {
- minmax_object(base->object, min, max);
+ BKE_object_minmax(base->object, min, max);
base->lay |= locallay;
base->object->lay = base->lay;
ok = 1;
@@ -1799,8 +1799,8 @@ static int game_engine_exec(bContext *C, wmOperator *op)
RestoreState(C, prevwin);
//XXX restore_all_scene_cfra(scene_cfra_store);
- set_scene_bg(CTX_data_main(C), startscene);
- //XXX scene_update_for_newframe(bmain, scene, scene->lay);
+ BKE_scene_set_background(CTX_data_main(C), startscene);
+ //XXX BKE_scene_update_for_newframe(bmain, scene, scene->lay);
return OPERATOR_FINISHED;
#else
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 62c82c58adf..ae7d02e1cfb 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -225,7 +225,11 @@ void projectIntView(TransInfo *t, const float vec[3], int adr[2])
adr[1]= out[1];
}
else if (t->spacetype==SPACE_CLIP) {
- UI_view2d_to_region_no_clip(t->view, vec[0], vec[1], adr, adr+1);
+ float v[2];
+
+ copy_v2_v2(v, vec);
+
+ UI_view2d_to_region_no_clip(t->view, v[0], v[1], adr, adr+1);
}
}
@@ -274,6 +278,19 @@ void applyAspectRatio(TransInfo *t, float *vec)
vec[0] /= aspx;
vec[1] /= aspy;
}
+ else if ((t->spacetype==SPACE_CLIP) && (t->mode==TFM_TRANSLATION)) {
+ if (t->options & CTX_MOVIECLIP) {
+ SpaceClip *sc = t->sa->spacedata.first;
+ float aspx, aspy;
+ int width, height;
+
+ ED_space_clip_size(sc, &width, &height);
+ ED_space_clip_aspect(sc, &aspx, &aspy);
+
+ vec[0] *= width / aspx;
+ vec[1] *= height / aspy;
+ }
+ }
}
void removeAspectRatio(TransInfo *t, float *vec)
@@ -294,12 +311,24 @@ void removeAspectRatio(TransInfo *t, float *vec)
vec[0] *= aspx;
vec[1] *= aspy;
}
+ else if ((t->spacetype==SPACE_CLIP) && (t->mode==TFM_TRANSLATION)) {
+ if (t->options & CTX_MOVIECLIP) {
+ SpaceClip *sc = t->sa->spacedata.first;
+ float aspx, aspy;
+ int width, height;
+
+ ED_space_clip_size(sc, &width, &height);
+ ED_space_clip_aspect(sc, &aspx, &aspy);
+
+ vec[0] *= aspx / width;
+ vec[1] *= aspy / height;
+ }
+ }
}
static void viewRedrawForce(const bContext *C, TransInfo *t)
{
- if (t->spacetype == SPACE_VIEW3D)
- {
+ if (t->spacetype == SPACE_VIEW3D) {
/* Do we need more refined tags? */
if (t->flag & T_POSE)
WM_event_add_notifier(C, NC_OBJECT|ND_POSE, NULL);
@@ -415,7 +444,7 @@ static void view_editmove(unsigned short UNUSED(event))
if (Trans.flag & T_2D_EDIT)
return;
- switch(event) {
+ switch (event) {
case WHEELUPMOUSE:
if ( G.qual & LR_SHIFTKEY ) {
@@ -586,8 +615,7 @@ int transformEvent(TransInfo *t, wmEvent *event)
t->redraw |= handleMouseInput(t, &t->mouse, event);
- if (event->type == MOUSEMOVE)
- {
+ if (event->type == MOUSEMOVE) {
if (t->modifiers & MOD_CONSTRAINT_SELECT)
t->con.mode |= CON_SELECT;
@@ -626,10 +654,10 @@ int transformEvent(TransInfo *t, wmEvent *event)
t->redraw |= TREDRAW_HARD;
}
else if (t->mode == TFM_TRANSLATION) {
- if (t->options&CTX_MOVIECLIP) {
+ if (t->options & CTX_MOVIECLIP) {
restoreTransObjects(t);
- t->flag^= T_ALT_TRANSFORM;
+ t->flag ^= T_ALT_TRANSFORM;
t->redraw |= TREDRAW_HARD;
}
}
@@ -802,7 +830,7 @@ int transformEvent(TransInfo *t, wmEvent *event)
t->redraw |= handleNumInput(&(t->num), event);
}
/* else do non-mapped events */
- else if (event->val==KM_PRESS) {
+ else if (event->val == KM_PRESS) {
switch (event->type) {
case RIGHTMOUSE:
t->state = TRANS_CANCEL;
@@ -1088,11 +1116,9 @@ int transformEvent(TransInfo *t, wmEvent *event)
}
/* confirm transform if launch key is released after mouse move */
- if (t->flag & T_RELEASE_CONFIRM)
- {
+ if (t->flag & T_RELEASE_CONFIRM) {
/* XXX Keyrepeat bug in Xorg fucks this up, will test when fixed */
- if (event->type == t->launch_event && (t->launch_event == LEFTMOUSE || t->launch_event == RIGHTMOUSE))
- {
+ if (event->type == t->launch_event && (t->launch_event == LEFTMOUSE || t->launch_event == RIGHTMOUSE)) {
t->state = TRANS_CONFIRM;
}
}
@@ -1156,20 +1182,19 @@ typedef enum {
} ArrowDirection;
static void drawArrow(ArrowDirection d, short offset, short length, short size)
{
- switch(d)
- {
+ switch (d) {
case LEFT:
offset = -offset;
length = -length;
size = -size;
case RIGHT:
glBegin(GL_LINES);
- glVertex2s( offset, 0);
- glVertex2s( offset + length, 0);
- glVertex2s( offset + length, 0);
- glVertex2s( offset + length - size, -size);
- glVertex2s( offset + length, 0);
- glVertex2s( offset + length - size, size);
+ glVertex2s(offset, 0);
+ glVertex2s(offset + length, 0);
+ glVertex2s(offset + length, 0);
+ glVertex2s(offset + length - size, -size);
+ glVertex2s(offset + length, 0);
+ glVertex2s(offset + length - size, size);
glEnd();
break;
case DOWN:
@@ -1178,12 +1203,12 @@ static void drawArrow(ArrowDirection d, short offset, short length, short size)
size = -size;
case UP:
glBegin(GL_LINES);
- glVertex2s( 0, offset);
- glVertex2s( 0, offset + length);
- glVertex2s( 0, offset + length);
+ glVertex2s(0, offset);
+ glVertex2s(0, offset + length);
+ glVertex2s(0, offset + length);
glVertex2s(-size, offset + length - size);
- glVertex2s( 0, offset + length);
- glVertex2s( size, offset + length - size);
+ glVertex2s(0, offset + length);
+ glVertex2s(size, offset + length - size);
glEnd();
break;
}
@@ -1191,26 +1216,25 @@ static void drawArrow(ArrowDirection d, short offset, short length, short size)
static void drawArrowHead(ArrowDirection d, short size)
{
- switch(d)
- {
+ switch (d) {
case LEFT:
size = -size;
case RIGHT:
glBegin(GL_LINES);
- glVertex2s( 0, 0);
- glVertex2s( -size, -size);
- glVertex2s( 0, 0);
- glVertex2s( -size, size);
+ glVertex2s(0, 0);
+ glVertex2s(-size, -size);
+ glVertex2s(0, 0);
+ glVertex2s(-size, size);
glEnd();
break;
case DOWN:
size = -size;
case UP:
glBegin(GL_LINES);
- glVertex2s( 0, 0);
+ glVertex2s(0, 0);
glVertex2s(-size, -size);
- glVertex2s( 0, 0);
- glVertex2s( size, -size);
+ glVertex2s(0, 0);
+ glVertex2s(size, -size);
glEnd();
break;
}
@@ -1223,11 +1247,10 @@ static void drawArc(float size, float angle_start, float angle_end, int segments
glBegin(GL_LINE_STRIP);
- for ( angle = angle_start; angle < angle_end; angle += delta)
- {
- glVertex2f( cosf(angle) * size, sinf(angle) * size);
+ for ( angle = angle_start; angle < angle_end; angle += delta) {
+ glVertex2f(cosf(angle) * size, sinf(angle) * size);
}
- glVertex2f( cosf(angle_end) * size, sinf(angle_end) * size);
+ glVertex2f(cosf(angle_end) * size, sinf(angle_end) * size);
glEnd();
}
@@ -1245,8 +1268,7 @@ static void drawHelpline(bContext *UNUSED(C), int x, int y, void *customdata)
{
TransInfo *t = (TransInfo*)customdata;
- if (t->helpline != HLP_NONE && !(t->flag & T_USES_MANIPULATOR))
- {
+ if (t->helpline != HLP_NONE && !(t->flag & T_USES_MANIPULATOR)) {
float vecrot[3], cent[2];
int mval[2];
@@ -1267,8 +1289,7 @@ static void drawHelpline(bContext *UNUSED(C), int x, int y, void *customdata)
glPushMatrix();
- switch(t->helpline)
- {
+ switch (t->helpline) {
case HLP_SPRING:
UI_ThemeColor(TH_WIRE);
@@ -1417,23 +1438,23 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
}
/* convert flag to enum */
- switch(t->flag & (T_PROP_EDIT|T_PROP_CONNECTED))
- {
- case (T_PROP_EDIT|T_PROP_CONNECTED):
- proportional = PROP_EDIT_CONNECTED;
- break;
- case T_PROP_EDIT:
- proportional = PROP_EDIT_ON;
- break;
- default:
- proportional = PROP_EDIT_OFF;
+ switch (t->flag & (T_PROP_EDIT|T_PROP_CONNECTED)) {
+ case (T_PROP_EDIT|T_PROP_CONNECTED):
+ proportional = PROP_EDIT_CONNECTED;
+ break;
+ case T_PROP_EDIT:
+ proportional = PROP_EDIT_ON;
+ break;
+ default:
+ proportional = PROP_EDIT_OFF;
}
// If modal, save settings back in scene if not set as operator argument
if (t->flag & T_MODAL) {
/* save settings if not set in operator */
- if ( (prop = RNA_struct_find_property(op->ptr, "proportional")) && !RNA_property_is_set(op->ptr, prop))
+ if ((prop = RNA_struct_find_property(op->ptr, "proportional")) &&
+ !RNA_property_is_set(op->ptr, prop))
{
if (t->obedit)
ts->proportional = proportional;
@@ -1441,12 +1462,14 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
ts->proportional_objects = (proportional != PROP_EDIT_OFF);
}
- if ( (prop = RNA_struct_find_property(op->ptr, "proportional_size")) && !RNA_property_is_set(op->ptr, prop))
+ if ((prop = RNA_struct_find_property(op->ptr, "proportional_size")) &&
+ !RNA_property_is_set(op->ptr, prop))
{
ts->proportional_size = t->prop_size;
}
- if ( (prop = RNA_struct_find_property(op->ptr, "proportional_edit_falloff")) && !RNA_property_is_set(op->ptr, prop))
+ if ((prop = RNA_struct_find_property(op->ptr, "proportional_edit_falloff")) &&
+ !RNA_property_is_set(op->ptr, prop))
{
ts->prop_mode = t->prop_mode;
}
@@ -1460,34 +1483,31 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
}
if (t->spacetype == SPACE_VIEW3D) {
- if ( (prop = RNA_struct_find_property(op->ptr, "constraint_orientation")) && !RNA_property_is_set(op->ptr, prop))
+ if ((prop = RNA_struct_find_property(op->ptr, "constraint_orientation")) &&
+ !RNA_property_is_set(op->ptr, prop))
{
View3D *v3d = t->view;
-
+
v3d->twmode = t->current_orientation;
}
}
}
- if (RNA_struct_find_property(op->ptr, "proportional"))
- {
+ if (RNA_struct_find_property(op->ptr, "proportional")) {
RNA_enum_set(op->ptr, "proportional", proportional);
RNA_enum_set(op->ptr, "proportional_edit_falloff", t->prop_mode);
RNA_float_set(op->ptr, "proportional_size", t->prop_size);
}
- if ((prop = RNA_struct_find_property(op->ptr, "axis")))
- {
+ if ((prop = RNA_struct_find_property(op->ptr, "axis"))) {
RNA_property_float_set_array(op->ptr, prop, t->axis);
}
- if ((prop = RNA_struct_find_property(op->ptr, "mirror")))
- {
+ if ((prop = RNA_struct_find_property(op->ptr, "mirror"))) {
RNA_property_boolean_set(op->ptr, prop, t->flag & T_MIRROR);
}
- if ((prop = RNA_struct_find_property(op->ptr, "constraint_axis")))
- {
+ if ((prop = RNA_struct_find_property(op->ptr, "constraint_axis"))) {
/* constraint orientation can be global, event if user selects something else
* so use the orientation in the constraint if set
* */
@@ -1498,8 +1518,7 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
RNA_enum_set(op->ptr, "constraint_orientation", t->current_orientation);
}
- if (t->con.mode & CON_APPLY)
- {
+ if (t->con.mode & CON_APPLY) {
if (t->con.mode & CON_AXIS0) {
constraint_axis[0] = 1;
}
@@ -1527,8 +1546,7 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int
t->state = TRANS_STARTING;
- if ( (prop = RNA_struct_find_property(op->ptr, "texture_space")) && RNA_property_is_set(op->ptr, prop))
- {
+ if ( (prop = RNA_struct_find_property(op->ptr, "texture_space")) && RNA_property_is_set(op->ptr, prop)) {
if (RNA_property_boolean_get(op->ptr, prop)) {
options |= CTX_TEXTURE;
}
@@ -1540,8 +1558,7 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int
t->launch_event = event ? event->type : -1;
- if (t->launch_event == EVT_TWEAK_R)
- {
+ if (t->launch_event == EVT_TWEAK_R) {
t->launch_event = RIGHTMOUSE;
}
else if (t->launch_event == EVT_TWEAK_L) {
@@ -1550,18 +1567,15 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int
// XXX Remove this when wm_operator_call_internal doesn't use window->eventstate (which can have type = 0)
// For manipulator only, so assume LEFTMOUSE
- if (t->launch_event == 0)
- {
+ if (t->launch_event == 0) {
t->launch_event = LEFTMOUSE;
}
- if (!initTransInfo(C, t, op, event)) // internal data, mouse, vectors
- {
+ if (!initTransInfo(C, t, op, event)) { /* internal data, mouse, vectors */
return 0;
}
- if (t->spacetype == SPACE_VIEW3D)
- {
+ if (t->spacetype == SPACE_VIEW3D) {
//calc_manipulator_stats(curarea);
initTransformOrientation(C, t);
@@ -1592,15 +1606,12 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int
}
/* Stupid code to have Ctrl-Click on manipulator work ok */
- if (event)
- {
+ if (event) {
wmKeyMap *keymap = WM_keymap_active(CTX_wm_manager(C), op->type->modalkeymap);
wmKeyMapItem *kmi;
- for (kmi = keymap->items.first; kmi; kmi = kmi->next)
- {
- if (kmi->propvalue == TFM_MODAL_SNAP_INV_ON && kmi->val == KM_PRESS)
- {
+ for (kmi = keymap->items.first; kmi; kmi = kmi->next) {
+ if (kmi->propvalue == TFM_MODAL_SNAP_INV_ON && kmi->val == KM_PRESS) {
if ((ELEM(kmi->type, LEFTCTRLKEY, RIGHTCTRLKEY) && event->ctrl) ||
(ELEM(kmi->type, LEFTSHIFTKEY, RIGHTSHIFTKEY) && event->shift) ||
(ELEM(kmi->type, LEFTALTKEY, RIGHTALTKEY) && event->alt) ||
@@ -1731,16 +1742,14 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int
break;
}
- if (t->state == TRANS_CANCEL)
- {
+ if (t->state == TRANS_CANCEL) {
postTrans(C, t);
return 0;
}
/* overwrite initial values if operator supplied a non-null vector */
- if ( (prop = RNA_struct_find_property(op->ptr, "value")) && RNA_property_is_set(op->ptr, prop))
- {
+ if ((prop = RNA_struct_find_property(op->ptr, "value")) && RNA_property_is_set(op->ptr, prop)) {
float values[4]= {0}; /* in case value isn't length 4, avoid uninitialized memory */
if (RNA_property_array_check(prop)) {
@@ -1756,22 +1765,19 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int
}
/* Transformation axis from operator */
- if ((prop = RNA_struct_find_property(op->ptr, "axis")) && RNA_property_is_set(op->ptr, prop))
- {
+ if ((prop = RNA_struct_find_property(op->ptr, "axis")) && RNA_property_is_set(op->ptr, prop)) {
RNA_property_float_get_array(op->ptr, prop, t->axis);
normalize_v3(t->axis);
copy_v3_v3(t->axis_orig, t->axis);
}
/* Constraint init from operator */
- if ((prop = RNA_struct_find_property(op->ptr, "constraint_axis")) && RNA_property_is_set(op->ptr, prop))
- {
+ if ((prop = RNA_struct_find_property(op->ptr, "constraint_axis")) && RNA_property_is_set(op->ptr, prop)) {
int constraint_axis[3];
RNA_property_boolean_get_array(op->ptr, prop, constraint_axis);
- if (constraint_axis[0] || constraint_axis[1] || constraint_axis[2])
- {
+ if (constraint_axis[0] || constraint_axis[1] || constraint_axis[2]) {
t->con.mode |= CON_APPLY;
if (constraint_axis[0]) {
@@ -1797,8 +1803,7 @@ void transformApply(bContext *C, TransInfo *t)
{
t->context = C;
- if ((t->redraw & TREDRAW_HARD) || (t->draw_handle_apply == NULL && (t->redraw & TREDRAW_SOFT)))
- {
+ 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()
@@ -1811,13 +1816,11 @@ void transformApply(bContext *C, TransInfo *t)
}
/* If auto confirm is on, break after one pass */
- if (t->options & CTX_AUTOCONFIRM)
- {
+ if (t->options & CTX_AUTOCONFIRM) {
t->state = TRANS_CONFIRM;
}
- if (BKE_ptcache_get_continue_physics())
- {
+ if (BKE_ptcache_get_continue_physics()) {
// TRANSFORM_FIX_ME
//do_screenhandlers(G.curscreen);
t->redraw |= TREDRAW_HARD;
@@ -1842,11 +1845,9 @@ int transformEnd(bContext *C, TransInfo *t)
t->context = C;
- if (t->state != TRANS_STARTING && t->state != TRANS_RUNNING)
- {
+ if (t->state != TRANS_STARTING && t->state != TRANS_RUNNING) {
/* handle restoring objects */
- if (t->state == TRANS_CANCEL)
- {
+ if (t->state == TRANS_CANCEL) {
/* exception, edge slide transformed UVs too */
if (t->mode==TFM_EDGE_SLIDE)
doEdgeSlide(t, 0.0f);
@@ -1942,8 +1943,8 @@ static void protectedAxisAngleBits(short protectflag, float axis[3], float *angl
/* axis-angle get limited with euler... */
float eul[3], oldeul[3];
- axis_angle_to_eulO( eul, EULER_ORDER_DEFAULT,axis, *angle);
- axis_angle_to_eulO( oldeul, EULER_ORDER_DEFAULT,oldAxis, oldAngle);
+ axis_angle_to_eulO(eul, EULER_ORDER_DEFAULT, axis, *angle);
+ axis_angle_to_eulO(oldeul, EULER_ORDER_DEFAULT, oldAxis, oldAngle);
if (protectflag & OB_LOCK_ROTX)
eul[0]= oldeul[0];
@@ -1952,7 +1953,7 @@ static void protectedAxisAngleBits(short protectflag, float axis[3], float *angl
if (protectflag & OB_LOCK_ROTZ)
eul[2]= oldeul[2];
- eulO_to_axis_angle( axis, angle,eul, EULER_ORDER_DEFAULT);
+ eulO_to_axis_angle(axis, angle, eul, EULER_ORDER_DEFAULT);
/* when converting to axis-angle, we need a special exception for the case when there is no axis */
if (IS_EQF(axis[0], axis[1]) && IS_EQF(axis[1], axis[2])) {
@@ -1998,7 +1999,7 @@ static void protectedQuaternionBits(short protectflag, float *quat, float *oldqu
if (protectflag & OB_LOCK_ROTZ)
eul[2]= oldeul[2];
- eul_to_quat( quat,eul);
+ eul_to_quat(quat, eul);
/* restore original quat size */
mul_qt_fl(quat, qlen);
@@ -2097,8 +2098,7 @@ static void constraintob_from_transdata(bConstraintOb *cob, TransData *td)
* - current space should be local
*/
memset(cob, 0, sizeof(bConstraintOb));
- if (td->ext)
- {
+ if (td->ext) {
if (td->ext->rotOrder == ROT_MODE_QUAT) {
/* quats */
/* objects and bones do normalization first too, otherwise
@@ -2175,15 +2175,15 @@ static void constraintRotLim(TransInfo *UNUSED(t), TransData *td)
/* copy results from cob->matrix */
if (td->ext->rotOrder == ROT_MODE_QUAT) {
/* quats */
- mat4_to_quat( td->ext->quat,cob.matrix);
+ mat4_to_quat(td->ext->quat, cob.matrix);
}
else if (td->ext->rotOrder == ROT_MODE_AXISANGLE) {
/* axis angle */
- mat4_to_axis_angle( &td->ext->quat[1], &td->ext->quat[0],cob.matrix);
+ mat4_to_axis_angle(&td->ext->quat[1], &td->ext->quat[0], cob.matrix);
}
else {
/* eulers */
- mat4_to_eulO( td->ext->rot, td->ext->rotOrder,cob.matrix);
+ mat4_to_eulO(td->ext->rot, td->ext->rotOrder, cob.matrix);
}
}
}
@@ -2209,7 +2209,7 @@ static void constraintSizeLim(TransInfo *t, TransData *td)
if (td->flag & TD_SINGLESIZE)
return;
- size_to_mat4( cob.matrix,td->ext->size);
+ size_to_mat4(cob.matrix, td->ext->size);
}
/* Evaluate valid constraints */
@@ -2260,7 +2260,7 @@ static void constraintSizeLim(TransInfo *t, TransData *td)
if (td->flag & TD_SINGLESIZE)
return;
- mat4_to_size( td->ext->size,cob.matrix);
+ mat4_to_size(td->ext->size, cob.matrix);
}
}
}
@@ -2271,8 +2271,7 @@ static void postInputWarp(TransInfo *t, float values[3])
{
mul_v3_fl(values, (float)(M_PI * 2));
- if (t->customData) /* non-null value indicates reversed input */
- {
+ if (t->customData) { /* non-null value indicates reversed input */
negate_v3(values);
}
}
@@ -2324,8 +2323,7 @@ int handleEventWarp(TransInfo *t, wmEvent *event)
{
int status = 0;
- if (event->type == MIDDLEMOUSE && event->val==KM_PRESS)
- {
+ if (event->type == MIDDLEMOUSE && event->val == KM_PRESS) {
// Use customData pointer to signal warp direction
if (t->customData == NULL)
t->customData = (void*)1;
@@ -2465,11 +2463,9 @@ int handleEventShear(TransInfo *t, wmEvent *event)
{
int status = 0;
- if (event->type == MIDDLEMOUSE && event->val==KM_PRESS)
- {
+ if (event->type == MIDDLEMOUSE && event->val == KM_PRESS) {
// Use customData pointer to signal Shear direction
- if (t->customData == NULL)
- {
+ if (t->customData == NULL) {
initMouseInputMode(t, &t->mouse, INPUT_VERTICAL_ABSOLUTE);
t->customData = (void*)1;
}
@@ -2603,7 +2599,7 @@ static void headerResize(TransInfo *t, float vec[3], char *str)
}
if (t->con.mode & CON_APPLY) {
- switch(t->num.idx_max) {
+ switch (t->num.idx_max) {
case 0:
spos += sprintf(spos, "Scale: %s%s %s", &tvec[0], t->con.text, t->proptext);
break;
@@ -2632,7 +2628,7 @@ static void headerResize(TransInfo *t, float vec[3], char *str)
#define VECSIGNFLIP(a, b) ((SIGN(a[0]) & SIGN(b[0]))==0 || (SIGN(a[1]) & SIGN(b[1]))==0 || (SIGN(a[2]) & SIGN(b[2]))==0)
/* smat is reference matrix, only scaled */
-static void TransMat3ToSize( float mat[][3], float smat[][3], float *size)
+static void TransMat3ToSize(float mat[][3], float smat[][3], float *size)
{
float vec[3];
@@ -2692,7 +2688,7 @@ static void ElementResize(TransInfo *t, TransData *td, float mat[3][3])
//print_v3("fsize", fsize);
}
else {
- mat3_to_size( fsize,tmat);
+ mat3_to_size(fsize, tmat);
}
protectedSizeBits(td->protectflag, fsize);
@@ -2755,8 +2751,7 @@ int Resize(TransInfo *t, const int mval[2])
char str[200];
/* for manipulator, center handle, the scaling can't be done relative to center */
- if ( (t->flag & T_USES_MANIPULATOR) && t->con.mode==0)
- {
+ if ( (t->flag & T_USES_MANIPULATOR) && t->con.mode==0) {
ratio = 1.0f - ((t->imval[0] - mval[0]) + (t->imval[1] - mval[1]))/100.0f;
}
else {
@@ -2774,14 +2769,13 @@ int Resize(TransInfo *t, const int mval[2])
applySnapping(t, size);
- if (t->flag & T_AUTOVALUES)
- {
+ if (t->flag & T_AUTOVALUES) {
copy_v3_v3(size, t->auto_values);
}
copy_v3_v3(t->values, size);
- size_to_mat3( mat,size);
+ size_to_mat3(mat, size);
if (t->con.applySize) {
t->con.applySize(t, NULL, mat);
@@ -2803,7 +2797,7 @@ int Resize(TransInfo *t, const int mval[2])
/* evil hack - redo resize if cliping needed */
if (t->flag & T_CLIP_UV && clipUVTransform(t, size, 1)) {
- size_to_mat3( mat,size);
+ size_to_mat3(mat, size);
if (t->con.applySize)
t->con.applySize(t, NULL, mat);
@@ -2972,14 +2966,14 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
add_v3_v3v3(td->loc, vec, center);
- sub_v3_v3v3(vec,td->loc,td->iloc);
+ sub_v3_v3v3(vec, td->loc, td->iloc);
protectedTransBits(td->protectflag, vec);
add_v3_v3v3(td->loc, td->iloc, vec);
if (td->flag & TD_USEQUAT) {
mul_serie_m3(fmat, td->mtx, mat, td->smtx, NULL, NULL, NULL, NULL, NULL);
- 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);
@@ -3008,8 +3002,7 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
copy_m3_m4(pmtx, t->poseobj->obmat);
invert_m3_m3(imtx, pmtx);
- if ((td->flag & TD_NO_LOC) == 0)
- {
+ if ((td->flag & TD_NO_LOC) == 0) {
sub_v3_v3v3(vec, td->center, center);
mul_m3_v3(pmtx, vec); // To Global space
@@ -3047,7 +3040,7 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
if (td->ext->rotOrder == ROT_MODE_QUAT) {
mul_serie_m3(fmat, td->mtx, mat, td->smtx, NULL, NULL, NULL, NULL, NULL);
- 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 */
@@ -3061,10 +3054,10 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
axis_angle_to_quat(iquat, td->ext->irotAxis, td->ext->irotAngle);
mul_serie_m3(fmat, td->mtx, mat, td->smtx, NULL, NULL, NULL, NULL, NULL);
- 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);
+ quat_to_axis_angle(td->ext->rotAxis, td->ext->rotAngle, tquat);
/* this function works on end result */
protectedAxisAngleBits(td->protectflag, td->ext->rotAxis, td->ext->rotAngle, td->ext->irotAxis, td->ext->irotAngle);
@@ -3077,12 +3070,12 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
/* calculate the total rotatation in eulers */
copy_v3_v3(eul, td->ext->irot);
- eulO_to_mat3( eulmat,eul, td->ext->rotOrder);
+ eulO_to_mat3(eulmat, eul, td->ext->rotOrder);
/* mat = transform, obmat = bone rotation */
mul_m3_m3m3(fmat, smat, eulmat);
- mat3_to_compatible_eulO( eul, td->ext->rot, td->ext->rotOrder,fmat);
+ mat3_to_compatible_eulO(eul, td->ext->rot, td->ext->rotOrder, fmat);
/* and apply (to end result only) */
protectedRotateBits(td->protectflag, eul, td->ext->irot);
@@ -3093,8 +3086,7 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
}
}
else {
- if ((td->flag & TD_NO_LOC) == 0)
- {
+ if ((td->flag & TD_NO_LOC) == 0) {
/* translation */
sub_v3_v3v3(vec, td->center, center);
mul_m3_v3(mat, vec);
@@ -3116,7 +3108,7 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
/* euler or quaternion? */
if ((td->ext->rotOrder == ROT_MODE_QUAT) || (td->flag & TD_USEQUAT)) {
mul_serie_m3(fmat, td->mtx, mat, td->smtx, NULL, NULL, NULL, NULL, NULL);
- 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 */
@@ -3129,10 +3121,10 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
axis_angle_to_quat(iquat, td->ext->irotAxis, td->ext->irotAngle);
mul_serie_m3(fmat, td->mtx, mat, td->smtx, NULL, NULL, NULL, NULL, NULL);
- 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);
+ quat_to_axis_angle(td->ext->rotAxis, td->ext->rotAngle, tquat);
/* this function works on end result */
protectedAxisAngleBits(td->protectflag, td->ext->rotAxis, td->ext->rotAngle, td->ext->irotAxis, td->ext->irotAngle);
@@ -3145,11 +3137,11 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
/* calculate the total rotatation in eulers */
add_v3_v3v3(eul, td->ext->irot, td->ext->drot); /* we have to correct for delta rot */
- eulO_to_mat3( obmat,eul, td->ext->rotOrder);
+ eulO_to_mat3(obmat, eul, td->ext->rotOrder);
/* mat = transform, obmat = object rotation */
mul_m3_m3m3(fmat, smat, obmat);
- mat3_to_compatible_eulO( eul, td->ext->rot, td->ext->rotOrder,fmat);
+ mat3_to_compatible_eulO(eul, td->ext->rot, td->ext->rotOrder, fmat);
/* correct back for delta rot */
sub_v3_v3v3(eul, eul, td->ext->drot);
@@ -3170,7 +3162,7 @@ static void applyRotation(TransInfo *t, float angle, float axis[3])
float mat[3][3];
int i;
- vec_rot_to_mat3( mat,axis, angle);
+ vec_rot_to_mat3(mat, axis, angle);
for (i = 0 ; i < t->total; i++, td++) {
@@ -3182,10 +3174,10 @@ static void applyRotation(TransInfo *t, float angle, float axis[3])
if (t->con.applyRot) {
t->con.applyRot(t, td, axis, NULL);
- vec_rot_to_mat3( mat,axis, angle * td->factor);
+ vec_rot_to_mat3(mat, axis, angle * td->factor);
}
else if (t->flag & T_PROP_EDIT) {
- vec_rot_to_mat3( mat,axis, angle * td->factor);
+ vec_rot_to_mat3(mat, axis, angle * td->factor);
}
ElementRotation(t, td, mat, t->around);
@@ -3271,8 +3263,8 @@ static void applyTrackball(TransInfo *t, float axis1[3], float axis2[3], float a
float mat[3][3], smat[3][3], totmat[3][3];
int i;
- vec_rot_to_mat3( smat,axis1, angles[0]);
- vec_rot_to_mat3( totmat,axis2, angles[1]);
+ vec_rot_to_mat3(smat, axis1, angles[0]);
+ vec_rot_to_mat3(totmat, axis2, angles[1]);
mul_m3_m3m3(mat, smat, totmat);
@@ -3284,8 +3276,8 @@ static void applyTrackball(TransInfo *t, float axis1[3], float axis2[3], float a
continue;
if (t->flag & T_PROP_EDIT) {
- vec_rot_to_mat3( smat,axis1, td->factor * angles[0]);
- vec_rot_to_mat3( totmat,axis2, td->factor * angles[1]);
+ vec_rot_to_mat3(smat, axis1, td->factor * angles[0]);
+ vec_rot_to_mat3(totmat, axis2, td->factor * angles[1]);
mul_m3_m3m3(mat, smat, totmat);
}
@@ -3332,8 +3324,8 @@ int Trackball(TransInfo *t, const int UNUSED(mval[2]))
}
(void)spos;
- vec_rot_to_mat3( smat,axis1, phi[0]);
- vec_rot_to_mat3( totmat,axis2, phi[1]);
+ vec_rot_to_mat3(smat, axis1, phi[0]);
+ vec_rot_to_mat3(totmat, axis2, phi[1]);
mul_m3_m3m3(mat, smat, totmat);
@@ -3440,7 +3432,7 @@ static void headerTranslation(TransInfo *t, float vec[3], char *str)
autoik[0]= '\0';
if (t->con.mode & CON_APPLY) {
- switch(t->num.idx_max) {
+ switch (t->num.idx_max) {
case 0:
spos += sprintf(spos, "D: %s (%s)%s %s %s", &tvec[0], distvec, t->con.text, t->proptext, &autoik[0]);
break;
@@ -3491,7 +3483,7 @@ static void applyTranslation(TransInfo *t, float vec[3])
axis_angle_to_quat(quat, axis, angle);
- quat_to_mat3( mat,quat);
+ quat_to_mat3(mat, quat);
ElementRotation(t, td, mat, V3D_LOCAL);
}
@@ -3899,7 +3891,7 @@ void initBevel(TransInfo *t)
int handleEventBevel(TransInfo *t, wmEvent *event)
{
- if (event->val==KM_PRESS) {
+ if (event->val == KM_PRESS) {
if (!G.editBMesh) return 0;
switch (event->type) {
@@ -3932,7 +3924,7 @@ int handleEventBevel(TransInfo *t, wmEvent *event)
int Bevel(TransInfo *t, const int UNUSED(mval[2]))
{
- float distance,d;
+ float distance, d;
int i;
char str[128];
const char *mode;
@@ -4185,9 +4177,9 @@ static void ElementBoneSize(TransInfo *t, TransData *td, float mat[3][3])
/* we've tucked the scale in loc */
oldy= td->iloc[1];
- size_to_mat3( sizemat,td->iloc);
+ size_to_mat3(sizemat, td->iloc);
mul_m3_m3m3(tmat, tmat, sizemat);
- mat3_to_size( td->loc,tmat);
+ mat3_to_size(td->loc, tmat);
td->loc[1]= oldy;
}
@@ -4217,7 +4209,7 @@ int BoneSize(TransInfo *t, const int mval[2])
constraintNumInput(t, size);
}
- size_to_mat3( mat,size);
+ size_to_mat3(mat, size);
if (t->con.applySize) {
t->con.applySize(t, NULL, mat);
@@ -4394,8 +4386,8 @@ static int createSlideVerts(TransInfo *t)
BMEdge *e, *e1 /*, *ee, *le */ /* UNUSED */;
BMVert *v, *v2, *first;
BMLoop *l, *l1, *l2;
- TransDataSlideVert *tempsv;
- BMBVHTree *btree = BMBVH_NewBVH(em, 0, NULL, NULL);
+ TransDataSlideVert *sv_array;
+ BMBVHTree *btree = BMBVH_NewBVH(em, BMBVH_RESPECT_HIDDEN, NULL, NULL);
SmallHash table;
SlideData *sld = MEM_callocN(sizeof(*sld), "sld");
View3D *v3d = t->sa ? t->sa->spacedata.first : NULL;
@@ -4468,7 +4460,7 @@ static int createSlideVerts(TransInfo *t)
return 0;
}
- tempsv = MEM_callocN(sizeof(TransDataSlideVert)*j, "tempsv");
+ sv_array = MEM_callocN(sizeof(TransDataSlideVert) * j, "sv_array");
j = 0;
while (1) {
@@ -4527,7 +4519,7 @@ static int createSlideVerts(TransInfo *t)
/*iterate over the loop*/
first = v;
do {
- TransDataSlideVert *sv = tempsv + j;
+ TransDataSlideVert *sv = sv_array + j;
sv->v = v;
sv->origvert = *v;
@@ -4550,7 +4542,7 @@ static int createSlideVerts(TransInfo *t)
if (!e) {
//v2=v, v = BM_edge_other_vert(l1->e, v);
- sv = tempsv + j + 1;
+ sv = sv_array + j + 1;
sv->v = v;
sv->origvert = *v;
@@ -4583,7 +4575,7 @@ static int createSlideVerts(TransInfo *t)
//EDBM_flag_disable_all(em, BM_ELEM_SELECT);
- sld->sv = tempsv;
+ sld->sv = sv_array;
sld->totsv = j;
/*find mouse vector*/
@@ -4611,19 +4603,19 @@ static int createSlideVerts(TransInfo *t)
j = GET_INT_FROM_POINTER(BLI_smallhash_lookup(&table, (uintptr_t)v));
- if (tempsv[j].down) {
- ED_view3d_project_float_v3(ar, tempsv[j].down->co, vec1, projectMat);
+ if (sv_array[j].down) {
+ ED_view3d_project_float_v3(ar, sv_array[j].down->co, vec1, projectMat);
}
else {
- add_v3_v3v3(vec1, v->co, tempsv[j].downvec);
+ add_v3_v3v3(vec1, v->co, sv_array[j].downvec);
ED_view3d_project_float_v3(ar, vec1, vec1, projectMat);
}
- if (tempsv[j].up) {
- ED_view3d_project_float_v3(ar, tempsv[j].up->co, vec2, projectMat);
+ if (sv_array[j].up) {
+ ED_view3d_project_float_v3(ar, sv_array[j].up->co, vec2, projectMat);
}
else {
- add_v3_v3v3(vec1, v->co, tempsv[j].upvec);
+ add_v3_v3v3(vec1, v->co, sv_array[j].upvec);
ED_view3d_project_float_v3(ar, vec2, vec2, projectMat);
}
@@ -4642,13 +4634,13 @@ static int createSlideVerts(TransInfo *t)
bmesh_edit_begin(bm, BMO_OP_FLAG_UNTAN_MULTIRES);
/*create copies of faces for customdata projection*/
- tempsv = sld->sv;
- for (i=0; i<sld->totsv; i++, tempsv++) {
+ sv_array = sld->sv;
+ for (i=0; i<sld->totsv; i++, sv_array++) {
BMIter fiter, liter;
BMFace *f;
BMLoop *l;
- BM_ITER_ELEM (f, &fiter, tempsv->v, BM_FACES_OF_VERT) {
+ BM_ITER_ELEM (f, &fiter, sv_array->v, BM_FACES_OF_VERT) {
if (!BLI_smallhash_haskey(&sld->origfaces, (uintptr_t)f)) {
BMFace *copyf = BM_face_copy(bm, f, TRUE, TRUE);
@@ -4666,7 +4658,7 @@ static int createSlideVerts(TransInfo *t)
}
}
- BLI_smallhash_insert(&sld->vhash, (uintptr_t)tempsv->v, tempsv);
+ BLI_smallhash_insert(&sld->vhash, (uintptr_t)sv_array->v, sv_array);
}
sld->origfaces_init = TRUE;
@@ -4698,7 +4690,7 @@ static int createSlideVerts(TransInfo *t)
void projectSVData(TransInfo *t, int final)
{
SlideData *sld = t->customData;
- TransDataSlideVert *tempsv;
+ TransDataSlideVert *sv;
BMEditMesh *em = sld->em;
SmallHash visit;
int i;
@@ -4716,15 +4708,23 @@ void projectSVData(TransInfo *t, int final)
BLI_smallhash_init(&visit);
- for (i=0, tempsv=sld->sv; i<sld->totsv; i++, tempsv++) {
+ for (i=0, sv = sld->sv; i < sld->totsv; sv++, i++) {
BMIter fiter;
BMFace *f;
- BM_ITER_ELEM (f, &fiter, tempsv->v, BM_FACES_OF_VERT) {
- BMIter liter2;
- BMFace *copyf, *copyf2;
- BMLoop *l2;
- int sel, hide;
+
+ /* BMESH_TODO, this interpolates between vertex/loops which are not moved
+ * (are only apart of a face attached to a slide vert), couldn't we iterate BM_LOOPS_OF_VERT
+ * here and only iterpolate those? */
+ BM_ITER_ELEM (f, &fiter, sv->v, BM_FACES_OF_VERT) {
+ BMIter liter;
+ BMLoop *l;
+
+ BMFace *f_copy; /* the copy of 'f' */
+ BMFace *f_copy_flip; /* the copy of 'f' or detect if we need to flip to the shorter side. */
+
+ char is_sel, is_hide;
+
if (BLI_smallhash_haskey(&visit, (uintptr_t)f))
continue;
@@ -4734,50 +4734,98 @@ void projectSVData(TransInfo *t, int final)
/* the face attributes of the copied face will get
* copied over, so its necessary to save the selection
* and hidden state*/
- sel = BM_elem_flag_test(f, BM_ELEM_SELECT);
- hide = BM_elem_flag_test(f, BM_ELEM_HIDDEN);
+ is_sel = BM_elem_flag_test(f, BM_ELEM_SELECT);
+ is_hide = BM_elem_flag_test(f, BM_ELEM_HIDDEN);
- copyf2 = BLI_smallhash_lookup(&sld->origfaces, (uintptr_t)f);
+ f_copy = BLI_smallhash_lookup(&sld->origfaces, (uintptr_t)f);
/* project onto copied projection face */
- BM_ITER_ELEM (l2, &liter2, f, BM_LOOPS_OF_FACE) {
- copyf = copyf2;
-
- if (BM_elem_flag_test(l2->e, BM_ELEM_SELECT) || BM_elem_flag_test(l2->prev->e, BM_ELEM_SELECT)) {
- BMLoop *l3 = l2;
+ BM_ITER_ELEM (l, &liter, f, BM_LOOPS_OF_FACE) {
+ f_copy_flip = f_copy;
+
+ if (BM_elem_flag_test(l->e, BM_ELEM_SELECT) || BM_elem_flag_test(l->prev->e, BM_ELEM_SELECT)) {
+ /* the loop is attached of the selected edges that are sliding */
+ BMLoop *l_ed_sel = l;
- if (!BM_elem_flag_test(l2->e, BM_ELEM_SELECT))
- l3 = l3->prev;
+ if (!BM_elem_flag_test(l->e, BM_ELEM_SELECT))
+ l_ed_sel = l_ed_sel->prev;
- if (sld->perc < 0.0 && BM_vert_in_face(l3->radial_next->f, tempsv->down)) {
- copyf = BLI_smallhash_lookup(&sld->origfaces, (uintptr_t)l3->radial_next->f);
+ if (sld->perc < 0.0f) {
+ if (BM_vert_in_face(l_ed_sel->radial_next->f, sv->down)) {
+ f_copy_flip = BLI_smallhash_lookup(&sld->origfaces, (uintptr_t)l_ed_sel->radial_next->f);
+ }
}
- else if (sld->perc > 0.0 && BM_vert_in_face(l3->radial_next->f, tempsv->up)) {
- copyf = BLI_smallhash_lookup(&sld->origfaces, (uintptr_t)l3->radial_next->f);
+ else if (sld->perc > 0.0f) {
+ if (BM_vert_in_face(l_ed_sel->radial_next->f, sv->up)) {
+ f_copy_flip = BLI_smallhash_lookup(&sld->origfaces, (uintptr_t)l_ed_sel->radial_next->f);
+ }
}
- if (!copyf)
+
+ BLI_assert(f_copy_flip != NULL);
+ if (!f_copy_flip) {
continue; /* shouldn't happen, but protection */
+ }
+ }
+ else {
+ /* the loop is attached to only one vertex and not a selected edge,
+ * this means we have to find a selected edges face going in the right direction
+ * to copy from else we get bad distortion see: [#31080] */
+ BMIter eiter;
+ BMEdge *e_sel;
+
+ BM_ITER_ELEM (e_sel, &eiter, l->v, BM_EDGES_OF_VERT) {
+ if (BM_elem_flag_test(e_sel, BM_ELEM_SELECT)) {;
+ break;
+ }
+ }
+
+ if (e_sel) {
+ /* warning if the UV's are not contiguous, this will copy from the _wrong_ UVs
+ * in fact whenever the face being copied is not 'f_copy' this can happen,
+ * we could be a lot smarter about this but would need to deal with every UV channel or
+ * add a way to mask out lauers when calling #BM_loop_interp_from_face() */
+ if (sld->perc < 0.0f) {
+ if (BM_vert_in_face(e_sel->l->f, sv->down)) {
+ f_copy_flip = BLI_smallhash_lookup(&sld->origfaces, (uintptr_t)e_sel->l->f);
+ }
+ else if (BM_vert_in_face(e_sel->l->radial_next->f, sv->down)) {
+ f_copy_flip = BLI_smallhash_lookup(&sld->origfaces, (uintptr_t)e_sel->l->radial_next->f);
+ }
+
+ }
+ else if (sld->perc > 0.0f) {
+ if (BM_vert_in_face(e_sel->l->f, sv->up)) {
+ f_copy_flip = BLI_smallhash_lookup(&sld->origfaces, (uintptr_t)e_sel->l->f);
+ }
+ else if (BM_vert_in_face(e_sel->l->radial_next->f, sv->up)) {
+ f_copy_flip = BLI_smallhash_lookup(&sld->origfaces, (uintptr_t)e_sel->l->radial_next->f);
+ }
+ }
+ }
+
}
/* only loop data, no vertex data since that contains shape keys,
* and we do not want to mess up other shape keys */
- BM_loop_interp_from_face(em->bm, l2, copyf, FALSE, FALSE);
+ BM_loop_interp_from_face(em->bm, l, f_copy_flip, FALSE, FALSE);
if (final) {
- BM_loop_interp_multires(em->bm, l2, copyf);
- if (copyf2 != copyf) {
- BM_loop_interp_multires(em->bm, l2, copyf2);
+ BM_loop_interp_multires(em->bm, l, f_copy_flip);
+ if (f_copy != f_copy_flip) {
+ BM_loop_interp_multires(em->bm, l, f_copy);
}
}
}
/* make sure face-attributes are correct (e.g. MTexPoly) */
- BM_elem_attrs_copy(em->bm, em->bm, copyf2, f);
+ BM_elem_attrs_copy(em->bm, em->bm, f_copy, f);
/* restore selection and hidden flags */
- BM_face_select_set(em->bm, f, sel);
- if (!hide) { /* this check is a workaround for bug, see note - [#30735], without this edge can be hidden and selected */
- BM_elem_hide_set(em->bm, f, hide);
+ BM_face_select_set(em->bm, f, is_sel);
+ if (!is_hide) {
+ /* this check is a workaround for bug, see note - [#30735],
+ * without this edge can be hidden and selected */
+ BM_elem_hide_set(em->bm, f, is_hide);
}
}
}
@@ -4785,7 +4833,8 @@ void projectSVData(TransInfo *t, int final)
BLI_smallhash_release(&visit);
}
-void freeSlideTempFaces(SlideData *sld) {
+void freeSlideTempFaces(SlideData *sld)
+{
if (sld->origfaces_init) {
SmallHashIter hiter;
BMFace *copyf;
@@ -4808,14 +4857,14 @@ void freeSlideVerts(TransInfo *t)
#if 0 /*BMESH_TODO*/
if (me->drawflag & ME_DRAWEXTRA_EDGELEN) {
- TransDataSlideVert *tempsv;
+ TransDataSlideVert *sv;
LinkNode *look = sld->vertlist;
GHash *vertgh = sld->vhash;
while (look) {
- tempsv = BLI_ghash_lookup(vertgh,(EditVert*)look->link);
- if (tempsv != NULL) {
- tempsv->up->f &= !SELECT;
- tempsv->down->f &= !SELECT;
+ sv = BLI_ghash_lookup(vertgh, (EditVert*)look->link);
+ if (sv != NULL) {
+ sv->up->f &= !SELECT;
+ sv->down->f &= !SELECT;
}
look = look->next;
}
@@ -5118,7 +5167,7 @@ int Mirror(TransInfo *t, const int UNUSED(mval[2]))
if (t->con.mode & CON_APPLY) {
size[0] = size[1] = size[2] = -1;
- size_to_mat3( mat,size);
+ size_to_mat3(mat, size);
if (t->con.applySize) {
t->con.applySize(t, NULL, mat);
@@ -5143,7 +5192,7 @@ int Mirror(TransInfo *t, const int UNUSED(mval[2]))
else {
size[0] = size[1] = size[2] = 1;
- size_to_mat3( mat,size);
+ size_to_mat3(mat, size);
for (i = 0, td=t->data; i < t->total; i++, td++) {
if (td->flag & TD_NOACTION)
@@ -5186,8 +5235,7 @@ int Align(TransInfo *t, const int UNUSED(mval[2]))
/* saving original center */
copy_v3_v3(center, t->center);
- for (i = 0 ; i < t->total; i++, td++)
- {
+ for (i = 0 ; i < t->total; i++, td++) {
float mat[3][3], invmat[3][3];
if (td->flag & TD_NOACTION)
@@ -5412,7 +5460,7 @@ static void doAnimEdit_SnapFrame(TransInfo *t, TransData *td, TransData2D *td2d,
/* do the snapping to nearest frame/second */
if (doTime) {
- val= (float)( floor((val/secf) + 0.5f) * secf );
+ val= (float)(floor((val/secf) + 0.5f) * secf);
}
else
#endif
@@ -5551,9 +5599,9 @@ static void applyTimeTranslate(TransInfo *t, float UNUSED(sval))
if (autosnap == SACTSNAP_STEP) {
if (doTime)
- deltax= (float)( floor((deltax/secf) + 0.5f) * secf );
+ deltax= (float)(floor((deltax/secf) + 0.5f) * secf);
else
- deltax= (float)( floor(deltax + 0.5f) );
+ deltax= (float)(floor(deltax + 0.5f));
}
val = BKE_nla_tweakedit_remap(adt, td->ival, NLATIME_CONVERT_MAP);
@@ -5565,9 +5613,9 @@ static void applyTimeTranslate(TransInfo *t, float UNUSED(sval))
if (autosnap == SACTSNAP_STEP) {
if (doTime)
- val= (float)( floor((deltax/secf) + 0.5f) * secf );
+ val= (float)(floor((deltax/secf) + 0.5f) * secf);
else
- val= (float)( floor(val + 0.5f) );
+ val= (float)(floor(val + 0.5f));
}
*(td->val) = td->ival + val;
@@ -5817,9 +5865,9 @@ static void applyTimeScale(TransInfo *t)
if (autosnap == SACTSNAP_STEP) {
if (doTime)
- fac= (float)( floor(fac/secf + 0.5f) * secf );
+ fac= (float)(floor(fac/secf + 0.5f) * secf);
else
- fac= (float)( floor(fac + 0.5f) );
+ fac= (float)(floor(fac + 0.5f));
}
/* check if any need to apply nla-mapping */
diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h
index 0bef33149d7..69af8cf2489 100644
--- a/source/blender/editors/transform/transform.h
+++ b/source/blender/editors/transform/transform.h
@@ -68,7 +68,7 @@ struct ReportList;
struct SmallHash;
typedef struct TransSnapPoint {
- struct TransSnapPoint *next,*prev;
+ struct TransSnapPoint *next, *prev;
float co[3];
} TransSnapPoint;
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c
index 18e9c1a47b8..b18d132f8df 100644
--- a/source/blender/editors/transform/transform_constraints.c
+++ b/source/blender/editors/transform/transform_constraints.c
@@ -76,8 +76,7 @@ static void drawObjectConstraint(TransInfo *t);
static void constraintAutoValues(TransInfo *t, float vec[3])
{
int mode = t->con.mode;
- if (mode & CON_APPLY)
- {
+ if (mode & CON_APPLY) {
float nval = (t->flag & T_NULL_ONE)?1.0f:0.0f;
if ((mode & CON_AXIS0) == 0) {
@@ -478,7 +477,7 @@ static void applyAxisConstraintRot(TransInfo *t, TransData *td, float vec[3], fl
if (!td && t->con.mode & CON_APPLY) {
int mode = t->con.mode & (CON_AXIS0|CON_AXIS1|CON_AXIS2);
- switch(mode) {
+ switch (mode) {
case CON_AXIS0:
case (CON_AXIS1|CON_AXIS2):
copy_v3_v3(vec, t->con.mtx[0]);
@@ -525,7 +524,7 @@ static void applyObjectConstraintRot(TransInfo *t, TransData *td, float vec[3],
td= t->data;
}
- switch(mode) {
+ switch (mode) {
case CON_AXIS0:
case (CON_AXIS1|CON_AXIS2):
copy_v3_v3(vec, td->axismtx[0]);
@@ -604,7 +603,7 @@ void setUserConstraint(TransInfo *t, short orientation, int mode, const char fte
{
char text[40];
- switch(orientation) {
+ switch (orientation) {
case V3D_MANIP_GLOBAL:
{
float mtx[3][3]= MAT3_UNITY;
@@ -665,7 +664,7 @@ void drawConstraint(TransInfo *t)
else {
if (tc->mode & CON_SELECT) {
float vec[3];
- char col2[3] = {255,255,255};
+ char col2[3] = {255, 255, 255};
int depth_test_enabled;
convertViewVec(t, vec, (t->mval[0] - t->con.imval[0]), (t->mval[1] - t->con.imval[1]));
@@ -768,7 +767,7 @@ static void drawObjectConstraint(TransInfo *t)
td++;
- for (i=1;i<t->total;i++,td++) {
+ for (i=1; i < t->total; i++, td++) {
if (t->con.mode & CON_AXIS0) {
drawLine(t, td->ob->obmat[3], td->axismtx[0], 'X', 0);
}
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 57540b58f61..3cd41edacf5 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -127,8 +127,7 @@ static void qsort_trans_data(TransInfo *t, TransData *head, TransData *tail, Tra
TransData *itail = tail;
*temp = *head;
- while (head < tail)
- {
+ while (head < tail) {
if (t->flag & T_PROP_CONNECTED) {
while ((tail->dist >= temp->dist) && (head < tail))
tail--;
@@ -138,8 +137,7 @@ static void qsort_trans_data(TransInfo *t, TransData *head, TransData *tail, Tra
tail--;
}
- if (head != tail)
- {
+ if (head != tail) {
*head = *tail;
head++;
}
@@ -153,8 +151,7 @@ static void qsort_trans_data(TransInfo *t, TransData *head, TransData *tail, Tra
head++;
}
- if (head != tail)
- {
+ if (head != tail) {
*tail = *head;
tail--;
}
@@ -269,7 +266,7 @@ static void createTransTexspace(TransInfo *t)
}
id = ob->data;
- if (id == NULL || !ELEM3( GS(id->name), ID_ME, ID_CU, ID_MB )) {
+ if (id == NULL || !ELEM3(GS(id->name), ID_ME, ID_CU, ID_MB )) {
t->total = 0;
return;
}
@@ -287,7 +284,7 @@ static void createTransTexspace(TransInfo *t)
normalize_m3(td->axismtx);
invert_m3_m3(td->smtx, td->mtx);
- if (give_obdata_texspace(ob, &texflag, &td->loc, &td->ext->size, &td->ext->rot)) {
+ if (BKE_object_obdata_texspace_get(ob, &texflag, &td->loc, &td->ext->size, &td->ext->rot)) {
ob->dtx |= OB_TEXSPACE;
*texflag &= ~ME_AUTOSPACE;
}
@@ -421,58 +418,13 @@ static short apply_targetless_ik(Object *ob)
/* pose_mat(b) = pose_mat(b-1) * offs_bone * channel * constraint * IK */
/* we put in channel the entire result of rmat= (channel * constraint * IK) */
/* pose_mat(b) = pose_mat(b-1) * offs_bone * rmat */
- /* rmat = pose_mat(b) * inv( pose_mat(b-1) * offs_bone ) */
+ /* rmat = pose_mat(b) * inv(pose_mat(b-1) * offs_bone ) */
parchan= chanlist[segcount-1];
bone= parchan->bone;
bone->flag |= BONE_TRANSFORM; /* ensures it gets an auto key inserted */
- /* XXX Old code. Will remove it later. */
-#if 0
- if (parchan->parent) {
- Bone *parbone= parchan->parent->bone;
- float offs_bone[4][4];
-
- /* offs_bone = yoffs(b-1) + root(b) + bonemat(b) */
- copy_m4_m3(offs_bone, bone->bone_mat);
-
- /* The bone's root offset (is in the parent's coordinate system) */
- copy_v3_v3(offs_bone[3], bone->head);
-
- /* Get the length translation of parent (length along y axis) */
- offs_bone[3][1]+= parbone->length;
-
- /* pose_mat(b-1) * offs_bone */
- if (parchan->bone->flag & BONE_HINGE) {
- /* the rotation of the parent restposition */
- copy_m4_m4(rmat, parbone->arm_mat); /* rmat used as temp */
-
- /* the location of actual parent transform */
- copy_v3_v3(rmat[3], offs_bone[3]);
- offs_bone[3][0]= offs_bone[3][1]= offs_bone[3][2]= 0.0f;
- mul_m4_v3(parchan->parent->pose_mat, rmat[3]);
-
- mult_m4_m4m4(tmat, rmat, offs_bone);
- }
- else if (parchan->bone->flag & BONE_NO_SCALE) {
- mult_m4_m4m4(tmat, parchan->parent->pose_mat, offs_bone);
- normalize_m4(tmat);
- }
- else
- mult_m4_m4m4(tmat, parchan->parent->pose_mat, offs_bone);
-
- invert_m4_m4(imat, tmat);
- }
- else {
- copy_m4_m3(tmat, bone->bone_mat);
-
- copy_v3_v3(tmat[3], bone->head);
- invert_m4_m4(imat, tmat);
- }
- /* result matrix */
- mult_m4_m4m4(rmat, imat, parchan->pose_mat);
-#endif
- armature_mat_pose_to_bone(parchan, parchan->pose_mat, rmat);
+ BKE_armature_mat_pose_to_bone(parchan, parchan->pose_mat, rmat);
/* apply and decompose, doesn't work for constraints or non-uniform scale well */
{
@@ -487,25 +439,25 @@ static short apply_targetless_ik(Object *ob)
* and applied poses.
*/
if (parchan->rotmode > 0)
- mat3_to_eulO(parchan->eul, parchan->rotmode,rmat3);
+ mat3_to_eulO(parchan->eul, parchan->rotmode, rmat3);
else if (parchan->rotmode == ROT_MODE_AXISANGLE)
- mat3_to_axis_angle(parchan->rotAxis, &parchan->rotAngle,rmat3);
+ mat3_to_axis_angle(parchan->rotAxis, &parchan->rotAngle, rmat3);
else
- mat3_to_quat(parchan->quat,rmat3);
+ mat3_to_quat(parchan->quat, rmat3);
/* for size, remove rotation */
/* causes problems with some constraints (so apply only if needed) */
if (data->flag & CONSTRAINT_IK_STRETCH) {
if (parchan->rotmode > 0)
- eulO_to_mat3( qrmat,parchan->eul, parchan->rotmode);
+ eulO_to_mat3(qrmat, parchan->eul, parchan->rotmode);
else if (parchan->rotmode == ROT_MODE_AXISANGLE)
- axis_angle_to_mat3( qrmat,parchan->rotAxis, parchan->rotAngle);
+ axis_angle_to_mat3(qrmat, parchan->rotAxis, parchan->rotAngle);
else
- quat_to_mat3( qrmat,parchan->quat);
+ quat_to_mat3(qrmat, parchan->quat);
invert_m3_m3(imat3, qrmat);
mul_m3_m3m3(smat, rmat3, imat3);
- mat3_to_size( parchan->size,smat);
+ mat3_to_size(parchan->size, smat);
}
/* causes problems with some constraints (e.g. childof), so disable this */
@@ -535,13 +487,11 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr
td->ob = ob;
td->flag = TD_SELECTED;
- if (bone->flag & BONE_HINGE_CHILD_TRANSFORM)
- {
+ if (bone->flag & BONE_HINGE_CHILD_TRANSFORM) {
td->flag |= TD_NOCENTER;
}
- if (bone->flag & BONE_TRANSFORM_CHILD)
- {
+ if (bone->flag & BONE_TRANSFORM_CHILD) {
td->flag |= TD_NOCENTER;
td->flag |= TD_NO_LOC;
}
@@ -585,11 +535,11 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr
/* proper way to get parent transform + own transform + constraints transform */
copy_m3_m4(omat, ob->obmat);
- /* New code, using "generic" pchan_to_pose_mat(). */
+ /* New code, using "generic" BKE_pchan_to_pose_mat(). */
{
float rotscale_mat[4][4], loc_mat[4][4];
- pchan_to_pose_mat(pchan, rotscale_mat, loc_mat);
+ BKE_pchan_to_pose_mat(pchan, rotscale_mat, loc_mat);
if (t->mode == TFM_TRANSLATION)
copy_m3_m4(pmat, loc_mat);
else
@@ -598,54 +548,12 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr
if (constraints_list_needinv(t, &pchan->constraints)) {
copy_m3_m4(tmat, pchan->constinv);
invert_m3_m3(cmat, tmat);
- mul_serie_m3(td->mtx, pmat, omat, cmat, NULL,NULL,NULL,NULL,NULL);
+ mul_serie_m3(td->mtx, pmat, omat, cmat, NULL, NULL, NULL, NULL, NULL);
}
else
- mul_serie_m3(td->mtx, pmat, omat, NULL, NULL,NULL,NULL,NULL,NULL);
+ mul_serie_m3(td->mtx, pmat, omat, NULL, NULL, NULL, NULL, NULL, NULL);
}
- /* XXX Old code. Will remove it later. */
-#if 0
- if (ELEM(t->mode, TFM_TRANSLATION, TFM_RESIZE) && (pchan->bone->flag & BONE_NO_LOCAL_LOCATION))
- unit_m3(bmat);
- else
- copy_m3_m3(bmat, pchan->bone->bone_mat);
-
- if (pchan->parent) {
- if (pchan->bone->flag & BONE_HINGE) {
- copy_m3_m4(pmat, pchan->parent->bone->arm_mat);
- if (!(pchan->bone->flag & BONE_NO_SCALE)) {
- float tsize[3], tsmat[3][3];
- mat4_to_size(tsize, pchan->parent->pose_mat);
- size_to_mat3(tsmat, tsize);
- mul_m3_m3m3(pmat, tsmat, pmat);
- }
- }
- else {
- copy_m3_m4(pmat, pchan->parent->pose_mat);
- if (pchan->bone->flag & BONE_NO_SCALE)
- normalize_m3(pmat);
- }
-
- if (constraints_list_needinv(t, &pchan->constraints)) {
- copy_m3_m4(tmat, pchan->constinv);
- invert_m3_m3(cmat, tmat);
- mul_serie_m3(td->mtx, bmat, pmat, omat, cmat, NULL,NULL,NULL,NULL);
- }
- else
- mul_serie_m3(td->mtx, bmat, pmat, omat, NULL,NULL,NULL,NULL,NULL);
- }
- else {
- if (constraints_list_needinv(t, &pchan->constraints)) {
- copy_m3_m4(tmat, pchan->constinv);
- invert_m3_m3(cmat, tmat);
- mul_serie_m3(td->mtx, bmat, omat, cmat, NULL,NULL,NULL,NULL,NULL);
- }
- else
- mul_m3_m3m3(td->mtx, omat, bmat);
- }
-# endif
-
invert_m3_m3(td->smtx, td->mtx);
/* exceptional case: rotate the pose bone which also applies transformation
@@ -710,9 +618,8 @@ static void bone_children_clear_transflag(int mode, short around, ListBase *lb)
{
Bone *bone= lb->first;
- for (;bone;bone= bone->next) {
- if ((bone->flag & BONE_HINGE) && (bone->flag & BONE_CONNECTED))
- {
+ for ( ; bone;bone= bone->next) {
+ if ((bone->flag & BONE_HINGE) && (bone->flag & BONE_CONNECTED)) {
bone->flag |= BONE_HINGE_CHILD_TRANSFORM;
}
else if ((bone->flag & BONE_TRANSFORM) &&
@@ -773,7 +680,7 @@ int count_set_pose_transflags(int *out_mode, short around, Object *ob)
total++;
if (mode == TFM_TRANSLATION) {
- if ( has_targetless_ik(pchan)==NULL ) {
+ if (has_targetless_ik(pchan) == NULL) {
if (pchan->parent && (pchan->bone->flag & BONE_CONNECTED)) {
if (pchan->bone->flag & BONE_HINGE_CHILD_TRANSFORM)
hastranslation = 1;
@@ -788,8 +695,7 @@ int count_set_pose_transflags(int *out_mode, short around, Object *ob)
}
/* if there are no translatable bones, do rotation */
- if (mode == TFM_TRANSLATION && !hastranslation)
- {
+ if (mode == TFM_TRANSLATION && !hastranslation) {
*out_mode = TFM_ROTATION;
}
@@ -826,7 +732,7 @@ static void pchan_autoik_adjust (bPoseChannel *pchan, short chainlen)
}
/* change the chain-length of auto-ik */
-void transform_autoik_update (TransInfo *t, short mode)
+void transform_autoik_update(TransInfo *t, short mode)
{
short *chainlen= &t->settings->autoik_chainlen;
bPoseChannel *pchan;
@@ -978,7 +884,7 @@ static short pose_grab_with_ik_children(bPose *pose, Bone *bone)
}
}
if (wentdeeper==0) {
- bPoseChannel *pchan= get_pose_channel(pose, bone->name);
+ bPoseChannel *pchan= BKE_pose_channel_find_name(pose, bone->name);
if (pchan)
added+= pose_grab_with_ik_add(pchan);
}
@@ -1047,7 +953,7 @@ static void createTransPose(TransInfo *t, Object *ob)
t->total= 0;
/* check validity of state */
- arm= get_armature(ob);
+ arm= BKE_armature_from_object(ob);
if ((arm==NULL) || (ob->pose==NULL)) return;
if (arm->flag & ARM_RESTPOS) {
@@ -1117,16 +1023,13 @@ static void createTransArmatureVerts(TransInfo *t)
t->mode= TFM_BONE_ENVELOPE;
t->total = 0;
- for (ebo = edbo->first; ebo; ebo = ebo->next)
- {
- if (EBONE_VISIBLE(arm, ebo) && !(ebo->flag & BONE_EDITMODE_LOCKED))
- {
- if (t->mode==TFM_BONESIZE)
- {
+ for (ebo = edbo->first; ebo; ebo = ebo->next) {
+ if (EBONE_VISIBLE(arm, ebo) && !(ebo->flag & BONE_EDITMODE_LOCKED)) {
+ if (t->mode == TFM_BONESIZE) {
if (ebo->flag & BONE_SELECTED)
t->total++;
}
- else if (t->mode==TFM_BONE_ROLL) {
+ else if (t->mode == TFM_BONE_ROLL) {
if (ebo->flag & BONE_SELECTED)
t->total++;
}
@@ -1146,16 +1049,12 @@ static void createTransArmatureVerts(TransInfo *t)
td = t->data = MEM_callocN(t->total*sizeof(TransData), "TransEditBone");
- for (ebo = edbo->first; ebo; ebo = ebo->next)
- {
+ for (ebo = edbo->first; ebo; ebo = ebo->next) {
ebo->oldlength = ebo->length; // length==0.0 on extrude, used for scaling radius of bone points
- if (EBONE_VISIBLE(arm, ebo) && !(ebo->flag & BONE_EDITMODE_LOCKED))
- {
- if (t->mode==TFM_BONE_ENVELOPE)
- {
- if (ebo->flag & BONE_ROOTSEL)
- {
+ if (EBONE_VISIBLE(arm, ebo) && !(ebo->flag & BONE_EDITMODE_LOCKED)) {
+ if (t->mode==TFM_BONE_ENVELOPE) {
+ if (ebo->flag & BONE_ROOTSEL) {
td->val= &ebo->rad_head;
td->ival= *td->val;
@@ -1171,8 +1070,7 @@ static void createTransArmatureVerts(TransInfo *t)
td++;
}
- if (ebo->flag & BONE_TIPSEL)
- {
+ if (ebo->flag & BONE_TIPSEL) {
td->val= &ebo->rad_tail;
td->ival= *td->val;
copy_v3_v3(td->center, ebo->tail);
@@ -1191,8 +1089,7 @@ static void createTransArmatureVerts(TransInfo *t)
}
else if (t->mode==TFM_BONESIZE) {
if (ebo->flag & BONE_SELECTED) {
- if (arm->drawtype==ARM_ENVELOPE)
- {
+ if (arm->drawtype==ARM_ENVELOPE) {
td->loc= NULL;
td->val= &ebo->dist;
td->ival= ebo->dist;
@@ -1222,8 +1119,7 @@ static void createTransArmatureVerts(TransInfo *t)
}
}
else if (t->mode==TFM_BONE_ROLL) {
- if (ebo->flag & BONE_SELECTED)
- {
+ if (ebo->flag & BONE_SELECTED) {
td->loc= NULL;
td->val= &(ebo->roll);
td->ival= ebo->roll;
@@ -1238,8 +1134,7 @@ static void createTransArmatureVerts(TransInfo *t)
}
}
else {
- if (ebo->flag & BONE_TIPSEL)
- {
+ if (ebo->flag & BONE_TIPSEL) {
copy_v3_v3(td->iloc, ebo->tail);
copy_v3_v3(td->center, (t->around==V3D_LOCAL) ? ebo->head : td->iloc);
td->loc= ebo->tail;
@@ -1253,8 +1148,7 @@ static void createTransArmatureVerts(TransInfo *t)
sub_v3_v3v3(delta, ebo->tail, ebo->head);
vec_roll_to_mat3(delta, ebo->roll, td->axismtx);
- if ((ebo->flag & BONE_ROOTSEL) == 0)
- {
+ if ((ebo->flag & BONE_ROOTSEL) == 0) {
td->extra = ebo;
}
@@ -1264,8 +1158,7 @@ static void createTransArmatureVerts(TransInfo *t)
td++;
}
- if (ebo->flag & BONE_ROOTSEL)
- {
+ if (ebo->flag & BONE_ROOTSEL) {
copy_v3_v3(td->iloc, ebo->head);
copy_v3_v3(td->center, td->iloc);
td->loc= ebo->head;
@@ -1443,7 +1336,7 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
if (cu->editnurb==NULL) return;
/* count total of vertices, check identical as in 2nd loop for making transdata! */
- nurbs= curve_editnurbs(cu);
+ nurbs= BKE_curve_editNurbs_get(cu);
for (nu= nurbs->first; nu; nu= nu->next) {
if (nu->type == CU_BEZIER) {
for (a=0, bezt= nu->bezt; a<nu->pntsu; a++, bezt++) {
@@ -1593,7 +1486,7 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
* but for now just don't change handle types */
if (ELEM(t->mode, TFM_CURVE_SHRINKFATTEN, TFM_TILT) == 0) {
/* sets the handles based on their selection, do this after the data is copied to the TransData */
- testhandlesNurb(nu);
+ BKE_nurb_handles_test(nu);
}
}
else {
@@ -1708,7 +1601,7 @@ static void createTransParticleVerts(bContext *C, TransInfo *t)
PTCacheEditPoint *point;
PTCacheEditKey *key;
float mat[4][4];
- int i,k, transformparticle;
+ int i, k, transformparticle;
int count = 0, hasselected = 0;
int propmode = t->flag & T_PROP_EDIT;
@@ -1717,7 +1610,7 @@ static void createTransParticleVerts(bContext *C, TransInfo *t)
psys = edit->psys;
if (psys)
- psmd = psys_get_modifier(ob,psys);
+ psmd = psys_get_modifier(ob, psys);
base->flag |= BA_HAS_RECALC_DATA;
@@ -1757,7 +1650,7 @@ static void createTransParticleVerts(bContext *C, TransInfo *t)
unit_m4(mat);
- invert_m4_m4(ob->imat,ob->obmat);
+ invert_m4_m4(ob->imat, ob->obmat);
for (i=0, point=edit->points; i<edit->totpoint; i++, point++) {
TransData *head, *tail;
@@ -1840,7 +1733,7 @@ void flushTransParticles(TransInfo *t)
if (psys && !(psys->flag & PSYS_GLOBAL_HAIR)) {
psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, psys->particles + i, mat);
- invert_m4_m4(imat,mat);
+ invert_m4_m4(imat, mat);
for (k=0, key=point->keys; k<point->totkey; k++, key++) {
copy_v3_v3(co, key->world_co);
@@ -2035,8 +1928,7 @@ static void createTransEditVerts(bContext *C, TransInfo *t)
char *selstate = NULL;
short selectmode = ts->selectmode;
- if (t->flag & T_MIRROR)
- {
+ if (t->flag & T_MIRROR) {
EDBM_verts_mirror_cache_begin(em, TRUE);
mirror = 1;
}
@@ -2147,7 +2039,7 @@ static void createTransEditVerts(bContext *C, TransInfo *t)
* the modifiers that support deform matrices (defcos) */
if (totleft > 0) {
mappedcos= crazyspace_get_mapped_editverts(t->scene, t->obedit);
- quats= MEM_mallocN( (t->total)*sizeof(float)*4, "crazy quats");
+ quats= MEM_mallocN((t->total)*sizeof(float)*4, "crazy quats");
crazyspace_set_quats_editmesh(em, (float*)defcos, mappedcos, quats); /* BMESH_TODO, abuses vertex index, should use an int array */
if (mappedcos)
MEM_freeN(mappedcos);
@@ -2163,8 +2055,7 @@ static void createTransEditVerts(bContext *C, TransInfo *t)
eve = BM_iter_new(&iter, bm, BM_VERTS_OF_MESH, NULL);
for (a=0; eve; eve=BM_iter_step(&iter), a++) {
if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN) && selstate[a] && eve->co[0]!=0.0f) {
- if (eve->co[0]<0.0f)
- {
+ if (eve->co[0] < 0.0f) {
t->mirror = -1;
mirror = -1;
}
@@ -2225,7 +2116,7 @@ static void createTransEditVerts(bContext *C, TransInfo *t)
}
/* Mirror? */
- if ( (mirror>0 && tob->iloc[0]>0.0f) || (mirror<0 && tob->iloc[0]<0.0f)) {
+ if ((mirror>0 && tob->iloc[0]>0.0f) || (mirror<0 && tob->iloc[0]<0.0f)) {
BMVert *vmir= EDBM_verts_mirror_get(em, eve); //t->obedit, em, eve, tob->iloc, a);
if (vmir && vmir != eve) {
tob->extra = vmir;
@@ -2236,13 +2127,10 @@ static void createTransEditVerts(bContext *C, TransInfo *t)
}
}
- if (mirror != 0)
- {
+ if (mirror != 0) {
tob = t->data;
- for ( a = 0; a < t->total; a++, tob++ )
- {
- if (ABS(tob->loc[0]) <= 0.00001f)
- {
+ for (a = 0; a < t->total; a++, tob++ ) {
+ if (ABS(tob->loc[0]) <= 0.00001f) {
tob->flag |= TD_MIRROR_EDGE;
}
}
@@ -2386,7 +2274,7 @@ void flushTransSeq(TransInfo *t)
if (seq->depth==0) {
/* test overlap, displayes red outline */
seq->flag &= ~SEQ_OVERLAP;
- if ( seq_test_overlap(seqbasep, seq) ) {
+ if (seq_test_overlap(seqbasep, seq)) {
seq->flag |= SEQ_OVERLAP;
}
}
@@ -2455,14 +2343,14 @@ static void createTransUVs(bContext *C, TransInfo *t)
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
tf= CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if (!uvedit_face_visible(scene, ima, efa, tf)) {
+ if (!uvedit_face_visible_test(scene, ima, efa, tf)) {
BM_elem_flag_disable(efa, BM_ELEM_TAG);
continue;
}
BM_elem_flag_enable(efa, BM_ELEM_TAG);
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
- if (uvedit_uv_selected(em, scene, l))
+ if (uvedit_uv_select_test(em, scene, l))
countsel++;
if (propmode)
@@ -2490,11 +2378,11 @@ static void createTransUVs(bContext *C, TransInfo *t)
continue;
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
- if (!propmode && !uvedit_uv_selected(em, scene, l))
+ if (!propmode && !uvedit_uv_select_test(em, scene, l))
continue;
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
- UVsToTransData(sima, td++, td2d++, luv->uv, uvedit_uv_selected(em, scene, l));
+ UVsToTransData(sima, td++, td2d++, luv->uv, uvedit_uv_select_test(em, scene, l));
}
}
@@ -2707,8 +2595,7 @@ static void createTransNlaData(bContext *C, TransInfo *t)
center[2]= 0.0f;
/* set td's based on which handles are applicable */
- if (FrameOnMouseSide(t->frame_side, strip->start, (float)CFRA))
- {
+ if (FrameOnMouseSide(t->frame_side, strip->start, (float)CFRA)) {
/* just set tdn to assume that it only has one handle for now */
tdn->handle= -1;
@@ -2739,8 +2626,7 @@ static void createTransNlaData(bContext *C, TransInfo *t)
td->extra= tdn;
td++;
}
- if (FrameOnMouseSide(t->frame_side, strip->end, (float)CFRA))
- {
+ if (FrameOnMouseSide(t->frame_side, strip->end, (float)CFRA)) {
/* if tdn is already holding the start handle, then we're doing both, otherwise, only end */
tdn->handle= (tdn->handle) ? 2 : 1;
@@ -3081,14 +2967,14 @@ typedef struct tGPFtransdata {
} tGPFtransdata;
/* This function helps flush transdata written to tempdata into the gp-frames */
-void flushTransGPactionData (TransInfo *t)
+void flushTransGPactionData(TransInfo *t)
{
tGPFtransdata *tfd;
int i;
/* find the first one to start from */
if (t->mode == TFM_TIME_SLIDE)
- tfd= (tGPFtransdata *)( (float *)(t->customData) + 2 );
+ tfd= (tGPFtransdata *)((float *)(t->customData) + 2);
else
tfd= (tGPFtransdata *)(t->customData);
@@ -3207,7 +3093,7 @@ static void createTransActionData(bContext *C, TransInfo *t)
if (ac.datatype == ANIMCONT_GPENCIL) {
if (t->mode == TFM_TIME_SLIDE) {
t->customData= MEM_callocN((sizeof(float)*2)+(sizeof(tGPFtransdata)*count), "TimeSlide + tGPFtransdata");
- tfd= (tGPFtransdata *)( (float *)(t->customData) + 2 );
+ tfd= (tGPFtransdata *)((float *)(t->customData) + 2);
}
else {
t->customData= MEM_callocN(sizeof(tGPFtransdata)*count, "tGPFtransdata");
@@ -3562,9 +3448,9 @@ static void createTransGraphEditData(bContext *C, TransInfo *t)
* then check if we're using auto-handles.
* - If so, change them auto-handles to aligned handles so that handles get affected too
*/
- if ( ELEM(bezt->h1, HD_AUTO, HD_AUTO_ANIM) &&
- ELEM(bezt->h2, HD_AUTO, HD_AUTO_ANIM) &&
- ELEM(t->mode, TFM_ROTATION, TFM_RESIZE))
+ if (ELEM(bezt->h1, HD_AUTO, HD_AUTO_ANIM) &&
+ ELEM(bezt->h2, HD_AUTO, HD_AUTO_ANIM) &&
+ ELEM(t->mode, TFM_ROTATION, TFM_RESIZE))
{
if (hdata && (sel1) && (sel3)) {
bezt->h1= HD_ALIGN;
@@ -3653,8 +3539,8 @@ static void sort_time_beztmaps (BeztMap *bezms, int totvert, const short UNUSED(
* optimization: this only needs to be performed in the first loop
*/
if (bezm->swapHs == 0) {
- if ( (bezm->bezt->vec[0][0] > bezm->bezt->vec[1][0]) &&
- (bezm->bezt->vec[2][0] < bezm->bezt->vec[1][0]) )
+ if ((bezm->bezt->vec[0][0] > bezm->bezt->vec[1][0]) &&
+ (bezm->bezt->vec[2][0] < bezm->bezt->vec[1][0]) )
{
/* handles need to be swapped */
bezm->swapHs = 1;
@@ -3753,7 +3639,7 @@ static void beztmap_to_data (TransInfo *t, FCurve *fcu, BeztMap *bezms, int totv
* anim_data is the list of channels (F-Curves) retrieved already containing the
* channels to work on. It should not be freed here as it may still need to be used.
*/
-void remake_graph_transdata (TransInfo *t, ListBase *anim_data)
+void remake_graph_transdata(TransInfo *t, ListBase *anim_data)
{
SpaceIpo *sipo = (SpaceIpo *)t->sa->spacedata.first;
bAnimListElem *ale;
@@ -3808,9 +3694,9 @@ void flushTransGraphData(TransInfo *t)
switch (sipo->autosnap) {
case SACTSNAP_FRAME: /* snap to nearest frame (or second if drawing seconds) */
if (sipo->flag & SIPO_DRAWTIME)
- td2d->loc[0]= (float)( floor((td2d->loc[0]/secf) + 0.5f) * secf );
+ td2d->loc[0] = (float)(floorf((td2d->loc[0]/secf) + 0.5f) * secf);
else
- td2d->loc[0]= (float)( floor(td2d->loc[0]+0.5f) );
+ td2d->loc[0] = (float)(floorf(td2d->loc[0]+0.5f));
break;
case SACTSNAP_MARKER: /* snap to nearest marker */
@@ -3973,7 +3859,7 @@ static int SeqTransCount(TransInfo *t, Sequence *parent, ListBase *seqbase, int
for (seq= seqbase->first; seq; seq= seq->next) {
seq->depth= depth;
- /* seq->tmp is used by seq_tx_get_final_{left,right} to check sequence's range and clamp to it if needed.
+ /* seq->tmp is used by seq_tx_get_final_{left, right} to check sequence's range and clamp to it if needed.
* it's first place where digging into sequences tree, so store link to parent here */
seq->tmp = parent;
@@ -3993,7 +3879,7 @@ static TransData *SeqToTransData(TransData *td, TransData2D *td2d, TransDataSeq
{
int start_left;
- switch(sel_flag) {
+ switch (sel_flag) {
case SELECT:
/* Use seq_tx_get_final_left() and an offset here
* so transform has the left hand location of the strip.
@@ -4267,9 +4153,9 @@ static void createTransSeqData(bContext *C, TransInfo *t)
int i;
for (i=0; i<3; i++) {
seq_user= *((&seq->seq1) + i);
- if ( seq_user && (seq_user->flag & SELECT) &&
- !(seq_user->flag & SEQ_LOCK) &&
- !(seq_user->flag & (SEQ_LEFTSEL|SEQ_RIGHTSEL)))
+ if (seq_user && (seq_user->flag & SELECT) &&
+ !(seq_user->flag & SEQ_LOCK) &&
+ !(seq_user->flag & (SEQ_LEFTSEL|SEQ_RIGHTSEL)))
{
seq->flag |= SELECT;
}
@@ -4372,15 +4258,15 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob)
if (skip_invert == 0 && constinv == 0) {
if (constinv == 0)
- ob->transflag |= OB_NO_CONSTRAINTS; /* where_is_object_time checks this */
+ ob->transflag |= OB_NO_CONSTRAINTS; /* BKE_object_where_is_calc_time checks this */
- where_is_object(t->scene, ob);
+ BKE_object_where_is_calc(t->scene, ob);
if (constinv == 0)
ob->transflag &= ~OB_NO_CONSTRAINTS;
}
else
- where_is_object(t->scene, ob);
+ BKE_object_where_is_calc(t->scene, ob);
td->ob = ob;
@@ -4434,7 +4320,7 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob)
* NOTE: some Constraints, and also Tracking should never get this
* done, as it doesn't work well.
*/
- object_to_mat3(ob, obmtx);
+ BKE_object_to_mat3(ob, obmtx);
copy_m3_m4(totmat, ob->obmat);
invert_m3_m3(obinv, totmat);
mul_m3_m3m3(td->smtx, obmtx, obinv);
@@ -4447,8 +4333,7 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob)
}
/* set active flag */
- if (ob == OBACT)
- {
+ if (ob == OBACT) {
td->flag |= TD_ACTIVE;
}
}
@@ -4472,12 +4357,12 @@ static void set_trans_object_base_flags(TransInfo *t)
return;
/* makes sure base flags and object flags are identical */
- copy_baseflags(t->scene);
+ BKE_scene_base_flag_to_objects(t->scene);
/* handle pending update events, otherwise they got copied below */
for (base= scene->base.first; base; base= base->next) {
if (base->object->recalc)
- object_handle_update(t->scene, base->object);
+ BKE_object_handle_update(t->scene, base->object);
}
for (base= scene->base.first; base; base= base->next) {
@@ -4490,7 +4375,7 @@ static void set_trans_object_base_flags(TransInfo *t)
/* if parent selected, deselect */
while (parsel) {
if (parsel->flag & SELECT) {
- Base *parbase = object_in_scene(parsel, scene);
+ Base *parbase = BKE_scene_base_find(scene, parsel);
if (parbase) { /* in rare cases this can fail */
if (TESTBASELIB_BGMODE(v3d, scene, parbase)) {
break;
@@ -4500,8 +4385,7 @@ static void set_trans_object_base_flags(TransInfo *t)
parsel= parsel->parent;
}
- if (parsel)
- {
+ if (parsel) {
/* rotation around local centers are allowed to propagate */
if ((t->mode == TFM_ROTATION || t->mode == TFM_TRACKBALL) && t->around == V3D_LOCAL) {
base->flag |= BA_TRANSFORM_CHILD;
@@ -4534,10 +4418,8 @@ static int mark_children(Object *ob)
if (ob->flag & (SELECT|BA_TRANSFORM_CHILD))
return 1;
- if (ob->parent)
- {
- if (mark_children(ob->parent))
- {
+ if (ob->parent) {
+ if (mark_children(ob->parent)) {
ob->flag |= BA_TRANSFORM_CHILD;
return 1;
}
@@ -4554,8 +4436,7 @@ static int count_proportional_objects(TransInfo *t)
Base *base;
/* rotations around local centers are allowed to propagate, so we take all objects */
- if (!((t->mode == TFM_ROTATION || t->mode == TFM_TRACKBALL) && t->around == V3D_LOCAL))
- {
+ if (!((t->mode == TFM_ROTATION || t->mode == TFM_TRACKBALL) && t->around == V3D_LOCAL)) {
/* mark all parents */
for (base= scene->base.first; base; base= base->next) {
if (TESTBASELIB_BGMODE(v3d, scene, base)) {
@@ -4572,8 +4453,8 @@ static int count_proportional_objects(TransInfo *t)
/* mark all children */
for (base= scene->base.first; base; base= base->next) {
/* all base not already selected or marked that is editable */
- if ( (base->object->flag & (SELECT|BA_TRANSFORM_CHILD|BA_TRANSFORM_PARENT)) == 0 &&
- (BASE_EDITABLE_BGMODE(v3d, scene, base)))
+ if ((base->object->flag & (SELECT|BA_TRANSFORM_CHILD|BA_TRANSFORM_PARENT)) == 0 &&
+ (BASE_EDITABLE_BGMODE(v3d, scene, base)))
{
mark_children(base->object);
}
@@ -4584,8 +4465,8 @@ static int count_proportional_objects(TransInfo *t)
Object *ob= base->object;
/* if base is not selected, not a parent of selection or not a child of selection and it is editable */
- if ( (ob->flag & (SELECT|BA_TRANSFORM_CHILD|BA_TRANSFORM_PARENT)) == 0 &&
- (BASE_EDITABLE_BGMODE(v3d, scene, base)))
+ if ((ob->flag & (SELECT|BA_TRANSFORM_CHILD|BA_TRANSFORM_PARENT)) == 0 &&
+ (BASE_EDITABLE_BGMODE(v3d, scene, base)))
{
/* used for flush, depgraph will change recalcs if needed :) */
@@ -4616,8 +4497,7 @@ static void clear_trans_object_base_flags(TransInfo *t)
Scene *sce = t->scene;
Base *base;
- for (base= sce->base.first; base; base = base->next)
- {
+ for (base= sce->base.first; base; base = base->next) {
if (base->flag & BA_WAS_SEL)
base->flag |= SELECT;
@@ -4937,14 +4817,16 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
ED_node_link_intersect_test(t->sa, 0);
}
else if (t->spacetype == SPACE_CLIP) {
- SpaceClip *sc = t->sa->spacedata.first;
- MovieClip *clip = ED_space_clip(sc);
-
- if (t->scene->nodetree) {
- /* tracks can be used for stabilization nodes,
- * flush update for such nodes */
- nodeUpdateID(t->scene->nodetree, &clip->id);
- WM_event_add_notifier(C, NC_SCENE|ND_NODES, NULL);
+ if (t->options & CTX_MOVIECLIP) {
+ SpaceClip *sc = t->sa->spacedata.first;
+ MovieClip *clip = ED_space_clip(sc);
+
+ if (t->scene->nodetree) {
+ /* tracks can be used for stabilization nodes,
+ * flush update for such nodes */
+ nodeUpdateID(t->scene->nodetree, &clip->id);
+ WM_event_add_notifier(C, NC_SCENE|ND_NODES, NULL);
+ }
}
}
else if (t->spacetype == SPACE_ACTION) {
@@ -4975,8 +4857,8 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
* 2) canceled == 0 -> user confirmed the transform, so duplicates should be removed
* 3) canceled + duplicate -> user canceled the transform, but we made duplicates, so get rid of these
*/
- if ( (saction->flag & SACTION_NOTRANSKEYCULL)==0 &&
- ((canceled == 0) || (duplicate)) )
+ if ((saction->flag & SACTION_NOTRANSKEYCULL)==0 &&
+ ((canceled == 0) || (duplicate)) )
{
if (adt) {
ANIM_nla_mapping_apply_fcurve(adt, fcu, 0, 1);
@@ -5006,8 +4888,8 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
* 2) canceled == 0 -> user confirmed the transform, so duplicates should be removed
* 3) canceled + duplicate -> user canceled the transform, but we made duplicates, so get rid of these
*/
- if ( (saction->flag & SACTION_NOTRANSKEYCULL)==0 &&
- ((canceled == 0) || (duplicate)) )
+ if ((saction->flag & SACTION_NOTRANSKEYCULL)==0 &&
+ ((canceled == 0) || (duplicate)))
{
posttrans_action_clean(&ac, (bAction *)ac.data);
}
@@ -5019,8 +4901,8 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
* 2) canceled == 0 -> user confirmed the transform, so duplicates should be removed
* 3) canceled + duplicate -> user canceled the transform, but we made duplicates, so get rid of these
*/
- if ( (saction->flag & SACTION_NOTRANSKEYCULL)==0 &&
- ((canceled == 0) || (duplicate)) )
+ if ((saction->flag & SACTION_NOTRANSKEYCULL)==0 &&
+ ((canceled == 0) || (duplicate)))
{
bGPdata *gpd;
@@ -5070,8 +4952,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
if (ANIM_animdata_get_context(C, &ac) == 0)
return;
- if (ac.datatype)
- {
+ if (ac.datatype) {
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
short filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVE_VISIBLE);
@@ -5088,8 +4969,8 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
* 2) canceled == 0 -> user confirmed the transform, so duplicates should be removed
* 3) canceled + duplicate -> user canceled the transform, but we made duplicates, so get rid of these
*/
- if ( (sipo->flag & SIPO_NOTRANSKEYCULL)==0 &&
- ((canceled == 0) || (duplicate)) )
+ if ((sipo->flag & SIPO_NOTRANSKEYCULL)==0 &&
+ ((canceled == 0) || (duplicate)))
{
if (adt) {
ANIM_nla_mapping_apply_fcurve(adt, fcu, 0, 0);
@@ -5120,8 +5001,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
if (ANIM_animdata_get_context(C, &ac) == 0)
return;
- if (ac.datatype)
- {
+ if (ac.datatype) {
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
short filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_FOREDIT);
@@ -5147,8 +5027,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
}
}
else if (t->obedit) {
- if (t->obedit->type == OB_MESH)
- {
+ if (t->obedit->type == OB_MESH) {
BMEditMesh *em = BMEdit_FromObject(t->obedit);
/* table needs to be created for each edit command, since vertices can move etc */
mesh_octree_table(t->obedit, em, NULL, 'e');
@@ -5167,7 +5046,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
* we need to update the pose otherwise no updates get called during
* transform and the auto-ik is not applied. see [#26164] */
struct Object *pose_ob=t->poseobj;
- where_is_pose(t->scene, pose_ob);
+ BKE_pose_where_is(t->scene, pose_ob);
}
/* set BONE_TRANSFORM flags for autokey, manipulator draw might have changed them */
@@ -5202,10 +5081,10 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
}
- else if ( (t->scene->basact) &&
- (ob = t->scene->basact->object) &&
- (ob->mode & OB_MODE_PARTICLE_EDIT) &&
- PE_get_current(t->scene, ob))
+ else if ((t->scene->basact) &&
+ (ob = t->scene->basact->object) &&
+ (ob->mode & OB_MODE_PARTICLE_EDIT) &&
+ PE_get_current(t->scene, ob))
{
/* do nothing */
}
@@ -5262,7 +5141,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
/* recalculating the frame positions means we loose our original transform if its not auto-keyed [#24451]
* this hack re-applies it, which is annoying, only alternatives are...
* - don't recalc paths.
- * - have an object_handle_update() which gives is the new transform without touching the objects.
+ * - have an BKE_object_handle_update() which gives is the new transform without touching the objects.
* - only recalc paths on auto-keying.
* - ED_objects_recalculate_paths could backup/restore transforms.
* - re-apply the transform which is simplest in this case. (2 lines below)
@@ -5298,15 +5177,14 @@ static void createTransObject(bContext *C, TransInfo *t)
return;
}
- if (propmode)
- {
+ if (propmode) {
t->total += count_proportional_objects(t);
}
td = t->data = MEM_callocN(t->total*sizeof(TransData), "TransOb");
tx = t->ext = MEM_callocN(t->total*sizeof(TransDataExtension), "TransObExtension");
- CTX_DATA_BEGIN(C, Base*, base, selected_bases)
+ CTX_DATA_BEGIN (C, Base*, base, selected_bases)
{
Object *ob= base->object;
@@ -5315,8 +5193,7 @@ static void createTransObject(bContext *C, TransInfo *t)
td->ext = tx;
td->ext->rotOrder= ob->rotmode;
- if (base->flag & BA_TRANSFORM_CHILD)
- {
+ if (base->flag & BA_TRANSFORM_CHILD) {
td->flag |= TD_NOCENTER;
td->flag |= TD_NO_LOC;
}
@@ -5333,8 +5210,7 @@ static void createTransObject(bContext *C, TransInfo *t)
}
CTX_DATA_END;
- if (propmode)
- {
+ if (propmode) {
Scene *scene = t->scene;
View3D *v3d = t->view;
Base *base;
@@ -5343,7 +5219,8 @@ static void createTransObject(bContext *C, TransInfo *t)
Object *ob= base->object;
/* if base is not selected, not a parent of selection or not a child of selection and it is editable */
- if ((ob->flag & (SELECT|BA_TRANSFORM_CHILD|BA_TRANSFORM_PARENT)) == 0 && BASE_EDITABLE_BGMODE(v3d, scene, base))
+ if ((ob->flag & (SELECT | BA_TRANSFORM_CHILD | BA_TRANSFORM_PARENT)) == 0 &&
+ BASE_EDITABLE_BGMODE(v3d, scene, base))
{
td->protectflag= ob->protectflag;
td->ext = tx;
@@ -5414,13 +5291,15 @@ static void createTransNodeData(bContext *C, TransInfo *t)
td = t->data = MEM_callocN(t->total*sizeof(TransData), "TransNode TransData");
td2d = t->data2d = MEM_callocN(t->total*sizeof(TransData2D), "TransNode TransData2D");
- CTX_DATA_BEGIN(C, bNode *, selnode, selected_nodes)
+ CTX_DATA_BEGIN (C, bNode *, selnode, selected_nodes)
NodeToTransData(td++, td2d++, selnode);
CTX_DATA_END
}
/* *** CLIP EDITOR *** */
+/* * motion tracking * */
+
enum {
transDataTracking_ModeTracks = 0,
transDataTracking_ModeCurves = 1,
@@ -5749,10 +5628,13 @@ static void createTransTrackingData(bContext *C, TransInfo *t)
ARegion *ar = CTX_wm_region(C);
SpaceClip *sc = CTX_wm_space_clip(C);
MovieClip *clip = ED_space_clip(sc);
+ int width, height;
t->total = 0;
- if (!clip || !BKE_movieclip_has_frame(clip, &sc->user))
+ BKE_movieclip_get_size(clip, &sc->user, &width, &height);
+
+ if (!clip || width == 0 || height == 0)
return;
if (!ELEM(t->mode, TFM_RESIZE, TFM_TRANSLATION))
@@ -5939,7 +5821,8 @@ void createTransData(bContext *C, TransInfo *t)
}
else if (t->spacetype == SPACE_CLIP) {
t->flag |= T_POINTS|T_2D_EDIT;
- createTransTrackingData(C, t);
+ if (t->options & CTX_MOVIECLIP)
+ createTransTrackingData(C, t);
}
else if (t->obedit) {
t->ext = NULL;
@@ -5995,7 +5878,7 @@ void createTransData(bContext *C, TransInfo *t)
* lines below just check is also visible */
Object *ob_armature= modifiers_isDeformedByArmature(ob);
if (ob_armature && ob_armature->mode & OB_MODE_POSE) {
- Base *base_arm= object_in_scene(ob_armature, t->scene);
+ Base *base_arm= BKE_scene_base_find(t->scene, ob_armature);
if (base_arm) {
View3D *v3d = t->view;
if (BASE_VISIBLE(v3d, base_arm)) {
@@ -6032,12 +5915,10 @@ void createTransData(bContext *C, TransInfo *t)
sort_trans_data_dist(t);
}
- if ((t->spacetype == SPACE_VIEW3D) && (t->ar->regiontype == RGN_TYPE_WINDOW))
- {
+ if ((t->spacetype == SPACE_VIEW3D) && (t->ar->regiontype == RGN_TYPE_WINDOW)) {
View3D *v3d = t->view;
RegionView3D *rv3d = CTX_wm_region_view3d(C);
- if (rv3d && (t->flag & T_OBJECT) && v3d->camera == OBACT && rv3d->persp==RV3D_CAMOB)
- {
+ if (rv3d && (t->flag & T_OBJECT) && v3d->camera == OBACT && rv3d->persp==RV3D_CAMOB) {
t->flag |= T_CAMERA;
}
}
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 0af4830e3c6..b986bda4c13 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -111,8 +111,7 @@
void getViewVector(TransInfo *t, float coord[3], float vec[3])
{
- if (t->persp != RV3D_ORTHO)
- {
+ if (t->persp != RV3D_ORTHO) {
float p1[4], p2[4];
copy_v3_v3(p1, coord);
@@ -205,16 +204,16 @@ static void clipMirrorModifier(TransInfo *t, Object *ob)
}
if (axis & 2) {
- if (fabs(iloc[1])<=tolerance[1] ||
- loc[1]*iloc[1]<0.0f)
+ if (fabsf(iloc[1]) <= tolerance[1] ||
+ loc[1] * iloc[1]<0.0f)
{
loc[1]= 0.0f;
clip = 1;
}
}
if (axis & 4) {
- if (fabs(iloc[2])<=tolerance[2] ||
- loc[2]*iloc[2]<0.0f)
+ if (fabsf(iloc[2]) <= tolerance[2] ||
+ loc[2] * iloc[2] < 0.0f)
{
loc[2]= 0.0f;
clip = 1;
@@ -256,8 +255,7 @@ static void editbmesh_apply_to_mirror(TransInfo *t)
eve->co[2]= td->loc[2];
}
- if (td->flag & TD_MIRROR_EDGE)
- {
+ if (td->flag & TD_MIRROR_EDGE) {
td->loc[0] = 0;
}
}
@@ -543,12 +541,12 @@ static void recalcData_nla(TransInfo *t)
switch (snla->autosnap) {
case SACTSNAP_FRAME: /* snap to nearest frame/time */
if (snla->flag & SNLA_DRAWTIME) {
- tdn->h1[0]= (float)( floor((tdn->h1[0]/secf) + 0.5f) * secf );
- tdn->h2[0]= (float)( floor((tdn->h2[0]/secf) + 0.5f) * secf );
+ tdn->h1[0] = (float)(floor(((double)tdn->h1[0] / secf) + 0.5) * secf);
+ tdn->h2[0] = (float)(floor(((double)tdn->h2[0] / secf) + 0.5) * secf);
}
else {
- tdn->h1[0]= (float)( floor(tdn->h1[0]+0.5f) );
- tdn->h2[0]= (float)( floor(tdn->h2[0]+0.5f) );
+ tdn->h1[0] = floorf(tdn->h1[0] + 0.5f);
+ tdn->h2[0] = floorf(tdn->h2[0] + 0.5f);
}
break;
@@ -635,15 +633,16 @@ static void recalcData_image(TransInfo *t)
}
/* helper for recalcData() - for Movie Clip transforms */
-static void recalcData_clip(TransInfo *t)
+static void recalcData_spaceclip(TransInfo *t)
{
SpaceClip *sc = t->sa->spacedata.first;
+
MovieClip *clip = ED_space_clip(sc);
ListBase *tracksbase = BKE_tracking_get_tracks(&clip->tracking);
MovieTrackingTrack *track;
-
+
flushTransTracking(t);
-
+
track = tracksbase->first;
while (track) {
if (TRACK_VIEW_SELECTED(sc, track) && (track->flag & TRACK_LOCKED)==0) {
@@ -660,10 +659,10 @@ static void recalcData_clip(TransInfo *t)
BKE_tracking_clamp_track(track, CLAMP_SEARCH_DIM);
}
}
-
+
track = track->next;
}
-
+
DAG_id_tag_update(&clip->id, 0);
}
@@ -675,7 +674,7 @@ static void recalcData_view3d(TransInfo *t)
if (t->obedit) {
if (ELEM(t->obedit->type, OB_CURVE, OB_SURF)) {
Curve *cu= t->obedit->data;
- ListBase *nurbs= curve_editnurbs(cu);
+ ListBase *nurbs= BKE_curve_editNurbs_get(cu);
Nurb *nu= nurbs->first;
if (t->state != TRANS_CANCEL) {
@@ -687,15 +686,15 @@ static void recalcData_view3d(TransInfo *t)
if (t->state == TRANS_CANCEL) {
while (nu) {
- calchandlesNurb(nu); /* Cant do testhandlesNurb here, it messes up the h1 and h2 flags */
+ BKE_nurb_handles_calc(nu); /* Cant do testhandlesNurb here, it messes up the h1 and h2 flags */
nu= nu->next;
}
}
else {
/* Normal updating */
while (nu) {
- test2DNurb(nu);
- calchandlesNurb(nu);
+ BKE_nurb_test2D(nu);
+ BKE_nurb_handles_calc(nu);
nu= nu->next;
}
}
@@ -775,21 +774,17 @@ static void recalcData_view3d(TransInfo *t)
}
- if (t->mode != TFM_BONE_ROLL)
- {
+ if (t->mode != TFM_BONE_ROLL) {
/* fix roll */
- for (i = 0; i < t->total; i++, td++)
- {
- if (td->extra)
- {
+ for (i = 0; i < t->total; i++, td++) {
+ if (td->extra) {
float vec[3], up_axis[3];
float qrot[4];
ebo = td->extra;
copy_v3_v3(up_axis, td->axismtx[2]);
- if (t->mode != TFM_ROTATION)
- {
+ if (t->mode != TFM_ROTATION) {
sub_v3_v3v3(vec, ebo->tail, ebo->head);
normalize_v3(vec);
rotation_between_vecs_to_quat(qrot, td->axismtx[1], vec);
@@ -838,7 +833,7 @@ static void recalcData_view3d(TransInfo *t)
DAG_id_tag_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */
}
else
- where_is_pose(t->scene, ob);
+ BKE_pose_where_is(t->scene, ob);
}
else if (base && (base->object->mode & OB_MODE_PARTICLE_EDIT) && PE_get_current(t->scene, base->object)) {
if (t->state != TRANS_CANCEL) {
@@ -906,7 +901,7 @@ void recalcData(TransInfo *t)
recalcData_view3d(t);
}
else if (t->spacetype == SPACE_CLIP) {
- recalcData_clip(t);
+ recalcData_spaceclip(t);
}
}
@@ -915,8 +910,7 @@ void drawLine(TransInfo *t, float *center, float *dir, char axis, short options)
float v1[3], v2[3], v3[3];
unsigned char col[3], col2[3];
- if (t->spacetype == SPACE_VIEW3D)
- {
+ if (t->spacetype == SPACE_VIEW3D) {
View3D *v3d = t->view;
glPushMatrix();
@@ -955,7 +949,7 @@ void resetTransRestrictions(TransInfo *t)
}
/* the *op can be NULL */
-int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
+int initTransInfo(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
{
Scene *sce = CTX_data_scene(C);
ToolSettings *ts = CTX_data_tool_settings(C);
@@ -984,8 +978,7 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
t->redraw = 1; /* redraw first time */
- if (event)
- {
+ if (event) {
copy_v2_v2_int(t->imval, event->mval);
t->event_type = event->type;
}
@@ -1043,8 +1036,7 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
}
- if (t->spacetype == SPACE_VIEW3D)
- {
+ if (t->spacetype == SPACE_VIEW3D) {
View3D *v3d = sa->spacedata.first;
t->view = v3d;
@@ -1060,12 +1052,12 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
if (v3d->flag & V3D_ALIGN) t->flag |= T_V3D_ALIGN;
t->around = v3d->around;
- if (op && RNA_struct_find_property(op->ptr, "constraint_orientation") && RNA_struct_property_is_set(op->ptr, "constraint_orientation"))
+ if (op && (RNA_struct_find_property(op->ptr, "constraint_orientation") &&
+ RNA_struct_property_is_set(op->ptr, "constraint_orientation")))
{
t->current_orientation = RNA_enum_get(op->ptr, "constraint_orientation");
-
- if (t->current_orientation >= V3D_MANIP_CUSTOM + BIF_countTransformOrientation(C))
- {
+
+ if (t->current_orientation >= V3D_MANIP_CUSTOM + BIF_countTransformOrientation(C)) {
t->current_orientation = V3D_MANIP_GLOBAL;
}
}
@@ -1124,10 +1116,8 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
t->around = V3D_CENTER;
}
- if (op && RNA_struct_property_is_set(op->ptr, "release_confirm"))
- {
- if (RNA_boolean_get(op->ptr, "release_confirm"))
- {
+ if (op && RNA_struct_property_is_set(op->ptr, "release_confirm")) {
+ if (RNA_boolean_get(op->ptr, "release_confirm")) {
t->flag |= T_RELEASE_CONFIRM;
}
}
@@ -1137,35 +1127,31 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
}
}
- if (op && RNA_struct_find_property(op->ptr, "mirror") && RNA_struct_property_is_set(op->ptr, "mirror"))
+ if (op && (RNA_struct_find_property(op->ptr, "mirror") &&
+ RNA_struct_property_is_set(op->ptr, "mirror")))
{
- if (RNA_boolean_get(op->ptr, "mirror"))
- {
+ if (RNA_boolean_get(op->ptr, "mirror")) {
t->flag |= T_MIRROR;
t->mirror = 1;
}
}
// Need stuff to take it from edit mesh or whatnot here
else if (t->spacetype == SPACE_VIEW3D) {
- if (t->obedit && t->obedit->type == OB_MESH && (((Mesh *)t->obedit->data)->editflag & ME_EDIT_MIRROR_X))
- {
+ if (t->obedit && t->obedit->type == OB_MESH && (((Mesh *)t->obedit->data)->editflag & ME_EDIT_MIRROR_X)) {
t->flag |= T_MIRROR;
t->mirror = 1;
}
}
/* setting PET flag only if property exist in operator. Otherwise, assume it's not supported */
- if (op && RNA_struct_find_property(op->ptr, "proportional"))
- {
- if (RNA_struct_property_is_set(op->ptr, "proportional"))
- {
- switch(RNA_enum_get(op->ptr, "proportional"))
- {
- case PROP_EDIT_CONNECTED:
- t->flag |= T_PROP_CONNECTED;
- case PROP_EDIT_ON:
- t->flag |= T_PROP_EDIT;
- break;
+ if (op && RNA_struct_find_property(op->ptr, "proportional")) {
+ if (RNA_struct_property_is_set(op->ptr, "proportional")) {
+ switch (RNA_enum_get(op->ptr, "proportional")) {
+ case PROP_EDIT_CONNECTED:
+ t->flag |= T_PROP_CONNECTED;
+ case PROP_EDIT_ON:
+ t->flag |= T_PROP_EDIT;
+ break;
}
}
else {
@@ -1186,7 +1172,8 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
}
}
- if (op && RNA_struct_find_property(op->ptr, "proportional_size") && RNA_struct_property_is_set(op->ptr, "proportional_size"))
+ if (op && (RNA_struct_find_property(op->ptr, "proportional_size") &&
+ RNA_struct_property_is_set(op->ptr, "proportional_size")))
{
t->prop_size = RNA_float_get(op->ptr, "proportional_size");
}
@@ -1196,13 +1183,13 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
/* TRANSFORM_FIX_ME rna restrictions */
- if (t->prop_size <= 0.00001f)
- {
+ if (t->prop_size <= 0.00001f) {
printf("Proportional size (%f) under 0.00001, reseting to 1!\n", t->prop_size);
t->prop_size = 1.0f;
}
- if (op && RNA_struct_find_property(op->ptr, "proportional_edit_falloff") && RNA_struct_property_is_set(op->ptr, "proportional_edit_falloff"))
+ if (op && (RNA_struct_find_property(op->ptr, "proportional_edit_falloff") &&
+ RNA_struct_property_is_set(op->ptr, "proportional_edit_falloff")))
{
t->prop_mode = RNA_enum_get(op->ptr, "proportional_edit_falloff");
}
@@ -1210,14 +1197,12 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
t->prop_mode = ts->prop_mode;
}
}
- else /* add not pet option to context when not available */
- {
+ else { /* add not pet option to context when not available */
t->options |= CTX_NO_PET;
}
// Mirror is not supported with PET, turn it off.
- if (t->flag & T_PROP_EDIT)
- {
+ if (t->flag & T_PROP_EDIT) {
t->flag &= ~T_MIRROR;
}
@@ -1228,7 +1213,7 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
}
/* Here I would suggest only TransInfo related issues, like free data & reset vars. Not redraws */
-void postTrans (bContext *C, TransInfo *t)
+void postTrans(bContext *C, TransInfo *t)
{
TransData *td;
@@ -1282,8 +1267,7 @@ void postTrans (bContext *C, TransInfo *t)
}
}
- if (t->mouse.data)
- {
+ if (t->mouse.data) {
MEM_freeN(t->mouse.data);
}
}
@@ -1440,8 +1424,7 @@ void calculateCenterMedian(TransInfo *t)
for (i = 0; i < t->total; i++) {
if (t->data[i].flag & TD_SELECTED) {
- if (!(t->data[i].flag & TD_NOCENTER))
- {
+ if (!(t->data[i].flag & TD_NOCENTER)) {
add_v3_v3(partial, t->data[i].center);
total++;
}
@@ -1493,7 +1476,7 @@ void calculateCenterBound(TransInfo *t)
void calculateCenter(TransInfo *t)
{
- switch(t->around) {
+ switch (t->around) {
case V3D_CENTER:
calculateCenterBound(t);
break;
@@ -1523,8 +1506,8 @@ void calculateCenter(TransInfo *t)
BMEditSelection ese;
BMEditMesh *em = BMEdit_FromObject(t->obedit);
- if (EDBM_editselection_active_get(em, &ese)) {
- EDBM_editselection_center(t->center, &ese);
+ if (BM_select_history_active_get(em->bm, &ese)) {
+ BM_editselection_center(&ese, t->center);
calculateCenter2D(t);
break;
}
@@ -1542,8 +1525,7 @@ void calculateCenter(TransInfo *t)
} /* END EDIT MODE ACTIVE ELEMENT */
calculateCenterMedian(t);
- if ((t->flag & (T_EDIT|T_POSE))==0)
- {
+ if ((t->flag & (T_EDIT|T_POSE))==0) {
Scene *scene = t->scene;
Object *ob= OBACT;
if (ob) {
@@ -1583,8 +1565,7 @@ void calculateCenter(TransInfo *t)
projectIntView(t, axis, t->center2d);
/* rotate only needs correct 2d center, grab needs initgrabz() value */
- if (t->mode==TFM_TRANSLATION)
- {
+ if (t->mode==TFM_TRANSLATION) {
copy_v3_v3(t->center, axis);
copy_v3_v3(t->con.center, t->center);
}
@@ -1625,11 +1606,8 @@ void calculatePropRatio(TransInfo *t)
td->factor = 0.0f;
restoreElement(td);
}
- else if ((connected &&
- (td->flag & TD_NOTCONNECTED || td->dist > t->prop_size))
- ||
- (connected == 0 &&
- td->rdist > t->prop_size))
+ else if ((connected && (td->flag & TD_NOTCONNECTED || td->dist > t->prop_size)) ||
+ (connected == 0 && td->rdist > t->prop_size))
{
/*
* The elements are sorted according to their dist member in the array,
@@ -1656,7 +1634,7 @@ void calculatePropRatio(TransInfo *t)
if (dist < 0.0f)
dist = 0.0f;
- switch(t->prop_mode) {
+ switch (t->prop_mode) {
case PROP_SHARP:
td->factor= dist*dist;
break;
@@ -1676,7 +1654,7 @@ void calculatePropRatio(TransInfo *t)
td->factor = (float)sqrt(2*dist - dist * dist);
break;
case PROP_RANDOM:
- BLI_srand( BLI_rand() ); /* random seed */
+ BLI_srand(BLI_rand()); /* random seed */
td->factor = BLI_frand()*dist;
break;
default:
@@ -1684,7 +1662,7 @@ void calculatePropRatio(TransInfo *t)
}
}
}
- switch(t->prop_mode) {
+ switch (t->prop_mode) {
case PROP_SHARP:
strcpy(t->proptext, "(Sharp)");
break;
diff --git a/source/blender/editors/transform/transform_input.c b/source/blender/editors/transform/transform_input.c
index bd3fb20f77f..b25c76fe193 100644
--- a/source/blender/editors/transform/transform_input.c
+++ b/source/blender/editors/transform/transform_input.c
@@ -199,17 +199,17 @@ static void InputCustomRatio(TransInfo *UNUSED(t), MouseInput *mi, const int mva
mdx = (mi->precision_mval[0] + (float)(mval[0] - mi->precision_mval[0]) / 10.0f) - data[2];
mdy = (mi->precision_mval[1] + (float)(mval[1] - mi->precision_mval[1]) / 10.0f) - data[3];
- distance = (length != 0.0f)? (mdx*dx + mdy*dy) / length: 0.0f;
+ distance = (length != 0.0) ? (mdx * dx + mdy * dy) / length: 0.0;
}
else {
int mdx, mdy;
mdx = mval[0] - data[2];
mdy = mval[1] - data[3];
- distance = (length != 0.0f)? (mdx*dx + mdy*dy) / length: 0.0f;
+ distance = (length != 0.0) ? (mdx * dx + mdy * dy) / length: 0.0;
}
- output[0] = (float)((length != 0.0f)? distance / length: 0.0f);
+ output[0] = (length != 0.0) ? (double)(distance / length) : 0.0f;
}
}
@@ -229,8 +229,9 @@ static void InputAngle(TransInfo *UNUSED(t), MouseInput *mi, const int mval[2],
double *angle = mi->data;
/* use doubles here, to make sure a "1.0" (no rotation) doesnt become 9.999999e-01, which gives 0.02 for acos */
- double deler = ((dx1*dx1+dy1*dy1)+(dx2*dx2+dy2*dy2)-(dx3*dx3+dy3*dy3))
- / (2.0 * ((A*B)?(A*B):1.0));
+ double deler = (((dx1 * dx1 + dy1 * dy1) +
+ (dx2 * dx2 + dy2 * dy2) -
+ (dx3 * dx3 + dy3 * dy3)) / (2.0 * ((A * B) ? (A * B) : 1.0)));
/* ((A*B)?(A*B):1.0) this takes care of potential divide by zero errors */
float dphi;
@@ -290,15 +291,12 @@ void initMouseInput(TransInfo *UNUSED(t), MouseInput *mi, int center[2], int mva
static void calcSpringFactor(MouseInput *mi)
{
- mi->factor = (float)sqrt(
- (
- ((float)(mi->center[1] - mi->imval[1]))*((float)(mi->center[1] - mi->imval[1]))
- +
- ((float)(mi->center[0] - mi->imval[0]))*((float)(mi->center[0] - mi->imval[0]))
- ) );
-
- if (mi->factor==0.0f)
+ mi->factor = sqrtf(((float)(mi->center[1] - mi->imval[1])) * ((float)(mi->center[1] - mi->imval[1])) +
+ ((float)(mi->center[0] - mi->imval[0])) * ((float)(mi->center[0] - mi->imval[0])));
+
+ if (mi->factor == 0.0f) {
mi->factor= 1.0f; /* prevent Inf */
+ }
}
void initMouseInputMode(TransInfo *t, MouseInput *mi, MouseInputMode mode)
@@ -313,8 +311,7 @@ void initMouseInputMode(TransInfo *t, MouseInput *mi, MouseInputMode mode)
}
#endif
- switch(mode)
- {
+ switch (mode) {
case INPUT_VECTOR:
mi->apply = InputVector;
t->helpline = HLP_NONE;
@@ -391,8 +388,7 @@ int handleMouseInput(TransInfo *t, MouseInput *mi, wmEvent *event)
{
int redraw = TREDRAW_NOTHING;
- switch (event->type)
- {
+ switch (event->type) {
case LEFTSHIFTKEY:
case RIGHTSHIFTKEY:
if (event->val == KM_PRESS) {
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c
index 82e57cca705..94f6640ca5b 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -203,7 +203,7 @@ int gimbal_axis(Object *ob, float gmat[][3])
{
if (ob) {
if (ob->mode & OB_MODE_POSE) {
- bPoseChannel *pchan= get_active_posechannel(ob);
+ bPoseChannel *pchan= BKE_pose_channel_active(ob);
if (pchan) {
float mat[3][3], tmat[3][3], obmat[3][3];
@@ -297,11 +297,11 @@ int calc_manipulator_stats(const bContext *C)
if (obedit->type==OB_MESH) {
BMEditMesh *em = BMEdit_FromObject(obedit);
BMEditSelection ese;
- float vec[3]= {0,0,0};
+ float vec[3]= {0, 0, 0};
/* USE LAST SELECTE WITH ACTIVE */
- if (v3d->around==V3D_ACTIVE && EDBM_editselection_active_get(em, &ese)) {
- EDBM_editselection_center(vec, &ese);
+ if ((v3d->around == V3D_ACTIVE) && BM_select_history_active_get(em->bm, &ese)) {
+ BM_editselection_center(&ese, vec);
calc_tw_center(scene, vec);
totsel= 1;
}
@@ -389,7 +389,7 @@ int calc_manipulator_stats(const bContext *C)
Nurb *nu;
BezTriple *bezt;
BPoint *bp;
- ListBase *nurbs= curve_editnurbs(cu);
+ ListBase *nurbs= BKE_curve_editNurbs_get(cu);
nu= nurbs->first;
while (nu) {
@@ -508,7 +508,7 @@ int calc_manipulator_stats(const bContext *C)
if (edit) {
point = edit->points;
- for (a=0; a<edit->totpoint; a++,point++) {
+ for (a=0; a<edit->totpoint; a++, point++) {
if (point->flag & PEP_HIDE) continue;
for (k=0, ek=point->keys; k<point->totkey; k++, ek++) {
@@ -549,7 +549,7 @@ int calc_manipulator_stats(const bContext *C)
/* global, local or normal orientation? */
if (ob && totsel) {
- switch(v3d->twmode) {
+ switch (v3d->twmode) {
case V3D_MANIP_GLOBAL:
break; /* nothing to do */
@@ -643,7 +643,7 @@ static float screen_aligned(RegionView3D *rv3d, float mat[][4])
glTranslatef(mat[3][0], mat[3][1], mat[3][2]);
/* sets view screen aligned */
- glRotatef( -360.0f*saacos(rv3d->viewquat[0])/(float)M_PI, rv3d->viewquat[1], rv3d->viewquat[2], rv3d->viewquat[3]);
+ glRotatef(-360.0f*saacos(rv3d->viewquat[0])/(float)M_PI, rv3d->viewquat[1], rv3d->viewquat[2], rv3d->viewquat[3]);
return len_v3(mat[0]); /* draw scale */
}
@@ -761,7 +761,7 @@ static void manipulator_setcolor(View3D *v3d, char axis, int colcode, unsigned c
UI_GetThemeColor3ubv(TH_TRANSFORM, col);
}
else {
- switch(axis) {
+ switch (axis) {
case 'C':
UI_GetThemeColor3ubv(TH_TRANSFORM, col);
if (v3d->twmode == V3D_MANIP_LOCAL) {
@@ -884,7 +884,7 @@ static void draw_manipulator_rotate(View3D *v3d, RegionView3D *rv3d, int moving,
glClipPlane(GL_CLIP_PLANE0, plane);
}
/* sets view screen aligned */
- glRotatef( -360.0f*saacos(rv3d->viewquat[0])/(float)M_PI, rv3d->viewquat[1], rv3d->viewquat[2], rv3d->viewquat[3]);
+ glRotatef(-360.0f*saacos(rv3d->viewquat[0])/(float)M_PI, rv3d->viewquat[1], rv3d->viewquat[2], rv3d->viewquat[3]);
/* Screen aligned help circle */
if (arcs) {
@@ -1483,7 +1483,7 @@ void BIF_draw_manipulator(const bContext *C)
v3d->twflag |= V3D_DRAW_MANIPULATOR;
/* now we can define center */
- switch(v3d->around) {
+ switch (v3d->around) {
case V3D_CENTER:
case V3D_ACTIVE:
rv3d->twmat[3][0]= (scene->twmin[0] + scene->twmax[0])/2.0f;
@@ -1512,7 +1512,7 @@ void BIF_draw_manipulator(const bContext *C)
if (v3d->twflag & V3D_DRAW_MANIPULATOR) {
- glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
if (v3d->twtype & V3D_MANIP_ROTATE) {
@@ -1553,7 +1553,7 @@ static int manipulator_selectbuf(ScrArea *sa, ARegion *ar, const int mval[2], fl
setwinmatrixview3d(ar, v3d, &rect);
mult_m4_m4m4(rv3d->persmat, rv3d->winmat, rv3d->viewmat);
- glSelectBuffer( 64, buffer);
+ glSelectBuffer(64, buffer);
glRenderMode(GL_SELECT);
glInitNames(); /* these two calls whatfor? It doesnt work otherwise */
glPushName(-2);
@@ -1639,7 +1639,7 @@ int BIF_do_manipulator(bContext *C, struct wmEvent *event, wmOperator *op)
if (drawflags==0) drawflags= val;
if (drawflags & MAN_TRANS_C) {
- switch(drawflags) {
+ switch (drawflags) {
case MAN_TRANS_C:
break;
case MAN_TRANS_X:
@@ -1672,7 +1672,7 @@ int BIF_do_manipulator(bContext *C, struct wmEvent *event, wmOperator *op)
//wm_operator_invoke(C, WM_operatortype_find("TRANSFORM_OT_translate", 0), event, op->ptr, NULL, FALSE);
}
else if (drawflags & MAN_SCALE_C) {
- switch(drawflags) {
+ switch (drawflags) {
case MAN_SCALE_X:
if (shift) {
constraint_axis[1] = 1;
@@ -1707,7 +1707,7 @@ int BIF_do_manipulator(bContext *C, struct wmEvent *event, wmOperator *op)
//wm_operator_invoke(C, WM_operatortype_find("TRANSFORM_OT_trackball", 0), event, op->ptr, NULL, FALSE);
}
else if (drawflags & MAN_ROT_C) {
- switch(drawflags) {
+ switch (drawflags) {
case MAN_ROT_X:
constraint_axis[0] = 1;
break;
diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c
index 09078c199c4..ccd794d0101 100644
--- a/source/blender/editors/transform/transform_ops.c
+++ b/source/blender/editors/transform/transform_ops.c
@@ -145,7 +145,7 @@ static int snap_type_exec(bContext *C, wmOperator *op)
{
ToolSettings *ts= CTX_data_tool_settings(C);
- ts->snap_mode = RNA_enum_get(op->ptr,"type");
+ ts->snap_mode = RNA_enum_get(op->ptr, "type");
WM_event_add_notifier(C, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
@@ -317,23 +317,19 @@ static void transformops_exit(bContext *C, wmOperator *op)
static int transformops_data(bContext *C, wmOperator *op, wmEvent *event)
{
int retval = 1;
- if (op->customdata == NULL)
- {
+ if (op->customdata == NULL) {
TransInfo *t = MEM_callocN(sizeof(TransInfo), "TransInfo data2");
TransformModeItem *tmode;
int mode = -1;
- for (tmode = transform_modes; tmode->idname; tmode++)
- {
- if (op->type->idname == tmode->idname)
- {
+ for (tmode = transform_modes; tmode->idname; tmode++) {
+ if (op->type->idname == tmode->idname) {
mode = tmode->mode;
break;
}
}
- if (mode == -1)
- {
+ if (mode == -1) {
mode = RNA_enum_get(op->ptr, "mode");
}
@@ -376,8 +372,7 @@ static int transform_modal(bContext *C, wmOperator *op, wmEvent *event)
exit_code |= transformEnd(C, t);
- if ((exit_code & OPERATOR_RUNNING_MODAL) == 0)
- {
+ if ((exit_code & OPERATOR_RUNNING_MODAL) == 0) {
transformops_exit(C, op);
exit_code &= ~OPERATOR_PASS_THROUGH; /* preventively remove passthrough */
}
@@ -400,8 +395,7 @@ static int transform_exec(bContext *C, wmOperator *op)
{
TransInfo *t;
- if (!transformops_data(C, op, NULL))
- {
+ if (!transformops_data(C, op, NULL)) {
G.moving = 0;
return OPERATOR_CANCELLED;
}
@@ -423,8 +417,7 @@ static int transform_exec(bContext *C, wmOperator *op)
static int transform_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- if (!transformops_data(C, op, event))
- {
+ if (!transformops_data(C, op, event)) {
G.moving = 0;
return OPERATOR_CANCELLED;
}
@@ -445,8 +438,7 @@ void Transform_Properties(struct wmOperatorType *ot, int flags)
{
PropertyRNA *prop;
- if (flags & P_AXIS)
- {
+ if (flags & P_AXIS) {
prop= RNA_def_property(ot->srna, "axis", PROP_FLOAT, PROP_DIRECTION);
RNA_def_property_array(prop, 3);
/* Make this not hidden when there's a nice axis selection widget */
@@ -455,8 +447,7 @@ void Transform_Properties(struct wmOperatorType *ot, int flags)
}
- if (flags & P_CONSTRAINT)
- {
+ if (flags & P_CONSTRAINT) {
RNA_def_boolean_vector(ot->srna, "constraint_axis", 3, NULL, "Constraint Axis", "");
prop= RNA_def_property(ot->srna, "constraint_orientation", PROP_ENUM, PROP_NONE);
RNA_def_property_ui_text(prop, "Orientation", "Transformation orientation");
@@ -465,21 +456,18 @@ void Transform_Properties(struct wmOperatorType *ot, int flags)
}
- if (flags & P_MIRROR)
- {
+ if (flags & P_MIRROR) {
RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", "");
}
- if (flags & P_PROPORTIONAL)
- {
+ if (flags & P_PROPORTIONAL) {
RNA_def_enum(ot->srna, "proportional", proportional_editing_items, 0, "Proportional Editing", "");
RNA_def_enum(ot->srna, "proportional_edit_falloff", proportional_falloff_items, 0, "Proportional Editing Falloff", "Falloff type for proportional editing mode");
RNA_def_float(ot->srna, "proportional_size", 1, 0.00001f, FLT_MAX, "Proportional Size", "", 0.001, 100);
}
- if (flags & P_SNAP)
- {
+ if (flags & P_SNAP) {
prop= RNA_def_boolean(ot->srna, "snap", 0, "Use Snapping Options", "");
RNA_def_property_flag(prop, PROP_HIDDEN);
@@ -497,14 +485,12 @@ void Transform_Properties(struct wmOperatorType *ot, int flags)
}
}
}
-
- if (flags & P_OPTIONS)
- {
+
+ if (flags & P_OPTIONS) {
RNA_def_boolean(ot->srna, "texture_space", 0, "Edit Texture Space", "Edit Object data texture space");
}
- if (flags & P_CORRECT_UV)
- {
+ if (flags & P_CORRECT_UV) {
RNA_def_boolean(ot->srna, "correct_uv", 0, "Correct UVs", "Correct UV coordinates when transforming");
}
@@ -827,8 +813,7 @@ void transform_operatortypes(void)
{
TransformModeItem *tmode;
- for (tmode = transform_modes; tmode->idname; tmode++)
- {
+ for (tmode = transform_modes; tmode->idname; tmode++) {
WM_operatortype_append(tmode->opfunc);
}
@@ -853,15 +838,13 @@ void transform_keymap_for_space(wmKeyConfig *keyconf, wmKeyMap *keymap, int spac
if (modalmap) {
TransformModeItem *tmode;
- for (tmode = transform_modes; tmode->idname; tmode++)
- {
+ for (tmode = transform_modes; tmode->idname; tmode++) {
WM_modalkeymap_assign(modalmap, tmode->idname);
}
WM_modalkeymap_assign(modalmap, "TRANSFORM_OT_transform");
}
- switch(spaceid)
- {
+ switch (spaceid) {
case SPACE_VIEW3D:
WM_keymap_add_item(keymap, OP_TRANSLATION, GKEY, KM_PRESS, 0, 0);
@@ -943,7 +926,6 @@ void transform_keymap_for_space(wmKeyConfig *keyconf, wmKeyMap *keymap, int spac
kmi = WM_keymap_add_item(keymap, OP_TRANSLATION, EVT_TWEAK_A, KM_ANY, 0, 0);
RNA_boolean_set(kmi->ptr, "release_confirm", TRUE);
kmi = WM_keymap_add_item(keymap, OP_TRANSLATION, EVT_TWEAK_S, KM_ANY, 0, 0);
- RNA_boolean_set(kmi->ptr, "release_confirm", TRUE);
WM_keymap_add_item(keymap, OP_ROTATION, RKEY, KM_PRESS, 0, 0);
@@ -953,7 +935,7 @@ void transform_keymap_for_space(wmKeyConfig *keyconf, wmKeyMap *keymap, int spac
WM_keymap_add_item(keymap, "NODE_OT_move_detach_links", DKEY, KM_PRESS, KM_ALT, 0);
/* XXX release_confirm is set in the macro operator definition */
- WM_keymap_add_item(keymap, "NODE_OT_move_detach_links", EVT_TWEAK_A, KM_ANY, KM_ALT, 0);
+ WM_keymap_add_item(keymap, "NODE_OT_move_detach_links_release", EVT_TWEAK_A, KM_ANY, KM_ALT, 0);
WM_keymap_add_item(keymap, "NODE_OT_move_detach_links", EVT_TWEAK_S, KM_ANY, KM_ALT, 0);
break;
case SPACE_SEQ:
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index 2cc9d8fca93..04207643aa4 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -176,8 +176,7 @@ TransformOrientation *createMeshSpace(bContext *C, ReportList *reports, char *na
type = getTransformOrientation(C, normal, plane, 0);
- switch (type)
- {
+ switch (type) {
case ORIENTATION_VERT:
if (createSpaceNormal(mat, normal) == 0) {
BKE_reports_prepend(reports, "Cannot use vertex with zero-length normal");
@@ -493,7 +492,7 @@ void initTransformOrientation(bContext *C, TransInfo *t)
Object *ob = CTX_data_active_object(C);
Object *obedit = CTX_data_active_object(C);
- switch(t->current_orientation) {
+ switch (t->current_orientation) {
case V3D_MANIP_GLOBAL:
unit_m3(t->spacemtx);
strcpy(t->spacename, "global");
@@ -574,15 +573,14 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
BMEditMesh *em = me->edit_btmesh;
BMVert *eve;
BMEditSelection ese;
- float vec[3]= {0,0,0};
+ float vec[3]= {0, 0, 0};
/* USE LAST SELECTED WITH ACTIVE */
- if (activeOnly && EDBM_editselection_active_get(em, &ese)) {
- EDBM_editselection_normal(normal, &ese);
- EDBM_editselection_plane(em, plane, &ese);
+ if (activeOnly && BM_select_history_active_get(em->bm, &ese)) {
+ BM_editselection_normal(&ese, normal);
+ BM_editselection_plane(&ese, plane);
- switch (ese.htype)
- {
+ switch (ese.htype) {
case BM_VERT:
result = ORIENTATION_VERT;
break;
@@ -717,15 +715,14 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
Nurb *nu;
BezTriple *bezt;
int a;
- ListBase *nurbs= curve_editnurbs(cu);
+ ListBase *nurbs= BKE_curve_editNurbs_get(cu);
for (nu = nurbs->first; nu; nu = nu->next) {
/* only bezier has a normal */
if (nu->type == CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
- while (a--)
- {
+ while (a--) {
/* exception */
if ((bezt->f1 & SELECT) + (bezt->f2 & SELECT) + (bezt->f3 & SELECT) > SELECT) {
sub_v3_v3v3(normal, bezt->vec[0], bezt->vec[2]);
@@ -772,7 +769,7 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
float mat[4][4];
/* Rotation of MetaElem is stored in quat */
- quat_to_mat4( mat,ml_sel->quat);
+ quat_to_mat4(mat, ml_sel->quat);
copy_v3_v3(normal, mat[2]);
@@ -886,8 +883,7 @@ void ED_getTransformOrientationMatrix(const bContext *C, float orientation_mat[]
type = getTransformOrientation(C, normal, plane, activeOnly);
- switch (type)
- {
+ switch (type) {
case ORIENTATION_NORMAL:
if (createSpaceNormalTangent(orientation_mat, normal, plane) == 0) {
type = ORIENTATION_NONE;
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c
index 7bdd3ddc069..b875886e80a 100644
--- a/source/blender/editors/transform/transform_snap.c
+++ b/source/blender/editors/transform/transform_snap.c
@@ -140,8 +140,7 @@ int activeSnap(TransInfo *t)
void drawSnapping(const struct bContext *C, TransInfo *t)
{
- if (validSnap(t) && activeSnap(t))
- {
+ if (validSnap(t) && activeSnap(t)) {
unsigned char col[4], selectedCol[4], activeCol[4];
UI_GetThemeColor3ubv(TH_TRANSFORM, col);
@@ -184,16 +183,15 @@ void drawSnapping(const struct bContext *C, TransInfo *t)
}
/* draw normal if needed */
- if (usingSnappingNormal(t) && validSnappingNormal(t))
- {
+ if (usingSnappingNormal(t) && validSnappingNormal(t)) {
glColor4ubv(activeCol);
glBegin(GL_LINES);
glVertex3f(t->tsnap.snapPoint[0], t->tsnap.snapPoint[1], t->tsnap.snapPoint[2]);
- glVertex3f( t->tsnap.snapPoint[0] + t->tsnap.snapNormal[0],
- t->tsnap.snapPoint[1] + t->tsnap.snapNormal[1],
- t->tsnap.snapPoint[2] + t->tsnap.snapNormal[2]);
- glEnd();
+ glVertex3f(t->tsnap.snapPoint[0] + t->tsnap.snapNormal[0],
+ t->tsnap.snapPoint[1] + t->tsnap.snapNormal[1],
+ t->tsnap.snapPoint[2] + t->tsnap.snapNormal[2]);
+ glEnd();
}
if (v3d->zbuf)
@@ -218,7 +216,7 @@ void drawSnapping(const struct bContext *C, TransInfo *t)
cpack(0xFFFFFF);
glTranslatef(t->tsnap.snapPoint[0], t->tsnap.snapPoint[1], 0.0f);
- //glRectf(0,0,1,1);
+ //glRectf(0, 0, 1, 1);
setlinestyle(0);
cpack(0x0);
@@ -240,16 +238,14 @@ int handleSnapping(TransInfo *t, wmEvent *event)
int status = 0;
#if 0 // XXX need a proper selector for all snap mode
- if (BIF_snappingSupported(t->obedit) && event->type == TABKEY && event->shift)
- {
+ if (BIF_snappingSupported(t->obedit) && event->type == TABKEY && event->shift) {
/* toggle snap and reinit */
t->settings->snap_flag ^= SCE_SNAP;
initSnapping(t, NULL);
status = 1;
}
#endif
- if (event->type == MOUSEMOVE)
- {
+ if (event->type == MOUSEMOVE) {
status |= updateSelectedSnapPoint(t);
}
@@ -259,8 +255,7 @@ int handleSnapping(TransInfo *t, wmEvent *event)
void applyProject(TransInfo *t)
{
/* XXX FLICKER IN OBJECT MODE */
- if ((t->tsnap.project) && activeSnap(t) && (t->flag & T_NO_PROJECT) == 0)
- {
+ if ((t->tsnap.project) && activeSnap(t) && (t->flag & T_NO_PROJECT) == 0) {
TransData *td = t->data;
float tvec[3];
float imat[4][4];
@@ -283,21 +278,19 @@ void applyProject(TransInfo *t)
continue;
copy_v3_v3(iloc, td->loc);
- if (t->flag & (T_EDIT|T_POSE))
- {
+ if (t->flag & (T_EDIT|T_POSE)) {
Object *ob = t->obedit?t->obedit:t->poseobj;
mul_m4_v3(ob->obmat, iloc);
}
else if (t->flag & T_OBJECT) {
td->ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
- object_handle_update(t->scene, td->ob);
+ BKE_object_handle_update(t->scene, td->ob);
copy_v3_v3(iloc, td->ob->obmat[3]);
}
project_float(t->ar, iloc, mval);
- if (snapObjectsTransform(t, mval, &dist, loc, no, t->tsnap.modeSelect))
- {
+ if (snapObjectsTransform(t, mval, &dist, loc, no, t->tsnap.modeSelect)) {
// if (t->flag & (T_EDIT|T_POSE)) {
// mul_m4_v3(imat, loc);
// }
@@ -320,8 +313,7 @@ void applySnapping(TransInfo *t, float *vec)
if (t->tsnap.project)
return;
- if (t->tsnap.status & SNAP_FORCED)
- {
+ if (t->tsnap.status & SNAP_FORCED) {
t->tsnap.targetSnap(t);
t->tsnap.applySnap(t, vec);
@@ -331,15 +323,13 @@ void applySnapping(TransInfo *t, float *vec)
// 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)
- {
+ if (current - t->tsnap.last >= 0.01) {
t->tsnap.calcSnap(t, vec);
t->tsnap.targetSnap(t);
t->tsnap.last = current;
}
- if (validSnap(t))
- {
+ if (validSnap(t)) {
t->tsnap.applySnap(t, vec);
}
}
@@ -368,10 +358,8 @@ int usingSnappingNormal(TransInfo *t)
int validSnappingNormal(TransInfo *t)
{
- if (validSnap(t))
- {
- if (dot_v3v3(t->tsnap.snapNormal, t->tsnap.snapNormal) > 0)
- {
+ if (validSnap(t)) {
+ if (dot_v3v3(t->tsnap.snapNormal, t->tsnap.snapNormal) > 0) {
return 1;
}
}
@@ -439,38 +427,31 @@ void initSnapping(TransInfo *t, wmOperator *op)
resetSnapping(t);
/* if snap property exists */
- if (op && RNA_struct_find_property(op->ptr, "snap") && RNA_struct_property_is_set(op->ptr, "snap"))
- {
- if (RNA_boolean_get(op->ptr, "snap"))
- {
+ if (op && RNA_struct_find_property(op->ptr, "snap") && RNA_struct_property_is_set(op->ptr, "snap")) {
+ if (RNA_boolean_get(op->ptr, "snap")) {
t->modifiers |= MOD_SNAP;
- if (RNA_struct_property_is_set(op->ptr, "snap_target"))
- {
+ if (RNA_struct_property_is_set(op->ptr, "snap_target")) {
snap_target = RNA_enum_get(op->ptr, "snap_target");
}
- if (RNA_struct_property_is_set(op->ptr, "snap_point"))
- {
+ if (RNA_struct_property_is_set(op->ptr, "snap_point")) {
RNA_float_get_array(op->ptr, "snap_point", t->tsnap.snapPoint);
t->tsnap.status |= SNAP_FORCED|POINT_INIT;
}
/* snap align only defined in specific cases */
- if (RNA_struct_find_property(op->ptr, "snap_align"))
- {
+ if (RNA_struct_find_property(op->ptr, "snap_align")) {
t->tsnap.align = RNA_boolean_get(op->ptr, "snap_align");
RNA_float_get_array(op->ptr, "snap_normal", t->tsnap.snapNormal);
normalize_v3(t->tsnap.snapNormal);
}
- if (RNA_struct_find_property(op->ptr, "use_snap_project"))
- {
+ if (RNA_struct_find_property(op->ptr, "use_snap_project")) {
t->tsnap.project = RNA_boolean_get(op->ptr, "use_snap_project");
}
- if (RNA_struct_find_property(op->ptr, "use_snap_self"))
- {
+ if (RNA_struct_find_property(op->ptr, "use_snap_self")) {
t->tsnap.snap_self = RNA_boolean_get(op->ptr, "use_snap_self");
}
}
@@ -498,8 +479,7 @@ static void setSnappingCallback(TransInfo *t)
{
t->tsnap.calcSnap = CalcSnapGeometry;
- switch(t->tsnap.target)
- {
+ switch (t->tsnap.target) {
case SCE_SNAP_TARGET_CLOSEST:
t->tsnap.targetSnap = TargetSnapClosest;
break;
@@ -515,8 +495,7 @@ static void setSnappingCallback(TransInfo *t)
}
- switch (t->mode)
- {
+ switch (t->mode) {
case TFM_TRANSLATION:
t->tsnap.applySnap = ApplySnapTranslation;
t->tsnap.distance = TranslationBetween;
@@ -721,7 +700,7 @@ static float RotationBetween(TransInfo *t, float p1[3], float p2[3])
mul_m3_v3(mtx, end);
mul_m3_v3(mtx, start);
- angle = atan2(start[1],start[0]) - atan2(end[1],end[0]);
+ angle = atan2(start[1], start[0]) - atan2(end[1], end[0]);
}
if (angle > (float)M_PI) {
@@ -766,8 +745,7 @@ static void UNUSED_FUNCTION(CalcSnapGrid)(TransInfo *t, float *UNUSED(vec))
static void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec))
{
- if (t->spacetype == SPACE_VIEW3D)
- {
+ if (t->spacetype == SPACE_VIEW3D) {
float loc[3];
float no[3];
float mval[2];
@@ -777,8 +755,7 @@ static void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec))
mval[0] = t->mval[0];
mval[1] = t->mval[1];
- if (t->tsnap.mode == SCE_SNAP_MODE_VOLUME)
- {
+ if (t->tsnap.mode == SCE_SNAP_MODE_VOLUME) {
ListBase depth_peels;
DepthPeel *p1, *p2;
float *last_p = NULL;
@@ -799,10 +776,8 @@ static void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec))
// }
- for (p1 = depth_peels.first; p1; p1 = p1->next)
- {
- if (p1->flag == 0)
- {
+ for (p1 = depth_peels.first; p1; p1 = p1->next) {
+ if (p1->flag == 0) {
float vec[3];
float new_dist;
@@ -810,13 +785,10 @@ static void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec))
p1->flag = 1;
/* if peeling objects, take the first and last from each object */
- if (t->settings->snap_flag & SCE_SNAP_PEEL_OBJECT)
- {
+ if (t->settings->snap_flag & SCE_SNAP_PEEL_OBJECT) {
DepthPeel *peel;
- for (peel = p1->next; peel; peel = peel->next)
- {
- if (peel->ob == p1->ob)
- {
+ for (peel = p1->next; peel; peel = peel->next) {
+ if (peel->ob == p1->ob) {
peel->flag = 1;
p2 = peel;
}
@@ -824,8 +796,7 @@ static void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec))
}
/* otherwise, pair first with second and so on */
else {
- for (p2 = p1->next; p2 && p2->ob != p1->ob; p2 = p2->next)
- {
+ for (p2 = p1->next; p2 && p2->ob != p1->ob; p2 = p2->next) {
/* nothing to do here */
}
}
@@ -839,9 +810,8 @@ static void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec))
else {
copy_v3_v3(vec, p1->p);
}
-
- if (last_p == NULL)
- {
+
+ if (last_p == NULL) {
copy_v3_v3(p, vec);
max_dist = 0;
break;
@@ -856,8 +826,7 @@ static void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec))
}
}
- if (max_dist != FLT_MAX)
- {
+ if (max_dist != FLT_MAX) {
copy_v3_v3(loc, p);
/* XXX, is there a correct normal in this case ???, for now just z up */
no[0]= 0.0;
@@ -878,8 +847,7 @@ static void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec))
sub_v3_v3v3(tangent, loc, t->tsnap.snapPoint);
tangent[2] = 0;
- if (dot_v3v3(tangent, tangent) > 0)
- {
+ if (dot_v3v3(tangent, tangent) > 0) {
copy_v3_v3(t->tsnap.snapTangent, tangent);
}
@@ -899,8 +867,7 @@ static void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec))
UI_view2d_region_to_view(&t->ar->v2d, t->mval[0], t->mval[1], co, co+1);
- if (ED_uvedit_nearest_uv(t->scene, t->obedit, ima, co, t->tsnap.snapPoint))
- {
+ if (ED_uvedit_nearest_uv(t->scene, t->obedit, ima, co, t->tsnap.snapPoint)) {
ED_space_image_uv_aspect(t->sa->spacedata.first, &aspx, &aspy);
t->tsnap.snapPoint[0] *= aspx;
t->tsnap.snapPoint[1] *= aspy;
@@ -917,9 +884,8 @@ static void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec))
static void TargetSnapCenter(TransInfo *t)
{
- // Only need to calculate once
- if ((t->tsnap.status & TARGET_INIT) == 0)
- {
+ /* Only need to calculate once */
+ if ((t->tsnap.status & TARGET_INIT) == 0) {
copy_v3_v3(t->tsnap.snapTarget, t->center);
if (t->flag & (T_EDIT|T_POSE)) {
Object *ob= t->obedit?t->obedit:t->poseobj;
@@ -932,24 +898,20 @@ static void TargetSnapCenter(TransInfo *t)
static void TargetSnapActive(TransInfo *t)
{
- // Only need to calculate once
- if ((t->tsnap.status & TARGET_INIT) == 0)
- {
+ /* Only need to calculate once */
+ if ((t->tsnap.status & TARGET_INIT) == 0) {
TransData *td = NULL;
TransData *active_td = NULL;
int i;
- for (td = t->data, i = 0 ; i < t->total && td->flag & TD_SELECTED ; i++, td++)
- {
- if (td->flag & TD_ACTIVE)
- {
+ for (td = t->data, i = 0 ; i < t->total && td->flag & TD_SELECTED ; i++, td++) {
+ if (td->flag & TD_ACTIVE) {
active_td = td;
break;
}
}
- if (active_td)
- {
+ if (active_td) {
copy_v3_v3(t->tsnap.snapTarget, active_td->center);
if (t->flag & (T_EDIT|T_POSE)) {
@@ -971,8 +933,7 @@ static void TargetSnapActive(TransInfo *t)
static void TargetSnapMedian(TransInfo *t)
{
// Only need to calculate once
- if ((t->tsnap.status & TARGET_INIT) == 0)
- {
+ if ((t->tsnap.status & TARGET_INIT) == 0) {
TransData *td = NULL;
int i;
@@ -980,8 +941,7 @@ static void TargetSnapMedian(TransInfo *t)
t->tsnap.snapTarget[1] = 0;
t->tsnap.snapTarget[2] = 0;
- for (td = t->data, i = 0 ; i < t->total && td->flag & TD_SELECTED ; i++, td++)
- {
+ for (td = t->data, i = 0 ; i < t->total && td->flag & TD_SELECTED ; i++, td++) {
add_v3_v3(t->tsnap.snapTarget, td->center);
}
@@ -999,21 +959,17 @@ static void TargetSnapMedian(TransInfo *t)
static void TargetSnapClosest(TransInfo *t)
{
// Only valid if a snap point has been selected
- if (t->tsnap.status & POINT_INIT)
- {
+ if (t->tsnap.status & POINT_INIT) {
TransData *closest = NULL, *td = NULL;
/* Object mode */
- if (t->flag & T_OBJECT)
- {
+ if (t->flag & T_OBJECT) {
int i;
- for (td = t->data, i = 0 ; i < t->total && td->flag & TD_SELECTED ; i++, td++)
- {
- struct BoundBox *bb = object_get_boundbox(td->ob);
+ for (td = t->data, i = 0 ; i < t->total && td->flag & TD_SELECTED ; i++, td++) {
+ struct BoundBox *bb = BKE_object_boundbox_get(td->ob);
/* use boundbox if possible */
- if (bb)
- {
+ if (bb) {
int j;
for (j = 0; j < 8; j++) {
@@ -1041,8 +997,7 @@ static void TargetSnapClosest(TransInfo *t)
dist = t->tsnap.distance(t, loc, t->tsnap.snapPoint);
- if (closest == NULL || fabs(dist) < fabs(t->tsnap.dist))
- {
+ if (closest == NULL || fabs(dist) < fabs(t->tsnap.dist)) {
copy_v3_v3(t->tsnap.snapTarget, loc);
closest = td;
t->tsnap.dist = dist;
@@ -1065,8 +1020,7 @@ static void TargetSnapClosest(TransInfo *t)
dist = t->tsnap.distance(t, loc, t->tsnap.snapPoint);
- if (closest == NULL || fabs(dist) < fabs(t->tsnap.dist))
- {
+ if (closest == NULL || fabs(dist) < fabs(t->tsnap.dist)) {
copy_v3_v3(t->tsnap.snapTarget, loc);
closest = td;
t->tsnap.dist = dist;
@@ -1101,9 +1055,9 @@ static int snapFace(ARegion *ar, float v1co[3], float v2co[3], float v3co[3], fl
copy_v3_v3(location, intersect);
if (v4co)
- normal_quad_v3( normal,v1co, v2co, v3co, v4co);
+ normal_quad_v3(normal, v1co, v2co, v3co, v4co);
else
- normal_tri_v3( normal,v1co, v2co, v3co);
+ normal_tri_v3(normal, v1co, v2co, v3co);
mul_m4_v3(obmat, location);
@@ -1112,8 +1066,7 @@ static int snapFace(ARegion *ar, float v1co[3], float v2co[3], float v3co[3], fl
project_int(ar, location, screen_loc);
new_dist = abs(screen_loc[0] - (int)mval[0]) + abs(screen_loc[1] - (int)mval[1]);
- if (new_dist <= *dist && new_depth < *depth)
- {
+ if (new_dist <= *dist && new_depth < *depth) {
*depth = new_depth;
retval = 1;
@@ -1145,8 +1098,7 @@ static int snapEdge(ARegion *ar, float v1co[3], short v1no[3], float v2co[3], sh
result = isect_line_line_v3(v1co, v2co, ray_start_local, ray_end, intersect, dvec); /* dvec used but we don't care about result */
- if (result)
- {
+ if (result) {
float edge_loc[3], vec[3];
float mul;
@@ -1167,8 +1119,7 @@ static int snapEdge(ARegion *ar, float v1co[3], short v1no[3], float v2co[3], sh
copy_v3_v3(intersect, v2co);
}
- if (dot_v3v3(ray_normal_local, dvec) > 0)
- {
+ if (dot_v3v3(ray_normal_local, dvec) > 0) {
float location[3];
float new_depth;
int screen_loc[2];
@@ -1187,8 +1138,7 @@ static int snapEdge(ARegion *ar, float v1co[3], short v1no[3], float v2co[3], sh
* this takes care of series of connected edges a bit slanted w.r.t the viewport
* otherwise, it would stick to the verts of the closest edge and not slide along merrily
* */
- if (new_dist <= *r_dist && new_depth < *r_depth * 1.001f)
- {
+ if (new_dist <= *r_dist && new_depth < *r_depth * 1.001f) {
float n1[3], n2[3];
*r_depth = new_depth;
@@ -1199,8 +1149,7 @@ static int snapEdge(ARegion *ar, float v1co[3], short v1no[3], float v2co[3], sh
mul = dot_v3v3(vec, edge_loc) / dot_v3v3(edge_loc, edge_loc);
- if (r_no)
- {
+ if (r_no) {
normal_short_to_float_v3(n1, v1no);
normal_short_to_float_v3(n2, v2no);
interp_v3_v3v3(r_no, n2, n1, mul);
@@ -1227,8 +1176,7 @@ static int snapVertex(ARegion *ar, float vco[3], short vno[3], float obmat[][4],
sub_v3_v3v3(dvec, vco, ray_start_local);
- if (dot_v3v3(ray_normal_local, dvec) > 0)
- {
+ if (dot_v3v3(ray_normal_local, dvec) > 0) {
float location[3];
float new_depth;
int screen_loc[2];
@@ -1243,15 +1191,13 @@ static int snapVertex(ARegion *ar, float vco[3], short vno[3], float obmat[][4],
project_int(ar, location, screen_loc);
new_dist = abs(screen_loc[0] - (int)mval[0]) + abs(screen_loc[1] - (int)mval[1]);
- if (new_dist <= *r_dist && new_depth < *r_depth)
- {
+ if (new_dist <= *r_dist && new_depth < *r_depth) {
*r_depth = new_depth;
retval = 1;
copy_v3_v3(r_loc, location);
- if (r_no)
- {
+ if (r_no) {
normal_short_to_float_v3(r_no, vno);
mul_m3_v3(timat, r_no);
normalize_v3(r_no);
@@ -1280,16 +1226,14 @@ static int snapArmature(short snap_mode, ARegion *ar, Object *ob, bArmature *arm
mul_m4_v3(imat, ray_start_local);
mul_mat3_m4_v3(imat, ray_normal_local);
- if (arm->edbo)
- {
+ if (arm->edbo) {
EditBone *eBone;
for (eBone=arm->edbo->first; eBone; eBone=eBone->next) {
if (eBone->layer & arm->layer) {
/* skip hidden or moving (selected) bones */
if ((eBone->flag & (BONE_HIDDEN_A|BONE_ROOTSEL|BONE_TIPSEL))==0) {
- switch (snap_mode)
- {
+ switch (snap_mode) {
case SCE_SNAP_MODE_VERTEX:
retval |= snapVertex(ar, eBone->head, NULL, obmat, NULL, ray_start, ray_start_local, ray_normal_local, mval, r_loc, NULL, r_dist, r_depth);
retval |= snapVertex(ar, eBone->tail, NULL, obmat, NULL, ray_start, ray_start_local, ray_normal_local, mval, r_loc, NULL, r_dist, r_depth);
@@ -1313,8 +1257,7 @@ static int snapArmature(short snap_mode, ARegion *ar, Object *ob, bArmature *arm
float *head_vec = pchan->pose_head;
float *tail_vec = pchan->pose_tail;
- switch (snap_mode)
- {
+ switch (snap_mode) {
case SCE_SNAP_MODE_VERTEX:
retval |= snapVertex(ar, head_vec, NULL, obmat, NULL, ray_start, ray_start_local, ray_normal_local, mval, r_loc, NULL, r_dist, r_depth);
retval |= snapVertex(ar, tail_vec, NULL, obmat, NULL, ray_start, ray_start_local, ray_normal_local, mval, r_loc, NULL, r_dist, r_depth);
@@ -1360,14 +1303,13 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh
* test against boundbox first
* */
if (totface > 16) {
- struct BoundBox *bb = object_get_boundbox(ob);
- test = ray_hit_boundbox(bb, ray_start_local, ray_normal_local);
+ struct BoundBox *bb = BKE_object_boundbox_get(ob);
+ test = BKE_boundbox_ray_hit_check(bb, ray_start_local, ray_normal_local);
}
if (test == 1) {
- switch (snap_mode)
- {
+ switch (snap_mode) {
case SCE_SNAP_MODE_FACE:
{
#ifdef USE_BVH_FACE_SNAP // Added for durian
@@ -1383,8 +1325,7 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh
hit.index = -1;
hit.dist = *r_depth * (*r_depth == FLT_MAX ? 1.0f : local_scale);
- if (treeData.tree && BLI_bvhtree_ray_cast(treeData.tree, ray_start_local, ray_normal_local, 0.0f, &hit, treeData.raycast_callback, &treeData) != -1)
- {
+ if (treeData.tree && BLI_bvhtree_ray_cast(treeData.tree, ray_start_local, ray_normal_local, 0.0f, &hit, treeData.raycast_callback, &treeData) != -1) {
if (hit.dist/local_scale <= *r_depth) {
*r_depth= hit.dist/local_scale;
copy_v3_v3(r_loc, hit.co);
@@ -1409,8 +1350,7 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh
int index = 0;
int i;
- if (em != NULL)
- {
+ if (em != NULL) {
index_array = dm->getTessFaceDataArray(dm, CD_ORIGINDEX);
EDBM_index_arrays_init(em, 0, 0, 1);
}
@@ -1421,8 +1361,7 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh
test = 1; /* reset for every face */
- if (em != NULL)
- {
+ if (em != NULL) {
if (index_array) {
index = index_array[i];
}
@@ -1436,8 +1375,7 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh
else {
efa = EDBM_face_at_index(em, index);
- if (efa && BM_elem_flag_test(efa, BM_ELEM_HIDDEN))
- {
+ if (efa && BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) {
test = 0;
}
else if (efa) {
@@ -1456,28 +1394,24 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh
}
- if (test)
- {
+ if (test) {
int result;
float *v4co = NULL;
- if (f->v4)
- {
+ if (f->v4) {
v4co = verts[f->v4].co;
}
result = snapFace(ar, verts[f->v1].co, verts[f->v2].co, verts[f->v3].co, v4co, mval, ray_start, ray_start_local, ray_normal_local, obmat, timat, loc, no, dist, depth);
retval |= result;
- if (f->v4 && result == 0)
- {
+ if (f->v4 && result == 0) {
retval |= snapFace(ar, verts[f->v3].co, verts[f->v4].co, verts[f->v1].co, verts[f->v2].co, mval, ray_start, ray_start_local, ray_normal_local, obmat, timat, loc, no, dist, depth);
}
}
}
- if (em != NULL)
- {
+ if (em != NULL) {
EDBM_index_arrays_free(em);
}
#endif
@@ -1490,8 +1424,7 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh
int index = 0;
int i;
- if (em != NULL)
- {
+ if (em != NULL) {
index_array = dm->getVertDataArray(dm, CD_ORIGINDEX);
EDBM_index_arrays_init(em, 1, 0, 0);
}
@@ -1516,22 +1449,19 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh
else {
eve = EDBM_vert_at_index(em, index);
- if (eve && (BM_elem_flag_test(eve, BM_ELEM_HIDDEN) || BM_elem_flag_test(eve, BM_ELEM_SELECT)))
- {
+ if (eve && (BM_elem_flag_test(eve, BM_ELEM_HIDDEN) || BM_elem_flag_test(eve, BM_ELEM_SELECT))) {
test = 0;
}
}
}
- if (test)
- {
+ if (test) {
retval |= snapVertex(ar, v->co, v->no, obmat, timat, ray_start, ray_start_local, ray_normal_local, mval, r_loc, r_no, r_dist, r_depth);
}
}
- if (em != NULL)
- {
+ if (em != NULL) {
EDBM_index_arrays_free(em);
}
break;
@@ -1545,8 +1475,7 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh
int index = 0;
int i;
- if (em != NULL)
- {
+ if (em != NULL) {
index_array = dm->getEdgeDataArray(dm, CD_ORIGINDEX);
EDBM_index_arrays_init(em, 0, 1, 0);
}
@@ -1557,8 +1486,7 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh
test = 1; /* reset for every vert */
- if (em != NULL)
- {
+ if (em != NULL) {
if (index_array) {
index = index_array[i];
}
@@ -1580,16 +1508,13 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh
}
}
}
-
-
- if (test)
- {
+
+ if (test) {
retval |= snapEdge(ar, verts[e->v1].co, verts[e->v1].no, verts[e->v2].co, verts[e->v2].no, obmat, timat, ray_start, ray_start_local, ray_normal_local, mval, r_loc, r_no, r_dist, r_depth);
}
}
- if (em != NULL)
- {
+ if (em != NULL) {
EDBM_index_arrays_free(em);
}
break;
@@ -1673,8 +1598,7 @@ static int snapObjects(Scene *scene, View3D *v3d, ARegion *ar, Object *obedit, c
DupliObject *dupli_ob;
ListBase *lb = object_duplilist(scene, ob);
- for (dupli_ob = lb->first; dupli_ob; dupli_ob = dupli_ob->next)
- {
+ for (dupli_ob = lb->first; dupli_ob; dupli_ob = dupli_ob->next) {
Object *dob = dupli_ob->ob;
retval |= snapObject(scene, ar, dob, 0, dupli_ob->mat, ray_start, ray_normal, mval, r_loc, r_no, r_dist, &depth);
@@ -1726,8 +1650,7 @@ static void removeDoublesPeel(ListBase *depth_peels)
{
DepthPeel *peel;
- for (peel = depth_peels->first; peel; peel = peel->next)
- {
+ for (peel = depth_peels->first; peel; peel = peel->next) {
DepthPeel *next_peel = peel->next;
if (next_peel && ABS(peel->depth - next_peel->depth) < 0.0015f) {
@@ -1786,8 +1709,8 @@ static int peelDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4],
* test against boundbox first
* */
if (totface > 16) {
- struct BoundBox *bb = object_get_boundbox(ob);
- test = ray_hit_boundbox(bb, ray_start_local, ray_normal_local);
+ struct BoundBox *bb = BKE_object_boundbox_get(ob);
+ test = BKE_boundbox_ray_hit_check(bb, ray_start_local, ray_normal_local);
}
if (test == 1) {
@@ -1815,9 +1738,9 @@ static int peelDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4],
copy_v3_v3(location, intersect);
if (f->v4)
- normal_quad_v3( normal,verts[f->v1].co, verts[f->v2].co, verts[f->v3].co, verts[f->v4].co);
+ normal_quad_v3(normal, verts[f->v1].co, verts[f->v2].co, verts[f->v3].co, verts[f->v4].co);
else
- normal_tri_v3( normal,verts[f->v1].co, verts[f->v2].co, verts[f->v3].co);
+ normal_tri_v3(normal, verts[f->v1].co, verts[f->v2].co, verts[f->v3].co);
mul_m4_v3(obmat, location);
@@ -1844,13 +1767,13 @@ static int peelDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4],
copy_v3_v3(location, intersect);
if (f->v4)
- normal_quad_v3( normal,verts[f->v1].co, verts[f->v2].co, verts[f->v3].co, verts[f->v4].co);
+ normal_quad_v3(normal, verts[f->v1].co, verts[f->v2].co, verts[f->v3].co, verts[f->v4].co);
else
- normal_tri_v3( normal,verts[f->v1].co, verts[f->v2].co, verts[f->v3].co);
+ normal_tri_v3(normal, verts[f->v1].co, verts[f->v2].co, verts[f->v3].co);
mul_m4_v3(obmat, location);
- new_depth = len_v3v3(location, ray_start);
+ new_depth = len_v3v3(location, ray_start);
mul_m3_v3(timat, normal);
normalize_v3(normal);
@@ -1881,8 +1804,7 @@ static int peelObjects(Scene *scene, View3D *v3d, ARegion *ar, Object *obedit, L
DupliObject *dupli_ob;
ListBase *lb = object_duplilist(scene, ob);
- for (dupli_ob = lb->first; dupli_ob; dupli_ob = dupli_ob->next)
- {
+ for (dupli_ob = lb->first; dupli_ob; dupli_ob = dupli_ob->next) {
Object *dob = dupli_ob->ob;
if (dob->type == OB_MESH) {
diff --git a/source/blender/editors/util/crazyspace.c b/source/blender/editors/util/crazyspace.c
index 4b03c846f3e..5430a9a1c90 100644
--- a/source/blender/editors/util/crazyspace.c
+++ b/source/blender/editors/util/crazyspace.c
@@ -187,75 +187,6 @@ void crazyspace_set_quats_editmesh(BMEditMesh *em, float *origcos, float *mapped
em->bm->elem_index_dirty |= BM_VERT;
MEM_freeN(vert_table);
-#if 0
- BMEditVert *eve, *prev;
- BMEditFace *efa;
- BMIter iter;
- float *v1, *v2, *v3, *v4, *co1, *co2, *co3, *co4;
- intptr_t index = 0;
-
- /* two abused locations in vertices */
- for (eve = em->verts.first; eve; eve = eve->next, index++) {
- eve->tmp.p = NULL;
- eve->prev = (EditVert *)index;
- }
-
- /* first store two sets of tangent vectors in vertices, we derive it just from the face-edges */
- for (efa = em->faces.first; efa; efa = efa->next) {
-
- /* retrieve mapped coordinates */
- v1 = mappedcos + 3 * (intptr_t)(efa->v1->prev);
- v2 = mappedcos + 3 * (intptr_t)(efa->v2->prev);
- v3 = mappedcos + 3 * (intptr_t)(efa->v3->prev);
-
- co1 = (origcos) ? origcos + 3 * (intptr_t)(efa->v1->prev) : efa->v1->co;
- co2 = (origcos) ? origcos + 3 * (intptr_t)(efa->v2->prev) : efa->v2->co;
- co3 = (origcos) ? origcos + 3 * (intptr_t)(efa->v3->prev) : efa->v3->co;
-
- if (efa->v2->tmp.p == NULL && efa->v2->f1) {
- set_crazy_vertex_quat(quats, co2, co3, co1, v2, v3, v1);
- efa->v2->tmp.p = (void *)quats;
- quats += 4;
- }
-
- if (efa->v4) {
- v4 = mappedcos + 3 * (intptr_t)(efa->v4->prev);
- co4 = (origcos) ? origcos + 3 * (intptr_t)(efa->v4->prev) : efa->v4->co;
-
- if (efa->v1->tmp.p == NULL && efa->v1->f1) {
- set_crazy_vertex_quat(quats, co1, co2, co4, v1, v2, v4);
- efa->v1->tmp.p = (void *)quats;
- quats += 4;
- }
- if (efa->v3->tmp.p == NULL && efa->v3->f1) {
- set_crazy_vertex_quat(quats, co3, co4, co2, v3, v4, v2);
- efa->v3->tmp.p = (void *)quats;
- quats += 4;
- }
- if (efa->v4->tmp.p == NULL && efa->v4->f1) {
- set_crazy_vertex_quat(quats, co4, co1, co3, v4, v1, v3);
- efa->v4->tmp.p = (void *)quats;
- quats += 4;
- }
- }
- else {
- if (efa->v1->tmp.p == NULL && efa->v1->f1) {
- set_crazy_vertex_quat(quats, co1, co2, co3, v1, v2, v3);
- efa->v1->tmp.p = (void *)quats;
- quats += 4;
- }
- if (efa->v3->tmp.p == NULL && efa->v3->f1) {
- set_crazy_vertex_quat(quats, co3, co1, co2, v3, v1, v2);
- efa->v3->tmp.p = (void *)quats;
- quats += 4;
- }
- }
- }
-
- /* restore abused prev pointer */
- for (prev = NULL, eve = em->verts.first; eve; prev = eve, eve = eve->next)
- eve->prev = prev;
-#endif
}
/* BMESH_TODO - use MPolys over MFace's */
diff --git a/source/blender/editors/util/numinput.c b/source/blender/editors/util/numinput.c
index c037508687b..1f1d5a0c0c0 100644
--- a/source/blender/editors/util/numinput.c
+++ b/source/blender/editors/util/numinput.c
@@ -207,8 +207,7 @@ char handleNumInput(NumInput *n, wmEvent *event)
if (n->flag & NUM_NO_FRACTION)
return 0;
- switch (n->ctrl[idx])
- {
+ switch (n->ctrl[idx]) {
case 0:
case 1:
n->ctrl[idx] = 10;
diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c
index a43d549cba1..cd88614f8fe 100644
--- a/source/blender/editors/util/undo.c
+++ b/source/blender/editors/util/undo.c
@@ -155,7 +155,7 @@ static int ed_undo_step(bContext *C, int step, const char *undoname)
ED_text_undo_step(C, step);
}
else if (obedit) {
- if (ELEM7(obedit->type, OB_MESH, OB_FONT, OB_CURVE, OB_SURF, OB_MBALL, OB_LATTICE, OB_ARMATURE)) {
+ if (OB_TYPE_SUPPORT_EDITMODE(obedit->type)) {
if (undoname)
undo_editmode_name(C, undoname);
else
@@ -247,7 +247,7 @@ int ED_undo_valid(const bContext *C, const char *undoname)
return 1;
}
else if (obedit) {
- if (ELEM7(obedit->type, OB_MESH, OB_FONT, OB_CURVE, OB_SURF, OB_MBALL, OB_LATTICE, OB_ARMATURE)) {
+ if (OB_TYPE_SUPPORT_EDITMODE(obedit->type)) {
return undo_editmode_valid(undoname);
}
}
@@ -413,9 +413,11 @@ void ED_undo_operator_repeat_cb_evt(bContext *C, void *arg_op, int UNUSED(arg_ev
/* ************************** */
-#define UNDOSYSTEM_GLOBAL 1
-#define UNDOSYSTEM_EDITMODE 2
-#define UNDOSYSTEM_PARTICLE 3
+enum {
+ UNDOSYSTEM_GLOBAL = 1,
+ UNDOSYSTEM_EDITMODE = 2,
+ UNDOSYSTEM_PARTICLE = 3
+};
static int get_undo_system(bContext *C)
{
@@ -423,8 +425,9 @@ static int get_undo_system(bContext *C)
/* find out which undo system */
if (obedit) {
- if (ELEM7(obedit->type, OB_MESH, OB_FONT, OB_CURVE, OB_SURF, OB_MBALL, OB_LATTICE, OB_ARMATURE))
+ if (OB_TYPE_SUPPORT_EDITMODE(obedit->type)) {
return UNDOSYSTEM_EDITMODE;
+ }
}
else {
Object *obact = CTX_data_active_object(C);
diff --git a/source/blender/editors/uvedit/uvedit_buttons.c b/source/blender/editors/uvedit/uvedit_buttons.c
index 394b8952a13..ec645f86848 100644
--- a/source/blender/editors/uvedit/uvedit_buttons.c
+++ b/source/blender/editors/uvedit/uvedit_buttons.c
@@ -74,12 +74,12 @@ static int uvedit_center(Scene *scene, BMEditMesh *em, Image *ima, float center[
zero_v2(center);
BM_ITER_MESH (f, &iter, em->bm, BM_FACES_OF_MESH) {
tf = CustomData_bmesh_get(&em->bm->pdata, f->head.data, CD_MTEXPOLY);
- if (!uvedit_face_visible(scene, ima, f, tf))
+ if (!uvedit_face_visible_test(scene, ima, f, tf))
continue;
BM_ITER_ELEM (l, &liter, f, BM_LOOPS_OF_FACE) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
- if (uvedit_uv_selected(em, scene, l)) {
+ if (uvedit_uv_select_test(em, scene, l)) {
add_v2_v2(center, luv->uv);
tot++;
}
@@ -104,7 +104,7 @@ static void uvedit_translate(Scene *scene, BMEditMesh *em, Image *UNUSED(ima), f
BM_ITER_MESH (f, &iter, em->bm, BM_FACES_OF_MESH) {
BM_ITER_ELEM (l, &liter, f, BM_LOOPS_OF_FACE) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
- if (uvedit_uv_selected(em, scene, l)) {
+ if (uvedit_uv_select_test(em, scene, l)) {
add_v2_v2(luv->uv, delta);
}
}
diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c
index 9084e5770ed..a90f8253654 100644
--- a/source/blender/editors/uvedit/uvedit_draw.c
+++ b/source/blender/editors/uvedit/uvedit_draw.c
@@ -186,8 +186,8 @@ static void draw_uvs_stretch(SpaceImage *sima, Scene *scene, BMEditMesh *em, MTe
BLI_array_empty(tf_uv);
BLI_array_empty(tf_uvorig);
- BLI_array_growitems(tf_uv, efa->len);
- BLI_array_growitems(tf_uvorig, efa->len);
+ BLI_array_grow_items(tf_uv, efa->len);
+ BLI_array_grow_items(tf_uvorig, efa->len);
i = 0;
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
@@ -198,13 +198,13 @@ static void draw_uvs_stretch(SpaceImage *sima, Scene *scene, BMEditMesh *em, MTe
i++;
}
- poly_copy_aspect(tf_uvorig, tf_uv, aspx, aspy, efa->len);
+ uv_poly_copy_aspect(tf_uvorig, tf_uv, aspx, aspy, efa->len);
totarea += BM_face_calc_area(efa);
//totuvarea += tf_area(tf, efa->v4!=0);
- totuvarea += poly_uv_area(tf_uv, efa->len);
+ totuvarea += uv_poly_area(tf_uv, efa->len);
- if (uvedit_face_visible(scene, ima, efa, tf)) {
+ if (uvedit_face_visible_test(scene, ima, efa, tf)) {
BM_elem_flag_enable(efa, BM_ELEM_TAG);
}
else {
@@ -236,8 +236,8 @@ static void draw_uvs_stretch(SpaceImage *sima, Scene *scene, BMEditMesh *em, MTe
BLI_array_empty(tf_uv);
BLI_array_empty(tf_uvorig);
- BLI_array_growitems(tf_uv, efa->len);
- BLI_array_growitems(tf_uvorig, efa->len);
+ BLI_array_grow_items(tf_uv, efa->len);
+ BLI_array_grow_items(tf_uvorig, efa->len);
i = 0;
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
@@ -248,10 +248,10 @@ static void draw_uvs_stretch(SpaceImage *sima, Scene *scene, BMEditMesh *em, MTe
i++;
}
- poly_copy_aspect(tf_uvorig, tf_uv, aspx, aspy, efa->len);
+ uv_poly_copy_aspect(tf_uvorig, tf_uv, aspx, aspy, efa->len);
//uvarea = tf_area(tf, efa->v4!=0) / totuvarea;
- uvarea = poly_uv_area(tf_uv, efa->len) / totuvarea;
+ uvarea = uv_poly_area(tf_uv, efa->len) / totuvarea;
if (area < FLT_EPSILON || uvarea < FLT_EPSILON)
areadiff = 1.0f;
@@ -294,7 +294,7 @@ static void draw_uvs_stretch(SpaceImage *sima, Scene *scene, BMEditMesh *em, MTe
BM_ITER_MESH (efa, &iter, bm, BM_FACES_OF_MESH) {
tf = CustomData_bmesh_get(&bm->pdata, efa->head.data, CD_MTEXPOLY);
- if (uvedit_face_visible(scene, ima, efa, tf)) {
+ if (uvedit_face_visible_test(scene, ima, efa, tf)) {
nverts = efa->len;
BM_elem_flag_enable(efa, BM_ELEM_TAG);
BLI_array_empty(tf_uv);
@@ -303,19 +303,19 @@ static void draw_uvs_stretch(SpaceImage *sima, Scene *scene, BMEditMesh *em, MTe
BLI_array_empty(ang);
BLI_array_empty(av);
BLI_array_empty(auv);
- BLI_array_growitems(tf_uv, nverts);
- BLI_array_growitems(tf_uvorig, nverts);
- BLI_array_growitems(uvang, nverts);
- BLI_array_growitems(ang, nverts);
- BLI_array_growitems(av, nverts);
- BLI_array_growitems(auv, nverts);
+ BLI_array_grow_items(tf_uv, nverts);
+ BLI_array_grow_items(tf_uvorig, nverts);
+ BLI_array_grow_items(uvang, nverts);
+ BLI_array_grow_items(ang, nverts);
+ BLI_array_grow_items(av, nverts);
+ BLI_array_grow_items(auv, nverts);
BM_ITER_ELEM_INDEX (l, &liter, efa, BM_LOOPS_OF_FACE, i) {
luv = CustomData_bmesh_get(&bm->ldata, l->head.data, CD_MLOOPUV);
copy_v2_v2(tf_uvorig[i], luv->uv);
}
- poly_copy_aspect(tf_uvorig, tf_uv, aspx, aspy, nverts);
+ uv_poly_copy_aspect(tf_uvorig, tf_uv, aspx, aspy, nverts);
j = nverts - 1;
BM_ITER_ELEM_INDEX (l, &liter, efa, BM_LOOPS_OF_FACE, i) {
@@ -506,11 +506,11 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
BM_ITER_MESH (efa, &iter, bm, BM_FACES_OF_MESH) {
tf = CustomData_bmesh_get(&bm->pdata, efa->head.data, CD_MTEXPOLY);
- if (uvedit_face_visible(scene, ima, efa, tf)) {
+ if (uvedit_face_visible_test(scene, ima, efa, tf)) {
BM_elem_flag_enable(efa, BM_ELEM_TAG);
if (tf == activetf) continue; /* important the temp boolean is set above */
- if (uvedit_face_selected(scene, em, efa))
+ if (uvedit_face_select_test(scene, em, efa))
glColor4ubv((GLubyte *)col2);
else
glColor4ubv((GLubyte *)col1);
@@ -536,7 +536,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
BM_ITER_MESH (efa, &iter, bm, BM_FACES_OF_MESH) {
tf = CustomData_bmesh_get(&bm->pdata, efa->head.data, CD_MTEXPOLY);
- if (uvedit_face_visible(scene, ima, efa, tf)) {
+ if (uvedit_face_visible_test(scene, ima, efa, tf)) {
BM_elem_flag_enable(efa, BM_ELEM_TAG);
}
else {
@@ -552,7 +552,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
if (activef) {
tf = CustomData_bmesh_get(&bm->pdata, activef->head.data, CD_MTEXPOLY);
- if (uvedit_face_visible(scene, ima, activef, tf)) {
+ if (uvedit_face_visible_test(scene, ima, activef, tf)) {
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
UI_ThemeColor4(TH_EDITMESH_ACTIVE);
@@ -670,7 +670,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
glBegin(GL_LINE_LOOP);
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
- sel = (uvedit_uv_selected(em, scene, l) ? 1 : 0);
+ sel = (uvedit_uv_select_test(em, scene, l) ? 1 : 0);
glColor4ubv(sel ? (GLubyte *)col1 : (GLubyte *)col2);
luv = CustomData_bmesh_get(&bm->ldata, l->head.data, CD_MLOOPUV);
@@ -688,7 +688,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
glBegin(GL_LINES);
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
- sel = (uvedit_edge_selected(em, scene, l) ? 1 : 0);
+ sel = (uvedit_edge_select_test(em, scene, l) ? 1 : 0);
if (sel != lastsel) {
glColor4ubv(sel ? (GLubyte *)col1 : (GLubyte *)col2);
lastsel = sel;
@@ -741,8 +741,8 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
if (!BM_elem_flag_test(efa, BM_ELEM_TAG))
continue;
- if (!uvedit_face_selected(scene, em, efa)) {
- poly_uv_center(em, efa, cent);
+ if (!uvedit_face_select_test(scene, em, efa)) {
+ uv_poly_center(em, efa, cent);
bglVertex2fv(cent);
}
}
@@ -756,8 +756,8 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
if (!BM_elem_flag_test(efa, BM_ELEM_TAG))
continue;
- if (uvedit_face_selected(scene, em, efa)) {
- poly_uv_center(em, efa, cent);
+ if (uvedit_face_select_test(scene, em, efa)) {
+ uv_poly_center(em, efa, cent);
bglVertex2fv(cent);
}
}
@@ -779,7 +779,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
luv = CustomData_bmesh_get(&bm->ldata, l->head.data, CD_MLOOPUV);
- if (!uvedit_uv_selected(em, scene, l))
+ if (!uvedit_uv_select_test(em, scene, l))
bglVertex2fv(luv->uv);
}
}
@@ -816,7 +816,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
luv = CustomData_bmesh_get(&bm->ldata, l->head.data, CD_MLOOPUV);
- if (uvedit_uv_selected(em, scene, l))
+ if (uvedit_uv_select_test(em, scene, l))
bglVertex2fv(luv->uv);
}
}
@@ -855,7 +855,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
glDisable(GL_BLEND);
/* draw vert preview */
- glPointSize(pointsize * 2.0);
+ glPointSize(pointsize * 2.0f);
UI_ThemeColor4(TH_STITCH_PREVIEW_STITCHABLE);
glVertexPointer(2, GL_FLOAT, 0, stitch_preview->preview_stitchable);
glDrawArrays(GL_POINTS, 0, stitch_preview->num_stitchable);
diff --git a/source/blender/editors/uvedit/uvedit_intern.h b/source/blender/editors/uvedit/uvedit_intern.h
index fdcb5db1911..d258d271833 100644
--- a/source/blender/editors/uvedit/uvedit_intern.h
+++ b/source/blender/editors/uvedit/uvedit_intern.h
@@ -54,14 +54,9 @@ struct BMVert;
int uvedit_face_visible_nolocal(struct Scene *scene, struct BMFace *efa);
/* geometric utilities */
-
-void uv_center(float uv[][2], float cent[2], int quad);
-float uv_area(float uv[][2], int quad);
-void uv_copy_aspect(float uv_orig[][2], float uv[][2], float aspx, float aspy);
-
-float poly_uv_area(float uv[][2], int len);
-void poly_copy_aspect(float uv_orig[][2], float uv[][2], float aspx, float aspy, int len);
-void poly_uv_center(struct BMEditMesh *em, struct BMFace *f, float cent[2]);
+float uv_poly_area(float uv[][2], int len);
+void uv_poly_copy_aspect(float uv_orig [][2], float uv[][2], float aspx, float aspy, int len);
+void uv_poly_center(struct BMEditMesh *em, struct BMFace *f, float r_cent[2]);
/* find nearest */
@@ -74,8 +69,10 @@ typedef struct NearestHit {
int vert1, vert2; //index in mesh of edge vertices
} NearestHit;
-void uv_find_nearest_vert(struct Scene *scene, struct Image *ima, struct BMEditMesh *em, float co[2], float penalty[2], struct NearestHit *hit);
-void uv_find_nearest_edge(struct Scene *scene, struct Image *ima, struct BMEditMesh *em, float co[2], struct NearestHit *hit);
+void uv_find_nearest_vert(struct Scene *scene, struct Image *ima, struct BMEditMesh *em,
+ const float co[2], const float penalty[2], struct NearestHit *hit);
+void uv_find_nearest_edge(struct Scene *scene, struct Image *ima, struct BMEditMesh *em,
+ const float co[2], struct NearestHit *hit);
/* utility tool functions */
@@ -120,4 +117,3 @@ void UV_OT_unwrap(struct wmOperatorType *ot);
void UV_OT_stitch(struct wmOperatorType *ot);
#endif /* __UVEDIT_INTERN_H__ */
-
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index c08093e09ee..53bf19c04cc 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -47,6 +47,7 @@
#include "DNA_scene_types.h"
#include "BLI_math.h"
+#include "BLI_lasso.h"
#include "BLI_blenlib.h"
#include "BLI_array.h"
#include "BLI_utildefines.h"
@@ -82,7 +83,7 @@
#include "uvedit_intern.h"
-#define EFA_F1_FLAG 2
+static void select_all_perform(Scene *scene, Image *ima, BMEditMesh *em, int action);
/************************* state testing ************************/
@@ -185,7 +186,7 @@ void ED_uvedit_assign_image(Main *bmain, Scene *scene, Object *obedit, Image *im
return;
}
- if (scene_use_new_shading_nodes(scene)) {
+ if (BKE_scene_use_new_shading_nodes(scene)) {
/* new shading system, assign image in material */
int sloppy = 1;
BMFace *efa = BM_active_face_get(em->bm, sloppy);
@@ -207,7 +208,7 @@ void ED_uvedit_assign_image(Main *bmain, Scene *scene, Object *obedit, Image *im
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if (uvedit_face_visible(scene, previma, efa, tf)) {
+ if (uvedit_face_visible_test(scene, previma, efa, tf)) {
if (ima) {
tf->tpage = ima;
@@ -293,7 +294,7 @@ int uvedit_face_visible_nolocal(Scene *scene, BMFace *efa)
return (BM_elem_flag_test(efa, BM_ELEM_HIDDEN) == 0 && BM_elem_flag_test(efa, BM_ELEM_SELECT));
}
-int uvedit_face_visible(Scene *scene, Image *ima, BMFace *efa, MTexPoly *tf)
+int uvedit_face_visible_test(Scene *scene, Image *ima, BMFace *efa, MTexPoly *tf)
{
ToolSettings *ts = scene->toolsettings;
@@ -303,7 +304,7 @@ int uvedit_face_visible(Scene *scene, Image *ima, BMFace *efa, MTexPoly *tf)
return uvedit_face_visible_nolocal(scene, efa);
}
-int uvedit_face_selected(Scene *scene, BMEditMesh *em, BMFace *efa)
+int uvedit_face_select_test(Scene *scene, BMEditMesh *em, BMFace *efa)
{
ToolSettings *ts = scene->toolsettings;
@@ -324,12 +325,16 @@ int uvedit_face_selected(Scene *scene, BMEditMesh *em, BMFace *efa)
}
}
-int uvedit_face_select(Scene *scene, BMEditMesh *em, BMFace *efa)
+int uvedit_face_select_enable(Scene *scene, BMEditMesh *em, BMFace *efa, const short do_history)
{
ToolSettings *ts = scene->toolsettings;
- if (ts->uv_flag & UV_SYNC_SELECTION)
+ if (ts->uv_flag & UV_SYNC_SELECTION) {
BM_face_select_set(em->bm, efa, TRUE);
+ if (do_history) {
+ BM_select_history_store(em->bm, (BMElem *)efa);
+ }
+ }
else {
BMLoop *l;
MLoopUV *luv;
@@ -346,7 +351,7 @@ int uvedit_face_select(Scene *scene, BMEditMesh *em, BMFace *efa)
return 0;
}
-int uvedit_face_deselect(Scene *scene, BMEditMesh *em, BMFace *efa)
+int uvedit_face_select_disable(Scene *scene, BMEditMesh *em, BMFace *efa)
{
ToolSettings *ts = scene->toolsettings;
@@ -369,7 +374,7 @@ int uvedit_face_deselect(Scene *scene, BMEditMesh *em, BMFace *efa)
return 0;
}
-int uvedit_edge_selected(BMEditMesh *em, Scene *scene, BMLoop *l)
+int uvedit_edge_select_test(BMEditMesh *em, Scene *scene, BMLoop *l)
{
ToolSettings *ts = scene->toolsettings;
@@ -395,7 +400,7 @@ int uvedit_edge_selected(BMEditMesh *em, Scene *scene, BMLoop *l)
}
}
-void uvedit_edge_select(BMEditMesh *em, Scene *scene, BMLoop *l)
+void uvedit_edge_select_enable(BMEditMesh *em, Scene *scene, BMLoop *l, const short do_history)
{
ToolSettings *ts = scene->toolsettings;
@@ -409,6 +414,10 @@ void uvedit_edge_select(BMEditMesh *em, Scene *scene, BMLoop *l)
BM_vert_select_set(em->bm, l->e->v1, TRUE);
BM_vert_select_set(em->bm, l->e->v2, TRUE);
}
+
+ if (do_history) {
+ BM_select_history_store(em->bm, (BMElem *)l->e);
+ }
}
else {
MLoopUV *luv1, *luv2;
@@ -421,7 +430,7 @@ void uvedit_edge_select(BMEditMesh *em, Scene *scene, BMLoop *l)
}
}
-void uvedit_edge_deselect(BMEditMesh *em, Scene *scene, BMLoop *l)
+void uvedit_edge_select_disable(BMEditMesh *em, Scene *scene, BMLoop *l)
{
ToolSettings *ts = scene->toolsettings;
@@ -447,7 +456,7 @@ void uvedit_edge_deselect(BMEditMesh *em, Scene *scene, BMLoop *l)
}
}
-int uvedit_uv_selected(BMEditMesh *em, Scene *scene, BMLoop *l)
+int uvedit_uv_select_test(BMEditMesh *em, Scene *scene, BMLoop *l)
{
ToolSettings *ts = scene->toolsettings;
@@ -464,7 +473,7 @@ int uvedit_uv_selected(BMEditMesh *em, Scene *scene, BMLoop *l)
}
}
-void uvedit_uv_select(BMEditMesh *em, Scene *scene, BMLoop *l)
+void uvedit_uv_select_enable(BMEditMesh *em, Scene *scene, BMLoop *l, const short do_history)
{
ToolSettings *ts = scene->toolsettings;
@@ -473,6 +482,10 @@ void uvedit_uv_select(BMEditMesh *em, Scene *scene, BMLoop *l)
BM_face_select_set(em->bm, l->f, TRUE);
else
BM_vert_select_set(em->bm, l->v, TRUE);
+
+ if (do_history) {
+ BM_select_history_remove(em->bm, (BMElem *)l->v);
+ }
}
else {
MLoopUV *luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
@@ -481,7 +494,7 @@ void uvedit_uv_select(BMEditMesh *em, Scene *scene, BMLoop *l)
}
}
-void uvedit_uv_deselect(BMEditMesh *em, Scene *scene, BMLoop *l)
+void uvedit_uv_select_disable(BMEditMesh *em, Scene *scene, BMLoop *l)
{
ToolSettings *ts = scene->toolsettings;
@@ -510,44 +523,23 @@ void uvedit_live_unwrap_update(SpaceImage *sima, Scene *scene, Object *obedit)
}
/*********************** geometric utilities ***********************/
-void poly_uv_center(BMEditMesh *em, BMFace *f, float cent[2])
+void uv_poly_center(BMEditMesh *em, BMFace *f, float r_cent[2])
{
BMLoop *l;
MLoopUV *luv;
BMIter liter;
- zero_v2(cent);
+ zero_v2(r_cent);
BM_ITER_ELEM (l, &liter, f, BM_LOOPS_OF_FACE) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
- add_v2_v2(cent, luv->uv);
- }
-
- mul_v2_fl(cent, 1.0f / (float)f->len);
-}
-
-
-void uv_center(float uv[][2], float cent[2], int quad)
-{
- if (quad) {
- cent[0] = (uv[0][0] + uv[1][0] + uv[2][0] + uv[3][0]) / 4.0f;
- cent[1] = (uv[0][1] + uv[1][1] + uv[2][1] + uv[3][1]) / 4.0f;
- }
- else {
- cent[0] = (uv[0][0] + uv[1][0] + uv[2][0]) / 3.0f;
- cent[1] = (uv[0][1] + uv[1][1] + uv[2][1]) / 3.0f;
+ add_v2_v2(r_cent, luv->uv);
}
-}
-float uv_area(float uv[][2], int quad)
-{
- if (quad)
- return area_tri_v2(uv[0], uv[1], uv[2]) + area_tri_v2(uv[0], uv[2], uv[3]);
- else
- return area_tri_v2(uv[0], uv[1], uv[2]);
+ mul_v2_fl(r_cent, 1.0f / (float)f->len);
}
-float poly_uv_area(float uv[][2], int len)
+float uv_poly_area(float uv[][2], int len)
{
//BMESH_TODO: make this not suck
//maybe use scanfill? I dunno.
@@ -560,7 +552,7 @@ float poly_uv_area(float uv[][2], int len)
return 1.0;
}
-void poly_copy_aspect(float uv_orig[][2], float uv[][2], float aspx, float aspy, int len)
+void uv_poly_copy_aspect(float uv_orig[][2], float uv[][2], float aspx, float aspy, int len)
{
int i;
for (i = 0; i < len; i++) {
@@ -569,7 +561,7 @@ void poly_copy_aspect(float uv_orig[][2], float uv[][2], float aspx, float aspy,
}
}
-int ED_uvedit_minmax(Scene *scene, Image *ima, Object *obedit, float *min, float *max)
+int ED_uvedit_minmax(Scene *scene, Image *ima, Object *obedit, float r_min[2], float r_max[2])
{
BMEditMesh *em = BMEdit_FromObject(obedit);
BMFace *efa;
@@ -579,18 +571,18 @@ int ED_uvedit_minmax(Scene *scene, Image *ima, Object *obedit, float *min, float
MLoopUV *luv;
int sel;
- INIT_MINMAX2(min, max);
+ INIT_MINMAX2(r_min, r_max);
sel = 0;
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if (!uvedit_face_visible(scene, ima, efa, tf))
+ if (!uvedit_face_visible_test(scene, ima, efa, tf))
continue;
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
- if (uvedit_uv_selected(em, scene, l)) {
+ if (uvedit_uv_select_test(em, scene, l)) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
- DO_MINMAX2(luv->uv, min, max);
+ DO_MINMAX2(luv->uv, r_min, r_max);
sel = 1;
}
}
@@ -612,12 +604,12 @@ static int ED_uvedit_median(Scene *scene, Image *ima, Object *obedit, float co[2
zero_v2(co);
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if (!uvedit_face_visible(scene, ima, efa, tf))
+ if (!uvedit_face_visible_test(scene, ima, efa, tf))
continue;
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
- if (uvedit_uv_selected(em, scene, l)) {
+ if (uvedit_uv_select_test(em, scene, l)) {
add_v2_v2(co, luv->uv);
sel++;
}
@@ -651,7 +643,7 @@ static int uvedit_center(Scene *scene, Image *ima, Object *obedit, float cent[2]
/************************** find nearest ****************************/
-void uv_find_nearest_edge(Scene *scene, Image *ima, BMEditMesh *em, float co[2], NearestHit *hit)
+void uv_find_nearest_edge(Scene *scene, Image *ima, BMEditMesh *em, const float co[2], NearestHit *hit)
{
MTexPoly *tf;
BMFace *efa;
@@ -668,7 +660,7 @@ void uv_find_nearest_edge(Scene *scene, Image *ima, BMEditMesh *em, float co[2],
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if (!uvedit_face_visible(scene, ima, efa, tf))
+ if (!uvedit_face_visible_test(scene, ima, efa, tf))
continue;
i = 0;
@@ -698,13 +690,11 @@ void uv_find_nearest_edge(Scene *scene, Image *ima, BMEditMesh *em, float co[2],
}
}
-static void find_nearest_uv_face(Scene *scene, Image *ima, BMEditMesh *em, float co[2], NearestHit *hit)
+static void find_nearest_uv_face(Scene *scene, Image *ima, BMEditMesh *em, const float co[2], NearestHit *hit)
{
MTexPoly *tf;
BMFace *efa;
- BMLoop *l;
- BMIter iter, liter;
- MLoopUV *luv;
+ BMIter iter;
float mindist, dist, cent[2];
mindist = 1e10f;
@@ -717,18 +707,11 @@ static void find_nearest_uv_face(Scene *scene, Image *ima, BMEditMesh *em, float
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if (!uvedit_face_visible(scene, ima, efa, tf))
+ if (!uvedit_face_visible_test(scene, ima, efa, tf))
continue;
-
- cent[0] = cent[1] = 0.0f;
- BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
- luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
- add_v2_v2(cent, luv->uv);
- }
+ uv_poly_center(em, efa, cent);
- cent[0] /= efa->len;
- cent[1] /= efa->len;
dist = fabs(co[0] - cent[0]) + fabs(co[1] - cent[1]);
if (dist < mindist) {
@@ -740,12 +723,12 @@ static void find_nearest_uv_face(Scene *scene, Image *ima, BMEditMesh *em, float
}
static int nearest_uv_between(BMEditMesh *em, BMFace *efa, int UNUSED(nverts), int id,
- float co[2], float uv[2])
+ const float co[2], const float uv[2])
{
BMLoop *l;
MLoopUV *luv;
BMIter iter;
- float m[3], v1[3], v2[3], c1, c2, *uv1, /* *uv2, */ /* UNUSED */ *uv3;
+ float m[3], v1[3], v2[3], c1, c2, *uv1 = NULL, /* *uv2, */ /* UNUSED */ *uv3 = NULL;
int id1, id2, i;
id1 = (id + efa->len - 1) % efa->len;
@@ -786,7 +769,7 @@ static int nearest_uv_between(BMEditMesh *em, BMFace *efa, int UNUSED(nverts), i
}
void uv_find_nearest_vert(Scene *scene, Image *ima, BMEditMesh *em,
- float co[2], float penalty[2], NearestHit *hit)
+ float const co[2], const float penalty[2], NearestHit *hit)
{
BMFace *efa;
BMLoop *l;
@@ -808,17 +791,17 @@ void uv_find_nearest_vert(Scene *scene, Image *ima, BMEditMesh *em,
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if (!uvedit_face_visible(scene, ima, efa, tf))
+ if (!uvedit_face_visible_test(scene, ima, efa, tf))
continue;
i = 0;
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
- if (penalty && uvedit_uv_selected(em, scene, l))
- dist = fabs(co[0] - luv->uv[0]) + penalty[0] + fabs(co[1] - luv->uv[1]) + penalty[1];
+ if (penalty && uvedit_uv_select_test(em, scene, l))
+ dist = fabsf(co[0] - luv->uv[0]) + penalty[0] + fabsf(co[1] - luv->uv[1]) + penalty[1];
else
- dist = fabs(co[0] - luv->uv[0]) + fabs(co[1] - luv->uv[1]);
+ dist = fabsf(co[0] - luv->uv[0]) + fabsf(co[1] - luv->uv[1]);
if (dist <= mindist) {
if (dist == mindist)
@@ -844,7 +827,7 @@ void uv_find_nearest_vert(Scene *scene, Image *ima, BMEditMesh *em,
}
}
-int ED_uvedit_nearest_uv(Scene *scene, Object *obedit, Image *ima, float co[2], float uv[2])
+int ED_uvedit_nearest_uv(Scene *scene, Object *obedit, Image *ima, const float co[2], float r_uv[2])
{
BMEditMesh *em = BMEdit_FromObject(obedit);
BMFace *efa;
@@ -853,15 +836,14 @@ int ED_uvedit_nearest_uv(Scene *scene, Object *obedit, Image *ima, float co[2],
MTexPoly *tf;
MLoopUV *luv;
float mindist, dist;
- int found = 0;
+ int found = FALSE;
mindist = 1e10f;
- uv[0] = co[0];
- uv[1] = co[1];
+ copy_v2_v2(r_uv, co);
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if (!uvedit_face_visible(scene, ima, efa, tf))
+ if (!uvedit_face_visible_test(scene, ima, efa, tf))
continue;
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
@@ -871,9 +853,8 @@ int ED_uvedit_nearest_uv(Scene *scene, Object *obedit, Image *ima, float co[2],
if (dist <= mindist) {
mindist = dist;
- uv[0] = luv->uv[0];
- uv[1] = luv->uv[1];
- found = 1;
+ copy_v2_v2(r_uv, luv->uv);
+ found = TRUE;
}
}
}
@@ -881,9 +862,22 @@ int ED_uvedit_nearest_uv(Scene *scene, Object *obedit, Image *ima, float co[2],
return found;
}
+UvElement *ED_uv_element_get(UvElementMap *map, BMFace *efa, BMLoop *l)
+{
+ UvElement *element;
+
+ element = map->vert[BM_elem_index_get(l->v)];
+
+ for (; element; element = element->next)
+ if (element->face == efa)
+ return element;
+
+ return NULL;
+}
+
/*********************** loop select ***********************/
-static void uv_vertex_loop_flag(UvMapVert *first)
+static void select_edgeloop_uv_vertex_loop_flag(UvMapVert *first)
{
UvMapVert *iterv;
int count = 0;
@@ -899,7 +893,7 @@ static void uv_vertex_loop_flag(UvMapVert *first)
first->flag = 1;
}
-static UvMapVert *uv_vertex_map_get(UvVertMap *vmap, BMFace *efa, int a)
+static UvMapVert *select_edgeloop_uv_vertex_map_get(UvVertMap *vmap, BMFace *efa, int a)
{
UvMapVert *iterv, *first;
BMLoop *l;
@@ -917,20 +911,7 @@ static UvMapVert *uv_vertex_map_get(UvVertMap *vmap, BMFace *efa, int a)
return NULL;
}
-UvElement *ED_uv_element_get(UvElementMap *map, BMFace *efa, BMLoop *l)
-{
- UvElement *element;
-
- element = map->vert[BM_elem_index_get(l->v)];
-
- for (; element; element = element->next)
- if (element->face == efa)
- return element;
-
- return NULL;
-}
-
-static int uv_edge_tag_faces(BMEditMesh *em, UvMapVert *first1, UvMapVert *first2, int *totface)
+static int select_edgeloop_uv_edge_tag_faces(BMEditMesh *em, UvMapVert *first1, UvMapVert *first2, int *totface)
{
UvMapVert *iterv1, *iterv2;
BMFace *efa;
@@ -948,7 +929,7 @@ static int uv_edge_tag_faces(BMEditMesh *em, UvMapVert *first1, UvMapVert *first
if (iterv1->f == iterv2->f) {
/* if face already tagged, don't do this edge */
efa = EDBM_face_at_index(em, iterv1->f);
- if (BMO_elem_flag_test(em->bm, efa, EFA_F1_FLAG))
+ if (BM_elem_flag_test(efa, BM_ELEM_TAG))
return 0;
tot++;
@@ -973,7 +954,7 @@ static int uv_edge_tag_faces(BMEditMesh *em, UvMapVert *first1, UvMapVert *first
if (iterv1->f == iterv2->f) {
efa = EDBM_face_at_index(em, iterv1->f);
- BMO_elem_flag_enable(em->bm, efa, EFA_F1_FLAG);
+ BM_elem_flag_enable(efa, BM_ELEM_TAG);
break;
}
}
@@ -982,7 +963,8 @@ static int uv_edge_tag_faces(BMEditMesh *em, UvMapVert *first1, UvMapVert *first
return 1;
}
-static int select_edgeloop(Scene *scene, Image *ima, BMEditMesh *em, NearestHit *hit, float limit[2], int extend)
+static int select_edgeloop(Scene *scene, Image *ima, BMEditMesh *em, NearestHit *hit,
+ float limit[2], const short extend)
{
BMFace *efa;
BMIter iter, liter;
@@ -990,37 +972,29 @@ static int select_edgeloop(Scene *scene, Image *ima, BMEditMesh *em, NearestHit
MTexPoly *tf;
UvVertMap *vmap;
UvMapVert *iterv1, *iterv2;
- int a, count, looking, nverts, starttotf, select;
+ int a, looking, nverts, starttotf, select;
/* setup */
EDBM_index_arrays_init(em, 0, 0, 1);
vmap = EDBM_uv_vert_map_create(em, 0, 0, limit);
- BM_mesh_elem_index_ensure(em->bm, BM_VERT);
+ BM_mesh_elem_index_ensure(em->bm, BM_VERT | BM_FACE);
- count = 0;
- BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
- if (!extend) {
- uvedit_face_deselect(scene, em, efa);
- }
-
- BMO_elem_flag_disable(em->bm, efa, EFA_F1_FLAG);
-
- BM_elem_index_set(efa, count); /* set_inline */
-
- count++;
+ if (!extend) {
+ select_all_perform(scene, ima, em, SEL_DESELECT);
}
- em->bm->elem_index_dirty &= ~BM_FACE;
+
+ BM_mesh_elem_hflag_disable_all(em->bm, BM_FACE, BM_ELEM_TAG, FALSE);
/* set flags for first face and verts */
nverts = hit->efa->len;
- iterv1 = uv_vertex_map_get(vmap, hit->efa, hit->lindex);
- iterv2 = uv_vertex_map_get(vmap, hit->efa, (hit->lindex + 1) % nverts);
- uv_vertex_loop_flag(iterv1);
- uv_vertex_loop_flag(iterv2);
+ iterv1 = select_edgeloop_uv_vertex_map_get(vmap, hit->efa, hit->lindex);
+ iterv2 = select_edgeloop_uv_vertex_map_get(vmap, hit->efa, (hit->lindex + 1) % nverts);
+ select_edgeloop_uv_vertex_loop_flag(iterv1);
+ select_edgeloop_uv_vertex_loop_flag(iterv2);
starttotf = 0;
- uv_edge_tag_faces(em, iterv1, iterv2, &starttotf);
+ select_edgeloop_uv_edge_tag_faces(em, iterv1, iterv2, &starttotf);
/* sorry, first edge isn't even ok */
if (iterv1->flag == 0 && iterv2->flag == 0) looking = 0;
@@ -1035,24 +1009,24 @@ static int select_edgeloop(Scene *scene, Image *ima, BMEditMesh *em, NearestHit
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if (!BMO_elem_flag_test(em->bm, efa, EFA_F1_FLAG) && uvedit_face_visible(scene, ima, efa, tf)) {
+ if (!BM_elem_flag_test(efa, BM_ELEM_TAG) && uvedit_face_visible_test(scene, ima, efa, tf)) {
nverts = efa->len;
for (a = 0; a < nverts; a++) {
/* check face not hidden and not tagged */
- iterv1 = uv_vertex_map_get(vmap, efa, a);
- iterv2 = uv_vertex_map_get(vmap, efa, (a + 1) % nverts);
+ iterv1 = select_edgeloop_uv_vertex_map_get(vmap, efa, a);
+ iterv2 = select_edgeloop_uv_vertex_map_get(vmap, efa, (a + 1) % nverts);
if (!iterv1 || !iterv2)
continue;
/* check if vertex is tagged and has right valence */
if (iterv1->flag || iterv2->flag) {
- if (uv_edge_tag_faces(em, iterv1, iterv2, &starttotf)) {
+ if (select_edgeloop_uv_edge_tag_faces(em, iterv1, iterv2, &starttotf)) {
looking = 1;
- BMO_elem_flag_enable(em->bm, efa, EFA_F1_FLAG);
+ BM_elem_flag_enable(efa, BM_ELEM_TAG);
- uv_vertex_loop_flag(iterv1);
- uv_vertex_loop_flag(iterv2);
+ select_edgeloop_uv_vertex_loop_flag(iterv1);
+ select_edgeloop_uv_vertex_loop_flag(iterv2);
break;
}
}
@@ -1063,13 +1037,13 @@ static int select_edgeloop(Scene *scene, Image *ima, BMEditMesh *em, NearestHit
/* do the actual select/deselect */
nverts = hit->efa->len;
- iterv1 = uv_vertex_map_get(vmap, hit->efa, hit->lindex);
- iterv2 = uv_vertex_map_get(vmap, hit->efa, (hit->lindex + 1) % nverts);
+ iterv1 = select_edgeloop_uv_vertex_map_get(vmap, hit->efa, hit->lindex);
+ iterv2 = select_edgeloop_uv_vertex_map_get(vmap, hit->efa, (hit->lindex + 1) % nverts);
iterv1->flag = 1;
iterv2->flag = 1;
if (extend) {
- if (uvedit_uv_selected(em, scene, hit->l))
+ if (uvedit_uv_select_test(em, scene, hit->l))
select = 0;
else
select = 1;
@@ -1080,11 +1054,11 @@ static int select_edgeloop(Scene *scene, Image *ima, BMEditMesh *em, NearestHit
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
a = 0;
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
- iterv1 = uv_vertex_map_get(vmap, efa, a);
+ iterv1 = select_edgeloop_uv_vertex_map_get(vmap, efa, a);
if (iterv1->flag) {
- if (select) uvedit_uv_select(em, scene, l);
- else uvedit_uv_deselect(em, scene, l);
+ if (select) uvedit_uv_select_enable(em, scene, l, FALSE);
+ else uvedit_uv_select_disable(em, scene, l);
}
a++;
@@ -1100,7 +1074,7 @@ static int select_edgeloop(Scene *scene, Image *ima, BMEditMesh *em, NearestHit
/*********************** linked select ***********************/
-static void select_linked(Scene *scene, Image *ima, BMEditMesh *em, float limit[2], NearestHit *hit, int extend)
+static void select_linked(Scene *scene, Image *ima, BMEditMesh *em, const float limit[2], NearestHit *hit, int extend)
{
BMFace *efa;
BMLoop *l;
@@ -1126,7 +1100,7 @@ static void select_linked(Scene *scene, Image *ima, BMEditMesh *em, float limit[
BM_ITER_MESH_INDEX (efa, &iter, em->bm, BM_FACES_OF_MESH, a) {
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if (uvedit_face_visible(scene, ima, efa, tf)) {
+ if (uvedit_face_visible_test(scene, ima, efa, tf)) {
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
@@ -1285,10 +1259,10 @@ static float *uv_sel_co_from_eve(Scene *scene, Image *ima, BMEditMesh *em, BMVer
BM_ITER_ELEM (l, &liter, eve, BM_LOOPS_OF_VERT) {
MTexPoly *tf = CustomData_bmesh_get(&em->bm->pdata, l->f->head.data, CD_MTEXPOLY);
- if (!uvedit_face_visible(scene, ima, l->f, tf))
+ if (!uvedit_face_visible_test(scene, ima, l->f, tf))
continue;
- if (uvedit_uv_selected(em, scene, l)) {
+ if (uvedit_uv_select_test(em, scene, l)) {
MLoopUV *luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
return luv->uv;
}
@@ -1326,11 +1300,11 @@ static void weld_align_uv(bContext *C, int tool)
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if (!uvedit_face_visible(scene, ima, efa, tf))
+ if (!uvedit_face_visible_test(scene, ima, efa, tf))
continue;
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
- if (uvedit_uv_selected(em, scene, l)) {
+ if (uvedit_uv_select_test(em, scene, l)) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
DO_MINMAX2(luv->uv, min, max);
}
@@ -1348,11 +1322,11 @@ static void weld_align_uv(bContext *C, int tool)
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if (!uvedit_face_visible(scene, ima, efa, tf))
+ if (!uvedit_face_visible_test(scene, ima, efa, tf))
continue;
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
- if (uvedit_uv_selected(em, scene, l)) {
+ if (uvedit_uv_select_test(em, scene, l)) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
luv->uv[0] = cent[0];
}
@@ -1367,11 +1341,11 @@ static void weld_align_uv(bContext *C, int tool)
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if (!uvedit_face_visible(scene, ima, efa, tf))
+ if (!uvedit_face_visible_test(scene, ima, efa, tf))
continue;
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
- if (uvedit_uv_selected(em, scene, l)) {
+ if (uvedit_uv_select_test(em, scene, l)) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
luv->uv[1] = cent[1];
}
@@ -1397,10 +1371,10 @@ static void weld_align_uv(bContext *C, int tool)
BM_ITER_ELEM (l, &liter, eve, BM_LOOPS_OF_VERT) {
tf = CustomData_bmesh_get(&em->bm->pdata, l->f->head.data, CD_MTEXPOLY);
- if (!uvedit_face_visible(scene, ima, l->f, tf))
+ if (!uvedit_face_visible_test(scene, ima, l->f, tf))
continue;
- if (uvedit_uv_selected(em, scene, l)) {
+ if (uvedit_uv_select_test(em, scene, l)) {
BM_elem_flag_enable(eve, BM_ELEM_TAG);
break;
}
@@ -1487,10 +1461,10 @@ static void weld_align_uv(bContext *C, int tool)
BM_ITER_ELEM (l, &liter, eve_line[i], BM_LOOPS_OF_VERT) {
tf = CustomData_bmesh_get(&em->bm->pdata, l->f->head.data, CD_MTEXPOLY);
- if (!uvedit_face_visible(scene, ima, l->f, tf))
+ if (!uvedit_face_visible_test(scene, ima, l->f, tf))
continue;
- if (uvedit_uv_selected(em, scene, l)) {
+ if (uvedit_uv_select_test(em, scene, l)) {
MLoopUV *luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
/* Projection of point (x, y) over line (x1, y1, x2, y2) along X axis:
* new_y = (y2 - y1) / (x2 - x1) * (x - x1) + y1
@@ -1582,30 +1556,20 @@ static void UV_OT_weld(wmOperatorType *ot)
/* ******************** (de)select all operator **************** */
-static void select_all_perform(bContext *C, int action)
+static void select_all_perform(Scene *scene, Image *ima, BMEditMesh *em, int action)
{
- Scene *scene;
- ToolSettings *ts;
- Object *obedit;
- BMEditMesh *em;
+ ToolSettings *ts = scene->toolsettings;
BMFace *efa;
BMLoop *l;
BMIter iter, liter;
- Image *ima;
MTexPoly *tf;
MLoopUV *luv;
-
- scene = CTX_data_scene(C);
- ts = CTX_data_tool_settings(C);
- obedit = CTX_data_edit_object(C);
- em = BMEdit_FromObject(obedit);
- ima = CTX_data_edit_image(C);
-
+
if (ts->uv_flag & UV_SYNC_SELECTION) {
switch (action) {
case SEL_TOGGLE:
- EDBM_select_toggle_all(BMEdit_FromObject(obedit));
+ EDBM_select_toggle_all(em);
break;
case SEL_SELECT:
EDBM_flag_enable_all(em, BM_ELEM_SELECT);
@@ -1625,7 +1589,7 @@ static void select_all_perform(bContext *C, int action)
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if (!uvedit_face_visible(scene, ima, efa, tf))
+ if (!uvedit_face_visible_test(scene, ima, efa, tf))
continue;
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
@@ -1643,7 +1607,7 @@ static void select_all_perform(bContext *C, int action)
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if (!uvedit_face_visible(scene, ima, efa, tf))
+ if (!uvedit_face_visible_test(scene, ima, efa, tf))
continue;
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
@@ -1667,10 +1631,14 @@ static void select_all_perform(bContext *C, int action)
static int select_all_exec(bContext *C, wmOperator *op)
{
+ Scene *scene = CTX_data_scene(C);
Object *obedit = CTX_data_edit_object(C);
+ Image *ima = CTX_data_edit_image(C);
+ BMEditMesh *em = BMEdit_FromObject(obedit);
+
int action = RNA_enum_get(op->ptr, "action");
- select_all_perform(C, action);
+ select_all_perform(scene, ima, em, action);
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
@@ -1717,11 +1685,11 @@ static int sticky_select(float *limit, int hitv[4], int v, float *hituv[4], floa
return 0;
}
-static int mouse_select(bContext *C, float co[2], int extend, int loop)
+static int mouse_select(bContext *C, const float co[2], int extend, int loop)
{
SpaceImage *sima = CTX_wm_space_image(C);
Scene *scene = CTX_data_scene(C);
- ToolSettings *ts = CTX_data_tool_settings(C);
+ ToolSettings *ts = scene->toolsettings;
Object *obedit = CTX_data_edit_object(C);
Image *ima = CTX_data_edit_image(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -1731,7 +1699,7 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop)
MTexPoly *tf;
MLoopUV *luv;
NearestHit hit;
- int i, select = 1, selectmode, sticky, sync, *hitv = NULL, nvert;
+ int i, select = 1, selectmode, sticky, sync, *hitv = NULL;
BLI_array_declare(hitv);
int flush = 0, hitlen = 0; /* 0 == don't flush, 1 == sel, -1 == desel; only use when selection sync is enabled */
float limit[2], **hituv = NULL;
@@ -1788,8 +1756,8 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop)
}
/* mark 1 vertex as being hit */
- BLI_array_growitems(hitv, hit.efa->len);
- BLI_array_growitems(hituv, hit.efa->len);
+ BLI_array_grow_items(hitv, hit.efa->len);
+ BLI_array_grow_items(hituv, hit.efa->len);
for (i = 0; i < hit.efa->len; i++) {
hitv[i] = 0xFFFFFFFF;
}
@@ -1809,18 +1777,14 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop)
}
/* mark 2 edge vertices as being hit */
- BLI_array_growitems(hitv, hit.efa->len);
- BLI_array_growitems(hituv, hit.efa->len);
- for (i = 0; i < hit.efa->len; i++) {
- hitv[i] = 0xFFFFFFFF;
- }
-
- nvert = hit.efa->len;
+ BLI_array_grow_items(hitv, hit.efa->len);
+ BLI_array_grow_items(hituv, hit.efa->len);
+ fill_vn_i(hitv, hit.efa->len, 0xFFFFFFFF);
hitv[hit.lindex] = hit.vert1;
- hitv[(hit.lindex + 1) % nvert] = hit.vert2;
+ hitv[(hit.lindex + 1) % hit.efa->len] = hit.vert2;
hituv[hit.lindex] = hit.luv->uv;
- hituv[(hit.lindex + 1) % nvert] = hit.nextluv->uv;
+ hituv[(hit.lindex + 1) % hit.efa->len] = hit.nextluv->uv;
hitlen = hit.efa->len;
}
@@ -1838,8 +1802,8 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop)
/* mark all face vertices as being hit */
- BLI_array_growitems(hitv, hit.efa->len);
- BLI_array_growitems(hituv, hit.efa->len);
+ BLI_array_grow_items(hitv, hit.efa->len);
+ BLI_array_grow_items(hituv, hit.efa->len);
i = 0;
BM_ITER_ELEM (l, &liter, hit.efa, BM_LOOPS_OF_FACE) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
@@ -1878,41 +1842,48 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop)
else if (extend) {
if (selectmode == UV_SELECT_VERTEX) {
/* (de)select uv vertex */
- if (uvedit_uv_selected(em, scene, hit.l)) {
- uvedit_uv_deselect(em, scene, hit.l);
+ if (uvedit_uv_select_test(em, scene, hit.l)) {
+ uvedit_uv_select_disable(em, scene, hit.l);
select = 0;
}
else {
- uvedit_uv_select(em, scene, hit.l);
+ uvedit_uv_select_enable(em, scene, hit.l, TRUE);
select = 1;
}
flush = 1;
}
else if (selectmode == UV_SELECT_EDGE) {
/* (de)select edge */
- if (uvedit_edge_selected(em, scene, hit.l)) {
- uvedit_edge_deselect(em, scene, hit.l);
+ if (uvedit_edge_select_test(em, scene, hit.l)) {
+ uvedit_edge_select_disable(em, scene, hit.l);
select = 0;
}
else {
- uvedit_edge_select(em, scene, hit.l);
+ uvedit_edge_select_enable(em, scene, hit.l, TRUE);
select = 1;
}
flush = 1;
}
else if (selectmode == UV_SELECT_FACE) {
/* (de)select face */
- if (uvedit_face_selected(scene, em, hit.efa)) {
- uvedit_face_deselect(scene, em, hit.efa);
+ if (uvedit_face_select_test(scene, em, hit.efa)) {
+ uvedit_face_select_disable(scene, em, hit.efa);
select = 0;
}
else {
- uvedit_face_select(scene, em, hit.efa);
+ uvedit_face_select_enable(scene, em, hit.efa, TRUE);
select = 1;
}
flush = -1;
}
+ /* de-selecting an edge may deselect a face too - validate */
+ if (sync) {
+ if (select == FALSE) {
+ BM_select_history_validate(em->bm);
+ }
+ }
+
/* (de)select sticky uv nodes */
if (sticky != SI_STICKY_DISABLE) {
@@ -1922,13 +1893,13 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop)
if (select == 0) {
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if (!uvedit_face_visible(scene, ima, efa, tf))
+ if (!uvedit_face_visible_test(scene, ima, efa, tf))
continue;
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
if (sticky_select(limit, hitv, BM_elem_index_get(l->v), hituv, luv->uv, sticky, hitlen))
- uvedit_uv_deselect(em, scene, l);
+ uvedit_uv_select_disable(em, scene, l);
}
}
flush = -1;
@@ -1937,13 +1908,13 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop)
else {
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if (!uvedit_face_visible(scene, ima, efa, tf))
+ if (!uvedit_face_visible_test(scene, ima, efa, tf))
continue;
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
if (sticky_select(limit, hitv, BM_elem_index_get(l->v), hituv, luv->uv, sticky, hitlen))
- uvedit_uv_select(em, scene, l);
+ uvedit_uv_select_enable(em, scene, l, FALSE);
}
}
@@ -1953,30 +1924,28 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop)
}
else {
/* deselect all */
- BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
- uvedit_face_deselect(scene, em, efa);
- }
+ select_all_perform(scene, ima, em, SEL_DESELECT);
if (selectmode == UV_SELECT_VERTEX) {
/* select vertex */
- uvedit_uv_select(em, scene, hit.l);
+ uvedit_uv_select_enable(em, scene, hit.l, TRUE);
flush = 1;
}
else if (selectmode == UV_SELECT_EDGE) {
/* select edge */
- uvedit_edge_select(em, scene, hit.l);
+ uvedit_edge_select_enable(em, scene, hit.l, TRUE);
flush = 1;
}
else if (selectmode == UV_SELECT_FACE) {
/* select face */
- uvedit_face_select(scene, em, hit.efa);
+ uvedit_face_select_enable(scene, em, hit.efa, TRUE);
}
/* select sticky uvs */
if (sticky != SI_STICKY_DISABLE) {
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if (!uvedit_face_visible(scene, ima, efa, tf))
+ if (!uvedit_face_visible_test(scene, ima, efa, tf))
continue;
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
@@ -1984,7 +1953,7 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop)
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
if (sticky_select(limit, hitv, BM_elem_index_get(l->v), hituv, luv->uv, sticky, hitlen))
- uvedit_uv_select(em, scene, l);
+ uvedit_uv_select_enable(em, scene, l, FALSE);
flush = 1;
}
@@ -1992,19 +1961,32 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop)
}
}
-#if 0 /* BM_elem_select_set API handles all of this? */
-
if (sync) {
/* flush for mesh selection */
+
+ /* before bmesh */
+#if 0
if (ts->selectmode != SCE_SELECT_FACE) {
if (flush == 1) EDBM_select_flush(em);
else if (flush == -1) EDBM_deselect_flush(em);
}
- }
#else
- (void)flush; /* flush is otherwise UNUSED */
- (void)sync; /* sync is otherwise UNUSED */
+ if (flush != 0) {
+ if (loop) {
+ /* push vertex -> edge selection */
+ if (select) {
+ EDBM_select_flush(em);
+ }
+ else {
+ EDBM_deselect_flush(em);
+ }
+ }
+ else {
+ EDBM_selectmode_flush(em);
+ }
+ }
#endif
+ }
DAG_id_tag_update(obedit->data, 0);
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
@@ -2109,7 +2091,7 @@ static int select_linked_internal(bContext *C, wmOperator *op, wmEvent *event, i
{
SpaceImage *sima = CTX_wm_space_image(C);
Scene *scene = CTX_data_scene(C);
- ToolSettings *ts = CTX_data_tool_settings(C);
+ ToolSettings *ts = scene->toolsettings;
Object *obedit = CTX_data_edit_object(C);
Image *ima = CTX_data_edit_image(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -2211,7 +2193,7 @@ static void UV_OT_select_linked_pick(wmOperatorType *ot)
static int unlink_selection_exec(bContext *C, wmOperator *op)
{
Scene *scene = CTX_data_scene(C);
- ToolSettings *ts = CTX_data_tool_settings(C);
+ ToolSettings *ts = scene->toolsettings;
Object *obedit = CTX_data_edit_object(C);
Image *ima = CTX_data_edit_image(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -2230,7 +2212,7 @@ static int unlink_selection_exec(bContext *C, wmOperator *op)
int desel = 0;
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if (!uvedit_face_visible(scene, ima, efa, tf))
+ if (!uvedit_face_visible_test(scene, ima, efa, tf))
continue;
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
@@ -2269,6 +2251,25 @@ static void UV_OT_unlink_selected(wmOperatorType *ot)
ot->poll = ED_operator_uvedit;
}
+static void uv_select_sync_flush(ToolSettings *ts, BMEditMesh *em, const short select)
+{
+ /* bmesh API handles flushing but not on de-select */
+ if (ts->uv_flag & UV_SYNC_SELECTION) {
+ if (ts->selectmode != SCE_SELECT_FACE) {
+ if (select == FALSE) {
+ EDBM_deselect_flush(em);
+ }
+ else {
+ EDBM_select_flush(em);
+ }
+ }
+
+ if (select == FALSE) {
+ BM_select_history_validate(em->bm);
+ }
+ }
+}
+
/* ******************** border select operator **************** */
/* This function sets the selection on tagged faces, need because settings the
@@ -2278,7 +2279,7 @@ static void UV_OT_unlink_selected(wmOperatorType *ot)
*
* De-selects faces that have been tagged on efa->tmp.l. */
-static void uv_faces_do_sticky(bContext *C, SpaceImage *sima, Scene *scene, Object *obedit, short select)
+static void uv_faces_do_sticky(SpaceImage *sima, Scene *scene, Object *obedit, short select)
{
/* Selecting UV Faces with some modes requires us to change
* the selection in other faces (depending on the sticky mode).
@@ -2286,7 +2287,7 @@ static void uv_faces_do_sticky(bContext *C, SpaceImage *sima, Scene *scene, Obje
* This only needs to be done when the Mesh is not used for
* selection (so for sticky modes, vertex or location based). */
- ToolSettings *ts = CTX_data_tool_settings(C);
+ ToolSettings *ts = scene->toolsettings;
BMEditMesh *em = BMEdit_FromObject(obedit);
BMFace *efa;
BMLoop *l;
@@ -2317,9 +2318,9 @@ static void uv_faces_do_sticky(bContext *C, SpaceImage *sima, Scene *scene, Obje
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
if (BM_elem_flag_test(l->v, BM_ELEM_TAG)) {
if (select)
- uvedit_uv_select(em, scene, l);
+ uvedit_uv_select_enable(em, scene, l, FALSE);
else
- uvedit_uv_deselect(em, scene, l);
+ uvedit_uv_select_disable(em, scene, l);
}
}
}
@@ -2351,9 +2352,9 @@ static void uv_faces_do_sticky(bContext *C, SpaceImage *sima, Scene *scene, Obje
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
if (select)
- uvedit_uv_select(em, scene, l);
+ uvedit_uv_select_enable(em, scene, l, FALSE);
else
- uvedit_uv_deselect(em, scene, l);
+ uvedit_uv_select_disable(em, scene, l);
vlist_iter = EDBM_uv_vert_map_at_index(vmap, BM_elem_index_get(l->v));
@@ -2378,9 +2379,9 @@ static void uv_faces_do_sticky(bContext *C, SpaceImage *sima, Scene *scene, Obje
/* tf_vlist = CustomData_bmesh_get(&em->bm->pdata, efa_vlist->head.data, CD_MTEXPOLY); */ /* UNUSED */
if (select)
- uvedit_uv_select(em, scene, BM_iter_at_index(em->bm, BM_LOOPS_OF_FACE, efa_vlist, vlist_iter->tfindex));
+ uvedit_uv_select_enable(em, scene, BM_iter_at_index(em->bm, BM_LOOPS_OF_FACE, efa_vlist, vlist_iter->tfindex), FALSE);
else
- uvedit_uv_deselect(em, scene, BM_iter_at_index(em->bm, BM_LOOPS_OF_FACE, efa_vlist, vlist_iter->tfindex));
+ uvedit_uv_select_disable(em, scene, BM_iter_at_index(em->bm, BM_LOOPS_OF_FACE, efa_vlist, vlist_iter->tfindex));
}
vlist_iter = vlist_iter->next;
}
@@ -2395,9 +2396,9 @@ static void uv_faces_do_sticky(bContext *C, SpaceImage *sima, Scene *scene, Obje
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
if (BM_elem_flag_test(efa, BM_ELEM_TAG)) {
if (select)
- uvedit_face_select(scene, em, efa);
+ uvedit_face_select_enable(scene, em, efa, FALSE);
else
- uvedit_face_deselect(scene, em, efa);
+ uvedit_face_select_disable(scene, em, efa);
}
}
}
@@ -2407,7 +2408,7 @@ static int border_select_exec(bContext *C, wmOperator *op)
{
SpaceImage *sima = CTX_wm_space_image(C);
Scene *scene = CTX_data_scene(C);
- ToolSettings *ts = CTX_data_tool_settings(C);
+ ToolSettings *ts = scene->toolsettings;
Object *obedit = CTX_data_edit_object(C);
Image *ima = CTX_data_edit_image(C);
ARegion *ar = CTX_wm_region(C);
@@ -2436,7 +2437,7 @@ static int border_select_exec(bContext *C, wmOperator *op)
extend = RNA_boolean_get(op->ptr, "extend");
if (!extend)
- select_all_perform(C, SEL_DESELECT);
+ select_all_perform(scene, ima, em, SEL_DESELECT);
if (ts->uv_flag & UV_SYNC_SELECTION)
faces = (ts->selectmode == SCE_SELECT_FACE);
@@ -2455,8 +2456,8 @@ static int border_select_exec(bContext *C, wmOperator *op)
BM_elem_flag_disable(efa, BM_ELEM_TAG);
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if (uvedit_face_visible(scene, ima, efa, tf)) {
- poly_uv_center(em, efa, cent);
+ if (uvedit_face_visible_test(scene, ima, efa, tf)) {
+ uv_poly_center(em, efa, cent);
if (BLI_in_rctf(&rectf, cent[0], cent[1])) {
BM_elem_flag_enable(efa, BM_ELEM_TAG);
change = 1;
@@ -2466,7 +2467,7 @@ static int border_select_exec(bContext *C, wmOperator *op)
/* (de)selects all tagged faces and deals with sticky modes */
if (change)
- uv_faces_do_sticky(C, sima, scene, obedit, select);
+ uv_faces_do_sticky(sima, scene, obedit, select);
}
else {
/* other selection modes */
@@ -2474,7 +2475,7 @@ static int border_select_exec(bContext *C, wmOperator *op)
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if (!uvedit_face_visible(scene, ima, efa, tf))
+ if (!uvedit_face_visible_test(scene, ima, efa, tf))
continue;
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
@@ -2483,15 +2484,15 @@ static int border_select_exec(bContext *C, wmOperator *op)
/* UV_SYNC_SELECTION - can't do pinned selection */
if (BLI_in_rctf(&rectf, luv->uv[0], luv->uv[1])) {
- if (select) uvedit_uv_select(em, scene, l);
- else uvedit_uv_deselect(em, scene, l);
+ if (select) uvedit_uv_select_enable(em, scene, l, FALSE);
+ else uvedit_uv_select_disable(em, scene, l);
}
}
else if (pinned) {
if ((luv->flag & MLOOPUV_PINNED) &&
BLI_in_rctf(&rectf, luv->uv[0], luv->uv[1])) {
- if (select) uvedit_uv_select(em, scene, l);
- else uvedit_uv_deselect(em, scene, l);
+ if (select) uvedit_uv_select_enable(em, scene, l, FALSE);
+ else uvedit_uv_select_disable(em, scene, l);
}
}
}
@@ -2499,17 +2500,11 @@ static int border_select_exec(bContext *C, wmOperator *op)
}
if (change) {
- /* make sure newly selected vert selection is updated*/
-#if 0 /* BM_elem_select_set API handles all of this? */
+ uv_select_sync_flush(ts, em, select);
+
if (ts->uv_flag & UV_SYNC_SELECTION) {
- if (ts->selectmode != SCE_SELECT_FACE) {
- if (select) EDBM_select_flush(em);
- else EDBM_deselect_flush(em);
- }
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
}
-#endif
-
- WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -2542,13 +2537,12 @@ static void UV_OT_select_border(wmOperatorType *ot)
/* ******************** circle select operator **************** */
-static void select_uv_inside_ellipse(BMEditMesh *em, SpaceImage *UNUSED(sima), Scene *scene, int select,
- float *offset, float *ell, BMLoop *l, MLoopUV *luv)
+static int select_uv_inside_ellipse(BMEditMesh *em, SpaceImage *UNUSED(sima), Scene *scene, int select,
+ float *offset, float *ell, BMLoop *l, MLoopUV *luv)
{
/* normalized ellipse: ell[0] = scaleX, ell[1] = scaleY */
float x, y, r2, *uv;
-
-
+
uv = luv->uv;
x = (uv[0] - offset[0]) * ell[0];
@@ -2556,8 +2550,12 @@ static void select_uv_inside_ellipse(BMEditMesh *em, SpaceImage *UNUSED(sima), S
r2 = x * x + y * y;
if (r2 < 1.0f) {
- if (select) uvedit_uv_select(em, scene, l);
- else uvedit_uv_deselect(em, scene, l);
+ if (select) uvedit_uv_select_enable(em, scene, l, FALSE);
+ else uvedit_uv_select_disable(em, scene, l);
+ return TRUE;
+ }
+ else {
+ return FALSE;
}
}
@@ -2565,6 +2563,7 @@ static int circle_select_exec(bContext *C, wmOperator *op)
{
SpaceImage *sima = CTX_wm_space_image(C);
Scene *scene = CTX_data_scene(C);
+ ToolSettings *ts = scene->toolsettings;
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
ARegion *ar = CTX_wm_region(C);
@@ -2575,6 +2574,7 @@ static int circle_select_exec(bContext *C, wmOperator *op)
int x, y, radius, width, height, select;
float zoomx, zoomy, offset[2], ellipse[2];
int gesture_mode = RNA_int_get(op->ptr, "gesture_mode");
+ int change = FALSE;
/* get operator properties */
select = (gesture_mode == GESTURE_MODAL_SELECT);
@@ -2596,15 +2596,15 @@ static int circle_select_exec(bContext *C, wmOperator *op)
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
- select_uv_inside_ellipse(em, sima, scene, select, offset, ellipse, l, luv);
+ change |= select_uv_inside_ellipse(em, sima, scene, select, offset, ellipse, l, luv);
}
}
-#if 0 //I think the BM_elem_select_set api stuff handles all this as necessary?
- if (select) EM_select_flush(em);
- else EM_deselect_flush(em);
-#endif
- WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
+ if (change) {
+ uv_select_sync_flush(ts, em, select);
+
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
+ }
return OPERATOR_FINISHED;
}
@@ -2633,9 +2633,130 @@ static void UV_OT_circle_select(wmOperatorType *ot)
RNA_def_int(ot->srna, "gesture_mode", 0, INT_MIN, INT_MAX, "Gesture Mode", "", INT_MIN, INT_MAX);
}
+
+/* ******************** lasso select operator **************** */
+
+static void do_lasso_select_mesh_uv(bContext *C, int mcords[][2], short moves, short select)
+{
+ Image *ima = CTX_data_edit_image(C);
+ ARegion *ar = CTX_wm_region(C);
+ Object *obedit = CTX_data_edit_object(C);
+ Scene *scene = CTX_data_scene(C);
+ ToolSettings *ts = scene->toolsettings;
+ BMEditMesh *em = BMEdit_FromObject(obedit);
+
+ BMIter iter, liter;
+
+ BMFace *efa;
+ BMLoop *l;
+ MTexPoly *tf;
+ int screen_uv[2], change = TRUE;
+ rcti rect;
+
+ BLI_lasso_boundbox(&rect, mcords, moves);
+
+ if (ts->uv_selectmode == UV_SELECT_FACE) { /* Face Center Sel */
+ change = FALSE;
+ BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
+ /* assume not touched */
+ if ((select) != (uvedit_face_select_test(scene, em, efa))) {
+ float cent[2];
+ uv_poly_center(em, efa, cent);
+ UI_view2d_view_to_region(&ar->v2d, cent[0], cent[1], &screen_uv[0], &screen_uv[1]);
+ if (BLI_in_rcti(&rect, screen_uv[0], screen_uv[1]) &&
+ BLI_lasso_is_point_inside(mcords, moves, screen_uv[0], screen_uv[1], V2D_IS_CLIPPED))
+ {
+ uvedit_face_select_enable(scene, em, efa, FALSE);
+ change = TRUE;
+ }
+ }
+ }
+ }
+ else { /* Vert Sel */
+ BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
+ tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
+ if (uvedit_face_visible_test(scene, ima, efa, tf)) {
+ BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
+ if ((select) != (uvedit_uv_select_test(em, scene, l))) {
+ MLoopUV *luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
+ UI_view2d_view_to_region(&ar->v2d, luv->uv[0], luv->uv[1], &screen_uv[0], &screen_uv[1]);
+ if (BLI_in_rcti(&rect, screen_uv[0], screen_uv[1]) &&
+ BLI_lasso_is_point_inside(mcords, moves, screen_uv[0], screen_uv[1], V2D_IS_CLIPPED))
+ {
+ if (select) {
+ uvedit_uv_select_enable(em, scene, l, FALSE);
+ }
+ else {
+ uvedit_uv_select_disable(em, scene, l);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ if (change) {
+ uv_select_sync_flush(scene->toolsettings, em, select);
+
+ if (ts->uv_flag & UV_SYNC_SELECTION) {
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
+ }
+ }
+}
+
+static int uv_lasso_select_exec(bContext *C, wmOperator *op)
+{
+ int i = 0;
+ int mcords[1024][2];
+
+ RNA_BEGIN (op->ptr, itemptr, "path")
+ {
+ float loc[2];
+
+ RNA_float_get_array(&itemptr, "loc", loc);
+ mcords[i][0] = (int)loc[0];
+ mcords[i][1] = (int)loc[1];
+ i++;
+ if (i >= 1024) break;
+ }
+ RNA_END;
+
+ if (i > 1) {
+ short select;
+
+ select = !RNA_boolean_get(op->ptr, "deselect");
+ do_lasso_select_mesh_uv(C, mcords, i, select);
+
+ return OPERATOR_FINISHED;
+ }
+ return OPERATOR_PASS_THROUGH;
+}
+
+void UV_OT_select_lasso(wmOperatorType *ot)
+{
+ ot->name = "Lasso Select UV";
+ ot->description = "Select UVs using lasso selection";
+ ot->idname = "UV_OT_select_lasso";
+
+ ot->invoke = WM_gesture_lasso_invoke;
+ ot->modal = WM_gesture_lasso_modal;
+ ot->exec = uv_lasso_select_exec;
+ ot->poll = ED_operator_image_active;
+ ot->cancel = WM_gesture_lasso_cancel;
+
+ /* flags */
+ ot->flag = OPTYPE_UNDO;
+
+ RNA_def_collection_runtime(ot->srna, "path", &RNA_OperatorMousePath, "Path", "");
+ RNA_def_boolean(ot->srna, "deselect", 0, "Deselect", "Deselect rather than select items");
+ RNA_def_boolean(ot->srna, "extend", 1, "Extend", "Extend selection instead of deselecting everything first");
+}
+
+
+
/* ******************** snap cursor operator **************** */
-static void snap_uv_to_pixel(float *uvco, float w, float h)
+static void snap_uv_to_pixel(float uvco[2], float w, float h)
{
uvco[0] = ((float)((int)((uvco[0] * w) + 0.5f))) / w;
uvco[1] = ((float)((int)((uvco[1] * h) + 0.5f))) / h;
@@ -2715,11 +2836,11 @@ static int snap_uvs_to_cursor(Scene *scene, Image *ima, Object *obedit, SpaceIma
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
tface = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if (!uvedit_face_visible(scene, ima, efa, tface))
+ if (!uvedit_face_visible_test(scene, ima, efa, tface))
continue;
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
- if (uvedit_uv_selected(em, scene, l)) {
+ if (uvedit_uv_select_test(em, scene, l)) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
copy_v2_v2(luv->uv, sima->cursor);
change = 1;
@@ -2745,10 +2866,10 @@ static int snap_uvs_to_adjacent_unselected(Scene *scene, Image *ima, Object *obe
* get unique indices and to count how much to malloc */
BM_ITER_MESH (f, &iter, bm, BM_FACES_OF_MESH) {
tface = CustomData_bmesh_get(&bm->pdata, f->head.data, CD_MTEXPOLY);
- if (uvedit_face_visible(scene, ima, f, tface)) {
+ if (uvedit_face_visible_test(scene, ima, f, tface)) {
BM_elem_flag_enable(f, BM_ELEM_TAG);
BM_ITER_ELEM (l, &liter, f, BM_LOOPS_OF_FACE) {
- BM_elem_flag_set(l, BM_ELEM_TAG, uvedit_uv_selected(em, scene, l));
+ BM_elem_flag_set(l, BM_ELEM_TAG, uvedit_uv_select_test(em, scene, l));
}
}
else {
@@ -2806,11 +2927,11 @@ static int snap_uvs_to_pixels(SpaceImage *sima, Scene *scene, Object *obedit)
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
tface = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if (!uvedit_face_visible(scene, ima, efa, tface))
+ if (!uvedit_face_visible_test(scene, ima, efa, tface))
continue;
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
- if (uvedit_uv_selected(em, scene, l)) {
+ if (uvedit_uv_select_test(em, scene, l)) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
snap_uv_to_pixel(luv->uv, w, h);
}
@@ -2891,18 +3012,18 @@ static int pin_exec(bContext *C, wmOperator *op)
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
tface = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if (!uvedit_face_visible(scene, ima, efa, tface))
+ if (!uvedit_face_visible_test(scene, ima, efa, tface))
continue;
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
if (!clear) {
- if (uvedit_uv_selected(em, scene, l))
+ if (uvedit_uv_select_test(em, scene, l))
luv->flag |= MLOOPUV_PINNED;
}
else {
- if (uvedit_uv_selected(em, scene, l))
+ if (uvedit_uv_select_test(em, scene, l))
luv->flag &= ~MLOOPUV_PINNED;
}
}
@@ -2945,14 +3066,14 @@ static int select_pinned_exec(bContext *C, wmOperator *UNUSED(op))
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
tface = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if (!uvedit_face_visible(scene, ima, efa, tface))
+ if (!uvedit_face_visible_test(scene, ima, efa, tface))
continue;
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
if (luv->flag & MLOOPUV_PINNED)
- uvedit_uv_select(em, scene, l);
+ uvedit_uv_select_enable(em, scene, l, FALSE);
}
}
@@ -3000,9 +3121,9 @@ static int bm_face_is_all_uv_sel(BMesh *bm, BMFace *f, int bool_test)
static int hide_exec(bContext *C, wmOperator *op)
{
SpaceImage *sima = CTX_wm_space_image(C);
- ToolSettings *ts = CTX_data_tool_settings(C);
Object *obedit = CTX_data_edit_object(C);
Scene *scene = CTX_data_scene(C);
+ ToolSettings *ts = scene->toolsettings;
BMEditMesh *em = BMEdit_FromObject(obedit);
BMFace *efa;
BMLoop *l;
@@ -3025,7 +3146,7 @@ static int hide_exec(bContext *C, wmOperator *op)
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if (!uvedit_face_visible(scene, ima, efa, tf)) {
+ if (!uvedit_face_visible_test(scene, ima, efa, tf)) {
continue;
}
@@ -3047,7 +3168,7 @@ static int hide_exec(bContext *C, wmOperator *op)
if (bm_face_is_all_uv_sel(em->bm, efa, TRUE) == !swap) {
BM_face_select_set(em->bm, efa, FALSE);
}
- uvedit_face_deselect(scene, em, efa);
+ uvedit_face_select_disable(scene, em, efa);
}
else {
if (bm_face_is_all_uv_sel(em->bm, efa, TRUE) == !swap) {
@@ -3058,7 +3179,7 @@ static int hide_exec(bContext *C, wmOperator *op)
}
}
}
- if (!swap) uvedit_face_deselect(scene, em, efa);
+ if (!swap) uvedit_face_select_disable(scene, em, efa);
}
@@ -3067,7 +3188,7 @@ static int hide_exec(bContext *C, wmOperator *op)
/* check if a UV is de-selected */
if (bm_face_is_all_uv_sel(em->bm, efa, FALSE) != !swap) {
BM_face_select_set(em->bm, efa, FALSE);
- uvedit_face_deselect(scene, em, efa);
+ uvedit_face_select_disable(scene, em, efa);
}
}
else {
@@ -3086,7 +3207,7 @@ static int hide_exec(bContext *C, wmOperator *op)
if (em->selectmode != SCE_SELECT_FACE)
EDBM_selectmode_flush_ex(em, SCE_SELECT_VERTEX | SCE_SELECT_EDGE);
- EDBM_editselection_validate(em);
+ BM_select_history_validate(em->bm);
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
@@ -3115,9 +3236,9 @@ static void UV_OT_hide(wmOperatorType *ot)
static int reveal_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceImage *sima = CTX_wm_space_image(C);
- ToolSettings *ts = CTX_data_tool_settings(C);
Object *obedit = CTX_data_edit_object(C);
- /*Scene *scene = CTX_data_scene(C);*/ /*UNUSED*/
+ Scene *scene = CTX_data_scene(C);
+ ToolSettings *ts = scene->toolsettings;
BMEditMesh *em = BMEdit_FromObject(obedit);
BMFace *efa;
BMLoop *l;
@@ -3498,7 +3619,7 @@ static int mark_seam_exec(bContext *C, wmOperator *UNUSED(op))
BM_ITER_MESH (efa, &iter, bm, BM_FACES_OF_MESH) {
BM_ITER_ELEM (loop, &liter, efa, BM_LOOPS_OF_FACE) {
- if (uvedit_edge_selected(em, scene, loop)) {
+ if (uvedit_edge_select_test(em, scene, loop)) {
BM_elem_flag_enable(loop->e, BM_ELEM_SEAM);
}
}
@@ -3543,6 +3664,7 @@ void ED_operatortypes_uvedit(void)
WM_operatortype_append(UV_OT_unlink_selected);
WM_operatortype_append(UV_OT_select_pinned);
WM_operatortype_append(UV_OT_select_border);
+ WM_operatortype_append(UV_OT_select_lasso);
WM_operatortype_append(UV_OT_circle_select);
WM_operatortype_append(UV_OT_snap_cursor);
@@ -3603,6 +3725,11 @@ void ED_keymap_uvedit(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "UV_OT_circle_select", CKEY, KM_PRESS, 0, 0);
+ kmi = WM_keymap_add_item(keymap, "UV_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL, 0);
+ RNA_boolean_set(kmi->ptr, "deselect", FALSE);
+ kmi = WM_keymap_add_item(keymap, "UV_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL | KM_SHIFT, 0);
+ RNA_boolean_set(kmi->ptr, "deselect", TRUE);
+
/* selection manipulation */
RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_linked", LKEY, KM_PRESS, KM_CTRL, 0)->ptr, "extend", FALSE);
RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_linked_pick", LKEY, KM_PRESS, 0, 0)->ptr, "extend", FALSE);
diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c
index c1abfe69cc1..2b93246e797 100644
--- a/source/blender/editors/uvedit/uvedit_parametrizer.c
+++ b/source/blender/editors/uvedit/uvedit_parametrizer.c
@@ -1,3 +1,25 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor(s):
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
/** \file blender/editors/uvedit/uvedit_parametrizer.c
* \ingroup eduv
*/
@@ -4334,7 +4356,7 @@ void param_smooth_area(ParamHandle *handle)
void param_pack(ParamHandle *handle, float margin)
{
/* box packing variables */
- boxPack *boxarray, *box;
+ BoxPack *boxarray, *box;
float tot_width, tot_height, scale;
PChart *chart;
@@ -4351,7 +4373,7 @@ void param_pack(ParamHandle *handle, float margin)
param_scale(handle, 1.0f / phandle->aspx, 1.0f / phandle->aspy);
/* we may not use all these boxes */
- boxarray = MEM_mallocN(phandle->ncharts * sizeof(boxPack), "boxPack box");
+ boxarray = MEM_mallocN(phandle->ncharts * sizeof(BoxPack), "BoxPack box");
for (i = 0; i < phandle->ncharts; i++) {
@@ -4402,7 +4424,7 @@ void param_pack(ParamHandle *handle, float margin)
}
}
- boxPack2D(boxarray, phandle->ncharts - unpacked, &tot_width, &tot_height);
+ BLI_box_pack_2D(boxarray, phandle->ncharts - unpacked, &tot_width, &tot_height);
if (tot_height > tot_width)
scale = 1.0f / tot_height;
diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.h b/source/blender/editors/uvedit/uvedit_parametrizer.h
index 1643a89b089..3c886367191 100644
--- a/source/blender/editors/uvedit/uvedit_parametrizer.h
+++ b/source/blender/editors/uvedit/uvedit_parametrizer.h
@@ -1,10 +1,32 @@
-/** \file blender/editors/uvedit/uvedit_parametrizer.h
- * \ingroup eduv
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor(s):
+ *
+ * ***** END GPL LICENSE BLOCK *****
*/
#ifndef __UVEDIT_PARAMETRIZER_H__
#define __UVEDIT_PARAMETRIZER_H__
+/** \file blender/editors/uvedit/uvedit_parametrizer.h
+ * \ingroup eduv
+ */
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c
index 448072ebb72..b30821dc56a 100644
--- a/source/blender/editors/uvedit/uvedit_smart_stitch.c
+++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c
@@ -257,8 +257,8 @@ static void stitch_uv_rotate(float rotation, float medianPoint[2], float uv[2])
uv[0] -= medianPoint[0];
uv[1] -= medianPoint[1];
- uv_rotation_result[0] = cos(rotation) * uv[0] - sin(rotation) * uv[1];
- uv_rotation_result[1] = sin(rotation) * uv[0] + cos(rotation) * uv[1];
+ uv_rotation_result[0] = cosf(rotation) * uv[0] - sinf(rotation) * uv[1];
+ uv_rotation_result[1] = sinf(rotation) * uv[0] + cosf(rotation) * uv[1];
uv[0] = uv_rotation_result[0] + medianPoint[0];
uv[1] = uv_rotation_result[1] + medianPoint[1];
@@ -286,8 +286,8 @@ static int stitch_check_uvs_stitchable(UvElement *element, UvElement *element_it
l_iter = element_iter->l;
luv_iter = CustomData_bmesh_get(&state->em->bm->ldata, l_iter->head.data, CD_MLOOPUV);
- if (fabs(luv_orig->uv[0] - luv_iter->uv[0]) < limit &&
- fabs(luv_orig->uv[1] - luv_iter->uv[1]) < limit)
+ if (fabsf(luv_orig->uv[0] - luv_iter->uv[0]) < limit &&
+ fabsf(luv_orig->uv[1] - luv_iter->uv[1]) < limit)
{
return 1;
}
@@ -403,7 +403,7 @@ static void stitch_island_calculate_edge_rotation(UvEdge *edge, StitchState *sta
edgecos = uv1[0] * uv2[0] + uv1[1] * uv2[1];
edgesin = uv1[0] * uv2[1] - uv2[0] * uv1[1];
- rotation = (edgesin > 0) ? acos(MAX2(-1.0, MIN2(1.0, edgecos))) : -acos(MAX2(-1.0, MIN2(1.0, edgecos)));
+ rotation = (edgesin > 0.0f) ? acosf(MAX2(-1.0f, MIN2(1.0f, edgecos))) : -acosf(MAX2(-1.0f, MIN2(1.0f, edgecos)));
island_stitch_data[element1->island].num_rot_elements++;
island_stitch_data[element1->island].rotation += rotation;
@@ -412,7 +412,7 @@ static void stitch_island_calculate_edge_rotation(UvEdge *edge, StitchState *sta
static void stitch_island_calculate_vert_rotation(UvElement *element, StitchState *state, IslandStitchData *island_stitch_data)
{
- float edgecos = 1, edgesin = 0;
+ float edgecos = 1.0f, edgesin = 0.0f;
int index;
UvElement *element_iter;
float rotation = 0;
@@ -441,12 +441,12 @@ static void stitch_island_calculate_vert_rotation(UvElement *element, StitchStat
negate_v2_v2(normal, state->normals + index_tmp2 * 2);
edgecos = dot_v2v2(normal, state->normals + index_tmp1 * 2);
edgesin = cross_v2v2(normal, state->normals + index_tmp1 * 2);
- rotation += (edgesin > 0) ? acos(edgecos) : -acos(edgecos);
+ rotation += (edgesin > 0.0f) ? acosf(edgecos) : -acosf(edgecos);
}
}
if (state->midpoints)
- rotation /= 2.0;
+ rotation /= 2.0f;
island_stitch_data[element->island].num_rot_elements++;
island_stitch_data[element->island].rotation += rotation;
}
@@ -860,7 +860,7 @@ static int stitch_process_data(StitchState *state, Scene *scene, int final)
if (final) {
copy_v2_v2(luv->uv, final_position[i].uv);
- uvedit_uv_select(state->em, scene, l);
+ uvedit_uv_select_enable(state->em, scene, l, FALSE);
}
else {
int face_preview_pos = preview_position[BM_elem_index_get(element_iter->face)].data_position;
@@ -1162,7 +1162,8 @@ static int stitch_init(bContext *C, wmOperator *op)
EDBM_index_arrays_init(em, 0, 0, 1);
- RNA_BEGIN(op->ptr, itemptr, "selection") {
+ RNA_BEGIN (op->ptr, itemptr, "selection")
+ {
faceIndex = RNA_int_get(&itemptr, "face_index");
elementIndex = RNA_int_get(&itemptr, "element_index");
efa = EDBM_face_at_index(em, faceIndex);
@@ -1178,13 +1179,13 @@ static int stitch_init(bContext *C, wmOperator *op)
}
else {
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
- i = 0;
- BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
- if (uvedit_uv_selected(em, scene, l)) {
+ BM_ITER_ELEM_INDEX (l, &liter, efa, BM_LOOPS_OF_FACE, i) {
+ if (uvedit_uv_select_test(em, scene, l)) {
UvElement *element = ED_uv_element_get(state->element_map, efa, l);
- stitch_select_uv(element, state, 1);
+ if (element) {
+ stitch_select_uv(element, state, 1);
+ }
}
- i++;
}
}
}
@@ -1363,7 +1364,7 @@ static int stitch_modal(bContext *C, wmOperator *op, wmEvent *event)
case PADPLUSKEY:
case WHEELUPMOUSE:
if (event->alt) {
- stitch_state->limit_dist += 0.01;
+ stitch_state->limit_dist += 0.01f;
if (!stitch_process_data(stitch_state, scene, 0)) {
return stitch_cancel(C, op);
}
@@ -1376,8 +1377,8 @@ static int stitch_modal(bContext *C, wmOperator *op, wmEvent *event)
case PADMINUS:
case WHEELDOWNMOUSE:
if (event->alt) {
- stitch_state->limit_dist -= 0.01;
- stitch_state->limit_dist = MAX2(0.01, stitch_state->limit_dist);
+ stitch_state->limit_dist -= 0.01f;
+ stitch_state->limit_dist = MAX2(0.01f, stitch_state->limit_dist);
if (!stitch_process_data(stitch_state, scene, 0)) {
return stitch_cancel(C, op);
}
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
index 5a0fb69a26c..a856f5f34c3 100644
--- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c
+++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
@@ -139,7 +139,7 @@ static int ED_uvedit_ensure_uvs(bContext *C, Scene *scene, Object *obedit)
/* select new UV's */
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
- uvedit_face_select(scene, em, efa);
+ uvedit_face_select_enable(scene, em, efa, FALSE);
}
return 1;
@@ -169,7 +169,7 @@ static int uvedit_have_selection(Scene *scene, BMEditMesh *em, short implicit)
if (!luv)
return 1;
- if (uvedit_uv_selected(em, scene, l))
+ if (uvedit_uv_select_test(em, scene, l))
break;
}
@@ -231,7 +231,7 @@ static ParamHandle *construct_param_handle(Scene *scene, BMEditMesh *em,
lsel = 0;
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
- if (uvedit_uv_selected(em, scene, l)) {
+ if (uvedit_uv_select_test(em, scene, l)) {
lsel = 1;
break;
}
@@ -253,7 +253,7 @@ static ParamHandle *construct_param_handle(Scene *scene, BMEditMesh *em,
co[i] = l->v->co;
uv[i] = luv->uv;
pin[i] = (luv->flag & MLOOPUV_PINNED) != 0;
- select[i] = uvedit_uv_selected(em, scene, l) != 0;
+ select[i] = uvedit_uv_select_test(em, scene, l) != 0;
i++;
}
@@ -262,13 +262,13 @@ static ParamHandle *construct_param_handle(Scene *scene, BMEditMesh *em,
}
else {
/* ngon - scanfill time! */
- BLI_begin_edgefill(&sf_ctx);
+ BLI_scanfill_begin(&sf_ctx);
firstv = lastv = NULL;
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
int i;
- v = BLI_addfillvert(&sf_ctx, l->v->co);
+ v = BLI_scanfill_vert_add(&sf_ctx, l->v->co);
/* add small random offset */
for (i = 0; i < 3; i++) {
@@ -278,7 +278,7 @@ static ParamHandle *construct_param_handle(Scene *scene, BMEditMesh *em,
v->tmp.p = l;
if (lastv) {
- BLI_addfilledge(&sf_ctx, lastv, v);
+ BLI_scanfill_edge_add(&sf_ctx, lastv, v);
}
lastv = v;
@@ -286,9 +286,9 @@ static ParamHandle *construct_param_handle(Scene *scene, BMEditMesh *em,
firstv = v;
}
- BLI_addfilledge(&sf_ctx, firstv, v);
+ BLI_scanfill_edge_add(&sf_ctx, firstv, v);
- BLI_edgefill_ex(&sf_ctx, TRUE, efa->no);
+ BLI_scanfill_calc_ex(&sf_ctx, TRUE, efa->no);
for (sefa = sf_ctx.fillfacebase.first; sefa; sefa = sefa->next) {
ls[0] = sefa->v1->tmp.p;
ls[1] = sefa->v2->tmp.p;
@@ -300,13 +300,13 @@ static ParamHandle *construct_param_handle(Scene *scene, BMEditMesh *em,
co[i] = ls[i]->v->co;
uv[i] = luv->uv;
pin[i] = (luv->flag & MLOOPUV_PINNED) != 0;
- select[i] = uvedit_uv_selected(em, scene, ls[i]) != 0;
+ select[i] = uvedit_uv_select_test(em, scene, ls[i]) != 0;
}
param_face_add(handle, key, 3, vkeys, co, uv, pin, select);
}
- BLI_end_edgefill(&sf_ctx);
+ BLI_scanfill_end(&sf_ctx);
}
}
@@ -345,7 +345,7 @@ static void texface_from_original_index(BMFace *efa, int index, float **uv, Para
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
*uv = luv->uv;
*pin = (luv->flag & MLOOPUV_PINNED) ? 1 : 0;
- *select = (uvedit_uv_selected(em, scene, l) != 0);
+ *select = (uvedit_uv_select_test(em, scene, l) != 0);
}
}
}
@@ -744,6 +744,8 @@ void UV_OT_pack_islands(wmOperatorType *ot)
/* identifiers */
ot->name = "Pack Islands";
ot->idname = "UV_OT_pack_islands";
+ ot->description = "Transform all islands so that they fill up the UV space as much as possible";
+
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* api callbacks */
@@ -784,6 +786,8 @@ void UV_OT_average_islands_scale(wmOperatorType *ot)
/* identifiers */
ot->name = "Average Islands Scale";
ot->idname = "UV_OT_average_islands_scale";
+ ot->description = "Average the size of separate UV islands, based on their area in 3D space";
+
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* api callbacks */
@@ -837,10 +841,11 @@ void ED_uvedit_live_unwrap(Scene *scene, Object *obedit)
{
BMEditMesh *em = BMEdit_FromObject(obedit);
- if (scene->toolsettings->edge_mode_live_unwrap &&
- CustomData_has_layer(&em->bm->ldata, CD_MLOOPUV)) {
- ED_unwrap_lscm(scene, obedit, FALSE); /* unwrap all not just sel */
- }
+ if (scene->toolsettings->edge_mode_live_unwrap &&
+ CustomData_has_layer(&em->bm->ldata, CD_MLOOPUV))
+ {
+ ED_unwrap_lscm(scene, obedit, FALSE); /* unwrap all not just sel */
+ }
}
/*************** UV Map Common Transforms *****************/
@@ -1026,7 +1031,7 @@ static void correct_uv_aspect(BMEditMesh *em)
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
- luv->uv[0] = ((luv->uv[0] - 0.5) * scale) + 0.5;
+ luv->uv[0] = ((luv->uv[0] - 0.5f) * scale) + 0.5f;
}
}
}
@@ -1039,7 +1044,7 @@ static void correct_uv_aspect(BMEditMesh *em)
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
- luv->uv[1] = ((luv->uv[1] - 0.5) * scale) + 0.5;
+ luv->uv[1] = ((luv->uv[1] - 0.5f) * scale) + 0.5f;
}
}
}
@@ -1142,6 +1147,7 @@ void ED_unwrap_lscm(Scene *scene, Object *obedit, const short sel)
param_lscm_solve(handle);
param_lscm_end(handle);
+ param_average(handle);
param_pack(handle, scene->toolsettings->uvcalc_margin);
param_flush(handle);
@@ -1176,7 +1182,8 @@ static int unwrap_exec(bContext *C, wmOperator *op)
BKE_report(op->reports, RPT_INFO, "Object scale is not 1.0. Unwrap will operate on a non-scaled version of the mesh.");
/* remember last method for live unwrap */
- scene->toolsettings->unwrapper = method;
+ if(RNA_struct_property_is_set(op->ptr, "method"))
+ scene->toolsettings->unwrapper = method;
scene->toolsettings->uv_subsurf_level = subsurf_level;
@@ -1263,12 +1270,12 @@ static int uv_from_view_exec(bContext *C, wmOperator *op)
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
- project_from_view_ortho(luv->uv, l->v->co, rotmat);
+ BLI_uvproject_from_view_ortho(luv->uv, l->v->co, rotmat);
}
}
}
else if (camera) {
- struct UvCameraInfo *uci = project_camera_info(v3d->camera, obedit->obmat, scene->r.xsch, scene->r.ysch);
+ struct ProjCameraInfo *uci = BLI_uvproject_camera_info(v3d->camera, obedit->obmat, scene->r.xsch, scene->r.ysch);
if (uci) {
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
@@ -1277,7 +1284,7 @@ static int uv_from_view_exec(bContext *C, wmOperator *op)
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
- project_from_camera(luv->uv, l->v->co, uci);
+ BLI_uvproject_from_camera(luv->uv, l->v->co, uci);
}
}
@@ -1293,7 +1300,7 @@ static int uv_from_view_exec(bContext *C, wmOperator *op)
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
- project_from_view(luv->uv, l->v->co, rv3d->persmat, rotmat, ar->winx, ar->winy);
+ BLI_uvproject_from_view(luv->uv, l->v->co, rv3d->persmat, rotmat, ar->winx, ar->winy);
}
}
}
@@ -1321,6 +1328,8 @@ void UV_OT_from_view(wmOperatorType *ot)
/* identifiers */
ot->name = "Project From View";
ot->idname = "UV_OT_project_from_view";
+ ot->description = "Project the UV vertices of the mesh as seen in current 3D view";
+
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* api callbacks */
@@ -1360,6 +1369,8 @@ void UV_OT_reset(wmOperatorType *ot)
/* identifiers */
ot->name = "Reset";
ot->idname = "UV_OT_reset";
+ ot->description = "Reset UV projection";
+
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* api callbacks */
@@ -1461,6 +1472,8 @@ void UV_OT_sphere_project(wmOperatorType *ot)
/* identifiers */
ot->name = "Sphere Projection";
ot->idname = "UV_OT_sphere_project";
+ ot->description = "Project the UV vertices of the mesh over the curved surface of a sphere";
+
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* api callbacks */
@@ -1534,6 +1547,8 @@ void UV_OT_cylinder_project(wmOperatorType *ot)
/* identifiers */
ot->name = "Cylinder Projection";
ot->idname = "UV_OT_cylinder_project";
+ ot->description = "Project the UV vertices of the mesh over the curved wall of a cylinder";
+
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* api callbacks */
@@ -1612,6 +1627,8 @@ void UV_OT_cube_project(wmOperatorType *ot)
/* identifiers */
ot->name = "Cube Projection";
ot->idname = "UV_OT_cube_project";
+ ot->description = "Project the UV vertices of the mesh over the six faces of a cube";
+
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* api callbacks */
diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt
index 01afc0e24eb..59e384cbd4b 100644
--- a/source/blender/gpu/CMakeLists.txt
+++ b/source/blender/gpu/CMakeLists.txt
@@ -50,8 +50,13 @@ set(SRC
intern/gpu_draw.c
intern/gpu_extensions.c
intern/gpu_material.c
- intern/gpu_shader_material.glsl.c
- intern/gpu_shader_vertex.glsl.c
+
+ shaders/gpu_shader_material.glsl.c
+ shaders/gpu_shader_vertex.glsl.c
+ shaders/gpu_shader_sep_gaussian_blur_frag.glsl.c
+ shaders/gpu_shader_sep_gaussian_blur_vert.glsl.c
+ shaders/gpu_shader_vsm_store_frag.glsl.c
+ shaders/gpu_shader_vsm_store_vert.glsl.c
GPU_buffers.h
GPU_draw.h
diff --git a/source/blender/gpu/GPU_extensions.h b/source/blender/gpu/GPU_extensions.h
index 5f541e2e8e6..b04da04258e 100644
--- a/source/blender/gpu/GPU_extensions.h
+++ b/source/blender/gpu/GPU_extensions.h
@@ -109,6 +109,7 @@ GPUTexture *GPU_texture_create_1D(int w, float *pixels, char err_out[256]);
GPUTexture *GPU_texture_create_2D(int w, int h, float *pixels, char err_out[256]);
GPUTexture *GPU_texture_create_3D(int w, int h, int depth, float *fpixels);
GPUTexture *GPU_texture_create_depth(int w, int h, char err_out[256]);
+GPUTexture *GPU_texture_create_vsm_shadow_map(int size, char err_out[256]);
GPUTexture *GPU_texture_from_blender(struct Image *ima,
struct ImageUser *iuser, double time, int mipmap);
void GPU_texture_free(GPUTexture *tex);
@@ -140,6 +141,7 @@ void GPU_framebuffer_texture_unbind(GPUFrameBuffer *fb, GPUTexture *tex);
void GPU_framebuffer_free(GPUFrameBuffer *fb);
void GPU_framebuffer_restore(void);
+void GPU_framebuffer_blur(GPUFrameBuffer *fb, GPUTexture *tex, GPUFrameBuffer *blurfb, GPUTexture *blurtex);
/* GPU OffScreen
* - wrapper around framebuffer and texture for simple offscreen drawing
@@ -169,6 +171,15 @@ void GPU_shader_uniform_texture(GPUShader *shader, int location, GPUTexture *tex
int GPU_shader_get_attribute(GPUShader *shader, const char *name);
+/* Builtin/Non-generated shaders */
+typedef enum GPUBuiltinShader {
+ GPU_SHADER_VSM_STORE = (1<<0),
+ GPU_SHADER_SEP_GAUSSIAN_BLUR = (1<<1),
+} GPUBuiltinShader;
+
+GPUShader *GPU_shader_get_builtin_shader(GPUBuiltinShader shader);
+void GPU_shader_free_builtin_shaders(void);
+
/* Vertex attributes for shaders */
#define GPU_MAX_ATTRIB 32
diff --git a/source/blender/gpu/GPU_material.h b/source/blender/gpu/GPU_material.h
index 33c5d474932..7f5ae0ba2a1 100644
--- a/source/blender/gpu/GPU_material.h
+++ b/source/blender/gpu/GPU_material.h
@@ -225,6 +225,7 @@ GPULamp *GPU_lamp_from_blender(struct Scene *scene, struct Object *ob, struct Ob
void GPU_lamp_free(struct Object *ob);
int GPU_lamp_has_shadow_buffer(GPULamp *lamp);
+void GPU_lamp_update_buffer_mats(GPULamp *lamp);
void GPU_lamp_shadow_buffer_bind(GPULamp *lamp, float viewmat[][4], int *winsize, float winmat[][4]);
void GPU_lamp_shadow_buffer_unbind(GPULamp *lamp);
diff --git a/source/blender/gpu/SConscript b/source/blender/gpu/SConscript
index 11b0ee5f9fa..cf1c91f25fe 100644
--- a/source/blender/gpu/SConscript
+++ b/source/blender/gpu/SConscript
@@ -2,6 +2,7 @@
Import ('env')
sources = env.Glob('intern/*.c')
+sources += env.Glob('shaders/*.c')
defs = [ 'GLEW_STATIC' ]
diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c
index 1dee327a066..1885b5fc979 100644
--- a/source/blender/gpu/intern/gpu_buffers.c
+++ b/source/blender/gpu/intern/gpu_buffers.c
@@ -408,7 +408,7 @@ GPUDrawObject *GPU_drawobject_new( DerivedMesh *dm )
points_per_mat[mface[i].mat_nr] += mface[i].v4 ? 6 : 3;
/* create the GPUDrawObject */
- gdo = MEM_callocN(sizeof(GPUDrawObject),"GPUDrawObject");
+ gdo = MEM_callocN(sizeof(GPUDrawObject), "GPUDrawObject");
gdo->totvert = dm->getNumVerts(dm);
gdo->totedge = dm->getNumEdges(dm);
@@ -601,7 +601,7 @@ static void GPU_buffer_copy_vertex(DerivedMesh *dm, float *varray, int *index, i
j = dm->drawObject->tot_triangle_point*3;
for (i = 0; i < dm->drawObject->totvert; i++) {
if (dm->drawObject->vert_points[i].point_index >= dm->drawObject->tot_triangle_point) {
- copy_v3_v3(&varray[j],mvert[i].co);
+ copy_v3_v3(&varray[j], mvert[i].co);
j+=3;
}
}
@@ -685,16 +685,16 @@ static void GPU_buffer_copy_uv(DerivedMesh *dm, float *varray, int *index, int *
start = index[mat_orig_to_new[f->mat_nr]];
/* v1 v2 v3 */
- copy_v2_v2(&varray[start],mtface[i].uv[0]);
- copy_v2_v2(&varray[start+2],mtface[i].uv[1]);
- copy_v2_v2(&varray[start+4],mtface[i].uv[2]);
+ copy_v2_v2(&varray[start], mtface[i].uv[0]);
+ copy_v2_v2(&varray[start+2], mtface[i].uv[1]);
+ copy_v2_v2(&varray[start+4], mtface[i].uv[2]);
index[mat_orig_to_new[f->mat_nr]] += 6;
if (f->v4) {
/* v3 v4 v1 */
- copy_v2_v2(&varray[start+6],mtface[i].uv[2]);
- copy_v2_v2(&varray[start+8],mtface[i].uv[3]);
- copy_v2_v2(&varray[start+10],mtface[i].uv[0]);
+ copy_v2_v2(&varray[start+6], mtface[i].uv[2]);
+ copy_v2_v2(&varray[start+8], mtface[i].uv[3]);
+ copy_v2_v2(&varray[start+10], mtface[i].uv[0]);
index[mat_orig_to_new[f->mat_nr]] += 6;
}
}
@@ -788,25 +788,25 @@ static void GPU_buffer_copy_uvedge(DerivedMesh *dm, float *varray, int *UNUSED(i
for (i = 0; i < dm->numTessFaceData; i++, tf++) {
MFace mf;
- dm->getTessFace(dm,i,&mf);
+ dm->getTessFace(dm, i, &mf);
- copy_v2_v2(&varray[j],tf->uv[0]);
- copy_v2_v2(&varray[j+2],tf->uv[1]);
+ copy_v2_v2(&varray[j], tf->uv[0]);
+ copy_v2_v2(&varray[j+2], tf->uv[1]);
- copy_v2_v2(&varray[j+4],tf->uv[1]);
- copy_v2_v2(&varray[j+6],tf->uv[2]);
+ copy_v2_v2(&varray[j+4], tf->uv[1]);
+ copy_v2_v2(&varray[j+6], tf->uv[2]);
if (!mf.v4) {
- copy_v2_v2(&varray[j+8],tf->uv[2]);
- copy_v2_v2(&varray[j+10],tf->uv[0]);
+ copy_v2_v2(&varray[j+8], tf->uv[2]);
+ copy_v2_v2(&varray[j+10], tf->uv[0]);
j+=12;
}
else {
- copy_v2_v2(&varray[j+8],tf->uv[2]);
- copy_v2_v2(&varray[j+10],tf->uv[3]);
+ copy_v2_v2(&varray[j+8], tf->uv[2]);
+ copy_v2_v2(&varray[j+10], tf->uv[3]);
- copy_v2_v2(&varray[j+12],tf->uv[3]);
- copy_v2_v2(&varray[j+14],tf->uv[0]);
+ copy_v2_v2(&varray[j+12], tf->uv[3]);
+ copy_v2_v2(&varray[j+14], tf->uv[0]);
j+=16;
}
}
@@ -861,7 +861,7 @@ const GPUBufferTypeSettings gpu_buffer_type_settings[] = {
/* get the GPUDrawObject buffer associated with a type */
static GPUBuffer **gpu_drawobject_buffer_from_type(GPUDrawObject *gdo, GPUBufferType type)
{
- switch(type) {
+ switch (type) {
case GPU_BUFFER_VERTEX:
return &gdo->points;
case GPU_BUFFER_NORMAL:
@@ -882,7 +882,7 @@ static GPUBuffer **gpu_drawobject_buffer_from_type(GPUDrawObject *gdo, GPUBuffer
/* get the amount of space to allocate for a buffer of a particular type */
static int gpu_buffer_size_from_type(DerivedMesh *dm, GPUBufferType type)
{
- switch(type) {
+ switch (type) {
case GPU_BUFFER_VERTEX:
return sizeof(float)*3 * (dm->drawObject->tot_triangle_point + dm->drawObject->tot_loose_point);
case GPU_BUFFER_NORMAL:
@@ -1059,7 +1059,7 @@ void GPU_uvedge_setup(DerivedMesh *dm)
static int GPU_typesize(int type)
{
- switch(type) {
+ switch (type) {
case GL_FLOAT:
return sizeof(float);
case GL_INT:
@@ -1373,7 +1373,7 @@ GPU_Buffers *GPU_build_mesh_buffers(int (*face_vert_indices)[4],
for (j = 0; j < (f->v4 ? 2 : 1); ++j) {
for (k = 0; k < 3; ++k) {
*tri_data = face_vert_indices[i][v[k]];
- ++tri_data;
+ tri_data++;
}
v[0] = 3;
v[1] = 0;
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c
index fc3878e2532..4f7fc3639f4 100644
--- a/source/blender/gpu/intern/gpu_codegen.c
+++ b/source/blender/gpu/intern/gpu_codegen.c
@@ -258,6 +258,8 @@ void GPU_codegen_exit(void)
FUNCTION_HASH = NULL;
}
+ GPU_shader_free_builtin_shaders();
+
if (glsl_material_library) {
MEM_freeN(glsl_material_library);
glsl_material_library = NULL;
@@ -710,8 +712,10 @@ static void GPU_nodes_extract_dynamic_inputs(GPUPass *pass, ListBase *nodes)
/* attributes don't need to be bound, they already have
* an id that the drawing functions will use */
if (input->source == GPU_SOURCE_ATTRIB ||
- input->source == GPU_SOURCE_BUILTIN)
+ input->source == GPU_SOURCE_BUILTIN)
+ {
continue;
+ }
if (input->ima || input->tex)
BLI_snprintf(input->shadername, sizeof(input->shadername), "samp%d", input->texid);
@@ -1034,8 +1038,10 @@ static void gpu_nodes_get_vertex_attributes(ListBase *nodes, GPUVertexAttribs *a
if (input->source == GPU_SOURCE_ATTRIB) {
for (a=0; a<attribs->totlayer; a++) {
if (attribs->layer[a].type == input->attribtype &&
- strcmp(attribs->layer[a].name, input->attribname) == 0)
+ strcmp(attribs->layer[a].name, input->attribname) == 0)
+ {
break;
+ }
}
if (a == attribs->totlayer && a < GPU_MAX_ATTRIB) {
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index 01f000e3314..ebfedea3968 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -441,9 +441,11 @@ int GPU_verify_image(Image *ima, ImageUser *iuser, int tftile, int compare, int
/* if same image & tile, we're done */
if (compare && ima == GTS.curima && GTS.curtile == GTS.tile &&
- GTS.tilemode == GTS.curtilemode && GTS.curtileXRep == GTS.tileXRep &&
- GTS.curtileYRep == GTS.tileYRep)
+ GTS.tilemode == GTS.curtilemode && GTS.curtileXRep == GTS.tileXRep &&
+ GTS.curtileYRep == GTS.tileYRep)
+ {
return (ima != NULL);
+ }
/* if tiling mode or repeat changed, change texture matrix to fit */
if (GTS.tilemode!=GTS.curtilemode || GTS.curtileXRep!=GTS.tileXRep ||
@@ -618,7 +620,7 @@ int GPU_verify_image(Image *ima, ImageUser *iuser, int tftile, int compare, int
/* create image */
glGenTextures(1, (GLuint *)bind);
- glBindTexture( GL_TEXTURE_2D, *bind);
+ glBindTexture(GL_TEXTURE_2D, *bind);
if (!(gpu_get_mipmap() && mipmap)) {
if (use_high_bit_depth)
@@ -712,7 +714,7 @@ int GPU_set_tpage(MTFace *tface, int mipmap, int alphablend)
gpu_verify_repeat(ima);
/* Did this get lost in the image recode? */
- /* tag_image_time(ima);*/
+ /* BKE_image_tag_time(ima);*/
return 1;
}
@@ -1074,7 +1076,7 @@ void GPU_begin_object_materials(View3D *v3d, RegionView3D *rv3d, Scene *scene, O
GPUBlendMode alphablend;
int a;
int gamma = scene->r.color_mgt_flag & R_COLOR_MANAGEMENT;
- int new_shading_nodes = scene_use_new_shading_nodes(scene);
+ int new_shading_nodes = BKE_scene_use_new_shading_nodes(scene);
/* initialize state */
memset(&GMS, 0, sizeof(GMS));
@@ -1085,7 +1087,7 @@ void GPU_begin_object_materials(View3D *v3d, RegionView3D *rv3d, Scene *scene, O
GMS.gob = ob;
GMS.gscene = scene;
GMS.totmat= ob->totcol+1; /* materials start from 1, default material is 0 */
- GMS.glay= v3d->lay;
+ GMS.glay= (v3d->localvd)? v3d->localvd->lay: v3d->lay; /* keep lamps visible in local view */
GMS.gviewmat= rv3d->viewmat;
GMS.gviewinv= rv3d->viewinv;
@@ -1302,7 +1304,7 @@ void GPU_end_object_materials(void)
GMS.gmatbuf= NULL;
GMS.alphablend= NULL;
- /* resetting the texture matrix after the glScale needed for tiled textures */
+ /* resetting the texture matrix after the scaling needed for tiled textures */
if (GTS.tilemode) {
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
@@ -1408,7 +1410,7 @@ int GPU_scene_object_lights(Scene *scene, Object *ob, int lay, float viewmat[][4
glPushMatrix();
glLoadMatrixf((float *)viewmat);
- where_is_object_simul(scene, base->object);
+ BKE_object_where_is_calc_simul(scene, base->object);
if (la->type==LA_SUN) {
/* sun lamp */
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c
index 6c30c95f355..32e4ff8d81c 100644
--- a/source/blender/gpu/intern/gpu_extensions.c
+++ b/source/blender/gpu/intern/gpu_extensions.c
@@ -67,6 +67,17 @@
* - arb draw buffers? 2.0 core
*/
+/* Non-generated shaders */
+extern char datatoc_gpu_shader_vsm_store_vert_glsl[];
+extern char datatoc_gpu_shader_vsm_store_frag_glsl[];
+extern char datatoc_gpu_shader_sep_gaussian_blur_vert_glsl[];
+extern char datatoc_gpu_shader_sep_gaussian_blur_frag_glsl[];
+
+typedef struct GPUShaders {
+ GPUShader *vsm_store;
+ GPUShader *sep_gaussian_blur;
+} GPUShaders;
+
static struct GPUGlobal {
GLint maxtextures;
GLuint currentfb;
@@ -77,7 +88,8 @@ static struct GPUGlobal {
GPUDeviceType device;
GPUOSType os;
GPUDriverType driver;
-} GG = {1, 0, 0, 0, 0};
+ GPUShaders shaders;
+} GG = {1, 0};
/* GPU Types */
@@ -171,14 +183,16 @@ void GPU_extensions_init(void)
* New IDs from MESA's src/gallium/drivers/r300/r300_screen.c
*/
if (strstr(renderer, "R3") || strstr(renderer, "RV3") ||
- strstr(renderer, "R4") || strstr(renderer, "RV4") ||
- strstr(renderer, "RS4") || strstr(renderer, "RC4") ||
- strstr(renderer, "R5") || strstr(renderer, "RV5") ||
- strstr(renderer, "RS600") || strstr(renderer, "RS690") ||
- strstr(renderer, "RS740") || strstr(renderer, "X1") ||
- strstr(renderer, "X2") || strstr(renderer, "Radeon 9") ||
- strstr(renderer, "RADEON 9"))
+ strstr(renderer, "R4") || strstr(renderer, "RV4") ||
+ strstr(renderer, "RS4") || strstr(renderer, "RC4") ||
+ strstr(renderer, "R5") || strstr(renderer, "RV5") ||
+ strstr(renderer, "RS600") || strstr(renderer, "RS690") ||
+ strstr(renderer, "RS740") || strstr(renderer, "X1") ||
+ strstr(renderer, "X2") || strstr(renderer, "Radeon 9") ||
+ strstr(renderer, "RADEON 9"))
+ {
GG.npotdisabled = 1;
+ }
}
/* make sure double side isn't used by default and only getting enabled in places where it's
@@ -236,7 +250,7 @@ static void GPU_print_framebuffer_error(GLenum status, char err_out[256])
{
const char *err= "unknown";
- switch(status) {
+ switch (status) {
case GL_FRAMEBUFFER_COMPLETE_EXT:
break;
case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT:
@@ -586,6 +600,25 @@ GPUTexture *GPU_texture_create_depth(int w, int h, char err_out[256])
return tex;
}
+/**
+ * A shadow map for VSM needs two components (depth and depth^2)
+ */
+GPUTexture *GPU_texture_create_vsm_shadow_map(int size, char err_out[256])
+{
+ GPUTexture *tex = GPU_texture_create_nD(size, size, 2, NULL, 0, err_out);
+
+ if (tex) {
+ /* Now we tweak some of the settings */
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RG32F, size, size, 0, GL_RG, GL_FLOAT, 0);
+
+ GPU_texture_unbind(tex);
+ }
+
+ return tex;
+}
+
void GPU_texture_bind(GPUTexture *tex, int number)
{
GLenum arbnumber;
@@ -844,6 +877,67 @@ void GPU_framebuffer_restore(void)
}
}
+void GPU_framebuffer_blur(GPUFrameBuffer *fb, GPUTexture *tex, GPUFrameBuffer *blurfb, GPUTexture *blurtex)
+{
+ float scaleh[2] = {1.0f/GPU_texture_opengl_width(blurtex), 0.0f};
+ float scalev[2] = {0.0f, 1.0f/GPU_texture_opengl_height(tex)};
+
+ GPUShader *blur_shader = GPU_shader_get_builtin_shader(GPU_SHADER_SEP_GAUSSIAN_BLUR);
+ int scale_uniform, texture_source_uniform;
+
+ if (!blur_shader)
+ return;
+
+ scale_uniform = GPU_shader_get_uniform(blur_shader, "ScaleU");
+ texture_source_uniform = GPU_shader_get_uniform(blur_shader, "textureSource");
+
+ /* Blurring horizontally */
+
+ /* We do the bind ourselves rather than using GPU_framebuffer_texture_bind() to avoid
+ pushing unnecessary matrices onto the OpenGL stack. */
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, blurfb->object);
+
+ GPU_shader_bind(blur_shader);
+ GPU_shader_uniform_vector(blur_shader, scale_uniform, 2, 1, (float*)scaleh);
+ GPU_shader_uniform_texture(blur_shader, texture_source_uniform, tex);
+ glViewport(0, 0, GPU_texture_opengl_width(blurtex), GPU_texture_opengl_height(blurtex));
+
+ /* Peparing to draw quad */
+ glMatrixMode(GL_MODELVIEW);
+ glLoadIdentity();
+ glMatrixMode(GL_TEXTURE);
+ glLoadIdentity();
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+
+ GPU_texture_bind(tex, 0);
+
+ /* Drawing quad */
+ glBegin(GL_QUADS);
+ glTexCoord2d(0, 0); glVertex2f(1, 1);
+ glTexCoord2d(1, 0); glVertex2f(-1, 1);
+ glTexCoord2d(1, 1); glVertex2f(-1, -1);
+ glTexCoord2d(0, 1); glVertex2f(1, -1);
+ glEnd();
+
+ /* Blurring vertically */
+
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fb->object);
+ glViewport(0, 0, GPU_texture_opengl_width(tex), GPU_texture_opengl_height(tex));
+ GPU_shader_uniform_vector(blur_shader, scale_uniform, 2, 1, (float*)scalev);
+ GPU_shader_uniform_texture(blur_shader, texture_source_uniform, blurtex);
+ GPU_texture_bind(blurtex, 0);
+
+ glBegin(GL_QUADS);
+ glTexCoord2d(0, 0); glVertex2f(1, 1);
+ glTexCoord2d(1, 0); glVertex2f(-1, 1);
+ glTexCoord2d(1, 1); glVertex2f(-1, -1);
+ glTexCoord2d(0, 1); glVertex2f(1, -1);
+ glEnd();
+
+ GPU_shader_unbind(blur_shader);
+}
+
/* GPUOffScreen */
struct GPUOffScreen {
@@ -1171,6 +1265,42 @@ int GPU_shader_get_attribute(GPUShader *shader, const char *name)
return index;
}
+GPUShader *GPU_shader_get_builtin_shader(GPUBuiltinShader shader)
+{
+ GPUShader *retval = NULL;
+
+ switch (shader) {
+ case GPU_SHADER_VSM_STORE:
+ if (!GG.shaders.vsm_store)
+ GG.shaders.vsm_store = GPU_shader_create(datatoc_gpu_shader_vsm_store_vert_glsl, datatoc_gpu_shader_vsm_store_frag_glsl, NULL);
+ retval = GG.shaders.vsm_store;
+ break;
+ case GPU_SHADER_SEP_GAUSSIAN_BLUR:
+ if (!GG.shaders.sep_gaussian_blur)
+ GG.shaders.sep_gaussian_blur = GPU_shader_create(datatoc_gpu_shader_sep_gaussian_blur_vert_glsl, datatoc_gpu_shader_sep_gaussian_blur_frag_glsl, NULL);
+ retval = GG.shaders.sep_gaussian_blur;
+ break;
+ }
+
+ if (retval == NULL)
+ printf("Unable to create a GPUShader for builtin shader: %d\n", shader);
+
+ return retval;
+}
+
+void GPU_shader_free_builtin_shaders()
+{
+ if (GG.shaders.vsm_store) {
+ MEM_freeN(GG.shaders.vsm_store);
+ GG.shaders.vsm_store = NULL;
+ }
+
+ if (GG.shaders.sep_gaussian_blur) {
+ MEM_freeN(GG.shaders.sep_gaussian_blur);
+ GG.shaders.sep_gaussian_blur = NULL;
+ }
+}
+
#if 0
/* GPUPixelBuffer */
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index ab5f2040175..f75c1576fb9 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -118,6 +118,7 @@ struct GPULamp {
float spotsi, spotbl, k;
float dist, att1, att2;
+ float shadow_color[3];
float bias, d, clipend;
int size;
@@ -131,11 +132,17 @@ struct GPULamp {
float dynpersmat[4][4];
GPUFrameBuffer *fb;
+ GPUFrameBuffer *blurfb;
GPUTexture *tex;
+ GPUTexture *depthtex;
+ GPUTexture *blurtex;
ListBase materials;
};
+/* Forward declaration so shade_light_textures() can use this, while still keeping the code somewhat organized */
+static void texture_rgb_blend(GPUMaterial *mat, GPUNodeLink *tex, GPUNodeLink *out, GPUNodeLink *fact, GPUNodeLink *facg, int blendtype, GPUNodeLink **in);
+
/* Functions */
static GPUMaterial *GPU_material_construct_begin(Material *ma)
@@ -320,10 +327,15 @@ void GPU_material_bind_uniforms(GPUMaterial *material, float obmat[][4], float v
mul_m4_v3(viewmat, lamp->dynco);
}
- if (material->dynproperty & DYN_LAMP_IMAT)
+ if (material->dynproperty & DYN_LAMP_IMAT) {
mult_m4_m4m4(lamp->dynimat, lamp->imat, viewinv);
- if (material->dynproperty & DYN_LAMP_PERSMAT)
+ }
+
+ if (material->dynproperty & DYN_LAMP_PERSMAT) {
+ if (!GPU_lamp_has_shadow_buffer(lamp)) /* The lamp matrices are already updated if we're using shadow buffers */
+ GPU_lamp_update_buffer_mats(lamp);
mult_m4_m4m4(lamp->dynpersmat, lamp->persmat, viewinv);
+ }
}
GPU_pass_update_uniforms(material->pass);
@@ -397,8 +409,7 @@ static GPUNodeLink *lamp_get_visibility(GPUMaterial *mat, GPULamp *lamp, GPUNode
if (lamp->type==LA_AREA)
return visifac;
- switch(lamp->falloff_type)
- {
+ switch (lamp->falloff_type) {
case LA_FALLOFF_CONSTANT:
break;
case LA_FALLOFF_INVLINEAR:
@@ -535,7 +546,7 @@ static void add_to_diffuse(GPUMaterial *mat, Material *ma, GPUShadeInput *shi, G
}
else {
/* input */
- switch(ma->rampin_col) {
+ switch (ma->rampin_col) {
case MA_RAMP_IN_ENERGY:
GPU_link(mat, "ramp_rgbtobw", rgb, &fac);
break;
@@ -588,7 +599,7 @@ static void do_specular_ramp(GPUShadeInput *shi, GPUNodeLink *is, GPUNodeLink *t
if (ma->ramp_spec && (ma->rampin_spec!=MA_RAMP_IN_RESULT)) {
/* input */
- switch(ma->rampin_spec) {
+ switch (ma->rampin_spec) {
case MA_RAMP_IN_ENERGY:
fac = t;
break;
@@ -615,12 +626,35 @@ static void add_user_list(ListBase *list, void *data)
BLI_addtail(list, link);
}
+static void shade_light_textures(GPUMaterial *mat, GPULamp *lamp, GPUNodeLink **rgb)
+{
+ GPUNodeLink *tex_rgb;
+ MTex *mtex = NULL;
+ int i;
+ float one = 1.f;
+
+ for (i=0; i<MAX_MTEX; ++i) {
+ mtex = lamp->la->mtex[i];
+
+ if (mtex && mtex->tex->type & TEX_IMAGE && mtex->tex->ima) {
+ mat->dynproperty |= DYN_LAMP_PERSMAT;
+
+ GPU_link(mat, "shade_light_texture",
+ GPU_builtin(GPU_VIEW_POSITION),
+ GPU_image(mtex->tex->ima, &mtex->tex->iuser),
+ GPU_dynamic_uniform((float*)lamp->dynpersmat, GPU_DYNAMIC_LAMP_DYNPERSMAT, lamp->ob),
+ &tex_rgb);
+ texture_rgb_blend(mat, tex_rgb, *rgb, GPU_uniform(&one), GPU_uniform(&mtex->colfac), mtex->blendtype, rgb);
+ }
+ }
+}
+
static void shade_one_light(GPUShadeInput *shi, GPUShadeResult *shr, GPULamp *lamp)
{
Material *ma= shi->mat;
GPUMaterial *mat= shi->gpumat;
GPUNodeLink *lv, *dist, *visifac, *is, *inp, *i, *vn, *view;
- GPUNodeLink *outcol, *specfac, *t, *shadfac= NULL;
+ GPUNodeLink *outcol, *specfac, *t, *shadfac= NULL, *lcol;
float one = 1.0f;
if ((lamp->mode & LA_ONLYSHADOW) && !(ma->mode & MA_SHADOW))
@@ -671,6 +705,9 @@ static void shade_one_light(GPUShadeInput *shi, GPUShadeResult *shr, GPULamp *la
i = is;
GPU_link(mat, "shade_visifac", i, visifac, shi->refl, &i);
+
+ GPU_link(mat, "shade_mul_value", i, GPU_dynamic_uniform(lamp->dyncol, GPU_DYNAMIC_LAMP_DYNCOL, lamp->ob), &lcol);
+ shade_light_textures(mat, lamp, &lcol);
#if 0
if (ma->mode & MA_TANGENT_VN)
@@ -683,20 +720,29 @@ static void shade_one_light(GPUShadeInput *shi, GPUShadeResult *shr, GPULamp *la
if ((ma->mode & MA_SHADOW) && GPU_lamp_has_shadow_buffer(lamp)) {
if (!(mat->scene->gm.flag & GAME_GLSL_NO_SHADOWS)) {
mat->dynproperty |= DYN_LAMP_PERSMAT;
-
- GPU_link(mat, "test_shadowbuf",
- GPU_builtin(GPU_VIEW_POSITION),
- GPU_dynamic_texture(lamp->tex, GPU_DYNAMIC_SAMPLER_2DSHADOW, lamp->ob),
- GPU_dynamic_uniform((float*)lamp->dynpersmat, GPU_DYNAMIC_LAMP_DYNPERSMAT, lamp->ob),
- GPU_uniform(&lamp->bias), inp, &shadfac);
+
+ if (lamp->la->shadowmap_type == LA_SHADMAP_VARIANCE) {
+ GPU_link(mat, "test_shadowbuf_vsm",
+ GPU_builtin(GPU_VIEW_POSITION),
+ GPU_dynamic_texture(lamp->tex, GPU_DYNAMIC_SAMPLER_2DSHADOW, lamp->ob),
+ GPU_dynamic_uniform((float*)lamp->dynpersmat, GPU_DYNAMIC_LAMP_DYNPERSMAT, lamp->ob),
+ GPU_uniform(&lamp->bias), GPU_uniform(&lamp->la->bleedbias), inp, &shadfac);
+ } else {
+ GPU_link(mat, "test_shadowbuf",
+ GPU_builtin(GPU_VIEW_POSITION),
+ GPU_dynamic_texture(lamp->tex, GPU_DYNAMIC_SAMPLER_2DSHADOW, lamp->ob),
+ GPU_dynamic_uniform((float*)lamp->dynpersmat, GPU_DYNAMIC_LAMP_DYNPERSMAT, lamp->ob),
+ GPU_uniform(&lamp->bias), inp, &shadfac);
+ }
if (lamp->mode & LA_ONLYSHADOW) {
GPU_link(mat, "shade_only_shadow", i, shadfac,
GPU_dynamic_uniform(&lamp->dynenergy, GPU_DYNAMIC_LAMP_DYNENERGY, lamp->ob), &shadfac);
- if (!(lamp->mode & LA_NO_DIFF))
- GPU_link(mat, "shade_only_shadow_diffuse", shadfac, shi->rgb,
- shr->diff, &shr->diff);
+ if (!(lamp->mode & LA_NO_DIFF)) {
+ GPU_link(mat, "mix_mult", shadfac, shr->diff,
+ GPU_uniform(lamp->shadow_color), &shr->diff);
+ }
if (!(lamp->mode & LA_NO_SPEC))
GPU_link(mat, "shade_only_shadow_specular", shadfac, shi->specrgb,
@@ -706,8 +752,6 @@ static void shade_one_light(GPUShadeInput *shi, GPUShadeResult *shr, GPULamp *la
add_user_list(&lamp->materials, shi->gpumat->ma);
return;
}
-
- GPU_link(mat, "math_multiply", i, shadfac, &i);
}
}
else if ((mat->scene->gm.flag & GAME_GLSL_NO_SHADOWS) && (lamp->mode & LA_ONLYSHADOW)) {
@@ -721,8 +765,11 @@ static void shade_one_light(GPUShadeInput *shi, GPUShadeResult *shr, GPULamp *la
if (GPU_link_changed(shi->refl) || ma->ref != 0.0f) {
if (!(lamp->mode & LA_NO_DIFF)) {
GPUNodeLink *rgb;
- GPU_link(mat, "shade_mul_value", i, GPU_dynamic_uniform(lamp->dyncol, GPU_DYNAMIC_LAMP_DYNCOL, lamp->ob), &rgb);
- add_to_diffuse(mat, ma, shi, is, rgb, &shr->diff);
+ GPU_link(mat, "shade_mul_value", i, lcol, &rgb);
+ GPU_link(mat, "mtex_value_invert", shadfac, &shadfac);
+ GPU_link(mat, "mix_mult", shadfac, rgb, GPU_uniform(lamp->shadow_color), &rgb);
+ GPU_link(mat, "mtex_value_invert", shadfac, &shadfac);
+ add_to_diffuse(mat, ma, shi, is, rgb, &shr->diff);
}
}
@@ -731,7 +778,7 @@ static void shade_one_light(GPUShadeInput *shi, GPUShadeResult *shr, GPULamp *la
(GPU_link_changed(shi->spec) || ma->spec != 0.0f)) {
if (lamp->type == LA_HEMI) {
GPU_link(mat, "shade_hemi_spec", vn, lv, view, GPU_uniform(&ma->spec), shi->har, visifac, &t);
- GPU_link(mat, "shade_add_spec", t, GPU_dynamic_uniform(lamp->dyncol, GPU_DYNAMIC_LAMP_DYNCOL, lamp->ob), shi->specrgb, &outcol);
+ GPU_link(mat, "shade_add_spec", t, lcol, shi->specrgb, &outcol);
GPU_link(mat, "shade_add_clamped", shr->spec, outcol, &shr->spec);
}
else {
@@ -749,16 +796,16 @@ static void shade_one_light(GPUShadeInput *shi, GPUShadeResult *shr, GPULamp *la
if (lamp->type==LA_AREA)
GPU_link(mat, "shade_spec_area_inp", specfac, inp, &specfac);
- GPU_link(mat, "shade_spec_t", shadfac, shi->spec, visifac, specfac, &t);
+ GPU_link(mat, "shade_spec_t", shadfac, shi->spec, visifac, specfac, &t);
if (ma->mode & MA_RAMP_SPEC) {
GPUNodeLink *spec;
do_specular_ramp(shi, specfac, t, &spec);
- GPU_link(mat, "shade_add_spec", t, GPU_dynamic_uniform(lamp->dyncol, GPU_DYNAMIC_LAMP_DYNCOL, lamp->ob), spec, &outcol);
+ GPU_link(mat, "shade_add_spec", t, lcol, spec, &outcol);
GPU_link(mat, "shade_add_clamped", shr->spec, outcol, &shr->spec);
}
else {
- GPU_link(mat, "shade_add_spec", t, GPU_dynamic_uniform(lamp->dyncol, GPU_DYNAMIC_LAMP_DYNCOL, lamp->ob), shi->specrgb, &outcol);
+ GPU_link(mat, "shade_add_spec", t, lcol, shi->specrgb, &outcol);
GPU_link(mat, "shade_add_clamped", shr->spec, outcol, &shr->spec);
}
}
@@ -807,7 +854,7 @@ static void material_lights(GPUShadeInput *shi, GPUShadeResult *shr)
static void texture_rgb_blend(GPUMaterial *mat, GPUNodeLink *tex, GPUNodeLink *out, GPUNodeLink *fact, GPUNodeLink *facg, int blendtype, GPUNodeLink **in)
{
- switch(blendtype) {
+ switch (blendtype) {
case MTEX_BLEND:
GPU_link(mat, "mtex_rgb_blend", out, tex, fact, facg, in);
break;
@@ -858,7 +905,7 @@ static void texture_rgb_blend(GPUMaterial *mat, GPUNodeLink *tex, GPUNodeLink *o
static void texture_value_blend(GPUMaterial *mat, GPUNodeLink *tex, GPUNodeLink *out, GPUNodeLink *fact, GPUNodeLink *facg, int blendtype, GPUNodeLink **in)
{
- switch(blendtype) {
+ switch (blendtype) {
case MTEX_BLEND:
GPU_link(mat, "mtex_value_blend", out, tex, fact, facg, in);
break;
@@ -1049,7 +1096,7 @@ static void do_material_tex(GPUShadeInput *shi)
if (tex->imaflag & TEX_NORMALMAP) {
/* normalmap image */
- GPU_link(mat, "mtex_normal", texco, GPU_image(tex->ima, &tex->iuser), &tnor );
+ GPU_link(mat, "mtex_normal", texco, GPU_image(tex->ima, &tex->iuser), &tnor);
if (mtex->norfac < 0.0f)
GPU_link(mat, "mtex_negate_texnormal", tnor, &tnor);
@@ -1152,70 +1199,70 @@ static void do_material_tex(GPUShadeInput *shi)
if ( iBumpSpacePrev != iBumpSpace ) {
if ( mtex->texflag & MTEX_BUMP_OBJECTSPACE )
- GPU_link( mat, "mtex_bump_init_objspace",
- surf_pos, vNorg,
- GPU_builtin(GPU_VIEW_MATRIX), GPU_builtin(GPU_INVERSE_VIEW_MATRIX), GPU_builtin(GPU_OBJECT_MATRIX), GPU_builtin(GPU_INVERSE_OBJECT_MATRIX),
- fPrevMagnitude, vNacc,
- &fPrevMagnitude, &vNacc,
- &vR1, &vR2, &fDet );
+ GPU_link(mat, "mtex_bump_init_objspace",
+ surf_pos, vNorg,
+ GPU_builtin(GPU_VIEW_MATRIX), GPU_builtin(GPU_INVERSE_VIEW_MATRIX), GPU_builtin(GPU_OBJECT_MATRIX), GPU_builtin(GPU_INVERSE_OBJECT_MATRIX),
+ fPrevMagnitude, vNacc,
+ &fPrevMagnitude, &vNacc,
+ &vR1, &vR2, &fDet);
else if ( mtex->texflag & MTEX_BUMP_TEXTURESPACE )
- GPU_link( mat, "mtex_bump_init_texturespace",
- surf_pos, vNorg,
- fPrevMagnitude, vNacc,
- &fPrevMagnitude, &vNacc,
- &vR1, &vR2, &fDet );
+ GPU_link(mat, "mtex_bump_init_texturespace",
+ surf_pos, vNorg,
+ fPrevMagnitude, vNacc,
+ &fPrevMagnitude, &vNacc,
+ &vR1, &vR2, &fDet);
else
- GPU_link( mat, "mtex_bump_init_viewspace",
- surf_pos, vNorg,
- fPrevMagnitude, vNacc,
- &fPrevMagnitude, &vNacc,
- &vR1, &vR2, &fDet );
+ GPU_link(mat, "mtex_bump_init_viewspace",
+ surf_pos, vNorg,
+ fPrevMagnitude, vNacc,
+ &fPrevMagnitude, &vNacc,
+ &vR1, &vR2, &fDet);
iBumpSpacePrev = iBumpSpace;
}
if (found_deriv_map) {
- GPU_link( mat, "mtex_bump_deriv",
- texco, GPU_image(tex->ima, &tex->iuser), GPU_uniform(&ima_x), GPU_uniform(&ima_y), tnorfac,
- &dBs, &dBt );
+ GPU_link(mat, "mtex_bump_deriv",
+ texco, GPU_image(tex->ima, &tex->iuser), GPU_uniform(&ima_x), GPU_uniform(&ima_y), tnorfac,
+ &dBs, &dBt );
}
- else if ( mtex->texflag & MTEX_3TAP_BUMP )
- GPU_link( mat, "mtex_bump_tap3",
- texco, GPU_image(tex->ima, &tex->iuser), tnorfac,
- &dBs, &dBt );
- else if ( mtex->texflag & MTEX_5TAP_BUMP )
- GPU_link( mat, "mtex_bump_tap5",
- texco, GPU_image(tex->ima, &tex->iuser), tnorfac,
- &dBs, &dBt );
+ else if ( mtex->texflag & MTEX_3TAP_BUMP)
+ GPU_link(mat, "mtex_bump_tap3",
+ texco, GPU_image(tex->ima, &tex->iuser), tnorfac,
+ &dBs, &dBt );
+ else if ( mtex->texflag & MTEX_5TAP_BUMP)
+ GPU_link(mat, "mtex_bump_tap5",
+ texco, GPU_image(tex->ima, &tex->iuser), tnorfac,
+ &dBs, &dBt );
else if ( mtex->texflag & MTEX_BICUBIC_BUMP ) {
if (GPU_bicubic_bump_support()) {
- GPU_link( mat, "mtex_bump_bicubic",
- texco, GPU_image(tex->ima, &tex->iuser), tnorfac,
- &dBs, &dBt );
+ GPU_link(mat, "mtex_bump_bicubic",
+ texco, GPU_image(tex->ima, &tex->iuser), tnorfac,
+ &dBs, &dBt);
}
else {
- GPU_link( mat, "mtex_bump_tap5",
- texco, GPU_image(tex->ima, &tex->iuser), tnorfac,
- &dBs, &dBt );
+ GPU_link(mat, "mtex_bump_tap5",
+ texco, GPU_image(tex->ima, &tex->iuser), tnorfac,
+ &dBs, &dBt);
}
}
if ( mtex->texflag & MTEX_BUMP_TEXTURESPACE ) {
float imag_tspace_dimension_y = aspect*imag_tspace_dimension_x;
- GPU_link( mat, "mtex_bump_apply_texspace",
- fDet, dBs, dBt, vR1, vR2,
- GPU_image(tex->ima, &tex->iuser), texco,
- GPU_uniform(&imag_tspace_dimension_x), GPU_uniform(&imag_tspace_dimension_y), vNacc,
- &vNacc, &shi->vn );
+ GPU_link(mat, "mtex_bump_apply_texspace",
+ fDet, dBs, dBt, vR1, vR2,
+ GPU_image(tex->ima, &tex->iuser), texco,
+ GPU_uniform(&imag_tspace_dimension_x), GPU_uniform(&imag_tspace_dimension_y), vNacc,
+ &vNacc, &shi->vn );
}
else
- GPU_link( mat, "mtex_bump_apply",
- fDet, dBs, dBt, vR1, vR2, vNacc,
- &vNacc, &shi->vn );
+ GPU_link(mat, "mtex_bump_apply",
+ fDet, dBs, dBt, vR1, vR2, vNacc,
+ &vNacc, &shi->vn );
}
}
@@ -1454,7 +1501,7 @@ GPUMaterial *GPU_material_from_blender(Scene *scene, Material *ma)
GPU_material_output_link(mat, outlink);
}
- if (!scene_use_new_shading_nodes(scene)) {
+ if (!BKE_scene_use_new_shading_nodes(scene)) {
if (gpu_do_color_management(mat))
if (mat->outlink)
GPU_link(mat, "linearrgb_to_srgb", mat->outlink, &mat->outlink);
@@ -1563,12 +1610,17 @@ static void gpu_lamp_from_blender(Scene *scene, Object *ob, Object *par, Lamp *l
lamp->bias *= 0.25f;
/* makeshadowbuf */
- angle= saacos(lamp->spotsi);
- temp= 0.5f*lamp->size*cosf(angle)/sinf(angle);
- pixsize= (lamp->d)/temp;
- wsize= pixsize*0.5f*lamp->size;
-
- perspective_m4( lamp->winmat,-wsize, wsize, -wsize, wsize, lamp->d, lamp->clipend);
+ if (lamp->type == LA_SUN) {
+ wsize = la->shadow_frustum_size;
+ orthographic_m4(lamp->winmat, -wsize, wsize, -wsize, wsize, lamp->d, lamp->clipend);
+ }
+ else {
+ angle= saacos(lamp->spotsi);
+ temp= 0.5f*lamp->size*cosf(angle)/sinf(angle);
+ pixsize= (lamp->d)/temp;
+ wsize= pixsize*0.5f*lamp->size;
+ perspective_m4(lamp->winmat, -wsize, wsize, -wsize, wsize, lamp->d, lamp->clipend);
+ }
}
static void gpu_lamp_shadow_free(GPULamp *lamp)
@@ -1577,10 +1629,22 @@ static void gpu_lamp_shadow_free(GPULamp *lamp)
GPU_texture_free(lamp->tex);
lamp->tex= NULL;
}
+ if (lamp->depthtex) {
+ GPU_texture_free(lamp->depthtex);
+ lamp->depthtex= NULL;
+ }
if (lamp->fb) {
GPU_framebuffer_free(lamp->fb);
lamp->fb= NULL;
}
+ if (lamp->blurtex) {
+ GPU_texture_free(lamp->blurtex);
+ lamp->blurtex= NULL;
+ }
+ if (lamp->blurfb) {
+ GPU_framebuffer_free(lamp->blurfb);
+ lamp->blurfb= NULL;
+ }
}
GPULamp *GPU_lamp_from_blender(Scene *scene, Object *ob, Object *par)
@@ -1605,7 +1669,7 @@ GPULamp *GPU_lamp_from_blender(Scene *scene, Object *ob, Object *par)
la = ob->data;
gpu_lamp_from_blender(scene, ob, par, la, lamp);
- if (la->type==LA_SPOT && (la->mode & LA_SHAD_BUF)) {
+ if ((la->type==LA_SPOT && (la->mode & LA_SHAD_BUF)) || (la->type==LA_SUN && (la->mode & LA_SHAD_RAY))) {
/* opengl */
lamp->fb = GPU_framebuffer_create();
if (!lamp->fb) {
@@ -1613,18 +1677,72 @@ GPULamp *GPU_lamp_from_blender(Scene *scene, Object *ob, Object *par)
return lamp;
}
- lamp->tex = GPU_texture_create_depth(lamp->size, lamp->size, NULL);
- if (!lamp->tex) {
- gpu_lamp_shadow_free(lamp);
- return lamp;
+ if (lamp->la->shadowmap_type == LA_SHADMAP_VARIANCE) {
+ /* Shadow depth map */
+ lamp->depthtex = GPU_texture_create_depth(lamp->size, lamp->size, NULL);
+ if (!lamp->depthtex) {
+ gpu_lamp_shadow_free(lamp);
+ return lamp;
+ }
+
+ if (!GPU_framebuffer_texture_attach(lamp->fb, lamp->depthtex, NULL)) {
+ gpu_lamp_shadow_free(lamp);
+ return lamp;
+ }
+
+ /* Shadow color map */
+ lamp->tex = GPU_texture_create_vsm_shadow_map(lamp->size, NULL);
+ if (!lamp->tex) {
+ gpu_lamp_shadow_free(lamp);
+ return lamp;
+ }
+
+ if (!GPU_framebuffer_texture_attach(lamp->fb, lamp->tex, NULL)) {
+ gpu_lamp_shadow_free(lamp);
+ return lamp;
+ }
+
+ /* FBO and texture for blurring */
+ lamp->blurfb = GPU_framebuffer_create();
+ if (!lamp->blurfb) {
+ gpu_lamp_shadow_free(lamp);
+ return lamp;
+ }
+
+ lamp->blurtex = GPU_texture_create_vsm_shadow_map(lamp->size*0.5, NULL);
+ if (!lamp->blurtex) {
+ gpu_lamp_shadow_free(lamp);
+ return lamp;
+ }
+
+ if (!GPU_framebuffer_texture_attach(lamp->blurfb, lamp->blurtex, NULL)) {
+ gpu_lamp_shadow_free(lamp);
+ return lamp;
+ }
}
+ else {
+ lamp->tex = GPU_texture_create_depth(lamp->size, lamp->size, NULL);
+ if (!lamp->tex) {
+ gpu_lamp_shadow_free(lamp);
+ return lamp;
+ }
- if (!GPU_framebuffer_texture_attach(lamp->fb, lamp->tex, NULL)) {
- gpu_lamp_shadow_free(lamp);
- return lamp;
+ if (!GPU_framebuffer_texture_attach(lamp->fb, lamp->tex, NULL)) {
+ gpu_lamp_shadow_free(lamp);
+ return lamp;
+ }
}
GPU_framebuffer_restore();
+
+ lamp->shadow_color[0] = la->shdwr;
+ lamp->shadow_color[1] = la->shdwg;
+ lamp->shadow_color[2] = la->shdwb;
+ }
+ else {
+ lamp->shadow_color[0] = 1.0;
+ lamp->shadow_color[1] = 1.0;
+ lamp->shadow_color[2] = 1.0;
}
return lamp;
@@ -1664,7 +1782,7 @@ int GPU_lamp_has_shadow_buffer(GPULamp *lamp)
lamp->tex && lamp->fb);
}
-void GPU_lamp_shadow_buffer_bind(GPULamp *lamp, float viewmat[][4], int *winsize, float winmat[][4])
+void GPU_lamp_update_buffer_mats(GPULamp *lamp)
{
float rangemat[4][4], persmat[4][4];
@@ -1687,11 +1805,18 @@ void GPU_lamp_shadow_buffer_bind(GPULamp *lamp, float viewmat[][4], int *winsize
rangemat[3][2] = 0.5f;
mult_m4_m4m4(lamp->persmat, rangemat, persmat);
+}
+
+void GPU_lamp_shadow_buffer_bind(GPULamp *lamp, float viewmat[][4], int *winsize, float winmat[][4])
+{
+ GPU_lamp_update_buffer_mats(lamp);
/* opengl */
glDisable(GL_SCISSOR_TEST);
GPU_framebuffer_texture_bind(lamp->fb, lamp->tex,
GPU_texture_opengl_width(lamp->tex), GPU_texture_opengl_height(lamp->tex));
+ if (lamp->la->shadowmap_type == LA_SHADMAP_VARIANCE)
+ GPU_shader_bind(GPU_shader_get_builtin_shader(GPU_SHADER_VSM_STORE));
/* set matrices */
copy_m4_m4(viewmat, lamp->viewmat);
@@ -1701,6 +1826,11 @@ void GPU_lamp_shadow_buffer_bind(GPULamp *lamp, float viewmat[][4], int *winsize
void GPU_lamp_shadow_buffer_unbind(GPULamp *lamp)
{
+ if (lamp->la->shadowmap_type == LA_SHADMAP_VARIANCE) {
+ GPU_shader_unbind(GPU_shader_get_builtin_shader(GPU_SHADER_VSM_STORE));
+ GPU_framebuffer_blur(lamp->fb, lamp->tex, lamp->blurfb, lamp->blurtex);
+ }
+
GPU_framebuffer_texture_unbind(lamp->fb, lamp->tex);
GPU_framebuffer_restore();
glEnable(GL_SCISSOR_TEST);
@@ -1767,7 +1897,7 @@ GPUShaderExport *GPU_shader_export(struct Scene *scene, struct Material *ma)
uniform->datatype = GPU_DATA_1I;
BLI_strncpy(uniform->varname, input->shadername, sizeof(uniform->varname));
- switch(input->textype) {
+ switch (input->textype) {
case GPU_SHADOW2D:
uniform->type = GPU_DYNAMIC_SAMPLER_2DSHADOW;
uniform->lamp = input->dynamicdata;
@@ -1788,7 +1918,7 @@ GPUShaderExport *GPU_shader_export(struct Scene *scene, struct Material *ma)
else {
uniform->type = input->dynamictype;
BLI_strncpy(uniform->varname, input->shadername, sizeof(uniform->varname));
- switch(input->type) {
+ switch (input->type) {
case 1:
uniform->datatype = GPU_DATA_1F;
break;
@@ -1847,7 +1977,7 @@ GPUShaderExport *GPU_shader_export(struct Scene *scene, struct Material *ma)
attribute->number = mat->attribs.layer[i].glindex;
BLI_snprintf(attribute->varname, sizeof(attribute->varname), "att%d", mat->attribs.layer[i].attribid);
- switch(attribute->type) {
+ switch (attribute->type) {
case CD_TANGENT:
attribute->datatype = GPU_DATA_4F;
break;
diff --git a/source/blender/gpu/intern/gpu_shader_material.glsl.c b/source/blender/gpu/intern/gpu_shader_material.glsl.c
deleted file mode 100644
index a6d962a7bb9..00000000000
--- a/source/blender/gpu/intern/gpu_shader_material.glsl.c
+++ /dev/null
@@ -1,1550 +0,0 @@
-/* DataToC output of file <gpu_shader_material_glsl> */
-
-int datatoc_gpu_shader_material_glsl_size= 49395;
-char datatoc_gpu_shader_material_glsl[]= {
- 10,102,108,111, 97,116, 32,101,120,112, 95, 98,108,101,110,100,101,114, 40,
-102,108,111, 97,116, 32,102, 41, 10,123, 10, 9,114,101,116,117,114,110, 32,112,111,119, 40, 50, 46, 55, 49, 56, 50, 56, 49, 56,
- 50, 56, 52, 54, 44, 32,102, 41, 59, 10,125, 10, 10,118,111,105,100, 32,114,103, 98, 95,116,111, 95,104,115,118, 40,118,101, 99,
- 52, 32,114,103, 98, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116,
- 32, 99,109, 97,120, 44, 32, 99,109,105,110, 44, 32,104, 44, 32,115, 44, 32,118, 44, 32, 99,100,101,108,116, 97, 59, 10, 9,118,
-101, 99, 51, 32, 99, 59, 10, 10, 9, 99,109, 97,120, 32, 61, 32,109, 97,120, 40,114,103, 98, 91, 48, 93, 44, 32,109, 97,120, 40,
-114,103, 98, 91, 49, 93, 44, 32,114,103, 98, 91, 50, 93, 41, 41, 59, 10, 9, 99,109,105,110, 32, 61, 32,109,105,110, 40,114,103,
- 98, 91, 48, 93, 44, 32,109,105,110, 40,114,103, 98, 91, 49, 93, 44, 32,114,103, 98, 91, 50, 93, 41, 41, 59, 10, 9, 99,100,101,
-108,116, 97, 32, 61, 32, 99,109, 97,120, 45, 99,109,105,110, 59, 10, 10, 9,118, 32, 61, 32, 99,109, 97,120, 59, 10, 9,105,102,
- 32, 40, 99,109, 97,120, 33, 61, 48, 46, 48, 41, 10, 9, 9,115, 32, 61, 32, 99,100,101,108,116, 97, 47, 99,109, 97,120, 59, 10,
- 9,101,108,115,101, 32,123, 10, 9, 9,115, 32, 61, 32, 48, 46, 48, 59, 10, 9, 9,104, 32, 61, 32, 48, 46, 48, 59, 10, 9,125,
- 10, 10, 9,105,102, 32, 40,115, 32, 61, 61, 32, 48, 46, 48, 41, 32,123, 10, 9, 9,104, 32, 61, 32, 48, 46, 48, 59, 10, 9,125,
- 10, 9,101,108,115,101, 32,123, 10, 9, 9, 99, 32, 61, 32, 40,118,101, 99, 51, 40, 99,109, 97,120, 44, 32, 99,109, 97,120, 44,
- 32, 99,109, 97,120, 41, 32, 45, 32,114,103, 98, 46,120,121,122, 41, 47, 99,100,101,108,116, 97, 59, 10, 10, 9, 9,105,102, 32,
- 40,114,103, 98, 46,120, 61, 61, 99,109, 97,120, 41, 32,104, 32, 61, 32, 99, 91, 50, 93, 32, 45, 32, 99, 91, 49, 93, 59, 10, 9,
- 9,101,108,115,101, 32,105,102, 32, 40,114,103, 98, 46,121, 61, 61, 99,109, 97,120, 41, 32,104, 32, 61, 32, 50, 46, 48, 32, 43,
- 32, 99, 91, 48, 93, 32, 45, 32, 32, 99, 91, 50, 93, 59, 10, 9, 9,101,108,115,101, 32,104, 32, 61, 32, 52, 46, 48, 32, 43, 32,
- 99, 91, 49, 93, 32, 45, 32, 99, 91, 48, 93, 59, 10, 10, 9, 9,104, 32, 47, 61, 32, 54, 46, 48, 59, 10, 10, 9, 9,105,102, 32,
- 40,104, 60, 48, 46, 48, 41, 10, 9, 9, 9,104, 32, 43, 61, 32, 49, 46, 48, 59, 10, 9,125, 10, 10, 9,111,117,116, 99,111,108,
- 32, 61, 32,118,101, 99, 52, 40,104, 44, 32,115, 44, 32,118, 44, 32,114,103, 98, 46,119, 41, 59, 10,125, 10, 10,118,111,105,100,
- 32,104,115,118, 95,116,111, 95,114,103, 98, 40,118,101, 99, 52, 32,104,115,118, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,
-117,116, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,105, 44, 32,102, 44, 32,112, 44, 32,113, 44, 32,116, 44, 32,104,
- 44, 32,115, 44, 32,118, 59, 10, 9,118,101, 99, 51, 32,114,103, 98, 59, 10, 10, 9,104, 32, 61, 32,104,115,118, 91, 48, 93, 59,
- 10, 9,115, 32, 61, 32,104,115,118, 91, 49, 93, 59, 10, 9,118, 32, 61, 32,104,115,118, 91, 50, 93, 59, 10, 10, 9,105,102, 40,
-115, 61, 61, 48, 46, 48, 41, 32,123, 10, 9, 9,114,103, 98, 32, 61, 32,118,101, 99, 51, 40,118, 44, 32,118, 44, 32,118, 41, 59,
- 10, 9,125, 10, 9,101,108,115,101, 32,123, 10, 9, 9,105,102, 40,104, 61, 61, 49, 46, 48, 41, 10, 9, 9, 9,104, 32, 61, 32,
- 48, 46, 48, 59, 10, 9, 9, 10, 9, 9,104, 32, 42, 61, 32, 54, 46, 48, 59, 10, 9, 9,105, 32, 61, 32,102,108,111,111,114, 40,
-104, 41, 59, 10, 9, 9,102, 32, 61, 32,104, 32, 45, 32,105, 59, 10, 9, 9,114,103, 98, 32, 61, 32,118,101, 99, 51, 40,102, 44,
- 32,102, 44, 32,102, 41, 59, 10, 9, 9,112, 32, 61, 32,118, 42, 40, 49, 46, 48, 45,115, 41, 59, 10, 9, 9,113, 32, 61, 32,118,
- 42, 40, 49, 46, 48, 45, 40,115, 42,102, 41, 41, 59, 10, 9, 9,116, 32, 61, 32,118, 42, 40, 49, 46, 48, 45, 40,115, 42, 40, 49,
- 46, 48, 45,102, 41, 41, 41, 59, 10, 9, 9, 10, 9, 9,105,102, 32, 40,105, 32, 61, 61, 32, 48, 46, 48, 41, 32,114,103, 98, 32,
- 61, 32,118,101, 99, 51, 40,118, 44, 32,116, 44, 32,112, 41, 59, 10, 9, 9,101,108,115,101, 32,105,102, 32, 40,105, 32, 61, 61,
- 32, 49, 46, 48, 41, 32,114,103, 98, 32, 61, 32,118,101, 99, 51, 40,113, 44, 32,118, 44, 32,112, 41, 59, 10, 9, 9,101,108,115,
-101, 32,105,102, 32, 40,105, 32, 61, 61, 32, 50, 46, 48, 41, 32,114,103, 98, 32, 61, 32,118,101, 99, 51, 40,112, 44, 32,118, 44,
- 32,116, 41, 59, 10, 9, 9,101,108,115,101, 32,105,102, 32, 40,105, 32, 61, 61, 32, 51, 46, 48, 41, 32,114,103, 98, 32, 61, 32,
-118,101, 99, 51, 40,112, 44, 32,113, 44, 32,118, 41, 59, 10, 9, 9,101,108,115,101, 32,105,102, 32, 40,105, 32, 61, 61, 32, 52,
- 46, 48, 41, 32,114,103, 98, 32, 61, 32,118,101, 99, 51, 40,116, 44, 32,112, 44, 32,118, 41, 59, 10, 9, 9,101,108,115,101, 32,
-114,103, 98, 32, 61, 32,118,101, 99, 51, 40,118, 44, 32,112, 44, 32,113, 41, 59, 10, 9,125, 10, 10, 9,111,117,116, 99,111,108,
- 32, 61, 32,118,101, 99, 52, 40,114,103, 98, 44, 32,104,115,118, 46,119, 41, 59, 10,125, 10, 10,102,108,111, 97,116, 32,115,114,
-103, 98, 95,116,111, 95,108,105,110,101, 97,114,114,103, 98, 40,102,108,111, 97,116, 32, 99, 41, 10,123, 10, 9,105,102, 40, 99,
- 32, 60, 32, 48, 46, 48, 52, 48, 52, 53, 41, 10, 9, 9,114,101,116,117,114,110, 32, 40, 99, 32, 60, 32, 48, 46, 48, 41, 63, 32,
- 48, 46, 48, 58, 32, 99, 32, 42, 32, 40, 49, 46, 48, 47, 49, 50, 46, 57, 50, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,114,101,
-116,117,114,110, 32,112,111,119, 40, 40, 99, 32, 43, 32, 48, 46, 48, 53, 53, 41, 42, 40, 49, 46, 48, 47, 49, 46, 48, 53, 53, 41,
- 44, 32, 50, 46, 52, 41, 59, 10,125, 10, 10,102,108,111, 97,116, 32,108,105,110,101, 97,114,114,103, 98, 95,116,111, 95,115,114,
-103, 98, 40,102,108,111, 97,116, 32, 99, 41, 10,123, 10, 9,105,102, 40, 99, 32, 60, 32, 48, 46, 48, 48, 51, 49, 51, 48, 56, 41,
- 10, 9, 9,114,101,116,117,114,110, 32, 40, 99, 32, 60, 32, 48, 46, 48, 41, 63, 32, 48, 46, 48, 58, 32, 99, 32, 42, 32, 49, 50,
- 46, 57, 50, 59, 10, 9,101,108,115,101, 10, 9, 9,114,101,116,117,114,110, 32, 49, 46, 48, 53, 53, 32, 42, 32,112,111,119, 40,
- 99, 44, 32, 49, 46, 48, 47, 50, 46, 52, 41, 32, 45, 32, 48, 46, 48, 53, 53, 59, 10,125, 10, 10,118,111,105,100, 32,115,114,103,
- 98, 95,116,111, 95,108,105,110,101, 97,114,114,103, 98, 40,118,101, 99, 52, 32, 99,111,108, 95,102,114,111,109, 44, 32,111,117,
-116, 32,118,101, 99, 52, 32, 99,111,108, 95,116,111, 41, 10,123, 10, 9, 99,111,108, 95,116,111, 46,114, 32, 61, 32,115,114,103,
- 98, 95,116,111, 95,108,105,110,101, 97,114,114,103, 98, 40, 99,111,108, 95,102,114,111,109, 46,114, 41, 59, 10, 9, 99,111,108,
- 95,116,111, 46,103, 32, 61, 32,115,114,103, 98, 95,116,111, 95,108,105,110,101, 97,114,114,103, 98, 40, 99,111,108, 95,102,114,
-111,109, 46,103, 41, 59, 10, 9, 99,111,108, 95,116,111, 46, 98, 32, 61, 32,115,114,103, 98, 95,116,111, 95,108,105,110,101, 97,
-114,114,103, 98, 40, 99,111,108, 95,102,114,111,109, 46, 98, 41, 59, 10, 9, 99,111,108, 95,116,111, 46, 97, 32, 61, 32, 99,111,
-108, 95,102,114,111,109, 46, 97, 59, 10,125, 10, 10,118,111,105,100, 32,108,105,110,101, 97,114,114,103, 98, 95,116,111, 95,115,
-114,103, 98, 40,118,101, 99, 52, 32, 99,111,108, 95,102,114,111,109, 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,108, 95,
-116,111, 41, 10,123, 10, 9, 99,111,108, 95,116,111, 46,114, 32, 61, 32,108,105,110,101, 97,114,114,103, 98, 95,116,111, 95,115,
-114,103, 98, 40, 99,111,108, 95,102,114,111,109, 46,114, 41, 59, 10, 9, 99,111,108, 95,116,111, 46,103, 32, 61, 32,108,105,110,
-101, 97,114,114,103, 98, 95,116,111, 95,115,114,103, 98, 40, 99,111,108, 95,102,114,111,109, 46,103, 41, 59, 10, 9, 99,111,108,
- 95,116,111, 46, 98, 32, 61, 32,108,105,110,101, 97,114,114,103, 98, 95,116,111, 95,115,114,103, 98, 40, 99,111,108, 95,102,114,
-111,109, 46, 98, 41, 59, 10, 9, 99,111,108, 95,116,111, 46, 97, 32, 61, 32, 99,111,108, 95,102,114,111,109, 46, 97, 59, 10,125,
- 10, 10, 35,100,101,102,105,110,101, 32, 77, 95, 80, 73, 32, 51, 46, 49, 52, 49, 53, 57, 50, 54, 53, 51, 53, 56, 57, 55, 57, 51,
- 50, 51, 56, 52, 54, 10, 35,100,101,102,105,110,101, 32, 77, 95, 49, 95, 80, 73, 32, 48, 46, 51, 49, 56, 51, 48, 57, 56, 56, 54,
- 49, 56, 51, 55, 57, 48, 54, 57, 10, 10, 47, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 32, 83, 72, 65, 68, 69, 82, 32, 78, 79,
- 68, 69, 83, 32, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 47, 10, 10,118,111,105,100, 32,118, 99,111,108, 95,
- 97,116,116,114,105, 98,117,116,101, 40,118,101, 99, 52, 32, 97,116,116,118, 99,111,108, 44, 32,111,117,116, 32,118,101, 99, 52,
- 32,118, 99,111,108, 41, 10,123, 10, 9,118, 99,111,108, 32, 61, 32,118,101, 99, 52, 40, 97,116,116,118, 99,111,108, 46,120, 47,
- 50, 53, 53, 46, 48, 44, 32, 97,116,116,118, 99,111,108, 46,121, 47, 50, 53, 53, 46, 48, 44, 32, 97,116,116,118, 99,111,108, 46,
-122, 47, 50, 53, 53, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,117,118, 95, 97,116,116,114,105, 98,
-117,116,101, 40,118,101, 99, 50, 32, 97,116,116,117,118, 44, 32,111,117,116, 32,118,101, 99, 51, 32,117,118, 41, 10,123, 10, 9,
-117,118, 32, 61, 32,118,101, 99, 51, 40, 97,116,116,117,118, 42, 50, 46, 48, 32, 45, 32,118,101, 99, 50, 40, 49, 46, 48, 44, 32,
- 49, 46, 48, 41, 44, 32, 48, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,103,101,111,109, 40,118,101, 99, 51, 32, 99,111,
- 44, 32,118,101, 99, 51, 32,110,111,114, 44, 32,109, 97,116, 52, 32,118,105,101,119,105,110,118,109, 97,116, 44, 32,118,101, 99,
- 51, 32, 97,116,116,111,114, 99,111, 44, 32,118,101, 99, 50, 32, 97,116,116,117,118, 44, 32,118,101, 99, 52, 32, 97,116,116,118,
- 99,111,108, 44, 32,111,117,116, 32,118,101, 99, 51, 32,103,108,111, 98, 97,108, 44, 32,111,117,116, 32,118,101, 99, 51, 32,108,
-111, 99, 97,108, 44, 32,111,117,116, 32,118,101, 99, 51, 32,118,105,101,119, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,114,
- 99,111, 44, 32,111,117,116, 32,118,101, 99, 51, 32,117,118, 44, 32,111,117,116, 32,118,101, 99, 51, 32,110,111,114,109, 97,108,
- 44, 32,111,117,116, 32,118,101, 99, 52, 32,118, 99,111,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,118, 99,111,108, 95,
- 97,108,112,104, 97, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,102,114,111,110,116, 98, 97, 99,107, 41, 10,123, 10, 9,108,
-111, 99, 97,108, 32, 61, 32, 99,111, 59, 10, 9,118,105,101,119, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40,108,111, 99,
- 97,108, 41, 59, 10, 9,103,108,111, 98, 97,108, 32, 61, 32, 40,118,105,101,119,105,110,118,109, 97,116, 42,118,101, 99, 52, 40,
-108,111, 99, 97,108, 44, 32, 49, 46, 48, 41, 41, 46,120,121,122, 59, 10, 9,111,114, 99,111, 32, 61, 32, 97,116,116,111,114, 99,
-111, 59, 10, 9,117,118, 95, 97,116,116,114,105, 98,117,116,101, 40, 97,116,116,117,118, 44, 32,117,118, 41, 59, 10, 9,110,111,
-114,109, 97,108, 32, 61, 32, 45,110,111,114,109, 97,108,105,122,101, 40,110,111,114, 41, 59, 9, 47, 42, 32, 98,108,101,110,100,
-101,114, 32,114,101,110,100,101,114, 32,110,111,114,109, 97,108, 32,105,115, 32,110,101,103, 97,116,101,100, 32, 42, 47, 10, 9,
-118, 99,111,108, 95, 97,116,116,114,105, 98,117,116,101, 40, 97,116,116,118, 99,111,108, 44, 32,118, 99,111,108, 41, 59, 10, 9,
-118, 99,111,108, 95, 97,108,112,104, 97, 32, 61, 32, 97,116,116,118, 99,111,108, 46, 97, 59, 10, 9,102,114,111,110,116, 98, 97,
- 99,107, 32, 61, 32, 49, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,112,112,105,110,103, 40,118,101, 99, 51, 32,118,
-101, 99, 44, 32,109, 97,116, 52, 32,109, 97,116, 44, 32,118,101, 99, 51, 32,109,105,110,118,101, 99, 44, 32,118,101, 99, 51, 32,
-109, 97,120,118,101, 99, 44, 32,102,108,111, 97,116, 32,100,111,109,105,110, 44, 32,102,108,111, 97,116, 32,100,111,109, 97,120,
- 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,101, 99, 41, 10,123, 10, 9,111,117,116,118,101, 99, 32, 61, 32, 40,
-109, 97,116, 32, 42, 32,118,101, 99, 52, 40,118,101, 99, 44, 32, 49, 46, 48, 41, 41, 46,120,121,122, 59, 10, 9,105,102, 40,100,
-111,109,105,110, 32, 61, 61, 32, 49, 46, 48, 41, 10, 9, 9,111,117,116,118,101, 99, 32, 61, 32,109, 97,120, 40,111,117,116,118,
-101, 99, 44, 32,109,105,110,118,101, 99, 41, 59, 10, 9,105,102, 40,100,111,109, 97,120, 32, 61, 61, 32, 49, 46, 48, 41, 10, 9,
- 9,111,117,116,118,101, 99, 32, 61, 32,109,105,110, 40,111,117,116,118,101, 99, 44, 32,109, 97,120,118,101, 99, 41, 59, 10,125,
- 10, 10,118,111,105,100, 32, 99, 97,109,101,114, 97, 40,118,101, 99, 51, 32, 99,111, 44, 32,111,117,116, 32,118,101, 99, 51, 32,
-111,117,116,118,105,101,119, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,100,101,112,116,104, 44, 32,111,117,116,
- 32,102,108,111, 97,116, 32,111,117,116,100,105,115,116, 41, 10,123, 10, 9,111,117,116,100,101,112,116,104, 32, 61, 32, 97, 98,
-115, 40, 99,111, 46,122, 41, 59, 10, 9,111,117,116,100,105,115,116, 32, 61, 32,108,101,110,103,116,104, 40, 99,111, 41, 59, 10,
- 9,111,117,116,118,105,101,119, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40, 99,111, 41, 59, 10,125, 10, 10,118,111,105,
-100, 32,109, 97,116,104, 95, 97,100,100, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,108,
- 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61,
- 32,118, 97,108, 49, 32, 43, 32,118, 97,108, 50, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,115,117, 98,116,114,
- 97, 99,116, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,
-102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,118, 97,108, 49, 32, 45,
- 32,118, 97,108, 50, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,109,117,108,116,105,112,108,121, 40,102,108,111,
- 97,116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,
-117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,118, 97,108, 49, 32, 42, 32,118, 97,108, 50, 59, 10,
-125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,100,105,118,105,100,101, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,
-102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10,
- 9,105,102, 32, 40,118, 97,108, 50, 32, 61, 61, 32, 48, 46, 48, 41, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 48, 46, 48,
- 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32,118, 97,108, 49, 32, 47, 32,118, 97,108, 50, 59, 10,
-125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,115,105,110,101, 40,102,108,111, 97,116, 32,118, 97,108, 44, 32,111,117,116,
- 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,115,105,110, 40,118,
- 97,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95, 99,111,115,105,110,101, 40,102,108,111, 97,116, 32,118,
- 97,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32,
- 61, 32, 99,111,115, 40,118, 97,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,116, 97,110,103,101,110,116,
- 40,102,108,111, 97,116, 32,118, 97,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10,
- 9,111,117,116,118, 97,108, 32, 61, 32,116, 97,110, 40,118, 97,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104,
- 95, 97,115,105,110, 40,102,108,111, 97,116, 32,118, 97,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,
-108, 41, 10,123, 10, 9,105,102, 32, 40,118, 97,108, 32, 60, 61, 32, 49, 46, 48, 32, 38, 38, 32,118, 97,108, 32, 62, 61, 32, 45,
- 49, 46, 48, 41, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 97,115,105,110, 40,118, 97,108, 41, 59, 10, 9,101,108,115,101,
- 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95, 97, 99,
-111,115, 40,102,108,111, 97,116, 32,118, 97,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,
-123, 10, 9,105,102, 32, 40,118, 97,108, 32, 60, 61, 32, 49, 46, 48, 32, 38, 38, 32,118, 97,108, 32, 62, 61, 32, 45, 49, 46, 48,
- 41, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 97, 99,111,115, 40,118, 97,108, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,
-111,117,116,118, 97,108, 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95, 97,116, 97,110, 40,
-102,108,111, 97,116, 32,118, 97,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,
-111,117,116,118, 97,108, 32, 61, 32, 97,116, 97,110, 40,118, 97,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104,
- 95,112,111,119, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116,
- 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,105,102, 32, 40,118, 97,108, 49, 32, 62, 61, 32, 48, 46,
- 48, 41, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32,112,111,119, 40,118, 97,108, 49, 44, 32,118, 97,108, 50, 41, 59, 10, 9,
-101,108,115,101, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,
-104, 95,108,111,103, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,
-116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,105,102, 40,118, 97,108, 49, 32, 62, 32, 48, 46, 48,
- 32, 32, 38, 38, 32,118, 97,108, 50, 32, 62, 32, 48, 46, 48, 41, 10, 9, 9,111,117,116,118, 97,108, 61, 32,108,111,103, 50, 40,
-118, 97,108, 49, 41, 32, 47, 32,108,111,103, 50, 40,118, 97,108, 50, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116,118,
- 97,108, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,109, 97,120, 40,102,108,111, 97,116, 32,
-118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118,
- 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,109, 97,120, 40,118, 97,108, 49, 44, 32,118, 97,108, 50, 41, 59,
- 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,109,105,110, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,
-111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,
-117,116,118, 97,108, 32, 61, 32,109,105,110, 40,118, 97,108, 49, 44, 32,118, 97,108, 50, 41, 59, 10,125, 10, 10,118,111,105,100,
- 32,109, 97,116,104, 95,114,111,117,110,100, 40,102,108,111, 97,116, 32,118, 97,108, 44, 32,111,117,116, 32,102,108,111, 97,116,
- 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 61, 32,102,108,111,111,114, 40,118, 97,108, 32, 43, 32,
- 48, 46, 53, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,108,101,115,115, 95,116,104, 97,110, 40,102,108,111,
- 97,116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,
-117,116,118, 97,108, 41, 10,123, 10, 9,105,102, 40,118, 97,108, 49, 32, 60, 32,118, 97,108, 50, 41, 10, 9, 9,111,117,116,118,
- 97,108, 32, 61, 32, 49, 46, 48, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 48, 46, 48, 59, 10,
-125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,103,114,101, 97,116,101,114, 95,116,104, 97,110, 40,102,108,111, 97,116, 32,
-118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118,
- 97,108, 41, 10,123, 10, 9,105,102, 40,118, 97,108, 49, 32, 62, 32,118, 97,108, 50, 41, 10, 9, 9,111,117,116,118, 97,108, 32,
- 61, 32, 49, 46, 48, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,
-118,111,105,100, 32,115,113,117,101,101,122,101, 40,102,108,111, 97,116, 32,118, 97,108, 44, 32,102,108,111, 97,116, 32,119,105,
-100,116,104, 44, 32,102,108,111, 97,116, 32, 99,101,110,116,101,114, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,
-118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32, 49, 46, 48, 47, 40, 49, 46, 48, 32, 43, 32,112,111,119, 40,
- 50, 46, 55, 49, 56, 50, 56, 49, 56, 51, 44, 32, 45, 40, 40,118, 97,108, 45, 99,101,110,116,101,114, 41, 42,119,105,100,116,104,
- 41, 41, 41, 59, 10,125, 10, 10,118,111,105,100, 32,118,101, 99, 95,109, 97,116,104, 95, 97,100,100, 40,118,101, 99, 51, 32,118,
- 49, 44, 32,118,101, 99, 51, 32,118, 50, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,101, 99, 44, 32,111,117,116,
- 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118,101, 99, 32, 61, 32,118, 49, 32, 43, 32,
-118, 50, 59, 10, 9,111,117,116,118, 97,108, 32, 61, 32, 40, 97, 98,115, 40,111,117,116,118,101, 99, 91, 48, 93, 41, 32, 43, 32,
- 97, 98,115, 40,111,117,116,118,101, 99, 91, 49, 93, 41, 32, 43, 32, 97, 98,115, 40,111,117,116,118,101, 99, 91, 50, 93, 41, 41,
- 47, 51, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,118,101, 99, 95,109, 97,116,104, 95,115,117, 98, 40,118,101, 99, 51, 32,
-118, 49, 44, 32,118,101, 99, 51, 32,118, 50, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,101, 99, 44, 32,111,117,
-116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118,101, 99, 32, 61, 32,118, 49, 32, 45,
- 32,118, 50, 59, 10, 9,111,117,116,118, 97,108, 32, 61, 32, 40, 97, 98,115, 40,111,117,116,118,101, 99, 91, 48, 93, 41, 32, 43,
- 32, 97, 98,115, 40,111,117,116,118,101, 99, 91, 49, 93, 41, 32, 43, 32, 97, 98,115, 40,111,117,116,118,101, 99, 91, 50, 93, 41,
- 41, 47, 51, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,118,101, 99, 95,109, 97,116,104, 95, 97,118,101,114, 97,103,101, 40,
-118,101, 99, 51, 32,118, 49, 44, 32,118,101, 99, 51, 32,118, 50, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,101,
- 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118,101, 99, 32, 61,
- 32,118, 49, 32, 43, 32,118, 50, 59, 10, 9,111,117,116,118, 97,108, 32, 61, 32,108,101,110,103,116,104, 40,111,117,116,118,101,
- 99, 41, 59, 10, 9,111,117,116,118,101, 99, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40,111,117,116,118,101, 99, 41, 59,
- 10,125, 10, 10,118,111,105,100, 32,118,101, 99, 95,109, 97,116,104, 95,100,111,116, 40,118,101, 99, 51, 32,118, 49, 44, 32,118,
-101, 99, 51, 32,118, 50, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,101, 99, 44, 32,111,117,116, 32,102,108,111,
- 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118,101, 99, 32, 61, 32,118,101, 99, 51, 40, 48, 44, 32, 48,
- 44, 32, 48, 41, 59, 10, 9,111,117,116,118, 97,108, 32, 61, 32,100,111,116, 40,118, 49, 44, 32,118, 50, 41, 59, 10,125, 10, 10,
-118,111,105,100, 32,118,101, 99, 95,109, 97,116,104, 95, 99,114,111,115,115, 40,118,101, 99, 51, 32,118, 49, 44, 32,118,101, 99,
- 51, 32,118, 50, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,101, 99, 44, 32,111,117,116, 32,102,108,111, 97,116,
- 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118,101, 99, 32, 61, 32, 99,114,111,115,115, 40,118, 49, 44, 32,118,
- 50, 41, 59, 10, 9,111,117,116,118, 97,108, 32, 61, 32,108,101,110,103,116,104, 40,111,117,116,118,101, 99, 41, 59, 10,125, 10,
- 10,118,111,105,100, 32,118,101, 99, 95,109, 97,116,104, 95,110,111,114,109, 97,108,105,122,101, 40,118,101, 99, 51, 32,118, 44,
- 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,101, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118,
- 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,108,101,110,103,116,104, 40,118, 41, 59, 10, 9,111,117,116,118,
-101, 99, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40,118, 41, 59, 10,125, 10, 10,118,111,105,100, 32,118,101, 99, 95,109,
- 97,116,104, 95,110,101,103, 97,116,101, 40,118,101, 99, 51, 32,118, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,
- 41, 10,123, 10, 9,111,117,116,118, 32, 61, 32, 45,118, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,114,109, 97,108, 40,118,
-101, 99, 51, 32,100,105,114, 44, 32,118,101, 99, 51, 32,110,111,114, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,110,
-111,114, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,100,111,116, 41, 10,123, 10, 9,111,117,116,110,111,114, 32,
- 61, 32,110,111,114, 59, 10, 9,111,117,116,100,111,116, 32, 61, 32, 45,100,111,116, 40,100,105,114, 44, 32,110,111,114, 41, 59,
- 10,125, 10, 10,118,111,105,100, 32, 99,117,114,118,101,115, 95,118,101, 99, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,
-101, 99, 51, 32,118,101, 99, 44, 32,115, 97,109,112,108,101,114, 50, 68, 32, 99,117,114,118,101,109, 97,112, 44, 32,111,117,116,
- 32,118,101, 99, 51, 32,111,117,116,118,101, 99, 41, 10,123, 10, 9,111,117,116,118,101, 99, 46,120, 32, 61, 32,116,101,120,116,
-117,114,101, 50, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,118,101, 99, 50, 40, 40,118,101, 99, 46,120, 32, 43, 32, 49, 46,
- 48, 41, 42, 48, 46, 53, 44, 32, 48, 46, 48, 41, 41, 46,120, 59, 10, 9,111,117,116,118,101, 99, 46,121, 32, 61, 32,116,101,120,
-116,117,114,101, 50, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,118,101, 99, 50, 40, 40,118,101, 99, 46,121, 32, 43, 32, 49,
- 46, 48, 41, 42, 48, 46, 53, 44, 32, 48, 46, 48, 41, 41, 46,121, 59, 10, 9,111,117,116,118,101, 99, 46,122, 32, 61, 32,116,101,
-120,116,117,114,101, 50, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,118,101, 99, 50, 40, 40,118,101, 99, 46,122, 32, 43, 32,
- 49, 46, 48, 41, 42, 48, 46, 53, 44, 32, 48, 46, 48, 41, 41, 46,122, 59, 10, 10, 9,105,102, 32, 40,102, 97, 99, 32, 33, 61, 32,
- 49, 46, 48, 41, 10, 9, 9,111,117,116,118,101, 99, 32, 61, 32, 40,111,117,116,118,101, 99, 42,102, 97, 99, 41, 32, 43, 32, 40,
-118,101, 99, 42, 40, 49, 46, 48, 45,102, 97, 99, 41, 41, 59, 10, 10,125, 10, 10,118,111,105,100, 32, 99,117,114,118,101,115, 95,
-114,103, 98, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 44, 32,115, 97,109,112,108,101,114,
- 50, 68, 32, 99,117,114,118,101,109, 97,112, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10,
- 9,111,117,116, 99,111,108, 46,114, 32, 61, 32,116,101,120,116,117,114,101, 50, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,
-118,101, 99, 50, 40,116,101,120,116,117,114,101, 50, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,118,101, 99, 50, 40, 99,111,
-108, 46,114, 44, 32, 48, 46, 48, 41, 41, 46, 97, 44, 32, 48, 46, 48, 41, 41, 46,114, 59, 10, 9,111,117,116, 99,111,108, 46,103,
- 32, 61, 32,116,101,120,116,117,114,101, 50, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,118,101, 99, 50, 40,116,101,120,116,
-117,114,101, 50, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,118,101, 99, 50, 40, 99,111,108, 46,103, 44, 32, 48, 46, 48, 41,
- 41, 46, 97, 44, 32, 48, 46, 48, 41, 41, 46,103, 59, 10, 9,111,117,116, 99,111,108, 46, 98, 32, 61, 32,116,101,120,116,117,114,
-101, 50, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,118,101, 99, 50, 40,116,101,120,116,117,114,101, 50, 68, 40, 99,117,114,
-118,101,109, 97,112, 44, 32,118,101, 99, 50, 40, 99,111,108, 46, 98, 44, 32, 48, 46, 48, 41, 41, 46, 97, 44, 32, 48, 46, 48, 41,
- 41, 46, 98, 59, 10, 10, 9,105,102, 32, 40,102, 97, 99, 32, 33, 61, 32, 49, 46, 48, 41, 10, 9, 9,111,117,116, 99,111,108, 32,
- 61, 32, 40,111,117,116, 99,111,108, 42,102, 97, 99, 41, 32, 43, 32, 40, 99,111,108, 42, 40, 49, 46, 48, 45,102, 97, 99, 41, 41,
- 59, 10, 10, 9,111,117,116, 99,111,108, 46, 97, 32, 61, 32, 99,111,108, 46, 97, 59, 10,125, 10, 10,118,111,105,100, 32,115,101,
-116, 95,118, 97,108,117,101, 40,102,108,111, 97,116, 32,118, 97,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,
-118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,118, 97,108, 59, 10,125, 10, 10,118,111,105,100, 32,115,101,
-116, 95,114,103, 98, 40,118,101, 99, 51, 32, 99,111,108, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116, 99,111,108, 41,
- 10,123, 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,111,108, 59, 10,125, 10, 10,118,111,105,100, 32,115,101,116, 95,114,103,
- 98, 97, 40,118,101, 99, 52, 32, 99,111,108, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10,
- 9,111,117,116, 99,111,108, 32, 61, 32, 99,111,108, 59, 10,125, 10, 10,118,111,105,100, 32,115,101,116, 95,118, 97,108,117,101,
- 95,122,101,114,111, 40,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,
-108, 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,115,101,116, 95,118, 97,108,117,101, 95,111,110,101, 40,111,
-117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32, 49, 46, 48,
- 59, 10,125, 10, 10,118,111,105,100, 32,115,101,116, 95,114,103, 98, 95,122,101,114,111, 40,111,117,116, 32,118,101, 99, 51, 32,
-111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,118,101, 99, 51, 40, 48, 46, 48, 41, 59, 10,125,
- 10, 10,118,111,105,100, 32,115,101,116, 95,114,103, 98, 97, 95,122,101,114,111, 40,111,117,116, 32,118,101, 99, 52, 32,111,117,
-116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,118,101, 99, 52, 40, 48, 46, 48, 41, 59, 10,125, 10, 10,
-118,111,105,100, 32,109,105,120, 95, 98,108,101,110,100, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,
-111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41,
- 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10,
- 9,111,117,116, 99,111,108, 32, 61, 32,109,105,120, 40, 99,111,108, 49, 44, 32, 99,111,108, 50, 44, 32,102, 97, 99, 41, 59, 10,
- 9,111,117,116, 99,111,108, 46, 97, 32, 61, 32, 99,111,108, 49, 46, 97, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,
- 97,100,100, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,
-111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,
-108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,111,117,116, 99,111,108, 32, 61, 32,109,
-105,120, 40, 99,111,108, 49, 44, 32, 99,111,108, 49, 32, 43, 32, 99,111,108, 50, 44, 32,102, 97, 99, 41, 59, 10, 9,111,117,116,
- 99,111,108, 46, 97, 32, 61, 32, 99,111,108, 49, 46, 97, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,109,117,108,116,
- 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50,
- 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,
-112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,111,117,116, 99,111,108, 32, 61, 32,109,105,120, 40,
- 99,111,108, 49, 44, 32, 99,111,108, 49, 32, 42, 32, 99,111,108, 50, 44, 32,102, 97, 99, 41, 59, 10, 9,111,117,116, 99,111,108,
- 46, 97, 32, 61, 32, 99,111,108, 49, 46, 97, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,115, 99,114,101,101,110, 40,
-102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44,
- 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112,
- 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 32, 61, 32, 49,
- 46, 48, 32, 45, 32,102, 97, 99, 59, 10, 10, 9,111,117,116, 99,111,108, 32, 61, 32,118,101, 99, 52, 40, 49, 46, 48, 41, 32, 45,
- 32, 40,118,101, 99, 52, 40,102, 97, 99,109, 41, 32, 43, 32,102, 97, 99, 42, 40,118,101, 99, 52, 40, 49, 46, 48, 41, 32, 45, 32,
- 99,111,108, 50, 41, 41, 42, 40,118,101, 99, 52, 40, 49, 46, 48, 41, 32, 45, 32, 99,111,108, 49, 41, 59, 10, 9,111,117,116, 99,
-111,108, 46, 97, 32, 61, 32, 99,111,108, 49, 46, 97, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,111,118,101,114,108,
- 97,121, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,
-108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108,
- 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 32,
- 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99, 59, 10, 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,111,108, 49, 59, 10, 10, 9,
-105,102, 40,111,117,116, 99,111,108, 46,114, 32, 60, 32, 48, 46, 53, 41, 10, 9, 9,111,117,116, 99,111,108, 46,114, 32, 42, 61,
- 32,102, 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97, 99, 42, 99,111,108, 50, 46,114, 59, 10, 9,101,108,115,101, 10, 9, 9,
-111,117,116, 99,111,108, 46,114, 32, 61, 32, 49, 46, 48, 32, 45, 32, 40,102, 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97, 99,
- 42, 40, 49, 46, 48, 32, 45, 32, 99,111,108, 50, 46,114, 41, 41, 42, 40, 49, 46, 48, 32, 45, 32,111,117,116, 99,111,108, 46,114,
- 41, 59, 10, 10, 9,105,102, 40,111,117,116, 99,111,108, 46,103, 32, 60, 32, 48, 46, 53, 41, 10, 9, 9,111,117,116, 99,111,108,
- 46,103, 32, 42, 61, 32,102, 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97, 99, 42, 99,111,108, 50, 46,103, 59, 10, 9,101,108,
-115,101, 10, 9, 9,111,117,116, 99,111,108, 46,103, 32, 61, 32, 49, 46, 48, 32, 45, 32, 40,102, 97, 99,109, 32, 43, 32, 50, 46,
- 48, 42,102, 97, 99, 42, 40, 49, 46, 48, 32, 45, 32, 99,111,108, 50, 46,103, 41, 41, 42, 40, 49, 46, 48, 32, 45, 32,111,117,116,
- 99,111,108, 46,103, 41, 59, 10, 10, 9,105,102, 40,111,117,116, 99,111,108, 46, 98, 32, 60, 32, 48, 46, 53, 41, 10, 9, 9,111,
-117,116, 99,111,108, 46, 98, 32, 42, 61, 32,102, 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97, 99, 42, 99,111,108, 50, 46, 98,
- 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116, 99,111,108, 46, 98, 32, 61, 32, 49, 46, 48, 32, 45, 32, 40,102, 97, 99,109,
- 32, 43, 32, 50, 46, 48, 42,102, 97, 99, 42, 40, 49, 46, 48, 32, 45, 32, 99,111,108, 50, 46, 98, 41, 41, 42, 40, 49, 46, 48, 32,
- 45, 32,111,117,116, 99,111,108, 46, 98, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,115,117, 98, 40,102,108,111,
- 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,
-116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97,
- 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,111,117,116, 99,111,108, 32, 61, 32,109,105,120, 40, 99,111,108, 49,
- 44, 32, 99,111,108, 49, 32, 45, 32, 99,111,108, 50, 44, 32,102, 97, 99, 41, 59, 10, 9,111,117,116, 99,111,108, 46, 97, 32, 61,
- 32, 99,111,108, 49, 46, 97, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,100,105,118, 40,102,108,111, 97,116, 32,102,
- 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101,
- 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48,
- 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 32, 45, 32,102, 97,
- 99, 59, 10, 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,111,108, 49, 59, 10, 10, 9,105,102, 40, 99,111,108, 50, 46,114, 32,
- 33, 61, 32, 48, 46, 48, 41, 32,111,117,116, 99,111,108, 46,114, 32, 61, 32,102, 97, 99,109, 42,111,117,116, 99,111,108, 46,114,
- 32, 43, 32,102, 97, 99, 42,111,117,116, 99,111,108, 46,114, 47, 99,111,108, 50, 46,114, 59, 10, 9,105,102, 40, 99,111,108, 50,
- 46,103, 32, 33, 61, 32, 48, 46, 48, 41, 32,111,117,116, 99,111,108, 46,103, 32, 61, 32,102, 97, 99,109, 42,111,117,116, 99,111,
-108, 46,103, 32, 43, 32,102, 97, 99, 42,111,117,116, 99,111,108, 46,103, 47, 99,111,108, 50, 46,103, 59, 10, 9,105,102, 40, 99,
-111,108, 50, 46, 98, 32, 33, 61, 32, 48, 46, 48, 41, 32,111,117,116, 99,111,108, 46, 98, 32, 61, 32,102, 97, 99,109, 42,111,117,
-116, 99,111,108, 46, 98, 32, 43, 32,102, 97, 99, 42,111,117,116, 99,111,108, 46, 98, 47, 99,111,108, 50, 46, 98, 59, 10,125, 10,
- 10,118,111,105,100, 32,109,105,120, 95,100,105,102,102, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,
-111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41,
- 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10,
- 9,111,117,116, 99,111,108, 32, 61, 32,109,105,120, 40, 99,111,108, 49, 44, 32, 97, 98,115, 40, 99,111,108, 49, 32, 45, 32, 99,
-111,108, 50, 41, 44, 32,102, 97, 99, 41, 59, 10, 9,111,117,116, 99,111,108, 46, 97, 32, 61, 32, 99,111,108, 49, 46, 97, 59, 10,
-125, 10, 10,118,111,105,100, 32,109,105,120, 95,100, 97,114,107, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52,
- 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,
-108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41,
- 59, 10, 9,111,117,116, 99,111,108, 46,114,103, 98, 32, 61, 32,109,105,110, 40, 99,111,108, 49, 46,114,103, 98, 44, 32, 99,111,
-108, 50, 46,114,103, 98, 42,102, 97, 99, 41, 59, 10, 9,111,117,116, 99,111,108, 46, 97, 32, 61, 32, 99,111,108, 49, 46, 97, 59,
- 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,108,105,103,104,116, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101,
- 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116,
- 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46,
- 48, 41, 59, 10, 9,111,117,116, 99,111,108, 46,114,103, 98, 32, 61, 32,109, 97,120, 40, 99,111,108, 49, 46,114,103, 98, 44, 32,
- 99,111,108, 50, 46,114,103, 98, 42,102, 97, 99, 41, 59, 10, 9,111,117,116, 99,111,108, 46, 97, 32, 61, 32, 99,111,108, 49, 46,
- 97, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,100,111,100,103,101, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,
-118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,
-117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32,
- 49, 46, 48, 41, 59, 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,111,108, 49, 59, 10, 10, 9,105,102, 40,111,117,116, 99,111,
-108, 46,114, 32, 33, 61, 32, 48, 46, 48, 41, 32,123, 10, 9, 9,102,108,111, 97,116, 32,116,109,112, 32, 61, 32, 49, 46, 48, 32,
- 45, 32,102, 97, 99, 42, 99,111,108, 50, 46,114, 59, 10, 9, 9,105,102, 40,116,109,112, 32, 60, 61, 32, 48, 46, 48, 41, 10, 9,
- 9, 9,111,117,116, 99,111,108, 46,114, 32, 61, 32, 49, 46, 48, 59, 10, 9, 9,101,108,115,101, 32,105,102, 40, 40,116,109,112,
- 32, 61, 32,111,117,116, 99,111,108, 46,114, 47,116,109,112, 41, 32, 62, 32, 49, 46, 48, 41, 10, 9, 9, 9,111,117,116, 99,111,
-108, 46,114, 32, 61, 32, 49, 46, 48, 59, 10, 9, 9,101,108,115,101, 10, 9, 9, 9,111,117,116, 99,111,108, 46,114, 32, 61, 32,
-116,109,112, 59, 10, 9,125, 10, 9,105,102, 40,111,117,116, 99,111,108, 46,103, 32, 33, 61, 32, 48, 46, 48, 41, 32,123, 10, 9,
- 9,102,108,111, 97,116, 32,116,109,112, 32, 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99, 42, 99,111,108, 50, 46,103, 59, 10, 9,
- 9,105,102, 40,116,109,112, 32, 60, 61, 32, 48, 46, 48, 41, 10, 9, 9, 9,111,117,116, 99,111,108, 46,103, 32, 61, 32, 49, 46,
- 48, 59, 10, 9, 9,101,108,115,101, 32,105,102, 40, 40,116,109,112, 32, 61, 32,111,117,116, 99,111,108, 46,103, 47,116,109,112,
- 41, 32, 62, 32, 49, 46, 48, 41, 10, 9, 9, 9,111,117,116, 99,111,108, 46,103, 32, 61, 32, 49, 46, 48, 59, 10, 9, 9,101,108,
-115,101, 10, 9, 9, 9,111,117,116, 99,111,108, 46,103, 32, 61, 32,116,109,112, 59, 10, 9,125, 10, 9,105,102, 40,111,117,116,
- 99,111,108, 46, 98, 32, 33, 61, 32, 48, 46, 48, 41, 32,123, 10, 9, 9,102,108,111, 97,116, 32,116,109,112, 32, 61, 32, 49, 46,
- 48, 32, 45, 32,102, 97, 99, 42, 99,111,108, 50, 46, 98, 59, 10, 9, 9,105,102, 40,116,109,112, 32, 60, 61, 32, 48, 46, 48, 41,
- 10, 9, 9, 9,111,117,116, 99,111,108, 46, 98, 32, 61, 32, 49, 46, 48, 59, 10, 9, 9,101,108,115,101, 32,105,102, 40, 40,116,
-109,112, 32, 61, 32,111,117,116, 99,111,108, 46, 98, 47,116,109,112, 41, 32, 62, 32, 49, 46, 48, 41, 10, 9, 9, 9,111,117,116,
- 99,111,108, 46, 98, 32, 61, 32, 49, 46, 48, 59, 10, 9, 9,101,108,115,101, 10, 9, 9, 9,111,117,116, 99,111,108, 46, 98, 32,
- 61, 32,116,109,112, 59, 10, 9,125, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95, 98,117,114,110, 40,102,108,111, 97,116,
- 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,
-118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44,
- 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,102,108,111, 97,116, 32,116,109,112, 44, 32,102, 97, 99,109, 32, 61, 32, 49,
- 46, 48, 32, 45, 32,102, 97, 99, 59, 10, 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,111,108, 49, 59, 10, 10, 9,116,109,112,
- 32, 61, 32,102, 97, 99,109, 32, 43, 32,102, 97, 99, 42, 99,111,108, 50, 46,114, 59, 10, 9,105,102, 40,116,109,112, 32, 60, 61,
- 32, 48, 46, 48, 41, 10, 9, 9,111,117,116, 99,111,108, 46,114, 32, 61, 32, 48, 46, 48, 59, 10, 9,101,108,115,101, 32,105,102,
- 40, 40,116,109,112, 32, 61, 32, 40, 49, 46, 48, 32, 45, 32, 40, 49, 46, 48, 32, 45, 32,111,117,116, 99,111,108, 46,114, 41, 47,
-116,109,112, 41, 41, 32, 60, 32, 48, 46, 48, 41, 10, 9, 9,111,117,116, 99,111,108, 46,114, 32, 61, 32, 48, 46, 48, 59, 10, 9,
-101,108,115,101, 32,105,102, 40,116,109,112, 32, 62, 32, 49, 46, 48, 41, 10, 9, 9,111,117,116, 99,111,108, 46,114, 32, 61, 32,
- 49, 46, 48, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116, 99,111,108, 46,114, 32, 61, 32,116,109,112, 59, 10, 10, 9,116,
-109,112, 32, 61, 32,102, 97, 99,109, 32, 43, 32,102, 97, 99, 42, 99,111,108, 50, 46,103, 59, 10, 9,105,102, 40,116,109,112, 32,
- 60, 61, 32, 48, 46, 48, 41, 10, 9, 9,111,117,116, 99,111,108, 46,103, 32, 61, 32, 48, 46, 48, 59, 10, 9,101,108,115,101, 32,
-105,102, 40, 40,116,109,112, 32, 61, 32, 40, 49, 46, 48, 32, 45, 32, 40, 49, 46, 48, 32, 45, 32,111,117,116, 99,111,108, 46,103,
- 41, 47,116,109,112, 41, 41, 32, 60, 32, 48, 46, 48, 41, 10, 9, 9,111,117,116, 99,111,108, 46,103, 32, 61, 32, 48, 46, 48, 59,
- 10, 9,101,108,115,101, 32,105,102, 40,116,109,112, 32, 62, 32, 49, 46, 48, 41, 10, 9, 9,111,117,116, 99,111,108, 46,103, 32,
- 61, 32, 49, 46, 48, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116, 99,111,108, 46,103, 32, 61, 32,116,109,112, 59, 10, 10,
- 9,116,109,112, 32, 61, 32,102, 97, 99,109, 32, 43, 32,102, 97, 99, 42, 99,111,108, 50, 46, 98, 59, 10, 9,105,102, 40,116,109,
-112, 32, 60, 61, 32, 48, 46, 48, 41, 10, 9, 9,111,117,116, 99,111,108, 46, 98, 32, 61, 32, 48, 46, 48, 59, 10, 9,101,108,115,
-101, 32,105,102, 40, 40,116,109,112, 32, 61, 32, 40, 49, 46, 48, 32, 45, 32, 40, 49, 46, 48, 32, 45, 32,111,117,116, 99,111,108,
- 46, 98, 41, 47,116,109,112, 41, 41, 32, 60, 32, 48, 46, 48, 41, 10, 9, 9,111,117,116, 99,111,108, 46, 98, 32, 61, 32, 48, 46,
- 48, 59, 10, 9,101,108,115,101, 32,105,102, 40,116,109,112, 32, 62, 32, 49, 46, 48, 41, 10, 9, 9,111,117,116, 99,111,108, 46,
- 98, 32, 61, 32, 49, 46, 48, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116, 99,111,108, 46, 98, 32, 61, 32,116,109,112, 59,
- 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,104,117,101, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52,
- 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,
-108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41,
- 59, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99, 59, 10, 10, 9,111,117,116,
- 99,111,108, 32, 61, 32, 99,111,108, 49, 59, 10, 10, 9,118,101, 99, 52, 32,104,115,118, 44, 32,104,115,118, 50, 44, 32,116,109,
-112, 59, 10, 9,114,103, 98, 95,116,111, 95,104,115,118, 40, 99,111,108, 50, 44, 32,104,115,118, 50, 41, 59, 10, 10, 9,105,102,
- 40,104,115,118, 50, 46,121, 32, 33, 61, 32, 48, 46, 48, 41, 32,123, 10, 9, 9,114,103, 98, 95,116,111, 95,104,115,118, 40,111,
-117,116, 99,111,108, 44, 32,104,115,118, 41, 59, 10, 9, 9,104,115,118, 46,120, 32, 61, 32,104,115,118, 50, 46,120, 59, 10, 9,
- 9,104,115,118, 95,116,111, 95,114,103, 98, 40,104,115,118, 44, 32,116,109,112, 41, 59, 32, 10, 10, 9, 9,111,117,116, 99,111,
-108, 32, 61, 32,109,105,120, 40,111,117,116, 99,111,108, 44, 32,116,109,112, 44, 32,102, 97, 99, 41, 59, 10, 9, 9,111,117,116,
- 99,111,108, 46, 97, 32, 61, 32, 99,111,108, 49, 46, 97, 59, 10, 9,125, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,115,
- 97,116, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,
-108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108,
- 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 32,
- 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99, 59, 10, 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,111,108, 49, 59, 10, 10, 9,
-118,101, 99, 52, 32,104,115,118, 44, 32,104,115,118, 50, 59, 10, 9,114,103, 98, 95,116,111, 95,104,115,118, 40,111,117,116, 99,
-111,108, 44, 32,104,115,118, 41, 59, 10, 10, 9,105,102, 40,104,115,118, 46,121, 32, 33, 61, 32, 48, 46, 48, 41, 32,123, 10, 9,
- 9,114,103, 98, 95,116,111, 95,104,115,118, 40, 99,111,108, 50, 44, 32,104,115,118, 50, 41, 59, 10, 10, 9, 9,104,115,118, 46,
-121, 32, 61, 32,102, 97, 99,109, 42,104,115,118, 46,121, 32, 43, 32,102, 97, 99, 42,104,115,118, 50, 46,121, 59, 10, 9, 9,104,
-115,118, 95,116,111, 95,114,103, 98, 40,104,115,118, 44, 32,111,117,116, 99,111,108, 41, 59, 10, 9,125, 10,125, 10, 10,118,111,
-105,100, 32,109,105,120, 95,118, 97,108, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44,
- 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,
-102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,102,108,111,
- 97,116, 32,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99, 59, 10, 10, 9,118,101, 99, 52, 32,104,115,118, 44,
- 32,104,115,118, 50, 59, 10, 9,114,103, 98, 95,116,111, 95,104,115,118, 40, 99,111,108, 49, 44, 32,104,115,118, 41, 59, 10, 9,
-114,103, 98, 95,116,111, 95,104,115,118, 40, 99,111,108, 50, 44, 32,104,115,118, 50, 41, 59, 10, 10, 9,104,115,118, 46,122, 32,
- 61, 32,102, 97, 99,109, 42,104,115,118, 46,122, 32, 43, 32,102, 97, 99, 42,104,115,118, 50, 46,122, 59, 10, 9,104,115,118, 95,
-116,111, 95,114,103, 98, 40,104,115,118, 44, 32,111,117,116, 99,111,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120,
- 95, 99,111,108,111,114, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99,
- 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32,
- 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,102,108,111, 97,116, 32,102,
- 97, 99,109, 32, 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99, 59, 10, 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,111,108, 49,
- 59, 10, 10, 9,118,101, 99, 52, 32,104,115,118, 44, 32,104,115,118, 50, 44, 32,116,109,112, 59, 10, 9,114,103, 98, 95,116,111,
- 95,104,115,118, 40, 99,111,108, 50, 44, 32,104,115,118, 50, 41, 59, 10, 10, 9,105,102, 40,104,115,118, 50, 46,121, 32, 33, 61,
- 32, 48, 46, 48, 41, 32,123, 10, 9, 9,114,103, 98, 95,116,111, 95,104,115,118, 40,111,117,116, 99,111,108, 44, 32,104,115,118,
- 41, 59, 10, 9, 9,104,115,118, 46,120, 32, 61, 32,104,115,118, 50, 46,120, 59, 10, 9, 9,104,115,118, 46,121, 32, 61, 32,104,
-115,118, 50, 46,121, 59, 10, 9, 9,104,115,118, 95,116,111, 95,114,103, 98, 40,104,115,118, 44, 32,116,109,112, 41, 59, 32, 10,
- 10, 9, 9,111,117,116, 99,111,108, 32, 61, 32,109,105,120, 40,111,117,116, 99,111,108, 44, 32,116,109,112, 44, 32,102, 97, 99,
- 41, 59, 10, 9, 9,111,117,116, 99,111,108, 46, 97, 32, 61, 32, 99,111,108, 49, 46, 97, 59, 10, 9,125, 10,125, 10, 10,118,111,
-105,100, 32,109,105,120, 95,115,111,102,116, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49,
- 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10,
- 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,102,108,
-111, 97,116, 32,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99, 59, 10, 10, 9,118,101, 99, 52, 32,111,110,101,
- 61, 32,118,101, 99, 52, 40, 49, 46, 48, 41, 59, 10, 9,118,101, 99, 52, 32,115, 99,114, 61, 32,111,110,101, 32, 45, 32, 40,111,
-110,101, 32, 45, 32, 99,111,108, 50, 41, 42, 40,111,110,101, 32, 45, 32, 99,111,108, 49, 41, 59, 10, 9,111,117,116, 99,111,108,
- 32, 61, 32,102, 97, 99,109, 42, 99,111,108, 49, 32, 43, 32,102, 97, 99, 42, 40, 40,111,110,101, 32, 45, 32, 99,111,108, 49, 41,
- 42, 99,111,108, 50, 42, 99,111,108, 49, 32, 43, 32, 99,111,108, 49, 42,115, 99,114, 41, 59, 10,125, 10, 10,118,111,105,100, 32,
-109,105,120, 95,108,105,110,101, 97,114, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44,
- 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,
-102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 10, 9,111,117,
-116, 99,111,108, 32, 61, 32, 99,111,108, 49, 59, 10, 10, 9,105,102, 40, 99,111,108, 50, 46,114, 32, 62, 32, 48, 46, 53, 41, 10,
- 9, 9,111,117,116, 99,111,108, 46,114, 61, 32, 99,111,108, 49, 46,114, 32, 43, 32,102, 97, 99, 42, 40, 50, 46, 48, 42, 40, 99,
-111,108, 50, 46,114, 32, 45, 32, 48, 46, 53, 41, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116, 99,111,108, 46,114, 61,
- 32, 99,111,108, 49, 46,114, 32, 43, 32,102, 97, 99, 42, 40, 50, 46, 48, 42, 40, 99,111,108, 50, 46,114, 41, 32, 45, 32, 49, 46,
- 48, 41, 59, 10, 10, 9,105,102, 40, 99,111,108, 50, 46,103, 32, 62, 32, 48, 46, 53, 41, 10, 9, 9,111,117,116, 99,111,108, 46,
-103, 61, 32, 99,111,108, 49, 46,103, 32, 43, 32,102, 97, 99, 42, 40, 50, 46, 48, 42, 40, 99,111,108, 50, 46,103, 32, 45, 32, 48,
- 46, 53, 41, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116, 99,111,108, 46,103, 61, 32, 99,111,108, 49, 46,103, 32, 43,
- 32,102, 97, 99, 42, 40, 50, 46, 48, 42, 40, 99,111,108, 50, 46,103, 41, 32, 45, 32, 49, 46, 48, 41, 59, 10, 10, 9,105,102, 40,
- 99,111,108, 50, 46, 98, 32, 62, 32, 48, 46, 53, 41, 10, 9, 9,111,117,116, 99,111,108, 46, 98, 61, 32, 99,111,108, 49, 46, 98,
- 32, 43, 32,102, 97, 99, 42, 40, 50, 46, 48, 42, 40, 99,111,108, 50, 46, 98, 32, 45, 32, 48, 46, 53, 41, 41, 59, 10, 9,101,108,
-115,101, 10, 9, 9,111,117,116, 99,111,108, 46, 98, 61, 32, 99,111,108, 49, 46, 98, 32, 43, 32,102, 97, 99, 42, 40, 50, 46, 48,
- 42, 40, 99,111,108, 50, 46, 98, 41, 32, 45, 32, 49, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,118, 97,108,116,111,114,
-103, 98, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,115, 97,109,112,108,101,114, 50, 68, 32, 99,111,108,111,114,109, 97,112,
- 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,
- 97,108,112,104, 97, 41, 10,123, 10, 9,111,117,116, 99,111,108, 32, 61, 32,116,101,120,116,117,114,101, 50, 68, 40, 99,111,108,
-111,114,109, 97,112, 44, 32,118,101, 99, 50, 40,102, 97, 99, 44, 32, 48, 46, 48, 41, 41, 59, 10, 9,111,117,116, 97,108,112,104,
- 97, 32, 61, 32,111,117,116, 99,111,108, 46, 97, 59, 10,125, 10, 10,118,111,105,100, 32,114,103, 98,116,111, 98,119, 40,118,101,
- 99, 52, 32, 99,111,108,111,114, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 32, 32, 10,123, 10,
- 9,111,117,116,118, 97,108, 32, 61, 32, 99,111,108,111,114, 46,114, 42, 48, 46, 51, 53, 32, 43, 32, 99,111,108,111,114, 46,103,
- 42, 48, 46, 52, 53, 32, 43, 32, 99,111,108,111,114, 46, 98, 42, 48, 46, 50, 59, 32, 47, 42, 32,107,101,101,112, 32,116,104,101,
-115,101, 32,102, 97, 99,116,111,114,115, 32,105,110, 32,115,121,110, 99, 32,119,105,116,104, 32,116,101,120,116,117,114,101, 46,
-104, 58, 82, 71, 66, 84, 79, 66, 87, 32, 42, 47, 10,125, 10, 10,118,111,105,100, 32,105,110,118,101,114,116, 40,102,108,111, 97,
-116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108,
- 41, 10,123, 10, 9,111,117,116, 99,111,108, 46,120,121,122, 32, 61, 32,109,105,120, 40, 99,111,108, 46,120,121,122, 44, 32,118,
-101, 99, 51, 40, 49, 46, 48, 44, 32, 49, 46, 48, 44, 32, 49, 46, 48, 41, 32, 45, 32, 99,111,108, 46,120,121,122, 44, 32,102, 97,
- 99, 41, 59, 10, 9,111,117,116, 99,111,108, 46,119, 32, 61, 32, 99,111,108, 46,119, 59, 10,125, 10, 10,118,111,105,100, 32,104,
-117,101, 95,115, 97,116, 40,102,108,111, 97,116, 32,104,117,101, 44, 32,102,108,111, 97,116, 32,115, 97,116, 44, 32,102,108,111,
- 97,116, 32,118, 97,108,117,101, 44, 32,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 44, 32,111,
-117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,118,101, 99, 52, 32,104,115,118, 59, 10, 10, 9,114,
-103, 98, 95,116,111, 95,104,115,118, 40, 99,111,108, 44, 32,104,115,118, 41, 59, 10, 10, 9,104,115,118, 91, 48, 93, 32, 43, 61,
- 32, 40,104,117,101, 32, 45, 32, 48, 46, 53, 41, 59, 10, 9,105,102, 40,104,115,118, 91, 48, 93, 62, 49, 46, 48, 41, 32,104,115,
-118, 91, 48, 93, 45, 61, 49, 46, 48, 59, 32,101,108,115,101, 32,105,102, 40,104,115,118, 91, 48, 93, 60, 48, 46, 48, 41, 32,104,
-115,118, 91, 48, 93, 43, 61, 32, 49, 46, 48, 59, 10, 9,104,115,118, 91, 49, 93, 32, 42, 61, 32,115, 97,116, 59, 10, 9,105,102,
- 40,104,115,118, 91, 49, 93, 62, 49, 46, 48, 41, 32,104,115,118, 91, 49, 93, 61, 32, 49, 46, 48, 59, 32,101,108,115,101, 32,105,
-102, 40,104,115,118, 91, 49, 93, 60, 48, 46, 48, 41, 32,104,115,118, 91, 49, 93, 61, 32, 48, 46, 48, 59, 10, 9,104,115,118, 91,
- 50, 93, 32, 42, 61, 32,118, 97,108,117,101, 59, 10, 9,105,102, 40,104,115,118, 91, 50, 93, 62, 49, 46, 48, 41, 32,104,115,118,
- 91, 50, 93, 61, 32, 49, 46, 48, 59, 32,101,108,115,101, 32,105,102, 40,104,115,118, 91, 50, 93, 60, 48, 46, 48, 41, 32,104,115,
-118, 91, 50, 93, 61, 32, 48, 46, 48, 59, 10, 10, 9,104,115,118, 95,116,111, 95,114,103, 98, 40,104,115,118, 44, 32,111,117,116,
- 99,111,108, 41, 59, 10, 10, 9,111,117,116, 99,111,108, 32, 61, 32,109,105,120, 40, 99,111,108, 44, 32,111,117,116, 99,111,108,
- 44, 32,102, 97, 99, 41, 59, 10,125, 10, 10,118,111,105,100, 32,115,101,112, 97,114, 97,116,101, 95,114,103, 98, 40,118,101, 99,
- 52, 32, 99,111,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,114, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,103, 44,
- 32,111,117,116, 32,102,108,111, 97,116, 32, 98, 41, 10,123, 10, 9,114, 32, 61, 32, 99,111,108, 46,114, 59, 10, 9,103, 32, 61,
- 32, 99,111,108, 46,103, 59, 10, 9, 98, 32, 61, 32, 99,111,108, 46, 98, 59, 10,125, 10, 10,118,111,105,100, 32, 99,111,109, 98,
-105,110,101, 95,114,103, 98, 40,102,108,111, 97,116, 32,114, 44, 32,102,108,111, 97,116, 32,103, 44, 32,102,108,111, 97,116, 32,
- 98, 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,108, 41, 10,123, 10, 9, 99,111,108, 32, 61, 32,118,101, 99, 52, 40,114,
- 44, 32,103, 44, 32, 98, 44, 32, 49, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,111,117,116,112,117,116, 95,110,111,100,
-101, 40,118,101, 99, 52, 32,114,103, 98, 44, 32,102,108,111, 97,116, 32, 97,108,112,104, 97, 44, 32,111,117,116, 32,118,101, 99,
- 52, 32,111,117,116,114,103, 98, 41, 10,123, 10, 9,111,117,116,114,103, 98, 32, 61, 32,118,101, 99, 52, 40,114,103, 98, 46,114,
-103, 98, 44, 32, 97,108,112,104, 97, 41, 59, 10,125, 10, 10, 47, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 32, 84, 69, 88, 84,
- 85, 82, 69, 83, 32, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 47, 10, 10,118,111,105,100, 32,116,101,120,116,
-117,114,101, 95,102,108,105,112, 95, 98,108,101,110,100, 40,118,101, 99, 51, 32,118,101, 99, 44, 32,111,117,116, 32,118,101, 99,
- 51, 32,111,117,116,118,101, 99, 41, 10,123, 10, 9,111,117,116,118,101, 99, 32, 61, 32,118,101, 99, 46,121,120,122, 59, 10,125,
- 10, 10,118,111,105,100, 32,116,101,120,116,117,114,101, 95, 98,108,101,110,100, 95,108,105,110, 40,118,101, 99, 51, 32,118,101,
- 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61,
- 32, 40, 49, 46, 48, 43,118,101, 99, 46,120, 41, 47, 50, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,116,101,120,116,117,114,
-101, 95, 98,108,101,110,100, 95,113,117, 97,100, 40,118,101, 99, 51, 32,118,101, 99, 44, 32,111,117,116, 32,102,108,111, 97,116,
- 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,109, 97,120, 40, 40, 49, 46, 48, 43,118,101,
- 99, 46,120, 41, 47, 50, 46, 48, 44, 32, 48, 46, 48, 41, 59, 10, 9,111,117,116,118, 97,108, 32, 42, 61, 32,111,117,116,118, 97,
-108, 59, 10,125, 10, 10,118,111,105,100, 32,116,101,120,116,117,114,101, 95,119,111,111,100, 95,115,105,110, 40,118,101, 99, 51,
- 32,118,101, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,118, 97,108,117,101, 44, 32,111,117,116, 32,118,101, 99, 52, 32,
- 99,111,108,111,114, 44, 32,111,117,116, 32,118,101, 99, 51, 32,110,111,114,109, 97,108, 41, 10,123, 10, 9,102,108,111, 97,116,
- 32, 97, 32, 61, 32,115,113,114,116, 40,118,101, 99, 46,120, 42,118,101, 99, 46,120, 32, 43, 32,118,101, 99, 46,121, 42,118,101,
- 99, 46,121, 32, 43, 32,118,101, 99, 46,122, 42,118,101, 99, 46,122, 41, 42, 50, 48, 46, 48, 59, 10, 9,102,108,111, 97,116, 32,
-119,105, 32, 61, 32, 48, 46, 53, 32, 43, 32, 48, 46, 53, 42,115,105,110, 40, 97, 41, 59, 10, 10, 9,118, 97,108,117,101, 32, 61,
- 32,119,105, 59, 10, 9, 99,111,108,111,114, 32, 61, 32,118,101, 99, 52, 40,119,105, 44, 32,119,105, 44, 32,119,105, 44, 32, 49,
- 46, 48, 41, 59, 10, 9,110,111,114,109, 97,108, 32, 61, 32,118,101, 99, 51, 40, 48, 46, 48, 44, 32, 48, 46, 48, 44, 32, 48, 46,
- 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,116,101,120,116,117,114,101, 95,105,109, 97,103,101, 40,118,101, 99, 51, 32,118,
-101, 99, 44, 32,115, 97,109,112,108,101,114, 50, 68, 32,105,109, 97, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,118, 97,108,
-117,101, 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,108,111,114, 44, 32,111,117,116, 32,118,101, 99, 51, 32,110,111,114,
-109, 97,108, 41, 10,123, 10, 9, 99,111,108,111,114, 32, 61, 32,116,101,120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32, 40,
-118,101, 99, 46,120,121, 32, 43, 32,118,101, 99, 50, 40, 49, 46, 48, 44, 32, 49, 46, 48, 41, 41, 42, 48, 46, 53, 41, 59, 10, 9,
-118, 97,108,117,101, 32, 61, 32, 49, 46, 48, 59, 10, 10, 9,110,111,114,109, 97,108, 46,120, 32, 61, 32, 50, 46, 48, 42, 40, 99,
-111,108,111,114, 46,114, 32, 45, 32, 48, 46, 53, 41, 59, 10, 9,110,111,114,109, 97,108, 46,121, 32, 61, 32, 50, 46, 48, 42, 40,
- 48, 46, 53, 32, 45, 32, 99,111,108,111,114, 46,103, 41, 59, 10, 9,110,111,114,109, 97,108, 46,122, 32, 61, 32, 50, 46, 48, 42,
- 40, 99,111,108,111,114, 46, 98, 32, 45, 32, 48, 46, 53, 41, 59, 10,125, 10, 10, 47, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
- 42, 42, 32, 77, 84, 69, 88, 32, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 47, 10, 10,118,111,105,100,
- 32,116,101,120, 99,111, 95,111,114, 99,111, 40,118,101, 99, 51, 32, 97,116,116,111,114, 99,111, 44, 32,111,117,116, 32,118,101,
- 99, 51, 32,111,114, 99,111, 41, 10,123, 10, 9,111,114, 99,111, 32, 61, 32, 97,116,116,111,114, 99,111, 59, 10,125, 10, 10,118,
-111,105,100, 32,116,101,120, 99,111, 95,117,118, 40,118,101, 99, 50, 32, 97,116,116,117,118, 44, 32,111,117,116, 32,118,101, 99,
- 51, 32,117,118, 41, 10,123, 10, 9, 47, 42, 32,100,105,115, 97, 98,108,101,100, 32,102,111,114, 32,110,111,119, 44, 32,119,111,
-114,107,115, 32,116,111,103,101,116,104,101,114, 32,119,105,116,104, 32,108,101, 97,118,105,110,103, 32,111,117,116, 32,109,116,
-101,120, 95, 50,100, 95,109, 97,112,112,105,110,103, 10, 9, 32, 32, 32,117,118, 32, 61, 32,118,101, 99, 51, 40, 97,116,116,117,
-118, 42, 50, 46, 48, 32, 45, 32,118,101, 99, 50, 40, 49, 46, 48, 44, 32, 49, 46, 48, 41, 44, 32, 48, 46, 48, 41, 59, 32, 42, 47,
- 10, 9,117,118, 32, 61, 32,118,101, 99, 51, 40, 97,116,116,117,118, 44, 32, 48, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100,
- 32,116,101,120, 99,111, 95,110,111,114,109, 40,118,101, 99, 51, 32,110,111,114,109, 97,108, 44, 32,111,117,116, 32,118,101, 99,
- 51, 32,111,117,116,110,111,114,109, 97,108, 41, 10,123, 10, 9, 47, 42, 32, 99,111,114,114,101,115,112,111,110,100,115, 32,116,
-111, 32,115,104,105, 45, 62,111,114,110, 44, 32,119,104,105, 99,104, 32,105,115, 32,110,101,103, 97,116,101,100, 32,115,111, 32,
- 99, 97,110, 99,101,108,115, 10, 9, 32, 32, 32,111,117,116, 32, 98,108,101,110,100,101,114, 32,110,111,114,109, 97,108, 32,110,
-101,103, 97,116,105,111,110, 32, 42, 47, 10, 9,111,117,116,110,111,114,109, 97,108, 32, 61, 32,110,111,114,109, 97,108,105,122,
-101, 40,110,111,114,109, 97,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,116,101,120, 99,111, 95,116, 97,110,103,101,110,116,
- 40,118,101, 99, 52, 32,116, 97,110,103,101,110,116, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,116, 97,110,103,101,
-110,116, 41, 10,123, 10, 9,111,117,116,116, 97,110,103,101,110,116, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40,116, 97,
-110,103,101,110,116, 46,120,121,122, 41, 59, 10,125, 10, 10,118,111,105,100, 32,116,101,120, 99,111, 95,103,108,111, 98, 97,108,
- 40,109, 97,116, 52, 32,118,105,101,119,105,110,118,109, 97,116, 44, 32,118,101, 99, 51, 32, 99,111, 44, 32,111,117,116, 32,118,
-101, 99, 51, 32,103,108,111, 98, 97,108, 41, 10,123, 10, 9,103,108,111, 98, 97,108, 32, 61, 32, 40,118,105,101,119,105,110,118,
-109, 97,116, 42,118,101, 99, 52, 40, 99,111, 44, 32, 49, 46, 48, 41, 41, 46,120,121,122, 59, 10,125, 10, 10,118,111,105,100, 32,
-116,101,120, 99,111, 95,111, 98,106,101, 99,116, 40,109, 97,116, 52, 32,118,105,101,119,105,110,118,109, 97,116, 44, 32,109, 97,
-116, 52, 32,111, 98,105,110,118,109, 97,116, 44, 32,118,101, 99, 51, 32, 99,111, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,
- 98,106,101, 99,116, 41, 10,123, 10, 9,111, 98,106,101, 99,116, 32, 61, 32, 40,111, 98,105,110,118,109, 97,116, 42, 40,118,105,
-101,119,105,110,118,109, 97,116, 42,118,101, 99, 52, 40, 99,111, 44, 32, 49, 46, 48, 41, 41, 41, 46,120,121,122, 59, 10,125, 10,
- 10,118,111,105,100, 32,116,101,120, 99,111, 95,114,101,102,108, 40,118,101, 99, 51, 32,118,110, 44, 32,118,101, 99, 51, 32,118,
-105,101,119, 44, 32,111,117,116, 32,118,101, 99, 51, 32,114,101,102, 41, 10,123, 10, 9,114,101,102, 32, 61, 32,118,105,101,119,
- 32, 45, 32, 50, 46, 48, 42,100,111,116, 40,118,110, 44, 32,118,105,101,119, 41, 42,118,110, 59, 10,125, 10, 10,118,111,105,100,
- 32,115,104, 97,100,101, 95,110,111,114,109, 40,118,101, 99, 51, 32,110,111,114,109, 97,108, 44, 32,111,117,116, 32,118,101, 99,
- 51, 32,111,117,116,110,111,114,109, 97,108, 41, 10,123, 10, 9, 47, 42, 32, 98,108,101,110,100,101,114, 32,114,101,110,100,101,
-114, 32,110,111,114,109, 97,108, 32,105,115, 32,110,101,103, 97,116,101,100, 32, 42, 47, 10, 9,111,117,116,110,111,114,109, 97,
-108, 32, 61, 32, 45,110,111,114,109, 97,108,105,122,101, 40,110,111,114,109, 97,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,
-109,116,101,120, 95,114,103, 98, 95, 98,108,101,110,100, 40,118,101, 99, 51, 32,111,117,116, 99,111,108, 44, 32,118,101, 99, 51,
- 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44,
- 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10,
- 10, 9,102, 97, 99,116, 32, 42, 61, 32,102, 97, 99,103, 59, 10, 9,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 45,102, 97, 99,116,
- 59, 10, 10, 9,105,110, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 32, 43, 32,102, 97, 99,109, 42,111,
-117,116, 99,111,108, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95,109,117,108, 40,118,101, 99, 51,
- 32,111,117,116, 99,111,108, 44, 32,118,101, 99, 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116,
- 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10,
- 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 10, 9,102, 97, 99,116, 32, 42, 61, 32,102, 97, 99,103, 59, 10, 9,102, 97,
- 99,109, 32, 61, 32, 49, 46, 48, 45,102, 97, 99,103, 59, 10, 10, 9,105,110, 99,111,108, 32, 61, 32, 40,102, 97, 99,109, 32, 43,
- 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 41, 42,111,117,116, 99,111,108, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,
-101,120, 95,114,103, 98, 95,115, 99,114,101,101,110, 40,118,101, 99, 51, 32,111,117,116, 99,111,108, 44, 32,118,101, 99, 51, 32,
-116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,
-111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 10,
- 9,102, 97, 99,116, 32, 42, 61, 32,102, 97, 99,103, 59, 10, 9,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 45,102, 97, 99,103, 59,
- 10, 10, 9,105,110, 99,111,108, 32, 61, 32,118,101, 99, 51, 40, 49, 46, 48, 41, 32, 45, 32, 40,118,101, 99, 51, 40,102, 97, 99,
-109, 41, 32, 43, 32,102, 97, 99,116, 42, 40,118,101, 99, 51, 40, 49, 46, 48, 41, 32, 45, 32,116,101,120, 99,111,108, 41, 41, 42,
- 40,118,101, 99, 51, 40, 49, 46, 48, 41, 32, 45, 32,111,117,116, 99,111,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,
-101,120, 95,114,103, 98, 95,111,118,101,114,108, 97,121, 40,118,101, 99, 51, 32,111,117,116, 99,111,108, 44, 32,118,101, 99, 51,
- 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44,
- 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10,
- 10, 9,102, 97, 99,116, 32, 42, 61, 32,102, 97, 99,103, 59, 10, 9,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 45,102, 97, 99,103,
- 59, 10, 10, 9,105,102, 40,111,117,116, 99,111,108, 46,114, 32, 60, 32, 48, 46, 53, 41, 10, 9, 9,105,110, 99,111,108, 46,114,
- 32, 61, 32,111,117,116, 99,111,108, 46,114, 42, 40,102, 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97, 99,116, 42,116,101,120,
- 99,111,108, 46,114, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,105,110, 99,111,108, 46,114, 32, 61, 32, 49, 46, 48, 32, 45, 32,
- 40,102, 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97, 99,116, 42, 40, 49, 46, 48, 32, 45, 32,116,101,120, 99,111,108, 46,114,
- 41, 41, 42, 40, 49, 46, 48, 32, 45, 32,111,117,116, 99,111,108, 46,114, 41, 59, 10, 10, 9,105,102, 40,111,117,116, 99,111,108,
- 46,103, 32, 60, 32, 48, 46, 53, 41, 10, 9, 9,105,110, 99,111,108, 46,103, 32, 61, 32,111,117,116, 99,111,108, 46,103, 42, 40,
-102, 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97, 99,116, 42,116,101,120, 99,111,108, 46,103, 41, 59, 10, 9,101,108,115,101,
- 10, 9, 9,105,110, 99,111,108, 46,103, 32, 61, 32, 49, 46, 48, 32, 45, 32, 40,102, 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102,
- 97, 99,116, 42, 40, 49, 46, 48, 32, 45, 32,116,101,120, 99,111,108, 46,103, 41, 41, 42, 40, 49, 46, 48, 32, 45, 32,111,117,116,
- 99,111,108, 46,103, 41, 59, 10, 10, 9,105,102, 40,111,117,116, 99,111,108, 46, 98, 32, 60, 32, 48, 46, 53, 41, 10, 9, 9,105,
-110, 99,111,108, 46, 98, 32, 61, 32,111,117,116, 99,111,108, 46, 98, 42, 40,102, 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97,
- 99,116, 42,116,101,120, 99,111,108, 46, 98, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,105,110, 99,111,108, 46, 98, 32, 61, 32,
- 49, 46, 48, 32, 45, 32, 40,102, 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97, 99,116, 42, 40, 49, 46, 48, 32, 45, 32,116,101,
-120, 99,111,108, 46, 98, 41, 41, 42, 40, 49, 46, 48, 32, 45, 32,111,117,116, 99,111,108, 46, 98, 41, 59, 10,125, 10, 10,118,111,
-105,100, 32,109,116,101,120, 95,114,103, 98, 95,115,117, 98, 40,118,101, 99, 51, 32,111,117,116, 99,111,108, 44, 32,118,101, 99,
- 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103,
- 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,105,110, 99,111,108, 32, 61, 32, 45,102, 97,
- 99,116, 42,102, 97, 99,103, 42,116,101,120, 99,111,108, 32, 43, 32,111,117,116, 99,111,108, 59, 10,125, 10, 10,118,111,105,100,
- 32,109,116,101,120, 95,114,103, 98, 95, 97,100,100, 40,118,101, 99, 51, 32,111,117,116, 99,111,108, 44, 32,118,101, 99, 51, 32,
-116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,
-111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,105,110, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,
-102, 97, 99,103, 42,116,101,120, 99,111,108, 32, 43, 32,111,117,116, 99,111,108, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,
-101,120, 95,114,103, 98, 95,100,105,118, 40,118,101, 99, 51, 32,111,117,116, 99,111,108, 44, 32,118,101, 99, 51, 32,116,101,120,
- 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116,
- 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 10, 9,102, 97,
- 99,116, 32, 42, 61, 32,102, 97, 99,103, 59, 10, 9,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 45,102, 97, 99,116, 59, 10, 10, 9,
-105,102, 40,116,101,120, 99,111,108, 46,114, 32, 33, 61, 32, 48, 46, 48, 41, 32,105,110, 99,111,108, 46,114, 32, 61, 32,102, 97,
- 99,109, 42,111,117,116, 99,111,108, 46,114, 32, 43, 32,102, 97, 99,116, 42,111,117,116, 99,111,108, 46,114, 47,116,101,120, 99,
-111,108, 46,114, 59, 10, 9,105,102, 40,116,101,120, 99,111,108, 46,103, 32, 33, 61, 32, 48, 46, 48, 41, 32,105,110, 99,111,108,
- 46,103, 32, 61, 32,102, 97, 99,109, 42,111,117,116, 99,111,108, 46,103, 32, 43, 32,102, 97, 99,116, 42,111,117,116, 99,111,108,
- 46,103, 47,116,101,120, 99,111,108, 46,103, 59, 10, 9,105,102, 40,116,101,120, 99,111,108, 46, 98, 32, 33, 61, 32, 48, 46, 48,
- 41, 32,105,110, 99,111,108, 46, 98, 32, 61, 32,102, 97, 99,109, 42,111,117,116, 99,111,108, 46, 98, 32, 43, 32,102, 97, 99,116,
- 42,111,117,116, 99,111,108, 46, 98, 47,116,101,120, 99,111,108, 46, 98, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120,
- 95,114,103, 98, 95,100,105,102,102, 40,118,101, 99, 51, 32,111,117,116, 99,111,108, 44, 32,118,101, 99, 51, 32,116,101,120, 99,
-111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,
-118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 10, 9,102, 97, 99,
-116, 32, 42, 61, 32,102, 97, 99,103, 59, 10, 9,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 45,102, 97, 99,116, 59, 10, 10, 9,105,
-110, 99,111,108, 32, 61, 32,102, 97, 99,109, 42,111,117,116, 99,111,108, 32, 43, 32,102, 97, 99,116, 42, 97, 98,115, 40,116,101,
-120, 99,111,108, 32, 45, 32,111,117,116, 99,111,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98,
- 95,100, 97,114,107, 40,118,101, 99, 51, 32,111,117,116, 99,111,108, 44, 32,118,101, 99, 51, 32,116,101,120, 99,111,108, 44, 32,
-102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,118,101, 99, 51,
- 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 44, 32, 99,111,108, 59, 10, 10, 9,102, 97,
- 99,116, 32, 42, 61, 32,102, 97, 99,103, 59, 10, 9,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 45,102, 97, 99,116, 59, 10, 10, 9,
- 99,111,108, 32, 61, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 46,114, 59, 10, 9,105,102, 40, 99,111,108, 32, 60, 32,111,
-117,116, 99,111,108, 46,114, 41, 32,105,110, 99,111,108, 46,114, 32, 61, 32, 99,111,108, 59, 32,101,108,115,101, 32,105,110, 99,
-111,108, 46,114, 32, 61, 32,111,117,116, 99,111,108, 46,114, 59, 10, 9, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,116,101,120,
- 99,111,108, 46,103, 59, 10, 9,105,102, 40, 99,111,108, 32, 60, 32,111,117,116, 99,111,108, 46,103, 41, 32,105,110, 99,111,108,
- 46,103, 32, 61, 32, 99,111,108, 59, 32,101,108,115,101, 32,105,110, 99,111,108, 46,103, 32, 61, 32,111,117,116, 99,111,108, 46,
-103, 59, 10, 9, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 46, 98, 59, 10, 9,105,102, 40, 99,111,108,
- 32, 60, 32,111,117,116, 99,111,108, 46, 98, 41, 32,105,110, 99,111,108, 46, 98, 32, 61, 32, 99,111,108, 59, 32,101,108,115,101,
- 32,105,110, 99,111,108, 46, 98, 32, 61, 32,111,117,116, 99,111,108, 46, 98, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,
-120, 95,114,103, 98, 95,108,105,103,104,116, 40,118,101, 99, 51, 32,111,117,116, 99,111,108, 44, 32,118,101, 99, 51, 32,116,101,
-120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,
-116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 44, 32, 99,111,108,
- 59, 10, 10, 9,102, 97, 99,116, 32, 42, 61, 32,102, 97, 99,103, 59, 10, 9,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 45,102, 97,
- 99,116, 59, 10, 10, 9, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 46,114, 59, 10, 9,105,102, 40, 99,
-111,108, 32, 62, 32,111,117,116, 99,111,108, 46,114, 41, 32,105,110, 99,111,108, 46,114, 32, 61, 32, 99,111,108, 59, 32,101,108,
-115,101, 32,105,110, 99,111,108, 46,114, 32, 61, 32,111,117,116, 99,111,108, 46,114, 59, 10, 9, 99,111,108, 32, 61, 32,102, 97,
- 99,116, 42,116,101,120, 99,111,108, 46,103, 59, 10, 9,105,102, 40, 99,111,108, 32, 62, 32,111,117,116, 99,111,108, 46,103, 41,
- 32,105,110, 99,111,108, 46,103, 32, 61, 32, 99,111,108, 59, 32,101,108,115,101, 32,105,110, 99,111,108, 46,103, 32, 61, 32,111,
-117,116, 99,111,108, 46,103, 59, 10, 9, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 46, 98, 59, 10, 9,
-105,102, 40, 99,111,108, 32, 62, 32,111,117,116, 99,111,108, 46, 98, 41, 32,105,110, 99,111,108, 46, 98, 32, 61, 32, 99,111,108,
- 59, 32,101,108,115,101, 32,105,110, 99,111,108, 46, 98, 32, 61, 32,111,117,116, 99,111,108, 46, 98, 59, 10,125, 10, 10,118,111,
-105,100, 32,109,116,101,120, 95,114,103, 98, 95,104,117,101, 40,118,101, 99, 51, 32,111,117,116, 99,111,108, 44, 32,118,101, 99,
- 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103,
- 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,118,101, 99, 52, 32, 99,111,108, 59, 10, 10,
- 9,109,105,120, 95,104,117,101, 40,102, 97, 99,116, 42,102, 97, 99,103, 44, 32,118,101, 99, 52, 40,111,117,116, 99,111,108, 44,
- 32, 49, 46, 48, 41, 44, 32,118,101, 99, 52, 40,116,101,120, 99,111,108, 44, 32, 49, 46, 48, 41, 44, 32, 99,111,108, 41, 59, 10,
- 9,105,110, 99,111,108, 46,114,103, 98, 32, 61, 32, 99,111,108, 46,114,103, 98, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,
-101,120, 95,114,103, 98, 95,115, 97,116, 40,118,101, 99, 51, 32,111,117,116, 99,111,108, 44, 32,118,101, 99, 51, 32,116,101,120,
- 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116,
- 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,118,101, 99, 52, 32, 99,111,108, 59, 10, 10, 9,109,105,120, 95,
-115, 97,116, 40,102, 97, 99,116, 42,102, 97, 99,103, 44, 32,118,101, 99, 52, 40,111,117,116, 99,111,108, 44, 32, 49, 46, 48, 41,
- 44, 32,118,101, 99, 52, 40,116,101,120, 99,111,108, 44, 32, 49, 46, 48, 41, 44, 32, 99,111,108, 41, 59, 10, 9,105,110, 99,111,
-108, 46,114,103, 98, 32, 61, 32, 99,111,108, 46,114,103, 98, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103,
- 98, 95,118, 97,108, 40,118,101, 99, 51, 32,111,117,116, 99,111,108, 44, 32,118,101, 99, 51, 32,116,101,120, 99,111,108, 44, 32,
-102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,118,101, 99, 51,
- 32,105,110, 99,111,108, 41, 10,123, 10, 9,118,101, 99, 52, 32, 99,111,108, 59, 10, 10, 9,109,105,120, 95,118, 97,108, 40,102,
- 97, 99,116, 42,102, 97, 99,103, 44, 32,118,101, 99, 52, 40,111,117,116, 99,111,108, 44, 32, 49, 46, 48, 41, 44, 32,118,101, 99,
- 52, 40,116,101,120, 99,111,108, 44, 32, 49, 46, 48, 41, 44, 32, 99,111,108, 41, 59, 10, 9,105,110, 99,111,108, 46,114,103, 98,
- 32, 61, 32, 99,111,108, 46,114,103, 98, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95, 99,111,108,
-111,114, 40,118,101, 99, 51, 32,111,117,116, 99,111,108, 44, 32,118,101, 99, 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111,
- 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110,
- 99,111,108, 41, 10,123, 10, 9,118,101, 99, 52, 32, 99,111,108, 59, 10, 10, 9,109,105,120, 95, 99,111,108,111,114, 40,102, 97,
- 99,116, 42,102, 97, 99,103, 44, 32,118,101, 99, 52, 40,111,117,116, 99,111,108, 44, 32, 49, 46, 48, 41, 44, 32,118,101, 99, 52,
- 40,116,101,120, 99,111,108, 44, 32, 49, 46, 48, 41, 44, 32, 99,111,108, 41, 59, 10, 9,105,110, 99,111,108, 46,114,103, 98, 32,
- 61, 32, 99,111,108, 46,114,103, 98, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95,118, 97,
-114,115, 40,105,110,111,117,116, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44,
- 32,111,117,116, 32,102,108,111, 97,116, 32,102, 97, 99,109, 41, 10,123, 10, 9,102, 97, 99,116, 32, 42, 61, 32, 97, 98,115, 40,
-102, 97, 99,103, 41, 59, 10, 9,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 45,102, 97, 99,116, 59, 10, 10, 9,105,102, 40,102, 97,
- 99,103, 32, 60, 32, 48, 46, 48, 41, 32,123, 10, 9, 9,102,108,111, 97,116, 32,116,109,112, 32, 61, 32,102, 97, 99,116, 59, 10,
- 9, 9,102, 97, 99,116, 32, 61, 32,102, 97, 99,109, 59, 10, 9, 9,102, 97, 99,109, 32, 61, 32,116,109,112, 59, 10, 9,125, 10,
-125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95, 98,108,101,110,100, 40,102,108,111, 97,116, 32,111,
-117,116, 99,111,108, 44, 32,102,108,111, 97,116, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44,
- 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,105,110, 99,111,108, 41, 10,123, 10,
- 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 9,109,116,101,120, 95,118, 97,108,117,101, 95,118, 97,114,115, 40,102, 97,
- 99,116, 44, 32,102, 97, 99,103, 44, 32,102, 97, 99,109, 41, 59, 10, 10, 9,105,110, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,
-116,101,120, 99,111,108, 32, 43, 32,102, 97, 99,109, 42,111,117,116, 99,111,108, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,
-101,120, 95,118, 97,108,117,101, 95,109,117,108, 40,102,108,111, 97,116, 32,111,117,116, 99,111,108, 44, 32,102,108,111, 97,116,
- 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44,
- 32,111,117,116, 32,102,108,111, 97,116, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59,
- 10, 9,109,116,101,120, 95,118, 97,108,117,101, 95,118, 97,114,115, 40,102, 97, 99,116, 44, 32,102, 97, 99,103, 44, 32,102, 97,
- 99,109, 41, 59, 10, 10, 9,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99,103, 59, 10, 9,105,110, 99,111,108,
- 32, 61, 32, 40,102, 97, 99,109, 32, 43, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 41, 42,111,117,116, 99,111,108, 59, 10,
-125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95,115, 99,114,101,101,110, 40,102,108,111, 97,116, 32,
-111,117,116, 99,111,108, 44, 32,102,108,111, 97,116, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116,
- 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,105,110, 99,111,108, 41, 10,123,
- 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 9,109,116,101,120, 95,118, 97,108,117,101, 95,118, 97,114,115, 40,102,
- 97, 99,116, 44, 32,102, 97, 99,103, 44, 32,102, 97, 99,109, 41, 59, 10, 10, 9,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 32, 45,
- 32,102, 97, 99,103, 59, 10, 9,105,110, 99,111,108, 32, 61, 32, 49, 46, 48, 32, 45, 32, 40,102, 97, 99,109, 32, 43, 32,102, 97,
- 99,116, 42, 40, 49, 46, 48, 32, 45, 32,116,101,120, 99,111,108, 41, 41, 42, 40, 49, 46, 48, 32, 45, 32,111,117,116, 99,111,108,
- 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95,115,117, 98, 40,102,108,111, 97,116, 32,
-111,117,116, 99,111,108, 44, 32,102,108,111, 97,116, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116,
- 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,105,110, 99,111,108, 41, 10,123,
- 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 9,109,116,101,120, 95,118, 97,108,117,101, 95,118, 97,114,115, 40,102,
- 97, 99,116, 44, 32,102, 97, 99,103, 44, 32,102, 97, 99,109, 41, 59, 10, 10, 9,102, 97, 99,116, 32, 61, 32, 45,102, 97, 99,116,
- 59, 10, 9,105,110, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 32, 43, 32,111,117,116, 99,111,108, 59,
- 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95, 97,100,100, 40,102,108,111, 97,116, 32,111,117,
-116, 99,111,108, 44, 32,102,108,111, 97,116, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,
-102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,105,110, 99,111,108, 41, 10,123, 10, 9,
-102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 9,109,116,101,120, 95,118, 97,108,117,101, 95,118, 97,114,115, 40,102, 97, 99,
-116, 44, 32,102, 97, 99,103, 44, 32,102, 97, 99,109, 41, 59, 10, 10, 9,102, 97, 99,116, 32, 61, 32,102, 97, 99,116, 59, 10, 9,
-105,110, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 32, 43, 32,111,117,116, 99,111,108, 59, 10,125, 10,
- 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95,100,105,118, 40,102,108,111, 97,116, 32,111,117,116, 99,111,
-108, 44, 32,102,108,111, 97,116, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111,
- 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111,
- 97,116, 32,102, 97, 99,109, 59, 10, 9,109,116,101,120, 95,118, 97,108,117,101, 95,118, 97,114,115, 40,102, 97, 99,116, 44, 32,
-102, 97, 99,103, 44, 32,102, 97, 99,109, 41, 59, 10, 10, 9,105,102, 40,116,101,120, 99,111,108, 32, 33, 61, 32, 48, 46, 48, 41,
- 10, 9, 9,105,110, 99,111,108, 32, 61, 32,102, 97, 99,109, 42,111,117,116, 99,111,108, 32, 43, 32,102, 97, 99,116, 42,111,117,
-116, 99,111,108, 47,116,101,120, 99,111,108, 59, 10, 9,101,108,115,101, 10, 9, 9,105,110, 99,111,108, 32, 61, 32, 48, 46, 48,
- 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95,100,105,102,102, 40,102,108,111, 97,116, 32,
-111,117,116, 99,111,108, 44, 32,102,108,111, 97,116, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116,
- 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,105,110, 99,111,108, 41, 10,123,
- 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 9,109,116,101,120, 95,118, 97,108,117,101, 95,118, 97,114,115, 40,102,
- 97, 99,116, 44, 32,102, 97, 99,103, 44, 32,102, 97, 99,109, 41, 59, 10, 10, 9,105,110, 99,111,108, 32, 61, 32,102, 97, 99,109,
- 42,111,117,116, 99,111,108, 32, 43, 32,102, 97, 99,116, 42, 97, 98,115, 40,116,101,120, 99,111,108, 32, 45, 32,111,117,116, 99,
-111,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95,100, 97,114,107, 40,102,108,111,
- 97,116, 32,111,117,116, 99,111,108, 44, 32,102,108,111, 97,116, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102,
- 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,105,110, 99,111,108,
- 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 9,109,116,101,120, 95,118, 97,108,117,101, 95,118, 97,114,
-115, 40,102, 97, 99,116, 44, 32,102, 97, 99,103, 44, 32,102, 97, 99,109, 41, 59, 10, 10, 9,102,108,111, 97,116, 32, 99,111,108,
- 32, 61, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 59, 10, 9,105,102, 40, 99,111,108, 32, 60, 32,111,117,116, 99,111,108,
- 41, 32,105,110, 99,111,108, 32, 61, 32, 99,111,108, 59, 32,101,108,115,101, 32,105,110, 99,111,108, 32, 61, 32,111,117,116, 99,
-111,108, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95,108,105,103,104,116, 40,102,108,111,
- 97,116, 32,111,117,116, 99,111,108, 44, 32,102,108,111, 97,116, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102,
- 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,105,110, 99,111,108,
- 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 9,109,116,101,120, 95,118, 97,108,117,101, 95,118, 97,114,
-115, 40,102, 97, 99,116, 44, 32,102, 97, 99,103, 44, 32,102, 97, 99,109, 41, 59, 10, 10, 9,102,108,111, 97,116, 32, 99,111,108,
- 32, 61, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 59, 10, 9,105,102, 40, 99,111,108, 32, 62, 32,111,117,116, 99,111,108,
- 41, 32,105,110, 99,111,108, 32, 61, 32, 99,111,108, 59, 32,101,108,115,101, 32,105,110, 99,111,108, 32, 61, 32,111,117,116, 99,
-111,108, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95, 99,108, 97,109,112, 95,112,111,115,
-105,116,105,118,101, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,102, 97,
- 99, 41, 10,123, 10, 9,111,117,116,102, 97, 99, 32, 61, 32,109, 97,120, 40,102, 97, 99, 44, 32, 48, 46, 48, 41, 59, 10,125, 10,
- 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95, 99,108, 97,109,112, 40,102,108,111, 97,116, 32,102, 97, 99,
- 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,102, 97, 99, 41, 10,123, 10, 9,111,117,116,102, 97, 99, 32, 61, 32,
- 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,
-101,120, 95,104, 97,114, 95,100,105,118,105,100,101, 40,102,108,111, 97,116, 32,104, 97,114, 44, 32,111,117,116, 32,102,108,111,
- 97,116, 32,111,117,116,104, 97,114, 41, 10,123, 10, 9,111,117,116,104, 97,114, 32, 61, 32,104, 97,114, 47, 49, 50, 56, 46, 48,
- 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,104, 97,114, 95,109,117,108,116,105,112,108,121, 95, 99,108, 97,109,
-112, 40,102,108,111, 97,116, 32,104, 97,114, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,104, 97,114, 41, 10,123,
- 10, 9,104, 97,114, 32, 42, 61, 32, 49, 50, 56, 46, 48, 59, 10, 10, 9,105,102, 40,104, 97,114, 32, 60, 32, 49, 46, 48, 41, 32,
-111,117,116,104, 97,114, 32, 61, 32, 49, 46, 48, 59, 10, 9,101,108,115,101, 32,105,102, 40,104, 97,114, 32, 62, 32, 53, 49, 49,
- 46, 48, 41, 32,111,117,116,104, 97,114, 32, 61, 32, 53, 49, 49, 46, 48, 59, 10, 9,101,108,115,101, 32,111,117,116,104, 97,114,
- 32, 61, 32,104, 97,114, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95, 97,108,112,104, 97, 95,102,114,111,109, 95,
- 99,111,108, 40,118,101, 99, 52, 32, 99,111,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32, 97,108,112,104, 97, 41, 10,123,
- 10, 9, 97,108,112,104, 97, 32, 61, 32, 99,111,108, 46, 97, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95, 97,108,
-112,104, 97, 95,116,111, 95, 99,111,108, 40,118,101, 99, 52, 32, 99,111,108, 44, 32,102,108,111, 97,116, 32, 97,108,112,104, 97,
- 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,111,117,116, 99,111,108, 32, 61, 32,118,
-101, 99, 52, 40, 99,111,108, 46,114,103, 98, 44, 32, 97,108,112,104, 97, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,
-120, 95,114,103, 98,116,111,105,110,116, 40,118,101, 99, 52, 32,114,103, 98, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,105,
-110,116,101,110,115,105,116,121, 41, 10,123, 10, 9,105,110,116,101,110,115,105,116,121, 32, 61, 32,100,111,116, 40,118,101, 99,
- 51, 40, 48, 46, 51, 53, 44, 32, 48, 46, 52, 53, 44, 32, 48, 46, 50, 41, 44, 32,114,103, 98, 46,114,103, 98, 41, 59, 10,125, 10,
- 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95,105,110,118,101,114,116, 40,102,108,111, 97,116, 32,105,110,
-118, 97,108,117,101, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108,117,101, 41, 10,123, 10, 9,111,117,
-116,118, 97,108,117,101, 32, 61, 32, 49, 46, 48, 32, 45, 32,105,110,118, 97,108,117,101, 59, 10,125, 10, 10,118,111,105,100, 32,
-109,116,101,120, 95,114,103, 98, 95,105,110,118,101,114,116, 40,118,101, 99, 52, 32,105,110,114,103, 98, 44, 32,111,117,116, 32,
-118,101, 99, 52, 32,111,117,116,114,103, 98, 41, 10,123, 10, 9,111,117,116,114,103, 98, 32, 61, 32,118,101, 99, 52, 40,118,101,
- 99, 51, 40, 49, 46, 48, 41, 32, 45, 32,105,110,114,103, 98, 46,114,103, 98, 44, 32,105,110,114,103, 98, 46, 97, 41, 59, 10,125,
- 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95,115,116,101,110, 99,105,108, 40,102,108,111, 97,116, 32,
-115,116,101,110, 99,105,108, 44, 32,102,108,111, 97,116, 32,105,110,116,101,110,115,105,116,121, 44, 32,111,117,116, 32,102,108,
-111, 97,116, 32,111,117,116,115,116,101,110, 99,105,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,105,110,116,
-101,110,115,105,116,121, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,116, 32, 61, 32,105,110,116,101,110,115,105,116,
-121, 59, 10, 9,111,117,116,105,110,116,101,110,115,105,116,121, 32, 61, 32,105,110,116,101,110,115,105,116,121, 42,115,116,101,
-110, 99,105,108, 59, 10, 9,111,117,116,115,116,101,110, 99,105,108, 32, 61, 32,115,116,101,110, 99,105,108, 42,102, 97, 99,116,
- 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95,115,116,101,110, 99,105,108, 40,102,108,111, 97,116,
- 32,115,116,101,110, 99,105,108, 44, 32,118,101, 99, 52, 32,114,103, 98, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,
-116,115,116,101,110, 99,105,108, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116,114,103, 98, 41, 10,123, 10, 9,102,108,
-111, 97,116, 32,102, 97, 99,116, 32, 61, 32,114,103, 98, 46, 97, 59, 10, 9,111,117,116,114,103, 98, 32, 61, 32,118,101, 99, 52,
- 40,114,103, 98, 46,114,103, 98, 44, 32,114,103, 98, 46, 97, 42,115,116,101,110, 99,105,108, 41, 59, 10, 9,111,117,116,115,116,
-101,110, 99,105,108, 32, 61, 32,115,116,101,110, 99,105,108, 42,102, 97, 99,116, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,
-101,120, 95,109, 97,112,112,105,110,103, 95,111,102,115, 40,118,101, 99, 51, 32,116,101,120, 99,111, 44, 32,118,101, 99, 51, 32,
-111,102,115, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,116,101,120, 99,111, 41, 10,123, 10, 9,111,117,116,116,101,
-120, 99,111, 32, 61, 32,116,101,120, 99,111, 32, 43, 32,111,102,115, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,
-109, 97,112,112,105,110,103, 95,115,105,122,101, 40,118,101, 99, 51, 32,116,101,120, 99,111, 44, 32,118,101, 99, 51, 32,115,105,
-122,101, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,116,101,120, 99,111, 41, 10,123, 10, 9,111,117,116,116,101,120,
- 99,111, 32, 61, 32,115,105,122,101, 42,116,101,120, 99,111, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95, 50,100,
- 95,109, 97,112,112,105,110,103, 40,118,101, 99, 51, 32,118,101, 99, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,
-101, 99, 41, 10,123, 10, 9,111,117,116,118,101, 99, 32, 61, 32,118,101, 99, 51, 40,118,101, 99, 46,120,121, 42, 48, 46, 53, 32,
- 43, 32,118,101, 99, 50, 40, 48, 46, 53, 44, 32, 48, 46, 53, 41, 44, 32,118,101, 99, 46,122, 41, 59, 10,125, 10, 10,118,111,105,
-100, 32,109,116,101,120, 95,105,109, 97,103,101, 40,118,101, 99, 51, 32,116,101,120, 99,111, 44, 32,115, 97,109,112,108,101,114,
- 50, 68, 32,105,109, 97, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,118, 97,108,117,101, 44, 32,111,117,116, 32,118,101, 99,
- 52, 32, 99,111,108,111,114, 41, 10,123, 10, 9, 99,111,108,111,114, 32, 61, 32,116,101,120,116,117,114,101, 50, 68, 40,105,109,
- 97, 44, 32,116,101,120, 99,111, 46,120,121, 41, 59, 10, 9,118, 97,108,117,101, 32, 61, 32, 49, 46, 48, 59, 10,125, 10, 10,118,
-111,105,100, 32,109,116,101,120, 95,110,111,114,109, 97,108, 40,118,101, 99, 51, 32,116,101,120, 99,111, 44, 32,115, 97,109,112,
-108,101,114, 50, 68, 32,105,109, 97, 44, 32,111,117,116, 32,118,101, 99, 51, 32,110,111,114,109, 97,108, 41, 10,123, 10, 9, 47,
- 47, 32, 84,104,101, 32,105,110,118,101,114,116, 32,111,102, 32,116,104,101, 32,114,101,100, 32, 99,104, 97,110,110,101,108, 32,
-105,115, 32,116,111, 32,109, 97,107,101, 10, 9, 47, 47, 32,116,104,101, 32,110,111,114,109, 97,108, 32,109, 97,112, 32, 99,111,
-109,112,108,105, 97,110,116, 32,119,105,116,104, 32,116,104,101, 32,111,117,116,115,105,100,101, 32,119,111,114,108,100, 46, 10,
- 9, 47, 47, 32, 73,116, 32,110,101,101,100,115, 32,116,111, 32, 98,101, 32,100,111,110,101, 32, 98,101, 99, 97,117,115,101, 32,
-105,110, 32, 66,108,101,110,100,101,114, 10, 9, 47, 47, 32,116,104,101, 32,110,111,114,109, 97,108, 32,117,115,101,100, 32,112,
-111,105,110,116,115, 32,105,110,119, 97,114,100, 46, 10, 9, 47, 47, 32, 83,104,111,117,108,100, 32,116,104,105,115, 32,101,118,
-101,114, 32, 99,104, 97,110,103,101, 32,116,104,105,115, 32,110,101,103, 97,116,101, 32,109,117,115,116, 32, 98,101, 32,114,101,
-109,111,118,101,100, 46, 10, 32, 32, 32, 32,118,101, 99, 52, 32, 99,111,108,111,114, 32, 61, 32,116,101,120,116,117,114,101, 50,
- 68, 40,105,109, 97, 44, 32,116,101,120, 99,111, 46,120,121, 41, 59, 10, 9,110,111,114,109, 97,108, 32, 61, 32, 50, 46, 48, 42,
- 40,118,101, 99, 51, 40, 45, 99,111,108,111,114, 46,114, 44, 32, 99,111,108,111,114, 46,103, 44, 32, 99,111,108,111,114, 46, 98,
- 41, 32, 45, 32,118,101, 99, 51, 40, 45, 48, 46, 53, 44, 32, 48, 46, 53, 44, 32, 48, 46, 53, 41, 41, 59, 10,125, 10, 10,118,111,
-105,100, 32,109,116,101,120, 95, 98,117,109,112, 95,110,111,114,109, 97,108,115, 95,105,110,105,116, 40, 32,118,101, 99, 51, 32,
-118, 78, 44, 32,111,117,116, 32,118,101, 99, 51, 32,118, 78,111,114,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,118, 78, 97,
- 99, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,102, 80,114,101,118, 77, 97,103,110,105,116,117,100,101, 32, 41, 10,123,
- 10, 9,118, 78,111,114,103, 32, 61, 32,118, 78, 59, 10, 9,118, 78, 97, 99, 99, 32, 61, 32,118, 78, 59, 10, 9,102, 80,114,101,
-118, 77, 97,103,110,105,116,117,100,101, 32, 61, 32, 49, 46, 48, 59, 10,125, 10, 10, 47, 42, 42, 32,104,101,108,112,101,114, 32,
-109,101,116,104,111,100, 32,116,111, 32,101,120,116,114, 97, 99,116, 32,116,104,101, 32,117,112,112,101,114, 32,108,101,102,116,
- 32, 51,120, 51, 32,109, 97,116,114,105,120, 32,102,114,111,109, 32, 97, 32, 52,120, 52, 32,109, 97,116,114,105,120, 32, 42, 47,
- 10,109, 97,116, 51, 32,116,111, 95,109, 97,116, 51, 40,109, 97,116, 52, 32,109, 52, 41, 10,123, 10, 9,109, 97,116, 51, 32,109,
- 51, 59, 10, 9,109, 51, 91, 48, 93, 32, 61, 32,109, 52, 91, 48, 93, 46,120,121,122, 59, 10, 9,109, 51, 91, 49, 93, 32, 61, 32,
-109, 52, 91, 49, 93, 46,120,121,122, 59, 10, 9,109, 51, 91, 50, 93, 32, 61, 32,109, 52, 91, 50, 93, 46,120,121,122, 59, 10, 9,
-114,101,116,117,114,110, 32,109, 51, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95, 98,117,109,112, 95,105,110,105,
-116, 95,111, 98,106,115,112, 97, 99,101, 40, 32,118,101, 99, 51, 32,115,117,114,102, 95,112,111,115, 44, 32,118,101, 99, 51, 32,
-115,117,114,102, 95,110,111,114,109, 44, 10, 9, 9, 9, 9, 9, 9, 9, 32, 32,109, 97,116, 52, 32,109, 86,105,101,119, 44, 32,
-109, 97,116, 52, 32,109, 86,105,101,119, 73,110,118, 44, 32,109, 97,116, 52, 32,109, 79, 98,106, 44, 32,109, 97,116, 52, 32,109,
- 79, 98,106, 73,110,118, 44, 32, 10, 9, 9, 9, 9, 9, 9, 9, 32, 32,102,108,111, 97,116, 32,102, 80,114,101,118, 77, 97,103,
-110,105,116,117,100,101, 95,105,110, 44, 32,118,101, 99, 51, 32,118, 78, 97, 99, 99, 95,105,110, 44, 10, 9, 9, 9, 9, 9, 9,
- 9, 32, 32,111,117,116, 32,102,108,111, 97,116, 32,102, 80,114,101,118, 77, 97,103,110,105,116,117,100,101, 95,111,117,116, 44,
- 32,111,117,116, 32,118,101, 99, 51, 32,118, 78, 97, 99, 99, 95,111,117,116, 44, 32, 10, 9, 9, 9, 9, 9, 9, 9, 32, 32,111,
-117,116, 32,118,101, 99, 51, 32,118, 82, 49, 44, 32,111,117,116, 32,118,101, 99, 51, 32,118, 82, 50, 44, 32,111,117,116, 32,102,
-108,111, 97,116, 32,102, 68,101,116, 32, 41, 32, 10,123, 10, 9,109, 97,116, 51, 32,111, 98,106, 50,118,105,101,119, 32, 61, 32,
-116,111, 95,109, 97,116, 51, 40,103,108, 95, 77,111,100,101,108, 86,105,101,119, 77, 97,116,114,105,120, 41, 59, 10, 9,109, 97,
-116, 51, 32,118,105,101,119, 50,111, 98,106, 32, 61, 32,116,111, 95,109, 97,116, 51, 40,103,108, 95, 77,111,100,101,108, 86,105,
-101,119, 77, 97,116,114,105,120, 73,110,118,101,114,115,101, 41, 59, 10, 9, 10, 9,118,101, 99, 51, 32,118, 83,105,103,109, 97,
- 83, 32, 61, 32,118,105,101,119, 50,111, 98,106, 32, 42, 32,100, 70,100,120, 40, 32,115,117,114,102, 95,112,111,115, 32, 41, 59,
- 10, 9,118,101, 99, 51, 32,118, 83,105,103,109, 97, 84, 32, 61, 32,118,105,101,119, 50,111, 98,106, 32, 42, 32,100, 70,100,121,
- 40, 32,115,117,114,102, 95,112,111,115, 32, 41, 59, 10, 9,118,101, 99, 51, 32,118, 78, 32, 61, 32,110,111,114,109, 97,108,105,
-122,101, 40, 32,115,117,114,102, 95,110,111,114,109, 32, 42, 32,111, 98,106, 50,118,105,101,119, 32, 41, 59, 10, 10, 9,118, 82,
- 49, 32, 61, 32, 99,114,111,115,115, 40, 32,118, 83,105,103,109, 97, 84, 44, 32,118, 78, 32, 41, 59, 10, 9,118, 82, 50, 32, 61,
- 32, 99,114,111,115,115, 40, 32,118, 78, 44, 32,118, 83,105,103,109, 97, 83, 32, 41, 32, 59, 10, 9,102, 68,101,116, 32, 61, 32,
-100,111,116, 32, 40, 32,118, 83,105,103,109, 97, 83, 44, 32,118, 82, 49, 32, 41, 59, 10, 9, 10, 9, 47, 42, 32,112,114,101,116,
-114, 97,110,115,102,111,114,109, 32,118, 78, 97, 99, 99, 32, 40,105,110, 32,109,116,101,120, 95, 98,117,109,112, 95, 97,112,112,
-108,121, 41, 32,117,115,105,110,103, 32,116,104,101, 32,105,110,118,101,114,115,101, 32,116,114, 97,110,115,112,111,115,101,100,
- 32, 42, 47, 10, 9,118, 82, 49, 32, 61, 32,118, 82, 49, 32, 42, 32,118,105,101,119, 50,111, 98,106, 59, 10, 9,118, 82, 50, 32,
- 61, 32,118, 82, 50, 32, 42, 32,118,105,101,119, 50,111, 98,106, 59, 10, 9,118, 78, 32, 61, 32,118, 78, 32, 42, 32,118,105,101,
-119, 50,111, 98,106, 59, 10, 9, 10, 9,102,108,111, 97,116, 32,102, 77, 97,103,110,105,116,117,100,101, 32, 61, 32, 97, 98,115,
- 40,102, 68,101,116, 41, 32, 42, 32,108,101,110,103,116,104, 40,118, 78, 41, 59, 10, 9,118, 78, 97, 99, 99, 95,111,117,116, 32,
- 61, 32,118, 78, 97, 99, 99, 95,105,110, 32, 42, 32, 40,102, 77, 97,103,110,105,116,117,100,101, 32, 47, 32,102, 80,114,101,118,
- 77, 97,103,110,105,116,117,100,101, 95,105,110, 41, 59, 10, 9,102, 80,114,101,118, 77, 97,103,110,105,116,117,100,101, 95,111,
-117,116, 32, 61, 32,102, 77, 97,103,110,105,116,117,100,101, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95, 98,117,
-109,112, 95,105,110,105,116, 95,116,101,120,116,117,114,101,115,112, 97, 99,101, 40, 32,118,101, 99, 51, 32,115,117,114,102, 95,
-112,111,115, 44, 32,118,101, 99, 51, 32,115,117,114,102, 95,110,111,114,109, 44, 32, 10, 9, 9, 9, 9, 9, 9, 9, 9, 32, 32,
-102,108,111, 97,116, 32,102, 80,114,101,118, 77, 97,103,110,105,116,117,100,101, 95,105,110, 44, 32,118,101, 99, 51, 32,118, 78,
- 97, 99, 99, 95,105,110, 44, 10, 9, 9, 9, 9, 9, 9, 9, 9, 32, 32,111,117,116, 32,102,108,111, 97,116, 32,102, 80,114,101,
-118, 77, 97,103,110,105,116,117,100,101, 95,111,117,116, 44, 32,111,117,116, 32,118,101, 99, 51, 32,118, 78, 97, 99, 99, 95,111,
-117,116, 44, 32, 10, 9, 9, 9, 9, 9, 9, 9, 9, 32, 32,111,117,116, 32,118,101, 99, 51, 32,118, 82, 49, 44, 32,111,117,116,
- 32,118,101, 99, 51, 32,118, 82, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,102, 68,101,116, 32, 41, 32, 10,123, 10, 9,
-118,101, 99, 51, 32,118, 83,105,103,109, 97, 83, 32, 61, 32,100, 70,100,120, 40, 32,115,117,114,102, 95,112,111,115, 32, 41, 59,
- 10, 9,118,101, 99, 51, 32,118, 83,105,103,109, 97, 84, 32, 61, 32,100, 70,100,121, 40, 32,115,117,114,102, 95,112,111,115, 32,
- 41, 59, 10, 9,118,101, 99, 51, 32,118, 78, 32, 61, 32,115,117,114,102, 95,110,111,114,109, 59, 32, 47, 42, 32,110,111,114,109,
- 97,108,105,122,101,100, 32,105,110,116,101,114,112,111,108, 97,116,101,100, 32,118,101,114,116,101,120, 32,110,111,114,109, 97,
-108, 32, 42, 47, 10, 9, 10, 9,118, 82, 49, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40, 32, 99,114,111,115,115, 40, 32,
-118, 83,105,103,109, 97, 84, 44, 32,118, 78, 32, 41, 32, 41, 59, 10, 9,118, 82, 50, 32, 61, 32,110,111,114,109, 97,108,105,122,
-101, 40, 32, 99,114,111,115,115, 40, 32,118, 78, 44, 32,118, 83,105,103,109, 97, 83, 32, 41, 32, 41, 59, 10, 9,102, 68,101,116,
- 32, 61, 32,115,105,103,110, 40, 32,100,111,116, 40,118, 83,105,103,109, 97, 83, 44, 32,118, 82, 49, 41, 32, 41, 59, 10, 9, 10,
- 9,102,108,111, 97,116, 32,102, 77, 97,103,110,105,116,117,100,101, 32, 61, 32, 97, 98,115, 40,102, 68,101,116, 41, 59, 10, 9,
-118, 78, 97, 99, 99, 95,111,117,116, 32, 61, 32,118, 78, 97, 99, 99, 95,105,110, 32, 42, 32, 40,102, 77, 97,103,110,105,116,117,
-100,101, 32, 47, 32,102, 80,114,101,118, 77, 97,103,110,105,116,117,100,101, 95,105,110, 41, 59, 10, 9,102, 80,114,101,118, 77,
- 97,103,110,105,116,117,100,101, 95,111,117,116, 32, 61, 32,102, 77, 97,103,110,105,116,117,100,101, 59, 10,125, 10, 10,118,111,
-105,100, 32,109,116,101,120, 95, 98,117,109,112, 95,105,110,105,116, 95,118,105,101,119,115,112, 97, 99,101, 40, 32,118,101, 99,
- 51, 32,115,117,114,102, 95,112,111,115, 44, 32,118,101, 99, 51, 32,115,117,114,102, 95,110,111,114,109, 44, 32, 10, 9, 9, 9,
- 9, 9, 9, 9, 32, 32, 32,102,108,111, 97,116, 32,102, 80,114,101,118, 77, 97,103,110,105,116,117,100,101, 95,105,110, 44, 32,
-118,101, 99, 51, 32,118, 78, 97, 99, 99, 95,105,110, 44, 10, 9, 9, 9, 9, 9, 9, 9, 32, 32, 32,111,117,116, 32,102,108,111,
- 97,116, 32,102, 80,114,101,118, 77, 97,103,110,105,116,117,100,101, 95,111,117,116, 44, 32,111,117,116, 32,118,101, 99, 51, 32,
-118, 78, 97, 99, 99, 95,111,117,116, 44, 32, 10, 9, 9, 9, 9, 9, 9, 9, 32, 32, 32,111,117,116, 32,118,101, 99, 51, 32,118,
- 82, 49, 44, 32,111,117,116, 32,118,101, 99, 51, 32,118, 82, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,102, 68,101,116,
- 32, 41, 32, 10,123, 10, 9,118,101, 99, 51, 32,118, 83,105,103,109, 97, 83, 32, 61, 32,100, 70,100,120, 40, 32,115,117,114,102,
- 95,112,111,115, 32, 41, 59, 10, 9,118,101, 99, 51, 32,118, 83,105,103,109, 97, 84, 32, 61, 32,100, 70,100,121, 40, 32,115,117,
-114,102, 95,112,111,115, 32, 41, 59, 10, 9,118,101, 99, 51, 32,118, 78, 32, 61, 32,115,117,114,102, 95,110,111,114,109, 59, 32,
- 47, 42, 32,110,111,114,109, 97,108,105,122,101,100, 32,105,110,116,101,114,112,111,108, 97,116,101,100, 32,118,101,114,116,101,
-120, 32,110,111,114,109, 97,108, 32, 42, 47, 10, 9, 10, 9,118, 82, 49, 32, 61, 32, 99,114,111,115,115, 40, 32,118, 83,105,103,
-109, 97, 84, 44, 32,118, 78, 32, 41, 59, 10, 9,118, 82, 50, 32, 61, 32, 99,114,111,115,115, 40, 32,118, 78, 44, 32,118, 83,105,
-103,109, 97, 83, 32, 41, 32, 59, 10, 9,102, 68,101,116, 32, 61, 32,100,111,116, 32, 40, 32,118, 83,105,103,109, 97, 83, 44, 32,
-118, 82, 49, 32, 41, 59, 10, 9, 10, 9,102,108,111, 97,116, 32,102, 77, 97,103,110,105,116,117,100,101, 32, 61, 32, 97, 98,115,
- 40,102, 68,101,116, 41, 59, 10, 9,118, 78, 97, 99, 99, 95,111,117,116, 32, 61, 32,118, 78, 97, 99, 99, 95,105,110, 32, 42, 32,
- 40,102, 77, 97,103,110,105,116,117,100,101, 32, 47, 32,102, 80,114,101,118, 77, 97,103,110,105,116,117,100,101, 95,105,110, 41,
- 59, 10, 9,102, 80,114,101,118, 77, 97,103,110,105,116,117,100,101, 95,111,117,116, 32, 61, 32,102, 77, 97,103,110,105,116,117,
-100,101, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95, 98,117,109,112, 95,116, 97,112, 51, 40, 32,118,101, 99, 51,
- 32,116,101,120, 99,111, 44, 32,115, 97,109,112,108,101,114, 50, 68, 32,105,109, 97, 44, 32,102,108,111, 97,116, 32,104, 83, 99,
- 97,108,101, 44, 32, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,111,117,116, 32,102,
-108,111, 97,116, 32,100, 66,115, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,100, 66,116, 32, 41, 32, 10,123, 10, 9,118,101,
- 99, 50, 32, 83, 84,108,108, 32, 61, 32,116,101,120, 99,111, 46,120,121, 59, 10, 9,118,101, 99, 50, 32, 83, 84,108,114, 32, 61,
- 32,116,101,120, 99,111, 46,120,121, 32, 43, 32,100, 70,100,120, 40,116,101,120, 99,111, 46,120,121, 41, 32, 59, 10, 9,118,101,
- 99, 50, 32, 83, 84,117,108, 32, 61, 32,116,101,120, 99,111, 46,120,121, 32, 43, 32,100, 70,100,121, 40,116,101,120, 99,111, 46,
-120,121, 41, 32, 59, 10, 9, 10, 9,102,108,111, 97,116, 32, 72,108,108, 44, 72,108,114, 44, 72,117,108, 59, 10, 9,114,103, 98,
-116,111, 98,119, 40, 32,116,101,120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32, 83, 84,108,108, 41, 44, 32, 72,108,108, 32,
- 41, 59, 10, 9,114,103, 98,116,111, 98,119, 40, 32,116,101,120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32, 83, 84,108,114,
- 41, 44, 32, 72,108,114, 32, 41, 59, 10, 9,114,103, 98,116,111, 98,119, 40, 32,116,101,120,116,117,114,101, 50, 68, 40,105,109,
- 97, 44, 32, 83, 84,117,108, 41, 44, 32, 72,117,108, 32, 41, 59, 10, 9, 10, 9,100, 66,115, 32, 61, 32,104, 83, 99, 97,108,101,
- 32, 42, 32, 40, 72,108,114, 32, 45, 32, 72,108,108, 41, 59, 10, 9,100, 66,116, 32, 61, 32,104, 83, 99, 97,108,101, 32, 42, 32,
- 40, 72,117,108, 32, 45, 32, 72,108,108, 41, 59, 10,125, 10, 10, 35,105,102,100,101,102, 32, 66, 85, 77, 80, 95, 66, 73, 67, 85,
- 66, 73, 67, 10, 10,118,111,105,100, 32,109,116,101,120, 95, 98,117,109,112, 95, 98,105, 99,117, 98,105, 99, 40, 32,118,101, 99,
- 51, 32,116,101,120, 99,111, 44, 32,115, 97,109,112,108,101,114, 50, 68, 32,105,109, 97, 44, 32,102,108,111, 97,116, 32,104, 83,
- 99, 97,108,101, 44, 32, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,111,117,116, 32,
-102,108,111, 97,116, 32,100, 66,115, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,100, 66,116, 32, 41, 32, 10,123, 10, 9,102,
-108,111, 97,116, 32, 72,108, 59, 10, 9,102,108,111, 97,116, 32, 72,114, 59, 10, 9,102,108,111, 97,116, 32, 72,100, 59, 10, 9,
-102,108,111, 97,116, 32, 72,117, 59, 10, 9, 10, 9,118,101, 99, 50, 32, 84,101,120, 68,120, 32, 61, 32,100, 70,100,120, 40,116,
-101,120, 99,111, 46,120,121, 41, 59, 10, 9,118,101, 99, 50, 32, 84,101,120, 68,121, 32, 61, 32,100, 70,100,121, 40,116,101,120,
- 99,111, 46,120,121, 41, 59, 10, 32, 10, 9,118,101, 99, 50, 32, 83, 84,108, 32, 61, 32,116,101,120, 99,111, 46,120,121, 32, 45,
- 32, 48, 46, 53, 32, 42, 32, 84,101,120, 68,120, 32, 59, 10, 9,118,101, 99, 50, 32, 83, 84,114, 32, 61, 32,116,101,120, 99,111,
- 46,120,121, 32, 43, 32, 48, 46, 53, 32, 42, 32, 84,101,120, 68,120, 32, 59, 10, 9,118,101, 99, 50, 32, 83, 84,100, 32, 61, 32,
-116,101,120, 99,111, 46,120,121, 32, 45, 32, 48, 46, 53, 32, 42, 32, 84,101,120, 68,121, 32, 59, 10, 9,118,101, 99, 50, 32, 83,
- 84,117, 32, 61, 32,116,101,120, 99,111, 46,120,121, 32, 43, 32, 48, 46, 53, 32, 42, 32, 84,101,120, 68,121, 32, 59, 10, 9, 10,
- 9,114,103, 98,116,111, 98,119, 40,116,101,120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32, 83, 84,108, 41, 44, 32, 72,108,
- 41, 59, 10, 9,114,103, 98,116,111, 98,119, 40,116,101,120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32, 83, 84,114, 41, 44,
- 32, 72,114, 41, 59, 10, 9,114,103, 98,116,111, 98,119, 40,116,101,120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32, 83, 84,
-100, 41, 44, 32, 72,100, 41, 59, 10, 9,114,103, 98,116,111, 98,119, 40,116,101,120,116,117,114,101, 50, 68, 40,105,109, 97, 44,
- 32, 83, 84,117, 41, 44, 32, 72,117, 41, 59, 10, 9, 10, 9,118,101, 99, 50, 32,100, 72,100,120,121, 32, 61, 32,118,101, 99, 50,
- 40, 72,114, 32, 45, 32, 72,108, 44, 32, 72,117, 32, 45, 32, 72,100, 41, 59, 10, 9,102,108,111, 97,116, 32,102, 66,108,101,110,
-100, 32, 61, 32, 99,108, 97,109,112, 40, 49, 46, 48, 45,116,101,120,116,117,114,101, 81,117,101,114,121, 76, 79, 68, 40,105,109,
- 97, 44, 32,116,101,120, 99,111, 46,120,121, 41, 46,120, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,105,102, 40,102,
- 66,108,101,110,100, 33, 61, 48, 46, 48, 41, 10, 9,123, 10, 9, 9, 47, 47, 32,116,104,101, 32,100,101,114,105,118, 97,116,105,
-118,101, 32,111,102, 32,116,104,101, 32, 98,105, 99,117, 98,105, 99, 32,115, 97,109,112,108,105,110,103, 32,111,102, 32,108,101,
-118,101,108, 32, 48, 10, 9, 9,105,118,101, 99, 50, 32,118, 68,105,109, 59, 10, 9, 9,118, 68,105,109, 32, 61, 32,116,101,120,
-116,117,114,101, 83,105,122,101, 40,105,109, 97, 44, 32, 48, 41, 59, 10, 10, 9, 9, 47, 47, 32,116, 97,107,105,110,103, 32,116,
-104,101, 32,102,114, 97, 99,116, 32,112, 97,114,116, 32,111,102, 32,116,104,101, 32,116,101,120,116,117,114,101, 32, 99,111,111,
-114,100,105,110, 97,116,101, 32,105,115, 32, 97, 32,104, 97,114,100, 99,111,100,101,100, 32,119,114, 97,112, 32,109,111,100,101,
- 46, 10, 9, 9, 47, 47, 32,116,104,105,115, 32,105,115, 32, 97, 99, 99,101,112,116, 97, 98,108,101, 32, 97,115, 32,116,101,120,
-116,117,114,101,115, 32,117,115,101, 32,119,114, 97,112, 32,109,111,100,101, 32,101,120, 99,108,117,115,105,118,101,108,121, 32,
-105,110, 32, 51, 68, 32,118,105,101,119, 32,101,108,115,101,119,104,101,114,101, 32,105,110, 32, 98,108,101,110,100,101,114, 46,
- 32, 10, 9, 9, 47, 47, 32,116,104,105,115, 32,105,115, 32,100,111,110,101, 32,115,111, 32,116,104, 97,116, 32,119,101, 32, 99,
- 97,110, 32,115,116,105,108,108, 32,103,101,116, 32, 97, 32,118, 97,108,105,100, 32,116,101,120,101,108, 32,119,105,116,104, 32,
-117,118,115, 32,111,117,116,115,105,100,101, 32,116,104,101, 32, 48, 44, 49, 32,114, 97,110,103,101, 10, 9, 9, 47, 47, 32, 98,
-121, 32,116,101,120,101,108, 70,101,116, 99,104, 32, 98,101,108,111,119, 44, 32, 97,115, 32, 99,111,111,114,100,105,110, 97,116,
-101,115, 32, 97,114,101, 32, 99,108, 97,109,112,101,100, 32,119,104,101,110, 32,117,115,105,110,103, 32,116,104,105,115, 32,102,
-117,110, 99,116,105,111,110, 46, 10, 9, 9,118,101, 99, 50, 32,102, 84,101,120, 76,111, 99, 32, 61, 32,118, 68,105,109, 42,102,
-114, 97, 99,116, 40,116,101,120, 99,111, 46,120,121, 41, 32, 45, 32,118,101, 99, 50, 40, 48, 46, 53, 44, 32, 48, 46, 53, 41, 59,
- 10, 9, 9,105,118,101, 99, 50, 32,105, 84,101,120, 76,111, 99, 32, 61, 32,105,118,101, 99, 50, 40,102,108,111,111,114, 40,102,
- 84,101,120, 76,111, 99, 41, 41, 59, 10, 9, 9,118,101, 99, 50, 32,116, 32, 61, 32, 99,108, 97,109,112, 40,102, 84,101,120, 76,
-111, 99, 32, 45, 32,105, 84,101,120, 76,111, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 9, 9, 47, 47, 32,115, 97,116,
- 32,106,117,115,116, 32,116,111, 32, 98,101, 32,112,101,100, 97,110,116,105, 99, 10, 10, 47, 42, 42, 42, 42, 42, 42, 42, 42, 42,
- 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
- 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
- 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 10, 32, 42, 32, 84,104,105,115, 32, 98,108,111, 99,107,
- 32,119,105,108,108, 32,114,101,112,108, 97, 99,101, 32,116,104,101, 32,111,110,101, 32, 98,101,108,111,119, 32,119,104,101,110,
- 32,111,110,101, 32, 99,104, 97,110,110,101,108, 32,116,101,120,116,117,114,101,115, 32, 97,114,101, 32,112,114,111,112,101,114,
-108,121, 32,115,117,112,112,111,114,116,101,100, 46, 32, 42, 10, 32, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
- 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
- 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
- 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 10, 9, 9,118,101, 99, 52, 32,118, 83, 97,109,112,108,101,115, 85, 76, 32, 61,
- 32,116,101,120,116,117,114,101, 71, 97,116,104,101,114, 40,105,109, 97, 44, 32, 40,105, 84,101,120, 76,111, 99, 43,105,118,101,
- 99, 50, 40, 45, 49, 44, 45, 49, 41, 32, 43, 32,118,101, 99, 50, 40, 48, 46, 53, 44, 48, 46, 53, 41, 41, 47,118, 68,105,109, 32,
- 41, 59, 10, 9, 9,118,101, 99, 52, 32,118, 83, 97,109,112,108,101,115, 85, 82, 32, 61, 32,116,101,120,116,117,114,101, 71, 97,
-116,104,101,114, 40,105,109, 97, 44, 32, 40,105, 84,101,120, 76,111, 99, 43,105,118,101, 99, 50, 40, 49, 44, 45, 49, 41, 32, 43,
- 32,118,101, 99, 50, 40, 48, 46, 53, 44, 48, 46, 53, 41, 41, 47,118, 68,105,109, 32, 41, 59, 10, 9, 9,118,101, 99, 52, 32,118,
- 83, 97,109,112,108,101,115, 76, 76, 32, 61, 32,116,101,120,116,117,114,101, 71, 97,116,104,101,114, 40,105,109, 97, 44, 32, 40,
-105, 84,101,120, 76,111, 99, 43,105,118,101, 99, 50, 40, 45, 49, 44, 49, 41, 32, 43, 32,118,101, 99, 50, 40, 48, 46, 53, 44, 48,
- 46, 53, 41, 41, 47,118, 68,105,109, 32, 41, 59, 10, 9, 9,118,101, 99, 52, 32,118, 83, 97,109,112,108,101,115, 76, 82, 32, 61,
- 32,116,101,120,116,117,114,101, 71, 97,116,104,101,114, 40,105,109, 97, 44, 32, 40,105, 84,101,120, 76,111, 99, 43,105,118,101,
- 99, 50, 40, 49, 44, 49, 41, 32, 43, 32,118,101, 99, 50, 40, 48, 46, 53, 44, 48, 46, 53, 41, 41, 47,118, 68,105,109, 32, 41, 59,
- 10, 10, 9, 9,109, 97,116, 52, 32, 72, 32, 61, 32,109, 97,116, 52, 40,118, 83, 97,109,112,108,101,115, 85, 76, 46,119, 44, 32,
-118, 83, 97,109,112,108,101,115, 85, 76, 46,120, 44, 32,118, 83, 97,109,112,108,101,115, 76, 76, 46,119, 44, 32,118, 83, 97,109,
-112,108,101,115, 76, 76, 46,120, 44, 10, 9, 9, 9, 9, 9,118, 83, 97,109,112,108,101,115, 85, 76, 46,122, 44, 32,118, 83, 97,
-109,112,108,101,115, 85, 76, 46,121, 44, 32,118, 83, 97,109,112,108,101,115, 76, 76, 46,122, 44, 32,118, 83, 97,109,112,108,101,
-115, 76, 76, 46,121, 44, 10, 9, 9, 9, 9, 9,118, 83, 97,109,112,108,101,115, 85, 82, 46,119, 44, 32,118, 83, 97,109,112,108,
-101,115, 85, 82, 46,120, 44, 32,118, 83, 97,109,112,108,101,115, 76, 82, 46,119, 44, 32,118, 83, 97,109,112,108,101,115, 76, 82,
- 46,120, 44, 10, 9, 9, 9, 9, 9,118, 83, 97,109,112,108,101,115, 85, 82, 46,122, 44, 32,118, 83, 97,109,112,108,101,115, 85,
- 82, 46,121, 44, 32,118, 83, 97,109,112,108,101,115, 76, 82, 46,122, 44, 32,118, 83, 97,109,112,108,101,115, 76, 82, 46,121, 41,
- 59, 10, 42, 47, 9, 10, 9, 9,105,118,101, 99, 50, 32,105, 84,101,120, 76,111, 99, 77,111,100, 32, 61, 32,105, 84,101,120, 76,
-111, 99, 32, 43, 32,105,118,101, 99, 50, 40, 45, 49, 44, 32, 45, 49, 41, 59, 10, 10, 9, 9,109, 97,116, 52, 32, 72, 59, 10, 9,
- 9, 10, 9, 9,102,111,114, 40,105,110,116, 32,105, 32, 61, 32, 48, 59, 32,105, 32, 60, 32, 52, 59, 32,105, 43, 43, 41,123, 10,
- 9, 9, 9,102,111,114, 40,105,110,116, 32,106, 32, 61, 32, 48, 59, 32,106, 32, 60, 32, 52, 59, 32,106, 43, 43, 41,123, 10, 9,
- 9, 9, 9,105,118,101, 99, 50, 32,105, 84,101,120, 84,109,112, 32, 61, 32,105, 84,101,120, 76,111, 99, 77,111,100, 32, 43, 32,
-105,118,101, 99, 50, 40,105, 44,106, 41, 59, 10, 9, 9, 9, 9, 10, 9, 9, 9, 9, 47, 47, 32,119,114, 97,112, 32,116,101,120,
-116,117,114,101, 32, 99,111,111,114,100,105,110, 97,116,101,115, 32,109, 97,110,117, 97,108,108,121, 32,102,111,114, 32,116,101,
-120,101,108, 70,101,116, 99,104, 32,116,111, 32,119,111,114,107, 32,111,110, 32,117,118,115, 32,111,105,116,115,105,100,101, 32,
-116,104,101, 32, 48, 44, 49, 32,114, 97,110,103,101, 46, 10, 9, 9, 9, 9, 47, 47, 32,116,104,105,115, 32,105,115, 32,103,117,
- 97,114, 97,110,116,101,101,100, 32,116,111, 32,119,111,114,107, 32,115,105,110, 99,101, 32,119,101, 32,116, 97,107,101, 32,116,
-104,101, 32,102,114, 97, 99,116,105,111,110, 97,108, 32,112, 97,114,116, 32,111,102, 32,116,104,101, 32,117,118, 32, 97, 98,111,
-118,101, 46, 10, 9, 9, 9, 9,105, 84,101,120, 84,109,112, 46,120, 32, 61, 32, 40,105, 84,101,120, 84,109,112, 46,120, 32, 60,
- 32, 48, 41, 63, 32,105, 84,101,120, 84,109,112, 46,120, 32, 43, 32,118, 68,105,109, 46,120, 32, 58, 32, 40, 40,105, 84,101,120,
- 84,109,112, 46,120, 32, 62, 61, 32,118, 68,105,109, 46,120, 41, 63, 32,105, 84,101,120, 84,109,112, 46,120, 32, 45, 32,118, 68,
-105,109, 46,120, 32, 58, 32,105, 84,101,120, 84,109,112, 46,120, 41, 59, 10, 9, 9, 9, 9,105, 84,101,120, 84,109,112, 46,121,
- 32, 61, 32, 40,105, 84,101,120, 84,109,112, 46,121, 32, 60, 32, 48, 41, 63, 32,105, 84,101,120, 84,109,112, 46,121, 32, 43, 32,
-118, 68,105,109, 46,121, 32, 58, 32, 40, 40,105, 84,101,120, 84,109,112, 46,121, 32, 62, 61, 32,118, 68,105,109, 46,121, 41, 63,
- 32,105, 84,101,120, 84,109,112, 46,121, 32, 45, 32,118, 68,105,109, 46,121, 32, 58, 32,105, 84,101,120, 84,109,112, 46,121, 41,
- 59, 10, 10, 9, 9, 9, 9,114,103, 98,116,111, 98,119, 40,116,101,120,101,108, 70,101,116, 99,104, 40,105,109, 97, 44, 32,105,
- 84,101,120, 84,109,112, 44, 32, 48, 41, 44, 32, 72, 91,105, 93, 91,106, 93, 41, 59, 10, 9, 9, 9,125, 10, 9, 9,125, 10, 9,
- 9, 10, 9, 9,102,108,111, 97,116, 32,120, 32, 61, 32,116, 46,120, 44, 32,121, 32, 61, 32,116, 46,121, 59, 10, 9, 9,102,108,
-111, 97,116, 32,120, 50, 32, 61, 32,120, 32, 42, 32,120, 44, 32,120, 51, 32, 61, 32,120, 50, 32, 42, 32,120, 44, 32,121, 50, 32,
- 61, 32,121, 32, 42, 32,121, 44, 32,121, 51, 32, 61, 32,121, 50, 32, 42, 32,121, 59, 10, 10, 9, 9,118,101, 99, 52, 32, 88, 32,
- 61, 32,118,101, 99, 52, 40, 45, 48, 46, 53, 42, 40,120, 51, 43,120, 41, 43,120, 50, 44, 9, 9, 49, 46, 53, 42,120, 51, 45, 50,
- 46, 53, 42,120, 50, 43, 49, 44, 9, 45, 49, 46, 53, 42,120, 51, 43, 50, 42,120, 50, 43, 48, 46, 53, 42,120, 44, 9, 9, 48, 46,
- 53, 42, 40,120, 51, 45,120, 50, 41, 41, 59, 10, 9, 9,118,101, 99, 52, 32, 89, 32, 61, 32,118,101, 99, 52, 40, 45, 48, 46, 53,
- 42, 40,121, 51, 43,121, 41, 43,121, 50, 44, 9, 9, 49, 46, 53, 42,121, 51, 45, 50, 46, 53, 42,121, 50, 43, 49, 44, 9, 45, 49,
- 46, 53, 42,121, 51, 43, 50, 42,121, 50, 43, 48, 46, 53, 42,121, 44, 9, 9, 48, 46, 53, 42, 40,121, 51, 45,121, 50, 41, 41, 59,
- 10, 9, 9,118,101, 99, 52, 32,100, 88, 32, 61, 32,118,101, 99, 52, 40, 45, 49, 46, 53, 42,120, 50, 43, 50, 42,120, 45, 48, 46,
- 53, 44, 9, 9, 52, 46, 53, 42,120, 50, 45, 53, 42,120, 44, 9, 9, 9, 45, 52, 46, 53, 42,120, 50, 43, 52, 42,120, 43, 48, 46,
- 53, 44, 9, 9, 49, 46, 53, 42,120, 50, 45,120, 41, 59, 10, 9, 9,118,101, 99, 52, 32,100, 89, 32, 61, 32,118,101, 99, 52, 40,
- 45, 49, 46, 53, 42,121, 50, 43, 50, 42,121, 45, 48, 46, 53, 44, 9, 9, 52, 46, 53, 42,121, 50, 45, 53, 42,121, 44, 9, 9, 9,
- 45, 52, 46, 53, 42,121, 50, 43, 52, 42,121, 43, 48, 46, 53, 44, 9, 9, 49, 46, 53, 42,121, 50, 45,121, 41, 59, 10, 9, 10, 9,
- 9, 47, 47, 32, 99,111,109,112,108,101,116,101, 32,100,101,114,105,118, 97,116,105,118,101, 32,105,110, 32,110,111,114,109, 97,
-108,105,122,101,100, 32, 99,111,111,114,100,105,110, 97,116,101,115, 32, 40,109,117,108, 32, 98,121, 32,118, 68,105,109, 41, 10,
- 9, 9,118,101, 99, 50, 32,100, 72,100, 83, 84, 32, 61, 32,118, 68,105,109, 32, 42, 32,118,101, 99, 50, 40,100,111,116, 40, 89,
- 44, 32, 72, 32, 42, 32,100, 88, 41, 44, 32,100,111,116, 40,100, 89, 44, 32, 72, 32, 42, 32, 88, 41, 41, 59, 10, 10, 9, 9, 47,
- 47, 32,116,114, 97,110,115,102,111,114,109, 32,100,101,114,105,118, 97,116,105,118,101, 32,116,111, 32,115, 99,114,101,101,110,
- 45,115,112, 97, 99,101, 10, 9, 9,118,101, 99, 50, 32,100, 72,100,120,121, 95, 98,105, 99,117, 98,105, 99, 32, 61, 32,118,101,
- 99, 50, 40, 32,100, 72,100, 83, 84, 46,120, 32, 42, 32, 84,101,120, 68,120, 46,120, 32, 43, 32,100, 72,100, 83, 84, 46,121, 32,
- 42, 32, 84,101,120, 68,120, 46,121, 44, 10, 9, 9, 9, 9, 9, 9, 9, 9, 32, 32, 32,100, 72,100, 83, 84, 46,120, 32, 42, 32,
- 84,101,120, 68,121, 46,120, 32, 43, 32,100, 72,100, 83, 84, 46,121, 32, 42, 32, 84,101,120, 68,121, 46,121, 32, 41, 59, 10, 10,
- 9, 9, 47, 47, 32, 98,108,101,110,100, 32, 98,101,116,119,101,101,110, 32,116,104,101, 32,116,119,111, 10, 9, 9,100, 72,100,
-120,121, 32, 61, 32,100, 72,100,120,121, 42, 40, 49, 45,102, 66,108,101,110,100, 41, 32, 43, 32,100, 72,100,120,121, 95, 98,105,
- 99,117, 98,105, 99, 42,102, 66,108,101,110,100, 59, 10, 9,125, 10, 10, 9,100, 66,115, 32, 61, 32,104, 83, 99, 97,108,101, 32,
- 42, 32,100, 72,100,120,121, 46,120, 59, 10, 9,100, 66,116, 32, 61, 32,104, 83, 99, 97,108,101, 32, 42, 32,100, 72,100,120,121,
- 46,121, 59, 10,125, 10, 10, 35,101,110,100,105,102, 10, 10,118,111,105,100, 32,109,116,101,120, 95, 98,117,109,112, 95,116, 97,
-112, 53, 40, 32,118,101, 99, 51, 32,116,101,120, 99,111, 44, 32,115, 97,109,112,108,101,114, 50, 68, 32,105,109, 97, 44, 32,102,
-108,111, 97,116, 32,104, 83, 99, 97,108,101, 44, 32, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32,111,117,116, 32,102,108,111, 97,116, 32,100, 66,115, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,100, 66,116, 32,
- 41, 32, 10,123, 10, 9,118,101, 99, 50, 32, 84,101,120, 68,120, 32, 61, 32,100, 70,100,120, 40,116,101,120, 99,111, 46,120,121,
- 41, 59, 10, 9,118,101, 99, 50, 32, 84,101,120, 68,121, 32, 61, 32,100, 70,100,121, 40,116,101,120, 99,111, 46,120,121, 41, 59,
- 10, 10, 9,118,101, 99, 50, 32, 83, 84, 99, 32, 61, 32,116,101,120, 99,111, 46,120,121, 59, 10, 9,118,101, 99, 50, 32, 83, 84,
-108, 32, 61, 32,116,101,120, 99,111, 46,120,121, 32, 45, 32, 48, 46, 53, 32, 42, 32, 84,101,120, 68,120, 32, 59, 10, 9,118,101,
- 99, 50, 32, 83, 84,114, 32, 61, 32,116,101,120, 99,111, 46,120,121, 32, 43, 32, 48, 46, 53, 32, 42, 32, 84,101,120, 68,120, 32,
- 59, 10, 9,118,101, 99, 50, 32, 83, 84,100, 32, 61, 32,116,101,120, 99,111, 46,120,121, 32, 45, 32, 48, 46, 53, 32, 42, 32, 84,
-101,120, 68,121, 32, 59, 10, 9,118,101, 99, 50, 32, 83, 84,117, 32, 61, 32,116,101,120, 99,111, 46,120,121, 32, 43, 32, 48, 46,
- 53, 32, 42, 32, 84,101,120, 68,121, 32, 59, 10, 9, 10, 9,102,108,111, 97,116, 32, 72, 99, 44, 72,108, 44, 72,114, 44, 72,100,
- 44, 72,117, 59, 10, 9,114,103, 98,116,111, 98,119, 40, 32,116,101,120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32, 83, 84,
- 99, 41, 44, 32, 72, 99, 32, 41, 59, 10, 9,114,103, 98,116,111, 98,119, 40, 32,116,101,120,116,117,114,101, 50, 68, 40,105,109,
- 97, 44, 32, 83, 84,108, 41, 44, 32, 72,108, 32, 41, 59, 10, 9,114,103, 98,116,111, 98,119, 40, 32,116,101,120,116,117,114,101,
- 50, 68, 40,105,109, 97, 44, 32, 83, 84,114, 41, 44, 32, 72,114, 32, 41, 59, 10, 9,114,103, 98,116,111, 98,119, 40, 32,116,101,
-120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32, 83, 84,100, 41, 44, 32, 72,100, 32, 41, 59, 10, 9,114,103, 98,116,111, 98,
-119, 40, 32,116,101,120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32, 83, 84,117, 41, 44, 32, 72,117, 32, 41, 59, 10, 9, 10,
- 9,100, 66,115, 32, 61, 32,104, 83, 99, 97,108,101, 32, 42, 32, 40, 72,114, 32, 45, 32, 72,108, 41, 59, 10, 9,100, 66,116, 32,
- 61, 32,104, 83, 99, 97,108,101, 32, 42, 32, 40, 72,117, 32, 45, 32, 72,100, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,
-101,120, 95, 98,117,109,112, 95,100,101,114,105,118, 40, 32,118,101, 99, 51, 32,116,101,120, 99,111, 44, 32,115, 97,109,112,108,
-101,114, 50, 68, 32,105,109, 97, 44, 32,102,108,111, 97,116, 32,105,109, 97, 95,120, 44, 32,102,108,111, 97,116, 32,105,109, 97,
- 95,121, 44, 32,102,108,111, 97,116, 32,104, 83, 99, 97,108,101, 44, 32, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32,111,117,116, 32,102,108,111, 97,116, 32,100, 66,115, 44, 32,111,117,116, 32,102,108,111, 97,116,
- 32,100, 66,116, 32, 41, 32, 10,123, 10, 9,102,108,111, 97,116, 32,115, 32, 61, 32, 49, 46, 48, 59, 9, 9, 47, 47, 32,110,101,
-103, 97,116,101, 32,116,104,105,115, 32,105,102, 32,102,108,105,112,112,101,100, 32,116,101,120,116,117,114,101, 32, 99,111,111,
-114,100,105,110, 97,116,101, 10, 9,118,101, 99, 50, 32, 84,101,120, 68,120, 32, 61, 32,100, 70,100,120, 40,116,101,120, 99,111,
- 46,120,121, 41, 59, 10, 9,118,101, 99, 50, 32, 84,101,120, 68,121, 32, 61, 32,100, 70,100,121, 40,116,101,120, 99,111, 46,120,
-121, 41, 59, 10, 9, 10, 9, 47, 47, 32,116,104,105,115, 32,118, 97,114,105, 97,110,116, 32,117,115,105,110,103, 32, 97, 32,100,
-101,114,105,118, 97,116,105,118,101, 32,109, 97,112, 32,105,115, 32,100,101,115, 99,114,105, 98,101,100, 32,104,101,114,101, 10,
- 9, 47, 47, 32,104,116,116,112, 58, 47, 47,109,109,105,107,107,101,108,115,101,110, 51,100, 46, 98,108,111,103,115,112,111,116,
- 46, 99,111,109, 47, 50, 48, 49, 49, 47, 48, 55, 47,100,101,114,105,118, 97,116,105,118,101, 45,109, 97,112,115, 46,104,116,109,
-108, 10, 9,118,101, 99, 50, 32,100,105,109, 32, 61, 32,118,101, 99, 50, 40,105,109, 97, 95,120, 44, 32,105,109, 97, 95,121, 41,
- 59, 10, 9,118,101, 99, 50, 32,100, 66,100,117,118, 32, 61, 32,104, 83, 99, 97,108,101, 42,100,105,109, 42, 40, 50, 46, 48, 42,
-116,101,120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32,116,101,120, 99,111, 46,120,121, 41, 46,120,121, 45, 49, 46, 48, 41,
- 59, 10, 9, 10, 9,100, 66,115, 32, 61, 32,100, 66,100,117,118, 46,120, 42, 84,101,120, 68,120, 46,120, 32, 43, 32,115, 42,100,
- 66,100,117,118, 46,121, 42, 84,101,120, 68,120, 46,121, 59, 10, 9,100, 66,116, 32, 61, 32,100, 66,100,117,118, 46,120, 42, 84,
-101,120, 68,121, 46,120, 32, 43, 32,115, 42,100, 66,100,117,118, 46,121, 42, 84,101,120, 68,121, 46,121, 59, 10,125, 10, 10,118,
-111,105,100, 32,109,116,101,120, 95, 98,117,109,112, 95, 97,112,112,108,121, 40, 32,102,108,111, 97,116, 32,102, 68,101,116, 44,
- 32,102,108,111, 97,116, 32,100, 66,115, 44, 32,102,108,111, 97,116, 32,100, 66,116, 44, 32,118,101, 99, 51, 32,118, 82, 49, 44,
- 32,118,101, 99, 51, 32,118, 82, 50, 44, 32,118,101, 99, 51, 32,118, 78, 97, 99, 99, 95,105,110, 44, 10, 9, 9, 9, 9, 9, 32,
- 32,111,117,116, 32,118,101, 99, 51, 32,118, 78, 97, 99, 99, 95,111,117,116, 44, 32,111,117,116, 32,118,101, 99, 51, 32,112,101,
-114,116,117,114, 98,101,100, 95,110,111,114,109, 32, 41, 32, 10,123, 10, 9,118,101, 99, 51, 32,118, 83,117,114,102, 71,114, 97,
-100, 32, 61, 32,115,105,103,110, 40,102, 68,101,116, 41, 32, 42, 32, 40, 32,100, 66,115, 32, 42, 32,118, 82, 49, 32, 43, 32,100,
- 66,116, 32, 42, 32,118, 82, 50, 32, 41, 59, 10, 9, 10, 9,118, 78, 97, 99, 99, 95,111,117,116, 32, 61, 32,118, 78, 97, 99, 99,
- 95,105,110, 32, 45, 32,118, 83,117,114,102, 71,114, 97,100, 59, 10, 9,112,101,114,116,117,114, 98,101,100, 95,110,111,114,109,
- 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40, 32,118, 78, 97, 99, 99, 95,111,117,116, 32, 41, 59, 10,125, 10, 10,118,111,
-105,100, 32,109,116,101,120, 95, 98,117,109,112, 95, 97,112,112,108,121, 95,116,101,120,115,112, 97, 99,101, 40, 32,102,108,111,
- 97,116, 32,102, 68,101,116, 44, 32,102,108,111, 97,116, 32,100, 66,115, 44, 32,102,108,111, 97,116, 32,100, 66,116, 44, 32,118,
-101, 99, 51, 32,118, 82, 49, 44, 32,118,101, 99, 51, 32,118, 82, 50, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,115, 97,109,112,108,101,114, 50, 68, 32,105,109, 97, 44,
- 32,118,101, 99, 51, 32,116,101,120, 99,111, 44, 32,102,108,111, 97,116, 32,105,109, 97, 95,120, 44, 32,102,108,111, 97,116, 32,
-105,109, 97, 95,121, 44, 32,118,101, 99, 51, 32,118, 78, 97, 99, 99, 95,105,110, 44, 10, 9, 9, 9, 9, 9, 9, 9, 32, 32, 32,
-111,117,116, 32,118,101, 99, 51, 32,118, 78, 97, 99, 99, 95,111,117,116, 44, 32,111,117,116, 32,118,101, 99, 51, 32,112,101,114,
-116,117,114, 98,101,100, 95,110,111,114,109, 32, 41, 32, 10,123, 10, 9,118,101, 99, 50, 32, 84,101,120, 68,120, 32, 61, 32,100,
- 70,100,120, 40,116,101,120, 99,111, 46,120,121, 41, 59, 10, 9,118,101, 99, 50, 32, 84,101,120, 68,121, 32, 61, 32,100, 70,100,
-121, 40,116,101,120, 99,111, 46,120,121, 41, 59, 10, 10, 9,118,101, 99, 51, 32,118, 83,117,114,102, 71,114, 97,100, 32, 61, 32,
-115,105,103,110, 40,102, 68,101,116, 41, 32, 42, 32, 40, 32, 10, 9, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,100, 66,115,
- 32, 47, 32,108,101,110,103,116,104, 40, 32,118,101, 99, 50, 40,105,109, 97, 95,120, 42, 84,101,120, 68,120, 46,120, 44, 32,105,
-109, 97, 95,121, 42, 84,101,120, 68,120, 46,121, 41, 32, 41, 32, 42, 32,118, 82, 49, 32, 43, 32, 10, 9, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32,100, 66,116, 32, 47, 32,108,101,110,103,116,104, 40, 32,118,101, 99, 50, 40,105,109, 97, 95,120, 42, 84,
-101,120, 68,121, 46,120, 44, 32,105,109, 97, 95,121, 42, 84,101,120, 68,121, 46,121, 41, 32, 41, 32, 42, 32,118, 82, 50, 32, 41,
- 59, 10, 9, 9, 9, 9, 10, 9,118, 78, 97, 99, 99, 95,111,117,116, 32, 61, 32,118, 78, 97, 99, 99, 95,105,110, 32, 45, 32,118,
- 83,117,114,102, 71,114, 97,100, 59, 10, 9,112,101,114,116,117,114, 98,101,100, 95,110,111,114,109, 32, 61, 32,110,111,114,109,
- 97,108,105,122,101, 40, 32,118, 78, 97, 99, 99, 95,111,117,116, 32, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120,
- 95,110,101,103, 97,116,101, 95,116,101,120,110,111,114,109, 97,108, 40,118,101, 99, 51, 32,110,111,114,109, 97,108, 44, 32,111,
-117,116, 32,118,101, 99, 51, 32,111,117,116,110,111,114,109, 97,108, 41, 10,123, 10, 9,111,117,116,110,111,114,109, 97,108, 32,
- 61, 32,118,101, 99, 51, 40, 45,110,111,114,109, 97,108, 46,120, 44, 32, 45,110,111,114,109, 97,108, 46,121, 44, 32,110,111,114,
-109, 97,108, 46,122, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,110,115,112, 97, 99,101, 95,116, 97,110,103,
-101,110,116, 40,118,101, 99, 52, 32,116, 97,110,103,101,110,116, 44, 32,118,101, 99, 51, 32,110,111,114,109, 97,108, 44, 32,118,
-101, 99, 51, 32,116,101,120,110,111,114,109, 97,108, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,110,111,114,109, 97,
-108, 41, 10,123, 10, 9,118,101, 99, 51, 32, 66, 32, 61, 32,116, 97,110,103,101,110,116, 46,119, 32, 42, 32, 99,114,111,115,115,
- 40,110,111,114,109, 97,108, 44, 32,116, 97,110,103,101,110,116, 46,120,121,122, 41, 59, 10, 10, 9,111,117,116,110,111,114,109,
- 97,108, 32, 61, 32,116,101,120,110,111,114,109, 97,108, 46,120, 42,116, 97,110,103,101,110,116, 46,120,121,122, 32, 43, 32,116,
-101,120,110,111,114,109, 97,108, 46,121, 42, 66, 32, 43, 32,116,101,120,110,111,114,109, 97,108, 46,122, 42,110,111,114,109, 97,
-108, 59, 10, 9,111,117,116,110,111,114,109, 97,108, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40,111,117,116,110,111,114,
-109, 97,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95, 98,108,101,110,100, 95,110,111,114,109, 97,108, 40,
-102,108,111, 97,116, 32,110,111,114,102, 97, 99, 44, 32,118,101, 99, 51, 32,110,111,114,109, 97,108, 44, 32,118,101, 99, 51, 32,
-110,101,119,110,111,114,109, 97,108, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,110,111,114,109, 97,108, 41, 10,123,
- 10, 9,111,117,116,110,111,114,109, 97,108, 32, 61, 32, 40, 49, 46, 48, 32, 45, 32,110,111,114,102, 97, 99, 41, 42,110,111,114,
-109, 97,108, 32, 43, 32,110,111,114,102, 97, 99, 42,110,101,119,110,111,114,109, 97,108, 59, 10, 9,111,117,116,110,111,114,109,
- 97,108, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40,111,117,116,110,111,114,109, 97,108, 41, 59, 10,125, 10, 10, 47, 42,
- 42, 42, 42, 42, 42, 42, 32, 77, 65, 84, 69, 82, 73, 65, 76, 32, 42, 42, 42, 42, 42, 42, 42, 42, 42, 47, 10, 10,118,111,105,100,
- 32,108, 97,109,112, 95,118,105,115,105, 98,105,108,105,116,121, 95,115,117,110, 95,104,101,109,105, 40,118,101, 99, 51, 32,108,
- 97,109,112,118,101, 99, 44, 32,111,117,116, 32,118,101, 99, 51, 32,108,118, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,100,
-105,115,116, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,118,105,115,105,102, 97, 99, 41, 10,123, 10, 9,108,118, 32, 61, 32,
-108, 97,109,112,118,101, 99, 59, 10, 9,100,105,115,116, 32, 61, 32, 49, 46, 48, 59, 10, 9,118,105,115,105,102, 97, 99, 32, 61,
- 32, 49, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,108, 97,109,112, 95,118,105,115,105, 98,105,108,105,116,121, 95,111,116,
-104,101,114, 40,118,101, 99, 51, 32, 99,111, 44, 32,118,101, 99, 51, 32,108, 97,109,112, 99,111, 44, 32,111,117,116, 32,118,101,
- 99, 51, 32,108,118, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,100,105,115,116, 44, 32,111,117,116, 32,102,108,111, 97,116,
- 32,118,105,115,105,102, 97, 99, 41, 10,123, 10, 9,108,118, 32, 61, 32, 99,111, 32, 45, 32,108, 97,109,112, 99,111, 59, 10, 9,
-100,105,115,116, 32, 61, 32,108,101,110,103,116,104, 40,108,118, 41, 59, 10, 9,108,118, 32, 61, 32,110,111,114,109, 97,108,105,
-122,101, 40,108,118, 41, 59, 10, 9,118,105,115,105,102, 97, 99, 32, 61, 32, 49, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,
-108, 97,109,112, 95,102, 97,108,108,111,102,102, 95,105,110,118,108,105,110,101, 97,114, 40,102,108,111, 97,116, 32,108, 97,109,
-112,100,105,115,116, 44, 32,102,108,111, 97,116, 32,100,105,115,116, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,118,105,115,
-105,102, 97, 99, 41, 10,123, 10, 9,118,105,115,105,102, 97, 99, 32, 61, 32,108, 97,109,112,100,105,115,116, 47, 40,108, 97,109,
-112,100,105,115,116, 32, 43, 32,100,105,115,116, 41, 59, 10,125, 10, 10,118,111,105,100, 32,108, 97,109,112, 95,102, 97,108,108,
-111,102,102, 95,105,110,118,115,113,117, 97,114,101, 40,102,108,111, 97,116, 32,108, 97,109,112,100,105,115,116, 44, 32,102,108,
-111, 97,116, 32,100,105,115,116, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,118,105,115,105,102, 97, 99, 41, 10,123, 10, 9,
-118,105,115,105,102, 97, 99, 32, 61, 32,108, 97,109,112,100,105,115,116, 47, 40,108, 97,109,112,100,105,115,116, 32, 43, 32,100,
-105,115,116, 42,100,105,115,116, 41, 59, 10,125, 10, 10,118,111,105,100, 32,108, 97,109,112, 95,102, 97,108,108,111,102,102, 95,
-115,108,105,100,101,114,115, 40,102,108,111, 97,116, 32,108, 97,109,112,100,105,115,116, 44, 32,102,108,111, 97,116, 32,108,100,
- 49, 44, 32,102,108,111, 97,116, 32,108,100, 50, 44, 32,102,108,111, 97,116, 32,100,105,115,116, 44, 32,111,117,116, 32,102,108,
-111, 97,116, 32,118,105,115,105,102, 97, 99, 41, 10,123, 10, 9,102,108,111, 97,116, 32,108, 97,109,112,100,105,115,116,107,119,
- 32, 61, 32,108, 97,109,112,100,105,115,116, 42,108, 97,109,112,100,105,115,116, 59, 10, 10, 9,118,105,115,105,102, 97, 99, 32,
- 61, 32,108, 97,109,112,100,105,115,116, 47, 40,108, 97,109,112,100,105,115,116, 32, 43, 32,108,100, 49, 42,100,105,115,116, 41,
- 59, 10, 9,118,105,115,105,102, 97, 99, 32, 42, 61, 32,108, 97,109,112,100,105,115,116,107,119, 47, 40,108, 97,109,112,100,105,
-115,116,107,119, 32, 43, 32,108,100, 50, 42,100,105,115,116, 42,100,105,115,116, 41, 59, 10,125, 10, 10,118,111,105,100, 32,108,
- 97,109,112, 95,102, 97,108,108,111,102,102, 95, 99,117,114,118,101, 40,102,108,111, 97,116, 32,108, 97,109,112,100,105,115,116,
- 44, 32,115, 97,109,112,108,101,114, 50, 68, 32, 99,117,114,118,101,109, 97,112, 44, 32,102,108,111, 97,116, 32,100,105,115,116,
- 44, 32,111,117,116, 32,102,108,111, 97,116, 32,118,105,115,105,102, 97, 99, 41, 10,123, 10, 9,118,105,115,105,102, 97, 99, 32,
- 61, 32,116,101,120,116,117,114,101, 50, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,118,101, 99, 50, 40,100,105,115,116, 47,
-108, 97,109,112,100,105,115,116, 44, 32, 48, 46, 48, 41, 41, 46,120, 59, 10,125, 10, 10,118,111,105,100, 32,108, 97,109,112, 95,
-118,105,115,105, 98,105,108,105,116,121, 95,115,112,104,101,114,101, 40,102,108,111, 97,116, 32,108, 97,109,112,100,105,115,116,
- 44, 32,102,108,111, 97,116, 32,100,105,115,116, 44, 32,102,108,111, 97,116, 32,118,105,115,105,102, 97, 99, 44, 32,111,117,116,
- 32,102,108,111, 97,116, 32,111,117,116,118,105,115,105,102, 97, 99, 41, 10,123, 10, 9,102,108,111, 97,116, 32,116, 61, 32,108,
- 97,109,112,100,105,115,116, 32, 45, 32,100,105,115,116, 59, 10, 10, 9,111,117,116,118,105,115,105,102, 97, 99, 61, 32,118,105,
-115,105,102, 97, 99, 42,109, 97,120, 40,116, 44, 32, 48, 46, 48, 41, 47,108, 97,109,112,100,105,115,116, 59, 10,125, 10, 10,118,
-111,105,100, 32,108, 97,109,112, 95,118,105,115,105, 98,105,108,105,116,121, 95,115,112,111,116, 95,115,113,117, 97,114,101, 40,
-118,101, 99, 51, 32,108, 97,109,112,118,101, 99, 44, 32,109, 97,116, 52, 32,108, 97,109,112,105,109, 97,116, 44, 32,118,101, 99,
- 51, 32,108,118, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,105,110,112,114, 41, 10,123, 10, 9,105,102, 40,100,111,116, 40,
-108,118, 44, 32,108, 97,109,112,118,101, 99, 41, 32, 62, 32, 48, 46, 48, 41, 32,123, 10, 9, 9,118,101, 99, 51, 32,108,118,114,
-111,116, 32, 61, 32, 40,108, 97,109,112,105,109, 97,116, 42,118,101, 99, 52, 40,108,118, 44, 32, 48, 46, 48, 41, 41, 46,120,121,
-122, 59, 10, 9, 9,102,108,111, 97,116, 32,120, 32, 61, 32,109, 97,120, 40, 97, 98,115, 40,108,118,114,111,116, 46,120, 47,108,
-118,114,111,116, 46,122, 41, 44, 32, 97, 98,115, 40,108,118,114,111,116, 46,121, 47,108,118,114,111,116, 46,122, 41, 41, 59, 10,
- 10, 9, 9,105,110,112,114, 32, 61, 32, 49, 46, 48, 47,115,113,114,116, 40, 49, 46, 48, 32, 43, 32,120, 42,120, 41, 59, 10, 9,
-125, 10, 9,101,108,115,101, 10, 9, 9,105,110,112,114, 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,108, 97,
-109,112, 95,118,105,115,105, 98,105,108,105,116,121, 95,115,112,111,116, 95, 99,105,114, 99,108,101, 40,118,101, 99, 51, 32,108,
- 97,109,112,118,101, 99, 44, 32,118,101, 99, 51, 32,108,118, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,105,110,112,114, 41,
- 10,123, 10, 9,105,110,112,114, 32, 61, 32,100,111,116, 40,108,118, 44, 32,108, 97,109,112,118,101, 99, 41, 59, 10,125, 10, 10,
-118,111,105,100, 32,108, 97,109,112, 95,118,105,115,105, 98,105,108,105,116,121, 95,115,112,111,116, 40,102,108,111, 97,116, 32,
-115,112,111,116,115,105, 44, 32,102,108,111, 97,116, 32,115,112,111,116, 98,108, 44, 32,102,108,111, 97,116, 32,105,110,112,114,
- 44, 32,102,108,111, 97,116, 32,118,105,115,105,102, 97, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118,105,
-115,105,102, 97, 99, 41, 10,123, 10, 9,102,108,111, 97,116, 32,116, 32, 61, 32,115,112,111,116,115,105, 59, 10, 10, 9,105,102,
- 40,105,110,112,114, 32, 60, 61, 32,116, 41, 32,123, 10, 9, 9,111,117,116,118,105,115,105,102, 97, 99, 32, 61, 32, 48, 46, 48,
- 59, 10, 9,125, 10, 9,101,108,115,101, 32,123, 10, 9, 9,116, 32, 61, 32,105,110,112,114, 32, 45, 32,116, 59, 10, 10, 9, 9,
- 47, 42, 32,115,111,102,116, 32, 97,114,101, 97, 32, 42, 47, 10, 9, 9,105,102, 40,115,112,111,116, 98,108, 32, 33, 61, 32, 48,
- 46, 48, 41, 10, 9, 9, 9,105,110,112,114, 32, 42, 61, 32,115,109,111,111,116,104,115,116,101,112, 40, 48, 46, 48, 44, 32, 49,
- 46, 48, 44, 32,116, 47,115,112,111,116, 98,108, 41, 59, 10, 10, 9, 9,111,117,116,118,105,115,105,102, 97, 99, 32, 61, 32,118,
-105,115,105,102, 97, 99, 42,105,110,112,114, 59, 10, 9,125, 10,125, 10, 10,118,111,105,100, 32,108, 97,109,112, 95,118,105,115,
-105, 98,105,108,105,116,121, 95, 99,108, 97,109,112, 40,102,108,111, 97,116, 32,118,105,115,105,102, 97, 99, 44, 32,111,117,116,
- 32,102,108,111, 97,116, 32,111,117,116,118,105,115,105,102, 97, 99, 41, 10,123, 10, 9,111,117,116,118,105,115,105,102, 97, 99,
- 32, 61, 32, 40,118,105,115,105,102, 97, 99, 32, 60, 32, 48, 46, 48, 48, 49, 41, 63, 32, 48, 46, 48, 58, 32,118,105,115,105,102,
- 97, 99, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,118,105,101,119, 40,118,101, 99, 51, 32, 99,111, 44, 32,
-111,117,116, 32,118,101, 99, 51, 32,118,105,101,119, 41, 10,123, 10, 9, 47, 42, 32,104, 97,110,100,108,101, 32,112,101,114,115,
-112,101, 99,116,105,118,101, 47,111,114,116,104,111,103,114, 97,112,104,105, 99, 32, 42, 47, 10, 9,118,105,101,119, 32, 61, 32,
- 40,103,108, 95, 80,114,111,106,101, 99,116,105,111,110, 77, 97,116,114,105,120, 91, 51, 93, 91, 51, 93, 32, 61, 61, 32, 48, 46,
- 48, 41, 63, 32,110,111,114,109, 97,108,105,122,101, 40, 99,111, 41, 58, 32,118,101, 99, 51, 40, 48, 46, 48, 44, 32, 48, 46, 48,
- 44, 32, 45, 49, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,116, 97,110,103,101,110,116, 95,118,
- 40,118,101, 99, 51, 32,108,118, 44, 32,118,101, 99, 51, 32,116, 97,110,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,118,110,
- 41, 10,123, 10, 9,118,101, 99, 51, 32, 99, 32, 61, 32, 99,114,111,115,115, 40,108,118, 44, 32,116, 97,110,103, 41, 59, 10, 9,
-118,101, 99, 51, 32,118,110,111,114, 32, 61, 32, 99,114,111,115,115, 40, 99, 44, 32,116, 97,110,103, 41, 59, 10, 10, 9,118,110,
- 32, 61, 32, 45,110,111,114,109, 97,108,105,122,101, 40,118,110,111,114, 41, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,
-100,101, 95,105,110,112, 40,118,101, 99, 51, 32,118,110, 44, 32,118,101, 99, 51, 32,108,118, 44, 32,111,117,116, 32,102,108,111,
- 97,116, 32,105,110,112, 41, 10,123, 10, 9,105,110,112, 32, 61, 32,100,111,116, 40,118,110, 44, 32,108,118, 41, 59, 10,125, 10,
- 10,118,111,105,100, 32,115,104, 97,100,101, 95,105,115, 95,110,111, 95,100,105,102,102,117,115,101, 40,111,117,116, 32,102,108,
-111, 97,116, 32,105,115, 41, 10,123, 10, 9,105,115, 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,
-100,101, 95,105,115, 95,104,101,109,105, 40,102,108,111, 97,116, 32,105,110,112, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,
-105,115, 41, 10,123, 10, 9,105,115, 32, 61, 32, 48, 46, 53, 42,105,110,112, 32, 43, 32, 48, 46, 53, 59, 10,125, 10, 10,102,108,
-111, 97,116, 32, 97,114,101, 97, 95,108, 97,109,112, 95,101,110,101,114,103,121, 40,109, 97,116, 52, 32, 97,114,101, 97, 44, 32,
-118,101, 99, 51, 32, 99,111, 44, 32,118,101, 99, 51, 32,118,110, 41, 10,123, 10, 9,118,101, 99, 51, 32,118,101, 99, 91, 52, 93,
- 44, 32, 99, 91, 52, 93, 59, 10, 9,102,108,111, 97,116, 32,114, 97,100, 91, 52, 93, 44, 32,102, 97, 99, 59, 10, 9, 10, 9,118,
-101, 99, 91, 48, 93, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40, 99,111, 32, 45, 32, 97,114,101, 97, 91, 48, 93, 46,120,
-121,122, 41, 59, 10, 9,118,101, 99, 91, 49, 93, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40, 99,111, 32, 45, 32, 97,114,
-101, 97, 91, 49, 93, 46,120,121,122, 41, 59, 10, 9,118,101, 99, 91, 50, 93, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40,
- 99,111, 32, 45, 32, 97,114,101, 97, 91, 50, 93, 46,120,121,122, 41, 59, 10, 9,118,101, 99, 91, 51, 93, 32, 61, 32,110,111,114,
-109, 97,108,105,122,101, 40, 99,111, 32, 45, 32, 97,114,101, 97, 91, 51, 93, 46,120,121,122, 41, 59, 10, 10, 9, 99, 91, 48, 93,
- 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40, 99,114,111,115,115, 40,118,101, 99, 91, 48, 93, 44, 32,118,101, 99, 91, 49,
- 93, 41, 41, 59, 10, 9, 99, 91, 49, 93, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40, 99,114,111,115,115, 40,118,101, 99,
- 91, 49, 93, 44, 32,118,101, 99, 91, 50, 93, 41, 41, 59, 10, 9, 99, 91, 50, 93, 32, 61, 32,110,111,114,109, 97,108,105,122,101,
- 40, 99,114,111,115,115, 40,118,101, 99, 91, 50, 93, 44, 32,118,101, 99, 91, 51, 93, 41, 41, 59, 10, 9, 99, 91, 51, 93, 32, 61,
- 32,110,111,114,109, 97,108,105,122,101, 40, 99,114,111,115,115, 40,118,101, 99, 91, 51, 93, 44, 32,118,101, 99, 91, 48, 93, 41,
- 41, 59, 10, 10, 9,114, 97,100, 91, 48, 93, 32, 61, 32, 97, 99,111,115, 40,100,111,116, 40,118,101, 99, 91, 48, 93, 44, 32,118,
-101, 99, 91, 49, 93, 41, 41, 59, 10, 9,114, 97,100, 91, 49, 93, 32, 61, 32, 97, 99,111,115, 40,100,111,116, 40,118,101, 99, 91,
- 49, 93, 44, 32,118,101, 99, 91, 50, 93, 41, 41, 59, 10, 9,114, 97,100, 91, 50, 93, 32, 61, 32, 97, 99,111,115, 40,100,111,116,
- 40,118,101, 99, 91, 50, 93, 44, 32,118,101, 99, 91, 51, 93, 41, 41, 59, 10, 9,114, 97,100, 91, 51, 93, 32, 61, 32, 97, 99,111,
-115, 40,100,111,116, 40,118,101, 99, 91, 51, 93, 44, 32,118,101, 99, 91, 48, 93, 41, 41, 59, 10, 10, 9,102, 97, 99, 61, 32, 32,
-114, 97,100, 91, 48, 93, 42,100,111,116, 40,118,110, 44, 32, 99, 91, 48, 93, 41, 59, 10, 9,102, 97, 99, 43, 61, 32,114, 97,100,
- 91, 49, 93, 42,100,111,116, 40,118,110, 44, 32, 99, 91, 49, 93, 41, 59, 10, 9,102, 97, 99, 43, 61, 32,114, 97,100, 91, 50, 93,
- 42,100,111,116, 40,118,110, 44, 32, 99, 91, 50, 93, 41, 59, 10, 9,102, 97, 99, 43, 61, 32,114, 97,100, 91, 51, 93, 42,100,111,
-116, 40,118,110, 44, 32, 99, 91, 51, 93, 41, 59, 10, 10, 9,114,101,116,117,114,110, 32,109, 97,120, 40,102, 97, 99, 44, 32, 48,
- 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,105,110,112, 95, 97,114,101, 97, 40,118,101, 99, 51,
- 32,112,111,115,105,116,105,111,110, 44, 32,118,101, 99, 51, 32,108, 97,109,112, 99,111, 44, 32,118,101, 99, 51, 32,108, 97,109,
-112,118,101, 99, 44, 32,118,101, 99, 51, 32,118,110, 44, 32,109, 97,116, 52, 32, 97,114,101, 97, 44, 32,102,108,111, 97,116, 32,
- 97,114,101, 97,115,105,122,101, 44, 32,102,108,111, 97,116, 32,107, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,105,110,112,
- 41, 10,123, 10, 9,118,101, 99, 51, 32, 99,111, 32, 61, 32,112,111,115,105,116,105,111,110, 59, 10, 9,118,101, 99, 51, 32,118,
-101, 99, 32, 61, 32, 99,111, 32, 45, 32,108, 97,109,112, 99,111, 59, 10, 10, 9,105,102, 40,100,111,116, 40,118,101, 99, 44, 32,
-108, 97,109,112,118,101, 99, 41, 32, 60, 32, 48, 46, 48, 41, 32,123, 10, 9, 9,105,110,112, 32, 61, 32, 48, 46, 48, 59, 10, 9,
-125, 10, 9,101,108,115,101, 32,123, 10, 9, 9,102,108,111, 97,116, 32,105,110,116,101,110,115, 32, 61, 32, 97,114,101, 97, 95,
-108, 97,109,112, 95,101,110,101,114,103,121, 40, 97,114,101, 97, 44, 32, 99,111, 44, 32,118,110, 41, 59, 10, 10, 9, 9,105,110,
-112, 32, 61, 32,112,111,119, 40,105,110,116,101,110,115, 42, 97,114,101, 97,115,105,122,101, 44, 32,107, 41, 59, 10, 9,125, 10,
-125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,100,105,102,102,117,115,101, 95,111,114,101,110, 95,110, 97,121,101,114,
- 40,102,108,111, 97,116, 32,110,108, 44, 32,118,101, 99, 51, 32,110, 44, 32,118,101, 99, 51, 32,108, 44, 32,118,101, 99, 51, 32,
-118, 44, 32,102,108,111, 97,116, 32,114,111,117,103,104, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,105,115, 41, 10,123, 10,
- 9,118,101, 99, 51, 32,104, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40,118, 32, 43, 32,108, 41, 59, 10, 9,102,108,111,
- 97,116, 32,110,104, 32, 61, 32,109, 97,120, 40,100,111,116, 40,110, 44, 32,104, 41, 44, 32, 48, 46, 48, 41, 59, 10, 9,102,108,
-111, 97,116, 32,110,118, 32, 61, 32,109, 97,120, 40,100,111,116, 40,110, 44, 32,118, 41, 44, 32, 48, 46, 48, 41, 59, 10, 9,102,
-108,111, 97,116, 32,114,101, 97,108,110,108, 32, 61, 32,100,111,116, 40,110, 44, 32,108, 41, 59, 10, 10, 9,105,102, 40,114,101,
- 97,108,110,108, 32, 60, 32, 48, 46, 48, 41, 32,123, 10, 9, 9,105,115, 32, 61, 32, 48, 46, 48, 59, 10, 9,125, 10, 9,101,108,
-115,101, 32,105,102, 40,110,108, 32, 60, 32, 48, 46, 48, 41, 32,123, 10, 9, 9,105,115, 32, 61, 32, 48, 46, 48, 59, 10, 9,125,
- 10, 9,101,108,115,101, 32,123, 10, 9, 9,102,108,111, 97,116, 32,118,104, 32, 61, 32,109, 97,120, 40,100,111,116, 40,118, 44,
- 32,104, 41, 44, 32, 48, 46, 48, 41, 59, 10, 9, 9,102,108,111, 97,116, 32, 76,105,116, 95, 65, 32, 61, 32, 97, 99,111,115, 40,
-114,101, 97,108,110,108, 41, 59, 10, 9, 9,102,108,111, 97,116, 32, 86,105,101,119, 95, 65, 32, 61, 32, 97, 99,111,115, 40,110,
-118, 41, 59, 10, 10, 9, 9,118,101, 99, 51, 32, 76,105,116, 95, 66, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40,108, 32,
- 45, 32,114,101, 97,108,110,108, 42,110, 41, 59, 10, 9, 9,118,101, 99, 51, 32, 86,105,101,119, 95, 66, 32, 61, 32,110,111,114,
-109, 97,108,105,122,101, 40,118, 32, 45, 32,110,118, 42,110, 41, 59, 10, 10, 9, 9,102,108,111, 97,116, 32,116, 32, 61, 32,109,
- 97,120, 40,100,111,116, 40, 76,105,116, 95, 66, 44, 32, 86,105,101,119, 95, 66, 41, 44, 32, 48, 46, 48, 41, 59, 10, 10, 9, 9,
-102,108,111, 97,116, 32, 97, 44, 32, 98, 59, 10, 10, 9, 9,105,102, 40, 76,105,116, 95, 65, 32, 62, 32, 86,105,101,119, 95, 65,
- 41, 32,123, 10, 9, 9, 9, 97, 32, 61, 32, 76,105,116, 95, 65, 59, 10, 9, 9, 9, 98, 32, 61, 32, 86,105,101,119, 95, 65, 59,
- 10, 9, 9,125, 10, 9, 9,101,108,115,101, 32,123, 10, 9, 9, 9, 97, 32, 61, 32, 86,105,101,119, 95, 65, 59, 10, 9, 9, 9,
- 98, 32, 61, 32, 76,105,116, 95, 65, 59, 10, 9, 9,125, 10, 10, 9, 9,102,108,111, 97,116, 32, 65, 32, 61, 32, 49, 46, 48, 32,
- 45, 32, 40, 48, 46, 53, 42, 40, 40,114,111,117,103,104, 42,114,111,117,103,104, 41, 47, 40, 40,114,111,117,103,104, 42,114,111,
-117,103,104, 41, 32, 43, 32, 48, 46, 51, 51, 41, 41, 41, 59, 10, 9, 9,102,108,111, 97,116, 32, 66, 32, 61, 32, 48, 46, 52, 53,
- 42, 40, 40,114,111,117,103,104, 42,114,111,117,103,104, 41, 47, 40, 40,114,111,117,103,104, 42,114,111,117,103,104, 41, 32, 43,
- 32, 48, 46, 48, 57, 41, 41, 59, 10, 10, 9, 9, 98, 32, 42, 61, 32, 48, 46, 57, 53, 59, 10, 9, 9,105,115, 32, 61, 32,110,108,
- 42, 40, 65, 32, 43, 32, 40, 66, 32, 42, 32,116, 32, 42, 32,115,105,110, 40, 97, 41, 32, 42, 32,116, 97,110, 40, 98, 41, 41, 41,
- 59, 10, 9,125, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,100,105,102,102,117,115,101, 95,116,111,111,110, 40,
-118,101, 99, 51, 32,110, 44, 32,118,101, 99, 51, 32,108, 44, 32,118,101, 99, 51, 32,118, 44, 32,102,108,111, 97,116, 32,115,105,
-122,101, 44, 32,102,108,111, 97,116, 32,116,115,109,111,111,116,104, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,105,115, 41,
- 10,123, 10, 9,102,108,111, 97,116, 32,114,115,108,116, 32, 61, 32,100,111,116, 40,110, 44, 32,108, 41, 59, 10, 9,102,108,111,
- 97,116, 32, 97,110,103, 32, 61, 32, 97, 99,111,115, 40,114,115,108,116, 41, 59, 10, 10, 9,105,102, 40, 97,110,103, 32, 60, 32,
-115,105,122,101, 41, 32,105,115, 32, 61, 32, 49, 46, 48, 59, 10, 9,101,108,115,101, 32,105,102, 40, 97,110,103, 32, 62, 32, 40,
-115,105,122,101, 32, 43, 32,116,115,109,111,111,116,104, 41, 32,124,124, 32,116,115,109,111,111,116,104, 32, 61, 61, 32, 48, 46,
- 48, 41, 32,105,115, 32, 61, 32, 48, 46, 48, 59, 10, 9,101,108,115,101, 32,105,115, 32, 61, 32, 49, 46, 48, 32, 45, 32, 40, 40,
- 97,110,103, 32, 45, 32,115,105,122,101, 41, 47,116,115,109,111,111,116,104, 41, 59, 10,125, 10, 10,118,111,105,100, 32,115,104,
- 97,100,101, 95,100,105,102,102,117,115,101, 95,109,105,110,110, 97,101,114,116, 40,102,108,111, 97,116, 32,110,108, 44, 32,118,
-101, 99, 51, 32,110, 44, 32,118,101, 99, 51, 32,118, 44, 32,102,108,111, 97,116, 32,100, 97,114,107,110,101,115,115, 44, 32,111,
-117,116, 32,102,108,111, 97,116, 32,105,115, 41, 10,123, 10, 9,105,102, 40,110,108, 32, 60, 61, 32, 48, 46, 48, 41, 32,123, 10,
- 9, 9,105,115, 32, 61, 32, 48, 46, 48, 59, 10, 9,125, 10, 9,101,108,115,101, 32,123, 10, 9, 9,102,108,111, 97,116, 32,110,
-118, 32, 61, 32,109, 97,120, 40,100,111,116, 40,110, 44, 32,118, 41, 44, 32, 48, 46, 48, 41, 59, 10, 10, 9, 9,105,102, 40,100,
- 97,114,107,110,101,115,115, 32, 60, 61, 32, 49, 46, 48, 41, 10, 9, 9, 9,105,115, 32, 61, 32,110,108, 42,112,111,119, 40,109,
- 97,120, 40,110,118, 42,110,108, 44, 32, 48, 46, 49, 41, 44, 32,100, 97,114,107,110,101,115,115, 32, 45, 32, 49, 46, 48, 41, 59,
- 10, 9, 9,101,108,115,101, 10, 9, 9, 9,105,115, 32, 61, 32,110,108, 42,112,111,119, 40, 49, 46, 48, 48, 48, 49, 32, 45, 32,
-110,118, 44, 32,100, 97,114,107,110,101,115,115, 32, 45, 32, 49, 46, 48, 41, 59, 10, 9,125, 10,125, 10, 10,102,108,111, 97,116,
- 32,102,114,101,115,110,101,108, 95,102, 97, 99, 40,118,101, 99, 51, 32,118,105,101,119, 44, 32,118,101, 99, 51, 32,118,110, 44,
- 32,102,108,111, 97,116, 32,103,114, 97,100, 44, 32,102,108,111, 97,116, 32,102, 97, 99, 41, 10,123, 10, 9,102,108,111, 97,116,
- 32,116, 49, 44, 32,116, 50, 59, 10, 9,102,108,111, 97,116, 32,102,102, 97, 99, 59, 10, 10, 9,105,102, 40,102, 97, 99, 61, 61,
- 48, 46, 48, 41, 32,123, 10, 9, 9,102,102, 97, 99, 32, 61, 32, 49, 46, 48, 59, 10, 9,125, 10, 9,101,108,115,101, 32,123, 10,
- 9, 9,116, 49, 61, 32,100,111,116, 40,118,105,101,119, 44, 32,118,110, 41, 59, 10, 9, 9,105,102, 40,116, 49, 62, 48, 46, 48,
- 41, 32, 32,116, 50, 61, 32, 49, 46, 48, 43,116, 49, 59, 10, 9, 9,101,108,115,101, 32,116, 50, 61, 32, 49, 46, 48, 45,116, 49,
- 59, 10, 10, 9, 9,116, 50, 61, 32,103,114, 97,100, 32, 43, 32, 40, 49, 46, 48, 45,103,114, 97,100, 41, 42,112,111,119, 40,116,
- 50, 44, 32,102, 97, 99, 41, 59, 10, 10, 9, 9,105,102, 40,116, 50, 60, 48, 46, 48, 41, 32,102,102, 97, 99, 32, 61, 32, 48, 46,
- 48, 59, 10, 9, 9,101,108,115,101, 32,105,102, 40,116, 50, 62, 49, 46, 48, 41, 32,102,102, 97, 99, 32, 61, 32, 49, 46, 48, 59,
- 10, 9, 9,101,108,115,101, 32,102,102, 97, 99, 32, 61, 32,116, 50, 59, 10, 9,125, 10, 10, 9,114,101,116,117,114,110, 32,102,
-102, 97, 99, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,100,105,102,102,117,115,101, 95,102,114,101,115,110,
-101,108, 40,118,101, 99, 51, 32,118,110, 44, 32,118,101, 99, 51, 32,108,118, 44, 32,118,101, 99, 51, 32,118,105,101,119, 44, 32,
-102,108,111, 97,116, 32,102, 97, 99, 95,105, 44, 32,102,108,111, 97,116, 32,102, 97, 99, 44, 32,111,117,116, 32,102,108,111, 97,
-116, 32,105,115, 41, 10,123, 10, 9,105,115, 32, 61, 32,102,114,101,115,110,101,108, 95,102, 97, 99, 40,108,118, 44, 32,118,110,
- 44, 32,102, 97, 99, 95,105, 44, 32,102, 97, 99, 41, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95, 99,117, 98,
-105, 99, 40,102,108,111, 97,116, 32,105,115, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,105,115, 41, 10,123, 10,
- 9,105,102, 40,105,115, 62, 48, 46, 48, 32, 38, 38, 32,105,115, 60, 49, 46, 48, 41, 10, 9, 9,111,117,116,105,115, 61, 32,115,
-109,111,111,116,104,115,116,101,112, 40, 48, 46, 48, 44, 32, 49, 46, 48, 44, 32,105,115, 41, 59, 10, 9,101,108,115,101, 10, 9,
- 9,111,117,116,105,115, 61, 32,105,115, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,118,105,115,105,102, 97,
- 99, 40,102,108,111, 97,116, 32,105, 44, 32,102,108,111, 97,116, 32,118,105,115,105,102, 97, 99, 44, 32,102,108,111, 97,116, 32,
-114,101,102,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,105, 41, 10,123, 10, 9, 47, 42,105,102, 40,105, 32,
- 62, 32, 48, 46, 48, 41, 42, 47, 10, 9, 9,111,117,116,105, 32, 61, 32,109, 97,120, 40,105, 42,118,105,115,105,102, 97, 99, 42,
-114,101,102,108, 44, 32, 48, 46, 48, 41, 59, 10, 9, 47, 42,101,108,115,101, 10, 9, 9,111,117,116,105, 32, 61, 32,105, 59, 42,
- 47, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,116, 97,110,103,101,110,116, 95,118, 95,115,112,101, 99, 40,118,
-101, 99, 51, 32,116, 97,110,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,118,110, 41, 10,123, 10, 9,118,110, 32, 61, 32,116,
- 97,110,103, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95, 97,100,100, 95,116,111, 95,100,105,102,102,117,115,
-101, 40,102,108,111, 97,116, 32,105, 44, 32,118,101, 99, 51, 32,108, 97,109,112, 99,111,108, 44, 32,118,101, 99, 51, 32, 99,111,
-108, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,105,102, 40,105, 32, 62, 32, 48, 46,
- 48, 41, 10, 9, 9,111,117,116, 99,111,108, 32, 61, 32,105, 42,108, 97,109,112, 99,111,108, 42, 99,111,108, 59, 10, 9,101,108,
-115,101, 10, 9, 9,111,117,116, 99,111,108, 32, 61, 32,118,101, 99, 51, 40, 48, 46, 48, 44, 32, 48, 46, 48, 44, 32, 48, 46, 48,
- 41, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,104,101,109,105, 95,115,112,101, 99, 40,118,101, 99, 51, 32,
-118,110, 44, 32,118,101, 99, 51, 32,108,118, 44, 32,118,101, 99, 51, 32,118,105,101,119, 44, 32,102,108,111, 97,116, 32,115,112,
-101, 99, 44, 32,102,108,111, 97,116, 32,104, 97,114,100, 44, 32,102,108,111, 97,116, 32,118,105,115,105,102, 97, 99, 44, 32,111,
-117,116, 32,102,108,111, 97,116, 32,116, 41, 10,123, 10, 9,108,118, 32, 43, 61, 32,118,105,101,119, 59, 10, 9,108,118, 32, 61,
- 32,110,111,114,109, 97,108,105,122,101, 40,108,118, 41, 59, 10, 10, 9,116, 32, 61, 32,100,111,116, 40,118,110, 44, 32,108,118,
- 41, 59, 10, 9,116, 32, 61, 32, 48, 46, 53, 42,116, 32, 43, 32, 48, 46, 53, 59, 10, 10, 9,116, 32, 61, 32,118,105,115,105,102,
- 97, 99, 42,115,112,101, 99, 42,112,111,119, 40,116, 44, 32,104, 97,114,100, 41, 59, 10,125, 10, 10,118,111,105,100, 32,115,104,
- 97,100,101, 95,112,104,111,110,103, 95,115,112,101, 99, 40,118,101, 99, 51, 32,110, 44, 32,118,101, 99, 51, 32,108, 44, 32,118,
-101, 99, 51, 32,118, 44, 32,102,108,111, 97,116, 32,104, 97,114,100, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,115,112,101,
- 99,102, 97, 99, 41, 10,123, 10, 9,118,101, 99, 51, 32,104, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40,108, 32, 43, 32,
-118, 41, 59, 10, 9,102,108,111, 97,116, 32,114,115,108,116, 32, 61, 32,109, 97,120, 40,100,111,116, 40,104, 44, 32,110, 41, 44,
- 32, 48, 46, 48, 41, 59, 10, 10, 9,115,112,101, 99,102, 97, 99, 32, 61, 32,112,111,119, 40,114,115,108,116, 44, 32,104, 97,114,
-100, 41, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95, 99,111,111,107,116,111,114,114, 95,115,112,101, 99, 40,
-118,101, 99, 51, 32,110, 44, 32,118,101, 99, 51, 32,108, 44, 32,118,101, 99, 51, 32,118, 44, 32,102,108,111, 97,116, 32,104, 97,
-114,100, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,115,112,101, 99,102, 97, 99, 41, 10,123, 10, 9,118,101, 99, 51, 32,104,
- 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40,118, 32, 43, 32,108, 41, 59, 10, 9,102,108,111, 97,116, 32,110,104, 32, 61,
- 32,100,111,116, 40,110, 44, 32,104, 41, 59, 10, 10, 9,105,102, 40,110,104, 32, 60, 32, 48, 46, 48, 41, 32,123, 10, 9, 9,115,
-112,101, 99,102, 97, 99, 32, 61, 32, 48, 46, 48, 59, 10, 9,125, 10, 9,101,108,115,101, 32,123, 10, 9, 9,102,108,111, 97,116,
- 32,110,118, 32, 61, 32,109, 97,120, 40,100,111,116, 40,110, 44, 32,118, 41, 44, 32, 48, 46, 48, 41, 59, 10, 9, 9,102,108,111,
- 97,116, 32,105, 32, 61, 32,112,111,119, 40,110,104, 44, 32,104, 97,114,100, 41, 59, 10, 10, 9, 9,105, 32, 61, 32,105, 47, 40,
- 48, 46, 49, 43,110,118, 41, 59, 10, 9, 9,115,112,101, 99,102, 97, 99, 32, 61, 32,105, 59, 10, 9,125, 10,125, 10, 10,118,111,
-105,100, 32,115,104, 97,100,101, 95, 98,108,105,110,110, 95,115,112,101, 99, 40,118,101, 99, 51, 32,110, 44, 32,118,101, 99, 51,
- 32,108, 44, 32,118,101, 99, 51, 32,118, 44, 32,102,108,111, 97,116, 32,114,101,102,114, 97, 99, 44, 32,102,108,111, 97,116, 32,
-115,112,101, 99, 95,112,111,119,101,114, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,115,112,101, 99,102, 97, 99, 41, 10,123,
- 10, 9,105,102, 40,114,101,102,114, 97, 99, 32, 60, 32, 49, 46, 48, 41, 32,123, 10, 9, 9,115,112,101, 99,102, 97, 99, 32, 61,
- 32, 48, 46, 48, 59, 10, 9,125, 10, 9,101,108,115,101, 32,105,102, 40,115,112,101, 99, 95,112,111,119,101,114, 32, 61, 61, 32,
- 48, 46, 48, 41, 32,123, 10, 9, 9,115,112,101, 99,102, 97, 99, 32, 61, 32, 48, 46, 48, 59, 10, 9,125, 10, 9,101,108,115,101,
- 32,123, 10, 9, 9,105,102, 40,115,112,101, 99, 95,112,111,119,101,114, 60, 49, 48, 48, 46, 48, 41, 10, 9, 9, 9,115,112,101,
- 99, 95,112,111,119,101,114, 61, 32,115,113,114,116, 40, 49, 46, 48, 47,115,112,101, 99, 95,112,111,119,101,114, 41, 59, 10, 9,
- 9,101,108,115,101, 10, 9, 9, 9,115,112,101, 99, 95,112,111,119,101,114, 61, 32, 49, 48, 46, 48, 47,115,112,101, 99, 95,112,
-111,119,101,114, 59, 10, 10, 9, 9,118,101, 99, 51, 32,104, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40,118, 32, 43, 32,
-108, 41, 59, 10, 9, 9,102,108,111, 97,116, 32,110,104, 32, 61, 32,100,111,116, 40,110, 44, 32,104, 41, 59, 10, 9, 9,105,102,
- 40,110,104, 32, 60, 32, 48, 46, 48, 41, 32,123, 10, 9, 9, 9,115,112,101, 99,102, 97, 99, 32, 61, 32, 48, 46, 48, 59, 10, 9,
- 9,125, 10, 9, 9,101,108,115,101, 32,123, 10, 9, 9, 9,102,108,111, 97,116, 32,110,118, 32, 61, 32,109, 97,120, 40,100,111,
-116, 40,110, 44, 32,118, 41, 44, 32, 48, 46, 48, 49, 41, 59, 10, 9, 9, 9,102,108,111, 97,116, 32,110,108, 32, 61, 32,100,111,
-116, 40,110, 44, 32,108, 41, 59, 10, 9, 9, 9,105,102, 40,110,108, 32, 60, 61, 32, 48, 46, 48, 49, 41, 32,123, 10, 9, 9, 9,
- 9,115,112,101, 99,102, 97, 99, 32, 61, 32, 48, 46, 48, 59, 10, 9, 9, 9,125, 10, 9, 9, 9,101,108,115,101, 32,123, 10, 9,
- 9, 9, 9,102,108,111, 97,116, 32,118,104, 32, 61, 32,109, 97,120, 40,100,111,116, 40,118, 44, 32,104, 41, 44, 32, 48, 46, 48,
- 49, 41, 59, 10, 10, 9, 9, 9, 9,102,108,111, 97,116, 32, 97, 32, 61, 32, 49, 46, 48, 59, 10, 9, 9, 9, 9,102,108,111, 97,
-116, 32, 98, 32, 61, 32, 40, 50, 46, 48, 42,110,104, 42,110,118, 41, 47,118,104, 59, 10, 9, 9, 9, 9,102,108,111, 97,116, 32,
- 99, 32, 61, 32, 40, 50, 46, 48, 42,110,104, 42,110,108, 41, 47,118,104, 59, 10, 10, 9, 9, 9, 9,102,108,111, 97,116, 32,103,
- 32, 61, 32, 48, 46, 48, 59, 10, 10, 9, 9, 9, 9,105,102, 40, 97, 32, 60, 32, 98, 32, 38, 38, 32, 97, 32, 60, 32, 99, 41, 32,
-103, 32, 61, 32, 97, 59, 10, 9, 9, 9, 9,101,108,115,101, 32,105,102, 40, 98, 32, 60, 32, 97, 32, 38, 38, 32, 98, 32, 60, 32,
- 99, 41, 32,103, 32, 61, 32, 98, 59, 10, 9, 9, 9, 9,101,108,115,101, 32,105,102, 40, 99, 32, 60, 32, 97, 32, 38, 38, 32, 99,
- 32, 60, 32, 98, 41, 32,103, 32, 61, 32, 99, 59, 10, 10, 9, 9, 9, 9,102,108,111, 97,116, 32,112, 32, 61, 32,115,113,114,116,
- 40, 40, 40,114,101,102,114, 97, 99, 32, 42, 32,114,101,102,114, 97, 99, 41, 43, 40,118,104, 42,118,104, 41, 45, 49, 46, 48, 41,
- 41, 59, 10, 9, 9, 9, 9,102,108,111, 97,116, 32,102, 32, 61, 32, 40, 40, 40,112, 45,118,104, 41, 42, 40,112, 45,118,104, 41,
- 41, 47, 40, 40,112, 43,118,104, 41, 42, 40,112, 43,118,104, 41, 41, 41, 42, 40, 49, 46, 48, 43, 40, 40, 40, 40,118,104, 42, 40,
-112, 43,118,104, 41, 41, 45, 49, 46, 48, 41, 42, 40, 40,118,104, 42, 40,112, 43,118,104, 41, 41, 45, 49, 46, 48, 41, 41, 47, 40,
- 40, 40,118,104, 42, 40,112, 45,118,104, 41, 41, 43, 49, 46, 48, 41, 42, 40, 40,118,104, 42, 40,112, 45,118,104, 41, 41, 43, 49,
- 46, 48, 41, 41, 41, 41, 59, 10, 9, 9, 9, 9,102,108,111, 97,116, 32, 97,110,103, 32, 61, 32, 97, 99,111,115, 40,110,104, 41,
- 59, 10, 10, 9, 9, 9, 9,115,112,101, 99,102, 97, 99, 32, 61, 32,109, 97,120, 40,102, 42,103, 42,101,120,112, 95, 98,108,101,
-110,100,101,114, 40, 40, 45, 40, 97,110,103, 42, 97,110,103, 41, 47, 40, 50, 46, 48, 42,115,112,101, 99, 95,112,111,119,101,114,
- 42,115,112,101, 99, 95,112,111,119,101,114, 41, 41, 41, 44, 32, 48, 46, 48, 41, 59, 10, 9, 9, 9,125, 10, 9, 9,125, 10, 9,
-125, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,119, 97,114,100,105,115,111, 95,115,112,101, 99, 40,118,101, 99,
- 51, 32,110, 44, 32,118,101, 99, 51, 32,108, 44, 32,118,101, 99, 51, 32,118, 44, 32,102,108,111, 97,116, 32,114,109,115, 44, 32,
-111,117,116, 32,102,108,111, 97,116, 32,115,112,101, 99,102, 97, 99, 41, 10,123, 10, 9,118,101, 99, 51, 32,104, 32, 61, 32,110,
-111,114,109, 97,108,105,122,101, 40,108, 32, 43, 32,118, 41, 59, 10, 9,102,108,111, 97,116, 32,110,104, 32, 61, 32,109, 97,120,
- 40,100,111,116, 40,110, 44, 32,104, 41, 44, 32, 48, 46, 48, 48, 49, 41, 59, 10, 9,102,108,111, 97,116, 32,110,118, 32, 61, 32,
-109, 97,120, 40,100,111,116, 40,110, 44, 32,118, 41, 44, 32, 48, 46, 48, 48, 49, 41, 59, 10, 9,102,108,111, 97,116, 32,110,108,
- 32, 61, 32,109, 97,120, 40,100,111,116, 40,110, 44, 32,108, 41, 44, 32, 48, 46, 48, 48, 49, 41, 59, 10, 9,102,108,111, 97,116,
- 32, 97,110,103,108,101, 32, 61, 32,116, 97,110, 40, 97, 99,111,115, 40,110,104, 41, 41, 59, 10, 9,102,108,111, 97,116, 32, 97,
-108,112,104, 97, 32, 61, 32,109, 97,120, 40,114,109,115, 44, 32, 48, 46, 48, 48, 49, 41, 59, 10, 10, 9,115,112,101, 99,102, 97,
- 99, 61, 32,110,108, 32, 42, 32, 40, 49, 46, 48, 47, 40, 52, 46, 48, 42, 77, 95, 80, 73, 42, 97,108,112,104, 97, 42, 97,108,112,
-104, 97, 41, 41, 42, 40,101,120,112, 95, 98,108,101,110,100,101,114, 40, 45, 40, 97,110,103,108,101, 42, 97,110,103,108,101, 41,
- 47, 40, 97,108,112,104, 97, 42, 97,108,112,104, 97, 41, 41, 47, 40,115,113,114,116, 40,110,118, 42,110,108, 41, 41, 41, 59, 10,
-125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,116,111,111,110, 95,115,112,101, 99, 40,118,101, 99, 51, 32,110, 44, 32,
-118,101, 99, 51, 32,108, 44, 32,118,101, 99, 51, 32,118, 44, 32,102,108,111, 97,116, 32,115,105,122,101, 44, 32,102,108,111, 97,
-116, 32,116,115,109,111,111,116,104, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,115,112,101, 99,102, 97, 99, 41, 10,123, 10,
- 9,118,101, 99, 51, 32,104, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40,108, 32, 43, 32,118, 41, 59, 10, 9,102,108,111,
- 97,116, 32,114,115,108,116, 32, 61, 32,100,111,116, 40,104, 44, 32,110, 41, 59, 10, 9,102,108,111, 97,116, 32, 97,110,103, 32,
- 61, 32, 97, 99,111,115, 40,114,115,108,116, 41, 59, 10, 10, 9,105,102, 40, 97,110,103, 32, 60, 32,115,105,122,101, 41, 32,114,
-115,108,116, 32, 61, 32, 49, 46, 48, 59, 10, 9,101,108,115,101, 32,105,102, 40, 97,110,103, 32, 62, 61, 32, 40,115,105,122,101,
- 32, 43, 32,116,115,109,111,111,116,104, 41, 32,124,124, 32,116,115,109,111,111,116,104, 32, 61, 61, 32, 48, 46, 48, 41, 32,114,
-115,108,116, 32, 61, 32, 48, 46, 48, 59, 10, 9,101,108,115,101, 32,114,115,108,116, 32, 61, 32, 49, 46, 48, 32, 45, 32, 40, 40,
- 97,110,103, 32, 45, 32,115,105,122,101, 41, 47,116,115,109,111,111,116,104, 41, 59, 10, 10, 9,115,112,101, 99,102, 97, 99, 32,
- 61, 32,114,115,108,116, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,115,112,101, 99, 95, 97,114,101, 97, 95,
-105,110,112, 40,102,108,111, 97,116, 32,115,112,101, 99,102, 97, 99, 44, 32,102,108,111, 97,116, 32,105,110,112, 44, 32,111,117,
-116, 32,102,108,111, 97,116, 32,111,117,116,115,112,101, 99,102, 97, 99, 41, 10,123, 10, 9,111,117,116,115,112,101, 99,102, 97,
- 99, 32, 61, 32,115,112,101, 99,102, 97, 99, 42,105,110,112, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,115,
-112,101, 99, 95,116, 40,102,108,111, 97,116, 32,115,104, 97,100,102, 97, 99, 44, 32,102,108,111, 97,116, 32,115,112,101, 99, 44,
- 32,102,108,111, 97,116, 32,118,105,115,105,102, 97, 99, 44, 32,102,108,111, 97,116, 32,115,112,101, 99,102, 97, 99, 44, 32,111,
-117,116, 32,102,108,111, 97,116, 32,116, 41, 10,123, 10, 9,116, 32, 61, 32,115,104, 97,100,102, 97, 99, 42,115,112,101, 99, 42,
-118,105,115,105,102, 97, 99, 42,115,112,101, 99,102, 97, 99, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95, 97,
-100,100, 95,115,112,101, 99, 40,102,108,111, 97,116, 32,116, 44, 32,118,101, 99, 51, 32,108, 97,109,112, 99,111,108, 44, 32,118,
-101, 99, 51, 32,115,112,101, 99, 99,111,108, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116, 99,111,108, 41, 10,123, 10,
- 9,111,117,116, 99,111,108, 32, 61, 32,116, 42,108, 97,109,112, 99,111,108, 42,115,112,101, 99, 99,111,108, 59, 10,125, 10, 10,
-118,111,105,100, 32,115,104, 97,100,101, 95, 97,100,100, 40,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,
-111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,111,117,116, 99,111,108, 32,
- 61, 32, 99,111,108, 49, 32, 43, 32, 99,111,108, 50, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,109, 97,100,
-100, 40,118,101, 99, 52, 32, 99,111,108, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50,
- 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,
-111,108, 32, 43, 32, 99,111,108, 49, 42, 99,111,108, 50, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95, 97,100,
-100, 95, 99,108, 97,109,112,101,100, 40,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,
-111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,111,108,
- 49, 32, 43, 32,109, 97,120, 40, 99,111,108, 50, 44, 32,118,101, 99, 52, 40, 48, 46, 48, 44, 32, 48, 46, 48, 44, 32, 48, 46, 48,
- 44, 32, 48, 46, 48, 41, 41, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,109, 97,100,100, 95, 99,108, 97,109,
-112,101,100, 40,118,101, 99, 52, 32, 99,111,108, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,
-108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,111,117,116, 99,111,108, 32, 61,
- 32, 99,111,108, 32, 43, 32,109, 97,120, 40, 99,111,108, 49, 42, 99,111,108, 50, 44, 32,118,101, 99, 52, 40, 48, 46, 48, 44, 32,
- 48, 46, 48, 44, 32, 48, 46, 48, 44, 32, 48, 46, 48, 41, 41, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,109,
- 97,100,100,102, 40,118,101, 99, 52, 32, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 44, 32,118,101, 99, 52, 32, 99,111,108,
- 49, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,111,117,116, 99,111,108, 32, 61, 32,
- 99,111,108, 32, 43, 32,102, 42, 99,111,108, 49, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,109,117,108, 40,
-118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,
-117,116, 99,111,108, 41, 10,123, 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,111,108, 49, 42, 99,111,108, 50, 59, 10,125, 10,
- 10,118,111,105,100, 32,115,104, 97,100,101, 95,109,117,108, 95,118, 97,108,117,101, 40,102,108,111, 97,116, 32,102, 97, 99, 44,
- 32,118,101, 99, 52, 32, 99,111,108, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,111,
-117,116, 99,111,108, 32, 61, 32, 99,111,108, 42,102, 97, 99, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,111,
- 98, 99,111,108,111,114, 40,118,101, 99, 52, 32, 99,111,108, 44, 32,118,101, 99, 52, 32,111, 98, 99,111,108, 44, 32,111,117,116,
- 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,111,117,116, 99,111,108, 32, 61, 32,118,101, 99, 52, 40, 99,
-111,108, 46,114,103, 98, 42,111, 98, 99,111,108, 46,114,103, 98, 44, 32, 99,111,108, 46, 97, 41, 59, 10,125, 10, 10,118,111,105,
-100, 32,114, 97,109,112, 95,114,103, 98,116,111, 98,119, 40,118,101, 99, 51, 32, 99,111,108,111,114, 44, 32,111,117,116, 32,102,
-108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32, 99,111,108,111,114, 46,114,
- 42, 48, 46, 51, 32, 43, 32, 99,111,108,111,114, 46,103, 42, 48, 46, 53, 56, 32, 43, 32, 99,111,108,111,114, 46, 98, 42, 48, 46,
- 49, 50, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,111,110,108,121, 95,115,104, 97,100,111,119, 40,102,108,
-111, 97,116, 32,105, 44, 32,102,108,111, 97,116, 32,115,104, 97,100,102, 97, 99, 44, 32,102,108,111, 97,116, 32,101,110,101,114,
-103,121, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,115,104, 97,100,102, 97, 99, 41, 10,123, 10, 9,111,117,116,
-115,104, 97,100,102, 97, 99, 32, 61, 32,105, 42,101,110,101,114,103,121, 42, 40, 49, 46, 48, 32, 45, 32,115,104, 97,100,102, 97,
- 99, 41, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,111,110,108,121, 95,115,104, 97,100,111,119, 95,100,105,
-102,102,117,115,101, 40,102,108,111, 97,116, 32,115,104, 97,100,102, 97, 99, 44, 32,118,101, 99, 51, 32,114,103, 98, 44, 32,118,
-101, 99, 52, 32,100,105,102,102, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116,100,105,102,102, 41, 10,123, 10, 9,111,
-117,116,100,105,102,102, 32, 61, 32,100,105,102,102, 32, 45, 32,118,101, 99, 52, 40,114,103, 98, 42,115,104, 97,100,102, 97, 99,
- 44, 32, 48, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,111,110,108,121, 95,115,104, 97,100,111,
-119, 95,115,112,101, 99,117,108, 97,114, 40,102,108,111, 97,116, 32,115,104, 97,100,102, 97, 99, 44, 32,118,101, 99, 51, 32,115,
-112,101, 99,114,103, 98, 44, 32,118,101, 99, 52, 32,115,112,101, 99, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116,115,
-112,101, 99, 41, 10,123, 10, 9,111,117,116,115,112,101, 99, 32, 61, 32,115,112,101, 99, 32, 45, 32,118,101, 99, 52, 40,115,112,
-101, 99,114,103, 98, 42,115,104, 97,100,102, 97, 99, 44, 32, 48, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,116,101,115,
-116, 95,115,104, 97,100,111,119, 98,117,102, 40,118,101, 99, 51, 32,114, 99,111, 44, 32,115, 97,109,112,108,101,114, 50, 68, 83,
-104, 97,100,111,119, 32,115,104, 97,100,111,119,109, 97,112, 44, 32,109, 97,116, 52, 32,115,104, 97,100,111,119,112,101,114,115,
-109, 97,116, 44, 32,102,108,111, 97,116, 32,115,104, 97,100,111,119, 98,105, 97,115, 44, 32,102,108,111, 97,116, 32,105,110,112,
- 44, 32,111,117,116, 32,102,108,111, 97,116, 32,114,101,115,117,108,116, 41, 10,123, 10, 9,105,102, 40,105,110,112, 32, 60, 61,
- 32, 48, 46, 48, 41, 32,123, 10, 9, 9,114,101,115,117,108,116, 32, 61, 32, 48, 46, 48, 59, 10, 9,125, 10, 9,101,108,115,101,
- 32,123, 10, 9, 9,118,101, 99, 52, 32, 99,111, 32, 61, 32,115,104, 97,100,111,119,112,101,114,115,109, 97,116, 42,118,101, 99,
- 52, 40,114, 99,111, 44, 32, 49, 46, 48, 41, 59, 10, 10, 9, 9, 47, 47,102,108,111, 97,116, 32, 98,105, 97,115, 32, 61, 32, 40,
- 49, 46, 53, 32, 45, 32,105,110,112, 42,105,110,112, 41, 42,115,104, 97,100,111,119, 98,105, 97,115, 59, 10, 9, 9, 99,111, 46,
-122, 32, 45, 61, 32,115,104, 97,100,111,119, 98,105, 97,115, 42, 99,111, 46,119, 59, 10, 10, 9, 9,114,101,115,117,108,116, 32,
- 61, 32,115,104, 97,100,111,119, 50, 68, 80,114,111,106, 40,115,104, 97,100,111,119,109, 97,112, 44, 32, 99,111, 41, 46,120, 59,
- 10, 9,125, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,101,120,112,111,115,117,114,101, 95, 99,111,114,114,101,
- 99,116, 40,118,101, 99, 51, 32, 99,111,108, 44, 32,102,108,111, 97,116, 32,108,105,110,102, 97, 99, 44, 32,102,108,111, 97,116,
- 32,108,111,103,102, 97, 99, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,111,117,116,
- 99,111,108, 32, 61, 32,108,105,110,102, 97, 99, 42, 40, 49, 46, 48, 32, 45, 32,101,120,112, 40, 99,111,108, 42,108,111,103,102,
- 97, 99, 41, 41, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,109,105,115,116, 95,102, 97, 99,116,111,114, 40,
-118,101, 99, 51, 32, 99,111, 44, 32,102,108,111, 97,116, 32,109,105,115,116,115,116, 97, 44, 32,102,108,111, 97,116, 32,109,105,
-115,116,100,105,115,116, 44, 32,102,108,111, 97,116, 32,109,105,115,116,116,121,112,101, 44, 32,102,108,111, 97,116, 32,109,105,
-115,105, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,102, 97, 99, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102,
- 97, 99, 44, 32,122, 99,111,114, 59, 10, 10, 9,122, 99,111,114, 32, 61, 32, 40,103,108, 95, 80,114,111,106,101, 99,116,105,111,
-110, 77, 97,116,114,105,120, 91, 51, 93, 91, 51, 93, 32, 61, 61, 32, 48, 46, 48, 41, 63, 32,108,101,110,103,116,104, 40, 99,111,
- 41, 58, 32, 45, 99,111, 91, 50, 93, 59, 10, 9, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40, 40,122, 99,111,114, 45,
-109,105,115,116,115,116, 97, 41, 47,109,105,115,116,100,105,115,116, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,105,
-102, 40,109,105,115,116,116,121,112,101, 32, 61, 61, 32, 48, 46, 48, 41, 32,102, 97, 99, 32, 42, 61, 32,102, 97, 99, 59, 10, 9,
-101,108,115,101, 32,105,102, 40,109,105,115,116,116,121,112,101, 32, 61, 61, 32, 49, 46, 48, 41, 59, 10, 9,101,108,115,101, 32,
-102, 97, 99, 32, 61, 32,115,113,114,116, 40,102, 97, 99, 41, 59, 10, 10, 9,111,117,116,102, 97, 99, 32, 61, 32, 49, 46, 48, 32,
- 45, 32, 40, 49, 46, 48, 45,102, 97, 99, 41, 42, 40, 49, 46, 48, 45,109,105,115,105, 41, 59, 10,125, 10, 10,118,111,105,100, 32,
-115,104, 97,100,101, 95,119,111,114,108,100, 95,109,105,120, 40,118,101, 99, 51, 32,104,111,114, 44, 32,118,101, 99, 52, 32, 99,
-111,108, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97,
- 99, 32, 61, 32, 99,108, 97,109,112, 40, 99,111,108, 46, 97, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,111,117,116,
- 99,111,108, 32, 61, 32,118,101, 99, 52, 40,109,105,120, 40,104,111,114, 44, 32, 99,111,108, 46,114,103, 98, 44, 32,102, 97, 99,
- 41, 44, 32, 99,111,108, 46, 97, 41, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95, 97,108,112,104, 97, 95,111,
-112, 97,113,117,101, 40,118,101, 99, 52, 32, 99,111,108, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41,
- 10,123, 10, 9,111,117,116, 99,111,108, 32, 61, 32,118,101, 99, 52, 40, 99,111,108, 46,114,103, 98, 44, 32, 49, 46, 48, 41, 59,
- 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95, 97,108,112,104, 97, 95,111, 98, 99,111,108,111,114, 40,118,101, 99,
- 52, 32, 99,111,108, 44, 32,118,101, 99, 52, 32,111, 98, 99,111,108, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,
-111,108, 41, 10,123, 10, 9,111,117,116, 99,111,108, 32, 61, 32,118,101, 99, 52, 40, 99,111,108, 46,114,103, 98, 44, 32, 99,111,
-108, 46, 97, 42,111, 98, 99,111,108, 46, 97, 41, 59, 10,125, 10, 10, 47, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 32, 78, 69,
- 87, 32, 83, 72, 65, 68, 69, 82, 32, 85, 84, 73, 76, 73, 84, 73, 69, 83, 32, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
- 42, 47, 10, 10,102,108,111, 97,116, 32,102,114,101,115,110,101,108, 95,100,105,101,108,101, 99,116,114,105, 99, 40,118,101, 99,
- 51, 32, 73,110, 99,111,109,105,110,103, 44, 32,118,101, 99, 51, 32, 78,111,114,109, 97,108, 44, 32,102,108,111, 97,116, 32,101,
-116, 97, 41, 10,123, 10, 32, 32, 32, 32, 47, 42, 32, 99,111,109,112,117,116,101, 32,102,114,101,115,110,101,108, 32,114,101,102,
-108,101, 99,116, 97,110, 99,101, 32,119,105,116,104,111,117,116, 32,101,120,112,108,105, 99,105,116,108,121, 32, 99,111,109,112,
-117,116,105,110,103, 10, 32, 32, 32, 32, 32, 32, 32,116,104,101, 32,114,101,102,114, 97, 99,116,101,100, 32,100,105,114,101, 99,
-116,105,111,110, 32, 42, 47, 10, 32, 32, 32, 32,102,108,111, 97,116, 32, 99, 32, 61, 32, 97, 98,115, 40,100,111,116, 40, 73,110,
- 99,111,109,105,110,103, 44, 32, 78,111,114,109, 97,108, 41, 41, 59, 10, 32, 32, 32, 32,102,108,111, 97,116, 32,103, 32, 61, 32,
-101,116, 97, 32, 42, 32,101,116, 97, 32, 45, 32, 49, 46, 48, 32, 43, 32, 99, 32, 42, 32, 99, 59, 10, 32, 32, 32, 32,102,108,111,
- 97,116, 32,114,101,115,117,108,116, 59, 10, 10, 32, 32, 32, 32,105,102, 40,103, 32, 62, 32, 48, 46, 48, 41, 32,123, 10, 32, 32,
- 32, 32, 32, 32, 32, 32,103, 32, 61, 32,115,113,114,116, 40,103, 41, 59, 10, 32, 32, 32, 32, 32, 32, 32, 32,102,108,111, 97,116,
- 32, 65, 32, 61, 40,103, 32, 45, 32, 99, 41, 47, 40,103, 32, 43, 32, 99, 41, 59, 10, 32, 32, 32, 32, 32, 32, 32, 32,102,108,111,
- 97,116, 32, 66, 32, 61, 40, 99, 32, 42, 40,103, 32, 43, 32, 99, 41, 45, 32, 49, 46, 48, 41, 47, 40, 99, 32, 42, 40,103, 32, 45,
- 32, 99, 41, 43, 32, 49, 46, 48, 41, 59, 10, 32, 32, 32, 32, 32, 32, 32, 32,114,101,115,117,108,116, 32, 61, 32, 48, 46, 53, 32,
- 42, 32, 65, 32, 42, 32, 65, 32, 42, 40, 49, 46, 48, 32, 43, 32, 66, 32, 42, 32, 66, 41, 59, 10, 32, 32, 32, 32,125, 10, 32, 32,
- 32, 32,101,108,115,101, 10, 32, 32, 32, 32, 32, 32, 32, 32,114,101,115,117,108,116, 32, 61, 32, 49, 46, 48, 59, 32, 32, 47, 42,
- 32, 84, 73, 82, 32, 40,110,111, 32,114,101,102,114, 97, 99,116,101,100, 32, 99,111,109,112,111,110,101,110,116, 41, 32, 42, 47,
- 10, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,114,101,115,117,108,116, 59, 10,125, 10, 10,102,108,111, 97,116, 32,104,121,
-112,111,116, 40,102,108,111, 97,116, 32,120, 44, 32,102,108,111, 97,116, 32,121, 41, 10,123, 10, 9,114,101,116,117,114,110, 32,
-115,113,114,116, 40,120, 42,120, 32, 43, 32,121, 42,121, 41, 59, 10,125, 10, 10, 47, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
- 32, 78, 69, 87, 32, 83, 72, 65, 68, 69, 82, 32, 78, 79, 68, 69, 83, 32, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
- 42, 47, 10, 10, 35,100,101,102,105,110,101, 32, 78, 85, 77, 95, 76, 73, 71, 72, 84, 83, 32, 51, 10, 10, 47, 42, 32, 98,115,100,
-102,115, 32, 42, 47, 10, 10,118,111,105,100, 32,110,111,100,101, 95, 98,115,100,102, 95,100,105,102,102,117,115,101, 40,118,101,
- 99, 52, 32, 99,111,108,111,114, 44, 32,102,108,111, 97,116, 32,114,111,117,103,104,110,101,115,115, 44, 32,118,101, 99, 51, 32,
- 78, 44, 32,111,117,116, 32,118,101, 99, 52, 32,114,101,115,117,108,116, 41, 10,123, 10, 9, 47, 42, 32, 97,109, 98,105,101,110,
-116, 32,108,105,103,104,116, 32, 42, 47, 10, 9,118,101, 99, 51, 32, 76, 32, 61, 32,118,101, 99, 51, 40, 48, 46, 50, 41, 59, 10,
- 10, 9, 47, 42, 32,100,105,114,101, 99,116,105,111,110, 97,108, 32,108,105,103,104,116,115, 32, 42, 47, 10, 9,102,111,114, 40,
-105,110,116, 32,105, 32, 61, 32, 48, 59, 32,105, 32, 60, 32, 78, 85, 77, 95, 76, 73, 71, 72, 84, 83, 59, 32,105, 43, 43, 41, 32,
-123, 10, 9, 9,118,101, 99, 51, 32,108,105,103,104,116, 95,112,111,115,105,116,105,111,110, 32, 61, 32,103,108, 95, 76,105,103,
-104,116, 83,111,117,114, 99,101, 91,105, 93, 46,112,111,115,105,116,105,111,110, 46,120,121,122, 59, 10, 9, 9,118,101, 99, 51,
- 32,108,105,103,104,116, 95,100,105,102,102,117,115,101, 32, 61, 32,103,108, 95, 76,105,103,104,116, 83,111,117,114, 99,101, 91,
-105, 93, 46,100,105,102,102,117,115,101, 46,114,103, 98, 59, 10, 10, 9, 9,102,108,111, 97,116, 32, 98,115,100,102, 32, 61, 32,
-109, 97,120, 40,100,111,116, 40, 78, 44, 32,108,105,103,104,116, 95,112,111,115,105,116,105,111,110, 41, 44, 32, 48, 46, 48, 41,
- 59, 10, 9, 9, 76, 32, 43, 61, 32,108,105,103,104,116, 95,100,105,102,102,117,115,101, 42, 98,115,100,102, 59, 10, 9,125, 10,
- 10, 9,114,101,115,117,108,116, 32, 61, 32,118,101, 99, 52, 40, 76, 42, 99,111,108,111,114, 46,114,103, 98, 44, 32, 49, 46, 48,
- 41, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,100,101, 95, 98,115,100,102, 95,103,108,111,115,115,121, 40,118,101, 99, 52,
- 32, 99,111,108,111,114, 44, 32,102,108,111, 97,116, 32,114,111,117,103,104,110,101,115,115, 44, 32,118,101, 99, 51, 32, 78, 44,
- 32,118,101, 99, 51, 32, 73, 44, 32,111,117,116, 32,118,101, 99, 52, 32,114,101,115,117,108,116, 41, 10,123, 10, 9, 47, 42, 32,
- 97,109, 98,105,101,110,116, 32,108,105,103,104,116, 32, 42, 47, 10, 9,118,101, 99, 51, 32, 76, 32, 61, 32,118,101, 99, 51, 40,
- 48, 46, 50, 41, 59, 10, 10, 9, 47, 42, 32,100,105,114,101, 99,116,105,111,110, 97,108, 32,108,105,103,104,116,115, 32, 42, 47,
- 10, 9,102,111,114, 40,105,110,116, 32,105, 32, 61, 32, 48, 59, 32,105, 32, 60, 32, 78, 85, 77, 95, 76, 73, 71, 72, 84, 83, 59,
- 32,105, 43, 43, 41, 32,123, 10, 9, 9,118,101, 99, 51, 32,108,105,103,104,116, 95,112,111,115,105,116,105,111,110, 32, 61, 32,
-103,108, 95, 76,105,103,104,116, 83,111,117,114, 99,101, 91,105, 93, 46,112,111,115,105,116,105,111,110, 46,120,121,122, 59, 10,
- 9, 9,118,101, 99, 51, 32, 72, 32, 61, 32,103,108, 95, 76,105,103,104,116, 83,111,117,114, 99,101, 91,105, 93, 46,104, 97,108,
-102, 86,101, 99,116,111,114, 46,120,121,122, 59, 10, 9, 9,118,101, 99, 51, 32,108,105,103,104,116, 95,100,105,102,102,117,115,
-101, 32, 61, 32,103,108, 95, 76,105,103,104,116, 83,111,117,114, 99,101, 91,105, 93, 46,100,105,102,102,117,115,101, 46,114,103,
- 98, 59, 10, 9, 9,118,101, 99, 51, 32,108,105,103,104,116, 95,115,112,101, 99,117,108, 97,114, 32, 61, 32,103,108, 95, 76,105,
-103,104,116, 83,111,117,114, 99,101, 91,105, 93, 46,115,112,101, 99,117,108, 97,114, 46,114,103, 98, 59, 10, 10, 9, 9, 47, 42,
- 32,119,101, 32,109,105,120, 32,105,110, 32,115,111,109,101, 32,100,105,102,102,117,115,101, 32,115,111, 32,108,111,119, 32,114,
-111,117,103,104,110,101,115,115, 32,115,116,105,108,108, 32,115,104,111,119,115, 32,117,112, 32, 42, 47, 10, 9, 9,102,108,111,
- 97,116, 32, 98,115,100,102, 32, 61, 32, 48, 46, 53, 42,112,111,119, 40,109, 97,120, 40,100,111,116, 40, 78, 44, 32, 72, 41, 44,
- 32, 48, 46, 48, 41, 44, 32, 49, 46, 48, 47,114,111,117,103,104,110,101,115,115, 41, 59, 10, 9, 9, 98,115,100,102, 32, 43, 61,
- 32, 48, 46, 53, 42,109, 97,120, 40,100,111,116, 40, 78, 44, 32,108,105,103,104,116, 95,112,111,115,105,116,105,111,110, 41, 44,
- 32, 48, 46, 48, 41, 59, 10, 9, 9, 76, 32, 43, 61, 32,108,105,103,104,116, 95,115,112,101, 99,117,108, 97,114, 42, 98,115,100,
-102, 59, 10, 9,125, 10, 10, 9,114,101,115,117,108,116, 32, 61, 32,118,101, 99, 52, 40, 76, 42, 99,111,108,111,114, 46,114,103,
- 98, 44, 32, 49, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,100,101, 95, 98,115,100,102, 95, 97,110,105,115,111,
-116,114,111,112,105, 99, 40,118,101, 99, 52, 32, 99,111,108,111,114, 44, 32,102,108,111, 97,116, 32,114,111,117,103,104,110,101,
-115,115, 85, 44, 32,102,108,111, 97,116, 32,114,111,117,103,104,110,101,115,115, 86, 44, 32,118,101, 99, 51, 32, 78, 44, 32,118,
-101, 99, 51, 32, 73, 44, 32,111,117,116, 32,118,101, 99, 52, 32,114,101,115,117,108,116, 41, 10,123, 10, 9,110,111,100,101, 95,
- 98,115,100,102, 95,100,105,102,102,117,115,101, 40, 99,111,108,111,114, 44, 32, 48, 46, 48, 44, 32, 78, 44, 32,114,101,115,117,
-108,116, 41, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,100,101, 95, 98,115,100,102, 95,103,108, 97,115,115, 40,118,101, 99,
- 52, 32, 99,111,108,111,114, 44, 32,102,108,111, 97,116, 32,114,111,117,103,104,110,101,115,115, 44, 32,102,108,111, 97,116, 32,
-105,111,114, 44, 32,118,101, 99, 51, 32, 78, 44, 32,118,101, 99, 51, 32, 73, 44, 32,111,117,116, 32,118,101, 99, 52, 32,114,101,
-115,117,108,116, 41, 10,123, 10, 9,110,111,100,101, 95, 98,115,100,102, 95,100,105,102,102,117,115,101, 40, 99,111,108,111,114,
- 44, 32, 48, 46, 48, 44, 32, 78, 44, 32,114,101,115,117,108,116, 41, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,100,101, 95,
- 98,115,100,102, 95,116,114, 97,110,115,108,117, 99,101,110,116, 40,118,101, 99, 52, 32, 99,111,108,111,114, 44, 32,118,101, 99,
- 51, 32, 78, 44, 32,111,117,116, 32,118,101, 99, 52, 32,114,101,115,117,108,116, 41, 10,123, 10, 9,110,111,100,101, 95, 98,115,
-100,102, 95,100,105,102,102,117,115,101, 40, 99,111,108,111,114, 44, 32, 48, 46, 48, 44, 32, 78, 44, 32,114,101,115,117,108,116,
- 41, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,100,101, 95, 98,115,100,102, 95,116,114, 97,110,115,112, 97,114,101,110,116,
- 40,118,101, 99, 52, 32, 99,111,108,111,114, 44, 32,111,117,116, 32,118,101, 99, 52, 32,114,101,115,117,108,116, 41, 10,123, 10,
- 9, 47, 42, 32,116,104,105,115, 32,105,115,110, 39,116, 32,114,105,103,104,116, 32, 42, 47, 10, 9,114,101,115,117,108,116, 46,
-114, 32, 61, 32, 99,111,108,111,114, 46,114, 59, 10, 9,114,101,115,117,108,116, 46,103, 32, 61, 32, 99,111,108,111,114, 46,103,
- 59, 10, 9,114,101,115,117,108,116, 46, 98, 32, 61, 32, 99,111,108,111,114, 46, 98, 59, 10, 9,114,101,115,117,108,116, 46, 97,
- 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,100,101, 95, 98,115,100,102, 95,118,101,108,118,101,116,
- 40,118,101, 99, 52, 32, 99,111,108,111,114, 44, 32,102,108,111, 97,116, 32,115,105,103,109, 97, 44, 32,118,101, 99, 51, 32, 78,
- 44, 32,111,117,116, 32,118,101, 99, 52, 32,114,101,115,117,108,116, 41, 10,123, 10, 9,110,111,100,101, 95, 98,115,100,102, 95,
-100,105,102,102,117,115,101, 40, 99,111,108,111,114, 44, 32, 48, 46, 48, 44, 32, 78, 44, 32,114,101,115,117,108,116, 41, 59, 10,
-125, 10, 10, 47, 42, 32,101,109,105,115,115,105,111,110, 32, 42, 47, 10, 10,118,111,105,100, 32,110,111,100,101, 95,101,109,105,
-115,115,105,111,110, 40,118,101, 99, 52, 32, 99,111,108,111,114, 44, 32,102,108,111, 97,116, 32,115,116,114,101,110,103,116,104,
- 44, 32,118,101, 99, 51, 32, 78, 44, 32,111,117,116, 32,118,101, 99, 52, 32,114,101,115,117,108,116, 41, 10,123, 10, 9,114,101,
-115,117,108,116, 32, 61, 32, 99,111,108,111,114, 42,115,116,114,101,110,103,116,104, 59, 10,125, 10, 10, 47, 42, 32, 99,108,111,
-115,117,114,101,115, 32, 42, 47, 10, 10,118,111,105,100, 32,110,111,100,101, 95,109,105,120, 95,115,104, 97,100,101,114, 40,102,
-108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32,115,104, 97,100,101,114, 49, 44, 32,118,101, 99, 52, 32,115,104, 97,
-100,101,114, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,115,104, 97,100,101,114, 41, 10,123, 10, 9,115,104, 97,100,101,114,
- 32, 61, 32,109,105,120, 40,115,104, 97,100,101,114, 49, 44, 32,115,104, 97,100,101,114, 50, 44, 32,102, 97, 99, 41, 59, 10,125,
- 10, 10,118,111,105,100, 32,110,111,100,101, 95, 97,100,100, 95,115,104, 97,100,101,114, 40,118,101, 99, 52, 32,115,104, 97,100,
-101,114, 49, 44, 32,118,101, 99, 52, 32,115,104, 97,100,101,114, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,115,104, 97,100,
-101,114, 41, 10,123, 10, 9,115,104, 97,100,101,114, 32, 61, 32,115,104, 97,100,101,114, 49, 32, 43, 32,115,104, 97,100,101,114,
- 50, 59, 10,125, 10, 10, 47, 42, 32,102,114,101,115,110,101,108, 32, 42, 47, 10, 10,118,111,105,100, 32,110,111,100,101, 95,102,
-114,101,115,110,101,108, 40,102,108,111, 97,116, 32,105,111,114, 44, 32,118,101, 99, 51, 32, 78, 44, 32,118,101, 99, 51, 32, 73,
- 44, 32,111,117,116, 32,102,108,111, 97,116, 32,114,101,115,117,108,116, 41, 10,123, 10, 9,102,108,111, 97,116, 32,101,116, 97,
- 32, 61, 32,109, 97,120, 40,105,111,114, 44, 32, 48, 46, 48, 48, 48, 48, 49, 41, 59, 10, 9,114,101,115,117,108,116, 32, 61, 32,
-102,114,101,115,110,101,108, 95,100,105,101,108,101, 99,116,114,105, 99, 40, 73, 44, 32, 78, 44, 32,101,116, 97, 41, 59, 32, 47,
- 47, 98, 97, 99,107,102, 97, 99,105,110,103, 40, 41, 63, 32, 49, 46, 48, 47,101,116, 97, 58, 32,101,116, 97, 41, 59, 10,125, 10,
- 10, 47, 42, 32,103,101,111,109,101,116,114,121, 32, 42, 47, 10, 10,118,111,105,100, 32,110,111,100,101, 95,103,101,111,109,101,
-116,114,121, 40,118,101, 99, 51, 32, 73, 44, 32,118,101, 99, 51, 32, 78, 44, 32,109, 97,116, 52, 32,116,111,119,111,114,108,100,
- 44, 10, 9,111,117,116, 32,118,101, 99, 51, 32,112,111,115,105,116,105,111,110, 44, 32,111,117,116, 32,118,101, 99, 51, 32,110,
-111,114,109, 97,108, 44, 32,111,117,116, 32,118,101, 99, 51, 32,116, 97,110,103,101,110,116, 44, 10, 9,111,117,116, 32,118,101,
- 99, 51, 32,116,114,117,101, 95,110,111,114,109, 97,108, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,109,105,110,
-103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,112, 97,114, 97,109,101,116,114,105, 99, 44, 10, 9,111,117,116, 32,102,108,111,
- 97,116, 32, 98, 97, 99,107,102, 97, 99,105,110,103, 41, 10,123, 10, 9,112,111,115,105,116,105,111,110, 32, 61, 32, 40,116,111,
-119,111,114,108,100, 42,118,101, 99, 52, 40, 73, 44, 32, 49, 46, 48, 41, 41, 46,120,121,122, 59, 10, 9,110,111,114,109, 97,108,
- 32, 61, 32, 78, 59, 10, 9,116, 97,110,103,101,110,116, 32, 61, 32,118,101, 99, 51, 40, 48, 46, 48, 41, 59, 10, 9,116,114,117,
-101, 95,110,111,114,109, 97,108, 32, 61, 32, 78, 59, 10, 9,105,110, 99,111,109,105,110,103, 32, 61, 32, 73, 59, 10, 9,112, 97,
-114, 97,109,101,116,114,105, 99, 32, 61, 32,118,101, 99, 51, 40, 48, 46, 48, 41, 59, 10, 9, 98, 97, 99,107,102, 97, 99,105,110,
-103, 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,100,101, 95,116,101,120, 95, 99,111,111,114,100, 40,
-118,101, 99, 51, 32, 73, 44, 32,118,101, 99, 51, 32, 78, 44, 32,109, 97,116, 52, 32,116,111,119,111,114,108,100, 44, 10, 9,118,
-101, 99, 51, 32, 97,116,116,114, 95,111,114, 99,111, 44, 32,118,101, 99, 51, 32, 97,116,116,114, 95,117,118, 44, 10, 9,111,117,
-116, 32,118,101, 99, 51, 32,103,101,110,101,114, 97,116,101,100, 44, 32,111,117,116, 32,118,101, 99, 51, 32,117,118, 44, 32,111,
-117,116, 32,118,101, 99, 51, 32,111, 98,106,101, 99,116, 44, 10, 9,111,117,116, 32,118,101, 99, 51, 32, 99, 97,109,101,114, 97,
- 44, 32,111,117,116, 32,118,101, 99, 51, 32,119,105,110,100,111,119, 44, 32,111,117,116, 32,118,101, 99, 51, 32,114,101,102,108,
-101, 99,116,105,111,110, 41, 10,123, 10, 9,103,101,110,101,114, 97,116,101,100, 32, 61, 32, 97,116,116,114, 95,111,114, 99,111,
- 59, 10, 9,117,118, 32, 61, 32, 97,116,116,114, 95,117,118, 59, 10, 9,111, 98,106,101, 99,116, 32, 61, 32, 73, 59, 10, 9, 99,
- 97,109,101,114, 97, 32, 61, 32, 73, 59, 10, 9,119,105,110,100,111,119, 32, 61, 32,103,108, 95, 70,114, 97,103, 67,111,111,114,
-100, 46,120,121,122, 59, 10, 9,114,101,102,108,101, 99,116,105,111,110, 32, 61, 32,114,101,102,108,101, 99,116, 40, 78, 44, 32,
- 73, 41, 59, 10, 10,125, 10, 10, 47, 42, 32,116,101,120,116,117,114,101,115, 32, 42, 47, 10, 10,118,111,105,100, 32,110,111,100,
-101, 95,116,101,120, 95,103,114, 97,100,105,101,110,116, 40,118,101, 99, 51, 32, 99,111, 44, 32,111,117,116, 32,118,101, 99, 52,
- 32, 99,111,108,111,114, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,102, 97, 99, 41, 10,123, 10, 9, 99,111,108,111,114, 32,
- 61, 32,118,101, 99, 52, 40, 49, 46, 48, 41, 59, 10, 9,102, 97, 99, 32, 61, 32, 49, 46, 48, 59, 10,125, 10, 10,118,111,105,100,
- 32,110,111,100,101, 95,116,101,120, 95, 99,104,101, 99,107,101,114, 40,118,101, 99, 51, 32, 99,111, 44, 32,118,101, 99, 52, 32,
- 99,111,108,111,114, 49, 44, 32,118,101, 99, 52, 32, 99,111,108,111,114, 50, 44, 32,102,108,111, 97,116, 32,115, 99, 97,108,101,
- 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,108,111,114, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,102, 97, 99, 41,
- 10,123, 10, 9, 99,111,108,111,114, 32, 61, 32,118,101, 99, 52, 40, 49, 46, 48, 41, 59, 10, 9,102, 97, 99, 32, 61, 32, 49, 46,
- 48, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,100,101, 95,116,101,120, 95, 99,108,111,117,100,115, 40,118,101, 99, 51, 32,
- 99,111, 44, 32,102,108,111, 97,116, 32,115,105,122,101, 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,108,111,114, 44, 32,
-111,117,116, 32,102,108,111, 97,116, 32,102, 97, 99, 41, 10,123, 10, 9, 99,111,108,111,114, 32, 61, 32,118,101, 99, 52, 40, 49,
- 46, 48, 41, 59, 10, 9,102, 97, 99, 32, 61, 32, 49, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,100,101, 95,116,101,
-120, 95,101,110,118,105,114,111,110,109,101,110,116, 40,118,101, 99, 51, 32, 99,111, 44, 32,115, 97,109,112,108,101,114, 50, 68,
- 32,105,109, 97, 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,108,111,114, 41, 10,123, 10, 9,102,108,111, 97,116, 32,117,
- 32, 61, 32, 40, 97,116, 97,110, 40, 99,111, 46,121, 44, 32, 99,111, 46,120, 41, 32, 43, 32, 77, 95, 80, 73, 41, 47, 40, 50, 46,
- 48, 42, 77, 95, 80, 73, 41, 59, 10, 9,102,108,111, 97,116, 32,118, 32, 61, 32, 97,116, 97,110, 40, 99,111, 46,122, 44, 32,104,
-121,112,111,116, 40, 99,111, 46,120, 44, 32, 99,111, 46,121, 41, 41, 47, 77, 95, 80, 73, 32, 43, 32, 48, 46, 53, 59, 10, 10, 9,
- 99,111,108,111,114, 32, 61, 32,116,101,120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32,118,101, 99, 50, 40,117, 44, 32,118,
- 41, 41, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,100,101, 95,116,101,120, 95,105,109, 97,103,101, 40,118,101, 99, 51, 32,
- 99,111, 44, 32,115, 97,109,112,108,101,114, 50, 68, 32,105,109, 97, 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,108,111,
-114, 44, 32,111,117,116, 32,102,108,111, 97,116, 32, 97,108,112,104, 97, 41, 10,123, 10, 9, 99,111,108,111,114, 32, 61, 32,116,
-101,120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32, 99,111, 46,120,121, 41, 59, 10, 9, 97,108,112,104, 97, 32, 61, 32, 99,
-111,108,111,114, 46, 97, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,100,101, 95,116,101,120, 95,109, 97,103,105, 99, 40,118,
-101, 99, 51, 32,112, 44, 32,102,108,111, 97,116, 32,115, 99, 97,108,101, 44, 32,102,108,111, 97,116, 32,100,105,115,116,111,114,
-116,105,111,110, 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,108,111,114, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,
-102, 97, 99, 41, 10,123, 10, 9, 99,111,108,111,114, 32, 61, 32,118,101, 99, 52, 40, 49, 46, 48, 41, 59, 10, 9,102, 97, 99, 32,
- 61, 32, 49, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,100,101, 95,116,101,120, 95,109,117,115,103,114, 97,118,101,
- 40,118,101, 99, 51, 32, 99,111, 44, 32,102,108,111, 97,116, 32,115, 99, 97,108,101, 44, 32,102,108,111, 97,116, 32,100,101,116,
- 97,105,108, 44, 32,102,108,111, 97,116, 32,100,105,109,101,110,115,105,111,110, 44, 32,102,108,111, 97,116, 32,108, 97, 99,117,
-110, 97,114,105,116,121, 44, 32,102,108,111, 97,116, 32,111,102,102,115,101,116, 44, 32,102,108,111, 97,116, 32,103, 97,105,110,
- 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,108,111,114, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,102, 97, 99, 41,
- 10,123, 10, 9, 99,111,108,111,114, 32, 61, 32,118,101, 99, 52, 40, 49, 46, 48, 41, 59, 10, 9,102, 97, 99, 32, 61, 32, 49, 46,
- 48, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,100,101, 95,116,101,120, 95,110,111,105,115,101, 40,118,101, 99, 51, 32, 99,
-111, 44, 32,102,108,111, 97,116, 32,115, 99, 97,108,101, 44, 32,102,108,111, 97,116, 32,100,101,116, 97,105,108, 44, 32,102,108,
-111, 97,116, 32,100,105,115,116,111,114,116,105,111,110, 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,108,111,114, 44, 32,
-111,117,116, 32,102,108,111, 97,116, 32,102, 97, 99, 41, 10,123, 10, 9, 99,111,108,111,114, 32, 61, 32,118,101, 99, 52, 40, 49,
- 46, 48, 41, 59, 10, 9,102, 97, 99, 32, 61, 32, 49, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,100,101, 95,116,101,
-120, 95,115,107,121, 40,118,101, 99, 51, 32, 99,111, 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,108,111,114, 41, 10,123,
- 10, 9, 99,111,108,111,114, 32, 61, 32,118,101, 99, 52, 40, 49, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,100,
-101, 95,116,101,120, 95,118,111,114,111,110,111,105, 40,118,101, 99, 51, 32, 99,111, 44, 32,102,108,111, 97,116, 32,115, 99, 97,
-108,101, 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,108,111,114, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,102, 97,
- 99, 41, 10,123, 10, 9, 99,111,108,111,114, 32, 61, 32,118,101, 99, 52, 40, 49, 46, 48, 41, 59, 10, 9,102, 97, 99, 32, 61, 32,
- 49, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,100,101, 95,116,101,120, 95,119, 97,118,101, 40,118,101, 99, 51, 32,
- 99,111, 44, 32,102,108,111, 97,116, 32,115, 99, 97,108,101, 44, 32,102,108,111, 97,116, 32,100,105,115,116,111,114,116,105,111,
-110, 44, 32,102,108,111, 97,116, 32,100,101,116, 97,105,108, 44, 32,102,108,111, 97,116, 32,100,101,116, 97,105,108, 95,115, 99,
- 97,108,101, 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,108,111,114, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,102,
- 97, 99, 41, 10,123, 10, 9, 99,111,108,111,114, 32, 61, 32,118,101, 99, 52, 40, 49, 46, 48, 41, 59, 10, 9,102, 97, 99, 32, 61,
- 32, 49, 46, 48, 59, 10,125, 10, 10, 47, 42, 32,108,105,103,104,116, 32,112, 97,116,104, 32, 42, 47, 10, 10,118,111,105,100, 32,
-110,111,100,101, 95,108,105,103,104,116, 95,112, 97,116,104, 40, 10, 9,111,117,116, 32,102,108,111, 97,116, 32,105,115, 95, 99,
- 97,109,101,114, 97, 95,114, 97,121, 44, 10, 9,111,117,116, 32,102,108,111, 97,116, 32,105,115, 95,115,104, 97,100,111,119, 95,
-114, 97,121, 44, 10, 9,111,117,116, 32,102,108,111, 97,116, 32,105,115, 95,100,105,102,102,117,115,101, 95,114, 97,121, 44, 10,
- 9,111,117,116, 32,102,108,111, 97,116, 32,105,115, 95,103,108,111,115,115,121, 95,114, 97,121, 44, 10, 9,111,117,116, 32,102,
-108,111, 97,116, 32,105,115, 95,115,105,110,103,117,108, 97,114, 95,114, 97,121, 44, 10, 9,111,117,116, 32,102,108,111, 97,116,
- 32,105,115, 95,114,101,102,108,101, 99,116,105,111,110, 95,114, 97,121, 44, 10, 9,111,117,116, 32,102,108,111, 97,116, 32,105,
-115, 95,116,114, 97,110,115,109,105,115,115,105,111,110, 95,114, 97,121, 41, 10,123, 10, 9,105,115, 95, 99, 97,109,101,114, 97,
- 95,114, 97,121, 32, 61, 32, 49, 46, 48, 59, 10, 9,105,115, 95,115,104, 97,100,111,119, 95,114, 97,121, 32, 61, 32, 48, 46, 48,
- 59, 10, 9,105,115, 95,100,105,102,102,117,115,101, 95,114, 97,121, 32, 61, 32, 48, 46, 48, 59, 10, 9,105,115, 95,103,108,111,
-115,115,121, 95,114, 97,121, 32, 61, 32, 48, 46, 48, 59, 10, 9,105,115, 95,115,105,110,103,117,108, 97,114, 95,114, 97,121, 32,
- 61, 32, 48, 46, 48, 59, 10, 9,105,115, 95,114,101,102,108,101, 99,116,105,111,110, 95,114, 97,121, 32, 61, 32, 48, 46, 48, 59,
- 10, 9,105,115, 95,116,114, 97,110,115,109,105,115,115,105,111,110, 95,114, 97,121, 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,
- 47, 42, 32,111,117,116,112,117,116, 32, 42, 47, 10, 10,118,111,105,100, 32,110,111,100,101, 95,111,117,116,112,117,116, 95,109,
- 97,116,101,114,105, 97,108, 40,118,101, 99, 52, 32,115,117,114,102, 97, 99,101, 44, 32,118,101, 99, 52, 32,118,111,108,117,109,
-101, 44, 32,102,108,111, 97,116, 32,100,105,115,112,108, 97, 99,101,109,101,110,116, 44, 32,111,117,116, 32,118,101, 99, 52, 32,
-114,101,115,117,108,116, 41, 10,123, 10, 9,114,101,115,117,108,116, 32, 61, 32,115,117,114,102, 97, 99,101, 59, 10,125, 10, 10,
- 0};
-
diff --git a/source/blender/gpu/intern/gpu_shader_vertex.glsl.c b/source/blender/gpu/intern/gpu_shader_vertex.glsl.c
deleted file mode 100644
index d7a7bac771d..00000000000
--- a/source/blender/gpu/intern/gpu_shader_vertex.glsl.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/** \file blender/gpu/intern/gpu_shader_vertex.glsl.c
- * \ingroup gpu
- */
-/* DataToC output of file <gpu_shader_vertex_glsl> */
-
-int datatoc_gpu_shader_vertex_glsl_size= 228;
-char datatoc_gpu_shader_vertex_glsl[]= {
- 10,118, 97,114,
-121,105,110,103, 32,118,101, 99, 51, 32,118, 97,114,112,111,115,105,116,105,111,110, 59, 10,118, 97,114,121,105,110,103, 32,118,
-101, 99, 51, 32,118, 97,114,110,111,114,109, 97,108, 59, 10, 10,118,111,105,100, 32,109, 97,105,110, 40, 41, 10,123, 10, 9,118,
-101, 99, 52, 32, 99,111, 32, 61, 32,103,108, 95, 77,111,100,101,108, 86,105,101,119, 77, 97,116,114,105,120, 32, 42, 32,103,108,
- 95, 86,101,114,116,101,120, 59, 10, 10, 9,118, 97,114,112,111,115,105,116,105,111,110, 32, 61, 32, 99,111, 46,120,121,122, 59,
- 10, 9,118, 97,114,110,111,114,109, 97,108, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40,103,108, 95, 78,111,114,109, 97,
-108, 77, 97,116,114,105,120, 32, 42, 32,103,108, 95, 78,111,114,109, 97,108, 41, 59, 10, 9,103,108, 95, 80,111,115,105,116,105,
-111,110, 32, 61, 32,103,108, 95, 80,114,111,106,101, 99,116,105,111,110, 77, 97,116,114,105,120, 32, 42, 32, 99,111, 59, 10, 10,
- 0};
-
diff --git a/source/blender/gpu/intern/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl
index 2ac99e2eee2..9498bf92446 100644
--- a/source/blender/gpu/intern/gpu_shader_material.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_material.glsl
@@ -1858,11 +1858,54 @@ void test_shadowbuf(vec3 rco, sampler2DShadow shadowmap, mat4 shadowpersmat, flo
//float bias = (1.5 - inp*inp)*shadowbias;
co.z -= shadowbias*co.w;
+
+ if (co.w > 0.0 && co.x > 0.0 && co.x/co.w < 1.0 && co.y > 0.0 && co.y/co.w < 1.0)
+ result = shadow2DProj(shadowmap, co).x;
+ else
+ result = 1.0;
+ }
+}
+
+void test_shadowbuf_vsm(vec3 rco, sampler2D shadowmap, mat4 shadowpersmat, float shadowbias, float bleedbias, float inp, out float result)
+{
+ if(inp <= 0.0) {
+ result = 0.0;
+ }
+ else {
+ vec4 co = shadowpersmat*vec4(rco, 1.0);
+ if (co.w > 0.0 && co.x > 0.0 && co.x/co.w < 1.0 && co.y > 0.0 && co.y/co.w < 1.0) {
+ vec2 moments = texture2DProj(shadowmap, co).rg;
+ float dist = co.z/co.w;
+ float p = 0.0;
+
+ if(dist <= moments.x)
+ p = 1.0;
+
+ float variance = moments.y - (moments.x*moments.x);
+ variance = max(variance, shadowbias/10.0);
- result = shadow2DProj(shadowmap, co).x;
+ float d = moments.x - dist;
+ float p_max = variance / (variance + d*d);
+
+ // Now reduce light-bleeding by removing the [0, x] tail and linearly rescaling (x, 1]
+ p_max = clamp((p_max-bleedbias)/(1.0-bleedbias), 0.0, 1.0);
+
+ result = max(p, p_max);
+ }
+ else {
+ result = 1.0;
+ }
}
}
+void shade_light_texture(vec3 rco, sampler2D cookie, mat4 shadowpersmat, out vec4 result)
+{
+
+ vec4 co = shadowpersmat*vec4(rco, 1.0);
+
+ result = texture2DProj(cookie, co);
+}
+
void shade_exposure_correct(vec3 col, float linfac, float logfac, out vec3 outcol)
{
outcol = linfac*(1.0 - exp(col*logfac));
@@ -2041,12 +2084,13 @@ void node_geometry(vec3 I, vec3 N, mat4 toworld,
backfacing = 0.0;
}
-void node_tex_coord(vec3 I, vec3 N, mat4 toworld,
+void node_tex_coord(vec3 I, vec3 N, mat4 viewinvmat, mat4 obinvmat,
vec3 attr_orco, vec3 attr_uv,
- out vec3 generated, out vec3 uv, out vec3 object,
+ out vec3 generated, out vec3 normal, out vec3 uv, out vec3 object,
out vec3 camera, out vec3 window, out vec3 reflection)
{
generated = attr_orco;
+ normal = normalize((obinvmat*(viewinvmat*vec4(N, 0.0))).xyz);
uv = attr_uv;
object = I;
camera = I;
@@ -2086,7 +2130,7 @@ void node_tex_environment(vec3 co, sampler2D ima, out vec4 color)
void node_tex_image(vec3 co, sampler2D ima, out vec4 color, out float alpha)
{
color = texture2D(ima, co.xy);
- alpha = color.a;
+ alpha = color.a;
}
void node_tex_magic(vec3 p, float scale, float distortion, out vec4 color, out float fac)
@@ -2144,6 +2188,13 @@ void node_light_path(
is_transmission_ray = 0.0;
}
+void node_light_falloff(float strength, float tsmooth, out float quadratic, out float linear, out float constant)
+{
+ quadratic = strength;
+ linear = strength;
+ constant = strength;
+}
+
/* output */
void node_output_material(vec4 surface, vec4 volume, float displacement, out vec4 result)
diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl.c b/source/blender/gpu/shaders/gpu_shader_material.glsl.c
new file mode 100644
index 00000000000..6d08d4c8cec
--- /dev/null
+++ b/source/blender/gpu/shaders/gpu_shader_material.glsl.c
@@ -0,0 +1,1595 @@
+/* DataToC output of file <gpu_shader_material_glsl> */
+
+int datatoc_gpu_shader_material_glsl_size = 50823;
+char datatoc_gpu_shader_material_glsl[] = {
+ 10,102,108,111, 97,116, 32,
+101,120,112, 95, 98,108,101,110,100,101,114, 40,102,108,111, 97,116, 32,102, 41, 10,123, 10, 9,114,101,116,117,114,110, 32,112,
+111,119, 40, 50, 46, 55, 49, 56, 50, 56, 49, 56, 50, 56, 52, 54, 44, 32,102, 41, 59, 10,125, 10, 10,118,111,105,100, 32,114,103,
+ 98, 95,116,111, 95,104,115,118, 40,118,101, 99, 52, 32,114,103, 98, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,
+111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32, 99,109, 97,120, 44, 32, 99,109,105,110, 44, 32,104, 44, 32,115, 44, 32,118,
+ 44, 32, 99,100,101,108,116, 97, 59, 10, 9,118,101, 99, 51, 32, 99, 59, 10, 10, 9, 99,109, 97,120, 32, 61, 32,109, 97,120, 40,
+114,103, 98, 91, 48, 93, 44, 32,109, 97,120, 40,114,103, 98, 91, 49, 93, 44, 32,114,103, 98, 91, 50, 93, 41, 41, 59, 10, 9, 99,
+109,105,110, 32, 61, 32,109,105,110, 40,114,103, 98, 91, 48, 93, 44, 32,109,105,110, 40,114,103, 98, 91, 49, 93, 44, 32,114,103,
+ 98, 91, 50, 93, 41, 41, 59, 10, 9, 99,100,101,108,116, 97, 32, 61, 32, 99,109, 97,120, 45, 99,109,105,110, 59, 10, 10, 9,118,
+ 32, 61, 32, 99,109, 97,120, 59, 10, 9,105,102, 32, 40, 99,109, 97,120, 33, 61, 48, 46, 48, 41, 10, 9, 9,115, 32, 61, 32, 99,
+100,101,108,116, 97, 47, 99,109, 97,120, 59, 10, 9,101,108,115,101, 32,123, 10, 9, 9,115, 32, 61, 32, 48, 46, 48, 59, 10, 9,
+ 9,104, 32, 61, 32, 48, 46, 48, 59, 10, 9,125, 10, 10, 9,105,102, 32, 40,115, 32, 61, 61, 32, 48, 46, 48, 41, 32,123, 10, 9,
+ 9,104, 32, 61, 32, 48, 46, 48, 59, 10, 9,125, 10, 9,101,108,115,101, 32,123, 10, 9, 9, 99, 32, 61, 32, 40,118,101, 99, 51,
+ 40, 99,109, 97,120, 44, 32, 99,109, 97,120, 44, 32, 99,109, 97,120, 41, 32, 45, 32,114,103, 98, 46,120,121,122, 41, 47, 99,100,
+101,108,116, 97, 59, 10, 10, 9, 9,105,102, 32, 40,114,103, 98, 46,120, 61, 61, 99,109, 97,120, 41, 32,104, 32, 61, 32, 99, 91,
+ 50, 93, 32, 45, 32, 99, 91, 49, 93, 59, 10, 9, 9,101,108,115,101, 32,105,102, 32, 40,114,103, 98, 46,121, 61, 61, 99,109, 97,
+120, 41, 32,104, 32, 61, 32, 50, 46, 48, 32, 43, 32, 99, 91, 48, 93, 32, 45, 32, 32, 99, 91, 50, 93, 59, 10, 9, 9,101,108,115,
+101, 32,104, 32, 61, 32, 52, 46, 48, 32, 43, 32, 99, 91, 49, 93, 32, 45, 32, 99, 91, 48, 93, 59, 10, 10, 9, 9,104, 32, 47, 61,
+ 32, 54, 46, 48, 59, 10, 10, 9, 9,105,102, 32, 40,104, 60, 48, 46, 48, 41, 10, 9, 9, 9,104, 32, 43, 61, 32, 49, 46, 48, 59,
+ 10, 9,125, 10, 10, 9,111,117,116, 99,111,108, 32, 61, 32,118,101, 99, 52, 40,104, 44, 32,115, 44, 32,118, 44, 32,114,103, 98,
+ 46,119, 41, 59, 10,125, 10, 10,118,111,105,100, 32,104,115,118, 95,116,111, 95,114,103, 98, 40,118,101, 99, 52, 32,104,115,118,
+ 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,105, 44, 32,102,
+ 44, 32,112, 44, 32,113, 44, 32,116, 44, 32,104, 44, 32,115, 44, 32,118, 59, 10, 9,118,101, 99, 51, 32,114,103, 98, 59, 10, 10,
+ 9,104, 32, 61, 32,104,115,118, 91, 48, 93, 59, 10, 9,115, 32, 61, 32,104,115,118, 91, 49, 93, 59, 10, 9,118, 32, 61, 32,104,
+115,118, 91, 50, 93, 59, 10, 10, 9,105,102, 40,115, 61, 61, 48, 46, 48, 41, 32,123, 10, 9, 9,114,103, 98, 32, 61, 32,118,101,
+ 99, 51, 40,118, 44, 32,118, 44, 32,118, 41, 59, 10, 9,125, 10, 9,101,108,115,101, 32,123, 10, 9, 9,105,102, 40,104, 61, 61,
+ 49, 46, 48, 41, 10, 9, 9, 9,104, 32, 61, 32, 48, 46, 48, 59, 10, 9, 9, 10, 9, 9,104, 32, 42, 61, 32, 54, 46, 48, 59, 10,
+ 9, 9,105, 32, 61, 32,102,108,111,111,114, 40,104, 41, 59, 10, 9, 9,102, 32, 61, 32,104, 32, 45, 32,105, 59, 10, 9, 9,114,
+103, 98, 32, 61, 32,118,101, 99, 51, 40,102, 44, 32,102, 44, 32,102, 41, 59, 10, 9, 9,112, 32, 61, 32,118, 42, 40, 49, 46, 48,
+ 45,115, 41, 59, 10, 9, 9,113, 32, 61, 32,118, 42, 40, 49, 46, 48, 45, 40,115, 42,102, 41, 41, 59, 10, 9, 9,116, 32, 61, 32,
+118, 42, 40, 49, 46, 48, 45, 40,115, 42, 40, 49, 46, 48, 45,102, 41, 41, 41, 59, 10, 9, 9, 10, 9, 9,105,102, 32, 40,105, 32,
+ 61, 61, 32, 48, 46, 48, 41, 32,114,103, 98, 32, 61, 32,118,101, 99, 51, 40,118, 44, 32,116, 44, 32,112, 41, 59, 10, 9, 9,101,
+108,115,101, 32,105,102, 32, 40,105, 32, 61, 61, 32, 49, 46, 48, 41, 32,114,103, 98, 32, 61, 32,118,101, 99, 51, 40,113, 44, 32,
+118, 44, 32,112, 41, 59, 10, 9, 9,101,108,115,101, 32,105,102, 32, 40,105, 32, 61, 61, 32, 50, 46, 48, 41, 32,114,103, 98, 32,
+ 61, 32,118,101, 99, 51, 40,112, 44, 32,118, 44, 32,116, 41, 59, 10, 9, 9,101,108,115,101, 32,105,102, 32, 40,105, 32, 61, 61,
+ 32, 51, 46, 48, 41, 32,114,103, 98, 32, 61, 32,118,101, 99, 51, 40,112, 44, 32,113, 44, 32,118, 41, 59, 10, 9, 9,101,108,115,
+101, 32,105,102, 32, 40,105, 32, 61, 61, 32, 52, 46, 48, 41, 32,114,103, 98, 32, 61, 32,118,101, 99, 51, 40,116, 44, 32,112, 44,
+ 32,118, 41, 59, 10, 9, 9,101,108,115,101, 32,114,103, 98, 32, 61, 32,118,101, 99, 51, 40,118, 44, 32,112, 44, 32,113, 41, 59,
+ 10, 9,125, 10, 10, 9,111,117,116, 99,111,108, 32, 61, 32,118,101, 99, 52, 40,114,103, 98, 44, 32,104,115,118, 46,119, 41, 59,
+ 10,125, 10, 10,102,108,111, 97,116, 32,115,114,103, 98, 95,116,111, 95,108,105,110,101, 97,114,114,103, 98, 40,102,108,111, 97,
+116, 32, 99, 41, 10,123, 10, 9,105,102, 40, 99, 32, 60, 32, 48, 46, 48, 52, 48, 52, 53, 41, 10, 9, 9,114,101,116,117,114,110,
+ 32, 40, 99, 32, 60, 32, 48, 46, 48, 41, 63, 32, 48, 46, 48, 58, 32, 99, 32, 42, 32, 40, 49, 46, 48, 47, 49, 50, 46, 57, 50, 41,
+ 59, 10, 9,101,108,115,101, 10, 9, 9,114,101,116,117,114,110, 32,112,111,119, 40, 40, 99, 32, 43, 32, 48, 46, 48, 53, 53, 41,
+ 42, 40, 49, 46, 48, 47, 49, 46, 48, 53, 53, 41, 44, 32, 50, 46, 52, 41, 59, 10,125, 10, 10,102,108,111, 97,116, 32,108,105,110,
+101, 97,114,114,103, 98, 95,116,111, 95,115,114,103, 98, 40,102,108,111, 97,116, 32, 99, 41, 10,123, 10, 9,105,102, 40, 99, 32,
+ 60, 32, 48, 46, 48, 48, 51, 49, 51, 48, 56, 41, 10, 9, 9,114,101,116,117,114,110, 32, 40, 99, 32, 60, 32, 48, 46, 48, 41, 63,
+ 32, 48, 46, 48, 58, 32, 99, 32, 42, 32, 49, 50, 46, 57, 50, 59, 10, 9,101,108,115,101, 10, 9, 9,114,101,116,117,114,110, 32,
+ 49, 46, 48, 53, 53, 32, 42, 32,112,111,119, 40, 99, 44, 32, 49, 46, 48, 47, 50, 46, 52, 41, 32, 45, 32, 48, 46, 48, 53, 53, 59,
+ 10,125, 10, 10,118,111,105,100, 32,115,114,103, 98, 95,116,111, 95,108,105,110,101, 97,114,114,103, 98, 40,118,101, 99, 52, 32,
+ 99,111,108, 95,102,114,111,109, 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,108, 95,116,111, 41, 10,123, 10, 9, 99,111,
+108, 95,116,111, 46,114, 32, 61, 32,115,114,103, 98, 95,116,111, 95,108,105,110,101, 97,114,114,103, 98, 40, 99,111,108, 95,102,
+114,111,109, 46,114, 41, 59, 10, 9, 99,111,108, 95,116,111, 46,103, 32, 61, 32,115,114,103, 98, 95,116,111, 95,108,105,110,101,
+ 97,114,114,103, 98, 40, 99,111,108, 95,102,114,111,109, 46,103, 41, 59, 10, 9, 99,111,108, 95,116,111, 46, 98, 32, 61, 32,115,
+114,103, 98, 95,116,111, 95,108,105,110,101, 97,114,114,103, 98, 40, 99,111,108, 95,102,114,111,109, 46, 98, 41, 59, 10, 9, 99,
+111,108, 95,116,111, 46, 97, 32, 61, 32, 99,111,108, 95,102,114,111,109, 46, 97, 59, 10,125, 10, 10,118,111,105,100, 32,108,105,
+110,101, 97,114,114,103, 98, 95,116,111, 95,115,114,103, 98, 40,118,101, 99, 52, 32, 99,111,108, 95,102,114,111,109, 44, 32,111,
+117,116, 32,118,101, 99, 52, 32, 99,111,108, 95,116,111, 41, 10,123, 10, 9, 99,111,108, 95,116,111, 46,114, 32, 61, 32,108,105,
+110,101, 97,114,114,103, 98, 95,116,111, 95,115,114,103, 98, 40, 99,111,108, 95,102,114,111,109, 46,114, 41, 59, 10, 9, 99,111,
+108, 95,116,111, 46,103, 32, 61, 32,108,105,110,101, 97,114,114,103, 98, 95,116,111, 95,115,114,103, 98, 40, 99,111,108, 95,102,
+114,111,109, 46,103, 41, 59, 10, 9, 99,111,108, 95,116,111, 46, 98, 32, 61, 32,108,105,110,101, 97,114,114,103, 98, 95,116,111,
+ 95,115,114,103, 98, 40, 99,111,108, 95,102,114,111,109, 46, 98, 41, 59, 10, 9, 99,111,108, 95,116,111, 46, 97, 32, 61, 32, 99,
+111,108, 95,102,114,111,109, 46, 97, 59, 10,125, 10, 10, 35,100,101,102,105,110,101, 32, 77, 95, 80, 73, 32, 51, 46, 49, 52, 49,
+ 53, 57, 50, 54, 53, 51, 53, 56, 57, 55, 57, 51, 50, 51, 56, 52, 54, 10, 35,100,101,102,105,110,101, 32, 77, 95, 49, 95, 80, 73,
+ 32, 48, 46, 51, 49, 56, 51, 48, 57, 56, 56, 54, 49, 56, 51, 55, 57, 48, 54, 57, 10, 10, 47, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 32, 83, 72, 65, 68, 69, 82, 32, 78, 79, 68, 69, 83, 32, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 47,
+ 10, 10,118,111,105,100, 32,118, 99,111,108, 95, 97,116,116,114,105, 98,117,116,101, 40,118,101, 99, 52, 32, 97,116,116,118, 99,
+111,108, 44, 32,111,117,116, 32,118,101, 99, 52, 32,118, 99,111,108, 41, 10,123, 10, 9,118, 99,111,108, 32, 61, 32,118,101, 99,
+ 52, 40, 97,116,116,118, 99,111,108, 46,120, 47, 50, 53, 53, 46, 48, 44, 32, 97,116,116,118, 99,111,108, 46,121, 47, 50, 53, 53,
+ 46, 48, 44, 32, 97,116,116,118, 99,111,108, 46,122, 47, 50, 53, 53, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10,125, 10, 10,118,111,
+105,100, 32,117,118, 95, 97,116,116,114,105, 98,117,116,101, 40,118,101, 99, 50, 32, 97,116,116,117,118, 44, 32,111,117,116, 32,
+118,101, 99, 51, 32,117,118, 41, 10,123, 10, 9,117,118, 32, 61, 32,118,101, 99, 51, 40, 97,116,116,117,118, 42, 50, 46, 48, 32,
+ 45, 32,118,101, 99, 50, 40, 49, 46, 48, 44, 32, 49, 46, 48, 41, 44, 32, 48, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,
+103,101,111,109, 40,118,101, 99, 51, 32, 99,111, 44, 32,118,101, 99, 51, 32,110,111,114, 44, 32,109, 97,116, 52, 32,118,105,101,
+119,105,110,118,109, 97,116, 44, 32,118,101, 99, 51, 32, 97,116,116,111,114, 99,111, 44, 32,118,101, 99, 50, 32, 97,116,116,117,
+118, 44, 32,118,101, 99, 52, 32, 97,116,116,118, 99,111,108, 44, 32,111,117,116, 32,118,101, 99, 51, 32,103,108,111, 98, 97,108,
+ 44, 32,111,117,116, 32,118,101, 99, 51, 32,108,111, 99, 97,108, 44, 32,111,117,116, 32,118,101, 99, 51, 32,118,105,101,119, 44,
+ 32,111,117,116, 32,118,101, 99, 51, 32,111,114, 99,111, 44, 32,111,117,116, 32,118,101, 99, 51, 32,117,118, 44, 32,111,117,116,
+ 32,118,101, 99, 51, 32,110,111,114,109, 97,108, 44, 32,111,117,116, 32,118,101, 99, 52, 32,118, 99,111,108, 44, 32,111,117,116,
+ 32,102,108,111, 97,116, 32,118, 99,111,108, 95, 97,108,112,104, 97, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,102,114,111,
+110,116, 98, 97, 99,107, 41, 10,123, 10, 9,108,111, 99, 97,108, 32, 61, 32, 99,111, 59, 10, 9,118,105,101,119, 32, 61, 32,110,
+111,114,109, 97,108,105,122,101, 40,108,111, 99, 97,108, 41, 59, 10, 9,103,108,111, 98, 97,108, 32, 61, 32, 40,118,105,101,119,
+105,110,118,109, 97,116, 42,118,101, 99, 52, 40,108,111, 99, 97,108, 44, 32, 49, 46, 48, 41, 41, 46,120,121,122, 59, 10, 9,111,
+114, 99,111, 32, 61, 32, 97,116,116,111,114, 99,111, 59, 10, 9,117,118, 95, 97,116,116,114,105, 98,117,116,101, 40, 97,116,116,
+117,118, 44, 32,117,118, 41, 59, 10, 9,110,111,114,109, 97,108, 32, 61, 32, 45,110,111,114,109, 97,108,105,122,101, 40,110,111,
+114, 41, 59, 9, 47, 42, 32, 98,108,101,110,100,101,114, 32,114,101,110,100,101,114, 32,110,111,114,109, 97,108, 32,105,115, 32,
+110,101,103, 97,116,101,100, 32, 42, 47, 10, 9,118, 99,111,108, 95, 97,116,116,114,105, 98,117,116,101, 40, 97,116,116,118, 99,
+111,108, 44, 32,118, 99,111,108, 41, 59, 10, 9,118, 99,111,108, 95, 97,108,112,104, 97, 32, 61, 32, 97,116,116,118, 99,111,108,
+ 46, 97, 59, 10, 9,102,114,111,110,116, 98, 97, 99,107, 32, 61, 32, 49, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,
+112,112,105,110,103, 40,118,101, 99, 51, 32,118,101, 99, 44, 32,109, 97,116, 52, 32,109, 97,116, 44, 32,118,101, 99, 51, 32,109,
+105,110,118,101, 99, 44, 32,118,101, 99, 51, 32,109, 97,120,118,101, 99, 44, 32,102,108,111, 97,116, 32,100,111,109,105,110, 44,
+ 32,102,108,111, 97,116, 32,100,111,109, 97,120, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,101, 99, 41, 10,123,
+ 10, 9,111,117,116,118,101, 99, 32, 61, 32, 40,109, 97,116, 32, 42, 32,118,101, 99, 52, 40,118,101, 99, 44, 32, 49, 46, 48, 41,
+ 41, 46,120,121,122, 59, 10, 9,105,102, 40,100,111,109,105,110, 32, 61, 61, 32, 49, 46, 48, 41, 10, 9, 9,111,117,116,118,101,
+ 99, 32, 61, 32,109, 97,120, 40,111,117,116,118,101, 99, 44, 32,109,105,110,118,101, 99, 41, 59, 10, 9,105,102, 40,100,111,109,
+ 97,120, 32, 61, 61, 32, 49, 46, 48, 41, 10, 9, 9,111,117,116,118,101, 99, 32, 61, 32,109,105,110, 40,111,117,116,118,101, 99,
+ 44, 32,109, 97,120,118,101, 99, 41, 59, 10,125, 10, 10,118,111,105,100, 32, 99, 97,109,101,114, 97, 40,118,101, 99, 51, 32, 99,
+111, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,105,101,119, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,
+117,116,100,101,112,116,104, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,100,105,115,116, 41, 10,123, 10, 9,111,
+117,116,100,101,112,116,104, 32, 61, 32, 97, 98,115, 40, 99,111, 46,122, 41, 59, 10, 9,111,117,116,100,105,115,116, 32, 61, 32,
+108,101,110,103,116,104, 40, 99,111, 41, 59, 10, 9,111,117,116,118,105,101,119, 32, 61, 32,110,111,114,109, 97,108,105,122,101,
+ 40, 99,111, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95, 97,100,100, 40,102,108,111, 97,116, 32,118, 97,108,
+ 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41,
+ 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,118, 97,108, 49, 32, 43, 32,118, 97,108, 50, 59, 10,125, 10, 10,118,111,105,
+100, 32,109, 97,116,104, 95,115,117, 98,116,114, 97, 99,116, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,
+116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,
+118, 97,108, 32, 61, 32,118, 97,108, 49, 32, 45, 32,118, 97,108, 50, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,
+109,117,108,116,105,112,108,121, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44,
+ 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,118,
+ 97,108, 49, 32, 42, 32,118, 97,108, 50, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,100,105,118,105,100,101, 40,
+102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,
+116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,105,102, 32, 40,118, 97,108, 50, 32, 61, 61, 32, 48, 46, 48, 41, 10, 9, 9,
+111,117,116,118, 97,108, 32, 61, 32, 48, 46, 48, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32,118,
+ 97,108, 49, 32, 47, 32,118, 97,108, 50, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,115,105,110,101, 40,102,108,
+111, 97,116, 32,118, 97,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,
+116,118, 97,108, 32, 61, 32,115,105,110, 40,118, 97,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95, 99,111,
+115,105,110,101, 40,102,108,111, 97,116, 32,118, 97,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108,
+ 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32, 99,111,115, 40,118, 97,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,
+109, 97,116,104, 95,116, 97,110,103,101,110,116, 40,102,108,111, 97,116, 32,118, 97,108, 44, 32,111,117,116, 32,102,108,111, 97,
+116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,116, 97,110, 40,118, 97,108, 41, 59, 10,
+125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95, 97,115,105,110, 40,102,108,111, 97,116, 32,118, 97,108, 44, 32,111,117,116,
+ 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,105,102, 32, 40,118, 97,108, 32, 60, 61, 32, 49, 46, 48,
+ 32, 38, 38, 32,118, 97,108, 32, 62, 61, 32, 45, 49, 46, 48, 41, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 97,115,105,110,
+ 40,118, 97,108, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,
+118,111,105,100, 32,109, 97,116,104, 95, 97, 99,111,115, 40,102,108,111, 97,116, 32,118, 97,108, 44, 32,111,117,116, 32,102,108,
+111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,105,102, 32, 40,118, 97,108, 32, 60, 61, 32, 49, 46, 48, 32, 38, 38,
+ 32,118, 97,108, 32, 62, 61, 32, 45, 49, 46, 48, 41, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 97, 99,111,115, 40,118, 97,
+108, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,
+100, 32,109, 97,116,104, 95, 97,116, 97,110, 40,102,108,111, 97,116, 32,118, 97,108, 44, 32,111,117,116, 32,102,108,111, 97,116,
+ 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32, 97,116, 97,110, 40,118, 97,108, 41, 59, 10,
+125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,112,111,119, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,111,
+ 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,105,102,
+ 32, 40,118, 97,108, 49, 32, 62, 61, 32, 48, 46, 48, 41, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32,112,111,119, 40,118, 97,
+108, 49, 44, 32,118, 97,108, 50, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 48, 46, 48, 59,
+ 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,108,111,103, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,
+111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,105,
+102, 40,118, 97,108, 49, 32, 62, 32, 48, 46, 48, 32, 32, 38, 38, 32,118, 97,108, 50, 32, 62, 32, 48, 46, 48, 41, 10, 9, 9,111,
+117,116,118, 97,108, 61, 32,108,111,103, 50, 40,118, 97,108, 49, 41, 32, 47, 32,108,111,103, 50, 40,118, 97,108, 50, 41, 59, 10,
+ 9,101,108,115,101, 10, 9, 9,111,117,116,118, 97,108, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,
+104, 95,109, 97,120, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,
+116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,109, 97,120, 40,
+118, 97,108, 49, 44, 32,118, 97,108, 50, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,109,105,110, 40,102,108,
+111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,
+111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,109,105,110, 40,118, 97,108, 49, 44, 32,118, 97,
+108, 50, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,114,111,117,110,100, 40,102,108,111, 97,116, 32,118, 97,
+108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 61, 32,
+102,108,111,111,114, 40,118, 97,108, 32, 43, 32, 48, 46, 53, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,108,
+101,115,115, 95,116,104, 97,110, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44,
+ 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,105,102, 40,118, 97,108, 49, 32, 60, 32,
+118, 97,108, 50, 41, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 49, 46, 48, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,
+116,118, 97,108, 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,103,114,101, 97,116,101,114,
+ 95,116,104, 97,110, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,
+116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,105,102, 40,118, 97,108, 49, 32, 62, 32,118, 97,108,
+ 50, 41, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 49, 46, 48, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116,118, 97,
+108, 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,115,113,117,101,101,122,101, 40,102,108,111, 97,116, 32,118,
+ 97,108, 44, 32,102,108,111, 97,116, 32,119,105,100,116,104, 44, 32,102,108,111, 97,116, 32, 99,101,110,116,101,114, 44, 32,111,
+117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32, 49, 46, 48,
+ 47, 40, 49, 46, 48, 32, 43, 32,112,111,119, 40, 50, 46, 55, 49, 56, 50, 56, 49, 56, 51, 44, 32, 45, 40, 40,118, 97,108, 45, 99,
+101,110,116,101,114, 41, 42,119,105,100,116,104, 41, 41, 41, 59, 10,125, 10, 10,118,111,105,100, 32,118,101, 99, 95,109, 97,116,
+104, 95, 97,100,100, 40,118,101, 99, 51, 32,118, 49, 44, 32,118,101, 99, 51, 32,118, 50, 44, 32,111,117,116, 32,118,101, 99, 51,
+ 32,111,117,116,118,101, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,
+116,118,101, 99, 32, 61, 32,118, 49, 32, 43, 32,118, 50, 59, 10, 9,111,117,116,118, 97,108, 32, 61, 32, 40, 97, 98,115, 40,111,
+117,116,118,101, 99, 91, 48, 93, 41, 32, 43, 32, 97, 98,115, 40,111,117,116,118,101, 99, 91, 49, 93, 41, 32, 43, 32, 97, 98,115,
+ 40,111,117,116,118,101, 99, 91, 50, 93, 41, 41, 47, 51, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,118,101, 99, 95,109, 97,
+116,104, 95,115,117, 98, 40,118,101, 99, 51, 32,118, 49, 44, 32,118,101, 99, 51, 32,118, 50, 44, 32,111,117,116, 32,118,101, 99,
+ 51, 32,111,117,116,118,101, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,
+117,116,118,101, 99, 32, 61, 32,118, 49, 32, 45, 32,118, 50, 59, 10, 9,111,117,116,118, 97,108, 32, 61, 32, 40, 97, 98,115, 40,
+111,117,116,118,101, 99, 91, 48, 93, 41, 32, 43, 32, 97, 98,115, 40,111,117,116,118,101, 99, 91, 49, 93, 41, 32, 43, 32, 97, 98,
+115, 40,111,117,116,118,101, 99, 91, 50, 93, 41, 41, 47, 51, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,118,101, 99, 95,109,
+ 97,116,104, 95, 97,118,101,114, 97,103,101, 40,118,101, 99, 51, 32,118, 49, 44, 32,118,101, 99, 51, 32,118, 50, 44, 32,111,117,
+116, 32,118,101, 99, 51, 32,111,117,116,118,101, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41,
+ 10,123, 10, 9,111,117,116,118,101, 99, 32, 61, 32,118, 49, 32, 43, 32,118, 50, 59, 10, 9,111,117,116,118, 97,108, 32, 61, 32,
+108,101,110,103,116,104, 40,111,117,116,118,101, 99, 41, 59, 10, 9,111,117,116,118,101, 99, 32, 61, 32,110,111,114,109, 97,108,
+105,122,101, 40,111,117,116,118,101, 99, 41, 59, 10,125, 10, 10,118,111,105,100, 32,118,101, 99, 95,109, 97,116,104, 95,100,111,
+116, 40,118,101, 99, 51, 32,118, 49, 44, 32,118,101, 99, 51, 32,118, 50, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,
+118,101, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118,101, 99,
+ 32, 61, 32,118,101, 99, 51, 40, 48, 44, 32, 48, 44, 32, 48, 41, 59, 10, 9,111,117,116,118, 97,108, 32, 61, 32,100,111,116, 40,
+118, 49, 44, 32,118, 50, 41, 59, 10,125, 10, 10,118,111,105,100, 32,118,101, 99, 95,109, 97,116,104, 95, 99,114,111,115,115, 40,
+118,101, 99, 51, 32,118, 49, 44, 32,118,101, 99, 51, 32,118, 50, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,101,
+ 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118,101, 99, 32, 61,
+ 32, 99,114,111,115,115, 40,118, 49, 44, 32,118, 50, 41, 59, 10, 9,111,117,116,118, 97,108, 32, 61, 32,108,101,110,103,116,104,
+ 40,111,117,116,118,101, 99, 41, 59, 10,125, 10, 10,118,111,105,100, 32,118,101, 99, 95,109, 97,116,104, 95,110,111,114,109, 97,
+108,105,122,101, 40,118,101, 99, 51, 32,118, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,101, 99, 44, 32,111,117,
+116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,108,101,110,103,
+116,104, 40,118, 41, 59, 10, 9,111,117,116,118,101, 99, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40,118, 41, 59, 10,125,
+ 10, 10,118,111,105,100, 32,118,101, 99, 95,109, 97,116,104, 95,110,101,103, 97,116,101, 40,118,101, 99, 51, 32,118, 44, 32,111,
+117,116, 32,118,101, 99, 51, 32,111,117,116,118, 41, 10,123, 10, 9,111,117,116,118, 32, 61, 32, 45,118, 59, 10,125, 10, 10,118,
+111,105,100, 32,110,111,114,109, 97,108, 40,118,101, 99, 51, 32,100,105,114, 44, 32,118,101, 99, 51, 32,110,111,114, 44, 32,111,
+117,116, 32,118,101, 99, 51, 32,111,117,116,110,111,114, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,100,111,116,
+ 41, 10,123, 10, 9,111,117,116,110,111,114, 32, 61, 32,110,111,114, 59, 10, 9,111,117,116,100,111,116, 32, 61, 32, 45,100,111,
+116, 40,100,105,114, 44, 32,110,111,114, 41, 59, 10,125, 10, 10,118,111,105,100, 32, 99,117,114,118,101,115, 95,118,101, 99, 40,
+102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 51, 32,118,101, 99, 44, 32,115, 97,109,112,108,101,114, 50, 68, 32, 99,
+117,114,118,101,109, 97,112, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,101, 99, 41, 10,123, 10, 9,111,117,116,
+118,101, 99, 46,120, 32, 61, 32,116,101,120,116,117,114,101, 50, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,118,101, 99, 50,
+ 40, 40,118,101, 99, 46,120, 32, 43, 32, 49, 46, 48, 41, 42, 48, 46, 53, 44, 32, 48, 46, 48, 41, 41, 46,120, 59, 10, 9,111,117,
+116,118,101, 99, 46,121, 32, 61, 32,116,101,120,116,117,114,101, 50, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,118,101, 99,
+ 50, 40, 40,118,101, 99, 46,121, 32, 43, 32, 49, 46, 48, 41, 42, 48, 46, 53, 44, 32, 48, 46, 48, 41, 41, 46,121, 59, 10, 9,111,
+117,116,118,101, 99, 46,122, 32, 61, 32,116,101,120,116,117,114,101, 50, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,118,101,
+ 99, 50, 40, 40,118,101, 99, 46,122, 32, 43, 32, 49, 46, 48, 41, 42, 48, 46, 53, 44, 32, 48, 46, 48, 41, 41, 46,122, 59, 10, 10,
+ 9,105,102, 32, 40,102, 97, 99, 32, 33, 61, 32, 49, 46, 48, 41, 10, 9, 9,111,117,116,118,101, 99, 32, 61, 32, 40,111,117,116,
+118,101, 99, 42,102, 97, 99, 41, 32, 43, 32, 40,118,101, 99, 42, 40, 49, 46, 48, 45,102, 97, 99, 41, 41, 59, 10, 10,125, 10, 10,
+118,111,105,100, 32, 99,117,114,118,101,115, 95,114,103, 98, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32,
+ 99,111,108, 44, 32,115, 97,109,112,108,101,114, 50, 68, 32, 99,117,114,118,101,109, 97,112, 44, 32,111,117,116, 32,118,101, 99,
+ 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,111,117,116, 99,111,108, 46,114, 32, 61, 32,116,101,120,116,117,114,101, 50,
+ 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,118,101, 99, 50, 40,116,101,120,116,117,114,101, 50, 68, 40, 99,117,114,118,101,
+109, 97,112, 44, 32,118,101, 99, 50, 40, 99,111,108, 46,114, 44, 32, 48, 46, 48, 41, 41, 46, 97, 44, 32, 48, 46, 48, 41, 41, 46,
+114, 59, 10, 9,111,117,116, 99,111,108, 46,103, 32, 61, 32,116,101,120,116,117,114,101, 50, 68, 40, 99,117,114,118,101,109, 97,
+112, 44, 32,118,101, 99, 50, 40,116,101,120,116,117,114,101, 50, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,118,101, 99, 50,
+ 40, 99,111,108, 46,103, 44, 32, 48, 46, 48, 41, 41, 46, 97, 44, 32, 48, 46, 48, 41, 41, 46,103, 59, 10, 9,111,117,116, 99,111,
+108, 46, 98, 32, 61, 32,116,101,120,116,117,114,101, 50, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,118,101, 99, 50, 40,116,
+101,120,116,117,114,101, 50, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,118,101, 99, 50, 40, 99,111,108, 46, 98, 44, 32, 48,
+ 46, 48, 41, 41, 46, 97, 44, 32, 48, 46, 48, 41, 41, 46, 98, 59, 10, 10, 9,105,102, 32, 40,102, 97, 99, 32, 33, 61, 32, 49, 46,
+ 48, 41, 10, 9, 9,111,117,116, 99,111,108, 32, 61, 32, 40,111,117,116, 99,111,108, 42,102, 97, 99, 41, 32, 43, 32, 40, 99,111,
+108, 42, 40, 49, 46, 48, 45,102, 97, 99, 41, 41, 59, 10, 10, 9,111,117,116, 99,111,108, 46, 97, 32, 61, 32, 99,111,108, 46, 97,
+ 59, 10,125, 10, 10,118,111,105,100, 32,115,101,116, 95,118, 97,108,117,101, 40,102,108,111, 97,116, 32,118, 97,108, 44, 32,111,
+117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,118, 97,108,
+ 59, 10,125, 10, 10,118,111,105,100, 32,115,101,116, 95,114,103, 98, 40,118,101, 99, 51, 32, 99,111,108, 44, 32,111,117,116, 32,
+118,101, 99, 51, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,111,108, 59, 10,125, 10,
+ 10,118,111,105,100, 32,115,101,116, 95,114,103, 98, 97, 40,118,101, 99, 52, 32, 99,111,108, 44, 32,111,117,116, 32,118,101, 99,
+ 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,111,108, 59, 10,125, 10, 10,118,111,
+105,100, 32,115,101,116, 95,118, 97,108,117,101, 95,122,101,114,111, 40,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118,
+ 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,115,101,116,
+ 95,118, 97,108,117,101, 95,111,110,101, 40,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,
+111,117,116,118, 97,108, 32, 61, 32, 49, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,115,101,116, 95,114,103, 98, 95,122,101,
+114,111, 40,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,
+118,101, 99, 51, 40, 48, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,115,101,116, 95,114,103, 98, 97, 95,122,101,114,111,
+ 40,111,117,116, 32,118,101, 99, 52, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,118,101,
+ 99, 52, 40, 48, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95, 98,108,101,110,100, 40,102,108,111, 97,116,
+ 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,
+118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44,
+ 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,111,117,116, 99,111,108, 32, 61, 32,109,105,120, 40, 99,111,108, 49, 44, 32,
+ 99,111,108, 50, 44, 32,102, 97, 99, 41, 59, 10, 9,111,117,116, 99,111,108, 46, 97, 32, 61, 32, 99,111,108, 49, 46, 97, 59, 10,
+125, 10, 10,118,111,105,100, 32,109,105,120, 95, 97,100,100, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32,
+ 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108,
+ 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59,
+ 10, 9,111,117,116, 99,111,108, 32, 61, 32,109,105,120, 40, 99,111,108, 49, 44, 32, 99,111,108, 49, 32, 43, 32, 99,111,108, 50,
+ 44, 32,102, 97, 99, 41, 59, 10, 9,111,117,116, 99,111,108, 46, 97, 32, 61, 32, 99,111,108, 49, 46, 97, 59, 10,125, 10, 10,118,
+111,105,100, 32,109,105,120, 95,109,117,108,116, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108,
+ 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123,
+ 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,111,
+117,116, 99,111,108, 32, 61, 32,109,105,120, 40, 99,111,108, 49, 44, 32, 99,111,108, 49, 32, 42, 32, 99,111,108, 50, 44, 32,102,
+ 97, 99, 41, 59, 10, 9,111,117,116, 99,111,108, 46, 97, 32, 61, 32, 99,111,108, 49, 46, 97, 59, 10,125, 10, 10,118,111,105,100,
+ 32,109,105,120, 95,115, 99,114,101,101,110, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49,
+ 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10,
+ 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,102,108,
+111, 97,116, 32,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99, 59, 10, 10, 9,111,117,116, 99,111,108, 32, 61,
+ 32,118,101, 99, 52, 40, 49, 46, 48, 41, 32, 45, 32, 40,118,101, 99, 52, 40,102, 97, 99,109, 41, 32, 43, 32,102, 97, 99, 42, 40,
+118,101, 99, 52, 40, 49, 46, 48, 41, 32, 45, 32, 99,111,108, 50, 41, 41, 42, 40,118,101, 99, 52, 40, 49, 46, 48, 41, 32, 45, 32,
+ 99,111,108, 49, 41, 59, 10, 9,111,117,116, 99,111,108, 46, 97, 32, 61, 32, 99,111,108, 49, 46, 97, 59, 10,125, 10, 10,118,111,
+105,100, 32,109,105,120, 95,111,118,101,114,108, 97,121, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,
+111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41,
+ 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10,
+ 9,102,108,111, 97,116, 32,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99, 59, 10, 10, 9,111,117,116, 99,111,
+108, 32, 61, 32, 99,111,108, 49, 59, 10, 10, 9,105,102, 40,111,117,116, 99,111,108, 46,114, 32, 60, 32, 48, 46, 53, 41, 10, 9,
+ 9,111,117,116, 99,111,108, 46,114, 32, 42, 61, 32,102, 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97, 99, 42, 99,111,108, 50,
+ 46,114, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116, 99,111,108, 46,114, 32, 61, 32, 49, 46, 48, 32, 45, 32, 40,102, 97,
+ 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97, 99, 42, 40, 49, 46, 48, 32, 45, 32, 99,111,108, 50, 46,114, 41, 41, 42, 40, 49, 46,
+ 48, 32, 45, 32,111,117,116, 99,111,108, 46,114, 41, 59, 10, 10, 9,105,102, 40,111,117,116, 99,111,108, 46,103, 32, 60, 32, 48,
+ 46, 53, 41, 10, 9, 9,111,117,116, 99,111,108, 46,103, 32, 42, 61, 32,102, 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97, 99,
+ 42, 99,111,108, 50, 46,103, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116, 99,111,108, 46,103, 32, 61, 32, 49, 46, 48, 32,
+ 45, 32, 40,102, 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97, 99, 42, 40, 49, 46, 48, 32, 45, 32, 99,111,108, 50, 46,103, 41,
+ 41, 42, 40, 49, 46, 48, 32, 45, 32,111,117,116, 99,111,108, 46,103, 41, 59, 10, 10, 9,105,102, 40,111,117,116, 99,111,108, 46,
+ 98, 32, 60, 32, 48, 46, 53, 41, 10, 9, 9,111,117,116, 99,111,108, 46, 98, 32, 42, 61, 32,102, 97, 99,109, 32, 43, 32, 50, 46,
+ 48, 42,102, 97, 99, 42, 99,111,108, 50, 46, 98, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116, 99,111,108, 46, 98, 32, 61,
+ 32, 49, 46, 48, 32, 45, 32, 40,102, 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97, 99, 42, 40, 49, 46, 48, 32, 45, 32, 99,111,
+108, 50, 46, 98, 41, 41, 42, 40, 49, 46, 48, 32, 45, 32,111,117,116, 99,111,108, 46, 98, 41, 59, 10,125, 10, 10,118,111,105,100,
+ 32,109,105,120, 95,115,117, 98, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,
+101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97,
+ 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,111,117,116, 99,111,
+108, 32, 61, 32,109,105,120, 40, 99,111,108, 49, 44, 32, 99,111,108, 49, 32, 45, 32, 99,111,108, 50, 44, 32,102, 97, 99, 41, 59,
+ 10, 9,111,117,116, 99,111,108, 46, 97, 32, 61, 32, 99,111,108, 49, 46, 97, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120,
+ 95,100,105,118, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32,
+ 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32,
+ 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,102,108,111, 97,116, 32,102, 97, 99,
+109, 32, 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99, 59, 10, 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,111,108, 49, 59, 10,
+ 10, 9,105,102, 40, 99,111,108, 50, 46,114, 32, 33, 61, 32, 48, 46, 48, 41, 32,111,117,116, 99,111,108, 46,114, 32, 61, 32,102,
+ 97, 99,109, 42,111,117,116, 99,111,108, 46,114, 32, 43, 32,102, 97, 99, 42,111,117,116, 99,111,108, 46,114, 47, 99,111,108, 50,
+ 46,114, 59, 10, 9,105,102, 40, 99,111,108, 50, 46,103, 32, 33, 61, 32, 48, 46, 48, 41, 32,111,117,116, 99,111,108, 46,103, 32,
+ 61, 32,102, 97, 99,109, 42,111,117,116, 99,111,108, 46,103, 32, 43, 32,102, 97, 99, 42,111,117,116, 99,111,108, 46,103, 47, 99,
+111,108, 50, 46,103, 59, 10, 9,105,102, 40, 99,111,108, 50, 46, 98, 32, 33, 61, 32, 48, 46, 48, 41, 32,111,117,116, 99,111,108,
+ 46, 98, 32, 61, 32,102, 97, 99,109, 42,111,117,116, 99,111,108, 46, 98, 32, 43, 32,102, 97, 99, 42,111,117,116, 99,111,108, 46,
+ 98, 47, 99,111,108, 50, 46, 98, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,100,105,102,102, 40,102,108,111, 97,116,
+ 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,
+118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44,
+ 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,111,117,116, 99,111,108, 32, 61, 32,109,105,120, 40, 99,111,108, 49, 44, 32,
+ 97, 98,115, 40, 99,111,108, 49, 32, 45, 32, 99,111,108, 50, 41, 44, 32,102, 97, 99, 41, 59, 10, 9,111,117,116, 99,111,108, 46,
+ 97, 32, 61, 32, 99,111,108, 49, 46, 97, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,100, 97,114,107, 40,102,108,111,
+ 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,
+116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97,
+ 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,111,117,116, 99,111,108, 46,114,103, 98, 32, 61, 32,109,105,110, 40,
+ 99,111,108, 49, 46,114,103, 98, 44, 32, 99,111,108, 50, 46,114,103, 98, 42,102, 97, 99, 41, 59, 10, 9,111,117,116, 99,111,108,
+ 46, 97, 32, 61, 32, 99,111,108, 49, 46, 97, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,108,105,103,104,116, 40,102,
+108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,
+111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,
+102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,111,117,116, 99,111,108, 46,114,103, 98, 32, 61, 32,109, 97,
+120, 40, 99,111,108, 49, 46,114,103, 98, 44, 32, 99,111,108, 50, 46,114,103, 98, 42,102, 97, 99, 41, 59, 10, 9,111,117,116, 99,
+111,108, 46, 97, 32, 61, 32, 99,111,108, 49, 46, 97, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,100,111,100,103,101,
+ 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50,
+ 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,
+112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,111,108, 49,
+ 59, 10, 10, 9,105,102, 40,111,117,116, 99,111,108, 46,114, 32, 33, 61, 32, 48, 46, 48, 41, 32,123, 10, 9, 9,102,108,111, 97,
+116, 32,116,109,112, 32, 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99, 42, 99,111,108, 50, 46,114, 59, 10, 9, 9,105,102, 40,116,
+109,112, 32, 60, 61, 32, 48, 46, 48, 41, 10, 9, 9, 9,111,117,116, 99,111,108, 46,114, 32, 61, 32, 49, 46, 48, 59, 10, 9, 9,
+101,108,115,101, 32,105,102, 40, 40,116,109,112, 32, 61, 32,111,117,116, 99,111,108, 46,114, 47,116,109,112, 41, 32, 62, 32, 49,
+ 46, 48, 41, 10, 9, 9, 9,111,117,116, 99,111,108, 46,114, 32, 61, 32, 49, 46, 48, 59, 10, 9, 9,101,108,115,101, 10, 9, 9,
+ 9,111,117,116, 99,111,108, 46,114, 32, 61, 32,116,109,112, 59, 10, 9,125, 10, 9,105,102, 40,111,117,116, 99,111,108, 46,103,
+ 32, 33, 61, 32, 48, 46, 48, 41, 32,123, 10, 9, 9,102,108,111, 97,116, 32,116,109,112, 32, 61, 32, 49, 46, 48, 32, 45, 32,102,
+ 97, 99, 42, 99,111,108, 50, 46,103, 59, 10, 9, 9,105,102, 40,116,109,112, 32, 60, 61, 32, 48, 46, 48, 41, 10, 9, 9, 9,111,
+117,116, 99,111,108, 46,103, 32, 61, 32, 49, 46, 48, 59, 10, 9, 9,101,108,115,101, 32,105,102, 40, 40,116,109,112, 32, 61, 32,
+111,117,116, 99,111,108, 46,103, 47,116,109,112, 41, 32, 62, 32, 49, 46, 48, 41, 10, 9, 9, 9,111,117,116, 99,111,108, 46,103,
+ 32, 61, 32, 49, 46, 48, 59, 10, 9, 9,101,108,115,101, 10, 9, 9, 9,111,117,116, 99,111,108, 46,103, 32, 61, 32,116,109,112,
+ 59, 10, 9,125, 10, 9,105,102, 40,111,117,116, 99,111,108, 46, 98, 32, 33, 61, 32, 48, 46, 48, 41, 32,123, 10, 9, 9,102,108,
+111, 97,116, 32,116,109,112, 32, 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99, 42, 99,111,108, 50, 46, 98, 59, 10, 9, 9,105,102,
+ 40,116,109,112, 32, 60, 61, 32, 48, 46, 48, 41, 10, 9, 9, 9,111,117,116, 99,111,108, 46, 98, 32, 61, 32, 49, 46, 48, 59, 10,
+ 9, 9,101,108,115,101, 32,105,102, 40, 40,116,109,112, 32, 61, 32,111,117,116, 99,111,108, 46, 98, 47,116,109,112, 41, 32, 62,
+ 32, 49, 46, 48, 41, 10, 9, 9, 9,111,117,116, 99,111,108, 46, 98, 32, 61, 32, 49, 46, 48, 59, 10, 9, 9,101,108,115,101, 10,
+ 9, 9, 9,111,117,116, 99,111,108, 46, 98, 32, 61, 32,116,109,112, 59, 10, 9,125, 10,125, 10, 10,118,111,105,100, 32,109,105,
+120, 95, 98,117,114,110, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99,
+ 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32,
+ 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,102,108,111, 97,116, 32,116,
+109,112, 44, 32,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99, 59, 10, 10, 9,111,117,116, 99,111,108, 32, 61,
+ 32, 99,111,108, 49, 59, 10, 10, 9,116,109,112, 32, 61, 32,102, 97, 99,109, 32, 43, 32,102, 97, 99, 42, 99,111,108, 50, 46,114,
+ 59, 10, 9,105,102, 40,116,109,112, 32, 60, 61, 32, 48, 46, 48, 41, 10, 9, 9,111,117,116, 99,111,108, 46,114, 32, 61, 32, 48,
+ 46, 48, 59, 10, 9,101,108,115,101, 32,105,102, 40, 40,116,109,112, 32, 61, 32, 40, 49, 46, 48, 32, 45, 32, 40, 49, 46, 48, 32,
+ 45, 32,111,117,116, 99,111,108, 46,114, 41, 47,116,109,112, 41, 41, 32, 60, 32, 48, 46, 48, 41, 10, 9, 9,111,117,116, 99,111,
+108, 46,114, 32, 61, 32, 48, 46, 48, 59, 10, 9,101,108,115,101, 32,105,102, 40,116,109,112, 32, 62, 32, 49, 46, 48, 41, 10, 9,
+ 9,111,117,116, 99,111,108, 46,114, 32, 61, 32, 49, 46, 48, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116, 99,111,108, 46,
+114, 32, 61, 32,116,109,112, 59, 10, 10, 9,116,109,112, 32, 61, 32,102, 97, 99,109, 32, 43, 32,102, 97, 99, 42, 99,111,108, 50,
+ 46,103, 59, 10, 9,105,102, 40,116,109,112, 32, 60, 61, 32, 48, 46, 48, 41, 10, 9, 9,111,117,116, 99,111,108, 46,103, 32, 61,
+ 32, 48, 46, 48, 59, 10, 9,101,108,115,101, 32,105,102, 40, 40,116,109,112, 32, 61, 32, 40, 49, 46, 48, 32, 45, 32, 40, 49, 46,
+ 48, 32, 45, 32,111,117,116, 99,111,108, 46,103, 41, 47,116,109,112, 41, 41, 32, 60, 32, 48, 46, 48, 41, 10, 9, 9,111,117,116,
+ 99,111,108, 46,103, 32, 61, 32, 48, 46, 48, 59, 10, 9,101,108,115,101, 32,105,102, 40,116,109,112, 32, 62, 32, 49, 46, 48, 41,
+ 10, 9, 9,111,117,116, 99,111,108, 46,103, 32, 61, 32, 49, 46, 48, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116, 99,111,
+108, 46,103, 32, 61, 32,116,109,112, 59, 10, 10, 9,116,109,112, 32, 61, 32,102, 97, 99,109, 32, 43, 32,102, 97, 99, 42, 99,111,
+108, 50, 46, 98, 59, 10, 9,105,102, 40,116,109,112, 32, 60, 61, 32, 48, 46, 48, 41, 10, 9, 9,111,117,116, 99,111,108, 46, 98,
+ 32, 61, 32, 48, 46, 48, 59, 10, 9,101,108,115,101, 32,105,102, 40, 40,116,109,112, 32, 61, 32, 40, 49, 46, 48, 32, 45, 32, 40,
+ 49, 46, 48, 32, 45, 32,111,117,116, 99,111,108, 46, 98, 41, 47,116,109,112, 41, 41, 32, 60, 32, 48, 46, 48, 41, 10, 9, 9,111,
+117,116, 99,111,108, 46, 98, 32, 61, 32, 48, 46, 48, 59, 10, 9,101,108,115,101, 32,105,102, 40,116,109,112, 32, 62, 32, 49, 46,
+ 48, 41, 10, 9, 9,111,117,116, 99,111,108, 46, 98, 32, 61, 32, 49, 46, 48, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116,
+ 99,111,108, 46, 98, 32, 61, 32,116,109,112, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,104,117,101, 40,102,108,111,
+ 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,
+116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97,
+ 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 32,
+ 45, 32,102, 97, 99, 59, 10, 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,111,108, 49, 59, 10, 10, 9,118,101, 99, 52, 32,104,
+115,118, 44, 32,104,115,118, 50, 44, 32,116,109,112, 59, 10, 9,114,103, 98, 95,116,111, 95,104,115,118, 40, 99,111,108, 50, 44,
+ 32,104,115,118, 50, 41, 59, 10, 10, 9,105,102, 40,104,115,118, 50, 46,121, 32, 33, 61, 32, 48, 46, 48, 41, 32,123, 10, 9, 9,
+114,103, 98, 95,116,111, 95,104,115,118, 40,111,117,116, 99,111,108, 44, 32,104,115,118, 41, 59, 10, 9, 9,104,115,118, 46,120,
+ 32, 61, 32,104,115,118, 50, 46,120, 59, 10, 9, 9,104,115,118, 95,116,111, 95,114,103, 98, 40,104,115,118, 44, 32,116,109,112,
+ 41, 59, 32, 10, 10, 9, 9,111,117,116, 99,111,108, 32, 61, 32,109,105,120, 40,111,117,116, 99,111,108, 44, 32,116,109,112, 44,
+ 32,102, 97, 99, 41, 59, 10, 9, 9,111,117,116, 99,111,108, 46, 97, 32, 61, 32, 99,111,108, 49, 46, 97, 59, 10, 9,125, 10,125,
+ 10, 10,118,111,105,100, 32,109,105,120, 95,115, 97,116, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,
+111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41,
+ 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10,
+ 9,102,108,111, 97,116, 32,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99, 59, 10, 10, 9,111,117,116, 99,111,
+108, 32, 61, 32, 99,111,108, 49, 59, 10, 10, 9,118,101, 99, 52, 32,104,115,118, 44, 32,104,115,118, 50, 59, 10, 9,114,103, 98,
+ 95,116,111, 95,104,115,118, 40,111,117,116, 99,111,108, 44, 32,104,115,118, 41, 59, 10, 10, 9,105,102, 40,104,115,118, 46,121,
+ 32, 33, 61, 32, 48, 46, 48, 41, 32,123, 10, 9, 9,114,103, 98, 95,116,111, 95,104,115,118, 40, 99,111,108, 50, 44, 32,104,115,
+118, 50, 41, 59, 10, 10, 9, 9,104,115,118, 46,121, 32, 61, 32,102, 97, 99,109, 42,104,115,118, 46,121, 32, 43, 32,102, 97, 99,
+ 42,104,115,118, 50, 46,121, 59, 10, 9, 9,104,115,118, 95,116,111, 95,114,103, 98, 40,104,115,118, 44, 32,111,117,116, 99,111,
+108, 41, 59, 10, 9,125, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,118, 97,108, 40,102,108,111, 97,116, 32,102, 97, 99,
+ 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52,
+ 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48,
+ 44, 32, 49, 46, 48, 41, 59, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99, 59,
+ 10, 10, 9,118,101, 99, 52, 32,104,115,118, 44, 32,104,115,118, 50, 59, 10, 9,114,103, 98, 95,116,111, 95,104,115,118, 40, 99,
+111,108, 49, 44, 32,104,115,118, 41, 59, 10, 9,114,103, 98, 95,116,111, 95,104,115,118, 40, 99,111,108, 50, 44, 32,104,115,118,
+ 50, 41, 59, 10, 10, 9,104,115,118, 46,122, 32, 61, 32,102, 97, 99,109, 42,104,115,118, 46,122, 32, 43, 32,102, 97, 99, 42,104,
+115,118, 50, 46,122, 59, 10, 9,104,115,118, 95,116,111, 95,114,103, 98, 40,104,115,118, 44, 32,111,117,116, 99,111,108, 41, 59,
+ 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95, 99,111,108,111,114, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101,
+ 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116,
+ 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46,
+ 48, 41, 59, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99, 59, 10, 10, 9,111,
+117,116, 99,111,108, 32, 61, 32, 99,111,108, 49, 59, 10, 10, 9,118,101, 99, 52, 32,104,115,118, 44, 32,104,115,118, 50, 44, 32,
+116,109,112, 59, 10, 9,114,103, 98, 95,116,111, 95,104,115,118, 40, 99,111,108, 50, 44, 32,104,115,118, 50, 41, 59, 10, 10, 9,
+105,102, 40,104,115,118, 50, 46,121, 32, 33, 61, 32, 48, 46, 48, 41, 32,123, 10, 9, 9,114,103, 98, 95,116,111, 95,104,115,118,
+ 40,111,117,116, 99,111,108, 44, 32,104,115,118, 41, 59, 10, 9, 9,104,115,118, 46,120, 32, 61, 32,104,115,118, 50, 46,120, 59,
+ 10, 9, 9,104,115,118, 46,121, 32, 61, 32,104,115,118, 50, 46,121, 59, 10, 9, 9,104,115,118, 95,116,111, 95,114,103, 98, 40,
+104,115,118, 44, 32,116,109,112, 41, 59, 32, 10, 10, 9, 9,111,117,116, 99,111,108, 32, 61, 32,109,105,120, 40,111,117,116, 99,
+111,108, 44, 32,116,109,112, 44, 32,102, 97, 99, 41, 59, 10, 9, 9,111,117,116, 99,111,108, 46, 97, 32, 61, 32, 99,111,108, 49,
+ 46, 97, 59, 10, 9,125, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,115,111,102,116, 40,102,108,111, 97,116, 32,102, 97,
+ 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99,
+ 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46,
+ 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99,
+ 59, 10, 10, 9,118,101, 99, 52, 32,111,110,101, 61, 32,118,101, 99, 52, 40, 49, 46, 48, 41, 59, 10, 9,118,101, 99, 52, 32,115,
+ 99,114, 61, 32,111,110,101, 32, 45, 32, 40,111,110,101, 32, 45, 32, 99,111,108, 50, 41, 42, 40,111,110,101, 32, 45, 32, 99,111,
+108, 49, 41, 59, 10, 9,111,117,116, 99,111,108, 32, 61, 32,102, 97, 99,109, 42, 99,111,108, 49, 32, 43, 32,102, 97, 99, 42, 40,
+ 40,111,110,101, 32, 45, 32, 99,111,108, 49, 41, 42, 99,111,108, 50, 42, 99,111,108, 49, 32, 43, 32, 99,111,108, 49, 42,115, 99,
+114, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,108,105,110,101, 97,114, 40,102,108,111, 97,116, 32,102, 97, 99,
+ 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52,
+ 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48,
+ 44, 32, 49, 46, 48, 41, 59, 10, 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,111,108, 49, 59, 10, 10, 9,105,102, 40, 99,111,
+108, 50, 46,114, 32, 62, 32, 48, 46, 53, 41, 10, 9, 9,111,117,116, 99,111,108, 46,114, 61, 32, 99,111,108, 49, 46,114, 32, 43,
+ 32,102, 97, 99, 42, 40, 50, 46, 48, 42, 40, 99,111,108, 50, 46,114, 32, 45, 32, 48, 46, 53, 41, 41, 59, 10, 9,101,108,115,101,
+ 10, 9, 9,111,117,116, 99,111,108, 46,114, 61, 32, 99,111,108, 49, 46,114, 32, 43, 32,102, 97, 99, 42, 40, 50, 46, 48, 42, 40,
+ 99,111,108, 50, 46,114, 41, 32, 45, 32, 49, 46, 48, 41, 59, 10, 10, 9,105,102, 40, 99,111,108, 50, 46,103, 32, 62, 32, 48, 46,
+ 53, 41, 10, 9, 9,111,117,116, 99,111,108, 46,103, 61, 32, 99,111,108, 49, 46,103, 32, 43, 32,102, 97, 99, 42, 40, 50, 46, 48,
+ 42, 40, 99,111,108, 50, 46,103, 32, 45, 32, 48, 46, 53, 41, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116, 99,111,108,
+ 46,103, 61, 32, 99,111,108, 49, 46,103, 32, 43, 32,102, 97, 99, 42, 40, 50, 46, 48, 42, 40, 99,111,108, 50, 46,103, 41, 32, 45,
+ 32, 49, 46, 48, 41, 59, 10, 10, 9,105,102, 40, 99,111,108, 50, 46, 98, 32, 62, 32, 48, 46, 53, 41, 10, 9, 9,111,117,116, 99,
+111,108, 46, 98, 61, 32, 99,111,108, 49, 46, 98, 32, 43, 32,102, 97, 99, 42, 40, 50, 46, 48, 42, 40, 99,111,108, 50, 46, 98, 32,
+ 45, 32, 48, 46, 53, 41, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116, 99,111,108, 46, 98, 61, 32, 99,111,108, 49, 46,
+ 98, 32, 43, 32,102, 97, 99, 42, 40, 50, 46, 48, 42, 40, 99,111,108, 50, 46, 98, 41, 32, 45, 32, 49, 46, 48, 41, 59, 10,125, 10,
+ 10,118,111,105,100, 32,118, 97,108,116,111,114,103, 98, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,115, 97,109,112,108,101,
+114, 50, 68, 32, 99,111,108,111,114,109, 97,112, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 44, 32,111,
+117,116, 32,102,108,111, 97,116, 32,111,117,116, 97,108,112,104, 97, 41, 10,123, 10, 9,111,117,116, 99,111,108, 32, 61, 32,116,
+101,120,116,117,114,101, 50, 68, 40, 99,111,108,111,114,109, 97,112, 44, 32,118,101, 99, 50, 40,102, 97, 99, 44, 32, 48, 46, 48,
+ 41, 41, 59, 10, 9,111,117,116, 97,108,112,104, 97, 32, 61, 32,111,117,116, 99,111,108, 46, 97, 59, 10,125, 10, 10,118,111,105,
+100, 32,114,103, 98,116,111, 98,119, 40,118,101, 99, 52, 32, 99,111,108,111,114, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,
+111,117,116,118, 97,108, 41, 32, 32, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32, 99,111,108,111,114, 46,114, 42, 48, 46,
+ 51, 53, 32, 43, 32, 99,111,108,111,114, 46,103, 42, 48, 46, 52, 53, 32, 43, 32, 99,111,108,111,114, 46, 98, 42, 48, 46, 50, 59,
+ 32, 47, 42, 32,107,101,101,112, 32,116,104,101,115,101, 32,102, 97, 99,116,111,114,115, 32,105,110, 32,115,121,110, 99, 32,119,
+105,116,104, 32,116,101,120,116,117,114,101, 46,104, 58, 82, 71, 66, 84, 79, 66, 87, 32, 42, 47, 10,125, 10, 10,118,111,105,100,
+ 32,105,110,118,101,114,116, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 44, 32,111,117,116,
+ 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,111,117,116, 99,111,108, 46,120,121,122, 32, 61, 32,109,105,
+120, 40, 99,111,108, 46,120,121,122, 44, 32,118,101, 99, 51, 40, 49, 46, 48, 44, 32, 49, 46, 48, 44, 32, 49, 46, 48, 41, 32, 45,
+ 32, 99,111,108, 46,120,121,122, 44, 32,102, 97, 99, 41, 59, 10, 9,111,117,116, 99,111,108, 46,119, 32, 61, 32, 99,111,108, 46,
+119, 59, 10,125, 10, 10,118,111,105,100, 32,104,117,101, 95,115, 97,116, 40,102,108,111, 97,116, 32,104,117,101, 44, 32,102,108,
+111, 97,116, 32,115, 97,116, 44, 32,102,108,111, 97,116, 32,118, 97,108,117,101, 44, 32,102,108,111, 97,116, 32,102, 97, 99, 44,
+ 32,118,101, 99, 52, 32, 99,111,108, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,118,
+101, 99, 52, 32,104,115,118, 59, 10, 10, 9,114,103, 98, 95,116,111, 95,104,115,118, 40, 99,111,108, 44, 32,104,115,118, 41, 59,
+ 10, 10, 9,104,115,118, 91, 48, 93, 32, 43, 61, 32, 40,104,117,101, 32, 45, 32, 48, 46, 53, 41, 59, 10, 9,105,102, 40,104,115,
+118, 91, 48, 93, 62, 49, 46, 48, 41, 32,104,115,118, 91, 48, 93, 45, 61, 49, 46, 48, 59, 32,101,108,115,101, 32,105,102, 40,104,
+115,118, 91, 48, 93, 60, 48, 46, 48, 41, 32,104,115,118, 91, 48, 93, 43, 61, 32, 49, 46, 48, 59, 10, 9,104,115,118, 91, 49, 93,
+ 32, 42, 61, 32,115, 97,116, 59, 10, 9,105,102, 40,104,115,118, 91, 49, 93, 62, 49, 46, 48, 41, 32,104,115,118, 91, 49, 93, 61,
+ 32, 49, 46, 48, 59, 32,101,108,115,101, 32,105,102, 40,104,115,118, 91, 49, 93, 60, 48, 46, 48, 41, 32,104,115,118, 91, 49, 93,
+ 61, 32, 48, 46, 48, 59, 10, 9,104,115,118, 91, 50, 93, 32, 42, 61, 32,118, 97,108,117,101, 59, 10, 9,105,102, 40,104,115,118,
+ 91, 50, 93, 62, 49, 46, 48, 41, 32,104,115,118, 91, 50, 93, 61, 32, 49, 46, 48, 59, 32,101,108,115,101, 32,105,102, 40,104,115,
+118, 91, 50, 93, 60, 48, 46, 48, 41, 32,104,115,118, 91, 50, 93, 61, 32, 48, 46, 48, 59, 10, 10, 9,104,115,118, 95,116,111, 95,
+114,103, 98, 40,104,115,118, 44, 32,111,117,116, 99,111,108, 41, 59, 10, 10, 9,111,117,116, 99,111,108, 32, 61, 32,109,105,120,
+ 40, 99,111,108, 44, 32,111,117,116, 99,111,108, 44, 32,102, 97, 99, 41, 59, 10,125, 10, 10,118,111,105,100, 32,115,101,112, 97,
+114, 97,116,101, 95,114,103, 98, 40,118,101, 99, 52, 32, 99,111,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,114, 44, 32,
+111,117,116, 32,102,108,111, 97,116, 32,103, 44, 32,111,117,116, 32,102,108,111, 97,116, 32, 98, 41, 10,123, 10, 9,114, 32, 61,
+ 32, 99,111,108, 46,114, 59, 10, 9,103, 32, 61, 32, 99,111,108, 46,103, 59, 10, 9, 98, 32, 61, 32, 99,111,108, 46, 98, 59, 10,
+125, 10, 10,118,111,105,100, 32, 99,111,109, 98,105,110,101, 95,114,103, 98, 40,102,108,111, 97,116, 32,114, 44, 32,102,108,111,
+ 97,116, 32,103, 44, 32,102,108,111, 97,116, 32, 98, 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,108, 41, 10,123, 10, 9,
+ 99,111,108, 32, 61, 32,118,101, 99, 52, 40,114, 44, 32,103, 44, 32, 98, 44, 32, 49, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,
+100, 32,111,117,116,112,117,116, 95,110,111,100,101, 40,118,101, 99, 52, 32,114,103, 98, 44, 32,102,108,111, 97,116, 32, 97,108,
+112,104, 97, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116,114,103, 98, 41, 10,123, 10, 9,111,117,116,114,103, 98, 32,
+ 61, 32,118,101, 99, 52, 40,114,103, 98, 46,114,103, 98, 44, 32, 97,108,112,104, 97, 41, 59, 10,125, 10, 10, 47, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 32, 84, 69, 88, 84, 85, 82, 69, 83, 32, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 47, 10, 10,118,111,105,100, 32,116,101,120,116,117,114,101, 95,102,108,105,112, 95, 98,108,101,110,100, 40,118,101, 99, 51, 32,
+118,101, 99, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,101, 99, 41, 10,123, 10, 9,111,117,116,118,101, 99, 32,
+ 61, 32,118,101, 99, 46,121,120,122, 59, 10,125, 10, 10,118,111,105,100, 32,116,101,120,116,117,114,101, 95, 98,108,101,110,100,
+ 95,108,105,110, 40,118,101, 99, 51, 32,118,101, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41,
+ 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32, 40, 49, 46, 48, 43,118,101, 99, 46,120, 41, 47, 50, 46, 48, 59, 10,125, 10,
+ 10,118,111,105,100, 32,116,101,120,116,117,114,101, 95, 98,108,101,110,100, 95,113,117, 97,100, 40,118,101, 99, 51, 32,118,101,
+ 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61,
+ 32,109, 97,120, 40, 40, 49, 46, 48, 43,118,101, 99, 46,120, 41, 47, 50, 46, 48, 44, 32, 48, 46, 48, 41, 59, 10, 9,111,117,116,
+118, 97,108, 32, 42, 61, 32,111,117,116,118, 97,108, 59, 10,125, 10, 10,118,111,105,100, 32,116,101,120,116,117,114,101, 95,119,
+111,111,100, 95,115,105,110, 40,118,101, 99, 51, 32,118,101, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,118, 97,108,117,
+101, 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,108,111,114, 44, 32,111,117,116, 32,118,101, 99, 51, 32,110,111,114,109,
+ 97,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32, 97, 32, 61, 32,115,113,114,116, 40,118,101, 99, 46,120, 42,118,101, 99, 46,
+120, 32, 43, 32,118,101, 99, 46,121, 42,118,101, 99, 46,121, 32, 43, 32,118,101, 99, 46,122, 42,118,101, 99, 46,122, 41, 42, 50,
+ 48, 46, 48, 59, 10, 9,102,108,111, 97,116, 32,119,105, 32, 61, 32, 48, 46, 53, 32, 43, 32, 48, 46, 53, 42,115,105,110, 40, 97,
+ 41, 59, 10, 10, 9,118, 97,108,117,101, 32, 61, 32,119,105, 59, 10, 9, 99,111,108,111,114, 32, 61, 32,118,101, 99, 52, 40,119,
+105, 44, 32,119,105, 44, 32,119,105, 44, 32, 49, 46, 48, 41, 59, 10, 9,110,111,114,109, 97,108, 32, 61, 32,118,101, 99, 51, 40,
+ 48, 46, 48, 44, 32, 48, 46, 48, 44, 32, 48, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,116,101,120,116,117,114,101, 95,
+105,109, 97,103,101, 40,118,101, 99, 51, 32,118,101, 99, 44, 32,115, 97,109,112,108,101,114, 50, 68, 32,105,109, 97, 44, 32,111,
+117,116, 32,102,108,111, 97,116, 32,118, 97,108,117,101, 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,108,111,114, 44, 32,
+111,117,116, 32,118,101, 99, 51, 32,110,111,114,109, 97,108, 41, 10,123, 10, 9, 99,111,108,111,114, 32, 61, 32,116,101,120,116,
+117,114,101, 50, 68, 40,105,109, 97, 44, 32, 40,118,101, 99, 46,120,121, 32, 43, 32,118,101, 99, 50, 40, 49, 46, 48, 44, 32, 49,
+ 46, 48, 41, 41, 42, 48, 46, 53, 41, 59, 10, 9,118, 97,108,117,101, 32, 61, 32, 49, 46, 48, 59, 10, 10, 9,110,111,114,109, 97,
+108, 46,120, 32, 61, 32, 50, 46, 48, 42, 40, 99,111,108,111,114, 46,114, 32, 45, 32, 48, 46, 53, 41, 59, 10, 9,110,111,114,109,
+ 97,108, 46,121, 32, 61, 32, 50, 46, 48, 42, 40, 48, 46, 53, 32, 45, 32, 99,111,108,111,114, 46,103, 41, 59, 10, 9,110,111,114,
+109, 97,108, 46,122, 32, 61, 32, 50, 46, 48, 42, 40, 99,111,108,111,114, 46, 98, 32, 45, 32, 48, 46, 53, 41, 59, 10,125, 10, 10,
+ 47, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 32, 77, 84, 69, 88, 32, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 47, 10, 10,118,111,105,100, 32,116,101,120, 99,111, 95,111,114, 99,111, 40,118,101, 99, 51, 32, 97,116,116,
+111,114, 99,111, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,114, 99,111, 41, 10,123, 10, 9,111,114, 99,111, 32, 61, 32, 97,
+116,116,111,114, 99,111, 59, 10,125, 10, 10,118,111,105,100, 32,116,101,120, 99,111, 95,117,118, 40,118,101, 99, 50, 32, 97,116,
+116,117,118, 44, 32,111,117,116, 32,118,101, 99, 51, 32,117,118, 41, 10,123, 10, 9, 47, 42, 32,100,105,115, 97, 98,108,101,100,
+ 32,102,111,114, 32,110,111,119, 44, 32,119,111,114,107,115, 32,116,111,103,101,116,104,101,114, 32,119,105,116,104, 32,108,101,
+ 97,118,105,110,103, 32,111,117,116, 32,109,116,101,120, 95, 50,100, 95,109, 97,112,112,105,110,103, 10, 9, 32, 32, 32,117,118,
+ 32, 61, 32,118,101, 99, 51, 40, 97,116,116,117,118, 42, 50, 46, 48, 32, 45, 32,118,101, 99, 50, 40, 49, 46, 48, 44, 32, 49, 46,
+ 48, 41, 44, 32, 48, 46, 48, 41, 59, 32, 42, 47, 10, 9,117,118, 32, 61, 32,118,101, 99, 51, 40, 97,116,116,117,118, 44, 32, 48,
+ 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,116,101,120, 99,111, 95,110,111,114,109, 40,118,101, 99, 51, 32,110,111,114,
+109, 97,108, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,110,111,114,109, 97,108, 41, 10,123, 10, 9, 47, 42, 32, 99,
+111,114,114,101,115,112,111,110,100,115, 32,116,111, 32,115,104,105, 45, 62,111,114,110, 44, 32,119,104,105, 99,104, 32,105,115,
+ 32,110,101,103, 97,116,101,100, 32,115,111, 32, 99, 97,110, 99,101,108,115, 10, 9, 32, 32, 32,111,117,116, 32, 98,108,101,110,
+100,101,114, 32,110,111,114,109, 97,108, 32,110,101,103, 97,116,105,111,110, 32, 42, 47, 10, 9,111,117,116,110,111,114,109, 97,
+108, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40,110,111,114,109, 97,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,116,
+101,120, 99,111, 95,116, 97,110,103,101,110,116, 40,118,101, 99, 52, 32,116, 97,110,103,101,110,116, 44, 32,111,117,116, 32,118,
+101, 99, 51, 32,111,117,116,116, 97,110,103,101,110,116, 41, 10,123, 10, 9,111,117,116,116, 97,110,103,101,110,116, 32, 61, 32,
+110,111,114,109, 97,108,105,122,101, 40,116, 97,110,103,101,110,116, 46,120,121,122, 41, 59, 10,125, 10, 10,118,111,105,100, 32,
+116,101,120, 99,111, 95,103,108,111, 98, 97,108, 40,109, 97,116, 52, 32,118,105,101,119,105,110,118,109, 97,116, 44, 32,118,101,
+ 99, 51, 32, 99,111, 44, 32,111,117,116, 32,118,101, 99, 51, 32,103,108,111, 98, 97,108, 41, 10,123, 10, 9,103,108,111, 98, 97,
+108, 32, 61, 32, 40,118,105,101,119,105,110,118,109, 97,116, 42,118,101, 99, 52, 40, 99,111, 44, 32, 49, 46, 48, 41, 41, 46,120,
+121,122, 59, 10,125, 10, 10,118,111,105,100, 32,116,101,120, 99,111, 95,111, 98,106,101, 99,116, 40,109, 97,116, 52, 32,118,105,
+101,119,105,110,118,109, 97,116, 44, 32,109, 97,116, 52, 32,111, 98,105,110,118,109, 97,116, 44, 32,118,101, 99, 51, 32, 99,111,
+ 44, 32,111,117,116, 32,118,101, 99, 51, 32,111, 98,106,101, 99,116, 41, 10,123, 10, 9,111, 98,106,101, 99,116, 32, 61, 32, 40,
+111, 98,105,110,118,109, 97,116, 42, 40,118,105,101,119,105,110,118,109, 97,116, 42,118,101, 99, 52, 40, 99,111, 44, 32, 49, 46,
+ 48, 41, 41, 41, 46,120,121,122, 59, 10,125, 10, 10,118,111,105,100, 32,116,101,120, 99,111, 95,114,101,102,108, 40,118,101, 99,
+ 51, 32,118,110, 44, 32,118,101, 99, 51, 32,118,105,101,119, 44, 32,111,117,116, 32,118,101, 99, 51, 32,114,101,102, 41, 10,123,
+ 10, 9,114,101,102, 32, 61, 32,118,105,101,119, 32, 45, 32, 50, 46, 48, 42,100,111,116, 40,118,110, 44, 32,118,105,101,119, 41,
+ 42,118,110, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,110,111,114,109, 40,118,101, 99, 51, 32,110,111,114,
+109, 97,108, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,110,111,114,109, 97,108, 41, 10,123, 10, 9, 47, 42, 32, 98,
+108,101,110,100,101,114, 32,114,101,110,100,101,114, 32,110,111,114,109, 97,108, 32,105,115, 32,110,101,103, 97,116,101,100, 32,
+ 42, 47, 10, 9,111,117,116,110,111,114,109, 97,108, 32, 61, 32, 45,110,111,114,109, 97,108,105,122,101, 40,110,111,114,109, 97,
+108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95, 98,108,101,110,100, 40,118,101, 99, 51, 32,
+111,117,116, 99,111,108, 44, 32,118,101, 99, 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44,
+ 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,
+102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 10, 9,102, 97, 99,116, 32, 42, 61, 32,102, 97, 99,103, 59, 10, 9,102, 97, 99,
+109, 32, 61, 32, 49, 46, 48, 45,102, 97, 99,116, 59, 10, 10, 9,105,110, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,116,101,120,
+ 99,111,108, 32, 43, 32,102, 97, 99,109, 42,111,117,116, 99,111,108, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,
+114,103, 98, 95,109,117,108, 40,118,101, 99, 51, 32,111,117,116, 99,111,108, 44, 32,118,101, 99, 51, 32,116,101,120, 99,111,108,
+ 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,118,101,
+ 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 10, 9,102, 97, 99,116, 32,
+ 42, 61, 32,102, 97, 99,103, 59, 10, 9,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 45,102, 97, 99,103, 59, 10, 10, 9,105,110, 99,
+111,108, 32, 61, 32, 40,102, 97, 99,109, 32, 43, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 41, 42,111,117,116, 99,111,108,
+ 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95,115, 99,114,101,101,110, 40,118,101, 99, 51, 32,111,
+117,116, 99,111,108, 44, 32,118,101, 99, 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,
+102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,
+108,111, 97,116, 32,102, 97, 99,109, 59, 10, 10, 9,102, 97, 99,116, 32, 42, 61, 32,102, 97, 99,103, 59, 10, 9,102, 97, 99,109,
+ 32, 61, 32, 49, 46, 48, 45,102, 97, 99,103, 59, 10, 10, 9,105,110, 99,111,108, 32, 61, 32,118,101, 99, 51, 40, 49, 46, 48, 41,
+ 32, 45, 32, 40,118,101, 99, 51, 40,102, 97, 99,109, 41, 32, 43, 32,102, 97, 99,116, 42, 40,118,101, 99, 51, 40, 49, 46, 48, 41,
+ 32, 45, 32,116,101,120, 99,111,108, 41, 41, 42, 40,118,101, 99, 51, 40, 49, 46, 48, 41, 32, 45, 32,111,117,116, 99,111,108, 41,
+ 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95,111,118,101,114,108, 97,121, 40,118,101, 99, 51, 32,
+111,117,116, 99,111,108, 44, 32,118,101, 99, 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44,
+ 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,
+102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 10, 9,102, 97, 99,116, 32, 42, 61, 32,102, 97, 99,103, 59, 10, 9,102, 97, 99,
+109, 32, 61, 32, 49, 46, 48, 45,102, 97, 99,103, 59, 10, 10, 9,105,102, 40,111,117,116, 99,111,108, 46,114, 32, 60, 32, 48, 46,
+ 53, 41, 10, 9, 9,105,110, 99,111,108, 46,114, 32, 61, 32,111,117,116, 99,111,108, 46,114, 42, 40,102, 97, 99,109, 32, 43, 32,
+ 50, 46, 48, 42,102, 97, 99,116, 42,116,101,120, 99,111,108, 46,114, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,105,110, 99,111,
+108, 46,114, 32, 61, 32, 49, 46, 48, 32, 45, 32, 40,102, 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97, 99,116, 42, 40, 49, 46,
+ 48, 32, 45, 32,116,101,120, 99,111,108, 46,114, 41, 41, 42, 40, 49, 46, 48, 32, 45, 32,111,117,116, 99,111,108, 46,114, 41, 59,
+ 10, 10, 9,105,102, 40,111,117,116, 99,111,108, 46,103, 32, 60, 32, 48, 46, 53, 41, 10, 9, 9,105,110, 99,111,108, 46,103, 32,
+ 61, 32,111,117,116, 99,111,108, 46,103, 42, 40,102, 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97, 99,116, 42,116,101,120, 99,
+111,108, 46,103, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,105,110, 99,111,108, 46,103, 32, 61, 32, 49, 46, 48, 32, 45, 32, 40,
+102, 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97, 99,116, 42, 40, 49, 46, 48, 32, 45, 32,116,101,120, 99,111,108, 46,103, 41,
+ 41, 42, 40, 49, 46, 48, 32, 45, 32,111,117,116, 99,111,108, 46,103, 41, 59, 10, 10, 9,105,102, 40,111,117,116, 99,111,108, 46,
+ 98, 32, 60, 32, 48, 46, 53, 41, 10, 9, 9,105,110, 99,111,108, 46, 98, 32, 61, 32,111,117,116, 99,111,108, 46, 98, 42, 40,102,
+ 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97, 99,116, 42,116,101,120, 99,111,108, 46, 98, 41, 59, 10, 9,101,108,115,101, 10,
+ 9, 9,105,110, 99,111,108, 46, 98, 32, 61, 32, 49, 46, 48, 32, 45, 32, 40,102, 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97,
+ 99,116, 42, 40, 49, 46, 48, 32, 45, 32,116,101,120, 99,111,108, 46, 98, 41, 41, 42, 40, 49, 46, 48, 32, 45, 32,111,117,116, 99,
+111,108, 46, 98, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95,115,117, 98, 40,118,101, 99, 51,
+ 32,111,117,116, 99,111,108, 44, 32,118,101, 99, 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116,
+ 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10,
+ 9,105,110, 99,111,108, 32, 61, 32, 45,102, 97, 99,116, 42,102, 97, 99,103, 42,116,101,120, 99,111,108, 32, 43, 32,111,117,116,
+ 99,111,108, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95, 97,100,100, 40,118,101, 99, 51, 32,111,
+117,116, 99,111,108, 44, 32,118,101, 99, 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,
+102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,105,
+110, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,102, 97, 99,103, 42,116,101,120, 99,111,108, 32, 43, 32,111,117,116, 99,111,108,
+ 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95,100,105,118, 40,118,101, 99, 51, 32,111,117,116, 99,
+111,108, 44, 32,118,101, 99, 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111,
+ 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,
+116, 32,102, 97, 99,109, 59, 10, 10, 9,102, 97, 99,116, 32, 42, 61, 32,102, 97, 99,103, 59, 10, 9,102, 97, 99,109, 32, 61, 32,
+ 49, 46, 48, 45,102, 97, 99,116, 59, 10, 10, 9,105,102, 40,116,101,120, 99,111,108, 46,114, 32, 33, 61, 32, 48, 46, 48, 41, 32,
+105,110, 99,111,108, 46,114, 32, 61, 32,102, 97, 99,109, 42,111,117,116, 99,111,108, 46,114, 32, 43, 32,102, 97, 99,116, 42,111,
+117,116, 99,111,108, 46,114, 47,116,101,120, 99,111,108, 46,114, 59, 10, 9,105,102, 40,116,101,120, 99,111,108, 46,103, 32, 33,
+ 61, 32, 48, 46, 48, 41, 32,105,110, 99,111,108, 46,103, 32, 61, 32,102, 97, 99,109, 42,111,117,116, 99,111,108, 46,103, 32, 43,
+ 32,102, 97, 99,116, 42,111,117,116, 99,111,108, 46,103, 47,116,101,120, 99,111,108, 46,103, 59, 10, 9,105,102, 40,116,101,120,
+ 99,111,108, 46, 98, 32, 33, 61, 32, 48, 46, 48, 41, 32,105,110, 99,111,108, 46, 98, 32, 61, 32,102, 97, 99,109, 42,111,117,116,
+ 99,111,108, 46, 98, 32, 43, 32,102, 97, 99,116, 42,111,117,116, 99,111,108, 46, 98, 47,116,101,120, 99,111,108, 46, 98, 59, 10,
+125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95,100,105,102,102, 40,118,101, 99, 51, 32,111,117,116, 99,111,
+108, 44, 32,118,101, 99, 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,
+116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116,
+ 32,102, 97, 99,109, 59, 10, 10, 9,102, 97, 99,116, 32, 42, 61, 32,102, 97, 99,103, 59, 10, 9,102, 97, 99,109, 32, 61, 32, 49,
+ 46, 48, 45,102, 97, 99,116, 59, 10, 10, 9,105,110, 99,111,108, 32, 61, 32,102, 97, 99,109, 42,111,117,116, 99,111,108, 32, 43,
+ 32,102, 97, 99,116, 42, 97, 98,115, 40,116,101,120, 99,111,108, 32, 45, 32,111,117,116, 99,111,108, 41, 59, 10,125, 10, 10,118,
+111,105,100, 32,109,116,101,120, 95,114,103, 98, 95,100, 97,114,107, 40,118,101, 99, 51, 32,111,117,116, 99,111,108, 44, 32,118,
+101, 99, 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97,
+ 99,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,
+109, 44, 32, 99,111,108, 59, 10, 10, 9,102, 97, 99,116, 32, 42, 61, 32,102, 97, 99,103, 59, 10, 9,102, 97, 99,109, 32, 61, 32,
+ 49, 46, 48, 45,102, 97, 99,116, 59, 10, 10, 9, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 46,114, 59,
+ 10, 9,105,102, 40, 99,111,108, 32, 60, 32,111,117,116, 99,111,108, 46,114, 41, 32,105,110, 99,111,108, 46,114, 32, 61, 32, 99,
+111,108, 59, 32,101,108,115,101, 32,105,110, 99,111,108, 46,114, 32, 61, 32,111,117,116, 99,111,108, 46,114, 59, 10, 9, 99,111,
+108, 32, 61, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 46,103, 59, 10, 9,105,102, 40, 99,111,108, 32, 60, 32,111,117,116,
+ 99,111,108, 46,103, 41, 32,105,110, 99,111,108, 46,103, 32, 61, 32, 99,111,108, 59, 32,101,108,115,101, 32,105,110, 99,111,108,
+ 46,103, 32, 61, 32,111,117,116, 99,111,108, 46,103, 59, 10, 9, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,116,101,120, 99,111,
+108, 46, 98, 59, 10, 9,105,102, 40, 99,111,108, 32, 60, 32,111,117,116, 99,111,108, 46, 98, 41, 32,105,110, 99,111,108, 46, 98,
+ 32, 61, 32, 99,111,108, 59, 32,101,108,115,101, 32,105,110, 99,111,108, 46, 98, 32, 61, 32,111,117,116, 99,111,108, 46, 98, 59,
+ 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95,108,105,103,104,116, 40,118,101, 99, 51, 32,111,117,116,
+ 99,111,108, 44, 32,118,101, 99, 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,
+111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111,
+ 97,116, 32,102, 97, 99,109, 44, 32, 99,111,108, 59, 10, 10, 9,102, 97, 99,116, 32, 42, 61, 32,102, 97, 99,103, 59, 10, 9,102,
+ 97, 99,109, 32, 61, 32, 49, 46, 48, 45,102, 97, 99,116, 59, 10, 10, 9, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,116,101,120,
+ 99,111,108, 46,114, 59, 10, 9,105,102, 40, 99,111,108, 32, 62, 32,111,117,116, 99,111,108, 46,114, 41, 32,105,110, 99,111,108,
+ 46,114, 32, 61, 32, 99,111,108, 59, 32,101,108,115,101, 32,105,110, 99,111,108, 46,114, 32, 61, 32,111,117,116, 99,111,108, 46,
+114, 59, 10, 9, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 46,103, 59, 10, 9,105,102, 40, 99,111,108,
+ 32, 62, 32,111,117,116, 99,111,108, 46,103, 41, 32,105,110, 99,111,108, 46,103, 32, 61, 32, 99,111,108, 59, 32,101,108,115,101,
+ 32,105,110, 99,111,108, 46,103, 32, 61, 32,111,117,116, 99,111,108, 46,103, 59, 10, 9, 99,111,108, 32, 61, 32,102, 97, 99,116,
+ 42,116,101,120, 99,111,108, 46, 98, 59, 10, 9,105,102, 40, 99,111,108, 32, 62, 32,111,117,116, 99,111,108, 46, 98, 41, 32,105,
+110, 99,111,108, 46, 98, 32, 61, 32, 99,111,108, 59, 32,101,108,115,101, 32,105,110, 99,111,108, 46, 98, 32, 61, 32,111,117,116,
+ 99,111,108, 46, 98, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95,104,117,101, 40,118,101, 99, 51,
+ 32,111,117,116, 99,111,108, 44, 32,118,101, 99, 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116,
+ 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10,
+ 9,118,101, 99, 52, 32, 99,111,108, 59, 10, 10, 9,109,105,120, 95,104,117,101, 40,102, 97, 99,116, 42,102, 97, 99,103, 44, 32,
+118,101, 99, 52, 40,111,117,116, 99,111,108, 44, 32, 49, 46, 48, 41, 44, 32,118,101, 99, 52, 40,116,101,120, 99,111,108, 44, 32,
+ 49, 46, 48, 41, 44, 32, 99,111,108, 41, 59, 10, 9,105,110, 99,111,108, 46,114,103, 98, 32, 61, 32, 99,111,108, 46,114,103, 98,
+ 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95,115, 97,116, 40,118,101, 99, 51, 32,111,117,116, 99,
+111,108, 44, 32,118,101, 99, 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111,
+ 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,118,101, 99, 52,
+ 32, 99,111,108, 59, 10, 10, 9,109,105,120, 95,115, 97,116, 40,102, 97, 99,116, 42,102, 97, 99,103, 44, 32,118,101, 99, 52, 40,
+111,117,116, 99,111,108, 44, 32, 49, 46, 48, 41, 44, 32,118,101, 99, 52, 40,116,101,120, 99,111,108, 44, 32, 49, 46, 48, 41, 44,
+ 32, 99,111,108, 41, 59, 10, 9,105,110, 99,111,108, 46,114,103, 98, 32, 61, 32, 99,111,108, 46,114,103, 98, 59, 10,125, 10, 10,
+118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95,118, 97,108, 40,118,101, 99, 51, 32,111,117,116, 99,111,108, 44, 32,118,
+101, 99, 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97,
+ 99,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,118,101, 99, 52, 32, 99,111,108, 59,
+ 10, 10, 9,109,105,120, 95,118, 97,108, 40,102, 97, 99,116, 42,102, 97, 99,103, 44, 32,118,101, 99, 52, 40,111,117,116, 99,111,
+108, 44, 32, 49, 46, 48, 41, 44, 32,118,101, 99, 52, 40,116,101,120, 99,111,108, 44, 32, 49, 46, 48, 41, 44, 32, 99,111,108, 41,
+ 59, 10, 9,105,110, 99,111,108, 46,114,103, 98, 32, 61, 32, 99,111,108, 46,114,103, 98, 59, 10,125, 10, 10,118,111,105,100, 32,
+109,116,101,120, 95,114,103, 98, 95, 99,111,108,111,114, 40,118,101, 99, 51, 32,111,117,116, 99,111,108, 44, 32,118,101, 99, 51,
+ 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44,
+ 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,118,101, 99, 52, 32, 99,111,108, 59, 10, 10, 9,
+109,105,120, 95, 99,111,108,111,114, 40,102, 97, 99,116, 42,102, 97, 99,103, 44, 32,118,101, 99, 52, 40,111,117,116, 99,111,108,
+ 44, 32, 49, 46, 48, 41, 44, 32,118,101, 99, 52, 40,116,101,120, 99,111,108, 44, 32, 49, 46, 48, 41, 44, 32, 99,111,108, 41, 59,
+ 10, 9,105,110, 99,111,108, 46,114,103, 98, 32, 61, 32, 99,111,108, 46,114,103, 98, 59, 10,125, 10, 10,118,111,105,100, 32,109,
+116,101,120, 95,118, 97,108,117,101, 95,118, 97,114,115, 40,105,110,111,117,116, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44,
+ 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,102, 97, 99,109, 41, 10,123, 10, 9,
+102, 97, 99,116, 32, 42, 61, 32, 97, 98,115, 40,102, 97, 99,103, 41, 59, 10, 9,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 45,102,
+ 97, 99,116, 59, 10, 10, 9,105,102, 40,102, 97, 99,103, 32, 60, 32, 48, 46, 48, 41, 32,123, 10, 9, 9,102,108,111, 97,116, 32,
+116,109,112, 32, 61, 32,102, 97, 99,116, 59, 10, 9, 9,102, 97, 99,116, 32, 61, 32,102, 97, 99,109, 59, 10, 9, 9,102, 97, 99,
+109, 32, 61, 32,116,109,112, 59, 10, 9,125, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95, 98,
+108,101,110,100, 40,102,108,111, 97,116, 32,111,117,116, 99,111,108, 44, 32,102,108,111, 97,116, 32,116,101,120, 99,111,108, 44,
+ 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,102,108,111,
+ 97,116, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 9,109,116,101,120, 95,118,
+ 97,108,117,101, 95,118, 97,114,115, 40,102, 97, 99,116, 44, 32,102, 97, 99,103, 44, 32,102, 97, 99,109, 41, 59, 10, 10, 9,105,
+110, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 32, 43, 32,102, 97, 99,109, 42,111,117,116, 99,111,108,
+ 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95,109,117,108, 40,102,108,111, 97,116, 32,111,
+117,116, 99,111,108, 44, 32,102,108,111, 97,116, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44,
+ 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,105,110, 99,111,108, 41, 10,123, 10,
+ 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 9,109,116,101,120, 95,118, 97,108,117,101, 95,118, 97,114,115, 40,102, 97,
+ 99,116, 44, 32,102, 97, 99,103, 44, 32,102, 97, 99,109, 41, 59, 10, 10, 9,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 32, 45, 32,
+102, 97, 99,103, 59, 10, 9,105,110, 99,111,108, 32, 61, 32, 40,102, 97, 99,109, 32, 43, 32,102, 97, 99,116, 42,116,101,120, 99,
+111,108, 41, 42,111,117,116, 99,111,108, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95,115,
+ 99,114,101,101,110, 40,102,108,111, 97,116, 32,111,117,116, 99,111,108, 44, 32,102,108,111, 97,116, 32,116,101,120, 99,111,108,
+ 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,102,108,
+111, 97,116, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 9,109,116,101,120, 95,
+118, 97,108,117,101, 95,118, 97,114,115, 40,102, 97, 99,116, 44, 32,102, 97, 99,103, 44, 32,102, 97, 99,109, 41, 59, 10, 10, 9,
+102, 97, 99,109, 32, 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99,103, 59, 10, 9,105,110, 99,111,108, 32, 61, 32, 49, 46, 48, 32,
+ 45, 32, 40,102, 97, 99,109, 32, 43, 32,102, 97, 99,116, 42, 40, 49, 46, 48, 32, 45, 32,116,101,120, 99,111,108, 41, 41, 42, 40,
+ 49, 46, 48, 32, 45, 32,111,117,116, 99,111,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,
+101, 95,115,117, 98, 40,102,108,111, 97,116, 32,111,117,116, 99,111,108, 44, 32,102,108,111, 97,116, 32,116,101,120, 99,111,108,
+ 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,102,108,
+111, 97,116, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 9,109,116,101,120, 95,
+118, 97,108,117,101, 95,118, 97,114,115, 40,102, 97, 99,116, 44, 32,102, 97, 99,103, 44, 32,102, 97, 99,109, 41, 59, 10, 10, 9,
+102, 97, 99,116, 32, 61, 32, 45,102, 97, 99,116, 59, 10, 9,105,110, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,116,101,120, 99,
+111,108, 32, 43, 32,111,117,116, 99,111,108, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95,
+ 97,100,100, 40,102,108,111, 97,116, 32,111,117,116, 99,111,108, 44, 32,102,108,111, 97,116, 32,116,101,120, 99,111,108, 44, 32,
+102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,102,108,111, 97,
+116, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 9,109,116,101,120, 95,118, 97,
+108,117,101, 95,118, 97,114,115, 40,102, 97, 99,116, 44, 32,102, 97, 99,103, 44, 32,102, 97, 99,109, 41, 59, 10, 10, 9,102, 97,
+ 99,116, 32, 61, 32,102, 97, 99,116, 59, 10, 9,105,110, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 32,
+ 43, 32,111,117,116, 99,111,108, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95,100,105,118,
+ 40,102,108,111, 97,116, 32,111,117,116, 99,111,108, 44, 32,102,108,111, 97,116, 32,116,101,120, 99,111,108, 44, 32,102,108,111,
+ 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,105,
+110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 9,109,116,101,120, 95,118, 97,108,117,101,
+ 95,118, 97,114,115, 40,102, 97, 99,116, 44, 32,102, 97, 99,103, 44, 32,102, 97, 99,109, 41, 59, 10, 10, 9,105,102, 40,116,101,
+120, 99,111,108, 32, 33, 61, 32, 48, 46, 48, 41, 10, 9, 9,105,110, 99,111,108, 32, 61, 32,102, 97, 99,109, 42,111,117,116, 99,
+111,108, 32, 43, 32,102, 97, 99,116, 42,111,117,116, 99,111,108, 47,116,101,120, 99,111,108, 59, 10, 9,101,108,115,101, 10, 9,
+ 9,105,110, 99,111,108, 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101,
+ 95,100,105,102,102, 40,102,108,111, 97,116, 32,111,117,116, 99,111,108, 44, 32,102,108,111, 97,116, 32,116,101,120, 99,111,108,
+ 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,102,108,
+111, 97,116, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 9,109,116,101,120, 95,
+118, 97,108,117,101, 95,118, 97,114,115, 40,102, 97, 99,116, 44, 32,102, 97, 99,103, 44, 32,102, 97, 99,109, 41, 59, 10, 10, 9,
+105,110, 99,111,108, 32, 61, 32,102, 97, 99,109, 42,111,117,116, 99,111,108, 32, 43, 32,102, 97, 99,116, 42, 97, 98,115, 40,116,
+101,120, 99,111,108, 32, 45, 32,111,117,116, 99,111,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,
+108,117,101, 95,100, 97,114,107, 40,102,108,111, 97,116, 32,111,117,116, 99,111,108, 44, 32,102,108,111, 97,116, 32,116,101,120,
+ 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116,
+ 32,102,108,111, 97,116, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 9,109,116,
+101,120, 95,118, 97,108,117,101, 95,118, 97,114,115, 40,102, 97, 99,116, 44, 32,102, 97, 99,103, 44, 32,102, 97, 99,109, 41, 59,
+ 10, 10, 9,102,108,111, 97,116, 32, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 59, 10, 9,105,102, 40,
+ 99,111,108, 32, 60, 32,111,117,116, 99,111,108, 41, 32,105,110, 99,111,108, 32, 61, 32, 99,111,108, 59, 32,101,108,115,101, 32,
+105,110, 99,111,108, 32, 61, 32,111,117,116, 99,111,108, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,
+117,101, 95,108,105,103,104,116, 40,102,108,111, 97,116, 32,111,117,116, 99,111,108, 44, 32,102,108,111, 97,116, 32,116,101,120,
+ 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116,
+ 32,102,108,111, 97,116, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 9,109,116,
+101,120, 95,118, 97,108,117,101, 95,118, 97,114,115, 40,102, 97, 99,116, 44, 32,102, 97, 99,103, 44, 32,102, 97, 99,109, 41, 59,
+ 10, 10, 9,102,108,111, 97,116, 32, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 59, 10, 9,105,102, 40,
+ 99,111,108, 32, 62, 32,111,117,116, 99,111,108, 41, 32,105,110, 99,111,108, 32, 61, 32, 99,111,108, 59, 32,101,108,115,101, 32,
+105,110, 99,111,108, 32, 61, 32,111,117,116, 99,111,108, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,
+117,101, 95, 99,108, 97,109,112, 95,112,111,115,105,116,105,118,101, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,111,117,116,
+ 32,102,108,111, 97,116, 32,111,117,116,102, 97, 99, 41, 10,123, 10, 9,111,117,116,102, 97, 99, 32, 61, 32,109, 97,120, 40,102,
+ 97, 99, 44, 32, 48, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95, 99,108, 97,
+109,112, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,102, 97, 99, 41, 10,
+123, 10, 9,111,117,116,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41,
+ 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,104, 97,114, 95,100,105,118,105,100,101, 40,102,108,111, 97,116, 32,
+104, 97,114, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,104, 97,114, 41, 10,123, 10, 9,111,117,116,104, 97,114,
+ 32, 61, 32,104, 97,114, 47, 49, 50, 56, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,104, 97,114, 95,109,
+117,108,116,105,112,108,121, 95, 99,108, 97,109,112, 40,102,108,111, 97,116, 32,104, 97,114, 44, 32,111,117,116, 32,102,108,111,
+ 97,116, 32,111,117,116,104, 97,114, 41, 10,123, 10, 9,104, 97,114, 32, 42, 61, 32, 49, 50, 56, 46, 48, 59, 10, 10, 9,105,102,
+ 40,104, 97,114, 32, 60, 32, 49, 46, 48, 41, 32,111,117,116,104, 97,114, 32, 61, 32, 49, 46, 48, 59, 10, 9,101,108,115,101, 32,
+105,102, 40,104, 97,114, 32, 62, 32, 53, 49, 49, 46, 48, 41, 32,111,117,116,104, 97,114, 32, 61, 32, 53, 49, 49, 46, 48, 59, 10,
+ 9,101,108,115,101, 32,111,117,116,104, 97,114, 32, 61, 32,104, 97,114, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120,
+ 95, 97,108,112,104, 97, 95,102,114,111,109, 95, 99,111,108, 40,118,101, 99, 52, 32, 99,111,108, 44, 32,111,117,116, 32,102,108,
+111, 97,116, 32, 97,108,112,104, 97, 41, 10,123, 10, 9, 97,108,112,104, 97, 32, 61, 32, 99,111,108, 46, 97, 59, 10,125, 10, 10,
+118,111,105,100, 32,109,116,101,120, 95, 97,108,112,104, 97, 95,116,111, 95, 99,111,108, 40,118,101, 99, 52, 32, 99,111,108, 44,
+ 32,102,108,111, 97,116, 32, 97,108,112,104, 97, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123,
+ 10, 9,111,117,116, 99,111,108, 32, 61, 32,118,101, 99, 52, 40, 99,111,108, 46,114,103, 98, 44, 32, 97,108,112,104, 97, 41, 59,
+ 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98,116,111,105,110,116, 40,118,101, 99, 52, 32,114,103, 98, 44,
+ 32,111,117,116, 32,102,108,111, 97,116, 32,105,110,116,101,110,115,105,116,121, 41, 10,123, 10, 9,105,110,116,101,110,115,105,
+116,121, 32, 61, 32,100,111,116, 40,118,101, 99, 51, 40, 48, 46, 51, 53, 44, 32, 48, 46, 52, 53, 44, 32, 48, 46, 50, 41, 44, 32,
+114,103, 98, 46,114,103, 98, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95,105,110,118,
+101,114,116, 40,102,108,111, 97,116, 32,105,110,118, 97,108,117,101, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,
+118, 97,108,117,101, 41, 10,123, 10, 9,111,117,116,118, 97,108,117,101, 32, 61, 32, 49, 46, 48, 32, 45, 32,105,110,118, 97,108,
+117,101, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95,105,110,118,101,114,116, 40,118,101, 99, 52,
+ 32,105,110,114,103, 98, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116,114,103, 98, 41, 10,123, 10, 9,111,117,116,114,
+103, 98, 32, 61, 32,118,101, 99, 52, 40,118,101, 99, 51, 40, 49, 46, 48, 41, 32, 45, 32,105,110,114,103, 98, 46,114,103, 98, 44,
+ 32,105,110,114,103, 98, 46, 97, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95,115,116,
+101,110, 99,105,108, 40,102,108,111, 97,116, 32,115,116,101,110, 99,105,108, 44, 32,102,108,111, 97,116, 32,105,110,116,101,110,
+115,105,116,121, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,115,116,101,110, 99,105,108, 44, 32,111,117,116, 32,
+102,108,111, 97,116, 32,111,117,116,105,110,116,101,110,115,105,116,121, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,
+116, 32, 61, 32,105,110,116,101,110,115,105,116,121, 59, 10, 9,111,117,116,105,110,116,101,110,115,105,116,121, 32, 61, 32,105,
+110,116,101,110,115,105,116,121, 42,115,116,101,110, 99,105,108, 59, 10, 9,111,117,116,115,116,101,110, 99,105,108, 32, 61, 32,
+115,116,101,110, 99,105,108, 42,102, 97, 99,116, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95,115,
+116,101,110, 99,105,108, 40,102,108,111, 97,116, 32,115,116,101,110, 99,105,108, 44, 32,118,101, 99, 52, 32,114,103, 98, 44, 32,
+111,117,116, 32,102,108,111, 97,116, 32,111,117,116,115,116,101,110, 99,105,108, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,
+117,116,114,103, 98, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,116, 32, 61, 32,114,103, 98, 46, 97, 59, 10, 9,111,
+117,116,114,103, 98, 32, 61, 32,118,101, 99, 52, 40,114,103, 98, 46,114,103, 98, 44, 32,114,103, 98, 46, 97, 42,115,116,101,110,
+ 99,105,108, 41, 59, 10, 9,111,117,116,115,116,101,110, 99,105,108, 32, 61, 32,115,116,101,110, 99,105,108, 42,102, 97, 99,116,
+ 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,109, 97,112,112,105,110,103, 95,111,102,115, 40,118,101, 99, 51, 32,
+116,101,120, 99,111, 44, 32,118,101, 99, 51, 32,111,102,115, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,116,101,120,
+ 99,111, 41, 10,123, 10, 9,111,117,116,116,101,120, 99,111, 32, 61, 32,116,101,120, 99,111, 32, 43, 32,111,102,115, 59, 10,125,
+ 10, 10,118,111,105,100, 32,109,116,101,120, 95,109, 97,112,112,105,110,103, 95,115,105,122,101, 40,118,101, 99, 51, 32,116,101,
+120, 99,111, 44, 32,118,101, 99, 51, 32,115,105,122,101, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,116,101,120, 99,
+111, 41, 10,123, 10, 9,111,117,116,116,101,120, 99,111, 32, 61, 32,115,105,122,101, 42,116,101,120, 99,111, 59, 10,125, 10, 10,
+118,111,105,100, 32,109,116,101,120, 95, 50,100, 95,109, 97,112,112,105,110,103, 40,118,101, 99, 51, 32,118,101, 99, 44, 32,111,
+117,116, 32,118,101, 99, 51, 32,111,117,116,118,101, 99, 41, 10,123, 10, 9,111,117,116,118,101, 99, 32, 61, 32,118,101, 99, 51,
+ 40,118,101, 99, 46,120,121, 42, 48, 46, 53, 32, 43, 32,118,101, 99, 50, 40, 48, 46, 53, 44, 32, 48, 46, 53, 41, 44, 32,118,101,
+ 99, 46,122, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,105,109, 97,103,101, 40,118,101, 99, 51, 32,116,101,
+120, 99,111, 44, 32,115, 97,109,112,108,101,114, 50, 68, 32,105,109, 97, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,118, 97,
+108,117,101, 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,108,111,114, 41, 10,123, 10, 9, 99,111,108,111,114, 32, 61, 32,
+116,101,120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32,116,101,120, 99,111, 46,120,121, 41, 59, 10, 9,118, 97,108,117,101,
+ 32, 61, 32, 49, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,110,111,114,109, 97,108, 40,118,101, 99, 51,
+ 32,116,101,120, 99,111, 44, 32,115, 97,109,112,108,101,114, 50, 68, 32,105,109, 97, 44, 32,111,117,116, 32,118,101, 99, 51, 32,
+110,111,114,109, 97,108, 41, 10,123, 10, 9, 47, 47, 32, 84,104,101, 32,105,110,118,101,114,116, 32,111,102, 32,116,104,101, 32,
+114,101,100, 32, 99,104, 97,110,110,101,108, 32,105,115, 32,116,111, 32,109, 97,107,101, 10, 9, 47, 47, 32,116,104,101, 32,110,
+111,114,109, 97,108, 32,109, 97,112, 32, 99,111,109,112,108,105, 97,110,116, 32,119,105,116,104, 32,116,104,101, 32,111,117,116,
+115,105,100,101, 32,119,111,114,108,100, 46, 10, 9, 47, 47, 32, 73,116, 32,110,101,101,100,115, 32,116,111, 32, 98,101, 32,100,
+111,110,101, 32, 98,101, 99, 97,117,115,101, 32,105,110, 32, 66,108,101,110,100,101,114, 10, 9, 47, 47, 32,116,104,101, 32,110,
+111,114,109, 97,108, 32,117,115,101,100, 32,112,111,105,110,116,115, 32,105,110,119, 97,114,100, 46, 10, 9, 47, 47, 32, 83,104,
+111,117,108,100, 32,116,104,105,115, 32,101,118,101,114, 32, 99,104, 97,110,103,101, 32,116,104,105,115, 32,110,101,103, 97,116,
+101, 32,109,117,115,116, 32, 98,101, 32,114,101,109,111,118,101,100, 46, 10, 32, 32, 32, 32,118,101, 99, 52, 32, 99,111,108,111,
+114, 32, 61, 32,116,101,120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32,116,101,120, 99,111, 46,120,121, 41, 59, 10, 9,110,
+111,114,109, 97,108, 32, 61, 32, 50, 46, 48, 42, 40,118,101, 99, 51, 40, 45, 99,111,108,111,114, 46,114, 44, 32, 99,111,108,111,
+114, 46,103, 44, 32, 99,111,108,111,114, 46, 98, 41, 32, 45, 32,118,101, 99, 51, 40, 45, 48, 46, 53, 44, 32, 48, 46, 53, 44, 32,
+ 48, 46, 53, 41, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95, 98,117,109,112, 95,110,111,114,109, 97,108,115,
+ 95,105,110,105,116, 40, 32,118,101, 99, 51, 32,118, 78, 44, 32,111,117,116, 32,118,101, 99, 51, 32,118, 78,111,114,103, 44, 32,
+111,117,116, 32,118,101, 99, 51, 32,118, 78, 97, 99, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,102, 80,114,101,118, 77,
+ 97,103,110,105,116,117,100,101, 32, 41, 10,123, 10, 9,118, 78,111,114,103, 32, 61, 32,118, 78, 59, 10, 9,118, 78, 97, 99, 99,
+ 32, 61, 32,118, 78, 59, 10, 9,102, 80,114,101,118, 77, 97,103,110,105,116,117,100,101, 32, 61, 32, 49, 46, 48, 59, 10,125, 10,
+ 10, 47, 42, 42, 32,104,101,108,112,101,114, 32,109,101,116,104,111,100, 32,116,111, 32,101,120,116,114, 97, 99,116, 32,116,104,
+101, 32,117,112,112,101,114, 32,108,101,102,116, 32, 51,120, 51, 32,109, 97,116,114,105,120, 32,102,114,111,109, 32, 97, 32, 52,
+120, 52, 32,109, 97,116,114,105,120, 32, 42, 47, 10,109, 97,116, 51, 32,116,111, 95,109, 97,116, 51, 40,109, 97,116, 52, 32,109,
+ 52, 41, 10,123, 10, 9,109, 97,116, 51, 32,109, 51, 59, 10, 9,109, 51, 91, 48, 93, 32, 61, 32,109, 52, 91, 48, 93, 46,120,121,
+122, 59, 10, 9,109, 51, 91, 49, 93, 32, 61, 32,109, 52, 91, 49, 93, 46,120,121,122, 59, 10, 9,109, 51, 91, 50, 93, 32, 61, 32,
+109, 52, 91, 50, 93, 46,120,121,122, 59, 10, 9,114,101,116,117,114,110, 32,109, 51, 59, 10,125, 10, 10,118,111,105,100, 32,109,
+116,101,120, 95, 98,117,109,112, 95,105,110,105,116, 95,111, 98,106,115,112, 97, 99,101, 40, 32,118,101, 99, 51, 32,115,117,114,
+102, 95,112,111,115, 44, 32,118,101, 99, 51, 32,115,117,114,102, 95,110,111,114,109, 44, 10, 9, 9, 9, 9, 9, 9, 9, 32, 32,
+109, 97,116, 52, 32,109, 86,105,101,119, 44, 32,109, 97,116, 52, 32,109, 86,105,101,119, 73,110,118, 44, 32,109, 97,116, 52, 32,
+109, 79, 98,106, 44, 32,109, 97,116, 52, 32,109, 79, 98,106, 73,110,118, 44, 32, 10, 9, 9, 9, 9, 9, 9, 9, 32, 32,102,108,
+111, 97,116, 32,102, 80,114,101,118, 77, 97,103,110,105,116,117,100,101, 95,105,110, 44, 32,118,101, 99, 51, 32,118, 78, 97, 99,
+ 99, 95,105,110, 44, 10, 9, 9, 9, 9, 9, 9, 9, 32, 32,111,117,116, 32,102,108,111, 97,116, 32,102, 80,114,101,118, 77, 97,
+103,110,105,116,117,100,101, 95,111,117,116, 44, 32,111,117,116, 32,118,101, 99, 51, 32,118, 78, 97, 99, 99, 95,111,117,116, 44,
+ 32, 10, 9, 9, 9, 9, 9, 9, 9, 32, 32,111,117,116, 32,118,101, 99, 51, 32,118, 82, 49, 44, 32,111,117,116, 32,118,101, 99,
+ 51, 32,118, 82, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,102, 68,101,116, 32, 41, 32, 10,123, 10, 9,109, 97,116, 51,
+ 32,111, 98,106, 50,118,105,101,119, 32, 61, 32,116,111, 95,109, 97,116, 51, 40,103,108, 95, 77,111,100,101,108, 86,105,101,119,
+ 77, 97,116,114,105,120, 41, 59, 10, 9,109, 97,116, 51, 32,118,105,101,119, 50,111, 98,106, 32, 61, 32,116,111, 95,109, 97,116,
+ 51, 40,103,108, 95, 77,111,100,101,108, 86,105,101,119, 77, 97,116,114,105,120, 73,110,118,101,114,115,101, 41, 59, 10, 9, 10,
+ 9,118,101, 99, 51, 32,118, 83,105,103,109, 97, 83, 32, 61, 32,118,105,101,119, 50,111, 98,106, 32, 42, 32,100, 70,100,120, 40,
+ 32,115,117,114,102, 95,112,111,115, 32, 41, 59, 10, 9,118,101, 99, 51, 32,118, 83,105,103,109, 97, 84, 32, 61, 32,118,105,101,
+119, 50,111, 98,106, 32, 42, 32,100, 70,100,121, 40, 32,115,117,114,102, 95,112,111,115, 32, 41, 59, 10, 9,118,101, 99, 51, 32,
+118, 78, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40, 32,115,117,114,102, 95,110,111,114,109, 32, 42, 32,111, 98,106, 50,
+118,105,101,119, 32, 41, 59, 10, 10, 9,118, 82, 49, 32, 61, 32, 99,114,111,115,115, 40, 32,118, 83,105,103,109, 97, 84, 44, 32,
+118, 78, 32, 41, 59, 10, 9,118, 82, 50, 32, 61, 32, 99,114,111,115,115, 40, 32,118, 78, 44, 32,118, 83,105,103,109, 97, 83, 32,
+ 41, 32, 59, 10, 9,102, 68,101,116, 32, 61, 32,100,111,116, 32, 40, 32,118, 83,105,103,109, 97, 83, 44, 32,118, 82, 49, 32, 41,
+ 59, 10, 9, 10, 9, 47, 42, 32,112,114,101,116,114, 97,110,115,102,111,114,109, 32,118, 78, 97, 99, 99, 32, 40,105,110, 32,109,
+116,101,120, 95, 98,117,109,112, 95, 97,112,112,108,121, 41, 32,117,115,105,110,103, 32,116,104,101, 32,105,110,118,101,114,115,
+101, 32,116,114, 97,110,115,112,111,115,101,100, 32, 42, 47, 10, 9,118, 82, 49, 32, 61, 32,118, 82, 49, 32, 42, 32,118,105,101,
+119, 50,111, 98,106, 59, 10, 9,118, 82, 50, 32, 61, 32,118, 82, 50, 32, 42, 32,118,105,101,119, 50,111, 98,106, 59, 10, 9,118,
+ 78, 32, 61, 32,118, 78, 32, 42, 32,118,105,101,119, 50,111, 98,106, 59, 10, 9, 10, 9,102,108,111, 97,116, 32,102, 77, 97,103,
+110,105,116,117,100,101, 32, 61, 32, 97, 98,115, 40,102, 68,101,116, 41, 32, 42, 32,108,101,110,103,116,104, 40,118, 78, 41, 59,
+ 10, 9,118, 78, 97, 99, 99, 95,111,117,116, 32, 61, 32,118, 78, 97, 99, 99, 95,105,110, 32, 42, 32, 40,102, 77, 97,103,110,105,
+116,117,100,101, 32, 47, 32,102, 80,114,101,118, 77, 97,103,110,105,116,117,100,101, 95,105,110, 41, 59, 10, 9,102, 80,114,101,
+118, 77, 97,103,110,105,116,117,100,101, 95,111,117,116, 32, 61, 32,102, 77, 97,103,110,105,116,117,100,101, 59, 10,125, 10, 10,
+118,111,105,100, 32,109,116,101,120, 95, 98,117,109,112, 95,105,110,105,116, 95,116,101,120,116,117,114,101,115,112, 97, 99,101,
+ 40, 32,118,101, 99, 51, 32,115,117,114,102, 95,112,111,115, 44, 32,118,101, 99, 51, 32,115,117,114,102, 95,110,111,114,109, 44,
+ 32, 10, 9, 9, 9, 9, 9, 9, 9, 9, 32, 32,102,108,111, 97,116, 32,102, 80,114,101,118, 77, 97,103,110,105,116,117,100,101,
+ 95,105,110, 44, 32,118,101, 99, 51, 32,118, 78, 97, 99, 99, 95,105,110, 44, 10, 9, 9, 9, 9, 9, 9, 9, 9, 32, 32,111,117,
+116, 32,102,108,111, 97,116, 32,102, 80,114,101,118, 77, 97,103,110,105,116,117,100,101, 95,111,117,116, 44, 32,111,117,116, 32,
+118,101, 99, 51, 32,118, 78, 97, 99, 99, 95,111,117,116, 44, 32, 10, 9, 9, 9, 9, 9, 9, 9, 9, 32, 32,111,117,116, 32,118,
+101, 99, 51, 32,118, 82, 49, 44, 32,111,117,116, 32,118,101, 99, 51, 32,118, 82, 50, 44, 32,111,117,116, 32,102,108,111, 97,116,
+ 32,102, 68,101,116, 32, 41, 32, 10,123, 10, 9,118,101, 99, 51, 32,118, 83,105,103,109, 97, 83, 32, 61, 32,100, 70,100,120, 40,
+ 32,115,117,114,102, 95,112,111,115, 32, 41, 59, 10, 9,118,101, 99, 51, 32,118, 83,105,103,109, 97, 84, 32, 61, 32,100, 70,100,
+121, 40, 32,115,117,114,102, 95,112,111,115, 32, 41, 59, 10, 9,118,101, 99, 51, 32,118, 78, 32, 61, 32,115,117,114,102, 95,110,
+111,114,109, 59, 32, 47, 42, 32,110,111,114,109, 97,108,105,122,101,100, 32,105,110,116,101,114,112,111,108, 97,116,101,100, 32,
+118,101,114,116,101,120, 32,110,111,114,109, 97,108, 32, 42, 47, 10, 9, 10, 9,118, 82, 49, 32, 61, 32,110,111,114,109, 97,108,
+105,122,101, 40, 32, 99,114,111,115,115, 40, 32,118, 83,105,103,109, 97, 84, 44, 32,118, 78, 32, 41, 32, 41, 59, 10, 9,118, 82,
+ 50, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40, 32, 99,114,111,115,115, 40, 32,118, 78, 44, 32,118, 83,105,103,109, 97,
+ 83, 32, 41, 32, 41, 59, 10, 9,102, 68,101,116, 32, 61, 32,115,105,103,110, 40, 32,100,111,116, 40,118, 83,105,103,109, 97, 83,
+ 44, 32,118, 82, 49, 41, 32, 41, 59, 10, 9, 10, 9,102,108,111, 97,116, 32,102, 77, 97,103,110,105,116,117,100,101, 32, 61, 32,
+ 97, 98,115, 40,102, 68,101,116, 41, 59, 10, 9,118, 78, 97, 99, 99, 95,111,117,116, 32, 61, 32,118, 78, 97, 99, 99, 95,105,110,
+ 32, 42, 32, 40,102, 77, 97,103,110,105,116,117,100,101, 32, 47, 32,102, 80,114,101,118, 77, 97,103,110,105,116,117,100,101, 95,
+105,110, 41, 59, 10, 9,102, 80,114,101,118, 77, 97,103,110,105,116,117,100,101, 95,111,117,116, 32, 61, 32,102, 77, 97,103,110,
+105,116,117,100,101, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95, 98,117,109,112, 95,105,110,105,116, 95,118,105,
+101,119,115,112, 97, 99,101, 40, 32,118,101, 99, 51, 32,115,117,114,102, 95,112,111,115, 44, 32,118,101, 99, 51, 32,115,117,114,
+102, 95,110,111,114,109, 44, 32, 10, 9, 9, 9, 9, 9, 9, 9, 32, 32, 32,102,108,111, 97,116, 32,102, 80,114,101,118, 77, 97,
+103,110,105,116,117,100,101, 95,105,110, 44, 32,118,101, 99, 51, 32,118, 78, 97, 99, 99, 95,105,110, 44, 10, 9, 9, 9, 9, 9,
+ 9, 9, 32, 32, 32,111,117,116, 32,102,108,111, 97,116, 32,102, 80,114,101,118, 77, 97,103,110,105,116,117,100,101, 95,111,117,
+116, 44, 32,111,117,116, 32,118,101, 99, 51, 32,118, 78, 97, 99, 99, 95,111,117,116, 44, 32, 10, 9, 9, 9, 9, 9, 9, 9, 32,
+ 32, 32,111,117,116, 32,118,101, 99, 51, 32,118, 82, 49, 44, 32,111,117,116, 32,118,101, 99, 51, 32,118, 82, 50, 44, 32,111,117,
+116, 32,102,108,111, 97,116, 32,102, 68,101,116, 32, 41, 32, 10,123, 10, 9,118,101, 99, 51, 32,118, 83,105,103,109, 97, 83, 32,
+ 61, 32,100, 70,100,120, 40, 32,115,117,114,102, 95,112,111,115, 32, 41, 59, 10, 9,118,101, 99, 51, 32,118, 83,105,103,109, 97,
+ 84, 32, 61, 32,100, 70,100,121, 40, 32,115,117,114,102, 95,112,111,115, 32, 41, 59, 10, 9,118,101, 99, 51, 32,118, 78, 32, 61,
+ 32,115,117,114,102, 95,110,111,114,109, 59, 32, 47, 42, 32,110,111,114,109, 97,108,105,122,101,100, 32,105,110,116,101,114,112,
+111,108, 97,116,101,100, 32,118,101,114,116,101,120, 32,110,111,114,109, 97,108, 32, 42, 47, 10, 9, 10, 9,118, 82, 49, 32, 61,
+ 32, 99,114,111,115,115, 40, 32,118, 83,105,103,109, 97, 84, 44, 32,118, 78, 32, 41, 59, 10, 9,118, 82, 50, 32, 61, 32, 99,114,
+111,115,115, 40, 32,118, 78, 44, 32,118, 83,105,103,109, 97, 83, 32, 41, 32, 59, 10, 9,102, 68,101,116, 32, 61, 32,100,111,116,
+ 32, 40, 32,118, 83,105,103,109, 97, 83, 44, 32,118, 82, 49, 32, 41, 59, 10, 9, 10, 9,102,108,111, 97,116, 32,102, 77, 97,103,
+110,105,116,117,100,101, 32, 61, 32, 97, 98,115, 40,102, 68,101,116, 41, 59, 10, 9,118, 78, 97, 99, 99, 95,111,117,116, 32, 61,
+ 32,118, 78, 97, 99, 99, 95,105,110, 32, 42, 32, 40,102, 77, 97,103,110,105,116,117,100,101, 32, 47, 32,102, 80,114,101,118, 77,
+ 97,103,110,105,116,117,100,101, 95,105,110, 41, 59, 10, 9,102, 80,114,101,118, 77, 97,103,110,105,116,117,100,101, 95,111,117,
+116, 32, 61, 32,102, 77, 97,103,110,105,116,117,100,101, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95, 98,117,109,
+112, 95,116, 97,112, 51, 40, 32,118,101, 99, 51, 32,116,101,120, 99,111, 44, 32,115, 97,109,112,108,101,114, 50, 68, 32,105,109,
+ 97, 44, 32,102,108,111, 97,116, 32,104, 83, 99, 97,108,101, 44, 32, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32,111,117,116, 32,102,108,111, 97,116, 32,100, 66,115, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,
+100, 66,116, 32, 41, 32, 10,123, 10, 9,118,101, 99, 50, 32, 83, 84,108,108, 32, 61, 32,116,101,120, 99,111, 46,120,121, 59, 10,
+ 9,118,101, 99, 50, 32, 83, 84,108,114, 32, 61, 32,116,101,120, 99,111, 46,120,121, 32, 43, 32,100, 70,100,120, 40,116,101,120,
+ 99,111, 46,120,121, 41, 32, 59, 10, 9,118,101, 99, 50, 32, 83, 84,117,108, 32, 61, 32,116,101,120, 99,111, 46,120,121, 32, 43,
+ 32,100, 70,100,121, 40,116,101,120, 99,111, 46,120,121, 41, 32, 59, 10, 9, 10, 9,102,108,111, 97,116, 32, 72,108,108, 44, 72,
+108,114, 44, 72,117,108, 59, 10, 9,114,103, 98,116,111, 98,119, 40, 32,116,101,120,116,117,114,101, 50, 68, 40,105,109, 97, 44,
+ 32, 83, 84,108,108, 41, 44, 32, 72,108,108, 32, 41, 59, 10, 9,114,103, 98,116,111, 98,119, 40, 32,116,101,120,116,117,114,101,
+ 50, 68, 40,105,109, 97, 44, 32, 83, 84,108,114, 41, 44, 32, 72,108,114, 32, 41, 59, 10, 9,114,103, 98,116,111, 98,119, 40, 32,
+116,101,120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32, 83, 84,117,108, 41, 44, 32, 72,117,108, 32, 41, 59, 10, 9, 10, 9,
+100, 66,115, 32, 61, 32,104, 83, 99, 97,108,101, 32, 42, 32, 40, 72,108,114, 32, 45, 32, 72,108,108, 41, 59, 10, 9,100, 66,116,
+ 32, 61, 32,104, 83, 99, 97,108,101, 32, 42, 32, 40, 72,117,108, 32, 45, 32, 72,108,108, 41, 59, 10,125, 10, 10, 35,105,102,100,
+101,102, 32, 66, 85, 77, 80, 95, 66, 73, 67, 85, 66, 73, 67, 10, 10,118,111,105,100, 32,109,116,101,120, 95, 98,117,109,112, 95,
+ 98,105, 99,117, 98,105, 99, 40, 32,118,101, 99, 51, 32,116,101,120, 99,111, 44, 32,115, 97,109,112,108,101,114, 50, 68, 32,105,
+109, 97, 44, 32,102,108,111, 97,116, 32,104, 83, 99, 97,108,101, 44, 32, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32,111,117,116, 32,102,108,111, 97,116, 32,100, 66,115, 44, 32,111,117,116, 32,102,108,111, 97,116,
+ 32,100, 66,116, 32, 41, 32, 10,123, 10, 9,102,108,111, 97,116, 32, 72,108, 59, 10, 9,102,108,111, 97,116, 32, 72,114, 59, 10,
+ 9,102,108,111, 97,116, 32, 72,100, 59, 10, 9,102,108,111, 97,116, 32, 72,117, 59, 10, 9, 10, 9,118,101, 99, 50, 32, 84,101,
+120, 68,120, 32, 61, 32,100, 70,100,120, 40,116,101,120, 99,111, 46,120,121, 41, 59, 10, 9,118,101, 99, 50, 32, 84,101,120, 68,
+121, 32, 61, 32,100, 70,100,121, 40,116,101,120, 99,111, 46,120,121, 41, 59, 10, 32, 10, 9,118,101, 99, 50, 32, 83, 84,108, 32,
+ 61, 32,116,101,120, 99,111, 46,120,121, 32, 45, 32, 48, 46, 53, 32, 42, 32, 84,101,120, 68,120, 32, 59, 10, 9,118,101, 99, 50,
+ 32, 83, 84,114, 32, 61, 32,116,101,120, 99,111, 46,120,121, 32, 43, 32, 48, 46, 53, 32, 42, 32, 84,101,120, 68,120, 32, 59, 10,
+ 9,118,101, 99, 50, 32, 83, 84,100, 32, 61, 32,116,101,120, 99,111, 46,120,121, 32, 45, 32, 48, 46, 53, 32, 42, 32, 84,101,120,
+ 68,121, 32, 59, 10, 9,118,101, 99, 50, 32, 83, 84,117, 32, 61, 32,116,101,120, 99,111, 46,120,121, 32, 43, 32, 48, 46, 53, 32,
+ 42, 32, 84,101,120, 68,121, 32, 59, 10, 9, 10, 9,114,103, 98,116,111, 98,119, 40,116,101,120,116,117,114,101, 50, 68, 40,105,
+109, 97, 44, 32, 83, 84,108, 41, 44, 32, 72,108, 41, 59, 10, 9,114,103, 98,116,111, 98,119, 40,116,101,120,116,117,114,101, 50,
+ 68, 40,105,109, 97, 44, 32, 83, 84,114, 41, 44, 32, 72,114, 41, 59, 10, 9,114,103, 98,116,111, 98,119, 40,116,101,120,116,117,
+114,101, 50, 68, 40,105,109, 97, 44, 32, 83, 84,100, 41, 44, 32, 72,100, 41, 59, 10, 9,114,103, 98,116,111, 98,119, 40,116,101,
+120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32, 83, 84,117, 41, 44, 32, 72,117, 41, 59, 10, 9, 10, 9,118,101, 99, 50, 32,
+100, 72,100,120,121, 32, 61, 32,118,101, 99, 50, 40, 72,114, 32, 45, 32, 72,108, 44, 32, 72,117, 32, 45, 32, 72,100, 41, 59, 10,
+ 9,102,108,111, 97,116, 32,102, 66,108,101,110,100, 32, 61, 32, 99,108, 97,109,112, 40, 49, 46, 48, 45,116,101,120,116,117,114,
+101, 81,117,101,114,121, 76, 79, 68, 40,105,109, 97, 44, 32,116,101,120, 99,111, 46,120,121, 41, 46,120, 44, 32, 48, 46, 48, 44,
+ 32, 49, 46, 48, 41, 59, 10, 9,105,102, 40,102, 66,108,101,110,100, 33, 61, 48, 46, 48, 41, 10, 9,123, 10, 9, 9, 47, 47, 32,
+116,104,101, 32,100,101,114,105,118, 97,116,105,118,101, 32,111,102, 32,116,104,101, 32, 98,105, 99,117, 98,105, 99, 32,115, 97,
+109,112,108,105,110,103, 32,111,102, 32,108,101,118,101,108, 32, 48, 10, 9, 9,105,118,101, 99, 50, 32,118, 68,105,109, 59, 10,
+ 9, 9,118, 68,105,109, 32, 61, 32,116,101,120,116,117,114,101, 83,105,122,101, 40,105,109, 97, 44, 32, 48, 41, 59, 10, 10, 9,
+ 9, 47, 47, 32,116, 97,107,105,110,103, 32,116,104,101, 32,102,114, 97, 99,116, 32,112, 97,114,116, 32,111,102, 32,116,104,101,
+ 32,116,101,120,116,117,114,101, 32, 99,111,111,114,100,105,110, 97,116,101, 32,105,115, 32, 97, 32,104, 97,114,100, 99,111,100,
+101,100, 32,119,114, 97,112, 32,109,111,100,101, 46, 10, 9, 9, 47, 47, 32,116,104,105,115, 32,105,115, 32, 97, 99, 99,101,112,
+116, 97, 98,108,101, 32, 97,115, 32,116,101,120,116,117,114,101,115, 32,117,115,101, 32,119,114, 97,112, 32,109,111,100,101, 32,
+101,120, 99,108,117,115,105,118,101,108,121, 32,105,110, 32, 51, 68, 32,118,105,101,119, 32,101,108,115,101,119,104,101,114,101,
+ 32,105,110, 32, 98,108,101,110,100,101,114, 46, 32, 10, 9, 9, 47, 47, 32,116,104,105,115, 32,105,115, 32,100,111,110,101, 32,
+115,111, 32,116,104, 97,116, 32,119,101, 32, 99, 97,110, 32,115,116,105,108,108, 32,103,101,116, 32, 97, 32,118, 97,108,105,100,
+ 32,116,101,120,101,108, 32,119,105,116,104, 32,117,118,115, 32,111,117,116,115,105,100,101, 32,116,104,101, 32, 48, 44, 49, 32,
+114, 97,110,103,101, 10, 9, 9, 47, 47, 32, 98,121, 32,116,101,120,101,108, 70,101,116, 99,104, 32, 98,101,108,111,119, 44, 32,
+ 97,115, 32, 99,111,111,114,100,105,110, 97,116,101,115, 32, 97,114,101, 32, 99,108, 97,109,112,101,100, 32,119,104,101,110, 32,
+117,115,105,110,103, 32,116,104,105,115, 32,102,117,110, 99,116,105,111,110, 46, 10, 9, 9,118,101, 99, 50, 32,102, 84,101,120,
+ 76,111, 99, 32, 61, 32,118, 68,105,109, 42,102,114, 97, 99,116, 40,116,101,120, 99,111, 46,120,121, 41, 32, 45, 32,118,101, 99,
+ 50, 40, 48, 46, 53, 44, 32, 48, 46, 53, 41, 59, 10, 9, 9,105,118,101, 99, 50, 32,105, 84,101,120, 76,111, 99, 32, 61, 32,105,
+118,101, 99, 50, 40,102,108,111,111,114, 40,102, 84,101,120, 76,111, 99, 41, 41, 59, 10, 9, 9,118,101, 99, 50, 32,116, 32, 61,
+ 32, 99,108, 97,109,112, 40,102, 84,101,120, 76,111, 99, 32, 45, 32,105, 84,101,120, 76,111, 99, 44, 32, 48, 46, 48, 44, 32, 49,
+ 46, 48, 41, 59, 9, 9, 47, 47, 32,115, 97,116, 32,106,117,115,116, 32,116,111, 32, 98,101, 32,112,101,100, 97,110,116,105, 99,
+ 10, 10, 47, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 10, 32,
+ 42, 32, 84,104,105,115, 32, 98,108,111, 99,107, 32,119,105,108,108, 32,114,101,112,108, 97, 99,101, 32,116,104,101, 32,111,110,
+101, 32, 98,101,108,111,119, 32,119,104,101,110, 32,111,110,101, 32, 99,104, 97,110,110,101,108, 32,116,101,120,116,117,114,101,
+115, 32, 97,114,101, 32,112,114,111,112,101,114,108,121, 32,115,117,112,112,111,114,116,101,100, 46, 32, 42, 10, 32, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 10, 9, 9,118,101, 99, 52, 32,
+118, 83, 97,109,112,108,101,115, 85, 76, 32, 61, 32,116,101,120,116,117,114,101, 71, 97,116,104,101,114, 40,105,109, 97, 44, 32,
+ 40,105, 84,101,120, 76,111, 99, 43,105,118,101, 99, 50, 40, 45, 49, 44, 45, 49, 41, 32, 43, 32,118,101, 99, 50, 40, 48, 46, 53,
+ 44, 48, 46, 53, 41, 41, 47,118, 68,105,109, 32, 41, 59, 10, 9, 9,118,101, 99, 52, 32,118, 83, 97,109,112,108,101,115, 85, 82,
+ 32, 61, 32,116,101,120,116,117,114,101, 71, 97,116,104,101,114, 40,105,109, 97, 44, 32, 40,105, 84,101,120, 76,111, 99, 43,105,
+118,101, 99, 50, 40, 49, 44, 45, 49, 41, 32, 43, 32,118,101, 99, 50, 40, 48, 46, 53, 44, 48, 46, 53, 41, 41, 47,118, 68,105,109,
+ 32, 41, 59, 10, 9, 9,118,101, 99, 52, 32,118, 83, 97,109,112,108,101,115, 76, 76, 32, 61, 32,116,101,120,116,117,114,101, 71,
+ 97,116,104,101,114, 40,105,109, 97, 44, 32, 40,105, 84,101,120, 76,111, 99, 43,105,118,101, 99, 50, 40, 45, 49, 44, 49, 41, 32,
+ 43, 32,118,101, 99, 50, 40, 48, 46, 53, 44, 48, 46, 53, 41, 41, 47,118, 68,105,109, 32, 41, 59, 10, 9, 9,118,101, 99, 52, 32,
+118, 83, 97,109,112,108,101,115, 76, 82, 32, 61, 32,116,101,120,116,117,114,101, 71, 97,116,104,101,114, 40,105,109, 97, 44, 32,
+ 40,105, 84,101,120, 76,111, 99, 43,105,118,101, 99, 50, 40, 49, 44, 49, 41, 32, 43, 32,118,101, 99, 50, 40, 48, 46, 53, 44, 48,
+ 46, 53, 41, 41, 47,118, 68,105,109, 32, 41, 59, 10, 10, 9, 9,109, 97,116, 52, 32, 72, 32, 61, 32,109, 97,116, 52, 40,118, 83,
+ 97,109,112,108,101,115, 85, 76, 46,119, 44, 32,118, 83, 97,109,112,108,101,115, 85, 76, 46,120, 44, 32,118, 83, 97,109,112,108,
+101,115, 76, 76, 46,119, 44, 32,118, 83, 97,109,112,108,101,115, 76, 76, 46,120, 44, 10, 9, 9, 9, 9, 9,118, 83, 97,109,112,
+108,101,115, 85, 76, 46,122, 44, 32,118, 83, 97,109,112,108,101,115, 85, 76, 46,121, 44, 32,118, 83, 97,109,112,108,101,115, 76,
+ 76, 46,122, 44, 32,118, 83, 97,109,112,108,101,115, 76, 76, 46,121, 44, 10, 9, 9, 9, 9, 9,118, 83, 97,109,112,108,101,115,
+ 85, 82, 46,119, 44, 32,118, 83, 97,109,112,108,101,115, 85, 82, 46,120, 44, 32,118, 83, 97,109,112,108,101,115, 76, 82, 46,119,
+ 44, 32,118, 83, 97,109,112,108,101,115, 76, 82, 46,120, 44, 10, 9, 9, 9, 9, 9,118, 83, 97,109,112,108,101,115, 85, 82, 46,
+122, 44, 32,118, 83, 97,109,112,108,101,115, 85, 82, 46,121, 44, 32,118, 83, 97,109,112,108,101,115, 76, 82, 46,122, 44, 32,118,
+ 83, 97,109,112,108,101,115, 76, 82, 46,121, 41, 59, 10, 42, 47, 9, 10, 9, 9,105,118,101, 99, 50, 32,105, 84,101,120, 76,111,
+ 99, 77,111,100, 32, 61, 32,105, 84,101,120, 76,111, 99, 32, 43, 32,105,118,101, 99, 50, 40, 45, 49, 44, 32, 45, 49, 41, 59, 10,
+ 10, 9, 9,109, 97,116, 52, 32, 72, 59, 10, 9, 9, 10, 9, 9,102,111,114, 40,105,110,116, 32,105, 32, 61, 32, 48, 59, 32,105,
+ 32, 60, 32, 52, 59, 32,105, 43, 43, 41,123, 10, 9, 9, 9,102,111,114, 40,105,110,116, 32,106, 32, 61, 32, 48, 59, 32,106, 32,
+ 60, 32, 52, 59, 32,106, 43, 43, 41,123, 10, 9, 9, 9, 9,105,118,101, 99, 50, 32,105, 84,101,120, 84,109,112, 32, 61, 32,105,
+ 84,101,120, 76,111, 99, 77,111,100, 32, 43, 32,105,118,101, 99, 50, 40,105, 44,106, 41, 59, 10, 9, 9, 9, 9, 10, 9, 9, 9,
+ 9, 47, 47, 32,119,114, 97,112, 32,116,101,120,116,117,114,101, 32, 99,111,111,114,100,105,110, 97,116,101,115, 32,109, 97,110,
+117, 97,108,108,121, 32,102,111,114, 32,116,101,120,101,108, 70,101,116, 99,104, 32,116,111, 32,119,111,114,107, 32,111,110, 32,
+117,118,115, 32,111,105,116,115,105,100,101, 32,116,104,101, 32, 48, 44, 49, 32,114, 97,110,103,101, 46, 10, 9, 9, 9, 9, 47,
+ 47, 32,116,104,105,115, 32,105,115, 32,103,117, 97,114, 97,110,116,101,101,100, 32,116,111, 32,119,111,114,107, 32,115,105,110,
+ 99,101, 32,119,101, 32,116, 97,107,101, 32,116,104,101, 32,102,114, 97, 99,116,105,111,110, 97,108, 32,112, 97,114,116, 32,111,
+102, 32,116,104,101, 32,117,118, 32, 97, 98,111,118,101, 46, 10, 9, 9, 9, 9,105, 84,101,120, 84,109,112, 46,120, 32, 61, 32,
+ 40,105, 84,101,120, 84,109,112, 46,120, 32, 60, 32, 48, 41, 63, 32,105, 84,101,120, 84,109,112, 46,120, 32, 43, 32,118, 68,105,
+109, 46,120, 32, 58, 32, 40, 40,105, 84,101,120, 84,109,112, 46,120, 32, 62, 61, 32,118, 68,105,109, 46,120, 41, 63, 32,105, 84,
+101,120, 84,109,112, 46,120, 32, 45, 32,118, 68,105,109, 46,120, 32, 58, 32,105, 84,101,120, 84,109,112, 46,120, 41, 59, 10, 9,
+ 9, 9, 9,105, 84,101,120, 84,109,112, 46,121, 32, 61, 32, 40,105, 84,101,120, 84,109,112, 46,121, 32, 60, 32, 48, 41, 63, 32,
+105, 84,101,120, 84,109,112, 46,121, 32, 43, 32,118, 68,105,109, 46,121, 32, 58, 32, 40, 40,105, 84,101,120, 84,109,112, 46,121,
+ 32, 62, 61, 32,118, 68,105,109, 46,121, 41, 63, 32,105, 84,101,120, 84,109,112, 46,121, 32, 45, 32,118, 68,105,109, 46,121, 32,
+ 58, 32,105, 84,101,120, 84,109,112, 46,121, 41, 59, 10, 10, 9, 9, 9, 9,114,103, 98,116,111, 98,119, 40,116,101,120,101,108,
+ 70,101,116, 99,104, 40,105,109, 97, 44, 32,105, 84,101,120, 84,109,112, 44, 32, 48, 41, 44, 32, 72, 91,105, 93, 91,106, 93, 41,
+ 59, 10, 9, 9, 9,125, 10, 9, 9,125, 10, 9, 9, 10, 9, 9,102,108,111, 97,116, 32,120, 32, 61, 32,116, 46,120, 44, 32,121,
+ 32, 61, 32,116, 46,121, 59, 10, 9, 9,102,108,111, 97,116, 32,120, 50, 32, 61, 32,120, 32, 42, 32,120, 44, 32,120, 51, 32, 61,
+ 32,120, 50, 32, 42, 32,120, 44, 32,121, 50, 32, 61, 32,121, 32, 42, 32,121, 44, 32,121, 51, 32, 61, 32,121, 50, 32, 42, 32,121,
+ 59, 10, 10, 9, 9,118,101, 99, 52, 32, 88, 32, 61, 32,118,101, 99, 52, 40, 45, 48, 46, 53, 42, 40,120, 51, 43,120, 41, 43,120,
+ 50, 44, 9, 9, 49, 46, 53, 42,120, 51, 45, 50, 46, 53, 42,120, 50, 43, 49, 44, 9, 45, 49, 46, 53, 42,120, 51, 43, 50, 42,120,
+ 50, 43, 48, 46, 53, 42,120, 44, 9, 9, 48, 46, 53, 42, 40,120, 51, 45,120, 50, 41, 41, 59, 10, 9, 9,118,101, 99, 52, 32, 89,
+ 32, 61, 32,118,101, 99, 52, 40, 45, 48, 46, 53, 42, 40,121, 51, 43,121, 41, 43,121, 50, 44, 9, 9, 49, 46, 53, 42,121, 51, 45,
+ 50, 46, 53, 42,121, 50, 43, 49, 44, 9, 45, 49, 46, 53, 42,121, 51, 43, 50, 42,121, 50, 43, 48, 46, 53, 42,121, 44, 9, 9, 48,
+ 46, 53, 42, 40,121, 51, 45,121, 50, 41, 41, 59, 10, 9, 9,118,101, 99, 52, 32,100, 88, 32, 61, 32,118,101, 99, 52, 40, 45, 49,
+ 46, 53, 42,120, 50, 43, 50, 42,120, 45, 48, 46, 53, 44, 9, 9, 52, 46, 53, 42,120, 50, 45, 53, 42,120, 44, 9, 9, 9, 45, 52,
+ 46, 53, 42,120, 50, 43, 52, 42,120, 43, 48, 46, 53, 44, 9, 9, 49, 46, 53, 42,120, 50, 45,120, 41, 59, 10, 9, 9,118,101, 99,
+ 52, 32,100, 89, 32, 61, 32,118,101, 99, 52, 40, 45, 49, 46, 53, 42,121, 50, 43, 50, 42,121, 45, 48, 46, 53, 44, 9, 9, 52, 46,
+ 53, 42,121, 50, 45, 53, 42,121, 44, 9, 9, 9, 45, 52, 46, 53, 42,121, 50, 43, 52, 42,121, 43, 48, 46, 53, 44, 9, 9, 49, 46,
+ 53, 42,121, 50, 45,121, 41, 59, 10, 9, 10, 9, 9, 47, 47, 32, 99,111,109,112,108,101,116,101, 32,100,101,114,105,118, 97,116,
+105,118,101, 32,105,110, 32,110,111,114,109, 97,108,105,122,101,100, 32, 99,111,111,114,100,105,110, 97,116,101,115, 32, 40,109,
+117,108, 32, 98,121, 32,118, 68,105,109, 41, 10, 9, 9,118,101, 99, 50, 32,100, 72,100, 83, 84, 32, 61, 32,118, 68,105,109, 32,
+ 42, 32,118,101, 99, 50, 40,100,111,116, 40, 89, 44, 32, 72, 32, 42, 32,100, 88, 41, 44, 32,100,111,116, 40,100, 89, 44, 32, 72,
+ 32, 42, 32, 88, 41, 41, 59, 10, 10, 9, 9, 47, 47, 32,116,114, 97,110,115,102,111,114,109, 32,100,101,114,105,118, 97,116,105,
+118,101, 32,116,111, 32,115, 99,114,101,101,110, 45,115,112, 97, 99,101, 10, 9, 9,118,101, 99, 50, 32,100, 72,100,120,121, 95,
+ 98,105, 99,117, 98,105, 99, 32, 61, 32,118,101, 99, 50, 40, 32,100, 72,100, 83, 84, 46,120, 32, 42, 32, 84,101,120, 68,120, 46,
+120, 32, 43, 32,100, 72,100, 83, 84, 46,121, 32, 42, 32, 84,101,120, 68,120, 46,121, 44, 10, 9, 9, 9, 9, 9, 9, 9, 9, 32,
+ 32, 32,100, 72,100, 83, 84, 46,120, 32, 42, 32, 84,101,120, 68,121, 46,120, 32, 43, 32,100, 72,100, 83, 84, 46,121, 32, 42, 32,
+ 84,101,120, 68,121, 46,121, 32, 41, 59, 10, 10, 9, 9, 47, 47, 32, 98,108,101,110,100, 32, 98,101,116,119,101,101,110, 32,116,
+104,101, 32,116,119,111, 10, 9, 9,100, 72,100,120,121, 32, 61, 32,100, 72,100,120,121, 42, 40, 49, 45,102, 66,108,101,110,100,
+ 41, 32, 43, 32,100, 72,100,120,121, 95, 98,105, 99,117, 98,105, 99, 42,102, 66,108,101,110,100, 59, 10, 9,125, 10, 10, 9,100,
+ 66,115, 32, 61, 32,104, 83, 99, 97,108,101, 32, 42, 32,100, 72,100,120,121, 46,120, 59, 10, 9,100, 66,116, 32, 61, 32,104, 83,
+ 99, 97,108,101, 32, 42, 32,100, 72,100,120,121, 46,121, 59, 10,125, 10, 10, 35,101,110,100,105,102, 10, 10,118,111,105,100, 32,
+109,116,101,120, 95, 98,117,109,112, 95,116, 97,112, 53, 40, 32,118,101, 99, 51, 32,116,101,120, 99,111, 44, 32,115, 97,109,112,
+108,101,114, 50, 68, 32,105,109, 97, 44, 32,102,108,111, 97,116, 32,104, 83, 99, 97,108,101, 44, 32, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,111,117,116, 32,102,108,111, 97,116, 32,100, 66,115, 44, 32,111,117,
+116, 32,102,108,111, 97,116, 32,100, 66,116, 32, 41, 32, 10,123, 10, 9,118,101, 99, 50, 32, 84,101,120, 68,120, 32, 61, 32,100,
+ 70,100,120, 40,116,101,120, 99,111, 46,120,121, 41, 59, 10, 9,118,101, 99, 50, 32, 84,101,120, 68,121, 32, 61, 32,100, 70,100,
+121, 40,116,101,120, 99,111, 46,120,121, 41, 59, 10, 10, 9,118,101, 99, 50, 32, 83, 84, 99, 32, 61, 32,116,101,120, 99,111, 46,
+120,121, 59, 10, 9,118,101, 99, 50, 32, 83, 84,108, 32, 61, 32,116,101,120, 99,111, 46,120,121, 32, 45, 32, 48, 46, 53, 32, 42,
+ 32, 84,101,120, 68,120, 32, 59, 10, 9,118,101, 99, 50, 32, 83, 84,114, 32, 61, 32,116,101,120, 99,111, 46,120,121, 32, 43, 32,
+ 48, 46, 53, 32, 42, 32, 84,101,120, 68,120, 32, 59, 10, 9,118,101, 99, 50, 32, 83, 84,100, 32, 61, 32,116,101,120, 99,111, 46,
+120,121, 32, 45, 32, 48, 46, 53, 32, 42, 32, 84,101,120, 68,121, 32, 59, 10, 9,118,101, 99, 50, 32, 83, 84,117, 32, 61, 32,116,
+101,120, 99,111, 46,120,121, 32, 43, 32, 48, 46, 53, 32, 42, 32, 84,101,120, 68,121, 32, 59, 10, 9, 10, 9,102,108,111, 97,116,
+ 32, 72, 99, 44, 72,108, 44, 72,114, 44, 72,100, 44, 72,117, 59, 10, 9,114,103, 98,116,111, 98,119, 40, 32,116,101,120,116,117,
+114,101, 50, 68, 40,105,109, 97, 44, 32, 83, 84, 99, 41, 44, 32, 72, 99, 32, 41, 59, 10, 9,114,103, 98,116,111, 98,119, 40, 32,
+116,101,120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32, 83, 84,108, 41, 44, 32, 72,108, 32, 41, 59, 10, 9,114,103, 98,116,
+111, 98,119, 40, 32,116,101,120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32, 83, 84,114, 41, 44, 32, 72,114, 32, 41, 59, 10,
+ 9,114,103, 98,116,111, 98,119, 40, 32,116,101,120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32, 83, 84,100, 41, 44, 32, 72,
+100, 32, 41, 59, 10, 9,114,103, 98,116,111, 98,119, 40, 32,116,101,120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32, 83, 84,
+117, 41, 44, 32, 72,117, 32, 41, 59, 10, 9, 10, 9,100, 66,115, 32, 61, 32,104, 83, 99, 97,108,101, 32, 42, 32, 40, 72,114, 32,
+ 45, 32, 72,108, 41, 59, 10, 9,100, 66,116, 32, 61, 32,104, 83, 99, 97,108,101, 32, 42, 32, 40, 72,117, 32, 45, 32, 72,100, 41,
+ 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95, 98,117,109,112, 95,100,101,114,105,118, 40, 32,118,101, 99, 51, 32,
+116,101,120, 99,111, 44, 32,115, 97,109,112,108,101,114, 50, 68, 32,105,109, 97, 44, 32,102,108,111, 97,116, 32,105,109, 97, 95,
+120, 44, 32,102,108,111, 97,116, 32,105,109, 97, 95,121, 44, 32,102,108,111, 97,116, 32,104, 83, 99, 97,108,101, 44, 32, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,111,117,116, 32,102,108,111, 97,116, 32,100, 66,
+115, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,100, 66,116, 32, 41, 32, 10,123, 10, 9,102,108,111, 97,116, 32,115, 32, 61,
+ 32, 49, 46, 48, 59, 9, 9, 47, 47, 32,110,101,103, 97,116,101, 32,116,104,105,115, 32,105,102, 32,102,108,105,112,112,101,100,
+ 32,116,101,120,116,117,114,101, 32, 99,111,111,114,100,105,110, 97,116,101, 10, 9,118,101, 99, 50, 32, 84,101,120, 68,120, 32,
+ 61, 32,100, 70,100,120, 40,116,101,120, 99,111, 46,120,121, 41, 59, 10, 9,118,101, 99, 50, 32, 84,101,120, 68,121, 32, 61, 32,
+100, 70,100,121, 40,116,101,120, 99,111, 46,120,121, 41, 59, 10, 9, 10, 9, 47, 47, 32,116,104,105,115, 32,118, 97,114,105, 97,
+110,116, 32,117,115,105,110,103, 32, 97, 32,100,101,114,105,118, 97,116,105,118,101, 32,109, 97,112, 32,105,115, 32,100,101,115,
+ 99,114,105, 98,101,100, 32,104,101,114,101, 10, 9, 47, 47, 32,104,116,116,112, 58, 47, 47,109,109,105,107,107,101,108,115,101,
+110, 51,100, 46, 98,108,111,103,115,112,111,116, 46, 99,111,109, 47, 50, 48, 49, 49, 47, 48, 55, 47,100,101,114,105,118, 97,116,
+105,118,101, 45,109, 97,112,115, 46,104,116,109,108, 10, 9,118,101, 99, 50, 32,100,105,109, 32, 61, 32,118,101, 99, 50, 40,105,
+109, 97, 95,120, 44, 32,105,109, 97, 95,121, 41, 59, 10, 9,118,101, 99, 50, 32,100, 66,100,117,118, 32, 61, 32,104, 83, 99, 97,
+108,101, 42,100,105,109, 42, 40, 50, 46, 48, 42,116,101,120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32,116,101,120, 99,111,
+ 46,120,121, 41, 46,120,121, 45, 49, 46, 48, 41, 59, 10, 9, 10, 9,100, 66,115, 32, 61, 32,100, 66,100,117,118, 46,120, 42, 84,
+101,120, 68,120, 46,120, 32, 43, 32,115, 42,100, 66,100,117,118, 46,121, 42, 84,101,120, 68,120, 46,121, 59, 10, 9,100, 66,116,
+ 32, 61, 32,100, 66,100,117,118, 46,120, 42, 84,101,120, 68,121, 46,120, 32, 43, 32,115, 42,100, 66,100,117,118, 46,121, 42, 84,
+101,120, 68,121, 46,121, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95, 98,117,109,112, 95, 97,112,112,108,121, 40,
+ 32,102,108,111, 97,116, 32,102, 68,101,116, 44, 32,102,108,111, 97,116, 32,100, 66,115, 44, 32,102,108,111, 97,116, 32,100, 66,
+116, 44, 32,118,101, 99, 51, 32,118, 82, 49, 44, 32,118,101, 99, 51, 32,118, 82, 50, 44, 32,118,101, 99, 51, 32,118, 78, 97, 99,
+ 99, 95,105,110, 44, 10, 9, 9, 9, 9, 9, 32, 32,111,117,116, 32,118,101, 99, 51, 32,118, 78, 97, 99, 99, 95,111,117,116, 44,
+ 32,111,117,116, 32,118,101, 99, 51, 32,112,101,114,116,117,114, 98,101,100, 95,110,111,114,109, 32, 41, 32, 10,123, 10, 9,118,
+101, 99, 51, 32,118, 83,117,114,102, 71,114, 97,100, 32, 61, 32,115,105,103,110, 40,102, 68,101,116, 41, 32, 42, 32, 40, 32,100,
+ 66,115, 32, 42, 32,118, 82, 49, 32, 43, 32,100, 66,116, 32, 42, 32,118, 82, 50, 32, 41, 59, 10, 9, 10, 9,118, 78, 97, 99, 99,
+ 95,111,117,116, 32, 61, 32,118, 78, 97, 99, 99, 95,105,110, 32, 45, 32,118, 83,117,114,102, 71,114, 97,100, 59, 10, 9,112,101,
+114,116,117,114, 98,101,100, 95,110,111,114,109, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40, 32,118, 78, 97, 99, 99, 95,
+111,117,116, 32, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95, 98,117,109,112, 95, 97,112,112,108,121, 95,116,
+101,120,115,112, 97, 99,101, 40, 32,102,108,111, 97,116, 32,102, 68,101,116, 44, 32,102,108,111, 97,116, 32,100, 66,115, 44, 32,
+102,108,111, 97,116, 32,100, 66,116, 44, 32,118,101, 99, 51, 32,118, 82, 49, 44, 32,118,101, 99, 51, 32,118, 82, 50, 44, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,115, 97,
+109,112,108,101,114, 50, 68, 32,105,109, 97, 44, 32,118,101, 99, 51, 32,116,101,120, 99,111, 44, 32,102,108,111, 97,116, 32,105,
+109, 97, 95,120, 44, 32,102,108,111, 97,116, 32,105,109, 97, 95,121, 44, 32,118,101, 99, 51, 32,118, 78, 97, 99, 99, 95,105,110,
+ 44, 10, 9, 9, 9, 9, 9, 9, 9, 32, 32, 32,111,117,116, 32,118,101, 99, 51, 32,118, 78, 97, 99, 99, 95,111,117,116, 44, 32,
+111,117,116, 32,118,101, 99, 51, 32,112,101,114,116,117,114, 98,101,100, 95,110,111,114,109, 32, 41, 32, 10,123, 10, 9,118,101,
+ 99, 50, 32, 84,101,120, 68,120, 32, 61, 32,100, 70,100,120, 40,116,101,120, 99,111, 46,120,121, 41, 59, 10, 9,118,101, 99, 50,
+ 32, 84,101,120, 68,121, 32, 61, 32,100, 70,100,121, 40,116,101,120, 99,111, 46,120,121, 41, 59, 10, 10, 9,118,101, 99, 51, 32,
+118, 83,117,114,102, 71,114, 97,100, 32, 61, 32,115,105,103,110, 40,102, 68,101,116, 41, 32, 42, 32, 40, 32, 10, 9, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32,100, 66,115, 32, 47, 32,108,101,110,103,116,104, 40, 32,118,101, 99, 50, 40,105,109, 97, 95,
+120, 42, 84,101,120, 68,120, 46,120, 44, 32,105,109, 97, 95,121, 42, 84,101,120, 68,120, 46,121, 41, 32, 41, 32, 42, 32,118, 82,
+ 49, 32, 43, 32, 10, 9, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,100, 66,116, 32, 47, 32,108,101,110,103,116,104, 40, 32,
+118,101, 99, 50, 40,105,109, 97, 95,120, 42, 84,101,120, 68,121, 46,120, 44, 32,105,109, 97, 95,121, 42, 84,101,120, 68,121, 46,
+121, 41, 32, 41, 32, 42, 32,118, 82, 50, 32, 41, 59, 10, 9, 9, 9, 9, 10, 9,118, 78, 97, 99, 99, 95,111,117,116, 32, 61, 32,
+118, 78, 97, 99, 99, 95,105,110, 32, 45, 32,118, 83,117,114,102, 71,114, 97,100, 59, 10, 9,112,101,114,116,117,114, 98,101,100,
+ 95,110,111,114,109, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40, 32,118, 78, 97, 99, 99, 95,111,117,116, 32, 41, 59, 10,
+125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,110,101,103, 97,116,101, 95,116,101,120,110,111,114,109, 97,108, 40,118,101,
+ 99, 51, 32,110,111,114,109, 97,108, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,110,111,114,109, 97,108, 41, 10,123,
+ 10, 9,111,117,116,110,111,114,109, 97,108, 32, 61, 32,118,101, 99, 51, 40, 45,110,111,114,109, 97,108, 46,120, 44, 32, 45,110,
+111,114,109, 97,108, 46,121, 44, 32,110,111,114,109, 97,108, 46,122, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120,
+ 95,110,115,112, 97, 99,101, 95,116, 97,110,103,101,110,116, 40,118,101, 99, 52, 32,116, 97,110,103,101,110,116, 44, 32,118,101,
+ 99, 51, 32,110,111,114,109, 97,108, 44, 32,118,101, 99, 51, 32,116,101,120,110,111,114,109, 97,108, 44, 32,111,117,116, 32,118,
+101, 99, 51, 32,111,117,116,110,111,114,109, 97,108, 41, 10,123, 10, 9,118,101, 99, 51, 32, 66, 32, 61, 32,116, 97,110,103,101,
+110,116, 46,119, 32, 42, 32, 99,114,111,115,115, 40,110,111,114,109, 97,108, 44, 32,116, 97,110,103,101,110,116, 46,120,121,122,
+ 41, 59, 10, 10, 9,111,117,116,110,111,114,109, 97,108, 32, 61, 32,116,101,120,110,111,114,109, 97,108, 46,120, 42,116, 97,110,
+103,101,110,116, 46,120,121,122, 32, 43, 32,116,101,120,110,111,114,109, 97,108, 46,121, 42, 66, 32, 43, 32,116,101,120,110,111,
+114,109, 97,108, 46,122, 42,110,111,114,109, 97,108, 59, 10, 9,111,117,116,110,111,114,109, 97,108, 32, 61, 32,110,111,114,109,
+ 97,108,105,122,101, 40,111,117,116,110,111,114,109, 97,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95, 98,
+108,101,110,100, 95,110,111,114,109, 97,108, 40,102,108,111, 97,116, 32,110,111,114,102, 97, 99, 44, 32,118,101, 99, 51, 32,110,
+111,114,109, 97,108, 44, 32,118,101, 99, 51, 32,110,101,119,110,111,114,109, 97,108, 44, 32,111,117,116, 32,118,101, 99, 51, 32,
+111,117,116,110,111,114,109, 97,108, 41, 10,123, 10, 9,111,117,116,110,111,114,109, 97,108, 32, 61, 32, 40, 49, 46, 48, 32, 45,
+ 32,110,111,114,102, 97, 99, 41, 42,110,111,114,109, 97,108, 32, 43, 32,110,111,114,102, 97, 99, 42,110,101,119,110,111,114,109,
+ 97,108, 59, 10, 9,111,117,116,110,111,114,109, 97,108, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40,111,117,116,110,111,
+114,109, 97,108, 41, 59, 10,125, 10, 10, 47, 42, 42, 42, 42, 42, 42, 42, 32, 77, 65, 84, 69, 82, 73, 65, 76, 32, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 47, 10, 10,118,111,105,100, 32,108, 97,109,112, 95,118,105,115,105, 98,105,108,105,116,121, 95,115,117,110,
+ 95,104,101,109,105, 40,118,101, 99, 51, 32,108, 97,109,112,118,101, 99, 44, 32,111,117,116, 32,118,101, 99, 51, 32,108,118, 44,
+ 32,111,117,116, 32,102,108,111, 97,116, 32,100,105,115,116, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,118,105,115,105,102,
+ 97, 99, 41, 10,123, 10, 9,108,118, 32, 61, 32,108, 97,109,112,118,101, 99, 59, 10, 9,100,105,115,116, 32, 61, 32, 49, 46, 48,
+ 59, 10, 9,118,105,115,105,102, 97, 99, 32, 61, 32, 49, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,108, 97,109,112, 95,118,
+105,115,105, 98,105,108,105,116,121, 95,111,116,104,101,114, 40,118,101, 99, 51, 32, 99,111, 44, 32,118,101, 99, 51, 32,108, 97,
+109,112, 99,111, 44, 32,111,117,116, 32,118,101, 99, 51, 32,108,118, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,100,105,115,
+116, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,118,105,115,105,102, 97, 99, 41, 10,123, 10, 9,108,118, 32, 61, 32, 99,111,
+ 32, 45, 32,108, 97,109,112, 99,111, 59, 10, 9,100,105,115,116, 32, 61, 32,108,101,110,103,116,104, 40,108,118, 41, 59, 10, 9,
+108,118, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40,108,118, 41, 59, 10, 9,118,105,115,105,102, 97, 99, 32, 61, 32, 49,
+ 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,108, 97,109,112, 95,102, 97,108,108,111,102,102, 95,105,110,118,108,105,110,101,
+ 97,114, 40,102,108,111, 97,116, 32,108, 97,109,112,100,105,115,116, 44, 32,102,108,111, 97,116, 32,100,105,115,116, 44, 32,111,
+117,116, 32,102,108,111, 97,116, 32,118,105,115,105,102, 97, 99, 41, 10,123, 10, 9,118,105,115,105,102, 97, 99, 32, 61, 32,108,
+ 97,109,112,100,105,115,116, 47, 40,108, 97,109,112,100,105,115,116, 32, 43, 32,100,105,115,116, 41, 59, 10,125, 10, 10,118,111,
+105,100, 32,108, 97,109,112, 95,102, 97,108,108,111,102,102, 95,105,110,118,115,113,117, 97,114,101, 40,102,108,111, 97,116, 32,
+108, 97,109,112,100,105,115,116, 44, 32,102,108,111, 97,116, 32,100,105,115,116, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,
+118,105,115,105,102, 97, 99, 41, 10,123, 10, 9,118,105,115,105,102, 97, 99, 32, 61, 32,108, 97,109,112,100,105,115,116, 47, 40,
+108, 97,109,112,100,105,115,116, 32, 43, 32,100,105,115,116, 42,100,105,115,116, 41, 59, 10,125, 10, 10,118,111,105,100, 32,108,
+ 97,109,112, 95,102, 97,108,108,111,102,102, 95,115,108,105,100,101,114,115, 40,102,108,111, 97,116, 32,108, 97,109,112,100,105,
+115,116, 44, 32,102,108,111, 97,116, 32,108,100, 49, 44, 32,102,108,111, 97,116, 32,108,100, 50, 44, 32,102,108,111, 97,116, 32,
+100,105,115,116, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,118,105,115,105,102, 97, 99, 41, 10,123, 10, 9,102,108,111, 97,
+116, 32,108, 97,109,112,100,105,115,116,107,119, 32, 61, 32,108, 97,109,112,100,105,115,116, 42,108, 97,109,112,100,105,115,116,
+ 59, 10, 10, 9,118,105,115,105,102, 97, 99, 32, 61, 32,108, 97,109,112,100,105,115,116, 47, 40,108, 97,109,112,100,105,115,116,
+ 32, 43, 32,108,100, 49, 42,100,105,115,116, 41, 59, 10, 9,118,105,115,105,102, 97, 99, 32, 42, 61, 32,108, 97,109,112,100,105,
+115,116,107,119, 47, 40,108, 97,109,112,100,105,115,116,107,119, 32, 43, 32,108,100, 50, 42,100,105,115,116, 42,100,105,115,116,
+ 41, 59, 10,125, 10, 10,118,111,105,100, 32,108, 97,109,112, 95,102, 97,108,108,111,102,102, 95, 99,117,114,118,101, 40,102,108,
+111, 97,116, 32,108, 97,109,112,100,105,115,116, 44, 32,115, 97,109,112,108,101,114, 50, 68, 32, 99,117,114,118,101,109, 97,112,
+ 44, 32,102,108,111, 97,116, 32,100,105,115,116, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,118,105,115,105,102, 97, 99, 41,
+ 10,123, 10, 9,118,105,115,105,102, 97, 99, 32, 61, 32,116,101,120,116,117,114,101, 50, 68, 40, 99,117,114,118,101,109, 97,112,
+ 44, 32,118,101, 99, 50, 40,100,105,115,116, 47,108, 97,109,112,100,105,115,116, 44, 32, 48, 46, 48, 41, 41, 46,120, 59, 10,125,
+ 10, 10,118,111,105,100, 32,108, 97,109,112, 95,118,105,115,105, 98,105,108,105,116,121, 95,115,112,104,101,114,101, 40,102,108,
+111, 97,116, 32,108, 97,109,112,100,105,115,116, 44, 32,102,108,111, 97,116, 32,100,105,115,116, 44, 32,102,108,111, 97,116, 32,
+118,105,115,105,102, 97, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118,105,115,105,102, 97, 99, 41, 10,123,
+ 10, 9,102,108,111, 97,116, 32,116, 61, 32,108, 97,109,112,100,105,115,116, 32, 45, 32,100,105,115,116, 59, 10, 10, 9,111,117,
+116,118,105,115,105,102, 97, 99, 61, 32,118,105,115,105,102, 97, 99, 42,109, 97,120, 40,116, 44, 32, 48, 46, 48, 41, 47,108, 97,
+109,112,100,105,115,116, 59, 10,125, 10, 10,118,111,105,100, 32,108, 97,109,112, 95,118,105,115,105, 98,105,108,105,116,121, 95,
+115,112,111,116, 95,115,113,117, 97,114,101, 40,118,101, 99, 51, 32,108, 97,109,112,118,101, 99, 44, 32,109, 97,116, 52, 32,108,
+ 97,109,112,105,109, 97,116, 44, 32,118,101, 99, 51, 32,108,118, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,105,110,112,114,
+ 41, 10,123, 10, 9,105,102, 40,100,111,116, 40,108,118, 44, 32,108, 97,109,112,118,101, 99, 41, 32, 62, 32, 48, 46, 48, 41, 32,
+123, 10, 9, 9,118,101, 99, 51, 32,108,118,114,111,116, 32, 61, 32, 40,108, 97,109,112,105,109, 97,116, 42,118,101, 99, 52, 40,
+108,118, 44, 32, 48, 46, 48, 41, 41, 46,120,121,122, 59, 10, 9, 9,102,108,111, 97,116, 32,120, 32, 61, 32,109, 97,120, 40, 97,
+ 98,115, 40,108,118,114,111,116, 46,120, 47,108,118,114,111,116, 46,122, 41, 44, 32, 97, 98,115, 40,108,118,114,111,116, 46,121,
+ 47,108,118,114,111,116, 46,122, 41, 41, 59, 10, 10, 9, 9,105,110,112,114, 32, 61, 32, 49, 46, 48, 47,115,113,114,116, 40, 49,
+ 46, 48, 32, 43, 32,120, 42,120, 41, 59, 10, 9,125, 10, 9,101,108,115,101, 10, 9, 9,105,110,112,114, 32, 61, 32, 48, 46, 48,
+ 59, 10,125, 10, 10,118,111,105,100, 32,108, 97,109,112, 95,118,105,115,105, 98,105,108,105,116,121, 95,115,112,111,116, 95, 99,
+105,114, 99,108,101, 40,118,101, 99, 51, 32,108, 97,109,112,118,101, 99, 44, 32,118,101, 99, 51, 32,108,118, 44, 32,111,117,116,
+ 32,102,108,111, 97,116, 32,105,110,112,114, 41, 10,123, 10, 9,105,110,112,114, 32, 61, 32,100,111,116, 40,108,118, 44, 32,108,
+ 97,109,112,118,101, 99, 41, 59, 10,125, 10, 10,118,111,105,100, 32,108, 97,109,112, 95,118,105,115,105, 98,105,108,105,116,121,
+ 95,115,112,111,116, 40,102,108,111, 97,116, 32,115,112,111,116,115,105, 44, 32,102,108,111, 97,116, 32,115,112,111,116, 98,108,
+ 44, 32,102,108,111, 97,116, 32,105,110,112,114, 44, 32,102,108,111, 97,116, 32,118,105,115,105,102, 97, 99, 44, 32,111,117,116,
+ 32,102,108,111, 97,116, 32,111,117,116,118,105,115,105,102, 97, 99, 41, 10,123, 10, 9,102,108,111, 97,116, 32,116, 32, 61, 32,
+115,112,111,116,115,105, 59, 10, 10, 9,105,102, 40,105,110,112,114, 32, 60, 61, 32,116, 41, 32,123, 10, 9, 9,111,117,116,118,
+105,115,105,102, 97, 99, 32, 61, 32, 48, 46, 48, 59, 10, 9,125, 10, 9,101,108,115,101, 32,123, 10, 9, 9,116, 32, 61, 32,105,
+110,112,114, 32, 45, 32,116, 59, 10, 10, 9, 9, 47, 42, 32,115,111,102,116, 32, 97,114,101, 97, 32, 42, 47, 10, 9, 9,105,102,
+ 40,115,112,111,116, 98,108, 32, 33, 61, 32, 48, 46, 48, 41, 10, 9, 9, 9,105,110,112,114, 32, 42, 61, 32,115,109,111,111,116,
+104,115,116,101,112, 40, 48, 46, 48, 44, 32, 49, 46, 48, 44, 32,116, 47,115,112,111,116, 98,108, 41, 59, 10, 10, 9, 9,111,117,
+116,118,105,115,105,102, 97, 99, 32, 61, 32,118,105,115,105,102, 97, 99, 42,105,110,112,114, 59, 10, 9,125, 10,125, 10, 10,118,
+111,105,100, 32,108, 97,109,112, 95,118,105,115,105, 98,105,108,105,116,121, 95, 99,108, 97,109,112, 40,102,108,111, 97,116, 32,
+118,105,115,105,102, 97, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118,105,115,105,102, 97, 99, 41, 10,123,
+ 10, 9,111,117,116,118,105,115,105,102, 97, 99, 32, 61, 32, 40,118,105,115,105,102, 97, 99, 32, 60, 32, 48, 46, 48, 48, 49, 41,
+ 63, 32, 48, 46, 48, 58, 32,118,105,115,105,102, 97, 99, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,118,105,
+101,119, 40,118,101, 99, 51, 32, 99,111, 44, 32,111,117,116, 32,118,101, 99, 51, 32,118,105,101,119, 41, 10,123, 10, 9, 47, 42,
+ 32,104, 97,110,100,108,101, 32,112,101,114,115,112,101, 99,116,105,118,101, 47,111,114,116,104,111,103,114, 97,112,104,105, 99,
+ 32, 42, 47, 10, 9,118,105,101,119, 32, 61, 32, 40,103,108, 95, 80,114,111,106,101, 99,116,105,111,110, 77, 97,116,114,105,120,
+ 91, 51, 93, 91, 51, 93, 32, 61, 61, 32, 48, 46, 48, 41, 63, 32,110,111,114,109, 97,108,105,122,101, 40, 99,111, 41, 58, 32,118,
+101, 99, 51, 40, 48, 46, 48, 44, 32, 48, 46, 48, 44, 32, 45, 49, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,
+100,101, 95,116, 97,110,103,101,110,116, 95,118, 40,118,101, 99, 51, 32,108,118, 44, 32,118,101, 99, 51, 32,116, 97,110,103, 44,
+ 32,111,117,116, 32,118,101, 99, 51, 32,118,110, 41, 10,123, 10, 9,118,101, 99, 51, 32, 99, 32, 61, 32, 99,114,111,115,115, 40,
+108,118, 44, 32,116, 97,110,103, 41, 59, 10, 9,118,101, 99, 51, 32,118,110,111,114, 32, 61, 32, 99,114,111,115,115, 40, 99, 44,
+ 32,116, 97,110,103, 41, 59, 10, 10, 9,118,110, 32, 61, 32, 45,110,111,114,109, 97,108,105,122,101, 40,118,110,111,114, 41, 59,
+ 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,105,110,112, 40,118,101, 99, 51, 32,118,110, 44, 32,118,101, 99, 51,
+ 32,108,118, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,105,110,112, 41, 10,123, 10, 9,105,110,112, 32, 61, 32,100,111,116,
+ 40,118,110, 44, 32,108,118, 41, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,105,115, 95,110,111, 95,100,105,
+102,102,117,115,101, 40,111,117,116, 32,102,108,111, 97,116, 32,105,115, 41, 10,123, 10, 9,105,115, 32, 61, 32, 48, 46, 48, 59,
+ 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,105,115, 95,104,101,109,105, 40,102,108,111, 97,116, 32,105,110,112,
+ 44, 32,111,117,116, 32,102,108,111, 97,116, 32,105,115, 41, 10,123, 10, 9,105,115, 32, 61, 32, 48, 46, 53, 42,105,110,112, 32,
+ 43, 32, 48, 46, 53, 59, 10,125, 10, 10,102,108,111, 97,116, 32, 97,114,101, 97, 95,108, 97,109,112, 95,101,110,101,114,103,121,
+ 40,109, 97,116, 52, 32, 97,114,101, 97, 44, 32,118,101, 99, 51, 32, 99,111, 44, 32,118,101, 99, 51, 32,118,110, 41, 10,123, 10,
+ 9,118,101, 99, 51, 32,118,101, 99, 91, 52, 93, 44, 32, 99, 91, 52, 93, 59, 10, 9,102,108,111, 97,116, 32,114, 97,100, 91, 52,
+ 93, 44, 32,102, 97, 99, 59, 10, 9, 10, 9,118,101, 99, 91, 48, 93, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40, 99,111,
+ 32, 45, 32, 97,114,101, 97, 91, 48, 93, 46,120,121,122, 41, 59, 10, 9,118,101, 99, 91, 49, 93, 32, 61, 32,110,111,114,109, 97,
+108,105,122,101, 40, 99,111, 32, 45, 32, 97,114,101, 97, 91, 49, 93, 46,120,121,122, 41, 59, 10, 9,118,101, 99, 91, 50, 93, 32,
+ 61, 32,110,111,114,109, 97,108,105,122,101, 40, 99,111, 32, 45, 32, 97,114,101, 97, 91, 50, 93, 46,120,121,122, 41, 59, 10, 9,
+118,101, 99, 91, 51, 93, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40, 99,111, 32, 45, 32, 97,114,101, 97, 91, 51, 93, 46,
+120,121,122, 41, 59, 10, 10, 9, 99, 91, 48, 93, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40, 99,114,111,115,115, 40,118,
+101, 99, 91, 48, 93, 44, 32,118,101, 99, 91, 49, 93, 41, 41, 59, 10, 9, 99, 91, 49, 93, 32, 61, 32,110,111,114,109, 97,108,105,
+122,101, 40, 99,114,111,115,115, 40,118,101, 99, 91, 49, 93, 44, 32,118,101, 99, 91, 50, 93, 41, 41, 59, 10, 9, 99, 91, 50, 93,
+ 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40, 99,114,111,115,115, 40,118,101, 99, 91, 50, 93, 44, 32,118,101, 99, 91, 51,
+ 93, 41, 41, 59, 10, 9, 99, 91, 51, 93, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40, 99,114,111,115,115, 40,118,101, 99,
+ 91, 51, 93, 44, 32,118,101, 99, 91, 48, 93, 41, 41, 59, 10, 10, 9,114, 97,100, 91, 48, 93, 32, 61, 32, 97, 99,111,115, 40,100,
+111,116, 40,118,101, 99, 91, 48, 93, 44, 32,118,101, 99, 91, 49, 93, 41, 41, 59, 10, 9,114, 97,100, 91, 49, 93, 32, 61, 32, 97,
+ 99,111,115, 40,100,111,116, 40,118,101, 99, 91, 49, 93, 44, 32,118,101, 99, 91, 50, 93, 41, 41, 59, 10, 9,114, 97,100, 91, 50,
+ 93, 32, 61, 32, 97, 99,111,115, 40,100,111,116, 40,118,101, 99, 91, 50, 93, 44, 32,118,101, 99, 91, 51, 93, 41, 41, 59, 10, 9,
+114, 97,100, 91, 51, 93, 32, 61, 32, 97, 99,111,115, 40,100,111,116, 40,118,101, 99, 91, 51, 93, 44, 32,118,101, 99, 91, 48, 93,
+ 41, 41, 59, 10, 10, 9,102, 97, 99, 61, 32, 32,114, 97,100, 91, 48, 93, 42,100,111,116, 40,118,110, 44, 32, 99, 91, 48, 93, 41,
+ 59, 10, 9,102, 97, 99, 43, 61, 32,114, 97,100, 91, 49, 93, 42,100,111,116, 40,118,110, 44, 32, 99, 91, 49, 93, 41, 59, 10, 9,
+102, 97, 99, 43, 61, 32,114, 97,100, 91, 50, 93, 42,100,111,116, 40,118,110, 44, 32, 99, 91, 50, 93, 41, 59, 10, 9,102, 97, 99,
+ 43, 61, 32,114, 97,100, 91, 51, 93, 42,100,111,116, 40,118,110, 44, 32, 99, 91, 51, 93, 41, 59, 10, 10, 9,114,101,116,117,114,
+110, 32,109, 97,120, 40,102, 97, 99, 44, 32, 48, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,105,
+110,112, 95, 97,114,101, 97, 40,118,101, 99, 51, 32,112,111,115,105,116,105,111,110, 44, 32,118,101, 99, 51, 32,108, 97,109,112,
+ 99,111, 44, 32,118,101, 99, 51, 32,108, 97,109,112,118,101, 99, 44, 32,118,101, 99, 51, 32,118,110, 44, 32,109, 97,116, 52, 32,
+ 97,114,101, 97, 44, 32,102,108,111, 97,116, 32, 97,114,101, 97,115,105,122,101, 44, 32,102,108,111, 97,116, 32,107, 44, 32,111,
+117,116, 32,102,108,111, 97,116, 32,105,110,112, 41, 10,123, 10, 9,118,101, 99, 51, 32, 99,111, 32, 61, 32,112,111,115,105,116,
+105,111,110, 59, 10, 9,118,101, 99, 51, 32,118,101, 99, 32, 61, 32, 99,111, 32, 45, 32,108, 97,109,112, 99,111, 59, 10, 10, 9,
+105,102, 40,100,111,116, 40,118,101, 99, 44, 32,108, 97,109,112,118,101, 99, 41, 32, 60, 32, 48, 46, 48, 41, 32,123, 10, 9, 9,
+105,110,112, 32, 61, 32, 48, 46, 48, 59, 10, 9,125, 10, 9,101,108,115,101, 32,123, 10, 9, 9,102,108,111, 97,116, 32,105,110,
+116,101,110,115, 32, 61, 32, 97,114,101, 97, 95,108, 97,109,112, 95,101,110,101,114,103,121, 40, 97,114,101, 97, 44, 32, 99,111,
+ 44, 32,118,110, 41, 59, 10, 10, 9, 9,105,110,112, 32, 61, 32,112,111,119, 40,105,110,116,101,110,115, 42, 97,114,101, 97,115,
+105,122,101, 44, 32,107, 41, 59, 10, 9,125, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,100,105,102,102,117,115,
+101, 95,111,114,101,110, 95,110, 97,121,101,114, 40,102,108,111, 97,116, 32,110,108, 44, 32,118,101, 99, 51, 32,110, 44, 32,118,
+101, 99, 51, 32,108, 44, 32,118,101, 99, 51, 32,118, 44, 32,102,108,111, 97,116, 32,114,111,117,103,104, 44, 32,111,117,116, 32,
+102,108,111, 97,116, 32,105,115, 41, 10,123, 10, 9,118,101, 99, 51, 32,104, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40,
+118, 32, 43, 32,108, 41, 59, 10, 9,102,108,111, 97,116, 32,110,104, 32, 61, 32,109, 97,120, 40,100,111,116, 40,110, 44, 32,104,
+ 41, 44, 32, 48, 46, 48, 41, 59, 10, 9,102,108,111, 97,116, 32,110,118, 32, 61, 32,109, 97,120, 40,100,111,116, 40,110, 44, 32,
+118, 41, 44, 32, 48, 46, 48, 41, 59, 10, 9,102,108,111, 97,116, 32,114,101, 97,108,110,108, 32, 61, 32,100,111,116, 40,110, 44,
+ 32,108, 41, 59, 10, 10, 9,105,102, 40,114,101, 97,108,110,108, 32, 60, 32, 48, 46, 48, 41, 32,123, 10, 9, 9,105,115, 32, 61,
+ 32, 48, 46, 48, 59, 10, 9,125, 10, 9,101,108,115,101, 32,105,102, 40,110,108, 32, 60, 32, 48, 46, 48, 41, 32,123, 10, 9, 9,
+105,115, 32, 61, 32, 48, 46, 48, 59, 10, 9,125, 10, 9,101,108,115,101, 32,123, 10, 9, 9,102,108,111, 97,116, 32,118,104, 32,
+ 61, 32,109, 97,120, 40,100,111,116, 40,118, 44, 32,104, 41, 44, 32, 48, 46, 48, 41, 59, 10, 9, 9,102,108,111, 97,116, 32, 76,
+105,116, 95, 65, 32, 61, 32, 97, 99,111,115, 40,114,101, 97,108,110,108, 41, 59, 10, 9, 9,102,108,111, 97,116, 32, 86,105,101,
+119, 95, 65, 32, 61, 32, 97, 99,111,115, 40,110,118, 41, 59, 10, 10, 9, 9,118,101, 99, 51, 32, 76,105,116, 95, 66, 32, 61, 32,
+110,111,114,109, 97,108,105,122,101, 40,108, 32, 45, 32,114,101, 97,108,110,108, 42,110, 41, 59, 10, 9, 9,118,101, 99, 51, 32,
+ 86,105,101,119, 95, 66, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40,118, 32, 45, 32,110,118, 42,110, 41, 59, 10, 10, 9,
+ 9,102,108,111, 97,116, 32,116, 32, 61, 32,109, 97,120, 40,100,111,116, 40, 76,105,116, 95, 66, 44, 32, 86,105,101,119, 95, 66,
+ 41, 44, 32, 48, 46, 48, 41, 59, 10, 10, 9, 9,102,108,111, 97,116, 32, 97, 44, 32, 98, 59, 10, 10, 9, 9,105,102, 40, 76,105,
+116, 95, 65, 32, 62, 32, 86,105,101,119, 95, 65, 41, 32,123, 10, 9, 9, 9, 97, 32, 61, 32, 76,105,116, 95, 65, 59, 10, 9, 9,
+ 9, 98, 32, 61, 32, 86,105,101,119, 95, 65, 59, 10, 9, 9,125, 10, 9, 9,101,108,115,101, 32,123, 10, 9, 9, 9, 97, 32, 61,
+ 32, 86,105,101,119, 95, 65, 59, 10, 9, 9, 9, 98, 32, 61, 32, 76,105,116, 95, 65, 59, 10, 9, 9,125, 10, 10, 9, 9,102,108,
+111, 97,116, 32, 65, 32, 61, 32, 49, 46, 48, 32, 45, 32, 40, 48, 46, 53, 42, 40, 40,114,111,117,103,104, 42,114,111,117,103,104,
+ 41, 47, 40, 40,114,111,117,103,104, 42,114,111,117,103,104, 41, 32, 43, 32, 48, 46, 51, 51, 41, 41, 41, 59, 10, 9, 9,102,108,
+111, 97,116, 32, 66, 32, 61, 32, 48, 46, 52, 53, 42, 40, 40,114,111,117,103,104, 42,114,111,117,103,104, 41, 47, 40, 40,114,111,
+117,103,104, 42,114,111,117,103,104, 41, 32, 43, 32, 48, 46, 48, 57, 41, 41, 59, 10, 10, 9, 9, 98, 32, 42, 61, 32, 48, 46, 57,
+ 53, 59, 10, 9, 9,105,115, 32, 61, 32,110,108, 42, 40, 65, 32, 43, 32, 40, 66, 32, 42, 32,116, 32, 42, 32,115,105,110, 40, 97,
+ 41, 32, 42, 32,116, 97,110, 40, 98, 41, 41, 41, 59, 10, 9,125, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,100,
+105,102,102,117,115,101, 95,116,111,111,110, 40,118,101, 99, 51, 32,110, 44, 32,118,101, 99, 51, 32,108, 44, 32,118,101, 99, 51,
+ 32,118, 44, 32,102,108,111, 97,116, 32,115,105,122,101, 44, 32,102,108,111, 97,116, 32,116,115,109,111,111,116,104, 44, 32,111,
+117,116, 32,102,108,111, 97,116, 32,105,115, 41, 10,123, 10, 9,102,108,111, 97,116, 32,114,115,108,116, 32, 61, 32,100,111,116,
+ 40,110, 44, 32,108, 41, 59, 10, 9,102,108,111, 97,116, 32, 97,110,103, 32, 61, 32, 97, 99,111,115, 40,114,115,108,116, 41, 59,
+ 10, 10, 9,105,102, 40, 97,110,103, 32, 60, 32,115,105,122,101, 41, 32,105,115, 32, 61, 32, 49, 46, 48, 59, 10, 9,101,108,115,
+101, 32,105,102, 40, 97,110,103, 32, 62, 32, 40,115,105,122,101, 32, 43, 32,116,115,109,111,111,116,104, 41, 32,124,124, 32,116,
+115,109,111,111,116,104, 32, 61, 61, 32, 48, 46, 48, 41, 32,105,115, 32, 61, 32, 48, 46, 48, 59, 10, 9,101,108,115,101, 32,105,
+115, 32, 61, 32, 49, 46, 48, 32, 45, 32, 40, 40, 97,110,103, 32, 45, 32,115,105,122,101, 41, 47,116,115,109,111,111,116,104, 41,
+ 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,100,105,102,102,117,115,101, 95,109,105,110,110, 97,101,114,116,
+ 40,102,108,111, 97,116, 32,110,108, 44, 32,118,101, 99, 51, 32,110, 44, 32,118,101, 99, 51, 32,118, 44, 32,102,108,111, 97,116,
+ 32,100, 97,114,107,110,101,115,115, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,105,115, 41, 10,123, 10, 9,105,102, 40,110,
+108, 32, 60, 61, 32, 48, 46, 48, 41, 32,123, 10, 9, 9,105,115, 32, 61, 32, 48, 46, 48, 59, 10, 9,125, 10, 9,101,108,115,101,
+ 32,123, 10, 9, 9,102,108,111, 97,116, 32,110,118, 32, 61, 32,109, 97,120, 40,100,111,116, 40,110, 44, 32,118, 41, 44, 32, 48,
+ 46, 48, 41, 59, 10, 10, 9, 9,105,102, 40,100, 97,114,107,110,101,115,115, 32, 60, 61, 32, 49, 46, 48, 41, 10, 9, 9, 9,105,
+115, 32, 61, 32,110,108, 42,112,111,119, 40,109, 97,120, 40,110,118, 42,110,108, 44, 32, 48, 46, 49, 41, 44, 32,100, 97,114,107,
+110,101,115,115, 32, 45, 32, 49, 46, 48, 41, 59, 10, 9, 9,101,108,115,101, 10, 9, 9, 9,105,115, 32, 61, 32,110,108, 42,112,
+111,119, 40, 49, 46, 48, 48, 48, 49, 32, 45, 32,110,118, 44, 32,100, 97,114,107,110,101,115,115, 32, 45, 32, 49, 46, 48, 41, 59,
+ 10, 9,125, 10,125, 10, 10,102,108,111, 97,116, 32,102,114,101,115,110,101,108, 95,102, 97, 99, 40,118,101, 99, 51, 32,118,105,
+101,119, 44, 32,118,101, 99, 51, 32,118,110, 44, 32,102,108,111, 97,116, 32,103,114, 97,100, 44, 32,102,108,111, 97,116, 32,102,
+ 97, 99, 41, 10,123, 10, 9,102,108,111, 97,116, 32,116, 49, 44, 32,116, 50, 59, 10, 9,102,108,111, 97,116, 32,102,102, 97, 99,
+ 59, 10, 10, 9,105,102, 40,102, 97, 99, 61, 61, 48, 46, 48, 41, 32,123, 10, 9, 9,102,102, 97, 99, 32, 61, 32, 49, 46, 48, 59,
+ 10, 9,125, 10, 9,101,108,115,101, 32,123, 10, 9, 9,116, 49, 61, 32,100,111,116, 40,118,105,101,119, 44, 32,118,110, 41, 59,
+ 10, 9, 9,105,102, 40,116, 49, 62, 48, 46, 48, 41, 32, 32,116, 50, 61, 32, 49, 46, 48, 43,116, 49, 59, 10, 9, 9,101,108,115,
+101, 32,116, 50, 61, 32, 49, 46, 48, 45,116, 49, 59, 10, 10, 9, 9,116, 50, 61, 32,103,114, 97,100, 32, 43, 32, 40, 49, 46, 48,
+ 45,103,114, 97,100, 41, 42,112,111,119, 40,116, 50, 44, 32,102, 97, 99, 41, 59, 10, 10, 9, 9,105,102, 40,116, 50, 60, 48, 46,
+ 48, 41, 32,102,102, 97, 99, 32, 61, 32, 48, 46, 48, 59, 10, 9, 9,101,108,115,101, 32,105,102, 40,116, 50, 62, 49, 46, 48, 41,
+ 32,102,102, 97, 99, 32, 61, 32, 49, 46, 48, 59, 10, 9, 9,101,108,115,101, 32,102,102, 97, 99, 32, 61, 32,116, 50, 59, 10, 9,
+125, 10, 10, 9,114,101,116,117,114,110, 32,102,102, 97, 99, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,100,
+105,102,102,117,115,101, 95,102,114,101,115,110,101,108, 40,118,101, 99, 51, 32,118,110, 44, 32,118,101, 99, 51, 32,108,118, 44,
+ 32,118,101, 99, 51, 32,118,105,101,119, 44, 32,102,108,111, 97,116, 32,102, 97, 99, 95,105, 44, 32,102,108,111, 97,116, 32,102,
+ 97, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,105,115, 41, 10,123, 10, 9,105,115, 32, 61, 32,102,114,101,115,110,101,
+108, 95,102, 97, 99, 40,108,118, 44, 32,118,110, 44, 32,102, 97, 99, 95,105, 44, 32,102, 97, 99, 41, 59, 10,125, 10, 10,118,111,
+105,100, 32,115,104, 97,100,101, 95, 99,117, 98,105, 99, 40,102,108,111, 97,116, 32,105,115, 44, 32,111,117,116, 32,102,108,111,
+ 97,116, 32,111,117,116,105,115, 41, 10,123, 10, 9,105,102, 40,105,115, 62, 48, 46, 48, 32, 38, 38, 32,105,115, 60, 49, 46, 48,
+ 41, 10, 9, 9,111,117,116,105,115, 61, 32,115,109,111,111,116,104,115,116,101,112, 40, 48, 46, 48, 44, 32, 49, 46, 48, 44, 32,
+105,115, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116,105,115, 61, 32,105,115, 59, 10,125, 10, 10,118,111,105,100, 32,
+115,104, 97,100,101, 95,118,105,115,105,102, 97, 99, 40,102,108,111, 97,116, 32,105, 44, 32,102,108,111, 97,116, 32,118,105,115,
+105,102, 97, 99, 44, 32,102,108,111, 97,116, 32,114,101,102,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,105,
+ 41, 10,123, 10, 9, 47, 42,105,102, 40,105, 32, 62, 32, 48, 46, 48, 41, 42, 47, 10, 9, 9,111,117,116,105, 32, 61, 32,109, 97,
+120, 40,105, 42,118,105,115,105,102, 97, 99, 42,114,101,102,108, 44, 32, 48, 46, 48, 41, 59, 10, 9, 47, 42,101,108,115,101, 10,
+ 9, 9,111,117,116,105, 32, 61, 32,105, 59, 42, 47, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,116, 97,110,103,
+101,110,116, 95,118, 95,115,112,101, 99, 40,118,101, 99, 51, 32,116, 97,110,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,118,
+110, 41, 10,123, 10, 9,118,110, 32, 61, 32,116, 97,110,103, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95, 97,
+100,100, 95,116,111, 95,100,105,102,102,117,115,101, 40,102,108,111, 97,116, 32,105, 44, 32,118,101, 99, 51, 32,108, 97,109,112,
+ 99,111,108, 44, 32,118,101, 99, 51, 32, 99,111,108, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116, 99,111,108, 41, 10,
+123, 10, 9,105,102, 40,105, 32, 62, 32, 48, 46, 48, 41, 10, 9, 9,111,117,116, 99,111,108, 32, 61, 32,105, 42,108, 97,109,112,
+ 99,111,108, 42, 99,111,108, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116, 99,111,108, 32, 61, 32,118,101, 99, 51, 40, 48,
+ 46, 48, 44, 32, 48, 46, 48, 44, 32, 48, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,104,101,109,
+105, 95,115,112,101, 99, 40,118,101, 99, 51, 32,118,110, 44, 32,118,101, 99, 51, 32,108,118, 44, 32,118,101, 99, 51, 32,118,105,
+101,119, 44, 32,102,108,111, 97,116, 32,115,112,101, 99, 44, 32,102,108,111, 97,116, 32,104, 97,114,100, 44, 32,102,108,111, 97,
+116, 32,118,105,115,105,102, 97, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,116, 41, 10,123, 10, 9,108,118, 32, 43, 61,
+ 32,118,105,101,119, 59, 10, 9,108,118, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40,108,118, 41, 59, 10, 10, 9,116, 32,
+ 61, 32,100,111,116, 40,118,110, 44, 32,108,118, 41, 59, 10, 9,116, 32, 61, 32, 48, 46, 53, 42,116, 32, 43, 32, 48, 46, 53, 59,
+ 10, 10, 9,116, 32, 61, 32,118,105,115,105,102, 97, 99, 42,115,112,101, 99, 42,112,111,119, 40,116, 44, 32,104, 97,114,100, 41,
+ 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,112,104,111,110,103, 95,115,112,101, 99, 40,118,101, 99, 51, 32,
+110, 44, 32,118,101, 99, 51, 32,108, 44, 32,118,101, 99, 51, 32,118, 44, 32,102,108,111, 97,116, 32,104, 97,114,100, 44, 32,111,
+117,116, 32,102,108,111, 97,116, 32,115,112,101, 99,102, 97, 99, 41, 10,123, 10, 9,118,101, 99, 51, 32,104, 32, 61, 32,110,111,
+114,109, 97,108,105,122,101, 40,108, 32, 43, 32,118, 41, 59, 10, 9,102,108,111, 97,116, 32,114,115,108,116, 32, 61, 32,109, 97,
+120, 40,100,111,116, 40,104, 44, 32,110, 41, 44, 32, 48, 46, 48, 41, 59, 10, 10, 9,115,112,101, 99,102, 97, 99, 32, 61, 32,112,
+111,119, 40,114,115,108,116, 44, 32,104, 97,114,100, 41, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95, 99,111,
+111,107,116,111,114,114, 95,115,112,101, 99, 40,118,101, 99, 51, 32,110, 44, 32,118,101, 99, 51, 32,108, 44, 32,118,101, 99, 51,
+ 32,118, 44, 32,102,108,111, 97,116, 32,104, 97,114,100, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,115,112,101, 99,102, 97,
+ 99, 41, 10,123, 10, 9,118,101, 99, 51, 32,104, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40,118, 32, 43, 32,108, 41, 59,
+ 10, 9,102,108,111, 97,116, 32,110,104, 32, 61, 32,100,111,116, 40,110, 44, 32,104, 41, 59, 10, 10, 9,105,102, 40,110,104, 32,
+ 60, 32, 48, 46, 48, 41, 32,123, 10, 9, 9,115,112,101, 99,102, 97, 99, 32, 61, 32, 48, 46, 48, 59, 10, 9,125, 10, 9,101,108,
+115,101, 32,123, 10, 9, 9,102,108,111, 97,116, 32,110,118, 32, 61, 32,109, 97,120, 40,100,111,116, 40,110, 44, 32,118, 41, 44,
+ 32, 48, 46, 48, 41, 59, 10, 9, 9,102,108,111, 97,116, 32,105, 32, 61, 32,112,111,119, 40,110,104, 44, 32,104, 97,114,100, 41,
+ 59, 10, 10, 9, 9,105, 32, 61, 32,105, 47, 40, 48, 46, 49, 43,110,118, 41, 59, 10, 9, 9,115,112,101, 99,102, 97, 99, 32, 61,
+ 32,105, 59, 10, 9,125, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95, 98,108,105,110,110, 95,115,112,101, 99, 40,
+118,101, 99, 51, 32,110, 44, 32,118,101, 99, 51, 32,108, 44, 32,118,101, 99, 51, 32,118, 44, 32,102,108,111, 97,116, 32,114,101,
+102,114, 97, 99, 44, 32,102,108,111, 97,116, 32,115,112,101, 99, 95,112,111,119,101,114, 44, 32,111,117,116, 32,102,108,111, 97,
+116, 32,115,112,101, 99,102, 97, 99, 41, 10,123, 10, 9,105,102, 40,114,101,102,114, 97, 99, 32, 60, 32, 49, 46, 48, 41, 32,123,
+ 10, 9, 9,115,112,101, 99,102, 97, 99, 32, 61, 32, 48, 46, 48, 59, 10, 9,125, 10, 9,101,108,115,101, 32,105,102, 40,115,112,
+101, 99, 95,112,111,119,101,114, 32, 61, 61, 32, 48, 46, 48, 41, 32,123, 10, 9, 9,115,112,101, 99,102, 97, 99, 32, 61, 32, 48,
+ 46, 48, 59, 10, 9,125, 10, 9,101,108,115,101, 32,123, 10, 9, 9,105,102, 40,115,112,101, 99, 95,112,111,119,101,114, 60, 49,
+ 48, 48, 46, 48, 41, 10, 9, 9, 9,115,112,101, 99, 95,112,111,119,101,114, 61, 32,115,113,114,116, 40, 49, 46, 48, 47,115,112,
+101, 99, 95,112,111,119,101,114, 41, 59, 10, 9, 9,101,108,115,101, 10, 9, 9, 9,115,112,101, 99, 95,112,111,119,101,114, 61,
+ 32, 49, 48, 46, 48, 47,115,112,101, 99, 95,112,111,119,101,114, 59, 10, 10, 9, 9,118,101, 99, 51, 32,104, 32, 61, 32,110,111,
+114,109, 97,108,105,122,101, 40,118, 32, 43, 32,108, 41, 59, 10, 9, 9,102,108,111, 97,116, 32,110,104, 32, 61, 32,100,111,116,
+ 40,110, 44, 32,104, 41, 59, 10, 9, 9,105,102, 40,110,104, 32, 60, 32, 48, 46, 48, 41, 32,123, 10, 9, 9, 9,115,112,101, 99,
+102, 97, 99, 32, 61, 32, 48, 46, 48, 59, 10, 9, 9,125, 10, 9, 9,101,108,115,101, 32,123, 10, 9, 9, 9,102,108,111, 97,116,
+ 32,110,118, 32, 61, 32,109, 97,120, 40,100,111,116, 40,110, 44, 32,118, 41, 44, 32, 48, 46, 48, 49, 41, 59, 10, 9, 9, 9,102,
+108,111, 97,116, 32,110,108, 32, 61, 32,100,111,116, 40,110, 44, 32,108, 41, 59, 10, 9, 9, 9,105,102, 40,110,108, 32, 60, 61,
+ 32, 48, 46, 48, 49, 41, 32,123, 10, 9, 9, 9, 9,115,112,101, 99,102, 97, 99, 32, 61, 32, 48, 46, 48, 59, 10, 9, 9, 9,125,
+ 10, 9, 9, 9,101,108,115,101, 32,123, 10, 9, 9, 9, 9,102,108,111, 97,116, 32,118,104, 32, 61, 32,109, 97,120, 40,100,111,
+116, 40,118, 44, 32,104, 41, 44, 32, 48, 46, 48, 49, 41, 59, 10, 10, 9, 9, 9, 9,102,108,111, 97,116, 32, 97, 32, 61, 32, 49,
+ 46, 48, 59, 10, 9, 9, 9, 9,102,108,111, 97,116, 32, 98, 32, 61, 32, 40, 50, 46, 48, 42,110,104, 42,110,118, 41, 47,118,104,
+ 59, 10, 9, 9, 9, 9,102,108,111, 97,116, 32, 99, 32, 61, 32, 40, 50, 46, 48, 42,110,104, 42,110,108, 41, 47,118,104, 59, 10,
+ 10, 9, 9, 9, 9,102,108,111, 97,116, 32,103, 32, 61, 32, 48, 46, 48, 59, 10, 10, 9, 9, 9, 9,105,102, 40, 97, 32, 60, 32,
+ 98, 32, 38, 38, 32, 97, 32, 60, 32, 99, 41, 32,103, 32, 61, 32, 97, 59, 10, 9, 9, 9, 9,101,108,115,101, 32,105,102, 40, 98,
+ 32, 60, 32, 97, 32, 38, 38, 32, 98, 32, 60, 32, 99, 41, 32,103, 32, 61, 32, 98, 59, 10, 9, 9, 9, 9,101,108,115,101, 32,105,
+102, 40, 99, 32, 60, 32, 97, 32, 38, 38, 32, 99, 32, 60, 32, 98, 41, 32,103, 32, 61, 32, 99, 59, 10, 10, 9, 9, 9, 9,102,108,
+111, 97,116, 32,112, 32, 61, 32,115,113,114,116, 40, 40, 40,114,101,102,114, 97, 99, 32, 42, 32,114,101,102,114, 97, 99, 41, 43,
+ 40,118,104, 42,118,104, 41, 45, 49, 46, 48, 41, 41, 59, 10, 9, 9, 9, 9,102,108,111, 97,116, 32,102, 32, 61, 32, 40, 40, 40,
+112, 45,118,104, 41, 42, 40,112, 45,118,104, 41, 41, 47, 40, 40,112, 43,118,104, 41, 42, 40,112, 43,118,104, 41, 41, 41, 42, 40,
+ 49, 46, 48, 43, 40, 40, 40, 40,118,104, 42, 40,112, 43,118,104, 41, 41, 45, 49, 46, 48, 41, 42, 40, 40,118,104, 42, 40,112, 43,
+118,104, 41, 41, 45, 49, 46, 48, 41, 41, 47, 40, 40, 40,118,104, 42, 40,112, 45,118,104, 41, 41, 43, 49, 46, 48, 41, 42, 40, 40,
+118,104, 42, 40,112, 45,118,104, 41, 41, 43, 49, 46, 48, 41, 41, 41, 41, 59, 10, 9, 9, 9, 9,102,108,111, 97,116, 32, 97,110,
+103, 32, 61, 32, 97, 99,111,115, 40,110,104, 41, 59, 10, 10, 9, 9, 9, 9,115,112,101, 99,102, 97, 99, 32, 61, 32,109, 97,120,
+ 40,102, 42,103, 42,101,120,112, 95, 98,108,101,110,100,101,114, 40, 40, 45, 40, 97,110,103, 42, 97,110,103, 41, 47, 40, 50, 46,
+ 48, 42,115,112,101, 99, 95,112,111,119,101,114, 42,115,112,101, 99, 95,112,111,119,101,114, 41, 41, 41, 44, 32, 48, 46, 48, 41,
+ 59, 10, 9, 9, 9,125, 10, 9, 9,125, 10, 9,125, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,119, 97,114,100,
+105,115,111, 95,115,112,101, 99, 40,118,101, 99, 51, 32,110, 44, 32,118,101, 99, 51, 32,108, 44, 32,118,101, 99, 51, 32,118, 44,
+ 32,102,108,111, 97,116, 32,114,109,115, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,115,112,101, 99,102, 97, 99, 41, 10,123,
+ 10, 9,118,101, 99, 51, 32,104, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40,108, 32, 43, 32,118, 41, 59, 10, 9,102,108,
+111, 97,116, 32,110,104, 32, 61, 32,109, 97,120, 40,100,111,116, 40,110, 44, 32,104, 41, 44, 32, 48, 46, 48, 48, 49, 41, 59, 10,
+ 9,102,108,111, 97,116, 32,110,118, 32, 61, 32,109, 97,120, 40,100,111,116, 40,110, 44, 32,118, 41, 44, 32, 48, 46, 48, 48, 49,
+ 41, 59, 10, 9,102,108,111, 97,116, 32,110,108, 32, 61, 32,109, 97,120, 40,100,111,116, 40,110, 44, 32,108, 41, 44, 32, 48, 46,
+ 48, 48, 49, 41, 59, 10, 9,102,108,111, 97,116, 32, 97,110,103,108,101, 32, 61, 32,116, 97,110, 40, 97, 99,111,115, 40,110,104,
+ 41, 41, 59, 10, 9,102,108,111, 97,116, 32, 97,108,112,104, 97, 32, 61, 32,109, 97,120, 40,114,109,115, 44, 32, 48, 46, 48, 48,
+ 49, 41, 59, 10, 10, 9,115,112,101, 99,102, 97, 99, 61, 32,110,108, 32, 42, 32, 40, 49, 46, 48, 47, 40, 52, 46, 48, 42, 77, 95,
+ 80, 73, 42, 97,108,112,104, 97, 42, 97,108,112,104, 97, 41, 41, 42, 40,101,120,112, 95, 98,108,101,110,100,101,114, 40, 45, 40,
+ 97,110,103,108,101, 42, 97,110,103,108,101, 41, 47, 40, 97,108,112,104, 97, 42, 97,108,112,104, 97, 41, 41, 47, 40,115,113,114,
+116, 40,110,118, 42,110,108, 41, 41, 41, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,116,111,111,110, 95,115,
+112,101, 99, 40,118,101, 99, 51, 32,110, 44, 32,118,101, 99, 51, 32,108, 44, 32,118,101, 99, 51, 32,118, 44, 32,102,108,111, 97,
+116, 32,115,105,122,101, 44, 32,102,108,111, 97,116, 32,116,115,109,111,111,116,104, 44, 32,111,117,116, 32,102,108,111, 97,116,
+ 32,115,112,101, 99,102, 97, 99, 41, 10,123, 10, 9,118,101, 99, 51, 32,104, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40,
+108, 32, 43, 32,118, 41, 59, 10, 9,102,108,111, 97,116, 32,114,115,108,116, 32, 61, 32,100,111,116, 40,104, 44, 32,110, 41, 59,
+ 10, 9,102,108,111, 97,116, 32, 97,110,103, 32, 61, 32, 97, 99,111,115, 40,114,115,108,116, 41, 59, 10, 10, 9,105,102, 40, 97,
+110,103, 32, 60, 32,115,105,122,101, 41, 32,114,115,108,116, 32, 61, 32, 49, 46, 48, 59, 10, 9,101,108,115,101, 32,105,102, 40,
+ 97,110,103, 32, 62, 61, 32, 40,115,105,122,101, 32, 43, 32,116,115,109,111,111,116,104, 41, 32,124,124, 32,116,115,109,111,111,
+116,104, 32, 61, 61, 32, 48, 46, 48, 41, 32,114,115,108,116, 32, 61, 32, 48, 46, 48, 59, 10, 9,101,108,115,101, 32,114,115,108,
+116, 32, 61, 32, 49, 46, 48, 32, 45, 32, 40, 40, 97,110,103, 32, 45, 32,115,105,122,101, 41, 47,116,115,109,111,111,116,104, 41,
+ 59, 10, 10, 9,115,112,101, 99,102, 97, 99, 32, 61, 32,114,115,108,116, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,
+101, 95,115,112,101, 99, 95, 97,114,101, 97, 95,105,110,112, 40,102,108,111, 97,116, 32,115,112,101, 99,102, 97, 99, 44, 32,102,
+108,111, 97,116, 32,105,110,112, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,115,112,101, 99,102, 97, 99, 41, 10,
+123, 10, 9,111,117,116,115,112,101, 99,102, 97, 99, 32, 61, 32,115,112,101, 99,102, 97, 99, 42,105,110,112, 59, 10,125, 10, 10,
+118,111,105,100, 32,115,104, 97,100,101, 95,115,112,101, 99, 95,116, 40,102,108,111, 97,116, 32,115,104, 97,100,102, 97, 99, 44,
+ 32,102,108,111, 97,116, 32,115,112,101, 99, 44, 32,102,108,111, 97,116, 32,118,105,115,105,102, 97, 99, 44, 32,102,108,111, 97,
+116, 32,115,112,101, 99,102, 97, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,116, 41, 10,123, 10, 9,116, 32, 61, 32,115,
+104, 97,100,102, 97, 99, 42,115,112,101, 99, 42,118,105,115,105,102, 97, 99, 42,115,112,101, 99,102, 97, 99, 59, 10,125, 10, 10,
+118,111,105,100, 32,115,104, 97,100,101, 95, 97,100,100, 95,115,112,101, 99, 40,102,108,111, 97,116, 32,116, 44, 32,118,101, 99,
+ 51, 32,108, 97,109,112, 99,111,108, 44, 32,118,101, 99, 51, 32,115,112,101, 99, 99,111,108, 44, 32,111,117,116, 32,118,101, 99,
+ 51, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,111,117,116, 99,111,108, 32, 61, 32,116, 42,108, 97,109,112, 99,111,108, 42,
+115,112,101, 99, 99,111,108, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95, 97,100,100, 40,118,101, 99, 52, 32,
+ 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108,
+ 41, 10,123, 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,111,108, 49, 32, 43, 32, 99,111,108, 50, 59, 10,125, 10, 10,118,111,
+105,100, 32,115,104, 97,100,101, 95,109, 97,100,100, 40,118,101, 99, 52, 32, 99,111,108, 44, 32,118,101, 99, 52, 32, 99,111,108,
+ 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123,
+ 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,111,108, 32, 43, 32, 99,111,108, 49, 42, 99,111,108, 50, 59, 10,125, 10, 10,118,
+111,105,100, 32,115,104, 97,100,101, 95, 97,100,100, 95, 99,108, 97,109,112,101,100, 40,118,101, 99, 52, 32, 99,111,108, 49, 44,
+ 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,
+111,117,116, 99,111,108, 32, 61, 32, 99,111,108, 49, 32, 43, 32,109, 97,120, 40, 99,111,108, 50, 44, 32,118,101, 99, 52, 40, 48,
+ 46, 48, 44, 32, 48, 46, 48, 44, 32, 48, 46, 48, 44, 32, 48, 46, 48, 41, 41, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,
+100,101, 95,109, 97,100,100, 95, 99,108, 97,109,112,101,100, 40,118,101, 99, 52, 32, 99,111,108, 44, 32,118,101, 99, 52, 32, 99,
+111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41,
+ 10,123, 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,111,108, 32, 43, 32,109, 97,120, 40, 99,111,108, 49, 42, 99,111,108, 50,
+ 44, 32,118,101, 99, 52, 40, 48, 46, 48, 44, 32, 48, 46, 48, 44, 32, 48, 46, 48, 44, 32, 48, 46, 48, 41, 41, 59, 10,125, 10, 10,
+118,111,105,100, 32,115,104, 97,100,101, 95,109, 97,100,100,102, 40,118,101, 99, 52, 32, 99,111,108, 44, 32,102,108,111, 97,116,
+ 32,102, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,
+123, 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,111,108, 32, 43, 32,102, 42, 99,111,108, 49, 59, 10,125, 10, 10,118,111,105,
+100, 32,115,104, 97,100,101, 95,109,117,108, 40,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50,
+ 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,
+111,108, 49, 42, 99,111,108, 50, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,109,117,108, 95,118, 97,108,117,
+101, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 44, 32,111,117,116, 32,118,101, 99, 52, 32,
+111,117,116, 99,111,108, 41, 10,123, 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,111,108, 42,102, 97, 99, 59, 10,125, 10, 10,
+118,111,105,100, 32,115,104, 97,100,101, 95,111, 98, 99,111,108,111,114, 40,118,101, 99, 52, 32, 99,111,108, 44, 32,118,101, 99,
+ 52, 32,111, 98, 99,111,108, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,111,117,116,
+ 99,111,108, 32, 61, 32,118,101, 99, 52, 40, 99,111,108, 46,114,103, 98, 42,111, 98, 99,111,108, 46,114,103, 98, 44, 32, 99,111,
+108, 46, 97, 41, 59, 10,125, 10, 10,118,111,105,100, 32,114, 97,109,112, 95,114,103, 98,116,111, 98,119, 40,118,101, 99, 51, 32,
+ 99,111,108,111,114, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118,
+ 97,108, 32, 61, 32, 99,111,108,111,114, 46,114, 42, 48, 46, 51, 32, 43, 32, 99,111,108,111,114, 46,103, 42, 48, 46, 53, 56, 32,
+ 43, 32, 99,111,108,111,114, 46, 98, 42, 48, 46, 49, 50, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,111,110,
+108,121, 95,115,104, 97,100,111,119, 40,102,108,111, 97,116, 32,105, 44, 32,102,108,111, 97,116, 32,115,104, 97,100,102, 97, 99,
+ 44, 32,102,108,111, 97,116, 32,101,110,101,114,103,121, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,115,104, 97,
+100,102, 97, 99, 41, 10,123, 10, 9,111,117,116,115,104, 97,100,102, 97, 99, 32, 61, 32,105, 42,101,110,101,114,103,121, 42, 40,
+ 49, 46, 48, 32, 45, 32,115,104, 97,100,102, 97, 99, 41, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,111,110,
+108,121, 95,115,104, 97,100,111,119, 95,100,105,102,102,117,115,101, 40,102,108,111, 97,116, 32,115,104, 97,100,102, 97, 99, 44,
+ 32,118,101, 99, 51, 32,114,103, 98, 44, 32,118,101, 99, 52, 32,100,105,102,102, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,
+117,116,100,105,102,102, 41, 10,123, 10, 9,111,117,116,100,105,102,102, 32, 61, 32,100,105,102,102, 32, 45, 32,118,101, 99, 52,
+ 40,114,103, 98, 42,115,104, 97,100,102, 97, 99, 44, 32, 48, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,
+101, 95,111,110,108,121, 95,115,104, 97,100,111,119, 95,115,112,101, 99,117,108, 97,114, 40,102,108,111, 97,116, 32,115,104, 97,
+100,102, 97, 99, 44, 32,118,101, 99, 51, 32,115,112,101, 99,114,103, 98, 44, 32,118,101, 99, 52, 32,115,112,101, 99, 44, 32,111,
+117,116, 32,118,101, 99, 52, 32,111,117,116,115,112,101, 99, 41, 10,123, 10, 9,111,117,116,115,112,101, 99, 32, 61, 32,115,112,
+101, 99, 32, 45, 32,118,101, 99, 52, 40,115,112,101, 99,114,103, 98, 42,115,104, 97,100,102, 97, 99, 44, 32, 48, 46, 48, 41, 59,
+ 10,125, 10, 10,118,111,105,100, 32,116,101,115,116, 95,115,104, 97,100,111,119, 98,117,102, 40,118,101, 99, 51, 32,114, 99,111,
+ 44, 32,115, 97,109,112,108,101,114, 50, 68, 83,104, 97,100,111,119, 32,115,104, 97,100,111,119,109, 97,112, 44, 32,109, 97,116,
+ 52, 32,115,104, 97,100,111,119,112,101,114,115,109, 97,116, 44, 32,102,108,111, 97,116, 32,115,104, 97,100,111,119, 98,105, 97,
+115, 44, 32,102,108,111, 97,116, 32,105,110,112, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,114,101,115,117,108,116, 41, 10,
+123, 10, 9,105,102, 40,105,110,112, 32, 60, 61, 32, 48, 46, 48, 41, 32,123, 10, 9, 9,114,101,115,117,108,116, 32, 61, 32, 48,
+ 46, 48, 59, 10, 9,125, 10, 9,101,108,115,101, 32,123, 10, 9, 9,118,101, 99, 52, 32, 99,111, 32, 61, 32,115,104, 97,100,111,
+119,112,101,114,115,109, 97,116, 42,118,101, 99, 52, 40,114, 99,111, 44, 32, 49, 46, 48, 41, 59, 10, 10, 9, 9, 47, 47,102,108,
+111, 97,116, 32, 98,105, 97,115, 32, 61, 32, 40, 49, 46, 53, 32, 45, 32,105,110,112, 42,105,110,112, 41, 42,115,104, 97,100,111,
+119, 98,105, 97,115, 59, 10, 9, 9, 99,111, 46,122, 32, 45, 61, 32,115,104, 97,100,111,119, 98,105, 97,115, 42, 99,111, 46,119,
+ 59, 10, 9, 9, 10, 9, 9,105,102, 32, 40, 99,111, 46,119, 32, 62, 32, 48, 46, 48, 32, 38, 38, 32, 99,111, 46,120, 32, 62, 32,
+ 48, 46, 48, 32, 38, 38, 32, 99,111, 46,120, 47, 99,111, 46,119, 32, 60, 32, 49, 46, 48, 32, 38, 38, 32, 99,111, 46,121, 32, 62,
+ 32, 48, 46, 48, 32, 38, 38, 32, 99,111, 46,121, 47, 99,111, 46,119, 32, 60, 32, 49, 46, 48, 41, 10, 9, 9, 9,114,101,115,117,
+108,116, 32, 61, 32,115,104, 97,100,111,119, 50, 68, 80,114,111,106, 40,115,104, 97,100,111,119,109, 97,112, 44, 32, 99,111, 41,
+ 46,120, 59, 10, 9, 9,101,108,115,101, 10, 9, 9, 9,114,101,115,117,108,116, 32, 61, 32, 49, 46, 48, 59, 10, 9,125, 10,125,
+ 10, 10,118,111,105,100, 32,116,101,115,116, 95,115,104, 97,100,111,119, 98,117,102, 95,118,115,109, 40,118,101, 99, 51, 32,114,
+ 99,111, 44, 32,115, 97,109,112,108,101,114, 50, 68, 32,115,104, 97,100,111,119,109, 97,112, 44, 32,109, 97,116, 52, 32,115,104,
+ 97,100,111,119,112,101,114,115,109, 97,116, 44, 32,102,108,111, 97,116, 32,115,104, 97,100,111,119, 98,105, 97,115, 44, 32,102,
+108,111, 97,116, 32, 98,108,101,101,100, 98,105, 97,115, 44, 32,102,108,111, 97,116, 32,105,110,112, 44, 32,111,117,116, 32,102,
+108,111, 97,116, 32,114,101,115,117,108,116, 41, 10,123, 10, 9,105,102, 40,105,110,112, 32, 60, 61, 32, 48, 46, 48, 41, 32,123,
+ 10, 9, 9,114,101,115,117,108,116, 32, 61, 32, 48, 46, 48, 59, 10, 9,125, 10, 9,101,108,115,101, 32,123, 10, 9, 9,118,101,
+ 99, 52, 32, 99,111, 32, 61, 32,115,104, 97,100,111,119,112,101,114,115,109, 97,116, 42,118,101, 99, 52, 40,114, 99,111, 44, 32,
+ 49, 46, 48, 41, 59, 10, 9, 9,105,102, 32, 40, 99,111, 46,119, 32, 62, 32, 48, 46, 48, 32, 38, 38, 32, 99,111, 46,120, 32, 62,
+ 32, 48, 46, 48, 32, 38, 38, 32, 99,111, 46,120, 47, 99,111, 46,119, 32, 60, 32, 49, 46, 48, 32, 38, 38, 32, 99,111, 46,121, 32,
+ 62, 32, 48, 46, 48, 32, 38, 38, 32, 99,111, 46,121, 47, 99,111, 46,119, 32, 60, 32, 49, 46, 48, 41, 32,123, 10, 9, 9, 9,118,
+101, 99, 50, 32,109,111,109,101,110,116,115, 32, 61, 32,116,101,120,116,117,114,101, 50, 68, 80,114,111,106, 40,115,104, 97,100,
+111,119,109, 97,112, 44, 32, 99,111, 41, 46,114,103, 59, 10, 9, 9, 9,102,108,111, 97,116, 32,100,105,115,116, 32, 61, 32, 99,
+111, 46,122, 47, 99,111, 46,119, 59, 10, 9, 9, 9,102,108,111, 97,116, 32,112, 32, 61, 32, 48, 46, 48, 59, 10, 9, 9, 9, 10,
+ 9, 9, 9,105,102, 40,100,105,115,116, 32, 60, 61, 32,109,111,109,101,110,116,115, 46,120, 41, 10, 9, 9, 9, 9,112, 32, 61,
+ 32, 49, 46, 48, 59, 10, 10, 9, 9, 9,102,108,111, 97,116, 32,118, 97,114,105, 97,110, 99,101, 32, 61, 32,109,111,109,101,110,
+116,115, 46,121, 32, 45, 32, 40,109,111,109,101,110,116,115, 46,120, 42,109,111,109,101,110,116,115, 46,120, 41, 59, 10, 9, 9,
+ 9,118, 97,114,105, 97,110, 99,101, 32, 61, 32,109, 97,120, 40,118, 97,114,105, 97,110, 99,101, 44, 32,115,104, 97,100,111,119,
+ 98,105, 97,115, 47, 49, 48, 46, 48, 41, 59, 10, 10, 9, 9, 9,102,108,111, 97,116, 32,100, 32, 61, 32,109,111,109,101,110,116,
+115, 46,120, 32, 45, 32,100,105,115,116, 59, 10, 9, 9, 9,102,108,111, 97,116, 32,112, 95,109, 97,120, 32, 61, 32,118, 97,114,
+105, 97,110, 99,101, 32, 47, 32, 40,118, 97,114,105, 97,110, 99,101, 32, 43, 32,100, 42,100, 41, 59, 10, 10, 9, 9, 9, 47, 47,
+ 32, 78,111,119, 32,114,101,100,117, 99,101, 32,108,105,103,104,116, 45, 98,108,101,101,100,105,110,103, 32, 98,121, 32,114,101,
+109,111,118,105,110,103, 32,116,104,101, 32, 91, 48, 44, 32,120, 93, 32,116, 97,105,108, 32, 97,110,100, 32,108,105,110,101, 97,
+114,108,121, 32,114,101,115, 99, 97,108,105,110,103, 32, 40,120, 44, 32, 49, 93, 10, 9, 9, 9,112, 95,109, 97,120, 32, 61, 32,
+ 99,108, 97,109,112, 40, 40,112, 95,109, 97,120, 45, 98,108,101,101,100, 98,105, 97,115, 41, 47, 40, 49, 46, 48, 45, 98,108,101,
+101,100, 98,105, 97,115, 41, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 10, 9, 9, 9,114,101,115,117,108,116, 32, 61,
+ 32,109, 97,120, 40,112, 44, 32,112, 95,109, 97,120, 41, 59, 10, 9, 9,125, 10, 9, 9,101,108,115,101, 32,123, 10, 9, 9, 9,
+114,101,115,117,108,116, 32, 61, 32, 49, 46, 48, 59, 10, 9, 9,125, 9, 9, 9, 10, 9,125, 10,125, 10, 10,118,111,105,100, 32,
+115,104, 97,100,101, 95,108,105,103,104,116, 95,116,101,120,116,117,114,101, 40,118,101, 99, 51, 32,114, 99,111, 44, 32,115, 97,
+109,112,108,101,114, 50, 68, 32, 99,111,111,107,105,101, 44, 32,109, 97,116, 52, 32,115,104, 97,100,111,119,112,101,114,115,109,
+ 97,116, 44, 32,111,117,116, 32,118,101, 99, 52, 32,114,101,115,117,108,116, 41, 10,123, 10, 10, 9,118,101, 99, 52, 32, 99,111,
+ 32, 61, 32,115,104, 97,100,111,119,112,101,114,115,109, 97,116, 42,118,101, 99, 52, 40,114, 99,111, 44, 32, 49, 46, 48, 41, 59,
+ 10, 10, 9,114,101,115,117,108,116, 32, 61, 32,116,101,120,116,117,114,101, 50, 68, 80,114,111,106, 40, 99,111,111,107,105,101,
+ 44, 32, 99,111, 41, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,101,120,112,111,115,117,114,101, 95, 99,111,
+114,114,101, 99,116, 40,118,101, 99, 51, 32, 99,111,108, 44, 32,102,108,111, 97,116, 32,108,105,110,102, 97, 99, 44, 32,102,108,
+111, 97,116, 32,108,111,103,102, 97, 99, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,
+111,117,116, 99,111,108, 32, 61, 32,108,105,110,102, 97, 99, 42, 40, 49, 46, 48, 32, 45, 32,101,120,112, 40, 99,111,108, 42,108,
+111,103,102, 97, 99, 41, 41, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,109,105,115,116, 95,102, 97, 99,116,
+111,114, 40,118,101, 99, 51, 32, 99,111, 44, 32,102,108,111, 97,116, 32,109,105,115,116,115,116, 97, 44, 32,102,108,111, 97,116,
+ 32,109,105,115,116,100,105,115,116, 44, 32,102,108,111, 97,116, 32,109,105,115,116,116,121,112,101, 44, 32,102,108,111, 97,116,
+ 32,109,105,115,105, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,102, 97, 99, 41, 10,123, 10, 9,102,108,111, 97,
+116, 32,102, 97, 99, 44, 32,122, 99,111,114, 59, 10, 10, 9,122, 99,111,114, 32, 61, 32, 40,103,108, 95, 80,114,111,106,101, 99,
+116,105,111,110, 77, 97,116,114,105,120, 91, 51, 93, 91, 51, 93, 32, 61, 61, 32, 48, 46, 48, 41, 63, 32,108,101,110,103,116,104,
+ 40, 99,111, 41, 58, 32, 45, 99,111, 91, 50, 93, 59, 10, 9, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40, 40,122, 99,
+111,114, 45,109,105,115,116,115,116, 97, 41, 47,109,105,115,116,100,105,115,116, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59,
+ 10, 9,105,102, 40,109,105,115,116,116,121,112,101, 32, 61, 61, 32, 48, 46, 48, 41, 32,102, 97, 99, 32, 42, 61, 32,102, 97, 99,
+ 59, 10, 9,101,108,115,101, 32,105,102, 40,109,105,115,116,116,121,112,101, 32, 61, 61, 32, 49, 46, 48, 41, 59, 10, 9,101,108,
+115,101, 32,102, 97, 99, 32, 61, 32,115,113,114,116, 40,102, 97, 99, 41, 59, 10, 10, 9,111,117,116,102, 97, 99, 32, 61, 32, 49,
+ 46, 48, 32, 45, 32, 40, 49, 46, 48, 45,102, 97, 99, 41, 42, 40, 49, 46, 48, 45,109,105,115,105, 41, 59, 10,125, 10, 10,118,111,
+105,100, 32,115,104, 97,100,101, 95,119,111,114,108,100, 95,109,105,120, 40,118,101, 99, 51, 32,104,111,114, 44, 32,118,101, 99,
+ 52, 32, 99,111,108, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116,
+ 32,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40, 99,111,108, 46, 97, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,
+111,117,116, 99,111,108, 32, 61, 32,118,101, 99, 52, 40,109,105,120, 40,104,111,114, 44, 32, 99,111,108, 46,114,103, 98, 44, 32,
+102, 97, 99, 41, 44, 32, 99,111,108, 46, 97, 41, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95, 97,108,112,104,
+ 97, 95,111,112, 97,113,117,101, 40,118,101, 99, 52, 32, 99,111,108, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,
+111,108, 41, 10,123, 10, 9,111,117,116, 99,111,108, 32, 61, 32,118,101, 99, 52, 40, 99,111,108, 46,114,103, 98, 44, 32, 49, 46,
+ 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95, 97,108,112,104, 97, 95,111, 98, 99,111,108,111,114, 40,
+118,101, 99, 52, 32, 99,111,108, 44, 32,118,101, 99, 52, 32,111, 98, 99,111,108, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,
+117,116, 99,111,108, 41, 10,123, 10, 9,111,117,116, 99,111,108, 32, 61, 32,118,101, 99, 52, 40, 99,111,108, 46,114,103, 98, 44,
+ 32, 99,111,108, 46, 97, 42,111, 98, 99,111,108, 46, 97, 41, 59, 10,125, 10, 10, 47, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 32, 78, 69, 87, 32, 83, 72, 65, 68, 69, 82, 32, 85, 84, 73, 76, 73, 84, 73, 69, 83, 32, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 47, 10, 10,102,108,111, 97,116, 32,102,114,101,115,110,101,108, 95,100,105,101,108,101, 99,116,114,105, 99, 40,
+118,101, 99, 51, 32, 73,110, 99,111,109,105,110,103, 44, 32,118,101, 99, 51, 32, 78,111,114,109, 97,108, 44, 32,102,108,111, 97,
+116, 32,101,116, 97, 41, 10,123, 10, 32, 32, 32, 32, 47, 42, 32, 99,111,109,112,117,116,101, 32,102,114,101,115,110,101,108, 32,
+114,101,102,108,101, 99,116, 97,110, 99,101, 32,119,105,116,104,111,117,116, 32,101,120,112,108,105, 99,105,116,108,121, 32, 99,
+111,109,112,117,116,105,110,103, 10, 32, 32, 32, 32, 32, 32, 32,116,104,101, 32,114,101,102,114, 97, 99,116,101,100, 32,100,105,
+114,101, 99,116,105,111,110, 32, 42, 47, 10, 32, 32, 32, 32,102,108,111, 97,116, 32, 99, 32, 61, 32, 97, 98,115, 40,100,111,116,
+ 40, 73,110, 99,111,109,105,110,103, 44, 32, 78,111,114,109, 97,108, 41, 41, 59, 10, 32, 32, 32, 32,102,108,111, 97,116, 32,103,
+ 32, 61, 32,101,116, 97, 32, 42, 32,101,116, 97, 32, 45, 32, 49, 46, 48, 32, 43, 32, 99, 32, 42, 32, 99, 59, 10, 32, 32, 32, 32,
+102,108,111, 97,116, 32,114,101,115,117,108,116, 59, 10, 10, 32, 32, 32, 32,105,102, 40,103, 32, 62, 32, 48, 46, 48, 41, 32,123,
+ 10, 32, 32, 32, 32, 32, 32, 32, 32,103, 32, 61, 32,115,113,114,116, 40,103, 41, 59, 10, 32, 32, 32, 32, 32, 32, 32, 32,102,108,
+111, 97,116, 32, 65, 32, 61, 40,103, 32, 45, 32, 99, 41, 47, 40,103, 32, 43, 32, 99, 41, 59, 10, 32, 32, 32, 32, 32, 32, 32, 32,
+102,108,111, 97,116, 32, 66, 32, 61, 40, 99, 32, 42, 40,103, 32, 43, 32, 99, 41, 45, 32, 49, 46, 48, 41, 47, 40, 99, 32, 42, 40,
+103, 32, 45, 32, 99, 41, 43, 32, 49, 46, 48, 41, 59, 10, 32, 32, 32, 32, 32, 32, 32, 32,114,101,115,117,108,116, 32, 61, 32, 48,
+ 46, 53, 32, 42, 32, 65, 32, 42, 32, 65, 32, 42, 40, 49, 46, 48, 32, 43, 32, 66, 32, 42, 32, 66, 41, 59, 10, 32, 32, 32, 32,125,
+ 10, 32, 32, 32, 32,101,108,115,101, 10, 32, 32, 32, 32, 32, 32, 32, 32,114,101,115,117,108,116, 32, 61, 32, 49, 46, 48, 59, 32,
+ 32, 47, 42, 32, 84, 73, 82, 32, 40,110,111, 32,114,101,102,114, 97, 99,116,101,100, 32, 99,111,109,112,111,110,101,110,116, 41,
+ 32, 42, 47, 10, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,114,101,115,117,108,116, 59, 10,125, 10, 10,102,108,111, 97,116,
+ 32,104,121,112,111,116, 40,102,108,111, 97,116, 32,120, 44, 32,102,108,111, 97,116, 32,121, 41, 10,123, 10, 9,114,101,116,117,
+114,110, 32,115,113,114,116, 40,120, 42,120, 32, 43, 32,121, 42,121, 41, 59, 10,125, 10, 10, 47, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 32, 78, 69, 87, 32, 83, 72, 65, 68, 69, 82, 32, 78, 79, 68, 69, 83, 32, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 47, 10, 10, 35,100,101,102,105,110,101, 32, 78, 85, 77, 95, 76, 73, 71, 72, 84, 83, 32, 51, 10, 10, 47, 42, 32,
+ 98,115,100,102,115, 32, 42, 47, 10, 10,118,111,105,100, 32,110,111,100,101, 95, 98,115,100,102, 95,100,105,102,102,117,115,101,
+ 40,118,101, 99, 52, 32, 99,111,108,111,114, 44, 32,102,108,111, 97,116, 32,114,111,117,103,104,110,101,115,115, 44, 32,118,101,
+ 99, 51, 32, 78, 44, 32,111,117,116, 32,118,101, 99, 52, 32,114,101,115,117,108,116, 41, 10,123, 10, 9, 47, 42, 32, 97,109, 98,
+105,101,110,116, 32,108,105,103,104,116, 32, 42, 47, 10, 9,118,101, 99, 51, 32, 76, 32, 61, 32,118,101, 99, 51, 40, 48, 46, 50,
+ 41, 59, 10, 10, 9, 47, 42, 32,100,105,114,101, 99,116,105,111,110, 97,108, 32,108,105,103,104,116,115, 32, 42, 47, 10, 9,102,
+111,114, 40,105,110,116, 32,105, 32, 61, 32, 48, 59, 32,105, 32, 60, 32, 78, 85, 77, 95, 76, 73, 71, 72, 84, 83, 59, 32,105, 43,
+ 43, 41, 32,123, 10, 9, 9,118,101, 99, 51, 32,108,105,103,104,116, 95,112,111,115,105,116,105,111,110, 32, 61, 32,103,108, 95,
+ 76,105,103,104,116, 83,111,117,114, 99,101, 91,105, 93, 46,112,111,115,105,116,105,111,110, 46,120,121,122, 59, 10, 9, 9,118,
+101, 99, 51, 32,108,105,103,104,116, 95,100,105,102,102,117,115,101, 32, 61, 32,103,108, 95, 76,105,103,104,116, 83,111,117,114,
+ 99,101, 91,105, 93, 46,100,105,102,102,117,115,101, 46,114,103, 98, 59, 10, 10, 9, 9,102,108,111, 97,116, 32, 98,115,100,102,
+ 32, 61, 32,109, 97,120, 40,100,111,116, 40, 78, 44, 32,108,105,103,104,116, 95,112,111,115,105,116,105,111,110, 41, 44, 32, 48,
+ 46, 48, 41, 59, 10, 9, 9, 76, 32, 43, 61, 32,108,105,103,104,116, 95,100,105,102,102,117,115,101, 42, 98,115,100,102, 59, 10,
+ 9,125, 10, 10, 9,114,101,115,117,108,116, 32, 61, 32,118,101, 99, 52, 40, 76, 42, 99,111,108,111,114, 46,114,103, 98, 44, 32,
+ 49, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,100,101, 95, 98,115,100,102, 95,103,108,111,115,115,121, 40,118,
+101, 99, 52, 32, 99,111,108,111,114, 44, 32,102,108,111, 97,116, 32,114,111,117,103,104,110,101,115,115, 44, 32,118,101, 99, 51,
+ 32, 78, 44, 32,118,101, 99, 51, 32, 73, 44, 32,111,117,116, 32,118,101, 99, 52, 32,114,101,115,117,108,116, 41, 10,123, 10, 9,
+ 47, 42, 32, 97,109, 98,105,101,110,116, 32,108,105,103,104,116, 32, 42, 47, 10, 9,118,101, 99, 51, 32, 76, 32, 61, 32,118,101,
+ 99, 51, 40, 48, 46, 50, 41, 59, 10, 10, 9, 47, 42, 32,100,105,114,101, 99,116,105,111,110, 97,108, 32,108,105,103,104,116,115,
+ 32, 42, 47, 10, 9,102,111,114, 40,105,110,116, 32,105, 32, 61, 32, 48, 59, 32,105, 32, 60, 32, 78, 85, 77, 95, 76, 73, 71, 72,
+ 84, 83, 59, 32,105, 43, 43, 41, 32,123, 10, 9, 9,118,101, 99, 51, 32,108,105,103,104,116, 95,112,111,115,105,116,105,111,110,
+ 32, 61, 32,103,108, 95, 76,105,103,104,116, 83,111,117,114, 99,101, 91,105, 93, 46,112,111,115,105,116,105,111,110, 46,120,121,
+122, 59, 10, 9, 9,118,101, 99, 51, 32, 72, 32, 61, 32,103,108, 95, 76,105,103,104,116, 83,111,117,114, 99,101, 91,105, 93, 46,
+104, 97,108,102, 86,101, 99,116,111,114, 46,120,121,122, 59, 10, 9, 9,118,101, 99, 51, 32,108,105,103,104,116, 95,100,105,102,
+102,117,115,101, 32, 61, 32,103,108, 95, 76,105,103,104,116, 83,111,117,114, 99,101, 91,105, 93, 46,100,105,102,102,117,115,101,
+ 46,114,103, 98, 59, 10, 9, 9,118,101, 99, 51, 32,108,105,103,104,116, 95,115,112,101, 99,117,108, 97,114, 32, 61, 32,103,108,
+ 95, 76,105,103,104,116, 83,111,117,114, 99,101, 91,105, 93, 46,115,112,101, 99,117,108, 97,114, 46,114,103, 98, 59, 10, 10, 9,
+ 9, 47, 42, 32,119,101, 32,109,105,120, 32,105,110, 32,115,111,109,101, 32,100,105,102,102,117,115,101, 32,115,111, 32,108,111,
+119, 32,114,111,117,103,104,110,101,115,115, 32,115,116,105,108,108, 32,115,104,111,119,115, 32,117,112, 32, 42, 47, 10, 9, 9,
+102,108,111, 97,116, 32, 98,115,100,102, 32, 61, 32, 48, 46, 53, 42,112,111,119, 40,109, 97,120, 40,100,111,116, 40, 78, 44, 32,
+ 72, 41, 44, 32, 48, 46, 48, 41, 44, 32, 49, 46, 48, 47,114,111,117,103,104,110,101,115,115, 41, 59, 10, 9, 9, 98,115,100,102,
+ 32, 43, 61, 32, 48, 46, 53, 42,109, 97,120, 40,100,111,116, 40, 78, 44, 32,108,105,103,104,116, 95,112,111,115,105,116,105,111,
+110, 41, 44, 32, 48, 46, 48, 41, 59, 10, 9, 9, 76, 32, 43, 61, 32,108,105,103,104,116, 95,115,112,101, 99,117,108, 97,114, 42,
+ 98,115,100,102, 59, 10, 9,125, 10, 10, 9,114,101,115,117,108,116, 32, 61, 32,118,101, 99, 52, 40, 76, 42, 99,111,108,111,114,
+ 46,114,103, 98, 44, 32, 49, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,100,101, 95, 98,115,100,102, 95, 97,110,
+105,115,111,116,114,111,112,105, 99, 40,118,101, 99, 52, 32, 99,111,108,111,114, 44, 32,102,108,111, 97,116, 32,114,111,117,103,
+104,110,101,115,115, 85, 44, 32,102,108,111, 97,116, 32,114,111,117,103,104,110,101,115,115, 86, 44, 32,118,101, 99, 51, 32, 78,
+ 44, 32,118,101, 99, 51, 32, 73, 44, 32,111,117,116, 32,118,101, 99, 52, 32,114,101,115,117,108,116, 41, 10,123, 10, 9,110,111,
+100,101, 95, 98,115,100,102, 95,100,105,102,102,117,115,101, 40, 99,111,108,111,114, 44, 32, 48, 46, 48, 44, 32, 78, 44, 32,114,
+101,115,117,108,116, 41, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,100,101, 95, 98,115,100,102, 95,103,108, 97,115,115, 40,
+118,101, 99, 52, 32, 99,111,108,111,114, 44, 32,102,108,111, 97,116, 32,114,111,117,103,104,110,101,115,115, 44, 32,102,108,111,
+ 97,116, 32,105,111,114, 44, 32,118,101, 99, 51, 32, 78, 44, 32,118,101, 99, 51, 32, 73, 44, 32,111,117,116, 32,118,101, 99, 52,
+ 32,114,101,115,117,108,116, 41, 10,123, 10, 9,110,111,100,101, 95, 98,115,100,102, 95,100,105,102,102,117,115,101, 40, 99,111,
+108,111,114, 44, 32, 48, 46, 48, 44, 32, 78, 44, 32,114,101,115,117,108,116, 41, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,
+100,101, 95, 98,115,100,102, 95,116,114, 97,110,115,108,117, 99,101,110,116, 40,118,101, 99, 52, 32, 99,111,108,111,114, 44, 32,
+118,101, 99, 51, 32, 78, 44, 32,111,117,116, 32,118,101, 99, 52, 32,114,101,115,117,108,116, 41, 10,123, 10, 9,110,111,100,101,
+ 95, 98,115,100,102, 95,100,105,102,102,117,115,101, 40, 99,111,108,111,114, 44, 32, 48, 46, 48, 44, 32, 78, 44, 32,114,101,115,
+117,108,116, 41, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,100,101, 95, 98,115,100,102, 95,116,114, 97,110,115,112, 97,114,
+101,110,116, 40,118,101, 99, 52, 32, 99,111,108,111,114, 44, 32,111,117,116, 32,118,101, 99, 52, 32,114,101,115,117,108,116, 41,
+ 10,123, 10, 9, 47, 42, 32,116,104,105,115, 32,105,115,110, 39,116, 32,114,105,103,104,116, 32, 42, 47, 10, 9,114,101,115,117,
+108,116, 46,114, 32, 61, 32, 99,111,108,111,114, 46,114, 59, 10, 9,114,101,115,117,108,116, 46,103, 32, 61, 32, 99,111,108,111,
+114, 46,103, 59, 10, 9,114,101,115,117,108,116, 46, 98, 32, 61, 32, 99,111,108,111,114, 46, 98, 59, 10, 9,114,101,115,117,108,
+116, 46, 97, 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,100,101, 95, 98,115,100,102, 95,118,101,108,
+118,101,116, 40,118,101, 99, 52, 32, 99,111,108,111,114, 44, 32,102,108,111, 97,116, 32,115,105,103,109, 97, 44, 32,118,101, 99,
+ 51, 32, 78, 44, 32,111,117,116, 32,118,101, 99, 52, 32,114,101,115,117,108,116, 41, 10,123, 10, 9,110,111,100,101, 95, 98,115,
+100,102, 95,100,105,102,102,117,115,101, 40, 99,111,108,111,114, 44, 32, 48, 46, 48, 44, 32, 78, 44, 32,114,101,115,117,108,116,
+ 41, 59, 10,125, 10, 10, 47, 42, 32,101,109,105,115,115,105,111,110, 32, 42, 47, 10, 10,118,111,105,100, 32,110,111,100,101, 95,
+101,109,105,115,115,105,111,110, 40,118,101, 99, 52, 32, 99,111,108,111,114, 44, 32,102,108,111, 97,116, 32,115,116,114,101,110,
+103,116,104, 44, 32,118,101, 99, 51, 32, 78, 44, 32,111,117,116, 32,118,101, 99, 52, 32,114,101,115,117,108,116, 41, 10,123, 10,
+ 9,114,101,115,117,108,116, 32, 61, 32, 99,111,108,111,114, 42,115,116,114,101,110,103,116,104, 59, 10,125, 10, 10, 47, 42, 32,
+ 99,108,111,115,117,114,101,115, 32, 42, 47, 10, 10,118,111,105,100, 32,110,111,100,101, 95,109,105,120, 95,115,104, 97,100,101,
+114, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32,115,104, 97,100,101,114, 49, 44, 32,118,101, 99, 52, 32,
+115,104, 97,100,101,114, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,115,104, 97,100,101,114, 41, 10,123, 10, 9,115,104, 97,
+100,101,114, 32, 61, 32,109,105,120, 40,115,104, 97,100,101,114, 49, 44, 32,115,104, 97,100,101,114, 50, 44, 32,102, 97, 99, 41,
+ 59, 10,125, 10, 10,118,111,105,100, 32,110,111,100,101, 95, 97,100,100, 95,115,104, 97,100,101,114, 40,118,101, 99, 52, 32,115,
+104, 97,100,101,114, 49, 44, 32,118,101, 99, 52, 32,115,104, 97,100,101,114, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,115,
+104, 97,100,101,114, 41, 10,123, 10, 9,115,104, 97,100,101,114, 32, 61, 32,115,104, 97,100,101,114, 49, 32, 43, 32,115,104, 97,
+100,101,114, 50, 59, 10,125, 10, 10, 47, 42, 32,102,114,101,115,110,101,108, 32, 42, 47, 10, 10,118,111,105,100, 32,110,111,100,
+101, 95,102,114,101,115,110,101,108, 40,102,108,111, 97,116, 32,105,111,114, 44, 32,118,101, 99, 51, 32, 78, 44, 32,118,101, 99,
+ 51, 32, 73, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,114,101,115,117,108,116, 41, 10,123, 10, 9,102,108,111, 97,116, 32,
+101,116, 97, 32, 61, 32,109, 97,120, 40,105,111,114, 44, 32, 48, 46, 48, 48, 48, 48, 49, 41, 59, 10, 9,114,101,115,117,108,116,
+ 32, 61, 32,102,114,101,115,110,101,108, 95,100,105,101,108,101, 99,116,114,105, 99, 40, 73, 44, 32, 78, 44, 32,101,116, 97, 41,
+ 59, 32, 47, 47, 98, 97, 99,107,102, 97, 99,105,110,103, 40, 41, 63, 32, 49, 46, 48, 47,101,116, 97, 58, 32,101,116, 97, 41, 59,
+ 10,125, 10, 10, 47, 42, 32,103,101,111,109,101,116,114,121, 32, 42, 47, 10, 10,118,111,105,100, 32,110,111,100,101, 95,103,101,
+111,109,101,116,114,121, 40,118,101, 99, 51, 32, 73, 44, 32,118,101, 99, 51, 32, 78, 44, 32,109, 97,116, 52, 32,116,111,119,111,
+114,108,100, 44, 10, 9,111,117,116, 32,118,101, 99, 51, 32,112,111,115,105,116,105,111,110, 44, 32,111,117,116, 32,118,101, 99,
+ 51, 32,110,111,114,109, 97,108, 44, 32,111,117,116, 32,118,101, 99, 51, 32,116, 97,110,103,101,110,116, 44, 10, 9,111,117,116,
+ 32,118,101, 99, 51, 32,116,114,117,101, 95,110,111,114,109, 97,108, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,
+109,105,110,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,112, 97,114, 97,109,101,116,114,105, 99, 44, 10, 9,111,117,116, 32,
+102,108,111, 97,116, 32, 98, 97, 99,107,102, 97, 99,105,110,103, 41, 10,123, 10, 9,112,111,115,105,116,105,111,110, 32, 61, 32,
+ 40,116,111,119,111,114,108,100, 42,118,101, 99, 52, 40, 73, 44, 32, 49, 46, 48, 41, 41, 46,120,121,122, 59, 10, 9,110,111,114,
+109, 97,108, 32, 61, 32, 78, 59, 10, 9,116, 97,110,103,101,110,116, 32, 61, 32,118,101, 99, 51, 40, 48, 46, 48, 41, 59, 10, 9,
+116,114,117,101, 95,110,111,114,109, 97,108, 32, 61, 32, 78, 59, 10, 9,105,110, 99,111,109,105,110,103, 32, 61, 32, 73, 59, 10,
+ 9,112, 97,114, 97,109,101,116,114,105, 99, 32, 61, 32,118,101, 99, 51, 40, 48, 46, 48, 41, 59, 10, 9, 98, 97, 99,107,102, 97,
+ 99,105,110,103, 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,100,101, 95,116,101,120, 95, 99,111,111,
+114,100, 40,118,101, 99, 51, 32, 73, 44, 32,118,101, 99, 51, 32, 78, 44, 32,109, 97,116, 52, 32,118,105,101,119,105,110,118,109,
+ 97,116, 44, 32,109, 97,116, 52, 32,111, 98,105,110,118,109, 97,116, 44, 10, 9,118,101, 99, 51, 32, 97,116,116,114, 95,111,114,
+ 99,111, 44, 32,118,101, 99, 51, 32, 97,116,116,114, 95,117,118, 44, 10, 9,111,117,116, 32,118,101, 99, 51, 32,103,101,110,101,
+114, 97,116,101,100, 44, 32,111,117,116, 32,118,101, 99, 51, 32,110,111,114,109, 97,108, 44, 32,111,117,116, 32,118,101, 99, 51,
+ 32,117,118, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111, 98,106,101, 99,116, 44, 10, 9,111,117,116, 32,118,101, 99, 51, 32,
+ 99, 97,109,101,114, 97, 44, 32,111,117,116, 32,118,101, 99, 51, 32,119,105,110,100,111,119, 44, 32,111,117,116, 32,118,101, 99,
+ 51, 32,114,101,102,108,101, 99,116,105,111,110, 41, 10,123, 10, 9,103,101,110,101,114, 97,116,101,100, 32, 61, 32, 97,116,116,
+114, 95,111,114, 99,111, 59, 10, 9,110,111,114,109, 97,108, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40, 40,111, 98,105,
+110,118,109, 97,116, 42, 40,118,105,101,119,105,110,118,109, 97,116, 42,118,101, 99, 52, 40, 78, 44, 32, 48, 46, 48, 41, 41, 41,
+ 46,120,121,122, 41, 59, 10, 9,117,118, 32, 61, 32, 97,116,116,114, 95,117,118, 59, 10, 9,111, 98,106,101, 99,116, 32, 61, 32,
+ 73, 59, 10, 9, 99, 97,109,101,114, 97, 32, 61, 32, 73, 59, 10, 9,119,105,110,100,111,119, 32, 61, 32,103,108, 95, 70,114, 97,
+103, 67,111,111,114,100, 46,120,121,122, 59, 10, 9,114,101,102,108,101, 99,116,105,111,110, 32, 61, 32,114,101,102,108,101, 99,
+116, 40, 78, 44, 32, 73, 41, 59, 10, 10,125, 10, 10, 47, 42, 32,116,101,120,116,117,114,101,115, 32, 42, 47, 10, 10,118,111,105,
+100, 32,110,111,100,101, 95,116,101,120, 95,103,114, 97,100,105,101,110,116, 40,118,101, 99, 51, 32, 99,111, 44, 32,111,117,116,
+ 32,118,101, 99, 52, 32, 99,111,108,111,114, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,102, 97, 99, 41, 10,123, 10, 9, 99,
+111,108,111,114, 32, 61, 32,118,101, 99, 52, 40, 49, 46, 48, 41, 59, 10, 9,102, 97, 99, 32, 61, 32, 49, 46, 48, 59, 10,125, 10,
+ 10,118,111,105,100, 32,110,111,100,101, 95,116,101,120, 95, 99,104,101, 99,107,101,114, 40,118,101, 99, 51, 32, 99,111, 44, 32,
+118,101, 99, 52, 32, 99,111,108,111,114, 49, 44, 32,118,101, 99, 52, 32, 99,111,108,111,114, 50, 44, 32,102,108,111, 97,116, 32,
+115, 99, 97,108,101, 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,108,111,114, 44, 32,111,117,116, 32,102,108,111, 97,116,
+ 32,102, 97, 99, 41, 10,123, 10, 9, 99,111,108,111,114, 32, 61, 32,118,101, 99, 52, 40, 49, 46, 48, 41, 59, 10, 9,102, 97, 99,
+ 32, 61, 32, 49, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,100,101, 95,116,101,120, 95, 99,108,111,117,100,115, 40,
+118,101, 99, 51, 32, 99,111, 44, 32,102,108,111, 97,116, 32,115,105,122,101, 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,
+108,111,114, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,102, 97, 99, 41, 10,123, 10, 9, 99,111,108,111,114, 32, 61, 32,118,
+101, 99, 52, 40, 49, 46, 48, 41, 59, 10, 9,102, 97, 99, 32, 61, 32, 49, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,
+100,101, 95,116,101,120, 95,101,110,118,105,114,111,110,109,101,110,116, 40,118,101, 99, 51, 32, 99,111, 44, 32,115, 97,109,112,
+108,101,114, 50, 68, 32,105,109, 97, 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,108,111,114, 41, 10,123, 10, 9,102,108,
+111, 97,116, 32,117, 32, 61, 32, 40, 97,116, 97,110, 40, 99,111, 46,121, 44, 32, 99,111, 46,120, 41, 32, 43, 32, 77, 95, 80, 73,
+ 41, 47, 40, 50, 46, 48, 42, 77, 95, 80, 73, 41, 59, 10, 9,102,108,111, 97,116, 32,118, 32, 61, 32, 97,116, 97,110, 40, 99,111,
+ 46,122, 44, 32,104,121,112,111,116, 40, 99,111, 46,120, 44, 32, 99,111, 46,121, 41, 41, 47, 77, 95, 80, 73, 32, 43, 32, 48, 46,
+ 53, 59, 10, 10, 9, 99,111,108,111,114, 32, 61, 32,116,101,120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32,118,101, 99, 50,
+ 40,117, 44, 32,118, 41, 41, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,100,101, 95,116,101,120, 95,105,109, 97,103,101, 40,
+118,101, 99, 51, 32, 99,111, 44, 32,115, 97,109,112,108,101,114, 50, 68, 32,105,109, 97, 44, 32,111,117,116, 32,118,101, 99, 52,
+ 32, 99,111,108,111,114, 44, 32,111,117,116, 32,102,108,111, 97,116, 32, 97,108,112,104, 97, 41, 10,123, 10, 9, 99,111,108,111,
+114, 32, 61, 32,116,101,120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32, 99,111, 46,120,121, 41, 59, 10, 32, 32, 32, 32, 97,
+108,112,104, 97, 32, 61, 32, 99,111,108,111,114, 46, 97, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,100,101, 95,116,101,120,
+ 95,109, 97,103,105, 99, 40,118,101, 99, 51, 32,112, 44, 32,102,108,111, 97,116, 32,115, 99, 97,108,101, 44, 32,102,108,111, 97,
+116, 32,100,105,115,116,111,114,116,105,111,110, 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,108,111,114, 44, 32,111,117,
+116, 32,102,108,111, 97,116, 32,102, 97, 99, 41, 10,123, 10, 9, 99,111,108,111,114, 32, 61, 32,118,101, 99, 52, 40, 49, 46, 48,
+ 41, 59, 10, 9,102, 97, 99, 32, 61, 32, 49, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,100,101, 95,116,101,120, 95,
+109,117,115,103,114, 97,118,101, 40,118,101, 99, 51, 32, 99,111, 44, 32,102,108,111, 97,116, 32,115, 99, 97,108,101, 44, 32,102,
+108,111, 97,116, 32,100,101,116, 97,105,108, 44, 32,102,108,111, 97,116, 32,100,105,109,101,110,115,105,111,110, 44, 32,102,108,
+111, 97,116, 32,108, 97, 99,117,110, 97,114,105,116,121, 44, 32,102,108,111, 97,116, 32,111,102,102,115,101,116, 44, 32,102,108,
+111, 97,116, 32,103, 97,105,110, 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,108,111,114, 44, 32,111,117,116, 32,102,108,
+111, 97,116, 32,102, 97, 99, 41, 10,123, 10, 9, 99,111,108,111,114, 32, 61, 32,118,101, 99, 52, 40, 49, 46, 48, 41, 59, 10, 9,
+102, 97, 99, 32, 61, 32, 49, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,100,101, 95,116,101,120, 95,110,111,105,115,
+101, 40,118,101, 99, 51, 32, 99,111, 44, 32,102,108,111, 97,116, 32,115, 99, 97,108,101, 44, 32,102,108,111, 97,116, 32,100,101,
+116, 97,105,108, 44, 32,102,108,111, 97,116, 32,100,105,115,116,111,114,116,105,111,110, 44, 32,111,117,116, 32,118,101, 99, 52,
+ 32, 99,111,108,111,114, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,102, 97, 99, 41, 10,123, 10, 9, 99,111,108,111,114, 32,
+ 61, 32,118,101, 99, 52, 40, 49, 46, 48, 41, 59, 10, 9,102, 97, 99, 32, 61, 32, 49, 46, 48, 59, 10,125, 10, 10,118,111,105,100,
+ 32,110,111,100,101, 95,116,101,120, 95,115,107,121, 40,118,101, 99, 51, 32, 99,111, 44, 32,111,117,116, 32,118,101, 99, 52, 32,
+ 99,111,108,111,114, 41, 10,123, 10, 9, 99,111,108,111,114, 32, 61, 32,118,101, 99, 52, 40, 49, 46, 48, 41, 59, 10,125, 10, 10,
+118,111,105,100, 32,110,111,100,101, 95,116,101,120, 95,118,111,114,111,110,111,105, 40,118,101, 99, 51, 32, 99,111, 44, 32,102,
+108,111, 97,116, 32,115, 99, 97,108,101, 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,108,111,114, 44, 32,111,117,116, 32,
+102,108,111, 97,116, 32,102, 97, 99, 41, 10,123, 10, 9, 99,111,108,111,114, 32, 61, 32,118,101, 99, 52, 40, 49, 46, 48, 41, 59,
+ 10, 9,102, 97, 99, 32, 61, 32, 49, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,100,101, 95,116,101,120, 95,119, 97,
+118,101, 40,118,101, 99, 51, 32, 99,111, 44, 32,102,108,111, 97,116, 32,115, 99, 97,108,101, 44, 32,102,108,111, 97,116, 32,100,
+105,115,116,111,114,116,105,111,110, 44, 32,102,108,111, 97,116, 32,100,101,116, 97,105,108, 44, 32,102,108,111, 97,116, 32,100,
+101,116, 97,105,108, 95,115, 99, 97,108,101, 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,108,111,114, 44, 32,111,117,116,
+ 32,102,108,111, 97,116, 32,102, 97, 99, 41, 10,123, 10, 9, 99,111,108,111,114, 32, 61, 32,118,101, 99, 52, 40, 49, 46, 48, 41,
+ 59, 10, 9,102, 97, 99, 32, 61, 32, 49, 46, 48, 59, 10,125, 10, 10, 47, 42, 32,108,105,103,104,116, 32,112, 97,116,104, 32, 42,
+ 47, 10, 10,118,111,105,100, 32,110,111,100,101, 95,108,105,103,104,116, 95,112, 97,116,104, 40, 10, 9,111,117,116, 32,102,108,
+111, 97,116, 32,105,115, 95, 99, 97,109,101,114, 97, 95,114, 97,121, 44, 10, 9,111,117,116, 32,102,108,111, 97,116, 32,105,115,
+ 95,115,104, 97,100,111,119, 95,114, 97,121, 44, 10, 9,111,117,116, 32,102,108,111, 97,116, 32,105,115, 95,100,105,102,102,117,
+115,101, 95,114, 97,121, 44, 10, 9,111,117,116, 32,102,108,111, 97,116, 32,105,115, 95,103,108,111,115,115,121, 95,114, 97,121,
+ 44, 10, 9,111,117,116, 32,102,108,111, 97,116, 32,105,115, 95,115,105,110,103,117,108, 97,114, 95,114, 97,121, 44, 10, 9,111,
+117,116, 32,102,108,111, 97,116, 32,105,115, 95,114,101,102,108,101, 99,116,105,111,110, 95,114, 97,121, 44, 10, 9,111,117,116,
+ 32,102,108,111, 97,116, 32,105,115, 95,116,114, 97,110,115,109,105,115,115,105,111,110, 95,114, 97,121, 41, 10,123, 10, 9,105,
+115, 95, 99, 97,109,101,114, 97, 95,114, 97,121, 32, 61, 32, 49, 46, 48, 59, 10, 9,105,115, 95,115,104, 97,100,111,119, 95,114,
+ 97,121, 32, 61, 32, 48, 46, 48, 59, 10, 9,105,115, 95,100,105,102,102,117,115,101, 95,114, 97,121, 32, 61, 32, 48, 46, 48, 59,
+ 10, 9,105,115, 95,103,108,111,115,115,121, 95,114, 97,121, 32, 61, 32, 48, 46, 48, 59, 10, 9,105,115, 95,115,105,110,103,117,
+108, 97,114, 95,114, 97,121, 32, 61, 32, 48, 46, 48, 59, 10, 9,105,115, 95,114,101,102,108,101, 99,116,105,111,110, 95,114, 97,
+121, 32, 61, 32, 48, 46, 48, 59, 10, 9,105,115, 95,116,114, 97,110,115,109,105,115,115,105,111,110, 95,114, 97,121, 32, 61, 32,
+ 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,100,101, 95,108,105,103,104,116, 95,102, 97,108,108,111,102,102, 40,
+102,108,111, 97,116, 32,115,116,114,101,110,103,116,104, 44, 32,102,108,111, 97,116, 32,116,115,109,111,111,116,104, 44, 32,111,
+117,116, 32,102,108,111, 97,116, 32,113,117, 97,100,114, 97,116,105, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,108,105,
+110,101, 97,114, 44, 32,111,117,116, 32,102,108,111, 97,116, 32, 99,111,110,115,116, 97,110,116, 41, 10,123, 10, 9,113,117, 97,
+100,114, 97,116,105, 99, 32, 61, 32,115,116,114,101,110,103,116,104, 59, 10, 9,108,105,110,101, 97,114, 32, 61, 32,115,116,114,
+101,110,103,116,104, 59, 10, 9, 99,111,110,115,116, 97,110,116, 32, 61, 32,115,116,114,101,110,103,116,104, 59, 10,125, 10, 10,
+ 47, 42, 32,111,117,116,112,117,116, 32, 42, 47, 10, 10,118,111,105,100, 32,110,111,100,101, 95,111,117,116,112,117,116, 95,109,
+ 97,116,101,114,105, 97,108, 40,118,101, 99, 52, 32,115,117,114,102, 97, 99,101, 44, 32,118,101, 99, 52, 32,118,111,108,117,109,
+101, 44, 32,102,108,111, 97,116, 32,100,105,115,112,108, 97, 99,101,109,101,110,116, 44, 32,111,117,116, 32,118,101, 99, 52, 32,
+114,101,115,117,108,116, 41, 10,123, 10, 9,114,101,115,117,108,116, 32, 61, 32,115,117,114,102, 97, 99,101, 59, 10,125, 10, 10,
+ 0};
+
diff --git a/source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_frag.glsl b/source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_frag.glsl
new file mode 100644
index 00000000000..5f0de8ae0fd
--- /dev/null
+++ b/source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_frag.glsl
@@ -0,0 +1,16 @@
+uniform vec2 ScaleU;
+uniform sampler2D textureSource;
+
+void main()
+{
+ vec4 color = vec4(0.0);
+ color += texture2D( textureSource, gl_TexCoord[0].st + vec2( -3.0*ScaleU.x, -3.0*ScaleU.y ) ) * 0.015625;
+ color += texture2D( textureSource, gl_TexCoord[0].st + vec2( -2.0*ScaleU.x, -2.0*ScaleU.y ) )*0.09375;
+ color += texture2D( textureSource, gl_TexCoord[0].st + vec2( -1.0*ScaleU.x, -1.0*ScaleU.y ) )*0.234375;
+ color += texture2D( textureSource, gl_TexCoord[0].st + vec2( 0.0 , 0.0) )*0.3125;
+ color += texture2D( textureSource, gl_TexCoord[0].st + vec2( 1.0*ScaleU.x, 1.0*ScaleU.y ) )*0.234375;
+ color += texture2D( textureSource, gl_TexCoord[0].st + vec2( 2.0*ScaleU.x, 2.0*ScaleU.y ) )*0.09375;
+ color += texture2D( textureSource, gl_TexCoord[0].st + vec2( 3.0*ScaleU.x, -3.0*ScaleU.y ) ) * 0.015625;
+
+ gl_FragColor = color;
+}
diff --git a/source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_frag.glsl.c b/source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_frag.glsl.c
new file mode 100644
index 00000000000..3419a1f6936
--- /dev/null
+++ b/source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_frag.glsl.c
@@ -0,0 +1,33 @@
+/* DataToC output of file <gpu_shader_sep_gaussian_blur_frag_glsl> */
+
+int datatoc_gpu_shader_sep_gaussian_blur_frag_glsl_size = 848;
+char datatoc_gpu_shader_sep_gaussian_blur_frag_glsl[] = {
+117,110,105,102,111,114,109, 32,118,101, 99, 50, 32, 83, 99, 97,
+108,101, 85, 59, 13, 10,117,110,105,102,111,114,109, 32,115, 97,109,112,108,101,114, 50, 68, 32,116,101,120,116,117,114,101, 83,
+111,117,114, 99,101, 59, 13, 10, 13, 10,118,111,105,100, 32,109, 97,105,110, 40, 41, 13, 10,123, 13, 10, 9,118,101, 99, 52, 32,
+ 99,111,108,111,114, 32, 61, 32,118,101, 99, 52, 40, 48, 46, 48, 41, 59, 13, 10, 9, 99,111,108,111,114, 32, 43, 61, 32,116,101,
+120,116,117,114,101, 50, 68, 40, 32,116,101,120,116,117,114,101, 83,111,117,114, 99,101, 44, 32,103,108, 95, 84,101,120, 67,111,
+111,114,100, 91, 48, 93, 46,115,116, 32, 43, 32,118,101, 99, 50, 40, 32, 45, 51, 46, 48, 42, 83, 99, 97,108,101, 85, 46,120, 44,
+ 32, 45, 51, 46, 48, 42, 83, 99, 97,108,101, 85, 46,121, 32, 41, 32, 41, 32, 42, 32, 48, 46, 48, 49, 53, 54, 50, 53, 59, 13, 10,
+ 9, 99,111,108,111,114, 32, 43, 61, 32,116,101,120,116,117,114,101, 50, 68, 40, 32,116,101,120,116,117,114,101, 83,111,117,114,
+ 99,101, 44, 32,103,108, 95, 84,101,120, 67,111,111,114,100, 91, 48, 93, 46,115,116, 32, 43, 32,118,101, 99, 50, 40, 32, 45, 50,
+ 46, 48, 42, 83, 99, 97,108,101, 85, 46,120, 44, 32, 45, 50, 46, 48, 42, 83, 99, 97,108,101, 85, 46,121, 32, 41, 32, 41, 42, 48,
+ 46, 48, 57, 51, 55, 53, 59, 13, 10, 9, 99,111,108,111,114, 32, 43, 61, 32,116,101,120,116,117,114,101, 50, 68, 40, 32,116,101,
+120,116,117,114,101, 83,111,117,114, 99,101, 44, 32,103,108, 95, 84,101,120, 67,111,111,114,100, 91, 48, 93, 46,115,116, 32, 43,
+ 32,118,101, 99, 50, 40, 32, 45, 49, 46, 48, 42, 83, 99, 97,108,101, 85, 46,120, 44, 32, 45, 49, 46, 48, 42, 83, 99, 97,108,101,
+ 85, 46,121, 32, 41, 32, 41, 42, 48, 46, 50, 51, 52, 51, 55, 53, 59, 13, 10, 9, 99,111,108,111,114, 32, 43, 61, 32,116,101,120,
+116,117,114,101, 50, 68, 40, 32,116,101,120,116,117,114,101, 83,111,117,114, 99,101, 44, 32,103,108, 95, 84,101,120, 67,111,111,
+114,100, 91, 48, 93, 46,115,116, 32, 43, 32,118,101, 99, 50, 40, 32, 48, 46, 48, 32, 44, 32, 48, 46, 48, 41, 32, 41, 42, 48, 46,
+ 51, 49, 50, 53, 59, 13, 10, 9, 99,111,108,111,114, 32, 43, 61, 32,116,101,120,116,117,114,101, 50, 68, 40, 32,116,101,120,116,
+117,114,101, 83,111,117,114, 99,101, 44, 32,103,108, 95, 84,101,120, 67,111,111,114,100, 91, 48, 93, 46,115,116, 32, 43, 32,118,
+101, 99, 50, 40, 32, 49, 46, 48, 42, 83, 99, 97,108,101, 85, 46,120, 44, 32, 32, 49, 46, 48, 42, 83, 99, 97,108,101, 85, 46,121,
+ 32, 41, 32, 41, 42, 48, 46, 50, 51, 52, 51, 55, 53, 59, 13, 10, 9, 99,111,108,111,114, 32, 43, 61, 32,116,101,120,116,117,114,
+101, 50, 68, 40, 32,116,101,120,116,117,114,101, 83,111,117,114, 99,101, 44, 32,103,108, 95, 84,101,120, 67,111,111,114,100, 91,
+ 48, 93, 46,115,116, 32, 43, 32,118,101, 99, 50, 40, 32, 50, 46, 48, 42, 83, 99, 97,108,101, 85, 46,120, 44, 32, 32, 50, 46, 48,
+ 42, 83, 99, 97,108,101, 85, 46,121, 32, 41, 32, 41, 42, 48, 46, 48, 57, 51, 55, 53, 59, 13, 10, 9, 99,111,108,111,114, 32, 43,
+ 61, 32,116,101,120,116,117,114,101, 50, 68, 40, 32,116,101,120,116,117,114,101, 83,111,117,114, 99,101, 44, 32,103,108, 95, 84,
+101,120, 67,111,111,114,100, 91, 48, 93, 46,115,116, 32, 43, 32,118,101, 99, 50, 40, 32, 51, 46, 48, 42, 83, 99, 97,108,101, 85,
+ 46,120, 44, 32, 45, 51, 46, 48, 42, 83, 99, 97,108,101, 85, 46,121, 32, 41, 32, 41, 32, 42, 32, 48, 46, 48, 49, 53, 54, 50, 53,
+ 59, 13, 10, 13, 10, 9,103,108, 95, 70,114, 97,103, 67,111,108,111,114, 32, 61, 32, 99,111,108,111,114, 59, 13, 10,125, 13, 10,
+ 0};
+
diff --git a/source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_vert.glsl b/source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_vert.glsl
new file mode 100644
index 00000000000..9bb2e7ad469
--- /dev/null
+++ b/source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_vert.glsl
@@ -0,0 +1,6 @@
+
+void main()
+{
+ gl_Position = ftransform();
+ gl_TexCoord[0] = gl_MultiTexCoord0;
+}
diff --git a/source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_vert.glsl.c b/source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_vert.glsl.c
new file mode 100644
index 00000000000..5eea72503ce
--- /dev/null
+++ b/source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_vert.glsl.c
@@ -0,0 +1,9 @@
+/* DataToC output of file <gpu_shader_sep_gaussian_blur_vert_glsl> */
+
+int datatoc_gpu_shader_sep_gaussian_blur_vert_glsl_size = 92;
+char datatoc_gpu_shader_sep_gaussian_blur_vert_glsl[] = {
+ 13, 10,118,111,105,100, 32,109, 97,105,110, 40, 41, 13, 10,123, 13, 10, 9, 9,103,108, 95, 80,111,115,105,116,
+105,111,110, 32, 61, 32,102,116,114, 97,110,115,102,111,114,109, 40, 41, 59, 13, 10, 9, 9,103,108, 95, 84,101,120, 67,111,111,
+114,100, 91, 48, 93, 32, 61, 32, 32,103,108, 95, 77,117,108,116,105, 84,101,120, 67,111,111,114,100, 48, 59, 13, 10,125, 13, 10,
+ 0};
+
diff --git a/source/blender/gpu/intern/gpu_shader_vertex.glsl b/source/blender/gpu/shaders/gpu_shader_vertex.glsl
index a86431bdd7a..a86431bdd7a 100644
--- a/source/blender/gpu/intern/gpu_shader_vertex.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_vertex.glsl
diff --git a/source/blender/gpu/shaders/gpu_shader_vertex.glsl.c b/source/blender/gpu/shaders/gpu_shader_vertex.glsl.c
new file mode 100644
index 00000000000..bd827efd1b7
--- /dev/null
+++ b/source/blender/gpu/shaders/gpu_shader_vertex.glsl.c
@@ -0,0 +1,14 @@
+/* DataToC output of file <gpu_shader_vertex_glsl> */
+
+int datatoc_gpu_shader_vertex_glsl_size = 240;
+char datatoc_gpu_shader_vertex_glsl[] = {
+ 13, 10,118, 97,114,121,105,110,103, 32,118,101, 99, 51, 32,118,
+ 97,114,112,111,115,105,116,105,111,110, 59, 13, 10,118, 97,114,121,105,110,103, 32,118,101, 99, 51, 32,118, 97,114,110,111,114,
+109, 97,108, 59, 13, 10, 13, 10,118,111,105,100, 32,109, 97,105,110, 40, 41, 13, 10,123, 13, 10, 9,118,101, 99, 52, 32, 99,111,
+ 32, 61, 32,103,108, 95, 77,111,100,101,108, 86,105,101,119, 77, 97,116,114,105,120, 32, 42, 32,103,108, 95, 86,101,114,116,101,
+120, 59, 13, 10, 13, 10, 9,118, 97,114,112,111,115,105,116,105,111,110, 32, 61, 32, 99,111, 46,120,121,122, 59, 13, 10, 9,118,
+ 97,114,110,111,114,109, 97,108, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40,103,108, 95, 78,111,114,109, 97,108, 77, 97,
+116,114,105,120, 32, 42, 32,103,108, 95, 78,111,114,109, 97,108, 41, 59, 13, 10, 9,103,108, 95, 80,111,115,105,116,105,111,110,
+ 32, 61, 32,103,108, 95, 80,114,111,106,101, 99,116,105,111,110, 77, 97,116,114,105,120, 32, 42, 32, 99,111, 59, 13, 10, 13, 10,
+ 0};
+
diff --git a/source/blender/gpu/shaders/gpu_shader_vsm_store_frag.glsl b/source/blender/gpu/shaders/gpu_shader_vsm_store_frag.glsl
new file mode 100644
index 00000000000..4838289ff9e
--- /dev/null
+++ b/source/blender/gpu/shaders/gpu_shader_vsm_store_frag.glsl
@@ -0,0 +1,21 @@
+/**
+ * This fragment shader was initially found at http://fabiensanglard.net/shadowmappingVSM/index.php
+ */
+
+varying vec4 v_position;
+
+void main()
+{
+ float depth = v_position.z / v_position.w;
+ depth = depth * 0.5 + 0.5;
+
+ float moment1 = depth;
+ float moment2 = depth * depth;
+
+ // Adjusting moments using partial derivative
+ float dx = dFdx(depth);
+ float dy = dFdy(depth);
+ moment2 += 0.25*(dx*dx+dy*dy);
+
+ gl_FragColor = vec4(moment1, moment2, 0.0, 0.0);
+}
diff --git a/source/blender/gpu/shaders/gpu_shader_vsm_store_frag.glsl.c b/source/blender/gpu/shaders/gpu_shader_vsm_store_frag.glsl.c
new file mode 100644
index 00000000000..c4f4f76edaf
--- /dev/null
+++ b/source/blender/gpu/shaders/gpu_shader_vsm_store_frag.glsl.c
@@ -0,0 +1,22 @@
+/* DataToC output of file <gpu_shader_vsm_store_frag_glsl> */
+
+int datatoc_gpu_shader_vsm_store_frag_glsl_size = 482;
+char datatoc_gpu_shader_vsm_store_frag_glsl[] = {
+ 47, 42,
+ 42, 13, 10, 32, 42, 32, 84,104,105,115, 32,102,114, 97,103,109,101,110,116, 32,115,104, 97,100,101,114, 32,119, 97,115, 32,105,
+110,105,116,105, 97,108,108,121, 32,102,111,117,110,100, 32, 97,116, 32,104,116,116,112, 58, 47, 47,102, 97, 98,105,101,110,115,
+ 97,110,103,108, 97,114,100, 46,110,101,116, 47,115,104, 97,100,111,119,109, 97,112,112,105,110,103, 86, 83, 77, 47,105,110,100,
+101,120, 46,112,104,112, 13, 10, 32, 42, 47, 13, 10, 13, 10,118, 97,114,121,105,110,103, 32,118,101, 99, 52, 32,118, 95,112,111,
+115,105,116,105,111,110, 59, 13, 10, 13, 10,118,111,105,100, 32,109, 97,105,110, 40, 41, 13, 10,123, 13, 10, 9,102,108,111, 97,
+116, 32,100,101,112,116,104, 32, 61, 32,118, 95,112,111,115,105,116,105,111,110, 46,122, 32, 47, 32,118, 95,112,111,115,105,116,
+105,111,110, 46,119, 59, 13, 10, 9,100,101,112,116,104, 32, 61, 32,100,101,112,116,104, 32, 42, 32, 48, 46, 53, 32, 43, 32, 48,
+ 46, 53, 59, 13, 10, 13, 10, 9,102,108,111, 97,116, 32,109,111,109,101,110,116, 49, 32, 61, 32,100,101,112,116,104, 59, 13, 10,
+ 9,102,108,111, 97,116, 32,109,111,109,101,110,116, 50, 32, 61, 32,100,101,112,116,104, 32, 42, 32,100,101,112,116,104, 59, 13,
+ 10, 13, 10, 9, 47, 47, 32, 65,100,106,117,115,116,105,110,103, 32,109,111,109,101,110,116,115, 32,117,115,105,110,103, 32,112,
+ 97,114,116,105, 97,108, 32,100,101,114,105,118, 97,116,105,118,101, 13, 10, 9,102,108,111, 97,116, 32,100,120, 32, 61, 32,100,
+ 70,100,120, 40,100,101,112,116,104, 41, 59, 13, 10, 9,102,108,111, 97,116, 32,100,121, 32, 61, 32,100, 70,100,121, 40,100,101,
+112,116,104, 41, 59, 13, 10, 9,109,111,109,101,110,116, 50, 32, 43, 61, 32, 48, 46, 50, 53, 42, 40,100,120, 42,100,120, 43,100,
+121, 42,100,121, 41, 59, 13, 10, 13, 10, 9,103,108, 95, 70,114, 97,103, 67,111,108,111,114, 32, 61, 32,118,101, 99, 52, 40,109,
+111,109,101,110,116, 49, 44, 32,109,111,109,101,110,116, 50, 44, 32, 48, 46, 48, 44, 32, 48, 46, 48, 41, 59, 13, 10,125, 13, 10,
+ 0};
+
diff --git a/source/blender/gpu/shaders/gpu_shader_vsm_store_vert.glsl b/source/blender/gpu/shaders/gpu_shader_vsm_store_vert.glsl
new file mode 100644
index 00000000000..224c3e78adc
--- /dev/null
+++ b/source/blender/gpu/shaders/gpu_shader_vsm_store_vert.glsl
@@ -0,0 +1,7 @@
+varying vec4 v_position;
+
+void main()
+{
+ gl_Position = ftransform();
+ v_position = gl_Position;
+}
diff --git a/source/blender/gpu/shaders/gpu_shader_vsm_store_vert.glsl.c b/source/blender/gpu/shaders/gpu_shader_vsm_store_vert.glsl.c
new file mode 100644
index 00000000000..51b9cab372f
--- /dev/null
+++ b/source/blender/gpu/shaders/gpu_shader_vsm_store_vert.glsl.c
@@ -0,0 +1,10 @@
+/* DataToC output of file <gpu_shader_vsm_store_vert_glsl> */
+
+int datatoc_gpu_shader_vsm_store_vert_glsl_size = 105;
+char datatoc_gpu_shader_vsm_store_vert_glsl[] = {
+118, 97,114,121,105,110,103, 32,118,
+101, 99, 52, 32,118, 95,112,111,115,105,116,105,111,110, 59, 13, 10, 13, 10,118,111,105,100, 32,109, 97,105,110, 40, 41, 13, 10,
+123, 13, 10, 9,103,108, 95, 80,111,115,105,116,105,111,110, 32, 61, 32,102,116,114, 97,110,115,102,111,114,109, 40, 41, 59, 13,
+ 10, 9,118, 95,112,111,115,105,116,105,111,110, 32, 61, 32,103,108, 95, 80,111,115,105,116,105,111,110, 59, 13, 10,125, 13, 10,
+ 0};
+
diff --git a/source/blender/ikplugin/intern/iksolver_plugin.c b/source/blender/ikplugin/intern/iksolver_plugin.c
index 8d4d01b7e97..c726102247a 100644
--- a/source/blender/ikplugin/intern/iksolver_plugin.c
+++ b/source/blender/ikplugin/intern/iksolver_plugin.c
@@ -229,7 +229,7 @@ static void where_is_ik_bone(bPoseChannel *pchan, float ik_mat[][3]) // nr = t
}
-/* called from within the core where_is_pose loop, all animsystems and constraints
+/* called from within the core BKE_pose_where_is loop, all animsystems and constraints
* were executed & assigned. Now as last we do an IK pass */
static void execute_posetree(struct Scene *scene, Object *ob, PoseTree *tree)
{
@@ -425,10 +425,10 @@ static void execute_posetree(struct Scene *scene, Object *ob, PoseTree *tree)
goalpos[2]= fac*goalpos[2] + mfac*world_pose[3][2];
/* blend rotation */
- mat3_to_quat( q1,goalrot);
- mat4_to_quat( q2,world_pose);
+ mat3_to_quat(q1, goalrot);
+ mat4_to_quat(q2, world_pose);
interp_qt_qtqt(q, q1, q2, mfac);
- quat_to_mat3( goalrot,q);
+ quat_to_mat3(goalrot, q);
}
iktarget= iktree[target->tip];
@@ -535,8 +535,8 @@ void iksolver_execute_tree(struct Scene *scene, struct Object *ob, struct bPose
/* 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
- where_is_pose_bone(scene, ob, tree->pchan[a], ctime, 1);
- // tell blender that this channel was controlled by IK, it's cleared on each where_is_pose()
+ BKE_pose_where_is_bone(scene, ob, tree->pchan[a], ctime, 1);
+ // tell blender that this channel was controlled by IK, it's cleared on each BKE_pose_where_is()
tree->pchan[a]->flag |= POSE_CHAIN;
}
/* 5. execute the IK solver */
diff --git a/source/blender/ikplugin/intern/itasc_plugin.cpp b/source/blender/ikplugin/intern/itasc_plugin.cpp
index ccfe2eaa862..d94529b6104 100644
--- a/source/blender/ikplugin/intern/itasc_plugin.cpp
+++ b/source/blender/ikplugin/intern/itasc_plugin.cpp
@@ -418,22 +418,22 @@ static IK_Data* get_ikdata(bPose *pose)
// here init ikdata if needed
// now that we have scene, make sure the default param are initialized
if (!DefIKParam.iksolver)
- init_pose_itasc(&DefIKParam);
+ BKE_pose_itasc_init(&DefIKParam);
return (IK_Data*)pose->ikdata;
}
static double EulerAngleFromMatrix(const KDL::Rotation& R, int axis)
{
- double t = KDL::sqrt(R(0,0)*R(0,0) + R(0,1)*R(0,1));
+ double t = KDL::sqrt(R(0, 0)*R(0, 0) + R(0, 1)*R(0, 1));
if (t > 16.0*KDL::epsilon) {
- if (axis == 0) return -KDL::atan2(R(1,2), R(2,2));
- else if (axis == 1) return KDL::atan2(-R(0,2), t);
- else return -KDL::atan2(R(0,1), R(0,0));
+ if (axis == 0) return -KDL::atan2(R(1, 2), R(2, 2));
+ else if (axis == 1) return KDL::atan2(-R(0, 2), t);
+ else return -KDL::atan2(R(0, 1), R(0, 0));
}
else {
- if (axis == 0) return -KDL::atan2(-R(2,1), R(1,1));
- else if (axis == 1) return KDL::atan2(-R(0,2), t);
+ if (axis == 0) return -KDL::atan2(-R(2, 1), R(1, 1));
+ else if (axis == 1) return KDL::atan2(-R(0, 2), t);
else return 0.0f;
}
}
@@ -441,8 +441,8 @@ 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
- double qy = R(0,2) - R(2,0);
- double qw = R(0,0) + R(1,1) + R(2,2) + 1;
+ double qy = R(0, 2) - R(2, 0);
+ double qw = R(0, 0) + R(1, 1) + R(2, 2) + 1;
double tau = 2*KDL::atan2(qy, qw);
@@ -471,39 +471,38 @@ static void RemoveEulerAngleFromMatrix(KDL::Rotation& R, double angle, int axis)
}
#if 0
-static void GetEulerXZY(const KDL::Rotation& R, double& X,double& Z,double& Y)
+static void GetEulerXZY(const KDL::Rotation& R, double& X, double& Z, double& Y)
{
- if (fabs(R(0,1)) > 1.0 - KDL::epsilon ) {
- X = -KDL::sign(R(0,1)) * KDL::atan2(R(1,2), R(1,0));
- Z = -KDL::sign(R(0,1)) * KDL::PI / 2;
+ if (fabs(R(0, 1)) > 1.0 - KDL::epsilon ) {
+ X = -KDL::sign(R(0, 1)) * KDL::atan2(R(1, 2), R(1, 0));
+ Z = -KDL::sign(R(0, 1)) * KDL::PI / 2;
Y = 0.0;
}
else {
- X = KDL::atan2(R(2,1), R(1,1));
- Z = KDL::atan2(-R(0,1), KDL::sqrt( KDL::sqr(R(0,0)) + KDL::sqr(R(0,2))));
- Y = KDL::atan2(R(0,2), R(0,0));
+ X = KDL::atan2(R(2, 1), R(1, 1));
+ Z = KDL::atan2(-R(0, 1), KDL::sqrt( KDL::sqr(R(0, 0)) + KDL::sqr(R(0, 2))));
+ Y = KDL::atan2(R(0, 2), R(0, 0));
}
}
-static void GetEulerXYZ(const KDL::Rotation& R, double& X,double& Y,double& Z)
+static void GetEulerXYZ(const KDL::Rotation& R, double& X, double& Y, double& Z)
{
- if (fabs(R(0,2)) > 1.0 - KDL::epsilon ) {
- X = KDL::sign(R(0,2)) * KDL::atan2(-R(1,0), R(1,1));
- Y = KDL::sign(R(0,2)) * KDL::PI / 2;
+ if (fabs(R(0, 2)) > 1.0 - KDL::epsilon ) {
+ X = KDL::sign(R(0, 2)) * KDL::atan2(-R(1, 0), R(1, 1));
+ Y = KDL::sign(R(0, 2)) * KDL::PI / 2;
Z = 0.0;
}
else {
- X = KDL::atan2(-R(1,2), R(2,2));
- Y = KDL::atan2(R(0,2), KDL::sqrt( KDL::sqr(R(0,0)) + KDL::sqr(R(0,1))));
- Z = KDL::atan2(-R(0,1), R(0,0));
+ X = KDL::atan2(-R(1, 2), R(2, 2));
+ Y = KDL::atan2(R(0, 2), KDL::sqrt( KDL::sqr(R(0, 0)) + KDL::sqr(R(0, 1))));
+ Z = KDL::atan2(-R(0, 1), R(0, 0));
}
}
#endif
static void GetJointRotation(KDL::Rotation& boneRot, int type, double* rot)
{
- switch (type & ~IK_TRANSY)
- {
+ switch (type & ~IK_TRANSY) {
default:
// fixed bone, no joint
break;
@@ -805,16 +804,16 @@ static bool joint_callback(const iTaSC::Timestamp& timestamp, iTaSC::ConstraintV
if (chan->rotmode > 0) {
/* euler rotations (will cause gimble lock, but this can be alleviated a bit with rotation orders) */
- eulO_to_mat3( rmat,chan->eul, chan->rotmode);
+ eulO_to_mat3( rmat, chan->eul, chan->rotmode);
}
else if (chan->rotmode == ROT_MODE_AXISANGLE) {
/* axis-angle - stored in quaternion data, but not really that great for 3D-changing orientations */
- axis_angle_to_mat3( rmat,&chan->quat[1], chan->quat[0]);
+ axis_angle_to_mat3( rmat, &chan->quat[1], chan->quat[0]);
}
else {
/* quats are normalised before use to eliminate scaling issues */
normalize_qt(chan->quat);
- quat_to_mat3( rmat,chan->quat);
+ quat_to_mat3(rmat, chan->quat);
}
KDL::Rotation jointRot(
rmat[0][0], rmat[1][0], rmat[2][0],
@@ -825,8 +824,7 @@ static bool joint_callback(const iTaSC::Timestamp& timestamp, iTaSC::ConstraintV
}
// determine which part of jointValue is used for this joint
// closely related to the way the joints are defined
- switch (ikchan->jointType & ~IK_TRANSY)
- {
+ switch (ikchan->jointType & ~IK_TRANSY) {
case IK_XDOF:
case IK_YDOF:
case IK_ZDOF:
@@ -881,15 +879,21 @@ static int convert_channels(IK_Scene *ikscene, PoseTree *tree)
/* set DoF flag */
flag = 0;
- if (!(pchan->ikflag & BONE_IK_NO_XDOF) && !(pchan->ikflag & BONE_IK_NO_XDOF_TEMP) &&
- (!(pchan->ikflag & BONE_IK_XLIMIT) || pchan->limitmin[0]<0.f || pchan->limitmax[0]>0.f))
+ if (!(pchan->ikflag & BONE_IK_NO_XDOF) && !(pchan->ikflag & BONE_IK_NO_XDOF_TEMP) &&
+ (!(pchan->ikflag & BONE_IK_XLIMIT) || pchan->limitmin[0]<0.f || pchan->limitmax[0]>0.f))
+ {
flag |= IK_XDOF;
+ }
if (!(pchan->ikflag & BONE_IK_NO_YDOF) && !(pchan->ikflag & BONE_IK_NO_YDOF_TEMP) &&
- (!(pchan->ikflag & BONE_IK_YLIMIT) || pchan->limitmin[1]<0.f || pchan->limitmax[1]>0.f))
+ (!(pchan->ikflag & BONE_IK_YLIMIT) || pchan->limitmin[1]<0.f || pchan->limitmax[1]>0.f))
+ {
flag |= IK_YDOF;
+ }
if (!(pchan->ikflag & BONE_IK_NO_ZDOF) && !(pchan->ikflag & BONE_IK_NO_ZDOF_TEMP) &&
- (!(pchan->ikflag & BONE_IK_ZLIMIT) || pchan->limitmin[2]<0.f || pchan->limitmax[2]>0.f))
+ (!(pchan->ikflag & BONE_IK_ZLIMIT) || pchan->limitmin[2]<0.f || pchan->limitmax[2]>0.f))
+ {
flag |= IK_ZDOF;
+ }
if (tree->stretch && (pchan->ikstretch > 0.0)) {
flag |= IK_TRANSY;
@@ -921,8 +925,7 @@ static int convert_channels(IK_Scene *ikscene, PoseTree *tree)
* bone length is computed from bone->length multiplied by the scaling factor of
* the armature. Non-uniform scaling will give bad result!
*/
- switch (flag & (IK_XDOF|IK_YDOF|IK_ZDOF))
- {
+ switch (flag & (IK_XDOF|IK_YDOF|IK_ZDOF)) {
default:
ikchan->jointType = 0;
ikchan->ndof = 0;
@@ -1020,7 +1023,7 @@ static void convert_pose(IK_Scene *ikscene)
}
// compute array of joint value corresponding to current pose
-static void rest_pose(IK_Scene *ikscene)
+static void BKE_pose_rest(IK_Scene *ikscene)
{
bPoseChannel *pchan;
IK_Channel *ikchan;
@@ -1130,7 +1133,7 @@ static IK_Scene* convert_tree(Scene *blscene, Object *ob, bPoseChannel *pchan)
}
else {
// in Blender, the rest pose is always 0 for joints
- rest_pose(ikscene);
+ BKE_pose_rest(ikscene);
}
rot = &ikscene->jointArray(0);
for (a=0, ikchan = ikscene->channels; a<tree->totchannel; ++a, ++ikchan) {
@@ -1165,8 +1168,7 @@ static IK_Scene* convert_tree(Scene *blscene, Object *ob, bPoseChannel *pchan)
weight[0] = (1.0-pchan->stiffness[0]);
weight[1] = (1.0-pchan->stiffness[1]);
weight[2] = (1.0-pchan->stiffness[2]);
- switch (ikchan->jointType & ~IK_TRANSY)
- {
+ switch (ikchan->jointType & ~IK_TRANSY) {
case 0:
// fixed bone
if (!(ikchan->jointType & IK_TRANSY)) {
@@ -1386,7 +1388,7 @@ static IK_Scene* convert_tree(Scene *blscene, Object *ob, bPoseChannel *pchan)
e_matrix& Wq = arm->getWq();
assert(Wq.cols() == (int)weights.size());
for (int q=0; q<Wq.cols(); q++)
- Wq(q,q)=weights[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
@@ -1512,7 +1514,7 @@ static void create_scene(Scene *scene, Object *ob)
ikdata->first = ikscene;
}
// delete the trees once we are done
- while(tree) {
+ while (tree) {
BLI_remlink(&pchan->iktree, tree);
BLI_freelistN(&tree->targets);
if (tree->pchan) MEM_freeN(tree->pchan);
@@ -1543,7 +1545,7 @@ static void execute_scene(Scene* blscene, IK_Scene* ikscene, bItasc* ikparam, fl
if (ikparam->flag & ITASC_SIMULATION) {
for (i=0, ikchan=ikscene->channels; i<ikscene->numchan; i++, ++ikchan) {
// In simulation mode we don't allow external contraint to change our bones, mark the channel done
- // also tell Blender that this channel is part of IK tree (cleared on each where_is_pose()
+ // 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;
}
@@ -1552,8 +1554,8 @@ static void execute_scene(Scene* blscene, IK_Scene* ikscene, bItasc* ikparam, fl
// 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))
- where_is_pose_bone(blscene, ikscene->blArmature, ikchan->pchan, ctime, 1);
- // tell blender that this channel was controlled by IK, it's cleared on each where_is_pose()
+ BKE_pose_where_is_bone(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()
ikchan->pchan->flag |= (POSE_DONE|POSE_CHAIN);
ikchan->jointValid = 0;
}
@@ -1610,10 +1612,12 @@ static void execute_scene(Scene* blscene, IK_Scene* ikscene, bItasc* ikparam, fl
ikscene->scene->update(timestamp, timestep, numstep, false, !reiterate, simulation);
if (reiterate) {
// how many times do we reiterate?
- for (i=0; i<ikparam->numiter; i++) {
+ for (i = 0; i<ikparam->numiter; i++) {
if (ikscene->armature->getMaxJointChange() < ikparam->precision ||
- ikscene->armature->getMaxEndEffectorChange() < ikparam->precision)
+ ikscene->armature->getMaxEndEffectorChange() < ikparam->precision)
+ {
break;
+ }
ikscene->scene->update(timestamp, timestep, numstep, true, false, simulation);
}
if (simulation) {
diff --git a/source/blender/imbuf/IMB_imbuf_types.h b/source/blender/imbuf/IMB_imbuf_types.h
index 076f518585b..12d71be658e 100644
--- a/source/blender/imbuf/IMB_imbuf_types.h
+++ b/source/blender/imbuf/IMB_imbuf_types.h
@@ -1,17 +1,4 @@
/*
- * IMB_imbuf_types.h (mar-2001 nzc)
- *
- * Types needed for using the image buffer.
- *
- * Imbuf is external code, slightly adapted to live in the Blender
- * context. It requires an external jpeg module, and the avi-module
- * (also external code) in order to function correctly.
- *
- * This file contains types and some constants that go with them. Most
- * are self-explanatory (e.g. IS_amiga tests whether the buffer
- * contains an Amiga-format file).
- *
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -37,16 +24,27 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
+
+#ifndef __IMB_IMBUF_TYPES_H__
+#define __IMB_IMBUF_TYPES_H__
+
/**
* \file IMB_imbuf_types.h
* \ingroup imbuf
* \brief Contains defines and structs used throughout the imbuf module.
* \todo Clean up includes.
+ *
+ * Types needed for using the image buffer.
+ *
+ * Imbuf is external code, slightly adapted to live in the Blender
+ * context. It requires an external jpeg module, and the avi-module
+ * (also external code) in order to function correctly.
+ *
+ * This file contains types and some constants that go with them. Most
+ * are self-explanatory (e.g. IS_amiga tests whether the buffer
+ * contains an Amiga-format file).
*/
-#ifndef __IMB_IMBUF_TYPES_H__
-#define __IMB_IMBUF_TYPES_H__
-
struct ImMetaData;
#define IB_MIPMAP_LEVELS 20
diff --git a/source/blender/imbuf/intern/IMB_allocimbuf.h b/source/blender/imbuf/intern/IMB_allocimbuf.h
index 27be9ea1cab..047228926ee 100644
--- a/source/blender/imbuf/intern/IMB_allocimbuf.h
+++ b/source/blender/imbuf/intern/IMB_allocimbuf.h
@@ -1,7 +1,4 @@
/*
- * allocimbuf.h
- *
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/imbuf/intern/IMB_anim.h b/source/blender/imbuf/intern/IMB_anim.h
index 8724f3804d0..6920d49ff51 100644
--- a/source/blender/imbuf/intern/IMB_anim.h
+++ b/source/blender/imbuf/intern/IMB_anim.h
@@ -1,7 +1,4 @@
/*
- * allocimbuf.h
- *
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/imbuf/intern/IMB_filter.h b/source/blender/imbuf/intern/IMB_filter.h
index 6199cc13bb9..eaedb160c94 100644
--- a/source/blender/imbuf/intern/IMB_filter.h
+++ b/source/blender/imbuf/intern/IMB_filter.h
@@ -1,7 +1,4 @@
/*
- * filter.h
- *
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -27,6 +24,7 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
+
/**
* \file IMB_filter.h
* \ingroup imbuf
diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c
index 0c8f932db6a..5d8c65f7971 100644
--- a/source/blender/imbuf/intern/anim_movie.c
+++ b/source/blender/imbuf/intern/anim_movie.c
@@ -133,8 +133,8 @@ static void free_anim_movie(struct anim *UNUSED(anim)) { ; }
static int an_stringdec(const char *string, char* head, char *tail, unsigned short *numlen)
{
- unsigned short len,nume,nums=0;
- short i,found=FALSE;
+ unsigned short len, nume, nums=0;
+ short i, found=FALSE;
len=strlen(string);
nume = len;
@@ -156,7 +156,7 @@ static int an_stringdec(const char *string, char* head, char *tail, unsigned sho
}
}
if (found) {
- strcpy(tail ,&string[nume+1]);
+ strcpy(tail, &string[nume+1]);
strcpy(head, string);
head[nums]= '\0';
*numlen=nume-nums+1;
@@ -255,7 +255,7 @@ void IMB_close_anim_proxies(struct anim *anim)
IMB_free_indices(anim);
}
-struct anim * IMB_open_anim( const char * name, int ib_flags, int streamindex)
+struct anim * IMB_open_anim(const char * name, int ib_flags, int streamindex)
{
struct anim * anim;
@@ -285,7 +285,7 @@ static int startavi (struct anim *anim)
streamcount = anim->streamindex;
#endif
- anim->avi = MEM_callocN (sizeof(AviMovie),"animavi");
+ anim->avi = MEM_callocN (sizeof(AviMovie), "animavi");
if (anim->avi == NULL) {
printf("Can't open avi: %s\n", anim->name);
@@ -471,8 +471,7 @@ static int startffmpeg(struct anim * anim)
videoStream = -1;
for (i = 0; i < pFormatCtx->nb_streams; i++)
- if (pFormatCtx->streams[i]->codec->codec_type
- == AVMEDIA_TYPE_VIDEO) {
+ if (pFormatCtx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
if (streamcount > 0) {
streamcount--;
continue;
@@ -502,9 +501,9 @@ static int startffmpeg(struct anim * anim)
return -1;
}
- anim->duration = ceil(pFormatCtx->duration
- * av_q2d(pFormatCtx->streams[videoStream]->r_frame_rate)
- / AV_TIME_BASE);
+ anim->duration = ceil(pFormatCtx->duration *
+ av_q2d(pFormatCtx->streams[videoStream]->r_frame_rate) /
+ AV_TIME_BASE);
frs_num = pFormatCtx->streams[videoStream]->r_frame_rate.num;
frs_den = pFormatCtx->streams[videoStream]->r_frame_rate.den;
@@ -658,8 +657,8 @@ static void ffmpeg_postprocess(struct anim * anim)
anim->pFrame,
anim->pCodecCtx->pix_fmt,
anim->pCodecCtx->width,
- anim->pCodecCtx->height)
- < 0) {
+ anim->pCodecCtx->height) < 0)
+ {
filter_y = TRUE;
}
else {
@@ -676,7 +675,7 @@ static void ffmpeg_postprocess(struct anim * anim)
uint8_t** dst = anim->pFrameRGB->data;
int dstStride2[4] = { dstStride[0], 0, 0, 0 };
uint8_t* dst2[4] = { dst[0], 0, 0, 0 };
- int x,y,h,w;
+ int x, y, h, w;
unsigned char* bottom;
unsigned char* top;
@@ -785,8 +784,7 @@ static int ffmpeg_decode_video_frame(struct anim * anim)
"pkt_pts=%lld, guessed_pts=%lld\n",
(anim->pFrame->pts == AV_NOPTS_VALUE) ?
-1 : (long long int)anim->pFrame->pts,
- (anim->pFrame->pkt_pts
- == AV_NOPTS_VALUE) ?
+ (anim->pFrame->pkt_pts == AV_NOPTS_VALUE) ?
-1 : (long long int)anim->pFrame->pkt_pts,
(long long int)anim->next_pts);
break;
@@ -921,19 +919,18 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position,
}
else {
pts_to_search = (long long)
- floor(((double) position)
- / pts_time_base / frame_rate + 0.5);
+ floor(((double) position) /
+ pts_time_base / frame_rate + 0.5);
if (st_time != AV_NOPTS_VALUE) {
- pts_to_search += st_time / pts_time_base
- / AV_TIME_BASE;
+ pts_to_search += st_time / pts_time_base / AV_TIME_BASE;
}
}
av_log(anim->pFormatCtx, AV_LOG_DEBUG,
"FETCH: looking for PTS=%lld "
"(pts_timebase=%g, frame_rate=%g, st_time=%lld)\n",
- (long long int)pts_to_search,pts_time_base, frame_rate, st_time);
+ (long long int)pts_to_search, pts_time_base, frame_rate, st_time);
if (anim->last_frame &&
anim->last_pts <= pts_to_search && anim->next_pts > pts_to_search) {
@@ -1001,8 +998,8 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position,
}
}
else {
- pos = (long long) (position - anim->preseek)
- * AV_TIME_BASE / frame_rate;
+ pos = (long long) (position - anim->preseek) *
+ AV_TIME_BASE / frame_rate;
av_log(anim->pFormatCtx, AV_LOG_DEBUG,
"NO INDEX seek pos = %lld, st_time = %lld\n",
@@ -1040,7 +1037,7 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position,
anim->next_packet.stream_index = -1;
}
- /* memset(anim->pFrame,...) ?? */
+ /* memset(anim->pFrame, ...) ?? */
if (ret >= 0) {
ffmpeg_decode_video_frame_scan(anim, pts_to_search);
@@ -1271,7 +1268,7 @@ struct ImBuf * IMB_anim_absolute(struct anim * anim, int position,
}
}
- switch(anim->curtype) {
+ switch (anim->curtype) {
case ANIM_SEQUENCE:
pic = an_stringdec(anim->first, head, tail, &digits);
pic += position;
diff --git a/source/blender/imbuf/intern/bmp.c b/source/blender/imbuf/intern/bmp.c
index 06e1d75c5d0..bce3c70fd93 100644
--- a/source/blender/imbuf/intern/bmp.c
+++ b/source/blender/imbuf/intern/bmp.c
@@ -192,18 +192,18 @@ struct ImBuf *imb_bmp_decode(unsigned char *mem, size_t size, int flags)
}
/* Couple of helper functions for writing our data */
-static int putIntLSB(unsigned int ui,FILE *ofile)
+static int putIntLSB(unsigned int ui, FILE *ofile)
{
- putc((ui>>0)&0xFF,ofile);
- putc((ui>>8)&0xFF,ofile);
- putc((ui>>16)&0xFF,ofile);
- return putc((ui>>24)&0xFF,ofile);
+ putc((ui>>0)&0xFF, ofile);
+ putc((ui>>8)&0xFF, ofile);
+ putc((ui>>16)&0xFF, ofile);
+ return putc((ui>>24)&0xFF, ofile);
}
-static int putShortLSB(unsigned short us,FILE *ofile)
+static int putShortLSB(unsigned short us, FILE *ofile)
{
- putc((us>>0)&0xFF,ofile);
- return putc((us>>8)&0xFF,ofile);
+ putc((us>>0)&0xFF, ofile);
+ return putc((us>>8)&0xFF, ofile);
}
/* Found write info at http://users.ece.gatech.edu/~slabaugh/personal/c/bitmapUnix.c */
@@ -220,37 +220,37 @@ int imb_savebmp(struct ImBuf *ibuf, const char *name, int flags)
bytesize = (ibuf->x * 3 + extrabytes) * ibuf->y;
data = (uchar *) ibuf->rect;
- ofile = BLI_fopen(name,"wb");
+ ofile = BLI_fopen(name, "wb");
if (!ofile) return 0;
- putShortLSB(19778,ofile); /* "BM" */
- putIntLSB(0,ofile); /* This can be 0 for BI_RGB bitmaps */
- putShortLSB(0,ofile); /* Res1 */
- putShortLSB(0,ofile); /* Res2 */
- putIntLSB(BMP_FILEHEADER_SIZE + sizeof(infoheader),ofile);
-
- putIntLSB(sizeof(infoheader),ofile);
- putIntLSB(ibuf->x,ofile);
- putIntLSB(ibuf->y,ofile);
- putShortLSB(1,ofile);
- putShortLSB(24,ofile);
- putIntLSB(0,ofile);
- putIntLSB(bytesize + BMP_FILEHEADER_SIZE + sizeof(infoheader),ofile);
- putIntLSB(0,ofile);
- putIntLSB(0,ofile);
- putIntLSB(0,ofile);
- putIntLSB(0,ofile);
+ putShortLSB(19778, ofile); /* "BM" */
+ putIntLSB(0, ofile); /* This can be 0 for BI_RGB bitmaps */
+ putShortLSB(0, ofile); /* Res1 */
+ putShortLSB(0, ofile); /* Res2 */
+ putIntLSB(BMP_FILEHEADER_SIZE + sizeof(infoheader), ofile);
+
+ putIntLSB(sizeof(infoheader), ofile);
+ putIntLSB(ibuf->x, ofile);
+ putIntLSB(ibuf->y, ofile);
+ putShortLSB(1, ofile);
+ putShortLSB(24, ofile);
+ putIntLSB(0, ofile);
+ putIntLSB(bytesize + BMP_FILEHEADER_SIZE + sizeof(infoheader), ofile);
+ putIntLSB(0, ofile);
+ putIntLSB(0, ofile);
+ putIntLSB(0, ofile);
+ putIntLSB(0, ofile);
/* Need to write out padded image data in bgr format */
for (y=0;y<ibuf->y;y++) {
for (x=0;x<ibuf->x;x++) {
ptr=(x + y * ibuf->x) * 4;
- if (putc(data[ptr+2],ofile) == EOF) return 0;
- if (putc(data[ptr+1],ofile) == EOF) return 0;
- if (putc(data[ptr],ofile) == EOF) return 0;
+ if (putc(data[ptr+2], ofile) == EOF) return 0;
+ if (putc(data[ptr+1], ofile) == EOF) return 0;
+ if (putc(data[ptr], ofile) == EOF) return 0;
}
/* add padding here */
- for (t=0;t<extrabytes;t++) if (putc(0,ofile) == EOF) return 0;
+ for (t=0;t<extrabytes;t++) if (putc(0, ofile) == EOF) return 0;
}
if (ofile) {
fflush(ofile);
diff --git a/source/blender/imbuf/intern/cineon/cineonfile.h b/source/blender/imbuf/intern/cineon/cineonfile.h
index ea321c87d48..e681153aa6e 100644
--- a/source/blender/imbuf/intern/cineon/cineonfile.h
+++ b/source/blender/imbuf/intern/cineon/cineonfile.h
@@ -1,6 +1,3 @@
-/** \file blender/imbuf/intern/cineon/cineonfile.h
- * \ingroup imbcineon
- */
/*
* Cineon image file format library definitions.
* Cineon file format structures.
@@ -29,6 +26,10 @@
#ifndef __CINEONFILE_H__
#define __CINEONFILE_H__
+/** \file blender/imbuf/intern/cineon/cineonfile.h
+ * \ingroup imbcineon
+ */
+
#include "logImageCore.h"
#ifdef __cplusplus
diff --git a/source/blender/imbuf/intern/cineon/cineonlib.c b/source/blender/imbuf/intern/cineon/cineonlib.c
index ae9f8e0fe97..a9001303679 100644
--- a/source/blender/imbuf/intern/cineon/cineonlib.c
+++ b/source/blender/imbuf/intern/cineon/cineonlib.c
@@ -1,6 +1,3 @@
-/** \file blender/imbuf/intern/cineon/cineonlib.c
- * \ingroup imbcineon
- */
/*
* Cineon image file format library routines.
*
@@ -22,6 +19,10 @@
*
*/
+/** \file blender/imbuf/intern/cineon/cineonlib.c
+ * \ingroup imbcineon
+ */
+
#include "cineonlib.h"
#include "cineonfile.h"
diff --git a/source/blender/imbuf/intern/cineon/cineonlib.h b/source/blender/imbuf/intern/cineon/cineonlib.h
index 48b5a001b9a..ef992c527b0 100644
--- a/source/blender/imbuf/intern/cineon/cineonlib.h
+++ b/source/blender/imbuf/intern/cineon/cineonlib.h
@@ -1,6 +1,3 @@
-/** \file blender/imbuf/intern/cineon/cineonlib.h
- * \ingroup imbcineon
- */
/*
* Cineon image file format library definitions.
* Also handles DPX files (almost)
@@ -26,6 +23,10 @@
#ifndef __CINEONLIB_H__
#define __CINEONLIB_H__
+/** \file blender/imbuf/intern/cineon/cineonlib.h
+ * \ingroup imbcineon
+ */
+
#include "logImageCore.h"
#ifdef __cplusplus
diff --git a/source/blender/imbuf/intern/cineon/dpxfile.h b/source/blender/imbuf/intern/cineon/dpxfile.h
index dc8fc0bdbd2..8846c7418d5 100644
--- a/source/blender/imbuf/intern/cineon/dpxfile.h
+++ b/source/blender/imbuf/intern/cineon/dpxfile.h
@@ -1,6 +1,3 @@
-/** \file blender/imbuf/intern/cineon/dpxfile.h
- * \ingroup imbcineon
- */
/*
* Cineon image file format library definitions.
* Dpx file format structures.
@@ -29,6 +26,10 @@
#ifndef __DPXFILE_H__
#define __DPXFILE_H__
+/** \file blender/imbuf/intern/cineon/dpxfile.h
+ * \ingroup imbcineon
+ */
+
#include "logImageCore.h"
#ifdef __cplusplus
diff --git a/source/blender/imbuf/intern/cineon/dpxlib.c b/source/blender/imbuf/intern/cineon/dpxlib.c
index c9b9901a495..a4b8c9d3f36 100644
--- a/source/blender/imbuf/intern/cineon/dpxlib.c
+++ b/source/blender/imbuf/intern/cineon/dpxlib.c
@@ -1,6 +1,3 @@
-/** \file blender/imbuf/intern/cineon/dpxlib.c
- * \ingroup imbcineon
- */
/*
* Dpx image file format library routines.
*
@@ -22,6 +19,10 @@
*
*/
+/** \file blender/imbuf/intern/cineon/dpxlib.c
+ * \ingroup imbcineon
+ */
+
#include "dpxfile.h"
#include "dpxlib.h"
diff --git a/source/blender/imbuf/intern/cineon/dpxlib.h b/source/blender/imbuf/intern/cineon/dpxlib.h
index b09c699ae5b..eb3937f2bf7 100644
--- a/source/blender/imbuf/intern/cineon/dpxlib.h
+++ b/source/blender/imbuf/intern/cineon/dpxlib.h
@@ -1,6 +1,3 @@
-/** \file blender/imbuf/intern/cineon/dpxlib.h
- * \ingroup imbcineon
- */
/*
* DPX image file format library definitions.
*
@@ -25,6 +22,10 @@
#ifndef __DPXLIB_H__
#define __DPXLIB_H__
+/** \file blender/imbuf/intern/cineon/dpxlib.h
+ * \ingroup imbcineon
+ */
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/source/blender/imbuf/intern/cineon/logImageCore.c b/source/blender/imbuf/intern/cineon/logImageCore.c
index e1f1500cb83..f772cc7d477 100644
--- a/source/blender/imbuf/intern/cineon/logImageCore.c
+++ b/source/blender/imbuf/intern/cineon/logImageCore.c
@@ -1,6 +1,3 @@
-/** \file blender/imbuf/intern/cineon/logImageCore.c
- * \ingroup imbcineon
- */
/*
* Cineon image file format library routines.
*
@@ -22,6 +19,10 @@
*
*/
+/** \file blender/imbuf/intern/cineon/logImageCore.c
+ * \ingroup imbcineon
+ */
+
#include "logImageCore.h"
#include <time.h> /* strftime() */
diff --git a/source/blender/imbuf/intern/cineon/logImageCore.h b/source/blender/imbuf/intern/cineon/logImageCore.h
index c8592621f08..7d88c10c2d6 100644
--- a/source/blender/imbuf/intern/cineon/logImageCore.h
+++ b/source/blender/imbuf/intern/cineon/logImageCore.h
@@ -1,6 +1,3 @@
-/** \file blender/imbuf/intern/cineon/logImageCore.h
- * \ingroup imbcineon
- */
/*
* Cineon image file format library definitions.
* Cineon and DPX common structures.
@@ -30,6 +27,10 @@
#ifndef __LOGIMAGECORE_H__
#define __LOGIMAGECORE_H__
+/** \file blender/imbuf/intern/cineon/logImageCore.h
+ * \ingroup imbcineon
+ */
+
#include <stdio.h>
#include "logImageLib.h"
diff --git a/source/blender/imbuf/intern/cineon/logImageLib.c b/source/blender/imbuf/intern/cineon/logImageLib.c
index f97df005fc8..f479220d82c 100644
--- a/source/blender/imbuf/intern/cineon/logImageLib.c
+++ b/source/blender/imbuf/intern/cineon/logImageLib.c
@@ -1,6 +1,3 @@
-/** \file blender/imbuf/intern/cineon/logImageLib.c
- * \ingroup imbcineon
- */
/*
* Cineon and DPX image file format library routines.
*
@@ -22,6 +19,10 @@
*
*/
+/** \file blender/imbuf/intern/cineon/logImageLib.c
+ * \ingroup imbcineon
+ */
+
#include "cineonlib.h"
#include "dpxlib.h"
diff --git a/source/blender/imbuf/intern/cineon/logImageLib.h b/source/blender/imbuf/intern/cineon/logImageLib.h
index 669e25d009f..1c24358e4ef 100644
--- a/source/blender/imbuf/intern/cineon/logImageLib.h
+++ b/source/blender/imbuf/intern/cineon/logImageLib.h
@@ -1,6 +1,3 @@
-/** \file blender/imbuf/intern/cineon/logImageLib.h
- * \ingroup imbcineon
- */
/*
* Common library definitions for Cineon and DPX image files.
*
@@ -25,6 +22,10 @@
#ifndef __LOGIMAGELIB_H__
#define __LOGIMAGELIB_H__
+/** \file blender/imbuf/intern/cineon/logImageLib.h
+ * \ingroup imbcineon
+ */
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/source/blender/imbuf/intern/cineon/logmemfile.c b/source/blender/imbuf/intern/cineon/logmemfile.c
index 3db4241cc14..a9938582f2a 100644
--- a/source/blender/imbuf/intern/cineon/logmemfile.c
+++ b/source/blender/imbuf/intern/cineon/logmemfile.c
@@ -1,6 +1,3 @@
-/** \file blender/imbuf/intern/cineon/logmemfile.c
- * \ingroup imbcineon
- */
/*
* Cineon image file format library routines.
*
@@ -21,6 +18,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
+
+/** \file blender/imbuf/intern/cineon/logmemfile.c
+ * \ingroup imbcineon
+ */
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/source/blender/imbuf/intern/cineon/logmemfile.h b/source/blender/imbuf/intern/cineon/logmemfile.h
index 2611463148e..df3589a70d3 100644
--- a/source/blender/imbuf/intern/cineon/logmemfile.h
+++ b/source/blender/imbuf/intern/cineon/logmemfile.h
@@ -1,6 +1,3 @@
-/** \file blender/imbuf/intern/cineon/logmemfile.h
- * \ingroup imbcineon
- */
/*
* Cineon image file format library routines.
*
@@ -25,6 +22,10 @@
#ifndef __LOGMEMFILE_H__
#define __LOGMEMFILE_H__
+/** \file blender/imbuf/intern/cineon/logmemfile.h
+ * \ingroup imbcineon
+ */
+
int logimage_fseek(void* logfile, intptr_t offsett, int origin);
int logimage_fwrite(void *buffer, unsigned int size, unsigned int count, void *logfile);
int logimage_fread(void *buffer, unsigned int size, unsigned int count, void *logfile);
diff --git a/source/blender/imbuf/intern/dds/ColorBlock.cpp b/source/blender/imbuf/intern/dds/ColorBlock.cpp
index 42ef799cf3e..42bec5874ca 100644
--- a/source/blender/imbuf/intern/dds/ColorBlock.cpp
+++ b/source/blender/imbuf/intern/dds/ColorBlock.cpp
@@ -93,12 +93,10 @@ void ColorBlock::init(uint w, uint h, const uint * data, uint x, uint y)
// @@ Thats 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++)
- {
+ for (uint i = 0; i < 4; i++) {
const int by = i % bh;
- for (uint e = 0; e < 4; e++)
- {
+ for (uint e = 0; e < 4; e++) {
const int bx = e % bw;
const uint idx = (y + by) * w + x + bx;
@@ -118,12 +116,10 @@ void ColorBlock::init(uint w, uint h, const float * data, uint x, uint y)
uint srcPlane = w * h;
- for (uint i = 0; i < 4; i++)
- {
+ for (uint i = 0; i < 4; i++) {
const uint by = i % bh;
- for (uint e = 0; e < 4; e++)
- {
+ for (uint e = 0; e < 4; e++) {
const uint bx = e % bw;
const uint idx = ((y + by) * w + x + bx);
@@ -148,8 +144,7 @@ static inline uint8 component(Color32 c, uint i)
void ColorBlock::swizzle(uint x, uint y, uint z, uint w)
{
- for (int i = 0; i < 16; i++)
- {
+ for (int i = 0; i < 16; i++) {
Color32 c = m_color[i];
m_color[i].r = component(c, x);
m_color[i].g = component(c, y);
@@ -164,10 +159,8 @@ bool ColorBlock::isSingleColor(Color32 mask/*= Color32(0xFF, 0xFF, 0xFF, 0x00)*/
{
uint u = m_color[0].u & mask.u;
- for (int i = 1; i < 16; i++)
- {
- if (u != (m_color[i].u & mask.u))
- {
+ for (int i = 1; i < 16; i++) {
+ if (u != (m_color[i].u & mask.u)) {
return false;
}
}
@@ -243,8 +236,7 @@ Color32 ColorBlock::averageColor() const
/// Return true if the block is not fully opaque.
bool ColorBlock::hasAlpha() const
{
- for (uint i = 0; i < 16; i++)
- {
+ for (uint i = 0; i < 16; i++) {
if (m_color[i].a != 255) return true;
}
return false;
diff --git a/source/blender/imbuf/intern/dds/ColorBlock.h b/source/blender/imbuf/intern/dds/ColorBlock.h
index e72b6253035..2bf362f2780 100644
--- a/source/blender/imbuf/intern/dds/ColorBlock.h
+++ b/source/blender/imbuf/intern/dds/ColorBlock.h
@@ -49,12 +49,12 @@ struct ColorBlock
ColorBlock(const Image * img, uint x, uint y);
void init(const Image * img, uint x, uint y);
- 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 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
- bool isSingleColor(Color32 mask = Color32(0xFF, 0xFF, 0xFF, 0x00)) const;
+ bool isSingleColor(Color32 mask = Color32(0xFF, 0xFF, 0xFF, 0x00)) const;
bool hasAlpha() const;
diff --git a/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp
index e2874652f02..3966135ea32 100644
--- a/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp
+++ b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp
@@ -308,7 +308,7 @@ static const uint DDPF_SRGB = 0x40000000U;
const char * getDxgiFormatString(DXGI_FORMAT dxgiFormat)
{
#define CASE(format) case DXGI_FORMAT_##format: return #format
- switch(dxgiFormat)
+ switch (dxgiFormat)
{
CASE(UNKNOWN);
@@ -431,7 +431,7 @@ static const uint DDPF_SRGB = 0x40000000U;
const char * getD3d10ResourceDimensionString(D3D10_RESOURCE_DIMENSION resourceDimension)
{
- switch(resourceDimension)
+ switch (resourceDimension)
{
default:
case D3D10_RESOURCE_DIMENSION_UNKNOWN: return "UNKNOWN";
@@ -1305,7 +1305,7 @@ void DirectDrawSurface::readBlock(ColorBlock * rgba)
uint DirectDrawSurface::blockSize() const
{
- switch(header.pf.fourcc)
+ switch (header.pf.fourcc)
{
case FOURCC_DXT1:
case FOURCC_ATI1:
@@ -1318,7 +1318,7 @@ uint DirectDrawSurface::blockSize() const
case FOURCC_ATI2:
return 16;
case FOURCC_DX10:
- switch(header.header10.dxgiFormat)
+ switch (header.header10.dxgiFormat)
{
case DXGI_FORMAT_BC1_TYPELESS:
case DXGI_FORMAT_BC1_UNORM:
diff --git a/source/blender/imbuf/intern/dds/DirectDrawSurface.h b/source/blender/imbuf/intern/dds/DirectDrawSurface.h
index 23c8bbf2de3..ddae8826620 100644
--- a/source/blender/imbuf/intern/dds/DirectDrawSurface.h
+++ b/source/blender/imbuf/intern/dds/DirectDrawSurface.h
@@ -129,20 +129,20 @@ struct DDSHeader
void setPixelFormat(uint bitcount, uint rmask, uint gmask, uint bmask, uint amask);
void setDX10Format(uint format);
void setNormalFlag(bool b);
- void setSrgbFlag(bool b);
+ void setSrgbFlag(bool b);
void setHasAlphaFlag(bool b);
- void setUserVersion(int version);
+ void setUserVersion(int version);
/*void swapBytes();*/
bool hasDX10Header() const;
- uint signature() const;
- uint toolVersion() const;
- uint userVersion() const;
- bool isNormalMap() const;
- bool isSrgb() const;
- bool hasAlpha() const;
- uint d3d9Format() const;
+ uint signature() const;
+ uint toolVersion() const;
+ uint userVersion() const;
+ bool isNormalMap() const;
+ bool isSrgb() const;
+ bool hasAlpha() const;
+ uint d3d9Format() const;
};
/// DirectDraw Surface. (DDS)
diff --git a/source/blender/imbuf/intern/dds/PixelFormat.h b/source/blender/imbuf/intern/dds/PixelFormat.h
index 3c5cb34812c..308ea810f03 100644
--- a/source/blender/imbuf/intern/dds/PixelFormat.h
+++ b/source/blender/imbuf/intern/dds/PixelFormat.h
@@ -66,17 +66,14 @@
// 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)
- {
+ if (inbits == 0) {
return 0;
}
- else if (inbits >= outbits)
- {
+ else if (inbits >= outbits) {
// truncate
return c >> (inbits - outbits);
}
- else
- {
+ else {
// bitexpand
return (c << (outbits - inbits)) | convert(c, inbits, outbits - inbits);
}
@@ -85,21 +82,20 @@
// Get pixel component shift and size given its mask.
inline void maskShiftAndSize(uint mask, uint * shift, uint * size)
{
- if (!mask)
- {
+ if (!mask) {
*shift = 0;
*size = 0;
return;
}
*shift = 0;
- while((mask & 1) == 0) {
+ while ((mask & 1) == 0) {
++(*shift);
mask >>= 1;
}
*size = 0;
- while((mask & 1) == 1) {
+ while ((mask & 1) == 1) {
++(*size);
mask >>= 1;
}
diff --git a/source/blender/imbuf/intern/filter.c b/source/blender/imbuf/intern/filter.c
index 0e6567d2c6b..bc5e85a3c55 100644
--- a/source/blender/imbuf/intern/filter.c
+++ b/source/blender/imbuf/intern/filter.c
@@ -1,6 +1,4 @@
/*
- *
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -33,13 +31,10 @@
* \ingroup imbuf
*/
-
#include "MEM_guardedalloc.h"
#include "BLI_utildefines.h"
-
-
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
#include "IMB_filter.h"
@@ -52,7 +47,7 @@
static void filtrow(unsigned char *point, int x)
{
- unsigned int c1,c2,c3,error;
+ unsigned int c1, c2, c3, error;
if (x>1) {
c1 = c2 = *point;
@@ -72,7 +67,7 @@ static void filtrow(unsigned char *point, int x)
static void filtrowf(float *point, int x)
{
- float c1,c2,c3;
+ float c1, c2, c3;
if (x>1) {
c1 = c2 = *point;
@@ -92,7 +87,7 @@ static void filtrowf(float *point, int x)
static void filtcolum(unsigned char *point, int y, int skip)
{
- unsigned int c1,c2,c3,error;
+ unsigned int c1, c2, c3, error;
unsigned char *point2;
if (y>1) {
@@ -115,7 +110,7 @@ static void filtcolum(unsigned char *point, int y, int skip)
static void filtcolumf(float *point, int y, int skip)
{
- float c1,c2,c3, *point2;
+ float c1, c2, c3, *point2;
if (y>1) {
c1 = c2 = *point;
@@ -148,23 +143,23 @@ void IMB_filtery(struct ImBuf *ibuf)
for (;x>0;x--) {
if (point) {
- if (ibuf->planes > 24) filtcolum(point,y,skip);
+ if (ibuf->planes > 24) filtcolum(point, y, skip);
point++;
- filtcolum(point,y,skip);
+ filtcolum(point, y, skip);
point++;
- filtcolum(point,y,skip);
+ filtcolum(point, y, skip);
point++;
- filtcolum(point,y,skip);
+ filtcolum(point, y, skip);
point++;
}
if (pointf) {
- if (ibuf->planes > 24) filtcolumf(pointf,y,skip);
+ if (ibuf->planes > 24) filtcolumf(pointf, y, skip);
pointf++;
- filtcolumf(pointf,y,skip);
+ filtcolumf(pointf, y, skip);
pointf++;
- filtcolumf(pointf,y,skip);
+ filtcolumf(pointf, y, skip);
pointf++;
- filtcolumf(pointf,y,skip);
+ filtcolumf(pointf, y, skip);
pointf++;
}
}
@@ -186,23 +181,23 @@ void imb_filterx(struct ImBuf *ibuf)
for (;y>0;y--) {
if (point) {
- if (ibuf->planes > 24) filtrow(point,x);
+ if (ibuf->planes > 24) filtrow(point, x);
point++;
- filtrow(point,x);
+ filtrow(point, x);
point++;
- filtrow(point,x);
+ filtrow(point, x);
point++;
- filtrow(point,x);
+ filtrow(point, x);
point+=skip;
}
if (pointf) {
- if (ibuf->planes > 24) filtrowf(pointf,x);
+ if (ibuf->planes > 24) filtrowf(pointf, x);
pointf++;
- filtrowf(pointf,x);
+ filtrowf(pointf, x);
pointf++;
- filtrowf(pointf,x);
+ filtrowf(pointf, x);
pointf++;
- filtrowf(pointf,x);
+ filtrowf(pointf, x);
pointf+=skip;
}
}
@@ -304,7 +299,7 @@ void IMB_mask_filter_extend(char *mask, int width, int height)
void IMB_mask_clear(ImBuf *ibuf, char *mask, int val)
{
- int x,y;
+ int x, y;
if (ibuf->rect_float) {
for (x=0; x<ibuf->x; x++) {
for (y=0; y<ibuf->y; y++) {
@@ -399,7 +394,7 @@ void IMB_filter_extend(struct ImBuf *ibuf, char *mask, int filter)
if (!check_pixel_assigned(srcbuf, srcmask, index, depth, is_float)) {
float tmp[4];
float wsum=0;
- float acc[4]={0,0,0,0};
+ float acc[4]={0, 0, 0, 0};
k = 0;
if (check_pixel_assigned(srcbuf, srcmask, filter_make_index(x-1, y, width, height), depth, is_float) ||
diff --git a/source/blender/imbuf/intern/imageprocess.c b/source/blender/imbuf/intern/imageprocess.c
index ba165d51e96..dea941c9716 100644
--- a/source/blender/imbuf/intern/imageprocess.c
+++ b/source/blender/imbuf/intern/imageprocess.c
@@ -23,17 +23,19 @@
* Contributor(s): none yet.
*
* ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/imbuf/intern/imageprocess.c
+ * \ingroup imbuf
+ *
* This file was moved here from the src/ directory. It is meant to
* deal with endianness. It resided in a general blending lib. The
* other functions were only used during rendering. This single
* function remained. It should probably move to imbuf/intern/util.c,
- * but we'll keep it here for the time being. (nzc)*/
-
-/** \file blender/imbuf/intern/imageprocess.c
- * \ingroup imbuf
+ * but we'll keep it here for the time being. (nzc)
+ *
*/
-
/* imageprocess.c MIXED MODEL
*
* april 95
@@ -50,7 +52,7 @@
/* This define should be relocated to a global header some where Kent Mein
* I stole it from util.h in the plugins api */
-#define MAX2(x,y) ( (x)>(y) ? (x) : (y) )
+#define MAX2(x, y) ( (x)>(y) ? (x) : (y) )
/* Only this one is used liberally here, and in imbuf */
void IMB_convert_rgba_to_abgr(struct ImBuf *ibuf)
@@ -113,10 +115,10 @@ static void pixel_from_buffer(struct ImBuf *ibuf, unsigned char **outI, float **
static float P(float k)
{
float p1, p2, p3, p4;
- p1 = MAX2(k+2.0f,0);
- p2 = MAX2(k+1.0f,0);
- p3 = MAX2(k,0);
- p4 = MAX2(k-1.0f,0);
+ p1 = MAX2(k+2.0f, 0);
+ p2 = MAX2(k+1.0f, 0);
+ p3 = MAX2(k, 0);
+ p4 = MAX2(k-1.0f, 0);
return (float)(1.0f/6.0f)*( p1*p1*p1 - 4.0f * p2*p2*p2 + 6.0f * p3*p3*p3 - 4.0f * p4*p4*p4);
}
@@ -125,15 +127,15 @@ static float P(float k)
/* older, slower function, works the same as above */
static float P(float k)
{
- return (float)(1.0f/6.0f)*( pow( MAX2(k+2.0f,0) , 3.0f ) - 4.0f * pow( MAX2(k+1.0f,0) , 3.0f ) + 6.0f * pow( MAX2(k,0) , 3.0f ) - 4.0f * pow( MAX2(k-1.0f,0) , 3.0f));
+ return (float)(1.0f/6.0f)*( pow( MAX2(k+2.0f, 0), 3.0f ) - 4.0f * pow( MAX2(k+1.0f, 0), 3.0f ) + 6.0f * pow( MAX2(k, 0), 3.0f ) - 4.0f * pow( MAX2(k-1.0f, 0), 3.0f));
}
#endif
void bicubic_interpolation_color(struct ImBuf *in, unsigned char *outI, float *outF, float u, float v)
{
- int i,j,n,m,x1,y1;
+ int i, j, n, m, x1, y1;
unsigned char *dataI;
- float a,b,w,wx,wy[4], outR,outG,outB,outA,*dataF;
+ float a, b, w, wx, wy[4], outR, outG, outB, outA, *dataF;
/* sample area entirely outside image? */
if (ceil(u)<0 || floor(u)>in->x-1 || ceil(v)<0 || floor(v)>in->y-1)
diff --git a/source/blender/imbuf/intern/imbuf.h b/source/blender/imbuf/intern/imbuf.h
index 2125583375f..47b4b7b6a58 100644
--- a/source/blender/imbuf/intern/imbuf.h
+++ b/source/blender/imbuf/intern/imbuf.h
@@ -1,9 +1,4 @@
/*
- * imbuf.h (mar-2001 nzc)
- *
- * This header might have to become external...
- *
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -25,7 +20,7 @@
*
* The Original Code is: all of this file.
*
- * Contributor(s): none yet.
+ * Contributor(s): mar-2001 nzc.
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -34,7 +29,6 @@
* \ingroup imbuf
*/
-
#ifndef __IMBUF_H__
#define __IMBUF_H__
diff --git a/source/blender/imbuf/intern/imbuf_cocoa.m b/source/blender/imbuf/intern/imbuf_cocoa.m
index db7f93423cb..ebfee7a1a30 100644
--- a/source/blender/imbuf/intern/imbuf_cocoa.m
+++ b/source/blender/imbuf/intern/imbuf_cocoa.m
@@ -1,6 +1,4 @@
/*
- * imbuf_coca.m
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -22,9 +20,10 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/**
- * Provides image file loading and saving for Blender, via Cocoa.
+/** \file blender/imbuf/intern/imbuf_coca.m
+ * \ingroup imbuf
*
+ * Provides image file loading and saving for Blender, via Cocoa.
*/
#include <stdint.h>
diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c
index b566d975f5b..d823df11e36 100644
--- a/source/blender/imbuf/intern/indexer.c
+++ b/source/blender/imbuf/intern/indexer.c
@@ -62,15 +62,14 @@ static int tc_types[] = { IMB_TC_RECORD_RUN,
#define INDEX_FILE_VERSION 1
/* ----------------------------------------------------------------------
- - time code index functions
- ---------------------------------------------------------------------- */
+ * - time code index functions
+ * ---------------------------------------------------------------------- */
anim_index_builder * IMB_index_builder_create(const char * name)
{
- anim_index_builder * rv
- = MEM_callocN( sizeof(struct anim_index_builder),
- "index builder");
+ anim_index_builder * rv = MEM_callocN(sizeof(struct anim_index_builder),
+ "index builder");
fprintf(stderr, "Starting work on index: %s\n", name);
@@ -176,23 +175,23 @@ struct anim_index * IMB_indexer_open(const char * name)
return NULL;
}
- idx = MEM_callocN( sizeof(struct anim_index), "anim_index");
+ idx = MEM_callocN(sizeof(struct anim_index), "anim_index");
BLI_strncpy(idx->name, name, sizeof(idx->name));
fseek(fp, 0, SEEK_END);
- idx->num_entries = (ftell(fp) - 12)
- / (sizeof(int) // framepos
- + sizeof(unsigned long long) // seek_pos
- + sizeof(unsigned long long) // seek_pos_dts
- + sizeof(unsigned long long) // pts
- );
+ idx->num_entries = (ftell(fp) - 12) /
+ (sizeof(int) + // framepos
+ sizeof(unsigned long long) + // seek_pos
+ sizeof(unsigned long long) + // seek_pos_dts
+ sizeof(unsigned long long) // pts
+ );
fseek(fp, 12, SEEK_SET);
- idx->entries = MEM_callocN( sizeof(struct anim_index_entry)
- * idx->num_entries, "anim_index_entries");
+ idx->entries = MEM_callocN(sizeof(struct anim_index_entry) *
+ idx->num_entries, "anim_index_entries");
for (i = 0; i < idx->num_entries; i++) {
fread(&idx->entries[i].frameno,
@@ -260,7 +259,7 @@ int IMB_indexer_get_frame_index(struct anim_index * idx, int frameno)
if (idx->entries[middle].frameno < frameno) {
first = middle;
- ++first;
+ first++;
len = len - half - 1;
}
else {
@@ -301,9 +300,8 @@ int IMB_indexer_can_scan(struct anim_index * idx,
{
/* makes only sense, if it is the same I-Frame and we are not
* trying to run backwards in time... */
- return (IMB_indexer_get_seek_pos(idx, old_frame_index)
- == IMB_indexer_get_seek_pos(idx, new_frame_index) &&
- old_frame_index < new_frame_index);
+ return (IMB_indexer_get_seek_pos(idx, old_frame_index) == IMB_indexer_get_seek_pos(idx, new_frame_index) &&
+ old_frame_index < new_frame_index);
}
void IMB_indexer_close(struct anim_index * idx)
@@ -354,8 +352,8 @@ int IMB_timecode_to_array_index(IMB_Timecode_Type tc)
/* ----------------------------------------------------------------------
- - rebuild helper functions
- ---------------------------------------------------------------------- */
+ * - rebuild helper functions
+ * ---------------------------------------------------------------------- */
static void get_index_dir(struct anim * anim, char * index_dir)
{
@@ -427,8 +425,8 @@ static void get_tc_filename(struct anim * anim, IMB_Timecode_Type tc,
}
/* ----------------------------------------------------------------------
- - common rebuilder structures
- ---------------------------------------------------------------------- */
+ * - common rebuilder structures
+ * ---------------------------------------------------------------------- */
typedef struct IndexBuildContext {
int anim_type;
@@ -436,8 +434,8 @@ typedef struct IndexBuildContext {
/* ----------------------------------------------------------------------
- - ffmpeg rebuilder
- ---------------------------------------------------------------------- */
+ * - ffmpeg rebuilder
+ * ---------------------------------------------------------------------- */
#ifdef WITH_FFMPEG
@@ -515,9 +513,9 @@ static struct proxy_output_ctx * alloc_proxy_output_ffmpeg(
rv->c->pix_fmt = PIX_FMT_YUVJ420P;
}
- rv->c->sample_aspect_ratio
- = rv->st->sample_aspect_ratio
- = st->codec->sample_aspect_ratio;
+ rv->c->sample_aspect_ratio =
+ rv->st->sample_aspect_ratio =
+ st->codec->sample_aspect_ratio;
rv->c->time_base.den = 25;
rv->c->time_base.num = 1;
@@ -755,8 +753,7 @@ static IndexBuildContext *index_ffmpeg_create_context(struct anim *anim, IMB_Tim
/* Find the video stream */
context->videoStream = -1;
for (i = 0; i < context->iFormatCtx->nb_streams; i++)
- if (context->iFormatCtx->streams[i]->codec->codec_type
- == AVMEDIA_TYPE_VIDEO) {
+ if (context->iFormatCtx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
if (streamcount > 0) {
streamcount--;
continue;
@@ -895,8 +892,7 @@ static int index_rebuild_ffmpeg(FFmpegIndexBuilderContext *context,
if (frame_finished) {
unsigned long long s_pos = seek_pos;
unsigned long long s_dts = seek_pos_dts;
- unsigned long long pts
- = av_get_pts_from_frame(context->iFormatCtx, in_frame);
+ unsigned long long pts = av_get_pts_from_frame(context->iFormatCtx, in_frame);
for (i = 0; i < context->num_proxy_sizes; i++) {
add_to_proxy_output_ffmpeg(
@@ -908,8 +904,8 @@ static int index_rebuild_ffmpeg(FFmpegIndexBuilderContext *context,
start_pts_set = TRUE;
}
- frameno = floor((pts - start_pts)
- * pts_time_base * frame_rate + 0.5f);
+ frameno = floor((pts - start_pts) *
+ pts_time_base * frame_rate + 0.5f);
/* decoding starts *always* on I-Frames,
so: P-Frames won't work, even if all the
@@ -952,8 +948,8 @@ static int index_rebuild_ffmpeg(FFmpegIndexBuilderContext *context,
#endif
/* ----------------------------------------------------------------------
- - internal AVI (fallback) rebuilder
- ---------------------------------------------------------------------- */
+ * - internal AVI (fallback) rebuilder
+ * ---------------------------------------------------------------------- */
typedef struct FallbackIndexBuilderContext {
int anim_type;
@@ -1116,8 +1112,8 @@ static void index_rebuild_fallback(FallbackIndexBuilderContext *context,
}
/* ----------------------------------------------------------------------
- - public API
- ---------------------------------------------------------------------- */
+ * - public API
+ * ---------------------------------------------------------------------- */
IndexBuildContext *IMB_anim_index_rebuild_context(struct anim *anim, IMB_Timecode_Type tcs_in_use,
IMB_Proxy_Size proxy_sizes_in_use, int quality)
diff --git a/source/blender/imbuf/intern/indexer_dv.c b/source/blender/imbuf/intern/indexer_dv.c
index f0c38f6db06..8dc03ae708d 100644
--- a/source/blender/imbuf/intern/indexer_dv.c
+++ b/source/blender/imbuf/intern/indexer_dv.c
@@ -171,7 +171,7 @@ static void parse_header_block(indexer_dv_context * This, unsigned char* target)
static void parse_subcode_blocks(
indexer_dv_context * This, unsigned char* target)
{
- int i,j;
+ int i, j;
for (j = 0; j < 2; j++) {
for (i = 3; i < 80; i += 5) {
@@ -185,7 +185,7 @@ static void parse_subcode_blocks(
static void parse_vaux_blocks(
indexer_dv_context * This, unsigned char* target)
{
- int i,j;
+ int i, j;
for (j = 0; j < 3; j++) {
for (i = 3; i < 80; i += 5) {
diff --git a/source/blender/imbuf/intern/iris.c b/source/blender/imbuf/intern/iris.c
index e775d0f7bbd..430361dbb53 100644
--- a/source/blender/imbuf/intern/iris.c
+++ b/source/blender/imbuf/intern/iris.c
@@ -74,7 +74,7 @@ typedef struct {
#define GINTLUM (156)
#define BINTLUM (21)
-#define ILUM(r,g,b) ((int)(RINTLUM*(r)+GINTLUM*(g)+BINTLUM*(b))>>8)
+#define ILUM(r, g, b) ((int)(RINTLUM * (r) + GINTLUM * (g) + BINTLUM * (b)) >> 8)
#define OFFSET_R 0 /* this is byte order dependent */
#define OFFSET_G 1
@@ -149,7 +149,7 @@ static void putshort(FILE *outf, unsigned short val)
buf[0] = (val>>8);
buf[1] = (val>>0);
- fwrite(buf,2,1,outf);
+ fwrite(buf, 2, 1, outf);
}
static int putlong(FILE *outf, unsigned int val)
@@ -160,7 +160,7 @@ static int putlong(FILE *outf, unsigned int val)
buf[1] = (val>>16);
buf[2] = (val>>8);
buf[3] = (val>>0);
- return fwrite(buf,4,1,outf);
+ return fwrite(buf, 4, 1, outf);
}
static void readheader(FILE *inf, IMAGE *image)
@@ -178,18 +178,18 @@ static int writeheader(FILE *outf, IMAGE *image)
{
IMAGE t= {0};
- fwrite(&t,sizeof(IMAGE),1,outf);
- fseek(outf,0,SEEK_SET);
- putshort(outf,image->imagic);
- putshort(outf,image->type);
- putshort(outf,image->dim);
- putshort(outf,image->xsize);
- putshort(outf,image->ysize);
- putshort(outf,image->zsize);
- putlong(outf,image->min);
- putlong(outf,image->max);
- putlong(outf,0);
- return fwrite("no name",8,1,outf);
+ fwrite(&t, sizeof(IMAGE), 1, outf);
+ fseek(outf, 0, SEEK_SET);
+ putshort(outf, image->imagic);
+ putshort(outf, image->type);
+ putshort(outf, image->dim);
+ putshort(outf, image->xsize);
+ putshort(outf, image->ysize);
+ putshort(outf, image->zsize);
+ putlong(outf, image->min);
+ putlong(outf, image->max);
+ putlong(outf, 0);
+ return fwrite("no name", 8, 1, outf);
}
static int writetab(FILE *outf, unsigned int *tab, int len)
@@ -197,7 +197,7 @@ static int writetab(FILE *outf, unsigned int *tab, int len)
int r = 0;
while (len) {
- r = putlong(outf,*tab++);
+ r = putlong(outf, *tab++);
len -= 4;
}
return r;
@@ -271,14 +271,14 @@ struct ImBuf *imb_loadiris(unsigned char *mem, size_t size, int flags)
readheader(inf, &image);
if (image.imagic != IMAGIC) {
- fprintf(stderr,"longimagedata: bad magic number in image file\n");
+ fprintf(stderr, "longimagedata: bad magic number in image file\n");
return(NULL);
}
rle = ISRLE(image.type);
bpp = BPP(image.type);
if (bpp != 1 && bpp != 2) {
- fprintf(stderr,"longimagedata: image must have 1 or 2 byte per pix chan\n");
+ fprintf(stderr, "longimagedata: image must have 1 or 2 byte per pix chan\n");
return(NULL);
}
@@ -299,8 +299,8 @@ struct ImBuf *imb_loadiris(unsigned char *mem, size_t size, int flags)
lengthtab = (unsigned int *)MEM_mallocN(tablen, "iris endtab");
file_offset = 512;
- readtab(inf,starttab,tablen);
- readtab(inf,lengthtab,tablen);
+ readtab(inf, starttab, tablen);
+ readtab(inf, lengthtab, tablen);
/* check data order */
cur = 0;
@@ -710,27 +710,27 @@ static int output_iris(unsigned int *lptr, int xsize, int ysize, int zsize, cons
image->zsize = zsize;
image->min = 0;
image->max = 255;
- goodwrite *= writeheader(outf,image);
- fseek(outf,512+2*tablen,SEEK_SET);
+ goodwrite *= writeheader(outf, image);
+ fseek(outf, 512+2*tablen, SEEK_SET);
pos = 512+2*tablen;
for (y = 0; y < ysize; y++) {
for (z = 0; z < zsize; z++) {
if (zsize == 1) {
- lumrow((uchar *)lptr,(uchar *)lumbuf,xsize);
- len = compressrow((uchar *)lumbuf,rlebuf,CHANOFFSET(z),xsize);
+ lumrow((uchar *)lptr, (uchar *)lumbuf, xsize);
+ len = compressrow((uchar *)lumbuf, rlebuf, CHANOFFSET(z), xsize);
}
else {
if (z<4) {
- len = compressrow((uchar *)lptr, rlebuf,CHANOFFSET(z),xsize);
+ len = compressrow((uchar *)lptr, rlebuf, CHANOFFSET(z), xsize);
}
else if (z<8 && zptr) {
- len = compressrow((uchar *)zptr, rlebuf,CHANOFFSET(z-4),xsize);
+ len = compressrow((uchar *)zptr, rlebuf, CHANOFFSET(z-4), xsize);
}
}
if (len>rlebuflen) {
- fprintf(stderr,"output_iris: rlebuf is too small - bad poop\n");
+ fprintf(stderr, "output_iris: rlebuf is too small - bad poop\n");
exit(1);
}
goodwrite *= fwrite(rlebuf, len, 1, outf);
@@ -742,9 +742,9 @@ static int output_iris(unsigned int *lptr, int xsize, int ysize, int zsize, cons
if (zptr) zptr += xsize;
}
- fseek(outf,512,SEEK_SET);
- goodwrite *= writetab(outf,starttab,tablen);
- goodwrite *= writetab(outf,lengthtab,tablen);
+ fseek(outf, 512, SEEK_SET);
+ goodwrite *= writetab(outf, starttab, tablen);
+ goodwrite *= writetab(outf, lengthtab, tablen);
MEM_freeN(image);
MEM_freeN(starttab);
MEM_freeN(lengthtab);
@@ -754,7 +754,7 @@ static int output_iris(unsigned int *lptr, int xsize, int ysize, int zsize, cons
if (goodwrite)
return 1;
else {
- fprintf(stderr,"output_iris: not enough space for image!!\n");
+ fprintf(stderr, "output_iris: not enough space for image!!\n");
return 0;
}
}
@@ -765,7 +765,7 @@ static void lumrow(unsigned char *rgbptr, unsigned char *lumptr, int n)
{
lumptr += CHANOFFSET(0);
while (n--) {
- *lumptr = ILUM(rgbptr[OFFSET_R],rgbptr[OFFSET_G],rgbptr[OFFSET_B]);
+ *lumptr = ILUM(rgbptr[OFFSET_R], rgbptr[OFFSET_G], rgbptr[OFFSET_B]);
lumptr += 4;
rgbptr += 4;
}
diff --git a/source/blender/imbuf/intern/jp2.c b/source/blender/imbuf/intern/jp2.c
index 6abfbdb4aa1..c71763b245d 100644
--- a/source/blender/imbuf/intern/jp2.c
+++ b/source/blender/imbuf/intern/jp2.c
@@ -158,7 +158,7 @@ struct ImBuf *imb_jp2_decode(unsigned char *mem, size_t size, int flags)
if ((image->numcomps * image->x1 * image->y1) == 0) {
- fprintf(stderr,"\nError: invalid raw image parameters\n");
+ fprintf(stderr, "\nError: invalid raw image parameters\n");
return NULL;
}
@@ -339,7 +339,7 @@ static void cinema_parameters(opj_cparameters_t *parameters)
parameters->tp_flag = 'C';
parameters->tp_on = 1;
- /*Tile and Image shall be at (0,0)*/
+ /*Tile and Image shall be at (0, 0)*/
parameters->cp_tx0 = 0;
parameters->cp_ty0 = 0;
parameters->image_offset_x0 = 0;
@@ -363,7 +363,7 @@ static void cinema_parameters(opj_cparameters_t *parameters)
}
-static void cinema_setup_encoder(opj_cparameters_t *parameters,opj_image_t *image, img_fol_t *img_fol)
+static void cinema_setup_encoder(opj_cparameters_t *parameters, opj_image_t *image, img_fol_t *img_fol)
{
int i;
float temp_rate;
@@ -375,9 +375,9 @@ static void cinema_setup_encoder(opj_cparameters_t *parameters,opj_image_t *imag
parameters->numresolution = 6;
}
if (!((image->comps[0].w == 2048) || (image->comps[0].h == 1080))) {
- fprintf(stdout,"Image coordinates %d x %d is not 2K compliant.\nJPEG Digital Cinema Profile-3 "
+ fprintf(stdout, "Image coordinates %d x %d is not 2K compliant.\nJPEG Digital Cinema Profile-3 "
"(2K profile) compliance requires that at least one of coordinates match 2048 x 1080\n",
- image->comps[0].w,image->comps[0].h);
+ image->comps[0].w, image->comps[0].h);
parameters->cp_rsiz = STD_RSIZ;
}
break;
@@ -390,12 +390,12 @@ static void cinema_setup_encoder(opj_cparameters_t *parameters,opj_image_t *imag
parameters->numresolution = 7;
}
if (!((image->comps[0].w == 4096) || (image->comps[0].h == 2160))) {
- fprintf(stdout,"Image coordinates %d x %d is not 4K compliant.\nJPEG Digital Cinema Profile-4"
+ fprintf(stdout, "Image coordinates %d x %d is not 4K compliant.\nJPEG Digital Cinema Profile-4"
"(4K profile) compliance requires that at least one of coordinates match 4096 x 2160\n",
- image->comps[0].w,image->comps[0].h);
+ image->comps[0].w, image->comps[0].h);
parameters->cp_rsiz = STD_RSIZ;
}
- parameters->numpocs = initialise_4K_poc(parameters->POC,parameters->numresolution);
+ parameters->numpocs = initialise_4K_poc(parameters->POC, parameters->numresolution);
break;
case OFF:
/* do nothing */
@@ -465,13 +465,13 @@ static opj_image_t* ibuftoimage(ImBuf *ibuf, opj_cparameters_t *parameters)
int i, numcomps, w, h, prec;
- int x,y, y_row;
+ int x, y, y_row;
OPJ_COLOR_SPACE color_space;
opj_image_cmptparm_t cmptparm[4]; /* maximum of 4 components */
opj_image_t * image = NULL;
img_fol_t img_fol; /* only needed for cinema presets */
- memset(&img_fol,0,sizeof(img_fol_t));
+ memset(&img_fol, 0, sizeof(img_fol_t));
if (ibuf->ftype & JP2_CINE) {
@@ -552,7 +552,7 @@ static opj_image_t* ibuftoimage(ImBuf *ibuf, opj_cparameters_t *parameters)
float rgb[3];
switch (prec) {
- case 8: /* Convert blenders float color channels to 8,12 or 16bit ints */
+ case 8: /* Convert blenders float color channels to 8, 12 or 16bit ints */
for (y=h-1; y>=0; y--) {
y_row = y*w;
for (x=0; x<w; x++, rect_float+=4) {
@@ -665,7 +665,7 @@ static opj_image_t* ibuftoimage(ImBuf *ibuf, opj_cparameters_t *parameters)
parameters->tcp_mct = image->numcomps == 3 ? 1 : 0;
if (parameters->cp_cinema) {
- cinema_setup_encoder(parameters,image,&img_fol);
+ cinema_setup_encoder(parameters, image, &img_fol);
}
if (img_fol.rates)
@@ -748,7 +748,7 @@ int imb_savejp2(struct ImBuf *ibuf, const char *name, int flags)
}
fwrite(cio->buffer, 1, codestream_length, f);
fclose(f);
- fprintf(stderr,"Generated outfile %s\n",name);
+ fprintf(stderr, "Generated outfile %s\n", name);
/* close and free the byte stream */
opj_cio_close(cio);
diff --git a/source/blender/imbuf/intern/jpeg.c b/source/blender/imbuf/intern/jpeg.c
index 3f3ebc5872d..f3a382eaa56 100644
--- a/source/blender/imbuf/intern/jpeg.c
+++ b/source/blender/imbuf/intern/jpeg.c
@@ -230,7 +230,7 @@ static void memory_source(j_decompress_ptr cinfo, unsigned char *buffer, size_t
* If must suspend, take the specified action (typically "return FALSE").
*/
#define INPUT_BYTE(cinfo,V,action) \
- MAKESTMT( MAKE_BYTE_AVAIL(cinfo,action); \
+ MAKESTMT(MAKE_BYTE_AVAIL(cinfo,action); \
bytes_in_buffer--; \
V = GETJOCTET(*next_input_byte++); )
@@ -238,7 +238,7 @@ static void memory_source(j_decompress_ptr cinfo, unsigned char *buffer, size_t
* V should be declared unsigned int or perhaps INT32.
*/
#define INPUT_2BYTES(cinfo,V,action) \
- MAKESTMT( MAKE_BYTE_AVAIL(cinfo,action); \
+ MAKESTMT(MAKE_BYTE_AVAIL(cinfo,action); \
bytes_in_buffer--; \
V = ((unsigned int) GETJOCTET(*next_input_byte++)) << 8; \
MAKE_BYTE_AVAIL(cinfo,action); \
@@ -321,7 +321,7 @@ static ImBuf * ibJpegImageFromCinfo(struct jpeg_decompress_struct * cinfo, int f
rect = (uchar *) (ibuf->rect + y * ibuf->x);
buffer = row_pointer[0];
- switch(depth) {
+ switch (depth) {
case 1:
for (x=ibuf->x; x >0; x--) {
rect[3] = 255;
@@ -524,7 +524,7 @@ next_stamp_info:
rect = (uchar *) (ibuf->rect + y * ibuf->x);
buffer = row_pointer[0];
- switch(cinfo->in_color_space) {
+ switch (cinfo->in_color_space) {
case JCS_RGB:
for (x = 0; x < ibuf->x; x++) {
*buffer++ = rect[0];
@@ -577,7 +577,7 @@ static int init_jpeg(FILE * outfile, struct jpeg_compress_struct * cinfo, struct
if (ibuf->planes == 32) cinfo->in_color_space = JCS_UNKNOWN;
#endif
- switch(cinfo->in_color_space) {
+ switch (cinfo->in_color_space) {
case JCS_RGB:
cinfo->input_components = 3;
break;
diff --git a/source/blender/imbuf/intern/moviecache.c b/source/blender/imbuf/intern/moviecache.c
index 8b18be87b3c..485f593a8fb 100644
--- a/source/blender/imbuf/intern/moviecache.c
+++ b/source/blender/imbuf/intern/moviecache.c
@@ -44,7 +44,7 @@
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
-static MEM_CacheLimiterC *limitor= NULL;
+static MEM_CacheLimiterC *limitor = NULL;
typedef struct MovieCache {
GHash *hash;
@@ -113,7 +113,7 @@ static void check_unused_keys(MovieCache *cache)
{
GHashIterator *iter;
- iter= BLI_ghashIterator_new(cache->hash);
+ iter = BLI_ghashIterator_new(cache->hash);
while (!BLI_ghashIterator_isDone(iter)) {
MovieCacheKey *key = BLI_ghashIterator_getKey(iter);
MovieCacheItem *item = BLI_ghashIterator_getValue(iter);
@@ -253,7 +253,7 @@ void IMB_moviecache_put(MovieCache *cache, void *userkey, ImBuf *ibuf)
if (cache->points) {
MEM_freeN(cache->points);
- cache->points= NULL;
+ cache->points = NULL;
}
}
@@ -321,7 +321,7 @@ void IMB_moviecache_get_cache_segments(MovieCache *cache, int proxy, int render_
GHashIterator *iter;
iter = BLI_ghashIterator_new(cache->hash);
- a= 0;
+ a = 0;
while (!BLI_ghashIterator_isDone(iter)) {
MovieCacheKey *key = BLI_ghashIterator_getKey(iter);
MovieCacheItem *item = BLI_ghashIterator_getValue(iter);
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
index ff3a816f478..50bc55da412 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
@@ -117,8 +117,7 @@ private:
bool Mem_IStream::read (char c[], int n)
{
- if (n + _exrpos <= _exrsize)
- {
+ if (n + _exrpos <= _exrsize) {
memcpy(c, (void *)(&_exrbuf[_exrpos]), n);
_exrpos += n;
return true;
@@ -162,8 +161,7 @@ int imb_is_a_openexr(unsigned char *mem)
static void openexr_header_compression(Header *header, int compression)
{
- switch(compression)
- {
+ switch (compression) {
case 0:
header->compression() = NO_COMPRESSION;
break;
@@ -236,12 +234,10 @@ static int imb_save_openexr_half(struct ImBuf *ibuf, const char *name, int flags
if (ibuf->rect_float) {
float *from;
- for (int i = ibuf->y-1; i >= 0; i--)
- {
+ for (int i = ibuf->y-1; i >= 0; i--) {
from= ibuf->rect_float + channels*i*width;
- for (int j = ibuf->x; j > 0; j--)
- {
+ for (int j = ibuf->x; j > 0; j--) {
to->r = from[0];
to->g = from[1];
to->b = from[2];
@@ -254,12 +250,10 @@ static int imb_save_openexr_half(struct ImBuf *ibuf, const char *name, int flags
unsigned char *from;
if (ibuf->profile == IB_PROFILE_LINEAR_RGB) {
- for (int i = ibuf->y-1; i >= 0; i--)
- {
+ for (int i = ibuf->y-1; i >= 0; i--) {
from= (unsigned char *)ibuf->rect + channels*i*width;
- for (int j = ibuf->x; j > 0; j--)
- {
+ for (int j = ibuf->x; j > 0; j--) {
to->r = (float)(from[0])/255.0;
to->g = (float)(from[1])/255.0;
to->b = (float)(from[2])/255.0;
@@ -269,12 +263,10 @@ static int imb_save_openexr_half(struct ImBuf *ibuf, const char *name, int flags
}
}
else {
- for (int i = ibuf->y-1; i >= 0; i--)
- {
+ for (int i = ibuf->y-1; i >= 0; i--) {
from= (unsigned char *)ibuf->rect + channels*i*width;
- for (int j = ibuf->x; j > 0; j--)
- {
+ for (int j = ibuf->x; j > 0; j--) {
to->r = srgb_to_linearrgb((float)from[0] / 255.0);
to->g = srgb_to_linearrgb((float)from[1] / 255.0);
to->b = srgb_to_linearrgb((float)from[2] / 255.0);
@@ -364,8 +356,7 @@ static int imb_save_openexr_float(struct ImBuf *ibuf, const char *name, int flag
int imb_save_openexr(struct ImBuf *ibuf, const char *name, int flags)
{
- if (flags & IB_mem)
- {
+ if (flags & IB_mem) {
printf("OpenEXR-save: Create EXR in memory CURRENTLY NOT SUPPORTED !\n");
imb_addencodedbufferImBuf(ibuf);
ibuf->encodedsize = 0;
@@ -743,7 +734,7 @@ static int imb_exr_split_channel_name(ExrChannel *echan, char *layname, char *pa
echan->chan_id= echan->name[len-1];
len-= 3;
- while(len>=0) {
+ while (len>=0) {
if (echan->name[len]=='.')
break;
len--;
@@ -913,8 +904,7 @@ static void exr_print_filecontents(InputFile *file)
{
const ChannelList &channels = file->header().channels();
- for (ChannelList::ConstIterator i = channels.begin(); i != channels.end(); ++i)
- {
+ for (ChannelList::ConstIterator i = channels.begin(); i != channels.end(); ++i) {
const Channel &channel = i.channel();
printf("OpenEXR-load: Found channel %s of type %d\n", i.name(), channel.type);
}
@@ -925,8 +915,7 @@ static const char *exr_rgba_channelname(InputFile *file, const char *chan)
{
const ChannelList &channels = file->header().channels();
- for (ChannelList::ConstIterator i = channels.begin(); i != channels.end(); ++i)
- {
+ for (ChannelList::ConstIterator i = channels.begin(); i != channels.end(); ++i) {
/* const Channel &channel = i.channel(); */ /* Not used yet */
const char *str= i.name();
int len= strlen(str);
@@ -986,8 +975,7 @@ struct ImBuf *imb_load_openexr(unsigned char *mem, size_t size, int flags)
is_multi= exr_is_multilayer(file);
/* do not make an ibuf when */
- if (is_multi && !(flags & IB_test) && !(flags & IB_multilayer))
- {
+ if (is_multi && !(flags & IB_test) && !(flags & IB_multilayer)) {
printf("Error: can't process EXR multilayer file\n");
}
else {
@@ -998,10 +986,8 @@ struct ImBuf *imb_load_openexr(unsigned char *mem, size_t size, int flags)
/* openEXR is linear as per EXR spec */
ibuf->profile = IB_PROFILE_LINEAR_RGB;
- if (!(flags & IB_test))
- {
- if (is_multi) /* only enters with IB_multilayer flag set */
- {
+ if (!(flags & IB_test)) {
+ if (is_multi) { /* only enters with IB_multilayer flag set */
/* constructs channels for reading, allocates memory in channels */
ExrHandle *handle= imb_exr_begin_read_mem(file, width, height);
if (handle) {
@@ -1032,14 +1018,13 @@ struct ImBuf *imb_load_openexr(unsigned char *mem, size_t size, int flags)
frameBuffer.insert ( exr_rgba_channelname(file, "A"),
Slice (Imf::FLOAT, (char *) (first+3), xstride, ystride, 1, 1, 1.0f)); /* 1.0 is fill value */
- if (exr_has_zbuffer(file))
- {
+ if (exr_has_zbuffer(file)) {
float *firstz;
addzbuffloatImBuf(ibuf);
firstz= ibuf->zbuf_float - (dw.min.x - dw.min.y*width);
firstz+= (height-1)*width;
- frameBuffer.insert ("Z", Slice (Imf::FLOAT, (char *)firstz , sizeof(float), -width*sizeof(float)));
+ frameBuffer.insert("Z", Slice (Imf::FLOAT, (char *)firstz, sizeof(float), -width * sizeof(float)));
}
file->setFrameBuffer (frameBuffer);
diff --git a/source/blender/imbuf/intern/png.c b/source/blender/imbuf/intern/png.c
index 74e1a4084c2..0a19bf1280b 100644
--- a/source/blender/imbuf/intern/png.c
+++ b/source/blender/imbuf/intern/png.c
@@ -51,9 +51,9 @@ typedef struct PNGReadStruct {
unsigned int seek;
} PNGReadStruct;
-static void ReadData( png_structp png_ptr, png_bytep data, png_size_t length);
-static void WriteData( png_structp png_ptr, png_bytep data, png_size_t length);
-static void Flush( png_structp png_ptr);
+static void ReadData(png_structp png_ptr, png_bytep data, png_size_t length);
+static void WriteData(png_structp png_ptr, png_bytep data, png_size_t length);
+static void Flush(png_structp png_ptr);
int imb_is_a_png(unsigned char *mem)
{
@@ -68,7 +68,7 @@ static void Flush(png_structp png_ptr)
(void)png_ptr;
}
-static void WriteData( png_structp png_ptr, png_bytep data, png_size_t length)
+static void WriteData(png_structp png_ptr, png_bytep data, png_size_t length)
{
ImBuf *ibuf = (ImBuf *) png_get_io_ptr(png_ptr);
@@ -81,7 +81,7 @@ static void WriteData( png_structp png_ptr, png_bytep data, png_size_t length)
ibuf->encodedsize += length;
}
-static void ReadData( png_structp png_ptr, png_bytep data, png_size_t length)
+static void ReadData(png_structp png_ptr, png_bytep data, png_size_t length)
{
PNGReadStruct *rs= (PNGReadStruct *) png_get_io_ptr(png_ptr);
@@ -358,7 +358,7 @@ struct ImBuf *imb_loadpng(unsigned char *mem, size_t size, int flags)
bytesperpixel = png_get_channels(png_ptr, info_ptr);
- switch(color_type) {
+ switch (color_type) {
case PNG_COLOR_TYPE_RGB:
case PNG_COLOR_TYPE_RGB_ALPHA:
break;
diff --git a/source/blender/imbuf/intern/radiance_hdr.c b/source/blender/imbuf/intern/radiance_hdr.c
index 524f96b72af..66acd952ac0 100644
--- a/source/blender/imbuf/intern/radiance_hdr.c
+++ b/source/blender/imbuf/intern/radiance_hdr.c
@@ -192,8 +192,11 @@ struct ImBuf *imb_loadhdr(unsigned char *mem, size_t size, int flags)
}
}
if (found && (x<(size + 2))) {
- if (sscanf((char *)&mem[x+1], "%79s %d %79s %d", (char*)&oriY, &height,
- (char*)&oriX, &width) != 4) return NULL;
+ if (sscanf((char *)&mem[x + 1], "%79s %d %79s %d", (char *)&oriY, &height,
+ (char*)&oriX, &width) != 4)
+ {
+ return NULL;
+ }
/* find end of this line, data right behind it */
ptr = (unsigned char *)strchr((char*)&mem[x+1], '\n');
diff --git a/source/blender/imbuf/intern/readimage.c b/source/blender/imbuf/intern/readimage.c
index 61f90f7a97a..e9d549be8b9 100644
--- a/source/blender/imbuf/intern/readimage.c
+++ b/source/blender/imbuf/intern/readimage.c
@@ -152,7 +152,7 @@ ImBuf *IMB_testiffname(const char *filepath, int flags)
imb_cache_filename(filepath_tx, filepath, flags);
- file = BLI_open(filepath_tx,O_BINARY|O_RDONLY,0);
+ file = BLI_open(filepath_tx, O_BINARY|O_RDONLY, 0);
if (file < 0) return NULL;
ibuf=IMB_loadifffile(file, flags|IB_test|IB_multilayer, filepath_tx);
diff --git a/source/blender/imbuf/intern/rectop.c b/source/blender/imbuf/intern/rectop.c
index 6ea84fd6717..2d765c7d6a1 100644
--- a/source/blender/imbuf/intern/rectop.c
+++ b/source/blender/imbuf/intern/rectop.c
@@ -49,55 +49,55 @@ static void blend_color_mix(char *cp, char *cp1, char *cp2, int fac)
/* this and other blending modes previously used >>8 instead of /255. both
* are not equivalent (>>8 is /256), and the former results in rounding
* errors that can turn colors black fast after repeated blending */
- int mfac= 255-fac;
+ int mfac = 255 - fac;
- cp[0]= (mfac*cp1[0]+fac*cp2[0])/255;
- cp[1]= (mfac*cp1[1]+fac*cp2[1])/255;
- cp[2]= (mfac*cp1[2]+fac*cp2[2])/255;
+ cp[0] = (mfac * cp1[0] + fac * cp2[0]) / 255;
+ cp[1] = (mfac * cp1[1] + fac * cp2[1]) / 255;
+ cp[2] = (mfac * cp1[2] + fac * cp2[2]) / 255;
}
static void blend_color_add(char *cp, char *cp1, char *cp2, int fac)
{
int temp;
- temp= cp1[0] + ((fac*cp2[0])/255);
- if (temp>254) cp[0]= 255; else cp[0]= temp;
- temp= cp1[1] + ((fac*cp2[1])/255);
- if (temp>254) cp[1]= 255; else cp[1]= temp;
- temp= cp1[2] + ((fac*cp2[2])/255);
- if (temp>254) cp[2]= 255; else cp[2]= temp;
+ temp = cp1[0] + ((fac * cp2[0]) / 255);
+ if (temp > 254) cp[0] = 255; else cp[0] = temp;
+ temp = cp1[1] + ((fac * cp2[1]) / 255);
+ if (temp > 254) cp[1] = 255; else cp[1] = temp;
+ temp = cp1[2] + ((fac * cp2[2]) / 255);
+ if (temp > 254) cp[2] = 255; else cp[2] = temp;
}
static void blend_color_sub(char *cp, char *cp1, char *cp2, int fac)
{
int temp;
- temp= cp1[0] - ((fac*cp2[0])/255);
- if (temp<0) cp[0]= 0; else cp[0]= temp;
- temp= cp1[1] - ((fac*cp2[1])/255);
- if (temp<0) cp[1]= 0; else cp[1]= temp;
- temp= cp1[2] - ((fac*cp2[2])/255);
- if (temp<0) cp[2]= 0; else cp[2]= temp;
+ temp = cp1[0] - ((fac * cp2[0]) / 255);
+ if (temp < 0) cp[0] = 0; else cp[0] = temp;
+ temp = cp1[1] - ((fac * cp2[1]) / 255);
+ if (temp < 0) cp[1] = 0; else cp[1] = temp;
+ temp = cp1[2] - ((fac * cp2[2]) / 255);
+ if (temp < 0) cp[2] = 0; else cp[2] = temp;
}
static void blend_color_mul(char *cp, char *cp1, char *cp2, int fac)
{
- int mfac= 255-fac;
+ int mfac = 255 - fac;
/* first mul, then blend the fac */
- cp[0]= (mfac*cp1[0] + fac*((cp1[0]*cp2[0])/255))/255;
- cp[1]= (mfac*cp1[1] + fac*((cp1[1]*cp2[1])/255))/255;
- cp[2]= (mfac*cp1[2] + fac*((cp1[2]*cp2[2])/255))/255;
+ cp[0] = (mfac * cp1[0] + fac * ((cp1[0] * cp2[0]) / 255)) / 255;
+ cp[1] = (mfac * cp1[1] + fac * ((cp1[1] * cp2[1]) / 255)) / 255;
+ cp[2] = (mfac * cp1[2] + fac * ((cp1[2] * cp2[2]) / 255)) / 255;
}
static void blend_color_lighten(char *cp, char *cp1, char *cp2, int fac)
{
/* See if are lighter, if so mix, else don't do anything.
* if the paint col is darker then the original, then ignore */
- if (cp1[0]+cp1[1]+cp1[2] > cp2[0]+cp2[1]+cp2[2]) {
- cp[0]= cp1[0];
- cp[1]= cp1[1];
- cp[2]= cp1[2];
+ if (cp1[0] + cp1[1] + cp1[2] > cp2[0] + cp2[1] + cp2[2]) {
+ cp[0] = cp1[0];
+ cp[1] = cp1[1];
+ cp[2] = cp1[2];
}
else
blend_color_mix(cp, cp1, cp2, fac);
@@ -107,10 +107,10 @@ static void blend_color_darken(char *cp, char *cp1, char *cp2, int fac)
{
/* See if were darker, if so mix, else don't do anything.
* if the paint col is brighter then the original, then ignore */
- if (cp1[0]+cp1[1]+cp1[2] < cp2[0]+cp2[1]+cp2[2]) {
- cp[0]= cp1[0];
- cp[1]= cp1[1];
- cp[2]= cp1[2];
+ if (cp1[0] + cp1[1] + cp1[2] < cp2[0] + cp2[1] + cp2[2]) {
+ cp[0] = cp1[0];
+ cp[1] = cp1[1];
+ cp[2] = cp1[2];
}
else
blend_color_mix(cp, cp1, cp2, fac);
@@ -122,12 +122,12 @@ unsigned int IMB_blend_color(unsigned int src1, unsigned int src2, int fac, IMB_
int temp;
char *cp, *cp1, *cp2;
- if (fac==0)
+ if (fac == 0)
return src1;
- cp = (char*)&dst;
- cp1 = (char*)&src1;
- cp2 = (char*)&src2;
+ cp = (char *)&dst;
+ cp1 = (char *)&src1;
+ cp2 = (char *)&src2;
switch (mode) {
case IMB_BLEND_MIX:
@@ -143,18 +143,18 @@ unsigned int IMB_blend_color(unsigned int src1, unsigned int src2, int fac, IMB_
case IMB_BLEND_DARKEN:
blend_color_darken(cp, cp1, cp2, fac); break;
default:
- cp[0]= cp1[0];
- cp[1]= cp1[1];
- cp[2]= cp1[2];
+ cp[0] = cp1[0];
+ cp[1] = cp1[1];
+ cp[2] = cp1[2];
}
if (mode == IMB_BLEND_ERASE_ALPHA) {
- temp= (cp1[3] - fac*cp2[3]/255);
- cp[3]= (temp < 0)? 0: temp;
+ temp = (cp1[3] - fac * cp2[3] / 255);
+ cp[3] = (temp < 0) ? 0 : temp;
}
else { /* this does ADD_ALPHA also */
- temp= (cp1[3] + fac*cp2[3]/255);
- cp[3]= (temp > 255)? 255: temp;
+ temp = (cp1[3] + fac * cp2[3] / 255);
+ cp[3] = (temp > 255) ? 255 : temp;
}
return dst;
@@ -162,51 +162,51 @@ unsigned int IMB_blend_color(unsigned int src1, unsigned int src2, int fac, IMB_
static void blend_color_mix_float(float *cp, float *cp1, float *cp2, float fac)
{
- float mfac= 1.0f-fac;
- cp[0]= mfac*cp1[0] + fac*cp2[0];
- cp[1]= mfac*cp1[1] + fac*cp2[1];
- cp[2]= mfac*cp1[2] + fac*cp2[2];
+ float mfac = 1.0f - fac;
+ cp[0] = mfac * cp1[0] + fac * cp2[0];
+ cp[1] = mfac * cp1[1] + fac * cp2[1];
+ cp[2] = mfac * cp1[2] + fac * cp2[2];
}
static void blend_color_add_float(float *cp, float *cp1, float *cp2, float fac)
{
- cp[0] = cp1[0] + fac*cp2[0];
- cp[1] = cp1[1] + fac*cp2[1];
- cp[2] = cp1[2] + fac*cp2[2];
+ cp[0] = cp1[0] + fac * cp2[0];
+ cp[1] = cp1[1] + fac * cp2[1];
+ cp[2] = cp1[2] + fac * cp2[2];
- if (cp[0] > 1.0f) cp[0]= 1.0f;
- if (cp[1] > 1.0f) cp[1]= 1.0f;
- if (cp[2] > 1.0f) cp[2]= 1.0f;
+ if (cp[0] > 1.0f) cp[0] = 1.0f;
+ if (cp[1] > 1.0f) cp[1] = 1.0f;
+ if (cp[2] > 1.0f) cp[2] = 1.0f;
}
static void blend_color_sub_float(float *cp, float *cp1, float *cp2, float fac)
{
- cp[0] = cp1[0] - fac*cp2[0];
- cp[1] = cp1[1] - fac*cp2[1];
- cp[2] = cp1[2] - fac*cp2[2];
+ cp[0] = cp1[0] - fac * cp2[0];
+ cp[1] = cp1[1] - fac * cp2[1];
+ cp[2] = cp1[2] - fac * cp2[2];
- if (cp[0] < 0.0f) cp[0]= 0.0f;
- if (cp[1] < 0.0f) cp[1]= 0.0f;
- if (cp[2] < 0.0f) cp[2]= 0.0f;
+ if (cp[0] < 0.0f) cp[0] = 0.0f;
+ if (cp[1] < 0.0f) cp[1] = 0.0f;
+ if (cp[2] < 0.0f) cp[2] = 0.0f;
}
static void blend_color_mul_float(float *cp, float *cp1, float *cp2, float fac)
{
- float mfac= 1.0f-fac;
+ float mfac = 1.0f - fac;
- cp[0]= mfac*cp1[0] + fac*(cp1[0]*cp2[0]);
- cp[1]= mfac*cp1[1] + fac*(cp1[1]*cp2[1]);
- cp[2]= mfac*cp1[2] + fac*(cp1[2]*cp2[2]);
+ cp[0] = mfac * cp1[0] + fac * (cp1[0] * cp2[0]);
+ cp[1] = mfac * cp1[1] + fac * (cp1[1] * cp2[1]);
+ cp[2] = mfac * cp1[2] + fac * (cp1[2] * cp2[2]);
}
static void blend_color_lighten_float(float *cp, float *cp1, float *cp2, float fac)
{
/* See if are lighter, if so mix, else don't do anything.
* if the pafloat col is darker then the original, then ignore */
- if (cp1[0]+cp1[1]+cp1[2] > cp2[0]+cp2[1]+cp2[2]) {
- cp[0]= cp1[0];
- cp[1]= cp1[1];
- cp[2]= cp1[2];
+ if (cp1[0] + cp1[1] + cp1[2] > cp2[0] + cp2[1] + cp2[2]) {
+ cp[0] = cp1[0];
+ cp[1] = cp1[1];
+ cp[2] = cp1[2];
}
else
blend_color_mix_float(cp, cp1, cp2, fac);
@@ -216,10 +216,10 @@ static void blend_color_darken_float(float *cp, float *cp1, float *cp2, float fa
{
/* See if were darker, if so mix, else don't do anything.
* if the pafloat col is brighter then the original, then ignore */
- if (cp1[0]+cp1[1]+cp1[2] < cp2[0]+cp2[1]+cp2[2]) {
- cp[0]= cp1[0];
- cp[1]= cp1[1];
- cp[2]= cp1[2];
+ if (cp1[0] + cp1[1] + cp1[2] < cp2[0] + cp2[1] + cp2[2]) {
+ cp[0] = cp1[0];
+ cp[1] = cp1[1];
+ cp[2] = cp1[2];
}
else
blend_color_mix_float(cp, cp1, cp2, fac);
@@ -227,11 +227,11 @@ static void blend_color_darken_float(float *cp, float *cp1, float *cp2, float fa
void IMB_blend_color_float(float *dst, float *src1, float *src2, float fac, IMB_BlendMode mode)
{
- if (fac==0) {
- dst[0]= src1[0];
- dst[1]= src1[1];
- dst[2]= src1[2];
- dst[3]= src1[3];
+ if (fac == 0) {
+ dst[0] = src1[0];
+ dst[1] = src1[1];
+ dst[2] = src1[2];
+ dst[3] = src1[3];
return;
}
@@ -249,17 +249,17 @@ void IMB_blend_color_float(float *dst, float *src1, float *src2, float fac, IMB_
case IMB_BLEND_DARKEN:
blend_color_darken_float(dst, src1, src2, fac); break;
default:
- dst[0]= src1[0];
- dst[1]= src1[1];
- dst[2]= src1[2];
+ dst[0] = src1[0];
+ dst[1] = src1[1];
+ dst[2] = src1[2];
}
if (mode == IMB_BLEND_ERASE_ALPHA) {
- dst[3]= (src1[3] - fac*src2[3]);
+ dst[3] = (src1[3] - fac * src2[3]);
if (dst[3] < 0.0f) dst[3] = 0.0f;
}
else { /* this does ADD_ALPHA also */
- dst[3]= (src1[3] + fac*src2[3]);
+ dst[3] = (src1[3] + fac * src2[3]);
if (dst[3] > 1.0f) dst[3] = 1.0f;
}
}
@@ -267,7 +267,7 @@ void IMB_blend_color_float(float *dst, float *src1, float *src2, float fac, IMB_
/* clipping */
void IMB_rectclip(struct ImBuf *dbuf, struct ImBuf *sbuf, int *destx,
- int *desty, int *srcx, int *srcy, int *width, int *height)
+ int *desty, int *srcx, int *srcy, int *width, int *height)
{
int tmp;
@@ -315,14 +315,14 @@ void IMB_rectclip(struct ImBuf *dbuf, struct ImBuf *sbuf, int *destx,
/* copy and blend */
void IMB_rectcpy(struct ImBuf *dbuf, struct ImBuf *sbuf, int destx,
- int desty, int srcx, int srcy, int width, int height)
+ int desty, int srcx, int srcy, int width, int height)
{
IMB_rectblend(dbuf, sbuf, destx, desty, srcx, srcy, width, height,
- IMB_BLEND_COPY);
+ IMB_BLEND_COPY);
}
void IMB_rectblend(struct ImBuf *dbuf, struct ImBuf *sbuf, int destx,
- int desty, int srcx, int srcy, int width, int height, IMB_BlendMode mode)
+ int desty, int srcx, int srcy, int width, int height, IMB_BlendMode mode)
{
unsigned int *drect = NULL, *srect = NULL, *dr, *sr;
float *drectf = NULL, *srectf = NULL, *drf, *srf;
@@ -333,20 +333,20 @@ void IMB_rectblend(struct ImBuf *dbuf, struct ImBuf *sbuf, int destx,
IMB_rectclip(dbuf, sbuf, &destx, &desty, &srcx, &srcy, &width, &height);
if (width == 0 || height == 0) return;
- if (sbuf && sbuf->channels!=4) return;
- if (dbuf->channels!=4) return;
+ if (sbuf && sbuf->channels != 4) return;
+ if (dbuf->channels != 4) return;
do_char = (sbuf && sbuf->rect && dbuf->rect);
do_float = (sbuf && sbuf->rect_float && dbuf->rect_float);
if (do_char) drect = dbuf->rect + desty * dbuf->x + destx;
- if (do_float) drectf = dbuf->rect_float + (desty * dbuf->x + destx)*4;
+ if (do_float) drectf = dbuf->rect_float + (desty * dbuf->x + destx) * 4;
destskip = dbuf->x;
if (sbuf) {
if (do_char) srect = sbuf->rect + srcy * sbuf->x + srcx;
- if (do_float) srectf = sbuf->rect_float + (srcy * sbuf->x + srcx)*4;
+ if (do_float) srectf = sbuf->rect_float + (srcy * sbuf->x + srcx) * 4;
srcskip = sbuf->x;
}
else {
@@ -357,30 +357,30 @@ void IMB_rectblend(struct ImBuf *dbuf, struct ImBuf *sbuf, int destx,
if (mode == IMB_BLEND_COPY) {
/* copy */
- for (;height > 0; height--) {
+ for (; height > 0; height--) {
if (do_char) {
- memcpy(drect,srect, width * sizeof(int));
+ memcpy(drect, srect, width * sizeof(int));
drect += destskip;
srect += srcskip;
}
if (do_float) {
- memcpy(drectf,srectf, width * sizeof(float) * 4);
- drectf += destskip*4;
- srectf += srcskip*4;
+ memcpy(drectf, srectf, width * sizeof(float) * 4);
+ drectf += destskip * 4;
+ srectf += srcskip * 4;
}
}
}
else if (mode == IMB_BLEND_COPY_RGB) {
/* copy rgb only */
- for (;height > 0; height--) {
+ for (; height > 0; height--) {
if (do_char) {
dr = drect;
sr = srect;
- for (x=width; x > 0; x--, dr++, sr++) {
- ((char*)dr)[0]= ((char*)sr)[0];
- ((char*)dr)[1]= ((char*)sr)[1];
- ((char*)dr)[2]= ((char*)sr)[2];
+ for (x = width; x > 0; x--, dr++, sr++) {
+ ((char *)dr)[0] = ((char *)sr)[0];
+ ((char *)dr)[1] = ((char *)sr)[1];
+ ((char *)dr)[2] = ((char *)sr)[2];
}
drect += destskip;
srect += srcskip;
@@ -389,24 +389,24 @@ void IMB_rectblend(struct ImBuf *dbuf, struct ImBuf *sbuf, int destx,
if (do_float) {
drf = drectf;
srf = srectf;
- for (x=width; x > 0; x--, drf+=4, srf+=4) {
- drf[0]= srf[0];
- drf[1]= srf[1];
- drf[2]= srf[2];
+ for (x = width; x > 0; x--, drf += 4, srf += 4) {
+ drf[0] = srf[0];
+ drf[1] = srf[1];
+ drf[2] = srf[2];
}
- drectf += destskip*4;
- srectf += srcskip*4;
+ drectf += destskip * 4;
+ srectf += srcskip * 4;
}
}
}
else if (mode == IMB_BLEND_COPY_ALPHA) {
/* copy alpha only */
- for (;height > 0; height--) {
+ for (; height > 0; height--) {
if (do_char) {
dr = drect;
sr = srect;
- for (x=width; x > 0; x--, dr++, sr++)
- ((char*)dr)[3]= ((char*)sr)[3];
+ for (x = width; x > 0; x--, dr++, sr++)
+ ((char *)dr)[3] = ((char *)sr)[3];
drect += destskip;
srect += srcskip;
}
@@ -414,21 +414,21 @@ void IMB_rectblend(struct ImBuf *dbuf, struct ImBuf *sbuf, int destx,
if (do_float) {
drf = drectf;
srf = srectf;
- for (x=width; x > 0; x--, drf+=4, srf+=4)
- drf[3]= srf[3];
- drectf += destskip*4;
- srectf += srcskip*4;
+ for (x = width; x > 0; x--, drf += 4, srf += 4)
+ drf[3] = srf[3];
+ drectf += destskip * 4;
+ srectf += srcskip * 4;
}
}
}
else {
/* blend */
- for (;height > 0; height--) {
+ for (; height > 0; height--) {
if (do_char) {
dr = drect;
sr = srect;
- for (x=width; x > 0; x--, dr++, sr++)
- *dr = IMB_blend_color(*dr, *sr, ((char*)sr)[3], mode);
+ for (x = width; x > 0; x--, dr++, sr++)
+ *dr = IMB_blend_color(*dr, *sr, ((char *)sr)[3], mode);
drect += destskip;
srect += srcskip;
@@ -437,11 +437,11 @@ void IMB_rectblend(struct ImBuf *dbuf, struct ImBuf *sbuf, int destx,
if (do_float) {
drf = drectf;
srf = srectf;
- for (x=width; x > 0; x--, drf+=4, srf+=4)
+ for (x = width; x > 0; x--, drf += 4, srf += 4)
IMB_blend_color_float(drf, drf, srf, srf[3], mode);
- drectf += destskip*4;
- srectf += srcskip*4;
+ drectf += destskip * 4;
+ srectf += srcskip * 4;
}
}
}
@@ -457,21 +457,21 @@ void IMB_rectfill(struct ImBuf *drect, const float col[4])
unsigned int *rrect = drect->rect;
char ccol[4];
- ccol[0]= (int)(col[0]*255);
- ccol[1]= (int)(col[1]*255);
- ccol[2]= (int)(col[2]*255);
- ccol[3]= (int)(col[3]*255);
+ ccol[0] = (int)(col[0] * 255);
+ ccol[1] = (int)(col[1] * 255);
+ ccol[2] = (int)(col[2] * 255);
+ ccol[3] = (int)(col[3] * 255);
num = drect->x * drect->y;
- for (;num > 0; num--)
- *rrect++ = *((unsigned int*)ccol);
+ for (; num > 0; num--)
+ *rrect++ = *((unsigned int *)ccol);
}
if (drect->rect_float) {
float *rrectf = drect->rect_float;
num = drect->x * drect->y;
- for (;num > 0; num--) {
+ for (; num > 0; num--) {
*rrectf++ = col[0];
*rrectf++ = col[1];
*rrectf++ = col[2];
@@ -487,7 +487,7 @@ void buf_rectfill_area(unsigned char *rect, float *rectf, int width, int height,
float a; /* alpha */
float ai; /* alpha inverted */
float aich; /* alpha, inverted, ai/255.0 - Convert char to float at the same time */
- if ((!rect && !rectf) || (!col) || col[3]==0.0f)
+ if ((!rect && !rectf) || (!col) || col[3] == 0.0f)
return;
/* sanity checks for coords */
@@ -496,20 +496,20 @@ void buf_rectfill_area(unsigned char *rect, float *rectf, int width, int height,
CLAMP(y1, 0, height);
CLAMP(y2, 0, height);
- if (x1>x2) SWAP(int,x1,x2);
- if (y1>y2) SWAP(int,y1,y2);
- if (x1==x2 || y1==y2) return;
+ if (x1 > x2) SWAP(int, x1, x2);
+ if (y1 > y2) SWAP(int, y1, y2);
+ if (x1 == x2 || y1 == y2) return;
a = col[3];
- ai = 1-a;
- aich = ai/255.0f;
+ ai = 1 - a;
+ aich = ai / 255.0f;
if (rect) {
unsigned char *pixel;
- unsigned char chr=0, chg=0, chb=0;
- float fr=0, fg=0, fb=0;
+ unsigned char chr = 0, chg = 0, chb = 0;
+ float fr = 0, fg = 0, fb = 0;
- const int alphaint= FTOCHAR(a);
+ const int alphaint = FTOCHAR(a);
if (a == 1.0f) {
chr = FTOCHAR(col[0]);
@@ -517,14 +517,14 @@ void buf_rectfill_area(unsigned char *rect, float *rectf, int width, int height,
chb = FTOCHAR(col[2]);
}
else {
- fr = col[0]*a;
- fg = col[1]*a;
- fb = col[2]*a;
+ fr = col[0] * a;
+ fg = col[1] * a;
+ fb = col[2] * a;
}
- for (j = 0; j < y2-y1; j++) {
- for (i = 0; i < x2-x1; i++) {
+ for (j = 0; j < y2 - y1; j++) {
+ for (i = 0; i < x2 - x1; i++) {
pixel = rect + 4 * (((y1 + j) * width) + (x1 + i));
- if (pixel >= rect && pixel < rect+ (4 * (width * height))) {
+ if (pixel >= rect && pixel < rect + (4 * (width * height))) {
if (a == 1.0f) {
pixel[0] = chr;
pixel[1] = chg;
@@ -533,10 +533,10 @@ void buf_rectfill_area(unsigned char *rect, float *rectf, int width, int height,
}
else {
int alphatest;
- pixel[0] = (char)((fr + ((float)pixel[0]*aich))*255.0f);
- pixel[1] = (char)((fg + ((float)pixel[1]*aich))*255.0f);
- pixel[2] = (char)((fb + ((float)pixel[2]*aich))*255.0f);
- pixel[3] = (char)((alphatest= ((int)pixel[3] + alphaint)) < 255 ? alphatest : 255);
+ pixel[0] = (char)((fr + ((float)pixel[0] * aich)) * 255.0f);
+ pixel[1] = (char)((fg + ((float)pixel[1] * aich)) * 255.0f);
+ pixel[2] = (char)((fb + ((float)pixel[2] * aich)) * 255.0f);
+ pixel[3] = (char)((alphatest = ((int)pixel[3] + alphaint)) < 255 ? alphatest : 255);
}
}
}
@@ -545,8 +545,8 @@ void buf_rectfill_area(unsigned char *rect, float *rectf, int width, int height,
if (rectf) {
float *pixel;
- for (j = 0; j < y2-y1; j++) {
- for (i = 0; i < x2-x1; i++) {
+ for (j = 0; j < y2 - y1; j++) {
+ for (i = 0; i < x2 - x1; i++) {
pixel = rectf + 4 * (((y1 + j) * width) + (x1 + i));
if (a == 1.0f) {
pixel[0] = col[0];
@@ -556,10 +556,10 @@ void buf_rectfill_area(unsigned char *rect, float *rectf, int width, int height,
}
else {
float alphatest;
- pixel[0] = (col[0]*a) + (pixel[0]*ai);
- pixel[1] = (col[1]*a) + (pixel[1]*ai);
- pixel[2] = (col[2]*a) + (pixel[2]*ai);
- pixel[3] = (alphatest= (pixel[3] + a)) < 1.0f ? alphatest : 1.0f;
+ pixel[0] = (col[0] * a) + (pixel[0] * ai);
+ pixel[1] = (col[1] * a) + (pixel[1] * ai);
+ pixel[2] = (col[2] * a) + (pixel[2] * ai);
+ pixel[3] = (alphatest = (pixel[3] + a)) < 1.0f ? alphatest : 1.0f;
}
}
}
@@ -577,12 +577,12 @@ void IMB_rectfill_alpha(ImBuf *ibuf, const float value)
{
int i;
if (ibuf->rect_float) {
- float *fbuf= ibuf->rect_float + 3;
- for (i = ibuf->x * ibuf->y; i > 0; i--, fbuf+= 4) { *fbuf = value; }
+ float *fbuf = ibuf->rect_float + 3;
+ for (i = ibuf->x * ibuf->y; i > 0; i--, fbuf += 4) { *fbuf = value; }
}
else {
- const unsigned char cvalue= value * 255;
- unsigned char *cbuf= ((unsigned char *)ibuf->rect) + 3;
- for (i = ibuf->x * ibuf->y; i > 0; i--, cbuf+= 4) { *cbuf = cvalue; }
+ const unsigned char cvalue = value * 255;
+ unsigned char *cbuf = ((unsigned char *)ibuf->rect) + 3;
+ for (i = ibuf->x * ibuf->y; i > 0; i--, cbuf += 4) { *cbuf = cvalue; }
}
}
diff --git a/source/blender/imbuf/intern/scaling.c b/source/blender/imbuf/intern/scaling.c
index a7b994beef9..3ccb6739beb 100644
--- a/source/blender/imbuf/intern/scaling.c
+++ b/source/blender/imbuf/intern/scaling.c
@@ -53,10 +53,10 @@
struct ImBuf *IMB_half_x(struct ImBuf *ibuf1)
{
struct ImBuf *ibuf2;
- uchar *p1,*_p1,*dest;
- short a,r,g,b;
- int x,y;
- float af,rf,gf,bf, *p1f, *_p1f, *destf;
+ uchar *p1, *_p1, *dest;
+ short a, r, g, b;
+ int x, y;
+ float af, rf, gf, bf, *p1f, *_p1f, *destf;
int do_rect, do_float;
if (ibuf1==NULL) return (NULL);
@@ -119,7 +119,7 @@ struct ImBuf *IMB_half_x(struct ImBuf *ibuf1)
struct ImBuf *IMB_double_fast_x(struct ImBuf *ibuf1)
{
struct ImBuf *ibuf2;
- int *p1,*dest, i, col, do_rect, do_float;
+ int *p1, *dest, i, col, do_rect, do_float;
float *p1f, *destf;
if (ibuf1==NULL) return (NULL);
@@ -128,7 +128,7 @@ struct ImBuf *IMB_double_fast_x(struct ImBuf *ibuf1)
do_rect= (ibuf1->rect != NULL);
do_float= (ibuf1->rect_float != NULL);
- ibuf2 = IMB_allocImBuf(2 * ibuf1->x , ibuf1->y , ibuf1->planes, ibuf1->flags);
+ ibuf2 = IMB_allocImBuf(2 * ibuf1->x, ibuf1->y, ibuf1->planes, ibuf1->flags);
if (ibuf2==NULL) return (NULL);
p1 = (int *) ibuf1->rect;
@@ -172,11 +172,11 @@ struct ImBuf *IMB_double_x(struct ImBuf *ibuf1)
struct ImBuf *IMB_half_y(struct ImBuf *ibuf1)
{
struct ImBuf *ibuf2;
- uchar *p1,*p2,*_p1,*dest;
- short a,r,g,b;
- int x,y;
+ uchar *p1, *p2, *_p1, *dest;
+ short a, r, g, b;
+ int x, y;
int do_rect, do_float;
- float af,rf,gf,bf,*p1f,*p2f,*_p1f,*destf;
+ float af, rf, gf, bf, *p1f, *p2f, *_p1f, *destf;
p1= p2= NULL;
p1f= p2f= NULL;
@@ -187,7 +187,7 @@ struct ImBuf *IMB_half_y(struct ImBuf *ibuf1)
do_rect= (ibuf1->rect != NULL);
do_float= (ibuf1->rect_float != NULL);
- ibuf2 = IMB_allocImBuf(ibuf1->x , (ibuf1->y) / 2 , ibuf1->planes, ibuf1->flags);
+ ibuf2 = IMB_allocImBuf(ibuf1->x, (ibuf1->y) / 2, ibuf1->planes, ibuf1->flags);
if (ibuf2==NULL) return (NULL);
_p1 = (uchar *) ibuf1->rect;
@@ -246,7 +246,7 @@ struct ImBuf *IMB_double_fast_y(struct ImBuf *ibuf1)
struct ImBuf *ibuf2;
int *p1, *dest1, *dest2;
float *p1f, *dest1f, *dest2f;
- int x,y;
+ int x, y;
int do_rect, do_float;
if (ibuf1==NULL) return (NULL);
@@ -255,7 +255,7 @@ struct ImBuf *IMB_double_fast_y(struct ImBuf *ibuf1)
do_rect= (ibuf1->rect != NULL);
do_float= (ibuf1->rect_float != NULL);
- ibuf2 = IMB_allocImBuf(ibuf1->x , 2 * ibuf1->y , ibuf1->planes, ibuf1->flags);
+ ibuf2 = IMB_allocImBuf(ibuf1->x, 2 * ibuf1->y, ibuf1->planes, ibuf1->flags);
if (ibuf2==NULL) return (NULL);
p1 = (int *) ibuf1->rect;
@@ -297,7 +297,7 @@ void imb_onehalf_no_alloc(struct ImBuf *ibuf2, struct ImBuf *ibuf1)
{
uchar *p1, *p2 = NULL, *dest;
float *p1f, *destf, *p2f = NULL;
- int x,y;
+ int x, y;
const short do_rect= (ibuf1->rect != NULL);
const short do_float= (ibuf1->rect_float != NULL) && (ibuf2->rect_float != NULL);
@@ -367,10 +367,8 @@ static void enlarge_picture_byte(
unsigned char* src, unsigned char* dst, int src_width,
int src_height, int dst_width, int dst_height)
{
- double ratiox = (double) (dst_width - 1.0)
- / (double) (src_width - 1.001);
- double ratioy = (double) (dst_height - 1.0)
- / (double) (src_height - 1.001);
+ double ratiox = (double) (dst_width - 1.0) / (double) (src_width - 1.001);
+ double ratioy = (double) (dst_height - 1.0) / (double) (src_height - 1.001);
uintptr_t x_src, dx_src, x_dst;
uintptr_t y_src, dy_src, y_dst;
@@ -395,41 +393,25 @@ static void enlarge_picture_byte(
unsigned long x = (x_src >> 16) * 4;
- *dst++ = ((((line1[x] * weight1y) >> 16)
- * weight1x) >> 16)
- + ((((line2[x] * weight2y) >> 16)
- * weight1x) >> 16)
- + ((((line1[4 + x] * weight1y) >> 16)
- * weight2x) >> 16)
- + ((((line2[4 + x] * weight2y) >> 16)
- * weight2x) >> 16);
-
- *dst++ = ((((line1[x + 1] * weight1y) >> 16)
- * weight1x) >> 16)
- + ((((line2[x + 1] * weight2y) >> 16)
- * weight1x) >> 16)
- + ((((line1[4 + x + 1] * weight1y) >> 16)
- * weight2x) >> 16)
- + ((((line2[4 + x + 1] * weight2y) >> 16)
- * weight2x) >> 16);
-
- *dst++ = ((((line1[x + 2] * weight1y) >> 16)
- * weight1x) >> 16)
- + ((((line2[x + 2] * weight2y) >> 16)
- * weight1x) >> 16)
- + ((((line1[4 + x + 2] * weight1y) >> 16)
- * weight2x) >> 16)
- + ((((line2[4 + x + 2] * weight2y) >> 16)
- * weight2x) >> 16);
-
- *dst++ = ((((line1[x + 3] * weight1y) >> 16)
- * weight1x) >> 16)
- + ((((line2[x + 3] * weight2y) >> 16)
- * weight1x) >> 16)
- + ((((line1[4 + x + 3] * weight1y) >> 16)
- * weight2x) >> 16)
- + ((((line2[4 + x + 3] * weight2y) >> 16)
- * weight2x) >> 16);
+ *dst++ = ((((line1[x] * weight1y) >> 16) * weight1x) >> 16) +
+ ((((line2[x] * weight2y) >> 16) * weight1x) >> 16) +
+ ((((line1[4 + x] * weight1y) >> 16) * weight2x) >> 16) +
+ ((((line2[4 + x] * weight2y) >> 16) * weight2x) >> 16);
+
+ *dst++ = ((((line1[x + 1] * weight1y) >> 16) * weight1x) >> 16) +
+ ((((line2[x + 1] * weight2y) >> 16) * weight1x) >> 16) +
+ ((((line1[4 + x + 1] * weight1y) >> 16) * weight2x) >> 16) +
+ ((((line2[4 + x + 1] * weight2y) >> 16) * weight2x) >> 16);
+
+ *dst++ = ((((line1[x + 2] * weight1y) >> 16) * weight1x) >> 16) +
+ ((((line2[x + 2] * weight2y) >> 16) * weight1x) >> 16) +
+ ((((line1[4 + x + 2] * weight1y) >> 16) * weight2x) >> 16) +
+ ((((line2[4 + x + 2] * weight2y) >> 16) * weight2x) >> 16);
+
+ *dst++ = ((((line1[x + 3] * weight1y) >> 16) * weight1x) >> 16) +
+ ((((line2[x + 3] * weight2y) >> 16) * weight1x) >> 16) +
+ ((((line1[4 + x + 3] * weight1y) >> 16) * weight2x) >> 16) +
+ ((((line2[4 + x + 3] * weight2y) >> 16) * weight2x) >> 16);
x_src += dx_src;
}
@@ -578,10 +560,8 @@ static void enlarge_picture_float(
float* src, float* dst, int src_width,
int src_height, int dst_width, int dst_height)
{
- double ratiox = (double) (dst_width - 1.0)
- / (double) (src_width - 1.001);
- double ratioy = (double) (dst_height - 1.0)
- / (double) (src_height - 1.001);
+ double ratiox = (double) (dst_width - 1.0) / (double) (src_width - 1.001);
+ double ratioy = (double) (dst_height - 1.0) / (double) (src_height - 1.001);
uintptr_t x_dst;
uintptr_t y_dst;
double x_src, dx_src;
@@ -613,25 +593,25 @@ static void enlarge_picture_float(
uintptr_t x = ((int) x_src) * 4;
- *dst++ = line1[x] * w11
- + line2[x] * w21
- + line1[4 + x] * w12
- + line2[4 + x] * w22;
+ *dst++ = line1[x] * w11 +
+ line2[x] * w21 +
+ line1[4 + x] * w12 +
+ line2[4 + x] * w22;
- *dst++ = line1[x + 1] * w11
- + line2[x + 1] * w21
- + line1[4 + x + 1] * w12
- + line2[4 + x + 1] * w22;
+ *dst++ = line1[x + 1] * w11 +
+ line2[x + 1] * w21 +
+ line1[4 + x + 1] * w12 +
+ line2[4 + x + 1] * w22;
- *dst++ = line1[x + 2] * w11
- + line2[x + 2] * w21
- + line1[4 + x + 2] * w12
- + line2[4 + x + 2] * w22;
+ *dst++ = line1[x + 2] * w11 +
+ line2[x + 2] * w21 +
+ line1[4 + x + 2] * w12 +
+ line2[4 + x + 2] * w22;
- *dst++ = line1[x + 3] * w11
- + line2[x + 3] * w21
- + line1[4 + x + 3] * w12
- + line2[4 + x + 3] * w22;
+ *dst++ = line1[x + 3] * w11 +
+ line2[x + 3] * w21 +
+ line1[4 + x + 3] * w12 +
+ line2[4 + x + 3] * w22;
x_src += dx_src;
}
@@ -1093,18 +1073,18 @@ static struct ImBuf *scaledowny(struct ImBuf *ibuf, int newy)
static struct ImBuf *scaleupx(struct ImBuf *ibuf, int newx)
{
- uchar *rect,*_newrect=NULL,*newrect;
- float *rectf,*_newrectf=NULL,*newrectf;
- float sample,add;
- float val_a,nval_a,diff_a;
- float val_b,nval_b,diff_b;
- float val_g,nval_g,diff_g;
- float val_r,nval_r,diff_r;
- float val_af,nval_af,diff_af;
- float val_bf,nval_bf,diff_bf;
- float val_gf,nval_gf,diff_gf;
- float val_rf,nval_rf,diff_rf;
- int x,y, do_rect = 0, do_float = 0;
+ uchar *rect, *_newrect=NULL, *newrect;
+ float *rectf, *_newrectf=NULL, *newrectf;
+ float sample, add;
+ float val_a, nval_a, diff_a;
+ float val_b, nval_b, diff_b;
+ float val_g, nval_g, diff_g;
+ float val_r, nval_r, diff_r;
+ float val_af, nval_af, diff_af;
+ float val_bf, nval_bf, diff_bf;
+ float val_gf, nval_gf, diff_gf;
+ float val_rf, nval_rf, diff_rf;
+ int x, y, do_rect = 0, do_float = 0;
val_a = nval_a = diff_a = val_b = nval_b = diff_b = 0;
val_g = nval_g = diff_g = val_r = nval_r = diff_r = 0;
@@ -1260,18 +1240,18 @@ static struct ImBuf *scaleupx(struct ImBuf *ibuf, int newx)
static struct ImBuf *scaleupy(struct ImBuf *ibuf, int newy)
{
- uchar *rect,*_newrect=NULL,*newrect;
- float *rectf,*_newrectf=NULL,*newrectf;
- float sample,add;
- float val_a,nval_a,diff_a;
- float val_b,nval_b,diff_b;
- float val_g,nval_g,diff_g;
- float val_r,nval_r,diff_r;
- float val_af,nval_af,diff_af;
- float val_bf,nval_bf,diff_bf;
- float val_gf,nval_gf,diff_gf;
- float val_rf,nval_rf,diff_rf;
- int x,y, do_rect = 0, do_float = 0, skipx;
+ uchar *rect, *_newrect=NULL, *newrect;
+ float *rectf, *_newrectf=NULL, *newrectf;
+ float sample, add;
+ float val_a, nval_a, diff_a;
+ float val_b, nval_b, diff_b;
+ float val_g, nval_g, diff_g;
+ float val_r, nval_r, diff_r;
+ float val_af, nval_af, diff_af;
+ float val_bf, nval_bf, diff_bf;
+ float val_gf, nval_gf, diff_gf;
+ float val_rf, nval_rf, diff_rf;
+ int x, y, do_rect = 0, do_float = 0, skipx;
val_a = nval_a = diff_a = val_b = nval_b = diff_b = 0;
val_g = nval_g = diff_g = val_r = nval_r = diff_r = 0;
@@ -1484,10 +1464,10 @@ struct ImBuf *IMB_scaleImBuf(struct ImBuf * ibuf, unsigned int newx, unsigned in
return ibuf;
}
- if (newx < ibuf->x) if (newx) scaledownx(ibuf,newx);
- if (newy < ibuf->y) if (newy) scaledowny(ibuf,newy);
- if (newx > ibuf->x) if (newx) scaleupx(ibuf,newx);
- if (newy > ibuf->y) if (newy) scaleupy(ibuf,newy);
+ if (newx < ibuf->x) if (newx) scaledownx(ibuf, newx);
+ if (newy < ibuf->y) if (newy) scaledowny(ibuf, newy);
+ if (newx > ibuf->x) if (newx) scaleupx(ibuf, newx);
+ if (newy > ibuf->y) if (newy) scaleupy(ibuf, newy);
return(ibuf);
}
@@ -1498,10 +1478,10 @@ struct imbufRGBA {
struct ImBuf *IMB_scalefastImBuf(struct ImBuf *ibuf, unsigned int newx, unsigned int newy)
{
- unsigned int *rect,*_newrect,*newrect;
+ unsigned int *rect, *_newrect, *newrect;
struct imbufRGBA *rectf, *_newrectf, *newrectf;
- int x,y, do_float=0, do_rect=0;
- int ofsx,ofsy,stepx,stepy;
+ int x, y, do_float=0, do_rect=0;
+ int ofsx, ofsy, stepx, stepy;
rect = NULL; _newrect = NULL; newrect = NULL;
rectf = NULL; _newrectf = NULL; newrectf = NULL;
diff --git a/source/blender/imbuf/intern/targa.c b/source/blender/imbuf/intern/targa.c
index 7aceb695d00..1a05dd93229 100644
--- a/source/blender/imbuf/intern/targa.c
+++ b/source/blender/imbuf/intern/targa.c
@@ -73,7 +73,7 @@ static int tga_out1(unsigned int data, FILE *file)
uchar *p;
p = (uchar *) & data;
- if (putc(p[0],file) == EOF) return(EOF);
+ if (putc(p[0], file) == EOF) return(EOF);
return (~EOF);
}
@@ -82,8 +82,8 @@ static int tga_out2(unsigned int data, FILE * file)
uchar *p;
p = (uchar *) & data;
- if (putc(p[0],file) == EOF) return(EOF);
- if (putc(p[1],file) == EOF) return(EOF);
+ if (putc(p[0], file) == EOF) return(EOF);
+ if (putc(p[1], file) == EOF) return(EOF);
return (~EOF);
}
@@ -93,9 +93,9 @@ static int tga_out3(unsigned int data, FILE * file)
uchar *p;
p = (uchar *) & data;
- if (putc(p[2],file) == EOF) return(EOF);
- if (putc(p[1],file) == EOF) return(EOF);
- if (putc(p[0],file) == EOF) return(EOF);
+ if (putc(p[2], file) == EOF) return(EOF);
+ if (putc(p[1], file) == EOF) return(EOF);
+ if (putc(p[0], file) == EOF) return(EOF);
return (~EOF);
}
@@ -106,16 +106,16 @@ static int tga_out4(unsigned int data, FILE * file)
p = (uchar *) & data;
/* order = bgra */
- if (putc(p[2],file) == EOF) return(EOF);
- if (putc(p[1],file) == EOF) return(EOF);
- if (putc(p[0],file) == EOF) return(EOF);
- if (putc(p[3],file) == EOF) return(EOF);
+ if (putc(p[2], file) == EOF) return(EOF);
+ if (putc(p[1], file) == EOF) return(EOF);
+ if (putc(p[0], file) == EOF) return(EOF);
+ if (putc(p[3], file) == EOF) return(EOF);
return (~EOF);
}
static short makebody_tga(ImBuf * ibuf, FILE * file, int (*out)(unsigned int, FILE*))
{
- register int last,this;
+ register int last, this;
register int copy, bytes;
register unsigned int *rect, *rectstart, *temp;
int y;
@@ -150,9 +150,9 @@ static short makebody_tga(ImBuf * ibuf, FILE * file, int (*out)(unsigned int, FI
last = copy;
if (copy>=128) last = 128;
copy -= last;
- if (fputc(last-1,file) == EOF) return(0);
+ if (fputc(last-1, file) == EOF) return(0);
do {
- if (out(*rect++,file) == EOF) return(0);
+ if (out(*rect++, file) == EOF) return(0);
} while (--last != 0);
}
rectstart = rect;
@@ -173,17 +173,17 @@ static short makebody_tga(ImBuf * ibuf, FILE * file, int (*out)(unsigned int, FI
while (copy) {
if (copy>128) {
- if (fputc(255,file) == EOF) return(0);
+ if (fputc(255, file) == EOF) return(0);
copy -= 128;
}
else {
if (copy == 1) {
- if (fputc(0,file) == EOF) return(0);
+ if (fputc(0, file) == EOF) return(0);
}
- else if (fputc(127 + copy,file) == EOF) return(0);
+ else if (fputc(127 + copy, file) == EOF) return(0);
copy = 0;
}
- if (out(last,file) == EOF) return(0);
+ if (out(last, file) == EOF) return(0);
}
copy=TRUE;
}
@@ -276,10 +276,10 @@ int imb_savetarga(struct ImBuf * ibuf, const char *name, int flags)
if (ibuf->planes==32) {
buf[17] |= 0x08;
}
- fildes = BLI_fopen(name,"wb");
+ fildes = BLI_fopen(name, "wb");
if (!fildes) return 0;
- if (fwrite(buf, 1, 18,fildes) != 18) {
+ if (fwrite(buf, 1, 18, fildes) != 18) {
fclose(fildes);
return (0);
}
@@ -288,7 +288,7 @@ int imb_savetarga(struct ImBuf * ibuf, const char *name, int flags)
ok = dumptarga(ibuf, fildes);
}
else {
- switch((ibuf->planes + 7) >> 3) {
+ switch ((ibuf->planes + 7) >> 3) {
case 1:
ok = makebody_tga(ibuf, fildes, tga_out1);
break;
@@ -485,10 +485,10 @@ partial_load:
complete_partial_load(ibuf, rect);
}
-static void ldtarga(struct ImBuf * ibuf,unsigned char * mem, size_t mem_size, int psize)
+static void ldtarga(struct ImBuf * ibuf, unsigned char * mem, size_t mem_size, int psize)
{
unsigned char *mem_end = mem+mem_size;
- int col,size;
+ int col, size;
unsigned int *rect;
uchar * cp = (uchar *) &col;
@@ -553,10 +553,10 @@ struct ImBuf *imb_loadtarga(unsigned char *mem, size_t mem_size, int flags)
unsigned int *rect, *cmap= NULL /*, mincol= 0*/, maxcol= 0;
uchar * cp = (uchar *) &col;
- if (checktarga(&tga,mem) == 0) return(NULL);
+ if (checktarga(&tga, mem) == 0) return(NULL);
- if (flags & IB_test) ibuf = IMB_allocImBuf(tga.xsize,tga.ysize,tga.pixsize, 0);
- else ibuf = IMB_allocImBuf(tga.xsize,tga.ysize,(tga.pixsize + 0x7) & ~0x7, IB_rect);
+ if (flags & IB_test) ibuf = IMB_allocImBuf(tga.xsize, tga.ysize, tga.pixsize, 0);
+ else ibuf = IMB_allocImBuf(tga.xsize, tga.ysize, (tga.pixsize + 0x7) & ~0x7, IB_rect);
if (ibuf == NULL) return(NULL);
ibuf->ftype = TGA;
@@ -617,22 +617,22 @@ struct ImBuf *imb_loadtarga(unsigned char *mem, size_t mem_size, int flags)
}
}
- switch(tga.imgtyp) {
+ switch (tga.imgtyp) {
case 1:
case 2:
case 3:
- if (tga.pixsize <= 8) ldtarga(ibuf,mem,mem_size,0);
- else if (tga.pixsize <= 16) ldtarga(ibuf,mem,mem_size,1);
- else if (tga.pixsize <= 24) ldtarga(ibuf,mem,mem_size,2);
- else if (tga.pixsize <= 32) ldtarga(ibuf,mem,mem_size,3);
+ if (tga.pixsize <= 8) ldtarga(ibuf, mem, mem_size, 0);
+ else if (tga.pixsize <= 16) ldtarga(ibuf, mem, mem_size, 1);
+ else if (tga.pixsize <= 24) ldtarga(ibuf, mem, mem_size, 2);
+ else if (tga.pixsize <= 32) ldtarga(ibuf, mem, mem_size, 3);
break;
case 9:
case 10:
case 11:
- if (tga.pixsize <= 8) decodetarga(ibuf,mem,mem_size,0);
- else if (tga.pixsize <= 16) decodetarga(ibuf,mem,mem_size,1);
- else if (tga.pixsize <= 24) decodetarga(ibuf,mem,mem_size,2);
- else if (tga.pixsize <= 32) decodetarga(ibuf,mem,mem_size,3);
+ if (tga.pixsize <= 8) decodetarga(ibuf, mem, mem_size, 0);
+ else if (tga.pixsize <= 16) decodetarga(ibuf, mem, mem_size, 1);
+ else if (tga.pixsize <= 24) decodetarga(ibuf, mem, mem_size, 2);
+ else if (tga.pixsize <= 32) decodetarga(ibuf, mem, mem_size, 3);
break;
}
diff --git a/source/blender/imbuf/intern/thumbs.c b/source/blender/imbuf/intern/thumbs.c
index 5d64e1b2aec..8507cb71543 100644
--- a/source/blender/imbuf/intern/thumbs.c
+++ b/source/blender/imbuf/intern/thumbs.c
@@ -69,13 +69,13 @@
#define URI_MAX FILE_MAX*3 + 8
-static int get_thumb_dir( char* dir , ThumbSize size)
+static int get_thumb_dir(char *dir, ThumbSize size)
{
#ifdef WIN32
wchar_t dir_16 [MAX_PATH];
/* yes, applications shouldn't store data there, but so does GIMP :)*/
SHGetSpecialFolderPathW(0, dir_16, CSIDL_PROFILE, 0);
- conv_utf_16_to_8(dir_16,dir,FILE_MAX);
+ conv_utf_16_to_8(dir_16, dir, FILE_MAX);
#else
@@ -83,7 +83,7 @@ static int get_thumb_dir( char* dir , ThumbSize size)
if (!home) return 0;
BLI_strncpy(dir, home, FILE_MAX);
#endif
- switch(size) {
+ switch (size) {
case THB_NORMAL:
strcat(dir, "/.thumbnails/normal/");
break;
@@ -132,7 +132,7 @@ static const char hex[17] = "0123456789abcdef";
/* Note: This escape function works on file: URIs, but if you want to
* escape something else, please read RFC-2396 */
-static void escape_uri_string (const char *string, char* escaped_string, int len,UnsafeCharacterSet mask)
+static void escape_uri_string (const char *string, char* escaped_string, int len, UnsafeCharacterSet mask)
{
#define ACCEPTABLE(a) ((a)>=32 && (a)<128 && (acceptable[(a)-32] & use_mask))
@@ -218,7 +218,7 @@ static void thumbname_from_uri(const char* uri, char* thumb, const int thumb_len
char hexdigest[33];
unsigned char digest[16];
- md5_buffer( uri, strlen(uri), digest);
+ md5_buffer(uri, strlen(uri), digest);
hexdigest[0] = '\0';
to_hex_char(hexdigest, digest, 16);
hexdigest[32] = '\0';
@@ -269,7 +269,7 @@ ImBuf* IMB_thumb_create(const char* path, ThumbSize size, ThumbSource source, Im
float scaledx, scaledy;
struct stat info;
- switch(size) {
+ switch (size) {
case THB_NORMAL:
tsize = 128;
break;
@@ -302,7 +302,7 @@ ImBuf* IMB_thumb_create(const char* path, ThumbSize size, ThumbSource source, Im
return NULL;
}
if (size == THB_FAIL) {
- img = IMB_allocImBuf(1,1,32, IB_rect | IB_metadata);
+ img = IMB_allocImBuf(1, 1, 32, IB_rect | IB_metadata);
if (!img) return NULL;
}
else {
@@ -398,7 +398,7 @@ ImBuf* IMB_thumb_read(const char* path, ThumbSize size)
char uri[FILE_MAX*3+8];
ImBuf *img = NULL;
- if (!uri_from_filename(path,uri)) {
+ if (!uri_from_filename(path, uri)) {
return NULL;
}
if (thumbpath_from_uri(uri, thumb, sizeof(thumb), size)) {
@@ -414,7 +414,7 @@ void IMB_thumb_delete(const char* path, ThumbSize size)
char thumb[FILE_MAX];
char uri[FILE_MAX*3+8];
- if (!uri_from_filename(path ,uri)) {
+ if (!uri_from_filename(path, uri)) {
return;
}
if (thumbpath_from_uri(uri, thumb, sizeof(thumb), size)) {
@@ -439,7 +439,7 @@ ImBuf* IMB_thumb_manage(const char* path, ThumbSize size, ThumbSource source)
if (stat(path, &st)) {
return NULL;
}
- if (!uri_from_filename(path,uri)) {
+ if (!uri_from_filename(path, uri)) {
return NULL;
}
if (thumbpath_from_uri(uri, thumb, sizeof(thumb), THB_FAIL)) {
diff --git a/source/blender/imbuf/intern/tiff.c b/source/blender/imbuf/intern/tiff.c
index 08b2e608c8e..a9396a5824d 100644
--- a/source/blender/imbuf/intern/tiff.c
+++ b/source/blender/imbuf/intern/tiff.c
@@ -1,7 +1,4 @@
/*
- * tiff.c
- *
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -242,7 +239,7 @@ static int imb_tiff_CloseProc(thandle_t handle)
/* get the pointer to the in-memory file */
mfile = IMB_TIFF_GET_MEMFILE(handle);
if (!mfile || !mfile->mem) {
- fprintf(stderr,"imb_tiff_CloseProc: !mfile || !mfile->mem!\n");
+ fprintf(stderr, "imb_tiff_CloseProc: !mfile || !mfile->mem!\n");
return (0);
}
@@ -268,7 +265,7 @@ static toff_t imb_tiff_SizeProc(thandle_t handle)
/* get the pointer to the in-memory file */
mfile = IMB_TIFF_GET_MEMFILE(handle);
if (!mfile || !mfile->mem) {
- fprintf(stderr,"imb_tiff_SizeProc: !mfile || !mfile->mem!\n");
+ fprintf(stderr, "imb_tiff_SizeProc: !mfile || !mfile->mem!\n");
return (0);
}
@@ -320,8 +317,8 @@ static void scanline_contig_16bit(float *rectf, unsigned short *sbuf, int scanli
int i;
for (i=0; i < scanline_w; i++) {
rectf[i*4 + 0] = sbuf[i*spp + 0] / 65535.0;
- rectf[i*4 + 1] = sbuf[i*spp + 1] / 65535.0;
- rectf[i*4 + 2] = sbuf[i*spp + 2] / 65535.0;
+ rectf[i*4 + 1] = (spp>=3)? sbuf[i*spp + 1] / 65535.0: sbuf[i*spp + 0] / 65535.0;
+ rectf[i*4 + 2] = (spp>=3)? sbuf[i*spp + 2] / 65535.0: sbuf[i*spp + 0] / 65535.0;
rectf[i*4 + 3] = (spp==4)?(sbuf[i*spp + 3] / 65535.0):1.0;
}
}
@@ -331,8 +328,8 @@ static void scanline_contig_32bit(float *rectf, float *fbuf, int scanline_w, int
int i;
for (i=0; i < scanline_w; i++) {
rectf[i*4 + 0] = fbuf[i*spp + 0];
- rectf[i*4 + 1] = fbuf[i*spp + 1];
- rectf[i*4 + 2] = fbuf[i*spp + 2];
+ rectf[i*4 + 1] = (spp>=3)? fbuf[i*spp + 1]: fbuf[i*spp + 0];
+ rectf[i*4 + 2] = (spp>=3)? fbuf[i*spp + 2]: fbuf[i*spp + 0];
rectf[i*4 + 3] = (spp==4)?fbuf[i*spp + 3]:1.0f;
}
}
@@ -440,6 +437,8 @@ static int imb_read_tiff_pixels(ImBuf *ibuf, TIFF *image, int premul)
if (bitspersample == 32) {
if (chan == 3 && spp == 3) /* fill alpha if only RGB TIFF */
fill_vn_fl(fbuf, ibuf->x, 1.0f);
+ else if (chan >= spp) /* for grayscale, duplicate first channel into G and B */
+ success |= TIFFReadScanline(image, fbuf, row, 0);
else
success |= TIFFReadScanline(image, fbuf, row, chan);
scanline_separate_32bit(tmpibuf->rect_float+ib_offset, fbuf, ibuf->x, chan);
@@ -448,6 +447,8 @@ static int imb_read_tiff_pixels(ImBuf *ibuf, TIFF *image, int premul)
else if (bitspersample == 16) {
if (chan == 3 && spp == 3) /* fill alpha if only RGB TIFF */
fill_vn_ushort(sbuf, ibuf->x, 65535);
+ else if (chan >= spp) /* for grayscale, duplicate first channel into G and B */
+ success |= TIFFReadScanline(image, fbuf, row, 0);
else
success |= TIFFReadScanline(image, sbuf, row, chan);
scanline_separate_16bit(tmpibuf->rect_float+ib_offset, sbuf, ibuf->x, chan);
@@ -777,22 +778,17 @@ int imb_savetiff(ImBuf *ibuf, const char *name, int flags)
if (pixels16) {
/* convert from float source */
- float rgb[3];
+ float rgb[4];
if (ibuf->profile == IB_PROFILE_LINEAR_RGB)
linearrgb_to_srgb_v3_v3(rgb, &fromf[from_i]);
else
copy_v3_v3(rgb, &fromf[from_i]);
- to16[to_i+0] = FTOUSHORT(rgb[0]);
- to16[to_i+1] = FTOUSHORT(rgb[1]);
- to16[to_i+2] = FTOUSHORT(rgb[2]);
- to_i += 3; from_i+=3;
-
- if (samplesperpixel == 4) {
- to16[to_i+3] = FTOUSHORT(fromf[from_i+3]);
- /*to_i++; from_i++;*/ /*unused, set on each loop */
- }
+ rgb[3] = fromf[from_i+3];
+
+ for (i = 0; i < samplesperpixel; i++, to_i++)
+ to16[to_i] = FTOUSHORT(rgb[i]);
}
else {
for (i = 0; i < samplesperpixel; i++, to_i++, from_i++)
diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c
index b5fdb897d14..99872192e32 100644
--- a/source/blender/imbuf/intern/util.c
+++ b/source/blender/imbuf/intern/util.c
@@ -40,6 +40,7 @@
#endif
#include "BLI_blenlib.h"
+#include "BLI_fileops.h"
#include "DNA_userdef_types.h"
#include "BKE_global.h"
@@ -154,12 +155,12 @@ static int IMB_ispic_name(const char *name)
if (UTIL_DEBUG) printf("IMB_ispic_name: loading %s\n", name);
- if (stat(name,&st) == -1)
+ if (stat(name, &st) == -1)
return FALSE;
if (((st.st_mode) & S_IFMT) != S_IFREG)
return FALSE;
- if ((fp = BLI_open(name,O_BINARY|O_RDONLY, 0)) < 0)
+ if ((fp = BLI_open(name, O_BINARY|O_RDONLY, 0)) < 0)
return FALSE;
if (read(fp, buf, 32) != 32) {
@@ -250,7 +251,7 @@ static int isffmpeg (const char *filename)
do_init_ffmpeg();
- if ( BLI_testextensie(filename, ".swf") ||
+ if (BLI_testextensie(filename, ".swf") ||
BLI_testextensie(filename, ".jpg") ||
BLI_testextensie(filename, ".png") ||
BLI_testextensie(filename, ".dds") ||
@@ -258,7 +259,10 @@ static int isffmpeg (const char *filename)
BLI_testextensie(filename, ".bmp") ||
BLI_testextensie(filename, ".exr") ||
BLI_testextensie(filename, ".cin") ||
- BLI_testextensie(filename, ".wav")) return 0;
+ BLI_testextensie(filename, ".wav"))
+ {
+ return 0;
+ }
if (av_open_input_file(&pFormatCtx, filename, NULL, 0, NULL)!=0) {
if (UTIL_DEBUG) fprintf(stderr, "isffmpeg: av_open_input_file failed\n");
@@ -339,14 +343,14 @@ int imb_get_anim_type(const char * name)
/* stat test below fails on large files > 4GB */
if (isffmpeg(name)) return (ANIM_FFMPEG);
# endif
- if (stat(name,&st) == -1) return(0);
+ if (BLI_stat(name, &st) == -1) return(0);
if (((st.st_mode) & S_IFMT) != S_IFREG) return(0);
if (isavi(name)) return (ANIM_AVI);
if (ismovie(name)) return (ANIM_MOVIE);
#else
- if (stat(name,&st) == -1) return(0);
+ if (BLI_stat(name, &st) == -1) return(0);
if (((st.st_mode) & S_IFMT) != S_IFREG) return(0);
if (ismovie(name)) return (ANIM_MOVIE);
@@ -356,6 +360,8 @@ int imb_get_anim_type(const char * name)
# ifdef WITH_FFMPEG
if (isffmpeg(name)) return (ANIM_FFMPEG);
# endif
+
+
if (isavi(name)) return (ANIM_AVI);
#endif
#ifdef WITH_REDCODE
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index 1737f3b79e6..06eefc36723 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -133,9 +133,8 @@ typedef struct Library {
* some cases its useful to access the absolute one,
* This is set on file read.
* Use BKE_library_filepath_set() rather than
- * setting 'name' directly and it will be kepk in
+ * setting 'name' directly and it will be kept in
* sync - campbell */
- int tot, pad; /* tot, idblock and filedata are only fo read and write */
struct Library *parent; /* set for indirectly linked libs, used in the outliner and while reading */
} Library;
@@ -151,7 +150,7 @@ typedef struct PreviewImage {
unsigned int h[2];
short changed[2];
short changed_timestamp[2];
- unsigned int * rect[2];
+ unsigned int *rect[2];
} PreviewImage;
/**
@@ -255,4 +254,3 @@ typedef struct PreviewImage {
#endif
#endif
-
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h
index 43474d72de9..30b3e75255d 100644
--- a/source/blender/makesdna/DNA_action_types.h
+++ b/source/blender/makesdna/DNA_action_types.h
@@ -335,7 +335,7 @@ typedef struct bPose {
float ctime; /* local action time of this pose */
float stride_offset[3]; /* applied to object */
- float cyclic_offset[3]; /* result of match and cycles, applied in where_is_pose() */
+ float cyclic_offset[3]; /* result of match and cycles, applied in BKE_pose_where_is() */
ListBase agroups; /* list of bActionGroups */
@@ -352,7 +352,7 @@ typedef struct bPose {
/* Pose->flag */
typedef enum ePose_Flags {
- /* results in armature_rebuild_pose being called */
+ /* results in BKE_pose_rebuild being called */
POSE_RECALC = (1<<0),
/* prevents any channel from getting overridden by anim from IPO */
POSE_LOCKED = (1<<1),
@@ -362,7 +362,7 @@ typedef enum ePose_Flags {
POSE_CONSTRAINTS_TIMEDEPEND = (1<<3),
/* recalculate bone paths */
POSE_RECALCPATHS = (1<<4),
- /* set by armature_rebuild_pose to give a chance to the IK solver to rebuild IK tree */
+ /* set by BKE_pose_rebuild to give a chance to the IK solver to rebuild IK tree */
POSE_WAS_REBUILT = (1<<5),
/* set by game_copy_pose to indicate that this pose is used in the game engine */
POSE_GAME_ENGINE = (1<<6)
diff --git a/source/blender/makesdna/DNA_boid_types.h b/source/blender/makesdna/DNA_boid_types.h
index 09221c4ada9..698667ff33c 100644
--- a/source/blender/makesdna/DNA_boid_types.h
+++ b/source/blender/makesdna/DNA_boid_types.h
@@ -1,5 +1,4 @@
-/*
- *
+/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h
index 0d06b55f1d3..c531225775a 100644
--- a/source/blender/makesdna/DNA_brush_types.h
+++ b/source/blender/makesdna/DNA_brush_types.h
@@ -65,6 +65,7 @@ typedef struct Brush {
short blend; /* blend mode */
short ob_mode; /* & with ob->mode to see if the brush is compatible, use for display only. */
+ float weight; /* brush weight */
int size; /* brush diameter */
int flag; /* general purpose flag */
float jitter; /* jitter the position of the brush */
@@ -83,7 +84,7 @@ typedef struct Brush {
char sculpt_tool; /* active sculpt tool */
char vertexpaint_tool; /* active vertex/weight paint blend mode (poorly named) */
char imagepaint_tool; /* active image paint tool */
- char pad3[5];
+ char pad;
float autosmooth_factor;
diff --git a/source/blender/makesdna/DNA_camera_types.h b/source/blender/makesdna/DNA_camera_types.h
index 112247f3d66..73cebfb3d9f 100644
--- a/source/blender/makesdna/DNA_camera_types.h
+++ b/source/blender/makesdna/DNA_camera_types.h
@@ -48,7 +48,7 @@ typedef struct Camera {
ID id;
struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */
- char type; /* CAM_PERSP or CAM_ORTHO */
+ char type; /* CAM_PERSP, CAM_ORTHO or CAM_PANO */
char dtx; /* draw type extra */
short flag;
float passepartalpha;
@@ -75,6 +75,7 @@ typedef struct Camera {
/* type */
#define CAM_PERSP 0
#define CAM_ORTHO 1
+#define CAM_PANO 2
/* dtx */
#define CAM_DTX_CENTER 1
@@ -94,7 +95,7 @@ typedef struct Camera {
#define CAM_SHOWNAME 16
#define CAM_ANGLETOGGLE 32
#define CAM_DS_EXPAND 64
-#define CAM_PANORAMA 128
+#define CAM_PANORAMA 128 /* deprecated */
#define CAM_SHOWSENSOR 256
/* yafray: dof sampling switch */
diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h
index c9d80476fde..da8458d587e 100644
--- a/source/blender/makesdna/DNA_curve_types.h
+++ b/source/blender/makesdna/DNA_curve_types.h
@@ -190,7 +190,7 @@ typedef struct Curve {
short type; /* creation-time type of curve datablock */
- short texflag; /* keep a short because of give_obdata_texspace() */
+ short texflag; /* keep a short because of BKE_object_obdata_texspace_get() */
short drawflag, twist_mode;
float twist_smooth, smallcaps_scale;
@@ -234,6 +234,8 @@ typedef struct Curve {
struct CharInfo *strinfo;
struct CharInfo curinfo;
+
+ float bevfac1, bevfac2;
} Curve;
/* **************** CURVE ********************* */
diff --git a/source/blender/makesdna/DNA_group_types.h b/source/blender/makesdna/DNA_group_types.h
index 8aa6de4fbe2..a084bee1c2d 100644
--- a/source/blender/makesdna/DNA_group_types.h
+++ b/source/blender/makesdna/DNA_group_types.h
@@ -1,7 +1,4 @@
/*
- * blenlib/DNA_group_types.h (mar-2001 nzc)
- *
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -23,7 +20,7 @@
*
* The Original Code is: all of this file.
*
- * Contributor(s): none yet.
+ * Contributor(s): mar-2001 nzc
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -61,6 +58,4 @@ typedef struct Group {
float dupli_ofs[3];
} Group;
-
#endif
-
diff --git a/source/blender/makesdna/DNA_image_types.h b/source/blender/makesdna/DNA_image_types.h
index de2c9919df0..dfc70e5bd66 100644
--- a/source/blender/makesdna/DNA_image_types.h
+++ b/source/blender/makesdna/DNA_image_types.h
@@ -92,8 +92,8 @@ typedef struct Image {
unsigned int bindcode; /* only for current image... */
unsigned int *repbind; /* for repeat of parts of images */
- struct PackedFile * packedfile;
- struct PreviewImage * preview;
+ struct PackedFile *packedfile;
+ struct PreviewImage *preview;
/* game engine tile animation */
float lastupdate;
@@ -141,4 +141,3 @@ typedef struct Image {
#define IMA_GEN_FLOAT 1
#endif
-
diff --git a/source/blender/makesdna/DNA_lamp_types.h b/source/blender/makesdna/DNA_lamp_types.h
index 8cf3814ada1..4884db14c57 100644
--- a/source/blender/makesdna/DNA_lamp_types.h
+++ b/source/blender/makesdna/DNA_lamp_types.h
@@ -66,7 +66,7 @@ typedef struct Lamp {
short pad2;
float clipsta, clipend, shadspotsize;
- float bias, soft, compressthresh, pad5[3];
+ float bias, soft, compressthresh, bleedbias, pad5[2];
short bufsize, samp, buffers, filtertype;
char bufflag, buftype;
@@ -76,7 +76,7 @@ typedef struct Lamp {
float area_size, area_sizey, area_sizez;
float adapt_thresh;
short ray_samp_method;
- short pad1;
+ short shadowmap_type;
/* texact is for buttons */
short texact, shadhalostep;
@@ -96,8 +96,9 @@ typedef struct Lamp {
float atm_distance_factor;
float skyblendfac;
float sky_exposure;
+ float shadow_frustum_size; /* BGE Only */
short sky_colorspace;
- char pad4[6];
+ char pad4[2];
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
struct MTex *mtex[18]; /* MAX_MTEX */
@@ -205,6 +206,9 @@ typedef struct Lamp {
#define LAMAP_COL 1
#define LAMAP_SHAD 2
+/* shadowmap_type */
+#define LA_SHADMAP_SIMPLE 0
+#define LA_SHADMAP_VARIANCE 1
#endif /* __DNA_LAMP_TYPES_H__ */
diff --git a/source/blender/makesdna/DNA_listBase.h b/source/blender/makesdna/DNA_listBase.h
index d0e7a2f4433..35549aee3d2 100644
--- a/source/blender/makesdna/DNA_listBase.h
+++ b/source/blender/makesdna/DNA_listBase.h
@@ -43,7 +43,7 @@ extern "C" {
/* generic - all structs which are used in linked-lists used this */
typedef struct Link
{
- struct Link *next,*prev;
+ struct Link *next, *prev;
} Link;
diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h
index 89ed3ba055f..a0806481aea 100644
--- a/source/blender/makesdna/DNA_meshdata_types.h
+++ b/source/blender/makesdna/DNA_meshdata_types.h
@@ -95,7 +95,7 @@ typedef struct MLoop {
typedef struct MTexPoly {
struct Image *tpage;
char flag, transp;
- short mode,tile,unwrap;
+ short mode, tile, unwrap;
} MTexPoly;
/* can copy from/to MTexPoly/MTFace */
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index 6c1d9892ba2..30280e95646 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -898,7 +898,7 @@ typedef struct WeightVGEditModifierData {
typedef struct WeightVGMixModifierData {
ModifierData modifier;
- /* XXX Note: I tried to keep everything logically ordered – provided the
+ /* XXX Note: I tried to keep everything logically ordered - provided the
* alignment constraints... */
char defgrp_name_a[64]; /* Name of vertex group to modify/weight. MAX_VGROUP_NAME. */
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index 1abce525be2..6874e8de4f1 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -77,7 +77,7 @@ typedef struct bNodeSocket {
short type, flag;
short limit; /* max. number of links */
- short struct_type; /* optional identifier for RNA struct subtype */
+ short pad1;
float locx, locy;
@@ -87,7 +87,7 @@ typedef struct bNodeSocket {
short stack_index; /* local stack index */
/* XXX deprecated, kept for forward compatibility */
short stack_type DNA_DEPRECATED;
- int pad3;
+ int pad2;
void *cache; /* cached data from execution */
/* internal data to retrieve relations and groups */
@@ -112,10 +112,6 @@ typedef struct bNodeSocket {
#define SOCK_INT 6
#define NUM_SOCKET_TYPES 7 /* must be last! */
-/* sock->struct_type */
-#define SOCK_STRUCT_NONE 0 /* default, type is defined by sock->type only */
-#define SOCK_STRUCT_OUTPUT_FILE 1 /* file output node socket */
-
/* socket side (input/output) */
#define SOCK_IN 1
#define SOCK_OUT 2
@@ -371,12 +367,13 @@ typedef struct NodeImageMultiFileSocket {
short use_render_format DNA_DEPRECATED;
short use_node_format; /* use overall node image format */
int pad2;
+ char path[1024]; /* 1024 = FILE_MAX */
ImageFormatData format;
} NodeImageMultiFileSocket;
typedef struct NodeChroma {
- float t1,t2,t3;
- float fsize,fstrength,falpha;
+ float t1, t2, t3;
+ float fsize, fstrength, falpha;
float key[4];
short algorithm, channel;
} NodeChroma;
diff --git a/source/blender/makesdna/DNA_object_fluidsim.h b/source/blender/makesdna/DNA_object_fluidsim.h
index a55b7b17a22..dc4e4f54fd7 100644
--- a/source/blender/makesdna/DNA_object_fluidsim.h
+++ b/source/blender/makesdna/DNA_object_fluidsim.h
@@ -1,6 +1,4 @@
/*
- *
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -50,16 +48,16 @@ typedef struct FluidVertexVelocity {
typedef struct FluidsimSettings {
struct FluidsimModifierData *fmd; /* for fast RNA access */
- /* domain,fluid or obstacle */
+ /* domain, fluid or obstacle */
short type;
- /* display advanced options in fluid sim tab (on=1,off=0)*/
+ /* display advanced options in fluid sim tab (on=1, off=0)*/
short show_advancedoptions;
/* domain object settings */
/* resolutions */
short resolutionxyz;
short previewresxyz;
- /* size of the domain in real units (meters along largest resolution x,y,z extent) */
+ /* size of the domain in real units (meters along largest resolution x, y, z extent) */
float realsize;
/* show original meshes, preview or final sim */
short guiDisplayMode;
@@ -85,7 +83,7 @@ typedef struct FluidsimSettings {
/* fluid object type settings */
/* gravity strength */
- float iniVelx,iniVely,iniVelz;
+ float iniVelx, iniVely, iniVelz;
/* store pointer to original mesh (for replacing the current one) */
struct Mesh *orgMesh;
@@ -106,8 +104,8 @@ typedef struct FluidsimSettings {
/* additional flags depending on the type, lower short contains flags
* to check validity, higher short additional flags */
short typeFlags;
- /* switch off velocity genration, volume init type for fluid/obstacles (volume=1,shell=2,both=3) */
- char domainNovecgen,volumeInitType;
+ /* switch off velocity genration, volume init type for fluid/obstacles (volume=1, shell=2, both=3) */
+ char domainNovecgen, volumeInitType;
/* boundary "stickiness" for part slip values */
float partSlipValue;
diff --git a/source/blender/makesdna/DNA_object_force.h b/source/blender/makesdna/DNA_object_force.h
index 6fefd2d672f..cc212dd6d06 100644
--- a/source/blender/makesdna/DNA_object_force.h
+++ b/source/blender/makesdna/DNA_object_force.h
@@ -1,6 +1,4 @@
/*
- *
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -327,7 +325,7 @@ typedef struct SoftBody {
maxloops,
choke,
solver_ID,
- plastic,springpreload
+ plastic, springpreload
;
struct SBScratch *scratch; /* scratch pad/cache on live time not saved in file */
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index 86a2bb60cc9..1e428bb96e0 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -153,6 +153,9 @@ typedef struct Object {
float parentinv[4][4]; /* inverse result of parent, so that object doesn't 'stick' to parent */
float constinv[4][4]; /* inverse result of constraints. doesn't include effect of parent or object local transform */
float imat[4][4]; /* inverse matrix of 'obmat' for any other use than rendering! */
+ /* note: this isn't assured to be valid as with 'obmat',
+ * before using this value you should do...
+ * invert_m4_m4(ob->imat, ob->obmat); */
/* Previously 'imat' was used at render time, but as other places use it too
* the interactive ui of 2.5 creates problems. So now only 'imat_ren' should
@@ -319,8 +322,12 @@ typedef struct DupliObject {
#define OB_ARMATURE 25
/* check if the object type supports materials */
-#define OB_TYPE_SUPPORT_MATERIAL(_type) ((_type) >= OB_MESH && (_type) <= OB_MBALL)
-#define OB_TYPE_SUPPORT_VGROUP(_type) (ELEM(_type, OB_MESH, OB_LATTICE))
+#define OB_TYPE_SUPPORT_MATERIAL(_type) \
+ ((_type) >= OB_MESH && (_type) <= OB_MBALL)
+#define OB_TYPE_SUPPORT_VGROUP(_type) \
+ (ELEM(_type, OB_MESH, OB_LATTICE))
+#define OB_TYPE_SUPPORT_EDITMODE(_type) \
+ (ELEM7(_type, OB_MESH, OB_FONT, OB_CURVE, OB_SURF, OB_MBALL, OB_LATTICE, OB_ARMATURE))
/* partype: first 4 bits: type */
#define PARTYPE 15
diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h
index 58ffcf6480e..f5d525d47b5 100644
--- a/source/blender/makesdna/DNA_particle_types.h
+++ b/source/blender/makesdna/DNA_particle_types.h
@@ -236,7 +236,7 @@ typedef struct ParticleSettings {
typedef struct ParticleSystem
{ /* note1: make sure all (runtime) are NULL's in 'copy_particlesystem' XXX, this function is no more! - need to invstigate */
- /* note2: make sure any uses of this struct in DNA are accounted for in 'copy_object_particlesystems' */
+ /* note2: make sure any uses of this struct in DNA are accounted for in 'BKE_object_copy_particlesystems' */
struct ParticleSystem *next, *prev;
diff --git a/source/blender/makesdna/DNA_property_types.h b/source/blender/makesdna/DNA_property_types.h
index 55fa50e3f63..c1b810cd42b 100644
--- a/source/blender/makesdna/DNA_property_types.h
+++ b/source/blender/makesdna/DNA_property_types.h
@@ -1,7 +1,4 @@
/*
- *
- *
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index d2df799bc94..a40b07a8d01 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -176,14 +176,16 @@ typedef struct SceneRenderLayer {
struct Material *mat_override;
struct Group *light_override;
- unsigned int lay; /* scene->lay itself has priority over this */
- unsigned int lay_zmask; /* has to be after lay, this is for Z-masking */
+ unsigned int lay; /* scene->lay itself has priority over this */
+ unsigned int lay_zmask; /* has to be after lay, this is for Z-masking */
+ unsigned int lay_exclude; /* not used by internal, exclude */
int layflag;
- int pad;
-
int passflag; /* pass_xor has to be after passflag */
int pass_xor;
+
+ int samples;
+ int pad;
} SceneRenderLayer;
/* srl->layflag */
@@ -849,13 +851,18 @@ typedef struct UnifiedPaintSettings {
/* unified strength of brush */
float alpha;
+ /* unified brush weight, [0, 1] */
+ float weight;
+
/* user preferences for sculpt and paint */
int flag;
+ int pad;
} UnifiedPaintSettings;
typedef enum {
UNIFIED_PAINT_SIZE = (1<<0),
UNIFIED_PAINT_ALPHA = (1<<1),
+ UNIFIED_PAINT_WEIGHT = (1<<5),
/* only used if unified size is enabled, mirros the brush flags
* BRUSH_LOCK_SIZE and BRUSH_SIZE_PRESSURE */
@@ -876,7 +883,8 @@ typedef struct ToolSettings {
Sculpt *sculpt;
UvSculpt *uvsculpt; /* uv smooth */
- /* Vertex groups */
+ /* Vertex group weight - used only for editmode, not weight
+ paint */
float vgroup_weight;
/* Subdivide Settings */
@@ -1111,7 +1119,7 @@ typedef struct Scene {
/* Movie Tracking */
struct MovieClip *clip; /* active movie clip */
- uint64_t customdata_mask; /* XXX. runtime flag for drawing, actually belongs in the window, only used by object_handle_update() */
+ uint64_t customdata_mask; /* XXX. runtime flag for drawing, actually belongs in the window, only used by BKE_object_handle_update() */
uint64_t customdata_mask_modal; /* XXX. same as above but for temp operator use (gl renders) */
} Scene;
@@ -1390,7 +1398,7 @@ typedef struct Scene {
#define SCE_FRAME_DROP (1<<3)
- /* return flag next_object function */
+ /* return flag BKE_scene_base_iter_next function */
#define F_ERROR -1
#define F_START 0
#define F_SCENE 1
diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h
index 0a516c90aa1..cd73b692011 100644
--- a/source/blender/makesdna/DNA_sequence_types.h
+++ b/source/blender/makesdna/DNA_sequence_types.h
@@ -208,7 +208,7 @@ typedef struct Editing {
/* ************* Effect Variable Structs ********* */
typedef struct WipeVars {
- float edgeWidth,angle;
+ float edgeWidth, angle;
short forward, wipetype;
} WipeVars;
diff --git a/source/blender/makesdna/DNA_smoke_types.h b/source/blender/makesdna/DNA_smoke_types.h
index 26b3a3e6c62..50e48a13835 100644
--- a/source/blender/makesdna/DNA_smoke_types.h
+++ b/source/blender/makesdna/DNA_smoke_types.h
@@ -56,6 +56,11 @@
#define SM_BORDER_VERTICAL 1
#define SM_BORDER_CLOSED 2
+/* collision types */
+#define SM_COLL_STATIC 0
+#define SM_COLL_RIGID 1
+#define SM_COLL_ANIMATED 2
+
typedef struct SmokeDomainSettings {
struct SmokeModifierData *smd; /* for fast RNA access */
struct FLUID_3D *fluid;
@@ -110,8 +115,6 @@ typedef struct SmokeDomainSettings {
/* flags */
#define MOD_SMOKE_FLOW_ABSOLUTE (1<<1) /*old style emission*/
#define MOD_SMOKE_FLOW_INITVELOCITY (1<<2) /* passes particles speed to the smoke */
-#define MOD_SMOKE_FLOW_INIT (1 << 3) /* is the flow object already initialized? */
-
typedef struct SmokeFlowSettings {
struct SmokeModifierData *smd; /* for fast RNA access */
@@ -137,15 +140,16 @@ typedef struct SmokeFlowSettings {
typedef struct SmokeCollSettings {
struct SmokeModifierData *smd; /* for fast RNA access */
struct BVHTree *bvhtree; /* bounding volume hierarchy for this cloth object */
-
-// struct DerivedMesh *dm; // UNUSED, ifdef'd in code for now.
float *points;
float *points_old;
- float *vel;
+ float *vel; // UNUSED
+ int *tridivs;
float mat[4][4];
float mat_old[4][4];
int numpoints;
int numverts; // check if mesh changed
+ int numtris;
+ float dx; /* global domain cell length taken from (scale / resolution) */
short type; // static = 0, rigid = 1, dynamic = 2
short pad;
int pad2;
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 1938c63d474..0bc91907d6e 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -520,9 +520,15 @@ typedef struct SpaceClip {
* defined when drawing and used for mouse position calculation */
/* movie postprocessing */
- int postproc_flag;
+ int postproc_flag, pad2;
- int runtime_flag; /* different runtime flags */
+ void *draw_context;
+
+ /* dopesheet */
+ short dope_sort; /* sort order in dopesheet view */
+ short dope_flag; /* dopsheet view flags */
+
+ int pad3;
} SpaceClip;
/* view3d Now in DNA_view3d_types.h */
@@ -904,6 +910,7 @@ enum {
#define SC_SHOW_GRAPH_TRACKS (1<<15)
/*#define SC_SHOW_PYRAMID_LEVELS (1<<16) */ /* UNUSED */
#define SC_LOCK_TIMECURSOR (1<<17)
+#define SC_SHOW_SECONDS (1<<18)
/* SpaceClip->mode */
#define SC_MODE_TRACKING 0
@@ -913,9 +920,15 @@ enum {
/* SpaceClip->view */
#define SC_VIEW_CLIP 0
#define SC_VIEW_GRAPH 1
+#define SC_VIEW_DOPESHEET 2
+
+/* SpaceClip->dope_sort */
+#define SC_DOPE_SORT_NAME 0
+#define SC_DOPE_SORT_LONGEST 1
+#define SC_DOPE_SORT_TOTAL 2
-/* SpaceClip->runtime_flag */
-#define SC_GRAPH_BOTTOM (1<<0)
+/* SpaceClip->dope_flag */
+#define SC_DOPE_SORT_INVERSE 1
/* space types, moved from DNA_screen_types.h */
/* Do NOT change order, append on end. types are hardcoded needed */
diff --git a/source/blender/makesdna/DNA_tracking_types.h b/source/blender/makesdna/DNA_tracking_types.h
index 9c0f63028c1..6bf059c7ecb 100644
--- a/source/blender/makesdna/DNA_tracking_types.h
+++ b/source/blender/makesdna/DNA_tracking_types.h
@@ -123,7 +123,7 @@ typedef struct MovieTrackingSettings {
short default_pattern_match; /* re-adjust every N frames */
short default_flag; /* default flags like color channels used by default */
- short pod;
+ short motion_flag; /* flags describes motion type */
/* ** common tracker settings ** */
short speed; /* speed of tracking */
@@ -131,8 +131,8 @@ typedef struct MovieTrackingSettings {
/* ** reconstruction settings ** */
int keyframe1, keyframe2; /* two keyframes for reconstrution initialization */
- /* ** which camera intrinsics to refine. uses on the REFINE_* flags */
- short refine_camera_intrinsics, pad23;
+ /* which camera intrinsics to refine. uses on the REFINE_* flags */
+ short refine_camera_intrinsics, pad2;
/* ** tool settings ** */
@@ -193,6 +193,27 @@ typedef struct MovieTrackingStats {
char message[256];
} MovieTrackingStats;
+typedef struct MovieTrackingDopesheetChannel {
+ struct MovieTrackingDopesheetChannel *next, *prev;
+
+ MovieTrackingTrack *track; /* motion track for which channel is created */
+ int pad;
+
+ int tot_segment; /* total number of segments */
+ int *segments; /* tracked segments */
+ int max_segment, total_frames; /* longest segment length and total number of tracked frames */
+} MovieTrackingDopesheetChannel;
+
+typedef struct MovieTrackingDopesheet {
+ int ok, pad; /* flag if dopesheet information is still relevant */
+
+ ListBase channels;
+ int tot_channel;
+
+ short sort_method; /* method to be used to sort tracks */
+ short sort_inverse; /* order of tracks is inverted */
+} MovieTrackingDopesheet;
+
typedef struct MovieTracking {
MovieTrackingSettings settings; /* different tracking-related settings */
MovieTrackingCamera camera; /* camera intrinsics */
@@ -205,6 +226,8 @@ typedef struct MovieTracking {
int objectnr, tot_object; /* index of active object and total number of objects */
MovieTrackingStats *stats; /* statistics displaying in clip editor */
+
+ MovieTrackingDopesheet dopesheet; /* dopesheet data */
} MovieTracking;
/* MovieTrackingCamera->units */
@@ -230,6 +253,7 @@ enum {
#define TRACK_CUSTOMCOLOR (1<<7)
#define TRACK_USE_2D_STAB (1<<8)
#define TRACK_PREVIEW_GRAYSCALE (1<<9)
+#define TRACK_DOPE_SEL (1<<10)
/* MovieTrackingTrack->tracker */
#define TRACKER_KLT 0
@@ -243,6 +267,11 @@ enum {
/* MovieTrackingSettings->flag */
#define TRACKING_SETTINGS_SHOW_DEFAULT_EXPANDED (1<<0)
+/* MovieTrackingSettings->motion_flag */
+#define TRACKING_MOTION_TRIPOD (1<<0)
+
+#define TRACKING_MOTION_MODAL (TRACKING_MOTION_TRIPOD)
+
/* MovieTrackingSettings->speed */
#define TRACKING_SPEED_FASTEST 0
#define TRACKING_SPEED_REALTIME 1
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 40c4a7fab9d..94c4d141a57 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -205,7 +205,7 @@ typedef struct ThemeSpace {
char grid[4];
char wire[4], select[4];
- char lamp[4], speaker[4], empty[4],camera[4], pad[8];
+ char lamp[4], speaker[4], empty[4], camera[4], pad[8];
char active[4], group[4], group_active[4], transform[4];
char vertex[4], vertex_select[4];
char edge[4], edge_select[4];
@@ -376,13 +376,13 @@ typedef struct UserDef {
short tb_leftmouse, tb_rightmouse;
struct SolidLight light[3];
short tw_hotspot, tw_flag, tw_handlesize, tw_size;
- short textimeout,texcollectrate;
+ short textimeout, texcollectrate;
short wmdrawmethod; /* removed wmpad */
short dragthreshold;
int memcachelimit;
int prefetchframes;
short frameserverport;
- short pad_rot_angle; /*control the rotation step of the view when PAD2,PAD4,PAD6&PAD8 is use*/
+ short pad_rot_angle; /*control the rotation step of the view when PAD2, PAD4, PAD6&PAD8 is use*/
short obcenter_dia;
short rvisize; /* rotating view icon size */
short rvibright; /* rotating view icon brightness */
diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c
index ef7a2746d37..d0429041d9b 100644
--- a/source/blender/makesdna/intern/dna_genfile.c
+++ b/source/blender/makesdna/intern/dna_genfile.c
@@ -1,8 +1,4 @@
-/* dna_genfile.c
- *
- * Functions for struct-dna, the genetic file dot c!
- *
- *
+/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -32,6 +28,8 @@
/** \file blender/makesdna/intern/dna_genfile.c
* \ingroup DNA
+ *
+ * Functions for struct-dna, the genetic file dot c!
*/
@@ -338,7 +336,7 @@ static void init_structDNA(SDNA *sdna, int do_endian_swap)
else sdna->nr_names= *data;
data++;
- sdna->names= MEM_callocN( sizeof(void *)*sdna->nr_names, "sdnanames");
+ sdna->names= MEM_callocN(sizeof(void *)*sdna->nr_names, "sdnanames");
}
else {
printf("NAME error in SDNA file\n");
@@ -378,7 +376,7 @@ static void init_structDNA(SDNA *sdna, int do_endian_swap)
else sdna->nr_types= *data;
data++;
- sdna->types= MEM_callocN( sizeof(void *)*sdna->nr_types, "sdnatypes");
+ sdna->types= MEM_callocN(sizeof(void *)*sdna->nr_types, "sdnatypes");
}
else {
printf("TYPE error in SDNA file\n");
@@ -442,7 +440,7 @@ static void init_structDNA(SDNA *sdna, int do_endian_swap)
else sdna->nr_structs= *data;
data++;
- sdna->structs= MEM_callocN( sizeof(void *)*sdna->nr_structs, "sdnastrcs");
+ sdna->structs= MEM_callocN(sizeof(void *)*sdna->nr_structs, "sdnastrcs");
}
else {
printf("STRC error in SDNA file\n");
@@ -692,7 +690,7 @@ static void cast_elem(const char *ctype, const char *otype, const char *name, ch
curlen= DNA_elem_type_size(ctypenr);
while (arrlen>0) {
- switch(otypenr) {
+ switch (otypenr) {
case SDNA_TYPE_CHAR:
val= *olddata; break;
case SDNA_TYPE_UCHAR:
@@ -717,7 +715,7 @@ static void cast_elem(const char *ctype, const char *otype, const char *name, ch
val= *( (uint64_t *)olddata); break;
}
- switch(ctypenr) {
+ switch (ctypenr) {
case SDNA_TYPE_CHAR:
*curdata= val; break;
case SDNA_TYPE_UCHAR:
@@ -933,7 +931,7 @@ static void reconstruct_struct(SDNA *newsdna, SDNA *oldsdna,
spo= oldsdna->structs[oldSDNAnr];
elen= oldsdna->typelens[ spo[0] ];
- memcpy( cur, data, elen);
+ memcpy(cur, data, elen);
return;
}
@@ -1140,7 +1138,7 @@ void *DNA_struct_reconstruct(SDNA *newsdna, SDNA *oldsdna, char *compflags, int
return NULL;
}
- cur= MEM_callocN( blocks*curlen, "reconstruct");
+ cur= MEM_callocN(blocks*curlen, "reconstruct");
cpc= cur;
cpo= data;
for (a=0; a<blocks; a++) {
diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c
index f67fff460f1..5ce5827fac3 100644
--- a/source/blender/makesdna/intern/makesdna.c
+++ b/source/blender/makesdna/intern/makesdna.c
@@ -360,8 +360,8 @@ static int add_name(const char *str)
* */
buf[i] = 0;
if (debugSDNA > 3) printf("Name before chomping: %s\n", buf);
- if ((strncmp(buf,"(*headdraw", 10) == 0) ||
- (strncmp(buf,"(*windraw", 9) == 0) )
+ if ((strncmp(buf, "(*headdraw", 10) == 0) ||
+ (strncmp(buf, "(*windraw", 9) == 0) )
{
buf[i] = ')';
buf[i+1] = '(';
@@ -766,7 +766,7 @@ static int calculate_structlens(int firststruct)
}
if (alphalen % 8) {
- printf("Align pointer error in struct (alphalen8): %s %s\n", types[structtype],cp);
+ printf("Align pointer error in struct (alphalen8): %s %s\n", types[structtype], cp);
dna_error = 1;
}
@@ -792,7 +792,7 @@ static int calculate_structlens(int firststruct)
/* struct alignment */
if (type >= firststruct) {
if (sizeof(void *)==8 && (len % 8) ) {
- printf("Align struct error: %s %s\n", types[structtype],cp);
+ printf("Align struct error: %s %s\n", types[structtype], cp);
dna_error = 1;
}
}
@@ -874,6 +874,8 @@ static int calculate_structlens(int firststruct)
printf(" %s\n", types[structtype]);
}
}
+
+ dna_error = 1;
}
return(dna_error);
@@ -889,9 +891,8 @@ void dna_write(FILE *file, void *pntr, int size)
data = (char *) pntr;
- for (i = 0 ; i < size ; i++)
- {
- fprintf(file, "%d,", data[i]);
+ for (i = 0 ; i < size ; i++) {
+ fprintf(file, "%d, ", data[i]);
linelength++;
if (linelength >= MAX_DNA_LINE_LENGTH) {
fprintf(file, "\n");
@@ -990,7 +991,7 @@ static int make_structDNA(char *baseDirectory, FILE *file)
/* FOR DEBUG */
if (debugSDNA > 1) {
- int a,b;
+ int a, b;
/* short *elem; */
short num_types;
@@ -1008,7 +1009,7 @@ static int make_structDNA(char *baseDirectory, FILE *file)
for (a=0; a<nr_structs; a++) {
sp= structs[a];
- printf(" struct %s elems: %d size: %d\n", types[sp[0]], sp[1],typelens[sp[0]]);
+ printf(" struct %s elems: %d size: %d\n", types[sp[0]], sp[1], typelens[sp[0]]);
num_types = sp[1];
sp+= 2;
/* ? num_types was elem? */
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index da73a25d197..6560c2eb195 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -337,6 +337,7 @@ extern StructRNA RNA_MotionPathVert;
extern StructRNA RNA_MouseSensor;
extern StructRNA RNA_MovieSequence;
extern StructRNA RNA_MovieClipSequence;
+extern StructRNA RNA_MovieTrackingTrack;
extern StructRNA RNA_MovieTrackingObject;
extern StructRNA RNA_MulticamSequence;
extern StructRNA RNA_MultiresModifier;
diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h
index afa6a6e9608..1b8772ffbcd 100644
--- a/source/blender/makesrna/RNA_enum_types.h
+++ b/source/blender/makesrna/RNA_enum_types.h
@@ -70,6 +70,8 @@ extern EnumPropertyItem fmodifier_type_items[];
extern EnumPropertyItem nla_mode_extend_items[];
extern EnumPropertyItem nla_mode_blend_items[];
+extern EnumPropertyItem motionpath_bake_location_items[];
+
extern EnumPropertyItem event_value_items[];
extern EnumPropertyItem event_type_items[];
extern EnumPropertyItem operator_return_items[];
diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h
index c3beffbe223..47b25720373 100644
--- a/source/blender/makesrna/RNA_types.h
+++ b/source/blender/makesrna/RNA_types.h
@@ -147,49 +147,49 @@ typedef enum PropertyFlag {
/* editable means the property is editable in the user
* interface, properties are editable by default except
* for pointers and collections. */
- PROP_EDITABLE = 1<<0,
+ PROP_EDITABLE = (1<<0),
/* this property is editable even if it is lib linked,
* meaning it will get lost on reload, but it's useful
* for editing. */
- PROP_LIB_EXCEPTION = 1<<16,
+ PROP_LIB_EXCEPTION = (1<<16),
/* animatable means the property can be driven by some
* other input, be it animation curves, expressions, ..
* properties are animatable by default except for pointers
* and collections */
- PROP_ANIMATABLE = 1<<1,
+ PROP_ANIMATABLE = (1<<1),
/* icon */
- PROP_ICONS_CONSECUTIVE = 1<<12,
+ PROP_ICONS_CONSECUTIVE = (1<<12),
/* hidden in the user interface */
- PROP_HIDDEN = 1<<19,
+ PROP_HIDDEN = (1<<19),
/* do not write in presets */
- PROP_SKIP_SAVE = 1<<28,
+ PROP_SKIP_SAVE = (1<<28),
/* function paramater flags */
- PROP_REQUIRED = 1<<2,
- PROP_OUTPUT = 1<<3,
- PROP_RNAPTR = 1<<11,
+ PROP_REQUIRED = (1<<2),
+ PROP_OUTPUT = (1<<3),
+ PROP_RNAPTR = (1<<11),
/* registering */
- PROP_REGISTER = 1<<4,
+ PROP_REGISTER = (1<<4),
PROP_REGISTER_OPTIONAL = (1<<4)|(1<<5),
/* pointers */
- PROP_ID_REFCOUNT = 1<<6,
+ PROP_ID_REFCOUNT = (1<<6),
/* disallow assigning a variable to its self, eg an object tracking its self
* only apply this to types that are derived from an ID ()*/
- PROP_ID_SELF_CHECK = 1<<20,
+ PROP_ID_SELF_CHECK = (1<<20),
/* use for...
* - pointers: in the UI and python so unsetting or setting to None won't work
* - strings: so our internal generated get/length/set functions know to do NULL checks before access [#30865] */
- PROP_NEVER_NULL = 1<<18,
+ PROP_NEVER_NULL = (1<<18),
/* currently only used for UI, this is similar to PROP_NEVER_NULL
* except that the value may be NULL at times, used for ObData, where an Empty's will be NULL
* but setting NULL on a mesh object is not possible. So, if its not NULL, setting NULL cant be done! */
- PROP_NEVER_UNLINK = 1<<25,
+ PROP_NEVER_UNLINK = (1<<25),
/* flag contains multiple enums.
* note: not to be confused with prop->enumbitflags
@@ -197,32 +197,32 @@ typedef enum PropertyFlag {
*
* note: these can't be animated so use with care.
*/
- PROP_ENUM_FLAG = 1<<21,
+ PROP_ENUM_FLAG = (1<<21),
/* need context for update function */
- PROP_CONTEXT_UPDATE = 1<<22,
+ PROP_CONTEXT_UPDATE = (1<<22),
PROP_CONTEXT_PROPERTY_UPDATE = (1<<22)|(1<<27),
/* Use for arrays or for any data that should not have a referene kept
* most common case is functions that return arrays where the array */
- PROP_THICK_WRAP = 1<<23,
+ PROP_THICK_WRAP = (1<<23),
/* Reject values outside limits, use for python api only so far
* this is for use when silently clamping string length will give
* bad behavior later. Could also enforce this for INT's and other types.
* note: currently no support for function arguments or non utf8 paths (filepaths) */
- PROP_NEVER_CLAMP = 1<<26,
+ PROP_NEVER_CLAMP = (1<<26),
/* internal flags */
- PROP_BUILTIN = 1<<7,
- PROP_EXPORT = 1<<8,
- PROP_RUNTIME = 1<<9,
- PROP_IDPROPERTY = 1<<10,
- PROP_RAW_ACCESS = 1<<13,
- PROP_RAW_ARRAY = 1<<14,
- PROP_FREE_POINTERS = 1<<15,
- PROP_DYNAMIC = 1<<17, /* for dynamic arrays, and retvals of type string */
- PROP_ENUM_NO_CONTEXT = 1<<24 /* for enum that shouldn't be contextual */
+ PROP_BUILTIN = (1<<7),
+ PROP_EXPORT = (1<<8),
+ PROP_RUNTIME = (1<<9),
+ PROP_IDPROPERTY = (1<<10),
+ PROP_RAW_ACCESS = (1<<13),
+ PROP_RAW_ARRAY = (1<<14),
+ PROP_FREE_POINTERS = (1<<15),
+ PROP_DYNAMIC = (1<<17), /* for dynamic arrays, and retvals of type string */
+ PROP_ENUM_NO_CONTEXT = (1<<24) /* for enum that shouldn't be contextual */
} PropertyFlag;
typedef struct CollectionPropertyIterator {
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index e083a690fba..62957ac5de8 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -281,7 +281,7 @@ static void rna_sortlist(ListBase *listbase, int(*cmp)(const void*, const void*)
static void rna_print_c_string(FILE *f, const char *str)
{
- static const char *escape[] = {"\''", "\"\"", "\??", "\\\\","\aa", "\bb", "\ff", "\nn", "\rr", "\tt", "\vv", NULL};
+ static const char *escape[] = {"\''", "\"\"", "\??", "\\\\", "\aa", "\bb", "\ff", "\nn", "\rr", "\tt", "\vv", NULL};
int i, j;
if (!str) {
@@ -1359,8 +1359,10 @@ static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp)
* array get/next function, we can be sure it is an actual array */
if (cprop->next && cprop->get)
if (strcmp((const char*)cprop->next, "rna_iterator_array_next") == 0 &&
- strcmp((const char*)cprop->get, "rna_iterator_array_get") == 0)
+ strcmp((const char*)cprop->get, "rna_iterator_array_get") == 0)
+ {
prop->flag |= PROP_RAW_ARRAY;
+ }
cprop->get = (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)cprop->get);
cprop->begin = (void*)rna_def_property_begin_func(f, srna, prop, dp, (const char*)cprop->begin);
@@ -3124,7 +3126,7 @@ int main(int argc, char **argv)
totblock = MEM_get_memory_blocks_in_use();
if (totblock != 0) {
- fprintf(stderr, "Error Totblock: %d\n",totblock);
+ fprintf(stderr, "Error Totblock: %d\n", totblock);
MEM_set_error_callback(mem_error_cb);
MEM_printmemlist();
}
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index 6992d992cca..74a55b97e1b 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -269,7 +269,7 @@ static void rna_ID_update_tag(ID *id, ReportList *reports, int flag)
if (ob->type == OB_FONT) {
Curve *cu = ob->data;
freedisplist(&cu->disp);
- BKE_text_to_curve(sce, ob, CU_LEFT);
+ BKE_vfont_to_curve(sce, ob, CU_LEFT);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 3200b271718..73e046f0d63 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -615,7 +615,8 @@ PropertyRNA *RNA_struct_find_nested(PointerRNA *ptr, StructRNA *srna)
{
PropertyRNA *prop = NULL;
- RNA_STRUCT_BEGIN(ptr, iprop) {
+ RNA_STRUCT_BEGIN (ptr, iprop)
+ {
/* This assumes that there can only be one user of this nested struct */
if (RNA_property_pointer_type(ptr, iprop) == srna) {
prop = iprop;
@@ -637,7 +638,8 @@ int RNA_struct_contains_property(PointerRNA *ptr, PropertyRNA *prop_test)
iterprop = RNA_struct_iterator_property(ptr->type);
- RNA_PROP_BEGIN(ptr, itemptr, iterprop) {
+ RNA_PROP_BEGIN (ptr, itemptr, iterprop)
+ {
/* PropertyRNA *prop= itemptr.data; */
if (prop_test == (PropertyRNA *)itemptr.data) {
found = TRUE;
@@ -684,7 +686,8 @@ FunctionRNA *RNA_struct_find_function(PointerRNA *ptr, const char *identifier)
func = NULL;
- RNA_PROP_BEGIN(&tptr, funcptr, iterprop) {
+ RNA_PROP_BEGIN (&tptr, funcptr, iterprop)
+ {
if (strcmp(identifier, RNA_function_identifier(funcptr.data)) == 0) {
func = funcptr.data;
break;
@@ -3122,12 +3125,14 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
if (((itemtype == PROP_BOOLEAN || itemtype == PROP_INT) && in.type == PROP_RAW_INT) ||
(itemtype == PROP_FLOAT && in.type == PROP_RAW_FLOAT))
+ {
/* avoid creating temporary buffer if the data type match */
needconv = 0;
-
+ }
/* no item property pointer, can still be id property, or
* property of a type derived from the collection pointer type */
- RNA_PROP_BEGIN(ptr, itemptr, prop) {
+ RNA_PROP_BEGIN (ptr, itemptr, prop)
+ {
if (itemptr.data) {
if (itemprop) {
/* we got the property already */
@@ -4498,7 +4503,8 @@ char *RNA_pointer_as_string(bContext *C, PointerRNA *ptr)
BLI_dynstr_append(dynstr, "{");
- RNA_STRUCT_BEGIN(ptr, prop) {
+ RNA_STRUCT_BEGIN (ptr, prop)
+ {
propname = RNA_property_identifier(prop);
if (strcmp(propname, "rna_type") == 0)
@@ -4541,7 +4547,8 @@ char *RNA_pointer_as_string_keywords_ex(bContext *C, PointerRNA *ptr, PointerRNA
PropertyRNA *prop_default;
char *buf_default;
- RNA_PROP_BEGIN(ptr, propptr, iterprop) {
+ RNA_PROP_BEGIN (ptr, propptr, iterprop)
+ {
prop = propptr.data;
flag = RNA_property_flag(prop);
diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c
index 1159a1ba20e..20265f467d5 100644
--- a/source/blender/makesrna/intern/rna_action.c
+++ b/source/blender/makesrna/intern/rna_action.c
@@ -191,7 +191,7 @@ static void rna_Action_active_pose_marker_index_range(PointerRNA *ptr, int *min,
-static void rna_Action_frame_range_get(PointerRNA *ptr,float *values)
+static void rna_Action_frame_range_get(PointerRNA *ptr, float *values)
{ /* don't include modifiers because they too easily can have very large
* ranges: MINAFRAMEF to MAXFRAMEF. */
calc_action_range(ptr->id.data, values, values+1, FALSE);
@@ -617,9 +617,9 @@ static void rna_def_action(BlenderRNA *brna)
rna_def_action_pose_markers(brna, prop);
/* properties */
- prop = RNA_def_float_vector(srna, "frame_range" , 2 , NULL , 0, 0, "Frame Range" ,
- "The final frame range of all F-Curves within this action" , 0 , 0);
- RNA_def_property_float_funcs(prop, "rna_Action_frame_range_get" , NULL, NULL);
+ prop = RNA_def_float_vector(srna, "frame_range", 2, NULL, 0, 0, "Frame Range",
+ "The final frame range of all F-Curves within this action", 0, 0);
+ RNA_def_property_float_funcs(prop, "rna_Action_frame_range_get", NULL, NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
/* special "type" limiter - should not really be edited in general,
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c
index e564c03df14..3b89899702d 100644
--- a/source/blender/makesrna/intern/rna_actuator.c
+++ b/source/blender/makesrna/intern/rna_actuator.c
@@ -141,7 +141,7 @@ static void rna_ConstraintActuator_type_set(struct PointerRNA *ptr, int value)
switch (ca->type) {
case ACT_CONST_TYPE_ORI:
/* negative axis not supported in the orientation mode */
- if (ELEM3(ca->mode, ACT_CONST_DIRNX,ACT_CONST_DIRNY, ACT_CONST_DIRNZ))
+ if (ELEM3(ca->mode, ACT_CONST_DIRNX, ACT_CONST_DIRNY, ACT_CONST_DIRNZ))
ca->mode = ACT_CONST_NONE;
break;
@@ -1451,22 +1451,6 @@ static void rna_def_scene_actuator(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Scene", "Scene to be added/removed/paused/resumed");
RNA_def_property_update(prop, NC_LOGIC, NULL);
-
- /* XXX no need for those tooltips. to remove soon
- * Originally we had different 'scene' tooltips for different values of 'type'.
- * They were:
- * ACT_SCENE_RESTART ""
- * ACT_SCENE_CAMERA ""
- * ACT_SCENE_SET "Set this Scene"
- * ACT_SCENE_ADD_FRONT "Add an Overlay Scene"
- * ACT_SCENE_ADD_BACK "Add a Background Scene"
- * ACT_SCENE_REMOVE "Remove a Scene"
- * ACT_SCENE_SUSPEND "Pause a Scene"
- * ACT_SCENE_RESUME "Unpause a Scene"
- *
- * It can be done in the ui script if still needed.
- */
-
}
static void rna_def_random_actuator(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c
index 94ea79099c2..7f52456355c 100644
--- a/source/blender/makesrna/intern/rna_animation.c
+++ b/source/blender/makesrna/intern/rna_animation.c
@@ -201,7 +201,7 @@ static StructRNA *rna_KeyingSetInfo_register(Main *bmain, ReportList *reports, v
}
/* check if we have registered this info before, and remove it */
- ksi = ANIM_keyingset_info_find_named(dummyksi.idname);
+ ksi = ANIM_keyingset_info_find_name(dummyksi.idname);
if (ksi && ksi->ext.srna)
rna_KeyingSetInfo_unregister(bmain, ksi->ext.srna);
@@ -337,7 +337,7 @@ static PointerRNA rna_KeyingSet_typeinfo_get(PointerRNA *ptr)
/* keying set info is only for builtin Keying Sets */
if ((ks->flag & KEYINGSET_ABSOLUTE) == 0)
- ksi = ANIM_keyingset_info_find_named(ks->typeinfo);
+ ksi = ANIM_keyingset_info_find_name(ks->typeinfo);
return rna_pointer_inherit_refine(ptr, &RNA_KeyingSetInfo, ksi);
}
@@ -837,7 +837,7 @@ void rna_def_animdata(BlenderRNA *brna)
/* Active Action */
prop = RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
/* this flag as well as the dynamic test must be defined for this to be editable... */
- RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_REFCOUNT);
RNA_def_property_pointer_funcs(prop, NULL, "rna_AnimData_action_set", NULL, "rna_Action_id_poll");
RNA_def_property_editable_func(prop, "rna_AnimData_action_editable");
RNA_def_property_ui_text(prop, "Action", "Active Action for this datablock");
diff --git a/source/blender/makesrna/intern/rna_animviz.c b/source/blender/makesrna/intern/rna_animviz.c
index f7065307d87..167eb23c023 100644
--- a/source/blender/makesrna/intern/rna_animviz.c
+++ b/source/blender/makesrna/intern/rna_animviz.c
@@ -39,6 +39,14 @@
#include "WM_types.h"
+/* Which part of bone(s) get baked */
+// TODO: icons?
+EnumPropertyItem motionpath_bake_location_items[] = {
+ {MOTIONPATH_BAKE_HEADS, "HEADS", 0, "Heads", "Calculate bone paths from heads"},
+ {0, "TAILS", 0, "Tails", "Calculate bone paths from tails"},
+ //{MOTIONPATH_BAKE_CENTERS, "CENTROID", 0, "Centers", "Calculate bone paths from center of mass"},
+ {0, NULL, 0, NULL, NULL}};
+
#ifdef RNA_RUNTIME
static PointerRNA rna_AnimViz_onion_skinning_get(PointerRNA *ptr)
@@ -241,10 +249,6 @@ static void rna_def_animviz_paths(BlenderRNA *brna)
"Display Paths of poses within a fixed number of frames around the current frame"},
{MOTIONPATH_TYPE_RANGE, "RANGE", 0, "In Range", "Display Paths of poses within specified range"},
{0, NULL, 0, NULL, NULL}};
- static const EnumPropertyItem prop_location_items[] = {
- {MOTIONPATH_BAKE_HEADS, "HEADS", 0, "Heads", "Calculate bone paths from heads"},
- {0, "TAILS", 0, "Tails", "Calculate bone paths from tails"},
- {0, NULL, 0, NULL, NULL}};
srna = RNA_def_struct(brna, "AnimVizMotionPaths", NULL);
RNA_def_struct_sdna(srna, "bAnimVizSettings");
@@ -260,7 +264,7 @@ static void rna_def_animviz_paths(BlenderRNA *brna)
prop = RNA_def_property(srna, "bake_location", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "path_bakeflag");
- RNA_def_property_enum_items(prop, prop_location_items);
+ RNA_def_property_enum_items(prop, motionpath_bake_location_items);
RNA_def_property_ui_text(prop, "Bake Location", "When calculating Bone Paths, use Head or Tips");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index 79b776572cf..c97a4751135 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -894,7 +894,7 @@ static void rna_def_armature(BlenderRNA *brna)
prop = RNA_def_property(srna, "deform_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "gevertdeformer");
RNA_def_property_enum_items(prop, prop_vdeformer);
- RNA_def_property_ui_text(prop, "Vertex Deformer", "");
+ RNA_def_property_ui_text(prop, "Vertex Deformer", "Vertex Deformer Method (Game Engine only)");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
@@ -973,30 +973,6 @@ static void rna_def_armature(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
/* XXX depreceated ....... old animviz for armatures only */
-
- /* deformflag */
- prop = RNA_def_property(srna, "use_deform_vertex_groups", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_VGROUP);
- RNA_def_property_ui_text(prop, "Deform Vertex Groups", "Enable Vertex Groups when defining deform");
- RNA_def_property_update(prop, 0, "rna_Armature_update_data");
-
- prop = RNA_def_property(srna, "use_deform_envelopes", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_ENVELOPE);
- RNA_def_property_ui_text(prop, "Deform Envelopes", "Enable Bone Envelopes when defining deform");
- RNA_def_property_update(prop, 0, "rna_Armature_update_data");
-
- prop = RNA_def_property(srna, "use_deform_preserve_volume", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_QUATERNION);
- RNA_def_property_ui_text(prop, "Use Dual Quaternion Deformation", "Enable deform rotation with Quaternions");
- RNA_def_property_update(prop, 0, "rna_Armature_update_data");
-
-#if 0
- prop = RNA_def_property(srna, "deform_invert_vertexgroups", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "deformflag", ARM_DEF_INVERT_VGROUP);
- RNA_def_property_ui_text(prop, "Invert Vertex Group Influence",
- "Invert Vertex Group influence (only for Modifiers)");
- RNA_def_property_update(prop, 0, "rna_Armature_update_data");
-#endif
/* Number fields */
/* XXX depreceated ....... old animviz for armatures only */
diff --git a/source/blender/makesrna/intern/rna_boid.c b/source/blender/makesrna/intern/rna_boid.c
index ce9edc17999..2f27c7a1e84 100644
--- a/source/blender/makesrna/intern/rna_boid.c
+++ b/source/blender/makesrna/intern/rna_boid.c
@@ -407,7 +407,7 @@ static void rna_def_boidrule(BlenderRNA *brna)
/* data */
srna = RNA_def_struct(brna, "BoidRule", NULL);
- RNA_def_struct_ui_text(srna , "Boid Rule", "");
+ RNA_def_struct_ui_text(srna, "Boid Rule", "");
RNA_def_struct_refine_func(srna, "rna_BoidRule_refine");
RNA_def_struct_path_func(srna, "rna_BoidRule_path");
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 5093c1a6eee..ee4b34508d1 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -52,7 +52,7 @@ EnumPropertyItem brush_sculpt_tool_items[] = {
{SCULPT_TOOL_BLOB, "BLOB", ICON_BRUSH_BLOB, "Blob", ""},
{SCULPT_TOOL_CLAY, "CLAY", ICON_BRUSH_CLAY, "Clay", ""},
{SCULPT_TOOL_CLAY_STRIPS, "CLAY_STRIPS", ICON_BRUSH_CLAY_STRIPS, "Clay Strips", ""},
- {SCULPT_TOOL_CREASE, "CREASE",ICON_BRUSH_CREASE, "Crease", ""},
+ {SCULPT_TOOL_CREASE, "CREASE", ICON_BRUSH_CREASE, "Crease", ""},
{SCULPT_TOOL_DRAW, "DRAW", ICON_BRUSH_SCULPT_DRAW, "Draw", ""},
{SCULPT_TOOL_FILL, "FILL", ICON_BRUSH_FILL, "Fill", ""},
{SCULPT_TOOL_FLATTEN, "FLATTEN", ICON_BRUSH_FLATTEN, "Flatten", ""},
@@ -288,7 +288,7 @@ static void rna_Brush_set_size(PointerRNA *ptr, int value)
Brush* brush = ptr->data;
/* scale unprojected radius so it stays consistent with brush size */
- brush_scale_unprojected_radius(&brush->unprojected_radius,
+ BKE_brush_scale_unprojected_radius(&brush->unprojected_radius,
value, brush->size);
brush->size = value;
}
@@ -298,7 +298,7 @@ static void rna_Brush_set_unprojected_radius(PointerRNA *ptr, float value)
Brush* brush = ptr->data;
/* scale brush size so it stays consistent with unprojected_radius */
- brush_scale_size(&brush->size, value, brush->unprojected_radius);
+ BKE_brush_scale_size(&brush->size, value, brush->unprojected_radius);
brush->unprojected_radius = value;
}
@@ -572,7 +572,7 @@ static void rna_def_brush(BlenderRNA *brna)
prop = RNA_def_property(srna, "rate", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rate");
- RNA_def_property_range(prop, 0.0001f , 10000.0f);
+ RNA_def_property_range(prop, 0.0001f, 10000.0f);
RNA_def_property_ui_range(prop, 0.01f, 1.0f, 1, 3);
RNA_def_property_ui_text(prop, "Rate", "Interval between paints for Airbrush");
RNA_def_property_update(prop, 0, "rna_Brush_update");
@@ -583,6 +583,13 @@ static void rna_def_brush(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Color", "");
RNA_def_property_update(prop, 0, "rna_Brush_update");
+ prop = RNA_def_property(srna, "weight", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_default(prop, 1.0f);
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3);
+ RNA_def_property_ui_text(prop, "Weight", "Vertex weight when brush is applied");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
+
prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "alpha");
RNA_def_property_float_default(prop, 0.5f);
@@ -867,7 +874,7 @@ static void rna_def_brush(BlenderRNA *brna)
prop = RNA_def_property(srna, "clone_offset", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "clone.offset");
RNA_def_property_ui_text(prop, "Clone Offset", "");
- RNA_def_property_ui_range(prop, -1.0f , 1.0f, 10.0f, 3);
+ RNA_def_property_ui_range(prop, -1.0f, 1.0f, 10.0f, 3);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_Brush_update");
/* brush capabilities (mode-dependent) */
diff --git a/source/blender/makesrna/intern/rna_camera.c b/source/blender/makesrna/intern/rna_camera.c
index 180479d6f63..70a33734c3f 100644
--- a/source/blender/makesrna/intern/rna_camera.c
+++ b/source/blender/makesrna/intern/rna_camera.c
@@ -46,14 +46,14 @@
static float rna_Camera_angle_get(PointerRNA *ptr)
{
Camera *cam = ptr->id.data;
- float sensor = camera_sensor_size(cam->sensor_fit, cam->sensor_x, cam->sensor_y);
+ float sensor = BKE_camera_sensor_size(cam->sensor_fit, cam->sensor_x, cam->sensor_y);
return focallength_to_fov(cam->lens, sensor);
}
static void rna_Camera_angle_set(PointerRNA *ptr, float value)
{
Camera *cam = ptr->id.data;
- float sensor = camera_sensor_size(cam->sensor_fit, cam->sensor_x, cam->sensor_y);
+ float sensor = BKE_camera_sensor_size(cam->sensor_fit, cam->sensor_x, cam->sensor_y);
cam->lens = fov_to_focallength(value, sensor);
}
@@ -97,6 +97,7 @@ void RNA_def_camera(BlenderRNA *brna)
static EnumPropertyItem prop_type_items[] = {
{CAM_PERSP, "PERSP", 0, "Perspective", ""},
{CAM_ORTHO, "ORTHO", 0, "Orthographic", ""},
+ {CAM_PANO, "PANO", 0, "Panoramic", ""},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_draw_type_extra_items[] = {
{CAM_DTX_CENTER, "CENTER", 0, "Center", ""},
@@ -271,12 +272,6 @@ void RNA_def_camera(BlenderRNA *brna)
RNA_def_property_enum_items(prop, prop_lens_unit_items);
RNA_def_property_ui_text(prop, "Lens Unit", "Unit to edit lens in for the user interface");
- prop = RNA_def_property(srna, "use_panorama", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", CAM_PANORAMA);
- RNA_def_property_ui_text(prop, "Panorama",
- "Render the scene with a cylindrical camera for pseudo-fisheye lens effects");
- RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
-
/* pointers */
rna_def_animdata_common(srna);
diff --git a/source/blender/makesrna/intern/rna_camera_api.c b/source/blender/makesrna/intern/rna_camera_api.c
index 14391e74239..2d19047ef89 100644
--- a/source/blender/makesrna/intern/rna_camera_api.c
+++ b/source/blender/makesrna/intern/rna_camera_api.c
@@ -46,7 +46,7 @@ void rna_camera_view_frame(struct Camera *camera, struct Scene *scene,
{
float vec[4][3];
- camera_view_frame(scene, camera, vec);
+ BKE_camera_view_frame(scene, camera, vec);
copy_v3_v3(vec1_r, vec[0]);
copy_v3_v3(vec2_r, vec[1]);
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c
index 6d67f0c00dd..b812c574a01 100644
--- a/source/blender/makesrna/intern/rna_constraint.c
+++ b/source/blender/makesrna/intern/rna_constraint.c
@@ -68,7 +68,7 @@ EnumPropertyItem constraint_type_items[] = {
{CONSTRAINT_TYPE_LOCKTRACK, "LOCKED_TRACK", ICON_CONSTRAINT_DATA, "Locked Track",
"Tracking along a single axis"},
{CONSTRAINT_TYPE_SPLINEIK, "SPLINE_IK", ICON_CONSTRAINT_DATA, "Spline IK", ""},
- {CONSTRAINT_TYPE_STRETCHTO, "STRETCH_TO",ICON_CONSTRAINT_DATA, "Stretch To", ""},
+ {CONSTRAINT_TYPE_STRETCHTO, "STRETCH_TO", ICON_CONSTRAINT_DATA, "Stretch To", ""},
{CONSTRAINT_TYPE_TRACKTO, "TRACK_TO", ICON_CONSTRAINT_DATA, "Track To",
"Legacy tracking constraint prone to twisting artifacts"},
{0, "", 0, N_("Relationship"), ""},
@@ -562,7 +562,7 @@ static void rna_def_constraint_python(BlenderRNA *brna)
prop = RNA_def_property(srna, "text", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Script", "The text object that contains the Python script");
- RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_REFCOUNT);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop = RNA_def_property(srna, "use_targets", PROP_BOOLEAN, PROP_NONE);
@@ -1020,7 +1020,7 @@ static void rna_def_constraint_minmax(BlenderRNA *brna)
srna = RNA_def_struct(brna, "FloorConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Floor Constraint", "Use the target object for location limitation");
- RNA_def_struct_sdna_from(srna, "bMinMaxConstraint","data");
+ RNA_def_struct_sdna_from(srna, "bMinMaxConstraint", "data");
prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
@@ -1097,7 +1097,7 @@ static void rna_def_constraint_action(BlenderRNA *brna)
prop = RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "act");
RNA_def_property_ui_text(prop, "Action", "The constraining action");
- RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_REFCOUNT);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME);
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index 5bf52c0d552..96ec37d8fa0 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -100,12 +100,12 @@ static const EnumPropertyItem curve2d_fill_mode_items[] = {
#include "MEM_guardedalloc.h"
-#include "ED_curve.h" /* for BKE_curve_nurbs */
+#include "ED_curve.h" /* for BKE_curve_nurbs_get */
/* highly irritating but from RNA we cant know this */
static Nurb *curve_nurb_from_point(Curve *cu, const void *point, int *nu_index, int *pt_index)
{
- ListBase *nurbs = BKE_curve_nurbs(cu);
+ ListBase *nurbs = BKE_curve_nurbs_get(cu);
Nurb *nu;
int i = 0;
@@ -139,7 +139,7 @@ static Nurb *curve_nurb_from_point(Curve *cu, const void *point, int *nu_index,
static StructRNA *rna_Curve_refine(PointerRNA *ptr)
{
Curve *cu = (Curve*)ptr->data;
- short obtype = curve_type(cu);
+ short obtype = BKE_curve_type_get(cu);
if (obtype == OB_FONT) return &RNA_TextCurve;
else if (obtype == OB_SURF) return &RNA_SurfaceCurve;
@@ -205,7 +205,7 @@ static void rna_Curve_texspace_set(Main *UNUSED(bmain), Scene *UNUSED(scene), Po
Curve *cu = (Curve*)ptr->data;
if (cu->texflag & CU_AUTOSPACE)
- tex_space_curve(cu);
+ BKE_curve_texspace_calc(cu);
}
static int rna_Curve_texspace_editable(PointerRNA *ptr)
@@ -219,7 +219,7 @@ static void rna_Curve_texspace_loc_get(PointerRNA *ptr, float *values)
Curve *cu = (Curve *)ptr->data;
if (!cu->bb)
- tex_space_curve(cu);
+ BKE_curve_texspace_calc(cu);
copy_v3_v3(values, cu->loc);
}
@@ -236,7 +236,7 @@ static void rna_Curve_texspace_size_get(PointerRNA *ptr, float *values)
Curve *cu = (Curve *)ptr->data;
if (!cu->bb)
- tex_space_curve(cu);
+ BKE_curve_texspace_calc(cu);
copy_v3_v3(values, cu->size);
}
@@ -271,7 +271,7 @@ static void rna_Curve_dimension_set(PointerRNA *ptr, int value)
if (value == CU_3D) cu->flag |= CU_3D;
else cu->flag &= ~CU_3D;
- update_curve_dimension(cu);
+ BKE_curve_curve_dimension_update(cu);
}
static EnumPropertyItem *rna_Curve_fill_mode_itemf(bContext *UNUSED(C), PointerRNA *ptr,
@@ -326,7 +326,7 @@ static void rna_Curve_update_points(Main *bmain, Scene *scene, PointerRNA *ptr)
Nurb *nu = curve_nurb_from_point(cu, ptr->data, NULL, NULL);
if (nu)
- calchandlesNurb(nu);
+ BKE_nurb_handles_calc(nu);
rna_Curve_update_data(bmain, scene, ptr);
}
@@ -404,7 +404,7 @@ static void rna_Curve_taperObject_set(PointerRNA *ptr, PointerRNA value)
static void rna_Curve_resolution_u_update_data(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Curve *cu = (Curve*)ptr->id.data;
- ListBase *nurbs = BKE_curve_nurbs(cu);
+ ListBase *nurbs = BKE_curve_nurbs_get(cu);
Nurb *nu = nurbs->first;
while (nu) {
@@ -418,7 +418,7 @@ static void rna_Curve_resolution_u_update_data(Main *bmain, Scene *scene, Pointe
static void rna_Curve_resolution_v_update_data(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Curve *cu = (Curve*)ptr->id.data;
- ListBase *nurbs = BKE_curve_nurbs(cu);
+ ListBase *nurbs = BKE_curve_nurbs_get(cu);
Nurb *nu = nurbs->first;
@@ -481,10 +481,10 @@ static void rna_Nurb_update_cyclic_u(Main *bmain, Scene *scene, PointerRNA *ptr)
Nurb *nu = (Nurb*)ptr->data;
if (nu->type == CU_BEZIER) {
- calchandlesNurb(nu);
+ BKE_nurb_handles_calc(nu);
}
else {
- nurbs_knot_calc_u(nu);
+ BKE_nurb_knot_calc_u(nu);
}
rna_Curve_update_data(bmain, scene, ptr);
@@ -494,7 +494,7 @@ static void rna_Nurb_update_cyclic_v(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Nurb *nu = (Nurb*)ptr->data;
- nurbs_knot_calc_v(nu);
+ BKE_nurb_knot_calc_v(nu);
rna_Curve_update_data(bmain, scene, ptr);
}
@@ -503,8 +503,8 @@ static void rna_Nurb_update_knot_u(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Nurb *nu = (Nurb*)ptr->data;
- clamp_nurb_order_u(nu);
- nurbs_knot_calc_u(nu);
+ BKE_nurb_order_clamp_u(nu);
+ BKE_nurb_knot_calc_u(nu);
rna_Curve_update_data(bmain, scene, ptr);
}
@@ -513,8 +513,8 @@ static void rna_Nurb_update_knot_v(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Nurb *nu = (Nurb*)ptr->data;
- clamp_nurb_order_v(nu);
- nurbs_knot_calc_v(nu);
+ BKE_nurb_order_clamp_v(nu);
+ BKE_nurb_knot_calc_v(nu);
rna_Curve_update_data(bmain, scene, ptr);
}
@@ -529,10 +529,10 @@ static void rna_Curve_spline_points_add(ID *id, Nurb *nu, ReportList *reports, i
}
else {
- addNurbPoints(nu, number);
+ BKE_nurb_points_add(nu, number);
/* update */
- nurbs_knot_calc_u(nu);
+ BKE_nurb_knot_calc_u(nu);
rna_Curve_update_data_id(NULL, NULL, id);
}
@@ -547,10 +547,10 @@ static void rna_Curve_spline_bezpoints_add(ID *id, Nurb *nu, ReportList *reports
/* do nothing */
}
else {
- addNurbPointsBezier(nu, number);
+ BKE_nurb_bezierPoints_add(nu, number);
/* update */
- nurbs_knot_calc_u(nu);
+ BKE_nurb_knot_calc_u(nu);
rna_Curve_update_data_id(NULL, NULL, id);
}
@@ -558,7 +558,7 @@ static void rna_Curve_spline_bezpoints_add(ID *id, Nurb *nu, ReportList *reports
static Nurb *rna_Curve_spline_new(Curve *cu, int type)
{
- Nurb *nu = ( Nurb * ) MEM_callocN( sizeof( Nurb ), "spline.new" );
+ Nurb *nu = (Nurb *) MEM_callocN(sizeof( Nurb ), "spline.new" );
if (type == CU_BEZIER) {
BezTriple *bezt = (BezTriple *)MEM_callocN(sizeof(BezTriple), "spline.new.bezt");
@@ -579,7 +579,7 @@ static Nurb *rna_Curve_spline_new(Curve *cu, int type)
nu->resolu = nu->resolv = 12;
nu->flag = CU_SMOOTH;
- BLI_addtail(BKE_curve_nurbs(cu), nu);
+ BLI_addtail(BKE_curve_nurbs_get(cu), nu);
return nu;
}
@@ -587,7 +587,7 @@ static Nurb *rna_Curve_spline_new(Curve *cu, int type)
static void rna_Curve_spline_remove(Curve *cu, ReportList *reports, Nurb *nu)
{
int found = 0;
- ListBase *nurbs = BKE_curve_nurbs(cu);
+ ListBase *nurbs = BKE_curve_nurbs_get(cu);
found = BLI_remlink_safe(nurbs, nu);
@@ -596,7 +596,7 @@ static void rna_Curve_spline_remove(Curve *cu, ReportList *reports, Nurb *nu)
return;
}
- freeNurb(nu);
+ BKE_nurb_free(nu);
/* invalidate pointer!, no can do */
DAG_id_tag_update(&cu->id, OB_RECALC_DATA);
@@ -605,9 +605,9 @@ static void rna_Curve_spline_remove(Curve *cu, ReportList *reports, Nurb *nu)
static void rna_Curve_spline_clear(Curve *cu)
{
- ListBase *nurbs = BKE_curve_nurbs(cu);
+ ListBase *nurbs = BKE_curve_nurbs_get(cu);
- freeNurblist(nurbs);
+ BKE_nurbList_free(nurbs);
DAG_id_tag_update(&cu->id, OB_RECALC_DATA);
WM_main_add_notifier(NC_GEOM|ND_DATA, NULL);
@@ -617,7 +617,7 @@ static PointerRNA rna_Curve_active_spline_get(PointerRNA *ptr)
{
Curve *cu = (Curve*)ptr->data;
Nurb *nu;
- ListBase *nurbs = BKE_curve_nurbs(cu);
+ ListBase *nurbs = BKE_curve_nurbs_get(cu);
/* for curve outside editmode will set to -1, should be changed to be allowed outside of editmode. */
nu = BLI_findlink(nurbs, cu->actnu);
@@ -632,7 +632,7 @@ static void rna_Curve_active_spline_set(PointerRNA *ptr, PointerRNA value)
{
Curve *cu = (Curve*)ptr->data;
Nurb *nu = value.data;
- ListBase *nubase = BKE_curve_nurbs(cu);
+ ListBase *nubase = BKE_curve_nurbs_get(cu);
/* -1 is ok for an unset index */
if (nu == NULL)
@@ -644,7 +644,7 @@ static void rna_Curve_active_spline_set(PointerRNA *ptr, PointerRNA value)
static char *rna_Curve_spline_path(PointerRNA *ptr)
{
Curve *cu = (Curve*)ptr->id.data;
- ListBase *nubase = BKE_curve_nurbs(cu);
+ ListBase *nubase = BKE_curve_nurbs_get(cu);
Nurb *nu = ptr->data;
int index = BLI_findindex(nubase, nu);
@@ -693,7 +693,7 @@ static char *rna_TextBox_path(PointerRNA *ptr)
static void rna_Curve_splines_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
Curve *cu = (Curve*)ptr->id.data;
- rna_iterator_listbase_begin(iter, BKE_curve_nurbs(cu), NULL);
+ rna_iterator_listbase_begin(iter, BKE_curve_nurbs_get(cu), NULL);
}
#else
@@ -1470,6 +1470,18 @@ static void rna_def_curve(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Materials", "");
RNA_def_property_srna(prop, "IDMaterials"); /* see rna_ID.c */
RNA_def_property_collection_funcs(prop, 0, NULL, NULL, NULL, NULL, NULL, NULL, "rna_IDMaterials_assign_int");
+
+ prop = RNA_def_property(srna, "bevel_factor_start", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_sdna(prop, NULL, "bevfac1");
+ RNA_def_property_range(prop, 0, 1.0);
+ RNA_def_property_ui_text(prop, "Start Bevel Factor", "Factor that defines from where beveling of spline happens (0=from the very beginning, 1=from the very end)");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
+
+ prop = RNA_def_property(srna, "bevel_factor_end", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_sdna(prop, NULL, "bevfac2");
+ RNA_def_property_range(prop, 0, 1.0);
+ RNA_def_property_ui_text(prop, "End Bevel Factor", "Factor that defines to where beveling of spline happens (0=to the very beginning, 1=to the very end)");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
}
static void rna_def_curve_nurb(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c
index bf5f51374fa..122e42e29e7 100644
--- a/source/blender/makesrna/intern/rna_fcurve.c
+++ b/source/blender/makesrna/intern/rna_fcurve.c
@@ -482,12 +482,10 @@ static void rna_FModifier_active_update(Main *UNUSED(bmain), Scene *UNUSED(scene
FModifier *fm, *fmo = (FModifier*)ptr->data;
/* clear active state of other FModifiers in this list */
- for (fm = fmo->prev; fm; fm = fm->prev)
- {
+ for (fm = fmo->prev; fm; fm = fm->prev) {
fm->flag &= ~FMODIFIER_FLAG_ACTIVE;
}
- for (fm = fmo->next; fm; fm = fm->next)
- {
+ for (fm = fmo->next; fm; fm = fm->next) {
fm->flag &= ~FMODIFIER_FLAG_ACTIVE;
}
diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c
index a4aac6f345c..003b4ae4fbc 100644
--- a/source/blender/makesrna/intern/rna_fluidsim.c
+++ b/source/blender/makesrna/intern/rna_fluidsim.c
@@ -141,7 +141,7 @@ static void rna_FluidSettings_update_type(Main *bmain, Scene *scene, PointerRNA
psys->pointcache = BKE_ptcache_add(&psys->ptcaches);
psys->flag |= PSYS_ENABLED;
BLI_strncpy(psys->name, "FluidParticles", sizeof(psys->name));
- BLI_addtail(&ob->particlesystem,psys);
+ BLI_addtail(&ob->particlesystem, psys);
/* add modifier */
psmd = (ParticleSystemModifierData*)modifier_new(eModifierType_ParticleSystem);
diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c
index e5939296f5a..7052bfa8225 100644
--- a/source/blender/makesrna/intern/rna_image.c
+++ b/source/blender/makesrna/intern/rna_image.c
@@ -134,7 +134,7 @@ static void rna_ImageUser_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *
{
ImageUser *iuser = ptr->data;
- BKE_image_user_calc_frame(iuser, scene->r.cfra, 0);
+ BKE_image_user_frame_calc(iuser, scene->r.cfra, 0);
}
@@ -212,13 +212,13 @@ static int rna_Image_has_data_get(PointerRNA *ptr)
return 0;
}
-static void rna_Image_size_get(PointerRNA *ptr,int *values)
+static void rna_Image_size_get(PointerRNA *ptr, int *values)
{
Image *im = (Image*)ptr->data;
ImBuf *ibuf;
void *lock;
- ibuf = BKE_image_acquire_ibuf(im, NULL , &lock);
+ ibuf = BKE_image_acquire_ibuf(im, NULL, &lock);
if (ibuf) {
values[0] = ibuf->x;
values[1] = ibuf->y;
@@ -237,7 +237,7 @@ static void rna_Image_resolution_get(PointerRNA *ptr, float *values)
ImBuf *ibuf;
void *lock;
- ibuf = BKE_image_acquire_ibuf(im, NULL , &lock);
+ ibuf = BKE_image_acquire_ibuf(im, NULL, &lock);
if (ibuf) {
values[0] = ibuf->ppm[0];
values[1] = ibuf->ppm[1];
@@ -256,7 +256,7 @@ static void rna_Image_resolution_set(PointerRNA *ptr, const float *values)
ImBuf *ibuf;
void *lock;
- ibuf = BKE_image_acquire_ibuf(im, NULL , &lock);
+ ibuf = BKE_image_acquire_ibuf(im, NULL, &lock);
if (ibuf) {
ibuf->ppm[0] = values[0];
ibuf->ppm[1] = values[1];
@@ -616,13 +616,13 @@ static void rna_def_image(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Depth", "Image bit depth");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop = RNA_def_int_vector(srna, "size" , 2 , NULL , 0, 0, "Size" ,
- "Width and height in pixels, zero when image data cant be loaded" , 0 , 0);
- RNA_def_property_int_funcs(prop, "rna_Image_size_get" , NULL, NULL);
+ prop = RNA_def_int_vector(srna, "size", 2, NULL, 0, 0, "Size",
+ "Width and height in pixels, zero when image data cant be loaded", 0, 0);
+ RNA_def_property_int_funcs(prop, "rna_Image_size_get", NULL, NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop = RNA_def_float_vector(srna, "resolution" , 2 , NULL , 0, 0, "Resolution" , "X/Y pixels per meter" , 0 , 0);
- RNA_def_property_float_funcs(prop, "rna_Image_resolution_get" , "rna_Image_resolution_set", NULL);
+ prop = RNA_def_float_vector(srna, "resolution", 2, NULL, 0, 0, "Resolution", "X/Y pixels per meter", 0, 0);
+ RNA_def_property_float_funcs(prop, "rna_Image_resolution_get", "rna_Image_resolution_set", NULL);
prop = RNA_def_property(srna, "pixels", PROP_FLOAT, PROP_NONE);
RNA_def_property_flag(prop, PROP_DYNAMIC);
diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c
index 8594bda96d1..84321809ae9 100644
--- a/source/blender/makesrna/intern/rna_image_api.c
+++ b/source/blender/makesrna/intern/rna_image_api.c
@@ -1,5 +1,4 @@
/*
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -86,7 +85,7 @@ static void rna_Image_save_render(Image *image, bContext *C, ReportList *reports
const float dither_back = ibuf->dither;
ibuf->planes = scene->r.im_format.planes;
ibuf->dither = scene->r.dither_intensity;
- if (!BKE_write_ibuf(ibuf, path, &scene->r.im_format)) {
+ if (!BKE_imbuf_write(ibuf, path, &scene->r.im_format)) {
BKE_reportf(reports, RPT_ERROR, "Couldn't write image: %s", path);
}
ibuf->planes = imb_planes_back;
diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c
index 671bee80523..e1cb714c68d 100644
--- a/source/blender/makesrna/intern/rna_lamp.c
+++ b/source/blender/makesrna/intern/rna_lamp.c
@@ -86,6 +86,29 @@ static void rna_Lamp_active_texture_set(PointerRNA *ptr, PointerRNA value)
set_current_lamp_texture(la, value.data);
}
+static int rna_use_shadow_get(PointerRNA *ptr)
+{
+ Lamp *la = (Lamp*)ptr->data;
+
+ if(la->type == LA_SPOT)
+ return la->mode & LA_SHAD_BUF;
+ else
+ return la->mode & LA_SHAD_RAY;
+}
+
+static void rna_use_shadow_set(PointerRNA *ptr, int value)
+{
+ Lamp *la = (Lamp*)ptr->data;
+ if (value) {
+ if(la->type == LA_SPOT)
+ la->mode |= LA_SHAD_BUF;
+ else
+ la->mode |= LA_SHAD_RAY;
+ }
+ else
+ la->mode &= ~(LA_SHAD_BUF|LA_SHAD_RAY);
+}
+
static StructRNA* rna_Lamp_refine(struct PointerRNA *ptr)
{
Lamp *la = (Lamp*)ptr->data;
@@ -464,12 +487,135 @@ static void rna_def_lamp_shadow(StructRNA *srna, int spot, int area)
{LA_SAMP_CONSTANT, "CONSTANT_JITTERED", 0, "Constant Jittered", ""},
{0, NULL, 0, NULL, NULL}};
- prop = RNA_def_property(srna, "shadow_method", PROP_ENUM, PROP_NONE);
+ static EnumPropertyItem prop_shadbuftype_items[] = {
+ {LA_SHADBUF_REGULAR, "REGULAR", 0, "Classical", "Classic shadow buffer"},
+ {LA_SHADBUF_HALFWAY, "HALFWAY", 0, "Classic-Halfway",
+ "Regular buffer, averaging the closest and 2nd closest Z value to reducing "
+ "bias artifacts"},
+ {LA_SHADBUF_IRREGULAR, "IRREGULAR", 0, "Irregular",
+ "Irregular buffer produces sharp shadow always, but it doesn't show up for raytracing"},
+ {LA_SHADBUF_DEEP, "DEEP", 0, "Deep",
+ "Deep shadow buffer supports transparency and better filtering, at the cost of "
+ "more memory usage and processing time"},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem prop_shadbuffiltertype_items[] = {
+ {LA_SHADBUF_BOX, "BOX", 0, "Box", "Apply the Box filter to shadow buffer samples"},
+ {LA_SHADBUF_TENT, "TENT", 0, "Tent", "Apply the Tent Filter to shadow buffer samples"},
+ {LA_SHADBUF_GAUSS, "GAUSS", 0, "Gauss", "Apply the Gauss filter to shadow buffer samples"},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem prop_numbuffer_items[] = {
+ {1, "BUFFERS_1", 0, "1", "Only one buffer rendered"},
+ {4, "BUFFERS_4", 0, "4", "Render 4 buffers for better AA, this quadruples memory usage"},
+ {9, "BUFFERS_9", 0, "9", "Render 9 buffers for better AA, this uses nine times more memory"},
+ {0, NULL, 0, NULL, NULL}};
+
+ /* GE only */
+ static EnumPropertyItem prop_ge_shadowbuffer_type_items[] = {
+ {LA_SHADMAP_SIMPLE, "SIMPLE", 0, "Simple", "Simple shadow maps"},
+ {LA_SHADMAP_VARIANCE, "VARIANCE", 0, "Variance", "Variance shadow maps"},
+ {0, NULL, 0, NULL, NULL}};
+
+ prop= RNA_def_property(srna, "use_shadow", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_funcs(prop, "rna_use_shadow_get", "rna_use_shadow_set");
+ RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
+
+ prop= RNA_def_property(srna, "shadow_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, (spot)? prop_spot_shadow_items: prop_shadow_items);
- RNA_def_property_ui_text(prop, "Shadow Method", "Method to compute lamp shadow with");
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
+
+ prop = RNA_def_property(srna, "shadow_buffer_size", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "bufsize");
+ RNA_def_property_range(prop, 512, 10240);
+ RNA_def_property_ui_text(prop, "Shadow Buffer Size",
+ "Resolution of the shadow buffer, higher values give crisper shadows "
+ "but use more memory");
+ RNA_def_property_int_funcs(prop, NULL, "rna_Lamp_buffer_size_set", NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
+
+ prop = RNA_def_property(srna, "shadow_filter_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "filtertype");
+ RNA_def_property_enum_items(prop, prop_shadbuffiltertype_items);
+ RNA_def_property_ui_text(prop, "Shadow Filter Type", "Type of shadow filter (Buffer Shadows)");
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
+
+ prop = RNA_def_property(srna, "shadow_sample_buffers", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "buffers");
+ RNA_def_property_enum_items(prop, prop_numbuffer_items);
+ RNA_def_property_ui_text(prop, "Shadow Sample Buffers",
+ "Number of shadow buffers to render for better AA, this increases memory usage");
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
+
+ prop = RNA_def_property(srna, "shadow_buffer_clip_start", PROP_FLOAT, PROP_DISTANCE);
+ RNA_def_property_float_sdna(prop, NULL, "clipsta");
+ RNA_def_property_range(prop, 0.0f, 9999.0f);
+ RNA_def_property_ui_text(prop, "Shadow Buffer Clip Start",
+ "Shadow map clip start, below which objects will not generate shadows");
+ RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
+
+ prop= RNA_def_property(srna, "shadow_buffer_clip_end", PROP_FLOAT, PROP_DISTANCE);
+ RNA_def_property_float_sdna(prop, NULL, "clipend");
+ RNA_def_property_range(prop, 0.0f, 9999.0f);
+ RNA_def_property_ui_text(prop, "Shadow Buffer Clip End",
+ "Shadow map clip end, beyond which objects will not generate shadows");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
+ prop = RNA_def_property(srna, "shadow_buffer_bias", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "bias");
+ RNA_def_property_range(prop, 0.001f, 5.0f);
+ RNA_def_property_ui_text(prop, "Shadow Buffer Bias", "Shadow buffer sampling bias");
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
+
+ prop = RNA_def_property(srna, "shadow_buffer_bleed_bias", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "bleedbias");
+ RNA_def_property_range(prop, 0.f, 1.f);
+ RNA_def_property_ui_text(prop, "Shadow Buffer Bleed Bias", "Bias for reducing light-bleed on variance shadow maps");
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
+
+ prop = RNA_def_property(srna, "shadow_buffer_soft", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "soft");
+ RNA_def_property_range(prop, 0.0f, 100.0f);
+ RNA_def_property_ui_text(prop, "Shadow Buffer Soft", "Size of shadow buffer sampling area");
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
+
+ prop = RNA_def_property(srna, "shadow_buffer_samples", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "samp");
+ RNA_def_property_range(prop, 1, 16);
+ RNA_def_property_ui_text(prop, "Samples", "Number of shadow buffer samples");
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
+
+ prop = RNA_def_property(srna, "shadow_buffer_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "buftype");
+ RNA_def_property_enum_items(prop, prop_shadbuftype_items);
+ RNA_def_property_ui_text(prop, "Shadow Buffer Type", "Type of shadow buffer");
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
+
+ prop = RNA_def_property(srna, "ge_shadow_buffer_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "shadowmap_type");
+ RNA_def_property_enum_items(prop, prop_ge_shadowbuffer_type_items);
+ RNA_def_property_ui_text(prop, "Shadow Map Type", "The shadow mapping algorithm used");
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
+
+
+ prop = RNA_def_property(srna, "use_auto_clip_start", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "bufflag", LA_SHADBUF_AUTO_START);
+ RNA_def_property_ui_text(prop, "Autoclip Start",
+ "Automatic calculation of clipping-start, based on visible vertices");
+ RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
+
+ prop = RNA_def_property(srna, "use_auto_clip_end", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "bufflag", LA_SHADBUF_AUTO_END);
+ RNA_def_property_ui_text(prop, "Autoclip End", "Automatic calculation of clipping-end, based on visible vertices");
+ RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
+
+ prop = RNA_def_property(srna, "compression_threshold", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "compressthresh");
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_text(prop, "Compress", "Deep shadow map compression threshold");
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
+
prop = RNA_def_property(srna, "shadow_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shdwr");
RNA_def_property_array(prop, 3);
@@ -599,20 +745,8 @@ static void rna_def_spot_lamp(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_shadbuftype_items[] = {
- {LA_SHADBUF_REGULAR , "REGULAR", 0, "Classical", "Classic shadow buffer"},
- {LA_SHADBUF_HALFWAY, "HALFWAY", 0, "Classic-Halfway",
- "Regular buffer, averaging the closest and 2nd closest Z value to reducing "
- "bias artifacts"},
- {LA_SHADBUF_IRREGULAR, "IRREGULAR", 0, "Irregular",
- "Irregular buffer produces sharp shadow always, but it doesn't show up for raytracing"},
- {LA_SHADBUF_DEEP, "DEEP", 0, "Deep",
- "Deep shadow buffer supports transparency and better filtering, at the cost of "
- "more memory usage and processing time"},
- {0, NULL, 0, NULL, NULL}};
-
static EnumPropertyItem prop_shadbuffiltertype_items[] = {
- {LA_SHADBUF_BOX , "BOX", 0, "Box", "Apply the Box filter to shadow buffer samples"},
+ {LA_SHADBUF_BOX, "BOX", 0, "Box", "Apply the Box filter to shadow buffer samples"},
{LA_SHADBUF_TENT, "TENT", 0, "Tent", "Apply the Tent Filter to shadow buffer samples"},
{LA_SHADBUF_GAUSS, "GAUSS", 0, "Gauss", "Apply the Gauss filter to shadow buffer samples"},
{0, NULL, 0, NULL, NULL}};
@@ -653,31 +787,9 @@ static void rna_def_spot_lamp(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Halo Step", "Volumetric halo sampling frequency");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
- prop = RNA_def_property(srna, "shadow_buffer_size", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "bufsize");
- RNA_def_property_range(prop, 512, 10240);
- RNA_def_property_ui_text(prop, "Shadow Buffer Size",
- "Resolution of the shadow buffer, higher values give crisper shadows "
- "but use more memory");
- RNA_def_property_int_funcs(prop, NULL, "rna_Lamp_buffer_size_set", NULL);
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
- prop = RNA_def_property(srna, "shadow_filter_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "filtertype");
- RNA_def_property_enum_items(prop, prop_shadbuffiltertype_items);
- RNA_def_property_ui_text(prop, "Shadow Filter Type", "Type of shadow filter (Buffer Shadows)");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
- prop = RNA_def_property(srna, "shadow_sample_buffers", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "buffers");
- RNA_def_property_enum_items(prop, prop_numbuffer_items);
- RNA_def_property_ui_text(prop, "Shadow Sample Buffers",
- "Number of shadow buffers to render for better AA, this increases memory usage");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
prop = RNA_def_property(srna, "spot_blend", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "spotblend");
- RNA_def_property_range(prop, 0.0f ,1.0f);
+ RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Spot Blend", "The softness of the spotlight edge");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
@@ -694,61 +806,6 @@ static void rna_def_spot_lamp(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Show Cone",
"Draw transparent cone in 3D view to visualize which objects are contained in it");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
-
- prop = RNA_def_property(srna, "shadow_buffer_clip_start", PROP_FLOAT, PROP_DISTANCE);
- RNA_def_property_float_sdna(prop, NULL, "clipsta");
- RNA_def_property_range(prop, 0.0f, 9999.0f);
- RNA_def_property_ui_text(prop, "Shadow Buffer Clip Start",
- "Shadow map clip start, below which objects will not generate shadows");
- RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
-
- prop = RNA_def_property(srna, "shadow_buffer_clip_end", PROP_FLOAT, PROP_DISTANCE);
- RNA_def_property_float_sdna(prop, NULL, "clipend");
- RNA_def_property_range(prop, 0.0f, 9999.0f);
- RNA_def_property_ui_text(prop, "Shadow Buffer Clip End",
- "Shadow map clip end, beyond which objects will not generate shadows");
- RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
-
- prop = RNA_def_property(srna, "shadow_buffer_bias", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "bias");
- RNA_def_property_range(prop, 0.001f, 5.0f);
- RNA_def_property_ui_text(prop, "Shadow Buffer Bias", "Shadow buffer sampling bias");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
- prop = RNA_def_property(srna, "shadow_buffer_soft", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "soft");
- RNA_def_property_range(prop, 0.0f, 100.0f);
- RNA_def_property_ui_text(prop, "Shadow Buffer Soft", "Size of shadow buffer sampling area");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
- prop = RNA_def_property(srna, "shadow_buffer_samples", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "samp");
- RNA_def_property_range(prop, 1, 16);
- RNA_def_property_ui_text(prop, "Samples", "Number of shadow buffer samples");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
- prop = RNA_def_property(srna, "shadow_buffer_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "buftype");
- RNA_def_property_enum_items(prop, prop_shadbuftype_items);
- RNA_def_property_ui_text(prop, "Shadow Buffer Type", "Type of shadow buffer");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
- prop = RNA_def_property(srna, "use_auto_clip_start", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "bufflag", LA_SHADBUF_AUTO_START);
- RNA_def_property_ui_text(prop, "Autoclip Start",
- "Automatic calculation of clipping-start, based on visible vertices");
- RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
-
- prop = RNA_def_property(srna, "use_auto_clip_end", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "bufflag", LA_SHADBUF_AUTO_END);
- RNA_def_property_ui_text(prop, "Autoclip End", "Automatic calculation of clipping-end, based on visible vertices");
- RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
-
- prop = RNA_def_property(srna, "compression_threshold", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "compressthresh");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Compress", "Deep shadow map compression threshold");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
}
static void rna_def_sun_lamp(BlenderRNA *brna)
@@ -771,6 +828,13 @@ static void rna_def_sun_lamp(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Sky Settings", "Sky related settings for sun lamps");
rna_def_lamp_sky_settings(brna);
+
+ /* BGE Only */
+ prop= RNA_def_property(srna, "shadow_frustum_size", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "shadow_frustum_size");
+ RNA_def_property_ui_range(prop, 0.001, 100.0, 2, 1);
+ RNA_def_property_ui_text(prop, "Frustum Size", "Size of the frustum used for creating the shadow map");
+ RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
}
static void rna_def_hemi_lamp(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_lattice.c b/source/blender/makesrna/intern/rna_lattice.c
index 5d8d8c7bd02..d919406a14d 100644
--- a/source/blender/makesrna/intern/rna_lattice.c
+++ b/source/blender/makesrna/intern/rna_lattice.c
@@ -109,21 +109,21 @@ static void rna_Lattice_update_size(Main *bmain, Scene *scene, PointerRNA *ptr)
newv = (lt->opntsv > 0)? lt->opntsv: lt->pntsv;
neww = (lt->opntsw > 0)? lt->opntsw: lt->pntsw;
- /* resizelattice needs an object, any object will have the same result */
+ /* BKE_lattice_resize needs an object, any object will have the same result */
for (ob = bmain->object.first; ob; ob = ob->id.next) {
if (ob->data == lt) {
- resizelattice(lt, newu, newv, neww, ob);
+ BKE_lattice_resize(lt, newu, newv, neww, ob);
if (lt->editlatt)
- resizelattice(lt->editlatt->latt, newu, newv, neww, ob);
+ BKE_lattice_resize(lt->editlatt->latt, newu, newv, neww, ob);
break;
}
}
/* otherwise without, means old points are not repositioned */
if (!ob) {
- resizelattice(lt, newu, newv, neww, NULL);
+ BKE_lattice_resize(lt, newu, newv, neww, NULL);
if (lt->editlatt)
- resizelattice(lt->editlatt->latt, newu, newv, neww, NULL);
+ BKE_lattice_resize(lt->editlatt->latt, newu, newv, neww, NULL);
}
rna_Lattice_update_data(bmain, scene, ptr);
diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c
index e616a632147..1a039295924 100644
--- a/source/blender/makesrna/intern/rna_main.c
+++ b/source/blender/makesrna/intern/rna_main.c
@@ -301,7 +301,7 @@ void RNA_def_main(BlenderRNA *brna)
RNA_def_main_window_managers},
{"images", "Image", "rna_Main_image_begin", "Images", "Image datablocks", RNA_def_main_images},
{"lattices", "Lattice", "rna_Main_latt_begin", "Lattices", "Lattice datablocks", RNA_def_main_lattices},
- {"curves", "Curve", "rna_Main_curve_begin", "Curves", "Curve datablocks", RNA_def_main_curves} ,
+ {"curves", "Curve", "rna_Main_curve_begin", "Curves", "Curve datablocks", RNA_def_main_curves},
{"metaballs", "MetaBall", "rna_Main_mball_begin", "Metaballs", "Metaball datablocks", RNA_def_main_metaballs},
{"fonts", "VectorFont", "rna_Main_font_begin", "Vector Fonts", "Vector font datablocks", RNA_def_main_fonts},
{"textures", "Texture", "rna_Main_tex_begin", "Textures", "Texture datablocks", RNA_def_main_textures},
@@ -347,8 +347,7 @@ void RNA_def_main(BlenderRNA *brna)
RNA_def_property_boolean_funcs(prop, "rna_Main_is_saved_get", NULL);
RNA_def_property_ui_text(prop, "File is Saved", "Has the current session been saved to disk as a .blend file");
- for (i = 0; lists[i].name; i++)
- {
+ for (i = 0; lists[i].name; i++) {
prop = RNA_def_property(srna, lists[i].identifier, PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, lists[i].type);
RNA_def_property_collection_funcs(prop, lists[i].iter_begin, "rna_iterator_listbase_next",
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c
index 10a45fbb94d..76cd8279beb 100644
--- a/source/blender/makesrna/intern/rna_main_api.c
+++ b/source/blender/makesrna/intern/rna_main_api.c
@@ -92,14 +92,14 @@
Camera *rna_Main_cameras_new(Main *UNUSED(bmain), const char *name)
{
- ID *id = add_camera(name);
+ ID *id = BKE_camera_add(name);
id_us_min(id);
return (Camera *)id;
}
void rna_Main_cameras_remove(Main *bmain, ReportList *reports, struct Camera *camera)
{
if (ID_REAL_USERS(camera) <= 0)
- free_libblock(&bmain->camera, camera);
+ BKE_libblock_free(&bmain->camera, camera);
else
BKE_reportf(reports, RPT_ERROR, "Camera \"%s\" must have zero users to be removed, found %d",
camera->id.name+2, ID_REAL_USERS(camera));
@@ -109,11 +109,11 @@ void rna_Main_cameras_remove(Main *bmain, ReportList *reports, struct Camera *ca
Scene *rna_Main_scenes_new(Main *UNUSED(bmain), const char *name)
{
- return add_scene(name);
+ return BKE_scene_add(name);
}
void rna_Main_scenes_remove(Main *bmain, bContext *C, ReportList *reports, struct Scene *scene)
{
- /* don't call free_libblock(...) directly */
+ /* don't call BKE_libblock_free(...) directly */
Scene *newscene;
if (scene->id.prev)
@@ -128,7 +128,7 @@ void rna_Main_scenes_remove(Main *bmain, bContext *C, ReportList *reports, struc
if (CTX_wm_screen(C)->scene == scene)
ED_screen_set_scene(C, CTX_wm_screen(C), newscene);
- unlink_scene(bmain, scene, newscene);
+ BKE_scene_unlink(bmain, scene, newscene);
}
Object *rna_Main_objects_new(Main *UNUSED(bmain), ReportList *reports, const char *name, ID *data)
@@ -141,7 +141,7 @@ Object *rna_Main_objects_new(Main *UNUSED(bmain), ReportList *reports, const cha
type = OB_MESH;
break;
case ID_CU:
- type = curve_type((struct Curve *)data);
+ type = BKE_curve_type_get((struct Curve *)data);
break;
case ID_MB:
type = OB_MBALL;
@@ -175,7 +175,7 @@ Object *rna_Main_objects_new(Main *UNUSED(bmain), ReportList *reports, const cha
id_us_plus(data);
}
- ob = add_only_object(type, name);
+ ob = BKE_object_add_only_object(type, name);
id_us_min(&ob->id);
ob->data = data;
@@ -187,8 +187,8 @@ Object *rna_Main_objects_new(Main *UNUSED(bmain), ReportList *reports, const cha
void rna_Main_objects_remove(Main *bmain, ReportList *reports, struct Object *object)
{
if (ID_REAL_USERS(object) <= 0) {
- unlink_object(object); /* needed or ID pointers to this are not cleared */
- free_libblock(&bmain->object, object);
+ BKE_object_unlink(object); /* needed or ID pointers to this are not cleared */
+ BKE_libblock_free(&bmain->object, object);
}
else {
BKE_reportf(reports, RPT_ERROR, "Object \"%s\" must have zero users to be removed, found %d",
@@ -198,14 +198,14 @@ void rna_Main_objects_remove(Main *bmain, ReportList *reports, struct Object *ob
struct Material *rna_Main_materials_new(Main *UNUSED(bmain), const char *name)
{
- ID *id = (ID *)add_material(name);
+ ID *id = (ID *)BKE_material_add(name);
id_us_min(id);
return (Material *)id;
}
void rna_Main_materials_remove(Main *bmain, ReportList *reports, struct Material *material)
{
if (ID_REAL_USERS(material) <= 0)
- free_libblock(&bmain->mat, material);
+ BKE_libblock_free(&bmain->mat, material);
else
BKE_reportf(reports, RPT_ERROR, "Material \"%s\" must have zero users to be removed, found %d",
material->id.name+2, ID_REAL_USERS(material));
@@ -223,7 +223,7 @@ struct bNodeTree *rna_Main_nodetree_new(Main *UNUSED(bmain), const char *name, i
void rna_Main_nodetree_remove(Main *bmain, ReportList *reports, struct bNodeTree *tree)
{
if (ID_REAL_USERS(tree) <= 0)
- free_libblock(&bmain->nodetree, tree);
+ BKE_libblock_free(&bmain->nodetree, tree);
else
BKE_reportf(reports, RPT_ERROR, "Node Tree \"%s\" must have zero users to be removed, found %d",
tree->id.name+2, ID_REAL_USERS(tree));
@@ -233,14 +233,14 @@ void rna_Main_nodetree_remove(Main *bmain, ReportList *reports, struct bNodeTree
Mesh *rna_Main_meshes_new(Main *UNUSED(bmain), const char *name)
{
- Mesh *me = add_mesh(name);
+ Mesh *me = BKE_mesh_add(name);
id_us_min(&me->id);
return me;
}
void rna_Main_meshes_remove(Main *bmain, ReportList *reports, Mesh *mesh)
{
if (ID_REAL_USERS(mesh) <= 0)
- free_libblock(&bmain->mesh, mesh);
+ BKE_libblock_free(&bmain->mesh, mesh);
else
BKE_reportf(reports, RPT_ERROR, "Mesh \"%s\" must have zero users to be removed, found %d",
mesh->id.name+2, ID_REAL_USERS(mesh));
@@ -250,7 +250,7 @@ void rna_Main_meshes_remove(Main *bmain, ReportList *reports, Mesh *mesh)
Lamp *rna_Main_lamps_new(Main *UNUSED(bmain), const char *name, int type)
{
- Lamp *lamp = add_lamp(name);
+ Lamp *lamp = BKE_lamp_add(name);
lamp->type = type;
id_us_min(&lamp->id);
return lamp;
@@ -258,7 +258,7 @@ Lamp *rna_Main_lamps_new(Main *UNUSED(bmain), const char *name, int type)
void rna_Main_lamps_remove(Main *bmain, ReportList *reports, Lamp *lamp)
{
if (ID_REAL_USERS(lamp) <= 0)
- free_libblock(&bmain->lamp, lamp);
+ BKE_libblock_free(&bmain->lamp, lamp);
else
BKE_reportf(reports, RPT_ERROR, "Lamp \"%s\" must have zero users to be removed, found %d",
lamp->id.name+2, ID_REAL_USERS(lamp));
@@ -269,7 +269,7 @@ void rna_Main_lamps_remove(Main *bmain, ReportList *reports, Lamp *lamp)
Image *rna_Main_images_new(Main *UNUSED(bmain), const char *name, int width, int height, int alpha, int float_buffer)
{
float color[4] = {0.0, 0.0, 0.0, 1.0};
- Image *image = BKE_add_image_size(width, height, name, alpha ? 32:24, float_buffer, 0, color);
+ Image *image = BKE_image_add_generated(width, height, name, alpha ? 32:24, float_buffer, 0, color);
id_us_min(&image->id);
return image;
}
@@ -278,7 +278,7 @@ Image *rna_Main_images_load(Main *UNUSED(bmain), ReportList *reports, const char
Image *ima;
errno = 0;
- ima = BKE_add_image_file(filepath);
+ ima = BKE_image_load(filepath);
if (!ima)
BKE_reportf(reports, RPT_ERROR, "Can't read: \"%s\", %s", filepath,
@@ -289,7 +289,7 @@ Image *rna_Main_images_load(Main *UNUSED(bmain), ReportList *reports, const char
void rna_Main_images_remove(Main *bmain, ReportList *reports, Image *image)
{
if (ID_REAL_USERS(image) <= 0)
- free_libblock(&bmain->image, image);
+ BKE_libblock_free(&bmain->image, image);
else
BKE_reportf(reports, RPT_ERROR, "Image \"%s\" must have zero users to be removed, found %d",
image->id.name+2, ID_REAL_USERS(image));
@@ -299,14 +299,14 @@ void rna_Main_images_remove(Main *bmain, ReportList *reports, Image *image)
Lattice *rna_Main_lattices_new(Main *UNUSED(bmain), const char *name)
{
- Lattice *lt = add_lattice(name);
+ Lattice *lt = BKE_lattice_add(name);
id_us_min(&lt->id);
return lt;
}
void rna_Main_lattices_remove(Main *bmain, ReportList *reports, struct Lattice *lt)
{
if (ID_REAL_USERS(lt) <= 0)
- free_libblock(&bmain->latt, lt);
+ BKE_libblock_free(&bmain->latt, lt);
else
BKE_reportf(reports, RPT_ERROR, "Lattice \"%s\" must have zero users to be removed, found %d",
lt->id.name+2, ID_REAL_USERS(lt));
@@ -314,14 +314,14 @@ void rna_Main_lattices_remove(Main *bmain, ReportList *reports, struct Lattice *
Curve *rna_Main_curves_new(Main *UNUSED(bmain), const char *name, int type)
{
- Curve *cu = add_curve(name, type);
+ Curve *cu = BKE_curve_add(name, type);
id_us_min(&cu->id);
return cu;
}
void rna_Main_curves_remove(Main *bmain, ReportList *reports, struct Curve *cu)
{
if (ID_REAL_USERS(cu) <= 0)
- free_libblock(&bmain->curve, cu);
+ BKE_libblock_free(&bmain->curve, cu);
else
BKE_reportf(reports, RPT_ERROR, "Curve \"%s\" must have zero users to be removed, found %d",
cu->id.name+2, ID_REAL_USERS(cu));
@@ -329,14 +329,14 @@ void rna_Main_curves_remove(Main *bmain, ReportList *reports, struct Curve *cu)
MetaBall *rna_Main_metaballs_new(Main *UNUSED(bmain), const char *name)
{
- MetaBall *mb = add_mball(name);
+ MetaBall *mb = BKE_mball_add(name);
id_us_min(&mb->id);
return mb;
}
void rna_Main_metaballs_remove(Main *bmain, ReportList *reports, struct MetaBall *mb)
{
if (ID_REAL_USERS(mb) <= 0)
- free_libblock(&bmain->mball, mb);
+ BKE_libblock_free(&bmain->mball, mb);
else
BKE_reportf(reports, RPT_ERROR, "Metaball \"%s\" must have zero users to be removed, found %d",
mb->id.name+2, ID_REAL_USERS(mb));
@@ -347,7 +347,7 @@ VFont *rna_Main_fonts_load(Main *bmain, ReportList *reports, const char *filepat
VFont *font;
errno = 0;
- font = load_vfont(bmain, filepath);
+ font = BKE_vfont_load(bmain, filepath);
if (!font)
BKE_reportf(reports, RPT_ERROR, "Can't read: \"%s\", %s", filepath,
@@ -359,7 +359,7 @@ VFont *rna_Main_fonts_load(Main *bmain, ReportList *reports, const char *filepat
void rna_Main_fonts_remove(Main *bmain, ReportList *reports, VFont *vfont)
{
if (ID_REAL_USERS(vfont) <= 0)
- free_libblock(&bmain->vfont, vfont);
+ BKE_libblock_free(&bmain->vfont, vfont);
else
BKE_reportf(reports, RPT_ERROR, "Font \"%s\" must have zero users to be removed, found %d",
vfont->id.name+2, ID_REAL_USERS(vfont));
@@ -377,7 +377,7 @@ Tex *rna_Main_textures_new(Main *UNUSED(bmain), const char *name, int type)
void rna_Main_textures_remove(Main *bmain, ReportList *reports, struct Tex *tex)
{
if (ID_REAL_USERS(tex) <= 0)
- free_libblock(&bmain->tex, tex);
+ BKE_libblock_free(&bmain->tex, tex);
else
BKE_reportf(reports, RPT_ERROR, "Texture \"%s\" must have zero users to be removed, found %d",
tex->id.name+2, ID_REAL_USERS(tex));
@@ -385,14 +385,14 @@ void rna_Main_textures_remove(Main *bmain, ReportList *reports, struct Tex *tex)
Brush *rna_Main_brushes_new(Main *UNUSED(bmain), const char *name)
{
- Brush *brush = add_brush(name);
+ Brush *brush = BKE_brush_add(name);
id_us_min(&brush->id);
return brush;
}
void rna_Main_brushes_remove(Main *bmain, ReportList *reports, struct Brush *brush)
{
if (ID_REAL_USERS(brush) <= 0)
- free_libblock(&bmain->brush, brush);
+ BKE_libblock_free(&bmain->brush, brush);
else
BKE_reportf(reports, RPT_ERROR, "Brush \"%s\" must have zero users to be removed, found %d",
brush->id.name+2, ID_REAL_USERS(brush));
@@ -407,7 +407,7 @@ World *rna_Main_worlds_new(Main *UNUSED(bmain), const char *name)
void rna_Main_worlds_remove(Main *bmain, ReportList *reports, struct World *world)
{
if (ID_REAL_USERS(world) <= 0)
- free_libblock(&bmain->world, world);
+ BKE_libblock_free(&bmain->world, world);
else
BKE_reportf(reports, RPT_ERROR, "World \"%s\" must have zero users to be removed, found %d",
world->id.name+2, ID_REAL_USERS(world));
@@ -419,21 +419,21 @@ Group *rna_Main_groups_new(Main *UNUSED(bmain), const char *name)
}
void rna_Main_groups_remove(Main *bmain, Group *group)
{
- unlink_group(group);
- free_libblock(&bmain->group, group);
+ BKE_group_unlink(group);
+ BKE_libblock_free(&bmain->group, group);
/* XXX python now has invalid pointer? */
}
Speaker *rna_Main_speakers_new(Main *UNUSED(bmain), const char *name)
{
- Speaker *speaker = add_speaker(name);
+ Speaker *speaker = BKE_speaker_add(name);
id_us_min(&speaker->id);
return speaker;
}
void rna_Main_speakers_remove(Main *bmain, ReportList *reports, Speaker *speaker)
{
if (ID_REAL_USERS(speaker) <= 0)
- free_libblock(&bmain->speaker, speaker);
+ BKE_libblock_free(&bmain->speaker, speaker);
else
BKE_reportf(reports, RPT_ERROR, "Speaker \"%s\" must have zero users to be removed, found %d",
speaker->id.name+2, ID_REAL_USERS(speaker));
@@ -443,12 +443,12 @@ void rna_Main_speakers_remove(Main *bmain, ReportList *reports, Speaker *speaker
Text *rna_Main_texts_new(Main *UNUSED(bmain), const char *name)
{
- return add_empty_text(name);
+ return BKE_text_add(name);
}
void rna_Main_texts_remove(Main *bmain, Text *text)
{
- unlink_text(bmain, text);
- free_libblock(&bmain->text, text);
+ BKE_text_unlink(bmain, text);
+ BKE_libblock_free(&bmain->text, text);
/* XXX python now has invalid pointer? */
}
@@ -457,7 +457,7 @@ Text *rna_Main_texts_load(Main *bmain, ReportList *reports, const char *filepath
Text *txt;
errno = 0;
- txt = add_text(filepath, bmain->name);
+ txt = BKE_text_load(filepath, bmain->name);
if (!txt)
BKE_reportf(reports, RPT_ERROR, "Can't read: \"%s\", %s", filepath,
@@ -468,14 +468,14 @@ Text *rna_Main_texts_load(Main *bmain, ReportList *reports, const char *filepath
bArmature *rna_Main_armatures_new(Main *UNUSED(bmain), const char *name)
{
- bArmature *arm = add_armature(name);
+ bArmature *arm = BKE_armature_add(name);
id_us_min(&arm->id);
return arm;
}
void rna_Main_armatures_remove(Main *bmain, ReportList *reports, bArmature *arm)
{
if (ID_REAL_USERS(arm) <= 0)
- free_libblock(&bmain->armature, arm);
+ BKE_libblock_free(&bmain->armature, arm);
else
BKE_reportf(reports, RPT_ERROR, "Armature \"%s\" must have zero users to be removed, found %d",
arm->id.name+2, ID_REAL_USERS(arm));
@@ -493,7 +493,7 @@ bAction *rna_Main_actions_new(Main *UNUSED(bmain), const char *name)
void rna_Main_actions_remove(Main *bmain, ReportList *reports, bAction *act)
{
if (ID_REAL_USERS(act) <= 0)
- free_libblock(&bmain->action, act);
+ BKE_libblock_free(&bmain->action, act);
else
BKE_reportf(reports, RPT_ERROR, "Action \"%s\" must have zero users to be removed, found %d",
act->id.name+2, ID_REAL_USERS(act));
@@ -510,7 +510,7 @@ ParticleSettings *rna_Main_particles_new(Main *bmain, const char *name)
void rna_Main_particles_remove(Main *bmain, ReportList *reports, ParticleSettings *part)
{
if (ID_REAL_USERS(part) <= 0)
- free_libblock(&bmain->particle, part);
+ BKE_libblock_free(&bmain->particle, part);
else
BKE_reportf(reports, RPT_ERROR, "Particle Settings \"%s\" must have zero users to be removed, found %d",
part->id.name+2, ID_REAL_USERS(part));
@@ -523,7 +523,7 @@ MovieClip *rna_Main_movieclip_load(Main *UNUSED(bmain), ReportList *reports, con
MovieClip *clip;
errno = 0;
- clip = BKE_add_movieclip_file(filepath);
+ clip = BKE_movieclip_file_add(filepath);
if (!clip)
BKE_reportf(reports, RPT_ERROR, "Can't read: \"%s\", %s.", filepath,
@@ -534,8 +534,8 @@ MovieClip *rna_Main_movieclip_load(Main *UNUSED(bmain), ReportList *reports, con
void rna_Main_movieclips_remove(Main *bmain, MovieClip *clip)
{
- unlink_movieclip(bmain, clip);
- free_libblock(&bmain->movieclip, clip);
+ BKE_movieclip_unlink(bmain, clip);
+ BKE_libblock_free(&bmain->movieclip, clip);
/* XXX python now has invalid pointer? */
}
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index 7802241a25b..8aabc515dcb 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -766,7 +766,7 @@ static void rna_def_material_gamesettings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_face_orientation_items[] = {
- {GEMAT_NORMAL,"NORMAL",0,"Normal","No tranformation"},
+ {GEMAT_NORMAL, "NORMAL", 0, "Normal", "No tranformation"},
{GEMAT_HALO, "HALO", 0, "Halo", "Screen aligned billboard"},
{GEMAT_BILLBOARD, "BILLBOARD", 0, "Billboard", "Billboard with Z-axis constraint"},
{GEMAT_SHADOW, "SHADOW", 0, "Shadow", "Faces are used for shadow"},
@@ -1244,7 +1244,7 @@ static void rna_def_material_volume(BlenderRNA *brna)
prop = RNA_def_property(srna, "scattering", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "scattering");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1 ,3);
+ RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
RNA_def_property_ui_text(prop, "Scattering",
"Amount of light that gets scattered out by the volume - "
"the more out-scattering, the shallower the light will penetrate");
@@ -1267,7 +1267,7 @@ static void rna_def_material_volume(BlenderRNA *brna)
prop = RNA_def_property(srna, "reflection", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "reflection");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_ui_range(prop, 0.0f, 100.0f, 1 ,3);
+ RNA_def_property_ui_range(prop, 0.0f, 100.0f, 1, 3);
RNA_def_property_ui_text(prop, "Reflection",
"Multiplier to make out-scattered light brighter or darker (non-physically correct)");
RNA_def_property_update(prop, 0, "rna_Material_update");
diff --git a/source/blender/makesrna/intern/rna_material_api.c b/source/blender/makesrna/intern/rna_material_api.c
index e6118f6c527..538a4c99df4 100644
--- a/source/blender/makesrna/intern/rna_material_api.c
+++ b/source/blender/makesrna/intern/rna_material_api.c
@@ -1,6 +1,4 @@
/*
- *
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -30,7 +28,6 @@
* \ingroup RNA
*/
-
#include <stdlib.h>
#include <stdio.h>
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index 0ecfa311913..733e14857fd 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -222,7 +222,7 @@ static float rna_MeshPolygon_area_get(PointerRNA *ptr)
Mesh *me = (Mesh*)ptr->id.data;
MPoly *mp = (MPoly*)ptr->data;
- return mesh_calc_poly_area(mp, me->mloop+mp->loopstart, me->mvert, NULL);
+ return BKE_mesh_calc_poly_area(mp, me->mloop+mp->loopstart, me->mvert, NULL);
}
static void rna_MeshTessFace_normal_get(PointerRNA *ptr, float *values)
@@ -452,6 +452,26 @@ static int rna_Mesh_texspace_editable(PointerRNA *ptr)
return (me->texflag & ME_AUTOSPACE)? 0: PROP_EDITABLE;
}
+static void rna_Mesh_texspace_size_get(PointerRNA *ptr, float values[3])
+{
+ Mesh *me= (Mesh*)ptr->data;
+
+ if(!me->bb)
+ BKE_mesh_texspace_calc(me);
+
+ copy_v3_v3(values, me->size);
+}
+
+static void rna_Mesh_texspace_loc_get(PointerRNA *ptr, float values[3])
+{
+ Mesh *me= (Mesh*)ptr->data;
+
+ if(!me->bb)
+ BKE_mesh_texspace_calc(me);
+
+ copy_v3_v3(values, me->loc);
+}
+
static void rna_MeshVertex_groups_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
Mesh *me = rna_mesh(ptr);
@@ -2066,12 +2086,14 @@ void rna_def_texmat_common(StructRNA *srna, const char *texspace_editable)
prop = RNA_def_property(srna, "texspace_location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "loc");
RNA_def_property_ui_text(prop, "Texure Space Location", "Texture space location");
+ RNA_def_property_float_funcs(prop, "rna_Mesh_texspace_loc_get", NULL, NULL);
RNA_def_property_editable_func(prop, texspace_editable);
RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
prop = RNA_def_property(srna, "texspace_size", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_ui_text(prop, "Texture Space Size", "Texture space size");
+ RNA_def_property_float_funcs(prop, "rna_Mesh_texspace_size_get", NULL, NULL);
RNA_def_property_editable_func(prop, texspace_editable);
RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
diff --git a/source/blender/makesrna/intern/rna_mesh_api.c b/source/blender/makesrna/intern/rna_mesh_api.c
index 41b232fdf8b..c0a9d19360d 100644
--- a/source/blender/makesrna/intern/rna_mesh_api.c
+++ b/source/blender/makesrna/intern/rna_mesh_api.c
@@ -42,7 +42,7 @@
#ifdef RNA_RUNTIME
const char *rna_Mesh_unit_test_compare(struct Mesh *mesh, bContext *C, struct Mesh *mesh2)
{
- const char *ret = mesh_cmp(mesh, mesh2, FLT_EPSILON*60);
+ const char *ret = BKE_mesh_cmp(mesh, mesh2, FLT_EPSILON*60);
if (!ret)
ret = "Same";
diff --git a/source/blender/makesrna/intern/rna_meta.c b/source/blender/makesrna/intern/rna_meta.c
index e8ea19a5c5b..eda38a43d54 100644
--- a/source/blender/makesrna/intern/rna_meta.c
+++ b/source/blender/makesrna/intern/rna_meta.c
@@ -99,7 +99,7 @@ static void rna_MetaBall_update_data(Main *bmain, Scene *scene, PointerRNA *ptr)
if (mb->id.us > 0) {
for (ob = bmain->object.first; ob; ob = ob->id.next)
if (ob->data == mb)
- copy_mball_properties(scene, ob);
+ BKE_mball_properties_copy(scene, ob);
DAG_id_tag_update(&mb->id, 0);
WM_main_add_notifier(NC_GEOM|ND_DATA, mb);
@@ -115,7 +115,7 @@ static void rna_MetaBall_update_rotation(Main *bmain, Scene *scene, PointerRNA *
static MetaElem *rna_MetaBall_elements_new(MetaBall *mb, int type)
{
- MetaElem *ml = add_metaball_element(mb, type);
+ MetaElem *ml = BKE_mball_element_add(mb, type);
/* cheating way for importers to avoid slow updates */
if (mb->id.us > 0) {
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index ca1b3a86087..4f045788561 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -282,6 +282,7 @@ static void rna_Smoke_set_type(Main *bmain, Scene *scene, PointerRNA *ptr)
part->sta = 1.0f;
part->end = 250.0f;
part->ren_as = PART_DRAW_NOT;
+ part->flag |= PART_UNBORN;
part->draw_as = PART_DRAW_DOT;
BLI_strncpy(psys->name, "SmokeParticles", sizeof(psys->name));
psys->recalc |= (PSYS_RECALC_RESET|PSYS_RECALC_PHYS);
@@ -1444,7 +1445,7 @@ static void rna_def_modifier_array(BlenderRNA *brna)
/* Offset parameters */
prop = RNA_def_property(srna, "use_constant_offset", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "offset_type", MOD_ARR_OFF_CONST);
- RNA_def_property_ui_text(prop, "Constant Offset", "Add a constant offset");;
+ RNA_def_property_ui_text(prop, "Constant Offset", "Add a constant offset");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop = RNA_def_property(srna, "constant_offset_displace", PROP_FLOAT, PROP_TRANSLATION);
@@ -3162,7 +3163,7 @@ void RNA_def_modifier(BlenderRNA *brna)
/* data */
srna = RNA_def_struct(brna, "Modifier", NULL);
- RNA_def_struct_ui_text(srna , "Modifier", "Modifier affecting the geometry data of an object");
+ RNA_def_struct_ui_text(srna, "Modifier", "Modifier affecting the geometry data of an object");
RNA_def_struct_refine_func(srna, "rna_Modifier_refine");
RNA_def_struct_path_func(srna, "rna_Modifier_path");
RNA_def_struct_sdna(srna, "ModifierData");
diff --git a/source/blender/makesrna/intern/rna_movieclip.c b/source/blender/makesrna/intern/rna_movieclip.c
index ca06793cd49..96da24b3392 100644
--- a/source/blender/makesrna/intern/rna_movieclip.c
+++ b/source/blender/makesrna/intern/rna_movieclip.c
@@ -248,9 +248,9 @@ static void rna_def_movieclip(BlenderRNA *brna)
"Use a preview proxy and/or timecode index for this clip");
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
- prop = RNA_def_int_vector(srna, "size" , 2 , NULL , 0, 0, "Size",
- "Width and height in pixels, zero when image data cant be loaded" , 0 , 0);
- RNA_def_property_int_funcs(prop, "rna_MovieClip_size_get" , NULL, NULL);
+ prop = RNA_def_int_vector(srna, "size", 2, NULL, 0, 0, "Size",
+ "Width and height in pixels, zero when image data cant be loaded", 0, 0);
+ RNA_def_property_int_funcs(prop, "rna_MovieClip_size_get", NULL, NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "display_aspect", PROP_FLOAT, PROP_XYZ);
diff --git a/source/blender/makesrna/intern/rna_nla.c b/source/blender/makesrna/intern/rna_nla.c
index 8d262c58f9b..7ad13b8a6d1 100644
--- a/source/blender/makesrna/intern/rna_nla.c
+++ b/source/blender/makesrna/intern/rna_nla.c
@@ -459,7 +459,7 @@ static void rna_def_nlastrip(BlenderRNA *brna)
prop = RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "act");
RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Action_id_poll");
- RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_REFCOUNT);
RNA_def_property_editable_func(prop, "rna_NlaStrip_action_editable");
RNA_def_property_ui_text(prop, "Action", "Action referenced by this strip");
RNA_def_property_update(prop, NC_ANIMATION|ND_NLA, NULL); /* this will do? */
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index a101bcaec12..3d2737f9ff4 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -245,28 +245,22 @@ static StructRNA *rna_NodeSocket_refine(PointerRNA *ptr)
return &RNA_NodeSocket##stypename##idname; \
}
- switch (sock->struct_type) {
- case SOCK_STRUCT_NONE:
- switch (sock->type) {
- case SOCK_FLOAT:
- NODE_DEFINE_SUBTYPES_FLOAT
- break;
- case SOCK_INT:
- NODE_DEFINE_SUBTYPES_INT
- break;
- case SOCK_BOOLEAN:
- return &RNA_NodeSocketBoolean;
- case SOCK_VECTOR:
- NODE_DEFINE_SUBTYPES_VECTOR
- break;
- case SOCK_RGBA:
- return &RNA_NodeSocketRGBA;
- case SOCK_SHADER:
- return &RNA_NodeSocketShader;
- }
- break;
- case SOCK_STRUCT_OUTPUT_FILE:
- return &RNA_NodeImageFileSocket;
+ switch (sock->type) {
+ case SOCK_FLOAT:
+ NODE_DEFINE_SUBTYPES_FLOAT
+ break;
+ case SOCK_INT:
+ NODE_DEFINE_SUBTYPES_INT
+ break;
+ case SOCK_BOOLEAN:
+ return &RNA_NodeSocketBoolean;
+ case SOCK_VECTOR:
+ NODE_DEFINE_SUBTYPES_VECTOR
+ break;
+ case SOCK_RGBA:
+ return &RNA_NodeSocketRGBA;
+ case SOCK_SHADER:
+ return &RNA_NodeSocketShader;
}
#undef SUBTYPE
@@ -328,6 +322,39 @@ static void rna_Matte_t2_set(PointerRNA *ptr, float value)
chroma->t2 = value;
}
+static void rna_distance_matte_t1_set(PointerRNA *ptr, float value)
+{
+ bNode *node = (bNode*)ptr->data;
+ NodeChroma *chroma = node->storage;
+
+ chroma->t1 = value;
+}
+
+static void rna_distance_matte_t2_set(PointerRNA *ptr, float value)
+{
+ bNode *node = (bNode*)ptr->data;
+ NodeChroma *chroma = node->storage;
+
+ chroma->t2 = value;
+}
+
+static void rna_difference_matte_t1_set(PointerRNA *ptr, float value)
+{
+ bNode *node = (bNode*)ptr->data;
+ NodeChroma *chroma = node->storage;
+
+ chroma->t1 = value;
+}
+
+static void rna_difference_matte_t2_set(PointerRNA *ptr, float value)
+{
+ bNode *node = (bNode*)ptr->data;
+ NodeChroma *chroma = node->storage;
+
+ chroma->t2 = value;
+}
+
+
static void rna_Node_scene_set(PointerRNA *ptr, PointerRNA value)
{
bNode *node = (bNode*)ptr->data;
@@ -709,7 +736,8 @@ static bNodeLink *rna_NodeTree_link_new(bNodeTree *ntree, ReportList *reports,
ret = nodeAddLink(ntree, fromnode, fromsock, tonode, tosock);
if (ret) {
- nodeUpdate(ntree, tonode);
+ if (tonode)
+ nodeUpdate(ntree, tonode);
ntreeUpdateTree(ntree);
@@ -825,14 +853,18 @@ static void rna_Mapping_Node_update(Main *bmain, Scene *scene, PointerRNA *ptr)
rna_Node_update(bmain, scene, ptr);
}
-static PointerRNA rna_CompositNodeOutputMultiFile_active_input_get(PointerRNA *ptr)
+static void rna_NodeOutputFile_file_inputs_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
bNode *node = ptr->data;
- NodeImageMultiFile *nimf = node->storage;
- bNodeSocket *sock = BLI_findlink(&node->inputs, nimf->active_input);
- PointerRNA sock_ptr;
- RNA_pointer_create((ID*)ptr->id.data, &RNA_NodeSocket, sock, &sock_ptr);
- return sock_ptr;
+ rna_iterator_listbase_begin(iter, &node->inputs, NULL);
+}
+
+static PointerRNA rna_NodeOutputFile_file_inputs_get(CollectionPropertyIterator *iter)
+{
+ PointerRNA ptr;
+ bNodeSocket *sock = rna_iterator_listbase_get(iter);
+ RNA_pointer_create(iter->ptr.id.data, &RNA_NodeImageFileSocket, sock->storage, &ptr);
+ return ptr;
}
#else
@@ -1794,22 +1826,23 @@ static void rna_def_cmp_output_file_socket(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna = RNA_def_struct(brna, "NodeImageFileSocket", "NodeSocketRGBA");
- RNA_def_struct_sdna(srna, "bNodeSocket");
- RNA_def_struct_path_func(srna, "rna_NodeSocket_path");
+ srna = RNA_def_struct(brna, "NodeImageFileSocket", NULL);
+ RNA_def_struct_sdna(srna, "NodeImageMultiFileSocket");
RNA_def_struct_ui_text(srna, "Node Image File Socket", "Socket data of file output node");
- RNA_def_struct_ui_icon(srna, ICON_PLUG);
- RNA_def_struct_sdna_from(srna, "bNodeSocket", NULL);
-
- RNA_def_struct_sdna_from(srna, "NodeImageMultiFileSocket", "storage");
prop = RNA_def_property(srna, "use_node_format", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "use_node_format", 1);
RNA_def_property_ui_text(prop, "Use Node Format", "");
- RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeSocket_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, NULL);
prop = RNA_def_property(srna, "format", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "ImageFormatSettings");
+
+ prop = RNA_def_property(srna, "path", PROP_STRING, PROP_FILEPATH);
+ RNA_def_property_string_sdna(prop, NULL, "path");
+ RNA_def_property_ui_text(prop, "Path", "Subpath used for this input");
+ RNA_def_struct_name_property(srna, prop);
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, NULL);
}
static void def_cmp_output_file(StructRNA *srna)
{
@@ -1822,12 +1855,6 @@ static void def_cmp_output_file(StructRNA *srna)
RNA_def_property_ui_text(prop, "Base Path", "Base output path for the image");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
- prop = RNA_def_property(srna, "active_input", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_funcs(prop, "rna_CompositNodeOutputMultiFile_active_input_get", NULL, NULL, NULL);
- RNA_def_property_struct_type(prop, "NodeSocket");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Active Input", "Active input in details view list");
-
prop = RNA_def_property(srna, "active_input_index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "active_input");
RNA_def_property_ui_text(prop, "Active Input Index", "Active input index in details view list");
@@ -1835,6 +1862,12 @@ static void def_cmp_output_file(StructRNA *srna)
prop = RNA_def_property(srna, "format", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "ImageFormatSettings");
+
+ prop = RNA_def_property(srna, "file_inputs", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_collection_funcs(prop, "rna_NodeOutputFile_file_inputs_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end",
+ "rna_NodeOutputFile_file_inputs_get", NULL, NULL, NULL, NULL);
+ RNA_def_property_struct_type(prop, "NodeImageFileSocket");
+ RNA_def_property_ui_text(prop, "File Inputs", "");
}
static void def_cmp_dilate_erode(StructRNA *srna)
@@ -1891,14 +1924,14 @@ static void def_cmp_diff_matte(StructRNA *srna)
prop = RNA_def_property(srna, "tolerance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t1");
- RNA_def_property_float_funcs(prop, NULL, "rna_Matte_t1_set", NULL);
+ RNA_def_property_float_funcs(prop, NULL, "rna_difference_matte_t1_set", NULL);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Tolerance", "Color distances below this threshold are keyed");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t2");
- RNA_def_property_float_funcs(prop, NULL, "rna_Matte_t2_set", NULL);
+ RNA_def_property_float_funcs(prop, NULL, "rna_difference_matte_t2_set", NULL);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Falloff", "Color distances below this additional threshold are partially keyed");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
@@ -1933,18 +1966,30 @@ static void def_cmp_distance_matte(StructRNA *srna)
{
PropertyRNA *prop;
+ static EnumPropertyItem color_space_items[] = {
+ {1, "RGB", 0, "RGB", "RGB color space"},
+ {2, "YCC", 0, "YCC", "YCbCr Suppression"},
+ {0, NULL, 0, NULL, NULL}};
+
RNA_def_struct_sdna_from(srna, "NodeChroma", "storage");
+
+ prop = RNA_def_property(srna, "channel", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "channel");
+ RNA_def_property_enum_items(prop, color_space_items);
+ RNA_def_property_ui_text(prop, "Channel", "");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+
prop = RNA_def_property(srna, "tolerance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t1");
- RNA_def_property_float_funcs(prop, NULL, "rna_Matte_t1_set", NULL);
+ RNA_def_property_float_funcs(prop, NULL, "rna_distance_matte_t1_set", NULL);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Tolerance", "Color distances below this threshold are keyed");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t2");
- RNA_def_property_float_funcs(prop, NULL, "rna_Matte_t2_set", NULL);
+ RNA_def_property_float_funcs(prop, NULL, "rna_distance_matte_t2_set", NULL);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Falloff", "Color distances below this additional threshold are partially keyed");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
@@ -2071,7 +2116,7 @@ static void def_cmp_chroma_matte(StructRNA *srna)
prop = RNA_def_property(srna, "gain", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fstrength");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Gain", "Alpha gain");
+ RNA_def_property_ui_text(prop, "Falloff", "Alpha falloff");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "shadow_adjust", PROP_FLOAT, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_nodetree_types.h b/source/blender/makesrna/intern/rna_nodetree_types.h
index 5352bbd0e0f..d7e55ae27df 100644
--- a/source/blender/makesrna/intern/rna_nodetree_types.h
+++ b/source/blender/makesrna/intern/rna_nodetree_types.h
@@ -77,7 +77,8 @@ DefNode( ShaderNode, SH_NODE_VOLUME_TRANSPARENT, 0, "VO
DefNode( ShaderNode, SH_NODE_VOLUME_ISOTROPIC, 0, "VOLUME_ISOTROPIC", VolumeIsotropic, "Isotropic Volume", "" )
DefNode( ShaderNode, SH_NODE_EMISSION, 0, "EMISSION", Emission, "Emission", "" )
DefNode( ShaderNode, SH_NODE_NEW_GEOMETRY, 0, "NEW_GEOMETRY", NewGeometry, "Geometry", "" )
-DefNode( ShaderNode, SH_NODE_LIGHT_PATH, 0, "LIGHT_PATH", Light_path, "Light Path", "" )
+DefNode( ShaderNode, SH_NODE_LIGHT_PATH, 0, "LIGHT_PATH", LightPath, "Light Path", "" )
+DefNode( ShaderNode, SH_NODE_LIGHT_FALLOFF, 0, "LIGHT_FALLOFF", LightFalloff, "Light Falloff", "" )
DefNode( ShaderNode, SH_NODE_TEX_IMAGE, def_sh_tex_image, "TEX_IMAGE", TexImage, "Image Texture", "" )
DefNode( ShaderNode, SH_NODE_TEX_ENVIRONMENT, def_sh_tex_environment, "TEX_ENVIRONMENT", TexEnvironment, "Environment Texture","" )
DefNode( ShaderNode, SH_NODE_TEX_SKY, def_sh_tex_sky, "TEX_SKY", TexSky, "Sky Texture", "" )
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index bd024ba90be..2472e7613ad 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -164,7 +164,7 @@ static void rna_Object_internal_update(Main *UNUSED(bmain), Scene *UNUSED(scene)
static void rna_Object_matrix_world_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
/* don't use compat so we get predictable rotation */
- object_apply_mat4(ptr->id.data, ((Object *)ptr->id.data)->obmat, FALSE, TRUE);
+ BKE_object_apply_mat4(ptr->id.data, ((Object *)ptr->id.data)->obmat, FALSE, TRUE);
rna_Object_internal_update(bmain, scene, ptr);
}
@@ -199,19 +199,19 @@ static void rna_Object_matrix_local_set(PointerRNA *ptr, const float values[16])
}
/* don't use compat so we get predictable rotation */
- object_apply_mat4(ob, ob->obmat, FALSE, FALSE);
+ BKE_object_apply_mat4(ob, ob->obmat, FALSE, FALSE);
}
static void rna_Object_matrix_basis_get(PointerRNA *ptr, float values[16])
{
Object *ob = ptr->id.data;
- object_to_mat4(ob, (float(*)[4])values);
+ BKE_object_to_mat4(ob, (float(*)[4])values);
}
static void rna_Object_matrix_basis_set(PointerRNA *ptr, const float values[16])
{
Object *ob = ptr->id.data;
- object_apply_mat4(ob, (float(*)[4])values, FALSE, FALSE);
+ BKE_object_apply_mat4(ob, (float(*)[4])values, FALSE, FALSE);
}
void rna_Object_internal_update_data(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
@@ -263,7 +263,7 @@ static void rna_Object_select_update(Main *UNUSED(bmain), Scene *scene, PointerR
if (scene) {
Object *ob = (Object*)ptr->id.data;
short mode = ob->flag & SELECT ? BA_SELECT : BA_DESELECT;
- ED_base_object_select(object_in_scene(ob, scene), mode);
+ ED_base_object_select(BKE_scene_base_find(scene, ob), mode);
}
}
@@ -298,7 +298,7 @@ static void rna_Object_layer_update(Main *bmain, Scene *scene, PointerRNA *ptr)
Object *ob = (Object*)ptr->id.data;
Base *base;
- base = scene ? object_in_scene(ob, scene) : NULL;
+ base = scene ? BKE_scene_base_find(scene, ob) : NULL;
if (!base)
return;
@@ -353,9 +353,9 @@ static void rna_Object_data_set(PointerRNA *ptr, PointerRNA value)
test_object_materials(id);
if (GS(id->name) == ID_CU)
- test_curve_type(ob);
+ BKE_curve_type_test(ob);
else if (ob->type == OB_ARMATURE)
- armature_rebuild_pose(ob, ob->data);
+ BKE_pose_rebuild(ob, ob->data);
}
}
@@ -383,8 +383,14 @@ static void rna_Object_parent_set(PointerRNA *ptr, PointerRNA value)
{
Object *ob = (Object*)ptr->data;
Object *par = (Object*)value.data;
-
- ED_object_parent(ob, par, ob->partype, ob->parsubstr);
+
+#ifdef FREE_WINDOWS
+ /* NOTE: this dummy check here prevents this method causing weird runtime errors on mingw 4.6.2 */
+ if (ob)
+#endif
+ {
+ ED_object_parent(ob, par, ob->partype, ob->parsubstr);
+ }
}
static void rna_Object_parent_type_set(PointerRNA *ptr, int value)
@@ -708,13 +714,13 @@ static void rna_Object_rotation_mode_set(PointerRNA *ptr, int value)
static void rna_Object_dimensions_get(PointerRNA *ptr, float *value)
{
Object *ob = ptr->data;
- object_get_dimensions(ob, value);
+ BKE_object_dimensions_get(ob, value);
}
static void rna_Object_dimensions_set(PointerRNA *ptr, const float *value)
{
Object *ob = ptr->data;
- object_set_dimensions(ob, value);
+ BKE_object_dimensions_set(ob, value);
}
static int rna_Object_location_editable(PointerRNA *ptr, int index)
@@ -909,9 +915,9 @@ static void rna_GameObjectSettings_physics_type_set(PointerRNA *ptr, int value)
switch (ob->body_type) {
case OB_BODY_TYPE_SENSOR:
- ob->gameflag |= OB_SENSOR|OB_COLLISION|OB_GHOST;
- ob->gameflag &= ~(OB_OCCLUDER|OB_DYNAMIC|OB_RIGID_BODY|OB_SOFT_BODY|OB_ACTOR|OB_ANISOTROPIC_FRICTION
- |OB_DO_FH|OB_ROT_FH|OB_COLLISION_RESPONSE|OB_NAVMESH);
+ ob->gameflag |= OB_SENSOR | OB_COLLISION | OB_GHOST;
+ ob->gameflag &= ~(OB_OCCLUDER | OB_DYNAMIC | OB_RIGID_BODY | OB_SOFT_BODY | OB_ACTOR |
+ OB_ANISOTROPIC_FRICTION | OB_DO_FH | OB_ROT_FH | OB_COLLISION_RESPONSE | OB_NAVMESH);
break;
case OB_BODY_TYPE_OCCLUDER:
ob->gameflag |= OB_OCCLUDER;
@@ -1202,7 +1208,7 @@ static void rna_Object_modifier_clear(Object *object, bContext *C)
static void rna_Object_boundbox_get(PointerRNA *ptr, float *values)
{
Object *ob = (Object*)ptr->id.data;
- BoundBox *bb = object_get_boundbox(ob);
+ BoundBox *bb = BKE_object_boundbox_get(ob);
if (bb) {
memcpy(values, bb->vec, sizeof(bb->vec));
}
@@ -1888,9 +1894,9 @@ static void rna_def_object(BlenderRNA *brna)
"Axis Angle (W+XYZ), defines a rotation around some axis defined by 3D-Vector"},
{0, NULL, 0, NULL, NULL}};
- static float default_quat[4] = {1,0,0,0}; /* default quaternion values */
- static float default_axisAngle[4] = {0,0,1,0}; /* default axis-angle rotation values */
- static float default_scale[3] = {1,1,1}; /* default scale values */
+ static float default_quat[4] = {1, 0, 0, 0}; /* default quaternion values */
+ static float default_axisAngle[4] = {0, 0, 1, 0}; /* default axis-angle rotation values */
+ static float default_scale[3] = {1, 1, 1}; /* default scale values */
static int boundbox_dimsize[] = {8, 3};
srna = RNA_def_struct(brna, "Object", "ID");
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index fb383b1256b..7ed0304ebb4 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -87,16 +87,16 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_
case OB_SURF:
/* copies object and modifiers (but not the data) */
- tmpobj = copy_object(ob);
+ tmpobj = BKE_object_copy(ob);
tmpcu = (Curve *)tmpobj->data;
tmpcu->id.us--;
/* if getting the original caged mesh, delete object modifiers */
if ( cage )
- object_free_modifiers(tmpobj);
+ BKE_object_free_modifiers(tmpobj);
/* copies the data */
- copycu = tmpobj->data = copy_curve( (Curve *) ob->data );
+ copycu = tmpobj->data = BKE_curve_copy((Curve *) ob->data );
/* temporarily set edit so we get updates from edit mode, but
* also because for text datablocks copying it while in edit
@@ -105,42 +105,42 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_
copycu->editnurb = tmpcu->editnurb;
/* get updated display list, and convert to a mesh */
- makeDispListCurveTypes( sce, tmpobj, 0 );
+ BKE_displist_make_curveTypes(sce, tmpobj, 0);
copycu->editfont = NULL;
copycu->editnurb = NULL;
- nurbs_to_mesh( tmpobj );
+ BKE_mesh_from_nurbs(tmpobj);
- /* nurbs_to_mesh changes the type to a mesh, check it worked */
+ /* BKE_mesh_from_nurbs changes the type to a mesh, check it worked */
if (tmpobj->type != OB_MESH) {
- free_libblock_us( &(G.main->object), tmpobj );
+ BKE_libblock_free_us(&(G.main->object), tmpobj);
BKE_report(reports, RPT_ERROR, "cant convert curve to mesh. Does the curve have any segments?");
return NULL;
}
tmpmesh = tmpobj->data;
- free_libblock_us( &G.main->object, tmpobj );
+ BKE_libblock_free_us(&G.main->object, tmpobj);
break;
case OB_MBALL: {
/* metaballs don't have modifiers, so just convert to mesh */
- Object *basis_ob = find_basis_mball(sce, ob);
+ Object *basis_ob = BKE_mball_basis_find(sce, ob);
/* todo, re-generatre for render-res */
/* metaball_polygonize(scene, ob) */
if (ob != basis_ob)
return NULL; /* only do basis metaball */
- tmpmesh = add_mesh("Mesh");
+ tmpmesh = BKE_mesh_add("Mesh");
if (render) {
ListBase disp = {NULL, NULL};
- makeDispListMBall_forRender(sce, ob, &disp);
- mball_to_mesh(&disp, tmpmesh);
- freedisplist(&disp);
+ BKE_displist_make_mball_forRender(sce, ob, &disp);
+ BKE_mesh_from_metaball(&disp, tmpmesh);
+ BKE_displist_free(&disp);
}
else
- mball_to_mesh(&ob->disp, tmpmesh);
+ BKE_mesh_from_metaball(&ob->disp, tmpmesh);
break;
}
@@ -148,7 +148,7 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_
/* copies object and modifiers (but not the data) */
if (cage) {
/* copies the data */
- tmpmesh = copy_mesh( ob->data );
+ tmpmesh = BKE_mesh_copy( ob->data );
/* if not getting the original caged mesh, get final derived mesh */
}
else {
@@ -164,7 +164,7 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_
else
dm = mesh_create_derived_view(sce, ob, mask);
- tmpmesh = add_mesh("Mesh");
+ tmpmesh = BKE_mesh_add("Mesh");
DM_to_mesh(dm, tmpmesh, ob);
dm->release(dm);
}
@@ -328,7 +328,7 @@ static PointerRNA rna_Object_shape_key_add(Object *ob, bContext *C, ReportList *
Scene *scene = CTX_data_scene(C);
KeyBlock *kb = NULL;
- if ((kb = object_insert_shape_key(scene, ob, name, from_mix))) {
+ if ((kb = BKE_object_insert_shape_key(scene, ob, name, from_mix))) {
PointerRNA keyptr;
RNA_pointer_create((ID *)ob->data, &RNA_ShapeKey, kb, &keyptr);
@@ -364,7 +364,7 @@ static void rna_Mesh_assign_verts_to_group(Object *ob, bDeformGroup *group, int
}
if (assignmode != WEIGHT_REPLACE && assignmode != WEIGHT_ADD && assignmode != WEIGHT_SUBTRACT) {
- BKE_report(reports, RPT_ERROR, "Bad assignment mode" );
+ BKE_report(reports, RPT_ERROR, "Bad assignment mode");
return;
}
@@ -473,7 +473,12 @@ void rna_ObjectBase_layers_from_view(Base *base, View3D *v3d)
int rna_Object_is_modified(Object *ob, Scene *scene, int settings)
{
- return object_is_modified(scene, ob) & settings;
+ return BKE_object_is_modified(scene, ob) & settings;
+}
+
+int rna_Object_is_deform_modified(Object *ob, Scene *scene, int settings)
+{
+ return BKE_object_is_deform_modified(scene, ob) & settings;
}
#ifndef NDEBUG
@@ -644,6 +649,14 @@ void RNA_api_object(StructRNA *srna)
parm = RNA_def_boolean(func, "result", 0, "", "Object visibility");
RNA_def_function_return(func, parm);
+ func = RNA_def_function(srna, "is_deform_modified", "rna_Object_is_deform_modified");
+ RNA_def_function_ui_description(func, "Determine if this object is modified by a deformation from the base mesh data");
+ parm = RNA_def_pointer(func, "scene", "Scene", "", "");
+ RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
+ parm = RNA_def_enum(func, "settings", mesh_type_items, 0, "", "Modifier settings to apply");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm = RNA_def_boolean(func, "result", 0, "", "Object visibility");
+ RNA_def_function_return(func, parm);
#ifndef NDEBUG
/* mesh */
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index c52b6251223..2e8e597ad35 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -187,7 +187,7 @@ static void rna_Cache_idname_change(Main *UNUSED(bmain), Scene *UNUSED(scene), P
for (pid = pidlist.first; pid; pid = pid->next) {
if (pid->cache == cache)
pid2 = pid;
- else if (cache->name[0] != '\0' && strcmp(cache->name,pid->cache->name) == 0) {
+ else if (cache->name[0] != '\0' && strcmp(cache->name, pid->cache->name) == 0) {
/*TODO: report "name exists" to user */
BLI_strncpy(cache->name, cache->prev_name, sizeof(cache->name));
new_name = 0;
@@ -513,7 +513,7 @@ static void rna_FieldSettings_shape_update(Main *bmain, Scene *scene, PointerRNA
/* add/remove modifier as needed */
if (!md) {
- if (pd && (pd->shape == PFIELD_SHAPE_SURFACE) && ELEM(pd->forcefield,PFIELD_GUIDE,PFIELD_TEXTURE) == 0)
+ if (pd && (pd->shape == PFIELD_SHAPE_SURFACE) && ELEM(pd->forcefield, PFIELD_GUIDE, PFIELD_TEXTURE) == 0)
if (ELEM4(ob->type, OB_MESH, OB_SURF, OB_FONT, OB_CURVE))
ED_object_modifier_add(NULL, bmain, scene, ob, NULL, eModifierType_Surface);
}
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index dd591ea7343..52c41c869bb 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -1516,7 +1516,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
{PART_AVE_GLOBAL_X, "GLOBAL_X", 0, "Global X", ""},
{PART_AVE_GLOBAL_Y, "GLOBAL_Y", 0, "Global Y", ""},
{PART_AVE_GLOBAL_Z, "GLOBAL_Z", 0, "Global Z", ""},
- {PART_AVE_RAND, "RAND", 0, "Random", ""} ,
+ {PART_AVE_RAND, "RAND", 0, "Random", ""},
{0, NULL, 0, NULL, NULL}
};
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index b65924057cd..c87dabf46ca 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -173,7 +173,7 @@ static void rna_Pose_ik_solver_set(struct PointerRNA *ptr, int value)
pose->ikparam = NULL;
}
pose->iksolver = value;
- init_pose_ikparam(pose);
+ BKE_pose_ikparam_init(pose);
}
}
@@ -185,7 +185,7 @@ static void rna_Pose_ik_solver_update(Main *bmain, Scene *scene, PointerRNA *ptr
pose->flag |= POSE_RECALC; /* checks & sorts pose channels */
DAG_scene_sort(bmain, scene);
- update_pose_constraint_flags(pose);
+ BKE_pose_update_constraint_flags(pose);
object_test_constraints(ob);
@@ -586,7 +586,7 @@ static int rna_PoseChannel_rotation_4d_editable(PointerRNA *ptr, int index)
int rna_PoseBones_lookup_string(PointerRNA *ptr, const char *key, PointerRNA *r_ptr)
{
bPose *pose = (bPose*)ptr->data;
- bPoseChannel *pchan = get_pose_channel(pose, key);
+ bPoseChannel *pchan = BKE_pose_channel_find_name(pose, key);
if (pchan) {
RNA_pointer_create(ptr->id.data, &RNA_PoseBone, pchan, r_ptr);
return TRUE;
@@ -599,13 +599,13 @@ int rna_PoseBones_lookup_string(PointerRNA *ptr, const char *key, PointerRNA *r_
static void rna_PoseChannel_matrix_basis_get(PointerRNA *ptr, float *values)
{
bPoseChannel *pchan = (bPoseChannel*)ptr->data;
- pchan_to_mat4(pchan, (float (*)[4])values);
+ BKE_pchan_to_mat4(pchan, (float (*)[4])values);
}
static void rna_PoseChannel_matrix_basis_set(PointerRNA *ptr, const float *values)
{
bPoseChannel *pchan = (bPoseChannel*)ptr->data;
- pchan_apply_mat4(pchan, (float (*)[4])values, FALSE); /* no compat for predictable result */
+ BKE_pchan_apply_mat4(pchan, (float (*)[4])values, FALSE); /* no compat for predictable result */
}
static void rna_PoseChannel_matrix_set(PointerRNA *ptr, const float *values)
@@ -614,9 +614,9 @@ static void rna_PoseChannel_matrix_set(PointerRNA *ptr, const float *values)
Object *ob = (Object*)ptr->id.data;
float tmat[4][4];
- armature_mat_pose_to_bone_ex(ob, pchan, (float (*)[4])values, tmat);
+ BKE_armature_mat_pose_to_bone_ex(ob, pchan, (float (*)[4])values, tmat);
- pchan_apply_mat4(pchan, tmat, FALSE); /* no compat for predictable result */
+ BKE_pchan_apply_mat4(pchan, tmat, FALSE); /* no compat for predictable result */
}
#else
@@ -736,9 +736,9 @@ static void rna_def_pose_channel_constraints(BlenderRNA *brna, PropertyRNA *cpro
static void rna_def_pose_channel(BlenderRNA *brna)
{
- static float default_quat[4] = {1,0,0,0}; /* default quaternion values */
- static float default_axisAngle[4] = {0,0,1,0}; /* default axis-angle rotation values */
- static float default_scale[3] = {1,1,1}; /* default scale values */
+ static float default_quat[4] = {1, 0, 0, 0}; /* default quaternion values */
+ static float default_axisAngle[4] = {0, 0, 1, 0}; /* default axis-angle rotation values */
+ static float default_scale[3] = {1, 1, 1}; /* default scale values */
const int matrix_dimsize[] = {4, 4};
@@ -1002,21 +1002,21 @@ static void rna_def_pose_channel(BlenderRNA *brna)
prop = RNA_def_property(srna, "ik_stretch", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ikstretch");
- RNA_def_property_range(prop, 0.0f,1.0f);
+ RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "IK Stretch", "Allow scaling of the bone for IK");
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
prop = RNA_def_property(srna, "ik_rotation_weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ikrotweight");
- RNA_def_property_range(prop, 0.0f,1.0f);
+ RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "IK Rot Weight", "Weight of rotation constraint for IK");
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
prop = RNA_def_property(srna, "ik_linear_weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "iklinweight");
- RNA_def_property_range(prop, 0.0f,1.0f);
+ RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "IK Lin Weight", "Weight of scale constraint for IK");
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
@@ -1133,13 +1133,13 @@ static void rna_def_pose_itasc(BlenderRNA *brna)
prop = RNA_def_property(srna, "precision", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "precision");
- RNA_def_property_range(prop, 0.0f,0.1f);
+ RNA_def_property_range(prop, 0.0f, 0.1f);
RNA_def_property_ui_text(prop, "Precision", "Precision of convergence in case of reiteration");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
prop = RNA_def_property(srna, "iterations", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "numiter");
- RNA_def_property_range(prop, 1.f,1000.f);
+ RNA_def_property_range(prop, 1.f, 1000.f);
RNA_def_property_ui_text(prop, "Iterations",
"Maximum number of iterations for convergence in case of reiteration");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
@@ -1173,19 +1173,19 @@ static void rna_def_pose_itasc(BlenderRNA *brna)
prop = RNA_def_property(srna, "step_min", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "minstep");
- RNA_def_property_range(prop, 0.0f,0.1f);
+ RNA_def_property_range(prop, 0.0f, 0.1f);
RNA_def_property_ui_text(prop, "Min step", "Lower bound for timestep in second in case of automatic substeps");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
prop = RNA_def_property(srna, "step_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "maxstep");
- RNA_def_property_range(prop, 0.0f,1.0f);
+ RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Max step", "Higher bound for timestep in second in case of automatic substeps");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
prop = RNA_def_property(srna, "feedback", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "feedback");
- RNA_def_property_range(prop, 0.0f,100.0f);
+ RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Feedback",
"Feedback coefficient for error correction, average response time is 1/feedback "
"(default=20)");
@@ -1193,7 +1193,7 @@ static void rna_def_pose_itasc(BlenderRNA *brna)
prop = RNA_def_property(srna, "velocity_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "maxvel");
- RNA_def_property_range(prop, 0.0f,100.0f);
+ RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Max Velocity", "Maximum joint velocity in rad/s (default=50)");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
@@ -1205,7 +1205,7 @@ static void rna_def_pose_itasc(BlenderRNA *brna)
prop = RNA_def_property(srna, "damping_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dampmax");
- RNA_def_property_range(prop, 0.0f,1.0f);
+ RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Damp",
"Maximum damping coefficient when singular value is nearly 0 "
"(higher values=more stability, less reactivity - default=0.5)");
@@ -1213,7 +1213,7 @@ static void rna_def_pose_itasc(BlenderRNA *brna)
prop = RNA_def_property(srna, "damping_epsilon", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dampeps");
- RNA_def_property_range(prop, 0.0f,1.0f);
+ RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Epsilon",
"Singular value under which damping is progressively applied "
"(higher values=more stability, less reactivity - default=0.1)");
diff --git a/source/blender/makesrna/intern/rna_pose_api.c b/source/blender/makesrna/intern/rna_pose_api.c
index 14f7b7c74f5..531a85edeea 100644
--- a/source/blender/makesrna/intern/rna_pose_api.c
+++ b/source/blender/makesrna/intern/rna_pose_api.c
@@ -1,5 +1,4 @@
/*
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/makesrna/intern/rna_property.c b/source/blender/makesrna/intern/rna_property.c
index 3eac129a195..637e21cf6c5 100644
--- a/source/blender/makesrna/intern/rna_property.c
+++ b/source/blender/makesrna/intern/rna_property.c
@@ -109,7 +109,7 @@ void RNA_def_gameproperty(BlenderRNA *brna)
/* Base Struct for GameProperty */
srna = RNA_def_struct(brna, "GameProperty", NULL);
- RNA_def_struct_ui_text(srna , "Game Property", "Game engine user defined object property");
+ RNA_def_struct_ui_text(srna, "Game Property", "Game engine user defined object property");
RNA_def_struct_sdna(srna, "bProperty");
RNA_def_struct_refine_func(srna, "rna_GameProperty_refine");
@@ -132,7 +132,7 @@ void RNA_def_gameproperty(BlenderRNA *brna)
/* GameBooleanProperty */
srna = RNA_def_struct(brna, "GameBooleanProperty", "GameProperty");
- RNA_def_struct_ui_text(srna , "Game Boolean Property", "Game engine user defined Boolean property");
+ RNA_def_struct_ui_text(srna, "Game Boolean Property", "Game engine user defined Boolean property");
RNA_def_struct_sdna(srna, "bProperty");
RNA_def_property_update(prop, NC_LOGIC, NULL);
@@ -143,7 +143,7 @@ void RNA_def_gameproperty(BlenderRNA *brna)
/* GameIntProperty */
srna = RNA_def_struct(brna, "GameIntProperty", "GameProperty");
- RNA_def_struct_ui_text(srna , "Game Integer Property", "Game engine user defined integer number property");
+ RNA_def_struct_ui_text(srna, "Game Integer Property", "Game engine user defined integer number property");
RNA_def_struct_sdna(srna, "bProperty");
prop = RNA_def_property(srna, "value", PROP_INT, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index d2eef1cdd43..2cb89ec25e9 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -151,7 +151,7 @@ EnumPropertyItem snap_element_items[] = {
#ifdef WITH_CINEON
# define R_IMF_ENUM_CINEON {R_IMF_IMTYPE_CINEON, "CINEON", ICON_FILE_IMAGE, "Cineon", \
"Output image in Cineon format"},
-# define R_IMF_ENUM_DPX {R_IMF_IMTYPE_DPX, "DPX",ICON_FILE_IMAGE, "DPX", "Output image in DPX format"},
+# define R_IMF_ENUM_DPX {R_IMF_IMTYPE_DPX, "DPX", ICON_FILE_IMAGE, "DPX", "Output image in DPX format"},
#else
# define R_IMF_ENUM_CINEON
# define R_IMF_ENUM_DPX
@@ -330,15 +330,15 @@ static Base *rna_Scene_object_link(Scene *scene, bContext *C, ReportList *report
Scene *scene_act = CTX_data_scene(C);
Base *base;
- if (object_in_scene(ob, scene)) {
+ if (BKE_scene_base_find(scene, ob)) {
BKE_reportf(reports, RPT_ERROR, "Object \"%s\" is already in scene \"%s\"", ob->id.name+2, scene->id.name+2);
return NULL;
}
- base = scene_add_base(scene, ob);
+ base = BKE_scene_base_add(scene, ob);
id_us_plus(&ob->id);
- /* this is similar to what object_add_type and add_object do */
+ /* this is similar to what object_add_type and BKE_object_add do */
base->lay = scene->lay;
/* when linking to an inactive scene don't touch the layer */
@@ -357,7 +357,7 @@ static Base *rna_Scene_object_link(Scene *scene, bContext *C, ReportList *report
static void rna_Scene_object_unlink(Scene *scene, ReportList *reports, Object *ob)
{
- Base *base = object_in_scene(ob, scene);
+ Base *base = BKE_scene_base_find(scene, ob);
if (!base) {
BKE_reportf(reports, RPT_ERROR, "Object '%s' is not in this scene '%s'", ob->id.name+2, scene->id.name+2);
return;
@@ -401,7 +401,7 @@ static void rna_Scene_active_object_set(PointerRNA *ptr, PointerRNA value)
{
Scene *scene = (Scene*)ptr->data;
if (value.data)
- scene->basact = object_in_scene((Object*)value.data, scene);
+ scene->basact = BKE_scene_base_find(scene, (Object *)value.data);
else
scene->basact = NULL;
}
@@ -707,7 +707,7 @@ static void rna_ImageFormatSettings_file_format_set(PointerRNA *ptr, int value)
Scene *scene = ptr->id.data;
RenderData *rd = &scene->r;
#ifdef WITH_FFMPEG
- ffmpeg_verify_image_type(rd, imf);
+ BKE_ffmpeg_image_type_verify(rd, imf);
#endif
#ifdef WITH_QUICKTIME
quicktime_verify_image_type(rd, imf);
@@ -750,7 +750,7 @@ static EnumPropertyItem *rna_ImageFormatSettings_color_mode_itemf(bContext *C, P
Scene *scene = ptr->id.data;
RenderData *rd = &scene->r;
- if (ffmpeg_alpha_channel_supported(rd))
+ if (BKE_ffmpeg_alpha_channel_is_supported(rd))
chan_flag |= IMA_CHAN_FLAG_ALPHA;
}
#endif
@@ -941,7 +941,7 @@ static void rna_FFmpegSettings_lossless_output_set(PointerRNA *ptr, int value)
else
rd->ffcodecdata.flags &= ~FFMPEG_LOSSLESS_OUTPUT;
- ffmpeg_verify_codec_settings(rd);
+ BKE_ffmpeg_codec_settings_verify(rd);
}
static void rna_FFmpegSettings_codec_settings_update(Main *UNUSED(bmain), Scene *UNUSED(scene_unused), PointerRNA *ptr)
@@ -949,7 +949,7 @@ static void rna_FFmpegSettings_codec_settings_update(Main *UNUSED(bmain), Scene
Scene *scene = (Scene *) ptr->id.data;
RenderData *rd = &scene->r;
- ffmpeg_verify_codec_settings(rd);
+ BKE_ffmpeg_codec_settings_verify(rd);
}
#endif
@@ -993,7 +993,7 @@ static void rna_RenderSettings_active_layer_set(PointerRNA *ptr, PointerRNA valu
static SceneRenderLayer *rna_RenderLayer_new(ID *id, RenderData *UNUSED(rd), const char *name)
{
Scene *scene = (Scene *)id;
- SceneRenderLayer *srl = scene_add_render_layer(scene, name);
+ SceneRenderLayer *srl = BKE_scene_add_render_layer(scene, name);
WM_main_add_notifier(NC_SCENE|ND_RENDER_OPTIONS, NULL);
@@ -1005,7 +1005,7 @@ static void rna_RenderLayer_remove(ID *id, RenderData *UNUSED(rd), Main *bmain,
{
Scene *scene = (Scene *)id;
- if (!scene_remove_render_layer(bmain, scene, srl)) {
+ if (!BKE_scene_remove_render_layer(bmain, scene, srl)) {
BKE_reportf(reports, RPT_ERROR, "RenderLayer '%s' could not be removed from scene '%s'",
srl->name, scene->id.name+2);
}
@@ -1077,8 +1077,11 @@ static void rna_RenderSettings_color_management_update(Main *bmain, Scene *UNUSE
bNode *node;
if (ntree && scene->use_nodes) {
- /* XXX images are freed here, stop render and preview threads, until Image is threadsafe */
- WM_jobs_stop_all(bmain->wm.first);
+ /* images are freed here, stop render and preview threads, until
+ * Image is threadsafe. when we are changing this propery from a
+ * python script in the render thread, don't stop own thread */
+ if(BLI_thread_is_main())
+ WM_jobs_stop_all(bmain->wm.first);
for (node = ntree->nodes.first; node; node = node->next) {
if (ELEM(node->type, CMP_NODE_VIEWER, CMP_NODE_IMAGE)) {
@@ -1122,7 +1125,7 @@ static int rna_RenderSettings_multiple_engines_get(PointerRNA *UNUSED(ptr))
static int rna_RenderSettings_use_shading_nodes_get(PointerRNA *ptr)
{
Scene *scene = (Scene*)ptr->id.data;
- return scene_use_new_shading_nodes(scene);
+ return BKE_scene_use_new_shading_nodes(scene);
}
static int rna_RenderSettings_use_game_engine_get(PointerRNA *ptr)
@@ -1181,7 +1184,7 @@ static void rna_Scene_editmesh_select_mode_set(PointerRNA *ptr, const int *value
ts->selectmode = flag;
if (scene->basact) {
- Mesh *me = get_mesh(scene->basact->object);
+ Mesh *me = BKE_mesh_from_object(scene->basact->object);
if (me && me->edit_btmesh && me->edit_btmesh->selectmode != flag) {
me->edit_btmesh->selectmode = flag;
EDBM_selectmode_set(me->edit_btmesh);
@@ -1195,7 +1198,7 @@ static void rna_Scene_editmesh_select_mode_update(Main *UNUSED(bmain), Scene *sc
Mesh *me = NULL;
if (scene->basact) {
- me = get_mesh(scene->basact->object);
+ me = BKE_mesh_from_object(scene->basact->object);
if (me && me->edit_btmesh == NULL)
me = NULL;
}
@@ -1367,7 +1370,7 @@ static void rna_UnifiedPaintSettings_size_set(PointerRNA *ptr, int value)
UnifiedPaintSettings* ups = ptr->data;
/* scale unprojected radius so it stays consistent with brush size */
- brush_scale_unprojected_radius(&ups->unprojected_radius,
+ BKE_brush_scale_unprojected_radius(&ups->unprojected_radius,
value, ups->size);
ups->size = value;
}
@@ -1377,7 +1380,7 @@ static void rna_UnifiedPaintSettings_unprojected_radius_set(PointerRNA *ptr, flo
UnifiedPaintSettings* ups = ptr->data;
/* scale brush size so it stays consistent with unprojected_radius */
- brush_scale_size(&ups->size, value, ups->unprojected_radius);
+ BKE_brush_scale_size(&ups->size, value, ups->unprojected_radius);
ups->unprojected_radius = value;
}
@@ -1779,6 +1782,11 @@ static void rna_def_unified_paint_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Use Unified Strength",
"Instead of per-brush strength, the strength is shared across brushes");
+ prop = RNA_def_property(srna, "use_unified_weight", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_WEIGHT);
+ RNA_def_property_ui_text(prop, "Use Unified Weight",
+ "Instead of per-brush weight, the weight is shared across brushes");
+
/* unified paint settings that override the equivalent settings
* from the active brush */
prop = RNA_def_property(srna, "size", PROP_INT, PROP_DISTANCE);
@@ -1800,6 +1808,13 @@ static void rna_def_unified_paint_settings(BlenderRNA *brna)
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3);
RNA_def_property_ui_text(prop, "Strength", "How powerful the effect of the brush is when applied");
+ prop = RNA_def_property(srna, "weight", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_sdna(prop, NULL, "weight");
+ RNA_def_property_float_default(prop, 0.5f);
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3);
+ RNA_def_property_ui_text(prop, "Weight", "Weight to assign in vertex groups");
+
prop = RNA_def_property(srna, "use_pressure_size", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_BRUSH_SIZE_PRESSURE);
RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
@@ -1905,6 +1920,19 @@ void rna_def_render_layer_common(StructRNA *srna, int scene)
if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ prop = RNA_def_property(srna, "layers_exclude", PROP_BOOLEAN, PROP_LAYER);
+ RNA_def_property_boolean_sdna(prop, NULL, "lay_exclude", 1);
+ RNA_def_property_array(prop, 20);
+ RNA_def_property_ui_text(prop, "Exclude Layers", "Exclude scene layers from having any influence");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
+ else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+
+ if (scene) {
+ prop = RNA_def_property(srna, "samples", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_ui_text(prop, "Samples", "Override number of render samples for this render layer, 0 will use the scene setting");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ }
+
/* layer options */
prop = RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "layflag", SCE_LAY_DISABLE);
@@ -2888,7 +2916,7 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna)
{CODEC_ID_FLV1, "FLASH", 0, "Flash Video", ""},
{CODEC_ID_FFV1, "FFV1", 0, "FFmpeg video codec #1", ""},
{CODEC_ID_QTRLE, "QTRLE", 0, "QTRLE", ""},
- /* {CODEC_ID_DNXHD, "DNXHD", 0, "DNxHD", ""},*/ /* disabled for after release */
+ /* {CODEC_ID_DNXHD, "DNXHD", 0, "DNxHD", ""}, */ /* disabled for after release */
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem ffmpeg_audio_codec_items[] = {
@@ -3791,14 +3819,14 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
prop = RNA_def_property(srna, "stamp_foreground", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "fg_stamp");
RNA_def_property_array(prop, 4);
- RNA_def_property_range(prop,0.0,1.0);
+ RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Text Color", "Color to use for stamp text");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "stamp_background", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "bg_stamp");
RNA_def_property_array(prop, 4);
- RNA_def_property_range(prop,0.0,1.0);
+ RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Background", "Color to use behind stamp text");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c
index 08ed7625a01..ca01d61f630 100644
--- a/source/blender/makesrna/intern/rna_scene_api.c
+++ b/source/blender/makesrna/intern/rna_scene_api.c
@@ -50,17 +50,17 @@
-static void rna_Scene_frame_set(Scene *scene, int frame, float subframe)
+void rna_Scene_frame_set(Scene *scene, int frame, float subframe)
{
scene->r.cfra = frame;
scene->r.subframe = subframe;
CLAMP(scene->r.cfra, MINAFRAME, MAXFRAME);
- scene_update_for_newframe(G.main, scene, (1<<20) - 1);
- scene_camera_switch_update(scene);
+ BKE_scene_update_for_newframe(G.main, scene, (1<<20) - 1);
+ BKE_scene_camera_switch_update(scene);
/* cant use NC_SCENE|ND_FRAME because this casues wm_event_do_notifiers to call
- * scene_update_for_newframe which will loose any un-keyed changes [#24690] */
+ * BKE_scene_update_for_newframe which will loose any un-keyed changes [#24690] */
/* WM_main_add_notifier(NC_SCENE|ND_FRAME, scene); */
/* instead just redraw the views */
@@ -69,13 +69,13 @@ static void rna_Scene_frame_set(Scene *scene, int frame, float subframe)
static void rna_Scene_update_tagged(Scene *scene)
{
- scene_update_tagged(G.main, scene);
+ BKE_scene_update_tagged(G.main, scene);
}
static void rna_SceneRender_get_frame_path(RenderData *rd, int frame, char *name)
{
if (BKE_imtype_is_movie(rd->im_format.imtype))
- BKE_makeanimstring(name, rd);
+ BKE_movie_filepath_get(name, rd);
else
BKE_makepicstring(name, rd->pic, G.main->name, (frame == INT_MIN) ? rd->cfra : frame, rd->im_format.imtype,
rd->scemode & R_EXTENSION, TRUE);
@@ -85,9 +85,9 @@ static void rna_SceneRender_get_frame_path(RenderData *rd, int frame, char *name
/* don't remove this, as COLLADA exporting cannot be done through operators in render() callback. */
#include "../../collada/collada.h"
-static void rna_Scene_collada_export(Scene *scene, const char *filepath, int selected, int second_life)
+static void rna_Scene_collada_export(Scene *scene, const char *filepath, int selected, int apply_modifiers, int second_life)
{
- collada_export(scene, filepath, selected, second_life);
+ collada_export(scene, filepath, selected, apply_modifiers, second_life);
}
#endif
@@ -115,7 +115,8 @@ void RNA_api_scene(StructRNA *srna)
parm = RNA_def_string(func, "filepath", "", FILE_MAX, "File Path", "File path to write Collada file");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_property_subtype(parm, PROP_FILEPATH); /* allow non utf8 */
- parm = RNA_def_boolean(func, "selected", 0, "Export only selected", "Export only selected elements");
+ parm = RNA_def_boolean(func, "selected", 0, "Selection Only", "Export only selected elements");
+ parm = RNA_def_boolean(func, "apply_modifiers", 0, "Apply Modifiers", "Apply modifiers (in Preview resolution)");
parm = RNA_def_boolean(func, "second_life", 0, "Export for Second Life", "Compatibility mode for Second Life");
RNA_def_function_ui_description(func, "Export to collada file");
#endif
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c
index 67a4bafb8ee..db43db273bd 100644
--- a/source/blender/makesrna/intern/rna_screen.c
+++ b/source/blender/makesrna/intern/rna_screen.c
@@ -111,10 +111,31 @@ static void rna_Area_type_set(PointerRNA *ptr, int value)
static void rna_Area_type_update(bContext *C, PointerRNA *ptr)
{
+ wmWindowManager *wm = CTX_wm_manager(C);
+ wmWindow *win;
+ bScreen *sc = (bScreen*)ptr->id.data;
ScrArea *sa = (ScrArea*)ptr->data;
- ED_area_newspace(C, sa, sa->butspacetype); /* XXX - this uses the window */
- ED_area_tag_redraw(sa);
+ /* XXX this call still use context, so we trick it to work in the right context */
+ for(win=wm->windows.first; win; win=win->next) {
+ if(sc == win->screen) {
+ wmWindow *prevwin = CTX_wm_window(C);
+ ScrArea *prevsa = CTX_wm_area(C);
+ ARegion *prevar = CTX_wm_region(C);
+
+ CTX_wm_window_set(C, win);
+ CTX_wm_area_set(C, sa);
+ CTX_wm_region_set(C, NULL);
+
+ ED_area_newspace(C, sa, sa->butspacetype);
+ ED_area_tag_redraw(sa);
+
+ CTX_wm_window_set(C, prevwin);
+ CTX_wm_area_set(C, prevsa);
+ CTX_wm_region_set(C, prevar);
+ break;
+ }
+ }
}
#else
diff --git a/source/blender/makesrna/intern/rna_sensor.c b/source/blender/makesrna/intern/rna_sensor.c
index ff336ba6693..8bed95f88b2 100644
--- a/source/blender/makesrna/intern/rna_sensor.c
+++ b/source/blender/makesrna/intern/rna_sensor.c
@@ -369,7 +369,7 @@ static void rna_def_near_sensor(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "NearSensor", "Sensor");
- RNA_def_struct_ui_text(srna , "Near Sensor", "Sensor to detect nearby objects");
+ RNA_def_struct_ui_text(srna, "Near Sensor", "Sensor to detect nearby objects");
RNA_def_struct_sdna_from(srna, "bNearSensor", "data");
prop = RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index 2ed2f295cb6..8cb44da250b 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -246,8 +246,7 @@ static void rna_Sequence_use_proxy_set(PointerRNA *ptr, int value)
seq->strip->proxy = MEM_callocN(sizeof(struct StripProxy), "StripProxy");
seq->strip->proxy->quality = 90;
seq->strip->proxy->build_tc_flags = SEQ_PROXY_TC_ALL;
- seq->strip->proxy->build_size_flags
- = SEQ_PROXY_IMAGE_SIZE_25;
+ seq->strip->proxy->build_size_flags = SEQ_PROXY_IMAGE_SIZE_25;
}
}
else {
@@ -414,8 +413,6 @@ static StructRNA* rna_Sequence_refine(struct PointerRNA *ptr)
return &RNA_MulticamSequence;
case SEQ_ADJUSTMENT:
return &RNA_AdjustmentSequence;
- case SEQ_PLUGIN:
- return &RNA_PluginSequence;
case SEQ_WIPE:
return &RNA_WipeSequence;
case SEQ_GLOW:
@@ -1048,7 +1045,7 @@ static void rna_def_sequence(BlenderRNA *brna)
RNA_def_property_range(prop, 1, MAXFRAME);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Length", "The length of the contents of this strip after the handles are applied");
- RNA_def_property_int_funcs(prop, "rna_Sequence_frame_length_get", "rna_Sequence_frame_length_set",NULL);
+ RNA_def_property_int_funcs(prop, "rna_Sequence_frame_length_get", "rna_Sequence_frame_length_set", NULL);
RNA_def_property_editable_func(prop, "rna_Sequence_frame_editable");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
@@ -1063,7 +1060,7 @@ static void rna_def_sequence(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "start");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Start Frame", "");
- RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_start_frame_set",NULL); /* overlap tests and calc_seq_disp */
+ RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_start_frame_set", NULL); /* overlap tests and calc_seq_disp */
RNA_def_property_editable_func(prop, "rna_Sequence_frame_editable");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
@@ -1118,7 +1115,7 @@ static void rna_def_sequence(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "machine");
RNA_def_property_range(prop, 0, MAXSEQ-1);
RNA_def_property_ui_text(prop, "Channel", "Y position of the sequence strip");
- RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_channel_set",NULL); /* overlap test */
+ RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_channel_set", NULL); /* overlap test */
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
/* blending */
@@ -1243,7 +1240,7 @@ static void rna_def_filter_video(StructRNA *srna)
prop = RNA_def_property(srna, "use_premultiply", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_MAKE_PREMUL);
RNA_def_property_ui_text(prop, "Premultiply", "Convert RGB from key alpha to premultiplied alpha");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "use_flip_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_FLIPX);
@@ -1588,25 +1585,6 @@ static void rna_def_adjustment(BlenderRNA *brna)
rna_def_input(srna);
}
-static void rna_def_plugin(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- srna = RNA_def_struct(brna, "PluginSequence", "EffectSequence");
- RNA_def_struct_ui_text(srna, "Plugin Sequence",
- "Sequence strip applying an effect, loaded from an external plugin");
- RNA_def_struct_sdna_from(srna, "PluginSeq", "plugin");
-
- prop = RNA_def_property(srna, "filename", PROP_STRING, PROP_FILENAME);
- RNA_def_property_string_sdna(prop, NULL, "name");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Filename", "");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
-
- /* plugin properties need custom wrapping code like ID properties */
-}
-
static void rna_def_wipe(BlenderRNA *brna)
{
StructRNA *srna;
@@ -1848,7 +1826,6 @@ void RNA_def_sequencer(BlenderRNA *brna)
rna_def_effect(brna);
rna_def_multicam(brna);
rna_def_adjustment(brna);
- rna_def_plugin(brna);
rna_def_wipe(brna);
rna_def_glow(brna);
rna_def_transform(brna);
diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c
index 69d76c0e342..b1fed62f87b 100644
--- a/source/blender/makesrna/intern/rna_smoke.c
+++ b/source/blender/makesrna/intern/rna_smoke.c
@@ -16,6 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Daniel Genrich
+ * Blender Foundation
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -336,12 +337,25 @@ static void rna_def_smoke_flow_settings(BlenderRNA *brna)
static void rna_def_smoke_coll_settings(BlenderRNA *brna)
{
+ static EnumPropertyItem smoke_coll_type_items[] = {
+ {SM_COLL_STATIC, "COLLSTATIC", 0, "Static", "Non moving obstacle"},
+ {SM_COLL_RIGID, "COLLRIGID", 0, "Rigid", "Rigid obstacle"},
+ {SM_COLL_ANIMATED, "COLLANIMATED", 0, "Animated", "Animated obstacle"},
+ {0, NULL, 0, NULL, NULL}};
+
StructRNA *srna;
+ PropertyRNA *prop;
srna = RNA_def_struct(brna, "SmokeCollSettings", NULL);
RNA_def_struct_ui_text(srna, "Collision Settings", "Smoke collision settings");
RNA_def_struct_sdna(srna, "SmokeCollSettings");
RNA_def_struct_path_func(srna, "rna_SmokeCollSettings_path");
+
+ prop = RNA_def_property(srna, "collision_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "type");
+ RNA_def_property_enum_items(prop, smoke_coll_type_items);
+ RNA_def_property_ui_text(prop, "Collision type", "Collision type");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
}
void RNA_def_smoke(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 8d4b5a32969..aafcc381c51 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -494,7 +494,7 @@ static EnumPropertyItem *rna_SpaceView3D_viewport_shade_itemf(bContext *UNUSED(C
RNA_enum_items_add_value(&item, &totitem, viewport_shade_items, OB_SOLID);
RNA_enum_items_add_value(&item, &totitem, viewport_shade_items, OB_TEXTURE);
- if (scene_use_new_shading_nodes(scene))
+ if (BKE_scene_use_new_shading_nodes(scene))
RNA_enum_items_add_value(&item, &totitem, viewport_shade_items, OB_MATERIAL);
if (type->view_draw)
@@ -1024,8 +1024,9 @@ static EnumPropertyItem *rna_SpaceProperties_texture_context_itemf(bContext *C,
static void rna_SpaceClipEditor_clip_set(PointerRNA *ptr, PointerRNA value)
{
SpaceClip *sc = (SpaceClip*)(ptr->data);
+ bScreen *screen = (bScreen*)ptr->id.data;
- ED_space_clip_set(NULL, sc, (MovieClip*)value.data);
+ ED_space_clip_set(NULL, screen, sc, (MovieClip*)value.data);
}
static void rna_SpaceClipEditor_clip_mode_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
@@ -2612,7 +2613,7 @@ static void rna_def_fileselect_params(BlenderRNA *brna)
prop = RNA_def_property(srna, "show_hidden", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", FILE_HIDE_DOT);
RNA_def_property_ui_text(prop, "Show Hidden", "Show hidden dot files");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS , NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
prop = RNA_def_property(srna, "sort_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "sort");
@@ -2930,6 +2931,13 @@ static void rna_def_space_clip(BlenderRNA *brna)
static EnumPropertyItem view_items[] = {
{SC_VIEW_CLIP, "CLIP", ICON_SEQUENCE, "Clip", "Show editing clip preview"},
{SC_VIEW_GRAPH, "GRAPH", ICON_IPO, "Graph", "Show graph view for active element"},
+ {SC_VIEW_DOPESHEET, "DOPESHEET", ICON_ACTION, "Dopesheet", "Dopesheet view for tracking data"},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem dope_sort_items[] = {
+ {SC_DOPE_SORT_NAME, "NAME", 0, "Name", "Sort channels by their names"},
+ {SC_DOPE_SORT_LONGEST, "LONGEST", 0, "Longest", "Sort channels by longest tracked segment"},
+ {SC_DOPE_SORT_TOTAL, "TOTAL", 0, "Total", "Sort channels by overall amount of tracked segments"},
{0, NULL, 0, NULL, NULL}};
srna = RNA_def_struct(brna, "SpaceClipEditor", "Space");
@@ -3104,6 +3112,27 @@ static void rna_def_space_clip(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "postproc_flag", MOVIECLIP_PREVIEW_GRAYSCALE);
RNA_def_property_ui_text(prop, "Grayscale", "Display frame in grayscale mode");
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
+
+ /* timeline */
+ prop = RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_SECONDS);
+ RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames");
+ RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
+
+ /* ** dopesheet ** */
+
+ /* dopesheet sort */
+ prop = RNA_def_property(srna, "dopesheet_sort_method", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "dope_sort");
+ RNA_def_property_enum_items(prop, dope_sort_items);
+ RNA_def_property_ui_text(prop, "Dopesheet Sort Field", "Method to be used to sort channels in dopesheet view");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
+
+ /* invert_dopesheet_sort */
+ prop = RNA_def_property(srna, "invert_dopesheet_sort", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "dope_flag", SC_DOPE_SORT_INVERSE);
+ RNA_def_property_ui_text(prop, "Invert Dopesheet Sort", "Invert sort order of dopesheet channels");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
}
diff --git a/source/blender/makesrna/intern/rna_test.c b/source/blender/makesrna/intern/rna_test.c
index 8bc545f34b7..1f5a4ff7f92 100644
--- a/source/blender/makesrna/intern/rna_test.c
+++ b/source/blender/makesrna/intern/rna_test.c
@@ -57,7 +57,7 @@
(void)0
#define DEF_GET_SET(type, arr) \
- void rna_Test_ ## arr ## _get(PointerRNA * ptr, type * values) \
+ void rna_Test_ ## arr ## _get(PointerRNA * ptr, type * values) \
{ \
memcpy(values, arr, sizeof(arr)); \
} \
@@ -69,7 +69,7 @@
(void)0
#define DEF_GET_SET_LEN(arr, max) \
- static int rna_Test_ ## arr ## _get_length(PointerRNA * ptr) \
+ static int rna_Test_ ## arr ## _get_length(PointerRNA * ptr) \
{ \
return arr ## _len; \
} \
diff --git a/source/blender/makesrna/intern/rna_text_api.c b/source/blender/makesrna/intern/rna_text_api.c
index 3f511858332..338d0c7c52c 100644
--- a/source/blender/makesrna/intern/rna_text_api.c
+++ b/source/blender/makesrna/intern/rna_text_api.c
@@ -37,13 +37,13 @@
static void rna_Text_clear(Text *text)
{
- clear_text(text);
+ BKE_text_clear(text);
WM_main_add_notifier(NC_TEXT|NA_EDITED, text);
}
static void rna_Text_write(Text *text, const char *str)
{
- write_text(text, str);
+ BKE_text_write(text, str);
WM_main_add_notifier(NC_TEXT|NA_EDITED, text);
}
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c
index fab80997d08..e8253f4b51c 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -92,7 +92,7 @@ EnumPropertyItem blend_type_items[] = {
{MTEX_BLEND_VAL, "VALUE", 0, "Value", ""},
{MTEX_BLEND_COLOR, "COLOR", 0, "Color", ""},
{MTEX_SOFT_LIGHT, "SOFT_LIGHT", 0, "Soft Light", ""},
- {MTEX_LIN_LIGHT , "LINEAR_LIGHT", 0, "Linear Light", ""},
+ {MTEX_LIN_LIGHT, "LINEAR_LIGHT", 0, "Linear Light", ""},
{0, NULL, 0, NULL, NULL}};
#ifdef RNA_RUNTIME
@@ -134,8 +134,6 @@ static StructRNA *rna_Texture_refine(struct PointerRNA *ptr)
return &RNA_MusgraveTexture;
case TEX_NOISE:
return &RNA_NoiseTexture;
- case TEX_PLUGIN:
- return &RNA_PluginTexture;
case TEX_POINTDENSITY:
return &RNA_PointDensityTexture;
case TEX_STUCCI:
@@ -1302,17 +1300,6 @@ static void rna_def_texture_image(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Texture_update");
}
-static void rna_def_texture_plugin(BlenderRNA *brna)
-{
- StructRNA *srna;
-
- srna = RNA_def_struct(brna, "PluginTexture", "Texture");
- RNA_def_struct_ui_text(srna, "Plugin", "External plugin texture");
- RNA_def_struct_sdna(srna, "Tex");
-
- /* XXX: todo */
-}
-
static void rna_def_texture_environment_map(BlenderRNA *brna)
{
StructRNA *srna;
@@ -1571,19 +1558,19 @@ static void rna_def_texture_pointdensity(BlenderRNA *brna)
static EnumPropertyItem point_source_items[] = {
{TEX_PD_PSYS, "PARTICLE_SYSTEM", 0, "Particle System", "Generate point density from a particle system"},
{TEX_PD_OBJECT, "OBJECT", 0, "Object Vertices", "Generate point density from an object's vertices"},
- /*{TEX_PD_FILE, "FILE", 0 , "File", ""}, */
+ /*{TEX_PD_FILE, "FILE", 0, "File", ""}, */
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem particle_cache_items[] = {
{TEX_PD_OBJECTLOC, "OBJECT_LOCATION", 0, "Emit Object Location", ""},
{TEX_PD_OBJECTSPACE, "OBJECT_SPACE", 0, "Emit Object Space", ""},
- {TEX_PD_WORLDSPACE, "WORLD_SPACE", 0 , "Global Space", ""},
+ {TEX_PD_WORLDSPACE, "WORLD_SPACE", 0, "Global Space", ""},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem vertice_cache_items[] = {
{TEX_PD_OBJECTLOC, "OBJECT_LOCATION", 0, "Object Location", ""},
{TEX_PD_OBJECTSPACE, "OBJECT_SPACE", 0, "Object Space", ""},
- {TEX_PD_WORLDSPACE, "WORLD_SPACE", 0 , "Global Space", ""},
+ {TEX_PD_WORLDSPACE, "WORLD_SPACE", 0, "Global Space", ""},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem falloff_items[] = {
@@ -2013,7 +2000,6 @@ static void rna_def_texture(BlenderRNA *brna)
rna_def_texture_stucci(brna);
rna_def_texture_noise(brna);
rna_def_texture_image(brna);
- rna_def_texture_plugin(brna);
rna_def_texture_environment_map(brna);
rna_def_texture_musgrave(brna);
rna_def_texture_voronoi(brna);
diff --git a/source/blender/makesrna/intern/rna_texture_api.c b/source/blender/makesrna/intern/rna_texture_api.c
index 034696b43c5..b801dbb4fed 100644
--- a/source/blender/makesrna/intern/rna_texture_api.c
+++ b/source/blender/makesrna/intern/rna_texture_api.c
@@ -103,18 +103,18 @@ void RNA_api_environment_map(StructRNA *srna)
FunctionRNA *func;
PropertyRNA *parm;
- static const float default_layout[] = { 0,0, 1,0, 2,0, 0,1, 1,1, 2,1 };
+ static const float default_layout[] = {0, 0, 1, 0, 2, 0, 0, 1, 1, 1, 2, 1};
func = RNA_def_function(srna, "clear", "clear_envmap");
RNA_def_function_ui_description(func, "Discard the environment map and free it from memory");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
- func = RNA_def_function(srna,"save", "save_envmap");
+ func = RNA_def_function(srna, "save", "save_envmap");
RNA_def_function_ui_description(func, "Save the environment map to disc using the scene render settings");
RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
- parm = RNA_def_string_file_name(func,"filepath","",FILE_MAX,"File path","Location of the output file");
+ parm = RNA_def_string_file_name(func, "filepath", "", FILE_MAX, "File path", "Location of the output file");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_pointer(func, "scene", "Scene", "", "Overrides the scene from which image parameters are taken");
diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c
index c3a46c39643..5eb4e2190e4 100644
--- a/source/blender/makesrna/intern/rna_tracking.c
+++ b/source/blender/makesrna/intern/rna_tracking.c
@@ -265,7 +265,7 @@ static void rna_trackingCamera_focal_mm_set(PointerRNA *ptr, float value)
if (clip->lastsize[0])
value = clip->lastsize[0]*value/camera->sensor_width;
- if (value >= 0.0001)
+ if (value >= 0.0001f)
camera->focal = value;
}
@@ -607,6 +607,12 @@ static void rna_def_trackingSettings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Show Expanded", "Show the expanded in the user interface");
RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1);
+ /* solver settings */
+ prop = RNA_def_property(srna, "use_tripod_solver", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+ RNA_def_property_boolean_sdna(prop, NULL, "motion_flag", TRACKING_MOTION_TRIPOD);
+ RNA_def_property_ui_text(prop, "Tripod Motion", "Tracking footage is shooted by tripod camera and should use special sovler for this");
+
/* limit frames */
prop = RNA_def_property(srna, "default_frames_limit", PROP_INT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c
index 635dfb48b27..44ece727912 100644
--- a/source/blender/makesrna/intern/rna_ui.c
+++ b/source/blender/makesrna/intern/rna_ui.c
@@ -723,7 +723,7 @@ static void rna_def_panel(BlenderRNA *brna)
prop = RNA_def_property(srna, "bl_context", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "type->context");
- RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); /* should this be optional? - Campbell */
+ RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); /* Only used in Properties Editor and 3D View - Thomas */
RNA_def_property_ui_text(prop, "Context",
"The context in which the panel belongs to. (TODO: explain the "
"possible combinations bl_context/bl_region_type/bl_space_type)");
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index ae236da6952..7aaa4b75bbb 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -155,7 +155,7 @@ static void rna_userdef_gl_use_16bit_textures(Main *bmain, Scene *scene, Pointer
rna_userdef_update(bmain, scene, ptr);
}
-static void rna_userdef_select_mouse_set(PointerRNA *ptr,int value)
+static void rna_userdef_select_mouse_set(PointerRNA *ptr, int value)
{
UserDef *userdef = (UserDef*)ptr->data;
@@ -178,7 +178,7 @@ static int rna_userdef_autokeymode_get(PointerRNA *ptr)
return retval;
}
-static void rna_userdef_autokeymode_set(PointerRNA *ptr,int value)
+static void rna_userdef_autokeymode_set(PointerRNA *ptr, int value)
{
UserDef *userdef = (UserDef*)ptr->data;
@@ -1769,12 +1769,6 @@ static void rna_def_userdef_theme_space_seq(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Effect Strip", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop = RNA_def_property(srna, "plugin_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
- RNA_def_property_float_sdna(prop, NULL, "plugin");
- RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Plugin Strip", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
-
prop = RNA_def_property(srna, "transition_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "transition");
RNA_def_property_array(prop, 3);
@@ -2003,6 +1997,7 @@ static void rna_def_userdef_theme_space_clip(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Theme Clip Editor", "Theme settings for the Movie Clip Editor");
rna_def_userdef_theme_spaces_main(srna);
+ rna_def_userdef_theme_spaces_list_main(srna);
prop = RNA_def_property(srna, "marker_outline", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "marker_outline");
@@ -2077,6 +2072,18 @@ static void rna_def_userdef_theme_space_clip(BlenderRNA *brna)
RNA_def_property_range(prop, 0, 255);
RNA_def_property_ui_text(prop, "Handle Vertex Size", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
+
+ prop = RNA_def_property(srna, "strips", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_float_sdna(prop, NULL, "strip");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Strips", "");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
+
+ prop = RNA_def_property(srna, "strips_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_float_sdna(prop, NULL, "strip_select");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Strips Selected", "");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
}
static void rna_def_userdef_themes(BlenderRNA *brna)
@@ -2860,7 +2867,7 @@ static void rna_def_userdef_system(BlenderRNA *brna)
/* locale according to http://www.roseindia.net/tutorials/I18N/locales-list.shtml */
/* if you edit here, please also edit the source/blender/blenfont/intern/blf_lang.c 's locales */
/* Note: As this list is in alphabetical order, and not defined order,
- * here is the highest define currently in use: 30 (turkish). */
+ * here is the highest define currently in use: 31 (Hungarian). */
static EnumPropertyItem language_items[] = {
{ 0, "", 0, N_("Nearly done"), ""},
{ 0, "DEFAULT", 0, "Default (Default)", ""},
@@ -2878,20 +2885,21 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{10, "CATALAN", 0, "Catalan (Català)", "ca_AD"},
{16, "CROATIAN", 0, "Croatian (Hrvatski)", "hr_HR"},
{11, "CZECH", 0, "Czech (Český)", "cs_CZ"},
-/* { 3, "DUTCH", 0, "Dutch (Nederlandse taal)", "nl_NL"},*/ /* XXX No po's yet. */
+/* { 3, "DUTCH", 0, "Dutch (Nederlandse taal)", "nl_NL"}, */ /* XXX No po's yet. */
{ 6, "FINNISH", 0, "Finnish (Suomi)", "fi_FI"},
{ 5, "GERMAN", 0, "German (Deutsch)", "de_DE"},
{23, "GREEK", 0, "Greek (Ελληνικά)", "el_GR"},
+ {31, "HUNGARIAN", 0, "Hungarian (magyar)", "hu_HU"},
{27, "INDONESIAN", 0, "Indonesian (Bahasa indonesia)", "id_ID"},
{ 2, "JAPANESE", 0, "Japanese (日本語)", "ja_JP"},
{29, "KYRGYZ", 0, "Kyrgyz (Кыргыз тили)", "ky_KG"},
-/* {24, "KOREAN", 0, "Korean (한국 언어)", "ko_KR"},*/ /* XXX No po's yet. */
+/* {24, "KOREAN", 0, "Korean (한국 언어)", "ko_KR"}, */ /* XXX No po's yet. */
{25, "NEPALI", 0, "Nepali (नेपाली)", "ne_NP"},
/* using the utf8 flipped form of Persian (فارسی) */
{26, "PERSIAN", 0, "Persian (ﯽﺳﺭﺎﻓ)", "fa_IR"},
{19, "POLISH", 0, "Polish (Polski)", "pl_PL"},
{12, "BRAZILIAN_PORTUGUESE", 0, "Portuguese (Português)", "pt"},
-/* {20, "ROMANIAN", 0, "Romanian (Român)", "ro_RO"},*/ /* XXX No po's yet. */
+/* {20, "ROMANIAN", 0, "Romanian (Român)", "ro_RO"}, */ /* XXX No po's yet. */
{17, "SERBIAN", 0, "Serbian (Српски)", "sr_RS"},
{28, "SERBIAN_LATIN", 0, "Serbian latin (Srpski latinica)", "sr_RS@latin"},
{ 7, "SWEDISH", 0, "Swedish (Svenska)", "sv_SE"},
@@ -3373,15 +3381,6 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna)
RNA_def_property_string_sdna(prop, NULL, "textudir");
RNA_def_property_ui_text(prop, "Textures Directory", "The default directory to search for textures");
- prop = RNA_def_property(srna, "texture_plugin_directory", PROP_STRING, PROP_DIRPATH);
- RNA_def_property_string_sdna(prop, NULL, "plugtexdir");
- RNA_def_property_ui_text(prop, "Texture Plugin Directory", "The default directory to search for texture plugins");
-
- prop = RNA_def_property(srna, "sequence_plugin_directory", PROP_STRING, PROP_DIRPATH);
- RNA_def_property_string_sdna(prop, NULL, "plugseqdir");
- RNA_def_property_ui_text(prop, "Sequence Plugin Directory",
- "The default directory to search for sequence plugins");
-
prop = RNA_def_property(srna, "render_output_directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "renderdir");
RNA_def_property_ui_text(prop, "Render Output Directory",
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index 8c4b7917cb8..0eb4ef1c5c9 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -665,13 +665,15 @@ static int rna_KeyMapItem_any_getf(PointerRNA *ptr)
wmKeyMapItem *kmi = (wmKeyMapItem*)ptr->data;
if (kmi->shift == KM_ANY &&
- kmi->ctrl == KM_ANY &&
- kmi->alt == KM_ANY &&
- kmi->oskey == KM_ANY)
-
+ kmi->ctrl == KM_ANY &&
+ kmi->alt == KM_ANY &&
+ kmi->oskey == KM_ANY)
+ {
return 1;
- else
+ }
+ else {
return 0;
+ }
}
static void rna_KeyMapItem_any_setf(PointerRNA *ptr, int value)
diff --git a/source/blender/makesrna/rna_cleanup/rna_cleaner.py b/source/blender/makesrna/rna_cleanup/rna_cleaner.py
index ca610eeb024..b75d177d809 100755
--- a/source/blender/makesrna/rna_cleanup/rna_cleaner.py
+++ b/source/blender/makesrna/rna_cleanup/rna_cleaner.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python3
+#!/usr/bin/env python3.2
"""
This script is used to help cleaning RNA api.
diff --git a/source/blender/makesrna/rna_cleanup/rna_cleaner_merge.py b/source/blender/makesrna/rna_cleanup/rna_cleaner_merge.py
index 89d95b5a627..75851105991 100755
--- a/source/blender/makesrna/rna_cleanup/rna_cleaner_merge.py
+++ b/source/blender/makesrna/rna_cleanup/rna_cleaner_merge.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python3
+#!/usr/bin/env python3.2
import sys
diff --git a/source/blender/modifiers/intern/MOD_armature.c b/source/blender/modifiers/intern/MOD_armature.c
index fd9730238f5..ce4d726e072 100644
--- a/source/blender/modifiers/intern/MOD_armature.c
+++ b/source/blender/modifiers/intern/MOD_armature.c
@@ -56,15 +56,15 @@
static void initData(ModifierData *md)
{
- ArmatureModifierData *amd = (ArmatureModifierData*) md;
+ ArmatureModifierData *amd = (ArmatureModifierData *) md;
amd->deformflag = ARM_DEF_ENVELOPE | ARM_DEF_VGROUP;
}
static void copyData(ModifierData *md, ModifierData *target)
{
- ArmatureModifierData *amd = (ArmatureModifierData*) md;
- ArmatureModifierData *tamd = (ArmatureModifierData*) target;
+ ArmatureModifierData *amd = (ArmatureModifierData *) md;
+ ArmatureModifierData *tamd = (ArmatureModifierData *) target;
tamd->object = amd->object;
tamd->deformflag = amd->deformflag;
@@ -84,27 +84,27 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *UNUSED(
static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
{
- ArmatureModifierData *amd = (ArmatureModifierData*) md;
+ ArmatureModifierData *amd = (ArmatureModifierData *) md;
return !amd->object;
}
static void foreachObjectLink(
- ModifierData *md, Object *ob,
- void (*walk)(void *userData, Object *ob, Object **obpoin),
- void *userData)
+ ModifierData *md, Object *ob,
+ void (*walk)(void *userData, Object *ob, Object **obpoin),
+ void *userData)
{
- ArmatureModifierData *amd = (ArmatureModifierData*) md;
+ ArmatureModifierData *amd = (ArmatureModifierData *) md;
walk(userData, ob, &amd->object);
}
static void updateDepgraph(ModifierData *md, DagForest *forest,
- struct Scene *UNUSED(scene),
- Object *UNUSED(ob),
- DagNode *obNode)
+ struct Scene *UNUSED(scene),
+ Object *UNUSED(ob),
+ DagNode *obNode)
{
- ArmatureModifierData *amd = (ArmatureModifierData*) md;
+ ArmatureModifierData *amd = (ArmatureModifierData *) md;
if (amd->object) {
DagNode *curNode = dag_get_node(forest, amd->object);
@@ -115,31 +115,31 @@ static void updateDepgraph(ModifierData *md, DagForest *forest,
}
static void deformVerts(ModifierData *md, Object *ob,
- DerivedMesh *derivedData,
- float (*vertexCos)[3],
- int numVerts,
- int UNUSED(useRenderParams),
- int UNUSED(isFinalCalc))
+ DerivedMesh *derivedData,
+ float (*vertexCos)[3],
+ int numVerts,
+ int UNUSED(useRenderParams),
+ int UNUSED(isFinalCalc))
{
- ArmatureModifierData *amd = (ArmatureModifierData*) md;
+ ArmatureModifierData *amd = (ArmatureModifierData *) md;
modifier_vgroup_cache(md, vertexCos); /* if next modifier needs original vertices */
armature_deform_verts(amd->object, ob, derivedData, vertexCos, NULL,
- numVerts, amd->deformflag, (float(*)[3])amd->prevCos, amd->defgrp_name);
+ numVerts, amd->deformflag, (float(*)[3])amd->prevCos, amd->defgrp_name);
/* free cache */
if (amd->prevCos) {
MEM_freeN(amd->prevCos);
- amd->prevCos= NULL;
+ amd->prevCos = NULL;
}
}
static void deformVertsEM(
- ModifierData *md, Object *ob, struct BMEditMesh *editData,
- DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
+ ModifierData *md, Object *ob, struct BMEditMesh *editData,
+ DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
{
- ArmatureModifierData *amd = (ArmatureModifierData*) md;
+ ArmatureModifierData *amd = (ArmatureModifierData *) md;
DerivedMesh *dm = derivedData;
if (!derivedData) dm = CDDM_from_BMEditMesh(editData, ob->data, FALSE, FALSE);
@@ -147,23 +147,23 @@ static void deformVertsEM(
modifier_vgroup_cache(md, vertexCos); /* if next modifier needs original vertices */
armature_deform_verts(amd->object, ob, dm, vertexCos, NULL,
- numVerts, amd->deformflag, (float(*)[3])amd->prevCos, amd->defgrp_name);
+ numVerts, amd->deformflag, (float(*)[3])amd->prevCos, amd->defgrp_name);
/* free cache */
if (amd->prevCos) {
MEM_freeN(amd->prevCos);
- amd->prevCos= NULL;
+ amd->prevCos = NULL;
}
if (!derivedData) dm->release(dm);
}
static void deformMatricesEM(
- ModifierData *md, Object *ob, struct BMEditMesh *editData,
- DerivedMesh *derivedData, float (*vertexCos)[3],
- float (*defMats)[3][3], int numVerts)
+ ModifierData *md, Object *ob, struct BMEditMesh *editData,
+ DerivedMesh *derivedData, float (*vertexCos)[3],
+ float (*defMats)[3][3], int numVerts)
{
- ArmatureModifierData *amd = (ArmatureModifierData*) md;
+ ArmatureModifierData *amd = (ArmatureModifierData *) md;
DerivedMesh *dm = derivedData;
if (!derivedData) dm = CDDM_from_BMEditMesh(editData, ob->data, FALSE, FALSE);
@@ -175,12 +175,12 @@ static void deformMatricesEM(
}
static void deformMatrices(ModifierData *md, Object *ob, DerivedMesh *derivedData,
- float (*vertexCos)[3], float (*defMats)[3][3], int numVerts)
+ float (*vertexCos)[3], float (*defMats)[3][3], int numVerts)
{
- ArmatureModifierData *amd = (ArmatureModifierData*) md;
+ ArmatureModifierData *amd = (ArmatureModifierData *) md;
DerivedMesh *dm = derivedData;
- if (!derivedData) dm = CDDM_from_mesh((Mesh*)ob->data, ob);
+ if (!derivedData) dm = CDDM_from_mesh((Mesh *)ob->data, ob);
armature_deform_verts(amd->object, ob, dm, vertexCos, defMats, numVerts,
amd->deformflag, NULL, amd->defgrp_name);
@@ -193,8 +193,8 @@ ModifierTypeInfo modifierType_Armature = {
/* structName */ "ArmatureModifierData",
/* structSize */ sizeof(ArmatureModifierData),
/* type */ eModifierTypeType_OnlyDeform,
- /* flags */ eModifierTypeFlag_AcceptsCVs
- | eModifierTypeFlag_SupportsEditmode,
+ /* flags */ eModifierTypeFlag_AcceptsCVs |
+ eModifierTypeFlag_SupportsEditmode,
/* copyData */ copyData,
/* deformVerts */ deformVerts,
diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c
index 1fe4f92e124..36f668ca758 100644
--- a/source/blender/modifiers/intern/MOD_array.c
+++ b/source/blender/modifiers/intern/MOD_array.c
@@ -63,7 +63,7 @@
static void initData(ModifierData *md)
{
- ArrayModifierData *amd = (ArrayModifierData*) md;
+ ArrayModifierData *amd = (ArrayModifierData *) md;
/* default to 2 duplicates distributed along the x-axis by an
* offset of 1 object-width
@@ -82,8 +82,8 @@ static void initData(ModifierData *md)
static void copyData(ModifierData *md, ModifierData *target)
{
- ArrayModifierData *amd = (ArrayModifierData*) md;
- ArrayModifierData *tamd = (ArrayModifierData*) target;
+ ArrayModifierData *amd = (ArrayModifierData *) md;
+ ArrayModifierData *tamd = (ArrayModifierData *) target;
tamd->start_cap = amd->start_cap;
tamd->end_cap = amd->end_cap;
@@ -100,11 +100,11 @@ static void copyData(ModifierData *md, ModifierData *target)
}
static void foreachObjectLink(
- ModifierData *md, Object *ob,
- void (*walk)(void *userData, Object *ob, Object **obpoin),
- void *userData)
+ ModifierData *md, Object *ob,
+ void (*walk)(void *userData, Object *ob, Object **obpoin),
+ void *userData)
{
- ArrayModifierData *amd = (ArrayModifierData*) md;
+ ArrayModifierData *amd = (ArrayModifierData *) md;
walk(userData, ob, &amd->start_cap);
walk(userData, ob, &amd->end_cap);
@@ -113,9 +113,9 @@ static void foreachObjectLink(
}
static void updateDepgraph(ModifierData *md, DagForest *forest,
- struct Scene *UNUSED(scene), Object *UNUSED(ob), DagNode *obNode)
+ struct Scene *UNUSED(scene), Object *UNUSED(ob), DagNode *obNode)
{
- ArrayModifierData *amd = (ArrayModifierData*) md;
+ ArrayModifierData *amd = (ArrayModifierData *) md;
if (amd->start_cap) {
DagNode *curNode = dag_get_node(forest, amd->start_cap);
@@ -153,7 +153,7 @@ static float vertarray_size(MVert *mvert, int numVerts, int axis)
/* find the minimum and maximum coordinates on the desired axis */
min_co = max_co = mvert->co[axis];
- ++mvert;
+ mvert++;
for (i = 1; i < numVerts; ++i, ++mvert) {
if (mvert->co[axis] < min_co) min_co = mvert->co[axis];
if (mvert->co[axis] > max_co) max_co = mvert->co[axis];
@@ -163,8 +163,8 @@ static float vertarray_size(MVert *mvert, int numVerts, int axis)
}
static int *find_doubles_index_map(BMesh *bm, BMOperator *dupe_op,
- const ArrayModifierData *amd,
- int *index_map_length)
+ const ArrayModifierData *amd,
+ int *index_map_length)
{
BMOperator find_op;
BMOIter oiter;
@@ -173,8 +173,8 @@ static int *find_doubles_index_map(BMesh *bm, BMOperator *dupe_op,
int *index_map, i;
BMO_op_initf(bm, &find_op,
- "finddoubles verts=%av dist=%f keepverts=%s",
- amd->merge_dist, dupe_op, "geom");
+ "finddoubles verts=%av dist=%f keepverts=%s",
+ amd->merge_dist, dupe_op, "geom");
BMO_op_exec(bm, &find_op);
@@ -214,11 +214,11 @@ static int *find_doubles_index_map(BMesh *bm, BMOperator *dupe_op,
*
* All verts will be tagged on exit.
*/
-static void bm_merge_dm_transform(BMesh* bm, DerivedMesh *dm, float mat[4][4],
- const ArrayModifierData *amd,
- BMOperator *dupe_op,
- const char *dupe_slot_name,
- BMOperator *weld_op)
+static void bm_merge_dm_transform(BMesh *bm, DerivedMesh *dm, float mat[4][4],
+ const ArrayModifierData *amd,
+ BMOperator *dupe_op,
+ const char *dupe_slot_name,
+ BMOperator *weld_op)
{
BMVert *v, *v2;
BMIter iter;
@@ -232,9 +232,9 @@ static void bm_merge_dm_transform(BMesh* bm, DerivedMesh *dm, float mat[4][4],
BMOperator find_op;
BMO_op_initf(bm, &find_op,
- "finddoubles verts=%Hv dist=%f keepverts=%s",
- BM_ELEM_TAG, amd->merge_dist,
- dupe_op, dupe_slot_name);
+ "finddoubles verts=%Hv dist=%f keepverts=%s",
+ BM_ELEM_TAG, amd->merge_dist,
+ dupe_op, dupe_slot_name);
/* append the dupe's geom to the findop input verts */
BMO_slot_buffer_append(&find_op, "verts", dupe_op, dupe_slot_name);
@@ -268,20 +268,20 @@ static void bm_merge_dm_transform(BMesh* bm, DerivedMesh *dm, float mat[4][4],
}
}
-static void merge_first_last(BMesh* bm,
- const ArrayModifierData *amd,
- BMOperator *dupe_first,
- BMOperator *dupe_last,
- BMOperator *weld_op)
+static void merge_first_last(BMesh *bm,
+ const ArrayModifierData *amd,
+ BMOperator *dupe_first,
+ BMOperator *dupe_last,
+ BMOperator *weld_op)
{
BMOperator find_op;
BMOIter oiter;
BMVert *v, *v2;
BMO_op_initf(bm, &find_op,
- "finddoubles verts=%s dist=%f keepverts=%s",
- dupe_first, "geom", amd->merge_dist,
- dupe_first, "geom");
+ "finddoubles verts=%s dist=%f keepverts=%s",
+ dupe_first, "geom", amd->merge_dist,
+ dupe_first, "geom");
/* append the last dupe's geom to the findop input verts */
BMO_slot_buffer_append(&find_op, "verts", dupe_last, "newout");
@@ -331,8 +331,7 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
add_v3_v3v3(offset[3], offset[3], amd->offset);
if (amd->offset_type & MOD_ARR_OFF_RELATIVE) {
for (j = 0; j < 3; j++)
- offset[3][j] += amd->scale[j] * vertarray_size(src_mvert,
- maxVerts, j);
+ offset[3][j] += amd->scale[j] * vertarray_size(src_mvert, maxVerts, j);
}
if ((amd->offset_type & MOD_ARR_OFF_OBJ) && (amd->offset_ob)) {
@@ -356,15 +355,15 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
float tmp_mat[3][3];
float scale;
- object_to_mat3(amd->curve_ob, tmp_mat);
+ BKE_object_to_mat3(amd->curve_ob, tmp_mat);
scale = mat3_to_scale(tmp_mat);
if (!cu->path) {
cu->flag |= CU_PATH; // needed for path & bevlist
- makeDispListCurveTypes(scene, amd->curve_ob, 0);
+ BKE_displist_make_curveTypes(scene, amd->curve_ob, 0);
}
if (cu->path)
- length = scale*cu->path->totdist;
+ length = scale * cu->path->totdist;
}
}
@@ -388,7 +387,7 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
/* calculate the offset matrix of the final copy (for merging) */
unit_m4(final_offset);
- for (j=0; j < count - 1; j++) {
+ for (j = 0; j < count - 1; j++) {
mult_m4_m4m4(tmp_mat, offset, final_offset);
copy_m4_m4(final_offset, tmp_mat);
}
@@ -408,7 +407,7 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
BMO_op_initf(em->bm, &dupe_op, "dupe geom=%avef");
first_dupe_op = dupe_op;
- for (j=0; j < count - 1; j++) {
+ for (j = 0; j < count - 1; j++) {
BMVert *v, *v2, *v3;
BMOpSlot *geom_slot;
BMOpSlot *newout_slot;
@@ -422,7 +421,7 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
newout_slot = BMO_slot_get(&dupe_op, "newout");
if ((amd->flags & MOD_ARR_MERGEFINAL) && j == 0) {
- int first_geom_bytes = sizeof(BMVert*) * geom_slot->len;
+ int first_geom_bytes = sizeof(BMVert *) * geom_slot->len;
/* make a copy of the initial geometry ordering so the
* last duplicate can be merged into it */
@@ -439,17 +438,17 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
/*calculate merge mapping*/
if (j == 0) {
indexMap = find_doubles_index_map(em->bm, &dupe_op,
- amd, &indexLen);
+ amd, &indexLen);
}
#define _E(s, i) ((BMVert **)(s)->data.buf)[i]
- for (i=0; i<indexLen; i++) {
+ for (i = 0; i < indexLen; i++) {
if (!indexMap[i]) continue;
/* merge v (from 'newout') into v2 (from old 'geom') */
v = _E(newout_slot, i - geom_slot->len);
- v2 = _E(geom_slot, indexMap[i]-1);
+ v2 = _E(geom_slot, indexMap[i] - 1);
/* check in case the target vertex (v2) is already marked
* for merging */
@@ -493,14 +492,14 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
float startoffset[4][4];
invert_m4_m4(startoffset, offset);
bm_merge_dm_transform(em->bm, start_cap, startoffset, amd,
- &first_dupe_op, "geom", &weld_op);
+ &first_dupe_op, "geom", &weld_op);
}
if (end_cap) {
float endoffset[4][4];
mult_m4_m4m4(endoffset, offset, final_offset);
bm_merge_dm_transform(em->bm, end_cap, endoffset, amd,
- &dupe_op, count == 1 ? "geom" : "newout", &weld_op);
+ &dupe_op, count == 1 ? "geom" : "newout", &weld_op);
}
}
/* done capping */
@@ -542,12 +541,12 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
}
static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
- DerivedMesh *dm,
- int UNUSED(useRenderParams),
- int UNUSED(isFinalCalc))
+ DerivedMesh *dm,
+ int UNUSED(useRenderParams),
+ int UNUSED(isFinalCalc))
{
DerivedMesh *result;
- ArrayModifierData *amd = (ArrayModifierData*) md;
+ ArrayModifierData *amd = (ArrayModifierData *) md;
result = arrayModifier_doArray(amd, md->scene, ob, dm, 0);
@@ -558,8 +557,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
}
static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob,
- struct BMEditMesh *UNUSED(editData),
- DerivedMesh *dm)
+ struct BMEditMesh *UNUSED(editData),
+ DerivedMesh *dm)
{
return applyModifier(md, ob, dm, 0, 1);
}
@@ -570,11 +569,11 @@ ModifierTypeInfo modifierType_Array = {
/* structName */ "ArrayModifierData",
/* structSize */ sizeof(ArrayModifierData),
/* type */ eModifierTypeType_Constructive,
- /* flags */ eModifierTypeFlag_AcceptsMesh
- | eModifierTypeFlag_SupportsMapping
- | eModifierTypeFlag_SupportsEditmode
- | eModifierTypeFlag_EnableInEditmode
- | eModifierTypeFlag_AcceptsCVs,
+ /* flags */ eModifierTypeFlag_AcceptsMesh |
+ eModifierTypeFlag_SupportsMapping |
+ eModifierTypeFlag_SupportsEditmode |
+ eModifierTypeFlag_EnableInEditmode |
+ eModifierTypeFlag_AcceptsCVs,
/* copyData */ copyData,
/* deformVerts */ NULL,
diff --git a/source/blender/modifiers/intern/MOD_bevel.c b/source/blender/modifiers/intern/MOD_bevel.c
index 613dfee8997..042dd5c3f2b 100644
--- a/source/blender/modifiers/intern/MOD_bevel.c
+++ b/source/blender/modifiers/intern/MOD_bevel.c
@@ -50,7 +50,7 @@
static void initData(ModifierData *md)
{
- BevelModifierData *bmd = (BevelModifierData*) md;
+ BevelModifierData *bmd = (BevelModifierData *) md;
bmd->value = 0.1f;
bmd->res = 1;
@@ -64,8 +64,8 @@ static void initData(ModifierData *md)
static void copyData(ModifierData *md, ModifierData *target)
{
- BevelModifierData *bmd = (BevelModifierData*) md;
- BevelModifierData *tbmd = (BevelModifierData*) target;
+ BevelModifierData *bmd = (BevelModifierData *) md;
+ BevelModifierData *tbmd = (BevelModifierData *) target;
tbmd->value = bmd->value;
tbmd->res = bmd->res;
@@ -88,7 +88,7 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
return dataMask;
}
-#define EDGE_MARK 1
+#define EDGE_MARK 1
#ifdef USE_BM_BEVEL_OP_AS_MOD
@@ -115,7 +115,7 @@ static DerivedMesh *applyModifier(ModifierData *md, struct Object *UNUSED(ob),
BMEditMesh *em;
BMIter iter;
BMEdge *e;
- BevelModifierData *bmd = (BevelModifierData*) md;
+ BevelModifierData *bmd = (BevelModifierData *) md;
float threshold = cos((bmd->bevel_angle + 0.00001) * M_PI / 180.0);
em = DM_to_editbmesh(dm, NULL, FALSE);
@@ -128,8 +128,8 @@ static DerivedMesh *applyModifier(ModifierData *md, struct Object *UNUSED(ob),
BM_ITER_MESH (e, &iter, bm, BM_EDGES_OF_MESH) {
/* check for 1 edge having 2 face users */
BMLoop *l1, *l2;
- if ( (l1= e->l) &&
- (l2= e->l->radial_next) != l1)
+ if ((l1 = e->l) &&
+ (l2 = e->l->radial_next) != l1)
{
if (dot_v3v3(l1->f->no, l2->f->no) < threshold) {
BMO_elem_flag_enable(bm, e, EDGE_MARK);
@@ -160,16 +160,16 @@ static DerivedMesh *applyModifier(ModifierData *md, struct Object *UNUSED(ob),
#else /* from trunk, see note above */
static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob),
- DerivedMesh *derivedData,
- int UNUSED(useRenderParams),
- int UNUSED(isFinalCalc))
+ DerivedMesh *derivedData,
+ int UNUSED(useRenderParams),
+ int UNUSED(isFinalCalc))
{
DerivedMesh *result;
BMEditMesh *em;
/*bDeformGroup *def;*/
int /*i,*/ options, defgrp_index = -1;
- BevelModifierData *bmd = (BevelModifierData*) md;
+ BevelModifierData *bmd = (BevelModifierData *) md;
options = bmd->flags | bmd->val_flags | bmd->lim_flags | bmd->e_flags;
@@ -199,37 +199,37 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob),
#endif
static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob,
- struct BMEditMesh *UNUSED(editData),
- DerivedMesh *derivedData)
+ struct BMEditMesh *UNUSED(editData),
+ DerivedMesh *derivedData)
{
return applyModifier(md, ob, derivedData, 0, 1);
}
ModifierTypeInfo modifierType_Bevel = {
- /* name */ "Bevel",
- /* structName */ "BevelModifierData",
- /* structSize */ sizeof(BevelModifierData),
- /* type */ eModifierTypeType_Constructive,
- /* flags */ eModifierTypeFlag_AcceptsMesh
- | eModifierTypeFlag_SupportsEditmode
- | eModifierTypeFlag_EnableInEditmode,
-
- /* copyData */ copyData,
- /* deformVerts */ NULL,
- /* deformMatrices */ NULL,
- /* deformVertsEM */ NULL,
- /* deformMatricesEM */ NULL,
- /* applyModifier */ applyModifier,
- /* applyModifierEM */ applyModifierEM,
- /* initData */ initData,
- /* requiredDataMask */ requiredDataMask,
- /* freeData */ NULL,
- /* isDisabled */ NULL,
- /* updateDepgraph */ NULL,
- /* dependsOnTime */ NULL,
- /* dependsOnNormals */ NULL,
+ /* name */ "Bevel",
+ /* structName */ "BevelModifierData",
+ /* structSize */ sizeof(BevelModifierData),
+ /* type */ eModifierTypeType_Constructive,
+ /* flags */ eModifierTypeFlag_AcceptsMesh |
+ eModifierTypeFlag_SupportsEditmode |
+ eModifierTypeFlag_EnableInEditmode,
+
+ /* copyData */ copyData,
+ /* deformVerts */ NULL,
+ /* deformMatrices */ NULL,
+ /* deformVertsEM */ NULL,
+ /* deformMatricesEM */ NULL,
+ /* applyModifier */ applyModifier,
+ /* applyModifierEM */ applyModifierEM,
+ /* initData */ initData,
+ /* requiredDataMask */ requiredDataMask,
+ /* freeData */ NULL,
+ /* isDisabled */ NULL,
+ /* updateDepgraph */ NULL,
+ /* dependsOnTime */ NULL,
+ /* dependsOnNormals */ NULL,
/* foreachObjectLink */ NULL,
- /* foreachIDLink */ NULL,
- /* foreachTexLink */ NULL,
+ /* foreachIDLink */ NULL,
+ /* foreachTexLink */ NULL,
};
diff --git a/source/blender/modifiers/intern/MOD_boolean.c b/source/blender/modifiers/intern/MOD_boolean.c
index e4e89db403d..cf4605c3b40 100644
--- a/source/blender/modifiers/intern/MOD_boolean.c
+++ b/source/blender/modifiers/intern/MOD_boolean.c
@@ -52,8 +52,8 @@
static void copyData(ModifierData *md, ModifierData *target)
{
- BooleanModifierData *bmd = (BooleanModifierData*) md;
- BooleanModifierData *tbmd = (BooleanModifierData*) target;
+ BooleanModifierData *bmd = (BooleanModifierData *) md;
+ BooleanModifierData *tbmd = (BooleanModifierData *) target;
tbmd->object = bmd->object;
tbmd->operation = bmd->operation;
@@ -61,27 +61,27 @@ static void copyData(ModifierData *md, ModifierData *target)
static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
{
- BooleanModifierData *bmd = (BooleanModifierData*) md;
+ BooleanModifierData *bmd = (BooleanModifierData *) md;
return !bmd->object;
}
static void foreachObjectLink(
- ModifierData *md, Object *ob,
- void (*walk)(void *userData, Object *ob, Object **obpoin),
- void *userData)
+ ModifierData *md, Object *ob,
+ void (*walk)(void *userData, Object *ob, Object **obpoin),
+ void *userData)
{
- BooleanModifierData *bmd = (BooleanModifierData*) md;
+ BooleanModifierData *bmd = (BooleanModifierData *) md;
walk(userData, ob, &bmd->object);
}
static void updateDepgraph(ModifierData *md, DagForest *forest,
- struct Scene *UNUSED(scene),
- Object *UNUSED(ob),
- DagNode *obNode)
+ struct Scene *UNUSED(scene),
+ Object *UNUSED(ob),
+ DagNode *obNode)
{
- BooleanModifierData *bmd = (BooleanModifierData*) md;
+ BooleanModifierData *bmd = (BooleanModifierData *) md;
if (bmd->object) {
DagNode *curNode = dag_get_node(forest, bmd->object);
@@ -97,7 +97,7 @@ static DerivedMesh *get_quick_derivedMesh(DerivedMesh *derivedData, DerivedMesh
DerivedMesh *result = NULL;
if (derivedData->getNumPolys(derivedData) == 0 || dm->getNumPolys(dm) == 0) {
- switch(operation) {
+ switch (operation) {
case eBooleanModifierOp_Intersect:
result = CDDM_new(0, 0, 0, 0, 0);
break;
@@ -118,11 +118,11 @@ static DerivedMesh *get_quick_derivedMesh(DerivedMesh *derivedData, DerivedMesh
}
static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
- DerivedMesh *derivedData,
- int UNUSED(useRenderParams),
- int UNUSED(isFinalCalc))
+ DerivedMesh *derivedData,
+ int UNUSED(useRenderParams),
+ int UNUSED(isFinalCalc))
{
- BooleanModifierData *bmd = (BooleanModifierData*) md;
+ BooleanModifierData *bmd = (BooleanModifierData *) md;
DerivedMesh *dm;
if (!bmd->object)
@@ -146,7 +146,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
// TIMEIT_START(NewBooleanDerivedMesh)
result = NewBooleanDerivedMesh(dm, bmd->object, derivedData, ob,
- 1 + bmd->operation);
+ 1 + bmd->operation);
// TIMEIT_END(NewBooleanDerivedMesh)
}
@@ -163,9 +163,9 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
}
#else // WITH_MOD_BOOLEAN
static DerivedMesh *applyModifier(ModifierData *UNUSED(md), Object *UNUSED(ob),
- DerivedMesh *derivedData,
- int UNUSED(useRenderParams),
- int UNUSED(isFinalCalc))
+ DerivedMesh *derivedData,
+ int UNUSED(useRenderParams),
+ int UNUSED(isFinalCalc))
{
return derivedData;
}
@@ -182,28 +182,28 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *UNUSED(
ModifierTypeInfo modifierType_Boolean = {
- /* name */ "Boolean",
- /* structName */ "BooleanModifierData",
- /* structSize */ sizeof(BooleanModifierData),
- /* type */ eModifierTypeType_Nonconstructive,
- /* flags */ eModifierTypeFlag_AcceptsMesh
- | eModifierTypeFlag_UsesPointCache,
-
- /* copyData */ copyData,
- /* deformVerts */ NULL,
- /* deformMatrices */ NULL,
- /* deformVertsEM */ NULL,
- /* deformMatricesEM */ NULL,
- /* applyModifier */ applyModifier,
- /* applyModifierEM */ NULL,
- /* initData */ NULL,
- /* requiredDataMask */ requiredDataMask,
- /* freeData */ NULL,
- /* isDisabled */ isDisabled,
- /* updateDepgraph */ updateDepgraph,
- /* dependsOnTime */ NULL,
- /* dependsOnNormals */ NULL,
+ /* name */ "Boolean",
+ /* structName */ "BooleanModifierData",
+ /* structSize */ sizeof(BooleanModifierData),
+ /* type */ eModifierTypeType_Nonconstructive,
+ /* flags */ eModifierTypeFlag_AcceptsMesh |
+ eModifierTypeFlag_UsesPointCache,
+
+ /* copyData */ copyData,
+ /* deformVerts */ NULL,
+ /* deformMatrices */ NULL,
+ /* deformVertsEM */ NULL,
+ /* deformMatricesEM */ NULL,
+ /* applyModifier */ applyModifier,
+ /* applyModifierEM */ NULL,
+ /* initData */ NULL,
+ /* requiredDataMask */ requiredDataMask,
+ /* freeData */ NULL,
+ /* isDisabled */ isDisabled,
+ /* updateDepgraph */ updateDepgraph,
+ /* dependsOnTime */ NULL,
+ /* dependsOnNormals */ NULL,
/* foreachObjectLink */ foreachObjectLink,
- /* foreachIDLink */ NULL,
- /* foreachTexLink */ NULL,
+ /* foreachIDLink */ NULL,
+ /* foreachTexLink */ NULL,
};
diff --git a/source/blender/modifiers/intern/MOD_boolean_util.c b/source/blender/modifiers/intern/MOD_boolean_util.c
index 8341bc67107..39344aad5a9 100644
--- a/source/blender/modifiers/intern/MOD_boolean_util.c
+++ b/source/blender/modifiers/intern/MOD_boolean_util.c
@@ -70,7 +70,7 @@ typedef struct {
* These describe a blender mesh to the CSG module.
*/
-static void VertexIt_Destruct(CSG_VertexIteratorDescriptor * iterator)
+static void VertexIt_Destruct(CSG_VertexIteratorDescriptor *iterator)
{
if (iterator->it) {
// deallocate memory for iterator
@@ -87,23 +87,23 @@ static void VertexIt_Destruct(CSG_VertexIteratorDescriptor * iterator)
static int VertexIt_Done(CSG_IteratorPtr it)
{
- VertexIt * iterator = (VertexIt *)it;
+ VertexIt *iterator = (VertexIt *)it;
return(iterator->pos >= iterator->dm->getNumVerts(iterator->dm));
}
static void VertexIt_Fill(CSG_IteratorPtr it, CSG_IVertex *vert)
{
- VertexIt * iterator = (VertexIt *)it;
+ VertexIt *iterator = (VertexIt *)it;
MVert *verts = iterator->dm->getVertArray(iterator->dm);
float global_pos[3];
/* boolean happens in global space, transform both with obmat */
mul_v3_m4v3(
- global_pos,
- iterator->ob->obmat,
- verts[iterator->pos].co
- );
+ global_pos,
+ iterator->ob->obmat,
+ verts[iterator->pos].co
+ );
vert->position[0] = global_pos[0];
vert->position[1] = global_pos[1];
@@ -112,13 +112,13 @@ static void VertexIt_Fill(CSG_IteratorPtr it, CSG_IVertex *vert)
static void VertexIt_Step(CSG_IteratorPtr it)
{
- VertexIt * iterator = (VertexIt *)it;
- iterator->pos ++;
+ VertexIt *iterator = (VertexIt *)it;
+ iterator->pos++;
}
static void VertexIt_Reset(CSG_IteratorPtr it)
{
- VertexIt * iterator = (VertexIt *)it;
+ VertexIt *iterator = (VertexIt *)it;
iterator->pos = 0;
}
@@ -129,7 +129,7 @@ static void VertexIt_Construct(CSG_VertexIteratorDescriptor *output, DerivedMesh
if (output == 0) return;
// allocate some memory for blender iterator
- it = (VertexIt *)(MEM_mallocN(sizeof(VertexIt),"Boolean_VIt"));
+ it = (VertexIt *)(MEM_mallocN(sizeof(VertexIt), "Boolean_VIt"));
if (it == 0) {
return;
}
@@ -139,7 +139,7 @@ static void VertexIt_Construct(CSG_VertexIteratorDescriptor *output, DerivedMesh
it->pos = 0;
- // assign iterator function pointers.
+ // assign iterator function pointers.
output->Step = VertexIt_Step;
output->Fill = VertexIt_Fill;
output->Done = VertexIt_Done;
@@ -159,7 +159,7 @@ typedef struct {
int flip;
} FaceIt;
-static void FaceIt_Destruct(CSG_FaceIteratorDescriptor * iterator)
+static void FaceIt_Destruct(CSG_FaceIteratorDescriptor *iterator)
{
MEM_freeN(iterator->it);
iterator->Done = NULL;
@@ -172,7 +172,7 @@ static void FaceIt_Destruct(CSG_FaceIteratorDescriptor * iterator)
static int FaceIt_Done(CSG_IteratorPtr it)
{
// assume CSG_IteratorPtr is of the correct type.
- FaceIt * iterator = (FaceIt *)it;
+ FaceIt *iterator = (FaceIt *)it;
return(iterator->pos >= iterator->dm->getNumTessFaces(iterator->dm));
}
@@ -185,9 +185,9 @@ static void FaceIt_Fill(CSG_IteratorPtr it, CSG_IFace *face)
/* reverse face vertices if necessary */
face->vertex_index[1] = mface->v2;
- if ( face_it->flip == 0 ) {
- face->vertex_index[0] = mface->v1;
- face->vertex_index[2] = mface->v3;
+ if (face_it->flip == 0) {
+ face->vertex_index[0] = mface->v1;
+ face->vertex_index[2] = mface->v3;
}
else {
face->vertex_index[2] = mface->v1;
@@ -206,24 +206,24 @@ static void FaceIt_Fill(CSG_IteratorPtr it, CSG_IFace *face)
static void FaceIt_Step(CSG_IteratorPtr it)
{
- FaceIt * face_it = (FaceIt *)it;
- face_it->pos ++;
+ FaceIt *face_it = (FaceIt *)it;
+ face_it->pos++;
}
static void FaceIt_Reset(CSG_IteratorPtr it)
{
- FaceIt * face_it = (FaceIt *)it;
+ FaceIt *face_it = (FaceIt *)it;
face_it->pos = 0;
}
static void FaceIt_Construct(
- CSG_FaceIteratorDescriptor *output, DerivedMesh *dm, int offset, Object *ob)
+ CSG_FaceIteratorDescriptor *output, DerivedMesh *dm, int offset, Object *ob)
{
FaceIt *it;
if (output == 0) return;
// allocate some memory for blender iterator
- it = (FaceIt *)(MEM_mallocN(sizeof(FaceIt),"Boolean_FIt"));
+ it = (FaceIt *)(MEM_mallocN(sizeof(FaceIt), "Boolean_FIt"));
if (it == 0) {
return;
}
@@ -277,35 +277,35 @@ static Object *AddNewBlenderMesh(Scene *scene, Base *base)
// now create a new blender object.
// duplicating all the settings from the previous object
// to the new one.
- ob_new= copy_object(base->object);
+ ob_new = BKE_object_copy(base->object);
// Ok we don't want to use the actual data from the
// last object, the above function incremented the
// number of users, so decrement it here.
- old_me= ob_new->data;
+ old_me = ob_new->data;
old_me->id.us--;
// Now create a new base to add into the linked list of
// vase objects.
- basen= MEM_mallocN(sizeof(Base), "duplibase");
- *basen= *base;
- BLI_addhead(&scene->base, basen); /* addhead: anders oneindige lus */
- basen->object= ob_new;
+ basen = MEM_mallocN(sizeof(Base), "duplibase");
+ *basen = *base;
+ BLI_addhead(&scene->base, basen); /* addhead: anders oneindige lus */
+ basen->object = ob_new;
basen->flag &= ~SELECT;
// Initialize the mesh data associated with this object.
- ob_new->data= add_mesh("Mesh");
+ ob_new->data = BKE_mesh_add("Mesh");
// Finally assign the object type.
- ob_new->type= OB_MESH;
+ ob_new->type = OB_MESH;
return ob_new;
}
static void InterpCSGFace(
- DerivedMesh *dm, DerivedMesh *orig_dm, int index, int orig_index, int nr,
- float mapmat[][4])
+ DerivedMesh *dm, DerivedMesh *orig_dm, int index, int orig_index, int nr,
+ float mapmat[][4])
{
float obco[3], *co[4], *orig_co[4], w[4][4];
MFace *mface, *orig_mface;
@@ -318,13 +318,13 @@ static void InterpCSGFace(
orig_co[0] = (orig_dm->getVertArray(orig_dm) + orig_mface->v1)->co;
orig_co[1] = (orig_dm->getVertArray(orig_dm) + orig_mface->v2)->co;
orig_co[2] = (orig_dm->getVertArray(orig_dm) + orig_mface->v3)->co;
- orig_co[3] = (orig_mface->v4)? (orig_dm->getVertArray(orig_dm) + orig_mface->v4)->co: NULL;
+ orig_co[3] = (orig_mface->v4) ? (orig_dm->getVertArray(orig_dm) + orig_mface->v4)->co : NULL;
// get the vertex coordinates from the new derivedmesh
co[0] = CDDM_get_vert(dm, mface->v1)->co;
co[1] = CDDM_get_vert(dm, mface->v2)->co;
co[2] = CDDM_get_vert(dm, mface->v3)->co;
- co[3] = (nr == 4)? CDDM_get_vert(dm, mface->v4)->co: NULL;
+ co[3] = (nr == 4) ? CDDM_get_vert(dm, mface->v4)->co : NULL;
for (j = 0; j < nr; j++) {
// get coordinate into the space of the original mesh
@@ -333,38 +333,38 @@ static void InterpCSGFace(
else
copy_v3_v3(obco, co[j]);
- interp_weights_face_v3( w[j],orig_co[0], orig_co[1], orig_co[2], orig_co[3], obco);
+ interp_weights_face_v3(w[j], orig_co[0], orig_co[1], orig_co[2], orig_co[3], obco);
}
- CustomData_interp(&orig_dm->faceData, &dm->faceData, &orig_index, NULL, (float*)w, 1, index);
+ CustomData_interp(&orig_dm->faceData, &dm->faceData, &orig_index, NULL, (float *)w, 1, index);
}
/* Iterate over the CSG Output Descriptors and create a new DerivedMesh
* from them */
static DerivedMesh *ConvertCSGDescriptorsToDerivedMesh(
- CSG_FaceIteratorDescriptor *face_it,
- CSG_VertexIteratorDescriptor *vertex_it,
- float parinv[][4],
- float mapmat[][4],
- Material **mat,
- int *totmat,
- DerivedMesh *dm1,
- Object *ob1,
- DerivedMesh *dm2,
- Object *ob2)
+ CSG_FaceIteratorDescriptor *face_it,
+ CSG_VertexIteratorDescriptor *vertex_it,
+ float parinv[][4],
+ float mapmat[][4],
+ Material **mat,
+ int *totmat,
+ DerivedMesh *dm1,
+ Object *ob1,
+ DerivedMesh *dm2,
+ Object *ob2)
{
DerivedMesh *result, *orig_dm;
GHash *material_hash = NULL;
- Mesh *me1= (Mesh*)ob1->data;
- Mesh *me2= (Mesh*)ob2->data;
+ Mesh *me1 = (Mesh *)ob1->data;
+ Mesh *me2 = (Mesh *)ob2->data;
int i, *origindex_layer;
// create a new DerivedMesh
result = CDDM_new(vertex_it->num_elements, 0, face_it->num_elements, 0, 0);
CustomData_merge(&dm1->faceData, &result->faceData, CD_MASK_DERIVEDMESH & ~(CD_MASK_NORMAL | CD_MASK_POLYINDEX | CD_MASK_ORIGINDEX),
- CD_DEFAULT, face_it->num_elements);
+ CD_DEFAULT, face_it->num_elements);
CustomData_merge(&dm2->faceData, &result->faceData, CD_MASK_DERIVEDMESH & ~(CD_MASK_NORMAL | CD_MASK_POLYINDEX | CD_MASK_ORIGINDEX),
- CD_DEFAULT, face_it->num_elements);
+ CD_DEFAULT, face_it->num_elements);
// step through the vertex iterators:
for (i = 0; !vertex_it->Done(vertex_it->it); i++) {
@@ -402,10 +402,10 @@ static DerivedMesh *ConvertCSGDescriptorsToDerivedMesh(
face_it->Step(face_it->it);
// find the original mesh and data
- orig_ob = (csgface.orig_face < dm1->getNumTessFaces(dm1))? ob1: ob2;
- orig_dm = (csgface.orig_face < dm1->getNumTessFaces(dm1))? dm1: dm2;
- orig_me = (orig_ob == ob1)? me1: me2;
- orig_index = (orig_ob == ob1)? csgface.orig_face: csgface.orig_face - dm1->getNumTessFaces(dm1);
+ orig_ob = (csgface.orig_face < dm1->getNumTessFaces(dm1)) ? ob1 : ob2;
+ orig_dm = (csgface.orig_face < dm1->getNumTessFaces(dm1)) ? dm1 : dm2;
+ orig_me = (orig_ob == ob1) ? me1 : me2;
+ orig_index = (orig_ob == ob1) ? csgface.orig_face : csgface.orig_face - dm1->getNumTessFaces(dm1);
// copy all face layers, including mface
CustomData_copy_data(&orig_dm->faceData, &result->faceData, orig_index, i, 1);
@@ -415,7 +415,7 @@ static DerivedMesh *ConvertCSGDescriptorsToDerivedMesh(
mface->v1 = csgface.vertex_index[0];
mface->v2 = csgface.vertex_index[1];
mface->v3 = csgface.vertex_index[2];
- mface->v4 = (csgface.vertex_number == 4)? csgface.vertex_index[3]: 0;
+ mface->v4 = (csgface.vertex_number == 4) ? csgface.vertex_index[3] : 0;
// set material, based on lookup in hash table
orig_mat = give_current_material(orig_ob, mface->mat_nr + 1);
@@ -441,7 +441,7 @@ static DerivedMesh *ConvertCSGDescriptorsToDerivedMesh(
mat_nr = 0;
for (a = 0; a < ob1->totcol; a++) {
- if (give_current_material(ob1, a+1) == orig_mat) {
+ if (give_current_material(ob1, a + 1) == orig_mat) {
mat_nr = a;
break;
}
@@ -459,7 +459,7 @@ static DerivedMesh *ConvertCSGDescriptorsToDerivedMesh(
mface->mat_nr = 0;
InterpCSGFace(result, orig_dm, i, orig_index, csgface.vertex_number,
- (orig_me == me2)? mapmat: NULL);
+ (orig_me == me2) ? mapmat : NULL);
test_index_face(mface, &result->faceData, i, csgface.vertex_number);
@@ -490,27 +490,27 @@ static DerivedMesh *ConvertCSGDescriptorsToDerivedMesh(
}
static void BuildMeshDescriptors(
- struct DerivedMesh *dm,
- struct Object *ob,
- int face_offset,
- struct CSG_FaceIteratorDescriptor * face_it,
- struct CSG_VertexIteratorDescriptor * vertex_it)
+ struct DerivedMesh *dm,
+ struct Object *ob,
+ int face_offset,
+ struct CSG_FaceIteratorDescriptor *face_it,
+ struct CSG_VertexIteratorDescriptor *vertex_it)
{
- VertexIt_Construct(vertex_it,dm, ob);
- FaceIt_Construct(face_it,dm,face_offset,ob);
+ VertexIt_Construct(vertex_it, dm, ob);
+ FaceIt_Construct(face_it, dm, face_offset, ob);
}
static void FreeMeshDescriptors(
- struct CSG_FaceIteratorDescriptor *face_it,
- struct CSG_VertexIteratorDescriptor *vertex_it)
+ struct CSG_FaceIteratorDescriptor *face_it,
+ struct CSG_VertexIteratorDescriptor *vertex_it)
{
VertexIt_Destruct(vertex_it);
FaceIt_Destruct(face_it);
}
static DerivedMesh *NewBooleanDerivedMesh_intern(
- DerivedMesh *dm, struct Object *ob, DerivedMesh *dm_select, struct Object *ob_select,
- int int_op_type, Material **mat, int *totmat)
+ DerivedMesh *dm, struct Object *ob, DerivedMesh *dm_select, struct Object *ob_select,
+ int int_op_type, Material **mat, int *totmat)
{
float inv_mat[4][4];
@@ -543,15 +543,15 @@ static DerivedMesh *NewBooleanDerivedMesh_intern(
// work out the operation they chose and pick the appropriate
// enum from the csg module.
switch (int_op_type) {
- case 1 : op_type = e_csg_intersection; break;
- case 2 : op_type = e_csg_union; break;
- case 3 : op_type = e_csg_difference; break;
- case 4 : op_type = e_csg_classify; break;
- default : op_type = e_csg_intersection;
+ case 1: op_type = e_csg_intersection; break;
+ case 2: op_type = e_csg_union; break;
+ case 3: op_type = e_csg_difference; break;
+ case 4: op_type = e_csg_classify; break;
+ default: op_type = e_csg_intersection;
}
BuildMeshDescriptors(dm_select, ob_select, 0, &fd_1, &vd_1);
- BuildMeshDescriptors(dm, ob, dm_select->getNumTessFaces(dm_select) , &fd_2, &vd_2);
+ BuildMeshDescriptors(dm, ob, dm_select->getNumTessFaces(dm_select), &fd_2, &vd_2);
bool_op = CSG_NewBooleanFunction();
@@ -566,7 +566,7 @@ static DerivedMesh *NewBooleanDerivedMesh_intern(
// iterate through results of operation and insert
// into new object
result = ConvertCSGDescriptorsToDerivedMesh(
- &fd_o, &vd_o, inv_mat, map_mat, mat, totmat, dm_select, ob_select, dm, ob);
+ &fd_o, &vd_o, inv_mat, map_mat, mat, totmat, dm_select, ob_select, dm, ob);
// free up the memory
CSG_FreeVertexDescriptor(&vd_o);
@@ -587,21 +587,21 @@ static DerivedMesh *NewBooleanDerivedMesh_intern(
int NewBooleanMesh(Scene *scene, Base *base, Base *base_select, int int_op_type)
{
Mesh *me_new;
- int a, maxmat, totmat= 0;
+ int a, maxmat, totmat = 0;
Object *ob_new, *ob, *ob_select;
Material **mat;
DerivedMesh *result;
DerivedMesh *dm_select;
DerivedMesh *dm;
- ob= base->object;
- ob_select= base_select->object;
+ ob = base->object;
+ ob_select = base_select->object;
dm = mesh_get_derived_final(scene, ob, CD_MASK_BAREMESH);
dm_select = mesh_create_derived_view(scene, ob_select, 0); // no modifiers in editmode ??
- maxmat= ob->totcol + ob_select->totcol;
- mat= (Material**)MEM_mallocN(sizeof(Material*)*maxmat, "NewBooleanMeshMat");
+ maxmat = ob->totcol + ob_select->totcol;
+ mat = (Material **)MEM_mallocN(sizeof(Material *) * maxmat, "NewBooleanMeshMat");
/* put some checks in for nice user feedback */
if (dm == NULL || dm_select == NULL) {
@@ -613,7 +613,7 @@ int NewBooleanMesh(Scene *scene, Base *base, Base *base_select, int int_op_type)
return -1;
}
- result= NewBooleanDerivedMesh_intern(dm, ob, dm_select, ob_select, int_op_type, mat, &totmat);
+ result = NewBooleanDerivedMesh_intern(dm, ob, dm_select, ob_select, int_op_type, mat, &totmat);
if (result == NULL) {
MEM_freeN(mat);
@@ -621,8 +621,8 @@ int NewBooleanMesh(Scene *scene, Base *base, Base *base_select, int int_op_type)
}
/* create a new blender mesh object - using 'base' as a template */
- ob_new= AddNewBlenderMesh(scene, base_select);
- me_new= ob_new->data;
+ ob_new = AddNewBlenderMesh(scene, base_select);
+ me_new = ob_new->data;
DM_to_mesh(result, me_new, ob_new);
result->release(result);
@@ -632,7 +632,7 @@ int NewBooleanMesh(Scene *scene, Base *base, Base *base_select, int int_op_type)
/* add materials to object */
for (a = 0; a < totmat; a++)
- assign_material(ob_new, mat[a], a+1);
+ assign_material(ob_new, mat[a], a + 1);
MEM_freeN(mat);
@@ -643,7 +643,7 @@ int NewBooleanMesh(Scene *scene, Base *base, Base *base_select, int int_op_type)
}
DerivedMesh *NewBooleanDerivedMesh(DerivedMesh *dm, struct Object *ob, DerivedMesh *dm_select, struct Object *ob_select,
- int int_op_type)
+ int int_op_type)
{
return NewBooleanDerivedMesh_intern(dm, ob, dm_select, ob_select, int_op_type, NULL, NULL);
}
diff --git a/source/blender/modifiers/intern/MOD_boolean_util.h b/source/blender/modifiers/intern/MOD_boolean_util.h
index 6ba4940a4e9..b996dc6d6ba 100644
--- a/source/blender/modifiers/intern/MOD_boolean_util.h
+++ b/source/blender/modifiers/intern/MOD_boolean_util.h
@@ -48,6 +48,7 @@ int NewBooleanMesh(struct Scene *scene, struct Base *base, struct Base *base_sel
* are in fact mesh object. On success returns a DerivedMesh. On failure
* returns NULL and reports an error. */
-struct DerivedMesh *NewBooleanDerivedMesh(struct DerivedMesh *dm, struct Object *ob, struct DerivedMesh *dm_select, struct Object *ob_select, int int_op_type);
+struct DerivedMesh *NewBooleanDerivedMesh(struct DerivedMesh *dm, struct Object *ob,
+ struct DerivedMesh *dm_select, struct Object *ob_select, int int_op_type);
#endif // MOD_BOOLEAN_UTILS
diff --git a/source/blender/modifiers/intern/MOD_build.c b/source/blender/modifiers/intern/MOD_build.c
index ddfb793bd5d..67a290017f7 100644
--- a/source/blender/modifiers/intern/MOD_build.c
+++ b/source/blender/modifiers/intern/MOD_build.c
@@ -53,7 +53,7 @@
static void initData(ModifierData *md)
{
- BuildModifierData *bmd = (BuildModifierData*) md;
+ BuildModifierData *bmd = (BuildModifierData *) md;
bmd->start = 1.0;
bmd->length = 100.0;
@@ -61,8 +61,8 @@ static void initData(ModifierData *md)
static void copyData(ModifierData *md, ModifierData *target)
{
- BuildModifierData *bmd = (BuildModifierData*) md;
- BuildModifierData *tbmd = (BuildModifierData*) target;
+ BuildModifierData *bmd = (BuildModifierData *) md;
+ BuildModifierData *tbmd = (BuildModifierData *) target;
tbmd->start = bmd->start;
tbmd->length = bmd->length;
@@ -82,7 +82,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob),
{
DerivedMesh *dm = derivedData;
DerivedMesh *result;
- BuildModifierData *bmd = (BuildModifierData*) md;
+ BuildModifierData *bmd = (BuildModifierData *) md;
int i, j, k;
int numFaces_dst, numEdges_dst, numLoops_dst = 0;
int *vertMap, *edgeMap, *faceMap;
@@ -115,7 +115,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob),
faceMap = MEM_callocN(sizeof(*faceMap) * numPoly_src, "build modifier faceMap");
for (i = 0; i < numPoly_src; i++) faceMap[i] = i;
- frac = (BKE_curframe(md->scene) - bmd->start) / bmd->length;
+ frac = (BKE_scene_frame_get(md->scene) - bmd->start) / bmd->length;
CLAMP(frac, 0.0f, 1.0f);
numFaces_dst = numPoly_src * frac;
@@ -141,7 +141,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob),
mp = mpoly + faceMap[i];
ml = mloop + mp->loopstart;
- for (j=0; j<mp->totloop; j++, ml++) {
+ for (j = 0; j < mp->totloop; j++, ml++) {
if (!BLI_ghash_haskey(vertHash, SET_INT_IN_POINTER(ml->v)))
BLI_ghash_insert(vertHash, SET_INT_IN_POINTER(ml->v),
SET_INT_IN_POINTER(BLI_ghash_size(vertHash)));
@@ -157,8 +157,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob),
for (i = 0; i < numEdge_src; i++) {
MEdge *me = medge + i;
- if ( BLI_ghash_haskey(vertHash, SET_INT_IN_POINTER(me->v1)) &&
- BLI_ghash_haskey(vertHash, SET_INT_IN_POINTER(me->v2)))
+ if (BLI_ghash_haskey(vertHash, SET_INT_IN_POINTER(me->v1)) &&
+ BLI_ghash_haskey(vertHash, SET_INT_IN_POINTER(me->v2)))
{
j = BLI_ghash_size(edgeHash);
@@ -225,17 +225,17 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob),
BLI_ghash_size(edgeHash), 0, numLoops_dst, numFaces_dst);
/* copy the vertices across */
- for ( hashIter = BLI_ghashIterator_new(vertHash);
- !BLI_ghashIterator_isDone(hashIter);
- BLI_ghashIterator_step(hashIter)
- )
+ for (hashIter = BLI_ghashIterator_new(vertHash);
+ !BLI_ghashIterator_isDone(hashIter);
+ BLI_ghashIterator_step(hashIter)
+ )
{
MVert source;
MVert *dest;
int oldIndex = GET_INT_FROM_POINTER(BLI_ghashIterator_getKey(hashIter));
int newIndex = GET_INT_FROM_POINTER(BLI_ghashIterator_getValue(hashIter));
- source = mvert_src [oldIndex];
+ source = mvert_src[oldIndex];
dest = CDDM_get_vert(result, newIndex);
DM_copy_vert_data(dm, result, oldIndex, newIndex, 1);
@@ -278,7 +278,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob),
DM_copy_loop_data(dm, result, source->loopstart, dest->loopstart, dest->totloop);
ml_src = mloop_src + source->loopstart;
- for (j=0; j<source->totloop; j++, k++, ml_src++, ml_dst++) {
+ for (j = 0; j < source->totloop; j++, k++, ml_src++, ml_dst++) {
ml_dst->v = GET_INT_FROM_POINTER(BLI_ghash_lookup(vertHash, SET_INT_IN_POINTER(ml_src->v)));
ml_dst->e = GET_INT_FROM_POINTER(BLI_ghash_lookup(edgeHash2, SET_INT_IN_POINTER(ml_src->e)));
}
@@ -297,27 +297,27 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob),
ModifierTypeInfo modifierType_Build = {
- /* name */ "Build",
- /* structName */ "BuildModifierData",
- /* structSize */ sizeof(BuildModifierData),
- /* type */ eModifierTypeType_Nonconstructive,
- /* flags */ eModifierTypeFlag_AcceptsMesh
- | eModifierTypeFlag_AcceptsCVs,
- /* copyData */ copyData,
- /* deformVerts */ NULL,
- /* deformMatrices */ NULL,
- /* deformVertsEM */ NULL,
- /* deformMatricesEM */ NULL,
- /* applyModifier */ applyModifier,
- /* applyModifierEM */ NULL,
- /* initData */ initData,
- /* requiredDataMask */ NULL,
- /* freeData */ NULL,
- /* isDisabled */ NULL,
- /* updateDepgraph */ NULL,
- /* dependsOnTime */ dependsOnTime,
- /* dependsOnNormals */ NULL,
+ /* name */ "Build",
+ /* structName */ "BuildModifierData",
+ /* structSize */ sizeof(BuildModifierData),
+ /* type */ eModifierTypeType_Nonconstructive,
+ /* flags */ eModifierTypeFlag_AcceptsMesh |
+ eModifierTypeFlag_AcceptsCVs,
+ /* copyData */ copyData,
+ /* deformVerts */ NULL,
+ /* deformMatrices */ NULL,
+ /* deformVertsEM */ NULL,
+ /* deformMatricesEM */ NULL,
+ /* applyModifier */ applyModifier,
+ /* applyModifierEM */ NULL,
+ /* initData */ initData,
+ /* requiredDataMask */ NULL,
+ /* freeData */ NULL,
+ /* isDisabled */ NULL,
+ /* updateDepgraph */ NULL,
+ /* dependsOnTime */ dependsOnTime,
+ /* dependsOnNormals */ NULL,
/* foreachObjectLink */ NULL,
- /* foreachIDLink */ NULL,
- /* foreachTexLink */ NULL,
+ /* foreachIDLink */ NULL,
+ /* foreachTexLink */ NULL,
};
diff --git a/source/blender/modifiers/intern/MOD_cast.c b/source/blender/modifiers/intern/MOD_cast.c
index 15940112527..16ed508d42e 100644
--- a/source/blender/modifiers/intern/MOD_cast.c
+++ b/source/blender/modifiers/intern/MOD_cast.c
@@ -52,13 +52,12 @@
static void initData(ModifierData *md)
{
- CastModifierData *cmd = (CastModifierData*) md;
+ CastModifierData *cmd = (CastModifierData *) md;
cmd->fac = 0.5f;
cmd->radius = 0.0f;
cmd->size = 0.0f;
- cmd->flag = MOD_CAST_X | MOD_CAST_Y | MOD_CAST_Z
- | MOD_CAST_SIZE_FROM_RADIUS;
+ cmd->flag = MOD_CAST_X | MOD_CAST_Y | MOD_CAST_Z | MOD_CAST_SIZE_FROM_RADIUS;
cmd->type = MOD_CAST_TYPE_SPHERE;
cmd->defgrp_name[0] = '\0';
cmd->object = NULL;
@@ -67,8 +66,8 @@ static void initData(ModifierData *md)
static void copyData(ModifierData *md, ModifierData *target)
{
- CastModifierData *cmd = (CastModifierData*) md;
- CastModifierData *tcmd = (CastModifierData*) target;
+ CastModifierData *cmd = (CastModifierData *) md;
+ CastModifierData *tcmd = (CastModifierData *) target;
tcmd->fac = cmd->fac;
tcmd->radius = cmd->radius;
@@ -81,10 +80,10 @@ static void copyData(ModifierData *md, ModifierData *target)
static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
{
- CastModifierData *cmd = (CastModifierData*) md;
+ CastModifierData *cmd = (CastModifierData *) md;
short flag;
- flag = cmd->flag & (MOD_CAST_X|MOD_CAST_Y|MOD_CAST_Z);
+ flag = cmd->flag & (MOD_CAST_X | MOD_CAST_Y | MOD_CAST_Z);
if ((cmd->fac == 0.0f) || flag == 0) return 1;
@@ -103,33 +102,33 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
}
static void foreachObjectLink(
- ModifierData *md, Object *ob,
- void (*walk)(void *userData, Object *ob, Object **obpoin),
- void *userData)
+ ModifierData *md, Object *ob,
+ void (*walk)(void *userData, Object *ob, Object **obpoin),
+ void *userData)
{
- CastModifierData *cmd = (CastModifierData*) md;
+ CastModifierData *cmd = (CastModifierData *) md;
- walk (userData, ob, &cmd->object);
+ walk(userData, ob, &cmd->object);
}
static void updateDepgraph(ModifierData *md, DagForest *forest,
- struct Scene *UNUSED(scene),
- Object *UNUSED(ob),
- DagNode *obNode)
+ struct Scene *UNUSED(scene),
+ Object *UNUSED(ob),
+ DagNode *obNode)
{
- CastModifierData *cmd = (CastModifierData*) md;
+ CastModifierData *cmd = (CastModifierData *) md;
if (cmd->object) {
DagNode *curNode = dag_get_node(forest, cmd->object);
dag_add_relation(forest, curNode, obNode, DAG_RL_OB_DATA,
- "Cast Modifier");
+ "Cast Modifier");
}
}
static void sphere_do(
- CastModifierData *cmd, Object *ob, DerivedMesh *dm,
- float (*vertexCos)[3], int numVerts)
+ CastModifierData *cmd, Object *ob, DerivedMesh *dm,
+ float (*vertexCos)[3], int numVerts)
{
MDeformVert *dvert = NULL;
@@ -200,7 +199,7 @@ static void sphere_do(
* with or w/o a vgroup. With lots of if's in the code below,
* further optimization's are possible, if needed */
if (dvert) { /* with a vgroup */
- MDeformVert *dv= dvert;
+ MDeformVert *dv = dvert;
float fac_orig = fac;
for (i = 0; i < numVerts; i++, dv++) {
float tmp_co[3];
@@ -225,7 +224,7 @@ static void sphere_do(
if (len_v3(vec) > cmd->radius) continue;
}
- weight= defvert_find_weight(dv, defgrp_index);
+ weight = defvert_find_weight(dv, defgrp_index);
if (weight <= 0.0f) continue;
fac = fac_orig * weight;
@@ -234,11 +233,11 @@ static void sphere_do(
normalize_v3(vec);
if (flag & MOD_CAST_X)
- tmp_co[0] = fac*vec[0]*len + facm*tmp_co[0];
+ tmp_co[0] = fac * vec[0] * len + facm * tmp_co[0];
if (flag & MOD_CAST_Y)
- tmp_co[1] = fac*vec[1]*len + facm*tmp_co[1];
+ tmp_co[1] = fac * vec[1] * len + facm * tmp_co[1];
if (flag & MOD_CAST_Z)
- tmp_co[2] = fac*vec[2]*len + facm*tmp_co[2];
+ tmp_co[2] = fac * vec[2] * len + facm * tmp_co[2];
if (ctrl_ob) {
if (flag & MOD_CAST_USE_OB_TRANSFORM) {
@@ -280,11 +279,11 @@ static void sphere_do(
normalize_v3(vec);
if (flag & MOD_CAST_X)
- tmp_co[0] = fac*vec[0]*len + facm*tmp_co[0];
+ tmp_co[0] = fac * vec[0] * len + facm * tmp_co[0];
if (flag & MOD_CAST_Y)
- tmp_co[1] = fac*vec[1]*len + facm*tmp_co[1];
+ tmp_co[1] = fac * vec[1] * len + facm * tmp_co[1];
if (flag & MOD_CAST_Z)
- tmp_co[2] = fac*vec[2]*len + facm*tmp_co[2];
+ tmp_co[2] = fac * vec[2] * len + facm * tmp_co[2];
if (ctrl_ob) {
if (flag & MOD_CAST_USE_OB_TRANSFORM) {
@@ -300,8 +299,8 @@ static void sphere_do(
}
static void cuboid_do(
- CastModifierData *cmd, Object *ob, DerivedMesh *dm,
- float (*vertexCos)[3], int numVerts)
+ CastModifierData *cmd, Object *ob, DerivedMesh *dm,
+ float (*vertexCos)[3], int numVerts)
{
MDeformVert *dvert = NULL;
Object *ctrl_ob = NULL;
@@ -423,8 +422,11 @@ static void cuboid_do(
if (has_radius) {
if (fabsf(tmp_co[0]) > cmd->radius ||
- fabsf(tmp_co[1]) > cmd->radius ||
- fabsf(tmp_co[2]) > cmd->radius) continue;
+ fabsf(tmp_co[1]) > cmd->radius ||
+ fabsf(tmp_co[2]) > cmd->radius)
+ {
+ continue;
+ }
}
for (j = 0; j < dvert[i].totweight; ++j) {
@@ -521,8 +523,11 @@ static void cuboid_do(
if (has_radius) {
if (fabsf(tmp_co[0]) > cmd->radius ||
- fabsf(tmp_co[1]) > cmd->radius ||
- fabsf(tmp_co[2]) > cmd->radius) continue;
+ fabsf(tmp_co[1]) > cmd->radius ||
+ fabsf(tmp_co[2]) > cmd->radius)
+ {
+ continue;
+ }
}
octant = 0;
@@ -573,11 +578,11 @@ static void cuboid_do(
}
static void deformVerts(ModifierData *md, Object *ob,
- DerivedMesh *derivedData,
- float (*vertexCos)[3],
- int numVerts,
- int UNUSED(useRenderParams),
- int UNUSED(isFinalCalc))
+ DerivedMesh *derivedData,
+ float (*vertexCos)[3],
+ int numVerts,
+ int UNUSED(useRenderParams),
+ int UNUSED(isFinalCalc))
{
DerivedMesh *dm = NULL;
CastModifierData *cmd = (CastModifierData *)md;
@@ -596,8 +601,8 @@ static void deformVerts(ModifierData *md, Object *ob,
}
static void deformVertsEM(
- ModifierData *md, Object *ob, struct BMEditMesh *editData,
- DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
+ ModifierData *md, Object *ob, struct BMEditMesh *editData,
+ DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
{
DerivedMesh *dm = get_dm(ob, editData, derivedData, NULL, 0);
CastModifierData *cmd = (CastModifierData *)md;
@@ -619,8 +624,8 @@ ModifierTypeInfo modifierType_Cast = {
/* structName */ "CastModifierData",
/* structSize */ sizeof(CastModifierData),
/* type */ eModifierTypeType_OnlyDeform,
- /* flags */ eModifierTypeFlag_AcceptsCVs
- | eModifierTypeFlag_SupportsEditmode,
+ /* flags */ eModifierTypeFlag_AcceptsCVs |
+ eModifierTypeFlag_SupportsEditmode,
/* copyData */ copyData,
/* deformVerts */ deformVerts,
diff --git a/source/blender/modifiers/intern/MOD_cloth.c b/source/blender/modifiers/intern/MOD_cloth.c
index d5d8439c749..33c6117aa05 100644
--- a/source/blender/modifiers/intern/MOD_cloth.c
+++ b/source/blender/modifiers/intern/MOD_cloth.c
@@ -54,7 +54,7 @@
static void initData(ModifierData *md)
{
- ClothModifierData *clmd = (ClothModifierData*) md;
+ ClothModifierData *clmd = (ClothModifierData *) md;
clmd->sim_parms = MEM_callocN(sizeof(ClothSimSettings), "cloth sim parms");
clmd->coll_parms = MEM_callocN(sizeof(ClothCollSettings), "cloth coll parms");
@@ -64,15 +64,15 @@ static void initData(ModifierData *md)
if (!clmd->sim_parms || !clmd->coll_parms || !clmd->point_cache)
return;
- cloth_init (clmd);
+ cloth_init(clmd);
}
static void deformVerts(ModifierData *md, Object *ob, DerivedMesh *derivedData, float (*vertexCos)[3],
- int UNUSED(numVerts), int UNUSED(useRenderParams), int UNUSED(isFinalCalc))
+ int UNUSED(numVerts), int UNUSED(useRenderParams), int UNUSED(isFinalCalc))
{
DerivedMesh *dm;
- ClothModifierData *clmd = (ClothModifierData*) md;
- DerivedMesh *result=NULL;
+ ClothModifierData *clmd = (ClothModifierData *) md;
+ DerivedMesh *result = NULL;
/* check for alloc failing */
if (!clmd->sim_parms || !clmd->coll_parms) {
@@ -102,18 +102,18 @@ static void deformVerts(ModifierData *md, Object *ob, DerivedMesh *derivedData,
static void updateDepgraph(ModifierData *md, DagForest *forest, Scene *scene, Object *ob, DagNode *obNode)
{
- ClothModifierData *clmd = (ClothModifierData*) md;
+ ClothModifierData *clmd = (ClothModifierData *) md;
Base *base;
if (clmd) {
- for (base = scene->base.first; base; base= base->next) {
- Object *ob1= base->object;
+ for (base = scene->base.first; base; base = base->next) {
+ Object *ob1 = base->object;
if (ob1 != ob) {
CollisionModifierData *coll_clmd = (CollisionModifierData *)modifiers_findByType(ob1, eModifierType_Collision);
if (coll_clmd) {
DagNode *curNode = dag_get_node(forest, ob1);
- dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA|DAG_RL_OB_DATA, "Cloth Collision");
+ dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Cloth Collision");
}
}
}
@@ -123,7 +123,7 @@ static void updateDepgraph(ModifierData *md, DagForest *forest, Scene *scene, Ob
static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
{
CustomDataMask dataMask = 0;
- ClothModifierData *clmd = (ClothModifierData*)md;
+ ClothModifierData *clmd = (ClothModifierData *)md;
if (cloth_uses_vgroup(clmd))
dataMask |= CD_MASK_MDEFORMVERT;
@@ -136,8 +136,8 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
static void copyData(ModifierData *md, ModifierData *target)
{
- ClothModifierData *clmd = (ClothModifierData*) md;
- ClothModifierData *tclmd = (ClothModifierData*) target;
+ ClothModifierData *clmd = (ClothModifierData *) md;
+ ClothModifierData *tclmd = (ClothModifierData *) target;
if (tclmd->sim_parms) {
if (tclmd->sim_parms->effector_weights)
@@ -166,13 +166,13 @@ static int dependsOnTime(ModifierData *UNUSED(md))
static void freeData(ModifierData *md)
{
- ClothModifierData *clmd = (ClothModifierData*) md;
+ ClothModifierData *clmd = (ClothModifierData *) md;
if (clmd) {
if (G.rt > 0)
printf("clothModifier_freeData\n");
- cloth_free_modifier_extern (clmd);
+ cloth_free_modifier_extern(clmd);
if (clmd->sim_parms) {
if (clmd->sim_parms->effector_weights)
@@ -188,9 +188,9 @@ static void freeData(ModifierData *md)
}
static void foreachIDLink(ModifierData *md, Object *ob,
- IDWalkFunc walk, void *userData)
+ IDWalkFunc walk, void *userData)
{
- ClothModifierData *clmd = (ClothModifierData*) md;
+ ClothModifierData *clmd = (ClothModifierData *) md;
if (clmd->coll_parms) {
walk(userData, ob, (ID **)&clmd->coll_parms->group);
@@ -206,9 +206,9 @@ ModifierTypeInfo modifierType_Cloth = {
/* structName */ "ClothModifierData",
/* structSize */ sizeof(ClothModifierData),
/* type */ eModifierTypeType_OnlyDeform,
- /* flags */ eModifierTypeFlag_AcceptsMesh
- | eModifierTypeFlag_UsesPointCache
- | eModifierTypeFlag_Single,
+ /* flags */ eModifierTypeFlag_AcceptsMesh |
+ eModifierTypeFlag_UsesPointCache |
+ eModifierTypeFlag_Single,
/* copyData */ copyData,
/* deformVerts */ deformVerts,
diff --git a/source/blender/modifiers/intern/MOD_collision.c b/source/blender/modifiers/intern/MOD_collision.c
index b3faf6c140a..eb4511ddaec 100644
--- a/source/blender/modifiers/intern/MOD_collision.c
+++ b/source/blender/modifiers/intern/MOD_collision.c
@@ -55,7 +55,7 @@
static void initData(ModifierData *md)
{
- CollisionModifierData *collmd = (CollisionModifierData*) md;
+ CollisionModifierData *collmd = (CollisionModifierData *) md;
collmd->x = NULL;
collmd->xnew = NULL;
@@ -69,10 +69,9 @@ static void initData(ModifierData *md)
static void freeData(ModifierData *md)
{
- CollisionModifierData *collmd = (CollisionModifierData*) md;
+ CollisionModifierData *collmd = (CollisionModifierData *) md;
- if (collmd)
- {
+ if (collmd) {
if (collmd->bvhtree)
BLI_bvhtree_free(collmd->bvhtree);
if (collmd->x)
@@ -106,57 +105,52 @@ static int dependsOnTime(ModifierData *UNUSED(md))
}
static void deformVerts(ModifierData *md, Object *ob,
- DerivedMesh *derivedData,
- float (*vertexCos)[3],
- int UNUSED(numVerts),
- int UNUSED(useRenderParams),
- int UNUSED(isFinalCalc))
+ DerivedMesh *derivedData,
+ float (*vertexCos)[3],
+ int UNUSED(numVerts),
+ int UNUSED(useRenderParams),
+ int UNUSED(isFinalCalc))
{
- CollisionModifierData *collmd = (CollisionModifierData*) md;
+ CollisionModifierData *collmd = (CollisionModifierData *) md;
DerivedMesh *dm = NULL;
MVert *tempVert = NULL;
/* if possible use/create DerivedMesh */
if (derivedData) dm = CDDM_copy(derivedData);
- else if (ob->type==OB_MESH) dm = CDDM_from_mesh(ob->data, ob);
+ else if (ob->type == OB_MESH) dm = CDDM_from_mesh(ob->data, ob);
- if (!ob->pd)
- {
+ if (!ob->pd) {
printf("CollisionModifier deformVerts: Should not happen!\n");
return;
}
- if (dm)
- {
+ if (dm) {
float current_time = 0;
unsigned int numverts = 0;
CDDM_apply_vert_coords(dm, vertexCos);
CDDM_calc_normals(dm);
- current_time = BKE_curframe(md->scene);
+ current_time = BKE_scene_frame_get(md->scene);
if (G.rt > 0)
printf("current_time %f, collmd->time_xnew %f\n", current_time, collmd->time_xnew);
- numverts = dm->getNumVerts ( dm );
+ numverts = dm->getNumVerts(dm);
- if ((current_time > collmd->time_xnew)|| (BKE_ptcache_get_continue_physics()))
- {
+ if ((current_time > collmd->time_xnew) || (BKE_ptcache_get_continue_physics())) {
unsigned int i;
// check if mesh has changed
if (collmd->x && (numverts != collmd->numverts))
freeData((ModifierData *)collmd);
- if (collmd->time_xnew == -1000) // first time
- {
+ if (collmd->time_xnew == -1000) { /* first time */
collmd->x = dm->dupVertArray(dm); // frame start position
- for ( i = 0; i < numverts; i++ )
- {
+ for (i = 0; i < numverts; i++) {
// we save global positions
- mul_m4_v3( ob->obmat, collmd->x[i].co );
+ mul_m4_v3(ob->obmat, collmd->x[i].co);
}
collmd->xnew = MEM_dupallocN(collmd->x); // frame end position
@@ -183,15 +177,15 @@ static void deformVerts(ModifierData *md, Object *ob,
collmd->xnew = tempVert;
collmd->time_x = collmd->time_xnew;
- memcpy(collmd->xnew, dm->getVertArray(dm), numverts*sizeof(MVert));
+ memcpy(collmd->xnew, dm->getVertArray(dm), numverts * sizeof(MVert));
for (i = 0; i < numverts; i++) {
// we save global positions
- mul_m4_v3( ob->obmat, collmd->xnew[i].co );
+ mul_m4_v3(ob->obmat, collmd->xnew[i].co);
}
- memcpy(collmd->current_xnew, collmd->x, numverts*sizeof(MVert));
- memcpy(collmd->current_x, collmd->x, numverts*sizeof(MVert));
+ memcpy(collmd->current_xnew, collmd->x, numverts * sizeof(MVert));
+ memcpy(collmd->current_x, collmd->x, numverts * sizeof(MVert));
/* check if GUI setting has changed for bvh */
if (collmd->bvhtree) {
@@ -208,7 +202,7 @@ static void deformVerts(ModifierData *md, Object *ob,
}
else {
// recalc static bounding boxes
- bvhtree_update_from_mvert ( collmd->bvhtree, collmd->mfaces, collmd->numfaces, collmd->current_x, collmd->current_xnew, collmd->numverts, 1 );
+ bvhtree_update_from_mvert(collmd->bvhtree, collmd->mfaces, collmd->numfaces, collmd->current_x, collmd->current_xnew, collmd->numverts, 1);
}
collmd->time_xnew = current_time;
@@ -238,8 +232,8 @@ ModifierTypeInfo modifierType_Collision = {
/* structName */ "CollisionModifierData",
/* structSize */ sizeof(CollisionModifierData),
/* type */ eModifierTypeType_OnlyDeform,
- /* flags */ eModifierTypeFlag_AcceptsMesh
- | eModifierTypeFlag_Single,
+ /* flags */ eModifierTypeFlag_AcceptsMesh |
+ eModifierTypeFlag_Single,
/* copyData */ NULL,
/* deformVerts */ deformVerts,
diff --git a/source/blender/modifiers/intern/MOD_curve.c b/source/blender/modifiers/intern/MOD_curve.c
index f516f971dc0..3b46ecc5744 100644
--- a/source/blender/modifiers/intern/MOD_curve.c
+++ b/source/blender/modifiers/intern/MOD_curve.c
@@ -52,15 +52,15 @@
static void initData(ModifierData *md)
{
- CurveModifierData *cmd = (CurveModifierData*) md;
+ CurveModifierData *cmd = (CurveModifierData *) md;
cmd->defaxis = MOD_CURVE_POSX;
}
static void copyData(ModifierData *md, ModifierData *target)
{
- CurveModifierData *cmd = (CurveModifierData*) md;
- CurveModifierData *tcmd = (CurveModifierData*) target;
+ CurveModifierData *cmd = (CurveModifierData *) md;
+ CurveModifierData *tcmd = (CurveModifierData *) target;
tcmd->defaxis = cmd->defaxis;
tcmd->object = cmd->object;
@@ -80,27 +80,27 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
static int isDisabled(ModifierData *md, int UNUSED(userRenderParams))
{
- CurveModifierData *cmd = (CurveModifierData*) md;
+ CurveModifierData *cmd = (CurveModifierData *) md;
return !cmd->object;
}
static void foreachObjectLink(
- ModifierData *md, Object *ob,
- void (*walk)(void *userData, Object *ob, Object **obpoin),
- void *userData)
+ ModifierData *md, Object *ob,
+ void (*walk)(void *userData, Object *ob, Object **obpoin),
+ void *userData)
{
- CurveModifierData *cmd = (CurveModifierData*) md;
+ CurveModifierData *cmd = (CurveModifierData *) md;
walk(userData, ob, &cmd->object);
}
static void updateDepgraph(ModifierData *md, DagForest *forest,
- Scene *UNUSED(scene),
- Object *UNUSED(ob),
- DagNode *obNode)
+ Scene *UNUSED(scene),
+ Object *UNUSED(ob),
+ DagNode *obNode)
{
- CurveModifierData *cmd = (CurveModifierData*) md;
+ CurveModifierData *cmd = (CurveModifierData *) md;
if (cmd->object) {
DagNode *curNode = dag_get_node(forest, cmd->object);
@@ -111,23 +111,23 @@ static void updateDepgraph(ModifierData *md, DagForest *forest,
}
static void deformVerts(ModifierData *md, Object *ob,
- DerivedMesh *derivedData,
- float (*vertexCos)[3],
- int numVerts,
- int UNUSED(useRenderParams),
- int UNUSED(isFinalCalc))
+ DerivedMesh *derivedData,
+ float (*vertexCos)[3],
+ int numVerts,
+ int UNUSED(useRenderParams),
+ int UNUSED(isFinalCalc))
{
- CurveModifierData *cmd = (CurveModifierData*) md;
+ CurveModifierData *cmd = (CurveModifierData *) md;
/* silly that defaxis and curve_deform_verts are off by 1
* but leave for now to save having to call do_versions */
curve_deform_verts(md->scene, cmd->object, ob, derivedData, vertexCos, numVerts,
- cmd->name, cmd->defaxis-1);
+ cmd->name, cmd->defaxis - 1);
}
static void deformVertsEM(
- ModifierData *md, Object *ob, struct BMEditMesh *editData,
- DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
+ ModifierData *md, Object *ob, struct BMEditMesh *editData,
+ DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
{
DerivedMesh *dm = derivedData;
@@ -144,8 +144,8 @@ ModifierTypeInfo modifierType_Curve = {
/* structName */ "CurveModifierData",
/* structSize */ sizeof(CurveModifierData),
/* type */ eModifierTypeType_OnlyDeform,
- /* flags */ eModifierTypeFlag_AcceptsCVs
- | eModifierTypeFlag_SupportsEditmode,
+ /* flags */ eModifierTypeFlag_AcceptsCVs |
+ eModifierTypeFlag_SupportsEditmode,
/* copyData */ copyData,
/* deformVerts */ deformVerts,
@@ -160,7 +160,7 @@ ModifierTypeInfo modifierType_Curve = {
/* isDisabled */ isDisabled,
/* updateDepgraph */ updateDepgraph,
/* dependsOnTime */ NULL,
- /* dependsOnNormals */ NULL,
+ /* dependsOnNormals */ NULL,
/* foreachObjectLink */ foreachObjectLink,
/* foreachIDLink */ NULL,
/* foreachTexLink */ NULL,
diff --git a/source/blender/modifiers/intern/MOD_decimate.c b/source/blender/modifiers/intern/MOD_decimate.c
index f55faf9c183..b28a4a942ac 100644
--- a/source/blender/modifiers/intern/MOD_decimate.c
+++ b/source/blender/modifiers/intern/MOD_decimate.c
@@ -56,26 +56,26 @@
static void initData(ModifierData *md)
{
- DecimateModifierData *dmd = (DecimateModifierData*) md;
+ DecimateModifierData *dmd = (DecimateModifierData *) md;
dmd->percent = 1.0;
}
static void copyData(ModifierData *md, ModifierData *target)
{
- DecimateModifierData *dmd = (DecimateModifierData*) md;
- DecimateModifierData *tdmd = (DecimateModifierData*) target;
+ DecimateModifierData *dmd = (DecimateModifierData *) md;
+ DecimateModifierData *tdmd = (DecimateModifierData *) target;
tdmd->percent = dmd->percent;
}
#ifdef WITH_MOD_DECIMATE
static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob),
- DerivedMesh *derivedData,
- int UNUSED(useRenderParams),
- int UNUSED(isFinalCalc))
+ DerivedMesh *derivedData,
+ int UNUSED(useRenderParams),
+ int UNUSED(isFinalCalc))
{
- DecimateModifierData *dmd = (DecimateModifierData*) md;
+ DecimateModifierData *dmd = (DecimateModifierData *) md;
DerivedMesh *dm = derivedData, *result = NULL;
MVert *mvert;
MFace *mface;
@@ -91,59 +91,59 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob),
totface = dm->getNumTessFaces(dm);
numTris = 0;
- for (a=0; a<totface; a++) {
+ for (a = 0; a < totface; a++) {
MFace *mf = &mface[a];
numTris++;
if (mf->v4) numTris++;
}
- if (numTris<3) {
+ if (numTris < 3) {
modifier_setError(md, "%s", TIP_("Modifier requires more than 3 input faces (triangles)."));
dm = CDDM_copy(dm);
return dm;
}
- lod.vertex_buffer= MEM_mallocN(3*sizeof(float)*totvert, "vertices");
- lod.vertex_normal_buffer= MEM_mallocN(3*sizeof(float)*totvert, "normals");
- lod.triangle_index_buffer= MEM_mallocN(3*sizeof(int)*numTris, "trias");
- lod.vertex_num= totvert;
- lod.face_num= numTris;
+ lod.vertex_buffer = MEM_mallocN(3 * sizeof(float) * totvert, "vertices");
+ lod.vertex_normal_buffer = MEM_mallocN(3 * sizeof(float) * totvert, "normals");
+ lod.triangle_index_buffer = MEM_mallocN(3 * sizeof(int) * numTris, "trias");
+ lod.vertex_num = totvert;
+ lod.face_num = numTris;
- for (a=0; a<totvert; a++) {
+ for (a = 0; a < totvert; a++) {
MVert *mv = &mvert[a];
- float *vbCo = &lod.vertex_buffer[a*3];
- float *vbNo = &lod.vertex_normal_buffer[a*3];
+ float *vbCo = &lod.vertex_buffer[a * 3];
+ float *vbNo = &lod.vertex_normal_buffer[a * 3];
copy_v3_v3(vbCo, mv->co);
normal_short_to_float_v3(vbNo, mv->no);
}
numTris = 0;
- for (a=0; a<totface; a++) {
+ for (a = 0; a < totface; a++) {
MFace *mf = &mface[a];
- int *tri = &lod.triangle_index_buffer[3*numTris++];
- tri[0]= mf->v1;
- tri[1]= mf->v2;
- tri[2]= mf->v3;
+ int *tri = &lod.triangle_index_buffer[3 * numTris++];
+ tri[0] = mf->v1;
+ tri[1] = mf->v2;
+ tri[2] = mf->v3;
if (mf->v4) {
- tri = &lod.triangle_index_buffer[3*numTris++];
- tri[0]= mf->v1;
- tri[1]= mf->v3;
- tri[2]= mf->v4;
+ tri = &lod.triangle_index_buffer[3 * numTris++];
+ tri[0] = mf->v1;
+ tri[1] = mf->v3;
+ tri[2] = mf->v4;
}
}
dmd->faceCount = 0;
if (LOD_LoadMesh(&lod) ) {
- if ( LOD_PreprocessMesh(&lod) ) {
+ if (LOD_PreprocessMesh(&lod) ) {
/* we assume the decim_faces tells how much to reduce */
- while (lod.face_num > numTris*dmd->percent) {
- if ( LOD_CollapseEdge(&lod)==0) break;
+ while (lod.face_num > numTris * dmd->percent) {
+ if (LOD_CollapseEdge(&lod) == 0) break;
}
- if (lod.vertex_num>2) {
+ if (lod.vertex_num > 2) {
result = CDDM_new(lod.vertex_num, 0, lod.face_num, 0, 0);
dmd->faceCount = lod.face_num;
}
@@ -151,18 +151,18 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob),
result = CDDM_new(lod.vertex_num, 0, 0, 0, 0);
mvert = CDDM_get_verts(result);
- for (a=0; a<lod.vertex_num; a++) {
+ for (a = 0; a < lod.vertex_num; a++) {
MVert *mv = &mvert[a];
- float *vbCo = &lod.vertex_buffer[a*3];
+ float *vbCo = &lod.vertex_buffer[a * 3];
copy_v3_v3(mv->co, vbCo);
}
- if (lod.vertex_num>2) {
+ if (lod.vertex_num > 2) {
mface = CDDM_get_tessfaces(result);
- for (a=0; a<lod.face_num; a++) {
+ for (a = 0; a < lod.face_num; a++) {
MFace *mf = &mface[a];
- int *tri = &lod.triangle_index_buffer[a*3];
+ int *tri = &lod.triangle_index_buffer[a * 3];
mf->v1 = tri[0];
mf->v2 = tri[1];
mf->v3 = tri[2];
@@ -195,9 +195,9 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob),
}
#else // WITH_MOD_DECIMATE
static DerivedMesh *applyModifier(ModifierData *UNUSED(md), Object *UNUSED(ob),
- DerivedMesh *derivedData,
- int UNUSED(useRenderParams),
- int UNUSED(isFinalCalc))
+ DerivedMesh *derivedData,
+ int UNUSED(useRenderParams),
+ int UNUSED(isFinalCalc))
{
return derivedData;
}
diff --git a/source/blender/modifiers/intern/MOD_displace.c b/source/blender/modifiers/intern/MOD_displace.c
index 293a8a8c686..fd3ebada170 100644
--- a/source/blender/modifiers/intern/MOD_displace.c
+++ b/source/blender/modifiers/intern/MOD_displace.c
@@ -58,7 +58,7 @@
static void initData(ModifierData *md)
{
- DisplaceModifierData *dmd = (DisplaceModifierData*) md;
+ DisplaceModifierData *dmd = (DisplaceModifierData *) md;
dmd->texture = NULL;
dmd->strength = 1;
@@ -68,8 +68,8 @@ static void initData(ModifierData *md)
static void copyData(ModifierData *md, ModifierData *target)
{
- DisplaceModifierData *dmd = (DisplaceModifierData*) md;
- DisplaceModifierData *tdmd = (DisplaceModifierData*) target;
+ DisplaceModifierData *dmd = (DisplaceModifierData *) md;
+ DisplaceModifierData *tdmd = (DisplaceModifierData *) target;
tdmd->texture = dmd->texture;
tdmd->strength = dmd->strength;
@@ -114,17 +114,17 @@ static int dependsOnNormals(ModifierData *md)
}
static void foreachObjectLink(ModifierData *md, Object *ob,
- ObjectWalkFunc walk, void *userData)
+ ObjectWalkFunc walk, void *userData)
{
- DisplaceModifierData *dmd = (DisplaceModifierData*) md;
+ DisplaceModifierData *dmd = (DisplaceModifierData *) md;
walk(userData, ob, &dmd->map_object);
}
static void foreachIDLink(ModifierData *md, Object *ob,
- IDWalkFunc walk, void *userData)
+ IDWalkFunc walk, void *userData)
{
- DisplaceModifierData *dmd = (DisplaceModifierData*) md;
+ DisplaceModifierData *dmd = (DisplaceModifierData *) md;
walk(userData, ob, (ID **)&dmd->texture);
@@ -132,24 +132,24 @@ static void foreachIDLink(ModifierData *md, Object *ob,
}
static void foreachTexLink(ModifierData *md, Object *ob,
- TexWalkFunc walk, void *userData)
+ TexWalkFunc walk, void *userData)
{
walk(userData, ob, md, "texture");
}
static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
{
- DisplaceModifierData *dmd = (DisplaceModifierData*) md;
+ DisplaceModifierData *dmd = (DisplaceModifierData *) md;
return (!dmd->texture || dmd->strength == 0.0f);
}
static void updateDepgraph(ModifierData *md, DagForest *forest,
- struct Scene *UNUSED(scene),
- Object *UNUSED(ob),
- DagNode *obNode)
+ struct Scene *UNUSED(scene),
+ Object *UNUSED(ob),
+ DagNode *obNode)
{
- DisplaceModifierData *dmd = (DisplaceModifierData*) md;
+ DisplaceModifierData *dmd = (DisplaceModifierData *) md;
if (dmd->map_object && dmd->texmapping == MOD_DISP_MAP_OBJECT) {
DagNode *curNode = dag_get_node(forest, dmd->map_object);
@@ -167,15 +167,15 @@ static void updateDepgraph(ModifierData *md, DagForest *forest,
/* dm must be a CDDerivedMesh */
static void displaceModifier_do(
- DisplaceModifierData *dmd, Object *ob,
- DerivedMesh *dm, float (*vertexCos)[3], int numVerts)
+ DisplaceModifierData *dmd, Object *ob,
+ DerivedMesh *dm, float (*vertexCos)[3], int numVerts)
{
int i;
MVert *mvert;
MDeformVert *dvert;
int defgrp_index;
float (*tex_co)[3];
- float weight= 1.0f; /* init value unused but some compilers may complain */
+ float weight = 1.0f; /* init value unused but some compilers may complain */
if (!dmd->texture) return;
if (dmd->strength == 0.0f) return;
@@ -184,17 +184,17 @@ static void displaceModifier_do(
modifier_get_vgroup(ob, dm, dmd->defgrp_name, &dvert, &defgrp_index);
tex_co = MEM_callocN(sizeof(*tex_co) * numVerts,
- "displaceModifier_do tex_co");
+ "displaceModifier_do tex_co");
get_texture_coords((MappingInfoModifierData *)dmd, ob, dm, vertexCos, tex_co, numVerts);
modifier_init_texture(dmd->modifier.scene, dmd->texture);
- for (i = 0; i < numVerts; ++i) {
+ for (i = 0; i < numVerts; i++) {
TexResult texres;
float delta = 0, strength = dmd->strength;
if (dvert) {
- weight= defvert_find_weight(dvert + i, defgrp_index);
+ weight = defvert_find_weight(dvert + i, defgrp_index);
if (weight == 0.0f) continue;
}
@@ -208,7 +208,7 @@ static void displaceModifier_do(
delta *= strength;
CLAMP(delta, -10000, 10000);
- switch(dmd->direction) {
+ switch (dmd->direction) {
case MOD_DISP_DIR_X:
vertexCos[i][0] += delta;
break;
@@ -235,13 +235,13 @@ static void displaceModifier_do(
}
static void deformVerts(ModifierData *md, Object *ob,
- DerivedMesh *derivedData,
- float (*vertexCos)[3],
- int numVerts,
- int UNUSED(useRenderParams),
- int UNUSED(isFinalCalc))
+ DerivedMesh *derivedData,
+ float (*vertexCos)[3],
+ int numVerts,
+ int UNUSED(useRenderParams),
+ int UNUSED(isFinalCalc))
{
- DerivedMesh *dm= get_cddm(ob, NULL, derivedData, vertexCos);
+ DerivedMesh *dm = get_cddm(ob, NULL, derivedData, vertexCos);
displaceModifier_do((DisplaceModifierData *)md, ob, dm,
vertexCos, numVerts);
@@ -251,10 +251,10 @@ static void deformVerts(ModifierData *md, Object *ob,
}
static void deformVertsEM(
- ModifierData *md, Object *ob, struct BMEditMesh *editData,
- DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
+ ModifierData *md, Object *ob, struct BMEditMesh *editData,
+ DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
{
- DerivedMesh *dm= get_cddm(ob, editData, derivedData, vertexCos);
+ DerivedMesh *dm = get_cddm(ob, editData, derivedData, vertexCos);
displaceModifier_do((DisplaceModifierData *)md, ob, dm,
vertexCos, numVerts);
@@ -269,8 +269,8 @@ ModifierTypeInfo modifierType_Displace = {
/* structName */ "DisplaceModifierData",
/* structSize */ sizeof(DisplaceModifierData),
/* type */ eModifierTypeType_OnlyDeform,
- /* flags */ eModifierTypeFlag_AcceptsMesh
- | eModifierTypeFlag_SupportsEditmode,
+ /* flags */ eModifierTypeFlag_AcceptsMesh |
+ eModifierTypeFlag_SupportsEditmode,
/* copyData */ copyData,
/* deformVerts */ deformVerts,
diff --git a/source/blender/modifiers/intern/MOD_dynamicpaint.c b/source/blender/modifiers/intern/MOD_dynamicpaint.c
index 5005e2c010d..7f8e476790f 100644
--- a/source/blender/modifiers/intern/MOD_dynamicpaint.c
+++ b/source/blender/modifiers/intern/MOD_dynamicpaint.c
@@ -47,7 +47,7 @@
static void initData(ModifierData *md)
{
- DynamicPaintModifierData *pmd = (DynamicPaintModifierData*) md;
+ DynamicPaintModifierData *pmd = (DynamicPaintModifierData *) md;
pmd->canvas = NULL;
pmd->brush = NULL;
@@ -56,34 +56,34 @@ static void initData(ModifierData *md)
static void copyData(ModifierData *md, ModifierData *target)
{
- DynamicPaintModifierData *pmd = (DynamicPaintModifierData*)md;
- DynamicPaintModifierData *tpmd = (DynamicPaintModifierData*)target;
+ DynamicPaintModifierData *pmd = (DynamicPaintModifierData *)md;
+ DynamicPaintModifierData *tpmd = (DynamicPaintModifierData *)target;
dynamicPaint_Modifier_copy(pmd, tpmd);
}
static void freeData(ModifierData *md)
{
- DynamicPaintModifierData *pmd = (DynamicPaintModifierData*) md;
+ DynamicPaintModifierData *pmd = (DynamicPaintModifierData *) md;
dynamicPaint_Modifier_free(pmd);
}
static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
{
- DynamicPaintModifierData *pmd = (DynamicPaintModifierData*)md;
+ DynamicPaintModifierData *pmd = (DynamicPaintModifierData *)md;
CustomDataMask dataMask = 0;
if (pmd->canvas) {
DynamicPaintSurface *surface = pmd->canvas->surfaces.first;
- for (; surface; surface=surface->next) {
+ for (; surface; surface = surface->next) {
/* tface */
if (surface->format == MOD_DPAINT_SURFACE_F_IMAGESEQ ||
- surface->init_color_type == MOD_DPAINT_INITIAL_TEXTURE) {
+ surface->init_color_type == MOD_DPAINT_INITIAL_TEXTURE) {
dataMask |= (1 << CD_MTFACE);
}
/* mcol */
if (surface->type == MOD_DPAINT_SURFACE_T_PAINT ||
- surface->init_color_type == MOD_DPAINT_INITIAL_VERTEXCOLOR) {
+ surface->init_color_type == MOD_DPAINT_INITIAL_VERTEXCOLOR) {
dataMask |= (1 << CD_MCOL);
}
/* CD_MDEFORMVERT */
@@ -102,32 +102,33 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
}
static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
- DerivedMesh *dm,
- int UNUSED(useRenderParams),
- int UNUSED(isFinalCalc))
+ DerivedMesh *dm,
+ int UNUSED(useRenderParams),
+ int UNUSED(isFinalCalc))
{
- DynamicPaintModifierData *pmd = (DynamicPaintModifierData*) md;
+ DynamicPaintModifierData *pmd = (DynamicPaintModifierData *) md;
return dynamicPaint_Modifier_do(pmd, md->scene, ob, dm);
}
static void updateDepgraph(ModifierData *md, DagForest *forest,
- struct Scene *scene,
- Object *ob,
- DagNode *obNode)
+ struct Scene *scene,
+ Object *ob,
+ DagNode *obNode)
{
- DynamicPaintModifierData *pmd = (DynamicPaintModifierData*) md;
+ DynamicPaintModifierData *pmd = (DynamicPaintModifierData *) md;
/* add relation from canvases to all brush objects */
if (pmd && pmd->canvas) {
Base *base = scene->base.first;
for (; base; base = base->next) {
- DynamicPaintModifierData *pmd2 = (DynamicPaintModifierData *)modifiers_findByType(base->object, eModifierType_DynamicPaint);
+ DynamicPaintModifierData *pmd2 =
+ (DynamicPaintModifierData *)modifiers_findByType(base->object, eModifierType_DynamicPaint);
- if (pmd2 && pmd2->brush && ob!=base->object) {
+ if (pmd2 && pmd2->brush && ob != base->object) {
DagNode *brushNode = dag_get_node(forest, base->object);
- dag_add_relation(forest, brushNode, obNode, DAG_RL_DATA_DATA|DAG_RL_OB_DATA, "Dynamic Paint Brush");
+ dag_add_relation(forest, brushNode, obNode, DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Dynamic Paint Brush");
}
}
}
@@ -139,14 +140,14 @@ static int dependsOnTime(ModifierData *UNUSED(md))
}
static void foreachIDLink(ModifierData *md, Object *ob,
- IDWalkFunc walk, void *userData)
+ IDWalkFunc walk, void *userData)
{
- DynamicPaintModifierData *pmd = (DynamicPaintModifierData*) md;
+ DynamicPaintModifierData *pmd = (DynamicPaintModifierData *) md;
if (pmd->canvas) {
DynamicPaintSurface *surface = pmd->canvas->surfaces.first;
- for (; surface; surface=surface->next) {
+ for (; surface; surface = surface->next) {
walk(userData, ob, (ID **)&surface->brush_group);
walk(userData, ob, (ID **)&surface->init_texture);
}
@@ -157,7 +158,7 @@ static void foreachIDLink(ModifierData *md, Object *ob,
}
static void foreachTexLink(ModifierData *UNUSED(md), Object *UNUSED(ob),
- TexWalkFunc UNUSED(walk), void *UNUSED(userData))
+ TexWalkFunc UNUSED(walk), void *UNUSED(userData))
{
//walk(userData, ob, md, ""); /* re-enable when possible */
}
@@ -167,11 +168,11 @@ ModifierTypeInfo modifierType_DynamicPaint = {
/* structName */ "DynamicPaintModifierData",
/* structSize */ sizeof(DynamicPaintModifierData),
/* type */ eModifierTypeType_Constructive,
- /* flags */ eModifierTypeFlag_AcceptsMesh
-/* |eModifierTypeFlag_SupportsMapping*/
- |eModifierTypeFlag_UsesPointCache
- |eModifierTypeFlag_Single
- |eModifierTypeFlag_UsesPreview,
+ /* flags */ eModifierTypeFlag_AcceptsMesh |
+/* eModifierTypeFlag_SupportsMapping |*/
+ eModifierTypeFlag_UsesPointCache |
+ eModifierTypeFlag_Single |
+ eModifierTypeFlag_UsesPreview,
/* copyData */ copyData,
/* deformVerts */ NULL,
diff --git a/source/blender/modifiers/intern/MOD_edgesplit.c b/source/blender/modifiers/intern/MOD_edgesplit.c
index def02081be8..794ee6204ed 100644
--- a/source/blender/modifiers/intern/MOD_edgesplit.c
+++ b/source/blender/modifiers/intern/MOD_edgesplit.c
@@ -55,7 +55,7 @@
* note: this code is very close to MOD_bevel.c
*/
-#define EDGE_MARK 1
+#define EDGE_MARK 1
static DerivedMesh *doEdgeSplit(DerivedMesh *dm, EdgeSplitModifierData *emd, Object *UNUSED(ob))
{
@@ -64,7 +64,7 @@ static DerivedMesh *doEdgeSplit(DerivedMesh *dm, EdgeSplitModifierData *emd, Obj
BMEditMesh *em;
BMIter iter;
BMEdge *e;
- float threshold = cos((emd->split_angle + 0.00001) * M_PI / 180.0);
+ float threshold = cosf((emd->split_angle + 0.00001f) * (float)M_PI / 180.0f);
em = DM_to_editbmesh(dm, NULL, FALSE);
bm = em->bm;
@@ -76,8 +76,8 @@ static DerivedMesh *doEdgeSplit(DerivedMesh *dm, EdgeSplitModifierData *emd, Obj
BM_ITER_MESH (e, &iter, bm, BM_EDGES_OF_MESH) {
/* check for 1 edge having 2 face users */
BMLoop *l1, *l2;
- if ( (l1= e->l) &&
- (l2= e->l->radial_next) != l1)
+ if ((l1 = e->l) &&
+ (l2 = e->l->radial_next) != l1)
{
if (dot_v3v3(l1->f->no, l2->f->no) < threshold) {
BMO_elem_flag_enable(bm, e, EDGE_MARK);
@@ -115,7 +115,7 @@ static DerivedMesh *doEdgeSplit(DerivedMesh *dm, EdgeSplitModifierData *emd, Obj
static void initData(ModifierData *md)
{
- EdgeSplitModifierData *emd = (EdgeSplitModifierData*) md;
+ EdgeSplitModifierData *emd = (EdgeSplitModifierData *) md;
/* default to 30-degree split angle, sharpness from both angle & flag */
emd->split_angle = 30;
@@ -124,15 +124,15 @@ static void initData(ModifierData *md)
static void copyData(ModifierData *md, ModifierData *target)
{
- EdgeSplitModifierData *emd = (EdgeSplitModifierData*) md;
- EdgeSplitModifierData *temd = (EdgeSplitModifierData*) target;
+ EdgeSplitModifierData *emd = (EdgeSplitModifierData *) md;
+ EdgeSplitModifierData *temd = (EdgeSplitModifierData *) target;
temd->split_angle = emd->split_angle;
temd->flags = emd->flags;
}
static DerivedMesh *edgesplitModifier_do(EdgeSplitModifierData *emd,
- Object *ob, DerivedMesh *dm)
+ Object *ob, DerivedMesh *dm)
{
if (!(emd->flags & (MOD_EDGESPLIT_FROMANGLE | MOD_EDGESPLIT_FROMFLAG)))
return dm;
@@ -141,11 +141,11 @@ static DerivedMesh *edgesplitModifier_do(EdgeSplitModifierData *emd,
}
static DerivedMesh *applyModifier(
- ModifierData *md, Object *ob, DerivedMesh *derivedData,
- int UNUSED(useRenderParams), int UNUSED(isFinalCalc))
+ ModifierData *md, Object *ob, DerivedMesh *derivedData,
+ int UNUSED(useRenderParams), int UNUSED(isFinalCalc))
{
DerivedMesh *result;
- EdgeSplitModifierData *emd = (EdgeSplitModifierData*) md;
+ EdgeSplitModifierData *emd = (EdgeSplitModifierData *) md;
result = edgesplitModifier_do(emd, ob, derivedData);
@@ -156,8 +156,8 @@ static DerivedMesh *applyModifier(
}
static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob,
- struct BMEditMesh *UNUSED(editData),
- DerivedMesh *derivedData)
+ struct BMEditMesh *UNUSED(editData),
+ DerivedMesh *derivedData)
{
return applyModifier(md, ob, derivedData, 0, 1);
}
@@ -168,11 +168,11 @@ ModifierTypeInfo modifierType_EdgeSplit = {
/* structName */ "EdgeSplitModifierData",
/* structSize */ sizeof(EdgeSplitModifierData),
/* type */ eModifierTypeType_Constructive,
- /* flags */ eModifierTypeFlag_AcceptsMesh
- | eModifierTypeFlag_AcceptsCVs
- | eModifierTypeFlag_SupportsMapping
- | eModifierTypeFlag_SupportsEditmode
- | eModifierTypeFlag_EnableInEditmode,
+ /* flags */ eModifierTypeFlag_AcceptsMesh |
+ eModifierTypeFlag_AcceptsCVs |
+ eModifierTypeFlag_SupportsMapping |
+ eModifierTypeFlag_SupportsEditmode |
+ eModifierTypeFlag_EnableInEditmode,
/* copyData */ copyData,
/* deformVerts */ NULL,
diff --git a/source/blender/modifiers/intern/MOD_explode.c b/source/blender/modifiers/intern/MOD_explode.c
index a1dc69918c2..39932b5673c 100644
--- a/source/blender/modifiers/intern/MOD_explode.c
+++ b/source/blender/modifiers/intern/MOD_explode.c
@@ -35,6 +35,7 @@
#include "DNA_meshdata_types.h"
#include "DNA_scene_types.h"
+#include "DNA_object_types.h"
#include "BLI_kdtree.h"
#include "BLI_rand.h"
@@ -58,21 +59,21 @@
static void initData(ModifierData *md)
{
- ExplodeModifierData *emd= (ExplodeModifierData*) md;
+ ExplodeModifierData *emd = (ExplodeModifierData *) md;
- emd->facepa= NULL;
- emd->flag |= eExplodeFlag_Unborn+eExplodeFlag_Alive+eExplodeFlag_Dead;
+ emd->facepa = NULL;
+ emd->flag |= eExplodeFlag_Unborn + eExplodeFlag_Alive + eExplodeFlag_Dead;
}
static void freeData(ModifierData *md)
{
- ExplodeModifierData *emd= (ExplodeModifierData*) md;
+ ExplodeModifierData *emd = (ExplodeModifierData *) md;
if (emd->facepa) MEM_freeN(emd->facepa);
}
static void copyData(ModifierData *md, ModifierData *target)
{
- ExplodeModifierData *emd= (ExplodeModifierData*) md;
- ExplodeModifierData *temd= (ExplodeModifierData*) target;
+ ExplodeModifierData *emd = (ExplodeModifierData *) md;
+ ExplodeModifierData *temd = (ExplodeModifierData *) target;
temd->facepa = NULL;
temd->flag = emd->flag;
@@ -85,7 +86,7 @@ static int dependsOnTime(ModifierData *UNUSED(md))
}
static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
{
- ExplodeModifierData *emd= (ExplodeModifierData*) md;
+ ExplodeModifierData *emd = (ExplodeModifierData *) md;
CustomDataMask dataMask = 0;
if (emd->vgroup)
@@ -95,48 +96,48 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
}
static void createFacepa(ExplodeModifierData *emd,
- ParticleSystemModifierData *psmd,
- DerivedMesh *dm)
+ ParticleSystemModifierData *psmd,
+ DerivedMesh *dm)
{
- ParticleSystem *psys=psmd->psys;
- MFace *fa=NULL, *mface=NULL;
+ ParticleSystem *psys = psmd->psys;
+ MFace *fa = NULL, *mface = NULL;
MVert *mvert = NULL;
ParticleData *pa;
KDTree *tree;
float center[3], co[3];
- int *facepa=NULL,*vertpa=NULL,totvert=0,totface=0,totpart=0;
- int i,p,v1,v2,v3,v4=0;
+ int *facepa = NULL, *vertpa = NULL, totvert = 0, totface = 0, totpart = 0;
+ int i, p, v1, v2, v3, v4 = 0;
mvert = dm->getVertArray(dm);
mface = dm->getTessFaceArray(dm);
- totface= dm->getNumTessFaces(dm);
- totvert= dm->getNumVerts(dm);
- totpart= psmd->psys->totpart;
+ totface = dm->getNumTessFaces(dm);
+ totvert = dm->getNumVerts(dm);
+ totpart = psmd->psys->totpart;
BLI_srandom(psys->seed);
if (emd->facepa)
MEM_freeN(emd->facepa);
- facepa = emd->facepa = MEM_callocN(sizeof(int)*totface, "explode_facepa");
+ facepa = emd->facepa = MEM_callocN(sizeof(int) * totface, "explode_facepa");
- vertpa = MEM_callocN(sizeof(int)*totvert, "explode_vertpa");
+ vertpa = MEM_callocN(sizeof(int) * totvert, "explode_vertpa");
/* initialize all faces & verts to no particle */
- for (i=0; i<totface; i++)
- facepa[i]=totpart;
+ for (i = 0; i < totface; i++)
+ facepa[i] = totpart;
- for (i=0; i<totvert; i++)
- vertpa[i]=totpart;
+ for (i = 0; i < totvert; i++)
+ vertpa[i] = totpart;
/* set protected verts */
if (emd->vgroup) {
MDeformVert *dvert = dm->getVertDataArray(dm, CD_MDEFORMVERT);
if (dvert) {
- const int defgrp_index= emd->vgroup-1;
- for (i=0; i<totvert; i++, dvert++) {
+ const int defgrp_index = emd->vgroup - 1;
+ for (i = 0; i < totvert; i++, dvert++) {
float val = BLI_frand();
- val = (1.0f-emd->protect)*val + emd->protect*0.5f;
+ val = (1.0f - emd->protect) * val + emd->protect * 0.5f;
if (val < defvert_find_weight(dvert, defgrp_index))
vertpa[i] = -1;
}
@@ -144,39 +145,39 @@ static void createFacepa(ExplodeModifierData *emd,
}
/* make tree of emitter locations */
- tree=BLI_kdtree_new(totpart);
- for (p=0,pa=psys->particles; p<totpart; p++,pa++) {
- psys_particle_on_emitter(psmd,psys->part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,co,NULL,NULL,NULL,NULL,NULL);
+ tree = BLI_kdtree_new(totpart);
+ for (p = 0, pa = psys->particles; p < totpart; p++, pa++) {
+ psys_particle_on_emitter(psmd, psys->part->from, pa->num, pa->num_dmcache, pa->fuv, pa->foffset, co, NULL, NULL, NULL, NULL, NULL);
BLI_kdtree_insert(tree, p, co, NULL);
}
BLI_kdtree_balance(tree);
/* set face-particle-indexes to nearest particle to face center */
- for (i=0,fa=mface; i<totface; i++,fa++) {
- add_v3_v3v3(center,mvert[fa->v1].co,mvert[fa->v2].co);
+ for (i = 0, fa = mface; i < totface; i++, fa++) {
+ add_v3_v3v3(center, mvert[fa->v1].co, mvert[fa->v2].co);
add_v3_v3(center, mvert[fa->v3].co);
if (fa->v4) {
add_v3_v3(center, mvert[fa->v4].co);
- mul_v3_fl(center,0.25);
+ mul_v3_fl(center, 0.25);
}
else
- mul_v3_fl(center,0.3333f);
+ mul_v3_fl(center, 0.3333f);
- p= BLI_kdtree_find_nearest(tree,center,NULL,NULL);
+ p = BLI_kdtree_find_nearest(tree, center, NULL, NULL);
- v1=vertpa[fa->v1];
- v2=vertpa[fa->v2];
- v3=vertpa[fa->v3];
+ v1 = vertpa[fa->v1];
+ v2 = vertpa[fa->v2];
+ v3 = vertpa[fa->v3];
if (fa->v4)
- v4=vertpa[fa->v4];
+ v4 = vertpa[fa->v4];
- if (v1>=0 && v2>=0 && v3>=0 && (fa->v4==0 || v4>=0))
- facepa[i]=p;
+ if (v1 >= 0 && v2 >= 0 && v3 >= 0 && (fa->v4 == 0 || v4 >= 0))
+ facepa[i] = p;
- if (v1>=0) vertpa[fa->v1]=p;
- if (v2>=0) vertpa[fa->v2]=p;
- if (v3>=0) vertpa[fa->v3]=p;
- if (fa->v4 && v4>=0) vertpa[fa->v4]=p;
+ if (v1 >= 0) vertpa[fa->v1] = p;
+ if (v2 >= 0) vertpa[fa->v2] = p;
+ if (v3 >= 0) vertpa[fa->v3] = p;
+ if (fa->v4 && v4 >= 0) vertpa[fa->v4] = p;
}
if (vertpa) MEM_freeN(vertpa);
@@ -194,7 +195,7 @@ static const short add_faces[24] = {
0, 0, 2, 0, 1, 2, 2, 0, 2, 1,
2, 2, 2, 2, 3, 0, 0, 0, 1, 0,
1, 1, 2
- };
+};
static MFace *get_dface(DerivedMesh *dm, DerivedMesh *split, int cur, int i, MFace *mf)
{
@@ -205,11 +206,11 @@ static MFace *get_dface(DerivedMesh *dm, DerivedMesh *split, int cur, int i, MFa
}
#define SET_VERTS(a, b, c, d) \
- v[0] = mf->v##a; uv[0]=a-1; \
- v[1] = mf->v##b; uv[1]=b-1; \
- v[2] = mf->v##c; uv[2]=c-1; \
- v[3] = mf->v##d; uv[3]=d-1; \
- (void)0
+ v[0] = mf->v##a; uv[0] = a - 1; \
+ v[1] = mf->v##b; uv[1] = b - 1; \
+ v[2] = mf->v##c; uv[2] = c - 1; \
+ v[3] = mf->v##d; uv[3] = d - 1; \
+ (void)0
#define GET_ES(v1, v2) edgecut_get(eh, v1, v2)
#define INT_UV(uvf, c0, c1) interp_v2_v2v2(uvf, mf->uv[c0], mf->uv[c1], 0.5f)
@@ -217,8 +218,8 @@ static MFace *get_dface(DerivedMesh *dm, DerivedMesh *split, int cur, int i, MFa
static void remap_faces_3_6_9_12(DerivedMesh *dm, DerivedMesh *split, MFace *mf, int *facepa, int *vertpa, int i, EdgeHash *eh, int cur, int v1, int v2, int v3, int v4)
{
MFace *df1 = get_dface(dm, split, cur, i, mf);
- MFace *df2 = get_dface(dm, split, cur+1, i, mf);
- MFace *df3 = get_dface(dm, split, cur+2, i, mf);
+ MFace *df2 = get_dface(dm, split, cur + 1, i, mf);
+ MFace *df3 = get_dface(dm, split, cur + 2, i, mf);
facepa[cur] = vertpa[v1];
df1->v1 = v1;
@@ -227,14 +228,14 @@ static void remap_faces_3_6_9_12(DerivedMesh *dm, DerivedMesh *split, MFace *mf,
df1->v4 = v3;
df1->flag |= ME_FACE_SEL;
- facepa[cur+1] = vertpa[v2];
+ facepa[cur + 1] = vertpa[v2];
df2->v1 = GET_ES(v1, v2);
df2->v2 = v2;
df2->v3 = GET_ES(v2, v3);
df2->v4 = 0;
df2->flag &= ~ME_FACE_SEL;
- facepa[cur+2] = vertpa[v1];
+ facepa[cur + 2] = vertpa[v1];
df3->v1 = v1;
df3->v2 = v3;
df3->v3 = v4;
@@ -247,9 +248,9 @@ static void remap_uvs_3_6_9_12(DerivedMesh *dm, DerivedMesh *split, int numlayer
MTFace *mf, *df1, *df2, *df3;
int l;
- for (l=0; l<numlayer; l++) {
+ for (l = 0; l < numlayer; l++) {
mf = CustomData_get_layer_n(&split->faceData, CD_MTFACE, l);
- df1 = mf+cur;
+ df1 = mf + cur;
df2 = df1 + 1;
df3 = df1 + 2;
mf = CustomData_get_layer_n(&dm->faceData, CD_MTFACE, l);
@@ -273,7 +274,7 @@ static void remap_uvs_3_6_9_12(DerivedMesh *dm, DerivedMesh *split, int numlayer
static void remap_faces_5_10(DerivedMesh *dm, DerivedMesh *split, MFace *mf, int *facepa, int *vertpa, int i, EdgeHash *eh, int cur, int v1, int v2, int v3, int v4)
{
MFace *df1 = get_dface(dm, split, cur, i, mf);
- MFace *df2 = get_dface(dm, split, cur+1, i, mf);
+ MFace *df2 = get_dface(dm, split, cur + 1, i, mf);
facepa[cur] = vertpa[v1];
df1->v1 = v1;
@@ -282,7 +283,7 @@ static void remap_faces_5_10(DerivedMesh *dm, DerivedMesh *split, MFace *mf, int
df1->v4 = GET_ES(v1, v4);
df1->flag |= ME_FACE_SEL;
- facepa[cur+1] = vertpa[v3];
+ facepa[cur + 1] = vertpa[v3];
df2->v1 = GET_ES(v1, v4);
df2->v2 = GET_ES(v2, v3);
df2->v3 = v3;
@@ -295,9 +296,9 @@ static void remap_uvs_5_10(DerivedMesh *dm, DerivedMesh *split, int numlayer, in
MTFace *mf, *df1, *df2;
int l;
- for (l=0; l<numlayer; l++) {
+ for (l = 0; l < numlayer; l++) {
mf = CustomData_get_layer_n(&split->faceData, CD_MTFACE, l);
- df1 = mf+cur;
+ df1 = mf + cur;
df2 = df1 + 1;
mf = CustomData_get_layer_n(&dm->faceData, CD_MTFACE, l);
mf += i;
@@ -318,9 +319,9 @@ static void remap_uvs_5_10(DerivedMesh *dm, DerivedMesh *split, int numlayer, in
static void remap_faces_15(DerivedMesh *dm, DerivedMesh *split, MFace *mf, int *facepa, int *vertpa, int i, EdgeHash *eh, int cur, int v1, int v2, int v3, int v4)
{
MFace *df1 = get_dface(dm, split, cur, i, mf);
- MFace *df2 = get_dface(dm, split, cur+1, i, mf);
- MFace *df3 = get_dface(dm, split, cur+2, i, mf);
- MFace *df4 = get_dface(dm, split, cur+3, i, mf);
+ MFace *df2 = get_dface(dm, split, cur + 1, i, mf);
+ MFace *df3 = get_dface(dm, split, cur + 2, i, mf);
+ MFace *df4 = get_dface(dm, split, cur + 3, i, mf);
facepa[cur] = vertpa[v1];
df1->v1 = v1;
@@ -329,21 +330,21 @@ static void remap_faces_15(DerivedMesh *dm, DerivedMesh *split, MFace *mf, int *
df1->v4 = GET_ES(v1, v4);
df1->flag |= ME_FACE_SEL;
- facepa[cur+1] = vertpa[v2];
+ facepa[cur + 1] = vertpa[v2];
df2->v1 = GET_ES(v1, v2);
df2->v2 = v2;
df2->v3 = GET_ES(v2, v3);
df2->v4 = GET_ES(v1, v3);
df2->flag |= ME_FACE_SEL;
- facepa[cur+2] = vertpa[v3];
+ facepa[cur + 2] = vertpa[v3];
df3->v1 = GET_ES(v1, v3);
df3->v2 = GET_ES(v2, v3);
df3->v3 = v3;
df3->v4 = GET_ES(v3, v4);
df3->flag |= ME_FACE_SEL;
- facepa[cur+3] = vertpa[v4];
+ facepa[cur + 3] = vertpa[v4];
df4->v1 = GET_ES(v1, v4);
df4->v2 = GET_ES(v1, v3);
df4->v3 = GET_ES(v3, v4);
@@ -356,9 +357,9 @@ static void remap_uvs_15(DerivedMesh *dm, DerivedMesh *split, int numlayer, int
MTFace *mf, *df1, *df2, *df3, *df4;
int l;
- for (l=0; l<numlayer; l++) {
+ for (l = 0; l < numlayer; l++) {
mf = CustomData_get_layer_n(&split->faceData, CD_MTFACE, l);
- df1 = mf+cur;
+ df1 = mf + cur;
df2 = df1 + 1;
df3 = df1 + 2;
df4 = df1 + 3;
@@ -390,8 +391,8 @@ static void remap_uvs_15(DerivedMesh *dm, DerivedMesh *split, int numlayer, int
static void remap_faces_7_11_13_14(DerivedMesh *dm, DerivedMesh *split, MFace *mf, int *facepa, int *vertpa, int i, EdgeHash *eh, int cur, int v1, int v2, int v3, int v4)
{
MFace *df1 = get_dface(dm, split, cur, i, mf);
- MFace *df2 = get_dface(dm, split, cur+1, i, mf);
- MFace *df3 = get_dface(dm, split, cur+2, i, mf);
+ MFace *df2 = get_dface(dm, split, cur + 1, i, mf);
+ MFace *df3 = get_dface(dm, split, cur + 2, i, mf);
facepa[cur] = vertpa[v1];
df1->v1 = v1;
@@ -400,14 +401,14 @@ static void remap_faces_7_11_13_14(DerivedMesh *dm, DerivedMesh *split, MFace *m
df1->v4 = GET_ES(v1, v4);
df1->flag |= ME_FACE_SEL;
- facepa[cur+1] = vertpa[v2];
+ facepa[cur + 1] = vertpa[v2];
df2->v1 = GET_ES(v1, v2);
df2->v2 = v2;
df2->v3 = GET_ES(v2, v3);
df2->v4 = 0;
df2->flag &= ~ME_FACE_SEL;
- facepa[cur+2] = vertpa[v4];
+ facepa[cur + 2] = vertpa[v4];
df3->v1 = GET_ES(v1, v4);
df3->v2 = GET_ES(v2, v3);
df3->v3 = v3;
@@ -420,9 +421,9 @@ static void remap_uvs_7_11_13_14(DerivedMesh *dm, DerivedMesh *split, int numlay
MTFace *mf, *df1, *df2, *df3;
int l;
- for (l=0; l<numlayer; l++) {
+ for (l = 0; l < numlayer; l++) {
mf = CustomData_get_layer_n(&split->faceData, CD_MTFACE, l);
- df1 = mf+cur;
+ df1 = mf + cur;
df2 = df1 + 1;
df3 = df1 + 2;
mf = CustomData_get_layer_n(&dm->faceData, CD_MTFACE, l);
@@ -447,7 +448,7 @@ static void remap_uvs_7_11_13_14(DerivedMesh *dm, DerivedMesh *split, int numlay
static void remap_faces_19_21_22(DerivedMesh *dm, DerivedMesh *split, MFace *mf, int *facepa, int *vertpa, int i, EdgeHash *eh, int cur, int v1, int v2, int v3)
{
MFace *df1 = get_dface(dm, split, cur, i, mf);
- MFace *df2 = get_dface(dm, split, cur+1, i, mf);
+ MFace *df2 = get_dface(dm, split, cur + 1, i, mf);
facepa[cur] = vertpa[v1];
df1->v1 = v1;
@@ -456,7 +457,7 @@ static void remap_faces_19_21_22(DerivedMesh *dm, DerivedMesh *split, MFace *mf,
df1->v4 = 0;
df1->flag &= ~ME_FACE_SEL;
- facepa[cur+1] = vertpa[v2];
+ facepa[cur + 1] = vertpa[v2];
df2->v1 = GET_ES(v1, v2);
df2->v2 = v2;
df2->v3 = v3;
@@ -469,9 +470,9 @@ static void remap_uvs_19_21_22(DerivedMesh *dm, DerivedMesh *split, int numlayer
MTFace *mf, *df1, *df2;
int l;
- for (l=0; l<numlayer; l++) {
+ for (l = 0; l < numlayer; l++) {
mf = CustomData_get_layer_n(&split->faceData, CD_MTFACE, l);
- df1 = mf+cur;
+ df1 = mf + cur;
df2 = df1 + 1;
mf = CustomData_get_layer_n(&dm->faceData, CD_MTFACE, l);
mf += i;
@@ -490,8 +491,8 @@ static void remap_uvs_19_21_22(DerivedMesh *dm, DerivedMesh *split, int numlayer
static void remap_faces_23(DerivedMesh *dm, DerivedMesh *split, MFace *mf, int *facepa, int *vertpa, int i, EdgeHash *eh, int cur, int v1, int v2, int v3)
{
MFace *df1 = get_dface(dm, split, cur, i, mf);
- MFace *df2 = get_dface(dm, split, cur+1, i, mf);
- MFace *df3 = get_dface(dm, split, cur+2, i, mf);
+ MFace *df2 = get_dface(dm, split, cur + 1, i, mf);
+ MFace *df3 = get_dface(dm, split, cur + 2, i, mf);
facepa[cur] = vertpa[v1];
df1->v1 = v1;
@@ -500,14 +501,14 @@ static void remap_faces_23(DerivedMesh *dm, DerivedMesh *split, MFace *mf, int *
df1->v4 = GET_ES(v1, v3);
df1->flag |= ME_FACE_SEL;
- facepa[cur+1] = vertpa[v2];
+ facepa[cur + 1] = vertpa[v2];
df2->v1 = GET_ES(v1, v2);
df2->v2 = v2;
df2->v3 = GET_ES(v2, v3);
df2->v4 = 0;
df2->flag &= ~ME_FACE_SEL;
- facepa[cur+2] = vertpa[v3];
+ facepa[cur + 2] = vertpa[v3];
df3->v1 = GET_ES(v1, v3);
df3->v2 = GET_ES(v2, v3);
df3->v3 = v3;
@@ -520,9 +521,9 @@ static void remap_uvs_23(DerivedMesh *dm, DerivedMesh *split, int numlayer, int
MTFace *mf, *df1, *df2;
int l;
- for (l=0; l<numlayer; l++) {
+ for (l = 0; l < numlayer; l++) {
mf = CustomData_get_layer_n(&split->faceData, CD_MTFACE, l);
- df1 = mf+cur;
+ df1 = mf + cur;
df2 = df1 + 1;
mf = CustomData_get_layer_n(&dm->faceData, CD_MTFACE, l);
mf += i;
@@ -542,63 +543,63 @@ static void remap_uvs_23(DerivedMesh *dm, DerivedMesh *split, int numlayer, int
}
}
-static DerivedMesh * cutEdges(ExplodeModifierData *emd, DerivedMesh *dm)
+static DerivedMesh *cutEdges(ExplodeModifierData *emd, DerivedMesh *dm)
{
DerivedMesh *splitdm;
- MFace *mf=NULL,*df1=NULL;
- MFace *mface=dm->getTessFaceArray(dm);
+ MFace *mf = NULL, *df1 = NULL;
+ MFace *mface = dm->getTessFaceArray(dm);
MVert *dupve, *mv;
EdgeHash *edgehash;
EdgeHashIterator *ehi;
- int totvert=dm->getNumVerts(dm);
- int totface=dm->getNumTessFaces(dm);
+ int totvert = dm->getNumVerts(dm);
+ int totface = dm->getNumTessFaces(dm);
- int *facesplit = MEM_callocN(sizeof(int)*totface,"explode_facesplit");
- int *vertpa = MEM_callocN(sizeof(int)*totvert,"explode_vertpa2");
+ int *facesplit = MEM_callocN(sizeof(int) * totface, "explode_facesplit");
+ int *vertpa = MEM_callocN(sizeof(int) * totvert, "explode_vertpa2");
int *facepa = emd->facepa;
- int *fs, totesplit=0,totfsplit=0,curdupface=0;
+ int *fs, totesplit = 0, totfsplit = 0, curdupface = 0;
int i, v1, v2, v3, v4, esplit,
v[4] = {0, 0, 0, 0}, /* To quite gcc barking... */
uv[4] = {0, 0, 0, 0}; /* To quite gcc barking... */
int numlayer;
unsigned int ed_v1, ed_v2;
- edgehash= BLI_edgehash_new();
+ edgehash = BLI_edgehash_new();
/* recreate vertpa from facepa calculation */
- for (i=0,mf=mface; i<totface; i++,mf++) {
- vertpa[mf->v1]=facepa[i];
- vertpa[mf->v2]=facepa[i];
- vertpa[mf->v3]=facepa[i];
+ for (i = 0, mf = mface; i < totface; i++, mf++) {
+ vertpa[mf->v1] = facepa[i];
+ vertpa[mf->v2] = facepa[i];
+ vertpa[mf->v3] = facepa[i];
if (mf->v4)
- vertpa[mf->v4]=facepa[i];
+ vertpa[mf->v4] = facepa[i];
}
/* mark edges for splitting and how to split faces */
- for (i=0,mf=mface,fs=facesplit; i<totface; i++,mf++,fs++) {
- v1=vertpa[mf->v1];
- v2=vertpa[mf->v2];
- v3=vertpa[mf->v3];
+ for (i = 0, mf = mface, fs = facesplit; i < totface; i++, mf++, fs++) {
+ v1 = vertpa[mf->v1];
+ v2 = vertpa[mf->v2];
+ v3 = vertpa[mf->v3];
- if (v1!=v2) {
+ if (v1 != v2) {
BLI_edgehash_insert(edgehash, mf->v1, mf->v2, NULL);
(*fs) |= 1;
}
- if (v2!=v3) {
+ if (v2 != v3) {
BLI_edgehash_insert(edgehash, mf->v2, mf->v3, NULL);
(*fs) |= 2;
}
if (mf->v4) {
- v4=vertpa[mf->v4];
+ v4 = vertpa[mf->v4];
- if (v3!=v4) {
+ if (v3 != v4) {
BLI_edgehash_insert(edgehash, mf->v3, mf->v4, NULL);
(*fs) |= 4;
}
- if (v1!=v4) {
+ if (v1 != v4) {
BLI_edgehash_insert(edgehash, mf->v1, mf->v4, NULL);
(*fs) |= 8;
}
@@ -610,7 +611,7 @@ static DerivedMesh * cutEdges(ExplodeModifierData *emd, DerivedMesh *dm)
else {
(*fs) |= 16; /* mark face as tri */
- if (v1!=v3) {
+ if (v1 != v3) {
BLI_edgehash_insert(edgehash, mf->v1, mf->v3, NULL);
(*fs) |= 4;
}
@@ -618,8 +619,8 @@ static DerivedMesh * cutEdges(ExplodeModifierData *emd, DerivedMesh *dm)
}
/* count splits & create indexes for new verts */
- ehi= BLI_edgehashIterator_new(edgehash);
- totesplit=totvert;
+ ehi = BLI_edgehashIterator_new(edgehash);
+ totesplit = totvert;
for (; !BLI_edgehashIterator_isDone(ehi); BLI_edgehashIterator_step(ehi)) {
BLI_edgehashIterator_setValue(ehi, SET_INT_IN_POINTER(totesplit));
totesplit++;
@@ -627,14 +628,14 @@ static DerivedMesh * cutEdges(ExplodeModifierData *emd, DerivedMesh *dm)
BLI_edgehashIterator_free(ehi);
/* count new faces due to splitting */
- for (i=0,fs=facesplit; i<totface; i++,fs++)
+ for (i = 0, fs = facesplit; i < totface; i++, fs++)
totfsplit += add_faces[*fs];
- splitdm= CDDM_from_template(dm, totesplit, 0, totface+totfsplit, 0, 0);
+ splitdm = CDDM_from_template(dm, totesplit, 0, totface + totfsplit, 0, 0);
numlayer = CustomData_number_of_layers(&splitdm->faceData, CD_MTFACE);
/* copy new faces & verts (is it really this painful with custom data??) */
- for (i=0; i<totvert; i++) {
+ for (i = 0; i < totvert; i++) {
MVert source;
MVert *dest;
dm->getVert(dm, i, &source);
@@ -650,23 +651,23 @@ static DerivedMesh * cutEdges(ExplodeModifierData *emd, DerivedMesh *dm)
* later interpreted as tri's, for this to work right I think we probably
* have to stop using tessface - campbell */
- facepa= MEM_callocN(sizeof(int)*(totface+(totfsplit * 2)),"explode_facepa");
- //memcpy(facepa,emd->facepa,totface*sizeof(int));
- emd->facepa=facepa;
+ facepa = MEM_callocN(sizeof(int) * (totface + (totfsplit * 2)), "explode_facepa");
+ //memcpy(facepa, emd->facepa, totface*sizeof(int));
+ emd->facepa = facepa;
/* create new verts */
- ehi= BLI_edgehashIterator_new(edgehash);
+ ehi = BLI_edgehashIterator_new(edgehash);
for (; !BLI_edgehashIterator_isDone(ehi); BLI_edgehashIterator_step(ehi)) {
BLI_edgehashIterator_getKey(ehi, &ed_v1, &ed_v2);
- esplit= GET_INT_FROM_POINTER(BLI_edgehashIterator_getValue(ehi));
- mv=CDDM_get_vert(splitdm, ed_v2);
- dupve=CDDM_get_vert(splitdm,esplit);
+ esplit = GET_INT_FROM_POINTER(BLI_edgehashIterator_getValue(ehi));
+ mv = CDDM_get_vert(splitdm, ed_v2);
+ dupve = CDDM_get_vert(splitdm, esplit);
- DM_copy_vert_data(splitdm,splitdm, ed_v2, esplit,1);
+ DM_copy_vert_data(splitdm, splitdm, ed_v2, esplit, 1);
- *dupve=*mv;
+ *dupve = *mv;
- mv=CDDM_get_vert(splitdm, ed_v1);
+ mv = CDDM_get_vert(splitdm, ed_v1);
add_v3_v3(dupve->co, mv->co);
mul_v3_fl(dupve->co, 0.5f);
@@ -674,99 +675,99 @@ static DerivedMesh * cutEdges(ExplodeModifierData *emd, DerivedMesh *dm)
BLI_edgehashIterator_free(ehi);
/* create new faces */
- curdupface=0;//=totface;
+ curdupface = 0; //=totface;
//curdupin=totesplit;
- for (i=0,fs=facesplit; i<totface; i++,fs++) {
+ for (i = 0, fs = facesplit; i < totface; i++, fs++) {
mf = dm->getTessFaceData(dm, i, CD_MFACE);
- switch(*fs) {
- case 3:
- case 10:
- case 11:
- case 15:
- SET_VERTS(1, 2, 3, 4);
- break;
- case 5:
- case 6:
- case 7:
- SET_VERTS(2, 3, 4, 1);
- break;
- case 9:
- case 13:
- SET_VERTS(4, 1, 2, 3);
- break;
- case 12:
- case 14:
- SET_VERTS(3, 4, 1, 2);
- break;
- case 21:
- case 23:
- SET_VERTS(1, 2, 3, 4);
- break;
- case 19:
- SET_VERTS(2, 3, 1, 4);
- break;
- case 22:
- SET_VERTS(3, 1, 2, 4);
- break;
+ switch (*fs) {
+ case 3:
+ case 10:
+ case 11:
+ case 15:
+ SET_VERTS(1, 2, 3, 4);
+ break;
+ case 5:
+ case 6:
+ case 7:
+ SET_VERTS(2, 3, 4, 1);
+ break;
+ case 9:
+ case 13:
+ SET_VERTS(4, 1, 2, 3);
+ break;
+ case 12:
+ case 14:
+ SET_VERTS(3, 4, 1, 2);
+ break;
+ case 21:
+ case 23:
+ SET_VERTS(1, 2, 3, 4);
+ break;
+ case 19:
+ SET_VERTS(2, 3, 1, 4);
+ break;
+ case 22:
+ SET_VERTS(3, 1, 2, 4);
+ break;
}
- switch(*fs) {
- case 3:
- case 6:
- case 9:
- case 12:
- remap_faces_3_6_9_12(dm, splitdm, mf, facepa, vertpa, i, edgehash, curdupface, v[0], v[1], v[2], v[3]);
- if (numlayer)
- remap_uvs_3_6_9_12(dm, splitdm, numlayer, i, curdupface, uv[0], uv[1], uv[2], uv[3]);
- break;
- case 5:
- case 10:
- remap_faces_5_10(dm, splitdm, mf, facepa, vertpa, i, edgehash, curdupface, v[0], v[1], v[2], v[3]);
- if (numlayer)
- remap_uvs_5_10(dm, splitdm, numlayer, i, curdupface, uv[0], uv[1], uv[2], uv[3]);
- break;
- case 15:
- remap_faces_15(dm, splitdm, mf, facepa, vertpa, i, edgehash, curdupface, v[0], v[1], v[2], v[3]);
- if (numlayer)
- remap_uvs_15(dm, splitdm, numlayer, i, curdupface, uv[0], uv[1], uv[2], uv[3]);
- break;
- case 7:
- case 11:
- case 13:
- case 14:
- remap_faces_7_11_13_14(dm, splitdm, mf, facepa, vertpa, i, edgehash, curdupface, v[0], v[1], v[2], v[3]);
- if (numlayer)
- remap_uvs_7_11_13_14(dm, splitdm, numlayer, i, curdupface, uv[0], uv[1], uv[2], uv[3]);
- break;
- case 19:
- case 21:
- case 22:
- remap_faces_19_21_22(dm, splitdm, mf, facepa, vertpa, i, edgehash, curdupface, v[0], v[1], v[2]);
- if (numlayer)
- remap_uvs_19_21_22(dm, splitdm, numlayer, i, curdupface, uv[0], uv[1], uv[2]);
- break;
- case 23:
- remap_faces_23(dm, splitdm, mf, facepa, vertpa, i, edgehash, curdupface, v[0], v[1], v[2]);
- if (numlayer)
- remap_uvs_23(dm, splitdm, numlayer, i, curdupface, uv[0], uv[1], uv[2]);
- break;
- case 0:
- case 16:
- df1 = get_dface(dm, splitdm, curdupface, i, mf);
- facepa[curdupface] = vertpa[mf->v1];
-
- if (df1->v4)
- df1->flag |= ME_FACE_SEL;
- else
- df1->flag &= ~ME_FACE_SEL;
- break;
+ switch (*fs) {
+ case 3:
+ case 6:
+ case 9:
+ case 12:
+ remap_faces_3_6_9_12(dm, splitdm, mf, facepa, vertpa, i, edgehash, curdupface, v[0], v[1], v[2], v[3]);
+ if (numlayer)
+ remap_uvs_3_6_9_12(dm, splitdm, numlayer, i, curdupface, uv[0], uv[1], uv[2], uv[3]);
+ break;
+ case 5:
+ case 10:
+ remap_faces_5_10(dm, splitdm, mf, facepa, vertpa, i, edgehash, curdupface, v[0], v[1], v[2], v[3]);
+ if (numlayer)
+ remap_uvs_5_10(dm, splitdm, numlayer, i, curdupface, uv[0], uv[1], uv[2], uv[3]);
+ break;
+ case 15:
+ remap_faces_15(dm, splitdm, mf, facepa, vertpa, i, edgehash, curdupface, v[0], v[1], v[2], v[3]);
+ if (numlayer)
+ remap_uvs_15(dm, splitdm, numlayer, i, curdupface, uv[0], uv[1], uv[2], uv[3]);
+ break;
+ case 7:
+ case 11:
+ case 13:
+ case 14:
+ remap_faces_7_11_13_14(dm, splitdm, mf, facepa, vertpa, i, edgehash, curdupface, v[0], v[1], v[2], v[3]);
+ if (numlayer)
+ remap_uvs_7_11_13_14(dm, splitdm, numlayer, i, curdupface, uv[0], uv[1], uv[2], uv[3]);
+ break;
+ case 19:
+ case 21:
+ case 22:
+ remap_faces_19_21_22(dm, splitdm, mf, facepa, vertpa, i, edgehash, curdupface, v[0], v[1], v[2]);
+ if (numlayer)
+ remap_uvs_19_21_22(dm, splitdm, numlayer, i, curdupface, uv[0], uv[1], uv[2]);
+ break;
+ case 23:
+ remap_faces_23(dm, splitdm, mf, facepa, vertpa, i, edgehash, curdupface, v[0], v[1], v[2]);
+ if (numlayer)
+ remap_uvs_23(dm, splitdm, numlayer, i, curdupface, uv[0], uv[1], uv[2]);
+ break;
+ case 0:
+ case 16:
+ df1 = get_dface(dm, splitdm, curdupface, i, mf);
+ facepa[curdupface] = vertpa[mf->v1];
+
+ if (df1->v4)
+ df1->flag |= ME_FACE_SEL;
+ else
+ df1->flag &= ~ME_FACE_SEL;
+ break;
}
- curdupface += add_faces[*fs]+1;
+ curdupface += add_faces[*fs] + 1;
}
- for (i=0; i<curdupface; i++) {
+ for (i = 0; i < curdupface; i++) {
mf = CDDM_get_tessface(splitdm, i);
test_index_face(mf, &splitdm->faceData, i, (mf->flag & ME_FACE_SEL ? 4 : 3));
}
@@ -780,46 +781,46 @@ static DerivedMesh * cutEdges(ExplodeModifierData *emd, DerivedMesh *dm)
return splitdm;
}
-static DerivedMesh * explodeMesh(ExplodeModifierData *emd,
- ParticleSystemModifierData *psmd, Scene *scene, Object *ob,
- DerivedMesh *to_explode)
+static DerivedMesh *explodeMesh(ExplodeModifierData *emd,
+ ParticleSystemModifierData *psmd, Scene *scene, Object *ob,
+ DerivedMesh *to_explode)
{
- DerivedMesh *explode, *dm=to_explode;
- MFace *mf= NULL, *mface;
+ DerivedMesh *explode, *dm = to_explode;
+ MFace *mf = NULL, *mface;
/* ParticleSettings *part=psmd->psys->part; */ /* UNUSED */
- ParticleSimulationData sim= {NULL};
- ParticleData *pa=NULL, *pars=psmd->psys->particles;
+ ParticleSimulationData sim = {NULL};
+ ParticleData *pa = NULL, *pars = psmd->psys->particles;
ParticleKey state, birth;
EdgeHash *vertpahash;
EdgeHashIterator *ehi;
- float *vertco= NULL, imat[4][4];
+ float *vertco = NULL, imat[4][4];
float rot[4];
float cfra;
/* float timestep; */
- int *facepa=emd->facepa;
- int totdup=0,totvert=0,totface=0,totpart=0,delface=0;
+ int *facepa = emd->facepa;
+ int totdup = 0, totvert = 0, totface = 0, totpart = 0, delface = 0;
int i, v, u;
- unsigned int ed_v1, ed_v2, mindex=0;
+ unsigned int ed_v1, ed_v2, mindex = 0;
MTFace *mtface = NULL, *mtf;
- totface= dm->getNumTessFaces(dm);
- totvert= dm->getNumVerts(dm);
- mface= dm->getTessFaceArray(dm);
- totpart= psmd->psys->totpart;
+ totface = dm->getNumTessFaces(dm);
+ totvert = dm->getNumVerts(dm);
+ mface = dm->getTessFaceArray(dm);
+ totpart = psmd->psys->totpart;
- sim.scene= scene;
- sim.ob= ob;
- sim.psys= psmd->psys;
- sim.psmd= psmd;
+ sim.scene = scene;
+ sim.ob = ob;
+ sim.psys = psmd->psys;
+ sim.psmd = psmd;
/* timestep= psys_get_timestep(&sim); */
- cfra= BKE_curframe(scene);
+ cfra = BKE_scene_frame_get(scene);
/* hash table for vertice <-> particle relations */
- vertpahash= BLI_edgehash_new();
+ vertpahash = BLI_edgehash_new();
- for (i=0; i<totface; i++) {
+ for (i = 0; i < totface; i++) {
if (facepa[i] != totpart) {
pa = pars + facepa[i];
@@ -834,12 +835,12 @@ static DerivedMesh * explodeMesh(ExplodeModifierData *emd,
/* do mindex + totvert to ensure the vertex index to be the first
* with BLI_edgehashIterator_getKey */
- if (facepa[i]==totpart || cfra < (pars+facepa[i])->time)
- mindex = totvert+totpart;
+ if (facepa[i] == totpart || cfra < (pars + facepa[i])->time)
+ mindex = totvert + totpart;
else
- mindex = totvert+facepa[i];
+ mindex = totvert + facepa[i];
- mf= &mface[i];
+ mf = &mface[i];
/* set face vertices to exist in particle group */
BLI_edgehash_insert(vertpahash, mf->v1, mindex, NULL);
@@ -850,7 +851,7 @@ static DerivedMesh * explodeMesh(ExplodeModifierData *emd,
}
/* make new vertice indexes & count total vertices after duplication */
- ehi= BLI_edgehashIterator_new(vertpahash);
+ ehi = BLI_edgehashIterator_new(vertpahash);
for (; !BLI_edgehashIterator_isDone(ehi); BLI_edgehashIterator_step(ehi)) {
BLI_edgehashIterator_setValue(ehi, SET_INT_IN_POINTER(totdup));
totdup++;
@@ -858,17 +859,17 @@ static DerivedMesh * explodeMesh(ExplodeModifierData *emd,
BLI_edgehashIterator_free(ehi);
/* the final duplicated vertices */
- explode= CDDM_from_template(dm, totdup, 0,totface-delface, 0, 0);
+ explode = CDDM_from_template(dm, totdup, 0, totface - delface, 0, 0);
mtface = CustomData_get_layer_named(&explode->faceData, CD_MTFACE, emd->uvname);
/*dupvert= CDDM_get_verts(explode);*/
/* getting back to object space */
- invert_m4_m4(imat,ob->obmat);
+ invert_m4_m4(imat, ob->obmat);
psmd->psys->lattice = psys_get_lattice(&sim);
/* duplicate & displace vertices */
- ehi= BLI_edgehashIterator_new(vertpahash);
+ ehi = BLI_edgehashIterator_new(vertpahash);
for (; !BLI_edgehashIterator_isDone(ehi); BLI_edgehashIterator_step(ehi)) {
MVert source;
MVert *dest;
@@ -876,25 +877,25 @@ static DerivedMesh * explodeMesh(ExplodeModifierData *emd,
/* get particle + vertex from hash */
BLI_edgehashIterator_getKey(ehi, &ed_v1, &ed_v2);
ed_v2 -= totvert;
- v= GET_INT_FROM_POINTER(BLI_edgehashIterator_getValue(ehi));
+ v = GET_INT_FROM_POINTER(BLI_edgehashIterator_getValue(ehi));
dm->getVert(dm, ed_v1, &source);
- dest = CDDM_get_vert(explode,v);
+ dest = CDDM_get_vert(explode, v);
DM_copy_vert_data(dm, explode, ed_v1, v, 1);
*dest = source;
if (ed_v2 != totpart) {
/* get particle */
- pa= pars + ed_v2;
+ pa = pars + ed_v2;
psys_get_birth_coordinates(&sim, pa, &birth, 0, 0);
- state.time=cfra;
+ state.time = cfra;
psys_get_particle_state(&sim, ed_v2, &state, 1);
- vertco=CDDM_get_vert(explode,v)->co;
- mul_m4_v3(ob->obmat,vertco);
+ vertco = CDDM_get_vert(explode, v)->co;
+ mul_m4_v3(ob->obmat, vertco);
sub_v3_v3(vertco, birth.co);
@@ -903,7 +904,7 @@ static DerivedMesh * explodeMesh(ExplodeModifierData *emd,
mul_qt_v3(rot, vertco);
if (emd->flag & eExplodeFlag_PaSize)
- mul_v3_fl(vertco,pa->size);
+ mul_v3_fl(vertco, pa->size);
add_v3_v3(vertco, state.co);
@@ -913,27 +914,27 @@ static DerivedMesh * explodeMesh(ExplodeModifierData *emd,
BLI_edgehashIterator_free(ehi);
/*map new vertices to faces*/
- for (i=0,u=0; i<totface; i++) {
+ for (i = 0, u = 0; i < totface; i++) {
MFace source;
int orig_v4;
- if (facepa[i]!=totpart) {
- pa=pars+facepa[i];
+ if (facepa[i] != totpart) {
+ pa = pars + facepa[i];
- if (pa->alive==PARS_UNBORN && (emd->flag&eExplodeFlag_Unborn)==0) continue;
- if (pa->alive==PARS_ALIVE && (emd->flag&eExplodeFlag_Alive)==0) continue;
- if (pa->alive==PARS_DEAD && (emd->flag&eExplodeFlag_Dead)==0) continue;
+ if (pa->alive == PARS_UNBORN && (emd->flag & eExplodeFlag_Unborn) == 0) continue;
+ if (pa->alive == PARS_ALIVE && (emd->flag & eExplodeFlag_Alive) == 0) continue;
+ if (pa->alive == PARS_DEAD && (emd->flag & eExplodeFlag_Dead) == 0) continue;
}
- dm->getTessFace(dm,i,&source);
- mf=CDDM_get_tessface(explode,u);
+ dm->getTessFace(dm, i, &source);
+ mf = CDDM_get_tessface(explode, u);
orig_v4 = source.v4;
- if (facepa[i]!=totpart && cfra < pa->time)
- mindex = totvert+totpart;
+ if (facepa[i] != totpart && cfra < pa->time)
+ mindex = totvert + totpart;
else
- mindex = totvert+facepa[i];
+ mindex = totvert + facepa[i];
source.v1 = edgecut_get(vertpahash, source.v1, mindex);
source.v2 = edgecut_get(vertpahash, source.v2, mindex);
@@ -941,13 +942,13 @@ static DerivedMesh * explodeMesh(ExplodeModifierData *emd,
if (source.v4)
source.v4 = edgecut_get(vertpahash, source.v4, mindex);
- DM_copy_tessface_data(dm,explode,i,u,1);
+ DM_copy_tessface_data(dm, explode, i, u, 1);
*mf = source;
/* override uv channel for particle age */
if (mtface) {
- float age = (cfra - pa->time)/pa->lifetime;
+ float age = (cfra - pa->time) / pa->lifetime;
/* Clamp to this range to avoid flipping to the other side of the coordinates. */
CLAMP(age, 0.001f, 0.999f);
@@ -971,45 +972,45 @@ static DerivedMesh * explodeMesh(ExplodeModifierData *emd,
if (psmd->psys->lattice) {
end_latt_deform(psmd->psys->lattice);
- psmd->psys->lattice= NULL;
+ psmd->psys->lattice = NULL;
}
return explode;
}
-static ParticleSystemModifierData * findPrecedingParticlesystem(Object *ob, ModifierData *emd)
+static ParticleSystemModifierData *findPrecedingParticlesystem(Object *ob, ModifierData *emd)
{
ModifierData *md;
- ParticleSystemModifierData *psmd= NULL;
+ ParticleSystemModifierData *psmd = NULL;
- for (md=ob->modifiers.first; emd!=md; md=md->next) {
- if (md->type==eModifierType_ParticleSystem)
- psmd= (ParticleSystemModifierData*) md;
+ for (md = ob->modifiers.first; emd != md; md = md->next) {
+ if (md->type == eModifierType_ParticleSystem)
+ psmd = (ParticleSystemModifierData *) md;
}
return psmd;
}
-static DerivedMesh * applyModifier(ModifierData *md, Object *ob,
- DerivedMesh *derivedData,
- int UNUSED(useRenderParams),
- int UNUSED(isFinalCalc))
+static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
+ DerivedMesh *derivedData,
+ int UNUSED(useRenderParams),
+ int UNUSED(isFinalCalc))
{
DerivedMesh *dm = derivedData;
- ExplodeModifierData *emd= (ExplodeModifierData*) md;
- ParticleSystemModifierData *psmd=findPrecedingParticlesystem(ob,md);
+ ExplodeModifierData *emd = (ExplodeModifierData *) md;
+ ParticleSystemModifierData *psmd = findPrecedingParticlesystem(ob, md);
DM_ensure_tessface(dm); /* BMESH - UNTIL MODIFIER IS UPDATED FOR MPoly */
if (psmd) {
- ParticleSystem * psys=psmd->psys;
+ ParticleSystem *psys = psmd->psys;
- if (psys==NULL || psys->totpart==0) return derivedData;
- if (psys->part==NULL || psys->particles==NULL) return derivedData;
- if (psmd->dm==NULL) return derivedData;
+ if (psys == NULL || psys->totpart == 0) return derivedData;
+ if (psys->part == NULL || psys->particles == NULL) return derivedData;
+ if (psmd->dm == NULL) return derivedData;
/* 1. find faces to be exploded if needed */
if (emd->facepa == NULL ||
- psmd->flag&eParticleSystemFlag_Pars ||
- emd->flag&eExplodeFlag_CalcFaces ||
+ psmd->flag & eParticleSystemFlag_Pars ||
+ emd->flag & eExplodeFlag_CalcFaces ||
MEM_allocN_len(emd->facepa) / sizeof(int) != dm->getNumTessFaces(dm))
{
if (psmd->flag & eParticleSystemFlag_Pars)
@@ -1018,16 +1019,16 @@ static DerivedMesh * applyModifier(ModifierData *md, Object *ob,
if (emd->flag & eExplodeFlag_CalcFaces)
emd->flag &= ~eExplodeFlag_CalcFaces;
- createFacepa(emd,psmd,derivedData);
+ createFacepa(emd, psmd, derivedData);
}
/* 2. create new mesh */
if (emd->flag & eExplodeFlag_EdgeCut) {
int *facepa = emd->facepa;
- DerivedMesh *splitdm=cutEdges(emd,dm);
- DerivedMesh *explode=explodeMesh(emd, psmd, md->scene, ob, splitdm);
+ DerivedMesh *splitdm = cutEdges(emd, dm);
+ DerivedMesh *explode = explodeMesh(emd, psmd, md->scene, ob, splitdm);
MEM_freeN(emd->facepa);
- emd->facepa=facepa;
+ emd->facepa = facepa;
splitdm->release(splitdm);
return explode;
}
@@ -1039,26 +1040,26 @@ static DerivedMesh * applyModifier(ModifierData *md, Object *ob,
ModifierTypeInfo modifierType_Explode = {
- /* name */ "Explode",
- /* structName */ "ExplodeModifierData",
- /* structSize */ sizeof(ExplodeModifierData),
- /* type */ eModifierTypeType_Constructive,
- /* flags */ eModifierTypeFlag_AcceptsMesh,
- /* copyData */ copyData,
- /* deformVerts */ NULL,
- /* deformMatrices */ NULL,
- /* deformVertsEM */ NULL,
- /* deformMatricesEM */ NULL,
- /* applyModifier */ applyModifier,
- /* applyModifierEM */ NULL,
- /* initData */ initData,
- /* requiredDataMask */ requiredDataMask,
- /* freeData */ freeData,
- /* isDisabled */ NULL,
- /* updateDepgraph */ NULL,
- /* dependsOnTime */ dependsOnTime,
- /* dependsOnNormals */ NULL,
+ /* name */ "Explode",
+ /* structName */ "ExplodeModifierData",
+ /* structSize */ sizeof(ExplodeModifierData),
+ /* type */ eModifierTypeType_Constructive,
+ /* flags */ eModifierTypeFlag_AcceptsMesh,
+ /* copyData */ copyData,
+ /* deformVerts */ NULL,
+ /* deformMatrices */ NULL,
+ /* deformVertsEM */ NULL,
+ /* deformMatricesEM */ NULL,
+ /* applyModifier */ applyModifier,
+ /* applyModifierEM */ NULL,
+ /* initData */ initData,
+ /* requiredDataMask */ requiredDataMask,
+ /* freeData */ freeData,
+ /* isDisabled */ NULL,
+ /* updateDepgraph */ NULL,
+ /* dependsOnTime */ dependsOnTime,
+ /* dependsOnNormals */ NULL,
/* foreachObjectLink */ NULL,
- /* foreachIDLink */ NULL,
- /* foreachTexLink */ NULL,
+ /* foreachIDLink */ NULL,
+ /* foreachTexLink */ NULL,
};
diff --git a/source/blender/modifiers/intern/MOD_fluidsim.c b/source/blender/modifiers/intern/MOD_fluidsim.c
index 55182578938..4cd88370f4a 100644
--- a/source/blender/modifiers/intern/MOD_fluidsim.c
+++ b/source/blender/modifiers/intern/MOD_fluidsim.c
@@ -52,21 +52,21 @@
/* Fluidsim */
static void initData(ModifierData *md)
{
- FluidsimModifierData *fluidmd= (FluidsimModifierData*) md;
+ FluidsimModifierData *fluidmd = (FluidsimModifierData *) md;
fluidsim_init(fluidmd);
}
static void freeData(ModifierData *md)
{
- FluidsimModifierData *fluidmd= (FluidsimModifierData*) md;
+ FluidsimModifierData *fluidmd = (FluidsimModifierData *) md;
fluidsim_free(fluidmd);
}
static void copyData(ModifierData *md, ModifierData *target)
{
- FluidsimModifierData *fluidmd= (FluidsimModifierData*) md;
- FluidsimModifierData *tfluidmd= (FluidsimModifierData*) target;
+ FluidsimModifierData *fluidmd = (FluidsimModifierData *) md;
+ FluidsimModifierData *tfluidmd = (FluidsimModifierData *) target;
if (tfluidmd->fss)
MEM_freeN(tfluidmd->fss);
@@ -77,11 +77,11 @@ static void copyData(ModifierData *md, ModifierData *target)
static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
- DerivedMesh *dm,
- int useRenderParams,
- int isFinalCalc)
+ DerivedMesh *dm,
+ int useRenderParams,
+ int isFinalCalc)
{
- FluidsimModifierData *fluidmd= (FluidsimModifierData*) md;
+ FluidsimModifierData *fluidmd = (FluidsimModifierData *) md;
DerivedMesh *result = NULL;
/* check for alloc failing */
@@ -93,29 +93,30 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
}
}
- result= fluidsimModifier_do(fluidmd, md->scene, ob, dm, useRenderParams, isFinalCalc);
+ result = fluidsimModifier_do(fluidmd, md->scene, ob, dm, useRenderParams, isFinalCalc);
return result ? result : dm;
}
static void updateDepgraph(
- ModifierData *md, DagForest *forest, Scene *scene,
- Object *ob, DagNode *obNode)
+ ModifierData *md, DagForest *forest, Scene *scene,
+ Object *ob, DagNode *obNode)
{
- FluidsimModifierData *fluidmd= (FluidsimModifierData*) md;
+ FluidsimModifierData *fluidmd = (FluidsimModifierData *) md;
Base *base;
if (fluidmd && fluidmd->fss) {
if (fluidmd->fss->type == OB_FLUIDSIM_DOMAIN) {
- for (base = scene->base.first; base; base= base->next) {
- Object *ob1= base->object;
+ for (base = scene->base.first; base; base = base->next) {
+ Object *ob1 = base->object;
if (ob1 != ob) {
- FluidsimModifierData *fluidmdtmp = (FluidsimModifierData *)modifiers_findByType(ob1, eModifierType_Fluidsim);
+ FluidsimModifierData *fluidmdtmp =
+ (FluidsimModifierData *)modifiers_findByType(ob1, eModifierType_Fluidsim);
/* only put dependencies from NON-DOMAIN fluids in here */
- if (fluidmdtmp && fluidmdtmp->fss && (fluidmdtmp->fss->type!=OB_FLUIDSIM_DOMAIN)) {
+ if (fluidmdtmp && fluidmdtmp->fss && (fluidmdtmp->fss->type != OB_FLUIDSIM_DOMAIN)) {
DagNode *curNode = dag_get_node(forest, ob1);
- dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA|DAG_RL_OB_DATA, "Fluidsim Object");
+ dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Fluidsim Object");
}
}
}
@@ -135,9 +136,9 @@ ModifierTypeInfo modifierType_Fluidsim = {
/* structSize */ sizeof(FluidsimModifierData),
/* type */ eModifierTypeType_Nonconstructive,
- /* flags */ eModifierTypeFlag_AcceptsMesh
- | eModifierTypeFlag_RequiresOriginalData
- | eModifierTypeFlag_Single,
+ /* flags */ eModifierTypeFlag_AcceptsMesh |
+ eModifierTypeFlag_RequiresOriginalData |
+ eModifierTypeFlag_Single,
/* copyData */ copyData,
/* deformVerts */ NULL,
diff --git a/source/blender/modifiers/intern/MOD_fluidsim_util.c b/source/blender/modifiers/intern/MOD_fluidsim_util.c
index fe0cb2e650f..a33d80bcd35 100644
--- a/source/blender/modifiers/intern/MOD_fluidsim_util.c
+++ b/source/blender/modifiers/intern/MOD_fluidsim_util.c
@@ -66,8 +66,7 @@
void fluidsim_init(FluidsimModifierData *fluidmd)
{
#ifdef WITH_MOD_FLUID
- if (fluidmd)
- {
+ if (fluidmd) {
FluidsimSettings *fss = MEM_callocN(sizeof(FluidsimSettings), "fluidsimsettings");
fluidmd->fss = fss;
@@ -166,7 +165,7 @@ void fluidsim_free(FluidsimModifierData *fluidmd)
/* read .bobj.gz file into a fluidsimDerivedMesh struct */
static DerivedMesh *fluidsim_read_obj(const char *filename, const MPoly *mp_example)
{
- int wri = 0,i;
+ int wri = 0, i;
int gotBytes;
gzFile gzf;
int numverts = 0, numfaces = 0;
@@ -178,14 +177,13 @@ static DerivedMesh *fluidsim_read_obj(const char *filename, const MPoly *mp_exam
float no[3];
const short mp_mat_nr = mp_example->mat_nr;
- const char mp_flag = mp_example->flag;
+ const char mp_flag = mp_example->flag;
// ------------------------------------------------
// get numverts + numfaces first
// ------------------------------------------------
gzf = BLI_gzopen(filename, "rb");
- if (!gzf)
- {
+ if (!gzf) {
return NULL;
}
@@ -216,15 +214,13 @@ static DerivedMesh *fluidsim_read_obj(const char *filename, const MPoly *mp_exam
return NULL;
gzf = BLI_gzopen(filename, "rb");
- if (!gzf)
- {
+ if (!gzf) {
return NULL;
}
dm = CDDM_new(numverts, 0, 0, numfaces * 3, numfaces);
- if (!dm)
- {
+ if (!dm) {
gzclose(gzf);
return NULL;
}
@@ -235,22 +231,20 @@ static DerivedMesh *fluidsim_read_obj(const char *filename, const MPoly *mp_exam
// read vertex position from file
mv = CDDM_get_verts(dm);
- for (i=0; i<numverts; i++, mv++)
+ for (i = 0; i < numverts; i++, mv++)
gotBytes = gzread(gzf, mv->co, sizeof(float) * 3);
// should be the same as numverts
gotBytes = gzread(gzf, &wri, sizeof(wri));
- if (wri != numverts)
- {
+ if (wri != numverts) {
if (dm)
dm->release(dm);
gzclose(gzf);
return NULL;
}
- normals = MEM_callocN(sizeof(short) * numverts * 3, "fluid_tmp_normals" );
- if (!normals)
- {
+ normals = MEM_callocN(sizeof(short) * numverts * 3, "fluid_tmp_normals");
+ if (!normals) {
if (dm)
dm->release(dm);
gzclose(gzf);
@@ -258,8 +252,7 @@ static DerivedMesh *fluidsim_read_obj(const char *filename, const MPoly *mp_exam
}
// read normals from file (but don't save them yet)
- for (i=numverts, no_s= normals; i>0; i--, no_s += 3)
- {
+ for (i = numverts, no_s = normals; i > 0; i--, no_s += 3) {
gotBytes = gzread(gzf, no, sizeof(float) * 3);
normal_float_to_short_v3(no_s, no);
}
@@ -267,7 +260,7 @@ static DerivedMesh *fluidsim_read_obj(const char *filename, const MPoly *mp_exam
/* read no. of triangles */
gotBytes = gzread(gzf, &wri, sizeof(wri));
- if (wri!=numfaces) {
+ if (wri != numfaces) {
printf("Fluidsim: error in reading data from file.\n");
if (dm)
dm->release(dm);
@@ -279,8 +272,7 @@ static DerivedMesh *fluidsim_read_obj(const char *filename, const MPoly *mp_exam
// read triangles from file
mp = CDDM_get_polys(dm);
ml = CDDM_get_loops(dm);
- for (i=0; i < numfaces; i++, mp++, ml += 3)
- {
+ for (i = 0; i < numfaces; i++, mp++, ml += 3) {
int face[3];
gotBytes = gzread(gzf, face, sizeof(int) * 3);
@@ -311,10 +303,10 @@ static DerivedMesh *fluidsim_read_obj(const char *filename, const MPoly *mp_exam
void fluid_get_bb(MVert *mvert, int totvert, float obmat[][4],
- /*RET*/ float start[3], /*RET*/ float size[3] )
+ /*RET*/ float start[3], /*RET*/ float size[3])
{
- float bbsx=0.0, bbsy=0.0, bbsz=0.0;
- float bbex=1.0, bbey=1.0, bbez=1.0;
+ float bbsx = 0.0, bbsy = 0.0, bbsz = 0.0;
+ float bbex = 1.0, bbey = 1.0, bbez = 1.0;
int i;
float vec[3];
@@ -333,12 +325,12 @@ void fluid_get_bb(MVert *mvert, int totvert, float obmat[][4],
copy_v3_v3(vec, mvert[i].co);
mul_m4_v3(obmat, vec);
- if (vec[0] < bbsx) { bbsx= vec[0]; }
- if (vec[1] < bbsy) { bbsy= vec[1]; }
- if (vec[2] < bbsz) { bbsz= vec[2]; }
- if (vec[0] > bbex) { bbex= vec[0]; }
- if (vec[1] > bbey) { bbey= vec[1]; }
- if (vec[2] > bbez) { bbez= vec[2]; }
+ if (vec[0] < bbsx) { bbsx = vec[0]; }
+ if (vec[1] < bbsy) { bbsy = vec[1]; }
+ if (vec[2] < bbsz) { bbsz = vec[2]; }
+ if (vec[0] > bbex) { bbex = vec[0]; }
+ if (vec[1] > bbey) { bbey = vec[1]; }
+ if (vec[2] > bbez) { bbez = vec[2]; }
}
// return values...
@@ -348,9 +340,9 @@ void fluid_get_bb(MVert *mvert, int totvert, float obmat[][4],
start[2] = bbsz;
}
if (size) {
- size[0] = bbex-bbsx;
- size[1] = bbey-bbsy;
- size[2] = bbez-bbsz;
+ size[0] = bbex - bbsx;
+ size[1] = bbey - bbsy;
+ size[2] = bbez - bbsz;
}
}
@@ -362,14 +354,14 @@ void fluid_estimate_memory(Object *ob, FluidsimSettings *fss, char *value)
{
Mesh *mesh;
- value[0]= '\0';
+ value[0] = '\0';
if (ob->type == OB_MESH) {
/* use mesh bounding box and object scaling */
- mesh= ob->data;
+ mesh = ob->data;
fluid_get_bb(mesh->mvert, mesh->totvert, ob->obmat, fss->bbStart, fss->bbSize);
- elbeemEstimateMemreq(fss->resolutionxyz, fss->bbSize[0],fss->bbSize[1],fss->bbSize[2], fss->maxRefine, value);
+ elbeemEstimateMemreq(fss->resolutionxyz, fss->bbSize[0], fss->bbSize[1], fss->bbSize[2], fss->maxRefine, value);
}
}
@@ -390,45 +382,40 @@ static void fluidsim_read_vel_cache(FluidsimModifierData *fluidmd, DerivedMesh *
if (fss->meshVelocities)
MEM_freeN(fss->meshVelocities);
- if (len<7)
- {
+ if (len < 7) {
return;
}
- if (fss->domainNovecgen>0) return;
+ if (fss->domainNovecgen > 0) return;
- fss->meshVelocities = MEM_callocN(sizeof(FluidVertexVelocity)*dm->getNumVerts(dm), "Fluidsim_velocities");
+ fss->meshVelocities = MEM_callocN(sizeof(FluidVertexVelocity) * dm->getNumVerts(dm), "Fluidsim_velocities");
fss->totvert = totvert;
velarray = fss->meshVelocities;
- // .bobj.gz , correct filename
+ // .bobj.gz, correct filename
// 87654321
- filename[len-6] = 'v';
- filename[len-5] = 'e';
- filename[len-4] = 'l';
+ filename[len - 6] = 'v';
+ filename[len - 5] = 'e';
+ filename[len - 4] = 'l';
gzf = BLI_gzopen(filename, "rb");
- if (!gzf)
- {
+ if (!gzf) {
MEM_freeN(fss->meshVelocities);
fss->meshVelocities = NULL;
return;
}
- gzread(gzf, &wri, sizeof( wri ));
- if (wri != totvert)
- {
+ gzread(gzf, &wri, sizeof(wri));
+ if (wri != totvert) {
MEM_freeN(fss->meshVelocities);
fss->meshVelocities = NULL;
return;
}
- for (i=0; i<totvert;i++)
- {
- for (j=0; j<3; j++)
- {
- gzread(gzf, &wrf, sizeof( wrf ));
+ for (i = 0; i < totvert; i++) {
+ for (j = 0; j < 3; j++) {
+ gzread(gzf, &wrf, sizeof(wrf));
velarray[i].vel[j] = wrf;
}
}
@@ -436,7 +423,8 @@ static void fluidsim_read_vel_cache(FluidsimModifierData *fluidmd, DerivedMesh *
gzclose(gzf);
}
-static DerivedMesh *fluidsim_read_cache(Object *ob, DerivedMesh *orgdm, FluidsimModifierData *fluidmd, int framenr, int useRenderParams)
+static DerivedMesh *fluidsim_read_cache(Object *ob, DerivedMesh *orgdm,
+ FluidsimModifierData *fluidmd, int framenr, int useRenderParams)
{
int displaymode = 0;
int curFrame = framenr - 1 /*scene->r.sfra*/; /* start with 0 at start frame */
@@ -454,17 +442,17 @@ static DerivedMesh *fluidsim_read_cache(Object *ob, DerivedMesh *orgdm, Fluidsim
}
switch (displaymode) {
- case 1:
- /* just display original object */
- return NULL;
- case 2:
- /* use preview mesh */
- BLI_join_dirfile(targetFile, sizeof(targetFile), fss->surfdataPath, OB_FLUIDSIM_SURF_PREVIEW_OBJ_FNAME);
- break;
- default: /* 3 */
- /* 3. use final mesh */
- BLI_join_dirfile(targetFile, sizeof(targetFile), fss->surfdataPath, OB_FLUIDSIM_SURF_FINAL_OBJ_FNAME);
- break;
+ case 1:
+ /* just display original object */
+ return NULL;
+ case 2:
+ /* use preview mesh */
+ BLI_join_dirfile(targetFile, sizeof(targetFile), fss->surfdataPath, OB_FLUIDSIM_SURF_PREVIEW_OBJ_FNAME);
+ break;
+ default: /* 3 */
+ /* 3. use final mesh */
+ BLI_join_dirfile(targetFile, sizeof(targetFile), fss->surfdataPath, OB_FLUIDSIM_SURF_FINAL_OBJ_FNAME);
+ break;
}
/* offset baked frame */
@@ -483,16 +471,16 @@ static DerivedMesh *fluidsim_read_cache(Object *ob, DerivedMesh *orgdm, Fluidsim
dm = fluidsim_read_obj(targetFile, &mp_example);
- if (!dm)
- {
+ if (!dm) {
// switch, abort background rendering when fluidsim mesh is missing
const char *strEnvName2 = "BLENDER_ELBEEMBOBJABORT"; // from blendercall.cpp
- if (G.background==1) {
+ if (G.background == 1) {
if (getenv(strEnvName2)) {
int elevel = atoi(getenv(strEnvName2));
- if (elevel>0) {
- printf("Env. var %s set, fluid sim mesh '%s' not found, aborting render...\n",strEnvName2, targetFile);
+ if (elevel > 0) {
+ printf("Env. var %s set, fluid sim mesh '%s' not found, aborting render...\n",
+ strEnvName2, targetFile);
exit(1);
}
}
@@ -505,7 +493,7 @@ static DerivedMesh *fluidsim_read_cache(Object *ob, DerivedMesh *orgdm, Fluidsim
// load vertex velocities, if they exist...
// TODO? use generate flag as loading flag as well?
// warning, needs original .bobj.gz mesh loading filename
- if (displaymode==3) {
+ if (displaymode == 3) {
fluidsim_read_vel_cache(fluidmd, dm, targetFile);
}
else {
@@ -520,16 +508,16 @@ static DerivedMesh *fluidsim_read_cache(Object *ob, DerivedMesh *orgdm, Fluidsim
#endif // WITH_MOD_FLUID
DerivedMesh *fluidsimModifier_do(FluidsimModifierData *fluidmd, Scene *scene,
- Object *ob,
- DerivedMesh *dm,
- int useRenderParams, int UNUSED(isFinalCalc))
+ Object *ob,
+ DerivedMesh *dm,
+ int useRenderParams, int UNUSED(isFinalCalc))
{
#ifdef WITH_MOD_FLUID
DerivedMesh *result = NULL;
int framenr;
FluidsimSettings *fss = NULL;
- framenr= (int)scene->r.cfra;
+ framenr = (int)scene->r.cfra;
// only handle fluidsim domains
if (fluidmd && fluidmd->fss && (fluidmd->fss->type != OB_FLUIDSIM_DOMAIN))
diff --git a/source/blender/modifiers/intern/MOD_hook.c b/source/blender/modifiers/intern/MOD_hook.c
index d8fbb6f468f..9acf556fc37 100644
--- a/source/blender/modifiers/intern/MOD_hook.c
+++ b/source/blender/modifiers/intern/MOD_hook.c
@@ -54,15 +54,15 @@
static void initData(ModifierData *md)
{
- HookModifierData *hmd = (HookModifierData*) md;
+ HookModifierData *hmd = (HookModifierData *) md;
- hmd->force= 1.0;
+ hmd->force = 1.0;
}
static void copyData(ModifierData *md, ModifierData *target)
{
- HookModifierData *hmd = (HookModifierData*) md;
- HookModifierData *thmd = (HookModifierData*) target;
+ HookModifierData *hmd = (HookModifierData *) md;
+ HookModifierData *thmd = (HookModifierData *) target;
copy_v3_v3(thmd->cent, hmd->cent);
thmd->falloff = hmd->falloff;
@@ -89,46 +89,46 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
static void freeData(ModifierData *md)
{
- HookModifierData *hmd = (HookModifierData*) md;
+ HookModifierData *hmd = (HookModifierData *) md;
if (hmd->indexar) MEM_freeN(hmd->indexar);
}
static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
{
- HookModifierData *hmd = (HookModifierData*) md;
+ HookModifierData *hmd = (HookModifierData *) md;
return !hmd->object;
}
static void foreachObjectLink(
- ModifierData *md, Object *ob,
- void (*walk)(void *userData, Object *ob, Object **obpoin),
- void *userData)
+ ModifierData *md, Object *ob,
+ void (*walk)(void *userData, Object *ob, Object **obpoin),
+ void *userData)
{
- HookModifierData *hmd = (HookModifierData*) md;
+ HookModifierData *hmd = (HookModifierData *) md;
walk(userData, ob, &hmd->object);
}
static void updateDepgraph(ModifierData *md, DagForest *forest,
- struct Scene *UNUSED(scene),
- Object *UNUSED(ob),
- DagNode *obNode)
+ struct Scene *UNUSED(scene),
+ Object *UNUSED(ob),
+ DagNode *obNode)
{
- HookModifierData *hmd = (HookModifierData*) md;
+ HookModifierData *hmd = (HookModifierData *) md;
if (hmd->object) {
DagNode *curNode = dag_get_node(forest, hmd->object);
if (hmd->subtarget[0])
- dag_add_relation(forest, curNode, obNode, DAG_RL_OB_DATA|DAG_RL_DATA_DATA, "Hook Modifier");
+ dag_add_relation(forest, curNode, obNode, DAG_RL_OB_DATA | DAG_RL_DATA_DATA, "Hook Modifier");
else
dag_add_relation(forest, curNode, obNode, DAG_RL_OB_DATA, "Hook Modifier");
}
}
-static float hook_falloff(float *co_1, float *co_2, const float falloff_squared, float fac)
+static float hook_falloff(const float co_1[3], const float co_2[3], const float falloff_squared, float fac)
{
if (falloff_squared) {
float len_squared = len_squared_v3v3(co_1, co_2);
@@ -146,10 +146,10 @@ static float hook_falloff(float *co_1, float *co_2, const float falloff_squared,
static void deformVerts_do(HookModifierData *hmd, Object *ob, DerivedMesh *dm,
float (*vertexCos)[3], int numVerts)
{
- bPoseChannel *pchan= get_pose_channel(hmd->object->pose, hmd->subtarget);
+ bPoseChannel *pchan = BKE_pose_channel_find_name(hmd->object->pose, hmd->subtarget);
float vec[3], mat[4][4], dmat[4][4];
int i, *index_pt;
- const float falloff_squared= hmd->falloff * hmd->falloff; /* for faster comparisons */
+ const float falloff_squared = hmd->falloff * hmd->falloff; /* for faster comparisons */
MDeformVert *dvert;
int defgrp_index, max_dvert;
@@ -168,7 +168,7 @@ static void deformVerts_do(HookModifierData *hmd, Object *ob, DerivedMesh *dm,
NULL, NULL, NULL, NULL, NULL);
modifier_get_vgroup(ob, dm, hmd->name, &dvert, &defgrp_index);
- max_dvert = (dvert)? numVerts: 0;
+ max_dvert = (dvert) ? numVerts : 0;
/* Regarding index range checking below.
*
@@ -182,22 +182,22 @@ static void deformVerts_do(HookModifierData *hmd, Object *ob, DerivedMesh *dm,
/* do nothing, avoid annoying checks in the loop */
}
else if (hmd->indexar) { /* vertex indices? */
- const float fac_orig= hmd->force;
+ const float fac_orig = hmd->force;
float fac;
const int *origindex_ar;
/* if DerivedMesh is present and has original index data, use it */
- if (dm && (origindex_ar= dm->getVertDataArray(dm, CD_ORIGINDEX))) {
- for (i= 0, index_pt= hmd->indexar; i < hmd->totindex; i++, index_pt++) {
+ if (dm && (origindex_ar = dm->getVertDataArray(dm, CD_ORIGINDEX))) {
+ for (i = 0, index_pt = hmd->indexar; i < hmd->totindex; i++, index_pt++) {
if (*index_pt < numVerts) {
int j;
for (j = 0; j < numVerts; j++) {
if (origindex_ar[j] == *index_pt) {
float *co = vertexCos[j];
- if ((fac= hook_falloff(hmd->cent, co, falloff_squared, fac_orig))) {
+ if ((fac = hook_falloff(hmd->cent, co, falloff_squared, fac_orig))) {
if (dvert)
- fac *= defvert_find_weight(dvert+j, defgrp_index);
+ fac *= defvert_find_weight(dvert + j, defgrp_index);
if (fac) {
mul_v3_m4v3(vec, mat, co);
@@ -210,12 +210,12 @@ static void deformVerts_do(HookModifierData *hmd, Object *ob, DerivedMesh *dm,
}
}
else { /* missing dm or ORIGINDEX */
- for (i= 0, index_pt= hmd->indexar; i < hmd->totindex; i++, index_pt++) {
+ for (i = 0, index_pt = hmd->indexar; i < hmd->totindex; i++, index_pt++) {
if (*index_pt < numVerts) {
float *co = vertexCos[*index_pt];
- if ((fac= hook_falloff(hmd->cent, co, falloff_squared, fac_orig))) {
+ if ((fac = hook_falloff(hmd->cent, co, falloff_squared, fac_orig))) {
if (dvert)
- fac *= defvert_find_weight(dvert+(*index_pt), defgrp_index);
+ fac *= defvert_find_weight(dvert + (*index_pt), defgrp_index);
if (fac) {
mul_v3_m4v3(vec, mat, co);
@@ -226,14 +226,14 @@ static void deformVerts_do(HookModifierData *hmd, Object *ob, DerivedMesh *dm,
}
}
}
- else if (dvert) { /* vertex group hook */
- const float fac_orig= hmd->force;
+ else if (dvert) { /* vertex group hook */
+ const float fac_orig = hmd->force;
for (i = 0; i < max_dvert; i++, dvert++) {
float fac;
float *co = vertexCos[i];
- if ((fac= hook_falloff(hmd->cent, co, falloff_squared, fac_orig))) {
+ if ((fac = hook_falloff(hmd->cent, co, falloff_squared, fac_orig))) {
fac *= defvert_find_weight(dvert, defgrp_index);
if (fac) {
mul_v3_m4v3(vec, mat, co);
@@ -248,7 +248,7 @@ static void deformVerts(ModifierData *md, Object *ob, DerivedMesh *derivedData,
float (*vertexCos)[3], int numVerts,
int UNUSED(useRenderParams), int UNUSED(isFinalCalc))
{
- HookModifierData *hmd = (HookModifierData*) md;
+ HookModifierData *hmd = (HookModifierData *) md;
DerivedMesh *dm = derivedData;
/* We need a valid dm for meshes when a vgroup is set... */
if (!dm && ob->type == OB_MESH && hmd->name[0] != '\0')
@@ -263,7 +263,7 @@ static void deformVerts(ModifierData *md, Object *ob, DerivedMesh *derivedData,
static void deformVertsEM(ModifierData *md, Object *ob, struct BMEditMesh *editData,
DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
{
- HookModifierData *hmd = (HookModifierData*) md;
+ HookModifierData *hmd = (HookModifierData *) md;
DerivedMesh *dm = derivedData;
/* We need a valid dm for meshes when a vgroup is set... */
if (!dm && ob->type == OB_MESH && hmd->name[0] != '\0')
@@ -281,8 +281,8 @@ ModifierTypeInfo modifierType_Hook = {
/* structName */ "HookModifierData",
/* structSize */ sizeof(HookModifierData),
/* type */ eModifierTypeType_OnlyDeform,
- /* flags */ eModifierTypeFlag_AcceptsCVs
- | eModifierTypeFlag_SupportsEditmode,
+ /* flags */ eModifierTypeFlag_AcceptsCVs |
+ eModifierTypeFlag_SupportsEditmode,
/* copyData */ copyData,
/* deformVerts */ deformVerts,
/* deformMatrices */ NULL,
diff --git a/source/blender/modifiers/intern/MOD_lattice.c b/source/blender/modifiers/intern/MOD_lattice.c
index ca700d4d8f2..f815d9629c2 100644
--- a/source/blender/modifiers/intern/MOD_lattice.c
+++ b/source/blender/modifiers/intern/MOD_lattice.c
@@ -50,14 +50,14 @@
static void initData(ModifierData *md)
{
- LatticeModifierData *lmd = (LatticeModifierData*) md;
+ LatticeModifierData *lmd = (LatticeModifierData *) md;
lmd->strength = 1.0f;
}
static void copyData(ModifierData *md, ModifierData *target)
{
- LatticeModifierData *lmd = (LatticeModifierData*) md;
- LatticeModifierData *tlmd = (LatticeModifierData*) target;
+ LatticeModifierData *lmd = (LatticeModifierData *) md;
+ LatticeModifierData *tlmd = (LatticeModifierData *) target;
tlmd->object = lmd->object;
BLI_strncpy(tlmd->name, lmd->name, sizeof(tlmd->name));
@@ -76,27 +76,27 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
static int isDisabled(ModifierData *md, int UNUSED(userRenderParams))
{
- LatticeModifierData *lmd = (LatticeModifierData*) md;
+ LatticeModifierData *lmd = (LatticeModifierData *) md;
return !lmd->object;
}
static void foreachObjectLink(
- ModifierData *md, Object *ob,
- void (*walk)(void *userData, Object *ob, Object **obpoin),
- void *userData)
+ ModifierData *md, Object *ob,
+ void (*walk)(void *userData, Object *ob, Object **obpoin),
+ void *userData)
{
- LatticeModifierData *lmd = (LatticeModifierData*) md;
+ LatticeModifierData *lmd = (LatticeModifierData *) md;
walk(userData, ob, &lmd->object);
}
static void updateDepgraph(ModifierData *md, DagForest *forest,
- struct Scene *UNUSED(scene),
- Object *UNUSED(ob),
- DagNode *obNode)
+ struct Scene *UNUSED(scene),
+ Object *UNUSED(ob),
+ DagNode *obNode)
{
- LatticeModifierData *lmd = (LatticeModifierData*) md;
+ LatticeModifierData *lmd = (LatticeModifierData *) md;
if (lmd->object) {
DagNode *latNode = dag_get_node(forest, lmd->object);
@@ -107,13 +107,13 @@ static void updateDepgraph(ModifierData *md, DagForest *forest,
}
static void deformVerts(ModifierData *md, Object *ob,
- DerivedMesh *derivedData,
- float (*vertexCos)[3],
- int numVerts,
- int UNUSED(useRenderParams),
- int UNUSED(isFinalCalc))
+ DerivedMesh *derivedData,
+ float (*vertexCos)[3],
+ int numVerts,
+ int UNUSED(useRenderParams),
+ int UNUSED(isFinalCalc))
{
- LatticeModifierData *lmd = (LatticeModifierData*) md;
+ LatticeModifierData *lmd = (LatticeModifierData *) md;
modifier_vgroup_cache(md, vertexCos); /* if next modifier needs original vertices */
@@ -123,8 +123,8 @@ static void deformVerts(ModifierData *md, Object *ob,
}
static void deformVertsEM(
- ModifierData *md, Object *ob, struct BMEditMesh *editData,
- DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
+ ModifierData *md, Object *ob, struct BMEditMesh *editData,
+ DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
{
DerivedMesh *dm = derivedData;
@@ -141,8 +141,8 @@ ModifierTypeInfo modifierType_Lattice = {
/* structName */ "LatticeModifierData",
/* structSize */ sizeof(LatticeModifierData),
/* type */ eModifierTypeType_OnlyDeform,
- /* flags */ eModifierTypeFlag_AcceptsCVs
- | eModifierTypeFlag_SupportsEditmode,
+ /* flags */ eModifierTypeFlag_AcceptsCVs |
+ eModifierTypeFlag_SupportsEditmode,
/* copyData */ copyData,
/* deformVerts */ deformVerts,
/* deformMatrices */ NULL,
diff --git a/source/blender/modifiers/intern/MOD_mask.c b/source/blender/modifiers/intern/MOD_mask.c
index da4a489838f..8940c4fd079 100644
--- a/source/blender/modifiers/intern/MOD_mask.c
+++ b/source/blender/modifiers/intern/MOD_mask.c
@@ -45,7 +45,7 @@
#include "DNA_modifier_types.h"
#include "DNA_object_types.h"
-#include "BKE_action.h" /* get_pose_channel */
+#include "BKE_action.h" /* BKE_pose_channel_find_name */
#include "BKE_cdderivedmesh.h"
#include "BKE_mesh.h"
#include "BKE_modifier.h"
@@ -57,8 +57,8 @@
static void copyData(ModifierData *md, ModifierData *target)
{
- MaskModifierData *mmd = (MaskModifierData*) md;
- MaskModifierData *tmmd = (MaskModifierData*) target;
+ MaskModifierData *mmd = (MaskModifierData *) md;
+ MaskModifierData *tmmd = (MaskModifierData *) target;
BLI_strncpy(tmmd->vgroup, mmd->vgroup, sizeof(tmmd->vgroup));
tmmd->flag = mmd->flag;
@@ -70,18 +70,18 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *UNUSED(
}
static void foreachObjectLink(
- ModifierData *md, Object *ob,
- void (*walk)(void *userData, Object *ob, Object **obpoin),
- void *userData)
+ ModifierData *md, Object *ob,
+ void (*walk)(void *userData, Object *ob, Object **obpoin),
+ void *userData)
{
MaskModifierData *mmd = (MaskModifierData *)md;
walk(userData, ob, &mmd->ob_arm);
}
static void updateDepgraph(ModifierData *md, DagForest *forest,
- struct Scene *UNUSED(scene),
- Object *UNUSED(ob),
- DagNode *obNode)
+ struct Scene *UNUSED(scene),
+ Object *UNUSED(ob),
+ DagNode *obNode)
{
MaskModifierData *mmd = (MaskModifierData *)md;
@@ -93,16 +93,16 @@ static void updateDepgraph(ModifierData *md, DagForest *forest,
}
static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
- DerivedMesh *derivedData,
- int UNUSED(useRenderParams),
- int UNUSED(isFinalCalc))
+ DerivedMesh *derivedData,
+ int UNUSED(useRenderParams),
+ int UNUSED(isFinalCalc))
{
- MaskModifierData *mmd= (MaskModifierData *)md;
- DerivedMesh *dm= derivedData, *result= NULL;
- GHash *vertHash=NULL, *edgeHash, *polyHash;
+ MaskModifierData *mmd = (MaskModifierData *)md;
+ DerivedMesh *dm = derivedData, *result = NULL;
+ GHash *vertHash = NULL, *edgeHash, *polyHash;
GHashIterator *hashIter;
- MDeformVert *dvert= NULL, *dv;
- int numPolys=0, numLoops=0, numEdges=0, numVerts=0;
+ MDeformVert *dvert = NULL, *dv;
+ int numPolys = 0, numLoops = 0, numEdges = 0, numVerts = 0;
int maxVerts, maxEdges, maxPolys;
int i;
@@ -124,15 +124,15 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
*/
/* get original number of verts, edges, and faces */
- maxVerts= dm->getNumVerts(dm);
- maxEdges= dm->getNumEdges(dm);
- maxPolys= dm->getNumPolys(dm);
+ maxVerts = dm->getNumVerts(dm);
+ maxEdges = dm->getNumEdges(dm);
+ maxPolys = dm->getNumPolys(dm);
/* check if we can just return the original mesh
* - must have verts and therefore verts assigned to vgroups to do anything useful
*/
- if ( !(ELEM(mmd->mode, MOD_MASK_MODE_ARM, MOD_MASK_MODE_VGROUP)) ||
- (maxVerts == 0) || (ob->defbase.first == NULL) )
+ if (!(ELEM(mmd->mode, MOD_MASK_MODE_ARM, MOD_MASK_MODE_VGROUP)) ||
+ (maxVerts == 0) || (ob->defbase.first == NULL) )
{
return derivedData;
}
@@ -140,35 +140,35 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
/* if mode is to use selected armature bones, aggregate the bone groups */
if (mmd->mode == MOD_MASK_MODE_ARM) { /* --- using selected bones --- */
GHash *vgroupHash;
- Object *oba= mmd->ob_arm;
+ Object *oba = mmd->ob_arm;
bPoseChannel *pchan;
bDeformGroup *def;
char *bone_select_array;
- int bone_select_tot= 0;
- const int defbase_tot= BLI_countlist(&ob->defbase);
-
+ int bone_select_tot = 0;
+ const int defbase_tot = BLI_countlist(&ob->defbase);
+
/* check that there is armature object with bones to use, otherwise return original mesh */
if (ELEM3(NULL, mmd->ob_arm, mmd->ob_arm->pose, ob->defbase.first))
return derivedData;
-
- bone_select_array= MEM_mallocN(defbase_tot * sizeof(char), "mask array");
-
+
+ bone_select_array = MEM_mallocN(defbase_tot * sizeof(char), "mask array");
+
for (i = 0, def = ob->defbase.first; def; def = def->next, i++) {
- pchan = get_pose_channel(oba->pose, def->name);
+ pchan = BKE_pose_channel_find_name(oba->pose, def->name);
if (pchan && pchan->bone && (pchan->bone->flag & BONE_SELECTED)) {
- bone_select_array[i]= TRUE;
+ bone_select_array[i] = TRUE;
bone_select_tot++;
}
else {
- bone_select_array[i]= FALSE;
+ bone_select_array[i] = FALSE;
}
}
/* hashes for finding mapping of:
- * - vgroups to indices -> vgroupHash (string, int)
- * - bones to vgroup indices -> boneHash (index of vgroup, dummy)
+ * - vgroups to indices -> vgroupHash (string, int)
+ * - bones to vgroup indices -> boneHash (index of vgroup, dummy)
*/
- vgroupHash= BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, "mask vgroup gh");
+ vgroupHash = BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, "mask vgroup gh");
/* build mapping of names of vertex groups to indices */
for (i = 0, def = ob->defbase.first; def; def = def->next, i++)
@@ -183,7 +183,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
}
/* repeat the previous check, but for dverts */
- dvert= dm->getVertDataArray(dm, CD_MDEFORMVERT);
+ dvert = dm->getVertDataArray(dm, CD_MDEFORMVERT);
if (dvert == NULL) {
BLI_ghash_free(vgroupHash, NULL, NULL);
MEM_freeN(bone_select_array);
@@ -192,15 +192,14 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
}
/* hashes for quickly providing a mapping from old to new - use key=oldindex, value=newindex */
- vertHash= BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp, "mask vert gh");
+ vertHash = BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp, "mask vert gh");
/* add vertices which exist in vertexgroups into vertHash for filtering */
- for (i= 0, dv= dvert; i < maxVerts; i++, dv++)
- {
- MDeformWeight *dw= dv->dw;
+ for (i = 0, dv = dvert; i < maxVerts; i++, dv++) {
+ MDeformWeight *dw = dv->dw;
int j;
-
- for (j= dv->totweight; j > 0; j--, dw++) {
+
+ for (j = dv->totweight; j > 0; j--, dw++) {
if (dw->def_nr < defbase_tot) {
if (bone_select_array[dw->def_nr]) {
if (dw->weight != 0.0f) {
@@ -229,8 +228,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
BLI_ghash_free(vgroupHash, NULL, NULL);
MEM_freeN(bone_select_array);
}
- else /* --- Using Nominated VertexGroup only --- */
- {
+ else { /* --- Using Nominated VertexGroup only --- */
int defgrp_index = defgroup_name_index(ob, mmd->vgroup);
/* get dverts */
@@ -242,12 +240,11 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
return dm;
/* hashes for quickly providing a mapping from old to new - use key=oldindex, value=newindex */
- vertHash= BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp, "mask vert2 bh");
+ vertHash = BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp, "mask vert2 bh");
/* add vertices which exist in vertexgroup into ghash for filtering */
- for (i= 0, dv= dvert; i < maxVerts; i++, dv++)
- {
- const int weight_set= defvert_find_weight(dv, defgrp_index) != 0.0f;
+ for (i = 0, dv = dvert; i < maxVerts; i++, dv++) {
+ const int weight_set = defvert_find_weight(dv, defgrp_index) != 0.0f;
/* check if include vert in vertHash */
if (mmd->flag & MOD_MASK_INV) {
@@ -266,8 +263,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
}
/* hashes for quickly providing a mapping from old to new - use key=oldindex, value=newindex */
- edgeHash= BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp, "mask ed2 gh");
- polyHash= BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp, "mask fa2 gh");
+ edgeHash = BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp, "mask ed2 gh");
+ polyHash = BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp, "mask fa2 gh");
mpoly = dm->getPolyArray(dm);
mloop = dm->getLoopArray(dm);
@@ -277,26 +274,24 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
/* loop over edges and faces, and do the same thing to
* ensure that they only reference existing verts
*/
- for (i = 0; i < maxEdges; i++)
- {
+ for (i = 0; i < maxEdges; i++) {
MEdge me;
dm->getEdge(dm, i, &me);
/* only add if both verts will be in new mesh */
- if ( BLI_ghash_haskey(vertHash, SET_INT_IN_POINTER(me.v1)) &&
- BLI_ghash_haskey(vertHash, SET_INT_IN_POINTER(me.v2)) )
+ if (BLI_ghash_haskey(vertHash, SET_INT_IN_POINTER(me.v1)) &&
+ BLI_ghash_haskey(vertHash, SET_INT_IN_POINTER(me.v2)))
{
BLI_ghash_insert(edgeHash, SET_INT_IN_POINTER(i), SET_INT_IN_POINTER(numEdges));
numEdges++;
}
}
- for (i = 0; i < maxPolys; i++)
- {
+ for (i = 0; i < maxPolys; i++) {
MPoly *mp = &mpoly[i];
MLoop *ml = mloop + mp->loopstart;
int ok = TRUE;
int j;
-
+
for (j = 0; j < mp->totloop; j++, ml++) {
if (!BLI_ghash_haskey(vertHash, SET_INT_IN_POINTER(ml->v))) {
ok = FALSE;
@@ -325,10 +320,10 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
mvert_new = CDDM_get_verts(result);
/* using ghash-iterators, map data into new mesh */
- /* vertices */
- for ( hashIter = BLI_ghashIterator_new(vertHash);
- !BLI_ghashIterator_isDone(hashIter);
- BLI_ghashIterator_step(hashIter) )
+ /* vertices */
+ for (hashIter = BLI_ghashIterator_new(vertHash);
+ !BLI_ghashIterator_isDone(hashIter);
+ BLI_ghashIterator_step(hashIter) )
{
MVert source;
MVert *dest;
@@ -343,10 +338,10 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
}
BLI_ghashIterator_free(hashIter);
- /* edges */
- for ( hashIter = BLI_ghashIterator_new(edgeHash);
- !BLI_ghashIterator_isDone(hashIter);
- BLI_ghashIterator_step(hashIter) )
+ /* edges */
+ for (hashIter = BLI_ghashIterator_new(edgeHash);
+ !BLI_ghashIterator_isDone(hashIter);
+ BLI_ghashIterator_step(hashIter))
{
MEdge source;
MEdge *dest;
@@ -364,10 +359,10 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
}
BLI_ghashIterator_free(hashIter);
- /* faces */
- for ( hashIter = BLI_ghashIterator_new(polyHash);
- !BLI_ghashIterator_isDone(hashIter);
- BLI_ghashIterator_step(hashIter) )
+ /* faces */
+ for (hashIter = BLI_ghashIterator_new(polyHash);
+ !BLI_ghashIterator_isDone(hashIter);
+ BLI_ghashIterator_step(hashIter) )
{
int oldIndex = GET_INT_FROM_POINTER(BLI_ghashIterator_getKey(hashIter));
int newIndex = GET_INT_FROM_POINTER(BLI_ghashIterator_getValue(hashIter));
@@ -412,7 +407,9 @@ ModifierTypeInfo modifierType_Mask = {
/* structName */ "MaskModifierData",
/* structSize */ sizeof(MaskModifierData),
/* type */ eModifierTypeType_Nonconstructive,
- /* flags */ eModifierTypeFlag_AcceptsMesh|eModifierTypeFlag_SupportsMapping|eModifierTypeFlag_SupportsEditmode,
+ /* flags */ eModifierTypeFlag_AcceptsMesh |
+ eModifierTypeFlag_SupportsMapping |
+ eModifierTypeFlag_SupportsEditmode,
/* copyData */ copyData,
/* deformVerts */ NULL,
diff --git a/source/blender/modifiers/intern/MOD_meshdeform.c b/source/blender/modifiers/intern/MOD_meshdeform.c
index 08626e55231..c6f53b49175 100644
--- a/source/blender/modifiers/intern/MOD_meshdeform.c
+++ b/source/blender/modifiers/intern/MOD_meshdeform.c
@@ -57,14 +57,14 @@
static void initData(ModifierData *md)
{
- MeshDeformModifierData *mmd = (MeshDeformModifierData*) md;
+ MeshDeformModifierData *mmd = (MeshDeformModifierData *) md;
- mmd->gridsize= 5;
+ mmd->gridsize = 5;
}
static void freeData(ModifierData *md)
{
- MeshDeformModifierData *mmd = (MeshDeformModifierData*) md;
+ MeshDeformModifierData *mmd = (MeshDeformModifierData *) md;
if (mmd->bindinfluences) MEM_freeN(mmd->bindinfluences);
if (mmd->bindoffsets) MEM_freeN(mmd->bindoffsets);
@@ -72,14 +72,14 @@ static void freeData(ModifierData *md)
if (mmd->dyngrid) MEM_freeN(mmd->dyngrid);
if (mmd->dyninfluences) MEM_freeN(mmd->dyninfluences);
if (mmd->dynverts) MEM_freeN(mmd->dynverts);
- if (mmd->bindweights) MEM_freeN(mmd->bindweights); /* deprecated */
- if (mmd->bindcos) MEM_freeN(mmd->bindcos); /* deprecated */
+ if (mmd->bindweights) MEM_freeN(mmd->bindweights); /* deprecated */
+ if (mmd->bindcos) MEM_freeN(mmd->bindcos); /* deprecated */
}
static void copyData(ModifierData *md, ModifierData *target)
{
- MeshDeformModifierData *mmd = (MeshDeformModifierData*) md;
- MeshDeformModifierData *tmmd = (MeshDeformModifierData*) target;
+ MeshDeformModifierData *mmd = (MeshDeformModifierData *) md;
+ MeshDeformModifierData *tmmd = (MeshDeformModifierData *) target;
tmmd->gridsize = mmd->gridsize;
tmmd->object = mmd->object;
@@ -98,34 +98,34 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
{
- MeshDeformModifierData *mmd = (MeshDeformModifierData*) md;
+ MeshDeformModifierData *mmd = (MeshDeformModifierData *) md;
return !mmd->object;
}
static void foreachObjectLink(
- ModifierData *md, Object *ob,
- void (*walk)(void *userData, Object *ob, Object **obpoin),
- void *userData)
+ ModifierData *md, Object *ob,
+ void (*walk)(void *userData, Object *ob, Object **obpoin),
+ void *userData)
{
- MeshDeformModifierData *mmd = (MeshDeformModifierData*) md;
+ MeshDeformModifierData *mmd = (MeshDeformModifierData *) md;
walk(userData, ob, &mmd->object);
}
static void updateDepgraph(ModifierData *md, DagForest *forest,
- struct Scene *UNUSED(scene),
- Object *UNUSED(ob),
- DagNode *obNode)
+ struct Scene *UNUSED(scene),
+ Object *UNUSED(ob),
+ DagNode *obNode)
{
- MeshDeformModifierData *mmd = (MeshDeformModifierData*) md;
+ MeshDeformModifierData *mmd = (MeshDeformModifierData *) md;
if (mmd->object) {
DagNode *curNode = dag_get_node(forest, mmd->object);
dag_add_relation(forest, curNode, obNode,
- DAG_RL_DATA_DATA|DAG_RL_OB_DATA|DAG_RL_DATA_OB|DAG_RL_OB_OB,
- "Mesh Deform Modifier");
+ DAG_RL_DATA_DATA | DAG_RL_OB_DATA | DAG_RL_DATA_OB | DAG_RL_OB_OB,
+ "Mesh Deform Modifier");
}
}
@@ -138,40 +138,40 @@ static float meshdeform_dynamic_bind(MeshDeformModifierData *mmd, float (*dco)[3
int i, j, a, x, y, z, size;
zero_v3(co);
- totweight= 0.0f;
- size= mmd->dyngridsize;
+ totweight = 0.0f;
+ size = mmd->dyngridsize;
- for (i=0; i<3; i++) {
- gridvec[i]= (vec[i] - mmd->dyncellmin[i] - mmd->dyncellwidth*0.5f)/mmd->dyncellwidth;
- ivec[i]= (int)gridvec[i];
- dvec[i]= gridvec[i] - ivec[i];
+ for (i = 0; i < 3; i++) {
+ gridvec[i] = (vec[i] - mmd->dyncellmin[i] - mmd->dyncellwidth * 0.5f) / mmd->dyncellwidth;
+ ivec[i] = (int)gridvec[i];
+ dvec[i] = gridvec[i] - ivec[i];
}
- for (i=0; i<8; i++) {
- if (i & 1) { x= ivec[0]+1; wx= dvec[0]; }
- else { x= ivec[0]; wx= 1.0f-dvec[0]; }
+ for (i = 0; i < 8; i++) {
+ if (i & 1) { x = ivec[0] + 1; wx = dvec[0]; }
+ else { x = ivec[0]; wx = 1.0f - dvec[0]; }
- if (i & 2) { y= ivec[1]+1; wy= dvec[1]; }
- else { y= ivec[1]; wy= 1.0f-dvec[1]; }
+ if (i & 2) { y = ivec[1] + 1; wy = dvec[1]; }
+ else { y = ivec[1]; wy = 1.0f - dvec[1]; }
- if (i & 4) { z= ivec[2]+1; wz= dvec[2]; }
- else { z= ivec[2]; wz= 1.0f-dvec[2]; }
+ if (i & 4) { z = ivec[2] + 1; wz = dvec[2]; }
+ else { z = ivec[2]; wz = 1.0f - dvec[2]; }
- CLAMP(x, 0, size-1);
- CLAMP(y, 0, size-1);
- CLAMP(z, 0, size-1);
+ CLAMP(x, 0, size - 1);
+ CLAMP(y, 0, size - 1);
+ CLAMP(z, 0, size - 1);
- a= x + y*size + z*size*size;
- weight= wx*wy*wz;
+ a = x + y * size + z * size * size;
+ weight = wx * wy * wz;
- cell= &mmd->dyngrid[a];
- inf= mmd->dyninfluences + cell->offset;
- for (j=0; j<cell->totinfluence; j++, inf++) {
- cageco= dco[inf->vertex];
- cageweight= weight*inf->weight;
- co[0] += cageweight*cageco[0];
- co[1] += cageweight*cageco[1];
- co[2] += cageweight*cageco[2];
+ cell = &mmd->dyngrid[a];
+ inf = mmd->dyninfluences + cell->offset;
+ for (j = 0; j < cell->totinfluence; j++, inf++) {
+ cageco = dco[inf->vertex];
+ cageweight = weight * inf->weight;
+ co[0] += cageweight * cageco[0];
+ co[1] += cageweight * cageco[1];
+ co[2] += cageweight * cageco[2];
totweight += cageweight;
}
}
@@ -182,11 +182,11 @@ static float meshdeform_dynamic_bind(MeshDeformModifierData *mmd, float (*dco)[3
}
static void meshdeformModifier_do(
- ModifierData *md, Object *ob, DerivedMesh *dm,
- float (*vertexCos)[3], int numVerts)
+ ModifierData *md, Object *ob, DerivedMesh *dm,
+ float (*vertexCos)[3], int numVerts)
{
- MeshDeformModifierData *mmd = (MeshDeformModifierData*) md;
- struct Mesh *me= (mmd->object)? mmd->object->data: NULL;
+ MeshDeformModifierData *mmd = (MeshDeformModifierData *) md;
+ struct Mesh *me = (mmd->object) ? mmd->object->data : NULL;
BMEditMesh *em = me ? me->edit_btmesh : NULL;
DerivedMesh *tmpdm, *cagedm;
MDeformVert *dvert = NULL;
@@ -202,19 +202,19 @@ static void meshdeformModifier_do(
/* get cage derivedmesh */
if (em) {
- tmpdm= editbmesh_get_derived_cage_and_final(md->scene, ob, em, &cagedm, 0);
+ tmpdm = editbmesh_get_derived_cage_and_final(md->scene, ob, em, &cagedm, 0);
if (tmpdm)
tmpdm->release(tmpdm);
}
else
- cagedm= mmd->object->derivedFinal;
+ cagedm = mmd->object->derivedFinal;
/* if we don't have one computed, use derivedmesh from data
* without any modifiers */
if (!cagedm) {
- cagedm= get_dm(mmd->object, NULL, NULL, NULL, 0);
+ cagedm = get_dm(mmd->object, NULL, NULL, NULL, 0);
if (cagedm)
- cagedm->needsFree= 1;
+ cagedm->needsFree = 1;
}
if (!cagedm) {
@@ -236,14 +236,14 @@ static void meshdeformModifier_do(
/* progress bar redraw can make this recursive .. */
if (!recursive) {
recursive = 1;
- mmd->bindfunc(md->scene, mmd, (float*)vertexCos, numVerts, cagemat);
+ mmd->bindfunc(md->scene, mmd, (float *)vertexCos, numVerts, cagemat);
recursive = 0;
}
}
/* verify we have compatible weights */
- totvert= numVerts;
- totcagevert= cagedm->getNumVerts(cagedm);
+ totvert = numVerts;
+ totcagevert = cagedm->getNumVerts(cagedm);
if (mmd->totvert != totvert) {
modifier_setError(md, TIP_("Verts changed from %d to %d."), mmd->totvert, totvert);
@@ -261,16 +261,16 @@ static void meshdeformModifier_do(
return;
}
- cagecos= MEM_callocN(sizeof(*cagecos)*totcagevert, "meshdeformModifier vertCos");
+ cagecos = MEM_callocN(sizeof(*cagecos) * totcagevert, "meshdeformModifier vertCos");
/* setup deformation data */
cagedm->getVertCos(cagedm, cagecos);
- influences= mmd->bindinfluences;
- offsets= mmd->bindoffsets;
- bindcagecos= (float(*)[3])mmd->bindcagecos;
+ influences = mmd->bindinfluences;
+ offsets = mmd->bindoffsets;
+ bindcagecos = (float(*)[3])mmd->bindcagecos;
- dco= MEM_callocN(sizeof(*dco)*totcagevert, "MDefDco");
- for (a=0; a<totcagevert; a++) {
+ dco = MEM_callocN(sizeof(*dco) * totcagevert, "MDefDco");
+ for (a = 0; a < totcagevert; a++) {
/* get cage vertex in world space with binding transform */
copy_v3_v3(co, cagecos[a]);
@@ -286,18 +286,18 @@ static void meshdeformModifier_do(
modifier_get_vgroup(ob, dm, mmd->defgrp_name, &dvert, &defgrp_index);
/* do deformation */
- fac= 1.0f;
+ fac = 1.0f;
- for (b=0; b<totvert; b++) {
+ for (b = 0; b < totvert; b++) {
if (mmd->flag & MOD_MDEF_DYNAMIC_BIND)
if (!mmd->dynverts[b])
continue;
if (dvert) {
- fac= defvert_find_weight(&dvert[b], defgrp_index);
+ fac = defvert_find_weight(&dvert[b], defgrp_index);
if (mmd->flag & MOD_MDEF_INVERT_VGROUP) {
- fac= 1.0f - fac;
+ fac = 1.0f - fac;
}
if (fac <= 0.0f) {
@@ -308,21 +308,21 @@ static void meshdeformModifier_do(
if (mmd->flag & MOD_MDEF_DYNAMIC_BIND) {
/* transform coordinate into cage's local space */
mul_v3_m4v3(co, cagemat, vertexCos[b]);
- totweight= meshdeform_dynamic_bind(mmd, dco, co);
+ totweight = meshdeform_dynamic_bind(mmd, dco, co);
}
else {
- totweight= 0.0f;
+ totweight = 0.0f;
zero_v3(co);
- for (a=offsets[b]; a<offsets[b+1]; a++) {
- weight= influences[a].weight;
+ for (a = offsets[b]; a < offsets[b + 1]; a++) {
+ weight = influences[a].weight;
madd_v3_v3fl(co, dco[influences[a].vertex], weight);
totweight += weight;
}
}
if (totweight > 0.0f) {
- mul_v3_fl(co, fac/totweight);
+ mul_v3_fl(co, fac / totweight);
mul_m3_v3(icagemat, co);
if (G.rt != 527)
add_v3_v3(vertexCos[b], co);
@@ -338,13 +338,13 @@ static void meshdeformModifier_do(
}
static void deformVerts(ModifierData *md, Object *ob,
- DerivedMesh *derivedData,
- float (*vertexCos)[3],
- int numVerts,
- int UNUSED(useRenderParams),
- int UNUSED(isFinalCalc))
+ DerivedMesh *derivedData,
+ float (*vertexCos)[3],
+ int numVerts,
+ int UNUSED(useRenderParams),
+ int UNUSED(isFinalCalc))
{
- DerivedMesh *dm= get_dm(ob, NULL, derivedData, NULL, 0);
+ DerivedMesh *dm = get_dm(ob, NULL, derivedData, NULL, 0);
modifier_vgroup_cache(md, vertexCos); /* if next modifier needs original vertices */
@@ -355,12 +355,12 @@ static void deformVerts(ModifierData *md, Object *ob,
}
static void deformVertsEM(ModifierData *md, Object *ob,
- struct BMEditMesh *UNUSED(editData),
- DerivedMesh *derivedData,
- float (*vertexCos)[3],
- int numVerts)
+ struct BMEditMesh *UNUSED(editData),
+ DerivedMesh *derivedData,
+ float (*vertexCos)[3],
+ int numVerts)
{
- DerivedMesh *dm= get_dm(ob, NULL, derivedData, NULL, 0);
+ DerivedMesh *dm = get_dm(ob, NULL, derivedData, NULL, 0);
meshdeformModifier_do(md, ob, dm, vertexCos, numVerts);
@@ -372,21 +372,21 @@ static void deformVertsEM(ModifierData *md, Object *ob,
void modifier_mdef_compact_influences(ModifierData *md)
{
- MeshDeformModifierData *mmd= (MeshDeformModifierData*)md;
+ MeshDeformModifierData *mmd = (MeshDeformModifierData *)md;
float weight, *weights, totweight;
int totinfluence, totvert, totcagevert, a, b;
- weights= mmd->bindweights;
+ weights = mmd->bindweights;
if (!weights)
return;
- totvert= mmd->totvert;
- totcagevert= mmd->totcagevert;
+ totvert = mmd->totvert;
+ totcagevert = mmd->totcagevert;
/* count number of influences above threshold */
- for (b=0; b<totvert; b++) {
- for (a=0; a<totcagevert; a++) {
- weight= weights[a + b*totcagevert];
+ for (b = 0; b < totvert; b++) {
+ for (a = 0; a < totcagevert; a++) {
+ weight = weights[a + b * totcagevert];
if (weight > MESHDEFORM_MIN_INFLUENCE)
mmd->totinfluence++;
@@ -394,66 +394,66 @@ void modifier_mdef_compact_influences(ModifierData *md)
}
/* allocate bind influences */
- mmd->bindinfluences= MEM_callocN(sizeof(MDefInfluence)*mmd->totinfluence, "MDefBindInfluence");
- mmd->bindoffsets= MEM_callocN(sizeof(int)*(totvert+1), "MDefBindOffset");
+ mmd->bindinfluences = MEM_callocN(sizeof(MDefInfluence) * mmd->totinfluence, "MDefBindInfluence");
+ mmd->bindoffsets = MEM_callocN(sizeof(int) * (totvert + 1), "MDefBindOffset");
/* write influences */
- totinfluence= 0;
+ totinfluence = 0;
- for (b=0; b<totvert; b++) {
- mmd->bindoffsets[b]= totinfluence;
- totweight= 0.0f;
+ for (b = 0; b < totvert; b++) {
+ mmd->bindoffsets[b] = totinfluence;
+ totweight = 0.0f;
/* sum total weight */
- for (a=0; a<totcagevert; a++) {
- weight= weights[a + b*totcagevert];
+ for (a = 0; a < totcagevert; a++) {
+ weight = weights[a + b * totcagevert];
if (weight > MESHDEFORM_MIN_INFLUENCE)
totweight += weight;
}
/* assign weights normalized */
- for (a=0; a<totcagevert; a++) {
- weight= weights[a + b*totcagevert];
+ for (a = 0; a < totcagevert; a++) {
+ weight = weights[a + b * totcagevert];
if (weight > MESHDEFORM_MIN_INFLUENCE) {
- mmd->bindinfluences[totinfluence].weight= weight/totweight;
- mmd->bindinfluences[totinfluence].vertex= a;
+ mmd->bindinfluences[totinfluence].weight = weight / totweight;
+ mmd->bindinfluences[totinfluence].vertex = a;
totinfluence++;
}
}
}
- mmd->bindoffsets[b]= totinfluence;
+ mmd->bindoffsets[b] = totinfluence;
/* free */
MEM_freeN(mmd->bindweights);
- mmd->bindweights= NULL;
+ mmd->bindweights = NULL;
}
ModifierTypeInfo modifierType_MeshDeform = {
- /* name */ "MeshDeform",
- /* structName */ "MeshDeformModifierData",
- /* structSize */ sizeof(MeshDeformModifierData),
- /* type */ eModifierTypeType_OnlyDeform,
- /* flags */ eModifierTypeFlag_AcceptsCVs
- | eModifierTypeFlag_SupportsEditmode,
-
- /* copyData */ copyData,
- /* deformVerts */ deformVerts,
- /* deformMatrices */ NULL,
- /* deformVertsEM */ deformVertsEM,
- /* deformMatricesEM */ NULL,
- /* applyModifier */ NULL,
- /* applyModifierEM */ NULL,
- /* initData */ initData,
- /* requiredDataMask */ requiredDataMask,
- /* freeData */ freeData,
- /* isDisabled */ isDisabled,
- /* updateDepgraph */ updateDepgraph,
- /* dependsOnTime */ NULL,
- /* dependsOnNormals */ NULL,
+ /* name */ "MeshDeform",
+ /* structName */ "MeshDeformModifierData",
+ /* structSize */ sizeof(MeshDeformModifierData),
+ /* type */ eModifierTypeType_OnlyDeform,
+ /* flags */ eModifierTypeFlag_AcceptsCVs |
+ eModifierTypeFlag_SupportsEditmode,
+
+ /* copyData */ copyData,
+ /* deformVerts */ deformVerts,
+ /* deformMatrices */ NULL,
+ /* deformVertsEM */ deformVertsEM,
+ /* deformMatricesEM */ NULL,
+ /* applyModifier */ NULL,
+ /* applyModifierEM */ NULL,
+ /* initData */ initData,
+ /* requiredDataMask */ requiredDataMask,
+ /* freeData */ freeData,
+ /* isDisabled */ isDisabled,
+ /* updateDepgraph */ updateDepgraph,
+ /* dependsOnTime */ NULL,
+ /* dependsOnNormals */ NULL,
/* foreachObjectLink */ foreachObjectLink,
- /* foreachIDLink */ NULL,
- /* foreachTexLink */ NULL,
+ /* foreachIDLink */ NULL,
+ /* foreachTexLink */ NULL,
};
diff --git a/source/blender/modifiers/intern/MOD_mirror.c b/source/blender/modifiers/intern/MOD_mirror.c
index 1284d5a6769..7cbf2718d86 100644
--- a/source/blender/modifiers/intern/MOD_mirror.c
+++ b/source/blender/modifiers/intern/MOD_mirror.c
@@ -51,7 +51,7 @@
static void initData(ModifierData *md)
{
- MirrorModifierData *mmd = (MirrorModifierData*) md;
+ MirrorModifierData *mmd = (MirrorModifierData *) md;
mmd->flag |= (MOD_MIR_AXIS_X | MOD_MIR_VGROUP);
mmd->tolerance = 0.001;
@@ -60,8 +60,8 @@ static void initData(ModifierData *md)
static void copyData(ModifierData *md, ModifierData *target)
{
- MirrorModifierData *mmd = (MirrorModifierData*) md;
- MirrorModifierData *tmmd = (MirrorModifierData*) target;
+ MirrorModifierData *mmd = (MirrorModifierData *) md;
+ MirrorModifierData *tmmd = (MirrorModifierData *) target;
tmmd->flag = mmd->flag;
tmmd->tolerance = mmd->tolerance;
@@ -72,7 +72,7 @@ static void foreachObjectLink(ModifierData *md, Object *ob,
void (*walk)(void *userData, Object *ob, Object **obpoin),
void *userData)
{
- MirrorModifierData *mmd = (MirrorModifierData*) md;
+ MirrorModifierData *mmd = (MirrorModifierData *) md;
walk(userData, ob, &mmd->mirror_ob);
}
@@ -82,7 +82,7 @@ static void updateDepgraph(ModifierData *md, DagForest *forest,
Object *UNUSED(ob),
DagNode *obNode)
{
- MirrorModifierData *mmd = (MirrorModifierData*) md;
+ MirrorModifierData *mmd = (MirrorModifierData *) md;
if (mmd->mirror_ob) {
DagNode *latNode = dag_get_node(forest, mmd->mirror_ob);
@@ -113,7 +113,7 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd,
float mtx[4][4];
int i, j;
int a, totshape;
- int *vtargetmap, *vtmap_a = NULL, *vtmap_b = NULL;
+ int *vtargetmap = NULL, *vtmap_a = NULL, *vtmap_b = NULL;
/* mtx is the mirror transformation */
unit_m4(mtx);
@@ -138,7 +138,7 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd,
mult_m4_m4m4(mtx, itmp, mtx);
}
- result = CDDM_from_template(dm, maxVerts*2, maxEdges*2, 0, maxLoops*2, maxPolys*2);
+ result = CDDM_from_template(dm, maxVerts * 2, maxEdges * 2, 0, maxLoops * 2, maxPolys * 2);
/*copy customdata to original geometry*/
DM_copy_vert_data(dm, result, 0, 0, maxVerts);
@@ -223,17 +223,18 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd,
MLoop *ml2;
int e;
- /* reverse the loop */
- for (j = 0; j < mp->totloop; j++) {
- DM_copy_loop_data(result, result, mp->loopstart + j, mp->loopstart + maxLoops + mp->totloop - j - 1, 1);
- }
+ /* reverse the loop, but we keep the first vertex in the face the same,
+ * to ensure that quads are split the same way as on the other side */
+ DM_copy_loop_data(result, result, mp->loopstart, mp->loopstart + maxLoops, 1);
+ for (j = 1; j < mp->totloop; j++)
+ DM_copy_loop_data(result, result, mp->loopstart + j, mp->loopstart + maxLoops + mp->totloop - j, 1);
ml2 = ml + mp->loopstart + maxLoops;
e = ml2[0].e;
- for (j = 0; j < mp->totloop-1; j++) {
- ml2[j].e = ml2[j+1].e;
+ for (j = 0; j < mp->totloop - 1; j++) {
+ ml2[j].e = ml2[j + 1].e;
}
- ml2[mp->totloop-1].e = e;
+ ml2[mp->totloop - 1].e = e;
mp->loopstart += maxLoops;
}
@@ -248,8 +249,8 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd,
/* handle uvs,
* let tessface recalc handle updating the MTFace data */
if (mmd->flag & (MOD_MIR_MIRROR_U | MOD_MIR_MIRROR_V)) {
- const int do_mirr_u= (mmd->flag & MOD_MIR_MIRROR_U) != 0;
- const int do_mirr_v= (mmd->flag & MOD_MIR_MIRROR_V) != 0;
+ const int do_mirr_u = (mmd->flag & MOD_MIR_MIRROR_U) != 0;
+ const int do_mirr_v = (mmd->flag & MOD_MIR_MIRROR_V) != 0;
const int totuv = CustomData_number_of_layers(&result->loopData, CD_MLOOPUV);
@@ -257,7 +258,7 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd,
MLoopUV *dmloopuv = CustomData_get_layer_n(&result->loopData, CD_MLOOPUV, a);
int j = maxLoops;
dmloopuv += j; /* second set of loops only */
- for ( ; i-- > 0; dmloopuv++) {
+ for (; i-- > 0; dmloopuv++) {
if (do_mirr_u) dmloopuv->uv[0] = 1.0f - dmloopuv->uv[0];
if (do_mirr_v) dmloopuv->uv[1] = 1.0f - dmloopuv->uv[1];
}
@@ -267,9 +268,9 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd,
/* handle vgroup stuff */
if ((mmd->flag & MOD_MIR_VGROUP) && CustomData_has_layer(&result->vertData, CD_MDEFORMVERT)) {
MDeformVert *dvert = (MDeformVert *) CustomData_get_layer(&result->vertData, CD_MDEFORMVERT) + maxVerts;
- int *flip_map= NULL, flip_map_len= 0;
+ int *flip_map = NULL, flip_map_len = 0;
- flip_map= defgroup_flip_map(ob, &flip_map_len, FALSE);
+ flip_map = defgroup_flip_map(ob, &flip_map_len, FALSE);
if (flip_map) {
for (i = 0; i < maxVerts; dvert++, i++) {
@@ -308,12 +309,12 @@ static DerivedMesh *mirrorModifier__doMirror(MirrorModifierData *mmd,
if (mmd->flag & MOD_MIR_AXIS_Y) {
DerivedMesh *tmp = result;
result = doMirrorOnAxis(mmd, ob, result, 1);
- if (tmp != dm) tmp->release(tmp); /* free intermediate results */
+ if (tmp != dm) tmp->release(tmp); /* free intermediate results */
}
if (mmd->flag & MOD_MIR_AXIS_Z) {
DerivedMesh *tmp = result;
result = doMirrorOnAxis(mmd, ob, result, 2);
- if (tmp != dm) tmp->release(tmp); /* free intermediate results */
+ if (tmp != dm) tmp->release(tmp); /* free intermediate results */
}
return result;
@@ -325,7 +326,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
int UNUSED(isFinalCalc))
{
DerivedMesh *result;
- MirrorModifierData *mmd = (MirrorModifierData*) md;
+ MirrorModifierData *mmd = (MirrorModifierData *) md;
result = mirrorModifier__doMirror(mmd, ob, derivedData);
@@ -348,11 +349,11 @@ ModifierTypeInfo modifierType_Mirror = {
/* structName */ "MirrorModifierData",
/* structSize */ sizeof(MirrorModifierData),
/* type */ eModifierTypeType_Constructive,
- /* flags */ eModifierTypeFlag_AcceptsMesh
- | eModifierTypeFlag_SupportsMapping
- | eModifierTypeFlag_SupportsEditmode
- | eModifierTypeFlag_EnableInEditmode
- | eModifierTypeFlag_AcceptsCVs,
+ /* flags */ eModifierTypeFlag_AcceptsMesh |
+ eModifierTypeFlag_SupportsMapping |
+ eModifierTypeFlag_SupportsEditmode |
+ eModifierTypeFlag_EnableInEditmode |
+ eModifierTypeFlag_AcceptsCVs,
/* copyData */ copyData,
/* deformVerts */ NULL,
diff --git a/source/blender/modifiers/intern/MOD_multires.c b/source/blender/modifiers/intern/MOD_multires.c
index 57268d04947..42ba66719da 100644
--- a/source/blender/modifiers/intern/MOD_multires.c
+++ b/source/blender/modifiers/intern/MOD_multires.c
@@ -49,7 +49,7 @@
static void initData(ModifierData *md)
{
- MultiresModifierData *mmd = (MultiresModifierData*)md;
+ MultiresModifierData *mmd = (MultiresModifierData *)md;
mmd->lvl = 0;
mmd->sculptlvl = 0;
@@ -59,8 +59,8 @@ static void initData(ModifierData *md)
static void copyData(ModifierData *md, ModifierData *target)
{
- MultiresModifierData *mmd = (MultiresModifierData*) md;
- MultiresModifierData *tmmd = (MultiresModifierData*) target;
+ MultiresModifierData *mmd = (MultiresModifierData *) md;
+ MultiresModifierData *tmmd = (MultiresModifierData *) target;
tmmd->lvl = mmd->lvl;
tmmd->sculptlvl = mmd->sculptlvl;
@@ -71,11 +71,11 @@ static void copyData(ModifierData *md, ModifierData *target)
}
static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *dm,
- int useRenderParams, int isFinalCalc)
+ int useRenderParams, int isFinalCalc)
{
- MultiresModifierData *mmd = (MultiresModifierData*)md;
+ MultiresModifierData *mmd = (MultiresModifierData *)md;
DerivedMesh *result;
- Mesh *me= (Mesh*)ob->data;
+ Mesh *me = (Mesh *)ob->data;
if (mmd->totlvl) {
if (!CustomData_get_layer(&me->ldata, CD_MDISPS)) {
@@ -92,7 +92,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *dm,
if (useRenderParams || !isFinalCalc) {
DerivedMesh *cddm;
- cddm= CDDM_copy(result);
+ cddm = CDDM_copy(result);
/* copy hidden flag to vertices */
if (!useRenderParams) {
@@ -100,20 +100,20 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *dm,
mdisps = CustomData_get_layer(&me->ldata, CD_MDISPS);
if (mdisps) {
subsurf_copy_grid_hidden(result, me->mpoly,
- cddm->getVertArray(cddm),
- mdisps);
-
- mesh_flush_hidden_from_verts(cddm->getVertArray(cddm),
- cddm->getLoopArray(cddm),
- cddm->getEdgeArray(cddm),
- cddm->getNumEdges(cddm),
- cddm->getPolyArray(cddm),
- cddm->getNumPolys(cddm));
+ cddm->getVertArray(cddm),
+ mdisps);
+
+ BKE_mesh_flush_hidden_from_verts(cddm->getVertArray(cddm),
+ cddm->getLoopArray(cddm),
+ cddm->getEdgeArray(cddm),
+ cddm->getNumEdges(cddm),
+ cddm->getPolyArray(cddm),
+ cddm->getNumPolys(cddm));
}
}
result->release(result);
- result= cddm;
+ result = cddm;
}
return result;
@@ -125,9 +125,9 @@ ModifierTypeInfo modifierType_Multires = {
/* structName */ "MultiresModifierData",
/* structSize */ sizeof(MultiresModifierData),
/* type */ eModifierTypeType_Constructive,
- /* flags */ eModifierTypeFlag_AcceptsMesh
- | eModifierTypeFlag_SupportsMapping
- | eModifierTypeFlag_RequiresOriginalData,
+ /* flags */ eModifierTypeFlag_AcceptsMesh |
+ eModifierTypeFlag_SupportsMapping |
+ eModifierTypeFlag_RequiresOriginalData,
/* copyData */ copyData,
/* deformVerts */ NULL,
diff --git a/source/blender/modifiers/intern/MOD_none.c b/source/blender/modifiers/intern/MOD_none.c
index 967532adf3c..7bdff12b348 100644
--- a/source/blender/modifiers/intern/MOD_none.c
+++ b/source/blender/modifiers/intern/MOD_none.c
@@ -53,8 +53,8 @@ ModifierTypeInfo modifierType_None = {
/* structName */ "ModifierData",
/* structSize */ sizeof(ModifierData),
/* type */ eModifierTypeType_None,
- /* flags */ eModifierTypeFlag_AcceptsMesh
- | eModifierTypeFlag_AcceptsCVs,
+ /* flags */ eModifierTypeFlag_AcceptsMesh |
+ eModifierTypeFlag_AcceptsCVs,
/* copyData */ NULL,
/* deformVerts */ NULL,
diff --git a/source/blender/modifiers/intern/MOD_ocean.c b/source/blender/modifiers/intern/MOD_ocean.c
index fd8691991ff..0bf4d46f975 100644
--- a/source/blender/modifiers/intern/MOD_ocean.c
+++ b/source/blender/modifiers/intern/MOD_ocean.c
@@ -50,7 +50,7 @@
#ifdef WITH_OCEANSIM
static void init_cache_data(Object *ob, struct OceanModifierData *omd)
{
- const char *relbase= modifier_path_relbase(ob);
+ const char *relbase = modifier_path_relbase(ob);
omd->oceancache = BKE_init_ocean_cache(omd->cachepath, relbase,
omd->bakestart, omd->bakeend, omd->wave_scale,
@@ -77,7 +77,8 @@ static void init_ocean_modifier(struct OceanModifierData *omd)
do_jacobian = (omd->flag & MOD_OCEAN_GENERATE_FOAM);
BKE_free_ocean_data(omd->ocean);
- BKE_init_ocean(omd->ocean, omd->resolution*omd->resolution, omd->resolution*omd->resolution, omd->spatial_size, omd->spatial_size,
+ BKE_init_ocean(omd->ocean, omd->resolution * omd->resolution, omd->resolution * omd->resolution,
+ omd->spatial_size, omd->spatial_size,
omd->wind_velocity, omd->smallest_wave, 1.0, omd->wave_direction, omd->damp, omd->wave_alignment,
omd->depth, omd->time,
do_heightfield, do_chop, do_normals, do_jacobian,
@@ -99,7 +100,7 @@ static void simulate_ocean_modifier(struct OceanModifierData *omd)
static void initData(ModifierData *md)
{
#ifdef WITH_OCEANSIM
- OceanModifierData *omd = (OceanModifierData*) md;
+ OceanModifierData *omd = (OceanModifierData *) md;
omd->resolution = 7;
omd->spatial_size = 50;
@@ -109,7 +110,7 @@ static void initData(ModifierData *md)
omd->damp = 0.5;
omd->smallest_wave = 0.01;
- omd->wave_direction= 0.0;
+ omd->wave_direction = 0.0;
omd->depth = 200.0;
omd->wave_scale = 1.0;
@@ -134,13 +135,13 @@ static void initData(ModifierData *md)
omd->bakeend = 250;
omd->oceancache = NULL;
omd->foam_fade = 0.98;
- omd->foamlayername[0] = '\0'; /* layer name empty by default */
+ omd->foamlayername[0] = '\0'; /* layer name empty by default */
omd->ocean = BKE_add_ocean();
init_ocean_modifier(omd);
simulate_ocean_modifier(omd);
#else // WITH_OCEANSIM
- /* unused */
+ /* unused */
(void)md;
#endif // WITH_OCEANSIM
}
@@ -148,7 +149,7 @@ static void initData(ModifierData *md)
static void freeData(ModifierData *md)
{
#ifdef WITH_OCEANSIM
- OceanModifierData *omd = (OceanModifierData*) md;
+ OceanModifierData *omd = (OceanModifierData *) md;
BKE_free_ocean(omd->ocean);
if (omd->oceancache)
@@ -162,8 +163,8 @@ static void freeData(ModifierData *md)
static void copyData(ModifierData *md, ModifierData *target)
{
#ifdef WITH_OCEANSIM
- OceanModifierData *omd = (OceanModifierData*) md;
- OceanModifierData *tomd = (OceanModifierData*) target;
+ OceanModifierData *omd = (OceanModifierData *) md;
+ OceanModifierData *tomd = (OceanModifierData *) target;
tomd->resolution = omd->resolution;
tomd->spatial_size = omd->spatial_size;
@@ -232,22 +233,22 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
static void dm_get_bounds(DerivedMesh *dm, float *sx, float *sy, float *ox, float *oy)
{
/* get bounding box of underlying dm */
- int v, totvert=dm->getNumVerts(dm);
+ int v, totvert = dm->getNumVerts(dm);
float min[3], max[3], delta[3];
- MVert *mvert = dm->getVertDataArray(dm,0);
+ MVert *mvert = dm->getVertDataArray(dm, 0);
copy_v3_v3(min, mvert->co);
copy_v3_v3(max, mvert->co);
- for (v=1; v<totvert; v++, mvert++) {
- min[0]=MIN2(min[0],mvert->co[0]);
- min[1]=MIN2(min[1],mvert->co[1]);
- min[2]=MIN2(min[2],mvert->co[2]);
+ for (v = 1; v < totvert; v++, mvert++) {
+ min[0] = MIN2(min[0], mvert->co[0]);
+ min[1] = MIN2(min[1], mvert->co[1]);
+ min[2] = MIN2(min[2], mvert->co[2]);
- max[0]=MAX2(max[0],mvert->co[0]);
- max[1]=MAX2(max[1],mvert->co[1]);
- max[2]=MAX2(max[2],mvert->co[2]);
+ max[0] = MAX2(max[0], mvert->co[0]);
+ max[1] = MAX2(max[1], mvert->co[1]);
+ max[2] = MAX2(max[2], mvert->co[2]);
}
sub_v3_v3v3(delta, max, min);
@@ -263,7 +264,7 @@ static void dm_get_bounds(DerivedMesh *dm, float *sx, float *sy, float *ox, floa
#ifdef WITH_OCEANSIM
-#define OMP_MIN_RES 18
+#define OMP_MIN_RES 18
static DerivedMesh *generate_ocean_geometry(OceanModifierData *omd)
{
DerivedMesh *result;
@@ -275,8 +276,8 @@ static DerivedMesh *generate_ocean_geometry(OceanModifierData *omd)
int cdlayer;
- const int rx = omd->resolution*omd->resolution;
- const int ry = omd->resolution*omd->resolution;
+ const int rx = omd->resolution * omd->resolution;
+ const int ry = omd->resolution * omd->resolution;
const int res_x = rx * omd->repeat_x;
const int res_y = ry * omd->repeat_y;
@@ -303,17 +304,17 @@ static DerivedMesh *generate_ocean_geometry(OceanModifierData *omd)
mloops = CDDM_get_loops(result);
#if 0 // trunk
- origindex= result->getFaceDataArray(result, CD_ORIGINDEX);
+ origindex = result->getFaceDataArray(result, CD_ORIGINDEX);
#else // bmesh
- origindex= CustomData_get_layer(&result->polyData, CD_ORIGINDEX);
+ origindex = CustomData_get_layer(&result->polyData, CD_ORIGINDEX);
#endif
/* create vertices */
#pragma omp parallel for private(x, y) if (rx > OMP_MIN_RES)
- for (y=0; y < res_y+1; y++) {
- for (x=0; x < res_x+1; x++) {
- const int i = y*(res_x+1) + x;
- float *co= mverts[i].co;
+ for (y = 0; y < res_y + 1; y++) {
+ for (x = 0; x < res_x + 1; x++) {
+ const int i = y * (res_x + 1) + x;
+ float *co = mverts[i].co;
co[0] = ox + (x * sx);
co[1] = oy + (y * sy);
co[2] = 0;
@@ -322,12 +323,12 @@ static DerivedMesh *generate_ocean_geometry(OceanModifierData *omd)
/* create faces */
#pragma omp parallel for private(x, y) if (rx > OMP_MIN_RES)
- for (y=0; y < res_y; y++) {
- for (x=0; x < res_x; x++) {
- const int fi = y*res_x + x;
- const int vi = y*(res_x+1) + x;
- MPoly *mp= &mpolys[fi];
- MLoop *ml= &mloops[fi * 4];
+ for (y = 0; y < res_y; y++) {
+ for (x = 0; x < res_x; x++) {
+ const int fi = y * res_x + x;
+ const int vi = y * (res_x + 1) + x;
+ MPoly *mp = &mpolys[fi];
+ MLoop *ml = &mloops[fi * 4];
ml->v = vi;
ml++;
@@ -338,8 +339,8 @@ static DerivedMesh *generate_ocean_geometry(OceanModifierData *omd)
ml->v = vi + res_x + 1;
ml++;
- mp->loopstart= fi * 4;
- mp->totloop= 4;
+ mp->loopstart = fi * 4;
+ mp->totloop = 4;
mp->flag |= ME_SMOOTH;
@@ -351,7 +352,7 @@ static DerivedMesh *generate_ocean_geometry(OceanModifierData *omd)
CDDM_calc_edges(result);
/* add uvs */
- cdlayer= CustomData_number_of_layers(&result->loopData, CD_MLOOPUV);
+ cdlayer = CustomData_number_of_layers(&result->loopData, CD_MLOOPUV);
if (cdlayer < MAX_MTFACE) {
MLoopUV *mloopuvs = CustomData_add_layer(&result->loopData, CD_MLOOPUV, CD_CALLOC, NULL, num_faces * 4);
CustomData_add_layer(&result->polyData, CD_MTEXPOLY, CD_CALLOC, NULL, num_faces);
@@ -360,25 +361,25 @@ static DerivedMesh *generate_ocean_geometry(OceanModifierData *omd)
ix = 1.0 / rx;
iy = 1.0 / ry;
#pragma omp parallel for private(x, y) if (rx > OMP_MIN_RES)
- for (y=0; y < res_y; y++) {
- for (x=0; x < res_x; x++) {
- const int i = y*res_x + x;
- MLoopUV *luv= &mloopuvs[i * 4];
+ for (y = 0; y < res_y; y++) {
+ for (x = 0; x < res_x; x++) {
+ const int i = y * res_x + x;
+ MLoopUV *luv = &mloopuvs[i * 4];
luv->uv[0] = x * ix;
luv->uv[1] = y * iy;
luv++;
- luv->uv[0] = (x+1) * ix;
+ luv->uv[0] = (x + 1) * ix;
luv->uv[1] = y * iy;
luv++;
- luv->uv[0] = (x+1) * ix;
- luv->uv[1] = (y+1) * iy;
+ luv->uv[0] = (x + 1) * ix;
+ luv->uv[1] = (y + 1) * iy;
luv++;
luv->uv[0] = x * ix;
- luv->uv[1] = (y+1) * iy;
+ luv->uv[1] = (y + 1) * iy;
luv++;
}
@@ -393,9 +394,9 @@ static DerivedMesh *doOcean(ModifierData *md, Object *ob,
DerivedMesh *derivedData,
int UNUSED(useRenderParams))
{
- OceanModifierData *omd = (OceanModifierData*) md;
+ OceanModifierData *omd = (OceanModifierData *) md;
- DerivedMesh *dm=NULL;
+ DerivedMesh *dm = NULL;
OceanResult ocr;
MVert *mverts, *mv;
@@ -414,7 +415,7 @@ static DerivedMesh *doOcean(ModifierData *md, Object *ob,
* (axis / (omd->size * omd->spatial_size)) + 0.5f) */
#define OCEAN_CO(_size_co_inv, _v) ((_v * _size_co_inv) + 0.5f)
- const float size_co_inv= 1.0f / (omd->size * omd->spatial_size);
+ const float size_co_inv = 1.0f / (omd->size * omd->spatial_size);
/* update modifier */
if (omd->refresh & MOD_OCEAN_REFRESH_ADD)
@@ -443,7 +444,7 @@ static DerivedMesh *doOcean(ModifierData *md, Object *ob,
cfra = md->scene->r.cfra;
CLAMP(cfra, omd->bakestart, omd->bakeend);
- cfra -= omd->bakestart; // shift to 0 based
+ cfra -= omd->bakestart; // shift to 0 based
num_verts = dm->getNumVerts(dm);
num_faces = dm->getNumPolys(dm);
@@ -454,30 +455,31 @@ static DerivedMesh *doOcean(ModifierData *md, Object *ob,
/* add vcols before displacement - allows lookup based on position */
if (omd->flag & MOD_OCEAN_GENERATE_FOAM) {
- int cdlayer= CustomData_number_of_layers(&dm->loopData, CD_MLOOPCOL);
+ int cdlayer = CustomData_number_of_layers(&dm->loopData, CD_MLOOPCOL);
if (cdlayer < MAX_MCOL) {
- MLoopCol *mloopcols= CustomData_add_layer_named(&dm->loopData, CD_MLOOPCOL, CD_CALLOC, NULL, num_faces * 4, omd->foamlayername);
+ MLoopCol *mloopcols = CustomData_add_layer_named(&dm->loopData, CD_MLOOPCOL, CD_CALLOC, NULL,
+ num_faces * 4, omd->foamlayername);
if (mloopcols) { /* unlikely to fail */
MLoopCol *mlcol;
- MPoly *mpolys= dm->getPolyArray(dm);
+ MPoly *mpolys = dm->getPolyArray(dm);
MPoly *mp;
float foam;
- for (i = 0, mp= mpolys; i < num_faces; i++, mp++) {
- j= mp->totloop - 1;
+ for (i = 0, mp = mpolys; i < num_faces; i++, mp++) {
+ j = mp->totloop - 1;
/* highly unlikely */
if (j <= 0) continue;
do {
- const float *co= mverts[mloops[mp->loopstart + j].v].co;
+ const float *co = mverts[mloops[mp->loopstart + j].v].co;
const float u = OCEAN_CO(size_co_inv, co[0]);
const float v = OCEAN_CO(size_co_inv, co[1]);
- if (omd->oceancache && omd->cached==TRUE) {
+ if (omd->oceancache && omd->cached == TRUE) {
BKE_ocean_cache_eval_uv(omd->oceancache, &ocr, cfra, u, v);
foam = ocr.foam;
CLAMP(foam, 0.0f, 1.0f);
@@ -487,7 +489,7 @@ static DerivedMesh *doOcean(ModifierData *md, Object *ob,
foam = BKE_ocean_jminus_to_foam(ocr.Jminus, omd->foam_coverage);
}
- mlcol= &mloopcols[mp->loopstart + j];
+ mlcol = &mloopcols[mp->loopstart + j];
mlcol->r = mlcol->g = mlcol->b = (char)(foam * 255);
/* mc->a = 255; */ /* no need to set */
} while (j--);
@@ -500,11 +502,11 @@ static DerivedMesh *doOcean(ModifierData *md, Object *ob,
/* displace the geometry */
//#pragma omp parallel for private(i, ocr) if (omd->resolution > OMP_MIN_RES)
- for (i=0, mv= mverts; i< num_verts; i++, mv++) {
+ for (i = 0, mv = mverts; i < num_verts; i++, mv++) {
const float u = OCEAN_CO(size_co_inv, mv->co[0]);
const float v = OCEAN_CO(size_co_inv, mv->co[1]);
- if (omd->oceancache && omd->cached==TRUE)
+ if (omd->oceancache && omd->cached == TRUE)
BKE_ocean_cache_eval_uv(omd->oceancache, &ocr, cfra, u, v);
else
BKE_ocean_eval_uv(omd->ocean, &ocr, u, v);
@@ -523,8 +525,8 @@ static DerivedMesh *doOcean(ModifierData *md, Object *ob,
}
#else // WITH_OCEANSIM
static DerivedMesh *doOcean(ModifierData *md, Object *UNUSED(ob),
- DerivedMesh *derivedData,
- int UNUSED(useRenderParams))
+ DerivedMesh *derivedData,
+ int UNUSED(useRenderParams))
{
/* unused */
(void)md;
@@ -533,9 +535,9 @@ static DerivedMesh *doOcean(ModifierData *md, Object *UNUSED(ob),
#endif // WITH_OCEANSIM
static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
- DerivedMesh *derivedData,
- int UNUSED(useRenderParams),
- int UNUSED(isFinalCalc))
+ DerivedMesh *derivedData,
+ int UNUSED(useRenderParams),
+ int UNUSED(isFinalCalc))
{
DerivedMesh *result;
@@ -548,8 +550,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
}
static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob,
- struct BMEditMesh *UNUSED(editData),
- DerivedMesh *derivedData)
+ struct BMEditMesh *UNUSED(editData),
+ DerivedMesh *derivedData)
{
return applyModifier(md, ob, derivedData, 0, 1);
}
@@ -561,9 +563,9 @@ ModifierTypeInfo modifierType_Ocean = {
/* structName */ "OceanModifierData",
/* structSize */ sizeof(OceanModifierData),
/* type */ eModifierTypeType_Constructive,
- /* flags */ eModifierTypeFlag_AcceptsMesh
- | eModifierTypeFlag_SupportsEditmode
- | eModifierTypeFlag_EnableInEditmode,
+ /* flags */ eModifierTypeFlag_AcceptsMesh |
+ eModifierTypeFlag_SupportsEditmode |
+ eModifierTypeFlag_EnableInEditmode,
/* copyData */ copyData,
/* deformMatrices */ NULL,
diff --git a/source/blender/modifiers/intern/MOD_particleinstance.c b/source/blender/modifiers/intern/MOD_particleinstance.c
index 628104295f7..fd48afec5cd 100644
--- a/source/blender/modifiers/intern/MOD_particleinstance.c
+++ b/source/blender/modifiers/intern/MOD_particleinstance.c
@@ -55,10 +55,10 @@
static void initData(ModifierData *md)
{
- ParticleInstanceModifierData *pimd= (ParticleInstanceModifierData*) md;
+ ParticleInstanceModifierData *pimd = (ParticleInstanceModifierData *) md;
- pimd->flag = eParticleInstanceFlag_Parents|eParticleInstanceFlag_Unborn|
- eParticleInstanceFlag_Alive|eParticleInstanceFlag_Dead;
+ pimd->flag = eParticleInstanceFlag_Parents | eParticleInstanceFlag_Unborn |
+ eParticleInstanceFlag_Alive | eParticleInstanceFlag_Dead;
pimd->psys = 1;
pimd->position = 1.0f;
pimd->axis = 2;
@@ -66,8 +66,8 @@ static void initData(ModifierData *md)
}
static void copyData(ModifierData *md, ModifierData *target)
{
- ParticleInstanceModifierData *pimd= (ParticleInstanceModifierData*) md;
- ParticleInstanceModifierData *tpimd= (ParticleInstanceModifierData*) target;
+ ParticleInstanceModifierData *pimd = (ParticleInstanceModifierData *) md;
+ ParticleInstanceModifierData *tpimd = (ParticleInstanceModifierData *) target;
tpimd->ob = pimd->ob;
tpimd->psys = pimd->psys;
@@ -82,71 +82,71 @@ static int dependsOnTime(ModifierData *UNUSED(md))
return 0;
}
static void updateDepgraph(ModifierData *md, DagForest *forest,
- struct Scene *UNUSED(scene),
- Object *UNUSED(ob),
- DagNode *obNode)
+ struct Scene *UNUSED(scene),
+ Object *UNUSED(ob),
+ DagNode *obNode)
{
- ParticleInstanceModifierData *pimd = (ParticleInstanceModifierData*) md;
+ ParticleInstanceModifierData *pimd = (ParticleInstanceModifierData *) md;
if (pimd->ob) {
DagNode *curNode = dag_get_node(forest, pimd->ob);
dag_add_relation(forest, curNode, obNode,
- DAG_RL_DATA_DATA | DAG_RL_OB_DATA,
- "Particle Instance Modifier");
+ DAG_RL_DATA_DATA | DAG_RL_OB_DATA,
+ "Particle Instance Modifier");
}
}
static void foreachObjectLink(ModifierData *md, Object *ob,
- ObjectWalkFunc walk, void *userData)
+ ObjectWalkFunc walk, void *userData)
{
- ParticleInstanceModifierData *pimd = (ParticleInstanceModifierData*) md;
+ ParticleInstanceModifierData *pimd = (ParticleInstanceModifierData *) md;
walk(userData, ob, &pimd->ob);
}
-static DerivedMesh * applyModifier(ModifierData *md, Object *ob,
- DerivedMesh *derivedData,
- int UNUSED(useRenderParams),
- int UNUSED(isFinalCalc))
+static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
+ DerivedMesh *derivedData,
+ int UNUSED(useRenderParams),
+ int UNUSED(isFinalCalc))
{
DerivedMesh *dm = derivedData, *result;
- ParticleInstanceModifierData *pimd= (ParticleInstanceModifierData*) md;
+ ParticleInstanceModifierData *pimd = (ParticleInstanceModifierData *) md;
ParticleSimulationData sim;
- ParticleSystem *psys= NULL;
- ParticleData *pa= NULL, *pars= NULL;
+ ParticleSystem *psys = NULL;
+ ParticleData *pa = NULL, *pars = NULL;
MFace *mface, *orig_mface;
MVert *mvert, *orig_mvert;
- int i,totvert, totpart=0, totface, maxvert, maxface, first_particle=0;
- short track=ob->trackflag%3, trackneg, axis = pimd->axis;
- float max_co=0.0, min_co=0.0, temp_co[3], cross[3];
- float *size=NULL;
+ int i, totvert, totpart = 0, totface, maxvert, maxface, first_particle = 0;
+ short track = ob->trackflag % 3, trackneg, axis = pimd->axis;
+ float max_co = 0.0, min_co = 0.0, temp_co[3], cross[3];
+ float *size = NULL;
DM_ensure_tessface(dm); /* BMESH - UNTIL MODIFIER IS UPDATED FOR MPoly */
- trackneg=((ob->trackflag>2)?1:0);
+ trackneg = ((ob->trackflag > 2) ? 1 : 0);
- if (pimd->ob==ob) {
- pimd->ob= NULL;
+ if (pimd->ob == ob) {
+ pimd->ob = NULL;
return derivedData;
}
if (pimd->ob) {
- psys = BLI_findlink(&pimd->ob->particlesystem,pimd->psys-1);
- if (psys==NULL || psys->totpart==0)
+ psys = BLI_findlink(&pimd->ob->particlesystem, pimd->psys - 1);
+ if (psys == NULL || psys->totpart == 0)
return derivedData;
}
else return derivedData;
if (pimd->flag & eParticleInstanceFlag_Parents)
- totpart+=psys->totpart;
+ totpart += psys->totpart;
if (pimd->flag & eParticleInstanceFlag_Children) {
- if (totpart==0)
- first_particle=psys->totpart;
- totpart+=psys->totchild;
+ if (totpart == 0)
+ first_particle = psys->totpart;
+ totpart += psys->totchild;
}
- if (totpart==0)
+ if (totpart == 0)
return derivedData;
sim.scene = md->scene;
@@ -160,62 +160,64 @@ static DerivedMesh * applyModifier(ModifierData *md, Object *ob,
si = size = MEM_callocN(totpart * sizeof(float), "particle size array");
if (pimd->flag & eParticleInstanceFlag_Parents) {
- for (p=0, pa= psys->particles; p<psys->totpart; p++, pa++, si++)
+ for (p = 0, pa = psys->particles; p < psys->totpart; p++, pa++, si++)
*si = pa->size;
}
if (pimd->flag & eParticleInstanceFlag_Children) {
ChildParticle *cpa = psys->child;
- for (p=0; p<psys->totchild; p++, cpa++, si++) {
+ for (p = 0; p < psys->totchild; p++, cpa++, si++) {
*si = psys_get_child_size(psys, cpa, 0.0f, NULL);
}
}
}
- pars=psys->particles;
+ pars = psys->particles;
- totvert=dm->getNumVerts(dm);
- totface=dm->getNumTessFaces(dm);
+ totvert = dm->getNumVerts(dm);
+ totface = dm->getNumTessFaces(dm);
- maxvert=totvert*totpart;
- maxface=totface*totpart;
+ maxvert = totvert * totpart;
+ maxface = totface * totpart;
- psys->lattice=psys_get_lattice(&sim);
+ psys->lattice = psys_get_lattice(&sim);
- if (psys->flag & (PSYS_HAIR_DONE|PSYS_KEYED) || psys->pointcache->flag & PTCACHE_BAKED) {
+ if (psys->flag & (PSYS_HAIR_DONE | PSYS_KEYED) || psys->pointcache->flag & PTCACHE_BAKED) {
float min_r[3], max_r[3];
INIT_MINMAX(min_r, max_r);
dm->getMinMax(dm, min_r, max_r);
- min_co=min_r[track];
- max_co=max_r[track];
+ min_co = min_r[track];
+ max_co = max_r[track];
}
- result = CDDM_from_template(dm, maxvert,dm->getNumEdges(dm)*totpart,maxface, 0, 0);
+ result = CDDM_from_template(dm, maxvert, dm->getNumEdges(dm) * totpart, maxface, 0, 0);
- mvert=result->getVertArray(result);
- orig_mvert=dm->getVertArray(dm);
+ mvert = result->getVertArray(result);
+ orig_mvert = dm->getVertArray(dm);
- for (i=0; i<maxvert; i++) {
+ for (i = 0; i < maxvert; i++) {
MVert *inMV;
MVert *mv = mvert + i;
ParticleKey state;
- inMV = orig_mvert + i%totvert;
- DM_copy_vert_data(dm, result, i%totvert, i, 1);
+ inMV = orig_mvert + i % totvert;
+ DM_copy_vert_data(dm, result, i % totvert, i, 1);
*mv = *inMV;
/*change orientation based on object trackflag*/
copy_v3_v3(temp_co, mv->co);
- mv->co[axis]=temp_co[track];
- mv->co[(axis+1)%3]=temp_co[(track+1)%3];
- mv->co[(axis+2)%3]=temp_co[(track+2)%3];
+ mv->co[axis] = temp_co[track];
+ mv->co[(axis + 1) % 3] = temp_co[(track + 1) % 3];
+ mv->co[(axis + 2) % 3] = temp_co[(track + 2) % 3];
- if ((psys->flag & (PSYS_HAIR_DONE|PSYS_KEYED) || psys->pointcache->flag & PTCACHE_BAKED) && pimd->flag & eParticleInstanceFlag_Path) {
+ if ((psys->flag & (PSYS_HAIR_DONE | PSYS_KEYED) || psys->pointcache->flag & PTCACHE_BAKED) &&
+ (pimd->flag & eParticleInstanceFlag_Path))
+ {
float ran = 0.0f;
if (pimd->random_position != 0.0f) {
- BLI_srandom(psys->seed + (i/totvert)%totpart);
+ BLI_srandom(psys->seed + (i / totvert) % totpart);
ran = pimd->random_position * BLI_frand();
}
@@ -223,15 +225,15 @@ static DerivedMesh * applyModifier(ModifierData *md, Object *ob,
state.time = pimd->position * (1.0f - ran);
}
else {
- state.time=(mv->co[axis]-min_co)/(max_co-min_co) * pimd->position * (1.0f - ran);
+ state.time = (mv->co[axis] - min_co) / (max_co - min_co) * pimd->position * (1.0f - ran);
if (trackneg)
- state.time=1.0f-state.time;
+ state.time = 1.0f - state.time;
mv->co[axis] = 0.0;
}
- psys_get_particle_on_path(&sim, first_particle + i/totvert, &state,1);
+ psys_get_particle_on_path(&sim, first_particle + i / totvert, &state, 1);
normalize_v3(state.vel);
@@ -241,71 +243,71 @@ static DerivedMesh * applyModifier(ModifierData *md, Object *ob,
state.rot[1] = state.rot[2] = state.rot[3] = 0.0f;
}
else {
- float temp[3] = {0.0f,0.0f,0.0f};
+ float temp[3] = {0.0f, 0.0f, 0.0f};
temp[axis] = 1.0f;
cross_v3_v3v3(cross, temp, state.vel);
/* state.vel[axis] is the only component surviving from a dot product with the axis */
- axis_angle_to_quat(state.rot,cross,saacos(state.vel[axis]));
+ axis_angle_to_quat(state.rot, cross, saacos(state.vel[axis]));
}
}
else {
- state.time=-1.0;
- psys_get_particle_state(&sim, first_particle + i/totvert, &state,1);
+ state.time = -1.0;
+ psys_get_particle_state(&sim, first_particle + i / totvert, &state, 1);
}
- mul_qt_v3(state.rot,mv->co);
+ mul_qt_v3(state.rot, mv->co);
if (pimd->flag & eParticleInstanceFlag_UseSize)
- mul_v3_fl(mv->co, size[i/totvert]);
+ mul_v3_fl(mv->co, size[i / totvert]);
add_v3_v3(mv->co, state.co);
}
- mface=result->getTessFaceArray(result);
- orig_mface=dm->getTessFaceArray(dm);
+ mface = result->getTessFaceArray(result);
+ orig_mface = dm->getTessFaceArray(dm);
- for (i=0; i<maxface; i++) {
+ for (i = 0; i < maxface; i++) {
MFace *inMF;
MFace *mf = mface + i;
if (pimd->flag & eParticleInstanceFlag_Parents) {
- if (i/totface>=psys->totpart) {
- if (psys->part->childtype==PART_CHILD_PARTICLES) {
- pa=psys->particles+(psys->child+i/totface-psys->totpart)->parent;
+ if (i / totface >= psys->totpart) {
+ if (psys->part->childtype == PART_CHILD_PARTICLES) {
+ pa = psys->particles + (psys->child + i / totface - psys->totpart)->parent;
}
else {
- pa= NULL;
+ pa = NULL;
}
}
else {
- pa=pars+i/totface;
+ pa = pars + i / totface;
}
}
else {
- if (psys->part->childtype==PART_CHILD_PARTICLES) {
- pa=psys->particles+(psys->child+i/totface)->parent;
+ if (psys->part->childtype == PART_CHILD_PARTICLES) {
+ pa = psys->particles + (psys->child + i / totface)->parent;
}
else {
- pa= NULL;
+ pa = NULL;
}
}
if (pa) {
- if (pa->alive==PARS_UNBORN && (pimd->flag&eParticleInstanceFlag_Unborn)==0) continue;
- if (pa->alive==PARS_ALIVE && (pimd->flag&eParticleInstanceFlag_Alive)==0) continue;
- if (pa->alive==PARS_DEAD && (pimd->flag&eParticleInstanceFlag_Dead)==0) continue;
+ if (pa->alive == PARS_UNBORN && (pimd->flag & eParticleInstanceFlag_Unborn) == 0) continue;
+ if (pa->alive == PARS_ALIVE && (pimd->flag & eParticleInstanceFlag_Alive) == 0) continue;
+ if (pa->alive == PARS_DEAD && (pimd->flag & eParticleInstanceFlag_Dead) == 0) continue;
}
- inMF = orig_mface + i%totface;
- DM_copy_poly_data(dm, result, i%totface, i, 1);
+ inMF = orig_mface + i % totface;
+ DM_copy_poly_data(dm, result, i % totface, i, 1);
*mf = *inMF;
- mf->v1+=(i/totface)*totvert;
- mf->v2+=(i/totface)*totvert;
- mf->v3+=(i/totface)*totvert;
+ mf->v1 += (i / totface) * totvert;
+ mf->v2 += (i / totface) * totvert;
+ mf->v3 += (i / totface) * totvert;
if (mf->v4) {
- mf->v4+=(i/totface)*totvert;
+ mf->v4 += (i / totface) * totvert;
}
}
@@ -313,7 +315,7 @@ static DerivedMesh * applyModifier(ModifierData *md, Object *ob,
if (psys->lattice) {
end_latt_deform(psys->lattice);
- psys->lattice= NULL;
+ psys->lattice = NULL;
}
if (size)
@@ -325,38 +327,38 @@ static DerivedMesh * applyModifier(ModifierData *md, Object *ob,
return result;
}
static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob,
- struct BMEditMesh *UNUSED(editData),
- DerivedMesh *derivedData)
+ struct BMEditMesh *UNUSED(editData),
+ DerivedMesh *derivedData)
{
return applyModifier(md, ob, derivedData, 0, 1);
}
ModifierTypeInfo modifierType_ParticleInstance = {
- /* name */ "ParticleInstance",
- /* structName */ "ParticleInstanceModifierData",
- /* structSize */ sizeof(ParticleInstanceModifierData),
- /* type */ eModifierTypeType_Constructive,
- /* flags */ eModifierTypeFlag_AcceptsMesh
- | eModifierTypeFlag_SupportsMapping
- | eModifierTypeFlag_SupportsEditmode
- | eModifierTypeFlag_EnableInEditmode,
-
- /* copyData */ copyData,
- /* deformVerts */ NULL,
- /* deformMatrices */ NULL,
- /* deformVertsEM */ NULL,
- /* deformMatricesEM */ NULL,
- /* applyModifier */ applyModifier,
- /* applyModifierEM */ applyModifierEM,
- /* initData */ initData,
- /* requiredDataMask */ NULL,
- /* freeData */ NULL,
- /* isDisabled */ NULL,
- /* updateDepgraph */ updateDepgraph,
- /* dependsOnTime */ dependsOnTime,
- /* dependsOnNormals */ NULL,
+ /* name */ "ParticleInstance",
+ /* structName */ "ParticleInstanceModifierData",
+ /* structSize */ sizeof(ParticleInstanceModifierData),
+ /* type */ eModifierTypeType_Constructive,
+ /* flags */ eModifierTypeFlag_AcceptsMesh |
+ eModifierTypeFlag_SupportsMapping |
+ eModifierTypeFlag_SupportsEditmode |
+ eModifierTypeFlag_EnableInEditmode,
+
+ /* copyData */ copyData,
+ /* deformVerts */ NULL,
+ /* deformMatrices */ NULL,
+ /* deformVertsEM */ NULL,
+ /* deformMatricesEM */ NULL,
+ /* applyModifier */ applyModifier,
+ /* applyModifierEM */ applyModifierEM,
+ /* initData */ initData,
+ /* requiredDataMask */ NULL,
+ /* freeData */ NULL,
+ /* isDisabled */ NULL,
+ /* updateDepgraph */ updateDepgraph,
+ /* dependsOnTime */ dependsOnTime,
+ /* dependsOnNormals */ NULL,
/* foreachObjectLink */ foreachObjectLink,
- /* foreachIDLink */ NULL,
- /* foreachTexLink */ NULL,
+ /* foreachIDLink */ NULL,
+ /* foreachTexLink */ NULL,
};
diff --git a/source/blender/modifiers/intern/MOD_particlesystem.c b/source/blender/modifiers/intern/MOD_particlesystem.c
index d93779fc07d..71c77621dfa 100644
--- a/source/blender/modifiers/intern/MOD_particlesystem.c
+++ b/source/blender/modifiers/intern/MOD_particlesystem.c
@@ -50,14 +50,14 @@
static void initData(ModifierData *md)
{
- ParticleSystemModifierData *psmd= (ParticleSystemModifierData*) md;
- psmd->psys= NULL;
- psmd->dm= NULL;
- psmd->totdmvert= psmd->totdmedge= psmd->totdmface= 0;
+ ParticleSystemModifierData *psmd = (ParticleSystemModifierData *) md;
+ psmd->psys = NULL;
+ psmd->dm = NULL;
+ psmd->totdmvert = psmd->totdmedge = psmd->totdmface = 0;
}
static void freeData(ModifierData *md)
{
- ParticleSystemModifierData *psmd= (ParticleSystemModifierData*) md;
+ ParticleSystemModifierData *psmd = (ParticleSystemModifierData *) md;
if (psmd->dm) {
psmd->dm->needsFree = 1;
@@ -72,20 +72,20 @@ static void freeData(ModifierData *md)
}
static void copyData(ModifierData *md, ModifierData *target)
{
- ParticleSystemModifierData *psmd= (ParticleSystemModifierData*) md;
- ParticleSystemModifierData *tpsmd= (ParticleSystemModifierData*) target;
+ ParticleSystemModifierData *psmd = (ParticleSystemModifierData *) md;
+ ParticleSystemModifierData *tpsmd = (ParticleSystemModifierData *) target;
tpsmd->dm = NULL;
tpsmd->totdmvert = tpsmd->totdmedge = tpsmd->totdmface = 0;
//tpsmd->facepa = 0;
tpsmd->flag = psmd->flag;
- /* need to keep this to recognise a bit later in copy_object */
+ /* need to keep this to recognise a bit later in BKE_object_copy */
tpsmd->psys = psmd->psys;
}
static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
{
- ParticleSystemModifierData *psmd= (ParticleSystemModifierData*) md;
+ ParticleSystemModifierData *psmd = (ParticleSystemModifierData *) md;
CustomDataMask dataMask = 0;
MTex *mtex;
int i;
@@ -93,7 +93,7 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
if (!psmd->psys->part)
return 0;
- for (i=0; i<MAX_MTEX; i++) {
+ for (i = 0; i < MAX_MTEX; i++) {
mtex = psmd->psys->part->mtex[i];
if (mtex && mtex->mapto && (mtex->texco & TEXCO_UV))
dataMask |= CD_MASK_MTFACE;
@@ -103,7 +103,7 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
dataMask |= CD_MASK_MTFACE;
/* ask for vertexgroups if we need them */
- for (i=0; i<PSYS_TOT_VG; i++) {
+ for (i = 0; i < PSYS_TOT_VG; i++) {
if (psmd->psys->vgroup[i]) {
dataMask |= CD_MASK_MDEFORMVERT;
break;
@@ -112,7 +112,7 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
/* particles only need this if they are after a non deform modifier, and
* the modifier stack will only create them in that case. */
- dataMask |= CD_MASK_ORIGSPACE_MLOOP|CD_MASK_ORIGINDEX;
+ dataMask |= CD_MASK_ORIGSPACE_MLOOP | CD_MASK_ORIGINDEX;
dataMask |= CD_MASK_ORCO;
@@ -121,32 +121,32 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
/* saves the current emitter state for a particle system and calculates particles */
static void deformVerts(ModifierData *md, Object *ob,
- DerivedMesh *derivedData,
- float (*vertexCos)[3],
- int UNUSED(numVerts),
- int UNUSED(useRenderParams),
- int UNUSED(isFinalCalc))
+ DerivedMesh *derivedData,
+ float (*vertexCos)[3],
+ int UNUSED(numVerts),
+ int UNUSED(useRenderParams),
+ int UNUSED(isFinalCalc))
{
DerivedMesh *dm = derivedData;
- ParticleSystemModifierData *psmd= (ParticleSystemModifierData*) md;
- ParticleSystem * psys= NULL;
- int needsFree=0;
+ ParticleSystemModifierData *psmd = (ParticleSystemModifierData *) md;
+ ParticleSystem *psys = NULL;
+ int needsFree = 0;
if (ob->particlesystem.first)
- psys=psmd->psys;
+ psys = psmd->psys;
else
return;
if (!psys_check_enabled(ob, psys))
return;
- if (dm==NULL) {
- dm= get_dm(ob, NULL, NULL, vertexCos, 1);
+ if (dm == NULL) {
+ dm = get_dm(ob, NULL, NULL, vertexCos, 1);
if (!dm)
return;
- needsFree= 1;
+ needsFree = 1;
}
/* clear old dm */
@@ -164,7 +164,7 @@ static void deformVerts(ModifierData *md, Object *ob,
}
/* make new dm */
- psmd->dm=CDDM_copy(dm);
+ psmd->dm = CDDM_copy(dm);
CDDM_apply_vert_coords(psmd->dm, vertexCos);
CDDM_calc_normals(psmd->dm);
@@ -177,15 +177,15 @@ static void deformVerts(ModifierData *md, Object *ob,
psmd->dm->needsFree = 0;
/* report change in mesh structure */
- if (psmd->dm->getNumVerts(psmd->dm)!=psmd->totdmvert ||
- psmd->dm->getNumEdges(psmd->dm)!=psmd->totdmedge ||
- psmd->dm->getNumTessFaces(psmd->dm)!=psmd->totdmface) {
-
+ if (psmd->dm->getNumVerts(psmd->dm) != psmd->totdmvert ||
+ psmd->dm->getNumEdges(psmd->dm) != psmd->totdmedge ||
+ psmd->dm->getNumTessFaces(psmd->dm) != psmd->totdmface)
+ {
psys->recalc |= PSYS_RECALC_RESET;
- psmd->totdmvert= psmd->dm->getNumVerts(psmd->dm);
- psmd->totdmedge= psmd->dm->getNumEdges(psmd->dm);
- psmd->totdmface= psmd->dm->getNumTessFaces(psmd->dm);
+ psmd->totdmvert = psmd->dm->getNumVerts(psmd->dm);
+ psmd->totdmedge = psmd->dm->getNumEdges(psmd->dm);
+ psmd->totdmface = psmd->dm->getNumTessFaces(psmd->dm);
}
if (psys) {
@@ -199,8 +199,8 @@ static void deformVerts(ModifierData *md, Object *ob,
* updates is coded */
#if 0
static void deformVertsEM(
- ModifierData *md, Object *ob, EditMesh *editData,
- DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
+ ModifierData *md, Object *ob, EditMesh *editData,
+ DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
{
DerivedMesh *dm = derivedData;
@@ -218,15 +218,15 @@ ModifierTypeInfo modifierType_ParticleSystem = {
/* structName */ "ParticleSystemModifierData",
/* structSize */ sizeof(ParticleSystemModifierData),
/* type */ eModifierTypeType_OnlyDeform,
- /* flags */ eModifierTypeFlag_AcceptsMesh
- | eModifierTypeFlag_SupportsMapping
- | eModifierTypeFlag_UsesPointCache /*
- | eModifierTypeFlag_SupportsEditmode
- | eModifierTypeFlag_EnableInEditmode */,
+ /* flags */ eModifierTypeFlag_AcceptsMesh |
+ eModifierTypeFlag_SupportsMapping |
+ eModifierTypeFlag_UsesPointCache /* |
+ eModifierTypeFlag_SupportsEditmode |
+ eModifierTypeFlag_EnableInEditmode */,
/* copyData */ copyData,
/* deformVerts */ deformVerts,
- /* deformVertsEM */ NULL /* deformVertsEM */ ,
+ /* deformVertsEM */ NULL,
/* deformMatrices */ NULL,
/* deformMatricesEM */ NULL,
/* applyModifier */ NULL,
diff --git a/source/blender/modifiers/intern/MOD_remesh.c b/source/blender/modifiers/intern/MOD_remesh.c
index d408e5a3bee..741014ebc7f 100644
--- a/source/blender/modifiers/intern/MOD_remesh.c
+++ b/source/blender/modifiers/intern/MOD_remesh.c
@@ -50,7 +50,7 @@
static void initData(ModifierData *md)
{
- RemeshModifierData *rmd = (RemeshModifierData*) md;
+ RemeshModifierData *rmd = (RemeshModifierData *) md;
rmd->scale = 0.9;
rmd->depth = 4;
@@ -62,8 +62,8 @@ static void initData(ModifierData *md)
static void copyData(ModifierData *md, ModifierData *target)
{
- RemeshModifierData *rmd = (RemeshModifierData*) md;
- RemeshModifierData *trmd = (RemeshModifierData*) target;
+ RemeshModifierData *rmd = (RemeshModifierData *) md;
+ RemeshModifierData *trmd = (RemeshModifierData *) target;
trmd->threshold = rmd->threshold;
trmd->scale = rmd->scale;
@@ -79,11 +79,11 @@ static void init_dualcon_mesh(DualConInput *mesh, DerivedMesh *dm)
{
memset(mesh, 0, sizeof(DualConInput));
- mesh->co = (void*)dm->getVertArray(dm);
+ mesh->co = (void *)dm->getVertArray(dm);
mesh->co_stride = sizeof(MVert);
mesh->totco = dm->getNumVerts(dm);
- mesh->faces = (void*)dm->getTessFaceArray(dm);
+ mesh->faces = (void *)dm->getTessFaceArray(dm);
mesh->face_stride = sizeof(MFace);
mesh->totface = dm->getNumTessFaces(dm);
@@ -103,10 +103,12 @@ static void *dualcon_alloc_output(int totvert, int totquad)
DualConOutput *output;
if (!(output = MEM_callocN(sizeof(DualConOutput),
- "DualConOutput")))
+ "DualConOutput")))
+ {
return NULL;
+ }
- output->dm = CDDM_new(totvert, 0, 0, 4*totquad, totquad);
+ output->dm = CDDM_new(totvert, 0, 0, 4 * totquad, totquad);
return output;
}
@@ -143,10 +145,10 @@ static void dualcon_add_quad(void *output_v, const int vert_indices[4])
}
static DerivedMesh *applyModifier(ModifierData *md,
- Object *UNUSED(ob),
- DerivedMesh *dm,
- int UNUSED(useRenderParams),
- int UNUSED(isFinalCalc))
+ Object *UNUSED(ob),
+ DerivedMesh *dm,
+ int UNUSED(useRenderParams),
+ int UNUSED(isFinalCalc))
{
RemeshModifierData *rmd;
DualConOutput *output;
@@ -157,35 +159,35 @@ static DerivedMesh *applyModifier(ModifierData *md,
DM_ensure_tessface(dm); /* BMESH - UNTIL MODIFIER IS UPDATED FOR MPoly */
- rmd = (RemeshModifierData*)md;
+ rmd = (RemeshModifierData *)md;
init_dualcon_mesh(&input, dm);
if (rmd->flag & MOD_REMESH_FLOOD_FILL)
flags |= DUALCON_FLOOD_FILL;
- switch(rmd->mode) {
- case MOD_REMESH_CENTROID:
- mode = DUALCON_CENTROID;
- break;
- case MOD_REMESH_MASS_POINT:
- mode = DUALCON_MASS_POINT;
- break;
- case MOD_REMESH_SHARP_FEATURES:
- mode = DUALCON_SHARP_FEATURES;
- break;
+ switch (rmd->mode) {
+ case MOD_REMESH_CENTROID:
+ mode = DUALCON_CENTROID;
+ break;
+ case MOD_REMESH_MASS_POINT:
+ mode = DUALCON_MASS_POINT;
+ break;
+ case MOD_REMESH_SHARP_FEATURES:
+ mode = DUALCON_SHARP_FEATURES;
+ break;
}
output = dualcon(&input,
- dualcon_alloc_output,
- dualcon_add_vert,
- dualcon_add_quad,
- flags,
- mode,
- rmd->threshold,
- rmd->hermite_num,
- rmd->scale,
- rmd->depth);
+ dualcon_alloc_output,
+ dualcon_add_vert,
+ dualcon_add_quad,
+ flags,
+ mode,
+ rmd->threshold,
+ rmd->hermite_num,
+ rmd->scale,
+ rmd->depth);
result = output->dm;
MEM_freeN(output);
@@ -197,9 +199,9 @@ static DerivedMesh *applyModifier(ModifierData *md,
#else /* !WITH_MOD_REMESH */
static DerivedMesh *applyModifier(ModifierData *UNUSED(md), Object *UNUSED(ob),
- DerivedMesh *derivedData,
- int UNUSED(useRenderParams),
- int UNUSED(isFinalCalc))
+ DerivedMesh *derivedData,
+ int UNUSED(useRenderParams),
+ int UNUSED(isFinalCalc))
{
return derivedData;
}
@@ -211,7 +213,8 @@ ModifierTypeInfo modifierType_Remesh = {
/* structName */ "RemeshModifierData",
/* structSize */ sizeof(RemeshModifierData),
/* type */ eModifierTypeType_Nonconstructive,
- /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsEditmode,
+ /* flags */ eModifierTypeFlag_AcceptsMesh |
+ eModifierTypeFlag_SupportsEditmode,
/* copyData */ copyData,
/* deformVerts */ NULL,
/* deformMatrices */ NULL,
diff --git a/source/blender/modifiers/intern/MOD_screw.c b/source/blender/modifiers/intern/MOD_screw.c
index ae21d3d66ad..e6cff1c042f 100644
--- a/source/blender/modifiers/intern/MOD_screw.c
+++ b/source/blender/modifiers/intern/MOD_screw.c
@@ -59,8 +59,8 @@ typedef struct ScrewVertConnect {
} ScrewVertConnect;
typedef struct ScrewVertIter {
- ScrewVertConnect * v_array;
- ScrewVertConnect * v_poin;
+ ScrewVertConnect *v_array;
+ ScrewVertConnect *v_poin;
int v;
int v_other;
MEdge *e;
@@ -78,8 +78,8 @@ static void screwvert_iter_init(ScrewVertIter *iter, ScrewVertConnect *array, in
iter->e = iter->v_poin->e[!dir];
}
else {
- iter->v_poin= NULL;
- iter->e= NULL;
+ iter->v_poin = NULL;
+ iter->e = NULL;
}
}
@@ -87,82 +87,82 @@ static void screwvert_iter_init(ScrewVertIter *iter, ScrewVertConnect *array, in
static void screwvert_iter_step(ScrewVertIter *iter)
{
if (iter->v_poin->v[0] == iter->v_other) {
- iter->v_other= iter->v;
- iter->v= iter->v_poin->v[1];
+ iter->v_other = iter->v;
+ iter->v = iter->v_poin->v[1];
}
else if (iter->v_poin->v[1] == iter->v_other) {
- iter->v_other= iter->v;
- iter->v= iter->v_poin->v[0];
+ iter->v_other = iter->v;
+ iter->v = iter->v_poin->v[0];
}
- if (iter->v >= 0) {
- iter->v_poin= &iter->v_array[iter->v];
- iter->e= iter->v_poin->e[(iter->v_poin->e[0] == iter->e)];
+ if (iter->v >= 0) {
+ iter->v_poin = &iter->v_array[iter->v];
+ iter->e = iter->v_poin->e[(iter->v_poin->e[0] == iter->e)];
}
else {
- iter->e= NULL;
- iter->v_poin= NULL;
+ iter->e = NULL;
+ iter->v_poin = NULL;
}
}
static void initData(ModifierData *md)
{
- ScrewModifierData *ltmd= (ScrewModifierData*) md;
- ltmd->ob_axis= NULL;
- ltmd->angle= M_PI * 2.0;
- ltmd->axis= 2;
- ltmd->flag= 0;
- ltmd->steps= 16;
- ltmd->render_steps= 16;
- ltmd->iter= 1;
+ ScrewModifierData *ltmd = (ScrewModifierData *) md;
+ ltmd->ob_axis = NULL;
+ ltmd->angle = M_PI * 2.0;
+ ltmd->axis = 2;
+ ltmd->flag = 0;
+ ltmd->steps = 16;
+ ltmd->render_steps = 16;
+ ltmd->iter = 1;
}
static void copyData(ModifierData *md, ModifierData *target)
{
- ScrewModifierData *sltmd= (ScrewModifierData*) md;
- ScrewModifierData *tltmd= (ScrewModifierData*) target;
+ ScrewModifierData *sltmd = (ScrewModifierData *) md;
+ ScrewModifierData *tltmd = (ScrewModifierData *) target;
- tltmd->ob_axis= sltmd->ob_axis;
- tltmd->angle= sltmd->angle;
- tltmd->axis= sltmd->axis;
- tltmd->flag= sltmd->flag;
- tltmd->steps= sltmd->steps;
- tltmd->render_steps= sltmd->render_steps;
- tltmd->screw_ofs= sltmd->screw_ofs;
- tltmd->iter= sltmd->iter;
+ tltmd->ob_axis = sltmd->ob_axis;
+ tltmd->angle = sltmd->angle;
+ tltmd->axis = sltmd->axis;
+ tltmd->flag = sltmd->flag;
+ tltmd->steps = sltmd->steps;
+ tltmd->render_steps = sltmd->render_steps;
+ tltmd->screw_ofs = sltmd->screw_ofs;
+ tltmd->iter = sltmd->iter;
}
static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
- DerivedMesh *derivedData,
- int useRenderParams,
- int UNUSED(isFinalCalc))
+ DerivedMesh *derivedData,
+ int useRenderParams,
+ int UNUSED(isFinalCalc))
{
- DerivedMesh *dm= derivedData;
+ DerivedMesh *dm = derivedData;
DerivedMesh *result;
- ScrewModifierData *ltmd= (ScrewModifierData*) md;
+ ScrewModifierData *ltmd = (ScrewModifierData *) md;
int *origindex;
- int mpoly_index=0;
+ int mpoly_index = 0;
int step;
int i, j;
unsigned int i1, i2;
- int step_tot= useRenderParams ? ltmd->render_steps : ltmd->steps;
+ int step_tot = useRenderParams ? ltmd->render_steps : ltmd->steps;
const int do_flip = ltmd->flag & MOD_SCREW_NORMAL_FLIP ? 1 : 0;
- int maxVerts=0, maxEdges=0, maxPolys=0;
- const unsigned int totvert= dm->getNumVerts(dm);
- const unsigned int totedge= dm->getNumEdges(dm);
-
- char axis_char= 'X', close;
- float angle= ltmd->angle;
- float screw_ofs= ltmd->screw_ofs;
- float axis_vec[3]= {0.0f, 0.0f, 0.0f};
+ int maxVerts = 0, maxEdges = 0, maxPolys = 0;
+ const unsigned int totvert = dm->getNumVerts(dm);
+ const unsigned int totedge = dm->getNumEdges(dm);
+
+ char axis_char = 'X', close;
+ float angle = ltmd->angle;
+ float screw_ofs = ltmd->screw_ofs;
+ float axis_vec[3] = {0.0f, 0.0f, 0.0f};
float tmp_vec1[3], tmp_vec2[3];
float mat3[3][3];
float mtx_tx[4][4]; /* transform the coords by an object relative to this objects transformation */
float mtx_tx_inv[4][4]; /* inverted */
float mtx_tmp_a[4][4];
- int vc_tot_linked= 0;
+ int vc_tot_linked = 0;
short other_axis_1, other_axis_2;
float *tmpf1, *tmpf2;
@@ -173,28 +173,28 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
MEdge *medge_orig, *med_orig, *med_new, *med_new_firstloop, *medge_new;
MVert *mvert_new, *mvert_orig, *mv_orig, *mv_new, *mv_new_base;
- ScrewVertConnect *vc, *vc_tmp, *vert_connect= NULL;
+ ScrewVertConnect *vc, *vc_tmp, *vert_connect = NULL;
/* don't do anything? */
if (!totvert)
return CDDM_from_template(dm, 0, 0, 0, 0, 0);
- switch(ltmd->axis) {
- case 0:
- other_axis_1=1;
- other_axis_2=2;
- break;
- case 1:
- other_axis_1=0;
- other_axis_2=2;
- break;
- default: /* 2, use default to quiet warnings */
- other_axis_1=0;
- other_axis_2=1;
- break;
+ switch (ltmd->axis) {
+ case 0:
+ other_axis_1 = 1;
+ other_axis_2 = 2;
+ break;
+ case 1:
+ other_axis_1 = 0;
+ other_axis_2 = 2;
+ break;
+ default: /* 2, use default to quiet warnings */
+ other_axis_1 = 0;
+ other_axis_2 = 1;
+ break;
}
- axis_vec[ltmd->axis]= 1.0f;
+ axis_vec[ltmd->axis] = 1.0f;
if (ltmd->ob_axis) {
/* calc the matrix relative to the axis object */
@@ -212,23 +212,23 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
float totlen = len_v3(mtx_tx[3]);
if (totlen != 0.0f) {
- float zero[3]={0.0f, 0.0f, 0.0f};
+ float zero[3] = {0.0f, 0.0f, 0.0f};
float cp[3];
- screw_ofs= closest_to_line_v3(cp, mtx_tx[3], zero, axis_vec);
+ screw_ofs = closest_to_line_v3(cp, mtx_tx[3], zero, axis_vec);
}
else {
- screw_ofs= 0.0f;
+ screw_ofs = 0.0f;
}
}
/* angle */
-#if 0 // cant incluide this, not predictable enough, though quite fun,.
+#if 0 // cant incluide this, not predictable enough, though quite fun,.
if (ltmd->flag & MOD_SCREW_OBJECT_ANGLE) {
float mtx3_tx[3][3];
copy_m3_m4(mtx3_tx, mtx_tx);
- float vec[3] = {0,1,0};
+ float vec[3] = {0, 1, 0};
float cross1[3];
float cross2[3];
cross_v3_v3v3(cross1, vec, axis_vec);
@@ -243,13 +243,13 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
cross_v3_v3v3(c2, axis_vec, c1);
- angle= angle_v3v3(cross1, c2);
+ angle = angle_v3v3(cross1, c2);
cross_v3_v3v3(axis_tmp, cross1, c2);
normalize_v3(axis_tmp);
if (len_v3v3(axis_tmp, axis_vec) > 1.0f)
- angle= -angle;
+ angle = -angle;
}
}
@@ -261,7 +261,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
/* useful to be able to use the axis vec in some cases still */
zero_v3(axis_vec);
- axis_vec[ltmd->axis]= 1.0f;
+ axis_vec[ltmd->axis] = 1.0f;
}
/* apply the multiplier */
@@ -273,38 +273,40 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
/* will the screw be closed?
* Note! smaller then FLT_EPSILON*100 gives problems with float precision so its never closed. */
- if (fabsf(screw_ofs) <= (FLT_EPSILON*100.0f) && fabsf(fabsf(angle) - ((float)M_PI * 2.0f)) <= (FLT_EPSILON*100.0f)) {
- close= 1;
+ if (fabsf(screw_ofs) <= (FLT_EPSILON * 100.0f) &&
+ fabsf(fabsf(angle) - ((float)M_PI * 2.0f)) <= (FLT_EPSILON * 100.0f))
+ {
+ close = 1;
step_tot--;
- if (step_tot < 3) step_tot= 3;
+ if (step_tot < 3) step_tot = 3;
- maxVerts = totvert * step_tot; /* -1 because we're joining back up */
- maxEdges = (totvert * step_tot) + /* these are the edges between new verts */
- (totedge * step_tot); /* -1 because vert edges join */
- maxPolys = totedge * step_tot;
+ maxVerts = totvert * step_tot; /* -1 because we're joining back up */
+ maxEdges = (totvert * step_tot) + /* these are the edges between new verts */
+ (totedge * step_tot); /* -1 because vert edges join */
+ maxPolys = totedge * step_tot;
- screw_ofs= 0.0f;
+ screw_ofs = 0.0f;
}
else {
- close= 0;
- if (step_tot < 3) step_tot= 3;
+ close = 0;
+ if (step_tot < 3) step_tot = 3;
- maxVerts = totvert * step_tot; /* -1 because we're joining back up */
- maxEdges = (totvert * (step_tot-1)) + /* these are the edges between new verts */
- (totedge * step_tot); /* -1 because vert edges join */
- maxPolys = totedge * (step_tot-1);
+ maxVerts = totvert * step_tot; /* -1 because we're joining back up */
+ maxEdges = (totvert * (step_tot - 1)) + /* these are the edges between new verts */
+ (totedge * step_tot); /* -1 because vert edges join */
+ maxPolys = totedge * (step_tot - 1);
}
- result= CDDM_from_template(dm, maxVerts, maxEdges, 0, maxPolys * 4, maxPolys);
+ result = CDDM_from_template(dm, maxVerts, maxEdges, 0, maxPolys * 4, maxPolys);
/* copy verts from mesh */
- mvert_orig = dm->getVertArray(dm);
- medge_orig = dm->getEdgeArray(dm);
+ mvert_orig = dm->getVertArray(dm);
+ medge_orig = dm->getEdgeArray(dm);
- mvert_new = result->getVertArray(result);
- mpoly_new = result->getPolyArray(result);
- mloop_new = result->getLoopArray(result);
- medge_new = result->getEdgeArray(result);
+ mvert_new = result->getVertArray(result);
+ mpoly_new = result->getPolyArray(result);
+ mloop_new = result->getLoopArray(result);
+ medge_new = result->getEdgeArray(result);
if (!CustomData_has_layer(&result->polyData, CD_ORIGINDEX)) {
CustomData_add_layer(&result->polyData, CD_ORIGINDEX, CD_CALLOC, NULL, maxPolys);
@@ -320,17 +322,17 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
/* Set the locations of the first set of verts */
- mv_new= mvert_new;
- mv_orig= mvert_orig;
+ mv_new = mvert_new;
+ mv_orig = mvert_orig;
/* Copy the first set of edges */
- med_orig= medge_orig;
- med_new= medge_new;
- for (i=0; i < totedge; i++, med_orig++, med_new++) {
- med_new->v1= med_orig->v1;
- med_new->v2= med_orig->v2;
- med_new->crease= med_orig->crease;
- med_new->flag= med_orig->flag & ~ME_LOOSEEDGE;
+ med_orig = medge_orig;
+ med_new = medge_new;
+ for (i = 0; i < totedge; i++, med_orig++, med_new++) {
+ med_new->v1 = med_orig->v1;
+ med_new->v2 = med_orig->v2;
+ med_new->crease = med_orig->crease;
+ med_new->flag = med_orig->flag & ~ME_LOOSEEDGE;
}
if (ltmd->flag & MOD_SCREW_NORMAL_CALC) {
@@ -358,14 +360,14 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
* This makes the modifier faster with one less alloc.
*/
- vert_connect= MEM_mallocN(sizeof(ScrewVertConnect) * totvert, "ScrewVertConnect");
+ vert_connect = MEM_mallocN(sizeof(ScrewVertConnect) * totvert, "ScrewVertConnect");
//vert_connect= (ScrewVertConnect *) &medge_new[totvert]; /* skip the first slice of verts */
- vc= vert_connect;
+ vc = vert_connect;
/* Copy Vert Locations */
/* - We can do this in a later loop - only do here if no normal calc */
if (!totedge) {
- for (i=0; i < totvert; i++, mv_orig++, mv_new++) {
+ for (i = 0; i < totvert; i++, mv_orig++, mv_new++) {
copy_v3_v3(mv_new->co, mv_orig->co);
normalize_v3_v3(vc->no, mv_new->co); /* no edges- this is really a dummy normal */
}
@@ -373,93 +375,95 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
else {
/*printf("\n\n\n\n\nStarting Modifier\n");*/
/* set edge users */
- med_new= medge_new;
- mv_new= mvert_new;
+ med_new = medge_new;
+ mv_new = mvert_new;
if (ltmd->ob_axis) {
/*mtx_tx is initialized early on */
- for (i=0; i < totvert; i++, mv_new++, mv_orig++, vc++) {
- vc->co[0]= mv_new->co[0]= mv_orig->co[0];
- vc->co[1]= mv_new->co[1]= mv_orig->co[1];
- vc->co[2]= mv_new->co[2]= mv_orig->co[2];
+ for (i = 0; i < totvert; i++, mv_new++, mv_orig++, vc++) {
+ vc->co[0] = mv_new->co[0] = mv_orig->co[0];
+ vc->co[1] = mv_new->co[1] = mv_orig->co[1];
+ vc->co[2] = mv_new->co[2] = mv_orig->co[2];
- vc->flag= 0;
- vc->e[0]= vc->e[1]= NULL;
- vc->v[0]= vc->v[1]= -1;
+ vc->flag = 0;
+ vc->e[0] = vc->e[1] = NULL;
+ vc->v[0] = vc->v[1] = -1;
mul_m4_v3(mtx_tx, vc->co);
/* length in 2d, don't sqrt because this is only for comparison */
- vc->dist = vc->co[other_axis_1]*vc->co[other_axis_1] +
- vc->co[other_axis_2]*vc->co[other_axis_2];
+ vc->dist = vc->co[other_axis_1] * vc->co[other_axis_1] +
+ vc->co[other_axis_2] * vc->co[other_axis_2];
/* printf("location %f %f %f -- %f\n", vc->co[0], vc->co[1], vc->co[2], vc->dist);*/
}
}
else {
- for (i=0; i < totvert; i++, mv_new++, mv_orig++, vc++) {
- vc->co[0]= mv_new->co[0]= mv_orig->co[0];
- vc->co[1]= mv_new->co[1]= mv_orig->co[1];
- vc->co[2]= mv_new->co[2]= mv_orig->co[2];
+ for (i = 0; i < totvert; i++, mv_new++, mv_orig++, vc++) {
+ vc->co[0] = mv_new->co[0] = mv_orig->co[0];
+ vc->co[1] = mv_new->co[1] = mv_orig->co[1];
+ vc->co[2] = mv_new->co[2] = mv_orig->co[2];
- vc->flag= 0;
- vc->e[0]= vc->e[1]= NULL;
- vc->v[0]= vc->v[1]= -1;
+ vc->flag = 0;
+ vc->e[0] = vc->e[1] = NULL;
+ vc->v[0] = vc->v[1] = -1;
/* length in 2d, don't sqrt because this is only for comparison */
- vc->dist = vc->co[other_axis_1]*vc->co[other_axis_1] +
- vc->co[other_axis_2]*vc->co[other_axis_2];
+ vc->dist = vc->co[other_axis_1] * vc->co[other_axis_1] +
+ vc->co[other_axis_2] * vc->co[other_axis_2];
/* printf("location %f %f %f -- %f\n", vc->co[0], vc->co[1], vc->co[2], vc->dist);*/
}
}
/* this loop builds connectivity info for verts */
- for (i=0; i<totedge; i++, med_new++) {
- vc= &vert_connect[med_new->v1];
+ for (i = 0; i < totedge; i++, med_new++) {
+ vc = &vert_connect[med_new->v1];
if (vc->v[0] == -1) { /* unused */
- vc->v[0]= med_new->v2;
- vc->e[0]= med_new;
+ vc->v[0] = med_new->v2;
+ vc->e[0] = med_new;
}
else if (vc->v[1] == -1) {
- vc->v[1]= med_new->v2;
- vc->e[1]= med_new;
+ vc->v[1] = med_new->v2;
+ vc->e[1] = med_new;
}
else {
- vc->v[0]= vc->v[1]= -2; /* erro value - don't use, 3 edges on vert */
+ vc->v[0] = vc->v[1] = -2; /* erro value - don't use, 3 edges on vert */
}
- vc= &vert_connect[med_new->v2];
+ vc = &vert_connect[med_new->v2];
/* same as above but swap v1/2 */
if (vc->v[0] == -1) { /* unused */
- vc->v[0]= med_new->v1;
- vc->e[0]= med_new;
+ vc->v[0] = med_new->v1;
+ vc->e[0] = med_new;
}
else if (vc->v[1] == -1) {
- vc->v[1]= med_new->v1;
- vc->e[1]= med_new;
+ vc->v[1] = med_new->v1;
+ vc->e[1] = med_new;
}
else {
- vc->v[0]= vc->v[1]= -2; /* erro value - don't use, 3 edges on vert */
+ vc->v[0] = vc->v[1] = -2; /* erro value - don't use, 3 edges on vert */
}
}
/* find the first vert */
- vc= vert_connect;
- for (i=0; i < totvert; i++, vc++) {
+ vc = vert_connect;
+ for (i = 0; i < totvert; i++, vc++) {
/* Now do search for connected verts, order all edges and flip them
* so resulting faces are flipped the right way */
- vc_tot_linked= 0; /* count the number of linked verts for this loop */
+ vc_tot_linked = 0; /* count the number of linked verts for this loop */
if (vc->flag == 0) {
- int v_best=-1, ed_loop_closed=0; /* vert and vert new */
+ int v_best = -1, ed_loop_closed = 0; /* vert and vert new */
ScrewVertIter lt_iter;
- int ed_loop_flip= 0; /* compiler complains if not initialized, but it should be initialized below */
- float fl= -1.0f;
+ float fl = -1.0f;
+
+ /* compiler complains if not initialized, but it should be initialized below */
+ int ed_loop_flip = 0;
/*printf("Loop on connected vert: %i\n", i);*/
- for (j=0; j<2; j++) {
+ for (j = 0; j < 2; j++) {
/*printf("\tSide: %i\n", j);*/
screwvert_iter_init(&lt_iter, vert_connect, i, j);
if (j == 1) {
@@ -470,15 +474,15 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
if (lt_iter.v_poin->flag) {
/*printf("\t\t\tBreaking Found end\n");*/
//endpoints[0]= endpoints[1]= -1;
- ed_loop_closed= 1; /* circle */
+ ed_loop_closed = 1; /* circle */
break;
}
- lt_iter.v_poin->flag= 1;
+ lt_iter.v_poin->flag = 1;
vc_tot_linked++;
/*printf("Testing 2 floats %f : %f\n", fl, lt_iter.v_poin->dist);*/
if (fl <= lt_iter.v_poin->dist) {
- fl= lt_iter.v_poin->dist;
- v_best= lt_iter.v;
+ fl = lt_iter.v_poin->dist;
+ v_best = lt_iter.v;
/*printf("\t\t\tVERT BEST: %i\n", v_best);*/
}
screwvert_iter_step(&lt_iter);
@@ -495,13 +499,13 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
/*printf("Done Looking - vc_tot_linked: %i\n", vc_tot_linked);*/
- if (vc_tot_linked>1) {
+ if (vc_tot_linked > 1) {
float vf_1, vf_2, vf_best;
- vc_tmp= &vert_connect[v_best];
+ vc_tmp = &vert_connect[v_best];
- tmpf1= vert_connect[vc_tmp->v[0]].co;
- tmpf2= vert_connect[vc_tmp->v[1]].co;
+ tmpf1 = vert_connect[vc_tmp->v[0]].co;
+ tmpf2 = vert_connect[vc_tmp->v[1]].co;
/* edge connects on each side! */
@@ -509,15 +513,15 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
/*printf("Verts on each side (%i %i)\n", vc_tmp->v[0], vc_tmp->v[1]);*/
/* find out which is higher */
- vf_1= tmpf1[ltmd->axis];
- vf_2= tmpf2[ltmd->axis];
- vf_best= vc_tmp->co[ltmd->axis];
+ vf_1 = tmpf1[ltmd->axis];
+ vf_2 = tmpf2[ltmd->axis];
+ vf_best = vc_tmp->co[ltmd->axis];
if (vf_1 < vf_best && vf_best < vf_2) {
- ed_loop_flip= 0;
+ ed_loop_flip = 0;
}
else if (vf_1 > vf_best && vf_best > vf_2) {
- ed_loop_flip= 1;
+ ed_loop_flip = 1;
}
else {
/* not so simple to work out which edge is higher */
@@ -527,20 +531,20 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
normalize_v3(tmp_vec2);
if (tmp_vec1[ltmd->axis] < tmp_vec2[ltmd->axis]) {
- ed_loop_flip= 1;
+ ed_loop_flip = 1;
}
else {
- ed_loop_flip= 0;
+ ed_loop_flip = 0;
}
}
}
else if (vc_tmp->v[0] >= 0) { /*vertex only connected on 1 side */
/*printf("Verts on ONE side (%i %i)\n", vc_tmp->v[0], vc_tmp->v[1]);*/
if (tmpf1[ltmd->axis] < vc_tmp->co[ltmd->axis]) { /* best is above */
- ed_loop_flip= 1;
+ ed_loop_flip = 1;
}
else { /* best is below or even... in even case we cant know whet to do. */
- ed_loop_flip= 0;
+ ed_loop_flip = 0;
}
}
@@ -557,31 +561,31 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
* note: flip is now done at face level so copying vgroup slizes is easier */
#if 0
if (do_flip)
- ed_loop_flip= !ed_loop_flip;
+ ed_loop_flip = !ed_loop_flip;
#endif
if (angle < 0.0f)
- ed_loop_flip= !ed_loop_flip;
+ ed_loop_flip = !ed_loop_flip;
/* if its closed, we only need 1 loop */
- for (j=ed_loop_closed; j<2; j++) {
+ for (j = ed_loop_closed; j < 2; j++) {
/*printf("Ordering Side J %i\n", j);*/
screwvert_iter_init(&lt_iter, vert_connect, v_best, j);
/*printf("\n\nStarting - Loop\n");*/
- lt_iter.v_poin->flag= 1; /* so a non loop will traverse the other side */
+ lt_iter.v_poin->flag = 1; /* so a non loop will traverse the other side */
/* If this is the vert off the best vert and
* the best vert has 2 edges connected too it
* then swap the flip direction */
if (j == 1 && (vc_tmp->v[0] > -1) && (vc_tmp->v[1] > -1))
- ed_loop_flip= !ed_loop_flip;
+ ed_loop_flip = !ed_loop_flip;
while (lt_iter.v_poin && lt_iter.v_poin->flag != 2) {
/*printf("\tOrdering Vert V %i\n", lt_iter.v);*/
- lt_iter.v_poin->flag= 2;
+ lt_iter.v_poin->flag = 2;
if (lt_iter.e) {
if (lt_iter.v == lt_iter.e->v1) {
if (ed_loop_flip == 0) {
@@ -589,8 +593,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
SWAP(unsigned int, lt_iter.e->v1, lt_iter.e->v2);
}
/* else {
- printf("\t\t\tFlipping Not 0\n");
- }*/
+ printf("\t\t\tFlipping Not 0\n");
+ }*/
}
else if (lt_iter.v == lt_iter.e->v2) {
if (ed_loop_flip == 1) {
@@ -598,16 +602,16 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
SWAP(unsigned int, lt_iter.e->v1, lt_iter.e->v2);
}
/* else {
- printf("\t\t\tFlipping Not 1\n");
- }*/
+ printf("\t\t\tFlipping Not 1\n");
+ }*/
}
/* else {
- printf("\t\tIncorrect edge topology");
- }*/
+ printf("\t\tIncorrect edge topology");
+ }*/
}
/* else {
- printf("\t\tNo Edge at this point\n");
- }*/
+ printf("\t\tNo Edge at this point\n");
+ }*/
screwvert_iter_step(&lt_iter);
}
}
@@ -676,23 +680,23 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
}
}
else {
- mv_orig= mvert_orig;
- mv_new= mvert_new;
+ mv_orig = mvert_orig;
+ mv_new = mvert_new;
- for (i=0; i < totvert; i++, mv_new++, mv_orig++) {
+ for (i = 0; i < totvert; i++, mv_new++, mv_orig++) {
copy_v3_v3(mv_new->co, mv_orig->co);
}
}
/* done with edge connectivity based normal flipping */
/* Add Faces */
- for (step=1; step < step_tot; step++) {
- const int varray_stride= totvert * step;
+ for (step = 1; step < step_tot; step++) {
+ const int varray_stride = totvert * step;
float step_angle;
float nor_tx[3];
float mat[4][4];
/* Rotation Matrix */
- step_angle= (angle / (step_tot - (!close))) * step;
+ step_angle = (angle / (step_tot - (!close))) * step;
if (ltmd->ob_axis) {
axis_angle_to_mat3(mat3, axis_vec, step_angle);
@@ -705,15 +709,15 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
}
if (screw_ofs)
- madd_v3_v3fl(mat[3], axis_vec, screw_ofs * ((float)step / (float)(step_tot-1)));
+ madd_v3_v3fl(mat[3], axis_vec, screw_ofs * ((float)step / (float)(step_tot - 1)));
/* copy a slice */
DM_copy_vert_data(dm, result, 0, varray_stride, totvert);
- mv_new_base= mvert_new;
- mv_new= &mvert_new[varray_stride]; /* advance to the next slice */
+ mv_new_base = mvert_new;
+ mv_new = &mvert_new[varray_stride]; /* advance to the next slice */
- for (j=0; j<totvert; j++, mv_new_base++, mv_new++) {
+ for (j = 0; j < totvert; j++, mv_new_base++, mv_new++) {
/* set normal */
if (vert_connect) {
mul_v3_m3v3(nor_tx, mat3, vert_connect[j].no);
@@ -740,9 +744,9 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
}
/* add the new edge */
- med_new->v1= varray_stride + j;
- med_new->v2= med_new->v1 - totvert;
- med_new->flag= ME_EDGEDRAW|ME_EDGERENDER;
+ med_new->v1 = varray_stride + j;
+ med_new->v2 = med_new->v1 - totvert;
+ med_new->flag = ME_EDGEDRAW | ME_EDGERENDER;
med_new++;
}
}
@@ -750,34 +754,34 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
/* we can avoid if using vert alloc trick */
if (vert_connect) {
MEM_freeN(vert_connect);
- vert_connect= NULL;
+ vert_connect = NULL;
}
if (close) {
/* last loop of edges, previous loop dosnt account for the last set of edges */
- const int varray_stride= (step_tot - 1) * totvert;
+ const int varray_stride = (step_tot - 1) * totvert;
- for (i=0; i<totvert; i++) {
- med_new->v1= i;
- med_new->v2= varray_stride + i;
- med_new->flag= ME_EDGEDRAW|ME_EDGERENDER;
+ for (i = 0; i < totvert; i++) {
+ med_new->v1 = i;
+ med_new->v2 = varray_stride + i;
+ med_new->flag = ME_EDGEDRAW | ME_EDGERENDER;
med_new++;
}
}
- mp_new= mpoly_new;
- ml_new= mloop_new;
- med_new_firstloop= medge_new;
+ mp_new = mpoly_new;
+ ml_new = mloop_new;
+ med_new_firstloop = medge_new;
/* more of an offset in this case */
edge_offset = totedge + (totvert * (step_tot - (close ? 0 : 1)));
- for (i=0; i < totedge; i++, med_new_firstloop++) {
+ for (i = 0; i < totedge; i++, med_new_firstloop++) {
/* for each edge, make a cylinder of quads */
- i1= med_new_firstloop->v1;
- i2= med_new_firstloop->v2;
+ i1 = med_new_firstloop->v1;
+ i2 = med_new_firstloop->v2;
- for (step=0; step < step_tot-1; step++) {
+ for (step = 0; step < step_tot - 1; step++) {
/* new face */
if (do_flip) {
@@ -806,18 +810,18 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
mp_new->loopstart = mpoly_index * 4;
mp_new->totloop = 4;
- mp_new->flag= ME_SMOOTH;
- origindex[mpoly_index]= ORIGINDEX_NONE;
+ mp_new->flag = ME_SMOOTH;
+ origindex[mpoly_index] = ORIGINDEX_NONE;
mp_new++;
ml_new += 4;
mpoly_index++;
/* new vertical edge */
if (step) { /* The first set is already dome */
- med_new->v1= i1;
- med_new->v2= i2;
- med_new->flag= med_new_firstloop->flag;
- med_new->crease= med_new_firstloop->crease;
+ med_new->v1 = i1;
+ med_new->v2 = i2;
+ med_new->flag = med_new_firstloop->flag;
+ med_new->crease = med_new_firstloop->crease;
med_new++;
}
i1 += totvert;
@@ -851,18 +855,18 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
mp_new->loopstart = mpoly_index * 4;
mp_new->totloop = 4;
- mp_new->flag= ME_SMOOTH;
- origindex[mpoly_index]= ORIGINDEX_NONE;
+ mp_new->flag = ME_SMOOTH;
+ origindex[mpoly_index] = ORIGINDEX_NONE;
mp_new++;
ml_new += 4;
mpoly_index++;
}
/* new vertical edge */
- med_new->v1= i1;
- med_new->v2= i2;
- med_new->flag= med_new_firstloop->flag & ~ME_LOOSEEDGE;
- med_new->crease= med_new_firstloop->crease;
+ med_new->v1 = i1;
+ med_new->v2 = i2;
+ med_new->flag = med_new_firstloop->flag & ~ME_LOOSEEDGE;
+ med_new->crease = med_new_firstloop->crease;
med_new++;
}
@@ -871,7 +875,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
{
i = 0;
printf("\n");
- for ( ; i < maxPolys * 4; i += 4) {
+ for (; i < maxPolys * 4; i += 4) {
int ii;
ml_new = mloop_new + i;
ii = findEd(medge_new, maxEdges, ml_new[0].v, ml_new[1].v);
@@ -904,37 +908,37 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
static void updateDepgraph(ModifierData *md, DagForest *forest,
- struct Scene *UNUSED(scene),
- Object *UNUSED(ob),
- DagNode *obNode)
+ struct Scene *UNUSED(scene),
+ Object *UNUSED(ob),
+ DagNode *obNode)
{
- ScrewModifierData *ltmd= (ScrewModifierData*) md;
+ ScrewModifierData *ltmd = (ScrewModifierData *) md;
if (ltmd->ob_axis) {
- DagNode *curNode= dag_get_node(forest, ltmd->ob_axis);
+ DagNode *curNode = dag_get_node(forest, ltmd->ob_axis);
dag_add_relation(forest, curNode, obNode,
- DAG_RL_DATA_DATA | DAG_RL_OB_DATA,
- "Screw Modifier");
+ DAG_RL_DATA_DATA | DAG_RL_OB_DATA,
+ "Screw Modifier");
}
}
static void foreachObjectLink(
- ModifierData *md, Object *ob,
- void (*walk)(void *userData, Object *ob, Object **obpoin),
- void *userData)
+ ModifierData *md, Object *ob,
+ void (*walk)(void *userData, Object *ob, Object **obpoin),
+ void *userData)
{
- ScrewModifierData *ltmd= (ScrewModifierData*) md;
+ ScrewModifierData *ltmd = (ScrewModifierData *) md;
walk(userData, ob, &ltmd->ob_axis);
}
/* This dosnt work with material*/
static DerivedMesh *applyModifierEM(
- ModifierData *md,
- Object *ob,
- struct BMEditMesh *UNUSED(editData),
- DerivedMesh *derivedData)
+ ModifierData *md,
+ Object *ob,
+ struct BMEditMesh *UNUSED(editData),
+ DerivedMesh *derivedData)
{
return applyModifier(md, ob, derivedData, 0, 1);
}
@@ -951,10 +955,10 @@ ModifierTypeInfo modifierType_Screw = {
/* structSize */ sizeof(ScrewModifierData),
/* type */ eModifierTypeType_Constructive,
- /* flags */ eModifierTypeFlag_AcceptsMesh
- | eModifierTypeFlag_AcceptsCVs
- | eModifierTypeFlag_SupportsEditmode
- | eModifierTypeFlag_EnableInEditmode,
+ /* flags */ eModifierTypeFlag_AcceptsMesh |
+ eModifierTypeFlag_AcceptsCVs |
+ eModifierTypeFlag_SupportsEditmode |
+ eModifierTypeFlag_EnableInEditmode,
/* copyData */ copyData,
/* deformVerts */ NULL,
diff --git a/source/blender/modifiers/intern/MOD_shapekey.c b/source/blender/modifiers/intern/MOD_shapekey.c
index a91019b0228..0f67eb4dd1a 100644
--- a/source/blender/modifiers/intern/MOD_shapekey.c
+++ b/source/blender/modifiers/intern/MOD_shapekey.c
@@ -49,40 +49,40 @@
#include "MEM_guardedalloc.h"
static void deformVerts(ModifierData *md, Object *ob,
- DerivedMesh *UNUSED(derivedData),
- float (*vertexCos)[3],
- int numVerts,
- int UNUSED(useRenderParams),
- int UNUSED(isFinalCalc))
+ DerivedMesh *UNUSED(derivedData),
+ float (*vertexCos)[3],
+ int numVerts,
+ int UNUSED(useRenderParams),
+ int UNUSED(isFinalCalc))
{
- KeyBlock *kb= ob_get_keyblock(ob);
+ KeyBlock *kb = ob_get_keyblock(ob);
float (*deformedVerts)[3];
if (kb && kb->totelem == numVerts) {
- deformedVerts= (float(*)[3])do_ob_key(md->scene, ob);
+ deformedVerts = (float(*)[3])do_ob_key(md->scene, ob);
if (deformedVerts) {
- memcpy(vertexCos, deformedVerts, sizeof(float)*3*numVerts);
+ memcpy(vertexCos, deformedVerts, sizeof(float) * 3 * numVerts);
MEM_freeN(deformedVerts);
}
}
}
static void deformMatrices(ModifierData *md, Object *ob, DerivedMesh *derivedData,
- float (*vertexCos)[3], float (*defMats)[3][3], int numVerts)
+ float (*vertexCos)[3], float (*defMats)[3][3], int numVerts)
{
- Key *key= ob_get_key(ob);
- KeyBlock *kb= ob_get_keyblock(ob);
+ Key *key = ob_get_key(ob);
+ KeyBlock *kb = ob_get_keyblock(ob);
float scale[3][3];
(void)vertexCos; /* unused */
- if (kb && kb->totelem==numVerts && kb!=key->refkey) {
+ if (kb && kb->totelem == numVerts && kb != key->refkey) {
int a;
if (ob->shapeflag & OB_SHAPE_LOCK) scale_m3_fl(scale, 1);
else scale_m3_fl(scale, kb->curval);
- for (a=0; a<numVerts; a++)
+ for (a = 0; a < numVerts; a++)
copy_m3_m3(defMats[a], scale);
}
@@ -90,35 +90,35 @@ static void deformMatrices(ModifierData *md, Object *ob, DerivedMesh *derivedDat
}
static void deformVertsEM(ModifierData *md, Object *ob,
- struct BMEditMesh *UNUSED(editData),
- DerivedMesh *derivedData,
- float (*vertexCos)[3],
- int numVerts)
+ struct BMEditMesh *UNUSED(editData),
+ DerivedMesh *derivedData,
+ float (*vertexCos)[3],
+ int numVerts)
{
- Key *key= ob_get_key(ob);
+ Key *key = ob_get_key(ob);
if (key && key->type == KEY_RELATIVE)
deformVerts(md, ob, derivedData, vertexCos, numVerts, 0, 0);
}
static void deformMatricesEM(ModifierData *UNUSED(md), Object *ob,
- struct BMEditMesh *UNUSED(editData),
- DerivedMesh *UNUSED(derivedData),
- float (*vertexCos)[3],
- float (*defMats)[3][3],
- int numVerts)
+ struct BMEditMesh *UNUSED(editData),
+ DerivedMesh *UNUSED(derivedData),
+ float (*vertexCos)[3],
+ float (*defMats)[3][3],
+ int numVerts)
{
- Key *key= ob_get_key(ob);
- KeyBlock *kb= ob_get_keyblock(ob);
+ Key *key = ob_get_key(ob);
+ KeyBlock *kb = ob_get_keyblock(ob);
float scale[3][3];
(void)vertexCos; /* unused */
- if (kb && kb->totelem==numVerts && kb!=key->refkey) {
+ if (kb && kb->totelem == numVerts && kb != key->refkey) {
int a;
scale_m3_fl(scale, kb->curval);
- for (a=0; a<numVerts; a++)
+ for (a = 0; a < numVerts; a++)
copy_m3_m3(defMats[a], scale);
}
}
@@ -128,8 +128,8 @@ ModifierTypeInfo modifierType_ShapeKey = {
/* structName */ "ShapeKeyModifierData",
/* structSize */ sizeof(ShapeKeyModifierData),
/* type */ eModifierTypeType_OnlyDeform,
- /* flags */ eModifierTypeFlag_AcceptsCVs
- | eModifierTypeFlag_SupportsEditmode,
+ /* flags */ eModifierTypeFlag_AcceptsCVs |
+ eModifierTypeFlag_SupportsEditmode,
/* copyData */ NULL,
/* deformVerts */ deformVerts,
diff --git a/source/blender/modifiers/intern/MOD_shrinkwrap.c b/source/blender/modifiers/intern/MOD_shrinkwrap.c
index ae8ca267b86..bcbd8918609 100644
--- a/source/blender/modifiers/intern/MOD_shrinkwrap.c
+++ b/source/blender/modifiers/intern/MOD_shrinkwrap.c
@@ -51,28 +51,28 @@
static void initData(ModifierData *md)
{
- ShrinkwrapModifierData *smd = (ShrinkwrapModifierData*) md;
+ ShrinkwrapModifierData *smd = (ShrinkwrapModifierData *) md;
smd->shrinkType = MOD_SHRINKWRAP_NEAREST_SURFACE;
smd->shrinkOpts = MOD_SHRINKWRAP_PROJECT_ALLOW_POS_DIR;
- smd->keepDist = 0.0f;
+ smd->keepDist = 0.0f;
- smd->target = NULL;
- smd->auxTarget = NULL;
+ smd->target = NULL;
+ smd->auxTarget = NULL;
}
static void copyData(ModifierData *md, ModifierData *target)
{
- ShrinkwrapModifierData *smd = (ShrinkwrapModifierData*)md;
- ShrinkwrapModifierData *tsmd = (ShrinkwrapModifierData*)target;
+ ShrinkwrapModifierData *smd = (ShrinkwrapModifierData *)md;
+ ShrinkwrapModifierData *tsmd = (ShrinkwrapModifierData *)target;
- tsmd->target = smd->target;
+ tsmd->target = smd->target;
tsmd->auxTarget = smd->auxTarget;
BLI_strncpy(tsmd->vgroup_name, smd->vgroup_name, sizeof(tsmd->vgroup_name));
- tsmd->keepDist = smd->keepDist;
- tsmd->shrinkType= smd->shrinkType;
- tsmd->shrinkOpts= smd->shrinkOpts;
+ tsmd->keepDist = smd->keepDist;
+ tsmd->shrinkType = smd->shrinkType;
+ tsmd->shrinkOpts = smd->shrinkOpts;
tsmd->projAxis = smd->projAxis;
tsmd->subsurfLevels = smd->subsurfLevels;
}
@@ -97,94 +97,97 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
{
- ShrinkwrapModifierData *smd = (ShrinkwrapModifierData*) md;
+ ShrinkwrapModifierData *smd = (ShrinkwrapModifierData *) md;
return !smd->target;
}
static void foreachObjectLink(ModifierData *md, Object *ob, ObjectWalkFunc walk, void *userData)
{
- ShrinkwrapModifierData *smd = (ShrinkwrapModifierData*) md;
+ ShrinkwrapModifierData *smd = (ShrinkwrapModifierData *) md;
walk(userData, ob, &smd->target);
walk(userData, ob, &smd->auxTarget);
}
static void deformVerts(ModifierData *md, Object *ob,
- DerivedMesh *derivedData,
- float (*vertexCos)[3],
- int numVerts,
- int UNUSED(useRenderParams),
- int UNUSED(isFinalCalc))
+ DerivedMesh *derivedData,
+ float (*vertexCos)[3],
+ int numVerts,
+ int UNUSED(useRenderParams),
+ int UNUSED(isFinalCalc))
{
DerivedMesh *dm = derivedData;
CustomDataMask dataMask = requiredDataMask(ob, md);
/* ensure we get a CDDM with applied vertex coords */
if (dataMask)
- dm= get_cddm(ob, NULL, dm, vertexCos);
+ dm = get_cddm(ob, NULL, dm, vertexCos);
- shrinkwrapModifier_deform((ShrinkwrapModifierData*)md, ob, dm, vertexCos, numVerts);
+ shrinkwrapModifier_deform((ShrinkwrapModifierData *)md, ob, dm, vertexCos, numVerts);
if (dm != derivedData)
dm->release(dm);
}
-static void deformVertsEM(ModifierData *md, Object *ob, struct BMEditMesh *editData, DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
+static void deformVertsEM(ModifierData *md, Object *ob, struct BMEditMesh *editData, DerivedMesh *derivedData,
+ float (*vertexCos)[3], int numVerts)
{
DerivedMesh *dm = derivedData;
CustomDataMask dataMask = requiredDataMask(ob, md);
/* ensure we get a CDDM with applied vertex coords */
if (dataMask)
- dm= get_cddm(ob, editData, dm, vertexCos);
+ dm = get_cddm(ob, editData, dm, vertexCos);
- shrinkwrapModifier_deform((ShrinkwrapModifierData*)md, ob, dm, vertexCos, numVerts);
+ shrinkwrapModifier_deform((ShrinkwrapModifierData *)md, ob, dm, vertexCos, numVerts);
if (dm != derivedData)
dm->release(dm);
}
static void updateDepgraph(ModifierData *md, DagForest *forest,
- struct Scene *UNUSED(scene),
- Object *UNUSED(ob),
- DagNode *obNode)
+ struct Scene *UNUSED(scene),
+ Object *UNUSED(ob),
+ DagNode *obNode)
{
- ShrinkwrapModifierData *smd = (ShrinkwrapModifierData*) md;
+ ShrinkwrapModifierData *smd = (ShrinkwrapModifierData *) md;
if (smd->target)
- dag_add_relation(forest, dag_get_node(forest, smd->target), obNode, DAG_RL_OB_DATA | DAG_RL_DATA_DATA, "Shrinkwrap Modifier");
+ dag_add_relation(forest, dag_get_node(forest, smd->target), obNode,
+ DAG_RL_OB_DATA | DAG_RL_DATA_DATA, "Shrinkwrap Modifier");
if (smd->auxTarget)
- dag_add_relation(forest, dag_get_node(forest, smd->auxTarget), obNode, DAG_RL_OB_DATA | DAG_RL_DATA_DATA, "Shrinkwrap Modifier");
+ dag_add_relation(forest, dag_get_node(forest, smd->auxTarget), obNode,
+ DAG_RL_OB_DATA | DAG_RL_DATA_DATA, "Shrinkwrap Modifier");
}
ModifierTypeInfo modifierType_Shrinkwrap = {
- /* name */ "Shrinkwrap",
- /* structName */ "ShrinkwrapModifierData",
- /* structSize */ sizeof(ShrinkwrapModifierData),
- /* type */ eModifierTypeType_OnlyDeform,
- /* flags */ eModifierTypeFlag_AcceptsMesh
- | eModifierTypeFlag_AcceptsCVs
- | eModifierTypeFlag_SupportsEditmode
- | eModifierTypeFlag_EnableInEditmode,
-
- /* copyData */ copyData,
- /* deformVerts */ deformVerts,
- /* deformMatrices */ NULL,
- /* deformVertsEM */ deformVertsEM,
- /* deformMatricesEM */ NULL,
- /* applyModifier */ NULL,
- /* applyModifierEM */ NULL,
- /* initData */ initData,
- /* requiredDataMask */ requiredDataMask,
- /* freeData */ NULL,
- /* isDisabled */ isDisabled,
- /* updateDepgraph */ updateDepgraph,
- /* dependsOnTime */ NULL,
- /* dependsOnNormals */ NULL,
+ /* name */ "Shrinkwrap",
+ /* structName */ "ShrinkwrapModifierData",
+ /* structSize */ sizeof(ShrinkwrapModifierData),
+ /* type */ eModifierTypeType_OnlyDeform,
+ /* flags */ eModifierTypeFlag_AcceptsMesh |
+ eModifierTypeFlag_AcceptsCVs |
+ eModifierTypeFlag_SupportsEditmode |
+ eModifierTypeFlag_EnableInEditmode,
+
+ /* copyData */ copyData,
+ /* deformVerts */ deformVerts,
+ /* deformMatrices */ NULL,
+ /* deformVertsEM */ deformVertsEM,
+ /* deformMatricesEM */ NULL,
+ /* applyModifier */ NULL,
+ /* applyModifierEM */ NULL,
+ /* initData */ initData,
+ /* requiredDataMask */ requiredDataMask,
+ /* freeData */ NULL,
+ /* isDisabled */ isDisabled,
+ /* updateDepgraph */ updateDepgraph,
+ /* dependsOnTime */ NULL,
+ /* dependsOnNormals */ NULL,
/* foreachObjectLink */ foreachObjectLink,
- /* foreachIDLink */ NULL,
- /* foreachTexLink */ NULL,
+ /* foreachIDLink */ NULL,
+ /* foreachTexLink */ NULL,
};
diff --git a/source/blender/modifiers/intern/MOD_simpledeform.c b/source/blender/modifiers/intern/MOD_simpledeform.c
index 6c1325b0bde..d2ef75bfa42 100644
--- a/source/blender/modifiers/intern/MOD_simpledeform.c
+++ b/source/blender/modifiers/intern/MOD_simpledeform.c
@@ -68,10 +68,10 @@ static void axis_limit(int axis, const float limits[2], float co[3], float dcut[
static void simpleDeform_taper(const float factor, const float dcut[3], float *co)
{
float x = co[0], y = co[1], z = co[2];
- float scale = z*factor;
+ float scale = z * factor;
- co[0] = x + x*scale;
- co[1] = y + y*scale;
+ co[0] = x + x * scale;
+ co[1] = y + y * scale;
co[2] = z;
if (dcut) {
@@ -86,11 +86,11 @@ static void simpleDeform_stretch(const float factor, const float dcut[3], float
float x = co[0], y = co[1], z = co[2];
float scale;
- scale = (z*z*factor-factor + 1.0f);
+ scale = (z * z * factor - factor + 1.0f);
- co[0] = x*scale;
- co[1] = y*scale;
- co[2] = z*(1.0f+factor);
+ co[0] = x * scale;
+ co[1] = y * scale;
+ co[2] = z * (1.0f + factor);
if (dcut) {
co[0] += dcut[0];
@@ -104,12 +104,12 @@ static void simpleDeform_twist(const float factor, const float *dcut, float *co)
float x = co[0], y = co[1], z = co[2];
float theta, sint, cost;
- theta = z*factor;
+ theta = z * factor;
sint = sin(theta);
cost = cos(theta);
- co[0] = x*cost - y*sint;
- co[1] = x*sint + y*cost;
+ co[0] = x * cost - y * sint;
+ co[1] = x * sint + y * cost;
co[2] = z;
if (dcut) {
@@ -124,19 +124,19 @@ static void simpleDeform_bend(const float factor, const float dcut[3], float *co
float x = co[0], y = co[1], z = co[2];
float theta, sint, cost;
- theta = x*factor;
+ theta = x * factor;
sint = sin(theta);
cost = cos(theta);
if (fabsf(factor) > 1e-7f) {
- co[0] = -(y-1.0f/factor)*sint;
- co[1] = (y-1.0f/factor)*cost + 1.0f/factor;
+ co[0] = -(y - 1.0f / factor) * sint;
+ co[1] = (y - 1.0f / factor) * cost + 1.0f / factor;
co[2] = z;
}
if (dcut) {
- co[0] += cost*dcut[0];
- co[1] += sint*dcut[0];
+ co[0] += cost * dcut[0];
+ co[1] += sint * dcut[0];
co[2] += dcut[2];
}
@@ -144,7 +144,8 @@ static void simpleDeform_bend(const float factor, const float dcut[3], float *co
/* simple deform modifier */
-static void SimpleDeformModifier_do(SimpleDeformModifierData *smd, struct Object *ob, struct DerivedMesh *dm, float (*vertexCos)[3], int numVerts)
+static void SimpleDeformModifier_do(SimpleDeformModifierData *smd, struct Object *ob, struct DerivedMesh *dm,
+ float (*vertexCos)[3], int numVerts)
{
static const float lock_axis[2] = {0.0f, 0.0f};
@@ -152,17 +153,17 @@ static void SimpleDeformModifier_do(SimpleDeformModifierData *smd, struct Object
int limit_axis = 0;
float smd_limit[2], smd_factor;
SpaceTransform *transf = NULL, tmp_transf;
- void (*simpleDeform_callback)(const float factor, const float dcut[3], float *co) = NULL; //Mode callback
+ void (*simpleDeform_callback)(const float factor, const float dcut[3], float *co) = NULL; /* Mode callback */
int vgroup;
MDeformVert *dvert;
- //Safe-check
- if (smd->origin == ob) smd->origin = NULL; //No self references
+ /* Safe-check */
+ if (smd->origin == ob) smd->origin = NULL; /* No self references */
if (smd->limit[0] < 0.0f) smd->limit[0] = 0.0f;
if (smd->limit[0] > 1.0f) smd->limit[0] = 1.0f;
- smd->limit[0] = MIN2(smd->limit[0], smd->limit[1]); //Upper limit >= than lower limit
+ smd->limit[0] = MIN2(smd->limit[0], smd->limit[1]); /* Upper limit >= than lower limit */
//Calculate matrixs do convert between coordinate spaces
if (smd->origin) {
@@ -185,8 +186,7 @@ static void SimpleDeformModifier_do(SimpleDeformModifierData *smd, struct Object
float lower = FLT_MAX;
float upper = -FLT_MAX;
- for (i=0; i<numVerts; i++)
- {
+ for (i = 0; i < numVerts; i++) {
float tmp[3];
copy_v3_v3(tmp, vertexCos[i]);
@@ -197,27 +197,25 @@ static void SimpleDeformModifier_do(SimpleDeformModifierData *smd, struct Object
}
- //SMD values are normalized to the BV, calculate the absolut values
- smd_limit[1] = lower + (upper-lower)*smd->limit[1];
- smd_limit[0] = lower + (upper-lower)*smd->limit[0];
+ /* SMD values are normalized to the BV, calculate the absolut values */
+ smd_limit[1] = lower + (upper - lower) * smd->limit[1];
+ smd_limit[0] = lower + (upper - lower) * smd->limit[0];
- smd_factor = smd->factor / MAX2(FLT_EPSILON, smd_limit[1]-smd_limit[0]);
+ smd_factor = smd->factor / MAX2(FLT_EPSILON, smd_limit[1] - smd_limit[0]);
}
modifier_get_vgroup(ob, dm, smd->vgroup_name, &dvert, &vgroup);
- switch(smd->mode)
- {
- case MOD_SIMPLEDEFORM_MODE_TWIST: simpleDeform_callback = simpleDeform_twist; break;
- case MOD_SIMPLEDEFORM_MODE_BEND: simpleDeform_callback = simpleDeform_bend; break;
- case MOD_SIMPLEDEFORM_MODE_TAPER: simpleDeform_callback = simpleDeform_taper; break;
- case MOD_SIMPLEDEFORM_MODE_STRETCH: simpleDeform_callback = simpleDeform_stretch; break;
+ switch (smd->mode) {
+ case MOD_SIMPLEDEFORM_MODE_TWIST: simpleDeform_callback = simpleDeform_twist; break;
+ case MOD_SIMPLEDEFORM_MODE_BEND: simpleDeform_callback = simpleDeform_bend; break;
+ case MOD_SIMPLEDEFORM_MODE_TAPER: simpleDeform_callback = simpleDeform_taper; break;
+ case MOD_SIMPLEDEFORM_MODE_STRETCH: simpleDeform_callback = simpleDeform_stretch; break;
default:
- return; //No simpledeform mode?
+ return; /* No simpledeform mode? */
}
- for (i=0; i<numVerts; i++)
- {
+ for (i = 0; i < numVerts; i++) {
float weight = defvert_array_find_weight_safe(dvert, i, vgroup);
if (weight != 0.0f) {
@@ -236,8 +234,8 @@ static void SimpleDeformModifier_do(SimpleDeformModifierData *smd, struct Object
}
axis_limit(limit_axis, smd_limit, co, dcut);
- simpleDeform_callback(smd_factor, dcut, co); //Apply deform
- interp_v3_v3v3(vertexCos[i], vertexCos[i], co, weight); //Use vertex weight has coef of linear interpolation
+ simpleDeform_callback(smd_factor, dcut, co); /* apply deform */
+ interp_v3_v3v3(vertexCos[i], vertexCos[i], co, weight); /* Use vertex weight has coef of linear interpolation */
if (transf) space_transform_invert(transf, vertexCos[i]);
}
@@ -250,7 +248,7 @@ static void SimpleDeformModifier_do(SimpleDeformModifierData *smd, struct Object
/* SimpleDeform */
static void initData(ModifierData *md)
{
- SimpleDeformModifierData *smd = (SimpleDeformModifierData*) md;
+ SimpleDeformModifierData *smd = (SimpleDeformModifierData *) md;
smd->mode = MOD_SIMPLEDEFORM_MODE_TWIST;
smd->axis = 0;
@@ -263,14 +261,14 @@ static void initData(ModifierData *md)
static void copyData(ModifierData *md, ModifierData *target)
{
- SimpleDeformModifierData *smd = (SimpleDeformModifierData*)md;
- SimpleDeformModifierData *tsmd = (SimpleDeformModifierData*)target;
+ SimpleDeformModifierData *smd = (SimpleDeformModifierData *)md;
+ SimpleDeformModifierData *tsmd = (SimpleDeformModifierData *)target;
- tsmd->mode = smd->mode;
+ tsmd->mode = smd->mode;
tsmd->axis = smd->axis;
- tsmd->origin= smd->origin;
- tsmd->originOpts= smd->originOpts;
- tsmd->factor= smd->factor;
+ tsmd->origin = smd->origin;
+ tsmd->originOpts = smd->originOpts;
+ tsmd->factor = smd->factor;
memcpy(tsmd->limit, smd->limit, sizeof(tsmd->limit));
BLI_strncpy(tsmd->vgroup_name, smd->vgroup_name, sizeof(tsmd->vgroup_name));
}
@@ -287,29 +285,30 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
return dataMask;
}
-static void foreachObjectLink(ModifierData *md, Object *ob, void (*walk)(void *userData, Object *ob, Object **obpoin), void *userData)
+static void foreachObjectLink(ModifierData *md, Object *ob,
+ void (*walk)(void *userData, Object *ob, Object **obpoin), void *userData)
{
- SimpleDeformModifierData *smd = (SimpleDeformModifierData*)md;
+ SimpleDeformModifierData *smd = (SimpleDeformModifierData *)md;
walk(userData, ob, &smd->origin);
}
static void updateDepgraph(ModifierData *md, DagForest *forest,
- struct Scene *UNUSED(scene),
- Object *UNUSED(ob),
- DagNode *obNode)
+ struct Scene *UNUSED(scene),
+ Object *UNUSED(ob),
+ DagNode *obNode)
{
- SimpleDeformModifierData *smd = (SimpleDeformModifierData*)md;
+ SimpleDeformModifierData *smd = (SimpleDeformModifierData *)md;
if (smd->origin)
dag_add_relation(forest, dag_get_node(forest, smd->origin), obNode, DAG_RL_OB_DATA, "SimpleDeform Modifier");
}
static void deformVerts(ModifierData *md, Object *ob,
- DerivedMesh *derivedData,
- float (*vertexCos)[3],
- int numVerts,
- int UNUSED(useRenderParams),
- int UNUSED(isFinalCalc))
+ DerivedMesh *derivedData,
+ float (*vertexCos)[3],
+ int numVerts,
+ int UNUSED(useRenderParams),
+ int UNUSED(isFinalCalc))
{
DerivedMesh *dm = derivedData;
CustomDataMask dataMask = requiredDataMask(ob, md);
@@ -317,19 +316,19 @@ static void deformVerts(ModifierData *md, Object *ob,
/* we implement requiredDataMask but thats not really useful since
* mesh_calc_modifiers pass a NULL derivedData */
if (dataMask)
- dm= get_dm(ob, NULL, dm, NULL, 0);
+ dm = get_dm(ob, NULL, dm, NULL, 0);
- SimpleDeformModifier_do((SimpleDeformModifierData*)md, ob, dm, vertexCos, numVerts);
+ SimpleDeformModifier_do((SimpleDeformModifierData *)md, ob, dm, vertexCos, numVerts);
if (dm != derivedData)
dm->release(dm);
}
static void deformVertsEM(ModifierData *md, Object *ob,
- struct BMEditMesh *editData,
- DerivedMesh *derivedData,
- float (*vertexCos)[3],
- int numVerts)
+ struct BMEditMesh *editData,
+ DerivedMesh *derivedData,
+ float (*vertexCos)[3],
+ int numVerts)
{
DerivedMesh *dm = derivedData;
CustomDataMask dataMask = requiredDataMask(ob, md);
@@ -337,9 +336,9 @@ static void deformVertsEM(ModifierData *md, Object *ob,
/* we implement requiredDataMask but thats not really useful since
* mesh_calc_modifiers pass a NULL derivedData */
if (dataMask)
- dm= get_dm(ob, editData, dm, NULL, 0);
+ dm = get_dm(ob, editData, dm, NULL, 0);
- SimpleDeformModifier_do((SimpleDeformModifierData*)md, ob, dm, vertexCos, numVerts);
+ SimpleDeformModifier_do((SimpleDeformModifierData *)md, ob, dm, vertexCos, numVerts);
if (dm != derivedData)
dm->release(dm);
@@ -352,10 +351,10 @@ ModifierTypeInfo modifierType_SimpleDeform = {
/* structSize */ sizeof(SimpleDeformModifierData),
/* type */ eModifierTypeType_OnlyDeform,
- /* flags */ eModifierTypeFlag_AcceptsMesh
- | eModifierTypeFlag_AcceptsCVs
- | eModifierTypeFlag_SupportsEditmode
- | eModifierTypeFlag_EnableInEditmode,
+ /* flags */ eModifierTypeFlag_AcceptsMesh |
+ eModifierTypeFlag_AcceptsCVs |
+ eModifierTypeFlag_SupportsEditmode |
+ eModifierTypeFlag_EnableInEditmode,
/* copyData */ copyData,
/* deformVerts */ deformVerts,
diff --git a/source/blender/modifiers/intern/MOD_smoke.c b/source/blender/modifiers/intern/MOD_smoke.c
index 706c9817a0a..843f92bbbe8 100644
--- a/source/blender/modifiers/intern/MOD_smoke.c
+++ b/source/blender/modifiers/intern/MOD_smoke.c
@@ -57,7 +57,7 @@
static void initData(ModifierData *md)
{
- SmokeModifierData *smd = (SmokeModifierData*) md;
+ SmokeModifierData *smd = (SmokeModifierData *) md;
smd->domain = NULL;
smd->flow = NULL;
@@ -68,27 +68,27 @@ static void initData(ModifierData *md)
static void copyData(ModifierData *md, ModifierData *target)
{
- SmokeModifierData *smd = (SmokeModifierData*)md;
- SmokeModifierData *tsmd = (SmokeModifierData*)target;
+ SmokeModifierData *smd = (SmokeModifierData *)md;
+ SmokeModifierData *tsmd = (SmokeModifierData *)target;
smokeModifier_copy(smd, tsmd);
}
static void freeData(ModifierData *md)
{
- SmokeModifierData *smd = (SmokeModifierData*) md;
+ SmokeModifierData *smd = (SmokeModifierData *) md;
- smokeModifier_free (smd);
+ smokeModifier_free(smd);
}
static void deformVerts(ModifierData *md, Object *ob,
- DerivedMesh *derivedData,
- float (*vertexCos)[3],
- int UNUSED(numVerts),
- int UNUSED(useRenderParams),
- int UNUSED(isFinalCalc))
+ DerivedMesh *derivedData,
+ float (*vertexCos)[3],
+ int UNUSED(numVerts),
+ int UNUSED(useRenderParams),
+ int UNUSED(isFinalCalc))
{
- SmokeModifierData *smd = (SmokeModifierData*) md;
+ SmokeModifierData *smd = (SmokeModifierData *) md;
DerivedMesh *dm = get_cddm(ob, NULL, derivedData, vertexCos);
smokeModifier_do(smd, md->scene, ob, dm);
@@ -103,9 +103,9 @@ static int dependsOnTime(ModifierData *UNUSED(md))
}
static void updateDepgraph(ModifierData *md, DagForest *forest,
- struct Scene *scene,
- Object *UNUSED(ob),
- DagNode *obNode)
+ struct Scene *scene,
+ Object *UNUSED(ob),
+ DagNode *obNode)
{
SmokeModifierData *smd = (SmokeModifierData *) md;
@@ -121,7 +121,7 @@ static void updateDepgraph(ModifierData *md, DagForest *forest,
// check for initialized smoke object
if (smd2 && (smd2->type & MOD_SMOKE_TYPE_FLOW) && smd2->flow) {
DagNode *curNode = dag_get_node(forest, go->ob);
- dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA|DAG_RL_OB_DATA, "Smoke Flow");
+ dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Smoke Flow");
}
}
}
@@ -134,7 +134,7 @@ static void updateDepgraph(ModifierData *md, DagForest *forest,
// check for initialized smoke object
if (smd2 && (smd2->type & MOD_SMOKE_TYPE_COLL) && smd2->coll) {
DagNode *curNode = dag_get_node(forest, go->ob);
- dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA|DAG_RL_OB_DATA, "Smoke Coll");
+ dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Smoke Coll");
}
}
}
@@ -142,12 +142,12 @@ static void updateDepgraph(ModifierData *md, DagForest *forest,
else {
Base *base = scene->base.first;
- for ( ; base; base = base->next) {
+ for (; base; base = base->next) {
SmokeModifierData *smd2 = (SmokeModifierData *)modifiers_findByType(base->object, eModifierType_Smoke);
if (smd2 && (((smd2->type & MOD_SMOKE_TYPE_FLOW) && smd2->flow) || ((smd2->type & MOD_SMOKE_TYPE_COLL) && smd2->coll))) {
DagNode *curNode = dag_get_node(forest, base->object);
- dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA|DAG_RL_OB_DATA, "Smoke Flow/Coll");
+ dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Smoke Flow/Coll");
}
}
}
@@ -155,11 +155,11 @@ static void updateDepgraph(ModifierData *md, DagForest *forest,
}
static void foreachIDLink(ModifierData *md, Object *ob,
- IDWalkFunc walk, void *userData)
+ IDWalkFunc walk, void *userData)
{
- SmokeModifierData *smd = (SmokeModifierData*) md;
+ SmokeModifierData *smd = (SmokeModifierData *) md;
- if (smd->type==MOD_SMOKE_TYPE_DOMAIN && smd->domain) {
+ if (smd->type == MOD_SMOKE_TYPE_DOMAIN && smd->domain) {
walk(userData, ob, (ID **)&smd->domain->coll_group);
walk(userData, ob, (ID **)&smd->domain->fluid_group);
walk(userData, ob, (ID **)&smd->domain->eff_group);
@@ -175,9 +175,9 @@ ModifierTypeInfo modifierType_Smoke = {
/* structName */ "SmokeModifierData",
/* structSize */ sizeof(SmokeModifierData),
/* type */ eModifierTypeType_OnlyDeform,
- /* flags */ eModifierTypeFlag_AcceptsMesh
- | eModifierTypeFlag_UsesPointCache
- | eModifierTypeFlag_Single,
+ /* flags */ eModifierTypeFlag_AcceptsMesh |
+ eModifierTypeFlag_UsesPointCache |
+ eModifierTypeFlag_Single,
/* copyData */ copyData,
/* deformVerts */ deformVerts,
diff --git a/source/blender/modifiers/intern/MOD_smooth.c b/source/blender/modifiers/intern/MOD_smooth.c
index b909e1f6512..ac0eb2a369b 100644
--- a/source/blender/modifiers/intern/MOD_smooth.c
+++ b/source/blender/modifiers/intern/MOD_smooth.c
@@ -51,7 +51,7 @@
static void initData(ModifierData *md)
{
- SmoothModifierData *smd = (SmoothModifierData*) md;
+ SmoothModifierData *smd = (SmoothModifierData *) md;
smd->fac = 0.5f;
smd->repeat = 1;
@@ -61,8 +61,8 @@ static void initData(ModifierData *md)
static void copyData(ModifierData *md, ModifierData *target)
{
- SmoothModifierData *smd = (SmoothModifierData*) md;
- SmoothModifierData *tsmd = (SmoothModifierData*) target;
+ SmoothModifierData *smd = (SmoothModifierData *) md;
+ SmoothModifierData *tsmd = (SmoothModifierData *) target;
tsmd->fac = smd->fac;
tsmd->repeat = smd->repeat;
@@ -72,10 +72,10 @@ static void copyData(ModifierData *md, ModifierData *target)
static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
{
- SmoothModifierData *smd = (SmoothModifierData*) md;
+ SmoothModifierData *smd = (SmoothModifierData *) md;
short flag;
- flag = smd->flag & (MOD_SMOOTH_X|MOD_SMOOTH_Y|MOD_SMOOTH_Z);
+ flag = smd->flag & (MOD_SMOOTH_X | MOD_SMOOTH_Y | MOD_SMOOTH_Z);
/* disable if modifier is off for X, Y and Z or if factor is 0 */
if ((smd->fac == 0.0f) || flag == 0) return 1;
@@ -95,8 +95,8 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
}
static void smoothModifier_do(
- SmoothModifierData *smd, Object *ob, DerivedMesh *dm,
- float (*vertexCos)[3], int numVerts)
+ SmoothModifierData *smd, Object *ob, DerivedMesh *dm,
+ float (*vertexCos)[3], int numVerts)
{
MDeformVert *dvert = NULL;
MEdge *medges = NULL;
@@ -105,11 +105,11 @@ static void smoothModifier_do(
unsigned char *uctmp;
float *ftmp, fac, facm;
- ftmp = (float*)MEM_callocN(3*sizeof(float)*numVerts,
- "smoothmodifier_f");
+ ftmp = (float *)MEM_callocN(3 * sizeof(float) * numVerts,
+ "smoothmodifier_f");
if (!ftmp) return;
- uctmp = (unsigned char*)MEM_callocN(sizeof(unsigned char)*numVerts,
- "smoothmodifier_uc");
+ uctmp = (unsigned char *)MEM_callocN(sizeof(unsigned char) * numVerts,
+ "smoothmodifier_uc");
if (!uctmp) {
if (ftmp) MEM_freeN(ftmp);
return;
@@ -139,8 +139,8 @@ static void smoothModifier_do(
mid_v3_v3v3(fvec, v1, v2);
- v1 = &ftmp[idx1*3];
- v2 = &ftmp[idx2*3];
+ v1 = &ftmp[idx1 * 3];
+ v2 = &ftmp[idx2 * 3];
if (uctmp[idx1] < 255) {
uctmp[idx1]++;
@@ -153,16 +153,16 @@ static void smoothModifier_do(
}
if (dvert) {
- MDeformVert *dv= dvert;
+ MDeformVert *dv = dvert;
for (i = 0; i < numVerts; i++, dv++) {
float f, fm, facw, *fp, *v;
short flag = smd->flag;
v = vertexCos[i];
- fp = &ftmp[i*3];
+ fp = &ftmp[i * 3];
- f= defvert_find_weight(dv, defgrp_index);
+ f = defvert_find_weight(dv, defgrp_index);
if (f <= 0.0f) continue;
f *= fac;
@@ -187,7 +187,7 @@ static void smoothModifier_do(
short flag = smd->flag;
v = vertexCos[i];
- fp = &ftmp[i*3];
+ fp = &ftmp[i * 3];
/* fp is the sum of uctmp[i] verts, so must be averaged */
facw = 0.0f;
@@ -204,8 +204,8 @@ static void smoothModifier_do(
}
- memset(ftmp, 0, 3*sizeof(float)*numVerts);
- memset(uctmp, 0, sizeof(unsigned char)*numVerts);
+ memset(ftmp, 0, 3 * sizeof(float) * numVerts);
+ memset(uctmp, 0, sizeof(unsigned char) * numVerts);
}
MEM_freeN(ftmp);
@@ -213,10 +213,10 @@ static void smoothModifier_do(
}
static void deformVerts(
- ModifierData *md, Object *ob, DerivedMesh *derivedData,
- float (*vertexCos)[3], int numVerts, int UNUSED(useRenderParams), int UNUSED(isFinalCalc))
+ ModifierData *md, Object *ob, DerivedMesh *derivedData,
+ float (*vertexCos)[3], int numVerts, int UNUSED(useRenderParams), int UNUSED(isFinalCalc))
{
- DerivedMesh *dm= get_dm(ob, NULL, derivedData, NULL, 0);
+ DerivedMesh *dm = get_dm(ob, NULL, derivedData, NULL, 0);
smoothModifier_do((SmoothModifierData *)md, ob, dm,
vertexCos, numVerts);
@@ -226,10 +226,10 @@ static void deformVerts(
}
static void deformVertsEM(
- ModifierData *md, Object *ob, struct BMEditMesh *editData,
- DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
+ ModifierData *md, Object *ob, struct BMEditMesh *editData,
+ DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
{
- DerivedMesh *dm= get_dm(ob, editData, derivedData, NULL, 0);
+ DerivedMesh *dm = get_dm(ob, editData, derivedData, NULL, 0);
smoothModifier_do((SmoothModifierData *)md, ob, dm,
vertexCos, numVerts);
@@ -244,8 +244,8 @@ ModifierTypeInfo modifierType_Smooth = {
/* structName */ "SmoothModifierData",
/* structSize */ sizeof(SmoothModifierData),
/* type */ eModifierTypeType_OnlyDeform,
- /* flags */ eModifierTypeFlag_AcceptsMesh
- | eModifierTypeFlag_SupportsEditmode,
+ /* flags */ eModifierTypeFlag_AcceptsMesh |
+ eModifierTypeFlag_SupportsEditmode,
/* copyData */ copyData,
/* deformVerts */ deformVerts,
diff --git a/source/blender/modifiers/intern/MOD_softbody.c b/source/blender/modifiers/intern/MOD_softbody.c
index 01b1b0b52af..5d428aedf8c 100644
--- a/source/blender/modifiers/intern/MOD_softbody.c
+++ b/source/blender/modifiers/intern/MOD_softbody.c
@@ -45,11 +45,11 @@
#include "MOD_modifiertypes.h"
static void deformVerts(ModifierData *md, Object *ob,
- DerivedMesh *UNUSED(derivedData),
- float (*vertexCos)[3],
- int numVerts,
- int UNUSED(useRenderParams),
- int UNUSED(isFinalCalc))
+ DerivedMesh *UNUSED(derivedData),
+ float (*vertexCos)[3],
+ int numVerts,
+ int UNUSED(useRenderParams),
+ int UNUSED(isFinalCalc))
{
sbObjectStep(md->scene, ob, (float)md->scene->r.cfra, vertexCos, numVerts);
}
@@ -65,9 +65,9 @@ ModifierTypeInfo modifierType_Softbody = {
/* structName */ "SoftbodyModifierData",
/* structSize */ sizeof(SoftbodyModifierData),
/* type */ eModifierTypeType_OnlyDeform,
- /* flags */ eModifierTypeFlag_AcceptsCVs
- | eModifierTypeFlag_RequiresOriginalData
- | eModifierTypeFlag_Single,
+ /* flags */ eModifierTypeFlag_AcceptsCVs |
+ eModifierTypeFlag_RequiresOriginalData |
+ eModifierTypeFlag_Single,
/* copyData */ NULL,
/* deformVerts */ deformVerts,
diff --git a/source/blender/modifiers/intern/MOD_solidify.c b/source/blender/modifiers/intern/MOD_solidify.c
index d3e54651eea..4ce1a283acf 100644
--- a/source/blender/modifiers/intern/MOD_solidify.c
+++ b/source/blender/modifiers/intern/MOD_solidify.c
@@ -66,7 +66,7 @@ static void dm_calc_normal(DerivedMesh *dm, float (*temp_nors)[3])
float (*face_nors)[3];
float *f_no;
- int calc_face_nors= 0;
+ int calc_face_nors = 0;
numVerts = dm->getNumVerts(dm);
numEdges = dm->getNumEdges(dm);
@@ -124,15 +124,18 @@ static void dm_calc_normal(DerivedMesh *dm, float (*temp_nors)[3])
f_no = face_nors[i];
if (calc_face_nors)
- mesh_calc_poly_normal(mp, mloop+mp->loopstart, mvert, f_no);
+ mesh_calc_poly_normal(mp, mloop + mp->loopstart, mvert, f_no);
ml = mloop + mp->loopstart;
- for (j=0; j<mp->totloop; j++, ml++) {
+ for (j = 0; j < mp->totloop; j++, ml++) {
NOCALC_EDGEWEIGHT_ADD_EDGEREF_FACE(ml->v, ME_POLY_LOOP_NEXT(mloop, mp, j)->v);
}
}
- for (edge_iter = BLI_edgehashIterator_new(edge_hash); !BLI_edgehashIterator_isDone(edge_iter); BLI_edgehashIterator_step(edge_iter)) {
+ for (edge_iter = BLI_edgehashIterator_new(edge_hash);
+ !BLI_edgehashIterator_isDone(edge_iter);
+ BLI_edgehashIterator_step(edge_iter))
+ {
/* Get the edge vert indices, and edge value (the face indices that use it)*/
BLI_edgehashIterator_getKey(edge_iter, &ed_v1, &ed_v2);
edge_ref = BLI_edgehashIterator_getValue(edge_iter);
@@ -148,7 +151,7 @@ static void dm_calc_normal(DerivedMesh *dm, float (*temp_nors)[3])
/* only one face attached to that edge */
/* an edge without another attached- the weight on this is
* undefined, M_PI/2 is 90d in radians and that seems good enough */
- mul_v3_v3fl(edge_normal, face_nors[edge_ref->f1], M_PI/2);
+ mul_v3_v3fl(edge_normal, face_nors[edge_ref->f1], M_PI / 2);
}
add_v3_v3(temp_nors[ed_v1], edge_normal);
add_v3_v3(temp_nors[ed_v2], edge_normal);
@@ -168,7 +171,7 @@ static void dm_calc_normal(DerivedMesh *dm, float (*temp_nors)[3])
static void initData(ModifierData *md)
{
- SolidifyModifierData *smd = (SolidifyModifierData*) md;
+ SolidifyModifierData *smd = (SolidifyModifierData *) md;
smd->offset = 0.01f;
smd->offset_fac = -1.0f;
smd->flag = MOD_SOLIDIFY_RIM;
@@ -176,8 +179,8 @@ static void initData(ModifierData *md)
static void copyData(ModifierData *md, ModifierData *target)
{
- SolidifyModifierData *smd = (SolidifyModifierData*) md;
- SolidifyModifierData *tsmd = (SolidifyModifierData*) target;
+ SolidifyModifierData *smd = (SolidifyModifierData *) md;
+ SolidifyModifierData *tsmd = (SolidifyModifierData *) target;
tsmd->offset = smd->offset;
tsmd->offset_fac = smd->offset_fac;
tsmd->crease_inner = smd->crease_inner;
@@ -189,7 +192,7 @@ static void copyData(ModifierData *md, ModifierData *target)
static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
{
- SolidifyModifierData *smd = (SolidifyModifierData*) md;
+ SolidifyModifierData *smd = (SolidifyModifierData *) md;
CustomDataMask dataMask = 0;
/* ask for vertexgroups if we need them */
@@ -200,13 +203,13 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
- DerivedMesh *dm,
- int UNUSED(useRenderParams),
- int UNUSED(isFinalCalc))
+ DerivedMesh *dm,
+ int UNUSED(useRenderParams),
+ int UNUSED(isFinalCalc))
{
int i;
DerivedMesh *result;
- const SolidifyModifierData *smd = (SolidifyModifierData*) md;
+ const SolidifyModifierData *smd = (SolidifyModifierData *) md;
MVert *mv, *mvert, *orig_mvert;
MEdge *ed, *medge, *orig_medge;
@@ -215,36 +218,36 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
const int numVerts = dm->getNumVerts(dm);
const int numEdges = dm->getNumEdges(dm);
const int numFaces = dm->getNumPolys(dm);
- int numLoops=0, newLoops=0, newFaces=0, newEdges=0;
+ int numLoops = 0, newLoops = 0, newFaces = 0, newEdges = 0;
int j;
/* only use material offsets if we have 2 or more materials */
- const short mat_nr_max= ob->totcol > 1 ? ob->totcol - 1 : 0;
- const short mat_ofs= mat_nr_max ? smd->mat_ofs : 0;
- const short mat_ofs_rim= mat_nr_max ? smd->mat_ofs_rim : 0;
+ const short mat_nr_max = ob->totcol > 1 ? ob->totcol - 1 : 0;
+ const short mat_ofs = mat_nr_max ? smd->mat_ofs : 0;
+ const short mat_ofs_rim = mat_nr_max ? smd->mat_ofs_rim : 0;
/* use for edges */
- int *new_vert_arr= NULL;
+ int *new_vert_arr = NULL;
BLI_array_declare(new_vert_arr);
- int *new_edge_arr= NULL;
+ int *new_edge_arr = NULL;
BLI_array_declare(new_edge_arr);
- int *old_vert_arr = MEM_callocN(sizeof(int)*numVerts, "old_vert_arr in solidify");
+ int *old_vert_arr = MEM_callocN(sizeof(int) * numVerts, "old_vert_arr in solidify");
- int *edge_users= NULL;
- char *edge_order= NULL;
+ int *edge_users = NULL;
+ char *edge_order = NULL;
int *edge_origIndex;
- float (*vert_nors)[3]= NULL;
+ float (*vert_nors)[3] = NULL;
float (*face_nors_result)[3] = NULL;
- const float ofs_orig= - (((-smd->offset_fac + 1.0f) * 0.5f) * smd->offset);
- const float ofs_new= smd->offset - (((-smd->offset_fac + 1.0f) * 0.5f) * smd->offset);
- const float offset_fac_vg= smd->offset_fac_vg;
- const float offset_fac_vg_inv= 1.0f - smd->offset_fac_vg;
+ const float ofs_orig = -(((-smd->offset_fac + 1.0f) * 0.5f) * smd->offset);
+ const float ofs_new = smd->offset - (((-smd->offset_fac + 1.0f) * 0.5f) * smd->offset);
+ const float offset_fac_vg = smd->offset_fac_vg;
+ const float offset_fac_vg_inv = 1.0f - smd->offset_fac_vg;
/* weights */
- MDeformVert *dvert, *dv= NULL;
+ MDeformVert *dvert, *dv = NULL;
const int defgrp_invert = ((smd->flag & MOD_SOLIDIFY_VGROUP_INV) != 0);
int defgrp_index;
@@ -264,11 +267,11 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
unsigned int v1, v2;
int eidx;
- for (i=0, mv=orig_mvert; i<numVerts; i++, mv++) {
+ for (i = 0, mv = orig_mvert; i < numVerts; i++, mv++) {
mv->flag &= ~ME_VERT_TMP_TAG;
}
- for (i=0, ed=orig_medge; i<numEdges; i++, ed++) {
+ for (i = 0, ed = orig_medge; i < numEdges; i++, ed++) {
BLI_edgehash_insert(edgehash, ed->v1, ed->v2, SET_INT_IN_POINTER(i));
}
@@ -291,14 +294,14 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
}
- edge_users= MEM_mallocN(sizeof(int) * numEdges, "solid_mod edges");
- edge_order= MEM_mallocN(sizeof(char) * numEdges, "solid_mod eorder");
+ edge_users = MEM_mallocN(sizeof(int) * numEdges, "solid_mod edges");
+ edge_order = MEM_mallocN(sizeof(char) * numEdges, "solid_mod eorder");
fill_vn_i(edge_users, numEdges, INVALID_UNUSED);
- for (i=0, mp=orig_mpoly; i<numFaces; i++, mp++) {
+ for (i = 0, mp = orig_mpoly; i < numFaces; i++, mp++) {
MLoop *ml;
- for (ml=orig_mloop + mp->loopstart, j=0; j<mp->totloop; ml++, j++) {
+ for (ml = orig_mloop + mp->loopstart, j = 0; j < mp->totloop; ml++, j++) {
ADD_EDGE_USER(ml->v, ME_POLY_LOOP_NEXT(orig_mloop, mp, j)->v, j);
}
}
@@ -307,9 +310,9 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
#undef INVALID_UNUSED
#undef INVALID_PAIR
- ehi= BLI_edgehashIterator_new(edgehash);
+ ehi = BLI_edgehashIterator_new(edgehash);
for (; !BLI_edgehashIterator_isDone(ehi); BLI_edgehashIterator_step(ehi)) {
- eidx= GET_INT_FROM_POINTER(BLI_edgehashIterator_getValue(ehi));
+ eidx = GET_INT_FROM_POINTER(BLI_edgehashIterator_getValue(ehi));
if (edge_users[eidx] >= 0) {
BLI_edgehashIterator_getKey(ehi, &v1, &v2);
orig_mvert[v1].flag |= ME_VERT_TMP_TAG;
@@ -321,7 +324,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
}
BLI_edgehashIterator_free(ehi);
- for (i=0, mv=orig_mvert; i<numVerts; i++, mv++) {
+ for (i = 0, mv = orig_mvert; i < numVerts; i++, mv++) {
if (mv->flag & ME_VERT_TMP_TAG) {
old_vert_arr[i] = BLI_array_count(new_vert_arr);
BLI_array_append(new_vert_arr, i);
@@ -335,11 +338,12 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
}
if (smd->flag & MOD_SOLIDIFY_NORMAL_CALC) {
- vert_nors= MEM_callocN(sizeof(float) * numVerts * 3, "mod_solid_vno_hq");
+ vert_nors = MEM_callocN(sizeof(float) * numVerts * 3, "mod_solid_vno_hq");
dm_calc_normal(dm, vert_nors);
}
- result = CDDM_from_template(dm, numVerts * 2, (numEdges * 2) + newEdges, 0, (numLoops*2) + newLoops, (numFaces * 2) + newFaces);
+ result = CDDM_from_template(dm, numVerts * 2, (numEdges * 2) + newEdges, 0,
+ (numLoops * 2) + newLoops, (numFaces * 2) + newFaces);
mpoly = CDDM_get_polys(result);
mloop = CDDM_get_loops(result);
@@ -363,14 +367,14 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
/*flip normals*/
mp = mpoly + numFaces;
- for (i=0; i<dm->numPolyData; i++, mp++) {
+ for (i = 0; i < dm->numPolyData; i++, mp++) {
MLoop *ml2;
int e;
ml2 = mloop + mp->loopstart + dm->numLoopData;
- for (j=0; j<mp->totloop; j++) {
- CustomData_copy_data(&dm->loopData, &result->loopData, mp->loopstart+j,
- mp->loopstart+(mp->totloop-j-1)+dm->numLoopData, 1);
+ for (j = 0; j < mp->totloop; j++) {
+ CustomData_copy_data(&dm->loopData, &result->loopData, mp->loopstart + j,
+ mp->loopstart + (mp->totloop - j - 1) + dm->numLoopData, 1);
}
if (mat_ofs) {
@@ -379,14 +383,14 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
}
e = ml2[0].e;
- for (j=0; j<mp->totloop-1; j++) {
- ml2[j].e = ml2[j+1].e;
+ for (j = 0; j < mp->totloop - 1; j++) {
+ ml2[j].e = ml2[j + 1].e;
}
- ml2[mp->totloop-1].e = e;
+ ml2[mp->totloop - 1].e = e;
mp->loopstart += dm->numLoopData;
- for (j=0; j<mp->totloop; j++) {
+ for (j = 0; j < mp->totloop; j++) {
ml2[j].e += numEdges;
ml2[j].v += numVerts;
}
@@ -396,7 +400,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
}
}
- for (i=0, ed=medge+numEdges; i<numEdges; i++, ed++) {
+ for (i = 0, ed = medge + numEdges; i < numEdges; i++, ed++) {
ed->v1 += numVerts;
ed->v2 += numVerts;
}
@@ -409,14 +413,14 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
if (ofs_new != 0.0f) {
- scalar_short= scalar_short_vgroup= ofs_new / 32767.0f;
- mv= mvert + ((ofs_new >= ofs_orig) ? 0 : numVerts);
- dv= dvert;
- for (i=0; i<numVerts; i++, mv++) {
+ scalar_short = scalar_short_vgroup = ofs_new / 32767.0f;
+ mv = mvert + ((ofs_new >= ofs_orig) ? 0 : numVerts);
+ dv = dvert;
+ for (i = 0; i < numVerts; i++, mv++) {
if (dv) {
- if (defgrp_invert) scalar_short_vgroup = 1.0f - defvert_find_weight(dv, defgrp_index);
- else scalar_short_vgroup = defvert_find_weight(dv, defgrp_index);
- scalar_short_vgroup= (offset_fac_vg + (scalar_short_vgroup * offset_fac_vg_inv)) * scalar_short;
+ if (defgrp_invert) scalar_short_vgroup = 1.0f - defvert_find_weight(dv, defgrp_index);
+ else scalar_short_vgroup = defvert_find_weight(dv, defgrp_index);
+ scalar_short_vgroup = (offset_fac_vg + (scalar_short_vgroup * offset_fac_vg_inv)) * scalar_short;
dv++;
}
VECADDFAC(mv->co, mv->co, mv->no, scalar_short_vgroup);
@@ -424,14 +428,14 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
}
if (ofs_orig != 0.0f) {
- scalar_short= scalar_short_vgroup= ofs_orig / 32767.0f;
- mv= mvert + ((ofs_new >= ofs_orig) ? numVerts : 0); /* same as above but swapped, intentional use of 'ofs_new' */
- dv= dvert;
- for (i=0; i<numVerts; i++, mv++) {
+ scalar_short = scalar_short_vgroup = ofs_orig / 32767.0f;
+ mv = mvert + ((ofs_new >= ofs_orig) ? numVerts : 0); /* as above but swapped, intentional use 'ofs_new' */
+ dv = dvert;
+ for (i = 0; i < numVerts; i++, mv++) {
if (dv) {
- if (defgrp_invert) scalar_short_vgroup = 1.0f - defvert_find_weight(dv, defgrp_index);
- else scalar_short_vgroup = defvert_find_weight(dv, defgrp_index);
- scalar_short_vgroup= (offset_fac_vg + (scalar_short_vgroup * offset_fac_vg_inv)) * scalar_short;
+ if (defgrp_invert) scalar_short_vgroup = 1.0f - defvert_find_weight(dv, defgrp_index);
+ else scalar_short_vgroup = defvert_find_weight(dv, defgrp_index);
+ scalar_short_vgroup = (offset_fac_vg + (scalar_short_vgroup * offset_fac_vg_inv)) * scalar_short;
dv++;
}
VECADDFAC(mv->co, mv->co, mv->no, scalar_short_vgroup);
@@ -442,80 +446,93 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
else {
/* make a face normal layer if not present */
float (*face_nors)[3];
- int face_nors_calc= 0;
+ int face_nors_calc = 0;
/* same as EM_solidify() in editmesh_lib.c */
- float *vert_angles= MEM_callocN(sizeof(float) * numVerts * 2, "mod_solid_pair"); /* 2 in 1 */
- float *vert_accum= vert_angles + numVerts;
- float *face_angles = NULL;
- BLI_array_staticdeclare(face_angles, 16); /* BM_NGON_STACK_SIZE */
- int j, vidx;
+ float *vert_angles = MEM_callocN(sizeof(float) * numVerts * 2, "mod_solid_pair"); /* 2 in 1 */
+ float *vert_accum = vert_angles + numVerts;
+ int vidx;
face_nors = CustomData_get_layer(&dm->polyData, CD_NORMAL);
if (!face_nors) {
face_nors = CustomData_add_layer(&dm->polyData, CD_NORMAL, CD_CALLOC, NULL, dm->numPolyData);
- face_nors_calc= 1;
+ face_nors_calc = 1;
}
- if (vert_nors==NULL) {
- vert_nors= MEM_mallocN(sizeof(float) * numVerts * 3, "mod_solid_vno");
- for (i=0, mv=mvert; i<numVerts; i++, mv++) {
+ if (vert_nors == NULL) {
+ vert_nors = MEM_mallocN(sizeof(float) * numVerts * 3, "mod_solid_vno");
+ for (i = 0, mv = mvert; i < numVerts; i++, mv++) {
normal_short_to_float_v3(vert_nors[i], mv->no);
}
}
- for (i=0, mp=mpoly; i<numFaces; i++, mp++) {
+ for (i = 0, mp = mpoly; i < numFaces; i++, mp++) {
+ /* #BKE_mesh_poly_calc_angles logic is inlined here */
+ float nor_prev[3];
+ float nor_next[3];
+
+ int i_this = mp->totloop - 1;
+ int i_next = 0;
+
+ ml = &mloop[mp->loopstart];
+
+ /* --- not related to angle calc --- */
if (face_nors_calc)
- mesh_calc_poly_normal(mp, &mloop[mp->loopstart], mvert, face_nors[i]);
-
- /* just added, calc the normal */
- BLI_array_empty(face_angles);
- for (j=0, ml=mloop+mp->loopstart; j<mp->totloop; j++, ml++) {
- MLoop *ml_prev = ME_POLY_LOOP_PREV(mloop, mp, j);
- MLoop *ml_next = ME_POLY_LOOP_NEXT(mloop, mp, j);
+ mesh_calc_poly_normal(mp, ml, mvert, face_nors[i]);
+ /* --- end non-angle-calc section --- */
- float e1[3], e2[3], angle;
-
- sub_v3_v3v3(e1, mvert[ml_next->v].co, mvert[ml->v].co);
- sub_v3_v3v3(e2, mvert[ml_prev->v].co, mvert[ml->v].co);
- angle = M_PI - angle_normalized_v3v3(e1, e2);
- BLI_array_append(face_angles, angle);
- }
-
- for (j=0, ml=mloop+mp->loopstart; j<mp->totloop; j++, ml++) {
- vidx = ml->v;
- vert_accum[vidx] += face_angles[j];
- vert_angles[vidx]+= shell_angle_to_dist(angle_normalized_v3v3(vert_nors[vidx], face_nors[i])) * face_angles[j];
+ sub_v3_v3v3(nor_prev, mvert[ml[i_this - 1].v].co, mvert[ml[i_this].v].co);
+ normalize_v3(nor_prev);
+
+ while (i_next < mp->totloop) {
+ float angle;
+ sub_v3_v3v3(nor_next, mvert[ml[i_this].v].co, mvert[ml[i_next].v].co);
+ normalize_v3(nor_next);
+ angle = angle_normalized_v3v3(nor_prev, nor_next);
+
+
+ /* --- not related to angle calc --- */
+ if (angle < FLT_EPSILON) {
+ angle = FLT_EPSILON;
+ }
+ vidx = ml[i_this].v;
+ vert_accum[vidx] += angle;
+ vert_angles[vidx] += shell_angle_to_dist(angle_normalized_v3v3(vert_nors[vidx], face_nors[i])) * angle;
+ /* --- end non-angle-calc section --- */
+
+
+ /* step */
+ copy_v3_v3(nor_prev, nor_next);
+ i_this = i_next;
+ i_next++;
}
}
-
- BLI_array_free(face_angles);
/* vertex group support */
if (dvert) {
float scalar;
- dv= dvert;
+ dv = dvert;
if (defgrp_invert) {
- for (i=0; i<numVerts; i++, dv++) {
- scalar= 1.0f - defvert_find_weight(dv, defgrp_index);
- scalar= offset_fac_vg + (scalar * offset_fac_vg_inv);
+ for (i = 0; i < numVerts; i++, dv++) {
+ scalar = 1.0f - defvert_find_weight(dv, defgrp_index);
+ scalar = offset_fac_vg + (scalar * offset_fac_vg_inv);
vert_angles[i] *= scalar;
}
}
else {
- for (i=0; i<numVerts; i++, dv++) {
- scalar= defvert_find_weight(dv, defgrp_index);
- scalar= offset_fac_vg + (scalar * offset_fac_vg_inv);
+ for (i = 0; i < numVerts; i++, dv++) {
+ scalar = defvert_find_weight(dv, defgrp_index);
+ scalar = offset_fac_vg + (scalar * offset_fac_vg_inv);
vert_angles[i] *= scalar;
}
}
}
if (ofs_new) {
- mv= mvert + ((ofs_new >= ofs_orig) ? 0 : numVerts);
+ mv = mvert + ((ofs_new >= ofs_orig) ? 0 : numVerts);
- for (i=0; i<numVerts; i++, mv++) {
+ for (i = 0; i < numVerts; i++, mv++) {
if (vert_accum[i]) { /* zero if unselected */
madd_v3_v3fl(mv->co, vert_nors[i], ofs_new * (vert_angles[i] / vert_accum[i]));
}
@@ -523,9 +540,10 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
}
if (ofs_orig) {
- mv= mvert + ((ofs_new >= ofs_orig) ? numVerts : 0); /* same as above but swapped, intentional use of 'ofs_new' */
+ /* same as above but swapped, intentional use of 'ofs_new' */
+ mv = mvert + ((ofs_new >= ofs_orig) ? numVerts : 0);
- for (i=0; i<numVerts; i++, mv++) {
+ for (i = 0; i < numVerts; i++, mv++) {
if (vert_accum[i]) { /* zero if unselected */
madd_v3_v3fl(mv->co, vert_nors[i], ofs_orig * (vert_angles[i] / vert_accum[i]));
}
@@ -539,46 +557,48 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
MEM_freeN(vert_nors);
/* flip vertex normals for copied verts */
- mv= mvert + numVerts;
- for (i=0; i<numVerts; i++, mv++) {
- mv->no[0]= -mv->no[0];
- mv->no[1]= -mv->no[1];
- mv->no[2]= -mv->no[2];
+ mv = mvert + numVerts;
+ for (i = 0; i < numVerts; i++, mv++) {
+ mv->no[0] = -mv->no[0];
+ mv->no[1] = -mv->no[1];
+ mv->no[2] = -mv->no[2];
}
if (smd->flag & MOD_SOLIDIFY_RIM) {
int *origindex;
/* bugger, need to re-calculate the normals for the new edge faces.
- * This could be done in many ways, but probably the quickest way is to calculate the average normals for side faces only.
+ * This could be done in many ways, but probably the quickest way
+ * is to calculate the average normals for side faces only.
* Then blend them with the normals of the edge verts.
*
- * at the moment its easiest to allocate an entire array for every vertex, even though we only need edge verts - campbell
+ * at the moment its easiest to allocate an entire array for every vertex,
+ * even though we only need edge verts - campbell
*/
#define SOLIDIFY_SIDE_NORMALS
#ifdef SOLIDIFY_SIDE_NORMALS
/* annoying to allocate these since we only need the edge verts, */
- float (*edge_vert_nos)[3]= MEM_callocN(sizeof(float) * numVerts * 3, "solidify_edge_nos");
+ float (*edge_vert_nos)[3] = MEM_callocN(sizeof(float) * numVerts * 3, "solidify_edge_nos");
float nor[3];
#endif
- const unsigned char crease_rim= smd->crease_rim * 255.0f;
- const unsigned char crease_outer= smd->crease_outer * 255.0f;
- const unsigned char crease_inner= smd->crease_inner * 255.0f;
+ const unsigned char crease_rim = smd->crease_rim * 255.0f;
+ const unsigned char crease_outer = smd->crease_outer * 255.0f;
+ const unsigned char crease_inner = smd->crease_inner * 255.0f;
/* add faces & edges */
- origindex= result->getEdgeDataArray(result, CD_ORIGINDEX);
- ed= medge + (numEdges * 2);
- for (i=0; i<newEdges; i++, ed++) {
- ed->v1= new_vert_arr[i];
- ed->v2= new_vert_arr[i] + numVerts;
+ origindex = result->getEdgeDataArray(result, CD_ORIGINDEX);
+ ed = medge + (numEdges * 2);
+ for (i = 0; i < newEdges; i++, ed++) {
+ ed->v1 = new_vert_arr[i];
+ ed->v2 = new_vert_arr[i] + numVerts;
ed->flag |= ME_EDGEDRAW;
- origindex[numEdges * 2 + i]= ORIGINDEX_NONE;
+ origindex[numEdges * 2 + i] = ORIGINDEX_NONE;
if (crease_rim)
- ed->crease= crease_rim;
+ ed->crease = crease_rim;
}
/* faces */
@@ -588,24 +608,24 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
mp = mpoly + (numFaces * 2);
ml = mloop + (numLoops * 2);
j = 0;
- for (i=0; i<newFaces; i++, mp++) {
- int eidx= new_edge_arr[i];
- int fidx= edge_users[eidx];
+ for (i = 0; i < newFaces; i++, mp++) {
+ int eidx = new_edge_arr[i];
+ int fidx = edge_users[eidx];
int flip, k1, k2;
if (fidx >= numFaces) {
fidx -= numFaces;
- flip= 1;
+ flip = 1;
}
else {
- flip= 0;
+ flip = 0;
}
- ed= medge + eidx;
+ ed = medge + eidx;
/* copy most of the face settings */
DM_copy_poly_data(dm, result, fidx, (numFaces * 2) + i, 1);
- mp->loopstart = j+numLoops*2;
+ mp->loopstart = j + numLoops * 2;
mp->flag = mpoly[fidx].flag;
/* notice we use 'mp->totloop' which is later overwritten,
@@ -616,41 +636,41 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
mp->totloop = 4;
- CustomData_copy_data(&dm->loopData, &result->loopData, k1, numLoops*2+j+0, 1);
- CustomData_copy_data(&dm->loopData, &result->loopData, k2, numLoops*2+j+1, 1);
- CustomData_copy_data(&dm->loopData, &result->loopData, k2, numLoops*2+j+2, 1);
- CustomData_copy_data(&dm->loopData, &result->loopData, k1, numLoops*2+j+3, 1);
+ CustomData_copy_data(&dm->loopData, &result->loopData, k1, numLoops * 2 + j + 0, 1);
+ CustomData_copy_data(&dm->loopData, &result->loopData, k2, numLoops * 2 + j + 1, 1);
+ CustomData_copy_data(&dm->loopData, &result->loopData, k2, numLoops * 2 + j + 2, 1);
+ CustomData_copy_data(&dm->loopData, &result->loopData, k1, numLoops * 2 + j + 3, 1);
if (flip) {
ml[j].v = ed->v1;
ml[j++].e = eidx;
ml[j].v = ed->v2;
- ml[j++].e = numEdges*2 + old_vert_arr[ed->v2];
+ ml[j++].e = numEdges * 2 + old_vert_arr[ed->v2];
- ml[j].v = ed->v2+numVerts;
- ml[j++].e = eidx+numEdges;
+ ml[j].v = ed->v2 + numVerts;
+ ml[j++].e = eidx + numEdges;
- ml[j].v = ed->v1+numVerts;
- ml[j++].e = numEdges*2 + old_vert_arr[ed->v1];
+ ml[j].v = ed->v1 + numVerts;
+ ml[j++].e = numEdges * 2 + old_vert_arr[ed->v1];
}
else {
ml[j].v = ed->v2;
ml[j++].e = eidx;
ml[j].v = ed->v1;
- ml[j++].e = numEdges*2 + old_vert_arr[ed->v1];
+ ml[j++].e = numEdges * 2 + old_vert_arr[ed->v1];
- ml[j].v = ed->v1+numVerts;
- ml[j++].e = eidx+numEdges;
+ ml[j].v = ed->v1 + numVerts;
+ ml[j++].e = eidx + numEdges;
- ml[j].v = ed->v2+numVerts;
- ml[j++].e = numEdges*2 + old_vert_arr[ed->v2];
+ ml[j].v = ed->v2 + numVerts;
+ ml[j++].e = numEdges * 2 + old_vert_arr[ed->v2];
}
if (edge_origIndex) {
- edge_origIndex[ml[j-3].e] = ORIGINDEX_NONE;
- edge_origIndex[ml[j-1].e] = ORIGINDEX_NONE;
+ edge_origIndex[ml[j - 3].e] = ORIGINDEX_NONE;
+ edge_origIndex[ml[j - 1].e] = ORIGINDEX_NONE;
}
/* use the next material index if option enabled */
@@ -660,20 +680,23 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
}
if (crease_outer) {
/* crease += crease_outer; without wrapping */
- unsigned char *cr= (unsigned char *)&(ed->crease);
- int tcr= *cr + crease_outer;
- *cr= tcr > 255 ? 255 : tcr;
+ unsigned char *cr = (unsigned char *)&(ed->crease);
+ int tcr = *cr + crease_outer;
+ *cr = tcr > 255 ? 255 : tcr;
}
if (crease_inner) {
/* crease += crease_inner; without wrapping */
- unsigned char *cr= (unsigned char *)&(medge[numEdges + eidx].crease);
- int tcr= *cr + crease_inner;
- *cr= tcr > 255 ? 255 : tcr;
+ unsigned char *cr = (unsigned char *)&(medge[numEdges + eidx].crease);
+ int tcr = *cr + crease_inner;
+ *cr = tcr > 255 ? 255 : tcr;
}
#ifdef SOLIDIFY_SIDE_NORMALS
- normal_quad_v3(nor, mvert[ml[j-4].v].co, mvert[ml[j-3].v].co, mvert[ml[j-2].v].co, mvert[ml[j-1].v].co);
+ normal_quad_v3(nor, mvert[ml[j - 4].v].co,
+ mvert[ml[j - 3].v].co,
+ mvert[ml[j - 2].v].co,
+ mvert[ml[j - 1].v].co);
add_v3_v3(edge_vert_nos[ed->v1], nor);
add_v3_v3(edge_vert_nos[ed->v2], nor);
@@ -685,8 +708,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
}
#ifdef SOLIDIFY_SIDE_NORMALS
- ed= medge + (numEdges * 2);
- for (i=0; i<newEdges; i++, ed++) {
+ ed = medge + (numEdges * 2);
+ for (i = 0; i < newEdges; i++, ed++) {
float nor_cpy[3];
short *nor_short;
int j;
@@ -694,8 +717,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
/* note, only the first vertex (lower half of the index) is calculated */
normalize_v3_v3(nor_cpy, edge_vert_nos[ed->v1]);
- for (j=0; j<2; j++) { /* loop over both verts of the edge */
- nor_short= mvert[*(&ed->v1 + j)].no;
+ for (j = 0; j < 2; j++) { /* loop over both verts of the edge */
+ nor_short = mvert[*(&ed->v1 + j)].no;
normal_short_to_float_v3(nor, nor_short);
add_v3_v3(nor, nor_cpy);
normalize_v3(nor);
@@ -726,9 +749,9 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
#undef SOLIDIFY_SIDE_NORMALS
static DerivedMesh *applyModifierEM(ModifierData *md,
- Object *ob,
- struct BMEditMesh *UNUSED(editData),
- DerivedMesh *derivedData)
+ Object *ob,
+ struct BMEditMesh *UNUSED(editData),
+ DerivedMesh *derivedData)
{
return applyModifier(md, ob, derivedData, 0, 1);
}
@@ -740,11 +763,11 @@ ModifierTypeInfo modifierType_Solidify = {
/* structSize */ sizeof(SolidifyModifierData),
/* type */ eModifierTypeType_Constructive,
- /* flags */ eModifierTypeFlag_AcceptsMesh
- | eModifierTypeFlag_AcceptsCVs
- | eModifierTypeFlag_SupportsMapping
- | eModifierTypeFlag_SupportsEditmode
- | eModifierTypeFlag_EnableInEditmode,
+ /* flags */ eModifierTypeFlag_AcceptsMesh |
+ eModifierTypeFlag_AcceptsCVs |
+ eModifierTypeFlag_SupportsMapping |
+ eModifierTypeFlag_SupportsEditmode |
+ eModifierTypeFlag_EnableInEditmode,
/* copyData */ copyData,
/* deformVerts */ NULL,
diff --git a/source/blender/modifiers/intern/MOD_subsurf.c b/source/blender/modifiers/intern/MOD_subsurf.c
index be1ceeee317..ebd95992090 100644
--- a/source/blender/modifiers/intern/MOD_subsurf.c
+++ b/source/blender/modifiers/intern/MOD_subsurf.c
@@ -51,7 +51,7 @@
static void initData(ModifierData *md)
{
- SubsurfModifierData *smd = (SubsurfModifierData*) md;
+ SubsurfModifierData *smd = (SubsurfModifierData *) md;
smd->levels = 1;
smd->renderLevels = 2;
@@ -60,8 +60,8 @@ static void initData(ModifierData *md)
static void copyData(ModifierData *md, ModifierData *target)
{
- SubsurfModifierData *smd = (SubsurfModifierData*) md;
- SubsurfModifierData *tsmd = (SubsurfModifierData*) target;
+ SubsurfModifierData *smd = (SubsurfModifierData *) md;
+ SubsurfModifierData *tsmd = (SubsurfModifierData *) target;
tsmd->flags = smd->flags;
tsmd->levels = smd->levels;
@@ -71,7 +71,7 @@ static void copyData(ModifierData *md, ModifierData *target)
static void freeData(ModifierData *md)
{
- SubsurfModifierData *smd = (SubsurfModifierData*) md;
+ SubsurfModifierData *smd = (SubsurfModifierData *) md;
if (smd->mCache) {
ccgSubSurf_free(smd->mCache);
@@ -83,41 +83,41 @@ static void freeData(ModifierData *md)
static int isDisabled(ModifierData *md, int useRenderParams)
{
- SubsurfModifierData *smd = (SubsurfModifierData*) md;
- int levels= (useRenderParams)? smd->renderLevels: smd->levels;
+ SubsurfModifierData *smd = (SubsurfModifierData *) md;
+ int levels = (useRenderParams) ? smd->renderLevels : smd->levels;
return get_render_subsurf_level(&md->scene->r, levels) == 0;
}
static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
- DerivedMesh *derivedData,
- int useRenderParams,
- int isFinalCalc)
+ DerivedMesh *derivedData,
+ int useRenderParams,
+ int isFinalCalc)
{
- SubsurfModifierData *smd = (SubsurfModifierData*) md;
+ SubsurfModifierData *smd = (SubsurfModifierData *) md;
DerivedMesh *result;
result = subsurf_make_derived_from_derived(derivedData, smd,
- useRenderParams, NULL, isFinalCalc, 0, (ob->flag & OB_MODE_EDIT));
+ useRenderParams, NULL, isFinalCalc, 0, (ob->flag & OB_MODE_EDIT));
if (useRenderParams || !isFinalCalc) {
- DerivedMesh *cddm= CDDM_copy(result);
+ DerivedMesh *cddm = CDDM_copy(result);
result->release(result);
- result= cddm;
+ result = cddm;
}
return result;
}
static DerivedMesh *applyModifierEM(ModifierData *md, Object *UNUSED(ob),
- struct BMEditMesh *UNUSED(editData),
- DerivedMesh *derivedData)
+ struct BMEditMesh *UNUSED(editData),
+ DerivedMesh *derivedData)
{
- SubsurfModifierData *smd = (SubsurfModifierData*) md;
+ SubsurfModifierData *smd = (SubsurfModifierData *) md;
DerivedMesh *result;
result = subsurf_make_derived_from_derived(derivedData, smd, 0,
- NULL, 0, 1, 1);
+ NULL, 0, 1, 1);
return result;
}
@@ -128,11 +128,11 @@ ModifierTypeInfo modifierType_Subsurf = {
/* structName */ "SubsurfModifierData",
/* structSize */ sizeof(SubsurfModifierData),
/* type */ eModifierTypeType_Constructive,
- /* flags */ eModifierTypeFlag_AcceptsMesh
- | eModifierTypeFlag_SupportsMapping
- | eModifierTypeFlag_SupportsEditmode
- | eModifierTypeFlag_EnableInEditmode
- | eModifierTypeFlag_AcceptsCVs,
+ /* flags */ eModifierTypeFlag_AcceptsMesh |
+ eModifierTypeFlag_SupportsMapping |
+ eModifierTypeFlag_SupportsEditmode |
+ eModifierTypeFlag_EnableInEditmode |
+ eModifierTypeFlag_AcceptsCVs,
/* copyData */ copyData,
/* deformVerts */ NULL,
diff --git a/source/blender/modifiers/intern/MOD_surface.c b/source/blender/modifiers/intern/MOD_surface.c
index 86e11aca5b7..9483dede73d 100644
--- a/source/blender/modifiers/intern/MOD_surface.c
+++ b/source/blender/modifiers/intern/MOD_surface.c
@@ -51,14 +51,14 @@
static void initData(ModifierData *md)
{
- SurfaceModifierData *surmd = (SurfaceModifierData*) md;
+ SurfaceModifierData *surmd = (SurfaceModifierData *) md;
surmd->bvhtree = NULL;
}
static void freeData(ModifierData *md)
{
- SurfaceModifierData *surmd = (SurfaceModifierData*) md;
+ SurfaceModifierData *surmd = (SurfaceModifierData *) md;
if (surmd) {
if (surmd->bvhtree) {
@@ -86,13 +86,13 @@ static int dependsOnTime(ModifierData *UNUSED(md))
}
static void deformVerts(ModifierData *md, Object *ob,
- DerivedMesh *derivedData,
- float (*vertexCos)[3],
- int UNUSED(numVerts),
- int UNUSED(useRenderParams),
- int UNUSED(isFinalCalc))
+ DerivedMesh *derivedData,
+ float (*vertexCos)[3],
+ int UNUSED(numVerts),
+ int UNUSED(useRenderParams),
+ int UNUSED(isFinalCalc))
{
- SurfaceModifierData *surmd = (SurfaceModifierData*) md;
+ SurfaceModifierData *surmd = (SurfaceModifierData *) md;
if (surmd->dm)
surmd->dm->release(surmd->dm);
@@ -115,9 +115,13 @@ static void deformVerts(ModifierData *md, Object *ob,
CDDM_apply_vert_coords(surmd->dm, vertexCos);
CDDM_calc_normals(surmd->dm);
- numverts = surmd->dm->getNumVerts ( surmd->dm );
+ numverts = surmd->dm->getNumVerts(surmd->dm);
- if (numverts != surmd->numverts || surmd->x == NULL || surmd->v == NULL || md->scene->r.cfra != surmd->cfra+1) {
+ if (numverts != surmd->numverts ||
+ surmd->x == NULL ||
+ surmd->v == NULL ||
+ md->scene->r.cfra != surmd->cfra + 1)
+ {
if (surmd->x) {
MEM_freeN(surmd->x);
surmd->x = NULL;
@@ -136,7 +140,7 @@ static void deformVerts(ModifierData *md, Object *ob,
}
/* convert to global coordinates and calculate velocity */
- for (i = 0, x = surmd->x, v = surmd->v; i<numverts; i++, x++, v++) {
+ for (i = 0, x = surmd->x, v = surmd->v; i < numverts; i++, x++, v++) {
vec = CDDM_get_vert(surmd->dm, i)->co;
mul_m4_v3(ob->obmat, vec);
@@ -168,8 +172,8 @@ ModifierTypeInfo modifierType_Surface = {
/* structName */ "SurfaceModifierData",
/* structSize */ sizeof(SurfaceModifierData),
/* type */ eModifierTypeType_OnlyDeform,
- /* flags */ eModifierTypeFlag_AcceptsMesh
- | eModifierTypeFlag_NoUserAdd,
+ /* flags */ eModifierTypeFlag_AcceptsMesh |
+ eModifierTypeFlag_NoUserAdd,
/* copyData */ NULL,
/* deformVerts */ deformVerts,
@@ -186,6 +190,6 @@ ModifierTypeInfo modifierType_Surface = {
/* dependsOnTime */ dependsOnTime,
/* dependsOnNormals */ NULL,
/* foreachObjectLink */ NULL,
- /* foreachIDLink */ NULL,
- /* foreachTexLink */ NULL,
+ /* foreachIDLink */ NULL,
+ /* foreachTexLink */ NULL,
};
diff --git a/source/blender/modifiers/intern/MOD_util.c b/source/blender/modifiers/intern/MOD_util.c
index e134ff9dcca..aff6bf548e6 100644
--- a/source/blender/modifiers/intern/MOD_util.c
+++ b/source/blender/modifiers/intern/MOD_util.c
@@ -66,7 +66,7 @@ void modifier_init_texture(Scene *scene, Tex *tex)
return;
if (tex->ima && ELEM(tex->ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE))
- BKE_image_user_calc_frame(&tex->iuser, scene->r.cfra, 0);
+ BKE_image_user_frame_calc(&tex->iuser, scene->r.cfra, 0);
}
void get_texture_value(Tex *texture, float *tex_co, TexResult *texres)
@@ -77,14 +77,15 @@ void get_texture_value(Tex *texture, float *tex_co, TexResult *texres)
result_type = multitex_ext_safe(texture, tex_co, texres);
/* if the texture gave an RGB value, we assume it didn't give a valid
- * intensity, so calculate one (formula from do_material_tex).
+ * intensity, since this is in the context of modifiers don't use perceptual color conversion.
* if the texture didn't give an RGB value, copy the intensity across
*/
- if (result_type & TEX_RGB)
- texres->tin = (0.35f * texres->tr + 0.45f * texres->tg
- + 0.2f * texres->tb);
- else
- texres->tr = texres->tg = texres->tb = texres->tin;
+ if (result_type & TEX_RGB) {
+ texres->tin= (1.0f / 3.0f) * (texres->tr + texres->tg + texres->tb);
+ }
+ else {
+ copy_v3_fl(&texres->tr, texres->tin);
+ }
}
void get_texture_coords(MappingInfoModifierData *dmd, Object *ob,
@@ -120,11 +121,11 @@ void get_texture_coords(MappingInfoModifierData *dmd, Object *ob,
/* verts are given the UV from the first face that uses them */
for (i = 0, mp = mpoly; i < numPolys; ++i, ++mp) {
- unsigned int fidx= mp->totloop - 1;
+ unsigned int fidx = mp->totloop - 1;
do {
- unsigned int lidx= mp->loopstart + fidx;
- unsigned int vidx= mloop[lidx].v;
+ unsigned int lidx = mp->loopstart + fidx;
+ unsigned int vidx = mloop[lidx].v;
if (done[vidx] == 0) {
/* remap UVs from [0, 1] to [-1, 1] */
@@ -144,27 +145,27 @@ void get_texture_coords(MappingInfoModifierData *dmd, Object *ob,
}
for (i = 0; i < numVerts; ++i, ++co, ++texco) {
- switch(texmapping) {
- case MOD_DISP_MAP_LOCAL:
- copy_v3_v3(*texco, *co);
- break;
- case MOD_DISP_MAP_GLOBAL:
- mul_v3_m4v3(*texco, ob->obmat, *co);
- break;
- case MOD_DISP_MAP_OBJECT:
- mul_v3_m4v3(*texco, ob->obmat, *co);
- mul_m4_v3(mapob_imat, *texco);
- break;
+ switch (texmapping) {
+ case MOD_DISP_MAP_LOCAL:
+ copy_v3_v3(*texco, *co);
+ break;
+ case MOD_DISP_MAP_GLOBAL:
+ mul_v3_m4v3(*texco, ob->obmat, *co);
+ break;
+ case MOD_DISP_MAP_OBJECT:
+ mul_v3_m4v3(*texco, ob->obmat, *co);
+ mul_m4_v3(mapob_imat, *texco);
+ break;
}
}
}
void modifier_vgroup_cache(ModifierData *md, float (*vertexCos)[3])
{
- while ((md=md->next) && md->type==eModifierType_Armature) {
- ArmatureModifierData *amd = (ArmatureModifierData*) md;
- if (amd->multi && amd->prevCos==NULL)
- amd->prevCos= MEM_dupallocN(vertexCos);
+ while ((md = md->next) && md->type == eModifierType_Armature) {
+ ArmatureModifierData *amd = (ArmatureModifierData *) md;
+ if (amd->multi && amd->prevCos == NULL)
+ amd->prevCos = MEM_dupallocN(vertexCos);
else
break;
}
@@ -178,10 +179,10 @@ DerivedMesh *get_cddm(Object *ob, struct BMEditMesh *em, DerivedMesh *dm, float
return dm;
if (!dm) {
- dm= get_dm(ob, em, dm, vertexCos, 0);
+ dm = get_dm(ob, em, dm, vertexCos, 0);
}
else {
- dm= CDDM_copy(dm);
+ dm = CDDM_copy(dm);
CDDM_apply_vert_coords(dm, vertexCos);
}
@@ -197,8 +198,8 @@ DerivedMesh *get_dm(Object *ob, struct BMEditMesh *em, DerivedMesh *dm, float (*
if (dm)
return dm;
- if (ob->type==OB_MESH) {
- if (em) dm= CDDM_from_BMEditMesh(em, ob->data, FALSE, FALSE);
+ if (ob->type == OB_MESH) {
+ if (em) dm = CDDM_from_BMEditMesh(em, ob->data, FALSE, FALSE);
else dm = CDDM_from_mesh((struct Mesh *)(ob->data), ob);
if (vertexCos) {
@@ -207,10 +208,10 @@ DerivedMesh *get_dm(Object *ob, struct BMEditMesh *em, DerivedMesh *dm, float (*
}
if (orco)
- DM_add_vert_layer(dm, CD_ORCO, CD_ASSIGN, get_mesh_orco_verts(ob));
+ DM_add_vert_layer(dm, CD_ORCO, CD_ASSIGN, BKE_mesh_orco_verts_get(ob));
}
- else if (ELEM3(ob->type,OB_FONT,OB_CURVE,OB_SURF)) {
- dm= CDDM_from_curve(ob);
+ else if (ELEM3(ob->type, OB_FONT, OB_CURVE, OB_SURF)) {
+ dm = CDDM_from_curve(ob);
}
return dm;
@@ -223,7 +224,7 @@ void modifier_get_vgroup(Object *ob, DerivedMesh *dm, const char *name, MDeformV
if (*defgrp_index >= 0) {
if (ob->type == OB_LATTICE)
- *dvert = lattice_get_deform_verts(ob);
+ *dvert = BKE_lattice_deform_verts_get(ob);
else if (dm)
*dvert = dm->getVertDataArray(dm, CD_MDEFORMVERT);
}
diff --git a/source/blender/modifiers/intern/MOD_uvproject.c b/source/blender/modifiers/intern/MOD_uvproject.c
index 1b96c586cbf..ccfda6af59f 100644
--- a/source/blender/modifiers/intern/MOD_uvproject.c
+++ b/source/blender/modifiers/intern/MOD_uvproject.c
@@ -58,7 +58,7 @@
static void initData(ModifierData *md)
{
- UVProjectModifierData *umd = (UVProjectModifierData*) md;
+ UVProjectModifierData *umd = (UVProjectModifierData *) md;
int i;
for (i = 0; i < MOD_UVPROJECT_MAXPROJECTORS; ++i)
@@ -72,8 +72,8 @@ static void initData(ModifierData *md)
static void copyData(ModifierData *md, ModifierData *target)
{
- UVProjectModifierData *umd = (UVProjectModifierData*) md;
- UVProjectModifierData *tumd = (UVProjectModifierData*) target;
+ UVProjectModifierData *umd = (UVProjectModifierData *) md;
+ UVProjectModifierData *tumd = (UVProjectModifierData *) target;
int i;
for (i = 0; i < MOD_UVPROJECT_MAXPROJECTORS; ++i)
@@ -99,9 +99,9 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *UNUSED(
}
static void foreachObjectLink(ModifierData *md, Object *ob,
- ObjectWalkFunc walk, void *userData)
+ ObjectWalkFunc walk, void *userData)
{
- UVProjectModifierData *umd = (UVProjectModifierData*) md;
+ UVProjectModifierData *umd = (UVProjectModifierData *) md;
int i;
for (i = 0; i < MOD_UVPROJECT_MAXPROJECTORS; ++i)
@@ -109,22 +109,22 @@ static void foreachObjectLink(ModifierData *md, Object *ob,
}
static void foreachIDLink(ModifierData *md, Object *ob,
- IDWalkFunc walk, void *userData)
+ IDWalkFunc walk, void *userData)
{
- UVProjectModifierData *umd = (UVProjectModifierData*) md;
+ UVProjectModifierData *umd = (UVProjectModifierData *) md;
walk(userData, ob, (ID **)&umd->image);
foreachObjectLink(md, ob, (ObjectWalkFunc)walk,
- userData);
+ userData);
}
static void updateDepgraph(ModifierData *md, DagForest *forest,
- struct Scene *UNUSED(scene),
- Object *UNUSED(ob),
- DagNode *obNode)
+ struct Scene *UNUSED(scene),
+ Object *UNUSED(ob),
+ DagNode *obNode)
{
- UVProjectModifierData *umd = (UVProjectModifierData*) md;
+ UVProjectModifierData *umd = (UVProjectModifierData *) md;
int i;
for (i = 0; i < umd->num_projectors; ++i) {
@@ -132,20 +132,20 @@ static void updateDepgraph(ModifierData *md, DagForest *forest,
DagNode *curNode = dag_get_node(forest, umd->projectors[i]);
dag_add_relation(forest, curNode, obNode,
- DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "UV Project Modifier");
+ DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "UV Project Modifier");
}
}
}
typedef struct Projector {
- Object *ob; /* object this projector is derived from */
- float projmat[4][4]; /* projection matrix */
- float normal[3]; /* projector normal in world space */
- void *uci; /* optional uv-project info (panorama projection) */
+ Object *ob; /* object this projector is derived from */
+ float projmat[4][4]; /* projection matrix */
+ float normal[3]; /* projector normal in world space */
+ void *uci; /* optional uv-project info (panorama projection) */
} Projector;
static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd,
- Object *ob, DerivedMesh *dm)
+ Object *ob, DerivedMesh *dm)
{
float (*coords)[3], (*co)[3];
MLoopUV *mloop_uv;
@@ -159,11 +159,11 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd,
int num_projectors = 0;
float aspect;
char uvname[MAX_CUSTOMDATA_LAYER_NAME];
- float aspx= umd->aspectx ? umd->aspectx : 1.0f;
- float aspy= umd->aspecty ? umd->aspecty : 1.0f;
- float scax= umd->scalex ? umd->scalex : 1.0f;
- float scay= umd->scaley ? umd->scaley : 1.0f;
- int free_uci= 0;
+ float aspx = umd->aspectx ? umd->aspectx : 1.0f;
+ float aspy = umd->aspecty ? umd->aspecty : 1.0f;
+ float scax = umd->scalex ? umd->scalex : 1.0f;
+ float scay = umd->scaley ? umd->scaley : 1.0f;
+ int free_uci = 0;
aspect = aspx / aspy;
@@ -188,23 +188,23 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd,
/* calculate projection matrix */
invert_m4_m4(projectors[i].projmat, projectors[i].ob->obmat);
- projectors[i].uci= NULL;
+ projectors[i].uci = NULL;
if (projectors[i].ob->type == OB_CAMERA) {
cam = (Camera *)projectors[i].ob->data;
- if (cam->flag & CAM_PANORAMA) {
- projectors[i].uci= project_camera_info(projectors[i].ob, NULL, aspx, aspy);
- project_camera_info_scale(projectors[i].uci, scax, scay);
- free_uci= 1;
+ if (cam->type == CAM_PANO) {
+ projectors[i].uci = BLI_uvproject_camera_info(projectors[i].ob, NULL, aspx, aspy);
+ BLI_uvproject_camera_info_scale(projectors[i].uci, scax, scay);
+ free_uci = 1;
}
else {
- float sensor= camera_sensor_size(cam->sensor_fit, cam->sensor_x, cam->sensor_y);
- int sensor_fit= camera_sensor_fit(cam->sensor_fit, aspx, aspy);
- float scale= (cam->type == CAM_PERSP) ? cam->clipsta * sensor / cam->lens : cam->ortho_scale;
+ float sensor = BKE_camera_sensor_size(cam->sensor_fit, cam->sensor_x, cam->sensor_y);
+ int sensor_fit = BKE_camera_sensor_fit(cam->sensor_fit, aspx, aspy);
+ float scale = (cam->type == CAM_PERSP) ? cam->clipsta * sensor / cam->lens : cam->ortho_scale;
float xmax, xmin, ymax, ymin;
- if (sensor_fit==CAMERA_SENSOR_FIT_HOR) {
+ if (sensor_fit == CAMERA_SENSOR_FIT_HOR) {
xmax = 0.5f * scale;
ymax = xmax / aspect;
}
@@ -224,12 +224,12 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd,
if (cam->type == CAM_PERSP) {
float perspmat[4][4];
- perspective_m4( perspmat,xmin, xmax, ymin, ymax, cam->clipsta, cam->clipend);
+ perspective_m4(perspmat, xmin, xmax, ymin, ymax, cam->clipsta, cam->clipend);
mult_m4_m4m4(tmpmat, perspmat, projectors[i].projmat);
}
else { /* if (cam->type == CAM_ORTHO) */
float orthomat[4][4];
- orthographic_m4( orthomat,xmin, xmax, ymin, ymax, cam->clipsta, cam->clipend);
+ orthographic_m4(orthomat, xmin, xmax, ymin, ymax, cam->clipsta, cam->clipend);
mult_m4_m4m4(tmpmat, orthomat, projectors[i].projmat);
}
}
@@ -248,12 +248,12 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd,
offsetmat[3][1] -= cam->shifty;
}
else if (aspx < aspy) {
- offsetmat[3][0] -=(cam->shiftx * aspy/aspx);
+ offsetmat[3][0] -= (cam->shiftx * aspy / aspx);
offsetmat[3][1] -= cam->shifty;
}
else {
offsetmat[3][0] -= cam->shiftx;
- offsetmat[3][1] -=(cam->shifty * aspx/aspy);
+ offsetmat[3][1] -= (cam->shifty * aspx / aspy);
}
}
@@ -271,16 +271,16 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd,
/* make sure we are not modifying the original UV map */
mloop_uv = CustomData_duplicate_referenced_layer_named(&dm->loopData,
- CD_MLOOPUV, uvname, numLoops);
+ CD_MLOOPUV, uvname, numLoops);
/* can be NULL */
mt = mtexpoly = CustomData_duplicate_referenced_layer_named(&dm->polyData,
- CD_MTEXPOLY, uvname, numPolys);
+ CD_MTEXPOLY, uvname, numPolys);
numVerts = dm->getNumVerts(dm);
coords = MEM_callocN(sizeof(*coords) * numVerts,
- "uvprojectModifier_do coords");
+ "uvprojectModifier_do coords");
dm->getVertCos(dm, coords);
/* convert coords to world space */
@@ -288,7 +288,7 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd,
mul_m4_v3(ob->obmat, *co);
/* if only one projector, project coords to UVs */
- if (num_projectors == 1 && projectors[0].uci==NULL)
+ if (num_projectors == 1 && projectors[0].uci == NULL)
for (i = 0, co = coords; i < numVerts; ++i, ++co)
mul_project_m4_v3(projectors[0].projmat, *co);
@@ -300,19 +300,19 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd,
if (override_image || !image || (mtexpoly == NULL || mt->tpage == image)) {
if (num_projectors == 1) {
if (projectors[0].uci) {
- unsigned int fidx= mp->totloop - 1;
+ unsigned int fidx = mp->totloop - 1;
do {
- unsigned int lidx= mp->loopstart + fidx;
- unsigned int vidx= mloop[lidx].v;
- project_from_camera(mloop_uv[lidx].uv, coords[vidx], projectors[0].uci);
+ unsigned int lidx = mp->loopstart + fidx;
+ unsigned int vidx = mloop[lidx].v;
+ BLI_uvproject_from_camera(mloop_uv[lidx].uv, coords[vidx], projectors[0].uci);
} while (fidx--);
}
else {
/* apply transformed coords as UVs */
- unsigned int fidx= mp->totloop - 1;
+ unsigned int fidx = mp->totloop - 1;
do {
- unsigned int lidx= mp->loopstart + fidx;
- unsigned int vidx= mloop[lidx].v;
+ unsigned int lidx = mp->loopstart + fidx;
+ unsigned int vidx = mloop[lidx].v;
copy_v2_v2(mloop_uv[lidx].uv, coords[vidx]);
} while (fidx--);
}
@@ -325,7 +325,7 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd,
float best_dot;
/* get the untransformed face normal */
- mesh_calc_poly_normal_coords(mp, mloop + mp->loopstart, (const float (*)[3])coords, face_no);
+ BKE_mesh_calc_poly_normal_coords(mp, mloop + mp->loopstart, (const float (*)[3])coords, face_no);
/* find the projector which the face points at most directly
* (projector normal with largest dot product is best)
@@ -335,7 +335,7 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd,
for (j = 1; j < num_projectors; ++j) {
float tmp_dot = dot_v3v3(projectors[j].normal,
- face_no);
+ face_no);
if (tmp_dot > best_dot) {
best_dot = tmp_dot;
best_projector = &projectors[j];
@@ -343,18 +343,18 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd,
}
if (best_projector->uci) {
- unsigned int fidx= mp->totloop - 1;
+ unsigned int fidx = mp->totloop - 1;
do {
- unsigned int lidx= mp->loopstart + fidx;
- unsigned int vidx= mloop[lidx].v;
- project_from_camera(mloop_uv[lidx].uv, coords[vidx], best_projector->uci);
+ unsigned int lidx = mp->loopstart + fidx;
+ unsigned int vidx = mloop[lidx].v;
+ BLI_uvproject_from_camera(mloop_uv[lidx].uv, coords[vidx], best_projector->uci);
} while (fidx--);
}
else {
- unsigned int fidx= mp->totloop - 1;
+ unsigned int fidx = mp->totloop - 1;
do {
- unsigned int lidx= mp->loopstart + fidx;
- unsigned int vidx= mloop[lidx].v;
+ unsigned int lidx = mp->loopstart + fidx;
+ unsigned int vidx = mloop[lidx].v;
float tco[3];
copy_v3_v3(tco, coords[vidx]);
@@ -389,12 +389,12 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd,
}
static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
- DerivedMesh *derivedData,
- int UNUSED(useRenderParams),
- int UNUSED(isFinalCalc))
+ DerivedMesh *derivedData,
+ int UNUSED(useRenderParams),
+ int UNUSED(isFinalCalc))
{
DerivedMesh *result;
- UVProjectModifierData *umd = (UVProjectModifierData*) md;
+ UVProjectModifierData *umd = (UVProjectModifierData *) md;
result = uvprojectModifier_do(umd, ob, derivedData);
@@ -402,8 +402,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
}
static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob,
- struct BMEditMesh *UNUSED(editData),
- DerivedMesh *derivedData)
+ struct BMEditMesh *UNUSED(editData),
+ DerivedMesh *derivedData)
{
return applyModifier(md, ob, derivedData, 0, 1);
}
@@ -414,10 +414,10 @@ ModifierTypeInfo modifierType_UVProject = {
/* structName */ "UVProjectModifierData",
/* structSize */ sizeof(UVProjectModifierData),
/* type */ eModifierTypeType_NonGeometrical,
- /* flags */ eModifierTypeFlag_AcceptsMesh
- | eModifierTypeFlag_SupportsMapping
- | eModifierTypeFlag_SupportsEditmode
- | eModifierTypeFlag_EnableInEditmode,
+ /* flags */ eModifierTypeFlag_AcceptsMesh |
+ eModifierTypeFlag_SupportsMapping |
+ eModifierTypeFlag_SupportsEditmode |
+ eModifierTypeFlag_EnableInEditmode,
/* copyData */ copyData,
/* deformVerts */ NULL,
diff --git a/source/blender/modifiers/intern/MOD_warp.c b/source/blender/modifiers/intern/MOD_warp.c
index dd89ad59abd..1a654351ea8 100644
--- a/source/blender/modifiers/intern/MOD_warp.c
+++ b/source/blender/modifiers/intern/MOD_warp.c
@@ -29,6 +29,9 @@
#include "MEM_guardedalloc.h"
+#include "DNA_object_types.h"
+#include "DNA_meshdata_types.h"
+
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BLI_string.h"
@@ -39,9 +42,6 @@
#include "BKE_texture.h"
#include "BKE_colortools.h"
-#include "DNA_object_types.h"
-#include "DNA_meshdata_types.h"
-
#include "depsgraph_private.h"
#include "RE_shader_ext.h"
@@ -51,7 +51,7 @@
static void initData(ModifierData *md)
{
- WarpModifierData *wmd = (WarpModifierData*) md;
+ WarpModifierData *wmd = (WarpModifierData *) md;
wmd->curfalloff = curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
wmd->texture = NULL;
@@ -63,8 +63,8 @@ static void initData(ModifierData *md)
static void copyData(ModifierData *md, ModifierData *target)
{
- WarpModifierData *wmd = (WarpModifierData*) md;
- WarpModifierData *twmd = (WarpModifierData*) target;
+ WarpModifierData *wmd = (WarpModifierData *) md;
+ WarpModifierData *twmd = (WarpModifierData *) target;
twmd->object_from = wmd->object_from;
twmd->object_to = wmd->object_to;
@@ -79,7 +79,7 @@ static void copyData(ModifierData *md, ModifierData *target)
twmd->texture = wmd->texture;
twmd->map_object = wmd->map_object;
BLI_strncpy(twmd->uvlayer_name, wmd->uvlayer_name, sizeof(twmd->uvlayer_name));
- twmd->texmapping= wmd->texmapping;
+ twmd->texmapping = wmd->texmapping;
}
static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
@@ -118,14 +118,14 @@ static void freeData(ModifierData *md)
static int isDisabled(ModifierData *md, int UNUSED(userRenderParams))
{
- WarpModifierData *wmd = (WarpModifierData*) md;
+ WarpModifierData *wmd = (WarpModifierData *) md;
return !(wmd->object_from && wmd->object_to);
}
static void foreachObjectLink(ModifierData *md, Object *ob, ObjectWalkFunc walk, void *userData)
{
- WarpModifierData *wmd = (WarpModifierData*) md;
+ WarpModifierData *wmd = (WarpModifierData *) md;
walk(userData, ob, &wmd->object_from);
walk(userData, ob, &wmd->object_to);
@@ -134,7 +134,7 @@ static void foreachObjectLink(ModifierData *md, Object *ob, ObjectWalkFunc walk,
static void foreachIDLink(ModifierData *md, Object *ob, IDWalkFunc walk, void *userData)
{
- WarpModifierData *wmd = (WarpModifierData*) md;
+ WarpModifierData *wmd = (WarpModifierData *) md;
walk(userData, ob, (ID **)&wmd->texture);
@@ -151,7 +151,7 @@ static void foreachTexLink(ModifierData *md, Object *ob, TexWalkFunc walk, void
static void updateDepgraph(ModifierData *md, DagForest *forest, struct Scene *UNUSED(scene),
Object *UNUSED(ob), DagNode *obNode)
{
- WarpModifierData *wmd = (WarpModifierData*) md;
+ WarpModifierData *wmd = (WarpModifierData *) md;
if (wmd->object_from && wmd->object_to) {
DagNode *fromNode = dag_get_node(forest, wmd->object_from);
@@ -183,16 +183,16 @@ static void warpModifier_do(WarpModifierData *wmd, Object *ob,
float fac = 1.0f, weight;
int i;
int defgrp_index;
- MDeformVert *dvert, *dv= NULL;
+ MDeformVert *dvert, *dv = NULL;
- float (*tex_co)[3]= NULL;
+ float (*tex_co)[3] = NULL;
if (!(wmd->object_from && wmd->object_to))
return;
modifier_get_vgroup(ob, dm, wmd->defgrp_name, &dvert, &defgrp_index);
- if (wmd->curfalloff==NULL) /* should never happen, but bad lib linking could cause it */
+ if (wmd->curfalloff == NULL) /* should never happen, but bad lib linking could cause it */
wmd->curfalloff = curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
invert_m4_m4(obinv, ob->obmat);
@@ -217,7 +217,7 @@ static void warpModifier_do(WarpModifierData *wmd, Object *ob,
negate_v3_v3(mat_final[3], loc);
}
- weight= strength;
+ weight = strength;
if (wmd->texture) {
tex_co = MEM_mallocN(sizeof(*tex_co) * numVerts, "warpModifier_do tex_co");
@@ -229,9 +229,10 @@ static void warpModifier_do(WarpModifierData *wmd, Object *ob,
for (i = 0; i < numVerts; i++) {
float *co = vertexCos[i];
- if (wmd->falloff_type==eWarp_Falloff_None ||
- ((fac=len_v3v3(co, mat_from[3])) < wmd->falloff_radius && (fac=(wmd->falloff_radius-fac)/wmd->falloff_radius)) ) {
-
+ if (wmd->falloff_type == eWarp_Falloff_None ||
+ ((fac = len_v3v3(co, mat_from[3])) < wmd->falloff_radius &&
+ (fac = (wmd->falloff_radius - fac) / wmd->falloff_radius)))
+ {
/* skip if no vert group found */
if (dvert && defgrp_index >= 0) {
dv = &dvert[i];
@@ -245,31 +246,31 @@ static void warpModifier_do(WarpModifierData *wmd, Object *ob,
/* closely match PROP_SMOOTH and similar */
- switch(wmd->falloff_type) {
- case eWarp_Falloff_None:
- fac = 1.0f;
- break;
- case eWarp_Falloff_Curve:
- fac = curvemapping_evaluateF(wmd->curfalloff, 0, fac);
- break;
- case eWarp_Falloff_Sharp:
- fac = fac*fac;
- break;
- case eWarp_Falloff_Smooth:
- fac = 3.0f*fac*fac - 2.0f*fac*fac*fac;
- break;
- case eWarp_Falloff_Root:
- fac = (float)sqrt(fac);
- break;
- case eWarp_Falloff_Linear:
- /* pass */
- break;
- case eWarp_Falloff_Const:
- fac = 1.0f;
- break;
- case eWarp_Falloff_Sphere:
- fac = (float)sqrt(2*fac - fac * fac);
- break;
+ switch (wmd->falloff_type) {
+ case eWarp_Falloff_None:
+ fac = 1.0f;
+ break;
+ case eWarp_Falloff_Curve:
+ fac = curvemapping_evaluateF(wmd->curfalloff, 0, fac);
+ break;
+ case eWarp_Falloff_Sharp:
+ fac = fac * fac;
+ break;
+ case eWarp_Falloff_Smooth:
+ fac = 3.0f * fac * fac - 2.0f * fac * fac * fac;
+ break;
+ case eWarp_Falloff_Root:
+ fac = (float)sqrt(fac);
+ break;
+ case eWarp_Falloff_Linear:
+ /* pass */
+ break;
+ case eWarp_Falloff_Const:
+ fac = 1.0f;
+ break;
+ case eWarp_Falloff_Sphere:
+ fac = (float)sqrt(2 * fac - fac * fac);
+ break;
}
fac *= weight;
@@ -318,11 +319,11 @@ static int warp_needs_dm(WarpModifierData *wmd)
static void deformVerts(ModifierData *md, Object *ob, DerivedMesh *derivedData,
float (*vertexCos)[3], int numVerts, int UNUSED(useRenderParams), int UNUSED(isFinalCalc))
{
- DerivedMesh *dm= NULL;
- int use_dm= warp_needs_dm((WarpModifierData *)md);
+ DerivedMesh *dm = NULL;
+ int use_dm = warp_needs_dm((WarpModifierData *)md);
if (use_dm) {
- dm= get_cddm(ob, NULL, derivedData, vertexCos);
+ dm = get_cddm(ob, NULL, derivedData, vertexCos);
}
warpModifier_do((WarpModifierData *)md, ob, dm, vertexCos, numVerts);
@@ -336,7 +337,7 @@ static void deformVertsEM(ModifierData *md, Object *ob, struct BMEditMesh *editD
DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
{
DerivedMesh *dm = derivedData;
- int use_dm= warp_needs_dm((WarpModifierData *)md);
+ int use_dm = warp_needs_dm((WarpModifierData *)md);
if (use_dm) {
if (!derivedData)
@@ -352,27 +353,27 @@ static void deformVertsEM(ModifierData *md, Object *ob, struct BMEditMesh *editD
ModifierTypeInfo modifierType_Warp = {
- /* name */ "Warp",
- /* structName */ "WarpModifierData",
- /* structSize */ sizeof(WarpModifierData),
- /* type */ eModifierTypeType_OnlyDeform,
- /* flags */ eModifierTypeFlag_AcceptsCVs
- | eModifierTypeFlag_SupportsEditmode,
- /* copyData */ copyData,
- /* deformVerts */ deformVerts,
- /* deformMatrices */ NULL,
- /* deformVertsEM */ deformVertsEM,
- /* deformMatricesEM */ NULL,
- /* applyModifier */ 0,
- /* applyModifierEM */ 0,
- /* initData */ initData,
- /* requiredDataMask */ requiredDataMask,
- /* freeData */ freeData,
- /* isDisabled */ isDisabled,
- /* updateDepgraph */ updateDepgraph,
- /* dependsOnTime */ dependsOnTime,
- /* dependsOnNormals */ NULL,
+ /* name */ "Warp",
+ /* structName */ "WarpModifierData",
+ /* structSize */ sizeof(WarpModifierData),
+ /* type */ eModifierTypeType_OnlyDeform,
+ /* flags */ eModifierTypeFlag_AcceptsCVs |
+ eModifierTypeFlag_SupportsEditmode,
+ /* copyData */ copyData,
+ /* deformVerts */ deformVerts,
+ /* deformMatrices */ NULL,
+ /* deformVertsEM */ deformVertsEM,
+ /* deformMatricesEM */ NULL,
+ /* applyModifier */ 0,
+ /* applyModifierEM */ 0,
+ /* initData */ initData,
+ /* requiredDataMask */ requiredDataMask,
+ /* freeData */ freeData,
+ /* isDisabled */ isDisabled,
+ /* updateDepgraph */ updateDepgraph,
+ /* dependsOnTime */ dependsOnTime,
+ /* dependsOnNormals */ NULL,
/* foreachObjectLink */ foreachObjectLink,
- /* foreachIDLink */ foreachIDLink,
- /* foreachTexLink */ foreachTexLink,
+ /* foreachIDLink */ foreachIDLink,
+ /* foreachTexLink */ foreachTexLink,
};
diff --git a/source/blender/modifiers/intern/MOD_wave.c b/source/blender/modifiers/intern/MOD_wave.c
index 78e76e27c02..042401ee26f 100644
--- a/source/blender/modifiers/intern/MOD_wave.c
+++ b/source/blender/modifiers/intern/MOD_wave.c
@@ -58,29 +58,29 @@
static void initData(ModifierData *md)
{
- WaveModifierData *wmd = (WaveModifierData*) md; // whadya know, moved here from Iraq
+ WaveModifierData *wmd = (WaveModifierData *) md; // whadya know, moved here from Iraq
- wmd->flag |= (MOD_WAVE_X | MOD_WAVE_Y | MOD_WAVE_CYCL
- | MOD_WAVE_NORM_X | MOD_WAVE_NORM_Y | MOD_WAVE_NORM_Z);
+ wmd->flag |= (MOD_WAVE_X | MOD_WAVE_Y | MOD_WAVE_CYCL |
+ MOD_WAVE_NORM_X | MOD_WAVE_NORM_Y | MOD_WAVE_NORM_Z);
wmd->objectcenter = NULL;
wmd->texture = NULL;
wmd->map_object = NULL;
- wmd->height= 0.5f;
- wmd->width= 1.5f;
- wmd->speed= 0.25f;
- wmd->narrow= 1.5f;
- wmd->lifetime= 0.0f;
- wmd->damp= 10.0f;
- wmd->falloff= 0.0f;
+ wmd->height = 0.5f;
+ wmd->width = 1.5f;
+ wmd->speed = 0.25f;
+ wmd->narrow = 1.5f;
+ wmd->lifetime = 0.0f;
+ wmd->damp = 10.0f;
+ wmd->falloff = 0.0f;
wmd->texmapping = MOD_DISP_MAP_LOCAL;
wmd->defgrp_name[0] = 0;
}
static void copyData(ModifierData *md, ModifierData *target)
{
- WaveModifierData *wmd = (WaveModifierData*) md;
- WaveModifierData *twmd = (WaveModifierData*) target;
+ WaveModifierData *wmd = (WaveModifierData *) md;
+ WaveModifierData *twmd = (WaveModifierData *) target;
twmd->damp = wmd->damp;
twmd->flag = wmd->flag;
@@ -106,19 +106,19 @@ static int dependsOnTime(ModifierData *UNUSED(md))
}
static void foreachObjectLink(
- ModifierData *md, Object *ob,
- ObjectWalkFunc walk, void *userData)
+ ModifierData *md, Object *ob,
+ ObjectWalkFunc walk, void *userData)
{
- WaveModifierData *wmd = (WaveModifierData*) md;
+ WaveModifierData *wmd = (WaveModifierData *) md;
walk(userData, ob, &wmd->objectcenter);
walk(userData, ob, &wmd->map_object);
}
static void foreachIDLink(ModifierData *md, Object *ob,
- IDWalkFunc walk, void *userData)
+ IDWalkFunc walk, void *userData)
{
- WaveModifierData *wmd = (WaveModifierData*) md;
+ WaveModifierData *wmd = (WaveModifierData *) md;
walk(userData, ob, (ID **)&wmd->texture);
@@ -126,30 +126,30 @@ static void foreachIDLink(ModifierData *md, Object *ob,
}
static void foreachTexLink(ModifierData *md, Object *ob,
- TexWalkFunc walk, void *userData)
+ TexWalkFunc walk, void *userData)
{
walk(userData, ob, md, "texture");
}
static void updateDepgraph(ModifierData *md, DagForest *forest,
- Scene *UNUSED(scene),
- Object *UNUSED(ob),
- DagNode *obNode)
+ Scene *UNUSED(scene),
+ Object *UNUSED(ob),
+ DagNode *obNode)
{
- WaveModifierData *wmd = (WaveModifierData*) md;
+ WaveModifierData *wmd = (WaveModifierData *) md;
if (wmd->objectcenter) {
DagNode *curNode = dag_get_node(forest, wmd->objectcenter);
dag_add_relation(forest, curNode, obNode, DAG_RL_OB_DATA,
- "Wave Modifier");
+ "Wave Modifier");
}
if (wmd->map_object) {
DagNode *curNode = dag_get_node(forest, wmd->map_object);
dag_add_relation(forest, curNode, obNode, DAG_RL_OB_DATA,
- "Wave Modifer");
+ "Wave Modifer");
}
}
@@ -171,21 +171,20 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
}
static void waveModifier_do(WaveModifierData *md,
- Scene *scene, Object *ob, DerivedMesh *dm,
- float (*vertexCos)[3], int numVerts)
+ Scene *scene, Object *ob, DerivedMesh *dm,
+ float (*vertexCos)[3], int numVerts)
{
- WaveModifierData *wmd = (WaveModifierData*) md;
+ WaveModifierData *wmd = (WaveModifierData *) md;
MVert *mvert = NULL;
MDeformVert *dvert;
int defgrp_index;
- float ctime = BKE_curframe(scene);
- float minfac =
- (float)(1.0 / exp(wmd->width * wmd->narrow * wmd->width * wmd->narrow));
+ float ctime = BKE_scene_frame_get(scene);
+ float minfac = (float)(1.0 / exp(wmd->width * wmd->narrow * wmd->width * wmd->narrow));
float lifefac = wmd->height;
float (*tex_co)[3] = NULL;
- const int wmd_axis= wmd->flag & (MOD_WAVE_X|MOD_WAVE_Y);
- const float falloff= wmd->falloff;
- float falloff_fac= 1.0f; /* when falloff == 0.0f this stays at 1.0f */
+ const int wmd_axis = wmd->flag & (MOD_WAVE_X | MOD_WAVE_Y);
+ const float falloff = wmd->falloff;
+ float falloff_fac = 1.0f; /* when falloff == 0.0f this stays at 1.0f */
if (wmd->flag & MOD_WAVE_NORM && ob->type == OB_MESH)
mvert = dm->getVertArray(dm);
@@ -212,14 +211,13 @@ static void waveModifier_do(WaveModifierData *md,
lifefac = x - wmd->lifetime;
if (lifefac > wmd->damp) lifefac = 0.0;
- else lifefac =
- (float)(wmd->height * (1.0f - sqrtf(lifefac / wmd->damp)));
+ else lifefac = (float)(wmd->height * (1.0f - sqrtf(lifefac / wmd->damp)));
}
}
if (wmd->texture) {
tex_co = MEM_mallocN(sizeof(*tex_co) * numVerts,
- "waveModifier_do tex_co");
+ "waveModifier_do tex_co");
get_texture_coords((MappingInfoModifierData *)wmd, ob, dm, vertexCos, tex_co, numVerts);
modifier_init_texture(wmd->modifier.scene, wmd->texture);
@@ -227,19 +225,19 @@ static void waveModifier_do(WaveModifierData *md,
if (lifefac != 0.0f) {
/* avoid divide by zero checks within the loop */
- float falloff_inv= falloff ? 1.0f / falloff : 1.0f;
+ float falloff_inv = falloff ? 1.0f / falloff : 1.0f;
int i;
for (i = 0; i < numVerts; i++) {
float *co = vertexCos[i];
float x = co[0] - wmd->startx;
float y = co[1] - wmd->starty;
- float amplit= 0.0f;
- float def_weight= 1.0f;
+ float amplit = 0.0f;
+ float def_weight = 1.0f;
/* get weights */
if (dvert) {
- def_weight= defvert_find_weight(&dvert[i], defgrp_index);
+ def_weight = defvert_find_weight(&dvert[i], defgrp_index);
/* if this vert isn't in the vgroup, don't deform it */
if (def_weight == 0.0f) {
@@ -247,39 +245,39 @@ static void waveModifier_do(WaveModifierData *md,
}
}
- switch(wmd_axis) {
- case MOD_WAVE_X|MOD_WAVE_Y:
- amplit = sqrtf(x*x + y*y);
- break;
- case MOD_WAVE_X:
- amplit = x;
- break;
- case MOD_WAVE_Y:
- amplit = y;
- break;
+ switch (wmd_axis) {
+ case MOD_WAVE_X | MOD_WAVE_Y:
+ amplit = sqrtf(x * x + y * y);
+ break;
+ case MOD_WAVE_X:
+ amplit = x;
+ break;
+ case MOD_WAVE_Y:
+ amplit = y;
+ break;
}
/* this way it makes nice circles */
amplit -= (ctime - wmd->timeoffs) * wmd->speed;
if (wmd->flag & MOD_WAVE_CYCL) {
- amplit = (float)fmodf(amplit - wmd->width, 2.0f * wmd->width)
- + wmd->width;
+ amplit = (float)fmodf(amplit - wmd->width, 2.0f * wmd->width) +
+ wmd->width;
}
if (falloff != 0.0f) {
float dist = 0.0f;
- switch(wmd_axis) {
- case MOD_WAVE_X|MOD_WAVE_Y:
- dist = sqrtf(x*x + y*y);
- break;
- case MOD_WAVE_X:
- dist = fabsf(x);
- break;
- case MOD_WAVE_Y:
- dist = fabsf(y);
- break;
+ switch (wmd_axis) {
+ case MOD_WAVE_X | MOD_WAVE_Y:
+ dist = sqrtf(x * x + y * y);
+ break;
+ case MOD_WAVE_X:
+ dist = fabsf(x);
+ break;
+ case MOD_WAVE_Y:
+ dist = fabsf(y);
+ break;
}
falloff_fac = (1.0f - (dist * falloff_inv));
@@ -326,19 +324,19 @@ static void waveModifier_do(WaveModifierData *md,
}
static void deformVerts(ModifierData *md, Object *ob,
- DerivedMesh *derivedData,
- float (*vertexCos)[3],
- int numVerts,
- int UNUSED(useRenderParams),
- int UNUSED(isFinalCalc))
+ DerivedMesh *derivedData,
+ float (*vertexCos)[3],
+ int numVerts,
+ int UNUSED(useRenderParams),
+ int UNUSED(isFinalCalc))
{
- DerivedMesh *dm= derivedData;
+ DerivedMesh *dm = derivedData;
WaveModifierData *wmd = (WaveModifierData *)md;
if (wmd->flag & MOD_WAVE_NORM)
- dm= get_cddm(ob, NULL, dm, vertexCos);
+ dm = get_cddm(ob, NULL, dm, vertexCos);
else if (wmd->texture || wmd->defgrp_name[0])
- dm= get_dm(ob, NULL, dm, NULL, 0);
+ dm = get_dm(ob, NULL, dm, NULL, 0);
waveModifier_do(wmd, md->scene, ob, dm, vertexCos, numVerts);
@@ -347,16 +345,16 @@ static void deformVerts(ModifierData *md, Object *ob,
}
static void deformVertsEM(
- ModifierData *md, Object *ob, struct BMEditMesh *editData,
- DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
+ ModifierData *md, Object *ob, struct BMEditMesh *editData,
+ DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
{
- DerivedMesh *dm= derivedData;
+ DerivedMesh *dm = derivedData;
WaveModifierData *wmd = (WaveModifierData *)md;
if (wmd->flag & MOD_WAVE_NORM)
- dm= get_cddm(ob, editData, dm, vertexCos);
+ dm = get_cddm(ob, editData, dm, vertexCos);
else if (wmd->texture || wmd->defgrp_name[0])
- dm= get_dm(ob, editData, dm, NULL, 0);
+ dm = get_dm(ob, editData, dm, NULL, 0);
waveModifier_do(wmd, md->scene, ob, dm, vertexCos, numVerts);
@@ -370,8 +368,8 @@ ModifierTypeInfo modifierType_Wave = {
/* structName */ "WaveModifierData",
/* structSize */ sizeof(WaveModifierData),
/* type */ eModifierTypeType_OnlyDeform,
- /* flags */ eModifierTypeFlag_AcceptsCVs
- | eModifierTypeFlag_SupportsEditmode,
+ /* flags */ eModifierTypeFlag_AcceptsCVs |
+ eModifierTypeFlag_SupportsEditmode,
/* copyData */ copyData,
/* deformVerts */ deformVerts,
/* deformMatrices */ NULL,
diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.c b/source/blender/modifiers/intern/MOD_weightvg_util.c
index 5ce435a7ca5..5097ae8c742 100644
--- a/source/blender/modifiers/intern/MOD_weightvg_util.c
+++ b/source/blender/modifiers/intern/MOD_weightvg_util.c
@@ -69,7 +69,9 @@ void weightvg_do_map(int num, float *new_w, short falloff_type, CurveMapping *cm
!ELEM7(falloff_type, MOD_WVG_MAPPING_CURVE, MOD_WVG_MAPPING_SHARP, MOD_WVG_MAPPING_SMOOTH,
MOD_WVG_MAPPING_ROOT, MOD_WVG_MAPPING_SPHERE, MOD_WVG_MAPPING_RANDOM,
MOD_WVG_MAPPING_STEP))
+ {
return;
+ }
/* Map each weight (vertex) to its new value, accordingly to the chosen mode. */
for (i = 0; i < num; ++i) {
@@ -77,29 +79,29 @@ void weightvg_do_map(int num, float *new_w, short falloff_type, CurveMapping *cm
/* Code borrowed from the warp modifier. */
/* Closely matches PROP_SMOOTH and similar. */
- switch(falloff_type) {
- case MOD_WVG_MAPPING_CURVE:
- fac = curvemapping_evaluateF(cmap, 0, fac);
- break;
- case MOD_WVG_MAPPING_SHARP:
- fac = fac*fac;
- break;
- case MOD_WVG_MAPPING_SMOOTH:
- fac = 3.0f*fac*fac - 2.0f*fac*fac*fac;
- break;
- case MOD_WVG_MAPPING_ROOT:
- fac = (float)sqrt(fac);
- break;
- case MOD_WVG_MAPPING_SPHERE:
- fac = (float)sqrt(2*fac - fac * fac);
- break;
- case MOD_WVG_MAPPING_RANDOM:
- BLI_srand(BLI_rand()); /* random seed */
- fac = BLI_frand()*fac;
- break;
- case MOD_WVG_MAPPING_STEP:
- fac = (fac >= 0.5f)?1.0f:0.0f;
- break;
+ switch (falloff_type) {
+ case MOD_WVG_MAPPING_CURVE:
+ fac = curvemapping_evaluateF(cmap, 0, fac);
+ break;
+ case MOD_WVG_MAPPING_SHARP:
+ fac = fac * fac;
+ break;
+ case MOD_WVG_MAPPING_SMOOTH:
+ fac = 3.0f * fac * fac - 2.0f * fac * fac * fac;
+ break;
+ case MOD_WVG_MAPPING_ROOT:
+ fac = (float)sqrt(fac);
+ break;
+ case MOD_WVG_MAPPING_SPHERE:
+ fac = (float)sqrt(2 * fac - fac * fac);
+ break;
+ case MOD_WVG_MAPPING_RANDOM:
+ BLI_srand(BLI_rand()); /* random seed */
+ fac = BLI_frand() * fac;
+ break;
+ case MOD_WVG_MAPPING_STEP:
+ fac = (fac >= 0.5f) ? 1.0f : 0.0f;
+ break;
}
new_w[i] = fac;
@@ -157,37 +159,37 @@ void weightvg_do_mask(int num, const int *indices, float *org_w, const float *ne
texres.nor = NULL;
get_texture_value(texture, tex_co[idx], &texres);
/* Get the good channel value... */
- switch(tex_use_channel) {
- case MOD_WVG_MASK_TEX_USE_INT:
- org_w[i] = (new_w[i] * texres.tin * fact) + (org_w[i] * (1.0f - (texres.tin*fact)));
- break;
- case MOD_WVG_MASK_TEX_USE_RED:
- org_w[i] = (new_w[i] * texres.tr * fact) + (org_w[i] * (1.0f - (texres.tr*fact)));
- break;
- case MOD_WVG_MASK_TEX_USE_GREEN:
- org_w[i] = (new_w[i] * texres.tg * fact) + (org_w[i] * (1.0f - (texres.tg*fact)));
- break;
- case MOD_WVG_MASK_TEX_USE_BLUE:
- org_w[i] = (new_w[i] * texres.tb * fact) + (org_w[i] * (1.0f - (texres.tb*fact)));
- break;
- case MOD_WVG_MASK_TEX_USE_HUE:
- rgb_to_hsv(texres.tr, texres.tg, texres.tb, &h, &s, &v);
- org_w[i] = (new_w[i] * h * fact) + (org_w[i] * (1.0f - (h*fact)));
- break;
- case MOD_WVG_MASK_TEX_USE_SAT:
- rgb_to_hsv(texres.tr, texres.tg, texres.tb, &h, &s, &v);
- org_w[i] = (new_w[i] * s * fact) + (org_w[i] * (1.0f - (s*fact)));
- break;
- case MOD_WVG_MASK_TEX_USE_VAL:
- rgb_to_hsv(texres.tr, texres.tg, texres.tb, &h, &s, &v);
- org_w[i] = (new_w[i] * v * fact) + (org_w[i] * (1.0f - (v*fact)));
- break;
- case MOD_WVG_MASK_TEX_USE_ALPHA:
- org_w[i] = (new_w[i] * texres.ta * fact) + (org_w[i] * (1.0f - (texres.ta*fact)));
- break;
- default:
- org_w[i] = (new_w[i] * texres.tin * fact) + (org_w[i] * (1.0f - (texres.tin*fact)));
- break;
+ switch (tex_use_channel) {
+ case MOD_WVG_MASK_TEX_USE_INT:
+ org_w[i] = (new_w[i] * texres.tin * fact) + (org_w[i] * (1.0f - (texres.tin * fact)));
+ break;
+ case MOD_WVG_MASK_TEX_USE_RED:
+ org_w[i] = (new_w[i] * texres.tr * fact) + (org_w[i] * (1.0f - (texres.tr * fact)));
+ break;
+ case MOD_WVG_MASK_TEX_USE_GREEN:
+ org_w[i] = (new_w[i] * texres.tg * fact) + (org_w[i] * (1.0f - (texres.tg * fact)));
+ break;
+ case MOD_WVG_MASK_TEX_USE_BLUE:
+ org_w[i] = (new_w[i] * texres.tb * fact) + (org_w[i] * (1.0f - (texres.tb * fact)));
+ break;
+ case MOD_WVG_MASK_TEX_USE_HUE:
+ rgb_to_hsv(texres.tr, texres.tg, texres.tb, &h, &s, &v);
+ org_w[i] = (new_w[i] * h * fact) + (org_w[i] * (1.0f - (h * fact)));
+ break;
+ case MOD_WVG_MASK_TEX_USE_SAT:
+ rgb_to_hsv(texres.tr, texres.tg, texres.tb, &h, &s, &v);
+ org_w[i] = (new_w[i] * s * fact) + (org_w[i] * (1.0f - (s * fact)));
+ break;
+ case MOD_WVG_MASK_TEX_USE_VAL:
+ rgb_to_hsv(texres.tr, texres.tg, texres.tb, &h, &s, &v);
+ org_w[i] = (new_w[i] * v * fact) + (org_w[i] * (1.0f - (v * fact)));
+ break;
+ case MOD_WVG_MASK_TEX_USE_ALPHA:
+ org_w[i] = (new_w[i] * texres.ta * fact) + (org_w[i] * (1.0f - (texres.ta * fact)));
+ break;
+ default:
+ org_w[i] = (new_w[i] * texres.tin * fact) + (org_w[i] * (1.0f - (texres.tin * fact)));
+ break;
}
}
@@ -211,7 +213,7 @@ void weightvg_do_mask(int num, const int *indices, float *org_w, const float *ne
for (i = 0; i < num; i++) {
int idx = indices ? indices[i] : i;
const float f = defvert_find_weight(&dvert[idx], ref_didx) * fact;
- org_w[i] = (new_w[i] * f) + (org_w[i] * (1.0f-f));
+ org_w[i] = (new_w[i] * f) + (org_w[i] * (1.0f - f));
/* If that vertex is not in ref vgroup, assume null factor, and hence do nothing! */
}
}
diff --git a/source/blender/modifiers/intern/MOD_weightvgedit.c b/source/blender/modifiers/intern/MOD_weightvgedit.c
index b8961870043..639b8bb2593 100644
--- a/source/blender/modifiers/intern/MOD_weightvgedit.c
+++ b/source/blender/modifiers/intern/MOD_weightvgedit.c
@@ -55,7 +55,7 @@
**************************************/
static void initData(ModifierData *md)
{
- WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md;
+ WeightVGEditModifierData *wmd = (WeightVGEditModifierData *) md;
wmd->edit_flags = 0;
wmd->falloff_type = MOD_WVG_MAPPING_NONE;
wmd->default_weight = 0.0f;
@@ -73,14 +73,14 @@ static void initData(ModifierData *md)
static void freeData(ModifierData *md)
{
- WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md;
+ WeightVGEditModifierData *wmd = (WeightVGEditModifierData *) md;
curvemapping_free(wmd->cmap_curve);
}
static void copyData(ModifierData *md, ModifierData *target)
{
- WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md;
- WeightVGEditModifierData *twmd = (WeightVGEditModifierData*) target;
+ WeightVGEditModifierData *wmd = (WeightVGEditModifierData *) md;
+ WeightVGEditModifierData *twmd = (WeightVGEditModifierData *) target;
BLI_strncpy(twmd->defgrp_name, wmd->defgrp_name, sizeof(twmd->defgrp_name));
@@ -104,7 +104,7 @@ static void copyData(ModifierData *md, ModifierData *target)
static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
{
- WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md;
+ WeightVGEditModifierData *wmd = (WeightVGEditModifierData *) md;
CustomDataMask dataMask = 0;
/* We need vertex groups! */
@@ -121,7 +121,7 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
static int dependsOnTime(ModifierData *md)
{
- WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md;
+ WeightVGEditModifierData *wmd = (WeightVGEditModifierData *) md;
if (wmd->mask_texture)
return BKE_texture_dependsOnTime(wmd->mask_texture);
@@ -132,13 +132,13 @@ static void foreachObjectLink(ModifierData *md, Object *ob,
void (*walk)(void *userData, Object *ob, Object **obpoin),
void *userData)
{
- WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md;
+ WeightVGEditModifierData *wmd = (WeightVGEditModifierData *) md;
walk(userData, ob, &wmd->mask_tex_map_obj);
}
static void foreachIDLink(ModifierData *md, Object *ob, IDWalkFunc walk, void *userData)
{
- WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md;
+ WeightVGEditModifierData *wmd = (WeightVGEditModifierData *) md;
walk(userData, ob, (ID **)&wmd->mask_texture);
@@ -153,24 +153,24 @@ static void foreachTexLink(ModifierData *md, Object *ob, TexWalkFunc walk, void
static void updateDepgraph(ModifierData *md, DagForest *forest, struct Scene *UNUSED(scene),
Object *UNUSED(ob), DagNode *obNode)
{
- WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md;
+ WeightVGEditModifierData *wmd = (WeightVGEditModifierData *) md;
DagNode *curNode;
if (wmd->mask_tex_map_obj && wmd->mask_tex_mapping == MOD_DISP_MAP_OBJECT) {
curNode = dag_get_node(forest, wmd->mask_tex_map_obj);
- dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA|DAG_RL_OB_DATA,
+ dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA | DAG_RL_OB_DATA,
"WeightVGEdit Modifier");
}
if (wmd->mask_tex_mapping == MOD_DISP_MAP_GLOBAL)
- dag_add_relation(forest, obNode, obNode, DAG_RL_DATA_DATA|DAG_RL_OB_DATA,
+ dag_add_relation(forest, obNode, obNode, DAG_RL_DATA_DATA | DAG_RL_OB_DATA,
"WeightVGEdit Modifier");
}
static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
{
- WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md;
+ WeightVGEditModifierData *wmd = (WeightVGEditModifierData *) md;
/* If no vertex group, bypass. */
return (wmd->defgrp_name[0] == '\0');
}
@@ -178,7 +178,7 @@ static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *derivedData,
int UNUSED(useRenderParams), int UNUSED(isFinalCalc))
{
- WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md;
+ WeightVGEditModifierData *wmd = (WeightVGEditModifierData *) md;
DerivedMesh *dm = derivedData;
MDeformVert *dvert = NULL;
MDeformWeight **dw = NULL;
@@ -211,7 +211,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der
dvert = CustomData_duplicate_referenced_layer(&dm->vertData, CD_MDEFORMVERT, numVerts);
/* If no vertices were ever added to an object's vgroup, dvert might be NULL. */
- if (!dvert)
+ if (!dvert) {
/* If this modifier is not allowed to add vertices, just return. */
if (!do_add)
return dm;
@@ -221,11 +221,12 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der
/* Ultimate security check. */
if (!dvert)
return dm;
+ }
/* Get org weights, assuming 0.0 for vertices not in given vgroup. */
org_w = MEM_mallocN(sizeof(float) * numVerts, "WeightVGEdit Modifier, org_w");
new_w = MEM_mallocN(sizeof(float) * numVerts, "WeightVGEdit Modifier, new_w");
- dw = MEM_mallocN(sizeof(MDeformWeight*) * numVerts, "WeightVGEdit Modifier, dw");
+ dw = MEM_mallocN(sizeof(MDeformWeight *) * numVerts, "WeightVGEdit Modifier, dw");
for (i = 0; i < numVerts; i++) {
dw[i] = defvert_find_index(&dvert[i], defgrp_idx);
if (dw[i]) {
@@ -279,10 +280,10 @@ ModifierTypeInfo modifierType_WeightVGEdit = {
/* structName */ "WeightVGEditModifierData",
/* structSize */ sizeof(WeightVGEditModifierData),
/* type */ eModifierTypeType_NonGeometrical,
- /* flags */ eModifierTypeFlag_AcceptsMesh
- |eModifierTypeFlag_SupportsMapping
- |eModifierTypeFlag_SupportsEditmode
- |eModifierTypeFlag_UsesPreview,
+ /* flags */ eModifierTypeFlag_AcceptsMesh |
+ eModifierTypeFlag_SupportsMapping |
+ eModifierTypeFlag_SupportsEditmode |
+ eModifierTypeFlag_UsesPreview,
/* copyData */ copyData,
/* deformVerts */ NULL,
diff --git a/source/blender/modifiers/intern/MOD_weightvgmix.c b/source/blender/modifiers/intern/MOD_weightvgmix.c
index b7bbc717981..cf11e9d98b0 100644
--- a/source/blender/modifiers/intern/MOD_weightvgmix.c
+++ b/source/blender/modifiers/intern/MOD_weightvgmix.c
@@ -61,26 +61,26 @@ static float mix_weight(float weight, float weight2, char mix_mode)
*/
switch (mix_mode)
{
- case MOD_WVG_MIX_ADD:
- return (weight + weight2);
- case MOD_WVG_MIX_SUB:
- return (weight - weight2);
- case MOD_WVG_MIX_MUL:
- return (weight * weight2);
- case MOD_WVG_MIX_DIV:
- /* Avoid dividing by zero (or really small values). */
- if (0.0 <= weight2 < MOD_WVG_ZEROFLOOR)
- weight2 = MOD_WVG_ZEROFLOOR;
- else if (-MOD_WVG_ZEROFLOOR < weight2)
- weight2 = -MOD_WVG_ZEROFLOOR;
- return (weight / weight2);
- case MOD_WVG_MIX_DIF:
- return (weight < weight2 ? weight2 - weight : weight - weight2);
- case MOD_WVG_MIX_AVG:
- return (weight + weight2) / 2.0;
- case MOD_WVG_MIX_SET:
- default:
- return weight2;
+ case MOD_WVG_MIX_ADD:
+ return (weight + weight2);
+ case MOD_WVG_MIX_SUB:
+ return (weight - weight2);
+ case MOD_WVG_MIX_MUL:
+ return (weight * weight2);
+ case MOD_WVG_MIX_DIV:
+ /* Avoid dividing by zero (or really small values). */
+ if (0.0 <= weight2 < MOD_WVG_ZEROFLOOR)
+ weight2 = MOD_WVG_ZEROFLOOR;
+ else if (-MOD_WVG_ZEROFLOOR < weight2)
+ weight2 = -MOD_WVG_ZEROFLOOR;
+ return (weight / weight2);
+ case MOD_WVG_MIX_DIF:
+ return (weight < weight2 ? weight2 - weight : weight - weight2);
+ case MOD_WVG_MIX_AVG:
+ return (weight + weight2) / 2.0;
+ case MOD_WVG_MIX_SET:
+ default:
+ return weight2;
}
#endif
if (mix_mode == MOD_WVG_MIX_SET)
@@ -111,7 +111,7 @@ static float mix_weight(float weight, float weight2, char mix_mode)
**************************************/
static void initData(ModifierData *md)
{
- WeightVGMixModifierData *wmd = (WeightVGMixModifierData*) md;
+ WeightVGMixModifierData *wmd = (WeightVGMixModifierData *) md;
wmd->default_weight_a = 0.0f;
wmd->default_weight_b = 0.0f;
@@ -125,8 +125,8 @@ static void initData(ModifierData *md)
static void copyData(ModifierData *md, ModifierData *target)
{
- WeightVGMixModifierData *wmd = (WeightVGMixModifierData*) md;
- WeightVGMixModifierData *twmd = (WeightVGMixModifierData*) target;
+ WeightVGMixModifierData *wmd = (WeightVGMixModifierData *) md;
+ WeightVGMixModifierData *twmd = (WeightVGMixModifierData *) target;
BLI_strncpy(twmd->defgrp_name_a, wmd->defgrp_name_a, sizeof(twmd->defgrp_name_a));
BLI_strncpy(twmd->defgrp_name_b, wmd->defgrp_name_b, sizeof(twmd->defgrp_name_b));
@@ -146,7 +146,7 @@ static void copyData(ModifierData *md, ModifierData *target)
static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
{
- WeightVGMixModifierData *wmd = (WeightVGMixModifierData*) md;
+ WeightVGMixModifierData *wmd = (WeightVGMixModifierData *) md;
CustomDataMask dataMask = 0;
/* We need vertex groups! */
@@ -163,7 +163,7 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
static int dependsOnTime(ModifierData *md)
{
- WeightVGMixModifierData *wmd = (WeightVGMixModifierData*) md;
+ WeightVGMixModifierData *wmd = (WeightVGMixModifierData *) md;
if (wmd->mask_texture)
return BKE_texture_dependsOnTime(wmd->mask_texture);
@@ -174,13 +174,13 @@ static void foreachObjectLink(ModifierData *md, Object *ob,
void (*walk)(void *userData, Object *ob, Object **obpoin),
void *userData)
{
- WeightVGMixModifierData *wmd = (WeightVGMixModifierData*) md;
+ WeightVGMixModifierData *wmd = (WeightVGMixModifierData *) md;
walk(userData, ob, &wmd->mask_tex_map_obj);
}
static void foreachIDLink(ModifierData *md, Object *ob, IDWalkFunc walk, void *userData)
{
- WeightVGMixModifierData *wmd = (WeightVGMixModifierData*) md;
+ WeightVGMixModifierData *wmd = (WeightVGMixModifierData *) md;
walk(userData, ob, (ID **)&wmd->mask_texture);
@@ -195,24 +195,24 @@ static void foreachTexLink(ModifierData *md, Object *ob, TexWalkFunc walk, void
static void updateDepgraph(ModifierData *md, DagForest *forest, struct Scene *UNUSED(scene),
Object *UNUSED(ob), DagNode *obNode)
{
- WeightVGMixModifierData *wmd = (WeightVGMixModifierData*) md;
+ WeightVGMixModifierData *wmd = (WeightVGMixModifierData *) md;
DagNode *curNode;
if (wmd->mask_tex_map_obj && wmd->mask_tex_mapping == MOD_DISP_MAP_OBJECT) {
curNode = dag_get_node(forest, wmd->mask_tex_map_obj);
- dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA|DAG_RL_OB_DATA,
+ dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA | DAG_RL_OB_DATA,
"WeightVGMix Modifier");
}
if (wmd->mask_tex_mapping == MOD_DISP_MAP_GLOBAL)
- dag_add_relation(forest, obNode, obNode, DAG_RL_DATA_DATA|DAG_RL_OB_DATA,
+ dag_add_relation(forest, obNode, obNode, DAG_RL_DATA_DATA | DAG_RL_OB_DATA,
"WeightVGMix Modifier");
}
static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
{
- WeightVGMixModifierData *wmd = (WeightVGMixModifierData*) md;
+ WeightVGMixModifierData *wmd = (WeightVGMixModifierData *) md;
/* If no vertex group, bypass. */
return (wmd->defgrp_name_a[0] == '\0');
}
@@ -220,7 +220,7 @@ static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *derivedData,
int UNUSED(useRenderParams), int UNUSED(isFinalCalc))
{
- WeightVGMixModifierData *wmd = (WeightVGMixModifierData*) md;
+ WeightVGMixModifierData *wmd = (WeightVGMixModifierData *) md;
DerivedMesh *dm = derivedData;
MDeformVert *dvert = NULL;
MDeformWeight **dw1, **tdw1, **dw2, **tdw2;
@@ -258,7 +258,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der
dvert = CustomData_duplicate_referenced_layer(&dm->vertData, CD_MDEFORMVERT, numVerts);
/* If no vertices were ever added to an object's vgroup, dvert might be NULL. */
- if (!dvert)
+ if (!dvert) {
/* If not affecting all vertices, just return. */
if (wmd->mix_set != MOD_WVG_SET_ALL)
return dm;
@@ -268,67 +268,67 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der
/* Ultimate security check. */
if (!dvert)
return dm;
-
+ }
/* Find out which vertices to work on. */
tidx = MEM_mallocN(sizeof(int) * numVerts, "WeightVGMix Modifier, tidx");
- tdw1 = MEM_mallocN(sizeof(MDeformWeight*) * numVerts, "WeightVGMix Modifier, tdw1");
- tdw2 = MEM_mallocN(sizeof(MDeformWeight*) * numVerts, "WeightVGMix Modifier, tdw2");
+ tdw1 = MEM_mallocN(sizeof(MDeformWeight *) * numVerts, "WeightVGMix Modifier, tdw1");
+ tdw2 = MEM_mallocN(sizeof(MDeformWeight *) * numVerts, "WeightVGMix Modifier, tdw2");
switch (wmd->mix_set) {
- case MOD_WVG_SET_A:
- /* All vertices in first vgroup. */
- for (i = 0; i < numVerts; i++) {
- MDeformWeight *dw = defvert_find_index(&dvert[i], defgrp_idx);
- if (dw) {
- tdw1[numIdx] = dw;
- tdw2[numIdx] = defvert_find_index(&dvert[i], defgrp_idx2);
- tidx[numIdx++] = i;
+ case MOD_WVG_SET_A:
+ /* All vertices in first vgroup. */
+ for (i = 0; i < numVerts; i++) {
+ MDeformWeight *dw = defvert_find_index(&dvert[i], defgrp_idx);
+ if (dw) {
+ tdw1[numIdx] = dw;
+ tdw2[numIdx] = defvert_find_index(&dvert[i], defgrp_idx2);
+ tidx[numIdx++] = i;
+ }
}
- }
- break;
- case MOD_WVG_SET_B:
- /* All vertices in second vgroup. */
- for (i = 0; i < numVerts; i++) {
- MDeformWeight *dw = defvert_find_index(&dvert[i], defgrp_idx2);
- if (dw) {
- tdw1[numIdx] = defvert_find_index(&dvert[i], defgrp_idx);
- tdw2[numIdx] = dw;
- tidx[numIdx++] = i;
+ break;
+ case MOD_WVG_SET_B:
+ /* All vertices in second vgroup. */
+ for (i = 0; i < numVerts; i++) {
+ MDeformWeight *dw = defvert_find_index(&dvert[i], defgrp_idx2);
+ if (dw) {
+ tdw1[numIdx] = defvert_find_index(&dvert[i], defgrp_idx);
+ tdw2[numIdx] = dw;
+ tidx[numIdx++] = i;
+ }
}
- }
- break;
- case MOD_WVG_SET_OR:
- /* All vertices in one vgroup or the other. */
- for (i = 0; i < numVerts; i++) {
- MDeformWeight *adw = defvert_find_index(&dvert[i], defgrp_idx);
- MDeformWeight *bdw = defvert_find_index(&dvert[i], defgrp_idx2);
- if (adw || bdw) {
- tdw1[numIdx] = adw;
- tdw2[numIdx] = bdw;
- tidx[numIdx++] = i;
+ break;
+ case MOD_WVG_SET_OR:
+ /* All vertices in one vgroup or the other. */
+ for (i = 0; i < numVerts; i++) {
+ MDeformWeight *adw = defvert_find_index(&dvert[i], defgrp_idx);
+ MDeformWeight *bdw = defvert_find_index(&dvert[i], defgrp_idx2);
+ if (adw || bdw) {
+ tdw1[numIdx] = adw;
+ tdw2[numIdx] = bdw;
+ tidx[numIdx++] = i;
+ }
}
- }
- break;
- case MOD_WVG_SET_AND:
- /* All vertices in both vgroups. */
- for (i = 0; i < numVerts; i++) {
- MDeformWeight *adw = defvert_find_index(&dvert[i], defgrp_idx);
- MDeformWeight *bdw = defvert_find_index(&dvert[i], defgrp_idx2);
- if (adw && bdw) {
- tdw1[numIdx] = adw;
- tdw2[numIdx] = bdw;
- tidx[numIdx++] = i;
+ break;
+ case MOD_WVG_SET_AND:
+ /* All vertices in both vgroups. */
+ for (i = 0; i < numVerts; i++) {
+ MDeformWeight *adw = defvert_find_index(&dvert[i], defgrp_idx);
+ MDeformWeight *bdw = defvert_find_index(&dvert[i], defgrp_idx2);
+ if (adw && bdw) {
+ tdw1[numIdx] = adw;
+ tdw2[numIdx] = bdw;
+ tidx[numIdx++] = i;
+ }
}
- }
- break;
- case MOD_WVG_SET_ALL:
- default:
- /* Use all vertices. */
- for (i = 0; i < numVerts; i++) {
- tdw1[i] = defvert_find_index(&dvert[i], defgrp_idx);
- tdw2[i] = defvert_find_index(&dvert[i], defgrp_idx2);
- }
- numIdx = -1;
- break;
+ break;
+ case MOD_WVG_SET_ALL:
+ default:
+ /* Use all vertices. */
+ for (i = 0; i < numVerts; i++) {
+ tdw1[i] = defvert_find_index(&dvert[i], defgrp_idx);
+ tdw2[i] = defvert_find_index(&dvert[i], defgrp_idx2);
+ }
+ numIdx = -1;
+ break;
}
if (numIdx == 0) {
/* Use no vertices! Hence, return org data. */
@@ -340,11 +340,11 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der
if (numIdx != -1) {
indices = MEM_mallocN(sizeof(int) * numIdx, "WeightVGMix Modifier, indices");
memcpy(indices, tidx, sizeof(int) * numIdx);
- dw1 = MEM_mallocN(sizeof(MDeformWeight*) * numIdx, "WeightVGMix Modifier, dw1");
- memcpy(dw1, tdw1, sizeof(MDeformWeight*) * numIdx);
+ dw1 = MEM_mallocN(sizeof(MDeformWeight *) * numIdx, "WeightVGMix Modifier, dw1");
+ memcpy(dw1, tdw1, sizeof(MDeformWeight *) * numIdx);
MEM_freeN(tdw1);
- dw2 = MEM_mallocN(sizeof(MDeformWeight*) * numIdx, "WeightVGMix Modifier, dw2");
- memcpy(dw2, tdw2, sizeof(MDeformWeight*) * numIdx);
+ dw2 = MEM_mallocN(sizeof(MDeformWeight *) * numIdx, "WeightVGMix Modifier, dw2");
+ memcpy(dw2, tdw2, sizeof(MDeformWeight *) * numIdx);
MEM_freeN(tdw2);
}
else {
@@ -411,10 +411,10 @@ ModifierTypeInfo modifierType_WeightVGMix = {
/* structName */ "WeightVGMixModifierData",
/* structSize */ sizeof(WeightVGMixModifierData),
/* type */ eModifierTypeType_NonGeometrical,
- /* flags */ eModifierTypeFlag_AcceptsMesh
- |eModifierTypeFlag_SupportsMapping
- |eModifierTypeFlag_SupportsEditmode
- |eModifierTypeFlag_UsesPreview,
+ /* flags */ eModifierTypeFlag_AcceptsMesh |
+ eModifierTypeFlag_SupportsMapping |
+ eModifierTypeFlag_SupportsEditmode |
+ eModifierTypeFlag_UsesPreview,
/* copyData */ copyData,
/* deformVerts */ NULL,
diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c
index bcfdced4ffd..0c130731c05 100644
--- a/source/blender/modifiers/intern/MOD_weightvgproximity.c
+++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c
@@ -73,9 +73,9 @@ static void get_vert2geom_distance(int numVerts, float (*v_cos)[3],
BVHTreeFromMesh treeData_v = NULL_BVHTreeFromMesh;
BVHTreeFromMesh treeData_e = NULL_BVHTreeFromMesh;
BVHTreeFromMesh treeData_f = NULL_BVHTreeFromMesh;
- BVHTreeNearest nearest_v = NULL_BVHTreeNearest;
- BVHTreeNearest nearest_e = NULL_BVHTreeNearest;
- BVHTreeNearest nearest_f = NULL_BVHTreeNearest;
+ BVHTreeNearest nearest_v = NULL_BVHTreeNearest;
+ BVHTreeNearest nearest_e = NULL_BVHTreeNearest;
+ BVHTreeNearest nearest_f = NULL_BVHTreeNearest;
if (dist_v) {
/* Create a bvh-tree of the given target's verts. */
@@ -112,7 +112,7 @@ static void get_vert2geom_distance(int numVerts, float (*v_cos)[3],
dist_f,loc2trgt) \
schedule(static)
#endif
- for (i = 0; i < numVerts; ++i) {
+ for (i = 0; i < numVerts; i++) {
float tmp_co[3];
/* Convert the vertex to tree coordinates. */
@@ -159,11 +159,11 @@ static void get_vert2geom_distance(int numVerts, float (*v_cos)[3],
* Note that it works in final world space (i.e. with constraints etc. applied).
*/
static void get_vert2ob_distance(int numVerts, float (*v_cos)[3], float *dist,
- Object* ob, Object* obr)
+ Object *ob, Object *obr)
{
/* Vertex and ref object coordinates. */
float v_wco[3];
- unsigned int i= numVerts;
+ unsigned int i = numVerts;
while (i-- > 0) {
/* Get world-coordinates of the vertex (constraints and anim included). */
@@ -177,7 +177,7 @@ static void get_vert2ob_distance(int numVerts, float (*v_cos)[3], float *dist,
* Returns the real distance between an object and another reference object.
* Note that it works in final world space (i.e. with constraints etc. applied).
*/
-static float get_ob2ob_distance(const Object* ob, const Object* obr)
+static float get_ob2ob_distance(const Object *ob, const Object *obr)
{
return len_v3v3(ob->obmat[3], obr->obmat[3]);
}
@@ -187,8 +187,8 @@ static float get_ob2ob_distance(const Object* ob, const Object* obr)
*/
void do_map(float *weights, const int nidx, const float min_d, const float max_d, short mode)
{
- const float range_inv= 1.0f / (max_d - min_d); /* invert since multiplication is faster */
- unsigned int i= nidx;
+ const float range_inv = 1.0f / (max_d - min_d); /* invert since multiplication is faster */
+ unsigned int i = nidx;
if (max_d == min_d) {
while (i-- > 0) {
weights[i] = (weights[i] >= max_d) ? 1.0f : 0.0f; /* "Step" behavior... */
@@ -196,16 +196,16 @@ void do_map(float *weights, const int nidx, const float min_d, const float max_d
}
else if (max_d > min_d) {
while (i-- > 0) {
- if (weights[i] >= max_d) weights[i]= 1.0f; /* most likely case first */
- else if (weights[i] <= min_d) weights[i]= 0.0f;
- else weights[i]= (weights[i] - min_d) * range_inv;
+ if (weights[i] >= max_d) weights[i] = 1.0f; /* most likely case first */
+ else if (weights[i] <= min_d) weights[i] = 0.0f;
+ else weights[i] = (weights[i] - min_d) * range_inv;
}
}
else {
while (i-- > 0) {
- if (weights[i] <= max_d) weights[i]= 1.0f; /* most likely case first */
- else if (weights[i] >= min_d) weights[i]= 0.0f;
- else weights[i]= (weights[i] - min_d) * range_inv;
+ if (weights[i] <= max_d) weights[i] = 1.0f; /* most likely case first */
+ else if (weights[i] >= min_d) weights[i] = 0.0f;
+ else weights[i] = (weights[i] - min_d) * range_inv;
}
}
@@ -219,7 +219,7 @@ void do_map(float *weights, const int nidx, const float min_d, const float max_d
**************************************/
static void initData(ModifierData *md)
{
- WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData*) md;
+ WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData *) md;
wmd->proximity_mode = MOD_WVG_PROXIMITY_OBJECT;
wmd->proximity_flags = MOD_WVG_PROXIMITY_GEOM_VERTS;
@@ -234,8 +234,8 @@ static void initData(ModifierData *md)
static void copyData(ModifierData *md, ModifierData *target)
{
- WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData*) md;
- WeightVGProximityModifierData *twmd = (WeightVGProximityModifierData*) target;
+ WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData *) md;
+ WeightVGProximityModifierData *twmd = (WeightVGProximityModifierData *) target;
BLI_strncpy(twmd->defgrp_name, wmd->defgrp_name, sizeof(twmd->defgrp_name));
twmd->proximity_mode = wmd->proximity_mode;
@@ -257,7 +257,7 @@ static void copyData(ModifierData *md, ModifierData *target)
static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
{
- WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData*) md;
+ WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData *) md;
CustomDataMask dataMask = 0;
/* We need vertex groups! */
@@ -274,7 +274,7 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
static int dependsOnTime(ModifierData *md)
{
- WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData*) md;
+ WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData *) md;
if (wmd->mask_texture)
return BKE_texture_dependsOnTime(wmd->mask_texture);
@@ -285,14 +285,14 @@ static void foreachObjectLink(ModifierData *md, Object *ob,
void (*walk)(void *userData, Object *ob, Object **obpoin),
void *userData)
{
- WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData*) md;
+ WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData *) md;
walk(userData, ob, &wmd->proximity_ob_target);
walk(userData, ob, &wmd->mask_tex_map_obj);
}
static void foreachIDLink(ModifierData *md, Object *ob, IDWalkFunc walk, void *userData)
{
- WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData*) md;
+ WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData *) md;
walk(userData, ob, (ID **)&wmd->mask_texture);
@@ -307,30 +307,30 @@ static void foreachTexLink(ModifierData *md, Object *ob, TexWalkFunc walk, void
static void updateDepgraph(ModifierData *md, DagForest *forest, struct Scene *UNUSED(scene),
Object *UNUSED(ob), DagNode *obNode)
{
- WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData*) md;
+ WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData *) md;
DagNode *curNode;
if (wmd->proximity_ob_target) {
curNode = dag_get_node(forest, wmd->proximity_ob_target);
- dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA|DAG_RL_OB_DATA,
+ dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA | DAG_RL_OB_DATA,
"WeightVGProximity Modifier");
}
if (wmd->mask_tex_map_obj && wmd->mask_tex_mapping == MOD_DISP_MAP_OBJECT) {
curNode = dag_get_node(forest, wmd->mask_tex_map_obj);
- dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA|DAG_RL_OB_DATA,
+ dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA | DAG_RL_OB_DATA,
"WeightVGProximity Modifier");
}
if (wmd->mask_tex_mapping == MOD_DISP_MAP_GLOBAL)
- dag_add_relation(forest, obNode, obNode, DAG_RL_DATA_DATA|DAG_RL_OB_DATA,
+ dag_add_relation(forest, obNode, obNode, DAG_RL_DATA_DATA | DAG_RL_OB_DATA,
"WeightVGProximity Modifier");
}
static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
{
- WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData*) md;
+ WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData *) md;
/* If no vertex group, bypass. */
if (wmd->defgrp_name[0] == '\0') return 1;
/* If no target object, bypass. */
@@ -340,7 +340,7 @@ static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *derivedData,
int UNUSED(useRenderParams), int UNUSED(isFinalCalc))
{
- WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData*) md;
+ WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData *) md;
DerivedMesh *dm = derivedData;
MDeformVert *dvert = NULL;
MDeformWeight **dw, **tdw;
@@ -350,7 +350,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der
int defgrp_idx;
float *tw = NULL;
float *org_w = NULL;
- float *new_w =NULL;
+ float *new_w = NULL;
int *tidx, *indices = NULL;
int numIdx = 0;
int i;
@@ -392,7 +392,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der
*/
tidx = MEM_mallocN(sizeof(int) * numVerts, "WeightVGProximity Modifier, tidx");
tw = MEM_mallocN(sizeof(float) * numVerts, "WeightVGProximity Modifier, tw");
- tdw = MEM_mallocN(sizeof(MDeformWeight*) * numVerts, "WeightVGProximity Modifier, tdw");
+ tdw = MEM_mallocN(sizeof(MDeformWeight *) * numVerts, "WeightVGProximity Modifier, tdw");
for (i = 0; i < numVerts; i++) {
MDeformWeight *_dw = defvert_find_index(&dvert[i], defgrp_idx);
if (_dw) {
@@ -413,8 +413,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der
memcpy(indices, tidx, sizeof(int) * numIdx);
org_w = MEM_mallocN(sizeof(float) * numIdx, "WeightVGProximity Modifier, org_w");
memcpy(org_w, tw, sizeof(float) * numIdx);
- dw = MEM_mallocN(sizeof(MDeformWeight*) * numIdx, "WeightVGProximity Modifier, dw");
- memcpy(dw, tdw, sizeof(MDeformWeight*) * numIdx);
+ dw = MEM_mallocN(sizeof(MDeformWeight *) * numIdx, "WeightVGProximity Modifier, dw");
+ memcpy(dw, tdw, sizeof(MDeformWeight *) * numIdx);
MEM_freeN(tw);
MEM_freeN(tdw);
}
@@ -458,7 +458,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der
if (ELEM3(obr->type, OB_CURVE, OB_SURF, OB_FONT))
target_dm = CDDM_from_curve(obr);
else if (obr->type == OB_MESH) {
- Mesh *me = (Mesh*)obr->data;
+ Mesh *me = (Mesh *)obr->data;
if (me->edit_btmesh)
target_dm = CDDM_from_BMEditMesh(me->edit_btmesh, me, FALSE, FALSE);
else
@@ -470,9 +470,9 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der
/* We must check that we do have a valid target_dm! */
if (target_dm) {
SpaceTransform loc2trgt;
- float *dists_v = use_trgt_verts ? MEM_mallocN(sizeof(float) * numIdx, "WeightVGProximity Modifier, dists_v") : NULL;
- float *dists_e = use_trgt_edges ? MEM_mallocN(sizeof(float) * numIdx, "WeightVGProximity Modifier, dists_e") : NULL;
- float *dists_f = use_trgt_faces ? MEM_mallocN(sizeof(float) * numIdx, "WeightVGProximity Modifier, dists_f") : NULL;
+ float *dists_v = use_trgt_verts ? MEM_mallocN(sizeof(float) * numIdx, "dists_v") : NULL;
+ float *dists_e = use_trgt_edges ? MEM_mallocN(sizeof(float) * numIdx, "dists_e") : NULL;
+ float *dists_f = use_trgt_faces ? MEM_mallocN(sizeof(float) * numIdx, "dists_f") : NULL;
space_transform_setup(&loc2trgt, ob, obr);
get_vert2geom_distance(numIdx, v_cos, dists_v, dists_e, dists_f,
@@ -546,10 +546,10 @@ ModifierTypeInfo modifierType_WeightVGProximity = {
/* structName */ "WeightVGProximityModifierData",
/* structSize */ sizeof(WeightVGProximityModifierData),
/* type */ eModifierTypeType_NonGeometrical,
- /* flags */ eModifierTypeFlag_AcceptsMesh
- |eModifierTypeFlag_SupportsMapping
- |eModifierTypeFlag_SupportsEditmode
- |eModifierTypeFlag_UsesPreview,
+ /* flags */ eModifierTypeFlag_AcceptsMesh |
+ eModifierTypeFlag_SupportsMapping |
+ eModifierTypeFlag_SupportsEditmode |
+ eModifierTypeFlag_UsesPreview,
/* copyData */ copyData,
/* deformVerts */ NULL,
diff --git a/source/blender/nodes/CMakeLists.txt b/source/blender/nodes/CMakeLists.txt
index 9bcbc91265c..be9dd10b71d 100644
--- a/source/blender/nodes/CMakeLists.txt
+++ b/source/blender/nodes/CMakeLists.txt
@@ -149,6 +149,7 @@ set(SRC
shader/nodes/node_shader_volume_transparent.c
shader/nodes/node_shader_volume_isotropic.c
shader/nodes/node_shader_light_path.c
+ shader/nodes/node_shader_light_falloff.c
shader/nodes/node_shader_mix_shader.c
shader/nodes/node_shader_add_shader.c
shader/nodes/node_shader_output_lamp.c
diff --git a/source/blender/nodes/NOD_shader.h b/source/blender/nodes/NOD_shader.h
index d2b3a61971b..3d93f41cfe5 100644
--- a/source/blender/nodes/NOD_shader.h
+++ b/source/blender/nodes/NOD_shader.h
@@ -73,6 +73,7 @@ void register_node_type_sh_hue_sat(struct bNodeTreeType *ttype);
void register_node_type_sh_attribute(struct bNodeTreeType *ttype);
void register_node_type_sh_geometry(struct bNodeTreeType *ttype);
void register_node_type_sh_light_path(struct bNodeTreeType *ttype);
+void register_node_type_sh_light_falloff(struct bNodeTreeType *ttype);
void register_node_type_sh_fresnel(struct bNodeTreeType *ttype);
void register_node_type_sh_layer_weight(struct bNodeTreeType *ttype);
void register_node_type_sh_tex_coord(struct bNodeTreeType *ttype);
diff --git a/source/blender/nodes/composite/node_composite_tree.c b/source/blender/nodes/composite/node_composite_tree.c
index 049b5dd8178..b526c25e2dc 100644
--- a/source/blender/nodes/composite/node_composite_tree.c
+++ b/source/blender/nodes/composite/node_composite_tree.c
@@ -136,7 +136,7 @@ static void localize(bNodeTree *localtree, bNodeTree *ntree)
if (ELEM(node->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER)) {
if (node->id) {
if (node->flag & NODE_DO_OUTPUT)
- node->new_node->id= (ID *)copy_image((Image *)node->id);
+ node->new_node->id= (ID *)BKE_image_copy((Image *)node->id);
else
node->new_node->id= NULL;
}
diff --git a/source/blender/nodes/composite/node_composite_util.c b/source/blender/nodes/composite/node_composite_util.c
index ab3a363e703..f26b5f44f99 100644
--- a/source/blender/nodes/composite/node_composite_util.c
+++ b/source/blender/nodes/composite/node_composite_util.c
@@ -643,37 +643,37 @@ void generate_preview(void *data, bNode *node, CompBuf *stackbuf)
void do_rgba_to_yuva(bNode *UNUSED(node), float *out, float *in)
{
- rgb_to_yuv(in[0],in[1],in[2], &out[0], &out[1], &out[2]);
+ rgb_to_yuv(in[0], in[1], in[2], &out[0], &out[1], &out[2]);
out[3]=in[3];
}
void do_rgba_to_hsva(bNode *UNUSED(node), float *out, float *in)
{
- rgb_to_hsv(in[0],in[1],in[2], &out[0], &out[1], &out[2]);
+ rgb_to_hsv(in[0], in[1], in[2], &out[0], &out[1], &out[2]);
out[3]=in[3];
}
void do_rgba_to_ycca(bNode *UNUSED(node), float *out, float *in)
{
- rgb_to_ycc(in[0],in[1],in[2], &out[0], &out[1], &out[2], BLI_YCC_ITU_BT601);
+ rgb_to_ycc(in[0], in[1], in[2], &out[0], &out[1], &out[2], BLI_YCC_ITU_BT601);
out[3]=in[3];
}
void do_yuva_to_rgba(bNode *UNUSED(node), float *out, float *in)
{
- yuv_to_rgb(in[0],in[1],in[2], &out[0], &out[1], &out[2]);
+ yuv_to_rgb(in[0], in[1], in[2], &out[0], &out[1], &out[2]);
out[3]=in[3];
}
void do_hsva_to_rgba(bNode *UNUSED(node), float *out, float *in)
{
- hsv_to_rgb(in[0],in[1],in[2], &out[0], &out[1], &out[2]);
+ hsv_to_rgb(in[0], in[1], in[2], &out[0], &out[1], &out[2]);
out[3]=in[3];
}
void do_ycca_to_rgba(bNode *UNUSED(node), float *out, float *in)
{
- ycc_to_rgb(in[0],in[1],in[2], &out[0], &out[1], &out[2], BLI_YCC_ITU_BT601);
+ ycc_to_rgb(in[0], in[1], in[2], &out[0], &out[1], &out[2], BLI_YCC_ITU_BT601);
out[3]=in[3];
}
@@ -884,8 +884,9 @@ static void FHT2D(fREAL *data, unsigned int Mx, unsigned int My,
#define PRED(k) (((k & Nym) << Mx) + (k >> My))
for (j=PRED(i); j>i; j=PRED(j));
if (j < i) continue;
- for (k=i, j=PRED(i); j!=i; k=j, j=PRED(j), stm--)
- { t=data[j], data[j]=data[k], data[k]=t; }
+ for (k=i, j=PRED(i); j!=i; k=j, j=PRED(j), stm--) {
+ t=data[j], data[j]=data[k], data[k]=t;
+ }
#undef PRED
stm--;
}
@@ -1108,7 +1109,7 @@ void qd_getPixel(CompBuf* src, int x, int y, float* col)
float bc[4];
src->rect_procedural(src, bc, (float)x/(float)src->xrad, (float)y/(float)src->yrad);
- switch(src->type) {
+ switch (src->type) {
/* these fallthrough to get all the channels */
case CB_RGBA: col[3]=bc[3];
case CB_VEC3: col[2]=bc[2];
@@ -1118,7 +1119,7 @@ void qd_getPixel(CompBuf* src, int x, int y, float* col)
}
else if ((x >= 0) && (x < src->x) && (y >= 0) && (y < src->y)) {
float* bc = &src->rect[(x + y*src->x)*src->type];
- switch(src->type) {
+ switch (src->type) {
/* these fallthrough to get all the channels */
case CB_RGBA: col[3]=bc[3];
case CB_VEC3: col[2]=bc[2];
@@ -1127,7 +1128,7 @@ void qd_getPixel(CompBuf* src, int x, int y, float* col)
}
}
else {
- switch(src->type) {
+ switch (src->type) {
/* these fallthrough to get all the channels */
case CB_RGBA: col[3]=0.0;
case CB_VEC3: col[2]=0.0;
@@ -1142,7 +1143,7 @@ void qd_setPixel(CompBuf* src, int x, int y, float* col)
{
if ((x >= 0) && (x < src->x) && (y >= 0) && (y < src->y)) {
float* bc = &src->rect[(x + y*src->x)*src->type];
- switch(src->type) {
+ switch (src->type) {
/* these fallthrough to get all the channels */
case CB_RGBA: bc[3]=col[3];
case CB_VEC3: bc[2]=col[2];
@@ -1199,7 +1200,7 @@ void qd_getPixelLerp(CompBuf* src, float u, float v, float* col)
const int x1 = (int)ufl, y1 = (int)vfl;
const int x2 = (int)ceil(u), y2 = (int)ceil(v);
if ((x2 >= 0) && (y2 >= 0) && (x1 < src->x) && (y1 < src->y)) {
- const float B[4] = {0,0,0,0};
+ const float B[4] = {0, 0, 0, 0};
const int ox1 = (x1 < 0), oy1 = (y1 < 0), ox2 = (x2 >= src->x), oy2 = (y2 >= src->y);
const float* c00 = (ox1 || oy1) ? B : &src->rect[(x1 + y1*src->x)*src->type];
const float* c10 = (ox2 || oy1) ? B : &src->rect[(x2 + y1*src->x)*src->type];
@@ -1225,7 +1226,7 @@ void qd_getPixelLerpChan(CompBuf* src, float u, float v, int chan, float* out)
const int x2 = (int)ceil(u), y2 = (int)ceil(v);
if (chan >= src->type) chan = 0;
if ((x2 >= 0) && (y2 >= 0) && (x1 < src->x) && (y1 < src->y)) {
- const float B[4] = {0,0,0,0};
+ const float B[4] = {0, 0, 0, 0};
const int ox1 = (x1 < 0), oy1 = (y1 < 0), ox2 = (x2 >= src->x), oy2 = (y2 >= src->y);
const float* c00 = (ox1 || oy1) ? B : &src->rect[(x1 + y1*src->x)*src->type + chan];
const float* c10 = (ox2 || oy1) ? B : &src->rect[(x2 + y1*src->x)*src->type + chan];
diff --git a/source/blender/nodes/composite/nodes/node_composite_bilateralblur.c b/source/blender/nodes/composite/nodes/node_composite_bilateralblur.c
index f42fd83c13d..5b26927b694 100644
--- a/source/blender/nodes/composite/nodes/node_composite_bilateralblur.c
+++ b/source/blender/nodes/composite/nodes/node_composite_bilateralblur.c
@@ -96,7 +96,7 @@ The main change is an optional image input */
static void node_composit_exec_bilateralblur(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out)
{
NodeBilateralBlurData *nbbd= node->storage;
- CompBuf *new, *source, *img= in[0]->data , *refimg= in[1]->data;
+ CompBuf *new, *source, *img= in[0]->data, *refimg= in[1]->data;
double mean0, w, i2sigma_color, i2sigma_space;
double mean1[4];
double weight_tab[8];
diff --git a/source/blender/nodes/composite/nodes/node_composite_blur.c b/source/blender/nodes/composite/nodes/node_composite_blur.c
index 354bb458ea9..77b62938d94 100644
--- a/source/blender/nodes/composite/nodes/node_composite_blur.c
+++ b/source/blender/nodes/composite/nodes/node_composite_blur.c
@@ -605,36 +605,39 @@ static void node_composit_exec_blur(void *data, bNode *node, bNodeStack **in, bN
out[0]->data= new;
}
else if (nbd->filtertype == R_FILTER_FAST_GAUSS) {
- CompBuf *new, *img = in[0]->data;
- // TODO: can this be mapped with reference, too?
- const float sx = ((float)nbd->sizex*in[1]->vec[0])/2.0f, sy = ((float)nbd->sizey*in[1]->vec[0])/2.0f;
- int c;
+ if (in[1]->vec[0] < 0.001f) { /* time node inputs can be a tiny value */
+ new = pass_on_compbuf(img);
+ }
+ else {
+ // TODO: can this be mapped with reference, too?
+ const float sx = ((float)nbd->sizex*in[1]->vec[0])/2.0f, sy = ((float)nbd->sizey*in[1]->vec[0])/2.0f;
+ int c;
- if ((img==NULL) || (out[0]->hasoutput==0)) return;
+ if ((img==NULL) || (out[0]->hasoutput==0)) return;
- if (img->type == CB_VEC2)
- new = typecheck_compbuf(img, CB_VAL);
- else if (img->type == CB_VEC3)
- new = typecheck_compbuf(img, CB_RGBA);
- else
- new = dupalloc_compbuf(img);
+ if (img->type == CB_VEC2)
+ new = typecheck_compbuf(img, CB_VAL);
+ else if (img->type == CB_VEC3)
+ new = typecheck_compbuf(img, CB_RGBA);
+ else
+ new = dupalloc_compbuf(img);
- if ((sx == sy) && (sx > 0.f)) {
- for (c=0; c<new->type; ++c)
- IIR_gauss(new, sx, c, 3);
- }
- else {
- if (sx > 0.f) {
+ if ((sx == sy) && (sx > 0.f)) {
for (c=0; c<new->type; ++c)
- IIR_gauss(new, sx, c, 1);
+ IIR_gauss(new, sx, c, 3);
}
- if (sy > 0.f) {
- for (c=0; c<new->type; ++c)
- IIR_gauss(new, sy, c, 2);
+ else {
+ if (sx > 0.f) {
+ for (c=0; c<new->type; ++c)
+ IIR_gauss(new, sx, c, 1);
+ }
+ if (sy > 0.f) {
+ for (c=0; c<new->type; ++c)
+ IIR_gauss(new, sy, c, 2);
+ }
}
}
out[0]->data = new;
-
}
else {
/* All non fast gauss blur methods */
diff --git a/source/blender/nodes/composite/nodes/node_composite_channelMatte.c b/source/blender/nodes/composite/nodes/node_composite_channelMatte.c
index 132b1659fa5..9e3aa9ee13f 100644
--- a/source/blender/nodes/composite/nodes/node_composite_channelMatte.c
+++ b/source/blender/nodes/composite/nodes/node_composite_channelMatte.c
@@ -35,20 +35,20 @@
/* ******************* Channel Matte Node ********************************* */
static bNodeSocketTemplate cmp_node_channel_matte_in[]={
- {SOCK_RGBA,1,"Image", 1.0f, 1.0f, 1.0f, 1.0f},
- {-1,0,""}
+ {SOCK_RGBA, 1, "Image", 1.0f, 1.0f, 1.0f, 1.0f},
+ {-1, 0, ""}
};
static bNodeSocketTemplate cmp_node_channel_matte_out[]={
- {SOCK_RGBA,0,"Image"},
- {SOCK_FLOAT,0,"Matte"},
- {-1,0,""}
+ {SOCK_RGBA, 0, "Image"},
+ {SOCK_FLOAT, 0, "Matte"},
+ {-1, 0, ""}
};
static void do_normalized_rgba_to_ycca2(bNode *UNUSED(node), float *out, float *in)
{
/*normalize to the range 0.0 to 1.0) */
- rgb_to_ycc(in[0],in[1],in[2], &out[0], &out[1], &out[2], BLI_YCC_ITU_BT601);
+ rgb_to_ycc(in[0], in[1], in[2], &out[0], &out[1], &out[2], BLI_YCC_ITU_BT601);
out[0]=(out[0])/255.0f;
out[1]=(out[1])/255.0f;
out[2]=(out[2])/255.0f;
@@ -61,7 +61,7 @@ static void do_normalized_ycca_to_rgba2(bNode *UNUSED(node), float *out, float *
in[0]=in[0]*255.0f;
in[1]=in[1]*255.0f;
in[2]=in[2]*255.0f;
- ycc_to_rgb(in[0],in[1],in[2], &out[0], &out[1], &out[2], BLI_YCC_ITU_BT601);
+ ycc_to_rgb(in[0], in[1], in[2], &out[0], &out[1], &out[2], BLI_YCC_ITU_BT601);
out[3]=in[3];
}
@@ -71,7 +71,7 @@ static void do_channel_matte(bNode *node, float *out, float *in)
NodeChroma *c=(NodeChroma *)node->storage;
float alpha=0.0;
- switch(c->algorithm) {
+ switch (c->algorithm) {
case 0: { /* Alpha=key_channel-limit channel */
int key_channel=node->custom2-1;
int limit_channel=c->channel-1;
@@ -79,17 +79,17 @@ static void do_channel_matte(bNode *node, float *out, float *in)
break;
}
case 1: { /* Alpha=G-MAX(R, B) */
- switch(node->custom2) {
+ switch (node->custom2) {
case 1: {
- alpha=in[0]-MAX2(in[1],in[2]);
+ alpha=in[0]-MAX2(in[1], in[2]);
break;
}
case 2: {
- alpha=in[1]-MAX2(in[0],in[2]);
+ alpha=in[1]-MAX2(in[0], in[2]);
break;
}
case 3: {
- alpha=in[2]-MAX2(in[0],in[1]);
+ alpha=in[2]-MAX2(in[0], in[1]);
break;
}
default:
@@ -139,7 +139,7 @@ static void node_composit_exec_channel_matte(void *data, bNode *node, bNodeStack
outbuf=dupalloc_compbuf(cbuf);
/*convert to colorspace*/
- switch(node->custom1) {
+ switch (node->custom1) {
case CMP_NODE_CHANNEL_MATTE_CS_RGB:
break;
case CMP_NODE_CHANNEL_MATTE_CS_HSV: /*HSV*/
@@ -159,7 +159,7 @@ static void node_composit_exec_channel_matte(void *data, bNode *node, bNodeStack
composit1_pixel_processor(node, outbuf, outbuf, in[1]->vec, do_channel_matte, CB_RGBA);
/*convert back to RGB colorspace in place*/
- switch(node->custom1) {
+ switch (node->custom1) {
case CMP_NODE_CHANNEL_MATTE_CS_RGB: /*RGB*/
break;
case CMP_NODE_CHANNEL_MATTE_CS_HSV: /*HSV*/
diff --git a/source/blender/nodes/composite/nodes/node_composite_chromaMatte.c b/source/blender/nodes/composite/nodes/node_composite_chromaMatte.c
index 2df8e1b6139..a7c0ae68271 100644
--- a/source/blender/nodes/composite/nodes/node_composite_chromaMatte.c
+++ b/source/blender/nodes/composite/nodes/node_composite_chromaMatte.c
@@ -4,7 +4,7 @@
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -26,28 +26,28 @@
*/
/** \file blender/nodes/composite/nodes/node_composite_chromaMatte.c
- * \ingroup cmpnodes
- */
+* \ingroup cmpnodes
+*/
#include "node_composite_util.h"
/* ******************* Chroma Key ********************************************************** */
static bNodeSocketTemplate cmp_node_chroma_in[]={
- {SOCK_RGBA,1,"Image", 1.0f, 1.0f, 1.0f, 1.0f},
- {SOCK_RGBA,1,"Key Color", 1.0f, 1.0f, 1.0f, 1.0f},
- {-1,0,""}
+ {SOCK_RGBA, 1, "Image", 1.0f, 1.0f, 1.0f, 1.0f},
+ {SOCK_RGBA, 1, "Key Color", 1.0f, 1.0f, 1.0f, 1.0f},
+ {-1, 0, ""}
};
static bNodeSocketTemplate cmp_node_chroma_out[]={
- {SOCK_RGBA,0,"Image"},
- {SOCK_FLOAT,0,"Matte"},
- {-1,0,""}
+ {SOCK_RGBA, 0, "Image"},
+ {SOCK_FLOAT, 0, "Matte"},
+ {-1, 0, ""}
};
static void do_rgba_to_ycca_normalized(bNode *UNUSED(node), float *out, float *in)
{
- rgb_to_ycc(in[0],in[1],in[2], &out[0], &out[1], &out[2], BLI_YCC_ITU_BT601);
+ rgb_to_ycc(in[0], in[1], in[2], &out[0], &out[1], &out[2], BLI_YCC_ITU_BT601);
//normalize to 0..1.0
out[0]=out[0]/255.0f;
@@ -59,9 +59,9 @@ static void do_rgba_to_ycca_normalized(bNode *UNUSED(node), float *out, float *i
out[1]=(out[1]*2.0f)-1.0f;
out[2]=(out[2]*2.0f)-1.0f;
-// out[0]=((out[0])-16)/255.0;
-// out[1]=((out[1])-128)/255.0;
-// out[2]=((out[2])-128)/255.0;
+ // out[0]=((out[0])-16)/255.0;
+ // out[1]=((out[1])-128)/255.0;
+ // out[2]=((out[2])-128)/255.0;
out[3]=in[3];
}
@@ -77,9 +77,9 @@ static void do_ycca_to_rgba_normalized(bNode *UNUSED(node), float *out, float *i
in[2]=(in[2]*255.0f);
// in[0]=(in[0]*255.0)+16;
-// in[1]=(in[1]*255.0)+128;
-// in[2]=(in[2]*255.0)+128;
- ycc_to_rgb(in[0],in[1],in[2], &out[0], &out[1], &out[2], BLI_YCC_ITU_BT601);
+ // in[1]=(in[1]*255.0)+128;
+ // in[2]=(in[2]*255.0)+128;
+ ycc_to_rgb(in[0], in[1], in[2], &out[0], &out[1], &out[2], BLI_YCC_ITU_BT601);
out[3]=in[3];
}
@@ -94,7 +94,7 @@ static void do_chroma_key(bNode *node, float *out, float *in)
/* Algorithm from book "Video Demistified," does not include the spill reduction part */
- /* find theta, the angle that the color space should be rotated based on key*/
+ /* find theta, the angle that the color space should be rotated based on key chroma values*/
theta=atan2(c->key[2], c->key[1]);
/*rotate the cb and cr into x/z space */
@@ -107,20 +107,19 @@ static void do_chroma_key(bNode *node, float *out, float *in)
/* if kfg is <0 then the pixel is outside of the key color */
kfg= x-(fabsf(z)/tanf(angle/2.0f));
- out[0]=in[0];
- out[1]=in[1];
- out[2]=in[2];
+ copy_v3_v3(out, in);
if (kfg>0.0f) { /* found a pixel that is within key color */
- alpha=(1.0f-kfg)*(c->fstrength);
-
- beta=atan2(z,x);
+ beta=atan2(z, x);
angle2=c->t2; /* t2 is radians. */
/* if beta is within the cutoff angle */
if (fabsf(beta) < (angle2/2.0f)) {
alpha=0.0;
}
+ else {
+ alpha=1.0f-(kfg/c->fstrength);
+ }
/* don't make something that was more transparent less transparent */
if (alpha<in[3]) {
@@ -130,11 +129,8 @@ static void do_chroma_key(bNode *node, float *out, float *in)
out[3]=in[3];
}
}
- else { /*pixel is outside key color */
- out[0]=in[0];
- out[1]=in[1];
- out[2]=in[2];
- out[3]=in[3]; /* make pixel just as transparent as it was before */
+ else { /* make pixel just as transparent as it was before */
+ out[3]=in[3];
}
}
@@ -143,32 +139,32 @@ static void node_composit_exec_chroma_matte(void *data, bNode *node, bNodeStack
CompBuf *cbuf;
CompBuf *chromabuf;
NodeChroma *c;
-
+
if (in[0]->hasinput==0) return;
if (in[0]->data==NULL) return;
if (out[0]->hasoutput==0 && out[1]->hasoutput==0) return;
-
+
cbuf= typecheck_compbuf(in[0]->data, CB_RGBA);
-
+
chromabuf= dupalloc_compbuf(cbuf);
-
+
c=node->storage;
-
+
/*convert rgbbuf to normalized chroma space*/
composit1_pixel_processor(node, chromabuf, cbuf, in[0]->vec, do_rgba_to_ycca_normalized, CB_RGBA);
/*convert key to normalized chroma color space */
do_rgba_to_ycca_normalized(node, c->key, in[1]->vec);
-
+
/*per pixel chroma key*/
composit1_pixel_processor(node, chromabuf, chromabuf, in[0]->vec, do_chroma_key, CB_RGBA);
-
+
/*convert back*/
composit1_pixel_processor(node, chromabuf, chromabuf, in[0]->vec, do_ycca_to_rgba_normalized, CB_RGBA);
-
+
out[0]->data= chromabuf;
if (out[1]->hasoutput)
out[1]->data= valbuf_from_rgbabuf(chromabuf, CHAN_A);
-
+
generate_preview(data, node, chromabuf);
if (cbuf!=in[0]->data)
diff --git a/source/blender/nodes/composite/nodes/node_composite_colorMatte.c b/source/blender/nodes/composite/nodes/node_composite_colorMatte.c
index 12b6e802555..d9f0c741738 100644
--- a/source/blender/nodes/composite/nodes/node_composite_colorMatte.c
+++ b/source/blender/nodes/composite/nodes/node_composite_colorMatte.c
@@ -34,15 +34,15 @@
/* ******************* Color Key ********************************************************** */
static bNodeSocketTemplate cmp_node_color_in[]={
- {SOCK_RGBA,1,"Image", 1.0f, 1.0f, 1.0f, 1.0f},
- {SOCK_RGBA,1,"Key Color", 1.0f, 1.0f, 1.0f, 1.0f},
- {-1,0,""}
+ {SOCK_RGBA, 1, "Image", 1.0f, 1.0f, 1.0f, 1.0f},
+ {SOCK_RGBA, 1, "Key Color", 1.0f, 1.0f, 1.0f, 1.0f},
+ {-1, 0, ""}
};
static bNodeSocketTemplate cmp_node_color_out[]={
- {SOCK_RGBA,0,"Image"},
- {SOCK_FLOAT,0,"Matte"},
- {-1,0,""}
+ {SOCK_RGBA, 0, "Image"},
+ {SOCK_FLOAT, 0, "Matte"},
+ {-1, 0, ""}
};
static void do_color_key(bNode *node, float *out, float *in)
@@ -92,7 +92,7 @@ static void node_composit_exec_color_matte(void *data, bNode *node, bNodeStack *
/*convert rgbbuf to hsv*/
composit1_pixel_processor(node, colorbuf, cbuf, in[0]->vec, do_rgba_to_hsva, CB_RGBA);
- /*convert key to hsv*/
+ /*convert key to hsv*/
do_rgba_to_hsva(node, c->key, in[1]->vec);
diff --git a/source/blender/nodes/composite/nodes/node_composite_colorSpill.c b/source/blender/nodes/composite/nodes/node_composite_colorSpill.c
index 46d7c620aa8..81693c31d87 100644
--- a/source/blender/nodes/composite/nodes/node_composite_colorSpill.c
+++ b/source/blender/nodes/composite/nodes/node_composite_colorSpill.c
@@ -37,14 +37,14 @@
/* ******************* Color Spill Supression ********************************* */
static bNodeSocketTemplate cmp_node_color_spill_in[]={
- {SOCK_RGBA,1,"Image", 1.0f, 1.0f, 1.0f, 1.0f},
+ {SOCK_RGBA, 1, "Image", 1.0f, 1.0f, 1.0f, 1.0f},
{SOCK_FLOAT, 1, "Fac", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR},
- {-1,0,""}
+ {-1, 0, ""}
};
static bNodeSocketTemplate cmp_node_color_spill_out[]={
- {SOCK_RGBA,0,"Image"},
- {-1,0,""}
+ {SOCK_RGBA, 0, "Image"},
+ {-1, 0, ""}
};
static void do_simple_spillmap_red(bNode *node, float* out, float *in)
@@ -161,7 +161,7 @@ static void do_apply_spillmap_green(bNode *node, float* out, float *in, float *m
out[0]=in[0]+(ncs->uspillr*map[0]);
out[1]=in[1]-(ncs->uspillg*map[0]);
out[2]=in[2]+(ncs->uspillb*map[0]);
- }
+ }
else {
out[0]=in[0];
out[1]=in[1];
@@ -177,7 +177,7 @@ static void do_apply_spillmap_blue(bNode *node, float* out, float *in, float *ma
out[0]=in[0]+(ncs->uspillr*map[0]);
out[1]=in[1]+(ncs->uspillg*map[0]);
out[2]=in[2]-(ncs->uspillb*map[0]);
- }
+ }
else {
out[0]=in[0];
out[1]=in[1];
@@ -206,12 +206,10 @@ static void node_composit_exec_color_spill(void *UNUSED(data), bNode *node, bNod
spillmap=alloc_compbuf(cbuf->x, cbuf->y, CB_VAL, 1);
rgbbuf=dupalloc_compbuf(cbuf);
- switch(node->custom1)
- {
+ switch (node->custom1) {
case 1: /*red spill*/
{
- switch(node->custom2)
- {
+ switch (node->custom2) {
case 0: /* simple limit */
{
if ((in[1]->data==NULL) && (in[1]->vec[0] >= 1.f)) {
@@ -243,8 +241,7 @@ static void node_composit_exec_color_spill(void *UNUSED(data), bNode *node, bNod
}
case 2: /*green spill*/
{
- switch(node->custom2)
- {
+ switch (node->custom2) {
case 0: /* simple limit */
{
if ((in[1]->data==NULL) && (in[1]->vec[0] >= 1.f)) {
@@ -276,8 +273,7 @@ static void node_composit_exec_color_spill(void *UNUSED(data), bNode *node, bNod
}
case 3: /*blue spill*/
{
- switch(node->custom2)
- {
+ switch (node->custom2) {
case 0: /* simple limit */
{
if ((in[1]->data==NULL) && (in[1]->vec[0] >= 1.f)) {
diff --git a/source/blender/nodes/composite/nodes/node_composite_colorbalance.c b/source/blender/nodes/composite/nodes/node_composite_colorbalance.c
index f77e4cd9c4e..8dead1babdd 100644
--- a/source/blender/nodes/composite/nodes/node_composite_colorbalance.c
+++ b/source/blender/nodes/composite/nodes/node_composite_colorbalance.c
@@ -37,13 +37,13 @@
/* ******************* Color Balance ********************************* */
static bNodeSocketTemplate cmp_node_colorbalance_in[]={
{SOCK_FLOAT, 1, "Fac", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR},
- {SOCK_RGBA,1,"Image", 1.0f, 1.0f, 1.0f, 1.0f},
- {-1,0,""}
+ {SOCK_RGBA, 1, "Image", 1.0f, 1.0f, 1.0f, 1.0f},
+ {-1, 0, ""}
};
static bNodeSocketTemplate cmp_node_colorbalance_out[]={
- {SOCK_RGBA,0,"Image"},
- {-1,0,""}
+ {SOCK_RGBA, 0, "Image"},
+ {-1, 0, ""}
};
/* this function implements ASC-CDL according to the spec at http://www.asctech.org/
diff --git a/source/blender/nodes/composite/nodes/node_composite_defocus.c b/source/blender/nodes/composite/nodes/node_composite_defocus.c
index fc6e6847f34..72dec01066e 100644
--- a/source/blender/nodes/composite/nodes/node_composite_defocus.c
+++ b/source/blender/nodes/composite/nodes/node_composite_defocus.c
@@ -261,7 +261,7 @@ static void defocus_blur(bNode *node, CompBuf *new, CompBuf *img, CompBuf *zbuf,
if (camob && camob->type==OB_CAMERA) {
Camera* cam = (Camera*)camob->data;
cam_lens = cam->lens;
- cam_fdist = object_camera_dof_distance(camob);
+ cam_fdist = BKE_camera_object_dof_distance(camob);
if (cam_fdist==0.0f) cam_fdist = 1e10f; /* if the dof is 0.0 then set it be be far away */
cam_invfdist = 1.f/cam_fdist;
}
diff --git a/source/blender/nodes/composite/nodes/node_composite_diffMatte.c b/source/blender/nodes/composite/nodes/node_composite_diffMatte.c
index 027786d8b22..c7fbcb46c23 100644
--- a/source/blender/nodes/composite/nodes/node_composite_diffMatte.c
+++ b/source/blender/nodes/composite/nodes/node_composite_diffMatte.c
@@ -4,7 +4,7 @@
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -26,62 +26,65 @@
*/
/** \file blender/nodes/composite/nodes/node_composite_diffMatte.c
- * \ingroup cmpnodes
- */
+* \ingroup cmpnodes
+*/
#include "node_composite_util.h"
/* ******************* channel Difference Matte ********************************* */
static bNodeSocketTemplate cmp_node_diff_matte_in[]={
- {SOCK_RGBA,1,"Image 1", 1.0f, 1.0f, 1.0f, 1.0f},
- {SOCK_RGBA,1,"Image 2", 1.0f, 1.0f, 1.0f, 1.0f},
- {-1,0,""}
+ {SOCK_RGBA, 1, "Image 1", 1.0f, 1.0f, 1.0f, 1.0f},
+ {SOCK_RGBA, 1, "Image 2", 1.0f, 1.0f, 1.0f, 1.0f},
+ {-1, 0, ""}
};
static bNodeSocketTemplate cmp_node_diff_matte_out[]={
- {SOCK_RGBA,0,"Image"},
- {SOCK_FLOAT,0,"Matte"},
- {-1,0,""}
+ {SOCK_RGBA, 0, "Image"},
+ {SOCK_FLOAT, 0, "Matte"},
+ {-1, 0, ""}
};
static void do_diff_matte(bNode *node, float *outColor, float *inColor1, float *inColor2)
{
NodeChroma *c= (NodeChroma *)node->storage;
float tolerence=c->t1;
- float falloff=c->t2;
+ float fper=c->t2;
+ /* get falloff amount over tolerence size */
+ float falloff=(1.0f-fper) * tolerence;
float difference;
float alpha;
+ float maxInputAlpha;
+ /* average together the distances */
difference= fabs(inColor2[0]-inColor1[0]) +
- fabs(inColor2[1]-inColor1[1]) +
- fabs(inColor2[2]-inColor1[2]);
-
- /*average together the distances*/
+ fabs(inColor2[1]-inColor1[1]) +
+ fabs(inColor2[2]-inColor1[2]);
difference=difference/3.0f;
copy_v3_v3(outColor, inColor1);
- /*make 100% transparent*/
- if (difference < tolerence) {
- outColor[3]=0.0;
- }
- /*in the falloff region, make partially transparent */
- else if (difference < falloff+tolerence) {
- difference=difference-tolerence;
- alpha=difference/falloff;
- /*only change if more transparent than before */
- if (alpha < inColor1[3]) {
- outColor[3]=alpha;
+ if (difference <= tolerence) {
+ if (difference <= falloff) {
+ alpha = 0.0f;
+ }
+ else {
+ /* alpha as percent (distance / tolerance), each modified by falloff amount (in pixels)*/
+ alpha=(difference-falloff)/(tolerence-falloff);
+ }
+
+ /*only change if more transparent than either image */
+ maxInputAlpha=maxf(inColor1[3], inColor2[3]);
+ if (alpha < maxInputAlpha) {
+ /*clamp*/
+ if (alpha < 0.0f) alpha = 0.0f;
+ if (alpha > 1.0f) alpha = 1.0f;
+ outColor[3] = alpha;
}
else { /* leave as before */
- outColor[3]=inColor1[3];
+ outColor[3]=maxInputAlpha;
}
}
- else {
- /*foreground object*/
- outColor[3]= inColor1[3];
- }
}
static void node_composit_exec_diff_matte(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
diff --git a/source/blender/nodes/composite/nodes/node_composite_directionalblur.c b/source/blender/nodes/composite/nodes/node_composite_directionalblur.c
index f65b3312bea..49690499569 100644
--- a/source/blender/nodes/composite/nodes/node_composite_directionalblur.c
+++ b/source/blender/nodes/composite/nodes/node_composite_directionalblur.c
@@ -72,7 +72,7 @@ static CompBuf *dblur(bNode *node, CompBuf *img, int iterations, int wrap,
const float cs= cosf(rot), ss= sinf(rot);
const float isc= 1.f / (1.f + sc);
unsigned int x, y;
- float col[4]= {0,0,0,0};
+ float col[4]= {0, 0, 0, 0};
for (y= 0; y < img->y; ++y) {
const float v= isc * (y - center_y_pix) + ty;
diff --git a/source/blender/nodes/composite/nodes/node_composite_distanceMatte.c b/source/blender/nodes/composite/nodes/node_composite_distanceMatte.c
index 7aaaa7ed9b4..1976aa45eed 100644
--- a/source/blender/nodes/composite/nodes/node_composite_distanceMatte.c
+++ b/source/blender/nodes/composite/nodes/node_composite_distanceMatte.c
@@ -4,7 +4,7 @@
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -26,23 +26,23 @@
*/
/** \file blender/nodes/composite/nodes/node_composite_distanceMatte.c
- * \ingroup cmpnodes
- */
+* \ingroup cmpnodes
+*/
#include "node_composite_util.h"
/* ******************* channel Distance Matte ********************************* */
static bNodeSocketTemplate cmp_node_distance_matte_in[]={
- {SOCK_RGBA,1,"Image", 1.0f, 1.0f, 1.0f, 1.0f},
- {SOCK_RGBA,1,"Key Color", 1.0f, 1.0f, 1.0f, 1.0f},
- {-1,0,""}
+ {SOCK_RGBA, 1, "Image", 1.0f, 1.0f, 1.0f, 1.0f},
+ {SOCK_RGBA, 1, "Key Color", 1.0f, 1.0f, 1.0f, 1.0f},
+ {-1, 0, ""}
};
static bNodeSocketTemplate cmp_node_distance_matte_out[]={
- {SOCK_RGBA,0,"Image"},
- {SOCK_FLOAT,0,"Matte"},
- {-1,0,""}
+ {SOCK_RGBA, 0, "Image"},
+ {SOCK_FLOAT, 0, "Matte"},
+ {-1, 0, ""}
};
/* note, keyvals is passed on from caller as stack array */
@@ -51,34 +51,88 @@ static void do_distance_matte(bNode *node, float *out, float *in)
{
NodeChroma *c= (NodeChroma *)node->storage;
float tolerence=c->t1;
- float falloff=c->t2;
+ float fper=c->t2;
+ /* get falloff amount over tolerence size */
+ float falloff=(1.0f-fper) * tolerence;
float distance;
float alpha;
distance=sqrt((c->key[0]-in[0])*(c->key[0]-in[0]) +
- (c->key[1]-in[1])*(c->key[1]-in[1]) +
- (c->key[2]-in[2])*(c->key[2]-in[2]));
+ (c->key[1]-in[1])*(c->key[1]-in[1]) +
+ (c->key[2]-in[2])*(c->key[2]-in[2]));
copy_v3_v3(out, in);
- /*make 100% transparent */
- if (distance < tolerence) {
- out[3]=0.0;
- }
- /*in the falloff region, make partially transparent */
- else if (distance < falloff+tolerence) {
- distance=distance-tolerence;
- alpha=distance/falloff;
+ if (distance <= tolerence) {
+ if (distance <= falloff) {
+ alpha = 0.0f;
+ }
+ else {
+ /* alpha as percent (distance / tolerance), each modified by falloff amount (in pixels)*/
+ alpha=(distance-falloff)/(tolerence-falloff);
+ }
+
/*only change if more transparent than before */
if (alpha < in[3]) {
+ /*clamp*/
+ if (alpha < 0.0f) alpha = 0.0f;
+ if (alpha > 1.0f) alpha = 1.0f;
out[3]=alpha;
}
else { /* leave as before */
out[3]=in[3];
}
}
- else {
- out[3]=in[3];
+}
+
+static void do_chroma_distance_matte(bNode *node, float *out, float *in)
+{
+ NodeChroma *c= (NodeChroma *)node->storage;
+ float tolerence=c->t1;
+ float fper=c->t2;
+ /* get falloff amount over tolerence size */
+ float falloff=(1.0f-fper) * tolerence;
+ float y_key, cb_key, cr_key;
+ float y_pix, cb_pix, cr_pix;
+ float distance;
+ float alpha;
+
+ /*convert key to chroma colorspace */
+ rgb_to_ycc(c->key[0], c->key[1], c->key[2], &y_key, &cb_key, &cr_key, BLI_YCC_JFIF_0_255);
+ /* normalize the values */
+ cb_key=cb_key/255.0f;
+ cr_key=cr_key/255.0f;
+
+ /*convert pixel to chroma colorspace */
+ rgb_to_ycc(in[0], in[1], in[2], &y_pix, &cb_pix, &cr_pix, BLI_YCC_JFIF_0_255);
+ /*normalize the values */
+ cb_pix=cb_pix/255.0f;
+ cr_pix=cr_pix/255.0f;
+
+ distance=sqrt((cb_key-cb_pix)*(cb_key-cb_pix) +
+ (cr_key-cr_pix)*(cr_key-cr_pix));
+
+ copy_v3_v3(out, in);
+
+ if (distance <= tolerence) {
+ if (distance <= falloff) {
+ alpha = 0.0f;
+ }
+ else {
+ /* alpha as percent (distance / tolerance), each modified by falloff amount (in pixels)*/
+ alpha=(distance-falloff)/(tolerence-falloff);
+ }
+
+ /*only change if more transparent than before */
+ if (alpha < in[3]) {
+ /*clamp*/
+ if (alpha < 0.0f) alpha = 0.0f;
+ if (alpha > 1.0f) alpha = 1.0f;
+ out[3]=alpha;
+ }
+ else { /* leave as before */
+ out[3]=in[3];
+ }
}
}
@@ -91,26 +145,34 @@ static void node_composit_exec_distance_matte(void *data, bNode *node, bNodeStac
CompBuf *workbuf;
CompBuf *inbuf;
NodeChroma *c;
-
+
/*is anything connected?*/
if (out[0]->hasoutput==0 && out[1]->hasoutput==0) return;
/*must have an image imput*/
if (in[0]->data==NULL) return;
-
+
inbuf=typecheck_compbuf(in[0]->data, CB_RGBA);
-
+
c=node->storage;
workbuf=dupalloc_compbuf(inbuf);
-
+
/*use the input color*/
c->key[0]= in[1]->vec[0];
c->key[1]= in[1]->vec[1];
c->key[2]= in[1]->vec[2];
-
- /* note, processor gets a keyvals array passed on as buffer constant */
- composit1_pixel_processor(node, workbuf, workbuf, in[0]->vec, do_distance_matte, CB_RGBA);
-
-
+
+ /* work in RGB color space */
+ if (c->channel == 1) {
+ /* note, processor gets a keyvals array passed on as buffer constant */
+ composit1_pixel_processor(node, workbuf, workbuf, in[0]->vec, do_distance_matte, CB_RGBA);
+ }
+ /* work in YCbCr color space */
+ else {
+ composit1_pixel_processor(node, workbuf, workbuf, in[0]->vec, do_chroma_distance_matte, CB_RGBA);
+ }
+
+
+
out[0]->data=workbuf;
if (out[1]->hasoutput)
out[1]->data=valbuf_from_rgbabuf(workbuf, CHAN_A);
@@ -124,6 +186,7 @@ static void node_composit_init_distance_matte(bNodeTree *UNUSED(ntree), bNode* n
{
NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node chroma");
node->storage= c;
+ c->channel=1;
c->t1= 0.1f;
c->t2= 0.1f;
}
diff --git a/source/blender/nodes/composite/nodes/node_composite_doubleEdgeMask.c b/source/blender/nodes/composite/nodes/node_composite_doubleEdgeMask.c
index 966d8f8a21a..6eb70636efa 100644
--- a/source/blender/nodes/composite/nodes/node_composite_doubleEdgeMask.c
+++ b/source/blender/nodes/composite/nodes/node_composite_doubleEdgeMask.c
@@ -786,7 +786,7 @@ static void do_allEdgeDetection(unsigned int t, unsigned int rw, unsigned int *l
int pix_prevCol; // pix_prevCol = pixel one column behind the one we are testing in a loop
int pix_nextCol; // pix_nextCol = pixel one column in front of the one we are testing in a loop
/* Test all rows between the FIRST and LAST rows, excluding left and right edges */
- for (x= (t-rw)+1, dx=x-(rw-2); dx>rw; x-=rw,dx-=rw) {
+ for (x= (t-rw)+1, dx=x-(rw-2); dx>rw; x-=rw, dx-=rw) {
a=x-2;
pix_prevRow=a+rw;
pix_nextRow=a-rw;
@@ -848,7 +848,7 @@ static void do_adjacentEdgeDetection(unsigned int t, unsigned int rw, unsigned i
int pix_prevCol; // pix_prevCol = pixel one column behind the one we are testing in a loop
int pix_nextCol; // pix_nextCol = pixel one column in front of the one we are testing in a loop
/* Test all rows between the FIRST and LAST rows, excluding left and right edges */
- for (x= (t-rw)+1, dx=x-(rw-2); dx>rw; x-=rw,dx-=rw) {
+ for (x= (t-rw)+1, dx=x-(rw-2); dx>rw; x-=rw, dx-=rw) {
a=x-2;
pix_prevRow=a+rw;
pix_nextRow=a-rw;
@@ -917,13 +917,13 @@ static void do_createEdgeLocationBuffer(unsigned int t, unsigned int rw, unsigne
unsigned int outerAccum=0; // for looping outer edge pixel indexes, represents current position from offset
unsigned int gradientAccum=0; // for looping gradient pixel indexes, represents current position from offset
/*
- * Here we compute the size of buffer needed to hold (row,col) coordinates
+ * Here we compute the size of buffer needed to hold (row, col) coordinates
* for each pixel previously determined to be either gradient, inner edge,
* or outer edge.
*
* Allocation is done by requesting 4 bytes "sizeof(int)" per pixel, even
* though gbuf[] is declared as unsigned short* (2 bytes) because we don't
- * store the pixel indexes, we only store x,y location of pixel in buffer.
+ * store the pixel indexes, we only store x, y location of pixel in buffer.
*
* This does make the assumption that x and y can fit in 16 unsigned bits
* so if Blender starts doing renders greater than 65536 in either direction
@@ -961,7 +961,7 @@ static void do_createEdgeLocationBuffer(unsigned int t, unsigned int rw, unsigne
* gradientFillOffset (0 pixels) innerEdgeOffset (18 pixels) outerEdgeOffset (22 pixels)
* / / /
* / / /
- * |X Y X Y X Y X Y > <X Y X Y > <X Y X Y X Y > <X Y X Y | <- (x,y)
+ * |X Y X Y X Y X Y > <X Y X Y > <X Y X Y X Y > <X Y X Y | <- (x, y)
* +--------------------------------> <----------------> <------------------------> <----------------+
* |0 2 4 6 8 10 12 14 > ... <68 70 72 74 > ... <80 82 84 86 88 90 > ... <152 154 156 158 | <- bytes
* +--------------------------------> <----------------> <------------------------> <----------------+
@@ -975,7 +975,7 @@ static void do_createEdgeLocationBuffer(unsigned int t, unsigned int rw, unsigne
* Ultimately we do need the pixel's memory buffer index to set the output
* pixel color, but it's faster to reconstruct the memory buffer location
* each iteration of the final gradient calculation than it is to deconstruct
- * a memory location into x,y pairs each round.
+ * a memory location into x, y pairs each round.
*/
@@ -987,7 +987,7 @@ static void do_createEdgeLocationBuffer(unsigned int t, unsigned int rw, unsigne
innerAccum = *innerEdgeOffset; // section's offset so when we start filling, each
outerAccum = *outerEdgeOffset; // section fills up it's allocated space in gbuf
//uses dmin=row, rsl=col
- for (x=0,dmin=0; x<t; x+=rw,dmin++) {
+ for (x=0, dmin=0; x<t; x+=rw, dmin++) {
for (rsl=0; rsl<rw; rsl++) {
a=x+rsl;
if (lres[a]==2) { // it is a gradient pixel flagged by 2
@@ -1222,29 +1222,29 @@ static void node_composit_exec_doubleedgemask(void *UNUSED(data), bNode *node, b
*/
if (node->custom2) { // if "adjacent only" inner edge mode is turned on
if (node->custom1) { // if "keep inside" buffer edge mode is turned on
- do_adjacentKeepBorders(t,rw,limask,lomask,lres,res,rsize);
+ do_adjacentKeepBorders(t, rw, limask, lomask, lres, res, rsize);
}
else { // "bleed out" buffer edge mode is turned on
- do_adjacentBleedBorders(t,rw,limask,lomask,lres,res,rsize);
+ do_adjacentBleedBorders(t, rw, limask, lomask, lres, res, rsize);
}
isz=rsize[0]; // set up inner edge, outer edge, and gradient buffer sizes after border pass
osz=rsize[1];
gsz=rsize[2];
// detect edges in all non-border pixels in the buffer
- do_adjacentEdgeDetection(t,rw,limask,lomask,lres,res,rsize,isz,osz,gsz);
+ do_adjacentEdgeDetection(t, rw, limask, lomask, lres, res, rsize, isz, osz, gsz);
}
else { // "all" inner edge mode is turned on
if (node->custom1) { // if "keep inside" buffer edge mode is turned on
- do_allKeepBorders(t,rw,limask,lomask,lres,res,rsize);
+ do_allKeepBorders(t, rw, limask, lomask, lres, res, rsize);
}
else { // "bleed out" buffer edge mode is turned on
- do_allBleedBorders(t,rw,limask,lomask,lres,res,rsize);
+ do_allBleedBorders(t, rw, limask, lomask, lres, res, rsize);
}
isz=rsize[0]; // set up inner edge, outer edge, and gradient buffer sizes after border pass
osz=rsize[1];
gsz=rsize[2];
// detect edges in all non-border pixels in the buffer
- do_allEdgeDetection(t,rw,limask,lomask,lres,res,rsize,isz,osz,gsz);
+ do_allEdgeDetection(t, rw, limask, lomask, lres, res, rsize, isz, osz, gsz);
}
isz=rsize[0]; // set edge and gradient buffer sizes once again...
@@ -1263,8 +1263,8 @@ static void node_composit_exec_doubleedgemask(void *UNUSED(data), bNode *node, b
fsz=gsz+isz+osz; // calculate size of pixel index buffer needed
gbuf= MEM_mallocN(fsz*sizeof(int), "grd buf"); // allocate edge/gradient pixel index buffer
- do_createEdgeLocationBuffer(t,rw,lres,res,gbuf,&innerEdgeOffset,&outerEdgeOffset,isz,gsz);
- do_fillGradientBuffer(rw,res,gbuf,isz,osz,gsz,innerEdgeOffset,outerEdgeOffset);
+ do_createEdgeLocationBuffer(t, rw, lres, res, gbuf, &innerEdgeOffset, &outerEdgeOffset, isz, gsz);
+ do_fillGradientBuffer(rw, res, gbuf, isz, osz, gsz, innerEdgeOffset, outerEdgeOffset);
MEM_freeN(gbuf); // free the gradient index buffer
out[0]->data= stackbuf; // point the node output buffer to our filled buffer
diff --git a/source/blender/nodes/composite/nodes/node_composite_filter.c b/source/blender/nodes/composite/nodes/node_composite_filter.c
index 6d470467cb0..5adabecba08 100644
--- a/source/blender/nodes/composite/nodes/node_composite_filter.c
+++ b/source/blender/nodes/composite/nodes/node_composite_filter.c
@@ -168,12 +168,12 @@ static void do_filter3(CompBuf *out, CompBuf *in, float *filter, float fac)
static void node_composit_exec_filter(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
{
static float soft[9]= {1/16.0f, 2/16.0f, 1/16.0f, 2/16.0f, 4/16.0f, 2/16.0f, 1/16.0f, 2/16.0f, 1/16.0f};
- float sharp[9]= {-1,-1,-1,-1,9,-1,-1,-1,-1};
+ float sharp[9]= {-1, -1, -1, -1, 9, -1, -1, -1, -1};
float laplace[9]= {-1/8.0f, -1/8.0f, -1/8.0f, -1/8.0f, 1.0f, -1/8.0f, -1/8.0f, -1/8.0f, -1/8.0f};
- float sobel[9]= {1,2,1,0,0,0,-1,-2,-1};
- float prewitt[9]= {1,1,1,0,0,0,-1,-1,-1};
- float kirsch[9]= {5,5,5,-3,-3,-3,-2,-2,-2};
- float shadow[9]= {1,2,1,0,1,0,-1,-2,-1};
+ float sobel[9]= {1, 2, 1, 0, 0, 0, -1, -2, -1};
+ float prewitt[9]= {1, 1, 1, 0, 0, 0, -1, -1, -1};
+ float kirsch[9]= {5, 5, 5, -3, -3, -3, -2, -2, -2};
+ float shadow[9]= {1, 2, 1, 0, 1, 0, -1, -2, -1};
if (out[0]->hasoutput==0) return;
@@ -189,7 +189,7 @@ static void node_composit_exec_filter(void *data, bNode *node, bNodeStack **in,
stackbuf->xof= cbuf->xof;
stackbuf->yof= cbuf->yof;
- switch(node->custom1) {
+ switch (node->custom1) {
case CMP_FILT_SOFT:
do_filter3(stackbuf, cbuf, soft, in[0]->vec[0]);
break;
diff --git a/source/blender/nodes/composite/nodes/node_composite_gamma.c b/source/blender/nodes/composite/nodes/node_composite_gamma.c
index ae793b44f2c..2ee94224e4b 100644
--- a/source/blender/nodes/composite/nodes/node_composite_gamma.c
+++ b/source/blender/nodes/composite/nodes/node_composite_gamma.c
@@ -50,7 +50,7 @@ static void do_gamma(bNode *UNUSED(node), float *out, float *in, float *fac)
int i=0;
for (i=0; i<3; i++) {
/* check for negative to avoid nan's */
- out[i] = (in[i] > 0.0f)? powf(in[i],fac[0]): in[i];
+ out[i] = (in[i] > 0.0f)? powf(in[i], fac[0]): in[i];
}
out[3] = in[3];
}
diff --git a/source/blender/nodes/composite/nodes/node_composite_glare.c b/source/blender/nodes/composite/nodes/node_composite_glare.c
index 42760ddfc4e..7484ae266fc 100644
--- a/source/blender/nodes/composite/nodes/node_composite_glare.c
+++ b/source/blender/nodes/composite/nodes/node_composite_glare.c
@@ -124,7 +124,7 @@ static CompBuf* BTP(CompBuf* src, float threshold, int scaledown)
static void star4(NodeGlare* ndg, CompBuf* dst, CompBuf* src)
{
int x, y, i, xm, xp, ym, yp;
- float c[4] = {0,0,0,0}, tc[4] = {0,0,0,0};
+ float c[4] = {0, 0, 0, 0}, tc[4] = {0, 0, 0, 0};
CompBuf *tbuf1, *tbuf2, *tsrc;
const float f1 = 1.f - ndg->fade, f2 = (1.f - f1)*0.5f;
//const float t3 = ndg->threshold*3.f;
diff --git a/source/blender/nodes/composite/nodes/node_composite_hueSatVal.c b/source/blender/nodes/composite/nodes/node_composite_hueSatVal.c
index 7349d1dd4bf..7089983fdbc 100644
--- a/source/blender/nodes/composite/nodes/node_composite_hueSatVal.c
+++ b/source/blender/nodes/composite/nodes/node_composite_hueSatVal.c
@@ -81,7 +81,7 @@ static void node_composit_exec_hue_sat(void *UNUSED(data), bNode *node, bNodeSta
else {
/* make output size of input image */
CompBuf *cbuf= dupalloc_compbuf(in[1]->data);
- CompBuf *stackbuf=typecheck_compbuf(cbuf,CB_RGBA);
+ CompBuf *stackbuf=typecheck_compbuf(cbuf, CB_RGBA);
composit2_pixel_processor(node, stackbuf, stackbuf, in[1]->vec, in[0]->data, in[0]->vec, do_hue_sat_fac, CB_RGBA, CB_VAL);
diff --git a/source/blender/nodes/composite/nodes/node_composite_image.c b/source/blender/nodes/composite/nodes/node_composite_image.c
index 6a156c390a7..02bb16f644a 100644
--- a/source/blender/nodes/composite/nodes/node_composite_image.c
+++ b/source/blender/nodes/composite/nodes/node_composite_image.c
@@ -313,7 +313,7 @@ float *node_composit_get_float_buffer(RenderData *rd, ImBuf *ibuf, int *alloc)
}
/* note: this function is used for multilayer too, to ensure uniform
- handling with BKE_image_get_ibuf() */
+ * handling with BKE_image_get_ibuf() */
static CompBuf *node_composit_get_image(RenderData *rd, Image *ima, ImageUser *iuser)
{
ImBuf *ibuf;
@@ -420,7 +420,7 @@ static void node_composit_exec_image(void *data, bNode *node, bNodeStack **UNUSE
ImageUser *iuser= (ImageUser *)node->storage;
/* first set the right frame number in iuser */
- BKE_image_user_calc_frame(iuser, rd->cfra, 0);
+ BKE_image_user_frame_calc(iuser, rd->cfra, 0);
/* force a load, we assume iuser index will be set OK anyway */
if (ima->type==IMA_TYPE_MULTILAYER)
@@ -442,11 +442,14 @@ static void node_composit_exec_image(void *data, bNode *node, bNodeStack **UNUSE
/* preview policy: take first 'Combined' pass if available,
* otherwise just use the first layer.
*/
- if (!firstbuf)
+ if (!firstbuf) {
firstbuf = stackbuf;
+ }
if (!combinedbuf &&
- (strcmp(sock->name, "Combined")==0 || strcmp(sock->name, "Image")==0))
+ (strcmp(sock->name, "Combined") == 0 || strcmp(sock->name, "Image") == 0))
+ {
combinedbuf = stackbuf;
+ }
}
}
}
diff --git a/source/blender/nodes/composite/nodes/node_composite_levels.c b/source/blender/nodes/composite/nodes/node_composite_levels.c
index ec6d2006296..9888966c46a 100644
--- a/source/blender/nodes/composite/nodes/node_composite_levels.c
+++ b/source/blender/nodes/composite/nodes/node_composite_levels.c
@@ -40,9 +40,9 @@ static bNodeSocketTemplate cmp_node_view_levels_in[]= {
};
static bNodeSocketTemplate cmp_node_view_levels_out[]={
- {SOCK_FLOAT, 0,"Mean"},
- {SOCK_FLOAT, 0,"Std Dev"},
- {-1,0,""}
+ {SOCK_FLOAT, 0, "Mean"},
+ {SOCK_FLOAT, 0, "Std Dev"},
+ {-1, 0, ""}
};
static void rgb_tobw(float r, float g, float b, float* out)
@@ -54,7 +54,7 @@ static void fill_bins(bNode* node, CompBuf* in, int* bins)
{
float value[4];
int ivalue=0;
- int x,y;
+ int x, y;
/*fill bins */
for (y=0; y<in->y; y++) {
@@ -64,9 +64,9 @@ static void fill_bins(bNode* node, CompBuf* in, int* bins)
qd_getPixel(in, x, y, value);
if (value[3] > 0.0f) { /* don't count transparent pixels */
- switch(node->custom1) {
+ switch (node->custom1) {
case 1: { /* all colors */
- rgb_tobw(value[0],value[1],value[2], &value[0]);
+ rgb_tobw(value[0], value[1], value[2], &value[0]);
value[0]=value[0]*255; /* scale to 0-255 range */
ivalue=(int)value[0];
break;
@@ -89,7 +89,7 @@ static void fill_bins(bNode* node, CompBuf* in, int* bins)
}
case 5: /* luminence */
{
- rgb_to_yuv(value[0],value[1],value[2], &value[0], &value[1], &value[2]);
+ rgb_to_yuv(value[0], value[1], value[2], &value[0], &value[1], &value[2]);
value[0]=value[0]*255; /* scale to 0-255 range */
ivalue=(int)value[0];
break;
@@ -111,7 +111,7 @@ static float brightness_mean(bNode* node, CompBuf* in)
{
float sum=0.0;
int numPixels=0.0;
- int x,y;
+ int x, y;
float value[4];
for (x=0; x< in->x; x++) {
@@ -122,11 +122,10 @@ static float brightness_mean(bNode* node, CompBuf* in)
if (value[3] > 0.0f) { /* don't count transparent pixels */
numPixels++;
- switch(node->custom1)
- {
+ switch (node->custom1) {
case 1:
{
- rgb_tobw(value[0],value[1],value[2], &value[0]);
+ rgb_tobw(value[0], value[1], value[2], &value[0]);
sum+=value[0];
break;
}
@@ -147,7 +146,7 @@ static float brightness_mean(bNode* node, CompBuf* in)
}
case 5:
{
- rgb_to_yuv(value[0],value[1],value[2], &value[0], &value[1], &value[2]);
+ rgb_to_yuv(value[0], value[1], value[2], &value[0], &value[1], &value[2]);
sum+=value[0];
break;
}
@@ -163,7 +162,7 @@ static float brightness_standard_deviation(bNode* node, CompBuf* in, float mean)
{
float sum=0.0;
int numPixels=0.0;
- int x,y;
+ int x, y;
float value[4];
for (x=0; x< in->x; x++) {
@@ -174,11 +173,10 @@ static float brightness_standard_deviation(bNode* node, CompBuf* in, float mean)
if (value[3] > 0.0f) { /* don't count transparent pixels */
numPixels++;
- switch(node->custom1)
- {
+ switch (node->custom1) {
case 1:
{
- rgb_tobw(value[0],value[1],value[2], &value[0]);
+ rgb_tobw(value[0], value[1], value[2], &value[0]);
sum+=(value[0]-mean)*(value[0]-mean);
break;
}
@@ -202,7 +200,7 @@ static float brightness_standard_deviation(bNode* node, CompBuf* in, float mean)
}
case 5:
{
- rgb_to_yuv(value[0],value[1],value[2], &value[0], &value[1], &value[2]);
+ rgb_to_yuv(value[0], value[1], value[2], &value[0], &value[1], &value[2]);
sum+=(value[0]-mean)*(value[0]-mean);
break;
}
@@ -217,7 +215,7 @@ static float brightness_standard_deviation(bNode* node, CompBuf* in, float mean)
static void draw_histogram(bNode *node, CompBuf *out, int* bins)
{
- int x,y;
+ int x, y;
float color[4];
float value;
int max;
diff --git a/source/blender/nodes/composite/nodes/node_composite_lummaMatte.c b/source/blender/nodes/composite/nodes/node_composite_lummaMatte.c
index 85c291fd9ec..1518284e015 100644
--- a/source/blender/nodes/composite/nodes/node_composite_lummaMatte.c
+++ b/source/blender/nodes/composite/nodes/node_composite_lummaMatte.c
@@ -35,14 +35,14 @@
/* ******************* Luma Matte Node ********************************* */
static bNodeSocketTemplate cmp_node_luma_matte_in[]={
- {SOCK_RGBA,1,"Image", 1.0f, 1.0f, 1.0f, 1.0f},
- {-1,0,""}
+ {SOCK_RGBA, 1, "Image", 1.0f, 1.0f, 1.0f, 1.0f},
+ {-1, 0, ""}
};
static bNodeSocketTemplate cmp_node_luma_matte_out[]={
- {SOCK_RGBA,0,"Image"},
- {SOCK_FLOAT,0,"Matte"},
- {-1,0,""}
+ {SOCK_RGBA, 0, "Image"},
+ {SOCK_FLOAT, 0, "Matte"},
+ {-1, 0, ""}
};
static void do_luma_matte(bNode *node, float *out, float *in)
diff --git a/source/blender/nodes/composite/nodes/node_composite_math.c b/source/blender/nodes/composite/nodes/node_composite_math.c
index 8362df1b691..4c9d1a66fb0 100644
--- a/source/blender/nodes/composite/nodes/node_composite_math.c
+++ b/source/blender/nodes/composite/nodes/node_composite_math.c
@@ -46,8 +46,7 @@ static bNodeSocketTemplate cmp_node_math_out[]= {
static void do_math(bNode *node, float *out, float *in, float *in2)
{
- switch(node->custom1)
- {
+ switch (node->custom1) {
case 0: /* Add */
out[0]= in[0] + in2[0];
break;
diff --git a/source/blender/nodes/composite/nodes/node_composite_movieclip.c b/source/blender/nodes/composite/nodes/node_composite_movieclip.c
index dd2c169fe9a..2f017b52676 100644
--- a/source/blender/nodes/composite/nodes/node_composite_movieclip.c
+++ b/source/blender/nodes/composite/nodes/node_composite_movieclip.c
@@ -33,7 +33,7 @@
#include "node_composite_util.h"
-static bNodeSocketTemplate cmp_node_movieclip_out[]= {
+static bNodeSocketTemplate cmp_node_movieclip_out[] = {
{ SOCK_RGBA, 0, "Image"},
{ SOCK_FLOAT, 1, "Offset X"},
{ SOCK_FLOAT, 1, "Offset Y"},
@@ -49,50 +49,50 @@ static CompBuf *node_composit_get_movieclip(RenderData *rd, MovieClip *clip, Mov
int type;
float *rect;
- int alloc= FALSE;
+ int alloc = FALSE;
- orig_ibuf= BKE_movieclip_get_ibuf(clip, user);
+ orig_ibuf = BKE_movieclip_get_ibuf(clip, user);
- if (orig_ibuf==NULL || (orig_ibuf->rect==NULL && orig_ibuf->rect_float==NULL)) {
+ if (orig_ibuf == NULL || (orig_ibuf->rect == NULL && orig_ibuf->rect_float == NULL)) {
IMB_freeImBuf(orig_ibuf);
return NULL;
}
- ibuf= IMB_dupImBuf(orig_ibuf);
+ ibuf = IMB_dupImBuf(orig_ibuf);
IMB_freeImBuf(orig_ibuf);
- if (ibuf->rect_float == NULL || ibuf->userflags&IB_RECT_INVALID) {
+ if (ibuf->rect_float == NULL || (ibuf->userflags & IB_RECT_INVALID)) {
IMB_float_from_rect(ibuf);
- ibuf->userflags&= ~IB_RECT_INVALID;
+ ibuf->userflags &= ~IB_RECT_INVALID;
}
/* now we need a float buffer from the image with matching color management */
if (ibuf->channels == 4) {
- rect= node_composit_get_float_buffer(rd, ibuf, &alloc);
+ rect = node_composit_get_float_buffer(rd, ibuf, &alloc);
}
else {
/* non-rgba passes can't use color profiles */
- rect= ibuf->rect_float;
+ rect = ibuf->rect_float;
}
/* done coercing into the correct color management */
if (!alloc) {
- rect= MEM_dupallocN(rect);
- alloc= 1;
+ rect = MEM_dupallocN(rect);
+ alloc = TRUE;
}
- type= ibuf->channels;
+ type = ibuf->channels;
if (rd->scemode & R_COMP_CROP) {
- stackbuf= get_cropped_compbuf(&rd->disprect, rect, ibuf->x, ibuf->y, type);
+ stackbuf = get_cropped_compbuf(&rd->disprect, rect, ibuf->x, ibuf->y, type);
if (alloc)
MEM_freeN(rect);
}
else {
/* we put imbuf copy on stack, cbuf knows rect is from other ibuf when freed! */
- stackbuf= alloc_compbuf(ibuf->x, ibuf->y, type, FALSE);
- stackbuf->rect= rect;
- stackbuf->malloc= alloc;
+ stackbuf = alloc_compbuf(ibuf->x, ibuf->y, type, FALSE);
+ stackbuf->rect = rect;
+ stackbuf->malloc = alloc;
}
IMB_freeImBuf(ibuf);
@@ -103,32 +103,32 @@ static CompBuf *node_composit_get_movieclip(RenderData *rd, MovieClip *clip, Mov
static void node_composit_exec_movieclip(void *data, bNode *node, bNodeStack **UNUSED(in), bNodeStack **out)
{
if (node->id) {
- RenderData *rd= data;
- MovieClip *clip= (MovieClip *)node->id;
- MovieClipUser *user= (MovieClipUser *)node->storage;
- CompBuf *stackbuf= NULL;
+ RenderData *rd = data;
+ MovieClip *clip = (MovieClip *)node->id;
+ MovieClipUser *user = (MovieClipUser *)node->storage;
+ CompBuf *stackbuf = NULL;
BKE_movieclip_user_set_frame(user, rd->cfra);
- stackbuf= node_composit_get_movieclip(rd, clip, user);
+ stackbuf = node_composit_get_movieclip(rd, clip, user);
if (stackbuf) {
- MovieTrackingStabilization *stab= &clip->tracking.stabilization;
+ MovieTrackingStabilization *stab = &clip->tracking.stabilization;
/* put image on stack */
- out[0]->data= stackbuf;
+ out[0]->data = stackbuf;
- if (stab->flag&TRACKING_2D_STABILIZATION) {
+ if (stab->flag & TRACKING_2D_STABILIZATION) {
float loc[2], scale, angle;
BKE_tracking_stabilization_data(&clip->tracking, rd->cfra, stackbuf->x, stackbuf->y,
loc, &scale, &angle);
- out[1]->vec[0]= loc[0];
- out[2]->vec[0]= loc[1];
+ out[1]->vec[0] = loc[0];
+ out[2]->vec[0] = loc[1];
- out[3]->vec[0]= scale;
- out[4]->vec[0]= angle;
+ out[3]->vec[0] = scale;
+ out[4]->vec[0] = angle;
}
/* generate preview */
@@ -139,10 +139,10 @@ static void node_composit_exec_movieclip(void *data, bNode *node, bNodeStack **U
static void init(bNodeTree *UNUSED(ntree), bNode *node, bNodeTemplate *UNUSED(ntemp))
{
- MovieClipUser *user= MEM_callocN(sizeof(MovieClipUser), "node movie clip user");
+ MovieClipUser *user = MEM_callocN(sizeof(MovieClipUser), "node movie clip user");
- node->storage= user;
- user->framenr= 1;
+ node->storage = user;
+ user->framenr = 1;
}
void register_node_type_cmp_movieclip(bNodeTreeType *ttype)
diff --git a/source/blender/nodes/composite/nodes/node_composite_moviedistortion.c b/source/blender/nodes/composite/nodes/node_composite_moviedistortion.c
index d9f0da9b8aa..7a28eabec34 100644
--- a/source/blender/nodes/composite/nodes/node_composite_moviedistortion.c
+++ b/source/blender/nodes/composite/nodes/node_composite_moviedistortion.c
@@ -4,7 +4,7 @@
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -37,12 +37,12 @@
/* **************** Translate ******************** */
-static bNodeSocketTemplate cmp_node_moviedistortion_in[]= {
+static bNodeSocketTemplate cmp_node_moviedistortion_in[] = {
{ SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
-static bNodeSocketTemplate cmp_node_moviedistortion_out[]= {
+static bNodeSocketTemplate cmp_node_moviedistortion_out[] = {
{ SOCK_RGBA, 0, "Image"},
{ -1, 0, "" }
};
@@ -51,63 +51,63 @@ static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
{
if (in[0]->data) {
if (node->id) {
- MovieClip *clip= (MovieClip *)node->id;
- CompBuf *cbuf= typecheck_compbuf(in[0]->data, CB_RGBA);
- CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 0);
+ MovieClip *clip = (MovieClip *)node->id;
+ CompBuf *cbuf = typecheck_compbuf(in[0]->data, CB_RGBA);
+ CompBuf *stackbuf = alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 0);
ImBuf *ibuf;
- ibuf= IMB_allocImBuf(cbuf->x, cbuf->y, 32, 0);
+ ibuf = IMB_allocImBuf(cbuf->x, cbuf->y, 32, 0);
if (ibuf) {
- RenderData *rd= data;
+ RenderData *rd = data;
ImBuf *obuf;
- MovieTracking *tracking= &clip->tracking;
+ MovieTracking *tracking = &clip->tracking;
int width, height;
- float overscan= 0.0f;
- MovieClipUser user= {0};
+ float overscan = 0.0f;
+ MovieClipUser user = {0};
BKE_movieclip_user_set_frame(&user, rd->cfra);
- ibuf->rect_float= cbuf->rect;
+ ibuf->rect_float = cbuf->rect;
BKE_movieclip_get_size(clip, &user, &width, &height);
if (!node->storage)
- node->storage= BKE_tracking_distortion_create();
+ node->storage = BKE_tracking_distortion_create();
- if (node->custom1==0)
- obuf= BKE_tracking_distortion_exec(node->storage, tracking, ibuf, width, height, overscan, 1);
+ if (node->custom1 == 0)
+ obuf = BKE_tracking_distortion_exec(node->storage, tracking, ibuf, width, height, overscan, 1);
else
- obuf= BKE_tracking_distortion_exec(node->storage, tracking, ibuf, width, height, overscan, 0);
+ obuf = BKE_tracking_distortion_exec(node->storage, tracking, ibuf, width, height, overscan, 0);
- stackbuf->rect= obuf->rect_float;
- stackbuf->malloc= 1;
+ stackbuf->rect = obuf->rect_float;
+ stackbuf->malloc = TRUE;
- obuf->mall&= ~IB_rectfloat;
- obuf->rect_float= NULL;
+ obuf->mall &= ~IB_rectfloat;
+ obuf->rect_float = NULL;
IMB_freeImBuf(ibuf);
IMB_freeImBuf(obuf);
}
/* pass on output and free */
- out[0]->data= stackbuf;
+ out[0]->data = stackbuf;
- if (cbuf!=in[0]->data)
+ if (cbuf != in[0]->data)
free_compbuf(cbuf);
}
else {
- CompBuf *cbuf= in[0]->data;
- CompBuf *stackbuf= pass_on_compbuf(cbuf);
+ CompBuf *cbuf = in[0]->data;
+ CompBuf *stackbuf = pass_on_compbuf(cbuf);
- out[0]->data= stackbuf;
+ out[0]->data = stackbuf;
}
}
}
static const char *label(bNode *node)
{
- if (node->custom1==0)
+ if (node->custom1 == 0)
return IFACE_("Undistortion");
else
return IFACE_("Distortion");
@@ -118,13 +118,13 @@ static void storage_free(bNode *node)
if (node->storage)
BKE_tracking_distortion_destroy(node->storage);
- node->storage= NULL;
+ node->storage = NULL;
}
static void storage_copy(bNode *orig_node, bNode *new_node)
{
if (orig_node->storage)
- new_node->storage= BKE_tracking_distortion_copy(orig_node->storage);
+ new_node->storage = BKE_tracking_distortion_copy(orig_node->storage);
}
void register_node_type_cmp_moviedistortion(bNodeTreeType *ttype)
diff --git a/source/blender/nodes/composite/nodes/node_composite_outputFile.c b/source/blender/nodes/composite/nodes/node_composite_outputFile.c
index 2eb68c787fb..18a535018ba 100644
--- a/source/blender/nodes/composite/nodes/node_composite_outputFile.c
+++ b/source/blender/nodes/composite/nodes/node_composite_outputFile.c
@@ -48,12 +48,13 @@
bNodeSocket *ntreeCompositOutputFileAddSocket(bNodeTree *ntree, bNode *node, const char *name, ImageFormatData *im_format)
{
NodeImageMultiFile *nimf = node->storage;
- bNodeSocket *sock = nodeAddSocket(ntree, node, SOCK_IN, name, SOCK_RGBA);
+ bNodeSocket *sock = nodeAddSocket(ntree, node, SOCK_IN, "", SOCK_RGBA);
/* create format data for the input socket */
NodeImageMultiFileSocket *sockdata = MEM_callocN(sizeof(NodeImageMultiFileSocket), "socket image format");
sock->storage = sockdata;
- sock->struct_type = SOCK_STRUCT_OUTPUT_FILE;
+
+ BLI_strncpy(sockdata->path, name, sizeof(sockdata->path));
if (im_format) {
sockdata->format= *im_format;
@@ -188,10 +189,10 @@ static void exec_output_file_singlelayer(RenderData *rd, bNode *node, bNodeStack
ibuf->profile = IB_PROFILE_LINEAR_RGB;
/* get full path */
- BLI_join_dirfile(path, FILE_MAX, nimf->base_path, sock->name);
+ BLI_join_dirfile(path, FILE_MAX, nimf->base_path, sockdata->path);
BKE_makepicstring(filename, path, bmain->name, rd->cfra, format->imtype, (rd->scemode & R_EXTENSION), TRUE);
- if (0 == BKE_write_ibuf(ibuf, filename, format))
+ if (0 == BKE_imbuf_write(ibuf, filename, format))
printf("Cannot save Node File Output to %s\n", filename);
else
printf("Saved: %s\n", filename);
@@ -229,6 +230,7 @@ static void exec_output_file_multilayer(RenderData *rd, bNode *node, bNodeStack
for (sock=node->inputs.first, i=0; sock; sock=sock->next, ++i) {
if (in[i]->data) {
+ NodeImageMultiFileSocket *sockdata = sock->storage;
CompBuf *cbuf = in[i]->data;
char layname[EXR_LAY_MAXNAME];
char channelname[EXR_PASS_MAXNAME];
@@ -247,8 +249,8 @@ static void exec_output_file_multilayer(RenderData *rd, bNode *node, bNodeStack
continue;
}
- BLI_strncpy(layname, sock->name, sizeof(layname));
- BLI_strncpy(channelname, sock->name, sizeof(channelname)-2);
+ BLI_strncpy(layname, sockdata->path, sizeof(layname));
+ BLI_strncpy(channelname, sockdata->path, sizeof(channelname)-2);
channelname_ext = channelname + strlen(channelname);
/* create channels */
diff --git a/source/blender/nodes/composite/nodes/node_composite_rotate.c b/source/blender/nodes/composite/nodes/node_composite_rotate.c
index 6952817248d..8268977658d 100644
--- a/source/blender/nodes/composite/nodes/node_composite_rotate.c
+++ b/source/blender/nodes/composite/nodes/node_composite_rotate.c
@@ -87,7 +87,7 @@ static void node_composit_exec_rotate(void *UNUSED(data), bNode *node, bNodeStac
v=-s*x + c*y + centy;
xo= x+(int)centx;
- switch(node->custom1) {
+ switch (node->custom1) {
case 0:
neareast_interpolation(ibuf, obuf, u, v, xo, yo);
break;
diff --git a/source/blender/nodes/composite/nodes/node_composite_sepcombHSVA.c b/source/blender/nodes/composite/nodes/node_composite_sepcombHSVA.c
index 6dac2d16401..a30342ee28d 100644
--- a/source/blender/nodes/composite/nodes/node_composite_sepcombHSVA.c
+++ b/source/blender/nodes/composite/nodes/node_composite_sepcombHSVA.c
@@ -113,21 +113,21 @@ void register_node_type_cmp_sephsva(bNodeTreeType *ttype)
/* **************** COMBINE HSVA ******************** */
-static bNodeSocketTemplate cmp_node_combhsva_in[]= {
- { SOCK_FLOAT, 1, "H", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
- { SOCK_FLOAT, 1, "S", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
- { SOCK_FLOAT, 1, "V", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
- { SOCK_FLOAT, 1, "A", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
- { -1, 0, "" }
+static bNodeSocketTemplate cmp_node_combhsva_in[] = {
+ { SOCK_FLOAT, 1, "H", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
+ { SOCK_FLOAT, 1, "S", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
+ { SOCK_FLOAT, 1, "V", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
+ { SOCK_FLOAT, 1, "A", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
+ { -1, 0, "" }
};
static bNodeSocketTemplate cmp_node_combhsva_out[]= {
- { SOCK_RGBA, 0, "Image"},
- { -1, 0, "" }
+ { SOCK_RGBA, 0, "Image"},
+ { -1, 0, "" }
};
static void do_comb_hsva(bNode *UNUSED(node), float *out, float *in1, float *in2, float *in3, float *in4)
{
- float r,g,b;
+ float r, g, b;
hsv_to_rgb(in1[0], in2[0], in3[0], &r, &g, &b);
out[0] = r;
diff --git a/source/blender/nodes/composite/nodes/node_composite_sepcombYCCA.c b/source/blender/nodes/composite/nodes/node_composite_sepcombYCCA.c
index b12f08bb13d..7f3b8a31a4b 100644
--- a/source/blender/nodes/composite/nodes/node_composite_sepcombYCCA.c
+++ b/source/blender/nodes/composite/nodes/node_composite_sepcombYCCA.c
@@ -91,8 +91,7 @@ static void node_composit_exec_sepycca(void *UNUSED(data), bNode *node, bNodeSta
if (in[0]->data==NULL) {
float y, cb, cr;
- switch(node->custom1)
- {
+ switch (node->custom1) {
case 1:
rgb_to_ycc(in[0]->vec[0], in[0]->vec[1], in[0]->vec[2], &y, &cb, &cr, BLI_YCC_ITU_BT709);
break;
@@ -117,8 +116,7 @@ static void node_composit_exec_sepycca(void *UNUSED(data), bNode *node, bNodeSta
CompBuf *cbuf2=typecheck_compbuf(cbuf, CB_RGBA);
/* convert the RGB stackbuf to an HSV representation */
- switch(node->custom1)
- {
+ switch (node->custom1) {
case 1:
composit1_pixel_processor(node, cbuf2, cbuf2, in[0]->vec, do_sepycca_709, CB_RGBA);
break;
@@ -177,7 +175,7 @@ static bNodeSocketTemplate cmp_node_combycca_out[]= {
static void do_comb_ycca_601(bNode *UNUSED(node), float *out, float *in1, float *in2, float *in3, float *in4)
{
- float r,g,b;
+ float r, g, b;
float y, cb, cr;
/*need to un-normalize the data*/
@@ -185,7 +183,7 @@ static void do_comb_ycca_601(bNode *UNUSED(node), float *out, float *in1, float
cb=in2[0]*255;
cr=in3[0]*255;
- ycc_to_rgb(y,cb,cr, &r, &g, &b, BLI_YCC_ITU_BT601);
+ ycc_to_rgb(y, cb, cr, &r, &g, &b, BLI_YCC_ITU_BT601);
out[0] = r;
out[1] = g;
@@ -195,7 +193,7 @@ static void do_comb_ycca_601(bNode *UNUSED(node), float *out, float *in1, float
static void do_comb_ycca_709(bNode *UNUSED(node), float *out, float *in1, float *in2, float *in3, float *in4)
{
- float r,g,b;
+ float r, g, b;
float y, cb, cr;
/*need to un-normalize the data*/
@@ -203,7 +201,7 @@ static void do_comb_ycca_709(bNode *UNUSED(node), float *out, float *in1, float
cb=in2[0]*255;
cr=in3[0]*255;
- ycc_to_rgb(y,cb,cr, &r, &g, &b, BLI_YCC_ITU_BT709);
+ ycc_to_rgb(y, cb, cr, &r, &g, &b, BLI_YCC_ITU_BT709);
out[0] = r;
out[1] = g;
@@ -213,7 +211,7 @@ static void do_comb_ycca_709(bNode *UNUSED(node), float *out, float *in1, float
static void do_comb_ycca_jfif(bNode *UNUSED(node), float *out, float *in1, float *in2, float *in3, float *in4)
{
- float r,g,b;
+ float r, g, b;
float y, cb, cr;
/*need to un-normalize the data*/
@@ -221,7 +219,7 @@ static void do_comb_ycca_jfif(bNode *UNUSED(node), float *out, float *in1, float
cb=in2[0]*255;
cr=in3[0]*255;
- ycc_to_rgb(y,cb,cr, &r, &g, &b, BLI_YCC_JFIF_0_255);
+ ycc_to_rgb(y, cb, cr, &r, &g, &b, BLI_YCC_JFIF_0_255);
out[0] = r;
out[1] = g;
@@ -240,8 +238,7 @@ static void node_composit_exec_combycca(void *UNUSED(data), bNode *node, bNodeSt
float cb = in[1]->vec[0] * 255;
float cr = in[2]->vec[0] * 255;
- switch(node->custom1)
- {
+ switch (node->custom1) {
case 1:
ycc_to_rgb(y, cb, cr, &out[0]->vec[0], &out[0]->vec[1], &out[0]->vec[2], BLI_YCC_ITU_BT709);
break;
@@ -270,8 +267,7 @@ static void node_composit_exec_combycca(void *UNUSED(data), bNode *node, bNodeSt
stackbuf = alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* allocs */
- switch(node->custom1)
- {
+ switch (node->custom1) {
case 1:
composit4_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, in[1]->data, in[1]->vec,
in[2]->data, in[2]->vec, in[3]->data, in[3]->vec,
diff --git a/source/blender/nodes/composite/nodes/node_composite_sepcombYUVA.c b/source/blender/nodes/composite/nodes/node_composite_sepcombYUVA.c
index 8dd551643f5..57fcf3af046 100644
--- a/source/blender/nodes/composite/nodes/node_composite_sepcombYUVA.c
+++ b/source/blender/nodes/composite/nodes/node_composite_sepcombYUVA.c
@@ -128,7 +128,7 @@ static bNodeSocketTemplate cmp_node_combyuva_out[]= {
static void do_comb_yuva(bNode *UNUSED(node), float *out, float *in1, float *in2, float *in3, float *in4)
{
- float r,g,b;
+ float r, g, b;
yuv_to_rgb(in1[0], in2[0], in3[0], &r, &g, &b);
out[0] = r;
diff --git a/source/blender/nodes/composite/nodes/node_composite_splitViewer.c b/source/blender/nodes/composite/nodes/node_composite_splitViewer.c
index c2263053987..a12a1042553 100644
--- a/source/blender/nodes/composite/nodes/node_composite_splitViewer.c
+++ b/source/blender/nodes/composite/nodes/node_composite_splitViewer.c
@@ -69,7 +69,7 @@ static void node_composit_exec_splitviewer(void *data, bNode *node, bNodeStack *
buf1= typecheck_compbuf(in[0]->data, CB_RGBA);
buf2= typecheck_compbuf(in[1]->data, CB_RGBA);
- BKE_image_user_calc_frame(node->storage, rd->cfra, 0);
+ BKE_image_user_frame_calc(node->storage, rd->cfra, 0);
/* always returns for viewer image, but we check nevertheless */
ibuf= BKE_image_acquire_ibuf(ima, node->storage, &lock);
diff --git a/source/blender/nodes/composite/nodes/node_composite_stabilize2d.c b/source/blender/nodes/composite/nodes/node_composite_stabilize2d.c
index 0eac85c4030..e5d8fe16d51 100644
--- a/source/blender/nodes/composite/nodes/node_composite_stabilize2d.c
+++ b/source/blender/nodes/composite/nodes/node_composite_stabilize2d.c
@@ -48,20 +48,20 @@ static bNodeSocketTemplate cmp_node_stabilize2d_out[]= {
static void node_composit_exec_stabilize2d(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
{
if (in[0]->data && node->id) {
- RenderData *rd= data;
- MovieClip *clip= (MovieClip *)node->id;
- CompBuf *cbuf= typecheck_compbuf(in[0]->data, CB_RGBA);
+ RenderData *rd = data;
+ MovieClip *clip = (MovieClip *)node->id;
+ CompBuf *cbuf = typecheck_compbuf(in[0]->data, CB_RGBA);
CompBuf *stackbuf;
float loc[2], scale, angle;
BKE_tracking_stabilization_data(&clip->tracking, rd->cfra, cbuf->x, cbuf->y, loc, &scale, &angle);
- stackbuf= node_composit_transform(cbuf, loc[0], loc[1], angle, scale, node->custom1);
+ stackbuf = node_composit_transform(cbuf, loc[0], loc[1], angle, scale, node->custom1);
/* pass on output and free */
- out[0]->data= stackbuf;
+ out[0]->data = stackbuf;
- if (cbuf!=in[0]->data)
+ if (cbuf != in[0]->data)
free_compbuf(cbuf);
}
}
diff --git a/source/blender/nodes/composite/nodes/node_composite_texture.c b/source/blender/nodes/composite/nodes/node_composite_texture.c
index 562e2b2737e..5447c2af031 100644
--- a/source/blender/nodes/composite/nodes/node_composite_texture.c
+++ b/source/blender/nodes/composite/nodes/node_composite_texture.c
@@ -40,7 +40,7 @@ static bNodeSocketTemplate cmp_node_texture_in[]= {
};
static bNodeSocketTemplate cmp_node_texture_out[]= {
{ SOCK_FLOAT, 0, "Value"},
- { SOCK_RGBA , 0, "Color"},
+ { SOCK_RGBA, 0, "Color"},
{ -1, 0, "" }
};
@@ -73,11 +73,11 @@ static void texture_procedural(CompBuf *cbuf, float *out, float xco, float yco)
col[3]= texres.tin;
if ((retval & TEX_RGB)) {
- col[0]= texres.tr;
- col[1]= texres.tg;
- col[2]= texres.tb;
+ copy_v3_v3(col, &texres.tr);
+ }
+ else {
+ copy_v3_fl(col, col[3]);
}
- else col[0]= col[1]= col[2]= col[3];
}
else {
copy_v3_v3(col, nor);
diff --git a/source/blender/nodes/composite/nodes/node_composite_tonemap.c b/source/blender/nodes/composite/nodes/node_composite_tonemap.c
index 0696c2ba848..eae81a4bbd2 100644
--- a/source/blender/nodes/composite/nodes/node_composite_tonemap.c
+++ b/source/blender/nodes/composite/nodes/node_composite_tonemap.c
@@ -94,7 +94,7 @@ static void tonemap(NodeTonemap* ntm, CompBuf* dst, CompBuf* src)
I_l = sp[x][1] + ic*(L - sp[x][1]);
I_g = Cav[1] + ic*(Lav - Cav[1]);
I_a = I_l + ia*(I_g - I_l);
- dp[x][1] /= (dp[x][1] + pow((double)f*I_a,(double)m));
+ dp[x][1] /= (dp[x][1] + pow((double)f*I_a, (double)m));
I_l = sp[x][2] + ic*(L - sp[x][2]);
I_g = Cav[2] + ic*(Lav - Cav[2]);
I_a = I_l + ia*(I_g - I_l);
diff --git a/source/blender/nodes/composite/nodes/node_composite_transform.c b/source/blender/nodes/composite/nodes/node_composite_transform.c
index a610d8a66c4..2c2a352017a 100644
--- a/source/blender/nodes/composite/nodes/node_composite_transform.c
+++ b/source/blender/nodes/composite/nodes/node_composite_transform.c
@@ -4,7 +4,7 @@
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -34,7 +34,7 @@
/* **************** Transform ******************** */
-static bNodeSocketTemplate cmp_node_transform_in[]= {
+static bNodeSocketTemplate cmp_node_transform_in[] = {
{ SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
{ SOCK_FLOAT, 1, "X", 0.0f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f},
{ SOCK_FLOAT, 1, "Y", 0.0f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f},
@@ -43,17 +43,17 @@ static bNodeSocketTemplate cmp_node_transform_in[]= {
{ -1, 0, "" }
};
-static bNodeSocketTemplate cmp_node_transform_out[]= {
+static bNodeSocketTemplate cmp_node_transform_out[] = {
{ SOCK_RGBA, 0, "Image"},
{ -1, 0, "" }
};
CompBuf* node_composit_transform(CompBuf *cbuf, float x, float y, float angle, float scale, int filter_type)
{
- CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1);
+ CompBuf *stackbuf = alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, TRUE);
ImBuf *ibuf, *obuf;
float mat[4][4], lmat[4][4], rmat[4][4], smat[4][4], cmat[4][4], icmat[4][4];
- float svec[3]= {scale, scale, scale}, loc[2]= {x, y};
+ float svec[3] = {scale, scale, scale}, loc[2] = {x, y};
unit_m4(rmat);
unit_m4(lmat);
@@ -61,8 +61,8 @@ CompBuf* node_composit_transform(CompBuf *cbuf, float x, float y, float angle, f
unit_m4(cmat);
/* image center as rotation center */
- cmat[3][0]= (float)cbuf->x/2.0f;
- cmat[3][1]= (float)cbuf->y/2.0f;
+ cmat[3][0] = (float)cbuf->x/2.0f;
+ cmat[3][1] = (float)cbuf->y/2.0f;
invert_m4_m4(icmat, cmat);
size_to_mat4(smat, svec); /* scale matrix */
@@ -74,22 +74,22 @@ CompBuf* node_composit_transform(CompBuf *cbuf, float x, float y, float angle, f
invert_m4(mat);
- ibuf= IMB_allocImBuf(cbuf->x, cbuf->y, 32, 0);
- obuf= IMB_allocImBuf(stackbuf->x, stackbuf->y, 32, 0);
+ ibuf = IMB_allocImBuf(cbuf->x, cbuf->y, 32, 0);
+ obuf = IMB_allocImBuf(stackbuf->x, stackbuf->y, 32, 0);
if (ibuf && obuf) {
int i, j;
- ibuf->rect_float= cbuf->rect;
- obuf->rect_float= stackbuf->rect;
+ ibuf->rect_float = cbuf->rect;
+ obuf->rect_float = stackbuf->rect;
- for (j=0; j<cbuf->y; j++) {
- for (i=0; i<cbuf->x;i++) {
- float vec[3]= {i, j, 0};
+ for (j = 0; j < cbuf->y; j++) {
+ for (i = 0; i < cbuf->x; i++) {
+ float vec[3] = {i, j, 0};
mul_v3_m4v3(vec, mat, vec);
- switch(filter_type) {
+ switch (filter_type) {
case 0:
neareast_interpolation(ibuf, obuf, vec[0], vec[1], i, j);
break;
@@ -114,15 +114,15 @@ CompBuf* node_composit_transform(CompBuf *cbuf, float x, float y, float angle, f
static void node_composit_exec_transform(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out)
{
if (in[0]->data) {
- CompBuf *cbuf= typecheck_compbuf(in[0]->data, CB_RGBA);
+ CompBuf *cbuf = typecheck_compbuf(in[0]->data, CB_RGBA);
CompBuf *stackbuf;
- stackbuf= node_composit_transform(cbuf, in[1]->vec[0], in[2]->vec[0], in[3]->vec[0], in[4]->vec[0], node->custom1);
+ stackbuf = node_composit_transform(cbuf, in[1]->vec[0], in[2]->vec[0], in[3]->vec[0], in[4]->vec[0], node->custom1);
/* pass on output and free */
- out[0]->data= stackbuf;
+ out[0]->data = stackbuf;
- if (cbuf!=in[0]->data)
+ if (cbuf != in[0]->data)
free_compbuf(cbuf);
}
}
diff --git a/source/blender/nodes/composite/nodes/node_composite_viewer.c b/source/blender/nodes/composite/nodes/node_composite_viewer.c
index f9b1e55f29f..3fdedbb2e42 100644
--- a/source/blender/nodes/composite/nodes/node_composite_viewer.c
+++ b/source/blender/nodes/composite/nodes/node_composite_viewer.c
@@ -55,7 +55,7 @@ static void node_composit_exec_viewer(void *data, bNode *node, bNodeStack **in,
int rectx, recty;
void *lock;
- BKE_image_user_calc_frame(node->storage, rd->cfra, 0);
+ BKE_image_user_frame_calc(node->storage, rd->cfra, 0);
/* always returns for viewer image, but we check nevertheless */
ibuf= BKE_image_acquire_ibuf(ima, node->storage, &lock);
diff --git a/source/blender/nodes/intern/node_common.c b/source/blender/nodes/intern/node_common.c
index 362ed59a38e..49a3d6c07b4 100644
--- a/source/blender/nodes/intern/node_common.c
+++ b/source/blender/nodes/intern/node_common.c
@@ -130,7 +130,7 @@ bNode *node_group_make_from_selected(bNodeTree *ntree)
/* no groups in groups */
if (node->type==NODE_GROUP)
return NULL;
- DO_MINMAX2( (&node->locx), min, max);
+ DO_MINMAX2((&node->locx), min, max);
totnode++;
}
node->done= 0;
@@ -368,7 +368,7 @@ int node_group_ungroup(bNodeTree *ntree, bNode *gnode)
bAction *waction;
/* firstly, wgroup needs to temporary dummy action that can be destroyed, as it shares copies */
- waction = wgroup->adt->action = copy_action(wgroup->adt->action);
+ waction = wgroup->adt->action = BKE_action_copy(wgroup->adt->action);
/* now perform the moving */
BKE_animdata_separate_by_basepath(&wgroup->id, &ntree->id, &anim_basepaths);
@@ -383,7 +383,7 @@ int node_group_ungroup(bNodeTree *ntree, bNode *gnode)
/* free temp action too */
if (waction) {
- free_libblock(&G.main->action, waction);
+ BKE_libblock_free(&G.main->action, waction);
}
}
@@ -391,7 +391,7 @@ int node_group_ungroup(bNodeTree *ntree, bNode *gnode)
nodeFreeNode(ntree, gnode);
/* free the group tree (takes care of user count) */
- free_libblock(&G.main->nodetree, wgroup);
+ BKE_libblock_free(&G.main->nodetree, wgroup);
ntree->update |= NTREE_UPDATE_NODES | NTREE_UPDATE_LINKS;
ntreeUpdateTree(ntree);
@@ -551,7 +551,8 @@ static bNodeSocket *group_verify_socket(bNodeTree *ntree, ListBase *lb, int in_o
sock->groupsock = gsock;
BLI_strncpy(sock->name, gsock->name, sizeof(sock->name));
- sock->type= gsock->type;
+ if(gsock->type != sock->type)
+ nodeSocketSetType(sock, gsock->type);
/* XXX hack: group socket input/output roles are inverted internally,
* need to change the limit value when making actual node sockets from them.
diff --git a/source/blender/nodes/intern/node_socket.c b/source/blender/nodes/intern/node_socket.c
index 94b9d364418..b5400244efe 100644
--- a/source/blender/nodes/intern/node_socket.c
+++ b/source/blender/nodes/intern/node_socket.c
@@ -59,7 +59,7 @@ static bNodeSocketType node_socket_type_float = {
/* ui_name */ "Float",
/* ui_description */ "Floating Point",
/* ui_icon */ 0,
- /* ui_color */ {160,160,160,255},
+ /* ui_color */ {160, 160, 160, 255},
/* value_structname */ "bNodeSocketValueFloat",
/* value_structsize */ sizeof(bNodeSocketValueFloat),
@@ -74,7 +74,7 @@ static bNodeSocketType node_socket_type_vector = {
/* ui_name */ "Vector",
/* ui_description */ "3-dimensional floating point vector",
/* ui_icon */ 0,
- /* ui_color */ {100,100,200,255},
+ /* ui_color */ {100, 100, 200, 255},
/* value_structname */ "bNodeSocketValueVector",
/* value_structsize */ sizeof(bNodeSocketValueVector),
@@ -89,7 +89,7 @@ static bNodeSocketType node_socket_type_rgba = {
/* ui_name */ "RGBA",
/* ui_description */ "RGBA color",
/* ui_icon */ 0,
- /* ui_color */ {200,200,40,255},
+ /* ui_color */ {200, 200, 40, 255},
/* value_structname */ "bNodeSocketValueRGBA",
/* value_structsize */ sizeof(bNodeSocketValueRGBA),
@@ -104,7 +104,7 @@ static bNodeSocketType node_socket_type_int = {
/* ui_name */ "Int",
/* ui_description */ "Integer",
/* ui_icon */ 0,
- /* ui_color */ {17,133,37,255},
+ /* ui_color */ {17, 133, 37, 255},
/* value_structname */ "bNodeSocketValueInt",
/* value_structsize */ sizeof(bNodeSocketValueInt),
@@ -119,7 +119,7 @@ static bNodeSocketType node_socket_type_boolean = {
/* ui_name */ "Boolean",
/* ui_description */ "Boolean",
/* ui_icon */ 0,
- /* ui_color */ {158,139,63,255},
+ /* ui_color */ {158, 139, 63, 255},
/* value_structname */ "bNodeSocketValueBoolean",
/* value_structsize */ sizeof(bNodeSocketValueBoolean),
@@ -134,7 +134,7 @@ static bNodeSocketType node_socket_type_shader = {
/* ui_name */ "Shader",
/* ui_description */ "Shader",
/* ui_icon */ 0,
- /* ui_color */ {100,200,100,255},
+ /* ui_color */ {100, 200, 100, 255},
/* value_structname */ NULL,
/* value_structsize */ 0,
@@ -149,7 +149,7 @@ static bNodeSocketType node_socket_type_mesh = {
/* ui_name */ "Mesh",
/* ui_description */ "Mesh geometry data",
/* ui_icon */ 0,
- /* ui_color */ {255,133,7,255},
+ /* ui_color */ {255, 133, 7, 255},
/* value_structname */ NULL,
/* value_structsize */ 0,
diff --git a/source/blender/nodes/shader/node_shader_tree.c b/source/blender/nodes/shader/node_shader_tree.c
index c028ca83664..716d31a8cd1 100644
--- a/source/blender/nodes/shader/node_shader_tree.c
+++ b/source/blender/nodes/shader/node_shader_tree.c
@@ -83,7 +83,7 @@ static void foreach_nodeclass(Scene *scene, void *calldata, bNodeClassCallback f
func(calldata, NODE_CLASS_INPUT, IFACE_("Input"));
func(calldata, NODE_CLASS_OUTPUT, IFACE_("Output"));
- if (scene_use_new_shading_nodes(scene)) {
+ if (BKE_scene_use_new_shading_nodes(scene)) {
func(calldata, NODE_CLASS_SHADER, IFACE_("Shader"));
func(calldata, NODE_CLASS_TEXTURE, IFACE_("Texture"));
}
diff --git a/source/blender/nodes/shader/node_shader_util.c b/source/blender/nodes/shader/node_shader_util.c
index 90c62bc47ac..9a9a27603dc 100644
--- a/source/blender/nodes/shader/node_shader_util.c
+++ b/source/blender/nodes/shader/node_shader_util.c
@@ -101,7 +101,7 @@ void ntreeShaderGetTexcoMode(bNodeTree *ntree, int r_mode, short *texco, int *mo
/* note; sockets always exist for the given type! */
for (a=0, sock= node->outputs.first; sock; sock= sock->next, a++) {
if (sock->flag & SOCK_IN_USE) {
- switch(a) {
+ switch (a) {
case GEOM_OUT_GLOB:
*texco |= TEXCO_GLOB|NEED_UV; break;
case GEOM_OUT_VIEW:
@@ -137,7 +137,7 @@ void nodeShaderSynchronizeID(bNode *node, int copyto)
for (a=0, sock= node->inputs.first; sock; sock= sock->next, a++) {
if (!nodeSocketIsHidden(sock)) {
if (copyto) {
- switch(a) {
+ switch (a) {
case MAT_IN_COLOR:
copy_v3_v3(&ma->r, ((bNodeSocketValueRGBA*)sock->default_value)->value); break;
case MAT_IN_SPEC:
@@ -161,7 +161,7 @@ void nodeShaderSynchronizeID(bNode *node, int copyto)
}
}
else {
- switch(a) {
+ switch (a) {
case MAT_IN_COLOR:
copy_v3_v3(((bNodeSocketValueRGBA*)sock->default_value)->value, &ma->r); break;
case MAT_IN_SPEC:
diff --git a/source/blender/nodes/shader/nodes/node_shader_common.c b/source/blender/nodes/shader/nodes/node_shader_common.c
index f75cecfe83b..df369482a2e 100644
--- a/source/blender/nodes/shader/nodes/node_shader_common.c
+++ b/source/blender/nodes/shader/nodes/node_shader_common.c
@@ -73,6 +73,9 @@ static void *group_initexec(bNode *node)
bNodeTree *ngroup= (bNodeTree*)node->id;
bNodeTreeExec *exec;
+ if (!ngroup)
+ return NULL;
+
/* initialize the internal node tree execution */
exec = ntreeShaderBeginExecTree(ngroup, 0);
@@ -121,6 +124,9 @@ static void group_execute(void *data, int thread, struct bNode *node, void *node
bNodeTreeExec *exec= (bNodeTreeExec*)nodedata;
bNodeThreadStack *nts;
+ if (!exec)
+ return;
+
/* XXX same behavior as trunk: all nodes inside group are executed.
* it's stupid, but just makes it work. compo redesign will do this better.
*/
diff --git a/source/blender/nodes/shader/nodes/node_shader_dynamic.c b/source/blender/nodes/shader/nodes/node_shader_dynamic.c
index 5a6a92b5e27..b441545441a 100644
--- a/source/blender/nodes/shader/nodes/node_shader_dynamic.c
+++ b/source/blender/nodes/shader/nodes/node_shader_dynamic.c
@@ -254,7 +254,7 @@ static void node_dynamic_rem_all_links(bNodeType *tinfo)
/* node_dynamic_reset: clean a pynode, getting rid of all
* data dynamically created for it. */
-static void node_dynamic_reset(bNode *node, int unlink_text)
+static void node_dynamic_reset(bNode *node, int BKE_text_unlink)
{
bNodeType *tinfo, *tinfo_default;
Material *ma;
@@ -262,7 +262,7 @@ static void node_dynamic_reset(bNode *node, int unlink_text)
tinfo = node->typeinfo;
tinfo_default = node_dynamic_find_typeinfo(&node_all_shaders, NULL);
- if ((tinfo == tinfo_default) && unlink_text) {
+ if ((tinfo == tinfo_default) && BKE_text_unlink) {
ID *textID = node->id;
/* already at default (empty) state, which happens if this node's
* script failed to parse at the first stage: definition. We're here
@@ -296,7 +296,7 @@ static void node_dynamic_reset(bNode *node, int unlink_text)
node_dynamic_free_sockets(nd);
//node_dynamic_update_socket_links(nd, ma->nodetree);
nd->typeinfo = tinfo_default;
- if (unlink_text) {
+ if (BKE_text_unlink) {
nd->id = NULL;
nd->custom1 = 0;
nd->custom1 = BSET(nd->custom1, NODE_DYNAMIC_NEW);
diff --git a/source/blender/nodes/shader/nodes/node_shader_light_falloff.c b/source/blender/nodes/shader/nodes/node_shader_light_falloff.c
new file mode 100644
index 00000000000..8ee0f0adef6
--- /dev/null
+++ b/source/blender/nodes/shader/nodes/node_shader_light_falloff.c
@@ -0,0 +1,68 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2005 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include "../node_shader_util.h"
+
+/* **************** INPUT ********************* */
+
+static bNodeSocketTemplate sh_node_light_falloff_in[]= {
+ { SOCK_FLOAT, 0, "Strength", 100.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_FLOAT, 0, "Smooth", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { -1, 0, "" }
+};
+
+/* **************** OUTPUT ******************** */
+
+static bNodeSocketTemplate sh_node_light_falloff_out[]= {
+ { SOCK_FLOAT, 0, "Quadratic", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_FLOAT, 0, "Linear", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_FLOAT, 0, "Constant", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { -1, 0, "" }
+};
+
+static int node_shader_gpu_light_falloff(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack *in, GPUNodeStack *out)
+{
+ return GPU_stack_link(mat, "node_light_falloff", in, out);
+}
+
+/* node type definition */
+void register_node_type_sh_light_falloff(bNodeTreeType *ttype)
+{
+ static bNodeType ntype;
+
+ node_type_base(ttype, &ntype, SH_NODE_LIGHT_FALLOFF, "Light Falloff", NODE_CLASS_OP_COLOR, 0);
+ node_type_compatibility(&ntype, NODE_NEW_SHADING);
+ node_type_socket_templates(&ntype, sh_node_light_falloff_in, sh_node_light_falloff_out);
+ node_type_size(&ntype, 150, 60, 200);
+ node_type_init(&ntype, NULL);
+ node_type_storage(&ntype, "", NULL, NULL);
+ node_type_exec(&ntype, NULL);
+ node_type_gpu(&ntype, node_shader_gpu_light_falloff);
+
+ nodeRegisterType(ttype, &ntype);
+}
+
diff --git a/source/blender/nodes/shader/nodes/node_shader_light_path.c b/source/blender/nodes/shader/nodes/node_shader_light_path.c
index 5d7a3014682..5ebbd63a5a1 100644
--- a/source/blender/nodes/shader/nodes/node_shader_light_path.c
+++ b/source/blender/nodes/shader/nodes/node_shader_light_path.c
@@ -37,6 +37,7 @@ static bNodeSocketTemplate sh_node_light_path_out[]= {
{ SOCK_FLOAT, 0, "Is Singular Ray", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ SOCK_FLOAT, 0, "Is Reflection Ray", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ SOCK_FLOAT, 0, "Is Transmission Ray", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_FLOAT, 0, "Ray Length", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
diff --git a/source/blender/nodes/shader/nodes/node_shader_math.c b/source/blender/nodes/shader/nodes/node_shader_math.c
index 44df496f5d6..db2b57ab51b 100644
--- a/source/blender/nodes/shader/nodes/node_shader_math.c
+++ b/source/blender/nodes/shader/nodes/node_shader_math.c
@@ -48,7 +48,7 @@ static bNodeSocketTemplate sh_node_math_out[]= {
static void node_shader_exec_math(void *UNUSED(data), bNode *node, bNodeStack **in,
bNodeStack **out)
{
- switch(node->custom1) {
+ switch (node->custom1) {
case 0: /* Add */
out[0]->vec[0]= in[0]->vec[0] + in[1]->vec[0];
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_coord.c b/source/blender/nodes/shader/nodes/node_shader_tex_coord.c
index 8f67fb585c9..aa8b7070cab 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_coord.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_coord.c
@@ -33,6 +33,7 @@
static bNodeSocketTemplate sh_node_tex_coord_out[]= {
{ SOCK_VECTOR, 0, "Generated", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_VECTOR, 0, "Normal", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ SOCK_VECTOR, 0, "UV", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ SOCK_VECTOR, 0, "Object", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ SOCK_VECTOR, 0, "Camera", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
@@ -48,7 +49,7 @@ static int node_shader_gpu_tex_coord(GPUMaterial *mat, bNode *UNUSED(node), GPUN
return GPU_stack_link(mat, "node_tex_coord", in, out,
GPU_builtin(GPU_VIEW_POSITION), GPU_builtin(GPU_VIEW_NORMAL),
- GPU_builtin(GPU_INVERSE_VIEW_MATRIX), orco, mtface);
+ GPU_builtin(GPU_INVERSE_VIEW_MATRIX), GPU_builtin(GPU_INVERSE_OBJECT_MATRIX), orco, mtface);
}
/* node type definition */
diff --git a/source/blender/nodes/shader/nodes/node_shader_texture.c b/source/blender/nodes/shader/nodes/node_shader_texture.c
index 8b6386fe2f6..b5c7981b4b1 100644
--- a/source/blender/nodes/shader/nodes/node_shader_texture.c
+++ b/source/blender/nodes/shader/nodes/node_shader_texture.c
@@ -41,7 +41,7 @@ static bNodeSocketTemplate sh_node_texture_in[]= {
};
static bNodeSocketTemplate sh_node_texture_out[]= {
{ SOCK_FLOAT, 0, "Value"},
- { SOCK_RGBA , 0, "Color"},
+ { SOCK_RGBA, 0, "Color"},
{ SOCK_VECTOR, 0, "Normal"},
{ -1, 0, "" }
};
@@ -100,17 +100,13 @@ static void node_shader_exec_texture(void *data, bNode *node, bNodeStack **in, b
else
out[0]->vec[0]= texres.tin;
- if ((retval & TEX_RGB)==0) {
- out[1]->vec[0]= out[0]->vec[0];
- out[1]->vec[1]= out[0]->vec[0];
- out[1]->vec[2]= out[0]->vec[0];
- out[1]->vec[3]= 1.0f;
+ if ((retval & TEX_RGB) == 0) {
+ copy_v3_fl(out[1]->vec, out[0]->vec[0]);
+ out[1]->vec[3] = 1.0f;
}
else {
- out[1]->vec[0]= texres.tr;
- out[1]->vec[1]= texres.tg;
- out[1]->vec[2]= texres.tb;
- out[1]->vec[3]= 1.0f;
+ copy_v3_v3(out[1]->vec, &texres.tr);
+ out[1]->vec[3] = 1.0f;
}
copy_v3_v3(out[2]->vec, nor);
diff --git a/source/blender/nodes/shader/nodes/node_shader_valToRgb.c b/source/blender/nodes/shader/nodes/node_shader_valToRgb.c
index 7e513135203..0e58fed4357 100644
--- a/source/blender/nodes/shader/nodes/node_shader_valToRgb.c
+++ b/source/blender/nodes/shader/nodes/node_shader_valToRgb.c
@@ -90,12 +90,12 @@ void register_node_type_sh_valtorgb(bNodeTreeType *ttype)
/* **************** RGBTOBW ******************** */
static bNodeSocketTemplate sh_node_rgbtobw_in[]= {
- { SOCK_RGBA, 1, "Color", 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 1.0f},
- { -1, 0, "" }
+ { SOCK_RGBA, 1, "Color", 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 1.0f},
+ { -1, 0, "" }
};
static bNodeSocketTemplate sh_node_rgbtobw_out[]= {
- { SOCK_FLOAT, 0, "Val", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { -1, 0, "" }
+ { SOCK_FLOAT, 0, "Val", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+ { -1, 0, "" }
};
diff --git a/source/blender/nodes/shader/nodes/node_shader_vectMath.c b/source/blender/nodes/shader/nodes/node_shader_vectMath.c
index a0fe67d591d..73b0582490d 100644
--- a/source/blender/nodes/shader/nodes/node_shader_vectMath.c
+++ b/source/blender/nodes/shader/nodes/node_shader_vectMath.c
@@ -73,7 +73,7 @@ static void node_shader_exec_vect_math(void *UNUSED(data), bNode *node, bNodeSta
out[0]->vec[1]= vec1[1] + vec2[1];
out[0]->vec[2]= vec1[2] + vec2[2];
- out[1]->vec[0] = normalize_v3( out[0]->vec );
+ out[1]->vec[0] = normalize_v3(out[0]->vec );
}
else if (node->custom1 == 3) { /* Dot product */
out[1]->vec[0]= (vec1[0] * vec2[0]) + (vec1[1] * vec2[1]) + (vec1[2] * vec2[2]);
@@ -83,7 +83,7 @@ static void node_shader_exec_vect_math(void *UNUSED(data), bNode *node, bNodeSta
out[0]->vec[1]= (vec1[2] * vec2[0]) - (vec1[0] * vec2[2]);
out[0]->vec[2]= (vec1[0] * vec2[1]) - (vec1[1] * vec2[0]);
- out[1]->vec[0] = normalize_v3( out[0]->vec );
+ out[1]->vec[0] = normalize_v3(out[0]->vec );
}
else if (node->custom1 == 5) { /* Normalize */
if (in[0]->hasinput || !in[1]->hasinput) { /* This one only takes one input, so we've got to choose. */
@@ -97,7 +97,7 @@ static void node_shader_exec_vect_math(void *UNUSED(data), bNode *node, bNodeSta
out[0]->vec[2]= vec2[2];
}
- out[1]->vec[0] = normalize_v3( out[0]->vec );
+ out[1]->vec[0] = normalize_v3(out[0]->vec );
}
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_bricks.c b/source/blender/nodes/texture/nodes/node_texture_bricks.c
index ac8799762bd..fbf04715020 100644
--- a/source/blender/nodes/texture/nodes/node_texture_bricks.c
+++ b/source/blender/nodes/texture/nodes/node_texture_bricks.c
@@ -102,16 +102,17 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
ins_y = y - row_height*rownum;
tint = noise((rownum << 16) + (bricknum & 0xFFFF)) + bias;
- CLAMP(tint,0.0f,1.0f);
+ CLAMP(tint, 0.0f, 1.0f);
- if ( ins_x < mortar_thickness || ins_y < mortar_thickness ||
- ins_x > (brick_width - mortar_thickness) ||
- ins_y > (row_height - mortar_thickness) ) {
- copy_v4_v4( out, mortar );
+ if (ins_x < mortar_thickness || ins_y < mortar_thickness ||
+ ins_x > (brick_width - mortar_thickness) ||
+ ins_y > (row_height - mortar_thickness))
+ {
+ copy_v4_v4(out, mortar);
}
else {
- copy_v4_v4( out, bricks1 );
- ramp_blend( MA_RAMP_BLEND, out, tint, bricks2 );
+ copy_v4_v4(out, bricks1);
+ ramp_blend(MA_RAMP_BLEND, out, tint, bricks2);
}
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_common.c b/source/blender/nodes/texture/nodes/node_texture_common.c
index 9a66ecb5ffb..1eaf9b2b0fe 100644
--- a/source/blender/nodes/texture/nodes/node_texture_common.c
+++ b/source/blender/nodes/texture/nodes/node_texture_common.c
@@ -58,6 +58,9 @@ static void *group_initexec(bNode *node)
bNodeTree *ngroup= (bNodeTree*)node->id;
void *exec;
+ if (!ngroup)
+ return NULL;
+
/* initialize the internal node tree execution */
exec = ntreeTexBeginExecTree(ngroup, 0);
@@ -107,6 +110,9 @@ static void group_execute(void *data, int thread, struct bNode *node, void *node
bNodeTreeExec *exec= (bNodeTreeExec*)nodedata;
bNodeThreadStack *nts;
+ if (!exec)
+ return;
+
/* XXX same behavior as trunk: all nodes inside group are executed.
* it's stupid, but just makes it work. compo redesign will do this better.
*/
diff --git a/source/blender/nodes/texture/nodes/node_texture_image.c b/source/blender/nodes/texture/nodes/node_texture_image.c
index d0bc30089e2..38d6db1fd08 100644
--- a/source/blender/nodes/texture/nodes/node_texture_image.c
+++ b/source/blender/nodes/texture/nodes/node_texture_image.c
@@ -76,7 +76,7 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **UNUSED(i
while ( py >= ibuf->y ) py -= ibuf->y;
result = ibuf->rect_float + py*ibuf->x*4 + px*4;
- copy_v4_v4( out, result );
+ copy_v4_v4(out, result);
}
}
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_math.c b/source/blender/nodes/texture/nodes/node_texture_math.c
index 29d154df884..54c9645fac3 100644
--- a/source/blender/nodes/texture/nodes/node_texture_math.c
+++ b/source/blender/nodes/texture/nodes/node_texture_math.c
@@ -51,7 +51,7 @@ static void valuefn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
float in0 = tex_input_value(in[0], p, thread);
float in1 = tex_input_value(in[1], p, thread);
- switch(node->custom1) {
+ switch (node->custom1) {
case 0: /* Add */
*out= in0 + in1;
diff --git a/source/blender/nodes/texture/nodes/node_texture_mixRgb.c b/source/blender/nodes/texture/nodes/node_texture_mixRgb.c
index 41115076ec1..c170d03a495 100644
--- a/source/blender/nodes/texture/nodes/node_texture_mixRgb.c
+++ b/source/blender/nodes/texture/nodes/node_texture_mixRgb.c
@@ -37,7 +37,7 @@
static bNodeSocketTemplate inputs[]= {
{ SOCK_FLOAT, 1, "Factor", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR },
{ SOCK_RGBA, 1, "Color1", 0.5f, 0.5f, 0.5f, 1.0f },
- { SOCK_RGBA , 1, "Color2", 0.5f, 0.5f, 0.5f, 1.0f },
+ { SOCK_RGBA, 1, "Color2", 0.5f, 0.5f, 0.5f, 1.0f },
{ -1, 0, "" }
};
static bNodeSocketTemplate outputs[]= {
diff --git a/source/blender/nodes/texture/nodes/node_texture_output.c b/source/blender/nodes/texture/nodes/node_texture_output.c
index 2b899fde593..19ba0e88639 100644
--- a/source/blender/nodes/texture/nodes/node_texture_output.c
+++ b/source/blender/nodes/texture/nodes/node_texture_output.c
@@ -88,14 +88,14 @@ static void unique_name(bNode *node)
i = node;
while (i->prev) i = i->prev;
- for (; i; i=i->next) {
- if (
- i == node ||
- i->type != TEX_NODE_OUTPUT ||
- strcmp(name, ((TexNodeOutput*)(i->storage))->name)
- )
+ for ( ; i; i = i->next) {
+ if (i == node ||
+ i->type != TEX_NODE_OUTPUT ||
+ strcmp(name, ((TexNodeOutput*)(i->storage))->name))
+ {
continue;
-
+ }
+
if (!new_name) {
int len = strlen(name);
if (len >= 4 && sscanf(name + len - 4, ".%03d", &suffix) == 1) {
diff --git a/source/blender/nodes/texture/nodes/node_texture_texture.c b/source/blender/nodes/texture/nodes/node_texture_texture.c
index bf93231c306..ecf47a900f9 100644
--- a/source/blender/nodes/texture/nodes/node_texture_texture.c
+++ b/source/blender/nodes/texture/nodes/node_texture_texture.c
@@ -49,8 +49,8 @@ static bNodeSocketTemplate outputs[]= {
static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, short thread)
{
Tex *nodetex = (Tex *)node->id;
- static float red[] = {1,0,0,1};
- static float white[] = {1,1,1,1};
+ static float red[] = {1, 0, 0, 1};
+ static float white[] = {1, 1, 1, 1};
float co[3], dxt[3], dyt[3];
copy_v3_v3(co, p->co);
@@ -65,12 +65,12 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
if (node->custom2 || node->need_exec==0) {
/* this node refers to its own texture tree! */
- copy_v4_v4(out, (fabs(co[0] - co[1]) < .01) ? white : red );
+ copy_v4_v4(out, (fabs(co[0] - co[1]) < .01) ? white : red);
}
else if (nodetex) {
TexResult texres;
int textype;
- float nor[] = {0,0,0};
+ float nor[] = {0, 0, 0};
float col1[4], col2[4];
tex_input_rgba(col1, in[0], p, thread);
diff --git a/source/blender/python/BPY_extern.h b/source/blender/python/BPY_extern.h
index 33ea139b474..83a40ecc068 100644
--- a/source/blender/python/BPY_extern.h
+++ b/source/blender/python/BPY_extern.h
@@ -82,6 +82,7 @@ int BPY_string_exec(struct bContext *C, const char *expr);
void BPY_DECREF(void *pyob_ptr); /* Py_DECREF() */
int BPY_context_member_get(struct bContext *C, const char *member, struct bContextDataResult *result);
void BPY_context_set(struct bContext *C);
+void BPY_context_update(struct bContext *C);
void BPY_id_release(struct ID *id);
diff --git a/source/blender/python/SConscript b/source/blender/python/SConscript
index a79138f9eb5..012bc279cfb 100644
--- a/source/blender/python/SConscript
+++ b/source/blender/python/SConscript
@@ -18,7 +18,7 @@ sources = env.Glob('bmesh/*.c')
env.BlenderLib( libname = 'bf_python_bmesh', sources = Split(sources), includes = Split(incs), defines = defs, libtype = ['core','player'], priority = [362,165])
# generic
-defs = []
+defs = ['GLEW_STATIC']
if is_debug:
defs.append('_DEBUG')
diff --git a/source/blender/python/bmesh/bmesh_py_types.h b/source/blender/python/bmesh/bmesh_py_types.h
index a69091cb7ec..85bbd5d7b09 100644
--- a/source/blender/python/bmesh/bmesh_py_types.h
+++ b/source/blender/python/bmesh/bmesh_py_types.h
@@ -138,8 +138,8 @@ void BPy_BM_init_types(void);
PyObject *BPyInit_bmesh_types(void);
enum {
- BPY_BMFLAG_NOP = 0, /* do nothing */
- BPY_BMFLAG_IS_WRAPPED = 1 /* the mesh is owned by editmode */
+ BPY_BMFLAG_NOP = 0, /* do nothing */
+ BPY_BMFLAG_IS_WRAPPED = 1 /* the mesh is owned by editmode */
};
PyObject *BPy_BMesh_CreatePyObject(BMesh *bm, int flag);
diff --git a/source/blender/python/bmesh/bmesh_py_types_customdata.c b/source/blender/python/bmesh/bmesh_py_types_customdata.c
index 91104fb23f5..f25222c89da 100644
--- a/source/blender/python/bmesh/bmesh_py_types_customdata.c
+++ b/source/blender/python/bmesh/bmesh_py_types_customdata.c
@@ -63,7 +63,15 @@ static CustomData *bpy_bm_customdata_get(BMesh *bm, char htype)
static CustomDataLayer *bpy_bmlayeritem_get(BPy_BMLayerItem *self)
{
CustomData *data = bpy_bm_customdata_get(self->bm, self->htype);
- return &data->layers[CustomData_get_layer_index_n(data, self->type, self->index)];
+ const int index_absolute = CustomData_get_layer_index_n(data, self->type, self->index);
+ if (index_absolute != -1) {
+ return &data->layers[index_absolute];
+ }
+ else {
+ PyErr_SetString(PyExc_RuntimeError,
+ "layer has become invalid");
+ return NULL;
+ }
}
/* py-type definitions
@@ -116,7 +124,7 @@ static PyObject *bpy_bmlayeraccess_collection_get(BPy_BMLayerAccess *self, void
PyDoc_STRVAR(bpy_bmlayercollection_active_doc,
-"This meshes vert sequence (read-only).\n\n:type: :class:`BMVertSeq`"
+"The active layer of this type (read-only).\n\n:type: :class:`BMLayerItem`"
);
static PyObject *bpy_bmlayercollection_active_get(BPy_BMLayerItem *self, void *UNUSED(flag))
{
@@ -126,9 +134,10 @@ static PyObject *bpy_bmlayercollection_active_get(BPy_BMLayerItem *self, void *U
BPY_BM_CHECK_OBJ(self);
data = bpy_bm_customdata_get(self->bm, self->htype);
- index = CustomData_get_active_layer_index(data, self->type);
+ index = CustomData_get_active_layer_index(data, self->type); /* absolute */
if (index != -1) {
+ index -= CustomData_get_layer_index(data, self->type); /* make relative */
return BPy_BMLayerItem_CreatePyObject(self->bm, self->htype, self->type, index);
}
else {
@@ -136,6 +145,17 @@ static PyObject *bpy_bmlayercollection_active_get(BPy_BMLayerItem *self, void *U
}
}
+
+PyDoc_STRVAR(bpy_bmlayercollection_is_singleton_doc,
+"This meshes vert sequence (read-only).\n\n:type: :class:`BMVertSeq`"
+);
+static PyObject *bpy_bmlayercollection_is_singleton_get(BPy_BMLayerItem *self, void *UNUSED(flag))
+{
+ BPY_BM_CHECK_OBJ(self);
+
+ return PyBool_FromLong(CustomData_layertype_is_singleton(self->type));
+}
+
PyDoc_STRVAR(bpy_bmlayercollection_name_doc,
"The layers unique name (read-only).\n\n:type: string"
);
@@ -146,7 +166,12 @@ static PyObject *bpy_bmlayeritem_name_get(BPy_BMLayerItem *self, void *UNUSED(fl
BPY_BM_CHECK_OBJ(self);
layer = bpy_bmlayeritem_get(self);
- return PyUnicode_FromString(layer->name);
+ if (layer) {
+ return PyUnicode_FromString(layer->name);
+ }
+ else {
+ return NULL;
+ }
}
static PyGetSetDef bpy_bmlayeraccess_vert_getseters[] = {
@@ -197,7 +222,8 @@ static PyGetSetDef bpy_bmlayeraccess_loop_getseters[] = {
static PyGetSetDef bpy_bmlayercollection_getseters[] = {
/* BMESH_TODO, make writeable */
- {(char *)"active", (getter)bpy_bmlayercollection_active_get, (setter)NULL, (char *)bpy_bmlayercollection_active_doc, NULL},
+ {(char *)"active", (getter)bpy_bmlayercollection_active_get, (setter)NULL, (char *)bpy_bmlayercollection_active_doc, NULL},
+ {(char *)"is_singleton", (getter)bpy_bmlayercollection_is_singleton_get, (setter)NULL, (char *)bpy_bmlayercollection_is_singleton_doc, NULL},
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
};
@@ -216,6 +242,87 @@ static PyGetSetDef bpy_bmlayeritem_getseters[] = {
/* BMLayerCollection
* ----------------- */
+PyDoc_STRVAR(bpy_bmlayeritem_copy_from_doc,
+".. method:: copy_from(other)\n"
+"\n"
+" Return a copy of the layer\n"
+"\n"
+" :arg other: Another layer to copy from.\n"
+" :arg other: :class:`BMLayerItem`\n"
+);
+static PyObject *bpy_bmlayeritem_copy_from(BPy_BMLayerItem *self, BPy_BMLayerItem *value)
+{
+ CustomData *data;
+
+ if (!BPy_BMLayerItem_Check(value)) {
+ PyErr_Format(PyExc_TypeError,
+ "layer.copy_from(x): expected BMLayerItem, not '%.200s'",
+ Py_TYPE(value)->tp_name);
+ return NULL;
+ }
+
+ BPY_BM_CHECK_OBJ(self);
+ BPY_BM_CHECK_OBJ(value);
+
+ if (self->bm != value->bm) {
+ PyErr_SetString(PyExc_ValueError,
+ "layer.copy_from(): layer is from another mesh");
+ return NULL;
+ }
+
+ else if ((self->htype != value->htype) ||
+ (self->type != value->type) ||
+ (self->index != value->index))
+ {
+ PyErr_SetString(PyExc_ValueError,
+ "layer.copy_from(other): layer type mismatch");
+ }
+
+ data = bpy_bm_customdata_get(self->bm, self->htype);
+
+ if ((bpy_bmlayeritem_get(self) == NULL) ||
+ (bpy_bmlayeritem_get(value) == NULL))
+ {
+ return NULL;
+ }
+
+ BM_data_layer_copy(self->bm, data, self->type, value->index, self->index);
+
+ Py_RETURN_NONE;
+}
+
+/* similar to new(), but no name arg. */
+PyDoc_STRVAR(bpy_bmlayercollection_verify_doc,
+".. method:: verify()\n"
+"\n"
+" Create a new layer or return an existing active layer\n"
+"\n"
+" :return: The newly verified layer.\n"
+" :rtype: :class:`BMLayerItem`\n"
+);
+static PyObject *bpy_bmlayercollection_verify(BPy_BMLayerCollection *self)
+{
+ int index;
+ CustomData *data;
+
+ BPY_BM_CHECK_OBJ(self);
+
+ data = bpy_bm_customdata_get(self->bm, self->htype);
+
+ index = CustomData_get_layer_index(data, self->type);
+
+ if (index == -1) {
+ BM_data_layer_add(self->bm, data, self->type);
+ index = 0;
+ }
+ else {
+ index = CustomData_get_active_layer_index(data, self->type) - index; /* make relative */
+ }
+
+ BLI_assert(index >= 0);
+
+ return BPy_BMLayerItem_CreatePyObject(self->bm, self->htype, self->type, index);
+}
PyDoc_STRVAR(bpy_bmlayercollection_new_doc,
".. method:: new(name)\n"
@@ -241,6 +348,14 @@ static PyObject *bpy_bmlayercollection_new(BPy_BMLayerCollection *self, PyObject
data = bpy_bm_customdata_get(self->bm, self->htype);
+ if (CustomData_layertype_is_singleton(self->type) &&
+ CustomData_has_layer(data, self->type))
+ {
+ PyErr_SetString(PyExc_ValueError,
+ "layers.new(): is a singleton, use verify() instead");
+ return NULL;
+ }
+
if (name) {
BM_data_layer_add_named(self->bm, data, self->type, name);
}
@@ -311,7 +426,7 @@ static PyObject *bpy_bmlayercollection_keys(BPy_BMLayerCollection *self)
BPY_BM_CHECK_OBJ(self);
data = bpy_bm_customdata_get(self->bm, self->htype);
- index = CustomData_get_layer_index(data, self->type);
+ index = CustomData_get_layer_index(data, self->type); /* absolute, but no need to make relative */
ret = PyList_New(0);
@@ -426,9 +541,10 @@ static PyObject *bpy_bmlayercollection_get(BPy_BMLayerCollection *self, PyObject
int index;
data = bpy_bm_customdata_get(self->bm, self->htype);
- index = CustomData_get_named_layer_index(data, self->type, key);
+ index = CustomData_get_named_layer_index(data, self->type, key); /* absolute index */
if (index != -1) {
+ index -= CustomData_get_layer_index(data, self->type); /* make relative */
return BPy_BMLayerItem_CreatePyObject(self->bm, self->htype, self->type, index);
}
}
@@ -436,7 +552,13 @@ static PyObject *bpy_bmlayercollection_get(BPy_BMLayerCollection *self, PyObject
return Py_INCREF(def), def;
}
+static struct PyMethodDef bpy_bmlayeritem_methods[] = {
+ {"copy_from", (PyCFunction)bpy_bmlayeritem_copy_from, METH_O, bpy_bmlayeritem_copy_from_doc},
+ {NULL, NULL, 0, NULL}
+};
+
static struct PyMethodDef bpy_bmelemseq_methods[] = {
+ {"verify", (PyCFunction)bpy_bmlayercollection_verify, METH_NOARGS, bpy_bmlayercollection_verify_doc},
{"new", (PyCFunction)bpy_bmlayercollection_new, METH_VARARGS, bpy_bmlayercollection_new_doc},
{"remove", (PyCFunction)bpy_bmlayercollection_remove, METH_O, bpy_bmlayercollection_remove_doc},
@@ -447,8 +569,6 @@ static struct PyMethodDef bpy_bmelemseq_methods[] = {
{NULL, NULL, 0, NULL}
};
-
-
/* Sequences
* ========= */
@@ -471,9 +591,10 @@ static PyObject *bpy_bmlayercollection_subscript_str(BPy_BMLayerCollection *self
BPY_BM_CHECK_OBJ(self);
data = bpy_bm_customdata_get(self->bm, self->htype);
- index = CustomData_get_named_layer_index(data, self->type, keyname);
+ index = CustomData_get_named_layer_index(data, self->type, keyname); /* absolute */
if (index != -1) {
+ index -= CustomData_get_layer_index(data, self->type); /* make relative */
return BPy_BMLayerItem_CreatePyObject(self->bm, self->htype, self->type, index);
}
else {
@@ -747,6 +868,7 @@ void BPy_BM_init_types_customdata(void)
// BPy_BMLayerAccess_Type.tp_methods = bpy_bmeditselseq_methods;
BPy_BMLayerCollection_Type.tp_methods = bpy_bmelemseq_methods;
+ BPy_BMLayerItem_Type.tp_methods = bpy_bmlayeritem_methods;
BPy_BMLayerCollection_Type.tp_as_sequence = &bpy_bmlayercollection_as_sequence;
@@ -867,8 +989,7 @@ PyObject *BPy_BMLayerItem_GetItem(BPy_BMElem *py_ele, BPy_BMLayerItem *py_layer)
}
case CD_MTEXPOLY:
{
- ret = Py_NotImplemented; /* TODO */
- Py_INCREF(ret);
+ ret = BPy_BMTexPoly_CreatePyObject(value);
break;
}
case CD_MLOOPUV:
@@ -961,8 +1082,7 @@ int BPy_BMLayerItem_SetItem(BPy_BMElem *py_ele, BPy_BMLayerItem *py_layer, PyObj
}
case CD_MTEXPOLY:
{
- PyErr_SetString(PyExc_AttributeError, "readonly"); /* could make this writeable later */
- ret = -1;
+ ret = BPy_BMTexPoly_AssignPyObject(value, py_value);
break;
}
case CD_MLOOPUV:
diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.c b/source/blender/python/bmesh/bmesh_py_types_meshdata.c
index 9972ff288b2..aa78dc64f6b 100644
--- a/source/blender/python/bmesh/bmesh_py_types_meshdata.c
+++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.c
@@ -34,15 +34,107 @@
#include "../mathutils/mathutils.h"
+#include "DNA_object_types.h"
#include "DNA_meshdata_types.h"
#include "BLI_utildefines.h"
#include "BLI_math_vector.h"
#include "BKE_deform.h"
+#include "BKE_library.h"
#include "bmesh_py_types_meshdata.h"
+
+/* Mesh BMTexPoly
+ * ************** */
+
+#define BPy_BMTexPoly_Check(v) (Py_TYPE(v) == &BPy_BMTexPoly_Type)
+
+typedef struct BPy_BMTexPoly {
+ PyObject_VAR_HEAD
+ MTexPoly *data;
+} BPy_BMTexPoly;
+
+extern PyObject *pyrna_id_CreatePyObject(ID *id);
+extern int pyrna_id_FromPyObject(PyObject *obj, ID **id);
+
+PyDoc_STRVAR(bpy_bmtexpoly_image_doc,
+"Image or None.\n\n:type: :class:`bpy.types.Image`"
+);
+static PyObject *bpy_bmtexpoly_image_get(BPy_BMTexPoly *self, void *UNUSED(closure))
+{
+ return pyrna_id_CreatePyObject((ID *)self->data->tpage);
+}
+
+static int bpy_bmtexpoly_image_set(BPy_BMTexPoly *self, PyObject *value, void *UNUSED(closure))
+{
+ ID *id;
+
+ if (value == Py_None) {
+ id = NULL;
+ }
+ else if (pyrna_id_FromPyObject(value, &id) && id && GS(id->name) == ID_IM) {
+ /* pass */
+ }
+ else {
+ PyErr_Format(PyExc_KeyError, "BMTexPoly.image = x"
+ "expected an image or None, not '%.200s'",
+ Py_TYPE(value)->tp_name);
+ return -1;
+ }
+
+ id_lib_extern(id);
+ self->data->tpage = (struct Image *)id;
+
+ return 0;
+}
+
+static PyGetSetDef bpy_bmtexpoly_getseters[] = {
+ /* attributes match rna_def_mtpoly */
+ {(char *)"image", (getter)bpy_bmtexpoly_image_get, (setter)bpy_bmtexpoly_image_set, (char *)bpy_bmtexpoly_image_doc, NULL},
+
+ {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+};
+
+PyTypeObject BPy_BMTexPoly_Type = {{{0}}}; /* bm.loops.layers.uv.active */
+
+static void bm_init_types_bmtexpoly(void)
+{
+ BPy_BMTexPoly_Type.tp_basicsize = sizeof(BPy_BMTexPoly);
+
+ BPy_BMTexPoly_Type.tp_name = "BMTexPoly";
+
+ BPy_BMTexPoly_Type.tp_doc = NULL; // todo
+
+ BPy_BMTexPoly_Type.tp_getset = bpy_bmtexpoly_getseters;
+
+ BPy_BMTexPoly_Type.tp_flags = Py_TPFLAGS_DEFAULT;
+
+ PyType_Ready(&BPy_BMTexPoly_Type);
+}
+
+int BPy_BMTexPoly_AssignPyObject(struct MTexPoly *mtpoly, PyObject *value)
+{
+ if (UNLIKELY(!BPy_BMTexPoly_Check(value))) {
+ PyErr_Format(PyExc_TypeError, "expected BMTexPoly, not a %.200s", Py_TYPE(value)->tp_name);
+ return -1;
+ }
+ else {
+ *((MTexPoly *)mtpoly) = *(((BPy_BMTexPoly *)value)->data);
+ return 0;
+ }
+}
+
+PyObject *BPy_BMTexPoly_CreatePyObject(struct MTexPoly *mtpoly)
+{
+ BPy_BMTexPoly *self = PyObject_New(BPy_BMTexPoly, &BPy_BMTexPoly_Type);
+ self->data = mtpoly;
+ return (PyObject *)self;
+}
+
+/* --- End Mesh BMTexPoly --- */
+
/* Mesh Loop UV
* ************ */
@@ -596,6 +688,7 @@ PyObject *BPy_BMDeformVert_CreatePyObject(struct MDeformVert *dvert)
/* call to init all types */
void BPy_BM_init_types_meshdata(void)
{
+ bm_init_types_bmtexpoly();
bm_init_types_bmloopuv();
bm_init_types_bmloopcol();
bm_init_types_bmdvert();
diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.h b/source/blender/python/bmesh/bmesh_py_types_meshdata.h
index 4636f800ed3..c9e8dce97a0 100644
--- a/source/blender/python/bmesh/bmesh_py_types_meshdata.h
+++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.h
@@ -40,10 +40,17 @@ typedef struct BPy_BMGenericMeshData {
void *data;
} BPy_BMGenericMeshData;
+struct MTexPoly;
struct MLoopUV;
struct MLoopCol;
struct MDeformVert;
+int BPy_BMTexPoly_AssignPyObject(struct MTexPoly *mloopuv, PyObject *value);
+PyObject *BPy_BMTexPoly_CreatePyObject(struct MTexPoly *mloopuv);
+
+int BPy_BMLoopUV_AssignPyObject(struct MLoopUV *data, PyObject *value);
+PyObject *BPy_BMLoopUV_CreatePyObject(struct MLoopUV *data);
+
int BPy_BMLoopUV_AssignPyObject(struct MLoopUV *data, PyObject *value);
PyObject *BPy_BMLoopUV_CreatePyObject(struct MLoopUV *data);
diff --git a/source/blender/python/generic/CMakeLists.txt b/source/blender/python/generic/CMakeLists.txt
index 9a73911d697..eb8bd694231 100644
--- a/source/blender/python/generic/CMakeLists.txt
+++ b/source/blender/python/generic/CMakeLists.txt
@@ -46,4 +46,6 @@ set(SRC
py_capi_utils.h
)
+add_definitions(-DGLEW_STATIC)
+
blender_add_lib(bf_python_ext "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/python/generic/bgl.c b/source/blender/python/generic/bgl.c
index 3d695e4b270..ce11545c90d 100644
--- a/source/blender/python/generic/bgl.c
+++ b/source/blender/python/generic/bgl.c
@@ -44,6 +44,7 @@
#include "BLI_utildefines.h"
static PyObject *Buffer_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
+static PyObject *Method_ShaderSource (PyObject *self, PyObject *args);
/* Buffer sequence methods */
@@ -613,8 +614,10 @@ static PyObject *Buffer_repr(Buffer *self)
BGL_Wrap(2, Accum, void, (GLenum, GLfloat))
+BGL_Wrap(1, ActiveTexture, void, (GLenum))
BGL_Wrap(2, AlphaFunc, void, (GLenum, GLclampf))
BGL_Wrap(3, AreTexturesResident, GLboolean, (GLsizei, GLuintP, GLbooleanP))
+BGL_Wrap(2, AttachShader, void, (GLuint, GLuint))
BGL_Wrap(1, Begin, void, (GLenum))
BGL_Wrap(2, BindTexture, void, (GLenum, GLuint))
BGL_Wrap(7, Bitmap, void, (GLsizei, GLsizei, GLfloat,
@@ -663,14 +666,20 @@ BGL_Wrap(4, Color4us, void, (GLushort, GLushort, GLushort, GLushort)
BGL_Wrap(1, Color4usv, void, (GLushortP))
BGL_Wrap(4, ColorMask, void, (GLboolean, GLboolean, GLboolean, GLboolean))
BGL_Wrap(2, ColorMaterial, void, (GLenum, GLenum))
+BGL_Wrap(1, CompileShader, void, (GLuint))
BGL_Wrap(5, CopyPixels, void, (GLint, GLint, GLsizei, GLsizei, GLenum))
BGL_Wrap(8, CopyTexImage2D, void, (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint))
+BGL_Wrap(1, CreateProgram, GLuint, (void))
+BGL_Wrap(1, CreateShader, GLuint, (GLenum))
BGL_Wrap(1, CullFace, void, (GLenum))
BGL_Wrap(2, DeleteLists, void, (GLuint, GLsizei))
+BGL_Wrap(1, DeleteProgram, void, (GLuint))
+BGL_Wrap(1, DeleteShader, void, (GLuint))
BGL_Wrap(2, DeleteTextures, void, (GLsizei, GLuintP))
BGL_Wrap(1, DepthFunc, void, (GLenum))
BGL_Wrap(1, DepthMask, void, (GLboolean))
BGL_Wrap(2, DepthRange, void, (GLclampd, GLclampd))
+BGL_Wrap(2, DetachShader, void, (GLuint, GLuint))
BGL_Wrap(1, Disable, void, (GLenum))
BGL_Wrap(1, DrawBuffer, void, (GLenum))
BGL_Wrap(5, DrawPixels, void, (GLsizei, GLsizei, GLenum, GLenum, GLvoidP))
@@ -703,6 +712,7 @@ BGL_Wrap(6, Frustum, void, (GLdouble, GLdouble,
GLdouble, GLdouble, GLdouble, GLdouble))
BGL_Wrap(1, GenLists, GLuint, (GLsizei))
BGL_Wrap(2, GenTextures, void, (GLsizei, GLuintP))
+BGL_Wrap(4, GetAttachedShaders, void, (GLuint, GLsizei, GLsizeiP, GLuintP))
BGL_Wrap(2, GetBooleanv, void, (GLenum, GLbooleanP))
BGL_Wrap(2, GetClipPlane, void, (GLenum, GLdoubleP))
BGL_Wrap(2, GetDoublev, void, (GLenum, GLdoubleP))
@@ -720,6 +730,11 @@ BGL_Wrap(2, GetPixelMapfv, void, (GLenum, GLfloatP))
BGL_Wrap(2, GetPixelMapuiv, void, (GLenum, GLuintP))
BGL_Wrap(2, GetPixelMapusv, void, (GLenum, GLushortP))
BGL_Wrap(1, GetPolygonStipple, void, (GLubyteP))
+BGL_Wrap(4, GetProgramInfoLog, void, (GLuint, GLsizei, GLsizeiP, GLcharP))
+BGL_Wrap(3, GetProgramiv, void, (GLuint, GLenum, GLintP))
+BGL_Wrap(4, GetShaderInfoLog, void, (GLuint, GLsizei, GLsizeiP, GLcharP))
+BGL_Wrap(3, GetShaderiv, void, (GLuint, GLenum, GLintP))
+BGL_Wrap(4, GetShaderSource, void, (GLuint, GLsizei, GLsizeiP, GLcharP))
BGL_Wrap(1, GetString, GLstring, (GLenum))
BGL_Wrap(3, GetTexEnvfv, void, (GLenum, GLenum, GLfloatP))
BGL_Wrap(3, GetTexEnviv, void, (GLenum, GLenum, GLintP))
@@ -731,6 +746,7 @@ BGL_Wrap(4, GetTexLevelParameterfv, void, (GLenum, GLint, GLenum, GLfloatP))
BGL_Wrap(4, GetTexLevelParameteriv, void, (GLenum, GLint, GLenum, GLintP))
BGL_Wrap(3, GetTexParameterfv, void, (GLenum, GLenum, GLfloatP))
BGL_Wrap(3, GetTexParameteriv, void, (GLenum, GLenum, GLintP))
+BGL_Wrap(2, GetUniformLocation, GLint, (GLuint, GLstring))
BGL_Wrap(2, Hint, void, (GLenum, GLenum))
BGL_Wrap(1, IndexMask, void, (GLuint))
BGL_Wrap(1, Indexd, void, (GLdouble))
@@ -744,6 +760,8 @@ BGL_Wrap(1, Indexsv, void, (GLshortP))
BGL_Wrap(1, InitNames, void, (void))
BGL_Wrap(1, IsEnabled, GLboolean, (GLenum))
BGL_Wrap(1, IsList, GLboolean, (GLuint))
+BGL_Wrap(1, IsProgram, GLboolean, (GLuint))
+BGL_Wrap(1, IsShader, GLboolean, (GLuint))
BGL_Wrap(1, IsTexture, GLboolean, (GLuint))
BGL_Wrap(2, LightModelf, void, (GLenum, GLfloat))
BGL_Wrap(2, LightModelfv, void, (GLenum, GLfloatP))
@@ -755,6 +773,7 @@ BGL_Wrap(3, Lighti, void, (GLenum, GLenum, GLint))
BGL_Wrap(3, Lightiv, void, (GLenum, GLenum, GLintP))
BGL_Wrap(2, LineStipple, void, (GLint, GLushort))
BGL_Wrap(1, LineWidth, void, (GLfloat))
+BGL_Wrap(1, LinkProgram, void, (GLuint))
BGL_Wrap(1, ListBase, void, (GLuint))
BGL_Wrap(1, LoadIdentity, void, (void))
BGL_Wrap(1, LoadMatrixd, void, (GLdoubleP))
@@ -915,6 +934,33 @@ BGL_Wrap(3, TexParameteri, void, (GLenum, GLenum, GLint))
BGL_Wrap(3, TexParameteriv, void, (GLenum, GLenum, GLintP))
BGL_Wrap(3, Translated, void, (GLdouble, GLdouble, GLdouble))
BGL_Wrap(3, Translatef, void, (GLfloat, GLfloat, GLfloat))
+BGL_Wrap(2, Uniform1f, void, (GLint, GLfloat))
+BGL_Wrap(3, Uniform2f, void, (GLint, GLfloat, GLfloat))
+BGL_Wrap(4, Uniform3f, void, (GLint, GLfloat, GLfloat, GLfloat))
+BGL_Wrap(5, Uniform4f, void, (GLint, GLfloat, GLfloat, GLfloat, GLfloat))
+BGL_Wrap(3, Uniform1fv, void, (GLint, GLsizei, GLfloatP))
+BGL_Wrap(3, Uniform2fv, void, (GLint, GLsizei, GLfloatP))
+BGL_Wrap(3, Uniform3fv, void, (GLint, GLsizei, GLfloatP))
+BGL_Wrap(3, Uniform4fv, void, (GLint, GLsizei, GLfloatP))
+BGL_Wrap(2, Uniform1i, void, (GLint, GLint))
+BGL_Wrap(3, Uniform2i, void, (GLint, GLint, GLint))
+BGL_Wrap(4, Uniform3i, void, (GLint, GLint, GLint, GLint))
+BGL_Wrap(5, Uniform4i, void, (GLint, GLint, GLint, GLint, GLint))
+BGL_Wrap(3, Uniform1iv, void, (GLint, GLsizei, GLintP))
+BGL_Wrap(3, Uniform2iv, void, (GLint, GLsizei, GLintP))
+BGL_Wrap(3, Uniform3iv, void, (GLint, GLsizei, GLintP))
+BGL_Wrap(3, Uniform4iv, void, (GLint, GLsizei, GLintP))
+BGL_Wrap(4, UniformMatrix2fv, void, (GLint, GLsizei, GLboolean, GLfloatP))
+BGL_Wrap(4, UniformMatrix3fv, void, (GLint, GLsizei, GLboolean, GLfloatP))
+BGL_Wrap(4, UniformMatrix4fv, void, (GLint, GLsizei, GLboolean, GLfloatP))
+BGL_Wrap(4, UniformMatrix2x3fv, void, (GLint, GLsizei, GLboolean, GLfloatP))
+BGL_Wrap(4, UniformMatrix3x2fv, void, (GLint, GLsizei, GLboolean, GLfloatP))
+BGL_Wrap(4, UniformMatrix2x4fv, void, (GLint, GLsizei, GLboolean, GLfloatP))
+BGL_Wrap(4, UniformMatrix4x2fv, void, (GLint, GLsizei, GLboolean, GLfloatP))
+BGL_Wrap(4, UniformMatrix3x4fv, void, (GLint, GLsizei, GLboolean, GLfloatP))
+BGL_Wrap(4, UniformMatrix4x3fv, void, (GLint, GLsizei, GLboolean, GLfloatP))
+BGL_Wrap(1, UseProgram, void, (GLuint))
+BGL_Wrap(1, ValidateProgram, void, (GLuint))
BGL_Wrap(2, Vertex2d, void, (GLdouble, GLdouble))
BGL_Wrap(1, Vertex2dv, void, (GLdoubleP))
BGL_Wrap(2, Vertex2f, void, (GLfloat, GLfloat))
@@ -957,8 +1003,10 @@ static struct PyMethodDef BGL_methods[] = {
/* #ifndef __APPLE__ */
MethodDef(Accum),
+ MethodDef(ActiveTexture),
MethodDef(AlphaFunc),
MethodDef(AreTexturesResident),
+ MethodDef(AttachShader),
MethodDef(Begin),
MethodDef(BindTexture),
MethodDef(Bitmap),
@@ -1006,14 +1054,20 @@ static struct PyMethodDef BGL_methods[] = {
MethodDef(Color4usv),
MethodDef(ColorMask),
MethodDef(ColorMaterial),
+ MethodDef(CompileShader),
MethodDef(CopyPixels),
MethodDef(CopyTexImage2D),
+ MethodDef(CreateProgram),
+ MethodDef(CreateShader),
MethodDef(CullFace),
MethodDef(DeleteLists),
+ MethodDef(DeleteProgram),
+ MethodDef(DeleteShader),
MethodDef(DeleteTextures),
MethodDef(DepthFunc),
MethodDef(DepthMask),
MethodDef(DepthRange),
+ MethodDef(DetachShader),
MethodDef(Disable),
MethodDef(DrawBuffer),
MethodDef(DrawPixels),
@@ -1045,6 +1099,7 @@ static struct PyMethodDef BGL_methods[] = {
MethodDef(Frustum),
MethodDef(GenLists),
MethodDef(GenTextures),
+ MethodDef(GetAttachedShaders),
MethodDef(GetBooleanv),
MethodDef(GetClipPlane),
MethodDef(GetDoublev),
@@ -1062,6 +1117,11 @@ static struct PyMethodDef BGL_methods[] = {
MethodDef(GetPixelMapuiv),
MethodDef(GetPixelMapusv),
MethodDef(GetPolygonStipple),
+ MethodDef(GetProgramInfoLog),
+ MethodDef(GetProgramiv),
+ MethodDef(GetShaderInfoLog),
+ MethodDef(GetShaderiv),
+ MethodDef(GetShaderSource),
MethodDef(GetString),
MethodDef(GetTexEnvfv),
MethodDef(GetTexEnviv),
@@ -1073,6 +1133,7 @@ static struct PyMethodDef BGL_methods[] = {
MethodDef(GetTexLevelParameteriv),
MethodDef(GetTexParameterfv),
MethodDef(GetTexParameteriv),
+ MethodDef(GetUniformLocation),
MethodDef(Hint),
MethodDef(IndexMask),
MethodDef(Indexd),
@@ -1086,6 +1147,8 @@ static struct PyMethodDef BGL_methods[] = {
MethodDef(InitNames),
MethodDef(IsEnabled),
MethodDef(IsList),
+ MethodDef(IsProgram),
+ MethodDef(IsShader),
MethodDef(IsTexture),
MethodDef(LightModelf),
MethodDef(LightModelfv),
@@ -1097,6 +1160,7 @@ static struct PyMethodDef BGL_methods[] = {
MethodDef(Lightiv),
MethodDef(LineStipple),
MethodDef(LineWidth),
+ MethodDef(LinkProgram),
MethodDef(ListBase),
MethodDef(LoadIdentity),
MethodDef(LoadMatrixd),
@@ -1194,6 +1258,7 @@ static struct PyMethodDef BGL_methods[] = {
MethodDef(Scissor),
MethodDef(SelectBuffer),
MethodDef(ShadeModel),
+ MethodDef(ShaderSource),
MethodDef(StencilFunc),
MethodDef(StencilMask),
MethodDef(StencilOp),
@@ -1247,6 +1312,33 @@ static struct PyMethodDef BGL_methods[] = {
MethodDef(TexParameteriv),
MethodDef(Translated),
MethodDef(Translatef),
+ MethodDef(Uniform1f),
+ MethodDef(Uniform2f),
+ MethodDef(Uniform3f),
+ MethodDef(Uniform4f),
+ MethodDef(Uniform1fv),
+ MethodDef(Uniform2fv),
+ MethodDef(Uniform3fv),
+ MethodDef(Uniform4fv),
+ MethodDef(Uniform1i),
+ MethodDef(Uniform2i),
+ MethodDef(Uniform3i),
+ MethodDef(Uniform4i),
+ MethodDef(Uniform1iv),
+ MethodDef(Uniform2iv),
+ MethodDef(Uniform3iv),
+ MethodDef(Uniform4iv),
+ MethodDef(UniformMatrix2fv),
+ MethodDef(UniformMatrix3fv),
+ MethodDef(UniformMatrix4fv),
+ MethodDef(UniformMatrix2x3fv),
+ MethodDef(UniformMatrix3x2fv),
+ MethodDef(UniformMatrix2x4fv),
+ MethodDef(UniformMatrix4x2fv),
+ MethodDef(UniformMatrix3x4fv),
+ MethodDef(UniformMatrix4x3fv),
+ MethodDef(UseProgram),
+ MethodDef(ValidateProgram),
MethodDef(Vertex2d),
MethodDef(Vertex2dv),
MethodDef(Vertex2f),
@@ -1794,5 +1886,37 @@ PyObject *BPyInit_bgl(void)
EXPP_ADDCONST(GL_TEXTURE_BINDING_1D);
EXPP_ADDCONST(GL_TEXTURE_BINDING_2D);
+ EXPP_ADDCONST(GL_VERTEX_SHADER);
+ EXPP_ADDCONST(GL_FRAGMENT_SHADER);
+ EXPP_ADDCONST(GL_COMPILE_STATUS);
+ EXPP_ADDCONST(GL_ACTIVE_TEXTURE);
+
+ EXPP_ADDCONST(GL_TEXTURE0);
+ EXPP_ADDCONST(GL_TEXTURE1);
+ EXPP_ADDCONST(GL_TEXTURE2);
+ EXPP_ADDCONST(GL_TEXTURE3);
+ EXPP_ADDCONST(GL_TEXTURE4);
+ EXPP_ADDCONST(GL_TEXTURE5);
+ EXPP_ADDCONST(GL_TEXTURE6);
+ EXPP_ADDCONST(GL_TEXTURE7);
+ EXPP_ADDCONST(GL_TEXTURE8);
+
+ EXPP_ADDCONST(GL_DEPTH_COMPONENT32);
+ EXPP_ADDCONST(GL_TEXTURE_COMPARE_MODE);
+
return submodule;
}
+
+static PyObject *Method_ShaderSource (PyObject *UNUSED(self), PyObject *args)
+{
+ int shader;
+ char *source;
+
+ if (!PyArg_ParseTuple(args, "Is", &shader, &source))
+ return NULL;
+
+ glShaderSource(shader, 1, (const char **)&source, NULL);
+
+ return Py_INCREF(Py_None), Py_None;
+}
+
diff --git a/source/blender/python/generic/bgl.h b/source/blender/python/generic/bgl.h
index 1a7036daf45..abcb65b8c3a 100644
--- a/source/blender/python/generic/bgl.h
+++ b/source/blender/python/generic/bgl.h
@@ -103,7 +103,7 @@ extern PyTypeObject BGL_bufferType;
#define buffer_def(number) Buffer *bgl_buffer##number
/* GL Pointer fields, handled by buffer type */
-/* GLdoubleP, GLfloatP, GLintP, GLuintP, GLshortP */
+/* GLdoubleP, GLfloatP, GLintP, GLuintP, GLshortP, GLsizeiP, GLcharP */
#define GLbooleanP_str "O!"
#define GLbooleanP_var(number) (bgl_buffer##number)->buf.asvoid
@@ -160,6 +160,16 @@ extern PyTypeObject BGL_bufferType;
#define GLvoidP_ref(number) &BGL_bufferType, &bgl_buffer##number
#define GLvoidP_def(number) Buffer *bgl_buffer##number
+#define GLsizeiP_str "O!"
+#define GLsizeiP_var(number) (bgl_buffer##number)->buf.asvoid
+#define GLsizeiP_ref(number) &BGL_bufferType, &bgl_buffer##number
+#define GLsizeiP_def(number) Buffer *bgl_buffer##number
+
+#define GLcharP_str "O!"
+#define GLcharP_var(number) (bgl_buffer##number)->buf.asvoid
+#define GLcharP_ref(number) &BGL_bufferType, &bgl_buffer##number
+#define GLcharP_def(number) Buffer *bgl_buffer##number
+
#define buffer_str "O!"
#define buffer_var(number) (bgl_buffer##number)->buf.asvoid
#define buffer_ref(number) &BGL_bufferType, &bgl_buffer##number
@@ -239,6 +249,12 @@ extern PyTypeObject BGL_bufferType;
#define GLfloat_ref(num) &bgl_var##num
#define GLfloat_def(num) float GLfloat_var(num)
+/* typedef char *GLstring; */
+#define GLstring_str "s"
+#define GLstring_var(number) bgl_var##number
+#define GLstring_ref(number) &bgl_var##number
+#define GLstring_def(number) char *GLstring_var(number)
+
/* typedef float GLclampf; */
#define GLclampf_str "f"
#define GLclampf_var(num) bgl_var##num
diff --git a/source/blender/python/intern/bpy.c b/source/blender/python/intern/bpy.c
index 834ca1227b5..4d5c02dad68 100644
--- a/source/blender/python/intern/bpy.c
+++ b/source/blender/python/intern/bpy.c
@@ -125,13 +125,13 @@ static PyObject *bpy_blend_paths(PyObject *UNUSED(self), PyObject *args, PyObjec
return NULL;
}
- if (absolute) flag |= BPATH_TRAVERSE_ABS;
- if (!packed) flag |= BPATH_TRAVERSE_SKIP_PACKED;
- if (local) flag |= BPATH_TRAVERSE_SKIP_LIBRARY;
+ if (absolute) flag |= BLI_BPATH_TRAVERSE_ABS;
+ if (!packed) flag |= BLI_BPATH_TRAVERSE_SKIP_PACKED;
+ if (local) flag |= BLI_BPATH_TRAVERSE_SKIP_LIBRARY;
list = PyList_New(0);
- bpath_traverse_main(G.main, bpy_blend_paths_visit_cb, flag, (void *)list);
+ BLI_bpath_traverse_main(G.main, bpy_blend_paths_visit_cb, flag, (void *)list);
return list;
}
diff --git a/source/blender/python/intern/bpy_app_handlers.c b/source/blender/python/intern/bpy_app_handlers.c
index 5128cf0b924..bab5a83a6ed 100644
--- a/source/blender/python/intern/bpy_app_handlers.c
+++ b/source/blender/python/intern/bpy_app_handlers.c
@@ -225,7 +225,7 @@ PyObject *BPY_app_handlers_struct(void)
funcstore->func = bpy_app_generic_callback;
funcstore->alloc = 0;
funcstore->arg = SET_INT_IN_POINTER(pos);
- BLI_add_cb(funcstore, pos);
+ BLI_callback_add(funcstore, pos);
}
}
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c
index d638a3edf30..f3f05e93930 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -96,7 +96,7 @@ static double bpy_timer_run_tot; /* accumulate python runs */
#endif
/* use for updating while a python script runs - in case of file load */
-void bpy_context_update(bContext *C)
+void BPY_context_update(bContext *C)
{
/* don't do this from a non-main (e.g. render) thread, it can cause a race
* condition on C->data.recursion. ideal solution would be to disable
@@ -117,7 +117,7 @@ void bpy_context_set(bContext *C, PyGILState_STATE *gilstate)
*gilstate = PyGILState_Ensure();
if (py_call_level == 1) {
- bpy_context_update(C);
+ BPY_context_update(C);
#ifdef TIME_PY_RUN
if (bpy_timer_count == 0) {
@@ -178,7 +178,8 @@ void BPY_modules_update(bContext *C)
/* refreshes the main struct */
BPY_update_rna_module();
- bpy_context_module->ptr.data = (void *)C;
+ if(bpy_context_module)
+ bpy_context_module->ptr.data = (void *)C;
}
void BPY_context_set(bContext *C)
@@ -623,7 +624,7 @@ void BPY_modules_load_user(bContext *C)
/* update pointers since this can run from a nested script
* on file load */
if (py_call_level) {
- bpy_context_update(C);
+ BPY_context_update(C);
}
bpy_context_set(C, &gilstate);
diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c
index 4d0c05f6582..dbb25eb854b 100644
--- a/source/blender/python/intern/bpy_props.c
+++ b/source/blender/python/intern/bpy_props.c
@@ -1071,8 +1071,8 @@ static EnumPropertyItem *enum_items_from_py(PyObject *seq_fast, PyObject *def, i
else {
MEM_freeN(items);
PyErr_SetString(PyExc_TypeError,
- "EnumProperty(...): expected an tuple containing "
- "(identifier, name description) and optionally a "
+ "EnumProperty(...): expected a tuple containing "
+ "(identifier, name, description) and optionally a "
"unique number");
return NULL;
}
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index 7259ea8e2f5..13c34465560 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -1424,7 +1424,8 @@ int pyrna_pydict_to_props(PointerRNA *ptr, PyObject *kw, int all_args, const cha
totkw = kw ? PyDict_Size(kw) : 0;
- RNA_STRUCT_BEGIN(ptr, prop) {
+ RNA_STRUCT_BEGIN (ptr, prop)
+ {
arg_name = RNA_property_identifier(prop);
if (strcmp(arg_name, "rna_type") == 0) continue;
@@ -2203,7 +2204,8 @@ int pyrna_prop_collection_subscript_str_lib_pair_ptr(BPy_PropertyRNA *self, PyOb
/* lib is either a valid poniter or NULL,
* either way can do direct comparison with id.lib */
- RNA_PROP_BEGIN(&self->ptr, itemptr, self->prop) {
+ RNA_PROP_BEGIN (&self->ptr, itemptr, self->prop)
+ {
ID *id = itemptr.data; /* always an ID */
if (id->lib == lib && (strncmp(keyname, id->name + 2, sizeof(id->name) - 2) == 0)) {
found = TRUE;
@@ -3346,7 +3348,8 @@ static void pyrna_dir_members_rna(PyObject *list, PointerRNA *ptr)
RNA_pointer_create(NULL, &RNA_Struct, ptr->type, &tptr);
iterprop = RNA_struct_find_property(&tptr, "functions");
- RNA_PROP_BEGIN(&tptr, itemptr, iterprop) {
+ RNA_PROP_BEGIN (&tptr, itemptr, iterprop)
+ {
idname = RNA_function_identifier(itemptr.data);
pystring = PyUnicode_FromString(idname);
@@ -3365,7 +3368,8 @@ static void pyrna_dir_members_rna(PyObject *list, PointerRNA *ptr)
iterprop = RNA_struct_iterator_property(ptr->type);
- RNA_PROP_BEGIN(ptr, itemptr, iterprop) {
+ RNA_PROP_BEGIN (ptr, itemptr, iterprop)
+ {
nameptr = RNA_struct_name_get_alloc(&itemptr, name, sizeof(name), &namelen);
if (nameptr) {
@@ -3980,7 +3984,8 @@ static PyObject *pyrna_prop_collection_keys(BPy_PropertyRNA *self)
char name[256], *nameptr;
int namelen;
- RNA_PROP_BEGIN(&self->ptr, itemptr, self->prop) {
+ RNA_PROP_BEGIN (&self->ptr, itemptr, self->prop)
+ {
nameptr = RNA_struct_name_get_alloc(&itemptr, name, sizeof(name), &namelen);
if (nameptr) {
@@ -4017,7 +4022,8 @@ static PyObject *pyrna_prop_collection_items(BPy_PropertyRNA *self)
int namelen;
int i = 0;
- RNA_PROP_BEGIN(&self->ptr, itemptr, self->prop) {
+ RNA_PROP_BEGIN (&self->ptr, itemptr, self->prop)
+ {
if (itemptr.data) {
/* add to python list */
item = PyTuple_New(2);
@@ -4189,7 +4195,8 @@ static PyObject *pyrna_prop_collection_find(BPy_PropertyRNA *self, PyObject *key
PYRNA_PROP_CHECK_OBJ(self);
- RNA_PROP_BEGIN(&self->ptr, itemptr, self->prop) {
+ RNA_PROP_BEGIN (&self->ptr, itemptr, self->prop)
+ {
nameptr = RNA_struct_name_get_alloc(&itemptr, name, sizeof(name), &namelen);
if (nameptr) {
@@ -4220,7 +4227,8 @@ static void foreach_attr_type(BPy_PropertyRNA *self, const char *attr,
*attr_signed = FALSE;
/* note: this is fail with zero length lists, so don't let this get caled in that case */
- RNA_PROP_BEGIN(&self->ptr, itemptr, self->prop) {
+ RNA_PROP_BEGIN (&self->ptr, itemptr, self->prop)
+ {
prop = RNA_struct_find_property(&itemptr, attr);
*raw_type = RNA_property_raw_type(prop);
*attr_tot = RNA_property_array_length(&itemptr, prop);
@@ -6246,6 +6254,31 @@ PyObject *pyrna_prop_CreatePyObject(PointerRNA *ptr, PropertyRNA *prop)
return (PyObject *)pyrna;
}
+/* utility func to be used by external modules, *sneaky!* */
+PyObject *pyrna_id_CreatePyObject(ID *id)
+{
+ if (id) {
+ PointerRNA ptr;
+ RNA_id_pointer_create(id, &ptr);
+ return pyrna_struct_CreatePyObject(&ptr);
+ }
+ else {
+ Py_RETURN_NONE;
+ }
+}
+
+int pyrna_id_FromPyObject(PyObject *obj, ID **id)
+{
+ if (BPy_StructRNA_Check(obj) && (RNA_struct_is_ID(((BPy_StructRNA *)obj)->ptr.type))) {
+ *id = ((BPy_StructRNA *)obj)->ptr.id.data;
+ return TRUE;
+ }
+ else {
+ *id = NULL;
+ return FALSE;
+ }
+}
+
void BPY_rna_init(void)
{
#ifdef USE_MATHUTILS // register mathutils callbacks, ok to run more then once.
@@ -6306,11 +6339,13 @@ PyObject *BPY_rna_module(void)
void BPY_update_rna_module(void)
{
+ if(rna_module_ptr) {
#if 0
- RNA_main_pointer_create(G.main, rna_module_ptr);
+ RNA_main_pointer_create(G.main, rna_module_ptr);
#else
- rna_module_ptr->data = G.main; /* just set data is enough */
+ rna_module_ptr->data = G.main; /* just set data is enough */
#endif
+ }
}
#if 0
@@ -6401,7 +6436,8 @@ static PyObject *pyrna_basetype_dir(BPy_BaseTypeRNA *self)
PyObject *ret = PyList_New(0);
PyObject *item;
- RNA_PROP_BEGIN(&self->ptr, itemptr, self->prop) {
+ RNA_PROP_BEGIN (&self->ptr, itemptr, self->prop)
+ {
StructRNA *srna = itemptr.data;
StructRNA *srna_base = RNA_struct_base(itemptr.data);
/* skip own operators, these double up [#29666] */
@@ -7189,7 +7225,8 @@ void pyrna_alloc_types(void)
RNA_blender_rna_pointer_create(&ptr);
prop = RNA_struct_find_property(&ptr, "structs");
- RNA_PROP_BEGIN(&ptr, itemptr, prop) {
+ RNA_PROP_BEGIN (&ptr, itemptr, prop)
+ {
PyObject *item = pyrna_struct_Subtype(&itemptr);
if (item == NULL) {
if (PyErr_Occurred()) {
@@ -7217,7 +7254,8 @@ void pyrna_free_types(void)
prop = RNA_struct_find_property(&ptr, "structs");
- RNA_PROP_BEGIN(&ptr, itemptr, prop) {
+ RNA_PROP_BEGIN (&ptr, itemptr, prop)
+ {
StructRNA *srna = srna_from_ptr(&itemptr);
void *py_ptr = RNA_struct_py_type_get(srna);
@@ -7475,9 +7513,9 @@ static PyObject *pyrna_unregister_class(PyObject *UNUSED(self), PyObject *py_cla
prop_rna = RNA_struct_find_property(&ptr_rna, "structs");
-
/* loop over all structs */
- RNA_PROP_BEGIN(&ptr_rna, itemptr, prop_rna) {
+ RNA_PROP_BEGIN (&ptr_rna, itemptr, prop_rna)
+ {
srna_iter = itemptr.data;
if (pyrna_srna_contains_pointer_prop_srna(srna_iter, srna, &prop_identifier)) {
break;
diff --git a/source/blender/python/intern/bpy_util.h b/source/blender/python/intern/bpy_util.h
index 4bebcb2ed85..63660b06813 100644
--- a/source/blender/python/intern/bpy_util.h
+++ b/source/blender/python/intern/bpy_util.h
@@ -49,7 +49,6 @@ short BPy_errors_to_report(struct ReportList *reports);
struct bContext *BPy_GetContext(void);
void BPy_SetContext(struct bContext *C);
-extern void bpy_context_update(struct bContext *C);
extern void bpy_context_set(struct bContext *C, PyGILState_STATE *gilstate);
extern void bpy_context_clear(struct bContext *C, PyGILState_STATE *gilstate);
#endif
diff --git a/source/blender/python/mathutils/mathutils.h b/source/blender/python/mathutils/mathutils.h
index e8d128b431e..d4673d14823 100644
--- a/source/blender/python/mathutils/mathutils.h
+++ b/source/blender/python/mathutils/mathutils.h
@@ -1,5 +1,4 @@
-/*
- *
+/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -26,15 +25,13 @@
* ***** END GPL LICENSE BLOCK *****
*/
+#ifndef __MATHUTILS_H__
+#define __MATHUTILS_H__
+
/** \file blender/python/mathutils/mathutils.h
* \ingroup pymathutils
*/
-//Include this file for access to vector, quat, matrix, euler, etc...
-
-#ifndef __MATHUTILS_H__
-#define __MATHUTILS_H__
-
/* Can cast different mathutils types to this, use for generic funcs */
struct DynStr;
diff --git a/source/blender/python/mathutils/mathutils_Color.c b/source/blender/python/mathutils/mathutils_Color.c
index fc8b2886f37..0f421f1ddea 100644
--- a/source/blender/python/mathutils/mathutils_Color.c
+++ b/source/blender/python/mathutils/mathutils_Color.c
@@ -1,5 +1,4 @@
/*
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/python/mathutils/mathutils_Color.h b/source/blender/python/mathutils/mathutils_Color.h
index 2bf6ba2ef1f..eff09c25a99 100644
--- a/source/blender/python/mathutils/mathutils_Color.h
+++ b/source/blender/python/mathutils/mathutils_Color.h
@@ -1,5 +1,4 @@
/*
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/python/mathutils/mathutils_Euler.c b/source/blender/python/mathutils/mathutils_Euler.c
index a663bd71130..583831b1655 100644
--- a/source/blender/python/mathutils/mathutils_Euler.c
+++ b/source/blender/python/mathutils/mathutils_Euler.c
@@ -1,5 +1,4 @@
/*
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/python/mathutils/mathutils_Euler.h b/source/blender/python/mathutils/mathutils_Euler.h
index 56199f4a546..bcbc6c60ca7 100644
--- a/source/blender/python/mathutils/mathutils_Euler.h
+++ b/source/blender/python/mathutils/mathutils_Euler.h
@@ -1,5 +1,4 @@
-/*
- *
+/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -27,14 +26,13 @@
*
*/
+#ifndef __MATHUTILS_EULER_H__
+#define __MATHUTILS_EULER_H__
+
/** \file blender/python/mathutils/mathutils_Euler.h
* \ingroup pymathutils
*/
-
-#ifndef __MATHUTILS_EULER_H__
-#define __MATHUTILS_EULER_H__
-
extern PyTypeObject euler_Type;
#define EulerObject_Check(_v) PyObject_TypeCheck((_v), &euler_Type)
diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c
index a48e7ed854d..5c4c6414f39 100644
--- a/source/blender/python/mathutils/mathutils_Matrix.c
+++ b/source/blender/python/mathutils/mathutils_Matrix.c
@@ -1,5 +1,4 @@
/*
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/python/mathutils/mathutils_Quaternion.h b/source/blender/python/mathutils/mathutils_Quaternion.h
index 09faff192de..4ffe8488843 100644
--- a/source/blender/python/mathutils/mathutils_Quaternion.h
+++ b/source/blender/python/mathutils/mathutils_Quaternion.h
@@ -1,5 +1,4 @@
-/*
- *
+/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -24,17 +23,15 @@
* Contributor(s): Joseph Gilbert
*
* ***** END GPL LICENSE BLOCK *****
- *
*/
+#ifndef __MATHUTILS_QUATERNION_H__
+#define __MATHUTILS_QUATERNION_H__
+
/** \file blender/python/mathutils/mathutils_Quaternion.h
* \ingroup pymathutils
*/
-
-#ifndef __MATHUTILS_QUATERNION_H__
-#define __MATHUTILS_QUATERNION_H__
-
extern PyTypeObject quaternion_Type;
#define QuaternionObject_Check(_v) PyObject_TypeCheck((_v), &quaternion_Type)
diff --git a/source/blender/python/mathutils/mathutils_Vector.h b/source/blender/python/mathutils/mathutils_Vector.h
index 04fd0adcda5..974abe0f869 100644
--- a/source/blender/python/mathutils/mathutils_Vector.h
+++ b/source/blender/python/mathutils/mathutils_Vector.h
@@ -1,5 +1,4 @@
/*
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/python/mathutils/mathutils_geometry.c b/source/blender/python/mathutils/mathutils_geometry.c
index b94c2e21139..c6bfeff1651 100644
--- a/source/blender/python/mathutils/mathutils_geometry.c
+++ b/source/blender/python/mathutils/mathutils_geometry.c
@@ -1,5 +1,4 @@
/*
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -1011,7 +1010,7 @@ static PyObject *M_Geometry_interpolate_bezier(PyObject *UNUSED(self), PyObject
coord_array = MEM_callocN(dims * (resolu) * sizeof(float), "interpolate_bezier");
for (i = 0; i < dims; i++) {
- forward_diff_bezier(k1[i], h1[i], h2[i], k2[i], coord_array + i, resolu - 1, sizeof(float) * dims);
+ BKE_curve_forward_diff_bezier(k1[i], h1[i], h2[i], k2[i], coord_array + i, resolu - 1, sizeof(float) * dims);
}
list = PyList_New(resolu);
@@ -1056,7 +1055,7 @@ static PyObject *M_Geometry_tessellate_polygon(PyObject *UNUSED(self), PyObject
for (i = 0; i < len_polylines; i++) {
polyLine = PySequence_GetItem(polyLineSeq, i);
if (!PySequence_Check(polyLine)) {
- freedisplist(&dispbase);
+ BKE_displist_free(&dispbase);
Py_XDECREF(polyLine); /* may be null so use Py_XDECREF*/
PyErr_SetString(PyExc_TypeError,
"One or more of the polylines is not a sequence of mathutils.Vector's");
@@ -1110,7 +1109,7 @@ static PyObject *M_Geometry_tessellate_polygon(PyObject *UNUSED(self), PyObject
}
if (ls_error) {
- freedisplist(&dispbase); /* possible some dl was allocated */
+ BKE_displist_free(&dispbase); /* possible some dl was allocated */
PyErr_SetString(PyExc_TypeError,
"A point in one of the polylines "
"is not a mathutils.Vector type");
@@ -1118,7 +1117,7 @@ static PyObject *M_Geometry_tessellate_polygon(PyObject *UNUSED(self), PyObject
}
else if (totpoints) {
/* now make the list to return */
- filldisplist(&dispbase, &dispbase, 0);
+ BKE_displist_fill(&dispbase, &dispbase, 0);
/* The faces are stored in a new DisplayList
* thats added to the head of the listbase */
@@ -1126,7 +1125,7 @@ static PyObject *M_Geometry_tessellate_polygon(PyObject *UNUSED(self), PyObject
tri_list = PyList_New(dl->parts);
if (!tri_list) {
- freedisplist(&dispbase);
+ BKE_displist_free(&dispbase);
PyErr_SetString(PyExc_RuntimeError,
"failed to make a new list");
return NULL;
@@ -1139,11 +1138,11 @@ static PyObject *M_Geometry_tessellate_polygon(PyObject *UNUSED(self), PyObject
dl_face += 3;
index++;
}
- freedisplist(&dispbase);
+ BKE_displist_free(&dispbase);
}
else {
/* no points, do this so scripts don't barf */
- freedisplist(&dispbase); /* possible some dl was allocated */
+ BKE_displist_free(&dispbase); /* possible some dl was allocated */
tri_list = PyList_New(0);
}
@@ -1151,11 +1150,11 @@ static PyObject *M_Geometry_tessellate_polygon(PyObject *UNUSED(self), PyObject
}
-static int boxPack_FromPyObject(PyObject *value, boxPack **boxarray)
+static int boxPack_FromPyObject(PyObject *value, BoxPack **boxarray)
{
Py_ssize_t len, i;
PyObject *list_item, *item_1, *item_2;
- boxPack *box;
+ BoxPack *box;
/* Error checking must already be done */
@@ -1167,7 +1166,7 @@ static int boxPack_FromPyObject(PyObject *value, boxPack **boxarray)
len = PyList_GET_SIZE(value);
- *boxarray = MEM_mallocN(len * sizeof(boxPack), "boxPack box");
+ *boxarray = MEM_mallocN(len * sizeof(BoxPack), "BoxPack box");
for (i = 0; i < len; i++) {
@@ -1202,11 +1201,11 @@ static int boxPack_FromPyObject(PyObject *value, boxPack **boxarray)
return 0;
}
-static void boxPack_ToPyObject(PyObject *value, boxPack **boxarray)
+static void boxPack_ToPyObject(PyObject *value, BoxPack **boxarray)
{
Py_ssize_t len, i;
PyObject *list_item;
- boxPack *box;
+ BoxPack *box;
len = PyList_GET_SIZE(value);
@@ -1244,13 +1243,13 @@ static PyObject *M_Geometry_box_pack_2d(PyObject *UNUSED(self), PyObject *boxlis
len = PyList_GET_SIZE(boxlist);
if (len) {
- boxPack *boxarray = NULL;
+ BoxPack *boxarray = NULL;
if (boxPack_FromPyObject(boxlist, &boxarray) == -1) {
return NULL; /* exception set */
}
/* Non Python function */
- boxPack2D(boxarray, len, &tot_width, &tot_height);
+ BLI_box_pack_2D(boxarray, len, &tot_width, &tot_height);
boxPack_ToPyObject(boxlist, &boxarray);
}
diff --git a/source/blender/python/mathutils/mathutils_geometry.h b/source/blender/python/mathutils/mathutils_geometry.h
index ac89698c12e..3967c934ce9 100644
--- a/source/blender/python/mathutils/mathutils_geometry.h
+++ b/source/blender/python/mathutils/mathutils_geometry.h
@@ -1,5 +1,4 @@
-/*
- *
+/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -26,15 +25,13 @@
* ***** END GPL LICENSE BLOCK *****
*/
+#ifndef __MATHUTILS_GEOMETRY_H__
+#define __MATHUTILS_GEOMETRY_H__
+
/** \file blender/python/mathutils/mathutils_geometry.h
* \ingroup pymathutils
*/
-/*Include this file for access to vector, quat, matrix, euler, etc...*/
-
-#ifndef __MATHUTILS_GEOMETRY_H__
-#define __MATHUTILS_GEOMETRY_H__
-
#include "mathutils.h"
PyMODINIT_FUNC PyInit_mathutils_geometry(void);
diff --git a/source/blender/quicktime/apple/quicktime_export.c b/source/blender/quicktime/apple/quicktime_export.c
index 599268b225a..e25fc0f04bd 100644
--- a/source/blender/quicktime/apple/quicktime_export.c
+++ b/source/blender/quicktime/apple/quicktime_export.c
@@ -1,9 +1,4 @@
/*
- *
- * quicktime_export.c
- *
- * Code to create QuickTime Movies with Blender
- *
* ***** BEGIN GPL LICENSE BLOCK *****
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -29,6 +24,8 @@
/** \file blender/quicktime/apple/quicktime_export.c
* \ingroup quicktime
+ *
+ * Code to create QuickTime Movies with Blender
*/
@@ -144,7 +141,7 @@ static QuicktimeCodecTypeDesc qtVideoCodecList[] = {
{kMPEG4VisualCodecType, 10, "MPEG4"},
{kH263CodecType, 11, "H.263"},
{kH264CodecType, 12, "H.264"},
- {0,0,NULL}};
+ {0, 0, NULL}};
static int qtVideoCodecCount = 12;
@@ -263,7 +260,7 @@ static OSErr QT_GetCodecSettingsFromScene(RenderData *rd, ReportList *reports)
// if there is codecdata in the blendfile, convert it to a Quicktime handle
if (qcd) {
myHandle = NewHandle(qcd->cdSize);
- PtrToHand( qcd->cdParms, &myHandle, qcd->cdSize);
+ PtrToHand(qcd->cdParms, &myHandle, qcd->cdSize);
}
// restore codecsettings to the quicktime component
@@ -346,26 +343,26 @@ static void QT_CreateMyVideoTrack(int rectx, int recty, ReportList *reports)
trackFrame.bottom = recty;
trackFrame.right = rectx;
- qtexport->theTrack = NewMovieTrack (qtexport->theMovie,
- FixRatio(trackFrame.right,1),
- FixRatio(trackFrame.bottom,1),
- 0);
- CheckError( GetMoviesError(), "NewMovieTrack error", reports );
+ qtexport->theTrack = NewMovieTrack (qtexport->theMovie,
+ FixRatio(trackFrame.right, 1),
+ FixRatio(trackFrame.bottom, 1),
+ 0);
+ CheckError(GetMoviesError(), "NewMovieTrack error", reports);
-// SetIdentityMatrix(&myMatrix);
-// ScaleMatrix(&myMatrix, fixed1, Long2Fix(-1), 0, 0);
-// TranslateMatrix(&myMatrix, 0, Long2Fix(trackFrame.bottom));
-// SetMovieMatrix(qtexport->theMovie, &myMatrix);
+ // SetIdentityMatrix(&myMatrix);
+ // ScaleMatrix(&myMatrix, fixed1, Long2Fix(-1), 0, 0);
+ // TranslateMatrix(&myMatrix, 0, Long2Fix(trackFrame.bottom));
+ // SetMovieMatrix(qtexport->theMovie, &myMatrix);
qtexport->theMedia = NewTrackMedia (qtexport->theTrack,
- VideoMediaType,
- qtdata->kVideoTimeScale,
- nil,
- 0);
- CheckError( GetMoviesError(), "NewTrackMedia error", reports );
+ VideoMediaType,
+ qtdata->kVideoTimeScale,
+ nil,
+ 0);
+ CheckError(GetMoviesError(), "NewTrackMedia error", reports);
err = BeginMediaEdits (qtexport->theMedia);
- CheckError( err, "BeginMediaEdits error", reports );
+ CheckError(err, "BeginMediaEdits error", reports);
QT_StartAddVideoSamplesToMedia (&trackFrame, rectx, recty, reports);
}
@@ -378,14 +375,14 @@ static void QT_EndCreateMyVideoTrack(ReportList *reports)
QT_EndAddVideoSamplesToMedia ();
err = EndMediaEdits (qtexport->theMedia);
- CheckError( err, "EndMediaEdits error", reports );
+ CheckError(err, "EndMediaEdits error", reports);
err = InsertMediaIntoTrack (qtexport->theTrack,
- kTrackStart,/* track start time */
- kMediaStart,/* media start time */
- GetMediaDuration (qtexport->theMedia),
- fixed1);
- CheckError( err, "InsertMediaIntoTrack error", reports );
+ kTrackStart, /* track start time */
+ kMediaStart, /* media start time */
+ GetMediaDuration (qtexport->theMedia),
+ fixed1);
+ CheckError(err, "InsertMediaIntoTrack error", reports);
}
@@ -515,7 +512,7 @@ void filepath_qt(char *string, RenderData *rd)
BLI_make_existing_file(string);
if (BLI_strcasecmp(string + strlen(string) - 4, ".mov")) {
- sprintf(txt, "%04d-%04d.mov", (rd->sfra) , (rd->efra) );
+ sprintf(txt, "%04d-%04d.mov", (rd->sfra), (rd->efra));
strcat(string, txt);
}
}
@@ -684,7 +681,7 @@ static void check_renderbutton_framerate(RenderData *rd, ReportList *reports)
}
err = SCSetInfo(qtdata->theComponent, scTemporalSettingsType, &qtdata->gTemporalSettings);
- CheckError( err, "SCSetInfo error", reports );
+ CheckError(err, "SCSetInfo error", reports);
if (qtdata->gTemporalSettings.frameRate == 1571553) { // 23.98 fps
qtdata->kVideoTimeScale = 24000;
diff --git a/source/blender/quicktime/apple/quicktime_import.c b/source/blender/quicktime/apple/quicktime_import.c
index a1f35935877..3e4e53418ac 100644
--- a/source/blender/quicktime/apple/quicktime_import.c
+++ b/source/blender/quicktime/apple/quicktime_import.c
@@ -1,10 +1,6 @@
/*
- *
- * quicktime_import.c
- *
- * Code to use Quicktime to load images/movies as texture.
- *
* ***** BEGIN GPL LICENSE BLOCK *****
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
@@ -29,6 +25,8 @@
/** \file blender/quicktime/apple/quicktime_import.c
* \ingroup quicktime
+ *
+ * Code to use Quicktime to load images/movies as texture.
*/
#ifdef WITH_QUICKTIME
@@ -176,7 +174,7 @@ char *get_valid_qtname(char *name)
#endif /* _WIN32 */
-int anim_is_quicktime (const char *name)
+int anim_is_quicktime(const char *name)
{
FSSpec theFSSpec;
char theFullPath[255];
@@ -195,16 +193,19 @@ int anim_is_quicktime (const char *name)
// don't let quicktime movie import handle these
if ( BLI_testextensie(name, ".swf") ||
- BLI_testextensie(name, ".txt") ||
- BLI_testextensie(name, ".mpg") ||
- BLI_testextensie(name, ".avi") || // wouldnt be appropriate ;)
- BLI_testextensie(name, ".tga") ||
- BLI_testextensie(name, ".png") ||
- BLI_testextensie(name, ".bmp") ||
- BLI_testextensie(name, ".jpg") ||
- BLI_testextensie(name, ".wav") ||
- BLI_testextensie(name, ".zip") ||
- BLI_testextensie(name, ".mp3")) return 0;
+ BLI_testextensie(name, ".txt") ||
+ BLI_testextensie(name, ".mpg") ||
+ BLI_testextensie(name, ".avi") || // wouldnt be appropriate ;)
+ BLI_testextensie(name, ".tga") ||
+ BLI_testextensie(name, ".png") ||
+ BLI_testextensie(name, ".bmp") ||
+ BLI_testextensie(name, ".jpg") ||
+ BLI_testextensie(name, ".wav") ||
+ BLI_testextensie(name, ".zip") ||
+ BLI_testextensie(name, ".mp3"))
+ {
+ return 0;
+ }
if (QTIME_DEBUG) printf("qt: checking as movie: %s\n", name);
@@ -252,7 +253,7 @@ int anim_is_quicktime (const char *name)
}
-void free_anim_quicktime (struct anim *anim)
+void free_anim_quicktime(struct anim *anim)
{
if (anim == NULL) return;
if (anim->qtime == NULL) return;
@@ -260,12 +261,12 @@ void free_anim_quicktime (struct anim *anim)
UnlockPixels(anim->qtime->offscreenPixMap);
if (anim->qtime->have_gw)
- DisposeGWorld( anim->qtime->offscreenGWorld );
+ DisposeGWorld(anim->qtime->offscreenGWorld);
if (anim->qtime->ibuf)
IMB_freeImBuf(anim->qtime->ibuf);
- DisposeMovie( anim->qtime->movie );
- CloseMovieFile( anim->qtime->movieRefNum );
+ DisposeMovie(anim->qtime->movie);
+ CloseMovieFile(anim->qtime->movieRefNum);
if (anim->qtime->frameIndex) MEM_freeN (anim->qtime->frameIndex);
if (anim->qtime) MEM_freeN (anim->qtime);
@@ -414,7 +415,7 @@ static int GetFirstVideoMedia(struct anim *anim)
anim->qtime->theMedia = GetTrackMedia(anim->qtime->theTrack);
if (anim->qtime->theMedia)
- GetMediaHandlerDescription(anim->qtime->theMedia,&mediaType, nil, nil);
+ GetMediaHandlerDescription(anim->qtime->theMedia, &mediaType, nil, nil);
if (mediaType == VideoMediaType) return 1;
}
@@ -437,7 +438,7 @@ static short GetFirstVideoTrackPixelDepth(struct anim *anim)
}
-int startquicktime (struct anim *anim)
+int startquicktime(struct anim *anim)
{
FSSpec theFSSpec;
@@ -451,7 +452,7 @@ int startquicktime (struct anim *anim)
#endif
short depth = 0;
- anim->qtime = MEM_callocN (sizeof(QuicktimeMovie),"animqt");
+ anim->qtime = MEM_callocN (sizeof(QuicktimeMovie), "animqt");
anim->qtime->have_gw = FALSE;
if (anim->qtime == NULL) {
@@ -582,13 +583,16 @@ int imb_is_a_quicktime (char *name)
if (QTIME_DEBUG) printf("qt: checking as image %s\n", name);
// don't let quicktime image import handle these
- if ( BLI_testextensie(name, ".swf") ||
- BLI_testextensie(name, ".txt") ||
- BLI_testextensie(name, ".mpg") ||
- BLI_testextensie(name, ".wav") ||
- BLI_testextensie(name, ".mov") || // not as image, doesn't work
- BLI_testextensie(name, ".avi") ||
- BLI_testextensie(name, ".mp3")) return 0;
+ if (BLI_testextensie(name, ".swf") ||
+ BLI_testextensie(name, ".txt") ||
+ BLI_testextensie(name, ".mpg") ||
+ BLI_testextensie(name, ".wav") ||
+ BLI_testextensie(name, ".mov") || // not as image, doesn't work
+ BLI_testextensie(name, ".avi") ||
+ BLI_testextensie(name, ".mp3"))
+ {
+ return 0;
+ }
sprintf(theFullPath, "%s", name);
#ifdef __APPLE__
diff --git a/source/blender/render/extern/include/RE_pipeline.h b/source/blender/render/extern/include/RE_pipeline.h
index 315995475e9..2a3c8e60638 100644
--- a/source/blender/render/extern/include/RE_pipeline.h
+++ b/source/blender/render/extern/include/RE_pipeline.h
@@ -82,7 +82,7 @@ typedef struct RenderLayer {
/* copy of RenderData */
char name[RE_MAXNAME];
- unsigned int lay, lay_zmask;
+ unsigned int lay, lay_zmask, lay_exclude;
int layflag, passflag, pass_xor;
struct Material *mat_override;
diff --git a/source/blender/render/intern/include/gammaCorrectionTables.h b/source/blender/render/intern/include/gammaCorrectionTables.h
index 0df4248612b..68bb15f7f4c 100644
--- a/source/blender/render/intern/include/gammaCorrectionTables.h
+++ b/source/blender/render/intern/include/gammaCorrectionTables.h
@@ -1,7 +1,4 @@
/*
- * gammacorrectiontables.h
- *
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -28,14 +25,13 @@
* ***** END GPL LICENSE BLOCK *****
*/
+#ifndef __GAMMACORRECTIONTABLES_H__
+#define __GAMMACORRECTIONTABLES_H__
+
/** \file blender/render/intern/include/gammaCorrectionTables.h
* \ingroup render
*/
-
-#ifndef __GAMMACORRECTIONTABLES_H__
-#define __GAMMACORRECTIONTABLES_H__
-
/**
* Initialize the gamma lookup tables
*/
diff --git a/source/blender/render/intern/include/initrender.h b/source/blender/render/intern/include/initrender.h
index d206b157948..7917fd66cfa 100644
--- a/source/blender/render/intern/include/initrender.h
+++ b/source/blender/render/intern/include/initrender.h
@@ -1,7 +1,4 @@
/*
- * initrender_ext.h
- *
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/render/intern/include/occlusion.h b/source/blender/render/intern/include/occlusion.h
index 78a1f8a1175..2f3ac2a7bff 100644
--- a/source/blender/render/intern/include/occlusion.h
+++ b/source/blender/render/intern/include/occlusion.h
@@ -1,5 +1,4 @@
-/*
- *
+/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/render/intern/include/render_types.h b/source/blender/render/intern/include/render_types.h
index 74255560025..f84b00451a6 100644
--- a/source/blender/render/intern/include/render_types.h
+++ b/source/blender/render/intern/include/render_types.h
@@ -525,13 +525,13 @@ typedef struct LampRen {
float shdwr, shdwg, shdwb;
float energy, haint;
int lay;
- float spotsi,spotbl;
+ float spotsi, spotbl;
float vec[3];
float xsp, ysp, distkw, inpr;
float halokw, halo;
short falloff_type;
- float ld1,ld2;
+ float ld1, ld2;
struct CurveMapping *curfalloff;
/* copied from Lamp, to decouple more rendering stuff */
diff --git a/source/blender/render/intern/include/rendercore.h b/source/blender/render/intern/include/rendercore.h
index 3585f243448..a66165d4680 100644
--- a/source/blender/render/intern/include/rendercore.h
+++ b/source/blender/render/intern/include/rendercore.h
@@ -1,7 +1,4 @@
/*
- * rendercore_ext.h
- *
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -28,14 +25,13 @@
* ***** END GPL LICENSE BLOCK *****
*/
+#ifndef __RENDERCORE_H__
+#define __RENDERCORE_H__
+
/** \file blender/render/intern/include/rendercore.h
* \ingroup render
*/
-
-#ifndef __RENDERCORE_H__
-#define __RENDERCORE_H__
-
#include "render_types.h"
diff --git a/source/blender/render/intern/include/shadbuf.h b/source/blender/render/intern/include/shadbuf.h
index 4b3595a009f..5cde8e5106a 100644
--- a/source/blender/render/intern/include/shadbuf.h
+++ b/source/blender/render/intern/include/shadbuf.h
@@ -1,7 +1,4 @@
/*
- * shadbuf_ext.h
- *
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -28,14 +25,13 @@
* ***** END GPL LICENSE BLOCK *****
*/
+#ifndef __SHADBUF_H__
+#define __SHADBUF_H__
+
/** \file blender/render/intern/include/shadbuf.h
* \ingroup render
*/
-
-#ifndef __SHADBUF_H__
-#define __SHADBUF_H__
-
#include "render_types.h"
struct ObjectRen;
diff --git a/source/blender/render/intern/include/strand.h b/source/blender/render/intern/include/strand.h
index 5094b646807..7482b4d10ee 100644
--- a/source/blender/render/intern/include/strand.h
+++ b/source/blender/render/intern/include/strand.h
@@ -101,7 +101,7 @@ void free_strand_surface(struct Render *re);
struct StrandShadeCache *strand_shade_cache_create(void);
void strand_shade_cache_free(struct StrandShadeCache *cache);
void strand_shade_segment(struct Render *re, struct StrandShadeCache *cache, struct StrandSegment *sseg, struct ShadeSample *ssamp, float t, float s, int addpassflag);
-void strand_shade_unref(struct StrandShadeCache *cache, struct StrandVert *svert);
+void strand_shade_unref(struct StrandShadeCache *cache, struct ObjectInstanceRen *obi, struct StrandVert *svert);
#endif
diff --git a/source/blender/render/intern/include/sunsky.h b/source/blender/render/intern/include/sunsky.h
index 6a41517b113..0afd9246150 100644
--- a/source/blender/render/intern/include/sunsky.h
+++ b/source/blender/render/intern/include/sunsky.h
@@ -73,7 +73,7 @@ typedef struct SunSky
} SunSky;
void InitSunSky(struct SunSky *sunsky, float turb, float *toSun, float horizon_brightness,
- float spread,float sun_brightness, float sun_size, float back_scatter,
+ float spread, float sun_brightness, float sun_size, float back_scatter,
float skyblendfac, short skyblendtype, float sky_exposure, float sky_colorspace);
void GetSkyXYZRadiance(struct SunSky *sunsky, float theta, float phi, float color_out[3]);
diff --git a/source/blender/render/intern/include/texture.h b/source/blender/render/intern/include/texture.h
index e5013ace1f0..33717d47c82 100644
--- a/source/blender/render/intern/include/texture.h
+++ b/source/blender/render/intern/include/texture.h
@@ -1,7 +1,4 @@
/*
- * texture_ext.h
- *
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -57,8 +54,6 @@
&texres->tr, &texres->tg, &texres->tb); \
} \
-#define RGBTOBW(r,g,b) ( r*0.35f + g*0.45f + b*0.2f ) /* keep this in sync with gpu_shader_material.glsl:rgbtobw */
-
struct HaloRen;
struct ShadeInput;
struct TexResult;
diff --git a/source/blender/render/intern/raytrace/bvh.h b/source/blender/render/intern/raytrace/bvh.h
index ac86a65ff0b..c38d9b1dcb4 100644
--- a/source/blender/render/intern/raytrace/bvh.h
+++ b/source/blender/render/intern/raytrace/bvh.h
@@ -88,9 +88,9 @@ static int rayobject_bb_intersect_test(const Isect *isec, const float *_bb)
RE_RC_COUNT(isec->raycounter->bb.test);
- if(t1x > t2y || t2x < t1y || t1x > t2z || t2x < t1z || t1y > t2z || t2y < t1z) return 0;
- if(t2x < 0.0 || t2y < 0.0 || t2z < 0.0) return 0;
- if(t1x > isec->dist || t1y > isec->dist || t1z > isec->dist) return 0;
+ if (t1x > t2y || t2x < t1y || t1x > t2z || t2x < t1z || t1y > t2z || t2y < t1z) return 0;
+ if (t2x < 0.0 || t2y < 0.0 || t2z < 0.0) return 0;
+ if (t1x > isec->dist || t1y > isec->dist || t1z > isec->dist) return 0;
RE_RC_COUNT(isec->raycounter->bb.hit);
return 1;
@@ -99,7 +99,7 @@ static int rayobject_bb_intersect_test(const Isect *isec, const float *_bb)
/* bvh tree generics */
template<class Tree> static void bvh_add(Tree *obj, RayObject *ob)
{
- rtbuild_add( obj->builder, ob );
+ rtbuild_add(obj->builder, ob);
}
template<class Node>
@@ -113,10 +113,10 @@ template<class Tree> static void bvh_done(Tree *obj);
template<class Tree>
static void bvh_free(Tree *obj)
{
- if(obj->builder)
+ if (obj->builder)
rtbuild_free(obj->builder);
- if(obj->node_arena)
+ if (obj->node_arena)
BLI_memarena_free(obj->node_arena);
MEM_freeN(obj);
@@ -125,7 +125,7 @@ static void bvh_free(Tree *obj)
template<class Tree>
static void bvh_bb(Tree *obj, float *min, float *max)
{
- if(obj->root)
+ if (obj->root)
bvh_node_merge_bb(obj->root, min, max);
}
@@ -149,13 +149,11 @@ template<class Node> static inline int bvh_node_hit_test(Node *node, Isect *isec
template<class Node>
static inline void bvh_node_merge_bb(Node *node, float *min, float *max)
{
- if(is_leaf(node))
- {
- RE_rayobject_merge_bb( (RayObject*)node, min, max);
+ if (is_leaf(node)) {
+ RE_rayobject_merge_bb((RayObject *)node, min, max);
}
- else
- {
- DO_MIN(node->bb , min);
+ else {
+ DO_MIN(node->bb, min);
DO_MAX(node->bb+3, max);
}
}
@@ -167,32 +165,28 @@ static inline void bvh_node_merge_bb(Node *node, float *min, float *max)
*/
template<class Node> static inline void bvh_node_push_childs(Node *node, Isect *isec, Node **stack, int &stack_pos);
-template<class Node,int MAX_STACK_SIZE,bool TEST_ROOT,bool SHADOW>
+template<class Node, int MAX_STACK_SIZE, bool TEST_ROOT, bool SHADOW>
static int bvh_node_stack_raycast(Node *root, Isect *isec)
{
Node *stack[MAX_STACK_SIZE];
int hit = 0, stack_pos = 0;
- if(!TEST_ROOT && !is_leaf(root))
+ if (!TEST_ROOT && !is_leaf(root))
bvh_node_push_childs(root, isec, stack, stack_pos);
else
stack[stack_pos++] = root;
- while(stack_pos)
- {
+ while (stack_pos) {
Node *node = stack[--stack_pos];
- if(!is_leaf(node))
- {
- if(bvh_node_hit_test(node,isec))
- {
+ if (!is_leaf(node)) {
+ if (bvh_node_hit_test(node, isec)) {
bvh_node_push_childs(node, isec, stack, stack_pos);
assert(stack_pos <= MAX_STACK_SIZE);
}
}
- else
- {
+ else {
hit |= RE_rayobject_intersect( (RayObject*)node, isec);
- if(SHADOW && hit) return hit;
+ if (SHADOW && hit) return hit;
}
}
return hit;
@@ -205,18 +199,16 @@ static int bvh_node_stack_raycast(Node *root, Isect *isec)
* this was created to be able to use any simd (with the cost of some memmoves)
* it can take advantage of any SIMD width and doens't needs any special tree care
*/
-template<class Node,int MAX_STACK_SIZE,bool TEST_ROOT>
+template<class Node, int MAX_STACK_SIZE, bool TEST_ROOT>
static int bvh_node_stack_raycast_simd(Node *root, Isect *isec)
{
Node *stack[MAX_STACK_SIZE];
int hit = 0, stack_pos = 0;
- if(!TEST_ROOT)
- {
- if(!is_leaf(root))
- {
- if(!is_leaf(root->child))
+ if (!TEST_ROOT) {
+ if (!is_leaf(root)) {
+ if (!is_leaf(root->child))
bvh_node_push_childs(root, isec, stack, stack_pos);
else
return RE_rayobject_intersect( (RayObject*)root->child, isec);
@@ -224,19 +216,16 @@ static int bvh_node_stack_raycast_simd(Node *root, Isect *isec)
else
return RE_rayobject_intersect( (RayObject*)root, isec);
}
- else
- {
- if(!is_leaf(root))
+ else {
+ if (!is_leaf(root))
stack[stack_pos++] = root;
else
return RE_rayobject_intersect( (RayObject*)root, isec);
}
- while(true)
- {
+ while (true) {
//Use SIMD 4
- if(stack_pos >= 4)
- {
+ if (stack_pos >= 4) {
__m128 t_bb[6];
Node * t_node[4];
@@ -253,20 +242,20 @@ static int bvh_node_stack_raycast_simd(Node *root, Isect *isec)
const float *bb2 = stack[stack_pos+2]->bb;
const float *bb3 = stack[stack_pos+3]->bb;
- const __m128 x0y0x1y1 = _mm_shuffle_ps( _mm_load_ps(bb0), _mm_load_ps(bb1), _MM_SHUFFLE(1,0,1,0) );
- const __m128 x2y2x3y3 = _mm_shuffle_ps( _mm_load_ps(bb2), _mm_load_ps(bb3), _MM_SHUFFLE(1,0,1,0) );
- t_bb[0] = _mm_shuffle_ps( x0y0x1y1, x2y2x3y3, _MM_SHUFFLE(2,0,2,0) );
- t_bb[1] = _mm_shuffle_ps( x0y0x1y1, x2y2x3y3, _MM_SHUFFLE(3,1,3,1) );
-
- const __m128 z0X0z1X1 = _mm_shuffle_ps( _mm_load_ps(bb0), _mm_load_ps(bb1), _MM_SHUFFLE(3,2,3,2) );
- const __m128 z2X2z3X3 = _mm_shuffle_ps( _mm_load_ps(bb2), _mm_load_ps(bb3), _MM_SHUFFLE(3,2,3,2) );
- t_bb[2] = _mm_shuffle_ps( z0X0z1X1, z2X2z3X3, _MM_SHUFFLE(2,0,2,0) );
- t_bb[3] = _mm_shuffle_ps( z0X0z1X1, z2X2z3X3, _MM_SHUFFLE(3,1,3,1) );
-
- const __m128 Y0Z0Y1Z1 = _mm_shuffle_ps( _mm_load_ps(bb0+4), _mm_load_ps(bb1+4), _MM_SHUFFLE(1,0,1,0) );
- const __m128 Y2Z2Y3Z3 = _mm_shuffle_ps( _mm_load_ps(bb2+4), _mm_load_ps(bb3+4), _MM_SHUFFLE(1,0,1,0) );
- t_bb[4] = _mm_shuffle_ps( Y0Z0Y1Z1, Y2Z2Y3Z3, _MM_SHUFFLE(2,0,2,0) );
- t_bb[5] = _mm_shuffle_ps( Y0Z0Y1Z1, Y2Z2Y3Z3, _MM_SHUFFLE(3,1,3,1) );
+ const __m128 x0y0x1y1 = _mm_shuffle_ps( _mm_load_ps(bb0), _mm_load_ps(bb1), _MM_SHUFFLE(1, 0, 1, 0) );
+ const __m128 x2y2x3y3 = _mm_shuffle_ps( _mm_load_ps(bb2), _mm_load_ps(bb3), _MM_SHUFFLE(1, 0, 1, 0) );
+ t_bb[0] = _mm_shuffle_ps( x0y0x1y1, x2y2x3y3, _MM_SHUFFLE(2, 0, 2, 0) );
+ t_bb[1] = _mm_shuffle_ps( x0y0x1y1, x2y2x3y3, _MM_SHUFFLE(3, 1, 3, 1) );
+
+ const __m128 z0X0z1X1 = _mm_shuffle_ps( _mm_load_ps(bb0), _mm_load_ps(bb1), _MM_SHUFFLE(3, 2, 3, 2) );
+ const __m128 z2X2z3X3 = _mm_shuffle_ps( _mm_load_ps(bb2), _mm_load_ps(bb3), _MM_SHUFFLE(3, 2, 3, 2) );
+ t_bb[2] = _mm_shuffle_ps( z0X0z1X1, z2X2z3X3, _MM_SHUFFLE(2, 0, 2, 0) );
+ t_bb[3] = _mm_shuffle_ps( z0X0z1X1, z2X2z3X3, _MM_SHUFFLE(3, 1, 3, 1) );
+
+ const __m128 Y0Z0Y1Z1 = _mm_shuffle_ps( _mm_load_ps(bb0+4), _mm_load_ps(bb1+4), _MM_SHUFFLE(1, 0, 1, 0) );
+ const __m128 Y2Z2Y3Z3 = _mm_shuffle_ps( _mm_load_ps(bb2+4), _mm_load_ps(bb3+4), _MM_SHUFFLE(1, 0, 1, 0) );
+ t_bb[4] = _mm_shuffle_ps( Y0Z0Y1Z1, Y2Z2Y3Z3, _MM_SHUFFLE(2, 0, 2, 0) );
+ t_bb[5] = _mm_shuffle_ps( Y0Z0Y1Z1, Y2Z2Y3Z3, _MM_SHUFFLE(3, 1, 3, 1) );
#if 0
for(int i=0; i<4; i++)
{
@@ -286,41 +275,33 @@ static int bvh_node_stack_raycast_simd(Node *root, Isect *isec)
RE_RC_COUNT(isec->raycounter->simd_bb.test);
int res = test_bb_group4( t_bb, isec );
- for(int i=0; i<4; i++)
- if(res & (1<<i))
- {
+ for (int i = 0; i < 4; i++)
+ if (res & (1 << i)) {
RE_RC_COUNT(isec->raycounter->simd_bb.hit);
- if(!is_leaf(t_node[i]))
- {
- for(Node *t=t_node[i]; t; t=t->sibling)
- {
+ if (!is_leaf(t_node[i])) {
+ for (Node *t = t_node[i]; t; t = t->sibling) {
assert(stack_pos < MAX_STACK_SIZE);
stack[stack_pos++] = t;
}
}
- else
- {
+ else {
hit |= RE_rayobject_intersect( (RayObject*)t_node[i], isec);
- if(hit && isec->mode == RE_RAY_SHADOW) return hit;
+ if (hit && isec->mode == RE_RAY_SHADOW) return hit;
}
}
}
- else if(stack_pos > 0)
- {
+ else if (stack_pos > 0) {
Node *node = stack[--stack_pos];
assert(!is_leaf(node));
- if(bvh_node_hit_test(node,isec))
- {
- if(!is_leaf(node->child))
- {
+ if (bvh_node_hit_test(node, isec)) {
+ if (!is_leaf(node->child)) {
bvh_node_push_childs(node, isec, stack, stack_pos);
assert(stack_pos <= MAX_STACK_SIZE);
}
- else
- {
+ else {
hit |= RE_rayobject_intersect( (RayObject*)node->child, isec);
- if(hit && isec->mode == RE_RAY_SHADOW) return hit;
+ if (hit && isec->mode == RE_RAY_SHADOW) return hit;
}
}
}
@@ -338,41 +319,41 @@ template<class Node>
static int bvh_node_raycast(Node *node, Isect *isec)
{
int hit = 0;
- if(bvh_test_node(node, isec))
+ if (bvh_test_node(node, isec))
{
- if(isec->idot_axis[node->split_axis] > 0.0f)
+ if (isec->idot_axis[node->split_axis] > 0.0f)
{
int i;
for(i=0; i<BVH_NCHILDS; i++)
- if(!is_leaf(node->child[i]))
+ if (!is_leaf(node->child[i]))
{
- if(node->child[i] == 0) break;
+ if (node->child[i] == 0) break;
hit |= bvh_node_raycast(node->child[i], isec);
- if(hit && isec->mode == RE_RAY_SHADOW) return hit;
+ if (hit && isec->mode == RE_RAY_SHADOW) return hit;
}
else
{
hit |= RE_rayobject_intersect( (RayObject*)node->child[i], isec);
- if(hit && isec->mode == RE_RAY_SHADOW) return hit;
+ if (hit && isec->mode == RE_RAY_SHADOW) return hit;
}
}
else
{
int i;
for(i=BVH_NCHILDS-1; i>=0; i--)
- if(!is_leaf(node->child[i]))
+ if (!is_leaf(node->child[i]))
{
- if(node->child[i])
+ if (node->child[i])
{
hit |= dfs_raycast(node->child[i], isec);
- if(hit && isec->mode == RE_RAY_SHADOW) return hit;
+ if (hit && isec->mode == RE_RAY_SHADOW) return hit;
}
}
else
{
hit |= RE_rayobject_intersect( (RayObject*)node->child[i], isec);
- if(hit && isec->mode == RE_RAY_SHADOW) return hit;
+ if (hit && isec->mode == RE_RAY_SHADOW) return hit;
}
}
}
@@ -380,33 +361,27 @@ static int bvh_node_raycast(Node *node, Isect *isec)
}
#endif
-template<class Node,class HintObject>
+template<class Node, class HintObject>
void bvh_dfs_make_hint(Node *node, LCTSHint *hint, int reserve_space, HintObject *hintObject)
{
- assert( hint->size + reserve_space + 1 <= RE_RAY_LCTS_MAX_SIZE );
+ assert(hint->size + reserve_space + 1 <= RE_RAY_LCTS_MAX_SIZE);
- if(is_leaf(node))
- {
+ if (is_leaf(node)) {
hint->stack[hint->size++] = (RayObject*)node;
}
- else
- {
+ else {
int childs = count_childs(node);
- if(hint->size + reserve_space + childs <= RE_RAY_LCTS_MAX_SIZE)
- {
+ if (hint->size + reserve_space + childs <= RE_RAY_LCTS_MAX_SIZE) {
int result = hint_test_bb(hintObject, node->bb, node->bb+3);
- if(result == HINT_RECURSE)
- {
+ if (result == HINT_RECURSE) {
/* We are 100% sure the ray will be pass inside this node */
bvh_dfs_make_hint_push_siblings(node->child, hint, reserve_space, hintObject);
}
- else if(result == HINT_ACCEPT)
- {
+ else if (result == HINT_ACCEPT) {
hint->stack[hint->size++] = (RayObject*)node;
}
}
- else
- {
+ else {
hint->stack[hint->size++] = (RayObject*)node;
}
}
@@ -421,7 +396,7 @@ template<class Tree, int DFS_STACK_SIZE>
static inline RayObject *bvh_create_tree(int size)
{
Tree *obj= (Tree*)MEM_callocN(sizeof(Tree), "BVHTree" );
- assert( RE_rayobject_isAligned(obj) ); /* RayObject API assumes real data to be 4-byte aligned */
+ assert(RE_rayobject_isAligned(obj)); /* RayObject API assumes real data to be 4-byte aligned */
obj->rayobj.api = bvh_get_api<Tree>(DFS_STACK_SIZE);
obj->root = NULL;
diff --git a/source/blender/render/intern/raytrace/rayobject.cpp b/source/blender/render/intern/raytrace/rayobject.cpp
index b2f85e8429d..ac29d9e78ee 100644
--- a/source/blender/render/intern/raytrace/rayobject.cpp
+++ b/source/blender/render/intern/raytrace/rayobject.cpp
@@ -60,13 +60,11 @@ MALWAYS_INLINE RayObject* rayface_from_coords(RayFace *rayface, void *ob, void *
copy_v3_v3(rayface->v2, v2);
copy_v3_v3(rayface->v3, v3);
- if (v4)
- {
+ if (v4) {
copy_v3_v3(rayface->v4, v4);
rayface->quad = 1;
}
- else
- {
+ else {
rayface->quad = 0;
}
@@ -77,8 +75,7 @@ MALWAYS_INLINE void rayface_from_vlak(RayFace *rayface, ObjectInstanceRen *obi,
{
rayface_from_coords(rayface, obi, vlr, vlr->v1->co, vlr->v2->co, vlr->v3->co, vlr->v4 ? vlr->v4->co : NULL);
- if (obi->transform_primitives)
- {
+ if (obi->transform_primitives) {
mul_m4_v3(obi->mat, rayface->v1);
mul_m4_v3(obi->mat, rayface->v2);
mul_m4_v3(obi->mat, rayface->v3);
@@ -130,7 +127,7 @@ MALWAYS_INLINE int vlr_check_intersect_solid(Isect *UNUSED(is), ObjectInstanceRe
MALWAYS_INLINE int vlr_check_bake(Isect *is, ObjectInstanceRen* obi, VlakRen *UNUSED(vlr))
{
- return (obi->obr->ob != is->userdata);
+ return (obi->obr->ob != is->userdata) && (obi->obr->ob->flag & SELECT);
}
/* Ray Triangle/Quad Intersection */
@@ -295,13 +292,11 @@ MALWAYS_INLINE int intersect_rayface(RayObject *hit_obj, RayFace *face, Isect *i
return 0;
/* check if we should intersect this face */
- if (is->check == RE_CHECK_VLR_RENDER)
- {
+ if (is->check == RE_CHECK_VLR_RENDER) {
if (vlr_check_intersect(is, (ObjectInstanceRen*)face->ob, (VlakRen*)face->face) == 0)
return 0;
}
- else if (is->check == RE_CHECK_VLR_NON_SOLID_MATERIAL)
- {
+ else if (is->check == RE_CHECK_VLR_NON_SOLID_MATERIAL) {
if (vlr_check_intersect(is, (ObjectInstanceRen*)face->ob, (VlakRen*)face->face) == 0)
return 0;
if (vlr_check_intersect_solid(is, (ObjectInstanceRen*)face->ob, (VlakRen*)face->face) == 0)
@@ -322,27 +317,25 @@ MALWAYS_INLINE int intersect_rayface(RayObject *hit_obj, RayFace *face, Isect *i
/* when a shadow ray leaves a face, it can be little outside the edges
* of it, causing intersection to be detected in its neighbor face */
- if (is->skip & RE_SKIP_VLR_NEIGHBOUR)
- {
- if (dist < 0.1f && is->orig.ob == face->ob)
- {
+ if (is->skip & RE_SKIP_VLR_NEIGHBOUR) {
+ if (dist < 0.1f && is->orig.ob == face->ob) {
VlakRen * a = (VlakRen*)is->orig.face;
VlakRen * b = (VlakRen*)face->face;
/* so there's a shared edge or vertex, let's intersect ray with
* face itself, if that's true we can safely return 1, otherwise
* we assume the intersection is invalid, 0 */
- if (a->v1==b->v1 || a->v2==b->v1 || a->v3==b->v1 || a->v4==b->v1
- || a->v1==b->v2 || a->v2==b->v2 || a->v3==b->v2 || a->v4==b->v2
- || a->v1==b->v3 || a->v2==b->v3 || a->v3==b->v3 || a->v4==b->v3
- || (b->v4 && (a->v1==b->v4 || a->v2==b->v4 || a->v3==b->v4 || a->v4==b->v4))) {
+ if (a->v1==b->v1 || a->v2==b->v1 || a->v3==b->v1 || a->v4==b->v1 ||
+ a->v1==b->v2 || a->v2==b->v2 || a->v3==b->v2 || a->v4==b->v2 ||
+ a->v1==b->v3 || a->v2==b->v3 || a->v3==b->v3 || a->v4==b->v3 ||
+ (b->v4 && (a->v1==b->v4 || a->v2==b->v4 || a->v3==b->v4 || a->v4==b->v4)))
+ {
/* create RayFace from original face, transformed if necessary */
RayFace origface;
ObjectInstanceRen *ob= (ObjectInstanceRen*)is->orig.ob;
rayface_from_vlak(&origface, ob, (VlakRen*)is->orig.face);
- if (!isec_tri_quad_neighbour(is->start, is->dir, &origface))
- {
+ if (!isec_tri_quad_neighbour(is->start, is->dir, &origface)) {
return 0;
}
}
@@ -375,8 +368,7 @@ int RE_rayobject_raycast(RayObject *r, Isect *isec)
RE_RC_COUNT(isec->raycounter->raycast.test);
/* setup vars used on raycast */
- for (i=0; i<3; i++)
- {
+ for (i=0; i<3; i++) {
isec->idot_axis[i] = 1.0f / isec->dir[i];
isec->bv_index[2*i] = isec->idot_axis[i] < 0.0 ? 1 : 0;
@@ -388,12 +380,10 @@ int RE_rayobject_raycast(RayObject *r, Isect *isec)
#ifdef RT_USE_LAST_HIT
/* last hit heuristic */
- if (isec->mode==RE_RAY_SHADOW && isec->last_hit)
- {
+ if (isec->mode==RE_RAY_SHADOW && isec->last_hit) {
RE_RC_COUNT(isec->raycounter->rayshadow_last_hit.test);
- if (RE_rayobject_intersect(isec->last_hit, isec))
- {
+ if (RE_rayobject_intersect(isec->last_hit, isec)) {
RE_RC_COUNT(isec->raycounter->raycast.hit);
RE_RC_COUNT(isec->raycounter->rayshadow_last_hit.hit);
return 1;
@@ -405,8 +395,7 @@ int RE_rayobject_raycast(RayObject *r, Isect *isec)
isec->hit_hint = 0;
#endif
- if (RE_rayobject_intersect(r, isec))
- {
+ if (RE_rayobject_intersect(r, isec)) {
RE_RC_COUNT(isec->raycounter->raycast.hit);
#ifdef RT_USE_HINT
@@ -420,12 +409,10 @@ int RE_rayobject_raycast(RayObject *r, Isect *isec)
int RE_rayobject_intersect(RayObject *r, Isect *i)
{
- if (RE_rayobject_isRayFace(r))
- {
+ if (RE_rayobject_isRayFace(r)) {
return intersect_rayface(r, (RayFace*) RE_rayobject_align(r), i);
}
- else if (RE_rayobject_isVlakPrimitive(r))
- {
+ else if (RE_rayobject_isVlakPrimitive(r)) {
//TODO optimize (useless copy to RayFace to avoid duplicate code)
VlakPrimitive *face = (VlakPrimitive*) RE_rayobject_align(r);
RayFace nface;
@@ -433,8 +420,7 @@ int RE_rayobject_intersect(RayObject *r, Isect *i)
return intersect_rayface(r, &nface, i);
}
- else if (RE_rayobject_isRayAPI(r))
- {
+ else if (RE_rayobject_isRayAPI(r)) {
r = RE_rayobject_align(r);
return r->api->raycast(r, i);
}
@@ -466,12 +452,10 @@ void RE_rayobject_free(RayObject *r)
float RE_rayobject_cost(RayObject *r)
{
- if (RE_rayobject_isRayFace(r) || RE_rayobject_isVlakPrimitive(r))
- {
+ if (RE_rayobject_isRayFace(r) || RE_rayobject_isVlakPrimitive(r)) {
return 1.0f;
}
- else if (RE_rayobject_isRayAPI(r))
- {
+ else if (RE_rayobject_isRayAPI(r)) {
r = RE_rayobject_align(r);
return r->api->cost(r);
}
@@ -485,8 +469,7 @@ float RE_rayobject_cost(RayObject *r)
void RE_rayobject_merge_bb(RayObject *r, float *min, float *max)
{
- if (RE_rayobject_isRayFace(r))
- {
+ if (RE_rayobject_isRayFace(r)) {
RayFace *face = (RayFace*) RE_rayobject_align(r);
DO_MINMAX(face->v1, min, max);
@@ -494,8 +477,7 @@ void RE_rayobject_merge_bb(RayObject *r, float *min, float *max)
DO_MINMAX(face->v3, min, max);
if (RE_rayface_isQuad(face)) DO_MINMAX(face->v4, min, max);
}
- else if (RE_rayobject_isVlakPrimitive(r))
- {
+ else if (RE_rayobject_isVlakPrimitive(r)) {
VlakPrimitive *face = (VlakPrimitive*) RE_rayobject_align(r);
RayFace nface;
rayface_from_vlak(&nface, face->ob, face->face);
@@ -505,8 +487,7 @@ void RE_rayobject_merge_bb(RayObject *r, float *min, float *max)
DO_MINMAX(nface.v3, min, max);
if (RE_rayface_isQuad(&nface)) DO_MINMAX(nface.v4, min, max);
}
- else if (RE_rayobject_isRayAPI(r))
- {
+ else if (RE_rayobject_isRayAPI(r)) {
r = RE_rayobject_align(r);
r->api->bb(r, min, max);
}
@@ -518,12 +499,10 @@ void RE_rayobject_merge_bb(RayObject *r, float *min, float *max)
void RE_rayobject_hint_bb(RayObject *r, RayHint *hint, float *min, float *max)
{
- if (RE_rayobject_isRayFace(r) || RE_rayobject_isVlakPrimitive(r))
- {
+ if (RE_rayobject_isRayFace(r) || RE_rayobject_isVlakPrimitive(r)) {
return;
}
- else if (RE_rayobject_isRayAPI(r))
- {
+ else if (RE_rayobject_isRayAPI(r)) {
r = RE_rayobject_align(r);
return r->api->hint_bb(r, hint, min, max);
}
@@ -543,8 +522,7 @@ int RE_rayobjectcontrol_test_break(RayObjectControl *control)
void RE_rayobject_set_control(RayObject *r, void *data, RE_rayobjectcontrol_test_break_callback test_break)
{
- if (RE_rayobject_isRayAPI(r))
- {
+ if (RE_rayobject_isRayAPI(r)) {
r = RE_rayobject_align(r);
r->control.data = data;
r->control.test_break = test_break;
diff --git a/source/blender/render/intern/raytrace/rayobject_blibvh.cpp b/source/blender/render/intern/raytrace/rayobject_blibvh.cpp
index 165b62cfbe4..8f1b730bf10 100644
--- a/source/blender/render/intern/raytrace/rayobject_blibvh.cpp
+++ b/source/blender/render/intern/raytrace/rayobject_blibvh.cpp
@@ -102,8 +102,7 @@ static void bvh_callback(void *userdata, int index, const BVHTreeRay *UNUSED(ray
Isect *isec = data->isec;
RayObject *face = data->leafs[index];
- if (RE_rayobject_intersect(face,isec))
- {
+ if (RE_rayobject_intersect(face, isec)) {
hit->index = index;
if (isec->mode == RE_RAY_SHADOW)
@@ -137,8 +136,8 @@ static void RE_rayobject_blibvh_add(RayObject *o, RayObject *ob)
INIT_MINMAX(min_max, min_max+3);
RE_rayobject_merge_bb(ob, min_max, min_max+3);
- DO_MIN(min_max , obj->bb[0]);
- DO_MAX(min_max+3, obj->bb[1]);
+ DO_MIN(min_max, obj->bb[0]);
+ DO_MAX(min_max + 3, obj->bb[1]);
BLI_bvhtree_insert(obj->bvh, obj->next_leaf - obj->leafs, min_max, 2);
*(obj->next_leaf++) = ob;
diff --git a/source/blender/render/intern/raytrace/rayobject_hint.h b/source/blender/render/intern/raytrace/rayobject_hint.h
index 3689aa8ac17..37d9edb035d 100644
--- a/source/blender/render/intern/raytrace/rayobject_hint.h
+++ b/source/blender/render/intern/raytrace/rayobject_hint.h
@@ -44,7 +44,7 @@ struct HintBB
inline int hint_test_bb(HintBB *obj, float *Nmin, float *Nmax)
{
- if(bb_fits_inside( Nmin, Nmax, obj->bb, obj->bb+3 ) )
+ if (bb_fits_inside( Nmin, Nmax, obj->bb, obj->bb+3 ) )
return HINT_RECURSE;
else
return HINT_ACCEPT;
diff --git a/source/blender/render/intern/raytrace/rayobject_instance.cpp b/source/blender/render/intern/raytrace/rayobject_instance.cpp
index 2e803ce0fd3..ce88bac1587 100644
--- a/source/blender/render/intern/raytrace/rayobject_instance.cpp
+++ b/source/blender/render/intern/raytrace/rayobject_instance.cpp
@@ -99,8 +99,7 @@ static int RE_rayobject_instance_intersect(RayObject *o, Isect *isec)
int changed = 0, i, res;
// TODO - this is disabling self intersection on instances
- if (isec->orig.ob == obj->ob && obj->ob)
- {
+ if (isec->orig.ob == obj->ob && obj->ob) {
changed = 1;
isec->orig.ob = obj->target_ob;
}
@@ -117,8 +116,7 @@ static int RE_rayobject_instance_intersect(RayObject *o, Isect *isec)
isec->dist *= normalize_v3(isec->dir);
// update idot_axis and bv_index
- for (i=0; i<3; i++)
- {
+ for (i=0; i<3; i++) {
isec->idot_axis[i] = 1.0f / isec->dir[i];
isec->bv_index[2*i] = isec->idot_axis[i] < 0.0 ? 1 : 0;
@@ -132,12 +130,10 @@ static int RE_rayobject_instance_intersect(RayObject *o, Isect *isec)
res = RE_rayobject_intersect(obj->target, isec);
// map dist into original coordinate space
- if (res == 0)
- {
+ if (res == 0) {
isec->dist = dist;
}
- else
- {
+ else {
// note we don't just multiply dist, because of possible
// non-uniform scaling in the transform matrix
float vec[3];
@@ -165,8 +161,7 @@ static int RE_rayobject_instance_intersect(RayObject *o, Isect *isec)
isec->orig.ob = obj->ob;
// restore bv_index
- for (i=0; i<3; i++)
- {
+ for (i=0; i<3; i++) {
isec->bv_index[2*i] = isec->idot_axis[i] < 0.0 ? 1 : 0;
isec->bv_index[2*i+1] = 1 - isec->bv_index[2*i];
@@ -202,8 +197,7 @@ static void RE_rayobject_instance_bb(RayObject *o, float *min, float *max)
RE_rayobject_merge_bb(obj->target, m, M);
//There must be a faster way than rotating all the 8 vertexs of the BB
- for (i=0; i<8; i++)
- {
+ for (i=0; i<8; i++) {
for (j=0; j<3; j++) t[j] = i&(1<<j) ? M[j] : m[j];
mul_m4_v3(obj->target2global, t);
DO_MINMAX(t, min, max);
diff --git a/source/blender/render/intern/raytrace/rayobject_internal.h b/source/blender/render/intern/raytrace/rayobject_internal.h
index 8c8e432b6bd..3f768e5adcb 100644
--- a/source/blender/render/intern/raytrace/rayobject_internal.h
+++ b/source/blender/render/intern/raytrace/rayobject_internal.h
@@ -1,10 +1,37 @@
-/** \file blender/render/intern/raytrace/rayobject_internal.h
- * \ingroup render
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2009 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): André Pinto.
+ *
+ * ***** END GPL LICENSE BLOCK *****
*/
#ifndef __RAYOBJECT_INTERNAL_H__
#define __RAYOBJECT_INTERNAL_H__
+/** \file blender/render/intern/raytrace/rayobject_internal.h
+ * \ingroup render
+ */
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/source/blender/render/intern/raytrace/rayobject_octree.cpp b/source/blender/render/intern/raytrace/rayobject_octree.cpp
index ea1d5c2573c..dc7b6dd6e8d 100644
--- a/source/blender/render/intern/raytrace/rayobject_octree.cpp
+++ b/source/blender/render/intern/raytrace/rayobject_octree.cpp
@@ -74,7 +74,7 @@ typedef struct Octree {
struct Branch **adrbranch;
struct Node **adrnode;
float ocsize; /* ocsize: mult factor, max size octree */
- float ocfacx,ocfacy,ocfacz;
+ float ocfacx, ocfacy, ocfacz;
float min[3], max[3];
int ocres;
int branchcount, nodecount;
@@ -216,7 +216,7 @@ static Node *addnode(Octree *oc)
index= oc->nodecount>>12;
if (oc->adrnode[index]==NULL)
- oc->adrnode[index]= (Node*)MEM_callocN(4096*sizeof(Node),"addnode");
+ oc->adrnode[index]= (Node*)MEM_callocN(4096*sizeof(Node), "addnode");
if (oc->nodecount> NODE_ARRAY*NODE_ARRAY) {
printf("error; octree nodes full\n");
@@ -233,7 +233,7 @@ static int face_in_node(RayFace *face, short x, short y, short z, float rtf[][3]
// init static vars
if (face) {
- normal_tri_v3( nor,rtf[0], rtf[1], rtf[2]);
+ normal_tri_v3(nor, rtf[0], rtf[1], rtf[2]);
d= -nor[0]*rtf[0][0] - nor[1]*rtf[0][1] - nor[2]*rtf[0][2];
return 0;
}
@@ -297,15 +297,15 @@ static void ocwrite(Octree *oc, RayFace *face, int quad, short x, short y, short
oc4= ((x & 8)+(y & 4)+(z & 2))>>1;
oc5= ((x & 4)+(y & 2)+(z & 1));
- br= addbranch(oc, br,oc0);
- br= addbranch(oc, br,oc1);
- br= addbranch(oc, br,oc2);
- br= addbranch(oc, br,oc3);
- br= addbranch(oc, br,oc4);
+ br= addbranch(oc, br, oc0);
+ br= addbranch(oc, br, oc1);
+ br= addbranch(oc, br, oc2);
+ br= addbranch(oc, br, oc3);
+ br= addbranch(oc, br, oc4);
no= (Node *)br->b[oc5];
if (no==NULL) br->b[oc5]= (Branch *)(no= addnode(oc));
- while(no->next) no= no->next;
+ while (no->next) no = no->next;
a= 0;
if (no->v[7]) { /* node full */
@@ -313,7 +313,7 @@ static void ocwrite(Octree *oc, RayFace *face, int quad, short x, short y, short
no= no->next;
}
else {
- while(no->v[a]!=NULL) a++;
+ while (no->v[a] != NULL) a++;
}
no->v[a]= (RayFace*) RE_rayobject_align(face);
@@ -326,10 +326,10 @@ static void ocwrite(Octree *oc, RayFace *face, int quad, short x, short y, short
static void d2dda(Octree *oc, short b1, short b2, short c1, short c2, char *ocface, short rts[][3], float rtf[][3])
{
- int ocx1,ocx2,ocy1,ocy2;
- int x,y,dx=0,dy=0;
- float ox1,ox2,oy1,oy2;
- float labda,labdao,labdax,labday,ldx,ldy;
+ int ocx1, ocx2, ocy1, ocy2;
+ int x, y, dx=0, dy=0;
+ float ox1, ox2, oy1, oy2;
+ float labda, labdao, labdax, labday, ldx, ldy;
ocx1= rts[b1][c1];
ocy1= rts[b1][c2];
@@ -383,7 +383,7 @@ static void d2dda(Octree *oc, short b1, short b2, short c1, short c2, char *ocfa
x=ocx1; y=ocy1;
labda= MIN2(labdax, labday);
- while(TRUE) {
+ while (TRUE) {
if (x<0 || y<0 || x>=oc->ocres || y>=oc->ocres);
else ocface[oc->ocres*x+y]= 1;
@@ -405,7 +405,7 @@ static void d2dda(Octree *oc, short b1, short b2, short c1, short c2, char *ocfa
y+=dy;
}
}
- labda=MIN2(labdax,labday);
+ labda=MIN2(labdax, labday);
if (labda==labdao) break;
if (labda>=1.0f) break;
}
@@ -421,7 +421,7 @@ static void filltriangle(Octree *oc, short c1, short c2, char *ocface, short *oc
for (y=ocmin[c2];y<=ocmax[c2];y++) {
if (ocface[a+y]) {
y++;
- while(ocface[a+y] && y!=ocmax[c2]) y++;
+ while (ocface[a+y] && y!=ocmax[c2]) y++;
for (y1=ocmax[c2];y1>y;y1--) {
if (ocface[a+y1]) {
for (y2=y;y2<=y1;y2++) ocface[a+y2]=1;
@@ -449,7 +449,7 @@ static void RE_rayobject_octree_free(RayObject *tree)
if (oc->adrbranch) {
int a= 0;
- while(oc->adrbranch[a]) {
+ while (oc->adrbranch[a]) {
MEM_freeN(oc->adrbranch[a]);
oc->adrbranch[a]= NULL;
a++;
@@ -461,7 +461,7 @@ static void RE_rayobject_octree_free(RayObject *tree)
if (oc->adrnode) {
int a= 0;
- while(oc->adrnode[a]) {
+ while (oc->adrnode[a]) {
MEM_freeN(oc->adrnode[a]);
oc->adrnode[a]= NULL;
a++;
@@ -541,13 +541,13 @@ static void octree_fill_rayface(Octree *oc, RayFace *face)
oc2= rts[1][c];
oc3= rts[2][c];
if (!RE_rayface_isQuad(face)) {
- ocmin[c]= MIN3(oc1,oc2,oc3);
- ocmax[c]= MAX3(oc1,oc2,oc3);
+ ocmin[c]= MIN3(oc1, oc2, oc3);
+ ocmax[c]= MAX3(oc1, oc2, oc3);
}
else {
oc4= rts[3][c];
- ocmin[c]= MIN4(oc1,oc2,oc3,oc4);
- ocmax[c]= MAX4(oc1,oc2,oc3,oc4);
+ ocmin[c]= MIN4(oc1, oc2, oc3, oc4);
+ ocmax[c]= MAX4(oc1, oc2, oc3, oc4);
}
if (ocmax[c]>oc->ocres-1) ocmax[c]=oc->ocres-1;
if (ocmin[c]<0) ocmin[c]=0;
@@ -558,32 +558,32 @@ static void octree_fill_rayface(Octree *oc, RayFace *face)
}
else {
- d2dda(oc, 0,1,0,1,ocface+ocres2,rts,rtf);
- d2dda(oc, 0,1,0,2,ocface,rts,rtf);
- d2dda(oc, 0,1,1,2,ocface+2*ocres2,rts,rtf);
- d2dda(oc, 1,2,0,1,ocface+ocres2,rts,rtf);
- d2dda(oc, 1,2,0,2,ocface,rts,rtf);
- d2dda(oc, 1,2,1,2,ocface+2*ocres2,rts,rtf);
+ d2dda(oc, 0, 1, 0, 1, ocface+ocres2, rts, rtf);
+ d2dda(oc, 0, 1, 0, 2, ocface, rts, rtf);
+ d2dda(oc, 0, 1, 1, 2, ocface+2*ocres2, rts, rtf);
+ d2dda(oc, 1, 2, 0, 1, ocface+ocres2, rts, rtf);
+ d2dda(oc, 1, 2, 0, 2, ocface, rts, rtf);
+ d2dda(oc, 1, 2, 1, 2, ocface+2*ocres2, rts, rtf);
if (!RE_rayface_isQuad(face)) {
- d2dda(oc, 2,0,0,1,ocface+ocres2,rts,rtf);
- d2dda(oc, 2,0,0,2,ocface,rts,rtf);
- d2dda(oc, 2,0,1,2,ocface+2*ocres2,rts,rtf);
+ d2dda(oc, 2, 0, 0, 1, ocface+ocres2, rts, rtf);
+ d2dda(oc, 2, 0, 0, 2, ocface, rts, rtf);
+ d2dda(oc, 2, 0, 1, 2, ocface+2*ocres2, rts, rtf);
}
else {
- d2dda(oc, 2,3,0,1,ocface+ocres2,rts,rtf);
- d2dda(oc, 2,3,0,2,ocface,rts,rtf);
- d2dda(oc, 2,3,1,2,ocface+2*ocres2,rts,rtf);
- d2dda(oc, 3,0,0,1,ocface+ocres2,rts,rtf);
- d2dda(oc, 3,0,0,2,ocface,rts,rtf);
- d2dda(oc, 3,0,1,2,ocface+2*ocres2,rts,rtf);
+ d2dda(oc, 2, 3, 0, 1, ocface+ocres2, rts, rtf);
+ d2dda(oc, 2, 3, 0, 2, ocface, rts, rtf);
+ d2dda(oc, 2, 3, 1, 2, ocface+2*ocres2, rts, rtf);
+ d2dda(oc, 3, 0, 0, 1, ocface+ocres2, rts, rtf);
+ d2dda(oc, 3, 0, 0, 2, ocface, rts, rtf);
+ d2dda(oc, 3, 0, 1, 2, ocface+2*ocres2, rts, rtf);
}
/* nothing todo with triangle..., just fills :) */
- filltriangle(oc, 0,1,ocface+ocres2,ocmin,ocmax);
- filltriangle(oc, 0,2,ocface,ocmin,ocmax);
- filltriangle(oc, 1,2,ocface+2*ocres2,ocmin,ocmax);
+ filltriangle(oc, 0, 1, ocface+ocres2, ocmin, ocmax);
+ filltriangle(oc, 0, 2, ocface, ocmin, ocmax);
+ filltriangle(oc, 1, 2, ocface+2*ocres2, ocmin, ocmax);
/* init static vars here */
- face_in_node(face, 0,0,0, rtf);
+ face_in_node(face, 0, 0, 0, rtf);
for (x=ocmin[0];x<=ocmax[0];x++) {
a= oc->ocres*x;
@@ -593,7 +593,7 @@ static void octree_fill_rayface(Octree *oc, RayFace *face)
for (z=ocmin[2];z<=ocmax[2];z++) {
if (ocface[b+z] && ocface[a+z]) {
if (face_in_node(NULL, x, y, z, rtf))
- ocwrite(oc, face, RE_rayface_isQuad(face), x,y,z, rtf);
+ ocwrite(oc, face, RE_rayface_isQuad(face), x, y, z, rtf);
}
}
}
@@ -658,8 +658,7 @@ static void RE_rayobject_octree_done(RayObject *tree)
oc->ocsize= sqrt(t00*t00+t01*t01+t02*t02); /* global, max size octree */
- for (c=0; c<oc->ro_nodes_used; c++)
- {
+ for (c=0; c<oc->ro_nodes_used; c++) {
octree_fill_rayface(oc, oc->ro_nodes[c]);
}
@@ -683,42 +682,41 @@ static void RE_rayobject_octree_bb(RayObject *tree, float *min, float *max)
/* check all faces in this node */
static int testnode(Octree *UNUSED(oc), Isect *is, Node *no, OcVal ocval)
{
- short nr=0;
+ short nr = 0;
/* return on any first hit */
- if (is->mode==RE_RAY_SHADOW) {
+ if (is->mode == RE_RAY_SHADOW) {
- for (; no; no = no->next)
- for (nr=0; nr<8; nr++)
- {
- RayFace *face = no->v[nr];
- OcVal *ov = no->ov+nr;
-
- if (!face) break;
-
- if ( (ov->ocx & ocval.ocx) && (ov->ocy & ocval.ocy) && (ov->ocz & ocval.ocz) )
- {
- if ( RE_rayobject_intersect( RE_rayobject_unalignRayFace(face),is) )
- return 1;
+ for ( ; no; no = no->next) {
+ for (nr = 0; nr < 8; nr++) {
+ RayFace *face = no->v[nr];
+ OcVal *ov = no->ov + nr;
+
+ if (!face) break;
+
+ if ( (ov->ocx & ocval.ocx) && (ov->ocy & ocval.ocy) && (ov->ocz & ocval.ocz) ) {
+ if ( RE_rayobject_intersect( RE_rayobject_unalignRayFace(face), is) )
+ return 1;
+ }
}
}
}
- else
- { /* else mirror or glass or shadowtra, return closest face */
+ else {
+ /* else mirror or glass or shadowtra, return closest face */
int found= 0;
- for (; no; no = no->next)
- for (nr=0; nr<8; nr++)
- {
- RayFace *face = no->v[nr];
- OcVal *ov = no->ov+nr;
-
- if (!face) break;
-
- if ( (ov->ocx & ocval.ocx) && (ov->ocy & ocval.ocy) && (ov->ocz & ocval.ocz) )
- {
- if ( RE_rayobject_intersect( RE_rayobject_unalignRayFace(face),is) )
- found= 1;
+ for ( ; no; no = no->next) {
+ for (nr = 0; nr < 8; nr++) {
+ RayFace *face = no->v[nr];
+ OcVal *ov = no->ov + nr;
+
+ if (!face) break;
+
+ if ( (ov->ocx & ocval.ocx) && (ov->ocy & ocval.ocy) && (ov->ocz & ocval.ocz) ) {
+ if ( RE_rayobject_intersect( RE_rayobject_unalignRayFace(face), is) ) {
+ found = 1;
+ }
+ }
}
}
@@ -851,12 +849,12 @@ static int RE_rayobject_octree_intersect(RayObject *tree, Isect *is)
Node *no;
OcVal ocval;
float vec1[3], vec2[3], start[3], end[3];
- float u1,u2,ox1,ox2,oy1,oy2,oz1,oz2;
- float labdao,labdax,ldx,labday,ldy,labdaz,ldz, ddalabda;
+ float u1, u2, ox1, ox2, oy1, oy2, oz1, oz2;
+ float labdao, labdax, ldx, labday, ldy, labdaz, ldz, ddalabda;
float olabda = 0;
- int dx,dy,dz;
- int xo,yo,zo,c1=0;
- int ocx1,ocx2,ocy1, ocy2,ocz1,ocz2;
+ int dx, dy, dz;
+ int xo, yo, zo, c1=0;
+ int ocx1, ocx2, ocy1, ocy2, ocz1, ocz2;
/* clip with octree */
if (oc->branchcount==0) return 0;
@@ -877,14 +875,14 @@ static int RE_rayobject_octree_intersect(RayObject *tree, Isect *is)
u2= 1.0f;
/* clip with octree cube */
- if (cliptest(-ldx, start[0]-oc->min[0], &u1,&u2)) {
- if (cliptest(ldx, oc->max[0]-start[0], &u1,&u2)) {
+ if (cliptest(-ldx, start[0]-oc->min[0], &u1, &u2)) {
+ if (cliptest(ldx, oc->max[0]-start[0], &u1, &u2)) {
ldy= is->dir[1]*is->dist;
- if (cliptest(-ldy, start[1]-oc->min[1], &u1,&u2)) {
- if (cliptest(ldy, oc->max[1]-start[1], &u1,&u2)) {
+ if (cliptest(-ldy, start[1]-oc->min[1], &u1, &u2)) {
+ if (cliptest(ldy, oc->max[1]-start[1], &u1, &u2)) {
ldz = is->dir[2]*is->dist;
- if (cliptest(-ldz, start[2]-oc->min[2], &u1,&u2)) {
- if (cliptest(ldz, oc->max[2]-start[2], &u1,&u2)) {
+ if (cliptest(-ldz, start[2]-oc->min[2], &u1, &u2)) {
+ if (cliptest(ldz, oc->max[2]-start[2], &u1, &u2)) {
c1=1;
if (u2<1.0f) {
end[0] = start[0]+u2*ldx;
@@ -936,7 +934,7 @@ static int RE_rayobject_octree_intersect(RayObject *tree, Isect *is)
}
else {
int found = 0;
- //static int coh_ocx1,coh_ocx2,coh_ocy1, coh_ocy2,coh_ocz1,coh_ocz2;
+ //static int coh_ocx1, coh_ocx2, coh_ocy1, coh_ocy2, coh_ocz1, coh_ocz2;
float dox, doy, doz;
int eqval;
@@ -994,7 +992,7 @@ static int RE_rayobject_octree_intersect(RayObject *tree, Isect *is)
}
xo=ocx1; yo=ocy1; zo=ocz1;
- ddalabda= MIN3(labdax,labday,labdaz);
+ ddalabda= MIN3(labdax, labday, labdaz);
vec2[0]= ox1;
vec2[1]= oy1;
@@ -1003,14 +1001,14 @@ static int RE_rayobject_octree_intersect(RayObject *tree, Isect *is)
/* this loop has been constructed to make sure the first and last node of ray
* are always included, even when ddalabda==1.0f or larger */
- while(TRUE) {
+ while (TRUE) {
no= ocread(oc, xo, yo, zo);
if (no) {
/* calculate ray intersection with octree node */
copy_v3_v3(vec1, vec2);
- // dox,y,z is negative
+ // dox, y, z is negative
vec2[0]= ox1-ddalabda*dox;
vec2[1]= oy1-ddalabda*doy;
vec2[2]= oz1-ddalabda*doz;
@@ -1084,7 +1082,7 @@ static int RE_rayobject_octree_intersect(RayObject *tree, Isect *is)
}
- ddalabda=MIN3(labdax,labday,labdaz);
+ ddalabda=MIN3(labdax, labday, labdaz);
if (ddalabda==labdao) break;
/* to make sure the last node is always checked */
if (labdao>=1.0f) break;
diff --git a/source/blender/render/intern/raytrace/rayobject_qbvh.cpp b/source/blender/render/intern/raytrace/rayobject_qbvh.cpp
index 2edf1593e99..bfcfbee536f 100644
--- a/source/blender/render/intern/raytrace/rayobject_qbvh.cpp
+++ b/source/blender/render/intern/raytrace/rayobject_qbvh.cpp
@@ -71,15 +71,14 @@ void bvh_done<QBVHTree>(QBVHTree *obj)
//TODO do this in 1 pass (half memory usage during building)
VBVHNode *root = BuildBinaryVBVH<VBVHNode>(arena1, &obj->rayobj.control).transform(obj->builder);
- if (RE_rayobjectcontrol_test_break(&obj->rayobj.control))
- {
+ if (RE_rayobjectcontrol_test_break(&obj->rayobj.control)) {
BLI_memarena_free(arena1);
BLI_memarena_free(arena2);
return;
}
if (root) {
- pushup_simd<VBVHNode,4>(root);
+ pushup_simd<VBVHNode, 4>(root);
obj->root = Reorganize_SVBVH<VBVHNode>(arena2).transform(root);
}
else
@@ -101,9 +100,9 @@ int intersect(QBVHTree *obj, Isect* isec)
//TODO renable hint support
if (RE_rayobject_isAligned(obj->root)) {
if (isec->mode == RE_RAY_SHADOW)
- return svbvh_node_stack_raycast<StackSize,true>(obj->root, isec);
+ return svbvh_node_stack_raycast<StackSize, true>(obj->root, isec);
else
- return svbvh_node_stack_raycast<StackSize,false>(obj->root, isec);
+ return svbvh_node_stack_raycast<StackSize, false>(obj->root, isec);
}
else
return RE_rayobject_intersect((RayObject*)obj->root, isec);
@@ -124,13 +123,13 @@ RayObjectAPI make_api()
{
static RayObjectAPI api =
{
- (RE_rayobject_raycast_callback) ((int(*)(Tree*,Isect*)) &intersect<STACK_SIZE>),
- (RE_rayobject_add_callback) ((void(*)(Tree*,RayObject*)) &bvh_add<Tree>),
+ (RE_rayobject_raycast_callback) ((int(*)(Tree*, Isect*)) &intersect<STACK_SIZE>),
+ (RE_rayobject_add_callback) ((void(*)(Tree*, RayObject*)) &bvh_add<Tree>),
(RE_rayobject_done_callback) ((void(*)(Tree*)) &bvh_done<Tree>),
(RE_rayobject_free_callback) ((void(*)(Tree*)) &bvh_free<Tree>),
- (RE_rayobject_merge_bb_callback)((void(*)(Tree*,float*,float*)) &bvh_bb<Tree>),
+ (RE_rayobject_merge_bb_callback)((void(*)(Tree*, float*, float*)) &bvh_bb<Tree>),
(RE_rayobject_cost_callback) ((float(*)(Tree*)) &bvh_cost<Tree>),
- (RE_rayobject_hint_bb_callback) ((void(*)(Tree*,LCTSHint*,float*,float*)) &bvh_hint_bb<Tree>)
+ (RE_rayobject_hint_bb_callback) ((void(*)(Tree*, LCTSHint*, float*, float*)) &bvh_hint_bb<Tree>)
};
return api;
@@ -139,7 +138,7 @@ RayObjectAPI make_api()
template<class Tree>
RayObjectAPI* bvh_get_api(int maxstacksize)
{
- static RayObjectAPI bvh_api256 = make_api<Tree,1024>();
+ static RayObjectAPI bvh_api256 = make_api<Tree, 1024>();
if (maxstacksize <= 1024) return &bvh_api256;
assert(maxstacksize <= 256);
@@ -148,7 +147,7 @@ RayObjectAPI* bvh_get_api(int maxstacksize)
RayObject *RE_rayobject_qbvh_create(int size)
{
- return bvh_create_tree<QBVHTree,DFS_STACK_SIZE>(size);
+ return bvh_create_tree<QBVHTree, DFS_STACK_SIZE>(size);
}
#else
diff --git a/source/blender/render/intern/raytrace/rayobject_rtbuild.cpp b/source/blender/render/intern/raytrace/rayobject_rtbuild.cpp
index 54901db8bdd..eb3bdb37f9d 100644
--- a/source/blender/render/intern/raytrace/rayobject_rtbuild.cpp
+++ b/source/blender/render/intern/raytrace/rayobject_rtbuild.cpp
@@ -66,7 +66,7 @@ static void rtbuild_init(RTBuilder *b)
RTBuilder* rtbuild_create(int size)
{
RTBuilder *builder = (RTBuilder*) MEM_mallocN( sizeof(RTBuilder), "RTBuilder" );
- RTBuilder::Object *memblock= (RTBuilder::Object*)MEM_mallocN( sizeof(RTBuilder::Object)*size,"RTBuilder.objects");
+ RTBuilder::Object *memblock= (RTBuilder::Object*)MEM_mallocN( sizeof(RTBuilder::Object)*size, "RTBuilder.objects");
rtbuild_init(builder);
@@ -74,9 +74,8 @@ RTBuilder* rtbuild_create(int size)
builder->primitives.begin = builder->primitives.end = memblock;
builder->primitives.maxsize = size;
- for (int i=0; i<3; i++)
- {
- builder->sorted_begin[i] = (RTBuilder::Object**)MEM_mallocN( sizeof(RTBuilder::Object*)*size,"RTBuilder.sorted_objects");
+ for (int i=0; i<3; i++) {
+ builder->sorted_begin[i] = (RTBuilder::Object**)MEM_mallocN( sizeof(RTBuilder::Object*)*size, "RTBuilder.sorted_objects");
builder->sorted_end[i] = builder->sorted_begin[i];
}
@@ -124,8 +123,7 @@ void rtbuild_add(RTBuilder *b, RayObject *o)
b->primitives.end->obj = o;
b->primitives.end->cost = RE_rayobject_cost(o);
- for (int i=0; i<3; i++)
- {
+ for (int i=0; i<3; i++) {
*(b->sorted_end[i]) = b->primitives.end;
b->sorted_end[i]++;
}
@@ -138,7 +136,7 @@ int rtbuild_size(RTBuilder *b)
}
-template<class Obj,int Axis>
+template<class Obj, int Axis>
static bool obj_bb_compare(const Obj &a, const Obj &b)
{
if (a->bb[Axis] != b->bb[Axis])
@@ -149,17 +147,16 @@ static bool obj_bb_compare(const Obj &a, const Obj &b)
template<class Item>
static void object_sort(Item *begin, Item *end, int axis)
{
- if (axis == 0) return std::sort(begin, end, obj_bb_compare<Item,0> );
- if (axis == 1) return std::sort(begin, end, obj_bb_compare<Item,1> );
- if (axis == 2) return std::sort(begin, end, obj_bb_compare<Item,2> );
+ if (axis == 0) return std::sort(begin, end, obj_bb_compare<Item, 0> );
+ if (axis == 1) return std::sort(begin, end, obj_bb_compare<Item, 1> );
+ if (axis == 2) return std::sort(begin, end, obj_bb_compare<Item, 2> );
assert(false);
}
void rtbuild_done(RTBuilder *b, RayObjectControl* ctrl)
{
for (int i=0; i<3; i++)
- if (b->sorted_begin[i])
- {
+ if (b->sorted_begin[i]) {
if (RE_rayobjectcontrol_test_break(ctrl)) break;
object_sort( b->sorted_begin[i], b->sorted_end[i], i );
}
@@ -175,13 +172,11 @@ RTBuilder* rtbuild_get_child(RTBuilder *b, int child, RTBuilder *tmp)
rtbuild_init( tmp );
for (int i=0; i<3; i++)
- if (b->sorted_begin[i])
- {
+ if (b->sorted_begin[i]) {
tmp->sorted_begin[i] = b->sorted_begin[i] + b->child_offset[child ];
tmp->sorted_end [i] = b->sorted_begin[i] + b->child_offset[child+1];
}
- else
- {
+ else {
tmp->sorted_begin[i] = 0;
tmp->sorted_end [i] = 0;
}
@@ -191,10 +186,9 @@ RTBuilder* rtbuild_get_child(RTBuilder *b, int child, RTBuilder *tmp)
void rtbuild_calc_bb(RTBuilder *b)
{
- if (b->bb[0] == 1.0e30f)
- {
+ if (b->bb[0] == 1.0e30f) {
for (RTBuilder::Object **index = b->sorted_begin[0]; index != b->sorted_end[0]; index++)
- RE_rayobject_merge_bb( (*index)->obj , b->bb, b->bb+3);
+ RE_rayobject_merge_bb( (*index)->obj, b->bb, b->bb+3);
}
}
@@ -312,7 +306,7 @@ int rtbuild_median_split_largest_axis(RTBuilder *b, int nchilds)
rtbuild_calc_bb(b);
- la = bb_largest_axis(b->bb,b->bb+3);
+ la = bb_largest_axis(b->bb, b->bb+3);
for (i=1; i<nchilds; i++)
separators[i-1] = (b->bb[la+3]-b->bb[la])*i / nchilds;
@@ -337,30 +331,25 @@ int rtbuild_heuristic_object_split(RTBuilder *b, int nchilds)
assert(size > 1);
int baxis = -1, boffset = 0;
- if (size > nchilds)
- {
+ if (size > nchilds) {
float bcost = FLT_MAX;
baxis = -1, boffset = size/2;
SweepCost *sweep = (SweepCost*)MEM_mallocN( sizeof(SweepCost)*size, "RTBuilder.HeuristicSweep" );
- for (int axis=0; axis<3; axis++)
- {
+ for (int axis=0; axis<3; axis++) {
SweepCost sweep_left;
RTBuilder::Object **obj = b->sorted_begin[axis];
// float right_cost = 0;
- for (int i=size-1; i>=0; i--)
- {
- if (i == size-1)
- {
+ for (int i=size-1; i>=0; i--) {
+ if (i == size-1) {
copy_v3_v3(sweep[i].bb, obj[i]->bb);
copy_v3_v3(sweep[i].bb+3, obj[i]->bb+3);
sweep[i].cost = obj[i]->cost;
}
- else
- {
+ else {
sweep[i].bb[0] = MIN2(obj[i]->bb[0], sweep[i+1].bb[0]);
sweep[i].bb[1] = MIN2(obj[i]->bb[1], sweep[i+1].bb[1]);
sweep[i].bb[2] = MIN2(obj[i]->bb[2], sweep[i+1].bb[2]);
@@ -382,8 +371,7 @@ int rtbuild_heuristic_object_split(RTBuilder *b, int nchilds)
// right_cost -= obj[0]->cost; if (right_cost < 0) right_cost = 0;
- for (int i=1; i<size; i++)
- {
+ for (int i=1; i<size; i++) {
//Worst case heuristic (cost of each child is linear)
float hcost, left_side, right_side;
@@ -401,9 +389,8 @@ int rtbuild_heuristic_object_split(RTBuilder *b, int nchilds)
if (left_side > bcost) break; //No way we can find a better heuristic in this axis
assert(hcost >= 0);
- if ( hcost < bcost
- || (hcost == bcost && axis < baxis)) //this makes sure the tree built is the same whatever is the order of the sorting axis
- {
+ // this makes sure the tree built is the same whatever is the order of the sorting axis
+ if ( hcost < bcost || (hcost == bcost && axis < baxis)) {
bcost = hcost;
baxis = axis;
boffset = i;
@@ -423,13 +410,11 @@ int rtbuild_heuristic_object_split(RTBuilder *b, int nchilds)
MEM_freeN(sweep);
}
- else if (size == 2)
- {
+ else if (size == 2) {
baxis = 0;
boffset = 1;
}
- else if (size == 1)
- {
+ else if (size == 1) {
b->child_offset[0] = 0;
b->child_offset[1] = 1;
return 1;
@@ -464,9 +449,9 @@ static void split_leafs(RTBuilder *b, int *nth, int partitions, int split_axis)
{
assert(nth[i] < nth[i+1] && nth[i+1] < nth[partitions]);
- if (split_axis == 0) std::nth_element(b, nth[i], nth[i+1], nth[partitions], obj_bb_compare<RTBuilder::Object,0>);
- if (split_axis == 1) std::nth_element(b, nth[i], nth[i+1], nth[partitions], obj_bb_compare<RTBuilder::Object,1>);
- if (split_axis == 2) std::nth_element(b, nth[i], nth[i+1], nth[partitions], obj_bb_compare<RTBuilder::Object,2>);
+ if (split_axis == 0) std::nth_element(b, nth[i], nth[i+1], nth[partitions], obj_bb_compare<RTBuilder::Object, 0>);
+ if (split_axis == 1) std::nth_element(b, nth[i], nth[i+1], nth[partitions], obj_bb_compare<RTBuilder::Object, 1>);
+ if (split_axis == 2) std::nth_element(b, nth[i], nth[i+1], nth[partitions], obj_bb_compare<RTBuilder::Object, 2>);
}
}
#endif
@@ -500,15 +485,13 @@ int bb_largest_axis(float *min, float *max)
sub[0] = max[0]-min[0];
sub[1] = max[1]-min[1];
sub[2] = max[2]-min[2];
- if (sub[0] > sub[1])
- {
+ if (sub[0] > sub[1]) {
if (sub[0] > sub[2])
return 0;
else
return 2;
}
- else
- {
+ else {
if (sub[1] > sub[2])
return 1;
else
diff --git a/source/blender/render/intern/raytrace/rayobject_svbvh.cpp b/source/blender/render/intern/raytrace/rayobject_svbvh.cpp
index 4c2099eb1e3..3cf2b4b5d5f 100644
--- a/source/blender/render/intern/raytrace/rayobject_svbvh.cpp
+++ b/source/blender/render/intern/raytrace/rayobject_svbvh.cpp
@@ -79,12 +79,10 @@ void bvh_done<SVBVHTree>(SVBVHTree *obj)
BLI_memarena_use_align(arena2, 16);
//Build and optimize the tree
- if (0)
- {
+ if (0) {
VBVHNode *root = BuildBinaryVBVH<VBVHNode>(arena1, &obj->rayobj.control).transform(obj->builder);
- if (RE_rayobjectcontrol_test_break(&obj->rayobj.control))
- {
+ if (RE_rayobjectcontrol_test_break(&obj->rayobj.control)) {
BLI_memarena_free(arena1);
BLI_memarena_free(arena2);
return;
@@ -96,25 +94,23 @@ void bvh_done<SVBVHTree>(SVBVHTree *obj)
pushup(root);
pushdown(root);
- pushup_simd<VBVHNode,4>(root);
+ pushup_simd<VBVHNode, 4>(root);
obj->root = Reorganize_SVBVH<VBVHNode>(arena2).transform(root);
}
- else
- {
+ else {
//Finds the optimal packing of this tree using a given cost model
//TODO this uses quite a lot of memory, find ways to reduce memory usage during building
- OVBVHNode *root = BuildBinaryVBVH<OVBVHNode>(arena1,&obj->rayobj.control).transform(obj->builder);
+ OVBVHNode *root = BuildBinaryVBVH<OVBVHNode>(arena1, &obj->rayobj.control).transform(obj->builder);
- if (RE_rayobjectcontrol_test_break(&obj->rayobj.control))
- {
+ if (RE_rayobjectcontrol_test_break(&obj->rayobj.control)) {
BLI_memarena_free(arena1);
BLI_memarena_free(arena2);
return;
}
if (root) {
- VBVH_optimalPackSIMD<OVBVHNode,PackCost>(PackCost()).transform(root);
+ VBVH_optimalPackSIMD<OVBVHNode, PackCost>(PackCost()).transform(root);
obj->root = Reorganize_SVBVH<OVBVHNode>(arena2).transform(root);
}
else
@@ -137,9 +133,9 @@ int intersect(SVBVHTree *obj, Isect* isec)
//TODO renable hint support
if (RE_rayobject_isAligned(obj->root)) {
if (isec->mode == RE_RAY_SHADOW)
- return svbvh_node_stack_raycast<StackSize,true>(obj->root, isec);
+ return svbvh_node_stack_raycast<StackSize, true>(obj->root, isec);
else
- return svbvh_node_stack_raycast<StackSize,false>(obj->root, isec);
+ return svbvh_node_stack_raycast<StackSize, false>(obj->root, isec);
}
else
return RE_rayobject_intersect( (RayObject*) obj->root, isec );
@@ -160,13 +156,13 @@ RayObjectAPI make_api()
{
static RayObjectAPI api =
{
- (RE_rayobject_raycast_callback) ((int(*)(Tree*,Isect*)) &intersect<STACK_SIZE>),
- (RE_rayobject_add_callback) ((void(*)(Tree*,RayObject*)) &bvh_add<Tree>),
+ (RE_rayobject_raycast_callback) ((int(*)(Tree*, Isect*)) &intersect<STACK_SIZE>),
+ (RE_rayobject_add_callback) ((void(*)(Tree*, RayObject*)) &bvh_add<Tree>),
(RE_rayobject_done_callback) ((void(*)(Tree*)) &bvh_done<Tree>),
(RE_rayobject_free_callback) ((void(*)(Tree*)) &bvh_free<Tree>),
- (RE_rayobject_merge_bb_callback)((void(*)(Tree*,float*,float*)) &bvh_bb<Tree>),
+ (RE_rayobject_merge_bb_callback)((void(*)(Tree*, float*, float*)) &bvh_bb<Tree>),
(RE_rayobject_cost_callback) ((float(*)(Tree*)) &bvh_cost<Tree>),
- (RE_rayobject_hint_bb_callback) ((void(*)(Tree*,LCTSHint*,float*,float*)) &bvh_hint_bb<Tree>)
+ (RE_rayobject_hint_bb_callback) ((void(*)(Tree*, LCTSHint*, float*, float*)) &bvh_hint_bb<Tree>)
};
return api;
@@ -175,7 +171,7 @@ RayObjectAPI make_api()
template<class Tree>
RayObjectAPI* bvh_get_api(int maxstacksize)
{
- static RayObjectAPI bvh_api256 = make_api<Tree,1024>();
+ static RayObjectAPI bvh_api256 = make_api<Tree, 1024>();
if (maxstacksize <= 1024) return &bvh_api256;
assert(maxstacksize <= 256);
@@ -184,7 +180,7 @@ RayObjectAPI* bvh_get_api(int maxstacksize)
RayObject *RE_rayobject_svbvh_create(int size)
{
- return bvh_create_tree<SVBVHTree,DFS_STACK_SIZE>(size);
+ return bvh_create_tree<SVBVHTree, DFS_STACK_SIZE>(size);
}
#else
diff --git a/source/blender/render/intern/raytrace/rayobject_vbvh.cpp b/source/blender/render/intern/raytrace/rayobject_vbvh.cpp
index e82623f1da9..47e78b8912e 100644
--- a/source/blender/render/intern/raytrace/rayobject_vbvh.cpp
+++ b/source/blender/render/intern/raytrace/rayobject_vbvh.cpp
@@ -87,11 +87,9 @@ void bvh_done<VBVHTree>(VBVHTree *obj)
BLI_memarena_use_malloc(arena1);
//Build and optimize the tree
- if (1)
- {
- VBVHNode *root = BuildBinaryVBVH<VBVHNode>(arena1,&obj->rayobj.control).transform(obj->builder);
- if (RE_rayobjectcontrol_test_break(&obj->rayobj.control))
- {
+ if (1) {
+ VBVHNode *root = BuildBinaryVBVH<VBVHNode>(arena1, &obj->rayobj.control).transform(obj->builder);
+ if (RE_rayobjectcontrol_test_break(&obj->rayobj.control)) {
BLI_memarena_free(arena1);
return;
}
@@ -108,8 +106,7 @@ void bvh_done<VBVHTree>(VBVHTree *obj)
else
obj->root = NULL;
}
- else
- {
+ else {
/*
TODO
MemArena *arena2 = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, "vbvh arena2");
@@ -118,7 +115,7 @@ void bvh_done<VBVHTree>(VBVHTree *obj)
//Finds the optimal packing of this tree using a given cost model
//TODO this uses quite a lot of memory, find ways to reduce memory usage during building
OVBVHNode *root = BuildBinaryVBVH<OVBVHNode>(arena2).transform(obj->builder);
- VBVH_optimalPackSIMD<OVBVHNode,PackCost>(PackCost()).transform(root);
+ VBVH_optimalPackSIMD<OVBVHNode, PackCost>(PackCost()).transform(root);
obj->root = Reorganize_VBVH<OVBVHNode>(arena1).transform(root);
BLI_memarena_free(arena2);
@@ -139,9 +136,9 @@ int intersect(VBVHTree *obj, Isect* isec)
//TODO renable hint support
if (RE_rayobject_isAligned(obj->root)) {
if (isec->mode == RE_RAY_SHADOW)
- return bvh_node_stack_raycast<VBVHNode,StackSize,false,true>( obj->root, isec);
+ return bvh_node_stack_raycast<VBVHNode, StackSize, false, true>( obj->root, isec);
else
- return bvh_node_stack_raycast<VBVHNode,StackSize,false,false>( obj->root, isec);
+ return bvh_node_stack_raycast<VBVHNode, StackSize, false, false>( obj->root, isec);
}
else
return RE_rayobject_intersect( (RayObject*) obj->root, isec );
@@ -159,8 +156,7 @@ void bvh_hint_bb(Tree *tree, LCTSHint *hint, float *UNUSED(min), float *UNUSED(m
void bfree(VBVHTree *tree)
{
- if (tot_pushup + tot_pushdown + tot_hints + tot_moves)
- {
+ if (tot_pushup + tot_pushdown + tot_hints + tot_moves) {
if (G.debug & G_DEBUG) {
printf("tot pushups: %d\n", tot_pushup);
printf("tot pushdowns: %d\n", tot_pushdown);
@@ -182,13 +178,13 @@ RayObjectAPI make_api()
{
static RayObjectAPI api =
{
- (RE_rayobject_raycast_callback) ((int(*)(Tree*,Isect*)) &intersect<STACK_SIZE>),
- (RE_rayobject_add_callback) ((void(*)(Tree*,RayObject*)) &bvh_add<Tree>),
+ (RE_rayobject_raycast_callback) ((int(*)(Tree*, Isect*)) &intersect<STACK_SIZE>),
+ (RE_rayobject_add_callback) ((void(*)(Tree*, RayObject*)) &bvh_add<Tree>),
(RE_rayobject_done_callback) ((void(*)(Tree*)) &bvh_done<Tree>),
(RE_rayobject_free_callback) ((void(*)(Tree*)) &bvh_free<Tree>),
- (RE_rayobject_merge_bb_callback)((void(*)(Tree*,float*,float*)) &bvh_bb<Tree>),
+ (RE_rayobject_merge_bb_callback)((void(*)(Tree*, float*, float*)) &bvh_bb<Tree>),
(RE_rayobject_cost_callback) ((float(*)(Tree*)) &bvh_cost<Tree>),
- (RE_rayobject_hint_bb_callback) ((void(*)(Tree*,LCTSHint*,float*,float*)) &bvh_hint_bb<Tree>)
+ (RE_rayobject_hint_bb_callback) ((void(*)(Tree*, LCTSHint*, float*, float*)) &bvh_hint_bb<Tree>)
};
return api;
@@ -197,7 +193,7 @@ RayObjectAPI make_api()
template<class Tree>
RayObjectAPI* bvh_get_api(int maxstacksize)
{
- static RayObjectAPI bvh_api256 = make_api<Tree,1024>();
+ static RayObjectAPI bvh_api256 = make_api<Tree, 1024>();
if (maxstacksize <= 1024) return &bvh_api256;
assert(maxstacksize <= 256);
@@ -206,5 +202,5 @@ RayObjectAPI* bvh_get_api(int maxstacksize)
RayObject *RE_rayobject_vbvh_create(int size)
{
- return bvh_create_tree<VBVHTree,DFS_STACK_SIZE>(size);
+ return bvh_create_tree<VBVHTree, DFS_STACK_SIZE>(size);
}
diff --git a/source/blender/render/intern/raytrace/reorganize.h b/source/blender/render/intern/raytrace/reorganize.h
index 68b2b22ecdd..a47bd27d11b 100644
--- a/source/blender/render/intern/raytrace/reorganize.h
+++ b/source/blender/render/intern/raytrace/reorganize.h
@@ -61,22 +61,20 @@ bool node_fits_inside(Node *a, Node *b)
}
template<class Node>
-void reorganize_find_fittest_parent(Node *tree, Node *node, std::pair<float,Node*> &cost)
+void reorganize_find_fittest_parent(Node *tree, Node *node, std::pair<float, Node*> &cost)
{
std::queue<Node*> q;
q.push(tree);
- while(!q.empty())
- {
+ while (!q.empty()) {
Node *parent = q.front();
q.pop();
- if(parent == node) continue;
- if(node_fits_inside(node, parent) && RE_rayobject_isAligned(parent->child) )
- {
+ if (parent == node) continue;
+ if (node_fits_inside(node, parent) && RE_rayobject_isAligned(parent->child) ) {
float pcost = bb_area(parent->bb, parent->bb+3);
- cost = std::min( cost, std::make_pair(pcost,parent) );
- for(Node *child = parent->child; child; child = child->sibling)
+ cost = std::min( cost, std::make_pair(pcost, parent) );
+ for (Node *child = parent->child; child; child = child->sibling)
q.push(child);
}
}
@@ -89,28 +87,23 @@ void reorganize(Node *root)
std::queue<Node*> q;
q.push(root);
- while(!q.empty())
- {
+ while (!q.empty()) {
Node * node = q.front();
q.pop();
- if( RE_rayobject_isAligned(node->child) )
- {
- for(Node **prev = &node->child; *prev; )
- {
- assert( RE_rayobject_isAligned(*prev) );
+ if (RE_rayobject_isAligned(node->child)) {
+ for (Node **prev = &node->child; *prev; ) {
+ assert(RE_rayobject_isAligned(*prev));
q.push(*prev);
- std::pair<float,Node*> best(FLT_MAX, root);
- reorganize_find_fittest_parent( root, *prev, best );
+ std::pair<float, Node*> best(FLT_MAX, root);
+ reorganize_find_fittest_parent(root, *prev, best);
- if(best.second == node)
- {
+ if (best.second == node) {
//Already inside the fitnest BB
prev = &(*prev)->sibling;
}
- else
- {
+ else {
Node *tmp = *prev;
*prev = (*prev)->sibling;
@@ -123,8 +116,7 @@ void reorganize(Node *root)
}
}
- if(node != root)
- {
+ if (node != root) {
}
}
}
@@ -137,29 +129,24 @@ void reorganize(Node *root)
template<class Node>
void remove_useless(Node *node, Node **new_node)
{
- if( RE_rayobject_isAligned(node->child) )
- {
+ if ( RE_rayobject_isAligned(node->child) ) {
- for(Node **prev = &node->child; *prev; )
- {
+ for (Node **prev = &node->child; *prev; ) {
Node *next = (*prev)->sibling;
remove_useless(*prev, prev);
- if(*prev == NULL)
+ if (*prev == NULL)
*prev = next;
- else
- {
+ else {
(*prev)->sibling = next;
prev = &((*prev)->sibling);
}
}
}
- if(node->child)
- {
- if(RE_rayobject_isAligned(node->child) && node->child->sibling == 0)
+ if (node->child) {
+ if (RE_rayobject_isAligned(node->child) && node->child->sibling == 0)
*new_node = node->child;
}
- else if(node->child == NULL)
- {
+ else if (node->child == NULL) {
*new_node = NULL;
}
}
@@ -171,18 +158,16 @@ void remove_useless(Node *node, Node **new_node)
template<class Node>
void pushup(Node *parent)
{
- if(is_leaf(parent)) return;
+ if (is_leaf(parent)) return;
float p_area = bb_area(parent->bb, parent->bb+3);
Node **prev = &parent->child;
- for(Node *child = parent->child; RE_rayobject_isAligned(child) && child; )
- {
+ for (Node *child = parent->child; RE_rayobject_isAligned(child) && child; ) {
const float c_area = bb_area(child->bb, child->bb + 3);
const int nchilds = count_childs(child);
float original_cost = ((p_area != 0.0f)? (c_area / p_area)*nchilds: 1.0f) + 1;
float flatten_cost = nchilds;
- if(flatten_cost < original_cost && nchilds >= 2)
- {
+ if (flatten_cost < original_cost && nchilds >= 2) {
append_sibling(child, child->child);
child = child->sibling;
*prev = child;
@@ -192,15 +177,14 @@ void pushup(Node *parent)
// child = *prev;
tot_pushup++;
}
- else
- {
+ else {
*prev = child;
prev = &(*prev)->sibling;
child = *prev;
}
}
- for(Node *child = parent->child; RE_rayobject_isAligned(child) && child; child = child->sibling)
+ for (Node *child = parent->child; RE_rayobject_isAligned(child) && child; child = child->sibling)
pushup(child);
}
@@ -210,31 +194,28 @@ void pushup(Node *parent)
template<class Node, int SSize>
void pushup_simd(Node *parent)
{
- if(is_leaf(parent)) return;
+ if (is_leaf(parent)) return;
int n = count_childs(parent);
Node **prev = &parent->child;
- for(Node *child = parent->child; RE_rayobject_isAligned(child) && child; )
- {
+ for (Node *child = parent->child; RE_rayobject_isAligned(child) && child; ) {
int cn = count_childs(child);
- if(cn-1 <= (SSize - (n%SSize) ) % SSize && RE_rayobject_isAligned(child->child) )
- {
+ if (cn-1 <= (SSize - (n%SSize) ) % SSize && RE_rayobject_isAligned(child->child) ) {
n += (cn - 1);
append_sibling(child, child->child);
child = child->sibling;
*prev = child;
}
- else
- {
+ else {
*prev = child;
prev = &(*prev)->sibling;
child = *prev;
}
}
- for(Node *child = parent->child; RE_rayobject_isAligned(child) && child; child = child->sibling)
- pushup_simd<Node,SSize>(child);
+ for (Node *child = parent->child; RE_rayobject_isAligned(child) && child; child = child->sibling)
+ pushup_simd<Node, SSize>(child);
}
@@ -248,19 +229,17 @@ void pushdown(Node *parent)
Node **s_child = &parent->child;
Node * child = parent->child;
- while(child && RE_rayobject_isAligned(child))
- {
+ while (child && RE_rayobject_isAligned(child)) {
Node *next = child->sibling;
Node **next_s_child = &child->sibling;
//assert(bb_fits_inside(parent->bb, parent->bb+3, child->bb, child->bb+3));
- for(Node *i = parent->child; RE_rayobject_isAligned(i) && i; i = i->sibling)
- if(child != i && bb_fits_inside(i->bb, i->bb+3, child->bb, child->bb+3) && RE_rayobject_isAligned(i->child))
- {
+ for (Node *i = parent->child; RE_rayobject_isAligned(i) && i; i = i->sibling)
+ if (child != i && bb_fits_inside(i->bb, i->bb+3, child->bb, child->bb+3) && RE_rayobject_isAligned(i->child)) {
// todo optimize (should the one with the smallest area?)
// float ia = bb_area(i->bb, i->bb+3)
-// if(child->i)
+// if (child->i)
*s_child = child->sibling;
child->sibling = i->child;
i->child = child;
@@ -286,18 +265,17 @@ void pushdown(Node *parent)
template<class Node>
float bvh_refit(Node *node)
{
- if(is_leaf(node)) return 0;
- if(is_leaf(node->child)) return 0;
+ if (is_leaf(node)) return 0;
+ if (is_leaf(node->child)) return 0;
float total = 0;
- for(Node *child = node->child; child; child = child->sibling)
+ for (Node *child = node->child; child; child = child->sibling)
total += bvh_refit(child);
float old_area = bb_area(node->bb, node->bb+3);
INIT_MINMAX(node->bb, node->bb+3);
- for(Node *child = node->child; child; child = child->sibling)
- {
+ for (Node *child = node->child; child; child = child->sibling) {
DO_MIN(child->bb, node->bb);
DO_MAX(child->bb+3, node->bb+3);
}
@@ -347,41 +325,36 @@ struct OVBVHNode
int best_cutsize;
void set_cut(int cutsize, OVBVHNode ***cut)
{
- if(cutsize == 1)
- {
+ if (cutsize == 1) {
**cut = this;
*cut = &(**cut)->sibling;
}
- else
- {
- if(cutsize > MAX_CUT_SIZE)
- {
- for(OVBVHNode *child = this->child; child && RE_rayobject_isAligned(child); child = child->sibling)
- {
+ else {
+ if (cutsize > MAX_CUT_SIZE) {
+ for (OVBVHNode *child = this->child; child && RE_rayobject_isAligned(child); child = child->sibling) {
child->set_cut( 1, cut );
cutsize--;
}
assert(cutsize == 0);
}
else
- for(OVBVHNode *child = this->child; child && RE_rayobject_isAligned(child); child = child->sibling)
+ for (OVBVHNode *child = this->child; child && RE_rayobject_isAligned(child); child = child->sibling)
child->set_cut( child->get_cut_size( cutsize ), cut );
}
}
void optimize()
{
- if(RE_rayobject_isAligned(this->child))
- {
+ if (RE_rayobject_isAligned(this->child)) {
//Calc new childs
{
OVBVHNode **cut = &(this->child);
- set_cut( best_cutsize, &cut );
+ set_cut(best_cutsize, &cut);
*cut = NULL;
}
//Optimize new childs
- for(OVBVHNode *child = this->child; child && RE_rayobject_isAligned(child); child = child->sibling)
+ for (OVBVHNode *child = this->child; child && RE_rayobject_isAligned(child); child = child->sibling)
child->optimize();
}
}
@@ -415,8 +388,7 @@ struct VBVH_optimalPackSIMD
//Fetch childs and needed data
{
float parent_area = bb_area(node->bb, node->bb+3);
- for(Node *child = node->child; child && RE_rayobject_isAligned(child); child = child->sibling)
- {
+ for (Node *child = node->child; child && RE_rayobject_isAligned(child); child = child->sibling) {
this->child[nchilds] = child;
this->child_hit_prob[nchilds] = (parent_area != 0.0f)? bb_area(child->bb, child->bb+3) / parent_area: 1.0f;
nchilds++;
@@ -427,36 +399,35 @@ struct VBVH_optimalPackSIMD
//Build DP table to find minimum cost to represent this node with a given cutsize
- int bt [MAX_OPTIMIZE_CHILDS+1][MAX_CUT_SIZE+1]; //backtrace table
- float cost[MAX_OPTIMIZE_CHILDS+1][MAX_CUT_SIZE+1]; //cost table (can be reduced to float[2][MAX_CUT_COST])
+ int bt [MAX_OPTIMIZE_CHILDS + 1][MAX_CUT_SIZE + 1]; //backtrace table
+ float cost[MAX_OPTIMIZE_CHILDS + 1][MAX_CUT_SIZE + 1]; //cost table (can be reduced to float[2][MAX_CUT_COST])
- for(int i=0; i<=nchilds; i++)
- for(int j=0; j<=MAX_CUT_SIZE; j++)
- cost[i][j] = INFINITY;
+ for (int i = 0; i <= nchilds; i++) {
+ for (int j = 0; j <= MAX_CUT_SIZE; j++) {
+ cost[i][j] = INFINITY;
+ }
+ }
cost[0][0] = 0;
- for(int i=1; i<=nchilds; i++)
- for(int size=i-1; size/*+(nchilds-i)*/<=MAX_CUT_SIZE; size++)
- for(int cut=1; cut+size/*+(nchilds-i)*/<=MAX_CUT_SIZE; cut++)
- {
- float new_cost = cost[i-1][size] + child_hit_prob[i-1]*child[i-1]->get_cost(cut);
- if(new_cost < cost[i][size+cut])
- {
- cost[i][size+cut] = new_cost;
- bt[i][size+cut] = cut;
+ for (int i = 1; i<=nchilds; i++) {
+ for (int size = i - 1; size/*+(nchilds-i)*/<=MAX_CUT_SIZE; size++) {
+ for (int cut = 1; cut+size/*+(nchilds-i)*/<=MAX_CUT_SIZE; cut++) {
+ float new_cost = cost[i - 1][size] + child_hit_prob[i - 1] * child[i - 1]->get_cost(cut);
+ if (new_cost < cost[i][size+cut]) {
+ cost[i][size+cut] = new_cost;
+ bt[i][size+cut] = cut;
+ }
+ }
}
}
//Save the ways to archieve the minimum cost with a given cutsize
- for(int i = nchilds; i <= MAX_CUT_SIZE; i++)
- {
+ for (int i = nchilds; i <= MAX_CUT_SIZE; i++) {
node->cut_cost[i-1] = cost[nchilds][i];
- if(cost[nchilds][i] < INFINITY)
- {
+ if (cost[nchilds][i] < INFINITY) {
int current_size = i;
- for(int j=nchilds; j>0; j--)
- {
+ for (int j=nchilds; j>0; j--) {
child[j-1]->cut_size[i-1] = bt[j][current_size];
current_size -= bt[j][current_size];
}
@@ -468,26 +439,22 @@ struct VBVH_optimalPackSIMD
void calc_costs(Node *node)
{
- if( RE_rayobject_isAligned(node->child) )
- {
+ if ( RE_rayobject_isAligned(node->child) ) {
int nchilds = 0;
- for(Node *child = node->child; child && RE_rayobject_isAligned(child); child = child->sibling)
- {
+ for (Node *child = node->child; child && RE_rayobject_isAligned(child); child = child->sibling) {
calc_costs(child);
nchilds++;
}
- for(int i=0; i<MAX_CUT_SIZE; i++)
+ for (int i=0; i<MAX_CUT_SIZE; i++)
node->cut_cost[i] = INFINITY;
//We are not allowed to look on nodes with with so many childs
- if(nchilds > MAX_CUT_SIZE)
- {
+ if (nchilds > MAX_CUT_SIZE) {
float cost = 0;
float parent_area = bb_area(node->bb, node->bb+3);
- for(Node *child = node->child; child && RE_rayobject_isAligned(child); child = child->sibling)
- {
+ for (Node *child = node->child; child && RE_rayobject_isAligned(child); child = child->sibling) {
cost += ((parent_area != 0.0f)? ( bb_area(child->bb, child->bb+3) / parent_area ): 1.0f) * child->get_cost(1);
}
@@ -495,16 +462,13 @@ struct VBVH_optimalPackSIMD
node->cut_cost[0] = cost;
node->best_cutsize = nchilds;
}
- else
- {
+ else {
calc_best calc(node);
//calc expected cost if we optimaly pack this node
- for(int cutsize=nchilds; cutsize<=MAX_CUT_SIZE; cutsize++)
- {
+ for (int cutsize=nchilds; cutsize<=MAX_CUT_SIZE; cutsize++) {
float m = node->get_cost(cutsize) + testcost(cutsize);
- if(m < node->cut_cost[0])
- {
+ if (m < node->cut_cost[0]) {
node->cut_cost[0] = m;
node->best_cutsize = cutsize;
}
@@ -512,24 +476,22 @@ struct VBVH_optimalPackSIMD
}
assert(node->cut_cost[0] != INFINITY);
}
- else
- {
+ else {
node->cut_cost[0] = 1.0f;
- for(int i=1; i<MAX_CUT_SIZE; i++)
+ for (int i = 1; i < MAX_CUT_SIZE; i++)
node->cut_cost[i] = INFINITY;
}
}
Node *transform(Node *node)
{
- if(RE_rayobject_isAligned(node->child))
- {
+ if (RE_rayobject_isAligned(node->child)) {
static int num = 0;
bool first = false;
- if(num == 0) { num++; first = true; }
+ if (num == 0) { num++; first = true; }
calc_costs(node);
- if((G.debug & G_DEBUG) && first) printf("expected cost = %f (%d)\n", node->cut_cost[0], node->best_cutsize );
+ if ((G.debug & G_DEBUG) && first) printf("expected cost = %f (%d)\n", node->cut_cost[0], node->best_cutsize );
node->optimize();
}
return node;
diff --git a/source/blender/render/intern/raytrace/svbvh.h b/source/blender/render/intern/raytrace/svbvh.h
index e0e96781f36..a4044db8208 100644
--- a/source/blender/render/intern/raytrace/svbvh.h
+++ b/source/blender/render/intern/raytrace/svbvh.h
@@ -94,9 +94,9 @@ static int svbvh_bb_intersect_test(const Isect *isec, const float *_bb)
RE_RC_COUNT(isec->raycounter->bb.test);
- if(t1x > t2y || t2x < t1y || t1x > t2z || t2x < t1z || t1y > t2z || t2y < t1z) return 0;
- if(t2x < 0.0 || t2y < 0.0 || t2z < 0.0) return 0;
- if(t1x > isec->dist || t1y > isec->dist || t1z > isec->dist) return 0;
+ if (t1x > t2y || t2x < t1y || t1x > t2z || t2x < t1z || t1y > t2z || t2y < t1z) return 0;
+ if (t2x < 0.0 || t2y < 0.0 || t2z < 0.0) return 0;
+ if (t1x > isec->dist || t1y > isec->dist || t1z > isec->dist) return 0;
RE_RC_COUNT(isec->raycounter->bb.hit);
@@ -116,40 +116,39 @@ static int svbvh_node_stack_raycast(SVBVHNode *root, Isect *isec)
stack[stack_pos++] = root;
- while(stack_pos)
- {
+ while (stack_pos) {
node = stack[--stack_pos];
- if(!svbvh_node_is_leaf(node))
- {
+ if (!svbvh_node_is_leaf(node)) {
int nchilds= node->nchilds;
- if(nchilds == 4) {
+ if (nchilds == 4) {
float *child_bb= node->child_bb;
int res = svbvh_bb_intersect_test_simd4(isec, ((__m128*) (child_bb)));
SVBVHNode **child= node->child;
RE_RC_COUNT(isec->raycounter->simd_bb.test);
- if(res & 1) { stack[stack_pos++] = child[0]; RE_RC_COUNT(isec->raycounter->simd_bb.hit); }
- if(res & 2) { stack[stack_pos++] = child[1]; RE_RC_COUNT(isec->raycounter->simd_bb.hit); }
- if(res & 4) { stack[stack_pos++] = child[2]; RE_RC_COUNT(isec->raycounter->simd_bb.hit); }
- if(res & 8) { stack[stack_pos++] = child[3]; RE_RC_COUNT(isec->raycounter->simd_bb.hit); }
+ if (res & 1) { stack[stack_pos++] = child[0]; RE_RC_COUNT(isec->raycounter->simd_bb.hit); }
+ if (res & 2) { stack[stack_pos++] = child[1]; RE_RC_COUNT(isec->raycounter->simd_bb.hit); }
+ if (res & 4) { stack[stack_pos++] = child[2]; RE_RC_COUNT(isec->raycounter->simd_bb.hit); }
+ if (res & 8) { stack[stack_pos++] = child[3]; RE_RC_COUNT(isec->raycounter->simd_bb.hit); }
}
else {
float *child_bb= node->child_bb;
SVBVHNode **child= node->child;
int i;
- for(i=0; i<nchilds; i++)
- if(svbvh_bb_intersect_test(isec, (float*)child_bb+6*i))
+ for (i = 0; i < nchilds; i++) {
+ if (svbvh_bb_intersect_test(isec, (float *)child_bb + 6 * i)) {
stack[stack_pos++] = child[i];
+ }
+ }
}
}
- else
- {
+ else {
hit |= RE_rayobject_intersect((RayObject*)node, isec);
- if(SHADOW && hit) break;
+ if (SHADOW && hit) break;
}
}
@@ -160,25 +159,20 @@ static int svbvh_node_stack_raycast(SVBVHNode *root, Isect *isec)
template<>
inline void bvh_node_merge_bb<SVBVHNode>(SVBVHNode *node, float *min, float *max)
{
- if(is_leaf(node))
- {
+ if (is_leaf(node)) {
RE_rayobject_merge_bb((RayObject*)node, min, max);
}
- else
- {
+ else {
int i=0;
- while(i+4 <= node->nchilds)
- {
+ while (i+4 <= node->nchilds) {
float *res = node->child_bb + 6*i;
- for(int j=0; j<3; j++)
- {
+ for (int j = 0; j < 3; j++) {
min[j] = MIN2(min[j], res[4*j+0]);
min[j] = MIN2(min[j], res[4*j+1]);
min[j] = MIN2(min[j], res[4*j+2]);
min[j] = MIN2(min[j], res[4*j+3]);
}
- for(int j=0; j<3; j++)
- {
+ for (int j = 0; j < 3; j++) {
max[j] = MAX2(max[j], res[4*(j+3)+0]);
max[j] = MAX2(max[j], res[4*(j+3)+1]);
max[j] = MAX2(max[j], res[4*(j+3)+2]);
@@ -188,10 +182,9 @@ inline void bvh_node_merge_bb<SVBVHNode>(SVBVHNode *node, float *min, float *max
i += 4;
}
- for(; i<node->nchilds; i++)
- {
- DO_MIN(node->child_bb+6*i , min);
- DO_MAX(node->child_bb+3+6*i, max);
+ for ( ; i < node->nchilds; i++) {
+ DO_MIN(node->child_bb + 6 * i, min);
+ DO_MAX(node->child_bb + 3 + 6 * i, max);
}
}
}
@@ -218,17 +211,19 @@ struct Reorganize_SVBVH
childs_per_node = 0;
useless_bb = 0;
- for(int i=0; i<16; i++)
+ for (int i = 0; i < 16; i++) {
nodes_with_childs[i] = 0;
+ }
}
~Reorganize_SVBVH()
{
- if(G.debug & G_DEBUG) {
+ if (G.debug & G_DEBUG) {
printf("%f childs per node\n", childs_per_node / nodes);
printf("%d childs BB are useless\n", useless_bb);
- for(int i=0; i<16; i++)
+ for (int i = 0; i < 16; i++) {
printf("%i childs per node: %d/%d = %f\n", i, nodes_with_childs[i], nodes, nodes_with_childs[i]/float(nodes));
+ }
}
}
@@ -248,14 +243,12 @@ struct Reorganize_SVBVH
void prepare_for_simd(SVBVHNode *node)
{
int i=0;
- while(i+4 <= node->nchilds)
- {
+ while (i + 4 <= node->nchilds) {
float vec_tmp[4*6];
float *res = node->child_bb+6*i;
std::copy(res, res+6*4, vec_tmp);
- for(int j=0; j<6; j++)
- {
+ for (int j=0; j<6; j++) {
res[4*j+0] = vec_tmp[6*0+j];
res[4*j+1] = vec_tmp[6*1+j];
res[4*j+2] = vec_tmp[6*2+j];
@@ -274,26 +267,25 @@ struct Reorganize_SVBVH
SVBVHNode *transform(OldNode *old)
{
- if(is_leaf(old))
+ if (is_leaf(old))
return (SVBVHNode*)old;
- if(is_leaf(old->child))
+ if (is_leaf(old->child))
return (SVBVHNode*)old->child;
int nchilds = count_childs(old);
int alloc_childs = nchilds;
- if(nchilds % 4 > 2)
+ if (nchilds % 4 > 2)
alloc_childs = padup(nchilds, 4);
SVBVHNode *node = create_node(alloc_childs);
childs_per_node += nchilds;
nodes++;
- if(nchilds < 16)
+ if (nchilds < 16)
nodes_with_childs[nchilds]++;
useless_bb += alloc_childs-nchilds;
- while(alloc_childs > nchilds)
- {
+ while (alloc_childs > nchilds) {
const static float def_bb[6] = { FLT_MAX, FLT_MAX, FLT_MAX, FLT_MIN, FLT_MIN, FLT_MIN };
alloc_childs--;
node->child[alloc_childs] = NULL;
@@ -301,20 +293,17 @@ struct Reorganize_SVBVH
}
int i=nchilds;
- for(OldNode *o_child = old->child; o_child; o_child = o_child->sibling)
- {
+ for (OldNode *o_child = old->child; o_child; o_child = o_child->sibling) {
i--;
node->child[i] = transform(o_child);
- if(is_leaf(o_child))
- {
+ if (is_leaf(o_child)) {
float bb[6];
INIT_MINMAX(bb, bb+3);
RE_rayobject_merge_bb((RayObject*)o_child, bb, bb+3);
copy_bb(node->child_bb+i*6, bb);
break;
}
- else
- {
+ else {
copy_bb(node->child_bb+i*6, o_child->bb);
}
}
diff --git a/source/blender/render/intern/raytrace/vbvh.h b/source/blender/render/intern/raytrace/vbvh.h
index 1c84cd23510..d8ff9000a3f 100644
--- a/source/blender/render/intern/raytrace/vbvh.h
+++ b/source/blender/render/intern/raytrace/vbvh.h
@@ -57,17 +57,14 @@ inline static void bvh_node_push_childs(Node *node, Isect *UNUSED(isec), Node **
{
Node *child = node->child;
- if(is_leaf(child))
- {
+ if (is_leaf(child)) {
stack[stack_pos++] = child;
}
- else
- {
- while(child)
- {
+ else {
+ while (child) {
/* Skips BB tests on primitives */
#if 0
- if(is_leaf(child->child)) {
+ if (is_leaf(child->child)) {
stack[stack_pos++] = child->child;
}
else
@@ -86,10 +83,9 @@ template<class Node>
int count_childs(Node *parent)
{
int n = 0;
- for(Node *i = parent->child; i; i = i->sibling)
- {
+ for (Node *i = parent->child; i; i = i->sibling) {
n++;
- if(is_leaf(i))
+ if (is_leaf(i))
break;
}
@@ -100,7 +96,7 @@ int count_childs(Node *parent)
template<class Node>
void append_sibling(Node *node, Node *sibling)
{
- while(node->sibling)
+ while (node->sibling)
node = node->sibling;
node->sibling = sibling;
@@ -118,7 +114,7 @@ struct BuildBinaryVBVH
void test_break()
{
- if(RE_rayobjectcontrol_test_break(control))
+ if (RE_rayobjectcontrol_test_break(control))
throw "Stop";
}
@@ -131,7 +127,7 @@ struct BuildBinaryVBVH
Node *create_node()
{
Node *node = (Node*)BLI_memarena_alloc( arena, sizeof(Node) );
- assert( RE_rayobject_isAligned(node) );
+ assert(RE_rayobject_isAligned(node));
node->sibling = NULL;
node->child = NULL;
@@ -160,19 +156,17 @@ struct BuildBinaryVBVH
{
int size = rtbuild_size(builder);
- if(size == 0) {
+ if (size == 0) {
return NULL;
}
- else if(size == 1)
- {
+ else if (size == 1) {
Node *node = create_node();
INIT_MINMAX(node->bb, node->bb+3);
rtbuild_merge_bb(builder, node->bb, node->bb+3);
node->child = (Node *) rtbuild_get_primitive(builder, 0);
return node;
}
- else
- {
+ else {
test_break();
Node *node = create_node();
@@ -183,8 +177,7 @@ struct BuildBinaryVBVH
INIT_MINMAX(node->bb, node->bb+3);
assert(nc == 2);
- for(int i=0; i<nc; i++)
- {
+ for (int i = 0; i < nc; i++) {
RTBuilder tmp;
rtbuild_get_child(builder, i, &tmp);
@@ -224,7 +217,7 @@ struct Reorganize_VBVH
VBVHNode *transform(OldNode *old)
{
- if(is_leaf(old))
+ if (is_leaf(old))
return (VBVHNode*)old;
VBVHNode *node = create_node();
@@ -237,7 +230,7 @@ struct Reorganize_VBVH
{
VBVHNode *n_child = transform(o_child);
*child_ptr = n_child;
- if(is_leaf(n_child)) return node;
+ if (is_leaf(n_child)) return node;
child_ptr = &n_child->sibling;
}
*child_ptr = 0;
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index 66ed0bd85a9..1fd10f83389 100644
--- a/source/blender/render/intern/source/convertblender.c
+++ b/source/blender/render/intern/source/convertblender.c
@@ -401,7 +401,7 @@ static void calc_edge_stress(Render *UNUSED(re), ObjectRen *obr, Mesh *me)
if (obr->totvert==0) return;
- mesh_get_texspace(me, loc, NULL, size);
+ BKE_mesh_texspace_get(me, loc, NULL, size);
accum= MEM_callocN(2*sizeof(float)*obr->totvert, "temp accum for stress");
@@ -469,11 +469,11 @@ static void calc_tangent_vector(ObjectRen *obr, VertexTangent **vtangents, MemAr
}
else if (v1->orco) {
uv1= uv[0]; uv2= uv[1]; uv3= uv[2]; uv4= uv[3];
- map_to_sphere( &uv[0][0], &uv[0][1],v1->orco[0], v1->orco[1], v1->orco[2]);
- map_to_sphere( &uv[1][0], &uv[1][1],v2->orco[0], v2->orco[1], v2->orco[2]);
- map_to_sphere( &uv[2][0], &uv[2][1],v3->orco[0], v3->orco[1], v3->orco[2]);
+ map_to_sphere(&uv[0][0], &uv[0][1], v1->orco[0], v1->orco[1], v1->orco[2]);
+ map_to_sphere(&uv[1][0], &uv[1][1], v2->orco[0], v2->orco[1], v2->orco[2]);
+ map_to_sphere(&uv[2][0], &uv[2][1], v3->orco[0], v3->orco[1], v3->orco[2]);
if (v4)
- map_to_sphere( &uv[3][0], &uv[3][1],v4->orco[0], v4->orco[1], v4->orco[2]);
+ map_to_sphere(&uv[3][0], &uv[3][1], v4->orco[0], v4->orco[1], v4->orco[2]);
}
else return;
@@ -886,9 +886,9 @@ static void autosmooth(Render *UNUSED(re), ObjectRen *obr, float mat[][4], int d
/* skip wire faces */
if (vlr->v2 != vlr->v3) {
if (vlr->v4)
- normal_quad_v3( vlr->n,vlr->v4->co, vlr->v3->co, vlr->v2->co, vlr->v1->co);
+ normal_quad_v3(vlr->n, vlr->v4->co, vlr->v3->co, vlr->v2->co, vlr->v1->co);
else
- normal_tri_v3( vlr->n,vlr->v3->co, vlr->v2->co, vlr->v1->co);
+ normal_tri_v3(vlr->n, vlr->v3->co, vlr->v2->co, vlr->v1->co);
}
}
}
@@ -908,10 +908,10 @@ static float *get_object_orco(Render *re, Object *ob)
if (!orco) {
if (ELEM(ob->type, OB_CURVE, OB_FONT)) {
- orco = make_orco_curve(re->scene, ob);
+ orco = BKE_curve_make_orco(re->scene, ob);
}
else if (ob->type==OB_SURF) {
- orco = make_orco_surf(ob);
+ orco = BKE_curve_surf_make_orco(ob);
}
if (orco)
@@ -1061,7 +1061,7 @@ static void static_particle_strand(Render *re, ObjectRen *obr, Material *ma, Par
width= w;
/*cross is the radius of the strand so we want it to be half of full width */
- mul_v3_fl(cross,0.5f/crosslen);
+ mul_v3_fl(cross, 0.5f/crosslen);
}
else
width/=w;
@@ -1111,7 +1111,7 @@ static void static_particle_strand(Render *re, ObjectRen *obr, Material *ma, Par
vlr->v3->orco= sd->orco;
vlr->v3->accum= vlr->v4->accum;
- normal_quad_v3( vlr->n,vlr->v4->co, vlr->v3->co, vlr->v2->co, vlr->v1->co);
+ normal_quad_v3(vlr->n, vlr->v4->co, vlr->v3->co, vlr->v2->co, vlr->v1->co);
vlr->mat= ma;
vlr->ec= ME_V2V3;
@@ -1124,7 +1124,7 @@ static void static_particle_strand(Render *re, ObjectRen *obr, Material *ma, Par
if (sd->uvco) {
for (i=0; i<sd->totuv; i++) {
MTFace *mtf;
- mtf=RE_vlakren_get_tface(obr,vlr,i,NULL,1);
+ mtf=RE_vlakren_get_tface(obr, vlr, i, NULL, 1);
mtf->uv[0][0]=mtf->uv[1][0]=
mtf->uv[2][0]=mtf->uv[3][0]=(sd->uvco+2*i)[0];
mtf->uv[0][1]=mtf->uv[1][1]=
@@ -1132,7 +1132,7 @@ static void static_particle_strand(Render *re, ObjectRen *obr, Material *ma, Par
}
if (sd->override_uv>=0) {
MTFace *mtf;
- mtf=RE_vlakren_get_tface(obr,vlr,sd->override_uv,NULL,0);
+ mtf=RE_vlakren_get_tface(obr, vlr, sd->override_uv, NULL, 0);
mtf->uv[0][0]=mtf->uv[3][0]=0.0f;
mtf->uv[1][0]=mtf->uv[2][0]=1.0f;
@@ -1144,7 +1144,7 @@ static void static_particle_strand(Render *re, ObjectRen *obr, Material *ma, Par
if (sd->mcol) {
for (i=0; i<sd->totcol; i++) {
MCol *mc;
- mc=RE_vlakren_get_mcol(obr,vlr,i,NULL,1);
+ mc=RE_vlakren_get_mcol(obr, vlr, i, NULL, 1);
mc[0]=mc[1]=mc[2]=mc[3]=sd->mcol[i];
mc[0]=mc[1]=mc[2]=mc[3]=sd->mcol[i];
}
@@ -1189,22 +1189,22 @@ static void static_particle_strand(Render *re, ObjectRen *obr, Material *ma, Par
if (sd->adapt) {
second=0;
- copy_v3_v3(anor,nor);
- copy_v3_v3(avec,vec);
+ copy_v3_v3(anor, nor);
+ copy_v3_v3(avec, vec);
}
}
else if (sd->adapt) {
- float dvec[3],pvec[3];
- sub_v3_v3v3(dvec,avec,vec);
- project_v3_v3v3(pvec,dvec,vec);
- sub_v3_v3v3(dvec,dvec,pvec);
+ float dvec[3], pvec[3];
+ sub_v3_v3v3(dvec, avec, vec);
+ project_v3_v3v3(pvec, dvec, vec);
+ sub_v3_v3v3(dvec, dvec, pvec);
w= vec[2]*re->winmat[2][3] + re->winmat[3][3];
dx= re->winx*dvec[0]*re->winmat[0][0]/w;
dy= re->winy*dvec[1]*re->winmat[1][1]/w;
w= sqrt(dx*dx + dy*dy);
- if (dot_v3v3(anor,nor)<sd->adapt_angle && w>sd->adapt_pix) {
+ if (dot_v3v3(anor, nor)<sd->adapt_angle && w>sd->adapt_pix) {
vlr= RE_findOrAddVlak(obr, obr->totvlak++);
vlr->flag= flag;
vlr->v1= v1;
@@ -1215,8 +1215,8 @@ static void static_particle_strand(Render *re, ObjectRen *obr, Material *ma, Par
v1= vlr->v4; // cycle
v2= vlr->v3; // cycle
- copy_v3_v3(anor,nor);
- copy_v3_v3(avec,vec);
+ copy_v3_v3(anor, nor);
+ copy_v3_v3(avec, vec);
}
else {
vlr= RE_findOrAddVlak(obr, obr->totvlak-1);
@@ -1235,7 +1235,7 @@ static void static_particle_strand(Render *re, ObjectRen *obr, Material *ma, Par
vlr->v3->orco= sd->orco;
vlr->v3->accum= vlr->v4->accum;
- normal_quad_v3( vlr->n,vlr->v4->co, vlr->v3->co, vlr->v2->co, vlr->v1->co);
+ normal_quad_v3(vlr->n, vlr->v4->co, vlr->v3->co, vlr->v2->co, vlr->v1->co);
vlr->mat= ma;
vlr->ec= ME_V2V3;
@@ -1248,7 +1248,7 @@ static void static_particle_strand(Render *re, ObjectRen *obr, Material *ma, Par
if (sd->uvco) {
for (i=0; i<sd->totuv; i++) {
MTFace *mtf;
- mtf=RE_vlakren_get_tface(obr,vlr,i,NULL,1);
+ mtf=RE_vlakren_get_tface(obr, vlr, i, NULL, 1);
mtf->uv[0][0]=mtf->uv[1][0]=
mtf->uv[2][0]=mtf->uv[3][0]=(sd->uvco+2*i)[0];
mtf->uv[0][1]=mtf->uv[1][1]=
@@ -1256,7 +1256,7 @@ static void static_particle_strand(Render *re, ObjectRen *obr, Material *ma, Par
}
if (sd->override_uv>=0) {
MTFace *mtf;
- mtf=RE_vlakren_get_tface(obr,vlr,sd->override_uv,NULL,0);
+ mtf=RE_vlakren_get_tface(obr, vlr, sd->override_uv, NULL, 0);
mtf->uv[0][0]=mtf->uv[3][0]=0.0f;
mtf->uv[1][0]=mtf->uv[2][0]=1.0f;
@@ -1268,7 +1268,7 @@ static void static_particle_strand(Render *re, ObjectRen *obr, Material *ma, Par
if (sd->mcol) {
for (i=0; i<sd->totcol; i++) {
MCol *mc;
- mc=RE_vlakren_get_mcol(obr,vlr,i,NULL,1);
+ mc=RE_vlakren_get_mcol(obr, vlr, i, NULL, 1);
mc[0]=mc[1]=mc[2]=mc[3]=sd->mcol[i];
mc[0]=mc[1]=mc[2]=mc[3]=sd->mcol[i];
}
@@ -1372,11 +1372,11 @@ static void particle_billboard(Render *re, ObjectRen *obr, Material *ma, Particl
sub_v3_v3(vlr->v4->co, yvec);
mul_m4_v3(re->viewmat, vlr->v4->co);
- normal_quad_v3( vlr->n,vlr->v4->co, vlr->v3->co, vlr->v2->co, vlr->v1->co);
- copy_v3_v3(vlr->v1->n,vlr->n);
- copy_v3_v3(vlr->v2->n,vlr->n);
- copy_v3_v3(vlr->v3->n,vlr->n);
- copy_v3_v3(vlr->v4->n,vlr->n);
+ normal_quad_v3(vlr->n, vlr->v4->co, vlr->v3->co, vlr->v2->co, vlr->v1->co);
+ copy_v3_v3(vlr->v1->n, vlr->n);
+ copy_v3_v3(vlr->v2->n, vlr->n);
+ copy_v3_v3(vlr->v3->n, vlr->n);
+ copy_v3_v3(vlr->v4->n, vlr->n);
vlr->mat= ma;
vlr->ec= ME_V2V3;
@@ -1395,8 +1395,8 @@ static void particle_billboard(Render *re, ObjectRen *obr, Material *ma, Particl
time = (float)fmod((bb->tilt + 1.0f) / 2.0f, 1.0);
}
else {
- float axis1[3] = {0.0f,0.0f,0.0f};
- float axis2[3] = {0.0f,0.0f,0.0f};
+ float axis1[3] = {0.0f, 0.0f, 0.0f};
+ float axis2[3] = {0.0f, 0.0f, 0.0f};
axis1[(bb->align + 1) % 3] = 1.0f;
axis2[(bb->align + 2) % 3] = 1.0f;
@@ -1472,7 +1472,7 @@ static void particle_normal_ren(short ren_as, ParticleSettings *part, Render *re
if (ren_as != PART_DRAW_BB)
mul_m4_v3(re->viewmat, loc);
- switch(ren_as) {
+ switch (ren_as) {
case PART_DRAW_LINE:
sd->line = 1;
sd->time = 0.0f;
@@ -1518,7 +1518,7 @@ static void get_particle_uvco_mcol(short from, DerivedMesh *dm, float *fuv, int
int i;
/* get uvco */
- if (sd->uvco && ELEM(from,PART_FROM_FACE,PART_FROM_VOLUME)) {
+ if (sd->uvco && ELEM(from, PART_FROM_FACE, PART_FROM_VOLUME)) {
for (i=0; i<sd->totuv; i++) {
if (num != DMCACHE_NOTFOUND) {
MFace *mface = dm->getTessFaceData(dm, num, CD_MFACE);
@@ -1535,7 +1535,7 @@ static void get_particle_uvco_mcol(short from, DerivedMesh *dm, float *fuv, int
}
/* get mcol */
- if (sd->mcol && ELEM(from,PART_FROM_FACE,PART_FROM_VOLUME)) {
+ if (sd->mcol && ELEM(from, PART_FROM_FACE, PART_FROM_VOLUME)) {
for (i=0; i<sd->totcol; i++) {
if (num != DMCACHE_NOTFOUND) {
MFace *mface = dm->getTessFaceData(dm, num, CD_MFACE);
@@ -1557,7 +1557,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
ParticleSystemModifierData *psmd;
ParticleSystem *tpsys=0;
ParticleSettings *part, *tpart=0;
- ParticleData *pars, *pa=0,*tpa=0;
+ ParticleData *pars, *pa=0, *tpa=0;
ParticleKey *states=0;
ParticleKey state;
ParticleCacheKey *cache=0;
@@ -1569,12 +1569,12 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
StrandBound *sbound= 0;
StrandRen *strand=0;
RNG *rng= 0;
- float loc[3],loc1[3],loc0[3],mat[4][4],nmat[3][3],co[3],nor[3],duplimat[4][4];
+ float loc[3], loc1[3], loc0[3], mat[4][4], nmat[3][3], co[3], nor[3], duplimat[4][4];
float strandlen=0.0f, curlen=0.0f;
float hasize, pa_size, r_tilt, r_length;
float pa_time, pa_birthtime, pa_dietime;
float random, simplify[2], pa_co[3];
- const float cfra= BKE_curframe(re->scene);
+ const float cfra= BKE_scene_frame_get(re->scene);
int i, a, k, max_k=0, totpart, dosimplify = 0, dosurfacecache = 0, use_duplimat = 0;
int totchild=0;
int seed, path_nbr=0, orco1=0, num;
@@ -1597,7 +1597,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
/* 2. start initializing things */
/* last possibility to bail out! */
- psmd = psys_get_modifier(ob,psys);
+ psmd = psys_get_modifier(ob, psys);
if (!(psmd->modifier.mode & eModifierMode_Render))
return 0;
@@ -1702,7 +1702,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
/* 2.6 setup strand rendering */
if (part->ren_as == PART_DRAW_PATH && psys->pathcache) {
- path_nbr=(int)pow(2.0,(double) part->ren_step);
+ path_nbr=(int)pow(2.0, (double) part->ren_step);
if (path_nbr) {
if (!ELEM(ma->material_type, MA_TYPE_HALO, MA_TYPE_WIRE)) {
@@ -1770,7 +1770,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
psys->lattice = psys_get_lattice(&sim);
/* 3. start creating renderable things */
- for (a=0,pa=pars; a<totpart+totchild; a++, pa++, seed++) {
+ for (a=0, pa=pars; a<totpart+totchild; a++, pa++, seed++) {
random = rng_getFloat(rng);
/* setup per particle individual stuff */
if (a<totpart) {
@@ -1786,10 +1786,10 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
/* get orco */
if (tpsys && part->phystype == PART_PHYS_NO) {
tpa = tpsys->particles + pa->num;
- psys_particle_on_emitter(psmd,tpart->from,tpa->num,pa->num_dmcache,tpa->fuv,tpa->foffset,co,nor,0,0,sd.orco,0);
+ psys_particle_on_emitter(psmd, tpart->from, tpa->num, pa->num_dmcache, tpa->fuv, tpa->foffset, co, nor, 0, 0, sd.orco, 0);
}
else
- psys_particle_on_emitter(psmd,part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,co,nor,0,0,sd.orco,0);
+ psys_particle_on_emitter(psmd, part->from, pa->num, pa->num_dmcache, pa->fuv, pa->foffset, co, nor, 0, 0, sd.orco, 0);
/* get uvco & mcol */
num= pa->num_dmcache;
@@ -1835,14 +1835,14 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
/* get orco */
if (part->childtype == PART_CHILD_FACES) {
psys_particle_on_emitter(psmd,
- PART_FROM_FACE, cpa->num,DMCACHE_ISCHILD,
- cpa->fuv,cpa->foffset,co,nor,0,0,sd.orco,0);
+ PART_FROM_FACE, cpa->num, DMCACHE_ISCHILD,
+ cpa->fuv, cpa->foffset, co, nor, 0, 0, sd.orco, 0);
}
else {
ParticleData *par = psys->particles + cpa->parent;
psys_particle_on_emitter(psmd, part->from,
- par->num,DMCACHE_ISCHILD,par->fuv,
- par->foffset,co,nor,0,0,sd.orco,0);
+ par->num, DMCACHE_ISCHILD, par->fuv,
+ par->foffset, co, nor, 0, 0, sd.orco, 0);
}
/* get uvco & mcol */
@@ -1943,8 +1943,8 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
float time;
if (k<=max_k) {
- copy_v3_v3(state.co,(cache+k)->co);
- copy_v3_v3(state.vel,(cache+k)->vel);
+ copy_v3_v3(state.co, (cache+k)->co);
+ copy_v3_v3(state.vel, (cache+k)->vel);
}
else
continue;
@@ -1953,8 +1953,8 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
curlen += len_v3v3((cache+k-1)->co, (cache+k)->co);
time= curlen/strandlen;
- copy_v3_v3(loc,state.co);
- mul_m4_v3(re->viewmat,loc);
+ copy_v3_v3(loc, state.co);
+ mul_m4_v3(re->viewmat, loc);
if (strandbuf) {
copy_v3_v3(svert->co, loc);
@@ -1968,8 +1968,8 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
if (k==1) {
sd.first = 1;
sd.time = 0.0f;
- sub_v3_v3v3(loc0,loc1,loc);
- add_v3_v3v3(loc0,loc1,loc0);
+ sub_v3_v3v3(loc0, loc1, loc);
+ add_v3_v3v3(loc0, loc1, loc0);
particle_curve(re, obr, psmd->dm, ma, &sd, loc1, loc0, seed, pa_co);
}
@@ -1980,7 +1980,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
if (k)
particle_curve(re, obr, psmd->dm, ma, &sd, loc, loc1, seed, pa_co);
- copy_v3_v3(loc1,loc);
+ copy_v3_v3(loc1, loc);
}
}
@@ -2005,7 +2005,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
continue;
state.time = (part->draw & PART_ABS_PATH_TIME) ? -ct : ct;
- psys_get_particle_on_path(&sim,a,&state,1);
+ psys_get_particle_on_path(&sim, a, &state, 1);
if (psys->parent)
mul_m4_v3(psys->parent->obmat, state.co);
@@ -2042,7 +2042,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
}
else {
state.time=cfra;
- if (psys_get_particle_state(&sim,a,&state,0)==0)
+ if (psys_get_particle_state(&sim, a, &state, 0)==0)
continue;
if (psys->parent)
@@ -2363,7 +2363,7 @@ static void displace_render_face(Render *re, ObjectRen *obr, VlakRen *vlr, float
/* Displace the verts, flag is set when done */
if (!vlr->v1->flag)
- displace_render_vert(re, obr, &shi, vlr->v1,0, scale, mat, imat);
+ displace_render_vert(re, obr, &shi, vlr->v1, 0, scale, mat, imat);
if (!vlr->v2->flag)
displace_render_vert(re, obr, &shi, vlr->v2, 1, scale, mat, imat);
@@ -2383,10 +2383,10 @@ static void displace_render_face(Render *re, ObjectRen *obr, VlakRen *vlr, float
/* Recalculate the face normal - if flipped before, flip now */
if (vlr->v4) {
- normal_quad_v3( vlr->n,vlr->v4->co, vlr->v3->co, vlr->v2->co, vlr->v1->co);
+ normal_quad_v3(vlr->n, vlr->v4->co, vlr->v3->co, vlr->v2->co, vlr->v1->co);
}
else {
- normal_tri_v3( vlr->n,vlr->v3->co, vlr->v2->co, vlr->v1->co);
+ normal_tri_v3(vlr->n, vlr->v3->co, vlr->v2->co, vlr->v1->co);
}
}
@@ -2437,7 +2437,7 @@ static void init_render_mball(Render *re, ObjectRen *obr)
int a, need_orco, vlakindex, *index, negative_scale;
ListBase dispbase= {NULL, NULL};
- if (ob!=find_basis_mball(re->scene, ob))
+ if (ob!=BKE_mball_basis_find(re->scene, ob))
return;
mult_m4_m4m4(mat, re->viewmat, ob->obmat);
@@ -2452,7 +2452,7 @@ static void init_render_mball(Render *re, ObjectRen *obr)
need_orco= 1;
}
- makeDispListMBall_forRender(re->scene, ob, &dispbase);
+ BKE_displist_make_mball_forRender(re->scene, ob, &dispbase);
dl= dispbase.first;
if (dl==0) return;
@@ -2463,7 +2463,7 @@ static void init_render_mball(Render *re, ObjectRen *obr)
if (!orco) {
/* orco hasn't been found in cache - create new one and add to cache */
- orco= make_orco_mball(ob, &dispbase);
+ orco= BKE_mball_make_orco(ob, &dispbase);
set_object_orco(re, ob, orco);
}
}
@@ -2502,9 +2502,9 @@ static void init_render_mball(Render *re, ObjectRen *obr)
vlr->v4= 0;
if (negative_scale)
- normal_tri_v3( vlr->n,vlr->v1->co, vlr->v2->co, vlr->v3->co);
+ normal_tri_v3(vlr->n, vlr->v1->co, vlr->v2->co, vlr->v3->co);
else
- normal_tri_v3( vlr->n,vlr->v3->co, vlr->v2->co, vlr->v1->co);
+ normal_tri_v3(vlr->n, vlr->v3->co, vlr->v2->co, vlr->v1->co);
vlr->mat= ma;
vlr->flag= ME_SMOOTH;
@@ -2519,14 +2519,14 @@ static void init_render_mball(Render *re, ObjectRen *obr)
vlr1->v2= vlr1->v3;
vlr1->v3= RE_findOrAddVert(obr, index[3]);
if (negative_scale)
- normal_tri_v3( vlr1->n,vlr1->v1->co, vlr1->v2->co, vlr1->v3->co);
+ normal_tri_v3(vlr1->n, vlr1->v1->co, vlr1->v2->co, vlr1->v3->co);
else
- normal_tri_v3( vlr1->n,vlr1->v3->co, vlr1->v2->co, vlr1->v1->co);
+ normal_tri_v3(vlr1->n, vlr1->v3->co, vlr1->v2->co, vlr1->v1->co);
}
}
/* enforce display lists remade */
- freedisplist(&dispbase);
+ BKE_displist_free(&dispbase);
}
/* ------------------------------------------------------------------------- */
@@ -2610,7 +2610,7 @@ static int dl_surf_to_renderdata(ObjectRen *obr, DispList *dl, Material **matar,
vlr= RE_findOrAddVlak(obr, obr->totvlak++);
vlr->v1= v1; vlr->v2= v2; vlr->v3= v3; vlr->v4= v4;
- normal_quad_v3( n1,vlr->v4->co, vlr->v3->co, vlr->v2->co, vlr->v1->co);
+ normal_quad_v3(n1, vlr->v4->co, vlr->v3->co, vlr->v2->co, vlr->v1->co);
copy_v3_v3(vlr->n, n1);
@@ -2630,8 +2630,7 @@ static int dl_surf_to_renderdata(ObjectRen *obr, DispList *dl, Material **matar,
sizeu--; sizev--; /* dec size for face array */
if (dl->flag & DL_CYCL_V) {
- for (v = 0; v < sizev; v++)
- {
+ for (v = 0; v < sizev; v++) {
/* optimize! :*/
vlr= RE_findOrAddVlak(obr, UVTOINDEX(sizeu - 1, v));
vlr1= RE_findOrAddVlak(obr, UVTOINDEX(0, v));
@@ -2643,8 +2642,7 @@ static int dl_surf_to_renderdata(ObjectRen *obr, DispList *dl, Material **matar,
}
if (dl->flag & DL_CYCL_U) {
- for (u = 0; u < sizeu; u++)
- {
+ for (u = 0; u < sizeu; u++) {
/* optimize! :*/
vlr= RE_findOrAddVlak(obr, UVTOINDEX(u, 0));
vlr1= RE_findOrAddVlak(obr, UVTOINDEX(u, sizev-1));
@@ -2673,12 +2671,12 @@ static int dl_surf_to_renderdata(ObjectRen *obr, DispList *dl, Material **matar,
*/
if ((dl->flag & DL_CYCL_V) && (dl->flag & DL_CYCL_U)) {
- vlr= RE_findOrAddVlak(obr, UVTOINDEX(sizeu - 1, sizev - 1)); /* (m,n) */
- vlr1= RE_findOrAddVlak(obr, UVTOINDEX(0,0)); /* (0,0) */
+ vlr= RE_findOrAddVlak(obr, UVTOINDEX(sizeu - 1, sizev - 1)); /* (m, n) */
+ vlr1= RE_findOrAddVlak(obr, UVTOINDEX(0, 0)); /* (0, 0) */
add_v3_v3v3(n1, vlr->n, vlr1->n);
- vlr2= RE_findOrAddVlak(obr, UVTOINDEX(0, sizev-1)); /* (0,n) */
+ vlr2= RE_findOrAddVlak(obr, UVTOINDEX(0, sizev-1)); /* (0, n) */
add_v3_v3(n1, vlr2->n);
- vlr3= RE_findOrAddVlak(obr, UVTOINDEX(sizeu-1, 0)); /* (m,0) */
+ vlr3= RE_findOrAddVlak(obr, UVTOINDEX(sizeu-1, 0)); /* (m, 0) */
add_v3_v3(n1, vlr3->n);
copy_v3_v3(vlr->v3->n, n1);
copy_v3_v3(vlr1->v1->n, n1);
@@ -2756,9 +2754,9 @@ static void init_render_dm(DerivedMesh *dm, Render *re, ObjectRen *obr,
/* render normals are inverted in render */
if (vlr->v4)
- len= normal_quad_v3( vlr->n,vlr->v4->co, vlr->v3->co, vlr->v2->co, vlr->v1->co);
+ len= normal_quad_v3(vlr->n, vlr->v4->co, vlr->v3->co, vlr->v2->co, vlr->v1->co);
else
- len= normal_tri_v3( vlr->n,vlr->v3->co, vlr->v2->co, vlr->v1->co);
+ len= normal_tri_v3(vlr->n, vlr->v3->co, vlr->v2->co, vlr->v1->co);
vlr->mat= ma;
vlr->flag= flag;
@@ -2830,11 +2828,11 @@ static void init_render_surf(Render *re, ObjectRen *obr, int timeoffset)
if (ob->parent && (ob->parent->type==OB_LATTICE)) need_orco= 1;
- makeDispListSurf(re->scene, ob, &displist, &dm, 1, 0);
+ BKE_displist_make_surf(re->scene, ob, &displist, &dm, 1, 0);
if (dm) {
if (need_orco) {
- orco= makeOrcoDispList(re->scene, ob, dm, 1);
+ orco= BKE_displist_make_orco(re->scene, ob, dm, 1);
if (orco) {
set_object_orco(re, ob, orco);
}
@@ -2856,7 +2854,7 @@ static void init_render_surf(Render *re, ObjectRen *obr, int timeoffset)
}
}
- freedisplist(&displist);
+ BKE_displist_free(&displist);
MEM_freeN(matar);
}
@@ -2880,7 +2878,7 @@ static void init_render_curve(Render *re, ObjectRen *obr, int timeoffset)
if (ob->type==OB_FONT && cu->str==NULL) return;
else if (ob->type==OB_CURVE && cu->nurb.first==NULL) return;
- makeDispListCurveTypes_forRender(re->scene, ob, &disp, &dm, 0);
+ BKE_displist_make_curveTypes_forRender(re->scene, ob, &disp, &dm, 0);
dl= disp.first;
if (dl==NULL) return;
@@ -2900,7 +2898,7 @@ static void init_render_curve(Render *re, ObjectRen *obr, int timeoffset)
if (dm) {
if (need_orco) {
- orco= makeOrcoDispList(re->scene, ob, dm, 1);
+ orco= BKE_displist_make_orco(re->scene, ob, dm, 1);
if (orco) {
set_object_orco(re, ob, orco);
}
@@ -2983,7 +2981,7 @@ static void init_render_curve(Render *re, ObjectRen *obr, int timeoffset)
orco+= 3*dl_surf_to_renderdata(obr, dl, matar, orco, mat);
}
else {
- int p1,p2,p3,p4;
+ int p1, p2, p3, p4;
fp= dl->verts;
startvert= obr->totvert;
@@ -3007,7 +3005,7 @@ static void init_render_curve(Render *re, ObjectRen *obr, int timeoffset)
for (a=0; a<dl->parts; a++) {
- if (surfindex_displist(dl, a, &b, &p1, &p2, &p3, &p4)==0)
+ if (BKE_displist_surfindex_get(dl, a, &b, &p1, &p2, &p3, &p4)==0)
break;
p1+= startvert;
@@ -3064,7 +3062,7 @@ static void init_render_curve(Render *re, ObjectRen *obr, int timeoffset)
}
}
- freedisplist(&disp);
+ BKE_displist_free(&disp);
MEM_freeN(matar);
}
@@ -3439,15 +3437,15 @@ static void init_render_mesh(Render *re, ObjectRen *obr, int timeoffset)
MVert *mv= me->mvert;
if (vlr->v4)
- len= normal_quad_v3( vlr->n, mv[mf->v4].co, mv[mf->v3].co, mv[mf->v2].co, mv[mf->v1].co);
+ len= normal_quad_v3(vlr->n, mv[mf->v4].co, mv[mf->v3].co, mv[mf->v2].co, mv[mf->v1].co);
else
- len= normal_tri_v3( vlr->n,mv[mf->v3].co, mv[mf->v2].co, mv[mf->v1].co);
+ len= normal_tri_v3(vlr->n, mv[mf->v3].co, mv[mf->v2].co, mv[mf->v1].co);
}
else {
if (vlr->v4)
- len= normal_quad_v3( vlr->n,vlr->v4->co, vlr->v3->co, vlr->v2->co, vlr->v1->co);
+ len= normal_quad_v3(vlr->n, vlr->v4->co, vlr->v3->co, vlr->v2->co, vlr->v1->co);
else
- len= normal_tri_v3( vlr->n,vlr->v3->co, vlr->v2->co, vlr->v1->co);
+ len= normal_tri_v3(vlr->n, vlr->v3->co, vlr->v2->co, vlr->v1->co);
}
vlr->mat= ma;
@@ -3486,8 +3484,7 @@ static void init_render_mesh(Render *re, ObjectRen *obr, int timeoffset)
if (need_nmap_tangent != 0) {
const float * tangent = (const float *) layer->data;
float * ftang = RE_vlakren_get_nmap_tangent(obr, vlr, 1);
- for (vindex=0; vindex<nr_verts; vindex++)
- {
+ for (vindex=0; vindex<nr_verts; vindex++) {
copy_v4_v4(ftang+vindex*4, tangent+a*16+rev_tab[vindex]*4);
mul_mat3_m4_v3(mat, ftang+vindex*4);
normalize_v3(ftang+vindex*4);
@@ -3587,7 +3584,7 @@ static void initshadowbuf(Render *re, LampRen *lar, float mat[][4])
/* if (la->spsi<16) return; */
/* memory alloc */
- shb= (struct ShadBuf *)MEM_callocN( sizeof(struct ShadBuf),"initshadbuf");
+ shb= (struct ShadBuf *)MEM_callocN(sizeof(struct ShadBuf), "initshadbuf");
lar->shb= shb;
if (shb==NULL) return;
@@ -3686,7 +3683,7 @@ static GroupObject *add_render_lamp(Render *re, Object *ob)
BLI_addtail(&re->lights, go);
go->ob= ob;
/* lamprens are in own list, for freeing */
- lar= (LampRen *)MEM_callocN(sizeof(LampRen),"lampren");
+ lar= (LampRen *)MEM_callocN(sizeof(LampRen), "lampren");
BLI_addtail(&re->lampren, lar);
go->lampren= lar;
@@ -3763,7 +3760,7 @@ static GroupObject *add_render_lamp(Render *re, Object *ob)
lar->area_sizey= lar->area_size;
}
else if (lar->type==LA_AREA) {
- switch(lar->area_shape) {
+ switch (lar->area_shape) {
case LA_AREA_SQUARE:
lar->ray_totsamp= lar->ray_samp*lar->ray_samp;
lar->ray_sampy= lar->ray_samp;
@@ -3797,7 +3794,7 @@ static GroupObject *add_render_lamp(Render *re, Object *ob)
lar->sunsky = (struct SunSky*)MEM_callocN(sizeof(struct SunSky), "sunskyren");
lar->sunsky->effect_type = la->sun_effect_type;
- copy_v3_v3(vec,ob->obmat[2]);
+ copy_v3_v3(vec, ob->obmat[2]);
normalize_v3(vec);
InitSunSky(lar->sunsky, la->atm_turbidity, vec, la->horizon_brightness,
@@ -3847,7 +3844,7 @@ static GroupObject *add_render_lamp(Render *re, Object *ob)
if (la->haint>0.0f) {
re->flag |= R_LAMPHALO;
- /* camera position (0,0,0) rotate around lamp */
+ /* camera position (0, 0, 0) rotate around lamp */
lar->sh_invcampos[0]= -lar->co[0];
lar->sh_invcampos[1]= -lar->co[1];
lar->sh_invcampos[2]= -lar->co[2];
@@ -4136,7 +4133,7 @@ static void set_fullsample_trace_flag(Render *re, ObjectRen *obr)
}
/* split quads for predictable baking
- * dir 1 == (0,1,2) (0,2,3), 2 == (1,3,0) (1,2,3)
+ * dir 1 == (0, 1, 2) (0, 2, 3), 2 == (1, 3, 0) (1, 2, 3)
*/
static void split_quads(ObjectRen *obr, int dir)
{
@@ -4177,8 +4174,8 @@ static void split_quads(ObjectRen *obr, int dir)
vlr->v4 = vlr1->v4 = NULL;
/* new normals */
- normal_tri_v3( vlr->n,vlr->v3->co, vlr->v2->co, vlr->v1->co);
- normal_tri_v3( vlr1->n,vlr1->v3->co, vlr1->v2->co, vlr1->v1->co);
+ normal_tri_v3(vlr->n, vlr->v3->co, vlr->v2->co, vlr->v1->co);
+ normal_tri_v3(vlr1->n, vlr1->v3->co, vlr1->v2->co, vlr1->v1->co);
}
/* clear the flag when not divided */
else vlr->flag &= ~R_DIVIDE_24;
@@ -4242,8 +4239,8 @@ static void check_non_flat_quads(ObjectRen *obr)
/* 1---2 1---2 0 = orig face, 1 = new face */
/* render normals are inverted in render! we calculate normal of single tria here */
- flen= normal_tri_v3( nor,vlr->v4->co, vlr->v3->co, vlr->v1->co);
- if (flen==0.0f) normal_tri_v3( nor,vlr->v4->co, vlr->v2->co, vlr->v1->co);
+ flen= normal_tri_v3(nor, vlr->v4->co, vlr->v3->co, vlr->v1->co);
+ if (flen==0.0f) normal_tri_v3(nor, vlr->v4->co, vlr->v2->co, vlr->v1->co);
xn = dot_v3v3(nor, vlr->n);
@@ -4255,10 +4252,10 @@ static void check_non_flat_quads(ObjectRen *obr)
vlr1->flag |= R_FACE_SPLIT;
/* split direction based on vnorms */
- normal_tri_v3( nor,vlr->v1->co, vlr->v2->co, vlr->v3->co);
+ normal_tri_v3(nor, vlr->v1->co, vlr->v2->co, vlr->v3->co);
d1 = dot_v3v3(nor, vlr->v1->n);
- normal_tri_v3( nor,vlr->v2->co, vlr->v3->co, vlr->v4->co);
+ normal_tri_v3(nor, vlr->v2->co, vlr->v3->co, vlr->v4->co);
d2 = dot_v3v3(nor, vlr->v2->n);
if ( fabs(d1) < fabs(d2) ) vlr->flag |= R_DIVIDE_24;
@@ -4284,8 +4281,8 @@ static void check_non_flat_quads(ObjectRen *obr)
vlr->v4 = vlr1->v4 = NULL;
/* new normals */
- normal_tri_v3( vlr->n,vlr->v3->co, vlr->v2->co, vlr->v1->co);
- normal_tri_v3( vlr1->n,vlr1->v3->co, vlr1->v2->co, vlr1->v1->co);
+ normal_tri_v3(vlr->n, vlr->v3->co, vlr->v2->co, vlr->v1->co);
+ normal_tri_v3(vlr1->n, vlr1->v3->co, vlr1->v2->co, vlr1->v1->co);
}
/* clear the flag when not divided */
else vlr->flag &= ~R_DIVIDE_24;
@@ -4728,7 +4725,7 @@ static int allow_render_object(Render *re, Object *ob, int nolamps, int onlysele
return 0;
/* don't add non-basic meta objects, ends up having renderobjects with no geometry */
- if (ob->type == OB_MBALL && ob!=find_basis_mball(re->scene, ob))
+ if (ob->type == OB_MBALL && ob!=BKE_mball_basis_find(re->scene, ob))
return 0;
if (nolamps && (ob->type==OB_LAMP))
@@ -5054,12 +5051,12 @@ void RE_Database_FromScene(Render *re, Main *bmain, Scene *scene, unsigned int l
/* applies changes fully */
if ((re->r.scemode & (R_NO_FRAME_UPDATE|R_PREVIEWBUTS))==0)
- scene_update_for_newframe(re->main, re->scene, lay);
+ BKE_scene_update_for_newframe(re->main, re->scene, lay);
/* if no camera, viewmat should have been set! */
if (use_camera_view && camera) {
/* called before but need to call again in case of lens animation from the
- * above call to scene_update_for_newframe, fixes bug. [#22702].
+ * above call to BKE_scene_update_for_newframe, fixes bug. [#22702].
* following calls don't depend on 'RE_SetCamera' */
RE_SetCamera(re, camera);
@@ -5209,7 +5206,7 @@ static void database_fromscene_vectors(Render *re, Scene *scene, unsigned int la
/* applies changes fully */
scene->r.cfra += timeoffset;
- scene_update_for_newframe(re->main, re->scene, lay);
+ BKE_scene_update_for_newframe(re->main, re->scene, lay);
/* if no camera, viewmat should have been set! */
if (camera) {
@@ -5263,7 +5260,7 @@ static void speedvector_project(Render *re, float zco[2], const float co[3], con
/* use cylinder projection */
if (pano) {
float vec[3], ang;
- /* angle between (0,0,-1) and (co) */
+ /* angle between (0, 0, -1) and (co) */
copy_v3_v3(vec, co);
ang= saacos(-vec[2]/sqrtf(vec[0]*vec[0] + vec[2]*vec[2]));
@@ -5401,7 +5398,7 @@ static void calculate_speedvectors(Render *re, ObjectInstanceRen *obi, float *ve
co3= mesh->co[face[2]];
co4= (face[3])? mesh->co[face[3]]: NULL;
- interp_weights_face_v3( w,co1, co2, co3, co4, strand->vert->co);
+ interp_weights_face_v3(w, co1, co2, co3, co4, strand->vert->co);
zero_v4(speed);
madd_v4_v4fl(speed, winspeed[face[0]], w[0]);
@@ -5652,7 +5649,7 @@ void RE_Database_FromScene_Vectors(Render *re, Main *bmain, Scene *sce, unsigned
// NT check for fluidsim special treatment
fluidmd = (FluidsimModifierData *)modifiers_findByType(obi->ob, eModifierType_Fluidsim);
if (fluidmd && fluidmd->fss && (fluidmd->fss->type & OB_FLUIDSIM_DOMAIN)) {
- // use preloaded per vertex simulation data , only does calculation for step=1
+ // use preloaded per vertex simulation data, only does calculation for step=1
// NOTE/FIXME - velocities and meshes loaded unnecessarily often during the database_fromscene_vectors calls...
load_fluidsimspeedvectors(re, obi, oldobi->vectors, step);
}
@@ -5694,14 +5691,14 @@ void RE_Database_FromScene_Vectors(Render *re, Main *bmain, Scene *sce, unsigned
/* setup for shaded view or bake, so only lamps and materials are initialized */
/* type:
- RE_BAKE_LIGHT: for shaded view, only add lamps
- RE_BAKE_ALL: for baking, all lamps and objects
- RE_BAKE_NORMALS:for baking, no lamps and only selected objects
- RE_BAKE_AO: for baking, no lamps, but all objects
- RE_BAKE_TEXTURE:for baking, no lamps, only selected objects
- RE_BAKE_DISPLACEMENT:for baking, no lamps, only selected objects
- RE_BAKE_SHADOW: for baking, only shadows, but all objects
-*/
+ * RE_BAKE_LIGHT: for shaded view, only add lamps
+ * RE_BAKE_ALL: for baking, all lamps and objects
+ * RE_BAKE_NORMALS:for baking, no lamps and only selected objects
+ * RE_BAKE_AO: for baking, no lamps, but all objects
+ * RE_BAKE_TEXTURE:for baking, no lamps, only selected objects
+ * RE_BAKE_DISPLACEMENT:for baking, no lamps, only selected objects
+ * RE_BAKE_SHADOW: for baking, only shadows, but all objects
+ */
void RE_Database_Baking(Render *re, Main *bmain, Scene *scene, unsigned int lay, const int type, Object *actob)
{
Object *camera;
@@ -5871,7 +5868,7 @@ void RE_make_sticky(Scene *scene, View3D *v3d)
me->msticky= CustomData_add_layer(&me->vdata, CD_MSTICKY,
CD_CALLOC, NULL, me->totvert);
- where_is_object(scene, ob);
+ BKE_object_where_is_calc(scene, ob);
mult_m4_m4m4(mat, re->viewmat, ob->obmat);
ms= me->msticky;
diff --git a/source/blender/render/intern/source/envmap.c b/source/blender/render/intern/source/envmap.c
index fa7b9cb7ea1..eebcf23a7a6 100644
--- a/source/blender/render/intern/source/envmap.c
+++ b/source/blender/render/intern/source/envmap.c
@@ -1,5 +1,4 @@
-/*
- *
+/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -28,7 +27,6 @@
* \ingroup render
*/
-
#include <math.h>
#include <string.h>
@@ -51,7 +49,7 @@
#include "BKE_library.h"
#include "BKE_main.h"
-#include "BKE_image.h" // BKE_write_ibuf
+#include "BKE_image.h" // BKE_imbuf_write
#include "BKE_texture.h"
@@ -239,10 +237,10 @@ static void envmap_transmatrix(float mat[][4], int part)
}
copy_m4_m4(tmat, mat);
- eul_to_mat4( rotmat,eul);
+ eul_to_mat4(rotmat, eul);
mul_serie_m4(mat, tmat, rotmat,
- NULL, NULL, NULL,
- NULL, NULL, NULL);
+ NULL, NULL, NULL,
+ NULL, NULL, NULL);
}
/* ------------------------------------------------------------------------- */
diff --git a/source/blender/render/intern/source/external_engine.c b/source/blender/render/intern/source/external_engine.c
index d8888cb4acc..c23a93a52fe 100644
--- a/source/blender/render/intern/source/external_engine.c
+++ b/source/blender/render/intern/source/external_engine.c
@@ -1,5 +1,4 @@
-/*
- *
+/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -314,7 +313,7 @@ int RE_engine_render(Render *re, int do_all)
engine->camera_override = re->camera_override;
if ((re->r.scemode & (R_NO_FRAME_UPDATE|R_PREVIEWBUTS))==0)
- scene_update_for_newframe(re->main, re->scene, re->lay);
+ BKE_scene_update_for_newframe(re->main, re->scene, re->lay);
if (type->update)
type->update(engine, re->main, re->scene);
diff --git a/source/blender/render/intern/source/gammaCorrectionTables.c b/source/blender/render/intern/source/gammaCorrectionTables.c
index c0e69323745..64925e16ae2 100644
--- a/source/blender/render/intern/source/gammaCorrectionTables.c
+++ b/source/blender/render/intern/source/gammaCorrectionTables.c
@@ -1,7 +1,4 @@
/*
- * Jitter offset table
- *
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -123,17 +120,15 @@ void makeGammaTables(float gamma)
/* rounding errors, we just set this explicitly. The last segment may */
/* have a different length than the other segments, but our */
/* interpolation is insensitive to that. */
- color_domain_table[RE_GAMMA_TABLE_SIZE] = 1.0;
+ color_domain_table[RE_GAMMA_TABLE_SIZE] = 1.0;
gamma_range_table[RE_GAMMA_TABLE_SIZE] = 1.0;
inv_gamma_range_table[RE_GAMMA_TABLE_SIZE] = 1.0;
/* To speed up calculations, we make these calc factor tables. They are */
/* multiplication factors used in scaling the interpolation. */
for (i = 0; i < RE_GAMMA_TABLE_SIZE; i++ ) {
- gamfactor_table[i] = inv_color_step
- * (gamma_range_table[i + 1] - gamma_range_table[i]);
- inv_gamfactor_table[i] = inv_color_step
- * (inv_gamma_range_table[i + 1] - inv_gamma_range_table[i]);
+ gamfactor_table[i] = inv_color_step * (gamma_range_table[i + 1] - gamma_range_table[i]);
+ inv_gamfactor_table[i] = inv_color_step * (inv_gamma_range_table[i + 1] - inv_gamma_range_table[i]);
}
} /* end of void makeGammaTables(float gamma) */
diff --git a/source/blender/render/intern/source/imagetexture.c b/source/blender/render/intern/source/imagetexture.c
index 260a2de4858..d454ea60705 100644
--- a/source/blender/render/intern/source/imagetexture.c
+++ b/source/blender/render/intern/source/imagetexture.c
@@ -1,6 +1,4 @@
/*
- *
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -29,9 +27,6 @@
* \ingroup render
*/
-
-
-
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
@@ -1482,10 +1477,10 @@ int imagewraposa(Tex *tex, Image *ima, ImBuf *ibuf, const float texvec[3], const
/* pixel coordinates */
- minx= MIN3(dxt[0],dyt[0],dxt[0]+dyt[0] );
- maxx= MAX3(dxt[0],dyt[0],dxt[0]+dyt[0] );
- miny= MIN3(dxt[1],dyt[1],dxt[1]+dyt[1] );
- maxy= MAX3(dxt[1],dyt[1],dxt[1]+dyt[1] );
+ minx = MIN3(dxt[0], dyt[0], dxt[0] + dyt[0]);
+ maxx = MAX3(dxt[0], dyt[0], dxt[0] + dyt[0]);
+ miny = MIN3(dxt[1], dyt[1], dxt[1] + dyt[1]);
+ maxy = MAX3(dxt[1], dyt[1], dxt[1] + dyt[1]);
/* tex_sharper has been removed */
minx= (maxx-minx)/2.0f;
diff --git a/source/blender/render/intern/source/initrender.c b/source/blender/render/intern/source/initrender.c
index f7f592c9407..e712950f4f8 100644
--- a/source/blender/render/intern/source/initrender.c
+++ b/source/blender/render/intern/source/initrender.c
@@ -94,10 +94,10 @@ static void init_render_jit(Render *re)
if (lastjit!=re->r.osa || last_mblur_jit != re->r.mblur_samples) {
memset(jit, 0, sizeof(jit));
- BLI_initjit(jit[0], re->r.osa);
+ BLI_jitter_init(jit[0], re->r.osa);
memset(mblur_jit, 0, sizeof(mblur_jit));
- BLI_initjit(mblur_jit[0], re->r.mblur_samples);
+ BLI_jitter_init(mblur_jit[0], re->r.mblur_samples);
}
lastjit= re->r.osa;
@@ -167,7 +167,7 @@ float RE_filter_value(int type, float x)
x= ABS(x);
- switch(type) {
+ switch (type) {
case R_FILTER_BOX:
if (x>1.0f) return 0.0f;
return 1.0f;
@@ -208,7 +208,7 @@ static float calc_weight(Render *re, float *weight, int i, int j)
weight[a]= 0.0;
/* Weighting choices */
- switch(re->r.filtertype) {
+ switch (re->r.filtertype) {
case R_FILTER_BOX:
if (i==0 && j==0) weight[a]= 1.0;
break;
@@ -463,7 +463,7 @@ static void re_camera_params_get(Render *re, CameraParams *params, Object *cam_o
re->viewdy= params->viewdy;
re->viewplane= params->viewplane;
- object_camera_mode(&re->r, cam_ob);
+ BKE_camera_object_mode(&re->r, cam_ob);
}
void RE_SetEnvmapCamera(Render *re, Object *cam_ob, float viewscale, float clipsta, float clipend)
@@ -471,8 +471,8 @@ void RE_SetEnvmapCamera(Render *re, Object *cam_ob, float viewscale, float clips
CameraParams params;
/* setup parameters */
- camera_params_init(&params);
- camera_params_from_object(&params, cam_ob);
+ BKE_camera_params_init(&params);
+ BKE_camera_params_from_object(&params, cam_ob);
params.lens= 16.0f*viewscale;
params.sensor_x= 32.0f;
@@ -482,8 +482,8 @@ void RE_SetEnvmapCamera(Render *re, Object *cam_ob, float viewscale, float clips
params.clipend= clipend;
/* compute matrix, viewplane, .. */
- camera_params_compute_viewplane(&params, re->winx, re->winy, 1.0f, 1.0f);
- camera_params_compute_matrix(&params);
+ BKE_camera_params_compute_viewplane(&params, re->winx, re->winy, 1.0f, 1.0f);
+ BKE_camera_params_compute_matrix(&params);
/* extract results */
re_camera_params_get(re, &params, cam_ob);
@@ -496,16 +496,16 @@ void RE_SetCamera(Render *re, Object *cam_ob)
CameraParams params;
/* setup parameters */
- camera_params_init(&params);
- camera_params_from_object(&params, cam_ob);
+ BKE_camera_params_init(&params);
+ BKE_camera_params_from_object(&params, cam_ob);
params.use_fields= (re->r.mode & R_FIELDS);
params.field_second= (re->flag & R_SEC_FIELD);
params.field_odd= (re->r.mode & R_ODDFIELD);
/* compute matrix, viewplane, .. */
- camera_params_compute_viewplane(&params, re->winx, re->winy, re->r.xasp, re->r.yasp);
- camera_params_compute_matrix(&params);
+ BKE_camera_params_compute_viewplane(&params, re->winx, re->winy, re->r.xasp, re->r.yasp);
+ BKE_camera_params_compute_matrix(&params);
/* extract results */
re_camera_params_get(re, &params, cam_ob);
diff --git a/source/blender/render/intern/source/occlusion.c b/source/blender/render/intern/source/occlusion.c
index 436eaefd155..a1cee6637f4 100644
--- a/source/blender/render/intern/source/occlusion.c
+++ b/source/blender/render/intern/source/occlusion.c
@@ -1,5 +1,4 @@
-/*
- *
+/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -30,7 +29,6 @@
* \ingroup render
*/
-
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
@@ -1627,11 +1625,11 @@ static void *exec_strandsurface_sample(void *data)
co4= mesh->co[face[3]];
mid_v3_v3v3(co, co1, co3);
- normal_quad_v3( n,co1, co2, co3, co4);
+ normal_quad_v3(n, co1, co2, co3, co4);
}
else {
cent_tri_v3(co, co1, co2, co3);
- normal_tri_v3( n,co1, co2, co3);
+ normal_tri_v3(n, co1, co2, co3);
}
negate_v3(n);
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index a4a244daf43..d7b06a78322 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -1,5 +1,4 @@
-/*
- *
+/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -30,7 +29,6 @@
* \ingroup render
*/
-
#include <math.h>
#include <limits.h>
#include <string.h>
@@ -173,7 +171,7 @@ static void stats_background(void *UNUSED(arg), RenderStats *rs)
fprintf(stdout, "Sce: %s Ve:%d Fa:%d La:%d", rs->scenename, rs->totvert, rs->totface, rs->totlamp);
}
- BLI_exec_cb(G.main, NULL, BLI_CB_EVT_RENDER_STATS);
+ BLI_callback_exec(G.main, NULL, BLI_CB_EVT_RENDER_STATS);
fputc('\n', stdout);
fflush(stdout);
@@ -541,7 +539,9 @@ void RE_SetWindow(Render *re, rctf *viewplane, float clipsta, float clipend)
re->clipend= clipend;
re->r.mode &= ~R_ORTHO;
- perspective_m4( re->winmat,re->viewplane.xmin, re->viewplane.xmax, re->viewplane.ymin, re->viewplane.ymax, re->clipsta, re->clipend);
+ perspective_m4(re->winmat,
+ re->viewplane.xmin, re->viewplane.xmax,
+ re->viewplane.ymin, re->viewplane.ymax, re->clipsta, re->clipend);
}
@@ -554,7 +554,9 @@ void RE_SetOrtho(Render *re, rctf *viewplane, float clipsta, float clipend)
re->clipend= clipend;
re->r.mode |= R_ORTHO;
- orthographic_m4( re->winmat,re->viewplane.xmin, re->viewplane.xmax, re->viewplane.ymin, re->viewplane.ymax, re->clipsta, re->clipend);
+ orthographic_m4(re->winmat,
+ re->viewplane.xmin, re->viewplane.xmax,
+ re->viewplane.ymin, re->viewplane.ymax, re->clipsta, re->clipend);
}
void RE_SetView(Render *re, float mat[][4])
@@ -1263,7 +1265,7 @@ static void render_scene(Render *re, Scene *sce, int cfra)
sce->r.cfra= cfra;
- scene_camera_switch_update(sce);
+ BKE_scene_camera_switch_update(sce);
/* exception: scene uses own size (unfinished code) */
if (0) {
@@ -1280,7 +1282,7 @@ static void render_scene(Render *re, Scene *sce, int cfra)
resc->lay= sce->lay;
/* ensure scene has depsgraph, base flags etc OK */
- set_scene_bg(re->main, sce);
+ BKE_scene_set_background(re->main, sce);
/* copy callbacks */
resc->display_draw= re->display_draw;
@@ -1366,7 +1368,7 @@ static void ntree_render_scenes(Render *re)
/* restore scene if we rendered another last */
if (restore_scene)
- set_scene_bg(re->main, re->scene);
+ BKE_scene_set_background(re->main, re->scene);
}
/* bad call... need to think over proper method still */
@@ -1589,7 +1591,7 @@ static void do_render_composite_fields_blur_3d(Render *re)
R.stats_draw= re->stats_draw;
if (update_newframe)
- scene_update_for_newframe(re->main, re->scene, re->lay);
+ BKE_scene_update_for_newframe(re->main, re->scene, re->lay);
if (re->r.scemode & R_FULL_SAMPLE)
do_merge_fullsample(re, ntree);
@@ -1652,7 +1654,7 @@ static void do_render_seq(Render * re)
if (recurs_depth==0) {
/* otherwise sequencer animation isn't updated */
- BKE_animsys_evaluate_all_animation(re->main, re->scene, (float)cfra); // XXX, was BKE_curframe(re->scene)
+ BKE_animsys_evaluate_all_animation(re->main, re->scene, (float)cfra); // XXX, was BKE_scene_frame_get(re->scene)
}
recurs_depth++;
@@ -1711,7 +1713,7 @@ static void do_render_seq(Render * re)
/* main loop: doing sequence + fields + blur + 3d render + compositing */
static void do_render_all_options(Render *re)
{
- scene_camera_switch_update(re->scene);
+ BKE_scene_camera_switch_update(re->scene);
re->i.starttime= PIL_check_seconds_timer();
@@ -1749,7 +1751,7 @@ static int check_valid_camera(Scene *scene, Object *camera_override)
int check_comp= 1;
if (camera_override == NULL && scene->camera == NULL)
- scene->camera= scene_find_camera(scene);
+ scene->camera= BKE_scene_camera_find(scene);
if (scene->r.scemode&R_DOSEQ) {
if (scene->ed) {
@@ -1760,7 +1762,7 @@ static int check_valid_camera(Scene *scene, Object *camera_override)
while (seq) {
if (seq->type == SEQ_SCENE && seq->scene) {
if (!seq->scene_camera) {
- if (!seq->scene->camera && !scene_find_camera(seq->scene)) {
+ if (!seq->scene->camera && !BKE_scene_camera_find(seq->scene)) {
if (seq->scene == scene) {
/* for current scene camera could be unneeded due to compisite nodes */
check_comp= 1;
@@ -1786,7 +1788,7 @@ static int check_valid_camera(Scene *scene, Object *camera_override)
if (node->type == CMP_NODE_R_LAYERS) {
Scene *sce= node->id ? (Scene*)node->id : scene;
- if (!sce->camera && !scene_find_camera(sce)) {
+ if (!sce->camera && !BKE_scene_camera_find(sce)) {
/* all render layers nodes need camera */
return 0;
}
@@ -1803,6 +1805,28 @@ static int check_valid_camera(Scene *scene, Object *camera_override)
return 1;
}
+static int node_tree_has_composite_output(bNodeTree *ntree)
+{
+ bNode *node;
+
+ for (node = ntree->nodes.first; node; node = node->next) {
+ if (node->type == CMP_NODE_COMPOSITE) {
+ return TRUE;
+ }
+ else if (node->type == NODE_GROUP) {
+ if (node_tree_has_composite_output((bNodeTree *)node->id))
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}
+
+static int check_composite_output(Scene *scene)
+{
+ return node_tree_has_composite_output(scene->nodetree);
+}
+
int RE_is_rendering_allowed(Scene *scene, Object *camera_override, ReportList *reports)
{
SceneRenderLayer *srl;
@@ -1837,19 +1861,12 @@ int RE_is_rendering_allowed(Scene *scene, Object *camera_override, ReportList *r
if (scene->r.scemode & R_DOCOMP) {
if (scene->use_nodes) {
- bNodeTree *ntree= scene->nodetree;
- bNode *node;
-
- if (ntree==NULL) {
+ if (!scene->nodetree) {
BKE_report(reports, RPT_ERROR, "No Nodetree in Scene");
return 0;
}
- for (node= ntree->nodes.first; node; node= node->next)
- if (node->type==CMP_NODE_COMPOSITE)
- break;
-
- if (node==NULL) {
+ if (!check_composite_output(scene)) {
BKE_report(reports, RPT_ERROR, "No Render Output Node in Scene");
return 0;
}
@@ -1870,7 +1887,7 @@ int RE_is_rendering_allowed(Scene *scene, Object *camera_override, ReportList *r
}
/* get panorama & ortho, only after camera is set */
- object_camera_mode(&scene->r, camera_override ? camera_override : scene->camera);
+ BKE_camera_object_mode(&scene->r, camera_override ? camera_override : scene->camera);
/* forbidden combinations */
if (scene->r.mode & R_PANORAMA) {
@@ -2019,7 +2036,7 @@ void RE_BlenderFrame(Render *re, Main *bmain, Scene *scene, SceneRenderLayer *sr
if (render_initialize_from_main(re, bmain, scene, srl, camera_override, lay, 0, 0)) {
MEM_reset_peak_memory();
- BLI_exec_cb(re->main, (ID *)scene, BLI_CB_EVT_RENDER_PRE);
+ BLI_callback_exec(re->main, (ID *)scene, BLI_CB_EVT_RENDER_PRE);
do_render_all_options(re);
@@ -2037,10 +2054,10 @@ void RE_BlenderFrame(Render *re, Main *bmain, Scene *scene, SceneRenderLayer *sr
}
}
- BLI_exec_cb(re->main, (ID *)scene, BLI_CB_EVT_RENDER_POST); /* keep after file save */
+ BLI_callback_exec(re->main, (ID *)scene, BLI_CB_EVT_RENDER_POST); /* keep after file save */
}
- BLI_exec_cb(re->main, (ID *)scene, G.afbreek ? BLI_CB_EVT_RENDER_CANCEL : BLI_CB_EVT_RENDER_COMPLETE);
+ BLI_callback_exec(re->main, (ID *)scene, G.afbreek ? BLI_CB_EVT_RENDER_CANCEL : BLI_CB_EVT_RENDER_COMPLETE);
/* UGLY WARNING */
G.rendering= 0;
@@ -2088,7 +2105,7 @@ static int do_write_image_or_movie(Render *re, Main *bmain, Scene *scene, bMovie
else {
ImBuf *ibuf= render_result_rect_to_ibuf(&rres, &scene->r);
- ok= BKE_write_ibuf_stamp(scene, camera, ibuf, name, &scene->r.im_format);
+ ok= BKE_imbuf_write_stamp(scene, camera, ibuf, name, &scene->r.im_format);
if (ok==0) {
printf("Render error: cannot save %s\n", name);
@@ -2104,7 +2121,7 @@ static int do_write_image_or_movie(Render *re, Main *bmain, Scene *scene, bMovie
name[strlen(name)-4]= 0;
BKE_add_image_extension(name, R_IMF_IMTYPE_JPEG90);
ibuf->planes= 24;
- BKE_write_ibuf_stamp(scene, camera, ibuf, name, &imf);
+ BKE_imbuf_write_stamp(scene, camera, ibuf, name, &imf);
printf("\nSaved: %s", name);
}
@@ -2118,7 +2135,7 @@ static int do_write_image_or_movie(Render *re, Main *bmain, Scene *scene, bMovie
BLI_timestr(re->i.lastframetime, name);
printf(" Time: %s", name);
- BLI_exec_cb(G.main, NULL, BLI_CB_EVT_RENDER_STATS);
+ BLI_callback_exec(G.main, NULL, BLI_CB_EVT_RENDER_STATS);
fputc('\n', stdout);
fflush(stdout); /* needed for renderd !! (not anymore... (ton)) */
@@ -2129,7 +2146,7 @@ static int do_write_image_or_movie(Render *re, Main *bmain, Scene *scene, bMovie
/* saves images to disk */
void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_override, unsigned int lay, int sfra, int efra, int tfra)
{
- bMovieHandle *mh= BKE_get_movie_handle(scene->r.im_format.imtype);
+ bMovieHandle *mh= BKE_movie_handle_get(scene->r.im_format.imtype);
int cfrao= scene->r.cfra;
int nfra, totrendered= 0, totskipped= 0;
@@ -2153,7 +2170,7 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri
if (nf >= 0 && nf >= scene->r.sfra && nf <= scene->r.efra) {
scene->r.cfra = re->r.cfra = nf;
- BLI_exec_cb(re->main, (ID *)scene, BLI_CB_EVT_RENDER_PRE);
+ BLI_callback_exec(re->main, (ID *)scene, BLI_CB_EVT_RENDER_PRE);
do_render_all_options(re);
totrendered++;
@@ -2164,7 +2181,7 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri
}
if (G.afbreek == 0) {
- BLI_exec_cb(re->main, (ID *)scene, BLI_CB_EVT_RENDER_POST); /* keep after file save */
+ BLI_callback_exec(re->main, (ID *)scene, BLI_CB_EVT_RENDER_POST); /* keep after file save */
}
}
else {
@@ -2193,7 +2210,7 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri
else
updatelay= re->lay;
- scene_update_for_newframe(bmain, scene, updatelay);
+ BKE_scene_update_for_newframe(bmain, scene, updatelay);
continue;
}
else
@@ -2218,7 +2235,7 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri
re->r.cfra= scene->r.cfra; /* weak.... */
/* run callbacs before rendering, before the scene is updated */
- BLI_exec_cb(re->main, (ID *)scene, BLI_CB_EVT_RENDER_PRE);
+ BLI_callback_exec(re->main, (ID *)scene, BLI_CB_EVT_RENDER_PRE);
do_render_all_options(re);
@@ -2244,7 +2261,7 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri
}
if (G.afbreek==0) {
- BLI_exec_cb(re->main, (ID *)scene, BLI_CB_EVT_RENDER_POST); /* keep after file save */
+ BLI_callback_exec(re->main, (ID *)scene, BLI_CB_EVT_RENDER_POST); /* keep after file save */
}
}
}
@@ -2260,7 +2277,7 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri
re->flag &= ~R_ANIMATION;
- BLI_exec_cb(re->main, (ID *)scene, G.afbreek ? BLI_CB_EVT_RENDER_CANCEL : BLI_CB_EVT_RENDER_COMPLETE);
+ BLI_callback_exec(re->main, (ID *)scene, G.afbreek ? BLI_CB_EVT_RENDER_CANCEL : BLI_CB_EVT_RENDER_COMPLETE);
/* UGLY WARNING */
G.rendering= 0;
@@ -2375,7 +2392,7 @@ void RE_layer_load_from_file(RenderLayer *layer, ReportList *reports, const char
ibuf_clip = IMB_allocImBuf(layer->rectx, layer->recty, 32, IB_rectfloat);
if (ibuf_clip) {
- IMB_rectcpy(ibuf_clip, ibuf, 0,0, x,y, layer->rectx, layer->recty);
+ IMB_rectcpy(ibuf_clip, ibuf, 0, 0, x, y, layer->rectx, layer->recty);
memcpy(layer->rectf, ibuf_clip->rect_float, sizeof(float)*4*layer->rectx*layer->recty);
IMB_freeImBuf(ibuf_clip);
@@ -2404,7 +2421,7 @@ void RE_result_load_from_file(RenderResult *result, ReportList *reports, const c
}
}
-const float default_envmap_layout[] = { 0,0, 1,0, 2,0, 0,1, 1,1, 2,1 };
+const float default_envmap_layout[] = { 0, 0, 1, 0, 2, 0, 0, 1, 1, 1, 2, 1 };
int RE_WriteEnvmapResult(struct ReportList *reports, Scene *scene, EnvMap *env, const char *relpath, const char imtype, float layout[12])
{
@@ -2412,7 +2429,7 @@ int RE_WriteEnvmapResult(struct ReportList *reports, Scene *scene, EnvMap *env,
ImBuf *ibuf=NULL;
int ok;
int dx;
- int maxX=0,maxY=0,i=0;
+ int maxX=0, maxY=0, i=0;
char filepath[FILE_MAX];
if (env->cube[1]==NULL) {
@@ -2427,8 +2444,8 @@ int RE_WriteEnvmapResult(struct ReportList *reports, Scene *scene, EnvMap *env,
if (env->type == ENV_CUBE) {
for (i=0; i < 12; i+=2) {
- maxX = MAX2(maxX,layout[i] + 1);
- maxY = MAX2(maxY,layout[i+1] + 1);
+ maxX = MAX2(maxX, layout[i] + 1);
+ maxY = MAX2(maxY, layout[i+1] + 1);
}
ibuf = IMB_allocImBuf(maxX*dx, maxY*dx, 24, IB_rectfloat);
@@ -2453,7 +2470,7 @@ int RE_WriteEnvmapResult(struct ReportList *reports, Scene *scene, EnvMap *env,
BLI_strncpy(filepath, relpath, sizeof(filepath));
BLI_path_abs(filepath, G.main->name);
- ok= BKE_write_ibuf(ibuf, filepath, &imf);
+ ok= BKE_imbuf_write(ibuf, filepath, &imf);
IMB_freeImBuf(ibuf);
diff --git a/source/blender/render/intern/source/pixelblending.c b/source/blender/render/intern/source/pixelblending.c
index 48ce611fed7..522a41d9af7 100644
--- a/source/blender/render/intern/source/pixelblending.c
+++ b/source/blender/render/intern/source/pixelblending.c
@@ -1,10 +1,4 @@
/*
- * pixelblending.c
- *
- * Functions to blend pixels with or without alpha, in various formats
- * nzc - June 2000
- *
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -31,6 +25,9 @@
/** \file blender/render/intern/source/pixelblending.c
* \ingroup render
+ *
+ * Functions to blend pixels with or without alpha, in various formats
+ * nzc - June 2000
*/
diff --git a/source/blender/render/intern/source/pixelshading.c b/source/blender/render/intern/source/pixelshading.c
index 826a31e17a8..ac48a5f41f2 100644
--- a/source/blender/render/intern/source/pixelshading.c
+++ b/source/blender/render/intern/source/pixelshading.c
@@ -351,7 +351,7 @@ int shadeHaloFloat(HaloRen *har, float *col, int zz,
rc= hashvectf + (ofs % 768);
- fac= fabsf( rc[1]*(har->rad*fabsf(rc[0]) - radist) );
+ fac = fabsf(rc[1] * (har->rad * fabsf(rc[0]) - radist));
if (fac< 1.0f) {
ringf+= (1.0f-fac);
@@ -360,7 +360,7 @@ int shadeHaloFloat(HaloRen *har, float *col, int zz,
}
if (har->type & HA_VECT) {
- dist= fabsf( har->cos*(yn) - har->sin*(xn) )/har->rad;
+ dist= fabsf(har->cos * (yn) - har->sin * (xn)) / har->rad;
if (dist>1.0f) dist= 1.0f;
if (har->tex) {
zn= har->sin*xn - har->cos*yn;
diff --git a/source/blender/render/intern/source/pointdensity.c b/source/blender/render/intern/source/pointdensity.c
index 5d4f9db9a02..96a1a13b75f 100644
--- a/source/blender/render/intern/source/pointdensity.c
+++ b/source/blender/render/intern/source/pointdensity.c
@@ -106,7 +106,7 @@ static void pointdensity_cache_psys(Render *re, PointDensity *pd, Object *ob, Pa
ParticleKey state;
ParticleSimulationData sim= {NULL};
ParticleData *pa=NULL;
- float cfra = BKE_curframe(re->scene);
+ float cfra = BKE_scene_frame_get(re->scene);
int i /*, childexists*/ /* UNUSED */;
int total_particles, offset=0;
int data_used = point_data_used(pd);
@@ -121,7 +121,7 @@ static void pointdensity_cache_psys(Render *re, PointDensity *pd, Object *ob, Pa
/* Just to create a valid rendering context for particles */
psys_render_set(ob, psys, re->viewmat, re->winmat, re->winx, re->winy, 0);
- dm = mesh_create_derived_render(re->scene, ob,CD_MASK_BAREMESH|CD_MASK_MTFACE|CD_MASK_MCOL);
+ dm = mesh_create_derived_render(re->scene, ob, CD_MASK_BAREMESH|CD_MASK_MTFACE|CD_MASK_MCOL);
if ( !psys_check_enabled(ob, psys)) {
psys_render_restore(ob, psys);
@@ -221,7 +221,7 @@ static void pointdensity_cache_object(Render *re, PointDensity *pd, Object *ob)
copy_v3_v3(co, mvert->co);
- switch(pd->ob_cache_space) {
+ switch (pd->ob_cache_space) {
case TEX_PD_OBJECTSPACE:
break;
case TEX_PD_OBJECTLOC:
diff --git a/source/blender/render/intern/source/rayshade.c b/source/blender/render/intern/source/rayshade.c
index 0c735c18c57..c68fb578d4c 100644
--- a/source/blender/render/intern/source/rayshade.c
+++ b/source/blender/render/intern/source/rayshade.c
@@ -87,9 +87,8 @@ static int test_break(void *data)
static void RE_rayobject_config_control(RayObject *r, Render *re)
{
- if (RE_rayobject_isRayAPI(r))
- {
- r = RE_rayobject_align( r );
+ if (RE_rayobject_isRayAPI(r)) {
+ r = RE_rayobject_align(r);
r->control.data = re;
r->control.test_break = test_break;
}
@@ -99,8 +98,7 @@ static RayObject* RE_rayobject_create(Render *re, int type, int size)
{
RayObject * res = NULL;
- if (type == R_RAYSTRUCTURE_AUTO)
- {
+ if (type == R_RAYSTRUCTURE_AUTO) {
//TODO
//if (detect_simd())
#ifdef __SSE__
@@ -111,8 +109,7 @@ static RayObject* RE_rayobject_create(Render *re, int type, int size)
}
#ifndef __SSE__
- if (type == R_RAYSTRUCTURE_SIMD_SVBVH || type == R_RAYSTRUCTURE_SIMD_QBVH)
- {
+ if (type == R_RAYSTRUCTURE_SIMD_SVBVH || type == R_RAYSTRUCTURE_SIMD_QBVH) {
puts("Warning: Using VBVH (SSE was disabled at compile time)");
type = R_RAYSTRUCTURE_VBVH;
}
@@ -148,37 +145,30 @@ void freeraytree(Render *re)
{
ObjectInstanceRen *obi;
- if (re->raytree)
- {
+ if (re->raytree) {
RE_rayobject_free(re->raytree);
re->raytree = NULL;
}
- if (re->rayfaces)
- {
+ if (re->rayfaces) {
MEM_freeN(re->rayfaces);
re->rayfaces = NULL;
}
- if (re->rayprimitives)
- {
+ if (re->rayprimitives) {
MEM_freeN(re->rayprimitives);
re->rayprimitives = NULL;
}
- for (obi=re->instancetable.first; obi; obi=obi->next)
- {
+ for (obi=re->instancetable.first; obi; obi=obi->next) {
ObjectRen *obr = obi->obr;
- if (obr->raytree)
- {
+ if (obr->raytree) {
RE_rayobject_free(obr->raytree);
obr->raytree = NULL;
}
- if (obr->rayfaces)
- {
+ if (obr->rayfaces) {
MEM_freeN(obr->rayfaces);
obr->rayfaces = NULL;
}
- if (obi->raytree)
- {
+ if (obi->raytree) {
RE_rayobject_free(obi->raytree);
obi->raytree = NULL;
}
@@ -187,7 +177,7 @@ void freeraytree(Render *re)
#ifdef RE_RAYCOUNTER
{
RayCounter sum;
- memset( &sum, 0, sizeof(sum) );
+ memset(&sum, 0, sizeof(sum));
int i;
for (i=0; i<BLENDER_MAX_THREADS; i++)
RE_RC_MERGE(&sum, re_rc_counter+i);
@@ -232,8 +222,7 @@ RayObject* makeraytree_object(Render *re, ObjectInstanceRen *obi)
// update render stats
ObjectRen *obr = obi->obr;
- if (obr->raytree == NULL)
- {
+ if (obr->raytree == NULL) {
RayObject *raytree;
RayFace *face = NULL;
VlakPrimitive *vlakprimitive = NULL;
@@ -241,8 +230,7 @@ RayObject* makeraytree_object(Render *re, ObjectInstanceRen *obi)
//Count faces
int faces = 0;
- for (v=0;v<obr->totvlak;v++)
- {
+ for (v=0;v<obr->totvlak;v++) {
VlakRen *vlr = obr->vlaknodes[v>>8].vlak + (v&255);
if (is_raytraceable_vlr(re, vlr))
faces++;
@@ -260,23 +248,21 @@ RayObject* makeraytree_object(Render *re, ObjectInstanceRen *obi)
obr->rayobi = obi;
- for (v=0;v<obr->totvlak;v++)
- {
+ for (v=0;v<obr->totvlak;v++) {
VlakRen *vlr = obr->vlaknodes[v>>8].vlak + (v&255);
- if (is_raytraceable_vlr(re, vlr))
- {
+ if (is_raytraceable_vlr(re, vlr)) {
if ((re->r.raytrace_options & R_RAYTRACE_USE_LOCAL_COORDS)) {
- RE_rayobject_add( raytree, RE_vlakprimitive_from_vlak( vlakprimitive, obi, vlr ) );
+ RE_rayobject_add(raytree, RE_vlakprimitive_from_vlak(vlakprimitive, obi, vlr));
vlakprimitive++;
}
else {
RE_rayface_from_vlak(face, obi, vlr);
- RE_rayobject_add( raytree, RE_rayobject_unalignRayFace(face) );
+ RE_rayobject_add(raytree, RE_rayobject_unalignRayFace(face));
face++;
}
}
}
- RE_rayobject_done( raytree );
+ RE_rayobject_done(raytree);
/* in case of cancel during build, raytree is not usable */
if (test_break(re))
@@ -286,8 +272,7 @@ RayObject* makeraytree_object(Render *re, ObjectInstanceRen *obi)
}
if (obr->raytree) {
- if ((obi->flag & R_TRANSFORMED) && obi->raytree == NULL)
- {
+ if ((obi->flag & R_TRANSFORMED) && obi->raytree == NULL) {
obi->transform_primitives = 0;
obi->raytree = RE_rayobject_instance_create( obr->raytree, obi->mat, obi, obi->obr->rayobi );
}
@@ -299,16 +284,13 @@ RayObject* makeraytree_object(Render *re, ObjectInstanceRen *obi)
static int has_special_rayobject(Render *re, ObjectInstanceRen *obi)
{
- if ( (obi->flag & R_TRANSFORMED) && (re->r.raytrace_options & R_RAYTRACE_USE_INSTANCES) )
- {
+ if ( (obi->flag & R_TRANSFORMED) && (re->r.raytrace_options & R_RAYTRACE_USE_INSTANCES) ) {
ObjectRen *obr = obi->obr;
int v, faces = 0;
- for (v=0;v<obr->totvlak;v++)
- {
+ for (v=0;v<obr->totvlak;v++) {
VlakRen *vlr = obr->vlaknodes[v>>8].vlak + (v&255);
- if (is_raytraceable_vlr(re, vlr))
- {
+ if (is_raytraceable_vlr(re, vlr)) {
faces++;
if (faces > 4)
return 1;
@@ -329,8 +311,7 @@ static void makeraytree_single(Render *re)
int faces = 0, obs = 0, special = 0;
for (obi=re->instancetable.first; obi; obi=obi->next)
- if (is_raytraceable(re, obi))
- {
+ if (is_raytraceable(re, obi)) {
ObjectRen *obr = obi->obr;
obs++;
@@ -339,8 +320,7 @@ static void makeraytree_single(Render *re)
}
else {
int v;
- for (v=0;v<obr->totvlak;v++)
- {
+ for (v=0;v<obr->totvlak;v++) {
VlakRen *vlr = obr->vlaknodes[v>>8].vlak + (v&255);
if (is_raytraceable_vlr(re, vlr))
faces++;
@@ -348,8 +328,7 @@ static void makeraytree_single(Render *re)
}
}
- if (faces + special == 0)
- {
+ if (faces + special == 0) {
re->raytree = RE_rayobject_empty_create();
return;
}
@@ -357,8 +336,7 @@ static void makeraytree_single(Render *re)
//Create raytree
raytree = re->raytree = RE_rayobject_create( re, re->r.raytrace_structure, faces+special );
- if ( (re->r.raytrace_options & R_RAYTRACE_USE_LOCAL_COORDS) )
- {
+ if ( (re->r.raytrace_options & R_RAYTRACE_USE_LOCAL_COORDS) ) {
vlakprimitive = re->rayprimitives = (VlakPrimitive*)MEM_callocN(faces*sizeof(VlakPrimitive), "Raytrace vlak-primitives");
}
else {
@@ -366,8 +344,7 @@ static void makeraytree_single(Render *re)
}
for (obi=re->instancetable.first; obi; obi=obi->next)
- if (is_raytraceable(re, obi))
- {
+ if (is_raytraceable(re, obi)) {
if (test_break(re))
break;
@@ -378,30 +355,27 @@ static void makeraytree_single(Render *re)
break;
if (obj)
- RE_rayobject_add( re->raytree, obj );
+ RE_rayobject_add(re->raytree, obj);
}
else {
int v;
ObjectRen *obr = obi->obr;
- if (obi->flag & R_TRANSFORMED)
- {
+ if (obi->flag & R_TRANSFORMED) {
obi->transform_primitives = 1;
}
- for (v=0;v<obr->totvlak;v++)
- {
+ for (v=0;v<obr->totvlak;v++) {
VlakRen *vlr = obr->vlaknodes[v>>8].vlak + (v&255);
if (is_raytraceable_vlr(re, vlr)) {
if ((re->r.raytrace_options & R_RAYTRACE_USE_LOCAL_COORDS)) {
RayObject *obj = RE_vlakprimitive_from_vlak( vlakprimitive, obi, vlr );
- RE_rayobject_add( raytree, obj );
+ RE_rayobject_add(raytree, obj);
vlakprimitive++;
}
else {
RE_rayface_from_vlak(face, obi, vlr);
- if ((obi->flag & R_TRANSFORMED))
- {
+ if ((obi->flag & R_TRANSFORMED)) {
mul_m4_v3(obi->mat, face->v1);
mul_m4_v3(obi->mat, face->v2);
mul_m4_v3(obi->mat, face->v3);
@@ -409,7 +383,7 @@ static void makeraytree_single(Render *re)
mul_m4_v3(obi->mat, face->v4);
}
- RE_rayobject_add( raytree, RE_rayobject_unalignRayFace(face) );
+ RE_rayobject_add(raytree, RE_rayobject_unalignRayFace(face));
face++;
}
}
@@ -417,12 +391,11 @@ static void makeraytree_single(Render *re)
}
}
- if (!test_break(re))
- {
+ if (!test_break(re)) {
re->i.infostr= "Raytree.. building";
re->stats_draw(re->sdh, &re->i);
- RE_rayobject_done( raytree );
+ RE_rayobject_done(raytree);
}
}
@@ -451,9 +424,8 @@ void makeraytree(Render *re)
//Calculate raytree max_size
//This is ONLY needed to kept a bogus behavior of SUN and HEMI lights
INIT_MINMAX(min, max);
- RE_rayobject_merge_bb( re->raytree, min, max );
- for (i=0; i<3; i++)
- {
+ RE_rayobject_merge_bb(re->raytree, min, max);
+ for (i=0; i<3; i++) {
min[i] += 0.01f;
max[i] += 0.01f;
sub[i] = max[i]-min[i];
@@ -467,7 +439,7 @@ void makeraytree(Render *re)
}
#ifdef RE_RAYCOUNTER
- memset( re_rc_counter, 0, sizeof(re_rc_counter) );
+ memset(re_rc_counter, 0, sizeof(re_rc_counter));
#endif
}
@@ -720,7 +692,7 @@ static void traceray(ShadeInput *origshi, ShadeResult *origshr, short depth, con
float dist_mir = origshi->mat->dist_mir;
copy_v3_v3(isec.start, start);
- copy_v3_v3(isec.dir, dir );
+ copy_v3_v3(isec.dir, dir);
isec.dist = dist_mir > 0 ? dist_mir : RE_RAYTRACE_MAXDIST;
isec.mode= RE_RAY_MIRROR;
isec.check = RE_CHECK_VLR_RENDER;
@@ -1006,12 +978,10 @@ static void halton_sample(double *ht_invprimes, double *ht_nums, double *v)
// "Instant Radiosity", Keller A.
unsigned int i;
- for (i = 0; i < 2; i++)
- {
+ for (i = 0; i < 2; i++) {
double r = fabs((1.0 - ht_nums[i]) - 1e-10);
- if (ht_invprimes[i] >= r)
- {
+ if (ht_invprimes[i] >= r) {
double lasth;
double h = ht_invprimes[i];
@@ -1065,8 +1035,7 @@ static struct QMCSampler *QMC_initSampler(int type, int tot)
static void QMC_initPixel(QMCSampler *qsa, int thread)
{
- if (qsa->type==SAMP_TYPE_HAMMERSLEY)
- {
+ if (qsa->type==SAMP_TYPE_HAMMERSLEY) {
/* hammersley sequence is fixed, already created in QMCSampler init.
* per pixel, gets a random offset. We create separate offsets per thread, for write-safety */
qsa->offs[thread][0] = 0.5f * BLI_thread_frand(thread);
@@ -1270,7 +1239,7 @@ static int adaptive_sample_contrast_val(int samples, float prev, float val, floa
/* if the last sample's contribution to the total value was below a small threshold
* (i.e. the samples taken are very similar), then taking more samples that are probably
* going to be the same is wasting effort */
- if (fabsf( prev/(float)(samples-1) - val/(float)samples ) < thresh) {
+ if (fabsf(prev / (float)(samples - 1) - val / (float)samples ) < thresh) {
return 1;
}
else
@@ -1345,7 +1314,7 @@ static void trace_refract(float col[4], ShadeInput *shi, ShadeResult *shr)
/* get a quasi-random vector from a phong-weighted disc */
QMC_samplePhong(samp3d, qsa, shi->thread, samples, blur);
- ortho_basis_v3v3_v3( orthx, orthy,v_refract);
+ ortho_basis_v3v3_v3(orthx, orthy, v_refract);
mul_v3_fl(orthx, samp3d[0]);
mul_v3_fl(orthy, samp3d[1]);
@@ -1377,8 +1346,7 @@ static void trace_refract(float col[4], ShadeInput *shi, ShadeResult *shr)
samples++;
/* adaptive sampling */
- if (adapt_thresh < 1.0f && samples > max_samples/2)
- {
+ if (adapt_thresh < 1.0f && samples > max_samples/2) {
if (adaptive_sample_variance(samples, col, colsq, adapt_thresh))
break;
@@ -1442,7 +1410,7 @@ static void trace_reflect(float col[3], ShadeInput *shi, ShadeResult *shr, float
mul_v3_fl(orthy, samp3d[1]*aniso);
}
else {
- ortho_basis_v3v3_v3( orthx, orthy,shi->vn);
+ ortho_basis_v3v3_v3(orthx, orthy, shi->vn);
mul_v3_fl(orthx, samp3d[0]);
mul_v3_fl(orthy, samp3d[1]);
}
@@ -1479,8 +1447,7 @@ static void trace_reflect(float col[3], ShadeInput *shi, ShadeResult *shr, float
samples++;
/* adaptive sampling */
- if (adapt_thresh > 0.0f && samples > max_samples/3)
- {
+ if (adapt_thresh > 0.0f && samples > max_samples/3) {
if (adaptive_sample_variance(samples, col, colsq, adapt_thresh))
break;
@@ -1712,7 +1679,7 @@ static int UNUSED_FUNCTION(ray_trace_shadow_rad)(ShadeInput *ship, ShadeResult *
vec[2]-= vec[2];
}
- copy_v3_v3(isec.dir, vec );
+ copy_v3_v3(isec.dir, vec);
isec.dist = RE_RAYTRACE_MAXDIST;
if (RE_rayobject_raycast(R.raytree, &isec)) {
@@ -1922,7 +1889,7 @@ static void ray_ao_qmc(ShadeInput *shi, float ao[3], float env[3])
isec.lay= -1;
copy_v3_v3(isec.start, shi->co);
- RE_rayobject_hint_bb( R.raytree, &point_hint, isec.start, isec.start );
+ RE_rayobject_hint_bb(R.raytree, &point_hint, isec.start, isec.start);
isec.hint = &point_hint;
zero_v3(ao);
@@ -1946,7 +1913,7 @@ static void ray_ao_qmc(ShadeInput *shi, float ao[3], float env[3])
copy_v3_v3(nrm, shi->facenor);
}
- ortho_basis_v3v3_v3( up, side,nrm);
+ ortho_basis_v3v3_v3(up, side, nrm);
/* sampling init */
if (R.wrld.ao_samp_method==WO_AOSAMP_HALTON) {
@@ -2062,7 +2029,7 @@ static void ray_ao_spheresamp(ShadeInput *shi, float ao[3], float env[3])
isec.lay= -1;
copy_v3_v3(isec.start, shi->co);
- RE_rayobject_hint_bb( R.raytree, &point_hint, isec.start, isec.start );
+ RE_rayobject_hint_bb(R.raytree, &point_hint, isec.start, isec.start);
isec.hint = &point_hint;
zero_v3(ao);
@@ -2267,11 +2234,10 @@ static void ray_shadow_qmc(ShadeInput *shi, LampRen *lar, const float lampco[3],
QMC_initPixel(qsa, shi->thread);
INIT_MINMAX(min, max);
- for (i=0; i<totjitco; i++)
- {
+ for (i=0; i<totjitco; i++) {
DO_MINMAX(jitco[i], min, max);
}
- RE_rayobject_hint_bb( R.raytree, &bb_hint, min, max);
+ RE_rayobject_hint_bb(R.raytree, &bb_hint, min, max);
isec->hint = &bb_hint;
isec->check = RE_CHECK_VLR_RENDER;
@@ -2296,10 +2262,10 @@ static void ray_shadow_qmc(ShadeInput *shi, LampRen *lar, const float lampco[3],
/* calc tangent plane vectors */
sub_v3_v3v3(v, co, lampco);
normalize_v3(v);
- ortho_basis_v3v3_v3( ru, rv,v);
+ ortho_basis_v3v3_v3(ru, rv, v);
/* sampling, returns quasi-random vector in area_size disc */
- QMC_sampleDisc(samp3d, qsa, shi->thread, samples,lar->area_size);
+ QMC_sampleDisc(samp3d, qsa, shi->thread, samples, lar->area_size);
/* distribute disc samples across the tangent plane */
s[0] = samp3d[0]*ru[0] + samp3d[1]*rv[0];
@@ -2420,7 +2386,7 @@ static void ray_shadow_jitter(ShadeInput *shi, LampRen *lar, const float lampco[
copy_v3_v3(isec->start, shi->co);
isec->orig.ob = shi->obi;
isec->orig.face = shi->vlr;
- RE_rayobject_hint_bb( R.raytree, &point_hint, isec->start, isec->start );
+ RE_rayobject_hint_bb(R.raytree, &point_hint, isec->start, isec->start);
isec->hint = &point_hint;
while (a--) {
diff --git a/source/blender/render/intern/source/render_result.c b/source/blender/render/intern/source/render_result.c
index 37d6479e7bc..a88057ef3d2 100644
--- a/source/blender/render/intern/source/render_result.c
+++ b/source/blender/render/intern/source/render_result.c
@@ -1,5 +1,4 @@
-/*
- *
+/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -458,6 +457,7 @@ RenderResult *render_result_new(Render *re, rcti *partrct, int crop, int savebuf
BLI_strncpy(rl->name, srl->name, sizeof(rl->name));
rl->lay= srl->lay;
rl->lay_zmask= srl->lay_zmask;
+ rl->lay_exclude= srl->lay_exclude;
rl->layflag= srl->layflag;
rl->passflag= srl->passflag; // for debugging: srl->passflag|SCE_PASS_RAYHITS;
rl->pass_xor= srl->pass_xor;
@@ -1020,7 +1020,7 @@ ImBuf *render_result_rect_to_ibuf(RenderResult *rr, RenderData *rd)
int flags = (rd->color_mgt_flag & R_COLOR_MANAGEMENT_PREDIVIDE)? IB_cm_predivide: 0;
ImBuf *ibuf= IMB_allocImBuf(rr->rectx, rr->recty, rd->im_format.planes, flags);
- /* if not exists, BKE_write_ibuf makes one */
+ /* if not exists, BKE_imbuf_write makes one */
ibuf->rect= (unsigned int *)rr->rect32;
ibuf->rect_float= rr->rectf;
ibuf->zbuf_float= rr->rectz;
diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c
index fedbce89058..58a4e7c9828 100644
--- a/source/blender/render/intern/source/render_texture.c
+++ b/source/blender/render/intern/source/render_texture.c
@@ -100,13 +100,13 @@ static void init_render_texture(Render *re, Tex *tex)
/* imap test */
if (tex->ima && ELEM(tex->ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) {
- BKE_image_user_calc_frame(&tex->iuser, cfra, re?re->flag & R_SEC_FIELD:0);
+ BKE_image_user_frame_calc(&tex->iuser, cfra, re?re->flag & R_SEC_FIELD:0);
}
if (tex->type==TEX_PLUGIN) {
if (tex->plugin && tex->plugin->doit) {
if (tex->plugin->cfra) {
- *(tex->plugin->cfra)= (float)cfra; //BKE_curframe(re->scene); // XXX old animsys - timing stuff to be fixed
+ *(tex->plugin->cfra)= (float)cfra; //BKE_scene_frame_get(re->scene); // XXX old animsys - timing stuff to be fixed
}
}
}
@@ -227,7 +227,7 @@ static int blend(Tex *tex, float *texvec, TexResult *texres)
texres->tin= (2.0f+x+y)/4.0f;
}
else if (tex->stype==TEX_RAD) { /* radial */
- texres->tin= (atan2(y,x) / (2*M_PI) + 0.5);
+ texres->tin= (atan2(y, x) / (2*M_PI) + 0.5);
}
else { /* sphere TEX_SPHERE */
texres->tin= 1.0-sqrt(x*x+ y*y+texvec[2]*texvec[2]);
@@ -476,14 +476,14 @@ static int magic(Tex *tex, float *texvec, TexResult *texres)
y/= turb;
z/= turb;
}
- texres->tr= 0.5f-x;
- texres->tg= 0.5f-y;
- texres->tb= 0.5f-z;
+ texres->tr = 0.5f - x;
+ texres->tg = 0.5f - y;
+ texres->tb = 0.5f - z;
- texres->tin= 0.3333f*(texres->tr+texres->tg+texres->tb);
+ texres->tin= (1.0f / 3.0f) * (texres->tr + texres->tg + texres->tb);
BRICONTRGB;
- texres->ta= 1.0;
+ texres->ta = 1.0f;
return TEX_RGB;
}
@@ -798,16 +798,10 @@ static int plugintex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex
if (rgbnor & TEX_RGB) {
if (pit->version < 6) {
- texres->tr = pit->result[1];
- texres->tg = pit->result[2];
- texres->tb = pit->result[3];
- texres->ta = pit->result[4];
+ copy_v4_v4(&texres->tr, pit->result + 1);
}
else {
- texres->tr = result[1];
- texres->tg = result[2];
- texres->tb = result[3];
- texres->ta = result[4];
+ copy_v4_v4(&texres->tr, result + 1);
}
BRICONTRGB;
@@ -870,7 +864,7 @@ static int cubemap(MTex *mtex, VlakRen *vlr, float *n, float x, float y, float z
/* test for v1, vlr can be faked for baking */
if (vlr->v1 && vlr->v1->orco) {
float nor[3];
- normal_tri_v3( nor,vlr->v1->orco, vlr->v2->orco, vlr->v3->orco);
+ normal_tri_v3(nor, vlr->v1->orco, vlr->v2->orco, vlr->v3->orco);
if ( fabs(nor[0])<fabs(nor[2]) && fabs(nor[1])<fabs(nor[2]) ) vlr->puno |= ME_PROJXY;
else if ( fabs(nor[0])<fabs(nor[1]) && fabs(nor[2])<fabs(nor[1]) ) vlr->puno |= ME_PROJXZ;
@@ -969,8 +963,8 @@ static void do_2d_mapping(MTex *mtex, float *t, VlakRen *vlr, float *n, float *d
fx = (t[0] + 1.0f) / 2.0f;
fy = (t[1] + 1.0f) / 2.0f;
}
- else if (wrap==MTEX_TUBE) map_to_tube( &fx, &fy,t[0], t[1], t[2]);
- else if (wrap==MTEX_SPHERE) map_to_sphere( &fx, &fy,t[0], t[1], t[2]);
+ else if (wrap==MTEX_TUBE) map_to_tube( &fx, &fy, t[0], t[1], t[2]);
+ else if (wrap==MTEX_SPHERE) map_to_sphere(&fx, &fy, t[0], t[1], t[2]);
else {
if (texco==TEXCO_OBJECT) cubemap_ob(ob, n, t[0], t[1], t[2], &fx, &fy);
else if (texco==TEXCO_GLOB) cubemap_glob(n, t[0], t[1], t[2], &fx, &fy);
@@ -1041,20 +1035,20 @@ static void do_2d_mapping(MTex *mtex, float *t, VlakRen *vlr, float *n, float *d
}
if (ok) {
if (wrap==MTEX_TUBE) {
- map_to_tube( area, area+1,t[0], t[1], t[2]);
- map_to_tube( area+2, area+3,t[0]+dxt[0], t[1]+dxt[1], t[2]+dxt[2]);
- map_to_tube( area+4, area+5,t[0]+dyt[0], t[1]+dyt[1], t[2]+dyt[2]);
+ map_to_tube(area, area+1, t[0], t[1], t[2]);
+ map_to_tube(area + 2, area + 3, t[0] + dxt[0], t[1] + dxt[1], t[2] + dxt[2]);
+ map_to_tube(area + 4, area + 5, t[0] + dyt[0], t[1] + dyt[1], t[2] + dyt[2]);
}
else {
- map_to_sphere(area,area+1,t[0], t[1], t[2]);
- map_to_sphere( area+2, area+3,t[0]+dxt[0], t[1]+dxt[1], t[2]+dxt[2]);
- map_to_sphere( area+4, area+5,t[0]+dyt[0], t[1]+dyt[1], t[2]+dyt[2]);
+ map_to_sphere(area, area+1, t[0], t[1], t[2]);
+ map_to_sphere(area + 2, area + 3, t[0] + dxt[0], t[1] + dxt[1], t[2] + dxt[2]);
+ map_to_sphere(area + 4, area + 5, t[0] + dyt[0], t[1] + dyt[1], t[2] + dyt[2]);
}
areaflag= 1;
}
else {
- if (wrap==MTEX_TUBE) map_to_tube( &fx, &fy,t[0], t[1], t[2]);
- else map_to_sphere( &fx, &fy,t[0], t[1], t[2]);
+ if (wrap==MTEX_TUBE) map_to_tube( &fx, &fy, t[0], t[1], t[2]);
+ else map_to_sphere(&fx, &fy, t[0], t[1], t[2]);
dxt[0]/= 2.0f;
dxt[1]/= 2.0f;
dyt[0]/= 2.0f;
@@ -1185,7 +1179,7 @@ static int multitex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex,
tex, which_output, R.r.cfra, (R.r.scemode & R_TEXNODE_PREVIEW) != 0, NULL, NULL);
}
else
- switch(tex->type) {
+ switch (tex->type) {
case 0:
texres->tin= 0.0f;
@@ -1214,7 +1208,7 @@ static int multitex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex,
case TEX_IMAGE:
if (osatex) retval= imagewraposa(tex, tex->ima, NULL, texvec, dxt, dyt, texres);
else retval= imagewrap(tex, tex->ima, NULL, texvec, texres);
- tag_image_time(tex->ima); /* tag image as having being used */
+ BKE_image_tag_time(tex->ima); /* tag image as having being used */
break;
case TEX_PLUGIN:
retval= plugintex(tex, texvec, dxt, dyt, osatex, texres);
@@ -1231,7 +1225,7 @@ static int multitex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex,
copy_v3_v3(tmpvec, texvec);
mul_v3_fl(tmpvec, 1.0f/tex->noisesize);
- switch(tex->stype) {
+ switch (tex->stype) {
case TEX_MFRACTAL:
case TEX_FBM:
retval= mg_mFractalOrfBmTex(tex, tmpvec, texres);
@@ -1389,7 +1383,7 @@ void texture_rgb_blend(float in[3], const float tex[3], const float out[3], floa
{
float facm, col;
- switch(blendtype) {
+ switch (blendtype) {
case MTEX_BLEND:
fact*= facg;
facm= 1.0f-fact;
@@ -1530,7 +1524,7 @@ float texture_value_blend(float tex, float out, float fact, float facg, int blen
facm= 1.0f-fact;
if (flip) SWAP(float, fact, facm);
- switch(blendtype) {
+ switch (blendtype) {
case MTEX_BLEND:
in= fact*tex + facm*out;
break;
@@ -2012,14 +2006,14 @@ static int ntap_bump_compute(NTapBump *ntap_bump, ShadeInput *shi, MTex *mtex, T
// use texres for the center sample, set rgbnor
rgbnor = multitex_mtex(shi, mtex, STll, dxt, dyt, texres);
- Hll = (fromrgb)? RGBTOBW(texres->tr, texres->tg, texres->tb) : texres->tin;
+ Hll = (fromrgb) ? rgb_to_grayscale(&texres->tr) : texres->tin;
// use ttexr for the other 2 taps
multitex_mtex(shi, mtex, STlr, dxt, dyt, &ttexr);
- Hlr = (fromrgb)? RGBTOBW(ttexr.tr, ttexr.tg, ttexr.tb) : ttexr.tin;
+ Hlr = (fromrgb) ? rgb_to_grayscale(&ttexr.tr) : ttexr.tin;
multitex_mtex(shi, mtex, STul, dxt, dyt, &ttexr);
- Hul = (fromrgb)? RGBTOBW(ttexr.tr, ttexr.tg, ttexr.tb) : ttexr.tin;
+ Hul = (fromrgb) ? rgb_to_grayscale(&ttexr.tr) : ttexr.tin;
dHdx = Hscale*(Hlr - Hll);
dHdy = Hscale*(Hul - Hll);
@@ -2050,17 +2044,17 @@ static int ntap_bump_compute(NTapBump *ntap_bump, ShadeInput *shi, MTex *mtex, T
// use texres for the center sample, set rgbnor
rgbnor = multitex_mtex(shi, mtex, STc, dxt, dyt, texres);
- /* Hc = (fromrgb)? RGBTOBW(texres->tr, texres->tg, texres->tb) : texres->tin; */ /* UNUSED */
+ /* Hc = (fromrgb) ? rgb_to_grayscale(&texres->tr) : texres->tin; */ /* UNUSED */
// use ttexr for the other taps
multitex_mtex(shi, mtex, STl, dxt, dyt, &ttexr);
- Hl = (fromrgb)? RGBTOBW(ttexr.tr, ttexr.tg, ttexr.tb) : ttexr.tin;
+ Hl = (fromrgb) ? rgb_to_grayscale(&ttexr.tr) : ttexr.tin;
multitex_mtex(shi, mtex, STr, dxt, dyt, &ttexr);
- Hr = (fromrgb)? RGBTOBW(ttexr.tr, ttexr.tg, ttexr.tb) : ttexr.tin;
+ Hr = (fromrgb) ? rgb_to_grayscale(&ttexr.tr) : ttexr.tin;
multitex_mtex(shi, mtex, STd, dxt, dyt, &ttexr);
- Hd = (fromrgb)? RGBTOBW(ttexr.tr, ttexr.tg, ttexr.tb) : ttexr.tin;
+ Hd = (fromrgb) ? rgb_to_grayscale(&ttexr.tr) : ttexr.tin;
multitex_mtex(shi, mtex, STu, dxt, dyt, &ttexr);
- Hu = (fromrgb)? RGBTOBW(ttexr.tr, ttexr.tg, ttexr.tb) : ttexr.tin;
+ Hu = (fromrgb) ? rgb_to_grayscale(&ttexr.tr) : ttexr.tin;
dHdx = Hscale*(Hr - Hl);
dHdy = Hscale*(Hu - Hd);
@@ -2102,9 +2096,9 @@ static int ntap_bump_compute(NTapBump *ntap_bump, ShadeInput *shi, MTex *mtex, T
// generate the surface derivatives in object space
mul_m3_v3(view2obj, dPdx);
- mul_m3_v3( view2obj, dPdy );
+ mul_m3_v3(view2obj, dPdy);
// generate the unit normal in object space
- mul_transposed_m3_v3( obj2view, vN );
+ mul_transposed_m3_v3(obj2view, vN);
normalize_v3(vN);
}
@@ -2126,9 +2120,9 @@ static int ntap_bump_compute(NTapBump *ntap_bump, ShadeInput *shi, MTex *mtex, T
fMagnitude = abs_fDet;
if ( mtex->texflag & MTEX_BUMP_OBJECTSPACE ) {
// pre do transform of texres->nor by the inverse transposed of obj2view
- mul_transposed_m3_v3( view2obj, vN );
- mul_transposed_m3_v3( view2obj, ntap_bump->vR1 );
- mul_transposed_m3_v3( view2obj, ntap_bump->vR2 );
+ mul_transposed_m3_v3(view2obj, vN);
+ mul_transposed_m3_v3(view2obj, ntap_bump->vR1);
+ mul_transposed_m3_v3(view2obj, ntap_bump->vR2);
fMagnitude *= len_v3(vN);
}
@@ -2356,8 +2350,8 @@ void do_material_tex(ShadeInput *shi, Render *re)
/* texture output */
if ( (rgbnor & TEX_RGB) && (mtex->texflag & MTEX_RGBTOINT)) {
- texres.tin= (0.35f*texres.tr+0.45f*texres.tg+0.2f*texres.tb);
- rgbnor-= TEX_RGB;
+ texres.tin = rgb_to_grayscale(&texres.tr);
+ rgbnor -= TEX_RGB;
}
if (mtex->texflag & MTEX_NEGATIVE) {
if (rgbnor & TEX_RGB) {
@@ -2387,9 +2381,7 @@ void do_material_tex(ShadeInput *shi, Render *re)
if ((rgbnor & TEX_NOR)==0) {
/* make our own normal */
if (rgbnor & TEX_RGB) {
- texres.nor[0]= texres.tr;
- texres.nor[1]= texres.tg;
- texres.nor[2]= texres.tb;
+ copy_v3_v3(texres.nor, &texres.tr);
}
else {
float co_nor= 0.5*cos(texres.tin-0.5f);
@@ -2437,22 +2429,21 @@ void do_material_tex(ShadeInput *shi, Render *re)
}
/* mapping */
- if (mtex->mapto & (MAP_COL+MAP_COLSPEC+MAP_COLMIR)) {
+ if (mtex->mapto & (MAP_COL | MAP_COLSPEC | MAP_COLMIR)) {
float tcol[3];
/* stencil maps on the texture control slider, not texture intensity value */
-
- tcol[0]=texres.tr; tcol[1]=texres.tg; tcol[2]=texres.tb;
-
- if ((rgbnor & TEX_RGB)==0) {
- tcol[0]= mtex->r;
- tcol[1]= mtex->g;
- tcol[2]= mtex->b;
+ copy_v3_v3(tcol, &texres.tr);
+
+ if ((rgbnor & TEX_RGB) == 0) {
+ copy_v3_v3(tcol, &mtex->r);
}
else if (mtex->mapto & MAP_ALPHA) {
- texres.tin= stencilTin;
+ texres.tin = stencilTin;
+ }
+ else {
+ texres.tin = texres.ta;
}
- else texres.tin= texres.ta;
/* inverse gamma correction */
if (tex->type==TEX_IMAGE) {
@@ -2595,7 +2586,7 @@ void do_material_tex(ShadeInput *shi, Render *re)
}
if (rgbnor & TEX_RGB) {
- texres.tin= (0.35f*texres.tr+0.45f*texres.tg+0.2f*texres.tb);
+ texres.tin = rgb_to_grayscale(&texres.tr);
}
factt= (0.5f-texres.tin)*mtex->dispfac*stencilTin; facmm= 1.0f-factt;
@@ -2622,8 +2613,8 @@ void do_material_tex(ShadeInput *shi, Render *re)
/* stencil maps on the texture control slider, not texture intensity value */
if (rgbnor & TEX_RGB) {
- if (texres.talpha) texres.tin= texres.ta;
- else texres.tin= (0.35f*texres.tr+0.45f*texres.tg+0.2f*texres.tb);
+ if (texres.talpha) texres.tin = texres.ta;
+ else texres.tin = rgb_to_grayscale(&texres.tr);
}
if (mtex->mapto & MAP_REF) {
@@ -2777,8 +2768,8 @@ void do_volume_tex(ShadeInput *shi, const float *xyz, int mapto_flag, float *col
/* texture output */
if ( (rgbnor & TEX_RGB) && (mtex->texflag & MTEX_RGBTOINT)) {
- texres.tin= (0.35f*texres.tr+0.45f*texres.tg+0.2f*texres.tb);
- rgbnor-= TEX_RGB;
+ texres.tin = rgb_to_grayscale(&texres.tr);
+ rgbnor -= TEX_RGB;
}
if (mtex->texflag & MTEX_NEGATIVE) {
if (rgbnor & TEX_RGB) {
@@ -2807,17 +2798,14 @@ void do_volume_tex(ShadeInput *shi, const float *xyz, int mapto_flag, float *col
/* stencil maps on the texture control slider, not texture intensity value */
- if ((rgbnor & TEX_RGB)==0) {
- tcol[0]= mtex->r;
- tcol[1]= mtex->g;
- tcol[2]= mtex->b;
+ if ((rgbnor & TEX_RGB) == 0) {
+ copy_v3_v3(tcol, &mtex->r);
}
else {
- tcol[0]=texres.tr;
- tcol[1]=texres.tg;
- tcol[2]=texres.tb;
- if (texres.talpha)
+ copy_v3_v3(tcol, &texres.tr);
+ if (texres.talpha) {
texres.tin= texres.ta;
+ }
}
/* used for emit */
@@ -2843,8 +2831,8 @@ void do_volume_tex(ShadeInput *shi, const float *xyz, int mapto_flag, float *col
/* convert RGB to intensity if intensity info isn't provided */
if (!(rgbnor & TEX_INT)) {
if (rgbnor & TEX_RGB) {
- if (texres.talpha) texres.tin= texres.ta;
- else texres.tin= (0.35f*texres.tr+0.45f*texres.tg+0.2f*texres.tb);
+ if (texres.talpha) texres.tin = texres.ta;
+ else texres.tin = rgb_to_grayscale(&texres.tr);
}
}
@@ -3054,7 +3042,7 @@ void do_sky_tex(const float rco[3], float lo[3], const float dxyview[2], float h
}
/* Grab the mapping settings for this texture */
- switch(mtex->texco) {
+ switch (mtex->texco) {
case TEXCO_ANGMAP:
/* only works with texture being "real" */
/* use saacos(), fixes bug [#22398], float precision caused lo[2] to be slightly less then -1.0 */
@@ -3077,8 +3065,8 @@ void do_sky_tex(const float rco[3], float lo[3], const float dxyview[2], float h
case TEXCO_H_SPHEREMAP:
case TEXCO_H_TUBEMAP:
if (skyflag & WO_ZENUP) {
- if (mtex->texco==TEXCO_H_TUBEMAP) map_to_tube( tempvec, tempvec+1,lo[0], lo[2], lo[1]);
- else map_to_sphere( tempvec, tempvec+1,lo[0], lo[2], lo[1]);
+ if (mtex->texco==TEXCO_H_TUBEMAP) map_to_tube( tempvec, tempvec+1, lo[0], lo[2], lo[1]);
+ else map_to_sphere(tempvec, tempvec+1, lo[0], lo[2], lo[1]);
/* tube/spheremap maps for outside view, not inside */
tempvec[0]= 1.0f-tempvec[0];
/* only top half */
@@ -3558,7 +3546,7 @@ Material *RE_init_sample_material(Material *orig_mat, Scene *scene)
mat = localize_material(orig_mat);
/* update material anims */
- BKE_animsys_evaluate_animdata(scene, &mat->id, mat->adt, BKE_curframe(scene), ADT_RECALC_ANIM);
+ BKE_animsys_evaluate_animdata(scene, &mat->id, mat->adt, BKE_scene_frame_get(scene), ADT_RECALC_ANIM);
/* strip material copy from unsupported flags */
for (tex_nr=0; tex_nr<MAX_MTEX; tex_nr++) {
@@ -3605,7 +3593,7 @@ Material *RE_init_sample_material(Material *orig_mat, Scene *scene)
tex= mtex->tex = localize_texture(mtex->tex);
/* update texture anims */
- BKE_animsys_evaluate_animdata(scene, &tex->id, tex->adt, BKE_curframe(scene), ADT_RECALC_ANIM);
+ BKE_animsys_evaluate_animdata(scene, &tex->id, tex->adt, BKE_scene_frame_get(scene), ADT_RECALC_ANIM);
/* update texture cache if required */
if (tex->type==TEX_VOXELDATA) {
@@ -3625,7 +3613,7 @@ Material *RE_init_sample_material(Material *orig_mat, Scene *scene)
/* update image sequences and movies */
if (tex->ima && ELEM(tex->ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) {
if (tex->iuser.flag & IMA_ANIM_ALWAYS)
- BKE_image_user_calc_frame(&tex->iuser, (int)scene->r.cfra, 0);
+ BKE_image_user_frame_calc(&tex->iuser, (int)scene->r.cfra, 0);
}
}
}
@@ -3644,14 +3632,14 @@ void RE_free_sample_material(Material *mat)
MTex *mtex= mat->mtex[tex_nr];
if (mtex->tex) {
- free_texture(mtex->tex);
+ BKE_texture_free(mtex->tex);
MEM_freeN(mtex->tex);
mtex->tex = NULL;
}
}
}
- free_material(mat);
+ BKE_material_free(mat);
MEM_freeN(mat);
}
@@ -3683,7 +3671,7 @@ void RE_sample_material_color(Material *mat, float color[3], float *alpha, const
if (!mvert || !mface || !mat) return;
v1=mface[face_index].v1, v2=mface[face_index].v2, v3=mface[face_index].v3;
if (hit_quad) {v2=mface[face_index].v3; v3=mface[face_index].v4;}
- normal_tri_v3( normal, mvert[v1].co, mvert[v2].co, mvert[v3].co);
+ normal_tri_v3(normal, mvert[v1].co, mvert[v2].co, mvert[v3].co);
/* generate shadeinput with data required */
shi.mat = mat;
@@ -3737,7 +3725,7 @@ void RE_sample_material_color(Material *mat, float color[3], float *alpha, const
}
}
/* active uv map */
- shi.actuv = CustomData_get_active_layer_index(&orcoDm->faceData,CD_MTFACE) - layer_index;
+ shi.actuv = CustomData_get_active_layer_index(&orcoDm->faceData, CD_MTFACE) - layer_index;
shi.totuv = layers;
}
diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c
index f5e36125299..0dc7f35dc56 100644
--- a/source/blender/render/intern/source/rendercore.c
+++ b/source/blender/render/intern/source/rendercore.c
@@ -457,7 +457,7 @@ static void add_filt_passes(RenderLayer *rl, int curmask, int rectx, int offset,
float *fp, *col= NULL;
int pixsize= 3;
- switch(rpass->passtype) {
+ switch (rpass->passtype) {
case SCE_PASS_Z:
fp= rpass->rect + offset;
*fp= shr->z;
@@ -569,7 +569,7 @@ static void add_passes(RenderLayer *rl, int offset, ShadeInput *shi, ShadeResult
float *col= NULL, uvcol[3];
int a, pixsize= 3;
- switch(rpass->passtype) {
+ switch (rpass->passtype) {
case SCE_PASS_Z:
fp= rpass->rect + offset;
*fp= shr->z;
@@ -889,10 +889,10 @@ static PixStrMain *addpsmain(ListBase *lb)
{
PixStrMain *psm;
- psm= (PixStrMain *)MEM_mallocN(sizeof(PixStrMain),"pixstrMain");
+ psm= (PixStrMain *)MEM_mallocN(sizeof(PixStrMain), "pixstrMain");
BLI_addtail(lb, psm);
- psm->ps= (PixStr *)MEM_mallocN(4096*sizeof(PixStr),"pixstr");
+ psm->ps= (PixStr *)MEM_mallocN(4096*sizeof(PixStr), "pixstr");
psm->counter= 0;
return psm;
@@ -2567,7 +2567,7 @@ static void *do_bake_thread(void *bs_v)
void RE_bake_ibuf_filter(ImBuf *ibuf, char *mask, const int filter)
{
/* must check before filtering */
- const short is_new_alpha= (ibuf->planes != R_IMF_PLANES_RGBA) && BKE_alphatest_ibuf(ibuf);
+ const short is_new_alpha= (ibuf->planes != R_IMF_PLANES_RGBA) && BKE_imbuf_alpha_test(ibuf);
/* Margin */
if (filter) {
diff --git a/source/blender/render/intern/source/renderdatabase.c b/source/blender/render/intern/source/renderdatabase.c
index 6a0c8e3526f..4a9e4be7f86 100644
--- a/source/blender/render/intern/source/renderdatabase.c
+++ b/source/blender/render/intern/source/renderdatabase.c
@@ -254,7 +254,7 @@ VertRen *RE_findOrAddVert(ObjectRen *obr, int nr)
int a;
if (nr<0) {
- printf("error in findOrAddVert: %d\n",nr);
+ printf("error in findOrAddVert: %d\n", nr);
return NULL;
}
a= nr>>8;
@@ -262,7 +262,7 @@ VertRen *RE_findOrAddVert(ObjectRen *obr, int nr)
if (a>=obr->vertnodeslen-1) { /* Need to allocate more columns..., and keep last element NULL for free loop */
temp= obr->vertnodes;
- obr->vertnodes= MEM_mallocN(sizeof(VertTableNode)*(obr->vertnodeslen+TABLEINITSIZE) , "vertnodes");
+ obr->vertnodes= MEM_mallocN(sizeof(VertTableNode)*(obr->vertnodeslen+TABLEINITSIZE), "vertnodes");
if (temp) memcpy(obr->vertnodes, temp, obr->vertnodeslen*sizeof(VertTableNode));
memset(obr->vertnodes+obr->vertnodeslen, 0, TABLEINITSIZE*sizeof(VertTableNode));
@@ -274,7 +274,7 @@ VertRen *RE_findOrAddVert(ObjectRen *obr, int nr)
if (v==NULL) {
int i;
- v= (VertRen *)MEM_callocN(256*sizeof(VertRen),"findOrAddVert");
+ v= (VertRen *)MEM_callocN(256*sizeof(VertRen), "findOrAddVert");
obr->vertnodes[a].vert= v;
for (i= (nr & 0xFFFFFF00), a=0; a<256; a++, i++) {
@@ -497,7 +497,7 @@ VlakRen *RE_findOrAddVlak(ObjectRen *obr, int nr)
int a;
if (nr<0) {
- printf("error in findOrAddVlak: %d\n",nr);
+ printf("error in findOrAddVlak: %d\n", nr);
return obr->vlaknodes[0].vlak;
}
a= nr>>8;
@@ -505,7 +505,7 @@ VlakRen *RE_findOrAddVlak(ObjectRen *obr, int nr)
if (a>=obr->vlaknodeslen-1) { /* Need to allocate more columns..., and keep last element NULL for free loop */
temp= obr->vlaknodes;
- obr->vlaknodes= MEM_mallocN(sizeof(VlakTableNode)*(obr->vlaknodeslen+TABLEINITSIZE) , "vlaknodes");
+ obr->vlaknodes= MEM_mallocN(sizeof(VlakTableNode)*(obr->vlaknodeslen+TABLEINITSIZE), "vlaknodes");
if (temp) memcpy(obr->vlaknodes, temp, obr->vlaknodeslen*sizeof(VlakTableNode));
memset(obr->vlaknodes+obr->vlaknodeslen, 0, TABLEINITSIZE*sizeof(VlakTableNode));
@@ -518,7 +518,7 @@ VlakRen *RE_findOrAddVlak(ObjectRen *obr, int nr)
if (v==NULL) {
int i;
- v= (VlakRen *)MEM_callocN(256*sizeof(VlakRen),"findOrAddVlak");
+ v= (VlakRen *)MEM_callocN(256*sizeof(VlakRen), "findOrAddVlak");
obr->vlaknodes[a].vlak= v;
for (i= (nr & 0xFFFFFF00), a=0; a<256; a++, i++)
@@ -668,7 +668,7 @@ StrandRen *RE_findOrAddStrand(ObjectRen *obr, int nr)
int a;
if (nr<0) {
- printf("error in findOrAddStrand: %d\n",nr);
+ printf("error in findOrAddStrand: %d\n", nr);
return obr->strandnodes[0].strand;
}
a= nr>>8;
@@ -676,7 +676,7 @@ StrandRen *RE_findOrAddStrand(ObjectRen *obr, int nr)
if (a>=obr->strandnodeslen-1) { /* Need to allocate more columns..., and keep last element NULL for free loop */
temp= obr->strandnodes;
- obr->strandnodes= MEM_mallocN(sizeof(StrandTableNode)*(obr->strandnodeslen+TABLEINITSIZE) , "strandnodes");
+ obr->strandnodes= MEM_mallocN(sizeof(StrandTableNode)*(obr->strandnodeslen+TABLEINITSIZE), "strandnodes");
if (temp) memcpy(obr->strandnodes, temp, obr->strandnodeslen*sizeof(StrandTableNode));
memset(obr->strandnodes+obr->strandnodeslen, 0, TABLEINITSIZE*sizeof(StrandTableNode));
@@ -689,7 +689,7 @@ StrandRen *RE_findOrAddStrand(ObjectRen *obr, int nr)
if (v==NULL) {
int i;
- v= (StrandRen *)MEM_callocN(256*sizeof(StrandRen),"findOrAddStrand");
+ v= (StrandRen *)MEM_callocN(256*sizeof(StrandRen), "findOrAddStrand");
obr->strandnodes[a].strand= v;
for (i= (nr & 0xFFFFFF00), a=0; a<256; a++, i++)
@@ -871,8 +871,7 @@ void free_renderdata_tables(Render *re)
}
if (re->objectinstance) {
- for (obi=re->instancetable.first; obi; obi=obi->next)
- {
+ for (obi=re->instancetable.first; obi; obi=obi->next) {
if (obi->vectors)
MEM_freeN(obi->vectors);
@@ -904,7 +903,7 @@ HaloRen *RE_findOrAddHalo(ObjectRen *obr, int nr)
int a;
if (nr<0) {
- printf("error in findOrAddHalo: %d\n",nr);
+ printf("error in findOrAddHalo: %d\n", nr);
return NULL;
}
a= nr>>8;
@@ -914,7 +913,7 @@ HaloRen *RE_findOrAddHalo(ObjectRen *obr, int nr)
// TABLEINITSIZE, obr->blohalen+TABLEINITSIZE );
temp=obr->bloha;
- obr->bloha=(HaloRen**)MEM_callocN(sizeof(void*)*(obr->blohalen+TABLEINITSIZE) , "Bloha");
+ obr->bloha=(HaloRen**)MEM_callocN(sizeof(void*)*(obr->blohalen+TABLEINITSIZE), "Bloha");
if (temp) memcpy(obr->bloha, temp, obr->blohalen*sizeof(void*));
memset(&(obr->bloha[obr->blohalen]), 0, TABLEINITSIZE*sizeof(void*));
obr->blohalen+=TABLEINITSIZE; /*Does this really need to be power of 2?*/
@@ -923,7 +922,7 @@ HaloRen *RE_findOrAddHalo(ObjectRen *obr, int nr)
h= obr->bloha[a];
if (h==NULL) {
- h= (HaloRen *)MEM_callocN(256*sizeof(HaloRen),"findOrAdHalo");
+ h= (HaloRen *)MEM_callocN(256*sizeof(HaloRen), "findOrAdHalo");
obr->bloha[a]= h;
}
h+= (nr & 255);
@@ -1051,7 +1050,7 @@ HaloRen *RE_inithalo_particle(Render *re, ObjectRen *obr, DerivedMesh *dm, Mater
HaloRen *har;
MTex *mtex;
float tin, tr, tg, tb, ta;
- float xn, yn, zn, texvec[3], hoco[4], hoco1[4], in[3],tex[3],out[3];
+ float xn, yn, zn, texvec[3], hoco[4], hoco1[4], in[3], tex[3], out[3];
int i, hasrgb;
if (hasize==0.0f) return NULL;
@@ -1125,24 +1124,24 @@ HaloRen *RE_inithalo_particle(Render *re, ObjectRen *obr, DerivedMesh *dm, Mater
}
else if (mtex->texco & TEXCO_OBJECT) {
if (mtex->object)
- mul_m4_v3(mtex->object->imat_ren,texvec);
+ mul_m4_v3(mtex->object->imat_ren, texvec);
}
else if (mtex->texco & TEXCO_GLOB) {
- copy_v3_v3(texvec,vec);
+ copy_v3_v3(texvec, vec);
}
else if (mtex->texco & TEXCO_UV && uvco) {
- int uv_index=CustomData_get_named_layer_index(&dm->faceData,CD_MTFACE,mtex->uvname);
+ int uv_index=CustomData_get_named_layer_index(&dm->faceData, CD_MTFACE, mtex->uvname);
if (uv_index<0)
- uv_index=CustomData_get_active_layer_index(&dm->faceData,CD_MTFACE);
+ uv_index=CustomData_get_active_layer_index(&dm->faceData, CD_MTFACE);
- uv_index-=CustomData_get_layer_index(&dm->faceData,CD_MTFACE);
+ uv_index-=CustomData_get_layer_index(&dm->faceData, CD_MTFACE);
texvec[0]=2.0f*uvco[2*uv_index]-1.0f;
texvec[1]=2.0f*uvco[2*uv_index+1]-1.0f;
texvec[2]=0.0f;
}
else if (mtex->texco & TEXCO_PARTICLE) {
- /* particle coordinates in range [0,1] */
+ /* particle coordinates in range [0, 1] */
texvec[0] = 2.f * pa_co[0] - 1.f;
texvec[1] = 2.f * pa_co[1] - 1.f;
texvec[2] = pa_co[2];
@@ -1163,7 +1162,7 @@ HaloRen *RE_inithalo_particle(Render *re, ObjectRen *obr, DerivedMesh *dm, Mater
out[1]=har->g;
out[2]=har->b;
- texture_rgb_blend(in,tex,out,tin,mtex->colfac,mtex->blendtype);
+ texture_rgb_blend(in, tex, out, tin, mtex->colfac, mtex->blendtype);
// zn= 1.0-yn;
//har->r= (yn*tr+ zn*ma->r);
//har->g= (yn*tg+ zn*ma->g);
@@ -1178,13 +1177,13 @@ HaloRen *RE_inithalo_particle(Render *re, ObjectRen *obr, DerivedMesh *dm, Mater
tin = ta;
if (mtex->mapto & MAP_ALPHA)
- har->alfa = texture_value_blend(mtex->def_var,har->alfa,tin,mtex->alphafac,mtex->blendtype);
+ har->alfa = texture_value_blend(mtex->def_var, har->alfa, tin, mtex->alphafac, mtex->blendtype);
if (mtex->mapto & MAP_HAR)
- har->hard = 1.0f+126.0f*texture_value_blend(mtex->def_var,((float)har->hard)/127.0f,tin,mtex->hardfac,mtex->blendtype);
+ har->hard = 1.0f+126.0f*texture_value_blend(mtex->def_var, ((float)har->hard)/127.0f, tin, mtex->hardfac, mtex->blendtype);
if (mtex->mapto & MAP_RAYMIRR)
- har->hasize = 100.0f*texture_value_blend(mtex->def_var,har->hasize/100.0f,tin,mtex->raymirrfac,mtex->blendtype);
+ har->hasize = 100.0f*texture_value_blend(mtex->def_var, har->hasize/100.0f, tin, mtex->raymirrfac, mtex->blendtype);
if (mtex->mapto & MAP_TRANSLU) {
- float add = texture_value_blend(mtex->def_var,(float)har->add/255.0f,tin,mtex->translfac,mtex->blendtype);
+ float add = texture_value_blend(mtex->def_var, (float)har->add/255.0f, tin, mtex->translfac, mtex->blendtype);
CLAMP(add, 0.f, 1.f);
har->add = 255.0f*add;
}
@@ -1274,8 +1273,7 @@ void project_renderdata(Render *re, void (*projectfunc)(const float *, float mat
else if (hoco[3]<0.0f) {
har->miny= har->maxy= -10000; /* render clips it */
}
- else /* do the projection...*/
- {
+ else { /* do the projection...*/
/* bring back hocos */
hoco[0]*= 2.0f;
hoco[1]*= 2.0f;
diff --git a/source/blender/render/intern/source/shadbuf.c b/source/blender/render/intern/source/shadbuf.c
index 7b17c782590..b3167e15df5 100644
--- a/source/blender/render/intern/source/shadbuf.c
+++ b/source/blender/render/intern/source/shadbuf.c
@@ -108,7 +108,7 @@ static void copy_to_ztile(int *rectz, int size, int x1, int y1, int tile, char *
#if 0
static int sizeoflampbuf(ShadBuf *shb)
{
- int num,count=0;
+ int num, count=0;
char *cp;
cp= shb->cbuf;
@@ -139,7 +139,7 @@ static float *give_jitter_tab(int samp)
if (ctab[samp]==0) {
ctab[samp]= 1;
- BLI_initjit(jit[offset], samp*samp);
+ BLI_jitter_init(jit[offset], samp*samp);
}
return jit[offset];
@@ -193,7 +193,7 @@ static int compress_deepsamples(DeepSample *dsample, int tot, float epsilon)
#if 0
if (print) {
for (a=0, ds=dsample; a<tot; a++, ds++)
- printf("%lf,%f ", ds->z/(double)0x7FFFFFFF, ds->v);
+ printf("%lf, %f ", ds->z/(double)0x7FFFFFFF, ds->v);
printf("\n");
}
#endif
@@ -278,7 +278,7 @@ static int compress_deepsamples(DeepSample *dsample, int tot, float epsilon)
#if 0
if (print) {
for (a=0, ds=dsample; a<newtot; a++, ds++)
- printf("%lf,%f ", ds->z/(double)0x7FFFFFFF, ds->v);
+ printf("%lf, %f ", ds->z/(double)0x7FFFFFFF, ds->v);
printf("\n");
}
#endif
@@ -319,7 +319,7 @@ static void compress_deepshadowbuf(Render *re, ShadBuf *shb, APixstr *apixbuf, A
int a, b, c, tot, minz, found, prevtot, newtot;
int sampletot[RE_MAX_OSA], totsample = 0, totsamplec = 0;
- shsample= MEM_callocN( sizeof(ShadSampleBuf), "shad sample buf");
+ shsample= MEM_callocN(sizeof(ShadSampleBuf), "shad sample buf");
BLI_addtail(&shb->buffers, shsample);
shsample->totbuf= MEM_callocN(sizeof(int)*size*size, "deeptotbuf");
@@ -511,11 +511,11 @@ static void compress_shadowbuf(ShadBuf *shb, int *rectz, int square)
int a, x, y, minx, miny, byt1, byt2;
char *rc, *rcline, *ctile, *zt;
- shsample= MEM_callocN( sizeof(ShadSampleBuf), "shad sample buf");
+ shsample= MEM_callocN(sizeof(ShadSampleBuf), "shad sample buf");
BLI_addtail(&shb->buffers, shsample);
- shsample->zbuf= MEM_mallocN( sizeof(uintptr_t)*(size*size)/256, "initshadbuf2");
- shsample->cbuf= MEM_callocN( (size*size)/256, "initshadbuf3");
+ shsample->zbuf= MEM_mallocN(sizeof(uintptr_t)*(size*size)/256, "initshadbuf2");
+ shsample->cbuf= MEM_callocN((size*size)/256, "initshadbuf3");
ztile= (uintptr_t *)shsample->zbuf;
ctile= shsample->cbuf;
@@ -546,7 +546,7 @@ static void compress_shadowbuf(ShadBuf *shb, int *rectz, int square)
verg= (*rz1 & 0xFFFFFF00);
- for (a=0;a<256;a++,rz1++) {
+ for (a=0;a<256;a++, rz1++) {
if ( (*rz1 & 0xFFFFFF00) !=verg) break;
}
}
@@ -564,7 +564,7 @@ static void compress_shadowbuf(ShadBuf *shb, int *rectz, int square)
verg1= rc[BCOMP];
rc+= 4;
byt1= 1; byt2= 1;
- for (a=1;a<256;a++,rc+=4) {
+ for (a=1;a<256;a++, rc+=4) {
byt1 &= (verg==rc[ACOMP]);
byt2 &= (verg1==rc[BCOMP]);
@@ -582,7 +582,7 @@ static void compress_shadowbuf(ShadBuf *shb, int *rectz, int square)
}
else if (byt1) { /* only store short */
*ctile= 2;
- *ztile= (uintptr_t)MEM_mallocN(2*256+4,"Tile2");
+ *ztile= (uintptr_t)MEM_mallocN(2*256+4, "Tile2");
rz= (int *)*ztile;
*rz= *rz1;
@@ -595,7 +595,7 @@ static void compress_shadowbuf(ShadBuf *shb, int *rectz, int square)
}
else { /* store triple */
*ctile= 3;
- *ztile= (uintptr_t)MEM_mallocN(3*256,"Tile3");
+ *ztile= (uintptr_t)MEM_mallocN(3*256, "Tile3");
zt= (char *)*ztile;
rc= rcline;
@@ -779,7 +779,7 @@ void makeshadowbuf(Render *re, LampRen *lar)
shb->pixsize= (shb->d)/temp;
wsize= shb->pixsize*(shb->size/2.0f);
- perspective_m4( shb->winmat,-wsize, wsize, -wsize, wsize, shb->d, shb->clipend);
+ perspective_m4(shb->winmat, -wsize, wsize, -wsize, wsize, shb->d, shb->clipend);
mult_m4_m4m4(shb->persmat, shb->winmat, shb->viewmat);
if (ELEM3(lar->buftype, LA_SHADBUF_REGULAR, LA_SHADBUF_HALFWAY, LA_SHADBUF_DEEP)) {
@@ -1192,7 +1192,7 @@ float testshadowbuf(Render *re, ShadBuf *shb, const float co[3], const float dxc
if (firstreadshadbuf(shb, shsample, &rz, (int)(xs1+xres), (int)ys1, 1)) {
if (firstreadshadbuf(shb, shsample, &rz, (int)xs1, (int)(ys1+yres), 1)) {
if (firstreadshadbuf(shb, shsample, &rz, (int)(xs1+xres), (int)(ys1+yres), 1)) {
- return readshadowbuf(shb, shsample, bias,(int)xs1, (int)ys1, zs);
+ return readshadowbuf(shb, shsample, bias, (int)xs1, (int)ys1, zs);
}
}
}
@@ -2074,7 +2074,7 @@ static int viewpixel_to_lampbuf(ShadBuf *shb, ObjectInstanceRen *obi, VlakRen *v
dface = dot_v3v3(v1, nor);
hoco[3]= 1.0f;
- /* ortho viewplane cannot intersect using view vector originating in (0,0,0) */
+ /* ortho viewplane cannot intersect using view vector originating in (0, 0, 0) */
if (R.r.mode & R_ORTHO) {
/* x and y 3d coordinate can be derived from pixel coord and winmat */
float fx= 2.0f/(R.winx*R.winmat[0][0]);
@@ -2160,8 +2160,8 @@ static int isb_add_samples(RenderPart *pa, ISBBranch *root, MemArena *memarena,
int sample, bsp_err= 0;
/* bsp split doesn't like to handle regular sequences */
- xcos= MEM_mallocN( pa->rectx*sizeof(int), "xcos");
- ycos= MEM_mallocN( pa->recty*sizeof(int), "ycos");
+ xcos= MEM_mallocN(pa->rectx*sizeof(int), "xcos");
+ ycos= MEM_mallocN(pa->recty*sizeof(int), "ycos");
for (xi=0; xi<pa->rectx; xi++)
xcos[xi]= xi;
for (yi=0; yi<pa->recty; yi++)
@@ -2364,8 +2364,8 @@ static int isb_add_samples_transp(RenderPart *pa, ISBBranch *root, MemArena *mem
int sample, bsp_err= 0;
/* bsp split doesn't like to handle regular sequences */
- xcos= MEM_mallocN( pa->rectx*sizeof(int), "xcos");
- ycos= MEM_mallocN( pa->recty*sizeof(int), "ycos");
+ xcos= MEM_mallocN(pa->rectx*sizeof(int), "xcos");
+ ycos= MEM_mallocN(pa->recty*sizeof(int), "ycos");
for (xi=0; xi<pa->rectx; xi++)
xcos[xi]= xi;
for (yi=0; yi<pa->recty; yi++)
diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c
index cf688982eda..53d06893a3f 100644
--- a/source/blender/render/intern/source/shadeoutput.c
+++ b/source/blender/render/intern/source/shadeoutput.c
@@ -550,7 +550,7 @@ static float spec(float inp, int hard)
return inp;
}
-static float Phong_Spec( float *n, float *l, float *v, int hard, int tangent )
+static float Phong_Spec(float *n, float *l, float *v, int hard, int tangent )
{
float h[3];
float rslt;
@@ -638,7 +638,7 @@ static float Blinn_Spec(float *n, float *l, float *v, float refrac, float spec_p
else if ( b < a && b < c ) g = b;
else if ( c < a && c < b ) g = c;
- p = sqrt( (double)((refrac * refrac)+(vh*vh)-1.0f) );
+ p = sqrt((double)((refrac * refrac)+(vh * vh) - 1.0f));
f = (((p-vh)*(p-vh))/((p+vh)*(p+vh)))*(1+((((vh*(p+vh))-1.0f)*((vh*(p+vh))-1.0f))/(((vh*(p-vh))+1.0f)*((vh*(p-vh))+1.0f))));
ang = saacos(nh);
@@ -649,7 +649,7 @@ static float Blinn_Spec(float *n, float *l, float *v, float refrac, float spec_p
}
/* cartoon render spec */
-static float Toon_Spec( float *n, float *l, float *v, float size, float smooth, int tangent)
+static float Toon_Spec(float *n, float *l, float *v, float size, float smooth, int tangent)
{
float h[3];
float ang;
@@ -673,7 +673,7 @@ static float Toon_Spec( float *n, float *l, float *v, float size, float smooth,
}
/* Ward isotropic gaussian spec */
-static float WardIso_Spec( float *n, float *l, float *v, float rms, int tangent)
+static float WardIso_Spec(float *n, float *l, float *v, float rms, int tangent)
{
float i, nh, nv, nl, h[3], angle, alpha;
@@ -705,7 +705,7 @@ static float WardIso_Spec( float *n, float *l, float *v, float rms, int tangent)
}
/* cartoon render diffuse */
-static float Toon_Diff( float *n, float *l, float *UNUSED(v), float size, float smooth )
+static float Toon_Diff(float *n, float *l, float *UNUSED(v), float size, float smooth)
{
float rslt, ang;
@@ -754,12 +754,12 @@ static float OrenNayar_Diff(float nl, float *n, float *l, float *v, float rough
Lit_B[0] = l[0] - (realnl * n[0]);
Lit_B[1] = l[1] - (realnl * n[1]);
Lit_B[2] = l[2] - (realnl * n[2]);
- normalize_v3( Lit_B );
+ normalize_v3(Lit_B);
View_B[0] = v[0] - (nv * n[0]);
View_B[1] = v[1] - (nv * n[1]);
View_B[2] = v[2] - (nv * n[2]);
- normalize_v3( View_B );
+ normalize_v3(View_B);
t = Lit_B[0]*View_B[0] + Lit_B[1]*View_B[1] + Lit_B[2]*View_B[2];
if ( t < 0 ) t = 0;
@@ -931,7 +931,7 @@ static void add_to_diffuse(float *diff, ShadeInput *shi, float is, float r, floa
float fac;
/* input */
- switch(ma->rampin_col) {
+ switch (ma->rampin_col) {
case MA_RAMP_IN_ENERGY:
/* should use 'rgb_to_grayscale' but we only have a vector version */
fac= 0.3f*r + 0.58f*g + 0.12f*b;
@@ -1003,7 +1003,7 @@ static void do_specular_ramp(ShadeInput *shi, float is, float t, float spec[3])
float col[4];
/* input */
- switch(ma->rampin_spec) {
+ switch (ma->rampin_spec) {
case MA_RAMP_IN_ENERGY:
fac= t;
break;
@@ -1158,8 +1158,7 @@ float lamp_get_visibility(LampRen *lar, const float co[3], float lv[3], float *d
// visifac= 0.0f;
}
else {
- switch(lar->falloff_type)
- {
+ switch (lar->falloff_type) {
case LA_FALLOFF_CONSTANT:
visifac = 1.0f;
break;
diff --git a/source/blender/render/intern/source/sss.c b/source/blender/render/intern/source/sss.c
index b6eccc3e10f..cbcc63148e9 100644
--- a/source/blender/render/intern/source/sss.c
+++ b/source/blender/render/intern/source/sss.c
@@ -1,5 +1,4 @@
/*
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -30,7 +29,6 @@
* \ingroup render
*/
-
/* Possible Improvements:
* - add fresnel terms
* - adapt Rd table to scale, now with small scale there are a lot of misses?
@@ -176,7 +174,7 @@ static float compute_reduced_albedo(ScatterSettings *ss)
{
const float tolerance= 1e-8;
const int max_iteration_count= 20;
- float d, fsub, xn_1= 0.0f , xn= 1.0f, fxn, fxn_1;
+ float d, fsub, xn_1= 0.0f, xn= 1.0f, fxn, fxn_1;
int i;
/* use secant method to compute reduced albedo using Rd function inverse
diff --git a/source/blender/render/intern/source/strand.c b/source/blender/render/intern/source/strand.c
index ea6b099996d..f986be5eaeb 100644
--- a/source/blender/render/intern/source/strand.c
+++ b/source/blender/render/intern/source/strand.c
@@ -323,13 +323,18 @@ struct StrandShadeCache {
MemArena *memarena;
};
+typedef struct StrandCacheEntry {
+ GHashPair pair;
+ ShadeResult shr;
+} StrandCacheEntry;
+
StrandShadeCache *strand_shade_cache_create(void)
{
StrandShadeCache *cache;
cache= MEM_callocN(sizeof(StrandShadeCache), "StrandShadeCache");
- cache->resulthash= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "strand_shade_cache_create1 gh");
- cache->refcounthash= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "strand_shade_cache_create2 gh");
+ cache->resulthash= BLI_ghash_new(BLI_ghashutil_pairhash, BLI_ghashutil_paircmp, "strand_shade_cache_create1 gh");
+ cache->refcounthash= BLI_ghash_new(BLI_ghashutil_pairhash, BLI_ghashutil_paircmp, "strand_shade_cache_create2 gh");
cache->memarena= BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, "strand shade cache arena");
return cache;
@@ -338,39 +343,47 @@ StrandShadeCache *strand_shade_cache_create(void)
void strand_shade_cache_free(StrandShadeCache *cache)
{
BLI_ghash_free(cache->refcounthash, NULL, NULL);
- BLI_ghash_free(cache->resulthash, NULL, (GHashValFreeFP)MEM_freeN);
+ BLI_ghash_free(cache->resulthash, (GHashKeyFreeFP)MEM_freeN, NULL);
BLI_memarena_free(cache->memarena);
MEM_freeN(cache);
}
+static GHashPair strand_shade_hash_pair(ObjectInstanceRen *obi, StrandVert *svert)
+{
+ GHashPair pair = {obi, svert};
+ return pair;
+}
+
static void strand_shade_get(Render *re, StrandShadeCache *cache, ShadeSample *ssamp, StrandSegment *sseg, StrandVert *svert)
{
- ShadeResult *hashshr;
+ StrandCacheEntry *entry;
StrandPoint p;
int *refcount;
+ GHashPair pair = strand_shade_hash_pair(sseg->obi, svert);
- hashshr= BLI_ghash_lookup(cache->resulthash, svert);
- refcount= BLI_ghash_lookup(cache->refcounthash, svert);
+ entry= BLI_ghash_lookup(cache->resulthash, &pair);
+ refcount= BLI_ghash_lookup(cache->refcounthash, &pair);
- if (!hashshr) {
+ if (!entry) {
/* not shaded yet, shade and insert into hash */
p.t= (sseg->v[1] == svert)? 0.0f: 1.0f;
strand_eval_point(sseg, &p);
strand_shade_point(re, ssamp, sseg, svert, &p);
- hashshr= MEM_callocN(sizeof(ShadeResult), "HashShadeResult");
- *hashshr= ssamp->shr[0];
- BLI_ghash_insert(cache->resulthash, svert, hashshr);
+ entry= MEM_callocN(sizeof(StrandCacheEntry), "StrandCacheEntry");
+ entry->pair = pair;
+ entry->shr = ssamp->shr[0];
+ BLI_ghash_insert(cache->resulthash, entry, entry);
}
else
/* already shaded, just copy previous result from hash */
- ssamp->shr[0]= *hashshr;
+ ssamp->shr[0]= entry->shr;
/* lower reference count and remove if not needed anymore by any samples */
(*refcount)--;
if (*refcount == 0) {
- BLI_ghash_remove(cache->resulthash, svert, NULL, (GHashValFreeFP)MEM_freeN);
- BLI_ghash_remove(cache->refcounthash, svert, NULL, NULL);
+ BLI_ghash_remove(cache->resulthash, &pair, (GHashKeyFreeFP)MEM_freeN, NULL);
+ BLI_ghash_remove(cache->refcounthash, &pair, NULL, NULL);
}
}
@@ -388,34 +401,39 @@ void strand_shade_segment(Render *re, StrandShadeCache *cache, StrandSegment *ss
/* apply alpha along width */
if (sseg->buffer->widthfade != 0.0f) {
- s = 1.0f - pow(fabs(s), sseg->buffer->widthfade);
+ s = 1.0f - powf(fabsf(s), sseg->buffer->widthfade);
strand_apply_shaderesult_alpha(ssamp->shr, s);
}
}
-void strand_shade_unref(StrandShadeCache *cache, StrandVert *svert)
+void strand_shade_unref(StrandShadeCache *cache, ObjectInstanceRen *obi, StrandVert *svert)
{
+ GHashPair pair = strand_shade_hash_pair(obi, svert);
int *refcount;
/* lower reference count and remove if not needed anymore by any samples */
- refcount= BLI_ghash_lookup(cache->refcounthash, svert);
+ refcount= BLI_ghash_lookup(cache->refcounthash, &pair);
(*refcount)--;
if (*refcount == 0) {
- BLI_ghash_remove(cache->resulthash, svert, NULL, (GHashValFreeFP)MEM_freeN);
- BLI_ghash_remove(cache->refcounthash, svert, NULL, NULL);
+ BLI_ghash_remove(cache->resulthash, &pair, (GHashKeyFreeFP)MEM_freeN, NULL);
+ BLI_ghash_remove(cache->refcounthash, &pair, NULL, NULL);
}
}
-static void strand_shade_refcount(StrandShadeCache *cache, StrandVert *svert)
+static void strand_shade_refcount(StrandShadeCache *cache, StrandSegment *sseg, StrandVert *svert)
{
- int *refcount= BLI_ghash_lookup(cache->refcounthash, svert);
+ GHashPair pair = strand_shade_hash_pair(sseg->obi, svert);
+ GHashPair *key;
+ int *refcount= BLI_ghash_lookup(cache->refcounthash, &pair);
if (!refcount) {
+ key= BLI_memarena_alloc(cache->memarena, sizeof(GHashPair));
+ *key = pair;
refcount= BLI_memarena_alloc(cache->memarena, sizeof(int));
*refcount= 1;
- BLI_ghash_insert(cache->refcounthash, svert, refcount);
+ BLI_ghash_insert(cache->refcounthash, key, refcount);
}
else
(*refcount)++;
@@ -485,7 +503,7 @@ static APixstrand *addpsmainAstrand(ListBase *lb)
psm= MEM_mallocN(sizeof(APixstrMain), "addpsmainA");
BLI_addtail(lb, psm);
- psm->ps= MEM_callocN(4096*sizeof(APixstrand),"pixstr");
+ psm->ps = MEM_callocN(4096 * sizeof(APixstrand), "pixstr");
return psm->ps;
}
@@ -580,8 +598,8 @@ static void do_strand_fillac(void *handle, int x, int y, float u, float v, float
}
if (cache) {
- strand_shade_refcount(cache, sseg->v[1]);
- strand_shade_refcount(cache, sseg->v[2]);
+ strand_shade_refcount(cache, sseg, sseg->v[1]);
+ strand_shade_refcount(cache, sseg, sseg->v[2]);
}
spart->totapixbuf[offset]++;
}
diff --git a/source/blender/render/intern/source/sunsky.c b/source/blender/render/intern/source/sunsky.c
index 8097628e575..111ec75dd27 100644
--- a/source/blender/render/intern/source/sunsky.c
+++ b/source/blender/render/intern/source/sunsky.c
@@ -71,7 +71,7 @@
/**
* ClipColor:
- * clip a color to range [0,1];
+ * clip a color to range [0, 1];
* */
void ClipColor(float c[3])
{
@@ -146,7 +146,7 @@ static float PerezFunction(struct SunSky *sunsky, const float *lam, float theta,
* back_scatter, controls back scatter light
* */
void InitSunSky(struct SunSky *sunsky, float turb, float *toSun, float horizon_brightness,
- float spread,float sun_brightness, float sun_size, float back_scatter,
+ float spread, float sun_brightness, float sun_size, float back_scatter,
float skyblendfac, short skyblendtype, float sky_exposure, float sky_colorspace)
{
float theta2;
@@ -251,7 +251,7 @@ void InitSunSky(struct SunSky *sunsky, float turb, float *toSun, float horizon_b
void GetSkyXYZRadiance(struct SunSky* sunsky, float theta, float phi, float color_out[3])
{
float gamma;
- float x,y,Y,X,Z;
+ float x, y, Y, X, Z;
float hfade=1, nfade=1;
@@ -336,12 +336,11 @@ static void ComputeAttenuatedSunlight(float theta, int turbidity, float fTau[3])
fAlpha = 1.3f;
fBeta = 0.04608365822050f * turbidity - 0.04586025928522f;
- m = 1.0f/(cosf(theta) + 0.15f*powf(93.885f-theta/(float)M_PI*180.0f,-1.253f));
+ m = 1.0f/(cosf(theta) + 0.15f*powf(93.885f-theta/(float)M_PI*180.0f, -1.253f));
- for (i = 0; i < 3; i++)
- {
+ for (i = 0; i < 3; i++) {
// Rayleigh Scattering
- fTauR = expf( -m * 0.008735f * powf(fLambda[i], (float)(-4.08f)));
+ fTauR = expf(-m * 0.008735f * powf(fLambda[i], (float)(-4.08f)));
// Aerosal (water + dust) attenuation
fTauA = exp(-m * fBeta * powf(fLambda[i], -fAlpha));
@@ -375,7 +374,7 @@ void InitAtmosphere(struct SunSky *sunSky, float sun_intens, float mief, float r
float K[3] = {0.685f, 0.679f, 0.670f};
float vBetaMieTemp[3];
- float fLambda[3],fLambda2[3], fLambda4[3];
+ float fLambda[3], fLambda2[3], fLambda4[3];
float vLambda2[3];
float vLambda4[3];
@@ -393,8 +392,7 @@ void InitAtmosphere(struct SunSky *sunSky, float sun_intens, float mief, float r
fLambda[0] = 1/650e-9f;
fLambda[1] = 1/570e-9f;
fLambda[2] = 1/475e-9f;
- for (i=0; i < 3; i++)
- {
+ for (i=0; i < 3; i++) {
fLambda2[i] = fLambda[i]*fLambda[i];
fLambda4[i] = fLambda2[i]*fLambda2[i];
}
@@ -413,7 +411,7 @@ void InitAtmosphere(struct SunSky *sunSky, float sun_intens, float mief, float r
VEC3OPF(sunSky->atm_BetaRay, vLambda4, *, fBeta);
fBetaDash = fTemp/2;
- VEC3OPF(sunSky->atm_BetaDashRay, vLambda4,*, fBetaDash);
+ VEC3OPF(sunSky->atm_BetaDashRay, vLambda4, *, fBetaDash);
// Mie scattering constants.
@@ -423,7 +421,7 @@ void InitAtmosphere(struct SunSky *sunSky, float sun_intens, float mief, float r
fTemp3 = 0.434f*c*pi*(2*pi)*(2*pi);
VEC3OPV(vBetaMieTemp, K, *, fLambda);
- VEC3OPF(sunSky->atm_BetaMie, vBetaMieTemp,*, fTemp3);
+ VEC3OPF(sunSky->atm_BetaMie, vBetaMieTemp, *, fTemp3);
}
@@ -436,7 +434,7 @@ void InitAtmosphere(struct SunSky *sunSky, float sun_intens, float mief, float r
* s, is distance
* rgb, contains rendered color value for a pixle
* */
-void AtmospherePixleShader( struct SunSky* sunSky, float view[3], float s, float rgb[3])
+void AtmospherePixleShader(struct SunSky* sunSky, float view[3], float s, float rgb[3])
{
float costheta;
float Phase_1;
@@ -486,7 +484,7 @@ void AtmospherePixleShader( struct SunSky* sunSky, float view[3], float s, float
FOPVEC3(vTemp2, 1.0f, -, E1);
VEC3OPV(vTemp1, vTemp1, *, vTemp2);
- FOPVEC3(vTemp2, 1.0f, / , sunSky->atm_BetaRM);
+ FOPVEC3(vTemp2, 1.0f, /, sunSky->atm_BetaRM);
VEC3OPV(I, vTemp1, *, vTemp2);
diff --git a/source/blender/render/intern/source/volume_precache.c b/source/blender/render/intern/source/volume_precache.c
index 8b059d4a564..ff715eeca07 100644
--- a/source/blender/render/intern/source/volume_precache.c
+++ b/source/blender/render/intern/source/volume_precache.c
@@ -95,7 +95,7 @@ static int intersect_outside_volume(RayObject *tree, Isect *isect, float *offset
static int point_inside_obi(RayObject *tree, ObjectInstanceRen *UNUSED(obi), float *co)
{
Isect isect= {{0}};
- float dir[3] = {0.0f,0.0f,1.0f};
+ float dir[3] = {0.0f, 0.0f, 1.0f};
int final_depth=0, depth=0, limit=20;
/* set up the isect */
@@ -177,7 +177,7 @@ static float get_avg_surrounds(float *cache, int *res, int xx, int yy, int zz)
for (x=-1; x <= 1; x++) {
x_ = xx+x;
if (x_ >= 0 && x_ <= res[0]-1) {
- const int i= V_I(x_, y_, z_, res);
+ const int i = BLI_VOXEL_INDEX(x_, y_, z_, res);
if (cache[i] > 0.0f) {
tot += cache[i];
@@ -208,7 +208,7 @@ static void lightcache_filter(VolumePrecache *vp)
for (y=0; y < vp->res[1]; y++) {
for (x=0; x < vp->res[0]; x++) {
/* trigger for outside mesh */
- const int i= V_I(x, y, z, vp->res);
+ const int i = BLI_VOXEL_INDEX(x, y, z, vp->res);
if (vp->data_r[i] < -0.f)
vp->data_r[i] = get_avg_surrounds(vp->data_r, vp->res, x, y, z);
@@ -240,7 +240,7 @@ static void lightcache_filter2(VolumePrecache *vp)
for (y=0; y < vp->res[1]; y++) {
for (x=0; x < vp->res[0]; x++) {
/* trigger for outside mesh */
- const int i= V_I(x, y, z, vp->res);
+ const int i = BLI_VOXEL_INDEX(x, y, z, vp->res);
if (vp->data_r[i] < -0.f)
new_r[i] = get_avg_surrounds(vp->data_r, vp->res, x, y, z);
if (vp->data_g[i] < -0.f)
@@ -291,7 +291,7 @@ static float total_ss_energy(Render *re, int do_test_break, VolumePrecache *vp)
for (z=0; z < res[2]; z++) {
for (y=0; y < res[1]; y++) {
for (x=0; x < res[0]; x++) {
- const int i=V_I(x, y, z, res);
+ const int i = BLI_VOXEL_INDEX(x, y, z, res);
if (vp->data_r[i] > 0.f) energy += vp->data_r[i];
if (vp->data_g[i] > 0.f) energy += vp->data_g[i];
@@ -313,7 +313,7 @@ static float total_ms_energy(Render *re, int do_test_break, float *sr, float *sg
for (z=1;z<=res[2];z++) {
for (y=1;y<=res[1];y++) {
for (x=1;x<=res[0];x++) {
- const int i = ms_I(x,y,z,res);
+ const int i = ms_I(x, y, z, res);
if (sr[i] > 0.f) energy += sr[i];
if (sg[i] > 0.f) energy += sg[i];
@@ -334,16 +334,12 @@ static void ms_diffuse(Render *re, int do_test_break, float *x0, float *x, float
size_t size = n[0]*n[1]*n[2];
const float a = dt*diff*size;
- for (l=0; l<20; l++)
- {
- for (k=1; k<=n[2]; k++)
- {
- for (j=1; j<=n[1]; j++)
- {
- for (i=1; i<=n[0]; i++)
- {
- x[v_I_pad(i,j,k,n)] = (x0[v_I_pad(i,j,k,n)]) + a*( x0[v_I_pad(i-1,j,k,n)]+ x0[v_I_pad(i+1,j,k,n)]+ x0[v_I_pad(i,j-1,k,n)]+
- x0[v_I_pad(i,j+1,k,n)]+ x0[v_I_pad(i,j,k-1,n)]+x0[v_I_pad(i,j,k+1,n)]
+ for (l=0; l<20; l++) {
+ for (k=1; k<=n[2]; k++) {
+ for (j=1; j<=n[1]; j++) {
+ for (i=1; i<=n[0]; i++) {
+ x[v_I_pad(i, j, k, n)] = (x0[v_I_pad(i, j, k, n)]) + a*( x0[v_I_pad(i-1, j, k, n)]+ x0[v_I_pad(i+1, j, k, n)]+ x0[v_I_pad(i, j-1, k, n)]+
+ x0[v_I_pad(i, j+1, k, n)]+ x0[v_I_pad(i, j, k-1, n)]+x0[v_I_pad(i, j, k+1, n)]
) / (1+6*a);
}
}
@@ -384,16 +380,12 @@ static void multiple_scattering_diffusion(Render *re, VolumePrecache *vp, Materi
energy_ss = total_ss_energy(re, do_test_break, vp);
/* Scattering as diffusion pass */
- for (m=0; m<simframes; m++)
- {
+ for (m=0; m<simframes; m++) {
/* add sources */
- for (z=1; z<=n[2]; z++)
- {
- for (y=1; y<=n[1]; y++)
- {
- for (x=1; x<=n[0]; x++)
- {
- const int i = lc_to_ms_I(x, y ,z, n); //lc index
+ for (z=1; z<=n[2]; z++) {
+ for (y=1; y<=n[1]; y++) {
+ for (x=1; x<=n[0]; x++) {
+ const int i = lc_to_ms_I(x, y, z, n); //lc index
const int j = ms_I(x, y, z, n); //ms index
time= PIL_check_seconds_timer();
@@ -422,9 +414,9 @@ static void multiple_scattering_diffusion(Render *re, VolumePrecache *vp, Materi
if (re->test_break(re->tbh)) break;
- SWAP(float *,sr,sr0);
- SWAP(float *,sg,sg0);
- SWAP(float *,sb,sb0);
+ SWAP(float *, sr, sr0);
+ SWAP(float *, sg, sg0);
+ SWAP(float *, sb, sb0);
/* main diffusion simulation */
ms_diffuse(re, do_test_break, sr0, sr, diff, n);
@@ -448,13 +440,10 @@ static void multiple_scattering_diffusion(Render *re, VolumePrecache *vp, Materi
origf = 0.0f;
}
- for (z=1;z<=n[2];z++)
- {
- for (y=1;y<=n[1];y++)
- {
- for (x=1;x<=n[0];x++)
- {
- const int i = lc_to_ms_I(x, y ,z, n); //lc index
+ for (z=1;z<=n[2];z++) {
+ for (y=1;y<=n[1];y++) {
+ for (x=1;x<=n[0];x++) {
+ const int i = lc_to_ms_I(x, y, z, n); //lc index
const int j = ms_I(x, y, z, n); //ms index
vp->data_r[i] = origf * vp->data_r[i] + fac * sr[j];
@@ -538,7 +527,7 @@ static void *vol_precache_part(void *data)
/* convert from world->camera space for shading */
mul_v3_m4v3(cco, pa->viewmat, co);
- i= V_I(x, y, z, res);
+ i = BLI_VOXEL_INDEX(x, y, z, res);
// don't bother if the point is not inside the volume mesh
if (!point_inside_obi(tree, obi, cco)) {
diff --git a/source/blender/render/intern/source/volumetric.c b/source/blender/render/intern/source/volumetric.c
index fa0326e2c97..b599da48803 100644
--- a/source/blender/render/intern/source/volumetric.c
+++ b/source/blender/render/intern/source/volumetric.c
@@ -97,7 +97,7 @@ static float vol_get_shadow(ShadeInput *shi, LampRen *lar, const float co[3])
}
else {
sub_v3_v3v3(is.dir, lar->co, is.start);
- is.dist = normalize_v3( is.dir );
+ is.dist = normalize_v3(is.dir );
}
is.mode = RE_RAY_MIRROR;
@@ -113,7 +113,7 @@ static float vol_get_shadow(ShadeInput *shi, LampRen *lar, const float co[3])
is.orig.face = NULL;
is.last_hit = lar->last_hit[shi->thread];
- if (RE_rayobject_raycast(R.raytree,&is)) {
+ if (RE_rayobject_raycast(R.raytree, &is)) {
visibility = 0.f;
}
@@ -234,9 +234,9 @@ static void vol_get_precached_scattering(Render *re, ShadeInput *shi, float scat
sample_co[1] = (world_co[1] - bbmin[1]) / dim[1];
sample_co[2] = (world_co[2] - bbmin[2]) / dim[2];
- scatter_col[0] = voxel_sample_triquadratic(vp->data_r, vp->res, sample_co);
- scatter_col[1] = voxel_sample_triquadratic(vp->data_g, vp->res, sample_co);
- scatter_col[2] = voxel_sample_triquadratic(vp->data_b, vp->res, sample_co);
+ scatter_col[0] = BLI_voxel_sample_triquadratic(vp->data_r, vp->res, sample_co);
+ scatter_col[1] = BLI_voxel_sample_triquadratic(vp->data_g, vp->res, sample_co);
+ scatter_col[2] = BLI_voxel_sample_triquadratic(vp->data_b, vp->res, sample_co);
}
/* Meta object density, brute force for now
@@ -258,7 +258,7 @@ static float metadensity(Object* ob, const float co[3])
/* element rotation transform */
float tp[3] = {ml->x - tco[0], ml->y - tco[1], ml->z - tco[2]};
- quat_to_mat3( bmat,ml->quat);
+ quat_to_mat3(bmat, ml->quat);
transpose_m3(bmat); // rot.only, so inverse == transpose
mul_m3_v3(bmat, tp);
@@ -471,7 +471,7 @@ static void vol_get_transmittance(ShadeInput *shi, float tr[3], const float co[3
static void vol_shade_one_lamp(struct ShadeInput *shi, const float co[3], const float view[3], LampRen *lar, float lacol[3])
{
float visifac, lv[3], lampdist;
- float tr[3]={1.0,1.0,1.0};
+ float tr[3]={1.0, 1.0, 1.0};
float hitco[3], *atten_co;
float p, ref_col[3];
@@ -559,8 +559,7 @@ void vol_get_scattering(ShadeInput *shi, float scatter_col[3], const float co[3]
zero_v3(scatter_col);
lights= get_lights(shi);
- for (go=lights->first; go; go= go->next)
- {
+ for (go=lights->first; go; go= go->next) {
float lacol[3] = {0.f, 0.f, 0.f};
lar= go->lampren;
@@ -654,7 +653,7 @@ static void volumeintegrate(struct ShadeInput *shi, float col[4], const float co
/* the main entry point for volume shading */
static void volume_trace(struct ShadeInput *shi, struct ShadeResult *shr, int inside_volume)
{
- float hitco[3], col[4] = {0.f,0.f,0.f,0.f};
+ float hitco[3], col[4] = {0.f, 0.f, 0.f, 0.f};
float *startco, *endco;
int trace_behind = 1;
const int ztransp= ((shi->depth==0) && (shi->mat->mode & MA_TRANSP) && (shi->mat->mode & MA_ZTRANSP));
@@ -749,7 +748,7 @@ static void volume_trace(struct ShadeInput *shi, struct ShadeResult *shr, int in
void shade_volume_shadow(struct ShadeInput *shi, struct ShadeResult *shr, struct Isect *last_is)
{
float hitco[3];
- float tr[3] = {1.0,1.0,1.0};
+ float tr[3] = {1.0, 1.0, 1.0};
Isect is= {{0}};
float *startco, *endco;
diff --git a/source/blender/render/intern/source/voxeldata.c b/source/blender/render/intern/source/voxeldata.c
index 1f49b654ef8..90e6594d888 100644
--- a/source/blender/render/intern/source/voxeldata.c
+++ b/source/blender/render/intern/source/voxeldata.c
@@ -117,7 +117,7 @@ static int load_frame_raw8(VoxelData *vd, FILE *fp, int frame)
return 0;
}
- if (fseek(fp,(frame-1)*size*sizeof(char),0) == -1) {
+ if (fseek(fp, (frame-1)*size*sizeof(char), 0) == -1) {
MEM_freeN(data_c);
MEM_freeN(vd->dataset);
vd->dataset= NULL;
@@ -171,8 +171,7 @@ static void load_frame_image_sequence(VoxelData *vd, Tex *tex)
vd->resol[2] = iuser.frames;
vd->dataset = MEM_mapallocN(sizeof(float)*vd_resol_size(vd), "voxel dataset");
- for (z=0; z < iuser.frames; z++)
- {
+ for (z=0; z < iuser.frames; z++) {
/* get a new ibuf for each frame */
if (z > 0) {
iuser.framenr++;
@@ -182,12 +181,10 @@ static void load_frame_image_sequence(VoxelData *vd, Tex *tex)
}
rf = ibuf->rect_float;
- for (y=0; y < ibuf->y; y++)
- {
- for (x=0; x < ibuf->x; x++)
- {
+ for (y=0; y < ibuf->y; y++) {
+ for (x=0; x < ibuf->x; x++) {
/* currently averaged to monchrome */
- vd->dataset[ V_I(x, y, z, vd->resol) ] = (rf[0] + rf[1] + rf[2])*0.333f;
+ vd->dataset[ BLI_VOXEL_INDEX(x, y, z, vd->resol) ] = (rf[0] + rf[1] + rf[2]) * 0.333f;
rf +=4;
}
}
@@ -204,7 +201,7 @@ static int read_voxeldata_header(FILE *fp, struct VoxelData *vd)
VoxelDataHeader *h=(VoxelDataHeader *)MEM_mallocN(sizeof(VoxelDataHeader), "voxel data header");
rewind(fp);
- if (fread(h,sizeof(VoxelDataHeader),1,fp) != 1) {
+ if (fread(h, sizeof(VoxelDataHeader), 1, fp) != 1) {
MEM_freeN(h);
return 0;
}
@@ -249,8 +246,7 @@ static void init_frame_smoke(VoxelData *vd, float cfra)
heat = smoke_get_heat(smd->domain->fluid);
- for (i=0; i<totRes; i++)
- {
+ for (i=0; i<totRes; i++) {
vd->dataset[i] = (heat[i]+2.0f)/4.0f;
}
@@ -271,8 +267,7 @@ static void init_frame_smoke(VoxelData *vd, float cfra)
yvel = smoke_get_velocity_y(smd->domain->fluid);
zvel = smoke_get_velocity_z(smd->domain->fluid);
- for (i=0; i<totRes; i++)
- {
+ for (i=0; i<totRes; i++) {
vd->dataset[i] = sqrt(xvel[i]*xvel[i] + yvel[i]*yvel[i] + zvel[i]*zvel[i])*3.0f;
}
@@ -333,7 +328,7 @@ void cache_voxeldata(Tex *tex, int scene_frame)
BLI_strncpy(path, vd->source_path, sizeof(path));
- switch(vd->file_format) {
+ switch (vd->file_format) {
case TEX_VD_IMAGE_SEQUENCE:
load_frame_image_sequence(vd, tex);
return;
@@ -343,7 +338,7 @@ void cache_voxeldata(Tex *tex, int scene_frame)
case TEX_VD_BLENDERVOXEL:
BLI_path_abs(path, G.main->name);
if (!BLI_exists(path)) return;
- fp = BLI_fopen(path,"rb");
+ fp = BLI_fopen(path, "rb");
if (!fp) return;
if (read_voxeldata_header(fp, vd))
@@ -354,7 +349,7 @@ void cache_voxeldata(Tex *tex, int scene_frame)
case TEX_VD_RAW_8BIT:
BLI_path_abs(path, G.main->name);
if (!BLI_exists(path)) return;
- fp = BLI_fopen(path,"rb");
+ fp = BLI_fopen(path, "rb");
if (!fp) return;
load_frame_raw8(vd, fp, curframe);
@@ -428,17 +423,17 @@ int voxeldatatex(struct Tex *tex, const float texvec[3], struct TexResult *texre
switch (vd->interp_type) {
case TEX_VD_NEARESTNEIGHBOR:
- texres->tin = voxel_sample_nearest(vd->dataset, vd->resol, co);
+ texres->tin = BLI_voxel_sample_nearest(vd->dataset, vd->resol, co);
break;
case TEX_VD_LINEAR:
- texres->tin = voxel_sample_trilinear(vd->dataset, vd->resol, co);
+ texres->tin = BLI_voxel_sample_trilinear(vd->dataset, vd->resol, co);
break;
case TEX_VD_QUADRATIC:
- texres->tin = voxel_sample_triquadratic(vd->dataset, vd->resol, co);
+ texres->tin = BLI_voxel_sample_triquadratic(vd->dataset, vd->resol, co);
break;
case TEX_VD_TRICUBIC_CATROM:
case TEX_VD_TRICUBIC_BSPLINE:
- texres->tin = voxel_sample_tricubic(vd->dataset, vd->resol, co, (vd->interp_type == TEX_VD_TRICUBIC_BSPLINE));
+ texres->tin = BLI_voxel_sample_tricubic(vd->dataset, vd->resol, co, (vd->interp_type == TEX_VD_TRICUBIC_BSPLINE));
break;
}
diff --git a/source/blender/render/intern/source/zbuf.c b/source/blender/render/intern/source/zbuf.c
index 74c4bf19faf..4c3c9889d53 100644
--- a/source/blender/render/intern/source/zbuf.c
+++ b/source/blender/render/intern/source/zbuf.c
@@ -149,7 +149,7 @@ static void zbuf_add_to_span(ZSpan *zspan, float *v1, float *v2)
}
else {
dx0= 0.0f;
- xs0= MIN2(minv[0],maxv[0]);
+ xs0= MIN2(minv[0], maxv[0]);
}
/* empty span */
@@ -270,7 +270,7 @@ static APixstr *addpsmainA(ListBase *lb)
psm= MEM_mallocN(sizeof(APixstrMain), "addpsmainA");
BLI_addtail(lb, psm);
- psm->ps= MEM_callocN(4096*sizeof(APixstr),"pixstr");
+ psm->ps= MEM_callocN(4096*sizeof(APixstr), "pixstr");
return psm->ps;
}
@@ -305,8 +305,8 @@ static void zbuffillAc4(ZSpan *zspan, int obi, int zvlnr, float *v1, float *v2,
{
APixstr *ap, *apofs, *apn;
double zxd, zyd, zy0, zverg;
- float x0,y0,z0;
- float x1,y1,z1,x2,y2,z2,xx1;
+ float x0, y0, z0;
+ float x1, y1, z1, x2, y2, z2, xx1;
float *span1, *span2;
int *rz, *rm, x, y;
int sn1, sn2, rectx, *rectzofs, *rectmaskofs, my0, my2, mask;
@@ -844,7 +844,7 @@ static void zbufline_onlyZ(ZSpan *zspan, int UNUSED(obi), int UNUSED(zvlnr), flo
static int clipline(float v1[4], float v2[4]) /* return 0: do not draw */
{
- float dz,dw, u1=0.0, u2=1.0;
+ float dz, dw, u1=0.0, u2=1.0;
float dx, dy, v13;
dz= v2[2]-v1[2];
@@ -854,20 +854,20 @@ static int clipline(float v1[4], float v2[4]) /* return 0: do not draw */
* filled in with zbufwire correctly when rendering in parts. otherwise
* you see line endings at edges... */
- if (cliptestf(-dz, -dw, v1[3], v1[2], &u1,&u2)) {
- if (cliptestf(dz, -dw, v1[3], -v1[2], &u1,&u2)) {
+ if (cliptestf(-dz, -dw, v1[3], v1[2], &u1, &u2)) {
+ if (cliptestf(dz, -dw, v1[3], -v1[2], &u1, &u2)) {
dx= v2[0]-v1[0];
dz= 1.01f*(v2[3]-v1[3]);
v13= 1.01f*v1[3];
- if (cliptestf(-dx, -dz, v1[0], v13, &u1,&u2)) {
- if (cliptestf(dx, -dz, v13, -v1[0], &u1,&u2)) {
+ if (cliptestf(-dx, -dz, v1[0], v13, &u1, &u2)) {
+ if (cliptestf(dx, -dz, v13, -v1[0], &u1, &u2)) {
dy= v2[1]-v1[1];
- if (cliptestf(-dy, -dz, v1[1], v13, &u1,&u2)) {
- if (cliptestf(dy, -dz, v13, -v1[1], &u1,&u2)) {
+ if (cliptestf(-dy, -dz, v1[1], v13, &u1, &u2)) {
+ if (cliptestf(dy, -dz, v13, -v1[1], &u1, &u2)) {
if (u2<1.0f) {
v2[0]= v1[0]+u2*dx;
@@ -1042,8 +1042,8 @@ void zbufsinglewire(ZSpan *zspan, int obi, int zvlnr, const float ho1[4], const
static void zbuffillGLinv4(ZSpan *zspan, int obi, int zvlnr, float *v1, float *v2, float *v3, float *v4)
{
double zxd, zyd, zy0, zverg;
- float x0,y0,z0;
- float x1,y1,z1,x2,y2,z2,xx1;
+ float x0, y0, z0;
+ float x1, y1, z1, x2, y2, z2, xx1;
float *span1, *span2;
int *rectoofs, *ro;
int *rectpofs, *rp;
@@ -1164,8 +1164,8 @@ static void zbuffillGLinv4(ZSpan *zspan, int obi, int zvlnr, float *v1, float *v
static void zbuffillGL4(ZSpan *zspan, int obi, int zvlnr, float *v1, float *v2, float *v3, float *v4)
{
double zxd, zyd, zy0, zverg;
- float x0,y0,z0;
- float x1,y1,z1,x2,y2,z2,xx1;
+ float x0, y0, z0;
+ float x1, y1, z1, x2, y2, z2, xx1;
float *span1, *span2;
int *rectoofs, *ro;
int *rectpofs, *rp;
@@ -1294,8 +1294,8 @@ static void zbuffillGL4(ZSpan *zspan, int obi, int zvlnr, float *v1, float *v2,
static void zbuffillGL_onlyZ(ZSpan *zspan, int UNUSED(obi), int UNUSED(zvlnr), float *v1, float *v2, float *v3, float *v4)
{
double zxd, zyd, zy0, zverg;
- float x0,y0,z0;
- float x1,y1,z1,x2,y2,z2,xx1;
+ float x0, y0, z0;
+ float x1, y1, z1, x2, y2, z2, xx1;
float *span1, *span2;
int *rz, *rz1, x, y;
int sn1, sn2, rectx, *rectzofs, *rectzofs1= NULL, my0, my2;
@@ -1399,7 +1399,7 @@ static void zbuffillGL_onlyZ(ZSpan *zspan, int UNUSED(obi), int UNUSED(zvlnr), f
}
}
-/* 2d scanconvert for tria, calls func for each x,y coordinate and gives UV barycentrics */
+/* 2d scanconvert for tria, calls func for each x, y coordinate and gives UV barycentrics */
void zspan_scanconvert_strand(ZSpan *zspan, void *handle, float *v1, float *v2, float *v3, void (*func)(void *, int, int, float, float, float) )
{
float x0, y0, x1, y1, x2, y2, z0, z1, z2, z;
@@ -1498,7 +1498,7 @@ void zspan_scanconvert_strand(ZSpan *zspan, void *handle, float *v1, float *v2,
}
}
-/* scanconvert for strand triangles, calls func for each x,y coordinate and gives UV barycentrics and z */
+/* scanconvert for strand triangles, calls func for each x, y coordinate and gives UV barycentrics and z */
void zspan_scanconvert(ZSpan *zspan, void *handle, float *v1, float *v2, float *v3, void (*func)(void *, int, int, float, float) )
{
@@ -1603,7 +1603,7 @@ void zspan_scanconvert(ZSpan *zspan, void *handle, float *v1, float *v2, float *
static void clippyra(float *labda, float *v1, float *v2, int *b2, int *b3, int a, float clipcrop)
{
- float da,dw,u1=0.0,u2=1.0;
+ float da, dw, u1=0.0, u2=1.0;
float v13;
labda[0]= -1.0;
@@ -1627,8 +1627,8 @@ static void clippyra(float *labda, float *v1, float *v2, int *b2, int *b3, int a
* who would have thought that of L&B!
*/
- if (cliptestf(-da, -dw, v13, v1[a], &u1,&u2)) {
- if (cliptestf(da, -dw, v13, -v1[a], &u1,&u2)) {
+ if (cliptestf(-da, -dw, v13, v1[a], &u1, &u2)) {
+ if (cliptestf(da, -dw, v13, -v1[a], &u1, &u2)) {
*b3=1;
if (u2<1.0f) {
labda[1]= u2;
@@ -1701,7 +1701,7 @@ static void makevertpyra(float *vez, float *labda, float **trias, float *v1, flo
void projectverto(const float v1[3], float winmat[][4], float adr[4])
{
/* calcs homogenic coord of vertex v1 */
- float x,y,z;
+ float x, y, z;
x= v1[0];
y= v1[1];
@@ -1719,7 +1719,7 @@ void projectverto(const float v1[3], float winmat[][4], float adr[4])
void projectvert(const float v1[3], float winmat[][4], float adr[4])
{
/* calcs homogenic coord of vertex v1 */
- float x,y,z;
+ float x, y, z;
x= v1[0];
y= v1[1];
@@ -1877,9 +1877,9 @@ void zbufclip(ZSpan *zspan, int obi, int zvlnr, float *f1, float *f2, float *f3,
else if (b==1) arg= 0;
else arg= 1;
- clippyra(labda[0], vlzp[v][0],vlzp[v][1], &b2,&b3, arg, zspan->clipcrop);
- clippyra(labda[1], vlzp[v][1],vlzp[v][2], &b2,&b3, arg, zspan->clipcrop);
- clippyra(labda[2], vlzp[v][2],vlzp[v][0], &b2,&b3, arg, zspan->clipcrop);
+ clippyra(labda[0], vlzp[v][0], vlzp[v][1], &b2, &b3, arg, zspan->clipcrop);
+ clippyra(labda[1], vlzp[v][1], vlzp[v][2], &b2, &b3, arg, zspan->clipcrop);
+ clippyra(labda[2], vlzp[v][2], vlzp[v][0], &b2, &b3, arg, zspan->clipcrop);
if (b2==0 && b3==1) {
/* completely 'in', but we copy because of last for () loop in this section */;
@@ -1895,9 +1895,9 @@ void zbufclip(ZSpan *zspan, int obi, int zvlnr, float *f1, float *f2, float *f3,
}
else {
b1=0;
- makevertpyra(vez, labda[0], trias, vlzp[v][0],vlzp[v][1], &b1,&clve);
- makevertpyra(vez, labda[1], trias, vlzp[v][1],vlzp[v][2], &b1,&clve);
- makevertpyra(vez, labda[2], trias, vlzp[v][2],vlzp[v][0], &b1,&clve);
+ makevertpyra(vez, labda[0], trias, vlzp[v][0], vlzp[v][1], &b1, &clve);
+ makevertpyra(vez, labda[1], trias, vlzp[v][1], vlzp[v][2], &b1, &clve);
+ makevertpyra(vez, labda[2], trias, vlzp[v][2], vlzp[v][0], &b1, &clve);
/* after front clip done: now set clip flags */
if (b==0) {
@@ -1927,7 +1927,7 @@ void zbufclip(ZSpan *zspan, int obi, int zvlnr, float *f1, float *f2, float *f3,
}
/* warning, this should never happen! */
- if (clve>38 || clvl>31) printf("clip overflow: clve clvl %d %d\n",clve,clvl);
+ if (clve>38 || clvl>31) printf("clip overflow: clve clvl %d %d\n", clve, clvl);
/* perspective division */
f1=vez;
@@ -1937,7 +1937,7 @@ void zbufclip(ZSpan *zspan, int obi, int zvlnr, float *f1, float *f2, float *f3,
}
for (b=1;b<clvl;b++) {
if (vlzp[b][0]) {
- zspan->zbuffunc(zspan, obi, zvlnr, vlzp[b][0],vlzp[b][1],vlzp[b][2], NULL);
+ zspan->zbuffunc(zspan, obi, zvlnr, vlzp[b][0], vlzp[b][1], vlzp[b][2], NULL);
}
}
return;
@@ -1948,7 +1948,7 @@ void zbufclip(ZSpan *zspan, int obi, int zvlnr, float *f1, float *f2, float *f3,
hoco_to_zco(zspan, vez, f1);
hoco_to_zco(zspan, vez+4, f2);
hoco_to_zco(zspan, vez+8, f3);
- zspan->zbuffunc(zspan, obi, zvlnr, vez,vez+4,vez+8, NULL);
+ zspan->zbuffunc(zspan, obi, zvlnr, vez, vez+4, vez+8, NULL);
}
void zbufclip4(ZSpan *zspan, int obi, int zvlnr, float *f1, float *f2, float *f3, float *f4, int c1, int c2, int c3, int c4)
@@ -2648,8 +2648,8 @@ static void zbuf_fill_in_rgba(ZSpan *zspan, DrawBufPixel *col, float *v1, float
{
DrawBufPixel *rectpofs, *rp;
double zxd, zyd, zy0, zverg;
- float x0,y0,z0;
- float x1,y1,z1,x2,y2,z2,xx1;
+ float x0, y0, z0;
+ float x1, y1, z1, x2, y2, z2, xx1;
float *span1, *span2;
float *rectzofs, *rz;
int x, y;
@@ -2839,7 +2839,7 @@ void antialias_tagbuf(int xsize, int ysize, char *rectmove)
}
/* in: two vectors, first vector points from origin back in time, 2nd vector points to future */
-/* we make this into 3 points, center point is (0,0) */
+/* we make this into 3 points, center point is (0, 0) */
/* and offset the center point just enough to make curve go through midpoint */
static void quad_bezier_2d(float *result, float *v1, float *v2, float *ipodata)
@@ -3047,7 +3047,7 @@ void RE_zbuf_accumulate_vecblur(NodeBlurData *nbd, int xsize, int ysize, float *
/* has to become static, the init-jit calls a random-seed, screwing up texture noise node */
if (firsttime) {
firsttime= 0;
- BLI_initjit(jit[0], 256);
+ BLI_jitter_init(jit[0], 256);
}
memset(newrect, 0, sizeof(float)*xsize*ysize*4);
@@ -3529,7 +3529,7 @@ void merge_transp_passes(RenderLayer *rl, ShadeResult *shr)
float *col= NULL;
int pixsize= 3;
- switch(rpass->passtype) {
+ switch (rpass->passtype) {
case SCE_PASS_RGBA:
col= shr->col;
pixsize= 4;
@@ -3629,7 +3629,7 @@ void add_transp_passes(RenderLayer *rl, int offset, ShadeResult *shr, float alph
float *fp, *col= NULL;
int pixsize= 3;
- switch(rpass->passtype) {
+ switch (rpass->passtype) {
case SCE_PASS_Z:
fp= rpass->rect + offset;
if (shr->z < *fp)
@@ -3748,8 +3748,8 @@ static void unref_strand_samples(StrandShadeCache *cache, ZTranspRow *row, int t
strand= RE_findOrAddStrand(obr, row[totface].p-1);
svert= strand->vert + row[totface].segment;
- strand_shade_unref(cache, svert);
- strand_shade_unref(cache, svert+1);
+ strand_shade_unref(cache, obi, svert);
+ strand_shade_unref(cache, obi, svert+1);
}
}
}
@@ -3772,7 +3772,7 @@ static void shade_tra_samples_fill(ShadeSample *ssamp, int x, int y, int z, int
for (samp=0; samp<R.osa; samp++) {
if (curmask & (1<<samp)) {
- xs= (float)x + R.jit[samp][0] + 0.5f; /* zbuffer has this inverse corrected, ensures xs,ys are inside pixel */
+ xs= (float)x + R.jit[samp][0] + 0.5f; /* zbuffer has this inverse corrected, ensures (xs, ys) are inside pixel */
ys= (float)y + R.jit[samp][1] + 0.5f;
if (shi_inc) {
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index 4c81a0a8654..f3872cb9594 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -188,7 +188,7 @@ void WM_operatortype_append_ptr (void (*opfunc)(struct wmOperatorType*, void *)
void WM_operatortype_append_macro_ptr (void (*opfunc)(struct wmOperatorType*, void *), void *userdata);
int WM_operatortype_remove(const char *idname);
-struct wmOperatorType *WM_operatortype_append_macro(const char *idname, const char *name, int flag);
+struct wmOperatorType *WM_operatortype_append_macro(const char *idname, const char *name, const char *description, int flag);
struct wmOperatorTypeMacro *WM_operatortype_macro_define(struct wmOperatorType *ot, const char *idname);
diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c
index 638dd4ca807..7285e155dc6 100644
--- a/source/blender/windowmanager/intern/wm.c
+++ b/source/blender/windowmanager/intern/wm.c
@@ -291,7 +291,7 @@ void wm_clear_default_size(bContext *C)
/* on startup, it adds all data, for matching */
void wm_add_default(bContext *C)
{
- wmWindowManager *wm = alloc_libblock(&CTX_data_main(C)->wm, ID_WM, "WinMan");
+ wmWindowManager *wm = BKE_libblock_alloc(&CTX_data_main(C)->wm, ID_WM, "WinMan");
wmWindow *win;
bScreen *screen = CTX_wm_screen(C); /* XXX from file read hrmf */
diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c
index 66cadf1e76a..2b83a55d7bb 100644
--- a/source/blender/windowmanager/intern/wm_draw.c
+++ b/source/blender/windowmanager/intern/wm_draw.c
@@ -475,7 +475,7 @@ static int wm_triple_gen_textures(wmWindow *win, wmDrawTriple *triple)
glTexImage2D(triple->target, 0, GL_RGB8, triple->x[x], triple->y[y], 0, GL_RGB, GL_UNSIGNED_BYTE, NULL);
glTexParameteri(triple->target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(triple->target, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- // glColor still used with this enabled?
+ // The current color is ignored if the GL_REPLACE texture environment is used.
// glTexEnvi(triple->target, GL_TEXTURE_ENV_MODE, GL_REPLACE);
glBindTexture(triple->target, 0);
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 42fb03d5d64..fd3e287a6a5 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -240,7 +240,7 @@ void wm_event_do_notifiers(bContext *C)
if (do_anim) {
/* XXX, quick frame changes can cause a crash if framechange and rendering
- * collide (happens on slow scenes), scene_update_for_newframe can be called
+ * collide (happens on slow scenes), BKE_scene_update_for_newframe can be called
* twice which can depgraph update the same object at once */
if (!G.rendering) {
@@ -311,7 +311,7 @@ void wm_event_do_notifiers(bContext *C)
/* XXX, hack so operators can enforce datamasks [#26482], gl render */
win->screen->scene->customdata_mask |= win->screen->scene->customdata_mask_modal;
- scene_update_tagged(bmain, win->screen->scene);
+ BKE_scene_update_tagged(bmain, win->screen->scene);
}
}
@@ -691,7 +691,7 @@ static wmOperator *wm_operator_create(wmWindowManager *wm, wmOperatorType *ot, P
if (properties) {
otmacro = ot->macro.first;
- RNA_STRUCT_BEGIN(properties, prop)
+ RNA_STRUCT_BEGIN (properties, prop)
{
if (otmacro == NULL)
@@ -747,6 +747,7 @@ static void wm_region_mouse_co(bContext *C, wmEvent *event)
}
}
+#if 1 /* disabling for 2.63 release, since we keep getting reports some menu items are leaving props undefined */
int WM_operator_last_properties_init(wmOperator *op)
{
int change = FALSE;
@@ -760,7 +761,8 @@ int WM_operator_last_properties_init(wmOperator *op)
iterprop = RNA_struct_iterator_property(op->type->srna);
- RNA_PROP_BEGIN(op->ptr, itemptr, iterprop) {
+ RNA_PROP_BEGIN (op->ptr, itemptr, iterprop)
+ {
PropertyRNA *prop = itemptr.data;
if ((RNA_property_flag(prop) & PROP_SKIP_SAVE) == 0) {
if (!RNA_property_is_set(op->ptr, prop)) { /* don't override a setting already set */
@@ -805,6 +807,20 @@ int WM_operator_last_properties_store(wmOperator *op)
}
}
+#else
+
+int WM_operator_last_properties_init(wmOperator *UNUSED(op))
+{
+ return FALSE;
+}
+
+int WM_operator_last_properties_store(wmOperator *UNUSED(op))
+{
+ return FALSE;
+}
+
+#endif
+
static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, PointerRNA *properties, ReportList *reports, short poll_only)
{
wmWindowManager *wm = CTX_wm_manager(C);
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index e50fbaa624e..56052b895ab 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -361,7 +361,7 @@ void WM_read_file(bContext *C, const char *filepath, ReportList *reports)
WM_cursor_wait(1);
- BLI_exec_cb(CTX_data_main(C), NULL, BLI_CB_EVT_LOAD_PRE);
+ BLI_callback_exec(CTX_data_main(C), NULL, BLI_CB_EVT_LOAD_PRE);
/* first try to append data from exotic file formats... */
/* it throws error box when file doesn't exist and returns -1 */
@@ -421,7 +421,7 @@ void WM_read_file(bContext *C, const char *filepath, ReportList *reports)
#endif
/* important to do before NULL'ing the context */
- BLI_exec_cb(CTX_data_main(C), NULL, BLI_CB_EVT_LOAD_POST);
+ BLI_callback_exec(CTX_data_main(C), NULL, BLI_CB_EVT_LOAD_POST);
if (!G.background) {
/* in background mode this makes it hard to load
@@ -484,7 +484,7 @@ int WM_read_homefile(bContext *C, ReportList *UNUSED(reports), short from_memory
char tstr[FILE_MAX];
int success = 0;
- free_ttfont(); /* still weird... what does it here? */
+ BKE_vfont_free_global_ttf(); /* still weird... what does it here? */
G.relbase_valid = 0;
if (!from_memory) {
@@ -791,7 +791,7 @@ int WM_write_file(bContext *C, const char *target, int fileflags, ReportList *re
ibuf_thumb = blend_file_thumb(CTX_data_scene(C), CTX_wm_screen(C), &thumb);
}
- BLI_exec_cb(G.main, NULL, BLI_CB_EVT_SAVE_PRE);
+ BLI_callback_exec(G.main, NULL, BLI_CB_EVT_SAVE_PRE);
/* operator now handles overwrite checks */
@@ -826,7 +826,7 @@ int WM_write_file(bContext *C, const char *target, int fileflags, ReportList *re
write_history();
}
- BLI_exec_cb(G.main, NULL, BLI_CB_EVT_SAVE_POST);
+ BLI_callback_exec(G.main, NULL, BLI_CB_EVT_SAVE_POST);
/* run this function after because the file cant be written before the blend is */
if (ibuf_thumb) {
diff --git a/source/blender/windowmanager/intern/wm_gesture.c b/source/blender/windowmanager/intern/wm_gesture.c
index bfa3645bf57..7f40d2980a6 100644
--- a/source/blender/windowmanager/intern/wm_gesture.c
+++ b/source/blender/windowmanager/intern/wm_gesture.c
@@ -236,7 +236,7 @@ static void draw_filled_lasso(wmGesture *gt)
short *lasso = (short *)gt->customdata;
int i;
- BLI_begin_edgefill(&sf_ctx);
+ BLI_scanfill_begin(&sf_ctx);
for (i = 0; i < gt->points; i++, lasso += 2) {
float co[3];
@@ -244,9 +244,9 @@ static void draw_filled_lasso(wmGesture *gt)
co[1] = (float)lasso[1];
co[2] = 0.0f;
- v = BLI_addfillvert(&sf_ctx, co);
+ v = BLI_scanfill_vert_add(&sf_ctx, co);
if (lastv)
- /* e = */ /* UNUSED */ BLI_addfilledge(&sf_ctx, lastv, v);
+ /* e = */ /* UNUSED */ BLI_scanfill_edge_add(&sf_ctx, lastv, v);
lastv = v;
if (firstv == NULL) firstv = v;
}
@@ -254,8 +254,8 @@ static void draw_filled_lasso(wmGesture *gt)
/* highly unlikely this will fail, but could crash if (gt->points == 0) */
if (firstv) {
float zvec[3] = {0.0f, 0.0f, 1.0f};
- BLI_addfilledge(&sf_ctx, firstv, v);
- BLI_edgefill_ex(&sf_ctx, FALSE, zvec);
+ BLI_scanfill_edge_add(&sf_ctx, firstv, v);
+ BLI_scanfill_calc_ex(&sf_ctx, FALSE, zvec);
glEnable(GL_BLEND);
glColor4f(1.0, 1.0, 1.0, 0.05);
@@ -268,7 +268,7 @@ static void draw_filled_lasso(wmGesture *gt)
glEnd();
glDisable(GL_BLEND);
- BLI_end_edgefill(&sf_ctx);
+ BLI_scanfill_end(&sf_ctx);
}
}
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c
index 0c95ccea5d7..ab377d53ec7 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -360,11 +360,11 @@ void WM_exit_ext(bContext *C, const short do_python)
// BIF_freeRetarget();
BIF_freeTemplates(C);
- free_ttfont(); /* bke_font.h */
+ BKE_vfont_free_global_ttf(); /* bke_font.h */
free_openrecent();
- BKE_freecubetable();
+ BKE_mball_cubeTable_free();
ED_preview_free_dbase(); /* frees a Main dbase, before free_blender! */
diff --git a/source/blender/windowmanager/intern/wm_jobs.c b/source/blender/windowmanager/intern/wm_jobs.c
index a55a8df3301..877b8a92296 100644
--- a/source/blender/windowmanager/intern/wm_jobs.c
+++ b/source/blender/windowmanager/intern/wm_jobs.c
@@ -173,10 +173,12 @@ int WM_jobs_test(wmWindowManager *wm, void *owner)
{
wmJob *steve;
+ /* job can be running or about to run (suspended) */
for (steve = wm->jobs.first; steve; steve = steve->next)
if (steve->owner == owner)
- if (steve->running)
+ if (steve->running || steve->suspended)
return 1;
+
return 0;
}
@@ -240,8 +242,8 @@ void WM_jobs_timer(wmJob *steve, double timestep, unsigned int note, unsigned in
void WM_jobs_callbacks(wmJob *steve,
void (*startjob)(void *, short *, short *, float *),
void (*initjob)(void *),
- void (*update)(void *),
- void (*endjob)(void *))
+ void (*update)(void *),
+ void (*endjob)(void *))
{
steve->startjob = startjob;
steve->initjob = initjob;
diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c
index 48002029e56..22d1cbe5e11 100644
--- a/source/blender/windowmanager/intern/wm_keymap.c
+++ b/source/blender/windowmanager/intern/wm_keymap.c
@@ -103,7 +103,9 @@ static int wm_keymap_item_equals_result(wmKeyMapItem *a, wmKeyMapItem *b)
if (!((a->ptr == NULL && b->ptr == NULL) ||
(a->ptr && b->ptr && IDP_EqualsProperties(a->ptr->data, b->ptr->data))))
+ {
return 0;
+ }
if ((a->flag & KMI_INACTIVE) != (b->flag & KMI_INACTIVE))
return 0;
@@ -813,8 +815,8 @@ char *WM_keymap_item_to_string(wmKeyMapItem *kmi, char *str, int len)
}
static wmKeyMapItem *wm_keymap_item_find_handlers(
- const bContext *C, ListBase *handlers, const char *opname, int UNUSED(opcontext),
- IDProperty *properties, int compare_props, int hotkey, wmKeyMap **keymap_r)
+ const bContext *C, ListBase *handlers, const char *opname, int UNUSED(opcontext),
+ IDProperty *properties, int compare_props, int hotkey, wmKeyMap **keymap_r)
{
wmWindowManager *wm = CTX_wm_manager(C);
wmEventHandler *handler;
@@ -854,8 +856,8 @@ static wmKeyMapItem *wm_keymap_item_find_handlers(
}
static wmKeyMapItem *wm_keymap_item_find_props(
- const bContext *C, const char *opname, int opcontext,
- IDProperty *properties, int compare_props, int hotkey, wmKeyMap **keymap_r)
+ const bContext *C, const char *opname, int opcontext,
+ IDProperty *properties, int compare_props, int hotkey, wmKeyMap **keymap_r)
{
wmWindow *win = CTX_wm_window(C);
ScrArea *sa = CTX_wm_area(C);
@@ -904,8 +906,8 @@ static wmKeyMapItem *wm_keymap_item_find_props(
}
static wmKeyMapItem *wm_keymap_item_find(
- const bContext *C, const char *opname, int opcontext,
- IDProperty *properties, const short hotkey, const short sloppy, wmKeyMap **keymap_r)
+ const bContext *C, const char *opname, int opcontext,
+ IDProperty *properties, const short hotkey, const short sloppy, wmKeyMap **keymap_r)
{
wmKeyMapItem *found = wm_keymap_item_find_props(C, opname, opcontext, properties, 1, hotkey, keymap_r);
@@ -916,8 +918,8 @@ static wmKeyMapItem *wm_keymap_item_find(
}
char *WM_key_event_operator_string(
- const bContext *C, const char *opname, int opcontext,
- IDProperty *properties, const short sloppy, char *str, int len)
+ const bContext *C, const char *opname, int opcontext,
+ IDProperty *properties, const short sloppy, char *str, int len)
{
wmKeyMapItem *kmi = wm_keymap_item_find(C, opname, opcontext, properties, 0, sloppy, NULL);
@@ -930,8 +932,8 @@ char *WM_key_event_operator_string(
}
int WM_key_event_operator_id(
- const bContext *C, const char *opname, int opcontext,
- IDProperty *properties, int hotkey, wmKeyMap **keymap_r)
+ const bContext *C, const char *opname, int opcontext,
+ IDProperty *properties, int hotkey, wmKeyMap **keymap_r)
{
wmKeyMapItem *kmi = wm_keymap_item_find(C, opname, opcontext, properties, hotkey, TRUE, keymap_r);
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 514c159c87b..27c4a38c131 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -84,6 +84,7 @@
#include "ED_screen.h"
#include "ED_util.h"
+#include "ED_object.h"
#include "RNA_access.h"
#include "RNA_define.h"
@@ -345,7 +346,7 @@ static int wm_macro_cancel(bContext *C, wmOperator *op)
}
/* Names have to be static for now */
-wmOperatorType *WM_operatortype_append_macro(const char *idname, const char *name, int flag)
+wmOperatorType *WM_operatortype_append_macro(const char *idname, const char *name, const char *description, int flag)
{
wmOperatorType *ot;
@@ -359,6 +360,7 @@ wmOperatorType *WM_operatortype_append_macro(const char *idname, const char *nam
ot->idname = idname;
ot->name = name;
+ ot->description = description;
ot->flag = OPTYPE_MACRO | flag;
ot->exec = wm_macro_exec;
@@ -589,7 +591,8 @@ void WM_operator_properties_alloc(PointerRNA **ptr, IDProperty **properties, con
void WM_operator_properties_sanitize(PointerRNA *ptr, const short no_context)
{
- RNA_STRUCT_BEGIN(ptr, prop) {
+ RNA_STRUCT_BEGIN (ptr, prop)
+ {
switch (RNA_property_type(prop)) {
case PROP_ENUM:
if (no_context)
@@ -622,7 +625,8 @@ void WM_operator_properties_reset(wmOperator *op)
PropertyRNA *iterprop;
iterprop = RNA_struct_iterator_property(op->type->srna);
- RNA_PROP_BEGIN(op->ptr, itemptr, iterprop) {
+ RNA_PROP_BEGIN (op->ptr, itemptr, iterprop)
+ {
PropertyRNA *prop = itemptr.data;
if ((RNA_property_flag(prop) & PROP_SKIP_SAVE) == 0) {
@@ -1450,7 +1454,7 @@ static uiBlock *wm_block_search_menu(bContext *C, ARegion *ar, void *UNUSED(arg_
static int wm_search_menu_exec(bContext *UNUSED(C), wmOperator *UNUSED(op))
{
- return OPERATOR_FINISHED;
+ return OPERATOR_FINISHED;
}
static int wm_search_menu_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
@@ -1484,6 +1488,7 @@ static void WM_OT_search_menu(wmOperatorType *ot)
{
ot->name = "Search Menu";
ot->idname = "WM_OT_search_menu";
+ ot->description = "Pop-up a search menu over all available operators in current context";
ot->invoke = wm_search_menu_invoke;
ot->exec = wm_search_menu_exec;
@@ -1771,7 +1776,7 @@ static int wm_link_append_exec(bContext *C, wmOperator *op)
/* now we have or selected, or an indicated file */
if (RNA_boolean_get(op->ptr, "autoselect"))
- scene_deselect_all(scene);
+ BKE_scene_base_deselect_all(scene);
flag = wm_link_append_flag(op);
@@ -1796,7 +1801,8 @@ static int wm_link_append_exec(bContext *C, wmOperator *op)
BLO_library_append_named_part_ex(C, mainl, &bh, name, idcode, flag);
}
else {
- RNA_BEGIN(op->ptr, itemptr, "files") {
+ RNA_BEGIN (op->ptr, itemptr, "files")
+ {
RNA_string_get(&itemptr, "name", name);
BLO_library_append_named_part_ex(C, mainl, &bh, name, idcode, flag);
}
@@ -2129,7 +2135,12 @@ static int wm_collada_export_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED
{
if (!RNA_struct_property_is_set(op->ptr, "filepath")) {
char filepath[FILE_MAX];
- BLI_strncpy(filepath, G.main->name, sizeof(filepath));
+
+ if (G.main->name[0] == 0)
+ BLI_strncpy(filepath, "untitled", sizeof(filepath));
+ else
+ BLI_strncpy(filepath, G.main->name, sizeof(filepath));
+
BLI_replace_extension(filepath, sizeof(filepath), ".dae");
RNA_string_set(op->ptr, "filepath", filepath);
}
@@ -2143,7 +2154,7 @@ static int wm_collada_export_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED
static int wm_collada_export_exec(bContext *C, wmOperator *op)
{
char filename[FILE_MAX];
- int selected, second_life;
+ int selected, second_life, apply_modifiers;
if (!RNA_struct_property_is_set(op->ptr, "filepath")) {
BKE_report(op->reports, RPT_ERROR, "No filename given");
@@ -2151,9 +2162,16 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op)
}
RNA_string_get(op->ptr, "filepath", filename);
- selected = RNA_boolean_get(op->ptr, "selected");
- second_life = RNA_boolean_get(op->ptr, "second_life");
- if (collada_export(CTX_data_scene(C), filename, selected, second_life)) {
+
+ /* Options panel */
+ selected = RNA_boolean_get(op->ptr, "selected");
+ second_life = RNA_boolean_get(op->ptr, "second_life");
+ apply_modifiers = RNA_boolean_get(op->ptr, "apply_modifiers");
+
+ /* get editmode results */
+ ED_object_exit_editmode(C, 0); /* 0 = does not exit editmode */
+
+ if (collada_export(CTX_data_scene(C), filename, selected, apply_modifiers, second_life)) {
return OPERATOR_FINISHED;
}
else {
@@ -2172,8 +2190,10 @@ static void WM_OT_collada_export(wmOperatorType *ot)
ot->poll = WM_operator_winactive;
WM_operator_properties_filesel(ot, FOLDERFILE | COLLADAFILE, FILE_BLENDER, FILE_SAVE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
- RNA_def_boolean(ot->srna, "selected", 0, "Export only selected",
+ RNA_def_boolean(ot->srna, "selected", 0, "Selection Only",
"Export only selected elements");
+ RNA_def_boolean(ot->srna, "apply_modifiers", 0, "Apply Modifiers",
+ "Apply modifiers (Preview Resolution)");
RNA_def_boolean(ot->srna, "second_life", 0, "Export for Second Life",
"Compatibility mode for Second Life");
}
@@ -2326,10 +2346,10 @@ static int border_apply_rect(wmOperator *op)
/* operator arguments and storage. */
- RNA_int_set(op->ptr, "xmin", MIN2(rect->xmin, rect->xmax) );
- RNA_int_set(op->ptr, "ymin", MIN2(rect->ymin, rect->ymax) );
- RNA_int_set(op->ptr, "xmax", MAX2(rect->xmin, rect->xmax) );
- RNA_int_set(op->ptr, "ymax", MAX2(rect->ymin, rect->ymax) );
+ RNA_int_set(op->ptr, "xmin", MIN2(rect->xmin, rect->xmax));
+ RNA_int_set(op->ptr, "ymin", MIN2(rect->ymin, rect->ymax));
+ RNA_int_set(op->ptr, "xmax", MAX2(rect->xmin, rect->xmax));
+ RNA_int_set(op->ptr, "ymax", MAX2(rect->ymin, rect->ymax));
return 1;
}
@@ -2774,7 +2794,7 @@ int WM_gesture_lines_cancel(bContext *C, wmOperator *op)
static int gesture_lasso_exec(bContext *C, wmOperator *op)
{
- RNA_BEGIN(op->ptr, itemptr, "path")
+ RNA_BEGIN (op->ptr, itemptr, "path")
{
float loc[2];
@@ -2974,7 +2994,7 @@ static void radial_control_set_tex(RadialControl *rc)
switch (RNA_type_to_ID_code(rc->image_id_ptr.type)) {
case ID_BR:
- if ((ibuf = brush_gen_radial_control_imbuf(rc->image_id_ptr.data))) {
+ if ((ibuf = BKE_brush_gen_radial_control_imbuf(rc->image_id_ptr.data))) {
glGenTextures(1, &rc->gltex);
glBindTexture(GL_TEXTURE_2D, rc->gltex);
glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, ibuf->x, ibuf->y, 0,
@@ -3200,9 +3220,12 @@ static int radial_control_get_properties(bContext *C, wmOperator *op)
else {
if (use_secondary_prop &&
RNA_property_boolean_get(&use_secondary_ptr, use_secondary_prop))
+ {
data_path = "data_path_secondary";
- else
+ }
+ else {
data_path = "data_path_primary";
+ }
}
if (!radial_control_get_path(&ctx_ptr, op, data_path, &rc->ptr, &rc->prop, 0, 0))
@@ -3225,7 +3248,9 @@ static int radial_control_get_properties(bContext *C, wmOperator *op)
if (!radial_control_get_path(&ctx_ptr, op, "zoom_path",
&rc->zoom_ptr, &rc->zoom_prop, 2,
RC_PROP_REQUIRE_FLOAT | RC_PROP_ALLOW_MISSING))
+ {
return 0;
+ }
if (!radial_control_get_path(&ctx_ptr, op, "image_id", &rc->image_id_ptr, NULL, 0, 0))
return 0;
@@ -3412,6 +3437,7 @@ static void WM_OT_radial_control(wmOperatorType *ot)
{
ot->name = "Radial Control";
ot->idname = "WM_OT_radial_control";
+ ot->description = "Set some size property (like e.g. brush size) with mouse wheel";
ot->invoke = radial_control_invoke;
ot->modal = radial_control_modal;
@@ -3515,7 +3541,7 @@ static int redraw_timer_exec(bContext *C, wmOperator *op)
if (a & 1) scene->r.cfra--;
else scene->r.cfra++;
- scene_update_for_newframe(bmain, scene, scene->lay);
+ BKE_scene_update_for_newframe(bmain, scene, scene->lay);
}
else if (type == 5) {
@@ -3530,7 +3556,7 @@ static int redraw_timer_exec(bContext *C, wmOperator *op)
if (scene->r.cfra > scene->r.efra)
scene->r.cfra = scene->r.sfra;
- scene_update_for_newframe(bmain, scene, scene->lay);
+ BKE_scene_update_for_newframe(bmain, scene, scene->lay);
redraw_timer_window_swap(C);
}
}
diff --git a/source/blender/windowmanager/intern/wm_subwindow.c b/source/blender/windowmanager/intern/wm_subwindow.c
index 6ffb28ba013..563eef8304c 100644
--- a/source/blender/windowmanager/intern/wm_subwindow.c
+++ b/source/blender/windowmanager/intern/wm_subwindow.c
@@ -237,7 +237,7 @@ void wm_subwindow_position(wmWindow *win, int swinid, rcti *winrct)
}
}
-/* ---------------- WM versions of OpenGL calls, using glBlah() syntax ------------------------ */
+/* ---------------- WM versions of OpenGL style API calls ------------------------ */
/* ----------------- exported in WM_api.h ------------------------------------------------------ */
/* internal state, no threaded opengl! XXX */
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index 031cfe90042..8d962c828ca 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -282,7 +282,7 @@ void wm_window_close(bContext *C, wmWindowManager *wm, wmWindow *win)
/* if temp screen, delete it after window free (it stops jobs that can access it) */
if (screen->temp) {
Main *bmain = CTX_data_main(C);
- free_libblock(&bmain->screen, screen);
+ BKE_libblock_free(&bmain->screen, screen);
}
/* check remaining windows */
diff --git a/source/blenderplayer/bad_level_call_stubs/stubs.c b/source/blenderplayer/bad_level_call_stubs/stubs.c
index 90d490dc279..6638cef32b2 100644
--- a/source/blenderplayer/bad_level_call_stubs/stubs.c
+++ b/source/blenderplayer/bad_level_call_stubs/stubs.c
@@ -122,11 +122,11 @@ void EDBM_mesh_normals_update(struct BMEditMesh *em) {}
void *g_system;
struct Heap* BLI_heap_new (void){return NULL;}
-void BLI_heap_free (struct Heap *heap, void *ptrfreefp) {}
+void BLI_heap_free(struct Heap *heap, void *ptrfreefp) {}
struct HeapNode* BLI_heap_insert (struct Heap *heap, float value, void *ptr){return NULL;}
-void BLI_heap_remove (struct Heap *heap, struct HeapNode *node) {}
-int BLI_heap_empty (struct Heap *heap) {return 0;}
-int BLI_heap_size (struct Heap *heap){return 0;}
+void BLI_heap_remove(struct Heap *heap, struct HeapNode *node) {}
+int BLI_heap_empty(struct Heap *heap) {return 0;}
+int BLI_heap_size(struct Heap *heap){return 0;}
struct HeapNode* BLI_heap_top (struct Heap *heap){return NULL;}
void* BLI_heap_popmin (struct Heap *heap){return NULL;}
@@ -191,7 +191,7 @@ float *give_cursor(struct Scene *scene, struct View3D *v3d){return (float *) NUL
void WM_menutype_free(void){}
void WM_menutype_freelink(struct MenuType* mt){}
int WM_menutype_add(struct MenuType *mt) {return 0;}
-int WM_operator_props_dialog_popup (struct bContext *C, struct wmOperator *op, int width, int height){return 0;}
+int WM_operator_props_dialog_popup(struct bContext *C, struct wmOperator *op, int width, int height){return 0;}
int WM_operator_confirm(struct bContext *C, struct wmOperator *op, struct wmEvent *event){return 0;}
struct MenuType *WM_menutype_find(const char *idname, int quiet){return (struct MenuType *) NULL;}
void WM_operator_stack_clear(struct bContext *C) {}
@@ -211,7 +211,7 @@ struct wmEventHandler *WM_event_add_modal_handler(struct bContext *C, struct wmO
struct wmTimer *WM_event_add_timer(struct wmWindowManager *wm, struct wmWindow *win, int event_type, double timestep){return (struct wmTimer *)NULL;}
void WM_event_remove_timer(struct wmWindowManager *wm, struct wmWindow *win, struct wmTimer *timer){}
void ED_armature_edit_bone_remove(struct bArmature *arm, struct EditBone *exBone){}
-void object_test_constraints (struct Object *owner){}
+void object_test_constraints(struct Object *owner){}
void ED_object_parent(struct Object *ob, struct Object *par, int type, const char *substr){}
void ED_object_constraint_set_active(struct Object *ob, struct bConstraint *con){}
void ED_node_composit_default(struct Scene *sce){}
@@ -267,15 +267,15 @@ struct EditMesh;
struct FCurve *verify_fcurve (struct bAction *act, const char group[], const char rna_path[], const int array_index, short add){return (struct FCurve *) NULL;}
int insert_vert_fcurve(struct FCurve *fcu, float x, float y, short flag){return 0;}
void delete_fcurve_key(struct FCurve *fcu, int index, short do_recalc){}
-struct KeyingSetInfo *ANIM_keyingset_info_find_named (const char name[]){return (struct KeyingSetInfo *) NULL;}
+struct KeyingSetInfo *ANIM_keyingset_info_find_name (const char name[]){return (struct KeyingSetInfo *) NULL;}
struct KeyingSet *ANIM_scene_get_active_keyingset (struct Scene *scene){return (struct KeyingSet *) NULL;}
int ANIM_scene_get_keyingset_index(struct Scene *scene, struct KeyingSet *ks){return 0;}
struct ListBase builtin_keyingsets;
-void ANIM_keyingset_info_register (struct KeyingSetInfo *ksi){}
-void ANIM_keyingset_info_unregister (const struct bContext *C, struct KeyingSetInfo *ksi){}
-short ANIM_validate_keyingset (struct bContext *C, struct ListBase *dsources, struct KeyingSet *ks){return 0;}
+void ANIM_keyingset_info_register(struct KeyingSetInfo *ksi){}
+void ANIM_keyingset_info_unregister(const struct bContext *C, struct KeyingSetInfo *ksi){}
+short ANIM_validate_keyingset(struct bContext *C, struct ListBase *dsources, struct KeyingSet *ks){return 0;}
short ANIM_add_driver(struct ID *id, const char rna_path[], int array_index, short flag, int type){return 0;}
-short ANIM_remove_driver (struct ID *id, const char rna_path[], int array_index, short flag){return 0;}
+short ANIM_remove_driver(struct ID *id, const char rna_path[], int array_index, short flag){return 0;}
void ED_space_image_release_buffer(struct SpaceImage *sima, void *lock){}
struct ImBuf *ED_space_image_acquire_buffer(struct SpaceImage *sima, void **lock_r){return (struct ImBuf *) NULL;}
void ED_space_image_zoom(struct SpaceImage *sima, struct ARegion *ar, float *zoomx, float *zoomy) {}
@@ -285,7 +285,7 @@ void ED_area_tag_refresh(struct ScrArea *sa){}
void ED_area_newspace(struct bContext *C, struct ScrArea *sa, int type){}
void ED_region_tag_redraw(struct ARegion *ar){}
void WM_event_add_fileselect(struct bContext *C, struct wmOperator *op){}
-void WM_cursor_wait (int val) {}
+void WM_cursor_wait(int val) {}
void ED_node_texture_default(struct Tex *tx){}
void ED_node_changed_update(struct bContext *C, struct bNode *node){}
void ED_node_generic_update(struct Main *bmain, struct bNodeTree *ntree, struct bNode *node){}
@@ -358,8 +358,8 @@ void ED_nurb_set_spline_type(struct Nurb *nu, int type){}
void make_editLatt(struct Object *obedit){}
void load_editLatt(struct Object *obedit){}
-void load_editNurb (struct Object *obedit){}
-void make_editNurb (struct Object *obedit){}
+void load_editNurb(struct Object *obedit){}
+void make_editNurb(struct Object *obedit){}
void uiItemR(struct uiLayout *layout, struct PointerRNA *ptr, char *propname, int flag, char *name, int icon){}
@@ -469,7 +469,7 @@ void WM_operatortype_append_macro_ptr(void (*opfunc)(struct wmOperatorType*, voi
void WM_operator_bl_idname(char *to, const char *from){}
void WM_operator_py_idname(char *to, const char *from){}
void WM_operator_ui_popup(struct bContext *C, struct wmOperator *op, int width, int height){}
-short insert_keyframe (struct ID *id, struct bAction *act, const char group[], const char rna_path[], int array_index, float cfra, short flag){return 0;}
+short insert_keyframe(struct ID *id, struct bAction *act, const char group[], const char rna_path[], int array_index, float cfra, short flag){return 0;}
short delete_keyframe(struct ID *id, struct bAction *act, const char group[], const char rna_path[], int array_index, float cfra, short flag){return 0;};
char *WM_operator_pystring(struct bContext *C, struct wmOperatorType *ot, struct PointerRNA *opptr, int all_args){return (char *)NULL;}
struct wmKeyMapItem *WM_modalkeymap_add_item(struct wmKeyMap *km, int type, int val, int modifier, int keymodifier, int value){return (struct wmKeyMapItem *)NULL;}
@@ -499,6 +499,9 @@ float BPY_driver_exec(struct ChannelDriver *driver, const float evaltime) {retur
void BPY_DECREF(void *pyob_ptr) {}
void BPY_pyconstraint_exec(struct bPythonConstraint *con, struct bConstraintOb *cob, struct ListBase *targets) {}
void macro_wrapper(struct wmOperatorType *ot, void *userdata) {}
+int pyrna_id_FromPyObject(struct PyObject *obj, struct ID **id){ return 0; }
+struct PyObject *pyrna_id_CreatePyObject(struct ID *id) {return NULL; }
+void BPY_context_update(struct bContext *C){};
/* intern/dualcon */
struct DualConMesh;
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 0168c06b7da..d069811168d 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -438,7 +438,28 @@ if(UNIX AND NOT APPLE)
# # doesnt work, todo
# install(CODE "execute_process(COMMAND find ${TARGETDIR}/${BLENDER_VERSION}/python/lib/ -name '*.so' -exec strip -s {} '\;')")
+
+ if(WITH_PYTHON_INSTALL_NUMPY)
+ install(
+ DIRECTORY ${PYTHON_NUMPY_PATH}/numpy
+ DESTINATION ${TARGETDIR_VER}/python/${_target_LIB}/python${PYTHON_VERSION}/site-packages
+ PATTERN ".svn" EXCLUDE
+ PATTERN "__pycache__" EXCLUDE # * any cache *
+ PATTERN "*.pyc" EXCLUDE # * any cache *
+ PATTERN "*.pyo" EXCLUDE # * any cache *
+ PATTERN "distutils" EXCLUDE # ./distutils
+ PATTERN "oldnumeric" EXCLUDE # ./oldnumeric
+ PATTERN "doc" EXCLUDE # ./doc
+ PATTERN "tests" EXCLUDE # ./tests
+ PATTERN "f2py" EXCLUDE # ./f2py - fortran/python interface code, not fun for blender devs.
+ PATTERN "include" EXCLUDE # include dirs all over, we wont use NumPy/CAPI
+ PATTERN "*.h" EXCLUDE # some includes are not in include dirs
+ PATTERN "*.a" EXCLUDE # ./core/lib/libnpymath.a - for linking, we dont need.
+ )
+ endif()
+
unset(_target_LIB)
+
endif()
endif()
elseif(WIN32)
@@ -545,6 +566,11 @@ elseif(WIN32)
FILES ${LIBDIR}/pthreads/lib/pthreadGC2.dll
DESTINATION ${TARGETDIR}
)
+ elseif(WITH_MINGW64)
+ install(
+ FILES ${LIBDIR}/binaries/pthreadGC2-w64.dll
+ DESTINATION ${TARGETDIR}
+ )
endif()
endif()
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 13daeec87be..c3da352136d 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -795,7 +795,7 @@ static int set_scene(int argc, const char **argv, void *data)
{
if (argc > 1) {
bContext *C = data;
- Scene *scene = set_scene_name(CTX_data_main(C), argv[1]);
+ Scene *scene = BKE_scene_set_name(CTX_data_main(C), argv[1]);
if (scene) {
CTX_data_scene_set(C, scene);
}
@@ -1101,7 +1101,7 @@ static void setupArguments(bContext *C, bArgs *ba, SYS_SystemHandle *syshandle)
#ifdef WITH_FFMPEG
BLI_argsAdd(ba, 1, NULL, "--debug-ffmpeg", "\n\tEnable debug messages from FFmpeg library", debug_mode_generic, (void *)G_DEBUG_FFMPEG);
#endif
- BLI_argsAdd(ba, 1, NULL, "--debug-python", "\n\tEnable debug messages for python", debug_mode_generic, (void *)G_DEBUG_FFMPEG);
+ BLI_argsAdd(ba, 1, NULL, "--debug-python", "\n\tEnable debug messages for python", debug_mode_generic, (void *)G_DEBUG_PYTHON);
BLI_argsAdd(ba, 1, NULL, "--debug-events", "\n\tEnable debug messages for the event system", debug_mode_generic, (void *)G_DEBUG_EVENTS);
BLI_argsAdd(ba, 1, NULL, "--debug-wm", "\n\tEnable debug messages for the window manager", debug_mode_generic, (void *)G_DEBUG_WM);
BLI_argsAdd(ba, 1, NULL, "--debug-all", "\n\tEnable all debug messages (excludes libmv)", debug_mode_generic, (void *)G_DEBUG_ALL);
@@ -1248,7 +1248,7 @@ int main(int argc, const char **argv)
IMB_init();
- BLI_cb_init();
+ BLI_callback_global_init();
#ifdef WITH_GAMEENGINE
syshandle = SYS_GetSystem();
@@ -1270,7 +1270,7 @@ int main(int argc, const char **argv)
#endif
/* background render uses this font too */
- BKE_font_register_builtin(datatoc_Bfont, datatoc_Bfont_size);
+ BKE_vfont_builtin_register(datatoc_Bfont, datatoc_Bfont_size);
/* Initialize ffmpeg if built in, also needed for bg mode if videos are
* rendered via ffmpeg */
@@ -1322,8 +1322,7 @@ int main(int argc, const char **argv)
BLI_argsFree(ba);
#ifdef WIN32
- while (argci)
- {
+ while (argci) {
free(argv[--argci]);
}
MEM_freeN(argv);
diff --git a/source/gameengine/BlenderRoutines/CMakeLists.txt b/source/gameengine/BlenderRoutines/CMakeLists.txt
index 5a7304765e4..96b56768b8f 100644
--- a/source/gameengine/BlenderRoutines/CMakeLists.txt
+++ b/source/gameengine/BlenderRoutines/CMakeLists.txt
@@ -32,7 +32,7 @@ set(INC
)
set(INC_SYS
-
+ ${PTHREADS_INCLUDE_DIRS}
)
set(SRC
diff --git a/source/gameengine/BlenderRoutines/SConscript b/source/gameengine/BlenderRoutines/SConscript
index 8f59ec0bf04..998396aba7c 100644
--- a/source/gameengine/BlenderRoutines/SConscript
+++ b/source/gameengine/BlenderRoutines/SConscript
@@ -35,4 +35,7 @@ if env['WITH_BF_CXX_GUARDEDALLOC']:
incs += ' ' + env['BF_BULLET_INC']
incs += ' ' + env['BF_OPENGL_INC']
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
+ incs += ' ' + env['BF_PTHREADS_INC']
+
env.BlenderLib ( 'ge_blen_routines', sources, Split(incs), defs, libtype=['core','player'], priority=[300,35] , cxx_compileflags=env['BGE_CXXFLAGS'])
diff --git a/source/gameengine/Converter/BL_ActionActuator.cpp b/source/gameengine/Converter/BL_ActionActuator.cpp
index 61379209151..9869dfb9424 100644
--- a/source/gameengine/Converter/BL_ActionActuator.cpp
+++ b/source/gameengine/Converter/BL_ActionActuator.cpp
@@ -370,10 +370,10 @@ PyObject* BL_ActionActuator::PyGetChannel(PyObject* value)
obj->GetPose(&m_pose); /* Get the underlying pose from the armature */
}
- // get_pose_channel accounts for NULL pose, run on both in case one exists but
+ // BKE_pose_channel_find_name accounts for NULL pose, run on both in case one exists but
// the channel doesnt
- if ( !(pchan=get_pose_channel(m_userpose, string)) &&
- !(pchan=get_pose_channel(m_pose, string)) )
+ if ( !(pchan=BKE_pose_channel_find_name(m_userpose, string)) &&
+ !(pchan=BKE_pose_channel_find_name(m_pose, string)) )
{
PyErr_SetString(PyExc_ValueError, "channel doesnt exist");
return NULL;
@@ -457,8 +457,8 @@ KX_PYMETHODDEF_DOC(BL_ActionActuator, setChannel,
obj->GetPose(&m_pose); /* Get the underlying pose from the armature */
game_copy_pose(&m_userpose, m_pose, 0);
}
- // pchan= verify_pose_channel(m_userpose, string); // adds the channel if its not there.
- pchan= get_pose_channel(m_userpose, string); // adds the channel if its not there.
+ // pchan= BKE_pose_channel_verify(m_userpose, string); // adds the channel if its not there.
+ pchan= BKE_pose_channel_find_name(m_userpose, string); // adds the channel if its not there.
if (pchan) {
copy_v3_v3(pchan->loc, matrix[3]);
@@ -480,8 +480,8 @@ KX_PYMETHODDEF_DOC(BL_ActionActuator, setChannel,
obj->GetPose(&m_pose); /* Get the underlying pose from the armature */
game_copy_pose(&m_userpose, m_pose, 0);
}
- // pchan= verify_pose_channel(m_userpose, string);
- pchan= get_pose_channel(m_userpose, string); // adds the channel if its not there.
+ // pchan= BKE_pose_channel_verify(m_userpose, string);
+ pchan= BKE_pose_channel_find_name(m_userpose, string); // adds the channel if its not there.
// for some reason loc.setValue(pchan->loc) fails
if (pchan) {
diff --git a/source/gameengine/Converter/BL_ArmatureObject.cpp b/source/gameengine/Converter/BL_ArmatureObject.cpp
index f9ddc258cfe..f38782a9405 100644
--- a/source/gameengine/Converter/BL_ArmatureObject.cpp
+++ b/source/gameengine/Converter/BL_ArmatureObject.cpp
@@ -61,7 +61,7 @@
/**
* Move here pose function for game engine so that we can mix with GE objects
* Principle is as follow:
- * Use Blender structures so that where_is_pose can be used unchanged
+ * Use Blender structures so that BKE_pose_where_is can be used unchanged
* Copy the constraint so that they can be enabled/disabled/added/removed at runtime
* Don't copy the constraints for the pose used by the Action actuator, it does not need them.
* Scan the constraint structures so that the KX equivalent of target objects are identified and
@@ -84,7 +84,7 @@ void game_copy_pose(bPose **dst, bPose *src, int copy_constraint)
return;
}
else if (*dst==src) {
- printf("copy_pose source and target are the same\n");
+ printf("BKE_pose_copy_data source and target are the same\n");
*dst=NULL;
return;
}
@@ -129,7 +129,7 @@ void game_copy_pose(bPose **dst, bPose *src, int copy_constraint)
BLI_ghash_free(ghash, NULL, NULL);
// set acceleration structure for channel lookup
- make_pose_channels_hash(out);
+ BKE_pose_channels_hash_make(out);
*dst=out;
}
@@ -200,7 +200,7 @@ void game_free_pose(bPose *pose)
{
if (pose) {
/* free pose-channels and constraints */
- free_pose_channels(pose);
+ BKE_pose_channels_free(pose);
/* free IK solver state */
BIK_clear_data(pose);
@@ -225,7 +225,7 @@ BL_ArmatureObject::BL_ArmatureObject(
m_poseChannels(),
m_objArma(armature),
m_framePose(NULL),
- m_scene(scene), // maybe remove later. needed for where_is_pose
+ m_scene(scene), // maybe remove later. needed for BKE_pose_where_is
m_lastframe(0.0),
m_timestep(0.040),
m_activeAct(NULL),
@@ -477,7 +477,7 @@ void BL_ArmatureObject::ApplyPose()
}
// update ourself
UpdateBlenderObjectMatrix(m_objArma);
- where_is_pose(m_scene, m_objArma); // XXX
+ BKE_pose_where_is(m_scene, m_objArma); // XXX
// restore ourself
memcpy(m_objArma->obmat, m_obmat, sizeof(m_obmat));
// restore active targets
@@ -590,7 +590,7 @@ bool BL_ArmatureObject::GetBoneMatrix(Bone* bone, MT_Matrix4x4& matrix)
bPoseChannel *pchan;
ApplyPose();
- pchan = get_pose_channel(m_objArma->pose, bone->name);
+ pchan = BKE_pose_channel_find_name(m_objArma->pose, bone->name);
if (pchan)
matrix.setValue(&pchan->pose_mat[0][0]);
RestorePose();
diff --git a/source/gameengine/Converter/BL_ArmatureObject.h b/source/gameengine/Converter/BL_ArmatureObject.h
index a6848cf57df..ced6b94e6fd 100644
--- a/source/gameengine/Converter/BL_ArmatureObject.h
+++ b/source/gameengine/Converter/BL_ArmatureObject.h
@@ -132,7 +132,7 @@ protected:
struct bPose *m_pose;
struct bPose *m_armpose;
struct bPose *m_framePose;
- struct Scene *m_scene; // need for where_is_pose
+ struct Scene *m_scene; // need for BKE_pose_where_is
double m_lastframe;
double m_timestep; // delta since last pose evaluation.
class BL_ActionActuator *m_activeAct;
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
index 382165065af..14362cd8f06 100644
--- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp
+++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
@@ -188,7 +188,7 @@ extern "C" {
#endif
//XXX #include "BSE_headerbuttons.h"
//XXX void update_for_newframe();
-//void scene_update_for_newframe(struct Scene *sce, unsigned int lay);
+//void BKE_scene_update_for_newframe(struct Scene *sce, unsigned int lay);
//#include "BKE_ipo.h"
//void do_all_data_ipos(void);
#ifdef __cplusplus
@@ -1000,9 +1000,9 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, KX_Scene* scene,
float fno[3];
if (mface->v4)
- normal_quad_v3( fno,mvert[mface->v1].co, mvert[mface->v2].co, mvert[mface->v3].co, mvert[mface->v4].co);
+ normal_quad_v3(fno,mvert[mface->v1].co, mvert[mface->v2].co, mvert[mface->v3].co, mvert[mface->v4].co);
else
- normal_tri_v3( fno,mvert[mface->v1].co, mvert[mface->v2].co, mvert[mface->v3].co);
+ normal_tri_v3(fno,mvert[mface->v1].co, mvert[mface->v2].co, mvert[mface->v3].co);
no0 = no1 = no2 = no3 = MT_Vector3(fno);
}
@@ -2613,7 +2613,7 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
case PARBONE:
{
// parent this to a bone
- Bone *parent_bone = get_named_bone( (bArmature *)(blenderchild->parent)->data, blenderchild->parsubstr);
+ Bone *parent_bone = BKE_armature_find_bone_name( (bArmature *)(blenderchild->parent)->data, blenderchild->parsubstr);
if (parent_bone) {
KX_BoneParentRelation *bone_parent_relation = KX_BoneParentRelation::New(parent_bone);
diff --git a/source/gameengine/Converter/BL_ShapeDeformer.cpp b/source/gameengine/Converter/BL_ShapeDeformer.cpp
index bb3636881ea..b93d731c5e6 100644
--- a/source/gameengine/Converter/BL_ShapeDeformer.cpp
+++ b/source/gameengine/Converter/BL_ShapeDeformer.cpp
@@ -77,7 +77,7 @@ BL_ShapeDeformer::BL_ShapeDeformer(BL_DeformableGameObject *gameobj,
m_lastShapeUpdate(-1)
{
m_key = m_bmesh->key;
- m_bmesh->key = copy_key(m_key);
+ m_bmesh->key = BKE_key_copy(m_key);
};
/* this second constructor is needed for making a mesh deformable on the fly. */
@@ -94,14 +94,14 @@ BL_ShapeDeformer::BL_ShapeDeformer(BL_DeformableGameObject *gameobj,
m_lastShapeUpdate(-1)
{
m_key = m_bmesh->key;
- m_bmesh->key = copy_key(m_key);
+ m_bmesh->key = BKE_key_copy(m_key);
};
BL_ShapeDeformer::~BL_ShapeDeformer()
{
if (m_key && m_bmesh->key && m_key != m_bmesh->key)
{
- free_key(m_bmesh->key);
+ BKE_key_free(m_bmesh->key);
BLI_remlink_safe(&G.main->key, m_bmesh->key);
MEM_freeN(m_bmesh->key);
m_bmesh->key = m_key;
diff --git a/source/gameengine/Converter/BL_SkinDeformer.cpp b/source/gameengine/Converter/BL_SkinDeformer.cpp
index 2aa97370330..ab275fa773a 100644
--- a/source/gameengine/Converter/BL_SkinDeformer.cpp
+++ b/source/gameengine/Converter/BL_SkinDeformer.cpp
@@ -230,7 +230,7 @@ void BL_SkinDeformer::BGEDeformVerts()
dg;
++i, dg=(bDeformGroup*)dg->next)
{
- m_dfnrToPC[i] = get_pose_channel(par_arma->pose, dg->name);
+ m_dfnrToPC[i] = BKE_pose_channel_find_name(par_arma->pose, dg->name);
if (m_dfnrToPC[i] && m_dfnrToPC[i]->bone->flag & BONE_NO_DEFORM)
m_dfnrToPC[i] = NULL;
diff --git a/source/gameengine/Converter/CMakeLists.txt b/source/gameengine/Converter/CMakeLists.txt
index b570489d6a2..1826f1ad25b 100644
--- a/source/gameengine/Converter/CMakeLists.txt
+++ b/source/gameengine/Converter/CMakeLists.txt
@@ -59,6 +59,7 @@ set(INC
)
set(INC_SYS
+ ${PTHREADS_INCLUDE_DIRS}
)
diff --git a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
index df6be142b30..b62e667c211 100644
--- a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
+++ b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
@@ -88,8 +88,8 @@ extern "C"
#include "BKE_global.h"
#include "BKE_animsys.h"
#include "BKE_library.h"
-#include "BKE_material.h" // copy_material
-#include "BKE_mesh.h" // copy_mesh
+#include "BKE_material.h" // BKE_material_copy
+#include "BKE_mesh.h" // BKE_mesh_copy
#include "DNA_space_types.h"
#include "DNA_anim_types.h"
#include "RNA_define.h"
@@ -1409,7 +1409,7 @@ RAS_MeshObject *KX_BlenderSceneConverter::ConvertMeshSpecial(KX_Scene* kx_scene,
/* Watch this!, if its used in the original scene can cause big troubles */
if (me->us > 0) {
printf("Mesh has a user \"%s\"\n", name);
- me = (ID*)copy_mesh((Mesh*)me);
+ me = (ID*)BKE_mesh_copy((Mesh*)me);
me->us--;
}
BLI_remlink(&m_maggie->mesh, me); /* even if we made the copy it needs to be removed */
@@ -1433,7 +1433,7 @@ RAS_MeshObject *KX_BlenderSceneConverter::ConvertMeshSpecial(KX_Scene* kx_scene,
if (mat_old && (mat_old->id.flag & LIB_DOIT)==0)
{
Material *mat_old= mesh->mat[i];
- Material *mat_new= copy_material( mat_old );
+ Material *mat_new= BKE_material_copy( mat_old );
mat_new->id.flag |= LIB_DOIT;
mat_old->id.us--;
diff --git a/source/gameengine/Converter/KX_ConvertProperties.h b/source/gameengine/Converter/KX_ConvertProperties.h
index 5bfe202a539..345af3bfa74 100644
--- a/source/gameengine/Converter/KX_ConvertProperties.h
+++ b/source/gameengine/Converter/KX_ConvertProperties.h
@@ -33,10 +33,10 @@
#define __KX_CONVERTPROPERTIES_H__
void BL_ConvertProperties(struct Object* object,
- class KX_GameObject* gameobj,
- class SCA_TimeEventManager* timemgr,
- class SCA_IScene* scene,
- bool isInActiveLayer);
+ class KX_GameObject* gameobj,
+ class SCA_TimeEventManager* timemgr,
+ class SCA_IScene* scene,
+ bool isInActiveLayer);
#endif //__KX_CONVERTPROPERTIES_H__
diff --git a/source/gameengine/Converter/SConscript b/source/gameengine/Converter/SConscript
index 4e2adbdc021..e95ae5448fb 100644
--- a/source/gameengine/Converter/SConscript
+++ b/source/gameengine/Converter/SConscript
@@ -39,4 +39,7 @@ if env['WITH_BF_CXX_GUARDEDALLOC']:
if env['WITH_BF_BULLET']:
defs.append('USE_BULLET')
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
+ incs += ' ' + env['BF_PTHREADS_INC']
+
env.BlenderLib ( 'ge_converter', sources, Split(incs), defs, libtype=['core','player'], priority=[305,40], cxx_compileflags=env['BGE_CXXFLAGS'])
diff --git a/source/gameengine/Expressions/KX_HashedPtr.cpp b/source/gameengine/Expressions/KX_HashedPtr.cpp
index 84488e3641d..51550d52636 100644
--- a/source/gameengine/Expressions/KX_HashedPtr.cpp
+++ b/source/gameengine/Expressions/KX_HashedPtr.cpp
@@ -28,15 +28,13 @@
/** \file gameengine/Expressions/KX_HashedPtr.cpp
* \ingroup expressions
*/
-#ifdef __MINGW64__
-#include <basetsd.h>
-#endif
+
#include "KX_HashedPtr.h"
unsigned int KX_Hash(void * inDWord)
{
-#ifdef _WIN64
+#if defined(_WIN64) && !defined(FREE_WINDOWS64)
unsigned __int64 key = (unsigned __int64)inDWord;
#else
unsigned long key = (unsigned long)inDWord;
diff --git a/source/gameengine/GameLogic/SCA_ActuatorSensor.h b/source/gameengine/GameLogic/SCA_ActuatorSensor.h
index e40c2492b8a..894dc2162cf 100644
--- a/source/gameengine/GameLogic/SCA_ActuatorSensor.h
+++ b/source/gameengine/GameLogic/SCA_ActuatorSensor.h
@@ -1,7 +1,4 @@
/*
- * Actuator sensor
- *
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -28,13 +25,13 @@
* ***** END GPL LICENSE BLOCK *****
*/
+#ifndef __SCA_ACTUATORSENSOR_H__
+#define __SCA_ACTUATORSENSOR_H__
+
/** \file SCA_ActuatorSensor.h
* \ingroup gamelogic
*/
-#ifndef __SCA_ACTUATORSENSOR_H__
-#define __SCA_ACTUATORSENSOR_H__
-
#include "SCA_ISensor.h"
#include "SCA_IActuator.h"
@@ -71,4 +68,3 @@ public:
};
#endif
-
diff --git a/source/gameengine/GamePlayer/common/GPC_Canvas.cpp b/source/gameengine/GamePlayer/common/GPC_Canvas.cpp
index eccfefedd4d..f4224b9e255 100644
--- a/source/gameengine/GamePlayer/common/GPC_Canvas.cpp
+++ b/source/gameengine/GamePlayer/common/GPC_Canvas.cpp
@@ -88,6 +88,12 @@ void GPC_Canvas::Resize(int width, int height)
{
m_width = width;
m_height = height;
+
+ // initialize area so that it's available for game logic on frame 1 (ImageViewport)
+ m_displayarea.m_x1 = 0;
+ m_displayarea.m_y1 = 0;
+ m_displayarea.m_x2 = width;
+ m_displayarea.m_y2 = height;
}
void GPC_Canvas::EndFrame()
diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
index b5e165a58ec..1e16cbd51f2 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
@@ -848,7 +848,7 @@ int main(int argc, char** argv)
{
if (scene->gm.stereoflag == STEREO_ENABLED) {
stereomode = (RAS_IRasterizer::StereoMode) scene->gm.stereomode;
- if (stereomode != RAS_IRasterizer::RAS_STEREO_QUADBUFFERED)
+ if (stereomode == RAS_IRasterizer::RAS_STEREO_QUADBUFFERED)
stereoWindow = true;
}
}
@@ -870,7 +870,7 @@ int main(int argc, char** argv)
if (domeWarp)
{
//XXX to do: convert relative to absolute path
- domeText= add_text(domeWarp, "");
+ domeText= BKE_text_load(domeWarp, "");
if (!domeText)
printf("error: invalid warpdata text file - %s\n", domeWarp);
else
diff --git a/source/gameengine/Ketsji/BL_Shader.h b/source/gameengine/Ketsji/BL_Shader.h
index 3015dd204c8..47221365816 100644
--- a/source/gameengine/Ketsji/BL_Shader.h
+++ b/source/gameengine/Ketsji/BL_Shader.h
@@ -231,30 +231,30 @@ public:
virtual PyObject* py_repr(void) { return PyUnicode_FromFormat("BL_Shader\n\tvertex shader:%s\n\n\tfragment shader%s\n\n", vertProg, fragProg); }
// -----------------------------------
- KX_PYMETHOD_DOC( BL_Shader, setSource );
- KX_PYMETHOD_DOC( BL_Shader, delSource );
- KX_PYMETHOD_DOC( BL_Shader, getVertexProg );
- KX_PYMETHOD_DOC( BL_Shader, getFragmentProg );
- KX_PYMETHOD_DOC( BL_Shader, setNumberOfPasses );
- KX_PYMETHOD_DOC( BL_Shader, isValid);
- KX_PYMETHOD_DOC( BL_Shader, validate);
+ KX_PYMETHOD_DOC(BL_Shader, setSource);
+ KX_PYMETHOD_DOC(BL_Shader, delSource);
+ KX_PYMETHOD_DOC(BL_Shader, getVertexProg);
+ KX_PYMETHOD_DOC(BL_Shader, getFragmentProg);
+ KX_PYMETHOD_DOC(BL_Shader, setNumberOfPasses);
+ KX_PYMETHOD_DOC(BL_Shader, isValid);
+ KX_PYMETHOD_DOC(BL_Shader, validate);
// -----------------------------------
- KX_PYMETHOD_DOC( BL_Shader, setUniform4f );
- KX_PYMETHOD_DOC( BL_Shader, setUniform3f );
- KX_PYMETHOD_DOC( BL_Shader, setUniform2f );
- KX_PYMETHOD_DOC( BL_Shader, setUniform1f );
- KX_PYMETHOD_DOC( BL_Shader, setUniform4i );
- KX_PYMETHOD_DOC( BL_Shader, setUniform3i );
- KX_PYMETHOD_DOC( BL_Shader, setUniform2i );
- KX_PYMETHOD_DOC( BL_Shader, setUniform1i );
- KX_PYMETHOD_DOC( BL_Shader, setUniformfv );
- KX_PYMETHOD_DOC( BL_Shader, setUniformiv );
- KX_PYMETHOD_DOC( BL_Shader, setUniformMatrix4 );
- KX_PYMETHOD_DOC( BL_Shader, setUniformMatrix3 );
- KX_PYMETHOD_DOC( BL_Shader, setUniformDef );
- KX_PYMETHOD_DOC( BL_Shader, setAttrib );
- KX_PYMETHOD_DOC( BL_Shader, setSampler);
+ KX_PYMETHOD_DOC(BL_Shader, setUniform4f);
+ KX_PYMETHOD_DOC(BL_Shader, setUniform3f);
+ KX_PYMETHOD_DOC(BL_Shader, setUniform2f);
+ KX_PYMETHOD_DOC(BL_Shader, setUniform1f);
+ KX_PYMETHOD_DOC(BL_Shader, setUniform4i);
+ KX_PYMETHOD_DOC(BL_Shader, setUniform3i);
+ KX_PYMETHOD_DOC(BL_Shader, setUniform2i);
+ KX_PYMETHOD_DOC(BL_Shader, setUniform1i);
+ KX_PYMETHOD_DOC(BL_Shader, setUniformfv);
+ KX_PYMETHOD_DOC(BL_Shader, setUniformiv);
+ KX_PYMETHOD_DOC(BL_Shader, setUniformMatrix4);
+ KX_PYMETHOD_DOC(BL_Shader, setUniformMatrix3);
+ KX_PYMETHOD_DOC(BL_Shader, setUniformDef);
+ KX_PYMETHOD_DOC(BL_Shader, setAttrib);
+ KX_PYMETHOD_DOC(BL_Shader, setSampler);
#endif
};
diff --git a/source/gameengine/Ketsji/CMakeLists.txt b/source/gameengine/Ketsji/CMakeLists.txt
index 8ed2d2f46db..c7f54838c10 100644
--- a/source/gameengine/Ketsji/CMakeLists.txt
+++ b/source/gameengine/Ketsji/CMakeLists.txt
@@ -55,6 +55,7 @@ set(INC
)
set(INC_SYS
+ ${PTHREADS_INCLUDE_DIRS}
${GLEW_INCLUDE_PATH}
../../../extern/recastnavigation/Recast/Include
../../../extern/recastnavigation/Detour/Include
diff --git a/source/gameengine/Ketsji/KX_BlenderMaterial.h b/source/gameengine/Ketsji/KX_BlenderMaterial.h
index af6771933eb..3a6dda06320 100644
--- a/source/gameengine/Ketsji/KX_BlenderMaterial.h
+++ b/source/gameengine/Ketsji/KX_BlenderMaterial.h
@@ -113,12 +113,12 @@ public:
static PyObject* pyattr_get_blending(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static int pyattr_set_blending(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
- KX_PYMETHOD_DOC( KX_BlenderMaterial, getShader );
- KX_PYMETHOD_DOC( KX_BlenderMaterial, getMaterialIndex );
- KX_PYMETHOD_DOC( KX_BlenderMaterial, getTexture );
- KX_PYMETHOD_DOC( KX_BlenderMaterial, setTexture );
+ KX_PYMETHOD_DOC(KX_BlenderMaterial, getShader);
+ KX_PYMETHOD_DOC(KX_BlenderMaterial, getMaterialIndex);
+ KX_PYMETHOD_DOC(KX_BlenderMaterial, getTexture);
+ KX_PYMETHOD_DOC(KX_BlenderMaterial, setTexture);
- KX_PYMETHOD_DOC( KX_BlenderMaterial, setBlending );
+ KX_PYMETHOD_DOC(KX_BlenderMaterial, setBlending);
#endif // WITH_PYTHON
// --------------------------------
diff --git a/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp b/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp
index 9940b400527..f5926818e7d 100644
--- a/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp
+++ b/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp
@@ -121,8 +121,8 @@ void KX_BulletPhysicsController::RelativeTranslate(const MT_Vector3& dloc,bool l
void KX_BulletPhysicsController::RelativeRotate(const MT_Matrix3x3& drot,bool local)
{
- float rotval[12];
- drot.getValue(rotval);
+ float rotval[9];
+ drot.getValue3x3(rotval);
CcdPhysicsController::RelativeRotate(rotval,local);
}
diff --git a/source/gameengine/Ketsji/KX_FontObject.h b/source/gameengine/Ketsji/KX_FontObject.h
index affa882427f..30fe89162c0 100644
--- a/source/gameengine/Ketsji/KX_FontObject.h
+++ b/source/gameengine/Ketsji/KX_FontObject.h
@@ -39,10 +39,10 @@ class KX_FontObject : public KX_GameObject
{
public:
Py_Header
- KX_FontObject( void* sgReplicationInfo,
- SG_Callbacks callbacks,
- RAS_IRenderTools* rendertools,
- Object *ob);
+ KX_FontObject(void* sgReplicationInfo,
+ SG_Callbacks callbacks,
+ RAS_IRenderTools* rendertools,
+ Object *ob);
virtual ~KX_FontObject();
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp
index bdb586b2474..c5145ef2171 100644
--- a/source/gameengine/Ketsji/KX_GameObject.cpp
+++ b/source/gameengine/Ketsji/KX_GameObject.cpp
@@ -31,10 +31,7 @@
*/
-#if defined(_WIN64)
-# ifdef __MINGW64__
-# include <basetsd.h>
-# endif
+#if defined(_WIN64) && !defined(FREE_WINDOWS64)
typedef unsigned __int64 uint_ptr;
#else
typedef unsigned long uint_ptr;
diff --git a/source/gameengine/Ketsji/KX_IPO_SGController.cpp b/source/gameengine/Ketsji/KX_IPO_SGController.cpp
index b8872f5ddc3..950e3c88a9e 100644
--- a/source/gameengine/Ketsji/KX_IPO_SGController.cpp
+++ b/source/gameengine/Ketsji/KX_IPO_SGController.cpp
@@ -31,10 +31,7 @@
*/
-#if defined(_WIN64)
-# ifdef __MINGW64__
-# include <basetsd.h>
-# endif
+#if defined(_WIN64) && !defined(FREE_WINDOWS64)
typedef unsigned __int64 uint_ptr;
#else
typedef unsigned long uint_ptr;
diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
index dbcfe7983c7..83b02acf1c3 100644
--- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
+++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
@@ -52,12 +52,9 @@
#include "RAS_IRasterizer.h"
#include "RAS_IRenderTools.h"
#include "RAS_ICanvas.h"
-#include "STR_String.h"
#include "MT_Vector3.h"
#include "MT_Transform.h"
#include "SCA_IInputDevice.h"
-#include "KX_Scene.h"
-#include "MT_CmMatrix4x4.h"
#include "KX_Camera.h"
#include "KX_FontObject.h"
#include "KX_Dome.h"
@@ -90,6 +87,12 @@
#define DEFAULT_LOGIC_TIC_RATE 60.0
#define DEFAULT_PHYSICS_TIC_RATE 60.0
+#ifdef FREE_WINDOWS /* XXX mingw64 (gcc 4.7.0) defines a macro for DrawText that translates to DrawTextA. Not good */
+#ifdef DrawText
+#undef DrawText
+#endif
+#endif
+
const char KX_KetsjiEngine::m_profileLabels[tc_numCategories][15] = {
"Physics:", // tc_physics
"Logic:", // tc_logic
@@ -1063,37 +1066,30 @@ void KX_KetsjiEngine::EnableCameraOverride(const STR_String& forscene)
m_overrideSceneName = forscene;
}
-
-
void KX_KetsjiEngine::SetCameraZoom(float camzoom)
{
m_cameraZoom = camzoom;
}
-
-
void KX_KetsjiEngine::SetCameraOverrideUseOrtho(bool useOrtho)
{
m_overrideCamUseOrtho = useOrtho;
}
-
-
void KX_KetsjiEngine::SetCameraOverrideProjectionMatrix(const MT_CmMatrix4x4& mat)
{
m_overrideCamProjMat = mat;
}
-
void KX_KetsjiEngine::SetCameraOverrideViewMatrix(const MT_CmMatrix4x4& mat)
{
m_overrideCamViewMat = mat;
}
-void KX_KetsjiEngine::SetCameraOverrideClipping(float near, float far)
+void KX_KetsjiEngine::SetCameraOverrideClipping(float nearfrust, float farfrust)
{
- m_overrideCamNear = near;
- m_overrideCamFar = far;
+ m_overrideCamNear = nearfrust;
+ m_overrideCamFar = farfrust;
}
void KX_KetsjiEngine::SetCameraOverrideLens(float lens)
diff --git a/source/gameengine/Ketsji/KX_Light.cpp b/source/gameengine/Ketsji/KX_Light.cpp
index 7e9d95b37a2..5922e97aaf4 100644
--- a/source/gameengine/Ketsji/KX_Light.cpp
+++ b/source/gameengine/Ketsji/KX_Light.cpp
@@ -45,6 +45,7 @@
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
+#include "DNA_lamp_types.h"
#include "GPU_material.h"
KX_LightObject::KX_LightObject(void* sgReplicationInfo,SG_Callbacks callbacks,
@@ -267,6 +268,22 @@ void KX_LightObject::UnbindShadowBuffer(RAS_IRasterizer *ras)
GPU_lamp_shadow_buffer_unbind(lamp);
}
+struct Image *KX_LightObject::GetTextureImage(short texslot)
+{
+ Lamp *la = (Lamp*)GetBlenderObject()->data;
+
+ if (texslot >= MAX_MTEX || texslot < 0)
+ {
+ printf("KX_LightObject::GetTextureImage(): texslot exceeds slot bounds (0-%d)\n", MAX_MTEX-1);
+ return NULL;
+ }
+
+ if (la->mtex[texslot])
+ return la->mtex[texslot]->tex->ima;
+
+ return NULL;
+}
+
#ifdef WITH_PYTHON
/* ------------------------------------------------------------------------- */
/* Python Integration Hooks */
diff --git a/source/gameengine/Ketsji/KX_Light.h b/source/gameengine/Ketsji/KX_Light.h
index c2815e7afaa..9fe13f471ba 100644
--- a/source/gameengine/Ketsji/KX_Light.h
+++ b/source/gameengine/Ketsji/KX_Light.h
@@ -66,6 +66,7 @@ public:
int GetShadowLayer();
void BindShadowBuffer(class RAS_IRasterizer *ras, class KX_Camera *cam, class MT_Transform& camtrans);
void UnbindShadowBuffer(class RAS_IRasterizer *ras);
+ struct Image *GetTextureImage(short texslot);
void Update();
void UpdateScene(class KX_Scene *kxscene) {m_lightobj.m_scene = (void*)kxscene;}
diff --git a/source/gameengine/Ketsji/KX_PyMath.h b/source/gameengine/Ketsji/KX_PyMath.h
index 392a6633067..b0000405893 100644
--- a/source/gameengine/Ketsji/KX_PyMath.h
+++ b/source/gameengine/Ketsji/KX_PyMath.h
@@ -108,7 +108,7 @@ bool PyMatTo(PyObject* pymat, T& mat)
noerror = false;
else
{
- for( unsigned int col = 0; col < cols; col++)
+ for(unsigned int col = 0; col < cols; col++)
{
PyObject *item = PySequence_GetItem(pyrow, col); /* new ref */
mat[row][col] = PyFloat_AsDouble(item);
diff --git a/source/gameengine/Ketsji/KX_PythonSeq.h b/source/gameengine/Ketsji/KX_PythonSeq.h
index 1c2d2869be0..47a01737cdb 100644
--- a/source/gameengine/Ketsji/KX_PythonSeq.h
+++ b/source/gameengine/Ketsji/KX_PythonSeq.h
@@ -52,7 +52,7 @@ enum KX_PYGENSEQ_TYPE {
extern PyTypeObject KX_PythonSeq_Type;
#define BPy_KX_PythonSeq_Check(obj) \
- (Py_TYPE(obj) == &KX_PythonSeq_Type)
+ (Py_TYPE(obj) == &KX_PythonSeq_Type)
typedef struct {
PyObject_VAR_HEAD
diff --git a/source/gameengine/Ketsji/KX_VertexProxy.cpp b/source/gameengine/Ketsji/KX_VertexProxy.cpp
index 1739f26ab6f..d489c015273 100644
--- a/source/gameengine/Ketsji/KX_VertexProxy.cpp
+++ b/source/gameengine/Ketsji/KX_VertexProxy.cpp
@@ -500,7 +500,7 @@ PyObject* KX_VertexProxy::PyGetRGBA()
PyObject* KX_VertexProxy::PySetRGBA(PyObject* value)
{
- if PyLong_Check(value) {
+ if (PyLong_Check(value)) {
int rgba = PyLong_AsSsize_t(value);
m_vertex->SetRGBA(rgba);
m_mesh->SetMeshModified(true);
diff --git a/source/gameengine/Ketsji/SConscript b/source/gameengine/Ketsji/SConscript
index 2943acd546d..5fdf250006f 100644
--- a/source/gameengine/Ketsji/SConscript
+++ b/source/gameengine/Ketsji/SConscript
@@ -47,4 +47,7 @@ if env['WITH_BF_BULLET']:
defs.append('USE_BULLET')
incs += ' #source/gameengine/Physics/Bullet'
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
+ incs += ' ' + env['BF_PTHREADS_INC']
+
env.BlenderLib ( 'ge_logic_ketsji', sources, Split(incs), defs, libtype=['core','player'], priority=[320,45], cxx_compileflags=env['BGE_CXXFLAGS'])
diff --git a/source/gameengine/Rasterizer/RAS_ICanvas.h b/source/gameengine/Rasterizer/RAS_ICanvas.h
index 337ea247ce3..dae70c5c343 100644
--- a/source/gameengine/Rasterizer/RAS_ICanvas.h
+++ b/source/gameengine/Rasterizer/RAS_ICanvas.h
@@ -133,25 +133,25 @@ public:
virtual
int
- GetMouseX( int x
+ GetMouseX(int x
)=0;
virtual
int
- GetMouseY( int y
+ GetMouseY(int y
)= 0;
virtual
float
- GetMouseNormalizedX( int x
+ GetMouseNormalizedX(int x
)=0;
virtual
float
- GetMouseNormalizedY( int y
+ GetMouseNormalizedY(int y
)= 0;
- virtual
+ virtual
const RAS_Rect &
GetDisplayArea(
) const = 0;
diff --git a/source/gameengine/Rasterizer/RAS_IRasterizer.h b/source/gameengine/Rasterizer/RAS_IRasterizer.h
index 592ddbe07d3..d6c9ddd9603 100644
--- a/source/gameengine/Rasterizer/RAS_IRasterizer.h
+++ b/source/gameengine/Rasterizer/RAS_IRasterizer.h
@@ -386,7 +386,7 @@ public:
*/
virtual void SetPolygonOffset(float mult, float add) = 0;
- virtual void DrawDebugLine(const MT_Vector3& from,const MT_Vector3& to,const MT_Vector3& color)=0;
+ virtual void DrawDebugLine(const MT_Vector3& from, const MT_Vector3& to, const MT_Vector3& color)=0;
virtual void DrawDebugCircle(const MT_Vector3& center, const MT_Scalar radius, const MT_Vector3& color,
const MT_Vector3& normal, int nsector)=0;
virtual void FlushDebugShapes()=0;
diff --git a/source/gameengine/VideoTexture/ImageRender.cpp b/source/gameengine/VideoTexture/ImageRender.cpp
index 9f7d42dcf56..98a3dc8f96a 100644
--- a/source/gameengine/VideoTexture/ImageRender.cpp
+++ b/source/gameengine/VideoTexture/ImageRender.cpp
@@ -608,10 +608,10 @@ ImageRender::ImageRender (KX_Scene * scene, KX_GameObject * observer, KX_GameObj
{
v4 = polygon->GetVertex(3);
mirrorVerts.push_back(v4);
- area = normal_quad_v3( normal,(float*)v1->getXYZ(), (float*)v2->getXYZ(), (float*)v3->getXYZ(), (float*)v4->getXYZ());
+ area = normal_quad_v3(normal,(float*)v1->getXYZ(), (float*)v2->getXYZ(), (float*)v3->getXYZ(), (float*)v4->getXYZ());
} else
{
- area = normal_tri_v3( normal,(float*)v1->getXYZ(), (float*)v2->getXYZ(), (float*)v3->getXYZ());
+ area = normal_tri_v3(normal,(float*)v1->getXYZ(), (float*)v2->getXYZ(), (float*)v3->getXYZ());
}
area = fabs(area);
mirrorArea += area;
diff --git a/source/gameengine/VideoTexture/Texture.cpp b/source/gameengine/VideoTexture/Texture.cpp
index 40e9f899ef0..382d3d0bc32 100644
--- a/source/gameengine/VideoTexture/Texture.cpp
+++ b/source/gameengine/VideoTexture/Texture.cpp
@@ -30,6 +30,7 @@ http://www.gnu.org/copyleft/lesser.txt.
#include <structmember.h>
#include <KX_GameObject.h>
+#include <KX_Light.h>
#include <RAS_MeshObject.h>
#include <DNA_mesh_types.h>
#include <DNA_meshdata_types.h>
@@ -59,6 +60,7 @@ http://www.gnu.org/copyleft/lesser.txt.
// Blender GameObject type
BlendType<KX_GameObject> gameObjectType ("KX_GameObject");
+BlendType<KX_LightObject> lightObjectType ("KX_LightObject");
// load texture
@@ -105,6 +107,16 @@ RAS_IPolyMaterial * getMaterial (PyObject *obj, short matID)
return NULL;
}
+// get pointer to a lamp
+KX_LightObject * getLamp(PyObject *obj)
+{
+ // if object is available
+ if (obj == NULL) return NULL;
+
+ // returns NULL if obj is not a KX_LightObject
+ return lightObjectType.checkType(obj);
+}
+
// get material ID
short getMaterialID(PyObject * obj, const char *name)
@@ -206,6 +218,7 @@ int Texture_init (Texture *self, PyObject *args, PyObject *kwds)
{
// get pointer to texture image
RAS_IPolyMaterial * mat = getMaterial(obj, matID);
+ KX_LightObject * lamp = getLamp(obj);
if (mat != NULL)
{
// is it blender material or polygon material
@@ -227,6 +240,12 @@ int Texture_init (Texture *self, PyObject *args, PyObject *kwds)
self->m_useMatTexture = false;
}
}
+ else if (lamp != NULL)
+ {
+ self->m_imgTexture = lamp->GetTextureImage(texID);
+ self->m_useMatTexture = false;
+ }
+
// check if texture is available, if not, initialization failed
if (self->m_imgTexture == NULL && self->m_matTexture == NULL)
// throw exception if initialization failed